[
  {
    "path": ".editorconfig",
    "content": "# EditorConfig is awesome: https://EditorConfig.org\n\n# top-most EditorConfig file\nroot = true\n\n# Unix-style newlines with a newline ending every file\n[*]\nend_of_line = lf\ninsert_final_newline = true\n# Default indent via 2 spaces\nindent_style = space\nindent_size = 2\ntrim_trailing_whitespace = true\n\n[*.py]\n# Set default charset\ncharset = utf-8\n# 4 space indentation, required by Python\nindent_style = space\nindent_size = 4\n\n# Tab indentation (no size specified)\n[Makefile]\nindent_style = tab\n\n[*.{md, markdown}]\n# Trailing space has meaning\ntrim_trailing_whitespace = false\n[CHANGELOG]\n# Trailing space has meaning\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: shantigilbert # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]\npatreon: emuelec # Replace with a single Patreon username\nopen_collective: # Replace with a single Open Collective username\nko_fi: # Replace with a single Ko-fi username\ntidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel\ncommunity_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry\nliberapay: # Replace with a single Liberapay username\nissuehunt: # Replace with a single IssueHunt username\notechie: # Replace with a single Otechie username\ncustom: ['https://paypal.me/shantigilbert'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n# BEFORE YOU OPEN AN ISSUE MAKE SURE IT IS NOT ALREADY RESOLVED IN THE WIKI https://github.com/EmuELEC/EmuELEC/wiki\n\n# MAKE SURE YOUR DEVICE IS A [SUPPORTED DEVICE](https://github.com/EmuELEC/EmuELEC/wiki/Supported-Devices)  \n\n# PLEASE DO NOT POST GENERAL HELP QUESTIONS! EITHER USE THE FORUM (https://emuelec.org) OR USE DISCORD FOR THAT (https://discord.gg/cbgtJTu), THIS IS ONLY FOR BUG/ISSUES REPORTING!\n\n# DELETE EVERYTHING ABOVE THIS LINE (INCLUDING THIS LINE) BEFORE SUBMITTING TO MAKE SURE YOU'VE READ THIS!\n\n\n**Describe the bug**\nA clear and concise description of what the bug is.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error\n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**EmuELEC version:**\n - Version [e.g. 22]\n\n**Device (please complete the following information):**\n - SOC: [e.g. S095x3]\n - Brand: [e.g. Beelink]\n - Model [e.g. mini g1]\n - Version [e.g. 22]\n\n**Additional context**\nAdd any other context about the problem here.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false\ncontact_links:\n  - name: EmuELEC Forum\n    url: https://emuelec.org\n    about: If you have a regular/general questions, please use the forum instead of a GH issue.\n  - name: Discord\n    url: https://discord.gg/jQWCFwTn5T\n    about: If you have a regular/general question, please use discord instead of a GH issue.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n# BEFORE YOU OPEN AN ISSUE MAKE SURE IT IS NOT ALREADY RESOLVED IN THE WIKI https://github.com/EmuELEC/EmuELEC/wiki\n\n# MAKE SURE YOUR DEVICE IS A [SUPPORTED DEVICE](https://github.com/EmuELEC/EmuELEC/wiki/Supported-Devices)  \n\n# PLEASE DO NOT POST GENERAL HELP QUESTIONS! EITHER USE THE FORUM (https://emuelec.org) OR USE DISCORD FOR THAT (https://discord.gg/cbgtJTu), THIS IS ONLY FOR BUG/ISSUES REPORTING!\n\n# DELETE EVERYTHING ABOVE THIS LINE (INCLUDING THIS LINE) BEFORE SUBMITTING TO MAKE SURE YOU'VE READ THIS!\n\n**Is your feature request related to a problem? Please describe.**\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\n\n**Describe the solution you'd like**\nA clear and concise description of what you want to happen.\n\n**Describe alternatives you've considered**\nA clear and concise description of any alternative solutions or features you've considered.\n\n**Additional context**\nAdd any other context or screenshots about the feature request here.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/other-issue.md",
    "content": "---\nname: Other issue\nabout: Describe this issue template's purpose here.\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n# BEFORE YOU OPEN AN ISSUE MAKE SURE IT IS NOT ALREADY RESOLVED IN THE WIKI https://github.com/EmuELEC/EmuELEC/wiki\n\n# MAKE SURE YOUR DEVICE IS A [SUPPORTED DEVICE](https://github.com/EmuELEC/EmuELEC/wiki/Supported-Devices)  \n\n# PLEASE DO NOT POST GENERAL HELP QUESTIONS! EITHER USE THE FORUM (https://emuelec.org) OR USE DISCORD FOR THAT (https://discord.gg/cbgtJTu), THIS IS ONLY FOR BUG/ISSUES REPORTING!\n\n# DELETE EVERYTHING ABOVE THIS LINE (INCLUDING THIS LINE) BEFORE SUBMITTING TO MAKE SURE YOU'VE READ THIS!\n"
  },
  {
    "path": ".github/config.yml",
    "content": "blank_issues_enabled: false\ncontact_links:\n  - name: EmuELEC Forum\n    url: https://emuelec.org\n    about: If you have a regular/general questions, please use the forum instead of a GH issue.\n  - name: Discord\n    url: https://discord.com/invite/cbgtJTu\n    about: If you have a regular/general question, please use discord instead of a GH issue.\n"
  },
  {
    "path": ".gitignore",
    "content": "# build directorys\n/build.*/\n/builds\n/.fakeroot.*\n\n# automatically downloaded source files\n/sources/\n\n# prebuild target binarys to provide\n/target/\n\n# mkpkg temp\nmkpkg-temp\n\n# options\n/.libreelec\n\n# private working directory\n/.work/\n\n# dedicated filesystem\n/lost+found/\n\n# symlinks...\n/sources\n/.work\n\n# ccache\n/.ccache/\n\n# backup files\n*.orig\n\n# crap\n.DS_Store\n.directory\n\n# ignore git repos from update scripts\ntools/mkpkg/*.git\n\n# ignore old linux configs\nprojects/**/*.old\n\nrepo/\nrepo\nlocal.conf\nsx05re-kodi*.log\n\npackages/sx05re/experimental/\npackages/sx05re/emuelec-emulationstation/api_keys.txt\n"
  },
  {
    "path": "CHANGELOG",
    "content": "EmuELEC CHANGELOG\n==================\n\n# v4.8\n\nFinally It's here!\n\n## Changes\n\n* Removed preinstalled ports:\nPorts were taking a lof of space on the system partition and added a lot to the main build time, with PortMaster now fully mature and working extremly well, we decide to use it instead, all the ports we had preinstalled\nare available in PortMaster. \nHowever one thing keep in mind is that all ports from PortMaster are intended for handheld devices, so EmuELEC on SBC's is not officially supported, worstcase_scenario has tested a lot of games running on a s905x2 SBC \nand installed directly from PortMaster: https://github.com/EmuELEC/EmuELEC/wiki/List-of-Ports-running-on-EmuElec-(work-in-progress)\nJust remember to follow their instructions. https://portmaster.games/ as some games require special steps. \nTo install PortMaster Scroll to the Setup Scripts, select \"Install PortMaster\" and follow the instructions, after restarting ES, you should now see \"Launch Portmaster\" in the Ports section.\n\n* A new and improved Splash system:\nThanks to Langerz82 and worstcase_scenario it has never been as easy to customize how EmuELEC looks while loading a game! there are many splash options to display in game launching and exit available, including:\n\n\t* Default - Legacy option, will load the default splash.\n\t* Enable Platform/Rom loading: Legacy option, will look for a file in /storage/splash/{platform}/{rom_name}.png if not found it will look for /storage/splash/{platform}/launching.png\n\t* Custom - Select your own image/video!\n\t* Random - automatically selects video/image from the defined path!\n\t* Scraped media - This option will read your platform gamelist.xml for a predefined tag and use any media you have scraped, options: random, image, thumbnail, video, marquee, fanart\n\n* Many other improvements:\nWe removed mame2016 and added MAME 0.282 (with full MESS support), while not everything has ben setup automatically, you can load any system that MAME supports from Retroarch directly.\nAdded Fmtowns using MESS. \nAdded Satellaview and Sufami Turbo thanks to Qbertaddict for the suggestion\nWii Remotes are now easy to setup directly from ES\nVolume is now controlled globally from ES\nUpdated Amiberry to v8, added Amiberry-lite\nAdded Ikemen-GO, a M.U.G.E.N alternative.\nFull midi/mt32/fluidsynth support(core dependent)\nThe ability to use a normal IR sensor bar (or candles) with a wiimote inside retroarch\nAutomatic shutdown timer after user inactivity\nscript for saving and enabling multiple macros for controllers\nAudio connection via Bluetooth devices\ncustomizable scroll sound for ES menu\nenabled cheat function for Mame2010\nnew and updated emulators: gearlynx bk electronika, supafaust, amiberry-lite, dosbox-pure, stella2023 and PUAE2021, most of the libretro cores\n\n... and many other changes, \nIf you find any issues with this update, please first test with a clean installation! if problem persists feel free to open an issue or visit us on [Discord](https://discord.gg/jQWCFwTn5T). \n\n## Other versions\nWhile I tried testing as much as I could on Odroidm1, RK356x, OGA/OGS and GameForce, due to lack of time these devices are not properly tested, not everything is workin as smooth as on Amlogic devices, please update at your own risk.\nIf you find any issue with these versions, please open an issue or visit us on [Discord](https://discord.gg/jQWCFwTn5T). \n\n# v4.7\n\nIt has been a long time since we released a new version, and after many changes, many bug fixes and the help of many people, finally here it is v4.7!\n\nIf you find any issues with this update, please first test with a clean installation!\n\nI apologize in advance, but the changelog is going to be automatically created from the GitHub commits and PRs since there are many and I will most likely miss some.\n\nBut here is a short (incomplete) version:\n\nAdded support for PortMaster! in addition we have added a few new ports.\nAdded FMtowns emulator\nUpdated most emulators to the latest version\nFixed many Bluetoth gamepad issues, specially with fake PS3 Gamepads (tested with shanwan and guo hua)\nAdded support for MT7668 BT chip\nUpdated to the latest CoreELEC base (CE-20 branch)\nAutogamepad configs should now work much better and support more controllers\nFixed some issues with resolution switching \nEnabled TTS on Emulationstation\n... And many, many changes under the hood!\n\n## Thanks to the always supportive Patreons\n\nScott O'Connell\nLibre Computer Project\nJohn Johnson\nvictor manuel sanchez lopez\nDaniel Iruegas\nJohn Gamester\nMatthew S\njmthill\nRuss Crandall\nPeter Shaw\nTony Escobar\nDennis W.\nMichael Brown\nAlienatedDiego2\n\nAnd all the others that helped in the past, from the bottom of my heart thank you all!\n\n## Special thanks\n\nAnd in no particular order, I would like to personally thank:\n\nVpeter\nLangerz82\n7ji\nMiwasp\nKelv\nJohnnyonFlame\nebeem-sama\nQbertaddict\nDim (I still love the Crystal theme!)\nSamWilson (Happy BD!)\nAlienatedDiego\ntobetter\nportisch\ndanielmx\nf.caruso\nPro-me3us\nworstcase_scenario\nHardkernel\nGameForce\nLibreComputer\nCoreELEC team\n...And you!\n\nThanks! \n\n\nPlease note that due to lack of testing time, some devices have not been properly tested, if you find a bug or an issue, please don't hesitate to let us know via [Discord](https://discord.gg/cbgtJTul), or opening an issue in github.\n\nIn other news...the EmuELEC forum is closing soon!.\n\nWe regret to inform you that the EmuELEC forum will be shut down by the end of February 2024. We hope to preserve the forum in read-only mode, but we cannot guarantee it.\nThe main reason for this decision is that we have outgrown the free package offered by discourse, and we do not have the resources to upgrade it.\nThe second reason is that most of the forum activity is from users of unsupported devices and unofficial images, which we cannot and do not want to moderate or endorse.\nIf you need support for our supported devices and official images, please join our [Discord](https://discord.gg/cbgtJTul) server.\n\n\n## Github Automatic Changelog:  \n\n* Updating Virtual Jaguar and enabling it by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1068\n* Added script for setting cheevos if entries are missing in settings.ini by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1074\n* Update flycast gles by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1112\n* ampart: remove package and installation script by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1119\n* fix broken packages by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1123\n* Add sharp x1 by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1117\n* Dev Retroarch setkillkey option by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1109\n* ES input PS3 GamePad Default Controller Assignment Fix. by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1088\n* Dev advmame joy update by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1103\n* oga patch for scummvm is no longer needed by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1130\n* Make python-evdev for oga/gf compilable again by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1131\n* GF patch for scummvm is no longer needed. by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1133\n* Fix brightness reset on GF (issue #1136) by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1139\n* Revert ethtool to version 6.0 to make oga/gf compilable again by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1132\n* Dev flycast joy fixes by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1113\n* Updating version of emuelec-emulationstation by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1128\n* Match kernel versions identical to 64 bit version by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1142\n* Make glibc compilable for oga and gf by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1129\n* Dev - Amlogic Different Resolutions other than 1080p fix. (in seperate PR) by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1171\n* Enable CIFS on Odroid-M1 by @drizzt in https://github.com/EmuELEC/EmuELEC/pull/1175\n* RTL8821CU: switch source to 8821cu-20210916 by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1176\n* poppler: switch source to freedesktop's gitlab by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1177\n* dosbox-svn: bump to 53ca2f6 (2023.04.08) by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1178\n* scummvm: bump to b5ca1b3 (2023.04.09) by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1180\n* xash3d: remove configure option --disable-vgui by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1182\n* minor fix - advmame - joy assign - menu cancel button to left thumb by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1172\n* Dev ppssppsdl auto joypad by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1134\n* Dev auto gamepad yabasanshiro by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1126\n* Dev joy common update by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1060\n* inject_bl301: fix PKG_SHA256 and add PKG_ARCH by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1183\n* opengl-meson: fix for Amlogic-ne by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1184\n* amiberry: fix for Amlogic-ne and improve by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1185\n* lib32-opengl-meson: support Amlogic-ne by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1186\n* [EE - Emulator][FbNeoSA] Adds DPAD hats assignments by default. by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1187\n* Amlogic-ne: fix cfgload by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1204\n* EE - Display Resolution - Configurable FrameBuffer, and some fixes. by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1208\n* [EE 4.4+ Fix] Better Game Controller Bluetooth Support. by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1201\n* Emulators update for next Emuelec version by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1205\n* Modified patches for SDL2.28.1 OGA by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1215\n* Modifed patch for RA version 1.15 OGA by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1216\n* Bump bstone by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1214\n* Added Vircon32 libretro core by @Chandler-Kluser in https://github.com/EmuELEC/EmuELEC/pull/1229\n* Fix apache-ant version, 1.10.13 by @yingw in https://github.com/EmuELEC/EmuELEC/pull/1226\n* New Emulators update for version 4.6.5 by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1218\n* Modified patch for Retroarch version 1.16 by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1219\n* test function added to emuelec-utils. by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1234\n* New updates for EmuElec 4.6.5 by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1235\n* EE - set fb and resize - fixes. by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1237\n* opengl-meson: fix lib32 mali symlinks for Amlogic-ne by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1203\n* EE - display - 480i support by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1206\n* Update es_systems.cfg by @yingw in https://github.com/EmuELEC/EmuELEC/pull/1253\n* System updates 4.7 by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1251\n* New emu update for 47 by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1252\n* Updated SDL2_mixer 32 bit and 64 by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1250\n* Fixes4.7 by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1258\n* Latest changes for Crystal theme by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1259\n* Update submodule in dosbox-svn by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1262\n* Update joy_common.sh GUID fix by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1271\n* Update retroarch fix audio amlogic old by @bennydiamond in https://github.com/EmuELEC/EmuELEC/pull/1260\n* Dev virtualjaguar clock experimental by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1236\n* EE - setres.sh - 480cvbs 576cvbs default fix by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1270\n* EE - hypseus gamepad config fix by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1199\n* EE - Advmame auto gamepad fixes 2. by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1272\n* Add missing dependency by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1275\n* b2024 - Advmame Button Remap New Revision 2 by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1274\n* [Bug Fix] GameForce chi - Retrorun-go2 - Rotation Fix. by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1267\n* [Bug Fix] Fix EE Audio Volume Adjustment on reset. by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1266\n* Update emuelec-bluetooth - v2.1 revision by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1276\n* Update es_features.cfg by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1279\n* EE 4.7 - emuelec-bluetooth - RSSI fix for Bluez 5.72 by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1281\n* dev - OpenBOR - joypad fix by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1287\n* Bump bstone by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1288\n* Revert part of the latest changes in script image by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1293\n* EE - Port - Native Video support, and virtual keyboard fixes by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1291\n* Fixing Half Life and updating by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1296\n* xow package include in image. by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1298\n* Multiemu Emulator by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1300\n* Last emus update 4.7 by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1301\n* Generate correct advmame.rc by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1303\n* dev - auto gamepad - strip unneeded backslash in expressions by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1304\n* Fix supertuxkart by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1306\n* Fix segfault when exiting directly after startup by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1307\n* EE - ES Shutdown/Restart Fix by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1308\n* Bump some emulators by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1311\n* EE - Device Gameforce - Retrorun - Rotation and controls Fix by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1310\n\n## New Contributors\n* @drizzt made their first contribution in https://github.com/EmuELEC/EmuELEC/pull/1175\n* @Chandler-Kluser made their first contribution in https://github.com/EmuELEC/EmuELEC/pull/1229\n* @yingw made their first contribution in https://github.com/EmuELEC/EmuELEC/pull/1226\n* @bennydiamond made their first contribution in https://github.com/EmuELEC/EmuELEC/pull/1260\n\n**Full Changelog**: https://github.com/EmuELEC/EmuELEC/compare/v4.6...v4,7\n\n\n# v4.6\n\n## Please read the complete change-log before updating. A lot of the changes have been done to the base system. specially to the way the partitions are handled so you might need/want to do a clean install.\n\nThere is now a new tool for mounting systemd and external sources for ROMS\nyou can read more about it here: https://github.com/EmuELEC/EmuELEC/pull/980\n\nEEROMS partition will only be created on SD cards bigger than 8gb. For detail explanation: https://github.com/EmuELEC/EmuELEC/pull/979\nThis also changes how the second partition is created, It is now 6GB (unless you use a 4GB sd card, then it will be 2GB) If you update from 4.5 or lower you will keep the 2GB STORAGE partition, but if you need your STORAGE partition to be bigger (6GB), then you will need to do a clean install on a SD card bigger than 8GB. \n\nThe System base is now from CoreELEC 20 and all emulators, cores and ports have been \nupdated to their most recent version at the time of this release.\n\nPlease note that due to lack of time, some devices have not been properly tested, if you find a bug or an issue, please don't hesitate to let us know via [Discord](https://discord.gg/cbgtJTul), the [EmuELEC forum](https://emuelec.org) or opening an issue in github.\n\n\n# Thanks to the always supportive Patreons\n\nJohn Johnson\nvictor manuel sanchez lopez\nDaniel Iruegas\nVictor Davis\nJohn Gamester\nMatthew S\njmthill\nRuss Crandall\ntailbøx\nPeter Shaw\nNoah Heninger\nBSM_Mylock\nTony Escobar\nDennis W.\nNina Seramour\nMichael Brown\nTomas Radej\nBrian \nChad Barker\nAlienatedDiego\nBryan Pizzuti\n\nAnd anyone else who has supported via other means, in the past, present and future, I really appreciate it!\n\n## What's Changed\n* fakeroot: bump to 1.28 (from no-longer-existing 1.27) by @JohnnyonFlame in https://github.com/EmuELEC/EmuELEC/pull/884\n* Update libretro core cap32 by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/886\n* Update hypseus-singe to fix some games by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/887\n* Bump RigelEngine to latest version by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/889\n* Fix audio stuttering in lzdoom again by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/888\n* Multiple controller mappings - iNNEXT USB and PlayGame USB by @nwildner in https://github.com/EmuELEC/EmuELEC/pull/840\n* dev joy advmame fix - 1 controller controlling 2 players and more bug. by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/891\n* Fix for mpv not compiling on OGA/OGS/GF by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/919\n* fix fs-resize would break on 4GB drives, and EEROMS was not properly formatted on USB drives by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/921\n* RK356x: update uboot for firefly devices by @shantigilbert in https://github.com/EmuELEC/EmuELEC/pull/926\n* EE-ES Multidisc creation support. by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/923\n* implements installtointernal via a new package ampart by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/928\n* introduce new emmc installation method aminstall by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/930\n* Remove duplicate PKG_VERSION in bstone package.mk by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/938\n* mount_romfs.sh: rewrite to properly support 2-partition layout by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/942\n* ampart: bump version f0c3cc44; aminstall: misc fixes and better migration of EEROMS by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/943\n* mount_romfs.sh: ensure /storage/.update is always mounted as long as EEROMS is valid; mount EEROMS when user-defined storage-roms.mount failed by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/944\n* Misc packages fixes by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/946\n* Revert RTL8812AU to previous version by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/947\n* poppler: bump version 32fa288 (22.06.0) and deps fix by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/948\n* jslisten: add systemd as dependency as it includes libudev.h by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/949\n* emuelec-32bit-libs: fix typo PKG_BUID -> PKG_BUILD by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/951\n* exfat-linux: seperate from linux to save build time by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/950\n* Misc depedency fixes (qt-everywhere, ampart) by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/953\n* Introduce actual multilib support by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/956\n* Flycast Textures folders by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/960\n* Fix typo description heart of darkness by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/959\n* DuckStation Textures - Modify emuelec-dirs add /roms/psx/textures by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/958\n* lib32: optimize, behaviour change and mali fix by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/957\n* Updating duckstation to the latest working version by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/967\n* Adding symlink logic in duckstation.sh to redirect to texture replacement by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/966\n* Add PKG_NEED_UNPACK to lib32 packages that need it. by @shantigilbert in https://github.com/EmuELEC/EmuELEC/pull/971\n* fheroes2: fix controller not working; SDL2 cleanup by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/974\n* Fix assets dir in devilutionX by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/976\n* fs-resize: raise storage size to 6g, allow omitting eeroms manually by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/979\n* eemount: introduce package & change mount logic by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/980\n* eemount: bump 4adf3138; init: fix disabled systemds units by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/983\n* eemount: bump 2321603 by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/984\n* force overwrite file on unziping files by @lihexali in https://github.com/EmuELEC/EmuELEC/pull/989\n* Update Emulators 4.6 by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1013\n* lib32-libdrm: keep up with generic-libdrm by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1016\n* ffmpeg: fix dep x264; lib32-ffmpeg: switch to openssl by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1019\n* options: raise default ccache limit to 20G by @7Ji in https://github.com/EmuELEC/EmuELEC/pull/1022\n* package emulator advmame - patch for vsync to work with the fps. by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/992\n* Bump bstone to latest by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1023\n* Update emulators 46 part 2 by @Kelvfimer in https://github.com/EmuELEC/EmuELEC/pull/1018\n* emulator - duckstation standalone - game controller autoconfiguration by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/994\n* [Feature] Cloud Loading and Saving for retroarch auto saves and state saves. by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/997\n* EE - joy common - controller - order fix and revision by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/936\n* Check resolution fixes, Setres overhaul, cvbs fix other resolutions people could not see. Borders option added. AdvMame Exit Display Fix. by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1021\n* Update es_systems.cfg by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1054\n* Update 99-emuelec.conf by @miwasp in https://github.com/EmuELEC/EmuELEC/pull/1055\n* Set Resolution - Fixes by @Langerz82 in https://github.com/EmuELEC/EmuELEC/pull/1058\n\n## New Contributors\n* @JohnnyonFlame made their first contribution in https://github.com/EmuELEC/EmuELEC/pull/884\n* @7Ji made their first contribution in https://github.com/EmuELEC/EmuELEC/pull/921\n* @lihexali made their first contribution in https://github.com/EmuELEC/EmuELEC/pull/989\n\n# 4.5\n\n## EmuELEC v4.5 - Core/Emulator Update\n\nThis version is just an emulators and cores update, but it also has some small bug fixes.\n\n## Bug fixes\n\n* Add 32-bit .info files for the libretro cores that need it, this fixes issues as save states not working.\n* Fix audio stuttering in lzdoom again (#888)\n* Fix an issue where gptokeyb would not kill emulators if hotkey was set to the `select` button\n* Fixed a small issue with cloud sync if the configuration file was edited in windows\n\n## Core and emulator updates\n\nWhile this looks like a small changelog, keep in mind this is mostly an update for most cores, ports and emulators (60+) have been updated to the latest commits on github, we tested them internally but as always we cannot test with all devices and with all games, so if you find issues please post them on the forum or discord, unless, if you are 100% sure it's a reproducible bug then open a Github issue. \n\n## Special thanks!\n\nI want to thank the [Patreon](https://patreon.com/emuelec)/[Github Sponsors](https://github.com/sponsors/shantigilbert) supporters that have made working on EmuELEC possible (In no particular order).\n\nDewen Hsu\nJohn Gamester\nMatthew Seashore\nCraig Hibbert\njmthill\nRuss Crandall\ntailbøx\nPeter Shaw\nNoah Heninger\nBSM_Mylock\nTony Escobar\nDennis W. \nTim Wilson\nJason Burns\nNina Seramour\nDavid Simmons\nMichael Brown\npyjmj05\nTomas Radej\nBrian Hoffman\nChad Barker\nAlienatedDiego\nBryan Pizzuti\nSylvia van Os\n\nAnd everyone else that has supported EmuELEC in the past in any way shape or form! \n\nThank you for your support!\n\n\n# 4.4\n\nGeneral: \n\nHuge update to base build system: \n\n* All Amlogic devices now use the same kernel 4.9-19! \n* You might notice a bit more performance on some emulators as well usage in general.\n* IMPORTANT: S905 (GXBB, p201) for the moment is no longer supported. If you have one of those devices (s905 no letter after the 5) DO NOT UPDATE, stay in 4.3.\n\nFixed Bugs:\n\n* One of the most annyoing bugs that plagued fbdev with Retroarch was finally fixed (Issue #76) \n  fixed in PR `mali_fbdev fix for fps drop after egl_destroy` (#789) by @spleen1981!\n  This means that using retroarch as bootup option is now possible (some small changes need to be done).  \n* Fixed bluetooth connectivity issues\n* Fix zoom not working on manuals \n* Fix many external mounting issues\n* Backup will now rename the file instead of deleting it after restore.\n* Fixed SuperTux and SuperTuxKart data download \n* Fixed autoupdate would show update available even if there was none. \n\nAdditions and other fixes: \n\n* Added WIP Mupen64plus Standalone\n* Added fbneo Standalone\n* Added Duckstation Standalone\n* Added Yabasanshiro Standalone\n* Added Blake Stone to ports\n* Added iotop\n* Added VIM\n* Added External Mount settings in ES\n* Added option to create key remaps for Advance MAME\n* Switch to SDL 2.0.20 for all devices\n* Support for Pixelcade (Install script is in Setup)\n* Retroachievements encore is now configurable from ES\n* Added Enable Integer Overscaling in ES\n* Use toggle for fast forward instead of hold\n* Add .68k .68K .sgd .SGD to genesis/md\n* Added gamepad auto configuration for Dolphin and Flycast Thanks to Joshua L (@Langerz82)\n* Reworked Advance MAME gamepad auto configuration Thanks to Joshua L (@Langerz82)\n* Removed ceemmc because it's no longer compatible with 3 partitions\n* Added option to backup to cloud services using rclone.\n* Switch to parallel_n64_32b as default n64 emulator for handhelds. \n* Add Heart Of Darkness to ports (PR #863)\n* Added a5200 core as default emulator for Atari 5200\n* Added gearcoleco core (PR #859)\n* Updated several emulators (PR #856)\n* Added Messen-s to gameboy to allow for Super GameBoy emulation (PR #848)\n\nAnd many other changes! for the full list check out the commit history. \n\nCloud sync note:\n\nBe sure to read https://rclone.org/remote_setup/#configuring-by-copying-the-config-file\nName your remote as `EmuELEC_Remote` and copy rclone.conf to `/emuelec/configs/rclone/` \nfinally create a folder named `EmuELEC_Backup` on your cloud service. \n\nIf you would like to use another name for the remote or backup folder you can create a file named \n`/emuelec/configs/rclone/ee_cloud_sync.cfg` and add this to the file:\n\n```\nEE_SYNC_REMOTE=\"your_remote_name\"\nEE_SYNC_PATH=\"your_backup_folder\"\n```\n\nCloud backup and restore options are in \n\"Main Menu > EmuELEC Settings > Danger Zone > Cloud Backup Settings and Game Saves\"\n\"Main Menu > EmuELEC Settings > Danger Zone > Cloud Restore Settings and Game Saves\"\n\n# 4.3\n\nGeneral: \n\n* Fix Autoupdate\n* Fix no backup restore if EEROMS was set to fat32\n* Fix no external ROMS if EEROMS was set to fat32\n* Fix typo on Parallel N64 32b core name\n* Unify Brightness between ES and RA\n* Fix advmame.sh: unset DISPLAY for Amlogic and Amlogic-ng\n* Fix SuperTux2: Fix sed in launch script\n* Fix vertical mode not respecting index ratio\n* Fix Connect to WiFi on first boot if using es_defaults.txt\n* Fix volume resets to 98% using AV\n* Fix Do not redirect stdout/stderr to /dev/null in maxperf and normperf. (#661)\n* Fix Amstrad GX4000\n* Fix create /storage/roms/amstradgx4000 on boot\n* emuelecRunEmu.sh: remove hardcoded bin path, this allows to use most of the binaries/scripts be called from `/emuelec/bin` or `/usr/bin` in that order\n* Add Megadrive MSU to es_systems.cfg\n* Add fceumm-mod libretro core to play some additional NES ROM hacks. (#658)\n* New Packages: Box64, Box86, GL4es, Axe11, libglu (for future use)\n* Bump most cores and emulators to current versions\n* Bump Retroarch to 1.9.6\n* Add Flycast Stand Alone \n* Add Alternate version of Mupen64plus-nx\n* Replace old filemanager for 351Files\n* Cleanup es_systems.cfg remove and add some extentions\n* Add Hurrican port (Handhelds currently have no working controls) \n* Atomiswave: Remove workaround for nvmem\n* Fix Stadia Gamepad. Thanks to amuzulo#1322 \n* Fix issue with lzdoom loading .doom files and sound on mods\n* Update some sound packages\n* Fix es_systems.cfg: Add extensions to c64/c128 and Amiga (#677)\n* Add Cdogs-sdl to ports\n* Add Abuse to ports NOTE: WIP controls\n* Add Streets of Rage Remake\n* Fix Retroarch display of CJK characters (Fixes #534 & #431)\n* Fix SFC not scraping\n* Updated most emulators and cores\n* Create folders for fbneo consoles\n* Minor changes to fix switching of resolutions.\n* fheroes2: Add Free Heroes of Might & Magic II port\n* SoRR: Fix controls on Gameforce and OGA\n* Fix bezels downloaded to the wrong location\n* Enable Random Boot videos (see note)\n* es_systems.cfg: C64 add .tap extension\n* Add \"Set as bootgame\" option to advance game options (see notes)\n* Stop using autostart.sh and use /usr/bin/emuelec_autostart.sh (if you need to use autostart please use /storage/.config/custom_start.sh)\n* emuelec-emulationstation: use GLES2 renderer\n* Many small fixes I may have missed on this changelog\n\nAmlogic-ng: \n\n* Add preliminary support for Raxda Zero \n* Add RTL8761 Bluetooth Support (#698)\n* Include ssv6xxx-aml drivers\n\nOdroid Go Advance: \n* Enable bluetooth support for OGA/OGS (#725)\n\n\nNote about random intro videos: \nmp4 files only and they should be in `/storage/roms/splash/introvideos`\nif no mp4 file is found the default intro video is shown.\nIn ES, enabling \"Randomize Boot Video\" will also enable \"Always Show Boot Video\"\n\nNote about \"Set as bootgame\":\nThis will allow to select a single game to start at boot, useful for arcade systems or for handhelds if you have a favorite game and what to launch it on boot. \nThis game is launched by ES before it loads the game gamelists, so any stats recorded by ES will saved (e.g. times played, last played, etc)\n\nSelect the game and open the \"Advance Game Options\" and then set \"Launch This Game At Startup\" to \"On\"\n\n* After the game is ended (via hotkey+start) normal boot will continue.\n* Not all systems support this (e.g, ports).\n* Any retroarch settings (shaders, filters, bezels, splash, etc) will be respected. \n* To remove bootgame, select the game that is currently set to boot and set \"Launch This Game At Startup\" to \"Off\", or go into \"System Settings > Developer > Stop Launching This Game At Startup\"  \nFixes #728\n\n# 4.2\n\nA new forum has been open for emuelec: https://emuelec.org\n\nGeneral: \n\n* Add ee_fstype to set the EEROMS partitions to the desired file system, between FAT32 (default), EXT4, EXFAT and NTFS (read the warning about using NTFS). Instructions coming soon to Wiki/forum\n* Fix OGG background music\n* Update setres.sh and advmame.sh for resolution 1280x1024p60hz (PR #600)\n* Fix drastic game saves & save states erased when resetting scripts & binaries to default (PR #595) \n* Add Potator a Watara Supervision emulator core, roms go into /storage/roms/supervision\n* gptokeyb bump and fix missing trigger actions\n* Crystal bump to latest\n* emuelec-emulationstation bump to latest\n* Bump Retroarch to v1.9.4\n* Switch Duckstation name to Swanstation\n* Rework 32bit core detection on emuelecRunEmu.sh\n* Yabasanshiro: Revert back to 7ae0de7 as it gives much better performance\n* Added freej2me Java games emulator, it accepts .jar files and they should go into /storage/roms/freej2me. Internet is required only on first run to download the Java JDK.\n* Bump RigelEnfgine to fix a bug\n* Hypseus replaced by Hypseus-singe\n* Add auto gamepad configuration for Hypseus\n* Add Non-Commercial Duckstation core (untested)\n* Always update es_systems.cfg on system update\n* Fix unusual bug that metadata would not save on quit or restart (You need to remove the directory /storage/.config/emulationstation/scripts/quit)\n* Replace SDL1.2 with SDL1.2-compat\n* Bezels will now respect ratio and integer scale set in menu\n\nAmlogic-ng: \n\n* Enable qca6174 drivers (Fixes issues #611)\n* Update SDL2 to SDL 2.0.12\n* Fix Retroarch not updating after applying CPU video filter\n* Bump kernel to 640e3a3\n\nOdroid Go Advance/Super & GameForce: \n\n* Bump kernel to use latest Mali G31 blobs\n* Introduce RetroRun, available for Flycast for the moment\n* Use gptokeyb for controls on Solarus\n* Fix reboot while charging\n* Fix retrorun reversed analogs\n* Convert screenshots from pbm to png\n\nGameForce:\n\n* Move global hotkey to button 1 to avoid conflicting hotkeys in retroarch, 1+Dpad up/down for volume, 1+Dpad lef/right for brightness\n* Brightness was not correctly calculated on GameForce (PR #619)\n* Fix hypseus controls (#622)\n* Update U-boot and Kernel\n* Fix Opentyrian\n* Fix Advancemame\n\n# New ee_fstype \nStarting with 4.2 a new option for people that are having issues with the EEROMS partition is available, but it comes with a few warnings, please read carefully and decide if this is for you:\n\n* To be able to use this option a fresh install is required\n* Do not change anything if FAT32 works for you\n* Use EXFAT instead of NTFS when possible\n* If you use Linux EXT4 might be the best option for you!\n* I repeat do not change anything if FAT32 works for you\n* Keep in mind this is a very experimental feature\n* If you insist in using NTFS please read the warning below\n\n## Intructions\n\nIf you would like to use FAT32 skip steps 2,3 and 4\n\n1.- Flash the correct test image to your SD, it needs to be the .img.gz on a CLEAN sd, it will not work on update (.tar)\n2.- Right after it is flashed open the first partition EMUELEC\n3.- Create a file named ee_fstype (no extension!) on the root of the EMUELEC partition\n4.- Open the file and type `exfat`,`ntfs` or `ext4` save it and close it\n5.- Do whatever you do to the partition (dtb change, ee_default.txt, etc)\n6.- Test\n\nKeep in mind this is an experimental feature, only enable it if you would like to help testing it, please report any issues to the EmuELEC forum, Discord or Github\n\n# NTFS Filesystem warning  \n\nWhile I tried to do as much testing as possible with the new ee_fstype option, there still might be issues, NTFS is by far the most problematic so I suggest you first try fat32 or exfat, both will work on Windows computers and Macs. NTFS might have some issues with mounting the update folder, so please use it as a last resort.\n\n\n# 4.1\n\nGeneral:\n \n* Emulationstation: While in a game list, pressing X/Y will move to a random game/open game options, holding X/Y will mark it as favorite/open search (thanks to @lethal-guitar)\n* Bump PPSSPPSDL to v1.11\n* Bump Duckstation to abb7631\n* Pico-8: Allow saving favorite carts, include binary in backup\n* Update Sonic 1 and 2 so that they work with multiple gamepads\n* Bump most emulators and cores to newest git hash (check commits for specifics)\n* Bump Crystal theme which now includes a new panel (boxart), 16:9, 4:3 and CRT versions\n* Enable bezels on OGS, not fully tested yet\n* Bump Genesis-plus-gx and Genesis-plus-gx-wide to support FM music\n* Use DinguxFileManager as default on all platforms\n* Use gptokeyb as a fake keyboard for OpenBOR\n* Bump Retroarch to 1.9.1\n* API keys for Emulationstation have been changed, please refer to the emuelec-emulationstation/package.mk\n\nAdditions: \n\n* Added Chocolate-Doom and lzdoom with support for mods\n* Added SuperTux and SuperTuxKart to ports\n* Added Imagemagick (mainly for screenshot manipulation from CLI)\n* Added logos to the ports (Thanks to Dim!)\n* Added vertical aspect ratio option to OGA/S\n* Added gptokeyb to enable video controls on all devices with SDL support! with configuration support\n* Replace jslisten with gptokeyb to kill emulators\n* Added easyrpg to es_systems.cfg\n* Added Ecwolf with support for mods\n* Added supermariowar to ports, on the first run a fake keyboard will be used, make sure you set your gamepad and restart the game, if you need to run the fake keyboard again delete /emuelec/configs/smw/nofakekeyb and run the game again.\n* Added Flycast 32bit as core option for Dreamcast/Atomiswave/Naomi\n* Added Amstrad GX4000\n\nFixes: \n\n* Removed unused scripts, and fixed many small issues with scripts\n* Fixed many script that were causing hangups or other issues\n* Fixed gamecontrollerdb.sh it will now replace the UUID from the one in the db, this fixes weird controllers that use the same UUID as others (but are not the same)\n* Fixed an issue with unicode characters not displaying correctly on the EEROMS partition (CN, JP, etc)\n* Fix SonicCD Gamepad for the OGS\n* Fix Pico-8 disappearing splore file\n* Fix Scummvm game scan\n* Fix brightness not restored after reboot on OGA/S, thanks to @miwasp, fixes issue #470\n* Fixed issue with OGA/S OC not beeing applied correctly (this does not solve the random lockups on some devices)\n* Fix backup/restore issues\n* Fixed Retroach video recording\n* Fixed Eduke not running when having lots or ROMS in ES, by enabling swap (much testing needed!)\n* Fixed an issue with ES not playing .ogg music files in BGM\n* Fixed some errors messages were not wrapped and could not be read\n* Fixed OpenBor would not work after playing one game\n* Fixed DevilutionX character voices were wrong\n* Fixed DevilutionX mouse emulation was not working\n* ARM32 interpreter is now symlinked so no need for patchelf\n* Fix some TimeZones not displaying/working correctly (#546)\n* Fix hand-held bezels for 720p and 1080p\n\n\nThis version includes a big change on how binaries and scripts are stored, basically to deal with the issue of people not reading how to properly update \nand since I am getting tired of answering the same question over and over again, lets just move all binaries and scripts to RO /usr/bin, this will force \nupdate all of these and make updating much simpler.\n\nIf you use custom scripts /emuelec/bin and /emuelec/lib are still in the path so you will have to deal with it accordingly. \n\nAll configurations regarding emuelec will still be handled in /emuelec/config\n\nNote that this is probably not final, I still need to do a lot of testing, but keep that in mind if you want to update\n\n# 4.0    \n\nYes its finally here :) \n\nThe change log is HUGE so I am just going to focus on the most important parts (and the ones I can remember):\n\n* EmuELEC is no longer 32bit, it has now moved to AARCH64 (With some small parts still being 32 bit, like PCSX_Rearmed and Parallel64)\n* A brand new default theme made specifically for EmuELEC! Crystal! https://github.com/dm2912/Crystal\n* For easy access with any computer a third partition (EEROMS) will now be created on the first boot as FAT32, which is where all the ROMS will be stored.\n* Update folder is now located in EEROMS/.update in case you want to copy the update files directly, its also still accesible from the samba share\n* S912 (Including most Pandora) will no longer be supported, if you have one of those 3.9 is the latest version \n* Most save states are now in one folder (/storage/roms/savestates/[system] or EEROMS/savestates/[system]) I might have missed a few of the standalone emulators, but if you find any issues with that, please let me know, please make sure you move them there if you plan to keep using your old ones\n* Introduced ee_defaults.txt https://github.com/EmuELEC/EmuELEC/commit/9358efe01af501326526ce479ca6c5f55932e34a\n* Switch all error messages and scripts to use [TvTextViewer](https://github.com/lethal-guitar/TvTextViewer), also improve how these are displayed\n* New emulator/cores added Dosbox-pure, Solarus, Tic-80, Mesen, DosBox-Staging, DosBox-X and others\n* Dolphin has been added to the Amlogic-ng devices, but it is only really playable on S922x devices and gamepad stills needs to be set manually. Will fix this on v4.1\n* Added many ports including Duke Nukem 3D, Sonic 1, 2 and CD, RigelEngine, Bermuda Syndrome, Hydra Castle Labyrinth and others. Keep in mind most of the ports still need the DATA as it is not included! (check `Missing Bios` in the `Game Options`)\n* Better Bluetooth manager and connection in general also Keep Bluetooth pairings even if doing a full reset\n* Most emulators and cores are updated\n* Support for the Odroid-Go Super\n\nAs well as many, many other issues, bug fixes and additions I probably forgot! but you can check the (mostly) full change log here: \nhttps://github.com/EmuELEC/EmuELEC/compare/v3.9...EmuELEC:master\n\n# Very important note!\nThis version is NOT backwards compatible, meaning this release cannot be used to upgrade older versions! I know lots of people hate reinstalling, but due to the nature of the changes this is a MUST but now with the third partition you can copy the ROMS directly, faster and safer! no messing around with software that corrupts the data! be warned that if you do not do a clean install, you will have issues! \n\nThis version also includes a new auto update script that will hopefully make it easier than ever to update when new versions come out.\n\nIf you are new to EmuELEC please READ the WiKi at https://github.com/EmuELEC/EmuELEC/wiki BEFORE asking for any help. You can also join us in discord! https://discord.gg/cbgtJTu If you want to support EmuELEC please click on the \"Support\" button on top to find out how! \n\nWe have tried our best to test each and every aspect of EmuELEC but keep in mind we cannot test each and every game and setting, so I am sure you will find new and improved bugs and issues! so don't hesitate to jump into discord to let us know, or open an issue right here in GitHub (but please follow the template!) \n\n# 3.9    \n\nThis is the last 32bit release of EmuELEC, this also concludes support for the S912 devices (including Pandora boxes) as there is no 64bit drivers for this SOC. \n\nStarting from v4.0 EmuELEC will only be 64bits, this unfortunately means that you cannot upgrade from 3.9 to v4.0, so a clean install must be made, but you can do a backup of your roms and settings and copy them over to v4.0 if you like but this has to be done manually. \n\nThis release is mostly bug fixes:\n\n* Emuelec-Emulationstation: Bump to dbb576d\n* Retroarch: Fix crash with CHD + Cheevos\n* Odroid N2+ :Fix reboot after danger zone reset\n* Add Pico-8 Support\n* Rename n64.rmp to Mupen64Plus-Next.rmp and Fix remapping loading\n* Disable digital to analog on ParaLLEl N64 too\n* es-theme-EmuELEC-carbon: Bump to ca062ff\n* Fix DOOM location (#308)\n* Fix killall triggering crash detection (#303) \n* fix ee_backup \n* OdroidGoAdvance: FIX RGA scaling not covering the whole screen\n* Other small changes and fixes. \n\n\n# 3.8   \n\nDue to some confusion I removed the v11 from the OdroidGoAdvance name, since the image works on both v1.0 and v1.1, this should not affect functionality at all. \n\nAs a reminder, starting with v4 there will be no more 32bit releases, only ARM64 and upgrading from one to the other is not possible. \n\n## BEFORE OPENING AN ISSUE OR ASKING FOR HELP I BEG YOU TO CHECK THE WIKI! IT IS VERY FRUSTRATING TO RESPOND TO THE SAME QUESTIONS OVER AND OVER AGAIN WHEN THE ANSWER IS ALREADY ON THE WIKI! https://github.com/EmuELEC/EmuELEC/wiki\n\n## Please remember, EmuELEC is COMPLETELY FREE! it is not to be sold or included in ANY commercial products as a whole, if you have paid for EmuELEC or an image, DEMAND YOUR MONEY BACK! For more license info read https://github.com/EmuELEC/EmuELEC/blob/master/README.md\n\n* Bios check will now be performed AFTER and ONLY if a game crashes\n* OdroidGoAdvance: New feature! Added vertical mode for some cores (mostly arcade cores)\n* New Emulationstation option: Random video screen saver, place videos in /storage/roms/mplayer\n* Fix: ports showed error even on gracious exit \n* SDLPoP: Fix settings not being  saved\n* Mupen64plus-nx: Use Gles3 for OdroidGoAdvance fixes #260\n* emuelec-utils: Unify some small scripts for easy management\n* Added a timezone selection to make it easier to set your current time\n* S922x: Disabled small cores for a little performance boost\n* Remove some unused cores for space\n---beetle-lynx\n---crocods\n---dosbox-x\n---easyrpg\n---xow\n---libretro-bash-launcher\nThey can be brought back if demand exists\n* re-add ssv6xxx-aml: fixes #261 (hopefully) \n* Add DOSBox scan script (#292) - Easier way to add DOSBox games (untested)\n* Use GCC optim -O3 system-wide - Squeeze a bit more performance on some cases \n* OdroidGoAdvance: use internal terminal to display error  - Uses proper rotation and error message will properly close!\n* S922x/A311D: Use a service to handle small cores - Fixes the reboot issue\n* Add pcenginecd to bios check\n* Add .mdf for Sega Saturn (#288)\n* Odroid Go Advance: Enable rs97-commander-sdl2\n* VLC: bump to 3.0.11.1\n* Fix MSX2 platform for scrapping\n* Retroarch: Added some default core settings\n* Amlogic-ng: Goodbye libhybris! - Use proper GLES headers, this fixes some gfx errors on some cores, like Mupen64\n* Amiberry: Fix WHDload not working\n* Bump Retroarch\n* Bump Emulationstation\n* Many other small under the hood fixes\n\n\n# 3.7   \n\n# Important notes\n\nThis release has many new features some of them that will require a bit of setting up if you are upgrading. The biggest change  is that the getcores.sh file that was responsible for showing what emulator was used for what platform is no longer used, this means that emuelec.conf and emuoptions.conf from earlier versions will no longer will compatible! (well only the core/emulator part) so if you previously had set some games to run on certain emulators this needs to be redone, sorry about that but its for the better! \n\nIt is highly recommended to do a clean install and just transfer your /storage/roms folder again!\nIf you are doing this, also make sure your saves are transferred, since there was a bug on v3.6 that used `/storage/.config/retroarch/saves` instead of saving on the same path as the ROM.\n\n**WARNING:** This will REPLACE the es_systems.cfg file, if you manually changed this file those changes will need to be redone, sorry can't seem to find a better way yet.\n\n**WARNING 2:** If your saves are in /storage/.config/retroarch/save* (or any other place other than the /storage/roms folder) make a backup of them BEFORE you update! or they will be lost, RA should now save them on the same folder as the ROM (as it did before) but you need to replace the retroarch.cfg (you can just delete it from network share or ssh and reboot) or change the `savefiles_in_content_dir` and `savestates_in_content_dir` to true in the retroarch.cfg file\n\nIf you are updating, remember to run \"RESET EMUELEC SCRIPTS AND BINARIES TO DEFAULT\" from the EmuELEC meu > Danger Zone after the update is done, otherwise you will run into problems. \n\n# Project Support\nIf you wish to support EmuELEC you can use Patreon or Paypal, note that this is absolutely not required to enjoy EmuELEC but it helps a lot and it is greatly appreciated! \nhttps://patreon.com/emuelec\nhttps://paypal.me/shantigilbert \n\nAlso, we have started a new official EmuELEC Youtube channel aimed at showcasing EmuELEC running different systems on different boards/tv boxes, and why not maybe some tutorials or game-plays in the future!! please drop by and subscribe! \n\nhttps://www.youtube.com/emuelec\n\n## We have very little time to fully test everything but we have tried our best to test each feature, keep in mind there are so many variables it is possible that we missed some! So if you find any sort of problem please don't hesitate to open an Issue, check out the (very WIP) wiki https://github.com/EmuELEC/EmuELEC/wiki (which you can also help by adding or editing it!) or you can also join us in discord: https://discord.gg/cbgtJTu\n\n## BEFORE OPENING AN ISSUE OR ASKING FOR HELP I BEG YOU TO CHECK THE WIKI! IT IS VERY FRUSTRATING TO RESPOND TO THE SAME QUESTIONS OVER AND OVER AGAIN WHEN THE ANSWER IS ALREADY ON THE WIKI! https://github.com/EmuELEC/EmuELEC/wiki\n\n## Please remember, EmuELEC is COMPLETELY FREE! it is not to be sold or included in ANY commercial products as a whole, if you have paid for EmuELEC or an image, DEMAND YOUR MONEY BACK! For more license info read https://github.com/EmuELEC/EmuELEC/blob/master/README.md\n\nNow for the update notes!\n\n\n# Fixes and new features\n* Netplay lobby is now accessible directly from ES for the cores that support it\n* Add support for Odroid N2+ (to OC you need to edit config.ini in the first partition `max_freq_a73=2400` and `max_freq_a53=2016`, watch your temps)\n* Added (untested) support for LaFrite\n* Introduce ee_check_bios: This will check for missing bios before launching a game, and it will display a dialog box if any required bios are missing. Based on #218 by @TheLastProject The only one I did not add to this list is Cgenius as it seems it can be used for several games not just one, so having a requirement for all games seemed bad.\n* Add a Bluetooth on/off switch to ES, this will allow you to disable BT if you are not using it.\n* setsettings.sh: fix atari800 loading and gambatte colorization\n* es_systems.cfg: remove all groups\n* Add support to read profile.d from /storage/.config \n* SDL_GameControllerDB: Fix Oga v1.1 mapping\n* Emuelec-emulationstation: Change default settings\n* advmame: Another attempt at auto config joysticks that should work on the OGA (hopefully)\n* fbterm.sh: add \"error\" to display a dialog box with an error for 10 secs\n* emustation-config: make sure the BT agent is not running (this one is important)\n* Add sanity checks when launching Cave Story (#218)\n* missing-bios: add --filter\n* updatecheck.sh: Add forceupdate test\n* Added NEC PC-9800 to es_systems.cfg\n* Ports: Included hydracastlelabyrinth, OpenTyrian, HodeSDL, Bermuda but only OpenTyrian has a launch script, as soon as I test the others I will add the launch script\n* Added a missing core \"Quicknes\"\n* OdroidGoAdvance: Enable 3do and Saturn, I have no idea why people want to play these systems on the OGA, but by popular demand, here they are.\n* Fix/improve Bluetooth pairing\n* Bluetooth: Try to pair gamepads at boot, to make this work you need to set your game-pad in pairing mode when EmuELEC is booting\n* Initial Bluetooth management menu (#209) under setup scripts you will find a new menu driven Bluetooth pairing method, by coach1988, very useful if the regular method does not work for you. \n* YouTube search: Add default search word to ES. under the EmuELEC settings menu there is a new option to set the default word to search, in case you don't have a keyboard this can be used, not ideal, but it works.\n* Remove \"tiggerhappy\", was planing on using it but never got to, so it was just wasting space\n* ES can now show PDF manuals from games. \n* set_advmame_joy.sh: force button \"a\" as \"ui_select\" \n\n## bumps\n* Cyclone68000: bump to 94a9d9a\n* Libretro: Bump some cores\n* Retroarch: Bump to a308be6\n* Advancemame: Bump to ceabee9\n* Dosbox-x: bump to d13deeb\n* Amiberry: Bump to 0209dbf\n* PPSSPPSDL: Bump to 3403e28\n* ResidualVM: Bump to 626c557\n* ScummVMSA: Bump to 4d99e3a\n* StellaSA: Bump to 5f5ac95\n* OpenBOR: Bump to e761464\n* Mupen64plus-nx: Bump Amlogic-ng to be9b85a\n* HatariSA: Bump to 453e88b\n* Skyscraper: Bump to e39e882\n* youtube-dl: Bump to 2020.06.16.1\n* xow: bump to 9e86c52 \n* Parallel64: bump to 76193f8\n* emuelec-emulationstation: Bump to 5e9dc64\n\n\n\n# 3.6\n\t\n\t* Fixed AdvanceMame gamepad auto-configuration, a new option to enable/disable this has been set in the Main Menu - EmuELEC Settings.\n    * Removed steam controller support, I don't think anyone was using it and it was just eating resources, if many people ask for it I will enable it again.\n    * Added small youtube search engine (needs a keyboard) for now its included in the Setup menu script #14.\n    * Mplayer: Added support for .twi and .ytb files, if you include a file with a twitch or youtube address it will be played by mplayer (needs internet).\n    * Added Skip Song to ES, using the left thumb button (l3) you can skip the current song.\n    * Added a small (VERY BETA) way to view videos directly from ES, drop your .mp4, .mkv, mpg, .mov videos to /storage/roms/mplayer and they will appear in ES, it still needs theming, so they will show up withouth an image/icon.\n    * Fixed splash screen on 720p resolution or below.\n    * Enabled CEC support and Remote support for devices that support it.\n    * ES now has some new options to play with including hiding extensions per platform, so if you have .bin/.cue files you can hide one of them and now have no doubles, its available on the \"select\" menu from a gamelist, under \"view customisation\" (which has a typo, but thats besides the point).\n    * Flycast is now working again, plus added PSP to the no rewind list so it should work even with no rewind enabled globally (it didn't before). \n    * Most emulators have been updated to the latest git.\n\t* OdroidGoAdvance: Use upstream PPSSPPSDL instead of PPSSPPSDL-GO, there might be gamepad issues.\n\t* OdroidGoAdvance: Add support for V1.1 with extra buttons and WiFi module, buttons might have changed a bit, taking suggestions on how to best set them up!.\n\t* OdroidGoAdvance: Besides all the changes mentioned above a sleep mode added by @KiwiHop (many thanks!).\n\t* OdroidGoAdvance: Fixed a bug that would trigger a black screen on the OGA 10 min after waking up the device.\n\t* OdroidGoAdvance: Switched global HOTKEY to F5.\n\t* Synched with CoreELEC 9.2.3.\n\t* Small script cleanups, other bug fixes and few other tweaks I am forgetting probably.\t\n\t \n\tEmuELEC will now force copy es_systems.cfg because when changes were made upstream to es_systems.cfg the update did not copy the new file, this version fixes that.\n\tWARNING: This will REPLACE the es_systems.cfg file, if you manually changed this file those changes will need to be redone, sorry can't seem to find a better way yet.\n\n\n# 3.5\n\n* Fixed FPS on Emulationstation would drop after returning from a game (Amlogic-ng)\n* Add ee_alsa.always option emuelec.cong use to dissable pulseaudio, this might fix some issues when returning from a game, you will loose mixing sounds in ES\n* Moved splash screens to /storage/roms/splash and also load splash per platform\n* Backup will now backup more settings (like VVVVVVV,PPSSPP configs)\n* Remove avahi requirement for pulseaudio in hopes that it will fix a rare bug\n* Added many Wifi/Bt chips to Amlogic-ng project (Thanks to CE!)\n* Added images and descriptions (only in ENG) for the setup scripts!\n* Removed ev-tools as they were not being used, use regular evtest\n* Updated emulators and cores to current GIT versions.\n* Danger zone \"reset system to default config\" will now leave ROMS folders in place\n* Introduce maxperf option (enabled by default) useful for OdroidGoAdvance and S912\n* Removed core updater from retroarch to keep people from screwing up their installation\n* Probably other changes I forgot to mention\n\nNew device supported! OdroidGoAdvance\n\nThis is the first official release for the OGA, although there are still many know issues, bugs and changes needed I felt it is at a place where I could release\nthe first official version. \n\nNOTE: I still expect MANY issues with the OGA release, please bear with me while I keep investigating on known issues and try to fix them \n\n# 3.4\n\nThis is a bug fix release that also adds a few features\n\n* Added VVVVVV and 2048 to ports\n* Reworked how bezels are used, they should now go into /storage/roms/bezels\n* Fix Muppen64plus-nx on S905/S912\n* Fix rare bug where ES would hang after returning from retroarch\n* Reworked the \"Danger Zone\" options\n* Use ffplay for intro video and splashes, this also enables gif splashes to be used (not yet configurable, s912 still has a few problems)\n* Include extra WiFi drivers for Amlogic-ng \n* Bump Amiberry to 3.10\n* Fix NeoCD not working with CHD\n* Fix Scummvm libretro not loading games after scanning\n* Make HatariSA use the same bios path as libretro /storage/roms/bios/tos.img\n* Bumped a few libretro cores and emulators\n* Other small bugfixes\n\n\nPlease remember, EmuELEC is COMPLETELY FREE! it is not to be sold or included in ANY commercial products, if you have paid for EmuELEC or an image, DEMAND YOUR MONEY BACK!\n\n---------------------------\n# 3.3\n\nThis is just a small bug fix release that also adds S905x3 support\n\n* Added support for the S905x3 chip-sets, keep in mind many functions might still not work for your device (WiFi, Bluetooth, Ethernet, etc)\n* Added script to open a terminal window, needs a Keyboard but you can kill it with Hotkey+start\n* Added script to view last emuelec.log\n* Fixed issue with rom names with single quotes not saving advanced options\n* Fixed manual delay on show-splash script\n* Remove unnecessary extensions for Saturn\n* Sync base with CE\n* Bumped a few emulator/cores to latest git.\n\n---------------------------\n# 3.2\n\n* Added option to prioritize gamepads (for up tp 5 players) in Emulationstation \n* Added new script to copy ROMS from USB to internal storage\n* Added newest changes to ES by Fabrice Caruso and the Batocera team, with some minor menu changes\n* Added a new option to emuelec.conf \"global.retroarch.menu_driver\" to select the Retroarch menu driver from ozonoe (default), rgui and xmb\n* Added Fakelottes, scanline and sharp shaders\n* Added option to select RA menu driver in emuelec.conf\n* Added option to set a delay to wait for slow external drives in emuelec.conf\n* Added ports: Cannonball, Xrick (Rick Dangerous), Commander-Genius (Commander Keen), Doom, Doom2, Quake, Mr.Boom, REminiscence (FLASHBACK), Cave Story, Dinothawr. Thanks to KEgg\n  Roms for each port should go into the /storage/roms/ports/[game]\n* Added Steam Controller support (ONLY WITH DONGLE NO BT!)\n* Added Stella stand alone\n* Added PSPminis in Es menu\n* Added support for PNG and MP4 splash screens\n* Added a simple backup option to EmuELEC settings under danger zone\n* Removed sixais as it seems its not needed for PS3/PS4 gamepads\n* Reverted back to GIT e723594 for PPSSPPSDL and ppsspp_libretro as it seems it has better performance\n* Switch to es-theme-EmuELEC-carbon with changes made by drixplm which now inlclude all system logos supported in EmuELEC!\n* Switch back to Muppenplus64-next git version f77c16f for performance reasons (still not final change, maybe) \n* Separated configuration files to improve performance, emuoptions.conf now hold all the settings for games and platforms\n* Bumped most libretro cores and emulators to latest version available\n* Fixed a longstanding issue with advancemame and some games displaying only black screen!\n* Fixed a rare issue where the system would hang if you ran Retroarch directly then return to Emulationstation\n* Fixed many wrong and missing extensions in es_systems.cfg \n* Fixed Advmane not displaying correctly on 720p\n* Fixed lot of other minor bugs \n\n------------------\n\n# 3.1\n\nMostly bug fixes and emulator updates, but there is also a new feature that many have asked for, choosing emulators per game!\nChange emulator per system: On the main menu select \"GAME SETTINGS\" > \"ADVANCED\" > [Choose system] > \"EMULATOR\"\nChange emulator per game: Navigate to the game you want to choose emu for, press select on the gamepad (Game options menu) choose \"ADVANCED GAME OPTIONS\" > \"EMULATOR\"\n\n\n------------------\n\n# 3.0\n\nHuge update!\n\nNew look, new logo (by Prizco), and intro video (by ElF0rma) included! \n\nEmulationstation now has many new options coming from Batocera-emulationstation and adapted for EmuELEC\n\nNotable features include: \n\n* Game Settings: You can set some setting that are used on Retroarch directly on this menu, can be set (by priority) per game, per system or globally\n* Background music has been upgraded and it now shows the titles, music still goes into /storage/roms/BGM\n* Bluetooth controllers! Easy to pair Bluetooth controllers (still need a keybord or other gamepad first)\n* Wifi has been revamped, you can still use the old method (By script in setup) or use the on-screen-keyboard to connect to WiFi directly from ES!\n* ES Built-in scraper is now working, but Skyscrapper and Selph's scraper are still included\n* Themes and Bezels can now be downloaded directly from ES (in menu: system settings, updates)\n* Multi language support!\n* Many other new features and small changes!\n\n\nFixes: \n\nAll platforms:\n\n* OpenBOR: Removed gl4es, it now uses less resources to run\n* ResidualVM is now included, put roms in /storage/roms/residualvm, use the included \"Scan ResidualVM games\" script to populate the list (see note 1)\n* ScummVM now includeds a \"Scan ScummVM Games\" script to populate the list\n* Fixed Amiberry sound\n* Almost all emulators/cores updated to current versions\n* ComicBook theme has a bug that would play multiple videos at the same time so it has been replaced by es-theme-carbon (Fabrice Carusos's version)\n\n\nS905\n\n* Fixed Reicast sound issue \n\n\nMany more small bug fixes and changes, check the git history for those.\n\nNote 1: ResidualVM still has a small bug where the pointer in GUI will not show, so you might need a keyboard to run some games, after the game has started you can use the gamepad withouth an issue.\n\n\n\n# 2.7.1\n\nMostly small bugfixes\n\nAll platforms\n\n* Return to fbterm because fbpad did not work with a keyboard\n* Fix bezels not showing if first argument was \"LIBRETRO\"\n* Skyscraper fix launch script\n\nS922x/A311D/S905x2\n\n* Fix audio not working on emulators\n\n# 2.7\n\nAll platforms\n\n* Emulationstation - Sound Mix! BG music, video music and theme audio now all sound at the same time (if you want)\n* Switched fbterm for fbpad, much faster, lighter and looks better.\n* Add option in ES to switch video mode\n* Retroarch updated to 1.7.8\n* Add more controllers to advmame\n* Add Scummvm Standalone\n* Most libretro cores bumped to latest git available\n* A default bezel for retroarch cores is now included, disabled by default\n* Added an automatic re-pair for bluetooth gamepads (not tested)\n* Added Libretro Daphne (untested)\n* Bug fixes\n\nS922x/A311D/S905x2\n\n* Amiberry is now working\n\nS905/S912/PK7\n\n* Fix scaling after video mode selection\n\n-------------------------------\n\n# 2.6\n\nAll platforms\n\n* Update base to CoreELEC 9.2\n* Consolidate all log files to /emuelec/log the samba share \"logfiles\" now also point to this location\n* Removed less used cores and emulators to reduce space (see removed cores)\n* Fixed parallel-n64 \n* Updated PPSSPP\n* Updated Flycast, performance is much better even on s905\n* DosboxSDL is playable again\n* Advancemame will now auto-configure P1 according to the gamepad that is connected on js0 as long as it has been configured in Emulationstation\n* ES input configuration will automatically set the Keycombo to kill running emulators (HK + START) for the device in js0 (WIP may not work on all gamepads yet)\n* ES will prompt you to configure a new gamepad by pressing any button\n* ES sort emulator options and add SMS selection\n* ES add Hatari emulator choice\n* ES much needed system sort and cleanup\n* Add HATARISA\n* You can now use a global bezel for all platforms and games /storage/overlays/bezels/default.cfg\n* Updated retroarch to latest git\n* Most Libretro cores have been bumped to current versions\n* Minor bug fixes\n* Samba shares have been updated: added Bezels, Splash and pointed logfiles to /emuelec/logs.\n  Important please delete /storage/.config/samba.conf if you can't see the new shares \n\nS922x/S905x2/A311D\n\n* Add support for generic S922x (GT king)\n* Add support for Khadas VIM3\n* Preliminary support for S905X2 (very alpha, untested)\n* Added Yabasanshiro, 4DO, MESEN and MESEN-S\n* ES add Saturn (Yabasanshiro) to es_systems.cfg\n\n \nRemoved Cores:\ncannonball\nchailove\ndesmume\ndesmume-2015\ndinothawr\nhigan-sfc\nhigan-sfc-balanced\nlutro\nmame2003-midway\nmame2015\nmelonds\nmrboom\nmupen64plus (replaced by mupen64plus-next)\no2em\npocketcdg\nquicknes\nsnes9x2005\nsnes9x2010\nvirtualjaguar\nxrick\n\n-------------------------------\n\n# 2.5.4\n\nAll platforms\n\n* Fix for manually set bezels \n* Fix for ROM folders not being created at first boot\n* Amiberry now uses the same gamepad config as Retroarch\n* Emulationstation now waits for mounts to be ready before it starts so fix the issue where external drives would not show any roms \n* Completely replace Final Burn Alpha with FinalBurn Neo (rom folder is now fbneo)\n* Emulationstation: Add NES and SNES hacks to es_systems.cfg\n* Emulationstation: Change SuperGrafx core\n* Emulationstation: Change Openbor theme from Ports to Openbor\n* Emulationstation: Fix favorites not being saved after restart \n* Remove Virtual Jaguar from supported platforms (as it was unplayable)\n* Updated Mupen64plus-nx libretro core, it is now faster and uses GLideN64\n* Update Parallel 64 \n* Neocd Libretro updated to newest git, now supports CHD\n* Add many missing platform and collections to es_systems.cfg\n* Minor changes and fixes\n* Bettle-dc is now Flycast\n* New libretro core MBA Mini Plus (included but not yet enabled)\n* Retroarch: let user set if they want shutdown and reboot from RA, useful if you want to use RA as the default launcher.\n* Include extra cores for testing (dinothawr, higan-sfc, higan-sfc-balanced, lutro, mame2003-midway, mrboom, easyrpg, mesen, desmume, desmume-2015, pocketcdg, melonds, virtualjaguar)\n\nOdroid N2\n\n* OC by default freq_a73 \"1908\" freq_a53 \"1992\" governor \"performance\" \n\nAddon:\n\n* Fixes for Odroid N2\n* Fix for no audio\n* Use Kodi option to set audio-output (HDMI or front)\n\n-------------------------------\n\n# 2.5.3\n\nAll platforms\n\n* New feature \"Force Update\" that will hopefully solve the update process, updating only the files that need to be updated and leaving the rest intact. (More info on the Wiki)\n* New feature custom_start.sh if you need anything to run at boot place it in this file /storage/.config/custom_start.sh\n* Enable/Disable custom bezels and splash screens from the ES menu.\n* Fix crash when disconnecting gamepad\n* Fix DS4/DS3 motion controls causing problems with ES\n* Fixed bug with some handheld platforms not showing bezels\n* Fixed bug where bezels/splash would show a different game\n* Added getcores_override.sh in case you add a new core and need it to appear as an option in ES.\n* To avoid confusion libretro cores now have Libretro_ in the name when selecting an emulator in Emulationstation\n* Change path to external fonts for ES\n* Bezels will now make a backup copy of retroarch.cfg from when you enabled them, when they are disabled again that backup copy is restored, so make sure you change all of your settings before enabling bezels\n* Replace Libretro Fbalpha with FbalphaFB\n* Added PCengineCD, Saturn, Naomi, Atomiswave and MSX2 to es_systems.cfg\n* Bumped several Libretro cores, PPSSPPSDL, REICASTSA, Retroarch, etc. to the newest version. \n\n-------------------------------\n\n# 2.5.2\n\nAll platforms\n\n* Fix scripts not displaying correctly\n* Fix PPSSPP render error\n* Added custom_scripts directory, any .sh script that is put in here will automatically appear in \"Retropie\" menu in ES\n\nS912\n\n* Disabled splash screen after quitting a game, it was causing rendering/resolution issues\n\n-------------------------------\n\n# 2.5.1\n\nAll platforms\n* Fixed DOSBOX Rom path\n* Fix for ES crashing when no es_settings.cfg was found\n* Fixed a bug that prevented the mounting of USB roms if there were multiple \"emuelecrom\" files\n* Improved logging, use emueleclogs.sh to create a support log file.\n* Improved reicast.sh gamepad search\n* Move ES resources folder to /storage/.emulationstation/resources for easy editing\n* Removed pocketcdg and melonds\n* New platform: Neo-Geo CD. ROMS should go into /storage/roms/neocd and bios into /storage/roms/bios\n* Retroarch has been upgraded to 1.7.7\n* Updated some Libretro Cores\n* Bumped PPSSPPSDL, Skyscraper\n* Bezels & Splash screens are still WIP but they should work if you use your own.\n\nOdroid N2\n* Fix Odroid N2 framebuffer issues with scripts, retroarch and some emus.\n\nS912\n* Fixed Reicast in S912/Pk7\n* Fixed Retropie scripts for S912/Pk7\n\n-------------------------------\n\n# 2.5 \n\nInitial EmuELEC release\n\nSx05RE is now EmuELEC, a pure emulation build that does not include Kodi or anything else related to Kodi in order to free resources and space.\nThe main goal of EmuELEC is to be the best and easiest wat to emulate retro games on Amlogic hardware.\n\nHowever if you still like to have Kodi on the same installation, you can also use the Kodi Add-on version. But keep in mind it will have less features than EmuELEC\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "### Questions about LibreELEC?\n\nTo get your questions answered, please ask in the LibreELEC [Forum], on IRC: \n\\#libreelec on Libera.Chat. \n\nDo not open an issue.\n\n### Issue Reports\n\n**BEFORE you report a bug make sure you got the latest testing version of \nLibreELEC. Your bug might be already fixed.**\n\nIf you are at all unsure whether it's a bug in LibreELEC or a problem with \nsomething else, post in the LibreELEC [Forum] instead. If it turns out that it is\na bug, an issue can always be opened later.\n\nIf you are sure that it's a bug in LibreELEC and you have not found a [similar issue], open a new [issue]\nand try to answer the following questions:\n- What did you do?\n- What did you expect to happen?\n- What happened instead?\n\n**It is also importent to provide logs for debugging.\nA zip file can be found in the [logfiles] samba share, this will contain all the logs needed.**\n\nMake sure to specify which version of LibreELEC you are using.\n- LibreELEC version\n- LibreELEC build\n- LibreELEC arch\n\nPlease don't paste log messages in the issue reports or issue comments - use \n[sprunge.us](http://sprunge.us) instead.\n\nFeature requests are great, but they usually end up lying around the issue\ntracker indefinitely. Sending a pull request is a much better way of getting a\nparticular feature into LibreELEC.\n\nPlease dont ask us to add 3rdparty drivers unless you are the maintainer/developer of the driver,\nwe have no manpower to support a non-mainlined kernel driver for your hardware.\nHowever, LibreELEC comes with minimal set of kernel drivers enabled, if you are sure that your hardware\nis supported in mainline kernel, feel free to send us a Pull Request to enable it in our\nkernel defconfigs. We are always happy to support known-working hardware.\n\n### Reporting build failures\n\nAs buildsystem / core packages (toolchain) / random libraries change from time to time, it is required\nthat you always do a clean build (make clean) before reporting build failures. Also make sure that you\nhave a clean, unmodified git clone, we can't fix bugs caused by you failed to merge / rebase on\nyour own fork.\n\n### Pull Requests\n\n- **Create topic branches**. Don't ask us to pull from your master branch.\n\n- **One pull request per feature**. If you want to do more than one thing, send\n  multiple pull requests.\n\n- **Send coherent history**. Make sure each individual commit in your pull\n  request is meaningful. If you had to make multiple intermediate commits while\n  developing, please squash them before sending them to us.\n\nPlease follow this process; it's the best way to get your work included in the project:\n\n- [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork,\n   and configure the remotes:\n\n```bash\n   # clone your fork of the repo into the current directory in terminal\n   git clone git@github.com:<your username>/LibreELEC.tv.git\n   # navigate to the newly cloned directory\n   cd LibreELEC.tv\n   # assign the original repo to a remote called \"upstream\"\n   git remote add upstream https://github.com/LibreELEC/LibreELEC.tv.git\n   ```\n\n- If you cloned a while ago, get the latest changes from upstream:\n\n   ```bash\n   # fetch upstream changes\n   git fetch upstream\n   # make sure you are on your 'master' branch\n   git checkout master\n   # merge upstream changes\n   git merge upstream/master\n   ```\n\n- Create a new topic branch to contain your feature, change, or fix:\n\n   ```bash\n   git checkout -b <topic-branch-name>\n   ```\n\n- Commit your changes in logical chunks. or your pull request is unlikely\n   be merged into the main project. Use git's\n   [interactive rebase](https://docs.github.com/en/github/getting-started-with-github/about-git-rebase) feature to tidy up your commits before making them public.\n\n- Push your topic branch up to your fork:\n\n   ```bash\n   git push origin <topic-branch-name>\n   ```\n\n- [Open a Pull Request](https://help.github.com/articles/using-pull-requests) with a\n    clear title and description.\n\n[Forum]: https://forum.libreelec.tv/\n[issue]: https://github.com/LibreELEC/LibreELEC.tv/issues\n[logfiles]: https://wiki.libreelec.tv/index.php?title=LibreELEC_FAQ#Support_Logs\n[similar issue]: https://github.com/LibreELEC/LibreELEC.tv/search?&ref=cmdform&type=Issues\n"
  },
  {
    "path": "Makefile",
    "content": "all: release\n\nsystem:\n\t./scripts/image\n\nrelease:\n\t./scripts/image release\n\nimage:\n\t./scripts/image mkimage\n\nnoobs:\n\t./scripts/image noobs\n\nclean:\n\t./scripts/makefile_helper --clean\n\ndistclean:\n\t./scripts/makefile_helper --distclean\n\nsrc-pkg:\n\ttar cvJf sources.tar.xz sources\n"
  },
  {
    "path": "README.md",
    "content": "# EmuELEC  \nRetro emulation for Amlogic devices.\nBased on  [CoreELEC](https://github.com/CoreELEC/CoreELEC) and [Lakka](https://github.com/libretro/Lakka-LibreELEC) with tidbits from [Batocera](https://github.com/batocera-linux/batocera.linux). I just combine them with [Batocera-Emulationstation](https://github.com/batocera-linux/batocera-emulationstation) and some standalone emulators ([Advancemame](https://github.com/amadvance/advancemame), [PPSSPP](https://github.com/hrydgard/ppsspp), [Reicast](https://github.com/reicast/reicast-emulator), [Amiberry](https://github.com/midwan/amiberry) and others). \n\n---\n[![GitHub Release](https://img.shields.io/github/release/EmuELEC/EmuELEC.svg)](https://github.com/EmuELEC/EmuELEC/releases/latest)\n[![GPL-2.0 Licensed](https://shields.io/badge/license-GPL2-blue)](https://github.com/EmuELEC/EmuELEC/blob/master/licenses/GPL2.txt)\n[![Discord](https://img.shields.io/badge/chat-on%20discord-7289da.svg?logo=discord)](https://discord.gg/jQWCFwTn5T)\n\n### ⚠️**IMPORTANT**⚠️\n#### EmuELEC is now aarch64 ONLY, compiling and using the ARM version after version 3.9 is no longer supported. Please have a look at the master_32bit branch if you want to build the 32-bit version.\n\n---\n## Development\n\n### Build prerequisites\n\nThese instructions are only for Debian/Ubuntu based systems.\n\n```\n$ apt install gcc make git unzip wget xz-utils libsdl2-dev libsdl2-mixer-dev libfreeimage-dev libfreetype6-dev libcurl4-openssl-dev rapidjson-dev libasound2-dev libgl1-mesa-dev build-essential libboost-all-dev cmake fonts-droid-fallback libvlc-dev libvlccore-dev vlc-bin texinfo premake4 golang libssl-dev curl patchelf xmlstarlet default-jre xsltproc libvpx-dev rdfind\n```\n\n### Building EmuELEC\nTo build EmuELEC locally do the following:\n\n```\n$ git clone https://github.com/EmuELEC/EmuELEC.git\n$ cd EmuELEC\n$ git checkout dev\n$ PROJECT=Amlogic-ce DEVICE=Amlogic-ng ARCH=aarch64 DISTRO=EmuELEC make image\n```\n\nFor the Odroid GO Advance/Super:\n```\n$ PROJECT=Rockchip DEVICE=OdroidGoAdvance ARCH=aarch64 DISTRO=EmuELEC make image\n```\n\nNote: In some cases you may also need to install the tzdata, xfonts-utils and/or lzop packages.\n```\n$ apt install tzdata xfonts-utils lzop\n```\n\n\n**Remember to use the proper DTB for your device!**\n\n### Submitting patches\nPlease create a pull request with the changes you made in the dev branch and make sure to include a brief description of what you changed and why you did it.\n\n## Get in touch\nIf you have a question, suggestions for new features, or need help configuring or installing EmuELEC, please visit [our forum](https://emuelec.org/). You may also want to visit our [wiki](https://github.com/EmuELEC/EmuELEC/wiki) or join our [Discord](https://discord.gg/jQWCFwTn5T).\n\n**EmuELEC DOES NOT INCLUDE KODI**\n\nPlease note, this is mainly a personal project, I can't guarantee it will work with your box. I've spent many hours tweaking many things and making sure everything works, but I can't test everything and some things may not work yet. Also, be aware of hardware limitations and don't expect everything to run at 60FPS (especially N64, PSP, and Reicast). I can't guarantee that changes will be incorporated to fit your specific needs, but I welcome pull requests, help testing other boxes, and fixing problems in general.  \nI'm working on this project in my spare time, I'm not making any money from it, so it will take me a while to test all the changes properly, but I'll do my best to help you fix any problems you might have on other boxes, in my spare time.\n\n## License\n\nEmuELEC is based on CoreELEC, which in turn is licensed under the GPLv2 (and GPLv2-or-later). All original files created by the EmuELEC team are licensed as GPLv2-or-later and marked as such.\n\nHowever, the distro contains many non-commercial emulators/libraries/cores/binaries and therefore **cannot be sold, bundled, offered, included in commercial products/applications or anything similar, including but not limited to Android devices, smart TVs, TV boxes, handheld devices, computers, SBCs or anything else that can run EmuELEC** with the included emulators/libraries/cores/binaries.\n\nAlso note the license section from the README from the CoreELEC team, which has been adapted for EmuELEC:\n\nAs EmuELEC includes code from many upstream projects it includes many copyright owners. EmuELEC makes NO claim of copyright on any upstream code. Patches to upstream code have the same license as the upstream project, unless specified otherwise. For a complete copyright list please checkout the source code to examine license headers. Unless expressly stated otherwise all code submitted to the EmuELEC project (in any form) is licensed under GPLv2-or-later. You are absolutely free to retain copyright. To retain copyright simply add a copyright header to each submitted code page. If you submit code that is not your own work it is your responsibility to place a header stating the copyright.\n\n### Branding\n\nAll EmuELEC related logos, videos, images and branding in general are the sole property of EmuELEC. They are all copyrighted by the EmuELEC team and may not be included in any commercial application without proper permission (yes, that includes EmuELEC bundled with ROMS for donations!).\n\nHowever, you have permission to include/modify them in your forks/projects as long as they are fully open source and freely available (i.e. not under a bunch of \"click on this sponsored ad to get the link!\" buttons) and do not violate any copyright laws, even if you receive donations for such a project (we are not against donations for honest people!), we just ask that you give us the appropriate credits and if possible a link to this repo.\n\nHappy retrogaming!\n"
  },
  {
    "path": "config/addon/dummy.xml",
    "content": ""
  },
  {
    "path": "config/addon/xbmc.broken.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"@PKG_ADDON_ID@\"\n       name=\"@ADDON_NAME@\"\n       version=\"@ADDON_VERSION@\"\n       provider-name=\"@PROVIDER_NAME@\">\n  <requires>\n    <import addon=\"xbmc.python\" version=\"3.0.0\"/>\n@REQUIRES@\n  </requires>\n  <extension point=\"xbmc.service\" library=\"default.py\">\n    <provides>@PKG_ADDON_PROVIDES@</provides>\n  </extension>\n  <extension point=\"xbmc.addon.metadata\">\n    <summary>@PKG_SHORTDESC@</summary>\n    <description>\n@PKG_LONGDESC@\n    </description>\n    <disclaimer>\n@PKG_DISCLAIMER@\n    </disclaimer>\n    <broken>\n@PKG_ADDON_BROKEN@\n    </broken>\n    <platform>all</platform>\n    <news>\n@PKG_ADDON_NEWS@\n    </news>\n    <assets>\n      <icon>resources/icon.png</icon>\n      <fanart>resources/fanart.png</fanart>\n@PKG_ADDON_SCREENSHOT@\n    </assets>\n  </extension>\n</addon>\n"
  },
  {
    "path": "config/addon/xbmc.python.module.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"@PKG_ADDON_ID@\"\n       name=\"@ADDON_NAME@\"\n       version=\"@ADDON_VERSION@\"\n       provider-name=\"@PROVIDER_NAME@\">\n  <requires>\n    <import addon=\"xbmc.python\" version=\"3.0.0\"/>\n@REQUIRES@\n  </requires>\n  <extension point=\"xbmc.python.script\" library=\"default.py\" />\n  <extension point=\"xbmc.python.module\" library=\"lib/\">\n  </extension>\n  <extension point=\"xbmc.addon.metadata\">\n    <summary>@PKG_SHORTDESC@</summary>\n    <description>\n@PKG_LONGDESC@\n    </description>\n    <disclaimer>\n@PKG_DISCLAIMER@\n    </disclaimer>\n    <platform>all</platform>\n    <news>\n@PKG_ADDON_NEWS@\n    </news>\n    <assets>\n      <icon>resources/icon.png</icon>\n      <fanart>resources/fanart.png</fanart>\n@PKG_ADDON_SCREENSHOT@\n    </assets>\n  </extension>\n</addon>\n"
  },
  {
    "path": "config/addon/xbmc.python.script.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"@PKG_ADDON_ID@\"\n       name=\"@ADDON_NAME@\"\n       version=\"@ADDON_VERSION@\"\n       provider-name=\"@PROVIDER_NAME@\">\n  <requires>\n    <import addon=\"xbmc.python\" version=\"3.0.0\"/>\n@REQUIRES@\n  </requires>\n  <extension point=\"xbmc.python.script\" library=\"default.py\">\n    <provides>@PKG_ADDON_PROVIDES@</provides>\n  </extension>\n  <extension point=\"xbmc.addon.metadata\">\n    <summary>@PKG_SHORTDESC@</summary>\n    <description>\n@PKG_LONGDESC@\n    </description>\n    <disclaimer>\n@PKG_DISCLAIMER@\n    </disclaimer>\n    <platform>all</platform>\n    <news>\n@PKG_ADDON_NEWS@\n    </news>\n    <assets>\n      <icon>resources/icon.png</icon>\n      <fanart>resources/fanart.png</fanart>\n@PKG_ADDON_SCREENSHOT@\n    </assets>\n  </extension>\n</addon>\n"
  },
  {
    "path": "config/addon/xbmc.service.library.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"@PKG_ADDON_ID@\"\n       name=\"@ADDON_NAME@\"\n       version=\"@ADDON_VERSION@\"\n       provider-name=\"@PROVIDER_NAME@\">\n  <requires>\n    <import addon=\"xbmc.python\" version=\"3.0.0\"/>\n@REQUIRES@\n  </requires>\n  <extension point=\"xbmc.service\" library=\"default.py\">\n    <provides>@PKG_ADDON_PROVIDES@</provides>\n  </extension>\n  <extension point=\"xbmc.python.library\" library=\"addon.py\">\n    <provides></provides>\n  </extension>\n  <extension point=\"xbmc.addon.metadata\">\n    <summary>@PKG_SHORTDESC@</summary>\n    <description>\n@PKG_LONGDESC@\n    </description>\n    <disclaimer>\n@PKG_DISCLAIMER@\n    </disclaimer>\n    <platform>all</platform>\n    <news>\n@PKG_ADDON_NEWS@\n    </news>\n    <assets>\n      <icon>resources/icon.png</icon>\n      <fanart>resources/fanart.png</fanart>\n@PKG_ADDON_SCREENSHOT@\n    </assets>\n  </extension>\n</addon>\n"
  },
  {
    "path": "config/addon/xbmc.service.pluginsource.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"@PKG_ADDON_ID@\"\n       name=\"@ADDON_NAME@\"\n       version=\"@ADDON_VERSION@\"\n       provider-name=\"@PROVIDER_NAME@\">\n  <requires>\n    <import addon=\"xbmc.python\" version=\"3.0.0\"/>\n@REQUIRES@\n  </requires>\n  <extension point=\"xbmc.python.pluginsource\" library=\"addon.py\">\n    <provides>@PKG_ADDON_PROVIDES@</provides>\n  </extension>\n  <extension point=\"xbmc.service\">\n  </extension>\n  <extension point=\"xbmc.addon.metadata\">\n    <summary>@PKG_SHORTDESC@</summary>\n    <description>\n@PKG_LONGDESC@\n    </description>\n    <disclaimer>\n@PKG_DISCLAIMER@\n    </disclaimer>\n    <platform>all</platform>\n    <news>\n@PKG_ADDON_NEWS@\n    </news>\n    <assets>\n      <icon>resources/icon.png</icon>\n      <fanart>resources/fanart.png</fanart>\n@PKG_ADDON_SCREENSHOT@\n    </assets>\n  </extension>\n</addon>\n"
  },
  {
    "path": "config/addon/xbmc.service.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"@PKG_ADDON_ID@\"\n       name=\"@ADDON_NAME@\"\n       version=\"@ADDON_VERSION@\"\n       provider-name=\"@PROVIDER_NAME@\">\n  <requires>\n    <import addon=\"xbmc.python\" version=\"3.0.0\"/>\n@REQUIRES@\n  </requires>\n  <extension point=\"xbmc.service\" library=\"default.py\">\n    <provides>@PKG_ADDON_PROVIDES@</provides>\n  </extension>\n  <extension point=\"xbmc.addon.metadata\">\n    <summary>@PKG_SHORTDESC@</summary>\n    <description>\n@PKG_LONGDESC@\n    </description>\n    <disclaimer>\n@PKG_DISCLAIMER@\n    </disclaimer>\n    <platform>all</platform>\n    <news>\n@PKG_ADDON_NEWS@\n    </news>\n    <assets>\n      <icon>resources/icon.png</icon>\n      <fanart>resources/fanart.png</fanart>\n@PKG_ADDON_SCREENSHOT@\n    </assets>\n  </extension>\n</addon>\n"
  },
  {
    "path": "config/arch.aarch64",
    "content": "# determines TARGET_CPU, if not forced by user\n  if [ -z \"$TARGET_CPU\" ]; then\n    TARGET_CPU=cortex-a53\n  fi\n\n  # 64bit userland and neon required by armv8\n  if [ -z \"${TARGET_FEATURES}\" ]; then\n    TARGET_FEATURES=\"64bit neon\"\n  else\n    TARGET_FEATURES+=\" 64bit neon\"\n  fi\n\n# TARGET_CPU:\n# generic cortex-a35 cortex-a53 cortex-a55 cortex-a57 cortex-a72 cortex-a76\n# exynos-m1 qdf24xx thunderx xgene1 cortex-a57.cortex-a53\n# cortex-a72.cortex-a53\n\n# determine architecture's family\n  case $TARGET_CPU in\n    generic|cortex-a35|cortex-a53|cortex-a57|cortex-a72|exynos-m1|qdf24xx|thunderx|xgene1|cortex-a57.cortex-a53|cortex-a72.cortex-a53|cortex-a73.cortex-a53)\n      TARGET_SUBARCH=aarch64\n      TARGET_VARIANT=armv8-a\n      TARGET_EXTRA_FLAGS=\"-mcpu=${TARGET_CPU}${TARGET_CPU_FLAGS}\"\n      ;;\n    cortex-a76)\n      TARGET_SUBARCH=aarch64\n      TARGET_VARIANT=armv8.2-a\n      ;;\n  cortex-a55)\n      TARGET_SUBARCH=aarch64\n      TARGET_VARIANT=armv8.2-a\n      TARGET_ABI=eabi\n      TARGET_EXTRA_FLAGS=\"-mcpu=${TARGET_CPU}${TARGET_CPU_FLAGS}\"\n      TARGET_FEATURES+=\" neon\"\n      ;;\n  esac\n\n  TARGET_GCC_ARCH=${TARGET_SUBARCH/-}\n  TARGET_KERNEL_ARCH=arm64\n\n# setup ARCH specific *FLAGS\n  TARGET_CFLAGS=\"-march=${TARGET_VARIANT}${TARGET_CPU_FLAGS} -mabi=lp64 -Wno-psabi -mtune=$TARGET_CPU\"\n# Disable runtime checking support of ARMv8.0's optional LSE feature. Breaks gdb and mesa compile.\n  TARGET_CFLAGS=\"${TARGET_CFLAGS} -mno-outline-atomics\"\n  TARGET_LDFLAGS=\"\"\n  TARGET_ARCH_GCC_OPTS=\"--with-abi=lp64 --with-arch=$TARGET_VARIANT\"\n"
  },
  {
    "path": "config/arch.arm",
    "content": "# determines TARGET_CPU, if not forced by user\n  if [ -z \"$TARGET_CPU\" ]; then\n    TARGET_CPU=cortex-a8\n  fi\n\n  # 32bit userland\n  if [ -z \"${TARGET_FEATURES}\" ]; then\n    TARGET_FEATURES=\"32bit\"\n  else\n    TARGET_FEATURES+=\" 32bit\"\n  fi\n\n# TARGET_CPU:\n# arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d\n# arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c\n# arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t\n# arm720t arm740t strongarm strongarm110 strongarm1100\n# strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t\n# arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi\n# arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e\n# arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s\n# arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4\n# cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312.\n\n# TARGET_FPU:\n# This specifies what floating point hardware (or hardware emulation) is\n# available on the target. Permissible names are:\n# fpa fpe2 fpe3 maverick vfp vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16\n# vfpv3xd vfpv3xd-fp16 neon neon-fp16 vfpv4 vfpv4-d16 fpv4-sp-d16\n# neon-vfpv4.\n\n# determine architecture's family\n  case $TARGET_CPU in\n    arm1176jzf-s)\n      TARGET_SUBARCH=armv6zk\n      TARGET_ABI=eabi\n      TARGET_FPU_FLAGS=\"-mfloat-abi=$TARGET_FLOAT -mfpu=$TARGET_FPU\"\n      ;;\n    cortex-a7|cortex-a15|cortex-a17|cortex-a15.cortex-a7|cortex-a17.cortex-a7)\n      TARGET_SUBARCH=armv7ve\n      TARGET_ABI=eabi\n      TARGET_FPU_FLAGS=\"-mfloat-abi=$TARGET_FLOAT -mfpu=$TARGET_FPU\"\n      TARGET_FEATURES+=\" neon\"\n      ;;\n    cortex-a5|cortex-a8|cortex-a9)\n      TARGET_SUBARCH=armv7-a\n      TARGET_ABI=eabi\n      TARGET_FPU_FLAGS=\"-mfloat-abi=$TARGET_FLOAT -mfpu=$TARGET_FPU\"\n      TARGET_FEATURES+=\" neon\"\n      ;;\n    cortex-a55|cortex-a53|cortex-a35|cortex-a72.cortex-a53)\n      TARGET_SUBARCH=armv8-a\n      TARGET_ABI=eabi\n      TARGET_FPU_FLAGS=\"-mfloat-abi=$TARGET_FLOAT -mfpu=$TARGET_FPU\"\n      TARGET_FEATURES+=\" neon\"\n      ;;\n  esac\n\n  if [ \"${TARGET_FLOAT}\" = \"hard\" ]; then\n    TARGET_ABI+=\"hf\"\n  fi\n\n  TARGET_VARIANT=\"${TARGET_SUBARCH}${TARGET_CPU_FLAGS}\"\n  TARGET_GCC_ARCH=${TARGET_SUBARCH/-}\n  TARGET_KERNEL_ARCH=${TARGET_KERNEL_ARCH:-arm}\n\n  if [ \"${TARGET_KERNEL_ARCH}\" = \"arm64\" ]; then\n    TARGET_KERNEL_PATCH_ARCH=\"aarch64\"\n  fi\n\n# setup ARCH specific *FLAGS\n  TARGET_CFLAGS=\"-march=$TARGET_VARIANT -mtune=$TARGET_CPU -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated\"\n  [ -n \"$TARGET_FPU\" ] && TARGET_CFLAGS=\"$TARGET_CFLAGS $TARGET_FPU_FLAGS\"\n  TARGET_LDFLAGS=\"\"\n  TARGET_ARCH_GCC_OPTS=\"--with-abi=aapcs-linux --with-arch=$TARGET_SUBARCH --with-float=$TARGET_FLOAT --with-fpu=$TARGET_FPU\"\n"
  },
  {
    "path": "config/arch.x86_64",
    "content": "# determines TARGET_CPU, if not forced by user\n  if [ -z \"${TARGET_CPU}\" ]; then\n    TARGET_CPU=\"x86-64\"\n  fi\n\n# determine architecture's family\n  TARGET_SUBARCH=\"x86_64\"\n\n  TARGET_GCC_ARCH=\"${TARGET_SUBARCH/-/}\"\n  TARGET_KERNEL_ARCH=\"x86\"\n\n# setup ARCH specific *FLAGS\n  TARGET_CFLAGS=\"-march=${TARGET_CPU}\"\n  TARGET_LDFLAGS=\"\"\n\n# build with microarchitecture feature support defined by the TARGET_CPU value\n# see https://gitlab.com/x86-psABIs/x86-64-ABI/-/wikis/home for further details\n  TARGET_FEATURES=\"64bit cmov cx8 fpu fxsr mmx osfxsr sce sse sse2\"\n  TARGET_FEATURES_X86_64_V2=\"cmpxchg16b lahf-sahf popcnt sse3 sse4_1 sse4_2 ssse3\"\n  TARGET_FEATURES_X86_64_V3=\"avx avx2 bmi1 bmi2 f16c fma lzcnt movbe osxsave\"\n  if [ \"${TARGET_CPU}\" = \"x86-64\" ]; then\n    TARGET_FEATURES+=\" no_sahf\"\n  elif [ \"${TARGET_CPU}\" = \"x86-64-v2\" ]; then\n    TARGET_FEATURES+=\" ${TARGET_FEATURES_X86_64_V2}\"\n  elif [ \"${TARGET_CPU}\" = \"x86-64-v3\" ]; then\n    TARGET_FEATURES+=\" ${TARGET_FEATURES_X86_64_V2} ${TARGET_FEATURES_X86_64_V3}\"\n  else\n    TARGET_FEATURES+=\" UNKNOWN_ADDITIONAL_CPU_SPECIFIC_FEATURES\"\n  fi\n  TARGET_FEATURES=\"$(echo ${TARGET_FEATURES} | xargs -n1 | sort -u | xargs)\"\n"
  },
  {
    "path": "config/docker/changelog.txt",
    "content": "100\n- Initial addon\n"
  },
  {
    "path": "config/docker/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"@NAME@\"\nPKG_VERSION=\"@VERSION@\" # Update bin/docker.@NAME@ accordingly\nPKG_REV=\"100\"\nPKG_ARCH=\"@ARCH@\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"docker\"\nPKG_SITE=\"\"\nPKG_SHORTDESC=\"\"\nPKG_LONGDESC=\"\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\" (@IMAGE@:$PKG_VERSION)\"\nPKG_ADDON_PROJECTS=\"@PROJECTS@\"\nPKG_ADDON_REQUIRES=\"service.system.docker:0.0.0\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nmake_target() {\n  : #\n}\n\nmakeinstall_target() {\n  : #\n}\n\naddon() {\n  : #\n}\n"
  },
  {
    "path": "config/docker/source/bin/docker",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nname=\"$(basename $0)\"\n. /etc/profile\noe_setup_addon \"$name\"\n\ndocker rm \"$name\" 2>/dev/null\ndocker run --name=\"$name\" \\\n"
  },
  {
    "path": "config/docker/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\n\nclass Monitor(xbmc.Monitor):\n\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == '__main__':\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "config/docker/source/resources/language/English/strings.po",
    "content": "msgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Note: Kodi remote sources can not be used as Docker volume host sources\"\nmsgstr \"\"\n"
  },
  {
    "path": "config/docker/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n   <category   label=\"30000\">\n      <setting label=\"30001\" type=\"lsep\" />\n@SETTINGS@   </category>\n</settings>\n"
  },
  {
    "path": "config/docker/source/system.d/docker.service",
    "content": "[Unit]\nDescription=%p container\nRequires=service.system.docker.service\nAfter=service.system.docker.service\n\n[Service]\nRestart=always\nRestartSec=10s\nTimeoutStartSec=0\nExecStart=/bin/sh /storage/.kodi/addons/%p/bin/%p\nExecStop=/storage/.kodi/addons/service.system.docker/bin/docker kill %p\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "config/functions",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n### FUNCTION HELPERS ###\n# die (message, code) abort with optional message and code\ndie() {\n  if [ -n \"$1\" ]; then\n    echo -e \"$1\" >&2\n  fi\n  exit \"${2:-1}\"\n}\n\nonexitcleanup() {\n  [ $? -eq 0 ] && return\n\n  local _BASH_COMMAND=\"${BASH_COMMAND}\"\n \n  if [ -n \"${PKG_CURRENT_CALL}\" ]; then\n    print_color CLR_ERROR \"FAILURE: $* during ${PKG_CURRENT_CALL} (${PKG_CURRENT_CALL_TYPE})\"\n    echo\n  fi\n\n  if [ -n \"${_BASH_COMMAND}\" ]; then\n    if [[ ! ${_BASH_COMMAND} =~ ^exit\\  ]] && [[ ! ${_BASH_COMMAND} =~ ^return\\  ]]; then\n      echo \"*********** FAILED COMMAND ***********\"\n      echo \"${_BASH_COMMAND}\"\n      echo \"**************************************\"\n    fi\n  fi\n}\n[ \"${NOONEXIT}\" != \"yes\" ] && trap \"onexitcleanup $0 $@\" EXIT\n\n# return 0 if $2 in space-separated list $1, otherwise return 1\nlistcontains() {\n  if [ -n \"$1\" -a -n \"$2\" ]; then\n    [[ ${1} =~ (^|[[:space:]])${2}($|[[:space:]]) ]] && return 0 || return 1\n  else\n    return 1\n  fi\n}\n\n# remove item(s) from list.\n# looping makes it greedy (eg. listremoveitem \"abc def ghi\" \"(abc|def)\" removes both \"abc\" and \"def\").\nlistremoveitem() {\n  local data=\"${1}\" odata tmp_array\n  if [ -n \"$1\" -a -n \"$2\" ]; then\n    while [ : ]; do\n      odata=\"${data}\"\n      data=\"$(echo \"${data}\" | sed -E \"s (^|[[:space:]])${2}($|[[:space:]]) \\  g\")\"\n      [ \"${odata}\" = \"${data}\" ] && break\n    done\n  fi\n  # Use array word splitting to squash spaces\n  tmp_array=(${data})\n  echo \"${tmp_array[@]}\"\n}\n\nprint_color() {\n  local clr_name=\"$1\" clr_text=\"$2\" clr_actual\n  local black red green yellow blue magenta cyan white endcolor\n  local boldblack boldred boldgreen boldyellow boldblue boldmagenta boldcyan boldwhite\n\n  [ -z \"${clr_name}\" ] && return 0\n\n  if [ \"$DISABLE_COLORS\" = \"yes\" ]; then\n    [ $# -eq 2 ] && echo -en \"${clr_text}\"\n    return 0\n  fi\n\n  black=\"\\e[0;30m\"\n  boldblack=\"\\e[1;30m\"\n  red=\"\\e[0;31m\"\n  boldred=\"\\e[1;31m\"\n  green=\"\\e[0;32m\"\n  boldgreen=\"\\e[1;32m\"\n  yellow=\"\\e[0;33m\"\n  boldyellow=\"\\e[1;33m\"\n  blue=\"\\e[0;34m\"\n  boldblue=\"\\e[1;34m\"\n  magenta=\"\\e[0;35m\"\n  boldmagenta=\"\\e[1;35m\"\n  cyan=\"\\e[0;36m\"\n  boldcyan=\"\\e[1;36m\"\n  white=\"\\e[0;37m\"\n  boldwhite=\"\\e[1;37m\"\n  endcolor=\"\\e[0m\"\n\n  # $clr_name can be a color variable (boldgreen etc.) or a\n  # \"standard\" color determined by an indirect name (CLR_ERROR etc.)\n  #\n  # If ${!clr_name} doesn't exist then assume it's a standard color.\n  # If ${!clr_name} does exist then check it's not a custom color mapping.\n  # Custom color mappings can be configured in options files.\n  #\n  clr_actual=\"${!clr_name}\"\n\n  if [ -n \"${clr_actual}\" ]; then\n    clr_actual=\"${!clr_actual}\"\n  else\n    case \"${clr_name}\" in\n      CLR_ERROR)        clr_actual=\"${boldred}\";;\n      CLR_WARNING)      clr_actual=\"${boldred}\";;\n      CLR_WARNING_DIM)  clr_actual=\"${red}\";;\n\n      CLR_APPLY_PATCH)  clr_actual=\"${boldgreen}\";;\n      CLR_AUTORECONF)   clr_actual=\"${boldmagenta}\";;\n      CLR_BUILD)        clr_actual=\"${boldyellow}\";;\n      CLR_TOOLCHAIN)    clr_actual=\"${boldmagenta}\";;\n      CLR_CLEAN)        clr_actual=\"${boldred}\";;\n      CLR_FIXCONFIG)    clr_actual=\"${boldyellow}\";;\n      CLR_GET)          clr_actual=\"${boldcyan}\";;\n      CLR_INFO)         clr_actual=\"${boldgreen}\";;\n      CLR_INSTALL)      clr_actual=\"${boldgreen}\";;\n      CLR_PATCH_DESC)   clr_actual=\"${boldwhite}\";;\n      CLR_TARGET)       clr_actual=\"${boldwhite}\";;\n      CLR_UNPACK)       clr_actual=\"${boldcyan}\";;\n      CLR_AUTOREMOVE)   clr_actual=\"${boldblue}\";;\n\n      CLR_ENDCOLOR)     clr_actual=\"${endcolor}\";;\n\n      *)                clr_actual=\"${endcolor}\";;\n    esac\n  fi\n\n  if [ $# -eq 2 ]; then\n    echo -en \"${clr_actual}${clr_text}${endcolor}\"\n  else\n    echo -en \"${clr_actual}\"\n  fi\n}\n\n# print build progress messages\n# param1: message color, p2: label, p3: text, p4: indent (optional)\nbuild_msg() {\n  local spaces\n\n  [ -n \"${BUILD_INDENT}\" ] && spaces=\"$(printf \"%${BUILD_INDENT}c\" \" \")\" || spaces=\"\"\n\n  if [ -n \"${3}\" ]; then\n    echo -e \"${spaces}$(print_color \"${1}\" \"${2}\")      ${3}\" >&${SILENT_OUT}\n  else\n    echo -e \"${spaces}$(print_color \"${1}\" \"${2}\")\" >&${SILENT_OUT}\n  fi\n\n  # pad left space to create \"indent\" effect\n  if [ \"${4}\" = \"indent\" ]; then\n    export BUILD_INDENT=$((${BUILD_INDENT:-0}+${BUILD_INDENT_SIZE}))\n  elif [ -n \"${4}\" ]; then\n    die \"ERROR: ${0} unexpected parameter: ${4}\"\n  fi\n}\n\nprint_qa_checks() {\n[[ -d \"${BUILD}/qa_checks\" ]] || mkdir -p \"${BUILD}/qa_checks\"\n  if [ -n \"${PKG_NAME}\" ]; then\n    if [ -d \"${PKG_QA_CHECKS}\" ]; then\n      for qa_check in ${PKG_QA_CHECKS}/*; do\n        print_color CLR_WARNING \"[QA CHECK] [${PKG_NAME}] [$(basename ${qa_check})]:\\n$(cat ${qa_check})\\n\\n\"\n      done\n    fi\n  fi\n}\n\nlog_qa_check() {\n  local qa_check_title=\"${1}\"\n  local qa_check_message=\"${2}\"\n\n  if [ -n \"${qa_check_title}\" -a -n \"${qa_check_message}\" ]; then\n    if [ -n \"${PKG_NAME}\" ]; then\n      print_color CLR_WARNING \"[QA CHECK] [${PKG_NAME}] [${qa_check_title}]:\\n${qa_check_message}\\n\"\n      mkdir -p \"${PKG_QA_CHECKS}\"\n      echo -e \"${qa_check_message}\" >> ${PKG_QA_CHECKS}/${qa_check_title}\n    else\n      print_color CLR_WARNING \"[QA CHECK] [general] [${qa_check_title}]:\\n${qa_check_message}\\n\"\n      mkdir -p \"${BUILD}/qa_checks/general\"\n      echo -e \"${qa_check_message}\" >> ${BUILD}/qa_checks/general/${qa_check_title}\n    fi\n  fi\n}\n\n# prints a warning if the file slated for removal doesn't exist\n# this allows us to continue instead of bailing out with just \"rm\"\nsafe_remove() {\n  local path\n\n  for path in \"$@\" ; do\n    if [ -e \"${path}\" -o -L \"${path}\" ]; then\n      rm -r \"${path}\"\n    else\n     log_qa_check \"safe_remove\" \"path does not exist: ${path}\"\n    fi\n  done\n}\n\n### BUILDSYSTEM HELPERS ###\n# check if a flag is enabled\n# $1: flag-name, $2: default (yes/no), $3: ingenious check (none,only-disable,only-enable)\n# return 0 if flag is enabled, otherwise 1\nflag_enabled() {\n  # check flag\n  if [ -n \"${PKG_BUILD_FLAGS}\" ] && listcontains \"${PKG_BUILD_FLAGS}\" \"[+]?$1\"; then\n    if [ \"${3:none}\" = \"only-disable\" ]; then\n      die \"ERROR: $1 cannot enable via PKG_BUILD_FLAGS (found in $PKG_NAME)\"\n    fi\n    return 0\n  elif [ \"$2\" = \"yes\" ] && ! listcontains \"${PKG_BUILD_FLAGS}\" \"-$1\"; then\n    return 0\n  else\n    if [ \"${3:none}\" = \"only-enable\" ]; then\n      die \"ERROR: $1 cannot disable via PKG_BUILD_FLAGS (found in $PKG_NAME)\"\n    fi\n    return 1\n  fi\n}\n\nsetup_pkg_config_target() {\n  export PKG_CONFIG=\"$TOOLCHAIN/bin/pkg-config\"\n  export PKG_CONFIG_PATH=\"\"\n  export PKG_CONFIG_LIBDIR=\"$SYSROOT_PREFIX/usr/lib/pkgconfig:$SYSROOT_PREFIX/usr/share/pkgconfig\"\n  export PKG_CONFIG_SYSROOT_BASE=\"$BUILD\"\n  export PKG_CONFIG_SYSROOT_DIR=\"$SYSROOT_PREFIX\"\n  export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1\n  export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1\n}\n\nsetup_pkg_config_host() {\n  export PKG_CONFIG=\"$TOOLCHAIN/bin/pkg-config\"\n  export PKG_CONFIG_PATH=\"\"\n  export PKG_CONFIG_LIBDIR=\"$TOOLCHAIN/lib/pkgconfig:$TOOLCHAIN/share/pkgconfig\"\n  export PKG_CONFIG_SYSROOT_BASE=\"\"\n  export PKG_CONFIG_SYSROOT_DIR=\"\"\n  unset PKG_CONFIG_ALLOW_SYSTEM_CFLAGS\n  unset PKG_CONFIG_ALLOW_SYSTEM_LIBS\n}\n\ncheck_toolchain_config() {\n  local target=${1^^}\n  local toolchain=${2^^}\n  local var\n  if [ \"${toolchain}\" == \"AUTOTOOLS\" ]; then\n    toolchain=\"CONFIGURE\"\n  fi\n  if [ \"${toolchain}\" == \"CMAKE-MAKE\" ]; then\n    toolchain=\"CMAKE\"\n  fi\n  for var in \"${!PKG_@}\"; do\n    if [[ \"${var}\" =~ INSTALL_OPTS_ || \"${var}\" =~ _MAKE_OPTS || \"${var}\" =~ _TAR_COPY_OPTS ]]; then\n      continue\n    fi\n    if [[ \"${var}\" =~ _OPTS_${target}$ \\\n            && ! \"${var}\" =~ _${toolchain}_OPTS_${target}$\n          || \"${var}\" =~ _OPTS$ && ! \"${var}\" =~ _${toolchain}_OPTS$ ]]; then\n      die \"ERROR: using $2 toolchain but ${var} is configured.\"\n    fi\n  done\n}\n\n# args: linker, default availability yes/no\nlinker_allowed() {\n  if flag_enabled \"$1\" \"$2\"; then\n    # bfd is always available, others need to be enabled with <LINKER>_SUPPORT=\"yes\"\n    local linker_support=\"${1^^}_SUPPORT\"\n    if [ \"$1\" = \"bfd\" ] || [ \"${!linker_support}\" = \"yes\" ]; then\n      return 0\n    fi\n  fi\n  return 1\n}\n\n# return target linker to use for a package\nget_target_linker() {\n  # all known linkers, in descending order of priority\n  # those are candidates for explicit opt-in via PKG_BUILD_FLAGS\n  local all_linkers=\"mold gold bfd\"\n\n  # linkers to choose from unless disabled via PKG_BUILD_FLAGS\n  local linker_candidates=\"${DEFAULT_LINKER:-bfd} ${all_linkers}\"\n\n  local linker\n\n  # check if package prefers a specific linker\n  for linker in ${all_linkers}; do\n    if linker_allowed \"${linker}\" \"no\"; then\n      echo \"${linker}\"\n      return\n    fi\n  done\n\n  # select linker which isn't disabled by PKG_BUILD_FLAGS\n  for linker in ${linker_candidates}; do\n    if linker_allowed \"${linker}\" \"yes\"; then\n      echo \"${linker}\"\n      return\n    fi\n  done\n\n  # none of our linkers matched, use the compiler's default linker\n  echo \"compiler_default\"\n}\n\nsetup_toolchain() {\n  if [ \"$LTO_SUPPORT\" = \"yes\" ]; then\n    if flag_enabled \"lto-parallel\" \"no\"; then\n      TARGET_CFLAGS+=\" $FLAGS_OPTIM_LTO_PARALLEL $FLAGS_OPTIM_LTO_NO_FAT\"\n      TARGET_CXXFLAGS+=\" $FLAGS_OPTIM_LTO_PARALLEL $FLAGS_OPTIM_LTO_NO_FAT\"\n      TARGET_LDFLAGS+=\" $LDFLAGS_OPTIM_LTO_COMMON $FLAGS_OPTIM_LTO_PARALLEL\"\n    elif flag_enabled \"lto-fat\" \"no\"; then\n      TARGET_CFLAGS+=\" $FLAGS_OPTIM_LTO_NO_PARALLEL $FLAGS_OPTIM_LTO_FAT\"\n      TARGET_CXXFLAGS+=\" $FLAGS_OPTIM_LTO_NO_PARALLEL $FLAGS_OPTIM_LTO_FAT\"\n      TARGET_LDFLAGS+=\" $LDFLAGS_OPTIM_LTO_COMMON $FLAGS_OPTIM_LTO_NO_PARALLEL\"\n    elif flag_enabled \"lto\" \"no\"; then\n      TARGET_CFLAGS+=\" $FLAGS_OPTIM_LTO_NO_PARALLEL $FLAGS_OPTIM_LTO_NO_FAT\"\n      TARGET_CXXFLAGS+=\" $FLAGS_OPTIM_LTO_NO_PARALLEL $FLAGS_OPTIM_LTO_NO_FAT\"\n      TARGET_LDFLAGS+=\" $LDFLAGS_OPTIM_LTO_COMMON $FLAGS_OPTIM_LTO_NO_PARALLEL\"\n    fi\n  fi\n\n  if flag_enabled \"lto-off\" \"no\"; then\n    TARGET_CFLAGS+=\" $FLAGS_OPTIM_LTO_OFF\"\n    TARGET_CXXFLAGS+=\" $FLAGS_OPTIM_LTO_OFF\"\n    TARGET_LDFLAGS+=\" $FLAGS_OPTIM_LTO_OFF\"\n  fi\n\n  local linker=\"$(get_target_linker)\"\n  local linker_opts=\"LDFLAGS_OPTIM_LINKER_${linker^^}\"\n\n  TARGET_LDFLAGS+=\" ${!linker_opts}\"\n\n  # compiler optimization, descending priority: speed, size, default\n  if [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ]; then\n    if [ \"${SPLIT_DEBUG_INFO}\" = \"yes\" -a \"${linker}\" = \"gold\" ]; then\n      TARGET_CFLAGS+=\" $CFLAGS_OPTIM_DEBUG_SPLIT\"\n      TARGET_CXXFLAGS+=\" $CXXFLAGS_OPTIM_DEBUG_SPLIT\"\n      TARGET_LDFLAGS+=\" $LDFLAGS_OPTIM_DEBUG_SPLIT\"\n    else\n      TARGET_CFLAGS+=\" $CFLAGS_OPTIM_DEBUG\"\n      TARGET_CXXFLAGS+=\" $CXXFLAGS_OPTIM_DEBUG\"\n      TARGET_LDFLAGS+=\" $LDFLAGS_OPTIM_DEBUG\"\n    fi\n  elif flag_enabled \"speed\" \"no\"; then\n    TARGET_CFLAGS+=\" $CFLAGS_OPTIM_SPEED\"\n    TARGET_CXXFLAGS+=\" $CXXFLAGS_OPTIM_SPEED\"\n  elif flag_enabled \"size\" \"no\"; then\n    TARGET_CFLAGS+=\" $CFLAGS_OPTIM_SIZE\"\n    TARGET_CXXFLAGS+=\" $CXXFLAGS_OPTIM_SIZE\"\n  else\n    TARGET_CFLAGS+=\" $CFLAGS_OPTIM_DEFAULT\"\n    TARGET_CXXFLAGS+=\" $CXXFLAGS_OPTIM_DEFAULT\"\n  fi\n\n  # position-independent code\n  if flag_enabled \"pic\" \"no\"; then\n    TARGET_CFLAGS+=\" $CFLAGS_OPTIM_PIC\"\n    TARGET_CXXFLAGS+=\" $CXXFLAGS_OPTIM_PIC\"\n    TARGET_LDFLAGS+=\" $LDFLAGS_OPTIM_PIC\"\n  fi\n  if flag_enabled \"pic:host\" \"no\"; then\n    HOST_CFLAGS+=\" $CFLAGS_OPTIM_PIC\"\n    HOST_CXXFLAGS+=\" $CXXFLAGS_OPTIM_PIC\"\n    HOST_LDFLAGS+=\" $LDFLAGS_OPTIM_PIC\"\n  fi\n\n  # hardening support\n  if flag_enabled \"hardening\" \"$HARDENING_SUPPORT\"; then\n    TARGET_CFLAGS+=\" $CFLAGS_OPTIM_HARDENING\"\n    TARGET_CXXFLAGS+=\" $CXXFLAGS_OPTIM_HARDENING\"\n    TARGET_CFLAGS+=\" $CPPFLAGS_OPTIM_HARDENING\"\n    TARGET_LDFLAGS+=\" $LDFLAGS_OPTIM_HARDENING\"\n  fi\n\n  # parallel\n  if flag_enabled \"parallel\" \"yes\"; then\n    NINJA_OPTS=\"-j$CONCURRENCY_MAKE_LEVEL\"\n    MAKEFLAGS=\"-j$CONCURRENCY_MAKE_LEVEL\"\n  else\n    NINJA_OPTS=\"-j1\"\n    MAKEFLAGS=\"-j1\"\n  fi\n\n  # verbose flag\n  if flag_enabled \"verbose\" \"no\"; then\n    NINJA_OPTS+=\" -v\"\n    MAKEFLAGS+=\" V=1 VERBOSE=1\"\n  fi\n\n  # average load limit\n  if [ \"${CONCURRENCY_LOAD}\" != \"0\" ]; then\n    NINJA_OPTS+=\" -l${CONCURRENCY_LOAD}\"\n    MAKEFLAGS+=\" -l${CONCURRENCY_LOAD}\"\n  fi\n  export MAKEFLAGS\n\n  case \"$1:$2\" in\n    target:meson|init:meson)\n      export DESTIMAGE=\"target\"\n      export AWK=\"gawk\"\n      export CC=\"$TOOLCHAIN/bin/host-gcc\"\n      export CXX=\"$TOOLCHAIN/bin/host-g++\"\n      export CPP=\"cpp\"\n      export LD=\"ld\"\n      export AS=\"as\"\n      export AR=\"ar\"\n      export NM=\"nm\"\n      export RANLIB=\"ranlib\"\n      export OBJCOPY=\"objcopy\"\n      export OBJDUMP=\"objdump\"\n      export STRIP=\"strip\"\n      export CPPFLAGS=\"$HOST_CPPFLAGS\"\n      export CFLAGS=\"$HOST_CFLAGS\"\n      export CXXFLAGS=\"$HOST_CXXFLAGS\"\n      export LDFLAGS=\"$HOST_LDFLAGS\"\n      setup_pkg_config_target\n      export TARGET_CC=\"${TARGET_PREFIX}gcc\"\n      export TARGET_CXX=\"${TARGET_PREFIX}g++\"\n      export TARGET_AR=\"${TARGET_PREFIX}ar\"\n      export TARGET_STRIP=\"${TARGET_PREFIX}strip\"\n      export TARGET_CFLAGS=\"$TARGET_CFLAGS\"\n      export TARGET_CXXFLAGS=\"$TARGET_CXXFLAGS\"\n      export TARGET_LDFLAGS=\"$TARGET_LDFLAGS\"\n      export HOST_CC=\"$CC\"\n      export HOST_CXX=\"$CXX\"\n      export HOSTCC=\"$CC\"\n      export HOSTCXX=\"$CXX\"\n      export CC_FOR_BUILD=\"$CC\"\n      export CXX_FOR_BUILD=\"$CXX\"\n      export BUILD_CC=\"$CC\"\n      export BUILD_CXX=\"$CXX\"\n      export _python_sysroot=\"$SYSROOT_PREFIX\"\n      export _python_prefix=/usr\n      export _python_exec_prefix=/usr\n      ;;\n\n    target:*|init:*)\n      export DESTIMAGE=\"target\"\n      export CC=\"${TARGET_PREFIX}gcc\"\n      export CXX=\"${TARGET_PREFIX}g++\"\n      export CPP=\"${TARGET_PREFIX}cpp\"\n      export LD=\"${TARGET_PREFIX}ld\"\n      export AS=\"${TARGET_PREFIX}as\"\n      export AR=\"${TARGET_PREFIX}ar\"\n      export NM=\"${TARGET_PREFIX}nm\"\n      export RANLIB=\"${TARGET_PREFIX}ranlib\"\n      export OBJCOPY=\"${TARGET_PREFIX}objcopy\"\n      export OBJDUMP=\"${TARGET_PREFIX}objdump\"\n      export STRIP=\"${TARGET_PREFIX}strip\"\n      export CPPFLAGS=\"$TARGET_CPPFLAGS\"\n      export CFLAGS=\"$TARGET_CFLAGS\"\n      export CXXFLAGS=\"$TARGET_CXXFLAGS\"\n      export LDFLAGS=\"$TARGET_LDFLAGS\"\n      setup_pkg_config_target\n      export CMAKE_CONF=$TOOLCHAIN/etc/cmake-$TARGET_NAME.conf\n      export CMAKE=\"cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF -DCMAKE_INSTALL_PREFIX=/usr\"\n      if [ ! -f $CMAKE_CONF ] ; then\n        mkdir -p $TOOLCHAIN/etc\n        echo \"SET(CMAKE_SYSTEM_NAME Linux)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_SYSTEM_VERSION 1)\"  >> $CMAKE_CONF\n        echo \"SET(CMAKE_SYSTEM_PROCESSOR  $TARGET_ARCH)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_C_COMPILER   $CC)\"  >> $CMAKE_CONF\n        echo \"SET(CMAKE_CXX_COMPILER $CXX)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_CPP_COMPILER $CPP)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_ASM_FLAGS_MINSIZEREL -DDUMMYOPT)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_CXX_FLAGS_MINSIZEREL -DDUMMYOPT)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_C_FLAGS_MINSIZEREL -DDUMMYOPT)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_FIND_ROOT_PATH  $SYSROOT_PREFIX)\"   >> $CMAKE_CONF\n        echo \"SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\"  >> $CMAKE_CONF\n        echo \"SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\"  >> $CMAKE_CONF\n        echo \"SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)\"  >> $CMAKE_CONF\n        if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n          if [ \"${OPENGL}\" = \"mesa\" ] || listcontains \"${GRAPHIC_DRIVERS}\" \"nvidia\"; then\n            echo \"SET(OpenGL_GL_PREFERENCE GLVND)\" >> $CMAKE_CONF\n          fi\n        fi\n      fi\n      export HOST_CC=\"$TOOLCHAIN/bin/host-gcc\"\n      export HOST_CXX=\"$TOOLCHAIN/bin/host-g++\"\n      export HOSTCC=\"$HOST_CC\"\n      export HOSTCXX=\"$HOST_CXX\"\n      export CC_FOR_BUILD=\"$HOST_CC\"\n      export CXX_FOR_BUILD=\"$HOST_CXX\"\n      export BUILD_CC=\"$HOST_CC\"\n      export BUILD_CXX=\"$HOST_CXX\"\n      export _python_sysroot=\"$SYSROOT_PREFIX\"\n      export _python_prefix=/usr\n      export _python_exec_prefix=/usr\n\n      # rust\n      export CARGO_TARGET_DIR=\"${PKG_BUILD}/.${TARGET_NAME}/target\"\n      export CARGO_HOME=\"$(get_build_dir rust)/cargo_home\"\n      export RUST_TARGET_PATH=\"${TOOLCHAIN}/lib/rustlib/\"\n\n      ;;\n    host:*|bootstrap:*)\n      export DESTIMAGE=\"host\"\n      export AWK=\"gawk\"\n      if [ \"$1\" = \"host\" ] && flag_enabled \"local-cc\" \"no\"; then\n        export CC=\"${LOCAL_CC}\"\n        export CXX=\"${LOCAL_CXX}\"\n        if [ -n \"${LOCAL_CCACHE}\" ]; then\n          export CCACHE_DIR=\"${LOCAL_CCACHE_DIR}\"\n          export CC=\"${LOCAL_CCACHE} ${CC}\";\n          export CXX=\"${LOCAL_CCACHE} ${CXX}\";\n        fi\n      else\n        export CC=\"$TOOLCHAIN/bin/host-gcc\"\n        export CXX=\"$TOOLCHAIN/bin/host-g++\"\n      fi\n      export CPP=\"cpp\"\n      export LD=\"ld\"\n      export AS=\"as\"\n      export AR=\"ar\"\n      export NM=\"nm\"\n      export RANLIB=\"ranlib\"\n      export OBJCOPY=\"objcopy\"\n      export OBJDUMP=\"objdump\"\n      export STRIP=\"strip\"\n      export CPPFLAGS=\"$HOST_CPPFLAGS\"\n      export CFLAGS=\"$HOST_CFLAGS\"\n      export CXXFLAGS=\"$HOST_CXXFLAGS\"\n      export LDFLAGS=\"$HOST_LDFLAGS\"\n      setup_pkg_config_host\n      export CMAKE_CONF=$TOOLCHAIN/etc/cmake-$HOST_NAME.conf\n      export CMAKE=\"cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF -DCMAKE_INSTALL_PREFIX=$TOOLCHAIN\"\n      if [ ! -f $CMAKE_CONF ] ; then\n        mkdir -p $TOOLCHAIN/etc\n        echo \"SET(CMAKE_SYSTEM_NAME Linux)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_SYSTEM_VERSION 1)\"  >> $CMAKE_CONF\n        echo \"SET(CMAKE_SYSTEM_PROCESSOR ${MACHINE_HARDWARE_NAME})\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_C_COMPILER   $CC)\"  >> $CMAKE_CONF\n        echo \"SET(CMAKE_CXX_COMPILER $CXX)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_CPP_COMPILER $CXX)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_ASM_FLAGS_RELEASE -DDUMMYOPT)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_CXX_FLAGS_RELEASE -DDUMMYOPT)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_C_FLAGS_RELEASE -DDUMMYOPT)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_AR $AR CACHE FILEPATH \"Archiver\")\" >> $CMAKE_CONF # hum?\n        echo \"SET(CMAKE_FIND_ROOT_PATH  $TOOLCHAIN)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)\" >> $CMAKE_CONF\n        echo \"SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)\" >> $CMAKE_CONF\n      fi\n      export HOST_CC=\"$CC\"\n      export HOST_CXX=\"$CXX\"\n      export HOSTCC=\"$CC\"\n      export HOSTCXX=\"$CXX\"\n      export CC_FOR_BUILD=\"$CC\"\n      export CXX_FOR_BUILD=\"$CXX\"\n      export BUILD_CC=\"$CC\"\n      export BUILD_CXX=\"$CXX\"\n      export _python_sysroot=\"$TOOLCHAIN\"\n      export _python_prefix=/\n      export _python_exec_prefix=/\n\n      # rust\n      case \"${MACHINE_HARDWARE_NAME}\" in\n        \"arm\")\n          RUST_HOST=\"arm-unknown-linux-gnueabihf\"\n          ;;\n        \"aarch64\")\n          RUST_HOST=\"aarch64-unknown-linux-gnu\"\n          ;;\n        \"x86_64\")\n          RUST_HOST=\"x86_64-unknown-linux-gnu\"\n          ;;\n      esac\n\n      export CARGO_TARGET_DIR=\"${PKG_BUILD}/.${RUST_HOST}/target\"\n      export CARGO_HOME=\"$(get_build_dir rust)/cargo_home\"\n      export RUST_TARGET_PATH=\"${TOOLCHAIN}/lib/rustlib/\"\n      ;;\n  esac\n}\n\ncreate_meson_conf_host() {\n  local properties\n  properties=\"PKG_MESON_PROPERTIES_${1^^}\"\n\n  cat > $2 <<EOF\n[binaries]\nc = '$CC'\ncpp = '$CXX'\nar = '$AR'\nstrip = '$STRIP'\npkgconfig = '$PKG_CONFIG'\nllvm-config = '$TOOLCHAIN/bin/llvm-config'\nlibgcrypt-config = '$SYSROOT_PREFIX/usr/bin/libgcrypt-config'\n\n[build_machine]\nsystem = 'linux'\ncpu_family = '${MACHINE_HARDWARE_NAME}'\ncpu = '${MACHINE_HARDWARE_NAME}'\nendian = 'little'\n\n[host_machine]\nsystem = 'linux'\ncpu_family = '${MACHINE_HARDWARE_NAME}'\ncpu = '${MACHINE_HARDWARE_NAME}'\nendian = 'little'\n\n[built-in options]\n$(python3 -c \"import os; print('c_args = {}'.format([x for x in os.getenv('CFLAGS').split()]))\")\n$(python3 -c \"import os; print('c_link_args = {}'.format([x for x in os.getenv('LDFLAGS').split()]))\")\n$(python3 -c \"import os; print('cpp_args = {}'.format([x for x in os.getenv('CXXFLAGS').split()]))\")\n$(python3 -c \"import os; print('cpp_link_args = {}'.format([x for x in os.getenv('LDFLAGS').split()]))\")\n\n[properties]\nroot = '$TOOLCHAIN'\n${!properties}\nEOF\n}\n\ncreate_meson_conf_target() {\n  local properties\n  properties=\"PKG_MESON_PROPERTIES_${1^^}\"\n\n  cat > $2 <<EOF\n[binaries]\nc = '$TARGET_CC'\ncpp = '$TARGET_CXX'\nar = '$TARGET_AR'\nstrip = '$TARGET_STRIP'\npkgconfig = '$PKG_CONFIG'\nllvm-config = '$SYSROOT_PREFIX/usr/bin/llvm-config'\nlibgcrypt-config = '$SYSROOT_PREFIX/usr/bin/libgcrypt-config'\n\n[build_machine]\nsystem = 'linux'\ncpu_family = '${MACHINE_HARDWARE_NAME}'\ncpu = '${MACHINE_HARDWARE_NAME}'\nendian = 'little'\n\n[host_machine]\nsystem = 'linux'\ncpu_family = '$TARGET_ARCH'\ncpu = '$TARGET_SUBARCH'\nendian = 'little'\n\n[built-in options]\n$(python3 -c \"import os; print('c_args = {}'.format([x for x in os.getenv('TARGET_CFLAGS').split()]))\")\n$(python3 -c \"import os; print('c_link_args = {}'.format([x for x in os.getenv('TARGET_LDFLAGS').split()]))\")\n$(python3 -c \"import os; print('cpp_args = {}'.format([x for x in os.getenv('TARGET_CXXFLAGS').split()]))\")\n$(python3 -c \"import os; print('cpp_link_args = {}'.format([x for x in os.getenv('TARGET_LDFLAGS').split()]))\")\n\n[properties]\nneeds_exe_wrapper = true\nroot = '$SYSROOT_PREFIX/usr'\n${!properties}\nEOF\n}\n\n\n# unset all PKG_* vars apart from those exported by setup_toolchain, then set default values\nreset_pkg_vars() {\n  local vars var\n\n  for var in ${!PKG_*}; do\n    if [ \"${var}\" = \"PKG_CONFIG\" ] || \\\n       [ \"${var}\" = \"PKG_CONFIG_PATH\" ] || \\\n       [ \"${var}\" = \"PKG_CONFIG_LIBDIR\" ] || \\\n       [ \"${var}\" = \"PKG_CONFIG_SYSROOT_BASE\" ] || \\\n       [ \"${var}\" = \"PKG_CONFIG_SYSROOT_DIR\" ] || \\\n       [ \"${var}\" = \"PKG_CONFIG_ALLOW_SYSTEM_CFLAGS\" ] || \\\n       [ \"${var}\" = \"PKG_CONFIG_ALLOW_SYSTEM_LIBS\" ]; then\n       continue\n    fi\n    vars+=\"${var} \"\n  done\n  [ -n \"${vars}\" ] && unset -v ${vars}\n\n  PKG_VERSION=\"0.0invalid\"\n  PKG_REV=\"0\"\n  PKG_ARCH=\"any\"\n  PKG_LICENSE=\"unknown\"\n  PKG_TOOLCHAIN=\"auto\"\n  PKG_IS_ADDON=\"no\"\n  PKG_PYTHON_VERSION=\"${DEFAULT_PYTHON_VERSION}\"\n}\n\nset_debug_depends() {\n  local pkg dep_pkg map tmp_array mpkg bpkg kvpair\n\n  _DEBUG_DEPENDS_LIST=\"\"\n  _DEBUG_PACKAGE_LIST=\"\"\n  if [ \"${DEBUG:-no}\" != \"no\" ]; then\n    # Convert DEBUG_GROUPS into array of groups, adding \"all\" if required\n    declare -A debug_group_map\n    for kvpair in ${DEBUG_GROUPS}; do\n      debug_group_map+=([\"${kvpair%=*}\"]=\"${kvpair#*=}\")\n    done\n    [ -z \"${debug_group_map[\"all\"]}\" ] && debug_group_map+=([\"all\"]=\"all\")\n\n    # Expand $DEBUG into $_DEBUG_PACKAGE_LIST\n    for pkg in ${DEBUG//,/ }; do\n      [ \"${pkg}\" = \"yes\" ] && pkg=\"${DEBUG_GROUP_YES:-all}\"\n      map=\"${debug_group_map[\"${pkg}\"]}\"\n      [ -z \"${map}\" ] && map=\"${pkg}\"\n      for mpkg in ${map//,/ }; do\n        [[ ${mpkg} =~ ^[!-] ]] && bpkg=\"${mpkg:1}\" || bpkg=\"${mpkg}\"\n        [[ ${bpkg} =~ \\+$ ]] && bpkg=\"${bpkg::-1}\"\n        # Remove existing instances of this package\n        listcontains \"${_DEBUG_PACKAGE_LIST}\" \"[!-]?${bpkg}[+]?\" && _DEBUG_PACKAGE_LIST=\"$(listremoveitem \"${_DEBUG_PACKAGE_LIST}\" \"[!-]?${bpkg}[+]?\")\"\n        # Add package\n        _DEBUG_PACKAGE_LIST+=\" ${mpkg}\"\n      done\n    done\n    # Use array word splitting to squash spaces\n    tmp_array=(${_DEBUG_PACKAGE_LIST})\n    _DEBUG_PACKAGE_LIST=\"${tmp_array[@]}\"\n\n    # Determine dependencies for each package+\n    for pkg in ${_DEBUG_PACKAGE_LIST}; do\n      if [ \"${pkg}\" != \"all\" ] && [[ ! ${pkg} =~ ^[!-] ]]; then\n        ! listcontains \"${_DEBUG_DEPENDS_LIST}\" \"${pkg}\" && _DEBUG_DEPENDS_LIST+=\" ${pkg}\"\n        [[ ! ${pkg} =~ \\+$ ]] && continue\n        for dep_pkg in $(get_pkg_variable ${pkg::-1} PKG_DEPENDS_TARGET); do\n          [ \"${dep_pkg}\" = \"toolchain\" ] && continue\n          [[ ${dep_pkg} =~ ^.*:host$ ]] && continue\n          ! listcontains \"${_DEBUG_DEPENDS_LIST}\" \"${dep_pkg}\" && _DEBUG_DEPENDS_LIST+=\" ${dep_pkg}\"\n        done\n      fi\n    done\n    tmp_array=(${_DEBUG_DEPENDS_LIST})\n    _DEBUG_DEPENDS_LIST=\"${tmp_array[@]}\"\n  fi\n  export _DEBUG_DEPENDS_LIST _DEBUG_PACKAGE_LIST\n}\n\n# Return 0 if building with debug is enabled for the current package (or all packages).\n# Examples: DEBUG=yes  DEBUG=all  DEBUG='all,!linux'  DEBUG=kodi  DEBUG=kodi,samba\nbuild_with_debug() {\n  if [ \"${DEBUG:-no}\" != \"no\" -a -n \"${PKG_NAME}\" -a -n \"${_DEBUG_DEPENDS_LIST+x}\" ]; then\n    # Return 1 if this package is not to be built with debug\n    listcontains \"${_DEBUG_PACKAGE_LIST}\" \"[!-]${PKG_NAME}[+]?\" && return 1\n\n    # Build all packages with debug\n    listcontains \"${_DEBUG_PACKAGE_LIST}\" \"all\" && return 0\n\n    # Debugging is enabled for at least one package, so enable debug in the \"debug\" virtual package\n    [ \"${PKG_NAME}\" = \"debug\" ] && return 0\n\n    # Build addons with debug if we're building the mediacenter with debug and with dependencies\n    [ \"${PKG_IS_ADDON}\" = \"yes\" -o \"${PKG_IS_ADDON}\" = \"embedded\" ] && listcontains \"${_DEBUG_DEPENDS_LIST}\" \"${MEDIACENTER}\\+\" && return 0\n\n    # Build kernel packages with debug if we're building the kernel with debug and with dependencies\n    [ \"${PKG_IS_KERNEL_PKG}\" = \"yes\" ] && listcontains \"${_DEBUG_DEPENDS_LIST}\" \"linux\\+\" && return 0\n\n    # Build this package with debug if it's a resolved dependency\n    listcontains \"${_DEBUG_DEPENDS_LIST}\" \"${PKG_NAME}[+]?\" && return 0\n  fi\n\n  return 1\n}\n\n# strip\ndebug_strip() {\n  if [ -z \"${BUILD_WITH_DEBUG}\" ]; then\n    die \"ERROR: debug_strip() must not be called without configuring BUILD_WITH_DEBUG\"\n  fi\n\n  if [ \"${BUILD_WITH_DEBUG}\" != \"yes\" ] && flag_enabled \"strip\" \"yes\"; then\n    find $* -type f -executable | xargs $STRIP 2>/dev/null || :\n  fi\n}\n\ninit_package_cache() {\n  local _ANCHOR=\"@?+?@\"\n  local temp_global temp_local\n\n  # If the package caches are unset, then populate them\n  if [ -z \"${_CACHE_PACKAGE_LOCAL}\" -o -z \"${_CACHE_PACKAGE_GLOBAL}\" -o -z \"${_CACHE_PACKAGE_LOCAL_DEVICE}\" ]; then\n    temp_global=\"$(mktemp)\"\n    temp_local=\"$(mktemp)\"\n    temp_local_device=\"$(mktemp)\"\n\n    # cache project/device folder for packages\n    if [ -n \"${DEVICE}\" ]; then\n      find \"${ROOT}/projects/${PROJECT}/devices/${DEVICE}/packages\" -type f -name package.mk 2>/dev/null | sed \"s#/package\\.mk\\$#${_ANCHOR}#\" >> \"${temp_local_device}\"\n    fi\n\n    # cache project folder for packages\n    find \"${ROOT}/projects/${PROJECT}/packages\" -type f -name package.mk 2>/dev/null | sed \"s#/package\\.mk\\$#${_ANCHOR}#\" >> \"${temp_local}\"\n\n    # cache packages folder\n    find \"${ROOT}/${PACKAGES}\" -type f -name package.mk 2>/dev/null | sed \"s#/package\\.mk\\$#${_ANCHOR}#\" >> \"${temp_global}\"\n\n    _CACHE_PACKAGE_LOCAL=\"${BUILD}/.cache_package_local\"\n    _CACHE_PACKAGE_LOCAL_DEVICE=\"${BUILD}/.cache_package_local_device\"\n    _CACHE_PACKAGE_GLOBAL=\"${BUILD}/.cache_package_global\"\n    export _CACHE_PACKAGE_LOCAL _CACHE_PACKAGE_GLOBAL _CACHE_PACKAGE_LOCAL_DEVICE\n\n    # overwrite existing cache files only when they are invalid, or not yet created\n    mkdir -p \"${_CACHE_PACKAGE_GLOBAL%/*}\"\n    if [ -f \"${_CACHE_PACKAGE_LOCAL_DEVICE}\" ] && cmp -s \"${temp_local_device}\" \"${_CACHE_PACKAGE_LOCAL_DEVICE}\"; then\n      rm \"${temp_local_device}\"\n    else\n      mv \"${temp_local_device}\" \"${_CACHE_PACKAGE_LOCAL_DEVICE}\"\n    fi\n    if [ -f \"${_CACHE_PACKAGE_LOCAL}\" ] && cmp -s \"${temp_local}\" \"${_CACHE_PACKAGE_LOCAL}\"; then\n      rm \"${temp_local}\"\n    else\n      mv \"${temp_local}\" \"${_CACHE_PACKAGE_LOCAL}\"\n    fi\n    if [ -f \"${_CACHE_PACKAGE_GLOBAL}\" ] && cmp -s \"${temp_global}\" \"${_CACHE_PACKAGE_GLOBAL}\"; then\n      rm \"${temp_global}\"\n    else\n      mv \"${temp_global}\" \"${_CACHE_PACKAGE_GLOBAL}\"\n    fi\n  fi\n\n  if [ -z \"${_DEBUG_DEPENDS_LIST+x}\" ]; then\n    set_debug_depends\n  fi\n}\n\nload_build_config() {\n  if [ -d \"${1}\" -a -f ${1}/.build.conf ]; then\n    source ${1}/.build.conf\n    return 0\n  fi\n  return 1\n}\n\nsave_build_config() {\n  local var\n  mkdir -p ${BUILD}\n  rm -f ${BUILD}/.build.conf\n  for var in PROJECT DEVICE ARCH DEBUG BUILD_SUFFIX; do\n    echo \"export ${var}=\\\"${!var}\\\"\" >> ${BUILD}/.build.conf\n  done\n}\n\ncheck_path() {\n  local dashes=\"===========================\" path_err_msg\n  if [ \"${PWD##/usr}\" != \"${PWD}\" ]; then\n    path_err_msg=\"\\n ${dashes}${dashes}${dashes}\"\n    path_err_msg+=\"\\n ERROR: Detected building inside /usr\"\n    path_err_msg+=\"\\n ${dashes}${dashes}${dashes}\"\n    path_err_msg+=\"\\n This is not supported by the buildsystem.\"\n    path_err_msg+=\"\\n Please use another directory (for example your \\$HOME) to build ${DISTRONAME}\"\n\n    die \"${path_err_msg}\"\n  fi\n}\n\ncheck_distro() {\n  local dashes=\"===========================\" distro_err_msg\n  if [ -z \"${DISTRO}\" -o ! -d \"${DISTRO_DIR}/${DISTRO}\" ]; then\n    distro_err_msg=\"\\n ${dashes}${dashes}${dashes}\"\n    distro_err_msg+=\"\\n ERROR: Distro not found, use a valid distro or create a new config\"\n    distro_err_msg+=\"\\n ${dashes}${dashes}${dashes}\"\n    distro_err_msg+=\"\\n\\n Valid distros:\"\n\n    for distros in ${DISTRO_DIR}/*; do\n      distro_err_msg+=\"\\n - ${distros##*/}\"\n    done\n    die \"${distro_err_msg}\"\n  fi\n}\n\ncheck_project() {\n  local dashes=\"===========================\" project_err_msg\n  if [ -z \"${PROJECT}\" -o ! -d \"${PROJECT_DIR}/${PROJECT}\" ]; then\n    project_err_msg=\"\\n ${dashes}${dashes}${dashes}\"\n    project_err_msg+=\"\\n ERROR: Project not found. Use a valid project or create a new config\"\n    project_err_msg+=\"\\n ${dashes}${dashes}${dashes}\"\n    project_err_msg+=\"\\n\\n Valid projects:\"\n\n    for projects in ${PROJECT_DIR}/*; do\n      project_err_msg+=\"\\n - ${projects##*/}\"\n    done\n    die \"${project_err_msg}\"\n  fi\n}\n\ncheck_device() {\n  local dashes=\"===========================\" device_err_msg\n  if [ -n \"${DEVICE}\" -a ! -d \"${PROJECT_DIR}/${PROJECT}/devices\" ]; then\n    device_err_msg=\"\\n $dashes$dashes$dashes\"\n    device_err_msg+=\"\\n ERROR: You must not specify DEVICE for the $PROJECT project\"\n    device_err_msg+=\"\\n $dashes$dashes$dashes\"\n    device_err_msg+=\"\\n\\n There are no devices for project: ${PROJECT}\"\n\n    die \"${device_err_msg}\"\n  elif [ \\( -z \"${DEVICE}\" -a -d \"${PROJECT_DIR}/${PROJECT}/devices\" \\) -o \\\n         \\( -n \"${DEVICE}\" -a ! -d \"${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}\" \\) ]; then\n    device_err_msg=\"\\n ${dashes}${dashes}${dashes}\"\n    device_err_msg+=\"\\n ERROR: Specify a valid device for the ${PROJECT} project\"\n    device_err_msg+=\"\\n ${dashes}${dashes}${dashes}\"\n    device_err_msg+=\"\\n\\n Valid devices for project: ${PROJECT}\"\n\n    for device in ${PROJECT_DIR}/${PROJECT}/devices/*; do\n      device_err_msg+=\"\\n - ${device##*/}\"\n    done\n    die \"${device_err_msg}\"\n  fi\n}\n\ncheck_arch() {\n  local dashes=\"===========================\" arch_err_msg linux_config_dir\n  if [ -d \"${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/linux\" ]; then\n    linux_config_dir=\"${PROJECT_DIR}/${PROJECT}/devices/$DEVICE/linux\"\n  else\n    linux_config_dir=\"${PROJECT_DIR}/${PROJECT}/linux\"\n  fi\n\n  if [ ! -e \"${linux_config_dir}/linux.${TARGET_KERNEL_PATCH_ARCH:-$TARGET_ARCH}.conf\" ] &&\n       ! ls \"${linux_config_dir}/\"*/linux.${TARGET_KERNEL_PATCH_ARCH:-$TARGET_ARCH}.conf &>/dev/null; then\n    arch_err_msg=\"\\n ${dashes}${dashes}${dashes}\"\n    arch_err_msg+=\"\\n ERROR: Architecture not found. Use a valid Architecture\"\n    arch_err_msg+=\"\\n for your project or create a new config\"\n    arch_err_msg+=\"\\n ${dashes}${dashes}${dashes}\"\n    arch_err_msg+=\"\\n\\n Valid Architectures for project: ${PROJECT}\"\n\n    for arch in ${linux_config_dir}/*.conf ${linux_config_dir}/*/linux.${TARGET_ARCH}.conf; do\n      [[ ${arch} =~ .*\\*.* ]] && continue #ignore unexpanded wildcard\n      arch_err_msg+=\"\\n - $(echo ${arch##*/} | cut -f2 -d\".\")\"\n    done\n    die \"${arch_err_msg}\"\n  fi\n}\n\ncheck_config() {\n  check_path\n  check_distro\n  check_project\n  check_device\n  check_arch\n}\n\ndo_autoreconf() {\n  export ACLOCAL_DIR=$SYSROOT_PREFIX/usr/share/aclocal\n\n  if [ -e \"$TOOLCHAIN/bin/autoconf\" ]; then\n    export AUTOCONF=$TOOLCHAIN/bin/autoconf\n  fi\n\n  if [ -e \"$TOOLCHAIN/bin/automake\" ]; then\n    export AUTOMAKE=$TOOLCHAIN/bin/automake\n  fi\n\n  if [ -e \"$TOOLCHAIN/bin/autopoint\" ]; then\n    export AUTOPOINT=$TOOLCHAIN/bin/autopoint\n  fi\n\n  if [ -e \"$TOOLCHAIN/bin/libtoolize\" ]; then\n    export LIBTOOLIZE=$TOOLCHAIN/bin/libtoolize\n  fi\n\n  if [ -e \"$TOOLCHAIN/bin/intltoolize\" ]; then\n    export INTLTOOLIZE=$TOOLCHAIN/bin/intltoolize\n  fi\n\n  if [ -e \"$TOOLCHAIN/bin/aclocal\" ]; then\n    export ACLOCAL=\"$TOOLCHAIN/bin/aclocal -I $ACLOCAL_DIR\"\n  fi\n\n  if [ -e \"$TOOLCHAIN/bin/autoheader\" ]; then\n    export AUTOHEADER=$TOOLCHAIN/bin/autoheader\n  fi\n\n  if [ -e \"$TOOLCHAIN/bin/libtool\" ]; then\n    export LIBTOOL=$TOOLCHAIN/bin/libtool\n  fi\n\n  # >autoconf-2.69 will call gtkdocize when used in macros\n  # when called with --install parameter.\n  # use \"true\" unless gtkdocsize is in the toolchain.\n  if [ -e \"$TOOLCHAIN/bin/gtkdocize\" ]; then\n    export GTKDOCIZE=$TOOLCHAIN/bin/gtkdocize\n  else\n    export GTKDOCIZE=true\n  fi\n\n  if [ -e \"$TOOLCHAIN/bin/autoreconf\" -a -e \"$INTLTOOLIZE\" ]; then\n    mkdir -p $ACLOCAL_DIR\n    if [ -e \"$LIBTOOLIZE\" ]; then\n      export AUTORECONF=\"$TOOLCHAIN/bin/autoreconf --verbose --force --install -I $ACLOCAL_DIR\"\n    else\n      export AUTORECONF=\"$TOOLCHAIN/bin/autoreconf --verbose --force -I $ACLOCAL_DIR\"\n    fi\n    $AUTORECONF $@\n  fi\n}\n\n# True if this is a sequential build, false if multithreaded\nis_sequential_build() {\n  [ \"${MTWITHLOCKS}\" != \"yes\" ] && return 0 || return 1\n}\n\n# arg1: filename (libtool) to remove hardcode rpath when --disable-rpath is not supported by configure\nlibtool_remove_rpath() {\n  sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"\"|g' ${1}\n  sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${1}\n}\n\n### PACKAGE HELPERS ###\n# get variable ($2) for package ($1).\n# avoid infinite recursion if required package is already loaded.\nget_pkg_variable() {\n  if [ -n \"$1\" -a -n \"$2\" ] ; then\n    if [ \"$1\" != \"$PKG_NAME\" ]; then\n      source_package \"${1}\"\n    fi\n    echo \"${!2}\"\n  fi\n}\n\n# get package's build dir\nget_build_dir() {\n  local _PKG_NAME=\"${1%:*}\" _PKG_VERSION=\"$(get_pkg_version \"$1\")\"\n  if [ -n \"$_PKG_NAME\" -a -n \"$_PKG_VERSION\" ]; then\n    echo $BUILD/build/${_PKG_NAME}-${_PKG_VERSION}\n  fi\n}\n\nget_install_dir() {\n  get_pkg_variable \"$1\" PKG_INSTALL\n}\n\nget_pkg_version() {\n  get_pkg_variable \"$1\" PKG_VERSION\n}\n\nget_pkg_version_maj_min() {\n  local pkg_version\n\n  [ -n \"${1}\" ] && pkg_version=\"$(get_pkg_version \"${1}\")\" || pkg_version=\"${PKG_VERSION}\"\n\n  if [[ ${pkg_version} =~ ^[0-9A-Za-z]*\\.[0-9A-Za-z]*\\.[0-9A-za-z]*$ ]]; then\n    echo \"${pkg_version%.*}\"\n  elif [[ ${pkg_version} =~ ^[0-9A-Za-z]*\\.[0-9A-Za-z]*$ ]]; then\n    echo \"${pkg_version}\"\n  else\n    echo \"${pkg_version}\"\n  fi\n}\n\nget_pkg_directory() {\n  local _PKG_ROOT_NAME=${1%:*} _ALL_DIRS _FOUND=0 _ANCHOR=\"@?+?@\" _PKG_DIR _DIR\n\n  # Check for any available local_device package in preference to a global package\n  for _DIR in $(grep -F \"/${_PKG_ROOT_NAME}${_ANCHOR}\" \"${_CACHE_PACKAGE_LOCAL_DEVICE}\"); do\n    _DIR=\"${_DIR%${_ANCHOR}}\"\n    # found first, set $_PKG_DIR\n    _PKG_DIR=\"$_DIR\"\n    # keep track of dirs with package.mk for detecting multiple folders\n    _ALL_DIRS+=\"${_DIR}\\n\"\n    _FOUND=$((_FOUND+1))\n  done\n\n  # If there's no local_device package available, use the global package\n  if [ $_FOUND -eq 0 ]; then\n  # Check for any available local package in preference to a global package\n  for _DIR in $(grep -F \"/${_PKG_ROOT_NAME}${_ANCHOR}\" \"${_CACHE_PACKAGE_LOCAL}\"); do\n    _DIR=\"${_DIR%${_ANCHOR}}\"\n    # found first, set $_PKG_DIR\n    _PKG_DIR=\"$_DIR\"\n    # keep track of dirs with package.mk for detecting multiple folders\n    _ALL_DIRS+=\"${_DIR}\\n\"\n    _FOUND=$((_FOUND+1))\n  done\n  fi\n\n  # If there's no local package available, use the global package\n  if [ $_FOUND -eq 0 ]; then\n    for _DIR in $(grep -F \"/${_PKG_ROOT_NAME}${_ANCHOR}\" \"${_CACHE_PACKAGE_GLOBAL}\"); do\n      _DIR=\"${_DIR%${_ANCHOR}}\"\n      # found first, set $_PKG_DIR\n      _PKG_DIR=\"$_DIR\"\n      # keep track of dirs with package.mk for detecting multiple folders\n      _ALL_DIRS+=\"${_DIR}\\n\"\n      _FOUND=$((_FOUND+1))\n    done\n  fi\n\n  # _FOUND multiple packages? fail\n  if [ $_FOUND -gt 1 ]; then\n    echo \"Error - multiple package folders for package ${_PKG_ROOT_NAME}:\" >&2\n    echo -e \"$_ALL_DIRS\" >&2\n    die\n  fi\n\n  echo \"$_PKG_DIR\"\n}\n\n# Return a list of sorted package names for this project/device/arch\nget_all_package_names() {\n  sed -e 's#@?+?@##g; s#.*/##g' ${_CACHE_PACKAGE_GLOBAL} ${_CACHE_PACKAGE_LOCAL} ${_CACHE_PACKAGE_LOCAL_DEVICE} | sort --ignore-case --unique\n}\n\ncalculate_stamp() {\n  local stamp data\n\n  stamp=\"$PKG_DIR $PROJECT_DIR/$PROJECT/patches/$PKG_NAME $PROJECT_DIR/$PROJECT/packages/$PKG_NAME\"\n  [ -n \"$DEVICE\" ] && stamp+=\" $PROJECT_DIR/$PROJECT/devices/$DEVICE/patches/$PKG_NAME\"\n  [ -n \"$PKG_NEED_UNPACK\" ] && stamp+=\" $PKG_NEED_UNPACK\"\n\n  if [ -n \"$PKG_STAMP_VAR\" ]; then\n    local TMP_VAR=\"$(get_build_dir $PKG_NAME)/.pkg_stamp_var\"\n    echo \"$PKG_STAMP_VAR\" > $TMP_VAR\n    stamp+=\" $TMP_VAR\"\n  fi\n\n  data=\"$(find -L ${stamp} -type f -not -name '.*' 2>/dev/null | sed \"s|^${ROOT}/||\" | LC_ALL=C sort -u | xargs -d '\\n' sha256sum)\"\n  [ -n \"${PKG_STAMP}\" ] && data+=$'\\n'\"$(echo \"${PKG_STAMP}\" | sha256sum)\"\n\n  echo \"${data}\" | sha256sum | cut -d\" \" -f1\n}\n\ntarget_has_feature() {\n  listcontains \"$TARGET_FEATURES\" \"$1\"\n}\n\n# configure variables for go\ngo_configure() {\n  unset GOARCH GOARM\n  case ${TARGET_ARCH} in\n    x86_64)\n      export GOARCH=amd64\n      ;;\n    arm)\n      export GOARCH=arm\n\n      case ${TARGET_CPU} in\n        arm1176jzf-s)\n          export GOARM=6\n          ;;\n        *)\n          export GOARM=7\n          ;;\n      esac\n      ;;\n    aarch64)\n      export GOARCH=arm64\n      ;;\n  esac\n\n  export GOOS=linux\n  export GOROOT=${TOOLCHAIN}/lib/golang\n  export PATH=${PATH}:${GOROOT}/bin\n\n  go_configure_path\n\n  export CGO_ENABLED=1\n  export CGO_NO_EMULATION=1\n  export CGO_CFLAGS=$CFLAGS\n}\n\ngo_configure_path() {\n  export GOLANG=${TOOLCHAIN}/lib/golang/bin/go\n  export GOPATH=${PKG_BUILD}/.gopath\n  export GOFLAGS=\"-modcacherw\"\n}\n\n# find path for matching file or directory, searching standard directory hierarchy, using optional default\n# if a path is located it will be set in FOUND_PATH and exit code will be 0.\nfind_path() {\n  local test_func=\"$1\" search=\"$2\" default=\"$3\"\n  local dir match wildcard=0 ftype\n\n  # support wildcard matches\n  [[ $search =~ \\* || $search =~ \\? ]] && wildcard=1\n\n  [ \"$test_func\" = \"-f\" ] && ftype=\"file\" || ftype=\"dir\"\n\n  for dir in $PROJECT_DIR/$PROJECT/devices/$DEVICE/packages/$PKG_NAME \\\n             $PROJECT_DIR/$PROJECT/devices/$DEVICE \\\n             $PROJECT_DIR/$PROJECT/packages/$PKG_NAME \\\n             $PROJECT_DIR/$PROJECT \\\n             $DISTRO_DIR/$DISTRO/packages/$PKG_NAME \\\n             $DISTRO_DIR/$DISTRO \\\n             $PKG_DIR \\\n             ; do\n    # ignore directories with missing DEVICE or PKG_NAME components\n    [[ $dir =~ /packages/$ ]] && continue\n    [[ $dir =~ /devices/$ ]] && continue\n    [[ $dir =~ /devices//packages/$PKG_NAME$ ]] && continue\n\n    if [ $wildcard -eq 1 ]; then\n      ls $dir/$search 1>/dev/null 2>&1 && match=\"$dir/$search\" && break\n    else\n      [ $test_func \"$dir/$search\" ] && match=\"$dir/$search\" && break\n    fi\n  done\n\n  if [ -z \"$match\" -a -n \"$default\" ]; then\n    if [[ $default =~ \\* || $default =~ \\? ]]; then\n      ls $default 1>/dev/null 2>&1 && match=\"$default\"\n    else\n      [ $test_func \"$default\" ] && match=\"$default\"\n    fi\n  fi\n\n  if [ -n \"$match\" ]; then\n    FOUND_PATH=\"$match\"\n    [ \"${VERBOSE_FIND_PATH,,}\" = \"yes\" ] && echo \"find_path: Searching for $ftype: \\\"$search\\\", found: \\\"$FOUND_PATH\\\"\" >&2\n    return 0\n  else\n    unset FOUND_PATH\n    [ \"${VERBOSE_FIND_PATH,,}\" = \"yes\" ] && echo \"find_path: Searching for $ftype: \\\"$search\\\" - not found\" >&2\n    return 1\n  fi\n}\n\nfind_file_path() {\n  find_path -f \"$1\" \"$2\"\n}\n\nfind_dir_path() {\n  find_path -d \"$1\" \"$2\"\n}\n\n# p1: name of function to test for\n# return 0 if function exists, 1 if not\npkg_call_exists() {\n  PKG_CURRENT_CALL=\"${1}\"\n  if [ \"$(type -t ${1})\" = \"function\" ]; then\n    PKG_CURRENT_CALL_TYPE=\"package.mk\"\n    return 0\n  else\n    PKG_CURRENT_CALL_TYPE=\"default\"\n    return 1\n  fi\n}\n\n# Optional variant of pkg_call_exists()\n# Clear PKG_CURRENT_CALL when function is not implemented.\npkg_call_exists_opt() {\n  if pkg_call_exists $1; then\n    return 0\n  else\n    pkg_call_finish\n    return 1\n  fi\n}\n\n# Function to be called is set by pkg_call_exists/pkg_call_exists_opt\n# Args: whatever the called function expects\n# testing the exit code value of this function is likely to break set -e fail-on-error behaviour\npkg_call() {\n  [ -n \"${PKG_CURRENT_CALL}\" ] || die \"$(print_color CLR_ERROR \"PKG_CURRENT_CALL is not set!\")\"\n  [ -n \"${PKG_NAME}\" ] || die \"$(print_color CLR_ERROR \"FAILURE: Cannot call ${PKG_CURRENT_CALL} package function when package is not known!\")\"\n\n  ${PKG_CURRENT_CALL} \"${@}\"\n  pkg_call_finish\n}\n\npkg_call_finish() {\n  PKG_CURRENT_CALL=\"\"\n}\n\nunset_functions() {\n  local target\n\n  unset -f configure_package\n\n  unset -f pre_unpack unpack post_unpack\n  unset -f pre_patch post_patch\n\n  for target in target host init bootstrap; do\n    unset -f pre_build_${target}\n    unset -f pre_configure_${target} configure_${target} post_configure_${target}\n    unset -f pre_make_${target} make_${target} post_make_${target}\n    unset -f pre_makeinstall_${target} makeinstall_${target} post_makeinstall_${target}\n  done\n\n  unset -f pre_install post_install\n\n  unset -f addon post_install_addon\n}\n\n# p1: name of package to be sourced\nsource_package() {\n  local opwd=\"${PWD}\"\n\n  # Don't use BUILD_WITH_DEBUG in \"global\" package.mk - instead, call the function\n  # build_with_debug() directly as the function depends on various package.mk\n  # variables that will be in the process of being configured. Once package.mk is\n  # fully sourced we can set this variable and use it in situations where we know the\n  # package has already been sourced.\n  unset BUILD_WITH_DEBUG\n\n  reset_pkg_vars\n  unset_functions\n\n  if [ -n \"${1}\" ]; then\n    [ -f \"${1}\" ] && PKG_DIR=\"${1%/*}\" || PKG_DIR=\"$(get_pkg_directory \"${1}\")\"\n\n    [ -n \"$PKG_DIR\" -a -r $PKG_DIR/package.mk ] || die \"FAILURE: unable to source package - ${1}/package.mk does not exist\"\n\n    cd \"${ROOT}\"\n    . ${PKG_DIR}/package.mk || die \"FAILURE: an error occurred while sourcing ${PKG_DIR}/package.mk\"\n    cd \"${opwd}\"\n\n    PKG_SHORTDESC=\"${PKG_SHORTDESC:-${PKG_NAME} (autogenerated)}\"\n    PKG_LONGDESC=\"${PKG_LONGDESC:-${PKG_NAME} (autogenerated)}\"\n\n    if [ \"$PKG_IS_ADDON\" = \"yes\" -o \"$PKG_IS_ADDON\" = \"embedded\" ] ; then\n      [ -z $PKG_SECTION ] && PKG_ADDON_ID=\"$PKG_NAME\" || PKG_ADDON_ID=\"${PKG_SECTION//\\//.}.$PKG_NAME\"\n      [ \"$PKG_ADDON_IS_STANDALONE\" != \"yes\" ] && PKG_NEED_UNPACK=\"${PKG_NEED_UNPACK} $(get_pkg_directory $MEDIACENTER)\"\n    fi\n\n    if [ -n \"${PKG_IS_KERNEL_PKG}\" -a \"${PKG_NAME}\" != \"linux\" ]; then\n      PKG_DEPENDS_TARGET=\"toolchain linux ${PKG_DEPENDS_TARGET}\"\n      PKG_DEPENDS_UNPACK=\"linux ${PKG_DEPENDS_UNPACK}\"\n      PKG_NEED_UNPACK=\"${LINUX_DEPENDS} ${PKG_NEED_UNPACK}\"\n    fi\n\n    if [ -n \"${PKG_DEPENDS_UNPACK}\" ]; then\n      for _p in ${PKG_DEPENDS_UNPACK}; do\n        PKG_NEED_UNPACK+=\" $(get_pkg_directory ${_p})\"\n      done\n    fi\n\n    # Automatically set PKG_SOURCE_NAME unless it is already defined.\n    # PKG_SOURCE_NAME will be automatically set to a name based on\n    # the $PKG_NAME-$PKG_VERSION convention.\n    #\n    # Any $PKG_URL that references more than a single url will abort\n    # the build as these are no longer supported - use mkpkg instead.\n    if [ -n \"$PKG_URL\" -a -z \"$PKG_SOURCE_NAME\" ]; then\n      if [[ $PKG_URL =~ .*\\ .* ]]; then\n        echo \"Error - packages with multiple urls are no longer supported, use mkpkg.\"\n        echo \"$PKG_URL\"\n        die\n      fi\n      if [[ ${PKG_URL} =~ .git$ || ${PKG_URL} =~ ^git:// ]]; then\n        PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}\n      elif [[ ${PKG_URL} =~ ^file:// ]]; then\n        PKG_SOURCE_NAME=${PKG_URL#file://}\n        # if no specific PKG_TAR_COPY_OPTS then default to excluding .git and .svn as they can be huge\n        [ -z \"${PKG_TAR_COPY_OPTS+x}\" ] && PKG_TAR_COPY_OPTS=\"--exclude=.git --exclude=.svn\"\n      else\n        PKG_SOURCE_NAME=\"${PKG_URL##*/}\"\n        case $PKG_SOURCE_NAME in\n          ${PKG_NAME}-${PKG_VERSION}.*)\n            PKG_SOURCE_NAME=$PKG_SOURCE_NAME\n            ;;\n          *.tar | *.tbz | *.tgz | *.txz | *.tzst | *.7z | *.zip)\n            PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}.${PKG_SOURCE_NAME##*\\.}\n            ;;\n          *.tar.bz2 | *.tar.gz | *.tar.xz | *.tar.zst )\n            PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}.tar.${PKG_SOURCE_NAME##*\\.}\n            ;;\n          *.diff | *.patch | *.diff.bz2 | *.patch.bz2 | patch-*.bz2 | *.diff.gz | *.patch.gz | patch-*.gz)\n            PKG_SOURCE_NAME=$PKG_SOURCE_NAME\n            ;;\n          *)\n            PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}.${PKG_SOURCE_NAME##*\\.}\n            ;;\n        esac\n      fi\n    fi\n\n    PKG_BUILD=\"$BUILD/build/${PKG_NAME}-${PKG_VERSION}\"\n\n    if [[ \"${1}\" =~ :target$ || \"${1//:/}\" = \"${1}\" ]]; then\n      PKG_INSTALL=\"$BUILD/install_pkg/${PKG_NAME}-${PKG_VERSION}\"\n    elif [[ \"${1}\" =~ :init$ ]]; then\n      PKG_INSTALL=\"$BUILD/install_init/${PKG_NAME}-${PKG_VERSION}\"\n    fi\n\n    PKG_QA_CHECKS=\"${BUILD}/qa_checks/${PKG_NAME}-${PKG_VERSION}\"\n  fi\n\n  build_with_debug && BUILD_WITH_DEBUG=\"yes\" || BUILD_WITH_DEBUG=\"no\"\n\n  # Late variable binding - allow the package to now evaluate any variables\n  # that we may have initialised after sourcing the package, typically\n  # PKG_BUILD etc.\n  if [ -n \"${PKG_NAME}\" ]; then\n    if pkg_call_exists_opt configure_package; then\n      pkg_call\n    fi\n  fi\n}\n\n# arg1: file, or directory to recursively compile.\npython_compile() {\n  local path=\"${1:-${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}}\"\n  ${TOOLCHAIN}/bin/python3 -Wi -t -B ${TOOLCHAIN}/lib/${PKG_PYTHON_VERSION}/compileall.py -f -d \"${path#${INSTALL}}\" \"${path}\"\n  python_remove_source \"${path}\"\n}\n\n# arg1: file, or directory from which to recursively remove all py source code\npython_remove_source() {\n  local path=\"${1:-${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}}\"\n  if [ -d \"${path}\" ]; then\n    find \"${path}\" -type f -name '*.py' -delete\n  else\n    rm -f \"${path}\"\n  fi\n}\n\n# arg1: directory to process recursively\n# strip incorrect build-host ABI from native Python3 modules (see PEP3149)\npython_fix_abi() {\n  local pymodule pyname\n\n  for pymodule in $(find ${1} -type f -name '*.cpython-*.so' 2>/dev/null); do\n    pyname=${pymodule##*/}\n    pyname=${pyname%.so} # strip extension\n    pyname=${pyname%.*}  # strip incorrect ABI\n    echo \"python_fix_abi: Removing ABI from ${pymodule} -> ${pyname}.so\"\n    mv ${pymodule} ${pymodule%/*}/${pyname}.so\n  done\n}\n\n### KERNEL HELPERS ###\nkernel_path() {\n  get_build_dir linux\n}\n\nkernel_version() {\n  get_pkg_version linux\n}\n\nkernel_config_path() {\n  local cfg pkg_linux_dir pkg_linux_version config_name\n\n  pkg_linux_version=\"$(get_pkg_version linux)\"\n  pkg_linux_dir=\"$(get_pkg_directory linux)\"\n\n  config_name=\"linux.${TARGET_KERNEL_PATCH_ARCH:-$TARGET_ARCH}.conf\"\n\n  for cfg in $PROJECT_DIR/$PROJECT/devices/$DEVICE/linux/$pkg_linux_version/$config_name \\\n             $PROJECT_DIR/$PROJECT/devices/$DEVICE/linux/$LINUX/$config_name \\\n             $PROJECT_DIR/$PROJECT/devices/$DEVICE/linux/$config_name \\\n             $PROJECT_DIR/$PROJECT/linux/$pkg_linux_version/$config_name \\\n             $PROJECT_DIR/$PROJECT/linux/$LINUX/$config_name \\\n             $PROJECT_DIR/$PROJECT/linux/$config_name \\\n             $pkg_linux_dir/config/$pkg_linux_version/$config_name \\\n             $pkg_linux_dir/config/$LINUX/$config_name \\\n             $pkg_linux_dir/config/$config_name \\\n             ; do\n    [[ $cfg =~ /devices//linux/ ]] && continue\n    [ -f \"$cfg\" ] && echo \"$cfg\" && return\n  done\n\n  die \"ERROR: Unable to locate kernel config for ${LINUX} - looking for ${config_name}\"\n}\n\nkernel_initramfs_confs() {\n  local config_name cfg confs\n\n  config_name=\"initramfs.${TARGET_KERNEL_PATCH_ARCH:-$TARGET_ARCH}.conf\"\n  confs=\"$(get_pkg_directory initramfs)/config/initramfs.conf\"\n\n  for cfg in $PROJECT_DIR/$PROJECT/packages/initramfs/config/$config_name \\\n             $PROJECT_DIR/$PROJECT/devices/$DEVICE/packages/initramfs/config/$config_name \\\n             ; do\n    [[ $cfg =~ /devices//packages/ ]] && continue\n    [ -f \"$cfg\" ] && confs+=\" $cfg\"\n  done\n\n  echo \"$confs\"\n}\n\nkernel_make() {\n  (\n    setup_pkg_config_host\n\n    LDFLAGS=\"\" make CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n      ARCH=\"$TARGET_KERNEL_ARCH\" \\\n      HOSTCC=\"$TOOLCHAIN/bin/host-gcc\" \\\n      HOSTCXX=\"$TOOLCHAIN/bin/host-g++\" \\\n      HOSTCFLAGS=\"$HOST_CFLAGS\" \\\n      HOSTLDFLAGS=\"$HOST_LDFLAGS\" \\\n      HOSTCXXFLAGS=\"$HOST_CXXFLAGS\" \\\n      DEPMOD=\"$TOOLCHAIN/bin/depmod\" \\\n      \"$@\"\n  )\n}\n\n# get kernel module dir\nget_module_dir() {\n  if [ -n \"${_CACHED_KERNEL_MODULE_DIR}\" ]; then\n    echo \"${_CACHED_KERNEL_MODULE_DIR}\"\n  else\n    basename $(ls -d $(get_install_dir linux)/usr/lib/kernel-overlays/base/lib/modules/*)\n  fi\n}\n\n# get base path to kernel modules and firmware\nget_kernel_overlay_dir() {\n  echo \"usr/lib/kernel-overlays/${1:-base}\"\n}\n\n# get full path to kernel module dir\n# optional parameter specifies overlay level (default is base)\nget_full_module_dir() {\n  echo \"$(get_kernel_overlay_dir $1)/lib/modules/$(get_module_dir)\"\n}\n\n# get full path to firmware dir\n# optional parameter specifies overlay level (default is base)\nget_full_firmware_dir() {\n  echo \"$(get_kernel_overlay_dir $1)/lib/firmware\"\n}\n\n\n### ADDON HELPERS ###\ninstall_binary_addon() {\n  local addon_id=\"$1\" addon_so\n\n  mkdir -p $ADDON_BUILD/$addon_id/\n  cp -R $PKG_INSTALL/usr/share/$MEDIACENTER/addons/$addon_id/* $ADDON_BUILD/$addon_id/\n\n  addon_so=$(xmlstarlet sel -t -v \"/addon/extension/@library_linux\" $ADDON_BUILD/$addon_id/addon.xml || :)\n  if [ -n \"$addon_so\" ]; then\n    cp -L $PKG_INSTALL/usr/lib/$MEDIACENTER/addons/$addon_id/$addon_so $ADDON_BUILD/$addon_id/\n    chmod +x $ADDON_BUILD/$addon_id/$addon_so\n  fi\n\n  if [ -d $PKG_INSTALL/usr/lib/kernel-overlays/$addon_id ] ; then\n    mkdir -p $ADDON_BUILD/$addon_id/kernel-overlay\n    cp -PR $PKG_INSTALL/usr/lib/kernel-overlays/$addon_id/* $ADDON_BUILD/$addon_id/kernel-overlay\n  fi\n}\n\ninstall_addon_source() {\n  if [ -d $PKG_DIR/source ]; then\n    cp -R $PKG_DIR/source/* \"$1\"\n  fi\n}\n\ninstall_addon_images() {\n  local dest_dir=\"$1\"\n\n  if [ -f \"$PKG_DIR/icon/icon.png\" ]; then\n    mkdir -p \"$dest_dir/resources\"\n    cp \"$PKG_DIR/icon/icon.png\" \"$dest_dir/resources\"\n  fi\n\n  if [ -f \"$DISTRO_DIR/$DISTRO/addons/fanart.png\" ]; then\n    mkdir -p \"$dest_dir/resources\"\n    cp \"$DISTRO_DIR/$DISTRO/addons/fanart.png\" \"$dest_dir/resources\"\n  fi\n}\n\ncreate_addon_xml() {\n  local addon_xml addon_version addon_name provider_name requires requires_addonname requires_addonversion screenshots\n  local tmp_changelog\n\n  addon_xml=\"$1/addon.xml\"\n\n  IFS=\" \"\nfor i in $PKG_ADDON_REQUIRES; do\n  requires_addonname=`echo $i | cut -f1 -d \":\"`\n  requires_addonversion=`echo $i | cut -f2 -d \":\"`\n  requires=\"$requires\\n    <import addon=\\\"$requires_addonname\\\" version=\\\"$requires_addonversion\\\" />\"\ndone\n  unset IFS\n\n  if [ ! -f \"$addon_xml\" ] ; then\n    cp $ROOT/config/addon/${PKG_ADDON_TYPE}.xml \"$addon_xml\"\n    addon_version=${PKG_ADDON_VERSION:-${ADDON_VERSION}.${PKG_REV}}\n  else\n    if  ! command -v xmlstarlet >/dev/null ; then\n      die \"*** ERROR: $ADDON has addon.xml shipped, you need 'xmlstarlet' ***\" \"255\"\n    fi\n    addon_version=\"${PKG_ADDON_VERSION:-$(xmlstarlet sel -t -v \"/addon/@version\" \"$addon_xml\").$PKG_REV}\"\n    xmlstarlet ed --inplace -u \"/addon[@version]/@version\" -v \"$addon_version\" \"$addon_xml\"\n  fi\n\n  if [ -f $PKG_DIR/changelog.txt ]; then\n    tmp_changelog=\"$(mktemp)\"\n    cat ${PKG_DIR}/changelog.txt | xmlstarlet esc >\"${tmp_changelog}\"\n    sed -e \"/@PKG_ADDON_NEWS@/ \\\n         {\n           r ${tmp_changelog}\n           d\n         }\" -i \"$addon_xml\"\n    rm -f \"${tmp_changelog}\"\n  else\n    sed -e \"s|@PKG_ADDON_NEWS@||g\" -i \"$addon_xml\"\n  fi\n\n  provider_name=${PKG_MAINTAINER:-\"Team ${DISTRONAME}\"}\n  addon_name=${PKG_ADDON_NAME:-\"$PKG_NAME\"}\n\n  for f in $PKG_DIR/source/resources/screenshot-*.{jpg,png}; do\n    if [ -f \"$f\" ]; then\n      screenshots+=\"<screenshot>resources/${f##*/}</screenshot>\\n\"\n    fi\n  done\n\n  sed -e \"s|@PKG_ADDON_ID@|$PKG_ADDON_ID|g\" \\\n      -e \"s|@ADDON_NAME@|$addon_name|g\" \\\n      -e \"s|@ADDON_VERSION@|$addon_version|g\" \\\n      -e \"s|@REQUIRES@|$requires|g\" \\\n      -e \"s|@PKG_SHORTDESC@|$PKG_SHORTDESC|g\" \\\n      -e \"s|@OS_VERSION@|$OS_VERSION|g\" \\\n      -e \"s|@PKG_LONGDESC@|$PKG_LONGDESC|g\" \\\n      -e \"s|@PKG_DISCLAIMER@|$PKG_DISCLAIMER|g\" \\\n      -e \"s|@PROVIDER_NAME@|$provider_name|g\" \\\n      -e \"s|@PKG_ADDON_PROVIDES@|$PKG_ADDON_PROVIDES|g\" \\\n      -e \"s|@PKG_ADDON_SCREENSHOT@|$screenshots|g\" \\\n      -e \"s|@PKG_ADDON_BROKEN@|$PKG_ADDON_BROKEN|g\" \\\n      -i \"$addon_xml\"\n}\n\ninstall_addon_files() {\n  mkdir -p \"$1\"\n\n  install_addon_source \"$1\"\n  install_addon_images \"$1\"\n  create_addon_xml \"$1\"\n  python_fix_abi \"$1\"\n\n  if pkg_call_exists_opt post_install_addon; then\n    INSTALL=\"$1\" pkg_call\n  fi\n}\n\ninstall_driver_addon_files() {\n  if [ \"$#\" -eq 0 ] ; then\n    die \"$(print_color CLR_ERROR \"no module search path defined\")\"\n  fi\n\n  PKG_MODULE_DIR=\"$INSTALL/$(get_full_module_dir $PKG_ADDON_ID)/updates/$PKG_ADDON_ID\"\n  PKG_ADDON_DIR=\"$INSTALL/usr/share/$MEDIACENTER/addons/$PKG_ADDON_ID\"\n\n  mkdir -p $PKG_MODULE_DIR\n  find $@ -name \\*.ko -exec cp {} $PKG_MODULE_DIR \\;\n\n  find $PKG_MODULE_DIR -name \\*.ko -exec ${TARGET_KERNEL_PREFIX}strip --strip-debug {} \\;\n\n  mkdir -p $PKG_ADDON_DIR\n  cp $PKG_DIR/changelog.txt $PKG_ADDON_DIR\n  install_addon_files \"$PKG_ADDON_DIR\"\n}\n\n\n### TARGET CONFIGURATION HELPERS ###\nadd_user() {\n  # Usage: add_user \"username\" \"password\" \"userid\" \"groupid\" \"description\" \"home\" \"shell\"\n  mkdir -p ${INSTALL}/etc\n  touch ${INSTALL}/etc/passwd\n  if ! grep -q \"^$1:\" ${INSTALL}/etc/passwd; then\n    echo \"$1:x:$3:$4:$5:$6:$7\" >> ${INSTALL}/etc/passwd\n  fi\n\n  mkdir -p ${INSTALL}/usr/cache\n  touch ${INSTALL}/usr/cache/shadow\n  ln -sf /storage/.cache/shadow ${INSTALL}/etc/shadow 2>/dev/null || true\n\n  PASSWORD=\"$2\"\n  if [ \"$PASSWORD\" = \"x\" ]; then\n    PASSWORD=\"*\"\n  else\n    PASSWORD=$(openssl passwd -6 \"${PASSWORD}\")\n  fi\n  if ! grep -q \"^$1:\" ${INSTALL}/usr/cache/shadow; then\n    echo \"$1:$PASSWORD:::::::\" >> ${INSTALL}/usr/cache/shadow\n  fi\n}\n\nadd_group() {\n  # Usage: add_group \"groupname\" \"groupid\" (\"members\")\n  mkdir -p ${INSTALL}/etc\n  touch ${INSTALL}/etc/group\n  if [ -z \"`grep \"$1:\" ${INSTALL}/etc/group`\" ]; then\n    echo \"$1:x:$2:$3\" >> ${INSTALL}/etc/group\n  fi\n}\n\n# Usage: enable_service <unit> [target]\nenable_service() {\n  local unit=\"$1\"\n  local unit_dir=\"usr/lib/systemd/system\"\n  local target=\"$2\"\n  local target_dir=$INSTALL\n\n  [ -f \"$target_dir/$unit_dir/$unit\" ] || die \"ERROR: cannot enable non-existent service $target_dir/$unit_dir/$unit\"\n\n  if [ -z \"$target\" ] ; then\n    for target in `grep '^WantedBy' $target_dir/$unit_dir/$unit | cut -f2 -d=` ; do\n      if [ -n \"$target\" ]; then\n        mkdir -p ${target_dir}/$unit_dir/${target}.wants\n        ln -sf ../${unit} ${target_dir}/$unit_dir/${target}.wants/\n      fi\n    done\n  fi\n  for target in `grep '^Alias' $target_dir/$unit_dir/$unit | cut -f2 -d=` ; do\n    if [ -n \"$target\" ]; then\n      ln -sf ${unit} ${target_dir}/$unit_dir/${target}\n    fi\n  done\n}\n\n\n### MULTI-THREADED FUNCTION HELPERS ###\n# flocks: 94 (pkg_lock_status)\n#         95 (scripts/pkgbuild)\n#         96 (acquire_exclusive_lock)\n#         97 (acquire_update_lock)\n#         98 (pkg_lock)\n#         99 (scripts/get)\n\n# Test build type so that these functions are a no-op during non-multithreaded builds.\n\n# Prevent concurrent modifications to a package during certain activities.\n# With dynamic scheduling we now only need to acquire the lock\n# during unpack and reconf, all other activities do not need to acquire a\n# lock as there should be no concurrent access however the existing code path\n# potentially generates useful logging for minimal cost so keep it.\n#\n# If a package is already locked and the owner is ourselves\n# then assume we already have the required lock.\npkg_lock() {\n  is_sequential_build && return 0\n\n  local pkg=\"$1\" task=\"$2\" parent_pkg=\"$3\"\n  local this_job=\"${MTJOBID}\"\n  local lock_job lock_seq lock_task lock_pkg locked=no idwidth\n\n  if [ \"${task}\" = \"unpack\" -o \"${task}\" = \"reconf\" ]; then\n    exec 98>\"${THREAD_CONTROL}/locks/${pkg}.${task}\"\n    while [ : ]; do\n      read -r lock_job lock_seq lock_task lock_pkg <<<$(cat \"${THREAD_CONTROL}/locks/${pkg}.${task}.owner\" 2>/dev/null)\n      [ -n \"${lock_job}\" ] && break\n      flock --wait 1 --exclusive 98 && locked=yes && break\n    done\n\n    if [ \"${locked}\" = \"no\" -a \"${lock_job}/${lock_seq}\" != \"${this_job}/${PARALLEL_SEQ}\" ]; then\n      [ \"${THREADCOUNT}\" = \"0\" ] && idwidth=${#MTMAXJOBS} || idwidth=2\n      pkg_lock_status \"STALLED\" \"${parent_pkg}\" \"${task}\" \"$(printf \"waiting on [%0*d] %s %s\" ${idwidth} ${lock_job} \"${lock_task}\" \"${lock_pkg}\")\"\n      flock --exclusive 98\n    fi\n  fi\n\n  pkg_lock_status \"LOCKED\" \"${pkg}\" \"${task}\"\n}\n\n# Log additional information for a locked package.\npkg_lock_status() {\n  is_sequential_build && return 0\n\n  local status=\"$1\" pkg=\"$2\" task=\"$3\" msg=\"$4\"\n  local this_job=\"${MTJOBID}\" line idwidth\n\n  [ \"${THREADCOUNT}\" = \"0\" ] && idwidth=${#MTMAXJOBS} || idwidth=2\n\n  (\n    flock --exclusive 94\n\n    # Write the configured number of slots to history to improve accuracy of later analysis\n    if [ ! -f \"${THREAD_CONTROL}/history\" ]; then\n      printf \"%s: <%06d> [%0*d/%0*d] %-7s %-7s %s %s\\n\" \\\n        \"$(date +%Y-%m-%d\\ %H:%M:%S.%N)\" $$ ${idwidth} 0 ${#MTMAXJOBS} 0 \"IDLE\" \"config\" \"info\" \"slots=${MTMAXSLOT};jobs=${MTMAXJOBS}\" >>\"${THREAD_CONTROL}/history\"\n    fi\n\n    printf -v line \"%s: <%06d> [%0*d/%0*d] %-7s %-7s %-35s\" \\\n      \"$(date +%Y-%m-%d\\ %H:%M:%S.%N)\" $$ ${idwidth} ${this_job} ${#MTMAXJOBS} ${PARALLEL_SEQ:-0} \"${status}\" \"${task}\" \"${pkg}\"\n    [ -n \"${msg}\" ] && line+=\" (${msg})\"\n\n    echo \"${line}\" >>\"${THREAD_CONTROL}/history\"\n\n    if [ \"${DASHBOARD}\" != \"no\" ]; then\n      update_dashboard \"${status}\" \"${pkg}\" \"${task}\" \"${msg}\"\n    fi\n  ) 94>\"${THREAD_CONTROL}/locks/.history\"\n\n  if [ \"${status}\" = \"LOCKED\" ]; then\n    echo \"${this_job} ${PARALLEL_SEQ} ${task} ${pkg}\" >\"${THREAD_CONTROL}/locks/${pkg}.${task}.owner\"\n  elif [ \"${status}\" = \"UNLOCK\" ]; then\n    rm \"${THREAD_CONTROL}/locks/${pkg}.${task}.owner\"\n  fi\n\n  return 0\n}\n\nupdate_dashboard() {\n  is_sequential_build && return 0\n\n  local status=\"$1\" pkg=\"$2\" task=\"$3\" msg=\"$4\"\n  local line preamble num elapsed projdevarch\n  local boldred boldgreen boldyellow endcolor idwidth\n\n  [ \"${THREADCOUNT}\" = \"0\" ] && idwidth=${#MTMAXSLOT} || idwidth=2\n\n  if [ ! -s ${THREAD_CONTROL}/status ]; then\n    echo \"\" >\"${THREAD_CONTROL}/status\"\n    echo \"\" >>\"${THREAD_CONTROL}/status\"\n    for i in $(seq 1 $((MTMAXSLOT))); do\n      printf \"[%0*d/%0*d] %-7s\\n\" ${idwidth} ${i} ${#MTMAXJOBS} 0 \"IDLE\" >>\"${THREAD_CONTROL}/status\"\n    done\n  fi\n\n  num=$(< \"${THREAD_CONTROL}/progress.prev\")\n  projdevarch=\"${PROJECT}/\"\n  [ -n \"${DEVICE}\" ] && projdevarch+=\"${DEVICE}/\"\n  projdevarch+=\"${TARGET_ARCH}\"\n  [ -n \"${BUILD_SUFFIX}\" ] && projdevarch+=\", ${BUILD_SUFFIX}\"\n  TZ=UTC0 printf -v elapsed \"%(%H:%M:%S)T\" $(($(date +%s) - MTBUILDSTART))\n  printf -v preamble \"%s Dashboard (%s) - %d of %d jobs completed, %s elapsed\" \"${DISTRONAME}\" \"${projdevarch}\" $((num + 1)) ${MTMAXJOBS} \"${elapsed}\"\n  printf -v preamble \"%b%-105s %s\" \"\\e[2J\\e[0;0H\" \"${preamble}\" \"$(date \"+%Y-%m-%d %H:%M:%S\")\"\n\n  if [ \"${DISABLE_COLORS}\" != \"yes\" ]; then\n    boldred=\"\\e[1;31m\"\n    boldgreen=\"\\e[1;32m\"\n    boldyellow=\"\\e[1;33m\"\n    white=\"\\e[0;37m\"\n    endcolor=\"\\e[0m\"\n\n    case \"${status}\" in\n      IDLE)    color=\"${white}\";;\n      STALLED) color=\"${boldyellow}\";;\n      MUTEX/W) color=\"${boldyellow}\";;\n      FAILED ) color=\"${boldred}\";;\n      *)       color=\"${boldgreen}\";;\n    esac\n  fi\n\n  printf -v line \"[%0*d/%0*d] %b%-7s%b %-7s %-35s\" ${idwidth} ${MTJOBID} ${#MTMAXJOBS} ${PARALLEL_SEQ:-0} \"${color}\" \"${status}\" \"${endcolor}\" \"${task}\" \"${pkg}\"\n  [ -n \"${msg}\" ] && line+=\" ${msg}\"\n\n  sed -e \"1s@.*@${preamble}@;$((MTJOBID + 2))s@.*@${line}@\" -i \"${THREAD_CONTROL}/status\"\n}\n\n# Thread concurrency helpers to avoid concurrency issues with some code,\n# eg. when Python installs directly into $TOOLCHAIN.\nacquire_exclusive_lock() {\n  is_sequential_build && return 0\n\n  local pkg=\"$1\" task=\"$2\" lockfile=\"${3:-global}\"\n  local this_job=\"${MTJOBID}\"\n  local lock_job lock_seq lock_task lock_pkg locked=no idwidth\n\n  exec 96>\"${THREAD_CONTROL}/locks/.mutex.${lockfile}\"\n  while [ : ]; do\n    read -r lock_job lock_seq lock_task lock_pkg <<<$(cat \"${THREAD_CONTROL}/locks/.mutex.${lockfile}.owner\" 2>/dev/null)\n    [ -n \"${lock_job}\" ] && break\n    flock --wait 1 --exclusive 96 && locked=yes && break\n  done\n\n  if [ \"${locked}\" = \"no\" -a \"${lock_job}/${lock_seq}\" != \"${this_job}/${PARALLEL_SEQ}\" ]; then\n    [ \"${THREADCOUNT}\" = \"0\" ] && idwidth=${#MTMAXJOBS} || idwidth=2\n    pkg_lock_status \"MUTEX/W\" \"${pkg}\" \"${task}\" \"$(printf \"mutex: %s; waiting on [%0*d] %s %s\" \"${lockfile}\" ${idwidth} ${lock_job} \"${lock_task}\" \"${lock_pkg}\")\"\n    flock --exclusive 96\n  fi\n\n  pkg_lock_status \"MUTEX\" \"${pkg}\" \"${task}\" \"mutex: ${lockfile}\"\n\n  echo \"${this_job} ${PARALLEL_SEQ} ${task} ${pkg}\" >\"${THREAD_CONTROL}/locks/.mutex.${lockfile}.owner\"\n}\n\nrelease_exclusive_lock() {\n  is_sequential_build && return 0\n\n  local pkg=\"$1\" task=\"$2\" lockfile=\"${3:-global}\"\n\n  pkg_lock_status \"ACTIVE\" \"${pkg}\" \"${task}\"\n\n  rm \"${THREAD_CONTROL}/locks/.mutex.${lockfile}.owner\"\n  flock --unlock 96 2>/dev/null\n}\n\n# Execute single command using mutex\nexec_thread_safe() {\n  local result\n  acquire_exclusive_lock \"${PKG_NAME:exec}\" \"execcmd\"\n  $@\n  result=$?\n  release_exclusive_lock \"${PKG_NAME:exec}\" \"execcmd\"\n  return ${result}\n}\n\n# A lightweight target specific lock (eg. image, sysroot)\nacquire_update_lock() {\n  is_sequential_build && return 0\n\n  exec 97>\"${THREAD_CONTROL}/locks/.update.${1}\"\n  flock --exclusive 97\n}\n\nrelease_update_lock() {\n  is_sequential_build && return 0\n\n  flock --unlock 97 2>/dev/null\n}\n\n# Multilib support\nuse_32_options() {\n  LIB64_TARGET_NAME=\"${TARGET_NAME}\"\n  TARGET_NAME=\"${LIB32_TARGET_NAME}\"\n  TARGET_ARCH=\"arm\"\n  TARGET_SUBARCH=\"${LIB32_TARGET_SUBARCH}\"\n  LIB64_TARGET_PREFIX=\"${TARGET_PREFIX}\"\n  TARGET_PREFIX=\"${LIB32_TARGET_PREFIX}\"\n  TARGET_CFLAGS=\"${LIB32_TARGET_CFLAGS}\"\n  TARGET_CXXFLAGS=\"${LIB32_TARGET_CXXFLAGS}\"\n  TARGET_LDFLAGS=\"${LIB32_TARGET_LDFLAGS}\"\n  SYSROOT_PREFIX=\"${LIB32_SYSROOT_PREFIX}\"\n}\n\n# store current timestamp in TIMESTAMP_xxx variable (xxx set by arg)\n# timestamps are seconds.milliseconds since epoch\nrecord_timestamp() {\n  if [ -n \"${TRACE_BUILD_TIMING}\" ]; then\n    typeset -g \"TIMESTAMP_$1=$(date +%s.%3N)\"\n  fi\n}\n\n# args: text, start timestamp, end timestamp\nshow_timestamp_diff() {\n  if [ -n \"${TRACE_BUILD_TIMING}\" ]; then\n    local start=\"TIMESTAMP_$2\"\n    local end=\"TIMESTAMP_$3\"\n    local timediff=$(echo \"${!end}-${!start}\" | bc)\n    printf '%20s: %10.3f\\n' \"$1\" \"${timediff}\"\n  fi\n}\n\n# Use distribution functions if any\nif [ -f \"distributions/$DISTRO/config/functions\" ]; then\n  . distributions/$DISTRO/config/functions\nfi\n"
  },
  {
    "path": "config/graphic",
    "content": "[ -z \"${OPENGL}\" ] && OPENGL=\"no\"\n[ -z \"${OPENGLES}\" ] && OPENGLES=\"no\"\n[ -z \"${VULKAN}\" ] && VULKAN=\"no\"\n\nif [ \"${OPENGL}\" = \"no\" ]; then\n  OPENGL_SUPPORT=\"no\"\nelse\n  OPENGL_SUPPORT=\"yes\"\nfi\n\nif [ \"${OPENGLES}\" = \"no\" ]; then\n  OPENGLES_SUPPORT=\"no\"\nelse\n  OPENGLES_SUPPORT=\"yes\"\nfi\n\nif [ \"${VULKAN}\" = \"no\" ]; then\n  VULKAN_SUPPORT=\"no\"\nelse\n  VULKAN_SUPPORT=\"yes\"\nfi\n\nget_graphicdrivers() {\n\n  # set defaults\n  GALLIUM_DRIVERS=\"\"\n  XORG_DRIVERS=\"\"\n  VULKAN_DRIVERS_CONFIG=\"\"\n  VULKAN_DRIVERS_MESA=\"\"\n  LLVM_SUPPORT=\"no\"\n  COMPOSITE_SUPPORT=\"no\"\n  VDPAU_SUPPORT=\"no\"\n  VAAPI_SUPPORT=\"no\"\n  V4L2_SUPPORT=\"no\"\n\n  if [ \"${GRAPHIC_DRIVERS}\" = \"all\" ]; then\n    GRAPHIC_DRIVERS=\"crocus i915 iris r300 r600 radeonsi nvidia nvidia-legacy nvidia-ng vmware virtio vc4\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"crocus\"; then\n    GALLIUM_DRIVERS+=\" crocus\"\n    XORG_DRIVERS+=\" intel\"\n    COMPOSITE_SUPPORT=\"yes\"\n    VAAPI_SUPPORT=\"yes\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"etnaviv\"; then\n    GALLIUM_DRIVERS+=\" etnaviv kmsro\"\n    V4L2_SUPPORT=\"yes\"\n    VAAPI_SUPPORT=\"no\"\n    VDPAU_SUPPORT=\"no\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"freedreno\"; then\n    GALLIUM_DRIVERS+=\" freedreno\"\n    V4L2_SUPPORT=\"yes\"\n    VAAPI_SUPPORT=\"no\"\n    VDPAU_SUPPORT=\"no\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"i915\"; then\n    GALLIUM_DRIVERS+=\" i915\"\n    XORG_DRIVERS+=\" intel\"\n    COMPOSITE_SUPPORT=\"yes\"\n    VAAPI_SUPPORT=\"yes\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"iris\"; then\n    GALLIUM_DRIVERS+=\" iris\"\n    XORG_DRIVERS+=\" intel\"\n    VULKAN_DRIVERS_MESA+=\" intel\"\n    COMPOSITE_SUPPORT=\"yes\"\n    VAAPI_SUPPORT=\"yes\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"lima\"; then\n    GALLIUM_DRIVERS+=\" kmsro lima\"\n    V4L2_SUPPORT=\"yes\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"mali\"; then\n    V4L2_SUPPORT=\"yes\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"nvidia\"; then\n    XORG_DRIVERS+=\" nvidia\"\n    VULKAN_DRIVERS_CONFIG+=\" nvidia\"\n    VDPAU_SUPPORT=\"yes\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"nvidia-legacy\"; then\n    XORG_DRIVERS+=\" nvidia-legacy\"\n    VDPAU_SUPPORT=\"yes\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"nvidia-ng\"; then\n    VULKAN_DRIVERS_CONFIG+=\" nvidia-ng\"\n    VAAPI_SUPPORT=\"yes\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"panfrost\"; then\n    GALLIUM_DRIVERS+=\" kmsro panfrost\"\n    VULKAN_DRIVERS_MESA+=\" panfrost\"\n    V4L2_SUPPORT=\"yes\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"r300\"; then\n    GALLIUM_DRIVERS+=\" r300\"\n    XORG_DRIVERS+=\" ati\"\n    LLVM_SUPPORT=\"yes\"\n    COMPOSITE_SUPPORT=\"yes\"\n    VDPAU_SUPPORT=\"yes\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"r600\"; then\n    GALLIUM_DRIVERS+=\" r600\"\n    XORG_DRIVERS+=\" ati\"\n    LLVM_SUPPORT=\"yes\"\n    COMPOSITE_SUPPORT=\"yes\"\n    VDPAU_SUPPORT=\"yes\"\n    VAAPI_SUPPORT=\"yes\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"radeonsi\"; then\n    GALLIUM_DRIVERS+=\" radeonsi\"\n    XORG_DRIVERS+=\" ati amdgpu\"\n    VULKAN_DRIVERS_MESA+=\" amd\"\n    LLVM_SUPPORT=\"yes\"\n    COMPOSITE_SUPPORT=\"yes\"\n    VDPAU_SUPPORT=\"yes\"\n    VAAPI_SUPPORT=\"yes\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"vc4\"; then\n    GALLIUM_DRIVERS+=\" vc4 v3d kmsro\"\n    VULKAN_DRIVERS_MESA+=\" broadcom\"\n    V4L2_SUPPORT=\"yes\"\n    VAAPI_SUPPORT=\"no\"\n    VDPAU_SUPPORT=\"no\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"virtio\"; then\n    GALLIUM_DRIVERS+=\" virgl\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"vmware\"; then\n    GALLIUM_DRIVERS+=\" svga\"\n    XORG_DRIVERS+=\" vmware\"\n    COMPOSITE_SUPPORT=\"yes\"\n  fi\n\n  # VDPAU Support depends on X11\n  if [ ! \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    VDPAU_SUPPORT=\"no\"\n  fi\n\n  # remove duplicate entries\n  GALLIUM_DRIVERS=\"$(echo ${GALLIUM_DRIVERS} | xargs -n1 | sort -u | xargs)\"\n  GRAPHIC_DRIVERS=\"$(echo ${GRAPHIC_DRIVERS} | xargs -n1 | sort -u | xargs)\"\n  XORG_DRIVERS=\"$(echo ${XORG_DRIVERS} | xargs -n1 | sort -u | xargs)\"\n  VULKAN_DRIVERS_MESA=\"$(echo ${VULKAN_DRIVERS_MESA} | xargs -n1 | sort -u | xargs)\"\n  VULKAN_DRIVERS_CONFIG+=\" ${VULKAN_DRIVERS_MESA}\"\n  VULKAN_DRIVERS_CONFIG=\"$(echo ${VULKAN_DRIVERS_CONFIG} | xargs -n1 | sort -u | xargs)\"\n}\n"
  },
  {
    "path": "config/multithread",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nTHREADCOUNT=${THREADCOUNT:-$(nproc)}\n\nstart_multithread_build() {\n  local buildopts result=0\n\n  # init thread control folder\n  rm -rf \"${THREAD_CONTROL}\"\n  mkdir -p \"${THREAD_CONTROL}/locks\"\n  echo -1 >\"${THREAD_CONTROL}/progress.prev\"\n  echo 0 >\"${THREAD_CONTROL}/progress\"\n  touch \"${THREAD_CONTROL}/status\"\n\n  # Increase file descriptors if building one thread/package\n  [ \"${THREADCOUNT}\" = \"0\" ] && ulimit -n ${ULIMITN:-10240}\n\n  # create a single log file by default for a single threaded build (or the builder is a masochist)\n  if [ ${THREADCOUNT} -eq 1 -a \"${ONELOG,,}\" != \"no\" ] || [ \"${ONELOG,,}\" = \"yes\" ]; then\n    buildopts+=\" --no-log-burst\"\n  else\n    mkdir -p \"${THREAD_CONTROL}/logs\"\n    buildopts+=\" --log-burst\"\n  fi\n  buildopts+=\" --log-combine ${LOGCOMBINE:-always}\"\n\n  [ \"${AUTOREMOVE}\" = \"yes\" ] && buildopts+=\" --auto-remove\"\n\n  # When building addons, don't halt on error - keep building all packages/addons\n  [ \"${MTADDONBUILD}\" = \"yes\" ] && buildopts+=\" --continue-on-error\" || buildopts+=\" --halt-on-error\"\n\n  [ \"${MTPROGRESS}\" = \"yes\" ] && buildopts+=\" --progress\"\n  [ \"${MTVERBOSE}\" = \"yes\" ] && buildopts+=\" --verbose\"\n  [ \"${MTDEBUG}\" = \"yes\" ] && buildopts+=\" --debug\"\n  if [ \"${DISABLE_COLORS}\" = \"yes\" ]; then\n    buildopts+=\" --colors=never\"\n  else\n    buildopts+=\" --colors=${MTCOLORS:-auto}\"\n  fi\n  [ \"${MTBOOKENDS}\" = \"no\" ] && buildopts+=\" --without-bookends\" || buildopts+=\" --with-bookends\"\n  [ \"${MTIMMEDIATE}\" = \"no\" ] && buildopts+=\" --fail-after-active\" || buildopts+=\" --fail-immediately\"\n\n  buildopts+=\" --stats-interval ${MTINTERVAL:-60}\"\n\n  # pipefail: return value of a pipeline is the value of the last (rightmost) command to exit with a non-zero status\n  set -o pipefail\n\n  ${SCRIPTS}/pkgjson | ${SCRIPTS}/genbuildplan.py --show-wants --with-json \"${THREAD_CONTROL}\"/plan.json \\\n      --build ${@} > \"${THREAD_CONTROL}\"/plan || result=1\n\n  if [ ${result} -eq 0 ]; then\n    save_build_config\n\n    # export the following vars so that they will be available to subprocesses of pkgbuilder.py\n    export ROOT SCRIPTS THREAD_CONTROL\n\n    MTBUILDSTART=$(date +%s) MTWITHLOCKS=yes ${SCRIPTS}/pkgbuilder.py \\\n        --plan \"${THREAD_CONTROL}\"/plan.json \\\n        --joblog \"${THREAD_CONTROL}\"/joblog \\\n        --loadstats \"${THREAD_CONTROL}\"/loadstats \\\n        --max-procs ${THREADCOUNT} ${buildopts} || result=1\n\n    [ ${result} -eq 0 -a -f \"${THREAD_CONTROL}\"/history ] && echo && cat \"${THREAD_CONTROL}\"/history | ${ROOT}/tools/mtstats.py\n\n    rm -f \"${THREAD_CONTROL}/parallel.pid\"\n  fi\n\n  set +o pipefail\n\n  return ${result}\n}\n"
  },
  {
    "path": "config/noobs/os.json",
    "content": "{\n  \"name\": \"@DISTRONAME@_@PROJECT@\",\n  \"version\": \"@LIBREELEC_VERSION@\",\n  \"release_date\": \"@RELEASE_DATE@\",\n  \"kernel\": \"@KERNEL_VERSION@\",\n  \"description\": \"@DESCRIPTION@\",\n  \"username\": \"root\",\n  \"password\": \"@ROOT_PASSWORD@\",\n  \"supported_hex_revisions\": \"@NOOBS_HEX@\",\n  \"supported_models\": [@NOOBS_SUPPORTED_MODELS@]\n}\n"
  },
  {
    "path": "config/noobs/partition_setup.sh",
    "content": "#!/bin/sh -x\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nMOUNTPOINT=\"/tmp/LibreELEC-System\"\n\nmd5sumCheck() {\n  ( cd $MOUNTPOINT\n    echo \"checking MD5: $1\"\n    md5sum -c $1.md5\n    if [ \"$?\" = \"1\" ]; then\n      echo \"#######################################################\"\n      echo \"#                                                     #\"\n      echo \"# LibreELEC failed md5 check - Installation will quit #\"\n      echo \"#                                                     #\"\n      echo \"#    Your original download was probably corrupt.     #\"\n      echo \"#   Please visit libreelec.tv and get another copy    #\"\n      echo \"#                                                     #\"\n      echo \"#######################################################\"\n      exit 1\n    fi\n    rm -rf $1.md5\n  )\n}\n\nif [ -z $part1 -o -z $part2 -o -z $id1 -o -z $id2 ]; then\n  echo \"error: part1, part2, id1 or id2 not specified\"\n  echo \"actual values:\"\n  echo \"part1:\" $part1\n  echo \"part2:\" $part2\n  echo \"id1  :\" $id1\n  echo \"id2  :\" $id2\n  exit 1\nfi\n\n# create mountpoint\n  mkdir -p $MOUNTPOINT\n\n# mount needed partition\n  mount $part1 $MOUNTPOINT\n\n# check md5sum\n  md5sumCheck kernel.img\n  md5sumCheck SYSTEM\n\n# create bootloader configuration\n  echo \"creating bootloader configuration...\"\n  echo \"boot=$id1 disk=$id2 quiet @EXTRA_CMDLINE@\" > $MOUNTPOINT/cmdline.txt\n\n# cleanup mountpoint\n  umount $MOUNTPOINT\n  rmdir $MOUNTPOINT\n"
  },
  {
    "path": "config/noobs/partitions.json",
    "content": "{\n  \"partitions\": [\n    {\n      \"label\":                     \"System\",\n      \"filesystem_type\":           \"FAT\",\n      \"partition_size_nominal\":    @SYSTEM_SIZE@,\n      \"want_maximised\":            false,\n      \"uncompressed_tarball_size\": 120,\n      \"mkfs_options\":              \"\"\n    },\n    {\n      \"label\":                     \"Storage\",\n      \"filesystem_type\":           \"ext4\",\n      \"partition_size_nominal\":    512,\n      \"want_maximised\":            true,\n      \"uncompressed_tarball_size\": 10,\n      \"mkfs_options\":              \"\"\n    }\n  ]\n}\n"
  },
  {
    "path": "config/optimize",
    "content": "# Linker hash-style is set to gnu via gcc default\nLD_OPTIM=\"-Wl,--as-needed\"\n\nTARGET_CPPFLAGS=\"\"\nTARGET_CFLAGS=\"$TARGET_CFLAGS -Wall -pipe $PROJECT_CFLAGS\"\nTARGET_CXXFLAGS=\"$TARGET_CFLAGS\"\nTARGET_LDFLAGS=\"$TARGET_LDFLAGS $LD_OPTIM\"\nTARGET_LIBDIR=\"$SYSROOT_PREFIX/lib $SYSROOT_PREFIX/usr/lib\"\nTARGET_INCDIR=\"$SYSROOT_PREFIX/include $SYSROOT_PREFIX/usr/include\"\n\nHOST_CPPFLAGS=\"\"\nHOST_CFLAGS=\"-march=native -O2 -Wall -pipe -I$TOOLCHAIN/include\"\nHOST_CXXFLAGS=\"$HOST_CFLAGS\"\nHOST_LDFLAGS=\"-Wl,-rpath,$TOOLCHAIN/lib -L$TOOLCHAIN/lib\"\nHOST_INCDIR=\"$TOOLCHAIN/include /usr/include\"\n\n# work around Ubuntu default C*FLAGS \n# see https://wiki.ubuntu.com/ToolChain/CompilerFlags#A-Wformat_-Wformat-security\nHOST_CFLAGS=\"$HOST_CFLAGS -Wno-format-security\"\nHOST_CXXFLAGS=\"$HOST_CXXFLAGS -Wno-format-security\" \n\n# lto flags\nFLAGS_OPTIM_LTO_NO_PARALLEL=\"-flto\"\nFLAGS_OPTIM_LTO_PARALLEL=\"-flto=${CONCURRENCY_MAKE_LEVEL}\"\nFLAGS_OPTIM_LTO_NO_FAT=\"-fno-fat-lto-objects\"\nFLAGS_OPTIM_LTO_FAT=\"-ffat-lto-objects\"\nFLAGS_OPTIM_LTO_OFF=\"-fno-lto\"\nLDFLAGS_OPTIM_LTO_COMMON=\"-fuse-linker-plugin\"\n\n# linker specific flags\nLDFLAGS_OPTIM_LINKER_COMPILER_DEFAULT=\"\"\nLDFLAGS_OPTIM_LINKER_BFD=\"-fuse-ld=bfd\"\nLDFLAGS_OPTIM_LINKER_GOLD=\"-fuse-ld=gold\"\nLDFLAGS_OPTIM_LINKER_MOLD=\"-fuse-ld=mold\"\n\n# default compiler optimization\nCFLAGS_OPTIM_DEFAULT=\"-O2 -fomit-frame-pointer -DNDEBUG\"\nCXXFLAGS_OPTIM_DEFAULT=\"$CFLAGS_OPTIM_DEFAULT\"\n# speed flag\nCFLAGS_OPTIM_SPEED=\"-O3 -fomit-frame-pointer -DNDEBUG\"\nCXXFLAGS_OPTIM_SPEED=\"$CFLAGS_OPTIM_SPEED\"\n# size flag\nCFLAGS_OPTIM_SIZE=\"-Os -fomit-frame-pointer -DNDEBUG\"\nCXXFLAGS_OPTIM_SIZE=\"$CFLAGS_OPTIM_SIZE\"\n# debug settings\nCFLAGS_OPTIM_DEBUG=\"-ggdb -Og\"\nCXXFLAGS_OPTIM_DEBUG=\"$CFLAGS_OPTIM_DEBUG\"\nLDFLAGS_OPTIM_DEBUG=\"-ggdb\"\n# split debug settings (requires gold)\nCFLAGS_OPTIM_DEBUG_SPLIT=\"-gdwarf-4 -gsplit-dwarf -Og\"\nCXXFLAGS_OPTIM_DEBUG_SPLIT=\"$CFLAGS_OPTIM_DEBUG_SPLIT\"\nLDFLAGS_OPTIM_DEBUG_SPLIT=\"-gdwarf-4 -Wl,--gdb-index\"\n\n# position-independent code\nCFLAGS_OPTIM_PIC=\"-fPIC -DPIC\"\nCXXFLAGS_OPTIM_PIC=\"-fPIC -DPIC\"\nLDFLAGS_OPTIM_PIC=\"-fPIC\"\n\n# hardening support\n# TODO: basiclly copied from debian 9, should adjust for LE\nCFLAGS_OPTIM_HARDENING=\"-fstack-protector-strong -Wformat -Werror=format-security -fPIE\"\nCXXFLAGS_OPTIM_HARDENING=\"-fstack-protector-strong -Wformat -Werror=format-security -fPIE\"\nCPPFLAGS_OPTIM_HARDENING=\"-D_FORTIFY_SOURCE=2\"\nLDFLAGS_OPTIM_HARDENING=\"-Wl,-z,relro -Wl,-z,now\"\n\n# add distro specific library dirs\nif [ -z \"$HOST_LIBDIR\" ]; then\n  HOST_LIBDIR=\"$TOOLCHAIN/lib\"\n\n  # ubuntu/debian specific \"multiarch support\"\n  export MACHINE_HARDWARE_NAME=\"$(uname -m)\"\n  FAMILY_TRIPLET=$($LOCAL_CC -print-multiarch)\n  if [ -n \"$FAMILY_TRIPLET\" ]; then\n    if [ -d /lib/$FAMILY_TRIPLET ]; then\n      HOST_LIBDIR=\"$HOST_LIBDIR /lib/$FAMILY_TRIPLET\"\n    fi\n    if [ -d /usr/lib/$FAMILY_TRIPLET ]; then\n      HOST_LIBDIR=\"$HOST_LIBDIR /usr/lib/$FAMILY_TRIPLET\"\n    fi\n  fi\n\n  # default multiarch support\n  case \"${MACHINE_HARDWARE_NAME}\" in\n    i*86)\n      if [ -d /lib32 ]; then\n        HOST_LIBDIR=\"$HOST_LIBDIR /lib32\"\n      fi\n      if [ -d /usr/lib32 ]; then\n        HOST_LIBDIR=\"$HOST_LIBDIR /usr/lib32\"\n      fi\n    ;;\n    x86_64)\n      if [ -d /lib64 ]; then\n        HOST_LIBDIR=\"$HOST_LIBDIR /lib64\"\n      fi\n      if [ -d /usr/lib64 ]; then\n        HOST_LIBDIR=\"$HOST_LIBDIR /usr/lib64\"\n      fi\n    ;;\n  esac\n\n  # default dirs\n  export HOST_LIBDIR=\"$HOST_LIBDIR /lib /usr/lib\"\nfi\n"
  },
  {
    "path": "config/options",
    "content": "# Do not build as root. Ever.\nif [[ \"${EUID}\" -eq 0 ]]; then\n  echo \"Building as the root user is NOT supported. Use a regular user account for the build.\" 1>&2\n  exit 1\nfi\n\n# Spaces in paths are verboten\nif [[ ${PWD} =~ [[:space:]] ]]; then\n  echo \"Current PWD: \\\"${PWD}\\\"\" 1>&2\n  echo 1>&2\n  echo \"Building in a folder that includes spaces is NOT supported. Use a folder without spaces.\" 1>&2\n  exit 1\nfi\n\n# set default language for buildsystem\nexport LC_ALL=C\n\n# set default independent variables\nROOT=\"${PWD}\"\nDISTRO_DIR=\"${ROOT}/distributions\"\nPROJECT_DIR=\"${ROOT}/projects\"\n\n# determines DISTRO, if not forced by user\nDISTRO=\"${DISTRO:-EmuELEC}\"\n\n# determines PROJECT, if not forced by user\nexport PROJECT=\"${PROJECT:-Amlogic-ce}\"\n\n# determines DEVICE, if not forced by user\nexport DEVICE=\"${DEVICE:-Amlogic-ng}\"\n\n# default to Generic device if building Generic project without device set\nif [ \"${PROJECT}\" = \"Generic\" -a -z \"${DEVICE}\" ]; then\n  export DEVICE=\"Generic\"\nfi\n\n# determines TARGET_ARCH, if not forced by user\nexport ARCH=\"${ARCH:-aarch64}\"\nTARGET_ARCH=\"${ARCH}\"\n\n# include arm-mem package on arm\nif [ \"${TARGET_ARCH}\" = \"arm\" ]; then\n  ARM_MEM_SUPPORT=\"yes\"\nelse\n  ARM_MEM_SUPPORT=\"no\"\nfi\n\n# include helper functions\n. config/functions\n\n# read DISTRO version information\n. \"${DISTRO_DIR}/${DISTRO}/version\" || die \"\\nERROR: No distro version present\\n\"\n\n# read DISTRO options\nif [ -f \"${DISTRO_DIR}/${DISTRO}/options\" ]; then\n  . \"${DISTRO_DIR}/${DISTRO}/options\"\nfi\n\n# read PROJECT options\nif [ -f \"${PROJECT_DIR}/${PROJECT}/options\" ]; then\n  . \"${PROJECT_DIR}/${PROJECT}/options\"\nfi\n\n# read DEVICE options\nif [ -f \"${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/options\" ]; then\n  . \"${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/options\"\nfi\n\n# read architecture defaults\nif [ -f \"config/arch.${TARGET_ARCH}\" ]; then\n  . \"config/arch.${TARGET_ARCH}\"\nfi\n\n# projects can set KERNEL_NAME (kernel.img)\nKERNEL_NAME=\"${KERNEL_NAME:-KERNEL}\"\n\nLINUX_DEPENDS=\"${PROJECT_DIR}/${PROJECT}/linux ${PROJECT_DIR}/${PROJECT}/patches/linux ${PROJECT_DIR}/${PROJECT}/packages/linux ${ROOT}/packages/linux\"\n[ -n \"${DEVICE}\" ] && LINUX_DEPENDS+=\" ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/linux ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/patches/linux ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/packages/linux\"\n\n# Need to point to your actual cc\n# If you have ccache installed, take care that LOCAL_CC does not point to it\n[ -z \"${LOCAL_CC}\" ] && export LOCAL_CC=\"$(command -v gcc)\"\n\nif [ -z \"${LOCAL_CC}\" ]; then\n  die \"***** Please install gcc - run scripts/checkdeps *****\" \"127\"\nfi\n\n# Need to point to your actual g++\n# If you have ccache installed, take care that LOCAL_CXX does not point to it\n[ -z \"${LOCAL_CXX}\" ] && export LOCAL_CXX=\"$(command -v g++)\"\n\n# verbose compilation mode (yes/no)\nVERBOSE=\"${VERBOSE:-yes}\"\n\n# Concurrency make level (-j option)\n#  Try values between 1 and number of processor cores present.\n#  default: use all cores\n[ -z \"${CONCURRENCY_MAKE_LEVEL}\" ] && export CONCURRENCY_MAKE_LEVEL=$(nproc)\n[ -z \"${CONCURRENCY_LOAD}\" ] && export CONCURRENCY_LOAD=$(python3 -c \"import os; print(f'{os.cpu_count() * 1.5:.2f}')\")\n\n# cache size for ccache\n# Set the maximum size of the files stored in the cache. You can specify a\n# value in gigabytes, megabytes or kilobytes by appending a G, M or K to the\n# value. The default is gigabytes. The actual value stored is rounded down to\n# the nearest multiple of 16 kilobytes.  Keep in mind this per project .ccache\n# directory.\nCCACHE_CACHE_SIZE=\"20G\"\n\n# compression level for ccache\n# This option determines the level at which ccache will compress object files\n# using the real-time compression algorithm Zstandard. It only has effect if\n# compression is enabled (which it is by default). Zstandard is extremely fast\n# for decompression and very fast for compression for lower compression\n# levels. The default is 0. The value 0 means that ccache will choose a\n# suitable zstd level, currently 1.\nCCACHE_COMPRESSLEVEL=\"0\"\n\n# set addon paths\nif [ -z \"$ADDON_PATH\" ]; then\n  if [ -n \"$ADDON_PROJECT\" ]; then\n    ADDON_PATH=\"$ADDON_VERSION/$ADDON_PROJECT/$TARGET_ARCH\"\n  else\n    ADDON_PATH=\"$ADDON_VERSION/$TARGET_ARCH\"\n  fi\nfi\nif [ -z \"$ADDON_URL\" ]; then\n  ADDON_URL=\"$ADDON_SERVER_URL/$ADDON_PATH\"\nfi\n\n# read local persistent options from $ROOT if available\nif [ -f \"${ROOT}/.coreelec/options\" ]; then\n  . \"${ROOT}/.coreelec/options\"\nfi\n\n# read global persistent options from $HOME if available\nif [ -f \"${HOME}/.coreelec/options\" ]; then\n  . \"${HOME}/.coreelec/options\"\nfi\n\nif [ \"${LOCAL_CCACHE_SUPPORT}\" = \"yes\" ] && [ -z \"${CCACHE_DISABLE}\" ]; then\n  # like LOCAL_CC check for local ccache only on the very first\n  # call to config/options, before toolchain has been added to the path,\n  # otherwise we might pick up ccache from toolchain/bin here\n  if [ -z \"${LOCAL_CCACHE}\" ] && [ \"${LOCAL_CCACHE_CHECKED}\" != \"yes\" ]; then\n    export LOCAL_CCACHE=\"$(command -v ccache)\"\n    export LOCAL_CCACHE_CHECKED=\"yes\"\n  fi\nelse\n  export LOCAL_CCACHE=\"\"\nfi\n\n# overwrite OEM_SUPPORT via commandline\nif [ \"${OEM}\" = \"yes\" -o \"${OEM}\" = \"no\" ]; then\n  OEM_SUPPORT=\"${OEM}\"\nfi\n\ncheck_config\n\n. config/graphic\n. config/path $1\n\n# Multilib Magics\nif [ \"$ARCH\" = \"aarch64\" ]; then\n  . config/options32\nfi\n\n## package processing\n\n# If the package caches are unset, then populate them\ninit_package_cache\n\nif [ -z \"${DEFAULT_PYTHON_VERSION+set}\" ]; then\n  export DEFAULT_PYTHON_VERSION=\"$(get_pkg_variable Python3 PKG_PYTHON_VERSION)\"\nfi\n\n# set package metadata\nsource_package \"${1}\"\n"
  },
  {
    "path": "config/options32",
    "content": "# This command requires BASH >= v4.0, since we're using Ubuntu 20 as a baseline, this should not be a problem\n# This reads those options into an array, one element per line, and keep empty line as is, also removing trailing \\n\nreadarray -t OPTIONS32 < <(\n  ARCH=arm\n  TARGET_ARCH=arm\n  # read DEVICE options\n  if [ -f \"${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/options\" ]; then\n    . \"${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/options\"\n  fi\n  # read architecture defaults\n  if [ -f \"config/arch.${TARGET_ARCH}\" ]; then\n    . \"config/arch.${TARGET_ARCH}\"\n  fi\n  echo $TARGET_ABI\n  echo $TARGET_GCC_ARCH\n  echo $TARGET_CFLAGS\n  echo $TARGET_LDFLAGS\n  echo $TARGET_ARCH_GCC_OPTS\n  echo $TARGET_CPU\n  echo $TARGET_FPU\n  echo $TARGET_SUBARCH\n)\n\nLIB32_TARGET_ABI=\"${OPTIONS32[0]}\"\nLIB32_TARGET_GCC_ARCH=\"${OPTIONS32[1]}\"\nLIB32_TARGET_CFLAGS=\"${OPTIONS32[2]}\"\nLIB32_TARGET_LDFLAGS=\"${OPTIONS32[3]}\"\nLIB32_TARGET_ARCH_GCC_OPTS=\"${OPTIONS32[4]}\"\nLIB32_TARGET_CPU=\"${OPTIONS32[5]}\"\nLIB32_TARGET_FPU=\"${OPTIONS32[6]}\"\nLIB32_TARGET_SUBARCH=\"${OPTIONS32[7]}\"\nLIB32_TARGET_NAME=\"${LIB32_TARGET_GCC_ARCH}-emuelec-linux-gnu${LIB32_TARGET_ABI}\"\nLIB32_SYSROOT_PREFIX=\"${TOOLCHAIN}/${LIB32_TARGET_NAME}/sysroot\"\nLIB32_TARGET_PREFIX=\"$TOOLCHAIN/bin/$LIB32_TARGET_NAME-\"\n\nLIB32_TARGET_CFLAGS=\"$LIB32_TARGET_CFLAGS -Wall -pipe $PROJECT_CFLAGS\"\nLIB32_TARGET_CXXFLAGS=\"$LIB32_TARGET_CFLAGS\"\nLIB32_TARGET_LDFLAGS=\"$LIB32_TARGET_LDFLAGS $LD_OPTIM\"\n\nunset OPTIONS32\n"
  },
  {
    "path": "config/path",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nset -e\n\n# setup initial directorys (relative to root)\n  CONFIG=config\n  SCRIPTS=scripts\n  PACKAGES=packages\n  SOURCES=${SOURCES_DIR:-$ROOT/sources}\n  BUILD_ROOT=${BUILD_DIR:-$ROOT}\n  BUILD_BASE=build\n  TARGET_IMG=${TARGET_DIR:-$ROOT/target}\n  ADDONS=addons\n\n[ -z \"${HOST_NAME}\" ] && export HOST_NAME=\"$($LOCAL_CC -dumpmachine)\"\nTARGET_NAME=$TARGET_GCC_ARCH-libreelec-linux-gnu${TARGET_ABI}\n\nBUILD=${BUILD_ROOT}/${BUILD_BASE}.${DISTRONAME}-${DEVICE:-$PROJECT}.${TARGET_ARCH}-${OS_MAJOR}\n\nif [ -n \"$BUILD_SUFFIX\" ]; then\n  BUILD=$BUILD-$BUILD_SUFFIX\nfi\n\nTHREAD_CONTROL=${BUILD}/.threads\n\nTARGET_ADDONS=\"$TARGET_IMG/$ADDONS/$ADDON_PATH\"\nADDON_BUILD=\"$BUILD/$ADDONS/$1\"\nSTAMPS=$BUILD/.stamps\nSTAMPS_INSTALL=$BUILD/image/.stamps\nDOCS=DOCS\nTOOLCHAIN=$BUILD/toolchain\nSYSROOT_PREFIX=$TOOLCHAIN/$TARGET_NAME/sysroot\nLIB_PREFIX=$SYSROOT_PREFIX/usr\nTARGET_PREFIX=$TOOLCHAIN/bin/$TARGET_NAME-\n\nFAKEROOT_SCRIPT=$BUILD/.fakeroot\n\nif [ -z \"$INSTALL\" ]; then\n  INSTALL=$BUILD/image/system\nfi\n\n. config/sources\n\nMAKE=\"$TOOLCHAIN/bin/make\"\n\nXORG_PATH_DRI=/usr/lib/dri\nXORG_PATH_XKB=/usr/share/X11/xkb\nXORG_PATH_XKB_OUTPUT=/var/lib/xkb\nXORG_PATH_RGB=/usr/lib/X11/rgb\nXORG_PATH_MODULES=/usr/lib/xorg/modules\nXORG_PATH_DRIVERS=/usr/lib/xorg/modules/drivers\n\n. config/optimize\n\n# use different toolchain for 64/32 split builds\nif [ -z \"$KERNEL_TOOLCHAIN\" -a \"$TARGET_KERNEL_ARCH\" = \"arm64\" -a \"$TARGET_ARCH\" = \"arm\" ]; then\n  KERNEL_TOOLCHAIN=\"aarch64\"\nfi\nif [ -n \"$KERNEL_TOOLCHAIN\" ]; then\n  TARGET_KERNEL_PREFIX=$KERNEL_TOOLCHAIN-none-elf-\nelse\n  TARGET_KERNEL_PREFIX=$TARGET_PREFIX\nfi\n\nif [ -z \"$CCACHE_DIR\" ]; then\n  export CCACHE_DIR=$BUILD/.ccache\nfi\n\n# keep a copy of ccache dir used for toolchain ccache\nexport BUILD_CCACHE_DIR=\"${CCACHE_DIR}\"\n\n# local ccache dir in case we build early packages with local ccache\nif [ -z \"${LOCAL_CCACHE_DIR}\" ]; then\n  export LOCAL_CCACHE_DIR=\"${BUILD}/.ccache-local\"\nfi\n\nif [[ -z \"$PATH\" || ( \"$PATH\" != \"$TOOLCHAIN/bin:$TOOLCHAIN/sbin\" && \"$PATH\" = \"${PATH#$TOOLCHAIN/bin:$TOOLCHAIN/sbin:}\" ) ]]; then\n  export PATH=\"$TOOLCHAIN/bin:$TOOLCHAIN/sbin${PATH:+\":$PATH\"}\"\nfi\n\n# redirect formatted output\nexport BUILD_INDENT_SIZE=4\nSILENT_OUT=3\nVERBOSE_OUT=4\n\nif [ \"$VERBOSE\" = yes ]; then\n  exec 3>&1\n  exec 4>&1\nelse\n  exec 3>&2\n  exec 4>/dev/null\nfi\n\nunset LD_LIBRARY_PATH\n\n# multilib? nah\nunset CONFIG_SITE\n\n# Ignore custom python installs...\nunset PYTHONHOME PYTHONPATH PYTHONSTARTUP\nexport PYTHONNOUSERSITE=yes #disable PEP 370\n\n# Fix #4737\nunset PYTHONDONTWRITEBYTECODE\n"
  },
  {
    "path": "config/show_config",
    "content": "#!/bin/bash\n\nshow_config() {\n  # load graphic configuration\n  get_graphicdrivers\n\n  dashes=\"===========================\"\n  config_message=\"\\n ${dashes}${dashes}${dashes}\"\n  config_message+=\"\\n Configuration for ${DISTRONAME} \"\n  if [ \"${OFFICIAL}\" = \"yes\" ]; then\n    config_message+=\"(official)\"\n  else\n    config_message+=\"(community)\"\n  fi\n  config_message+=\"\\n ${dashes}${dashes}${dashes}\"\n\n  # Build options\n\n  config_message+=\"\\n\\n Buildsystem configuration:\"\n  config_message+=\"\\n ${dashes}${dashes}\"\n\n  config_message+=\"\\n - CPU:\\t\\t\\t\\t\\t ${TARGET_CPU}\"\n  config_message+=\"\\n - Kernel Architecture:\\t\\t\\t ${TARGET_KERNEL_ARCH}\"\n  config_message+=\"\\n - Userland Architecture:\\t\\t ${TARGET_ARCH}\"\n  if [ -n \"${TARGET_FLOAT}\" ]; then\n    config_message+=\"\\n - FLOAT:\\t\\t\\t\\t ${TARGET_FLOAT}\"\n  fi\n  if [ -n \"${TARGET_FPU}\" ]; then\n    config_message+=\"\\n - FPU:\\t\\t\\t\\t\\t ${TARGET_FPU}\"\n  fi\n  config_message+=\"\\n - CPU features:\\t\\t\\t ${TARGET_FEATURES}\"\n  config_message+=\"\\n - LTO (Link Time Optimization) support: ${LTO_SUPPORT}\"\n  config_message+=\"\\n - GOLD (Google Linker) Support:\\t ${GOLD_SUPPORT}\"\n  config_message+=\"\\n - MOLD (Modern Linker) Support:\\t ${MOLD_SUPPORT}\"\n  config_message+=\"\\n - Default Linker:\\t\\t\\t ${DEFAULT_LINKER}\"\n  config_message+=\"\\n - LLVM support:\\t\\t\\t ${LLVM_SUPPORT}\"\n  config_message+=\"\\n - DEBUG:\\t\\t\\t\\t ${DEBUG:-no}\"\n  config_message+=\"\\n - CFLAGS:\\t\\t\\t\\t ${TARGET_CFLAGS}\"\n  config_message+=\"\\n - LDFLAGS:\\t\\t\\t\\t $(sed 's/^ *//' <<< ${TARGET_LDFLAGS})\"\n  config_message+=\"\\n - Local Ccache:\\t\\t\\t ${LOCAL_CCACHE:-no}\"\n\n  # Misc. hardware configuration\n\n  config_message+=\"\\n\\n Misc. hardware configuration:\"\n  config_message+=\"\\n ${dashes}${dashes}\"\n\n  config_message+=\"\\n - ALSA support:\\t\\t\\t ${ALSA_SUPPORT}\"\n  config_message+=\"\\n - Pulseaudio support:\\t\\t\\t ${PULSEAUDIO_SUPPORT}\"\n  config_message+=\"\\n - Bluetooth support:\\t\\t\\t ${BLUETOOTH_SUPPORT}\"\n\n  for config_driver in ${ADDITIONAL_DRIVERS}; do\n    config_message+=\"\\n - Include driver:\\t\\t\\t ${config_driver}\"\n  done\n\n  if [ \"${DRIVER_ADDONS_SUPPORT}\" = \"yes\" ]; then\n    for config_driver_addons in ${DRIVER_ADDONS}; do\n      config_message+=\"\\n - Include driver add-ons:\\t\\t ${config_driver_addons}\"\n    done\n  fi\n\n  for config_firmware in ${FIRMWARE}; do\n    config_message+=\"\\n - Include firmware:\\t\\t\\t ${config_firmware}\"\n  done\n\n  # Misc. Filesystems\n\n  config_message+=\"\\n\\n Misc. Filesystems:\"\n  config_message+=\"\\n ${dashes}${dashes}\"\n\n  config_message+=\"\\n - Swap Support:\\t\\t\\t ${SWAP_SUPPORT}\"\n  if [ \"${SWAP_SUPPORT}\" = \"yes\" ]; then\n    config_message+=\"\\n   - Swapfile default size:\\t\\t ${SWAPFILESIZE}\"\n  fi\n  config_message+=\"\\n - exFAT Support (via Fuse):\\t\\t ${EXFAT}\"\n  config_message+=\"\\n - NTFS Support (via Fuse):\\t\\t ${NTFS3G}\"\n  config_message+=\"\\n - Install HFS Tools:\\t\\t\\t ${HFSTOOLS}\"\n\n  # Network service configuration\n\n  config_message+=\"\\n\\n Network service configuration:\"\n  config_message+=\"\\n ${dashes}${dashes}\"\n\n  config_message+=\"\\n - Avahi (Zeroconf) support:\\t\\t ${AVAHI_DAEMON}\"\n  config_message+=\"\\n - NFS mounting support:\\t\\t ${NFS_SUPPORT}\"\n  config_message+=\"\\n - SAMBA mounting support:\\t\\t ${SAMBA_SUPPORT}\"\n  config_message+=\"\\n - SAMBA server support:\\t\\t ${SAMBA_SERVER}\"\n  config_message+=\"\\n - SFTP server support:\\t\\t\\t ${SFTP_SERVER}\"\n  config_message+=\"\\n - OpenVPN support:\\t\\t\\t ${OPENVPN_SUPPORT}\"\n  config_message+=\"\\n - WireGuard support:\\t\\t\\t ${WIREGUARD_SUPPORT}\"\n\n  # Graphic configuration\n\n  config_message+=\"\\n\\n Graphic configuration:\"\n  config_message+=\"\\n ${dashes}${dashes}\"\n  config_message+=\"\\n - Graphic Drivers:\\t\\t\\t ${GRAPHIC_DRIVERS}\"\n  config_message+=\"\\n - Display Server:\\t\\t\\t ${DISPLAYSERVER}\"\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ] ; then\n    for drv in ${XORG_DRIVERS}; do\n      XORG_DRIVERS_CONFIG+=\"xf86-video-${drv} \"\n    done\n    config_message+=\"\\n - X.Org Graphic Drivers:\\t\\t ${XORG_DRIVERS_CONFIG}\"\n    config_message+=\"\\n - X.Org Composite support:\\t\\t ${COMPOSITE_SUPPORT}\"\n  fi\n  config_message+=\"\\n - Window Manager / Compositor:\\t\\t ${WINDOWMANAGER}\"\n  config_message+=\"\\n - OpenGL (GLX) support (provider):\\t ${OPENGL_SUPPORT}\"\n    [ \"${OPENGL}\" != \"no\" ] && config_message+=\" (${OPENGL})\"\n  config_message+=\"\\n - OpenGL ES support (provider):\\t ${OPENGLES_SUPPORT}\"\n    [ \"${OPENGLES}\" != \"no\" ] && config_message+=\" (${OPENGLES})\"\n  config_message+=\"\\n - Vulkan API support (provider):\\t ${VULKAN_SUPPORT}\"\n    [ \"${VULKAN}\" != \"no\" ] && config_message+=\" (${VULKAN})\"\n  if [ \"${VULKAN_SUPPORT}\" = \"yes\" ]; then\n    config_message+=\"\\n - Vulkan Graphic Drivers:\\t\\t ${VULKAN_DRIVERS_CONFIG}\"\n  fi\n\n  # Video Acceleration configuration\n\n  config_message+=\"\\n\\n Video Acceleration configuration:\"\n  config_message+=\"\\n ${dashes}${dashes}\"\n  config_message+=\"\\n - VA-API Support:\\t\\t\\t ${VAAPI_SUPPORT}\"\n  config_message+=\"\\n - VDPAU Support:\\t\\t\\t ${VDPAU_SUPPORT}\"\n\n  # OS configuration\n\n  config_message+=\"\\n\\n OS configuration:\"\n  config_message+=\"\\n ${dashes}${dashes}\"\n\n  config_message+=\"\\n - OEM Support:\\t\\t\\t\\t ${OEM_SUPPORT}\"\n  config_message+=\"\\n - Default ROOT Password:\\t\\t ${ROOT_PASSWORD}\"\n  config_message+=\"\\n - Bootloader:\\t\\t\\t\\t ${BOOTLOADER}\"\n  config_message+=\"\\n - UDevil support:\\t\\t\\t ${UDEVIL}\"\n  config_message+=\"\\n - Installer support:\\t\\t\\t ${INSTALLER_SUPPORT}\"\n  for config_package in ${ADDITIONAL_PACKAGES}; do\n    config_message+=\"\\n - Include package:\\t\\t\\t ${config_package}\"\n  done\n\n  # Distribution specific configuration\n  # show_distro_config() should be included in one of:\n  #   $DISTRO/config/functions\n  #   $DISTRO/show_config\n\n  if [ -f distributions/${DISTRO}/show_config ]; then\n    . distributions/${DISTRO}/show_config\n  fi\n  if [ \"$(type -t show_distro_config)\" = \"function\" ]; then\n    show_distro_config\n  fi\n\n  config_message+=\"\\n\\n ${dashes}${dashes}${dashes}\"\n  config_message+=\"\\n End Configuration for ${DISTRONAME}\"\n  config_message+=\"\\n ${dashes}${dashes}${dashes}\"\n  config_message+=\"\\n\\n\\n\"\n\n  echo -e \"${config_message}\"\n}\n"
  },
  {
    "path": "config/sources",
    "content": "# Sourceforge download site\n  SOURCEFORGE_SRC=\"https://prdownloads.sourceforge.net\"\n"
  },
  {
    "path": "create_tar.sh",
    "content": "#!/bin/sh\n\ngit archive --format=tar --prefix=LibreELEC-source-$1/ tags/$1 | bzip2 > LibreELEC-source-$1.tar.bz2\n"
  },
  {
    "path": "distributions/CoreELEC/options",
    "content": "### DISTRO INFORMATION ###\n\n# Name of the Distro to build (full name, without special characters)\n  DISTRONAME=\"CoreELEC\"\n\n# short project description\n  DESCRIPTION=\"CoreELEC is a fast and user-friendly Kodi Entertainment Center distribution.\"\n\n\n### USER INTERFACE SETTINGS ###\n\n# Welcome Message for e.g. SSH Server (up to 5 Lines)\n  GREETING0=\"##############################################\"\n  GREETING1=\"#                  CoreELEC                  #\"\n  GREETING2=\"#            https://coreelec.org            #\"\n  GREETING3=\"##############################################\"\n  GREETING4=\"\"\n\n# Root password to integrate in the target system\n  ROOT_PASSWORD=\"coreelec\"\n\n# Partition labels for USB/SD installation media\n  DISTRO_BOOTLABEL=\"COREELEC\"\n  DISTRO_DISKLABEL=\"STORAGE\"\n\n\n### BUILDSYSTEM SETTINGS ####\n\n# LTO (Link Time Optimization) support\n  LTO_SUPPORT=\"yes\"\n\n# GOLD (Google Linker) support\n  GOLD_SUPPORT=\"yes\"\n\n# MOLD (Modern Linker) support\n  MOLD_SUPPORT=\"no\"\n\n# default linker (bfd / gold / mold)\n  DEFAULT_LINKER=\"gold\"\n\n# HARDENING (security relevant linker and compiler flags) support\n  HARDENING_SUPPORT=\"no\"\n\n# Default supported get handlers (archive, git, file etc.)\n  GET_HANDLER_SUPPORT=\"archive\"\n\n# use local ccache on build host, if available, for early package\n# builds before ccache has been built\n  LOCAL_CCACHE_SUPPORT=\"yes\"\n\n### OS CONFIGURATION ###\n\n# Install glibc locales to the build (yes / no)\n  GLIBC_LOCALES=\"yes\"\n\n# additional drivers to install:\n# for a list of additional drivers see packages/linux-drivers\n# Space separated list is supported,\n# e.g. ADDITIONAL_DRIVERS=\"DRIVER1 DRIVER2\"\n  ADDITIONAL_DRIVERS=\"gpu-aml openvfd-driver media_modules-aml wifi_dummy-aml ap6xxx-aml\n                     uwe5631-aml RTL8812AU RTL8822BU-aml RTL8822CS-aml RTL8822CU-aml\n                     RTL8852BS-aml RTL8152-aml w1-aml\"\n\n# Default size of system partition, in MB, eg. 512\n  SYSTEM_SIZE=512\n\n# Default system partition offset, in sectors, eg. 2048\n  SYSTEM_PART_START=8192\n\n# build with swap support (yes / no)\n  SWAP_SUPPORT=\"yes\"\n\n# swap support enabled per default (yes / no)\n  SWAP_ENABLED_DEFAULT=\"no\"\n\n# swapfile size if SWAP_SUPPORT=yes in MB\n  SWAPFILESIZE=\"128\"\n\n# debug tty path\n  DEBUG_TTY=\"/dev/ttyS0\"\n\n\n### KODI SETTINGS ###\n# Mediacenter to use (kodi / no)\n  MEDIACENTER=\"kodi\"\n\n# Skins to install (Estuary)\n# Space separated list is supported,\n# e.g. SKINS=\"Estuary\"\n  SKINS=\"Estuary\"\n\n# Default Skin (Estuary)\n  SKIN_DEFAULT=\"Estuary\"\n\n# install extra subtitle Fonts for KODI (yes / no)\n  KODI_EXTRA_FONTS=\"yes\"\n\n# build and install PulseAudio support (yes / no)\n  PULSEAUDIO_SUPPORT=\"yes\"\n\n# build and install pipewire support (yes / no)\n  PIPEWIRE_SUPPORT=\"no\"\n\n# build and install eSpeak-NG support (yes / no)\n  ESPEAK_SUPPORT=\"no\"\n\n# build and install with BluRay support (yes / no)\n  KODI_BLURAY_SUPPORT=\"yes\"\n\n# build and install with BD+ support\n# (BD+ decryption support in KODI) (yes / no)\n  BLURAY_BDPLUS_SUPPORT=\"yes\"\n\n# build and install with AACS support\n# (BD decryption support in KODI) (yes / no)\n  BLURAY_AACS_SUPPORT=\"yes\"\n\n# build and install with DVDCSS support\n# (DVD decryption support in KODI) (yes / no)\n  KODI_DVDCSS_SUPPORT=\"yes\"\n\n# build and install bluetooth support (yes / no)\n  BLUETOOTH_SUPPORT=\"yes\"\n\n# build and install with KODI webfrontend (yes / no)\n  KODI_WEBSERVER_SUPPORT=\"yes\"\n\n# build and install Avahi (Zeroconf) daemon (yes / no)\n  AVAHI_DAEMON=\"yes\"\n\n# build with UPnP support (yes / no)\n  KODI_UPNP_SUPPORT=\"yes\"\n\n# build with MySQL support (mariadb / none)\n  KODI_MYSQL_SUPPORT=\"mariadb\"\n\n# build xbmc with optical drive support (yes / no)\n  KODI_OPTICAL_SUPPORT=\"yes\"\n\n# build with AirPlay support (stream videos from iDevices to KODI) (yes / no)\n  KODI_AIRPLAY_SUPPORT=\"yes\"\n\n# build with AirTunes support (stream music from iDevices to KODI) (yes / no)\n  KODI_AIRTUNES_SUPPORT=\"yes\"\n\n# build with libnfs support (mounting nfs shares with KODI) (yes / no)\n  KODI_NFS_SUPPORT=\"yes\"\n\n# build with Samba Client support (mounting SAMBA shares with KODI) (yes / no)\n  KODI_SAMBA_SUPPORT=\"yes\"\n\n# build kodi with alsa support (yes/no)\n  KODI_ALSA_SUPPORT=\"yes\"\n\n# build kodi with pulseaudio support (yes/no)\n  KODI_PULSEAUDIO_SUPPORT=\"yes\"\n\n# build kodi with pipewire support (yes/no)\n  KODI_PIPEWIRE_SUPPORT=\"no\"\n\n### KODI ADDONS ###\n\n# Distribution Specific source location\n  DISTRO_MIRROR=\"http://sources.coreelec.org http://sources.libreelec.tv/mirror\"\n  DISTRO_SRC=\"http://sources.libreelec.tv/$LIBREELEC_VERSION\"\n\n# Addon Server Url\n  ADDON_SERVER_URL=\"https://addons.coreelec.org\"\n\n# ID of the default addon repository\n  ADDON_REPO_ID=\"repository.coreelec\"\n\n# Name of the default addon repository\n  ADDON_REPO_NAME=\"CoreELEC Add-ons\"\n\n# set the addon dirs\n  ADDON_PATH=\"$DEVICE/$ADDON_VERSION/$TARGET_ARCH\"\n\n# Settings package name - blank if not required\n  DISTRO_PKG_SETTINGS=\"CoreELEC-settings\"\n  DISTRO_PKG_SETTINGS_ID=\"service.coreelec.settings\"\n\n\n### ADDITIONAL PROGRAMS / FUNCTIONS ###\n\n# Testpackages for development (yes / no)\n  TESTING=\"no\"\n\n# Configure debug groups (space delimited key=value pairs, with each value comma-delimited) and default group when DEBUG=yes\n# Use ! or - prefix to prevent a dependent package from being built with debug. Add + suffix to build dependenencies with debug.\n  DEBUG_GROUPS=\"kodi+=kodi+,kodi-platform+,p8-platform+,!mesa\"\n  DEBUG_GROUP_YES=\"kodi+\"\n\n# wireless daemon to use (wpa_supplicant/iwd)\n  WIRELESS_DAEMON=\"wpa_supplicant\"\n\n# build and install iSCSI support - iscsistart (yes / no)\n  ISCSI_SUPPORT=\"no\"\n\n# build with NFS support (mounting nfs shares via the OS) (yes / no)\n  NFS_SUPPORT=\"yes\"\n\n# build with Samba Client support (mounting samba shares via the OS) (yes / no)\n  SAMBA_SUPPORT=\"yes\"\n\n# build and install Samba Server (yes / no)\n  SAMBA_SERVER=\"yes\"\n\n# build and install SFTP Server (yes / no)\n  SFTP_SERVER=\"yes\"\n\n# build and install OpenVPN support (yes / no)\n  OPENVPN_SUPPORT=\"yes\"\n\n# build and install WireGuard support (yes / no)\n  WIREGUARD_SUPPORT=\"yes\"\n\n# build and install diskmounter support (udevil)\n# this service provide auto mounting support for external drives in the\n# mediacenter also automount internally drives at boottime via udev (yes / no)\n  UDEVIL=\"yes\"\n\n# Support for partitioning and formating disks in initramfs (yes / no)\n# This adds support for parted and mkfs.ext3/4 to initramfs for OEM usage\n  INITRAMFS_PARTED_SUPPORT=\"no\"\n\n# build and install exFAT fuse support (yes / no)\n  EXFAT=\"yes\"\n\n# build and install NTFS-3G fuse support (yes / no)\n  NTFS3G=\"yes\"\n\n# build and install hfs filesystem utilities (yes / no)\n  HFSTOOLS=\"yes\"\n\n# build and install nano text editor (yes / no)\n  NANO_EDITOR=\"yes\"\n\n# cron support (yes / no)\n  CRON_SUPPORT=\"yes\"\n\n# build with installer (yes / no)\n  INSTALLER_SUPPORT=\"yes\"\n\n# build and install remote support (yes / no)\n  REMOTE_SUPPORT=\"yes\"\n\n# IR remote keymaps supported in default config\n  IR_REMOTE_KEYMAPS=\"rc6_mce xbox_360 xbox_one odroid wetek_hub wetek_play_2 tanix\"\n\n# build and install Joystick support (yes / no)\n  JOYSTICK_SUPPORT=\"yes\"\n\n# build and install CEC adapter support (yes / no)\n  CEC_SUPPORT=\"yes\"\n\n# build and install CEC framework support (yes / no)\n  CEC_FRAMEWORK_SUPPORT=\"no\"\n\n# OEM packages for OEM's (yes / no)\n  OEM_SUPPORT=\"no\"\n\n# build and install ALSA Audio support (yes / no)\n  ALSA_SUPPORT=\"yes\"\n\n# additional packages to install:\n# Space separated list is supported,\n# e.g. ADDITIONAL_PACKAGES=\"PACKAGE1 PACKAGE2\"\n  ADDITIONAL_PACKAGES=\"u-boot-script dtc CoreELEC-Debug-Scripts inject_bl301 ceemmc\n                       nfs-utils dtb-xml megatools\"\n"
  },
  {
    "path": "distributions/CoreELEC/show_config",
    "content": "show_distro_config() {\n  # Hardware decoder support\n\n  config_message+=\"\\n\\n Kodi Hardware configuration:\"\n  config_message+=\"\\n $dashes$dashes\"\n\n  config_message+=\"\\n - Video Acceleration provider:\\t\\t $KODIPLAYER_DRIVER\"\n\n  # Input device configuration\n\n  config_message+=\"\\n - Remote support:\\t\\t\\t $REMOTE_SUPPORT\"\n  config_message+=\"\\n - CEC Adapter support:\\t\\t\\t $CEC_SUPPORT\"\n  config_message+=\"\\n - CEC Framework support:\\t\\t $CEC_FRAMEWORK_SUPPORT\"\n  config_message+=\"\\n - Kodi Joystick support:\\t\\t $JOYSTICK_SUPPORT\"\n\n  # Kodi configuration\n\n  config_message+=\"\\n\\n Kodi Software configuration:\"\n  config_message+=\"\\n $dashes$dashes\"\n\n  config_message+=\"\\n - Kodi Blu-ray support:\\t\\t $KODI_BLURAY_SUPPORT\"\n  if [ \"$KODI_BLURAY_SUPPORT\" = \"yes\" ] ; then\n    config_message+=\"\\n   - Blu-ray BD+ support:\\t\\t $BLURAY_BDPLUS_SUPPORT\"\n    config_message+=\"\\n   - Blu-ray AACS support:\\t\\t $BLURAY_AACS_SUPPORT\"\n  fi\n  config_message+=\"\\n - Kodi DVDCSS support:\\t\\t\\t $KODI_DVDCSS_SUPPORT\"\n  config_message+=\"\\n - Kodi Airplay support:\\t\\t $KODI_AIRPLAY_SUPPORT\"\n  config_message+=\"\\n - Kodi Airtunes support:\\t\\t $KODI_AIRTUNES_SUPPORT\"\n  config_message+=\"\\n - Kodi NFS support:\\t\\t\\t $KODI_NFS_SUPPORT\"\n  config_message+=\"\\n - Kodi MySQL support:\\t\\t\\t $KODI_MYSQL_SUPPORT\"\n  config_message+=\"\\n - Kodi Optical Drive support:\\t\\t $KODI_OPTICAL_SUPPORT\"\n  config_message+=\"\\n - Kodi SAMBA client support:\\t\\t $KODI_SAMBA_SUPPORT\"\n  config_message+=\"\\n - Kodi UPNP support:\\t\\t\\t $KODI_UPNP_SUPPORT\"\n  config_message+=\"\\n - Kodi Webserver support:\\t\\t $KODI_WEBSERVER_SUPPORT\"\n\n  for config_skin in $SKINS; do\n    config_message+=\"\\n - Include Skin:\\t\\t\\t $config_skin\"\n  done\n\n  config_message+=\"\\n - Default Skin:\\t\\t\\t $SKIN_DEFAULT\"\n  config_message+=\"\\n - Include extra fonts:\\t\\t\\t $KODI_EXTRA_FONTS\"\n}\n"
  },
  {
    "path": "distributions/CoreELEC/splash/Amlogic-ne/progress/splash-1080-config",
    "content": "animation_offset_x=635\nanimation_offset_y=135\nframes_per_second=20\n\n"
  },
  {
    "path": "distributions/CoreELEC/splash/Amlogic-ng/progress/splash-1080-config",
    "content": "animation_offset_x=635\nanimation_offset_y=135\nframes_per_second=20\n\n"
  },
  {
    "path": "distributions/CoreELEC/version",
    "content": "# OS_MAJOR: OS major Version\n  OS_MAJOR=\"20\"\n\n# OS_MINOR: OS minor Version\n  OS_MINOR=\"3\"\n\n# OS_VERSION: OS Version\n  OS_VERSION=\"${OS_MAJOR}.${OS_MINOR}\"\n\n# OS_CODENAME: OS Codename\n  OS_CODENAME=\"Nexus\"\n\n# OS_STAGE: OS Release Stage (alpha, beta, rc, build)\n  OS_STAGE=\"\"\n\n# BUILD_NUM: Build number\n  BUILD_NUM=\"\"\n\n# ADDON_VERSION: Addon version\n  ADDON_VERSION=${OS_VERSION}\n"
  },
  {
    "path": "distributions/EmuELEC/options",
    "content": "## DISTRO INFORMATION ###\n\n# Name of the Distro to build (full name, without special characters)\n  DISTRONAME=\"EmuELEC\"\n\n# short project description\n  DESCRIPTION=\"Retro emulation for Amlogic Devices.\"\n\n\n### USER INTERFACE SETTINGS ###\n\n# Welcome Message for e.g. SSH Server (up to 5 Lines)\n  GREETING0=\"##############################################\"\n  GREETING1=\"#                 EmuELEC                    #\"\n  GREETING2=\"#     Retro emulation for Amlogic Devices    #\"\n  GREETING3=\"#             Based on CoreELEC              #\"\n  GREETING4=\"##############################################\"\n\n# Root password to integrate in the target system\n  ROOT_PASSWORD=\"emuelec\"\n\n# Partition labels for USB/SD installation media\n  DISTRO_BOOTLABEL=\"EMUELEC\"\n  DISTRO_DISKLABEL=\"STORAGE\"\n\n\n### BUILDSYSTEM SETTINGS ####\n\n# LTO (Link Time Optimization) support\n  LTO_SUPPORT=\"yes\"\n\n# GOLD (Google Linker) support\n  GOLD_SUPPORT=\"yes\"\n\n# MOLD (Modern Linker) support\n  MOLD_SUPPORT=\"no\"\n\n# default linker (bfd / gold / mold)\n  DEFAULT_LINKER=\"gold\"\n\n# HARDENING (security relevant linker and compiler flags) support\n  HARDENING_SUPPORT=\"no\"\n\n# Default supported get handlers (archive, git, file etc.)\n  GET_HANDLER_SUPPORT=\"archive git file\"\n\n# use local ccache on build host, if available, for early package\n# builds before ccache has been built\n  LOCAL_CCACHE_SUPPORT=\"yes\"\n\n### OS CONFIGURATION ###\n\n# Install glibc locales to the build (yes / no)\n  GLIBC_LOCALES=\"yes\"\n\n# additional drivers to install:\n# for a list of additional drivers see packages/linux-drivers\n# Space separated list is supported,\n# e.g. ADDITIONAL_DRIVERS=\"DRIVER1 DRIVER2\"\n  ADDITIONAL_DRIVERS=\"gpu-aml openvfd-driver media_modules-aml wifi_dummy-aml ap6xxx-aml\n                     uwe5631-aml RTL8812AU RTL8822BU-aml RTL8822CS-aml RTL8822CU-aml\n                     RTL8852BS-aml RTL8152-aml w1-aml\"\n\n# Default size of system partition, in MB, eg. 512\n  SYSTEM_SIZE=2048\n\n# Default system partition offset, in sectors, eg. 2048\n  SYSTEM_PART_START=8192\n\n# build with swap support (yes / no)\n  SWAP_SUPPORT=\"yes\"\n\n# swap support enabled per default (yes / no)\n  SWAP_ENABLED_DEFAULT=\"no\"\n\n# swapfile size if SWAP_SUPPORT=yes in MB\n  SWAPFILESIZE=\"128\"\n\n# debug tty path\n  DEBUG_TTY=\"/dev/ttyS0\"\n\n\n### KODI SETTINGS ###\n# Mediacenter to use (kodi / no)\n  MEDIACENTER=\"emuelec\"\n\n# Skins to install (Estuary)\n# Space separated list is supported,\n# e.g. SKINS=\"Estuary\"\n  SKINS=\"Estuary\"\n\n# Default Skin (Estuary)\n  SKIN_DEFAULT=\"Estuary\"\n\n# install extra subtitle Fonts for KODI (yes / no)\n  KODI_EXTRA_FONTS=\"yes\"\n\n# build and install PulseAudio support (yes / no)\n  PULSEAUDIO_SUPPORT=\"yes\"\n\n# build and install pipewire support (yes / no)\n  PIPEWIRE_SUPPORT=\"no\"\n\n# build and install eSpeak-NG support (yes / no)\n  ESPEAK_SUPPORT=\"no\"\n\n# build and install with BluRay support (yes / no)\n  KODI_BLURAY_SUPPORT=\"yes\"\n\n# build and install with BD+ support\n# (BD+ decryption support in KODI) (yes / no)\n  BLURAY_BDPLUS_SUPPORT=\"yes\"\n\n# build and install with AACS support\n# (BD decryption support in KODI) (yes / no)\n  BLURAY_AACS_SUPPORT=\"yes\"\n\n# build and install with DVDCSS support\n# (DVD decryption support in KODI) (yes / no)\n  KODI_DVDCSS_SUPPORT=\"yes\"\n\n# build and install bluetooth support (yes / no)\n  BLUETOOTH_SUPPORT=\"yes\"\n\n# build and install with KODI webfrontend (yes / no)\n  KODI_WEBSERVER_SUPPORT=\"yes\"\n\n# build and install Avahi (Zeroconf) daemon (yes / no)\n  AVAHI_DAEMON=\"yes\"\n\n# build with UPnP support (yes / no)\n  KODI_UPNP_SUPPORT=\"yes\"\n\n# build with MySQL support (mariadb / none)\n  KODI_MYSQL_SUPPORT=\"mariadb\"\n\n# build xbmc with optical drive support (yes / no)\n  KODI_OPTICAL_SUPPORT=\"yes\"\n\n# build with AirPlay support (stream videos from iDevices to KODI) (yes / no)\n  KODI_AIRPLAY_SUPPORT=\"yes\"\n\n# build with AirTunes support (stream music from iDevices to KODI) (yes / no)\n  KODI_AIRTUNES_SUPPORT=\"yes\"\n\n# build with libnfs support (mounting nfs shares with KODI) (yes / no)\n  KODI_NFS_SUPPORT=\"yes\"\n\n# build with Samba Client support (mounting SAMBA shares with KODI) (yes / no)\n  KODI_SAMBA_SUPPORT=\"yes\"\n\n# build kodi with alsa support (yes/no)\n  KODI_ALSA_SUPPORT=\"yes\"\n\n# build kodi with pulseaudio support (yes/no)\n  KODI_PULSEAUDIO_SUPPORT=\"yes\"\n\n# build kodi with pipewire support (yes/no)\n  KODI_PIPEWIRE_SUPPORT=\"no\"\n\n### KODI ADDONS ###\n\n# Distribution Specific source location\n  DISTRO_MIRROR=\"http://sources.coreelec.org http://sources.libreelec.tv/mirror\"\n  DISTRO_SRC=\"http://sources.libreelec.tv/$LIBREELEC_VERSION\"\n\n# Addon Server Url\n  ADDON_SERVER_URL=\"https://addons.coreelec.org\"\n\n# ID of the default addon repository\n  ADDON_REPO_ID=\"repository.coreelec\"\n\n# Name of the default addon repository\n  ADDON_REPO_NAME=\"CoreELEC Add-ons\"\n\n# set the addon dirs\n  ADDON_PATH=\"$DEVICE/$ADDON_VERSION/$TARGET_ARCH\"\n\n# Settings package name - blank if not required\n  DISTRO_PKG_SETTINGS=\"\"\n  DISTRO_PKG_SETTINGS_ID=\"\"\n\n\n### ADDITIONAL PROGRAMS / FUNCTIONS ###\n\n# Testpackages for development (yes / no)\n  TESTING=\"no\"\n\n# Configure debug groups (space delimited key=value pairs, with each value comma-delimited) and default group when DEBUG=yes\n# Use ! or - prefix to prevent a dependent package from being built with debug. Add + suffix to build dependenencies with debug.\n  DEBUG_GROUPS=\"kodi+=kodi+,kodi-platform+,p8-platform+,!mesa\"\n  DEBUG_GROUP_YES=\"kodi+\"\n\n# wireless daemon to use (wpa_supplicant/iwd)\n  WIRELESS_DAEMON=\"wpa_supplicant\"\n\n# build and install iSCSI support - iscsistart (yes / no)\n  ISCSI_SUPPORT=\"no\"\n\n# build with NFS support (mounting nfs shares via the OS) (yes / no)\n  NFS_SUPPORT=\"yes\"\n\n# build with Samba Client support (mounting samba shares via the OS) (yes / no)\n  SAMBA_SUPPORT=\"yes\"\n\n# build and install Samba Server (yes / no)\n  SAMBA_SERVER=\"yes\"\n\n# build and install SFTP Server (yes / no)\n  SFTP_SERVER=\"yes\"\n\n# build and install OpenVPN support (yes / no)\n  OPENVPN_SUPPORT=\"no\"\n\n# build and install WireGuard support (yes / no)\n  WIREGUARD_SUPPORT=\"no\"\n\n# build and install diskmounter support (udevil)\n# this service provide auto mounting support for external drives in the\n# mediacenter also automount internally drives at boottime via udev (yes / no)\n  UDEVIL=\"yes\"\n\n# Support for partitioning and formating disks in initramfs (yes / no)\n# This adds support for parted and mkfs.ext3/4 to initramfs for OEM usage\n  INITRAMFS_PARTED_SUPPORT=\"no\"\n\n# build and install exFAT fuse support (yes / no)\n  EXFAT=\"yes\"\n\n# build and install NTFS-3G fuse support (yes / no)\n  NTFS3G=\"yes\"\n\n# build and install hfs filesystem utilities (yes / no)\n  HFSTOOLS=\"yes\"\n\n# build and install nano text editor (yes / no)\n  NANO_EDITOR=\"yes\"\n\n# cron support (yes / no)\n  CRON_SUPPORT=\"yes\"\n\n# build with installer (yes / no)\n  INSTALLER_SUPPORT=\"yes\"\n\n# build and install remote support (yes / no)\n  REMOTE_SUPPORT=\"yes\"\n\n# IR remote keymaps supported in default config\n  IR_REMOTE_KEYMAPS=\"rc6_mce xbox_360 xbox_one odroid wetek_hub wetek_play_2 tanix\"\n\n# build and install Joystick support (yes / no)\n  JOYSTICK_SUPPORT=\"yes\"\n\n# build and install CEC adapter support (yes / no)\n  CEC_SUPPORT=\"yes\"\n\n# build and install CEC framework support (yes / no)\n  CEC_FRAMEWORK_SUPPORT=\"no\"\n\n# OEM packages for OEM's (yes / no)\n  OEM_SUPPORT=\"no\"\n\n# build and install ALSA Audio support (yes / no)\n  ALSA_SUPPORT=\"yes\"\n\n# additional packages to install:\n# Space separated list is supported,\n# e.g. ADDITIONAL_PACKAGES=\"PACKAGE1 PACKAGE2\"\n  ADDITIONAL_PACKAGES=\"u-boot-script dtc CoreELEC-Debug-Scripts inject_bl301\n                       nfs-utils dtb-xml megatools\"\n\n# start SX05RE added options\n\nLIBRETRO_CORES=\"2048 \\\n81 \\\na5200 \\\narduous \\\natari800 \\\nb2 \\\nbeetle-lynx \\\nbeetle-ngp \\\nbeetle-pce \\\nbeetle-pcfx \\\nbeetle-supergrafx \\\nbeetle-vb \\\nbeetle-wswan \\\nbk \\\nbluemsx \\\ncannonball \\\ncap32 \\\nclownmdemu \\\ndaphne \\\ndice \\\ndinothawr \\\ndosbox-svn \\\neasyrpg \\\nemuscv \\\nep128emu \\\nfake_08 \\\nfbalpha2012 \\\nfbneo \\\nfceumm \\\nfceumm-mod \\\nflycast \\\nfreechaf \\\nfreeintv \\\nfuse-libretro \\\ngambatte \\\ngearboy \\\ngearcoleco \\\ngeargrafx \\\ngearlynx \\\ngearsystem \\\ngenesis-plus-gx \\\ngenesis_plus_gx_cart_special \\\ngenesis-plus-gx-wide \\\ngeolith \\\ngme \\\ngpsp \\\ngw-libretro \\\nhandy \\\nhatari \\\njaxe \\\njollycv \\\nlowresnx \\\nm2000 \\\nmame2003-plus \\\nmame2010 \\\nmeowpc98 \\\nmgba \\\nminivmac \\\nmojozork \\\nmrboom \\\nmupen64plus \\\nneocd_libretro \\\nnestopia \\\nnxengine \\\no2em \\\nopera \\\nparallel-n64 \\\npcsx_rearmed \\\npicodrive \\\npocketcdg \\\npokemini \\\nprboom \\\nprosystem \\\npuae \\\npuae2021 \\\npx68k \\\nreminiscence \\\nsameboy \\\nsameduck \\\nscummvm \\\nsnes9x \\\nsnes9x2002 \\\nsnes9x2005_plus \\\nsnes9x2010 \\\nspring \\\nstella \\\nsupafaust \\\ntgbdual \\\ntheodore \\\ntic-80 \\\ntyrquake \\\nxrick \\\nuae4arm \\\nuzem \\\nvba-next \\\nvbam \\\nvecx \\\nvice \\\nvircon32 \\\nwasm4 \\\nyabasanshiro\"\n\nLIBRETRO_EXTRA_CORES=\"chailove \\\ncrocods \\\ndesmume \\\ndesmume-2015 \\\nlutro \\\nmelonds \\\nsnes9x2005 \\\nyabause\"\n\nLIBRETRO_S922X_CORES=\"beetle-saturn \\\nmesen \\\nmesen-s \\\nquicknes \\\nvirtualjaguar\"\n\n  RA_PLAYLIST_NAMES=\"\"\\\n\"Atari - 2600.lpl;\"\\\n\"Atari - 5200.lpl;\"\\\n\"Atari - 7800.lpl;\"\\\n\"Atari - Jaguar.lpl;\"\\\n\"Atari - Lynx.lpl;\"\\\n\"Atari - ST.lpl;\"\\\n\"Bandai - WonderSwan Color.lpl;\"\\\n\"Bandai - WonderSwan.lpl;\"\\\n\"Cave Story.lpl;\"\\\n\"ChaiLove.lpl;\"\\\n\"Coleco - ColecoVision.lpl;\"\\\n\"Commodore - 64 (PP).lpl;\"\\\n\"Commodore - 64 (Tapes).lpl;\"\\\n\"Commodore - 64.lpl;\"\\\n\"Commodore - Amiga.lpl;\"\\\n\"Commodore - Plus-4.lpl;\"\\\n\"Commodore - VIC20.lpl;\"\\\n\"Dinothawr.lpl;\"\\\n\"DOOM.lpl;\"\\\n\"DOS.lpl;\"\\\n\"FBNeo - Arcade Games.lpl;\"\\\n\"Flashback.lpl;\"\\\n\"GCE - Vectrex.lpl;\"\\\n\"Lutro.lpl;\"\\\n\"Magnavox - Odyssey2.lpl;\"\\\n\"MAME 2003-Plus.lpl;\"\\\n\"MAME 2010.lpl;\"\\\n\"Mattel - Intellivision.lpl;\"\\\n\"Microsoft - MSX2.lpl;\"\\\n\"Microsoft - MSX.lpl;\"\\\n\"NEC - PC Engine SuperGrafx.lpl;\"\\\n\"NEC - PC Engine - TurboGrafx 16.lpl;\"\\\n\"Nintendo - Famicom Disk System.lpl;\"\\\n\"Nintendo - Game Boy Advance (e-Cards).lpl;\"\\\n\"Nintendo - Game Boy Advance.lpl;\"\\\n\"Nintendo - Game Boy Color.lpl;\"\\\n\"Nintendo - Game Boy.lpl;\"\\\n\"Nintendo - GameCube.lpl;\"\\\n\"Nintendo - Nintendo 3DS.lpl;\"\\\n\"Nintendo - Nintendo 64.lpl;\"\\\n\"Nintendo - Nintendo DS.lpl;\"\\\n\"Nintendo - Nintendo DS Decrypted.lpl;\"\\\n\"Nintendo - Nintendo DS (Download Play) (BETA).lpl;\"\\\n\"Nintendo - Nintendo DSi Decrypted.lpl;\"\\\n\"Nintendo - Nintendo DSi (DLC).lpl;\"\\\n\"Nintendo - Nintendo Entertainment System.lpl;\"\\\n\"Nintendo - Satellaview.lpl;\"\\\n\"Nintendo - Super Nintendo Entertainment System.lpl;\"\\\n\"Nintendo - Virtual Boy.lpl;\"\\\n\"Nintendo - Wii.lpl;\"\\\n\"Nintendo - Pokemon Mini (PokeMini).lpl;\"\\\n\"Quake.lpl;\"\\\n\"ScummVM.lpl;\"\\\n\"Sega - 32X.lpl;\"\\\n\"Sega - Dreamcast.lpl;\"\\\n\"Sega - Game Gear.lpl;\"\\\n\"Sega - Master System - Mark III.lpl;\"\\\n\"Sega - Mega Drive - Genesis.lpl;\"\\\n\"Sega - PICO.lpl;\"\\\n\"Sega - SG-1000.lpl;\"\\\n\"Sega - Saturn.lpl;\"\\\n\"Sinclair - ZX Spectrum +3.lpl;\"\\\n\"SNK - Neo Geo Pocket Color.lpl;\"\\\n\"SNK - Neo Geo Pocket.lpl;\"\\\n\"Sony - PlayStation 2.lpl;\"\\\n\"Sony - PlayStation Portable.lpl;\"\\\n\"Sony - PlayStation.lpl;\"\\\n\"Thomson - MOTO.lpl;\"\\\n\"TIC-80.lpl;\"\\\n\"The 3DO Company - 3DO.lpl\"\n\n  RA_PLAYLIST_CORES=\"\"\\\n\"/tmp/cores/stella_libretro.so;\"\\\n\"/tmp/cores/atari800_libretro.so;\"\\\n\"/tmp/cores/prosystem_libretro.so;\"\\\n\"/tmp/cores/virtualjaguar_libretro.so;\"\\\n\"/tmp/cores/handy_libretro.so;\"\\\n\"/tmp/cores/hatari_libretro.so;\"\\\n\"/tmp/cores/mednafen_wswan_libretro.so;\"\\\n\"/tmp/cores/nxengine_libretro.so;\"\\\n\"/tmp/cores/chailove_libretro.so;\"\\\n\"/tmp/cores/bluemsx_libretro.so;\"\\\n\"/tmp/cores/vice_x64_libretro.so;\"\\\n\"/tmp/cores/puae_libretro.so;\"\\\n\"/tmp/cores/vice_xplus4_libretro.so;\"\\\n\"/tmp/cores/vice_xvic_libretro.so;\"\\\n\"/tmp/cores/dinothawr_libretro.so;\"\\\n\"/tmp/cores/prboom_libretro.so;\"\\\n\"/tmp/cores/dosbox_libretro.so;\"\\\n\"/tmp/cores/fbneo_libretro.so;\"\\\n\"/tmp/cores/reminiscence_libretro.so;\"\\\n\"/tmp/cores/vecx_libretro.so;\"\\\n\"/tmp/cores/lutro_libretro.so;\"\\\n\"/tmp/cores/o2em_libretro.so;\"\\\n\"/tmp/cores/mame2003_plus_libretro.so;\"\\\n\"/tmp/cores/mame2010_libretro.so;\"\\\n\"/tmp/cores/freeintv_libretro.so;\"\\\n\"/tmp/cores/bluemsx_libretro.so;\"\\\n\"/tmp/cores/mednafen_supergrafx_libretro.so;\"\\\n\"/tmp/cores/mednafen_pce_fast_libretro.so;\"\\\n\"/tmp/cores/nestopia_libretro.so;\"\\\n\"/tmp/cores/mgba_libretro.so;\"\\\n\"/tmp/cores/gambatte_libretro.so;\"\\\n\"/tmp/cores/dolphin_libretro.so;\"\\\n\"/tmp/cores/citra_libretro.so;\"\\\n\"/tmp/cores/parallel_n64_libretro.so;\"\\\n\"/tmp/cores/desmume_libretro.so;\"\\\n\"/tmp/cores/nestopia_libretro.so;\"\\\n\"/tmp/cores/snes9x2010_libretro.so;\"\\\n\"/tmp/cores/mednafen_vb_libretro.so;\"\\\n\"/tmp/cores/dolphin_libretro.so;\"\\\n\"/tmp/cores/pokemini_libretro.so;\"\\\n\"/tmp/cores/tyrquake_libretro.so;\"\\\n\"/tmp/cores/scummvm_libretro.so;\"\\\n\"/tmp/cores/picodrive_libretro.so;\"\\\n\"/tmp/cores/flycast_libretro.so;\"\\\n\"/tmp/cores/genesis_plus_gx_libretro.so;\"\\\n\"/tmp/cores/genesis_plus_gx_cart_special_libretro.so;\"\\\n\"/tmp/cores/picodrive_libretro.so;\"\\\n\"/tmp/cores/yabause_libretro.so;\"\\\n\"/tmp/cores/fuse_libretro.so;\"\\\n\"/tmp/cores/mednafen_ngp_libretro.so;\"\\\n\"/tmp/cores/mednafen_ngp_libretro.so;\"\\\n\"/tmp/cores/play_libretro.so;\"\\\n\"/tmp/cores/ppsspp_libretro.so;\"\\\n\"/tmp/cores/pcsx_rearmed_libretro.so;\"\\\n\"/tmp/cores/theodore_libretro.so;\"\\\n\"/tmp/cores/tic80_libretro.so;\"\\\n\"/tmp/cores/4do_libretro.so;\"\\\n\"/tmp/cores/mednafen_saturn_libretro.so\"\n"
  },
  {
    "path": "distributions/EmuELEC/show_config",
    "content": "show_distro_config() {\n  # Hardware decoder support\n\n  config_message+=\"\\n\\n Kodi Hardware configuration:\"\n  config_message+=\"\\n $dashes$dashes\"\n\n  config_message+=\"\\n - Video Acceleration provider:\\t\\t $KODIPLAYER_DRIVER\"\n\n  # Input device configuration\n\n  config_message+=\"\\n - Remote support:\\t\\t\\t $REMOTE_SUPPORT\"\n  config_message+=\"\\n - CEC Adapter support:\\t\\t\\t $CEC_SUPPORT\"\n  config_message+=\"\\n - CEC Framework support:\\t\\t $CEC_FRAMEWORK_SUPPORT\"\n  config_message+=\"\\n - Kodi Joystick support:\\t\\t $JOYSTICK_SUPPORT\"\n\n  # Kodi configuration\n\n  config_message+=\"\\n\\n Kodi Software configuration:\"\n  config_message+=\"\\n $dashes$dashes\"\n\n  config_message+=\"\\n - Kodi Blu-ray support:\\t\\t $KODI_BLURAY_SUPPORT\"\n  if [ \"$KODI_BLURAY_SUPPORT\" = \"yes\" ] ; then\n    config_message+=\"\\n   - Blu-ray BD+ support:\\t\\t $BLURAY_BDPLUS_SUPPORT\"\n    config_message+=\"\\n   - Blu-ray AACS support:\\t\\t $BLURAY_AACS_SUPPORT\"\n  fi\n  config_message+=\"\\n - Kodi DVDCSS support:\\t\\t\\t $KODI_DVDCSS_SUPPORT\"\n  config_message+=\"\\n - Kodi Airplay support:\\t\\t $KODI_AIRPLAY_SUPPORT\"\n  config_message+=\"\\n - Kodi Airtunes support:\\t\\t $KODI_AIRTUNES_SUPPORT\"\n  config_message+=\"\\n - Kodi NFS support:\\t\\t\\t $KODI_NFS_SUPPORT\"\n  config_message+=\"\\n - Kodi MySQL support:\\t\\t\\t $KODI_MYSQL_SUPPORT\"\n  config_message+=\"\\n - Kodi Optical Drive support:\\t\\t $KODI_OPTICAL_SUPPORT\"\n  config_message+=\"\\n - Kodi SAMBA client support:\\t\\t $KODI_SAMBA_SUPPORT\"\n  config_message+=\"\\n - Kodi UPNP support:\\t\\t\\t $KODI_UPNP_SUPPORT\"\n  config_message+=\"\\n - Kodi Webserver support:\\t\\t $KODI_WEBSERVER_SUPPORT\"\n\n  for config_skin in $SKINS; do\n    config_message+=\"\\n - Include Skin:\\t\\t\\t $config_skin\"\n  done\n\n  config_message+=\"\\n - Default Skin:\\t\\t\\t $SKIN_DEFAULT\"\n  config_message+=\"\\n - Include extra fonts:\\t\\t\\t $KODI_EXTRA_FONTS\"\n}\n"
  },
  {
    "path": "distributions/EmuELEC/splash/Amlogic-ne/progress/splash-1080-config",
    "content": "animation_offset_x=635\nanimation_offset_y=135\nframes_per_second=20\n\n"
  },
  {
    "path": "distributions/EmuELEC/splash/Amlogic-ng/progress/splash-1080-config",
    "content": "animation_offset_x=635\nanimation_offset_y=135\nframes_per_second=20\n\n"
  },
  {
    "path": "distributions/EmuELEC/splash/Amlogic-no/progress/splash-1080-config",
    "content": "animation_offset_x=635\nanimation_offset_y=135\nframes_per_second=20\n\n"
  },
  {
    "path": "distributions/EmuELEC/version",
    "content": "# OS_MAJOR: OS major Version\n  OS_MAJOR=\"4\"\n\n# OS_MINOR: OS minor Version\n  OS_MINOR=\"8\"\n\n# OS_VERSION: OS Version\n  OS_VERSION=\"${OS_MAJOR}.${OS_MINOR}\"\n\n# OS_CODENAME: OS Codename\n  OS_CODENAME=\"Nexus\"\n\n# OS_STAGE: OS Release Stage (alpha, beta, rc, build)\n  OS_STAGE=\"alpha\"\n\n# BUILD_NUM: Build number\n  BUILD_NUM=\"1\"\n\n# ADDON_VERSION: Addon version\n  ADDON_VERSION=${OS_VERSION}\n"
  },
  {
    "path": "distributions/LibreELEC/kernel_options",
    "content": "# general\nCONFIG_DRM=y\nCONFIG_SQUASHFS=y\nCONFIG_SQUASHFS_ZSTD=y\nCONFIG_VFAT_FS=y\nCONFIG_EXT4_FS=y\nCONFIG_HUGETLBFS=n\n\n# netfilter\nCONFIG_NETFILTER=y\nCONFIG_NF_CONNTRACK=m\nCONFIG_NETFILTER_XTABLES=m\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\nCONFIG_IP_NF_MANGLE=m\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\nCONFIG_NF_REJECT_IPV6=m\nCONFIG_IP6_NF_IPTABLES=m\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\nCONFIG_IP6_NF_MANGLE=m\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\n\n# packages/network/iwd\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD5=y\nCONFIG_CRYPTO_AES=y\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\nCONFIG_CRYPTO_DES=y\nCONFIG_CRYPTO_ECB=y\nCONFIG_CRYPTO_CBC=y\nCONFIG_KEY_DH_OPERATIONS=y\nCONFIG_KEYS=y\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS7_MESSAGE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_NLMON=m\nCONFIG_RFKILL=m\n\n# packages/network/wireguard\nCONFIG_NET=y\nCONFIG_INET=y\nCONFIG_IP_ADVANCED_ROUTER=y\nCONFIG_IP_MULTIPLE_TABLES=y\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_WIREGUARD=m\n\n# packages/sysutils/systemd\nCONFIG_DEVTMPFS=y\nCONFIG_CGROUPS=y\nCONFIG_INOTIFY_USER=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EPOLL=y\n# CONFIG_NET=y # already set in packages/network/wireguard\nCONFIG_SYSFS=y\nCONFIG_PROC_FS=y\nCONFIG_FHANDLE=y\n# CONFIG_CRYPTO_USER_API_HASH=y # already set in packages/network/iwd\n# CONFIG_CRYPTO_HMAC=y # already set in packages/network/iwd\n# CONFIG_CRYPTO_SHA256=y # already set in packages/network/iwd\nCONFIG_SYSFS_DEPRECATED=n\nCONFIG_UEVENT_HELPER=n\nCONFIG_FW_LOADER_USER_HELPER=n\nCONFIG_IPV6=y\nCONFIG_AUTOFS4_FS=y\nCONFIG_TMPFS_XATTR=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_BTRFS_FS_POSIX_ACL=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\nCONFIG_KCMP=y\nCONFIG_RT_GROUP_SCHED=n\nCONFIG_CGROUP_BPF=y\nCONFIG_BPF_SYSCALL=y\n\n# Native language support\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\nCONFIG_NLS_UTF8=y\n\n# Human Interface Device (HID)\nCONFIG_HID_NINTENDO=m\nCONFIG_NINTENDO_FF=y\n\n# Docker\nCONFIG_NAMESPACES=y\nCONFIG_NET_NS=y\nCONFIG_PID_NS=y\nCONFIG_IPC_NS=y\nCONFIG_UTS_NS=y\n# CONFIG_CGROUPS=y # already set in packages/sysutils/systemd\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_CPUSETS=y\nCONFIG_MEMCG=y\n# CONFIG_KEYS=y # already set in packages/network/iwd\nCONFIG_VETH=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_NETFILTER=m\n# CONFIG_IP_NF_FILTER=m # already set in netfilter\n# CONFIG_IP_NF_TARGET_MASQUERADE=m # already set in netfilter\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\nCONFIG_NETFILTER_XT_MARK=m\n# CONFIG_IP_NF_NAT=m # already set in netfilter\nCONFIG_NF_NAT=m\nCONFIG_POSIX_MQUEUE=y\n# CONFIG_CGROUP_BPF=y # already set in packages/sysutils/systemd\nCONFIG_USER_NS=y\n# CONFIG_SECCOMP=y # already set in packages/sysutils/systemd\n# CONFIG_SECCOMP_FILTER=y # already set in packages/sysutils/systemd\nCONFIG_CGROUP_PIDS=y\nCONFIG_BLK_CGROUP=y\nCONFIG_BLK_DEV_THROTTLING=y\nCONFIG_CGROUP_PERF=y\nCONFIG_NET_SCHED=y\nCONFIG_NET_CLS_CGROUP=m\nCONFIG_CGROUP_NET_PRIO=y\nCONFIG_CFS_BANDWIDTH=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_VS=m\nCONFIG_IP_VS_NFCT=y\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\nCONFIG_IP_VS_RR=m\n# CONFIG_EXT4_FS=y # already set in general\n# CONFIG_EXT4_FS_POSIX_ACL=y # already set in packages/sysutils/systemd\nCONFIG_EXT4_FS_SECURITY=y\nCONFIG_VXLAN=m\nCONFIG_BRIDGE_VLAN_FILTERING=y\nCONFIG_CRYPTO=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_XFRM=y\nCONFIG_XFRM_USER=y\nCONFIG_XFRM_ALGO=y\nCONFIG_INET_ESP=y\nCONFIG_IPVLAN=m\nCONFIG_MACVLAN=m\nCONFIG_DUMMY=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_CONNTRACK_FTP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_CONNTRACK_TFTP=m\nCONFIG_MD=y\nCONFIG_BLK_DEV_DM=m\nCONFIG_DM_THIN_PROVISIONING=m\nCONFIG_OVERLAY_FS=m\n"
  },
  {
    "path": "distributions/LibreELEC/options",
    "content": "### DISTRO INFORMATION ###\n\n# Name of the Distro to build (full name, without special characters)\n  DISTRONAME=\"LibreELEC\"\n\n# short project description\n  DESCRIPTION=\"LibreELEC is a fast and user-friendly Kodi Entertainment Center distribution.\"\n\n\n### USER INTERFACE SETTINGS ###\n\n# Welcome Message for e.g. SSH Server (up to 5 Lines)\n  GREETING0=\"##############################################\"\n  GREETING1=\"#                 LibreELEC                  #\"\n  GREETING2=\"#            https://libreelec.tv            #\"\n  GREETING3=\"##############################################\"\n  GREETING4=\"\"\n\n# Root password to integrate in the target system\n  ROOT_PASSWORD=\"libreelec\"\n\n# Partition labels for USB/SD installation media\n  DISTRO_BOOTLABEL=\"LIBREELEC\"\n  DISTRO_DISKLABEL=\"STORAGE\"\n\n\n### BUILDSYSTEM SETTINGS ####\n\n# LTO (Link Time Optimization) support\n  LTO_SUPPORT=\"yes\"\n\n# GOLD (Google Linker) support\n  GOLD_SUPPORT=\"yes\"\n\n# MOLD (Modern Linker) support\n  MOLD_SUPPORT=\"no\"\n\n# default linker (bfd / gold / mold)\n  DEFAULT_LINKER=\"gold\"\n\n# HARDENING (security relevant linker and compiler flags) support\n  HARDENING_SUPPORT=\"no\"\n\n# Default supported get handlers (archive, git, file etc.)\n  GET_HANDLER_SUPPORT=\"archive\"\n\n# use local ccache on build host, if available, for early package\n# builds before ccache has been built\n  LOCAL_CCACHE_SUPPORT=\"yes\"\n\n### OS CONFIGURATION ###\n\n# Install glibc locales to the build (yes / no)\n  GLIBC_LOCALES=\"yes\"\n\n# additional drivers to install:\n# for a list of additional drivers see packages/linux-drivers\n# Space separated list is supported,\n# e.g. ADDITIONAL_DRIVERS=\"DRIVER1 DRIVER2\"\n  ADDITIONAL_DRIVERS=\"RTL8192DU RTL8812AU\"\n\n# Default size of system partition, in MB, eg. 512\n  SYSTEM_SIZE=512\n\n# Default system partition offset, in sectors, eg. 2048\n  SYSTEM_PART_START=8192\n\n# build with swap support (yes / no)\n  SWAP_SUPPORT=\"yes\"\n\n# swap support enabled per default (yes / no)\n  SWAP_ENABLED_DEFAULT=\"no\"\n\n# swapfile size if SWAP_SUPPORT=yes in MB\n  SWAPFILESIZE=\"128\"\n\n# debug tty path\n  DEBUG_TTY=\"/dev/tty3\"\n\n\n### KODI SETTINGS ###\n# Mediacenter to use (kodi / no)\n  MEDIACENTER=\"kodi\"\n\n# Skins to install (Estuary)\n# Space separated list is supported,\n# e.g. SKINS=\"Estuary\"\n  SKINS=\"Estuary\"\n\n# Default Skin (Estuary)\n  SKIN_DEFAULT=\"Estuary\"\n\n# install extra subtitle Fonts for KODI (yes / no)\n  KODI_EXTRA_FONTS=\"yes\"\n\n# build and install PulseAudio support (yes / no)\n  PULSEAUDIO_SUPPORT=\"yes\"\n\n# build and install pipewire support (yes / no)\n  PIPEWIRE_SUPPORT=\"no\"\n\n# build and install eSpeak-NG support (yes / no)\n  ESPEAK_SUPPORT=\"no\"\n\n# build and install with BluRay support (yes / no)\n  KODI_BLURAY_SUPPORT=\"yes\"\n\n# build and install with BD+ support\n# (BD+ decryption support in KODI) (yes / no)\n  BLURAY_BDPLUS_SUPPORT=\"yes\"\n\n# build and install with AACS support\n# (BD decryption support in KODI) (yes / no)\n  BLURAY_AACS_SUPPORT=\"yes\"\n\n# build and install with DVDCSS support\n# (DVD decryption support in KODI) (yes / no)\n  KODI_DVDCSS_SUPPORT=\"yes\"\n\n# build and install bluetooth support (yes / no)\n  BLUETOOTH_SUPPORT=\"yes\"\n\n# build and install with KODI webfrontend (yes / no)\n  KODI_WEBSERVER_SUPPORT=\"yes\"\n\n# build and install Avahi (Zeroconf) daemon (yes / no)\n  AVAHI_DAEMON=\"yes\"\n\n# build with UPnP support (yes / no)\n  KODI_UPNP_SUPPORT=\"yes\"\n\n# build with MySQL support (mariadb / none)\n  KODI_MYSQL_SUPPORT=\"mariadb\"\n\n# build xbmc with optical drive support (yes / no)\n  KODI_OPTICAL_SUPPORT=\"yes\"\n\n# build with AirPlay support (stream videos from iDevices to KODI) (yes / no)\n  KODI_AIRPLAY_SUPPORT=\"yes\"\n\n# build with AirTunes support (stream music from iDevices to KODI) (yes / no)\n  KODI_AIRTUNES_SUPPORT=\"yes\"\n\n# build with libnfs support (mounting nfs shares with KODI) (yes / no)\n  KODI_NFS_SUPPORT=\"yes\"\n\n# build with Samba Client support (mounting SAMBA shares with KODI) (yes / no)\n  KODI_SAMBA_SUPPORT=\"yes\"\n\n# build kodi with alsa support (yes/no)\n  KODI_ALSA_SUPPORT=\"yes\"\n\n# build kodi with pulseaudio support (yes/no)\n  KODI_PULSEAUDIO_SUPPORT=\"yes\"\n\n# build kodi with pipewire support (yes/no)\n  KODI_PIPEWIRE_SUPPORT=\"no\"\n\n### KODI ADDONS ###\n\n# Distribution Specific source location\n  DISTRO_MIRROR=\"http://sources.libreelec.tv/mirror\"\n  DISTRO_SRC=\"http://sources.libreelec.tv/$LIBREELEC_VERSION\"\n\n# Addon Server Url\n  ADDON_SERVER_URL=\"https://addons.libreelec.tv\"\n\n# set the default addon project\n  ADDON_PROJECT=\"${DEVICE:-$PROJECT}\"\n\n# Settings package name - blank if not required\n  DISTRO_PKG_SETTINGS=\"LibreELEC-settings\"\n  DISTRO_PKG_SETTINGS_ID=\"service.libreelec.settings\"\n\n\n### ADDITIONAL PROGRAMS / FUNCTIONS ###\n\n# Testpackages for development (yes / no)\n  TESTING=\"no\"\n\n# Configure debug groups (space delimited key=value pairs, with each value comma-delimited) and default group when DEBUG=yes\n# Use ! or - prefix to prevent a dependent package from being built with debug. Add + suffix to build dependenencies with debug.\n  DEBUG_GROUPS=\"kodi+=kodi+,kodi-platform+,p8-platform+,!mesa\"\n  DEBUG_GROUP_YES=\"kodi+\"\n\n# wireless daemon to use (wpa_supplicant/iwd)\n  WIRELESS_DAEMON=\"iwd\"\n\n# build and install iSCSI support - iscsistart (yes / no)\n  ISCSI_SUPPORT=\"no\"\n\n# build with NFS support (mounting nfs shares via the OS) (yes / no)\n  NFS_SUPPORT=\"yes\"\n\n# build with Samba Client support (mounting samba shares via the OS) (yes / no)\n  SAMBA_SUPPORT=\"yes\"\n\n# build and install Samba Server (yes / no)\n  SAMBA_SERVER=\"yes\"\n\n# build and install SFTP Server (yes / no)\n  SFTP_SERVER=\"yes\"\n\n# build and install OpenVPN support (yes / no)\n  OPENVPN_SUPPORT=\"yes\"\n\n# build and install WireGuard support (yes / no)\n  WIREGUARD_SUPPORT=\"yes\"\n\n# build and install diskmounter support (udevil)\n# this service provide auto mounting support for external drives in the\n# mediacenter also automount internally drives at boottime via udev (yes / no)\n  UDEVIL=\"yes\"\n\n# Support for partitioning and formating disks in initramfs (yes / no)\n# This adds support for parted and mkfs.ext3/4 to initramfs for OEM usage\n  INITRAMFS_PARTED_SUPPORT=\"no\"\n\n# build and install hfs filesystem utilities (yes / no)\n  HFSTOOLS=\"yes\"\n\n# build and install nano text editor (yes / no)\n  NANO_EDITOR=\"yes\"\n\n# cron support (yes / no)\n  CRON_SUPPORT=\"yes\"\n\n# build with installer (yes / no)\n  INSTALLER_SUPPORT=\"yes\"\n\n# build and install remote support (yes / no)\n  REMOTE_SUPPORT=\"yes\"\n\n# IR remote keymaps supported in default config\n  IR_REMOTE_KEYMAPS=\"rc6_mce xbox_360 xbox_one\"\n\n# build and install Joystick support (yes / no)\n  JOYSTICK_SUPPORT=\"yes\"\n\n# build and install CEC adapter support (yes / no)\n  CEC_SUPPORT=\"yes\"\n\n# build and install CEC framework support (yes / no)\n  CEC_FRAMEWORK_SUPPORT=\"no\"\n\n# OEM packages for OEM's (yes / no)\n  OEM_SUPPORT=\"no\"\n\n# build and install ALSA Audio support (yes / no)\n  ALSA_SUPPORT=\"yes\"\n\n# additional packages to install:\n# Space separated list is supported,\n# e.g. ADDITIONAL_PACKAGES=\"PACKAGE1 PACKAGE2\"\n  ADDITIONAL_PACKAGES=\"\"\n"
  },
  {
    "path": "distributions/LibreELEC/show_config",
    "content": "show_distro_config() {\n  # Hardware decoder support\n\n  config_message+=\"\\n\\n Kodi Hardware configuration:\"\n  config_message+=\"\\n ${dashes}${dashes}\"\n\n  config_message+=\"\\n - Video Acceleration provider:\\t\\t ${KODIPLAYER_DRIVER}\"\n\n  # Input device configuration\n\n  config_message+=\"\\n - Remote support:\\t\\t\\t ${REMOTE_SUPPORT}\"\n  config_message+=\"\\n - CEC Adapter support:\\t\\t\\t ${CEC_SUPPORT}\"\n  config_message+=\"\\n - CEC Framework support:\\t\\t ${CEC_FRAMEWORK_SUPPORT}\"\n  config_message+=\"\\n - Kodi Joystick support:\\t\\t ${JOYSTICK_SUPPORT}\"\n\n  # Kodi configuration\n\n  config_message+=\"\\n\\n Kodi Software configuration:\"\n  config_message+=\"\\n ${dashes}${dashes}\"\n\n  config_message+=\"\\n - Kodi Blu-ray support:\\t\\t ${KODI_BLURAY_SUPPORT}\"\n  if [ \"${KODI_BLURAY_SUPPORT}\" = \"yes\" ] ; then\n    config_message+=\"\\n   - Blu-ray BD+ support:\\t\\t ${BLURAY_BDPLUS_SUPPORT}\"\n    config_message+=\"\\n   - Blu-ray AACS support:\\t\\t ${BLURAY_AACS_SUPPORT}\"\n  fi\n  config_message+=\"\\n - Kodi DVDCSS support:\\t\\t\\t ${KODI_DVDCSS_SUPPORT}\"\n  config_message+=\"\\n - Kodi Airplay support:\\t\\t ${KODI_AIRPLAY_SUPPORT}\"\n  config_message+=\"\\n - Kodi Airtunes support:\\t\\t ${KODI_AIRTUNES_SUPPORT}\"\n  config_message+=\"\\n - Kodi NFS support:\\t\\t\\t ${KODI_NFS_SUPPORT}\"\n  config_message+=\"\\n - Kodi MySQL support:\\t\\t\\t ${KODI_MYSQL_SUPPORT}\"\n  config_message+=\"\\n - Kodi Optical Drive support:\\t\\t ${KODI_OPTICAL_SUPPORT}\"\n  config_message+=\"\\n - Kodi SAMBA client support:\\t\\t ${KODI_SAMBA_SUPPORT}\"\n  config_message+=\"\\n - Kodi UPNP support:\\t\\t\\t ${KODI_UPNP_SUPPORT}\"\n  config_message+=\"\\n - Kodi Webserver support:\\t\\t ${KODI_WEBSERVER_SUPPORT}\"\n\n  for config_skin in ${SKINS}; do\n    config_message+=\"\\n - Include Skin:\\t\\t\\t ${config_skin}\"\n  done\n\n  config_message+=\"\\n - Default Skin:\\t\\t\\t ${SKIN_DEFAULT}\"\n  config_message+=\"\\n - Include extra fonts:\\t\\t\\t ${KODI_EXTRA_FONTS}\"\n}\n"
  },
  {
    "path": "distributions/LibreELEC/version",
    "content": "# VERSION: set full version, use \"devel\" for development version\n  LIBREELEC_VERSION=\"devel\"\n\n# OS_VERSION: OS Version\n  OS_VERSION=\"11.0\"\n\n# ADDON_VERSION: Addon version\n  ADDON_VERSION=\"11.0.0\"\n"
  },
  {
    "path": "licenses/7-Zip.txt",
    "content": "  7-Zip source code\n  ~~~~~~~~~~~~~~~~~\n  License for use and distribution\n  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n  7-Zip Copyright (C) 1999-2020 Igor Pavlov.\n\n  The licenses for files are:\n\n    1) CPP/7zip/Compress/Rar* files: the \"GNU LGPL\" with \"unRAR license restriction\"\n    2) CPP/7zip/Compress/LzfseDecoder.cpp: the \"BSD 3-clause License\"\n    3) Some files are \"public domain\" files, if \"public domain\" status is stated in source file.\n    4) the \"GNU LGPL\" for all other files. If there is no license information in \n       some source file, that file is under the \"GNU LGPL\".\n\n  The \"GNU LGPL\" with \"unRAR license restriction\" means that you must follow both \n  \"GNU LGPL\" rules and \"unRAR license restriction\" rules.\n\n\n\n\n  GNU LGPL information\n  --------------------\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n\n\n\n\n  BSD 3-clause License\n  --------------------\n\n    The \"BSD 3-clause License\" is used for the code in LzfseDecoder.cpp that implements LZFSE data decompression.\n    That code was derived from the code in the \"LZFSE compression library\" developed by Apple Inc,\n    that also uses the \"BSD 3-clause License\":\n\n    ----\n    Copyright (c) 2015-2016, Apple Inc. All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n    1.  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n    2.  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer\n        in the documentation and/or other materials provided with the distribution.\n\n    3.  Neither the name of the copyright holder(s) nor the names of any contributors may be used to endorse or promote products derived\n        from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n    COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n    ----\n\n\n\n\n  unRAR license restriction\n  -------------------------\n\n    The decompression engine for RAR archives was developed using source \n    code of unRAR program.\n    All copyrights to original unRAR code are owned by Alexander Roshal.\n\n    The license for original unRAR code has the following restriction:\n\n    The unRAR sources cannot be used to re-create the RAR compression algorithm, \n    which is proprietary. Distribution of modified unRAR sources in separate form \n    or as a part of other software is permitted, provided that it is clearly\n    stated in the documentation and source comments that the code may\n    not be used to develop a RAR (WinRAR) compatible archiver.\n\n\n  --\n  Igor Pavlov\n"
  },
  {
    "path": "licenses/APL-1.0.txt",
    "content": "ADAPTIVE PUBLIC LICENSE\nVersion 1.0\n\nTHE LICENSED WORK IS PROVIDED UNDER THE TERMS OF THIS ADAPTIVE PUBLIC LICENSE\n(\"LICENSE\"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE LICENSED WORK CONSTITUTES\nRECIPIENT'S ACCEPTANCE OF THIS LICENSE AND ITS TERMS, WHETHER OR NOT SUCH\nRECIPIENT READS THE TERMS OF THIS LICENSE. \"LICENSED WORK\" AND \"RECIPIENT\"\nARE DEFINED BELOW.\n\nIMPORTANT NOTE: This License is \"adaptive\", and the generic version or another\nversion of an Adaptive Public License should not be relied upon to determine\nyour rights and obligations under this License. You must read the specific\nAdaptive Public License that you receive with the Licensed Work, as certain\nterms are defined at the outset by the Initial Contributor.\n\nSee Section 2.2 below, Exhibit A attached, and any Suppfile.txt accompanying\nthis License to determine the specific adaptive features applicable to this\nLicense. For example, without limiting the foregoing, (a) for selected choice\nof law and jurisdiction see Part 3 of Exhibit A; (b) for the selected definition\nof Third Party see Part 4 of Exhibit A; and (c) for selected patent licensing\nterms (if any) see Section 2.2 below and Part 6 of Exhibit A.\n\n1. DEFINITIONS.\n\n1.1. \"CONTRIBUTION\" means:\n\n(a) In the case of the Initial Contributor, the Initial Work distributed under\nthis License by the Initial Contributor; and\n(b) In the case of each Subsequent Contributor, the Subsequent Work originating\nfrom and distributed by such Subsequent Contributor.\n\n1.2. \"DESIGNATED WEB SITE\" means the web site having the URL identified in\nPart 1 of Exhibit A, which URL may be changed by the Initial Contributor by\nposting on the current Designated Web Site the new URL for at least sixty\n(60) days.\n\n1.3. \"DISTRIBUTOR\" means any Person that distributes the Licensed Work or\nany portion thereof to at least one Third Party.\n\n1.4. \"ELECTRONIC DISTRIBUTION MECHANISM\" means any mechanism generally accepted\nin the software development community for the electronic transfer of data.\n\n1.5. \"EXECUTABLE\" means the Licensed Work in any form other than Source Code.\n\n1.6. \"GOVERNING JURISDICTION\" means the state, province or other legal jurisdiction\nidentified in Part 3 of Exhibit A.\n\n1.7. \"INDEPENDENT MODULE\" means a separate module of software and/or data\nthat is not a derivative work of or copied from the Licensed Work or any portion\nthereof. In addition, a module does not qualify as an Independent Module but\ninstead forms part of the Licensed Work if the module: (a) is embedded in\nthe Licensed Work; (b) is included by reference in the Licensed Work other\nthan by a function call or a class reference; or (c) must be included or contained,\nin whole or in part, within a file directory or subdirectory actually containing\nfiles making up the Licensed Work.\n\n1.8. \"INITIAL CONTRIBUTOR\" means the Person or entity identified as the Initial\nContributor in the notice required by Part 1 of Exhibit A.\n\n1.9. \"INITIAL WORK\" means the initial Source Code, object code (if any) and\ndocumentation for the computer program identified in Part 2 of Exhibit A,\nas such Source Code, object code and documentation is distributed under this\nLicense by the Initial Contributor.\n\n1.10. \"LARGER WORK\" means a work that combines the Licensed Work or portions\nthereof with code not governed by this License.\n\n1.11. \"LICENSED WORK\" means the Initial Work and/or any Subsequent Work, in\neach case including portions thereof.\n\n1.12. \"LICENSE NOTICE\" has the meaning assigned in Part 5 of Exhibit A.\n\n1.13. \"MODIFICATION\" or \"MODIFICATIONS\" means any change to and/or addition\nto the Licensed Work.\n\n1.14. \"PERSON\" means an individual or other legal entity, including a corporation,\npartnership or other body.\n\n1.15. \"RECIPIENT\" means any Person who receives or obtains the Licensed Work\nunder this License (by way of example, without limiting the foregoing, any\nSubsequent Contributor or Distributor).\n\n1.16. \"SOURCE CODE\" means the source code for a computer program, including\nthe source code for all modules and components of the computer program, plus\nany associated interface definition files, and scripts used to control compilation\nand installation of an executable.\n\n1.17. \"SUBSEQUENT CONTRIBUTOR\" means any Person that makes or contributes\nto the making of any Subsequent Work and that distributes that Subsequent\nWork to at least one Third Party.\n\n1.18. \"SUBSEQUENT WORK\" means a work that has resulted or arises from changes\nto and/or additions to:\n\n     (a) the Initial Work;\n     (b) any other Subsequent Work; or\n(c) to any combination of the Initial Work and any such other Subsequent Work;\nwhere such changes and/or additions originate from a Subsequent Contributor.\nA Subsequent Work will \"originate\" from a Subsequent Contributor if the Subsequent\nWork was a result of efforts by such Subsequent Contributor (or anyone acting\non such Subsequent Contributor's behalf, such as, a contractor or other entity\nthat is engaged by or under the direction of the Subsequent Contributor).\nFor greater certainty, a Subsequent Work expressly excludes and shall not\ncapture within its meaning any Independent Module.\n\n1.19. \"SUPPLEMENT FILE\" means a file distributed with the Licensed Work having\na file name \"suppfile.txt\".\n\n1.20. \"THIRD PARTY\" has the meaning assigned in Part 4 of Exhibit A.\n\n2. LICENSE.\n\n2.1. COPYRIGHT LICENSE FROM INITIAL AND SUBSEQUENT CONTRIBUTORS.\n\n(a) Subject to the terms of this License, the Initial Contributor hereby grants\neach Recipient a world-wide, royalty-free, non-exclusive copyright license\nto:\n\n(i) reproduce, prepare derivative works of, publicly display, publicly perform,\ndistribute and sublicense the Initial Work; and\n(ii) reproduce, publicly display, publicly perform, distribute, and sublicense\nany derivative works (if any) prepared by Recipient;\nin Source Code and Executable form, either with other Modifications, on an\nunmodified basis, or as part of a Larger Work.\n\n(b) Subject to the terms of this License, each Subsequent Contributor hereby\ngrants each Recipient a world-wide, royalty-free, non-exclusive copyright\nlicense to:\n\n(i) reproduce, prepare derivative works of, publicly display, publicly perform,\ndistribute and sublicense the Subsequent Work of such Subsequent Contributor;\nand\n(ii) reproduce, publicly display, publicly perform, distribute, and sublicense\nany derivative works (if any) prepared by Recipient;\nin Source Code and Executable form, either with other Modifications, on an\nunmodified basis, or as part of a Larger Work.\n\n2.2. PATENT LICENSE FROM INITIAL AND SUBSEQUENT CONTRIBUTORS.\n\n(a) This License does not include or grant any patent license whatsoever from\nthe Initial Contributor, Subsequent Contributor, or any Distributor unless,\nat the time the Initial Work is first distributed or made available under\nthis License (as the case may be), the Initial Contributor has selected pursuant\nto Part 6 of Exhibit A the patent terms in paragraphs A, B, C, D and E from\nPart 6 of Exhibit A. If this is not done then the Initial Work and any other\nSubsequent Work is made available under the License without any patent license\n(the \"PATENTS-EXCLUDED LICENSE\").\n(b) However, the Initial Contributor may subsequently distribute or make available\n(as the case may be) future copies of: (1) the Initial Work; or (2) any Licensed\nWork distributed by the Initial Contributor which includes the Initial Work\n(or any portion thereof) and/or any Modification made by the Initial Contributor;\navailable under a License which includes a patent license (the \"PATENTS-INCLUDED\nLICENSE\") by selecting pursuant to Part 6 of Exhibit A the patent terms in\nparagraphs A, B, C, D and E from Part 6 of Exhibit A, when the Initial Contributor\ndistributes or makes available (as the case may be) such future copies under\nthis License.\n(c) If any Recipient receives or obtains one or more copies of the Initial\nWork or any other portion of the Licensed Work under the Patents-Included\nLicense, then all licensing of such copies under this License shall include\nthe terms in paragraphs A, B, C, D and E from Part 6 of Exhibit A and that\nRecipient shall not be able to rely upon the Patents-Excluded License for\nany such copies. However, all Recipients that receive one or more copies of\nthe Initial Work or any other portion of the Licensed Work under a copy of\nthe License which includes the Patents-Excluded License shall have no patent\nlicense with respect to such copies received under the Patents-Excluded License\nand availability and distribution of such copies, including Modifications\nmade by such Recipient to such copies, shall be under a copy of the License\nwithout any patent license.\n(d) Where a Recipient uses in combination or combines any copy of the Licensed\nWork (or portion thereof) licensed under a copy of the License having a Patents-Excluded\nLicense with any copy of the Licensed Work (or portion thereof) licensed under\na copy of the License having a Patents-Included License, the combination (and\nany portion thereof) shall, from the first time such Recipient uses, makes\navailable or distributes the combination (as the case may be), be subject\nto only the terms of the License having the Patents-Included License which\nshall include the terms in paragraphs A, B, C, D and E from Part 6 of Exhibit\nA.\n\n2.3. ACKNOWLEDGEMENT AND DISCLAIMER.\nRecipient understands and agrees that although Initial Contributor and each\nSubsequent Contributor grants the licenses to its Contributions set forth\nherein, no representation, warranty, guarantee or assurance is provided by\nany Initial Contributor, Subsequent Contributor, or Distributor that the Licensed\nWork does not infringe the patent or other intellectual property rights of\nany other entity. Initial Contributor, Subsequent Contributor, and each Distributor\ndisclaims any liability to Recipient for claims brought by any other entity\nbased on infringement of intellectual property rights or otherwise, in relation\nto the Licensed Works. As a condition to exercising the rights and licenses\ngranted hereunder, each Recipient hereby assumes sole responsibility to secure\nany other intellectual property rights needed, if any. For example, without\nlimiting the foregoing disclaimers, if a third party patent license is required\nto allow Recipient to distribute the Licensed Work, it is Recipient's responsibility\nto acquire that license before distributing the Licensed Work.\n\n2.4. RESERVATION.\nNothing in this License shall be deemed to grant any rights to trademarks,\ncopyrights, patents, trade secrets or any other intellectual property of Initial\nContributor, Subsequent Contributor, or Distributor except as expressly stated\nherein.\n\n3. DISTRIBUTION OBLIGATIONS.\n\n3.1. DISTRIBUTION GENERALLY.\n\n(a) A Subsequent Contributor shall make that Subsequent Contributor's Subsequent\nWork(s) available to the public via an Electronic Distribution Mechanism for\na period of at least twelve (12) months. The aforesaid twelve (12) month period\nshall begin within a reasonable time after the creation of the Subsequent\nWork and no later than sixty (60) days after first distribution of that Subsequent\nContributor's Subsequent Work.\n(b) All Distributors must distribute the Licensed Work in accordance with\nthe terms of the License, and must include a copy of this License (including\nwithout limitation Exhibit A and the accompanying Supplement File) with each\ncopy of the Licensed Work distributed. In particular, this License must be\nprominently distributed with the Licensed Work in a file called \"license.txt.\"\nIn addition, the License Notice in Part 5 of Exhibit A must be included at\nthe beginning of all Source Code files, and viewable to a user in any executable\nsuch that the License Notice is reasonably brought to the attention of any\nparty using the Licensed Work.\n\n3.2. EXECUTABLE DISTRIBUTIONS OF THE LICENSED WORK.\nA Distributor may choose to distribute the Licensed Work, or any portion thereof,\nin Executable form (an \"EXECUTABLE DISTRIBUTION\") to any third party, under\nthe terms of Section 2 of this License, provided the Executable Distribution\nis made available under and accompanied by a copy of this License, AND provided\nat least ONE of the following conditions is fulfilled:\n\n(a) The Executable Distribution must be accompanied by the Source Code for\nthe Licensed Work making up the Executable Distribution, and the Source Code\nmust be distributed on the same media as the Executable Distribution or using\nan Electronic Distribution Mechanism; or\n(b) The Executable Distribution must be accompanied with a written offer,\nvalid for at least thirty six (36) months, to give any third party under the\nterms of this License, for a charge no more than the cost of physically performing\nsource distribution, a complete machine-readable copy of the Source Code for\nthe Licensed Work making up the Executable Distribution, to be available and\ndistributed using an Electronic Distribution Mechanism, and such Executable\nDistribution must remain available in Source Code form to any third party\nvia the Electronic Distribution Mechanism (or any replacement Electronic Distribution\nMechanism the particular Distributor may reasonably need to turn to as a substitute)\nfor said at least thirty six (36) months.\n\nFor greater certainty, the above-noted requirements apply to any Licensed\nWork or portion thereof distributed to any third party in Executable form,\nwhether such distribution is made alone, in combination with a Larger Work\nor Independent Modules, or in some other combination.\n\n3.3. SOURCE CODE DISTRIBUTIONS.\nWhen a Distributor makes the Licensed Work, or any portion thereof, available\nto any Person in Source Code form, it must be made available under this License\nand a copy of this License must be included with each copy of the Source Code,\nsituated so that the copy of the License is conspicuously brought to the attention\nof that Person. For greater clarification, this Section 3.3 applies to all\ndistribution of the Licensed Work in any Source Code form. A Distributor may\ncharge a fee for the physical act of transferring a copy, which charge shall\nbe no more than the cost of physically performing source distribution.\n\n3.4. REQUIRED NOTICES IN SOURCE CODE.\nEach Subsequent Contributor must ensure that the notice set out in Part 5\nof Exhibit A is included in each file of the Source Code for each Subsequent\nWork originating from that particular Subsequent Contributor, if such notice\nis not already included in each such file. If it is not possible to put such\nnotice in a particular Source Code file due to its structure, then the Subsequent\nContributor must include such notice in a location (such as a relevant directory\nin which the file is stored) where a user would be likely to look for such\na notice.\n\n3.5. NO DISTRIBUTION REQUIREMENTS FOR INTERNALLY USED MODIFICATIONS.\nNotwithstanding Sections 3.2, 3.3 and 3.4, Recipient may, internally within\nits own corporation or organization use the Licensed Work, including the Initial\nWork and Subsequent Works, and make Modifications for internal use within\nRecipient's own corporation or organization (collectively, \"INTERNAL USE MODIFICATIONS\").\nThe Recipient shall have no obligation to distribute, in either Source Code\nor Executable form, any such Internal Use Modifications made by Recipient\nin the course of such internal use, except where required below in this Section\n3.5. All Internal Use Modifications distributed to any Person, whether or\nnot a Third Party, shall be distributed pursuant to and be accompanied by\nthe terms of this License. If the Recipient chooses to distribute any such\nInternal Use Modifications to any Third Party, then the Recipient shall be\ndeemed a Subsequent Contributor, and any such Internal Use Modifications distributed\nto any Third Party shall be deemed a Subsequent Work originating from that\nSubsequent Contributor, and shall from the first such instance become part\nof the Licensed Work that must thereafter be distributed and made available\nto third parties in accordance with the terms of Sections 3.1 to 3.4 inclusive.\n\n3.6. INDEPENDENT MODULES.\nThis License shall not apply to Independent Modules of any Initial Contributor,\nSubsequent Contributor, Distributor or any Recipient, and such Independent\nModules may be licensed or made available under one or more separate license\nagreements.\n\n3.7. LARGER WORKS.\nAny Distributor or Recipient may create or contribute to a Larger Work by\ncombining any of the Licensed Work with other code not governed by the terms\nof this License, and may distribute the Larger Work as one or more products.\nHowever, in any such case, Distributor or Recipient (as the case may be) must\nmake sure that the requirements of this License are fulfilled for the Licensed\nWork portion of the Larger Work.\n\n3.8. DESCRIPTION OF DISTRIBUTED MODIFICATIONS.\n\n(a) Each Subsequent Contributor (including the Initial Contributor where the\nInitial Contributor also qualifies as a Subsequent Contributor) must cause\neach Subsequent Work created or contributed to by that Subsequent Contributor\nto contain a file documenting the changes, in accordance with the requirements\nof Part 1 of the Supplement File, that such Subsequent Contributor made in\nthe creation or contribution to that Subsequent Work. If no Supplement File\nexists or no requirements are set out in Part 1 of the Supplement File, then\nthere are no requirements for Subsequent Contributors to document changes\nthat they make resulting in Subsequent Works.\n(b) The Initial Contributor may at any time introduce requirements or add\nto or change earlier requirements (in each case, the \"EARLIER DESCRIPTION\nREQUIREMENTS\") for documenting changes resulting in Subsequent Works by revising\nPart 1 of each copy of the Supplement File distributed by the Initial Contributor\nwith future copies of the Licensed Work so that Part 1 then contains new requirements\n(the \"NEW DESCRIPTION REQUIREMENTS\") for documenting such changes.\n(c) Any Recipient receiving at any time any copy of an Initial Work or any\nSubsequent Work under a copy of this License (in each case, an \"Earlier LICENSED\nCOPY\") having the Earlier Description Requirements may choose, with respect\nto each such Earlier Licensed Copy, to comply with the Earlier Description\nRequirements or the New Description Requirements. Where a Recipient chooses\nto comply with the New Description Requirements, that Recipient will, when\nthereafter distributing any copies of any such Earlier Licensed Copy, include\na Supplement File having a section entitled Part 1 that contains a copy of\nthe New Description Requirements.\n(d) For greater certainty, the intent of Part 1 of the Supplement File is\nto provide a mechanism (if any) by which Subsequent Contributors must document\nchanges that they make to the Licensed Work resulting in Subsequent Works.\nPart 1 of any Supplement File shall not be used to increase or reduce the\nscope of the license granted in Article 2 of this License or in any other\nway increase or decrease the rights and obligations of any Recipient, and\nshall at no time serve as the basis for terminating the License. Further,\na Recipient can be required to correct and change its documentation procedures\nto comply with Part 1 of the Supplement File, but cannot be penalised with\ndamages. Part 1 of any Supplement File is only binding on each Recipient of\nany Licensed Work to the extent Part 1 sets out the requirements for documenting\nchanges to the Initial Work or any Subsequent Work.\n(e) An example of a set of requirements for documenting changes and contributions\nmade by Subsequent Contributor is set out in Part 7 of Exhibit A of this License.\nPart 7 is a sample only and is not binding on Recipients, unless (subject\nto the earlier paragraphs of this Section 3.8) those are the requirements\nthat the Initial Contributor includes in Part 1 of the Supplement File with\nthe copies of the Initial Work distributed under this License.\n\n3.9. USE OF DISTRIBUTOR NAME.\nThe name of a Distributor may not be used by any other Distributor to endorse\nor promote the Licensed Work or products derived from the Licensed Work, without\nprior written permission.\n\n3.10. LIMITED RECOGNITION OF INITIAL CONTRIBUTOR.\n\n(a) As a modest attribution to the Initial Contributor, in the hope that its\npromotional value may help justify the time, money and effort invested in\nwriting the Initial Work, the Initial Contributor may include in Part 2 of\nthe Supplement File a requirement that each time an executable program resulting\nfrom the Initial Work or any Subsequent Work, or a program dependent thereon,\nis launched or run, a prominent display of the Initial Contributor's attribution\ninformation must occur (the \"ATTRIBUTION INFORMATION\"). The Attribution Information\nmust be included at the beginning of each Source Code file. For greater certainty,\nthe Initial Contributor may specify in the Supplement File that the above\nattribution requirement only applies to an executable program resulting from\nthe Initial Work or any Subsequent Work, but not a program dependent thereon.\nThe intent is to provide for reasonably modest attribution, therefore the\nInitial Contributor may not require Recipients to display, at any time, more\nthan the following Attribution Information: (a) a copyright notice including\nthe name of the Initial Contributor; (b) a word or one phrase (not exceeding\n10 words); (c) one digital image or graphic provided with the Initial Work;\nand (d) a URL (collectively, the \"ATTRIBUTION LIMITS\").\n(b) If no Supplement File exists, or no Attribution Information is set out\nin Part 2 of the Supplement File, then there are no requirements for Recipients\nto display any Attribution Information of the Initial Contributor.\n(c) Each Recipient acknowledges that all trademarks, service marks and/or\ntrade names contained within Part 2 of the Supplement File distributed with\nthe Licensed Work are the exclusive property of the Initial Contributor and\nmay only be used with the permission of the Initial Contributor, or under\ncircumstances otherwise permitted by law, or as expressly set out in this\nLicense.\n3.11. For greater certainty, any description or attribution provisions contained\nwithin a Supplement File may only be used to specify the nature of the description\nor attribution requirements, as the case may be. Any provision in a Supplement\nFile that otherwise purports to modify, vary, nullify or amend any right,\nobligation or representation contained herein shall be deemed void to that\nextent, and shall be of no force or effect.\n\n4. COMMERCIAL USE AND INDEMNITY.\n\n4.1. COMMERCIAL SERVICES.\nA Recipient (\"COMMERCIAL RECIPIENT\") may choose to offer, and to charge a\nfee for, warranty, support, indemnity or liability obligations (collectively,\n\"SERVICES\") to one or more other Recipients or Distributors. However, such\nCommercial Recipient may do so only on that Commercial Recipient's own behalf,\nand not on behalf of any other Distributor or Recipient, and Commercial Recipient\nmust make it clear than any such warranty, support, indemnity or liability\nobligation(s) is/are offered by Commercial Recipient alone. At no time may\nCommercial Recipient use any Services to deny any party the Licensed Work\nin Source Code or Executable form when so required under any of the other\nterms of this License. For greater certainty, this Section 4.1 does not diminish\nany of the other terms of this License, including without limitation the obligation\nof the Commercial Recipient as a Distributor, when distributing any of the\nLicensed Work in Source Code or Executable form, to make such distribution\nroyalty-free (subject to the right to charge a fee of no more than the cost\nof physically performing Source Code or Executable distribution (as the case\nmay be)).\n\n4.2. INDEMNITY.\nCommercial distributors of software may accept certain responsibilities with\nrespect to end users, business partners and the like. While this License is\nintended to facilitate the commercial use of the Licensed Work, the Distributor\nwho includes any of the Licensed Work in a commercial product offering should\ndo so in a manner which does not create potential liability for other Distributors.\nTherefore, if a Distributor includes the Licensed Work in a commercial product\noffering or offers any Services, such Distributor (\"COMMERCIAL DISTRIBUTOR\")\nhereby agrees to defend and indemnify every other Distributor or Subsequent\nContributor (in each case an \"INDEMNIFIED PARTY\") against any losses, damages\nand costs (collectively \"LOSSES\") arising from claims, lawsuits and other\nlegal actions brought by a third party against the Indemnified Party to the\nextent caused by the acts or omissions of such Commercial Distributor in connection\nwith its distribution of any of the Licensed Work in a commercial product\noffering or in connection with any Services. The obligations in this section\ndo not apply to any claims or Losses relating to any actual or alleged intellectual\nproperty infringement. In order to qualify, an Indemnified Party must: (a)\npromptly notify the Commercial Distributor in writing of such claim; and (b)\nallow the Commercial Distributor to control, and co-operate with the Commercial\nDistributor in, the defense and any related settlement negotiations. The Indemnified\nParty may participate in any such claim at its own expense.\n\n5. VERSIONS OF THE LICENSE.\n\n5.1. NEW VERSIONS.\nThe Initial Contributor may publish revised and/or new versions of the License\nfrom time to time. Each version will be given a distinguishing version number.\n\n5.2. EFFECT OF NEW VERSIONS.\nOnce the Licensed Work or any portion thereof has been published by Initial\nContributor under a particular version of the License, Recipient may choose\nto continue to use it under the terms of that version. However, if a Recipient\nchooses to use the Licensed Work under the terms of any subsequent version\nof the License published by the Initial Contributor, then from the date of\nmaking this choice, the Recipient must comply with the terms of that subsequent\nversion with respect to all further reproduction, preparation of derivative\nworks, public display of, public performance of, distribution and sublicensing\nby the Recipient in connection with the Licensed Work. No one other than the\nInitial Contributor has the right to modify the terms applicable to the Licensed\nWork\n\n6. DISCLAIMER OF WARRANTY.\n\n6.1. GENERAL DISCLAIMER.\nEXCEPT AS EXPRESSLY SET FORTH IN THIS LICENSE, THE LICENSED WORK IS PROVIDED\nUNDER THIS LICENSE ON AN \"AS IS\" BASIS, WITHOUT ANY REPRESENTATION, WARRANTY,\nGUARANTEE, ASSURANCE OR CONDITION OF ANY KIND, EITHER EXPRESSED OR IMPLIED,\nINCLUDING, WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,\nMERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO\nTHE QUALITY AND PERFORMANCE OF THE LICENSED WORK IS WITH RECIPIENT. SHOULD\nANY LICENSED WORK PROVE DEFECTIVE IN ANY RESPECT, RECIPIENT (NOT THE INITIAL\nCONTRIBUTOR OR ANY SUBSEQUENT CONTRIBUTOR) ASSUMES THE COST OF ANY NECESSARY\nSERVICING, REPAIR OR CORRECTION. THIS CLAUSE CONSTITUTES AN ESSENTIAL PART\nOF THIS LICENSE. NO USE OF ANY LICENSED WORK IS AUTHORIZED HEREUNDER EXCEPT\nUNDER THIS LICENSE INCLUDING WITHOUT LIMITATION THIS DISCLAIMER.\n\n6.2. RESPONSIBILITY OF RECIPIENTS.\nEach Recipient is solely responsible for determining the appropriateness of\nusing and distributing the Licensed Work and assumes all risks associated\nwith its exercise of rights under this License, including but not limited\nto the risks and costs of program errors, compliance with applicable laws,\ndamage to or loss of data, programs or equipment, and unavailability or interruption\nof operations.\n\n7. TERMINATION.\n\n7.1. This License shall continue until terminated in accordance with the express\nterms herein.\n\n7.2. Recipient may choose to terminate this License automatically at any time.\n\n7.3. This License, including without limitation the rights granted hereunder\nto a particular Recipient, will terminate automatically if such Recipient\nis in material breach of any of the terms of this License and fails to cure\nsuch breach within sixty (60) days of becoming aware of the breach. Without\nlimiting the foregoing, any material breach by such Recipient of any term\nof any other License under which such Recipient is granted any rights to the\nLicensed Work shall constitute a material breach of this License.\n\n7.4. Upon termination of this License by or with respect to a particular Recipient\nfor any reason, all rights granted hereunder and under any other License to\nthat Recipient shall terminate. However, all sublicenses to the Licensed Work\nwhich were previously properly granted by such Recipient under a copy of this\nLicense (in each case, an \"Other License\" and in plural, \"Other Licenses\")\nshall survive any such termination of this License, including without limitation\nthe rights and obligations under such Other Licenses as set out in their respective\nSections 2, 3, 4, 5, 6, 7 and 8, mutatis mutandis, for so long as the respective\nsublicensees (i.e. other Recipients) remain in compliance with the terms of\nthe copy of this License under which such sublicensees received rights to\nthe Licensed Work. Any termination of such Other Licenses shall be pursuant\nto their respective Section 7, mutatis mutandis. Provisions which, by their\nnature, must remain in effect beyond the termination of this License shall\nsurvive.\n\n7.5. Upon any termination of this License by or with respect to a particular\nRecipient, Sections 4.1, 4.2, 6.1, 6.2, 7.4, 7.5, 8.1, and 8.2, together with\nall provisions of this License necessary for the interpretation and enforcement\nof same, shall expressly survive such termination.\n\n8. LIMITATION OF LIABILITY.\n\n8.1. IN NO EVENT SHALL ANY OF INITIAL CONTRIBUTOR, ITS SUBSIDIARIES, OR AFFILIATES,\nOR ANY OF ITS OR THEIR RESPECTIVE OFFICERS, DIRECTORS, EMPLOYEES, AND/OR AGENTS\n(AS THE CASE MAY BE), HAVE ANY LIABILITY FOR ANY DIRECT DAMAGES, INDIRECT\nDAMAGES, PUNITIVE DAMAGES, INCIDENTAL DAMAGES, SPECIAL DAMAGES, EXEMPLARY\nDAMAGES, CONSEQUENTIAL DAMAGES OR ANY OTHER DAMAGES WHATSOEVER (INCLUDING\nWITHOUT LIMITATION LOSS OF USE, DATA OR PROFITS, OR ANY OTHER LOSS ARISING\nOUT OF OR IN ANY WAY RELATED TO THE USE, INABILITY TO USE, UNAUTHORIZED USE,\nPERFORMANCE, OR NON-PERFORMANCE OF THE LICENSED WORK OR ANY PART THEREOF OR\nTHE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES, OR THAT RESULT FROM\nERRORS, DEFECTS, OMISSIONS, DELAYS IN OPERATION OR TRANSMISSION, OR ANY OTHER\nFAILURE OF PERFORMANCE), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\nIN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nIN RELATION TO OR ARISING IN ANY WAY OUT OF THIS LICENSE OR THE USE OR DISTRIBUTION\nOF THE LICENSED WORK OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN\nIF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY\nSHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH\nPARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION.\nTHIS CLAUSE CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY LICENSED\nWORK IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS LICENSE INCLUDING WITHOUT LIMITATION\nTHE LIMITATIONS SET FORTH IN THIS SECTION 8.1.\n\n8.2. EXCEPT AS EXPRESSLY SET FORTH IN THIS LICENSE, EACH RECIPIENT SHALL NOT\nHAVE ANY LIABILITY FOR ANY EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING\nWITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\nWHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE LICENSED WORK OR\nTHE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY\nOF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY\nFOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE\nEXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION.\n\n9. GOVERNING LAW AND LEGAL ACTION.\n\n9.1. This License shall be governed by and construed in accordance with the\nlaws of the Governing Jurisdiction assigned in Part 3 of Exhibit A, without\nregard to its conflict of law provisions. No party may bring a legal action\nunder this License more than one year after the cause of the action arose.\nEach party waives its rights (if any) to a jury trial in any litigation arising\nunder this License. Note that if the Governing Jurisdiction is not assigned\nin Part 3 of Exhibit A, then the Governing Jurisdiction shall be the State\nof New York.\n\n9.2. The courts of the Governing Jurisdiction shall have jurisdiction, but\nnot exclusive jurisdiction, to entertain and determine all disputes and claims,\nwhether for specific performance, injunction, damages or otherwise, both at\nlaw and in equity, arising out of or in any way relating to this License,\nincluding without limitation, the legality, validity, existence and enforceability\nof this License. Each party to this License hereby irrevocably attorns to\nand accepts the jurisdiction of the courts of the Governing Jurisdiction for\nsuch purposes.\n\n9.3. Except as expressly set forth elsewhere herein, in the event of any action\nor proceeding brought by any party against another under this License the\nprevailing party shall be entitled to recover all costs and expenses including\nthe fees of its attorneys in such action or proceeding in such amount as the\ncourt may adjudge reasonable.\n\n10. MISCELLANEOUS.\n\n10.1. The obligations imposed by this License are for the benefit of the Initial\nContributor and any Recipient, and each Recipient acknowledges and agrees\nthat the Initial Contributor and/or any other Recipient may enforce the terms\nand conditions of this License against any Recipient.\n\n10.2. This License represents the complete agreement concerning subject matter\nhereof, and supersedes and cancels all previous oral and written communications,\nrepresentations, agreements and understandings between the parties with respect\nto the subject matter hereof.\n\n10.3. The application of the United Nations Convention on Contracts for the\nInternational Sale of Goods is expressly excluded.\n\n10.4. The language in all parts of this License shall be in all cases construed\nsimply according to its fair meaning, and not strictly for or against any\nof the parties hereto. Any law or regulation which provides that the language\nof a contract shall be construed against the drafter shall not apply to this\nLicense.\n\n10.5. If any provision of this License is invalid or unenforceable under the\nlaws of the Governing Jurisdiction, it shall not affect the validity or enforceability\nof the remainder of the terms of this License, and without further action\nby the parties hereto, such provision shall be reformed to the minimum extent\nnecessary to make such provision valid and enforceable.\n\n10.6. The paragraph headings of this License are for reference and convenience\nonly and are not a part of this License, and they shall have no effect upon\nthe construction or interpretation of any part hereof.\n\n10.7. Each of the terms \"including\", \"include\" and \"includes\", when used in\nthis License, is not limiting whether or not non-limiting language (such as\n\"without limitation\" or \"but not limited to\" or words of similar import) is\nused with reference thereto.\n\n10.8. The parties hereto acknowledge they have expressly required that this\nLicense and notices relating thereto be drafted in the English language.\n\n//***THE LICENSE TERMS END HERE (OTHER THAN AS SET OUT IN EXHIBIT A).***//\n\nEXHIBIT A (to the Adaptive Public License)\n\nPART 1: INITIAL CONTRIBUTOR AND DESIGNATED WEB SITE\n\nThe Initial Contributor is:\n____________________________________________________\n \n[Enter full name of Initial Contributor]\n\nAddress of Initial Contributor:\n________________________________________________\n \n________________________________________________\n \n________________________________________________\n \n[Enter address above]\n\nThe Designated Web Site is:\n__________________________________________________\n \n[Enter URL for Designated Web Site of Initial Contributor]\n\nNOTE: The Initial Contributor is to complete this Part 1, along with Parts\n2, 3, and 5, and, if applicable, Parts 4 and 6.\n\nPART 2: INITIAL WORK\n\nThe Initial Work comprises the computer program(s) distributed by the Initial\nContributor having the following title(s): _______________________________________________.\n\nThe date on which the Initial Work was first available under this License:\n_________________\n\nPART 3: GOVERNING JURISDICTION\n\nFor the purposes of this License, the Governing Jurisdiction is _________________________________________________.\n [Initial Contributor to Enter Governing Jurisdiction here]\n\nPART 4: THIRD PARTIES\n\nFor the purposes of this License, \"Third Party\" has the definition set forth\nbelow in the ONE paragraph selected by the Initial Contributor from paragraphs\nA, B, C, D and E when the Initial Work is distributed or otherwise made available\nby the Initial Contributor. To select one of the following paragraphs, the\nInitial Contributor must place an \"X\" or \"x\" in the selection box alongside\nthe one respective paragraph selected.\nSELECTION\n \nBOX   PARAGRAPH\n[  ]  A. \"THIRD PARTY\" means any third party.\n \n \n[  ]  B. \"THIRD PARTY\" means any third party except for any of the following:\n(a) a wholly owned subsidiary of the Subsequent Contributor in question; (b)\na legal entity (the \"PARENT\") that wholly owns the Subsequent Contributor\nin question; or (c) a wholly owned subsidiary of the wholly owned subsidiary\nin (a) or of the Parent in (b).\n \n \n[  ]  C. \"THIRD PARTY\" means any third party except for any of the following:\n(a) any Person directly or indirectly owning a majority of the voting interest\nin the Subsequent Contributor or (b) any Person in which the Subsequent Contributor\ndirectly or indirectly owns a majority voting interest.\n \n \n[  ]  D. \"THIRD PARTY\" means any third party except for any Person directly\nor indirectly controlled by the Subsequent Contributor. For purposes of this\ndefinition, \"control\" shall mean the power to direct or cause the direction\nof, the management and policies of such Person whether through the ownership\nof voting interests, by contract, or otherwise.\n \n \n[  ]  E. \"THIRD PARTY\" means any third party except for any Person directly\nor indirectly controlling, controlled by, or under common control with the\nSubsequent Contributor. For purposes of this definition, \"control\" shall mean\nthe power to direct or cause the direction of, the management and policies\nof such Person whether through the ownership of voting interests, by contract,\nor otherwise.\nThe default definition of \"THIRD PARTY\" is the definition set forth in paragraph\nA, if NONE OR MORE THAN ONE of paragraphs A, B, C, D or E in this Part 4 are\nselected by the Initial Contributor.\n\nPART 5: NOTICE\n\nTHE LICENSED WORK IS PROVIDED UNDER THE TERMS OF THE ADAPTIVE PUBLIC LICENSE\n(\"LICENSE\") AS FIRST COMPLETED BY: ______________________ [Insert the name\nof the Initial Contributor here]. ANY USE, PUBLIC DISPLAY, PUBLIC PERFORMANCE,\nREPRODUCTION OR DISTRIBUTION OF, OR PREPARATION OF DERIVATIVE WORKS BASED\nON, THE LICENSED WORK CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS LICENSE AND\nITS TERMS, WHETHER OR NOT SUCH RECIPIENT READS THE TERMS OF THE LICENSE. \"LICENSED\nWORK\" AND \"RECIPIENT\" ARE DEFINED IN THE LICENSE. A COPY OF THE LICENSE IS\nLOCATED IN THE TEXT FILE ENTITLED \"LICENSE.TXT\" ACCOMPANYING THE CONTENTS\nOF THIS FILE. IF A COPY OF THE LICENSE DOES NOT ACCOMPANY THIS FILE, A COPY\nOF THE LICENSE MAY ALSO BE OBTAINED AT THE FOLLOWING WEB SITE: ___________________________________________________[Insert\nInitial Contributor's Designated Web Site here]\n\nSoftware distributed under the License is distributed on an \"AS IS\" basis,\nWITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for\nthe specific language governing rights and limitations under the License.\n\nPART 6: PATENT LICENSING TERMS\n\nFor the purposes of this License, paragraphs A, B, C, D and E of this Part\n6 of Exhibit A are only incorporated and form part of the terms of the License\nif the Initial Contributor places an \"X\" or \"x\" in the selection box alongside\nthe YES answer to the question immediately below.\n\nIs this a Patents-Included License pursuant to Section 2.2 of the License?\nYES   [      ]\nNO    [      ]\n\nBy default, if YES is not selected by the Initial Contributor, the answer\nis NO.\n\nA. For the purposes of the paragraphs in this Part 6 of Exhibit A, \"LICENSABLE\"\nmeans having the right to grant, to the maximum extent possible, whether at\nthe time of the initial grant or subsequently acquired, any and all of the\nrights granted herein.\n\nB. The Initial Contributor hereby grants all Recipients a world-wide, royalty-free,\nnon-exclusive license, subject to third party intellectual property claims,\nunder patent claim(s) Licensable by the Initial Contributor that are or would\nbe infringed by the making, using, selling, offering for sale, having made,\nimporting, exporting, transfer or disposal of such Initial Work or any portion\nthereof. Notwithstanding the foregoing, no patent license is granted under\nthis Paragraph B by the Initial Contributor: (1) for any code that the Initial\nContributor deletes from the Initial Work (or any portion thereof) distributed\nby the Initial Contributor prior to such distribution; (2) for any Modifications\nmade to the Initial Work (or any portion thereof) by any other Person; or\n(3) separate from the Initial Work (or portions thereof) distributed or made\navailable by the Initial Contributor.\n\nC. Effective upon distribution by a Subsequent Contributor to a Third Party\nof any Modifications made by that Subsequent Contributor, such Subsequent\nContributor hereby grants all Recipients a world-wide, royalty-free, non-exclusive\nlicense, subject to third party intellectual property claims, under patent\nclaim(s) Licensable by such Subsequent Contributor that are or would be infringed\nby the making, using, selling, offering for sale, having made, importing,\nexporting, transfer or disposal of any such Modifications made by that Subsequent\nContributor alone and/or in combination with its Subsequent Work (or portions\nof such combination) to make, use, sell, offer for sale, have made, import,\nexport, transfer and otherwise dispose of:\n(1) Modifications made by that Subsequent Contributor (or portions thereof);\nand\n(2) the combination of Modifications made by that Subsequent Contributor with\nits Subsequent Work (or portions of such combination);\n(collectively and in each case, the \"SUBSEQUENT CONTRIBUTOR VERSION\").\nNotwithstanding the foregoing, no patent license is granted under this Paragraph\nC by such Subsequent Contributor: (1) for any code that such Subsequent Contributor\ndeletes from the Subsequent Contributor Version (or any portion thereof) distributed\nby the Subsequent Contributor prior to such distribution; (2) for any Modifications\nmade to the Subsequent Contributor Version (or any portion thereof) by any\nother Person; or (3) separate from the Subsequent Contributor Version (or\nportions thereof) distributed or made available by the Subsequent Contributor.\n\nD. Effective upon distribution of any Licensed Work by a Distributor to a\nThird Party, such Distributor hereby grants all Recipients a world-wide, royalty-free,\nnon-exclusive license, subject to third party intellectual property claims,\nunder patent claim(s) Licensable by such Distributor that are or would be\ninfringed by the making, using, selling, offering for sale, having made, importing,\nexporting, transfer or disposal of any such Licensed Work distributed by such\nDistributor, to make, use, sell, offer for sale, have made, import, export,\ntransfer and otherwise dispose of such Licensed Work or portions thereof (collectively\nand in each case, the \"DISTRIBUTOR VERSION\"). Notwithstanding the foregoing,\nno patent license is granted under this Paragraph D by such Distributor: (1)\nfor any code that such Distributor deletes from the Distributor Version (or\nany portion thereof) distributed by the Distributor prior to such distribution;\n(2) for any Modifications made to the Distributor Version (or any portion\nthereof) by any other Person; or (3) separate from the Distributor Version\n(or portions thereof) distributed or made available by the Distributor.\n\nE. If Recipient institutes patent litigation against another Recipient (a\n\"USER\") with respect to a patent applicable to a computer program or software\n(including a cross-claim or counterclaim in a lawsuit, and whether or not\nany of the patent claims are directed to a system, method, process, apparatus,\ndevice, product, article of manufacture or any other form of patent claim),\nthen any patent or copyright license granted by that User to such Recipient\nunder this License or any other copy of this License shall terminate. The\ntermination shall be effective ninety (90) days after notice of termination\nfrom User to Recipient, unless the Recipient withdraws the patent litigation\nclaim before the end of the ninety (90) day period. To be effective, any such\nnotice of license termination must include a specific list of applicable patents\nand/or a copy of the copyrighted work of User that User alleges will be infringed\nby Recipient upon License termination. License termination is only effective\nwith respect to patents and/or copyrights for which proper notice has been\ngiven.\n\nPART 7: SAMPLE REQUIREMENTS FOR THE DESCRIPTION OF DISTRIBUTED MODIFICATIONS\n\nEach Subsequent Contributor (including the Initial Contributor where the Initial\nContributor qualifies as a Subsequent Contributor) is invited (but not required)\nto cause each Subsequent Work created or contributed to by that Subsequent\nContributor to contain a file documenting the changes such Subsequent Contributor\nmade to create that Subsequent Work and the date of any change. //***EXHIBIT\nA ENDS HERE.***//\n"
  },
  {
    "path": "licenses/APSL-2.0.txt",
    "content": "APPLE PUBLIC SOURCE LICENSE\nVersion 2.0 -  August 6, 2003\n\nPlease read this License carefully before downloading this software.  By downloading\nor using this software, you are agreeing to be bound by the terms of this\nLicense.  If you do not or cannot agree to the terms of this License, please\ndo not download or use the software.\n\nApple Note:  In January 2007, Apple changed its corporate name from \"Apple\nComputer, Inc.\" to \"Apple Inc.\"  This change has been reflected below and\ncopyright years updated, but no other changes have been made to the APSL 2.0.\n\n1. General; Definitions.  This License applies to any program or other work\nwhich Apple Inc. (\"Apple\") makes publicly available and which contains a notice\nplaced by Apple identifying such program or work as \"Original Code\" and stating\nthat it is subject to the terms of this Apple Public Source License version\n2.0 (\"License\").  As used in this License:\n\n1.1  \"Applicable Patent Rights\" mean:  (a) in the case where Apple is the\ngrantor of rights, (i) claims of patents that are now or hereafter acquired,\nowned by or assigned to Apple and (ii) that cover subject matter contained\nin the Original Code, but only to the extent necessary to use, reproduce and/or\ndistribute the Original Code without infringement; and (b) in the case where\nYou are the grantor of rights, (i) claims of patents that are now or hereafter\nacquired, owned by or assigned to You and (ii) that cover subject matter in\nYour Modifications, taken alone or in combination with Original Code.\n\n1.2 \"Contributor\" means any person or entity that creates or contributes to\nthe creation of Modifications.\n\n1.3  \"Covered Code\" means the Original Code, Modifications, the combination\nof Original Code and any Modifications, and/or any respective portions thereof.\n\n1.4 \"Externally Deploy\" means: (a) to sublicense, distribute or otherwise\nmake Covered Code available, directly or indirectly, to anyone other than\nYou; and/or (b) to use Covered Code, alone or as part of a Larger Work, in\nany way to provide a service, including but not limited to delivery of content,\nthrough electronic communication with a client other than You.\n\n1.5 \"Larger Work\" means a work which combines Covered Code or portions thereof\nwith code not governed by the terms of this License.\n\n1.6 \"Modifications\" mean any addition to, deletion from, and/or change to,\nthe substance and/or structure of the Original Code, any previous Modifications,\nthe combination of Original Code and any previous Modifications, and/or any\nrespective portions thereof.  When code is released as a series of files,\na Modification is:  (a) any addition to or deletion from the contents of a\nfile containing Covered Code; and/or (b) any new file or other representation\nof computer program statements that contains any part of Covered Code.\n\n1.7 \"Original Code\" means (a) the Source Code of a program or other work as\noriginally made available by Apple under this License, including the Source\nCode of any updates or upgrades to such programs or works made available by\nApple under this License, and that has been expressly identified by Apple\nas such in the header file(s) of such work; and (b) the object code compiled\nfrom such Source Code and originally made available by Apple under this License\n\n1.8 \"Source Code\" means the human readable form of a program or other work\nthat is suitable for making modifications to it, including all modules it\ncontains, plus any associated interface definition files, scripts used to\ncontrol compilation and installation of an executable (object code).\n\n1.9 \"You\" or \"Your\" means an individual or a legal entity exercising rights\nunder this License.  For legal entities, \"You\" or \"Your\" includes any entity\nwhich controls, is controlled by, or is under common control with, You, where\n\"control\" means (a) the power, direct or indirect, to cause the direction\nor management of such entity, whether by contract or otherwise, or (b) ownership\nof fifty percent (50%) or more of the outstanding shares or beneficial ownership\nof such entity.\n\n2. Permitted Uses; Conditions & Restrictions.   Subject to the terms and conditions\nof this License, Apple hereby grants You, effective on the date You accept\nthis License and download the Original Code, a world-wide, royalty-free, non-exclusive\nlicense, to the extent of Apple's Applicable Patent Rights and copyrights\ncovering the Original Code, to do the following:\n\n2.1 Unmodified Code.  You may use, reproduce, display, perform, internally\ndistribute within Your organization, and Externally Deploy verbatim, unmodified\ncopies of the Original Code, for commercial or non-commercial purposes, provided\nthat in each instance:\n\n(a) You must retain and reproduce in all copies of Original Code the copyright\nand other proprietary notices and disclaimers of Apple as they appear in the\nOriginal Code, and keep intact all notices in the Original Code that refer\nto this License; and\n\n(b)  You must include a copy of this License with every copy of Source Code\nof Covered Code and documentation You distribute or Externally Deploy, and\nYou may not offer or impose any terms on such Source Code that alter or restrict\nthis License or the recipients' rights hereunder, except as permitted under\nSection 6.\n\n2.2 Modified Code.  You may modify Covered Code and use, reproduce, display,\nperform, internally distribute within Your organization, and Externally Deploy\nYour Modifications and Covered Code, for commercial or non-commercial purposes,\nprovided that in each instance You also meet all of these conditions:\n\n(a) You must satisfy all the conditions of Section 2.1 with respect to the\nSource Code of the Covered Code;\n\n(b) You must duplicate, to the extent it does not already exist, the notice\nin Exhibit A in each file of the Source Code of all Your Modifications, and\ncause the modified files to carry prominent notices stating that You changed\nthe files and the date of any change; and\n\n(c) If You Externally Deploy Your Modifications, You must make Source Code\nof all Your Externally Deployed Modifications either available to those to\nwhom You have Externally Deployed Your Modifications, or publicly available.\nSource Code of Your Externally Deployed Modifications must be released under\nthe terms set forth in this License, including the license grants set forth\nin Section 3 below, for as long as you Externally Deploy the Covered Code\nor twelve (12) months from the date of initial External Deployment, whichever\nis longer. You should preferably distribute the Source Code of Your Externally\nDeployed Modifications electronically (e.g. download from a web site).\n\n2.3 Distribution of Executable Versions.  In addition, if You Externally Deploy\nCovered Code (Original Code and/or Modifications) in object code, executable\nform only, You must include a prominent notice, in the code itself as well\nas in related documentation, stating that Source Code of the Covered Code\nis available under the terms of this License with information on how and where\nto obtain such Source Code.\n\n2.4 Third Party Rights.  You expressly acknowledge and agree that although\nApple and each Contributor grants the licenses to their respective portions\nof the Covered Code set forth herein, no assurances are provided by Apple\nor any Contributor that the Covered Code does not infringe the patent or other\nintellectual property rights of any other entity. Apple and each Contributor\ndisclaim any liability to You for claims brought by any other entity based\non infringement of intellectual property rights or otherwise. As a condition\nto exercising the rights and licenses granted hereunder, You hereby assume\nsole responsibility to secure any other intellectual property rights needed,\nif any. For example, if a third party patent license is required to allow\nYou to distribute the Covered Code, it is Your responsibility to acquire that\nlicense before distributing the Covered Code.\n\n3. Your Grants.  In consideration of, and as a condition to, the licenses\ngranted to You under this License, You hereby grant to any person or entity\nreceiving or distributing Covered Code under this License a non-exclusive,\nroyalty-free, perpetual, irrevocable license, under Your Applicable Patent\nRights and other intellectual property rights (other than patent) owned or\ncontrolled by You, to use, reproduce, display, perform, modify, sublicense,\ndistribute and Externally Deploy Your Modifications of the same scope and\nextent as Apple's licenses under Sections 2.1 and 2.2 above.\n\n4. Larger Works.  You may create a Larger Work by combining Covered Code with\nother code not governed by the terms of this License and distribute the Larger\nWork as a single product.  In each such instance, You must make sure the requirements\nof this License are fulfilled for the Covered Code or any portion thereof.\n\n5. Limitations on Patent License.   Except as expressly stated in Section\n2, no other patent rights, express or implied, are granted by Apple herein.\nModifications and/or Larger Works may require additional patent licenses from\nApple which Apple may grant in its sole discretion.\n\n6. Additional Terms.  You may choose to offer, and to charge a fee for, warranty,\nsupport, indemnity or liability obligations and/or other rights consistent\nwith the scope of the license granted herein (\"Additional Terms\") to one or\nmore recipients of Covered Code. However, You may do so only on Your own behalf\nand as Your sole responsibility, and not on behalf of Apple or any Contributor.\nYou must obtain the recipient's agreement that any such Additional Terms are\noffered by You alone, and You hereby agree to indemnify, defend and hold Apple\nand every Contributor harmless for any liability incurred by or claims asserted\nagainst Apple or such Contributor by reason of any such Additional Terms.\n\n7. Versions of the License.  Apple may publish revised and/or new versions\nof this License from time to time.  Each version will be given a distinguishing\nversion number.  Once Original Code has been published under a particular\nversion of this License, You may continue to use it under the terms of that\nversion. You may also choose to use such Original Code under the terms of\nany subsequent version of this License published by Apple.  No one other than\nApple has the right to modify the terms applicable to Covered Code created\nunder this License.\n\n8. NO WARRANTY OR SUPPORT.  The Covered Code may contain in whole or in part\npre-release, untested, or not fully tested works.  The Covered Code may contain\nerrors that could cause failures or loss of data, and may be incomplete or\ncontain inaccuracies.  You expressly acknowledge and agree that use of the\nCovered Code, or any portion thereof, is at Your sole and entire risk.  THE\nCOVERED CODE IS PROVIDED \"AS IS\" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT\nOF ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS\n\"APPLE\" FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY\nDISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING,\nBUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY,\nOF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY,\nOF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.  APPLE AND\nEACH CONTRIBUTOR DOES NOT WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT\nOF THE COVERED CODE, THAT THE FUNCTIONS CONTAINED IN THE COVERED CODE WILL\nMEET YOUR REQUIREMENTS, THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED\nOR ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED.  NO\nORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE AUTHORIZED\nREPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY.  You acknowledge\nthat the Covered Code is not intended for use in the operation of nuclear\nfacilities, aircraft navigation, communication systems, or air traffic control\nmachines in which case the failure of the Covered Code could lead to death,\npersonal injury, or severe physical or environmental damage.\n\n9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT\nSHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT\nOR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR\nUSE OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER\nUNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS\nLIABILITY OR OTHERWISE, EVEN IF APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED\nOF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL\nPURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY\nOF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY TO\nYOU. In no event shall Apple's total liability to You for all damages (other\nthan as may be required by applicable law) under this License exceed the amount\nof fifty dollars ($50.00).\n\n10. Trademarks.  This License does not grant any rights to use the trademarks\nor trade names  \"Apple\", \"Mac\", \"Mac OS\", \"QuickTime\", \"QuickTime Streaming\nServer\" or any other trademarks, service marks, logos or trade names belonging\nto Apple (collectively \"Apple Marks\") or to any trademark, service mark, logo\nor trade name belonging to any Contributor.  You agree not to use any Apple\nMarks in or as part of the name of products derived from the Original Code\nor to endorse or promote products derived from the Original Code other than\nas expressly permitted by and in strict compliance at all times with Apple's\nthird party trademark usage guidelines which are posted at http://www.apple.com/legal/guidelinesfor3rdparties.html.\n\n11. Ownership. Subject to the licenses granted under this License, each Contributor\nretains all rights, title and interest in and to any Modifications made by\nsuch Contributor.  Apple retains all rights, title and interest in and to\nthe Original Code and any Modifications made by or on behalf of Apple (\"Apple\nModifications\"), and such Apple Modifications will not be automatically subject\nto this License.  Apple may, at its sole discretion, choose to license such\nApple Modifications under this License, or on different terms from those contained\nin this License or may choose not to license them at all.\n\n12. Termination.\n\n12.1 Termination.  This License and the rights granted hereunder will terminate:\n\n(a) automatically without notice from Apple if You fail to comply with any\nterm(s) of this License and fail to cure such breach within 30 days of becoming\naware of such breach;\n\n(b) immediately in the event of the circumstances described in Section 13.5(b);\nor\n\n(c) automatically without notice from Apple if You, at any time during the\nterm of this License, commence an action for patent infringement against Apple;\nprovided that Apple did not first commence an action for patent infringement\nagainst You in that instance.\n\n12.2 Effect of Termination.  Upon termination, You agree to immediately stop\nany further use, reproduction, modification, sublicensing and distribution\nof the Covered Code.  All sublicenses to the Covered Code which have been\nproperly granted prior to termination shall survive any termination of this\nLicense.  Provisions which, by their nature, should remain in effect beyond\nthe termination of this License shall survive, including but not limited to\nSections 3, 5, 8, 9, 10, 11, 12.2 and 13.  No party will be liable to any\nother for compensation, indemnity or damages of any sort solely as a result\nof terminating this License in accordance with its terms, and termination\nof this License will be without prejudice to any other right or remedy of\nany party.\n\n13.  Miscellaneous.\n\n13.1 Government End Users.   The Covered Code is a \"commercial item\" as defined\nin FAR 2.101.  Government software and technical data rights in the Covered\nCode include only those rights customarily provided to the public as defined\nin this License. This customary commercial license in technical data and software\nis provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer\nSoftware) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical\nData -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software\nor Computer Software Documentation).  Accordingly, all U.S. Government End\nUsers acquire Covered Code with only those rights set forth herein.\n\n13.2 Relationship of Parties.  This License will not be construed as creating\nan agency, partnership, joint venture or any other form of legal association\nbetween or among You, Apple or any Contributor, and You will not represent\nto the contrary, whether expressly, by implication, appearance or otherwise.\n\n13.3 Independent Development.   Nothing in this License will impair Apple's\nright to acquire, license, develop, have others develop for it, market and/or\ndistribute technology or products that perform the same or similar functions\nas, or otherwise compete with, Modifications, Larger Works, technology or\nproducts that You may develop, produce, market or distribute.\n\n13.4 Waiver; Construction.  Failure by Apple or any Contributor to enforce\nany provision of this License will not be deemed a waiver of future enforcement\nof that or any other provision.  Any law or regulation which provides that\nthe language of a contract shall be construed against the drafter will not\napply to this License.\n\n13.5 Severability.  (a) If for any reason a court of competent jurisdiction\nfinds any provision of this License, or portion thereof, to be unenforceable,\nthat provision of the License will be enforced to the maximum extent permissible\nso as to effect the economic benefits and intent of the parties, and the remainder\nof this License will continue in full force and effect.  (b) Notwithstanding\nthe foregoing, if applicable law prohibits or restricts You from fully and/or\nspecifically complying with Sections 2 and/or 3 or prevents the enforceability\nof either of those Sections, this License will immediately terminate and You\nmust immediately discontinue any use of the Covered Code and destroy all copies\nof it that are in your possession or control.\n\n13.6 Dispute Resolution.  Any litigation or other dispute resolution between\nYou and Apple relating to this License shall take place in the Northern District\nof California, and You and Apple hereby consent to the personal jurisdiction\nof, and venue in, the state and federal courts within that District with respect\nto this License. The application of the United Nations Convention on Contracts\nfor the International Sale of Goods is expressly excluded.\n\n13.7 Entire Agreement; Governing Law.  This License constitutes the entire\nagreement between the parties with respect to the subject matter hereof. \nThis License shall be governed by the laws of the United States and the State\nof California, except that body of California law concerning conflicts of\nlaw.\n\nWhere You are located in the province of Quebec, Canada, the following clause\napplies:  The parties hereby confirm that they have requested that this License\nand all related documents be drafted in English.  Les parties ont exigé que\nle présent contrat et tous les documents connexes soient rédigés en anglais.\n\nEXHIBIT A.\n\n\"Portions Copyright (c) 1999-2007 Apple Inc.  All Rights Reserved.\n\nThis file contains Original Code and/or Modifications of Original Code as\ndefined in and that are subject to the Apple Public Source License Version\n2.0 (the 'License').  You may not use this file except in compliance with\nthe License.  Please obtain a copy of the License at http://www.opensource.apple.com/apsl/\nand read it before using this file.\n\nThe Original Code and all software distributed under the License are distributed\non an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,\nAND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION,\nANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET\nENJOYMENT OR NON-INFRINGEMENT.  Please see the License for the specific language\ngoverning rights and limitations under the License.\"\n"
  },
  {
    "path": "licenses/APSL.txt",
    "content": "APPLE PUBLIC SOURCE LICENSE\nVersion 2.0 -  August 6, 2003\n\nPlease read this License carefully before downloading this software.  By\ndownloading or using this software, you are agreeing to be bound by the terms\nof this License.  If you do not or cannot agree to the terms of this License,\nplease do not download or use the software.\n\nApple Note:  In January 2007, Apple changed its corporate name from \"Apple\nComputer, Inc.\" to \"Apple Inc.\"  This change has been reflected below and\ncopyright years updated, but no other changes have been made to the APSL 2.0.\n\n1.\tGeneral; Definitions.  This License applies to any program or other\nwork which Apple Inc. (\"Apple\") makes publicly available and which contains a\nnotice placed by Apple identifying such program or work as \"Original Code\" and\nstating that it is subject to the terms of this Apple Public Source License\nversion 2.0 (\"License\").  As used in this License:\n\n1.1\t \"Applicable Patent Rights\" mean:  (a) in the case where Apple is the\ngrantor of rights, (i) claims of patents that are now or hereafter acquired,\nowned by or assigned to Apple and (ii) that cover subject matter contained in\nthe Original Code, but only to the extent necessary to use, reproduce and/or\ndistribute the Original Code without infringement; and (b) in the case where\nYou are the grantor of rights, (i) claims of patents that are now or hereafter\nacquired, owned by or assigned to You and (ii) that cover subject matter in\nYour Modifications, taken alone or in combination with Original Code.\n\n1.2\t\"Contributor\" means any person or entity that creates or contributes\nto the creation of Modifications.\n\n1.3\t \"Covered Code\" means the Original Code, Modifications, the\ncombination of Original Code and any Modifications, and/or any respective\nportions thereof.\n\n1.4\t\"Externally Deploy\" means: (a) to sublicense, distribute or otherwise\nmake Covered Code available, directly or indirectly, to anyone other than You;\nand/or (b) to use Covered Code, alone or as part of a Larger Work, in any way\nto provide a service, including but not limited to delivery of content,\nthrough electronic communication with a client other than You.\n\n1.5\t\"Larger Work\" means a work which combines Covered Code or portions\nthereof with code not governed by the terms of this License.\n\n1.6\t\"Modifications\" mean any addition to, deletion from, and/or change to,\nthe substance and/or structure of the Original Code, any previous\nModifications, the combination of Original Code and any previous\nModifications, and/or any respective portions thereof.  When code is released\nas a series of files, a Modification is:  (a) any addition to or deletion from\nthe contents of a file containing Covered Code; and/or (b) any new file or\nother representation of computer program statements that contains any part of\nCovered Code. \n\n1.7\t\"Original Code\" means (a) the Source Code of a program or other work\nas originally made available by Apple under this License, including the Source\nCode of any updates or upgrades to such programs or works made available by\nApple under this License, and that has been expressly identified by Apple as\nsuch in the header file(s) of such work; and (b) the object code compiled from\nsuch Source Code and originally made available by Apple under this License\n\n1.8\t\"Source Code\" means the human readable form of a program or other work\nthat is suitable for making modifications to it, including all modules it\ncontains, plus any associated interface definition files, scripts used to\ncontrol compilation and installation of an executable (object code).\n\n1.9\t\"You\" or \"Your\" means an individual or a legal entity exercising\nrights under this License.  For legal entities, \"You\" or \"Your\" includes any\nentity which controls, is controlled by, or is under common control with, You,\nwhere \"control\" means (a) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or otherwise, or\n(b) ownership of fifty percent (50%) or more of the outstanding shares or\nbeneficial ownership of such entity.\n\n2.\tPermitted Uses; Conditions & Restrictions.   Subject to the terms and\nconditions of this License, Apple hereby grants You, effective on the date You\naccept this License and download the Original Code, a world-wide,\nroyalty-free, non-exclusive license, to the extent of Apple's Applicable\nPatent Rights and copyrights covering the Original Code, to do the following:\n\n2.1\tUnmodified Code.  You may use, reproduce, display, perform, internally\ndistribute within Your organization, and Externally Deploy verbatim,\nunmodified copies of the Original Code, for commercial or non-commercial\npurposes, provided that in each instance:\n\n(a)\tYou must retain and reproduce in all copies of Original Code the\ncopyright and other proprietary notices and disclaimers of Apple as they\nappear in the Original Code, and keep intact all notices in the Original Code\nthat refer to this License; and\n\n(b) \tYou must include a copy of this License with every copy of Source Code\nof Covered Code and documentation You distribute or Externally Deploy, and You\nmay not offer or impose any terms on such Source Code that alter or restrict\nthis License or the recipients' rights hereunder, except as permitted under\nSection 6.\n\n2.2\tModified Code.  You may modify Covered Code and use, reproduce,\ndisplay, perform, internally distribute within Your organization, and\nExternally Deploy Your Modifications and Covered Code, for commercial or\nnon-commercial purposes, provided that in each instance You also meet all of\nthese conditions:\n\n(a)\tYou must satisfy all the conditions of Section 2.1 with respect to the\nSource Code of the Covered Code; \n\n(b)\tYou must duplicate, to the extent it does not already exist, the\nnotice in Exhibit A in each file of the Source Code of all Your Modifications,\nand cause the modified files to carry prominent notices stating that You\nchanged the files and the date of any change; and\n\n(c)\tIf You Externally Deploy Your Modifications, You must make Source Code\nof all Your Externally Deployed Modifications either available to those to\nwhom You have Externally Deployed Your Modifications, or publicly available.\nSource Code of Your Externally Deployed Modifications must be released under\nthe terms set forth in this License, including the license grants set forth in\nSection 3 below, for as long as you Externally Deploy the Covered Code or\ntwelve (12) months from the date of initial External Deployment, whichever is\nlonger. You should preferably distribute the Source Code of Your Externally\nDeployed Modifications electronically (e.g. download from a web site).\n\n2.3\tDistribution of Executable Versions.  In addition, if You Externally\nDeploy Covered Code (Original Code and/or Modifications) in object code,\nexecutable form only, You must include a prominent notice, in the code itself\nas well as in related documentation, stating that Source Code of the Covered\nCode is available under the terms of this License with information on how and\nwhere to obtain such Source Code.  \n\n2.4\tThird Party Rights.  You expressly acknowledge and agree that although\nApple and each Contributor grants the licenses to their respective portions of\nthe Covered Code set forth herein, no assurances are provided by Apple or any\nContributor that the Covered Code does not infringe the patent or other\nintellectual property rights of any other entity. Apple and each Contributor\ndisclaim any liability to You for claims brought by any other entity based on\ninfringement of intellectual property rights or otherwise. As a condition to\nexercising the rights and licenses granted hereunder, You hereby assume sole\nresponsibility to secure any other intellectual property rights needed, if\nany. For example, if a third party patent license is required to allow You to\ndistribute the Covered Code, it is Your responsibility to acquire that license\nbefore distributing the Covered Code.\n\n3.\tYour Grants.  In consideration of, and as a condition to, the licenses\ngranted to You under this License, You hereby grant to any person or entity\nreceiving or distributing Covered Code under this License a non-exclusive,\nroyalty-free, perpetual, irrevocable license, under Your Applicable Patent\nRights and other intellectual property rights (other than patent) owned or\ncontrolled by You, to use, reproduce, display, perform, modify, sublicense,\ndistribute and Externally Deploy Your Modifications of the same scope and\nextent as Apple's licenses under Sections 2.1 and 2.2 above.  \n\n4.\tLarger Works.  You may create a Larger Work by combining Covered Code\nwith other code not governed by the terms of this License and distribute the\nLarger Work as a single product.  In each such instance, You must make sure\nthe requirements of this License are fulfilled for the Covered Code or any\nportion thereof. \n\n5.\tLimitations on Patent License.   Except as expressly stated in Section\n2, no other patent rights, express or implied, are granted by Apple herein.\nModifications and/or Larger Works may require additional patent licenses from\nApple which Apple may grant in its sole discretion.  \n\n6.\tAdditional Terms.  You may choose to offer, and to charge a fee for,\nwarranty, support, indemnity or liability obligations and/or other rights\nconsistent with the scope of the license granted herein (\"Additional Terms\")\nto one or more recipients of Covered Code. However, You may do so only on Your\nown behalf and as Your sole responsibility, and not on behalf of Apple or any\nContributor. You must obtain the recipient's agreement that any such\nAdditional Terms are offered by You alone, and You hereby agree to indemnify,\ndefend and hold Apple and every Contributor harmless for any liability\nincurred by or claims asserted against Apple or such Contributor by reason of\nany such Additional Terms. \n\n7.\tVersions of the License.  Apple may publish revised and/or new\nversions of this License from time to time.  Each version will be given a\ndistinguishing version number.  Once Original Code has been published under a\nparticular version of this License, You may continue to use it under the terms\nof that version. You may also choose to use such Original Code under the terms\nof any subsequent version of this License published by Apple.  No one other\nthan Apple has the right to modify the terms applicable to Covered Code\ncreated under this License.  \n\n8.\tNO WARRANTY OR SUPPORT.  The Covered Code may contain in whole or in\npart pre-release, untested, or not fully tested works.  The Covered Code may\ncontain errors that could cause failures or loss of data, and may be\nincomplete or contain inaccuracies.  You expressly acknowledge and agree that\nuse of the Covered Code, or any portion thereof, is at Your sole and entire\nrisk.  THE COVERED CODE IS PROVIDED \"AS IS\" AND WITHOUT WARRANTY, UPGRADES OR\nSUPPORT OF ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED\nTO AS \"APPLE\" FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS\nEXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED,\nINCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF\nMERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE,\nOF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.\nAPPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST INTERFERENCE WITH YOUR\nENJOYMENT OF THE COVERED CODE, THAT THE FUNCTIONS CONTAINED IN THE COVERED\nCODE WILL MEET YOUR REQUIREMENTS, THAT THE OPERATION OF THE COVERED CODE WILL\nBE UNINTERRUPTED OR ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE\nCORRECTED.  NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE\nAUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY.  You\nacknowledge that the Covered Code is not intended for use in the operation of\nnuclear facilities, aircraft navigation, communication systems, or air traffic\ncontrol machines in which case the failure of the Covered Code could lead to\ndeath, personal injury, or severe physical or environmental damage.\n\n9.\tLIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO\nEVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL,\nINDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE\nOR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF,\nWHETHER UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE),\nPRODUCTS LIABILITY OR OTHERWISE, EVEN IF APPLE OR SUCH CONTRIBUTOR HAS BEEN\nADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF\nESSENTIAL PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE\nLIMITATION OF LIABILITY OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS\nLIMITATION MAY NOT APPLY TO YOU. In no event shall Apple's total liability to\nYou for all damages (other than as may be required by applicable law) under\nthis License exceed the amount of fifty dollars ($50.00).\n\n10.\tTrademarks.  This License does not grant any rights to use the\ntrademarks or trade names  \"Apple\", \"Mac\", \"Mac OS\", \"QuickTime\", \"QuickTime\nStreaming Server\" or any other trademarks, service marks, logos or trade names\nbelonging to Apple (collectively \"Apple Marks\") or to any trademark, service\nmark, logo or trade name belonging to any Contributor.  You agree not to use\nany Apple Marks in or as part of the name of products derived from the\nOriginal Code or to endorse or promote products derived from the Original Code\nother than as expressly permitted by and in strict compliance at all times\nwith Apple's third party trademark usage guidelines which are posted at\nhttp://www.apple.com/legal/guidelinesfor3rdparties.html.  \n\n11.\tOwnership. Subject to the licenses granted under this License, each\nContributor retains all rights, title and interest in and to any Modifications\nmade by such Contributor.  Apple retains all rights, title and interest in and\nto the Original Code and any Modifications made by or on behalf of Apple\n(\"Apple Modifications\"), and such Apple Modifications will not be\nautomatically subject to this License.  Apple may, at its sole discretion,\nchoose to license such Apple Modifications under this License, or on different\nterms from those contained in this License or may choose not to license them\nat all.  \n\n12.\tTermination.  \n\n12.1\tTermination.  This License and the rights granted hereunder will\nterminate:\n\n(a)\tautomatically without notice from Apple if You fail to comply with any\nterm(s) of this License and fail to cure such breach within 30 days of\nbecoming aware of such breach;\n(b)\timmediately in the event of the circumstances described in Section\n13.5(b); or\n(c)\tautomatically without notice from Apple if You, at any time during the\nterm of this License, commence an action for patent infringement against\nApple; provided that Apple did not first commence an action for patent\ninfringement against You in that instance.\n\n12.2\tEffect of Termination.  Upon termination, You agree to immediately\nstop any further use, reproduction, modification, sublicensing and\ndistribution of the Covered Code.  All sublicenses to the Covered Code which\nhave been properly granted prior to termination shall survive any termination\nof this License.  Provisions which, by their nature, should remain in effect\nbeyond the termination of this License shall survive, including but not\nlimited to Sections 3, 5, 8, 9, 10, 11, 12.2 and 13.  No party will be liable\nto any other for compensation, indemnity or damages of any sort solely as a\nresult of terminating this License in accordance with its terms, and\ntermination of this License will be without prejudice to any other right or\nremedy of any party.\n\n13. \tMiscellaneous.\n\n13.1\tGovernment End Users.   The Covered Code is a \"commercial item\" as\ndefined in FAR 2.101.  Government software and technical data rights in the\nCovered Code include only those rights customarily provided to the public as\ndefined in this License. This customary commercial license in technical data\nand software is provided in accordance with FAR 12.211 (Technical Data) and\n12.212 (Computer Software) and, for Department of Defense purchases, DFAR\n252.227-7015 (Technical Data -- Commercial Items) and 227.7202-3 (Rights in\nCommercial Computer Software or Computer Software Documentation).\nAccordingly, all U.S. Government End Users acquire Covered Code with only\nthose rights set forth herein.\n\n13.2\tRelationship of Parties.  This License will not be construed as\ncreating an agency, partnership, joint venture or any other form of legal\nassociation between or among You, Apple or any Contributor, and You will not\nrepresent to the contrary, whether expressly, by implication, appearance or\notherwise.\n\n13.3\tIndependent Development.   Nothing in this License will impair Apple's\nright to acquire, license, develop, have others develop for it, market and/or\ndistribute technology or products that perform the same or similar functions\nas, or otherwise compete with, Modifications, Larger Works, technology or\nproducts that You may develop, produce, market or distribute.\n\n13.4\tWaiver; Construction.  Failure by Apple or any Contributor to enforce\nany provision of this License will not be deemed a waiver of future\nenforcement of that or any other provision.  Any law or regulation which\nprovides that the language of a contract shall be construed against the\ndrafter will not apply to this License.\n\n13.5\tSeverability.  (a) If for any reason a court of competent jurisdiction\nfinds any provision of this License, or portion thereof, to be unenforceable,\nthat provision of the License will be enforced to the maximum extent\npermissible so as to effect the economic benefits and intent of the parties,\nand the remainder of this License will continue in full force and effect.  (b)\nNotwithstanding the foregoing, if applicable law prohibits or restricts You\nfrom fully and/or specifically complying with Sections 2 and/or 3 or prevents\nthe enforceability of either of those Sections, this License will immediately\nterminate and You must immediately discontinue any use of the Covered Code and\ndestroy all copies of it that are in your possession or control.\n\n13.6\tDispute Resolution.  Any litigation or other dispute resolution\nbetween You and Apple relating to this License shall take place in the\nNorthern District of California, and You and Apple hereby consent to the\npersonal jurisdiction of, and venue in, the state and federal courts within\nthat District with respect to this License. The application of the United\nNations Convention on Contracts for the International Sale of Goods is\nexpressly excluded.\n\n13.7\tEntire Agreement; Governing Law.  This License constitutes the entire\nagreement between the parties with respect to the subject matter hereof.  This\nLicense shall be governed by the laws of the United States and the State of\nCalifornia, except that body of California law concerning conflicts of law. \n\nWhere You are located in the province of Quebec, Canada, the following clause\napplies:  The parties hereby confirm that they have requested that this\nLicense and all related documents be drafted in English.  Les parties ont\nexigé que le présent contrat et tous les documents connexes soient rédigés\nen anglais.\n\nEXHIBIT A. \n\n\"Portions Copyright (c) 1999-2007 Apple Inc.  All Rights Reserved.\n\nThis file contains Original Code and/or Modifications of Original Code as\ndefined in and that are subject to the Apple Public Source License Version 2.0\n(the 'License').  You may not use this file except in compliance with the\nLicense.  Please obtain a copy of the License at\nhttp://www.opensource.apple.com/apsl/ and read it before using this file.\n\nThe Original Code and all software distributed under the License are\ndistributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS\nOR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT\nLIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\nPURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.  Please see the License for the\nspecific language governing rights and limitations under the License.\"\n"
  },
  {
    "path": "licenses/ATI.txt",
    "content": "\nAMD Software End User License Agreement\n\nPLEASE  READ  THIS  LICENSE  CAREFULLY  BEFORE  USING   THE   SOFTWARE.   BY\nDOWNLOADING, INSTALLING, COPYING OR USING THE SOFTWARE, YOU ARE AGREEING  TO\nBE BOUND BY THE TERMS OF THIS LICENSE.  IF YOU ARE  ACCESSING  THE  SOFTWARE\nELECTRONICALLY,  SIGNIFY  YOUR  AGREEMENT  BY  CLICKING  THE  \"AGREE/ACCEPT\"\nBUTTON.  IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE,  PROMPTLY  RETURN\nTHE SOFTWARE TO THE PLACE WHERE YOU OBTAINED IT  AND  (IF  APPLICABLE)  YOUR\nMONEY WILL BE REFUNDED OR IF THE SOFTWARE WAS ACCESSED ELECTRONICALLY  CLICK\n\"DISAGREE/DECLINE\".\n\n1. License.  Advanced  Micro   Devices,  Inc.,  on  behalf  of  itself,  its  \nsubsidiaries  and  licensors (referred  collectively as \"AMD\") grants to you  \nthe  following  non-exclusive,  right  to  use  the  software   accompanying   \nthis   License  (hereinafter  \"Software\") subject to the following terms and \nlimitations:\n\n\n(a)   Regardless of the media upon which it is distributed, the Software  is\nlicensed to you for use solely in conjunction with AMD hardware products  to\nwhich the Software relates (\"AMD Hardware\").\n\n(b)   You own the medium on which the Software is recorded, but AMD and,  if\napplicable,  its  licensors  retain  title  to  the  Software  and   related\ndocumentation.\n\n(c)   You may:\n\n  i) use the Software solely in  connection  with  the  AMD  Hardware  on  a\n   single computer;\n\n  ii) make one copy of the Software  in  machine-readable  form  for  backup\n   purposes only. You must reproduce on such copy AMD's copyright notice and\n   any other proprietary legends that were  on  the  original  copy  of  the\n   Software;\n\n  iii) transfer all your license rights in the Software  provided  you  must\n   also transfer a copy of this License, the backup copy  of  the  Software,\n   the AMD Hardware and the related documentation  and  provided  the  other\n   party reads and agrees  to  accept  the  terms  and  conditions  of  this\n   License.  Upon such transfer your license rights are then terminated.\n\n(d)   In addition to the license terms above, with respect  to  portions  of\nthe Software in source code or binary  form  designed  exclusively  for  use\nwith the Linux operating system (\"AMD Linux Code\"), you  may  use,  display,\nmodify, copy, distribute, allow others to  re-distribute,  package  and  re-\npackage such AMD Linux Code  for  commercial  and  non-commercial  purposes,\nprovided that:\n\n   i) all binary components of the AMD Linux Code are not  modified  in  any\n   way;\n\n   ii) the AMD Linux Code is only used  as  part  of  the  Software  and  in\n   connection with AMD Hardware;\n\n   iii) all copyright notices of AMD are reproduced and you refer  to  these\n   license terms;\n\n   iv) you  may  not  offer  or  impose any terms on the use  of  AMD  Linux\n   Code that alter or restrict this License; and\n\n   v) if you have modified the AMD Linux Code, such  modifications  will  be\n   made publicly available and are licensed under the  same  terms  provided\n   herein to AMD or any  other  third  party  without  further  restriction,\n   royalty or any other license requirement;\n\n   vi) to  the  extent  there  is  any AMD sample or  control  panel  source\n   code included in the AMD Linux Code, no rights are granted to modify such\n   code except for portions thereof that  may  be  subject  to  third  party\n   license terms that grant such rights; \n   \n   vii) no rights are granted to distribute the binary form of the AMD Linux\n   Kernel Module made by linking the AMD Proprietary  Kernel Library and the \n   AMD  Kernel  Compatibility  Layer  binary  compiled  using  Linux  kernel \n   headers;\n\n   viii) AMD is not  obligated  to  provide  any  maintenance  or  technical \n   support for any code resulting from AMD Linux Code.\n\n2.  Restrictions.  The Software contains copyrighted and patented  material,\ntrade secrets and other proprietary material.  In  order  to  protect  them,\nand except as permitted by this license or applicable legislation,  you  may\nnot:\n\n  a) decompile,  reverse  engineer,  disassemble  or  otherwise  reduce  the\n   Software to a human-perceivable form;\n\n  b) modify, network, rent, lend,  loan,  distribute  or  create  derivative\n   works based upon the Software in whole or in part; or\n\n  c) electronically transmit the Software from one computer  to  another  or\n   over a network or otherwise transfer the Software except as permitted  by\n   this License.\n\n3.  Termination.  This License  is  effective  until  terminated.   You  may\nterminate this License at any  time  by  destroying  the  Software,  related\ndocumentation  and  all  copies  thereof.   This  License   will   terminate\nimmediately without  notice  from  AMD  if  you  fail  to  comply  with  any\nprovision of this License.  Upon termination you must destroy the  Software,\nrelated documentation and all copies thereof.\n\n4.  Government End Users. If you are acquiring the  Software  on  behalf  of\nany  unit  or  agency  of  the  United  States  Government,  the   following\nprovisions apply.  The Government  agrees  the  Software  and  documentation\nwere  developed  at  private  expense  and  are  provided  with  \"RESTRICTED\nRIGHTS\".  Use, duplication, or disclosure by the Government  is  subject  to\nrestrictions as set forth in DFARS 227.7202-1(a) and  227.7202-3(a)  (1995),\nDFARS 252.227-7013(c)(1)(ii) (Oct 1988), FAR  12.212(a)(1995),  FAR  52.227-\n19, (June 1987) or FAR 52.227-14(ALT III) (June 1987),as amended  from  time\nto time.  In the event that this License, or any  part  thereof,  is  deemed\ninconsistent with the minimum rights identified  in  the  Restricted  Rights\nprovisions, the minimum rights shall prevail.\n\n5.  No Other License.  No rights or licenses are granted by AMD  under  this\nLicense, expressly or  by  implication,  with  respect  to  any  proprietary\ninformation  or  patent,  copyright,  trade  secret  or  other  intellectual\nproperty right owned or controlled by AMD, except as expressly  provided  in\nthis License.\n\n6.  Additional Licenses.  DISTRIBUTION  OR  USE  OF  THE  SOFTWARE  WITH  AN\nOPERATING SYSTEM MAY REQUIRE ADDITIONAL LICENSES FROM THE  OPERATING  SYSTEM\nVENDOR.\n\n7.  Disclaimer of Warranty  on  Software.   You  expressly  acknowledge  and\nagree that use of the Software is at  your  sole  risk.   The  Software  and\nrelated documentation are provided \"AS IS\" and without warranty of any  kind\nand AMD EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED,  INCLUDING,\nBUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF  MERCHANTABILITY  AND  FITNESS\nFORA PARTICULAR  PURPOSE,  OF  QUALITY,  OF  QUIET  ENJOYMENT  AND  OF  NON-\nINFRINGEMENT  OF  THIRD  PARTY  RIGHTS.   AMD  DOES  NOT  WARRANT  THAT  THE\nFUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET  YOUR  REQUIREMENTS,  OR  THAT\nTHE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE,  OR  THAT\nDEFECTS IN THE SOFTWARE WILL BE  CORRECTED.   THE  ENTIRE  RISK  AS  TO  THE\nRESULTS AND PERFORMANCE OF THE SOFTWARE IS  ASSUMED  BY  YOU.   FURTHERMORE,\nAMD DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS  REGARDING  THE  USE  ORTHE\nRESULTS OF THE USE OF THE SOFTWARE OR  RELATED  DOCUMENTATION  IN  TERMS  OF\nTHEIR CORRECTNESS, ACCURACY,  RELIABILITY,  CURRENTNESS,  OR  OTHERWISE.  NO\nORAL OR WRITTEN INFORMATION OR ADVICE  GIVEN  BY  AMD  OR  AMD'S  AUTHORIZED\nREPRESENTATIVE SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE  SCOPE  OF\nTHIS WARRANTY.  SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU  (AND  NOT  AMD  OR\nAMD'S AUTHORIZED REPRESENTATIVE) ASSUME THE ENTIRE  COST  OF  ALL  NECESSARY\nSERVICING, REPAIR OR CORRECTION.  THE SOFTWARE IS NOT INTENDED  FOR  USE  IN\nMEDICAL, LIFE SAVING OR LIFE SUSTAINING  APPLICATIONS.   SOME  JURISDICTIONS\nDO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES,  SO  THE  ABOVE  EXCLUSION\nMAY NOT APPLY TO YOU.\n\n8.  Limitation of Liability. TO THE MAXIMUM EXTENT PERMITTED BY  LAW,  UNDER\nNO  CIRCUMSTANCES  INCLUDING  NEGLIGENCE,  SHALL  AMD,  OR  ITS   DIRECTORS,\nOFFICERS, EMPLOYEES  OR  AGENTS,  BE  LIABLE  TO  YOU  FOR  ANY  INCIDENTAL,\nINDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES (INCLUDING DAMAGES  FOR  LOSS  OF\nBUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS  OF  BUSINESS INFORMATION, AND\nTHE LIKE) ARISING OUT OF THE USE, MISUSE OR INABILITY TO  USE  THE  SOFTWARE\nOR RELATED DOCUMENTATION, BREACH OR DEFAULT, INCLUDING  THOSE  ARISING  FROM\nINFRINGEMENT OR ALLEGED INFRINGEMENT OF ANY PATENT, TRADEMARK, COPYRIGHT  OR\nOTHER INTELLECTUAL PROPERTY RIGHT, BY AMD, EVEN IF AMD OR  AMD'S  AUTHORIZED\nREPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF  SUCH  DAMAGES.   SOME\nJURISDICTIONS DO NOT ALLOW THE LIMITATION  OR  EXCLUSION  OF  LIABILITY  FOR\nINCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE  LIMITATION  OR  EXCLUSION\nMAY NOT APPLY TO YOU.  AMD will not be liable for 1) loss of, or damage  to,\nyour records or data or 2) any damages claimed by you  based  on  any  third\nparty claim.   In no event shall  AMD's  total  liability  to  you  for  all\ndamages, losses, and causes of action (whether in contract, tort  (including\nnegligence) or otherwise) exceed the amount paid by you  for  the  Software.\nThe foregoing limitations will apply even if  the  above  stated  limitation\nfails of its essential purpose.\n\n9.  Controlling Law and Severability.  This License  shall  be  governed  by\nand construed under the laws of the  Province  of  Ontario,  Canada  without\nreference to its conflict of law principles.   Any  dispute  related  hereto\nwill be brought only in the courts in  Toronto,  Ontario,  Canada  and  such\ncourts are agreed  to  be  the  convenient  forum.   In  the  event  of  any\nconflicts between foreign law, rules, and  regulations,  and  Canadian  law,\nrules, and regulations, Canadian law, rules and  regulations  shall  prevail\nand  govern.   The  United  Nations  Convention   on   Contracts   for   the\nInternational Sale of Goods shall not apply to this  License.   If  for  any\nreason a court  of  competent  jurisdiction  finds  any  provision  of  this\nLicense or portion thereof, to  be  unenforceable,  that  provision  of  the\nLicense shall be enforced to the maximum extent permissible so as to  effect\nthe intent of the parties, and the remainder of this License shall  continue\nin full force and effect.\n\n10.  Complete Agreement.  This  License  constitutes  the  entire  agreement\nbetween the parties with respect to the use of the Software and the  related\ndocumentation, and supersedes all prior  or  contemporaneous  understandings\nor  agreements,  written  or  oral,  regarding  such  subject  matter.    No\namendment to or modification of this  License  will  be  binding  unless  in\nwriting and signed by a duly authorized representative of AMD.\n"
  },
  {
    "path": "licenses/Apache-2.0.txt",
    "content": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction, and distribution\nas defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by the copyright\nowner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all other entities\nthat control, are controlled by, or are under common control with that entity.\nFor the purposes of this definition, \"control\" means (i) the power, direct\nor indirect, to cause the direction or management of such entity, whether\nby contract or otherwise, or (ii) ownership of fifty percent (50%) or more\nof the outstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity exercising permissions\ngranted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications, including\nbut not limited to software source code, documentation source, and configuration\nfiles.\n\n\"Object\" form shall mean any form resulting from mechanical transformation\nor translation of a Source form, including but not limited to compiled object\ncode, generated documentation, and conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or Object form,\nmade available under the License, as indicated by a copyright notice that\nis included in or attached to the work (an example is provided in the Appendix\nbelow).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object form,\nthat is based on (or derived from) the Work and for which the editorial revisions,\nannotations, elaborations, or other modifications represent, as a whole, an\noriginal work of authorship. For the purposes of this License, Derivative\nWorks shall not include works that remain separable from, or merely link (or\nbind by name) to the interfaces of, the Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including the original version\nof the Work and any modifications or additions to that Work or Derivative\nWorks thereof, that is intentionally submitted to Licensor for inclusion in\nthe Work by the copyright owner or by an individual or Legal Entity authorized\nto submit on behalf of the copyright owner. For the purposes of this definition,\n\"submitted\" means any form of electronic, verbal, or written communication\nsent to the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems, and\nissue tracking systems that are managed by, or on behalf of, the Licensor\nfor the purpose of discussing and improving the Work, but excluding communication\nthat is conspicuously marked or otherwise designated in writing by the copyright\nowner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf\nof whom a Contribution has been received by Licensor and subsequently incorporated\nwithin the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of this\nLicense, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,\nno-charge, royalty-free, irrevocable copyright license to reproduce, prepare\nDerivative Works of, publicly display, publicly perform, sublicense, and distribute\nthe Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of this License,\neach Contributor hereby grants to You a perpetual, worldwide, non-exclusive,\nno-charge, royalty-free, irrevocable (except as stated in this section) patent\nlicense to make, have made, use, offer to sell, sell, import, and otherwise\ntransfer the Work, where such license applies only to those patent claims\nlicensable by such Contributor that are necessarily infringed by their Contribution(s)\nalone or by combination of their Contribution(s) with the Work to which such\nContribution(s) was submitted. If You institute patent litigation against\nany entity (including a cross-claim or counterclaim in a lawsuit) alleging\nthat the Work or a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses granted to You\nunder this License for that Work shall terminate as of the date such litigation\nis filed.\n\n4. Redistribution. You may reproduce and distribute copies of the Work or\nDerivative Works thereof in any medium, with or without modifications, and\nin Source or Object form, provided that You meet the following conditions:\n\n(a) You must give any other recipients of the Work or Derivative Works a copy\nof this License; and\n\n(b) You must cause any modified files to carry prominent notices stating that\nYou changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works that You distribute,\nall copyright, patent, trademark, and attribution notices from the Source\nform of the Work, excluding those notices that do not pertain to any part\nof the Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its distribution,\nthen any Derivative Works that You distribute must include a readable copy\nof the attribution notices contained within such NOTICE file, excluding those\nnotices that do not pertain to any part of the Derivative Works, in at least\none of the following places: within a NOTICE text file distributed as part\nof the Derivative Works; within the Source form or documentation, if provided\nalong with the Derivative Works; or, within a display generated by the Derivative\nWorks, if and wherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and do not modify the\nLicense. You may add Your own attribution notices within Derivative Works\nthat You distribute, alongside or as an addendum to the NOTICE text from the\nWork, provided that such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and may provide\nadditional or different license terms and conditions for use, reproduction,\nor distribution of Your modifications, or for any such Derivative Works as\na whole, provided Your use, reproduction, and distribution of the Work otherwise\ncomplies with the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise, any\nContribution intentionally submitted for inclusion in the Work by You to the\nLicensor shall be under the terms and conditions of this License, without\nany additional terms or conditions. Notwithstanding the above, nothing herein\nshall supersede or modify the terms of any separate license agreement you\nmay have executed with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade names,\ntrademarks, service marks, or product names of the Licensor, except as required\nfor reasonable and customary use in describing the origin of the Work and\nreproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or agreed to\nin writing, Licensor provides the Work (and each Contributor provides its\nContributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied, including, without limitation, any warranties\nor conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR\nA PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness\nof using or redistributing the Work and assume any risks associated with Your\nexercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory, whether\nin tort (including negligence), contract, or otherwise, unless required by\napplicable law (such as deliberate and grossly negligent acts) or agreed to\nin writing, shall any Contributor be liable to You for damages, including\nany direct, indirect, special, incidental, or consequential damages of any\ncharacter arising as a result of this License or out of the use or inability\nto use the Work (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all other commercial\ndamages or losses), even if such Contributor has been advised of the possibility\nof such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing the Work\nor Derivative Works thereof, You may choose to offer, and charge a fee for,\nacceptance of support, warranty, indemnity, or other liability obligations\nand/or rights consistent with this License. However, in accepting such obligations,\nYou may act only on Your own behalf and on Your sole responsibility, not on\nbehalf of any other Contributor, and only if You agree to indemnify, defend,\nand hold each Contributor harmless for any liability incurred by, or claims\nasserted against, such Contributor by reason of your accepting any such warranty\nor additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following boilerplate\nnotice, with the fields enclosed by brackets \"[]\" replaced with your own identifying\ninformation. (Don't include the brackets!)  The text should be enclosed in\nthe appropriate comment syntax for the file format. We also recommend that\na file or class name and description of purpose be included on the same \"printed\npage\" as the copyright notice for easier identification within third-party\narchives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
  },
  {
    "path": "licenses/Artistic.txt",
    "content": "\n\n\n\n\t\t\t The \"Artistic License\"\n\n\t\t\t\tPreamble\n\nThe intent of this document is to state the conditions under which a\nPackage may be copied, such that the Copyright Holder maintains some\nsemblance of artistic control over the development of the package,\nwhile giving the users of the package the right to use and distribute\nthe Package in a more-or-less customary fashion, plus the right to make\nreasonable modifications.\n\nDefinitions:\n\n\t\"Package\" refers to the collection of files distributed by the\n\tCopyright Holder, and derivatives of that collection of files\n\tcreated through textual modification.\n\n\t\"Standard Version\" refers to such a Package if it has not been\n\tmodified, or has been modified in accordance with the wishes\n\tof the Copyright Holder as specified below.\n\n\t\"Copyright Holder\" is whoever is named in the copyright or\n\tcopyrights for the package.\n\n\t\"You\" is you, if you're thinking about copying or distributing\n\tthis Package.\n\n\t\"Reasonable copying fee\" is whatever you can justify on the\n\tbasis of media cost, duplication charges, time of people involved,\n\tand so on.  (You will not be required to justify it to the\n\tCopyright Holder, but only to the computing community at large\n\tas a market that must bear the fee.)\n\n\t\"Freely Available\" means that no fee is charged for the item\n\titself, though there may be fees involved in handling the item.\n\tIt also means that recipients of the item may redistribute it\n\tunder the same conditions they received it.\n\n1. You may make and give away verbatim copies of the source form of the\nStandard Version of this Package without restriction, provided that you\nduplicate all of the original copyright notices and associated disclaimers.\n\n2. You may apply bug fixes, portability fixes and other modifications\nderived from the Public Domain or from the Copyright Holder.  A Package\nmodified in such a way shall still be considered the Standard Version.\n\n3. You may otherwise modify your copy of this Package in any way, provided\nthat you insert a prominent notice in each changed file stating how and\nwhen you changed that file, and provided that you do at least ONE of the\nfollowing:\n\n    a) place your modifications in the Public Domain or otherwise make them\n    Freely Available, such as by posting said modifications to Usenet or\n    an equivalent medium, or placing the modifications on a major archive\n    site such as uunet.uu.net, or by allowing the Copyright Holder to include\n    your modifications in the Standard Version of the Package.\n\n    b) use the modified Package only within your corporation or organization.\n\n    c) rename any non-standard executables so the names do not conflict\n    with standard executables, which must also be provided, and provide\n    a separate manual page for each non-standard executable that clearly\n    documents how it differs from the Standard Version.\n\n    d) make other distribution arrangements with the Copyright Holder.\n\n4. You may distribute the programs of this Package in object code or\nexecutable form, provided that you do at least ONE of the following:\n\n    a) distribute a Standard Version of the executables and library files,\n    together with instructions (in the manual page or equivalent) on where\n    to get the Standard Version.\n\n    b) accompany the distribution with the machine-readable source of\n    the Package with your modifications.\n\n    c) give non-standard executables non-standard names, and clearly\n    document the differences in manual pages (or equivalent), together\n    with instructions on where to get the Standard Version.\n\n    d) make other distribution arrangements with the Copyright Holder.\n\n5. You may charge a reasonable copying fee for any distribution of this\nPackage.  You may charge any fee you choose for support of this\nPackage.  You may not charge a fee for this Package itself.  However,\nyou may distribute this Package in aggregate with other (possibly\ncommercial) programs as part of a larger (possibly commercial) software\ndistribution provided that you do not advertise this Package as a\nproduct of your own.  You may embed this Package's interpreter within\nan executable of yours (by linking); this shall be construed as a mere\nform of aggregation, provided that the complete Standard Version of the\ninterpreter is so embedded.\n\n6. The scripts and library files supplied as input to or produced as\noutput from the programs of this Package do not automatically fall\nunder the copyright of this Package, but belong to whoever generated\nthem, and may be sold commercially, and may be aggregated with this\nPackage.  If such scripts or library files are aggregated with this\nPackage via the so-called \"undump\" or \"unexec\" methods of producing a\nbinary executable image, then distribution of such an image shall\nneither be construed as a distribution of this Package nor shall it\nfall under the restrictions of Paragraphs 3 and 4, provided that you do\nnot represent such an executable image as a Standard Version of this\nPackage.\n\n7. C subroutines (or comparably compiled subroutines in other\nlanguages) supplied by you and linked into this Package in order to\nemulate subroutines and variables of the language defined by this\nPackage shall not be considered part of this Package, but are the\nequivalent of input as in Paragraph 6, provided these subroutines do\nnot change the language in any way that would cause it to fail the\nregression tests for the language.\n\n8. Aggregation of this Package with a commercial distribution is always\npermitted provided that the use of this Package is embedded; that is,\nwhen no overt attempt is made to make this Package's interfaces visible\nto the end user of the commercial distribution.  Such use shall not be\nconstrued as a distribution of this Package.\n\n9. The name of the Copyright Holder may not be used to endorse or promote\nproducts derived from this software without specific prior written permission.\n\n10. THIS PACKAGE IS PROVIDED \"AS IS\" AND WITHOUT ANY EXPRESS OR\nIMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED\nWARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n\n\t\t\t\tThe End\n"
  },
  {
    "path": "licenses/BSD-1-Clause.txt",
    "content": "Copyright (c) 1995, 1999 Berkeley Software Design, Inc.  All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n1. Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n\nTHIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED.  IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\nOR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\nHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\nLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\nOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGE.\n"
  },
  {
    "path": "licenses/BSD-2-Clause.txt",
    "content": "Copyright (c) <year> <owner> All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE\nUSE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "licenses/BSD-3-Clause.txt",
    "content": "Copyright (c) <year> <owner>. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors\nmay be used to endorse or promote products derived from this software without\nspecific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE\nUSE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "licenses/BSD-4-Clause.txt",
    "content": "Copyright (c) <year> <owner>. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n\n3. All advertising materials mentioning features or use of this software must\ndisplay the following acknowledgement:\nThis product includes software developed by the the organization.\n\n4. Neither the name of the copyright holder nor the names of its contributors\nmay be used to endorse or promote products derived from this software without\nspecific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER \"AS IS\" AND ANY EXPRESS OR IMPLIED\nWARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT\nHOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\nOR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\nGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\nHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\nLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\nOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGE.\n"
  },
  {
    "path": "licenses/BSL.txt",
    "content": "Boost Software License - Version 1.0 - August 17th, 2003\n\nPermission is hereby granted, free of charge, to any person or organization\nobtaining a copy of the software and accompanying documentation covered by\nthis license (the \"Software\") to use, reproduce, display, distribute,\nexecute, and transmit the Software, and to prepare derivative works of the\nSoftware, and to permit third-parties to whom the Software is furnished to\ndo so, all subject to the following:\n\nThe copyright notices in the Software and this entire statement, including\nthe above license grant, this restriction and the following disclaimer,\nmust be included in all copies of the Software, in whole or in part, and\nall derivative works of the Software, unless such copies or derivative\nworks are solely in the form of machine-executable object code generated by\na source language processor.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT\nSHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\nFOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "licenses/Clarified_Artistic.txt",
    "content": "\t\t     The Clarified Artistic License\n\n\t\t\t\tPreamble\n\nThe intent of this document is to state the conditions under which a\nPackage may be copied, such that the Copyright Holder maintains some\nsemblance of artistic control over the development of the package,\nwhile giving the users of the package the right to use and distribute\nthe Package in a more-or-less customary fashion, plus the right to make\nreasonable modifications.\n\nDefinitions:\n\n\t\"Package\" refers to the collection of files distributed by the\n\tCopyright Holder, and derivatives of that collection of files\n\tcreated through textual modification.\n\n\t\"Standard Version\" refers to such a Package if it has not been\n\tmodified, or has been modified in accordance with the wishes\n\tof the Copyright Holder as specified below.\n\n\t\"Copyright Holder\" is whoever is named in the copyright or\n\tcopyrights for the package.\n\n\t\"You\" is you, if you're thinking about copying or distributing\n\tthis Package.\n\n\t\"Distribution fee\" is a fee you charge for providing a copy\n        of this Package to another party.\n\n\t\"Freely Available\" means that no fee is charged for the right to\n        use the item, though there may be fees involved in handling the\n        item.  It also means that recipients of the item may redistribute\n        it under the same conditions they received it.\n\n1. You may make and give away verbatim copies of the source form of the\nStandard Version of this Package without restriction, provided that you\nduplicate all of the original copyright notices and associated disclaimers.\n\n2. You may apply bug fixes, portability fixes and other modifications\nderived from the Public Domain, or those made Freely Available, or from\nthe Copyright Holder.  A Package modified in such a way shall still be\nconsidered the Standard Version.\n\n3. You may otherwise modify your copy of this Package in any way, provided\nthat you insert a prominent notice in each changed file stating how and\nwhen you changed that file, and provided that you do at least ONE of the\nfollowing:\n\n    a) place your modifications in the Public Domain or otherwise make them\n    Freely Available, such as by posting said modifications to Usenet or an\n    equivalent medium, or placing the modifications on a major network\n    archive site allowing unrestricted access to them, or by allowing the\n    Copyright Holder to include your modifications in the Standard Version\n    of the Package.\n\n    b) use the modified Package only within your corporation or organization.\n\n    c) rename any non-standard executables so the names do not conflict\n    with standard executables, which must also be provided, and provide\n    a separate manual page for each non-standard executable that clearly\n    documents how it differs from the Standard Version.\n\n    d) make other distribution arrangements with the Copyright Holder.\n\n    e) permit and encourge anyone who receives a copy of the modified Package\n       permission to make your modifications Freely Available\n       in some specific way.\n\n\n4. You may distribute the programs of this Package in object code or\nexecutable form, provided that you do at least ONE of the following:\n\n    a) distribute a Standard Version of the executables and library files,\n    together with instructions (in the manual page or equivalent) on where\n    to get the Standard Version.\n\n    b) accompany the distribution with the machine-readable source of\n    the Package with your modifications.\n\n    c) give non-standard executables non-standard names, and clearly\n    document the differences in manual pages (or equivalent), together\n    with instructions on where to get the Standard Version.\n\n    d) make other distribution arrangements with the Copyright Holder.\n\n    e) offer the machine-readable source of the Package, with your\n       modifications, by mail order.\n\n5. You may charge a distribution fee for any distribution of this Package.\nIf you offer support for this Package, you may charge any fee you choose\nfor that support.  You may not charge a license fee for the right to use\nthis Package itself.  You may distribute this Package in aggregate with\nother (possibly commercial and possibly nonfree) programs as part of a\nlarger (possibly commercial and possibly nonfree) software distribution,\nand charge license fees for other parts of that software distribution,\nprovided that you do not advertise this Package as a product of your own.\nIf the Package includes an interpreter, You may embed this Package's\ninterpreter within an executable of yours (by linking); this shall be\nconstrued as a mere form of aggregation, provided that the complete\nStandard Version of the interpreter is so embedded.\n\n6. The scripts and library files supplied as input to or produced as\noutput from the programs of this Package do not automatically fall\nunder the copyright of this Package, but belong to whoever generated\nthem, and may be sold commercially, and may be aggregated with this\nPackage.  If such scripts or library files are aggregated with this\nPackage via the so-called \"undump\" or \"unexec\" methods of producing a\nbinary executable image, then distribution of such an image shall\nneither be construed as a distribution of this Package nor shall it\nfall under the restrictions of Paragraphs 3 and 4, provided that you do\nnot represent such an executable image as a Standard Version of this\nPackage.\n\n7. C subroutines (or comparably compiled subroutines in other\nlanguages) supplied by you and linked into this Package in order to\nemulate subroutines and variables of the language defined by this\nPackage shall not be considered part of this Package, but are the\nequivalent of input as in Paragraph 6, provided these subroutines do\nnot change the language in any way that would cause it to fail the\nregression tests for the language.\n\n8. Aggregation of the Standard Version of the Package with a commercial\ndistribution is always permitted provided that the use of this Package\nis embedded; that is, when no overt attempt is made to make this Package's\ninterfaces visible to the end user of the commercial distribution.\nSuch use shall not be construed as a distribution of this Package.\n\n9. The name of the Copyright Holder may not be used to endorse or promote\nproducts derived from this software without specific prior written permission.\n\n10. THIS PACKAGE IS PROVIDED \"AS IS\" AND WITHOUT ANY EXPRESS OR\nIMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED\nWARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n\n\t\t\t\tThe End\n"
  },
  {
    "path": "licenses/FDL.txt",
    "content": "\t\tGNU Free Documentation License\n\t\t  Version 1.2, November 2002\n\n\n Copyright (C) 2000,2001,2002  Free Software Foundation, Inc.\n     51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n\n0. PREAMBLE\n\nThe purpose of this License is to make a manual, textbook, or other\nfunctional and useful document \"free\" in the sense of freedom: to\nassure everyone the effective freedom to copy and redistribute it,\nwith or without modifying it, either commercially or noncommercially.\nSecondarily, this License preserves for the author and publisher a way\nto get credit for their work, while not being considered responsible\nfor modifications made by others.\n\nThis License is a kind of \"copyleft\", which means that derivative\nworks of the document must themselves be free in the same sense.  It\ncomplements the GNU General Public License, which is a copyleft\nlicense designed for free software.\n\nWe have designed this License in order to use it for manuals for free\nsoftware, because free software needs free documentation: a free\nprogram should come with manuals providing the same freedoms that the\nsoftware does.  But this License is not limited to software manuals;\nit can be used for any textual work, regardless of subject matter or\nwhether it is published as a printed book.  We recommend this License\nprincipally for works whose purpose is instruction or reference.\n\n\n1. APPLICABILITY AND DEFINITIONS\n\nThis License applies to any manual or other work, in any medium, that\ncontains a notice placed by the copyright holder saying it can be\ndistributed under the terms of this License.  Such a notice grants a\nworld-wide, royalty-free license, unlimited in duration, to use that\nwork under the conditions stated herein.  The \"Document\", below,\nrefers to any such manual or work.  Any member of the public is a\nlicensee, and is addressed as \"you\".  You accept the license if you\ncopy, modify or distribute the work in a way requiring permission\nunder copyright law.\n\nA \"Modified Version\" of the Document means any work containing the\nDocument or a portion of it, either copied verbatim, or with\nmodifications and/or translated into another language.\n\nA \"Secondary Section\" is a named appendix or a front-matter section of\nthe Document that deals exclusively with the relationship of the\npublishers or authors of the Document to the Document's overall subject\n(or to related matters) and contains nothing that could fall directly\nwithin that overall subject.  (Thus, if the Document is in part a\ntextbook of mathematics, a Secondary Section may not explain any\nmathematics.)  The relationship could be a matter of historical\nconnection with the subject or with related matters, or of legal,\ncommercial, philosophical, ethical or political position regarding\nthem.\n\nThe \"Invariant Sections\" are certain Secondary Sections whose titles\nare designated, as being those of Invariant Sections, in the notice\nthat says that the Document is released under this License.  If a\nsection does not fit the above definition of Secondary then it is not\nallowed to be designated as Invariant.  The Document may contain zero\nInvariant Sections.  If the Document does not identify any Invariant\nSections then there are none.\n\nThe \"Cover Texts\" are certain short passages of text that are listed,\nas Front-Cover Texts or Back-Cover Texts, in the notice that says that\nthe Document is released under this License.  A Front-Cover Text may\nbe at most 5 words, and a Back-Cover Text may be at most 25 words.\n\nA \"Transparent\" copy of the Document means a machine-readable copy,\nrepresented in a format whose specification is available to the\ngeneral public, that is suitable for revising the document\nstraightforwardly with generic text editors or (for images composed of\npixels) generic paint programs or (for drawings) some widely available\ndrawing editor, and that is suitable for input to text formatters or\nfor automatic translation to a variety of formats suitable for input\nto text formatters.  A copy made in an otherwise Transparent file\nformat whose markup, or absence of markup, has been arranged to thwart\nor discourage subsequent modification by readers is not Transparent.\nAn image format is not Transparent if used for any substantial amount\nof text.  A copy that is not \"Transparent\" is called \"Opaque\".\n\nExamples of suitable formats for Transparent copies include plain\nASCII without markup, Texinfo input format, LaTeX input format, SGML\nor XML using a publicly available DTD, and standard-conforming simple\nHTML, PostScript or PDF designed for human modification.  Examples of\ntransparent image formats include PNG, XCF and JPG.  Opaque formats\ninclude proprietary formats that can be read and edited only by\nproprietary word processors, SGML or XML for which the DTD and/or\nprocessing tools are not generally available, and the\nmachine-generated HTML, PostScript or PDF produced by some word\nprocessors for output purposes only.\n\nThe \"Title Page\" means, for a printed book, the title page itself,\nplus such following pages as are needed to hold, legibly, the material\nthis License requires to appear in the title page.  For works in\nformats which do not have any title page as such, \"Title Page\" means\nthe text near the most prominent appearance of the work's title,\npreceding the beginning of the body of the text.\n\nA section \"Entitled XYZ\" means a named subunit of the Document whose\ntitle either is precisely XYZ or contains XYZ in parentheses following\ntext that translates XYZ in another language.  (Here XYZ stands for a\nspecific section name mentioned below, such as \"Acknowledgements\",\n\"Dedications\", \"Endorsements\", or \"History\".)  To \"Preserve the Title\"\nof such a section when you modify the Document means that it remains a\nsection \"Entitled XYZ\" according to this definition.\n\nThe Document may include Warranty Disclaimers next to the notice which\nstates that this License applies to the Document.  These Warranty\nDisclaimers are considered to be included by reference in this\nLicense, but only as regards disclaiming warranties: any other\nimplication that these Warranty Disclaimers may have is void and has\nno effect on the meaning of this License.\n\n\n2. VERBATIM COPYING\n\nYou may copy and distribute the Document in any medium, either\ncommercially or noncommercially, provided that this License, the\ncopyright notices, and the license notice saying this License applies\nto the Document are reproduced in all copies, and that you add no other\nconditions whatsoever to those of this License.  You may not use\ntechnical measures to obstruct or control the reading or further\ncopying of the copies you make or distribute.  However, you may accept\ncompensation in exchange for copies.  If you distribute a large enough\nnumber of copies you must also follow the conditions in section 3.\n\nYou may also lend copies, under the same conditions stated above, and\nyou may publicly display copies.\n\n\n3. COPYING IN QUANTITY\n\nIf you publish printed copies (or copies in media that commonly have\nprinted covers) of the Document, numbering more than 100, and the\nDocument's license notice requires Cover Texts, you must enclose the\ncopies in covers that carry, clearly and legibly, all these Cover\nTexts: Front-Cover Texts on the front cover, and Back-Cover Texts on\nthe back cover.  Both covers must also clearly and legibly identify\nyou as the publisher of these copies.  The front cover must present\nthe full title with all words of the title equally prominent and\nvisible.  You may add other material on the covers in addition.\nCopying with changes limited to the covers, as long as they preserve\nthe title of the Document and satisfy these conditions, can be treated\nas verbatim copying in other respects.\n\nIf the required texts for either cover are too voluminous to fit\nlegibly, you should put the first ones listed (as many as fit\nreasonably) on the actual cover, and continue the rest onto adjacent\npages.\n\nIf you publish or distribute Opaque copies of the Document numbering\nmore than 100, you must either include a machine-readable Transparent\ncopy along with each Opaque copy, or state in or with each Opaque copy\na computer-network location from which the general network-using\npublic has access to download using public-standard network protocols\na complete Transparent copy of the Document, free of added material.\nIf you use the latter option, you must take reasonably prudent steps,\nwhen you begin distribution of Opaque copies in quantity, to ensure\nthat this Transparent copy will remain thus accessible at the stated\nlocation until at least one year after the last time you distribute an\nOpaque copy (directly or through your agents or retailers) of that\nedition to the public.\n\nIt is requested, but not required, that you contact the authors of the\nDocument well before redistributing any large number of copies, to give\nthem a chance to provide you with an updated version of the Document.\n\n\n4. MODIFICATIONS\n\nYou may copy and distribute a Modified Version of the Document under\nthe conditions of sections 2 and 3 above, provided that you release\nthe Modified Version under precisely this License, with the Modified\nVersion filling the role of the Document, thus licensing distribution\nand modification of the Modified Version to whoever possesses a copy\nof it.  In addition, you must do these things in the Modified Version:\n\nA. Use in the Title Page (and on the covers, if any) a title distinct\n   from that of the Document, and from those of previous versions\n   (which should, if there were any, be listed in the History section\n   of the Document).  You may use the same title as a previous version\n   if the original publisher of that version gives permission.\nB. List on the Title Page, as authors, one or more persons or entities\n   responsible for authorship of the modifications in the Modified\n   Version, together with at least five of the principal authors of the\n   Document (all of its principal authors, if it has fewer than five),\n   unless they release you from this requirement.\nC. State on the Title page the name of the publisher of the\n   Modified Version, as the publisher.\nD. Preserve all the copyright notices of the Document.\nE. Add an appropriate copyright notice for your modifications\n   adjacent to the other copyright notices.\nF. Include, immediately after the copyright notices, a license notice\n   giving the public permission to use the Modified Version under the\n   terms of this License, in the form shown in the Addendum below.\nG. Preserve in that license notice the full lists of Invariant Sections\n   and required Cover Texts given in the Document's license notice.\nH. Include an unaltered copy of this License.\nI. Preserve the section Entitled \"History\", Preserve its Title, and add\n   to it an item stating at least the title, year, new authors, and\n   publisher of the Modified Version as given on the Title Page.  If\n   there is no section Entitled \"History\" in the Document, create one\n   stating the title, year, authors, and publisher of the Document as\n   given on its Title Page, then add an item describing the Modified\n   Version as stated in the previous sentence.\nJ. Preserve the network location, if any, given in the Document for\n   public access to a Transparent copy of the Document, and likewise\n   the network locations given in the Document for previous versions\n   it was based on.  These may be placed in the \"History\" section.\n   You may omit a network location for a work that was published at\n   least four years before the Document itself, or if the original\n   publisher of the version it refers to gives permission.\nK. For any section Entitled \"Acknowledgements\" or \"Dedications\",\n   Preserve the Title of the section, and preserve in the section all\n   the substance and tone of each of the contributor acknowledgements\n   and/or dedications given therein.\nL. Preserve all the Invariant Sections of the Document,\n   unaltered in their text and in their titles.  Section numbers\n   or the equivalent are not considered part of the section titles.\nM. Delete any section Entitled \"Endorsements\".  Such a section\n   may not be included in the Modified Version.\nN. Do not retitle any existing section to be Entitled \"Endorsements\"\n   or to conflict in title with any Invariant Section.\nO. Preserve any Warranty Disclaimers.\n\nIf the Modified Version includes new front-matter sections or\nappendices that qualify as Secondary Sections and contain no material\ncopied from the Document, you may at your option designate some or all\nof these sections as invariant.  To do this, add their titles to the\nlist of Invariant Sections in the Modified Version's license notice.\nThese titles must be distinct from any other section titles.\n\nYou may add a section Entitled \"Endorsements\", provided it contains\nnothing but endorsements of your Modified Version by various\nparties--for example, statements of peer review or that the text has\nbeen approved by an organization as the authoritative definition of a\nstandard.\n\nYou may add a passage of up to five words as a Front-Cover Text, and a\npassage of up to 25 words as a Back-Cover Text, to the end of the list\nof Cover Texts in the Modified Version.  Only one passage of\nFront-Cover Text and one of Back-Cover Text may be added by (or\nthrough arrangements made by) any one entity.  If the Document already\nincludes a cover text for the same cover, previously added by you or\nby arrangement made by the same entity you are acting on behalf of,\nyou may not add another; but you may replace the old one, on explicit\npermission from the previous publisher that added the old one.\n\nThe author(s) and publisher(s) of the Document do not by this License\ngive permission to use their names for publicity for or to assert or\nimply endorsement of any Modified Version.\n\n\n5. COMBINING DOCUMENTS\n\nYou may combine the Document with other documents released under this\nLicense, under the terms defined in section 4 above for modified\nversions, provided that you include in the combination all of the\nInvariant Sections of all of the original documents, unmodified, and\nlist them all as Invariant Sections of your combined work in its\nlicense notice, and that you preserve all their Warranty Disclaimers.\n\nThe combined work need only contain one copy of this License, and\nmultiple identical Invariant Sections may be replaced with a single\ncopy.  If there are multiple Invariant Sections with the same name but\ndifferent contents, make the title of each such section unique by\nadding at the end of it, in parentheses, the name of the original\nauthor or publisher of that section if known, or else a unique number.\nMake the same adjustment to the section titles in the list of\nInvariant Sections in the license notice of the combined work.\n\nIn the combination, you must combine any sections Entitled \"History\"\nin the various original documents, forming one section Entitled\n\"History\"; likewise combine any sections Entitled \"Acknowledgements\",\nand any sections Entitled \"Dedications\".  You must delete all sections\nEntitled \"Endorsements\".\n\n\n6. COLLECTIONS OF DOCUMENTS\n\nYou may make a collection consisting of the Document and other documents\nreleased under this License, and replace the individual copies of this\nLicense in the various documents with a single copy that is included in\nthe collection, provided that you follow the rules of this License for\nverbatim copying of each of the documents in all other respects.\n\nYou may extract a single document from such a collection, and distribute\nit individually under this License, provided you insert a copy of this\nLicense into the extracted document, and follow this License in all\nother respects regarding verbatim copying of that document.\n\n\n7. AGGREGATION WITH INDEPENDENT WORKS\n\nA compilation of the Document or its derivatives with other separate\nand independent documents or works, in or on a volume of a storage or\ndistribution medium, is called an \"aggregate\" if the copyright\nresulting from the compilation is not used to limit the legal rights\nof the compilation's users beyond what the individual works permit.\nWhen the Document is included in an aggregate, this License does not\napply to the other works in the aggregate which are not themselves\nderivative works of the Document.\n\nIf the Cover Text requirement of section 3 is applicable to these\ncopies of the Document, then if the Document is less than one half of\nthe entire aggregate, the Document's Cover Texts may be placed on\ncovers that bracket the Document within the aggregate, or the\nelectronic equivalent of covers if the Document is in electronic form.\nOtherwise they must appear on printed covers that bracket the whole\naggregate.\n\n\n8. TRANSLATION\n\nTranslation is considered a kind of modification, so you may\ndistribute translations of the Document under the terms of section 4.\nReplacing Invariant Sections with translations requires special\npermission from their copyright holders, but you may include\ntranslations of some or all Invariant Sections in addition to the\noriginal versions of these Invariant Sections.  You may include a\ntranslation of this License, and all the license notices in the\nDocument, and any Warranty Disclaimers, provided that you also include\nthe original English version of this License and the original versions\nof those notices and disclaimers.  In case of a disagreement between\nthe translation and the original version of this License or a notice\nor disclaimer, the original version will prevail.\n\nIf a section in the Document is Entitled \"Acknowledgements\",\n\"Dedications\", or \"History\", the requirement (section 4) to Preserve\nits Title (section 1) will typically require changing the actual\ntitle.\n\n\n9. TERMINATION\n\nYou may not copy, modify, sublicense, or distribute the Document except\nas expressly provided for under this License.  Any other attempt to\ncopy, modify, sublicense or distribute the Document is void, and will\nautomatically terminate your rights under this License.  However,\nparties who have received copies, or rights, from you under this\nLicense will not have their licenses terminated so long as such\nparties remain in full compliance.\n\n\n10. FUTURE REVISIONS OF THIS LICENSE\n\nThe Free Software Foundation may publish new, revised versions\nof the GNU Free Documentation License from time to time.  Such new\nversions will be similar in spirit to the present version, but may\ndiffer in detail to address new problems or concerns.  See\nhttp://www.gnu.org/copyleft/.\n\nEach version of the License is given a distinguishing version number.\nIf the Document specifies that a particular numbered version of this\nLicense \"or any later version\" applies to it, you have the option of\nfollowing the terms and conditions either of that specified version or\nof any later version that has been published (not as a draft) by the\nFree Software Foundation.  If the Document does not specify a version\nnumber of this License, you may choose any version ever published (not\nas a draft) by the Free Software Foundation.\n\n\nADDENDUM: How to use this License for your documents\n\nTo use this License in a document you have written, include a copy of\nthe License in the document and put the following copyright and\nlicense notices just after the title page:\n\n    Copyright (c)  YEAR  YOUR NAME.\n    Permission is granted to copy, distribute and/or modify this document\n    under the terms of the GNU Free Documentation License, Version 1.2\n    or any later version published by the Free Software Foundation;\n    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.\n    A copy of the license is included in the section entitled \"GNU\n    Free Documentation License\".\n\nIf you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,\nreplace the \"with...Texts.\" line with this:\n\n    with the Invariant Sections being LIST THEIR TITLES, with the\n    Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.\n\nIf you have Invariant Sections without Cover Texts, or some other\ncombination of the three, merge those two alternatives to suit the\nsituation.\n\nIf your document contains nontrivial examples of program code, we\nrecommend releasing these examples in parallel under your choice of\nfree software license, such as the GNU General Public License,\nto permit their use in free software.\n"
  },
  {
    "path": "licenses/FDL1_2.txt",
    "content": "\t\tGNU Free Documentation License\n\t\t  Version 1.2, November 2002\n\n\n Copyright (C) 2000,2001,2002  Free Software Foundation, Inc.\n     51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n\n0. PREAMBLE\n\nThe purpose of this License is to make a manual, textbook, or other\nfunctional and useful document \"free\" in the sense of freedom: to\nassure everyone the effective freedom to copy and redistribute it,\nwith or without modifying it, either commercially or noncommercially.\nSecondarily, this License preserves for the author and publisher a way\nto get credit for their work, while not being considered responsible\nfor modifications made by others.\n\nThis License is a kind of \"copyleft\", which means that derivative\nworks of the document must themselves be free in the same sense.  It\ncomplements the GNU General Public License, which is a copyleft\nlicense designed for free software.\n\nWe have designed this License in order to use it for manuals for free\nsoftware, because free software needs free documentation: a free\nprogram should come with manuals providing the same freedoms that the\nsoftware does.  But this License is not limited to software manuals;\nit can be used for any textual work, regardless of subject matter or\nwhether it is published as a printed book.  We recommend this License\nprincipally for works whose purpose is instruction or reference.\n\n\n1. APPLICABILITY AND DEFINITIONS\n\nThis License applies to any manual or other work, in any medium, that\ncontains a notice placed by the copyright holder saying it can be\ndistributed under the terms of this License.  Such a notice grants a\nworld-wide, royalty-free license, unlimited in duration, to use that\nwork under the conditions stated herein.  The \"Document\", below,\nrefers to any such manual or work.  Any member of the public is a\nlicensee, and is addressed as \"you\".  You accept the license if you\ncopy, modify or distribute the work in a way requiring permission\nunder copyright law.\n\nA \"Modified Version\" of the Document means any work containing the\nDocument or a portion of it, either copied verbatim, or with\nmodifications and/or translated into another language.\n\nA \"Secondary Section\" is a named appendix or a front-matter section of\nthe Document that deals exclusively with the relationship of the\npublishers or authors of the Document to the Document's overall subject\n(or to related matters) and contains nothing that could fall directly\nwithin that overall subject.  (Thus, if the Document is in part a\ntextbook of mathematics, a Secondary Section may not explain any\nmathematics.)  The relationship could be a matter of historical\nconnection with the subject or with related matters, or of legal,\ncommercial, philosophical, ethical or political position regarding\nthem.\n\nThe \"Invariant Sections\" are certain Secondary Sections whose titles\nare designated, as being those of Invariant Sections, in the notice\nthat says that the Document is released under this License.  If a\nsection does not fit the above definition of Secondary then it is not\nallowed to be designated as Invariant.  The Document may contain zero\nInvariant Sections.  If the Document does not identify any Invariant\nSections then there are none.\n\nThe \"Cover Texts\" are certain short passages of text that are listed,\nas Front-Cover Texts or Back-Cover Texts, in the notice that says that\nthe Document is released under this License.  A Front-Cover Text may\nbe at most 5 words, and a Back-Cover Text may be at most 25 words.\n\nA \"Transparent\" copy of the Document means a machine-readable copy,\nrepresented in a format whose specification is available to the\ngeneral public, that is suitable for revising the document\nstraightforwardly with generic text editors or (for images composed of\npixels) generic paint programs or (for drawings) some widely available\ndrawing editor, and that is suitable for input to text formatters or\nfor automatic translation to a variety of formats suitable for input\nto text formatters.  A copy made in an otherwise Transparent file\nformat whose markup, or absence of markup, has been arranged to thwart\nor discourage subsequent modification by readers is not Transparent.\nAn image format is not Transparent if used for any substantial amount\nof text.  A copy that is not \"Transparent\" is called \"Opaque\".\n\nExamples of suitable formats for Transparent copies include plain\nASCII without markup, Texinfo input format, LaTeX input format, SGML\nor XML using a publicly available DTD, and standard-conforming simple\nHTML, PostScript or PDF designed for human modification.  Examples of\ntransparent image formats include PNG, XCF and JPG.  Opaque formats\ninclude proprietary formats that can be read and edited only by\nproprietary word processors, SGML or XML for which the DTD and/or\nprocessing tools are not generally available, and the\nmachine-generated HTML, PostScript or PDF produced by some word\nprocessors for output purposes only.\n\nThe \"Title Page\" means, for a printed book, the title page itself,\nplus such following pages as are needed to hold, legibly, the material\nthis License requires to appear in the title page.  For works in\nformats which do not have any title page as such, \"Title Page\" means\nthe text near the most prominent appearance of the work's title,\npreceding the beginning of the body of the text.\n\nA section \"Entitled XYZ\" means a named subunit of the Document whose\ntitle either is precisely XYZ or contains XYZ in parentheses following\ntext that translates XYZ in another language.  (Here XYZ stands for a\nspecific section name mentioned below, such as \"Acknowledgements\",\n\"Dedications\", \"Endorsements\", or \"History\".)  To \"Preserve the Title\"\nof such a section when you modify the Document means that it remains a\nsection \"Entitled XYZ\" according to this definition.\n\nThe Document may include Warranty Disclaimers next to the notice which\nstates that this License applies to the Document.  These Warranty\nDisclaimers are considered to be included by reference in this\nLicense, but only as regards disclaiming warranties: any other\nimplication that these Warranty Disclaimers may have is void and has\nno effect on the meaning of this License.\n\n\n2. VERBATIM COPYING\n\nYou may copy and distribute the Document in any medium, either\ncommercially or noncommercially, provided that this License, the\ncopyright notices, and the license notice saying this License applies\nto the Document are reproduced in all copies, and that you add no other\nconditions whatsoever to those of this License.  You may not use\ntechnical measures to obstruct or control the reading or further\ncopying of the copies you make or distribute.  However, you may accept\ncompensation in exchange for copies.  If you distribute a large enough\nnumber of copies you must also follow the conditions in section 3.\n\nYou may also lend copies, under the same conditions stated above, and\nyou may publicly display copies.\n\n\n3. COPYING IN QUANTITY\n\nIf you publish printed copies (or copies in media that commonly have\nprinted covers) of the Document, numbering more than 100, and the\nDocument's license notice requires Cover Texts, you must enclose the\ncopies in covers that carry, clearly and legibly, all these Cover\nTexts: Front-Cover Texts on the front cover, and Back-Cover Texts on\nthe back cover.  Both covers must also clearly and legibly identify\nyou as the publisher of these copies.  The front cover must present\nthe full title with all words of the title equally prominent and\nvisible.  You may add other material on the covers in addition.\nCopying with changes limited to the covers, as long as they preserve\nthe title of the Document and satisfy these conditions, can be treated\nas verbatim copying in other respects.\n\nIf the required texts for either cover are too voluminous to fit\nlegibly, you should put the first ones listed (as many as fit\nreasonably) on the actual cover, and continue the rest onto adjacent\npages.\n\nIf you publish or distribute Opaque copies of the Document numbering\nmore than 100, you must either include a machine-readable Transparent\ncopy along with each Opaque copy, or state in or with each Opaque copy\na computer-network location from which the general network-using\npublic has access to download using public-standard network protocols\na complete Transparent copy of the Document, free of added material.\nIf you use the latter option, you must take reasonably prudent steps,\nwhen you begin distribution of Opaque copies in quantity, to ensure\nthat this Transparent copy will remain thus accessible at the stated\nlocation until at least one year after the last time you distribute an\nOpaque copy (directly or through your agents or retailers) of that\nedition to the public.\n\nIt is requested, but not required, that you contact the authors of the\nDocument well before redistributing any large number of copies, to give\nthem a chance to provide you with an updated version of the Document.\n\n\n4. MODIFICATIONS\n\nYou may copy and distribute a Modified Version of the Document under\nthe conditions of sections 2 and 3 above, provided that you release\nthe Modified Version under precisely this License, with the Modified\nVersion filling the role of the Document, thus licensing distribution\nand modification of the Modified Version to whoever possesses a copy\nof it.  In addition, you must do these things in the Modified Version:\n\nA. Use in the Title Page (and on the covers, if any) a title distinct\n   from that of the Document, and from those of previous versions\n   (which should, if there were any, be listed in the History section\n   of the Document).  You may use the same title as a previous version\n   if the original publisher of that version gives permission.\nB. List on the Title Page, as authors, one or more persons or entities\n   responsible for authorship of the modifications in the Modified\n   Version, together with at least five of the principal authors of the\n   Document (all of its principal authors, if it has fewer than five),\n   unless they release you from this requirement.\nC. State on the Title page the name of the publisher of the\n   Modified Version, as the publisher.\nD. Preserve all the copyright notices of the Document.\nE. Add an appropriate copyright notice for your modifications\n   adjacent to the other copyright notices.\nF. Include, immediately after the copyright notices, a license notice\n   giving the public permission to use the Modified Version under the\n   terms of this License, in the form shown in the Addendum below.\nG. Preserve in that license notice the full lists of Invariant Sections\n   and required Cover Texts given in the Document's license notice.\nH. Include an unaltered copy of this License.\nI. Preserve the section Entitled \"History\", Preserve its Title, and add\n   to it an item stating at least the title, year, new authors, and\n   publisher of the Modified Version as given on the Title Page.  If\n   there is no section Entitled \"History\" in the Document, create one\n   stating the title, year, authors, and publisher of the Document as\n   given on its Title Page, then add an item describing the Modified\n   Version as stated in the previous sentence.\nJ. Preserve the network location, if any, given in the Document for\n   public access to a Transparent copy of the Document, and likewise\n   the network locations given in the Document for previous versions\n   it was based on.  These may be placed in the \"History\" section.\n   You may omit a network location for a work that was published at\n   least four years before the Document itself, or if the original\n   publisher of the version it refers to gives permission.\nK. For any section Entitled \"Acknowledgements\" or \"Dedications\",\n   Preserve the Title of the section, and preserve in the section all\n   the substance and tone of each of the contributor acknowledgements\n   and/or dedications given therein.\nL. Preserve all the Invariant Sections of the Document,\n   unaltered in their text and in their titles.  Section numbers\n   or the equivalent are not considered part of the section titles.\nM. Delete any section Entitled \"Endorsements\".  Such a section\n   may not be included in the Modified Version.\nN. Do not retitle any existing section to be Entitled \"Endorsements\"\n   or to conflict in title with any Invariant Section.\nO. Preserve any Warranty Disclaimers.\n\nIf the Modified Version includes new front-matter sections or\nappendices that qualify as Secondary Sections and contain no material\ncopied from the Document, you may at your option designate some or all\nof these sections as invariant.  To do this, add their titles to the\nlist of Invariant Sections in the Modified Version's license notice.\nThese titles must be distinct from any other section titles.\n\nYou may add a section Entitled \"Endorsements\", provided it contains\nnothing but endorsements of your Modified Version by various\nparties--for example, statements of peer review or that the text has\nbeen approved by an organization as the authoritative definition of a\nstandard.\n\nYou may add a passage of up to five words as a Front-Cover Text, and a\npassage of up to 25 words as a Back-Cover Text, to the end of the list\nof Cover Texts in the Modified Version.  Only one passage of\nFront-Cover Text and one of Back-Cover Text may be added by (or\nthrough arrangements made by) any one entity.  If the Document already\nincludes a cover text for the same cover, previously added by you or\nby arrangement made by the same entity you are acting on behalf of,\nyou may not add another; but you may replace the old one, on explicit\npermission from the previous publisher that added the old one.\n\nThe author(s) and publisher(s) of the Document do not by this License\ngive permission to use their names for publicity for or to assert or\nimply endorsement of any Modified Version.\n\n\n5. COMBINING DOCUMENTS\n\nYou may combine the Document with other documents released under this\nLicense, under the terms defined in section 4 above for modified\nversions, provided that you include in the combination all of the\nInvariant Sections of all of the original documents, unmodified, and\nlist them all as Invariant Sections of your combined work in its\nlicense notice, and that you preserve all their Warranty Disclaimers.\n\nThe combined work need only contain one copy of this License, and\nmultiple identical Invariant Sections may be replaced with a single\ncopy.  If there are multiple Invariant Sections with the same name but\ndifferent contents, make the title of each such section unique by\nadding at the end of it, in parentheses, the name of the original\nauthor or publisher of that section if known, or else a unique number.\nMake the same adjustment to the section titles in the list of\nInvariant Sections in the license notice of the combined work.\n\nIn the combination, you must combine any sections Entitled \"History\"\nin the various original documents, forming one section Entitled\n\"History\"; likewise combine any sections Entitled \"Acknowledgements\",\nand any sections Entitled \"Dedications\".  You must delete all sections\nEntitled \"Endorsements\".\n\n\n6. COLLECTIONS OF DOCUMENTS\n\nYou may make a collection consisting of the Document and other documents\nreleased under this License, and replace the individual copies of this\nLicense in the various documents with a single copy that is included in\nthe collection, provided that you follow the rules of this License for\nverbatim copying of each of the documents in all other respects.\n\nYou may extract a single document from such a collection, and distribute\nit individually under this License, provided you insert a copy of this\nLicense into the extracted document, and follow this License in all\nother respects regarding verbatim copying of that document.\n\n\n7. AGGREGATION WITH INDEPENDENT WORKS\n\nA compilation of the Document or its derivatives with other separate\nand independent documents or works, in or on a volume of a storage or\ndistribution medium, is called an \"aggregate\" if the copyright\nresulting from the compilation is not used to limit the legal rights\nof the compilation's users beyond what the individual works permit.\nWhen the Document is included in an aggregate, this License does not\napply to the other works in the aggregate which are not themselves\nderivative works of the Document.\n\nIf the Cover Text requirement of section 3 is applicable to these\ncopies of the Document, then if the Document is less than one half of\nthe entire aggregate, the Document's Cover Texts may be placed on\ncovers that bracket the Document within the aggregate, or the\nelectronic equivalent of covers if the Document is in electronic form.\nOtherwise they must appear on printed covers that bracket the whole\naggregate.\n\n\n8. TRANSLATION\n\nTranslation is considered a kind of modification, so you may\ndistribute translations of the Document under the terms of section 4.\nReplacing Invariant Sections with translations requires special\npermission from their copyright holders, but you may include\ntranslations of some or all Invariant Sections in addition to the\noriginal versions of these Invariant Sections.  You may include a\ntranslation of this License, and all the license notices in the\nDocument, and any Warranty Disclaimers, provided that you also include\nthe original English version of this License and the original versions\nof those notices and disclaimers.  In case of a disagreement between\nthe translation and the original version of this License or a notice\nor disclaimer, the original version will prevail.\n\nIf a section in the Document is Entitled \"Acknowledgements\",\n\"Dedications\", or \"History\", the requirement (section 4) to Preserve\nits Title (section 1) will typically require changing the actual\ntitle.\n\n\n9. TERMINATION\n\nYou may not copy, modify, sublicense, or distribute the Document except\nas expressly provided for under this License.  Any other attempt to\ncopy, modify, sublicense or distribute the Document is void, and will\nautomatically terminate your rights under this License.  However,\nparties who have received copies, or rights, from you under this\nLicense will not have their licenses terminated so long as such\nparties remain in full compliance.\n\n\n10. FUTURE REVISIONS OF THIS LICENSE\n\nThe Free Software Foundation may publish new, revised versions\nof the GNU Free Documentation License from time to time.  Such new\nversions will be similar in spirit to the present version, but may\ndiffer in detail to address new problems or concerns.  See\nhttp://www.gnu.org/copyleft/.\n\nEach version of the License is given a distinguishing version number.\nIf the Document specifies that a particular numbered version of this\nLicense \"or any later version\" applies to it, you have the option of\nfollowing the terms and conditions either of that specified version or\nof any later version that has been published (not as a draft) by the\nFree Software Foundation.  If the Document does not specify a version\nnumber of this License, you may choose any version ever published (not\nas a draft) by the Free Software Foundation.\n\n\nADDENDUM: How to use this License for your documents\n\nTo use this License in a document you have written, include a copy of\nthe License in the document and put the following copyright and\nlicense notices just after the title page:\n\n    Copyright (c)  YEAR  YOUR NAME.\n    Permission is granted to copy, distribute and/or modify this document\n    under the terms of the GNU Free Documentation License, Version 1.2\n    or any later version published by the Free Software Foundation;\n    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.\n    A copy of the license is included in the section entitled \"GNU\n    Free Documentation License\".\n\nIf you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,\nreplace the \"with...Texts.\" line with this:\n\n    with the Invariant Sections being LIST THEIR TITLES, with the\n    Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.\n\nIf you have Invariant Sections without Cover Texts, or some other\ncombination of the three, merge those two alternatives to suit the\nsituation.\n\nIf your document contains nontrivial examples of program code, we\nrecommend releasing these examples in parallel under your choice of\nfree software license, such as the GNU General Public License,\nto permit their use in free software.\n"
  },
  {
    "path": "licenses/FDL1_3.txt",
    "content": "\n                GNU Free Documentation License\n                 Version 1.3, 3 November 2008\n\n\n Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.\n     <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n0. PREAMBLE\n\nThe purpose of this License is to make a manual, textbook, or other\nfunctional and useful document \"free\" in the sense of freedom: to\nassure everyone the effective freedom to copy and redistribute it,\nwith or without modifying it, either commercially or noncommercially.\nSecondarily, this License preserves for the author and publisher a way\nto get credit for their work, while not being considered responsible\nfor modifications made by others.\n\nThis License is a kind of \"copyleft\", which means that derivative\nworks of the document must themselves be free in the same sense.  It\ncomplements the GNU General Public License, which is a copyleft\nlicense designed for free software.\n\nWe have designed this License in order to use it for manuals for free\nsoftware, because free software needs free documentation: a free\nprogram should come with manuals providing the same freedoms that the\nsoftware does.  But this License is not limited to software manuals;\nit can be used for any textual work, regardless of subject matter or\nwhether it is published as a printed book.  We recommend this License\nprincipally for works whose purpose is instruction or reference.\n\n\n1. APPLICABILITY AND DEFINITIONS\n\nThis License applies to any manual or other work, in any medium, that\ncontains a notice placed by the copyright holder saying it can be\ndistributed under the terms of this License.  Such a notice grants a\nworld-wide, royalty-free license, unlimited in duration, to use that\nwork under the conditions stated herein.  The \"Document\", below,\nrefers to any such manual or work.  Any member of the public is a\nlicensee, and is addressed as \"you\".  You accept the license if you\ncopy, modify or distribute the work in a way requiring permission\nunder copyright law.\n\nA \"Modified Version\" of the Document means any work containing the\nDocument or a portion of it, either copied verbatim, or with\nmodifications and/or translated into another language.\n\nA \"Secondary Section\" is a named appendix or a front-matter section of\nthe Document that deals exclusively with the relationship of the\npublishers or authors of the Document to the Document's overall\nsubject (or to related matters) and contains nothing that could fall\ndirectly within that overall subject.  (Thus, if the Document is in\npart a textbook of mathematics, a Secondary Section may not explain\nany mathematics.)  The relationship could be a matter of historical\nconnection with the subject or with related matters, or of legal,\ncommercial, philosophical, ethical or political position regarding\nthem.\n\nThe \"Invariant Sections\" are certain Secondary Sections whose titles\nare designated, as being those of Invariant Sections, in the notice\nthat says that the Document is released under this License.  If a\nsection does not fit the above definition of Secondary then it is not\nallowed to be designated as Invariant.  The Document may contain zero\nInvariant Sections.  If the Document does not identify any Invariant\nSections then there are none.\n\nThe \"Cover Texts\" are certain short passages of text that are listed,\nas Front-Cover Texts or Back-Cover Texts, in the notice that says that\nthe Document is released under this License.  A Front-Cover Text may\nbe at most 5 words, and a Back-Cover Text may be at most 25 words.\n\nA \"Transparent\" copy of the Document means a machine-readable copy,\nrepresented in a format whose specification is available to the\ngeneral public, that is suitable for revising the document\nstraightforwardly with generic text editors or (for images composed of\npixels) generic paint programs or (for drawings) some widely available\ndrawing editor, and that is suitable for input to text formatters or\nfor automatic translation to a variety of formats suitable for input\nto text formatters.  A copy made in an otherwise Transparent file\nformat whose markup, or absence of markup, has been arranged to thwart\nor discourage subsequent modification by readers is not Transparent.\nAn image format is not Transparent if used for any substantial amount\nof text.  A copy that is not \"Transparent\" is called \"Opaque\".\n\nExamples of suitable formats for Transparent copies include plain\nASCII without markup, Texinfo input format, LaTeX input format, SGML\nor XML using a publicly available DTD, and standard-conforming simple\nHTML, PostScript or PDF designed for human modification.  Examples of\ntransparent image formats include PNG, XCF and JPG.  Opaque formats\ninclude proprietary formats that can be read and edited only by\nproprietary word processors, SGML or XML for which the DTD and/or\nprocessing tools are not generally available, and the\nmachine-generated HTML, PostScript or PDF produced by some word\nprocessors for output purposes only.\n\nThe \"Title Page\" means, for a printed book, the title page itself,\nplus such following pages as are needed to hold, legibly, the material\nthis License requires to appear in the title page.  For works in\nformats which do not have any title page as such, \"Title Page\" means\nthe text near the most prominent appearance of the work's title,\npreceding the beginning of the body of the text.\n\nThe \"publisher\" means any person or entity that distributes copies of\nthe Document to the public.\n\nA section \"Entitled XYZ\" means a named subunit of the Document whose\ntitle either is precisely XYZ or contains XYZ in parentheses following\ntext that translates XYZ in another language.  (Here XYZ stands for a\nspecific section name mentioned below, such as \"Acknowledgements\",\n\"Dedications\", \"Endorsements\", or \"History\".)  To \"Preserve the Title\"\nof such a section when you modify the Document means that it remains a\nsection \"Entitled XYZ\" according to this definition.\n\nThe Document may include Warranty Disclaimers next to the notice which\nstates that this License applies to the Document.  These Warranty\nDisclaimers are considered to be included by reference in this\nLicense, but only as regards disclaiming warranties: any other\nimplication that these Warranty Disclaimers may have is void and has\nno effect on the meaning of this License.\n\n2. VERBATIM COPYING\n\nYou may copy and distribute the Document in any medium, either\ncommercially or noncommercially, provided that this License, the\ncopyright notices, and the license notice saying this License applies\nto the Document are reproduced in all copies, and that you add no\nother conditions whatsoever to those of this License.  You may not use\ntechnical measures to obstruct or control the reading or further\ncopying of the copies you make or distribute.  However, you may accept\ncompensation in exchange for copies.  If you distribute a large enough\nnumber of copies you must also follow the conditions in section 3.\n\nYou may also lend copies, under the same conditions stated above, and\nyou may publicly display copies.\n\n\n3. COPYING IN QUANTITY\n\nIf you publish printed copies (or copies in media that commonly have\nprinted covers) of the Document, numbering more than 100, and the\nDocument's license notice requires Cover Texts, you must enclose the\ncopies in covers that carry, clearly and legibly, all these Cover\nTexts: Front-Cover Texts on the front cover, and Back-Cover Texts on\nthe back cover.  Both covers must also clearly and legibly identify\nyou as the publisher of these copies.  The front cover must present\nthe full title with all words of the title equally prominent and\nvisible.  You may add other material on the covers in addition.\nCopying with changes limited to the covers, as long as they preserve\nthe title of the Document and satisfy these conditions, can be treated\nas verbatim copying in other respects.\n\nIf the required texts for either cover are too voluminous to fit\nlegibly, you should put the first ones listed (as many as fit\nreasonably) on the actual cover, and continue the rest onto adjacent\npages.\n\nIf you publish or distribute Opaque copies of the Document numbering\nmore than 100, you must either include a machine-readable Transparent\ncopy along with each Opaque copy, or state in or with each Opaque copy\na computer-network location from which the general network-using\npublic has access to download using public-standard network protocols\na complete Transparent copy of the Document, free of added material.\nIf you use the latter option, you must take reasonably prudent steps,\nwhen you begin distribution of Opaque copies in quantity, to ensure\nthat this Transparent copy will remain thus accessible at the stated\nlocation until at least one year after the last time you distribute an\nOpaque copy (directly or through your agents or retailers) of that\nedition to the public.\n\nIt is requested, but not required, that you contact the authors of the\nDocument well before redistributing any large number of copies, to\ngive them a chance to provide you with an updated version of the\nDocument.\n\n\n4. MODIFICATIONS\n\nYou may copy and distribute a Modified Version of the Document under\nthe conditions of sections 2 and 3 above, provided that you release\nthe Modified Version under precisely this License, with the Modified\nVersion filling the role of the Document, thus licensing distribution\nand modification of the Modified Version to whoever possesses a copy\nof it.  In addition, you must do these things in the Modified Version:\n\nA. Use in the Title Page (and on the covers, if any) a title distinct\n   from that of the Document, and from those of previous versions\n   (which should, if there were any, be listed in the History section\n   of the Document).  You may use the same title as a previous version\n   if the original publisher of that version gives permission.\nB. List on the Title Page, as authors, one or more persons or entities\n   responsible for authorship of the modifications in the Modified\n   Version, together with at least five of the principal authors of the\n   Document (all of its principal authors, if it has fewer than five),\n   unless they release you from this requirement.\nC. State on the Title page the name of the publisher of the\n   Modified Version, as the publisher.\nD. Preserve all the copyright notices of the Document.\nE. Add an appropriate copyright notice for your modifications\n   adjacent to the other copyright notices.\nF. Include, immediately after the copyright notices, a license notice\n   giving the public permission to use the Modified Version under the\n   terms of this License, in the form shown in the Addendum below.\nG. Preserve in that license notice the full lists of Invariant Sections\n   and required Cover Texts given in the Document's license notice.\nH. Include an unaltered copy of this License.\nI. Preserve the section Entitled \"History\", Preserve its Title, and add\n   to it an item stating at least the title, year, new authors, and\n   publisher of the Modified Version as given on the Title Page.  If\n   there is no section Entitled \"History\" in the Document, create one\n   stating the title, year, authors, and publisher of the Document as\n   given on its Title Page, then add an item describing the Modified\n   Version as stated in the previous sentence.\nJ. Preserve the network location, if any, given in the Document for\n   public access to a Transparent copy of the Document, and likewise\n   the network locations given in the Document for previous versions\n   it was based on.  These may be placed in the \"History\" section.\n   You may omit a network location for a work that was published at\n   least four years before the Document itself, or if the original\n   publisher of the version it refers to gives permission.\nK. For any section Entitled \"Acknowledgements\" or \"Dedications\",\n   Preserve the Title of the section, and preserve in the section all\n   the substance and tone of each of the contributor acknowledgements\n   and/or dedications given therein.\nL. Preserve all the Invariant Sections of the Document,\n   unaltered in their text and in their titles.  Section numbers\n   or the equivalent are not considered part of the section titles.\nM. Delete any section Entitled \"Endorsements\".  Such a section\n   may not be included in the Modified Version.\nN. Do not retitle any existing section to be Entitled \"Endorsements\"\n   or to conflict in title with any Invariant Section.\nO. Preserve any Warranty Disclaimers.\n\nIf the Modified Version includes new front-matter sections or\nappendices that qualify as Secondary Sections and contain no material\ncopied from the Document, you may at your option designate some or all\nof these sections as invariant.  To do this, add their titles to the\nlist of Invariant Sections in the Modified Version's license notice.\nThese titles must be distinct from any other section titles.\n\nYou may add a section Entitled \"Endorsements\", provided it contains\nnothing but endorsements of your Modified Version by various\nparties--for example, statements of peer review or that the text has\nbeen approved by an organization as the authoritative definition of a\nstandard.\n\nYou may add a passage of up to five words as a Front-Cover Text, and a\npassage of up to 25 words as a Back-Cover Text, to the end of the list\nof Cover Texts in the Modified Version.  Only one passage of\nFront-Cover Text and one of Back-Cover Text may be added by (or\nthrough arrangements made by) any one entity.  If the Document already\nincludes a cover text for the same cover, previously added by you or\nby arrangement made by the same entity you are acting on behalf of,\nyou may not add another; but you may replace the old one, on explicit\npermission from the previous publisher that added the old one.\n\nThe author(s) and publisher(s) of the Document do not by this License\ngive permission to use their names for publicity for or to assert or\nimply endorsement of any Modified Version.\n\n\n5. COMBINING DOCUMENTS\n\nYou may combine the Document with other documents released under this\nLicense, under the terms defined in section 4 above for modified\nversions, provided that you include in the combination all of the\nInvariant Sections of all of the original documents, unmodified, and\nlist them all as Invariant Sections of your combined work in its\nlicense notice, and that you preserve all their Warranty Disclaimers.\n\nThe combined work need only contain one copy of this License, and\nmultiple identical Invariant Sections may be replaced with a single\ncopy.  If there are multiple Invariant Sections with the same name but\ndifferent contents, make the title of each such section unique by\nadding at the end of it, in parentheses, the name of the original\nauthor or publisher of that section if known, or else a unique number.\nMake the same adjustment to the section titles in the list of\nInvariant Sections in the license notice of the combined work.\n\nIn the combination, you must combine any sections Entitled \"History\"\nin the various original documents, forming one section Entitled\n\"History\"; likewise combine any sections Entitled \"Acknowledgements\",\nand any sections Entitled \"Dedications\".  You must delete all sections\nEntitled \"Endorsements\".\n\n\n6. COLLECTIONS OF DOCUMENTS\n\nYou may make a collection consisting of the Document and other\ndocuments released under this License, and replace the individual\ncopies of this License in the various documents with a single copy\nthat is included in the collection, provided that you follow the rules\nof this License for verbatim copying of each of the documents in all\nother respects.\n\nYou may extract a single document from such a collection, and\ndistribute it individually under this License, provided you insert a\ncopy of this License into the extracted document, and follow this\nLicense in all other respects regarding verbatim copying of that\ndocument.\n\n\n7. AGGREGATION WITH INDEPENDENT WORKS\n\nA compilation of the Document or its derivatives with other separate\nand independent documents or works, in or on a volume of a storage or\ndistribution medium, is called an \"aggregate\" if the copyright\nresulting from the compilation is not used to limit the legal rights\nof the compilation's users beyond what the individual works permit.\nWhen the Document is included in an aggregate, this License does not\napply to the other works in the aggregate which are not themselves\nderivative works of the Document.\n\nIf the Cover Text requirement of section 3 is applicable to these\ncopies of the Document, then if the Document is less than one half of\nthe entire aggregate, the Document's Cover Texts may be placed on\ncovers that bracket the Document within the aggregate, or the\nelectronic equivalent of covers if the Document is in electronic form.\nOtherwise they must appear on printed covers that bracket the whole\naggregate.\n\n\n8. TRANSLATION\n\nTranslation is considered a kind of modification, so you may\ndistribute translations of the Document under the terms of section 4.\nReplacing Invariant Sections with translations requires special\npermission from their copyright holders, but you may include\ntranslations of some or all Invariant Sections in addition to the\noriginal versions of these Invariant Sections.  You may include a\ntranslation of this License, and all the license notices in the\nDocument, and any Warranty Disclaimers, provided that you also include\nthe original English version of this License and the original versions\nof those notices and disclaimers.  In case of a disagreement between\nthe translation and the original version of this License or a notice\nor disclaimer, the original version will prevail.\n\nIf a section in the Document is Entitled \"Acknowledgements\",\n\"Dedications\", or \"History\", the requirement (section 4) to Preserve\nits Title (section 1) will typically require changing the actual\ntitle.\n\n\n9. TERMINATION\n\nYou may not copy, modify, sublicense, or distribute the Document\nexcept as expressly provided under this License.  Any attempt\notherwise to copy, modify, sublicense, or distribute it is void, and\nwill automatically terminate your rights under this License.\n\nHowever, if you cease all violation of this License, then your license\nfrom a particular copyright holder is reinstated (a) provisionally,\nunless and until the copyright holder explicitly and finally\nterminates your license, and (b) permanently, if the copyright holder\nfails to notify you of the violation by some reasonable means prior to\n60 days after the cessation.\n\nMoreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\nTermination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, receipt of a copy of some or all of the same material does\nnot give you any rights to use it.\n\n\n10. FUTURE REVISIONS OF THIS LICENSE\n\nThe Free Software Foundation may publish new, revised versions of the\nGNU Free Documentation License from time to time.  Such new versions\nwill be similar in spirit to the present version, but may differ in\ndetail to address new problems or concerns.  See\nhttp://www.gnu.org/copyleft/.\n\nEach version of the License is given a distinguishing version number.\nIf the Document specifies that a particular numbered version of this\nLicense \"or any later version\" applies to it, you have the option of\nfollowing the terms and conditions either of that specified version or\nof any later version that has been published (not as a draft) by the\nFree Software Foundation.  If the Document does not specify a version\nnumber of this License, you may choose any version ever published (not\nas a draft) by the Free Software Foundation.  If the Document\nspecifies that a proxy can decide which future versions of this\nLicense can be used, that proxy's public statement of acceptance of a\nversion permanently authorizes you to choose that version for the\nDocument.\n\n11. RELICENSING\n\n\"Massive Multiauthor Collaboration Site\" (or \"MMC Site\") means any\nWorld Wide Web server that publishes copyrightable works and also\nprovides prominent facilities for anybody to edit those works.  A\npublic wiki that anybody can edit is an example of such a server.  A\n\"Massive Multiauthor Collaboration\" (or \"MMC\") contained in the site\nmeans any set of copyrightable works thus published on the MMC site.\n\n\"CC-BY-SA\" means the Creative Commons Attribution-Share Alike 3.0 \nlicense published by Creative Commons Corporation, a not-for-profit \ncorporation with a principal place of business in San Francisco, \nCalifornia, as well as future copyleft versions of that license \npublished by that same organization.\n\n\"Incorporate\" means to publish or republish a Document, in whole or in \npart, as part of another Document.\n\nAn MMC is \"eligible for relicensing\" if it is licensed under this \nLicense, and if all works that were first published under this License \nsomewhere other than this MMC, and subsequently incorporated in whole or \nin part into the MMC, (1) had no cover texts or invariant sections, and \n(2) were thus incorporated prior to November 1, 2008.\n\nThe operator of an MMC Site may republish an MMC contained in the site\nunder CC-BY-SA on the same site at any time before August 1, 2009,\nprovided the MMC is eligible for relicensing.\n\n\nADDENDUM: How to use this License for your documents\n\nTo use this License in a document you have written, include a copy of\nthe License in the document and put the following copyright and\nlicense notices just after the title page:\n\n    Copyright (c)  YEAR  YOUR NAME.\n    Permission is granted to copy, distribute and/or modify this document\n    under the terms of the GNU Free Documentation License, Version 1.3\n    or any later version published by the Free Software Foundation;\n    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.\n    A copy of the license is included in the section entitled \"GNU\n    Free Documentation License\".\n\nIf you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,\nreplace the \"with...Texts.\" line with this:\n\n    with the Invariant Sections being LIST THEIR TITLES, with the\n    Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.\n\nIf you have Invariant Sections without Cover Texts, or some other\ncombination of the three, merge those two alternatives to suit the\nsituation.\n\nIf your document contains nontrivial examples of program code, we\nrecommend releasing these examples in parallel under your choice of\nfree software license, such as the GNU General Public License,\nto permit their use in free software.\n"
  },
  {
    "path": "licenses/FLIRC.txt",
    "content": "/*\n * Copyright 2023 Flirc Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n *    1. Redistributions of source code must retain the above copyright\n *       notice, this list of conditions and the following disclaimer.\n *\n *    2. Redistributions in binary form must reproduce the above\n *       copyright notice, this list of conditions and the following\n *       disclaimer in the documentation and/or other materials\n *       provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY FLIRC INC. \\`\\`AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ${AUTHOR_UPPER} OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE\n * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\n * DAMAGE.\n *\n * The views and conclusions contained in the software and documentation\n * are those of the authors and should not be interpreted as representing\n * official policies, either expressed or implied, of Flirc Inc.\n */\n"
  },
  {
    "path": "licenses/GPL-1.0-only.txt",
    "content": "GNU GENERAL PUBLIC LICENSE\nVersion 1, February 1989\n\nCopyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor,\nBoston, MA 02110-1301 USA\n\nEveryone is permitted to copy and distribute verbatim copies of this license\ndocument, but changing it is not allowed.\n\nPreamble\n\nThe license agreements of most software companies try to keep users at the\nmercy of those companies. By contrast, our General Public License is intended\nto guarantee your freedom to share and change free software--to make sure\nthe software is free for all its users. The General Public License applies\nto the Free Software Foundation's software and to any other program whose\nauthors commit to using it. You can use it for your programs, too.\n\nWhen we speak of free software, we are referring to freedom, not price. Specifically,\nthe General Public License is designed to make sure that you have the freedom\nto give away or sell copies of free software, that you receive source code\nor can get it if you want it, that you can change the software or use pieces\nof it in new free programs; and that you know you can do these things.\n\nTo protect your rights, we need to make restrictions that forbid anyone to\ndeny you these rights or to ask you to surrender the rights. These restrictions\ntranslate to certain responsibilities for you if you distribute copies of\nthe software, or if you modify it.\n\nFor example, if you distribute copies of a such a program, whether gratis\nor for a fee, you must give the recipients all the rights that you have. You\nmust make sure that they, too, receive or can get the source code. And you\nmust tell them their rights.\n\nWe protect your rights with two steps: (1) copyright the software, and (2)\noffer you this license which gives you legal permission to copy, distribute\nand/or modify the software.\n\nAlso, for each author's protection and ours, we want to make certain that\neveryone understands that there is no warranty for this free software. If\nthe software is modified by someone else and passed on, we want its recipients\nto know that what they have is not the original, so that any problems introduced\nby others will not reflect on the original authors' reputations.\n\nThe precise terms and conditions for copying, distribution and modification\nfollow.\n\nGNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION\nAND MODIFICATION\n\n0. This License Agreement applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed under\nthe terms of this General Public License. The \"Program\", below, refers to\nany such program or work, and a \"work based on the Program\" means either the\nProgram or any work containing the Program or a portion of it, either verbatim\nor with modifications. Each licensee is addressed as \"you\".\n\n1. You may copy and distribute verbatim copies of the Program's source code\nas you receive it, in any medium, provided that you conspicuously and appropriately\npublish on each copy an appropriate copyright notice and disclaimer of warranty;\nkeep intact all the notices that refer to this General Public License and\nto the absence of any warranty; and give any other recipients of the Program\na copy of this General Public License along with the Program. You may charge\na fee for the physical act of transferring a copy.\n\n2. You may modify your copy or copies of the Program or any portion of it,\nand copy and distribute such modifications under the terms of Paragraph 1\nabove, provided that you also do the following:\n\na) cause the modified files to carry prominent notices stating that you changed\nthe files and the date of any change; and\n\nb) cause the whole of any work that you distribute or publish, that in whole\nor in part contains the Program or any part thereof, either with or without\nmodifications, to be licensed at no charge to all third parties under the\nterms of this General Public License (except that you may choose to grant\nwarranty protection to some or all third parties, at your option).\n\nc) If the modified program normally reads commands interactively when run,\nyou must cause it, when started running for such interactive use in the simplest\nand most usual way, to print or display an announcement including an appropriate\ncopyright notice and a notice that there is no warranty (or else, saying that\nyou provide a warranty) and that users may redistribute the program under\nthese conditions, and telling the user how to view a copy of this General\nPublic License.\n\nd) You may charge a fee for the physical act of transferring a copy, and you\nmay at your option offer warranty protection in exchange for a fee.\n\nMere aggregation of another independent work with the Program (or its derivative)\non a volume of a storage or distribution medium does not bring the other work\nunder the scope of these terms.\n\n3. You may copy and distribute the Program (or a portion or derivative of\nit, under Paragraph 2) in object code or executable form under the terms of\nParagraphs 1 and 2 above provided that you also do one of the following:\n\na) accompany it with the complete corresponding machine-readable source code,\nwhich must be distributed under the terms of Paragraphs 1 and 2 above; or,\n\nb) accompany it with a written offer, valid for at least three years, to give\nany third party free (except for a nominal charge for the cost of distribution)\na complete machine-readable copy of the corresponding source code, to be distributed\nunder the terms of Paragraphs 1 and 2 above; or,\n\nc) accompany it with the information you received as to where the corresponding\nsource code may be obtained. (This alternative is allowed only for noncommercial\ndistribution and only if you received the program in object code or executable\nform alone.)\n\nSource code for a work means the preferred form of the work for making modifications\nto it. For an executable file, complete source code means all the source code\nfor all modules it contains; but, as a special exception, it need not include\nsource code for modules which are standard libraries that accompany the operating\nsystem on which the executable file runs, or for standard header files or\ndefinitions files that accompany that operating system.\n\n4. You may not copy, modify, sublicense, distribute or transfer the Program\nexcept as expressly provided under this General Public License. Any attempt\notherwise to copy, modify, sublicense, distribute or transfer the Program\nis void, and will automatically terminate your rights to use the Program under\nthis License. However, parties who have received copies, or rights to use\ncopies, from you under this General Public License will not have their licenses\nterminated so long as such parties remain in full compliance.\n\n5. By copying, distributing or modifying the Program (or any work based on\nthe Program) you indicate your acceptance of this license to do so, and all\nits terms and conditions.\n\n6. Each time you redistribute the Program (or any work based on the Program),\nthe recipient automatically receives a license from the original licensor\nto copy, distribute or modify the Program subject to these terms and conditions.\nYou may not impose any further restrictions on the recipients' exercise of\nthe rights granted herein.\n\n7. The Free Software Foundation may publish revised and/or new versions of\nthe General Public License from time to time. Such new versions will be similar\nin spirit to the present version, but may differ in detail to address new\nproblems or concerns.\n\nEach version is given a distinguishing version number. If the Program specifies\na version number of the license which applies to it and \"any later version\",\nyou have the option of following the terms and conditions either of that version\nor of any later version published by the Free Software Foundation. If the\nProgram does not specify a version number of the license, you may choose any\nversion ever published by the Free Software Foundation.\n\n8. If you wish to incorporate parts of the Program into other free programs\nwhose distribution conditions are different, write to the author to ask for\npermission. For software which is copyrighted by the Free Software Foundation,\nwrite to the Free Software Foundation; we sometimes make exceptions for this.\nOur decision will be guided by the two goals of preserving the free status\nof all derivatives of our free software and of promoting the sharing and reuse\nof software generally.\n\nNO WARRANTY\n\n9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR\nTHE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE\nSTATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM\n\"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,\nBUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\nFOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE\nOF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE\nOR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA\nOR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES\nOR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH\nHOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\nEND OF TERMS AND CONDITIONS\n\nAppendix: How to Apply These Terms to Your New Programs\n\nIf you develop a new program, and you want it to be of the greatest possible\nuse to humanity, the best way to achieve this is to make it free software\nwhich everyone can redistribute and change under these terms.\n\nTo do so, attach the following notices to the program. It is safest to attach\nthem to the start of each source file to most effectively convey the exclusion\nof warranty; and each file should have at least the \"copyright\" line and a\npointer to where the full notice is found.\n\n<one line to give the program's name and a brief idea of what it does.> Copyright\n(C) 19yy <name of author>\n\nThis program is free software; you can redistribute it and/or modify it under\nthe terms of the GNU General Public License as published by the Free Software\nFoundation; either version 1, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\nFOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with\nthis program; if not, write to the Free Software Foundation, Inc., 675 Mass\nAve, Cambridge, MA 02139, USA.\n\nAlso add information on how to contact you by electronic and paper mail.\n\nIf the program is interactive, make it output a short notice like this when\nit starts in an interactive mode:\n\nGnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes\nwith ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software,\nand you are welcome to redistribute it under certain conditions; type `show\nc' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, the commands you use may be\ncalled something other than `show w' and `show c'; they could even be mouse-clicks\nor menu items--whatever suits your program.\n\nYou should also get your employer (if you work as a programmer) or your school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary. Here\na sample; alter the names:\n\nYoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision'\n(a program to direct compilers to make passes at assemblers) written by James\nHacker.\n\n     <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice\n\nThat's all there is to it!\n"
  },
  {
    "path": "licenses/GPL-2.0-only.txt",
    "content": "GNU GENERAL PUBLIC LICENSE\nVersion 2, June 1991\n\nCopyright (C) 1989, 1991 Free Software Foundation, Inc.\n51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\n\nEveryone is permitted to copy and distribute verbatim copies of this license\ndocument, but changing it is not allowed.\n\nPreamble\n\nThe licenses for most software are designed to take away your freedom to share\nand change it. By contrast, the GNU General Public License is intended to\nguarantee your freedom to share and change free software--to make sure the\nsoftware is free for all its users. This General Public License applies to\nmost of the Free Software Foundation's software and to any other program whose\nauthors commit to using it. (Some other Free Software Foundation software\nis covered by the GNU Lesser General Public License instead.) You can apply\nit to your programs, too.\n\nWhen we speak of free software, we are referring to freedom, not price. Our\nGeneral Public Licenses are designed to make sure that you have the freedom\nto distribute copies of free software (and charge for this service if you\nwish), that you receive source code or can get it if you want it, that you\ncan change the software or use pieces of it in new free programs; and that\nyou know you can do these things.\n\nTo protect your rights, we need to make restrictions that forbid anyone to\ndeny you these rights or to ask you to surrender the rights. These restrictions\ntranslate to certain responsibilities for you if you distribute copies of\nthe software, or if you modify it.\n\nFor example, if you distribute copies of such a program, whether gratis or\nfor a fee, you must give the recipients all the rights that you have. You\nmust make sure that they, too, receive or can get the source code. And you\nmust show them these terms so they know their rights.\n\nWe protect your rights with two steps: (1) copyright the software, and (2)\noffer you this license which gives you legal permission to copy, distribute\nand/or modify the software.\n\nAlso, for each author's protection and ours, we want to make certain that\neveryone understands that there is no warranty for this free software. If\nthe software is modified by someone else and passed on, we want its recipients\nto know that what they have is not the original, so that any problems introduced\nby others will not reflect on the original authors' reputations.\n\nFinally, any free program is threatened constantly by software patents. We\nwish to avoid the danger that redistributors of a free program will individually\nobtain patent licenses, in effect making the program proprietary. To prevent\nthis, we have made it clear that any patent must be licensed for everyone's\nfree use or not licensed at all.\n\nThe precise terms and conditions for copying, distribution and modification\nfollow.\n\nTERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n0. This License applies to any program or other work which contains a notice\nplaced by the copyright holder saying it may be distributed under the terms\nof this General Public License. The \"Program\", below, refers to any such program\nor work, and a \"work based on the Program\" means either the Program or any\nderivative work under copyright law: that is to say, a work containing the\nProgram or a portion of it, either verbatim or with modifications and/or translated\ninto another language. (Hereinafter, translation is included without limitation\nin the term \"modification\".) Each licensee is addressed as \"you\".\n\nActivities other than copying, distribution and modification are not covered\nby this License; they are outside its scope. The act of running the Program\nis not restricted, and the output from the Program is covered only if its\ncontents constitute a work based on the Program (independent of having been\nmade by running the Program). Whether that is true depends on what the Program\ndoes.\n\n1. You may copy and distribute verbatim copies of the Program's source code\nas you receive it, in any medium, provided that you conspicuously and appropriately\npublish on each copy an appropriate copyright notice and disclaimer of warranty;\nkeep intact all the notices that refer to this License and to the absence\nof any warranty; and give any other recipients of the Program a copy of this\nLicense along with the Program.\n\nYou may charge a fee for the physical act of transferring a copy, and you\nmay at your option offer warranty protection in exchange for a fee.\n\n2. You may modify your copy or copies of the Program or any portion of it,\nthus forming a work based on the Program, and copy and distribute such modifications\nor work under the terms of Section 1 above, provided that you also meet all\nof these conditions:\n\na) You must cause the modified files to carry prominent notices stating that\nyou changed the files and the date of any change.\n\nb) You must cause any work that you distribute or publish, that in whole or\nin part contains or is derived from the Program or any part thereof, to be\nlicensed as a whole at no charge to all third parties under the terms of this\nLicense.\n\nc) If the modified program normally reads commands interactively when run,\nyou must cause it, when started running for such interactive use in the most\nordinary way, to print or display an announcement including an appropriate\ncopyright notice and a notice that there is no warranty (or else, saying that\nyou provide a warranty) and that users may redistribute the program under\nthese conditions, and telling the user how to view a copy of this License.\n(Exception: if the Program itself is interactive but does not normally print\nsuch an announcement, your work based on the Program is not required to print\nan announcement.)\n\nThese requirements apply to the modified work as a whole. If identifiable\nsections of that work are not derived from the Program, and can be reasonably\nconsidered independent and separate works in themselves, then this License,\nand its terms, do not apply to those sections when you distribute them as\nseparate works. But when you distribute the same sections as part of a whole\nwhich is a work based on the Program, the distribution of the whole must be\non the terms of this License, whose permissions for other licensees extend\nto the entire whole, and thus to each and every part regardless of who wrote\nit.\n\nThus, it is not the intent of this section to claim rights or contest your\nrights to work written entirely by you; rather, the intent is to exercise\nthe right to control the distribution of derivative or collective works based\non the Program.\n\nIn addition, mere aggregation of another work not based on the Program with\nthe Program (or with a work based on the Program) on a volume of a storage\nor distribution medium does not bring the other work under the scope of this\nLicense.\n\n3. You may copy and distribute the Program (or a work based on it, under Section\n2) in object code or executable form under the terms of Sections 1 and 2 above\nprovided that you also do one of the following:\n\na) Accompany it with the complete corresponding machine-readable source code,\nwhich must be distributed under the terms of Sections 1 and 2 above on a medium\ncustomarily used for software interchange; or,\n\nb) Accompany it with a written offer, valid for at least three years, to give\nany third party, for a charge no more than your cost of physically performing\nsource distribution, a complete machine-readable copy of the corresponding\nsource code, to be distributed under the terms of Sections 1 and 2 above on\na medium customarily used for software interchange; or,\n\nc) Accompany it with the information you received as to the offer to distribute\ncorresponding source code. (This alternative is allowed only for noncommercial\ndistribution and only if you received the program in object code or executable\nform with such an offer, in accord with Subsection b above.)\n\nThe source code for a work means the preferred form of the work for making\nmodifications to it. For an executable work, complete source code means all\nthe source code for all modules it contains, plus any associated interface\ndefinition files, plus the scripts used to control compilation and installation\nof the executable. However, as a special exception, the source code distributed\nneed not include anything that is normally distributed (in either source or\nbinary form) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component itself\naccompanies the executable.\n\nIf distribution of executable or object code is made by offering access to\ncopy from a designated place, then offering equivalent access to copy the\nsource code from the same place counts as distribution of the source code,\neven though third parties are not compelled to copy the source along with\nthe object code.\n\n4. You may not copy, modify, sublicense, or distribute the Program except\nas expressly provided under this License. Any attempt otherwise to copy, modify,\nsublicense or distribute the Program is void, and will automatically terminate\nyour rights under this License. However, parties who have received copies,\nor rights, from you under this License will not have their licenses terminated\nso long as such parties remain in full compliance.\n\n5. You are not required to accept this License, since you have not signed\nit. However, nothing else grants you permission to modify or distribute the\nProgram or its derivative works. These actions are prohibited by law if you\ndo not accept this License. Therefore, by modifying or distributing the Program\n(or any work based on the Program), you indicate your acceptance of this License\nto do so, and all its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n\n6. Each time you redistribute the Program (or any work based on the Program),\nthe recipient automatically receives a license from the original licensor\nto copy, distribute or modify the Program subject to these terms and conditions.\nYou may not impose any further restrictions on the recipients' exercise of\nthe rights granted herein. You are not responsible for enforcing compliance\nby third parties to this License.\n\n7. If, as a consequence of a court judgment or allegation of patent infringement\nor for any other reason (not limited to patent issues), conditions are imposed\non you (whether by court order, agreement or otherwise) that contradict the\nconditions of this License, they do not excuse you from the conditions of\nthis License. If you cannot distribute so as to satisfy simultaneously your\nobligations under this License and any other pertinent obligations, then as\na consequence you may not distribute the Program at all. For example, if a\npatent license would not permit royalty-free redistribution of the Program\nby all those who receive copies directly or indirectly through you, then the\nonly way you could satisfy both it and this License would be to refrain entirely\nfrom distribution of the Program.\n\nIf any portion of this section is held invalid or unenforceable under any\nparticular circumstance, the balance of the section is intended to apply and\nthe section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any patents\nor other property right claims or to contest validity of any such claims;\nthis section has the sole purpose of protecting the integrity of the free\nsoftware distribution system, which is implemented by public license practices.\nMany people have made generous contributions to the wide range of software\ndistributed through that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing to\ndistribute software through any other system and a licensee cannot impose\nthat choice.\n\nThis section is intended to make thoroughly clear what is believed to be a\nconsequence of the rest of this License.\n\n8. If the distribution and/or use of the Program is restricted in certain\ncountries either by patents or by copyrighted interfaces, the original copyright\nholder who places the Program under this License may add an explicit geographical\ndistribution limitation excluding those countries, so that distribution is\npermitted only in or among countries not thus excluded. In such case, this\nLicense incorporates the limitation as if written in the body of this License.\n\n9. The Free Software Foundation may publish revised and/or new versions of\nthe General Public License from time to time. Such new versions will be similar\nin spirit to the present version, but may differ in detail to address new\nproblems or concerns.\n\nEach version is given a distinguishing version number. If the Program specifies\na version number of this License which applies to it and \"any later version\",\nyou have the option of following the terms and conditions either of that version\nor of any later version published by the Free Software Foundation. If the\nProgram does not specify a version number of this License, you may choose\nany version ever published by the Free Software Foundation.\n\n10. If you wish to incorporate parts of the Program into other free programs\nwhose distribution conditions are different, write to the author to ask for\npermission. For software which is copyrighted by the Free Software Foundation,\nwrite to the Free Software Foundation; we sometimes make exceptions for this.\nOur decision will be guided by the two goals of preserving the free status\nof all derivatives of our free software and of promoting the sharing and reuse\nof software generally.\n\nNO WARRANTY\n\n11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR\nTHE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE\nSTATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM\n\"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,\nBUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\nFOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE\nOF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE\nOR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA\nOR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES\nOR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH\nHOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\nEND OF TERMS AND CONDITIONS\n\nHow to Apply These Terms to Your New Programs\n\nIf you develop a new program, and you want it to be of the greatest possible\nuse to the public, the best way to achieve this is to make it free software\nwhich everyone can redistribute and change under these terms.\n\nTo do so, attach the following notices to the program. It is safest to attach\nthem to the start of each source file to most effectively convey the exclusion\nof warranty; and each file should have at least the \"copyright\" line and a\npointer to where the full notice is found.\n\none line to give the program's name and an idea of what it does. Copyright\n(C) yyyy name of author\n\nThis program is free software; you can redistribute it and/or modify it under\nthe terms of the GNU General Public License as published by the Free Software\nFoundation; either version 2 of the License, or (at your option) any later\nversion.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\nFOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with\nthis program; if not, write to the Free Software Foundation, Inc., 51 Franklin\nStreet, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how\nto contact you by electronic and paper mail.\n\nIf the program is interactive, make it output a short notice like this when\nit starts in an interactive mode:\n\nGnomovision version 69, Copyright (C) year name of author Gnomovision comes\nwith ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software,\nand you are welcome to redistribute it under certain conditions; type `show\nc' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, the commands you use may be\ncalled something other than `show w' and `show c'; they could even be mouse-clicks\nor menu items--whatever suits your program.\n\nYou should also get your employer (if you work as a programmer) or your school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary. Here\nis a sample; alter the names:\n\nYoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision'\n(which makes passes at compilers) written by James Hacker.\n\nsignature of Ty Coon, 1 April 1989 Ty Coon, President of Vice\n"
  },
  {
    "path": "licenses/GPL-2.0-or-later.txt",
    "content": "GNU GENERAL PUBLIC LICENSE\nVersion 2, June 1991\n\nCopyright (C) 1989, 1991 Free Software Foundation, Inc.\n51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\n\nEveryone is permitted to copy and distribute verbatim copies of this license\ndocument, but changing it is not allowed.\n\nPreamble\n\nThe licenses for most software are designed to take away your freedom to share\nand change it. By contrast, the GNU General Public License is intended to\nguarantee your freedom to share and change free software--to make sure the\nsoftware is free for all its users. This General Public License applies to\nmost of the Free Software Foundation's software and to any other program whose\nauthors commit to using it. (Some other Free Software Foundation software\nis covered by the GNU Lesser General Public License instead.) You can apply\nit to your programs, too.\n\nWhen we speak of free software, we are referring to freedom, not price. Our\nGeneral Public Licenses are designed to make sure that you have the freedom\nto distribute copies of free software (and charge for this service if you\nwish), that you receive source code or can get it if you want it, that you\ncan change the software or use pieces of it in new free programs; and that\nyou know you can do these things.\n\nTo protect your rights, we need to make restrictions that forbid anyone to\ndeny you these rights or to ask you to surrender the rights. These restrictions\ntranslate to certain responsibilities for you if you distribute copies of\nthe software, or if you modify it.\n\nFor example, if you distribute copies of such a program, whether gratis or\nfor a fee, you must give the recipients all the rights that you have. You\nmust make sure that they, too, receive or can get the source code. And you\nmust show them these terms so they know their rights.\n\nWe protect your rights with two steps: (1) copyright the software, and (2)\noffer you this license which gives you legal permission to copy, distribute\nand/or modify the software.\n\nAlso, for each author's protection and ours, we want to make certain that\neveryone understands that there is no warranty for this free software. If\nthe software is modified by someone else and passed on, we want its recipients\nto know that what they have is not the original, so that any problems introduced\nby others will not reflect on the original authors' reputations.\n\nFinally, any free program is threatened constantly by software patents. We\nwish to avoid the danger that redistributors of a free program will individually\nobtain patent licenses, in effect making the program proprietary. To prevent\nthis, we have made it clear that any patent must be licensed for everyone's\nfree use or not licensed at all.\n\nThe precise terms and conditions for copying, distribution and modification\nfollow.\n\nTERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n0. This License applies to any program or other work which contains a notice\nplaced by the copyright holder saying it may be distributed under the terms\nof this General Public License. The \"Program\", below, refers to any such program\nor work, and a \"work based on the Program\" means either the Program or any\nderivative work under copyright law: that is to say, a work containing the\nProgram or a portion of it, either verbatim or with modifications and/or translated\ninto another language. (Hereinafter, translation is included without limitation\nin the term \"modification\".) Each licensee is addressed as \"you\".\n\nActivities other than copying, distribution and modification are not covered\nby this License; they are outside its scope. The act of running the Program\nis not restricted, and the output from the Program is covered only if its\ncontents constitute a work based on the Program (independent of having been\nmade by running the Program). Whether that is true depends on what the Program\ndoes.\n\n1. You may copy and distribute verbatim copies of the Program's source code\nas you receive it, in any medium, provided that you conspicuously and appropriately\npublish on each copy an appropriate copyright notice and disclaimer of warranty;\nkeep intact all the notices that refer to this License and to the absence\nof any warranty; and give any other recipients of the Program a copy of this\nLicense along with the Program.\n\nYou may charge a fee for the physical act of transferring a copy, and you\nmay at your option offer warranty protection in exchange for a fee.\n\n2. You may modify your copy or copies of the Program or any portion of it,\nthus forming a work based on the Program, and copy and distribute such modifications\nor work under the terms of Section 1 above, provided that you also meet all\nof these conditions:\n\na) You must cause the modified files to carry prominent notices stating that\nyou changed the files and the date of any change.\n\nb) You must cause any work that you distribute or publish, that in whole or\nin part contains or is derived from the Program or any part thereof, to be\nlicensed as a whole at no charge to all third parties under the terms of this\nLicense.\n\nc) If the modified program normally reads commands interactively when run,\nyou must cause it, when started running for such interactive use in the most\nordinary way, to print or display an announcement including an appropriate\ncopyright notice and a notice that there is no warranty (or else, saying that\nyou provide a warranty) and that users may redistribute the program under\nthese conditions, and telling the user how to view a copy of this License.\n(Exception: if the Program itself is interactive but does not normally print\nsuch an announcement, your work based on the Program is not required to print\nan announcement.)\n\nThese requirements apply to the modified work as a whole. If identifiable\nsections of that work are not derived from the Program, and can be reasonably\nconsidered independent and separate works in themselves, then this License,\nand its terms, do not apply to those sections when you distribute them as\nseparate works. But when you distribute the same sections as part of a whole\nwhich is a work based on the Program, the distribution of the whole must be\non the terms of this License, whose permissions for other licensees extend\nto the entire whole, and thus to each and every part regardless of who wrote\nit.\n\nThus, it is not the intent of this section to claim rights or contest your\nrights to work written entirely by you; rather, the intent is to exercise\nthe right to control the distribution of derivative or collective works based\non the Program.\n\nIn addition, mere aggregation of another work not based on the Program with\nthe Program (or with a work based on the Program) on a volume of a storage\nor distribution medium does not bring the other work under the scope of this\nLicense.\n\n3. You may copy and distribute the Program (or a work based on it, under Section\n2) in object code or executable form under the terms of Sections 1 and 2 above\nprovided that you also do one of the following:\n\na) Accompany it with the complete corresponding machine-readable source code,\nwhich must be distributed under the terms of Sections 1 and 2 above on a medium\ncustomarily used for software interchange; or,\n\nb) Accompany it with a written offer, valid for at least three years, to give\nany third party, for a charge no more than your cost of physically performing\nsource distribution, a complete machine-readable copy of the corresponding\nsource code, to be distributed under the terms of Sections 1 and 2 above on\na medium customarily used for software interchange; or,\n\nc) Accompany it with the information you received as to the offer to distribute\ncorresponding source code. (This alternative is allowed only for noncommercial\ndistribution and only if you received the program in object code or executable\nform with such an offer, in accord with Subsection b above.)\n\nThe source code for a work means the preferred form of the work for making\nmodifications to it. For an executable work, complete source code means all\nthe source code for all modules it contains, plus any associated interface\ndefinition files, plus the scripts used to control compilation and installation\nof the executable. However, as a special exception, the source code distributed\nneed not include anything that is normally distributed (in either source or\nbinary form) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component itself\naccompanies the executable.\n\nIf distribution of executable or object code is made by offering access to\ncopy from a designated place, then offering equivalent access to copy the\nsource code from the same place counts as distribution of the source code,\neven though third parties are not compelled to copy the source along with\nthe object code.\n\n4. You may not copy, modify, sublicense, or distribute the Program except\nas expressly provided under this License. Any attempt otherwise to copy, modify,\nsublicense or distribute the Program is void, and will automatically terminate\nyour rights under this License. However, parties who have received copies,\nor rights, from you under this License will not have their licenses terminated\nso long as such parties remain in full compliance.\n\n5. You are not required to accept this License, since you have not signed\nit. However, nothing else grants you permission to modify or distribute the\nProgram or its derivative works. These actions are prohibited by law if you\ndo not accept this License. Therefore, by modifying or distributing the Program\n(or any work based on the Program), you indicate your acceptance of this License\nto do so, and all its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n\n6. Each time you redistribute the Program (or any work based on the Program),\nthe recipient automatically receives a license from the original licensor\nto copy, distribute or modify the Program subject to these terms and conditions.\nYou may not impose any further restrictions on the recipients' exercise of\nthe rights granted herein. You are not responsible for enforcing compliance\nby third parties to this License.\n\n7. If, as a consequence of a court judgment or allegation of patent infringement\nor for any other reason (not limited to patent issues), conditions are imposed\non you (whether by court order, agreement or otherwise) that contradict the\nconditions of this License, they do not excuse you from the conditions of\nthis License. If you cannot distribute so as to satisfy simultaneously your\nobligations under this License and any other pertinent obligations, then as\na consequence you may not distribute the Program at all. For example, if a\npatent license would not permit royalty-free redistribution of the Program\nby all those who receive copies directly or indirectly through you, then the\nonly way you could satisfy both it and this License would be to refrain entirely\nfrom distribution of the Program.\n\nIf any portion of this section is held invalid or unenforceable under any\nparticular circumstance, the balance of the section is intended to apply and\nthe section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any patents\nor other property right claims or to contest validity of any such claims;\nthis section has the sole purpose of protecting the integrity of the free\nsoftware distribution system, which is implemented by public license practices.\nMany people have made generous contributions to the wide range of software\ndistributed through that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing to\ndistribute software through any other system and a licensee cannot impose\nthat choice.\n\nThis section is intended to make thoroughly clear what is believed to be a\nconsequence of the rest of this License.\n\n8. If the distribution and/or use of the Program is restricted in certain\ncountries either by patents or by copyrighted interfaces, the original copyright\nholder who places the Program under this License may add an explicit geographical\ndistribution limitation excluding those countries, so that distribution is\npermitted only in or among countries not thus excluded. In such case, this\nLicense incorporates the limitation as if written in the body of this License.\n\n9. The Free Software Foundation may publish revised and/or new versions of\nthe General Public License from time to time. Such new versions will be similar\nin spirit to the present version, but may differ in detail to address new\nproblems or concerns.\n\nEach version is given a distinguishing version number. If the Program specifies\na version number of this License which applies to it and \"any later version\",\nyou have the option of following the terms and conditions either of that version\nor of any later version published by the Free Software Foundation. If the\nProgram does not specify a version number of this License, you may choose\nany version ever published by the Free Software Foundation.\n\n10. If you wish to incorporate parts of the Program into other free programs\nwhose distribution conditions are different, write to the author to ask for\npermission. For software which is copyrighted by the Free Software Foundation,\nwrite to the Free Software Foundation; we sometimes make exceptions for this.\nOur decision will be guided by the two goals of preserving the free status\nof all derivatives of our free software and of promoting the sharing and reuse\nof software generally.\n\nNO WARRANTY\n\n11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR\nTHE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE\nSTATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM\n\"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,\nBUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\nFOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE\nOF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE\nOR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA\nOR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES\nOR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH\nHOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\nEND OF TERMS AND CONDITIONS\n\nHow to Apply These Terms to Your New Programs\n\nIf you develop a new program, and you want it to be of the greatest possible\nuse to the public, the best way to achieve this is to make it free software\nwhich everyone can redistribute and change under these terms.\n\nTo do so, attach the following notices to the program. It is safest to attach\nthem to the start of each source file to most effectively convey the exclusion\nof warranty; and each file should have at least the \"copyright\" line and a\npointer to where the full notice is found.\n\none line to give the program's name and an idea of what it does. Copyright\n(C) yyyy name of author\n\nThis program is free software; you can redistribute it and/or modify it under\nthe terms of the GNU General Public License as published by the Free Software\nFoundation; either version 2 of the License, or (at your option) any later\nversion.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\nFOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with\nthis program; if not, write to the Free Software Foundation, Inc., 51 Franklin\nStreet, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how\nto contact you by electronic and paper mail.\n\nIf the program is interactive, make it output a short notice like this when\nit starts in an interactive mode:\n\nGnomovision version 69, Copyright (C) year name of author Gnomovision comes\nwith ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software,\nand you are welcome to redistribute it under certain conditions; type `show\nc' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, the commands you use may be\ncalled something other than `show w' and `show c'; they could even be mouse-clicks\nor menu items--whatever suits your program.\n\nYou should also get your employer (if you work as a programmer) or your school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary. Here\nis a sample; alter the names:\n\nYoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision'\n(which makes passes at compilers) written by James Hacker.\n\nsignature of Ty Coon, 1 April 1989 Ty Coon, President of Vice\n"
  },
  {
    "path": "licenses/GPL-3.0-only.txt",
    "content": "GNU GENERAL PUBLIC LICENSE\nVersion 3, 29 June 2007\n\nCopyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>\n\nEveryone is permitted to copy and distribute verbatim copies of this license\ndocument, but changing it is not allowed.\n\nPreamble\n\nThe GNU General Public License is a free, copyleft license for software and\nother kinds of works.\n\nThe licenses for most software and other practical works are designed to take\naway your freedom to share and change the works. By contrast, the GNU General\nPublic License is intended to guarantee your freedom to share and change all\nversions of a program--to make sure it remains free software for all its users.\nWe, the Free Software Foundation, use the GNU General Public License for most\nof our software; it applies also to any other work released this way by its\nauthors. You can apply it to your programs, too.\n\nWhen we speak of free software, we are referring to freedom, not price. Our\nGeneral Public Licenses are designed to make sure that you have the freedom\nto distribute copies of free software (and charge for them if you wish), that\nyou receive source code or can get it if you want it, that you can change\nthe software or use pieces of it in new free programs, and that you know you\ncan do these things.\n\nTo protect your rights, we need to prevent others from denying you these rights\nor asking you to surrender the rights. Therefore, you have certain responsibilities\nif you distribute copies of the software, or if you modify it: responsibilities\nto respect the freedom of others.\n\nFor example, if you distribute copies of such a program, whether gratis or\nfor a fee, you must pass on to the recipients the same freedoms that you received.\nYou must make sure that they, too, receive or can get the source code. And\nyou must show them these terms so they know their rights.\n\nDevelopers that use the GNU GPL protect your rights with two steps: (1) assert\ncopyright on the software, and (2) offer you this License giving you legal\npermission to copy, distribute and/or modify it.\n\nFor the developers' and authors' protection, the GPL clearly explains that\nthere is no warranty for this free software. For both users' and authors'\nsake, the GPL requires that modified versions be marked as changed, so that\ntheir problems will not be attributed erroneously to authors of previous versions.\n\nSome devices are designed to deny users access to install or run modified\nversions of the software inside them, although the manufacturer can do so.\nThis is fundamentally incompatible with the aim of protecting users' freedom\nto change the software. The systematic pattern of such abuse occurs in the\narea of products for individuals to use, which is precisely where it is most\nunacceptable. Therefore, we have designed this version of the GPL to prohibit\nthe practice for those products. If such problems arise substantially in other\ndomains, we stand ready to extend this provision to those domains in future\nversions of the GPL, as needed to protect the freedom of users.\n\nFinally, every program is threatened constantly by software patents. States\nshould not allow patents to restrict development and use of software on general-purpose\ncomputers, but in those that do, we wish to avoid the special danger that\npatents applied to a free program could make it effectively proprietary. To\nprevent this, the GPL assures that patents cannot be used to render the program\nnon-free.\n\nThe precise terms and conditions for copying, distribution and modification\nfollow.\n\nTERMS AND CONDITIONS\n\n0. Definitions.\n\n“This License” refers to version 3 of the GNU General Public License.\n\n“Copyright” also means copyright-like laws that apply to other kinds of works,\nsuch as semiconductor masks.\n\n“The Program” refers to any copyrightable work licensed under this License.\nEach licensee is addressed as “you”. “Licensees” and “recipients” may be individuals\nor organizations.\n\nTo “modify” a work means to copy from or adapt all or part of the work in\na fashion requiring copyright permission, other than the making of an exact\ncopy. The resulting work is called a “modified version” of the earlier work\nor a work “based on” the earlier work.\n\nA “covered work” means either the unmodified Program or a work based on the\nProgram.\n\nTo “propagate” a work means to do anything with it that, without permission,\nwould make you directly or secondarily liable for infringement under applicable\ncopyright law, except executing it on a computer or modifying a private copy.\nPropagation includes copying, distribution (with or without modification),\nmaking available to the public, and in some countries other activities as\nwell.\n\nTo “convey” a work means any kind of propagation that enables other parties\nto make or receive copies. Mere interaction with a user through a computer\nnetwork, with no transfer of a copy, is not conveying.\n\nAn interactive user interface displays “Appropriate Legal Notices” to the\nextent that it includes a convenient and prominently visible feature that\n(1) displays an appropriate copyright notice, and (2) tells the user that\nthere is no warranty for the work (except to the extent that warranties are\nprovided), that licensees may convey the work under this License, and how\nto view a copy of this License. If the interface presents a list of user commands\nor options, such as a menu, a prominent item in the list meets this criterion.\n\n1. Source Code.\nThe “source code” for a work means the preferred form of the work for making\nmodifications to it. “Object code” means any non-source form of a work.\n\nA “Standard Interface” means an interface that either is an official standard\ndefined by a recognized standards body, or, in the case of interfaces specified\nfor a particular programming language, one that is widely used among developers\nworking in that language.\n\nThe “System Libraries” of an executable work include anything, other than\nthe work as a whole, that (a) is included in the normal form of packaging\na Major Component, but which is not part of that Major Component, and (b)\nserves only to enable use of the work with that Major Component, or to implement\na Standard Interface for which an implementation is available to the public\nin source code form. A “Major Component”, in this context, means a major essential\ncomponent (kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to produce\nthe work, or an object code interpreter used to run it.\n\nThe “Corresponding Source” for a work in object code form means all the source\ncode needed to generate, install, and (for an executable work) run the object\ncode and to modify the work, including scripts to control those activities.\nHowever, it does not include the work's System Libraries, or general-purpose\ntools or generally available free programs which are used unmodified in performing\nthose activities but which are not part of the work. For example, Corresponding\nSource includes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically linked\nsubprograms that the work is specifically designed to require, such as by\nintimate data communication or control flow between those subprograms and\nother parts of the work.\n\nThe Corresponding Source need not include anything that users can regenerate\nautomatically from other parts of the Corresponding Source.\n\nThe Corresponding Source for a work in source code form is that same work.\n\n2. Basic Permissions.\nAll rights granted under this License are granted for the term of copyright\non the Program, and are irrevocable provided the stated conditions are met.\nThis License explicitly affirms your unlimited permission to run the unmodified\nProgram. The output from running a covered work is covered by this License\nonly if the output, given its content, constitutes a covered work. This License\nacknowledges your rights of fair use or other equivalent, as provided by copyright\nlaw.\n\nYou may make, run and propagate covered works that you do not convey, without\nconditions so long as your license otherwise remains in force. You may convey\ncovered works to others for the sole purpose of having them make modifications\nexclusively for you, or provide you with facilities for running those works,\nprovided that you comply with the terms of this License in conveying all material\nfor which you do not control copyright. Those thus making or running the covered\nworks for you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of your copyrighted\nmaterial outside their relationship with you.\n\nConveying under any other circumstances is permitted solely under the conditions\nstated below. Sublicensing is not allowed; section 10 makes it unnecessary.\n\n3. Protecting Users' Legal Rights From Anti-Circumvention Law.\nNo covered work shall be deemed part of an effective technological measure\nunder any applicable law fulfilling obligations under article 11 of the WIPO\ncopyright treaty adopted on 20 December 1996, or similar laws prohibiting\nor restricting circumvention of such measures.\n\nWhen you convey a covered work, you waive any legal power to forbid circumvention\nof technological measures to the extent such circumvention is effected by\nexercising rights under this License with respect to the covered work, and\nyou disclaim any intention to limit operation or modification of the work\nas a means of enforcing, against the work's users, your or third parties'\nlegal rights to forbid circumvention of technological measures.\n\n4. Conveying Verbatim Copies.\nYou may convey verbatim copies of the Program's source code as you receive\nit, in any medium, provided that you conspicuously and appropriately publish\non each copy an appropriate copyright notice; keep intact all notices stating\nthat this License and any non-permissive terms added in accord with section\n7 apply to the code; keep intact all notices of the absence of any warranty;\nand give all recipients a copy of this License along with the Program.\n\nYou may charge any price or no price for each copy that you convey, and you\nmay offer support or warranty protection for a fee.\n\n5. Conveying Modified Source Versions.\nYou may convey a work based on the Program, or the modifications to produce\nit from the Program, in the form of source code under the terms of section\n4, provided that you also meet all of these conditions:\n\na) The work must carry prominent notices stating that you modified it, and\ngiving a relevant date.\n\nb) The work must carry prominent notices stating that it is released under\nthis License and any conditions added under section 7. This requirement modifies\nthe requirement in section 4 to “keep intact all notices”.\n\nc) You must license the entire work, as a whole, under this License to anyone\nwho comes into possession of a copy. This License will therefore apply, along\nwith any applicable section 7 additional terms, to the whole of the work,\nand all its parts, regardless of how they are packaged. This License gives\nno permission to license the work in any other way, but it does not invalidate\nsuch permission if you have separately received it.\n\nd) If the work has interactive user interfaces, each must display Appropriate\nLegal Notices; however, if the Program has interactive interfaces that do\nnot display Appropriate Legal Notices, your work need not make them do so.\n\nA compilation of a covered work with other separate and independent works,\nwhich are not by their nature extensions of the covered work, and which are\nnot combined with it such as to form a larger program, in or on a volume of\na storage or distribution medium, is called an “aggregate” if the compilation\nand its resulting copyright are not used to limit the access or legal rights\nof the compilation's users beyond what the individual works permit. Inclusion\nof a covered work in an aggregate does not cause this License to apply to\nthe other parts of the aggregate.\n\n6. Conveying Non-Source Forms.\nYou may convey a covered work in object code form under the terms of sections\n4 and 5, provided that you also convey the machine-readable Corresponding\nSource under the terms of this License, in one of these ways:\n\na) Convey the object code in, or embodied in, a physical product (including\na physical distribution medium), accompanied by the Corresponding Source fixed\non a durable physical medium customarily used for software interchange.\n\nb) Convey the object code in, or embodied in, a physical product (including\na physical distribution medium), accompanied by a written offer, valid for\nat least three years and valid for as long as you offer spare parts or customer\nsupport for that product model, to give anyone who possesses the object code\neither (1) a copy of the Corresponding Source for all the software in the\nproduct that is covered by this License, on a durable physical medium customarily\nused for software interchange, for a price no more than your reasonable cost\nof physically performing this conveying of source, or (2) access to copy the\nCorresponding Source from a network server at no charge.\n\nc) Convey individual copies of the object code with a copy of the written\noffer to provide the Corresponding Source. This alternative is allowed only\noccasionally and noncommercially, and only if you received the object code\nwith such an offer, in accord with subsection 6b.\n\nd) Convey the object code by offering access from a designated place (gratis\nor for a charge), and offer equivalent access to the Corresponding Source\nin the same way through the same place at no further charge. You need not\nrequire recipients to copy the Corresponding Source along with the object\ncode. If the place to copy the object code is a network server, the Corresponding\nSource may be on a different server (operated by you or a third party) that\nsupports equivalent copying facilities, provided you maintain clear directions\nnext to the object code saying where to find the Corresponding Source. Regardless\nof what server hosts the Corresponding Source, you remain obligated to ensure\nthat it is available for as long as needed to satisfy these requirements.\n\ne) Convey the object code using peer-to-peer transmission, provided you inform\nother peers where the object code and Corresponding Source of the work are\nbeing offered to the general public at no charge under subsection 6d.\n\nA separable portion of the object code, whose source code is excluded from\nthe Corresponding Source as a System Library, need not be included in conveying\nthe object code work.\n\nA “User Product” is either (1) a “consumer product”, which means any tangible\npersonal property which is normally used for personal, family, or household\npurposes, or (2) anything designed or sold for incorporation into a dwelling.\nIn determining whether a product is a consumer product, doubtful cases shall\nbe resolved in favor of coverage. For a particular product received by a particular\nuser, “normally used” refers to a typical or common use of that class of product,\nregardless of the status of the particular user or of the way in which the\nparticular user actually uses, or expects or is expected to use, the product.\nA product is a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent the\nonly significant mode of use of the product.\n\n“Installation Information” for a User Product means any methods, procedures,\nauthorization keys, or other information required to install and execute modified\nversions of a covered work in that User Product from a modified version of\nits Corresponding Source. The information must suffice to ensure that the\ncontinued functioning of the modified object code is in no case prevented\nor interfered with solely because modification has been made.\n\nIf you convey an object code work under this section in, or with, or specifically\nfor use in, a User Product, and the conveying occurs as part of a transaction\nin which the right of possession and use of the User Product is transferred\nto the recipient in perpetuity or for a fixed term (regardless of how the\ntransaction is characterized), the Corresponding Source conveyed under this\nsection must be accompanied by the Installation Information. But this requirement\ndoes not apply if neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has been installed\nin ROM).\n\nThe requirement to provide Installation Information does not include a requirement\nto continue to provide support service, warranty, or updates for a work that\nhas been modified or installed by the recipient, or for the User Product in\nwhich it has been modified or installed. Access to a network may be denied\nwhen the modification itself materially and adversely affects the operation\nof the network or violates the rules and protocols for communication across\nthe network.\n\nCorresponding Source conveyed, and Installation Information provided, in accord\nwith this section must be in a format that is publicly documented (and with\nan implementation available to the public in source code form), and must require\nno special password or key for unpacking, reading or copying.\n\n7. Additional Terms.\n“Additional permissions” are terms that supplement the terms of this License\nby making exceptions from one or more of its conditions. Additional permissions\nthat are applicable to the entire Program shall be treated as though they\nwere included in this License, to the extent that they are valid under applicable\nlaw. If additional permissions apply only to part of the Program, that part\nmay be used separately under those permissions, but the entire Program remains\ngoverned by this License without regard to the additional permissions.\n\nWhen you convey a copy of a covered work, you may at your option remove any\nadditional permissions from that copy, or from any part of it. (Additional\npermissions may be written to require their own removal in certain cases when\nyou modify the work.) You may place additional permissions on material, added\nby you to a covered work, for which you have or can give appropriate copyright\npermission.\n\nNotwithstanding any other provision of this License, for material you add\nto a covered work, you may (if authorized by the copyright holders of that\nmaterial) supplement the terms of this License with terms:\n\na) Disclaiming warranty or limiting liability differently from the terms of\nsections 15 and 16 of this License; or\n\nb) Requiring preservation of specified reasonable legal notices or author\nattributions in that material or in the Appropriate Legal Notices displayed\nby works containing it; or\n\nc) Prohibiting misrepresentation of the origin of that material, or requiring\nthat modified versions of such material be marked in reasonable ways as different\nfrom the original version; or\n\nd) Limiting the use for publicity purposes of names of licensors or authors\nof the material; or\n\ne) Declining to grant rights under trademark law for use of some trade names,\ntrademarks, or service marks; or\n\nf) Requiring indemnification of licensors and authors of that material by\nanyone who conveys the material (or modified versions of it) with contractual\nassumptions of liability to the recipient, for any liability that these contractual\nassumptions directly impose on those licensors and authors.\n\nAll other non-permissive additional terms are considered “further restrictions”\nwithin the meaning of section 10. If the Program as you received it, or any\npart of it, contains a notice stating that it is governed by this License\nalong with a term that is a further restriction, you may remove that term.\nIf a license document contains a further restriction but permits relicensing\nor conveying under this License, you may add to a covered work material governed\nby the terms of that license document, provided that the further restriction\ndoes not survive such relicensing or conveying.\n\nIf you add terms to a covered work in accord with this section, you must place,\nin the relevant source files, a statement of the additional terms that apply\nto those files, or a notice indicating where to find the applicable terms.\n\nAdditional terms, permissive or non-permissive, may be stated in the form\nof a separately written license, or stated as exceptions; the above requirements\napply either way.\n\n8. Termination.\nYou may not propagate or modify a covered work except as expressly provided\nunder this License. Any attempt otherwise to propagate or modify it is void,\nand will automatically terminate your rights under this License (including\nany patent licenses granted under the third paragraph of section 11).\n\nHowever, if you cease all violation of this License, then your license from\na particular copyright holder is reinstated (a) provisionally, unless and\nuntil the copyright holder explicitly and finally terminates your license,\nand (b) permanently, if the copyright holder fails to notify you of the violation\nby some reasonable means prior to 60 days after the cessation.\n\nMoreover, your license from a particular copyright holder is reinstated permanently\nif the copyright holder notifies you of the violation by some reasonable means,\nthis is the first time you have received notice of violation of this License\n(for any work) from that copyright holder, and you cure the violation prior\nto 30 days after your receipt of the notice.\n\nTermination of your rights under this section does not terminate the licenses\nof parties who have received copies or rights from you under this License.\nIf your rights have been terminated and not permanently reinstated, you do\nnot qualify to receive new licenses for the same material under section 10.\n\n9. Acceptance Not Required for Having Copies.\nYou are not required to accept this License in order to receive or run a copy\nof the Program. Ancillary propagation of a covered work occurring solely as\na consequence of using peer-to-peer transmission to receive a copy likewise\ndoes not require acceptance. However, nothing other than this License grants\nyou permission to propagate or modify any covered work. These actions infringe\ncopyright if you do not accept this License. Therefore, by modifying or propagating\na covered work, you indicate your acceptance of this License to do so.\n\n10. Automatic Licensing of Downstream Recipients.\nEach time you convey a covered work, the recipient automatically receives\na license from the original licensors, to run, modify and propagate that work,\nsubject to this License. You are not responsible for enforcing compliance\nby third parties with this License.\n\nAn “entity transaction” is a transaction transferring control of an organization,\nor substantially all assets of one, or subdividing an organization, or merging\norganizations. If propagation of a covered work results from an entity transaction,\neach party to that transaction who receives a copy of the work also receives\nwhatever licenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the Corresponding\nSource of the work from the predecessor in interest, if the predecessor has\nit or can get it with reasonable efforts.\n\nYou may not impose any further restrictions on the exercise of the rights\ngranted or affirmed under this License. For example, you may not impose a\nlicense fee, royalty, or other charge for exercise of rights granted under\nthis License, and you may not initiate litigation (including a cross-claim\nor counterclaim in a lawsuit) alleging that any patent claim is infringed\nby making, using, selling, offering for sale, or importing the Program or\nany portion of it.\n\n11. Patents.\nA “contributor” is a copyright holder who authorizes use under this License\nof the Program or a work on which the Program is based. The work thus licensed\nis called the contributor's “contributor version”.\n\nA contributor's “essential patent claims” are all patent claims owned or controlled\nby the contributor, whether already acquired or hereafter acquired, that would\nbe infringed by some manner, permitted by this License, of making, using,\nor selling its contributor version, but do not include claims that would be\ninfringed only as a consequence of further modification of the contributor\nversion. For purposes of this definition, “control” includes the right to\ngrant patent sublicenses in a manner consistent with the requirements of this\nLicense.\n\nEach contributor grants you a non-exclusive, worldwide, royalty-free patent\nlicense under the contributor's essential patent claims, to make, use, sell,\noffer for sale, import and otherwise run, modify and propagate the contents\nof its contributor version.\n\nIn the following three paragraphs, a “patent license” is any express agreement\nor commitment, however denominated, not to enforce a patent (such as an express\npermission to practice a patent or covenant not to sue for patent infringement).\nTo “grant” such a patent license to a party means to make such an agreement\nor commitment not to enforce a patent against the party.\n\nIf you convey a covered work, knowingly relying on a patent license, and the\nCorresponding Source of the work is not available for anyone to copy, free\nof charge and under the terms of this License, through a publicly available\nnetwork server or other readily accessible means, then you must either (1)\ncause the Corresponding Source to be so available, or (2) arrange to deprive\nyourself of the benefit of the patent license for this particular work, or\n(3) arrange, in a manner consistent with the requirements of this License,\nto extend the patent license to downstream recipients. “Knowingly relying”\nmeans you have actual knowledge that, but for the patent license, your conveying\nthe covered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that country\nthat you have reason to believe are valid.\n\nIf, pursuant to or in connection with a single transaction or arrangement,\nyou convey, or propagate by procuring conveyance of, a covered work, and grant\na patent license to some of the parties receiving the covered work authorizing\nthem to use, propagate, modify or convey a specific copy of the covered work,\nthen the patent license you grant is automatically extended to all recipients\nof the covered work and works based on it.\n\nA patent license is “discriminatory” if it does not include within the scope\nof its coverage, prohibits the exercise of, or is conditioned on the non-exercise\nof one or more of the rights that are specifically granted under this License.\nYou may not convey a covered work if you are a party to an arrangement with\na third party that is in the business of distributing software, under which\nyou make payment to the third party based on the extent of your activity of\nconveying the work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory patent\nlicense (a) in connection with copies of the covered work conveyed by you\n(or copies made from those copies), or (b) primarily for and in connection\nwith specific products or compilations that contain the covered work, unless\nyou entered into that arrangement, or that patent license was granted, prior\nto 28 March 2007.\n\nNothing in this License shall be construed as excluding or limiting any implied\nlicense or other defenses to infringement that may otherwise be available\nto you under applicable patent law.\n\n12. No Surrender of Others' Freedom.\nIf conditions are imposed on you (whether by court order, agreement or otherwise)\nthat contradict the conditions of this License, they do not excuse you from\nthe conditions of this License. If you cannot convey a covered work so as\nto satisfy simultaneously your obligations under this License and any other\npertinent obligations, then as a consequence you may not convey it at all.\nFor example, if you agree to terms that obligate you to collect a royalty\nfor further conveying from those to whom you convey the Program, the only\nway you could satisfy both those terms and this License would be to refrain\nentirely from conveying the Program.\n\n13. Use with the GNU Affero General Public License.\nNotwithstanding any other provision of this License, you have permission to\nlink or combine any covered work with a work licensed under version 3 of the\nGNU Affero General Public License into a single combined work, and to convey\nthe resulting work. The terms of this License will continue to apply to the\npart which is the covered work, but the special requirements of the GNU Affero\nGeneral Public License, section 13, concerning interaction through a network\nwill apply to the combination as such.\n\n14. Revised Versions of this License.\nThe Free Software Foundation may publish revised and/or new versions of the\nGNU General Public License from time to time. Such new versions will be similar\nin spirit to the present version, but may differ in detail to address new\nproblems or concerns.\n\nEach version is given a distinguishing version number. If the Program specifies\nthat a certain numbered version of the GNU General Public License “or any\nlater version” applies to it, you have the option of following the terms and\nconditions either of that numbered version or of any later version published\nby the Free Software Foundation. If the Program does not specify a version\nnumber of the GNU General Public License, you may choose any version ever\npublished by the Free Software Foundation.\n\nIf the Program specifies that a proxy can decide which future versions of\nthe GNU General Public License can be used, that proxy's public statement\nof acceptance of a version permanently authorizes you to choose that version\nfor the Program.\n\nLater license versions may give you additional or different permissions. However,\nno additional obligations are imposed on any author or copyright holder as\na result of your choosing to follow a later version.\n\n15. Disclaimer of Warranty.\nTHERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE\nLAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\nOTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER\nEXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM\nPROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR\nCORRECTION.\n\n16. Limitation of Liability.\nIN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL\nANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM\nAS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,\nINCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO\nUSE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED\nINACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE\nPROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER\nPARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n17. Interpretation of Sections 15 and 16.\nIf the disclaimer of warranty and limitation of liability provided above cannot\nbe given local legal effect according to their terms, reviewing courts shall\napply local law that most closely approximates an absolute waiver of all civil\nliability in connection with the Program, unless a warranty or assumption\nof liability accompanies a copy of the Program in return for a fee.\n\nEND OF TERMS AND CONDITIONS\n\nHow to Apply These Terms to Your New Programs\n\nIf you develop a new program, and you want it to be of the greatest possible\nuse to the public, the best way to achieve this is to make it free software\nwhich everyone can redistribute and change under these terms.\n\nTo do so, attach the following notices to the program. It is safest to attach\nthem to the start of each source file to most effectively state the exclusion\nof warranty; and each file should have at least the “copyright” line and a\npointer to where the full notice is found.\n\n     <one line to give the program's name and a brief idea of what it does.>\n     Copyright (C) <year>  <name of author>\n\nThis program is free software: you can redistribute it and/or modify it under\nthe terms of the GNU General Public License as published by the Free Software\nFoundation, either version 3 of the License, or (at your option) any later\nversion.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\nFOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with\nthis program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\nIf the program does terminal interaction, make it output a short notice like\nthis when it starts in an interactive mode:\n\n     <program>  Copyright (C) <year>  <name of author>\n     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\nThis is free software, and you are welcome to redistribute it under certain\nconditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands might\nbe different; for a GUI interface, you would use an “about box”.\n\nYou should also get your employer (if you work as a programmer) or school,\nif any, to sign a “copyright disclaimer” for the program, if necessary. For\nmore information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.\n\nThe GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you may\nconsider it more useful to permit linking proprietary applications with the\nlibrary. If this is what you want to do, use the GNU Lesser General Public\nLicense instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "licenses/GPL-3.0-or-later.txt",
    "content": "GNU GENERAL PUBLIC LICENSE\nVersion 3, 29 June 2007\n\nCopyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>\n\nEveryone is permitted to copy and distribute verbatim copies of this license\ndocument, but changing it is not allowed.\n\nPreamble\n\nThe GNU General Public License is a free, copyleft license for software and\nother kinds of works.\n\nThe licenses for most software and other practical works are designed to take\naway your freedom to share and change the works. By contrast, the GNU General\nPublic License is intended to guarantee your freedom to share and change all\nversions of a program--to make sure it remains free software for all its users.\nWe, the Free Software Foundation, use the GNU General Public License for most\nof our software; it applies also to any other work released this way by its\nauthors. You can apply it to your programs, too.\n\nWhen we speak of free software, we are referring to freedom, not price. Our\nGeneral Public Licenses are designed to make sure that you have the freedom\nto distribute copies of free software (and charge for them if you wish), that\nyou receive source code or can get it if you want it, that you can change\nthe software or use pieces of it in new free programs, and that you know you\ncan do these things.\n\nTo protect your rights, we need to prevent others from denying you these rights\nor asking you to surrender the rights. Therefore, you have certain responsibilities\nif you distribute copies of the software, or if you modify it: responsibilities\nto respect the freedom of others.\n\nFor example, if you distribute copies of such a program, whether gratis or\nfor a fee, you must pass on to the recipients the same freedoms that you received.\nYou must make sure that they, too, receive or can get the source code. And\nyou must show them these terms so they know their rights.\n\nDevelopers that use the GNU GPL protect your rights with two steps: (1) assert\ncopyright on the software, and (2) offer you this License giving you legal\npermission to copy, distribute and/or modify it.\n\nFor the developers' and authors' protection, the GPL clearly explains that\nthere is no warranty for this free software. For both users' and authors'\nsake, the GPL requires that modified versions be marked as changed, so that\ntheir problems will not be attributed erroneously to authors of previous versions.\n\nSome devices are designed to deny users access to install or run modified\nversions of the software inside them, although the manufacturer can do so.\nThis is fundamentally incompatible with the aim of protecting users' freedom\nto change the software. The systematic pattern of such abuse occurs in the\narea of products for individuals to use, which is precisely where it is most\nunacceptable. Therefore, we have designed this version of the GPL to prohibit\nthe practice for those products. If such problems arise substantially in other\ndomains, we stand ready to extend this provision to those domains in future\nversions of the GPL, as needed to protect the freedom of users.\n\nFinally, every program is threatened constantly by software patents. States\nshould not allow patents to restrict development and use of software on general-purpose\ncomputers, but in those that do, we wish to avoid the special danger that\npatents applied to a free program could make it effectively proprietary. To\nprevent this, the GPL assures that patents cannot be used to render the program\nnon-free.\n\nThe precise terms and conditions for copying, distribution and modification\nfollow.\n\nTERMS AND CONDITIONS\n\n0. Definitions.\n\n“This License” refers to version 3 of the GNU General Public License.\n\n“Copyright” also means copyright-like laws that apply to other kinds of works,\nsuch as semiconductor masks.\n\n“The Program” refers to any copyrightable work licensed under this License.\nEach licensee is addressed as “you”. “Licensees” and “recipients” may be individuals\nor organizations.\n\nTo “modify” a work means to copy from or adapt all or part of the work in\na fashion requiring copyright permission, other than the making of an exact\ncopy. The resulting work is called a “modified version” of the earlier work\nor a work “based on” the earlier work.\n\nA “covered work” means either the unmodified Program or a work based on the\nProgram.\n\nTo “propagate” a work means to do anything with it that, without permission,\nwould make you directly or secondarily liable for infringement under applicable\ncopyright law, except executing it on a computer or modifying a private copy.\nPropagation includes copying, distribution (with or without modification),\nmaking available to the public, and in some countries other activities as\nwell.\n\nTo “convey” a work means any kind of propagation that enables other parties\nto make or receive copies. Mere interaction with a user through a computer\nnetwork, with no transfer of a copy, is not conveying.\n\nAn interactive user interface displays “Appropriate Legal Notices” to the\nextent that it includes a convenient and prominently visible feature that\n(1) displays an appropriate copyright notice, and (2) tells the user that\nthere is no warranty for the work (except to the extent that warranties are\nprovided), that licensees may convey the work under this License, and how\nto view a copy of this License. If the interface presents a list of user commands\nor options, such as a menu, a prominent item in the list meets this criterion.\n\n1. Source Code.\nThe “source code” for a work means the preferred form of the work for making\nmodifications to it. “Object code” means any non-source form of a work.\n\nA “Standard Interface” means an interface that either is an official standard\ndefined by a recognized standards body, or, in the case of interfaces specified\nfor a particular programming language, one that is widely used among developers\nworking in that language.\n\nThe “System Libraries” of an executable work include anything, other than\nthe work as a whole, that (a) is included in the normal form of packaging\na Major Component, but which is not part of that Major Component, and (b)\nserves only to enable use of the work with that Major Component, or to implement\na Standard Interface for which an implementation is available to the public\nin source code form. A “Major Component”, in this context, means a major essential\ncomponent (kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to produce\nthe work, or an object code interpreter used to run it.\n\nThe “Corresponding Source” for a work in object code form means all the source\ncode needed to generate, install, and (for an executable work) run the object\ncode and to modify the work, including scripts to control those activities.\nHowever, it does not include the work's System Libraries, or general-purpose\ntools or generally available free programs which are used unmodified in performing\nthose activities but which are not part of the work. For example, Corresponding\nSource includes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically linked\nsubprograms that the work is specifically designed to require, such as by\nintimate data communication or control flow between those subprograms and\nother parts of the work.\n\nThe Corresponding Source need not include anything that users can regenerate\nautomatically from other parts of the Corresponding Source.\n\nThe Corresponding Source for a work in source code form is that same work.\n\n2. Basic Permissions.\nAll rights granted under this License are granted for the term of copyright\non the Program, and are irrevocable provided the stated conditions are met.\nThis License explicitly affirms your unlimited permission to run the unmodified\nProgram. The output from running a covered work is covered by this License\nonly if the output, given its content, constitutes a covered work. This License\nacknowledges your rights of fair use or other equivalent, as provided by copyright\nlaw.\n\nYou may make, run and propagate covered works that you do not convey, without\nconditions so long as your license otherwise remains in force. You may convey\ncovered works to others for the sole purpose of having them make modifications\nexclusively for you, or provide you with facilities for running those works,\nprovided that you comply with the terms of this License in conveying all material\nfor which you do not control copyright. Those thus making or running the covered\nworks for you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of your copyrighted\nmaterial outside their relationship with you.\n\nConveying under any other circumstances is permitted solely under the conditions\nstated below. Sublicensing is not allowed; section 10 makes it unnecessary.\n\n3. Protecting Users' Legal Rights From Anti-Circumvention Law.\nNo covered work shall be deemed part of an effective technological measure\nunder any applicable law fulfilling obligations under article 11 of the WIPO\ncopyright treaty adopted on 20 December 1996, or similar laws prohibiting\nor restricting circumvention of such measures.\n\nWhen you convey a covered work, you waive any legal power to forbid circumvention\nof technological measures to the extent such circumvention is effected by\nexercising rights under this License with respect to the covered work, and\nyou disclaim any intention to limit operation or modification of the work\nas a means of enforcing, against the work's users, your or third parties'\nlegal rights to forbid circumvention of technological measures.\n\n4. Conveying Verbatim Copies.\nYou may convey verbatim copies of the Program's source code as you receive\nit, in any medium, provided that you conspicuously and appropriately publish\non each copy an appropriate copyright notice; keep intact all notices stating\nthat this License and any non-permissive terms added in accord with section\n7 apply to the code; keep intact all notices of the absence of any warranty;\nand give all recipients a copy of this License along with the Program.\n\nYou may charge any price or no price for each copy that you convey, and you\nmay offer support or warranty protection for a fee.\n\n5. Conveying Modified Source Versions.\nYou may convey a work based on the Program, or the modifications to produce\nit from the Program, in the form of source code under the terms of section\n4, provided that you also meet all of these conditions:\n\na) The work must carry prominent notices stating that you modified it, and\ngiving a relevant date.\n\nb) The work must carry prominent notices stating that it is released under\nthis License and any conditions added under section 7. This requirement modifies\nthe requirement in section 4 to “keep intact all notices”.\n\nc) You must license the entire work, as a whole, under this License to anyone\nwho comes into possession of a copy. This License will therefore apply, along\nwith any applicable section 7 additional terms, to the whole of the work,\nand all its parts, regardless of how they are packaged. This License gives\nno permission to license the work in any other way, but it does not invalidate\nsuch permission if you have separately received it.\n\nd) If the work has interactive user interfaces, each must display Appropriate\nLegal Notices; however, if the Program has interactive interfaces that do\nnot display Appropriate Legal Notices, your work need not make them do so.\n\nA compilation of a covered work with other separate and independent works,\nwhich are not by their nature extensions of the covered work, and which are\nnot combined with it such as to form a larger program, in or on a volume of\na storage or distribution medium, is called an “aggregate” if the compilation\nand its resulting copyright are not used to limit the access or legal rights\nof the compilation's users beyond what the individual works permit. Inclusion\nof a covered work in an aggregate does not cause this License to apply to\nthe other parts of the aggregate.\n\n6. Conveying Non-Source Forms.\nYou may convey a covered work in object code form under the terms of sections\n4 and 5, provided that you also convey the machine-readable Corresponding\nSource under the terms of this License, in one of these ways:\n\na) Convey the object code in, or embodied in, a physical product (including\na physical distribution medium), accompanied by the Corresponding Source fixed\non a durable physical medium customarily used for software interchange.\n\nb) Convey the object code in, or embodied in, a physical product (including\na physical distribution medium), accompanied by a written offer, valid for\nat least three years and valid for as long as you offer spare parts or customer\nsupport for that product model, to give anyone who possesses the object code\neither (1) a copy of the Corresponding Source for all the software in the\nproduct that is covered by this License, on a durable physical medium customarily\nused for software interchange, for a price no more than your reasonable cost\nof physically performing this conveying of source, or (2) access to copy the\nCorresponding Source from a network server at no charge.\n\nc) Convey individual copies of the object code with a copy of the written\noffer to provide the Corresponding Source. This alternative is allowed only\noccasionally and noncommercially, and only if you received the object code\nwith such an offer, in accord with subsection 6b.\n\nd) Convey the object code by offering access from a designated place (gratis\nor for a charge), and offer equivalent access to the Corresponding Source\nin the same way through the same place at no further charge. You need not\nrequire recipients to copy the Corresponding Source along with the object\ncode. If the place to copy the object code is a network server, the Corresponding\nSource may be on a different server (operated by you or a third party) that\nsupports equivalent copying facilities, provided you maintain clear directions\nnext to the object code saying where to find the Corresponding Source. Regardless\nof what server hosts the Corresponding Source, you remain obligated to ensure\nthat it is available for as long as needed to satisfy these requirements.\n\ne) Convey the object code using peer-to-peer transmission, provided you inform\nother peers where the object code and Corresponding Source of the work are\nbeing offered to the general public at no charge under subsection 6d.\n\nA separable portion of the object code, whose source code is excluded from\nthe Corresponding Source as a System Library, need not be included in conveying\nthe object code work.\n\nA “User Product” is either (1) a “consumer product”, which means any tangible\npersonal property which is normally used for personal, family, or household\npurposes, or (2) anything designed or sold for incorporation into a dwelling.\nIn determining whether a product is a consumer product, doubtful cases shall\nbe resolved in favor of coverage. For a particular product received by a particular\nuser, “normally used” refers to a typical or common use of that class of product,\nregardless of the status of the particular user or of the way in which the\nparticular user actually uses, or expects or is expected to use, the product.\nA product is a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent the\nonly significant mode of use of the product.\n\n“Installation Information” for a User Product means any methods, procedures,\nauthorization keys, or other information required to install and execute modified\nversions of a covered work in that User Product from a modified version of\nits Corresponding Source. The information must suffice to ensure that the\ncontinued functioning of the modified object code is in no case prevented\nor interfered with solely because modification has been made.\n\nIf you convey an object code work under this section in, or with, or specifically\nfor use in, a User Product, and the conveying occurs as part of a transaction\nin which the right of possession and use of the User Product is transferred\nto the recipient in perpetuity or for a fixed term (regardless of how the\ntransaction is characterized), the Corresponding Source conveyed under this\nsection must be accompanied by the Installation Information. But this requirement\ndoes not apply if neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has been installed\nin ROM).\n\nThe requirement to provide Installation Information does not include a requirement\nto continue to provide support service, warranty, or updates for a work that\nhas been modified or installed by the recipient, or for the User Product in\nwhich it has been modified or installed. Access to a network may be denied\nwhen the modification itself materially and adversely affects the operation\nof the network or violates the rules and protocols for communication across\nthe network.\n\nCorresponding Source conveyed, and Installation Information provided, in accord\nwith this section must be in a format that is publicly documented (and with\nan implementation available to the public in source code form), and must require\nno special password or key for unpacking, reading or copying.\n\n7. Additional Terms.\n“Additional permissions” are terms that supplement the terms of this License\nby making exceptions from one or more of its conditions. Additional permissions\nthat are applicable to the entire Program shall be treated as though they\nwere included in this License, to the extent that they are valid under applicable\nlaw. If additional permissions apply only to part of the Program, that part\nmay be used separately under those permissions, but the entire Program remains\ngoverned by this License without regard to the additional permissions.\n\nWhen you convey a copy of a covered work, you may at your option remove any\nadditional permissions from that copy, or from any part of it. (Additional\npermissions may be written to require their own removal in certain cases when\nyou modify the work.) You may place additional permissions on material, added\nby you to a covered work, for which you have or can give appropriate copyright\npermission.\n\nNotwithstanding any other provision of this License, for material you add\nto a covered work, you may (if authorized by the copyright holders of that\nmaterial) supplement the terms of this License with terms:\n\na) Disclaiming warranty or limiting liability differently from the terms of\nsections 15 and 16 of this License; or\n\nb) Requiring preservation of specified reasonable legal notices or author\nattributions in that material or in the Appropriate Legal Notices displayed\nby works containing it; or\n\nc) Prohibiting misrepresentation of the origin of that material, or requiring\nthat modified versions of such material be marked in reasonable ways as different\nfrom the original version; or\n\nd) Limiting the use for publicity purposes of names of licensors or authors\nof the material; or\n\ne) Declining to grant rights under trademark law for use of some trade names,\ntrademarks, or service marks; or\n\nf) Requiring indemnification of licensors and authors of that material by\nanyone who conveys the material (or modified versions of it) with contractual\nassumptions of liability to the recipient, for any liability that these contractual\nassumptions directly impose on those licensors and authors.\n\nAll other non-permissive additional terms are considered “further restrictions”\nwithin the meaning of section 10. If the Program as you received it, or any\npart of it, contains a notice stating that it is governed by this License\nalong with a term that is a further restriction, you may remove that term.\nIf a license document contains a further restriction but permits relicensing\nor conveying under this License, you may add to a covered work material governed\nby the terms of that license document, provided that the further restriction\ndoes not survive such relicensing or conveying.\n\nIf you add terms to a covered work in accord with this section, you must place,\nin the relevant source files, a statement of the additional terms that apply\nto those files, or a notice indicating where to find the applicable terms.\n\nAdditional terms, permissive or non-permissive, may be stated in the form\nof a separately written license, or stated as exceptions; the above requirements\napply either way.\n\n8. Termination.\nYou may not propagate or modify a covered work except as expressly provided\nunder this License. Any attempt otherwise to propagate or modify it is void,\nand will automatically terminate your rights under this License (including\nany patent licenses granted under the third paragraph of section 11).\n\nHowever, if you cease all violation of this License, then your license from\na particular copyright holder is reinstated (a) provisionally, unless and\nuntil the copyright holder explicitly and finally terminates your license,\nand (b) permanently, if the copyright holder fails to notify you of the violation\nby some reasonable means prior to 60 days after the cessation.\n\nMoreover, your license from a particular copyright holder is reinstated permanently\nif the copyright holder notifies you of the violation by some reasonable means,\nthis is the first time you have received notice of violation of this License\n(for any work) from that copyright holder, and you cure the violation prior\nto 30 days after your receipt of the notice.\n\nTermination of your rights under this section does not terminate the licenses\nof parties who have received copies or rights from you under this License.\nIf your rights have been terminated and not permanently reinstated, you do\nnot qualify to receive new licenses for the same material under section 10.\n\n9. Acceptance Not Required for Having Copies.\nYou are not required to accept this License in order to receive or run a copy\nof the Program. Ancillary propagation of a covered work occurring solely as\na consequence of using peer-to-peer transmission to receive a copy likewise\ndoes not require acceptance. However, nothing other than this License grants\nyou permission to propagate or modify any covered work. These actions infringe\ncopyright if you do not accept this License. Therefore, by modifying or propagating\na covered work, you indicate your acceptance of this License to do so.\n\n10. Automatic Licensing of Downstream Recipients.\nEach time you convey a covered work, the recipient automatically receives\na license from the original licensors, to run, modify and propagate that work,\nsubject to this License. You are not responsible for enforcing compliance\nby third parties with this License.\n\nAn “entity transaction” is a transaction transferring control of an organization,\nor substantially all assets of one, or subdividing an organization, or merging\norganizations. If propagation of a covered work results from an entity transaction,\neach party to that transaction who receives a copy of the work also receives\nwhatever licenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the Corresponding\nSource of the work from the predecessor in interest, if the predecessor has\nit or can get it with reasonable efforts.\n\nYou may not impose any further restrictions on the exercise of the rights\ngranted or affirmed under this License. For example, you may not impose a\nlicense fee, royalty, or other charge for exercise of rights granted under\nthis License, and you may not initiate litigation (including a cross-claim\nor counterclaim in a lawsuit) alleging that any patent claim is infringed\nby making, using, selling, offering for sale, or importing the Program or\nany portion of it.\n\n11. Patents.\nA “contributor” is a copyright holder who authorizes use under this License\nof the Program or a work on which the Program is based. The work thus licensed\nis called the contributor's “contributor version”.\n\nA contributor's “essential patent claims” are all patent claims owned or controlled\nby the contributor, whether already acquired or hereafter acquired, that would\nbe infringed by some manner, permitted by this License, of making, using,\nor selling its contributor version, but do not include claims that would be\ninfringed only as a consequence of further modification of the contributor\nversion. For purposes of this definition, “control” includes the right to\ngrant patent sublicenses in a manner consistent with the requirements of this\nLicense.\n\nEach contributor grants you a non-exclusive, worldwide, royalty-free patent\nlicense under the contributor's essential patent claims, to make, use, sell,\noffer for sale, import and otherwise run, modify and propagate the contents\nof its contributor version.\n\nIn the following three paragraphs, a “patent license” is any express agreement\nor commitment, however denominated, not to enforce a patent (such as an express\npermission to practice a patent or covenant not to sue for patent infringement).\nTo “grant” such a patent license to a party means to make such an agreement\nor commitment not to enforce a patent against the party.\n\nIf you convey a covered work, knowingly relying on a patent license, and the\nCorresponding Source of the work is not available for anyone to copy, free\nof charge and under the terms of this License, through a publicly available\nnetwork server or other readily accessible means, then you must either (1)\ncause the Corresponding Source to be so available, or (2) arrange to deprive\nyourself of the benefit of the patent license for this particular work, or\n(3) arrange, in a manner consistent with the requirements of this License,\nto extend the patent license to downstream recipients. “Knowingly relying”\nmeans you have actual knowledge that, but for the patent license, your conveying\nthe covered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that country\nthat you have reason to believe are valid.\n\nIf, pursuant to or in connection with a single transaction or arrangement,\nyou convey, or propagate by procuring conveyance of, a covered work, and grant\na patent license to some of the parties receiving the covered work authorizing\nthem to use, propagate, modify or convey a specific copy of the covered work,\nthen the patent license you grant is automatically extended to all recipients\nof the covered work and works based on it.\n\nA patent license is “discriminatory” if it does not include within the scope\nof its coverage, prohibits the exercise of, or is conditioned on the non-exercise\nof one or more of the rights that are specifically granted under this License.\nYou may not convey a covered work if you are a party to an arrangement with\na third party that is in the business of distributing software, under which\nyou make payment to the third party based on the extent of your activity of\nconveying the work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory patent\nlicense (a) in connection with copies of the covered work conveyed by you\n(or copies made from those copies), or (b) primarily for and in connection\nwith specific products or compilations that contain the covered work, unless\nyou entered into that arrangement, or that patent license was granted, prior\nto 28 March 2007.\n\nNothing in this License shall be construed as excluding or limiting any implied\nlicense or other defenses to infringement that may otherwise be available\nto you under applicable patent law.\n\n12. No Surrender of Others' Freedom.\nIf conditions are imposed on you (whether by court order, agreement or otherwise)\nthat contradict the conditions of this License, they do not excuse you from\nthe conditions of this License. If you cannot convey a covered work so as\nto satisfy simultaneously your obligations under this License and any other\npertinent obligations, then as a consequence you may not convey it at all.\nFor example, if you agree to terms that obligate you to collect a royalty\nfor further conveying from those to whom you convey the Program, the only\nway you could satisfy both those terms and this License would be to refrain\nentirely from conveying the Program.\n\n13. Use with the GNU Affero General Public License.\nNotwithstanding any other provision of this License, you have permission to\nlink or combine any covered work with a work licensed under version 3 of the\nGNU Affero General Public License into a single combined work, and to convey\nthe resulting work. The terms of this License will continue to apply to the\npart which is the covered work, but the special requirements of the GNU Affero\nGeneral Public License, section 13, concerning interaction through a network\nwill apply to the combination as such.\n\n14. Revised Versions of this License.\nThe Free Software Foundation may publish revised and/or new versions of the\nGNU General Public License from time to time. Such new versions will be similar\nin spirit to the present version, but may differ in detail to address new\nproblems or concerns.\n\nEach version is given a distinguishing version number. If the Program specifies\nthat a certain numbered version of the GNU General Public License “or any\nlater version” applies to it, you have the option of following the terms and\nconditions either of that numbered version or of any later version published\nby the Free Software Foundation. If the Program does not specify a version\nnumber of the GNU General Public License, you may choose any version ever\npublished by the Free Software Foundation.\n\nIf the Program specifies that a proxy can decide which future versions of\nthe GNU General Public License can be used, that proxy's public statement\nof acceptance of a version permanently authorizes you to choose that version\nfor the Program.\n\nLater license versions may give you additional or different permissions. However,\nno additional obligations are imposed on any author or copyright holder as\na result of your choosing to follow a later version.\n\n15. Disclaimer of Warranty.\nTHERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE\nLAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\nOTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER\nEXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM\nPROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR\nCORRECTION.\n\n16. Limitation of Liability.\nIN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL\nANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM\nAS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,\nINCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO\nUSE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED\nINACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE\nPROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER\nPARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n17. Interpretation of Sections 15 and 16.\nIf the disclaimer of warranty and limitation of liability provided above cannot\nbe given local legal effect according to their terms, reviewing courts shall\napply local law that most closely approximates an absolute waiver of all civil\nliability in connection with the Program, unless a warranty or assumption\nof liability accompanies a copy of the Program in return for a fee.\n\nEND OF TERMS AND CONDITIONS\n\nHow to Apply These Terms to Your New Programs\n\nIf you develop a new program, and you want it to be of the greatest possible\nuse to the public, the best way to achieve this is to make it free software\nwhich everyone can redistribute and change under these terms.\n\nTo do so, attach the following notices to the program. It is safest to attach\nthem to the start of each source file to most effectively state the exclusion\nof warranty; and each file should have at least the “copyright” line and a\npointer to where the full notice is found.\n\n     <one line to give the program's name and a brief idea of what it does.>\n     Copyright (C) <year>  <name of author>\n\nThis program is free software: you can redistribute it and/or modify it under\nthe terms of the GNU General Public License as published by the Free Software\nFoundation, either version 3 of the License, or (at your option) any later\nversion.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\nFOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with\nthis program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\nIf the program does terminal interaction, make it output a short notice like\nthis when it starts in an interactive mode:\n\n     <program>  Copyright (C) <year>  <name of author>\n     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\nThis is free software, and you are welcome to redistribute it under certain\nconditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands might\nbe different; for a GUI interface, you would use an “about box”.\n\nYou should also get your employer (if you work as a programmer) or school,\nif any, to sign a “copyright disclaimer” for the program, if necessary. For\nmore information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.\n\nThe GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you may\nconsider it more useful to permit linking proprietary applications with the\nlibrary. If this is what you want to do, use the GNU Lesser General Public\nLicense instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "licenses/HIDAPI-orig.txt",
    "content": " HIDAPI - Multi-Platform library for\n communication with HID devices.\n\n Copyright 2009, Alan Ott, Signal 11 Software.\n All Rights Reserved.\n \n This software may be used by anyone for any reason so\n long as the copyright notice in the source files\n remains intact.\n"
  },
  {
    "path": "licenses/ISC.txt",
    "content": "ISC License:\n\nCopyright (c) 2004-2010 by Internet Systems Consortium, Inc. (\"ISC\")\nCopyright (c) 1995-2003 by Internet Software Consortium\n\nPermission to use, copy, modify, and/or distribute this software for any purpose\nwith or without fee is hereby granted, provided that the above copyright notice\nand this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD\nTO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.\nIN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL\nDAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\nWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING\nOUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n"
  },
  {
    "path": "licenses/Info-ZIP.txt",
    "content": "This is version 2007-Mar-4 of the Info-ZIP license.\nThe definitive version of this document should be available at\nftp://ftp.info-zip.org/pub/infozip/license.html indefinitely and\na copy at http://www.info-zip.org/pub/infozip/license.html.\n\n\nCopyright (c) 1990-2007 Info-ZIP.  All rights reserved.\n\nFor the purposes of this copyright and license, \"Info-ZIP\" is defined as\nthe following set of individuals:\n\n   Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois,\n   Jean-loup Gailly, Hunter Goatley, Ed Gordon, Ian Gorman, Chris Herborth,\n   Dirk Haase, Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz,\n   David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko,\n   Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs,\n   Kai Uwe Rommel, Steve Salisbury, Dave Smith, Steven M. Schweda,\n   Christian Spieler, Cosmin Truta, Antoine Verheijen, Paul von Behren,\n   Rich Wales, Mike White.\n\nThis software is provided \"as is,\" without warranty of any kind, express\nor implied.  In no event shall Info-ZIP or its contributors be held liable\nfor any direct, indirect, incidental, special or consequential damages\narising out of the use of or inability to use this software.\n\nPermission is granted to anyone to use this software for any purpose,\nincluding commercial applications, and to alter it and redistribute it\nfreely, subject to the above disclaimer and the following restrictions:\n\n    1. Redistributions of source code (in whole or in part) must retain\n       the above copyright notice, definition, disclaimer, and this list\n       of conditions.\n\n    2. Redistributions in binary form (compiled executables and libraries)\n       must reproduce the above copyright notice, definition, disclaimer,\n       and this list of conditions in documentation and/or other materials\n       provided with the distribution.  The sole exception to this condition\n       is redistribution of a standard UnZipSFX binary (including SFXWiz) as\n       part of a self-extracting archive; that is permitted without inclusion\n       of this license, as long as the normal SFX banner has not been removed\n       from the binary or disabled.\n\n    3. Altered versions--including, but not limited to, ports to new operating\n       systems, existing ports with new graphical interfaces, versions with\n       modified or added functionality, and dynamic, shared, or static library\n       versions not from Info-ZIP--must be plainly marked as such and must not\n       be misrepresented as being the original source or, if binaries,\n       compiled from the original source.  Such altered versions also must not\n       be misrepresented as being Info-ZIP releases--including, but not\n       limited to, labeling of the altered versions with the names \"Info-ZIP\"\n       (or any variation thereof, including, but not limited to, different\n       capitalizations), \"Pocket UnZip,\" \"WiZ\" or \"MacZip\" without the\n       explicit permission of Info-ZIP.  Such altered versions are further\n       prohibited from misrepresentative use of the Zip-Bugs or Info-ZIP\n       e-mail addresses or the Info-ZIP URL(s), such as to imply Info-ZIP\n       will provide support for the altered versions.\n\n    4. Info-ZIP retains the right to use the names \"Info-ZIP,\" \"Zip,\" \"UnZip,\"\n       \"UnZipSFX,\" \"WiZ,\" \"Pocket UnZip,\" \"Pocket Zip,\" and \"MacZip\" for its\n       own source and binary releases.\n"
  },
  {
    "path": "licenses/LGPL-2.0-only.txt",
    "content": "GNU LIBRARY GENERAL PUBLIC LICENSE\n\nVersion 2, June 1991\n\nCopyright (C) 1991 Free Software Foundation, Inc.\n51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA\n\nEveryone is permitted to copy and distribute verbatim copies of this license\ndocument, but changing it is not allowed.\n\n[This is the first released version of the library GPL.  It is numbered 2\nbecause it goes with version 2 of the ordinary GPL.]\n\nPreamble\n\nThe licenses for most software are designed to take away your freedom to share\nand change it. By contrast, the GNU General Public Licenses are intended to\nguarantee your freedom to share and change free software--to make sure the\nsoftware is free for all its users.\n\nThis license, the Library General Public License, applies to some specially\ndesignated Free Software Foundation software, and to any other libraries whose\nauthors decide to use it. You can use it for your libraries, too.\n\nWhen we speak of free software, we are referring to freedom, not price. Our\nGeneral Public Licenses are designed to make sure that you have the freedom\nto distribute copies of free software (and charge for this service if you\nwish), that you receive source code or can get it if you want it, that you\ncan change the software or use pieces of it in new free programs; and that\nyou know you can do these things.\n\nTo protect your rights, we need to make restrictions that forbid anyone to\ndeny you these rights or to ask you to surrender the rights. These restrictions\ntranslate to certain responsibilities for you if you distribute copies of\nthe library, or if you modify it.\n\nFor example, if you distribute copies of the library, whether gratis or for\na fee, you must give the recipients all the rights that we gave you. You must\nmake sure that they, too, receive or can get the source code. If you link\na program with the library, you must provide complete object files to the\nrecipients so that they can relink them with the library, after making changes\nto the library and recompiling it. And you must show them these terms so they\nknow their rights.\n\nOur method of protecting your rights has two steps: (1) copyright the library,\nand (2) offer you this license which gives you legal permission to copy, distribute\nand/or modify the library.\n\nAlso, for each distributor's protection, we want to make certain that everyone\nunderstands that there is no warranty for this free library. If the library\nis modified by someone else and passed on, we want its recipients to know\nthat what they have is not the original version, so that any problems introduced\nby others will not reflect on the original authors' reputations.\n\nFinally, any free program is threatened constantly by software patents. We\nwish to avoid the danger that companies distributing free software will individually\nobtain patent licenses, thus in effect transforming the program into proprietary\nsoftware. To prevent this, we have made it clear that any patent must be licensed\nfor everyone's free use or not licensed at all.\n\nMost GNU software, including some libraries, is covered by the ordinary GNU\nGeneral Public License, which was designed for utility programs. This license,\nthe GNU Library General Public License, applies to certain designated libraries.\nThis license is quite different from the ordinary one; be sure to read it\nin full, and don't assume that anything in it is the same as in the ordinary\nlicense.\n\nThe reason we have a separate public license for some libraries is that they\nblur the distinction we usually make between modifying or adding to a program\nand simply using it. Linking a program with a library, without changing the\nlibrary, is in some sense simply using the library, and is analogous to running\na utility program or application program. However, in a textual and legal\nsense, the linked executable is a combined work, a derivative of the original\nlibrary, and the ordinary General Public License treats it as such.\n\nBecause of this blurred distinction, using the ordinary General Public License\nfor libraries did not effectively promote software sharing, because most developers\ndid not use the libraries. We concluded that weaker conditions might promote\nsharing better.\n\nHowever, unrestricted linking of non-free programs would deprive the users\nof those programs of all benefit from the free status of the libraries themselves.\nThis Library General Public License is intended to permit developers of non-free\nprograms to use free libraries, while preserving your freedom as a user of\nsuch programs to change the free libraries that are incorporated in them.\n(We have not seen how to achieve this as regards changes in header files,\nbut we have achieved it as regards changes in the actual functions of the\nLibrary.) The hope is that this will lead to faster development of free libraries.\n\nThe precise terms and conditions for copying, distribution and modification\nfollow. Pay close attention to the difference between a \"work based on the\nlibrary\" and a \"work that uses the library\". The former contains code derived\nfrom the library, while the latter only works together with the library.\n\nNote that it is possible for a library to be covered by the ordinary General\nPublic License rather than by this special one.\n\nTERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n0. This License Agreement applies to any software library which contains a\nnotice placed by the copyright holder or other authorized party saying it\nmay be distributed under the terms of this Library General Public License\n(also called \"this License\"). Each licensee is addressed as \"you\".\n\nA \"library\" means a collection of software functions and/or data prepared\nso as to be conveniently linked with application programs (which use some\nof those functions and data) to form executables.\n\nThe \"Library\", below, refers to any such software library or work which has\nbeen distributed under these terms. A \"work based on the Library\" means either\nthe Library or any derivative work under copyright law: that is to say, a\nwork containing the Library or a portion of it, either verbatim or with modifications\nand/or translated straightforwardly into another language. (Hereinafter, translation\nis included without limitation in the term \"modification\".)\n\n\"Source code\" for a work means the preferred form of the work for making modifications\nto it. For a library, complete source code means all the source code for all\nmodules it contains, plus any associated interface definition files, plus\nthe scripts used to control compilation and installation of the library.\n\nActivities other than copying, distribution and modification are not covered\nby this License; they are outside its scope. The act of running a program\nusing the Library is not restricted, and output from such a program is covered\nonly if its contents constitute a work based on the Library (independent of\nthe use of the Library in a tool for writing it). Whether that is true depends\non what the Library does and what the program that uses the Library does.\n\n1. You may copy and distribute verbatim copies of the Library's complete source\ncode as you receive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice and disclaimer\nof warranty; keep intact all the notices that refer to this License and to\nthe absence of any warranty; and distribute a copy of this License along with\nthe Library.\n\nYou may charge a fee for the physical act of transferring a copy, and you\nmay at your option offer warranty protection in exchange for a fee.\n\n2. You may modify your copy or copies of the Library or any portion of it,\nthus forming a work based on the Library, and copy and distribute such modifications\nor work under the terms of Section 1 above, provided that you also meet all\nof these conditions:\n\n     a) The modified work must itself be a software library.\n\nb) You must cause the files modified to carry prominent notices stating that\nyou changed the files and the date of any change.\n\nc) You must cause the whole of the work to be licensed at no charge to all\nthird parties under the terms of this License.\n\nd) If a facility in the modified Library refers to a function or a table of\ndata to be supplied by an application program that uses the facility, other\nthan as an argument passed when the facility is invoked, then you must make\na good faith effort to ensure that, in the event an application does not supply\nsuch function or table, the facility still operates, and performs whatever\npart of its purpose remains meaningful.\n\n(For example, a function in a library to compute square roots has a purpose\nthat is entirely well-defined independent of the application. Therefore, Subsection\n2d requires that any application-supplied function or table used by this function\nmust be optional: if the application does not supply it, the square root function\nmust still compute square roots.)\n\nThese requirements apply to the modified work as a whole. If identifiable\nsections of that work are not derived from the Library, and can be reasonably\nconsidered independent and separate works in themselves, then this License,\nand its terms, do not apply to those sections when you distribute them as\nseparate works. But when you distribute the same sections as part of a whole\nwhich is a work based on the Library, the distribution of the whole must be\non the terms of this License, whose permissions for other licensees extend\nto the entire whole, and thus to each and every part regardless of who wrote\nit.\n\nThus, it is not the intent of this section to claim rights or contest your\nrights to work written entirely by you; rather, the intent is to exercise\nthe right to control the distribution of derivative or collective works based\non the Library.\n\nIn addition, mere aggregation of another work not based on the Library with\nthe Library (or with a work based on the Library) on a volume of a storage\nor distribution medium does not bring the other work under the scope of this\nLicense.\n\n3. You may opt to apply the terms of the ordinary GNU General Public License\ninstead of this License to a given copy of the Library. To do this, you must\nalter all the notices that refer to this License, so that they refer to the\nordinary GNU General Public License, version 2, instead of to this License.\n(If a newer version than version 2 of the ordinary GNU General Public License\nhas appeared, then you can specify that version instead if you wish.) Do not\nmake any other change in these notices.\n\nOnce this change is made in a given copy, it is irreversible for that copy,\nso the ordinary GNU General Public License applies to all subsequent copies\nand derivative works made from that copy.\n\nThis option is useful when you wish to copy part of the code of the Library\ninto a program that is not a library.\n\n4. You may copy and distribute the Library (or a portion or derivative of\nit, under Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you accompany it with the complete corresponding\nmachine-readable source code, which must be distributed under the terms of\nSections 1 and 2 above on a medium customarily used for software interchange.\n\nIf distribution of object code is made by offering access to copy from a designated\nplace, then offering equivalent access to copy the source code from the same\nplace satisfies the requirement to distribute the source code, even though\nthird parties are not compelled to copy the source along with the object code.\n\n5. A program that contains no derivative of any portion of the Library, but\nis designed to work with the Library by being compiled or linked with it,\nis called a \"work that uses the Library\". Such a work, in isolation, is not\na derivative work of the Library, and therefore falls outside the scope of\nthis License.\n\nHowever, linking a \"work that uses the Library\" with the Library creates an\nexecutable that is a derivative of the Library (because it contains portions\nof the Library), rather than a \"work that uses the library\". The executable\nis therefore covered by this License. Section 6 states terms for distribution\nof such executables.\n\nWhen a \"work that uses the Library\" uses material from a header file that\nis part of the Library, the object code for the work may be a derivative work\nof the Library even though the source code is not. Whether this is true is\nespecially significant if the work can be linked without the Library, or if\nthe work is itself a library. The threshold for this to be true is not precisely\ndefined by law.\n\nIf such an object file uses only numerical parameters, data structure layouts\nand accessors, and small macros and small inline functions (ten lines or less\nin length), then the use of the object file is unrestricted, regardless of\nwhether it is legally a derivative work. (Executables containing this object\ncode plus portions of the Library will still fall under Section 6.)\n\nOtherwise, if the work is a derivative of the Library, you may distribute\nthe object code for the work under the terms of Section 6. Any executables\ncontaining that work also fall under Section 6, whether or not they are linked\ndirectly with the Library itself.\n\n6. As an exception to the Sections above, you may also compile or link a \"work\nthat uses the Library\" with the Library to produce a work containing portions\nof the Library, and distribute that work under terms of your choice, provided\nthat the terms permit modification of the work for the customer's own use\nand reverse engineering for debugging such modifications.\n\nYou must give prominent notice with each copy of the work that the Library\nis used in it and that the Library and its use are covered by this License.\nYou must supply a copy of this License. If the work during execution displays\ncopyright notices, you must include the copyright notice for the Library among\nthem, as well as a reference directing the user to the copy of this License.\nAlso, you must do one of these things:\n\na) Accompany the work with the complete corresponding machine-readable source\ncode for the Library including whatever changes were used in the work (which\nmust be distributed under Sections 1 and 2 above); and, if the work is an\nexecutable linked with the Library, with the complete machine-readable \"work\nthat uses the Library\", as object code and/or source code, so that the user\ncan modify the Library and then relink to produce a modified executable containing\nthe modified Library. (It is understood that the user who changes the contents\nof definitions files in the Library will not necessarily be able to recompile\nthe application to use the modified definitions.)\n\nb) Accompany the work with a written offer, valid for at least three years,\nto give the same user the materials specified in Subsection 6a, above, for\na charge no more than the cost of performing this distribution.\n\nc) If distribution of the work is made by offering access to copy from a designated\nplace, offer equivalent access to copy the above specified materials from\nthe same place.\n\nd) Verify that the user has already received a copy of these materials or\nthat you have already sent this user a copy.\n\nFor an executable, the required form of the \"work that uses the Library\" must\ninclude any data and utility programs needed for reproducing the executable\nfrom it. However, as a special exception, the source code distributed need\nnot include anything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the operating\nsystem on which the executable runs, unless that component itself accompanies\nthe executable.\n\nIt may happen that this requirement contradicts the license restrictions of\nother proprietary libraries that do not normally accompany the operating system.\nSuch a contradiction means you cannot use both them and the Library together\nin an executable that you distribute.\n\n7. You may place library facilities that are a work based on the Library side-by-side\nin a single library together with other library facilities not covered by\nthis License, and distribute such a combined library, provided that the separate\ndistribution of the work based on the Library and of the other library facilities\nis otherwise permitted, and provided that you do these two things:\n\na) Accompany the combined library with a copy of the same work based on the\nLibrary, uncombined with any other library facilities. This must be distributed\nunder the terms of the Sections above.\n\nb) Give prominent notice with the combined library of the fact that part of\nit is a work based on the Library, and explaining where to find the accompanying\nuncombined form of the same work.\n\n8. You may not copy, modify, sublicense, link with, or distribute the Library\nexcept as expressly provided under this License. Any attempt otherwise to\ncopy, modify, sublicense, link with, or distribute the Library is void, and\nwill automatically terminate your rights under this License. However, parties\nwho have received copies, or rights, from you under this License will not\nhave their licenses terminated so long as such parties remain in full compliance.\n\n9. You are not required to accept this License, since you have not signed\nit. However, nothing else grants you permission to modify or distribute the\nLibrary or its derivative works. These actions are prohibited by law if you\ndo not accept this License. Therefore, by modifying or distributing the Library\n(or any work based on the Library), you indicate your acceptance of this License\nto do so, and all its terms and conditions for copying, distributing or modifying\nthe Library or works based on it.\n\n10. Each time you redistribute the Library (or any work based on the Library),\nthe recipient automatically receives a license from the original licensor\nto copy, distribute, link with or modify the Library subject to these terms\nand conditions. You may not impose any further restrictions on the recipients'\nexercise of the rights granted herein. You are not responsible for enforcing\ncompliance by third parties to this License.\n\n11. If, as a consequence of a court judgment or allegation of patent infringement\nor for any other reason (not limited to patent issues), conditions are imposed\non you (whether by court order, agreement or otherwise) that contradict the\nconditions of this License, they do not excuse you from the conditions of\nthis License. If you cannot distribute so as to satisfy simultaneously your\nobligations under this License and any other pertinent obligations, then as\na consequence you may not distribute the Library at all. For example, if a\npatent license would not permit royalty-free redistribution of the Library\nby all those who receive copies directly or indirectly through you, then the\nonly way you could satisfy both it and this License would be to refrain entirely\nfrom distribution of the Library.\n\nIf any portion of this section is held invalid or unenforceable under any\nparticular circumstance, the balance of the section is intended to apply,\nand the section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any patents\nor other property right claims or to contest validity of any such claims;\nthis section has the sole purpose of protecting the integrity of the free\nsoftware distribution system which is implemented by public license practices.\nMany people have made generous contributions to the wide range of software\ndistributed through that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing to\ndistribute software through any other system and a licensee cannot impose\nthat choice.\n\nThis section is intended to make thoroughly clear what is believed to be a\nconsequence of the rest of this License.\n\n12. If the distribution and/or use of the Library is restricted in certain\ncountries either by patents or by copyrighted interfaces, the original copyright\nholder who places the Library under this License may add an explicit geographical\ndistribution limitation excluding those countries, so that distribution is\npermitted only in or among countries not thus excluded. In such case, this\nLicense incorporates the limitation as if written in the body of this License.\n\n13. The Free Software Foundation may publish revised and/or new versions of\nthe Library General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to address\nnew problems or concerns.\n\nEach version is given a distinguishing version number. If the Library specifies\na version number of this License which applies to it and \"any later version\",\nyou have the option of following the terms and conditions either of that version\nor of any later version published by the Free Software Foundation. If the\nLibrary does not specify a license version number, you may choose any version\never published by the Free Software Foundation.\n\n14. If you wish to incorporate parts of the Library into other free programs\nwhose distribution conditions are incompatible with these, write to the author\nto ask for permission. For software which is copyrighted by the Free Software\nFoundation, write to the Free Software Foundation; we sometimes make exceptions\nfor this. Our decision will be guided by the two goals of preserving the free\nstatus of all derivatives of our free software and of promoting the sharing\nand reuse of software generally.\n\nNO WARRANTY\n\n15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR\nTHE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE\nSTATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY\n\"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,\nBUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\nFOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE\nOF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE\nTHE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE\nOR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA\nOR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES\nOR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH\nHOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\nEND OF TERMS AND CONDITIONS\n\nHow to Apply These Terms to Your New Libraries\n\nIf you develop a new library, and you want it to be of the greatest possible\nuse to the public, we recommend making it free software that everyone can\nredistribute and change. You can do so by permitting redistribution under\nthese terms (or, alternatively, under the terms of the ordinary General Public\nLicense).\n\nTo apply these terms, attach the following notices to the library. It is safest\nto attach them to the start of each source file to most effectively convey\nthe exclusion of warranty; and each file should have at least the \"copyright\"\nline and a pointer to where the full notice is found.\n\n     one line to give the library's name and an idea of what it does.\n     Copyright (C) year  name of author\n\nThis library is free software; you can redistribute it and/or modify it under\nthe terms of the GNU Library General Public License as published by the Free\nSoftware Foundation; either version 2 of the License, or (at your option)\nany later version.\n\nThis library is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\nFOR A PARTICULAR PURPOSE.  See the GNU Library General Public License for\nmore details.\n\nYou should have received a copy of the GNU Library General Public License\nalong with this library; if not, write to the Free Software Foundation, Inc.,\n51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.\n\nAlso add information on how to contact you by electronic and paper mail.\n\nYou should also get your employer (if you work as a programmer) or your school,\nif any, to sign a \"copyright disclaimer\" for the library, if necessary. Here\nis a sample; alter the names:\n\nYoyodyne, Inc., hereby disclaims all copyright interest in\nthe library `Frob' (a library for tweaking knobs) written\nby James Random Hacker.\n\nsignature of Ty Coon, 1 April 1990\nTy Coon, President of Vice\n\nThat's all there is to it!\n"
  },
  {
    "path": "licenses/LGPL-2.0-or-later.txt",
    "content": "GNU LIBRARY GENERAL PUBLIC LICENSE\n\nVersion 2, June 1991\n\nCopyright (C) 1991 Free Software Foundation, Inc.\n51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA\n\nEveryone is permitted to copy and distribute verbatim copies of this license\ndocument, but changing it is not allowed.\n\n[This is the first released version of the library GPL.  It is numbered 2\nbecause it goes with version 2 of the ordinary GPL.]\n\nPreamble\n\nThe licenses for most software are designed to take away your freedom to share\nand change it. By contrast, the GNU General Public Licenses are intended to\nguarantee your freedom to share and change free software--to make sure the\nsoftware is free for all its users.\n\nThis license, the Library General Public License, applies to some specially\ndesignated Free Software Foundation software, and to any other libraries whose\nauthors decide to use it. You can use it for your libraries, too.\n\nWhen we speak of free software, we are referring to freedom, not price. Our\nGeneral Public Licenses are designed to make sure that you have the freedom\nto distribute copies of free software (and charge for this service if you\nwish), that you receive source code or can get it if you want it, that you\ncan change the software or use pieces of it in new free programs; and that\nyou know you can do these things.\n\nTo protect your rights, we need to make restrictions that forbid anyone to\ndeny you these rights or to ask you to surrender the rights. These restrictions\ntranslate to certain responsibilities for you if you distribute copies of\nthe library, or if you modify it.\n\nFor example, if you distribute copies of the library, whether gratis or for\na fee, you must give the recipients all the rights that we gave you. You must\nmake sure that they, too, receive or can get the source code. If you link\na program with the library, you must provide complete object files to the\nrecipients so that they can relink them with the library, after making changes\nto the library and recompiling it. And you must show them these terms so they\nknow their rights.\n\nOur method of protecting your rights has two steps: (1) copyright the library,\nand (2) offer you this license which gives you legal permission to copy, distribute\nand/or modify the library.\n\nAlso, for each distributor's protection, we want to make certain that everyone\nunderstands that there is no warranty for this free library. If the library\nis modified by someone else and passed on, we want its recipients to know\nthat what they have is not the original version, so that any problems introduced\nby others will not reflect on the original authors' reputations.\n\nFinally, any free program is threatened constantly by software patents. We\nwish to avoid the danger that companies distributing free software will individually\nobtain patent licenses, thus in effect transforming the program into proprietary\nsoftware. To prevent this, we have made it clear that any patent must be licensed\nfor everyone's free use or not licensed at all.\n\nMost GNU software, including some libraries, is covered by the ordinary GNU\nGeneral Public License, which was designed for utility programs. This license,\nthe GNU Library General Public License, applies to certain designated libraries.\nThis license is quite different from the ordinary one; be sure to read it\nin full, and don't assume that anything in it is the same as in the ordinary\nlicense.\n\nThe reason we have a separate public license for some libraries is that they\nblur the distinction we usually make between modifying or adding to a program\nand simply using it. Linking a program with a library, without changing the\nlibrary, is in some sense simply using the library, and is analogous to running\na utility program or application program. However, in a textual and legal\nsense, the linked executable is a combined work, a derivative of the original\nlibrary, and the ordinary General Public License treats it as such.\n\nBecause of this blurred distinction, using the ordinary General Public License\nfor libraries did not effectively promote software sharing, because most developers\ndid not use the libraries. We concluded that weaker conditions might promote\nsharing better.\n\nHowever, unrestricted linking of non-free programs would deprive the users\nof those programs of all benefit from the free status of the libraries themselves.\nThis Library General Public License is intended to permit developers of non-free\nprograms to use free libraries, while preserving your freedom as a user of\nsuch programs to change the free libraries that are incorporated in them.\n(We have not seen how to achieve this as regards changes in header files,\nbut we have achieved it as regards changes in the actual functions of the\nLibrary.) The hope is that this will lead to faster development of free libraries.\n\nThe precise terms and conditions for copying, distribution and modification\nfollow. Pay close attention to the difference between a \"work based on the\nlibrary\" and a \"work that uses the library\". The former contains code derived\nfrom the library, while the latter only works together with the library.\n\nNote that it is possible for a library to be covered by the ordinary General\nPublic License rather than by this special one.\n\nTERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n0. This License Agreement applies to any software library which contains a\nnotice placed by the copyright holder or other authorized party saying it\nmay be distributed under the terms of this Library General Public License\n(also called \"this License\"). Each licensee is addressed as \"you\".\n\nA \"library\" means a collection of software functions and/or data prepared\nso as to be conveniently linked with application programs (which use some\nof those functions and data) to form executables.\n\nThe \"Library\", below, refers to any such software library or work which has\nbeen distributed under these terms. A \"work based on the Library\" means either\nthe Library or any derivative work under copyright law: that is to say, a\nwork containing the Library or a portion of it, either verbatim or with modifications\nand/or translated straightforwardly into another language. (Hereinafter, translation\nis included without limitation in the term \"modification\".)\n\n\"Source code\" for a work means the preferred form of the work for making modifications\nto it. For a library, complete source code means all the source code for all\nmodules it contains, plus any associated interface definition files, plus\nthe scripts used to control compilation and installation of the library.\n\nActivities other than copying, distribution and modification are not covered\nby this License; they are outside its scope. The act of running a program\nusing the Library is not restricted, and output from such a program is covered\nonly if its contents constitute a work based on the Library (independent of\nthe use of the Library in a tool for writing it). Whether that is true depends\non what the Library does and what the program that uses the Library does.\n\n1. You may copy and distribute verbatim copies of the Library's complete source\ncode as you receive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice and disclaimer\nof warranty; keep intact all the notices that refer to this License and to\nthe absence of any warranty; and distribute a copy of this License along with\nthe Library.\n\nYou may charge a fee for the physical act of transferring a copy, and you\nmay at your option offer warranty protection in exchange for a fee.\n\n2. You may modify your copy or copies of the Library or any portion of it,\nthus forming a work based on the Library, and copy and distribute such modifications\nor work under the terms of Section 1 above, provided that you also meet all\nof these conditions:\n\n     a) The modified work must itself be a software library.\n\nb) You must cause the files modified to carry prominent notices stating that\nyou changed the files and the date of any change.\n\nc) You must cause the whole of the work to be licensed at no charge to all\nthird parties under the terms of this License.\n\nd) If a facility in the modified Library refers to a function or a table of\ndata to be supplied by an application program that uses the facility, other\nthan as an argument passed when the facility is invoked, then you must make\na good faith effort to ensure that, in the event an application does not supply\nsuch function or table, the facility still operates, and performs whatever\npart of its purpose remains meaningful.\n\n(For example, a function in a library to compute square roots has a purpose\nthat is entirely well-defined independent of the application. Therefore, Subsection\n2d requires that any application-supplied function or table used by this function\nmust be optional: if the application does not supply it, the square root function\nmust still compute square roots.)\n\nThese requirements apply to the modified work as a whole. If identifiable\nsections of that work are not derived from the Library, and can be reasonably\nconsidered independent and separate works in themselves, then this License,\nand its terms, do not apply to those sections when you distribute them as\nseparate works. But when you distribute the same sections as part of a whole\nwhich is a work based on the Library, the distribution of the whole must be\non the terms of this License, whose permissions for other licensees extend\nto the entire whole, and thus to each and every part regardless of who wrote\nit.\n\nThus, it is not the intent of this section to claim rights or contest your\nrights to work written entirely by you; rather, the intent is to exercise\nthe right to control the distribution of derivative or collective works based\non the Library.\n\nIn addition, mere aggregation of another work not based on the Library with\nthe Library (or with a work based on the Library) on a volume of a storage\nor distribution medium does not bring the other work under the scope of this\nLicense.\n\n3. You may opt to apply the terms of the ordinary GNU General Public License\ninstead of this License to a given copy of the Library. To do this, you must\nalter all the notices that refer to this License, so that they refer to the\nordinary GNU General Public License, version 2, instead of to this License.\n(If a newer version than version 2 of the ordinary GNU General Public License\nhas appeared, then you can specify that version instead if you wish.) Do not\nmake any other change in these notices.\n\nOnce this change is made in a given copy, it is irreversible for that copy,\nso the ordinary GNU General Public License applies to all subsequent copies\nand derivative works made from that copy.\n\nThis option is useful when you wish to copy part of the code of the Library\ninto a program that is not a library.\n\n4. You may copy and distribute the Library (or a portion or derivative of\nit, under Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you accompany it with the complete corresponding\nmachine-readable source code, which must be distributed under the terms of\nSections 1 and 2 above on a medium customarily used for software interchange.\n\nIf distribution of object code is made by offering access to copy from a designated\nplace, then offering equivalent access to copy the source code from the same\nplace satisfies the requirement to distribute the source code, even though\nthird parties are not compelled to copy the source along with the object code.\n\n5. A program that contains no derivative of any portion of the Library, but\nis designed to work with the Library by being compiled or linked with it,\nis called a \"work that uses the Library\". Such a work, in isolation, is not\na derivative work of the Library, and therefore falls outside the scope of\nthis License.\n\nHowever, linking a \"work that uses the Library\" with the Library creates an\nexecutable that is a derivative of the Library (because it contains portions\nof the Library), rather than a \"work that uses the library\". The executable\nis therefore covered by this License. Section 6 states terms for distribution\nof such executables.\n\nWhen a \"work that uses the Library\" uses material from a header file that\nis part of the Library, the object code for the work may be a derivative work\nof the Library even though the source code is not. Whether this is true is\nespecially significant if the work can be linked without the Library, or if\nthe work is itself a library. The threshold for this to be true is not precisely\ndefined by law.\n\nIf such an object file uses only numerical parameters, data structure layouts\nand accessors, and small macros and small inline functions (ten lines or less\nin length), then the use of the object file is unrestricted, regardless of\nwhether it is legally a derivative work. (Executables containing this object\ncode plus portions of the Library will still fall under Section 6.)\n\nOtherwise, if the work is a derivative of the Library, you may distribute\nthe object code for the work under the terms of Section 6. Any executables\ncontaining that work also fall under Section 6, whether or not they are linked\ndirectly with the Library itself.\n\n6. As an exception to the Sections above, you may also compile or link a \"work\nthat uses the Library\" with the Library to produce a work containing portions\nof the Library, and distribute that work under terms of your choice, provided\nthat the terms permit modification of the work for the customer's own use\nand reverse engineering for debugging such modifications.\n\nYou must give prominent notice with each copy of the work that the Library\nis used in it and that the Library and its use are covered by this License.\nYou must supply a copy of this License. If the work during execution displays\ncopyright notices, you must include the copyright notice for the Library among\nthem, as well as a reference directing the user to the copy of this License.\nAlso, you must do one of these things:\n\na) Accompany the work with the complete corresponding machine-readable source\ncode for the Library including whatever changes were used in the work (which\nmust be distributed under Sections 1 and 2 above); and, if the work is an\nexecutable linked with the Library, with the complete machine-readable \"work\nthat uses the Library\", as object code and/or source code, so that the user\ncan modify the Library and then relink to produce a modified executable containing\nthe modified Library. (It is understood that the user who changes the contents\nof definitions files in the Library will not necessarily be able to recompile\nthe application to use the modified definitions.)\n\nb) Accompany the work with a written offer, valid for at least three years,\nto give the same user the materials specified in Subsection 6a, above, for\na charge no more than the cost of performing this distribution.\n\nc) If distribution of the work is made by offering access to copy from a designated\nplace, offer equivalent access to copy the above specified materials from\nthe same place.\n\nd) Verify that the user has already received a copy of these materials or\nthat you have already sent this user a copy.\n\nFor an executable, the required form of the \"work that uses the Library\" must\ninclude any data and utility programs needed for reproducing the executable\nfrom it. However, as a special exception, the source code distributed need\nnot include anything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the operating\nsystem on which the executable runs, unless that component itself accompanies\nthe executable.\n\nIt may happen that this requirement contradicts the license restrictions of\nother proprietary libraries that do not normally accompany the operating system.\nSuch a contradiction means you cannot use both them and the Library together\nin an executable that you distribute.\n\n7. You may place library facilities that are a work based on the Library side-by-side\nin a single library together with other library facilities not covered by\nthis License, and distribute such a combined library, provided that the separate\ndistribution of the work based on the Library and of the other library facilities\nis otherwise permitted, and provided that you do these two things:\n\na) Accompany the combined library with a copy of the same work based on the\nLibrary, uncombined with any other library facilities. This must be distributed\nunder the terms of the Sections above.\n\nb) Give prominent notice with the combined library of the fact that part of\nit is a work based on the Library, and explaining where to find the accompanying\nuncombined form of the same work.\n\n8. You may not copy, modify, sublicense, link with, or distribute the Library\nexcept as expressly provided under this License. Any attempt otherwise to\ncopy, modify, sublicense, link with, or distribute the Library is void, and\nwill automatically terminate your rights under this License. However, parties\nwho have received copies, or rights, from you under this License will not\nhave their licenses terminated so long as such parties remain in full compliance.\n\n9. You are not required to accept this License, since you have not signed\nit. However, nothing else grants you permission to modify or distribute the\nLibrary or its derivative works. These actions are prohibited by law if you\ndo not accept this License. Therefore, by modifying or distributing the Library\n(or any work based on the Library), you indicate your acceptance of this License\nto do so, and all its terms and conditions for copying, distributing or modifying\nthe Library or works based on it.\n\n10. Each time you redistribute the Library (or any work based on the Library),\nthe recipient automatically receives a license from the original licensor\nto copy, distribute, link with or modify the Library subject to these terms\nand conditions. You may not impose any further restrictions on the recipients'\nexercise of the rights granted herein. You are not responsible for enforcing\ncompliance by third parties to this License.\n\n11. If, as a consequence of a court judgment or allegation of patent infringement\nor for any other reason (not limited to patent issues), conditions are imposed\non you (whether by court order, agreement or otherwise) that contradict the\nconditions of this License, they do not excuse you from the conditions of\nthis License. If you cannot distribute so as to satisfy simultaneously your\nobligations under this License and any other pertinent obligations, then as\na consequence you may not distribute the Library at all. For example, if a\npatent license would not permit royalty-free redistribution of the Library\nby all those who receive copies directly or indirectly through you, then the\nonly way you could satisfy both it and this License would be to refrain entirely\nfrom distribution of the Library.\n\nIf any portion of this section is held invalid or unenforceable under any\nparticular circumstance, the balance of the section is intended to apply,\nand the section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any patents\nor other property right claims or to contest validity of any such claims;\nthis section has the sole purpose of protecting the integrity of the free\nsoftware distribution system which is implemented by public license practices.\nMany people have made generous contributions to the wide range of software\ndistributed through that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing to\ndistribute software through any other system and a licensee cannot impose\nthat choice.\n\nThis section is intended to make thoroughly clear what is believed to be a\nconsequence of the rest of this License.\n\n12. If the distribution and/or use of the Library is restricted in certain\ncountries either by patents or by copyrighted interfaces, the original copyright\nholder who places the Library under this License may add an explicit geographical\ndistribution limitation excluding those countries, so that distribution is\npermitted only in or among countries not thus excluded. In such case, this\nLicense incorporates the limitation as if written in the body of this License.\n\n13. The Free Software Foundation may publish revised and/or new versions of\nthe Library General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to address\nnew problems or concerns.\n\nEach version is given a distinguishing version number. If the Library specifies\na version number of this License which applies to it and \"any later version\",\nyou have the option of following the terms and conditions either of that version\nor of any later version published by the Free Software Foundation. If the\nLibrary does not specify a license version number, you may choose any version\never published by the Free Software Foundation.\n\n14. If you wish to incorporate parts of the Library into other free programs\nwhose distribution conditions are incompatible with these, write to the author\nto ask for permission. For software which is copyrighted by the Free Software\nFoundation, write to the Free Software Foundation; we sometimes make exceptions\nfor this. Our decision will be guided by the two goals of preserving the free\nstatus of all derivatives of our free software and of promoting the sharing\nand reuse of software generally.\n\nNO WARRANTY\n\n15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR\nTHE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE\nSTATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY\n\"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,\nBUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\nFOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE\nOF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE\nTHE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE\nOR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA\nOR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES\nOR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH\nHOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\nEND OF TERMS AND CONDITIONS\n\nHow to Apply These Terms to Your New Libraries\n\nIf you develop a new library, and you want it to be of the greatest possible\nuse to the public, we recommend making it free software that everyone can\nredistribute and change. You can do so by permitting redistribution under\nthese terms (or, alternatively, under the terms of the ordinary General Public\nLicense).\n\nTo apply these terms, attach the following notices to the library. It is safest\nto attach them to the start of each source file to most effectively convey\nthe exclusion of warranty; and each file should have at least the \"copyright\"\nline and a pointer to where the full notice is found.\n\n     one line to give the library's name and an idea of what it does.\n     Copyright (C) year  name of author\n\nThis library is free software; you can redistribute it and/or modify it under\nthe terms of the GNU Library General Public License as published by the Free\nSoftware Foundation; either version 2 of the License, or (at your option)\nany later version.\n\nThis library is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\nFOR A PARTICULAR PURPOSE.  See the GNU Library General Public License for\nmore details.\n\nYou should have received a copy of the GNU Library General Public License\nalong with this library; if not, write to the Free Software Foundation, Inc.,\n51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.\n\nAlso add information on how to contact you by electronic and paper mail.\n\nYou should also get your employer (if you work as a programmer) or your school,\nif any, to sign a \"copyright disclaimer\" for the library, if necessary. Here\nis a sample; alter the names:\n\nYoyodyne, Inc., hereby disclaims all copyright interest in\nthe library `Frob' (a library for tweaking knobs) written\nby James Random Hacker.\n\nsignature of Ty Coon, 1 April 1990\nTy Coon, President of Vice\n\nThat's all there is to it!\n"
  },
  {
    "path": "licenses/LGPL-2.1-only.txt",
    "content": "GNU LESSER GENERAL PUBLIC LICENSE\n\nVersion 2.1, February 1999\n\nCopyright (C) 1991, 1999 Free Software Foundation, Inc.\n51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\nEveryone is permitted to copy and distribute verbatim copies of this license\ndocument, but changing it is not allowed.\n\n[This is the first released version of the Lesser GPL.  It also counts as\nthe successor of the GNU Library Public License, version 2, hence the version\nnumber 2.1.]\n\nPreamble\n\nThe licenses for most software are designed to take away your freedom to share\nand change it. By contrast, the GNU General Public Licenses are intended to\nguarantee your freedom to share and change free software--to make sure the\nsoftware is free for all its users.\n\nThis license, the Lesser General Public License, applies to some specially\ndesignated software packages--typically libraries--of the Free Software Foundation\nand other authors who decide to use it. You can use it too, but we suggest\nyou first think carefully about whether this license or the ordinary General\nPublic License is the better strategy to use in any particular case, based\non the explanations below.\n\nWhen we speak of free software, we are referring to freedom of use, not price.\nOur General Public Licenses are designed to make sure that you have the freedom\nto distribute copies of free software (and charge for this service if you\nwish); that you receive source code or can get it if you want it; that you\ncan change the software and use pieces of it in new free programs; and that\nyou are informed that you can do these things.\n\nTo protect your rights, we need to make restrictions that forbid distributors\nto deny you these rights or to ask you to surrender these rights. These restrictions\ntranslate to certain responsibilities for you if you distribute copies of\nthe library or if you modify it.\n\nFor example, if you distribute copies of the library, whether gratis or for\na fee, you must give the recipients all the rights that we gave you. You must\nmake sure that they, too, receive or can get the source code. If you link\nother code with the library, you must provide complete object files to the\nrecipients, so that they can relink them with the library after making changes\nto the library and recompiling it. And you must show them these terms so they\nknow their rights.\n\nWe protect your rights with a two-step method: (1) we copyright the library,\nand (2) we offer you this license, which gives you legal permission to copy,\ndistribute and/or modify the library.\n\nTo protect each distributor, we want to make it very clear that there is no\nwarranty for the free library. Also, if the library is modified by someone\nelse and passed on, the recipients should know that what they have is not\nthe original version, so that the original author's reputation will not be\naffected by problems that might be introduced by others.\n\nFinally, software patents pose a constant threat to the existence of any free\nprogram. We wish to make sure that a company cannot effectively restrict the\nusers of a free program by obtaining a restrictive license from a patent holder.\nTherefore, we insist that any patent license obtained for a version of the\nlibrary must be consistent with the full freedom of use specified in this\nlicense.\n\nMost GNU software, including some libraries, is covered by the ordinary GNU\nGeneral Public License. This license, the GNU Lesser General Public License,\napplies to certain designated libraries, and is quite different from the ordinary\nGeneral Public License. We use this license for certain libraries in order\nto permit linking those libraries into non-free programs.\n\nWhen a program is linked with a library, whether statically or using a shared\nlibrary, the combination of the two is legally speaking a combined work, a\nderivative of the original library. The ordinary General Public License therefore\npermits such linking only if the entire combination fits its criteria of freedom.\nThe Lesser General Public License permits more lax criteria for linking other\ncode with the library.\n\nWe call this license the \"Lesser\" General Public License because it does Less\nto protect the user's freedom than the ordinary General Public License. It\nalso provides other free software developers Less of an advantage over competing\nnon-free programs. These disadvantages are the reason we use the ordinary\nGeneral Public License for many libraries. However, the Lesser license provides\nadvantages in certain special circumstances.\n\nFor example, on rare occasions, there may be a special need to encourage the\nwidest possible use of a certain library, so that it becomes a de-facto standard.\nTo achieve this, non-free programs must be allowed to use the library. A more\nfrequent case is that a free library does the same job as widely used non-free\nlibraries. In this case, there is little to gain by limiting the free library\nto free software only, so we use the Lesser General Public License.\n\nIn other cases, permission to use a particular library in non-free programs\nenables a greater number of people to use a large body of free software. For\nexample, permission to use the GNU C Library in non-free programs enables\nmany more people to use the whole GNU operating system, as well as its variant,\nthe GNU/Linux operating system.\n\nAlthough the Lesser General Public License is Less protective of the users'\nfreedom, it does ensure that the user of a program that is linked with the\nLibrary has the freedom and the wherewithal to run that program using a modified\nversion of the Library.\n\nThe precise terms and conditions for copying, distribution and modification\nfollow. Pay close attention to the difference between a \"work based on the\nlibrary\" and a \"work that uses the library\". The former contains code derived\nfrom the library, whereas the latter must be combined with the library in\norder to run.\n\nTERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n0. This License Agreement applies to any software library or other program\nwhich contains a notice placed by the copyright holder or other authorized\nparty saying it may be distributed under the terms of this Lesser General\nPublic License (also called \"this License\"). Each licensee is addressed as\n\"you\".\n\nA \"library\" means a collection of software functions and/or data prepared\nso as to be conveniently linked with application programs (which use some\nof those functions and data) to form executables.\n\nThe \"Library\", below, refers to any such software library or work which has\nbeen distributed under these terms. A \"work based on the Library\" means either\nthe Library or any derivative work under copyright law: that is to say, a\nwork containing the Library or a portion of it, either verbatim or with modifications\nand/or translated straightforwardly into another language. (Hereinafter, translation\nis included without limitation in the term \"modification\".)\n\n\"Source code\" for a work means the preferred form of the work for making modifications\nto it. For a library, complete source code means all the source code for all\nmodules it contains, plus any associated interface definition files, plus\nthe scripts used to control compilation and installation of the library.\n\nActivities other than copying, distribution and modification are not covered\nby this License; they are outside its scope. The act of running a program\nusing the Library is not restricted, and output from such a program is covered\nonly if its contents constitute a work based on the Library (independent of\nthe use of the Library in a tool for writing it). Whether that is true depends\non what the Library does and what the program that uses the Library does.\n\n1. You may copy and distribute verbatim copies of the Library's complete source\ncode as you receive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice and disclaimer\nof warranty; keep intact all the notices that refer to this License and to\nthe absence of any warranty; and distribute a copy of this License along with\nthe Library.\n\nYou may charge a fee for the physical act of transferring a copy, and you\nmay at your option offer warranty protection in exchange for a fee.\n\n2. You may modify your copy or copies of the Library or any portion of it,\nthus forming a work based on the Library, and copy and distribute such modifications\nor work under the terms of Section 1 above, provided that you also meet all\nof these conditions:\n\n     a) The modified work must itself be a software library.\n\nb) You must cause the files modified to carry prominent notices stating that\nyou changed the files and the date of any change.\n\nc) You must cause the whole of the work to be licensed at no charge to all\nthird parties under the terms of this License.\n\nd) If a facility in the modified Library refers to a function or a table of\ndata to be supplied by an application program that uses the facility, other\nthan as an argument passed when the facility is invoked, then you must make\na good faith effort to ensure that, in the event an application does not supply\nsuch function or table, the facility still operates, and performs whatever\npart of its purpose remains meaningful.\n\n(For example, a function in a library to compute square roots has a purpose\nthat is entirely well-defined independent of the application. Therefore, Subsection\n2d requires that any application-supplied function or table used by this function\nmust be optional: if the application does not supply it, the square root function\nmust still compute square roots.)\n\nThese requirements apply to the modified work as a whole. If identifiable\nsections of that work are not derived from the Library, and can be reasonably\nconsidered independent and separate works in themselves, then this License,\nand its terms, do not apply to those sections when you distribute them as\nseparate works. But when you distribute the same sections as part of a whole\nwhich is a work based on the Library, the distribution of the whole must be\non the terms of this License, whose permissions for other licensees extend\nto the entire whole, and thus to each and every part regardless of who wrote\nit.\n\nThus, it is not the intent of this section to claim rights or contest your\nrights to work written entirely by you; rather, the intent is to exercise\nthe right to control the distribution of derivative or collective works based\non the Library.\n\nIn addition, mere aggregation of another work not based on the Library with\nthe Library (or with a work based on the Library) on a volume of a storage\nor distribution medium does not bring the other work under the scope of this\nLicense.\n\n3. You may opt to apply the terms of the ordinary GNU General Public License\ninstead of this License to a given copy of the Library. To do this, you must\nalter all the notices that refer to this License, so that they refer to the\nordinary GNU General Public License, version 2, instead of to this License.\n(If a newer version than version 2 of the ordinary GNU General Public License\nhas appeared, then you can specify that version instead if you wish.) Do not\nmake any other change in these notices.\n\nOnce this change is made in a given copy, it is irreversible for that copy,\nso the ordinary GNU General Public License applies to all subsequent copies\nand derivative works made from that copy.\n\nThis option is useful when you wish to copy part of the code of the Library\ninto a program that is not a library.\n\n4. You may copy and distribute the Library (or a portion or derivative of\nit, under Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you accompany it with the complete corresponding\nmachine-readable source code, which must be distributed under the terms of\nSections 1 and 2 above on a medium customarily used for software interchange.\n\nIf distribution of object code is made by offering access to copy from a designated\nplace, then offering equivalent access to copy the source code from the same\nplace satisfies the requirement to distribute the source code, even though\nthird parties are not compelled to copy the source along with the object code.\n\n5. A program that contains no derivative of any portion of the Library, but\nis designed to work with the Library by being compiled or linked with it,\nis called a \"work that uses the Library\". Such a work, in isolation, is not\na derivative work of the Library, and therefore falls outside the scope of\nthis License.\n\nHowever, linking a \"work that uses the Library\" with the Library creates an\nexecutable that is a derivative of the Library (because it contains portions\nof the Library), rather than a \"work that uses the library\". The executable\nis therefore covered by this License. Section 6 states terms for distribution\nof such executables.\n\nWhen a \"work that uses the Library\" uses material from a header file that\nis part of the Library, the object code for the work may be a derivative work\nof the Library even though the source code is not. Whether this is true is\nespecially significant if the work can be linked without the Library, or if\nthe work is itself a library. The threshold for this to be true is not precisely\ndefined by law.\n\nIf such an object file uses only numerical parameters, data structure layouts\nand accessors, and small macros and small inline functions (ten lines or less\nin length), then the use of the object file is unrestricted, regardless of\nwhether it is legally a derivative work. (Executables containing this object\ncode plus portions of the Library will still fall under Section 6.)\n\nOtherwise, if the work is a derivative of the Library, you may distribute\nthe object code for the work under the terms of Section 6. Any executables\ncontaining that work also fall under Section 6, whether or not they are linked\ndirectly with the Library itself.\n\n6. As an exception to the Sections above, you may also combine or link a \"work\nthat uses the Library\" with the Library to produce a work containing portions\nof the Library, and distribute that work under terms of your choice, provided\nthat the terms permit modification of the work for the customer's own use\nand reverse engineering for debugging such modifications.\n\nYou must give prominent notice with each copy of the work that the Library\nis used in it and that the Library and its use are covered by this License.\nYou must supply a copy of this License. If the work during execution displays\ncopyright notices, you must include the copyright notice for the Library among\nthem, as well as a reference directing the user to the copy of this License.\nAlso, you must do one of these things:\n\na) Accompany the work with the complete corresponding machine-readable source\ncode for the Library including whatever changes were used in the work (which\nmust be distributed under Sections 1 and 2 above); and, if the work is an\nexecutable linked with the Library, with the complete machine-readable \"work\nthat uses the Library\", as object code and/or source code, so that the user\ncan modify the Library and then relink to produce a modified executable containing\nthe modified Library. (It is understood that the user who changes the contents\nof definitions files in the Library will not necessarily be able to recompile\nthe application to use the modified definitions.)\n\nb) Use a suitable shared library mechanism for linking with the Library. A\nsuitable mechanism is one that (1) uses at run time a copy of the library\nalready present on the user's computer system, rather than copying library\nfunctions into the executable, and (2) will operate properly with a modified\nversion of the library, if the user installs one, as long as the modified\nversion is interface-compatible with the version that the work was made with.\n\nc) Accompany the work with a written offer, valid for at least three years,\nto give the same user the materials specified in Subsection 6a, above, for\na charge no more than the cost of performing this distribution.\n\nd) If distribution of the work is made by offering access to copy from a designated\nplace, offer equivalent access to copy the above specified materials from\nthe same place.\n\ne) Verify that the user has already received a copy of these materials or\nthat you have already sent this user a copy.\n\nFor an executable, the required form of the \"work that uses the Library\" must\ninclude any data and utility programs needed for reproducing the executable\nfrom it. However, as a special exception, the materials to be distributed\nneed not include anything that is normally distributed (in either source or\nbinary form) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component itself\naccompanies the executable.\n\nIt may happen that this requirement contradicts the license restrictions of\nother proprietary libraries that do not normally accompany the operating system.\nSuch a contradiction means you cannot use both them and the Library together\nin an executable that you distribute.\n\n7. You may place library facilities that are a work based on the Library side-by-side\nin a single library together with other library facilities not covered by\nthis License, and distribute such a combined library, provided that the separate\ndistribution of the work based on the Library and of the other library facilities\nis otherwise permitted, and provided that you do these two things:\n\na) Accompany the combined library with a copy of the same work based on the\nLibrary, uncombined with any other library facilities. This must be distributed\nunder the terms of the Sections above.\n\nb) Give prominent notice with the combined library of the fact that part of\nit is a work based on the Library, and explaining where to find the accompanying\nuncombined form of the same work.\n\n8. You may not copy, modify, sublicense, link with, or distribute the Library\nexcept as expressly provided under this License. Any attempt otherwise to\ncopy, modify, sublicense, link with, or distribute the Library is void, and\nwill automatically terminate your rights under this License. However, parties\nwho have received copies, or rights, from you under this License will not\nhave their licenses terminated so long as such parties remain in full compliance.\n\n9. You are not required to accept this License, since you have not signed\nit. However, nothing else grants you permission to modify or distribute the\nLibrary or its derivative works. These actions are prohibited by law if you\ndo not accept this License. Therefore, by modifying or distributing the Library\n(or any work based on the Library), you indicate your acceptance of this License\nto do so, and all its terms and conditions for copying, distributing or modifying\nthe Library or works based on it.\n\n10. Each time you redistribute the Library (or any work based on the Library),\nthe recipient automatically receives a license from the original licensor\nto copy, distribute, link with or modify the Library subject to these terms\nand conditions. You may not impose any further restrictions on the recipients'\nexercise of the rights granted herein. You are not responsible for enforcing\ncompliance by third parties with this License.\n\n11. If, as a consequence of a court judgment or allegation of patent infringement\nor for any other reason (not limited to patent issues), conditions are imposed\non you (whether by court order, agreement or otherwise) that contradict the\nconditions of this License, they do not excuse you from the conditions of\nthis License. If you cannot distribute so as to satisfy simultaneously your\nobligations under this License and any other pertinent obligations, then as\na consequence you may not distribute the Library at all. For example, if a\npatent license would not permit royalty-free redistribution of the Library\nby all those who receive copies directly or indirectly through you, then the\nonly way you could satisfy both it and this License would be to refrain entirely\nfrom distribution of the Library.\n\nIf any portion of this section is held invalid or unenforceable under any\nparticular circumstance, the balance of the section is intended to apply,\nand the section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any patents\nor other property right claims or to contest validity of any such claims;\nthis section has the sole purpose of protecting the integrity of the free\nsoftware distribution system which is implemented by public license practices.\nMany people have made generous contributions to the wide range of software\ndistributed through that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing to\ndistribute software through any other system and a licensee cannot impose\nthat choice.\n\nThis section is intended to make thoroughly clear what is believed to be a\nconsequence of the rest of this License.\n\n12. If the distribution and/or use of the Library is restricted in certain\ncountries either by patents or by copyrighted interfaces, the original copyright\nholder who places the Library under this License may add an explicit geographical\ndistribution limitation excluding those countries, so that distribution is\npermitted only in or among countries not thus excluded. In such case, this\nLicense incorporates the limitation as if written in the body of this License.\n\n13. The Free Software Foundation may publish revised and/or new versions of\nthe Lesser General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to address\nnew problems or concerns.\n\nEach version is given a distinguishing version number. If the Library specifies\na version number of this License which applies to it and \"any later version\",\nyou have the option of following the terms and conditions either of that version\nor of any later version published by the Free Software Foundation. If the\nLibrary does not specify a license version number, you may choose any version\never published by the Free Software Foundation.\n\n14. If you wish to incorporate parts of the Library into other free programs\nwhose distribution conditions are incompatible with these, write to the author\nto ask for permission. For software which is copyrighted by the Free Software\nFoundation, write to the Free Software Foundation; we sometimes make exceptions\nfor this. Our decision will be guided by the two goals of preserving the free\nstatus of all derivatives of our free software and of promoting the sharing\nand reuse of software generally.\n\nNO WARRANTY\n\n15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR\nTHE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE\nSTATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY\n\"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,\nBUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\nFOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE\nOF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE\nTHE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE\nOR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA\nOR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES\nOR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH\nHOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\nEND OF TERMS AND CONDITIONS\n\nHow to Apply These Terms to Your New Libraries\n\nIf you develop a new library, and you want it to be of the greatest possible\nuse to the public, we recommend making it free software that everyone can\nredistribute and change. You can do so by permitting redistribution under\nthese terms (or, alternatively, under the terms of the ordinary General Public\nLicense).\n\nTo apply these terms, attach the following notices to the library. It is safest\nto attach them to the start of each source file to most effectively convey\nthe exclusion of warranty; and each file should have at least the \"copyright\"\nline and a pointer to where the full notice is found.\n\n     one line to give the library's name and an idea of what it does.\n     Copyright (C) year  name of author\n\nThis library is free software; you can redistribute it and/or modify it under\nthe terms of the GNU Lesser General Public License as published by the Free\nSoftware Foundation; either version 2.1 of the License, or (at your option)\nany later version.\n\nThis library is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\nFOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more\ndetails.\n\nYou should have received a copy of the GNU Lesser General Public License along\nwith this library; if not, write to the Free Software Foundation, Inc., 51\nFranklin Street, Fifth Floor, Boston, MA  02110-1301  USA Also add information\non how to contact you by electronic and paper mail.\n\nYou should also get your employer (if you work as a programmer) or your school,\nif any, to sign a \"copyright disclaimer\" for the library, if necessary. Here\nis a sample; alter the names:\n\nYoyodyne, Inc., hereby disclaims all copyright interest in\nthe library `Frob' (a library for tweaking knobs) written\nby James Random Hacker.\n\nsignature of Ty Coon, 1 April 1990\nTy Coon, President of Vice\nThat's all there is to it!\n"
  },
  {
    "path": "licenses/LGPL-2.1-or-later.txt",
    "content": "GNU LESSER GENERAL PUBLIC LICENSE\n\nVersion 2.1, February 1999\n\nCopyright (C) 1991, 1999 Free Software Foundation, Inc.\n51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n\nEveryone is permitted to copy and distribute verbatim copies of this license\ndocument, but changing it is not allowed.\n\n[This is the first released version of the Lesser GPL.  It also counts as\nthe successor of the GNU Library Public License, version 2, hence the version\nnumber 2.1.]\n\nPreamble\n\nThe licenses for most software are designed to take away your freedom to share\nand change it. By contrast, the GNU General Public Licenses are intended to\nguarantee your freedom to share and change free software--to make sure the\nsoftware is free for all its users.\n\nThis license, the Lesser General Public License, applies to some specially\ndesignated software packages--typically libraries--of the Free Software Foundation\nand other authors who decide to use it. You can use it too, but we suggest\nyou first think carefully about whether this license or the ordinary General\nPublic License is the better strategy to use in any particular case, based\non the explanations below.\n\nWhen we speak of free software, we are referring to freedom of use, not price.\nOur General Public Licenses are designed to make sure that you have the freedom\nto distribute copies of free software (and charge for this service if you\nwish); that you receive source code or can get it if you want it; that you\ncan change the software and use pieces of it in new free programs; and that\nyou are informed that you can do these things.\n\nTo protect your rights, we need to make restrictions that forbid distributors\nto deny you these rights or to ask you to surrender these rights. These restrictions\ntranslate to certain responsibilities for you if you distribute copies of\nthe library or if you modify it.\n\nFor example, if you distribute copies of the library, whether gratis or for\na fee, you must give the recipients all the rights that we gave you. You must\nmake sure that they, too, receive or can get the source code. If you link\nother code with the library, you must provide complete object files to the\nrecipients, so that they can relink them with the library after making changes\nto the library and recompiling it. And you must show them these terms so they\nknow their rights.\n\nWe protect your rights with a two-step method: (1) we copyright the library,\nand (2) we offer you this license, which gives you legal permission to copy,\ndistribute and/or modify the library.\n\nTo protect each distributor, we want to make it very clear that there is no\nwarranty for the free library. Also, if the library is modified by someone\nelse and passed on, the recipients should know that what they have is not\nthe original version, so that the original author's reputation will not be\naffected by problems that might be introduced by others.\n\nFinally, software patents pose a constant threat to the existence of any free\nprogram. We wish to make sure that a company cannot effectively restrict the\nusers of a free program by obtaining a restrictive license from a patent holder.\nTherefore, we insist that any patent license obtained for a version of the\nlibrary must be consistent with the full freedom of use specified in this\nlicense.\n\nMost GNU software, including some libraries, is covered by the ordinary GNU\nGeneral Public License. This license, the GNU Lesser General Public License,\napplies to certain designated libraries, and is quite different from the ordinary\nGeneral Public License. We use this license for certain libraries in order\nto permit linking those libraries into non-free programs.\n\nWhen a program is linked with a library, whether statically or using a shared\nlibrary, the combination of the two is legally speaking a combined work, a\nderivative of the original library. The ordinary General Public License therefore\npermits such linking only if the entire combination fits its criteria of freedom.\nThe Lesser General Public License permits more lax criteria for linking other\ncode with the library.\n\nWe call this license the \"Lesser\" General Public License because it does Less\nto protect the user's freedom than the ordinary General Public License. It\nalso provides other free software developers Less of an advantage over competing\nnon-free programs. These disadvantages are the reason we use the ordinary\nGeneral Public License for many libraries. However, the Lesser license provides\nadvantages in certain special circumstances.\n\nFor example, on rare occasions, there may be a special need to encourage the\nwidest possible use of a certain library, so that it becomes a de-facto standard.\nTo achieve this, non-free programs must be allowed to use the library. A more\nfrequent case is that a free library does the same job as widely used non-free\nlibraries. In this case, there is little to gain by limiting the free library\nto free software only, so we use the Lesser General Public License.\n\nIn other cases, permission to use a particular library in non-free programs\nenables a greater number of people to use a large body of free software. For\nexample, permission to use the GNU C Library in non-free programs enables\nmany more people to use the whole GNU operating system, as well as its variant,\nthe GNU/Linux operating system.\n\nAlthough the Lesser General Public License is Less protective of the users'\nfreedom, it does ensure that the user of a program that is linked with the\nLibrary has the freedom and the wherewithal to run that program using a modified\nversion of the Library.\n\nThe precise terms and conditions for copying, distribution and modification\nfollow. Pay close attention to the difference between a \"work based on the\nlibrary\" and a \"work that uses the library\". The former contains code derived\nfrom the library, whereas the latter must be combined with the library in\norder to run.\n\nTERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n0. This License Agreement applies to any software library or other program\nwhich contains a notice placed by the copyright holder or other authorized\nparty saying it may be distributed under the terms of this Lesser General\nPublic License (also called \"this License\"). Each licensee is addressed as\n\"you\".\n\nA \"library\" means a collection of software functions and/or data prepared\nso as to be conveniently linked with application programs (which use some\nof those functions and data) to form executables.\n\nThe \"Library\", below, refers to any such software library or work which has\nbeen distributed under these terms. A \"work based on the Library\" means either\nthe Library or any derivative work under copyright law: that is to say, a\nwork containing the Library or a portion of it, either verbatim or with modifications\nand/or translated straightforwardly into another language. (Hereinafter, translation\nis included without limitation in the term \"modification\".)\n\n\"Source code\" for a work means the preferred form of the work for making modifications\nto it. For a library, complete source code means all the source code for all\nmodules it contains, plus any associated interface definition files, plus\nthe scripts used to control compilation and installation of the library.\n\nActivities other than copying, distribution and modification are not covered\nby this License; they are outside its scope. The act of running a program\nusing the Library is not restricted, and output from such a program is covered\nonly if its contents constitute a work based on the Library (independent of\nthe use of the Library in a tool for writing it). Whether that is true depends\non what the Library does and what the program that uses the Library does.\n\n1. You may copy and distribute verbatim copies of the Library's complete source\ncode as you receive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice and disclaimer\nof warranty; keep intact all the notices that refer to this License and to\nthe absence of any warranty; and distribute a copy of this License along with\nthe Library.\n\nYou may charge a fee for the physical act of transferring a copy, and you\nmay at your option offer warranty protection in exchange for a fee.\n\n2. You may modify your copy or copies of the Library or any portion of it,\nthus forming a work based on the Library, and copy and distribute such modifications\nor work under the terms of Section 1 above, provided that you also meet all\nof these conditions:\n\n     a) The modified work must itself be a software library.\n\nb) You must cause the files modified to carry prominent notices stating that\nyou changed the files and the date of any change.\n\nc) You must cause the whole of the work to be licensed at no charge to all\nthird parties under the terms of this License.\n\nd) If a facility in the modified Library refers to a function or a table of\ndata to be supplied by an application program that uses the facility, other\nthan as an argument passed when the facility is invoked, then you must make\na good faith effort to ensure that, in the event an application does not supply\nsuch function or table, the facility still operates, and performs whatever\npart of its purpose remains meaningful.\n\n(For example, a function in a library to compute square roots has a purpose\nthat is entirely well-defined independent of the application. Therefore, Subsection\n2d requires that any application-supplied function or table used by this function\nmust be optional: if the application does not supply it, the square root function\nmust still compute square roots.)\n\nThese requirements apply to the modified work as a whole. If identifiable\nsections of that work are not derived from the Library, and can be reasonably\nconsidered independent and separate works in themselves, then this License,\nand its terms, do not apply to those sections when you distribute them as\nseparate works. But when you distribute the same sections as part of a whole\nwhich is a work based on the Library, the distribution of the whole must be\non the terms of this License, whose permissions for other licensees extend\nto the entire whole, and thus to each and every part regardless of who wrote\nit.\n\nThus, it is not the intent of this section to claim rights or contest your\nrights to work written entirely by you; rather, the intent is to exercise\nthe right to control the distribution of derivative or collective works based\non the Library.\n\nIn addition, mere aggregation of another work not based on the Library with\nthe Library (or with a work based on the Library) on a volume of a storage\nor distribution medium does not bring the other work under the scope of this\nLicense.\n\n3. You may opt to apply the terms of the ordinary GNU General Public License\ninstead of this License to a given copy of the Library. To do this, you must\nalter all the notices that refer to this License, so that they refer to the\nordinary GNU General Public License, version 2, instead of to this License.\n(If a newer version than version 2 of the ordinary GNU General Public License\nhas appeared, then you can specify that version instead if you wish.) Do not\nmake any other change in these notices.\n\nOnce this change is made in a given copy, it is irreversible for that copy,\nso the ordinary GNU General Public License applies to all subsequent copies\nand derivative works made from that copy.\n\nThis option is useful when you wish to copy part of the code of the Library\ninto a program that is not a library.\n\n4. You may copy and distribute the Library (or a portion or derivative of\nit, under Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you accompany it with the complete corresponding\nmachine-readable source code, which must be distributed under the terms of\nSections 1 and 2 above on a medium customarily used for software interchange.\n\nIf distribution of object code is made by offering access to copy from a designated\nplace, then offering equivalent access to copy the source code from the same\nplace satisfies the requirement to distribute the source code, even though\nthird parties are not compelled to copy the source along with the object code.\n\n5. A program that contains no derivative of any portion of the Library, but\nis designed to work with the Library by being compiled or linked with it,\nis called a \"work that uses the Library\". Such a work, in isolation, is not\na derivative work of the Library, and therefore falls outside the scope of\nthis License.\n\nHowever, linking a \"work that uses the Library\" with the Library creates an\nexecutable that is a derivative of the Library (because it contains portions\nof the Library), rather than a \"work that uses the library\". The executable\nis therefore covered by this License. Section 6 states terms for distribution\nof such executables.\n\nWhen a \"work that uses the Library\" uses material from a header file that\nis part of the Library, the object code for the work may be a derivative work\nof the Library even though the source code is not. Whether this is true is\nespecially significant if the work can be linked without the Library, or if\nthe work is itself a library. The threshold for this to be true is not precisely\ndefined by law.\n\nIf such an object file uses only numerical parameters, data structure layouts\nand accessors, and small macros and small inline functions (ten lines or less\nin length), then the use of the object file is unrestricted, regardless of\nwhether it is legally a derivative work. (Executables containing this object\ncode plus portions of the Library will still fall under Section 6.)\n\nOtherwise, if the work is a derivative of the Library, you may distribute\nthe object code for the work under the terms of Section 6. Any executables\ncontaining that work also fall under Section 6, whether or not they are linked\ndirectly with the Library itself.\n\n6. As an exception to the Sections above, you may also combine or link a \"work\nthat uses the Library\" with the Library to produce a work containing portions\nof the Library, and distribute that work under terms of your choice, provided\nthat the terms permit modification of the work for the customer's own use\nand reverse engineering for debugging such modifications.\n\nYou must give prominent notice with each copy of the work that the Library\nis used in it and that the Library and its use are covered by this License.\nYou must supply a copy of this License. If the work during execution displays\ncopyright notices, you must include the copyright notice for the Library among\nthem, as well as a reference directing the user to the copy of this License.\nAlso, you must do one of these things:\n\na) Accompany the work with the complete corresponding machine-readable source\ncode for the Library including whatever changes were used in the work (which\nmust be distributed under Sections 1 and 2 above); and, if the work is an\nexecutable linked with the Library, with the complete machine-readable \"work\nthat uses the Library\", as object code and/or source code, so that the user\ncan modify the Library and then relink to produce a modified executable containing\nthe modified Library. (It is understood that the user who changes the contents\nof definitions files in the Library will not necessarily be able to recompile\nthe application to use the modified definitions.)\n\nb) Use a suitable shared library mechanism for linking with the Library. A\nsuitable mechanism is one that (1) uses at run time a copy of the library\nalready present on the user's computer system, rather than copying library\nfunctions into the executable, and (2) will operate properly with a modified\nversion of the library, if the user installs one, as long as the modified\nversion is interface-compatible with the version that the work was made with.\n\nc) Accompany the work with a written offer, valid for at least three years,\nto give the same user the materials specified in Subsection 6a, above, for\na charge no more than the cost of performing this distribution.\n\nd) If distribution of the work is made by offering access to copy from a designated\nplace, offer equivalent access to copy the above specified materials from\nthe same place.\n\ne) Verify that the user has already received a copy of these materials or\nthat you have already sent this user a copy.\n\nFor an executable, the required form of the \"work that uses the Library\" must\ninclude any data and utility programs needed for reproducing the executable\nfrom it. However, as a special exception, the materials to be distributed\nneed not include anything that is normally distributed (in either source or\nbinary form) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component itself\naccompanies the executable.\n\nIt may happen that this requirement contradicts the license restrictions of\nother proprietary libraries that do not normally accompany the operating system.\nSuch a contradiction means you cannot use both them and the Library together\nin an executable that you distribute.\n\n7. You may place library facilities that are a work based on the Library side-by-side\nin a single library together with other library facilities not covered by\nthis License, and distribute such a combined library, provided that the separate\ndistribution of the work based on the Library and of the other library facilities\nis otherwise permitted, and provided that you do these two things:\n\na) Accompany the combined library with a copy of the same work based on the\nLibrary, uncombined with any other library facilities. This must be distributed\nunder the terms of the Sections above.\n\nb) Give prominent notice with the combined library of the fact that part of\nit is a work based on the Library, and explaining where to find the accompanying\nuncombined form of the same work.\n\n8. You may not copy, modify, sublicense, link with, or distribute the Library\nexcept as expressly provided under this License. Any attempt otherwise to\ncopy, modify, sublicense, link with, or distribute the Library is void, and\nwill automatically terminate your rights under this License. However, parties\nwho have received copies, or rights, from you under this License will not\nhave their licenses terminated so long as such parties remain in full compliance.\n\n9. You are not required to accept this License, since you have not signed\nit. However, nothing else grants you permission to modify or distribute the\nLibrary or its derivative works. These actions are prohibited by law if you\ndo not accept this License. Therefore, by modifying or distributing the Library\n(or any work based on the Library), you indicate your acceptance of this License\nto do so, and all its terms and conditions for copying, distributing or modifying\nthe Library or works based on it.\n\n10. Each time you redistribute the Library (or any work based on the Library),\nthe recipient automatically receives a license from the original licensor\nto copy, distribute, link with or modify the Library subject to these terms\nand conditions. You may not impose any further restrictions on the recipients'\nexercise of the rights granted herein. You are not responsible for enforcing\ncompliance by third parties with this License.\n\n11. If, as a consequence of a court judgment or allegation of patent infringement\nor for any other reason (not limited to patent issues), conditions are imposed\non you (whether by court order, agreement or otherwise) that contradict the\nconditions of this License, they do not excuse you from the conditions of\nthis License. If you cannot distribute so as to satisfy simultaneously your\nobligations under this License and any other pertinent obligations, then as\na consequence you may not distribute the Library at all. For example, if a\npatent license would not permit royalty-free redistribution of the Library\nby all those who receive copies directly or indirectly through you, then the\nonly way you could satisfy both it and this License would be to refrain entirely\nfrom distribution of the Library.\n\nIf any portion of this section is held invalid or unenforceable under any\nparticular circumstance, the balance of the section is intended to apply,\nand the section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any patents\nor other property right claims or to contest validity of any such claims;\nthis section has the sole purpose of protecting the integrity of the free\nsoftware distribution system which is implemented by public license practices.\nMany people have made generous contributions to the wide range of software\ndistributed through that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing to\ndistribute software through any other system and a licensee cannot impose\nthat choice.\n\nThis section is intended to make thoroughly clear what is believed to be a\nconsequence of the rest of this License.\n\n12. If the distribution and/or use of the Library is restricted in certain\ncountries either by patents or by copyrighted interfaces, the original copyright\nholder who places the Library under this License may add an explicit geographical\ndistribution limitation excluding those countries, so that distribution is\npermitted only in or among countries not thus excluded. In such case, this\nLicense incorporates the limitation as if written in the body of this License.\n\n13. The Free Software Foundation may publish revised and/or new versions of\nthe Lesser General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to address\nnew problems or concerns.\n\nEach version is given a distinguishing version number. If the Library specifies\na version number of this License which applies to it and \"any later version\",\nyou have the option of following the terms and conditions either of that version\nor of any later version published by the Free Software Foundation. If the\nLibrary does not specify a license version number, you may choose any version\never published by the Free Software Foundation.\n\n14. If you wish to incorporate parts of the Library into other free programs\nwhose distribution conditions are incompatible with these, write to the author\nto ask for permission. For software which is copyrighted by the Free Software\nFoundation, write to the Free Software Foundation; we sometimes make exceptions\nfor this. Our decision will be guided by the two goals of preserving the free\nstatus of all derivatives of our free software and of promoting the sharing\nand reuse of software generally.\n\nNO WARRANTY\n\n15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR\nTHE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE\nSTATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY\n\"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,\nBUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\nFOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE\nOF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE\nTHE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE\nOR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA\nOR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES\nOR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH\nHOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\nEND OF TERMS AND CONDITIONS\n\nHow to Apply These Terms to Your New Libraries\n\nIf you develop a new library, and you want it to be of the greatest possible\nuse to the public, we recommend making it free software that everyone can\nredistribute and change. You can do so by permitting redistribution under\nthese terms (or, alternatively, under the terms of the ordinary General Public\nLicense).\n\nTo apply these terms, attach the following notices to the library. It is safest\nto attach them to the start of each source file to most effectively convey\nthe exclusion of warranty; and each file should have at least the \"copyright\"\nline and a pointer to where the full notice is found.\n\n     one line to give the library's name and an idea of what it does.\n     Copyright (C) year  name of author\n\nThis library is free software; you can redistribute it and/or modify it under\nthe terms of the GNU Lesser General Public License as published by the Free\nSoftware Foundation; either version 2.1 of the License, or (at your option)\nany later version.\n\nThis library is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\nFOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more\ndetails.\n\nYou should have received a copy of the GNU Lesser General Public License along\nwith this library; if not, write to the Free Software Foundation, Inc., 51\nFranklin Street, Fifth Floor, Boston, MA  02110-1301  USA Also add information\non how to contact you by electronic and paper mail.\n\nYou should also get your employer (if you work as a programmer) or your school,\nif any, to sign a \"copyright disclaimer\" for the library, if necessary. Here\nis a sample; alter the names:\n\nYoyodyne, Inc., hereby disclaims all copyright interest in\nthe library `Frob' (a library for tweaking knobs) written\nby James Random Hacker.\n\nsignature of Ty Coon, 1 April 1990\nTy Coon, President of Vice\nThat's all there is to it!\n"
  },
  {
    "path": "licenses/LGPL-3.0-only.txt",
    "content": "GNU LESSER GENERAL PUBLIC LICENSE\nVersion 3, 29 June 2007\n\nCopyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n\nEveryone is permitted to copy and distribute verbatim copies of this license\ndocument, but changing it is not allowed.\n\nThis version of the GNU Lesser General Public License incorporates the terms\nand conditions of version 3 of the GNU General Public License, supplemented\nby the additional permissions listed below.\n\n0. Additional Definitions.\n\nAs used herein, \"this License\" refers to version 3 of the GNU Lesser General\nPublic License, and the \"GNU GPL\" refers to version 3 of the GNU General Public\nLicense.\n\n\"The Library\" refers to a covered work governed by this License, other than\nan Application or a Combined Work as defined below.\n\nAn \"Application\" is any work that makes use of an interface provided by the\nLibrary, but which is not otherwise based on the Library. Defining a subclass\nof a class defined by the Library is deemed a mode of using an interface provided\nby the Library.\n\nA \"Combined Work\" is a work produced by combining or linking an Application\nwith the Library.  The particular version of the Library with which the Combined\nWork was made is also called the \"Linked Version\".\n\nThe \"Minimal Corresponding Source\" for a Combined Work means the Corresponding\nSource for the Combined Work, excluding any source code for portions of the\nCombined Work that, considered in isolation, are based on the Application,\nand not on the Linked Version.\n\nThe \"Corresponding Application Code\" for a Combined Work means the object\ncode and/or source code for the Application, including any data and utility\nprograms needed for reproducing the Combined Work from the Application, but\nexcluding the System Libraries of the Combined Work.\n\n1. Exception to Section 3 of the GNU GPL.\nYou may convey a covered work under sections 3 and 4 of this License without\nbeing bound by section 3 of the GNU GPL.\n\n2. Conveying Modified Versions.\nIf you modify a copy of the Library, and, in your modifications, a facility\nrefers to a function or data to be supplied by an Application that uses the\nfacility (other than as an argument passed when the facility is invoked),\nthen you may convey a copy of the modified version:\n\na) under this License, provided that you make a good faith effort to ensure\nthat, in the event an Application does not supply the function or data, the\nfacility still operates, and performs whatever part of its purpose remains\nmeaningful, or\n\nb) under the GNU GPL, with none of the additional permissions of this License\napplicable to that copy.\n\n3. Object Code Incorporating Material from Library Header Files.\nThe object code form of an Application may incorporate material from a header\nfile that is part of the Library.  You may convey such object code under terms\nof your choice, provided that, if the incorporated material is not limited\nto numerical parameters, data structure layouts and accessors, or small macros,\ninline functions and templates (ten or fewer lines in length), you do both\nof the following:\n\na) Give prominent notice with each copy of the object code that the Library\nis used in it and that the Library and its use are covered by this License.\n\nb) Accompany the object code with a copy of the GNU GPL and this license document.\n\n4. Combined Works.\nYou may convey a Combined Work under terms of your choice that, taken together,\neffectively do not restrict modification of the portions of the Library contained\nin the Combined Work and reverse engineering for debugging such modifications,\nif you also do each of the following:\n\na) Give prominent notice with each copy of the Combined Work that the Library\nis used in it and that the Library and its use are covered by this License.\n\nb) Accompany the Combined Work with a copy of the GNU GPL and this license\ndocument.\n\nc) For a Combined Work that displays copyright notices during execution, include\nthe copyright notice for the Library among these notices, as well as a reference\ndirecting the user to the copies of the GNU GPL and this license document.\n\n     d) Do one of the following:\n\n0) Convey the Minimal Corresponding Source under the terms of this License,\nand the Corresponding Application Code in a form suitable for, and under terms\nthat permit, the user to recombine or relink the Application with a modified\nversion of the Linked Version to produce a modified Combined Work, in the\nmanner specified by section 6 of the GNU GPL for conveying Corresponding Source.\n\n1) Use a suitable shared library mechanism for linking with the Library. \nA suitable mechanism is one that (a) uses at run time a copy of the Library\nalready present on the user's computer system, and (b) will operate properly\nwith a modified version of the Library that is interface-compatible with the\nLinked Version.\n\ne) Provide Installation Information, but only if you would otherwise be required\nto provide such information under section 6 of the GNU GPL, and only to the\nextent that such information is necessary to install and execute a modified\nversion of the Combined Work produced by recombining or relinking the Application\nwith a modified version of the Linked Version. (If you use option 4d0, the\nInstallation Information must accompany the Minimal Corresponding Source and\nCorresponding Application Code. If you use option 4d1, you must provide the\nInstallation Information in the manner specified by section 6 of the GNU GPL\nfor conveying Corresponding Source.)\n\n5. Combined Libraries.\nYou may place library facilities that are a work based on the Library side\nby side in a single library together with other library facilities that are\nnot Applications and are not covered by this License, and convey such a combined\nlibrary under terms of your choice, if you do both of the following:\n\na) Accompany the combined library with a copy of the same work based on the\nLibrary, uncombined with any other library facilities, conveyed under the\nterms of this License.\n\nb) Give prominent notice with the combined library that part of it is a work\nbased on the Library, and explaining where to find the accompanying uncombined\nform of the same work.\n\n6. Revised Versions of the GNU Lesser General Public License.\nThe Free Software Foundation may publish revised and/or new versions of the\nGNU Lesser General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to address\nnew problems or concerns.\n\nEach version is given a distinguishing version number. If the Library as you\nreceived it specifies that a certain numbered version of the GNU Lesser General\nPublic License \"or any later version\" applies to it, you have the option of\nfollowing the terms and conditions either of that published version or of\nany later version published by the Free Software Foundation. If the Library\nas you received it does not specify a version number of the GNU Lesser General\nPublic License, you may choose any version of the GNU Lesser General Public\nLicense ever published by the Free Software Foundation.\n\nIf the Library as you received it specifies that a proxy can decide whether\nfuture versions of the GNU Lesser General Public License shall\napply, that proxy's public statement of acceptance of any version is permanent\nauthorization for you to choose that version for the Library.\n"
  },
  {
    "path": "licenses/LGPL-3.0-or-later.txt",
    "content": "GNU LESSER GENERAL PUBLIC LICENSE\nVersion 3, 29 June 2007\n\nCopyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n\nEveryone is permitted to copy and distribute verbatim copies of this license\ndocument, but changing it is not allowed.\n\nThis version of the GNU Lesser General Public License incorporates the terms\nand conditions of version 3 of the GNU General Public License, supplemented\nby the additional permissions listed below.\n\n0. Additional Definitions.\n\nAs used herein, \"this License\" refers to version 3 of the GNU Lesser General\nPublic License, and the \"GNU GPL\" refers to version 3 of the GNU General Public\nLicense.\n\n\"The Library\" refers to a covered work governed by this License, other than\nan Application or a Combined Work as defined below.\n\nAn \"Application\" is any work that makes use of an interface provided by the\nLibrary, but which is not otherwise based on the Library. Defining a subclass\nof a class defined by the Library is deemed a mode of using an interface provided\nby the Library.\n\nA \"Combined Work\" is a work produced by combining or linking an Application\nwith the Library.  The particular version of the Library with which the Combined\nWork was made is also called the \"Linked Version\".\n\nThe \"Minimal Corresponding Source\" for a Combined Work means the Corresponding\nSource for the Combined Work, excluding any source code for portions of the\nCombined Work that, considered in isolation, are based on the Application,\nand not on the Linked Version.\n\nThe \"Corresponding Application Code\" for a Combined Work means the object\ncode and/or source code for the Application, including any data and utility\nprograms needed for reproducing the Combined Work from the Application, but\nexcluding the System Libraries of the Combined Work.\n\n1. Exception to Section 3 of the GNU GPL.\nYou may convey a covered work under sections 3 and 4 of this License without\nbeing bound by section 3 of the GNU GPL.\n\n2. Conveying Modified Versions.\nIf you modify a copy of the Library, and, in your modifications, a facility\nrefers to a function or data to be supplied by an Application that uses the\nfacility (other than as an argument passed when the facility is invoked),\nthen you may convey a copy of the modified version:\n\na) under this License, provided that you make a good faith effort to ensure\nthat, in the event an Application does not supply the function or data, the\nfacility still operates, and performs whatever part of its purpose remains\nmeaningful, or\n\nb) under the GNU GPL, with none of the additional permissions of this License\napplicable to that copy.\n\n3. Object Code Incorporating Material from Library Header Files.\nThe object code form of an Application may incorporate material from a header\nfile that is part of the Library.  You may convey such object code under terms\nof your choice, provided that, if the incorporated material is not limited\nto numerical parameters, data structure layouts and accessors, or small macros,\ninline functions and templates (ten or fewer lines in length), you do both\nof the following:\n\na) Give prominent notice with each copy of the object code that the Library\nis used in it and that the Library and its use are covered by this License.\n\nb) Accompany the object code with a copy of the GNU GPL and this license document.\n\n4. Combined Works.\nYou may convey a Combined Work under terms of your choice that, taken together,\neffectively do not restrict modification of the portions of the Library contained\nin the Combined Work and reverse engineering for debugging such modifications,\nif you also do each of the following:\n\na) Give prominent notice with each copy of the Combined Work that the Library\nis used in it and that the Library and its use are covered by this License.\n\nb) Accompany the Combined Work with a copy of the GNU GPL and this license\ndocument.\n\nc) For a Combined Work that displays copyright notices during execution, include\nthe copyright notice for the Library among these notices, as well as a reference\ndirecting the user to the copies of the GNU GPL and this license document.\n\n     d) Do one of the following:\n\n0) Convey the Minimal Corresponding Source under the terms of this License,\nand the Corresponding Application Code in a form suitable for, and under terms\nthat permit, the user to recombine or relink the Application with a modified\nversion of the Linked Version to produce a modified Combined Work, in the\nmanner specified by section 6 of the GNU GPL for conveying Corresponding Source.\n\n1) Use a suitable shared library mechanism for linking with the Library. \nA suitable mechanism is one that (a) uses at run time a copy of the Library\nalready present on the user's computer system, and (b) will operate properly\nwith a modified version of the Library that is interface-compatible with the\nLinked Version.\n\ne) Provide Installation Information, but only if you would otherwise be required\nto provide such information under section 6 of the GNU GPL, and only to the\nextent that such information is necessary to install and execute a modified\nversion of the Combined Work produced by recombining or relinking the Application\nwith a modified version of the Linked Version. (If you use option 4d0, the\nInstallation Information must accompany the Minimal Corresponding Source and\nCorresponding Application Code. If you use option 4d1, you must provide the\nInstallation Information in the manner specified by section 6 of the GNU GPL\nfor conveying Corresponding Source.)\n\n5. Combined Libraries.\nYou may place library facilities that are a work based on the Library side\nby side in a single library together with other library facilities that are\nnot Applications and are not covered by this License, and convey such a combined\nlibrary under terms of your choice, if you do both of the following:\n\na) Accompany the combined library with a copy of the same work based on the\nLibrary, uncombined with any other library facilities, conveyed under the\nterms of this License.\n\nb) Give prominent notice with the combined library that part of it is a work\nbased on the Library, and explaining where to find the accompanying uncombined\nform of the same work.\n\n6. Revised Versions of the GNU Lesser General Public License.\nThe Free Software Foundation may publish revised and/or new versions of the\nGNU Lesser General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to address\nnew problems or concerns.\n\nEach version is given a distinguishing version number. If the Library as you\nreceived it specifies that a certain numbered version of the GNU Lesser General\nPublic License \"or any later version\" applies to it, you have the option of\nfollowing the terms and conditions either of that published version or of\nany later version published by the Free Software Foundation. If the Library\nas you received it does not specify a version number of the GNU Lesser General\nPublic License, you may choose any version of the GNU Lesser General Public\nLicense ever published by the Free Software Foundation.\n\nIf the Library as you received it specifies that a proxy can decide whether\nfuture versions of the GNU Lesser General Public License shall\napply, that proxy's public statement of acceptance of any version is permanent\nauthorization for you to choose that version for the Library.\n"
  },
  {
    "path": "licenses/LibPNG2.txt",
    "content": "COPYRIGHT NOTICE, DISCLAIMER, and LICENSE\n=========================================\n\nPNG Reference Library License version 2\n---------------------------------------\n\n * Copyright (c) 1995-2019 The PNG Reference Library Authors.\n * Copyright (c) 2018-2019 Cosmin Truta.\n * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.\n * Copyright (c) 1996-1997 Andreas Dilger.\n * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n\nThe software is supplied \"as is\", without warranty of any kind,\nexpress or implied, including, without limitation, the warranties\nof merchantability, fitness for a particular purpose, title, and\nnon-infringement.  In no event shall the Copyright owners, or\nanyone distributing the software, be liable for any damages or\nother liability, whether in contract, tort or otherwise, arising\nfrom, out of, or in connection with the software, or the use or\nother dealings in the software, even if advised of the possibility\nof such damage.\n\nPermission is hereby granted to use, copy, modify, and distribute\nthis software, or portions hereof, for any purpose, without fee,\nsubject to the following restrictions:\n\n 1. The origin of this software must not be misrepresented; you\n    must not claim that you wrote the original software.  If you\n    use this software in a product, an acknowledgment in the product\n    documentation would be appreciated, but is not required.\n\n 2. Altered source versions must be plainly marked as such, and must\n    not be misrepresented as being the original software.\n\n 3. This Copyright notice may not be removed or altered from any\n    source or altered source distribution.\n\n\nPNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)\n-----------------------------------------------------------------------\n\nlibpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are\nCopyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are\nderived from libpng-1.0.6, and are distributed according to the same\ndisclaimer and license as libpng-1.0.6 with the following individuals\nadded to the list of Contributing Authors:\n\n    Simon-Pierre Cadieux\n    Eric S. Raymond\n    Mans Rullgard\n    Cosmin Truta\n    Gilles Vollant\n    James Yu\n    Mandar Sahastrabuddhe\n    Google Inc.\n    Vadim Barkov\n\nand with the following additions to the disclaimer:\n\n    There is no warranty against interference with your enjoyment of\n    the library or against infringement.  There is no warranty that our\n    efforts or the library will fulfill any of your particular purposes\n    or needs.  This library is provided with all faults, and the entire\n    risk of satisfactory quality, performance, accuracy, and effort is\n    with the user.\n\nSome files in the \"contrib\" directory and some configure-generated\nfiles that are distributed with libpng have other copyright owners, and\nare released under other open source licenses.\n\nlibpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are\nCopyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from\nlibpng-0.96, and are distributed according to the same disclaimer and\nlicense as libpng-0.96, with the following individuals added to the\nlist of Contributing Authors:\n\n    Tom Lane\n    Glenn Randers-Pehrson\n    Willem van Schaik\n\nlibpng versions 0.89, June 1996, through 0.96, May 1997, are\nCopyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,\nand are distributed according to the same disclaimer and license as\nlibpng-0.88, with the following individuals added to the list of\nContributing Authors:\n\n    John Bowler\n    Kevin Bracey\n    Sam Bushell\n    Magnus Holmgren\n    Greg Roelofs\n    Tom Tanner\n\nSome files in the \"scripts\" directory have other copyright owners,\nbut are released under this license.\n\nlibpng versions 0.5, May 1995, through 0.88, January 1996, are\nCopyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n\nFor the purposes of this copyright and license, \"Contributing Authors\"\nis defined as the following set of individuals:\n\n    Andreas Dilger\n    Dave Martindale\n    Guy Eric Schalnat\n    Paul Schmidt\n    Tim Wegner\n\nThe PNG Reference Library is supplied \"AS IS\".  The Contributing\nAuthors and Group 42, Inc. disclaim all warranties, expressed or\nimplied, including, without limitation, the warranties of\nmerchantability and of fitness for any purpose.  The Contributing\nAuthors and Group 42, Inc. assume no liability for direct, indirect,\nincidental, special, exemplary, or consequential damages, which may\nresult from the use of the PNG Reference Library, even if advised of\nthe possibility of such damage.\n\nPermission is hereby granted to use, copy, modify, and distribute this\nsource code, or portions hereof, for any purpose, without fee, subject\nto the following restrictions:\n\n 1. The origin of this source code must not be misrepresented.\n\n 2. Altered versions must be plainly marked as such and must not\n    be misrepresented as being the original source.\n\n 3. This Copyright notice may not be removed or altered from any\n    source or altered source distribution.\n\nThe Contributing Authors and Group 42, Inc. specifically permit,\nwithout fee, and encourage the use of this source code as a component\nto supporting the PNG file format in commercial products.  If you use\nthis source code in a product, acknowledgment is not required but would\nbe appreciated.\n"
  },
  {
    "path": "licenses/MIT.txt",
    "content": "MIT License\n\nCopyright (c) <year> <copyright holders>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is furnished\nto do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\nOR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF\nOR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "licenses/MIT_Modified.txt",
    "content": "The MIT License\n\nCopyright (c) <year> <copyright holders>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "licenses/MPL-1.1.txt",
    "content": "Mozilla Public License Version 1.1\n\n1. Definitions.\n\n1.0.1. \"Commercial Use\" means distribution or otherwise making the Covered\nCode available to a third party.\n\n1.1. \"Contributor\" means each entity that creates or contributes to the creation\nof Modifications.\n\n1.2. \"Contributor Version\" means the combination of the Original Code, prior\nModifications used by a Contributor, and the Modifications made by that particular\nContributor.\n\n1.3. \"Covered Code\" means the Original Code or Modifications or the combination\nof the Original Code and Modifications, in each case including portions thereof.\n\n1.4. \"Electronic Distribution Mechanism\" means a mechanism generally accepted\nin the software development community for the electronic transfer of data.\n\n     1.5. \"Executable\" means Covered Code in any form other than Source Code.\n\n1.6. \"Initial Developer\" means the individual or entity identified as the\nInitial Developer in the Source Code notice required by Exhibit A.\n\n1.7. \"Larger Work\" means a work which combines Covered Code or portions thereof\nwith code not governed by the terms of this License.\n\n     1.8. \"License\" means this document.\n\n1.8.1. \"Licensable\" means having the right to grant, to the maximum extent\npossible, whether at the time of the initial grant or subsequently acquired,\nany and all of the rights conveyed herein.\n\n1.9. \"Modifications\" means any addition to or deletion from the substance\nor structure of either the Original Code or any previous Modifications. When\nCovered Code is released as a series of files, a Modification is:\nAny addition to or deletion from the contents of a file containing Original\nCode or previous Modifications.\nAny new file that contains any part of the Original Code or previous Modifications.\n\n1.10. \"Original Code\" means Source Code of computer software code which is\ndescribed in the Source Code notice required by Exhibit A as Original Code,\nand which, at the time of its release under this License is not already Covered\nCode governed by this License.\n\n1.10.1. \"Patent Claims\" means any patent claim(s), now owned or hereafter\nacquired, including without limitation, method, process, and apparatus claims,\nin any patent Licensable by grantor.\n\n1.11. \"Source Code\" means the preferred form of the Covered Code for making\nmodifications to it, including all modules it contains, plus any associated\ninterface definition files, scripts used to control compilation and installation\nof an Executable, or source code differential comparisons against either the\nOriginal Code or another well known, available Covered Code of the Contributor's\nchoice. The Source Code can be in a compressed or archival form, provided\nthe appropriate decompression or de-archiving software is widely available\nfor no charge.\n\n1.12. \"You\" (or \"Your\") means an individual or a legal entity exercising rights\nunder, and complying with all of the terms of, this License or a future version\nof this License issued under Section 6.1. For legal entities, \"You\" includes\nany entity which controls, is controlled by, or is under common control with\nYou. For purposes of this definition, \"control\" means (a) the power, direct\nor indirect, to cause the direction or management of such entity, whether\nby contract or otherwise, or (b) ownership of more than fifty percent (50%)\nof the outstanding shares or beneficial ownership of such entity.\n\n2. Source Code License.\n\n2.1. The Initial Developer Grant. The Initial Developer hereby grants You\na world-wide, royalty-free, non-exclusive license, subject to third party\nintellectual property claims:\n\na. under intellectual property rights (other than patent or trademark) Licensable\nby Initial Developer to use, reproduce, modify, display, perform, sublicense\nand distribute the Original Code (or portions thereof) with or without Modifications,\nand/or as part of a Larger Work; and\nb. under Patents Claims infringed by the making, using or selling of Original\nCode, to make, have made, use, practice, sell, and offer for sale, and/or\notherwise dispose of the Original Code (or portions thereof).\nc. the licenses granted in this Section 2.1 (a) and (b) are effective on the\ndate Initial Developer first distributes Original Code under the terms of\nthis License.\nd. Notwithstanding Section 2.1 (b) above, no patent license is granted: 1)\nfor code that You delete from the Original Code; 2) separate from the Original\nCode; or 3) for infringements caused by: i) the modification of the Original\nCode or ii) the combination of the Original Code with other software or devices.\n\n2.2. Contributor Grant. Subject to third party intellectual property claims,\neach Contributor hereby grants You a world-wide, royalty-free, non-exclusive\nlicense\n\na. under intellectual property rights (other than patent or trademark) Licensable\nby Contributor, to use, reproduce, modify, display, perform, sublicense and\ndistribute the Modifications created by such Contributor (or portions thereof)\neither on an unmodified basis, with other Modifications, as Covered Code and/or\nas part of a Larger Work; and\nb. under Patent Claims infringed by the making, using, or selling of Modifications\nmade by that Contributor either alone and/or in combination with its Contributor\nVersion (or portions of such combination), to make, use, sell, offer for sale,\nhave made, and/or otherwise dispose of: 1) Modifications made by that Contributor\n(or portions thereof); and 2) the combination of Modifications made by that\nContributor with its Contributor Version (or portions of such combination).\nc. the licenses granted in Sections 2.2 (a) and 2.2 (b) are effective on the\ndate Contributor first makes Commercial Use of the Covered Code.\nd. Notwithstanding Section 2.2 (b) above, no patent license is granted: 1)\nfor any code that Contributor has deleted from the Contributor Version; 2)\nseparate from the Contributor Version; 3) for infringements caused by: i)\nthird party modifications of Contributor Version or ii) the combination of\nModifications made by that Contributor with other software (except as part\nof the Contributor Version) or other devices; or 4) under Patent Claims infringed\nby Covered Code in the absence of Modifications made by that Contributor.\n\n3. Distribution Obligations.\n\n3.1. Application of License. The Modifications which You create or to which\nYou contribute are governed by the terms of this License, including without\nlimitation Section 2.2. The Source Code version of Covered Code may be distributed\nonly under the terms of this License or a future version of this License released\nunder Section 6.1, and You must include a copy of this License with every\ncopy of the Source Code You distribute. You may not offer or impose any terms\non any Source Code version that alters or restricts the applicable version\nof this License or the recipients' rights hereunder. However, You may include\nan additional document offering the additional rights described in Section\n3.5.\n\n3.2. Availability of Source Code. Any Modification which You create or to\nwhich You contribute must be made available in Source Code form under the\nterms of this License either on the same media as an Executable version or\nvia an accepted Electronic Distribution Mechanism to anyone to whom you made\nan Executable version available; and if made available via Electronic Distribution\nMechanism, must remain available for at least twelve (12) months after the\ndate it initially became available, or at least six (6) months after a subsequent\nversion of that particular Modification has been made available to such recipients.\nYou are responsible for ensuring that the Source Code version remains available\neven if the Electronic Distribution Mechanism is maintained by a third party.\n\n3.3. Description of Modifications. You must cause all Covered Code to which\nYou contribute to contain a file documenting the changes You made to create\nthat Covered Code and the date of any change. You must include a prominent\nstatement that the Modification is derived, directly or indirectly, from Original\nCode provided by the Initial Developer and including the name of the Initial\nDeveloper in (a) the Source Code, and (b) in any notice in an Executable version\nor related documentation in which You describe the origin or ownership of\nthe Covered Code.\n\n     3.4. Intellectual Property Matters\n\n          (a) Third Party Claims\nIf Contributor has knowledge that a license under a third party's intellectual\nproperty rights is required to exercise the rights granted by such Contributor\nunder Sections 2.1 or 2.2, Contributor must include a text file with the Source\nCode distribution titled \"LEGAL\" which describes the claim and the party making\nthe claim in sufficient detail that a recipient will know whom to contact.\nIf Contributor obtains such knowledge after the Modification is made available\nas described in Section 3.2, Contributor shall promptly modify the LEGAL file\nin all copies Contributor makes available thereafter and shall take other\nsteps (such as notifying appropriate mailing lists or newsgroups) reasonably\ncalculated to inform those who received the Covered Code that new knowledge\nhas been obtained.\n\n          (b) Contributor APIs\nIf Contributor's Modifications include an application programming interface\nand Contributor has knowledge of patent licenses which are reasonably necessary\nto implement that API, Contributor must also include this information in the\nLEGAL file.\n\n          (c) Representations.\nContributor represents that, except as disclosed pursuant to Section 3.4 (a)\nabove, Contributor believes that Contributor's Modifications are Contributor's\noriginal creation(s) and/or Contributor has sufficient rights to grant the\nrights conveyed by this License.\n\n3.5. Required Notices. You must duplicate the notice in Exhibit A in each\nfile of the Source Code. If it is not possible to put such notice in a particular\nSource Code file due to its structure, then You must include such notice in\na location (such as a relevant directory) where a user would be likely to\nlook for such a notice. If You created one or more Modification(s) You may\nadd your name as a Contributor to the notice described in Exhibit A. You must\nalso duplicate this License in any documentation for the Source Code where\nYou describe recipients' rights or ownership rights relating to Covered Code.\nYou may choose to offer, and to charge a fee for, warranty, support, indemnity\nor liability obligations to one or more recipients of Covered Code. However,\nYou may do so only on Your own behalf, and not on behalf of the Initial Developer\nor any Contributor. You must make it absolutely clear than any such warranty,\nsupport, indemnity or liability obligation is offered by You alone, and You\nhereby agree to indemnify the Initial Developer and every Contributor for\nany liability incurred by the Initial Developer or such Contributor as a result\nof warranty, support, indemnity or liability terms You offer.\n\n3.6. Distribution of Executable Versions. You may distribute Covered Code\nin Executable form only if the requirements of Sections 3.1, 3.2, 3.3, 3.4\nand 3.5 have been met for that Covered Code, and if You include a notice stating\nthat the Source Code version of the Covered Code is available under the terms\nof this License, including a description of how and where You have fulfilled\nthe obligations of Section 3.2. The notice must be conspicuously included\nin any notice in an Executable version, related documentation or collateral\nin which You describe recipients' rights relating to the Covered Code. You\nmay distribute the Executable version of Covered Code or ownership rights\nunder a license of Your choice, which may contain terms different from this\nLicense, provided that You are in compliance with the terms of this License\nand that the license for the Executable version does not attempt to limit\nor alter the recipient's rights in the Source Code version from the rights\nset forth in this License. If You distribute the Executable version under\na different license You must make it absolutely clear that any terms which\ndiffer from this License are offered by You alone, not by the Initial Developer\nor any Contributor. You hereby agree to indemnify the Initial Developer and\nevery Contributor for any liability incurred by the Initial Developer or such\nContributor as a result of any such terms You offer.\n\n3.7. Larger Works. You may create a Larger Work by combining Covered Code\nwith other code not governed by the terms of this License and distribute the\nLarger Work as a single product. In such a case, You must make sure the requirements\nof this License are fulfilled for the Covered Code.\n\n4. Inability to Comply Due to Statute or Regulation.\n\nIf it is impossible for You to comply with any of the terms of this License\nwith respect to some or all of the Covered Code due to statute, judicial order,\nor regulation then You must: (a) comply with the terms of this License to\nthe maximum extent possible; and (b) describe the limitations and the code\nthey affect. Such description must be included in the LEGAL file described\nin Section 3.4 and must be included with all distributions of the Source Code.\nExcept to the extent prohibited by statute or regulation, such description\nmust be sufficiently detailed for a recipient of ordinary skill to be able\nto understand it.\n\n5. Application of this License.\nThis License applies to code to which the Initial Developer has attached the\nnotice in Exhibit A and to related Covered Code.\n\n6. Versions of the License.\n\n     6.1. New Versions\nNetscape Communications Corporation (\"Netscape\") may publish revised and/or\nnew versions of the License from time to time. Each version will be given\na distinguishing version number.\n\n     6.2. Effect of New Versions\nOnce Covered Code has been published under a particular version of the License,\nYou may always continue to use it under the terms of that version. You may\nalso choose to use such Covered Code under the terms of any subsequent version\nof the License published by Netscape. No one other than Netscape has the right\nto modify the terms applicable to Covered Code created under this License.\n\n     6.3. Derivative Works\nIf You create or use a modified version of this License (which you may only\ndo in order to apply it to code which is not already Covered Code governed\nby this License), You must (a) rename Your license so that the phrases \"Mozilla\",\n\"MOZILLAPL\", \"MOZPL\", \"Netscape\", \"MPL\", \"NPL\" or any confusingly similar\nphrase do not appear in your license (except to note that your license differs\nfrom this License) and (b) otherwise make it clear that Your version of the\nlicense contains terms which differ from the Mozilla Public License and Netscape\nPublic License. (Filling in the name of the Initial Developer, Original Code\nor Contributor in the notice described in Exhibit A shall not of themselves\nbe deemed to be modifications of this License.)\n\n7. DISCLAIMER OF WARRANTY\nCOVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN \"AS IS\" BASIS, WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES\nTHAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR\nPURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE\nOF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN\nANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME\nTHE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER\nOF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED\nCODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.\n\n8. Termination\n\n8.1. This License and the rights granted hereunder will terminate automatically\nif You fail to comply with terms herein and fail to cure such breach within\n30 days of becoming aware of the breach. All sublicenses to the Covered Code\nwhich are properly granted shall survive any termination of this License.\nProvisions which, by their nature, must remain in effect beyond the termination\nof this License shall survive.\n\n8.2. If You initiate litigation by asserting a patent infringement claim (excluding\ndeclatory judgment actions) against Initial Developer or a Contributor (the\nInitial Developer or Contributor against whom You file such action is referred\nto as \"Participant\") alleging that:\n\na. such Participant's Contributor Version directly or indirectly infringes\nany patent, then any and all rights granted by such Participant to You under\nSections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant\nterminate prospectively, unless if within 60 days after receipt of notice\nYou either: (i) agree in writing to pay Participant a mutually agreeable reasonable\nroyalty for Your past and future use of Modifications made by such Participant,\nor (ii) withdraw Your litigation claim with respect to the Contributor Version\nagainst such Participant. If within 60 days of notice, a reasonable royalty\nand payment arrangement are not mutually agreed upon in writing by the parties\nor the litigation claim is not withdrawn, the rights granted by Participant\nto You under Sections 2.1 and/or 2.2 automatically terminate at the expiration\nof the 60 day notice period specified above.\nb. any software, hardware, or device, other than such Participant's Contributor\nVersion, directly or indirectly infringes any patent, then any rights granted\nto You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective\nas of the date You first made, used, sold, distributed, or had made, Modifications\nmade by that Participant.\n\n8.3. If You assert a patent infringement claim against Participant alleging\nthat such Participant's Contributor Version directly or indirectly infringes\nany patent where such claim is resolved (such as by license or settlement)\nprior to the initiation of patent infringement litigation, then the reasonable\nvalue of the licenses granted by such Participant under Sections 2.1 or 2.2\nshall be taken into account in determining the amount or value of any payment\nor license.\n\n8.4. In the event of termination under Sections 8.1 or 8.2 above, all end\nuser license agreements (excluding distributors and resellers) which have\nbeen validly granted by You or any distributor hereunder prior to termination\nshall survive termination.\n\n9. LIMITATION OF LIABILITY\nUNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING\nNEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY\nOTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF\nANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL,\nOR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES\nFOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY\nAND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE\nBEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY\nSHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH\nPARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION.\nSOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL\nOR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO\nYOU.\n\n10. U.S. government end users\nThe Covered Code is a \"commercial item,\" as that term is defined in 48 C.F.R.\n2.101 (Oct. 1995), consisting of \"commercial computer software\" and \"commercial\ncomputer software documentation,\" as such terms are used in 48 C.F.R. 12.212\n(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through\n227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code\nwith only those rights set forth herein.\n\n11. Miscellaneous\nThis License represents the complete agreement concerning subject matter hereof.\nIf any provision of this License is held to be unenforceable, such provision\nshall be reformed only to the extent necessary to make it enforceable. This\nLicense shall be governed by California law provisions (except to the extent\napplicable law, if any, provides otherwise), excluding its conflict-of-law\nprovisions. With respect to disputes in which at least one party is a citizen\nof, or an entity chartered or registered to do business in the United States\nof America, any litigation relating to this License shall be subject to the\njurisdiction of the Federal Courts of the Northern District of California,\nwith venue lying in Santa Clara County, California, with the losing party\nresponsible for costs, including without limitation, court costs and reasonable\nattorneys' fees and expenses. The application of the United Nations Convention\non Contracts for the International Sale of Goods is expressly excluded. Any\nlaw or regulation which provides that the language of a contract shall be\nconstrued against the drafter shall not apply to this License.\n\n12. Responsibility for claims\nAs between Initial Developer and the Contributors, each party is responsible\nfor claims and damages arising, directly or indirectly, out of its utilization\nof rights under this License and You agree to work with Initial Developer\nand Contributors to distribute such responsibility on an equitable basis.\nNothing herein is intended or shall be deemed to constitute any admission\nof liability.\n\n13. Multiple-licensed code\nInitial Developer may designate portions of the Covered Code as \"Multiple-Licensed\".\n\"Multiple-Licensed\" means that the Initial Developer permits you to utilize\nportions of the Covered Code under Your choice of the MPL or the alternative\nlicenses, if any, specified by the Initial Developer in the file described\nin Exhibit A.\n\nExhibit A - Mozilla Public License.\n\n\"The contents of this file are subject to the Mozilla Public License Version\n1.1 (the \"License\"); you may not use this file except in compliance with the\nLicense. You may obtain a copy of the License at http://www.mozilla.org/MPL/\n\nSoftware distributed under the License is distributed on an \"AS IS\" basis,\nWITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for\nthe specific language governing rights and limitations under the License.\n\nThe Original Code is ______________________________________.\n\nThe Initial Developer of the Original Code is ________________________.\nPortions created by ______________________ are Copyright (C) ______\n_______________________. All Rights Reserved.\n\nContributor(s): ______________________________________.\n\nAlternatively, the contents of this file may be used under the terms of the\n_____ license (the  \"[___] License\"), in which case the provisions of [______]\nLicense are applicable instead of those above. If you wish to allow use of\nyour version of this file only under the terms of the [____] License and not\nto allow others to use your version of this file under the MPL, indicate your\ndecision by deleting the provisions above and replace them with the notice\nand other provisions required by the [___] License. If you do not delete the\nprovisions above, a recipient may use your version of this file under either\nthe MPL or the [___] License.\"\n\nNOTE: The text of this Exhibit A may differ slightly from the text of the\nnotices in the Source Code files of the Original Code. You should use the\ntext of this Exhibit A rather than the text found in the Original Code Source\nCode for Your Modifications.\n"
  },
  {
    "path": "licenses/MPL-2.0.txt",
    "content": "Mozilla Public License Version 2.0\n\n1. Definitions\n\n1.1. \"Contributor\" means each individual or legal entity that creates, contributes\nto the creation of, or owns Covered Software.\n\n1.2. \"Contributor Version\" means the combination of the Contributions of others\n(if any) used by a Contributor and that particular Contributor's Contribution.\n\n     1.3. \"Contribution\" means Covered Software of a particular Contributor.\n\n1.4. \"Covered Software\" means Source Code Form to which the initial Contributor\nhas attached the notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case including portions\nthereof.\n\n     1.5. \"Incompatible With Secondary Licenses\" means\n\n(a) that the initial Contributor has attached the notice described in Exhibit\nB to the Covered Software; or\n\n(b) that the Covered Software was made available under the terms of version\n1.1 or earlier of the License, but not also under the terms of a Secondary\nLicense.\n\n1.6. \"Executable Form\" means any form of the work other than Source Code Form.\n\n1.7. \"Larger Work\" means a work that combines Covered Software with other\nmaterial, in a separate file or files, that is not Covered Software.\n\n     1.8. \"License\" means this document.\n\n1.9. \"Licensable\" means having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and all of the\nrights conveyed by this License.\n\n     1.10. \"Modifications\" means any of the following:\n\n(a) any file in Source Code Form that results from an addition to, deletion\nfrom, or modification of the contents of Covered Software; or\n\n(b) any new file in Source Code Form that contains any Covered Software.\n\n1.11. \"Patent Claims\" of a Contributor means any patent claim(s), including\nwithout limitation, method, process, and apparatus claims, in any patent Licensable\nby such Contributor that would be infringed, but for the grant of the License,\nby the making, using, selling, offering for sale, having made, import, or\ntransfer of either its Contributions or its Contributor Version.\n\n1.12. \"Secondary License\" means either the GNU General Public License, Version\n2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those licenses.\n\n1.13. \"Source Code Form\" means the form of the work preferred for making modifications.\n\n1.14. \"You\" (or \"Your\") means an individual or a legal entity exercising rights\nunder this License. For legal entities, \"You\" includes any entity that controls,\nis controlled by, or is under common control with You. For purposes of this\ndefinition, \"control\" means (a) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or otherwise,\nor (b) ownership of more than fifty percent (50%) of the outstanding shares\nor beneficial ownership of such entity.\n\n2. License Grants and Conditions\n\n     2.1. Grants\nEach Contributor hereby grants You a world-wide, royalty-free, non-exclusive\nlicense:\n\n(a) under intellectual property rights (other than patent or trademark) Licensable\nby such Contributor to use, reproduce, make available, modify, display, perform,\ndistribute, and otherwise exploit its Contributions, either on an unmodified\nbasis, with Modifications, or as part of a Larger Work; and\n\n(b) under Patent Claims of such Contributor to make, use, sell, offer for\nsale, have made, import, and otherwise transfer either its Contributions or\nits Contributor Version.\n\n     2.2. Effective Date\nThe licenses granted in Section 2.1 with respect to any Contribution become\neffective for each Contribution on the date the Contributor first distributes\nsuch Contribution.\n\n     2.3. Limitations on Grant Scope\nThe licenses granted in this Section 2 are the only rights granted under this\nLicense. No additional rights or licenses will be implied from the distribution\nor licensing of Covered Software under this License. Notwithstanding Section\n2.1(b) above, no patent license is granted by a Contributor:\n\n(a) for any code that a Contributor has removed from Covered Software; or\n\n(b) for infringements caused by: (i) Your and any other third party's modifications\nof Covered Software, or (ii) the combination of its Contributions with other\nsoftware (except as part of its Contributor Version); or\n\n(c) under Patent Claims infringed by Covered Software in the absence of its\nContributions.\n\nThis License does not grant any rights in the trademarks, service marks, or\nlogos of any Contributor (except as may be necessary to comply with the notice\nrequirements in Section 3.4).\n\n     2.4. Subsequent Licenses\nNo Contributor makes additional grants as a result of Your choice to distribute\nthe Covered Software under a subsequent version of this License (see Section\n10.2) or under the terms of a Secondary License (if permitted under the terms\nof Section 3.3).\n\n     2.5. Representation\nEach Contributor represents that the Contributor believes its Contributions\nare its original creation(s) or it has sufficient rights to grant the rights\nto its Contributions conveyed by this License.\n\n     2.6. Fair Use\nThis License is not intended to limit any rights You have under applicable\ncopyright doctrines of fair use, fair dealing, or other equivalents.\n\n     2.7. Conditions\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in\nSection 2.1.\n\n3. Responsibilities\n\n     3.1. Distribution of Source Form\nAll distribution of Covered Software in Source Code Form, including any Modifications\nthat You create or to which You contribute, must be under the terms of this\nLicense. You must inform recipients that the Source Code Form of the Covered\nSoftware is governed by the terms of this License, and how they can obtain\na copy of this License. You may not attempt to alter or restrict the recipients'\nrights in the Source Code Form.\n\n     3.2. Distribution of Executable Form\n     If You distribute Covered Software in Executable Form then:\n\n(a) such Covered Software must also be made available in Source Code Form,\nas described in Section 3.1, and You must inform recipients of the Executable\nForm how they can obtain a copy of such Source Code Form by reasonable means\nin a timely manner, at a charge no more than the cost of distribution to the\nrecipient; and\n\n(b) You may distribute such Executable Form under the terms of this License,\nor sublicense it under different terms, provided that the license for the\nExecutable Form does not attempt to limit or alter the recipients' rights\nin the Source Code Form under this License.\n\n     3.3. Distribution of a Larger Work\nYou may create and distribute a Larger Work under terms of Your choice, provided\nthat You also comply with the requirements of this License for the Covered\nSoftware. If the Larger Work is a combination of Covered Software with a work\ngoverned by one or more Secondary Licenses, and the Covered Software is not\nIncompatible With Secondary Licenses, this License permits You to additionally\ndistribute such Covered Software under the terms of such Secondary License(s),\nso that the recipient of the Larger Work may, at their option, further distribute\nthe Covered Software under the terms of either this License or such Secondary\nLicense(s).\n\n     3.4. Notices\nYou may not remove or alter the substance of any license notices (including\ncopyright notices, patent notices, disclaimers of warranty, or limitations\nof liability) contained within the Source Code Form of the Covered Software,\nexcept that You may alter any license notices to the extent required to remedy\nknown factual inaccuracies.\n\n     3.5. Application of Additional Terms\nYou may choose to offer, and to charge a fee for, warranty, support, indemnity\nor liability obligations to one or more recipients of Covered Software. However,\nYou may do so only on Your own behalf, and not on behalf of any Contributor.\nYou must make it absolutely clear that any such warranty, support, indemnity,\nor liability obligation is offered by You alone, and You hereby agree to indemnify\nevery Contributor for any liability incurred by such Contributor as a result\nof warranty, support, indemnity or liability terms You offer. You may include\nadditional disclaimers of warranty and limitations of liability specific to\nany jurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\nIf it is impossible for You to comply with any of the terms of this License\nwith respect to some or all of the Covered Software due to statute, judicial\norder, or regulation then You must: (a) comply with the terms of this License\nto the maximum extent possible; and (b) describe the limitations and the code\nthey affect. Such description must be placed in a text file included with\nall distributions of the Covered Software under this License. Except to the\nextent prohibited by statute or regulation, such description must be sufficiently\ndetailed for a recipient of ordinary skill to be able to understand it.\n\n5. Termination\n\n5.1. The rights granted under this License will terminate automatically if\nYou fail to comply with any of its terms. However, if You become compliant,\nthen the rights granted under this License from a particular Contributor are\nreinstated (a) provisionally, unless and until such Contributor explicitly\nand finally terminates Your grants, and (b) on an ongoing basis, if such Contributor\nfails to notify You of the non-compliance by some reasonable means prior to\n60 days after You have come back into compliance. Moreover, Your grants from\na particular Contributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the first\ntime You have received notice of non-compliance with this License from such\nContributor, and You become compliant prior to 30 days after Your receipt\nof the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent infringement\nclaim (excluding declaratory judgment actions, counter-claims, and cross-claims)\nalleging that a Contributor Version directly or indirectly infringes any patent,\nthen the rights granted to You by any and all Contributors for the Covered\nSoftware under Section 2.1 of this License shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all end\nuser license agreements (excluding distributors and resellers) which have\nbeen validly granted by You or Your distributors under this License prior\nto termination shall survive termination.\n\n6. Disclaimer of Warranty\nCovered Software is provided under this License on an \"as is\" basis, without\nwarranty of any kind, either expressed, implied, or statutory, including,\nwithout limitation, warranties that the Covered Software is free of defects,\nmerchantable, fit for a particular purpose or non-infringing. The entire risk\nas to the quality and performance of the Covered Software is with You. Should\nany Covered Software prove defective in any respect, You (not any Contributor)\nassume the cost of any necessary servicing, repair, or correction. This disclaimer\nof warranty constitutes an essential part of this License. No use of any Covered\nSoftware is authorized under this License except under this disclaimer.\n\n7. Limitation of Liability\nUnder no circumstances and under no legal theory, whether tort (including\nnegligence), contract, or otherwise, shall any Contributor, or anyone who\ndistributes Covered Software as permitted above, be liable to You for any\ndirect, indirect, special, incidental, or consequential damages of any character\nincluding, without limitation, damages for lost profits, loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all other commercial\ndamages or losses, even if such party shall have been informed of the possibility\nof such damages. This limitation of liability shall not apply to liability\nfor death or personal injury resulting from such party's negligence to the\nextent applicable law prohibits such limitation. Some jurisdictions do not\nallow the exclusion or limitation of incidental or consequential damages,\nso this exclusion and limitation may not apply to You.\n\n8. Litigation\nAny litigation relating to this License may be brought only in the courts\nof a jurisdiction where the defendant maintains its principal place of business\nand such litigation shall be governed by laws of that jurisdiction, without\nreference to its conflict-of-law provisions. Nothing in this Section shall\nprevent a party's ability to bring cross-claims or counter-claims.\n\n9. Miscellaneous\nThis License represents the complete agreement concerning the subject matter\nhereof. If any provision of this License is held to be unenforceable, such\nprovision shall be reformed only to the extent necessary to make it enforceable.\nAny law or regulation which provides that the language of a contract shall\nbe construed against the drafter shall not be used to construe this License\nagainst a Contributor.\n\n10. Versions of the License\n\n     10.1. New Versions\nMozilla Foundation is the license steward. Except as provided in Section 10.3,\nno one other than the license steward has the right to modify or publish new\nversions of this License. Each version will be given a distinguishing version\nnumber.\n\n     10.2. Effect of New Versions\nYou may distribute the Covered Software under the terms of the version of\nthe License under which You originally received the Covered Software, or under\nthe terms of any subsequent version published by the license steward.\n\n     10.3. Modified Versions\nIf you create software not governed by this License, and you want to create\na new license for such software, you may create and use a modified version\nof this License if you rename the license and remove any references to the\nname of the license steward (except to note that such modified license differs\nfrom this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\nIf You choose to distribute Source Code Form that is Incompatible With Secondary\nLicenses under the terms of this version of the License, the notice described\nin Exhibit B of this License must be attached.\n\nExhibit A - Source Code Form License Notice\n\nThis Source Code Form is subject to the terms of the Mozilla Public License,\nv. 2.0. If a copy of the MPL was not distributed with this file, You can obtain\none at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular file,\nthen You may include the notice in a location (such as a LICENSE file in a\nrelevant directory) where a recipient would be likely to look for such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\n\nThis Source Code Form is \"Incompatible With Secondary Licenses\", as defined\nby the Mozilla Public License, v. 2.0.\n"
  },
  {
    "path": "licenses/NVIDIA.txt",
    "content": "           License For Customer Use of NVIDIA Software\n\n\nIMPORTANT NOTICE -- READ CAREFULLY: This License For Customer Use of\nNVIDIA Software (\"LICENSE\") is the agreement which governs use of\nthe software of NVIDIA Corporation and its subsidiaries (\"NVIDIA\")\ndownloadable herefrom, including computer software and associated\nprinted materials (\"SOFTWARE\").  By downloading, installing, copying,\nor otherwise using the SOFTWARE, you agree to be bound by the terms\nof this LICENSE.  If you do not agree to the terms of this LICENSE,\ndo not download the SOFTWARE.\n\nRECITALS\n\nUse of NVIDIA's products requires three elements: the SOFTWARE, the\nhardware on a graphics controller board, and a personal computer. The\nSOFTWARE is protected by copyright laws and international copyright\ntreaties, as well as other intellectual property laws and treaties.\nThe SOFTWARE is not sold, and instead is only licensed for use,\nstrictly in accordance with this document.  The hardware is protected\nby various patents, and is sold, but this agreement does not cover\nthat sale, since it may not necessarily be sold as a package with\nthe SOFTWARE.  This agreement sets forth the terms and conditions\nof the SOFTWARE LICENSE only.\n\n1.  DEFINITIONS\n\n1.1  Customer.  Customer means the entity or individual that\ndownloads the SOFTWARE.\n\n2.  GRANT OF LICENSE\n\n2.1  Rights and Limitations of Grant.  NVIDIA hereby grants Customer\nthe following non-exclusive, non-transferable right to use the\nSOFTWARE, with the following limitations:\n\n2.1.1  Rights.  Customer may install and use one copy of the SOFTWARE\non a single computer, and except for making one back-up copy of\nthe Software, may not otherwise copy the SOFTWARE.  This LICENSE\nof SOFTWARE may not be shared or used concurrently on different\ncomputers.\n\n2.1.2  Linux/FreeBSD Exception.  Notwithstanding the foregoing terms\nof Section 2.1.1, SOFTWARE designed exclusively for use on the Linux or\nFreeBSD operating systems, or other operating systems derived from the\nsource code to these operating systems, may be copied and redistributed,\nprovided that the binary files thereof are not modified in any way\n(except for unzipping of compressed files).\n\n2.1.3  Limitations.\n\nNo Reverse Engineering.  Customer may not reverse engineer,\ndecompile, or disassemble the SOFTWARE, nor attempt in any other\nmanner to obtain the source code.\n\nNo Separation of Components.  The SOFTWARE is licensed as a\nsingle product.  Its component parts may not be separated for use\non more than one computer, nor otherwise used separately from the\nother parts.\n\nNo Rental.  Customer may not rent or lease the SOFTWARE to someone\nelse.\n\n3.  TERMINATION\n\nThis LICENSE will automatically terminate if Customer fails to\ncomply with any of the terms and conditions hereof.  In such event,\nCustomer must destroy all copies of the SOFTWARE and all of its\ncomponent parts.\n\nDefensive Suspension.  If Customer commences or participates in any legal\nproceeding against NVIDIA, then NVIDIA may, in its sole discretion,\nsuspend or terminate all license grants and any other rights provided\nunder this LICENSE during the pendency of such legal proceedings.\n\n4.  COPYRIGHT\n\nAll title and copyrights in and to the SOFTWARE (including but\nnot limited to all images, photographs, animations, video, audio,\nmusic, text, and other information incorporated into the SOFTWARE),\nthe accompanying printed materials, and any copies of the SOFTWARE,\nare owned by NVIDIA, or its suppliers.  The SOFTWARE is protected\nby copyright laws and international treaty provisions.  Accordingly,\nCustomer is required to treat the SOFTWARE like any other copyrighted\nmaterial, except as otherwise allowed pursuant to this LICENSE\nand that it may make one copy of the SOFTWARE solely for backup or\narchive purposes.\n\n5.  APPLICABLE LAW\n\nThis agreement shall be deemed to have been made in, and shall be\nconstrued pursuant to, the laws of the State of California.\n\n6.  DISCLAIMER OF WARRANTIES AND LIMITATION ON LIABILITY\n\n6.1  No Warranties.  TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE\nLAW, THE SOFTWARE IS PROVIDED \"AS IS\" AND NVIDIA AND ITS SUPPLIERS\nDISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT\nNOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\nFOR A PARTICULAR PURPOSE.\n\n6.2  No Liability for Consequential Damages.  TO THE MAXIMUM\nEXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL NVIDIA OR\nITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR\nCONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,\nDAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS\nOF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT\nOF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF NVIDIA HAS\nBEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n7.  MISCELLANEOUS \n\nThe United Nations Convention on Contracts for the International\nSale of Goods is specifically disclaimed.  If any provision of this\nLICENSE is inconsistent with, or cannot be fully enforced under,\nthe law, such provision will be construed as limited to the extent\nnecessary to be consistent with and fully enforceable under the law.\nThis agreement is the final, complete and exclusive agreement between\nthe parties relating to the subject matter hereof, and supersedes\nall prior or contemporaneous understandings and agreements relating\nto such subject matter, whether oral or written.  Customer agrees\nthat it will not ship, transfer or export the SOFTWARE into any\ncountry, or use the SOFTWARE in any manner, prohibited by the\nUnited States Bureau of Export Administration or any export laws,\nrestrictions or regulations.  This LICENSE may only be modified in\nwriting signed by an authorized officer of NVIDIA.\n\n"
  },
  {
    "path": "licenses/NextPVR.txt",
    "content": "Software License Agreement for NextPVR\n\nIMPORTANT- PLEASE READ CAREFULLY BEFORE USING THIS SOFTWARE: THIS LICENSE AGREEMENT FOR NextPVR (\"LICENSE AGREEMENT\") IS A LEGAL AGREEMENT BETWEEN YOU (EITHER ON BEHALF OF YOURSELF AS AN INDIVIDUAL OR ON BEHALF OF AN ENTITY AS ITS AUTHORIZED REPRESENTATIVE) AND PINSTRIPE LIMITED. FOR THE NextPVR SOFTWARE (\"SOFTWARE\"). THIS LICENSE AGREEMENT FOR NextPVR SUPERSEDES PREVIOUS VERSIONS. BY INSTALLING THE SOFTWARE (AS DEFINED BELOW), COPYING OR OTHERWISE USING THE SOFTWARE YOU AGREE TO BE BOUND BY ALL OF THE TERMS OF THIS END USER LICENSE AGREEMENT REGARDING YOUR USE OF THE SOFTWARE. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE AGREEMENT, UNINSTALL THE SOFTWARE, AND DO NOT COPY OR OTHERWISE USE THE SOFTWARE.\n\nGRANT OF LICENSE: Subject to the following terms, PINSTRIPE LIMITED hereby grants you a non-exclusive, perpetual, non-transferable license to install and to use the NextPVR software (\"Software\") for personal, non-commercial use. You may copy the Software for back-up or archival purposes.\n\nLICENSE RESTRICTIONS: You may not: (i) reverse engineer, decompile, or disassemble the Software; (ii) modify, or create derivative works based upon, the Software in whole or in part; (iii) distribute copies of the Software; (iv) remove any proprietary notices or labels on the Software; or (v) resell, lease, rent, transfer, sublicense, or otherwise transfer rights to the Software. You agree that the NextPVR software will not be used for commercial purposes without full written permission. Any such forbidden use shall immediately terminate your license to the software.\n\nTITLE: You agree that no title to the intellectual property in the Software is transferred to you. Title, ownership, rights, and intellectual property rights in and to the Software shall remain in PINSTRIPE LIMITED.\n\nUPDATES: From time to time, PINSTRIPE LIMITED may make updates to the Software generally available. You may download and install these software updates released by PINSTRIPE LIMITED. All updates to the Software shall be governed by this Agreement, unless other license terms are provided with the update. Under the Software's default configuration, if you are connected to the Internet, the Software is enabled by default to query latest version of Software and display if updates are available. You may choose to switch this version check off and not use it.\n\nTECHNICAL SUPPORT: Technical support for the software, as made available by PINSTRIPE LIMITED, is available on the web site at: http://www.nextpvr.com\n\nDISCLAIMER OF WARRANTY: The Software is provided to you at minimal charge. ACCORDINGLY, YOU AGREE THAT PINSTRIPE LIMITED HAS MADE NO EXPRESS WARRANTIES, ORAL OR WRITTEN, TO YOU REGARDING THE SOFTWARE AND THAT THE SOFTWARE IS BEING PROVIDED TO YOU \"AS IS\" WITHOUT WARRANTY OF ANY KIND. PINSTRIPE LIMITED DISCLAIMS ANY AND ALL OTHER WARRANTIES, WHETHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF NONINFRINGEMENT OF THIRD PARTY RIGHTS, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. PINSTRIPE LIMITED SHALL NOT BE LIABLE FOR INDIRECT, INCIDENTAL, SPECIAL, COVER, RELIANCE, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOSS OF ANTICIPATED PROFIT) ARISING FROM ANY CAUSE UNDER OR RELATED TO THIS AGREEMENT.\n\nLIMITATION OF LIABILITY: You must assume the entire risk of using the program. IN NO EVENT SHALL PINSTRIPE LIMITED BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND ARISING OUT OF THE USE OF THE PINSTRIPE LIMITED SOFTWARE, EVEN IF PINSTRIPE LIMITED HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT WILL PINSTRIPE LIMITED'S LIABILITY FOR ANY CLAIM, WHETHER IN CONTRACT, TORT, OR ANY OTHER THEORY OF LIABILITY, EXCEED THE LICENSE FEE PAID BY YOU, PROVIDED, HOWEVER, IF THE RELEVANT SOFTWARE WAS PROVIDED TO YOU AT NO CHARGE YOU AGREE PINSTRIPE LIMITED SHALL NOT BE LIABLE TO YOU FOR ANY DAMAGES. THIS LIMITATION SHALL APPLY TO CLAIMS OF PERSONAL INJURY TO THE EXTENT PERMITTED BY LAW.\n"
  },
  {
    "path": "licenses/OFL-1.1.txt",
    "content": "SIL OPEN FONT LICENSE\n\nVersion 1.1 - 26 February 2007\n\nPREAMBLE\n\nThe goals of the Open Font License (OFL) are to stimulate worldwide development\nof collaborative font projects, to support the font creation efforts of academic\nand linguistic communities, and to provide a free and open framework in which\nfonts may be shared and improved in partnership with others.\n\nThe OFL allows the licensed fonts to be used, studied, modified and redistributed\nfreely as long as they are not sold by themselves. The fonts, including any\nderivative works, can be bundled, embedded, redistributed and/or sold with\nany software provided that any reserved names are not used by derivative works.\nThe fonts and derivatives, however, cannot be released under any other type\nof license. The requirement for fonts to remain under this license does not\napply to any document created using the fonts or their derivatives.\n\nDEFINITIONS\n\n\"Font Software\" refers to the set of files released by the Copyright Holder(s)\nunder this license and clearly marked as such. This may include source files,\nbuild scripts and documentation.\n\n\"Reserved Font Name\" refers to any names specified as such after the copyright\nstatement(s).\n\n\"Original Version\" refers to the collection of Font Software components as\ndistributed by the Copyright Holder(s).\n\n\"Modified Version\" refers to any derivative made by adding to, deleting, or\nsubstituting — in part or in whole — any of the components of the Original\nVersion, by changing formats or by porting the Font Software to a new environment.\n\n\"Author\" refers to any designer, engineer, programmer, technical writer or\nother person who contributed to the Font Software.\n\nPERMISSION & CONDITIONS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof the Font Software, to use, study, copy, merge, embed, modify, redistribute,\nand sell modified and unmodified copies of the Font Software, subject to the\nfollowing conditions:\n\n1) Neither the Font Software nor any of its individual components, in Original\nor Modified Versions, may be sold by itself.\n\n2) Original or Modified Versions of the Font Software may be bundled, redistributed\nand/or sold with any software, provided that each copy contains the above\ncopyright notice and this license. These can be included either as stand-alone\ntext files, human-readable headers or in the appropriate machine-readable\nmetadata fields within text or binary files as long as those fields can be\neasily viewed by the user.\n\n3) No Modified Version of the Font Software may use the Reserved Font Name(s)\nunless explicit written permission is granted by the corresponding Copyright\nHolder. This restriction only applies to the primary font name as presented\nto the users.\n\n4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software\nshall not be used to promote, endorse or advertise any Modified Version, except\nto acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s)\nor with their explicit written permission.\n\n5) The Font Software, modified or unmodified, in part or in whole, must be\ndistributed entirely under this license, and must not be distributed under\nany other license. The requirement for fonts to remain under this license\ndoes not apply to any document created using the Font Software.\n\nTERMINATION\n\nThis license becomes null and void if any of the above conditions are not met.\n\nDISCLAIMER\n\nTHE FONT SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,\nTRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE\nFOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL,\nINDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT\nSOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.\n"
  },
  {
    "path": "licenses/QCA.txt",
    "content": "Copyright (c) 2013-2017 Qualcomm Atheros, Inc.\n\nAll rights reserved.\n\nRedistribution and use in binary forms, without\nmodification, are permitted (subject to the limitations in the\ndisclaimer below) provided that the following conditions are met:\n\n* Redistributions must reproduce the above copyright notice, this list\n  of conditions, and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of Qualcomm Atheros, Inc. nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\n* No Reverse engineering, decompiling, decrypting, or disassembling of\n  this software is permitted.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. NO LICENSES OR OTHER RIGHTS,\nWHETHER EXPRESS, IMPLIED, BASED ON ESTOPPEL OR OTHERWISE, ARE GRANTED\nTO ANY PARTY'S PATENTS, PATENT APPLICATIONS, OR PATENTABLE INVENTIONS\nBY VIRTUE OF THIS LICENSE OR THE DELIVERY OR PROVISION BY QUALCOMM\nATHEROS, INC. OF THE SOFTWARE.\n\nIN NO EVENT SHALL THE COPYRIGHT OWNER OR ANY CONTRIBUTOR BE LIABLE FOR\nANY INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\nHOWEVER CAUSED AND REGARDLESS OF ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\nOTHERWISE) ARISING IN ANY WAY OUT OF OR RESULTING FROM THE USE OF THE\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN ANY\nEVENT, THE TOTAL AGGREGATE LIABILITY THAT MAY BE IMPOSED ON QUALCOMM\nATHEROS, INC. FOR ANY DIRECT DAMAGES ARISING UNDER OR RESULTING FROM\nTHIS AGREEMENT OR IN CONNECTION WITH ANY USE OF THE SOFTWARE SHALL NOT\nEXCEED A TOTAL AMOUNT OF US$5.00.\n\nIF ANY OF THE ABOVE PROVISIONS ARE HELD TO BE VOID, INVALID,\nUNENFORCEABLE, OR ILLEGAL, THE OTHER PROVISIONS SHALL CONTINUE IN FULL\nFORCE AND EFFECT.\n\n"
  },
  {
    "path": "licenses/Radeon_rlc.txt",
    "content": "Copyright (C) 2009, 2010  Advanced Micro Devices, Inc. All rights reserved.\n\nREDISTRIBUTION: Permission is hereby granted, free of any license fees,\nto any person obtaining a copy of this microcode (the \"Software\"), to\ninstall, reproduce, copy and distribute copies, in binary form only, of\nthe Software and to permit persons to whom the Software is provided to\ndo the same, provided that the following conditions are met:\n\nNo reverse engineering, decompilation, or disassembly of this Software\nis permitted.\n\nRedistributions must reproduce the above copyright notice, this\npermission notice, and the following disclaimers and notices in the\nSoftware documentation and/or other materials provided with the\nSoftware.\n\nDISCLAIMER: THE USE OF THE SOFTWARE IS AT YOUR SOLE RISK.  THE SOFTWARE\nIS PROVIDED \"AS IS\" AND WITHOUT WARRANTY OF ANY KIND AND COPYRIGHT\nHOLDER AND ITS LICENSORS EXPRESSLY DISCLAIM ALL WARRANTIES, EXPRESS AND\nIMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\nCOPYRIGHT HOLDER AND ITS LICENSORS DO NOT WARRANT THAT THE SOFTWARE WILL\nMEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF THE SOFTWARE WILL BE\nUNINTERRUPTED OR ERROR-FREE.  THE ENTIRE RISK ASSOCIATED WITH THE USE OF\nTHE SOFTWARE IS ASSUMED BY YOU.  FURTHERMORE, COPYRIGHT HOLDER AND ITS\nLICENSORS DO NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE\nOR THE RESULTS OF THE USE OF THE SOFTWARE IN TERMS OF ITS CORRECTNESS,\nACCURACY, RELIABILITY, CURRENTNESS, OR OTHERWISE.\n\nDISCLAIMER: UNDER NO CIRCUMSTANCES INCLUDING NEGLIGENCE, SHALL COPYRIGHT\nHOLDER AND ITS LICENSORS OR ITS DIRECTORS, OFFICERS, EMPLOYEES OR AGENTS\n(\"AUTHORIZED REPRESENTATIVES\") BE LIABLE FOR ANY INCIDENTAL, INDIRECT,\nSPECIAL OR CONSEQUENTIAL DAMAGES (INCLUDING DAMAGES FOR LOSS OF BUSINESS\nPROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, AND THE\nLIKE) ARISING OUT OF THE USE, MISUSE OR INABILITY TO USE THE SOFTWARE,\nBREACH OR DEFAULT, INCLUDING THOSE ARISING FROM INFRINGEMENT OR ALLEGED\nINFRINGEMENT OF ANY PATENT, TRADEMARK, COPYRIGHT OR OTHER INTELLECTUAL\nPROPERTY RIGHT EVEN IF COPYRIGHT HOLDER AND ITS AUTHORIZED\nREPRESENTATIVES HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  IN\nNO EVENT SHALL COPYRIGHT HOLDER OR ITS AUTHORIZED REPRESENTATIVES TOTAL\nLIABILITY FOR ALL DAMAGES, LOSSES, AND CAUSES OF ACTION (WHETHER IN\nCONTRACT, TORT (INCLUDING NEGLIGENCE) OR OTHERWISE) EXCEED THE AMOUNT OF\nUS$10.\n\nNotice:  The Software is subject to United States export laws and\nregulations.  You agree to comply with all domestic and international\nexport laws and regulations that apply to the Software, including but\nnot limited to the Export Administration Regulations administered by the\nU.S. Department of Commerce and International Traffic in Arm Regulations\nadministered by the U.S. Department of State.  These laws include\nrestrictions on destinations, end users and end use.\n"
  },
  {
    "path": "licenses/Vim.txt",
    "content": "VIM LICENSE\n\nI) There are no restrictions on distributing unmodified copies of Vim except\nthat they must include this license text. You can also distribute unmodified\nparts of Vim, likewise unrestricted except that they must include this license\ntext. You are also allowed to include executables that you made from the unmodified\nVim sources, plus your own usage examples and Vim scripts.\n\nII) It is allowed to distribute a modified (or extended) version of Vim, including\nexecutables and/or source code, when the following four conditions are met:\n\n     1) This license text must be included unmodified.\n\n     2) The modified Vim must be distributed in one of the following five ways:\n\na) If you make changes to Vim yourself, you must clearly describe in the distribution\nhow to contact you. When the maintainer asks you (in any way) for a copy of\nthe modified Vim you distributed, you must make your changes, including source\ncode, available to the maintainer without fee. The maintainer reserves the\nright to include your changes in the official version of Vim. What the maintainer\nwill do with your changes and under what license they will be distributed\nis negotiable. If there has been no negotiation then this license, or a later\nversion, also applies to your changes. The current maintainer is Bram Moolenaar\n<Bram@vim.org>. If this changes it will be announced in appropriate places\n(most likely vim.sf.net, www.vim.org and/or comp.editors). When it is completely\nimpossible to contact the maintainer, the obligation to send him your changes\nceases. Once the maintainer has confirmed that he has received your changes\nthey will not have to be sent again.\n\nb) If you have received a modified Vim that was distributed as mentioned under\na) you are allowed to further distribute it unmodified, as mentioned at I).\nIf you make additional changes the text under a) applies to those changes.\n\nc) Provide all the changes, including source code, with every copy of the\nmodified Vim you distribute. This may be done in the form of a context diff.\nYou can choose what license to use for new code you add. The changes and their\nlicense must not restrict others from making their own changes to the official\nversion of Vim.\n\nd) When you have a modified Vim which includes changes as mentioned under\nc), you can distribute it without the source code for the changes if the following\nthree conditions are met:\n- The license that applies to the changes permits you to distribute the changes\nto the Vim maintainer without fee or restriction, and permits the Vim maintainer\nto include the changes in the official version of Vim without fee or restriction.\n- You keep the changes for at least three years after last distributing the\ncorresponding modified Vim. When the maintainer or someone who you distributed\nthe modified Vim to asks you (in any way) for the changes within this period,\nyou must make them available to him.\n- You clearly describe in the distribution how to contact you. This contact\ninformation must remain valid for at least three years after last distributing\nthe corresponding modified Vim, or as long as possible.\n\ne) When the GNU General Public License (GPL) applies to the changes, you can\ndistribute the modified Vim under the GNU GPL version 2 or any later version.\n\n3) A message must be added, at least in the output of the \":version\" command\nand in the intro screen, such that the user of the modified Vim is able to\nsee that it was modified. When distributing as mentioned under 2)e) adding\nthe message is only required for as far as this does not conflict with the\nlicense used for the changes.\n\n4) The contact information as required under 2)a) and 2)d) must not be removed\nor changed, except that the person himself can make corrections.\n\nIII) If you distribute a modified version of Vim, you are encouraged to use\nthe Vim license for your changes and make them available to the maintainer,\nincluding the source code. The preferred way to do this is by e-mail or by\nuploading the files to a server and e-mailing the URL. If the number of changes\nis small (e.g., a modified Makefile) e-mailing a context diff will do. The\ne-mail address to be used is <maintainer@vim.org>\n\nIV) It is not allowed to remove this license from the distribution of the\nVim sources, parts of it or from a modified version. You may use this license\nfor previous Vim releases instead of the license that they came with, at your\noption.\n"
  },
  {
    "path": "licenses/Zlib.txt",
    "content": "zlib License\n\nThis software is provided 'as-is', without any express or implied warranty.\nIn no event will the authors be held liable for any damages arising from the\nuse of this software.\n\nPermission is granted to anyone to use this software for any purpose, including\ncommercial applications, and to alter it and redistribute it freely, subject\nto the following restrictions:\n\n1. The origin of this software must not be misrepresented; you must not claim\nthat you wrote the original software. If you use this software in a product,\nan acknowledgment in the product documentation would be appreciated but is\nnot required.\n\n2. Altered source versions must be plainly marked as such, and must not be\nmisrepresented as being the original software.\n\n     3. This notice may not be removed or altered from any source distribution.\n"
  },
  {
    "path": "package_bump.sh",
    "content": "#!/bin/bash\n\n# This file is part of the Lakka project and was created by ToKe79. It is originally from https://github.com/libretro/Lakka-LibreELEC/blob/master/libretro_update.sh\n# It has been modified by Shanti Gilbert to work with EmuELEC\n\n[ -z \"$BUMPS\" ] && BUMPS=\"yes\"\n[ -z \"$LR_PKG_PATH\" ] && LR_PKG_PATH=\"./packages\"\n[ -z \"$PROJECT\" ] && PROJECT=\"Amlogic-ce\"\n[ -z \"$DEVICE\" ] && DEVICE=\"Amlogic-ng\"\n[ -z \"$DISTRO\" ] && DISTRO=\"EmuELEC\"\n\nusage()\n{\n  echo \"\"\n  echo \"$0 <--all [--exclude list] | --used [--exclude list] | --packages list>\"\n  echo \"\"\n  echo \"Updates PKG_VERSION in package.mk of libretro packages to latest.\"\n  echo \"\"\n  echo \"Parameters:\"\n  echo \" -a --all                 Update all libretro packages\"\n  echo \" -u --used                Update only libretro packages used by Lakka\"\n  echo \" -p list --packages list  Update listed libretro packages\"\n  echo \" -e list --exclude list   Update all/used packages except listed ones\"\n  echo \"\"\n}\n\n[ \"$1\" == \"\" ] && { usage ; exit ; }\n\ncase $1 in\n  -a | --all )\n    s=$1\n    shift\n    if [ \"$1\" != \"\" ] ; then\n      case $1 in\n        -e | --exclude )\n          PACKAGES_EX=\"\"\n          x=\"$1\"\n          shift\n          v=\"$@\"\n          [ \"$v\" == \"\" ] && { echo \"Error: You must provide name(s) of package(s) to exclude after $x\" ; exit 1 ; }\n          for a in $v ; do\n            if [ -f $(find $LR_PKG_PATH -wholename */$a/package.mk) ] ; then\n              PACKAGES_EX=\"$PACKAGES_EX $a\"\n            else\n              echo \"Warning: $a is not a libretro package.\"\n            fi\n          done\n          [ \"$PACKAGES_EX\" == \"\" ] && { echo \"No valid packages to exclude given! Aborting.\" ; exit 1 ; }\n          ;;\n        * )\n          echo \"Error: After $s use only --exclude (-e) to exclude some packages.\"\n          exit 1\n          ;;\n      esac\n    fi\n    # Get list of all libretro packages\n    PACKAGES_ALL=`ls $LR_PKG_PATH`\n    ;;\n  -u | --used )\n    s=$1\n    shift\n    if [ \"$1\" != \"\" ] ; then\n      case $1 in\n        -e | --exclude )\n          PACKAGES_EX=\"\"\n          x=\"$1\"\n          shift\n          v=\"$@\"\n          [ \"$v\" == \"\" ] && { echo \"Error: You must provide name(s) of package(s) to exclude after $x\" ; exit 1 ; }\n          for a in $v ; do\n            if [ -f $(find $LR_PKG_PATH -wholename */$a/package.mk) ] ; then\n              PACKAGES_EX=\"$PACKAGES_EX $a\"\n            else\n              echo \"Warning: $a is not a libretro package.\"\n            fi\n          done\n          [ \"$PACKAGES_EX\" == \"\" ] && { echo \"No valid packages to exclude given! Aborting.\" ; exit 1 ; }\n          ;;\n        * )\n          echo \"Error: After $s use only --exclude (-e) to exclude some packages.\"\n          exit 1\n          ;;\n      esac\n    fi\n    # Get list of cores, which are used with Lakka:\n    OPTIONS_FILE=\"distributions/Sx05RE/options\"\n    [ -f \"$OPTIONS_FILE\" ] && source \"$OPTIONS_FILE\" || { echo \"$OPTIONS_FILE: not found! Aborting.\" ; exit 1 ; }\n    [ -z \"$LIBRETRO_CORES\" ] && { echo \"LIBRETRO_CORES: empty. Aborting!\" ; exit 1 ; }\n    # List of core retroarch packages\n    RA_PACKAGES=\"retroarch retroarch-assets retroarch-joypad-autoconfig retroarch-overlays libretro-database core-info glsl-shaders\"\n    # List of all libretro packages to update:\n    PACKAGES_ALL=\" $RA_PACKAGES $LIBRETRO_CORES \"\n    ;;\n  -p | --packages )\n    PACKAGES_ALL=\"\"\n    x=\"$1\"\n    shift\n    v=\"$@\"\n    [ \"$v\" == \"\" ] && { echo \"Error: You must provide name(s) of package(s) after $x\" ; exit 1 ; }\n    for a in $v ; do\n      if [ -f $(find $LR_PKG_PATH -wholename */$a/package.mk) ] ; then\n        PACKAGES_ALL=\"$PACKAGES_ALL $a \"\n      else\n        echo \"Warning: $a is not a libretro package - skipping.\"\n      fi\n    done\n    [ \"$PACKAGES_ALL\" == \"\" ] && { echo \"No valid packages given! Aborting.\" ; exit 1 ; }\n    ;;\n  * )\n    usage\n    echo \"Unknown parameter: $1\"\n    exit 1\n    ;;\nesac\nif [ \"$PACKAGES_EX\" != \"\" ] ; then\n  for a in $PACKAGES_EX ; do\n    PACKAGES_ALL=$(echo \" \"$PACKAGES_ALL\" \" | sed \"s/\\ $a\\ /\\ /g\")\n  done\nfi\necho \"Checking following packages: \"$PACKAGES_ALL\ndeclare -i i=0\ndeclare -i ii=0\nfor p in $PACKAGES_ALL\ndo\n  f=$(find $LR_PKG_PATH -wholename */$p/package.mk)\n  if [ ! -f \"$f\" ] ; then\n    echo \"$f: not found! Skipping.\"\n    continue\n    else\n    echo \"working on : $f\"\n    source config/options \"$p\"\n    source \"$f\"\n  fi\n \n  if [ -z \"$PKG_VERSION\" ] || [ -z \"$PKG_SITE\" ] ; then\n    echo \"$f: does not have PKG_VERSION or PKG_SITE\"\n    echo \"PKG_VERSION: $PKG_VERSION\"\n    echo \"PKG_SITE: $PKG_SITE\"\n    echo \"Skipping update.\"\n    continue\n  fi\n     \nif [ $BUMPS != \"no\" ]; then\n\n  if [ \"$p\" != \"linux\" ]; then\n    PKG_SITE=$PKG_SITE\n    PKG_SITE_EXT=\"${PKG_URL: -4}\"\n \n\tif [[ $PKG_SITE != *\"github.com\"* ]]; then\n\t\techo \"Package is not hosted in github, skipping\"\n\tcontinue\n\tfi\n \n if [[ $PKG_EE_UPDATE == \"no\" ]]; then\n\t\techo \"Package is protected, skipping\"\n\tcontinue\n\tfi\n \n  else\n    PKG_SITE=$(echo $PKG_URL | sed 's/\\/archive.*//g')\n  fi\n  echo \"URL $PKG_SITE\"\n\n\t[ -n \"$PKG_GIT_BRANCH\" ] && PKG_GIT_CLONE_BRANCH=\"$PKG_GIT_BRANCH\"\n\t[ -n \"$PKG_GIT_CLONE_BRANCH\" ] && GIT_HEAD=\"heads/$PKG_GIT_CLONE_BRANCH\" || GIT_HEAD=\"HEAD\"\n   UPS_VERSION=`git ls-remote $PKG_SITE | grep ${GIT_HEAD}$`\n   UPS_VERSION=${UPS_VERSION:0:40}\n   if [ \"$UPS_VERSION\" == \"$PKG_VERSION\" ]; then\n    echo \"$PKG_NAME is up to date ($UPS_VERSION)\"\n   else\n    i+=1\n     echo \"$PKG_NAME updated from $PKG_VERSION to $UPS_VERSION\"\n     sed -i \"s|PKG_VERSION=\\\"$PKG_VERSION|PKG_VERSION=\\\"$UPS_VERSION|\" $f\n   fi\nelse\n  UPS_VERSION=$PKG_VERSION\nfi \n\n  if [ \"$GET_HANDLER_SUPPORT\" != \"git\" ] && [ \"${PKG_SITE_EXT}\" != \".git\" ]; then \n \n   if grep -q PKG_SHA256 \"$f\"; then\n    echo \"PKG_SHA256 exists on $f, clearing\"\n    sed -i \"s/PKG_SHA256=\\\"$PKG_SHA256\\\"/PKG_SHA256=\\\"\\\"/\" $f\n    else\n    echo \"PKG_SHA256 does not exists on $f, creating\"\n    sed -i -e \"s/PKG_VERSION=\\\"$UPS_VERSION\\(.*\\)\\\"/PKG_VERSION=\\\"$UPS_VERSION\\1\\\"\\nPKG_SHA256=\\\"\\\"/g\" $f\n   fi\n\n     source \"$f\"\n    ./scripts/get \"$PKG_NAME\"\n    \n    if [ \"$p\" != \"linux\" ]; then\n    CALCSHA=$(cat ${SOURCES_DIR}/$PKG_NAME/$PKG_NAME-$UPS_VERSION.*.sha256)\n    else\n    CALCSHA=$(cat ${SOURCES_DIR}/$PKG_NAME/linux-$LINUX-$UPS_VERSION.tar.gz.sha256)\n    fi\n    \n    echo \"NEW SHA256 $CALCSHA\"\n    #sed -i -e \"s/PKG_VERSION=\\\"$UPS_VERSION\\(.*\\)\\\"\\n\\(.*\\)\\PKG_SHA256=\\\"\\\"/PKG_VERSION=\\\"$UPS_VERSION\\1\\\"\\nPKG_SHA256=\\\"$CALCSHA\\\"/g\" $f\n    sed -e \"/PKG_VERSION=\\\"$UPS_VERSION\\\"/{ N; s/PKG_VERSION=\\\"$UPS_VERSION\\\".*PKG_SHA256=\\\"\\\"/PKG_VERSION=\\\"$UPS_VERSION\\\"\\nPKG_SHA256=\\\"$CALCSHA\\\"/;}\" -i $f\n    # sed -i \"s/PKG_SHA256=\\\"$PKG_SHA256/PKG_SHA256=\\\"$CALCSHA/\" $f\n    ii+=1\n fi\n    \n done\necho \"$i package(s) bumped. $ii sha256 updated packages\"\n"
  },
  {
    "path": "packages/README.md",
    "content": "# Structure of package.mk files\n\n## Introduction\n\nThe package.mk file defines variables and functions to build a package.\n\n## Variables\nTo control the build behaviour of your package, use variables in the top-down order listed here.\n\n#### Base\n\n| Variable    | Default | Required |Description |\n|-------------|---------|----------|------------|\n| PKG_NAME    | -       | yes | Name of the packaged software application. Should be lowercase |\n| PKG_VERSION | -       | yes | Version of the packaged software application. If the version is a githash, please use the full githash, not the abbreviated form. |\n| PKG_SHA256  | -       | yes | SHA256 hashsum of the application download file |\n| PKG_ARCH    | any     | no  | Architectures for which the package builds. `any` or a space separated list of `aarch64`, `arm` or `x86_64` |\n| PKG_LICENSE | -       | yes | License of the software application. [Reference](https://github.com/LibreELEC/LibreELEC.tv/tree/master/licenses) |\n| PKG_SITE    | -       | yes | Site of the software application |\n| PKG_URL     | -       | yes | Address at which the source of the software application can be retrieved |\n| PKG_MAINTAINER | -    | no  | Your name |\n| PKG_DEPENDS_BOOTSTRAP<br>PKG_DEPENDS_HOST   PKG_DEPENDS_INIT   PKG_DEPENDS_TARGET | - | no | A space separated list of name of packages required to build the software application |\n| PKG_SECTION | -       | no  | virtual if the package only defines dependencies |\n| PKG_SHORTDESC | -     | no<br>yes&nbsp;for&nbsp;addons | Short description of the software package |\n| PKG_LONGDESC | -      | yes | Long description of the package including purpose or function within LibreELEC or Kodi |\n\n#### Universal Build Option\n| Variable    | Default | Required |Description |\n|-------------|---------|----------|------------|\n| PKG_SOURCE_DIR | -    | no  | Force the folder name that application sources are unpacked to. Used when sources do not automatically unpack to a folder with the `PKG_NAME-PKG_VERSION` naming convention. |\n| PKG_TAR_STRIP_COMPONENTS | -   | no  | When this option is set the top level directory is not get stripped off while extracting an archive. |\n| PKG_SOURCE_NAME | -   | no  | Force the filename of the application sources. Used when the filename is not the basename of `PKG_URL` |\n| PKG_PATCH_DIRS | -    | no  | Patches in `./patches` are automatically applied after package unpack. Use this option to include patches from an additional folder, e.g. `./patches/$PKG_PATCH_DIRS` |\n| PKG_NEED_UNPACK | -   | no  | Space separated list of files or folders to include in package stamp calculation. If the stamp is invalidated through changes to package files or dependent files/folders the package is cleaned and rebuilt. e.g. `PKG_NEED_UNPACK=\"$(get_pkg_directory linux)\"` will trigger clean/rebuild of a Linux kernel driver package when a change to the `linux` kernel package is detected. |\n| PKG_TOOLCHAIN | auto  | no  | Control which build toolchain is used. For detailed information, see [reference](#toolchain-options). |\n| PKG_BUILD_FLAGS | -   | no  | A space separated list of flags with which to fine-tune the build process. Flags can be enabled or disabled with a `+` or `-` prefix. For detailed information, see the [Reference](#build_flags-options). |\n| PKG_PYTHON_VERSION | python3.8 | no | Define the Python version to be used. |\n| PKG_IS_KERNEL_PKG | - | no  | Set to `yes` for packages that include Linux kernel modules |\n| PKG_DEPENDS_CONFIG | - | no  | Space separated list of packages to add to PKG_CONFIG_PATH. Use this to build with support for `-sysroot` packages (See [reference](BUILD_FLAGS options). |\n\n#### Meson Options\n| Variable    | Default | Required |Description |\n|-------------|---------|----------|------------|\n| PKG_MESON_SCRIPT | $PKG_BUILD/meson.build | no | Meson build file to use |\n| PKG_MESON_OPTS_TARGET | - | no   | Options directly passed to meson |\n\n#### CMAKE Options\n| Variable    | Default | Required |Description |\n|-------------|---------|----------|------------|\n| PKG_CMAKE_SCRIPT | $PKG_BUILD/CMakeLists.txt | no | CMake build file to use |\n| PKG_CMAKE_OPTS_HOST<br>PKG_CMAKE_OPTS_TARGET | - | no | Options directly passed to cmake |\n\n#### Configure Options\n| Variable    | Default | Required |Description |\n|-------------|---------|----------|------------|\n| PKG_CONFIGURE_SCRIPT | $PKG_BUILD/configure | no | configure script to use |\n| PKG_CONFIGURE_OPTS<br>PKG_CONFIGURE_OPTS_BOOTSTRAP<br>PKG_CONFIGURE_OPTS_HOST<br>PKG_CONFIGURE_OPTS_INIT<br>PKG_CONFIGURE_OPTS_TARGET | - | no | Options directly passed to configure |\n\n#### Make Options\n| Variable    | Default | Required |Description |\n|-------------|---------|----------|------------|\n| PKG_MAKE_OPTS<br>PKG_MAKE_OPTS_BOOTSTRP<br>PKG_MAKE_OPTS_HOST<br>PKG_MAKE_OPTS_INIT<br> PKG_MAKE_OPTS_TARGET | - | no | Options directly passed to make in the build step\n| PKG_MAKEINSTALL_OPTS_HOST<br>PKG_MAKEINSTALL_OPTS_TARGET | - | no | Options directly passed to make in the install step\n\n#### Addons\nAdditional options used when the package builds an addon.\n\n| Variable    | Default | Required |Description |\n|-------------|---------|----------|------------|\n| PKG_REV     | -       | yes      | The revision number of the addon (starts at 100). Must be placed after `PKG_VERSION`. Must be incremented for each new version else Kodi clients will not detect version change and download the updated addon. |\n| PKG_IS_ADDON | no     | yes      | Must be set to `yes` <br>or to `embedded` when this addon is part of the image |\n| PKG_ADDON_NAME | -    | yes      | Proper name of the addon that is shown at the repo |\n| PKG_ADDON_TYPE | -    | yes      | See LE/config/addon/ for other possibilities |\n| PKG_ADDON_VERSION | - | no       | The version of the addon, used in addon.xml |\n| PKG_ADDON_PROVIDES | - | no      | [Provides](http://kodi.wiki/view/addon.xml#.3Cprovides.3E_element) in addon-xml |\n| PKG_ADDON_REQUIRES | - | no      | [Requires](http://kodi.wiki/view/addon.xml#.3Crequires.3E) used in addon.xml |\n| PKG_ADDON_PROJECTS | @PROJECTS@ | no | for available projects or devices, see projects subdirectory (note: Use RPi for RPi project, and RPi1 for RPi device) |\n| PKG_DISCLAIMER | -    | no       | [Disclaimer](https://kodi.wiki/view/Addon.xml#.3Cdisclaimer.3E) in addon-xml |\n| PKG_ADDON_IS_STANDALONE | - | no | Defines if an addon depends on Kodi (on) or is standalone (yes) |\n| PKG_ADDON_BROKEN | -  | no       | Marks an addon as broken for the user |\n\n#### Detailed Information for Options\n\n##### TOOLCHAIN options\n\nApplication/packages needs different toolchains for build.\nFor instance `cmake` or the classic `./configure` or same very different.\n\nFor the most application/packages, the auto-detection of the toolchain works proper.\nBut not always. To select a specific toolchain, you only need to set the `PKG_TOOLCHAIN` variable.\n\n| Toolchain   | Description (if needed) |\n|-----------  |-------------------------|\n| meson       | [Meson Build System](http://mesonbuild.com/) |\n| cmake       | [CMake](https://cmake.org/) with Ninja |\n| cmake-make  | [CMake](https://cmake.org/) with Make |\n| autotools   | [GNU Build System](https://en.wikipedia.org/wiki/GNU_Build_System)\n| configure   | preconfigured [GNU Build System](https://en.wikipedia.org/wiki/GNU_Build_System) |\n| ninja       | [Ninja Build](https://ninja-build.org/) |\n| make        | [Makefile Based](https://www.gnu.org/software/make/) |\n| manual      | only runs self writen build steps, see [Functions](#functions) |\n\n###### Auto-Detection\nThe auto-detections looks for specific files in the source path.\n\n1. `meson.build` (PKG_MESON_SCRIPT) => meson toolchain\n2. `CMakeLists.txt` (PKG_CMAKE_SCRIPT) => cmake toolchain\n3. `configure` (PKG_CONFIGURE_SCRIPT) => configure toolchain\n4. `Makefile` => make toolchain\n\nWhen none of these was found, the build abort and you have to set the toolchain via `PKG_TOOLCHAIN`\n\n##### BUILD_FLAGS options\n\nBuild flags implement often used build options. Normally these are activated be default, but single applications/packages has problems to compile/run with these.\n\nSet the variable `PKG_BUILD_FLAGS` in the `package.mk` to enable/disable the single flags. It is a space separated list. The flags can enabled with a `+` prefix, and disabled with a `-`.\n\n| flag     | default  | affected stage(s) | description |\n|----------|----------|-------------------|-------------|\n| pic      | disabled | target, init      | [Position Independent Code](https://en.wikipedia.org/wiki/Position-independent_code) |\n| pic:host | disabled | host, bootstrap   | see above |\n| speed    | disabled | target, init      | replaces default `-O2` compiler optimization with `-O3` (can only enable; overrules size) |\n| size     | disabled | target, init      | replaces default `-O2` compiler optimization with `-Os` (can only enable) |\n| lto      | disabled | target, init      | enable LTO (Link Time optimization) in the compiler and linker unless disabled via `LTO_SUPPORT`. Compiles non-fat LTO objects (only bytecode) and performs single-threaded optimization at link stage |\n| lto-parallel | disabled | target, init  | same as `lto` but enables parallel optimization at link stage. Only enable this if the package build doesn't run multiple linkers in parallel otherwise this can result in lots of parallel processes! |\n| lto-fat  | disabled | target, init      | same as `lto` but compile fat LTO objects (bytecode plus optimized assembly). This increases compile time but can be useful to create static libraries suitable both for LTO and non-LTO linking |\n| lto-off  | disabled | target, init      | explicitly disable LTO in the compiler and linker |\n| bfd      | - | target, init | `+bfd` prefers bfd linker over default linker, `-bfd` disables using bfd |\n| gold     | - | target, init | `+gold` prefers gold linker over default linker, `-gold` disables using gold |\n| mold     | - | target, init | `+mold` prefers mold linker over default linker, `-mold` disables using gold |\n| parallel | enabled  | all | `make` or `ninja` builds with multiple threads/processes (or not) |\n| strip    | enabled  | target | strips executables (or not) |\n| sysroot  | enabled  | target | installs the package to the sysroot folder (or not) |\n| local-cc | disabled | host | use compiler from buildhost instead of host-gcc/g++ in toolchain |\n\n###### Example\n```\nPKG_BUILD_FLAGS=\"+pic -gold\"\nPKG_BUILD_FLAGS=\"-parallel\"\n```\n\n## Functions\nAll build steps in the LibreELEC build system are done by shell function.\nThese functions can be overwritten in the `package.mk`. However, this raises problems when the build system is updated. To reduce the impact, most functions are extended by `pre_` and `post_` scripts to use instead.\n\nWhen it is nesseary to replace configure, make and makeinstall, please use `PKG_TOOLCHAIN=\"manual\"`.\n\nSome of the build steps needs to be run once, like `unpack`. Other steps needs to be run multiple times, to create the toolchain (stage bootstrap & host) or to create the LE image (stage init & target). These stage specific functions have the stage as suffix, like `make_target`.\n\nFull list of overwrittable functions.\n\n| function                | stages specific | description |\n|-------------------------|--------|-------------|\n| configure_package | - | Optional function to implement late binding variable assignment (see below) |\n| unpack<br>pre_unpack<br>post_unpack | - | Extract the source from the downloaded file |\n| pre_patch<br>post_patch | -      | Apply the patches to the source, after extraction. The patch function it self is not allowed to overwritten |\n| pre_build_\\[stage]      | yes    | Runs before of the start of the build |\n| pre_configure<br>pre_configure_\\[stage]<br>configure_\\[stage]<br>post_configure_\\[stage] | yes | Configure the package for the compile. This is only relevant for toolchain, that supports it (e.g. meson, cmake, configure, manual) |\n| make_\\[stage]<br>pre_make_\\[stage]<br>post_make_\\[stage] | yes | Build of the package |\n| makeinstall_\\[stage]<br>pre_makeinstall_\\[stage]<br>post_makeinstall_\\[stage] | yes | Installation of the files in the correct pathes<br>host: TOOLCHAIN<br>target: SYSROOT and IMAGE<br>bootstrap and init: temporary destination\n| addon                   | -      | Copy all files together for addon creation. This is requiered for addons |\n| post_install_addon      | -      | Post processing of installed addon files in `${INSTALL}` directory |\n\n## Directory structure\nEvery package has its own set of build and install directories. The sources are extracted and built in the former, and build artifacts are installed to the latter.\nUsually an install target provided by the package build system will populate the install directory automatically, but it's important that you use the standard `usr/lib/`, `usr/bin/` etc. structure when doing so manually, because the contents of the install directory will be part of the final image (with the exception of top level hidden directories).\n\nSometimes it's necessary to access build artifacts from different packages - like an addon collecting files of various other packages. In that case you need to access the files using the package's install directories (and not their build directories since they might not exist anymore). If you need additional files which should not be part of the final image, you can use a hidden directory for those - grep for `.noinstall` for some examples.\n\n## Late Binding variable assignment\n\nA package will be loaded only once, by the call to `config/options`. During this process, additional package specific variables will be initialised, such as:\n\n* `PKG_BUILD` - path to the build folder\n* `PKG_SOURCE_NAME` - if not already specified, generated from `PKG_URL`, `PKG_NAME` and` PKG_VERSION`\n\nSince these variables will not exist at the time the package is loaded, they can only be referenced **after** package has loaded. This can be accomplished by referencing these variables in the `configure_package()` function which is executed once the additional variables have been assigned.\n\nIf necessary, the following variables would be configured in `configure_package()` as they are normally relative to `${PKG_BUILD}`:\n```\n  PKG_CONFIGURE_SCRIPT\n  PKG_CMAKE_SCRIPT\n  PKG_MESON_SCRIPT\n```\n\nFurther to this, toolchain variables that are defined in `setup_toolchain()` must not be referenced \"globally\" in the package as they will only be configured reliably after `setup_toolchain()` has been called during `scripts/build`. Any variable in the following list must instead be referenced in a package function such as `pre_build_*`, `pre_configure_*`, `pre_make_*` etc.:\n```\n  TARGET_CFLAGS TARGET_CXXFLAGS TARGET_LDFLAGS\n  NINJA_OPTS MAKEFLAGS\n  DESTIMAGE\n  CC CXX CPP LD\n  AS AR NM RANLIB\n  OBJCOPY OBJDUMP\n  STRIP\n  CPPFLAGS CFLAGS CXXFLAGS LDFLAGS\n  PKG_CONFIG\n  PKG_CONFIG_PATH\n  PKG_CONFIG_LIBDIR\n  PKG_CONFIG_SYSROOT_DIR\n  PKG_CONFIG_ALLOW_SYSTEM_CFLAGS\n  PKG_CONFIG_ALLOW_SYSTEM_LIBS\n  CMAKE_CONF CMAKE\n  HOST_CC HOST_CXX HOSTCC HOSTCXX\n  CC_FOR_BUILD CXX_FOR_BUILD BUILD_CC BUILD_CXX\n  _python_sysroot _python_prefix _python_exec_prefix\n```\n\nLastly, the following variables are assigned during `scripts/build` but some packages may need to use alternative values for these variables. To do so, the package must assign alternative values in `pre_build_*`/`pre_configure_*`/`pre_make_*` etc. functions as these functions will be called after the variables are initialised with default values in `scripts/build` but before they are used by `scripts/build`.\n```\n  CMAKE_GENERATOR_NINJA\n\n  TARGET_CONFIGURE_OPTS\n  TARGET_CMAKE_OPTS\n  TARGET_MESON_OPTS\n\n  HOST_CONFIGURE_OPTS\n  HOST_CMAKE_OPTS\n  HOST_MESON_OPTS\n\n  INIT_CONFIGURE_OPTS\n  INIT_CMAKE_OPTS\n  INIT_MESON_OPTS\n\n  BOOTSTRAP_CONFIGURE_OPTS\n  BOOTSTRAP_CMAKE_OPTS\n  BOOTSTRAP_MESON_OPTS\n```\n\n#### Example\n```\nconfigure_package() {\n  # now we know where we're building, assign a value\n  PKG_CONFIGURE_SCRIPT=\"${PKG_BUILD}/gettext-tools/configure\"\n}\n\npost_patch() {\n  # replace hardcoded stuff\n  sed -i ${PKG_CONFIGURE_SCRIPT} 's|hardcoded stuff|variable stuff|'\n}\n\npre_configure_target() {\n  # add extra flag to toolchain default\n  CFLAGS=\"$CFLAGS -DEXTRA_FLAG=yeah\"\n}\n\npost_makeinstall_target() {\n  # remove unused executable, install what remains\n  rm $INSTALL/usr/bin/bigexecutable\n}\n```\n\n#### tools/pkgcheck\n\nUse `tools/pkgcheck` to verify packages. It detects the following issues:\n\nIssue | Level | Meaning |\n| :--- | :----: | ---- |\n| late&nbsp;binding&nbsp;violation | FAIL | Late binding variables referenced outside of a function - see [late binding](https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/readme.md#late-binding-variable-assignment) |\n| duplicate&nbsp;function&nbsp;def | FAIL | Function defined multiple times, only last definition will be used |\n| bad&nbsp;func&nbsp;-&nbsp;missing&nbsp;brace | FAIL | Opening brace (`{`) for function definition should be on same line as the function def, ie. `pre_configure_target() {` |\n| intertwined&nbsp;vars&nbsp;&&nbsp;funcs | WARN | Variable assignments and logic is intertwined with functions - this is cosmetic, but variables and logic should be specified before all functions |\n| unknown&nbsp;function | WARN | Could be a misspelled function, ie. `per_configure_target() {` which might fail silently.|\n| ignored&nbsp;depends&nbsp;assign | WARN | Values assigned to `PKG_DEPENDS_*` outside of the global section or `configure_package()` will be ignored. |\n\n\n## Add a new package to the Image\n1. Think about, why you need it in the image.\n    * new multimedia tool\n    * add a new network tool\n    * new kernel driver\n    * ...\n2. Find a place in the packages tree\n    * look into the package tree structure, which is generally self explaind.\n    * do not place it in an existing package (directory that includes a `package.mk`)\n    * when you found a place, create a directory with the name of your package (use same value for `PKG_NAME`!!)\n3. Create an initial `package.mk`\n    * you can find a template under `packages/package.mk.template`. Copy the template into the new directory and call it `package.mk`\n    * apply any required changes to your new `package.mk`\n4. Find a place in the dependency tree\n    * when it extend an existing package, add it there to the `PKG_DEPENDS_TARGET`/`PKG_DEPENDS_HOST` etc.\n    * take a look into the path `packages/virtual`, there you should find a virtual packages, that match your new package (misc-packages should be the last option)\n5. Now you can build your image\n    * after the build, inside the `BUILD_DIR` (normally build.*) folder you should find a directory with your package name and -version, eg. `widget-1.2.3`.\n\n## Example\n```\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mariadb-connector-c\"\nPKG_VERSION=\"3.0.2\"\nPKG_SHA256=\"f44f436fc35e081db3a56516de9e3bb11ae96838e75d58910be28ddd2bc56d88\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://mariadb.org/\"\nPKG_URL=\"https://github.com/MariaDB/mariadb-connector-c/archive/v$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib openssl\"\nPKG_LONGDESC=\"mariadb-connector: library to conntect to mariadb/mysql database server\"\nPKG_BUILD_FLAGS=\"-gold\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DWITH_EXTERNAL_ZLIB=ON \\\n                       -DAUTH_CLEARTEXT=STATIC \\\n                       -DAUTH_DIALOG=STATIC \\\n                       -DAUTH_OLDPASSWORD=STATIC \\\n                       -DREMOTEIO=OFF\"\n\npost_makeinstall_target() {\n  # drop all unneeded\n  rm -rf $INSTALL/usr\n}\n```\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_ADS1x15/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_ADS1x15\"\nPKG_VERSION=\"a963cc0ee83e2ba6d671b02df5febf7250f626aa\"\nPKG_SHA256=\"2f81a9a6b7b7f46b79faa5b01df0c25fa5f16af80842d74e35b5fbf01ab0c619\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Python code to use the ADS1015 and ADS1115 analog to digital converters with a Raspberry Pi.\"\nPKG_TOOLCHAIN=\"manual\"\n\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_ADXL345/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_ADXL345\"\nPKG_VERSION=\"dca3d90b5477a304fa130f5cc90ea59e3968ce6f\"\nPKG_SHA256=\"22ec0fc6679cc3e9b5f0aff5cfeef34cbbf13e59aecfb829c2f0dc2d90b5fb8b\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Python code to use the ADXL345 triple-axis accelerometer over I2C with a Raspberry Pi.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_BMP/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_BMP\"\nPKG_VERSION=\"e8521e969afae3321d9789353d7e92ea9a5e9a56\"\nPKG_SHA256=\"e5e140c34e312f6a00c62b1bd47ebe3f1857009b1c202c18c7b092ebb2e1eb9c\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Python library for accessing the BMP series pressure and temperature sensors like the BMP085/BMP180 on a Raspberry Pi.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_CharLCD/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_CharLCD\"\nPKG_VERSION=\"bc75cad284766240424f29dc8e7b84d0caceb72e\"\nPKG_SHA256=\"eae4b446162feb533a469a9dacf6e750250f925561c9f7983a11d340e1dd98d4\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Python library for accessing Adafruit character LCDs from a Raspberry Pi.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_DHT/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_DHT\"\nPKG_VERSION=\"18846deec6a96572b3f2c4a9edfb5bac55b46f5b\"\nPKG_SHA256=\"9125f8f42b4874db257a45184b866e8b424aa67230d2ffbc734b53686da7817f\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Python library to read the DHT series of humidity and temperature sensors on a Raspberry Pi.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n  export LDSHARED=\"${CC} -shared\"\n}\n\nmake_target() {\n  case \"${PROJECT}:${DEVICE}\" in\n    \"RPi:RPi\")\n      PKG_RPI_VERSION=\"--force-pi\"\n      ;;\n    \"RPi:RPi2\")\n      PKG_RPI_VERSION=\"--force-pi2\"\n      ;;\n    *)\n      PKG_RPI_VERSION=\"\"\n  esac\n\n  python3 setup.py build ${PKG_RPI_VERSION} --cross-compile\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_GPIO/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_GPIO\"\nPKG_VERSION=\"c543d1df9c0a71bafb9f0a1f9dceecd79a920e74\"\nPKG_SHA256=\"d3cb74fd033ebe5aea1786a584d64ef5eb8082ef2bf0a568b01691612cd04e88\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Library to provide a cross-platform GPIO interface on the Raspberry Pi .\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_LED_Backpack/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_LED_Backpack\"\nPKG_VERSION=\"e34b9548e86e63747563a94f02b65b2980fdefff\"\nPKG_SHA256=\"244d2625cdaebdc68e299fedde276efa5c9f7c143681c4ee056fb8350a4f7167\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Python library for controlling LED backpack displays.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_LSM303/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_LSM303\"\nPKG_VERSION=\"37d288844515d7bb62a2329982eb033e92dceceb\"\nPKG_SHA256=\"609591f2add15e849d3bba320417c705a50a3ed077632baf20c12c8b740d5331\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Python code to use the LSM303 accelerometer & magnetometer with Raspberry Pi.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_MCP3008/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_MCP3008\"\nPKG_VERSION=\"e721d26e650c99b0f6d3efd4ec30444e1adf5ccd\"\nPKG_SHA256=\"f5e4c847a87716c16f0209df95c281b5071549644a79a143a77b212f25c464dc\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Python code to use the MCP3008 analog to digital converter with a Raspberry Pi.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_MCP4725/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_MCP4725\"\nPKG_VERSION=\"4d028bbcf58b011a8f14c5d95057b7e1dcc1064e\"\nPKG_SHA256=\"6ebbd1f76807b01dc2b723064e52b0c82fc45388265b8ec867e0a42a46a6e926\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Python code to use the MCP4725 digital to analog converter with a Raspberry Pi.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_PCA9685/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_PCA9685\"\nPKG_VERSION=\"f86db2ca5de379748afd71e379ce2155f47d21e7\"\nPKG_SHA256=\"46e11dcfbfaab5756ddeb6ab31740cf8c7419ec1d32be2519f19882e7d86e426\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Python code to use the PCA9685 PWM servo/LED controller with a Raspberry Pi.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_PureIO/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_PureIO\"\nPKG_VERSION=\"6f4976d91c52d70b67b28bba75a429b5328a52c1\"\nPKG_SHA256=\"891a4d077fe6610de6aa4b0dc5b9933a6c7db3492072df60c0383662f28c2ae9\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Pure python access to Linux IO including I2C and SPI.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_SI1145/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_SI1145\"\nPKG_VERSION=\"18c400643b39dbf29ab7ff8e74ab0c5c36ef5cf1\"\nPKG_SHA256=\"0238b2c01cfbb2890ae78468d2fc19c815748fc94860a4eb92b649d074476264\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/THP-JOE/Python_SI1145\"\nPKG_URL=\"https://github.com/THP-JOE/Python_SI1145/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Python library for accessing the SI1145 temperature sensor on a Raspberry Pi\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_SSD1306/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_SSD1306\"\nPKG_VERSION=\"8819e2d203df49f2843059d981b7347d9881c82b\"\nPKG_SHA256=\"ed1163dee2fe6c0c2065a429e1d93cff7397a309071ff83714c84566739680a2\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"SSD1306 oled driver library for 'monochrome' 128x64 and 128x32 OLEDs.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_TCS34725/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_TCS34725\"\nPKG_VERSION=\"6306f90b4601237a852acef89eeecc1261ce38b3\"\nPKG_SHA256=\"f2c3218551da55d7fdbe2499a6ffa3a0b8ed1709e4402c6b0e0f37b17d4aa81f\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Python code to use the TCS34725 color sensor with the Raspberry Pi.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_VCNL40xx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_VCNL40xx\"\nPKG_VERSION=\"5c72575b7390fbedfae0b5fb2a881ca9efe9ca22\"\nPKG_SHA256=\"78346836965562720248138203a4af9dc6aa18815bda2a5b7842e3b9af9d1ea8\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Python code to use the VCNL4000 & VCNL4010 proximity sensors with the Raspberry Pi.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/adafruit-libraries-depends/Adafruit_Python_WS2801/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Adafruit_Python_WS2801\"\nPKG_VERSION=\"d0c190715ffef1b00e5ffa2d7b7560e7f8ed4263\"\nPKG_SHA256=\"6219edb5c1d767ff950f5020bacdfb5ba608b4995eb14d6073fdec2f17f584cb\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/adafruit/${PKG_NAME}\"\nPKG_URL=\"https://github.com/adafruit/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Python code to control WS2801 and similar SPI interface addressable RGB LED strips on a Raspberry Pi.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/argtable2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"argtable2\"\nPKG_VERSION=\"2.13\"\nPKG_SHA256=\"8f77e8a7ced5301af6e22f47302fdbc3b1ff41f2b83c43c77ae5ca041771ddbf\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://argtable.sourceforge.net/\"\nPKG_URL=\"https://downloads.sourceforge.net/project/argtable/argtable/argtable-${PKG_VERSION}/argtable2-${PKG_VERSION:2:4}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Argtable is an open source ANSI C library that parses GNU-style command-line options.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared\"\n"
  },
  {
    "path": "packages/addons/addon-depends/ccid/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ccid\"\nPKG_VERSION=\"1.5.2\"\nPKG_SHA256=\"13934487e6f8b48f699a16d367cc7a1af7a3ca874de721ac6e9633beb86e7219\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://ccid.apdu.fr\"\nPKG_URL=\"https://ccid.apdu.fr/files/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain pcsc-lite\"\nPKG_LONGDESC=\"A generic USB Chip/Smart Card Interface Devices driver.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --enable-twinserial\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\nmake_target() {\n  make\n  make -C src/ Info.plist\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/at-spi2-atk/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2017 Escalade\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"at-spi2-atk\"\nPKG_VERSION=\"2.38.0\"\nPKG_SHA256=\"cfa008a5af822b36ae6287f18182c40c91dd699c55faa38605881ed175ca464f\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.gnome.org/\"\nPKG_URL=\"https://ftp.gnome.org/pub/gnome/sources/at-spi2-atk/${PKG_VERSION:0:4}/at-spi2-atk-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain at-spi2-core atk libX11 libxml2\"\nPKG_LONGDESC=\"A GTK+ module that bridges ATK to D-Bus at-spi.\"\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/at-spi2-core/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2017 Escalade\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"at-spi2-core\"\nPKG_VERSION=\"2.47.1\"\nPKG_SHA256=\"c6ba7c160434edebf09d2936933569c936f6ec972301766f2bdac5a4d418153c\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.gnome.org/\"\nPKG_URL=\"https://download.gnome.org/sources/at-spi2-core/${PKG_VERSION:0:4}/at-spi2-core-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain atk dbus glib libXtst\"\nPKG_LONGDESC=\"Protocol definitions and daemon for D-Bus at-spi.\"\n\nPKG_MESON_OPTS_TARGET=\"-Ddocs=false \\\n                       -Dintrospection=disabled \\\n                       -Ddbus_daemon=/usr/bin/dbus-daemon\"\n\npre_configure_target() {\n  TARGET_LDFLAGS=\"${LDFLAGS} -lXext\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/atk/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"atk\"\nPKG_VERSION=\"2.38.0\"\nPKG_SHA256=\"ac4de2a4ef4bd5665052952fe169657e65e895c5057dffb3c2a810f6191a0c36\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://library.gnome.org/devel/atk/\"\nPKG_URL=\"https://ftp.gnome.org/pub/gnome/sources/atk/${PKG_VERSION:0:4}/atk-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain glib glib:host\"\nPKG_LONGDESC=\"Provides the set of accessibility interfaces that are implemented by other applications.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_MESON_OPTS_TARGET=\"-Ddocs=false \\\n                       -Dintrospection=false\"\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/chrome-libXcomposite/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. $(get_pkg_directory libXcomposite)/package.mk\n\nPKG_NAME=\"chrome-libXcomposite\"\nPKG_LONGDESC=\"libXcomposite for chrome\"\nPKG_URL=\"\"\nPKG_DEPENDS_UNPACK+=\" libXcomposite\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"${PKG_CONFIGURE_OPTS_TARGET} \\\n                           --disable-static \\\n                           --enable-shared\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME:7}/${PKG_NAME:7}-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/chrome-libXdamage/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. $(get_pkg_directory libXdamage)/package.mk\n\nPKG_NAME=\"chrome-libXdamage\"\nPKG_LONGDESC=\"libXdamage for chrome\"\nPKG_URL=\"\"\nPKG_DEPENDS_UNPACK+=\" libXdamage\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"${PKG_CONFIGURE_OPTS_TARGET} \\\n                           --disable-static \\\n                           --enable-shared\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME:7}/${PKG_NAME:7}-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/chrome-libXfixes/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. $(get_pkg_directory libXfixes)/package.mk\n\nPKG_NAME=\"chrome-libXfixes\"\nPKG_LONGDESC=\"libXfixes for chrome\"\nPKG_URL=\"\"\nPKG_DEPENDS_UNPACK+=\" libXfixes\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"${PKG_CONFIGURE_OPTS_TARGET} \\\n                           --disable-static \\\n                           --enable-shared\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME:7}/${PKG_NAME:7}-${PKG_VERSION}.tar.bz2 -C ${PKG_BUILD}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/chrome-libXi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. $(get_pkg_directory libXi)/package.mk\n\nPKG_NAME=\"chrome-libXi\"\nPKG_LONGDESC=\"libXi for chrome\"\nPKG_URL=\"\"\nPKG_DEPENDS_UNPACK+=\" libXi\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"${PKG_CONFIGURE_OPTS_TARGET} \\\n                           --disable-static \\\n                           --enable-shared\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME:7}/${PKG_NAME:7}-${PKG_VERSION}.tar.bz2 -C ${PKG_BUILD}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/chrome-libXrender/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. $(get_pkg_directory libXrender)/package.mk\n\nPKG_NAME=\"chrome-libXrender\"\nPKG_LONGDESC=\"libXrender for chrome\"\nPKG_URL=\"\"\nPKG_DEPENDS_UNPACK+=\" libXrender\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"${PKG_CONFIGURE_OPTS_TARGET} \\\n                           --disable-static \\\n                           --enable-shared\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME:7}/${PKG_NAME:7}-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/chrome-libXtst/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. $(get_pkg_directory libXtst)/package.mk\n\nPKG_NAME=\"chrome-libXtst\"\nPKG_LONGDESC=\"libXtst for chrome\"\nPKG_URL=\"\"\nPKG_DEPENDS_UNPACK+=\" libXtst\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"${PKG_CONFIGURE_OPTS_TARGET} \\\n                           --disable-static \\\n                           --enable-shared\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME:7}/${PKG_NAME:7}-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/chrome-libxcb/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. $(get_pkg_directory libxcb)/package.mk\n\nPKG_NAME=\"chrome-libxcb\"\nPKG_LONGDESC=\"libxcb for chrome\"\nPKG_URL=\"\"\nPKG_DEPENDS_UNPACK+=\" libxcb\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"${PKG_CONFIGURE_OPTS_TARGET} \\\n                           --disable-static \\\n                           --enable-shared\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME:7}/${PKG_NAME:7}-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/chrome-libxkbcommon/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\n. $(get_pkg_directory libxkbcommon)/package.mk\n\nPKG_NAME=\"chrome-libxkbcommon\"\nPKG_LONGDESC=\"libxkbcommon for chrome\"\nPKG_URL=\"\"\nPKG_DEPENDS_UNPACK+=\" libxkbcommon\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME:7}/${PKG_NAME:7}-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/chrome-libxshmfence/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\n. $(get_pkg_directory libxshmfence)/package.mk\n\nPKG_NAME=\"chrome-libxshmfence\"\nPKG_LONGDESC=\"libxshmfence for chrome\"\nPKG_URL=\"\"\nPKG_DEPENDS_UNPACK+=\" libxshmfence\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"${PKG_CONFIGURE_OPTS_TARGET} \\\n                           --disable-static \\\n                           --enable-shared\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME:7}/${PKG_NAME:7}-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/cups/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2017 Escalade\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"cups\"\nPKG_VERSION=\"2.4.2\"\nPKG_SHA256=\"7095b2977bb728ded5566a5c802866062840d6541fd027836865949a407c3682\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.cups.org\"\nPKG_URL=\"https://github.com/openprinting/cups/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gnutls zlib\"\nPKG_LONGDESC=\"CUPS printing system.\"\nPKG_BUILD_FLAGS=\"+pic -sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--libdir=/usr/lib \\\n                           --disable-gssapi \\\n                           --with-dnssd=no \\\n                           --with-tls=gnutls\n                           --disable-unit-tests\"\n\npre_configure_target() {\n  cd ..\n  rm -rf .${TARGET_NAME}\n}\n\nmakeinstall_target() {\n  make BUILDROOT=\"${INSTALL}\" install\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/gtk3/files/settings.ini",
    "content": "[Settings]\ngtk-icon-theme-name = Adwaita\ngtk-theme-name = Adwaita\ngtk-font-name = Liberation Sans 12\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/gtk3/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2017 Escalade\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gtk3\"\nPKG_VERSION=\"3.24.36\"\nPKG_SHA256=\"27a6ef157743350c807ffea59baa1d70226dbede82a5e953ffd58ea6059fe691\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"http://www.gtk.org/\"\nPKG_URL=\"https://ftp.gnome.org/pub/gnome/sources/gtk+/${PKG_VERSION:0:4}/gtk+-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain at-spi2-atk atk cairo gdk-pixbuf glib libX11 libXi libXrandr libepoxy pango libxkbcommon\"\nPKG_DEPENDS_CONFIG=\"libXft pango gdk-pixbuf shared-mime-info\"\nPKG_LONGDESC=\"A library for creating graphical user interfaces for the X Window System.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_MESON_OPTS_TARGET=\"-Dbroadway_backend=false \\\n                       -Dcloudproviders=false \\\n                       -Dcolord=no \\\n                       -Ddemos=false \\\n                       -Dexamples=false \\\n                       -Dgtk_doc=false \\\n                       -Dintrospection=false \\\n                       -Dman=false \\\n                       -Dprint_backends=file,lpr \\\n                       -Dquartz_backend=false \\\n                       -Dtests=false \\\n                       -Dwayland_backend=false \\\n                       -Dwin32_backend=false \\\n                       -Dxinerama=no \\\n                       -Dbuiltin_immodules=yes \\\n                       -Dx11_backend=true\"\n\npre_configure_target() {\n  # ${TOOLCHAIN}/bin/glib-compile-resources requires ${TOOLCHAIN}/lib/libffi.so.6\n  export LD_LIBRARY_PATH=\"${TOOLCHAIN}/lib:${LD_LIBRARY_PATH}\"\n  export GLIB_COMPILE_RESOURCES=glib-compile-resources GLIB_MKENUMS=glib-mkenums GLIB_GENMARSHAL=glib-genmarshal\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/gtk3/patches/disable-to-pixdata-build.patch",
    "content": "--- a/gtk/gen-gtk-gresources-xml.py\t2021-02-24 19:13:19.000000000 +0000\n+++ b/gtk/gen-gtk-gresources-xml.py\t2021-04-03 23:52:35.000000000 +0000\n@@ -23,11 +23,6 @@\n     <file>theme/Adwaita/gtk-contained-dark.css</file>\n '''\n \n-for f in get_files('theme/Adwaita/assets', '.png'):\n-  xml += '    <file preprocess=\\'to-pixdata\\'>theme/Adwaita/assets/{0}</file>\\n'.format(f)\n-\n-xml += '\\n'\n-\n for f in get_files('theme/Adwaita/assets', '.svg'):\n   xml += '    <file>theme/Adwaita/assets/{0}</file>\\n'.format(f)\n \n@@ -38,11 +33,6 @@\n     <file>theme/HighContrast/gtk-contained-inverse.css</file>\n '''\n \n-for f in get_files('theme/HighContrast/assets', '.png'):\n-  xml += '    <file preprocess=\\'to-pixdata\\'>theme/HighContrast/assets/{0}</file>\\n'.format(f)\n-\n-xml += '\\n'\n-\n for f in get_files('theme/HighContrast/assets', '.svg'):\n   xml += '    <file>theme/HighContrast/assets/{0}</file>\\n'.format(f)\n \n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/harfbuzz-icu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. $(get_pkg_directory harfbuzz)/package.mk\n\nPKG_NAME=\"harfbuzz-icu\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET+=\" icu\"\nPKG_LONGDESC=\"HarfBuzz with icu\"\nPKG_DEPENDS_CONFIG=\"icu\"\nPKG_DEPENDS_UNPACK+=\" harfbuzz\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_MESON_OPTS_TARGET=\"-Dbenchmark=disabled \\\n                       -Dcairo=enabled \\\n                       -Ddocs=disabled \\\n                       -Dfreetype=enabled \\\n                       -Dglib=enabled \\\n                       -Dgobject=disabled \\\n                       -Dgraphite=disabled \\\n                       -Dicu=enabled \\\n                       -Dtests=disabled\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME:0:8}/${PKG_NAME:0:8}-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/libXScrnSaver/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXScrnSaver\"\nPKG_VERSION=\"1.2.4\"\nPKG_SHA256=\"75cd2859f38e207a090cac980d76bc71e9da99d48d09703584e00585abc920fe\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://xorg.freedesktop.org/\"\nPKG_URL=\"https://xorg.freedesktop.org/releases/individual/lib/libXScrnSaver-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libXext scrnsaverproto\"\nPKG_LONGDESC=\"X11 Screen Saver extension client library.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-static \\\n                           --enable-shared \\\n                           --enable-malloc0returnsnull\"\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/libXcursor/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXcursor\"\nPKG_VERSION=\"1.2.1\"\nPKG_SHA256=\"46c143731610bafd2070159a844571b287ac26192537d047a39df06155492104\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/libXcursor-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libX11 libXfixes libXrender\"\nPKG_LONGDESC=\"X11 Cursor management library.s\"\nPKG_BUILD_FLAGS=\"+pic -sysroot\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/libXft/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXft\"\nPKG_VERSION=\"2.3.7\"\nPKG_SHA256=\"79f0b37c45007381c371a790c2754644ad955166dbf2a48e3625032e9bdd4f71\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/libXft-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain fontconfig freetype libXrender util-macros xorgproto\"\nPKG_LONGDESC=\"X FreeType library.\"\nPKG_BUILD_FLAGS=\"+pic -sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared\"\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/libxss/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libxss\"\nPKG_VERSION=\"1.2.4\"\nPKG_SHA256=\"75cd2859f38e207a090cac980d76bc71e9da99d48d09703584e00585abc920fe\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/libXScrnSaver-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libXext scrnsaverproto\"\nPKG_LONGDESC=\"X11 Screen Saver extension library.\"\nPKG_BUILD_FLAGS=\"+pic -sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-malloc0returnsnull\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/scrnsaverproto/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"scrnsaverproto\"\nPKG_VERSION=\"1.2.2\"\nPKG_SHA256=\"8bb70a8da164930cceaeb4c74180291660533ad3cc45377b30a795d1b85bcd65\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://xorg.freedesktop.org/\"\nPKG_URL=\"https://xorg.freedesktop.org/releases/individual/proto/scrnsaverproto-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"X11 Screen Saver extension wire protocol.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/unclutter/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"unclutter\"\nPKG_VERSION=\"1.09\"\nPKG_SHA256=\"3a53575fe2a75a34bc9a2b0ad92ee0f8a7dbedc05d8783f191c500060a40a9bd\"\nPKG_LICENSE=\"Public Domain\"\nPKG_SITE=\"https://sourceforge.net/projects/unclutter/\"\nPKG_URL=\"https://sourceforge.net/projects/unclutter/unclutter/source_${PKG_VERSION}/unclutter-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libX11\"\nPKG_LONGDESC=\"Unclutter runs in the background of an X11 session and hides the X11 Cursor.\"\n\nmake_target() {\n  rm -f Makefile\n  LDFLAGS=\"${LDFLAGS} -lX11\" ${MAKE} unclutter\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  install -m 755 unclutter ${INSTALL}/usr/bin/\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/chrome-depends/unix_ar/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"unix_ar\"\nPKG_VERSION=\"0.2.1\"\nPKG_SHA256=\"4e1c6e8fe5255b7babe93b9af51532ba09c6946eee413c5db00cab3878d7ed2f\"\nPKG_LICENSE=\"BSD 3-Clause\"\nPKG_SITE=\"https://github.com/getninjas/unix_ar\"\nPKG_URL=\"https://github.com/getninjas/unix_ar/archive/refs/tags/${PKG_VERSION}.tar.gz\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_LONGDESC=\"Python: This packages allows the reading and writing of AR archive files.\"\n"
  },
  {
    "path": "packages/addons/addon-depends/comskip/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"comskip\"\nPKG_VERSION=\"84fcd7388394c95fc8a7e558642bbadb43134507\"\nPKG_SHA256=\"4d45d30335ce1c28fb4de8865ada57f81de18d83a77950e9ab7c3ea26d24a883\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kaashoek.com/comskip/\"\nPKG_URL=\"https://github.com/erikkaashoek/Comskip/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain argtable2 ffmpegx\"\nPKG_DEPENDS_CONFIG=\"argtable2 ffmpegx\"\nPKG_LONGDESC=\"Comskip detects commercial breaks from a video stream. It can be used for post-processing recordings.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\npre_configure_target() {\n  # pass ffmpegx to build\n  CFLAGS+=\" -I$(get_install_dir ffmpegx)/usr/local/include\"\n  LDFLAGS+=\" -L$(get_install_dir ffmpegx)/usr/local/lib -ldl\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/comskip/patches/Comskip-0001-Fix-compilation-with-gcc10.patch",
    "content": "diff --git a/mpeg2dec.c b/mpeg2dec.c\nindex 3013dc1..5b79227 100755\n--- a/mpeg2dec.c\n+++ b/mpeg2dec.c\n@@ -161,7 +161,6 @@ int64_t pev_best_effort_timestamp = 0;\n \r\n int video_stream_index = -1;\r\n int audio_stream_index = -1;\r\n-int width, height;\r\n int have_frame_rate ;\r\n int stream_index;\r\n \r\n"
  },
  {
    "path": "packages/addons/addon-depends/cxxtools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"cxxtools\"\nPKG_VERSION=\"3.0\"\nPKG_SHA256=\"07b18037fb0983f6292f5c8d53e2369e9e7a9711df2c9ad50838aacbc8c62f7c\"\nPKG_LICENSE=\"GPL-2\"\nPKG_SITE=\"http://www.tntnet.org/cxxtools.html\"\nPKG_URL=\"http://www.tntnet.org/download/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host openssl:host\"\nPKG_DEPENDS_TARGET=\"toolchain cxxtools:host openssl\"\nPKG_LONGDESC=\"Cxxtools is a collection of general-purpose C++ classes.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--disable-demos --with-atomictype=pthread --disable-unittest\"\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared --disable-demos --with-atomictype=pthread --disable-unittest\"\n\npost_makeinstall_host() {\n  rm -rf ${TOOLCHAIN}/bin/cxxtools-config\n}\n\npost_makeinstall_target() {\n  cp ${PKG_NAME}-config ${TOOLCHAIN}/bin\n  sed -e \"s:\\(['= ]\\)/usr:\\\\1${PKG_ORIG_SYSROOT_PREFIX}/usr:g\" -i ${TOOLCHAIN}/bin/${PKG_NAME}-config\n  chmod +x ${TOOLCHAIN}/bin/${PKG_NAME}-config\n\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/cxxtools/patches/cxxtools-2.2-Char_operator_eq_unsigned_int.patch",
    "content": "Index: cxxtools-2.2/include/cxxtools/char.h\n===================================================================\n--- cxxtools-2.2.orig/include/cxxtools/char.h\t2013-05-05 14:18:00.180572107 +0300\n+++ cxxtools-2.2/include/cxxtools/char.h\t2013-05-05 14:18:00.176571966 +0300\n@@ -148,6 +148,12 @@\n             friend bool operator==(char a, const Char& b)\n             { return a == b.value(); }\n \n+            //! @brief Returns $true$ if the a and b are the same character; $false$ otherwise.\n+            //! @return $true$ if the a and b are the same character; $false$ otherwise.\n+            friend bool operator==(const Char& a, unsigned int b)\n+            { return a.value() == b; }\n+\n+\n             //! @brief Returns $true$ if the a and b are not the same character; $false$ otherwise.\n             //! @return $true$ if the a and b are not the same character; $false$ otherwise.\n             friend bool operator!=(const Char& a, const Char& b)\n"
  },
  {
    "path": "packages/addons/addon-depends/cxxtools/patches/cxxtools-2.2-hdstream_stdio.patch",
    "content": "Index: cxxtools-2.0/src/hdstream.cpp\n===================================================================\n--- cxxtools-2.0.orig/src/hdstream.cpp\t2011-08-08 13:07:59.567275994 +0300\n+++ cxxtools-2.0/src/hdstream.cpp\t2011-08-08 13:08:11.447275959 +0300\n@@ -30,6 +30,7 @@\n #include <ios>\n #include <iomanip>\n #include <cctype>\n+#include <cstdio>\n \n namespace cxxtools\n {\n"
  },
  {
    "path": "packages/addons/addon-depends/cxxtools/patches/cxxtools-2.2.1-make-cxxtools-char-a-trivial-class-by-defining-the-default.patch",
    "content": "From b773c01fc13d2ae67abc0839888e383be23562fd Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Tommi=20M=C3=A4kitalo?= <tommi@tntnet.org>\nDate: Sun, 24 Jan 2021 17:20:24 +0100\nSubject: [PATCH] make cxxtools::Char a trivial class by definining the default\n constructor as default\n\n---\n include/cxxtools/char.h | 4 +---\n 1 file changed, 1 insertion(+), 3 deletions(-)\n\ndiff --git a/include/cxxtools/char.h b/include/cxxtools/char.h\nindex 1e637317..3a4ed62a 100644\n--- a/include/cxxtools/char.h\n+++ b/include/cxxtools/char.h\n@@ -68,9 +68,7 @@ namespace cxxtools\n             typedef int32_t value_type;\n \n             //! Constructs a character with a value of 0.\n-            Char()\n-            : _value(0)\n-            {}\n+            Char() = default;\n \n             //! Constructs a character using the given value as base for the character value.\n             Char(value_type ch)\n"
  },
  {
    "path": "packages/addons/addon-depends/cxxtools/patches/cxxtools-3.0-gcc12-time.patch",
    "content": "https://bugs.gentoo.org/851837\n--- a/src/timer.cpp\n+++ b/src/timer.cpp\n@@ -27,6 +27,7 @@\n #include \"cxxtools/clock.h\"\n #include \"cxxtools/selector.h\"\n #include \"cxxtools/datetime.h\"\n+#include <ctime>\n #include <stdexcept>\n \n namespace cxxtools\n"
  },
  {
    "path": "packages/addons/addon-depends/cxxtools/patches/cxxtools-3.0-lld-linking-openssl.patch",
    "content": "--- a/src/Makefile.am\n+++ b/src/Makefile.am\n@@ -173,7 +173,7 @@ libcxxtools_la_LIBADD = $(LIBICONV)\n libcxxtools_la_LDFLAGS = -version-info @sonumber@ @SHARED_LIB_FLAG@\n \n if MAKE_OPENSSL\n-libcxxtools_la_LDFLAGS += -lssl\n+libcxxtools_la_LIBADD += -lssl -lcrypto\n libcxxtools_la_SOURCES += \\\n \tsslcertificateimpl.cpp\n endif\n"
  },
  {
    "path": "packages/addons/addon-depends/cxxtools/patches/cxxtools-crosscompile.patch",
    "content": "diff -Naur cxxtools-2.2/configure cxxtools-2.2.patch/configure\n--- cxxtools-2.2/configure\t2013-04-21 21:13:11.000000000 +0200\n+++ cxxtools-2.2.patch/configure\t2014-01-03 20:34:53.404660480 +0100\n@@ -17316,8 +17316,8 @@\n \n \n \n-CXXTOOLS_CXXFLAGS='-I${includedir}'\n-CXXTOOLS_LDFLAGS='-L${libdir} -lcxxtools'\n+CXXTOOLS_CXXFLAGS=''\n+CXXTOOLS_LDFLAGS='-lcxxtools'\n \n \n \ndiff -Naur cxxtools-2.2/configure.ac cxxtools-2.2.patch/configure.ac\n--- cxxtools-2.2/configure.ac\t2013-04-20 23:31:50.000000000 +0200\n+++ cxxtools-2.2.patch/configure.ac\t2014-01-03 20:26:32.064005192 +0100\n@@ -106,8 +106,8 @@\n \n AC_PROG_LIBTOOL\n \n-CXXTOOLS_CXXFLAGS='-I${includedir}'\n-CXXTOOLS_LDFLAGS='-L${libdir} -lcxxtools'\n+CXXTOOLS_CXXFLAGS=''\n+CXXTOOLS_LDFLAGS='-lcxxtools'\n \n AC_SUBST(CXXTOOLS_CXXFLAGS)\n AC_SUBST(CXXTOOLS_LDFLAGS)\n"
  },
  {
    "path": "packages/addons/addon-depends/docker/cli/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"cli\"\nPKG_VERSION=\"$(get_pkg_version moby)\"\nPKG_SHA256=\"b31eb0343e8bb587e921a7630baa659896602072a77ad97720e5f2a8e48005e9\"\nPKG_LICENSE=\"ASL\"\nPKG_SITE=\"https://github.com/docker/cli\"\nPKG_URL=\"https://github.com/docker/cli/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain go:host\"\nPKG_LONGDESC=\"The Docker CLI\"\nPKG_TOOLCHAIN=\"manual\"\n\n# Git commit of the matching release https://github.com/docker/cli/releases\nexport PKG_GIT_COMMIT=\"ef23cbc4315ae76c744e02d687c09548ede461bd\"\n\nconfigure_target() {\n  go_configure\n\n  export LDFLAGS=\"-w -linkmode external -extldflags -Wl,--unresolved-symbols=ignore-in-shared-libs -extld ${CC}\"\n\n  # used for docker version\n  export GITCOMMIT=${PKG_GIT_COMMIT}\n  export VERSION=${PKG_VERSION}\n  export BUILDTIME=\"$(date --utc)\"\n\n  cat > \"${PKG_BUILD}/go.mod\" << EOF\nmodule github.com/docker/cli\n\ngo 1.18\nEOF\n\n  GO111MODULE=auto ${GOLANG} mod tidy -modfile 'vendor.mod' -compat 1.18\n  GO111MODULE=auto ${GOLANG} mod vendor -modfile vendor.mod\n}\n\nmake_target() {\n  mkdir -p bin\n  PKG_CLI_FLAGS=\"-X 'github.com/docker/cli/cli/version.Version=${VERSION}'\"\n  PKG_CLI_FLAGS+=\" -X 'github.com/docker/cli/cli/version.GitCommit=${GITCOMMIT}'\"\n  PKG_CLI_FLAGS+=\" -X 'github.com/docker/cli/cli/version.BuildTime=${BUILDTIME}'\"\n  ${GOLANG} build -mod=mod -modfile=vendor.mod -v -o bin/docker -a -tags \"${PKG_DOCKER_BUILDTAGS}\" -ldflags \"${LDFLAGS} ${PKG_CLI_FLAGS}\" ./cmd/docker\n}\n\nmakeinstall_target() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/docker/cli/patches/cli-0001-path-for-cli-plugins.patch",
    "content": "--- a/cli-plugins/manager/manager_unix.go\t2023-02-03 11:54:16.746399916 +0000\n+++ b/cli-plugins/manager/manager_unix.go\t2023-02-03 11:59:04.528175595 +0000\n@@ -4,6 +4,6 @@\n package manager\n \n var defaultSystemPluginDirs = []string{\n-\t\"/usr/local/lib/docker/cli-plugins\", \"/usr/local/libexec/docker/cli-plugins\",\n-\t\"/usr/lib/docker/cli-plugins\", \"/usr/libexec/docker/cli-plugins\",\n+\t\"/storage/.kodi/addons/service.system.docker/cli-plugins\",\n+\t\"/storage/.kodi/userdata/addon_data/service.system.docker/docker/cli-plugins\",\n }\n"
  },
  {
    "path": "packages/addons/addon-depends/docker/containerd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"containerd\"\nPKG_VERSION=\"1.7.1\"\nPKG_SHA256=\"fd844af82afda7242d8eba5e0086c5a0d54ddc3041c1bbdd4d3c62bfee844e3a\"\nPKG_LICENSE=\"APL\"\nPKG_SITE=\"https://containerd.io\"\nPKG_URL=\"https://github.com/containerd/containerd/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain go:host\"\nPKG_LONGDESC=\"A daemon to control runC, built for performance and density.\"\nPKG_TOOLCHAIN=\"manual\"\n\n# Git commit of the matching release https://github.com/containerd/containerd/releases\nPKG_GIT_COMMIT=\"78f51771157abb6c9ed224c22013cdf09962315d\"\n\npre_make_target() {\n\n  go_configure\n\n  export CONTAINERD_VERSION=\"${PKG_VERSION}\"\n  export CONTAINERD_REVISION=\"${PKG_GIT_COMMIT}\"\n  export CONTAINERD_PKG=\"github.com/containerd/containerd\"\n  export LDFLAGS=\"-w -extldflags -static -X ${CONTAINERD_PKG}/version.Version=${CONTAINERD_VERSION} -X ${CONTAINERD_PKG}/version.Revision=${CONTAINERD_REVISION} -X ${CONTAINERD_PKG}/version.Package=${CONTAINERD_PKG} -extld ${CC}\"\n  export GO111MODULE=off\n\n  mkdir -p ${GOPATH}\n  if [ -d ${PKG_BUILD}/vendor ]; then\n    mv ${PKG_BUILD}/vendor ${GOPATH}/src\n  fi\n\n  ln -fs ${PKG_BUILD} ${GOPATH}/src/github.com/containerd/containerd\n}\n\nmake_target() {\n  mkdir -p bin\n  ${GOLANG} build -v -o bin/containerd              -a -tags \"static_build no_btrfs\" -ldflags \"${LDFLAGS}\" ./cmd/containerd\n  ${GOLANG} build -v -o bin/containerd-shim         -a -tags \"static_build no_btrfs\" -ldflags \"${LDFLAGS}\" ./cmd/containerd-shim\n  ${GOLANG} build -v -o bin/containerd-shim-runc-v2 -a -tags \"static_build no_btrfs\" -ldflags \"${LDFLAGS}\" ./cmd/containerd-shim-runc-v2\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/docker/ctop/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ctop\"\nPKG_VERSION=\"0.7.7\"\nPKG_SHA256=\"0db439f2030af73ad5345884b08a33a762c3b41b30604223dd0ebddde72d2741\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://ctop.sh\"\nPKG_URL=\"https://github.com/bcicen/ctop/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain go:host\"\nPKG_LONGDESC=\"Top-like interface for container metrics\"\nPKG_TOOLCHAIN=\"manual\"\n\n# Git commit of the matching release https://github.com/bcicen/ctop/releases\nPKG_GIT_COMMIT=\"11a1cb10f416b4ca5e36c22c1acc2d11dbb24fb4\"\n\npre_make_target() {\n  go_configure\n\n  export CTOP_VERSION=\"${PKG_VERSION}\"\n  export CTOP_REVISION=\"${PKG_GIT_COMMIT}\"\n  export CTOP_PKG=\"github.com/bcicen/ctop\"\n  export LDFLAGS=\"-w -extldflags -static -X main.version=${CTOP_VERSION} -X main.build=${CTOP_REVISION} -extld ${CC}\"\n\n  mkdir -p ${GOPATH}/src/github.com/bcicen\n  ln -fs ${PKG_BUILD} ${GOPATH}/src/${CTOP_PKG}\n}\n\nmake_target() {\n  mkdir -p bin\n  ${GOLANG} build -v -o bin/ctop -a -tags \"static_build release\" -ldflags \"${LDFLAGS}\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/docker/moby/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"moby\"\nPKG_VERSION=\"23.0.6\"\nPKG_SHA256=\"3bbd32f401f652cc15084d3c09bd7acd381571802beac9333fd63d803dc66c3e\"\nPKG_LICENSE=\"ASL\"\nPKG_SITE=\"https://mobyproject.org/\"\nPKG_URL=\"https://github.com/moby/moby/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain go:host systemd\"\nPKG_LONGDESC=\"Moby is an open-source project created by Docker to enable and accelerate software containerization.\"\nPKG_TOOLCHAIN=\"manual\"\n\n# Git commit of the matching release https://github.com/moby/moby\nexport PKG_GIT_COMMIT=\"9dbdbd4b6d7681bd18c897a6ba0376073c2a72ff\"\n\nPKG_MOBY_BUILDTAGS=\"daemon \\\n                    autogen \\\n                    exclude_graphdriver_devicemapper \\\n                    exclude_graphdriver_aufs \\\n                    exclude_graphdriver_btrfs \\\n                    journald\"\n\nconfigure_target() {\n  go_configure\n\n  export LDFLAGS=\"-w -linkmode external -extldflags -Wl,--unresolved-symbols=ignore-in-shared-libs -extld ${CC}\"\n\n  # used for docker version\n  export GITCOMMIT=${PKG_GIT_COMMIT}\n  export VERSION=${PKG_VERSION}\n  export BUILDTIME=\"$(date --utc)\"\n\n  cat > \"${PKG_BUILD}/go.mod\" << EOF\nmodule github.com/docker/docker\n\ngo 1.18\nEOF\n\n  GO111MODULE=auto ${GOLANG} mod tidy -modfile 'vendor.mod' -compat 1.18\n  GO111MODULE=auto ${GOLANG} mod vendor -modfile vendor.mod\n\n  bash hack/make/.go-autogen\n}\n\nmake_target() {\n  mkdir -p bin\n  ${GOLANG} build -mod=mod -modfile=vendor.mod -v -o bin/docker-proxy -a -ldflags \"${LDFLAGS}\" ./cmd/docker-proxy\n  ${GOLANG} build -mod=mod -modfile=vendor.mod -v -o bin/dockerd -a -tags \"${PKG_MOBY_BUILDTAGS}\" -ldflags \"${LDFLAGS}\" ./cmd/dockerd\n}\n\nmakeinstall_target() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/docker/moby/patches/moby-001-user-addon-storage-location.patch",
    "content": "# when updating this patch just create it from scratch using this command\n#\n# find . -name \"*.go\" -print | xargs sed -i 's/\\/etc\\/docker/\\/storage\\/.kodi\\/userdata\\/addon_data\\/service.system.docker\\/config/g'\n#\n#\ndiff -Naur a/cmd/dockerd/daemon_unix.go b/cmd/dockerd/daemon_unix.go\n--- a/cmd/dockerd/daemon_unix.go\t2022-06-03 10:30:24.000000000 -0700\n+++ b/cmd/dockerd/daemon_unix.go\t2022-06-07 14:28:05.510327911 -0700\n@@ -25,7 +25,7 @@\n \n func getDefaultDaemonConfigDir() (string, error) {\n \tif !honorXDG {\n-\t\treturn \"/etc/docker\", nil\n+\t\treturn \"/storage/.kodi/userdata/addon_data/service.system.docker/config\", nil\n \t}\n \t// NOTE: CLI uses ~/.docker while the daemon uses ~/.config/docker, because\n \t// ~/.docker was not designed to store daemon configurations.\ndiff -Naur a/integration/plugin/authz/authz_plugin_test.go b/integration/plugin/authz/authz_plugin_test.go\n--- a/integration/plugin/authz/authz_plugin_test.go\t2022-06-03 10:30:24.000000000 -0700\n+++ b/integration/plugin/authz/authz_plugin_test.go\t2022-06-07 14:28:05.570328822 -0700\n@@ -56,15 +56,15 @@\n \tctrl = &authorizationController{}\n \tteardown := setupTest(t)\n \n-\terr := os.MkdirAll(\"/etc/docker/plugins\", 0755)\n+\terr := os.MkdirAll(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins\", 0755)\n \tassert.NilError(t, err)\n \n-\tfileName := fmt.Sprintf(\"/etc/docker/plugins/%s.spec\", testAuthZPlugin)\n+\tfileName := fmt.Sprintf(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec\", testAuthZPlugin)\n \terr = os.WriteFile(fileName, []byte(server.URL), 0644)\n \tassert.NilError(t, err)\n \n \treturn func() {\n-\t\terr := os.RemoveAll(\"/etc/docker/plugins\")\n+\t\terr := os.RemoveAll(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins\")\n \t\tassert.NilError(t, err)\n \n \t\tteardown()\ndiff -Naur a/integration/plugin/graphdriver/external_test.go b/integration/plugin/graphdriver/external_test.go\n--- a/integration/plugin/graphdriver/external_test.go\t2022-06-03 10:30:24.000000000 -0700\n+++ b/integration/plugin/graphdriver/external_test.go\t2022-06-07 14:28:05.570328822 -0700\n@@ -80,7 +80,7 @@\n \n \tsserver.Close()\n \tjserver.Close()\n-\terr := os.RemoveAll(\"/etc/docker/plugins\")\n+\terr := os.RemoveAll(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins\")\n \tassert.NilError(t, err)\n }\n \n@@ -345,10 +345,10 @@\n \t\trespond(w, &graphDriverResponse{Size: size})\n \t})\n \n-\terr = os.MkdirAll(\"/etc/docker/plugins\", 0755)\n+\terr = os.MkdirAll(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins\", 0755)\n \tassert.NilError(t, err)\n \n-\tspecFile := \"/etc/docker/plugins/\" + name + \".\" + ext\n+\tspecFile := \"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/\" + name + \".\" + ext\n \terr = os.WriteFile(specFile, b, 0644)\n \tassert.NilError(t, err)\n }\ndiff -Naur a/integration-cli/docker_cli_external_volume_driver_test.go b/integration-cli/docker_cli_external_volume_driver_test.go\n--- a/integration-cli/docker_cli_external_volume_driver_test.go\t2022-06-03 10:30:24.000000000 -0700\n+++ b/integration-cli/docker_cli_external_volume_driver_test.go\t2022-06-07 14:28:05.556328610 -0700\n@@ -258,10 +258,10 @@\n \t\tsend(w, `{\"Capabilities\": { \"Scope\": \"global\" }}`)\n \t})\n \n-\terr := os.MkdirAll(\"/etc/docker/plugins\", 0755)\n+\terr := os.MkdirAll(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins\", 0755)\n \tassert.NilError(c, err)\n \n-\terr = os.WriteFile(\"/etc/docker/plugins/\"+name+\".spec\", []byte(s.Server.URL), 0644)\n+\terr = os.WriteFile(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/\"+name+\".spec\", []byte(s.Server.URL), 0644)\n \tassert.NilError(c, err)\n \treturn s\n }\n@@ -269,7 +269,7 @@\n func (s *DockerExternalVolumeSuite) TearDownSuite(c *testing.T) {\n \ts.volumePlugin.Close()\n \n-\terr := os.RemoveAll(\"/etc/docker/plugins\")\n+\terr := os.RemoveAll(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins\")\n \tassert.NilError(c, err)\n }\n \n@@ -359,7 +359,7 @@\n \n // Make sure a request to use a down driver doesn't block other requests\n func (s *DockerExternalVolumeSuite) TestExternalVolumeDriverLookupNotBlocked(c *testing.T) {\n-\tspecPath := \"/etc/docker/plugins/down-driver.spec\"\n+\tspecPath := \"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/down-driver.spec\"\n \terr := os.WriteFile(specPath, []byte(\"tcp://127.0.0.7:9999\"), 0644)\n \tassert.NilError(c, err)\n \tdefer os.RemoveAll(specPath)\ndiff -Naur a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/docker_cli_network_unix_test.go\n--- a/integration-cli/docker_cli_network_unix_test.go\t2022-06-03 10:30:24.000000000 -0700\n+++ b/integration-cli/docker_cli_network_unix_test.go\t2022-06-07 14:28:05.558328640 -0700\n@@ -196,14 +196,14 @@\n \t\t}\n \t})\n \n-\terr := os.MkdirAll(\"/etc/docker/plugins\", 0755)\n+\terr := os.MkdirAll(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins\", 0755)\n \tassert.NilError(c, err)\n \n-\tfileName := fmt.Sprintf(\"/etc/docker/plugins/%s.spec\", netDrv)\n+\tfileName := fmt.Sprintf(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec\", netDrv)\n \terr = os.WriteFile(fileName, []byte(url), 0644)\n \tassert.NilError(c, err)\n \n-\tipamFileName := fmt.Sprintf(\"/etc/docker/plugins/%s.spec\", ipamDrv)\n+\tipamFileName := fmt.Sprintf(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec\", ipamDrv)\n \terr = os.WriteFile(ipamFileName, []byte(url), 0644)\n \tassert.NilError(c, err)\n }\n@@ -215,7 +215,7 @@\n \n \ts.server.Close()\n \n-\terr := os.RemoveAll(\"/etc/docker/plugins\")\n+\terr := os.RemoveAll(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins\")\n \tassert.NilError(c, err)\n }\n \ndiff -Naur a/integration-cli/docker_cli_swarm_test.go b/integration-cli/docker_cli_swarm_test.go\n--- a/integration-cli/docker_cli_swarm_test.go\t2022-06-03 10:30:24.000000000 -0700\n+++ b/integration-cli/docker_cli_swarm_test.go\t2022-06-07 14:28:05.561328685 -0700\n@@ -770,14 +770,14 @@\n \t\t}\n \t})\n \n-\terr := os.MkdirAll(\"/etc/docker/plugins\", 0755)\n+\terr := os.MkdirAll(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins\", 0755)\n \tassert.NilError(c, err)\n \n-\tfileName := fmt.Sprintf(\"/etc/docker/plugins/%s.spec\", netDrv)\n+\tfileName := fmt.Sprintf(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec\", netDrv)\n \terr = os.WriteFile(fileName, []byte(url), 0644)\n \tassert.NilError(c, err)\n \n-\tipamFileName := fmt.Sprintf(\"/etc/docker/plugins/%s.spec\", ipamDrv)\n+\tipamFileName := fmt.Sprintf(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins/%s.spec\", ipamDrv)\n \terr = os.WriteFile(ipamFileName, []byte(url), 0644)\n \tassert.NilError(c, err)\n }\n@@ -789,7 +789,7 @@\n \tsetupRemoteGlobalNetworkPlugin(c, mux, s.server.URL, globalNetworkPlugin, globalIPAMPlugin)\n \tdefer func() {\n \t\ts.server.Close()\n-\t\terr := os.RemoveAll(\"/etc/docker/plugins\")\n+\t\terr := os.RemoveAll(\"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins\")\n \t\tassert.NilError(c, err)\n \t}()\n \ndiff -Naur a/libnetwork/drivers/remote/driver_test.go b/libnetwork/drivers/remote/driver_test.go\n--- a/libnetwork/drivers/remote/driver_test.go\t2022-06-03 10:30:24.000000000 -0700\n+++ b/libnetwork/drivers/remote/driver_test.go\t2022-06-07 14:28:05.586329065 -0700\n@@ -41,7 +41,7 @@\n }\n \n func setupPlugin(t *testing.T, name string, mux *http.ServeMux) func() {\n-\tspecPath := \"/etc/docker/plugins\"\n+\tspecPath := \"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins\"\n \tif runtime.GOOS == \"windows\" {\n \t\tspecPath = filepath.Join(os.Getenv(\"programdata\"), \"docker\", \"plugins\")\n \t}\ndiff -Naur a/libnetwork/ipams/remote/remote_test.go b/libnetwork/ipams/remote/remote_test.go\n--- a/libnetwork/ipams/remote/remote_test.go\t2022-06-03 10:30:24.000000000 -0700\n+++ b/libnetwork/ipams/remote/remote_test.go\t2022-06-07 14:28:05.591329141 -0700\n@@ -36,7 +36,7 @@\n }\n \n func setupPlugin(t *testing.T, name string, mux *http.ServeMux) func() {\n-\tspecPath := \"/etc/docker/plugins\"\n+\tspecPath := \"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins\"\n \tif runtime.GOOS == \"windows\" {\n \t\tspecPath = filepath.Join(os.Getenv(\"programdata\"), \"docker\", \"plugins\")\n \t}\ndiff -Naur a/libnetwork/libnetwork_unix_test.go b/libnetwork/libnetwork_unix_test.go\n--- a/libnetwork/libnetwork_unix_test.go\t2022-06-03 10:30:24.000000000 -0700\n+++ b/libnetwork/libnetwork_unix_test.go\t2022-06-07 14:28:05.592329156 -0700\n@@ -3,4 +3,4 @@\n \n package libnetwork_test\n \n-var specPath = \"/etc/docker/plugins\"\n+var specPath = \"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins\"\ndiff -Naur a/pkg/plugins/discovery_unix.go b/pkg/plugins/discovery_unix.go\n--- a/pkg/plugins/discovery_unix.go\t2022-06-03 10:30:24.000000000 -0700\n+++ b/pkg/plugins/discovery_unix.go\t2022-06-07 14:28:05.615329505 -0700\n@@ -9,7 +9,7 @@\n \t\"github.com/docker/docker/pkg/rootless\"\n )\n \n-const globalConfigPluginsPath = \"/etc/docker/plugins\"\n+const globalConfigPluginsPath = \"/storage/.kodi/userdata/addon_data/service.system.docker/config/plugins\"\n const globalLibPluginsPath = \"/usr/lib/docker/plugins\"\n \n var globalSpecsPaths = []string{globalConfigPluginsPath, globalLibPluginsPath}\ndiff -Naur a/pkg/plugins/plugins.go b/pkg/plugins/plugins.go\n--- a/pkg/plugins/plugins.go\t2022-06-03 10:30:24.000000000 -0700\n+++ b/pkg/plugins/plugins.go\t2022-06-07 14:28:05.616329521 -0700\n@@ -4,7 +4,7 @@\n // Docker discovers plugins by looking for them in the plugin directory whenever\n // a user or container tries to use one by name. UNIX domain socket files must\n // be located under /run/docker/plugins, whereas spec files can be located\n-// either under /etc/docker/plugins or /usr/lib/docker/plugins. This is handled\n+// either under /storage/.kodi/userdata/addon_data/service.system.docker/config/plugins or /usr/lib/docker/plugins. This is handled\n // by the Registry interface, which lets you list all plugins or get a plugin by\n // its name if it exists.\n //\ndiff -Naur a/registry/config_unix.go b/registry/config_unix.go\n--- a/registry/config_unix.go\t2022-06-03 10:30:24.000000000 -0700\n+++ b/registry/config_unix.go\t2022-06-07 14:28:05.626329672 -0700\n@@ -6,7 +6,7 @@\n // defaultCertsDir is the platform-specific default directory where certificates\n // are stored. On Linux, it may be overridden through certsDir, for example, when\n // running in rootless mode.\n-const defaultCertsDir = \"/etc/docker/certs.d\"\n+const defaultCertsDir = \"/storage/.kodi/userdata/addon_data/service.system.docker/config/certs.d\"\n \n // cleanPath is used to ensure that a directory name is valid on the target\n // platform. It will be passed in something *similar* to a URL such as\ndiff -Naur a/registry/endpoint_v1.go b/registry/endpoint_v1.go\n--- a/registry/endpoint_v1.go\t2022-06-03 10:30:24.000000000 -0700\n+++ b/registry/endpoint_v1.go\t2022-06-07 14:28:05.627329688 -0700\n@@ -63,7 +63,7 @@\n \t\tif endpoint.IsSecure {\n \t\t\t// If registry is secure and HTTPS failed, show user the error and tell them about `--insecure-registry`\n \t\t\t// in case that's what they need. DO NOT accept unknown CA certificates, and DO NOT fallback to HTTP.\n-\t\t\treturn invalidParamf(\"invalid registry endpoint %s: %v. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry %s` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/%s/ca.crt\", endpoint, err, endpoint.URL.Host, endpoint.URL.Host)\n+\t\t\treturn invalidParamf(\"invalid registry endpoint %s: %v. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry %s` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /storage/.kodi/userdata/addon_data/service.system.docker/config/certs.d/%s/ca.crt\", endpoint, err, endpoint.URL.Host, endpoint.URL.Host)\n \t\t}\n \n \t\t// If registry is insecure and HTTPS failed, fallback to HTTP.\n"
  },
  {
    "path": "packages/addons/addon-depends/docker/moby/patches/moby-002-use-unconfined-seccomp-profile-as-default.patch",
    "content": "--- a/daemon/config/config.go\t2022-06-03 10:30:24.000000000 -0700\n+++ b/daemon/config/config.go\t2022-06-07 14:29:36.755713207 -0700\n@@ -59,7 +59,7 @@\n \tLinuxV2RuntimeName = \"io.containerd.runc.v2\"\n \n \t// SeccompProfileDefault is the built-in default seccomp profile.\n-\tSeccompProfileDefault = \"builtin\"\n+\tSeccompProfileDefault = \"unconfined\"\n \t// SeccompProfileUnconfined is a special profile name for seccomp to use an\n \t// \"unconfined\" seccomp profile.\n \tSeccompProfileUnconfined = \"unconfined\"\n--- a/daemon/daemon_unix.go\t2022-06-03 10:30:24.000000000 -0700\n+++ b/daemon/daemon_unix.go\t2022-06-07 14:34:55.315558083 -0700\n@@ -1711,8 +1711,6 @@\n \n func (daemon *Daemon) setupSeccompProfile() error {\n \tswitch profile := daemon.configStore.SeccompProfile; profile {\n-\tcase \"\", config.SeccompProfileDefault:\n-\t\tdaemon.seccompProfilePath = config.SeccompProfileDefault\n \tcase config.SeccompProfileUnconfined:\n \t\tdaemon.seccompProfilePath = config.SeccompProfileUnconfined\n \tdefault:\n"
  },
  {
    "path": "packages/addons/addon-depends/docker/tini/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tini\"\nPKG_VERSION=\"0.19.0\"\nPKG_SHA256=\"0fd35a7030052acd9f58948d1d900fe1e432ee37103c5561554408bdac6bbf0d\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/krallin/tini\"\nPKG_URL=\"https://github.com/krallin/tini/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Tini is a simplest init system.\"\n\nPKG_MAKE_OPTS_TARGET=\"tini-static\"\n\npre_configure_target(){\n  sed -i \"s|@tini_VERSION_GIT@| - git.${PKG_VERSION}|\" ${PKG_BUILD}/src/tiniConfig.h.in\n}\n\nmakeinstall_target() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/dotnet-runtime-depends/aspnet6-runtime/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"aspnet6-runtime\"\nPKG_VERSION=\"6.0.24\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://dotnet.microsoft.com/\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"ASP.NET Core Runtime enables you to run existing web/server applications.\"\nPKG_TOOLCHAIN=\"manual\"\n\ncase \"${ARCH}\" in\n  \"aarch64\")\n    PKG_SHA256=\"ee6b660b3c8b3fb88eb64690ac78a47752dae68c21647fccdc5f810bc68829ab\"\n    PKG_URL=\"https://download.visualstudio.microsoft.com/download/pr/d562ba2b-8e2c-48e5-9853-f8616a9cb4e4/f4e251ba67b718083c28017e3b0c6349/aspnetcore-runtime-6.0.24-linux-arm64.tar.gz\"\n    ;;\n  \"arm\")\n    PKG_SHA256=\"634b0ecd7312e8a46adedcbff6e1b23e514fa153f7135a6b9f6aefb5851f9d88\"\n    PKG_URL=\"https://download.visualstudio.microsoft.com/download/pr/9c00fe25-e1e0-4390-9061-77d07e95356f/09886ffeaed522c3fa8803e879ce070c/aspnetcore-runtime-6.0.24-linux-arm.tar.gz\"\n    ;;\n  \"x86_64\")\n    PKG_SHA256=\"022dc914af7490bcd2d885edeb5d4c1faa4b771b503b8059d5181f130191cf2c\"\n    PKG_URL=\"https://download.visualstudio.microsoft.com/download/pr/8f5a65c0-9bc8-497d-9ce2-4658c461dc55/b6c01c3cd060552d987501ba6bbde09f/aspnetcore-runtime-6.0.24-linux-x64.tar.gz\"\n    ;;\nesac\nPKG_SOURCE_NAME=\"aspnetcore-runtime_${PKG_VERSION}_${ARCH}.tar.gz\"\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/blindscan-s2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"blindscan-s2\"\nPKG_VERSION=\"28c50c6c3789ea3fcc11b992723d652378c0e925\"\nPKG_SHA256=\"ac766d04bf1a32cf9c74a7ba12070ddf7c4c15bc0a94a0da60d104f2b76f0f9e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/OpenVisionE2/blindscan-s2/\"\nPKG_URL=\"https://github.com/OpenVisionE2/blindscan-s2/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"blindscan-s2 is a program to blindscan digital satellite signals\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  make install BIND=${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/depends/bitstream/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"bitstream\"\nPKG_VERSION=\"1.5\"\nPKG_SHA256=\"45fc5a5a6e4537a69fa8440821e87b76252135180a3070c631b0b36ce0a3b90a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.videolan.org\"\nPKG_URL=\"http://download.videolan.org/pub/videolan/bitstream/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"biTStream is a set of C headers allowing a simpler access to binary structures such as specified by MPEG, DVB, IETF.\"\n\nPKG_MAKEINSTALL_OPTS_TARGET=\"PREFIX=/usr\"\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/depends/libev/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libev\"\nPKG_VERSION=\"4.33\"\nPKG_SHA256=\"507eb7b8d1015fbec5b935f34ebed15bf346bed04a11ab82b8eee848c4205aea\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://software.schmorp.de/pkg/libev.html\"\nPKG_URL=\"http://dist.schmorp.de/libev/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A full-featured and high-performance event loop.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-shared \\\n                           --enable-static\"\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/dvb-apps/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dvb-apps\"\nPKG_VERSION=\"3d43b280298c\"\nPKG_SHA256=\"f39e2f0ebed7e32bce83522062ad4d414f67fccd5df1b647618524497e15e057\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.linuxtv.org/wiki/index.php/LinuxTV_dvb-apps\"\nPKG_URL=\"https://linuxtv.org/hg/dvb-apps/archive/${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Applications for initial setup, testing and operation of an DVB device supporting the DVB-S, DVB-C, DVB-T, and ATSC.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\npre_make_target() {\n  export PERL_USE_UNSAFE_INC=1\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/dvb-apps/patches/dvb-apps-10_reorder-includes.patch",
    "content": "diff -Naur dvb-apps-20090201/util/scan/diseqc.c dvb-apps-20090201a/util/scan/diseqc.c\n--- dvb-apps-20090201/util/scan/diseqc.c\t2009-02-01 13:57:16.000000000 +0100\n+++ dvb-apps-20090201a/util/scan/diseqc.c\t2009-02-14 13:45:42.000000000 +0100\n@@ -1,6 +1,6 @@\n+#include <time.h>\n #include <linux/dvb/frontend.h>\n #include <sys/ioctl.h>\n-#include <time.h>\n \n #include \"scan.h\"\n #include \"diseqc.h\"\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/dvb-apps/patches/dvb-apps-20_build-static-libs.patch",
    "content": "diff --git a/Make.rules b/Make.rules\nindex e867c3a..b2d8663 100644\n--- a/Make.rules\n+++ b/Make.rules\n@@ -9,7 +9,7 @@ ifneq ($(lib_name),)\n CFLAGS_LIB ?= -fPIC\n CFLAGS += $(CFLAGS_LIB)\n \n-libraries = $(lib_name).so $(lib_name).a\n+libraries = $(lib_name).a\n \n .PHONY: library\n \n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/dvb-apps/patches/dvb-apps-30_remove-av7110_loadkeys.patch",
    "content": "diff -Naur a/util/Makefile b/util/Makefile\n--- a/util/Makefile\t2014-03-21 12:26:36.000000000 -0700\n+++ b/util/Makefile\t2015-12-21 01:12:10.261957235 -0800\n@@ -4,7 +4,6 @@\n \n all clean install:\n \t$(MAKE) -C atsc_epg $@\n-\t$(MAKE) -C av7110_loadkeys $@\n \t$(MAKE) -C dib3000-watch $@\n \t$(MAKE) -C dst-utils $@\n \t$(MAKE) -C dvbdate $@\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/dvb-apps/patches/dvb-apps-40-kernel-fix-4.14.patch",
    "content": "From: CvH <namerp@googlemail.com>\nDate: Wed, 22 Nov 2017 23:45:38 +0100\nSubject: [PATCH] fix for kernel >=4.14\n\n---\n include/ca.h              |  1 -\n util/dst-utils/dst_test.c | 14 --------------\n 2 files changed, 15 deletions(-)\n\ndiff --git a/include/ca.h b/include/ca.h\nindex c18537f..5ad21c9 100644\n--- a/include/ca.h\n+++ b/include/ca.h\n@@ -85,6 +85,5 @@ typedef struct ca_pid {\n #define CA_GET_MSG        _IOR('o', 132, ca_msg_t)\n #define CA_SEND_MSG       _IOW('o', 133, ca_msg_t)\n #define CA_SET_DESCR      _IOW('o', 134, ca_descr_t)\n-#define CA_SET_PID        _IOW('o', 135, ca_pid_t)\n \n #endif\ndiff --git a/util/dst-utils/dst_test.c b/util/dst-utils/dst_test.c\nindex 74385de..5cf3bd8 100644\n--- a/util/dst-utils/dst_test.c\n+++ b/util/dst-utils/dst_test.c\n@@ -111,16 +111,6 @@ static int dst_reset(int cafd)\n \treturn 0;\n }\n \n-static int dst_set_pid(int cafd)\n-{\n-\tif ((ioctl(cafd, CA_SET_PID)) < 0) {\n-\t\tprintf(\"%s: ioctl failed ..\\n\", __FUNCTION__);\n-\t\treturn -1;\n-\t}\n-\n-\treturn 0;\n-}\n-\n static int dst_get_descr(int cafd)\n {\n \tif ((ioctl(cafd, CA_GET_DESCR_INFO)) < 0) {\n@@ -229,10 +219,6 @@ int main(int argc, char *argv[])\n \t\t\t\tprintf(\"%s: Reset\\n\", __FUNCTION__);\n \t\t\t\tdst_reset(cafd);\n \t\t\t\tbreak;\n-\t\t\tcase 'p':\n-\t\t\t\tprintf(\"%s: PID\\n\", __FUNCTION__);\n-\t\t\t\tdst_set_pid(cafd);\n-\t\t\t\tbreak;\n \t\t\tcase 'g':\n \t\t\t\tprintf(\"%s: Get Desc\\n\", __FUNCTION__);\n \t\t\t\tdst_get_descr(cafd);\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/dvb-apps/patches/dvb-apps-50-glibc-2.31-fix.patch",
    "content": "From 6e62b334cced721b0b2bed197fd36e44878580ce Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Mon, 3 Feb 2020 23:30:43 +0000\nSubject: [PATCH] replace obsolete stime after glibc-2.31\n\n---\n util/dvbdate/dvbdate.c | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/util/dvbdate/dvbdate.c b/util/dvbdate/dvbdate.c\nindex f0df437..bff7204 100644\n--- a/util/dvbdate/dvbdate.c\n+++ b/util/dvbdate/dvbdate.c\n@@ -309,7 +309,10 @@ int atsc_scan_date(time_t *rx_time, unsigned int to)\n  */\n int set_time(time_t * new_time)\n {\n-\tif (stime(new_time)) {\n+\tstruct timespec ts;\n+\tts.tv_sec = *new_time;\n+\tts.tv_nsec = 0;\n+\tif (clock_settime(CLOCK_REALTIME, &ts) < 0) {\n \t\tperror(\"Unable to set time\");\n \t\treturn -1;\n \t}\n-- \n2.20.1\n\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/dvb-apps/patches/dvb-apps-60-dont-build-tests.patch",
    "content": "diff -ru a/Makefile b/Makefile\n--- a/Makefile\t2014-03-21 20:26:36.000000000 +0100\n+++ b/Makefile\t2022-12-04 20:52:52.827027541 +0100\n@@ -10,7 +10,6 @@\n \n all clean install:\n \t$(MAKE) -C lib $@\n-\t$(MAKE) -C test $@\n \t$(MAKE) -C util $@\n \n update:\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/dvblast/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dvblast\"\nPKG_VERSION=\"4270dcae7b754b25ad27332bb1c55b6b23b85b0d\" # 2021-01-07\nPKG_SHA256=\"6f613b9c5e2582b7bc48458c531c926170726a094a5a93f8d9142a2382c09c58\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.videolan.org/projects/dvblast.html\"\nPKG_URL=\"http://repo.or.cz/dvblast.git/snapshot/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain bitstream libev\"\nPKG_LONGDESC=\"DVBlast is a simple and powerful MPEG-2/TS demux and streaming application\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\npre_configure_target() {\n  export LDFLAGS=\"${LDFLAGS} -lm\"\n  export PREFIX=\"/usr\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/dvbsnoop/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dvbsnoop\"\nPKG_VERSION=\"badf61fcdab1177c1162747be06d035a2b671e9b\"\nPKG_SHA256=\"7f0f5d9ca15c5caae3ca249d95a5fc30cececd16f63e00a1404e0d2368ce56fa\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://dvbsnoop.sourceforge.net/\"\nPKG_URL=\"https://github.com/Duckbox-Developers/dvbsnoop/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"dvbsnoop is a DVB/MPEG stream analyzer program\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/mumudvb/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mumudvb\"\nPKG_VERSION=\"efc815ccecf5a2b9603027c959a4966fe501f6a5\" # 2021-01-06\nPKG_SHA256=\"b3a6f4a5d2f08d31afa46504dc53644ae21d7dbfa320a216efafcf1e7c44cdba\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://mumudvb.net/\"\nPKG_URL=\"https://github.com/braice/MuMuDVB/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libdvbcsa\"\nPKG_LONGDESC=\"MuMuDVB (Multi Multicast DVB) is a program that streams from DVB on a network using multicasting or unicast\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/szap-s2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"szap-s2\"\nPKG_VERSION=\"69ff3584caf9b46f7a551b39b9f9956f8461377c\"\nPKG_SHA256=\"eea8d99d2d5d6403d624acdd9df908a2dd7767dd5469b44e9a281ff863096b32\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://bitbucket.org/updatelee/tune-s2\"\nPKG_URL=\"https://bitbucket.org/CrazyCat/szap-s2/get/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"szap-s2 is a simple zapping tool for the Linux DVB S2 API\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  make install BIND=${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/t2scan/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"t2scan\"\nPKG_VERSION=\"0.7\"\nPKG_SHA256=\"44e4b738a2beed8eb964be3d90b6da48c2d1c672d81fd8db8bbda87bcc433fcb\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/mighty-p/t2scan\"\nPKG_URL=\"https://github.com/mighty-p/t2scan/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A small channel scan tool which generates DVB-T/T2 channels.conf files.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/tune-s2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tune-s2\"\nPKG_VERSION=\"60cc4aaa70b646d38f2e40251860375283c44816\"\nPKG_SHA256=\"e39069a0f2f0930809647052fe1f8c9a13f05af537013b03a99f09ceb9bfb997\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://bitbucket.org/updatelee/tune-s2\"\nPKG_URL=\"https://bitbucket.org/CrazyCat/tune-s2/get/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"tune-s2 is a small linux app to be able to tune a dvb devices\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  make install BIND=${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/w_scan/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"w_scan\"\nPKG_VERSION=\"20170107\"\nPKG_SHA256=\"38e0f38a7bf06cff6d6ea01652ad4ee60da2cb0e937360468f936da785b46ffe\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.gen2vdr.de/wirbel/w_scan/index2.html\"\nPKG_URL=\"https://www.gen2vdr.de/wirbel/w_scan/w_scan-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A channel scan tool which generates ATSC, DVB-C, DVB-S/S2 and DVB-T channels.conf files.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n"
  },
  {
    "path": "packages/addons/addon-depends/dvb-tools-depends/w_scan/patches/w_scan-0001-Fix-building-with-gcc10.patch",
    "content": "From edbabcc7df6cd9e282991bd550d125d7f75bd738 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Mon, 22 Jun 2020 19:42:17 +0200\nSubject: [PATCH] Fix building with gcc10\n\n---\n si_types.h | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/si_types.h b/si_types.h\nindex 5fc7835d80c7..41ce2e1e6603 100644\n--- a/si_types.h\n+++ b/si_types.h\n@@ -114,7 +114,7 @@ struct service {\n   uint32_t logical_channel_number;\n   uint8_t  running;\n   void   * priv;\n-} service_t, * p_service_t;\n+};\n \n /*******************************************************************************\n /* transponder type.\n@@ -201,7 +201,7 @@ struct transponder {\n   /*----------------------------*/\n   char * network_name;\n   network_change_t network_change;\n-} __attribute__((packed))  transponder_t, * p_transponder_t;\n+} __attribute__((packed));\n \n /*******************************************************************************\n /* satellite channel routing type.\n-- \n2.27.0\n\n"
  },
  {
    "path": "packages/addons/addon-depends/enca/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"enca\"\nPKG_VERSION=\"1.19\"\nPKG_SHA256=\"3a487eca40b41021e2e4b7a6440b97d822e6532db5464471f572ecf77295e8b8\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://freshmeat.net/projects/enca/\"\nPKG_URL=\"http://dl.cihar.com/enca/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Enca detects the encoding of text files, on the basis of knowledge of their language.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_MAKEINSTALL_OPTS_TARGET=\"-C lib\"\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_file__dev_random=yes \\\n                           ac_cv_file__dev_urandom=no \\\n                           ac_cv_file__dev_srandom=no \\\n                           ac_cv_file__dev_arandom=no \\\n                           CPPFLAGS=\"-I${SYSROOT_PREFIX}/usr/include\" \\\n                           --disable-shared \\\n                           --enable-static \\\n                           --disable-external \\\n                           --without-librecode \\\n                           --disable-rpath \\\n                           --with-gnu-ld\"\n\npre_make_target() {\n  make CC=\"${HOST_CC}\" \\\n       CPPFLAGS=\"${HOST_CPPFLAGS}\" \\\n       CFLAGS=\"${HOST_CFLAGS}\" \\\n       LDFLAGS=\"${HOST_LDFLAGS}\" \\\n       -C tools\n}\n\npost_makeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n    cp enca.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/enet/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"enet\"\nPKG_VERSION=\"8d69c5abe4b699e7077395e01927bd102b3ba597\" # 12 Jun 2021\nPKG_SHA256=\"4da28dc923828f2241f9086009c87d9679cb52bb3085305754cbcac33a06f312\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/cgutman/enet/\"\nPKG_URL=\"https://github.com/cgutman/enet/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A network communication layer on top of UDP (User Datagram Protocol).\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared\"\n\npost_makeinstall_target() {\n  rm -r ${INSTALL}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/faad2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"faad2\"\nPKG_VERSION=\"2.10.1\"\nPKG_SHA256=\"4c16c71295ca0cbf7c3dfe98eb11d8fa8d0ac3042e41604cfd6cc11a408cf264\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/knik0/faad2/\"\nPKG_URL=\"https://github.com/knik0/faad2/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"An MPEG-4 AAC decoder.\"\nPKG_TOOLCHAIN=\"configure\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           --without-drm \\\n                           --with-gnu-ld \\\n                           --without-mpeg4ip \\\n                           --without-xmms\"\npre_configure_target() {\n  ./bootstrap\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/ffmpegx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ffmpegx\"\nPKG_VERSION=\"4.4.3\"\nPKG_SHA256=\"6c5b6c195e61534766a0b5fe16acc919170c883362612816d0a1c7f4f947006e\"\nPKG_LICENSE=\"LGPLv2.1+\"\nPKG_SITE=\"https://ffmpeg.org\"\nPKG_URL=\"https://ffmpeg.org/releases/ffmpeg-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain aom bzip2 openssl lame libvorbis opus x264 zlib\"\nPKG_LONGDESC=\"FFmpegx is an complete FFmpeg build to support encoding and decoding.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\n# Dependencies\nget_graphicdrivers\n\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  PKG_DEPENDS_TARGET+=\" nasm:host x265\"\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"(crocus|i915|iris)\"; then\n    PKG_DEPENDS_TARGET+=\" intel-vaapi-driver\"\n  fi\nfi\n\nif [[ ! ${TARGET_ARCH} = arm ]] || target_has_feature neon; then\n  PKG_DEPENDS_TARGET+=\" libvpx\"\nfi\n\n# X11 grab for screen recording\nif [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n  PKG_DEPENDS_TARGET+=\" libxcb libX11\"\nfi\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n\n# HW encoders\n\n  # Generic\n  if [[ \"${TARGET_ARCH}\" = \"x86_64\" ]]; then\n    PKG_FFMPEG_HW_ENCODERS_GENERIC=\"\\\n    `#Video encoders` \\\n    --enable-encoder=h264_vaapi \\\n    --enable-encoder=hevc_vaapi \\\n    --enable-encoder=mjpeg_vaapi \\\n    --enable-encoder=mpeg2_vaapi \\\n    --enable-encoder=vp8_vaapi \\\n    --enable-encoder=vp9_vaapi \\\n    --disable-encoder=h264_nvenc \\\n    --disable-encoder=hevc_nvenc \\\n    \\\n    `#Video hwaccel` \\\n    --enable-hwaccel=h263_vaapi \\\n    --enable-hwaccel=h264_vaapi \\\n    --enable-hwaccel=hevc_vaapi \\\n    --enable-hwaccel=mjpeg_vaapi \\\n    --enable-hwaccel=mpeg2_vaapi \\\n    --enable-hwaccel=mpeg4_vaapi \\\n    --enable-hwaccel=vc1_vaapi \\\n    --enable-hwaccel=vp8_vaapi \\\n    --enable-hwaccel=vp9_vaapi \\\n    --enable-hwaccel=wmv3_vaapi\"\n\n    PKG_FFMPEG_X26x_GENERIC=\"\\\n    --enable-libx264 \\\n    --enable-encoder=x264 \\\n    --enable-libx265 \\\n    --enable-encoder=x265\"\n  fi\n\n# Encoders\n    PKG_FFMPEG_ENCODERS=\"\\\n    `#Video encoders` \\\n    --enable-libvpx \\\n    --enable-encoder=libvpx_vp8 \\\n    --enable-encoder=libvpx_vp9 \\\n    ${PKG_FFMPEG_X26x_GENERIC} \\\n    --enable-libaom \\\n    --enable-encoder=libaom_av1 \\\n    \\\n    `#Audio encoders` \\\n    --enable-encoder=aac \\\n    --enable-encoder=ac3 \\\n    --enable-encoder=eac3 \\\n    --enable-encoder=flac \\\n    --enable-libmp3lame \\\n    --enable-encoder=libmp3lame \\\n    --enable-libopus \\\n    --enable-encoder=libopus \\\n    --enable-libvorbis \\\n    --enable-encoder=libvorbis\"\n\n# X11 grab for screen recording\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_FFMPEG_LIBS+=\" -lX11\"\n    PKG_FFMPEG_X11_GRAB=\"\\\n    --enable-libxcb \\\n    --enable-libxcb-shm \\\n    --enable-libxcb-xfixes \\\n    --enable-libxcb-shape\"\n  else\n    PKG_FFMPEG_X11_GRAB=\"\\\n    --disable-libxcb \\\n    --disable-libxcb-shm \\\n    --disable-libxcb-xfixes \\\n    --disable-libxcb-shape\"\n  fi\n}\n\nconfigure_target() {\n  ./configure \\\n    \\\n    `#Programs to build` \\\n    --enable-ffmpeg \\\n    --disable-ffplay \\\n    --enable-ffprobe \\\n    \\\n    `#Static and Shared` \\\n    --enable-static \\\n    --pkg-config-flags=\"--static\" \\\n    --disable-shared \\\n    \\\n    `#Licensing options` \\\n    --enable-gpl \\\n    --enable-version3 \\\n    \\\n    `#Documentation options` \\\n    --disable-doc \\\n    \\\n    `#Hardware accelerated decoding encoding` \\\n    ${PKG_FFMPEG_HW_ENCODERS_GENERIC} \\\n    \\\n    ${PKG_FFMPEG_ENCODERS} \\\n    \\\n    `#General options` \\\n    --enable-avresample \\\n    --disable-lzma \\\n    --disable-alsa \\\n    ${PKG_FFMPEG_X11_GRAB} \\\n    \\\n    `#Toolchain options` \\\n    --arch=\"${TARGET_ARCH}\" \\\n    --cpu=\"${TARGET_CPU}\" \\\n    --cross-prefix=\"${TARGET_PREFIX}\" \\\n    --enable-cross-compile \\\n    --sysroot=\"${SYSROOT_PREFIX}\" \\\n    --sysinclude=\"${SYSROOT_PREFIX}/usr/include\" \\\n    --target-os=\"linux\" \\\n    --nm=\"${NM}\" \\\n    --ar=\"${AR}\" \\\n    --as=\"${CC}\" \\\n    --cc=\"${CC}\" \\\n    --ld=\"${CC}\" \\\n    --pkg-config=\"${TOOLCHAIN}/bin/pkg-config\" \\\n    --host-cc=\"${HOST_CC}\" \\\n    --host-cflags=\"${HOST_CFLAGS}\" \\\n    --host-ldflags=\"${HOST_LDFLAGS}\" \\\n    --host-extralibs=\"-lm\" \\\n    --extra-cflags=\"${CFLAGS}\" \\\n    --extra-ldflags=\"${LDFLAGS}\" \\\n    --extra-libs=\"${PKG_FFMPEG_LIBS}\" \\\n    --enable-pic \\\n    --disable-gnutls \\\n    --enable-openssl \\\n    \\\n    `#Advanced options` \\\n    --disable-hardcoded-tables \\\n\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/ffmpegx/patches/ffmpeg-openssl3.patch",
    "content": "From 1d23e125b6f76e74b754560c3b6931507cacddce Mon Sep 17 00:00:00 2001\nFrom: Timo Rothenpieler <timo@rothenpieler.org>\nDate: Tue, 7 Sep 2021 19:35:31 +0200\nSubject: [PATCH] configure: account for openssl3 license change\n\n---\n configure | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/configure b/configure\nindex c87a010387..ed7345b2c1 100755\n--- a/configure\n+++ b/configure\n@@ -1765,7 +1765,6 @@ EXTERNAL_LIBRARY_GPL_LIST=\"\n EXTERNAL_LIBRARY_NONFREE_LIST=\"\n     decklink\n     libfdk_aac\n-    openssl\n     libtls\n \"\n \n@@ -1857,6 +1856,7 @@ EXTERNAL_LIBRARY_LIST=\"\n     mediacodec\n     openal\n     opengl\n+    openssl\n     pocketsphinx\n     vapoursynth\n \"\n@@ -6572,7 +6572,10 @@ enabled omx_rpi           && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoR\n                                die \"ERROR: OpenMAX IL headers from raspberrypi/firmware not found\"; } &&\n                              enable omx\n enabled omx               && require_headers OMX_Core.h\n-enabled openssl           && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||\n+enabled openssl           && { { check_pkg_config openssl \"openssl >= 3.0.0\" openssl/ssl.h OPENSSL_init_ssl &&\n+                                 { enabled gplv3 || ! enabled gpl || enabled nonfree || die \"ERROR: OpenSSL >=3.0.0 requires --enable-version3\"; }; } ||\n+                               { enabled gpl && ! enabled nonfree && die \"ERROR: OpenSSL <3.0.0 is incompatible with the gpl\"; } ||\n+                               check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||\n                                check_pkg_config openssl openssl openssl/ssl.h SSL_library_init ||\n                                check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||\n                                check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/addons/addon-depends/ffmpegx-depends/x264/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"x264\"\nPKG_VERSION=\"baee400fa9ced6f5481a728138fed6e867b0ff7f\" # r3095 stable 2022-06-01\nPKG_SHA256=\"ce6623b8b289765daee04a297c2fd1a293cb2565a1749c76d66c8d72c7ddc1ab\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.videolan.org/developers/x264.html\"\nPKG_URL=\"https://code.videolan.org/videolan/x264/-/archive/${PKG_VERSION}/x264-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"x264 codec\"\n\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  PKG_DEPENDS_TARGET+=\" nasm:host\"\nfi\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n\n  if [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n    export AS=\"${TOOLCHAIN}/bin/nasm\"\n  else\n    PKG_X264_ASM=\"--disable-asm\"\n  fi\n}\n\nconfigure_target() {\n  ./configure \\\n    --cross-prefix=\"${TARGET_PREFIX}\" \\\n    --extra-cflags=\"${CFLAGS}\" \\\n    --extra-ldflags=\"${LDFLAGS}\" \\\n    --host=\"${TARGET_NAME}\" \\\n    --prefix=\"/usr\" \\\n    --sysroot=\"${SYSROOT_PREFIX}\" \\\n    ${PKG_X264_ASM} \\\n    --disable-cli \\\n    --enable-lto \\\n    --enable-pic \\\n    --enable-shared \\\n    --enable-strip\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/ffmpegx-depends/x265/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"x265\"\nPKG_VERSION=\"3.5\"\nPKG_SHA256=\"7ebc5d2de6ce5dfefb434e422e59a0c4715fe939c784ac2f3d41af5775adc706\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.videolan.org/developers/x265.html\"\nPKG_URL=\"https://bitbucket.org/multicoreware/x265_git/get/${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"x265 is a H.265/HEVC video encoder application library\"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\n  LDFLAGS+=\" -ldl\"\n  cmake -DCMAKE_INSTALL_PREFIX=/usr -G \"Unix Makefiles\" ./source\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/game-tools/bchunk/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"bchunk\"\nPKG_VERSION=\"1.2.2\"\nPKG_SHA256=\"e7d99b5b60ff0b94c540379f6396a670210400124544fb1af985dd3551eabd89\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://he.fi/bchunk/\"\nPKG_URL=\"http://he.fi/bchunk/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Tool to convert a CD image in a .bin/.cue format to a set of .iso and .cdr tracks.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nmake_target() {\n  make ${PKG_MAKE_OPTS_TARGET} CC=${CC} LD=${CC}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp -p bchunk ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/game-tools/ecm-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ecm-tools\"\nPKG_VERSION=\"1.0.3\"\nPKG_SHA256=\"7b7475789603e64c7ae3ddcb0e95f09640ba37a7f13b29c8e8f2f4087bd872c9\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/alucryd/ecm-tools\"\nPKG_URL=\"https://github.com/alucryd/ecm-tools/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Error Code Modeler.s\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n"
  },
  {
    "path": "packages/addons/addon-depends/game-tools/iat/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"iat\"\nPKG_VERSION=\"0.1.7\"\nPKG_SHA256=\"fb72c42f4be18107ec1bff8448bd6fac2a3926a574d4950a4d5120f0012d62ca\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://sourceforge.net/projects/iat.berlios/\"\nPKG_URL=\"https://sourceforge.net/projects/iat.berlios/files/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Iso9660 Analyzer Tool to detect many structures of image file.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_func_malloc_0_nonnull=yes\"\n"
  },
  {
    "path": "packages/addons/addon-depends/game-tools/linuxconsoletools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"linuxconsoletools\"\nPKG_VERSION=\"1.8.1\"\nPKG_SHA256=\"4da29745c782b7db18f5f37c49e77bf163121dd3761e2fc7636fa0cbf35c2456\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://sourceforge.net/projects/linuxconsole/\"\nPKG_URL=\"http://prdownloads.sourceforge.net/linuxconsole/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Set of utilities for joysticks and serial devices.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_MAKE_OPTS_TARGET=\"SYSTEMD_SUPPORT=0\"\n\nmakeinstall_target() {\n  make install PREFIX=\"/usr\" DESTDIR=\"${INSTALL}\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/game-tools/linuxconsoletools/patches/linuxconsoletools-0001-disable-building-ffmvforce.patch",
    "content": "diff -Naur a/utils/Makefile b/utils/Makefile\n--- a/utils/Makefile\t2022-05-21 09:44:47.000000000 +0000\n+++ b/utils/Makefile\t2022-05-21 18:58:51.363206817 +0000\n@@ -37,7 +37,7 @@\n endif\n \n ifndef DISABLE_FORCEFEEDBACK\n-PROGRAMS\t+= fftest ffmvforce ffset ffcfstress\n+PROGRAMS\t+= fftest ffset ffcfstress\n endif\n \n PREFIX          ?= /usr/local\n"
  },
  {
    "path": "packages/addons/addon-depends/go/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"go\"\nPKG_VERSION=\"1.21.4\"\nPKG_SHA256=\"13b2395f666e77234d0731ec82c008a584ef0408ca32e52fe95b98f02f32db17\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://golang.org\"\nPKG_URL=\"https://github.com/golang/go/archive/${PKG_NAME}${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain\"\nPKG_LONGDESC=\"An programming language that makes it easy to build simple, reliable, and efficient software.\"\nPKG_TOOLCHAIN=\"manual\"\n\nconfigure_host() {\n  export GOOS=linux\n  export GOROOT_FINAL=${TOOLCHAIN}/lib/golang\n  if [ -x /usr/lib/go/bin/go ]; then\n    export GOROOT_BOOTSTRAP=/usr/lib/go\n  else\n    export GOROOT_BOOTSTRAP=/usr/lib/golang\n  fi\n  export GOARCH=amd64\n\n  if [ ! -d ${GOROOT_BOOTSTRAP} ]; then\n    cat <<EOF\n####################################################################\n# On Fedora 'dnf install golang' will install go to /usr/lib/golang\n#\n# On Ubuntu you need to install golang:\n# $ sudo apt install golang-go\n####################################################################\nEOF\n    return 1\n  fi\n}\n\nmake_host() {\n  cd ${PKG_BUILD}/src\n  bash make.bash --no-banner\n}\n\npre_makeinstall_host() {\n  # need to cleanup old golang version when updating to a new version\n  rm -rf ${TOOLCHAIN}/lib/golang\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/lib/golang\n  cp -av ${PKG_BUILD}/* ${TOOLCHAIN}/lib/golang/\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/go/patches/go-0001-add-ca-cert-location.patch",
    "content": "diff --git a/src/crypto/x509/root_linux.go b/src/crypto/x509/root_linux.go\nindex ad6ce5cae7..763c686fed 100644\n--- a/src/crypto/x509/root_linux.go\n+++ b/src/crypto/x509/root_linux.go\n@@ -20,4 +20,5 @@ var certDirectories = []string{\n \t\"/etc/ssl/certs\",               // SLES10/SLES11, https://golang.org/issue/12139\n \t\"/etc/pki/tls/certs\",           // Fedora/RHEL\n \t\"/system/etc/security/cacerts\", // Android\n+\t\"/etc/ssl\",                     // LibreELEC\n }\n"
  },
  {
    "path": "packages/addons/addon-depends/hidapi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"hidapi\"\nPKG_VERSION=\"0.14.0\"\nPKG_SHA256=\"a5714234abe6e1f53647dd8cba7d69f65f71c558b7896ed218864ffcf405bcbd\"\nPKG_LICENSE=\"HIDAPI-orig\"\nPKG_SITE=\"http://libusb.info/\"\nPKG_URL=\"https://github.com/libusb/hidapi/archive/refs/tags/hidapi-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libusb\"\nPKG_LONGDESC=\"HIDAPI is a multi-platform library which allows an application to interface with USB and Bluetooth HID-Class devices.\"\nPKG_TOOLCHAIN=\"cmake\"\n"
  },
  {
    "path": "packages/addons/addon-depends/icu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"icu\"\nPKG_VERSION=\"72.1\"\nPKG_SHA256=\"43cbad628d98f37a3f95f6c34579f9144ef4bde60248fa6004a4f006d7487e69\"\nPKG_LICENSE=\"Custom\"\nPKG_SITE=\"https://icu.unicode.org\"\nPKG_URL=\"https://github.com/unicode-org/icu/archive/release-${PKG_VERSION//./-}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain icu:host\"\nPKG_LONGDESC=\"International Components for Unicode library.\"\nPKG_TOOLCHAIN=\"configure\"\n\nconfigure_package() {\n  PKG_CONFIGURE_SCRIPT=\"${PKG_BUILD}/icu4c/source/configure\"\n  PKG_CONFIGURE_OPTS_TARGET=\"--disable-layout \\\n                             --disable-layoutex \\\n                             --enable-renaming \\\n                             --disable-samples \\\n                             --disable-tests \\\n                             --disable-tools \\\n                             --with-cross-build=${PKG_BUILD}/.${HOST_NAME}\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/icu/patches/icu-01_ldflags.patch",
    "content": "diff -Naur icu4c-67-1/icu-release-67-1/icu4c/source/config/mh-linux icu4c-67-1-ldflags/icu-release-67-1/icu4c/source/config/mh-linux\n--- icu-release-67-1/icu4c/source/config/mh-linux\t2020-04-22 19:49:10.000000000 +0200\n+++ icu-release-67-1.ldflags/icu4c/source/config/mh-linux\t2020-09-05 17:58:05.635014182 +0200\n@@ -23,7 +23,7 @@\n LD_RPATH_PRE = -Wl,-rpath,\n \n ## These are the library specific LDFLAGS\n-LDFLAGSICUDT=-nodefaultlibs -nostdlib\n+#LDFLAGSICUDT=-nodefaultlibs -nostdlib\n \n ## Compiler switch to embed a library name\n # The initial tab in the next line is to prevent icu-config from reading it.\n"
  },
  {
    "path": "packages/addons/addon-depends/inadyn/libconfuse/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libconfuse\"\nPKG_VERSION=\"3.3\"\nPKG_SHA256=\"cb90c06f2dbec971792af576d5b9a382fb3c4ca2b1deea55ea262b403f4e641e\"\nPKG_LICENSE=\"ISC\"\nPKG_SITE=\"https://github.com/libconfuse/libconfuse\"\nPKG_URL=\"https://github.com/libconfuse/libconfuse/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Small configuration file parser library for C\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared\"\n"
  },
  {
    "path": "packages/addons/addon-depends/inadyn/libconfuse/patches/gettext-0.20-libconfuse.patch",
    "content": "--- libconfuse-3.3/configure.ac\t2020-06-25 05:21:59.000000000 +0000\n+++ libconfuse-3.3/configure.ac\t2020-12-29 02:04:36.074750823 +0000\n@@ -29,7 +29,8 @@\n # Unfortunately CentOS7, RHEL7 ships 0.18.2.1, so for best compat.\n # level at this point in time we set 0.18.2.\n AM_GNU_GETTEXT([external])\n AM_GNU_GETTEXT_VERSION([0.18.2])\n+AM_GNU_GETTEXT_REQUIRE_VERSION([0.18.2])\n \n # Checks for header files.\n AC_HEADER_STDC\n"
  },
  {
    "path": "packages/addons/addon-depends/jre-depends/apache-ant/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Peter Vicman (peter.vicman@gmail.com)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"apache-ant\"\nPKG_VERSION=\"1.10.15\"\nPKG_SHA256=\"4d5bb20cee34afbad17782de61f4f422c5a03e4d2dffc503bcbd0651c3d3c396\"\nPKG_LICENSE=\"Apache License 2.0\"\nPKG_SITE=\"https://ant.apache.org/\"\nPKG_URL=\"https://downloads.apache.org/ant/binaries/${PKG_NAME}-${PKG_VERSION}-bin.tar.xz\"\nPKG_DEPENDS_UNPACK=\"jdk-x86_64-zulu\"\nPKG_LONGDESC=\"Apache Ant is a Java library and command-line tool that help building software.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/apache-ant/bin\n  mkdir -p ${TOOLCHAIN}/apache-ant/lib\n    cp bin/ant ${TOOLCHAIN}/apache-ant/bin\n    cp lib/*.jar ${TOOLCHAIN}/apache-ant/lib\n  mkdir -p ${TOOLCHAIN}/bin\n    ln -sf ${TOOLCHAIN}/apache-ant/bin/ant ${TOOLCHAIN}/bin/ant\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/jre-depends/jdk-aarch64-zulu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Peter Vicman (peter.vicman@gmail.com)\n\nPKG_NAME=\"jdk-aarch64-zulu\"\nPKG_VERSION=\"8.38.0.162-1.8.0_212\"\nPKG_SHA256=\"2afa6b9a86fea6f9275856506b5cc1efd8420f674c5e2dc3e1b04e140d6ad852\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://www.azul.com/products/zulu-embedded/\"\nPKG_URL=\"http://cdn.azul.com/zulu-embedded/bin/zulu${PKG_VERSION%%-*}-ca-jdk${PKG_VERSION##*-}-linux_aarch64.tar.gz\"\nPKG_LONGDESC=\"Zulu, the open Java(TM) platform from Azul Systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  rm -f ${PKG_BUILD}/src.zip\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/jre-depends/jdk-arm-zulu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Peter Vicman (peter.vicman@gmail.com)\n\nPKG_NAME=\"jdk-arm-zulu\"\nPKG_VERSION=\"8.38.0.163-1.8.0_212\"\nPKG_SHA256=\"bc45f41eab6e55c4e740e980001831c5e35db85745ec61a2b110e816e1074715\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://www.azul.com/products/zulu-embedded/\"\nPKG_URL=\"https://cdn.azul.com/zulu-embedded/bin/zulu${PKG_VERSION%%-*}-ca-jdk${PKG_VERSION##*-}-linux_aarch32hf.tar.gz\"\nPKG_LONGDESC=\"Zulu, the open Java(TM) platform from Azul Systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  rm -f ${PKG_BUILD}/src.zip\n\n  # libbluray needs arm/server\n  mv ${PKG_BUILD}/jre/lib/aarch32    ${PKG_BUILD}/jre/lib/arm\n  mv ${PKG_BUILD}/jre/lib/arm/client ${PKG_BUILD}/jre/lib/arm/server\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/jre-depends/jdk-x86_64-zulu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Peter Vicman (peter.vicman@gmail.com)\n\nPKG_NAME=\"jdk-x86_64-zulu\"\nPKG_VERSION=\"8.38.0.13-8.0.212\"\nPKG_SHA256=\"568e7578f1b20b1e62a8ed2c374bad4eb0e75d221323ccfa6ba8d7bc56cf33cf\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://www.azul.com/products/zulu-enterprise/\"\nPKG_URL=\"https://cdn.azul.com/zulu/bin/zulu${PKG_VERSION%%-*}-ca-jdk${PKG_VERSION##*-}-linux_x64.tar.gz\"\nPKG_LONGDESC=\"Zulu, the open Java(TM) platform from Azul Systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  rm -f ${PKG_BUILD}/src.zip\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/jre-depends/jre-libXinerama/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n. $(get_pkg_directory libXinerama)/package.mk\n\nPKG_NAME=\"jre-libXinerama\"\nPKG_LONGDESC=\"libXinerama for JRE\"\nPKG_URL=\"\"\nPKG_DEPENDS_UNPACK+=\" libXinerama\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET+=\" --disable-static --enable-shared\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME:4}/${PKG_NAME:4}-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/jre-depends/jre-libbluray/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n. $(get_pkg_directory libbluray)/package.mk\n\nPKG_NAME=\"jre-libbluray\"\nPKG_DEPENDS_TARGET+=\" apache-ant:host\"\nPKG_LONGDESC=\"libbluray jar for BD-J menus\"\nPKG_URL=\"\"\nPKG_DEPENDS_UNPACK+=\" jdk-x86_64-zulu libbluray\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libbluray)/patches\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME:4}/${PKG_NAME:4}-${PKG_VERSION}.tar.bz2 -C ${PKG_BUILD}\n}\n\npre_configure_target() {\n  export JAVA_HOME=\"$(get_build_dir jdk-x86_64-zulu)\"\n\n  # build also jar\n  PKG_CONFIGURE_OPTS_TARGET=\"${PKG_CONFIGURE_OPTS_TARGET/disable-bdjava-jar/enable-bdjava-jar}\"\n}\n\nmake_target() {\n  make all-local\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/lcdd-depends/libugpio/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libugpio\"\nPKG_VERSION=\"0.0.7\"\nPKG_SHA256=\"4f486b36d87da070cb3afbe8d077081b27f670cb4cb67698d1b79740b6e604b3\"\nPKG_LICENSE=\"LGPLv2.1\"\nPKG_SITE=\"https://github.com/mhei/libugpio\"\nPKG_URL=\"https://github.com/mhei/${PKG_NAME}/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux:host\"\nPKG_LONGDESC=\"A software library to ease the use of linux kernel's sysfs gpio interface from C programs and/or other libraries.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared\"\n"
  },
  {
    "path": "packages/addons/addon-depends/lcdd-depends/serdisplib/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"serdisplib\"\nPKG_VERSION=\"2.02\"\nPKG_SHA256=\"447b74007dc157b0378044245649850b26432b9185b6540ff681fcb0765c4d8b\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://serdisplib.sourceforge.net/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libusb-compat\"\nPKG_LONGDESC=\"Library to drive serial/parallel/usb displays with built-in controllers.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--prefix=${SYSROOT_PREFIX}/usr \\\n                           --bindir=${SYSROOT_PREFIX}/usr/bin \\\n                           --enable-libusb \\\n                           --disable-libSDL \\\n                           --with-drivers=all\"\n\npre_configure_target() {\n  # serdisplib fails to build in subdirs\n  cd ${PKG_BUILD}\n    rmdir .${TARGET_NAME}\n\n  # use libusb-config from sysroot\n  export ac_cv_path_LIBUSB_CONFIG=${SYSROOT_PREFIX}/usr/bin/libusb-config\n}\n\nmakeinstall_target() {\n  # copy necessary libs and headers to build serdisplib support\n  # into the driver glcd from lcdproc\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/serdisplib\n  cp include/serdisplib/*.h ${SYSROOT_PREFIX}/usr/include/serdisplib\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n  cp lib/libserdisp.so* ${SYSROOT_PREFIX}/usr/lib\n\n  mkdir -p ${INSTALL}/usr/lib\n  cp lib/libserdisp.so* ${INSTALL}/usr/lib\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/libconfig/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libconfig\"\nPKG_VERSION=\"1.7.3\"\nPKG_SHA256=\"68757e37c567fd026330c8a8449aa5f9cac08a642f213f2687186b903bd7e94e\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://github.com/hyperrealm/libconfig\"\nPKG_URL=\"https://github.com/hyperrealm/libconfig/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A C/C++ configuration file library.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           --disable-doc \\\n                           --disable-examples \\\n                           --disable-tests \\\n                           --with-sysroot=${SYSROOT_PREFIX}\"\n\npre_configure_target() {\n  cd ..\n  rm -rf .${TARGET_NAME}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/libdvbcsa/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libdvbcsa\"\nPKG_VERSION=\"2a1e61e569a621c55c2426f235f42c2398b7f18f\" # 2018-01-29\nPKG_SHA256=\"0cca50576222475afd6945fc883ee19870656a73353eb0b219078671abaf3fbb\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://www.videolan.org/developers/libdvbcsa.html\"\nPKG_URL=\"https://github.com/glenvt18/libdvbcsa/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A implementation of DVB/CSA, with encryption and decryption capabilities.\"\nPKG_TOOLCHAIN=\"autotools\"\n# libdvbcsa is a bit faster without LTO, and tests will fail with gcc-5.x\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-shared --enable-static --with-sysroot=${SYSROOT_PREFIX}\"\n\nif target_has_feature neon; then\n  PKG_CONFIGURE_OPTS_TARGET+=\" --enable-neon\"\nelif [ \"${TARGET_ARCH}\" = x86_64  ]; then\n  if target_has_feature ssse3; then\n    PKG_CONFIGURE_OPTS_TARGET+=\" --enable-ssse3\"\n  elif target_has_feature sse2; then\n    PKG_CONFIGURE_OPTS_TARGET+=\" --enable-sse2\"\n  else\n    PKG_CONFIGURE_OPTS_TARGET+=\" --enable-uint64\"\n  fi\nfi\n"
  },
  {
    "path": "packages/addons/addon-depends/libexif/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libexif\"\nPKG_VERSION=\"0.6.24\"\nPKG_SHA256=\"d47564c433b733d83b6704c70477e0a4067811d184ec565258ac563d8223f6ae\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://libexif.github.io\"\nPKG_URL=\"https://github.com/libexif/libexif/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A library to parse an EXIF file and read the data from those tags.\"\n"
  },
  {
    "path": "packages/addons/addon-depends/libhdhomerun/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libhdhomerun\"\nPKG_VERSION=\"20210624\"\nPKG_SHA256=\"deaf463bbcc3eefa72f97199efb6213f7b0e2c8e91f1b3d2cbf52056a8715d15\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"http://www.silicondust.com\"\nPKG_URL=\"https://download.silicondust.com/hdhomerun/libhdhomerun_${PKG_VERSION}.tgz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"The library provides functionality to setup the HDHomeRun.\"\n\nPKG_MAKE_OPTS_TARGET=\"CROSS_COMPILE=${TARGET_PREFIX}\"\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/hdhomerun\n    cp *.h ${SYSROOT_PREFIX}/usr/include/hdhomerun\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n    cp libhdhomerun.a ${SYSROOT_PREFIX}/usr/lib\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/libhdhomerun/patches/shared-to-static.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -1,16 +1,17 @@\n \n-LIBSRCS += hdhomerun_channels.c\n-LIBSRCS += hdhomerun_channelscan.c\n-LIBSRCS += hdhomerun_control.c\n-LIBSRCS += hdhomerun_debug.c\n-LIBSRCS += hdhomerun_device.c\n-LIBSRCS += hdhomerun_device_selector.c\n-LIBSRCS += hdhomerun_discover.c\n-LIBSRCS += hdhomerun_os_posix.c\n-LIBSRCS += hdhomerun_pkt.c\n-LIBSRCS += hdhomerun_sock_posix.c\n-LIBSRCS += hdhomerun_video.c\n+LIBSRCS += hdhomerun_channels.o\n+LIBSRCS += hdhomerun_channelscan.o\n+LIBSRCS += hdhomerun_control.o\n+LIBSRCS += hdhomerun_debug.o\n+LIBSRCS += hdhomerun_device.o\n+LIBSRCS += hdhomerun_device_selector.o\n+LIBSRCS += hdhomerun_discover.o\n+LIBSRCS += hdhomerun_os_posix.o\n+LIBSRCS += hdhomerun_pkt.o\n+LIBSRCS += hdhomerun_sock_posix.o\n+LIBSRCS += hdhomerun_video.o\n \n+AR    := $(CROSS_COMPILE)ar\n CC    := $(CROSS_COMPILE)gcc\n STRIP := $(CROSS_COMPILE)strip\n \n@@ -38,14 +39,17 @@ else\n   endif\n endif\n \n-all : hdhomerun_config$(BINEXT) libhdhomerun$(LIBEXT)\n+all : hdhomerun_config$(BINEXT) libhdhomerun.a\n+\n+%.o: %.c\n+\t$(CC) $(CFLAGS) -fPIC -c -o $@ $<\n \n hdhomerun_config$(BINEXT) : hdhomerun_config.c $(LIBSRCS)\n \t$(CC) $(CFLAGS) $+ $(LDFLAGS) -o $@\n \t$(STRIP) $@\n \n-libhdhomerun$(LIBEXT) : $(LIBSRCS)\n-\t$(CC) $(CFLAGS) -fPIC -DDLL_EXPORT $(SHARED) $+ $(LDFLAGS) -o $@\n+libhdhomerun.a : $(LIBSRCS)\n+\t$(AR) rcs libhdhomerun.a $(LIBSRCS)\n \n clean :\n \t-rm -f hdhomerun_config$(BINEXT)\n"
  },
  {
    "path": "packages/addons/addon-depends/libiconv/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libiconv\"\nPKG_VERSION=\"1.17\"\nPKG_SHA256=\"8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://savannah.gnu.org/projects/libiconv/\"\nPKG_URL=\"https://ftp.gnu.org/pub/gnu/libiconv/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A tool that converts from one character encoding to another through Unicode conversion.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--host=${TARGET_NAME} \\\n            --build=${HOST_NAME} \\\n            --prefix=/usr \\\n            --includedir=/usr/include/iconv \\\n            --libdir=/usr/lib/iconv \\\n            --sysconfdir=/etc \\\n            --enable-static \\\n            --disable-shared \\\n            --disable-nls \\\n            --disable-extra-encodings \\\n            --with-gnu-ld\"\n"
  },
  {
    "path": "packages/addons/addon-depends/libid3tag/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libid3tag\"\nPKG_VERSION=\"0.15.1b\"\nPKG_SHA256=\"63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.underbit.com/products/mad/\"\nPKG_URL=\"ftp://ftp.mars.org/pub/mpeg/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib\"\nPKG_LONGDESC=\"A library for id3 tagging.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared\"\n\npost_makeinstall_target(){\n cp ${PKG_BUILD}/id3tag.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/libid3tag/sources/id3tag.pc",
    "content": "prefix=/usr\nexec_prefix=/usr/bin\nlibdir=/usr/lib\nincludedir=/usr/include\n\nName: ID3TAG\nDescription: libid3tag - ID3 tag manipulation library\nVersion: 0.15.1b\nLibs: -L${libdir} -lid3tag -lz\nCflags:\n"
  },
  {
    "path": "packages/addons/addon-depends/libimobiledevice/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libimobiledevice\"\nPKG_VERSION=\"1.3.0\"\nPKG_SHA256=\"53f2640c6365cd9f302a6248f531822dc94a6cced3f17128d4479a77bd75b0f6\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.libimobiledevice.org\"\nPKG_URL=\"https://github.com/libimobiledevice/libimobiledevice/releases/download/${PKG_VERSION}/libimobiledevice-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libusbmuxd openssl\"\nPKG_LONGDESC=\"A cross-platform software library that talks the protocols to support Apple devices.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           --without-cython \\\n                           --disable-largefile\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  mkdir -p \"${SYSROOT_PREFIX}/usr/include/lib/libimobiledevice\"\n    cp ${PKG_BUILD}/common/utils.h \"${SYSROOT_PREFIX}/usr/include/libimobiledevice\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/libmad/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"libmad\"\nPKG_VERSION=\"0.15.1b\"\nPKG_SHA256=\"bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.mars.org/home/rob/proj/mpeg/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/mad/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A high-quality MPEG audio decoder.\"\nPKG_TOOLCHAIN=\"autotools\"\n\n# package specific configure options\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared\"\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  PKG_CONFIGURE_OPTS_TARGET+=\" --enable-accuracy --enable-fpm=64bit\"\nfi\n\npost_makeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n  cat > ${SYSROOT_PREFIX}/usr/lib/pkgconfig/mad.pc << \"EOF\"\nprefix=/usr\nexec_prefix=${prefix}\nlibdir=${exec_prefix}/lib\nincludedir=${prefix}/include\n\nName: mad\nDescription: MPEG audio decoder\nRequires:\nVersion: 0.15.1b\nLibs: -L${libdir} -lmad\nCflags: -I${includedir}\nEOF\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/libmad/patches/libmad-0.15.1b-automake_1.13.patch",
    "content": "diff -Naur libmad-0.15.1b-old/configure.ac libmad-0.15.1b-new/configure.ac\n--- libmad-0.15.1b-old/configure.ac\t2004-01-23 01:41:32.000000000 -0800\n+++ libmad-0.15.1b-new/configure.ac\t2012-12-30 15:14:37.000000000 -0800\n@@ -28,7 +28,7 @@\n \n AM_INIT_AUTOMAKE\n \n-AM_CONFIG_HEADER([config.h])\n+AC_CONFIG_HEADERS([config.h])\n \n dnl System type.\n \n"
  },
  {
    "path": "packages/addons/addon-depends/libmad/patches/libmad-0.15.1b-cflags-O2.patch",
    "content": "diff -Naur libmad-0.15.1b-orig/configure.ac libmad-0.15.1b/configure.ac\n--- libmad-0.15.1b-orig/configure.ac\t2007-07-01 12:58:13.000000000 -0600\n+++ libmad-0.15.1b/configure.ac\t2007-07-01 12:59:13.000000000 -0600\n@@ -105,7 +105,7 @@\n \t    shift\n \t    ;;\n \t-O2)\n-\t    optimize=\"-O\"\n+\t    optimize=\"-O2\"\n \t    shift\n \t    ;;\n \t-fomit-frame-pointer)\n"
  },
  {
    "path": "packages/addons/addon-depends/libmad/patches/libmad-0.15.1b-cflags.patch",
    "content": "diff -Naur libmad-0.15.1b-orig/configure.ac libmad-0.15.1b/configure.ac\n--- libmad-0.15.1b-orig/configure.ac\t2007-06-30 20:22:31.000000000 -0600\n+++ libmad-0.15.1b/configure.ac\t2007-06-30 20:25:31.000000000 -0600\n@@ -122,74 +122,74 @@\n     esac\n done\n \n-if test \"$GCC\" = yes\n-then\n-    if test -z \"$arch\"\n-    then\n-\tcase \"$host\" in\n-\t    i386-*)           ;;\n-\t    i?86-*)           arch=\"-march=i486\" ;;\n-\t    arm*-empeg-*)     arch=\"-march=armv4 -mtune=strongarm1100\" ;;\n-\t    armv4*-*)         arch=\"-march=armv4 -mtune=strongarm\" ;;\n-\t    powerpc-*)        ;;\n-\t    mips*-agenda-*)   arch=\"-mcpu=vr4100\" ;;\n-\t    mips*-luxsonor-*) arch=\"-mips1 -mcpu=r3000 -Wa,-m4010\" ;;\n-\tesac\n-    fi\n-\n-    case \"$optimize\" in\n-\t-O|\"-O \"*)\n-\t    optimize=\"-O\"\n-\t    optimize=\"$optimize -fforce-mem\"\n-\t    optimize=\"$optimize -fforce-addr\"\n-\t    : #x optimize=\"$optimize -finline-functions\"\n-\t    : #- optimize=\"$optimize -fstrength-reduce\"\n-\t    optimize=\"$optimize -fthread-jumps\"\n-\t    optimize=\"$optimize -fcse-follow-jumps\"\n-\t    optimize=\"$optimize -fcse-skip-blocks\"\n-\t    : #x optimize=\"$optimize -frerun-cse-after-loop\"\n-\t    : #x optimize=\"$optimize -frerun-loop-opt\"\n-\t    : #x optimize=\"$optimize -fgcse\"\n-\t    optimize=\"$optimize -fexpensive-optimizations\"\n-\t    optimize=\"$optimize -fregmove\"\n-\t    : #* optimize=\"$optimize -fdelayed-branch\"\n-\t    : #x optimize=\"$optimize -fschedule-insns\"\n-\t    optimize=\"$optimize -fschedule-insns2\"\n-\t    : #? optimize=\"$optimize -ffunction-sections\"\n-\t    : #? optimize=\"$optimize -fcaller-saves\"\n-\t    : #> optimize=\"$optimize -funroll-loops\"\n-\t    : #> optimize=\"$optimize -funroll-all-loops\"\n-\t    : #x optimize=\"$optimize -fmove-all-movables\"\n-\t    : #x optimize=\"$optimize -freduce-all-givs\"\n-\t    : #? optimize=\"$optimize -fstrict-aliasing\"\n-\t    : #* optimize=\"$optimize -fstructure-noalias\"\n-\n-\t    case \"$host\" in\n-\t\tarm*-*)\n-\t\t    optimize=\"$optimize -fstrength-reduce\"\n-\t\t    ;;\n-\t\tmips*-*)\n-\t\t    optimize=\"$optimize -fstrength-reduce\"\n-\t\t    optimize=\"$optimize -finline-functions\"\n-\t\t    ;;\n-\t\ti?86-*)\n-\t\t    optimize=\"$optimize -fstrength-reduce\"\n-\t\t    ;;\n-\t\tpowerpc-apple-*)\n-\t\t    # this triggers an internal compiler error with gcc2\n-\t\t    : #optimize=\"$optimize -fstrength-reduce\"\n-\n-\t\t    # this is really only beneficial with gcc3\n-\t\t    : #optimize=\"$optimize -finline-functions\"\n-\t\t    ;;\n-\t\t*)\n-\t\t    # this sometimes provokes bugs in gcc 2.95.2\n-\t\t    : #optimize=\"$optimize -fstrength-reduce\"\n-\t\t    ;;\n-\t    esac\n-\t    ;;\n-    esac\n-fi\n+#if test \"$GCC\" = yes\n+#then\n+#    if test -z \"$arch\"\n+#    then\n+#\tcase \"$host\" in\n+#\t    i386-*)           ;;\n+#\t    i?86-*)           arch=\"-march=i486\" ;;\n+#\t    arm*-empeg-*)     arch=\"-march=armv4 -mtune=strongarm1100\" ;;\n+#\t    armv4*-*)         arch=\"-march=armv4 -mtune=strongarm\" ;;\n+#\t    powerpc-*)        ;;\n+#\t    mips*-agenda-*)   arch=\"-mcpu=vr4100\" ;;\n+#\t    mips*-luxsonor-*) arch=\"-mips1 -mcpu=r3000 -Wa,-m4010\" ;;\n+#\tesac\n+#    fi\n+#\n+#    case \"$optimize\" in\n+#\t-O|\"-O \"*)\n+#\t    optimize=\"-O\"\n+#\t    optimize=\"$optimize -fforce-mem\"\n+#\t    optimize=\"$optimize -fforce-addr\"\n+#\t    : #x optimize=\"$optimize -finline-functions\"\n+#\t    : #- optimize=\"$optimize -fstrength-reduce\"\n+#\t    optimize=\"$optimize -fthread-jumps\"\n+#\t    optimize=\"$optimize -fcse-follow-jumps\"\n+#\t    optimize=\"$optimize -fcse-skip-blocks\"\n+#\t    : #x optimize=\"$optimize -frerun-cse-after-loop\"\n+#\t    : #x optimize=\"$optimize -frerun-loop-opt\"\n+#\t    : #x optimize=\"$optimize -fgcse\"\n+#\t    optimize=\"$optimize -fexpensive-optimizations\"\n+#\t    optimize=\"$optimize -fregmove\"\n+#\t    : #* optimize=\"$optimize -fdelayed-branch\"\n+#\t    : #x optimize=\"$optimize -fschedule-insns\"\n+#\t    optimize=\"$optimize -fschedule-insns2\"\n+#\t    : #? optimize=\"$optimize -ffunction-sections\"\n+#\t    : #? optimize=\"$optimize -fcaller-saves\"\n+#\t    : #> optimize=\"$optimize -funroll-loops\"\n+#\t    : #> optimize=\"$optimize -funroll-all-loops\"\n+#\t    : #x optimize=\"$optimize -fmove-all-movables\"\n+#\t    : #x optimize=\"$optimize -freduce-all-givs\"\n+#\t    : #? optimize=\"$optimize -fstrict-aliasing\"\n+#\t    : #* optimize=\"$optimize -fstructure-noalias\"\n+#\n+#\t    case \"$host\" in\n+#\t\tarm*-*)\n+#\t\t    optimize=\"$optimize -fstrength-reduce\"\n+#\t\t    ;;\n+#\t\tmips*-*)\n+#\t\t    optimize=\"$optimize -fstrength-reduce\"\n+#\t\t    optimize=\"$optimize -finline-functions\"\n+#\t\t    ;;\n+#\t\ti?86-*)\n+#\t\t    optimize=\"$optimize -fstrength-reduce\"\n+#\t\t    ;;\n+#\t\tpowerpc-apple-*)\n+#\t\t    # this triggers an internal compiler error with gcc2\n+#\t\t    : #optimize=\"$optimize -fstrength-reduce\"\n+#\n+#\t\t    # this is really only beneficial with gcc3\n+#\t\t    : #optimize=\"$optimize -finline-functions\"\n+#\t\t    ;;\n+#\t\t*)\n+#\t\t    # this sometimes provokes bugs in gcc 2.95.2\n+#\t\t    : #optimize=\"$optimize -fstrength-reduce\"\n+#\t\t    ;;\n+#\t    esac\n+#\t    ;;\n+#    esac\n+#fi\n \n case \"$host\" in\n     mips*-agenda-*)\n"
  },
  {
    "path": "packages/addons/addon-depends/libmpdclient/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libmpdclient\"\nPKG_VERSION=\"2.20\"\nPKG_SHA256=\"18793f68e939c3301e34d8fcadea1f7daa24143941263cecadb80126194e277d\"\nPKG_LICENSE=\"BSD-3c\"\nPKG_SITE=\"https://www.musicpd.org\"\nPKG_URL=\"https://www.musicpd.org/download/libmpdclient/2/libmpdclient-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A C library which implements the Music Player Daemon protocol.\"\n"
  },
  {
    "path": "packages/addons/addon-depends/librespot-depends/rustup.rs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rustup.rs\"\nPKG_VERSION=\"1.25.1\"\nPKG_SHA256=\"4d062c77b08309bd212f22dd7da1957c1882509c478e57762f34ec4fb2884c9a\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://www.rust-lang.org\"\nPKG_URL=\"https://github.com/rust-lang-nursery/rustup.rs/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"The Rust toolchain installer.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/libseccomp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libseccomp\"\nPKG_VERSION=\"2.5.4\"\nPKG_SHA256=\"d82902400405cf0068574ef3dc1fe5f5926207543ba1ae6f8e7a1576351dcbdb\"\nPKG_LICENSE=\"LGPLv2.1\"\nPKG_SITE=\"https://github.com/seccomp/libseccomp\"\nPKG_URL=\"https://github.com/seccomp/libseccomp/releases/download/v${PKG_VERSION}/libseccomp-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"An easy to use, platform independent, interface to the Linux Kernel syscall filtering mechanism\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET+=\" --enable-static --enable-shared\"\n"
  },
  {
    "path": "packages/addons/addon-depends/libusbmuxd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libusbmuxd\"\nPKG_VERSION=\"2.0.2\"\nPKG_SHA256=\"cc6a808553da4efa9fa5638be256d5ae020498795d9d260d280b87074e799b20\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.libimobiledevice.org\"\nPKG_URL=\"https://github.com/libimobiledevice/libusbmuxd/releases/download/${PKG_VERSION}/libusbmuxd-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libplist\"\nPKG_LONGDESC=\"A USB multiplex daemon.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_func_malloc_0_nonnull=yes \\\n                           ac_cv_func_realloc_0_nonnull=yes \\\n                           --enable-static \\\n                           --disable-shared\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/libvncserver/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libvncserver\"\nPKG_VERSION=\"0.9.14\"\nPKG_SHA256=\"83104e4f7e28b02f8bf6b010d69b626fae591f887e949816305daebae527c9a5\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libvnc.github.io/\"\nPKG_URL=\"https://github.com/LibVNC/libvncserver/archive/LibVNCServer-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libjpeg-turbo libpng openssl systemd\"\nPKG_LONGDESC=\"A C library that allow you to easily implement VNC server or client functionality.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DWITH_GCRYPT=OFF \\\n                       -DWITH_GNUTLS=OFF \\\n                       -DWITH_GTK=OFF \\\n                       -DWITH_SDL=OFF \\\n                       -DWITH_TIGHTVNC_FILETRANSFER=OFF \\\n                       -DWITH_TESTS=OFF \\\n                       -DWITH_EXAMPLES=OFF \\\n                       -DBUILD_SHARED_LIBS=ON\"\n\npre_configure_target() {\n  # hide openssl >=3.0.0 warnings\n  export CFLAGS+=\" -Wno-deprecated-declarations\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/libvncserver/patches/fix-build-with-openssl-3.0.0.patch",
    "content": "From d998b74e9bfaf5c179bf4322b626506469bc694b Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Fri, 20 Jan 2023 12:13:42 +0100\nSubject: [PATCH] common/crypto_openssl.c: fix build with openssl >= 3.0.0 DES\n encryption is considered legacy and is no longer available by default. To use\n it legacy provider must be load.\n\n---\n common/crypto_openssl.c | 26 ++++++++++++++++++++++++--\n 1 file changed, 24 insertions(+), 2 deletions(-)\n\ndiff --git a/common/crypto_openssl.c b/common/crypto_openssl.c\nindex 51d7ec2d..50e8073a 100644\n--- a/common/crypto_openssl.c\n+++ b/common/crypto_openssl.c\n@@ -28,6 +28,9 @@\n #include <openssl/dh.h>\n #include <openssl/evp.h>\n #include <openssl/rand.h>\n+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)\n+#include <openssl/provider.h>\n+#endif\n #include \"crypto.h\"\n \n static unsigned char reverseByte(unsigned char b) {\n@@ -69,13 +72,25 @@ void random_bytes(void *out, size_t len)\n int encrypt_rfbdes(void *out, int *out_len, const unsigned char key[8], const void *in, const size_t in_len)\n {\n     int result = 0;\n-    EVP_CIPHER_CTX *des;\n+    EVP_CIPHER_CTX *des = NULL;\n     unsigned char mungedkey[8];\n     int i;\n+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)\n+    OSSL_PROVIDER *providerLegacy = NULL;\n+    OSSL_PROVIDER *providerDefault = NULL;\n+#endif\n \n     for (i = 0; i < 8; i++)\n       mungedkey[i] = reverseByte(key[i]);\n \n+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)\n+    /* Load Multiple providers into the default (NULL) library context */\n+    if (!(providerLegacy = OSSL_PROVIDER_load(NULL, \"legacy\")))\n+    \tgoto out;\n+    if (!(providerDefault = OSSL_PROVIDER_load(NULL, \"default\")))\n+    \tgoto out;\n+#endif\n+\n     if(!(des = EVP_CIPHER_CTX_new()))\n \tgoto out;\n     if(!EVP_EncryptInit_ex(des, EVP_des_ecb(), NULL, mungedkey, NULL))\n@@ -86,7 +101,14 @@ int encrypt_rfbdes(void *out, int *out_len, const unsigned char key[8], const vo\n     result = 1;\n \n  out:\n-    EVP_CIPHER_CTX_free(des);\n+    if (des)\n+      EVP_CIPHER_CTX_free(des);\n+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)\n+    if (providerLegacy)\n+      OSSL_PROVIDER_unload(providerLegacy);\n+    if (providerDefault)\n+      OSSL_PROVIDER_unload(providerDefault);\n+#endif\n     return result;\n }\n \n"
  },
  {
    "path": "packages/addons/addon-depends/libvpx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libvpx\"\nPKG_VERSION=\"1.12.0\"\nPKG_SHA256=\"f1acc15d0fd0cb431f4bf6eac32d5e932e40ea1186fe78e074254d6d003957bb\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://www.webmproject.org\"\nPKG_URL=\"https://github.com/webmproject/libvpx/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"WebM VP8/VP9 Codec\"\n\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  PKG_DEPENDS_TARGET+=\" nasm:host\"\nfi\n\nconfigure_target() {\n\n  case ${ARCH} in\n    aarch64)\n      PKG_TARGET_NAME_LIBVPX=\"arm64-linux-gcc\"\n      ;;\n    arm)\n      PKG_TARGET_NAME_LIBVPX=\"armv7-linux-gcc\"\n      ;;\n    x86_64)\n      PKG_TARGET_NAME_LIBVPX=\"x86_64-linux-gcc\"\n      ;;\n  esac\n\n  ${PKG_CONFIGURE_SCRIPT} --prefix=/usr \\\n                        --extra-cflags=\"${CFLAGS}\" \\\n                        --as=nasm \\\n                        --target=${PKG_TARGET_NAME_LIBVPX} \\\n                        --disable-docs \\\n                        --disable-examples \\\n                        --disable-shared \\\n                        --disable-tools \\\n                        --disable-unit-tests \\\n                        --disable-vp8-decoder \\\n                        --disable-vp9-decoder \\\n                        --enable-ccache \\\n                        --enable-pic \\\n                        --enable-static \\\n                        --enable-vp8 \\\n                        --enable-vp9\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/libzip/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libzip\"\nPKG_VERSION=\"1.10.1\"\nPKG_SHA256=\"dc3c8d5b4c8bbd09626864f6bcf93de701540f761d76b85d7c7d710f4bd90318\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.nih.at/libzip/\"\nPKG_URL=\"http://www.nih.at/libzip/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib zstd\"\nPKG_LONGDESC=\"A C library for reading, creating, and modifying zip archives.\"\n"
  },
  {
    "path": "packages/addons/addon-depends/moonlight-common-c/package.mk",
    "content": "# SPDX-License-Identifier: GPL-3.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"moonlight-common-c\"\nPKG_VERSION=\"9da632949649e8b6ea30887fdcbdc12c7c540b38\"\nPKG_SHA256=\"4e370183520c791983ecfe2916211f1a8d46b08227f5f7dec56c6e27604a7e3f\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/moonlight-stream/moonlight-common-c\"\nPKG_URL=\"https://github.com/moonlight-stream/moonlight-common-c/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"Shared C code for the implementation of Nvidia's GameStream protocol\"\nPKG_LONGDESC=\"Shared C code for the implementation of Nvidia's GameStream protocol\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/moonlight-embedded/package.mk",
    "content": "# SPDX-License-Identifier: GPL-3.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"moonlight-embedded\"\nPKG_VERSION=\"395f474cb87f1b05251e2fce098b502952af3ba9\"\nPKG_SHA256=\"8d749d07144fe22febe292abc8a06b93509cfac389fbeb219f18f7925a354c1e\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/TheChoconut/moonlight-embedded\"\nPKG_URL=\"https://github.com/TheChoconut/moonlight-embedded/archive/${PKG_VERSION}.tar.gz\"\nPKG_MAINTAINER=\"TheChoconut\"\nPKG_DEPENDS_TARGET=\"toolchain curl pulseaudio systemd alsa-lib moonlight-common-c libevdev sdlgamecontrollerdb enet opus libamcodec\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"Open source NVIDIA GameStream Linux client\"\nPKG_LONGDESC=\"Moonlight Embedded is an open source implementation of NVIDIA's GameStream, as used by the NVIDIA Shield, but built for Linux.\"\nPKG_CMAKE_OPTS_TARGET=\"-DENABLE_FFMPEG=OFF -DENABLE_CEC=OFF -DENABLE_SDL=OFF\"\n\npre_build_target() {\n  cp -a $(get_build_dir moonlight-common-c)/* ${PKG_BUILD}/third_party/moonlight-common-c\n  cp -a $(get_build_dir sdlgamecontrollerdb)/* ${PKG_BUILD}/third_party/SDL_GameControllerDB\n  cp -a $(get_build_dir enet)/* ${PKG_BUILD}/third_party/moonlight-common-c/enet\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/moonlight-embedded/patches/01-surround-fix.patch",
    "content": "diff --git a/src/audio/alsa.c b/src/audio/alsa.c\nindex 07f5b88..2cfe7cd 100644\n--- a/src/audio/alsa.c\n+++ b/src/audio/alsa.c\n@@ -37,15 +37,13 @@ static int alsa_renderer_init(int audioConfiguration, POPUS_MULTISTREAM_CONFIGUR\n   unsigned char alsaMapping[AUDIO_CONFIGURATION_MAX_CHANNEL_COUNT];\n \n   /* The supplied mapping array has order: FL-FR-C-LFE-RL-RR-SL-SR\n-   * ALSA expects the order: FL-FR-RL-RR-C-LFE-SL-SR\n+   * CoreELEC expects the order: FL-FR-LFE-C-RL-RR-SL-SR\n    * We need copy the mapping locally and swap the channels around.\n    */\n   memcpy(alsaMapping, opusConfig->mapping, sizeof(alsaMapping));\n   if (opusConfig->channelCount >= 6) {\n-    alsaMapping[2] = opusConfig->mapping[4];\n-    alsaMapping[3] = opusConfig->mapping[5];\n-    alsaMapping[4] = opusConfig->mapping[2];\n-    alsaMapping[5] = opusConfig->mapping[3];\n+    alsaMapping[2] = opusConfig->mapping[3];\n+    alsaMapping[3] = opusConfig->mapping[2];\n   }\n \n   samplesPerFrame = opusConfig->samplesPerFrame;\ndiff --git a/src/audio/pulse.c b/src/audio/pulse.c\nindex e7c1ad2..4f78594 100644\n--- a/src/audio/pulse.c\n+++ b/src/audio/pulse.c\n@@ -60,15 +60,13 @@ static int pulse_renderer_init(int audioConfiguration, POPUS_MULTISTREAM_CONFIGU\n     return -1;\n \n   /* The supplied mapping array has order: FL-FR-C-LFE-RL-RR-SL-SR\n-   * ALSA expects the order: FL-FR-RL-RR-C-LFE-SL-SR\n+   * CoreELEC expects the order: FL-FR-LFE-C-RL-RR-SL-SR\n    * We need copy the mapping locally and swap the channels around.\n    */\n   memcpy(alsaMapping, opusConfig->mapping, sizeof(alsaMapping));\n   if (opusConfig->channelCount >= 6) {\n-    alsaMapping[2] = opusConfig->mapping[4];\n-    alsaMapping[3] = opusConfig->mapping[5];\n-    alsaMapping[4] = opusConfig->mapping[2];\n-    alsaMapping[5] = opusConfig->mapping[3];\n+    alsaMapping[2] = opusConfig->mapping[3];\n+    alsaMapping[3] = opusConfig->mapping[2];\n   }\n \n   decoder = opus_multistream_decoder_create(opusConfig->sampleRate, opusConfig->channelCount, opusConfig->streams, opusConfig->coupledStreams, alsaMapping, &rc);\n"
  },
  {
    "path": "packages/addons/addon-depends/mpd-mpc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mpd-mpc\"\nPKG_VERSION=\"0.34\"\nPKG_SHA256=\"691e3f3654bc10d022bb0310234d0bc2d8c075a698f09924d9ebed8f506fda20\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.musicpd.org\"\nPKG_URL=\"https://www.musicpd.org/download/mpc/0/mpc-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libiconv libmpdclient\"\nPKG_LONGDESC=\"Command-line client for MPD.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n"
  },
  {
    "path": "packages/addons/addon-depends/multimedia-tools-depends/depends/libmediainfo/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libmediainfo\"\nPKG_VERSION=\"23.07\"\nPKG_SHA256=\"60456c8b2ab8769a6081d96fd7be86db4fe32520e4a022397cb22cacf47ce820\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://mediaarea.net/en/MediaInfo/Download/Source\"\nPKG_URL=\"https://mediaarea.net/download/source/libmediainfo/${PKG_VERSION}/libmediainfo_${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libzen zlib\"\nPKG_DEPENDS_CONFIG=\"libzen\"\nPKG_LONGDESC=\"MediaInfo is a convenient unified display of the most relevant technical and tag data for video and audio files\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nconfigure_target() {\n  cd Project/GNU/Library\n  do_autoreconf\n  ./configure \\\n        --host=${TARGET_NAME} \\\n        --build=${HOST_NAME} \\\n        --enable-static \\\n        --disable-shared \\\n        --prefix=/usr \\\n        --enable-visibility\n}\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/include/MediaInfo ${INSTALL}/usr/lib/pkgconfig\n  cp -aP ../../../Source/MediaInfo/*.h ${INSTALL}/usr/include/MediaInfo\n  for i in Archive Audio Duplicate Export Image Multiple Reader Tag Text Video; do\n    mkdir -p ${INSTALL}/usr/include/MediaInfo/${i}/\n    cp -aP ../../../Source/MediaInfo/${i}/*.h ${INSTALL}/usr/include/MediaInfo/${i}/\n  done\n  cp -P .libs/* ${INSTALL}/usr/lib\n  cp -P libmediainfo.pc ${INSTALL}/usr/lib/pkgconfig\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/multimedia-tools-depends/depends/libzen/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libzen\"\nPKG_VERSION=\"0.4.41\"\nPKG_SHA256=\"933bad3b7ecd29dc6bdc88a83645c83dfd098c15b0b90d6177a37fa1536704e8\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://mediaarea.net/en/MediaInfo/\"\nPKG_URL=\"https://mediaarea.net/download/source/libzen/${PKG_VERSION}/libzen_${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"MediaInfo is a convenient unified display of the most relevant technical and tag data for video and audio files\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nconfigure_target() {\n  cd Project/GNU/Library\n  do_autoreconf\n  ./configure \\\n        --host=${TARGET_NAME} \\\n        --build=${HOST_NAME} \\\n        --enable-static \\\n        --disable-shared \\\n        --prefix=/usr\n}\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/include/ZenLib ${INSTALL}/usr/lib/pkgconfig\n  cp -aP ../../../Source/ZenLib/*.h ${INSTALL}/usr/include/ZenLib\n  for i in HTTP_Client Format/Html Format/Http; do\n    mkdir -p ${INSTALL}/usr/include/ZenLib/${i}/\n    cp -aP ../../../Source/ZenLib/${i}/*.h ${INSTALL}/usr/include/ZenLib/${i}/\n  done\n  cp -P .libs/* ${INSTALL}/usr/lib\n  cp -P libzen.pc ${INSTALL}/usr/lib/pkgconfig\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/multimedia-tools-depends/mediainfo/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mediainfo\"\nPKG_VERSION=\"23.07\"\nPKG_SHA256=\"b6d7da9e29995fd34a22100825b843e74c32c7bc67adb01166b1beedea49f5d0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://mediaarea.net/en/MediaInfo/Download/Source\"\nPKG_URL=\"https://mediaarea.net/download/source/mediainfo/${PKG_VERSION}/mediainfo_${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libmediainfo\"\nPKG_DEPENDS_CONFIG=\"libzen libmediainfo\"\nPKG_LONGDESC=\"A convenient unified display of the most relevant technical and tag data for video and audio files.\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nconfigure_target() {\n  cd Project/GNU/CLI\n  do_autoreconf\n  ./configure \\\n        --host=${TARGET_NAME} \\\n        --build=${HOST_NAME} \\\n        --prefix=/usr\n}\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  make install DESTDIR=${INSTALL}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/multimedia-tools-depends/mesa-demos/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mesa-demos\"\nPKG_VERSION=\"8.4.0\"\nPKG_SHA256=\"01e99c94a0184e63e796728af89bfac559795fb2a0d6f506fa900455ca5fff7d\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.mesa3d.org/\"\nPKG_URL=\"ftp://ftp.freedesktop.org/pub/mesa/demos/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libX11 mesa glu glew\"\nPKG_LONGDESC=\"Mesa 3D demos - installed are the well known glxinfo and glxgears.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--without-glut\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp -P src/xdemos/glxdemo ${INSTALL}/usr/bin\n    cp -P src/xdemos/glxgears ${INSTALL}/usr/bin\n    cp -P src/xdemos/glxinfo ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/multimedia-tools-depends/mpg123/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mpg123\"\nPKG_VERSION=\"1.31.3\"\nPKG_SHA256=\"1ca77d3a69a5ff845b7a0536f783fee554e1041139a6b978f6afe14f5814ad1a\"\nPKG_LICENSE=\"LGPLv2\"\nPKG_SITE=\"https://www.mpg123.org/\"\nPKG_URL=\"https://downloads.sourceforge.net/sourceforge/mpg123/mpg123-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib\"\nPKG_LONGDESC=\"A console based real time MPEG Audio Player for Layer 1, 2 and 3.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-shared \\\n                           --enable-static\"\n"
  },
  {
    "path": "packages/addons/addon-depends/multimedia-tools-depends/mpv-drmprime/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mpv-drmprime\"\nPKG_VERSION=\"0.36.0\"\nPKG_SHA256=\"29abc44f8ebee013bb2f9fe14d80b30db19b534c679056e4851ceadf5a5e8bf6\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://mpv.io/\"\nPKG_URL=\"https://github.com/mpv-player/mpv/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain waf:host alsa ffmpeg libass libdrm lua52\"\nPKG_LONGDESC=\"A media player based on MPlayer and mplayer2. It supports a wide variety of video file formats, audio and video codecs, and subtitle types.\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_MANUAL_OPTS_TARGET=\"--prefix=/usr \\\n                        --disable-libarchive \\\n                        --enable-lua \\\n                        --disable-javascript \\\n                        --disable-uchardet \\\n                        --disable-rubberband \\\n                        --disable-lcms2 \\\n                        --disable-vapoursynth \\\n                        --disable-jack \\\n                        --disable-wayland \\\n                        --disable-x11 \\\n                        --disable-vulkan \\\n                        --disable-caca \\\n                        --enable-drm \\\n                        --enable-gbm \\\n                        --enable-egl-drm\"\n\nif [ \"${OPENGLES_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\nfi\n\nif [ \"${OPENGL_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGL}\"\nfi\n\nif [ \"${VAAPI_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" libva\"\n  PKG_MANUAL_OPTS_TARGET+=\" --enable-vaapi --enable-vaapi-drm\"\nelse\n  PKG_MANUAL_OPTS_TARGET+=\" --disable-vaapi\"\nfi\n\nif [ \"${PULSEAUDIO_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" pulseaudio\"\n  PKG_MANUAL_OPTS_TARGET+=\" --enable-pulse\"\nelse\n  PKG_MANUAL_OPTS_TARGET+=\" --disable-pulse\"\nfi\n\nif [ \"${KODI_BLURAY_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" libbluray\"\n  PKG_MANUAL_OPTS_TARGET+=\" --enable-libbluray\"\nelse\n  PKG_MANUAL_OPTS_TARGET+=\" --disable-libbluray\"\nfi\n\npre_configure_target() {\n#mpv does not build in the .TARGET_NAME\n  cd ${PKG_BUILD}\n    rm -rf .${TARGET_NAME}\n}\n\nconfigure_target() {\n  waf configure ${PKG_MANUAL_OPTS_TARGET}\n}\n\nmake_target() {\n  waf build\n}\n\nmakeinstall_target() {\n  waf install --destdir=${INSTALL}\n  rm -r ${INSTALL}/usr/share\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/multimedia-tools-depends/opencaster/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"opencaster\"\nPKG_VERSION=\"3.2.2\"\nPKG_SHA256=\"c9d77f98b31d53f521e3179003a9cb66b0586704717e9d401f3bc0dafa243865\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.avalpa.com/the-key-values/15-free-software/33-opencaster\"\nPKG_URL=\"http://ftp.de.debian.org/debian/pool/main/o/opencaster/opencaster_${PKG_VERSION}+dfsg.orig.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib\"\nPKG_LONGDESC=\"A free and open source MPEG2 transport stream data generator and packet manipulator.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\npre_configure_target() {\n  PKG_MAKE_OPTS_TARGET=\"CC=${CC}\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  make install DESTDIR=${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/multimedia-tools-depends/opencaster/patches/opencaster-02_headers.patch",
    "content": "diff --git a/tools/mpe2sec/mpe.c b/tools/mpe2sec/mpe.c\nindex 18417af..3b71f64 100644\n--- a/tools/mpe2sec/mpe.c\n+++ b/tools/mpe2sec/mpe.c\n@@ -12,7 +12,7 @@\n #include <sys/socket.h>\n #include <net/if.h>\n \n-#include <net/if_tun.h>\n+#include <linux/if_tun.h>\n \n #include \"sectioncrc.h\"\n \n"
  },
  {
    "path": "packages/addons/addon-depends/multimedia-tools-depends/opencaster/patches/opencaster-03_dont-build-dvbobjects.patch",
    "content": "diff --git a/libs/Makefile b/libs/Makefile\nindex 23d951b..c442057 100755\n--- a/libs/Makefile\n+++ b/libs/Makefile\n@@ -1,4 +1,4 @@\n-SUBDIRS = sectioncrc dvbobjects\n+SUBDIRS = sectioncrc\n \n subdirs:        $(SUBDIRS)\n $(SUBDIRS):\n"
  },
  {
    "path": "packages/addons/addon-depends/multimedia-tools-depends/squeezelite/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"squeezelite\"\nPKG_VERSION=\"bc72c0de3fff771540a2a45aaafafed539387b3c\" # 2022-04-10 # 1.9.9.1403\nPKG_SHA256=\"5aa312d678a593b9a08f79e080a6ebe329d8fc40e6507e28b6705807c408bf7a\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/ralph-irving/squeezelite\"\nPKG_URL=\"https://github.com/ralph-irving/squeezelite/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain faad2 ffmpeg flac libmad libvorbis mpg123 soxr libogg\"\nPKG_DEPENDS_CONFIG=\"mpg123\"\nPKG_LONGDESC=\"A client for the Logitech Media Server.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nmake_target() {\n  make \\\n    OPTS=\"-DDSD -DFFMPEG -DRESAMPLE -DVISEXPORT -DLINKALL\" \\\n    CFLAGS=\"${CFLAGS} $(pkg-config --cflags libmpg123 vorbisfile vorbis ogg)\" \\\n    LDFLAGS+=\" $(pkg-config --libs libmpg123 vorbisfile vorbis ogg)\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp -p squeezelite ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/multimedia-tools-depends/tsdecrypt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tsdecrypt\"\nPKG_VERSION=\"10.0\"\nPKG_SHA256=\"a337a7d60cc8f78b9dffbd7d675390497763bcb8f878ec9f1bec3eb80f32b1f1\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://georgi.unixsol.org/programs/tsdecrypt\"\nPKG_URL=\"http://georgi.unixsol.org/programs/tsdecrypt/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libdvbcsa openssl\"\nPKG_LONGDESC=\"A tool that reads incoming mpeg transport stream over UDP/RTP and then decrypts it using libdvbcsa/ffdecsa.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_MAKEINSTALL_OPTS_TARGET=\"PREFIX=/usr\"\n\nmake_target() {\n  make CC=${CC} LINK=\"${LD} -o\"\n}\n\npost_make_target() {\n  make strip STRIP=${STRIP}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/multimedia-tools-depends/tstools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tstools\"\nPKG_VERSION=\"db1f79f409818fa0476ecf8593079a7ca3dbafd2\"\nPKG_SHA256=\"f204229016c9deafcc75fe602c390339878312126134edbfcebf239e093dc4ff\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kynesim/tstools\"\nPKG_URL=\"https://github.com/kynesim/tstools/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"This is a set of cross-platform command line tools for working with MPEG data.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_MAKE_OPTS_TARGET=\"CROSS_COMPILE=${TARGET_PREFIX} prefix=/usr\"\nPKG_MAKEINSTALL_OPTS_TARGET=\"${PKG_MAKE_OPTS_TARGET}\"\n\npre_make_target() {\n  make builddirs\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/multimedia-tools-depends/tstools/patches/build.patch",
    "content": "--- a/Makefile\t2020-01-08 22:09:15.794660218 +0100\n+++ b/Makefile\t2020-01-08 22:09:18.954615301 +0100\n@@ -412,6 +412,9 @@\n # ------------------------------------------------------------\n # Directory creation\n \n+.PHONY: builddirs\n+builddirs: $(OBJDIR) $(LIBDIR) $(BINDIR)\n+\n $(OBJDIR) $(LIBDIR) $(BINDIR) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(man1dir):\n \tmkdir -p $@\n \n"
  },
  {
    "path": "packages/addons/addon-depends/multimedia-tools-depends/tstools/patches/crossstrip.patch",
    "content": "diff -ur a/Makefile b/Makefile\n--- a/Makefile\t2015-10-30 17:34:51.000000000 +0100\n+++ b/Makefile\t2019-12-14 12:58:16.655141460 +0100\n@@ -43,7 +43,7 @@\n man1dir=$(mandir)/man1\n manext=.1\n \n-INSTALL=install\n+INSTALL=install --strip-program=$(CROSS_COMPILE)strip\n INSTALL_PROGRAM=$(INSTALL) -m 0555 -s\n INSTALL_LIB=$(INSTALL) -m 0444 -s\n INSTALL_DATA=$(INSTALL) -m 0444\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/bwm-ng/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"bwm-ng\"\nPKG_VERSION=\"0.6.3\"\nPKG_SHA256=\"c1a552b6ff48ea3e4e10110a7c188861abc4750befc67c6caaba8eb3ecf67f46\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.gropp.org/?id=projects&sub=bwm-ng\"\nPKG_URL=\"https://github.com/vgropp/bwm-ng/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses libstatgrab\"\nPKG_LONGDESC=\"A small and simple console-based live network and disk io bandwidth monitor.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-libstatgrab \\\n                           --with-time \\\n                           --with-getifaddrs \\\n                           --with-sysctl \\\n                           --with-sysctldisk \\\n                           --with-procnetdev \\\n                           --with-partitions\"\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/depends/libpcap/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libpcap\"\nPKG_VERSION=\"1.10.3\"\nPKG_SHA256=\"2a8885c403516cf7b0933ed4b14d6caa30e02052489ebd414dc75ac52e7559e6\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.tcpdump.org/\"\nPKG_URL=\"https://www.tcpdump.org/release/libpcap-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A portable framework for low-level network monitoring.\"\n# use configure, not cmake. review cmake in future release.\nPKG_TOOLCHAIN=\"configure\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"LIBS=-lpthread \\\n                           ac_cv_header_libusb_1_0_libusb_h=no \\\n                           --disable-shared \\\n                           --with-pcap=linux \\\n                           --disable-bluetooth \\\n                           --disable-can \\\n                           --without-libnl \\\n                           --disable-dbus \\\n                           --disable-canusb\"\n\npre_configure_target() {\n# When cross-compiling, configure can't set linux version\n# forcing it\n  sed -i -e 's/ac_cv_linux_vers=unknown/ac_cv_linux_vers=2/' ../configure\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/depends/libpcap/patches/remove-manpages.patch",
    "content": "--- libpcap-1.10.0/CMakeLists.txt\t2020-12-29 21:16:30.000000000 +0000\n+++ libpcap-1.10.0/CMakeLists.txt\t2021-01-02 04:34:31.834695073 +0000\n@@ -2689,70 +2689,6 @@\n     install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pcap-config DESTINATION bin)\n     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc DESTINATION lib/pkgconfig)\n \n-    #\n-    # Man pages.\n-    #\n-    # For each section of the manual for which we have man pages\n-    # that require macro expansion, do the expansion.\n-    #\n-    # If this is MinGW, maybe we have a UN*X-style ln command and\n-    # maybe we don't.  (No, we do *NOT* require MSYS!)  If we don't\n-    # have it, don't do the man pages.\n-    #\n-    if(MINGW)\n-        find_program(LINK_EXECUTABLE ln)\n-    endif(MINGW)\n-    if(UNIX OR (MINGW AND LINK_EXECUTABLE))\n-        set(MAN1 \"\")\n-        foreach(MANPAGE ${MAN1_NOEXPAND})\n-            set(MAN1 ${MAN1} ${CMAKE_CURRENT_SOURCE_DIR}/${MANPAGE})\n-        endforeach(MANPAGE)\n-        install(FILES ${MAN1} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)\n-\n-        set(MAN3PCAP \"\")\n-        foreach(MANPAGE ${MAN3PCAP_NOEXPAND})\n-            set(MAN3PCAP ${MAN3PCAP} ${CMAKE_CURRENT_SOURCE_DIR}/${MANPAGE})\n-        endforeach(MANPAGE)\n-        foreach(TEMPLATE_MANPAGE ${MAN3PCAP_EXPAND})\n-            string(REPLACE \".in\" \"\" MANPAGE ${TEMPLATE_MANPAGE})\n-            configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY)\n-            set(MAN3PCAP ${MAN3PCAP} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE})\n-        endforeach(TEMPLATE_MANPAGE)\n-        install(FILES ${MAN3PCAP} DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_datalink_val_to_name.3pcap pcap_datalink_val_to_description.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_datalink_val_to_name.3pcap pcap_datalink_val_to_description_or_dlt.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_dump_open.3pcap pcap_dump_fopen.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_findalldevs.3pcap pcap_freealldevs.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_geterr.3pcap pcap_perror.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_inject.3pcap pcap_sendpacket.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_list_datalinks.3pcap pcap_free_datalinks.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_list_tstamp_types.3pcap pcap_free_tstamp_types.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_loop.3pcap pcap_dispatch.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_major_version.3pcap pcap_minor_version.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_next_ex.3pcap pcap_next.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_open_dead.3pcap pcap_open_dead_with_tstamp_precision.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_open_offline.3pcap pcap_open_offline_with_tstamp_precision.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_open_offline.3pcap pcap_fopen_offline.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_open_offline.3pcap pcap_fopen_offline_with_tstamp_precision.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_tstamp_type_val_to_name.3pcap pcap_tstamp_type_val_to_description.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-        install_manpage_symlink(pcap_setnonblock.3pcap pcap_getnonblock.3pcap ${CMAKE_INSTALL_MANDIR}/man3)\n-\n-        set(MANFILE \"\")\n-        foreach(TEMPLATE_MANPAGE ${MANFILE_EXPAND})\n-            string(REPLACE \".manfile.in\" \".${MAN_FILE_FORMATS}\" MANPAGE ${TEMPLATE_MANPAGE})\n-            configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY)\n-            set(MANFILE ${MANFILE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE})\n-        endforeach(TEMPLATE_MANPAGE)\n-        install(FILES ${MANFILE} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${MAN_FILE_FORMATS})\n-\n-        set(MANMISC \"\")\n-        foreach(TEMPLATE_MANPAGE ${MANMISC_EXPAND})\n-            string(REPLACE \".manmisc.in\" \".${MAN_MISC_INFO}\" MANPAGE ${TEMPLATE_MANPAGE})\n-            configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY)\n-            set(MANMISC ${MANMISC} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE})\n-        endforeach(TEMPLATE_MANPAGE)\n-        install(FILES ${MANMISC} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${MAN_MISC_INFO})\n-    endif(UNIX OR (MINGW AND LINK_EXECUTABLE))\n endif(NOT MSVC)\n \n # uninstall target\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/depends/libstatgrab/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libstatgrab\"\nPKG_VERSION=\"0.92.1\"\nPKG_SHA256=\"5688aa4a685547d7174a8a373ea9d8ee927e766e3cc302bdee34523c2c5d6c11\"\nPKG_SITE=\"https://libstatgrab.org\"\nPKG_URL=\"https://github.com/libstatgrab/libstatgrab/releases/download/LIBSTATGRAB_${PKG_VERSION//./_}/libstatgrab-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=libs\nPKG_LONGDESC=\"A library that provides cross platform access to statistics about the system on which it's run.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_func_malloc_0_nonnull=yes \\\n                           --enable-static \\\n                           --disable-shared \\\n                           --disable-saidar \\\n                           --disable-examples \\\n                           --disable-setuid-binaries \\\n                           --disable-setgid-binaries\"\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/iftop/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"iftop\"\nPKG_VERSION=\"77901c8c53e01359d83b8090aacfe62214658183\"\nPKG_SHA256=\"f2728741f1bd2099d325271b4b2564a696dbce7c23401360ac6c9841cbda1108\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.ex-parrot.com/pdw/iftop/\"\nPKG_URL=\"https://code.blinkace.com/pdw/iftop/-/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses libpcap libnl\"\nPKG_LONGDESC=\"A tool to display bandwidth usage on an interface.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\npre_build_target() {\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n  cp -RP ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}\n}\n\npre_configure_target() {\n  export LIBS=\"-lpcap -lnl-3 -lnl-genl-3 -lncurses\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/iftop/patches/iftop-Fix-building-with-gcc10.patch",
    "content": "From d9402e29486f60ea4a9b8da530c60e6c8404127b Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Mon, 22 Jun 2020 20:18:59 +0200\nSubject: [PATCH] Fix building with gcc10\n\n---\n ui_common.c |  6 ++++++\n ui_common.h | 12 +++++++-----\n 2 files changed, 13 insertions(+), 5 deletions(-)\n\ndiff --git a/ui_common.c b/ui_common.c\nindex dcf66466fda4..b1027ec16da7 100644\n--- a/ui_common.c\n+++ b/ui_common.c\n@@ -17,6 +17,12 @@\n \n #include \"ui_common.h\"\n \n+sorted_list_type screen_list;\n+host_pair_line totals;\n+int peaksent, peakrecv, peaktotal;\n+hash_type* screen_hash;\n+hash_type* service_hash;\n+\n /* 2, 10 and 40 seconds */\n int history_divs[HISTORY_DIVISIONS] = {1, 5, 20};\n \ndiff --git a/ui_common.h b/ui_common.h\nindex 63ae5bb69886..1403d11c310c 100644\n--- a/ui_common.h\n+++ b/ui_common.h\n@@ -33,12 +33,14 @@ typedef struct host_pair_line_tag {\n \n extern options_t options;\n \n-sorted_list_type screen_list;\n-host_pair_line totals;\n-int peaksent, peakrecv, peaktotal;\n+extern sorted_list_type screen_list;\n+extern host_pair_line totals;\n+extern int peaksent;\n+extern int peakrecv;\n+extern int peaktotal;\n extern history_type history_totals;\n-hash_type* screen_hash;\n-hash_type* service_hash;\n+extern hash_type* screen_hash;\n+extern hash_type* service_hash;\n \n void analyse_data(void);\n void screen_list_init(void);\n-- \n2.27.0\n\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/iftop/patches/iftop-boo.patch",
    "content": "diff --git a/configure.ac b/configure.ac\nindex 671241e..b6fece6 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -294,42 +294,6 @@ if test x$libpcap_prefix = x ; then\n     libpcap_prefix=\"/usr /usr/local /opt /software\"\n fi\n \n-AC_MSG_CHECKING([where to find pcap.h])\n-foundpcaph=0\n-oldCPPFLAGS=$CPPFLAGS\n-for test_prefix in \"\" $libpcap_prefix ; do\n-    for x in \"\" /pcap ; do\n-        if test x$test_prefix != x ; then\n-            CPPFLAGS=\"$oldCPPFLAGS -I$test_prefix/include$x\"\n-        fi\n-        AC_TRY_CPP([\n-#include <pcap.h>\n-        ], [\n-        AC_MSG_RESULT([$test_prefix/include$x])\n-        foundpcaph=1\n-        break\n-        ])\n-    done\n-    if test $foundpcaph = 1 ; then\n-        break\n-    fi\n-done\n-\n-if test $foundpcaph = 0 ; then\n-    AC_MSG_RESULT([no idea])\n-    AC_MSG_ERROR([can't find pcap.h\n-  You're not going to get very far without libpcap.])\n-else\n-    dnl assume that -lpcap is under $test_prefix/lib\n-    if test x$test_prefix != x ; then\n-        LDFLAGS=\"$LDFLAGS -L$test_prefix/lib\"\n-    fi\n-    AC_CHECK_LIB(pcap, pcap_open_live, , [\n-            AC_MSG_ERROR([can't find libpcap\n-  You're not going to get very far without libpcap.])\n-        ])\n-fi\n-\n foundpcap=0\n AC_CHECK_HEADERS([pcap.h pcap/pcap.h], [\n     foundpcap=1\ndiff --git a/edline.c b/edline.c\nindex 75f1a5a..aed80cf 100644\n--- a/edline.c\n+++ b/edline.c\n@@ -7,7 +7,7 @@\n static const char rcsid[] = \"$Id: edline.c,v 1.2 2002/11/04 12:27:35 chris Exp $\";\n \n #include <ctype.h>\n-#include <curses.h>\n+#include <ncurses.h>\n #include <string.h>\n \n #include \"iftop.h\"\ndiff --git a/iftop.c b/iftop.c\nindex a090dcf..5851c86 100644\n--- a/iftop.c\n+++ b/iftop.c\n@@ -23,7 +23,7 @@\n #endif\n \n #include <pthread.h>\n-#include <curses.h>\n+#include <ncurses.h>\n #include <signal.h>\n #include <string.h>\n #include <unistd.h>\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/iftop/patches/iftop-variable-to-be-local-due-to-pcap-1-10-0.patch",
    "content": "diff -Nuar iftop-77901c8c/iftop-dump.c iftop-pcap-1-10/iftop-dump.c\n--- iftop-77901c8c/iftop-dump.c\t2018-10-03 17:02:36.000000000 +0000\n+++ iftop-pcap-1-10/iftop-dump.c\t2021-01-17 23:40:39.896124155 +0000\n@@ -64,7 +64,7 @@\n pthread_mutex_t tick_mutex;\n \n pcap_t* pd; /* pcap descriptor */\n-struct bpf_program pcap_filter;\n+struct bpf_program my_pcap_filter;\n pcap_handler packet_handler;\n \n FILE*fout = NULL;\n@@ -375,12 +375,12 @@\n         sprintf(x, \"(%s) and ip\", filter);\n     } else\n         x = xstrdup(\"ip\");\n-    if (pcap_compile(pd, &pcap_filter, x, 1, 0) == -1) {\n+    if (pcap_compile(pd, &my_pcap_filter, x, 1, 0) == -1) {\n         xfree(x);\n         return pcap_geterr(pd);\n     }\n     xfree(x);\n-    if (pcap_setfilter(pd, &pcap_filter) == -1)\n+    if (pcap_setfilter(pd, &my_pcap_filter) == -1)\n         return pcap_geterr(pd);\n     else\n         return NULL;\ndiff -Nuar iftop-77901c8c/iftop.c iftop-pcap-1-10/iftop.c\n--- iftop-77901c8c/iftop.c\t2018-10-03 17:02:36.000000000 +0000\n+++ iftop-pcap-1-10/iftop.c\t2021-01-17 23:40:54.116240467 +0000\n@@ -74,7 +74,7 @@\n pthread_mutex_t tick_mutex;\n \n pcap_t* pd; /* pcap descriptor */\n-struct bpf_program pcap_filter;\n+struct bpf_program my_pcap_filter;\n pcap_handler packet_handler;\n \n sig_atomic_t foad;\n@@ -679,12 +679,12 @@\n         sprintf(x, \"(%s) and (ip or ip6)\", filter);\n     } else\n         x = xstrdup(\"ip or ip6\");\n-    if (pcap_compile(pd, &pcap_filter, x, 1, 0) == -1) {\n+    if (pcap_compile(pd, &my_pcap_filter, x, 1, 0) == -1) {\n         xfree(x);\n         return pcap_geterr(pd);\n     }\n     xfree(x);\n-    if (pcap_setfilter(pd, &pcap_filter) == -1)\n+    if (pcap_setfilter(pd, &my_pcap_filter) == -1)\n         return pcap_geterr(pd);\n     else\n         return NULL;\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/iperf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"iperf\"\nPKG_VERSION=\"3.13\"\nPKG_SHA256=\"a49d23fe0d3b1482047ad7f3b9e384c69657a63b486c4e3f0ce512a077d94434\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://software.es.net/iperf/\"\nPKG_URL=\"https://github.com/esnet/iperf/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain openssl\"\nPKG_LONGDESC=\"A tool to measuring maximum TCP and UDP bandwidth performance.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared\"\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/irssi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"irssi\"\nPKG_VERSION=\"1.4.3\"\nPKG_SHA256=\"b93f715223a322e67f42b61a08a512ae29e34bd4a53d7f223766660aaa5a0434\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.irssi.org/\"\nPKG_URL=\"https://github.com/irssi/irssi/releases/download/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain glib ncurses openssl\"\nPKG_LONGDESC=\"Irssi is a terminal based IRC client for UNIX systems.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_MESON_OPTS_TARGET=\"-Dwithout-textui=no \\\n                       -Dwith-bot=no \\\n                       -Dwith-proxy=no \\\n                       -Dwith-perl=no\"\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/lftp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"lftp\"\nPKG_VERSION=\"4.9.2\"\nPKG_SHA256=\"c517c4f4f9c39bd415d7313088a2b1e313b2d386867fe40b7692b83a20f0670d\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"http://lftp.yar.ru/\"\nPKG_URL=\"http://lftp.yar.ru/ftp/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain readline openssl zlib libidn2\"\nPKG_LONGDESC=\"A sophisticated ftp/http client, and a file transfer program supporting a number of network protocols.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-nls \\\n                           --disable-rpath \\\n                           --without-gnutls \\\n                           --with-openssl \\\n                           --with-readline=${SYSROOT_PREFIX}/usr \\\n                           --with-zlib=${SYSROOT_PREFIX}/usr\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/lftp/patches/lftp-0001-link-readline-with-termcap.patch",
    "content": "diff -Naur a/configure b/configure\n--- a/configure\t2016-11-16 05:11:30.000000000 -0800\n+++ b/configure\t2021-04-17 14:18:59.000000000 +0000\n@@ -55428,7 +55428,7 @@\n \tfi\n         readline_ld_flags=\"-L$readline_prefix/lib\"\n         if test -z \"$readline_lib_flags\"; then\n-            readline_lib_flags=\"-lreadline\"\n+            readline_lib_flags=\"-lreadline -lncurses\"\n         fi\n         run_readline_test=\"yes\"\n     elif test \"$readline_requested\" = \"yes\"; then\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/ncftp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ncftp\"\nPKG_VERSION=\"3.2.6\"\nPKG_SHA256=\"5f200687c05d0807690d9fb770327b226f02dd86155b49e750853fce4e31098d\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"http://www.ncftp.com/ncftp/\"\nPKG_URL=\"ftp://ftp.ncftp.com/ncftp/ncftp-${PKG_VERSION}-src.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"NcFTP is a set of application programs implementing the File Transfer Protocol.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_header_librtmp_rtmp_h=yes \\\n            --enable-readline \\\n            --disable-universal \\\n            --disable-ccdv \\\n            --without-curses\"\n\npre_configure_target() {\n  export CFLAGS=\"${CFLAGS} -I../\"\n}\n\npre_build_target() {\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n  cp -RP ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/ncftp/patches/ncftpd-gcc10-build-fix.patch",
    "content": "diff -Nur a/sh_util/gpshare.c b/sh_util/gpshare.c\n--- a/sh_util/gpshare.c\t2016-11-13 00:53:39.000000000 +0100\n+++ b/sh_util/gpshare.c\t2020-06-22 20:24:08.160203885 +0200\n@@ -28,7 +28,7 @@\n \n static int gIsAtty1 = 1, gIsAtty2 = 1;\n extern int gLoadedBm, gBookmarkMatchMode;\n-Bookmark gBm;\n+extern Bookmark gBm;\n \n double\n FileSize(double size, const char **uStr0, double *uMult0)\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/ngrep/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ngrep\"\nPKG_VERSION=\"2a9603bc67dface9606a658da45e1f5c65170444\" # 2019-01-29\nPKG_SHA256=\"500c29914dd26f5aa6df07446388d49b60249622c9b0fd1f266f62a5706f056c\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/jpr5/ngrep\"\nPKG_URL=\"https://github.com/jpr5/ngrep/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libpcap pcre2\"\nPKG_LONGDESC=\"A tool like GNU grep applied to the network layer.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot -parallel\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-pcap-includes=${SYSROOT_PREFIX}/usr/include \\\n                           --enable-ipv6 \\\n                           --enable-pcre2 \\\n                           --disable-dropprivs\"\n\npre_build_target() {\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n  cp -RP ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/ngrep/patches/port-to-pcre2-api-and-enable-jit-compilation.patch",
    "content": "From cfcf1e6e9c4f8a2404810d8d1d90e6d1eaa0abdd Mon Sep 17 00:00:00 2001\nFrom: Romain Francoise <romain@rfr.io>\nDate: Sat, 20 Nov 2021 23:28:15 +0100\nSubject: [PATCH] Port to PCRE2 API and enable JIT compilation\n\nThe original PCRE API provided on most systems by libpcre3 is no longer\nmaintained upstream and is superseded by the new PCRE2 API, which was\nfirst released in 2015. pcre3 will be removed from Debian in 2023, as\nnoted in this bug report: https://bugs.debian.org/1000080\n\nThis commit replaces the existing PCRE implementation with a new one\nusing PCRE2, which is quite similar. One benefit is that PCRE2 provides\na JIT compiler which can replace the interpretive regular expression\nevaluation code with native machine code on most modern platforms:\nhttps://pcre.org/current/doc/html/pcre2jit.html\n\nDepending on the length and complexity of the pattern used, enabling JIT\ncompilation makes Ngrep 50x to 150x faster, testing in quiet mode on a\nmulti-gigabyte PCAP file stored on tmpfs.\n---\n configure.in |  24 ++++++------\n ngrep.c      | 106 ++++++++++++++++++++++++++++++++++-----------------\n 2 files changed, 82 insertions(+), 48 deletions(-)\n\ndiff --git a/configure.in b/configure.in\nindex dbef39b..0806a62 100644\n--- a/configure.in\n+++ b/configure.in\n@@ -141,16 +141,16 @@ dnl\n REGEX_DIR=''\n REGEX_OBJS=''\n \n-AC_ARG_ENABLE(pcre,\n-[  --enable-pcre           use PCRE instead of GNU regex (default GNU)],\n-[ use_pcre=\"$enableval\" ],\n-[ use_pcre=\"no\" ])\n-\n-if test $use_pcre = yes; then\n-  USE_PCRE=\"1\"\n-  EXTRA_LIBS=\"$EXTRA_LIBS -lpcre\"\n+AC_ARG_ENABLE(pcre2,\n+[  --enable-pcre2           use PCRE2 instead of GNU regex (default GNU)],\n+[ use_pcre2=\"$enableval\" ],\n+[ use_pcre2=\"no\" ])\n+\n+if test $use_pcre2 = yes; then\n+  USE_PCRE2=\"1\"\n+  EXTRA_LIBS=\"$EXTRA_LIBS -lpcre2-8\"\n else\n-  USE_PCRE=\"0\"\n+  USE_PCRE2=\"0\"\n \n   AC_MSG_RESULT\n   AC_MSG_RESULT(Configuring GNU Regular Expression library ...)\n@@ -476,7 +476,7 @@ dnl\n AC_DEFINE_UNQUOTED(USE_PCAP_RESTART,          $USE_PCAP_RESTART,          [whether to call the BPF lexer restart function between multiple BPF filter compilation attempts (default no)])\n AC_DEFINE_UNQUOTED(PCAP_RESTART_FUNC,         $PCAP_RESTART_FUNC,         [routine used for restarting the BPF lexer])\n \n-AC_DEFINE_UNQUOTED(USE_PCRE,                  $USE_PCRE,                  [whether to use PCRE (default GNU Regex)])\n+AC_DEFINE_UNQUOTED(USE_PCRE2,                 $USE_PCRE2,                 [whether to use PCRE2 (default GNU Regex)])\n AC_DEFINE_UNQUOTED(USE_IPv6,                  $USE_IPv6,                  [whether to use IPv6 (default off)])\n AC_DEFINE_UNQUOTED(USE_TCPKILL,               $USE_TCPKILL,               [whether to enable tcpkill functionality (default off)])\n AC_DEFINE_UNQUOTED(USE_VLAN_HACK,             $USE_VLAN_HACK,             [whether to automatically include VLAN frames (default on)])\n@@ -524,8 +524,8 @@ else\n     AC_MSG_RESULT(CONFIG: privilege dropping DISABLED)\n fi\n \n-if test \"$USE_PCRE\" = \"1\"; then\n-    AC_MSG_RESULT(CONFIG: using PCRE regex library)\n+if test \"$USE_PCRE2\" = \"1\"; then\n+    AC_MSG_RESULT(CONFIG: using PCRE2 regex library)\n else\n     AC_MSG_RESULT(CONFIG: using GNU regex library)\n fi\ndiff --git a/ngrep.c b/ngrep.c\nindex 3df9389..dcf0555 100644\n--- a/ngrep.c\n+++ b/ngrep.c\n@@ -91,8 +91,9 @@\n #include <netinet/icmp6.h>\n #endif\n \n-#if USE_PCRE\n-#include <pcre.h>\n+#if USE_PCRE2\n+#define PCRE2_CODE_UNIT_WIDTH 8\n+#include <pcre2.h>\n #else\n #include <regex.h>\n #endif\n@@ -128,12 +129,14 @@ char nonprint_char = '.';\n  * GNU Regex/PCRE\n  */\n \n-#if USE_PCRE\n-int32_t err_offset;\n-char *re_err = NULL;\n+#if USE_PCRE2\n+PCRE2_SIZE err_offset;\n+int re_err;\n \n-pcre *pattern = NULL;\n-pcre_extra *pattern_extra = NULL;\n+pcre2_code *re;\n+pcre2_match_data *pcre2_md;\n+PCRE2_SPTR pattern;\n+uint32_t pcre2_jit_on = 0;\n #else\n const char *re_err = NULL;\n \n@@ -189,6 +192,7 @@ uint32_t ws_row, ws_col = 80, ws_col_forced = 0;\n \n int main(int argc, char **argv) {\n     int32_t c;\n+    const char *extra = \"\";\n \n     signal(SIGINT,   clean_exit);\n     signal(SIGABRT,  clean_exit);\n@@ -394,8 +398,12 @@ int main(int argc, char **argv) {\n         if (setup_matcher())\n             clean_exit(2);\n \n+#if USE_PCRE2\n+        if (pcre2_jit_on)\n+            extra = \" (JIT)\";\n+#endif\n         if (quiet < 2 && strlen(match_data))\n-            printf(\"%smatch: %s%s\\n\", invert_match?\"don't \":\"\",\n+            printf(\"%smatch%s: %s%s\\n\", invert_match?\"don't \":\"\", extra,\n                    (bin_data && !strchr(match_data, 'x'))?\"0x\":\"\", match_data);\n \n         if (re_match_word) free(match_data);\n@@ -631,14 +639,14 @@ int setup_matcher(void) {\n \n     } else {\n \n-#if USE_PCRE\n-        uint32_t pcre_options = PCRE_UNGREEDY;\n+#if USE_PCRE2\n+        uint32_t pcre_options = PCRE2_UNGREEDY;\n \n         if (re_ignore_case)\n-            pcre_options |= PCRE_CASELESS;\n+            pcre_options |= PCRE2_CASELESS;\n \n         if (re_multiline_match)\n-            pcre_options |= PCRE_DOTALL;\n+            pcre_options |= PCRE2_DOTALL;\n #else\n         re_syntax_options = RE_CHAR_CLASSES | RE_NO_BK_PARENS | RE_NO_BK_VBAR |\n             RE_CONTEXT_INDEP_ANCHORS | RE_CONTEXT_INDEP_OPS;\n@@ -673,15 +681,36 @@ int setup_matcher(void) {\n             match_data = word_regex;\n         }\n \n-#if USE_PCRE\n-        pattern = pcre_compile(match_data, pcre_options, (const char **)&re_err, &err_offset, 0);\n+#if USE_PCRE2\n+        re = pcre2_compile((PCRE2_SPTR8)match_data, PCRE2_ZERO_TERMINATED,\n+            pcre_options, &re_err, &err_offset, NULL);\n+        if (!re) {\n+            PCRE2_UCHAR buffer[256];\n+            pcre2_get_error_message(re_err, buffer, sizeof(buffer));\n+            fprintf(stderr, \"regex compile failed: %s (offset: %zd)\\n\", buffer,\n+                err_offset);\n+            return 1;\n+        }\n \n-        if (!pattern) {\n-            fprintf(stderr, \"compile failed: %s\\n\", re_err);\n+        pcre2_md = pcre2_match_data_create_from_pattern(re, NULL);\n+        if (!pcre2_md) {\n+            fprintf(stderr, \"unable to alloc pcre2 match data\\n\");\n             return 1;\n         }\n \n-        pattern_extra = pcre_study(pattern, 0, (const char **)&re_err);\n+        pcre2_config(PCRE2_CONFIG_JIT, &pcre2_jit_on);\n+        if (pcre2_jit_on) {\n+            int rc;\n+            size_t jitsz;\n+\n+            if (pcre2_jit_compile(re, PCRE2_JIT_COMPLETE) != 0) {\n+                fprintf(stderr, \"unable to JIT-compile pcre2 regular expression\\n\");\n+                return 1;\n+            }\n+            rc = pcre2_pattern_info(re, PCRE2_INFO_JITSIZE, &jitsz);\n+            if (rc || jitsz == 0)\n+                pcre2_jit_on = 0;\n+        }\n #else\n         re_err = re_compile_pattern(match_data, strlen(match_data), &pattern);\n         if (re_err) {\n@@ -990,24 +1019,29 @@ void dump_packet(struct pcap_pkthdr *h, u_char *p, uint8_t proto, unsigned char\n }\n \n int8_t re_match_func(unsigned char *data, uint32_t len, uint16_t *mindex, uint16_t *msize) {\n-#if USE_PCRE\n-\n-    static int sub[2];\n-    switch(pcre_exec(pattern, 0, (char const *)data, (int32_t)len, 0, 0, 0, 0)) {\n-        case PCRE_ERROR_NULL:\n-        case PCRE_ERROR_BADOPTION:\n-        case PCRE_ERROR_BADMAGIC:\n-        case PCRE_ERROR_UNKNOWN_NODE:\n-        case PCRE_ERROR_NOMEMORY:\n-            perror(\"she's dead, jim\\n\");\n-            clean_exit(2);\n+#if USE_PCRE2\n+    int rc;\n+    PCRE2_SIZE *ovector;\n+    PCRE2_UCHAR errbuf[256];\n \n-        case PCRE_ERROR_NOMATCH:\n-            return 0;\n+    if (pcre2_jit_on)\n+        rc = pcre2_jit_match(re, data, len, 0, 0, pcre2_md, NULL);\n+    else\n+        rc = pcre2_match(re, data, len, 0, 0, pcre2_md, NULL);\n \n-        default:\n-            *mindex = sub[0];\n-            *msize  = sub[1] - sub[0];\n+    if (rc < 0) {\n+        switch (rc) {\n+            case PCRE2_ERROR_NOMATCH:\n+                return 0;\n+            default:\n+                pcre2_get_error_message(rc, errbuf, sizeof(errbuf));\n+                fprintf(stderr, \"she's dead, jim: %s (error %d)\\n\", errbuf, rc);\n+                clean_exit(2);\n+        }\n+    } else {\n+        ovector = pcre2_get_ovector_pointer(pcre2_md);\n+        *mindex = ovector[0];\n+        *msize = ovector[1] - ovector[0];\n     }\n #else\n \n@@ -1479,9 +1513,9 @@ void clean_exit(int32_t sig) {\n     if (quiet < 1 && sig >= 0)\n         printf(\"exit\\n\");\n \n-#if USE_PCRE\n-    if (pattern)       pcre_free(pattern);\n-    if (pattern_extra) pcre_free(pattern_extra);\n+#if USE_PCRE2\n+    if (re)       pcre2_code_free(re);\n+    if (pcre2_md) pcre2_match_data_free(pcre2_md);\n #else\n     if (pattern.translate) free(pattern.translate);\n     if (pattern.fastmap)   free(pattern.fastmap);\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/nmap/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"nmap\"\nPKG_VERSION=\"7.93\"\nPKG_SHA256=\"55bcfe4793e25acc96ba4274d8c4228db550b8e8efd72004b38ec55a2dd16651\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://nmap.org/\"\nPKG_URL=\"https://nmap.org/dist/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain openssl\"\nPKG_LONGDESC=\"Free Security Scanned for Network.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --with-pcap=linux \\\n                           --with-libpcap=included \\\n                           --with-libpcre=included \\\n                           --with-libdnet=included \\\n                           --with-liblua=included \\\n                           --with-liblinear=included \\\n                           --with-openssl=${SYSROOT_PREFIX}\"\n\npre_configure_target() {\n# nmap fails to build in subdirs\n  cd ${PKG_BUILD}\n    rm -rf .${TARGET_NAME}\n\n  export CPPFLAGS=\"${CPPFLAGS} -Iliblua\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/rar2fs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rar2fs\"\nPKG_VERSION=\"1.29.6\"\nPKG_SHA256=\"ba3a0b649f2322498d54168f03d2e8bca9b1c96d70d0d97d83ea336a7525d4cb\"\nPKG_LICENSE=\"GPL3\"\nPKG_SITE=\"https://github.com/hasse69/rar2fs\"\nPKG_URL=\"https://github.com/hasse69/rar2fs/releases/download/v${PKG_VERSION}/rar2fs-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain fuse unrar\"\nPKG_LONGDESC=\"FUSE file system for reading RAR archives\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\npre_configure_target() {\n  PKG_CONFIGURE_OPTS_TARGET=\"--with-unrar=${PKG_BUILD}/unrar \\\n                             --with-unrar-lib=${PKG_BUILD}/unrar \\\n                             --disable-static-unrar\"\n  cp -a $(get_install_dir unrar)/usr/include/unrar ${PKG_BUILD}/\n  cp -p $(get_install_dir unrar)/usr/lib/libunrar.a ${PKG_BUILD}/unrar/\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/rar2fs/patches/001-remove-man-pages-1.29.3.patch",
    "content": "diff -Nur rar2fs-1.29.3.orig/Makefile.am rar2fs-1.29.3/Makefile.am\n--- rar2fs-1.29.3.orig/Makefile.am\t2020-11-08 19:41:41.000000000 +0000\n+++ rar2fs-1.29.3/Makefile.am\t2021-01-01 11:33:42.609539322 +0000\n@@ -1,4 +1,4 @@\n ACLOCAL_AMFLAGS = -I m4\n-SUBDIRS = src man\n+SUBDIRS = src\n \n EXTRA_DIST = get-version.sh rarconfig.example\ndiff -Nur rar2fs-1.29.3.orig/Makefile.in rar2fs-1.29.3/Makefile.in\n--- rar2fs-1.29.3.orig/Makefile.in\t2020-12-15 13:06:30.000000000 +0000\n+++ rar2fs-1.29.3/Makefile.in\t2021-01-01 11:34:20.496533359 +0000\n@@ -233,7 +233,7 @@\n top_builddir = @top_builddir@\n top_srcdir = @top_srcdir@\n ACLOCAL_AMFLAGS = -I m4\n-SUBDIRS = src man\n+SUBDIRS = src\n EXTRA_DIST = get-version.sh rarconfig.example\n all: all-recursive\n \n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/sshfs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"sshfs\"\nPKG_VERSION=\"3.7.3\"\nPKG_SHA256=\"5218ce7bdd2ce0a34137a0d7798e0f6d09f0e6d21b1e98ee730a18b0699c2e99\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libfuse/sshfs\"\nPKG_URL=\"https://github.com/libfuse/sshfs/releases/download/sshfs-${PKG_VERSION}/sshfs-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain fuse3 glib\"\nPKG_LONGDESC=\"A filesystem client based on the SSH File Transfer Protocol.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/tcpdump/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tcpdump\"\nPKG_VERSION=\"4.99.3\"\nPKG_SHA256=\"ad75a6ed3dc0d9732945b2e5483cb41dc8b4b528a169315e499c6861952e73b3\"\nPKG_SITE=\"https://www.tcpdump.org/\"\nPKG_URL=\"https://www.tcpdump.org/release/tcpdump-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libpcap libtirpc\"\nPKG_LONGDESC=\"A program that allows you to dump the traffic on a network.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n# use configure, not cmake. review cmake in future release.\nPKG_TOOLCHAIN=\"configure\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-crypto=no\"\n\npre_configure_target() {\n  # When cross-compiling, configure can't set linux version\n  # forcing it\n  sed -i -e 's/ac_cv_linux_vers=unknown/ac_cv_linux_vers=2/' ../configure\n  CFLAGS+=\" -I${SYSROOT_PREFIX}/usr/include/tirpc\"\n  LDFLAGS+=\" -ltirpc\"\n}\n\npost_configure_target() {\n  # discard native system includes\n  sed -i \"s%-I/usr/include%%g\" Makefile\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/udpxy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"udpxy\"\nPKG_VERSION=\"1.0-25.1\"\nPKG_SHA256=\"a1a16e60895c6b2fd151321db47f5d5373843116f1b98ed9749e6c25a6c44497\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"http://www.udpxy.com\"\nPKG_URL=\"https://github.com/pcherenkov/udpxy/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A UDP-to-HTTP multicast traffic relay daemon.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_MAKEINSTALL_OPTS_TARGET=\"PREFIX=/usr\"\n\npost_unpack() {\n  mv ${PKG_BUILD}/README ${PKG_BUILD}/README-\n  mv ${PKG_BUILD}/chipmunk/* ${PKG_BUILD}\n  rmdir ${PKG_BUILD}/chipmunk\n}\n\nconfigure_target() {\n  export CFLAGS+=\" -Wno-stringop-truncation\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/network-tools-depends/wireless_tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"wireless_tools\"\nPKG_VERSION=\"30.pre9\"\nPKG_SHA256=\"abd9c5c98abf1fdd11892ac2f8a56737544fe101e1be27c6241a564948f34c63\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/HewlettPackard/wireless-tools\"\nPKG_URL=\"https://hewlettpackard.github.io/wireless-tools/${PKG_NAME}.${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"The Wireless Tools (WT) is a set of tools allowing to manipulate the Wireless Extensions.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nmake_target() {\n  make PREFIX=/usr CC=\"${CC}\" AR=\"${AR}\" \\\n    CFLAGS=\"${CFLAGS}\" CPPFLAGS=\"${CPPFLAGS}\" iwmulticall\n}\n\nmakeinstall_target() {\n  make PREFIX=${INSTALL}/usr install-iwmulticall\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/opus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"opus\"\nPKG_VERSION=\"1.4\"\nPKG_SHA256=\"c9b32b4253be5ae63d1ff16eea06b94b5f0f2951b7a02aceef58e3a3ce49c51f\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://www.opus-codec.org\"\nPKG_URL=\"https://github.com/xiph/opus/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Codec designed for interactive speech and audio transmission over the Internet.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nif [ \"${TARGET_ARCH}\" = \"arm\" ]; then\n  PKG_FIXED_POINT=\"--enable-fixed-point\"\nelse\n  PKG_FIXED_POINT=\"--disable-fixed-point\"\nfi\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           ${PKG_FIXED_POINT}\"\n"
  },
  {
    "path": "packages/addons/addon-depends/pcsc-lite/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pcsc-lite\"\nPKG_VERSION=\"1.9.9\"\nPKG_SHA256=\"cbcc3b34c61f53291cecc0d831423c94d437b188eb2b97b7febc08de1c914e8a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://pcsclite.apdu.fr\"\nPKG_URL=\"https://pcsclite.apdu.fr/files/pcsc-lite-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libusb\"\nPKG_LONGDESC=\"Middleware to access a smart card using SCard API (PC/SC).\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-shared \\\n            --enable-static \\\n            --disable-libudev \\\n            --enable-libusb \\\n            --enable-usbdropdir=/storage/.kodi/addons/service.pcscd/drivers\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/pngquant/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pngquant\"\nPKG_VERSION=\"2.18.0\"\nPKG_SHA256=\"e72194b52b36f040deaec49a1ddd5dcd8d4feecc3a5fe6c5e9589a9707b233d4\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://pngquant.org\"\nPKG_URL=\"https://pngquant.org/pngquant-${PKG_VERSION}-src.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host libpng:host zlib:host\"\nPKG_LONGDESC=\"A lossy PNG compressor.\"\n\nconfigure_host() {\n  :\n}\n\nmake_host() {\n  cd ${PKG_BUILD}\n  BIN=${PKG_BUILD}/pngquant make\n\n  ${STRIP} ${PKG_BUILD}/pngquant\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp ${PKG_BUILD}/pngquant ${TOOLCHAIN}/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/protobuf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"protobuf\"\nPKG_VERSION=\"3.14.0\"\nPKG_SHA256=\"50ec5a07c0c55d4ec536dd49021f2e194a26bfdbc531d03d1e9d4d3e27175659\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://developers.google.com/protocol-buffers/\"\nPKG_URL=\"https://github.com/google/${PKG_NAME}/releases/download/v${PKG_VERSION}/${PKG_NAME}-cpp-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host zlib:host\"\nPKG_DEPENDS_TARGET=\"toolchain zlib protobuf:host\"\nPKG_LONGDESC=\"Protocol Buffers for Google's data interchange format.\"\n\nPKG_CMAKE_OPTS_HOST=\"-DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 \\\n                     -DBUILD_SHARED_LIBS=0 \\\n                     -Dprotobuf_BUILD_TESTS=0 \\\n                     -Dprotobuf_BUILD_EXAMPLES=0 \\\n                     -Dprotobuf_WITH_ZLIB=1\"\n\nPKG_CMAKE_OPTS_TARGET=\"${PKG_CMAKE_OPTS_HOST}\"\n\nconfigure_package() {\n  PKG_CMAKE_SCRIPT=\"${PKG_BUILD}/cmake/CMakeLists.txt\"\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n\n  # HACK: we have protoc in ${TOOLCHAIN}/bin but it seems\n  # the one from sysroot prefix is picked when building hyperion. remove it!\n  rm -f ${SYSROOT_PREFIX}/usr/bin/protoc\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/qtbase/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"qtbase\"\nPKG_VERSION=\"5.14.0\"\nPKG_SHA256=\"4ef921c0f208a1624439801da8b3f4344a3793b660ce1095f2b7f5c4246b9463\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://qt-project.org\"\nPKG_URL=\"http://download.qt.io/archive/qt/${PKG_VERSION%.*}/${PKG_VERSION}/submodules/${PKG_NAME}-everywhere-src-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"freetype libjpeg-turbo libpng openssl sqlite zlib\"\nPKG_LONGDESC=\"A cross-platform application and UI framework.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"-prefix /usr\n                           -sysroot \"${SYSROOT_PREFIX}\"\n                           -hostprefix \"${TOOLCHAIN}\"\n                           -device linux-libreelec-g++\n                           -opensource -confirm-license\n                           -release\n                           -optimize-size\n                           -strip\n                           -static\n                           -silent\n                           -force-pkg-config\n                           -make libs\n                           -no-dbus\n                           -no-accessibility\n                           -no-glib\n                           -no-iconv\n                           -no-icu\n                           -qt-pcre\n                           -system-zlib\n                           -no-zstd\n                           -openssl-linked\n                           -no-libproxy\n                           -no-cups\n                           -no-fontconfig\n                           -system-freetype\n                           -no-harfbuzz\n                           -no-opengl\n                           -no-egl\n                           -no-eglfs\n                           -no-gbm\n                           -no-kms\n                           -no-linuxfb\n                           -no-xcb\n                           -no-feature-vnc\n                           -no-feature-sessionmanager\n                           -no-feature-easingcurve\n                           -no-feature-effects\n                           -no-feature-gestures\n                           -no-feature-itemmodel\n                           -no-libudev\n                           -no-evdev\n                           -no-libinput\n                           -no-mtdev\n                           -no-tslib\n                           -no-xkbcommon\n                           -no-gif\n                           -no-ico\n                           -system-libpng\n                           -system-libjpeg\n                           -no-sql-mysql\n                           -system-sqlite\"\n\nconfigure_target() {\n  QMAKE_CONF_DIR=\"mkspecs/devices/linux-libreelec-g++\"\n\n  cd ..\n  mkdir -p ${QMAKE_CONF_DIR}\n\n  cat >\"${QMAKE_CONF_DIR}/qmake.conf\" <<EOF\nMAKEFILE_GENERATOR      = UNIX\nCONFIG                 += incremental\nQMAKE_INCREMENTAL_STYLE = sublib\ninclude(../../common/linux.conf)\ninclude(../../common/gcc-base-unix.conf)\ninclude(../../common/g++-unix.conf)\nload(device_config)\nQMAKE_CC         = ${CC}\nQMAKE_CXX        = ${CXX}\nQMAKE_LINK       = ${CXX}\nQMAKE_LINK_SHLIB = ${CXX}\nQMAKE_AR         = ${AR} cqs\nQMAKE_OBJCOPY    = ${OBJCOPY}\nQMAKE_NM         = ${NM} -P\nQMAKE_STRIP      = ${STRIP}\nQMAKE_CFLAGS     = ${CFLAGS}\nQMAKE_CXXFLAGS   = ${CXXFLAGS}\nQMAKE_LFLAGS     = ${LDFLAGS}\nload(qt_config)\nEOF\n\n  cat >\"${QMAKE_CONF_DIR}/qplatformdefs.h\" <<EOF\n#include \"../../linux-g++/qplatformdefs.h\"\nEOF\n\n  unset CC CXX LD RANLIB AR AS CPPFLAGS CFLAGS LDFLAGS CXXFLAGS\n  ./configure ${PKG_CONFIGURE_OPTS_TARGET}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/qtbase/patches/qtbase-0001-use-sysroot-path-for-pkgconfig-and-libtool.patch",
    "content": "From 0650bbb7d79c6db34bc54dfb73320303d83a8f56 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Tue, 14 Jan 2020 21:35:57 +0000\nSubject: [PATCH] use sysroot path for pkgconfig and libtool\n\n---\n mkspecs/features/qt_module.prf | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf\nindex 828a9621b9..0f3472fffc 100644\n--- a/mkspecs/features/qt_module.prf\n+++ b/mkspecs/features/qt_module.prf\n@@ -275,12 +275,12 @@ load(qt_targets)\n     host_build: \\\n         QMAKE_PKGCONFIG_LIBDIR = $$[QT_HOST_LIBS]\n     else: \\\n-        QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS/raw]\n+        QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS]\n     lib_bundle {\n-        QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_LIBS/raw]/$${MODULE_INCNAME}.framework/Headers\n+        QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_LIBS]/$${MODULE_INCNAME}.framework/Headers\n         QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE\n     } else {\n-        QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]\n+        QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS]\n         QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE -I${includedir}/$$MODULE_INCNAME\n         for(inc, MODULE_AUX_INCLUDES): \\\n             QMAKE_PKGCONFIG_CFLAGS += -I${includedir}/$$section(inc, /, 1, 1)\n@@ -308,7 +308,7 @@ load(qt_targets)\n     host_build: \\\n         QMAKE_LIBTOOL_LIBDIR = $$[QT_HOST_LIBS]\n     else: \\\n-        QMAKE_LIBTOOL_LIBDIR = \"=$$[QT_INSTALL_LIBS/raw]\"\n+        QMAKE_LIBTOOL_LIBDIR = \"=$$[QT_INSTALL_LIBS]\"\n     !isEmpty(lib_replace0.match) {\n         ltlib_replace0.match = $$lib_replace0.match\n         ltlib_replace0.replace = $$QMAKE_LIBTOOL_LIBDIR/\n-- \n2.17.1\n\n"
  },
  {
    "path": "packages/addons/addon-depends/qtbase/patches/qtbase-0002-fix-build-with-gcc-11.patch",
    "content": "From 0afad46bb71b106780dd641de768a81d9f6c6a51 Mon Sep 17 00:00:00 2001\nFrom: Thiago Macieira <thiago.macieira@intel.com>\nDate: Mon, 18 Jan 2021 07:40:54 -0800\nSubject: Fix build with GCC 11: include <limits>\n\nFixes: QTBUG-90395\nChange-Id: Iecc74d2000eb40dfbe7bfffd165b5dd3708b7a40\nReviewed-by: Edward Welbourne <edward.welbourne@qt.io>\n(cherry picked from commit 9c56d4da2ff631a8c1c30475bd792f6c86bda53c)\nReviewed-by: Andy Shaw <andy.shaw@qt.io>\n---\n src/corelib/global/qendian.h  | 4 +++-\n src/corelib/global/qfloat16.h | 1 +\n 2 files changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h\nindex 2fe29e4338..3abd6a000c 100644\n--- a/src/corelib/global/qendian.h\n+++ b/src/corelib/global/qendian.h\n@@ -44,6 +44,8 @@\n #include <QtCore/qfloat16.h>\n #include <QtCore/qglobal.h>\n \n+#include <limits>\n+\n // include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems\n #include <stdlib.h>\n #include <string.h>\ndiff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h\nindex 5b369bf3c5..6c52c94466 100644\n--- a/src/corelib/global/qfloat16.h\n+++ b/src/corelib/global/qfloat16.h\n@@ -43,6 +43,7 @@\n \n #include <QtCore/qglobal.h>\n #include <QtCore/qmetatype.h>\n+#include <limits>\n #include <string.h>\n \n #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)\n-- \ncgit v1.2.1\n\n"
  },
  {
    "path": "packages/addons/addon-depends/qtbase/patches/qtbase-0003-More-build-fixes-for-GCC-11.patch",
    "content": "From 8bcf1828f4d75606fb8d6913dfe09e2363a06cac Mon Sep 17 00:00:00 2001\nFrom: Ville Voutilainen <ville.voutilainen@qt.io>\nDate: Mon, 18 Jan 2021 09:58:17 +0200\nSubject: [PATCH 002/132] Build fixes for GCC 11\n\nTask-number: QTBUG-89977\nChange-Id: Ic1b7ddbffb8a0a00f8c621d09a868f1d94a52c21\nReviewed-by: Lars Knoll <lars.knoll@qt.io>\nReviewed-by: Thiago Macieira <thiago.macieira@intel.com>\n(cherry picked from commit 813a928c7c3cf98670b6043149880ed5c955efb9)\n---\n src/corelib/text/qbytearraymatcher.h     | 2 ++\n src/corelib/tools/qsharedpointer_impl.h  | 3 ---\n src/plugins/platforms/xcb/qxcbwindow.cpp | 2 +-\n 3 files changed, 3 insertions(+), 4 deletions(-)\n\ndiff --git a/src/corelib/text/qbytearraymatcher.h b/src/corelib/text/qbytearraymatcher.h\nindex 0eedfc1d20..f5f9bef7b8 100644\n--- a/src/corelib/text/qbytearraymatcher.h\n+++ b/src/corelib/text/qbytearraymatcher.h\n@@ -42,6 +42,8 @@\n \n #include <QtCore/qbytearray.h>\n \n+#include <limits>\n+\n QT_BEGIN_NAMESPACE\n \n \ndiff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h\nindex 790c187cb9..4aee98af53 100644\n--- a/src/corelib/tools/qsharedpointer_impl.h\n+++ b/src/corelib/tools/qsharedpointer_impl.h\n@@ -155,9 +155,6 @@ namespace QtSharedPointer {\n #endif\n         inline void checkQObjectShared(...) { }\n         inline void setQObjectShared(...) { }\n-\n-        inline void operator delete(void *ptr) { ::operator delete(ptr); }\n-        inline void operator delete(void *, void *) { }\n     };\n     // sizeof(ExternalRefCountData) = 12 (32-bit) / 16 (64-bit)\n \ndiff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp\nindex 9e7e1a5572..f0866a90ac 100644\n--- a/src/plugins/platforms/xcb/qxcbwindow.cpp\n+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp\n@@ -698,7 +698,7 @@ void QXcbWindow::show()\n         if (isTransient(window())) {\n             const QWindow *tp = window()->transientParent();\n             if (tp && tp->handle())\n-                transientXcbParent = static_cast<const QXcbWindow *>(tp->handle())->winId();\n+                transientXcbParent = tp->handle()->winId();\n             // Default to client leader if there is no transient parent, else modal dialogs can\n             // be hidden by their parents.\n             if (!transientXcbParent)\n-- \n2.35.1\n\n"
  },
  {
    "path": "packages/addons/addon-depends/rpi-tools-depends/RPi.GPIO/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"RPi.GPIO\"\nPKG_VERSION=\"0.7.1\"\nPKG_SHA256=\"cd61c4b03c37b62bba4a5acfea9862749c33c618e0295e7e90aa4713fb373b70\"\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://sourceforge.net/projects/raspberry-gpio-python/\"\nPKG_URL=\"https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"A module to control Raspberry Pi GPIO channels.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_configure_target() {\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n  export LDSHARED=\"${CC} -shared\"\n  export CFLAGS=\"${CFLAGS} -fcommon\"\n  export CPPFLAGS=\"${TARGET_CPPFLAGS} -I${SYSROOT_PREFIX}/usr/include/${PKG_PYTHON_VERSION}\"\n}\n\nmake_target() {\n  python3 setup.py build\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/rpi-tools-depends/colorzero/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"colorzero\"\nPKG_VERSION=\"2.0\"\nPKG_SHA256=\"86c9933b004aec8ce1c476d1d1129e00325c7724df3c09aa353d5f8e883ed08d\"\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://github.com/waveform80/colorzero\"\nPKG_URL=\"https://github.com/waveform80/colorzero/archive/release-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Another color manipulation library for Python (originally from picamera).\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/rpi-tools-depends/gpiozero/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gpiozero\"\nPKG_VERSION=\"1.6.2\"\nPKG_SHA256=\"0eb95a9db372146813276f92de7f43c883a3e9fe69597fc3d29c04ef3d5d5f9e\"\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://github.com/RPi-Distro/python-gpiozero\"\nPKG_URL=\"https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain colorzero\"\nPKG_LONGDESC=\"A simple interface to everyday GPIO components used with Raspberry Pi.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/rpi-tools-depends/lan951x-led-ctl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"lan951x-led-ctl\"\nPKG_VERSION=\"1.0\"\nPKG_SHA256=\"27d607d3c5c7b142681dcd9fd0afecb7fcb052abfaffc330b28906f782e602f3\"\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://familie-radermacher.ch/dominic/computer/raspberry-pi/lan951x-led-ctl/\"\nPKG_URL=\"https://mockmoon-cybernetics.ch/cgi/cgit/lan951x-led-ctl.git/snapshot/lan951x-led-ctl-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libusb\"\nPKG_LONGDESC=\"Control LEDs connected to LAN9512/LAN9514 ethernet USB controllers.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  ${CC} -std=c11 -I./include -Wall -Wstrict-prototypes -Wconversion \\\n      -Wmissing-prototypes -Wshadow -Wextra -Wunused \\\n      ${CFLAGS} -lusb-1.0 ${LDFLAGS} -o lan951x-led-ctl src/lan951x-led-ctl.c\n\n  ${STRIP} lan951x-led-ctl\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/rpi_ws281x/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rpi_ws281x\"\nPKG_VERSION=\"6c5ade93d1af78cd19e60ee5ecc34adfd111b186\"\nPKG_SHA256=\"e8fb94429edc21cfd894548755a417eb5b2e121329f4b54270cfb3f727696e21\"\nPKG_LICENSE=\"BSD-3c\"\nPKG_SITE=\"https://github.com/hyperion-project/rpi_ws281x\"\nPKG_URL=\"https://github.com/hyperion-project/rpi_ws281x/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Userspace Raspberry Pi PWM library for WS281X LEDs.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/rsyslog-depends/libestr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libestr\"\nPKG_VERSION=\"0.1.11\"\nPKG_SHA256=\"46b53b80f875fd82981d927a45f0c9df9d17ee1d0e29efab76aaa9cd54a46bb4\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://libestr.adiscon.com\"\nPKG_URL=\"https://github.com/rsyslog/libestr/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_LONGDESC=\"Some essentials for string handling.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           ac_cv_func_malloc_0_nonnull=yes \\\n                           ac_cv_func_realloc_0_nonnull=yes\"\n"
  },
  {
    "path": "packages/addons/addon-depends/rsyslog-depends/libfastjson/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libfastjson\"\nPKG_VERSION=\"1.2304.0\"\nPKG_SHA256=\"ef30d1e57a18ec770f90056aaac77300270c6203bbe476f4181cc83a2d5dc80c\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.rsyslog.com/tag/libfastjson\"\nPKG_URL=\"https://download.rsyslog.com/libfastjson/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A fast json library for C.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           ac_cv_func_malloc_0_nonnull=yes \\\n                           ac_cv_func_realloc_0_nonnull=yes\"\n"
  },
  {
    "path": "packages/addons/addon-depends/rsyslog-depends/liblogging/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"liblogging\"\nPKG_VERSION=\"1.0.6\"\nPKG_SHA256=\"338c6174e5c8652eaa34f956be3451f7491a4416ab489aef63151f802b00bf93\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.liblogging.org\"\nPKG_URL=\"https://download.rsyslog.com/liblogging/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain systemd\"\nPKG_LONGDESC=\"An easy to use and lightweight signal-safe logging library.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           --disable-man-pages \\\n                           ac_cv_func_malloc_0_nonnull=yes \\\n                           ac_cv_func_realloc_0_nonnull=yes\"\n"
  },
  {
    "path": "packages/addons/addon-depends/rsyslog-depends/liblognorm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"liblognorm\"\nPKG_VERSION=\"2.0.6\"\nPKG_SHA256=\"594ea3318ef419cb7f21cf81c513db35a838b32207999a11a82b709da9ff9a2b\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.liblognorm.com\"\nPKG_URL=\"https://github.com/rsyslog/liblognorm/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libestr libfastjson\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_LONGDESC=\"A fast samples-based log normalization library.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           ac_cv_func_malloc_0_nonnull=yes \\\n                           ac_cv_func_realloc_0_nonnull=yes\"\n"
  },
  {
    "path": "packages/addons/addon-depends/rsyslog-depends/librelp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"librelp\"\nPKG_VERSION=\"1.11.0\"\nPKG_SHA256=\"7719b5f31e07cbb9872289ad32b787c613b5355d407982a0a2c4d69938457fd6\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.rsyslog.com/category/librelp/\"\nPKG_URL=\"https://download.rsyslog.com/librelp/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Provides reliable event logging over the network.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           --disable-tls \\\n                           ac_cv_func_malloc_0_nonnull=yes \\\n                           ac_cv_func_realloc_0_nonnull=yes\"\n"
  },
  {
    "path": "packages/addons/addon-depends/runc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"runc\"\nPKG_VERSION=\"1.1.7\"\nPKG_SHA256=\"f1885d6dfa188f8112328ac2355e5d67346174a2e2e795ec514a972bcbfcc2fa\"\nPKG_LICENSE=\"APL\"\nPKG_SITE=\"https://github.com/opencontainers/runc\"\nPKG_URL=\"https://github.com/opencontainers/runc/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain go:host libseccomp\"\nPKG_LONGDESC=\"A CLI tool for spawning and running containers according to the OCI specification.\"\nPKG_TOOLCHAIN=\"manual\"\n\n# Git commit of the matching release https://github.com/opencontainers/runc/releases\nPKG_GIT_COMMIT=\"6724737f999df9ee0d8ca5c6d7b81f97adc34374\"\n\npre_make_target() {\n  go_configure\n\n  export LDFLAGS=\"-w -extldflags -static -X main.gitCommit=${PKG_GIT_COMMIT} -X main.version=$(cat ./VERSION) -extld ${CC}\"\n  export PKG_CONFIG_PATH=\"$(get_install_dir libseccomp)/usr/lib/pkgconfig:${PKG_CONFIG_PATH}\"\n\n  mkdir -p ${GOPATH}\n  if [ -d ${PKG_BUILD}/vendor ]; then\n    mv ${PKG_BUILD}/vendor ${GOPATH}/src\n  fi\n\n  ln -fs ${PKG_BUILD} ${GOPATH}/src/github.com/opencontainers/runc\n}\n\nmake_target() {\n  mkdir -p bin\n  ${GOLANG} build -v -o bin/runc -a -tags \"cgo seccomp static_build\" -ldflags \"${LDFLAGS}\" ./\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/sdlgamecontrollerdb/package.mk",
    "content": "# SPDX-License-Identifier: GPL-3.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"sdlgamecontrollerdb\"\nPKG_VERSION=\"adf7ec1edfc0371ebf5fb469b61f301b8e26ec81\"\nPKG_SHA256=\"efe9e6f98e4a635e8d0dc8634bd80b409efae7d45b100179018c9c31d119a857\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"zlib\"\nPKG_SITE=\"https://github.com/gabomdq/SDL_GameControllerDB\"\nPKG_URL=\"https://github.com/gabomdq/SDL_GameControllerDB/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"SDL2 game controller mappings database\"\nPKG_LONGDESC=\"A community sourced database of game controller mappings to be used with SDL2 Game Controller functionality.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/addons/addon-depends/snapcast-depends/aixlog/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"aixlog\"\nPKG_VERSION=\"1.5.0\"\nPKG_SHA256=\"c32b2b2e7ed2632fab53aba01f731fce1e7b150fe7d08bccdafc250e5cb836a8\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/badaix/aixlog\"\nPKG_URL=\"https://github.com/badaix/aixlog/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Header-only C++ logging library.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_EXAMPLE=OFF\"\n"
  },
  {
    "path": "packages/addons/addon-depends/snapcast-depends/alsa-plugins/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"alsa-plugins\"\nPKG_VERSION=\"1.2.7.1\"\nPKG_SHA256=\"8c337814954bb7c167456733a6046142a2931f12eccba3ec2a4ae618a3432511\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.alsa-project.org/\"\nPKG_URL=\"ftp://ftp.alsa-project.org/pub/plugins/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib\"\nPKG_LONGDESC=\"Alsa plugins.\"\n\nif [ \"${PULSEAUDIO_SUPPORT}\" = yes ]; then\n  PKG_DEPENDS_TARGET+=\" pulseaudio\"\n  SUBDIR_PULSEAUDIO=\"pulse\"\nfi\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-plugindir=/usr/lib/alsa\"\nPKG_MAKE_OPTS_TARGET=\"SUBDIRS=${SUBDIR_PULSEAUDIO}\"\nPKG_MAKEINSTALL_OPTS_TARGET=\"SUBDIRS=${SUBDIR_PULSEAUDIO}\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/snapcast-depends/asio/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"asio\"\nPKG_VERSION=\"1.28.0\"\nPKG_SHA256=\"5c2af07ef73b42a2d48e34c0ecbf41cd40dc823bc681bf5833c129384999c963\"\nPKG_LICENSE=\"BSL\"\nPKG_SITE=\"http://think-async.com/Asio\"\nPKG_URL=\"https://github.com/chriskohlhoff/asio/archive/asio-${PKG_VERSION//./-}.zip\"\nPKG_SOURCE_DIR=\"asio-asio-${PKG_VERSION//./-}\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Asio C++ Library.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--without-boost --without-openssl\"\n\nconfigure_package() {\n  PKG_CONFIGURE_SCRIPT=\"${PKG_BUILD}/asio/configure\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/snapcast-depends/libsodium/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libsodium\"\nPKG_VERSION=\"e2bd4024008c73f1c0402e1c2f4db9a2300e9c95\" # 1.0.18-stable 2022-09-24\nPKG_SHA256=\"b5035fcc061e410291baded4098a3ab56da90eb7d47d82ba2d0e05e3d105b8f6\"\nPKG_LICENSE=\"ISC\"\nPKG_SITE=\"https://libsodium.org/\"\nPKG_URL=\"https://github.com/jedisct1/libsodium/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A modern, portable, easy to use crypto library\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-shared\"\n"
  },
  {
    "path": "packages/addons/addon-depends/snapcast-depends/nqptp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"nqptp\"\nPKG_VERSION=\"1.2.1\"\nPKG_SHA256=\"fab700572961ca81addb405e8bd4bd57c47259f91e7e8e0f5f82240c38c63ce5\"\nPKG_LICENSE=\"GPL-2.0\"\nPKG_SITE=\"https://github.com/mikebrady/nqptp\"\nPKG_URL=\"https://github.com/mikebrady/nqptp/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Not Quite PTP\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-systemd-startup\"\n"
  },
  {
    "path": "packages/addons/addon-depends/snapcast-depends/popl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"popl\"\nPKG_VERSION=\"1.3.0\"\nPKG_SHA256=\"7c59554371da3c6c093bd79c2f403f921c1938bd523f1a48682352e0d92883a6\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/badaix/popl\"\nPKG_URL=\"https://github.com/badaix/popl/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Header-only C++ program options parser library.\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/include\n  cp -p ${PKG_BUILD}/include/popl.hpp ${INSTALL}/usr/include\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/snapcast-depends/shairport-sync/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"shairport-sync\"\nPKG_VERSION=\"4.2\"\nPKG_SHA256=\"649d95eede8b9284b2e8b9c97d18c1c64cffae0a6c75bc4f03e3ae494a3e25b6\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://github.com/mikebrady/shairport-sync\"\nPKG_URL=\"https://github.com/mikebrady/shairport-sync/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib avahi ffmpeg libconfig libdaemon libgcrypt libplist libsndfile libsodium nqptp openssl popt pulseaudio soxr util-linux xxd:host\"\nPKG_LONGDESC=\"AirPlay audio player.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-alsa \\\n                           --with-avahi \\\n                           --with-convolution \\\n                           --with-metadata \\\n                           --with-pa \\\n                           --with-pipe \\\n                           --with-pkg-config \\\n                           --with-soxr \\\n                           --with-ssl=openssl \\\n                           --with-stdout \\\n                           --without-configfiles \\\n                           --with-airplay-2\"\n"
  },
  {
    "path": "packages/addons/addon-depends/snapcast-depends/snapcast/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"snapcast\"\nPKG_VERSION=\"0.27.0\"\nPKG_SHA256=\"c662c6eafbaa42a4797a4ed6ba4a7602332abf99f6ba6ea88ff8ae59978a86ba\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/badaix/snapcast\"\nPKG_URL=\"https://github.com/badaix/snapcast/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain aixlog alsa-lib asio avahi flac libvorbis popl pulseaudio boost opus\"\nPKG_LONGDESC=\"Synchronous multi-room audio player.\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\npre_configure_target() {\n  cd ..\n  rm -rf .${TARGET_NAME}\n  CXXFLAGS=\"${CXXFLAGS} -pthread \\\n                      -I$(get_install_dir aixlog)/usr/include \\\n                      -I$(get_install_dir asio)/usr/include \\\n                      -I$(get_install_dir popl)/usr/include\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp -p server/snapserver client/snapclient ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/snapcast-depends/snapcast/patches/snapcast-01_makefiles.patch",
    "content": "--- snapcast-0.14.0/client/Makefile\t2018-04-27 19:43:25.000000000 +0200\n+++ snapcast-0.14.0.makefiles/client/Makefile\t2018-05-21 13:14:12.388757526 +0200\n@@ -83,7 +83,6 @@\n \n else\n \n-CXX       = g++\n CXXFLAGS += -pthread -DHAS_VORBIS -DHAS_ALSA -DHAS_PULSE -DHAS_AVAHI -DHAS_DAEMON\n-LDFLAGS  += -lrt -lasound -lpulse -lvorbis -lavahi-client -lavahi-common -latomic\n+LDFLAGS  += -lrt -lasound -lpulse -lvorbis -lavahi-client -lavahi-common -logg\n OBJ      += ../common/daemon.o player/alsa_player.o player/pulse_player.o browseZeroConf/browse_avahi.o\ndiff -Naur snapcast-0.14.0/server/Makefile snapcast-0.14.0.makefiles/server/Makefile\n--- snapcast-0.14.0/server/Makefile\t2018-04-27 19:43:25.000000000 +0200\n+++ snapcast-0.14.0.makefiles/server/Makefile\t2018-05-21 13:14:56.881206277 +0200\n@@ -88,7 +88,6 @@\n \n else\n \n-CXX       = g++\n CXXFLAGS += -DHAS_AVAHI -DHAS_DAEMON -DHAS_ALSA -pthread\n-LDFLAGS  += -lrt -lasound -lavahi-client -lavahi-common -latomic\n+LDFLAGS  += -lrt -lasound -lavahi-client -lavahi-common\n OBJ      += ../common/daemon.o publishZeroConf/publish_avahi.o streamreader/alsa_stream.o\n"
  },
  {
    "path": "packages/addons/addon-depends/snapcast-depends/snapcast/patches/snapcast-02_avahi.patch",
    "content": "--- a/server/streamreader/airplay_stream.cpp\t2021-12-22 17:40:36.000000000 +0000\n+++ b/server/streamreader/airplay_stream.cpp\t2022-10-03 12:05:31.690039620 +0000\n@@ -58,7 +58,7 @@\n     string devicename = uri_.getQuery(\"devicename\", \"Snapcast\");\n     string password = uri_.getQuery(\"password\", \"\");\n \n-    params_wo_port_ = \"\\\"--name=\" + devicename + \"\\\" --output=stdout --use-stderr --get-coverart\";\n+    params_wo_port_ = \"\\\"--name=\" + devicename + \"\\\" --output=stdout --use-stderr --get-coverart --mdns=avahi\";\n     if (!password.empty())\n         params_wo_port_ += \" --password \\\"\" + password + \"\\\"\";\n     if (!params_.empty())\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/autossh/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"autossh\"\nPKG_VERSION=\"1.4g\"\nPKG_SHA256=\"5fc3cee3361ca1615af862364c480593171d0c54ec156de79fc421e31ae21277\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.harding.motd.ca/\"\nPKG_URL=\"http://www.harding.motd.ca/autossh/autossh-${PKG_VERSION}.tgz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Automatically restart SSH sessions and tunnels.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_func_malloc_0_nonnull=yes \\\n                           ac_cv_func_realloc_0_nonnull=yes\"\n\npre_configure_target() {\n  export CFLAGS=\"${CFLAGS} -I.\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp -p autossh ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/bottom/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"bottom\"\nPKG_VERSION=\"0.9.4\"\nPKG_SHA256=\"199123ef354bcabaa8a2e3b7b477b324f5b647d503a2599d08296733846eea6e\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/ClementTsang/bottom\"\nPKG_URL=\"https://github.com/ClementTsang/bottom/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain cargo:host\"\nPKG_LONGDESC=\"A TUI system monitor written in Rust.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  cargo build \\\n    --target ${TARGET_NAME} \\\n    --release \\\n    --locked \\\n    --all-features\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}\n  cp ${PKG_BUILD}/.${TARGET_NAME}/target/${TARGET_NAME}/release/btm ${INSTALL}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/depends/efivar/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"efivar\"\nPKG_VERSION=\"b920a6ca82250504167066d24aa8731ad29a0de8\" # 10 Dec 2021\nPKG_SHA256=\"def327792854bdb5bc442e2907e1871c954e55e33d67045dcd2d2988f8a08afd\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://github.com/rhboot/efivar\"\nPKG_URL=\"https://github.com/rhboot/efivar/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain efivar:host\"\nPKG_LONGDESC=\"Tools and library to manipulate EFI variables.\"\nPKG_BUILD_FLAGS=\"-gold\"\n\npre_make_host() {\n  export TOPDIR=${PKG_BUILD}\n}\n\nmake_host() {\n  make -C src/ include/efivar/efivar-guids.h\n}\n\npre_make_target() {\n  sed -e 's/-Werror//' -i src/include/gcc.specs\n  export TOPDIR=${PKG_BUILD}\n}\n\nmake_target() {\n  make CROSS_COMPILE=${TARGET_NAME}- -C src/ libefivar.a libefiboot.a efivar.h efivar\n}\n\nmakeinstall_host() {\n  : # noop\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n    cp -P src/libefivar.a src/libefiboot.a ${SYSROOT_PREFIX}/usr/lib/\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/efivar\n    cp -P src/include/efivar/*.h ${SYSROOT_PREFIX}/usr/include/efivar\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/depends/efivar/patches/efivar-01-compile-with-glibc-2.36.patch",
    "content": "--- a/src/util.h\t2022-01-14 19:29:35.000000000 +0000\n+++ b/src/util.h\t2022-07-19 09:43:36.718759307 +0000\n@@ -23,7 +23,9 @@\n #include <stdio.h>\n #include <string.h>\n #include <sys/ioctl.h>\n-#include <sys/mount.h>\n+#define BLKGETSIZE _IO(0x12, 96) /* Return device size.  */\n+#define BLKSSZGET  _IO(0x12,104) /* Get block device sector size.  */\n+#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size.  */\n #include <sys/stat.h>\n #include <sys/types.h>\n #include <tgmath.h>\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/depends/efivar/patches/efivar-01-static_lib.patch",
    "content": "--- a/src/Makefile\t2018-10-01 21:30:06.000000000 +0200\n+++ b/src/Makefile\t2018-10-17 14:16:46.000000000 +0200\n@@ -93,7 +93,7 @@\n libefivar.so : LIBS=dl\n libefivar.so : MAP=libefivar.map\n \n-efivar : $(EFIVAR_OBJECTS) | libefivar.so\n+efivar : $(EFIVAR_OBJECTS) | libefivar.a\n efivar : LIBS=efivar dl\n \n efivar-static : $(EFIVAR_OBJECTS) $(patsubst %.o,%.static.o,$(LIBEFIVAR_OBJECTS))\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/depends/libmtp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libmtp\"\nPKG_VERSION=\"1.1.21\"\nPKG_SHA256=\"c4ffa5ab8c8f48c91b0047f2e253c101c418d5696a5ed65c839922a4280872a7\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://libmtp.sourceforge.net/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/project/${PKG_NAME}/${PKG_NAME}/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libusb\"\nPKG_LONGDESC=\"An Initiator implementation of the Media Transfer Protocol (MTP).\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_func_malloc_0_nonnull=yes \\\n                           --disable-shared \\\n                           --enable-static \\\n                           --disable-mtpz\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/depends/libmtp/patches/libmtp-0001-dont-execute-compiled-tools.patch",
    "content": "diff -Naur a/Makefile.am b/Makefile.am\n--- a/Makefile.am\t2015-10-07 00:43:15.000000000 -0700\n+++ b/Makefile.am\t2016-04-22 14:16:07.656866841 -0700\n@@ -11,21 +11,6 @@\n if USE_LINUX\n udevrulesdir=@UDEV@/rules.d\n hwdbdir=@UDEV@/hwdb.d\n-udevrules_DATA=@UDEV_RULES@\n-hwdb_DATA=69-libmtp.hwdb\n-noinst_DATA=libmtp.usermap libmtp.fdi\n-\n-libmtp.usermap: util/mtp-hotplug\n-\tutil/mtp-hotplug > libmtp.usermap\n-\n-@UDEV_RULES@: util/mtp-hotplug\n-\tutil/mtp-hotplug -u -p\"@UDEV@\" @UDEV_GROUP@ @UDEV_MODE@ > @UDEV_RULES@\n-\n-libmtp.fdi: util/mtp-hotplug\n-\tutil/mtp-hotplug -H > libmtp.fdi\n-\n-$(hwdb_DATA): util/mtp-hotplug\n-\tutil/mtp-hotplug -w > $(hwdb_DATA)\n \n CLEANFILES = libmtp.usermap @UDEV_RULES@ libmtp.fdi libmtp.hwdb\n endif\ndiff -Naur a/Makefile.in b/Makefile.in\n--- a/Makefile.in\t2016-02-10 12:17:34.000000000 -0800\n+++ b/Makefile.in\t2016-04-22 14:14:22.638794537 -0700\n@@ -161,7 +161,7 @@\n   }\n am__installdirs = \"$(DESTDIR)$(hwdbdir)\" \"$(DESTDIR)$(pkgconfigdir)\" \\\n \t\"$(DESTDIR)$(udevrulesdir)\"\n-DATA = $(hwdb_DATA) $(noinst_DATA) $(pkgconfig_DATA) $(udevrules_DATA)\n+DATA = $(pkgconfig_DATA)\n RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive\t\\\n   distclean-recursive maintainer-clean-recursive\n am__recursive_targets = \\\n@@ -452,21 +452,8 @@\n \n distclean-libtool:\n \t-rm -f libtool config.lt\n-install-hwdbDATA: $(hwdb_DATA)\n-\t@$(NORMAL_INSTALL)\n-\t@list='$(hwdb_DATA)'; test -n \"$(hwdbdir)\" || list=; \\\n-\tif test -n \"$$list\"; then \\\n-\t  echo \" $(MKDIR_P) '$(DESTDIR)$(hwdbdir)'\"; \\\n-\t  $(MKDIR_P) \"$(DESTDIR)$(hwdbdir)\" || exit 1; \\\n-\tfi; \\\n-\tfor p in $$list; do \\\n-\t  if test -f \"$$p\"; then d=; else d=\"$(srcdir)/\"; fi; \\\n-\t  echo \"$$d$$p\"; \\\n-\tdone | $(am__base_list) | \\\n-\twhile read files; do \\\n-\t  echo \" $(INSTALL_DATA) $$files '$(DESTDIR)$(hwdbdir)'\"; \\\n-\t  $(INSTALL_DATA) $$files \"$(DESTDIR)$(hwdbdir)\" || exit $$?; \\\n-\tdone\n+install-hwdbDATA:\n+\techo nope\n \n uninstall-hwdbDATA:\n \t@$(NORMAL_UNINSTALL)\n@@ -871,7 +858,7 @@\n \n info-am:\n \n-install-data-am: install-hwdbDATA install-pkgconfigDATA \\\n+install-data-am: install-pkgconfigDATA \\\n \tinstall-udevrulesDATA\n \n install-dvi: install-dvi-recursive\n@@ -932,7 +919,7 @@\n \tdvi-am html html-am info info-am install install-am \\\n \tinstall-data install-data-am install-dvi install-dvi-am \\\n \tinstall-exec install-exec-am install-html install-html-am \\\n-\tinstall-hwdbDATA install-info install-info-am install-man \\\n+\tinstall-info install-info-am install-man \\\n \tinstall-pdf install-pdf-am install-pkgconfigDATA install-ps \\\n \tinstall-ps-am install-strip install-udevrulesDATA installcheck \\\n \tinstallcheck-am installdirs installdirs-am maintainer-clean \\\n@@ -944,19 +931,6 @@\n \n .PRECIOUS: Makefile\n \n-\n-@USE_LINUX_TRUE@libmtp.usermap: util/mtp-hotplug\n-@USE_LINUX_TRUE@\tutil/mtp-hotplug > libmtp.usermap\n-\n-@USE_LINUX_TRUE@@UDEV_RULES@: util/mtp-hotplug\n-@USE_LINUX_TRUE@\tutil/mtp-hotplug -u -p\"@UDEV@\" @UDEV_GROUP@ @UDEV_MODE@ > @UDEV_RULES@\n-\n-@USE_LINUX_TRUE@libmtp.fdi: util/mtp-hotplug\n-@USE_LINUX_TRUE@\tutil/mtp-hotplug -H > libmtp.fdi\n-\n-@USE_LINUX_TRUE@$(hwdb_DATA): util/mtp-hotplug\n-@USE_LINUX_TRUE@\tutil/mtp-hotplug -w > $(hwdb_DATA)\n-\n # Tell versions [3.59,3.63) of GNU make to not export all variables.\n # Otherwise a system limit (for SysV at least) may be exceeded.\n .NOEXPORT:\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/depends/libssh2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libssh2\"\nPKG_VERSION=\"1.11.0\"\nPKG_SHA256=\"3736161e41e2693324deb38c26cfdc3efe6209d634ba4258db1cecff6a5ad461\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://www.libssh2.org\"\nPKG_URL=\"https://www.libssh2.org/download/libssh2-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain openssl\"\nPKG_LONGDESC=\"A library implementing the SSH2 protocol\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_EXAMPLES=OFF \\\n                       -DBUILD_SHARED_LIBS=OFF \\\n                       -DBUILD_TESTING=OFF\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/depends/oniguruma/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"oniguruma\"\nPKG_VERSION=\"6.9.8\"\nPKG_SHA256=\"28cd62c1464623c7910565fb1ccaaa0104b2fe8b12bcd646e81f73b47535213e\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://github.com/kkos/oniguruma\"\nPKG_URL=\"https://github.com/kkos/oniguruma/releases/download/v${PKG_VERSION}/onig-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A regular expression library\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/diffutils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"diffutils\"\nPKG_VERSION=\"3.10\"\nPKG_SHA256=\"90e5e93cc724e4ebe12ede80df1634063c7a855692685919bfe60b556c9bd09e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.gnu.org/software/diffutils/\"\nPKG_URL=\"http://ftpmirror.gnu.org/diffutils/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A package of several programs related to finding differences between files.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-nls \\\n        --without-libsigsegv-prefix \\\n        --without-libiconv-prefix \\\n        --without-libintl-prefix\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/diffutils/patches/diffutils-001-no-man-or-doc.patch",
    "content": "--- diffutils-3.5/Makefile.am.org\t2017-05-24 18:54:09.404508347 +0200\n+++ diffutils-3.5/Makefile.am\t2017-05-24 18:46:25.238456499 +0200\n@@ -19,7 +19,7 @@\n ALL_RECURSIVE_TARGETS =\n \n EXTRA_DIST = bootstrap exgettext ChangeLog-2008 cfg.mk dist-check.mk\n-SUBDIRS = lib src tests doc man po gnulib-tests\n+SUBDIRS = lib src tests po gnulib-tests\n \n ACLOCAL_AMFLAGS = -I m4\n AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/dool/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dool\"\nPKG_VERSION=\"1.2.0\"\nPKG_SHA256=\"a626ec796a2508443625314e464adec885cb22543157794a6255570b19f68a7d\"\nPKG_LICENSE=\"GPL-3.0-or-later\"\nPKG_SITE=\"https://github.com/scottchiefbaker/dool\"\nPKG_URL=\"https://github.com/scottchiefbaker/dool/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3\"\nPKG_LONGDESC=\"Python3 compatible clone of dstat\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\npost_unpack() {\n  rm ${PKG_BUILD}/Makefile\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp -p dool ${INSTALL}/usr/bin\n  cp -pr plugins ${INSTALL}/usr/bin\n  printf \"#!/bin/sh\\n\\necho \\\"\\${0} has been replaced by dool\\\"\" > ${INSTALL}/usr/bin/dstat\n  chmod 755 ${INSTALL}/usr/bin/dstat\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/dtach/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dtach\"\nPKG_VERSION=\"0.9\"\nPKG_SHA256=\"5f7e8c835ee49a9e6dcf89f4e8ccbe724b061c0fc8565b504dd8b3e67ab79f82\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://dtach.sourceforge.net\"\nPKG_URL=\"https://github.com/crigler/dtach/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A program that emulates the detach feature of screen.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp -p dtach ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/efibootmgr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"efibootmgr\"\nPKG_VERSION=\"18\"\nPKG_SHA256=\"442867d12f8525034a404fc8af3036dba8e1fc970998af2486c3b940dfad0874\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/rhboot/efibootmgr\"\nPKG_URL=\"https://github.com/rhboot/efibootmgr/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain efivar pciutils zlib\"\nPKG_LONGDESC=\"Tool to modify UEFI Firmware Boot Manager Variables.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nmake_target() {\n  export CFLAGS=\"${CFLAGS} -I${SYSROOT_PREFIX}/usr/include -I${SYSROOT_PREFIX}/usr/include/efivar -fgnu89-inline -Wno-pointer-sign\"\n  export LDFLAGS=\"${LDFLAGS} -L${SYSROOT_PREFIX}/usr/lib -ludev -ldl\"\n\n  make EFIDIR=BOOT EFI_LOADER=bootx64.efi PKG_CONFIG=true \\\n    LDLIBS=\"-lefiboot -lefivar\" \\\n    efibootmgr\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp -p src/efibootmgr ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/encfs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"encfs\"\nPKG_VERSION=\"1.9.5\"\nPKG_SHA256=\"4709f05395ccbad6c0a5b40a4619d60aafe3473b1a79bafb3aa700b1f756fd63\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://vgough.github.io/encfs/\"\nPKG_URL=\"https://github.com/vgough/encfs/releases/download/v${PKG_VERSION}/encfs-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain fuse openssl\"\nPKG_LONGDESC=\"A Encrypted Filesystem for FUSE.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DCMAKE_INSTALL_PREFIX=/usr \\\n                       -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES=${SYSROOT_PREFIX}/usr/include \\\n                       -DBUILD_UNIT_TESTS=OFF \\\n                       -DCMAKE_SKIP_RPATH=ON\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/evtest/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"evtest\"\nPKG_VERSION=\"1.35\"\nPKG_SHA256=\"a224abeb783561193660999b0c986216d691cb271b5ec3af88c6bb37b55ff51c\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://cgit.freedesktop.org/evtest/\"\nPKG_URL=\"https://repo.or.cz/evtest.git/snapshot/evtest-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libxml2\"\nPKG_LONGDESC=\"A simple tool for input event debugging.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/fdupes/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"fdupes\"\nPKG_VERSION=\"2.2.1\"\nPKG_SHA256=\"846bb79ca3f0157856aa93ed50b49217feb68e1b35226193b6bc578be0c5698d\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/adrianlopezroche/fdupes\"\nPKG_URL=\"https://github.com/adrianlopezroche/fdupes/releases/download/v${PKG_VERSION}/fdupes-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses\"\nPKG_LONGDESC=\"A program for identifying or deleting duplicate files residing within specified directories.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--without-ncurses\"\nPKG_MAKE_OPTS_TARGET=\"PREFIX=/usr\"\nPKG_MAKEINSTALL_OPTS_TARGET=\"${PKG_MAKE_OPTS_TARGET}\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/file/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"file\"\nPKG_VERSION=\"5.45\"\nPKG_SHA256=\"28c01a5ef1a127ef71758222ca019ba6c6bfa4a8fe20c2b525ce75943ee9da3c\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://www.darwinsys.com/file/\"\nPKG_URL=\"https://github.com/file/file/archive/FILE${PKG_VERSION/./_}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain file:host zlib\"\nPKG_LONGDESC=\"The file utility is used to determine the types of various files.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--enable-fsect-man5 \\\n                         --enable-static \\\n                         --disable-shared\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"${PKG_CONFIGURE_OPTS_HOST}\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/file/patches/file-move-magic.mgc-to-addon-data.patch",
    "content": "From 1191268f518d298c8617a4a74644ee1bb627f614 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Mon, 25 Aug 2014 15:35:14 +0300\nSubject: [PATCH] move magic.mgc to addon/data\n\n---\n src/magic.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/src/magic.c b/src/magic.c\nindex e4bd12b..59c1456 100644\n--- a/src/magic.c\n+++ b/src/magic.c\n@@ -100,7 +100,7 @@ get_default_magic(void)\n \tif ((home = getenv(\"HOME\")) == NULL)\n \t\treturn MAGIC;\n \n-\tif (asprintf(&hmagicpath, \"%s/.magic.mgc\", home) < 0)\n+\tif (asprintf(&hmagicpath, \"%s/.kodi/addons/virtual.system-tools/data/magic.mgc\", home) < 0)\n \t\treturn MAGIC;\n \tif (stat(hmagicpath, &st) == -1) {\n \t\tfree(hmagicpath);\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/getscancodes/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"getscancodes\"\nPKG_VERSION=\"1.0\"\nPKG_SHA256=\"5f4e2ab22dc3890392ab8870fb79bbebdfd39b34dcd5bafcb51edee554855d34\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://keytouch.sourceforge.net\"\nPKG_URL=\"${SOURCEFORGE_SRC}/keytouch/getscancodes-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Shows the scancode of the pressed or released key.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\npre_configure_target() {\n  PKG_MAKE_OPTS_TARGET=\"CC=${CC}\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp -p getscancodes ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/hd-idle/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"hd-idle\"\nPKG_VERSION=\"1.05\"\nPKG_SHA256=\"4efefe79d145b50e055582730d9d685e485da3df3dad90fef030036d52aa3a0c\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://hd-idle.sourceforge.net/\"\nPKG_URL=\"http://downloads.sourceforge.net/project/hd-idle/${PKG_NAME}-${PKG_VERSION}.tgz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A utility for spinning-down external disks after a period of idle time.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/sbin\n    cp -a ${PKG_BUILD}/hd-idle ${INSTALL}/usr/sbin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/hd-idle/patches/hd-idle-makefile.patch",
    "content": "diff --git a/Makefile b/Makefile\nindex 130afd8..480032e 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -43,8 +43,8 @@ clean:\n \trm -f $(OBJS) $(TARGET)\n \n install: $(TARGET)\n-\tinstall -D -g root -o root $(TARGET) $(TARGET_DIR)/sbin/$(TARGET)\n-\tinstall -D -g root -o root $(TARGET).1 $(TARGET_DIR)/share/man/man1/$(TARGET).1\n+\tinstall -D $(TARGET) $(TARGET_DIR)/sbin/$(TARGET)\n+\tinstall -D $(TARGET).1 $(TARGET_DIR)/share/man/man1/$(TARGET).1\n \n hd-idle.o:     hd-idle.c\n \n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/hddtemp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"hddtemp\"\nPKG_VERSION=\"0.4.3\"\nPKG_SHA256=\"592322c64f0d5f035132249e3d051b752f5d24867514522a17285d5e72d21075\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://savannah.nongnu.org/projects/hddtemp\"\nPKG_URL=\"https://github.com/vitlav/hddtemp/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A utility that gives you the temperature of your hard drive by reading S.M.A.R.T..\"\nPKG_BUILD_FLAGS=\"-sysroot\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-db-path=/storage/.kodi/addons/virtual.system-tools/data/hddtemp.db\"\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/misc\n  cp ${PKG_DIR}/db/* ${INSTALL}/usr/share/misc\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/hddtemp/patches/hddtemp-0001-add-missing-default-Language-PO-header-field.patch",
    "content": "commit ba91ffb6d96528fa2d449586f0757d1028cdaa6d\nAuthor: Rudi Heitbaum <rudi@heitbaum.com>\nDate:   Mon Dec 12 11:03:18 2022 +0000\n\n    add missing default Language PO header field\n\ndiff --git a/po/de.po b/po/de.po\nindex 31d02c7..b0d8b7e 100644\n--- a/po/de.po\n+++ b/po/de.po\n@@ -13,7 +13,7 @@ msgstr \"\"\n \"PO-Revision-Date: 2011-08-30 16:40+0200\\n\"\n \"Last-Translator: Vinzenz Vietzke <vinz@v1nz.org>\\n\"\n \"Language-Team: <debian-l10n-german@lists.debian.org>\\n\"\n-\"Language: \\n\"\n+\"Language: de_DE\\n\"\n \"MIME-Version: 1.0\\n\"\n \"Content-Type: text/plain; charset=UTF-8\\n\"\n \"Content-Transfer-Encoding: 8bit\\n\"\ndiff --git a/po/fr.po b/po/fr.po\nindex 2af6500..433ced0 100644\n--- a/po/fr.po\n+++ b/po/fr.po\n@@ -12,7 +12,7 @@ msgstr \"\"\n \"PO-Revision-Date: 2011-08-30 16:38+0200\\n\"\n \"Last-Translator: Aurelien Jarno <aurelien@aurel32.net>\\n\"\n \"Language-Team: FRANCAIS <fr@li.org>\\n\"\n-\"Language: \\n\"\n+\"Language: fr_FR\\n\"\n \"MIME-Version: 1.0\\n\"\n \"Content-Type: text/plain; charset=ISO-8859-1\\n\"\n \"Content-Transfer-Encoding: 8bit\\n\"\ndiff --git a/po/hddtemp.pot b/po/hddtemp.pot\nindex 40936d9..a3d9af8 100644\n--- a/po/hddtemp.pot\n+++ b/po/hddtemp.pot\n@@ -12,6 +12,7 @@ msgstr \"\"\n \"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n \"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n \"Language-Team: LANGUAGE <LL@li.org>\\n\"\n+\"Language: \\n\"\n \"MIME-Version: 1.0\\n\"\n \"Content-Type: text/plain; charset=CHARSET\\n\"\n \"Content-Transfer-Encoding: 8bit\\n\"\ndiff --git a/po/pt.po b/po/pt.po\nindex 8583dd6..23c0e49 100644\n--- a/po/pt.po\n+++ b/po/pt.po\n@@ -11,6 +11,7 @@ msgstr \"\"\n \"PO-Revision-Date: 2006-03-29 23:22+0000\\n\"\n \"Last-Translator: Miguel Figueiredo <elmig@debianp.org>\\n\"\n \"Language-Team: Portuguese <traduz@debianpt.org>\\n\"\n+\"Language: pt_PT\\n\"\n \"MIME-Version: 1.0\\n\"\n \"Content-Type: text/plain; charset=UTF-8\\n\"\n \"Content-Transfer-Encoding: 8bit\\n\"\ndiff --git a/po/ru.po b/po/ru.po\nindex 3d06da3..7ebceb0 100644\n--- a/po/ru.po\n+++ b/po/ru.po\n@@ -11,6 +11,7 @@ msgstr \"\"\n \"PO-Revision-Date: 2003-03-08 16:42+0300\\n\"\n \"Last-Translator: Michael Shigorin <mike@altlinux.ru>\\n\"\n \"Language-Team: Russian <ru@li.org>\\n\"\n+\"Language: ru_RU\\n\"\n \"MIME-Version: 1.0\\n\"\n \"Content-Type: text/plain; charset=koi8-r\\n\"\n \"Content-Transfer-Encoding: 8bit\\n\"\ndiff --git a/po/sv.po b/po/sv.po\nindex d235e52..2729e59 100644\n--- a/po/sv.po\n+++ b/po/sv.po\n@@ -11,6 +11,7 @@ msgstr \"\"\n \"PO-Revision-Date: 2005-11-02 19:03+0100\\n\"\n \"Last-Translator: Daniel Nylander <po@danielnylander.se>\\n\"\n \"Language-Team: Swedish <sv@li.org>\\n\"\n+\"Language: sv_SV\\n\"\n \"MIME-Version: 1.0\\n\"\n \"Content-Type: text/plain; charset=iso-8859-1\\n\"\n \"Content-Transfer-Encoding: 8bit\\n\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/hddtemp/patches/hddtemp-0002-Allow-building-with-gettext-0-20.patch",
    "content": "commit 12eb958f85084485a4c9768e595c64993996f4a6\nAuthor: Rudi Heitbaum <rudi@heitbaum.com>\nDate:   Mon Dec 12 11:16:29 2022 +0000\n\n    Allow building with gettext ≥ 0.20\n    \n    The use of AM_GNU_GETTEXT_VERSION in configure.ac instructs autopoint to\n    copy po/Makefile.in.in from the exact gettext version. It is fine if the\n    version of gettext installed on the system has the same minor version\n    number with the requested version, but it fails if you have a newer\n    version of gettext because of the mismatch between autoconf macros and\n    Makefile.in.in.\n    \n      *** error: gettext infrastructure mismatch: using a Makefile.in.in\n      from gettext version 0.19 but the autoconf macros are from gettext\n      version 0.20\n    \n    Instead of specifying the exact version with AM_GNU_GETTEXT_VERSION, we\n    can use AM_GNU_GETTEXT_REQUIRE_VERSION to ask autopoint to simply use\n    the gettext version installed on the system to prevent the mismatch.\n    \n    This also bumps the version requirement on gettext to 0.19.6 because\n    AM_GNU_GETTEXT_REQUIRE_VERSION was added in this version.\n\ndiff --git a/configure.ac b/configure.ac\nindex 6729c9f..d9c4128 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -26,7 +26,8 @@ AC_C_CONST\n AC_STRUCT_TM\n \n dnl internationalization macros\n-AM_GNU_GETTEXT_VERSION([0.18.1])\n+AM_GNU_GETTEXT_VERSION([0.19.6])\n+AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])\n AM_GNU_GETTEXT([external])\n \n dnl reasonable guesses for where stuff is installed\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/hid_mapper/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"hid_mapper\"\nPKG_VERSION=\"2.1.0\"\nPKG_SHA256=\"e740c1f3a99f260f015ea7d415f0419e27171356e2eddff1781fc5d936cc86cd\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/s-leroux/hid_mapper\"\nPKG_URL=\"https://github.com/s-leroux/hid_mapper/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A Generic HID mapper.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp -p hid_mapper ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/hid_mapper/patches/hid_mapper-01_crosscompile.patch",
    "content": "diff --git a/Makefile b/Makefile\nindex f98abbd..9d1d524 100755\n--- a/Makefile\n+++ b/Makefile\n@@ -9,13 +9,13 @@ EXEC=hid_mapper\n VERSION=1.0\n \n all: $(OBJS)\n-\tg++ $(LDFLAGS) $(OBJS) -o $(EXEC)\n+\t${CXX} $(LDFLAGS) $(OBJS) -o $(EXEC)\n \n %.o: %.cpp\n-\tg++ -c $(CPPFLAGS) $<\n+\t${CXX} -c $(CPPFLAGS) $<\n \n %.o: %.c\n-\tgcc -c $(CFLAGS) $<\n+\t${CC} -c $(CFLAGS) $<\n \n deb:\n \tcp $(EXEC) package/usr/bin\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/hid_mapper/patches/hid_mapper-02_include-sys-time.patch",
    "content": "diff --git a/hid.c b/hid.c\nindex 2830b58..a652222 100644\n--- a/hid.c\n+++ b/hid.c\n@@ -22,6 +22,7 @@\n #include <unistd.h>\n #include <dirent.h>\n #include <stdio.h>\n+#include <sys/time.h>\n \n #define SYSFS_HIDRAW_CLASS_PATH \"/sys/class/hidraw\"\n \n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/hid_mapper/patches/hid_mapper-03_fix-parser.patch",
    "content": "--- a/MapReader.cpp\n+++ b/MapReader.cpp\n@@ -106,7 +106,10 @@\n \t\t\ti = 0;\n \n \t\t\twhile(i<KEY_NAME_MAXLENGTH && ptr[i]!='\\0' && ptr[i]!='\\n' && (!isspace(ptr[i])))\n-\t\t\t\tkey_name[i] = ptr[i++];\n+\t\t\t\t{\n+\t\t\t\t\tkey_name[i] = ptr[i];\n+\t\t\t\t\ti++;\n+\t\t\t\t}\n \t\t\t\n \t\t\tif(i==KEY_NAME_MAXLENGTH)\n \t\t\t{\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/htop/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"htop\"\nPKG_VERSION=\"3.2.2\"\nPKG_SHA256=\"3829c742a835a0426db41bb039d1b976420c21ec65e93b35cd9bfd2d57f44ac8\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://hisham.hm/htop\"\nPKG_URL=\"https://github.com/htop-dev/htop/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses\"\nPKG_LONGDESC=\"An interactive process viewer for Unix.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-unicode \\\n                           HTOP_NCURSES_CONFIG_SCRIPT=ncurses-config\"\n\npre_configure_target() {\n  export LDFLAGS=\"${LDFLAGS} -pthread\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/i2c-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"i2c-tools\"\nPKG_VERSION=\"4.3\"\nPKG_SHA256=\"1f899e43603184fac32f34d72498fc737952dbc9c97a8dd9467fadfdf4600cf9\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://i2c.wiki.kernel.org/index.php/I2C_Tools\"\nPKG_URL=\"https://www.kernel.org/pub/software/utils/i2c-tools/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"A heterogeneous set of I2C tools for Linux.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\npre_make_target() {\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n  export LDSHARED=\"${CC} -shared\"\n}\n\nmake_target() {\n  make  CC=\"${CC}\" \\\n        AR=\"${AR}\" \\\n        CFLAGS=\"${TARGET_CFLAGS}\" \\\n        CPPFLAGS=\"${TARGET_CPPFLAGS} -I${SYSROOT_PREFIX}/usr/include/${PKG_PYTHON_VERSION}\" \\\n        PYTHON=${TOOLCHAIN}/bin/python3 \\\n        all\n\n  make  EXTRA=\"py-smbus\" \\\n        CC=\"${CC}\" \\\n        AR=\"${AR}\" \\\n        CFLAGS=\"${TARGET_CFLAGS}\" \\\n        CPPFLAGS=\"${TARGET_CPPFLAGS} -I${SYSROOT_PREFIX}/usr/include/${PKG_PYTHON_VERSION}\" \\\n        PYTHON=${TOOLCHAIN}/bin/python3 \\\n        all-python\n}\n\nmakeinstall_target() {\n  make  EXTRA=\"py-smbus\" \\\n        DESTDIR=${INSTALL} \\\n        PREFIX=\"/usr\" \\\n        prefix=\"/usr\" \\\n        PYTHON=${TOOLCHAIN}/bin/python3 \\\n        install\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/i2c-tools/patches/pyinstalldir.patch",
    "content": "diff -ur a/py-smbus/Module.mk b/py-smbus/Module.mk\n--- a/py-smbus/Module.mk\t2014-02-20 09:37:15.711233000 +0100\n+++ b/py-smbus/Module.mk\t2019-12-14 08:20:51.730946457 +0100\n@@ -22,7 +22,7 @@\n \trm -rf py-smbus/build\n \n install-python:\n-\t$(DISTUTILS) install\n+\t$(DISTUTILS) install --prefix=$(DESTDIR)$(PREFIX)\n \n all: all-python\n \n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/inotify-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"inotify-tools\"\nPKG_VERSION=\"3.22.6.0\"\nPKG_SHA256=\"c6b7e70f1df09e386217102a1fe041cfc15fa4f3d683d2970140b6814cf2ed12\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"http://wiki.github.com/inotify-tools/inotify-tools/\"\nPKG_URL=\"https://github.com/inotify-tools/inotify-tools/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A C library and a set of command-line programs for Linux providing a simple interface to inotify.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared --disable-doxygen\"\n\npre_configure_target() {\n  CFLAGS+=\" -Wno-error=misleading-indentation -Wno-error=unused-parameter\"\n\n  # fails to build in subdir for CoreELEC\n  cd ..\n  rm -rf .${TARGET_NAME}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/jq/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"jq\"\nPKG_VERSION=\"1.6\"\nPKG_SHA256=\"5de8c8e29aaa3fb9cc6b47bb27299f271354ebb72514e3accadc7d38b5bbaa72\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"http://stedolan.github.io/jq/\"\nPKG_URL=\"https://github.com/stedolan/jq/releases/download/${PKG_NAME}-${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain oniguruma\"\nPKG_LONGDESC=\"A like sed for JSON data.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-shared \\\n                           --enable-static \\\n                           --disable-docs \\\n                           --disable-maintainer-mode \\\n                           --disable-valgrind\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/libgpiod/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libgpiod\"\nPKG_VERSION=\"1.6.4\"\nPKG_SHA256=\"829d4ac268df07853609d67cfc7f476e9aa736cb2a68a630be99e8fad197be0a\"\nPKG_LICENSE=\"GPLv2+\"\nPKG_SITE=\"https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/\"\nPKG_URL=\"https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Tools for interacting with the linux GPIO character device.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-tools --disable-shared\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/lm_sensors/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"lm_sensors\"\nPKG_VERSION=\"3.6.0\"\nPKG_SHA256=\"0591f9fa0339f0d15e75326d0365871c2d4e2ed8aa1ff759b3a55d3734b7d197\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://hwmon.wiki.kernel.org\"\nPKG_URL=\"https://github.com/groeck/lm-sensors/archive/V${PKG_VERSION//./-}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Provides user-space support for the hardware monitoring drivers.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\npre_make_target() {\n  PKG_MAKE_OPTS_TARGET=\"PREFIX=/usr CC=${CC} AR=${AR}\"\n\n  export CFLAGS=\"${TARGET_CFLAGS}\"\n  export CPPFLAGS=\"${TARGET_CPPFLAGS}\"\n\n  sed -i 's|^EXLDFLAGS :=.*|EXLDFLAGS :=|' Makefile\n}\n\npre_makeinstall_target() {\n  PKG_MAKEINSTALL_OPTS_TARGET=\"PREFIX=/usr CC=${CC} AR=${AR}\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/lm_sensors/patches/lm_sensors-01_link-static.patch",
    "content": "From 0b2b2e26bbae3d06580080a66a85e5e0d90ea9f6 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Sun, 10 Aug 2014 14:21:19 +0300\nSubject: [PATCH] link static\n\n---\n prog/sensors/Module.mk |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/prog/sensors/Module.mk b/prog/sensors/Module.mk\nindex b656441..ad59874 100644\n--- a/prog/sensors/Module.mk\n+++ b/prog/sensors/Module.mk\n@@ -40,7 +40,7 @@ REMOVESENSORSMAN := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(PROGSENSORSMAN1DIR)/%\n LIBICONV := $(shell if /sbin/ldconfig -p | grep -q '/libiconv\\.so$$' ; then echo \\-liconv; else echo; fi)\n \n $(PROGSENSORSTARGETS): $(PROGSENSORSSOURCES:.c=.ro) lib/$(LIBSHBASENAME)\n-\t$(CC) $(EXLDFLAGS) -o $@ $(PROGSENSORSSOURCES:.c=.ro) $(LIBICONV) -Llib -lsensors\n+\t$(CC) $(EXLDFLAGS) -o $@ $(PROGSENSORSSOURCES:.c=.ro) $(LIBICONV) -Llib -Wl,-Bstatic -lsensors -Wl,-Bdynamic -lm\n \n all-prog-sensors: $(PROGSENSORSTARGETS)\n user :: all-prog-sensors\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/lshw/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"lshw\"\nPKG_VERSION=\"02.19.2\"\nPKG_SHA256=\"9bb347ac87142339a366a1759ac845e3dbb337ec000aa1b99b50ac6758a80f80\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://ezix.org/project/wiki/HardwareLiSter\"\nPKG_URL=\"http://ezix.org/software/files/lshw-B.${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A small tool to provide detailed information on the hardware configuration of the machine.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nmake_target() {\n  export VERSION=\"B.${PKG_VERSION}\"\n  make CXX=${CXX} -C src/\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/mc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mc\"\nPKG_VERSION=\"4.8.30\"\nPKG_SHA256=\"5ebc3cb2144b970c5149fda556c4ad50b78780494696cdf2d14a53204c95c7df\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.midnight-commander.org\"\nPKG_URL=\"http://ftp.midnight-commander.org/mc-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain gettext:host glib libssh2 libtool:host ncurses pcre\"\nPKG_LONGDESC=\"Midnight Commander is a text based filemanager that emulates Norton Commander.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\" \\\n  --datadir=/storage/.kodi/addons/virtual.system-tools/data \\\n  --libexecdir=/storage/.kodi/addons/virtual.system-tools/mclib \\\n  --with-homedir=/storage/.kodi/userdata/addon_data/virtual.system-tools \\\n  --sysconfdir=/storage/.kodi/addons/virtual.system-tools/etc \\\n  --with-screen=ncurses \\\n  --with-sysroot=${SYSROOT_PREFIX} \\\n  --disable-aspell \\\n  --without-diff-viewer \\\n  --disable-doxygen-doc \\\n  --disable-doxygen-dot \\\n  --disable-doxygen-html \\\n  --with-gnu-ld \\\n  --without-libiconv-prefix \\\n  --without-libintl-prefix \\\n  --with-internal-edit \\\n  --disable-mclib \\\n  --with-subshell \\\n  --enable-vfs-extfs \\\n  --enable-vfs-ftp \\\n  --enable-vfs-sftp \\\n  --enable-vfs-tar \\\n  --without-x\"\n\npre_configure_target() {\n  LDFLAGS+=\" -lcrypto -lssl\"\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/storage/.kodi/addons/virtual.system-tools/data/locale\n  rm -rf ${INSTALL}/storage/.kodi/addons/virtual.system-tools/data/mc/help/mc.hlp.*\n  mv ${INSTALL}/usr/bin/mc ${INSTALL}/usr/bin/mc-bin\n  rm -f ${INSTALL}/usr/bin/{mcedit,mcview}\n  cp -p ${PKG_DIR}/wrapper/* ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/mc/wrapper/mc",
    "content": "#!/bin/sh\nHISTFILE=\"/run/mc_histfile\"\nexport HISTFILE\nexec mc-bin \"$@\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/mc/wrapper/mcedit",
    "content": "#!/bin/sh\nHISTFILE=\"/run/mc_histfile\"\nexport HISTFILE\nexec mc-bin -e \"$@\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/mc/wrapper/mcview",
    "content": "#!/bin/sh\nHISTFILE=\"/run/mc_histfile\"\nexport HISTFILE\nexec mc-bin -v \"$@\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/mmc-utils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mmc-utils\"\nPKG_VERSION=\"c62dd8e415b12cc7f9a362db23cd384caf77ff03\" # 2022-11-09\nPKG_SHA256=\"181ec6a2657f19472672372a80488a624be3e9368176b836404ca29c1405374a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.kernel.org/doc/html/latest/driver-api/mmc/mmc-tools.html\"\nPKG_URL=\"https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/snapshot/mmc-utils-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Configure MMC storage devices from userspace.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/mtpfs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mtpfs\"\nPKG_VERSION=\"d228a21b07062170e05fb71a7a7bf4a74ad559e1\"\nPKG_SHA256=\"4b89e014201a01634022a6348874361f5ca729e455b8c1f9990fa10647590b52\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.adebenham.com/mtpfs/\"\nPKG_URL=\"https://github.com/cjd/mtpfs/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain fuse glib libmtp\"\nPKG_LONGDESC=\"MTPfs is a FUSE filesystem that supports reading and writing from any MTP device.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-mad\"\n\n# TODO: mtpfs runs host utils while building, fix and set\npre_configure_target() {\n  export LIBS=\"-lusb-1.0 -ludev\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/nmon/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"nmon\"\nPKG_VERSION=\"16n\"\nPKG_SHA256=\"c0012cc2d925dee940c37ceae297abac64ba5a5c30e575e7418b04028613f5f2\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://nmon.sourceforge.net/pmwiki.php?n=Site.CompilingNmon\"\nPKG_URL=\"http://sourceforge.net/projects/nmon/files/lmon16n.c\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses\"\nPKG_LONGDESC=\"Systems administrator, tuner, benchmark tool gives you a huge amount of important performance information in one go.\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  cp -p ${SOURCES}/nmon/${PKG_SOURCE_NAME} ${PKG_BUILD}\n}\n\nmake_target() {\n  case ${ARCH} in\n    x86_64)\n      arch=\"X86\"\n      ;;\n    *)\n      arch=\"arm\"\n      ;;\n  esac\n  # original makefile is located at\n  # - https://downloads.sourceforge.net/project/nmon/makefile\n  CFLAGS+=\" -g -O3 -Wall -D JFS -D GETUSER -D LARGEMEM\"\n  LDFLAGS+=\" -lncurses -lm -g\"\n  ${CC} -o nmon nmon-${PKG_VERSION}.c ${CFLAGS} ${LDFLAGS} -D ${arch} -DUBUNTU\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp -p nmon ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/patch/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"patch\"\nPKG_VERSION=\"2.7.6\"\nPKG_SHA256=\"ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://savannah.gnu.org/projects/patch/\"\nPKG_URL=\"http://ftpmirror.gnu.org/patch/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Patch takes a patch file containing a difference listing produced by the diff.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-xattr\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/pv/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pv\"\nPKG_VERSION=\"1.7.24\"\nPKG_SHA256=\"3bf43c5809c8d50066eaeaea5a115f6503c57a38c151975b710aa2bee857b65e\"\nPKG_LICENSE=\"GNU\"\nPKG_SITE=\"http://www.ivarch.com/programs/pv.shtml\"\nPKG_URL=\"http://www.ivarch.com/programs/sources/pv-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Pipe Viewer can be inserted into any normal pipeline between two processes.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static-nls\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/screen/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"screen\"\nPKG_VERSION=\"4.9.1\"\nPKG_SHA256=\"26cef3e3c42571c0d484ad6faf110c5c15091fbf872b06fa7aa4766c7405ac69\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.gnu.org/software/screen/\"\nPKG_URL=\"http://ftpmirror.gnu.org/screen/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses\"\nPKG_LONGDESC=\"Screen is a window manager that multiplexes a physical terminal between several processes\"\nPKG_BUILD_FLAGS=\"-sysroot -parallel\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_header_utempter_h=no \\\n                           --enable-colors256 \\\n                           --disable-pam \\\n                           --disable-use-locale \\\n                           --disable-telnet \\\n                           --disable-socket-dir\"\n\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/sdparm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"sdparm\"\nPKG_VERSION=\"1.12\"\nPKG_SHA256=\"c4c9efafdbeb662e2f9712707ec490932bd4d010bb1129ae7a99526546eeadbe\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://sg.danny.cz/sg/sdparm.html\"\nPKG_URL=\"https://sg.danny.cz/sg/p/sdparm-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"The sdparm utility accesses SCSI device parameters.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/smartmontools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"smartmontools\"\nPKG_VERSION=\"7.4\"\nPKG_SHA256=\"e9a61f641ff96ca95319edfb17948cd297d0cd3342736b2c49c99d4716fb993d\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.smartmontools.org\"\nPKG_URL=\"https://downloads.sourceforge.net/sourceforge/smartmontools/smartmontools-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Control and monitor storage systems using S.M.A.R.T.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--prefix=/usr \\\n                           --without-initscriptdir \\\n                           --without-nvme-devicescan \\\n                           --without-systemdenvfile \\\n                           --without-systemdsystemunitdir \\\n                           --without-systemdenvfile \\\n                           --without-systemdsystemunitdir\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/st/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"st\"\nPKG_VERSION=\"0.9\"\nPKG_SHA256=\"f36359799734eae785becb374063f0be833cf22f88b4f169cd251b99324e08e7\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://st.suckless.org/\"\nPKG_URL=\"https://dl.suckless.org/st/st-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libX11 libXft libXrender fontconfig freetype ncurses\"\nPKG_LONGDESC=\"A simple terminal implementation for X\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_MAKE_OPTS_TARGET=\"X11INC=$(get_build_dir libXft)/include \\\n                      X11LIB=$(get_build_dir libXft)/.${TARGET_NAME}/src/.libs\"\n\npre_configure_target() {\n  LDFLAGS=\"-lXrender ${LDFLAGS}\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/st/patches/st-001-le_fixes.patch",
    "content": "\n - XftColorAllocName() is failing on \"#rrggbb\", use XParseColor()\n - Xutf8TextListToTextProperty() needs locale to be set.\n\n--- a/x.c\t2020-06-19 11:29:45.000000000 +0200\n+++ b/x.c\t2020-06-26 01:07:13.000000000 +0200\n@@ -754,6 +754,7 @@\n xloadcolor(int i, const char *name, Color *ncolor)\n {\n \tXRenderColor color = { .alpha = 0xffff };\n+\tXColor xcol;\n \n \tif (!name) {\n \t\tif (BETWEEN(i, 16, 255)) { /* 256 color */\n@@ -771,6 +772,14 @@\n \t\t\tname = colorname[i];\n \t}\n \n+\tif (XParseColor(xw.dpy, xw.cmap, name, &xcol)) {\n+\t\tcolor.green = xcol.green;\n+\t\tcolor.blue = xcol.blue;\n+\t\tcolor.red = xcol.red;\n+\t\treturn XftColorAllocValue(xw.dpy, xw.vis,\n+\t\t\t\t\t\txw.cmap, &color, ncolor);\n+\t}\n+\n \treturn XftColorAllocName(xw.dpy, xw.vis, xw.cmap, name, ncolor);\n }\n \n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/st/patches/st-002-scrollback-20200419-72e3f6c.patch",
    "content": "diff --git a/config.def.h b/config.def.h\nindex 0895a1f..eef24df 100644\n--- a/config.def.h\n+++ b/config.def.h\n@@ -188,6 +188,8 @@ static Shortcut shortcuts[] = {\n \t{ TERMMOD,              XK_Y,           selpaste,       {.i =  0} },\n \t{ ShiftMask,            XK_Insert,      selpaste,       {.i =  0} },\n \t{ TERMMOD,              XK_Num_Lock,    numlock,        {.i =  0} },\n+\t{ ShiftMask,            XK_Page_Up,     kscrollup,      {.i = -1} },\n+\t{ ShiftMask,            XK_Page_Down,   kscrolldown,    {.i = -1} },\n };\n \n /*\ndiff --git a/st.c b/st.c\nindex 0ce6ac2..641edc0 100644\n--- a/st.c\n+++ b/st.c\n@@ -35,6 +35,7 @@\n #define ESC_ARG_SIZ   16\n #define STR_BUF_SIZ   ESC_BUF_SIZ\n #define STR_ARG_SIZ   ESC_ARG_SIZ\n+#define HISTSIZE      2000\n \n /* macros */\n #define IS_SET(flag)\t\t((term.mode & (flag)) != 0)\n@@ -42,6 +43,9 @@\n #define ISCONTROLC1(c)\t\t(BETWEEN(c, 0x80, 0x9f))\n #define ISCONTROL(c)\t\t(ISCONTROLC0(c) || ISCONTROLC1(c))\n #define ISDELIM(u)\t\t(u && wcschr(worddelimiters, u))\n+#define TLINE(y)\t\t((y) < term.scr ? term.hist[((y) + term.histi - \\\n+\t\t\t\tterm.scr + HISTSIZE + 1) % HISTSIZE] : \\\n+\t\t\t\tterm.line[(y) - term.scr])\n \n enum term_mode {\n \tMODE_WRAP        = 1 << 0,\n@@ -117,6 +121,9 @@ typedef struct {\n \tint col;      /* nb col */\n \tLine *line;   /* screen */\n \tLine *alt;    /* alternate screen */\n+\tLine hist[HISTSIZE]; /* history buffer */\n+\tint histi;    /* history index */\n+\tint scr;      /* scroll back */\n \tint *dirty;   /* dirtyness of lines */\n \tTCursor c;    /* cursor */\n \tint ocx;      /* old cursor col */\n@@ -185,8 +192,8 @@ static void tnewline(int);\n static void tputtab(int);\n static void tputc(Rune);\n static void treset(void);\n-static void tscrollup(int, int);\n-static void tscrolldown(int, int);\n+static void tscrollup(int, int, int);\n+static void tscrolldown(int, int, int);\n static void tsetattr(const int *, int);\n static void tsetchar(Rune, const Glyph *, int, int);\n static void tsetdirt(int, int);\n@@ -415,10 +422,10 @@ tlinelen(int y)\n {\n \tint i = term.col;\n \n-\tif (term.line[y][i - 1].mode & ATTR_WRAP)\n+\tif (TLINE(y)[i - 1].mode & ATTR_WRAP)\n \t\treturn i;\n \n-\twhile (i > 0 && term.line[y][i - 1].u == ' ')\n+\twhile (i > 0 && TLINE(y)[i - 1].u == ' ')\n \t\t--i;\n \n \treturn i;\n@@ -527,7 +534,7 @@ selsnap(int *x, int *y, int direction)\n \t\t * Snap around if the word wraps around at the end or\n \t\t * beginning of a line.\n \t\t */\n-\t\tprevgp = &term.line[*y][*x];\n+\t\tprevgp = &TLINE(*y)[*x];\n \t\tprevdelim = ISDELIM(prevgp->u);\n \t\tfor (;;) {\n \t\t\tnewx = *x + direction;\n@@ -542,14 +549,14 @@ selsnap(int *x, int *y, int direction)\n \t\t\t\t\tyt = *y, xt = *x;\n \t\t\t\telse\n \t\t\t\t\tyt = newy, xt = newx;\n-\t\t\t\tif (!(term.line[yt][xt].mode & ATTR_WRAP))\n+\t\t\t\tif (!(TLINE(yt)[xt].mode & ATTR_WRAP))\n \t\t\t\t\tbreak;\n \t\t\t}\n \n \t\t\tif (newx >= tlinelen(newy))\n \t\t\t\tbreak;\n \n-\t\t\tgp = &term.line[newy][newx];\n+\t\t\tgp = &TLINE(newy)[newx];\n \t\t\tdelim = ISDELIM(gp->u);\n \t\t\tif (!(gp->mode & ATTR_WDUMMY) && (delim != prevdelim\n \t\t\t\t\t|| (delim && gp->u != prevgp->u)))\n@@ -570,14 +577,14 @@ selsnap(int *x, int *y, int direction)\n \t\t*x = (direction < 0) ? 0 : term.col - 1;\n \t\tif (direction < 0) {\n \t\t\tfor (; *y > 0; *y += direction) {\n-\t\t\t\tif (!(term.line[*y-1][term.col-1].mode\n+\t\t\t\tif (!(TLINE(*y-1)[term.col-1].mode\n \t\t\t\t\t\t& ATTR_WRAP)) {\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t} else if (direction > 0) {\n \t\t\tfor (; *y < term.row-1; *y += direction) {\n-\t\t\t\tif (!(term.line[*y][term.col-1].mode\n+\t\t\t\tif (!(TLINE(*y)[term.col-1].mode\n \t\t\t\t\t\t& ATTR_WRAP)) {\n \t\t\t\t\tbreak;\n \t\t\t\t}\n@@ -608,13 +615,13 @@ getsel(void)\n \t\t}\n \n \t\tif (sel.type == SEL_RECTANGULAR) {\n-\t\t\tgp = &term.line[y][sel.nb.x];\n+\t\t\tgp = &TLINE(y)[sel.nb.x];\n \t\t\tlastx = sel.ne.x;\n \t\t} else {\n-\t\t\tgp = &term.line[y][sel.nb.y == y ? sel.nb.x : 0];\n+\t\t\tgp = &TLINE(y)[sel.nb.y == y ? sel.nb.x : 0];\n \t\t\tlastx = (sel.ne.y == y) ? sel.ne.x : term.col-1;\n \t\t}\n-\t\tlast = &term.line[y][MIN(lastx, linelen-1)];\n+\t\tlast = &TLINE(y)[MIN(lastx, linelen-1)];\n \t\twhile (last >= gp && last->u == ' ')\n \t\t\t--last;\n \n@@ -849,6 +856,9 @@ void\n ttywrite(const char *s, size_t n, int may_echo)\n {\n \tconst char *next;\n+\tArg arg = (Arg) { .i = term.scr };\n+\n+\tkscrolldown(&arg);\n \n \tif (may_echo && IS_SET(MODE_ECHO))\n \t\ttwrite(s, n, 1);\n@@ -1060,13 +1070,53 @@ tswapscreen(void)\n }\n \n void\n-tscrolldown(int orig, int n)\n+kscrolldown(const Arg* a)\n+{\n+\tint n = a->i;\n+\n+\tif (n < 0)\n+\t\tn = term.row + n;\n+\n+\tif (n > term.scr)\n+\t\tn = term.scr;\n+\n+\tif (term.scr > 0) {\n+\t\tterm.scr -= n;\n+\t\tselscroll(0, -n);\n+\t\ttfulldirt();\n+\t}\n+}\n+\n+void\n+kscrollup(const Arg* a)\n+{\n+\tint n = a->i;\n+\n+\tif (n < 0)\n+\t\tn = term.row + n;\n+\n+\tif (term.scr <= HISTSIZE-n) {\n+\t\tterm.scr += n;\n+\t\tselscroll(0, n);\n+\t\ttfulldirt();\n+\t}\n+}\n+\n+void\n+tscrolldown(int orig, int n, int copyhist)\n {\n \tint i;\n \tLine temp;\n \n \tLIMIT(n, 0, term.bot-orig+1);\n \n+\tif (copyhist) {\n+\t\tterm.histi = (term.histi - 1 + HISTSIZE) % HISTSIZE;\n+\t\ttemp = term.hist[term.histi];\n+\t\tterm.hist[term.histi] = term.line[term.bot];\n+\t\tterm.line[term.bot] = temp;\n+\t}\n+\n \ttsetdirt(orig, term.bot-n);\n \ttclearregion(0, term.bot-n+1, term.col-1, term.bot);\n \n@@ -1076,17 +1126,28 @@ tscrolldown(int orig, int n)\n \t\tterm.line[i-n] = temp;\n \t}\n \n-\tselscroll(orig, n);\n+\tif (term.scr == 0)\n+\t\tselscroll(orig, n);\n }\n \n void\n-tscrollup(int orig, int n)\n+tscrollup(int orig, int n, int copyhist)\n {\n \tint i;\n \tLine temp;\n \n \tLIMIT(n, 0, term.bot-orig+1);\n \n+\tif (copyhist) {\n+\t\tterm.histi = (term.histi + 1) % HISTSIZE;\n+\t\ttemp = term.hist[term.histi];\n+\t\tterm.hist[term.histi] = term.line[orig];\n+\t\tterm.line[orig] = temp;\n+\t}\n+\n+\tif (term.scr > 0 && term.scr < HISTSIZE)\n+\t\tterm.scr = MIN(term.scr + n, HISTSIZE-1);\n+\n \ttclearregion(0, orig, term.col-1, orig+n-1);\n \ttsetdirt(orig+n, term.bot);\n \n@@ -1096,7 +1157,8 @@ tscrollup(int orig, int n)\n \t\tterm.line[i+n] = temp;\n \t}\n \n-\tselscroll(orig, -n);\n+\tif (term.scr == 0)\n+\t\tselscroll(orig, -n);\n }\n \n void\n@@ -1135,7 +1197,7 @@ tnewline(int first_col)\n \tint y = term.c.y;\n \n \tif (y == term.bot) {\n-\t\ttscrollup(term.top, 1);\n+\t\ttscrollup(term.top, 1, 1);\n \t} else {\n \t\ty++;\n \t}\n@@ -1300,14 +1362,14 @@ void\n tinsertblankline(int n)\n {\n \tif (BETWEEN(term.c.y, term.top, term.bot))\n-\t\ttscrolldown(term.c.y, n);\n+\t\ttscrolldown(term.c.y, n, 0);\n }\n \n void\n tdeleteline(int n)\n {\n \tif (BETWEEN(term.c.y, term.top, term.bot))\n-\t\ttscrollup(term.c.y, n);\n+\t\ttscrollup(term.c.y, n, 0);\n }\n \n int32_t\n@@ -1738,11 +1800,11 @@ csihandle(void)\n \t\tbreak;\n \tcase 'S': /* SU -- Scroll <n> line up */\n \t\tDEFAULT(csiescseq.arg[0], 1);\n-\t\ttscrollup(term.top, csiescseq.arg[0]);\n+\t\ttscrollup(term.top, csiescseq.arg[0], 0);\n \t\tbreak;\n \tcase 'T': /* SD -- Scroll <n> line down */\n \t\tDEFAULT(csiescseq.arg[0], 1);\n-\t\ttscrolldown(term.top, csiescseq.arg[0]);\n+\t\ttscrolldown(term.top, csiescseq.arg[0], 0);\n \t\tbreak;\n \tcase 'L': /* IL -- Insert <n> blank lines */\n \t\tDEFAULT(csiescseq.arg[0], 1);\n@@ -2248,7 +2310,7 @@ eschandle(uchar ascii)\n \t\treturn 0;\n \tcase 'D': /* IND -- Linefeed */\n \t\tif (term.c.y == term.bot) {\n-\t\t\ttscrollup(term.top, 1);\n+\t\t\ttscrollup(term.top, 1, 1);\n \t\t} else {\n \t\t\ttmoveto(term.c.x, term.c.y+1);\n \t\t}\n@@ -2261,7 +2323,7 @@ eschandle(uchar ascii)\n \t\tbreak;\n \tcase 'M': /* RI -- Reverse index */\n \t\tif (term.c.y == term.top) {\n-\t\t\ttscrolldown(term.top, 1);\n+\t\t\ttscrolldown(term.top, 1, 1);\n \t\t} else {\n \t\t\ttmoveto(term.c.x, term.c.y-1);\n \t\t}\n@@ -2482,7 +2544,7 @@ twrite(const char *buf, int buflen, int show_ctrl)\n void\n tresize(int col, int row)\n {\n-\tint i;\n+\tint i, j;\n \tint minrow = MIN(row, term.row);\n \tint mincol = MIN(col, term.col);\n \tint *bp;\n@@ -2519,6 +2581,14 @@ tresize(int col, int row)\n \tterm.dirty = xrealloc(term.dirty, row * sizeof(*term.dirty));\n \tterm.tabs = xrealloc(term.tabs, col * sizeof(*term.tabs));\n \n+\tfor (i = 0; i < HISTSIZE; i++) {\n+\t\tterm.hist[i] = xrealloc(term.hist[i], col * sizeof(Glyph));\n+\t\tfor (j = mincol; j < col; j++) {\n+\t\t\tterm.hist[i][j] = term.c.attr;\n+\t\t\tterm.hist[i][j].u = ' ';\n+\t\t}\n+\t}\n+\n \t/* resize each row to new width, zero-pad if needed */\n \tfor (i = 0; i < minrow; i++) {\n \t\tterm.line[i] = xrealloc(term.line[i], col * sizeof(Glyph));\n@@ -2577,7 +2647,7 @@ drawregion(int x1, int y1, int x2, int y2)\n \t\t\tcontinue;\n \n \t\tterm.dirty[y] = 0;\n-\t\txdrawline(term.line[y], x1, y, x2);\n+\t\txdrawline(TLINE(y), x1, y, x2);\n \t}\n }\n \n@@ -2598,8 +2668,9 @@ draw(void)\n \t\tcx--;\n \n \tdrawregion(0, 0, term.col, term.row);\n-\txdrawcursor(cx, term.c.y, term.line[term.c.y][cx],\n-\t\t\tterm.ocx, term.ocy, term.line[term.ocy][term.ocx]);\n+\tif (term.scr == 0)\n+\t\txdrawcursor(cx, term.c.y, term.line[term.c.y][cx],\n+\t\t\t\tterm.ocx, term.ocy, term.line[term.ocy][term.ocx]);\n \tterm.ocx = cx;\n \tterm.ocy = term.c.y;\n \txfinishdraw();\ndiff --git a/st.h b/st.h\nindex d978458..b9a4eeb 100644\n--- a/st.h\n+++ b/st.h\n@@ -81,6 +81,8 @@ void die(const char *, ...);\n void redraw(void);\n void draw(void);\n \n+void kscrolldown(const Arg *);\n+void kscrollup(const Arg *);\n void printscreen(const Arg *);\n void printsel(const Arg *);\n void sendbreak(const Arg *);\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/stress-ng/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"stress-ng\"\nPKG_VERSION=\"0.16.04\"\nPKG_SHA256=\"3453719508e9e02c57a736c154408538372d078be7dcf8e0165d37a821cdba45\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/ColinIanKing/stress-ng\"\nPKG_URL=\"https://github.com/ColinIanKing/stress-ng/archive/refs/tags/V${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain attr keyutils libaio libcap zlib\"\nPKG_LONGDESC=\"stress-ng will stress test a computer system in various selectable ways\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/unrar/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"unrar\"\nPKG_VERSION=\"6.2.10\"\nPKG_SHA256=\"55fe6ebd5e48d6655bfda3fd19b55438ca05e13c7e69772420caad9fdb68ef42\"\nPKG_LICENSE=\"free\"\nPKG_SITE=\"https://www.rarlab.com/rar_add.htm\"\nPKG_URL=\"https://www.rarlab.com/rar/unrarsrc-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"unrar extract, test and view RAR archives\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"+pic -sysroot -parallel\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}/unrar lib\n  tar -xf ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}/\n  cp -a ${PKG_BUILD}/unrar ${PKG_BUILD}/lib\n}\n\nmake_target() {\n  make CXX=\"${CXX}\" \\\n     CXXFLAGS=\"${TARGET_CXXFLAGS}\" \\\n     RANLIB=\"${RANLIB}\" \\\n     AR=\"${AR}\" \\\n     STRIP=\"${STRIP}\" \\\n     -C unrar \\\n     -f makefile\n\n  make CXX=\"${CXX}\" \\\n     CXXFLAGS=\"${TARGET_CXXFLAGS}\" \\\n     RANLIB=\"${RANLIB}\" \\\n     AR=\"${AR}\" \\\n     -C lib \\\n     -f makefile lib\n}\n\npost_make_target() {\n  rm -f libunrar.so\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/include/unrar ${INSTALL}/usr/lib ${INSTALL}/usr/bin\n  cp -p lib/*.hpp ${INSTALL}/usr/include/unrar/\n  cp -p lib/libunrar.a ${INSTALL}/usr/lib/\n  cp -p unrar/unrar ${INSTALL}/usr/bin/\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/system-tools-depends/usb-modeswitch/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"usb-modeswitch\"\nPKG_VERSION=\"2.6.1\"\nPKG_SHA256=\"5195d9e136e52f658f19e9f93e4f982b1b67bffac197d0a455cd8c2cd245fa34\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.draisberghof.de/usb_modeswitch/\"\nPKG_URL=\"http://www.draisberghof.de/usb_modeswitch/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libusb\"\nPKG_LONGDESC=\"USB_ModeSwitch - Handling Mode-Switching USB Devices on Linux\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nmakeinstall_target() {\n\tmkdir -p $INSTALL/usr/sbin\n\tcp usb_modeswitch $INSTALL/usr/sbin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/tinc-depends/miniupnpc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"miniupnpc\"\nPKG_VERSION=\"2.2.4\"\nPKG_SHA256=\"481a5e4aede64e9ef29895b218836c3608d973e77a35b4f228ab1f3629412c4b\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://miniupnp.free.fr\"\nPKG_URL=\"http://miniupnp.free.fr/files/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"The MiniUPnP project offers software which supports the UPnP Internet Gateway Device (IGD) specifications\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DUPNPC_BUILD_SHARED=OFF -DUPNPC_BUILD_STATIC=ON\"\n"
  },
  {
    "path": "packages/addons/addon-depends/tntnet/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tntnet\"\nPKG_VERSION=\"3.0\"\nPKG_SHA256=\"718e5519b0a403f7f766358bf66a85c008119c48189d1c2b7651fd0af9018e27\"\nPKG_LICENSE=\"GPL-2\"\nPKG_SITE=\"http://www.tntnet.org/\"\nPKG_URL=\"http://www.tntnet.org/download/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"cxxtools:host zlib:host\"\nPKG_DEPENDS_TARGET=\"toolchain tntnet:host libtool cxxtools zlib\"\nPKG_LONGDESC=\"A web application server for C++.\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--disable-unittest \\\n                         --with-server=no \\\n                         --with-sdk=yes \\\n                         --with-demos=no \\\n                         --with-epoll=yes \\\n                         --with-ssl=no \\\n                         --with-stressjob=no\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-unittest \\\n                           --with-sysroot=${SYSROOT_PREFIX} \\\n                           --with-server=no \\\n                           --with-sdk=no \\\n                           --with-demos=no \\\n                           --with-epoll=yes \\\n                           --with-ssl=no \\\n                           --with-stressjob=no\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n  rm -rf ${INSTALL}/usr/share\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/tslib/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tslib\"\nPKG_VERSION=\"1.1\"\nPKG_SHA256=\"fe35e5f710ea933b118f710e2ce4403ac076fe69926b570333867d4de082a51c\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kergoth/tslib\"\nPKG_URL=\"https://github.com/kergoth/tslib/releases/download/1.1/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain evtest\"\nPKG_LONGDESC=\"Touchscreen access library with ts_uinput_touch daemon.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nTSLIB_MODULES_ENABLED=\"linear dejitter variance pthres ucb1x00 tatung input galax dmc touchkit st1232 waveshare\"\nTSLIB_MODULES_DISABLED=\"arctic2 corgi collie h3600 linear_h2200 mk712 cy8mrln_palmpre\"\nTSLIB_BUILD_STATIC=\"yes\"  # no .so files (easy to manage)\n\npre_configure_target() {\n  local OPTS_MODULES=\"\"\n\n  if [ \"${TSLIB_BUILD_STATIC}\" = \"yes\" ]; then\n    OPTS_MODULES=\"--enable-static --disable-shared\"\n    for module in ${TSLIB_MODULES_ENABLED}; do\n      OPTS_MODULES+=\" --enable-${module}=static\"\n    done\n  fi\n\n  for module in ${TSLIB_MODULES_DISABLED}; do\n    OPTS_MODULES+=\" --disable-${module}\"\n  done\n\n  PKG_CONFIGURE_OPTS_TARGET=\"${OPTS_MODULES} \\\n    --sysconfdir=/storage/.kodi/userdata/addon_data/service.touchscreen\"\n}\n\npost_makeinstall_target() {\n  rm -fr ${INSTALL}/etc\n  rm -fr ${INSTALL}/storage\n\n  debug_strip ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/tslib/patches/tslib-02-add-additional-eGalax-touchscreens.patch",
    "content": "From f60540a1e0c120dfb6a7452470b3e56bee91c7d7 Mon Sep 17 00:00:00 2001\nFrom: Dirk Gerdes <dirk.gerdes@googlemail.com>\nDate: Mon, 22 Dec 2014 11:07:13 +0100\nSubject: [PATCH] Added support for additional model of eGalax Touchscreen\n\n---\n plugins/galax-raw.c | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/plugins/galax-raw.c b/plugins/galax-raw.c\nindex c8689e2..6cacc56 100644\n--- a/plugins/galax-raw.c\n+++ b/plugins/galax-raw.c\n@@ -93,8 +93,9 @@ static int ts_galax_check_fd (struct tslib_galax *i)\n \n  \tif ((ioctl(ts->fd, EVIOCGID, &infos) < 0)) {\n  \t\tfprintf (stderr, \"tslib: warning, can not read device identifier\\n\");\n- \t} else if (infos.bustype != 3 || infos.vendor != 0x0EEF || infos.product != 0x0001) {\n- \t\tfprintf (stderr, \"tslib: this is not an eGalax touchscreen (3,0x0EEF,1,0x0112)\\n\"\n+ \t} else if (infos.bustype != 3 || infos.vendor != 0x0EEF \n+\t\t\t|| (infos.product != 0x0001 && infos.product != 0x7200 && infos.product != 0x7201 && infos.product != 0xC000)) {\n+ \t\tfprintf (stderr, \"tslib: this is not an eGalax touchscreen (3,0x0EEF,1/7200/7201/C000,0x0112)\\n\"\n  \t\t\"Your device: bus=%d, vendor=0x%X, product=0x%X, version=0x%X\\n\",infos.bustype, infos.vendor, infos.product, infos.version);\n  \t\treturn -1;\n  \t}\n"
  },
  {
    "path": "packages/addons/addon-depends/tslib/patches/tslib-06-linear-print-coordinates.patch",
    "content": "diff -aurN a/plugins/linear.c b/plugins/linear.c\n--- a/plugins/linear.c\t2013-08-08 02:23:04.000000000 +0200\n+++ b/plugins/linear.c\t2015-09-04 20:21:50.376205701 +0200\n@@ -187,11 +187,11 @@\n \t\tfor (index = 0; index < 7; index++)\n \t\t\tif (fscanf(pcal_fd, \"%d\", &lin->a[index]) != 1) break;\n \t\tfscanf(pcal_fd, \"%d %d\", &lin->cal_res_x, &lin->cal_res_y);\n-#ifdef DEBUG\n+/*#ifdef DEBUG*/\n \t\tprintf(\"Linear calibration constants: \");\n \t\tfor(index=0;index<7;index++) printf(\"%d \",lin->a[index]);\n \t\tprintf(\"\\n\");\n-#endif /*DEBUG*/\n+/*#endif*/ /*DEBUG*/\n \t\tfclose(pcal_fd);\n \t}\n\t\t\n"
  },
  {
    "path": "packages/addons/addon-depends/tslib/patches/tslib-10-ts_uinput_touch-daemon.patch",
    "content": "From 2ae91258548c3682ad5df16ee22bdf28d9769bfe Mon Sep 17 00:00:00 2001\nFrom: vpeter4 <peter.vicman@gmail.com>\nDate: Mon, 29 Jun 2015 17:08:17 +0200\nSubject: [PATCH 01/11] ts_uinput_touch: daemon translates tslib events to\n uinput\n\nOn one side it gets events from touchscreen using tslib library. On the other end it creates one new virtual device using uinput kernel module that allows to handle the input subsystem from user land. Inside application data from tslib is translated to uinput events. For now only ABS_X, ABS_Y, ABS_PRESSURE and BTN_TOUCH. It behaves in a similar way than touchpad. Short tap sends button press event and long slide sends only xy coordinates. Currently using it in OpenELEC distribution and Kodi application.\n\nI think something like this was proposed in TODO.\n\nAlso ST1232 raw input plugin is included for \"st1232-touchscreen\" (found on 7\" display for Udoo board with i.MX6 SoC).\n---\n configure.ac            |   1 +\n plugins/Makefile.am     |  13 +-\n plugins/plugins.h       |   1 +\n plugins/st1232-raw.c    | 303 +++++++++++++++++++++++\n src/Makefile.am         |   4 +\n src/ts_load_module.c    |   3 +\n tests/Makefile.am       |   5 +-\n tests/testutils.c       |   7 +\n tests/ts_calibrate.c    |   4 +\n tests/ts_uinput_touch.c | 624 ++++++++++++++++++++++++++++++++++++++++++++++++\n 10 files changed, 963 insertions(+), 2 deletions(-)\n create mode 100644 plugins/st1232-raw.c\n create mode 100644 tests/ts_uinput_touch.c\n\ndiff --git a/configure.ac b/configure.ac\nindex dfdf269..6984002 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -69,6 +69,7 @@ TSLIB_CHECK_MODULE([dmc], [yes], [Enable building of dmc raw module (HP iPaq DMC\n TSLIB_CHECK_MODULE([input], [yes], [Enable building of generic input raw module (Linux /dev/input/eventN support)])\n TSLIB_CHECK_MODULE([touchkit], [yes], [Enable building of serial TouchKit raw module (Linux /dev/ttySX support)])\n TSLIB_CHECK_MODULE([galax], [yes], [Enable building of HID USB eGalax raw module (Linux /dev/hiddevN support)])\n+TSLIB_CHECK_MODULE([st1232], [yes], [Enable building of ST1232 raw module (Linux /dev/input/eventN support)])\n \n \n \ndiff --git a/plugins/Makefile.am b/plugins/Makefile.am\nindex e938e17..e8e89e0 100644\n--- a/plugins/Makefile.am\n+++ b/plugins/Makefile.am\n@@ -121,6 +121,12 @@ else\n CY8MRLN_PALMPRE_MODULE =\n endif\n \n+if ENABLE_ST1232_MODULE\n+ST1232_MODULE = st1232.la\n+else\n+ST1232_MODULE =\n+endif\n+\n pluginexec_LTLIBRARIES = \\\n \t$(LINEAR_MODULE) \\\n \t$(DEJITTER_MODULE) \\\n@@ -138,7 +144,8 @@ pluginexec_LTLIBRARIES = \\\n \t$(INPUT_MODULE) \\\n \t$(GALAX_MODULE) \\\n \t$(TOUCHKIT_MODULE) \\\n-\t$(CY8MRLN_PALMPRE_MODULE)\n+\t$(CY8MRLN_PALMPRE_MODULE) \\\n+\t$(ST1232_MODULE)\n   \n variance_la_SOURCES\t= variance.c\n variance_la_LDFLAGS\t= -module $(LTVSN)\n@@ -197,3 +204,7 @@ linear_h2200_la_LDFLAGS\t= -module $(LTVSN)\n \n cy8mrln_palmpre_la_SOURCES = cy8mrln-palmpre.c\n cy8mrln_palmpre_la_LDFLAGS = -module $(LTVSN)\n+\n+st1232_la_SOURCES = st1232-raw.c\n+st1232_la_LDFLAGS = -module $(LTVSN)\n+st1232_la_LIBADD = $(top_builddir)/src/libts.la\ndiff --git a/plugins/plugins.h b/plugins/plugins.h\nindex 873aba5..d78877e 100644\n--- a/plugins/plugins.h\n+++ b/plugins/plugins.h\n@@ -16,3 +16,4 @@ TSLIB_DECLARE_MODULE(arctic2);\n TSLIB_DECLARE_MODULE(tatung);\n TSLIB_DECLARE_MODULE(input);\n TSLIB_DECLARE_MODULE(cy8mrln_palmpre);\n+TSLIB_DECLARE_MODULE(st1232);\ndiff --git a/plugins/st1232-raw.c b/plugins/st1232-raw.c\nnew file mode 100644\nindex 0000000..f05d21d\n--- /dev/null\n+++ b/plugins/st1232-raw.c\n@@ -0,0 +1,303 @@\n+/*\n+ *  tslib/plugins/st1232-raw.c\n+ *\n+ * based on input-raw.c\n+ * 2015.06 Peter Vicman\n+ *\n+ *  Original version:\n+ *  Copyright (C) 2001 Russell King.\n+ *\n+ *  Rewritten for the Linux input device API:\n+ *  Copyright (C) 2002 Nicolas Pitre\n+ *\n+ * This file is placed under the LGPL.  Please see the file\n+ * COPYING for more details.\n+ *\n+ *\n+ * Plugin for \"st1232-touchscreen\" (found on 7\" display for Udoo board with i.MX6 SoC)\n+ *\n+ * Read raw x, y, and timestamp from a touchscreen device.\n+ * Only first mt report is taken and send upstream.\n+ * ST1232 driver doesn't report ABS_X/Y events - only MT - and\n+ * doesn't report BTN_TOUCH event.\n+ *\n+ * In memory of my mom and dad ...\n+ */\n+#include \"config.h\"\n+\n+#include <errno.h>\n+#include <stdio.h>\n+#include <limits.h>\n+\n+#include <stdlib.h>\n+#ifdef HAVE_UNISTD_H\n+#include <unistd.h>\n+#endif\n+#include <sys/time.h>\n+#include <sys/types.h>\n+\n+#include <linux/input.h>\n+#ifndef EV_SYN /* 2.4 kernel headers */\n+# define EV_SYN 0x00\n+#endif\n+#ifndef EV_CNT\n+# define EV_CNT (EV_MAX+1)\n+#endif\n+#ifndef ABS_CNT\n+# define ABS_CNT (ABS_MAX+1)\n+#endif\n+#ifndef KEY_CNT\n+# define KEY_CNT (KEY_MAX+1)\n+#endif\n+\n+#ifndef ABS_MT_POSITION_X\n+# define ABS_MT_POSITION_X       0x35    /* Center X ellipse position */\n+# define ABS_MT_POSITION_Y       0x36    /* Center Y ellipse position */\n+#endif\n+\n+#define SYN_MT_REPORT\t\t2\n+\n+#include \"tslib-private.h\"\n+\n+#define GRAB_EVENTS_WANTED\t1\n+#define GRAB_EVENTS_ACTIVE\t2\n+\n+struct tslib_input {\n+\tstruct tslib_module_info module;\n+\n+\tint\tcurrent_x;\n+\tint\tcurrent_y;\n+\tint\tcurrent_p;\n+\n+\tint\tsane_fd;\n+\tint\tusing_syn;\n+\tint\tgrab_events;\n+\tint invert_y;\n+};\n+\n+#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))\n+#define BIT(nr)                 (1UL << (nr))\n+#define BIT_MASK(nr)            (1UL << ((nr) % BITS_PER_LONG))\n+#define BIT_WORD(nr)            ((nr) / BITS_PER_LONG)\n+#define BITS_PER_BYTE           8\n+#define BITS_PER_LONG           (sizeof(long) * BITS_PER_BYTE)\n+#define BITS_TO_LONGS(nr)       DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))\n+\n+static int check_fd(struct tslib_input *i)\n+{\n+\tstruct tsdev *ts = i->module.dev;\n+\tint version;\n+\tlong evbit[BITS_TO_LONGS(EV_CNT)];\n+\tlong absbit[BITS_TO_LONGS(ABS_CNT)];\n+\n+\tif (ioctl(ts->fd, EVIOCGVERSION, &version) < 0) {\n+\t\tfprintf(stderr, \"tslib: Selected device is not a Linux input event device\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\tif (version < EV_VERSION) {\n+\t\tfprintf(stderr, \"tslib: Selected device uses a different version of the event protocol than tslib was compiled for\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\tif ( (ioctl(ts->fd, EVIOCGBIT(0, sizeof(evbit)), evbit) < 0) ||\n+\t\t!(evbit[BIT_WORD(EV_ABS)] & BIT_MASK(EV_ABS)) ||\n+\t\t!(evbit[BIT_WORD(EV_KEY)] & BIT_MASK(EV_KEY)) ) {\n+\t\tfprintf(stderr, \"tslib: Selected device is not a touchscreen (must support ABS and KEY event types)\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\tif ((ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit)) < 0 ||\n+\t\t!(absbit[BIT_WORD(ABS_MT_POSITION_X)] & BIT_MASK(ABS_MT_POSITION_X)) ||\n+\t\t!(absbit[BIT_WORD(ABS_MT_POSITION_Y)] & BIT_MASK(ABS_MT_POSITION_Y))) {\n+\t\tfprintf(stderr, \"tslib: Selected device is not a touchscreen (must support ABS_MT_POSITION_X and ABS_MT_POSITION_Y events)\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\tif (evbit[BIT_WORD(EV_SYN)] & BIT_MASK(EV_SYN))\n+\t\ti->using_syn = 1;\n+\n+\tif (i->grab_events == GRAB_EVENTS_WANTED) {\n+\t\tif (ioctl(ts->fd, EVIOCGRAB, (void *)1)) {\n+\t\t\tfprintf(stderr, \"tslib: Unable to grab selected input device\\n\");\n+\t\t\treturn -1;\n+\t\t}\n+\t\ti->grab_events = GRAB_EVENTS_ACTIVE;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int ts_st1232_read(struct tslib_module_info *inf,\n+\t\t\t struct ts_sample *samp, int nr)\n+{\n+\tstruct tslib_input *i = (struct tslib_input *)inf;\n+\tstruct tsdev *ts = inf->dev;\n+\tstruct input_event ev;\n+\tint ret = nr;\n+\tint total = 0;\n+\tint mt_cnt = 0;\t\t/* data for first finger */\n+\n+\tif (i->sane_fd == -1)\n+\t\ti->sane_fd = check_fd(i);\n+\n+\tif (i->sane_fd == -1)\n+\t\treturn 0;\n+\n+\tif (i->using_syn) {\n+\t\twhile (total < nr) {\n+\t\t\tret = read(ts->fd, &ev, sizeof(struct input_event));\n+\t\t\tif (ret < (int) sizeof(struct input_event)) {\n+\t\t\t\ttotal = -1;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\n+\t\t\tswitch (ev.type) {\n+\t\t\t\tcase EV_SYN:\n+\t\t\t\t\tif (ev.code == SYN_MT_REPORT) {\n+\t\t\t\t\t\tmt_cnt++;\t\t/* data for next finger will come */\n+\t\t\t\t\t} else if (ev.code == SYN_REPORT) {\n+\t\t\t\t\t\t/* fill out a new complete event */\n+\t\t\t\t\t\t/* always send coordinate (last one on finger released) */\n+\t\t\t\t\t\tsamp->x = i->current_x;\n+\t\t\t\t\t\tsamp->y = i->current_y;\n+\t\t\t\t\t\tsamp->pressure = i->current_p;\t/* is 0 on finger released */\n+\t\t\t\t\t\tsamp->tv = ev.time;\n+      \t\n+\t\t\t\t\t\ti->current_p = 0;\t\t/* will be set again when getting xy cordinate */\t\t\t\t\t\n+\t\t\t\t\t\tsamp++;\n+\t\t\t\t\t\ttotal++;\n+\t\t\t\t\t\tmt_cnt = 0;\n+\t\t\t\t\t}\n+\t\t\t\t\tbreak;\n+\t\t\t\tcase EV_ABS:\n+\t\t\t\t\tif (mt_cnt > 0)\n+\t\t\t\t\t\tbreak;\t/* save data only for first finger */\n+\t\t\t\t\t\t\t\t\n+\t\t\t\t\tswitch (ev.code) {\n+\t\t\t\t\t\tcase ABS_MT_POSITION_X:\t\t\t\t\t\n+\t\t\t\t\t\t\ti->current_x = ev.value;\n+\t\t\t\t\t\t\ti->current_p = 255;  /* touched */\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\tcase ABS_MT_POSITION_Y:\n+\t\t\t\t\t\t\ti->current_y = ev.value;\n+\t\t\t\t\t\t\ti->current_p = 255;  /* touched */\n+      \t\n+\t\t\t\t\t\t\tif (i->invert_y > 0)\n+\t\t\t\t\t\t\t\ti->current_y = i->invert_y - i->current_y;\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t}\n+\t\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\t\t\n+\t\tret = total;\n+\t} else {\n+\t\tfprintf(stderr, \"tslib: st1232 and not using syn\\n\");\n+\t\tsleep(1);\n+\t}\n+\n+\treturn ret;\n+}\n+\n+static int ts_st1232_fini(struct tslib_module_info *inf)\n+{\n+\tstruct tslib_input *i = (struct tslib_input *)inf;\n+\tstruct tsdev *ts = inf->dev;\n+\n+\tif (i->grab_events == GRAB_EVENTS_ACTIVE) {\n+\t\tif (ioctl(ts->fd, EVIOCGRAB, (void *)0)) {\n+\t\t\tfprintf(stderr, \"tslib: Unable to un-grab selected input device\\n\");\n+\t\t}\n+\t}\n+\n+\tfree(inf);\n+\treturn 0;\n+}\n+\n+static const struct tslib_ops __ts_st1232_ops = {\n+\t.read\t= ts_st1232_read,\n+\t.fini\t= ts_st1232_fini,\n+};\n+\n+static int parse_raw_grab(struct tslib_module_info *inf, char *str, void *data)\n+{\n+\tstruct tslib_input *i = (struct tslib_input *)inf;\n+\tunsigned long v;\n+\tint err = errno;\n+\n+\tv = strtoul(str, NULL, 0);\n+\n+\tif (v == ULONG_MAX && errno == ERANGE)\n+\t\treturn -1;\n+\n+\terrno = err;\n+\tswitch ((int)data) {\n+\t\tcase 1:\n+\t\t\tif (v)\n+\t\t\t\ti->grab_events = GRAB_EVENTS_WANTED;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\treturn -1;\n+\t}\n+\treturn 0;\n+}\n+\n+static int parse_invert_y(struct tslib_module_info *inf, char *str, void *data)\n+{\n+\tstruct tslib_input *i = (struct tslib_input *)inf;\n+\tint v;\n+\tint err = errno;\n+\n+\tv = atoi(str);\n+\n+\tif (v < 0)\n+\t\treturn -1;\n+\n+\terrno = err;\n+\tswitch ((int)data) {\n+\t\tcase 1:\n+\t\t\ti->invert_y = v;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\treturn -1;\n+\t}\n+\treturn 0;\n+}\n+\n+static const struct tslib_vars raw_vars[] =\n+{\n+\t{ \"grab_events\", (void *)1, parse_raw_grab },\n+\t{ \"invert_y\", (void *)1, parse_invert_y },\n+};\n+\n+#define NR_VARS (sizeof(raw_vars) / sizeof(raw_vars[0]))\n+\n+TSAPI struct tslib_module_info *st1232_mod_init(struct tsdev *dev, const char *params)\n+{\n+\tstruct tslib_input *i;\n+\n+\ti = malloc(sizeof(struct tslib_input));\n+\tif (i == NULL)\n+\t\treturn NULL;\n+\n+\ti->module.ops = &__ts_st1232_ops;\n+\ti->current_x = 0;\n+\ti->current_y = 0;\n+\ti->current_p = 0;\n+\ti->sane_fd = -1;\n+\ti->using_syn = 0;\n+\ti->grab_events = 0;\n+\ti->invert_y = 0;\n+\n+\tif (tslib_parse_vars(&i->module, raw_vars, NR_VARS, params)) {\n+\t\tfree(i);\n+\t\treturn NULL;\n+\t}\n+\n+\treturn &(i->module);\n+}\n+\n+#ifndef TSLIB_STATIC_ST1232_MODULE\n+\tTSLIB_MODULE_INIT(st1232_mod_init);\n+#endif\ndiff --git a/src/Makefile.am b/src/Makefile.am\nindex 5278d82..b561aa8 100644\n--- a/src/Makefile.am\n+++ b/src/Makefile.am\n@@ -71,6 +71,10 @@ if ENABLE_STATIC_INPUT_MODULE\n libts_la_SOURCES += $(top_srcdir)/plugins/input-raw.c\n endif\n \n+if ENABLE_STATIC_ST1232_MODULE\n+libts_la_SOURCES += $(top_srcdir)/plugins/st1232-raw.c\n+endif\n+\n libts_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \\\n \t\t   -release $(LT_RELEASE) -export-dynamic\n libts_la_LIBADD  = -ldl\ndiff --git a/src/ts_load_module.c b/src/ts_load_module.c\nindex 00486be..886ca0a 100644\n--- a/src/ts_load_module.c\n+++ b/src/ts_load_module.c\n@@ -73,6 +73,9 @@ static const struct {\n #ifdef TSLIB_STATIC_VARIANCE_MODULE\n \t{ \"variance\", variance_mod_init },\n #endif\n+#ifdef TSLIB_STATIC_ST1232_MODULE\n+\t{ \"st1232\", st1232_mod_init },\n+#endif\n };\n \n #define countof(arr) (sizeof(arr) / sizeof((arr)[0]))\ndiff --git a/tests/Makefile.am b/tests/Makefile.am\nindex b76522d..2e80c18 100644\n--- a/tests/Makefile.am\n+++ b/tests/Makefile.am\n@@ -11,7 +11,7 @@\n AM_CFLAGS               = -DTS_POINTERCAL=\\\"@TS_POINTERCAL@\\\" $(DEBUGFLAGS)\n INCLUDES\t\t= -I$(top_srcdir)/src\n \n-bin_PROGRAMS\t\t= ts_test ts_calibrate ts_print ts_print_raw ts_harvest\n+bin_PROGRAMS\t\t= ts_test ts_calibrate ts_print ts_print_raw ts_harvest ts_uinput_touch\n \n ts_test_SOURCES\t\t= ts_test.c fbutils.c fbutils.h font_8x8.c font_8x16.c font.h\n ts_test_LDADD\t\t= $(top_builddir)/src/libts.la\n@@ -27,3 +27,6 @@ ts_calibrate_LDADD\t= $(top_builddir)/src/libts.la\n \n ts_harvest_SOURCES\t= ts_harvest.c fbutils.c fbutils.h testutils.c testutils.h font_8x8.c font_8x16.c font.h\n ts_harvest_LDADD\t\t= $(top_builddir)/src/libts.la\n+\n+ts_uinput_touch_SOURCES\t= ts_uinput_touch.c testutils.c testutils.h\n+ts_uinput_touch_LDADD\t\t= $(top_builddir)/src/libts.la\ndiff --git a/tests/testutils.c b/tests/testutils.c\nindex dbd5b41..bc3756f 100644\n--- a/tests/testutils.c\n+++ b/tests/testutils.c\n@@ -15,6 +15,7 @@\n #include <stdio.h>\n #include <stdlib.h>\n #include <unistd.h>\n+#include <errno.h>\n #include <sys/time.h>\n #include \"tslib.h\"\n #include \"fbutils.h\"\n@@ -37,6 +38,9 @@ void getxy(struct tsdev *ts, int *x, int *y)\n \n \tdo {\n \t\tif (ts_read_raw(ts, &samp[0], 1) < 0) {\n+\t\t\tif (errno == EINTR)\n+\t\t\t\treturn;\n+\n \t\t\tperror(\"ts_read\");\n \t\t\tclose_framebuffer ();\n \t\t\texit(1);\n@@ -50,6 +54,9 @@ void getxy(struct tsdev *ts, int *x, int *y)\n \t\tif (index < MAX_SAMPLES-1)\n \t\t\tindex++;\n \t\tif (ts_read_raw(ts, &samp[index], 1) < 0) {\n+\t\t\tif (errno == EINTR)\n+\t\t\t\treturn;\n+\n \t\t\tperror(\"ts_read\");\n \t\t\tclose_framebuffer ();\n \t\t\texit(1);\ndiff --git a/tests/ts_calibrate.c b/tests/ts_calibrate.c\nindex eb0aca3..522fa7c 100644\n--- a/tests/ts_calibrate.c\n+++ b/tests/ts_calibrate.c\n@@ -237,12 +237,16 @@ int main()\n \n \tget_sample (ts, &cal, 0, 50,        50,        \"Top left\");\n \tclearbuf(ts);\n+\tusleep(500000);\n \tget_sample (ts, &cal, 1, xres - 50, 50,        \"Top right\");\n \tclearbuf(ts);\n+\tusleep(500000);\n \tget_sample (ts, &cal, 2, xres - 50, yres - 50, \"Bot right\");\n \tclearbuf(ts);\n+\tusleep(500000);\n \tget_sample (ts, &cal, 3, 50,        yres - 50, \"Bot left\");\n \tclearbuf(ts);\n+\tusleep(500000);\n \tget_sample (ts, &cal, 4, xres / 2,  yres / 2,  \"Center\");\n \n \tif (perform_calibration (&cal)) {\ndiff --git a/tests/ts_uinput_touch.c b/tests/ts_uinput_touch.c\nnew file mode 100644\nindex 0000000..60efc46\n--- /dev/null\n+++ b/tests/ts_uinput_touch.c\n@@ -0,0 +1,624 @@\n+/*\n+ *  tslib/src/ts_uinput_touch.c\n+ *\n+ *  Copyright (C) 2001 Russell King.\n+ *  Copyright (C) 2015 Peter Vicman.\n+ *\n+ * This file is placed under the GPL.  Please see the file\n+ * COPYING for more details.\n+ *\n+ *\n+ * Takes tslib events and send them to uinput as\n+ *   BTN_TOUCH, ABS_X, ABS_Y and ABS_PRESSURE values.\n+ * Short tap send button event and longer tap send only coordinates.\n+ * Tested only with Kodi application.\n+ *\n+ * code based on\n+ *   tslib/src/ts_test.c\n+ *   tslib/src/ts_calibrate.c\n+ *   http://thiemonge.org/getting-started-with-uinput\n+ *   http://lkcl.net/software/uinput/\n+ *\n+ * In memory of my mom and dad ...\n+ */\n+\n+#include \"config.h\"\n+#include <stdio.h>\n+#include <stdbool.h>\n+#include <stdlib.h>\n+#include <string.h>\n+#include <signal.h>\n+#include <unistd.h>\n+#include <errno.h>\n+#include <fcntl.h>\n+#include <ctype.h>\n+#include <getopt.h>\n+#include <sys/fcntl.h>\n+#include <sys/ioctl.h>\n+#include <sys/mman.h>\n+#include <sys/time.h>\n+#include <sys/types.h>\n+#include <sys/stat.h>\n+#include <sys/socket.h>\n+#include <sys/un.h>\n+#include <linux/fb.h>\n+#include <linux/input.h>\n+#include <linux/uinput.h>\n+#include \"tslib.h\"\n+#include \"testutils.h\"\n+\n+#define die(str, args...) do { \\\n+    perror(str); \\\n+    exit(EXIT_FAILURE); \\\n+  } while(0);\n+\n+#define SET_ABS_MINMAX(dev, arg, min, max) do { \\\n+    (dev).absmin[arg] = min; \\\n+    (dev).absmax[arg] = max; \\\n+  } while(0);\n+\n+#define CANCEL_CALIBRATION if (! calibration_mode) return; else {}\n+\n+#define SOCK_PATH \"/tmp/ts_calibrate.socket\"\n+\n+#define CROSSHAIR_STR1 \"Top left\"\n+#define CROSSHAIR_STR2 \"Top right\"\n+#define CROSSHAIR_STR3 \"Bottom right\"\n+#define CROSSHAIR_STR4 \"Bottom left\"\n+#define CROSSHAIR_STR5 \"Center\"\n+\n+typedef struct {\n+  int x[5], xfb[5];\n+  int y[5], yfb[5];\n+  int a[7];\n+} calibration;\n+\n+char *uinput_names[] = {\"/dev/uinput\", \"/dev/input/uinput\", \"/dev/misc/uinput\"};\n+#define UINPUT_NAMES_NUM ((int) (sizeof(uinput_names)/sizeof(char *)))\n+\n+__u32 xres = 0, yres = 0;\n+struct timeval tv_short_tap = {0, 300};  /* sec, msec */\n+bool calibration_mode = false;\n+int sock = -1;\n+\n+static void daemonize() {\n+  pid_t pid;\n+\n+  pid = fork();\n+  if (pid == -1) {\n+    die(\"failed to fork while daemonising (errno=%d)\", errno)\n+  } else if (pid != 0) {\n+    exit(0);\n+  }\n+\n+  umask(0);\n+\n+  if (setsid() == -1) {\n+    die(\"failed to become a session leader while daemonising(errno=%d)\", errno)\n+  }\n+\n+  signal(SIGHUP,SIG_IGN);\n+  pid=fork();\n+  if (pid == -1) {\n+    die(\"failed to fork while daemonizing (errno=%d)\", errno)\n+  } else if (pid != 0) {\n+    exit(0);\n+  }\n+\n+  if (chdir(\"/\") == -1) {\n+    die(\"failed to change working directory while daemonizing (errno=%d)\", errno)\n+  }\n+\n+  umask(0);\n+  close(STDIN_FILENO);\n+  close(STDOUT_FILENO);\n+  close(STDERR_FILENO);\n+\n+  if (open(\"/dev/null\", O_RDONLY) == -1) {\n+    die(\"failed to reopen stdin while daemonizing (errno=%d)\", errno)\n+  }\n+\n+  if (open(\"/dev/null\", O_WRONLY) == -1) {\n+    die(\"failed to reopen stdout while daemonizing (errno=%d)\", errno)\n+  }\n+\n+  if (open(\"/dev/null\", O_RDWR) == -1) {\n+    die(\"failed to reopen stderr while daemonizing (errno=%d)\", errno)\n+  }\n+}\n+\n+static void sig(int sig)\n+{\n+  fflush(stderr);\n+  printf(\"signal %d caught\\n\", sig);\n+  fflush(stdout);\n+  exit(1);\n+}\n+\n+static void set_ioctl(int fd, unsigned int cmd, __u16 value)\n+{\n+  if (ioctl(fd, cmd, value) < 0)\n+    die(\"error: ioctl\")\n+}\n+\n+static int send_event(int fd, __u16 type, __u16 code, __s32 value)\n+{\n+  struct input_event event;\n+  int ret;\n+\n+  memset(&event, 0, sizeof(event));\n+  event.type = type;\n+  event.code = code;\n+  event.value = value;\n+\n+  ret = write(fd, &event, sizeof(event));\n+  if (ret != sizeof(event)) {\n+    fprintf(stderr, \"Error on send_event\");\n+    return -1;\n+  }\n+\n+  return 0;\n+}\n+\n+static void signal_handler(int signal_number) {\n+  if (signal_number == SIGUSR1)\n+    calibration_mode = true;\n+  else if (signal_number == SIGUSR2)\n+    calibration_mode = false;\n+  else\n+    return;\n+\n+  printf(\"signal handler %d, current calibration_mode=%d\\n\", signal_number, calibration_mode == true ? 1 : 0);\n+  if (calibration_mode) {\n+    tv_short_tap.tv_sec += 600; /* little more time */\n+  } else {\n+    tv_short_tap.tv_sec -= 600;\n+  }\n+}\n+\n+static int perform_calibration(calibration *cal) {\n+  int j;\n+  float n, x, y, x2, y2, xy, z, zx, zy;\n+  float det, a, b, c, e, f, i;\n+  float scaling = 65536.0;\n+\n+// Get sums for matrix\n+  n = x = y = x2 = y2 = xy = 0;\n+  for(j=0;j<5;j++) {\n+    n += 1.0;\n+    x += (float)cal->x[j];\n+    y += (float)cal->y[j];\n+    x2 += (float)(cal->x[j]*cal->x[j]);\n+    y2 += (float)(cal->y[j]*cal->y[j]);\n+    xy += (float)(cal->x[j]*cal->y[j]);\n+  }\n+\n+// Get determinant of matrix -- check if determinant is too small\n+  det = n*(x2*y2 - xy*xy) + x*(xy*y - x*y2) + y*(x*xy - y*x2);\n+  if(det < 0.1 && det > -0.1) {\n+    printf(\"ts_calibrate: determinant is too small -- %f\\n\",det);\n+    return 0;\n+  }\n+\n+// Get elements of inverse matrix\n+  a = (x2*y2 - xy*xy)/det;\n+  b = (xy*y - x*y2)/det;\n+  c = (x*xy - y*x2)/det;\n+  e = (n*y2 - y*y)/det;\n+  f = (x*y - n*xy)/det;\n+  i = (n*x2 - x*x)/det;\n+\n+// Get sums for x calibration\n+  z = zx = zy = 0;\n+  for(j=0;j<5;j++) {\n+    z += (float)cal->xfb[j];\n+    zx += (float)(cal->xfb[j]*cal->x[j]);\n+    zy += (float)(cal->xfb[j]*cal->y[j]);\n+  }\n+\n+// Now multiply out to get the calibration for framebuffer x coord\n+  cal->a[0] = (int)((a*z + b*zx + c*zy)*(scaling));\n+  cal->a[1] = (int)((b*z + e*zx + f*zy)*(scaling));\n+  cal->a[2] = (int)((c*z + f*zx + i*zy)*(scaling));\n+\n+  printf(\"%f %f %f\\n\",(a*z + b*zx + c*zy),\n+        (b*z + e*zx + f*zy),\n+        (c*z + f*zx + i*zy));\n+\n+// Get sums for y calibration\n+  z = zx = zy = 0;\n+  for(j=0;j<5;j++) {\n+    z += (float)cal->yfb[j];\n+    zx += (float)(cal->yfb[j]*cal->x[j]);\n+    zy += (float)(cal->yfb[j]*cal->y[j]);\n+  }\n+\n+// Now multiply out to get the calibration for framebuffer y coord\n+  cal->a[3] = (int)((a*z + b*zx + c*zy)*(scaling));\n+  cal->a[4] = (int)((b*z + e*zx + f*zy)*(scaling));\n+  cal->a[5] = (int)((c*z + f*zx + i*zy)*(scaling));\n+\n+  printf(\"%f %f %f\\n\",(a*z + b*zx + c*zy),\n+        (b*z + e*zx + f*zy),\n+        (c*z + f*zx + i*zy));\n+\n+// If we got here, we're OK, so assign scaling to a[6] and return\n+  cal->a[6] = (int)scaling;\n+  return 1;\n+/*\n+// This code was here originally to just insert default values\n+  for(j=0;j<7;j++) {\n+    c->a[j]=0;\n+  }\n+  c->a[1] = c->a[5] = c->a[6] = 1;\n+  return 1;\n+*/\n+}\n+\n+static void get_sample(struct tsdev *ts, calibration *cal,\n+      int index, int x, int y, char *name)\n+{\n+  printf(\"getting sample for: %s\\n\", name);\n+  getxy(ts, &cal->x[index], &cal->y[index]);\n+  cal->xfb[index] = x;\n+  cal->yfb[index] = y;\n+  printf(\"%s: X = %4d Y = %4d\\n\", name, cal->x[index], cal->y[index]);\n+}\n+\n+static void clearbuf(struct tsdev *ts)\n+{\n+  int fd = ts_fd(ts);\n+  fd_set fdset;\n+  struct timeval tv;\n+  int nfds;\n+  struct ts_sample sample;\n+\n+  while (1) {\n+    FD_ZERO(&fdset);\n+    FD_SET(fd, &fdset);\n+\n+    tv.tv_sec = 0;\n+    tv.tv_usec = 0;\n+\n+    nfds = select(fd + 1, &fdset, NULL, NULL, &tv);\n+    if (nfds == 0) break;\n+\n+    if (ts_read_raw(ts, &sample, 1) < 0) {\n+      perror(\"ts_read\");\n+      exit(1);\n+    }\n+  }\n+}\n+\n+/* we don't use fb but this function is called in case of an error */\n+void close_framebuffer(void) {}\n+\n+static void send_socket_crosshair_str(char *str)\n+{\n+  if (send(sock, str, strlen(str), 0) == -1) {\n+    printf(\"send error\\n\");\n+  }\n+}\n+\n+static void run_calibration(struct tsdev *ts)\n+{\n+  calibration cal;\n+  int cal_fd;\n+  char cal_buffer[256];\n+  char *calfile;\n+  unsigned int i, len;\n+\n+  send_socket_crosshair_str(CROSSHAIR_STR1);  /* show first touch point */\n+  clearbuf(ts);\n+  get_sample(ts, &cal, 0, 50,        50,        CROSSHAIR_STR1);\n+  CANCEL_CALIBRATION\n+  send_socket_crosshair_str(CROSSHAIR_STR2);\n+  clearbuf(ts);\n+  get_sample(ts, &cal, 1, xres - 50, 50,        CROSSHAIR_STR2);\n+  CANCEL_CALIBRATION\n+  send_socket_crosshair_str(CROSSHAIR_STR3);\n+  clearbuf(ts);\n+  get_sample(ts, &cal, 2, xres - 50, yres - 50, CROSSHAIR_STR3);\n+  CANCEL_CALIBRATION\n+  send_socket_crosshair_str(CROSSHAIR_STR4);\n+  clearbuf(ts);\n+  get_sample(ts, &cal, 3, 50,        yres - 50, CROSSHAIR_STR4);\n+  CANCEL_CALIBRATION\n+  send_socket_crosshair_str(CROSSHAIR_STR5);\n+  clearbuf(ts);\n+  get_sample(ts, &cal, 4, xres / 2,  yres / 2,  CROSSHAIR_STR5);\n+  CANCEL_CALIBRATION\n+  send_socket_crosshair_str(\"done\");\n+  clearbuf(ts);\n+\n+  if (perform_calibration(&cal)) {\n+    printf (\"Calibration constants: \");\n+    for (i = 0; i < 7; i++)\n+      printf(\"%d \", cal.a[i]);\n+\n+    printf(\"\\n\");\n+    calfile = getenv(\"TSLIB_CALIBFILE\");\n+    if (calfile != NULL) {\n+      cal_fd = open(calfile, O_CREAT | O_TRUNC | O_RDWR,\n+                     S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);\n+\n+      if (cal_fd == -1) {\n+        printf(\"Calibration failed - can't open calibration file %s.\\n\", calfile);\n+        return;\n+      }\n+    } else {\n+      cal_fd = open(TS_POINTERCAL, O_CREAT | O_TRUNC | O_RDWR,\n+                     S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);\n+\n+      if (cal_fd == -1) {\n+        printf(\"Calibration failed - can't open calibration file %s.\\n\", TS_POINTERCAL);\n+        return;\n+      }\n+    }\n+\n+    len = sprintf(cal_buffer, \"%d %d %d %d %d %d %d %d %d\",\n+                  cal.a[1], cal.a[2], cal.a[0],\n+                  cal.a[4], cal.a[5], cal.a[3], cal.a[6],\n+                  xres, yres);\n+    write(cal_fd, cal_buffer, len);\n+    close(cal_fd);\n+  } else {\n+    printf(\"Calibration failed - wrong data.\\n\");\n+  }\n+}\n+\n+int get_resolution(void)\n+{\n+  static char *fbdevice;\n+  int fd;\n+  static struct fb_var_screeninfo var;\n+\n+  fbdevice = getenv(\"TSLIB_FBDEVICE\");\n+  if (fbdevice == NULL)\n+    return -1;\n+\n+  printf(\"using fb device: %s\\n\", fbdevice);\n+  fd = open(fbdevice, O_RDWR);\n+  if (fd == -1) {\n+    perror(\"open fbdevice\");\n+    return -1;\n+  }\n+\n+  if (ioctl(fd, FBIOGET_VSCREENINFO, &var) < 0) {\n+    perror(\"ioctl FBIOGET_VSCREENINFO\");\n+    close(fd);\n+    return -1;\n+  }\n+\n+  xres = var.xres;\n+  yres = var.yres;\n+\n+  close(fd);\n+  return 0;\n+}\n+\n+int main(int argc, char *argv[])\n+{\n+  int c;\n+  char *tsdevice;\n+  struct tsdev *ts;\n+  int ret;\n+  struct ts_sample samp;\n+  int uinput_fd;\n+  struct uinput_user_dev uidev;\n+  int daemon = 0;\n+  struct timeval tv_last;\n+  struct timeval tv_sub;\n+  char *touch_str;\n+  int val;\n+  struct sigaction sa;\n+  struct sockaddr_un remote_addr;\n+\n+  touch_str = getenv(\"TSLIB_TAP_TIME\");\n+  if (touch_str != NULL) {\n+    val = atoi(touch_str);\n+    if (val < 1000) {\n+      tv_short_tap.tv_sec = 0;\n+      tv_short_tap.tv_usec = val;\n+    } else {\n+      tv_short_tap.tv_sec = val / 1000;\n+      tv_short_tap.tv_usec = val % 1000;\n+    }\n+  }\n+\n+  get_resolution();\n+\n+  while ((c = getopt(argc, argv, \"?dt:x:y:\")) != -1) {\n+    switch (c) {\n+      case 'd':\n+        daemon = 1;\n+        break;\n+      case 't':\n+        val = atoi(optarg);\n+        if (val < 1000) {\n+          tv_short_tap.tv_sec = 0;\n+          tv_short_tap.tv_usec = val;\n+        } else {\n+          tv_short_tap.tv_sec = val / 1000;\n+          tv_short_tap.tv_usec = val % 1000;\n+        }\n+\n+        break;\n+      case 'x':\n+        xres = atoi(optarg);\n+        break;\n+      case 'y':\n+        yres = atoi(optarg);\n+        break;\n+      case '?':\n+        if (isprint(optopt))\n+          fprintf (stderr, \"Unknown option '-%c'.\\n\", optopt);\n+        else\n+          fprintf (stderr, \"Unknown option character '\\\\x%x'.\\n\", optopt);\n+        return 1;\n+      default:\n+        die(\"getopt\")\n+    }\n+  }\n+\n+  printf(\"resolution: %dx%d\\n\", xres, yres);\n+\n+  signal(SIGSEGV, sig);\n+  signal(SIGINT, sig);\n+  signal(SIGTERM, sig);\n+\n+  tsdevice = getenv(\"TSLIB_TSDEVICE\");\n+\n+  if (tsdevice == NULL) {\n+    errno = ENOENT;\n+    die(\"error: TSLIB_TSDEVICE\")\n+  }\n+\n+  printf(\"using touch device: %s\\n\", tsdevice);\n+\n+  ts = ts_open(tsdevice, 0);  // 0 nonblock\n+  if (!ts) {\n+    die(\"ts_open\")\n+  }\n+\n+  if (ts_config(ts)) {\n+    die(\"ts_config\")\n+  }\n+\n+  system(\"modprobe uinput\");\n+\n+  for (c=0; c < UINPUT_NAMES_NUM; c++) {\n+    uinput_fd = open(uinput_names[c], O_WRONLY | O_NONBLOCK);\n+    if (uinput_fd >= 0)\n+      break;\n+  }\n+\n+  if (uinput_fd < 0)\n+    die(\"error: opening uinput\")\n+\n+  if (tv_short_tap.tv_sec == 0)\n+    printf(\"Short tap time: %li msec\\n\", tv_short_tap.tv_usec);\n+  else\n+    printf(\"Short tap time: %li.%li sec\\n\", tv_short_tap.tv_sec, tv_short_tap.tv_usec);\n+\n+  memset (&sa, 0, sizeof (sa));\n+  sa.sa_handler = &signal_handler;\n+  sigaction(SIGUSR1, &sa, NULL);\n+  sigaction(SIGUSR2, &sa, NULL);\n+\n+  if (daemon == 1) {\n+    printf(\"daemonizing...\\n\");\n+    daemonize();\n+  }\n+\n+  set_ioctl(uinput_fd, UI_SET_EVBIT, EV_SYN);\n+  set_ioctl(uinput_fd, UI_SET_EVBIT, EV_KEY);\n+  set_ioctl(uinput_fd, UI_SET_KEYBIT, BTN_TOUCH);\n+  set_ioctl(uinput_fd, UI_SET_EVBIT, EV_ABS);\n+  set_ioctl(uinput_fd, UI_SET_ABSBIT, ABS_X);\n+  set_ioctl(uinput_fd, UI_SET_ABSBIT, ABS_Y);\n+  set_ioctl(uinput_fd, UI_SET_ABSBIT, ABS_PRESSURE);\n+\n+  memset(&uidev, 0, sizeof(uidev));\n+\n+  snprintf(uidev.name, UINPUT_MAX_NAME_SIZE, \"tslib to uinput daemon\");\n+  SET_ABS_MINMAX(uidev, ABS_X, 0, xres)\n+  SET_ABS_MINMAX(uidev, ABS_Y, 0, yres)\n+  SET_ABS_MINMAX(uidev, ABS_PRESSURE, 0, 255)\n+\n+  uidev.id.bustype = BUS_USB;\n+  uidev.id.vendor  = 0x34a5;\n+  uidev.id.product = 0x67b8;\n+  uidev.id.version = 1;\n+\n+  if (write(uinput_fd, &uidev, sizeof(uidev)) < 0)\n+    die(\"error: write\")\n+\n+  if (ioctl(uinput_fd, UI_DEV_CREATE) < 0)\n+    die(\"error: ioctl UI_DEV_CREATE\")\n+\n+  tv_short_tap.tv_usec *= 1000;   /* msec to usec */\n+  timerclear(&tv_last);\n+  while (1) {\n+    touch_str = \"\";\n+    if (calibration_mode) {\n+      usleep(250000);   /* app become ready */\n+      printf(\"calibration mode started\\n\");\n+\n+      sock = socket(AF_UNIX, SOCK_STREAM, 0);\n+      if (sock == -1) {\n+        die(\"socket\");\n+      }\n+\n+      printf(\"trying to connect\\n\");\n+\n+      remote_addr.sun_family = AF_UNIX;\n+      strcpy(remote_addr.sun_path, SOCK_PATH);\n+      val = strlen(remote_addr.sun_path) + sizeof(remote_addr.sun_family);\n+      if (connect(sock, (struct sockaddr *) &remote_addr, val) == -1) {\n+        calibration_mode = false;\n+        close(sock);\n+        printf(\"connect error, skip calibration\\n\");\n+        usleep(200000);\n+        continue;\n+      }\n+\n+      printf(\"connected\\n\");\n+      run_calibration(ts);\n+      calibration_mode = false;\n+      close(sock);\n+      printf(\"calibration mode finished\\n\");\n+    }\n+\n+    ret = ts_read(ts, &samp, 1);\n+    if (ret < 0) {\n+      usleep(200000);\n+      continue;\n+    } else if (ret == 0) {\n+      /* can't grab ts device */\n+      usleep(400000);\n+    } else if (ret != 1)\n+      continue;\n+\n+    send_event(uinput_fd, EV_ABS, ABS_X, samp.x);\n+    send_event(uinput_fd, EV_ABS, ABS_Y, samp.y);\n+\n+    if (samp.pressure > 0) {  /* touched */\n+      send_event(uinput_fd, EV_ABS, ABS_PRESSURE, 255);\n+      send_event(uinput_fd, EV_SYN, 0, 0);\n+\n+      if (timerisset(&tv_last) == false) {\n+        memcpy(&tv_last, &samp.tv, sizeof(struct timeval)); /* touched first time */\n+        touch_str = \"touched first\";\n+      }\n+    } else {  /* released */\n+      timersub(&samp.tv, &tv_last, &tv_sub);\n+      if (timercmp(&tv_sub, &tv_short_tap, <=)) {\n+        send_event(uinput_fd, EV_ABS, ABS_PRESSURE, 255);\n+        send_event(uinput_fd, EV_KEY, BTN_TOUCH, 1);\n+        send_event(uinput_fd, EV_SYN, 0, 0);\n+        send_event(uinput_fd, EV_ABS, ABS_PRESSURE, 0);\n+        send_event(uinput_fd, EV_KEY, BTN_TOUCH, 0);\n+        send_event(uinput_fd, EV_SYN, 0, 0);\n+\n+        touch_str = \"released and send button\";\n+      } else {\n+        send_event(uinput_fd, EV_ABS, ABS_PRESSURE, 0);\n+        send_event(uinput_fd, EV_SYN, 0, 0);\n+        touch_str = \"released\";\n+      }\n+\n+      timerclear(&tv_last);\n+    }\n+\n+    printf(\"%ld.%06ld: %6d %6d %6d  %s\\n\", samp.tv.tv_sec, samp.tv.tv_usec,\n+          samp.x, samp.y, samp.pressure, touch_str);\n+  }\n+\n+  if (ioctl(uinput_fd, UI_DEV_DESTROY) < 0)\n+    die(\"error: ioctl UI_DEV_DESTROY\")\n+\n+  close(uinput_fd);\n+\n+  return 0;\n+}\n\nFrom b64b63ac2fc791cad6e79cf9236c47b928960c2e Mon Sep 17 00:00:00 2001\nFrom: vpeter4 <peter.vicman@gmail.com>\nDate: Sat, 4 Jul 2015 13:46:56 +0200\nSubject: [PATCH 03/11] ts_uinput_touch: add BTN_RIGHT event if tapped for more\n than 300 ms and less than a second BTN_RIGHT event is send\n\n---\n tests/ts_uinput_touch.c | 38 ++++++++++++++++++++++++++------------\n 1 file changed, 26 insertions(+), 12 deletions(-)\n mode change 100644 => 100755 tests/ts_uinput_touch.c\n\ndiff --git a/tests/ts_uinput_touch.c b/tests/ts_uinput_touch.c\nold mode 100644\nnew mode 100755\nindex 60efc46..489a22f\n--- a/tests/ts_uinput_touch.c\n+++ b/tests/ts_uinput_touch.c\n@@ -9,8 +9,9 @@\n  *\n  *\n  * Takes tslib events and send them to uinput as\n- *   BTN_TOUCH, ABS_X, ABS_Y and ABS_PRESSURE values.\n- * Short tap send button event and longer tap send only coordinates.\n+ *   BTN_TOUCH, BTN_RIGHT, ABS_X, ABS_Y and ABS_PRESSURE values.\n+ * Short tap send button touch event, little longer tap send button right event\n+ *   and longer tap send only coordinates.\n  * Tested only with Kodi application.\n  *\n  * code based on\n@@ -77,7 +78,8 @@ char *uinput_names[] = {\"/dev/uinput\", \"/dev/input/uinput\", \"/dev/misc/uinput\"};\n #define UINPUT_NAMES_NUM ((int) (sizeof(uinput_names)/sizeof(char *)))\n \n __u32 xres = 0, yres = 0;\n-struct timeval tv_short_tap = {0, 300};  /* sec, msec */\n+struct timeval tv_short_tap = {0, 300};  /* sec, msec, short tap sends BTN_TOUCH */\n+struct timeval tv_right_tap = {1, 0};    /* sec, msec, longer tap sends BTN_RIGHT */\n bool calibration_mode = false;\n int sock = -1;\n \n@@ -169,11 +171,6 @@ static void signal_handler(int signal_number) {\n     return;\n \n   printf(\"signal handler %d, current calibration_mode=%d\\n\", signal_number, calibration_mode == true ? 1 : 0);\n-  if (calibration_mode) {\n-    tv_short_tap.tv_sec += 600; /* little more time */\n-  } else {\n-    tv_short_tap.tv_sec -= 600;\n-  }\n }\n \n static int perform_calibration(calibration *cal) {\n@@ -501,6 +498,11 @@ int main(int argc, char *argv[])\n   else\n     printf(\"Short tap time: %li.%li sec\\n\", tv_short_tap.tv_sec, tv_short_tap.tv_usec);\n \n+  if (tv_right_tap.tv_sec == 0)\n+    printf(\"Right tap time: %li msec\\n\", tv_right_tap.tv_usec);\n+  else\n+    printf(\"Right tap time: %li.%li sec\\n\", tv_right_tap.tv_sec, tv_right_tap.tv_usec);\n+\n   memset (&sa, 0, sizeof (sa));\n   sa.sa_handler = &signal_handler;\n   sigaction(SIGUSR1, &sa, NULL);\n@@ -511,10 +513,11 @@ int main(int argc, char *argv[])\n     daemonize();\n   }\n \n-  set_ioctl(uinput_fd, UI_SET_EVBIT, EV_SYN);\n-  set_ioctl(uinput_fd, UI_SET_EVBIT, EV_KEY);\n+  set_ioctl(uinput_fd, UI_SET_EVBIT,  EV_SYN);\n+  set_ioctl(uinput_fd, UI_SET_EVBIT,  EV_KEY);\n   set_ioctl(uinput_fd, UI_SET_KEYBIT, BTN_TOUCH);\n-  set_ioctl(uinput_fd, UI_SET_EVBIT, EV_ABS);\n+  set_ioctl(uinput_fd, UI_SET_KEYBIT, BTN_RIGHT);\n+  set_ioctl(uinput_fd, UI_SET_EVBIT,  EV_ABS);\n   set_ioctl(uinput_fd, UI_SET_ABSBIT, ABS_X);\n   set_ioctl(uinput_fd, UI_SET_ABSBIT, ABS_Y);\n   set_ioctl(uinput_fd, UI_SET_ABSBIT, ABS_PRESSURE);\n@@ -538,6 +541,8 @@ int main(int argc, char *argv[])\n     die(\"error: ioctl UI_DEV_CREATE\")\n \n   tv_short_tap.tv_usec *= 1000;   /* msec to usec */\n+  tv_right_tap.tv_usec *= 1000;   /* msec to usec */\n+\n   timerclear(&tv_last);\n   while (1) {\n     touch_str = \"\";\n@@ -601,7 +606,16 @@ int main(int argc, char *argv[])\n         send_event(uinput_fd, EV_KEY, BTN_TOUCH, 0);\n         send_event(uinput_fd, EV_SYN, 0, 0);\n \n-        touch_str = \"released and send button\";\n+        touch_str = \"released and send tap\";\n+      } else if (timercmp(&tv_sub, &tv_right_tap, <=)) {\n+        send_event(uinput_fd, EV_ABS, ABS_PRESSURE, 255);\n+        send_event(uinput_fd, EV_KEY, BTN_RIGHT, 1);\n+        send_event(uinput_fd, EV_SYN, 0, 0);\n+        send_event(uinput_fd, EV_ABS, ABS_PRESSURE, 0);\n+        send_event(uinput_fd, EV_KEY, BTN_RIGHT, 0);\n+        send_event(uinput_fd, EV_SYN, 0, 0);\n+\n+        touch_str = \"released and send right\";\n       } else {\n         send_event(uinput_fd, EV_ABS, ABS_PRESSURE, 0);\n         send_event(uinput_fd, EV_SYN, 0, 0);\n\nFrom 0c95545167711eb2e906c8ef885956f3395e945a Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Mon, 31 Aug 2015 10:52:51 +0200\nSubject: [PATCH 04/11] Add Waveshare touchscreen raw module inspiration from\n derekhe: https://github.com/derekhe/wavesahre-7inch-touchscreen-driver\n\n---\n configure.ac            |   1 +\n plugins/Makefile.am     |  13 +++-\n plugins/plugins.h       |   1 +\n plugins/waveshare-raw.c | 202 ++++++++++++++++++++++++++++++++++++++++++++++++\n src/Makefile.am         |   4 +\n 5 files changed, 220 insertions(+), 1 deletion(-)\n create mode 100644 plugins/waveshare-raw.c\n\ndiff --git a/configure.ac b/configure.ac\nindex 6984002..598ede7 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -70,6 +70,7 @@ TSLIB_CHECK_MODULE([input], [yes], [Enable building of generic input raw module\n TSLIB_CHECK_MODULE([touchkit], [yes], [Enable building of serial TouchKit raw module (Linux /dev/ttySX support)])\n TSLIB_CHECK_MODULE([galax], [yes], [Enable building of HID USB eGalax raw module (Linux /dev/hiddevN support)])\n TSLIB_CHECK_MODULE([st1232], [yes], [Enable building of ST1232 raw module (Linux /dev/input/eventN support)])\n+TSLIB_CHECK_MODULE([waveshare], [yes], [Enable building of WaveShare raw module (Linux /dev/hidrawN support)])\n \n \n \ndiff --git a/plugins/Makefile.am b/plugins/Makefile.am\nindex e8e89e0..98881b3 100644\n--- a/plugins/Makefile.am\n+++ b/plugins/Makefile.am\n@@ -127,6 +127,12 @@ else\n ST1232_MODULE =\n endif\n \n+if ENABLE_WAVESHARE_MODULE\n+WAVESHARE_MODULE = waveshare.la\n+else\n+WAVESHARE_MODULE =\n+endif\n+\n pluginexec_LTLIBRARIES = \\\n \t$(LINEAR_MODULE) \\\n \t$(DEJITTER_MODULE) \\\n@@ -145,7 +151,8 @@ pluginexec_LTLIBRARIES = \\\n \t$(GALAX_MODULE) \\\n \t$(TOUCHKIT_MODULE) \\\n \t$(CY8MRLN_PALMPRE_MODULE) \\\n-\t$(ST1232_MODULE)\n+\t$(ST1232_MODULE) \\\n+\t$(WAVESHARE_MODULE)\n   \n variance_la_SOURCES\t= variance.c\n variance_la_LDFLAGS\t= -module $(LTVSN)\n@@ -208,3 +215,7 @@ cy8mrln_palmpre_la_LDFLAGS = -module $(LTVSN)\n st1232_la_SOURCES = st1232-raw.c\n st1232_la_LDFLAGS = -module $(LTVSN)\n st1232_la_LIBADD = $(top_builddir)/src/libts.la\n+\n+waveshare_la_SOURCES = waveshare-raw.c\n+waveshare_la_LDFLAGS = -module $(LTVSN)\n+waveshare_la_LIBADD = $(top_builddir)/src/libts.la\ndiff --git a/plugins/plugins.h b/plugins/plugins.h\nindex d78877e..f347e25 100644\n--- a/plugins/plugins.h\n+++ b/plugins/plugins.h\n@@ -17,3 +17,4 @@ TSLIB_DECLARE_MODULE(tatung);\n TSLIB_DECLARE_MODULE(input);\n TSLIB_DECLARE_MODULE(cy8mrln_palmpre);\n TSLIB_DECLARE_MODULE(st1232);\n+TSLIB_DECLARE_MODULE(waveshare);\ndiff --git a/plugins/waveshare-raw.c b/plugins/waveshare-raw.c\nnew file mode 100644\nindex 0000000..ff13055\n--- /dev/null\n+++ b/plugins/waveshare-raw.c\n@@ -0,0 +1,202 @@\n+/*\n+ * tslib driver for WaveShare touchscreens\n+ * Copyright (C) 2015 Peter Vicman\n+ * inspiration from derekhe: https://github.com/derekhe/wavesahre-7inch-touchscreen-driver\n+ *\n+ * This file is placed under the LGPL.  Please see the file COPYING for more\n+ * details.\n+ */\n+\n+#include <stdlib.h>\n+#include <stdio.h>\n+#include <unistd.h>\n+#include <fcntl.h>\n+#include <errno.h>\n+#include <string.h>\n+#include <sys/types.h>\n+#include <sys/stat.h>\n+#include <sys/ioctl.h>\n+#include <linux/hidraw.h>\n+#include <stdbool.h>\n+\n+#include \"config.h\"\n+#include \"tslib-private.h\"\n+\n+struct tslib_input {\n+  struct tslib_module_info module;\n+  int vendor;\n+  int product;\n+  int len;\n+};\n+\n+static int waveshare_read(struct tslib_module_info *inf, struct ts_sample *samp, int nr)\n+{\n+  static bool reopen = true;\n+  struct stat devstat;\n+  struct hidraw_devinfo info;\n+  char name_buf[512];\n+  int cnt;\n+  bool found = false;\n+  struct tslib_input *i = (struct tslib_input *) inf;\n+  struct tsdev *ts = inf->dev;\n+  struct tsdev *ts_tmp;\n+  char *buf;\n+  int ret;\n+\n+  if (reopen == true) {\n+    reopen = false;\n+\n+    if (i->vendor > 0 && i->product > 0) {\n+      fprintf(stderr, \"waveshare: searching for device using hidraw....\\n\");\n+      for (cnt=0; cnt<HIDRAW_MAX_DEVICES; cnt++) {\n+        snprintf(name_buf, sizeof(buf), \"/dev/hidraw%d\", cnt);\n+        fprintf(stderr, \"waveshare: device: %s\\n\", name_buf);\n+        ret = stat(name_buf, &devstat);\n+        if (ret < 0)\n+          continue;\n+\n+        ts_tmp = ts_open(name_buf, 0);\n+        if (!ts_tmp) {\n+          continue;\n+        }\n+\n+        fprintf(stderr, \"  opened\\n\");\n+        ret = ioctl(ts_tmp->fd, HIDIOCGRAWINFO, &info);\n+        if (ret < 0) {\n+          ts_close(ts_tmp);\n+          continue;\n+        }\n+\n+        info.vendor &= 0xFFFF;\n+        info.product &= 0xFFFF;\n+        fprintf(stderr, \"  vid=%04X, pid=%04X\\n\", info.vendor, info.product);\n+\n+        if (i->vendor == info.vendor && i->product == info.product) {\n+          if (ts->fd > 0)\n+            close(ts->fd);\n+\n+          ts->fd = ts_tmp->fd;\n+          free(ts_tmp);\n+          found = true;\n+          fprintf(stderr, \"  correct device\\n\");\n+          break;\n+        }\n+\n+        ts_close(ts_tmp);\n+      } /* for HIDRAW_MAX_DEVICES */\n+\n+      if (found == false) {\n+        return -1;\n+      }\n+    } /* vid/pid set */\n+  } /* reopen */\n+\n+  buf = alloca(i->len * nr);\n+\n+  ret = read(ts->fd, buf, i->len * nr);\n+  if(ret > 0) {\n+    while(ret >= (int) i->len) {\n+      /*\n+        0000271: aa01 00e4 0139 bb01 01e0 0320 01e0 0320 01e0 0320 01e0 0320 cc  .....9..... ... ... ... .\n+\n+        \"aa\" is start of the command, \"01\" means clicked while \"00\" means unclicked.\n+        \"00e4\" and \"0139\" is the X,Y position (HEX).\n+        \"bb\" is start of multi-touch, and the following bytes are the position of each point.\n+      */\n+      samp->pressure = buf[1] & 0xff;\n+      samp->x = ((buf[2] & 0xff) << 8) | (buf[3] & 0xff);\n+      samp->y = ((buf[4] & 0xff) << 8) | (buf[5] & 0xff);\n+      gettimeofday(&samp->tv, NULL);\n+#ifdef DEBUG\n+        fprintf(stderr, \"waveshare raw: %d %d %d\\n\", samp->x, samp->y, samp->pressure);\n+        fprintf(stderr, \"%x %x %x %x %x %x\\n\", buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]);\n+#endif\n+      samp++;\n+      buf += i->len;\n+      ret -= i->len;\n+    }\n+  } else {\n+    return -1;\n+  }\n+\n+  return nr;\n+}\n+\n+static const struct tslib_ops waveshare_ops =\n+{\n+  .read = waveshare_read,\n+};\n+\n+static int parse_vid_pid(struct tslib_module_info *inf, char *str, void *data)\n+{\n+  struct tslib_input *i = (struct tslib_input *)inf;\n+\n+  if (strlen(str) < 9 || (int) data != 1)\n+    return 0;   /* -1 */\n+\n+  str[4] = str[9] = '\\0';\n+  i->vendor = strtol(&str[0], NULL, 16);\n+  i->product = strtol(&str[5], NULL, 16);\n+//#ifdef DEBUG\n+  fprintf(stderr, \"waveshare vid:pid - %04X:%04X\\n\", i->vendor, i->product);\n+//#endif /*DEBUG*/\n+  return 0;\n+}\n+\n+static int parse_len(struct tslib_module_info *inf, char *str, void *data)\n+{\n+  struct tslib_input *i = (struct tslib_input *)inf;\n+  int v;\n+  int err = errno;\n+\n+  v = atoi(str);\n+\n+  if (v < 0)\n+    return -1;\n+\n+  errno = err;\n+  switch ((int) data) {\n+    case 1:\n+      i->len = v;\n+      fprintf(stderr, \"waveshare raw data len: %d bytes\\n\", i->len);\n+      break;\n+    default:\n+      return -1;\n+  }\n+  return 0;\n+}\n+\n+static const struct tslib_vars raw_vars[] =\n+{\n+  { \"vid_pid\", (void *) 1, parse_vid_pid },\n+  { \"len\", (void *) 1, parse_len },\n+};\n+\n+#define NR_VARS (sizeof(raw_vars) / sizeof(raw_vars[0]))\n+\n+TSAPI struct tslib_module_info *waveshare_mod_init(struct tsdev *dev, const char *params)\n+{\n+  struct tslib_input *i;\n+\n+  (void) dev;\n+\n+  i = malloc(sizeof(struct tslib_input));\n+  if (i == NULL)\n+    return NULL;\n+\n+  i->module.ops = &waveshare_ops;\n+  i->vendor = 0;\n+  i->product = 0;\n+  i->len = 25;\n+\n+  if (tslib_parse_vars(&i->module, raw_vars, NR_VARS, params)) {\n+    free(i);\n+    return NULL;\n+  }\n+\n+  return &(i->module);\n+}\n+\n+#ifndef TSLIB_STATIC_WAVESHARE_MODULE\n+  TSLIB_MODULE_INIT(waveshare_mod_init);\n+#endif\ndiff --git a/src/Makefile.am b/src/Makefile.am\nindex b561aa8..a8fded9 100644\n--- a/src/Makefile.am\n+++ b/src/Makefile.am\n@@ -75,6 +75,10 @@ if ENABLE_STATIC_ST1232_MODULE\n libts_la_SOURCES += $(top_srcdir)/plugins/st1232-raw.c\n endif\n \n+if ENABLE_STATIC_WAVESHARE_MODULE\n+libts_la_SOURCES += $(top_srcdir)/plugins/waveshare-raw.c\n+endif\n+\n libts_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \\\n \t\t   -release $(LT_RELEASE) -export-dynamic\n libts_la_LIBADD  = -ldl\n\nFrom 72128c5f16db89d7b644dd184c1b1c6dbe6ef79e Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Sun, 20 Sep 2015 10:30:33 +0200\nSubject: [PATCH 05/11] waveshare: remove reopening device based on vid/pid\n\n---\n plugins/waveshare-raw.c | 76 -------------------------------------------------\n 1 file changed, 76 deletions(-)\n\ndiff --git a/plugins/waveshare-raw.c b/plugins/waveshare-raw.c\nindex ff13055..0839af0 100644\n--- a/plugins/waveshare-raw.c\n+++ b/plugins/waveshare-raw.c\n@@ -24,73 +24,16 @@\n \n struct tslib_input {\n   struct tslib_module_info module;\n-  int vendor;\n-  int product;\n   int len;\n };\n \n static int waveshare_read(struct tslib_module_info *inf, struct ts_sample *samp, int nr)\n {\n-  static bool reopen = true;\n-  struct stat devstat;\n-  struct hidraw_devinfo info;\n-  char name_buf[512];\n-  int cnt;\n-  bool found = false;\n   struct tslib_input *i = (struct tslib_input *) inf;\n   struct tsdev *ts = inf->dev;\n-  struct tsdev *ts_tmp;\n   char *buf;\n   int ret;\n \n-  if (reopen == true) {\n-    reopen = false;\n-\n-    if (i->vendor > 0 && i->product > 0) {\n-      fprintf(stderr, \"waveshare: searching for device using hidraw....\\n\");\n-      for (cnt=0; cnt<HIDRAW_MAX_DEVICES; cnt++) {\n-        snprintf(name_buf, sizeof(buf), \"/dev/hidraw%d\", cnt);\n-        fprintf(stderr, \"waveshare: device: %s\\n\", name_buf);\n-        ret = stat(name_buf, &devstat);\n-        if (ret < 0)\n-          continue;\n-\n-        ts_tmp = ts_open(name_buf, 0);\n-        if (!ts_tmp) {\n-          continue;\n-        }\n-\n-        fprintf(stderr, \"  opened\\n\");\n-        ret = ioctl(ts_tmp->fd, HIDIOCGRAWINFO, &info);\n-        if (ret < 0) {\n-          ts_close(ts_tmp);\n-          continue;\n-        }\n-\n-        info.vendor &= 0xFFFF;\n-        info.product &= 0xFFFF;\n-        fprintf(stderr, \"  vid=%04X, pid=%04X\\n\", info.vendor, info.product);\n-\n-        if (i->vendor == info.vendor && i->product == info.product) {\n-          if (ts->fd > 0)\n-            close(ts->fd);\n-\n-          ts->fd = ts_tmp->fd;\n-          free(ts_tmp);\n-          found = true;\n-          fprintf(stderr, \"  correct device\\n\");\n-          break;\n-        }\n-\n-        ts_close(ts_tmp);\n-      } /* for HIDRAW_MAX_DEVICES */\n-\n-      if (found == false) {\n-        return -1;\n-      }\n-    } /* vid/pid set */\n-  } /* reopen */\n-\n   buf = alloca(i->len * nr);\n \n   ret = read(ts->fd, buf, i->len * nr);\n@@ -127,22 +70,6 @@ static const struct tslib_ops waveshare_ops =\n   .read = waveshare_read,\n };\n \n-static int parse_vid_pid(struct tslib_module_info *inf, char *str, void *data)\n-{\n-  struct tslib_input *i = (struct tslib_input *)inf;\n-\n-  if (strlen(str) < 9 || (int) data != 1)\n-    return 0;   /* -1 */\n-\n-  str[4] = str[9] = '\\0';\n-  i->vendor = strtol(&str[0], NULL, 16);\n-  i->product = strtol(&str[5], NULL, 16);\n-//#ifdef DEBUG\n-  fprintf(stderr, \"waveshare vid:pid - %04X:%04X\\n\", i->vendor, i->product);\n-//#endif /*DEBUG*/\n-  return 0;\n-}\n-\n static int parse_len(struct tslib_module_info *inf, char *str, void *data)\n {\n   struct tslib_input *i = (struct tslib_input *)inf;\n@@ -168,7 +95,6 @@ static int parse_len(struct tslib_module_info *inf, char *str, void *data)\n \n static const struct tslib_vars raw_vars[] =\n {\n-  { \"vid_pid\", (void *) 1, parse_vid_pid },\n   { \"len\", (void *) 1, parse_len },\n };\n \n@@ -185,8 +111,6 @@ TSAPI struct tslib_module_info *waveshare_mod_init(struct tsdev *dev, const char\n     return NULL;\n \n   i->module.ops = &waveshare_ops;\n-  i->vendor = 0;\n-  i->product = 0;\n   i->len = 25;\n \n   if (tslib_parse_vars(&i->module, raw_vars, NR_VARS, params)) {\n\nFrom 8b6a678e507211d5d51081655af244561a931d8f Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Sun, 20 Sep 2015 10:42:31 +0200\nSubject: [PATCH 06/11] ts_reconfig: reload all modules useful to reload\n calibration data without closing and opening device\n\n---\n src/Makefile.am   |  2 +-\n src/ts_reconfig.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++\n src/tslib.h       |  5 +++++\n 3 files changed, 54 insertions(+), 1 deletion(-)\n create mode 100644 src/ts_reconfig.c\n\ndiff --git a/src/Makefile.am b/src/Makefile.am\nindex a8fded9..606a5ae 100644\n--- a/src/Makefile.am\n+++ b/src/Makefile.am\n@@ -17,7 +17,7 @@ include_HEADERS  = tslib.h\n lib_LTLIBRARIES  = libts.la\n libts_la_SOURCES = ts_attach.c ts_close.c ts_config.c ts_error.c \\\n \t\t   ts_fd.c ts_load_module.c ts_open.c ts_parse_vars.c \\\n-\t\t   ts_read.c ts_read_raw.c ts_option.c\n+\t\t   ts_read.c ts_read_raw.c ts_option.c ts_reconfig.c\n \n if ENABLE_STATIC_LINEAR_MODULE\n libts_la_SOURCES += $(top_srcdir)/plugins/linear.c\ndiff --git a/src/ts_reconfig.c b/src/ts_reconfig.c\nnew file mode 100644\nindex 0000000..c94ec3e\n--- /dev/null\n+++ b/src/ts_reconfig.c\n@@ -0,0 +1,48 @@\n+/*\n+ *  tslib/src/ts_reconfig.c\n+ *    based on tslib/src/ts_close.c\n+ *\n+ *  Copyright (C) 2001 Russell King.\n+ *\n+ * This file is placed under the LGPL.  Please see the file\n+ * COPYING for more details.\n+ *\n+ *\n+ * Reloads all modules - useful to reload calibration data.\n+ */\n+#include \"config.h\"\n+#include <stdlib.h>\n+#ifdef HAVE_UNISTD_H\n+#include <unistd.h>\n+#endif\n+#include <dlfcn.h>\n+\n+#include \"tslib-private.h\"\n+\n+int ts_reconfig(struct tsdev *ts)\n+{\n+\tvoid *handle;\n+\tint ret;\n+\tstruct tslib_module_info *info, *next;\n+\tint fd;\n+\t\n+\tinfo = ts->list;\n+\twhile(info) {\n+\t\t/* Save the \"next\" pointer now because info will be freed */\n+\t\tnext = info->next;\n+\t\t\n+\t\thandle = info->handle;\n+\t\tinfo->ops->fini(info);\n+\t\tif (handle)\n+\t\t\tdlclose(handle);\n+\t\t\n+\t\tinfo = next;\n+\t}\n+\n+\tfd = ts->fd;\t/* save temp */\n+\tmemset(ts, 0, sizeof(struct tsdev));\n+\tts->fd = fd;\n+\n+\tret = ts_config(ts);\n+\treturn ret;\n+}\ndiff --git a/src/tslib.h b/src/tslib.h\nindex df8e284..28156ba 100644\n--- a/src/tslib.h\n+++ b/src/tslib.h\n@@ -57,6 +57,11 @@ enum ts_param {\n TSAPI int ts_close(struct tsdev *);\n \n /*\n+ * Reloads all modules - useful to reload calibration data.\n+ */\n+TSAPI int ts_reconfig(struct tsdev *);\n+\n+/*\n  * Configure the touchscreen device.\n  */\n TSAPI int ts_config(struct tsdev *);\n\nFrom df81ed55ed9c99a8636f0b8524e0c5da0d00d33d Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Sun, 20 Sep 2015 10:45:55 +0200\nSubject: [PATCH 07/11] ts_uinput_touch: reload modules (and calibration data)\n automatically after calibration and on SIGHUP signal\n\n---\n tests/ts_uinput_touch.c | 67 +++++++++++++++++++++++++++++++++++--------------\n 1 file changed, 48 insertions(+), 19 deletions(-)\n\ndiff --git a/tests/ts_uinput_touch.c b/tests/ts_uinput_touch.c\nindex 489a22f..871c5e4 100755\n--- a/tests/ts_uinput_touch.c\n+++ b/tests/ts_uinput_touch.c\n@@ -74,6 +74,7 @@ typedef struct {\n   int a[7];\n } calibration;\n \n+struct tsdev *ts = NULL;\n char *uinput_names[] = {\"/dev/uinput\", \"/dev/input/uinput\", \"/dev/misc/uinput\"};\n #define UINPUT_NAMES_NUM ((int) (sizeof(uinput_names)/sizeof(char *)))\n \n@@ -99,7 +100,7 @@ static void daemonize() {\n     die(\"failed to become a session leader while daemonising(errno=%d)\", errno)\n   }\n \n-  signal(SIGHUP,SIG_IGN);\n+  /* signal(SIGHUP,SIG_IGN); */\n   pid=fork();\n   if (pid == -1) {\n     die(\"failed to fork while daemonizing (errno=%d)\", errno)\n@@ -129,7 +130,7 @@ static void daemonize() {\n   }\n }\n \n-static void sig(int sig)\n+static void signal_end(int sig)\n {\n   fflush(stderr);\n   printf(\"signal %d caught\\n\", sig);\n@@ -163,7 +164,15 @@ static int send_event(int fd, __u16 type, __u16 code, __s32 value)\n }\n \n static void signal_handler(int signal_number) {\n-  if (signal_number == SIGUSR1)\n+\tif (signal_number == SIGHUP) {\n+  \t/* reload modules (and calibration data) */\n+  \tprintf(\"signal handler %d, reconfig ts\\n\", signal_number);\n+  \tif (ts_reconfig(ts)) {\n+  \t  die(\"ts_reconfig\")\n+\t  }\n+\t  \n+\t  return;\n+\t} else if (signal_number == SIGUSR1)\n     calibration_mode = true;\n   else if (signal_number == SIGUSR2)\n     calibration_mode = false;\n@@ -366,25 +375,25 @@ static void run_calibration(struct tsdev *ts)\n \n int get_resolution(void)\n {\n-  static char *fbdevice;\n+  char *env_str;\n   int fd;\n   static struct fb_var_screeninfo var;\n \n-  fbdevice = getenv(\"TSLIB_FBDEVICE\");\n-  if (fbdevice == NULL)\n-    return -1;\n+  env_str = getenv(\"TSLIB_FBDEVICE\");\n+  if (env_str == NULL)\n+    goto not_found;\n \n-  printf(\"using fb device: %s\\n\", fbdevice);\n-  fd = open(fbdevice, O_RDWR);\n+  printf(\"using fb device: %s\\n\", env_str);\n+  fd = open(env_str, O_RDWR);\n   if (fd == -1) {\n     perror(\"open fbdevice\");\n-    return -1;\n+    goto not_found;\n   }\n \n   if (ioctl(fd, FBIOGET_VSCREENINFO, &var) < 0) {\n     perror(\"ioctl FBIOGET_VSCREENINFO\");\n     close(fd);\n-    return -1;\n+    goto not_found;\n   }\n \n   xres = var.xres;\n@@ -392,13 +401,28 @@ int get_resolution(void)\n \n   close(fd);\n   return 0;\n+\n+not_found:\n+\tenv_str = getenv(\"TSLIB_RES_X\");\n+\tif (env_str != NULL)\n+\t  xres = atoi(env_str);\n+\n+\tenv_str = getenv(\"TSLIB_RES_Y\");\n+\tif (env_str != NULL)\n+\t  yres = atoi(env_str);\n+\t\n+\tif (xres == 0 || yres == 0) {\n+\t\txres = yres = 0;\n+\t\treturn -1;\n+\t}\n+\t\n+\treturn 0;\n }\n \n int main(int argc, char *argv[])\n {\n   int c;\n   char *tsdevice;\n-  struct tsdev *ts;\n   int ret;\n   struct ts_sample samp;\n   int uinput_fd;\n@@ -423,7 +447,7 @@ int main(int argc, char *argv[])\n     }\n   }\n \n-  get_resolution();\n+  ret = get_resolution();\n \n   while ((c = getopt(argc, argv, \"?dt:x:y:\")) != -1) {\n     switch (c) {\n@@ -460,12 +484,11 @@ int main(int argc, char *argv[])\n \n   printf(\"resolution: %dx%d\\n\", xres, yres);\n \n-  signal(SIGSEGV, sig);\n-  signal(SIGINT, sig);\n-  signal(SIGTERM, sig);\n+  signal(SIGSEGV, signal_end);\n+  signal(SIGINT, signal_end);\n+  signal(SIGTERM, signal_end);\n \n   tsdevice = getenv(\"TSLIB_TSDEVICE\");\n-\n   if (tsdevice == NULL) {\n     errno = ENOENT;\n     die(\"error: TSLIB_TSDEVICE\")\n@@ -482,7 +505,7 @@ int main(int argc, char *argv[])\n     die(\"ts_config\")\n   }\n \n-  system(\"modprobe uinput\");\n+  ret = system(\"modprobe uinput\");\n \n   for (c=0; c < UINPUT_NAMES_NUM; c++) {\n     uinput_fd = open(uinput_names[c], O_WRONLY | O_NONBLOCK);\n@@ -505,6 +528,7 @@ int main(int argc, char *argv[])\n \n   memset (&sa, 0, sizeof (sa));\n   sa.sa_handler = &signal_handler;\n+  sigaction(SIGHUP, &sa, NULL);\n   sigaction(SIGUSR1, &sa, NULL);\n   sigaction(SIGUSR2, &sa, NULL);\n \n@@ -572,7 +596,12 @@ int main(int argc, char *argv[])\n       run_calibration(ts);\n       calibration_mode = false;\n       close(sock);\n-      printf(\"calibration mode finished\\n\");\n+      printf(\"calibration mode finished, reload plugins\\n\");\n+\n+      clearbuf(ts);\n+      if (ts_reconfig(ts)) {\n+        die(\"ts_reconfig\")\n+      }\n     }\n \n     ret = ts_read(ts, &samp, 1);\n\nFrom dbf1c882dbc239065df422f9e16da955c0b7653f Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Sun, 20 Sep 2015 10:47:44 +0200\nSubject: [PATCH 08/11] plugins: compile statically\n\n---\n plugins/Makefile.am    |  2 ++\n plugins/dmc-raw.c      |  6 +++++-\n plugins/plugins.h      |  5 ++++-\n plugins/touchkit-raw.c |  6 +++++-\n src/Makefile.am        | 12 ++++++++++++\n src/ts_load_module.c   | 12 ++++++++++++\n 6 files changed, 40 insertions(+), 3 deletions(-)\n\ndiff --git a/plugins/Makefile.am b/plugins/Makefile.am\nindex 98881b3..87fa18b 100644\n--- a/plugins/Makefile.am\n+++ b/plugins/Makefile.am\n@@ -194,6 +194,7 @@ tatung_la_LDFLAGS\t= -module $(LTVSN)\n \n dmc_la_SOURCES\t\t= dmc-raw.c\n dmc_la_LDFLAGS\t\t= -module $(LTVSN)\n+dmc_la_LIBADD\t\t\t= $(top_builddir)/src/libts.la\n \n input_la_SOURCES\t= input-raw.c\n input_la_LDFLAGS\t= -module $(LTVSN)\n@@ -205,6 +206,7 @@ galax_la_LIBADD = $(top_builddir)/src/libts.la\n \n touchkit_la_SOURCES\t= touchkit-raw.c\n touchkit_la_LDFLAGS\t= -module $(LTVSN)\n+touchkit_la_LIBADD\t= $(top_builddir)/src/libts.la\n \n linear_h2200_la_SOURCES\t= linear-h2200.c\n linear_h2200_la_LDFLAGS\t= -module $(LTVSN)\ndiff --git a/plugins/dmc-raw.c b/plugins/dmc-raw.c\nindex f9f5381..59980cc 100644\n--- a/plugins/dmc-raw.c\n+++ b/plugins/dmc-raw.c\n@@ -123,7 +123,7 @@ static const struct tslib_ops dmc_ops =\n \t.read\t= dmc_read,\n };\n \n-TSAPI struct tslib_module_info *mod_init(struct tsdev *dev, const char *params)\n+TSAPI struct tslib_module_info *dmc_mod_init(struct tsdev *dev, const char *params)\n {\n \tstruct tslib_dmc *m;\n \n@@ -137,3 +137,7 @@ TSAPI struct tslib_module_info *mod_init(struct tsdev *dev, const char *params)\n \tm->module.ops = &dmc_ops;\n \treturn (struct tslib_module_info*)m;\n }\n+\n+#ifndef TSLIB_STATIC_DMC_MODULE\n+\tTSLIB_MODULE_INIT(dmc_mod_init);\n+#endif\ndiff --git a/plugins/plugins.h b/plugins/plugins.h\nindex f347e25..798f9b3 100644\n--- a/plugins/plugins.h\n+++ b/plugins/plugins.h\n@@ -6,7 +6,6 @@ TSLIB_DECLARE_MODULE(dejitter);\n TSLIB_DECLARE_MODULE(linear_h2200);\n TSLIB_DECLARE_MODULE(variance);\n TSLIB_DECLARE_MODULE(pthres);\n-\n TSLIB_DECLARE_MODULE(ucb1x00);\n TSLIB_DECLARE_MODULE(corgi);\n TSLIB_DECLARE_MODULE(collie);\n@@ -16,5 +15,9 @@ TSLIB_DECLARE_MODULE(arctic2);\n TSLIB_DECLARE_MODULE(tatung);\n TSLIB_DECLARE_MODULE(input);\n TSLIB_DECLARE_MODULE(cy8mrln_palmpre);\n+TSLIB_DECLARE_MODULE(galax);\n+TSLIB_DECLARE_MODULE(dmc);\n+TSLIB_DECLARE_MODULE(touchkit);\n TSLIB_DECLARE_MODULE(st1232);\n TSLIB_DECLARE_MODULE(waveshare);\n+\ndiff --git a/plugins/touchkit-raw.c b/plugins/touchkit-raw.c\nindex e072f21..68179a3 100644\n--- a/plugins/touchkit-raw.c\n+++ b/plugins/touchkit-raw.c\n@@ -144,7 +144,7 @@ static const struct tslib_ops touchkit_ops = {\n \t.read = touchkit_read,\n };\n \n-TSAPI struct tslib_module_info *mod_init(struct tsdev *dev, const char *params)\n+TSAPI struct tslib_module_info *touchkit_mod_init(struct tsdev *dev, const char *params)\n {\n \tstruct tslib_module_info *m;\n \n@@ -155,3 +155,7 @@ TSAPI struct tslib_module_info *mod_init(struct tsdev *dev, const char *params)\n \tm->ops = &touchkit_ops;\n \treturn m;\n }\n+\n+#ifndef TSLIB_STATIC_TOUCHKIT_MODULE\n+\tTSLIB_MODULE_INIT(touchkit_mod_init);\n+#endif\ndiff --git a/src/Makefile.am b/src/Makefile.am\nindex 606a5ae..2f31519 100644\n--- a/src/Makefile.am\n+++ b/src/Makefile.am\n@@ -71,6 +71,18 @@ if ENABLE_STATIC_INPUT_MODULE\n libts_la_SOURCES += $(top_srcdir)/plugins/input-raw.c\n endif\n \n+if ENABLE_STATIC_DMC_MODULE\n+libts_la_SOURCES += $(top_srcdir)/plugins/dmc-raw.c\n+endif\n+\n+if ENABLE_STATIC_GALAX_MODULE\n+libts_la_SOURCES += $(top_srcdir)/plugins/galax-raw.c\n+endif\n+\n+if ENABLE_STATIC_TOUCHKIT_MODULE\n+libts_la_SOURCES += $(top_srcdir)/plugins/touchkit-raw.c\n+endif\n+\n if ENABLE_STATIC_ST1232_MODULE\n libts_la_SOURCES += $(top_srcdir)/plugins/st1232-raw.c\n endif\ndiff --git a/src/ts_load_module.c b/src/ts_load_module.c\nindex 886ca0a..903c921 100644\n--- a/src/ts_load_module.c\n+++ b/src/ts_load_module.c\n@@ -76,6 +76,18 @@ static const struct {\n #ifdef TSLIB_STATIC_ST1232_MODULE\n \t{ \"st1232\", st1232_mod_init },\n #endif\n+#ifdef TSLIB_STATIC_CY8MRLN_PALMPRE_MODULE\n+\t{ \"cy8mrln-palmpre\", cy8mrln_palmpre_mod_init },\n+#endif\n+#ifdef TSLIB_STATIC_DMC_MODULE\n+\t{ \"dmc\", dmc_mod_init },\n+#endif\n+#ifdef TSLIB_STATIC_TOUCHKIT_MODULE\n+\t{ \"touchkit\", touchkit_mod_init },\n+#endif\n+#ifdef TSLIB_STATIC_WAVESHARE_MODULE\n+\t{ \"waveshare\", waveshare_mod_init },\n+#endif\n };\n \n #define countof(arr) (sizeof(arr) / sizeof((arr)[0]))\n\nFrom 72d2fe9e2ff18a9589510fd28e485b238a7bcbff Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Mon, 21 Sep 2015 09:36:38 +0200\nSubject: [PATCH 09/11] file permission, tabs\n\n---\n plugins/Makefile.am     | 2 +-\n tests/ts_uinput_touch.c | 0\n 2 files changed, 1 insertion(+), 1 deletion(-)\n mode change 100755 => 100644 tests/ts_uinput_touch.c\n\ndiff --git a/plugins/Makefile.am b/plugins/Makefile.am\nindex 87fa18b..4ed04c1 100644\n--- a/plugins/Makefile.am\n+++ b/plugins/Makefile.am\n@@ -194,7 +194,7 @@ tatung_la_LDFLAGS\t= -module $(LTVSN)\n \n dmc_la_SOURCES\t\t= dmc-raw.c\n dmc_la_LDFLAGS\t\t= -module $(LTVSN)\n-dmc_la_LIBADD\t\t\t= $(top_builddir)/src/libts.la\n+dmc_la_LIBADD\t\t= $(top_builddir)/src/libts.la\n \n input_la_SOURCES\t= input-raw.c\n input_la_LDFLAGS\t= -module $(LTVSN)\ndiff --git a/tests/ts_uinput_touch.c b/tests/ts_uinput_touch.c\nold mode 100755\nnew mode 100644\n\nFrom aff635ded1b41ade1b2cf2203cdf30f7fcd61127 Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Sat, 10 Oct 2015 21:24:53 +0200\nSubject: [PATCH 10/11] ts_uinput_touch: remove button right event because it\n breaks scrollbar, context menu is open on few seconds tap\n\n---\n tests/ts_uinput_touch.c | 141 ++++++++++++------------------------------------\n 1 file changed, 35 insertions(+), 106 deletions(-)\n\ndiff --git a/tests/ts_uinput_touch.c b/tests/ts_uinput_touch.c\nindex 871c5e4..92db9ce 100644\n--- a/tests/ts_uinput_touch.c\n+++ b/tests/ts_uinput_touch.c\n@@ -9,9 +9,7 @@\n  *\n  *\n  * Takes tslib events and send them to uinput as\n- *   BTN_TOUCH, BTN_RIGHT, ABS_X, ABS_Y and ABS_PRESSURE values.\n- * Short tap send button touch event, little longer tap send button right event\n- *   and longer tap send only coordinates.\n+ *   ABS_X, ABS_Y, BTN_TOUCH and ABS_PRESSURE values.\n  * Tested only with Kodi application.\n  *\n  * code based on\n@@ -79,8 +77,6 @@ char *uinput_names[] = {\"/dev/uinput\", \"/dev/input/uinput\", \"/dev/misc/uinput\"};\n #define UINPUT_NAMES_NUM ((int) (sizeof(uinput_names)/sizeof(char *)))\n \n __u32 xres = 0, yres = 0;\n-struct timeval tv_short_tap = {0, 300};  /* sec, msec, short tap sends BTN_TOUCH */\n-struct timeval tv_right_tap = {1, 0};    /* sec, msec, longer tap sends BTN_RIGHT */\n bool calibration_mode = false;\n int sock = -1;\n \n@@ -164,15 +160,15 @@ static int send_event(int fd, __u16 type, __u16 code, __s32 value)\n }\n \n static void signal_handler(int signal_number) {\n-\tif (signal_number == SIGHUP) {\n-  \t/* reload modules (and calibration data) */\n-  \tprintf(\"signal handler %d, reconfig ts\\n\", signal_number);\n-  \tif (ts_reconfig(ts)) {\n-  \t  die(\"ts_reconfig\")\n-\t  }\n-\t  \n-\t  return;\n-\t} else if (signal_number == SIGUSR1)\n+  if (signal_number == SIGHUP) {\n+    /* reload modules (and calibration data) */\n+    printf(\"signal handler %d, reconfig ts\\n\", signal_number);\n+    if (ts_reconfig(ts)) {\n+      die(\"ts_reconfig\")\n+    }\n+\n+    return;\n+  } else if (signal_number == SIGUSR1)\n     calibration_mode = true;\n   else if (signal_number == SIGUSR2)\n     calibration_mode = false;\n@@ -403,20 +399,20 @@ int get_resolution(void)\n   return 0;\n \n not_found:\n-\tenv_str = getenv(\"TSLIB_RES_X\");\n-\tif (env_str != NULL)\n-\t  xres = atoi(env_str);\n-\n-\tenv_str = getenv(\"TSLIB_RES_Y\");\n-\tif (env_str != NULL)\n-\t  yres = atoi(env_str);\n-\t\n-\tif (xres == 0 || yres == 0) {\n-\t\txres = yres = 0;\n-\t\treturn -1;\n-\t}\n-\t\n-\treturn 0;\n+  env_str = getenv(\"TSLIB_RES_X\");\n+  if (env_str != NULL)\n+    xres = atoi(env_str);\n+\n+  env_str = getenv(\"TSLIB_RES_Y\");\n+  if (env_str != NULL)\n+    yres = atoi(env_str);\n+\n+  if (xres == 0 || yres == 0) {\n+    xres = yres = 0;\n+    return -1;\n+  }\n+\n+  return 0;\n }\n \n int main(int argc, char *argv[])\n@@ -428,43 +424,18 @@ int main(int argc, char *argv[])\n   int uinput_fd;\n   struct uinput_user_dev uidev;\n   int daemon = 0;\n-  struct timeval tv_last;\n-  struct timeval tv_sub;\n   char *touch_str;\n   int val;\n   struct sigaction sa;\n   struct sockaddr_un remote_addr;\n \n-  touch_str = getenv(\"TSLIB_TAP_TIME\");\n-  if (touch_str != NULL) {\n-    val = atoi(touch_str);\n-    if (val < 1000) {\n-      tv_short_tap.tv_sec = 0;\n-      tv_short_tap.tv_usec = val;\n-    } else {\n-      tv_short_tap.tv_sec = val / 1000;\n-      tv_short_tap.tv_usec = val % 1000;\n-    }\n-  }\n-\n   ret = get_resolution();\n \n-  while ((c = getopt(argc, argv, \"?dt:x:y:\")) != -1) {\n+  while ((c = getopt(argc, argv, \"?dx:y:\")) != -1) {\n     switch (c) {\n       case 'd':\n         daemon = 1;\n         break;\n-      case 't':\n-        val = atoi(optarg);\n-        if (val < 1000) {\n-          tv_short_tap.tv_sec = 0;\n-          tv_short_tap.tv_usec = val;\n-        } else {\n-          tv_short_tap.tv_sec = val / 1000;\n-          tv_short_tap.tv_usec = val % 1000;\n-        }\n-\n-        break;\n       case 'x':\n         xres = atoi(optarg);\n         break;\n@@ -516,16 +487,6 @@ int main(int argc, char *argv[])\n   if (uinput_fd < 0)\n     die(\"error: opening uinput\")\n \n-  if (tv_short_tap.tv_sec == 0)\n-    printf(\"Short tap time: %li msec\\n\", tv_short_tap.tv_usec);\n-  else\n-    printf(\"Short tap time: %li.%li sec\\n\", tv_short_tap.tv_sec, tv_short_tap.tv_usec);\n-\n-  if (tv_right_tap.tv_sec == 0)\n-    printf(\"Right tap time: %li msec\\n\", tv_right_tap.tv_usec);\n-  else\n-    printf(\"Right tap time: %li.%li sec\\n\", tv_right_tap.tv_sec, tv_right_tap.tv_usec);\n-\n   memset (&sa, 0, sizeof (sa));\n   sa.sa_handler = &signal_handler;\n   sigaction(SIGHUP, &sa, NULL);\n@@ -540,7 +501,6 @@ int main(int argc, char *argv[])\n   set_ioctl(uinput_fd, UI_SET_EVBIT,  EV_SYN);\n   set_ioctl(uinput_fd, UI_SET_EVBIT,  EV_KEY);\n   set_ioctl(uinput_fd, UI_SET_KEYBIT, BTN_TOUCH);\n-  set_ioctl(uinput_fd, UI_SET_KEYBIT, BTN_RIGHT);\n   set_ioctl(uinput_fd, UI_SET_EVBIT,  EV_ABS);\n   set_ioctl(uinput_fd, UI_SET_ABSBIT, ABS_X);\n   set_ioctl(uinput_fd, UI_SET_ABSBIT, ABS_Y);\n@@ -564,12 +524,7 @@ int main(int argc, char *argv[])\n   if (ioctl(uinput_fd, UI_DEV_CREATE) < 0)\n     die(\"error: ioctl UI_DEV_CREATE\")\n \n-  tv_short_tap.tv_usec *= 1000;   /* msec to usec */\n-  tv_right_tap.tv_usec *= 1000;   /* msec to usec */\n-\n-  timerclear(&tv_last);\n   while (1) {\n-    touch_str = \"\";\n     if (calibration_mode) {\n       usleep(250000);   /* app become ready */\n       printf(\"calibration mode started\\n\");\n@@ -614,44 +569,18 @@ int main(int argc, char *argv[])\n     } else if (ret != 1)\n       continue;\n \n-    send_event(uinput_fd, EV_ABS, ABS_X, samp.x);\n-    send_event(uinput_fd, EV_ABS, ABS_Y, samp.y);\n-\n-    if (samp.pressure > 0) {  /* touched */\n+    if (samp.pressure > 0) {\n+      touch_str = \"touched\";\n+      send_event(uinput_fd, EV_ABS, ABS_X, samp.x);\n+      send_event(uinput_fd, EV_ABS, ABS_Y, samp.y);\n       send_event(uinput_fd, EV_ABS, ABS_PRESSURE, 255);\n+      send_event(uinput_fd, EV_KEY, BTN_TOUCH, 1);\n+      send_event(uinput_fd, EV_SYN, 0, 0);\n+    } else {\n+      touch_str = \"released\";\n+      send_event(uinput_fd, EV_ABS, ABS_PRESSURE, 0);\n+      send_event(uinput_fd, EV_KEY, BTN_TOUCH, 0);\n       send_event(uinput_fd, EV_SYN, 0, 0);\n-\n-      if (timerisset(&tv_last) == false) {\n-        memcpy(&tv_last, &samp.tv, sizeof(struct timeval)); /* touched first time */\n-        touch_str = \"touched first\";\n-      }\n-    } else {  /* released */\n-      timersub(&samp.tv, &tv_last, &tv_sub);\n-      if (timercmp(&tv_sub, &tv_short_tap, <=)) {\n-        send_event(uinput_fd, EV_ABS, ABS_PRESSURE, 255);\n-        send_event(uinput_fd, EV_KEY, BTN_TOUCH, 1);\n-        send_event(uinput_fd, EV_SYN, 0, 0);\n-        send_event(uinput_fd, EV_ABS, ABS_PRESSURE, 0);\n-        send_event(uinput_fd, EV_KEY, BTN_TOUCH, 0);\n-        send_event(uinput_fd, EV_SYN, 0, 0);\n-\n-        touch_str = \"released and send tap\";\n-      } else if (timercmp(&tv_sub, &tv_right_tap, <=)) {\n-        send_event(uinput_fd, EV_ABS, ABS_PRESSURE, 255);\n-        send_event(uinput_fd, EV_KEY, BTN_RIGHT, 1);\n-        send_event(uinput_fd, EV_SYN, 0, 0);\n-        send_event(uinput_fd, EV_ABS, ABS_PRESSURE, 0);\n-        send_event(uinput_fd, EV_KEY, BTN_RIGHT, 0);\n-        send_event(uinput_fd, EV_SYN, 0, 0);\n-\n-        touch_str = \"released and send right\";\n-      } else {\n-        send_event(uinput_fd, EV_ABS, ABS_PRESSURE, 0);\n-        send_event(uinput_fd, EV_SYN, 0, 0);\n-        touch_str = \"released\";\n-      }\n-\n-      timerclear(&tv_last);\n     }\n \n     printf(\"%ld.%06ld: %6d %6d %6d  %s\\n\", samp.tv.tv_sec, samp.tv.tv_usec,\n\nFrom a5f00518cfe38002c47895424eda26746711a0da Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Tue, 24 Nov 2015 13:28:51 +0100\nSubject: [PATCH 11/11] ts_uinput_touch: move cursor out of display after\n touched\n\n---\n tests/ts_uinput_touch.c | 37 +++++++++++++++++++++++++++++++++++++\n 1 file changed, 37 insertions(+)\n\ndiff --git a/tests/ts_uinput_touch.c b/tests/ts_uinput_touch.c\nindex 92db9ce..8280b18 100644\n--- a/tests/ts_uinput_touch.c\n+++ b/tests/ts_uinput_touch.c\n@@ -415,6 +415,22 @@ int get_resolution(void)\n   return 0;\n }\n \n+int get_touch_home_time(void)\n+{\n+  char *env_str;\n+  int touch_home_time = 0;\n+\n+  env_str = getenv(\"TSLIB_TOUCH_HOME_TIME\");\n+  if (env_str != NULL) {\n+    touch_home_time = atoi(env_str);\n+    if (touch_home_time < 0 || touch_home_time > 5000)\n+      touch_home_time = 100;  /*  100 msec */\n+  }\n+\n+  touch_home_time *= 1000;  /* msec to usec */\n+  return touch_home_time;\n+}\n+\n int main(int argc, char *argv[])\n {\n   int c;\n@@ -424,11 +440,25 @@ int main(int argc, char *argv[])\n   int uinput_fd;\n   struct uinput_user_dev uidev;\n   int daemon = 0;\n+  int touch_home_time = 0;\n   char *touch_str;\n   int val;\n   struct sigaction sa;\n   struct sockaddr_un remote_addr;\n \n+  printf(\"\\nts_uinput_touch environment variables:\\n\");\n+  printf(\"       TSLIB_TSDEVICE: '%s'\\n\", getenv(\"TSLIB_TSDEVICE\"));\n+  printf(\"      TSLIB_PLUGINDIR: '%s'\\n\", getenv(\"TSLIB_PLUGINDIR\"));\n+  printf(\"  TSLIB_CONSOLEDEVICE: '%s'\\n\", getenv(\"TSLIB_CONSOLEDEVICE\"));\n+  printf(\"       TSLIB_FBDEVICE: '%s'\\n\", getenv(\"TSLIB_FBDEVICE\"));\n+  printf(\"      TSLIB_CALIBFILE: '%s'\\n\", getenv(\"TSLIB_CALIBFILE\"));\n+  printf(\"       TSLIB_CONFFILE: '%s'\\n\", getenv(\"TSLIB_CONFFILE\"));\n+  printf(\"          TSLIB_RES_X: '%s'\\n\", getenv(\"TSLIB_RES_X\"));\n+  printf(\"          TSLIB_RES_Y: '%s'\\n\", getenv(\"TSLIB_RES_Y\"));\n+  printf(\"TSLIB_TOUCH_HOME_TIME: '%s'\\n\", getenv(\"TSLIB_TOUCH_HOME_TIME\"));\n+  printf(\"\\n\");\n+\n+  touch_home_time = get_touch_home_time();\n   ret = get_resolution();\n \n   while ((c = getopt(argc, argv, \"?dx:y:\")) != -1) {\n@@ -581,6 +611,13 @@ int main(int argc, char *argv[])\n       send_event(uinput_fd, EV_ABS, ABS_PRESSURE, 0);\n       send_event(uinput_fd, EV_KEY, BTN_TOUCH, 0);\n       send_event(uinput_fd, EV_SYN, 0, 0);\n+\n+      if (touch_home_time > 0) {\n+        usleep(touch_home_time);   /* short delay for kodi */\n+        send_event(uinput_fd, EV_ABS, ABS_X, -50);  /* hide cursor */\n+        send_event(uinput_fd, EV_ABS, ABS_Y, -50);\n+        send_event(uinput_fd, EV_SYN, 0, 0);\n+      }\n     }\n \n     printf(\"%ld.%06ld: %6d %6d %6d  %s\\n\", samp.tv.tv_sec, samp.tv.tv_usec,\n"
  },
  {
    "path": "packages/addons/addon-depends/tslib/patches/tslib-20-fbutils_fix_x64_execution.patch",
    "content": "From c4c59790f3191c1a233fc1a61f8fedad85de1aeb Mon Sep 17 00:00:00 2001\nFrom: Peter Fink <pfink@christ-es.de>\nDate: Wed, 8 Feb 2017 14:04:45 +0100\nSubject: [PATCH] fbutils: Fix x64 execution. Call malloc not with a hardcoded\n sizeof(__u32). This caused the application to crash with segfaults on x64\n machines.\n\n---\n tests/fbutils.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/tests/fbutils.c b/tests/fbutils.c\nindex 8ee494bc..fd7fbfe9 100644\n--- a/tests/fbutils.c\n+++ b/tests/fbutils.c\n@@ -138,7 +138,7 @@ int open_framebuffer(void)\n \tmemset(fbuffer,0,fix.smem_len);\n \n \tbytes_per_pixel = (var.bits_per_pixel + 7) / 8;\n-\tline_addr = malloc (sizeof (__u32) * var.yres_virtual);\n+\tline_addr = malloc (sizeof (line_addr) * var.yres_virtual);\n \taddr = 0;\n \tfor (y = 0; y < var.yres_virtual; y++, addr += fix.line_length)\n \t\tline_addr [y] = fbuffer + addr;\n"
  },
  {
    "path": "packages/addons/addon-depends/tslib/patches/tslib-30-support-time-bits-64.patch",
    "content": "--- a/plugins/galax-raw.c\t2022-07-21 15:46:14.666220340 +0000\n+++ b/plugins/galax-raw.c\t2022-07-22 01:11:26.708402821 +0000\n@@ -198,7 +198,8 @@\n \t\t\t\tsamp->x = i->current_x;\n \t\t\t\tsamp->y = i->current_y;\n \t\t\t\tsamp->pressure = i->current_p;\n-\t\t\t\tsamp->tv = ev.time;\n+\t\t\t\tsamp->tv.tv_sec = ev.input_event_sec;\n+\t\t\t\tsamp->tv.tv_usec = ev.input_event_usec;\n \t\t\t\tsamp++;\n \t\t\t\ttotal++;\n \t\t\t\tbreak;\n--- a/plugins/input-raw.c\t2013-08-08 00:23:04.000000000 +0000\n+++ b/plugins/input-raw.c\t2022-07-22 01:30:41.417546206 +0000\n@@ -179,7 +179,8 @@\n \t\t\t\t\t\tsamp->y = i->current_y;\n \t\t\t\t\t\tsamp->pressure = i->current_p;\n \t\t\t\t}\n-\t\t\t\tsamp->tv = ev.time;\n+\t\t\t\tsamp->tv.tv_sec = ev.input_event_sec;\n+\t\t\t\tsamp->tv.tv_usec = ev.input_event_usec;\n \t#ifdef DEBUG\n \t\t\t\tfprintf(stderr, \"RAW---------------------> %d %d %d %d.%d\\n\",\n \t\t\t\t\t\tsamp->x, samp->y, samp->pressure, samp->tv.tv_sec,\n@@ -262,7 +263,8 @@\n \t\t\t\t\tsamp->pressure = i->current_p = ev.value;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n-\t\t\t\tsamp->tv = ev.time;\n+\t\t\t\tsamp->tv.tv_sec = ev.input_event_sec;\n+\t\t\t\tsamp->tv.tv_usec = ev.input_event_usec;\n \t#ifdef DEBUG\n \t\t\t\tfprintf(stderr, \"RAW---------------------------> %d %d %d\\n\",\n \t\t\t\t\tsamp->x, samp->y, samp->pressure);\n@@ -278,7 +280,8 @@\n \t\t\t\t\t\tsamp->x = 0;\n \t\t\t\t\t\tsamp->y = 0;\n \t\t\t\t\t\tsamp->pressure = 0;\n-\t\t\t\t\t\tsamp->tv = ev.time;\n+\t\t\t\t\t\tsamp->tv.tv_sec = ev.input_event_sec;\n+\t\t\t\t\t\tsamp->tv.tv_usec = ev.input_event_usec;\n \t\t\t\t\t\tsamp++;\n \t\t\t\t\t\ttotal++;\n \t\t\t\t\t}\n--- a/plugins/st1232-raw.c\t2022-07-22 01:31:02.757483058 +0000\n+++ b/plugins/st1232-raw.c\t2022-07-22 01:27:40.174757983 +0000\n@@ -162,7 +162,8 @@\n \t\t\t\t\t\tsamp->x = i->current_x;\n \t\t\t\t\t\tsamp->y = i->current_y;\n \t\t\t\t\t\tsamp->pressure = i->current_p;\t/* is 0 on finger released */\n-\t\t\t\t\t\tsamp->tv = ev.time;\n+\t\t\t\t\t\tsamp->tv.tv_sec = ev.input_event_sec;\n+\t\t\t\t\t\tsamp->tv.tv_usec = ev.input_event_usec;\n       \t\n \t\t\t\t\t\ti->current_p = 0;\t\t/* will be set again when getting xy cordinate */\t\t\t\t\t\n \t\t\t\t\t\tsamp++;\n"
  },
  {
    "path": "packages/addons/addon-depends/ttyd-depends/libuv/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libuv\"\nPKG_VERSION=\"1.44.2\"\nPKG_SHA256=\"e6e2ba8b4c349a4182a33370bb9be5e23c51b32efb9b9e209d0e8556b73a48da\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/libuv/libuv\"\nPKG_URL=\"https://github.com/libuv/libuv/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Multi-platform support library with a focus on asynchronous I/O\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DLIBUV_BUILD_TESTS=OFF\"\n"
  },
  {
    "path": "packages/addons/addon-depends/ttyd-depends/libwebsockets/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libwebsockets\"\nPKG_VERSION=\"4.3.2\"\nPKG_SHA256=\"6a85a1bccf25acc7e8e5383e4934c9b32a102880d1e4c37c70b27ae2a42406e1\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://libwebsockets.org\"\nPKG_URL=\"https://github.com/warmcat/libwebsockets/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain openssl json-c libuv\"\nPKG_LONGDESC=\"Library for implementing network protocols with a tiny footprint.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DLWS_WITH_LIBUV=ON \\\n                       -DLWS_WITHOUT_TESTAPPS=ON\"\n"
  },
  {
    "path": "packages/addons/addon-depends/tvh-dtv-scan-tables/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tvh-dtv-scan-tables\"\nPKG_VERSION=\"e3138a506a064f6dfd0639d69f383e8e576609da\"\nPKG_SHA256=\"b055e1f91dec43ba268b0feafac1dd23c1ca37613cc429c4be74c0c2606ad253\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/tvheadend\"\nPKG_URL=\"https://github.com/tvheadend/dtv-scan-tables/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Digital TV scan tables, a fork from Tvh to support more recent tables.\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nmakeinstall_target() {\n  make install DATADIR=${INSTALL}/usr/share\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2011 Anthony Nash (nash.ant@gmail.com)\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr\"\nPKG_VERSION=\"2.6.3\"\nPKG_SHA256=\"3db99b7ebbc0a60b72b191785af27efd49385bd08ef9fb7a8a83694323954ccf\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.tvdr.de\"\nPKG_URL=\"http://git.tvdr.de/?p=vdr.git;a=snapshot;h=refs/tags/${PKG_VERSION};sf=tbz2\"\nPKG_SOURCE_NAME=\"${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain bzip2 fontconfig freetype libcap libiconv libjpeg-turbo\"\nPKG_LONGDESC=\"A DVB TV server application.\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  rm -rf ${PKG_BUILD}/PLUGINS/src/skincurses\n}\n\npre_configure_target() {\n  export LDFLAGS=\"$(echo ${LDFLAGS} | sed -e \"s|-Wl,--as-needed||\") -L${SYSROOT_PREFIX}/usr/lib/iconv\"\n}\n\npre_make_target() {\n  cat > Make.config <<EOF\n  PLUGINLIBDIR = /usr/lib/vdr\n  PREFIX = /usr\n  VIDEODIR = /storage/videos\n  CONFDIR = /storage/.config/vdr\n  LOCDIR = ./locale\n  LIBS += -liconv\n  NO_KBD=yes\n  VDR_USER=root\nEOF\n}\n\nmake_target() {\n  make vdr vdr.pc\n  make LOCDIR=./dummylocale install-i18n\n  make include-dir\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr/patches/vdr-01-decrease-channels.conf-autosave-delay.patch",
    "content": "From: Stefan Saraev <stefan@saraev.ca>\nSubject: [PATCH] decrease channels.conf autosave delay\n\n--- a/vdr.c\n+++ b/vdr.c\n@@ -80,7 +80,7 @@\n #define SHUTDOWNCANCELPROMPT   5 // seconds to wait in user prompt to allow canceling shutdown\n #define RESTARTCANCELPROMPT    5 // seconds to wait in user prompt before restarting on SIGHUP\n #define MANUALSTART          600 // seconds the next timer must be in the future to assume manual start\n-#define CHANNELSAVEDELTA     600 // seconds before saving channels.conf after automatic modifications\n+#define CHANNELSAVEDELTA     120 // seconds before saving channels.conf after automatic modifications\n #define DEVICEREADYTIMEOUT    30 // seconds to wait until all devices are ready\n #define MENUTIMEOUT          120 // seconds of user inactivity after which an OSD display is closed\n #define TIMERCHECKDELTA       10 // seconds between checks for timers that need to see their channel\n\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr/patches/vdr-02-disable-logspam.patch",
    "content": "remove logspam\nERROR: no OSD provider available - using dummy OSD!\n\n--- a/osd.c\n+++ b/osd.c\n@@ -2029,8 +2029,6 @@ cOsd *cOsdProvider::NewOsd(int Left, int Top, uint Level)\n         }\n      return Osd;\n      }\n-  else\n-     esyslog(\"ERROR: no OSD provider available - using dummy OSD!\");\n   return new cOsd(Left, Top, 999); // create a dummy cOsd, so that access won't result in a segfault\n }\n \n--- a/vdr.c\n+++ b/vdr.c\n@@ -784,11 +784,6 @@ int main(int argc, char *argv[])\n   Folders.Load(AddDirectory(ConfigDirectory, \"folders.conf\"));\n   CamResponsesLoad(AddDirectory(ConfigDirectory, \"camresponses.conf\"), true);\n \n-  if (!*cFont::GetFontFileName(Setup.FontOsd)) {\n-     const char *msg = \"no fonts available - OSD will not show any text!\";\n-     fprintf(stderr, \"vdr: %s\\n\", msg);\n-     esyslog(\"ERROR: %s\", msg);\n-     }\n \n   // Recordings:\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-ddci2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-ddci2\"\nPKG_VERSION=\"05dd98824092859afd2aa7a4996c8f258affd975\"\nPKG_SHA256=\"b8ed2787e9140eb00a68397eaeb14862ba88a6e73480dc3220a098faffb14833\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/jasmin-j/vdr-plugin-ddci2\"\nPKG_URL=\"https://github.com/jasmin-j/vdr-plugin-ddci2/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr)\"\nPKG_LONGDESC=\"Support for stand alone CI by Digital Devices.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  export PKG_CONFIG_PATH=${VDR_DIR}:${PKG_CONFIG_PATH}\n  export CPLUS_INCLUDE_PATH=${VDR_DIR}/include\n\n  make \\\n    LIBDIR=\".\" \\\n    LOCDIR=\"./locale\" \\\n    all\n}\n\npost_make_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  VDR_APIVERSION=$(sed -ne '/define APIVERSION/s/^.*\"\\(.*\\)\".*$/\\1/p' ${VDR_DIR}/config.h)\n  LIB_NAME=lib${PKG_NAME/-plugin/}\n\n  cp --remove-destination ${PKG_BUILD}/${LIB_NAME}.so ${PKG_BUILD}/${LIB_NAME}.so.${VDR_APIVERSION}\n  ${STRIP} libvdr-*.so*\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-dummydevice/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-dummydevice\"\nPKG_VERSION=\"2.0.0\"\nPKG_SHA256=\"5c0049824415bd463d3abc728a3136ee064b60a37b5d3a1986cf282b0d757085\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.vdr-wiki.de/wiki/index.php/Dummydevice-plugin\"\nPKG_URL=\"http://phivdr.dyndns.org/vdr/vdr-dummydevice/${PKG_NAME/-plugin/}-${PKG_VERSION}.tgz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr)\"\nPKG_LONGDESC=\"This plugin can be used to run vdr as recording server without any output devices.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  export PKG_CONFIG_PATH=${VDR_DIR}:${PKG_CONFIG_PATH}\n  export CPLUS_INCLUDE_PATH=${VDR_DIR}/include\n\n  make \\\n    LIBDIR=\".\" \\\n    LOCDIR=\"./locale\" \\\n    all install-i18n\n}\n\npost_make_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  VDR_APIVERSION=$(sed -ne '/define APIVERSION/s/^.*\"\\(.*\\)\".*$/\\1/p' ${VDR_DIR}/config.h)\n  LIB_NAME=lib${PKG_NAME/-plugin/}\n\n  cp --remove-destination ${LIB_NAME}.so ${LIB_NAME}.so.${VDR_APIVERSION}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-dvbapi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-dvbapi\"\nPKG_VERSION=\"197e7524e563923d4b86e74a121f7174373818d9\"\nPKG_SHA256=\"6eee60d524c185f1f72c4413e79a80619934508b75aa27f213b2f481182ec6fb\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/manio/vdr-plugin-dvbapi\"\nPKG_URL=\"https://github.com/manio/vdr-plugin-dvbapi/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr libdvbcsa\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr)\"\nPKG_LONGDESC=\"VDR dvbapi plugin for use with OSCam\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  export PKG_CONFIG_PATH=${VDR_DIR}:${PKG_CONFIG_PATH}\n  export CPLUS_INCLUDE_PATH=${VDR_DIR}/include\n\n  make \\\n    LIBDIR=\".\" \\\n    LOCDIR=\"./locale\" \\\n    LIBDVBCSA=1 \\\n    all install-i18n\n}\n\npost_make_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  VDR_APIVERSION=$(sed -ne '/define APIVERSION/s/^.*\"\\(.*\\)\".*$/\\1/p' ${VDR_DIR}/config.h)\n  LIB_NAME=lib${PKG_NAME/-plugin/}\n\n  cp --remove-destination ${PKG_BUILD}/${LIB_NAME}.so ${PKG_BUILD}/${LIB_NAME}.so.${VDR_APIVERSION}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-dvbapi/patches/vdr-plugin-dvbapi-01_crosscompiling.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -136,7 +136,7 @@ $(SOFILE): $(OBJS) $(FFDECSA)\n ifndef LIBDVBCSA\n $(FFDECSA): $(FFDECSADIR)/*.c $(FFDECSADIR)/*.h\n \t@echo CC $@\n-\t$(Q)@$(MAKE) COMPILER=\"$(CXX)\" FLAGS=\"$(CXXFLAGS) $(LDFLAGS) $(CSAFLAGS)\" PARALLEL_MODE=$(PARALLEL) -C $(FFDECSADIR) all\n+\t$(Q)@$(MAKE) COMPILER=\"$(CXX)\" FLAGS=\"$(CXXFLAGS) $(LDFLAGS) $(CSAFLAGS)\" PARALLEL_MODE=$(PARALLEL) -C $(FFDECSADIR) FFdecsa.o\n endif\n \n install-lib: $(SOFILE)\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-eepg/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-eepg\"\nPKG_VERSION=\"6be7f2ee644aa33bd6e6e038548be8a85514272e\"\nPKG_SHA256=\"f8698d8e72c4e1239a57ba4a0b2f54020270506d5dce7298f3080fcc8d59f56f\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://projects.vdr-developer.org/projects/plg-eepg\"\nPKG_URL=\"https://github.com/vdr-projects/vdr-plugin-eepg/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr)\"\nPKG_LONGDESC=\"This plugin parses the Extended EPG data which is send by providers on their portal channels.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  export PKG_CONFIG_PATH=${VDR_DIR}:${PKG_CONFIG_PATH}\n  export CPLUS_INCLUDE_PATH=${VDR_DIR}/include\n\n  make \\\n    LIBDIR=\".\" \\\n    LOCDIR=\"./locale\" \\\n    all install-i18n\n}\n\npost_make_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  VDR_APIVERSION=$(sed -ne '/define APIVERSION/s/^.*\"\\(.*\\)\".*$/\\1/p' ${VDR_DIR}/config.h)\n  LIB_NAME=lib${PKG_NAME/-plugin/}\n\n  cp --remove-destination ${PKG_BUILD}/${LIB_NAME}.so ${PKG_BUILD}/${LIB_NAME}.so.${VDR_APIVERSION}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-epgfixer/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-epgfixer\"\nPKG_VERSION=\"354f28b0112ba27f08f6509243b410899f74b6ed\"\nPKG_SHA256=\"15bd73116f3bda9afc274bee97eff829b98f38b13043be32d7bb7f81af294715\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://projects.vdr-developer.org/projects/plg-epgfixer\"\nPKG_URL=\"https://github.com/vdr-projects/vdr-plugin-epgfixer/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr pcre\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr)\"\nPKG_LONGDESC=\"Plugin for modifying EPG data using regular expressions.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  export PKG_CONFIG_PATH=${VDR_DIR}:${PKG_CONFIG_PATH}\n  export CPLUS_INCLUDE_PATH=${VDR_DIR}/include\n\n  make \\\n    LIBDIR=\".\" \\\n    LOCDIR=\"./locale\" \\\n    all install-i18n\n}\n\npost_make_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  VDR_APIVERSION=$(sed -ne '/define APIVERSION/s/^.*\"\\(.*\\)\".*$/\\1/p' ${VDR_DIR}/config.h)\n  LIB_NAME=lib${PKG_NAME/-plugin/}\n\n  cp --remove-destination ${PKG_BUILD}/${LIB_NAME}.so ${PKG_BUILD}/${LIB_NAME}.so.${VDR_APIVERSION}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-epgsearch/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-epgsearch\"\nPKG_VERSION=\"cff8dfe58853aa0cc4f6e9a8896104a920b98730\"\nPKG_SHA256=\"ad6521003ab41b76ba22cac3b086901700ed2b46ea3d48f71d28b0545cf17e94\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://winni.vdr-developer.org/epgsearch/\"\nPKG_URL=\"https://github.com/vdr-projects/vdr-plugin-epgsearch/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr pcre\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr)\"\nPKG_LONGDESC=\"EPGSearch is a plugin for the Video-Disc-Recorder (VDR).\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  export PKG_CONFIG_PATH=${VDR_DIR}:${PKG_CONFIG_PATH}\n  export CPLUS_INCLUDE_PATH=${VDR_DIR}/include\n\n  make \\\n    LIBDIR=\".\" \\\n    LOCDIR=\"./locale\" \\\n    all install-i18n\n}\n\npost_make_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  VDR_APIVERSION=$(sed -ne '/define APIVERSION/s/^.*\"\\(.*\\)\".*$/\\1/p' ${VDR_DIR}/config.h)\n  LIB_NAME=lib${PKG_NAME/-plugin/}\n\n  cp --remove-destination ${PKG_BUILD}/${LIB_NAME}.so ${PKG_BUILD}/${LIB_NAME}.so.${VDR_APIVERSION}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-epgsearch/patches/vdr-plugin-epgsearch-02_don-t-build-unused-plugins.patch",
    "content": "From: Stefan Saraev <stefan@saraev.ca>\nSubject: [PATCH] don't build unused plugins\n\n--- a/Makefile\n+++ b/Makefile\n@@ -16,9 +16,9 @@\n ### edit one of these lines to '1', if you don't want the addon epgsearchonly, \n ### conflictcheckonly or quickepgsearch\n \n-WITHOUT_EPGSEARCHONLY=0\n-WITHOUT_CONFLICTCHECKONLY=0\n-WITHOUT_QUICKSEARCH=0\n+WITHOUT_EPGSEARCHONLY=1\n+WITHOUT_CONFLICTCHECKONLY=1\n+WITHOUT_QUICKSEARCH=1\n \n ### edit this to '0' if you don't want epgsearch to auto config itself\n AUTOCONFIG=1\n\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-epgsearch/patches/vdr-plugin-epgsearch-03-no_docs.patch",
    "content": "--- a/Makefile\t2021-01-13 00:12:27.752044046 +0100\n+++ b/Makefile\t2021-01-13 00:24:08.199000066 +0100\n@@ -184,7 +184,7 @@ LIBS4    =\n \n ### The main target:\n \n-all: $(ALL) i18n docs\n+all: $(ALL) i18n\n \n ### Implicit rules:\n \n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-iptv/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-iptv\"\nPKG_VERSION=\"f7369c9578c1437c7a19cf11e21424844f42a341\"\nPKG_SHA256=\"9045ec034182d19535ab3478152ef6a7fd2640478c78d697d2f2c93f11482316\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.saunalahti.fi/~rahrenbe/vdr/iptv/\"\nPKG_URL=\"https://github.com/rofafor/vdr-plugin-iptv/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr curl\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr)\"\nPKG_LONGDESC=\"vdr-iptv is an IPTV plugin for the Video Disk Recorder (VDR)\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  export PKG_CONFIG_PATH=${VDR_DIR}:${PKG_CONFIG_PATH}\n  export CPLUS_INCLUDE_PATH=${VDR_DIR}/include\n\n  make \\\n    LIBDIR=\".\" \\\n    LOCDIR=\"./locale\" \\\n    all install-i18n\n}\n\npost_make_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  VDR_APIVERSION=$(sed -ne '/define APIVERSION/s/^.*\"\\(.*\\)\".*$/\\1/p' ${VDR_DIR}/config.h)\n  LIB_NAME=lib${PKG_NAME/-plugin/}\n\n  cp --remove-destination ${PKG_BUILD}/${LIB_NAME}.so ${PKG_BUILD}/${LIB_NAME}.so.${VDR_APIVERSION}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-live/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-live\"\nPKG_VERSION=\"3.1.6\"\nPKG_SHA256=\"8231f22d397b6cc954615304a12319fb74553aa67fbf12536b1df6727f69b8a2\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://live.vdr-developer.org/en/index.php\"\nPKG_URL=\"https://github.com/MarkusEh/vdr-plugin-live/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr tntnet pcre2:host pcre2\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr)\"\nPKG_LONGDESC=\"Allows a comfortable operation of VDR and some of its plugins through a web interface.\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"+pic -parallel\"\n\npre_configure_target() {\n  export LDFLAGS=\"${LDFLAGS} -L${SYSROOT_PREFIX}/usr/lib/iconv\"\n}\n\nmake_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  export CPLUS_INCLUDE_PATH=${VDR_DIR}/include\n  VDR_APIVERSION=$(sed -ne '/define APIVERSION/s/^.*\"\\(.*\\)\".*$/\\1/p' ${VDR_DIR}/config.h)\n  LIB_NAME=lib${PKG_NAME/-plugin/}\n\n  make VDRDIR=${VDR_DIR} \\\n    LIBDIR=\".\" \\\n    LOCALEDIR=\"./locale\" \\\n    all install-i18n\n\n  cp --remove-destination ${PKG_BUILD}/${LIB_NAME}.so ${PKG_BUILD}/${LIB_NAME}.so.${VDR_APIVERSION}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-restfulapi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-restfulapi\"\nPKG_VERSION=\"0.2.6.6\"\nPKG_SHA256=\"a392c8ac9da58bce06674208711a786209ce802e77f93b48d21e424fa79f5eba\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/yavdr/vdr-plugin-restfulapi\"\nPKG_URL=\"https://github.com/yavdr/${PKG_NAME}/archive/refs/tags/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr cxxtools vdr-plugin-wirbelscan\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr) $(get_pkg_directory vdr-plugin-wirbelscan)\"\nPKG_LONGDESC=\"Allows to access many internals of the VDR via a restful API.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_build_target() {\n  cp $(get_build_dir vdr-plugin-wirbelscan)/wirbelscan_services.h ${PKG_BUILD}/wirbelscan/\n}\n\nmake_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  export PKG_CONFIG_PATH=${VDR_DIR}:${PKG_CONFIG_PATH}\n  export CPLUS_INCLUDE_PATH=${VDR_DIR}/include\n\n  make \\\n    LIBDIR=\".\" \\\n    LOCDIR=\"./locale\" \\\n    all install-i18n \\\n    USE_LIBMAGICKPLUSPLUS=0\n}\n\npost_make_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  VDR_APIVERSION=$(sed -ne '/define APIVERSION/s/^.*\"\\(.*\\)\".*$/\\1/p' ${VDR_DIR}/config.h)\n  LIB_NAME=lib${PKG_NAME/-plugin/}\n\n  cp --remove-destination ${PKG_BUILD}/${LIB_NAME}.so ${PKG_BUILD}/${LIB_NAME}.so.${VDR_APIVERSION}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-restfulapi/patches/vdr-plugin-restfulapi-01-static-lib-order.patch",
    "content": "--- a/Makefile\t2016-10-16 11:52:25.000000000 +0200\n+++ b/Makefile\t2021-06-23 22:49:33.447650255 +0200\n@@ -51,7 +51,7 @@ SOFILE = libvdr-$(PLUGIN).so\n \n DEFINES += -DPLUGIN_NAME_I18N='\"$(PLUGIN)\"'\n \n-LIBS    += $(shell cxxtools-config --libs) -lcxxtools-http\n+LIBS    +=  -lcxxtools-http $(shell cxxtools-config --libs) -lssl\n CONFDIR  = $(call PKGCFG,configdir)\n PLGCONFDIR = $(CONFDIR)/plugins/$(PLUGIN)\n \n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-restfulapi/patches/vdr-plugin-restfulapi-02-webapp-path.patch",
    "content": "--- a/tools.cpp\n+++ b/tools.cpp\n@@ -214,7 +214,7 @@ void Settings::initDefault()\n   SetIp((string)\"0.0.0.0\");\n   SetEpgImageDirectory((string)\"/var/cache/vdr/epgimages\");\n   SetChannelLogoDirectory((string)\"/usr/share/vdr/channel-logos\");\n-  SetWebappDirectory((string)\"/var/lib/vdr/plugins/restfulapi/webapp\");\n+  SetWebappDirectory((string)\"/storage/.kodi/addons/service.multimedia.vdr-addon/res/plugins/restfulapi\");\n   SetHeaders((string)\"true\");\n   webapp_filetypes_filename = \"webapp_file_types.conf\";\n }\n--- a/tools.h\n+++ b/tools.h\n@@ -40,7 +40,7 @@\n #define RESTFULAPI_EXTENSIONS\n \n #ifndef DOCUMENT_ROOT\n-#define DOCUMENT_ROOT \"/var/lib/vdr/plugins/restfulapi/\"\n+#define DOCUMENT_ROOT \"/storage/.kodi/addons/service.multimedia.vdr-addon/res/plugins/restfulapi/\"\n #endif\n \n class Settings\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-robotv/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-robotv\"\nPKG_VERSION=\"f521e57e947468b54288f696bdcae8e6485c6167\"\nPKG_SHA256=\"3f949fca133bdab690f0a5b4bb7d77a52e1b94c94fc8d815c2c203e9f06a6622\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/pipelka/roboTV\"\nPKG_URL=\"https://github.com/pipelka/vdr-plugin-robotv/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr avahi\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr)\"\nPKG_LONGDESC=\"RoboTV is a Android TV based frontend for VDR.\"\nPKG_TOOLCHAIN=\"cmake\"\n\npre_configure_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  export PKG_CONFIG_PATH=${VDR_DIR}:${PKG_CONFIG_PATH}\n  export CPLUS_INCLUDE_PATH=${VDR_DIR}/include\n  export VDRDIR=${VDR_DIR}\n}\n\npost_make_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  VDR_APIVERSION=$(sed -ne '/define APIVERSION/s/^.*\"\\(.*\\)\".*$/\\1/p' ${VDR_DIR}/config.h)\n  LIB_NAME=lib${PKG_NAME/-plugin/}\n\n  cp --remove-destination ${PKG_BUILD}/.${TARGET_NAME}/${LIB_NAME}.so ${PKG_BUILD}/${LIB_NAME}.so.${VDR_APIVERSION}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-satip/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-satip\"\nPKG_VERSION=\"0a216f1cf9d6401b1afbff420f4fa244ec15d299\"\nPKG_SHA256=\"817900c9fa5ade5c52b0391b791f801832c57bdbed5e7501d7e92b4fe29de816\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.saunalahti.fi/~rahrenbe/vdr/satip/\"\nPKG_URL=\"https://github.com/rofafor/vdr-plugin-satip/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr curl tinyxml\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr)\"\nPKG_LONGDESC=\"This is an SAT>IP plugin for the Video Disk Recorder (VDR).\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  export PKG_CONFIG_PATH=${VDR_DIR}:${PKG_CONFIG_PATH}\n  export CPLUS_INCLUDE_PATH=${VDR_DIR}/include\n\n  make \\\n    SATIP_USE_TINYXML=1 \\\n    LIBDIR=\".\" \\\n    LOCDIR=\"./locale\" \\\n    all install-i18n\n}\n\npost_make_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  VDR_APIVERSION=$(sed -ne '/define APIVERSION/s/^.*\"\\(.*\\)\".*$/\\1/p' ${VDR_DIR}/config.h)\n  LIB_NAME=lib${PKG_NAME/-plugin/}\n\n  cp --remove-destination ${PKG_BUILD}/${LIB_NAME}.so ${PKG_BUILD}/${LIB_NAME}.so.${VDR_APIVERSION}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-streamdev/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-streamdev\"\nPKG_VERSION=\"e2a9b979d3fb92967c7a6a8221e674eb7e55c813\"\nPKG_SHA256=\"adcc08ac19cf98122576bedf63be3396d8b81ee4196c00df0e25c9fb8b7e11b8\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://projects.vdr-developer.org/projects/plg-streamdev\"\nPKG_URL=\"https://github.com/vdr-projects/vdr-plugin-streamdev/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr openssl\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr)\"\nPKG_LONGDESC=\"This PlugIn is a VDR implementation of Video Transfer and a basic HTTP Streaming Protocol.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  export PKG_CONFIG_PATH=${VDR_DIR}:${PKG_CONFIG_PATH}\n  export CPLUS_INCLUDE_PATH=${VDR_DIR}/include\n\n  make \\\n    LIBDIR=\".\" \\\n    LOCDIR=\"./locale\" \\\n    all\n}\n\npost_make_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  VDR_APIVERSION=$(sed -ne '/define APIVERSION/s/^.*\"\\(.*\\)\".*$/\\1/p' ${VDR_DIR}/config.h)\n  LIB_NAME=lib${PKG_NAME/-plugin/}\n  cp --remove-destination ${PKG_BUILD}/server/${LIB_NAME}-server.so ${PKG_BUILD}/server/${LIB_NAME}-server.so.${VDR_APIVERSION}\n  cp --remove-destination ${PKG_BUILD}/client/${LIB_NAME}-client.so ${PKG_BUILD}/client/${LIB_NAME}-client.so.${VDR_APIVERSION}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-streamdev/patches/vdr-plugin-streamdev-01_4k_hevc_support.patch",
    "content": "http://www.vdr-portal.de/board17-developer/board97-vdr-core/p1272182-rfc-h-265-frame-parser/#post1272182\n\n--- a/server/livestreamer.c\n+++ b/server/livestreamer.c\n@@ -143,6 +143,8 @@\n \t\"ISO/IEC 14496-3 Audio with LATM transport syntax\",\n \t\"0x12\", \"0x13\", \"0x14\", \"0x15\", \"0x16\", \"0x17\", \"0x18\", \"0x19\", \"0x1a\",\n \t\"ISO/IEC 14496-10 Video (MPEG-4 part 10/AVC, aka H.264)\",\n+\t\"0x1c\", \"0x1d\", \"0x1e\", \"0x1f\", \"0x20\", \"0x21\", \"0x22\",\"0x23\",\n+\t\"HEVC aka H.265\",\n \t\"\",\n };\n \n@@ -171,6 +173,7 @@\n \tcase 0x10: // ISO/IEC 14496-2 Visual (MPEG-4)\n \tcase 0x11: // ISO/IEC 14496-3 Audio with LATM transport syntax\n \tcase 0x1b: // ISO/IEC 14496-10 Video (MPEG-4 part 10/AVC, aka H.264)\n+\tcase 0x24: // HEVC aka H.265\n \t\tDprintf(\"cStreamdevPatFilter PMT scanner adding PID %d (%s)\\n\",\n \t\t\tstream.getPid(), psStreamTypes[stream.getStreamType()]);\n \t\treturn stream.getPid();\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-streamdev/patches/vdr-plugin-streamdev-02_2.3.9_lock_fix.patch",
    "content": "\nhttps://www.vdr-portal.de/forum/index.php?thread/131708-gel%C3%B6st-vdr-2-3-9-h%C3%A4ngt-bei-der-wiedergabe-von-aufnahmen-mit-rpihddevice/&postID=1303098#post1303098\n\ndiff --git a/client/device.c b/client/device.c\nindex a810f53..2e54e34 100644\n--- a/client/device.c\n+++ b/client/device.c\n@@ -190,7 +190,6 @@ bool cStreamdevDevice::SetChannelDevice(const cChannel *Channel,\n \n bool cStreamdevDevice::SetPid(cPidHandle *Handle, int Type, bool On) {\n \tDprintf(\"SetPid, Pid=%d, Type=%d, On=%d, used=%d\\n\", Handle->pid, Type, On, Handle->used);\n-\tLOCK_THREAD;\n \n \tbool res = true; \n \tif (Handle->pid && (On || !Handle->used)) {\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-streamdev/patches/vdr-plugin-streamdev-03_i18n.patch",
    "content": "--- a/Makefile\t2017-09-30 21:31:48.000000000 +0200\n+++ b/Makefile\t2021-01-12 23:26:57.857536391 +0100\n@@ -71,12 +71,14 @@ all: client server\n client:\n \t$(MAKE) -C ./tools\n \t$(MAKE) -C ./client\n+\t$(MAKE) -C ./client install-i18n\n \n server:\n \t$(MAKE) -C ./tools\n \t$(MAKE) -C ./libdvbmpeg\n \t$(MAKE) -C ./remux\n \t$(MAKE) -C ./server\n+\t$(MAKE) -C ./server install-i18n\n \n install-client: client\n \t$(MAKE) -C ./client install\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-streamdev/patches/vdr-plugin-streamdev-04_fix_vdr_2.6.x_build_error.patch",
    "content": "diff -r -Bc a/server/connectionVTP.c b/server/connectionVTP.c\n*** a/server/connectionVTP.c\t2021-05-22 10:33:01.633332698 +0200\n--- b/server/connectionVTP.c\t2021-05-22 10:27:50.000000000 +0200\n***************\n*** 1882,1888 ****\n  #endif\n  \t\t\t\t\t\t\t\t\t}\n  \t\t\t\t\t\t\t\t\telse {\n! \t\t\t\t\t\t\t\t\t\tcDevice::SetCurrentChannel(CurrentChannel);\n  \t\t\t\t\t\t\t\t\t}\n  \t\t\t\t\t\t\t\t}\n  \t\t\t\t\t\t\t\tisyslog(\"channel %d moved to %d\", FromNumber, ToNumber);\n--- 1882,1888 ----\n  #endif\n  \t\t\t\t\t\t\t\t\t}\n  \t\t\t\t\t\t\t\t\telse {\n! \t\t\t\t\t\t\t\t\t\tcDevice::SetCurrentChannel(CurrentChannel->Number());\n  \t\t\t\t\t\t\t\t\t}\n  \t\t\t\t\t\t\t\t}\n  \t\t\t\t\t\t\t\tisyslog(\"channel %d moved to %d\", FromNumber, ToNumber);\n***************\n*** 1983,1989 ****\n  \t\t\t\t\t\t\tChannels.SwitchTo(CurrentChannel->Number());\n  #endif\n  \t\t\t\t\t\telse\n! \t\t\t\t\t\t\tcDevice::SetCurrentChannel(CurrentChannel);\n  \t\t\t\t\t}\n  \t\t\t\t\tReply(250, \"Channel \\\"%s\\\" deleted\", Option);\n  \t\t\t\t}\n--- 1983,1989 ----\n  \t\t\t\t\t\t\tChannels.SwitchTo(CurrentChannel->Number());\n  #endif\n  \t\t\t\t\t\telse\n! \t\t\t\t\t\t\tcDevice::SetCurrentChannel(CurrentChannel->Number());\n  \t\t\t\t\t}\n  \t\t\t\t\tReply(250, \"Channel \\\"%s\\\" deleted\", Option);\n  \t\t\t\t}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-vnsiserver/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-vnsiserver\"\nPKG_VERSION=\"47a90dd9298753083a9a6482bb9990ea9a88aa7a\"\nPKG_SHA256=\"cd8087306dc5d77b150ca9f77bba91460507dc9a2336b9f61ce13aeefecf23e3\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/mdre77/vdr-plugin-vnsiserver\"\nPKG_URL=\"https://github.com/mdre77/vdr-plugin-vnsiserver/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr) $(get_pkg_directory vdr-plugin-wirbelscan)\"\nPKG_LONGDESC=\"VDR plugin to handle Kodi clients.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_build_target() {\n  WIRBELSCAN_DIR=$(get_build_dir vdr-plugin-wirbelscan)\n  ln -sf ${WIRBELSCAN_DIR}/wirbelscan_services.h ${PKG_BUILD}\n}\n\nmake_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  export PKG_CONFIG_PATH=${VDR_DIR}:${PKG_CONFIG_PATH}\n  export CPLUS_INCLUDE_PATH=${VDR_DIR}/include\n\n  make \\\n    LIBDIR=\".\" \\\n    LOCDIR=\"./locale\" \\\n    all install-i18n\n}\n\npost_make_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  VDR_APIVERSION=$(sed -ne '/define APIVERSION/s/^.*\"\\(.*\\)\".*$/\\1/p' ${VDR_DIR}/config.h)\n  LIB_NAME=lib${PKG_NAME/-plugin/}\n\n  cp --remove-destination ${PKG_BUILD}/${LIB_NAME}.so ${PKG_BUILD}/${LIB_NAME}.so.${VDR_APIVERSION}\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-wirbelscan/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-wirbelscan\"\nPKG_VERSION=\"2021.03.07\"\nPKG_SHA256=\"9267ebd12a3a58e0ae453f6e311782262ae0782b25721cc8d7e5048a76cb3759\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.gen2vdr.de/wirbel/wirbelscan/index2.html\"\nPKG_URL=\"https://www.gen2vdr.de/wirbel/wirbelscan/vdr-wirbelscan-${PKG_VERSION}.tgz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr)\"\nPKG_LONGDESC=\"Performs a channel scans for DVB-T, DVB-C and DVB-S\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nmake_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  make VDRDIR=${VDR_DIR} \\\n    LIBDIR=\".\" \\\n    LOCALEDIR=\"./locale\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-wirbelscan/patches/vdr-plugin-wirbelscan-01-fixes.patch",
    "content": "Subject: [PATCH] interface channel count\n\ndiff --git a/wirbelscan.c b/wirbelscan.c\nindex 602e659..aafbec3 100644\n--- a/wirbelscan.c\n+++ b/wirbelscan.c\n@@ -12,6 +12,7 @@\n #include \"menusetup.h\"\n #include \"countries.h\"\n #include \"satellites.h\"\n+extern TChannels NewChannels;\n \n static const char *WIRBELSCAN_VERSION        = \"2021.03.07\";\n static const char *WIRBELSCAN_DESCRIPTION    = \"DVB channel scan for VDR\";\n@@ -202,8 +203,8 @@ bool cPluginWirbelscan::Service(const ch\n         strcpy(s->transponder, lTransponder.length()? lTransponder.c_str():\"none\");\n         s->progress = s->status == StatusScanning?lProgress:0;\n         s->strength = s->status == StatusScanning?lStrength:0;\n-        s->numChannels = 0;              // Channels.Count(); // not possible any longer.\n-        s->newChannels = channelcount;   // ((Channels.Count() - channelcount) > 0) && channelcount?Channels.Count() - channelcount:0;\n+        s->numChannels = cChannels::MaxNumber();\n+        s->newChannels = (NewChannels.Count() > cChannels::MaxNumber()) ? NewChannels.Count() - cChannels::MaxNumber():0;\n         s->nextTransponders = nextTransponders;\n         return true;\n         }\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-wirbelscan/patches/vdr-plugin-wirbelscan-02-countries_utf8.patch",
    "content": "--- a/countries.c\t2016-07-31 10:25:01.000000000 +0200\n+++ b/countries.c\t2021-01-21 18:02:54.336375432 +0100\n@@ -557,7 +557,7 @@ int atsc_is_qam(int atsc) {\n struct cCountry country_list[] = {\n /*- ISO 3166-1 - unique id - long country name                 alpha-3 numeric */\n        {\"AF\", AF, \"AFGHANISTAN\"},                                  /*AFG, 4  },*/\n-       {\"AX\", AX, \"LAND ISLANDS\"},                                /*ALA, 248},*/\n+       {\"AX\", AX, \"ÅLAND ISLANDS\"},                                /*ALA, 248},*/\n        {\"AL\", AL, \"ALBANIA\"},                                      /*ALB, 8  },*/\n        {\"DZ\", DZ, \"ALGERIA\"},                                      /*DZA, 12 },*/\n        {\"AS\", AS, \"AMERICAN SAMOA\"},                               /*ASM, 16 },*/\n@@ -610,10 +610,10 @@ struct cCountry country_list[] = {\n        {\"CD\", CD, \"CONGO, THE DEMOCRATIC REPUBLIC OF THE\"},        /*COD, 180},*/\n        {\"CK\", CK, \"COOK ISLANDS\"},                                 /*COK, 184},*/\n        {\"CR\", CR, \"COSTA RICA\"},                                   /*CRI, 188},*/\n-       {\"CI\", CI, \"CTE D'IVOIRE\"},                                /*CIV, 384},*/\n+       {\"CI\", CI, \"CÔTE D'IVOIRE\"},                                /*CIV, 384},*/\n        {\"HR\", HR, \"CROATIA\"},                                      /*HRV, 191},*/\n        {\"CU\", CU, \"CUBA\"},                                         /*CUB, 192},*/\n-       {\"CW\", CW, \"CURAAO\"},                                      /*CUW, 531},*/\n+       {\"CW\", CW, \"CURAÇAO\"},                                      /*CUW, 531},*/\n        {\"CY\", CY, \"CYPRUS\"},                                       /*CYP, 196},*/\n        {\"CZ\", CZ, \"CZECH REPUBLIC\"},                               /*CZE, 203},*/\n        {\"DK\", DK, \"DENMARK\"},                                      /*DNK, 208},*/\n@@ -736,11 +736,11 @@ struct cCountry country_list[] = {\n        {\"PT\", PT, \"PORTUGAL\"},                                     /*PRT, 620},*/\n        {\"PR\", PR, \"PUERTO RICO\"},                                  /*PRI, 630},*/\n        {\"QA\", QA, \"QATA\"},                                         /*QAT, 634},*/\n-       {\"RE\", RE, \"RUNION\"},                                      /*REU, 638},*/\n+       {\"RE\", RE, \"RÉUNION\"},                                      /*REU, 638},*/\n        {\"RO\", RO, \"ROMANIA\"},                                      /*ROU, 642},*/\n        {\"RU\", RU, \"RUSSIAN FEDERATION\"},                           /*RUS, 643},*/\n        {\"RW\", RW, \"RWANDA\"},                                       /*RWA, 646},*/\n-       {\"BL\", BL, \"SAINT BARTHLEMY\"},                             /*BLM, 652},*/\n+       {\"BL\", BL, \"SAINT BARTHÉLEMY\"},                             /*BLM, 652},*/\n        {\"SH\", SH, \"SAINT HELENA\"},                                 /*SHN, 654},*/\n        {\"KN\", KN, \"SAINT KITTS AND NEVIS\"},                        /*KNA, 659},*/\n        {\"LC\", LC, \"SAINT LUCIA\"},                                  /*LCA, 662},*/\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-wirbelscan/sources/Makefile",
    "content": "# taken from wirbelscan-2017.06.04 backup/Makefile.old\n# -- v20120526, Winfried Koehler --\n\nPLUGIN = wirbelscan\n\nVERSION = $(shell grep 'static const char \\*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[\";]//g')\n\nCXX      ?= g++\nCXXFLAGS ?= -g -O3 -Wall -Wextra -Werror=overloaded-virtual -Wformat=2 -Wswitch-default -fstack-protector-all -D_FORTIFY_SOURCE=2\n\nVDRDIR ?= ../../..\nLIBDIR ?= ../../lib\nTMPDIR ?= /tmp\n\ninclude $(VDRDIR)/Make.global\n\n-include $(VDRDIR)/Make.config\n\nAPIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*\"\\(.*\\)\".*$$/\\1/p' $(VDRDIR)/config.h)\n\nARCHIVE = $(PLUGIN)-$(VERSION)\nPACKAGE = vdr-$(ARCHIVE)\n\nINCLUDES += -I$(VDRDIR)/include\n\nDEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='\"$(PLUGIN)\"'\n\nUNCRUSTIFY_FILES = scanner.c scanner.h scanfilter.c scanfilter.h statemachine.h statemachine.c\n\nOBJS = $(PLUGIN).o common.o menusetup.o satellites.o scanner.o dvb_wrapper.o\nOBJS += scanfilter.o statemachine.o countries.o\n\nall: libvdr-$(PLUGIN).so i18n\n\n%.o: %.c\n\t$(CXX) -std=c++11 $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<\n\nMAKEDEP = $(CXX) -MM -MG\nDEPFILE = .dependencies\n$(DEPFILE): Makefile\n\t@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@\n\n-include $(DEPFILE)\n\nPODIR     = po\nLOCALEDIR = $(VDRDIR)/locale\nI18Npo    = $(wildcard $(PODIR)/*.po)\nI18Nmsgs  = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))\nI18Npot   = $(PODIR)/$(PLUGIN).pot\n\n%.mo: %.po\n\t@msgfmt -c -o $@ $<\n\n$(I18Npot): $(wildcard *.c)\n\t@xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='<see README>' -o $@ $^\n\n%.po: $(I18Npot)\n\t@msgmerge -U --no-wrap --no-location --backup=none -q $@ $<\n\t@touch $@\n\n$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo\n\t@mkdir -p $(dir $@)\n\t@cp $< $@\n\n.PHONY: i18n\ni18n: $(I18Nmsgs) $(I18Npot)\n\nlibvdr-$(PLUGIN).so: $(OBJS)\n\t$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@\n\t@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)\n\nperm:\n\t@chmod 644 *.{c,h,html} COPYING HISTORY README TODO Makefile\n\t@chmod 755 po/\n\n\ndist: $(I18Npo) clean perm\n\t@-rm -rf $(TMPDIR)/$(ARCHIVE)\n\t@mkdir $(TMPDIR)/$(ARCHIVE)\n\t@cp -a * $(TMPDIR)/$(ARCHIVE)\n\t@tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE)\n\t@-rm -rf $(TMPDIR)/$(ARCHIVE)\n\t@echo Distribution package created as $(PACKAGE).tgz\n\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-wirbelscancontrol/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-wirbelscancontrol\"\nPKG_VERSION=\"0.0.2\"\nPKG_SHA256=\"178c5768dd47355a42409a2cb2629f0762da1297865e3a84963684649145cb13\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.gen2vdr.de/wirbel/wirbelscancontrol/index2.html\"\nPKG_URL=\"https://www.gen2vdr.de/wirbel/wirbelscancontrol/${PKG_NAME/-plugin/}-${PKG_VERSION}.tgz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr gettext:host vdr-plugin-wirbelscan\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr)\"\nPKG_LONGDESC=\"Adds menu entry for wirbelscan at VDR.\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"+pic\"\n\npre_build_target() {\n  WIRBELSCAN_DIR=$(get_build_dir vdr-plugin-wirbelscan)\n  ln -sf ${WIRBELSCAN_DIR}/wirbelscan_services.h ${PKG_BUILD}\n}\n\nmake_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  make VDRDIR=${VDR_DIR} \\\n    LIBDIR=\".\" \\\n    LOCALEDIR=\"./locale\"\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-wirbelscancontrol/patches/vdr-plugin-wirbelscancontrol-02-vdr_2.3.patch",
    "content": "--- a/scanmenu.c\n+++ b/scanmenu.c\n@@ -255,6 +255,9 @@\n {\n    eOSState state = cOsdMenu::ProcessKey(Key);\n    int direction = 0;\n+#if APIVERSNUM >= 20301\n+   LOCK_CHANNELS_READ;\n+#endif\n    switch (Key) {\n       case kLeft:    direction = -1;\n                      break;\n@@ -268,7 +271,11 @@\n                         case SETSCAN:\n                           osdstatus = SCANNING;\n                           start = time(NULL);\n+#if APIVERSNUM < 20301\n                           channelcount0 = Channels.Count();\n+#else\n+                          channelcount0 = Channels->Count();\n+#endif\n                           SetHelp(tr(\"Stop\"), NULL, NULL, NULL);\n                           TransferSetup();\n                           PutCommand(CmdStartScan);\n@@ -655,7 +662,8 @@\n   sbuf = cString::sprintf(\"%s (%d%% transponders from scan list + %u queued)\", buf, status.progress, status.nextTransponders);\n   ProgressBar->SetText(*sbuf);\n \n-  if (TV1 && TV2 && TV3 && TV4 && TV5)\n+#if APIVERSNUM < 20301\n+  if (TV1 && TV2 && TV3 && TV4 && TV5) {\n      switch (Channels.Count() - channelcount0) {\n          default:;\n          case 5: TV5->SetText(Channels.GetByNumber(Channels.Count()-4)->Name());\n@@ -665,8 +673,23 @@\n          case 1: TV1->SetText(Channels.GetByNumber(Channels.Count()-0)->Name());\n          case 0:; \n          }\n-\n+  }\n   sbuf = cString::sprintf(\"%s%d\", tr(\"New channels: \"), Channels.Count() - channelcount0);\n+#else\n+  LOCK_CHANNELS_READ;\n+  if (TV1 && TV2 && TV3 && TV4 && TV5) {\n+     switch (Channels->Count() - channelcount0) {\n+         default:;\n+         case 5: TV5->SetText(Channels->GetByNumber(Channels->Count()-4)->Name());\n+         case 4: TV4->SetText(Channels->GetByNumber(Channels->Count()-3)->Name());\n+         case 3: TV3->SetText(Channels->GetByNumber(Channels->Count()-2)->Name());\n+         case 2: TV2->SetText(Channels->GetByNumber(Channels->Count()-1)->Name());\n+         case 1: TV1->SetText(Channels->GetByNumber(Channels->Count()-0)->Name());\n+         case 0:; \n+         }\n+  }\n+  sbuf = cString::sprintf(\"%s%d\", tr(\"New channels: \"), Channels->Count() - channelcount0);\n+#endif\n   if (CH) CH->SetText(*sbuf);\n \n   Display();\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-xmltv2vdr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-plugin-xmltv2vdr\"\nPKG_VERSION=\"ec7bd920d94e55f2d21bfa076b7e900b7b2b7537\"\nPKG_SHA256=\"eacc91062095563d8adc93873b373ddb34b076a8c0a9e5a86f6220d1d5d892e9\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://projects.vdr-developer.org/projects/plg-xmltv2vdr\"\nPKG_URL=\"https://github.com/vdr-projects/vdr-plugin-xmltv2vdr/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain vdr sqlite openssl curl libzip libxml2 libxslt enca pcre\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory vdr)\"\nPKG_LONGDESC=\"xmltv2vdr imports data in xmltv format\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"+pic\"\n\npre_configure_target() {\n  export CXXFLAGS=\"${CXXFLAGS} -Wno-narrowing\"\n  export LIBS=\"-L${SYSROOT_PREFIX}/usr/lib/iconv -lpcre -lpcrecpp -lssl -lcrypto -lbz2\"\n}\n\nmake_target() {\n  VDR_DIR=$(get_build_dir vdr)\n  make VDRDIR=${VDR_DIR} \\\n    LIBDIR=\".\" \\\n    LOCALEDIR=\"./locale\"\n}\n\npost_make_target() {\n  cd dist/epgdata2xmltv\n  make -j1\n  cd -\n  ${STRIP} dist/epgdata2xmltv/epgdata2xmltv\n}\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-xmltv2vdr/patches/vdr-plugin-xmltv2vdr-02_gcc721_fixes.patch",
    "content": "taken from https://github.com/VDR4Arch/vdr4arch/blob/vdr-stable/plugins/vdr-xmltv2vdr/xmltv2vdr_gcc721_fixes.diff\nfixes \n\nevent.cpp: In member function 'void cXMLTVEvent::GetSQL(const char*, int, const char*, char**, char**)':\nevent.cpp:531:5: error: 'string' was not declared in this scope\n     string si=sql_insert;\n     ^~~~~~\n\ndiff --git a/dist/epgdata2xmltv/epgdata2xmltv.cpp b/dist/epgdata2xmltv/epgdata2xmltv.cpp\nindex de6fb26..ec465fb 100644\n--- a/dist/epgdata2xmltv/epgdata2xmltv.cpp\n+++ b/dist/epgdata2xmltv/epgdata2xmltv.cpp\n@@ -561,7 +561,7 @@ int cepgdata2xmltv::Process(int argc, char *argv[])\n                 enca_analyser_free(analyser);\n             }\n \n-            string s = xmlmem;\n+            std::string s = xmlmem;\n             int reps=pcrecpp::RE(\"&(?![a-zA-Z]{1,8};)\").GlobalReplace(\"%amp;\",&s);\n             if (reps) {\n                 xmlmem = (char *)realloc(xmlmem, s.size()+1);\ndiff --git a/event.cpp b/event.cpp\nindex ae33002..1df43ec 100644\n--- a/event.cpp\n+++ b/event.cpp\n@@ -528,7 +528,7 @@ void cXMLTVEvent::GetSQL(const char *Source, int SrcIdx, const char *ChannelID,\n         return;\n     }\n \n-    string si=sql_insert;\n+    std::string si=sql_insert;\n     int ireps;\n     ireps=pcrecpp::RE(\"'\").GlobalReplace(\"''\",&si);\n     ireps+=pcrecpp::RE(\"\\\\^\").GlobalReplace(\"'\",&si);\n@@ -540,7 +540,7 @@ void cXMLTVEvent::GetSQL(const char *Source, int SrcIdx, const char *ChannelID,\n     }\n     *Insert=sql_insert;\n \n-    string su=sql_update;\n+    std::string su=sql_update;\n     int ureps;\n     ureps=pcrecpp::RE(\"'\").GlobalReplace(\"''\",&su);\n     ureps+=pcrecpp::RE(\"\\\\^\").GlobalReplace(\"'\",&su);\ndiff --git a/import.cpp b/import.cpp\nindex 0d6f7bf..e417c59 100644\n--- a/import.cpp\n+++ b/import.cpp\n@@ -1401,7 +1401,7 @@ bool cImport::UpdateXMLTVEvent(cEPGSource *Source, sqlite3 *Db, cXMLTVEvent *xEv\n             return false;\n         }\n \n-        string ed=shortdesc;\n+        std::string ed=shortdesc;\n \n         int reps;\n         reps=pcrecpp::RE(\"'\").GlobalReplace(\"''\",&ed);\n@@ -1511,7 +1511,7 @@ bool cImport::UpdateXMLTVEvent(cEPGSource *Source, sqlite3 *Db, const cEvent *Ev\n             return false;\n         }\n \n-        string ed=eitdescription;\n+        std::string ed=eitdescription;\n \n         int reps;\n         reps=pcrecpp::RE(\"'\").GlobalReplace(\"''\",&ed);\n@@ -1649,7 +1649,7 @@ cXMLTVEvent *cImport::SearchXMLTVEvent(sqlite3 **Db,const char *ChannelID, const\n             return NULL;\n         }\n \n-        string st=sqltitle;\n+        std::string st=sqltitle;\n \n         int reps;\n         reps=pcrecpp::RE(\"'\").GlobalReplace(\"''\",&st);\n"
  },
  {
    "path": "packages/addons/addon-depends/vdr-plugins/vdr-plugin-xmltv2vdr/patches/vdr-plugin-xmltv2vdr-03-fix-epgdata2xmltv-linking.patch",
    "content": "diff -ru vdr-plugin-xmltv2vdr.orig/dist/epgdata2xmltv/Makefile vdr-plugin-xmltv2vdr/dist/epgdata2xmltv/Makefile\n--- vdr-plugin-xmltv2vdr.orig/dist/epgdata2xmltv/Makefile\t2017-03-20 18:08:49.000000000 +0100\n+++ vdr-plugin-xmltv2vdr/dist/epgdata2xmltv/Makefile\t2020-06-17 12:34:35.472188515 +0200\n@@ -19,7 +19,7 @@\n DEFINES += -D__STDC_CONSTANT_MACROS -D__USE_XOPEN_EXTENDED\n \n INCLUDES += $(shell $(PKG-CONFIG) --cflags $(PKG-INCLUDES))\n-LIBS     += $(shell $(PKG-CONFIG) --libs $(PKG-LIBS)) \n+LIBS     += $(shell $(PKG-CONFIG) --libs --static $(PKG-LIBS)) \n \n INCLUDES += -I..\n \n"
  },
  {
    "path": "packages/addons/browser/chrome/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/browser/chrome/config/Xdefaults",
    "content": "Xft.dpi:        96\n"
  },
  {
    "path": "packages/addons/browser/chrome/config/pango.modules",
    "content": "/storage/.kodi/addons/browser.chrome/pango-modules/pango-arabic-lang.so ArabicScriptEngineLang PangoEngineLang PangoRenderNone arabic:*\n/storage/.kodi/addons/browser.chrome/pango-modules/pango-basic-fc.so BasicScriptEngineFc PangoEngineShape PangoRenderFc common:\n/storage/.kodi/addons/browser.chrome/pango-modules/pango-indic-lang.so devaIndicScriptEngineLang PangoEngineLang PangoRenderNone devanagari:*\n/storage/.kodi/addons/browser.chrome/pango-modules/pango-indic-lang.so bengIndicScriptEngineLang PangoEngineLang PangoRenderNone bengali:*\n/storage/.kodi/addons/browser.chrome/pango-modules/pango-indic-lang.so guruIndicScriptEngineLang PangoEngineLang PangoRenderNone gurmukhi:*\n/storage/.kodi/addons/browser.chrome/pango-modules/pango-indic-lang.so gujrIndicScriptEngineLang PangoEngineLang PangoRenderNone gujarati:*\n/storage/.kodi/addons/browser.chrome/pango-modules/pango-indic-lang.so oryaIndicScriptEngineLang PangoEngineLang PangoRenderNone oriya:*\n/storage/.kodi/addons/browser.chrome/pango-modules/pango-indic-lang.so tamlIndicScriptEngineLang PangoEngineLang PangoRenderNone tamil:*\n/storage/.kodi/addons/browser.chrome/pango-modules/pango-indic-lang.so teluIndicScriptEngineLang PangoEngineLang PangoRenderNone telugu:*\n/storage/.kodi/addons/browser.chrome/pango-modules/pango-indic-lang.so kndaIndicScriptEngineLang PangoEngineLang PangoRenderNone kannada:*\n/storage/.kodi/addons/browser.chrome/pango-modules/pango-indic-lang.so mlymIndicScriptEngineLang PangoEngineLang PangoRenderNone malayalam:*\n/storage/.kodi/addons/browser.chrome/pango-modules/pango-indic-lang.so sinhIndicScriptEngineLang PangoEngineLang PangoRenderNone sinhala:*\n\n"
  },
  {
    "path": "packages/addons/browser/chrome/config/pangorc",
    "content": "#\n# pangorc file for uninstalled operation. If pango-viewer is run with\n# this file in the current directory it will set it as PANGO_RC_FILE\n#\n\n[Pango]\nModuleFiles = /storage/.kodi/addons/browser.chrome/config/pango.modules\n\n[PangoX]\nAliasFiles = /storage/.kodi/addons/browser.chrome/config/pangx.aliases\n"
  },
  {
    "path": "packages/addons/browser/chrome/config/pixbuf.loaders.cache",
    "content": "# How to generate those file\n# cd /LE/build.LibreELEC-Generic/gdk-pixbuf-2.36.12/.install_pkg/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders\n# cp /LE/build.LibreELEC-Generic/gdk-pixbuf-2.36.12/.install_pkg/usr/bin/gdk-pixbuf-query-loaders .\n# ./gdk-pixbuf-query-loaders *.so > pixbuf.loaders.cache\n\n\n# GdkPixbuf Image Loader Modules file\n# Automatically generated file, do not edit\n# Created by gdk-pixbuf-query-loaders from gdk-pixbuf-2.36.12\n#\n\"/storage/.kodi/addons/browser.chrome/gdk-pixbuf-modules/libpixbufloader-ani.so\"\n\"ani\" 4 \"gdk-pixbuf\" \"Windows animated cursor\" \"LGPL\"\n\"application/x-navi-animation\" \"\"\n\"ani\" \"\"\n\"RIFF    ACON\" \"    xxxx    \" 100\n\n\"/storage/.kodi/addons/browser.chrome/gdk-pixbuf-modules/libpixbufloader-bmp.so\"\n\"bmp\" 5 \"gdk-pixbuf\" \"BMP\" \"LGPL\"\n\"image/bmp\" \"image/x-bmp\" \"image/x-MS-bmp\" \"\"\n\"bmp\" \"\"\n\"BM\" \"\" 100\n\n\"/storage/.kodi/addons/browser.chrome/gdk-pixbuf-modules/libpixbufloader-gif.so\"\n\"gif\" 4 \"gdk-pixbuf\" \"GIF\" \"LGPL\"\n\"image/gif\" \"\"\n\"gif\" \"\"\n\"GIF8\" \"\" 100\n\n\"/storage/.kodi/addons/browser.chrome/gdk-pixbuf-modules/libpixbufloader-icns.so\"\n\"icns\" 4 \"gdk-pixbuf\" \"MacOS X icon\" \"GPL\"\n\"image/x-icns\" \"\"\n\"icns\" \"\"\n\"icns\" \"\" 100\n\n\"/storage/.kodi/addons/browser.chrome/gdk-pixbuf-modules/libpixbufloader-ico.so\"\n\"ico\" 5 \"gdk-pixbuf\" \"Windows icon\" \"LGPL\"\n\"image/x-icon\" \"image/x-ico\" \"image/x-win-bitmap\" \"image/vnd.microsoft.icon\" \"application/ico\" \"image/ico\" \"image/icon\" \"text/ico\" \"\"\n\"ico\" \"cur\" \"\"\n\"  \\001   \" \"zz znz\" 100\n\"  \\002   \" \"zz znz\" 100\n\n\"/storage/.kodi/addons/browser.chrome/gdk-pixbuf-modules/libpixbufloader-jpeg.so\"\n\"jpeg\" 5 \"gdk-pixbuf\" \"JPEG\" \"LGPL\"\n\"image/jpeg\" \"\"\n\"jpeg\" \"jpe\" \"jpg\" \"\"\n\"\\377\\330\" \"\" 100\n\n\"/storage/.kodi/addons/browser.chrome/gdk-pixbuf-modules/libpixbufloader-png.so\"\n\"png\" 5 \"gdk-pixbuf\" \"PNG\" \"LGPL\"\n\"image/png\" \"\"\n\"png\" \"\"\n\"\\211PNG\\r\\n\\032\\n\" \"\" 100\n\n\"/storage/.kodi/addons/browser.chrome/gdk-pixbuf-modules/libpixbufloader-pnm.so\"\n\"pnm\" 4 \"gdk-pixbuf\" \"PNM/PBM/PGM/PPM\" \"LGPL\"\n\"image/x-portable-anymap\" \"image/x-portable-bitmap\" \"image/x-portable-graymap\" \"image/x-portable-pixmap\" \"\"\n\"pnm\" \"pbm\" \"pgm\" \"ppm\" \"\"\n\"P1\" \"\" 100\n\"P2\" \"\" 100\n\"P3\" \"\" 100\n\"P4\" \"\" 100\n\"P5\" \"\" 100\n\"P6\" \"\" 100\n\n\"/storage/.kodi/addons/browser.chrome/gdk-pixbuf-modules/libpixbufloader-qtif.so\"\n\"qtif\" 4 \"gdk-pixbuf\" \"QuickTime\" \"LGPL\"\n\"image/x-quicktime\" \"image/qtif\" \"\"\n\"qtif\" \"qif\" \"\"\n\"abcdidsc\" \"xxxx    \" 100\n\"abcdidat\" \"xxxx    \" 100\n\n\"/storage/.kodi/addons/browser.chrome/gdk-pixbuf-modules/libpixbufloader-tga.so\"\n\"tga\" 4 \"gdk-pixbuf\" \"Targa\" \"LGPL\"\n\"image/x-tga\" \"\"\n\"tga\" \"targa\" \"\"\n\" \\001\\001\" \"x  \" 100\n\" \\001\\t\" \"x  \" 100\n\"  \\002\" \"xz \" 99\n\"  \\003\" \"xz \" 100\n\"  \\n\" \"xz \" 100\n\"  \\v\" \"xz \" 100\n\n\"/storage/.kodi/addons/browser.chrome/gdk-pixbuf-modules/libpixbufloader-tiff.so\"\n\"tiff\" 5 \"gdk-pixbuf\" \"TIFF\" \"LGPL\"\n\"image/tiff\" \"\"\n\"tiff\" \"tif\" \"\"\n\"MM *\" \"  z \" 100\n\"II* \" \"   z\" 100\n\"II* \\020   CR\\002 \" \"   z zzz   z\" 0\n\n\"/storage/.kodi/addons/browser.chrome/gdk-pixbuf-modules/libpixbufloader-xbm.so\"\n\"xbm\" 4 \"gdk-pixbuf\" \"XBM\" \"LGPL\"\n\"image/x-xbitmap\" \"\"\n\"xbm\" \"\"\n\"#define \" \"\" 100\n\"/*\" \"\" 50\n\n\"/storage/.kodi/addons/browser.chrome/gdk-pixbuf-modules/libpixbufloader-xpm.so\"\n\"xpm\" 4 \"gdk-pixbuf\" \"XPM\" \"LGPL\"\n\"image/x-xpixmap\" \"\"\n\"xpm\" \"\"\n\"/* XPM */\" \"\" 100\n\n\n"
  },
  {
    "path": "packages/addons/browser/chrome/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"chrome\"\nPKG_VERSION=\"1.0\"\n# curl -s http://dl.google.com/linux/chrome/deb/dists/stable/main/binary-amd64/Packages | grep -B 1 Version\nPKG_VERSION_NUMBER=\"109.0.5414.74\"\nPKG_REV=\"0\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"Custom\"\nPKG_SITE=\"http://www.google.com/chrome\"\nPKG_DEPENDS_TARGET=\"toolchain at-spi2-atk atk cairo chrome-libXcomposite \\\n                    chrome-libXdamage chrome-libXfixes chrome-libXi chrome-libXrender \\\n                    chrome-libXtst chrome-libxcb chrome-libxkbcommon chrome-libxshmfence cups \\\n                    gdk-pixbuf gtk3 harfbuzz-icu libXcursor libxss nss pango \\\n                    scrnsaverproto unclutter unix_ar\"\nPKG_SECTION=\"browser\"\nPKG_SHORTDESC=\"Google Chrome Browser\"\nPKG_LONGDESC=\"Google Chrome Browser\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Chrome\"\nPKG_ADDON_TYPE=\"xbmc.python.script\"\nPKG_ADDON_PROVIDES=\"executable\"\n\nmake_target() {\n  :\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/{bin,config,lib,resources}\n\n  # config\n  cp -P ${PKG_DIR}/config/* ${ADDON_BUILD}/${PKG_ADDON_ID}/config\n\n  # unclutter\n  cp -P $(get_install_dir unclutter)/usr/bin/unclutter ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n  # libs\n  cp -PL $(get_install_dir atk)/usr/lib/libatk-1.0.so.0 \\\n         $(get_install_dir cairo)/usr/lib/{libcairo-gobject.so.2,libcairo.so.2} \\\n         $(get_install_dir gdk-pixbuf)/usr/lib/libgdk_pixbuf-2.0.so.0 \\\n         $(get_install_dir gtk3)/usr/lib/{libgtk-3.so.0,libgdk-3.so.0} \\\n         $(get_install_dir harfbuzz-icu)/usr/lib/{libharfbuzz.so.0,libharfbuzz-icu.so*} \\\n         $(get_install_dir at-spi2-atk)/usr/lib/libatk-bridge-2.0.so.0 \\\n         $(get_install_dir at-spi2-core)/usr/lib/libatspi.so.0 \\\n         $(get_install_dir cups)/usr/lib/libcups.so.2 \\\n         $(get_install_dir chrome-libxcb)/usr/lib/{libxcb.so.1,libxcb-dri3.so.0} \\\n         $(get_install_dir chrome-libXcomposite)/usr/lib/libXcomposite.so.1 \\\n         $(get_install_dir libXcursor)/usr/lib/libXcursor.so.1 \\\n         $(get_install_dir chrome-libXdamage)/usr/lib/libXdamage.so.1 \\\n         $(get_install_dir chrome-libXfixes)/usr/lib/libXfixes.so.3 \\\n         $(get_install_dir chrome-libXi)/usr/lib/libXi.so.6 \\\n         $(get_install_dir chrome-libxkbcommon)/usr/lib/libxkbcommon.so.0 \\\n         $(get_install_dir chrome-libXrender)/usr/lib/libXrender.so.1 \\\n         $(get_install_dir chrome-libxshmfence)/usr/lib/libxshmfence.so.1 \\\n         $(get_install_dir libxss)/usr/lib/libXss.so.1 \\\n         $(get_install_dir chrome-libXtst)/usr/lib/libXtst.so.6 \\\n         $(get_install_dir pango)/usr/lib/{libpangocairo-1.0.so.0,libpango-1.0.so.0,libpangoft2-1.0.so.0} \\\n         ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n\n  # unix_ar\n  cp -P $(get_build_dir unix_ar)/unix_ar.py ${ADDON_BUILD}/${PKG_ADDON_ID}/resources\n}\n\npost_install_addon() {\n  sed -e \"s/@DISTRO_PKG_SETTINGS_ID@/${DISTRO_PKG_SETTINGS_ID}/g\" -i \"${INSTALL}/default.py\"\n  sed -e \"s/@CHROME_VERSION@/${PKG_VERSION_NUMBER}/g\" -i \"${INSTALL}/bin/chrome-downloader\"\n  sed -e \"s/@CHROME_VERSION@/${PKG_VERSION_NUMBER}/g\" -i \"${INSTALL}/resources/settings.xml\"\n  sed -e \"s/@CHROME_VERSION@/${PKG_VERSION_NUMBER}/g\" -i \"${INSTALL}/settings-default.xml\"\n}\n"
  },
  {
    "path": "packages/addons/browser/chrome/source/bin/chrome-downloader",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\noe_setup_addon browser.chrome\n\nICON=\"$ADDON_DIR/resources/icon.png\"\nCONTROL_FILE=\"/tmp/curl.done\"\nDATA_FILE=\"/tmp/curl.data\"\nCHROME_FILE=\"google-chrome-stable_@CHROME_VERSION@-1_amd64.deb\"\n\n# check for enough free disk space\nif [ $(df -P . | awk 'END {print $4}') -lt 400000 ]; then\n  kodi-send --action=\"Notification(Not enough disk space, at least 400MB are required,30000,${ICON})\" >/dev/null\n  exit 0;\nfi\n\n# remove install status and folders\nif [ -f $ADDON_DIR/extract.ok ]; then\n  rm $ADDON_DIR/extract.ok\nfi\n\nif [ -d $ADDON_DIR/chrome-bin ]; then\n  rm -rf $ADDON_DIR/chrome-bin\nfi\n\nif [ -d $ADDON_DIR/tmp_download ]; then\n  rm -rf $ADDON_DIR/tmp_download\nfi\n\n# create tmp download dir\nmkdir -p $ADDON_DIR/tmp_download\ncd $ADDON_DIR/tmp_download\n\necho \"Downloading Chrome\"\n\n# download chrome\nrm -f ${CONTROL_FILE} ${DATA_FILE}\n(\n  curl -# -O -C - https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/${CHROME_FILE} 2>${DATA_FILE}\n  touch ${CONTROL_FILE}\n) | \\\n  while [ : ]; do\n    [ -f ${DATA_FILE} ] && prog=\"$(tr '\\r' '\\n' < ${DATA_FILE} | tail -n 1 | sed -r 's/^[# ]+/#/;s/^[^0-9]*//g')\" || prog=\n    kodi-send --action=\"Notification(Downloading Chrome,\\\"${prog:-0.0%}\\\",3000,${ICON})\" >/dev/null\n    [ -f ${CONTROL_FILE} ] && break\n    sleep 4\n  done\n\nrm -f ${CONTROL_FILE} ${DATA_FILE}\n\n## extract chrome\n# extrat chrome.deb data to temp\nkodi-send --action=\"Notification(Extracting Chrome,starting,1000,${ICON})\" >/dev/null\ndeb_extract_data ${CHROME_FILE} $ADDON_DIR/tmp_download\n\nmv opt/google/chrome $ADDON_DIR/chrome-bin\n\n# cleanup\ncd $ADDON_DIR\nrm -rf $ADDON_DIR/tmp_download\n\nif [ -d chrome-bin ]; then\n  touch $ADDON_DIR/extract.ok\n  kodi-send --action=\"Notification(Extracting Chrome,finished,1000,${ICON})\" >/dev/null\nelse\n  kodi-send --action=\"Notification(Extracting Chrome,FAILED!,10000,${ICON})\" >/dev/null\nfi\n"
  },
  {
    "path": "packages/addons/browser/chrome/source/bin/chrome-start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n. /etc/profile\noe_setup_addon browser.chrome\n\n# check if chrome is already successful installed\nif [ ! -f \"$ADDON_DIR/extract.ok\" ]; then\n  cd $ADDON_DIR\n  chrome-downloader\nfi\n\nif [ -e $ADDON_HOME/env ]\nthen\n  . $ADDON_HOME/env\nfi\n\n# fix file permissons (zip packaging)\nchmod +x $ADDON_DIR/chrome-bin/chrome\nchmod 4755 $ADDON_DIR/chrome-bin/chrome-sandbox\n\n# make sure we use \"own\" gtk/pango/nss/etc\nexport LD_LIBRARY_PATH=$ADDON_DIR/lib\n\n# configure pango/pixbuf\nexport PANGO_RC_FILE=$ADDON_DIR/config/pangorc\nexport GDK_PIXBUF_MODULE_FILE=$ADDON_DIR/config/pixbuf.loaders.cache\n\n# font rendering in gtk widgets is brokeen with nvidia blob. use our Xdefaults\nexport XENVIRONMENT=$ADDON_DIR/config/Xdefaults\n\n# start unclutter\nif [ \"$HIDE_CURSOR\" == \"true\" ]\nthen\n  unclutter &\n  UNCLUTTER_PID=$!\nfi\n\n# vaapi\nLIBVA_DRIVERS_PATH=\"/usr/lib/dri:$ADDON_DIR/lib\"\nLIBVA_DRIVER_NAME=''\ncase $VAAPI_MODE in\n  'intel')\n      LIBVA_DRIVER_NAME='i965'\n      chrome_OPTS=\"$chrome_OPTS --use-gl=desktop --enable-features=VaapiVideoDecoder\"\n      ;;\n  'amd')\n      LIBVA_DRIVER_NAME='vdpau'\n      chrome_OPTS=\"$chrome_OPTS --use-gl=desktop --enable-features=VaapiVideoDecoder\"\n      ;;\n  'nvidia')\n      LIBVA_DRIVER_NAME='vdpau'\n      chrome_OPTS=\"$chrome_OPTS --use-gl=desktop --enable-features=VaapiVideoDecoder --allow-no-sandbox-job --disable-gpu-sandbox\"\n      ;;\n  *)\n      LIBGL_ALWAYS_SOFTWARE='1'\n      export LIBGL_ALWAYS_SOFTWARE\nesac\nexport LIBVA_DRIVER_NAME LIBVA_DRIVERS_PATH\n\n# windowed\ncase $WINDOW_MODE in\n  'maximized') chrome_OPTS=\"$chrome_OPTS --start-maximized\";;\n  'kiosk') chrome_OPTS=\"$chrome_OPTS --kiosk\";;\nesac\n\n# rasterization\ncase $RASTER_MODE in\n  'off') chrome_OPTS=\"$chrome_OPTS --disable-accelerated-2d-canvas --disable-gpu-compositing\";;\n  'force') chrome_OPTS=\"$chrome_OPTS --enable-gpu-rasterization --enable-accelerated-2d-canvas --ignore-gpu-blacklist\";;\nesac\n\n# alsa\nif [ \"$AUDIO_DEVICE_TYPE\" == \"ALSA\" ]; then\n  # stop pulseaudio when using an Alsa device\n  systemctl stop pulseaudio\n  if [ ! -z $ALSA_DEVICE ]; then\n    chrome_OPTS=\"$chrome_OPTS --alsa-output-device=$ALSA_DEVICE\"\n  fi\nfi\n\n# dark mode\nif [ \"$DARK_MODE\" == \"true\" ]\nthen\n  chrome_OPTS=\"$chrome_OPTS --force-dark-mode\"\nfi\n\n# User-Agent\nif [ ! -z \"$USER_AGENT\" ]; then\n  USER_AGENT=\"--user-agent=$USER_AGENT\"\nfi\n\n# start chrome\nLD_PRELOAD=/usr/lib/libGL.so $ADDON_DIR/chrome-bin/chrome \\\n  $chrome_OPTS \\\n  \"$USER_AGENT\" \\\n  --no-sandbox \\\n  --user-data-dir=$ADDON_HOME/profile \\\n  --test-type $@ \\\n  2>&1 | tee $ADDON_LOG_FILE\n\n# kill unclutter\nif [ \"$HIDE_CURSOR\" == \"true\" ]\nthen\n  kill $UNCLUTTER_PID\nfi\n\nsleep 5\nif [ \"$AUDIO_DEVICE_TYPE\" == \"ALSA\" ]; then\n  # restart pulseaudio when using an Alsa device\n  systemctl start pulseaudio\nfi\n"
  },
  {
    "path": "packages/addons/browser/chrome/source/bin/deb_extract_data",
    "content": "#!/usr/bin/python3\n\n# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nimport sys\nsys.path.append('/storage/.kodi/addons/browser.chrome/resources')\nimport unix_ar\nimport tarfile\n\nif len(sys.argv) != 3:\n    print(\"Parameter error\", file=sys.stderr)\n    sys.exit(1)\n\nar = unix_ar.open(sys.argv[1])\ntarball = ar.open('data.tar.xz/')\ntar = tarfile.open(fileobj=tarball)\ntar.extractall(path=sys.argv[2])\n"
  },
  {
    "path": "packages/addons/browser/chrome/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nimport json\nimport linecache\nimport os\nimport shlex\nimport subprocess\nimport sys\nimport time\n\nimport xbmc\nimport xbmcaddon\n\n\n__addon__ = xbmcaddon.Addon();\n__path__  = os.path.join(__addon__.getAddonInfo('path'), 'bin')\n\npauseXBMC = __addon__.getSetting(\"PAUSE_XBMC\")\n\ndef pauseXbmc():\n  if pauseXBMC == \"true\":\n    xbmc.executebuiltin(\"PlayerControl(Stop)\")\n    xbmc.audioSuspend()\n    xbmc.enableNavSounds(False)\n\ndef resumeXbmc():\n  if pauseXBMC == \"true\":\n    xbmc.audioResume()\n    xbmc.enableNavSounds(True)\n\ndef _print_exception():\n  exc_type, exc_obj, tb = sys.exc_info()\n  frame = tb.tb_frame\n  lineno = tb.tb_lineno\n  filename = frame.f_code.co_filename\n  linecache.checkcache(filename)\n  line = linecache.getline(filename, lineno, frame.f_globals)\n  xbmc.log(f'## Chrome Addon Error: in ({filename}, line {lineno}\\n\"{line.strip()}\"):\\n{repr(exc_obj)}', xbmc.LOGERROR)\n\ndef startchrome(args):\n  try:\n    chrome_env = {\n      'VAAPI_MODE': __addon__.getSetting('VAAPI_MODE'),\n      'WINDOW_MODE': __addon__.getSetting('WINDOW_MODE'),\n      'RASTER_MODE': __addon__.getSetting('RASTER_MODE'),\n      'DARK_MODE': __addon__.getSetting('DARK_MODE')\n    }\n\n    # sound settings as environment variable\n    if __addon__.getSetting('USE_CUST_AUDIODEVICE') == 'true':\n      audio_device = __addon__.getSetting('CUST_AUDIODEVICE_STR')\n    else:\n      audio_device = getAudioDevice()\n    chrome_env['AUDIO_DEVICE_TYPE'] = getAudioDeviceType(audio_device)\n    if chrome_env['AUDIO_DEVICE_TYPE'] == 'ALSA':\n      alsa_device = getAlsaAudioDevice(audio_device)\n      chrome_env['ALSA_DEVICE'] = alsa_device if alsa_device else ''\n\n    # chrome user-agent string\n    if __addon__.getSetting('USE_CUST_USERAGENT') == 'true':\n      chrome_env['USER_AGENT'] = __addon__.getSetting('CUST_USERAGENT_STR')\n\n    # launch chrome\n    new_env = os.environ.copy()\n    new_env.update(chrome_env)\n    chrome_execute = ([os.path.join(__path__, 'chrome-start')]\n                      + args\n                      + [__addon__.getSetting('HOMEPAGE')])\n    subprocess.call(chrome_execute, env=new_env)\n  except Exception:\n    _print_exception()\n    xbmc.log(f'## Chrome Addon Error: chrome env: {chrome_env}, audio device: {audio_device}', xbmc.LOGERROR)\n\ndef isRunning(pname):\n  '''Returns True/False if pname is running'''\n  running_commands = subprocess.run(shlex.split('ps -Ao comm'), text=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\n  return pname in running_commands.stdout\n\ndef getAudioDevice():\n  return json.loads(xbmc.executeJSONRPC(json.dumps({\n                      \"jsonrpc\": \"2.0\",\n                      \"method\": \"Settings.GetSettingValue\",\n                      \"params\": {\n                                  \"setting\": \"audiooutput.audiodevice\",\n                                },\n                      \"id\": 1,\n                   })))['result']['value']\n\ndef getAudioDeviceType(dev):\n  if dev:\n    if dev.startswith(\"ALSA:\"):\n      return \"ALSA\"\n    elif dev.startswith(\"PULSE:\"):\n      return \"PULSE\"\n    else:\n      # backwards compatibility of device string\n      return \"ALSA\"\n  return \"ALSA\"\n\ndef getAlsaAudioDevice(dev):\n  if not dev.startswith('ALSA:'):\n    return dev\n  dev = dev.split(\"ALSA:\")[1]\n  if dev == \"@\":\n    return None\n  if dev.startswith(\"@:\"):\n    dev = dev.split(\"@:\")[1]\n  if dev.startswith(\"CARD=\"):\n    dev = f'plughw:{dev}'\n  return dev\n\nif (not __addon__.getSetting(\"firstrun\")):\n  __addon__.setSetting(\"firstrun\", \"1\")\n  __addon__.openSettings()\n\ntry:\n  args = sys.argv[1:]\nexcept Exception:\n  args = ''\n\nif args == 'widevine':\n  install_widevine()\nelif args == 'flash':\n  install_flash()\nelse:\n  if not isRunning('chrome'):\n    pauseXbmc()\n    startchrome(args)\n    while isRunning('chrome'):\n      time.sleep(1)\n    resumeXbmc()\n\ndel __addon__\n"
  },
  {
    "path": "packages/addons/browser/chrome/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: chrome\n# Addon id: browser.chrome\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"General\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Chrome Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"Stop Kodi Player and Suspend AudioEngine\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"HW Acceleration Mode\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"Rasterization Mode\"\nmsgstr \"\"\n\nmsgctxt \"#30005\"\nmsgid \"Window Mode\"\nmsgstr \"\"\n\nmsgctxt \"#30006\"\nmsgid \"Default Homepage\"\nmsgstr \"\"\n\nmsgctxt \"#30007\"\nmsgid \"Use Custom Audio Device\"\nmsgstr \"\"\n\nmsgctxt \"#30008\"\nmsgid \"Audio Device\"\nmsgstr \"\"\n\nmsgctxt \"#30009\"\nmsgid \"Hide Cursor\"\nmsgstr \"\"\n\nmsgctxt \"#30010\"\nmsgid \"Dark Mode\"\nmsgstr \"\"\n\nmsgctxt \"#30011\"\nmsgid \"Use Custom User-Agent\"\nmsgstr \"\"\n\nmsgctxt \"#30012\"\nmsgid \"User-Agent\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/browser/chrome/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n    <category label=\"30000\">\n        <setting label=\"30001\" type=\"lsep\"/>\n        <setting type=\"sep\" />\n        <setting id=\"PAUSE_XBMC\" type=\"bool\" label=\"30002\" default=\"true\" />\n        <setting id=\"VAAPI_MODE\" type=\"labelenum\" label=\"30003\" values=\"off|intel|amd|nvidia\" default=\"intel\"/>\n        <setting id=\"RASTER_MODE\" type=\"labelenum\" label=\"30004\" values=\"default|off|force\" default=\"default\" subsetting=\"true\" enable=\"!eq(-1,0)\"/>\n        <setting id=\"WINDOW_MODE\" type=\"labelenum\" label=\"30005\" values=\"maximized|kiosk|none\" default=\"maximized\" />\n        <setting id=\"HOMEPAGE\" type=\"text\" label=\"30006\" default=\"https://libreelec.tv\" />\n        <setting id=\"USE_CUST_AUDIODEVICE\" type=\"bool\" label=\"30007\" default=\"false\" />\n        <setting id=\"CUST_AUDIODEVICE_STR\" type=\"text\" label=\"30008\" visible=\"eq(-1,true)\" subsetting=\"true\" default=\"\" />\n        <setting id=\"HIDE_CURSOR\" type=\"bool\" label=\"30009\" default=\"false\" />\n        <setting id=\"DARK_MODE\" type=\"bool\" label=\"30010\" default=\"false\" />\n        <setting id=\"USE_CUST_USERAGENT\" type=\"bool\" label=\"30011\" default=\"false\" />\n        <setting id=\"CUST_USERAGENT_STR\" type=\"text\" label=\"30012\" visible=\"eq(-1,true)\" subsetting=\"true\" default=\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/@CHROME_VERSION@\" />\n    </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/browser/chrome/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"CUST_AUDIODEVICE_STR\" default=\"true\"></setting>\n    <setting id=\"HIDE_CURSOR\" default=\"true\">false</setting>\n    <setting id=\"HOMEPAGE\" default=\"true\">https://libreelec.tv</setting>\n    <setting id=\"PAUSE_XBMC\">true</setting>\n    <setting id=\"RASTER_MODE\" default=\"true\">default</setting>\n    <setting id=\"USE_CUST_AUDIODEVICE\" default=\"true\">false</setting>\n    <setting id=\"VAAPI_MODE\" default=\"true\">intel</setting>\n    <setting id=\"WINDOW_MODE\" default=\"true\">maximized</setting>\n    <setting id=\"DARK_MODE\" default=\"true\">false</setting>   \n    <setting id=\"USE_CUST_USERAGENT\" default=\"true\">false</setting>\n    <setting id=\"CUST_USERAGENT_STR\" default=\"true\">Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/@CHROME_VERSION@</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/browser/chromium/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"chromium\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"browser\"\nPKG_SHORTDESC=\"Add-on removed\"\nPKG_LONGDESC=\"Add-on removed\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_ADDON_BROKEN=\"Chromium is no longer maintained and has been superseded by Chrome.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Chromium\"\nPKG_ADDON_TYPE=\"xbmc.broken\"\n\naddon() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/driver/hdhomerun/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/driver/hdhomerun/config/dvbhdhomerun.sample",
    "content": "# Remember to exchange the XXXXYYYY-Z with the serial number of your HDHomeRun\n# tuner:\n\n# Auto detect tuner type is not possible in all cases, so you can force it\n# DVB-C\n# DVB-T\n# ATSC\n\n[XXXXYYYY-0]\ntuner_type=DVB-T\n\n[XXXXYYYY-1]\ntuner_type=DVB-C\n\n# You can use a full name including tuner ID. Meaning the tuner will appear as\n# \"HDHomeRun DVB-C 1234EA3D-0\" instead of just \"HDHomeRun DVB-C\" in for example\n# TVHeadend.\n\n[XXXXYYYY-0]\nuse_full_name=true\n\n# You can disable certain tuners. As default all detected hdhomeruns are used\n\n[XXXXYYYY-2]\ndisable=true\n"
  },
  {
    "path": "packages/addons/driver/hdhomerun/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"hdhomerun\"\nPKG_VERSION=\"7.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.silicondust.com/products/hdhomerun/dvbt/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"driver/dvb\"\nPKG_SHORTDESC=\"HDHomeRun: a Linux driver to add support for HDHomeRun from silicondust.com\"\nPKG_LONGDESC=\"Install this to add support for HDHomeRun devices.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"HDHomeRun\"\nPKG_ADDON_TYPE=\"xbmc.python.script\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/config/\n  cp -P ${PKG_DIR}/config/* ${ADDON_BUILD}/${PKG_ADDON_ID}/config/\n  cp -P ${PKG_DIR}/settings-default.xml ${ADDON_BUILD}/${PKG_ADDON_ID}/\n}\n"
  },
  {
    "path": "packages/addons/driver/hdhomerun/settings-default.xml",
    "content": "<settings>\n  <setting id=\"PRE_WAIT\"  value=\"2\" />\n  <setting id=\"POST_WAIT\" value=\"1\" />\n  <setting id=\"USERHDHOMERUN_LOG\" value=\"false\" />\n  <setting id=\"LIBHDHOMERUN_LOG\" value=\"false\" />\n  <setting id=\"SUSPEND_DRIVER\" value=\"false\" />\n</settings>\n"
  },
  {
    "path": "packages/addons/driver/hdhomerun/source/bin/userspace-driver.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\n# start locking mechanism - allows only one instance to be run at a time\nHDHR_LOCKFILE=\"/var/lock/userspace-driver-hdhomerun.lck\"\nHDHR_LOCKFD=99\n# obtain an exclusive lock\nexlock() { eval \"exec $HDHR_LOCKFD>\\\"$HDHR_LOCKFILE\\\"\"; flock -x $HDHR_LOCKFD; }\n# drop a lock\nunlock() { flock -u $HDHR_LOCKFD; flock -xn $HDHR_LOCKFD && rm -f \"$HDHR_LOCKFILE\"; }\n# end locking mechanism\n\n# exclusive lock\nexlock\n\nHDHR_ADDON_DIR=\"$HOME/.kodi/addons/driver.dvb.hdhomerun\"\nHDHR_ADDON_HOME=\"$HOME/.kodi/userdata/addon_data/driver.dvb.hdhomerun\"\nHDHR_ADDON_SETTINGS=\"$HDHR_ADDON_HOME/settings.xml\"\n\n# modules are not automatically loaded\nmodprobe dvb_hdhomerun\nmodprobe dvb_hdhomerun_fe\n\nmkdir -p $HDHR_ADDON_HOME\n\nif [ ! -f \"$HDHR_ADDON_HOME/dvbhdhomerun.sample\" ]; then\n  cp $HDHR_ADDON_DIR/config/* $HDHR_ADDON_HOME/\nfi\n\nif [ ! -f \"$HDHR_ADDON_SETTINGS\" ]; then\n  cp $HDHR_ADDON_DIR/settings-default.xml $HDHR_ADDON_SETTINGS\nfi\n\nmkdir -p /var/config\n\n# check settings version\nXML_SETTINGS_VER=\"$(xmlstarlet sel -t -m settings -v @version $HDHR_ADDON_SETTINGS)\"\nif [ \"$XML_SETTINGS_VER\" = \"2\" ]; then\n  xmlstarlet sel -t -m settings/setting -v @id -o \"=\\\"\" -v . -o \"\\\"\" -n \"$HDHR_ADDON_SETTINGS\" > /var/config/hdhomerun-addon.conf\nelse\n  xmlstarlet sel -t -m settings -m setting -v @id -o \"=\\\"\" -v @value -o \"\\\"\" -n \"$HDHR_ADDON_SETTINGS\" > /var/config/hdhomerun-addon.conf\nfi\n\n. /var/config/hdhomerun-addon.conf\n\nif [ -z \"$(pidof userhdhomerun)\" ]; then\n  if [ \"$ENABLE_TUNER_TYPES\" = \"true\" ]; then\n    DVBHDHOMERUN_CONF_TMP=/tmp/dvbhdhomerun.conf\n    touch $HDHR_ADDON_HOME/dvbhdhomerun.conf\n    cp $HDHR_ADDON_HOME/dvbhdhomerun.conf $DVBHDHOMERUN_CONF_TMP\n\n    # get tuner serial numbers\n    SERIALS=$(cat /var/config/hdhomerun-addon.conf | sed -n 's|^ATTACHED_TUNER_\\(.*\\)_DVBMODE=.*|\\1|gp' | sort | uniq)\n    . /var/config/hdhomerun-addon.conf\n\n    for SERIAL_UNIQ in $SERIALS; do\n      DVBMODE=$(eval echo \\$ATTACHED_TUNER_${SERIAL_UNIQ}_DVBMODE)\n      FULLNAME=$(eval echo \\$ATTACHED_TUNER_${SERIAL_UNIQ}_FULLNAME)\n      DISABLE=$(eval echo \\$ATTACHED_TUNER_${SERIAL_UNIQ}_DISABLE)\n      NUMBERS=$(eval echo \\$ATTACHED_TUNER_${SERIAL_UNIQ}_NUMBERS)\n\n      NUMBERS=$(( $NUMBERS -1 ))\n      NUMBERS=$(( $NUMBERS *1 ))\n\n      for i in $(seq 0 $NUMBERS); do\n        SERIAL=\"$SERIAL_UNIQ-$i\"\n\n        [ \"$DVBMODE\" = \"auto\" ] && DVBMODE=\"\"\n\n        # remove setttings for this tuner\n        awk -v val=\"[$SERIAL]\" '$0 == val {flag=1; next} /^tuner_type=|^use_full_name=|^disable=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $DVBHDHOMERUN_CONF_TMP >${DVBHDHOMERUN_CONF_TMP}-types\n        mv ${DVBHDHOMERUN_CONF_TMP}-types $DVBHDHOMERUN_CONF_TMP\n        echo \"\" >>$DVBHDHOMERUN_CONF_TMP\n        # remove empty lines at the end of file\n        sed -i -e ':a' -e '/^\\n*$/{$d;N;};/\\n$/ba' $DVBHDHOMERUN_CONF_TMP\n\n        ADDNEW=true\n        if [ -n \"$DVBMODE\" ]; then\n          [ $ADDNEW = true ] && ADDNEW=false && echo \"[$SERIAL]\" >>$DVBHDHOMERUN_CONF_TMP\n          echo \"tuner_type=$DVBMODE\" >>$DVBHDHOMERUN_CONF_TMP\n        fi\n        if [ \"$FULLNAME\" = \"true\" ]; then\n          [ $ADDNEW = true ] && ADDNEW=false && echo \"[$SERIAL]\" >>$DVBHDHOMERUN_CONF_TMP\n          echo \"use_full_name=true\" >>$DVBHDHOMERUN_CONF_TMP\n        fi\n        if [ \"$DISABLE\" = \"true\" ]; then\n          [ $ADDNEW = true ] && ADDNEW=false && echo \"[$SERIAL]\" >>$DVBHDHOMERUN_CONF_TMP\n          echo \"disable=true\" >>$DVBHDHOMERUN_CONF_TMP\n        fi\n\n        echo \"\" >>$DVBHDHOMERUN_CONF_TMP\n      done\n    done\n\n    # remove logging from libhdhomerun library\n    awk -v val=\"[libhdhomerun]\" '$0 == val {flag=1; next} /^enable=|^logfile=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $DVBHDHOMERUN_CONF_TMP >${DVBHDHOMERUN_CONF_TMP}-log\n    mv ${DVBHDHOMERUN_CONF_TMP}-log $DVBHDHOMERUN_CONF_TMP\n    echo \"\" >>$DVBHDHOMERUN_CONF_TMP\n    # remove empty lines at the end of file\n    sed -i -e ':a' -e '/^\\n*$/{$d;N;};/\\n$/ba' $DVBHDHOMERUN_CONF_TMP\n\n    if [ \"$LIBHDHOMERUN_LOG\" = \"true\" ]; then\n      cat >>$DVBHDHOMERUN_CONF_TMP << EOF\n\n[libhdhomerun]\nenable=true\nlogfile=/var/log/dvbhdhomerun_libhdhomerun.log\n\nEOF\n    fi\n\n    md5_1=$(md5sum -b $DVBHDHOMERUN_CONF_TMP | awk '{print $1}')\n    md5_2=$(md5sum -b $HDHR_ADDON_HOME/dvbhdhomerun.conf | awk '{print $1}')\n    if [ \"$md5_1\" != \"$md5_2\" ]; then\n      # file changed - copy to addon home\n      cp $DVBHDHOMERUN_CONF_TMP $HDHR_ADDON_HOME/dvbhdhomerun.conf\n    fi\n  fi\n\n  rm -f /tmp/dvbhdhomerun\n  if [ -f $HDHR_ADDON_HOME/dvbhdhomerun.conf ]; then\n    ln -s $HDHR_ADDON_HOME/dvbhdhomerun.conf /tmp/dvbhdhomerun\n  fi\n\n  [ -z \"$PRE_WAIT\" ] && PRE_WAIT=0\n  PRE_WAIT=$(( $PRE_WAIT *1 ))\n  [ -z \"$POST_WAIT\" ] && POST_WAIT=0\n  POST_WAIT=$(( $POST_WAIT *1 ))\n\n  logger -t HDHomeRun \"### Pre wait for $PRE_WAIT sec ###\"\n  sleep $PRE_WAIT\n\n  mkdir -p /var/log/\n  rm -f /var/log/dvbhdhomerun.log\n\n  if [ \"$USERHDHOMERUN_LOG\" = \"true\" ]; then\n    userhdhomerun -f\n  else\n    userhdhomerun -f -d\n  fi\n\n  logger -t HDHomeRun \"### Post wait for $POST_WAIT sec ###\"\n  sleep $POST_WAIT\n\n# save adapter names in background\n(\n  sleep 4\n  sn_old=$(cat $HDHR_ADDON_HOME/adapters.txt 2>/dev/null)\n  sn_new=$(grep \"Name of device: \" /var/log/dvbhdhomerun.log)\n  if [ \"$sn_old\" != \"$sn_new\" ]; then\n    echo -n $sn_new >$HDHR_ADDON_HOME/adapters.txt\n  fi\n)&\nfi\n\nlogger -t HDHomeRun \"### HDHomeRun ready ###\"\n\n# unlock the lock\nunlock\n"
  },
  {
    "path": "packages/addons/driver/hdhomerun/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n"
  },
  {
    "path": "packages/addons/driver/hdhomerun/source/resources/actions.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nimport os\nimport sys\nimport xbmcaddon\nimport xbmcvfs\n\n__settings__      = xbmcaddon.Addon(id = 'driver.dvb.hdhomerun')\n__cwd__           = __settings__.getAddonInfo('path')\n__resources_lib__ = xbmcvfs.translatePath(os.path.join(__cwd__, 'resources', 'lib'))\n__settings_xml__  = xbmcvfs.translatePath(os.path.join(__cwd__, 'resources', 'settings.xml'))\n\nif len(sys.argv) == 2 and sys.argv[1] == 'refresh_tuners':\n  sys.path.append(__resources_lib__)\n  from functions import refresh_hdhomerun_tuners\n  refresh_hdhomerun_tuners(__settings_xml__)\n  __settings__.openSettings()\n"
  },
  {
    "path": "packages/addons/driver/hdhomerun/source/resources/language/English/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<strings>\n  <string id=\"1000\">General</string>\n  <string id=\"1020\">Pre wait time [sec]</string>\n  <string id=\"1030\">Post wait time [sec]</string>\n  <string id=\"1040\">Enable userhdhomerun logging</string>\n  <string id=\"1050\">Enable libhdhomerun logging</string>\n  <string id=\"1060\">Enable suspend/resume the driver</string>\n\n  <string id=\"9000\">Tuner settings</string>\n  <string id=\"9005\">Enable modifying settings</string>\n  <string id=\"9010\">Refresh tuners... (press me)</string>\n  <string id=\"9020\">    use full name</string>\n  <string id=\"9025\">    number of tuners</string>\n  <string id=\"9030\">    disabled</string>\n</strings>\n"
  },
  {
    "path": "packages/addons/driver/hdhomerun/source/resources/lib/functions.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)\n\nimport os\nimport sys\nimport re\nimport subprocess\nimport shutil\nimport xmlpp\nfrom xml.dom import minidom\n\n__sundtek_userspace__ = '/storage/.kodi/userdata/addon_data/driver.dvb.sundtek-mediatv/'\n\n######################################################################################################\n# backup setting.xml file only if backup doesn't exist\ndef settings_backup(settings_xml):\n  try:\n    with open(settings_xml + '_orig') as f: pass\n  except IOError as e:\n    shutil.copyfile(settings_xml, settings_xml + '_orig')\n\n######################################################################################################\n# restore setting.xml file from backup\ndef settings_restore(settings_xml):\n  try:\n    shutil.copyfile(settings_xml + '_orig', settings_xml)\n  except IOError as e:\n    print 'Error restoring file:', settings_xml\n\n######################################################################################################\n# get hdhomerun supported devices on a system (only name like 101ADD2B-0)\ndef get_devices_hdhomerun():\n  tuners = []\n  try:\n    p = os.popen(\"hdhomerun_config discover\", \"r\")\n    while 1:\n      line = p.readline()\n      if not line:\n        break\n      else:\n        str = line.strip()\n        match = re.search(r'hdhomerun device (.+) found at .+', line)\n        if match:\n          name = match.group(1)\n          print name\n          tuners.append(name)\n  except IOError:\n    print 'Error getting hdhomerun tuners info'\n  return tuners\n\n  \"\"\"\nlibreelec:~ # hdhomerun_config discover\nhdhomerun device 12345678 found at 192.168.0.3\n  \"\"\"\n\n######################################################################################################\n# get sundtek supported devices on a system (name, serial number, type)\ndef get_devices_sundtek(mediaclient_e):\n  tuners = []\n  try:\n    p = os.popen(mediaclient_e, \"r\")\n    while 1:\n      line = p.readline()\n      if not line:\n        break\n      else:\n        str = line.strip()\n        if str.startswith('device '):\n          name = str[str.find(\"[\")+1:str.find(\"]\")]\n          tuners.append([name, 0, 's'])\n\n        if str.startswith('[SERIAL]:'):\n          line = p.readline()\n          str = line.strip()\n          if str.startswith('ID:'):\n            id = str.split(':');\n            id = id[1].strip()\n            tuners[len(tuners)-1] = [name, id, 's']\n\n        if str.startswith('[DVB-C]:'):\n          tuners[len(tuners)-1] = [name, id, 'c']\n        elif str.startswith('[DVB-T]:'):\n          tuners[len(tuners)-1] = [name, id, 'c']\n        elif str.startswith('[DVB-T2]:'):\n          tuners[len(tuners)-1] = [name, id, 'c']\n  except IOError:\n    print 'Error getting sundtek tuners info'\n  return tuners\n\n  \"\"\"\nroot ~ # mediaclient -e\n**** List of Media Hardware Devices ****\ndevice 0: [Sundtek MediaTV Pro (USB 2.0)]  DVB-C, DVB-T, ANALOG-TV, FM-RADIO, REMOTE-CONTROL, OSS-AUDIO, RDS\n  [BUS]:\n     ID: 1-7\n  [SERIAL]:\n     ID: U110763295205\n  [DVB-C]:\n     FRONTEND: /dev/dvb/adapter0/frontend0\n     DVR: /dev/dvb/adapter0/dvr0\n     DMX: /dev/dvb/adapter0/demux0\n  [DVB-T]:\n     FRONTEND: /dev/dvb/adapter0/frontend0\n     DVR: /dev/dvb/adapter0/dvr0\n     DMX: /dev/dvb/adapter0/demux0\n  [ANALOG-TV]:\n     VIDEO0: /dev/video0\n     VBI0: /dev/vbi0\n  [FM-RADIO]:\n     RADIO0: /dev/radio0\n     RDS: /dev/rds0\n  [REMOTECONTROL]:\n     INPUT0: /dev/mediainput0\n  [OSS]:\n     OSS0: /dev/dsp0\n  \"\"\"\n\n######################################################################################################\n# parse settings.xml file\ndef parse_settings(settings_xml):\n  try:\n    xmldoc = minidom.parse(settings_xml)\n    category = xmldoc.getElementsByTagName('category')\n    return xmldoc\n  except Exception as inst:\n    print 'Error parse settings file', settings_xml\n    return None\n\n######################################################################################################\n# remove all nodes with id started with ATTACHED_TUNER_\ndef remove_old_tuners(xmldoc):\n  category = xmldoc.getElementsByTagName('category')\n  for node_cat in category:\n    setting = node_cat.getElementsByTagName('setting')\n    for node_set in setting :\n      if 'id' in node_set.attributes.keys() and not node_set.getAttribute('id').find('ATTACHED_TUNER_'):\n        node_set.parentNode.removeChild(node_set)\n\n######################################################################################################\n# add new hdhomerun tuners\ndef add_hdhomerun(xmldoc, node_cat, tuners):\n  for ix, tuner in enumerate(tuners):\n    #tuner_var = tuner.replace('-', '_')\n    tuner_var = tuner\n    print tuner\n\n    node1 = xmldoc.createElement(\"setting\")\n    node1.setAttribute(\"id\", 'ATTACHED_TUNER_' + tuner_var + '_DVBMODE')\n    node1.setAttribute(\"label\", \"tuner serial \" + tuner_var)\n    node1.setAttribute(\"type\", 'labelenum')\n    node1.setAttribute(\"default\", 'auto')\n    node1.setAttribute(\"values\", 'auto|ATSC|DVB-C|DVB-T')\n    node_cat.appendChild(node1)\n\n    node2 = xmldoc.createElement(\"setting\")\n    node2.setAttribute(\"id\", 'ATTACHED_TUNER_' + tuner_var + '_FULLNAME')\n    node2.setAttribute(\"label\", '9020')\n    node2.setAttribute(\"type\", 'bool')\n    node2.setAttribute(\"default\", 'false')\n    node_cat.appendChild(node2)\n\n    node3 = xmldoc.createElement(\"setting\")\n    node3.setAttribute(\"id\", 'ATTACHED_TUNER_' + tuner_var + '_NUMBERS')\n    node3.setAttribute(\"label\", '9025')\n    node3.setAttribute(\"type\", 'labelenum')\n    node3.setAttribute(\"default\", '2')\n    node3.setAttribute(\"values\", '1|2|3|4|5|6|7|8')\n    node_cat.appendChild(node3)\n\n    node4 = xmldoc.createElement(\"setting\")\n    node4.setAttribute(\"id\", 'ATTACHED_TUNER_' + tuner_var + '_DISABLE')\n    node4.setAttribute(\"label\", '9030')\n    node4.setAttribute(\"type\", 'bool')\n    node4.setAttribute(\"default\", 'false')\n    node_cat.appendChild(node4)\n\n  # for tuner\n\n######################################################################################################\n# add new sundtek tuners\ndef add_sundtek(xmldoc, node_cat, tuners):\n  for ix, tuner in enumerate(tuners):\n    tuner_name   = tuner[0]\n    tuner_serial = tuner[1]\n    tuner_type   = tuner[2]\n\n    node1 = xmldoc.createElement(\"setting\")\n    node1.setAttribute(\"id\", 'ATTACHED_TUNER_' + tuner_serial + '_DVBMODE')\n    node1.setAttribute(\"label\", tuner_name + \", \" + tuner_serial)\n    node1.setAttribute(\"type\", 'labelenum')\n\n    if (tuner_type == 's'):\n      node1.setAttribute(\"default\", 'DVB-S')\n      node1.setAttribute(\"values\", 'DVB-S')\n    else:\n      node1.setAttribute(\"default\", 'DVB-C')\n      node1.setAttribute(\"values\", 'DVB-C|DVB-T')\n\n    node_cat.appendChild(node1)\n\n    node2 = xmldoc.createElement(\"setting\")\n    node2.setAttribute(\"id\", 'ATTACHED_TUNER_' + tuner_serial + '_IRPROT')\n    node2.setAttribute(\"label\", '9020')\n    node2.setAttribute(\"type\", 'labelenum')\n    node2.setAttribute(\"default\", 'auto')\n    node2.setAttribute(\"values\", 'auto|RC5|NEC|RC6')\n    node_cat.appendChild(node2)\n\n    node3 = xmldoc.createElement(\"setting\")\n    node3.setAttribute(\"id\", 'ATTACHED_TUNER_' + tuner_serial + '_KEYMAP')\n    node3.setAttribute(\"label\", '9030')\n    node3.setAttribute(\"type\", 'file')\n    node3.setAttribute(\"mask\", '*.map')\n    node3.setAttribute(\"default\", __sundtek_userspace__)\n    node_cat.appendChild(node3)\n\n  # for tuner\n\n######################################################################################################\n# add new ATTACHED_TUNER_ nodes for available tuners\ndef add_new_tuners(xmldoc, tuners, which):\n  category = xmldoc.getElementsByTagName('category')\n  for node_cat in category:\n    setting = node_cat.getElementsByTagName('setting')\n    for node_set in setting :\n      if 'label' in node_set.attributes.keys() and '9010' in node_set.getAttribute('label'):\n        if which == 'hdhomerun':\n          add_hdhomerun(xmldoc, node_cat, tuners)\n          break\n        elif which == 'sundtek':\n          add_sundtek(xmldoc, node_cat, tuners)\n          break\n\n\n######################################################################################################\n# save settings.xml file back\ndef save_settings(settings_xml, xmldoc):\n  try:\n    outputfile = open(settings_xml, 'w')\n    xmlpp.pprint(xmldoc.toxml(), output = outputfile, indent=2)\n    outputfile.close()\n  except IOError:\n    print 'Error saving file:', settings_xml\n    settings_restore(settings_xml)\n\n######################################################################################################\n# refresh hdhomerun tuners in settings.xml file\ndef refresh_hdhomerun_tuners(settings_xml):\n  settings_backup(settings_xml)\n  tuners = get_devices_hdhomerun()\n  xmldoc = parse_settings(settings_xml)\n  if xmldoc == None:\n    print 'No hdhomerun tuners found'\n  else:\n    remove_old_tuners(xmldoc)\n    add_new_tuners(xmldoc, tuners, 'hdhomerun')\n    save_settings(settings_xml, xmldoc)\n\n######################################################################################################\n# refresh sundtek tuners in settings.xml file\ndef refresh_sundtek_tuners(settings_xml, mediaclient_e):\n  settings_backup(settings_xml)\n  tuners = get_devices_sundtek(mediaclient_e)\n  xmldoc = parse_settings(settings_xml)\n  if xmldoc == None:\n    print 'No sundtek tuners found'\n  else:\n    remove_old_tuners(xmldoc)\n    add_new_tuners(xmldoc, tuners, 'sundtek')\n    save_settings(settings_xml, xmldoc)\n"
  },
  {
    "path": "packages/addons/driver/hdhomerun/source/resources/lib/xmlpp.py",
    "content": "\"\"\"Pretty print an XML document.\n\nLICENCE:\nCopyright (c) 2008, Fredrik Ekholdt\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without \nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, \nthis list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, \nthis list of conditions and the following disclaimer in the documentation \nand/or other materials provided with the distribution.\n\n* Neither the name of Fredrik Ekholdt nor the names of its contributors may be used to \nendorse or promote products derived from this software without specific prior \nwritten permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" \nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE \nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS \nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN \nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \nPOSSIBILITY OF SUCH DAMAGE.\"\"\"\n\nimport sys as _sys\nimport re as _re\n\ndef _usage(this_file):\n    return \"\"\"SYNOPSIS: pretty print an XML document\nUSAGE: python %s <filename> \\n\"\"\" % this_file\n\ndef _pprint_line(indent_level, line, width=100, output=_sys.stdout, ignore_contents = False):\n    if line.strip():\n        start = \"\"\n        number_chars = 0\n        for l in range(indent_level):\n            start = start + \" \"\n            number_chars = number_chars + 1\n        if not ignore_contents:\n            try:\n                elem_start = _re.findall(\"(\\<\\W{0,1}\\w+:\\w+) ?\", line)[0]\n                elem_finished = _re.findall(\"([?|\\]\\]/|\\-\\-]*\\>)\", line)[0] \n                #should not have *\n                attrs = _re.findall(\"(\\S*?\\=\\\".*?\\\")\", line)\n                output.write(start + elem_start)\n                number_chars = len(start + elem_start)\n                for attr in attrs:\n                    if (attrs.index(attr) + 1) == len(attrs):\n                        number_chars = number_chars + len(elem_finished)\n                    if (number_chars + len(attr) + 1) > width:\n                        output.write(\"\\n\")\n                        for i in range(len(start + elem_start) + 1):\n                            output.write(\" \")\n                        number_chars = len(start + elem_start) + 1 \n                    else:\n                        output.write(\" \")\n                        number_chars = number_chars + 1\n                    output.write(attr)\n                    number_chars = number_chars + len(attr)\n                output.write(elem_finished + \"\\n\")\n            except IndexError:\n                #give up pretty print this line\n                output.write(start + line + \"\\n\")\n        else:\n            output.write(start + line + \"\\n\")\n                \n\ndef _pprint_elem_content(indent_level, line, output=_sys.stdout):\n    if line.strip():\n        for l in range(indent_level):\n            output.write(\" \")\n        output.write(line + \"\\n\")\n\ndef _get_next_elem(data):\n    start_pos = data.find(\"<\")\n    end_pos = data.find(\">\") + 1\n    retval = data[start_pos:end_pos]\n    stopper = retval.rfind(\"/\")\n    ignore_contents = False\n    if stopper < retval.rfind(\"\\\"\"):\n        stopper = -1\n    single = (stopper > -1 and ((retval.find(\">\") - stopper) < (stopper - retval.find(\"<\"))))\n\n    ignore_excl = retval.find(\"<!\") > -1\n    ignore_question =  retval.find(\"<?\") > -1\n\n    if ignore_excl:\n        ignore_contents = True\n        cdata = retval.find(\"<![CDATA[\") > -1\n        if cdata:\n            end_pos = data.find(\"]]>\")\n            if end_pos > -1:\n                end_pos = end_pos + len(\"]]>\")\n                stopper = end_pos\n        else:\n            end_pos = data.find(\"-->\")\n            if end_pos > -1:\n                end_pos = end_pos + len(\"-->\")\n                stopper = end_pos\n        retval = data[start_pos:end_pos]\n\n    elif ignore_question:\n        end_pos = data.find(\"?>\") + len(\"?>\")\n    ignore = ignore_excl or ignore_question\n    \n    no_indent = ignore or single\n\n    \n    return start_pos, \\\n           end_pos, \\\n           stopper > -1, \\\n           no_indent, \\\n           ignore_contents\n\ndef get_pprint(xml, indent=4, width=80):\n    \"\"\"Returns the pretty printed xml \"\"\"\n    class out:\n        output = \"\"\n\n        def write(self, string): \n            self.output += string\n    out = out()\n    pprint(xml, output=out, indent=indent, width=width)\n    \n\n\n    return out.output\n\n\ndef pprint(xml, output=_sys.stdout, indent=4, width=80):\n    \"\"\"Pretty print xml. \n    Use output to select output stream. Default is sys.stdout\n    Use indent to select indentation level. Default is 4   \"\"\"\n    data = xml\n    indent_level = 0\n    start_pos, end_pos, is_stop, no_indent, ignore_contents  = _get_next_elem(data)\n    while ((start_pos > -1 and end_pos > -1)):\n        _pprint_elem_content(indent_level, data[:start_pos].strip(), \n                             output=output)\n        data = data[start_pos:]\n        if is_stop and not no_indent:\n            indent_level = indent_level - indent\n        _pprint_line(indent_level, \n                     data[:end_pos - start_pos], \n                     width=width,\n                     output=output,\n                     ignore_contents=ignore_contents)\n        data = data[end_pos - start_pos:]\n        if not is_stop and not no_indent :\n            indent_level = indent_level + indent\n\n        if not data:\n            break\n        else:\n            start_pos, end_pos, is_stop, no_indent, ignore_contents  = _get_next_elem(data)\n    \n\nif __name__ == \"__main__\":\n    if \"-h\" in _sys.argv or \"--help\" in _sys.argv:\n        _sys.stderr.write(_usage(_sys.argv[0]))\n        _sys.exit(1)\n    if len(_sys.argv) < 2:\n        _sys.stderr.write(_usage(_sys.argv[0]))\n        _sys.exit(1)\n    else:\n        filename = _sys.argv[1]\n        fh = open(filename)\n\n    pprint(fh.read(), output=_sys.stdout, indent=4, width=80)\n"
  },
  {
    "path": "packages/addons/driver/hdhomerun/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n  <category label=\"1000\" >\n    <setting type=\"sep\" />\n    <setting id=\"PRE_WAIT\"  type=\"number\" label=\"1020\" default=\"2\" />\n    <setting id=\"POST_WAIT\" type=\"number\" label=\"1030\" default=\"1\" />\n    <setting id=\"USERHDHOMERUN_LOG\" type=\"bool\" label=\"1040\" default=\"false\" />\n    <setting id=\"LIBHDHOMERUN_LOG\" type=\"bool\" label=\"1050\" default=\"false\" />\n    <setting id=\"SUSPEND_DRIVER\" type=\"bool\" label=\"1060\" default=\"false\" />\n  </category>\n  <category label=\"9000\">\n    <setting type=\"sep\" />\n    <setting id=\"ENABLE_TUNER_TYPES\" type=\"bool\" label=\"9005\" default=\"true\" />\n    <setting label=\"9010\" option=\"close\" type=\"action\" id=\"refresh_tuners\" action=\"RunScript($CWD/resources/actions.py, refresh_tuners)\" />\n  </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/driver/hdhomerun/source/sleep.d/99-hdhomerun.power",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\noe_setup_addon driver.dvb.hdhomerun\n\nif [ \"$SUSPEND_DRIVER\" = \"true\" ]; then\n  case \"$1\" in\n    pre)\n      killall -9 userhdhomerun &>/dev/null\n      rmmod dvb_hdhomerun_fe &>/dev/null\n      rmmod dvb_hdhomerun &>/dev/null\n      rmmod dvb_hdhomerun_core &>/dev/null\n      ;;\n    post)\n      ;;\n  esac\nfi\n"
  },
  {
    "path": "packages/addons/driver/imon-mce/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"imon-mce\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"driver/remote\"\nPKG_SHORTDESC=\"Add-on removed\"\nPKG_LONGDESC=\"Add-on removed\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_ADDON_BROKEN=\"iMON-MCE driver was removed, use .config/rc_maps.cfg instead.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"iMON-MCE\"\nPKG_ADDON_TYPE=\"xbmc.broken\"\n\naddon() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/driver/sapphire/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"sapphire\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"driver.remote\"\nPKG_SHORTDESC=\"Add-on removed\"\nPKG_LONGDESC=\"Add-on removed\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_ADDON_BROKEN=\"Sapphire Remote Driver was removed.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Sapphire Remote Driver\"\nPKG_ADDON_TYPE=\"xbmc.broken\"\n\naddon() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/driver/steamcontroller/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"steamcontroller\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"driver\"\nPKG_SHORTDESC=\"Add-on removed\"\nPKG_LONGDESC=\"Add-on removed\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_ADDON_BROKEN=\"Drivers are now natively supported by the kernel.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Steam Controller Driver\"\nPKG_ADDON_TYPE=\"xbmc.broken\"\n\naddon() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/config/sundtek.conf",
    "content": "#\n# sundtek.conf\n#\n\n# enable HW PID filter (default on for RPi)\nuse_hwpidfilter=off\n\n# enable listening on network\nenablenetwork=off\n\n# Lowest adapter number to start with, e.g. /dev/dvb/adapter5/frontend0\nfirst_adapter=0\n\n# Infrared Control Support is disabled/enabled\nir_disabled=1\n\n# trigger device_attach only once if more devices is used\nbulk_notification=on\n\n# Get adapter serial number with mediaclient -e\n# or look into file adapter_serial_number.txt\n#[SERIALNUMBER]\n# Choose initial DVB mode for hybrid DVB-T/DVB-C devices only\n#initial_dvb_mode=[DVBC|DVBT]\n# default mode is DVB-C, we must set it to DVB-T if needed\n#initial_dvb_mode=DVBT\n\n#[U123456789012]\n#initial_dvb_mode=DVBT\n#ir_disabled=1\n\n#[NETWORK]\n#device=192.168.1.1:0\n#device=192.168.1.1:1\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/config/sundtek.conf.full",
    "content": "#\n# sundtek.conf\n#\n# ----- GLOBAL SECTION -----\n#Set loglevel for logging to /var/log/mediasrv.log\n#loglevel=[off|max]\t\t\t#default: min\n\t\t\t\t\t#max .. little bit more debug\n#bulk_notification[on|off]              #default off, bulk_notification will only trigger device_attach once\n                                        #after the the first device scan when the driver is started up\n                                        #after this first scan, the notification will be triggered\n                                        #normally again for each device.\n                                        #\n                                        #for example when 2 devices are attached to the system only one\n                                        #notification will be triggered initially, any at a later time\n                                        #attached device will generate another device_attach notification\n                                        #by default each device will call the script which is set up with\n                                        #device_attach\n#use_hwpidfilter=[on|off]               #For DVB-C, DVB-T, DVB-S/S2\n                                        #enable PID filter, please be careful with that, there are only 15 HW Pid filters available\n                                        #when more than 15 pids are set up the pid filter will be disabled automatically\n\n#dmhwpidfilter=[on|off]                 #default on, in some cases off might be useful to disable hw pid filter for settopboxes\n                                        #if you get a black image when capturing a TV channel and watching another channel on the\n                                        #same transponder - try this option and reboot\n\n#usb_transaction_delay=[0-20]           #throttle the USB setup transactions, this can solve problems with weak USB stacks for\n                                        #example for embedded boards, unit is milliseconds\n\n#usb_timeout=[0 - N]                    #USB timeout for each transaction in milliseconds, 0 default infinite\n#voltage_tone_off=[1 or 0]              #0 .. default, normal behaviour\n                                        #1 .. force DVB-S/S2 to not use any Voltage or Tone (ignore any user parameters)\n                                        \n#ir_disabled=[1 or 0]                   #0 .. enable remote control polling, the driver will permanently check for remote control keys\n                                        #1 .. disable remote control polling, might fix bugs with weak USB stacks on embedded boards\n\n#\n#Enable listening on network\n#enablenetwork=[on|off]\t\t\t#default: off\n\n#Lowest adapter number to start with, e.g. /dev/dvb/adapter5/frontend0\n#first_adapter=5\n\n#Lowest videodevice number to start with, e.g. /dev/video5\n#first_videodev=5\n\n#Call attach script when new device appears\n#device_attach=[PATH_TO_SCRIPT] [PARAMETER|DEVID]\t#\"DEVID\" will automatically be replaced with the device ID\n\n#Call detach script when device disappears\n#device_detach=[PATH_TO_SCRIPT] [PARAMETER|DEVID]\t#\"DEVID\" will automatically be replaced with the device ID\n\n#Dreambox especially for DM800HD (not SE!)\n#vtuner_acceleration=[on|off]                           #default off, accelerate Dreambox 800HD datatransfer between USB Stick and\n                                                        #DM800HD\n\n# ----- Section for adapter with [SERIALNUMBER] -----\n#Get adapter serial number with /opt/bin/mediaclient -e\n#[SERIALNUMBER]\n\n#Description register as dreambox tuner\n#dreambox_support_fe1=[on|off]\t\t#default: off\n\n#Infrared protocol to use\n#ir_protocol=[RC5|NEC|RC6]\t\t\t#default: NEC\n\n#Keymap to use, e.g. \"/lib/udev/rc_keymaps/vp702x\"\n#rcmap=[PATH_TO_KEYMAP]\t\t\t#default: keymap which comes with the device\n\n#Choose initial DVB mode for hybrid DVB-T/DVB-C devices only\n#initial_dvb_mode=[DVBC|DVBT]\n\n#Call attach script when new device appears\n#device_attach=[PATH_TO_SCRIPT] [PARAMETER|DEVID]\t#\"DEVID\" will automatically be replaced with the device ID\n\n#Call detach script when device disappears\n#device_detach=[PATH_TO_SCRIPT] [PARAMETER|DEVID]\t#\"DEVID\" will automatically be replaced with the device ID\n\n#disable_atv=[0|1]                                      #disable initialization of analogTV Frontend\n#Initial Audio Volume level for DVB-C/T Hybrid devices\n#volume=[0-127]\t\t\t\t#default: 118\n\n\n# WSS callback (see http://en.wikipedia.org/wiki/Widescreen_signaling)\n# trigger script when the videoformat changes between 16:9 or 4:3\n#wss_callback=[scriptname]\n#\tWSS_4_3_FULL\n#\tWSS_14_9_LETTERBOX_CENTRE\n#\tWSS_14_9_LETTERBOX_TOP\n#\tWSS_16_9_LETTERBOX_CENTRE\n#\tWSS_16_9_LETTERBOX_TOP\n#\tWSS_16_9_LETTERBOX_DEEPER\n#\tWSS_14_9_FULL_HEIGHT_4_3\n#\tWSS_16_9_FULL_HEIGHT_16_9\n#\tWSS_UNABLE_TO_DEMODULATE\n\n#Timeout in ms after that WSS_UNABLE_TO_DEMODULATE will be called\n#wss_demodulation_timeout=[MILLISECONDS][/code]\n\n#vtuner_skip0=vtuner0                  # skip /dev/misc/vtuner0 can also be vtunerN\n#vtuner_skip1=vtuner1                  # skip /dev/misc/vtuner1 can also be vtunerN\n\n#fe_helper=/path/to/channellist        # override frequency setup and use parameters from channellist\n                                       # VDR channellists can be used here (eg. created by w_scan)\n                                       # this somewhat guarantees high speed channel switching\n                                       # when used with a lousy player\n                                       # Astra 19.2 Channellist: 1)\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"sundtek-mediatv\"\nPKG_VERSION=\"7.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"http://support.sundtek.com/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"xmlstarlet:host p7zip:host\"\nPKG_SECTION=\"driver/dvb\"\nPKG_SHORTDESC=\"Sundtek MediaTV: a Linux driver to add support for SUNDTEK USB DVB devices\"\nPKG_LONGDESC=\"Install this to add support for Sundtek USB DVB devices.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Sundtek MediaTV\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nmake_target() {\n  mkdir -p ${PKG_BUILD}\n  cd ${PKG_BUILD}\n\n  case ${TARGET_ARCH} in\n    x86_64)\n      INSTALLER_URL=\"http://sundtek.de/media/netinst/64bit/installer.tar.gz\"\n      ;;\n    arm)\n      INSTALLER_URL=\"http://sundtek.de/media/netinst/armsysvhf/installer.tar.gz\"\n      ;;\n    aarch64)\n      INSTALLER_URL=\"http://sundtek.de/media/netinst/arm64/installer.tar.gz\"\n      ;;\n  esac\n\n  wget -O installer.tar.gz ${INSTALLER_URL}\n\n  tar -xzf installer.tar.gz\n\n  chmod -R 755 opt/ etc/\n\n  rm -f  opt/bin/getinput.sh\n  rm -f  opt/bin/lirc.sh\n  rm -fr opt/lib/pm/\n\n  wget -O version.used http://sundtek.de/media/latest.phtml\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/config/\n  cp -P ${PKG_DIR}/config/* ${ADDON_BUILD}/${PKG_ADDON_ID}/config/\n  cp -P ${PKG_DIR}/settings-default.xml ${ADDON_BUILD}/${PKG_ADDON_ID}/\n  cp -Pa ${PKG_BUILD}/opt/bin ${ADDON_BUILD}/${PKG_ADDON_ID}/\n  cp -Pa ${PKG_BUILD}/opt/lib ${ADDON_BUILD}/${PKG_ADDON_ID}/\n  cp ${PKG_BUILD}/version.used ${ADDON_BUILD}/${PKG_ADDON_ID}/\n}\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/settings-default.xml",
    "content": "<settings>\n  <setting id=\"SETTLE_TIME\" value=\"0\" />\n  <setting id=\"RUN_USER_SCRIPT\" value=\"false\" />\n  <setting id=\"ENABLE_HW_PID_FILTER\" value=\"true\" />\n  <setting id=\"ENABLE_IR_RECEIVER\" value=\"false\" />\n  <setting id=\"LOWEST_ADAPTER_NUM\" value=\"0\" />\n  <setting id=\"SUSPEND_DRIVER\" value=\"true\" />\n  <setting id=\"ALLOW_NET_USE\"  value=\"false\" />\n  <setting id=\"USE_NET_TUNERS\" value=\"false\" />\n  <setting id=\"DEVICE1_IP\"  value=\"\" />\n  <setting id=\"DEVICE1_NUM\" value=\"1\" />\n  <setting id=\"DEVICE2_IP\"  value=\"\" />\n  <setting id=\"DEVICE2_NUM\" value=\"1\" />\n  <setting id=\"DEVICE3_IP\"  value=\"\" />\n  <setting id=\"DEVICE3_NUM\" value=\"1\" />\n  <setting id=\"DEVICE4_IP\"  value=\"\" />\n  <setting id=\"DEVICE4_NUM\" value=\"1\" />\n  <setting id=\"DEVICE5_IP\"  value=\"\" />\n  <setting id=\"DEVICE5_NUM\" value=\"1\" />\n  <setting id=\"CHECK_BOOT\" value=\"false\" />\n</settings>\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/source/bin/sundtek-mediatv.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\nnet_tuner_num_fix() {\n  local num=$1\n\n  [ -z \"$num\" ] && num=1\n  num=$(( $num *1 ))\n  [ $num -lt 1 ] && num=1\n  num=$(( $num -1 ))\n  echo $num\n}\n\nSUNDTEK_ADDON_DIR=\"$HOME/.kodi/addons/driver.dvb.sundtek-mediatv\"\nSUNDTEK_ADDON_HOME=\"$HOME/.kodi/userdata/addon_data/driver.dvb.sundtek-mediatv\"\nSUNDTEK_ADDON_SETTINGS=\"$SUNDTEK_ADDON_HOME/settings.xml\"\n\nmkdir -p $SUNDTEK_ADDON_HOME\n\n# remove the entry\nBUILD_DATE=\"#\"\nsed -i \"s|\\(id=\\\"BUILD_DATE\\\" .* values=\\)\\\"[^\\\"]*\\\"|\\1\\\"$BUILD_DATE\\\"|\" $SUNDTEK_ADDON_DIR/resources/settings.xml\n\nif [ ! -f \"$SUNDTEK_ADDON_HOME/sundtek.conf\" ]; then\n  cp $SUNDTEK_ADDON_DIR/config/* $SUNDTEK_ADDON_HOME/\n  \n  # update driver on first run\n  echo \"update driver\" >/tmp/ppp\n  systemd-run $SUNDTEK_ADDON_DIR/bin/sundtek-update-driver.sh\n  exit 0\t# will be started later\nelse\n  # in case of missing entries in addon home's sundtek.conf\n  entry_set=\"$(grep use_hwpidfilter $SUNDTEK_ADDON_HOME/sundtek.conf 2>/dev/null)\"\n  if [ -z \"$entry_set\" ]; then\n    sed -i 's|^device_attach=.*|# device_attach not used anymore\\n\\n# enable HW PID filter\\nuse_hwpidfilter=off\\n\\n# enable listening on network\\nenablenetwork=off|g' $SUNDTEK_ADDON_HOME/sundtek.conf\n    sed -i 's|^#first_adapter=.*|first_adapter=0|g' $SUNDTEK_ADDON_HOME/sundtek.conf\n\n    sed -i 's|.*network tuner IP address (OpenELEC specific).*||g' $SUNDTEK_ADDON_HOME/sundtek.conf\n    sed -i 's|.*network_tuner_ip=.*||g' $SUNDTEK_ADDON_HOME/sundtek.conf\n  fi\nfi\n\nif [ ! -f \"$SUNDTEK_ADDON_SETTINGS\" ]; then\n  cp $SUNDTEK_ADDON_DIR/settings-default.xml $SUNDTEK_ADDON_SETTINGS\nfi\n\n[ ! -f $SUNDTEK_ADDON_HOME/rc_key_enter.map ] && mv $SUNDTEK_ADDON_HOME/rc_key_enter $SUNDTEK_ADDON_HOME/rc_key_enter.map\n[ ! -f $SUNDTEK_ADDON_HOME/rc_key_ok.map ] && mv $SUNDTEK_ADDON_HOME/rc_key_ok $SUNDTEK_ADDON_HOME/rc_key_ok.map\n\nmkdir -p /var/config\n\n# check settings version\nXML_SETTINGS_VER=\"$(xmlstarlet sel -t -m settings -v @version $SUNDTEK_ADDON_SETTINGS)\"\nif [ \"$XML_SETTINGS_VER\" = \"2\" ]; then\n  xmlstarlet sel -t -m settings/setting -v @id -o \"=\\\"\" -v . -o \"\\\"\" -n \"$SUNDTEK_ADDON_SETTINGS\" > /var/config/sundtek-addon.conf\nelse\n  xmlstarlet sel -t -m settings -m setting -v @id -o \"=\\\"\" -v @value -o \"\\\"\" -n \"$SUNDTEK_ADDON_SETTINGS\" > /var/config/sundtek-addon.conf\nfi\n\n. /var/config/sundtek-addon.conf\n\n# check if there is new driver on web\nif [ \"$CHECK_BOOT\" = \"true\" ]; then\n  if [ ! -f /var/run/sundtek.checked ]; then\n    # only once after boot\n    touch /var/run/sundtek.checked\n\n(\n    # wait some time before checking\n    sleep 20\n    cd $SUNDTEK_ADDON_DIR\n\n    wget -O version.latest http://sundtek.de/media/latest.phtml\n\n    version_used=$(cat version.used)\n    version_latest=$(cat version.latest)\n    if [ \"$version_used\" != \"$version_latest\" ]; then\n      # new version exist\n      kodi-send -a \"Notification(Sundtek, \\\"New driver version exist, update manually\\\", 4000, $SUNDTEK_ADDON_DIR/icon.png)\"\n    fi\n)&\n  fi\nfi\n\nif [ -z \"$(pidof mediasrv)\" ]; then\n  rm -f /var/log/mediasrv.log\n  rm -f /var/log/mediaclient.log\n\n  SUNDTEK_CONF_TMP=/tmp/sundtek.conf\n  cp $SUNDTEK_ADDON_HOME/sundtek.conf $SUNDTEK_CONF_TMP\n\n  [ -z \"$LOWEST_ADAPTER_NUM\" ] && LOWEST_ADAPTER_NUM=0\n  sed -i \"s|^first_adapter=.*|first_adapter=$LOWEST_ADAPTER_NUM|g\" $SUNDTEK_CONF_TMP\n\n  # enable HW PID filter\n  if [ \"$ENABLE_HW_PID_FILTER\" = \"true\" ]; then\n    sed -i 's|^use_hwpidfilter=.*|use_hwpidfilter=on|g' $SUNDTEK_CONF_TMP\n  else\n    sed -i 's|^use_hwpidfilter=.*|use_hwpidfilter=off|g' $SUNDTEK_CONF_TMP\n  fi\n\n  # enable IR receiver\n  if [ \"$ENABLE_IR_RECEIVER\" = \"true\" ]; then\n    sed -i 's|^ir_disabled=.*|ir_disabled=0|g' $SUNDTEK_CONF_TMP\n  else\n    sed -i 's|^ir_disabled=.*|ir_disabled=1|g' $SUNDTEK_CONF_TMP\n  fi\n\n  if [ \"$ALLOW_NET_USE\" = \"true\" ]; then\n    sed -i 's|^enablenetwork=.*|enablenetwork=on|g' $SUNDTEK_CONF_TMP\n  else\n    sed -i 's|^enablenetwork=.*|enablenetwork=off|g' $SUNDTEK_CONF_TMP\n  fi\n\n  [ \"$DEVICE1_IP\" = \"0.0.0.0\" ] && DEVICE1_IP=\"\"\n  [ \"$DEVICE2_IP\" = \"0.0.0.0\" ] && DEVICE2_IP=\"\"\n  [ \"$DEVICE3_IP\" = \"0.0.0.0\" ] && DEVICE3_IP=\"\"\n  [ \"$DEVICE4_IP\" = \"0.0.0.0\" ] && DEVICE4_IP=\"\"\n  [ \"$DEVICE5_IP\" = \"0.0.0.0\" ] && DEVICE5_IP=\"\"\n  DEVICE1_NUM=$(net_tuner_num_fix $DEVICE1_NUM)\n  DEVICE2_NUM=$(net_tuner_num_fix $DEVICE2_NUM)\n  DEVICE3_NUM=$(net_tuner_num_fix $DEVICE3_NUM)\n  DEVICE4_NUM=$(net_tuner_num_fix $DEVICE4_NUM)\n  DEVICE5_NUM=$(net_tuner_num_fix $DEVICE5_NUM)\n\n  if [ \"$USE_NET_TUNERS\" = \"true\" -a -n \"$DEVICE1_IP\" ]; then\n    # delete all network tuner entries\n    awk '/^\\[NETWORK\\]/{flag=1; next} /^[^\\[]|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-net\n    mv ${SUNDTEK_CONF_TMP}-net $SUNDTEK_CONF_TMP\n    echo \"\" >>$SUNDTEK_CONF_TMP\n    # remove empty lines at the end of file\n    sed -i -e ':a' -e '/^\\n*$/{$d;N;};/\\n$/ba' $SUNDTEK_CONF_TMP\n    # add entries\n    echo -e \"\\n[NETWORK]\" >>$SUNDTEK_CONF_TMP\n    for dev in $(seq 0 $DEVICE1_NUM); do\n      echo \"device=$DEVICE1_IP:$dev\" >>$SUNDTEK_CONF_TMP\n    done\n    if [ -n \"$DEVICE2_IP\" ]; then\n      for dev in $(seq 0 $DEVICE2_NUM); do\n        echo \"device=$DEVICE2_IP:$dev\" >>$SUNDTEK_CONF_TMP\n      done\n      if [ -n \"$DEVICE3_IP\" ]; then\n        for dev in $(seq 0 $DEVICE3_NUM); do\n          echo \"device=$DEVICE3_IP:$dev\" >>$SUNDTEK_CONF_TMP\n        done\n        if [ -n \"$DEVICE4_IP\" ]; then\n          for dev in $(seq 0 $DEVICE4_NUM); do\n            echo \"device=$DEVICE4_IP:$dev\" >>$SUNDTEK_CONF_TMP\n          done\n          if [ -n \"$DEVICE5_IP\" ]; then\n            for dev in $(seq 0 $DEVICE5_NUM); do\n              echo \"device=$DEVICE5_IP:$dev\" >>$SUNDTEK_CONF_TMP\n            done\n          fi\n        fi\n      fi\n    fi\n  else\n    # delete all network tuner entries\n    awk '/^\\[NETWORK\\]/{flag=1; next} /^[^\\[]|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-net\n    mv ${SUNDTEK_CONF_TMP}-net $SUNDTEK_CONF_TMP\n    echo \"\" >>$SUNDTEK_CONF_TMP\n    # remove empty lines at the end of file\n    sed -i -e ':a' -e '/^\\n*$/{$d;N;};/\\n$/ba' $SUNDTEK_CONF_TMP\n  fi\n\n  if [ \"$ENABLE_TUNER_TYPES\" = \"true\" ]; then\n    # get tuner serial numbers\n    SERIALS=$(cat /var/config/sundtek-addon.conf | sed -n 's|^ATTACHED_TUNER_\\(.*\\)_DVBMODE=.*|\\1|gp' | sort | uniq)\n    . /var/config/sundtek-addon.conf\n\n    for SERIAL in $SERIALS; do\n      DVBMODE=$(eval echo \\$ATTACHED_TUNER_${SERIAL}_DVBMODE)\n      IRPROT=$(eval echo \\$ATTACHED_TUNER_${SERIAL}_IRPROT)\n      KEYMAP=$(eval echo \\$ATTACHED_TUNER_${SERIAL}_KEYMAP)\n\n      if [ \"$DVBMODE\" = \"DVB-T\" ]; then\n        # only set DVB-T because default is DVB-C (and DVB-S/S2 is not set either)\n        DVBMODE=\"DVBT\"\n      else\n        DVBMODE=\"\"\n      fi\n\n      [ \"$IRPROT\" = \"NEC\" -o \"$IRPROT\" = \"auto\" ] && IRPROT=\"\"\n\n      [ ! -f $KEYMAP ] && KEYMAP=\"\"\n\n      # remove setttings for this tuner\n      awk -v val=\"[$SERIAL]\" '$0 == val {flag=1; next} /^[^\\[]|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-types\n      mv ${SUNDTEK_CONF_TMP}-types $SUNDTEK_CONF_TMP\n      echo \"\" >>$SUNDTEK_CONF_TMP\n      # remove empty lines at the end of file\n      sed -i -e ':a' -e '/^\\n*$/{$d;N;};/\\n$/ba' $SUNDTEK_CONF_TMP\n\n      echo \"\" >>$SUNDTEK_CONF_TMP\n      echo \"[$SERIAL]\" >>$SUNDTEK_CONF_TMP\n\n      [ -n \"$DVBMODE\" ] && echo \"initial_dvb_mode=$DVBMODE\" >>$SUNDTEK_CONF_TMP\n\n      if [ \"$ENABLE_IR_RECEIVER\" = \"true\" ]; then\n        echo \"ir_disabled=0\" >>$SUNDTEK_CONF_TMP\n      else\n        echo \"ir_disabled=1\" >>$SUNDTEK_CONF_TMP\n      fi\n\n      [ -n \"$IRPROT\" ] && echo \"ir_protocol=$IRPROT\" >>$SUNDTEK_CONF_TMP\n      [ -n \"$KEYMAP\" ] && echo \"rcmap=$KEYMAP\" >>$SUNDTEK_CONF_TMP\n\n      echo \"\" >>$SUNDTEK_CONF_TMP\n    done\n  fi\n\n  md5_1=$(md5sum -b $SUNDTEK_CONF_TMP | awk '{print $1}')\n  md5_2=$(md5sum -b $SUNDTEK_ADDON_HOME/sundtek.conf | awk '{print $1}')\n  if [ \"$md5_1\" != \"$md5_2\" ]; then\n    # file changed - copy to addon home\n    cp $SUNDTEK_CONF_TMP $SUNDTEK_ADDON_HOME/sundtek.conf\n  fi\n\n  chmod +x $SUNDTEK_ADDON_DIR/bin/*\n  mediasrv --wait-for-devices -p $SUNDTEK_ADDON_DIR/bin -c $SUNDTEK_ADDON_HOME/sundtek.conf -d\n\n  # wait few seconds\n  [ -z \"$SETTLE_TIME\" ] && SETTLE_TIME=0\n  SETTLE_TIME=$(( $SETTLE_TIME *1 ))\n  if [ $SETTLE_TIME -gt 0 ]; then\n    logger -t Sundtek \"### Settle for $SETTLE_TIME sec ###\"\n    sleep $SETTLE_TIME\n  fi\n\n  if [ \"$RUN_USER_SCRIPT\" = \"true\" -a -f \"$SUNDTEK_ADDON_HOME/userscript.sh\" ]; then\n    logger -t Sundtek \"### Running user script $SUNDTEK_ADDON_HOME/userscript.sh ###\"\n    cat $SUNDTEK_ADDON_HOME/userscript.sh | dos2unix >/var/run/sundtek-userscript.sh\n    sh /var/run/sundtek-userscript.sh\n  fi\n\n  # save adapter serial number\n  serial_number_old=$(cat $SUNDTEK_ADDON_HOME/adapters.txt 2>/dev/null)\n  serial_number_new=$(mediaclient -e | awk '/device / {print $0} /SERIAL/ {id=1} /ID:/ {if (id==1) print $2}')\n  if [ \"$serial_number_old\" != \"$serial_number_new\" ]; then\n    echo \"$serial_number_new\" >$SUNDTEK_ADDON_HOME/adapters.txt\n  fi\nfi\n\n# change build date in addon settings\nBUILD_DATE=$(mediasrv --build 2>&1)\nsed -i \"s|\\(id=\\\"BUILD_DATE\\\" .* values=\\)\\\"[^\\\"]*\\\"|\\1\\\"$BUILD_DATE\\\"|\" $SUNDTEK_ADDON_DIR/resources/settings.xml\n\nlogger -t Sundtek \"### Sundtek ready ($BUILD_DATE) ###\"\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/source/bin/sundtek-mediatv.stop",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\nADDON_DIR=\"$HOME/.kodi/addons/driver.dvb.sundtek-mediatv\"\n\nlogger -t Sundtek \"### Sundtek driver stop ###\"\nmediaclient --shutdown\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/source/bin/sundtek-update-driver.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\nSUNDTEK_ADDON_DIR=\"$HOME/.kodi/addons/driver.dvb.sundtek-mediatv\"\nSUNDTEK_ADDON_HOME=\"$HOME/.kodi/userdata/addon_data/driver.dvb.sundtek-mediatv\"\nSUNDTEK_ADDON_SETTINGS=\"$SUNDTEK_ADDON_HOME/settings.xml\"\n\ntrap_exit_install() {\n  kodi-send -a \"Notification(Sundtek, Something went wrong. Cleaning..., 8000, $SUNDTEK_ADDON_DIR/icon.png)\"\n  cd \"$SUNDTEK_ADDON_DIR\"\n  rm -fr tmp\n  exit 5\n}\n\n# kill process\nsystemctl stop driver.dvb.sundtek-mediatv\nkillall -9 mediaclient &>/dev/null\nkillall -9 mediasrv &>/dev/null\n\n# remove the entry\nBUILD_DATE=\"#\"\nsed -i \"s|\\(id=\\\"BUILD_DATE\\\" .* values=\\)\\\"[^\\\"]*\\\"|\\1\\\"$BUILD_DATE\\\"|\" $SUNDTEK_ADDON_DIR/resources/settings.xml\n\n# exit on errors\nset -e\n\ntrap trap_exit_install EXIT\n\ncd \"$SUNDTEK_ADDON_DIR\"\nrm -fr tmp\nmkdir tmp\ncd tmp\n\nlogger -t Sundtek \"### Starting updating driver ###\"\nkodi-send -a \"Notification(Sundtek, Starting updating driver, 3000, $SUNDTEK_ADDON_DIR/icon.png)\"\n\nwget -O ../version.used http://sundtek.de/media/latest.phtml\nif [ $? -ne 0 ]; then\n  logger -t Sundtek \"### Can't get latest version ###\"\n  kodi-send -a \"Notification(Sundtek, Cant get latest version, 8000, $SUNDTEK_ADDON_DIR/icon.png)\"\n  cd ..\n  rm -fr tmp/\n  exit 1\nfi\n\nARCH=$(sed -n 's|[^.]*\\.\\([^-]*\\)-.*|\\1|p' /etc/release | tr -d '\\n')\nif [ \"$ARCH\" = \"x86_64\" ]; then\n  INSTALLER_URL=\"http://sundtek.de/media/netinst/64bit/installer.tar.gz\"\nelif [ \"$ARCH\" = \"arm\" ]; then\n  INSTALLER_URL=\"http://sundtek.de/media/netinst/armsysvhf/installer.tar.gz\"\nelif [ \"$ARCH\" = \"aarch64\" ]; then\n  INSTALLER_URL=\"http://sundtek.de/media/netinst/arm64/installer.tar.gz\"\nelse\n  logger -t Sundtek \"### Unsupported architecture ###\"\n  kodi-send -a \"Notification(Sundtek, Unsupported architecture, 8000, $SUNDTEK_ADDON_DIR/icon.png)\"\n  cd ..\n  rm -fr tmp\n  exit 2\nfi\n\nlogger -t Sundtek \"### Downloading driver archive for $ARCH ###\"\nkodi-send -a \"Notification(Sundtek, Downloading driver archive for $ARCH, 3000, $SUNDTEK_ADDON_DIR/icon.png)\"\nwget -O installer.tar.gz $INSTALLER_URL\nif [ $? -ne 0 ]; then\n  logger -t Sundtek \"### Archive damaged ###\"\n  kodi-send -a \"Notification(Sundtek, Download failed, 8000, $SUNDTEK_ADDON_DIR/icon.png)\"\n  cd ..\n  rm -fr tmp/\n  exit 3\nfi\n\nlogger -t Sundtek \"### Extracting archive ###\"\nkodi-send -a \"Notification(Sundtek, Extracting archive, 3000, $SUNDTEK_ADDON_DIR/icon.png)\"\ntar -xzf installer.tar.gz\nif [ $? -ne 0 ]; then\n  logger -t Sundtek \"### Archive damaged ###\"\n  kodi-send -a \"Notification(Sundtek, Archive damaged, 8000, $SUNDTEK_ADDON_DIR/icon.png)\"\n  cd ..\n  rm -fr tmp/\n  exit 4\nfi\n\n# fix permissions\nchmod -R 755 opt/ etc/\n\nrm -f  opt/bin/getinput.sh\nrm -f  opt/bin/lirc.sh\nrm -fr opt/lib/pm/\n\ncp -Pa opt/bin/* ../bin/\ncp -Pa opt/lib/* ../lib/\n\ncd ..\nrm -fr tmp\n\nlogger -t Sundtek \"### Driver update finished ###\"\nkodi-send -a \"Notification(Sundtek, Driver update finished, 5000, $SUNDTEK_ADDON_DIR/icon.png)\"\nkodi-send -a \"Notification(Sundtek, Please reboot, 5000, $SUNDTEK_ADDON_DIR/icon.png)\"\n\ntrap - EXIT\n\nsystemctl start driver.dvb.sundtek-mediatv\n\nexit 0\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/source/bin/userspace-driver.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\nSUNDTEK_ADDON_DIR=\"$HOME/.kodi/addons/driver.dvb.sundtek-mediatv\"\n\nif [ -f $SUNDTEK_ADDON_DIR/lib/libmediaclient.so ]; then\n  logger -t Sundtek \"### Preloading library ###\"\n  export LD_PRELOAD=$SUNDTEK_ADDON_DIR/lib/libmediaclient.so\nelse\n  logger -t Sundtek \"### Preloading library doesn't exist ###\"\nfi\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/source/resources/actions.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nimport os\nimport sys\nimport subprocess\nimport xbmcaddon\nimport xbmcvfs\n\n__settings__      = xbmcaddon.Addon(id = 'driver.dvb.sundtek-mediatv')\n__cwd__           = __settings__.getAddonInfo('path')\n__resources_lib__ = xbmcvfs.translatePath(os.path.join(__cwd__, 'resources', 'lib'))\n__settings_xml__  = xbmcvfs.translatePath(os.path.join(__cwd__, 'resources', 'settings.xml'))\n\n__mediaclient__   = xbmcvfs.translatePath(os.path.join(__cwd__, 'bin', 'mediaclient'))\n__mediaclient_e__ = __mediaclient__ + ' -e'\n__update_sh__     = xbmcvfs.translatePath(os.path.join(__cwd__, 'bin', 'sundtek-update-driver.sh'))\n\nif len(sys.argv) == 2:\n  if sys.argv[1] == 'refresh_tuners':\n    print('sundtek refresh tuners')\n    sys.path.append(__resources_lib__)\n    from functions import refresh_sundtek_tuners\n    refresh_sundtek_tuners(__settings_xml__, __mediaclient_e__)\n    __settings__.openSettings()\n  elif sys.argv[1] == 'update_driver':\n    print('sundtek update driver')\n    proc = subprocess.Popen([__update_sh__], shell = True)\n    return_code = proc.wait()\n    print('sundtek update driver return value', return_code)\n    __settings__.openSettings()\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/source/resources/language/resource.language.de_de/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: Sundtek MediaTV\n# Addon id: driver.dvb.sundtek-mediatv\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Kodi Addons\\n\"\n\"Report-Msgid-Bugs-To: https://forum.libreelec.tv\\n\"\n\"POT-Creation-Date: 2021-09-02 20:00+CEST\\n\"\n\"PO-Revision-Date: 2021-09-02 20:00+CEST\\n\"\n\"Last-Translator: vpeter\\n\"\n\"Language-Team: Team LibreELEC\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: en_GB\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\nmsgctxt \"#1000\"\nmsgid \"General\"\nmsgstr \"Allgemein\"\n\nmsgctxt \"#1014\"\nmsgid \"Extra delay [sec]\"\nmsgstr \"Verzögerung bevor Treiber gestartet wird [Sek.]\"\n\nmsgctxt \"#1015\"\nmsgid \"Run user script\"\nmsgstr \"Skript welches vom Treiber-Stack gestartet werden soll\"\n\nmsgctxt \"#1030\"\nmsgid \"Enable hardware PID filter\"\nmsgstr \"Hardware PID Filter einschalten\"\n\nmsgctxt \"#1035\"\nmsgid \"Enable IR receiver\"\nmsgstr \"Fernbedienung unterstützen\"\n\nmsgctxt \"#1040\"\nmsgid \"Lowest adapter number (/dev/dvb/adapterX/)\"\nmsgstr \"Niedrigste Adapter Nummer (/dev/dvb/adapterX/)\"\n\nmsgctxt \"#1050\"\nmsgid \"Enable suspend/resume the driver\"\nmsgstr \"Suspend / Resume des Treibers zulassen\"\n\nmsgctxt \"#2000\"\nmsgid \"Networking\"\nmsgstr \"Netzwerksupport\"\n\nmsgctxt \"#2005\"\nmsgid \"Share local tuner over network\"\nmsgstr \"Netzwerkserver aktivieren\"\n\nmsgctxt \"#2010\"\nmsgid \"Use network shared tuners\"\nmsgstr \"Mit Netzwerk-Tunern verbinden\"\n\nmsgctxt \"#2020\"\nmsgid \"Server 1 IP address\"\nmsgstr \"Server 1 IP Adresse\"\n\nmsgctxt \"#2021\"\nmsgid \"    # of tuners\"\nmsgstr \"    # Tuner ID\"\n\nmsgctxt \"#2030\"\nmsgid \"Server 2 IP address\"\nmsgstr \"Server 2 IP Adresse\"\n\nmsgctxt \"#2031\"\nmsgid \"    # of tuners\"\nmsgstr \"    # Tuner ID\"\n\nmsgctxt \"#2040\"\nmsgid \"Server 3 IP address\"\nmsgstr \"Server 3 IP Adresse\"\n\nmsgctxt \"#2041\"\nmsgid \"    # of tuners\"\nmsgstr \"    # Tuner ID\"\n\nmsgctxt \"#2050\"\nmsgid \"Server 4 IP address\"\nmsgstr \"Server 4 IP Adresse\"\n\nmsgctxt \"#2051\"\nmsgid \"    # of tuners\"\nmsgstr \"    # Tuner ID\"\n\nmsgctxt \"#2060\"\nmsgid \"Server 5 IP address\"\nmsgstr \"Server 5 IP Adresse\"\n\nmsgctxt \"#2061\"\nmsgid \"    # of tuners\"\nmsgstr \"    # Tuner ID\"\n\nmsgctxt \"#3000\"\nmsgid \"Driver\"\nmsgstr \"Treiber\"\n\nmsgctxt \"#3005\"\nmsgid \"Driver version\"\nmsgstr \"Treiber-Version\"\n\nmsgctxt \"#3010\"\nmsgid \"       >>> Update driver now <<< \"\nmsgstr \"       >>> Treiber jetzt aktualisieren <<< \"\n\nmsgctxt \"#3020\"\nmsgid \"Check for new driver version at boot\"\nmsgstr \"Bei Neustart auf neue Treiber-Version prüfen\"\n\nmsgctxt \"#9000\"\nmsgid \"Tuner settings\"\nmsgstr \"Geräte Einstellungen\"\n\nmsgctxt \"#9005\"\nmsgid \"Enable modifying settings\"\nmsgstr \"Geräte-Einstellung ändern\"\n\nmsgctxt \"#9010\"\nmsgid \"       >>> Refresh tuners <<< \"\nmsgstr \"       >>> Tuner-Liste aktualisieren <<<\"\n\nmsgctxt \"#9020\"\nmsgid \"    IR protocol\"\nmsgstr \"    IR Protokoll\"\n\nmsgctxt \"#9030\"\nmsgid \"    Keymap filename\"\nmsgstr \"    Keymap Date\"\n\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/source/resources/language/resource.language.en_gb/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: Sundtek MediaTV\n# Addon id: driver.dvb.sundtek-mediatv\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Kodi Addons\\n\"\n\"Report-Msgid-Bugs-To: https://forum.libreelec.tv\\n\"\n\"POT-Creation-Date: 2021-09-02 20:00+CEST\\n\"\n\"PO-Revision-Date: 2021-09-02 20:00+CEST\\n\"\n\"Last-Translator: vpeter\\n\"\n\"Language-Team: Team LibreELEC\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: en_GB\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\nmsgctxt \"#1000\"\nmsgid \"General\"\nmsgstr \"\"\n\nmsgctxt \"#1014\"\nmsgid \"Extra delay [sec]\"\nmsgstr \"\"\n\nmsgctxt \"#1015\"\nmsgid \"Run user script\"\nmsgstr \"\"\n\nmsgctxt \"#1030\"\nmsgid \"Enable hardware PID filter\"\nmsgstr \"\"\n\nmsgctxt \"#1035\"\nmsgid \"Enable IR receiver\"\nmsgstr \"\"\n\nmsgctxt \"#1040\"\nmsgid \"Lowest adapter number (/dev/dvb/adapterX/)\"\nmsgstr \"\"\n\nmsgctxt \"#1050\"\nmsgid \"Enable suspend/resume the driver\"\nmsgstr \"\"\n\nmsgctxt \"#2000\"\nmsgid \"Networking\"\nmsgstr \"\"\n\nmsgctxt \"#2005\"\nmsgid \"Share local tuner over network\"\nmsgstr \"\"\n\nmsgctxt \"#2010\"\nmsgid \"Use network shared tuners\"\nmsgstr \"\"\n\nmsgctxt \"#2020\"\nmsgid \"Server 1 IP address\"\nmsgstr \"\"\n\nmsgctxt \"#2021\"\nmsgid \"    # of tuners\"\nmsgstr \"\"\n\nmsgctxt \"#2030\"\nmsgid \"Server 2 IP address\"\nmsgstr \"\"\n\nmsgctxt \"#2031\"\nmsgid \"    # of tuners\"\nmsgstr \"\"\n\nmsgctxt \"#2040\"\nmsgid \"Server 3 IP address\"\nmsgstr \"\"\n\nmsgctxt \"#2041\"\nmsgid \"    # of tuners\"\nmsgstr \"\"\n\nmsgctxt \"#2050\"\nmsgid \"Server 4 IP address\"\nmsgstr \"\"\n\nmsgctxt \"#2051\"\nmsgid \"    # of tuners\"\nmsgstr \"\"\n\nmsgctxt \"#2060\"\nmsgid \"Server 5 IP address\"\nmsgstr \"\"\n\nmsgctxt \"#2061\"\nmsgid \"    # of tuners\"\nmsgstr \"\"\n\nmsgctxt \"#3000\"\nmsgid \"Driver\"\nmsgstr \"\"\n\nmsgctxt \"#3005\"\nmsgid \"Driver version\"\nmsgstr \"\"\n\nmsgctxt \"#3010\"\nmsgid \"       >>> Update driver now <<< \"\nmsgstr \"\"\n\nmsgctxt \"#3020\"\nmsgid \"Check for new driver version at boot\"\nmsgstr \"\"\n\nmsgctxt \"#9000\"\nmsgid \"Tuner settings\"\nmsgstr \"\"\n\nmsgctxt \"#9005\"\nmsgid \"Enable modifying settings\"\nmsgstr \"\"\n\nmsgctxt \"#9010\"\nmsgid \"       >>> Refresh tuners <<< \"\nmsgstr \"\"\n\nmsgctxt \"#9020\"\nmsgid \"    IR protocol\"\nmsgstr \"\"\n\nmsgctxt \"#9030\"\nmsgid \"    Keymap filename\"\nmsgstr \"\"\n\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/source/resources/lib/functions.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nimport os\nimport sys\nimport shutil\nimport xmlpp\nfrom xml.dom import minidom\n\n__sundtek_userspace__ = '/storage/.kodi/userdata/addon_data/driver.dvb.sundtek-mediatv/'\n\n######################################################################################################\n# backup setting.xml file only if backup doesn't exist\ndef settings_backup(settings_xml):\n  try:\n    with open(settings_xml + '_orig') as f: pass\n  except IOError as e:\n    shutil.copyfile(settings_xml, settings_xml + '_orig')\n\n######################################################################################################\n# restore setting.xml file from backup\ndef settings_restore(settings_xml):\n  try:\n    shutil.copyfile(settings_xml + '_orig', settings_xml)\n  except IOError as e:\n    print('Error restoring file:', settings_xml)\n\n######################################################################################################\n# get hdhomerun supported devices on a system (only name like 101ADD2B-0)\ndef get_devices_hdhomerun(hdhomerun_log):\n  tuners = []\n  try:\n    for line in open(hdhomerun_log, 'r'):\n      line = line.strip()\n      if line.startswith('Registered tuner'):\n        name = line.split(':');\n        name = name[2].strip()\n        tuners.append(name)\n  except IOError:\n    print('Error reading hdhomerun log file', hdhomerun_log)\n  return tuners\n\n  \"\"\"\nroot ~ # grep \"Registered tuner\" /var/log/dvbhdhomerun.log\nRegistered tuner, id from kernel: 0 name: 101ADD2B-0\nRegistered tuner, id from kernel: 1 name: 101ADD2B-1\nRegistered tuner, id from kernel: 2 name: 1031D75A-0\nRegistered tuner, id from kernel: 3 name: 1031D75A-1\n  \"\"\"\n\n######################################################################################################\n# get sundtek supported devices on a system (name, serial number, type)\ndef get_devices_sundtek(mediaclient_e):\n  tuners = []\n  try:\n    p = os.popen(mediaclient_e, \"r\")\n    while 1:\n      line = p.readline()\n      if not line:\n        break\n      else:\n        str = line.strip()\n        if str.startswith('device '):\n          name = str[str.find(\"[\")+1:str.find(\"]\")]\n          tuners.append([name, 0, []])\n\n        if str.startswith('[SERIAL]:'):\n          line = p.readline()\n          str = line.strip()\n          if str.startswith('ID:'):\n            id = str.split(':');\n            id = id[1].strip()\n            tuners[len(tuners)-1][1] = id\n\n        if str.startswith('[DVB'):\n          types_arr = tuners[len(tuners)-1][2]\n          str = str.translate(dict.fromkeys(map(ord, '[]:'), None))\n          types = str.split(\",\")\n          for i in range(len(types)):\n            if types[i] == 'DVB-C':\n              types_arr.append('c')\n            elif types[i] == 'DVB-T':\n              types_arr.append('t')\n            elif types[i] == 'DVB-T2':\n              types_arr.append('t2')\n            elif types[i] == 'DVB-S/S2':\n              types_arr.append('s')\n\n          tuners[len(tuners)-1][2] = types_arr\n\n  except IOError:\n    print('Error getting sundtek tuners info')\n  return tuners\n\n  \"\"\"\nroot ~ # mediaclient -e\n\n**** List of Media Hardware Devices ****\ndevice 0: [Sundtek MediaTV Pro (USB 2.0)]  DVB-C, DVB-T, ANALOG-TV, FM-RADIO, REMOTE-CONTROL, OSS-AUDIO, RDS\n  [BUS]:\n     ID: 1-7\n  [SERIAL]:\n     ID: U110763295205\n  [DVB-C]:\n     FRONTEND: /dev/dvb/adapter0/frontend0\n     DVR: /dev/dvb/adapter0/dvr0\n     DMX: /dev/dvb/adapter0/demux0\n  [DVB-T]:\n     FRONTEND: /dev/dvb/adapter0/frontend0\n     DVR: /dev/dvb/adapter0/dvr0\n     DMX: /dev/dvb/adapter0/demux0\n  [ANALOG-TV]:\n     VIDEO0: /dev/video0\n     VBI0: /dev/vbi0\n  [FM-RADIO]:\n     RADIO0: /dev/radio0\n     RDS: /dev/rds0\n  [REMOTECONTROL]:\n     INPUT0: /dev/mediainput0\n  [OSS]:\n     OSS0: /dev/dsp0\n\n**** List of Media Hardware Devices ****\ndevice 0: [MediaTV Digital Home III (EU)]  DVB-C, DVB-T, DVB-T2, REMOTE-CONTROL\n  [INFO]:\n     STATUS: STANDBY\n  [BUS]:\n     ID: 2-5\n  [SERIAL]:\n     ID: U170130193421\n  [DVB-C,DVB-T,DVB-T2]:\n     FRONTEND: /dev/dvb/adapter0/frontend0\n     DVR: /dev/dvb/adapter0/dvr0\n     DMX: /dev/dvb/adapter0/demux0\n  [REMOTECONTROL]:\n     INPUT0: /dev/mediainput0\n  \"\"\"\n\n######################################################################################################\n# parse settings.xml file\ndef parse_settings(settings_xml):\n  try:\n    xmldoc = minidom.parse(settings_xml)\n    category = xmldoc.getElementsByTagName('category')\n    return xmldoc\n  except Exception as inst:\n    print('Error parse settings file', settings_xml)\n    return None\n\n######################################################################################################\n# remove all nodes with id started with ATTACHED_TUNER_\ndef remove_old_tuners(xmldoc):\n  category = xmldoc.getElementsByTagName('category')\n  for node_cat in category:\n    setting = node_cat.getElementsByTagName('setting')\n    for node_set in setting :\n      if 'id' in node_set.attributes.keys() and not node_set.getAttribute('id').find('ATTACHED_TUNER_'):\n        node_set.parentNode.removeChild(node_set)\n\n######################################################################################################\n# add new hdhomerun tuners\ndef add_hdhomerun(xmldoc, node_cat, tuners):\n  for ix, tuner in enumerate(tuners):\n    tuner_var = tuner.replace('-', '_')\n\n    node1 = xmldoc.createElement(\"setting\")\n    node1.setAttribute(\"id\", 'ATTACHED_TUNER_' + tuner_var + '_DVBMODE')\n    node1.setAttribute(\"label\", tuner)\n    node1.setAttribute(\"type\", 'labelenum')\n    node1.setAttribute(\"default\", 'auto')\n    node1.setAttribute(\"values\", 'auto|ATSC|DVB-C|DVB-T')\n    node_cat.appendChild(node1)\n\n    node2 = xmldoc.createElement(\"setting\")\n    node2.setAttribute(\"id\", 'ATTACHED_TUNER_' + tuner_var + '_FULLNAME')\n    node2.setAttribute(\"label\", '9020')\n    node2.setAttribute(\"type\", 'bool')\n    node2.setAttribute(\"default\", 'false')\n    node_cat.appendChild(node2)\n\n    node3 = xmldoc.createElement(\"setting\")\n    node3.setAttribute(\"id\", 'ATTACHED_TUNER_' + tuner_var + '_DISABLE')\n    node3.setAttribute(\"label\", '9030')\n    node3.setAttribute(\"type\", 'bool')\n    node3.setAttribute(\"default\", 'false')\n    node_cat.appendChild(node3)\n\n  # for tuner\n\n######################################################################################################\n# add new sundtek tuners\ndef add_sundtek(xmldoc, node_cat, tuners):\n  for ix, tuner in enumerate(tuners):\n    tuner_name   = tuner[0]\n    tuner_serial = tuner[1]\n    tuner_types  = tuner[2]\n\n    node1 = xmldoc.createElement(\"setting\")\n    node1.setAttribute(\"id\", 'ATTACHED_TUNER_' + tuner_serial + '_DVBMODE')\n    node1.setAttribute(\"label\", tuner_name + \", \" + tuner_serial)\n    node1.setAttribute(\"type\", 'labelenum')\n\n    if len(tuner_types) == 0:\n      values = 'unkn'\n      default = 'unkn'\n    else:\n      values = ''\n      default = ''\n\n      for ix, type in enumerate(tuner_types):\n        if type == 'c':\n          type_str = 'DVB-C'\n        elif type == 't':\n          type_str = 'DVB-T'\n        elif type == 't2':\n          type_str = 'DVB-T2'\n        elif type == 's':\n          type_str = 'DVB-S/S2'\n        else:\n          type_str = 'unkn'\n\n        if not default:  # first one\n          default = type_str;\n\n        if ix == 0:\n          values = type_str\n        else:\n          values = values + '|' + type_str\n\n    node1.setAttribute(\"default\", default)\n    node1.setAttribute(\"values\", values)\n\n    node_cat.appendChild(node1)\n\n    node2 = xmldoc.createElement(\"setting\")\n    node2.setAttribute(\"id\", 'ATTACHED_TUNER_' + tuner_serial + '_IRPROT')\n    node2.setAttribute(\"label\", '9020')\n    node2.setAttribute(\"type\", 'labelenum')\n    node2.setAttribute(\"default\", 'auto')\n    node2.setAttribute(\"values\", 'auto|RC5|NEC|RC6')\n    node_cat.appendChild(node2)\n\n    node3 = xmldoc.createElement(\"setting\")\n    node3.setAttribute(\"id\", 'ATTACHED_TUNER_' + tuner_serial + '_KEYMAP')\n    node3.setAttribute(\"label\", '9030')\n    node3.setAttribute(\"type\", 'file')\n    node3.setAttribute(\"mask\", '*.map')\n    node3.setAttribute(\"default\", __sundtek_userspace__)\n    node_cat.appendChild(node3)\n\n  # for tuner\n\n######################################################################################################\n# add new ATTACHED_TUNER_ nodes for available tuners\ndef add_new_tuners(xmldoc, tuners, which):\n  category = xmldoc.getElementsByTagName('category')\n  for node_cat in category:\n    setting = node_cat.getElementsByTagName('setting')\n    for node_set in setting :\n      if 'label' in node_set.attributes.keys() and '9010' in node_set.getAttribute('label'):\n        if which == 'hdhomerun':\n          add_hdhomerun(xmldoc, node_cat, tuners)\n          break\n        elif which == 'sundtek':\n          add_sundtek(xmldoc, node_cat, tuners)\n          break\n\n\n######################################################################################################\n# save settings.xml file back\ndef save_settings(settings_xml, xmldoc):\n  try:\n    outputfile = open(settings_xml, 'w')\n    xmlpp.pprint(xmldoc.toxml(), output = outputfile, indent=2, width=500)\n    outputfile.close()\n  except IOError:\n    print('Error saving file:', settings_xml)\n    settings_restore(settings_xml)\n\n######################################################################################################\n# refresh hdhomerun tuners in settings.xml file\ndef refresh_hdhomerun_tuners(settings_xml, hdhomerun_log):\n  settings_backup(settings_xml)\n  tuners = get_devices_hdhomerun(hdhomerun_log)\n  xmldoc = parse_settings(settings_xml)\n  if xmldoc == None:\n    print('No hdhomerun tuners found')\n  else:\n    remove_old_tuners(xmldoc)\n    add_new_tuners(xmldoc, tuners, 'hdhomerun')\n    save_settings(settings_xml, xmldoc)\n\n######################################################################################################\n# refresh sundtek tuners in settings.xml file\ndef refresh_sundtek_tuners(settings_xml, mediaclient_e):\n  settings_backup(settings_xml)\n  tuners = get_devices_sundtek(mediaclient_e)\n  xmldoc = parse_settings(settings_xml)\n  if xmldoc == None:\n    print('No sundtek tuners found')\n  else:\n    remove_old_tuners(xmldoc)\n    add_new_tuners(xmldoc, tuners, 'sundtek')\n    save_settings(settings_xml, xmldoc)\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/source/resources/lib/xmlpp.py",
    "content": "\"\"\"Pretty print an XML document.\n\nLICENCE:\nCopyright (c) 2008, Fredrik Ekholdt\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without \nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, \nthis list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, \nthis list of conditions and the following disclaimer in the documentation \nand/or other materials provided with the distribution.\n\n* Neither the name of Fredrik Ekholdt nor the names of its contributors may be used to \nendorse or promote products derived from this software without specific prior \nwritten permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" \nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE \nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS \nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN \nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \nPOSSIBILITY OF SUCH DAMAGE.\"\"\"\n\nimport sys as _sys\nimport re as _re\n\ndef _usage(this_file):\n    return \"\"\"SYNOPSIS: pretty print an XML document\nUSAGE: python %s <filename> \\n\"\"\" % this_file\n\ndef _pprint_line(indent_level, line, width=100, output=_sys.stdout, ignore_contents = False):\n    if line.strip():\n        start = \"\"\n        number_chars = 0\n        for l in range(indent_level):\n            start = start + \" \"\n            number_chars = number_chars + 1\n        if not ignore_contents:\n            try:\n                elem_start = _re.findall(\"(\\<\\W{0,1}\\w+:\\w+) ?\", line)[0]\n                elem_finished = _re.findall(\"([?|\\]\\]/|\\-\\-]*\\>)\", line)[0] \n                #should not have *\n                attrs = _re.findall(\"(\\S*?\\=\\\".*?\\\")\", line)\n                output.write(start + elem_start)\n                number_chars = len(start + elem_start)\n                for attr in attrs:\n                    if (attrs.index(attr) + 1) == len(attrs):\n                        number_chars = number_chars + len(elem_finished)\n                    if (number_chars + len(attr) + 1) > width:\n                        output.write(\"\\n\")\n                        for i in range(len(start + elem_start) + 1):\n                            output.write(\" \")\n                        number_chars = len(start + elem_start) + 1 \n                    else:\n                        output.write(\" \")\n                        number_chars = number_chars + 1\n                    output.write(attr)\n                    number_chars = number_chars + len(attr)\n                output.write(elem_finished + \"\\n\")\n            except IndexError:\n                #give up pretty print this line\n                output.write(start + line + \"\\n\")\n        else:\n            output.write(start + line + \"\\n\")\n                \n\ndef _pprint_elem_content(indent_level, line, output=_sys.stdout):\n    if line.strip():\n        for l in range(indent_level):\n            output.write(\" \")\n        output.write(line + \"\\n\")\n\ndef _get_next_elem(data):\n    start_pos = data.find(\"<\")\n    end_pos = data.find(\">\") + 1\n    retval = data[start_pos:end_pos]\n    stopper = retval.rfind(\"/\")\n    ignore_contents = False\n    if stopper < retval.rfind(\"\\\"\"):\n        stopper = -1\n    single = (stopper > -1 and ((retval.find(\">\") - stopper) < (stopper - retval.find(\"<\"))))\n\n    ignore_excl = retval.find(\"<!\") > -1\n    ignore_question =  retval.find(\"<?\") > -1\n\n    if ignore_excl:\n        ignore_contents = True\n        cdata = retval.find(\"<![CDATA[\") > -1\n        if cdata:\n            end_pos = data.find(\"]]>\")\n            if end_pos > -1:\n                end_pos = end_pos + len(\"]]>\")\n                stopper = end_pos\n        else:\n            end_pos = data.find(\"-->\")\n            if end_pos > -1:\n                end_pos = end_pos + len(\"-->\")\n                stopper = end_pos\n        retval = data[start_pos:end_pos]\n\n    elif ignore_question:\n        end_pos = data.find(\"?>\") + len(\"?>\")\n    ignore = ignore_excl or ignore_question\n    \n    no_indent = ignore or single\n\n    \n    return start_pos, \\\n           end_pos, \\\n           stopper > -1, \\\n           no_indent, \\\n           ignore_contents\n\ndef get_pprint(xml, indent=4, width=80):\n    \"\"\"Returns the pretty printed xml \"\"\"\n    class out:\n        output = \"\"\n\n        def write(self, string): \n            self.output += string\n    out = out()\n    pprint(xml, output=out, indent=indent, width=width)\n    \n\n\n    return out.output\n\n\ndef pprint(xml, output=_sys.stdout, indent=4, width=80):\n    \"\"\"Pretty print xml. \n    Use output to select output stream. Default is sys.stdout\n    Use indent to select indentation level. Default is 4   \"\"\"\n    data = xml\n    indent_level = 0\n    start_pos, end_pos, is_stop, no_indent, ignore_contents  = _get_next_elem(data)\n    while ((start_pos > -1 and end_pos > -1)):\n        _pprint_elem_content(indent_level, data[:start_pos].strip(), \n                             output=output)\n        data = data[start_pos:]\n        if is_stop and not no_indent:\n            indent_level = indent_level - indent\n        _pprint_line(indent_level, \n                     data[:end_pos - start_pos], \n                     width=width,\n                     output=output,\n                     ignore_contents=ignore_contents)\n        data = data[end_pos - start_pos:]\n        if not is_stop and not no_indent :\n            indent_level = indent_level + indent\n\n        if not data:\n            break\n        else:\n            start_pos, end_pos, is_stop, no_indent, ignore_contents  = _get_next_elem(data)\n    \n\nif __name__ == \"__main__\":\n    if \"-h\" in _sys.argv or \"--help\" in _sys.argv:\n        _sys.stderr.write(_usage(_sys.argv[0]))\n        _sys.exit(1)\n    if len(_sys.argv) < 2:\n        _sys.stderr.write(_usage(_sys.argv[0]))\n        _sys.exit(1)\n    else:\n        filename = _sys.argv[1]\n        fh = open(filename)\n\n    pprint(fh.read(), output=_sys.stdout, indent=4, width=80)\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n  <category label=\"1000\" >\n    <setting type=\"sep\" />\n    <setting id=\"SETTLE_TIME\"          type=\"number\" label=\"1014\" default=\"0\" />\n    <setting id=\"RUN_USER_SCRIPT\"      type=\"bool\"   label=\"1015\" default=\"false\" />\n    <setting id=\"ENABLE_HW_PID_FILTER\" type=\"bool\"   label=\"1030\" default=\"true\" />\n    <setting id=\"ENABLE_IR_RECEIVER\"   type=\"bool\"   label=\"1035\" default=\"false\" />\n    <setting id=\"LOWEST_ADAPTER_NUM\"   type=\"number\" label=\"1040\" default=\"0\" />\n    <setting id=\"SUSPEND_DRIVER\"       type=\"bool\"   label=\"1050\" default=\"true\" />\n  </category>\n  <category label=\"2000\" >\n    <setting type=\"sep\" />\n    <setting id=\"ALLOW_NET_USE\"  type=\"bool\"   label=\"2005\" default=\"false\" />\n    <setting id=\"USE_NET_TUNERS\" type=\"bool\"   label=\"2010\" default=\"false\" />\n    <setting id=\"DEVICE1_IP\"  type=\"ipaddress\" label=\"2020\" default=\"\"                     visible=\"eq(-1,true)\" />\n    <setting id=\"DEVICE1_NUM\" type=\"labelenum\" label=\"2021\" default=\"1\" values=\"1|5|4|3|2\" visible=\"eq(-2,true)\" />\n    <setting id=\"DEVICE2_IP\"  type=\"ipaddress\" label=\"2030\" default=\"\"                     visible=\"eq(-3,true)\" />\n    <setting id=\"DEVICE2_NUM\" type=\"labelenum\" label=\"2031\" default=\"1\" values=\"1|5|4|3|2\" visible=\"eq(-4,true)\" />\n    <setting id=\"DEVICE3_IP\"  type=\"ipaddress\" label=\"2040\" default=\"\"                     visible=\"eq(-5,true)\" />\n    <setting id=\"DEVICE3_NUM\" type=\"labelenum\" label=\"2041\" default=\"1\" values=\"1|5|4|3|2\" visible=\"eq(-6,true)\" />\n    <setting id=\"DEVICE4_IP\"  type=\"ipaddress\" label=\"2050\" default=\"\"                     visible=\"eq(-7,true)\" />\n    <setting id=\"DEVICE4_NUM\" type=\"labelenum\" label=\"2051\" default=\"1\" values=\"1|5|4|3|2\" visible=\"eq(-8,true)\" />\n    <setting id=\"DEVICE5_IP\"  type=\"ipaddress\" label=\"2060\" default=\"\"                     visible=\"eq(-9,true)\" />\n    <setting id=\"DEVICE5_NUM\" type=\"labelenum\" label=\"2061\" default=\"1\" values=\"1|5|4|3|2\" visible=\"eq(-10,true)\" />\n  </category>\n  <category label=\"9000\">\n    <setting type=\"sep\" />\n    <setting id=\"ENABLE_TUNER_TYPES\" type=\"bool\" label=\"9005\" default=\"true\" />\n    <setting label=\"9010\" option=\"close\" type=\"action\" id=\"refresh_tuners\" action=\"RunScript($CWD/resources/actions.py, refresh_tuners)\" />\n  </category>\n  <category label=\"3000\">\n    <setting type=\"sep\" />\n    <setting id=\"BUILD_DATE\" type=\"enum\" label=\"3005\" values=\"#\" /> \n    <setting id=\"CHECK_BOOT\" type=\"bool\" label=\"3020\" default=\"false\" />\n    <setting label=\"3010\" option=\"close\" type=\"action\" id=\"update_driver\" action=\"RunScript($CWD/resources/actions.py, update_driver)\" />\n  </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/source/sleep.d/99-sundtek-mediatv.power",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\noe_setup_addon driver.dvb.sundtek-mediatv\n\nif [ \"$SUSPEND_DRIVER\" = \"true\" ]; then\n  case \"$1\" in\n    pre)\n      systemctl stop driver.dvb.sundtek-mediatv.service\n      ;;\n    post)\n    \tsystemctl start driver.dvb.sundtek-mediatv.service\n      ;;\n  esac\nfi\n"
  },
  {
    "path": "packages/addons/driver/sundtek-mediatv/source/system.d/driver.dvb.sundtek-mediatv.service",
    "content": "[Unit]\nDescription=Sundtek driver service\nAfter=network-online.service\nRequires=network-online.service\n\n[Service]\nType=oneshot\nExecStart=-/bin/sh -c \"exec sh /storage/.kodi/addons/driver.dvb.sundtek-mediatv/bin/sundtek-mediatv.start\"\nExecStop=-/bin/sh -c \"exec sh /storage/.kodi/addons/driver.dvb.sundtek-mediatv/bin/sundtek-mediatv.stop\"\nRemainAfterExit=yes\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/libraries/adafruit-libraries/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/libraries/adafruit-libraries/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"adafruit-libraries\"\nPKG_VERSION=\"\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_ADDON_PROJECTS=\"RPi ARM\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"Adafruit_Python_ADS1x15 Adafruit_Python_ADXL345 Adafruit_Python_BMP Adafruit_Python_CharLCD Adafruit_Python_DHT Adafruit_Python_GPIO Adafruit_Python_LED_Backpack Adafruit_Python_LSM303 Adafruit_Python_MCP3008 Adafruit_Python_MCP4725 Adafruit_Python_PCA9685 Adafruit_Python_PureIO Adafruit_Python_SI1145 Adafruit_Python_SSD1306 Adafruit_Python_TCS34725 Adafruit_Python_VCNL40xx Adafruit_Python_WS2801\"\nPKG_SECTION=\"virtual\"\nPKG_SHORTDESC=\"A bundle of libraries from Adafruit\"\nPKG_LONGDESC=\"This is a bundle of various Adafruit Python libraries. Included are: ADS1x15, ADXL345, BMP, CharLCD, DHT, GPIO, LED_Backpack, LSM303, MCP3008, MCP4725, PCA9685, PureIO, SI1145, SSD1306, TCS34725, VCNL40xx, WS2801\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Adafruit Libraries\"\nPKG_ADDON_TYPE=\"xbmc.python.module\"\nPKG_ADDON_REQUIRES=\"virtual.rpi-tools:8.0.102\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n    cp -PR $(get_build_dir Adafruit_Python_ADS1x15)/Adafruit_ADS1x15           ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_ADXL345)/Adafruit_ADXL345           ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_BMP)/Adafruit_BMP                   ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_CharLCD)/Adafruit_CharLCD           ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_DHT)/build/lib/Adafruit_DHT         ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_GPIO)/Adafruit_GPIO                 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_LED_Backpack)/Adafruit_LED_Backpack ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_LSM303)/Adafruit_LSM303             ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_MCP3008)/Adafruit_MCP3008           ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_MCP4725)/Adafruit_MCP4725           ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_PCA9685)/Adafruit_PCA9685           ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_PureIO)/Adafruit_PureIO             ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_SI1145)/SI1145                      ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_SSD1306)/Adafruit_SSD1306           ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_TCS34725)/Adafruit_TCS34725         ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_VCNL40xx)/Adafruit_VCNL40xx         ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir Adafruit_Python_WS2801)/Adafruit_WS2801             ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n}\n"
  },
  {
    "path": "packages/addons/libraries/adafruit-libraries/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport xbmcgui\n\ndialog = xbmcgui.Dialog()\ndialog.ok('', 'This is a python-library-only addon')\n"
  },
  {
    "path": "packages/addons/repository/repository.linuxserver.docker/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/repository/repository.linuxserver.docker/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"repository.linuxserver.docker\"\nPKG_VERSION=\"9.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://linuxserver.io\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"LinuxServer.io docker add-on repository\"\nPKG_LONGDESC=\"LinuxServer.io docker add-on repository\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"LinuxServer.io Repository\"\nPKG_ADDON_TYPE=\"xbmc.addon.repository\"\n\nmake_target() {\n  sed -e \"s|@PKG_VERSION@|${PKG_VERSION}|g\" \\\n      -e \"s|@PKG_REV@|${PKG_REV}|g\" \\\n      -i addon.xml\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}\n  cp -R ${PKG_BUILD}/* ${ADDON_BUILD}/${PKG_ADDON_ID}\n}\n"
  },
  {
    "path": "packages/addons/repository/repository.linuxserver.docker/sources/addon.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"repository.linuxserver.docker\"\n\t\tname=\"LinuxServer.io's Docker Add-ons\"\n\t\tversion=\"@PKG_VERSION@.@PKG_REV@\"\n\t\tprovider-name=\"LinuxServer.io\">\n\t<requires>\n\t\t<import addon=\"xbmc.addon\" version=\"16.1.0\"/>\n\t</requires>\n\t<extension point=\"xbmc.addon.repository\"\n\t\tname=\"LinuxServer.io's Docker Add-on Repository\">\n\t\t<dir>\n\t\t\t<info compressed=\"true\">https://raw.githubusercontent.com/linuxserver/libreelec-addon-repo/master/addons.xml</info>\n\t\t\t<checksum>https://raw.githubusercontent.com/linuxserver/libreelec-addon-repo/master/addons.xml.md5</checksum>\n\t\t\t<datadir zip=\"true\">https://raw.githubusercontent.com/linuxserver/libreelec-addon-repo/master/download</datadir>\n\t\t\t<hashes>false</hashes>\n\t\t</dir>\n\t</extension>\n\t<extension point=\"xbmc.addon.metadata\">\n\t\t<summary>Install add-ons from LinuxServer.io's docker repository</summary>\n\t\t<description>\nDownload and install docker container add-ons from the LinuxServer.io repository.\n\nPlease visit https://linuxserver.io for more information.\n\t\t</description>\n\t\t<disclaimer> </disclaimer>\n\t\t<platform>all</platform>\n\t\t<news>\n@PKG_ADDON_NEWS@\n\t\t</news>\n\t\t<assets>\n\t\t\t<icon>resources/icon.png</icon>\n\t\t\t<fanart>resources/fanart.png</fanart>\n@PKG_ADDON_SCREENSHOT@\n\t\t</assets>\n\t</extension>\n</addon>\n"
  },
  {
    "path": "packages/addons/script/driverselect/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"driverselect\"\nPKG_VERSION=\"d0f919f165f0814533548e80d4e3c0d24c1b153a\"\nPKG_SHA256=\"bc6ad1996bbc3249aa2963cd5440d9b4e043701ff0883bb54732b7e923068887\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"https://github.com/CoreELEC/script.program.driverselect/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"script.program\"\nPKG_SHORTDESC=\"script.program.driverselect\"\nPKG_LONGDESC=\"script.program.driverselect\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Driver Select\"\nPKG_ADDON_TYPE=\"xbmc.python.script\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\nmake_target() {\n  :\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}\n  cp -PR ${PKG_BUILD}/* ${ADDON_BUILD}/${PKG_ADDON_ID}\n}\n"
  },
  {
    "path": "packages/addons/script/luna/package.mk",
    "content": "# SPDX-License-Identifier: GPL-3.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"luna\"\nPKG_VERSION=\"f46656d63027e79f66e4bcd70fd0f38a183cc24a\"\nPKG_SHA256=\"72ece161770bed53763a1fb2e44b44c29af53404af882d81869671246a3b11ae\"\nPKG_REV=\"152\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/TheChoconut/Luna/\"\nPKG_URL=\"https://github.com/TheChoconut/Luna/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain moonlight-embedded\"\nPKG_SECTION=\"script\"\nPKG_SHORTDESC=\"Moonlight launcher for Kodi\"\nPKG_LONGDESC=\"Luna is a Moonlight Launcher for Kodi. Launch moonlight games directly from Kodi.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"dummy\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}\n    cp -PR ${PKG_BUILD}/* ${ADDON_BUILD}/${PKG_ADDON_ID}\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir moonlight-embedded)/usr/bin/moonlight ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir moonlight-embedded)/usr/etc/moonlight.conf ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir moonlight-embedded)/usr/share/moonlight/gamecontrollerdb.txt ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n    cp $(get_install_dir moonlight-embedded)/usr/lib/* ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n\n}\n"
  },
  {
    "path": "packages/addons/script/moonlight/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"moonlight\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"script\"\nPKG_SHORTDESC=\"Moonlight: Add-on removed\"\nPKG_LONGDESC=\"Moonlight Add-on removed\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_ADDON_BROKEN=\"Moonlight is no longer maintained.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Moonlight\"\nPKG_ADDON_TYPE=\"xbmc.broken\"\n\naddon() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/script/script.config.vdr/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/script/script.config.vdr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"script.config.vdr\"\nPKG_VERSION=\"dbcdf65f88e8ae80c0b76b26ceeeb489134e6379\"\nPKG_SHA256=\"96ee087f69301592211a740c5ea58644254b5642cfb0a1f23e5d68131042997e\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"https://github.com/LibreELEC/script.config.vdr/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"xmlstarlet:host p7zip:host\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"script.config.vdr\"\nPKG_LONGDESC=\"script.config.vdr\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"dummy\"\n\nmake_target() {\n  sed -e \"s|@ADDON_VERSION@|${ADDON_VERSION}|g\" \\\n      -i addon.xml\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}\n  cp -PR ${PKG_BUILD}/* ${ADDON_BUILD}/${PKG_ADDON_ID}\n  cp ${PKG_DIR}/changelog.txt ${ADDON_BUILD}/${PKG_ADDON_ID}\n  cp ${PKG_DIR}/icon/icon.png ${ADDON_BUILD}/${PKG_ADDON_ID}/resources\n}\n"
  },
  {
    "path": "packages/addons/script/script.config.vdr/sources/addon.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"script.config.vdr\"\n       name=\"VDR Configuration\"\n       version=\"@ADDON_VERSION@\"\n       provider-name=\"Team LibreELEC\">\n   <requires>\n     <import addon=\"xbmc.python\" version=\"3.0.0\"/>\n  </requires>\n  <extension library=\"default.py\" point=\"xbmc.python.pluginsource\">\n    <provides>executable</provides>\n  </extension>\n  <extension point=\"xbmc.addon.metadata\">\n    <summary lang=\"de_DE\">VDR-Sendersuchlauf und DiSEqC-Konfiguration</summary>\n    <summary lang=\"en_GB\">VDR channel scan and Diseqc Configuration</summary>\n    <summary lang=\"en_US\">VDR channel scan and DiSEqC Configuration</summary>\n    <summary lang=\"lt_LT\">VDR kanalų paieška ir Diseqc konfigūravimas</summary>\n    <summary lang=\"nl_NL\">VDR kanaal scan en Diseqc configuratie</summary>\n    <summary lang=\"pl_PL\">Skanowanie kanałów i konfiguracja Diseqc</summary>\n    <summary lang=\"pt_BR\">Escanear canais VDR e Configuração Diseqc</summary>\n    <description lang=\"de_DE\">VDR-Sendersuchlauf und DiSEqC-Konfiguration</description>\n    <description lang=\"en_GB\">VDR channel scan and Diseqc Configuration</description>\n    <description lang=\"en_US\">VDR channel scan and DiSEqC Configuration</description>\n    <description lang=\"lt_LT\">VDR kanalų paieška ir Diseqc konfigūravimas</description>\n    <description lang=\"nl_NL\">VDR kanaal scan en Diseqc configuratie</description>\n    <description lang=\"pl_PL\">Skanowanie kanałów i konfiguracja Diseqc</description>\n    <description lang=\"pt_BR\">Escanear canais VDR e Configuração Diseqc</description>\n    <language />\n    <platform>all</platform>\n    <news>\n@PKG_ADDON_NEWS@\n    </news>\n    <assets>\n    <icon>resources/icon.png</icon>\n    <fanart>resources/fanart.png</fanart>\n@PKG_ADDON_SCREENSHOT@\n    </assets>\n  </extension>\n</addon>\n"
  },
  {
    "path": "packages/addons/service/bluetooth-audio/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/bluetooth-audio/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"bluetooth-audio\"\nPKG_VERSION=\"0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"bluetooth-audio: Add-on removed\"\nPKG_LONGDESC=\"bluetooth-audio: Add-on removed\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_ADDON_BROKEN=\"Add-on removed as the bluetooth audio auto connect is handled by CoreELEC settings.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Bluetooth Audio Device Changer\"\nPKG_ADDON_TYPE=\"xbmc.broken\"\n\naddon() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/service/boblightd/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/boblightd/config/boblight.X11.sample",
    "content": "# Nothing needed in this file, just rename to boblight.X11 if not using XBMC addon\n"
  },
  {
    "path": "packages/addons/service/boblightd/config/boblight.conf",
    "content": "#config file for adalight from http://www.ladyada.net/make/adalight/\n\n[global]\ninterface 127.0.0.1\nport      19333\n\n[device]\nname            device1\ntype            momo\noutput          /dev/ttyACM0\nchannels        75\nprefix\t\t41 64 61 00 18 4D\ninterval        20000\nrate            115200\ndebug           off #turn this on to see what it's doing with the serial port\ndelayafteropen\t1000000\n\n\n[color]\nname            red\nrgb             FF0000\n\n[color]\nname            green\nrgb             00FF00\n\n[color]\nname            blue\nrgb             0000FF\n\n[light]\nname            light1\ncolor           red     device1 1\ncolor           green   device1 2\ncolor           blue    device1 3\nhscan           33.33 44.44\nvscan           83.33 100\n\n[light]\nname            light2\ncolor           red     device1 4\ncolor           green   device1 5\ncolor           blue    device1 6\nhscan           22.22 33.33\nvscan           83.33 100\n\n[light]\nname            light3\ncolor           red     device1 7\ncolor           green   device1 8\ncolor           blue    device1 9\nhscan           11.11 22.22\nvscan           83.33 100\n\n[light]\nname            light4\ncolor           red     device1 10\ncolor           green   device1 11\ncolor           blue    device1 12\nhscan           0 11.11\nvscan           83.33 100\n\n[light]\nname            light5\ncolor           red     device1 13\ncolor           green   device1 14\ncolor           blue    device1 15\nhscan           0 11.11\nvscan           66.67 83.33\n\n[light]\nname            light6\ncolor           red     device1 16\ncolor           green   device1 17\ncolor           blue    device1 18\nhscan           0 11.11\nvscan           50 66.67\n\n[light]\nname            light7\ncolor           red     device1 19\ncolor           green   device1 20\ncolor           blue    device1 21\nhscan           0 11.11\nvscan           33.33 50\n\n[light]\nname            light8\ncolor           red     device1 22\ncolor           green   device1 23\ncolor           blue    device1 24\nhscan           0 11.11\nvscan           16.67 33.33\n\n[light]\nname            light9\ncolor           red     device1 25\ncolor           green   device1 26\ncolor           blue    device1 27\nhscan           0 11.11\nvscan           0 16.67\n\n[light]\nname            light10\ncolor           red     device1 28\ncolor           green   device1 29\ncolor           blue    device1 30\nhscan           11.11 22.22\nvscan           0 16.67\n\n[light]\nname            light11\ncolor           red     device1 31\ncolor           green   device1 32\ncolor           blue    device1 33\nhscan           22.22 33.33\nvscan           0 16.67\n\n[light]\nname            light12\ncolor           red     device1 34\ncolor           green   device1 35\ncolor           blue    device1 36\nhscan           33.33 44.44\nvscan           0 16.67\n\n[light]\nname            light13\ncolor           red     device1 37\ncolor           green   device1 38\ncolor           blue    device1 39\nhscan           44.44 55.56\nvscan           0 16.67\n\n[light]\nname            light14\ncolor           red     device1 40\ncolor           green   device1 41\ncolor           blue    device1 42\nhscan           55.56 66.67\nvscan           0 16.67\n\n[light]\nname            light15\ncolor           red     device1 43\ncolor           green   device1 44\ncolor           blue    device1 45\nhscan           66.67 77.78\nvscan           0 16.67\n\n[light]\nname            light16\ncolor           red     device1 46\ncolor           green   device1 47\ncolor           blue    device1 48\nhscan           77.78 88.89\nvscan           0 16.67\n\n[light]\nname            light17\ncolor           red     device1 49\ncolor           green   device1 50\ncolor           blue    device1 51\nhscan           88.89 100\nvscan           0 16.67\n\n[light]\nname            light18\ncolor           red     device1 52\ncolor           green   device1 53\ncolor           blue    device1 54\nhscan           88.89 100\nvscan           16.67 33.33\n\n[light]\nname            light19\ncolor           red     device1 55\ncolor           green   device1 56\ncolor           blue    device1 57\nhscan           88.89 100\nvscan           33.33 50\n\n[light]\nname            light20\ncolor           red     device1 58\ncolor           green   device1 59\ncolor           blue    device1 60\nhscan           88.89 100\nvscan           50 66.67\n\n[light]\nname            light21\ncolor           red     device1 61\ncolor           green   device1 62\ncolor           blue    device1 63\nhscan           88.89 100\nvscan           66.67 83.33\n\n[light]\nname            light22\ncolor           red     device1 64\ncolor           green   device1 65\ncolor           blue    device1 66\nhscan           88.89 100\nvscan           83.33 100\n\n[light]\nname            light23\ncolor           red     device1 67\ncolor           green   device1 68\ncolor           blue    device1 69\nhscan           77.78 88.89\nvscan           83.33 100\n\n[light]\nname            light24\ncolor           red     device1 70\ncolor           green   device1 71\ncolor           blue    device1 72\nhscan           66.67 77.78\nvscan           83.33 100\n\n[light]\nname            light25\ncolor           red     device1 73\ncolor           green   device1 74\ncolor           blue    device1 75\nhscan           55.56 66.67\nvscan           83.33 100\n\n\n"
  },
  {
    "path": "packages/addons/service/boblightd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"boblightd\"\nPKG_VERSION=\"478\"\nPKG_SHA256=\"78b82c9b133ce20c3d24aba96abe4a8302ec8dc640460b3b7302aa1d368c543a\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://code.google.com/p/boblight\"\nPKG_URL=\"${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libusb\"\nPKG_SECTION=\"service/multimedia\"\nPKG_SHORTDESC=\"Boblight: an AmbiLight controller\"\nPKG_LONGDESC=\"Boblight(${PKG_VERSION}) is an opensource AmbiLight implementation.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Boblight\"\nPKG_ADDON_TYPE=\"xbmc.service\"\nPKG_TOOLCHAIN=\"autotools\"\n\nif [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n  PKG_DEPENDS_TARGET+=\" libX11 libXext libXrender\"\nfi\n\nif [ \"${OPENGL_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" mesa glu\"\nfi\n\nif [ \"${OPENGL}\" = \"no\" ]; then\n  EXTRAOPTS=\"--without-opengl\"\nfi\n\nif [ ! \"${DISPLAYSERVER}\" = \"x11\" ]; then\n  EXTRAOPTS+=\" --without-x11\"\nfi\n\nPKG_CONFIGURE_OPTS_TARGET=\"${EXTRAOPTS} --without-portaudio\"\n\nmakeinstall_target() {\n  : # nothing to do here\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n  cp -P ${PKG_BUILD}/.${TARGET_NAME}/src/.libs/libboblight.so* ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp -P ${PKG_BUILD}/.${TARGET_NAME}/src/boblightd ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp -P ${PKG_BUILD}/.${TARGET_NAME}/src/boblight-constant ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/src/boblight-X11 ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  fi\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/config\n  cp -R ${PKG_DIR}/config/boblight.conf ${ADDON_BUILD}/${PKG_ADDON_ID}/config\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    cp -R ${PKG_DIR}/config/boblight.X11.sample ${ADDON_BUILD}/${PKG_ADDON_ID}/config\n  fi\n}\n"
  },
  {
    "path": "packages/addons/service/boblightd/patches/boblightd-2.0.5-getopt-includes.patch",
    "content": "diff --git a/src/clients/flagmanager.cpp b/src/clients/flagmanager.cpp\nindex d9f3cbf..82eb978 100644\n--- a/src/clients/flagmanager.cpp\n+++ b/src/clients/flagmanager.cpp\n@@ -25,6 +25,8 @@\n #define BOBLIGHT_DLOPEN_EXTERN\n #include \"../lib/boblight.h\"\n \n+#include <unistd.h>\n+\n using namespace std;\n \n //very simple, store a copy of argc and argv\n"
  },
  {
    "path": "packages/addons/service/boblightd/source/bin/boblightd.start",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2010 Adam Boeglin (adamrb@gmail.com)\n\n. /etc/profile\n\noe_setup_addon service.multimedia.boblightd\n\nchmod a+x $ADDON_DIR/bin/*\n\ncp $ADDON_DIR/config/*.sample $ADDON_HOME\nif [ ! -f $ADDON_HOME/boblight.conf ] ; then\n  cp $ADDON_DIR/config/boblight.conf $ADDON_HOME/boblight.conf\nfi\n\nif [ -x $ADDON_DIR/bin/boblight-X11 -a -e $ADDON_HOME/boblight.X11 ] ; then\n  boblight-X11 -f >/dev/null 2>&1\nfi\n\nexec boblightd -c $ADDON_HOME/boblight.conf > $ADDON_LOG_FILE 2>&1\n"
  },
  {
    "path": "packages/addons/service/boblightd/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n"
  },
  {
    "path": "packages/addons/service/boblightd/source/sleep.d/boblightd.power",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\nSERVICE=\"service.multimedia.boblightd.service\"\n\ncase \"$1\" in\n  pre)\n    if systemctl is-active \"$SERVICE\" &>/dev/null ; then\n      systemctl stop \"$SERVICE\"\n    fi\n    ;;\n  post)\n    if systemctl is-enabled \"$SERVICE\" &>/dev/null ; then\n      systemctl start \"$SERVICE\"\n    fi\n    ;;\nesac\n"
  },
  {
    "path": "packages/addons/service/boblightd/source/system.d/service.multimedia.boblightd.service",
    "content": "[Unit]\nDescription=boblightd\nAfter=graphical.target\n\n[Service]\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.multimedia.boblightd/bin/boblightd.start\"\nTimeoutStopSec=1\nRestart=always\nRestartSec=10\nStartLimitInterval=0\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/dispmanx_vnc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dispmanx_vnc\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"arm\"\nPKG_ADDON_PROJECTS=\"RPi ARM\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"service/system\"\nPKG_SHORTDESC=\"Addon removed\"\nPKG_LONGDESC=\"Addon removed\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_ADDON_BROKEN=\"Raspberry Pi VNC was removed.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Raspberry Pi VNC\"\nPKG_ADDON_TYPE=\"xbmc.broken\"\n\naddon() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/service/docker/changelog.txt",
    "content": "1\n- not released for LE11\n\n2\n- not released for LE11\n\n3\n- fix ctop\n- update moby and cli to 23.0.4\n- containerd: update to 1.7.0\n- runc: build with seccomp\n- runc: update to 1.1.5\n\n4\n- update moby and cli to 23.0.6\n- containerd: update to 1.7.1\n- runc: update to 1.1.7\n"
  },
  {
    "path": "packages/addons/service/docker/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2017 Lukas Rusak (lrusak@libreelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"docker\"\nPKG_REV=\"4\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"ASL\"\nPKG_SITE=\"http://www.docker.com/\"\nPKG_DEPENDS_TARGET=\"cli containerd ctop moby runc tini\"\nPKG_SECTION=\"service/system\"\nPKG_SHORTDESC=\"Docker is an open-source engine that automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere.\"\nPKG_LONGDESC=\"Docker containers can encapsulate any payload, and will run consistently on and between virtually any server. The same container that a developer builds and tests on a laptop will run at scale, in production*, on VMs, bare-metal servers, OpenStack clusters, public instances, or combinations of the above.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Docker\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # cli\n    cp -P $(get_build_dir cli)/bin/docker ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # moby\n    cp -P $(get_build_dir moby)/bin/dockerd ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_build_dir moby)/bin/docker-proxy ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/docker-proxy\n\n    # containerd\n    cp -P $(get_build_dir containerd)/bin/containerd ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/containerd\n    cp -P $(get_build_dir containerd)/bin/containerd-shim ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/containerd-shim\n    cp -P $(get_build_dir containerd)/bin/containerd-shim-runc-v2 ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/containerd-shim-runc-v2\n\n    # ctop\n    cp -P $(get_build_dir ctop)/bin/ctop ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/ctop\n\n    # runc\n    cp -P $(get_build_dir runc)/bin/runc ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/runc\n\n    # tini\n    cp -P $(get_build_dir tini)/.${TARGET_NAME}/tini-static ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/docker-init\n}\n\npost_install_addon() {\n  sed -e \"s/@DISTRO_PKG_SETTINGS_ID@/${DISTRO_PKG_SETTINGS_ID}/g\" -i \"${INSTALL}/default.py\"\n}\n"
  },
  {
    "path": "packages/addons/service/docker/source/bin/docker-config",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nADDON_DIR=\"/storage/.kodi/addons/service.system.docker\"\nADDON_HOME_DIR=\"/storage/.kodi/userdata/addon_data/service.system.docker\"\n\nif [ ! -d \"$ADDON_HOME_DIR/config\" ]; then\n  mkdir -p $ADDON_HOME_DIR/config\nfi\n\nif [ ! -f \"$ADDON_HOME_DIR/config/docker.conf\" ]; then\n  cp $ADDON_DIR/config/docker.conf $ADDON_HOME_DIR/config/docker.conf\nelse\n  # previous deprecated options before v23.0.0 need to be updated\n  sed -i -e 's/--storage-opt overlay2.override_kernel_check=1//' \\\n         -e 's/--graph=/--data-root=/' $ADDON_HOME_DIR/config/docker.conf\nfi\n\nif [ ! -d \"$ADDON_HOME_DIR/docker\" ]; then\n  mkdir -p $ADDON_HOME_DIR/docker\nfi\n\nif [ ! -d /var/lib/docker ]; then\n  ln -sf $ADDON_HOME_DIR/docker /var/lib/docker\nfi\n"
  },
  {
    "path": "packages/addons/service/docker/source/config/docker.conf",
    "content": "DOCKER_DAEMON_OPTS=\"--data-root=/storage/.kodi/userdata/addon_data/service.system.docker/docker\"\nDOCKER_STORAGE_OPTS=\"--storage-driver=overlay2\"\n"
  },
  {
    "path": "packages/addons/service/docker/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nimport os\nimport subprocess\nimport sys\nimport time\nimport xbmc\nimport xbmcaddon\nimport xbmcgui\n\n__author__      = 'lrusak'\n__addon__       = xbmcaddon.Addon()\n__path__        = __addon__.getAddonInfo('path')\n\nsys.path.append(__path__ + 'lib')\nimport dockermon\n\n# docker events for api 1.23 (docker version 1.11.x)\n# https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#monitor-docker-s-events\n\ndocker_events = {\n                  'container': {\n                                 'string': 30030,\n                                 'event': {\n                                            'attach':       {\n                                                              'string': 30031,\n                                                              'enabled': '',\n                                                            },\n                                            'commit':       {\n                                                              'string': 30032,\n                                                              'enabled': '',\n                                                            },\n                                            'copy':         {\n                                                              'string': 30033,\n                                                              'enabled': '',\n                                                            },\n                                            'create':       {\n                                                              'string': 30034,\n                                                              'enabled': '',\n                                                            },\n                                            'destroy':      {\n                                                              'string': 30035,\n                                                              'enabled': '',\n                                                            },\n                                            'die':          {\n                                                              'string': 30036,\n                                                              'enabled': '',\n                                                            },\n                                            'exec_create':  {\n                                                              'string': 30037,\n                                                              'enabled': '',\n                                                            },\n                                            'exec_start':   {\n                                                              'string': 30038,\n                                                              'enabled': '',\n                                                            },\n                                            'export':       {\n                                                              'string': 30039,\n                                                              'enabled': '',\n                                                            },\n                                            'kill':         {\n                                                              'string': 30040,\n                                                              'enabled': True,\n                                                            },\n                                            'oom':          {\n                                                              'string': 30041,\n                                                              'enabled': True,\n                                                            },\n                                            'pause':        {\n                                                              'string': 30042,\n                                                              'enabled': '',\n                                                            },\n                                            'rename':       {\n                                                              'string': 30043,\n                                                              'enabled': '',\n                                                            },\n                                            'resize':       {\n                                                              'string': 30044,\n                                                              'enabled': '',\n                                                            },\n                                            'restart':      {\n                                                              'string': 30045,\n                                                              'enabled': '',\n                                                            },\n                                            'start':        {\n                                                              'string': 30046,\n                                                              'enabled': True,\n                                                            },\n                                            'stop':         {\n                                                              'string': 30047,\n                                                              'enabled': True,\n                                                            },\n                                            'top':          {\n                                                              'string': 30048,\n                                                              'enabled': '',\n                                                            },\n                                            'unpause':      {\n                                                              'string': 30049,\n                                                              'enabled': '',\n                                                            },\n                                            'update':       {\n                                                              'string': 30050,\n                                                              'enabled': '',\n                                                            },\n                                          },\n                               },\n                  'image':     {\n                                 'string': 30060,\n                                 'event': {\n                                            'delete':       {\n                                                              'string': 30061,\n                                                              'enabled': '',\n                                                            },\n                                            'import':       {\n                                                              'string': 30062,\n                                                              'enabled': '',\n                                                            },\n                                            'pull':         {\n                                                              'string': 30063,\n                                                              'enabled': True,\n                                                            },\n                                            'push':         {\n                                                              'string': 30064,\n                                                              'enabled': '',\n                                                            },\n                                            'tag':          {\n                                                              'string': 30065,\n                                                              'enabled': '',\n                                                            },\n                                            'untag':        {\n                                                              'string': 30066,\n                                                              'enabled': '',\n                                                            },\n                                          },\n                               },\n                  'volume':    {\n                                 'string': 30070,\n                                 'event': {\n                                            'create':       {\n                                                              'string': 30071,\n                                                              'enabled': '',\n                                                            },\n                                            'mount':        {\n                                                              'string': 30072,\n                                                              'enabled': '',\n                                                            },\n                                            'unmount':      {\n                                                              'string': 30073,\n                                                              'enabled': '',\n                                                            },\n                                            'destroy':      {\n                                                              'string': 30074,\n                                                              'enabled': '',\n                                                            },\n                                          },\n                               },\n                  'network':   {\n                                 'string': 30080,\n                                 'event': {\n                                            'create':       {\n                                                              'string': 30081,\n                                                              'enabled': '',\n                                                            },\n                                            'connect':      {\n                                                              'string': 30082,\n                                                              'enabled': '',\n                                                            },\n                                            'disconnect':   {\n                                                              'string': 30083,\n                                                              'enabled': '',\n                                                            },\n                                            'destroy':      {\n                                                              'string': 30084,\n                                                              'enabled': '',\n                                                            },\n                                          },\n                                },\n                }\n\ndef print_notification(json_data):\n    event_string = docker_events[json_data['Type']]['event'][json_data['Action']]['string']\n    if __addon__.getSetting('notifications') == '0': # default\n        if docker_events[json_data['Type']]['event'][json_data['Action']]['enabled']:\n            try:\n                message = ' '.join([__addon__.getLocalizedString(30010),\n                                    json_data['Actor']['Attributes']['name'],\n                                    '|',\n                                    __addon__.getLocalizedString(30012),\n                                    __addon__.getLocalizedString(event_string)])\n            except KeyError as e:\n                message = ' '.join([__addon__.getLocalizedString(30011),\n                                    json_data['Type'],\n                                    '|',\n                                    __addon__.getLocalizedString(30012),\n                                    __addon__.getLocalizedString(event_string)])\n\n    elif __addon__.getSetting('notifications') == '1': # all\n        try:\n            message = ' '.join([__addon__.getLocalizedString(30010),\n                                json_data['Actor']['Attributes']['name'],\n                                '|',\n                                __addon__.getLocalizedString(30012),\n                                __addon__.getLocalizedString(event_string)])\n        except KeyError as e:\n            message = ' '.join([__addon__.getLocalizedString(30011),\n                                json_data['Type'],\n                                '|',\n                                __addon__.getLocalizedString(30012),\n                                __addon__.getLocalizedString(event_string)])\n\n    elif __addon__.getSetting('notifications') == '2': # none\n        pass\n\n    elif __addon__.getSetting('notifications') == '3': # custom\n        if __addon__.getSetting(json_data['Action']) == 'true':\n            try:\n                message = ' '.join([__addon__.getLocalizedString(30010),\n                                    json_data['Actor']['Attributes']['name'],\n                                    '|',\n                                    __addon__.getLocalizedString(30012),\n                                    __addon__.getLocalizedString(event_string)])\n            except KeyError as e:\n                message = ' '.join([__addon__.getLocalizedString(30011),\n                                    json_data['Type'],\n                                    '|',\n                                    __addon__.getLocalizedString(30012),\n                                    __addon__.getLocalizedString(event_string)])\n\n    dialog = xbmcgui.Dialog()\n    try:\n        if message != '':\n            length = int(__addon__.getSetting('notification_length')) * 1000\n            dialog.notification('Docker', message, __path__ + 'resources/icon.png', length)\n            xbmc.log('## service.system.docker ## %s' % message)\n    except NameError as e:\n        pass\n\nclass Main(object):\n\n    def __init__(self, *args, **kwargs):\n\n        #############################\n        # Temp cleanup for old method\n\n        restart_docker = False\n\n        if os.path.islink('/storage/.config/system.d/service.system.docker.socket'):\n            os.remove('/storage/.config/system.d/service.system.docker.socket')\n        if os.path.islink('/storage/.config/system.d/docker.socket'):\n            os.remove('/storage/.config/system.d/docker.socket')\n\n        if os.path.islink('/storage/.config/system.d/service.system.docker.service'):\n            if 'systemd' in os.readlink('/storage/.config/system.d/service.system.docker.service'):\n                os.remove('/storage/.config/system.d/service.system.docker.service')\n                restart_docker = True\n\n        if os.path.islink('/storage/.config/system.d/docker.service'):\n            if 'systemd' in os.readlink('/storage/.config/system.d/docker.service'):\n                os.remove('/storage/.config/system.d/docker.service')\n                restart_docker = True\n\n        if os.path.islink('/storage/.config/system.d/multi-user.target.wants/service.system.docker.service'):\n            if 'systemd' in os.readlink('/storage/.config/system.d/multi-user.target.wants/service.system.docker.service'):\n                os.remove('/storage/.config/system.d/multi-user.target.wants/service.system.docker.service')\n                restart_docker = True\n\n        if restart_docker:\n            subprocess.run(['systemctl','enable','/storage/.kodi/addons/service.system.docker/system.d/service.system.docker.service'], close_fds=True)\n            subprocess.run(['systemctl','restart','service.system.docker.service'], close_fds=True)\n\n        # end temp cleanup\n        #############################\n\n        monitor = DockerMonitor(self)\n\n        while not monitor.abortRequested():\n            try:\n                dockermon.watch(print_notification, run=lambda: not monitor.abortRequested())\n            except Exception:\n                monitor.waitForAbort(1)\n        del monitor\n\nclass DockerMonitor(xbmc.Monitor):\n\n    def __init__(self, *args, **kwargs):\n        xbmc.Monitor.__init__(self)\n\n    def onSettingsChanged(self):\n        pass\n\nif ( __name__ == \"__main__\" ):\n    Main()\n\ndel __addon__\n"
  },
  {
    "path": "packages/addons/service/docker/source/examples/couchpotato.service",
    "content": "[Unit]\nDescription=%p container\nRequires=service.system.docker.service\nAfter=service.system.docker.service\n\n[Service]\nRestart=always\nRestartSec=10s\nTimeoutStartSec=0\nExecStartPre=-/bin/sh -c \"mkdir -p /storage/%p/config /storage/%p/data\"\nExecStart=/storage/.kodi/addons/service.system.docker/bin/docker run \\\n          --rm \\\n          --name=%p \\\n          --hostname=libreelec-%p \\\n          --volume=/storage/%p/config:/config \\\n          --volume=/storage/%p/data:/data \\\n          --publish=5050:5050 \\\n          timhaak/%p\nExecStop=/storage/.kodi/addons/service.system.docker/bin/docker stop %p\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/addons/service/docker/source/examples/mysql.service",
    "content": "[Unit]\nDescription=%p container\nRequires=service.system.docker.service\nAfter=service.system.docker.service\nBefora=kodi.service\n\n[Service]\nRestart=always\nRestartSec=10s\nTimeoutStartSec=0\nExecStartPre=-/bin/sh -c \"mkdir -p /storage/%p/config /storage/%p/data\"\nExecStart=/storage/.kodi/addons/service.system.docker/bin/docker run \\\n          --rm \\\n          --name=%p \\\n          --hostname=libreelec-%p \\\n          --volume=/storage/%p/config/:/etc/mysql/conf.d \\\n          --volume=/storage/%p/data:/var/lib/mysql \\\n          --publish=3306:3306 \\\n          --env=MYSQL_ROOT_PASSWORD=libreelec \\\n          --env=MYSQL_USER=kodi \\\n          --env=MYSQL_PASSWORD=kodi \\\n          %p\nExecStop=/storage/.kodi/addons/service.system.docker/bin/docker stop %p\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/addons/service/docker/source/examples/sabnzbd.service",
    "content": "[Unit]\nDescription=%p container\nRequires=service.system.docker.service\nAfter=service.system.docker.service\n\n[Service]\nRestart=always\nRestartSec=10s\nTimeoutStartSec=0\nExecStartPre=-/bin/sh -c \"mkdir -p /storage/%p/config /storage/%p/data\"\nExecStart=/storage/.kodi/addons/service.system.docker/bin/docker run \\\n          --rm \\\n          --name=%p \\\n          --hostname=libreelec-%p \\\n          --volume=/storage/%p/config:/config \\\n          --volume=/storage/%p/data:/data \\\n          --publish=8080:8080 \\\n          timhaak/%p\nExecStop=/storage/.kodi/addons/service.system.docker/bin/docker stop %p\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/addons/service/docker/source/examples/sickbeard.service",
    "content": "[Unit]\nDescription=%p container\nRequires=service.system.docker.service\nAfter=service.system.docker.service\n\n[Service]\nRestart=always\nRestartSec=10s\nTimeoutStartSec=0\nExecStartPre=-/bin/sh -c \"mkdir -p /storage/%p/config /storage/%p/data\"\nExecStart=/storage/.kodi/addons/service.system.docker/bin/docker run \\\n          --rm \\\n          --name=%p \\\n          --hostname=libreelec-%p \\\n          --volume=/storage/%p/config:/config \\\n          --volume=/storage/%p/data:/data \\\n          --publish=8081:8081 \\\n          timhaak/%p\nExecStop=/storage/.kodi/addons/service.system.docker/bin/docker stop %p\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/addons/service/docker/source/examples/transmission.service",
    "content": "[Unit]\nDescription=%p container\nRequires=service.system.docker.service\nAfter=service.system.docker.service\n\n[Service]\nRestart=always\nRestartSec=10s\nTimeoutStartSec=0\nExecStartPre=-/bin/sh -c \"mkdir -p /storage/%p/watch /storage/%p/downloads /storage/%p/incomplete /storage/%p/config\"\nExecStart=/storage/.kodi/addons/service.system.docker/bin/docker run \\\n          --rm \\\n          --name=%p \\\n          --hostname=libreelec-%p \\\n          --volume=/storage/%p/watch:/watch \\\n          --volume=/storage/%p/downloads:/downloads \\\n          --volume=/storage/%p/incomplete:/incomplete \\\n          --volume=/storage/%p/config:/config \\\n          --publish=9091:9091 \\\n          timhaak/%p\nExecStop=/storage/.kodi/addons/service.system.docker/bin/docker stop %p\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/addons/service/docker/source/examples/var-lib-docker.mount",
    "content": "[Unit]\nDescription=Docker loopback mount\nRequires=local-fs.target\nBefore=service.system.docker.service\n\n[Mount]\nWhat=/storage/btrfs-loop.img\nWhere=/var/lib/docker\n\nOptions=loop,compress=lzo\nType=btrfs\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/addons/service/docker/source/lib/dockermon.py",
    "content": "#!/usr/bin/env python\n\"\"\"docker monitor using docker /events HTTP streaming API\"\"\"\n\"\"\"https://github.com/CyberInt/dockermon\"\"\"\n\nfrom contextlib import closing\nfrom functools import partial\nfrom socket import socket, AF_UNIX, timeout\nfrom subprocess import Popen, PIPE\nfrom sys import stdout, version_info\nimport json\nimport shlex\n\nif version_info[:2] < (3, 0):\n    from httplib import OK as HTTP_OK\n    from urlparse import urlparse\nelse:\n    from http.client import OK as HTTP_OK\n    from urllib.parse import urlparse\n\n__version__ = '0.2.2'\n# buffer size must be 256 or lower otherwise events won't show in realtime\nbufsize = 256\ndefault_sock_url = 'ipc:///var/run/docker.sock'\n\n\nclass DockermonError(Exception):\n    pass\n\n\ndef read_http_header(sock):\n    \"\"\"Read HTTP header from socket, return header and rest of data.\"\"\"\n    buf = []\n    hdr_end = '\\r\\n\\r\\n'\n\n    while True:\n        buf.append(sock.recv(bufsize).decode('utf-8'))\n        data = ''.join(buf)\n        i = data.find(hdr_end)\n        if i == -1:\n            continue\n        return data[:i], data[i + len(hdr_end):]\n\n\ndef header_status(header):\n    \"\"\"Parse HTTP status line, return status (int) and reason.\"\"\"\n    status_line = header[:header.find('\\r')]\n    # 'HTTP/1.1 200 OK' -> (200, 'OK')\n    fields = status_line.split(None, 2)\n    return int(fields[1]), fields[2]\n\n\ndef connect(url):\n    \"\"\"Connect to UNIX or TCP socket.\n\n        url can be either tcp://<host>:port or ipc://<path>\n    \"\"\"\n    url = urlparse(url)\n    if url.scheme == 'tcp':\n        sock = socket()\n        netloc = tuple(url.netloc.rsplit(':', 1))\n        hostname = socket.gethostname()\n    elif url.scheme == 'ipc':\n        sock = socket(AF_UNIX)\n        netloc = url.path\n        hostname = 'localhost'\n    else:\n        raise ValueError('unknown socket type: %s' % url.scheme)\n\n    sock.connect(netloc)\n    return sock, hostname\n\n\ndef watch(callback, url=default_sock_url, run=None):\n    \"\"\"Watch docker events. Will call callback with each new event (dict).\n\n        url can be either tcp://<host>:port or ipc://<path>\n    \"\"\"\n    sock, hostname = connect(url)\n    if run:\n        sock.settimeout(1.5)\n    request = 'GET /events HTTP/1.1\\nHost: %s\\n\\n' % hostname\n    request = request.encode('utf-8')\n\n    with closing(sock):\n        sock.sendall(request)\n        header, payload = read_http_header(sock)\n        status, reason = header_status(header)\n        if status != HTTP_OK:\n            raise DockermonError('bad HTTP status: %s %s' % (status, reason))\n\n        # Messages are \\r\\n<size in hex><JSON payload>\\r\\n\n        buf = [payload]\n        while True:\n            try:\n                chunk = sock.recv(bufsize)\n            except timeout:\n                if run():\n                    continue\n            if run and not run():\n                raise DockermonError('stopped')\n            if not chunk:\n                raise EOFError('socket closed')\n            buf.append(chunk.decode('utf-8'))\n            data = ''.join(buf)\n            i = data.find('\\r\\n')\n            if i == -1:\n                continue\n\n            size = int(data[:i], 16)\n            start = i + 2  # Skip initial \\r\\n\n\n            if len(data) < start + size + 2:\n                continue\n            payload = data[start:start+size]\n            callback(json.loads(payload))\n            buf = [data[start+size+2:]]  # Skip \\r\\n suffix\n\n\ndef print_callback(msg):\n    \"\"\"Print callback, prints message to stdout as JSON in one line.\"\"\"\n    json.dump(msg, stdout)\n    stdout.write('\\n')\n    stdout.flush()\n\n\ndef prog_callback(prog, msg):\n    \"\"\"Program callback, calls prog with message in stdin\"\"\"\n    pipe = Popen(prog, stdin=PIPE)\n    data = json.dumps(msg)\n    pipe.stdin.write(data.encode('utf-8'))\n    pipe.stdin.close()\n\n\nif __name__ == '__main__':\n    from argparse import ArgumentParser\n\n    parser = ArgumentParser(description=__doc__)\n    parser.add_argument('--prog', default=None,\n                        help='program to call (e.g. \"jq --unbuffered .\")')\n    parser.add_argument(\n        '--socket-url', default=default_sock_url,\n        help='socket url (ipc:///path/to/sock or tcp:///host:port)')\n    parser.add_argument(\n        '--version', help='print version and exit',\n        action='store_true', default=False)\n    args = parser.parse_args()\n\n    if args.version:\n        print('dockermon %s' % __version__)\n        raise SystemExit\n\n    if args.prog:\n        prog = shlex.split(args.prog)\n        callback = partial(prog_callback, prog)\n    else:\n        callback = print_callback\n\n    try:\n        watch(callback, args.socket_url)\n    except (KeyboardInterrupt, EOFError):\n        pass\n"
  },
  {
    "path": "packages/addons/service/docker/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: docker\n# Addon id: service.system.docker\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Settings\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Notifications\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"Default\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"All\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"Off\"\nmsgstr \"\"\n\nmsgctxt \"#30005\"\nmsgid \"Custom\"\nmsgstr \"\"\n\nmsgctxt \"#30006\"\nmsgid \"Notification Length (Seconds)\"\nmsgstr \"\"\n\nmsgctxt \"#30010\"\nmsgid \"Name:\"\nmsgstr \"\"\n\nmsgctxt \"#30011\"\nmsgid \"Type:\"\nmsgstr \"\"\n\nmsgctxt \"#30012\"\nmsgid \"Action:\"\nmsgstr \"\"\n\nmsgctxt \"#30030\"\nmsgid \"Container\"\nmsgstr \"\"\n\nmsgctxt \"#30031\"\nmsgid \"attach\"\nmsgstr \"\"\n\nmsgctxt \"#30032\"\nmsgid \"commit\"\nmsgstr \"\"\n\nmsgctxt \"#30033\"\nmsgid \"copy\"\nmsgstr \"\"\n\nmsgctxt \"#30034\"\nmsgid \"create\"\nmsgstr \"\"\n\nmsgctxt \"#30035\"\nmsgid \"destroy\"\nmsgstr \"\"\n\nmsgctxt \"#30036\"\nmsgid \"die\"\nmsgstr \"\"\n\nmsgctxt \"#30037\"\nmsgid \"exec_create\"\nmsgstr \"\"\n\nmsgctxt \"#30038\"\nmsgid \"exec_start\"\nmsgstr \"\"\n\nmsgctxt \"#30039\"\nmsgid \"export\"\nmsgstr \"\"\n\nmsgctxt \"#30040\"\nmsgid \"kill\"\nmsgstr \"\"\n\nmsgctxt \"#30041\"\nmsgid \"out of memory\"\nmsgstr \"\"\n\nmsgctxt \"#30042\"\nmsgid \"pause\"\nmsgstr \"\"\n\nmsgctxt \"#30043\"\nmsgid \"rename\"\nmsgstr \"\"\n\nmsgctxt \"#30044\"\nmsgid \"resize\"\nmsgstr \"\"\n\nmsgctxt \"#30045\"\nmsgid \"restart\"\nmsgstr \"\"\n\nmsgctxt \"#30046\"\nmsgid \"start\"\nmsgstr \"\"\n\nmsgctxt \"#30047\"\nmsgid \"stop\"\nmsgstr \"\"\n\nmsgctxt \"#30048\"\nmsgid \"top\"\nmsgstr \"\"\n\nmsgctxt \"#30049\"\nmsgid \"unpause\"\nmsgstr \"\"\n\nmsgctxt \"#30050\"\nmsgid \"update\"\nmsgstr \"\"\n\nmsgctxt \"#30060\"\nmsgid \"Image\"\nmsgstr \"\"\n\nmsgctxt \"#30061\"\nmsgid \"delete\"\nmsgstr \"\"\n\nmsgctxt \"#30062\"\nmsgid \"import\"\nmsgstr \"\"\n\nmsgctxt \"#30063\"\nmsgid \"pull\"\nmsgstr \"\"\n\nmsgctxt \"#30064\"\nmsgid \"push\"\nmsgstr \"\"\n\nmsgctxt \"#30065\"\nmsgid \"tag\"\nmsgstr \"\"\n\nmsgctxt \"#30066\"\nmsgid \"untag\"\nmsgstr \"\"\n\nmsgctxt \"#30070\"\nmsgid \"Volume\"\nmsgstr \"\"\n\nmsgctxt \"#30071\"\nmsgid \"create\"\nmsgstr \"\"\n\nmsgctxt \"#30072\"\nmsgid \"mount\"\nmsgstr \"\"\n\nmsgctxt \"#30073\"\nmsgid \"unmount\"\nmsgstr \"\"\n\nmsgctxt \"#30074\"\nmsgid \"destroy\"\nmsgstr \"\"\n\nmsgctxt \"#30080\"\nmsgid \"Network\"\nmsgstr \"\"\n\nmsgctxt \"#30081\"\nmsgid \"create\"\nmsgstr \"\"\n\nmsgctxt \"#30082\"\nmsgid \"connect\"\nmsgstr \"\"\n\nmsgctxt \"#30083\"\nmsgid \"disconnect\"\nmsgstr \"\"\n\nmsgctxt \"#30084\"\nmsgid \"destroy\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/docker/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n   <category   label=\"30000\">\n      <setting label=\"30001\" type=\"enum\"   id=\"notifications\"       default=\"0\"     lvalues=\"30002|30003|30004|30005\"/>\n      <setting label=\"30034\" type=\"bool\"   id=\"create\"              default=\"false\" visible=\"eq(-1,3)\"            subsetting=\"true\"/>\n      <setting label=\"30035\" type=\"bool\"   id=\"destroy\"             default=\"false\" visible=\"eq(-2,3)\"            subsetting=\"true\"/>\n      <setting label=\"30036\" type=\"bool\"   id=\"die\"                 default=\"false\" visible=\"eq(-3,3)\"            subsetting=\"true\"/>\n      <setting label=\"30040\" type=\"bool\"   id=\"kill\"                default=\"false\" visible=\"eq(-4,3)\"            subsetting=\"true\"/>\n      <setting label=\"30041\" type=\"bool\"   id=\"oom\"                 default=\"false\" visible=\"eq(-5,3)\"            subsetting=\"true\"/>\n      <setting label=\"30046\" type=\"bool\"   id=\"start\"               default=\"false\" visible=\"eq(-6,3)\"            subsetting=\"true\"/>\n      <setting label=\"30047\" type=\"bool\"   id=\"stop\"                default=\"false\" visible=\"eq(-7,3)\"            subsetting=\"true\"/>\n      <setting label=\"30006\" type=\"slider\" id=\"notification_length\" default=\"5\"     visible=\"lt(-8,2) | gt(-8,2)\" range=\"2,10\"       option=\"int\" />\n   </category>\n</settings>\n\n"
  },
  {
    "path": "packages/addons/service/docker/source/system.d/service.system.docker.service",
    "content": "[Unit]\nDescription=Docker Application Container Engine\nDocumentation=https://docs.docker.com\nAfter=network.target\n\n[Service]\nType=idle\nEnvironment=PATH=/bin:/sbin:/usr/bin:/usr/sbin:/storage/.kodi/addons/service.system.docker/bin\nExecStartPre=/storage/.kodi/addons/service.system.docker/bin/docker-config\nEnvironmentFile=-/storage/.kodi/userdata/addon_data/service.system.docker/config/docker.conf\nExecStart=/storage/.kodi/addons/service.system.docker/bin/dockerd --exec-opt native.cgroupdriver=systemd \\\n                                                                  --log-driver=journald \\\n                                                                  --group=root \\\n                                                                  $DOCKER_DAEMON_OPTS \\\n                                                                  $DOCKER_STORAGE_OPTS\nExecReload=/bin/kill -s HUP $MAINPID\nTasksMax=8192\nLimitNOFILE=1048576\nLimitNPROC=1048576\nLimitCORE=infinity\nTimeoutStartSec=0\nRestart=on-abnormal\n\n[Install]\nWantedBy=multi-user.target\nAlias=docker.service\n"
  },
  {
    "path": "packages/addons/service/emby/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"emby\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Add-on removed\"\nPKG_LONGDESC=\"Add-on removed\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_ADDON_BROKEN=\"Emby Server is no longer maintained and has been superseded by Emby Server 4\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Emby Server\"\nPKG_ADDON_TYPE=\"xbmc.broken\"\n\naddon() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/service/emby4/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/emby4/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"emby4\"\nPKG_VERSION=\"bootstrap\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"prop.\"\nPKG_SITE=\"http://emby.media\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Emby Server: a personal media server\"\nPKG_LONGDESC=\"Emby Server brings your home videos, music, and photos together, automatically converting and streaming your media on-the-fly to any device.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Emby Server 4\"\nPKG_ADDON_TYPE=\"xbmc.service\"\nPKG_ADDON_PROJECTS=\"any !RPi1\"\nPKG_ADDON_REQUIRES=\"tools.ffmpeg-tools:0.0.0 tools.dotnet-runtime:0.0.0\"\nPKG_MAINTAINER=\"Anton Voyl (awiouy)\"\n\naddon() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/service/emby4/source/bin/emby4.start",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\noe_setup_addon service.emby4\n\nlibs=\"${ADDON_DIR}/libs\"\nff=\"/storage/.kodi/addons/tools.ffmpeg-tools/bin\"\n\nif [ ! -e \"${libs}\" ]; then\n  url=\"https://github.com/MediaBrowser/Emby.Releases/releases\"\n  url_latest=\"${url}/latest\"\n  release=\"$(basename $(curl -fso /dev/null -w %{redirect_url} ${url_latest}))\"\n  url_download=\"${url}/download/${release}/embyserver-netcore_${release}.zip\"\n  zip=\"${ADDON_DIR}/bootstrap.zip\"\n  tmp=\"${ADDON_DIR}/tmp\"\n  rm -fr \"${tmp}\" \"${zip}\"\n  mkdir -p \"${tmp}\"\n  wget -q \"${url_download}\" -O \"${zip}\" && \\\n  unzip \"${zip}\" -d \"${tmp}\" && \\\n  mv \"${tmp}\" \"${libs}\" && \\\n  rm -f \"${zip}\" || \\\n  exit 1\nfi\n\nexec \\\nnice -n \"$emby_nice\" \\\ndotnet \"${libs}/system/EmbyServer.dll\" \\\n  -programdata \"${ADDON_HOME}\" \\\n  -ffmpeg \"${ff}/ffmpeg\" \\\n  -ffprobe \"${ff}/ffprobe\"\n"
  },
  {
    "path": "packages/addons/service/emby4/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport json\nimport subprocess\nimport xbmc\nimport xbmcaddon\nimport xbmcgui\n\n\ndef jsonrpc(request):\n    return json.loads(xbmc.executeJSONRPC(json.dumps(request)))\n\n\ndef disable_conflicting(conficting,\n        message='{that} conflicts with {this} and has been disabled'):\n    is_enabled = {'jsonrpc': '2.0', 'method': 'Addons.GetAddonDetails', 'id': 1,\n                  'params': {'addonid': conficting, 'properties': ['enabled']}}\n    disable = {'jsonrpc': '2.0', 'method': 'Addons.SetAddonEnabled', 'id': 1,\n               'params': {'addonid': conficting, 'enabled': False}}\n    try:\n        if jsonrpc(is_enabled)['result']['addon']['enabled']:\n            this = xbmcaddon.Addon().getAddonInfo('name')\n            that = xbmcaddon.Addon(conficting).getAddonInfo('name')\n            jsonrpc(disable)\n            dialog = xbmcgui.Dialog()\n            dialog.ok(this, message.format(\n                this=this, that=that))\n            del dialog\n    except KeyError:\n        pass\n\n\nclass Monitor(xbmc.Monitor):\n\n    def __init__(self, *args, **kwargs):\n        xbmc.Monitor.__init__(self)\n        self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n    def onSettingsChanged(self):\n        subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == '__main__':\n    disable_conflicting('service.emby')\n    Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/emby4/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: emby4\n# Addon id: service.emby4\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Priority (nice, 0=max, 19=min)\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/emby4/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n   <category   label=\"30000\">\n      <setting label=\"30001\" id=\"emby_nice\" type=\"slider\" default=\"10\" range=\"0,1,19\" option=\"int\" />\n    </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/emby4/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"emby_nice\" default=\"true\">10</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/emby4/source/system.d/service.emby4.service",
    "content": "[Unit]\nDescription=Emby 4 - streaming server\nDocumentation=http://emby.media\nWants=multi-user.target\nAfter=multi-user.target\n\n[Service]\nSyslogIdentifier=%N\nExecStart=/bin/sh /storage/.kodi/addons/%N/bin/emby4.start\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/addons/service/hyperion/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/hyperion/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"hyperion\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Hyperion: Add-on removed\"\nPKG_LONGDESC=\"Hyperion: Add-on removed\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_ADDON_BROKEN=\"Hyperion Classic has been discontinued. Please go to Hyperion.NG (Next Generation)\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Hyperion\"\nPKG_ADDON_TYPE=\"xbmc.broken\"\n\naddon() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/service/inadyn/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/inadyn/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"inadyn\"\nPKG_VERSION=\"2.10.0\"\nPKG_SHA256=\"a9bc24ea8d59644f909dd98bf3b8efcfb95c153f46d9cb62e99d744d44ed9465\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"http://troglobit.com/inadyn.html\"\nPKG_URL=\"https://github.com/troglobit/inadyn/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libconfuse openssl\"\nPKG_SECTION=\"service/system\"\nPKG_SHORTDESC=\"Inadyn: a small and simple Dynamic Domain Name System client\"\nPKG_LONGDESC=\"Inadyn (${PKG_VERSION}) is a small and simple Dynamic Domain Name System (DDNS) client with HTTPS support. It is commonly available in many GNU/Linux distributions, used in off-the-shelf routers and Internet gateways to automate the task of keeping your DNS record up to date with any IP address changes from your ISP. It can also be used in installations with redundant (backup) connections to the Internet.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Inadyn\"\nPKG_ADDON_TYPE=\"xbmc.service\"\nPKG_MAINTAINER=\"Anton Voyl (awiouy)\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-openssl\"\n\nmakeinstall_target() {\n  :\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp ${PKG_BUILD}/.${TARGET_NAME}/src/inadyn ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n}\n"
  },
  {
    "path": "packages/addons/service/inadyn/source/bin/inadyn-service",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nf=\"/storage/.kodi/userdata/addon_data/service.system.inadyn/settings.xml\"\n[ -f \"$f\" ] && sed -i  's/inadyn_s/inadyn_c/g' \"$f\"\n\n. /etc/profile\noe_setup_addon service.system.inadyn\n\nif [ \"$inadyn_S\" == \"inadyn.conf\" ]; then\n    config=\"$ADDON_HOME/inadyn.conf\"\nelse\n    config=\"$ADDON_HOME/inadyn.temp\"\n    if [ -z \"$inadyn_a\" -o -z \"$inadyn_p\" -o -z \"$inadyn_u\" ]; then\n        rm -fr \"$config\"\n    else\n        echo \"\\\nprovider $inadyn_S {\n   ssl      = $inadyn_c\n   username = $inadyn_u\n   password = $inadyn_p\n   hostname = $inadyn_a\n}\" > \"$config\"\n    fi\nfi\n\nif [ -f \"$config\" ]; then\n    inadyn -f \"$config\" -l info\nfi\n"
  },
  {
    "path": "packages/addons/service/inadyn/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\n\nclass Monitor(xbmc.Monitor):\n\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == \"__main__\":\n   Monitor().waitForAbort()\n\n"
  },
  {
    "path": "packages/addons/service/inadyn/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: syncthing\n# Addon id: service.system.inadyn\n# Addon Provider: awiouy at gmail dot com\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Provider\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"Username\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"Password\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"Alias\"\nmsgstr \"\"\n\nmsgctxt \"#30005\"\nmsgid \"SSL\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/inadyn/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n   <category label=\"30000\">\n      <!-- grep \\\"default@ inadyn-2.4/plugins/* | awk '{print $4}' | sed 's/\"//g;s/,/|/g' | sort -->\n      <setting id=\"inadyn_S\" label=\"30001\" type=\"select\" default=\"inadyn.conf\" values=\"inadyn.conf|\ndefault@changeip.com|\ndefault@cloudxns.net|\ndefault@ddnss.de|\ndefault@dhis.org|\ndefault@dnsexit.com|\ndefault@dnsomatic.com|\ndefault@dnspod.cn|\ndefault@domains.google.com|\ndefault@dtdns.com|\ndefault@duckdns.org|\ndefault@duiadns.net|\ndefault@dyndns.org|\ndefault@dynsip.org|\ndefault@dynu.com|\ndefault@dynv6.com|\ndefault@easydns.com|\ndefault@freedns.afraid.org|\ndefault@freemyip.com|\ndefault@gira.de|\ndefault@ipv4.dynv6.com|\ndefault@loopia.com|\ndefault@no-ip.com|\ndefault@ovh.com|\ndefault@sitelutions.com|\ndefault@spdyn.de|\ndefault@strato.com|\ndefault@tunnelbroker.net|\ndefault@tzo.com|\ndefault@zerigo.com|\ndefault@zoneedit.com\n\" />\n      <setting id=\"inadyn_u\" label=\"30002\" type=\"text\" visible=\"!eq(-1,inadyn.conf)\" />\n      <setting id=\"inadyn_p\" label=\"30003\" type=\"text\" visible=\"!eq(-2,inadyn.conf)\" option=\"hidden\" />\n      <setting id=\"inadyn_a\" label=\"30004\" type=\"text\" visible=\"!eq(-3,inadyn.conf)\" />\n      <setting id=\"inadyn_c\" label=\"30005\" type=\"bool\" visible=\"!eq(-4,inadyn.conf)\" default=\"true\"/>\n    </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/inadyn/source/settings-default.xml",
    "content": "<settings>\n    <setting id=\"inadyn_S\" value=\"inadyn.conf\" />\n</settings>\n\n"
  },
  {
    "path": "packages/addons/service/inadyn/source/system.d/service.system.inadyn.service",
    "content": "[Unit]\nDescription=inadyn\nAfter=network-online.target\nRequires=network-online.target\n\n[Service]\nType=forking\nExecStart=/bin/sh /storage/.kodi/addons/service.system.inadyn/bin/inadyn-service\nRestart=on-failure\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/jellyfin/changelog.txt",
    "content": "1\n- jellyfin: update to 10.8.10\n"
  },
  {
    "path": "packages/addons/service/jellyfin/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"jellyfin\"\nPKG_VERSION=\"1.0\"\nPKG_VERSION_NUMBER=\"10.8.10\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://jellyfin.org/\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Jellyfin: The Free Software Media System\"\nPKG_LONGDESC=\"Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. Stream to any device from your own server.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Jellyfin\"\nPKG_ADDON_TYPE=\"xbmc.service\"\nPKG_ADDON_REQUIRES=\"tools.ffmpeg-tools:0.0.0 tools.dotnet-runtime:0.0.0\"\nPKG_ADDON_PROVIDES=\"executable\"\n\nmake_target() {\n  :\n}\n\naddon() {\n  :\n}\n\npost_install_addon() {\n  sed -e \"s/@JELLYFIN_VERSION@/${PKG_VERSION_NUMBER}/g\" -i \"${INSTALL}/bin/jellyfin-downloader\"\n}\n"
  },
  {
    "path": "packages/addons/service/jellyfin/source/bin/jellyfin-downloader",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\noe_setup_addon service.jellyfin\n\nICON=\"${ADDON_DIR}/resources/icon.png\"\nCONTROL_FILE=\"/tmp/curl.done\"\nDATA_FILE=\"/tmp/curl.data\"\nJELLYFIN_FILE=\"jellyfin_@JELLYFIN_VERSION@.tar.gz\"\n\n# check for enough free disk space\nif [ $(df . | awk 'END {print $4}') -lt 200000 ]; then\n  kodi-send --action=\"Notification(Not enough disk space, at least 200MB are required,30000,${ICON})\" >/dev/null\n  exit 0;\nfi\n\n# remove install status and folders\nif [ -f ${ADDON_DIR}/extract.ok ]; then\n  rm ${ADDON_DIR}/extract.ok\nfi\n\nif [ -d ${ADDON_DIR}/libs ]; then\n  rm -rf ${ADDON_DIR}/libs\nfi\n\n# create tmp download dir\nTEMP_DIR=`mktemp -d`\n\nmkdir -p ${TEMP_DIR}/tmp_download\nif [ -d ${TEMP_DIR}/tmp_download ]; then\n  cd ${TEMP_DIR}/tmp_download\nelse\n  kodi-send --action=\"Notification(Unable to download Jellyfin - no temp directory,30000,${ICON})\" >/dev/null\n  exit 0\nfi\n\necho \"Downloading Jellyfin\"\n\n# download Jellyfin\nrm -f ${CONTROL_FILE} ${DATA_FILE}\n(\n  curl -L -# -O -C - https://repo.jellyfin.org/releases/server/portable/versions/stable/combined/@JELLYFIN_VERSION@/${JELLYFIN_FILE} 2>${DATA_FILE}\n  touch ${CONTROL_FILE}\n) | \\\n  while [ : ]; do\n    [ -f ${DATA_FILE} ] && prog=\"$(tr '\\r' '\\n' < ${DATA_FILE} | tail -n 1 | sed -r 's/^[# ]+/#/;s/^[^0-9]*//g')\" || prog=\n    kodi-send --action=\"Notification(Downloading Jellyfin,\\\"${prog:-0.0%}\\\",3000,${ICON})\" >/dev/null\n    [ -f ${CONTROL_FILE} ] && break\n    sleep 4\n  done\n\nrm -f ${CONTROL_FILE} ${DATA_FILE}\n\n# extract Jellyfin\nkodi-send --action=\"Notification(Extracting Jellyfin,Starting,1000,${ICON})\" >/dev/null\n\n# extract JELLYFIN_FILE to libs directory\nmkdir ${ADDON_DIR}/libs\ntar xf ${JELLYFIN_FILE} -C ${ADDON_DIR}/libs --strip-components=2\n\n# cleanup\ncd ${ADDON_DIR}\nrm -rf ${TEMP_DIR}/tmp_download\nrmdir ${TEMP_DIR}\ntouch ${ADDON_DIR}/extract.ok\nkodi-send --action=\"Notification(Extracting Jellyfin,Finished,1000,${ICON})\" >/dev/null\n"
  },
  {
    "path": "packages/addons/service/jellyfin/source/bin/jellyfin-start",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\noe_setup_addon service.jellyfin\n\n# check if jellyfin is already successful installed\nif [ ! -f \"$ADDON_DIR/extract.ok\" ]; then\n  cd $ADDON_DIR\n  jellyfin-downloader\nfi\n\nlibs=\"${ADDON_DIR}/libs\"\nff=\"/storage/.kodi/addons/tools.ffmpeg-tools/bin\"\n\nexec \\\nnice -n \"$jellyfin_nice\" \\\ndotnet \"${libs}/jellyfin.dll\" \\\n  --datadir \"${ADDON_HOME}\" \\\n  --ffmpeg \"${ff}/ffmpeg\"\n"
  },
  {
    "path": "packages/addons/service/jellyfin/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport json\nimport subprocess\nimport xbmc\nimport xbmcaddon\nimport xbmcgui\n\n\ndef jsonrpc(request):\n    return json.loads(xbmc.executeJSONRPC(json.dumps(request)))\n\n\ndef disable_conflicting(conficting,\n        message='{that} conflicts with {this} and has been disabled'):\n    is_enabled = {'jsonrpc': '2.0', 'method': 'Addons.GetAddonDetails', 'id': 1,\n                  'params': {'addonid': conficting, 'properties': ['enabled']}}\n    disable = {'jsonrpc': '2.0', 'method': 'Addons.SetAddonEnabled', 'id': 1,\n               'params': {'addonid': conficting, 'enabled': False}}\n    try:\n        if jsonrpc(is_enabled)['result']['addon']['enabled']:\n            this = xbmcaddon.Addon().getAddonInfo('name')\n            that = xbmcaddon.Addon(conficting).getAddonInfo('name')\n            jsonrpc(disable)\n            dialog = xbmcgui.Dialog()\n            dialog.ok(this, message.format(\n                this=this, that=that))\n            del dialog\n    except KeyError:\n        pass\n\n\nclass Monitor(xbmc.Monitor):\n\n    def __init__(self, *args, **kwargs):\n        xbmc.Monitor.__init__(self)\n        self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n    def onSettingsChanged(self):\n        subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == '__main__':\n    disable_conflicting('service.emby')\n    Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/jellyfin/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: jellyfin\n# Addon id: service.jellyfin\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Priority (nice, 0=max, 19=min)\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/jellyfin/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n   <category   label=\"30000\">\n      <setting label=\"30001\" id=\"jellyfin_nice\" type=\"slider\" default=\"10\" range=\"0,1,19\" option=\"int\" />\n    </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/jellyfin/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"jellyfin_nice\" default=\"true\">10</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/jellyfin/source/system.d/service.jellyfin.service",
    "content": "[Unit]\nDescription=Jellyfin - The Free Software Media System\nDocumentation=https://jellyfin.org/\nWants=multi-user.target\nAfter=multi-user.target\n\n[Service]\nSyslogIdentifier=%N\nExecStart=/bin/sh /storage/.kodi/addons/%N/bin/jellyfin-start\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/addons/service/lcdd/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/lcdd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"lcdd\"\nPKG_VERSION=\"9ec9ba4e5dda653288bc55d2898723aa2c2ad9c1\"\nPKG_SHA256=\"442f60fc7c26847508e7fb99d901e905016c136d0f6eb320e3262bef20f39452\"\nPKG_VERSION_DATE=\"0.5dev+2020-07-21\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://lcdproc.org/\"\nPKG_URL=\"https://github.com/lcdproc/lcdproc/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain freetype libftdi1 libhid libugpio libusb ncurses serdisplib\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"LCDproc: Software to display system information from your Linux/*BSD box on a LCD\"\nPKG_LONGDESC=\"LCDproc (${PKG_VERSION}) is a piece of software that displays real-time system information from your Linux/*BSD box on a LCD. The server supports several serial devices: Matrix Orbital, Crystal Fontz, Bayrad, LB216, LCDM001 (kernelconcepts.de), Wirz-SLI, Cwlinux(.com) and PIC-an-LCD; and some devices connected to the LPT port: HD44780, STV5730, T6963, SED1520 and SED1330. Various clients are available that display things like CPU load, system load, memory usage, uptime, and a lot more.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-parallel\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"LCDproc\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-ft-prefix=${SYSROOT_PREFIX}/usr \\\n                           --enable-libusb \\\n                           --enable-libftdi \\\n                           --disable-libX11 \\\n                           --enable-libhid \\\n                           --disable-libpng \\\n                           --enable-drivers=all\"\n\npre_configure_target() {\n  CFLAGS+=\" -O3\"\n}\n\naddon() {\n  drivers=\"none|$(cat ${PKG_BUILD}/.${TARGET_NAME}/config.log | sed -n \"s|^DRIVERS=' \\(.*\\)'|\\1|p\" | sed \"s|.so||g\" | tr ' ' '|')\"\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/config\n\n  cp -PR ${PKG_DIR}/resources ${ADDON_BUILD}/${PKG_ADDON_ID}\n\n  cp -PR ${PKG_INSTALL}/etc/LCDd.conf ${ADDON_BUILD}/${PKG_ADDON_ID}/config/\n  cp -PR ${PKG_INSTALL}/usr/lib       ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n  cp -PR ${PKG_INSTALL}/usr/sbin      ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n\n  cp -L $(get_install_dir serdisplib)/usr/lib/libserdisp.so.2 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n\n  sed -e \"s|^DriverPath=.*$|DriverPath=/storage/.kodi/addons/service.lcdd/lib/lcdproc/|\" \\\n      -e \"s|^#Foreground=.*$|Foreground=no|\" \\\n      -e \"s|^#ServerScreen=.*$|ServerScreen=blank|\" \\\n      -e \"s|^#Backlight=.*$|Backlight=open|\" \\\n      -e \"s|^#Heartbeat=.*$|Heartbeat=open|\" \\\n      -e \"s|^#TitleSpeed=.*$|TitleSpeed=4|\" \\\n      -e \"s|^#Hello=\\\"  Welcome to\\\"|Hello=\\\"Welcome to\\\"|\" \\\n      -e \"s|^#Hello=\\\"   LCDproc!\\\"|Hello=\\\"${DISTRONAME}\\\"|\" \\\n      -e \"s|^#GoodBye=\\\"Thanks for using\\\"|GoodBye=\\\"Thanks for using\\\"|\" \\\n      -e \"s|^#GoodBye=\\\"   LCDproc!\\\"|GoodBye=\\\"${DISTRONAME}\\\"|\" \\\n      -e \"s|^#normal_font=.*$|normal_font=/usr/share/fonts/liberation/LiberationMono-Bold.ttf|\" \\\n      -i ${ADDON_BUILD}/${PKG_ADDON_ID}/config/LCDd.conf\n\n  sed -e \"s/@DRIVERS@/${drivers}/\" \\\n      -i ${ADDON_BUILD}/${PKG_ADDON_ID}/resources/settings.xml\n\n}\n"
  },
  {
    "path": "packages/addons/service/lcdd/patches/lcdd-0.5.6-dm140_henlar_v0.2.patch",
    "content": "diff --git a/LCDd.conf b/LCDd.conf\nindex 80be77e..35d53af 100644\n--- a/LCDd.conf\n+++ b/LCDd.conf\n@@ -292,6 +292,9 @@ Keypad=yes\n #keypad_test_mode=yes\n \n \n+## DM140 VFD\n+[dm140]\n+\n \n ## ea65 driver for the display in AOpen XC Cube AV EA65 media barebones ##\n [ea65]\ndiff --git a/acinclude.m4 b/acinclude.m4\nindex 14ffcf7..3a63297 100644\n--- a/acinclude.m4\n+++ b/acinclude.m4\n@@ -9,7 +9,7 @@ AC_ARG_ENABLE(drivers,\n \t[                  which is a comma-separated list of drivers.]\n \t[                  Possible drivers are:]\n \t[                    bayrad,CFontz,CFontzPacket,curses,CwLnx,ea65,]\n-\t[                    EyeboxOne,futaba,g15,glcd,glcdlib,glk,hd44780,i2500vfd,]\n+\t[                    dm140,EyeboxOne,futaba,g15,glcd,glcdlib,glk,hd44780,i2500vfd,]\n \t[                    icp_a106,imon,imonlcd,IOWarrior,irman,irtrans,]\n \t[                    joy,lb216,lcdm001,lcterm,linux_input,lirc,lis,MD8800,mdm166a,]\n \t[                    ms6931,mtc_s16209x,MtxOrb,mx5000,NoritakeVFD,]\n@@ -23,7 +23,7 @@\n \tdrivers=\"$enableval\",\n \tdrivers=[bayrad,CFontz,CFontzPacket,curses,CwLnx,glk,lb216,lcdm001,MtxOrb,pyramid,text])\n \n-allDrivers=[bayrad,CFontz,CFontzPacket,curses,CwLnx,ea65,EyeboxOne,futaba,g15,glcd,glcdlib,glk,hd44780,i2500vfd,icp_a106,imon,imonlcd,IOWarrior,irman,irtrans,joy,jw002,lb216,lcdm001,lcterm,linux_input,lirc,lis,MD8800,mdm166a,ms6931,mtc_s16209x,MtxOrb,mx5000,NoritakeVFD,Olimex_MOD_LCD1x9,picolcd,pyramid,sdeclcd,sed1330,sed1520,serialPOS,serialVFD,shuttleVFD,sli,stv5730,SureElec,svga,t6963,text,tyan,ula200,vlsys_m428,xosd,rawserial,yard2LCD]\n+allDrivers=[bayrad,CFontz,CFontzPacket,curses,CwLnx,dm140,ea65,EyeboxOne,futaba,g15,glcd,glcdlib,glk,hd44780,i2500vfd,icp_a106,imon,imonlcd,IOWarrior,irman,irtrans,joy,jw002,lb216,lcdm001,lcterm,linux_input,lirc,lis,MD8800,mdm166a,ms6931,mtc_s16209x,MtxOrb,mx5000,NoritakeVFD,Olimex_MOD_LCD1x9,picolcd,pyramid,sdeclcd,sed1330,sed1520,serialPOS,serialVFD,shuttleVFD,sli,stv5730,SureElec,svga,t6963,text,tyan,ula200,vlsys_m428,xosd,rawserial,yard2LCD]\n if test \"$debug\" = yes; then\n \tallDrivers=[\"${allDrivers},debug\"]\n fi\n@@ -128,6 +128,10 @@ dnl\t\t\t\telse\n \t\t\tDRIVERS=\"$DRIVERS debug${SO}\"\n \t\t\tactdrivers=[\"$actdrivers debug\"]\n \t\t\t;;\n+\t\tdm140)\n+\t\t\tDRIVERS=\"$DRIVERS dm140${SO}\"\n+\t\t\tactdrivers=[\"$actdrivers dm140\"]\n+\t\t\t;;\n \t\tea65)\n \t\t\tDRIVERS=\"$DRIVERS ea65${SO}\"\n \t\t\tactdrivers=[\"$actdrivers ea65\"]\ndiff --git a/server/drivers/Makefile.am b/server/drivers/Makefile.am\nindex f82df85..0d98570 100644\n--- a/server/drivers/Makefile.am\n+++ b/server/drivers/Makefile.am\n@@ -23,7 +23,7 @@\n \n lcdexecbindir = $(pkglibdir)\n lcdexecbin_PROGRAMS = @DRIVERS@\n-EXTRA_PROGRAMS = bayrad CFontz CFontzPacket curses CwLnx debug ea65 EyeboxOne futaba g15 glcd glcdlib glk hd44780 i2500vfd icp_a106 imon imonlcd IOWarrior irman irtrans joy jw002 lb216 lcdm001 lcterm linux_input lirc lis MD8800 mdm166a ms6931 mtc_s16209x MtxOrb mx5000 NoritakeVFD Olimex_MOD_LCD1x9 picolcd pyramid rawserial sdeclcd sed1330 sed1520 serialPOS serialVFD shuttleVFD sli stv5730 SureElec svga t6963 text tyan ula200 vlsys_m428 xosd yard2LCD\n+EXTRA_PROGRAMS = bayrad CFontz CFontzPacket curses CwLnx debug dm140 ea65 EyeboxOne futaba g15 glcd glcdlib glk hd44780 i2500vfd icp_a106 imon imonlcd IOWarrior irman irtrans joy jw002 lb216 lcdm001 lcterm linux_input lirc lis MD8800 mdm166a ms6931 mtc_s16209x MtxOrb mx5000 NoritakeVFD Olimex_MOD_LCD1x9 picolcd pyramid rawserial sdeclcd sed1330 sed1520 serialPOS serialVFD shuttleVFD sli stv5730 SureElec svga t6963 text tyan ula200 vlsys_m428 xosd yard2LCD\n noinst_LIBRARIES = libLCD.a libbignum.a\n \n futaba_CFLAGS =      @LIBUSB_CFLAGS@ @LIBUSB_1_0_CFLAGS@ $(AM_CFLAGS)\n@@ -89,6 +89,7 @@ CFontzPacket_SOURCES = lcd.h lcd_lib.h CFontzPacket.c CFontzPacket.h CFontz-char\n curses_SOURCES =     lcd.h curses_drv.h curses_drv.c\n CwLnx_SOURCES =      lcd.h lcd_lib.h CwLnx.c CwLnx.h\n debug_SOURCES =      lcd.h debug.c debug.h\n+dm140_SOURCES =      lcd.h led.c libvfd.h led.h dm140.c dm140.h report.h\n ea65_SOURCES =       lcd.h ea65.h ea65.c\n EyeboxOne_SOURCES =  lcd.h lcd_lib.h EyeboxOne.c EyeboxOne.h\n futaba_SOURCES =     lcd.h futaba.c futaba.h\ndiff --git a/server/drivers/dm140.c b/server/drivers/dm140.c\nnew file mode 100644\nindex 0000000..56f9219\n--- /dev/null\n+++ b/server/drivers/dm140.c\n@@ -0,0 +1,241 @@\n+/*\n+ *  dm1400 vfd driver (c)2007 Henrik Larsson\n+ */\n+\n+#include <stdio.h>\n+#include <sys/select.h>\n+#include <sys/types.h>\n+#include <sys/stat.h>\n+#include <fcntl.h>\n+#include <sys/ioctl.h>\n+#include <unistd.h>\n+#include <errno.h>\n+#include <asm/types.h>\n+#include <linux/hiddev.h>\n+#include <string.h>\n+#include <stdlib.h>\n+\n+#include \"lcd.h\"\n+#include \"dm140.h\"\n+\n+#include \"shared/report.h\"\n+#include \"lcd_lib.h\"\n+#include \"libvfd.h\"\n+#include \"led.h\"\n+\n+#ifdef HAVE_CONFIG_H\n+# include \"config.h\"\n+#endif\n+\n+\n+/* Vars for the server core */\n+MODULE_EXPORT char *api_version = API_VERSION;\n+MODULE_EXPORT int stay_in_foreground = 0;\n+MODULE_EXPORT int supports_multiple = 0;\n+MODULE_EXPORT char *symbol_prefix = \"dm140_\";\n+\n+\n+MODULE_EXPORT int\n+dm140_init (Driver *drvthis)\n+{\n+\tPrivateData *p;\n+\tint i;\n+\n+        /* Allocate and store private data */\n+        p = (PrivateData *) calloc(1, sizeof(PrivateData));\n+        if (p == NULL)\n+        {\n+                report(RPT_CRIT, \"Failed to allocate memory for PrivateData\\n\");\n+                return -1;\n+        }\n+        \n+        if (drvthis->store_private_ptr(drvthis, p))\n+        {\n+                report(RPT_CRIT, \"Failed to store Private Ptr!\");\n+                return -1;\n+        }\n+\n+        /* initialize private data */\n+\tp->width = 18;\n+\tp->height = 2;\n+\tp->pszVendor = \"040b\";\n+\tp->pszProduct = \"7001\";\n+\n+\tp->gIconMask = 0; \n+\tp->gLayout = VFD_STR_LAYOUT_1;\n+\tp->gScrollTime = 1;\n+\tp->gFlags = 0;\n+\tp->gDisplayMode = VFD_MODE_NONE;\n+\t\n+\tif ((p->framebuf = (char *) calloc(1, p->height)) == NULL)\n+\t{\n+\t  report(RPT_CRIT, \"Allocating memory for framebuffer Failed\\n\");\n+\t  return -1;\n+\t}\n+\n+\tfor (i=0; i<p->height; i++)\n+\t{\n+\t  p->framebuf[i] = (char *) calloc(1, p->width+1);\n+\t  report(RPT_INFO, \"Allocating memory for framebuffer[%d]\\n\", i); \n+\t  if (p->framebuf == NULL)\n+\t    return -1;\n+        }\n+\t\n+\tif((p->fd = OpenHID(drvthis))< 0)\n+\t{\n+\t\treport(RPT_INFO, \"Device for Vendor[%s] Product[%s] was not found, exiting\\n\", p->pszVendor, p->pszProduct);\n+\t\treturn -1;\n+\t}\n+\n+\t//******************************************************\n+\t// Initialize the internal report structures\n+\t//******************************************************\n+\tif(ioctl(p->fd, HIDIOCINITREPORT,0)<0)\n+\t\treturn -1;\n+\n+\t//******************************************************\n+\t// Find out what type of reports this device accepts\n+\t//******************************************************\n+\t//FindReports(fd);\n+\n+\t//******************************************************\n+\t// Set up the display to show graphics\n+\t//******************************************************\n+\tVFDTurnOffIcons(drvthis);\n+\tVFDSetDisplay(drvthis, VFD_MODE_NONE, 0, 0, 0);\n+\tVFDGraphicsClearBuffer(drvthis, VFD_GR_PAGE_3);\n+        \n+        //******************************************************\n+        // Set up the display, scrolling region, scroll rate etc.\n+        //******************************************************\n+        VFDDisableDisplay(drvthis);\n+        VFDClearString(drvthis, VFD_STR_REGION_1);\n+        VFDClearString(drvthis, VFD_STR_REGION_3);\n+        VFDEnableString(drvthis, VFD_STR_LAYOUT_2);\n+//        VFDSetScrollRegion(drvthis, 0);\n+//        VFDSetScrollTime(drvthis, 500);\n+\t\n+\tVFDSetString(drvthis, VFD_STR_REGION_1, 0, \"DM140 online!!!\");\n+\n+\treturn 0;\n+\n+}\n+\n+MODULE_EXPORT void\n+dm140_close (Driver *drvthis)\n+{\n+        PrivateData *p = drvthis->private_data;\n+\n+\n+        VFDClearString(drvthis, VFD_STR_REGION_1);\n+        VFDClearString(drvthis, VFD_STR_REGION_2);\n+        VFDClearString(drvthis, VFD_STR_REGION_3);\n+        VFDClearString(drvthis, VFD_STR_REGION_4);\n+\n+        if (p != NULL) {\n+                if (p->fd >= 0)\n+                        close(p->fd);\n+\n+                free(p);\n+        }\n+        drvthis->store_private_ptr(drvthis, NULL);\n+}\n+\n+MODULE_EXPORT int\n+dm140_width (Driver *drvthis)\n+{\n+\tPrivateData *p = drvthis->private_data;\n+\treturn p->width;\n+}\n+\n+MODULE_EXPORT int\n+dm140_height (Driver *drvthis)\n+{\n+\tPrivateData *p = drvthis->private_data;\n+\treturn p->height;\n+}\n+\n+MODULE_EXPORT int\n+dm140_string (Driver *drvthis, int x, int y, char *buffer)\n+{\n+  PrivateData *p = drvthis->private_data;\n+  int i;\n+    \n+  report(RPT_INFO, \"%s called with values(x,y,c): %d, %d, %s\", __FUNCTION__, x, y, buffer);\n+\n+  for (i=0; i<strlen(buffer); i++)\n+  {\n+    p->framebuf[y-1][x+i]=buffer[i];\n+  }\n+\n+/*\n+  if (y > p->height)\n+    y = p->height;\n+    \n+  if (y == 2)\n+    y = VFD_STR_REGION_3;\n+  \n+  return VFDSetString(drvthis, y, x, buffer);\n+*/\n+\n+  return 0;\n+}\n+\n+MODULE_EXPORT int\n+dm140_char (Driver *drvthis, int x, int y, char c)\n+{\n+  PrivateData *p = drvthis->private_data;\n+  \n+  report(RPT_INFO, \"%s called with values(x,y,c): %d, %d, %c\", __FUNCTION__, x, y, c);\n+\n+  p->framebuf[y][x] = c;\n+  \n+  return 0;\n+}\n+\n+MODULE_EXPORT int\n+dm140_clear (Driver *drvthis)\n+{\n+  PrivateData *p = drvthis->private_data;\n+  int i;\n+  \n+  report(RPT_INFO, \"%s called with values()\", __FUNCTION__);\n+\n+  for (i=0; i<p->height; i++)\n+  {\n+    memset(p->framebuf[i], 0x20, p->width);\n+    p->framebuf[i][p->width] = 0x00;\n+  }\n+\n+//        VFDClearString(drvthis, VFD_STR_REGION_1);\n+//        VFDClearString(drvthis, VFD_STR_REGION_2);\n+//        VFDClearString(drvthis, VFD_STR_REGION_3);\n+//        VFDClearString(drvthis, VFD_STR_REGION_4);\n+\n+  return 0;\n+}\n+\n+MODULE_EXPORT int\n+dm140_flush (Driver *drvthis)\n+{\n+  PrivateData *p = drvthis->private_data;\n+  int i;\n+  int y;\n+  \n+  report(RPT_INFO, \"%s called with values()\", __FUNCTION__);\n+\n+  for (i=0; i<p->height; i++)\n+  {\n+    y = VFD_STR_REGION_1;\n+    if(i==0) y = VFD_STR_REGION_1; \n+    if(i==1) y = VFD_STR_REGION_3;\n+    // Do switch depening on VFD_LAYOUT\n+    VFDSetString(drvthis, y, 1, p->framebuf[i]);\n+  }\n+  \n+  // Don't know what to do\n+ \n+  return 0;\n+}\n+\n+\ndiff --git a/server/drivers/dm140.h b/server/drivers/dm140.h\nnew file mode 100644\nindex 0000000..4d04e2c\n--- /dev/null\n+++ b/server/drivers/dm140.h\n@@ -0,0 +1,38 @@\n+#ifndef DM140_H\n+#define DM140_H\n+\n+#include \"libvfd.h\"\n+\n+typedef struct driver_private_data {\n+        char device[256];\n+        int fd;\n+\n+        int width;\n+        int height;\n+\n+        char *pszVendor;\n+        char *pszProduct;\n+\n+        int gIconMask;\n+        char gLayout;\n+        char gScrollTime;\n+        char gFlags;\n+        int gDisplayMode;\n+        char gPages[VFD_PAGE_SIZE][VFD_PAGE_COUNT];\n+\n+        char **framebuf;\n+\n+} PrivateData;\n+\n+\n+/* dm140 */\n+MODULE_EXPORT int  dm140_init (Driver *drvthis);\n+MODULE_EXPORT void dm140_close (Driver *drvthis);\n+MODULE_EXPORT int  dm140_width (Driver *drvthis);\n+MODULE_EXPORT int  dm140_height (Driver *drvthis);\n+MODULE_EXPORT int  dm140_string (Driver *drvthis, int y, int x, char *buffer);\n+MODULE_EXPORT int  dm140_char (Driver *drvthis, int y, int x, char c);\n+MODULE_EXPORT int  dm140_clear (Driver *drvthis);\n+MODULE_EXPORT int  dm140_flush (Driver *drvthis);\n+\n+#endif\ndiff --git a/server/drivers/led.c b/server/drivers/led.c\nnew file mode 100644\nindex 0000000..0bb565c\n--- /dev/null\n+++ b/server/drivers/led.c\n@@ -0,0 +1,1065 @@\n+/* File modified by Henrik Larsson 2007 to interface with LCDproc API\n+ */\n+\n+/* vfd demo application\n+ * Copyright (C) 2006, Advanced Micro Devices, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ */\n+\n+/* This is an example application that turns on the icons on the front panel\n+ * and also displays text on the VFD screen\n+ */\n+ \n+#include <stdio.h>\n+#include <sys/select.h>\n+#include <sys/types.h>\n+#include <sys/stat.h>\n+#include <fcntl.h>\n+#include <sys/ioctl.h>\n+#include <unistd.h>\n+#include <errno.h>\n+#include <asm/types.h>\n+#include <linux/hiddev.h>\n+#include <string.h>\n+#include \"lcd.h\"\n+#include \"libvfd.h\"\n+#include \"shared/report.h\"\n+#include \"dm140.h\"\n+\n+\n+//**************************************************************\n+//  HID devices exchange data with the host computer using data bundles called \n+//  reports.  Each report is divided into \"fields\", each of which can have one\n+//  or more \"usages\".  In the hid-core each one of these usages has a single\n+//  signed 32 bit value.\n+//\n+//  read():\n+//  This is the event interface.  When the HID device's state changes, it\n+//  performs an interrupt transfer containing a report which contains the \n+//  changed value.  The hid-core.c module parses the report, and returns to\n+//  hiddev.c the individual usages that have changed within the report.  In\n+//  its basic mode, the hiddev will make these individual usage changes\n+//  available to the reader using a struct hiddev_event:\n+//    struct hiddev_event { unsigned hid;\n+//  containing the HID usage identifier for the status that changed, and the\n+//  value that it was changed to.  Note that the structure is defined within\n+//  <linux/hiddev.h>, along with some other useful #defines and structures.  \n+//  The HID usage identifier is a composite of the HID usage page shifed to \n+//  the 16 high order bits ORed with the usage code.  The behavior of the read()\n+//  function can be modified using the HIDIOCSFLAG ioctl described below.\n+//\n+//  ioctl():\n+//  Instructs the kernel to retrieve all input and feature report values from\n+//  the device.  At this point, all the usage structures will contain current\n+//  values for the device, and will maintain it as the device changes.  Note \n+//  that the use of this ioctl is unnecessary in general, since later kernels\n+//  automatically initialize the reports from the device at attach time.\n+//**************************************************************\n+\n+/* hack - fix improper signed char handling - it's seeing 0x80 as a negative value*/\n+#define VALUE_FILTER(_value)  (_value>0x7F)?(__s32)(0xFFFFFF00 | _value):(_value)\n+\n+#define VFD_PACKET_SIZE(s) (s*8)\n+\n+unsigned char amd_logo[VFD_PAGE_SIZE] = {\n+  0x7f,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n+  0x3f,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n+  0x1f,0xfe,0x07,0x83,0xc0,0xe3,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n+  0x0f,0xfe,0x07,0x83,0xe1,0xe3,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n+  0x07,0xfe,0x07,0xc3,0xe1,0xe3,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n+  0x10,0x1e,0x0f,0xc3,0xf3,0xe3,0x87,0x80,0x00,0x00,0x00,0x00,0x00,0x00,\n+  0x30,0x1e,0x0e,0xe3,0xb3,0x63,0x83,0x80,0x00,0x00,0x00,0x00,0x00,0x00,\n+  0x30,0x1e,0x1c,0xe3,0xb7,0x63,0x83,0x80,0x00,0x00,0x00,0x00,0x00,0x00,\n+  0xf0,0x1e,0x1c,0xe3,0x9e,0x63,0x83,0x80,0x00,0x00,0x00,0x00,0x00,0x00,\n+  0xf0,0x1e,0x1c,0x73,0x9e,0x63,0x83,0x80,0x00,0x00,0x00,0x00,0x00,0x00,\n+  0xf0,0x1e,0x3f,0xf3,0x9c,0x63,0x83,0x80,0x00,0x00,0x00,0x00,0x00,0x00,\n+  0xff,0xce,0x3f,0xf3,0x8c,0x63,0x8f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,\n+  0xff,0x86,0x38,0x3b,0x80,0x63,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n+  0xff,0x02,0x70,0x3b,0x80,0x63,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n+  0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n+  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n+};\n+\n+\n+char icon_bits[] = \n+{\n+  15, 14, 13, 12, 11, 10,  9,  8,\n+  18, 17, 16, 19, 23, 27, 31, 35,\n+  39, 43, 47, 51, 55, 59, 63\n+};\n+\n+//**************************************************************\n+// FUNCTION: Compare\n+//\n+// INPUT: \n+//  const char *pszValue - string to compare\n+//  short sValue - numberic value to compare\n+//\n+// OUTPUT:\n+//   int - Boolean value, 0 on non match, 1 on success.\n+//\n+// DESCRIPTION: Compare a character value to a numeric value.\n+//**************************************************************\n+int Compare(const char *pszValue, short sValue)\n+{\n+  int iValue;\n+  // convert the pszValue to a number\n+  sscanf( pszValue, \"%4x\", &iValue);\n+  return( iValue == sValue );\n+}\n+\n+\n+//**************************************************************\n+// FUNCTION: OpenHID\n+//\n+// INPUT: \n+//  const char *pszVendor - Vendor ID of device to open\n+//  const char *pszProduct - Product ID of device to open\n+//\n+// OUTPUT:\n+//   int fd - file descriptor to the opened HID device or -1 if err.\n+//\n+// DESCRIPTION: This function will open all the HID's on the\n+//  system until we find a match or we've exhausted our search.\n+//**************************************************************\n+int OpenHID(Driver *drvthis)\n+{\n+  int i, fd=-1;\n+  char port[32];\n+  char name[256];\n+  const char *hiddev_prefix = \"/dev/usb/hiddev\"; /* in devfs */\n+  int version;\n+  struct hiddev_devinfo device_info;\n+  PrivateData *p = drvthis->private_data;\n+      \n+\n+  //******************************************************\n+  // Loop through all the 16 HID ports/devices looking for \n+  // one that matches our device.\n+  //******************************************************\n+  for(i=0; i<16;i++)\n+  {\n+    sprintf(port, \"%s%d\", hiddev_prefix, i);\n+    if((fd = open(port,O_WRONLY))>=0)\n+    {\n+      ioctl(fd, HIDIOCGDEVINFO, &device_info);\n+      ioctl(fd, HIDIOCGNAME(sizeof(name)), name);\n+\n+      // If we've found our device, no need to look further, time to stop searching\n+      if( Compare(p->pszVendor, device_info.vendor) && Compare(p->pszProduct, device_info.product))\n+      {\n+        break; // stop the for loop\n+      }\n+      close(fd); // Added by HL\n+    }\n+  }\n+\n+  //******************************************************\n+  // If we've found our device, print out some information about it.\n+  //******************************************************\n+  if(fd != -1)\n+  {\n+    int appl; \n+    report(RPT_INFO, \"Found Device - Name is %s\\n\", name);\n+    report(RPT_INFO, \"Vendor[0x%04hx] Product[0x%04hx] Version[0x%04hx]\\n\\t\",\n+          device_info.vendor, device_info.product, device_info.version);\n+    switch(device_info.bustype)\n+    {\n+      default: \n+    \t  report(RPT_INFO, \" an unknown bus type: 0x%04hx \", device_info.bustype);\n+    \t  report(RPT_INFO, \"bus[%d], devnum[%d] ifnum[%d]\\n\", device_info.busnum,\n+    \t\t  device_info.devnum, device_info.ifnum); \n+\t      break;\n+    }\n+    //******************************************************\n+    // Read the version - it's a packed 32 field, so \n+    // unpack it in order to display\n+    //******************************************************\n+    ioctl(fd, HIDIOCGVERSION, &version);\n+    report(RPT_INFO, \"HIDdev Driver Version is %d.%d.%d\\n\", \n+    \t  version >>16, (version>>8)&0xff,version &0xff);\n+\n+    report(RPT_INFO, \"There are %d applications for this device\\n\", device_info.num_applications);\n+\n+    for(i=0;i<device_info.num_applications; i++)\n+    {\n+\t\t\tappl = ioctl(fd, HIDIOCAPPLICATION,\ti);\n+\t\t\treport(RPT_INFO, \"Application[%i]\tis 0x%x\t\", i,\tappl);\n+      //******************************************************\n+\t\t\t// The magic values\tcome from\tvarious\tusage\ttable\tspecs\t\n+      //******************************************************\n+\t\t\tswitch(appl\t>> 16)\n+\t\t\t{\n+\t\t\t\tcase 0x01: report(RPT_INFO, \"(Generic\tDesktop\tPage)\\n\");break;\n+\t\t\t\tcase 0x02: report(RPT_INFO, \"(Simulation Controls)\\n\");\tbreak;\n+\t\t\t\tcase 0x03: report(RPT_INFO, \"(VR Controls)\\n\");\t\t\t\t\tbreak;\n+\t\t\t\tcase 0x04: report(RPT_INFO, \"(Sport\tControls)\\n\");\t\t\tbreak;\n+\t\t\t\tcase 0x05: report(RPT_INFO, \"(Game Controls)\\n\");\t\t\t\tbreak;\n+\t\t\t\tcase 0x06: report(RPT_INFO, \"(Generic\tDevice Controls)\\n\");break;\n+\t\t\t\tcase 0x07: report(RPT_INFO, \"(Keyboard/Keypad)\\n\");\t\t\tbreak;\n+\t\t\t\tcase 0x08: report(RPT_INFO, \"(LEDs)\\n\");\t\t\t\t\t\t\t\tbreak;\n+\t\t\t\tcase 0x09: report(RPT_INFO, \"(Button)\\n\");\t\t\t\t\t\t\tbreak;\n+\t\t\t\tcase 0x0A: report(RPT_INFO, \"(Ordinal)\\n\");\t\t\t\t\t\t\tbreak;\n+\t\t\t\tcase 0x0B: report(RPT_INFO, \"(Telphony)\\n\");\t\t\t\t\t\tbreak;\n+\t\t\t\tcase 0x0C: report(RPT_INFO, \"(Consumer Product Page)\\n\");\tbreak;\n+\t\t\t\tcase 0x0D: report(RPT_INFO, \"(Digitizer)\\n\");\t\t\t\t\t\tbreak;\n+\t\t\t\tcase 0x0E: report(RPT_INFO, \"(Reserved)\\n\");\t\t\t\t\t\tbreak;\n+\t\t\t\tcase 0x0F: report(RPT_INFO, \"(PID\tPage)\\n\");\t\t\t\t\t\tbreak;\n+\t\t\t\tcase 0x14: report(RPT_INFO, \"(Alphanumeric Display)\\n\"); break;\n+\t\t\t\tcase 0x15:\n+\t\t\t\tcase 0x3f: report(RPT_INFO, \"(Reserved)\\n\");\t\t\t\t\t\tbreak;\n+\t\t\t\tcase 0x40: report(RPT_INFO, \"(Medical\tInstruments)\\n\");\tbreak;\n+\t\t\t\tcase 0x80: report(RPT_INFO, \"(USB\tMonitor\tPage)\\n\");\t\tbreak;\n+\t\t\t\tcase 0x81: report(RPT_INFO, \"(USB\tEnumerated Values\tPage)\\n\"); break;\n+\t\t\t\tcase 0x82: report(RPT_INFO, \"(VESA Virtual Controls\tPage)\\n\"); break;\n+\t\t\t\tcase 0x83: report(RPT_INFO, \"(Reserved Monitor Page)\\n\");\tbreak;\n+\t\t\t\tcase 0x84: report(RPT_INFO, \"(Power\tDevice Page)\\n\");\t\tbreak;\n+\t\t\t\tcase 0x85: report(RPT_INFO, \"(Battery\tSystem Page)\\n\");\tbreak;\n+\t\t\t\tcase 0x86: \n+\t\t\t\tcase 0x87: report(RPT_INFO, \"(Reserved Power Device\tPage)\\n\"); break;\n+\t\t\t\tcase 0x8C: report(RPT_INFO, \"(Bar\tCode Scanner Page)\\n\");\tbreak;\n+\t\t\t\tcase 0x8D: report(RPT_INFO, \"(Scale\tPage)\\n\");\t\t\t\t\tbreak;\n+\t\t\t\tcase 0x8E: report(RPT_INFO, \"(Magnetic Stripe\tReading\tDevice)\\n\"); break;\n+\t\t\t\tcase 0x8F: report(RPT_INFO, \"(Point\tof Sale\tpages)\\n\");\tbreak;\n+\t\t\t\tcase 0x90: report(RPT_INFO, \"(Camera Control Page)\\n\");\tbreak;\n+\t\t\t\tcase 0x91: report(RPT_INFO, \"(Arcade Page)\\n\");\t\t\t\t\tbreak;\n+\t\t\t\tdefault: \n+\t\t\t\t{\n+\t\t\t\t\tint page\t=\t(appl\t>> 16) & 0x0000FFFF;\n+\t\t\t\t\tif((page >=\t0xFF00)\t&& (page <=\t0xFFFF))\n+\t\t\t\t\t\treport(RPT_INFO, \"(Vendor\tDefined\t-\t0x%04X)\\n\",page);\t\n+\t\t\t\t\telse\n+\t\t\t\t\t\treport(RPT_INFO, \"(Unknown page\t-\tneeds\tto be\tadded\t0x%04X)\\n\",(appl>>16));\t\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+  }\n+  return fd;\n+}\n+\n+//**************************************************************\n+// FUNCTION: FindReports\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//\n+// OUTPUT:\n+//  none\n+//\n+// DESCRIPTION: This function will print out the type of reports\n+//  this HID accepts.\n+//**************************************************************\n+void FindReports(Driver *drvthis)\n+{\n+  int iFields, iUsage;\n+  int iReportType;\n+  struct hiddev_report_info repInfo;\n+  struct hiddev_field_info fieldInfo;\n+  struct hiddev_usage_ref usageRef;\n+  PrivateData *p = drvthis->private_data;\n+  int fd = p->fd;\n+  \n+  //******************************************************\n+  // For each type of report (Input, Output, Feature)\n+  // find out which is accepted for this device.\n+  //******************************************************\n+  for(iReportType=HID_REPORT_TYPE_MIN; \n+      iReportType<=HID_REPORT_TYPE_MAX; \n+  \t  iReportType ++)\n+  {\n+    repInfo.report_type = iReportType;\n+    repInfo.report_id = HID_REPORT_ID_FIRST;\n+\n+    //******************************************************\n+    // HIDIOCGREPORTINFO - struct hiddev_report_info (read/write)\n+    // Obtain the usage information if it is found\n+    //******************************************************\n+    while(ioctl(fd, HIDIOCGREPORTINFO, &repInfo)>=0)\n+    {\n+      report(RPT_INFO, \"  Report id: %d (%s) (%d fields)\\n\",\n+      \t      repInfo.report_id, \n+\t            (iReportType == HID_REPORT_TYPE_INPUT) ? \"Input\" : \n+\t            (iReportType == HID_REPORT_TYPE_OUTPUT) ? \"Output\" : \"Feature/Other\",\n+\t            repInfo.num_fields);\n+     \n+      //******************************************************\n+      // HIDIOCGFIELDINFO - struct hiddev_field_info (read/write)\n+      // Returns the field information associated with a report \n+      // in a hiddev_field_info structure.  The user must fill \n+      // in report_id and report_type in this structure.  The \n+      // field_index should also be filled in, which should be \n+      // a number between 0 and maxfield-1.\n+      //******************************************************\n+      for(iFields = 0; iFields<repInfo.num_fields; iFields++)\n+      {\n+        memset(&fieldInfo, 0, sizeof(fieldInfo));\n+\t      fieldInfo.report_type = repInfo.report_type;\n+        fieldInfo.report_id   = repInfo.report_id;\n+        fieldInfo.field_index = iFields;\n+        ioctl(fd, HIDIOCGFIELDINFO, &fieldInfo);\n+\n+        // Print out information about this field\n+        report(RPT_INFO, \"    Field: %d(id=%d): app: %04x phys %04x flags %x \"\n+\t              \"(%d usages) unit %x exp %d\\n\",\n+\t        iFields, fieldInfo.report_id, fieldInfo.application, \n+\t        fieldInfo.physical, fieldInfo.flags, fieldInfo.maxusage, \n+          fieldInfo.unit, fieldInfo.unit_exponent);\n+\n+        //******************************************************\n+        // HIDIOCGUCODE - struct hiddev_usage_ref(read/write)\n+        // Fill in the structure with report_type, report_id,\n+        // field_index, and usage_index to obtain the usage_code.\n+        //\n+        // HIDIOCGUSAGE - struct hiddev_usage_ref(read/write)\n+        // Obtain the value for the usage_code.\n+        //******************************************************\n+        for(iUsage=0; iUsage<fieldInfo.maxusage; iUsage++)\n+        {\n+          memset(&usageRef, 0, sizeof(usageRef));\n+\t        usageRef.report_type = fieldInfo.report_type;\n+\t        usageRef.report_id = fieldInfo.report_id;\n+\t        usageRef.field_index = iFields;\n+\t        usageRef.usage_index = iUsage;\n+\t        ioctl(fd, HIDIOCGUCODE, &usageRef);\n+\t        ioctl(fd, HIDIOCGUSAGE, &usageRef);\n+\t        report(RPT_INFO, \"      Usage: %04x val %d idx %x\\n\", usageRef.usage_code,\n+\t          usageRef.value, usageRef.usage_index);\n+        }\n+      }\n+\n+      //******************************************************\n+      // Go to the next report if there is one.\n+      //******************************************************\n+      repInfo.report_id |= HID_REPORT_ID_NEXT;\n+    }\n+  }\n+}\n+\n+//**************************************************************\n+// FUNCTION: SendReport\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//\tconst char *buf - Message to write\n+//\tsize_t size - size of buf.\n+//\n+// OUTPUT:\n+//  int err - result of the ioctl call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function will write the 'buf' to the opened\n+//\tHID device.  Specifically, it updates the device's usage \n+//\treference with the data and then sends a report to the HID.\n+//**************************************************************\n+int SendReport(Driver *drvthis, const char *buf, size_t size)\n+{\n+\tstruct hiddev_report_info rinfo;\n+\tstruct hiddev_usage_ref\turef;\n+\tint\ti, err;\n+\tPrivateData *p = drvthis->private_data;\n+\tint fd = p->fd;\n+\n+  //******************************************************\n+\t// Initialize the usage Reference and mark it for OUTPUT\n+  //******************************************************\n+\tmemset(&uref, 0, sizeof(uref));\n+\turef.report_type = HID_REPORT_TYPE_OUTPUT;\n+\turef.report_id\t = 0;\n+\turef.field_index = 0;\n+\n+\t//**************************************************************\n+\t// Fill in the information that we wish to set\n+\t//**************************************************************\n+\turef.usage_code  = 0xffa10005; //\tunused?\n+\tfor(i=0;i<size;i++)\n+\t{\n+\t\turef.usage_index = i;\n+\t\turef.value\t = VALUE_FILTER(buf[i]);\n+\n+\t\t//**************************************************************\n+\t\t// HIDIOCSUSAGE - struct hiddev_usage_ref (write)\n+\t\t// Sets the value of a usage in an output report.  The user fills\n+\t\t// in the hiddev_usage_ref structure as above, but additionally \n+\t\t// fills in the value field.\n+\t\t//**************************************************************\n+\t\tif((err\t= ioctl(fd, HIDIOCSUSAGE, &uref)) < 0)\n+\t\t{\n+\t\t\treport(RPT_INFO, \"Error with sending the USAGE ioctl %d\\n\", err);\n+\t\t\treturn err;\n+\t\t}\n+\t\turef.usage_code  = 0xffa10006; //\tunused?\n+\t}\n+\n+\t//**************************************************************\n+\t// HIDIOCSREPORT - struct hiddev_report_info (write)\n+\t// Instructs the kernel to SEND a report to the device.  This \n+\t// report can be filled in by the user through HIDIOCSUSAGE calls \n+\t// (below) to fill in individual usage values in the report before\n+\t// sending the report in full to the device.\n+\t//**************************************************************\n+\tmemset(&rinfo, 0,\tsizeof(rinfo));\n+\trinfo.report_type\t= HID_REPORT_TYPE_OUTPUT;\n+\trinfo.report_id\t\t= 0;\n+\trinfo.num_fields\t= 0;\n+\tif((err\t= ioctl(fd, HIDIOCSREPORT, &rinfo)) < 0)\n+\t{\n+\t\treport(RPT_INFO, \"Error with sending the REPORT ioctl %d\\n\", errno);\n+\t}\n+\n+  //******************************************************\n+\t// All done, let's return what we did.\n+  //******************************************************\n+\treturn err;\n+}\n+\n+\n+//**************************************************************\n+// FUNCTION: VFDShowIcons\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//\tint mask - Icon mask\n+//\n+// OUTPUT:\n+//  int err - result of the SendReport call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function will turn on/off various icons\n+//  depending upon what was selected.\n+//**************************************************************\n+int VFDShowIcons(Driver *drvthis, int mask)\n+{\n+  int i, err;\n+  char bitmap[8];\n+  const char panelCmd[]  = {0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00};\n+  const char iconCmd[]   = {0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};\n+                  \n+  memset(bitmap, 0, sizeof(bitmap));\n+  for(i=0; i< VFD_ICON_COUNT; i++)\n+  {\n+    if(!(mask & (1<<i)))\n+      continue;\n+    bitmap[icon_bits[i]/8] |= 1 << (icon_bits[i] % 8);\n+    //report(RPT_INFO, \"Bitmap[%d]=%x\\n\",icon_bits[i]/8,bitmap[icon_bits[i]/8]);\n+  }\n+\n+  err = SendReport(drvthis, panelCmd, sizeof(panelCmd));\n+  err = SendReport(drvthis, iconCmd, sizeof(iconCmd));\n+  err = SendReport(drvthis, bitmap, sizeof(bitmap));\n+  return err;\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDIconSet\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//\tint icon - Icon to manipulate\n+//\tint state - 1 for on, 0 for off.\n+//\n+// OUTPUT:\n+//  int err - result of the SendReport call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function will set up the icon mask so that\n+//  the selected icons are marked to be on/off as desired.\n+//**************************************************************\n+int VFDIconSet(Driver *drvthis, int icon, int state)\n+{\n+  PrivateData *p = drvthis->private_data;\n+    \n+  if(icon > VFD_ICON_DVD)\n+    return -1;\n+\n+  if(state)\n+    p->gIconMask |= 1<<icon;\n+  else\n+    p->gIconMask &= ~(1<<icon);\n+\n+  return VFDShowIcons(drvthis, p->gIconMask);\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDIconOn\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//\tint icon - icon to turn on\n+//\n+// OUTPUT:\n+//  int err - result of the VFDIconSet call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function will turn on one specific icon.\n+//**************************************************************\n+int VFDIconOn(Driver *drvthis, int icon)\n+{\n+#ifdef DEBUG\n+\treport(RPT_INFO, \"VFDIconOn %d\\n\",icon);\n+#endif\n+  return VFDIconSet(drvthis, icon, 1);\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDIconOff\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//\tint icon - icon to turn off\n+//\n+// OUTPUT:\n+//  int err - result of the VFDIconSet call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function will turn off one specific icon.\n+//**************************************************************\n+int VFDIconOff(Driver *drvthis, int icon)\n+{\n+#ifdef DEBUG\n+\treport(RPT_INFO, \"VFDIconOff %d\\n\",icon);\n+#endif\n+  return VFDIconSet(drvthis, icon, 0);\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDTurnOffIcons\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//\n+// OUTPUT:\n+//  int err - result of the SendReport call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function will turn off all the icons\n+//**************************************************************\n+int VFDTurnOffIcons(Driver *drvthis)\n+{\n+#ifdef DEBUG\n+\treport(RPT_INFO, \"VFDTurnOffIcons\\n\");\n+#endif\n+  int err;\n+  const char panelCmd[]  = {0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00};\n+  const char iconCmd[]   = {0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};  //icon command\n+  const char iconoff[]   = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};  //icon data\n+    \n+  err = SendReport(drvthis, panelCmd, sizeof(panelCmd));\n+  err = SendReport(drvthis, iconCmd, sizeof(iconCmd));\n+  err = SendReport(drvthis, iconoff, sizeof(iconoff));\n+  return err;\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDSetVolume\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//  int level - volume level (between 0 and 12)\n+//\n+// OUTPUT:\n+//  int err - result of the SendReport call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function will raise/lower the volume indicator.\n+//**************************************************************\n+int VFDSetVolume(Driver *drvthis, int level)\n+{\n+  int i;\n+  PrivateData *p = drvthis->private_data;\n+  \n+  if(level>12)\n+    return -1;\n+\n+  // Clear all of the volume values\n+  p->gIconMask &= ~0xFFFFF800;\n+\n+  for(i=0;i<level;i++)\n+    p->gIconMask |= 1 << (VFD_VOLUME_1 + i);\n+\n+  return VFDShowIcons(drvthis, p->gIconMask);\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDSetString\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//  int region - region to display the string\n+//  int offset - location to display the string\n+//  char *buffer - string to display\n+//\n+// OUTPUT:\n+//  int err - result of the SendReport call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function will display a string in the \n+//  specified region.\n+//**************************************************************\n+int VFDSetString(Driver *drvthis, int region, int offset, char *buffer)\n+{\n+#ifdef DEBUG\n+\treport(RPT_INFO, \"VFDSetString region %d offset %d buffer %s\\n\",region,offset,buffer);\n+#endif\n+\n+  int i,size;\n+  int len = strlen(buffer) + 1;// make sure we make room for the NULL\n+  char stringCmd[8];\n+\n+  if( region > VFD_STR_REGION_4)\n+    return -1;\n+\n+  if( offset > 111)\n+    offset = 111;\n+\n+  if( len > 128) \n+  {\n+    len = 128;\n+    buffer[127] = 0;\n+  }\n+\n+  //******************************************************\n+  // Figure out how many 8 character lines we'll be sending\n+  //******************************************************\n+  size = ((len + 7) / 8) + 1;\n+\n+  //******************************************************\n+  //  Setup the string command packet\n+  //******************************************************\n+  memset(stringCmd, 0, 8);\n+  stringCmd[VFD_CLC_OFFSET] = size;\n+  stringCmd[VFD_FID_OFFSET] = VFD_FID_SET_STRING;\n+  stringCmd[VFD_SET_STRING_RN] = region;\n+  stringCmd[VFD_SET_STRING_SL] = len;\n+  stringCmd[VFD_SET_STRING_XP] = offset;\n+  SendReport(drvthis, stringCmd, sizeof(stringCmd));\n+\n+  //******************************************************\n+  // Now send the string for display\n+  //******************************************************\n+  for(i=0; i<len;i+=8)\n+  {\n+    // make sure we only send 8 bytes at a time\n+    size = (len-i);\n+    size = (size > 8) ? 8 : size; \n+    SendReport(drvthis, &buffer[i], size);\n+  }\n+  return VFDGlobalUpdateDisplay(drvthis);\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDClearString\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//  int region - region to display the string based upon the chosen layout\n+//\n+// OUTPUT:\n+//  int err - result of the SendReport call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function will clear a string in the \n+//  specified region.\n+//**************************************************************\n+int VFDClearString(Driver *drvthis, int region)\n+{\n+  char pszClearStr[8];\n+\n+  if( region > VFD_STR_REGION_4)\n+    return -1;\n+\n+  memset(pszClearStr, 0, 8);\n+  pszClearStr[VFD_CLC_OFFSET] = 1;\n+  pszClearStr[VFD_FID_OFFSET] = VFD_FID_STRING_CLEAR;\n+  pszClearStr[VFD_STRING_CLEAR_MD] = VFD_CLEAR_STR;\n+  pszClearStr[VFD_STRING_CLEAR_RN] = region;\n+  return SendReport(drvthis, pszClearStr, sizeof(pszClearStr));\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDSetDisplay\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//  int mode - VFD_MODE_NONE, VFD_MODE_STR, VFD_MODE_GRAPHICS\n+//  char layout - VFD_STR_LAYOUT_1, VFD_STR_LAYOUT_2, VFD_STR_LAYOUT_3\n+//  char time - Scrolling Time in 50 ms units\n+//  char flags - String Scrolling Enable Flag \n+//\n+// OUTPUT:\n+//  int err - result of the SendReport call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function will turn on scrolling in the specified region.\n+//**************************************************************\n+int VFDSetDisplay(Driver *drvthis, int mode, char layout, char time, char flags)\n+{\n+  char packet[VFD_PACKET_SIZE(1)];\n+\n+  memset(packet, 0, 8);\n+\n+  packet[VFD_CLC_OFFSET]     = 1;\n+  packet[VFD_FID_OFFSET]     = VFD_FID_SET_DISPLAY;\n+  packet[VFD_SET_DISPLAY_MD] = mode;\n+  packet[VFD_SET_DISPLAY_DM] = layout;\n+  packet[VFD_SET_DISPLAY_ST] = time;\n+  packet[VFD_SET_DISPLAY_SF] = flags;\n+  return SendReport(drvthis, packet, sizeof(packet));\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDUpdateDisplay\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//  int mode - VFD_MODE_NONE, VFD_MODE_STR, VFD_MODE_GRAPHICS\n+//  char layout - VFD_STR_LAYOUT_1, VFD_STR_LAYOUT_2, VFD_STR_LAYOUT_3\n+//  char time - Scrolling Time in 50 ms units\n+//  char flags - String Scrolling Enable Flag \n+//\n+// OUTPUT:\n+//  int err - result of the SendReport call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function will update the display mode/layout/scrolltime.\n+//**************************************************************\n+int VFDUpdateDisplay(Driver *drvthis, int mode, char layout, char time, char flags)\n+{\n+  PrivateData *p = drvthis->private_data;\n+\n+  if(mode != p->gDisplayMode)\n+    return 0;\n+\n+  return VFDSetDisplay(drvthis, mode, layout, time, flags);\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDGlobalUpdateDisplay\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//\n+// OUTPUT:\n+//  int err - result of the SendReport call (On success 0, On error -1)\n+//\n+// DESCRIPTION: Update the display based upon the global configuration values.\n+//**************************************************************\n+int VFDGlobalUpdateDisplay(Driver *drvthis)\n+{\n+  PrivateData *p = drvthis->private_data;\n+  return VFDUpdateDisplay(drvthis, p->gDisplayMode, p->gLayout, p->gScrollTime, p->gFlags);\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDSetScrollRegion\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//  int region - region to scroll\n+//\n+// OUTPUT:\n+//  int err - result of the SendReport call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function will turn on scrolling in the specified region.\n+//**************************************************************\n+int VFDSetScrollRegion(Driver *drvthis, int region)\n+{\n+  PrivateData *p = drvthis->private_data;\n+\n+#ifdef DEBUG\n+\treport(RPT_INFO, \"VFDSetScrollRegion region %d\\n\",region);\n+#endif\n+  p->gFlags &= ~0x0F;\n+  p->gFlags |= (region & 0x0F);\n+  return VFDUpdateDisplay(drvthis, VFD_MODE_STR, p->gLayout, p->gScrollTime, p->gFlags | VFD_SCROLL_ENABLE);\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDSetScrollTime\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//  int time - time in ms to scroll\n+//\n+// OUTPUT:\n+//  int err - result of the SendReport call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function will set the rate at which to scroll\n+//**************************************************************\n+int VFDSetScrollTime(Driver *drvthis, int time)\n+{\n+  PrivateData *p = drvthis->private_data;\n+  \n+  p->gScrollTime = time / 50;\n+  return VFDUpdateDisplay(drvthis, VFD_MODE_STR, p->gLayout, p->gScrollTime, p->gFlags | VFD_SCROLL_ENABLE);\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDEnableDisplay\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//  int mode - VFD_MODE_NONE, VFD_MODE_STR, VFD_MODE_GRAPHICS\n+//  char layout - VFD_STR_LAYOUT_1, VFD_STR_LAYOUT_2, VFD_STR_LAYOUT_3\n+//  char time - Scrolling Time in 50 ms units\n+//  char flags - String Scrolling Enable Flag \n+//\n+// OUTPUT:\n+//  int err - result of the SendReport call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function specifies how the VFD is segmented.\n+//**************************************************************\n+int VFDEnableDisplay(Driver *drvthis, int mode, char layout, char time, char flags)\n+{\n+  PrivateData *p = drvthis->private_data;\n+  \n+  p->gDisplayMode = mode;\n+  return VFDSetDisplay(drvthis, mode, layout, time, flags);\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDDisableDisplay\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//\n+// OUTPUT:\n+//  int err - result of the SendReport call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function will disable any updates to the display\n+//**************************************************************\n+int VFDDisableDisplay(Driver *drvthis)\n+{\n+  PrivateData *p = drvthis->private_data;\n+  \n+  p->gDisplayMode = VFD_MODE_NONE; \n+  return VFDSetDisplay(drvthis, VFD_MODE_NONE, 0, 0, 0);\n+}\n+\n+\n+//**************************************************************\n+// FUNCTION: VFDEnableString\n+//\n+// INPUT: \n+//\tint fd - file descriptor to the opened HID device\n+//  char ucLayout - specify how the VFD is segmented\n+//\n+// OUTPUT:\n+//  int err - result of the SendReport call (On success 0, On error -1)\n+//\n+// DESCRIPTION: This function specifies how the VFD is laid out.\n+//         LAYOUT 1          LAYOUT 2             LAYOUT 3\n+//   /----------------\\  /---------------\\  /--------------------\\\n+//   |                |  |   Region 1    |  |Region 1 | Region 2 |\n+//   |    Region 1    |  |---------------|  |---------+----------|\n+//   |                |  |   Region 3    |  |Region 3 | Region 4 |\n+//   \\----------------/  \\---------------/  \\--------------------/\n+//**************************************************************\n+int VFDEnableString(Driver *drvthis, char ucLayout)\n+{\n+  PrivateData *p = drvthis->private_data;\n+  \n+  if(ucLayout < VFD_STR_LAYOUT_1 || ucLayout > VFD_STR_LAYOUT_3)\n+    return -1;\n+\n+  p->gLayout = ucLayout;\n+  return VFDEnableDisplay(drvthis, VFD_MODE_STR, p->gLayout, p->gScrollTime, p->gFlags | VFD_SCROLL_ENABLE);\n+}\n+\n+\n+//**************************************************************\n+// FUNCTION: _set_pixel\n+//\n+// INPUT: \n+//\tint page - page to draw on(VFD_GR_PAGE_1 ... VFD_GR_PAGE_4)\n+//  int x - coordinate\n+//  int y - coordinate\n+//  int color - 0 or 1 - turn on/off the LED\n+//\n+// OUTPUT:\n+//  Nothing\n+//\n+// DESCRIPTION: This function turns on/off pixels in the graphic page.\n+//**************************************************************\n+static void _set_pixel(Driver *drvthis, int page, int x, int y, int color)\n+{\n+  PrivateData *p = drvthis->private_data;\n+  \n+  char dst = ((y/8) * 112) + x;\n+  char mask = (1 << (7 - (y%8)));\n+\n+  // Turn the LED on/off based upon the color setting\n+  if(color) \n+    p->gPages[page][dst] |= mask;\n+  else\n+    p->gPages[page][dst] &= ~mask;\n+}\n+\n+\n+//**************************************************************\n+// FUNCTION: VFDGraphicsClearBuffer\n+//\n+// INPUT: \n+//\tint page - page to clear (VFD_GR_PAGE_1 ... VFD_GR_PAGE_4)\n+//\n+// OUTPUT:\n+//  0 on success, -1 on error\n+//\n+// DESCRIPTION: This function clears the specified graphic page.\n+//**************************************************************\n+int VFDGraphicsClearBuffer(Driver *drvthis, int page)\n+{\n+  PrivateData *p = drvthis->private_data;\n+  \n+  if(page >= VFD_PAGE_COUNT)\n+    return -1;\n+\n+  // Clear the page to all off\n+  memset(p->gPages[page], 0, VFD_PAGE_SIZE);\n+  return 0;\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDGraphicsCopyPage\n+//\n+// INPUT: \n+//  int page - Graphic page (dst) (VFD_GR_PAGE_1 ... VFD_GR_PAGE_4)\n+//  char *buffer - buffer worth of data (src)\n+//\n+// OUTPUT:\n+//  Nothing\n+//\n+// DESCRIPTION: This function turns on/off pixels in the graphic page.\n+//**************************************************************\n+int VFDGraphicsCopyPage(Driver *drvthis, int page, char *buffer)\n+{\n+  int x, y;\n+  int shift;\n+\n+  if(page >= VFD_PAGE_COUNT)\n+    return -1;\n+\n+  for(y=0; y < VFD_HEIGHT; y++)\n+  {\n+    for(x=0; x < VFD_WIDTH; x++)\n+    {\n+      char src = (y*14)+(x/8);\n+      shift = 7 - (x%8);\n+      if(shift == 0)\n+        shift = 1;\n+      else\n+        shift = 1 << shift;\n+      _set_pixel(drvthis, page, x, y, buffer[src] & shift);\n+    }\n+  }\n+  return 0;\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDSetGraphics\n+//\n+// INPUT: \n+//  int fd - file descriptor to the opened HID device\n+//  char region - Graphic Page index\n+//  char *buf - data to display\n+//\n+// OUTPUT:\n+//\n+// DESCRIPTION: \n+//**************************************************************\n+int VFDSetGraphics(Driver *drvthis, char region, char *buf)\n+{\n+  int i, size;\n+  char packet[8];\n+\n+  // Send the Command to Set Graphics\n+  memset(packet, 0, 8);\n+\n+  packet[VFD_CLC_OFFSET] = 29;\n+  packet[VFD_FID_OFFSET] = VFD_FID_SET_GRAPHICS;\n+  packet[VFD_SET_GRAPHICS_GP]=region;\n+  SendReport(drvthis, packet, sizeof(packet));\n+\n+  // Send the actual graphics\n+  for(i=0; i<VFD_PAGE_SIZE;i+=8)\n+  {\n+    // make sure we only send 8 bytes at a time\n+    size = (VFD_PAGE_SIZE - i);\n+    size = (size > 8) ? 8 : size; \n+    SendReport(drvthis, &buf[i], size);\n+  }\n+  return 0;\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDGraphicsSendPage\n+//\n+// INPUT: \n+//  int fd - file descriptor to the opened HID device\n+//  int page - page to display (VFD_GR_PAGE_1 ... VFD_GR_PAGE_4)\n+//\n+// OUTPUT:\n+//  -1 on error, or results of VFDSetGraphics\n+//\n+// DESCRIPTION:  Sends the graphics page to the VFD to be displayed.\n+//**************************************************************\n+int VFDGraphicsSendPage(Driver *drvthis, int page)\n+{\n+  PrivateData *p = drvthis->private_data;\n+  \n+  if(page >= VFD_PAGE_COUNT)\n+    return -1;\n+  return VFDSetGraphics(drvthis, page+1, p->gPages[page]);\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDGraphicsShowPage\n+//\n+// INPUT: \n+//  int fd - file descriptor to the opened HID device\n+//  int page - page to get ready to show (VFD_GR_PAGE_1 ... VFD_GR_PAGE_4)\n+//\n+// OUTPUT:\n+//  -1 on error\n+//\n+// DESCRIPTION: Sets the VFD into Graphic mode\n+//**************************************************************\n+int VFDGraphicsShowPage(Driver *drvthis, int page)\n+{\n+  if(page >= VFD_PAGE_COUNT)\n+    return -1;\n+  return VFDEnableDisplay(drvthis, VFD_MODE_GRAPHICS, page+1, 0, 0);\n+}\n+\n+//**************************************************************\n+// FUNCTION: VFDGraphicsRect\n+//\n+// INPUT: \n+//  int page - page to get ready to show (VFD_GR_PAGE_1 ... VFD_GR_PAGE_4)\n+//  char color - 0 or 1\n+//  int srcx - starting X Coordinate\n+//  int srcy - starting Y Coordinate\n+//  int width - how wide to make the box\n+//  int height - how tall to make the box\n+//\n+// OUTPUT:\n+//  -1 on error\n+//\n+// DESCRIPTION: Draws a box at (srcx,srcy) - (srcx+width, srcy+height)\n+//**************************************************************\n+int VFDGraphicsRect(Driver *drvthis, int page, char color, int srcx, int srcy, int width, int height)\n+{\n+  PrivateData *p = drvthis->private_data;\n+  \n+  char *b;\n+  int h, w, x, y;\n+\n+  if( page >= VFD_PAGE_COUNT)\n+    return -1;\n+\n+  if (srcx > VFD_WIDTH || srcy > VFD_HEIGHT)\n+    return 0;\n+\n+  h = (srcy + height > VFD_HEIGHT) ? VFD_HEIGHT - srcy : srcy + height;\n+  w = (srcx + width > VFD_WIDTH) ? VFD_WIDTH - srcx : srcx + width;\n+  b = p->gPages[page];\n+\n+  for( y = srcy; y < h; y++ )\n+    for( x = srcx; x < w; x++)\n+      _set_pixel(drvthis, page, x, y, color);\n+\n+  return 0;\n+}\ndiff --git a/server/drivers/led.h b/server/drivers/led.h\nnew file mode 100644\nindex 0000000..5a01f0b\n--- /dev/null\n+++ b/server/drivers/led.h\n@@ -0,0 +1,29 @@\n+#ifndef LED_H\n+#define LED_H\n+\n+// led.c functions\n+int OpenHID(Driver *drvthis);\n+int VFDShowIcons(Driver *drvthis, int mask);\n+int VFDIconSet(Driver *drvthis, int icon, int state);\n+int VFDIconOn(Driver *drvthis, int icon);\n+int VFDIconOff(Driver *drvthis, int icon);\n+int VFDTurnOffIcons(Driver *drvthis);\n+int VFDSetVolume(Driver *drvthis, int level);\n+int VFDSetString(Driver *drvthis, int region, int offset, char *buffer);\n+int VFDClearString(Driver *drvthis, int region);\n+int VFDSetDisplay(Driver *drvthis, int mode, char layout, char time, char flags);\n+int VFDUpdateDisplay(Driver *drvthis, int mode, char layout, char time, char flags);\n+int VFDGlobalUpdateDisplay(Driver *drvthis);\n+int VFDSetScrollRegion(Driver *drvthis, int region);\n+int VFDSetScrollTime(Driver *drvthis, int time);\n+int VFDEnableDisplay(Driver *drvthis, int mode, char layout, char time, char flags);\n+int VFDDisableDisplay(Driver *drvthis);\n+int VFDEnableString(Driver *drvthis, char ucLayout);\n+int VFDGraphicsClearBuffer(Driver *drvthis, int page);\n+int VFDGraphicsCopyPage(Driver *drvthis, int page, char *buffer);\n+int VFDSetGraphics(Driver *drvthis, char region, char *buf);\n+int VFDGraphicsSendPage(Driver *drvthis, int page);\n+int VFDGraphicsShowPage(Driver *drvthis, int page);\n+int VFDGraphicsRect(Driver *drvthis, int page, char color, int srcx, int srcy, int width, int height);\n+\n+#endif\ndiff --git a/server/drivers/libvfd.h b/server/drivers/libvfd.h\nnew file mode 100644\nindex 0000000..5bd8654\n--- /dev/null\n+++ b/server/drivers/libvfd.h\n@@ -0,0 +1,183 @@\n+/* Header for libvfd\n+ * Copyright (C) 2006, Advanced Micro Devices, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ */\n+\n+#ifndef LIBVFD_H_\n+#define LIBVFD_H_\n+\n+/* Offsets into the VFD command packet */\n+\n+#define VFD_CLC_OFFSET          0x00\n+#define VFD_FID_OFFSET          0x01\n+\n+/* VFD FID (Function IDs) */\n+\n+#define VFD_FID_PANEL_BANK      0x01\n+#define VFD_FID_ICON_CONTROL    0x02\n+#define VFD_FID_SET_STRING      0x03\n+#define VFD_FID_STRING_CLEAR    0x04\n+#define VFD_FID_SET_DISPLAY     0x05\n+#define VFD_FID_SET_GRAPHICS    0x06\n+#define VFD_FID_GRAPHIC_AREA    0x07\n+\n+/* Command specific offsets */\n+\n+/* Panel Blank */\n+#define VFD_PANEL_BLANK_BL      0x02\n+\n+/* Icon Control */\n+#define VFD_ICON_CONTROL_BITMAP 0x08\n+\n+/* Set String */\n+#define VFD_SET_STRING_RN       0x02\n+#define VFD_SET_STRING_SL       0x03\n+#define VFD_SET_STRING_XP       0x04\n+#define VFD_SET_STRING_DATA     0x08\n+\n+/* String Clear */\n+#define VFD_STRING_CLEAR_MD     0x02\n+#define      VFD_CLEAR_STR      0x01\n+#define      VFD_CLEAR_GRAPHICS 0x02\n+#define VFD_STRING_CLEAR_RN     0x03\n+\n+/* Set Display */\n+#define VFD_SET_DISPLAY_MD      0x02\n+#define       VFD_MODE_NONE     0x00\n+#define       VFD_MODE_STR      0x02\n+#define       VFD_MODE_GRAPHICS 0x03\n+#define VFD_SET_DISPLAY_DM      0x03\n+#define VFD_SET_DISPLAY_ST      0x04\n+#define VFD_SET_DISPLAY_SF      0x06\n+\n+/* Set Graphics */\n+#define VFD_SET_GRAPHICS_GP     0x02\n+#define VFD_SET_GRAPHICS_DATA   0x08\n+\n+/* Graphic Area */\n+#define VFD_GRAPHIC_AREA_OOF    0x02\n+\n+/* LAYOUT 1\n+  /-----------------------\\\n+  |                       |\n+  |      Region 1         |\n+  |                       |\n+  \\-----------------------/\n+*/\n+\n+/* LAYOUT 2\n+  /-----------------------\\\n+  |        Region 1       |\n+  |---------------------- |\n+  |        Region 3       |\n+  \\-----------------------/\n+*/\n+\n+/* LAYOUT 3\n+  /-----------------------\\\n+  | Region 1 | Region 2   |\n+  |---------------------- |\n+  | Region 3 | Region 4   |\n+  \\-----------------------/\n+*/\n+\n+#define VFD_GR_PAGE_1 0x0\n+#define VFD_GR_PAGE_2 0x1\n+#define VFD_GR_PAGE_3 0x2\n+#define VFD_GR_PAGE_4 0x3\n+\n+#define VFD_STR_LAYOUT_1 0x01\n+#define VFD_STR_LAYOUT_2 0x02\n+#define VFD_STR_LAYOUT_3 0x03\n+\n+#define VFD_STR_REGION_1 0x01\n+#define VFD_STR_REGION_2 0x02\n+#define VFD_STR_REGION_3 0x03\n+#define VFD_STR_REGION_4 0x04\n+\n+#define VFD_SCROLL_REGION1 (1 << 0)\n+#define VFD_SCROLL_REGION2 (1 << 1)\n+#define VFD_SCROLL_REGION3 (1 << 2)\n+#define VFD_SCROLL_REGION4 (1 << 3)\n+\n+#define VFD_SCROLL_ENABLE  (1 << 7)\n+\n+/* Graphics defintions */\n+/* The graphics area has a static resolution */\n+\n+#define VFD_WIDTH  112\n+#define VFD_HEIGHT 16\n+#define VFD_PITCH  (112 / 8)\n+#define VFD_PAGE_SIZE  (VFD_PITCH * VFD_HEIGHT)\n+#define VFD_PAGE_COUNT   4\n+\n+#define VFD_ICON_VIDEO   0\n+#define VFD_ICON_CD      1   \n+#define VFD_ICON_PLAY    2   \n+#define VFD_ICON_RWND    3   \n+#define VFD_ICON_PAUSE   4   \n+#define VFD_ICON_FFWD    5 \n+#define VFD_ICON_SPEAKER 6   \n+#define VFD_ICON_REC     7   \n+#define VFD_ICON_VOLUME  8   \n+#define VFD_ICON_RADIO   9   \n+#define VFD_ICON_DVD     10  \n+\n+#define VFD_VOLUME_1     11  \n+#define VFD_VOLUME_2     12\n+#define VFD_VOLUME_3     13\n+#define VFD_VOLUME_4     14\n+#define VFD_VOLUME_5     15\n+#define VFD_VOLUME_6     16\n+#define VFD_VOLUME_7     17\n+#define VFD_VOLUME_8     18\n+#define VFD_VOLUME_9     19\n+#define VFD_VOLUME_10    20\n+#define VFD_VOLUME_11    21\n+#define VFD_VOLUME_12    22\n+\n+#define VFD_ICON_COUNT   23\n+\n+int vfd_cmd_graphic_area_state(unsigned char);\n+int vfd_cmd_panel_bank(unsigned char);\n+int vfd_cmd_icon_control(unsigned char *);\n+int vfd_cmd_set_string(unsigned char, unsigned char, unsigned char *, int);\n+int vfd_cmd_clear(unsigned char, unsigned char);\n+int vfd_cmd_set_display(unsigned char, unsigned char, unsigned char, unsigned char);\n+int vfd_cmd_set_graphics(unsigned char, unsigned char *);\n+\n+int vfd_enable_display(int, unsigned char, unsigned char, unsigned char);\n+int vfd_update_display(int, unsigned char, unsigned char, unsigned char);\n+int vfd_disable_display(int);\n+\n+void vfd_str_set_scroll_time(int);\n+void vfd_str_set_scroll_speed(unsigned char);\n+void vfd_str_set_scroll_regions(unsigned char);\n+int vfd_str_set_string(unsigned char, unsigned char, const unsigned char *);\n+int vfd_str_clear_string(unsigned char);\n+int vfd_str_enable(unsigned char);\n+int vfd_str_disable(void);\n+\n+int vfd_gr_clear_buffer(unsigned char);\n+int vfd_gr_show_page(int);\n+int vfd_gr_disable(void);\n+int vfd_gr_send_page(int);\n+int vfd_gr_clear_page(int);\n+int vfd_gr_copy_page(int page, char *src);\n+\n+int vfd_icon_set(int, int);\n+int vfd_icon_on(int, int);\n+int vfd_icon_off(int, int);\n+\n+void vfr_gr_bitmap(int, char *, int, int, int, int, int, int);\n+int vfr_gr_rect(int, unsigned char, int, int, int, int);\n+\n+int vfd_init(void);\n+int vfd_send_command(unsigned char, int, unsigned char *);\n+void vfd_close(void);\n+\n+#endif\n"
  },
  {
    "path": "packages/addons/service/lcdd/patches/lcdd-0.5.6-libftdi1.patch",
    "content": "diff --git a/server/drivers/hd44780-low.h b/server/drivers/hd44780-low.h\nindex 47acf45..6faa830 100644\n--- a/server/drivers/hd44780-low.h\n+++ b/server/drivers/hd44780-low.h\n@@ -26,7 +26,7 @@\n #endif\n \n #ifdef HAVE_LIBFTDI\n-# include <ftdi.h>\n+# include <libftdi1/ftdi.h>\n #endif\n \n /** \\name Symbolic names for connection types\ndiff --git a/server/drivers/i2500vfd.c b/server/drivers/i2500vfd.c\nindex d896a69..7fe74f2 100644\n--- a/server/drivers/i2500vfd.c\n+++ b/server/drivers/i2500vfd.c\n@@ -32,7 +32,7 @@\n #include <stdio.h>\n #include <unistd.h>\n #include <string.h>\n-#include <ftdi.h>\n+#include <libftdi1/ftdi.h>\n \n #include \"lcd.h\"\n #include \"i2500vfd.h\"\ndiff --git a/server/drivers/lis.c b/server/drivers/lis.c\nindex 5d3e97a..6c26a19 100644\n--- a/server/drivers/lis.c\n+++ b/server/drivers/lis.c\n@@ -42,7 +42,7 @@\n #include <errno.h>\n #include <pthread.h>\n \n-#include <ftdi.h>\n+#include <libftdi1/ftdi.h>\n \n #include \"lcd.h\"\n #include \"lis.h\"\ndiff --git a/server/drivers/ula200.c b/server/drivers/ula200.c\nindex cbdde40..a84eb49 100644\n--- a/server/drivers/ula200.c\n+++ b/server/drivers/ula200.c\n@@ -31,7 +31,7 @@\n #include <string.h>\n #include <errno.h>\n \n-#include <ftdi.h>\n+#include <libftdi1/ftdi.h>\n \n #include \"lcd.h\"\n #include \"ula200.h\"\n"
  },
  {
    "path": "packages/addons/service/lcdd/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n   <category   label=\"30000\">\n      <setting label=\"30001\" id=\"LCD_DRIVER\" type=\"select\" values=\"@DRIVERS@\" default=\"none\" />\n    </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/lcdd/source/bin/lcdd.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\noe_setup_addon service.lcdd\n\nif [ -z \"$LCD_DRIVER\" -o \"$LCD_DRIVER\" == \"none\" ]; then\n  exit 0\nfi\n\nLCDCONF=$ADDON_HOME/LCDd.conf\n\nif [ ! -f $LCDCONF ]; then\n  if [ -f /storage/.cache/LCDd.conf ]; then\n    mv /storage/.cache/LCDd.conf $LCDCONF\n  else\n    cp $ADDON_DIR/config/LCDd.conf $LCDCONF\n  fi\nfi\n\nLCDd -f -c $LCDCONF -d $LCD_DRIVER\n"
  },
  {
    "path": "packages/addons/service/lcdd/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\n\nclass Monitor(xbmc.Monitor):\n\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == '__main__':\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/lcdd/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"LCD driver\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/lcdd/source/system.d/service.lcdd.service",
    "content": "[Unit]\nDescription=LCDProc\nAfter=multi-user.target\n\n[Service]\nExecStart=/bin/sh /storage/.kodi/addons/service.lcdd/bin/lcdd.start\nTimeoutStopSec=1s\nRestart=on-failure\nRestartSec=5\nStartLimitInterval=30\nStartLimitBurst=5\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/addons/service/librespot/changelog.txt",
    "content": "1\n- update librespot to githash 03b547d (2023-04-16)\n2\n- update librespot to githash c964102 (2023-05-14)\n3\n- update librespot to githash f037e46 (2023-07-19)\n4\n- update librespot to githash 886617e (2023-12-06)\n"
  },
  {
    "path": "packages/addons/service/librespot/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017 Shane Meagher (shanemeagher)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"librespot\"\nPKG_VERSION=\"886617e41c2177d0cb184cb761aa64acc8695a88\"\nPKG_VERSION_DATE=\"2023-12-06\"\nPKG_SHA256=\"c53fa249e2ff7c75d51f4cbe9867e9ca6a60a0d714c2810fab16a29d113b2144\"\nPKG_REV=\"4\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/librespot-org/librespot/\"\nPKG_URL=\"https://github.com/librespot-org/librespot/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib avahi pulseaudio cargo:host\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Librespot: play Spotify through Kodi using a Spotify app as a remote\"\nPKG_LONGDESC=\"Librespot (${PKG_VERSION_DATE}) lets you play Spotify through Kodi using a Spotify app as a remote.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Librespot\"\nPKG_ADDON_TYPE=\"xbmc.service\"\nPKG_MAINTAINER=\"Anton Voyl (awiouy)\"\n\nmake_target() {\n  export RUSTC_LINKER=${CC}\n  cargo build \\\n    --target ${TARGET_NAME} \\\n    --release \\\n    --no-default-features \\\n    --features \"alsa-backend pulseaudio-backend with-dns-sd\"\n\n  ${STRIP} ${PKG_BUILD}/.${TARGET_NAME}/target/${TARGET_NAME}/release/librespot\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp ${PKG_BUILD}/.${TARGET_NAME}/target/${TARGET_NAME}/release/librespot \\\n       ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n    cp $(get_build_dir avahi)/avahi-compat-libdns_sd/.libs/libdns_sd.so.1 \\\n       ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n}\n"
  },
  {
    "path": "packages/addons/service/librespot/source/bin/onevent.py",
    "content": "#!/usr/bin/python\nimport json\nimport os\nimport socket\n\nADDRESS = ('127.0.0.1', 36963)\nBUFFER_SIZE = 1024\n\n\ndef send_event(event):\n    data = json.dumps(event).encode()\n    with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as sock:\n        sock.sendto(data, ADDRESS)\n\n\ndef receive_event():\n    with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as sock:\n        sock.settimeout(None)\n        sock.bind(ADDRESS)\n        while True:\n            data, addr = sock.recvfrom(BUFFER_SIZE)\n            event = json.loads(data.decode())\n            if not event:\n                break\n            yield event\n\n\nARG_ALBUM = 'album'\nARG_ARTIST = 'artist'\nARG_ART = 'art'\nARG_TITLE = 'title'\n\nKEY_ALBUM = 'ALBUM'\nKEY_ARTISTS = 'ARTISTS'\nKEY_COVERS = 'COVERS'\nKEY_ITEM_TYPE = 'ITEM_TYPE'\nKEY_NAME = 'NAME'\nKEY_PLAYER_EVENT = 'PLAYER_EVENT'\nKEY_SHOW_NAME = 'SHOW_NAME'\n\nPLAYER_EVENT_STOPPED = 'stopped'\nPLAYER_EVENT_TRACK_CHANGED = 'track_changed'\n\nITEM_TYPE_EPISODE = 'Episode'\nITEM_TYPE_TRACK = 'Track'\n\n\ndef get_env_value(key):\n    return os.environ.get(key, '').partition('\\n')[0]\n\n\nif __name__ == '__main__':\n    player_event = get_env_value(KEY_PLAYER_EVENT)\n    event = {KEY_PLAYER_EVENT: player_event}\n    if player_event == PLAYER_EVENT_STOPPED:\n        send_event(event)\n    elif player_event == PLAYER_EVENT_TRACK_CHANGED:\n        event[ARG_ART] = get_env_value(KEY_COVERS)\n        event[ARG_TITLE] = get_env_value(KEY_NAME)\n        item_type = get_env_value(KEY_ITEM_TYPE)\n        if item_type == ITEM_TYPE_EPISODE:\n            event[ARG_ALBUM] = get_env_value(KEY_SHOW_NAME)\n        elif item_type == ITEM_TYPE_TRACK:\n            event[ARG_ALBUM] = get_env_value(KEY_ALBUM)\n            event[ARG_ARTIST] = get_env_value(KEY_ARTISTS)\n        send_event(event)\n"
  },
  {
    "path": "packages/addons/service/librespot/source/default.py",
    "content": "import os\nimport sys\nimport xbmcaddon\nimport xbmcvfs\n\n\ndef _set_home():\n    home = xbmcvfs.translatePath(xbmcaddon.Addon().getAddonInfo('profile'))\n    os.makedirs(home, exist_ok=True)\n    os.chdir(home)\n\n\ndef _set_paths():\n    path = xbmcaddon.Addon().getAddonInfo('path')\n    os.environ['PATH'] += os.pathsep + os.path.join(path, 'bin')\n    os.environ['LD_LIBRARY_PATH'] += os.pathsep + os.path.join(path, 'lib')\n    sys.path.append(os.path.join(path, 'bin'))\n    sys.path.append(os.path.join(path, 'resources', 'lib'))\n\n\nif __name__ == '__main__':\n    _set_home()\n    _set_paths()\n    import service\n    service.Monitor().run()\n"
  },
  {
    "path": "packages/addons/service/librespot/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: librespot\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30100\"\nmsgid \"Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30101\"\nmsgid \"Name\"\nmsgstr \"\"\n\nmsgctxt \"#30102\"\nmsgid \"Do not disturb Kodi\"\nmsgstr \"\"\n\nmsgctxt \"#30103\"\nmsgid \"User options\"\nmsgstr \"\"\n\nmsgctxt \"#30104\"\nmsgid \"Backend\"\nmsgstr \"\"\n\nmsgctxt \"#30105\"\nmsgid \"ALSA device\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/librespot/source/resources/lib/external_player.py",
    "content": "import player\nimport service\n\n\nclass Player(player.Player):\n\n    def onLibrespotTrackChanged(self, art, artist, title, **kwargs):\n        service.notification(heading=title, message=artist, icon=art)\n"
  },
  {
    "path": "packages/addons/service/librespot/source/resources/lib/internal_player.py",
    "content": "import xbmc\nimport xbmcgui\n\nimport player\nimport service\n\n\nclass Player(player.Player):\n\n    def __init__(self, codec='pcm_sb16be', max_fanarts='10', **kwargs):\n        super().__init__(**kwargs)\n        self._max_fanarts = int(max_fanarts)\n        self._list_item = xbmcgui.ListItem(path=self.librespot.file)\n        self._list_item.getVideoInfoTag().addAudioStream(xbmc.AudioStreamDetail(2, codec))\n        self._music_info_tag = self._list_item.getMusicInfoTag()\n\n    def onLibrespotTrackChanged(self, album='', art='', artist='', title=''):\n        fanart = service.get_fanart(art, self._max_fanarts) if art else art\n        self._list_item.setArt({'fanart': fanart, 'thumb': art})\n        self._music_info_tag.setAlbum(album)\n        self._music_info_tag.setArtist(artist)\n        self._music_info_tag.setTitle(title)\n        if self.isPlaying() and self.getPlayingFile() == self.librespot.file:\n            self.updateInfoTag(self._list_item)\n        else:\n            self.stop()  # fixes unepxected behaviour of Player.play()\n            self.librespot.start_sink()\n            self.play(self.librespot.file, listitem=self._list_item)\n\n    def onLibrespotStopped(self):\n        self.librespot.stop_sink()\n        if self.isPlaying() and self.getPlayingFile() == self.librespot.file:\n            self.last_file = None\n            self.stop()\n"
  },
  {
    "path": "packages/addons/service/librespot/source/resources/lib/librespot.py",
    "content": "import shlex\nimport socket\nimport subprocess\nimport threading\n\nimport external_player\nimport internal_player\nimport service\n\n\nclass Librespot:\n\n    def __init__(self,\n                 bitrate='320',\n                 device_type='tv',\n                 max_retries='5',\n                 name='Librespot@{}',\n                 options='',\n                 **kwargs):\n        name = name.format(socket.gethostname())\n        self.command = [\n            'librespot',\n            '--bitrate', f'{bitrate}',\n            '--device-type', f'{device_type}',\n            '--disable-audio-cache',\n            '--disable-credential-cache',\n            '--name', f'{name}',\n            '--onevent', 'onevent.py',\n            '--quiet',\n        ] + shlex.split(options)\n        service.log(self.command)\n        self.file = ''\n        self._is_started = threading.Event()\n        self._is_stopped = threading.Event()\n        self._librespot = None\n        self._max_retries = int(max_retries)\n        self._retries = 0\n        self._thread = threading.Thread()\n\n    def get_player(self, **kwargs):\n        return (internal_player if self.file else external_player).Player(**kwargs)\n\n    def restart(self):\n        if self._thread.is_alive():\n            self._librespot.terminate()\n        else:\n            self.start()\n\n    def start(self):\n        if not self._thread.is_alive() and self._retries < self._max_retries:\n            self._thread = threading.Thread(daemon=True, target=self._run)\n            self._thread.start()\n            self._is_started.wait(1)\n\n    def stop(self):\n        if self._thread.is_alive():\n            self._is_stopped.set()\n            self._librespot.terminate()\n            self._thread.join()\n\n    def start_sink(self):\n        pass\n\n    def stop_sink(self):\n        pass\n\n    def _run(self):\n        service.log('librespot thread started')\n        self._is_started.clear()\n        self._is_stopped.clear()\n        while not self._is_stopped.is_set():\n            with subprocess.Popen(self.command, stderr=subprocess.PIPE, text=True) as self._librespot:\n                self._is_started.set()\n                for line in self._librespot.stderr:\n                    service.log(line.rstrip())\n            self.stop_sink()\n            if self._librespot.returncode <= 0:\n                self._retries = 0\n            else:\n                self._retries += 1\n                if self._retries < self._max_retries:\n                    service.notification(\n                        f'librespot failed {self._retries}/{self._max_retries}')\n                else:\n                    service.notification('librespot failed too many times')\n                    break\n        service.log('librespot thread stopped')\n\n    def __enter__(self):\n        subprocess.Popen('[ -f /proc/sys/abi/cp15_barrier ] && echo 2 >/proc/sys/abi/cp15_barrier', shell=True)\n        return self\n\n    def __exit__(self, *args):\n        self.stop()\n"
  },
  {
    "path": "packages/addons/service/librespot/source/resources/lib/librespot_alsa.py",
    "content": "import librespot\n\n\nclass Librespot(librespot.Librespot):\n\n    def __init__(self, alsa_device='hw:2,0', **kwargs):\n        super().__init__(**kwargs)\n        self.command += [\n            '--backend', 'alsa',\n            '--device', f'{alsa_device}',\n        ]\n"
  },
  {
    "path": "packages/addons/service/librespot/source/resources/lib/librespot_pulseaudio_rtp.py",
    "content": "import socket\nimport subprocess\n\nimport librespot\nimport service\n\n\nclass Librespot(librespot.Librespot):\n\n    def __init__(self,\n                 codec='pcm_sb16be',\n                 pa_rtp_address='127.0.0.1',\n                 pa_rtp_device='librespot',\n                 pa_rtp_port='24642',\n                 **kwargs):\n        service.log('pulseaudio backend started')\n        sap_cmd = f'nc -l -u -s {pa_rtp_address} -p 9875'.split()\n        self._sap_server = subprocess.Popen(sap_cmd,\n                                            stdout=subprocess.DEVNULL,\n                                            stderr=subprocess.STDOUT)\n        service.log(f'sap server started')\n        if not pa_rtp_port:\n            with socket.socket() as s:\n                s.bind((pa_rtp_address, 0))\n                pa_rtp_port = s.getsockname()[1]\n        modules = [\n            [\n                f'module-null-sink',\n                f'sink_name={pa_rtp_device}',\n            ],\n            [\n                f'module-rtp-send',\n                f'destination_ip={pa_rtp_address}',\n                f'inhibit_auto_suspend=always',\n                f'port={pa_rtp_port}',\n                f'source={pa_rtp_device}.monitor',\n            ],\n        ]\n        self._modules = [self._pactl('load-module', *m) for m in modules]\n        self._sink_name = f'{pa_rtp_device}'\n        self.stop_sink()\n        service.log(f'pulseaudio modules loaded: {self._modules}')\n        super().__init__(**kwargs)\n        self.command += [\n            '--backend', 'pulseaudio',\n            '--device', f'{pa_rtp_device}',\n        ]\n        self.file = f'rtp://{pa_rtp_address}:{pa_rtp_port}'\n\n    def start_sink(self):\n        self._pactl('suspend-sink', self._sink_name, '0')\n\n    def stop_sink(self):\n        self._pactl('suspend-sink', self._sink_name, '1')\n\n    def _pactl(self, command, *args):\n        out = subprocess.run(['pactl', command, *args],\n                             stdout=subprocess.PIPE,\n                             text=True\n                             ).stdout.rstrip()\n        service.log(f'pactl {command} {args}: {out}')\n        return out\n\n    def __exit__(self, *args):\n        super().__exit__(*args)\n        for module in reversed(self._modules):\n            if module:\n                self._pactl('unload-module', module)\n        service.log('pulseaudio backend stopped')\n        if self._sap_server.poll() is None:\n            self._sap_server.terminate()\n            self._sap_server.wait()\n        service.log('sap server stopped')\n"
  },
  {
    "path": "packages/addons/service/librespot/source/resources/lib/player.py",
    "content": "import threading\nimport xbmc\n\nimport onevent\nimport service\n\n\nclass Player(xbmc.Player):\n\n    def __init__(self, dnd_kodi='false', librespot=None, **kwargs):\n        super().__init__()\n        self._dnd_kodi = (dnd_kodi == 'true')\n        self._thread = threading.Thread(daemon=True, target=self._run)\n        self._thread.start()\n        self.last_file = None\n        self.librespot = librespot\n        if not (self._dnd_kodi and self.isPlaying()):\n            self.librespot.start()\n\n    def onAVStarted(self):\n        file = self.getPlayingFile()\n        if file != self.librespot.file:\n            if self._dnd_kodi:\n                self.librespot.stop()\n            elif self.last_file == self.librespot.file:\n                self.librespot.restart()\n        self.last_file = file\n\n    def onLibrespotStopped(self):\n        pass\n\n    def onLibrespotTrackChanged(self, album='', art='', artist='', title=''):\n        pass\n\n    def onPlayBackEnded(self):\n        if self.last_file == self.librespot.file:\n            self.librespot.restart()\n        else:\n            self.librespot.start()\n        self.last_file = None\n\n    def onPlayBackError(self):\n        self.onPlayBackEnded()\n\n    def onPlayBackStopped(self):\n        self.onPlayBackEnded()\n\n    # fixes unexpected behaviour of Player.stop()\n    def stop(self):\n        xbmc.executebuiltin('PlayerControl(Stop)')\n\n    def _run(self):\n        service.log('onevent dispatcher started')\n        for event in onevent.receive_event():\n            try:\n                player_event = event.pop(onevent.KEY_PLAYER_EVENT)\n                if player_event == onevent.PLAYER_EVENT_STOPPED:\n                    self.onLibrespotStopped()\n                elif player_event == onevent.PLAYER_EVENT_TRACK_CHANGED:\n                    self.onLibrespotTrackChanged(**event)\n            except Exception as e:\n                service.log(e, True)\n        service.log('onevent dispatcher stopped')\n\n    def __enter__(self):\n        return self\n\n    def __exit__(self, *args):\n        onevent.send_event({})\n        self._thread.join()\n        self.onLibrespotStopped()\n"
  },
  {
    "path": "packages/addons/service/librespot/source/resources/lib/service.py",
    "content": "import PIL.Image\nimport urllib.request\nimport tempfile\nimport os\nimport xbmc\nimport xbmcaddon\nimport xbmcgui\n\n_ADDON = xbmcaddon.Addon()\n_ICON = _ADDON.getAddonInfo('icon')\n_NAME = _ADDON.getAddonInfo('name')\n_DIALOG = xbmcgui.Dialog()\n\n\ndef log(message, show=False):\n    xbmc.log(f'{_NAME}: {message}', xbmc.LOGINFO if show else xbmc.LOGDEBUG)\n\n\ndef notification(message='', sound=False, heading=_NAME, icon=_ICON, time=5000):\n    _DIALOG.notification(heading, message, icon, time, sound)\n\n\n_FANART_DIR = os.path.join(tempfile.gettempdir(), 'librespot.fanart')\n\n\ndef get_fanart(url, max_fanarts):\n    name = os.path.basename(url)\n    target = os.path.join(_FANART_DIR, f'{name}_16x9')\n    if not os.path.exists(target):\n        if not os.path.exists(_FANART_DIR):\n            os.makedirs(_FANART_DIR)\n        files = os.listdir(_FANART_DIR)\n        files = [os.path.join(_FANART_DIR, file) for file in files if os.path.isfile(\n            os.path.join(_FANART_DIR, file))]\n        files.sort(key=os.path.getmtime)\n        for file in files[:-max_fanarts]:\n            os.remove(file)\n        source = os.path.join(_FANART_DIR, f'{name}_9x9')\n        urllib.request.urlretrieve(url, source)\n        image = PIL.Image.open(source)\n        width, height = image.size\n        new_width = int(height * 16 / 9)\n        delta_w = new_width - width\n        new_image = PIL.Image.new('RGB', (new_width, height), (0, 0, 0))\n        new_image.paste(image, (delta_w // 2, 0))\n        new_image.save(target, 'JPEG', optimize=True)\n        os.remove(source)\n    return target\n\n\n_SETTINGS = {\n    'alsa_device': 'hw:2,0',\n    'backend': 'pulseaudio_rtp',\n    'dnd_kodi': 'false',\n    'name': f'{_NAME}@{{}}',\n    'options': '',\n}\n\n\ndef _get_setting(setting, default):\n    value = _ADDON.getSetting(setting)\n    return value if value else default\n\n\ndef _get_librespot():\n    while True:\n        settings = {k: _get_setting(k, v) for k, v in _SETTINGS.items()}\n        backend = settings.pop('backend')\n        librespot_class = __import__(f'librespot_{backend}').Librespot\n        with librespot_class(**settings) as librespot:\n            with librespot.get_player(librespot=librespot, **settings) as player:\n                yield\n\n\nclass Monitor(xbmc.Monitor):\n\n    def __init__(self):\n        self._get_librespot = _get_librespot()\n        self.onSettingsChanged()\n\n    def onSettingsChanged(self):\n        log('settings changed')\n        next(self._get_librespot)\n\n    def run(self):\n        self.waitForAbort()\n        log('abort requested')\n        self._get_librespot.close()\n"
  },
  {
    "path": "packages/addons/service/librespot/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n  <category  label=\"30100\">\n    <setting label=\"30101\" id=\"name\"        type=\"text\"   default=\"Librespot@{}\"       />\n    <setting label=\"30102\" id=\"dnd_kodi\"    type=\"bool\"   default=\"false\"              />\n    <setting label=\"30103\" id=\"options\"     type=\"text\"   default=\"\"                   />\n    <setting label=\"30104\" id=\"backend\"     type=\"select\" values=\"pulseaudio_rtp|alsa\" />\n    <setting label=\"30105\" id=\"alsa_device\" type=\"text\"   default=\"hw:2,0\"             subsetting=\"true\" visible=\"eq(-1,1)\" />\n  </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/locale/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/locale/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"locale\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_DEPENDS_TARGET=\"toolchain glibc\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Locale: allows users to set a custom locale to override the POSIX default\"\nPKG_LONGDESC=\"Locale (${PKG_REV}) allows users to set a custom locale in the OS to override the POSIX default\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Locale\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\naddon() {\n  mkdir -p \"${ADDON_BUILD}/${PKG_ADDON_ID}/bin\"\n  cp -PR \"$(get_install_dir glibc)/.noinstall/localedef\" \\\n         \"${ADDON_BUILD}/${PKG_ADDON_ID}/bin\"\n\n  mkdir -p \"${ADDON_BUILD}/${PKG_ADDON_ID}/i18n\"\n  cp -PR \"$(get_install_dir glibc)/.noinstall/charmaps\" \\\n         \"$(get_install_dir glibc)/.noinstall/locales\" \\\n         \"${ADDON_BUILD}/${PKG_ADDON_ID}/i18n\"\n\n  mkdir -p \"${ADDON_BUILD}/${PKG_ADDON_ID}/locpath\"\n\n  cp -PR ${PKG_DIR}/resources ${ADDON_BUILD}/${PKG_ADDON_ID}\n\n  locales=\"\"\n  for p in \"${ADDON_BUILD}/${PKG_ADDON_ID}/i18n/locales\"/*; do\n    l=\"$(basename ${p})\"\n    if [ \"${l}\" = \"POSIX\" ]; then\n      continue\n    fi\n    locales+=\"$(echo -e '\\\\\\n              <option>'\"${l}\"'</option>')\"\n  done\n\n  sed -e \"s|@LOCALES@|${locales}|\" \\\n      -i ${ADDON_BUILD}/${PKG_ADDON_ID}/resources/settings.xml\n}\n"
  },
  {
    "path": "packages/addons/service/locale/resources/settings.xml",
    "content": "<?xml version=\"1.0\" ?>\n<settings version=\"1\">\n  <section id=\"service.locale\">\n    <category id=\"configuration\" label=\"30000\" help=\"\">\n      <group id=\"1\">\n        <setting id=\"charmap\" type=\"string\" label=\"30001\" help=\"\">\n          <level>0</level>\n          <default>UTF-8</default>\n          <constraints>\n            <options>\n              <option>UTF-8</option>\n            </options>\n          </constraints>\n          <dependencies>\n            <dependency type=\"enable\">\n              <condition on=\"property\" name=\"InfoBool\">false</condition>\n            </dependency>\n          </dependencies>\n          <control type=\"list\" format=\"string\">\n            <heading>30001</heading>\n          </control>\n        </setting>\n        <setting id=\"locale\" type=\"string\" label=\"30002\" help=\"\">\n          <level>0</level>\n          <default>en_GB</default>\n          <constraints>\n            <options>@LOCALES@\n            </options>\n          </constraints>\n          <control type=\"list\" format=\"string\">\n            <heading>30002</heading>\n          </control>\n        </setting>\n      </group>\n    </category>\n  </section>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/locale/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nimport os\nimport subprocess\nimport xbmc\nimport xbmcaddon\nimport xbmcgui\n\n\nclass Monitor(xbmc.Monitor):\n\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.setLocale()\n\n   def onSettingsChanged(self):\n      self.setLocale()\n\n   def setLocale(self):\n      addon = xbmcaddon.Addon()\n\n      charmap = addon.getSetting('charmap')\n      locale = addon.getSetting('locale')\n      lang = locale + '.' + charmap\n\n      path = addon.getAddonInfo('path')\n      i18npath = os.path.join(path, 'i18n')\n      locpath = os.path.join(path, 'locpath')\n      localepath = os.path.join(locpath, lang)\n      profiled = os.path.join(path, 'profile.d')\n      profile = os.path.join(profiled, '10-locale.profile')\n\n      strings = addon.getLocalizedString\n\n      if os.path.isdir(locpath) == False:\n         os.makedirs(locpath)\n\n      if os.path.isdir(localepath) == False:\n         os.environ['I18NPATH'] = i18npath\n         rc = subprocess.run([os.path.join(path, 'bin/localedef'), '-v', '-f', charmap,\n                              '-i', locale, localepath], capture_output=True,\n                             stdin=subprocess.DEVNULL)\n\n         if rc.returncode not in [0, 1]:\n            xbmc.log(repr(rc), xbmc.LOGERROR)\n            try:\n               os.rmdir(localepath)\n            except OSError as e:\n               pass\n            if os.path.isfile(profile):\n               os.unlink(profile)\n            xbmcgui.Dialog().ok('Locale', strings(30004).format(lang))\n            return\n\n      if os.path.isdir(profiled) == False:\n         os.makedirs(profiled)\n\n      file = open(profile, 'w')\n      file.write('export LANG=\"' + lang + '\"\\n')\n      file.write('export LOCPATH=\"' + locpath + '\"\\n')\n      file.close()\n\n      current = os.environ.get('LANG', '')\n      if lang != current:\n         if xbmcgui.Dialog().yesno('Locale', strings(30003).format(lang)\n                                  ) == True:\n            xbmc.restart()\n\n\nif __name__ == '__main__':\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/locale/source/resources/language/resource.language.en_gb/strings.po",
    "content": "# Kodi Media Center language file\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Charmap\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"Locale\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"Locale changed to {}. Please reboot to apply globally.\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"Creating locale {} failed. Aborting.\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/locale/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"charmap\" default=\"true\">UTF-8</setting>\n    <setting id=\"locale\" default=\"true>en_GB</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/mariadb/changelog.txt",
    "content": "2\n- mariadb: update to 10.11.5\n\n1\n- include mariadb-upgrade and mariadb-check\n  copy mariadb* binaries and make symbolic links to mysql*\n"
  },
  {
    "path": "packages/addons/service/mariadb/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mariadb\"\nPKG_VERSION=\"10.11.5\"\nPKG_REV=\"2\"\nPKG_SHA256=\"4c9484048d4d0c71dd076ab33fc2a9ce8510bdf762886de0d63fe52496f3dbbb\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"https://mariadb.org\"\nPKG_URL=\"https://downloads.mariadb.com/MariaDB/${PKG_NAME}-${PKG_VERSION}/source/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host ncurses:host openssl:host\"\nPKG_DEPENDS_TARGET=\"toolchain binutils boost bzip2 libaio libfmt libxml2 lz4 lzo ncurses openssl pcre2 systemd zlib mariadb:host\"\nPKG_SHORTDESC=\"MariaDB is a community-developed fork of the MySQL.\"\nPKG_LONGDESC=\"MariaDB (${PKG_VERSION}) is a fast SQL database server and a drop-in replacement for MySQL.\"\nPKG_TOOLCHAIN=\"cmake\"\nPKG_BUILD_FLAGS=\"-gold -sysroot\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_SECTION=\"service\"\nPKG_ADDON_NAME=\"MariaDB SQL database server\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nconfigure_package() {\n  PKG_CMAKE_OPTS_HOST=\" \\\n    -DCMAKE_INSTALL_MESSAGE=NEVER \\\n    -DSTACK_DIRECTION=-1 \\\n    -DHAVE_IB_GCC_ATOMIC_BUILTINS=1 \\\n    -DCMAKE_CROSSCOMPILING=OFF\"\n\n  PKG_CMAKE_OPTS_TARGET=\" \\\n    -DCMAKE_INSTALL_MESSAGE=NEVER \\\n    -DCMAKE_BUILD_TYPE=Release \\\n    -DBUILD_CONFIG=mysql_release \\\n    -DFEATURE_SET=classic \\\n    -DSTACK_DIRECTION=1 \\\n    -DDISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING=ON \\\n    -DCMAKE_CROSSCOMPILING=ON \\\n    -DIMPORT_EXECUTABLES=${PKG_BUILD}/.${HOST_NAME}/import_executables.cmake \\\n    -DWITHOUT_AWS_KEY_MANAGEMENT=ON \\\n    -DWITH_EXTRA_CHARSETS=complex \\\n    -DWITH_SSL=system \\\n    -DWITH_SSL=${SYSROOT_PREFIX}/usr \\\n    -DWITH_JEMALLOC=OFF \\\n    -DWITHOUT_TOKUDB=1 \\\n    -DWITH_PCRE=system \\\n    -DWITH_ZLIB=bundled \\\n    -DWITH_EDITLINE=bundled \\\n    -DWITH_LIBEVENT=bundled \\\n    -DCONNECT_WITH_LIBXML2=bundled \\\n    -DSKIP_TESTS=ON \\\n    -DWITH_DEBUG=OFF \\\n    -DWITH_UNIT_TESTS=OFF \\\n    -DENABLE_DTRACE=OFF \\\n    -DSECURITY_HARDENED=OFF \\\n    -DWITH_EMBEDDED_SERVER=OFF \\\n    -DWITHOUT_SERVER=OFF \\\n    -DPLUGIN_AUTH_SOCKET=STATIC \\\n    -DDISABLE_SHARED=NO \\\n    -DENABLED_PROFILING=OFF \\\n    -DENABLE_STATIC_LIBS=OFF \\\n    -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \\\n    -DWITH_SAFEMALLOC=OFF \\\n    -DWITHOUT_AUTH_EXAMPLES=ON \\\n    -DLSTAT_FOLLOWS_SLASHED_SYMLINK_EXITCODE=0 \\\n    -DLSTAT_FOLLOWS_SLASHED_SYMLINK_EXITCODE__TRYRUN_OUTPUT='' \\\n    -DMASK_LONGDOUBLE_EXITCODE=0 \\\n    -DMASK_LONGDOUBLE_EXITCODE__TRYRUN_OUTPUT='' \\\n    -DSTAT_EMPTY_STRING_BUG_EXITCODE=0 \\\n    -DSTAT_EMPTY_STRING_BUG_EXITCODE__TRYRUN_OUTPUT=''\"\n}\n\nmake_host() {\n  ninja ${NINJA_OPTS} import_executables\n}\n\nmakeinstall_host() {\n  cp -a strings/uca-dump ${TOOLCHAIN}/bin\n}\n\npost_makeinstall_target() {\n  rm -rf \"${PKG_INSTALL}/usr/mysql-test\"\n}\n\naddon() {\n  local ADDON=\"${ADDON_BUILD}/${PKG_ADDON_ID}\"\n  local MARIADB=\"${PKG_INSTALL}/usr\"\n\n  mkdir -p ${ADDON}/bin\n  mkdir -p ${ADDON}/config\n\n  cp ${MARIADB}/bin/mariadbd \\\n     ${MARIADB}/bin/mariadb \\\n     ${MARIADB}/bin/mariadb-admin \\\n     ${MARIADB}/bin/mariadb-check \\\n     ${MARIADB}/bin/mariadb-dump \\\n     ${MARIADB}/bin/mariadb-secure-installation \\\n     ${MARIADB}/bin/mariadb-upgrade \\\n     ${MARIADB}/bin/my_print_defaults \\\n     ${MARIADB}/bin/resolveip \\\n     ${MARIADB}/scripts/mariadb-install-db \\\n     ${ADDON}/bin\n\n  cp -PR ${MARIADB}/share ${ADDON}\n}\n"
  },
  {
    "path": "packages/addons/service/mariadb/patches/mariadb-0001-disable-plugin-auth-pam.patch",
    "content": "From 92ed8269f929df9d6203ae52340fca0367f537a9 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Mon, 25 Nov 2019 23:54:22 +0000\nSubject: [PATCH] disable PLUGIN_AUTH_PAM as we aren't able to build it\n\n---\n cmake/build_configurations/mysql_release.cmake | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake\nindex 37a6c45..e2a4ba8 100644\n--- a/cmake/build_configurations/mysql_release.cmake\n+++ b/cmake/build_configurations/mysql_release.cmake\n@@ -147,7 +147,7 @@ ENDIF()\n \n IF(UNIX)\n   SET(WITH_EXTRA_CHARSETS all CACHE STRING \"\")\n-  SET(PLUGIN_AUTH_PAM YES CACHE BOOL \"\")\n+  SET(PLUGIN_AUTH_PAM NO CACHE BOOL \"\")\n \n   IF(CMAKE_SYSTEM_NAME STREQUAL \"Linux\")\n     FIND_PACKAGE(URING)\n-- \n2.7.4\n\n"
  },
  {
    "path": "packages/addons/service/mariadb/source/bin/mariadb.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n_create_bin_link() {\n  [ ! -L ${ADDON_DIR}/bin/${2} ] && ln -sfn ${1} ${ADDON_DIR}/bin/${2}\n}\n\n. /etc/profile\noe_setup_addon service.mariadb\n\n# create dir for socket and pid\nmkdir -p /run/mysqld\n\n# exit if already running\nPID=$(ps aux | awk '/\\/bin\\/mariadbd/ {print $1; exit 0}')\nif [ -n \"${PID}\" ]; then\n  echo \"MariaDB server is already running\"\n  exit 0\nfi\n\n# create symbolic links\n_create_bin_link mariadb                     mysql\n_create_bin_link mariadb-admin               mysqladmin\n_create_bin_link mariadb-dump                mysqldump\n_create_bin_link mariadb-secure-installation mysql_secure_installation\n_create_bin_link mariadb-upgrade             mysql_upgrade\n_create_bin_link mariadb-install-db          mysql_install_db\n\n# copy config file\nif [ ! -f ${ADDON_HOME}/my.cnf ]; then\n  cp ${ADDON_DIR}/config/my.cnf ${ADDON_HOME}\nfi\n\n# install database\nif [ ! -d \"${ADDON_HOME}/data/mysql\" ]; then\n  mkdir -p ${ADDON_HOME}/data\n  echo \"Installing database\"\n  ${ADDON_DIR}/bin/mariadb-install-db --basedir=${ADDON_DIR} --datadir=${ADDON_HOME}/data\nfi\n\n# check for first run and generate passwords\nif grep -q \"@MYSQL_ROOT_PASS@\" ${ADDON_HOME}/settings.xml; then\n  MYSQL_ROOT_PASS=\"$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8)\"\n  MYSQL_KODI_PASS=\"$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8)\"\n\n  sed -e \"s|@MYSQL_ROOT_PASS@|${MYSQL_ROOT_PASS}|g\" \\\n      -e \"s|@MYSQL_KODI_PASS@|${MYSQL_KODI_PASS}|g\" \\\n      -i ${ADDON_HOME}/settings.xml\nfi\n\n# init script to create user kodi and change passwords\ninit_file=\"\"\nif [[ ! -f ${ADDON_HOME}/set_mysql_passwords.sql ]] || [[ ${ADDON_HOME}/settings.xml -nt ${ADDON_HOME}/set_mysql_passwords.sql ]]; then\n  cat << SQL_DATA > ${ADDON_HOME}/set_mysql_passwords.sql\nSET PASSWORD FOR 'root'@'localhost'=PASSWORD('${MYSQL_ROOT_PASS}');\nCREATE USER IF NOT EXISTS 'kodi';\nCREATE USER IF NOT EXISTS 'kodi'@'localhost';\nSET PASSWORD FOR 'kodi'=PASSWORD('${MYSQL_KODI_PASS}');\nSET PASSWORD FOR 'kodi'@'localhost'=PASSWORD('${MYSQL_KODI_PASS}');\nGRANT ALL ON *.* TO 'kodi';\nGRANT ALL ON *.* TO 'kodi'@'localhost';\nflush privileges;\nSQL_DATA\n\n  init_file=\"--init-file=${ADDON_HOME}/set_mysql_passwords.sql\"\nfi\n\necho \"Starting mariadbd\"\nMYSQL_HOME=\"${ADDON_HOME}\" exec ${ADDON_DIR}/bin/mariadbd ${init_file} &\n"
  },
  {
    "path": "packages/addons/service/mariadb/source/bin/mariadb.stop",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nkill $(cat /run/mysqld/mysqld.pid)\n"
  },
  {
    "path": "packages/addons/service/mariadb/source/config/my.cnf",
    "content": "# MariaDB database server configuration file.\n#\n# You can copy this file to one of:\n# - \"/etc/mysql/my.cnf\" to set global options,\n# - \"~/.my.cnf\" to set user-specific options.\n#\n# One can use all long options that the program supports.\n# Run program with --help to get a list of available options and with\n# --print-defaults to see which it would actually understand and use.\n#\n# For explanations see\n# http://dev.mysql.com/doc/mysql/en/server-system-variables.html\n\n# This will be passed to all mysql clients\n# It has been reported that passwords should be enclosed with ticks/quotes\n# escpecially if they contain \"#\" chars...\n# Remember to edit /etc/mysql/debian.cnf when changing the socket location.\n[client]\nport\t\t= 3306\nsocket\t= /run/mysqld/mysqld.sock\n\n# Here is entries for some specific programs\n# The following values assume you have at least 32M ram\n\n# This was formally known as [safe_mysqld]. Both versions are currently parsed.\n[mysqld_safe]\nsocket\t= /run/mysqld/mysqld.sock\nnice\t\t= 0\n\n[mysqld]\n#\n# * Basic Settings\n#\nuser\t\t  = root\npid-file\t= /run/mysqld/mysqld.pid\nsocket\t\t= /run/mysqld/mysqld.sock\nport\t\t  = 3306\nbasedir   = /storage/.kodi/addons/service.mariadb\ndatadir   = /storage/.kodi/userdata/addon_data/service.mariadb/data\nlog-error = /storage/.kodi/userdata/addon_data/service.mariadb/mysqld.log\ntmpdir\t\t= /tmp\n#lc_messages_dir\t= /usr/share/mysql\nlc_messages\t= en_US\nskip-external-locking\n# Kodi needs more for library (256K should probably be enough)\n#thread_stack = 128K\nthread_stack = 384K\n#\n# Instead of skip-networking the default is now to listen only on\n# localhost which is more compatible and is not less secure.\n#bind-address\t\t= 127.0.0.1\n#\n# * Fine Tuning\n#\nmax_connections\t\t= 100\nconnect_timeout\t\t= 5\nwait_timeout\t\t\t= 600\nmax_allowed_packet\t= 16M\nthread_cache_size   = 128\nsort_buffer_size\t= 4M\nbulk_insert_buffer_size\t= 16M\ntmp_table_size\t\t= 32M\nmax_heap_table_size\t= 32M\n#\n# * MyISAM\n#\n# This replaces the startup script and checks MyISAM tables if needed\n# the first time they are touched. On error, make copy and try a repair.\nmyisam_recover_options = BACKUP\nkey_buffer_size\t\t= 128M\n#open-files-limit\t= 2000\n#table_open_cache\t= 400\ntable_open_cache\t= 1000\nmyisam_sort_buffer_size\t= 512M\nconcurrent_insert\t= 2\nread_buffer_size\t= 2M\nread_rnd_buffer_size\t= 1M\n#\n# * Query Cache Configuration\n#\n# Cache only tiny result sets, so we can fit more in the query cache.\nquery_cache_limit\t\t= 128K\nquery_cache_size\t\t= 64M\n# for more write intensive setups, set to DEMAND or OFF\n#query_cache_type\t\t= DEMAND\n#\n# * Logging and Replication\n#\n# Both location gets rotated by the cronjob.\n# Be aware that this log type is a performance killer.\n# As of 5.1 you can enable the log at runtime!\n#general_log_file        = /storage/.kodi/userdata/addon_data/service.mariadb/mysql.log\n#general_log             = 1\n#\n# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.\n#\n# we do want to know about network errors and such\nlog_warnings\t\t= 2\n#\n# Enable the slow query log to see queries with especially long duration\n#slow_query_log[={0|1}]\nslow_query_log_file\t= /storage/.kodi/userdata/addon_data/mariadb-slow.log\nlong_query_time = 10\n#log_slow_rate_limit\t= 1000\nlog_slow_verbosity\t= query_plan\n\n#log-queries-not-using-indexes\n#log_slow_admin_statements\n#\n# The following can be used as easy to replay backup logs or for replication.\n# note: if you are setting up a replication slave, see README.Debian about\n#       other settings you may need to change.\n#server-id\t\t= 1\n#report_host\t\t= master1\n#auto_increment_increment = 2\n#auto_increment_offset\t= 1\n# disable binary log\n#log_bin\t\t= /storage/.kodi/userdata/addon_data/service.mariadb/mariadb-bin\n#log_bin_index\t\t= /storage/.kodi/userdata/addon_data/service.mariadb/mariadb-bin.index\n# not fab for performance, but safer\n#sync_binlog\t\t= 1\nexpire_logs_days\t= 10\nmax_binlog_size         = 100M\n# slaves\n#relay_log\t\t= /storage/.kodi/userdata/addon_data/service.mariadb/relay-bin\n#relay_log_index\t= /storage/.kodi/userdata/addon_data/service.mariadb/relay-bin.index\n#relay_log_info_file\t= /storage/.kodi/userdata/addon_data/service.mariadb/relay-bin.info\n#log_slave_updates\n#read_only\n#\n# If applications support it, this stricter sql_mode prevents some\n# mistakes like inserting invalid dates etc.\n#sql_mode\t\t= NO_ENGINE_SUBSTITUTION,TRADITIONAL\n#\n# * InnoDB\n#\n# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.\n# Read the manual for more InnoDB related options. There are many!\ndefault_storage_engine\t= InnoDB\n# you can't just change log file size, requires special procedure\n#innodb_log_file_size\t= 50M\n\n# optimizations https://forum.kodi.tv/showthread.php?tid=329046&pid=2708799 #pid2708799\n#               https://discourse.coreelec.org/t/kodi-and-mariadb-part-2/513\n#  innodb_buffer_pool_size=2G  # MariaDB recommends using 80% of your available memory but the default 1G might be enough. Always set to multiples of 1G.\n#  innodb_buffer_pool_instances=2  # When innodb_buffer_pool_size is > 1G, MariaDB will split the pool in instances. They should be even dividers of 1G.\n#  innodb_file_format=Barracuda  # Gone in 10.3 / This is an optimized storage engine not available in MySQL\n#  innodb_log_block_size=4096  # Gone in 10.3 / Default is 512, when using an SSD or 4k drives, block size should be 4096\n#  innodb_adaptive_hash_index=OFF  # For Kodi no benefit is gained from additional indexes. This should only be used with large databases.\n#  character-set-server=utf8  # I really hope you all used this in MySQL already.  This avoids potential pitfalls with text in exotic codepages.\n#  key-buffer-size=64k  # When not using MyISAM as storage engine, this buffer can be reduced to a minimum\n#  skip-name-resolve  # Avoids name resolving in the local network, thus reducing overhead. That also means that all connections are done by IP only.\n#  optimizer_search_depth=1  # Here we are, this is winner of the year.\n\ninnodb_buffer_pool_size\t= 256M\ninnodb_log_buffer_size\t= 8M\ninnodb_file_per_table\t= 1\ninnodb_open_files\t= 400\ninnodb_io_capacity\t= 400\ninnodb_flush_method\t= O_DIRECT\ncharacter-set-server=utf8    # This avoids potential pitfalls with text in exotic codepages.\n#skip-name-resolve            # Avoids name resolving in the local network, thus reducing overhead. That also means that all connections are done by IP only.\n# well, not really according to use cases :(\n#optimizer_search_depth=0     # Here we are, this is winner of the year.\n\n#\n# * Security Features\n#\n# Read the manual, too, if you want chroot!\n# chroot = /var/lib/mysql/\n#\n# For generating SSL certificates I recommend the OpenSSL GUI \"tinyca\".\n#\n# ssl-ca=/etc/mysql/cacert.pem\n# ssl-cert=/etc/mysql/server-cert.pem\n# ssl-key=/etc/mysql/server-key.pem\n\n#\n# * Galera-related settings\n#\n[galera]\n# Mandatory settings\n#wsrep_on=ON\n#wsrep_provider=\n#wsrep_cluster_address=\n#binlog_format=row\n#default_storage_engine=InnoDB\n#innodb_autoinc_lock_mode=2\n#\n# Allow server to accept connections on all interfaces.\n#\n#bind-address=0.0.0.0\n#\n# Optional setting\n#wsrep_slave_threads=1\n#innodb_flush_log_at_trx_commit=0\n\n[mysqldump]\nquick\nquote-names\nmax_allowed_packet\t= 16M\n\n[mysql]\n#no-auto-rehash\t# faster start of mysql but no tab completion\n\n[isamchk]\nkey_buffer\t\t= 16M\n"
  },
  {
    "path": "packages/addons/service/mariadb/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\nclass Monitor(xbmc.Monitor):\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\nif __name__ == \"__main__\":\n   Monitor().waitForAbort()\n\n"
  },
  {
    "path": "packages/addons/service/mariadb/source/profile.d/99-mysql-histfile.profile",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nexport MYSQL_HISTFILE=/storage/.kodi/userdata/addon_data/service.mariadb/mysql_history\n"
  },
  {
    "path": "packages/addons/service/mariadb/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: mariadb\n# Addon id: service.mariadb\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Accounts\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Passwords\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"root\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"kodi\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/mariadb/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n  <category label=\"30000\">\n    <setting label=\"30001\" type=\"lsep\"/>\n    <setting label=\"30002\" id=\"MYSQL_ROOT_PASS\" type=\"text\" default=\"\" />\n    <setting label=\"30003\" id=\"MYSQL_KODI_PASS\" type=\"text\" default=\"\" />\n  </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/mariadb/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"MYSQL_ROOT_PASS\" default=\"\">@MYSQL_ROOT_PASS@</setting>\n    <setting id=\"MYSQL_KODI_PASS\" default=\"\">@MYSQL_KODI_PASS@</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/mariadb/source/system.d/service.mariadb.service",
    "content": "[Unit]\nDescription=MariaDB server\nAfter=graphical.target network-online.service\nBefore=kodi.service\n\n[Service]\nType=forking\nPIDFile=/run/mysqld/mysqld.pid\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.mariadb/bin/mariadb.start\"\nExecStop=/bin/sh -c \"exec sh /storage/.kodi/addons/service.mariadb/bin/mariadb.stop\"\nTimeoutStartSec=60\nTimeoutStopSec=60\nRestart=always\nRestartSec=10\nStartLimitInterval=0\n\n[Install]\nAlias=mariadb.service\nWantedBy=kodi.service\n"
  },
  {
    "path": "packages/addons/service/minidlna/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/minidlna/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"minidlna\"\nPKG_VERSION=\"1.3.2\"\nPKG_SHA256=\"222ce45a1a60c3ce3de17527955d38e5ff7a4592d61db39577e6bf88e0ae1cb0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"BSD-3c/GPLv2\"\nPKG_SITE=\"https://sourceforge.net/projects/minidlna/\"\nPKG_URL=\"https://downloads.sourceforge.net/project/minidlna/minidlna/${PKG_VERSION}/minidlna-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ffmpeg flac libexif libiconv libid3tag libjpeg-turbo libogg libvorbis sqlite\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"MiniDLNA (ReadyMedia): a fully compliant DLNA/UPnP-AV server\"\nPKG_LONGDESC=\"MiniDLNA (${PKG_VERSION_DATE}) (ReadyMedia) is a media server, with the aim of being fully compliant with DLNA/UPnP-AV clients.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"MiniDLNA (ReadyMedia)\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-static \\\n                           --disable-nls \\\n                           --without-libiconv-prefix \\\n                           --without-libintl-prefix \\\n                           --with-os-name=\"${DISTRONAME}\" \\\n                           --with-db-path=\"/storage/.kodi/userdata/addon_data/service.minidlna/db\" \\\n                           --with-os-url=\"https://libreelec.tv\"\"\n\npre_configure_target() {\n  export LDFLAGS=\"${LDFLAGS} -L$(get_install_dir ffmpeg)/usr/lib\"\n  export LIBS=\"${LIBS} -lid3tag -lFLAC -logg -lz -lpthread -ldl -lm\"\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp -P ${PKG_INSTALL}/usr/sbin/minidlnad ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n  cp -p $(get_install_dir libexif)/usr/lib/libexif.so.12 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n}\n"
  },
  {
    "path": "packages/addons/service/minidlna/patches/minidlna-01-fix-config.patch",
    "content": "disabling editing of the configfiles at buildtime\n--- a/Makefile.am\n+++ b/Makefile.am\n@@ -73,19 +73,6 @@ testupnpdescgen_LDADD = \\\n \t@LIBEXIF_LIBS@ \\\n \t-lFLAC $(flacogglibs) $(vorbislibs) $(avahilibs)\n \n-SUFFIXES = .tmpl .\n-\n-.tmpl:\n-\tsed -e s@:SBINDIR:@${sbindir}@ <$< >$@\n-\n-GENERATED_FILES = \\\n-\tlinux/minidlna.init.d.script\n-\n-TEMPLATES = \\\n-\tlinux/minidlna.init.d.script.tmpl\n-\n-CLEANFILES = $(GENERATED_FILES)\n-\n ACLOCAL_AMFLAGS = -I m4\n \n EXTRA_DIST = m4/ChangeLog $(TEMPLATES)\n"
  },
  {
    "path": "packages/addons/service/minidlna/source/bin/minidlna.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.minidlna\n\nif [ ! -f \"$ADDON_HOME/config/minidlna.conf\" ]; then\n  mkdir -p $ADDON_HOME/config\n  cp $ADDON_DIR/config/minidlna.conf $ADDON_HOME/config\nfi\n\nif [ ! -d \"$ADDON_HOME/db\" ]; then\n  mkdir -p $ADDON_HOME/db\nfi\n\nchmod a+x $ADDON_DIR/bin/*\n\nexec $ADDON_DIR/bin/minidlnad -S -f $ADDON_HOME/config/minidlna.conf -p $minidlna_port &>$ADDON_HOME/service.log\n"
  },
  {
    "path": "packages/addons/service/minidlna/source/config/minidlna.conf",
    "content": "# set this to the directory you want scanned\n# + \"A\" for audio  (eg. media_dir=A,/storage/music)\n# + \"V\" for video  (eg. media_dir=V,/storage/videos)\n# + \"P\" for images (eg. media_dir=P,/storage/pictures)\n# + \"PV\" for pictures and video (eg. media_dir=PV,/storage/digital_camera)\nmedia_dir=V,/storage/videos\nmedia_dir=V,/storage/tvshows\nmedia_dir=P,/storage/pictures\nmedia_dir=A,/storage/music\n\n# set this if you want to customize the name that shows up on your clients\nfriendly_name=DLNA Server\n\n# network interfaces to serve, comma delimited (8 interfaces max)\n#network_interface=eth0\n\n# set this to merge all media_dir base contents into the root container\n# note: the default is no\n#merge_media_dirs=no\n\n# set this to change the verbosity of the information that is logged\n# each section can use a different level: off, fatal, error, warn, info, or debug\n#log_level=general,artwork,database,inotify,scanner,metadata,http,ssdp,tivo=warn\n\n# this should be a list of file names to check for when searching for album art\n# note: names should be delimited with a forward slash (\"/\")\nalbum_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg\n\n# set this to no to disable inotify monitoring to automatically discover new files\n# note: the default is yes\ninotify=yes\n\n# set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO\nenable_tivo=no\n\n# set this to beacon to use legacy broadcast discovery method\n# defauts to bonjour if avahi is available\ntivo_discovery=bonjour\n\n# set this to strictly adhere to DLNA standards.\n# * This will allow server-side downscaling of very large JPEG images,\n#   which may hurt JPEG serving performance on (at least) Sony DLNA products.\nstrict_dlna=no\n\n# default presentation url is http address on port 80\n#presentation_url=http://www.mylan/index.php\n\n# notify interval in seconds. default is 895 seconds.\nnotify_interval=1800\n\n# serial and model number the daemon will report to clients\n# in its XML description\nserial=12345678\nmodel_number=1\n\n# use different container as root of the tree\n# possible values:\n#   + \".\" - use standard container (this is the default)\n#   + \"B\" - \"Browse Directory\"\n#   + \"M\" - \"Music\"\n#   + \"V\" - \"Video\"\n#   + \"P\" - \"Pictures\"\n#   + Or, you can specify the ObjectID of your desired root container (eg. 1$F for Music/Playlists)\n# if you specify \"B\" and client device is audio-only then \"Music/Folders\" will be used as root\n#root_container=.\n\n# always force SortCriteria to this value, regardless of the SortCriteria passed by the client\n# note: you can prepend the sort criteria with \"!\" to alter the titles of the objects so that they\n# will be alphanumerically sorted in the order you specify here, to work around clients that do their\n# own alphanumeric sorting.\n#force_sort_criteria=+upnp:class,+upnp:originalTrackNumber,+dc:title\n\n# maximum number of simultaneous connections\n# note: many clients open several simultaneous connections while streaming\n#max_connections=50\n\n# enable subtitle support by default on unknown clients.\n# note: the default is yes\n#enable_subtitles=yes\n"
  },
  {
    "path": "packages/addons/service/minidlna/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\n\nclass Monitor(xbmc.Monitor):\n\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == \"__main__\":\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/minidlna/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: minidlna\n# Addon id: service.minidlna\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Port\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/minidlna/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n   <category   label=\"30000\">\n      <setting label=\"30001\" id=\"minidlna_port\" type=\"number\" default=\"8200\" />\n    </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/minidlna/source/settings-default.xml",
    "content": "<settings>\n    <setting id=\"minidlna_port\" value=\"8200\" />\n</settings>\n"
  },
  {
    "path": "packages/addons/service/minidlna/source/sleep.d/minidlna.power",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.minidlna\n\nSERVICE=\"service.minidlna\"\n\nif [ \"$RESTART_ON_RESUME\" == \"true\" ] ; then\n  case \"$1\" in\n    pre)\n      if systemctl is-active \"$SERVICE\" &>/dev/null ; then\n        systemctl stop \"$SERVICE\"\n      fi\n      ;;\n    post)\n      if systemctl is-enabled \"$SERVICE\" &>/dev/null ; then\n        systemctl start \"$SERVICE\"\n      fi\n      ;;\n  esac\nfi\n"
  },
  {
    "path": "packages/addons/service/minidlna/source/system.d/service.minidlna.service",
    "content": "[Unit]\nDescription=minidlna\nAfter=graphical.target\n\n[Service]\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.minidlna/bin/minidlna.start\"\nTimeoutStopSec=1\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/minisatip/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/minisatip/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"minisatip\"\nPKG_VERSION=\"1.2.84\"\nPKG_SHA256=\"d5a06b0c371e1f5ccba6fcb3d76abf348e93e14ab4d7317bb701ae023c085e4b\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/catalinii/minisatip\"\nPKG_URL=\"https://github.com/catalinii/minisatip/archive/refs/tags/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libdvbcsa libxml2 openssl\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"minisatip: a Sat>IP streaming server for Linux\"\nPKG_LONGDESC=\"minisatip(${PKG_VERSION_NUMBER}): is a Sat>IP streaming server for Linux supporting DVB-C, DVB-S/S2, DVB-T/T2, ATSC and ISDB-T\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Minisatip\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-netcv \\\n                           --enable-dvbca \\\n                           --enable-dvbaes \\\n                           --enable-dvbcsa \\\n                           --with-xml2=$(get_install_dir libxml2)/usr/include/libxml2\"\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n    rm -rf .${TARGET_NAME}\n}\n\nmakeinstall_target() {\n  :\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P ${PKG_BUILD}/minisatip ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/webif\n    cp -PR ${PKG_BUILD}/html/* ${ADDON_BUILD}/${PKG_ADDON_ID}/webif\n}\n"
  },
  {
    "path": "packages/addons/service/minisatip/source/bin/minisatip.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.minisatip\n\nchmod a+x $ADDON_DIR/bin/*\n\n# wait for dvb card\nif [ \"$WAIT_FOR_FEINIT\" = \"true\" ]; then\n  while [ true ] ; do\n    if [ -e /dev/dvb/adapter$((NUM_ADAPTERS-1))/frontend0 ]; then\n      break\n    fi\n    sleep 1\n  done\nfi\n\n# sleep for x seconds\nif [ \"$WORKAROUND_SLEEP\" = \"true\" ]; then\n  sleep $WORKAROUND_SLEEP_TIME\nfi\n\n## options\n# simulate x adapters\nif [ \"$MINISATIP_TESTMODE\" = \"true\" ]; then\n  MINISATIP_ARG_TEST=\"-a 2:2:2\"\nfi\n\n# debug log\nif [ \"$MINISATIP_DEBUG\" = \"true\" ]; then\n  MINISATIP_ARG=\"-l http\"\nfi\n\n# RTSP over TCP instead UDP\nif [ \"$MINISATIP_SATIP_TCP\" = \"true\" ]; then\n  MINISATIP_ARG=\"$MINISATIP_ARG -O\"\nfi\n\n# clean the PSI from all CA information\nif [ \"$MINISATIP_CLEANPSI\" = \"true\" ]; then\n  MINISATIP_ARG=\"$MINISATIP_ARG -t\"\nfi\n\n# port for listening for rtsp requests\nif [ \"$MINISATIP_RTSP_PORT\" != \"554\" ]; then\n  MINISATIP_ARG=\"$MINISATIP_ARG -y $MINISATIP_RTSP_PORT\"\nfi\n\n# specify the hostname and port for the dvbapi server (oscam)\nif [ \"$MINISATIP_CLEANPSI\" = \"true\" ]; then\n  MINISATIP_ARG=\"$MINISATIP_ARG -o ${MINISATIP_DVBAPI_IP}:${MINISATIP_DVBAPI_PORT}\"\nfi\n\nif [ \"$MINISATIP_STARTUP\" = \"true\" ]; then\n  echo \"Minisatip was started with this settings: ${MINISATIP_STARTUP_ARGS}\" > $ADDON_LOG_FILE\n  exec $ADDON_DIR/bin/minisatip -f ${MINISATIP_ARG_TEST} -x ${MINISATIP_WEBPORT} -R /storage/.kodi/addons/service.minisatip/webif ${MINISATIP_STARTUP_ARGS} >> $ADDON_LOG_FILE\nelse\n  echo \"Minisatip was started with this settings: ${MINISATIP_ARG}\" > $ADDON_LOG_FILE\n  $ADDON_DIR/bin/minisatip -f ${MINISATIP_ARG_TEST} -x ${MINISATIP_WEBPORT} -R /storage/.kodi/addons/service.minisatip/webif ${MINISATIP_ARG} >> $ADDON_LOG_FILE\nfi\n"
  },
  {
    "path": "packages/addons/service/minisatip/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\nclass Monitor(xbmc.Monitor):\n\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\nif __name__ == \"__main__\":\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/minisatip/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: minisatip\n# Addon id: service.minisatip\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Hardware\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Wait for frontend initialization\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"Number of adapters to wait for\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"Unload DVB modules before suspend\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"Delay the start of Minisatip\"\nmsgstr \"\"\n\nmsgctxt \"#30005\"\nmsgid \"time (s)\"\nmsgstr \"\"\n\nmsgctxt \"#30006\"\nmsgid \"Minisatip\"\nmsgstr \"\"\n\nmsgctxt \"#30007\"\nmsgid \"Use RTSP over TCP for data transport\"\nmsgstr \"\"\n\nmsgctxt \"#30008\"\nmsgid \"Clean the PSI from all CA information\"\nmsgstr \"\"\n\nmsgctxt \"#30009\"\nmsgid \"Specify the hostname for the dvbapi server (OScam)\"\nmsgstr \"\"\n\nmsgctxt \"#30010\"\nmsgid \"Specify the port for the dvbapi server (OScam)\"\nmsgstr \"\"\n\nmsgctxt \"#30011\"\nmsgid \"Port for listening for RTSP requests\"\nmsgstr \"\"\n\nmsgctxt \"#30012\"\nmsgid \"Webui Port\"\nmsgstr \"\"\n\nmsgctxt \"#30013\"\nmsgid \"Debugging\"\nmsgstr \"\"\n\nmsgctxt \"#30014\"\nmsgid \"Debug Log\"\nmsgstr \"\"\n\nmsgctxt \"#30015\"\nmsgid \"Simulate DVB adapters\"\nmsgstr \"\"\n\nmsgctxt \"#30016\"\nmsgid \"Advanced Options\"\nmsgstr \"\"\n\nmsgctxt \"#30017\"\nmsgid \"Manually enter startup command-line\"\nmsgstr \"\"\n\nmsgctxt \"#30018\"\nmsgid \"Command-line\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/minisatip/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n  <category label=\"30000\">\n    <setting id=\"WAIT_FOR_FEINIT\" type=\"bool\" label=\"30001\" default=\"false\" />\n    <setting id=\"NUM_ADAPTERS\" type=\"slider\" range=\"1,16\" option=\"int\" label=\"30002\" default=\"1\" enable=\"eq(-1,true)\" />\n    <setting id=\"REMOVE_MODULES\" type=\"text\" label=\"30003\" values=\"\" default=\"\"/>\n    <setting id=\"WORKAROUND_SLEEP\" type=\"bool\" label=\"30004\" default=\"false\" />\n    <setting id=\"WORKAROUND_SLEEP_TIME\" type=\"slider\" range=\"1,30\" option=\"int\" label=\"30005\" default=\"1\" enable=\"eq(-1,true)\" />\n  </category>\n  <category label=\"30006\">\n    <setting id=\"MINISATIP_SATIP_TCP\" type=\"bool\" label=\"30007\" default=\"false\" />\n    <setting id=\"MINISATIP_CLEANPSI\" type=\"bool\" label=\"30008\" default=\"false\" />\n    <setting id=\"MINISATIP_DVBAPI_IP\" type=\"ipaddress\" label=\"30009\" default=\"127.0.0.1\" enable=\"eq(-1,true)\" />\n    <setting id=\"MINISATIP_DVBAPI_PORT\" type=\"text\" label=\"30010\" default=\"9000\" enable=\"eq(-2,true)\" />\n    <setting id=\"MINISATIP_RTSP_PORT\" type=\"text\" label=\"30011\" default=\"554\" />\n    <setting id=\"MINISATIP_WEBPORT\" type=\"text\" label=\"30012\" default=\"9999\" />\n  </category>\n  <category label=\"30013\">\n    <setting id=\"MINISATIP_DEBUG\" type=\"bool\" label=\"30014\" default=\"false\" />\n    <setting id=\"MINISATIP_TESTMODE\" type=\"bool\" label=\"30015\" default=\"false\" />\n  </category>\n  <category label=\"30016\">\n    <setting id=\"MINISATIP_STARTUP\" type=\"bool\" label=\"30017\" default=\"false\" />\n    <setting id=\"MINISATIP_STARTUP_ARGS\" type=\"text\" label=\"30018\" enable=\"eq(-1,true)\" />\n  </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/minisatip/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"MINISATIP_CLEANPSI\" default=\"true\">false</setting>\n    <setting id=\"MINISATIP_DEBUG\" default=\"true\">false</setting>\n    <setting id=\"MINISATIP_DVBAPI_IP\" default=\"true\">127.0.0.1</setting>\n    <setting id=\"MINISATIP_DVBAPI_PORT\" default=\"true\">9000</setting>\n    <setting id=\"MINISATIP_RTSP_PORT\" default=\"true\">554</setting>\n    <setting id=\"MINISATIP_SATIP_TCP\" default=\"true\">false</setting>\n    <setting id=\"MINISATIP_STARTUP\" default=\"true\">false</setting>\n    <setting id=\"MINISATIP_STARTUP_ARGS\" default=\"true\"></setting>\n    <setting id=\"MINISATIP_TESTMODE\" default=\"true\">false</setting>\n    <setting id=\"MINISATIP_WEBPORT\" default=\"true\">9999</setting>\n    <setting id=\"NUM_ADAPTERS\">1</setting>\n    <setting id=\"REMOVE_MODULES\" default=\"true\"></setting>\n    <setting id=\"WAIT_FOR_FEINIT\" default=\"true\">false</setting>\n    <setting id=\"WORKAROUND_SLEEP\" default=\"true\">false</setting>\n    <setting id=\"WORKAROUND_SLEEP_TIME\">1</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/minisatip/source/sleep.d/minisatip.power",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.minisatip\n\nSERVICE=\"service.minisatip\"\n\nif [ \"$RESTART_ON_RESUME\" == \"true\" ] ; then\n  case \"$1\" in\n    pre)\n      if systemctl is-active \"$SERVICE\" &>/dev/null ; then\n        systemctl stop \"$SERVICE\"\n      fi\n      ;;\n    post)\n      if systemctl is-enabled \"$SERVICE\" &>/dev/null ; then\n        systemctl start \"$SERVICE\"\n      fi\n      ;;\n  esac\nfi\n"
  },
  {
    "path": "packages/addons/service/minisatip/source/system.d/service.minisatip.service",
    "content": "[Unit]\nDescription=minisatip\nAfter=network-online.service\n\n[Service]\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.minisatip/bin/minisatip.start\"\nTimeoutStopSec=2\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/mpd/changelog.txt",
    "content": "1\n- mpd: update to 0.23.12\n"
  },
  {
    "path": "packages/addons/service/mpd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mpd\"\nPKG_VERSION=\"0.23.12\"\nPKG_SHA256=\"b7fca62284ecc25a681ea6a07abc49200af5353be42cb5a31e3173be9d8702e7\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.musicpd.org\"\nPKG_URL=\"http://www.musicpd.org/download/mpd/$(get_pkg_version_maj_min)/mpd-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib avahi boost curl faad2 ffmpeg flac glib lame libcdio libfmt \\\n                    libgcrypt libiconv libid3tag libmad libmpdclient libopenmpt libsamplerate \\\n                    libvorbis libnfs libogg mpd-mpc opus pulseaudio samba wavpack yajl\"\nPKG_SECTION=\"service.multimedia\"\nPKG_SHORTDESC=\"Music Player Daemon (MPD): a free and open Music Player Server\"\nPKG_LONGDESC=\"Music Player Daemon (${PKG_VERSION}) is a flexible and powerful server-side application for playing music\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Music Player Daemon (MPD)\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nPKG_MESON_OPTS_TARGET=\"-Dadplug=disabled \\\n                       -Dalsa=enabled \\\n                       -Dao=disabled \\\n                       -Daudiofile=disabled \\\n                       -Dbzip2=enabled \\\n                       -Dcdio_paranoia=disabled \\\n                       -Dchromaprint=disabled \\\n                       -Dcue=true \\\n                       -Dcurl=enabled \\\n                       -Ddatabase=true \\\n                       -Ddocumentation=disabled \\\n                       -Ddsd=true \\\n                       -Dexpat=enabled \\\n                       -Dfaad=enabled \\\n                       -Dffmpeg=enabled \\\n                       -Dfifo=true \\\n                       -Dflac=enabled \\\n                       -Dfluidsynth=disabled \\\n                       -Dfuzzer=false \\\n                       -Dgme=disabled \\\n                       -Dhttpd=true \\\n                       -Dhtml_manual=false \\\n                       -Diconv=disabled \\\n                       -Dicu=disabled \\\n                       -Did3tag=enabled \\\n                       -Dipv6=enabled \\\n                       -Diso9660=enabled \\\n                       -Djack=disabled \\\n                       -Dlame=enabled \\\n                       -Dlibmpdclient=enabled \\\n                       -Dlibsamplerate=enabled \\\n                       -Dlocal_socket=false \\\n                       -Dmad=enabled \\\n                       -Dmanpages=false \\\n                       -Dmikmod=disabled \\\n                       -Dmms=disabled \\\n                       -Dmodplug=disabled \\\n                       -Dmpcdec=disabled \\\n                       -Dmpg123=disabled \\\n                       -Dneighbor=false \\\n                       -Dnfs=enabled \\\n                       -Dopenal=disabled \\\n                       -Dopus=enabled \\\n                       -Doss=disabled \\\n                       -Dpipe=true \\\n                       -Dpulse=enabled \\\n                       -Dqobuz=enabled \\\n                       -Drecorder=false \\\n                       -Dshine=disabled \\\n                       -Dshout=disabled \\\n                       -Dsidplay=disabled \\\n                       -Dsmbclient=enabled \\\n                       -Dsndfile=enabled \\\n                       -Dsndio=disabled \\\n                       -Dsolaris_output=disabled \\\n                       -Dsoundcloud=enabled \\\n                       -Dsoxr=enabled \\\n                       -Dsqlite=enabled \\\n                       -Dsyslog=disabled \\\n                       -Dsystemd=disabled \\\n                       -Dtest=false \\\n                       -Dtwolame=disabled \\\n                       -Dupnp=disabled \\\n                       -Dvorbis=enabled \\\n                       -Dvorbisenc=enabled \\\n                       -Dwave_encoder=true \\\n                       -Dwavpack=enabled \\\n                       -Dwebdav=enabled \\\n                       -Dwildmidi=disabled \\\n                       -Dyajl=enabled \\\n                       -Dzeroconf=avahi \\\n                       -Dzlib=enabled \\\n                       -Dzzip=disabled\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp -P ${PKG_INSTALL}/usr/bin/mpd ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  # copy mpd cli binary\n  cp -P $(get_install_dir mpd-mpc)/usr/bin/mpc ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n  cp -p $(get_install_dir libmpdclient)/usr/lib/libmpdclient.so ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n  cp -p $(get_install_dir libmpdclient)/usr/lib/libmpdclient.so.2 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n}\n"
  },
  {
    "path": "packages/addons/service/mpd/source/bin/mpd.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.multimedia.mpd\n\nmkdir -p $ADDON_HOME/config\nmkdir -p $ADDON_HOME/log\nmkdir -p $ADDON_HOME/playlists\nmkdir -p $ADDON_HOME/music\ntouch $ADDON_HOME/log/mpd.log\ntouch $ADDON_HOME/mpd.db\ntouch $ADDON_HOME/state\n\nchmod a+x $ADDON_DIR/bin/*\n\nif [ ! -f \"$ADDON_HOME/config/mpd.conf\" ]; then\n  cp $ADDON_DIR/config/mpd.conf $ADDON_HOME/config/mpd.conf\nfi\n\nexec mpd --no-daemon $ADDON_HOME/config/mpd.conf > /dev/null 2>&1\n"
  },
  {
    "path": "packages/addons/service/mpd/source/config/mpd.conf",
    "content": "# An example configuration file for MPD\n# See the mpd.conf man page for a more detailed description of each parameter.\n\n\n# Files and directories #######################################################\n#\n# This setting controls the top directory which MPD will search to discover the\n# available audio files and add them to the daemon's online database. This \n# setting defaults to the XDG directory, otherwise the music directory will be\n# be disabled and audio files will only be accepted over ipc socket (using\n# file:// protocol) or streaming files over an accepted protocol.\n#\nmusic_directory\t\t\"/storage/music\"\n#\n# This setting sets the MPD internal playlist directory. The purpose of this\n# directory is storage for playlists created by MPD. The server will use \n# playlist files not created by the server but only if they are in the MPD\n# format. This setting defaults to playlist saving being disabled.\n#\nplaylist_directory \"/storage/.kodi/userdata/addon_data/service.multimedia.mpd/playlists\"\n#\n# This setting sets the location of the MPD database. This file is used to\n# load the database at server start up and store the database while the \n# server is not up. This setting defaults to disabled which will allow\n# MPD to accept files over ipc socket (using file:// protocol) or streaming\n# files over an accepted protocol.\n#\ndb_file \"/storage/.kodi/userdata/addon_data/service.multimedia.mpd/mpd.db\"\n# \n# These settings are the locations for the daemon log files for the daemon.\n# These logs are great for troubleshooting, depending on your log_level\n# settings.\n#\n# The special value \"syslog\" makes MPD use the local syslog daemon. This\n# setting defaults to logging to syslog, otherwise logging is disabled.\n#\nlog_file\t\t\t\"/storage/.kodi/userdata/addon_data/service.multimedia.mpd/log/mpd.log\"\n#\n# This setting sets the location of the file which stores the process ID\n# for use of mpd --kill and some init scripts. This setting is disabled by\n# default and the pid file will not be stored.\n#\npid_file \"/var/run/mpd.pid\"\n#\n# This setting sets the location of the file which contains information about\n# most variables to get MPD back into the same general shape it was in before\n# it was brought down. This setting is disabled by default and the server \n# state will be reset on server start up.\n#\nstate_file \"/storage/.kodi/userdata/addon_data/service.multimedia.mpd/state\"\n#\n# The location of the sticker database.  This is a database which\n# manages dynamic information attached to songs.\n#\n#sticker_file\t\t\t\"/storage/.mpd/sticker.sql\"\n#\n###############################################################################\n\n\n# General music daemon options ################################################\n#\n# This setting specifies the user that MPD will run as. MPD should never run as\n# root and you may use this setting to make MPD change its user ID after\n# initialization. This setting is disabled by default and MPD is run as the\n# current user.\n#\n#user \"mpd\"\n#\n# This setting specifies the group that MPD will run as. If not specified\n# primary group of user specified with \"user\" setting will be used (if set).\n# This is useful if MPD needs to be a member of group such as \"audio\" to\n# have permission to use sound card.\n#\n#group\t\t\t\t\"nogroup\"\n#\n# This setting sets the address for the daemon to listen on. Careful attention\n# should be paid if this is assigned to anything other then the default, any.\n# This setting can deny access to control of the daemon.\n#\n# For network\n#bind_to_address\t\t\"any\"\n#\n# And for Unix Socket\n#bind_to_address\t\t\"/storage/.mpd/socket\"\n#\n# This setting is the TCP port that is desired for the daemon to get assigned\n# to.\n#\n#port\t\t\t\t\"6600\"\n#\n# This setting controls the type of information which is logged. Available \n# setting arguments are \"default\", \"secure\" or \"verbose\". The \"verbose\" setting\n# argument is recommended for troubleshooting, though can quickly stretch\n# available resources on limited hardware storage.\n#\n#log_level\t\t\t\"default\"\n#\n# If you have a problem with your MP3s ending abruptly it is recommended that \n# you set this argument to \"no\" to attempt to fix the problem. If this solves\n# the problem, it is highly recommended to fix the MP3 files with vbrfix\n# (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which\n# point gapless MP3 playback can be enabled.\n#\n#gapless_mp3_playback\t\t\t\"yes\"\n#\n# Setting \"restore_paused\" to \"yes\" puts MPD into pause mode instead\n# of starting playback after startup.\n#\n#restore_paused \"no\"\n#\n# This setting enables MPD to create playlists in a format usable by other\n# music players.\n#\n#save_absolute_paths_in_playlists\t\"no\"\n#\n# This setting defines a list of tag types that will be extracted during the \n# audio file discovery process. Optionally, 'comment' can be added to this\n# list.\n#\n#metadata_to_use\t\"artist,album,title,track,name,genre,date,composer,performer,disc\"\n#\n# This setting enables automatic update of MPD's database when files in \n# music_directory are changed.\n#\n#auto_update\t\"yes\"\n#\n# Limit the depth of the directories being watched, 0 means only watch\n# the music directory itself.  There is no limit by default.\n#\n#auto_update_depth \"3\"\n#\n###############################################################################\n\n\n# Symbolic link behavior ######################################################\n#\n# If this setting is set to \"yes\", MPD will discover audio files by following \n# symbolic links outside of the configured music_directory.\n#\n#follow_outside_symlinks\t\"yes\"\n#\n# If this setting is set to \"yes\", MPD will discover audio files by following\n# symbolic links inside of the configured music_directory.\n#\n#follow_inside_symlinks\t\t\"yes\"\n#\n###############################################################################\n\n\n# Zeroconf / Avahi Service Discovery ##########################################\n#\n# If this setting is set to \"yes\", service information will be published with\n# Zeroconf / Avahi.\n#\n#zeroconf_enabled\t\t\"yes\"\n#\n# The argument to this setting will be the Zeroconf / Avahi unique name for\n# this MPD server on the network.\n#\n#zeroconf_name\t\t\t\"Music Player\"\n#\n###############################################################################\n\n\n# Permissions #################################################################\n#\n# If this setting is set, MPD will require password authorization. The password\n# can setting can be specified multiple times for different password profiles.\n#\n#password                        \"password@read,add,control,admin\"\n#\n# This setting specifies the permissions a user has who has not yet logged in. \n#\n#default_permissions             \"read,add,control,admin\"\n#\n###############################################################################\n\n\n# Input #######################################################################\n#\n\n#input {\n#        plugin \"curl\"\n#       proxy \"proxy.isp.com:8080\"\n#       proxy_user \"user\"\n#       proxy_password \"password\"\n#}\n\n#\n###############################################################################\n\n###############################################################################\n###############################################################################\n#\n# A BIG FAT WARNING\n#\n# This may block your xbmc audio. It might also play no audio at all,\n# if streamsilence is enabled and you try to use the very same device.\n#\n###############################################################################\n###############################################################################\n\n# Audio Output ################################################################\n#\n# MPD supports various audio output types, as well as playing through multiple \n# audio outputs at the same time, through multiple audio_output settings \n# blocks. Setting this block is optional, though the server will only attempt\n# autodetection for one sound card.\n#\n# See <http://mpd.wikia.com/wiki/Configuration#Audio_Outputs> for examples of \n# other audio outputs.\n#\n# An example of an ALSA output:\n#\n##audio_output {\n##\ttype\t\t\"alsa\"\n##\tname\t\t\"ALSA Device\"\n###\tdevice\t\t\"hw:0,0\"\t# optional\n####\tformat\t\t\"44100:16:2\"\t# optional\n####\tmixer_type      \"hardware\"\t# optional\n####\tmixer_device\t\"default\"\t# optional\n####\tmixer_control\t\"PCM\"\t\t# optional\n####\tmixer_index\t\"0\"\t\t# optional\n##}\n#\n# An example of an OSS output:\n#\n#audio_output {\n#\ttype\t\t\"oss\"\n#\tname\t\t\"My OSS Device\"\n##\tdevice\t\t\"/dev/dsp\"\t# optional\n##\tformat\t\t\"44100:16:2\"\t# optional\n##\tmixer_type      \"hardware\"\t# optional\n##\tmixer_device\t\"/dev/mixer\"\t# optional\n##\tmixer_control\t\"PCM\"\t\t# optional\n#}\n#\n# An example of a shout output (for streaming to Icecast):\n#\n#audio_output {\n#\ttype\t\t\"shout\"\n#\tencoding\t\"ogg\"\t\t\t# optional\n#\tname\t\t\"My Shout Stream\"\n#\thost\t\t\"localhost\"\n#\tport\t\t\"8000\"\n#\tmount\t\t\"/mpd.ogg\"\n#\tpassword\t\"hackme\"\n#\tquality\t\t\"5.0\"\n#\tbitrate\t\t\"128\"\n#\tformat\t\t\"44100:16:1\"\n##\tprotocol\t\"icecast2\"\t\t# optional\n##\tuser\t\t\"source\"\t\t# optional\n##\tdescription\t\"My Stream Description\"\t# optional\n##\turl\t\t\"http://example.com\"\t# optional\n##\tgenre\t\t\"jazz\"\t\t\t# optional\n##\tpublic\t\t\"no\"\t\t\t# optional\n##\ttimeout\t\t\"2\"\t\t\t# optional\n##\tmixer_type      \"software\"\t\t# optional\n#}\n#\n# An example of a recorder output:\n#\n#audio_output {\n#\ttype\t\t\"recorder\"\n#\tname\t\t\"My recorder\"\n#\tencoder\t\t\"vorbis\"\t\t# optional, vorbis or lame\n#\tpath\t\t\"/var/lib/mpd/recorder/mpd.ogg\"\n##\tquality\t\t\"5.0\"\t\t\t# do not define if bitrate is defined\n#\tbitrate\t\t\"128\"\t\t\t# do not define if quality is defined\n#\tformat\t\t\"44100:16:1\"\n#}\n#\n# An example of a httpd output (built-in HTTP streaming server):\n#\n#audio_output {\n##\ttype\t\t\"httpd\"\n#\tname\t\t\"My HTTP Stream\"\n#\tencoder\t\t\"vorbis\"\t\t# optional, vorbis or lame\n#\tport\t\t\"8000\"\n#\tbind_to_address\t\"0.0.0.0\"\t\t# optional, IPv4 or IPv6\n#\tquality\t\t\"5.0\"\t\t\t# do not define if bitrate is defined\n#\tbitrate\t\t\"320\"\t\t\t# do not define if quality is defined\n#\tformat\t\t\"44100:16:1\"\n#\tmax_clients\t\"0\"\t\t\t# optional 0=no limit\n#}\n#\n# An example of a pulseaudio output (streaming to a remote pulseaudio server)\n#\n#audio_output {\n#\ttype\t\t\"pulse\"\n#\tname\t\t\"My Pulse Output\"\n##\tserver\t\t\"remote_server\"\t\t# optional\n##\tsink\t\t\"remote_server_sink\"\t# optional\n#}\n#\n## Example \"pipe\" output:\n#\n#audio_output {\n#\ttype\t\t\"pipe\"\n#\tname\t\t\"my pipe\"\n#\tcommand\t\t\"aplay -f cd 2>/dev/null\"\n## Or if you're want to use AudioCompress\n#\tcommand\t\t\"AudioCompress -m | aplay -f cd 2>/dev/null\"\n## Or to send raw PCM stream through PCM:\n#\tcommand\t\t\"nc example.org 8765\"\n#\tformat\t\t\"44100:16:2\"\n#}\n#\n## An example of a null output (for no audio output):\n#\naudio_output {\n\ttype\t\t\"null\"\n\tname\t\t\"My Null Output\"\n\tmixer_type      \"none\"\t\t\t# optional\n}\n#\n# This setting will change all decoded audio to be converted to the specified\n# format before being passed to the audio outputs. By default, this setting is\n# disabled.\n#\n#audio_output_format\t\t\"44100:16:2\"\n#\n# If MPD has been compiled with libsamplerate support, this setting specifies \n# the sample rate converter to use.  Possible values can be found in the \n# mpd.conf man page or the libsamplerate documentation. By default, this is\n# setting is disabled.\n#\n#samplerate_converter\t\t\"Fastest Sinc Interpolator\"\n#\n###############################################################################\n\n\n# Normalization automatic volume adjustments ##################################\n#\n# This setting specifies the type of ReplayGain to use. This setting can have\n# the argument \"off\", \"album\" or \"track\". See <http://www.replaygain.org>\n# for more details. This setting is off by default.\n#\n#replaygain\t\t\t\"album\"\n#\n# This setting sets the pre-amp used for files that have ReplayGain tags. By\n# default this setting is disabled.\n#\n#replaygain_preamp\t\t\"0\"\n#\n# This setting enables on-the-fly normalization volume adjustment. This will\n# result in the volume of all playing audio to be adjusted so the output has \n# equal \"loudness\". This setting is disabled by default.\n#\n#volume_normalization\t\t\"no\"\n#\n###############################################################################\n\n\n# MPD Internal Buffering ######################################################\n#\n# This setting adjusts the size of internal decoded audio buffering. Changing\n# this may have undesired effects. Don't change this if you don't know what you\n# are doing.\n#\n#audio_buffer_size\t\t\"2048\"\n#\n# This setting controls the percentage of the buffer which is filled before \n# beginning to play. Increasing this reduces the chance of audio file skipping, \n# at the cost of increased time prior to audio playback.\n#\n#buffer_before_play\t\t\"10%\"\n#\n###############################################################################\n\n\n# Resource Limitations ########################################################\n#\n# These settings are various limitations to prevent MPD from using too many\n# resources. Generally, these settings should be minimized to prevent security\n# risks, depending on the operating resources.\n#\n#connection_timeout\t\t\"60\"\n#max_connections\t\t\"10\"\n#max_playlist_length\t\t\"16384\"\n#max_command_list_size\t\t\"2048\"\n#max_output_buffer_size\t\t\"8192\"\n#\n###############################################################################\n\n# Client TCP keep alive #######################################################\n#\n# For clients connected by TCP on supported platforms.\n# Allows detection of dangling connections due to clients disappearing from\n# the network without closing their connections.\n#\n# This is not usually necessary but can be useful in cases such as wifi connectected\n# clients that go in and out of network range or turn off wifi without closing their\n# connections. Combined with low max_connections this can soon cause clients to not\n# be able to connect.\n#\n#\n# Enable tcp keepalive on new client connections (default is \"no\")\n#\n#tcp_keep_alive \"no\"\n#\n# Time in seconds since the last communication on the connection and before\n# the keepalive probing is started. (default is 7200 seconds)\n#tcp_keep_alive_idle \"7200\"\n#\n# Interval in seconds between keepalive probes, once a probe started.\n# (default is 75 seconds)\n#tcp_keep_alive_interval \"75\"\n#\n# Number of failed probes before the connection is pronounced dead and\n# the connection is closed. (default is 9 times)\n#tcp_keep_alive_count \"9\"\n#\n###############################################################################\n\n# Character Encoding ##########################################################\n#\n# If file or directory names do not display correctly for your locale then you \n# may need to modify this setting.\n#\n#filesystem_charset\t\t\"UTF-8\"\n#\n# This setting controls the encoding that ID3v1 tags should be converted from.\n#\n#id3v1_encoding\t\t\t\"ISO-8859-1\"\n#\n###############################################################################\n\n\n# SIDPlay decoder #############################################################\n#\n# songlength_database:\n#  Location of your songlengths file, as distributed with the HVSC.\n#  The sidplay plugin checks this for matching MD5 fingerprints.\n#  See http://www.c64.org/HVSC/DOCUMENTS/Songlengths.faq\n#\n# default_songlength:\n#  This is the default playing time in seconds for songs not in the\n#  songlength database, or in case you're not using a database.\n#  A value of 0 means play indefinitely.\n#\n# filter:\n#  Turns the SID filter emulation on or off.\n#\n#decoder {\n#\tplugin\t\t\t\"sidplay\"\n#\tsonglength_database\t\"/media/C64Music/DOCUMENTS/Songlengths.txt\"\n#\tdefault_songlength\t\"120\"\n#\tfilter \"true\"\n#}\n#\n###############################################################################\n\n"
  },
  {
    "path": "packages/addons/service/mpd/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n"
  },
  {
    "path": "packages/addons/service/mpd/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: mpd\n# Addon id: service.mpd\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"General\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Restart on suspend / resume\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/mpd/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n    <category label=\"30000\">\n\t\t<setting label=\"1010\" type=\"lsep\"/>\n\t\t<setting type=\"sep\" />\n\t\t<setting id=\"RESTART_ON_RESUME\" type=\"bool\" label=\"30001\" default=\"true\" />\n    </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/mpd/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"RESTART_ON_RESUME\">true</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/mpd/source/sleep.d/mpd.power",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.multimedia.mpd\n\nSERVICE=\"service.multimedia.mpd\"\n\nif [ \"$RESTART_ON_RESUME\" == \"true\" ] ; then\n  case \"$1\" in\n    pre)\n      if systemctl is-active \"$SERVICE\" &>/dev/null ; then\n        systemctl stop \"$SERVICE\"\n      fi\n      ;;\n    post)\n      if systemctl is-enabled \"$SERVICE\" &>/dev/null ; then\n        systemctl start \"$SERVICE\"\n      fi\n      ;;\n  esac\nfi\n"
  },
  {
    "path": "packages/addons/service/mpd/source/system.d/service.multimedia.mpd.service",
    "content": "[Unit]\nDescription=mpd\nAfter=graphical.target\n\n[Service]\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.multimedia.mpd/bin/mpd.start\"\nTimeoutStopSec=1\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/net-snmp/changelog.txt",
    "content": "1\n- net-snmp: update to 5.9.4\n"
  },
  {
    "path": "packages/addons/service/net-snmp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"net-snmp\"\nPKG_VERSION=\"5.9.4\"\nPKG_SHA256=\"8b4de01391e74e3c7014beb43961a2d6d6fa03acc34280b9585f4930745b0544\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://www.net-snmp.org\"\nPKG_URL=\"https://sourceforge.net/projects/net-snmp/files/${PKG_NAME}/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libnl openssl\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Simple Network Management Protocol utilities.\"\nPKG_LONGDESC=\"Simple Network Management Protocol (SNMP) is a widely used protocol for monitoring the health and welfare of network equipment.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Net-SNMP\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nconfigure_package() {\n  PKG_CONFIGURE_OPTS_TARGET=\"--with-defaults \\\n        --disable-applications \\\n        --disable-manuals \\\n        --disable-debugging \\\n        --disable-deprecated \\\n        --disable-snmptrapd-subagent \\\n        --disable-scripts \\\n        --enable-static=yes \\\n        --enable-shared=no \\\n        --with-nl \\\n        --with-logfile=/storage/.kodi/userdata/addon_data/${PKG_ADDON_ID} \\\n        --with-persistent-directory=/storage/.kodi/userdata/addon_data/${PKG_ADDON_ID} \\\n        --sysconfdir=/storage/.kodi/userdata/addon_data/${PKG_ADDON_ID} \\\n        --prefix=/storage/.kodi/addons/${PKG_ADDON_ID} \\\n        --exec-prefix=/storage/.kodi/addons/${PKG_ADDON_ID} \\\n        --datarootdir=/storage/.kodi/userdata/addon_data/${PKG_ADDON_ID}/share \\\n        --bindir=/storage/.kodi/addons/${PKG_ADDON_ID}/bin \\\n        --sbindir=/storage/.kodi/addons/${PKG_ADDON_ID}/bin \\\n        --libdir=/storage/.kodi/addons/${PKG_ADDON_ID}/lib \\\n        --disable-embedded-perl \\\n        --with-sysroot=${SYSROOT_PREFIX}\"\n}\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  make install INSTALL_PREFIX=${INSTALL}\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n  cp -r ${PKG_INSTALL}/storage/.kodi/addons/${PKG_ADDON_ID}/bin ${PKG_INSTALL}/storage/.kodi/userdata/addon_data/${PKG_ADDON_ID}/share ${ADDON_BUILD}/${PKG_ADDON_ID}/\n}\n"
  },
  {
    "path": "packages/addons/service/net-snmp/patches/net-snmp-0001-read_config.c.patch",
    "content": "--- a/snmplib/read_config.c\t2014-12-08 14:23:22.000000000 -0600\n+++ b/snmplib/read_config.c\t2017-03-30 12:21:16.351042803 -0500\n@@ -1642,7 +1642,7 @@\n      * save a warning header to the top of the new file \n      */\n     snprintf(fileold, sizeof(fileold),\n-            \"%s%s# Please save normal configuration tokens for %s in SNMPCONFPATH/%s.conf.\\n# Only \\\"createUser\\\" tokens should be placed here by %s administrators.\\n%s\",\n+            \"%s%s# Please save normal configuration tokens for %s in /storage/.kodi/userdata/addon_data/service.net-snmp/share/snmp/%s.conf.\\n# Only \\\"createUser\\\" tokens should be placed here by %s administrators.\\n%s\",\n             \"#\\n# net-snmp (or ucd-snmp) persistent data file.\\n#\\n############################################################################\\n# STOP STOP STOP STOP STOP STOP STOP STOP STOP \\n\",\n             \"#\\n#          **** DO NOT EDIT THIS FILE ****\\n#\\n# STOP STOP STOP STOP STOP STOP STOP STOP STOP \\n############################################################################\\n#\\n# DO NOT STORE CONFIGURATION ENTRIES HERE.\\n\",\n             type, type, type,\n"
  },
  {
    "path": "packages/addons/service/net-snmp/patches/net-snmp-0002-net-snmp-create-v3-user.in.patch",
    "content": "--- net-snmp-5.9/net-snmp-create-v3-user.in\t2020-08-14 21:41:47.000000000 +0000\n+++ net-snmp-5.9/net-snmp-create-v3-user.in\t2021-01-14 07:04:26.196982169 +0000\n@@ -3,10 +3,8 @@\n # this shell script is designed to add new SNMPv3 users\n # to Net-SNMP config file.\n \n-if @PSCMD@ | @EGREP@ ' snmpd *$' > /dev/null 2>&1 ; then\n-    echo \"Apparently at least one snmpd daemon is already running.\"\n-    echo \"You must stop them in order to use this command.\"\n-    exit 1\n+if @PSCMD@ | @EGREP@ 'snmpd' > /dev/null 2>&1 ; then\n+    systemctl stop service.net-snmp.service\n fi\n \n Aalgorithm=\"MD5\"\n"
  },
  {
    "path": "packages/addons/service/net-snmp/source/bin/snmpd.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\noe_setup_addon service.net-snmp\n\nADDON_ID=service.net-snmp\nADDON_DIR=\"$HOME/.kodi/addons/$ADDON_ID\"\nADDON_HOME=\"$HOME/.kodi/userdata/addon_data/$ADDON_ID\"\n\n$ADDON_DIR/bin/snmpd -f -LS0-6d -C -c $ADDON_HOME/share/snmp/snmpd.conf -M $ADDON_DIR/share/snmp/mibs -p /var/run/snmpd.pid\n"
  },
  {
    "path": "packages/addons/service/net-snmp/source/bin/snmpd.stop",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\noe_setup_addon service.net-snmp\n\nADDON_ID=service.net-snmp\nADDON_DIR=\"$HOME/.kodi/addons/$ADDON_ID\"\nADDON_HOME=\"$HOME/.kodi/userdata/addon_data/$ADDON_ID\"\n\nPID=`cat /var/run/snmpd.pid`\nkill -TERM $PID\n"
  },
  {
    "path": "packages/addons/service/net-snmp/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport xbmc\nimport xbmcvfs\nimport xbmcaddon\nfrom os import system\n\n\nclass MyMonitor(xbmc.Monitor):\n    def __init__(self, *args, **kwargs):\n        xbmc.Monitor.__init__(self)\n    \n    def onSettingsChanged(self):\n        writeconfig()\n\n            \n# addon\n__addon__ = xbmcaddon.Addon(id='service.net-snmp')\n__addonpath__ = xbmcvfs.translatePath(__addon__.getAddonInfo('path'))\n__addonhome__ = xbmcvfs.translatePath(__addon__.getAddonInfo('profile'))\nif not xbmcvfs.exists(xbmcvfs.translatePath(__addonhome__ + 'share/snmp/')):\n    xbmcvfs.mkdirs(xbmcvfs.translatePath(__addonhome__ + 'share/snmp/'))\nconfig = xbmcvfs.translatePath(__addonhome__ + 'share/snmp/snmpd.conf')\npersistent = xbmcvfs.translatePath(__addonhome__ + 'snmpd.conf')\n\n\ndef writeconfig():\n    system(\"systemctl stop service.net-snmp.service\")\n    community = __addon__.getSetting(\"COMMUNITY\")\n    location = __addon__.getSetting(\"LOCATION\")\n    contact = __addon__.getSetting(\"CONTACT\")\n    snmpversion = __addon__.getSetting(\"SNMPVERSION\")\n    cputemp = __addon__.getSetting(\"CPUTEMP\")\n    gputemp = __addon__.getSetting(\"GPUTEMP\")\n\n    if xbmcvfs.exists(persistent):\n        xbmcvfs.delete(persistent)\n\n    file = xbmcvfs.File(config, 'w')\n    file.write('com2sec local default {}\\n'.format(community))\n    file.write('group localgroup {} local\\n'.format(snmpversion))\n    file.write('access localgroup \"\" any noauth exact all all none\\n')\n    file.write('view all included .1 80\\n')\n    file.write('syslocation {}\\n'.format(location))\n    file.write('syscontact {}\\n'.format(contact))\n    file.write('dontLogTCPWrappersConnects yes\\n')\n\n    if cputemp == \"true\":\n        file.write('extend cputemp \"/usr/bin/cputemp\"\\n')\n\n    if gputemp == \"true\":\n        file.write('extend gputemp \"/usr/bin/gputemp\"\\n')\n\n    if snmpversion == \"v3\":\n        file.write('includeFile ../../snmpd.conf\\n')\n        snmppassword = __addon__.getSetting(\"SNMPPASSWORD\")\n        snmpuser = __addon__.getSetting(\"SNMPUSER\")\n        system(\"net-snmp-config --create-snmpv3-user -a MD5 -A {0} {1}\".format(snmppassword,snmpuser))\n\n    file.close()\n    system(\"systemctl start service.net-snmp.service\")\n\n\nif not xbmcvfs.exists(config):\n    writeconfig()\n\nmonitor = MyMonitor()\nwhile not monitor.abortRequested():\n    if monitor.waitForAbort():\n        break\n\n"
  },
  {
    "path": "packages/addons/service/net-snmp/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: net-snmp\n# Addon id: service.net-snmp\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#32000\"\nmsgid \"General\"\nmsgstr \"\"\n\nmsgctxt \"#32001\"\nmsgid \"Community\"\nmsgstr \"\"\n\nmsgctxt \"#32002\"\nmsgid \"Location\"\nmsgstr \"\"\n\nmsgctxt \"#32003\"\nmsgid \"Contact\"\nmsgstr \"\"\n\nmsgctxt \"#32004\"\nmsgid \"SNMP Version\"\nmsgstr \"\"\n\nmsgctxt \"#32005\"\nmsgid \"SNMP User\"\nmsgstr \"\"\n\nmsgctxt \"#32006\"\nmsgid \"SNMP Password\"\nmsgstr \"\"\n\nmsgctxt \"#32007\"\nmsgid \"v3 account\"\nmsgstr \"\"\n\nmsgctxt \"#32008\"\nmsgid \"Extends\"\nmsgstr \"\"\n\nmsgctxt \"#32009\"\nmsgid \"Expose cputemp\"\nmsgstr \"\"\n\nmsgctxt \"#32010\"\nmsgid \"Expose gputemp\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/net-snmp/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n   <!-- net-snmp -->\n    <category label=\"32000\">\n\t\t<setting label=\"32001\" id=\"COMMUNITY\" type=\"text\" default=\"libreelec\"/>\n\t\t<setting label=\"32002\" id=\"LOCATION\" type=\"text\" default=\"HOME\"/>\n\t\t<setting label=\"32003\" id=\"CONTACT\" type=\"text\" default=\"root@localhost\"/>\n\t\t<setting label=\"32004\" id=\"SNMPVERSION\" type=\"labelenum\" values=\"v1|v2c|v3\" default=\"v2c\"/>\n\t\t<setting label=\"32007\" type=\"lsep\"/>\n\t\t<setting label=\"32005\" id=\"SNMPUSER\" type=\"text\" default=\"user\"/>\n\t\t<setting label=\"32006\" id=\"SNMPPASSWORD\" type=\"text\" default=\"password\"/>\n\t\t<setting label=\"32008\" type=\"lsep\"/>\n\t\t<setting label=\"32009\" type=\"bool\" id=\"CPUTEMP\" default=\"true\"/>\n\t\t<setting label=\"32010\" type=\"bool\" id=\"GPUTEMP\" default=\"false\"/>\n    </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/net-snmp/source/system.d/service.net-snmp.service",
    "content": "[Unit]\nDescription=Net-SNMP software bundle\nAfter=network-online.target\nRequires=network-online.target\n\n[Service]\nType=notification\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.net-snmp/bin/snmpd.start\"\nExecStop=/bin/sh -c \"exec sh /storage/.kodi/addons/service.net-snmp/bin/snmpd.stop\"\nExecReload=/bin/kill -HUP $MAINPID\nPIDFile=/var/run/snmpd.pid\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/nextpvr/changelog.txt",
    "content": "5\n- download NextPVR 6.1.5\n\n4\n- download NextPVR 6.1.4\n\n3\n- download NextPVR 6.1.3\n\n2\nFix nextpvr-downloader script\n\ninitial release\n"
  },
  {
    "path": "packages/addons/service/nextpvr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"nextpvr\"\nPKG_VERSION=\"6.1.5~Nexus\"\nPKG_ADDON_VERSION=\"6.1.5~5\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"NextPVR\"\nPKG_SITE=\"https://nextpvr.com\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"NextPVR Server\"\nPKG_LONGDESC=\"NextPVR is a personal video recorder application. It allows to watch or record live TV, provides great features like series recordings and web scheduling.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"NextPVR Server\"\nPKG_ADDON_TYPE=\"xbmc.service.library\"\nPKG_ADDON_REQUIRES=\"tools.ffmpeg-tools:0.0.0 tools.dotnet-runtime:0.0.0 script.module.requests:0.0.0\"\n\naddon() {\n  :\n}\n\npost_install_addon() {\n  sed -e \"s/@NEXTPVR_VERSION@/${PKG_ADDON_VERSION}/g\" -i \"${INSTALL}/bin/nextpvr-downloader\"\n}\n"
  },
  {
    "path": "packages/addons/service/nextpvr/source/addon.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nimport urllib.request, urllib.parse, urllib.error, os, zipfile\nfrom urllib.error import URLError\nimport urllib.parse as urlparse\nimport requests\nimport json\nimport subprocess\n\nfrom  urllib.parse import parse_qs\nimport xbmc, xbmcvfs, xbmcgui, xbmcaddon\nimport shutil\nimport sys\nimport xml.etree.ElementTree as ET\n\ntemp = xbmcvfs.translatePath('special://temp')\n\nADDON_NAME = xbmcaddon.Addon().getAddonInfo('name')\nLS = xbmcaddon.Addon().getLocalizedString\n\n# Ignore isbn tables\nSCANTABLES = ['atsc', 'dvb-c', 'dvb-s', 'dvb-t']\nGENERIC_URL = 'https://nextpvr.com/stable/linux/NPVR.zip'\n\nclass Controller():\n\n    def __init__(self):\n        pass\n\n    def downloadScanTable(self):\n        # Taken from TVHeadend Addon\n        try:\n            url = 'https://github.com/tvheadend/dtv-scan-tables/archive/tvheadend.zip'\n            archive = os.path.join(temp, 'dtv_scantables.zip')\n            temp_folder = os.path.join(temp, 'dtv-scan-tables-tvheadend')\n            dest_folder = os.path.join(xbmcvfs.translatePath(xbmcaddon.Addon().getAddonInfo('path')), 'dtv-scan-tables')\n\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30042), xbmcgui.NOTIFICATION_INFO)\n            urllib.request.urlretrieve(url, archive)\n            zip = zipfile.ZipFile(archive)\n            if zip.testzip() is not None: raise zipfile.BadZipfile\n\n            if os.path.exists(temp_folder): shutil.rmtree(temp_folder)\n            if os.path.exists(dest_folder): shutil.rmtree(dest_folder)\n\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30043), xbmcgui.NOTIFICATION_INFO)\n            for idx, folder in enumerate(SCANTABLES):\n                for z in zip.filelist:\n                    if folder in z.filename: zip.extract(z.filename, temp)\n\n            for folder in SCANTABLES:\n                shutil.copytree(os.path.join(temp_folder, folder), os.path.join(dest_folder, folder))\n            if os.path.exists(temp_folder): shutil.rmtree(temp_folder)\n            os.remove(archive)\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30039), xbmcgui.NOTIFICATION_INFO)\n        except URLError as e:\n            xbmc.log('Could not download file: %s' % e.reason, xbmc.LOGERROR)\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30040), xbmcgui.NOTIFICATION_ERROR)\n        except zipfile.BadZipfile:\n            xbmc.log('Could not extract files from zip, bad zipfile', xbmc.LOGERROR)\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30041), xbmcgui.NOTIFICATION_ERROR)\n\n    def updateNextPVR(self):\n        try:\n            dest_folder = os.path.join(xbmcvfs.translatePath(xbmcaddon.Addon().getAddonInfo('path')), 'nextpvr-bin')\n            archive = os.path.join(temp, 'NPVR.zip')\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30011), xbmcgui.NOTIFICATION_INFO)\n            urllib.request.urlretrieve(GENERIC_URL, archive)\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30012), xbmcgui.NOTIFICATION_INFO)\n            zip = zipfile.ZipFile(archive)\n            if zip.testzip() is not None: raise zipfile.BadZipfile\n            zip.close()\n            command = 'unzip -o {0} -d {1} > /dev/null'.format(archive, dest_folder)\n            xbmc.log('Running: %s' % command, xbmc.LOGDEBUG)\n            os.system(command)\n            os.remove(archive)\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30039), xbmcgui.NOTIFICATION_INFO)\n            xbmc.log('NPVR.zip installed', xbmc.LOGDEBUG)\n            if xbmcgui.Dialog().yesno(\"NextPVR Server\", LS(30020)):\n                self.id = xbmcaddon.Addon().getAddonInfo('id')\n                subprocess.call(['systemctl', 'restart', self.id])\n\n        except URLError as e:\n            xbmc.log('Could not download file: %s' % e.reason, xbmc.LOGERROR)\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30040), xbmcgui.NOTIFICATION_ERROR)\n        except zipfile.BadZipfile:\n            xbmc.log('Could not extract files from zip, bad zipfile', xbmc.LOGERROR)\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30041), xbmcgui.NOTIFICATION_ERROR)\n\n    def sessionLogin(self):\n        self.session = requests.session()\n        headers = {\n            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0'\n        }\n        response = self.session.get(self.url, headers=headers)\n        parsed = urlparse.urlparse(response.url)\n        salt = parse_qs(parsed.query)['salt'][0]\n        if self.hashedPassword == None:\n            passwordHash = self.hashMe(self.password)\n        else:\n            passwordHash = self.hashedPassword\n        combined = self.hashMe(salt + ':' + self.username + ':' + passwordHash)\n        response = self.session.get(self.url + 'login.html?hash='+combined)\n        if response.status_code != 200 and response.status_code != 302 :\n            print(response.text, response.status_code)\n            sys.exit()\n        for cookie in self.session.cookies:\n            self.session.cookies[cookie.name] = cookie.value\n\n    def doSessionRequest5(self, method, isJSON = True):\n        xbmc.log(method, xbmc.LOGDEBUG)\n        retval = False\n        getResult = None\n        url = self.url + 'service?method=' + method\n        try:\n            request = self.session.get(url, headers={\"Accept\" : \"application/json\"})\n            getResult = json.loads(request.text)\n            if request.status_code == 200 :\n                if 'stat' in getResult:\n                    retval = getResult['stat'] == 'ok'\n                else:\n                    retval = True\n            else:\n                xbmc.log(getResult, xbmc.LOGERROR)\n\n        except Exception as e:\n            xbmc.log(str(e), xbmc.LOGERROR)\n\n        return retval, getResult\n\n    def hashMe (self, thedata):\n        import hashlib\n        h = hashlib.md5()\n        h.update(thedata.encode('utf-8'))\n        return h.hexdigest()\n\n    def loginNextPVR(self):\n        base = os.path.join(xbmcvfs.translatePath(xbmcaddon.Addon().getAddonInfo('profile')), 'config/config.xml')\n        tree = ET.parse(base)\n        root = tree.getroot()\n        child = root.find(\"WebServer\")\n        self.port = child.find('Port').text\n        self.username = child.find('Username').text\n        self.hashedPIN = child.find('PinMD5').text\n        self.hashedPassword = child.find('Password').text.lower()\n        self.ip = '127.0.0.1'\n        self.url = 'http://{}:{}/'.format(self.ip, self.port)\n        self.sessionLogin()\n\n\n    def showMessage(self, message):\n        xbmc.log(message, xbmc.LOGDEBUG)\n        xbmcgui.Dialog().notification(ADDON_NAME, message, xbmcgui.NOTIFICATION_INFO)\n\n\n    def updateEpg(self):\n        self.loginNextPVR()\n        self.doSessionRequest5('system.epg.update')\n        self.doSessionRequest5('session.logout')\n        self.showMessage(LS(30015))\n\n    def updateM3u(self):\n        self.loginNextPVR()\n        self.doSessionRequest5('setting.m3u.update')\n        self.doSessionRequest5('session.logout')\n        self.showMessage(LS(30016))\n\n    def rescanDevices(self):\n        self.loginNextPVR()\n        self.doSessionRequest5('setting.devices&refresh=true')\n        self.doSessionRequest5('session.logout')\n        self.showMessage(LS(30017))\n\n    def transcodeHLS(self):\n        base = os.path.join(xbmcvfs.translatePath(xbmcaddon.Addon().getAddonInfo('profile')), 'config/config.xml')\n        tree = ET.parse(base)\n        parser = ET.XMLParser(target=ET.TreeBuilder(insert_comments=True))\n        tree = ET.parse(base, parser=parser)\n        root = tree.getroot()\n        parent = root.find(\"WebServer\")\n        child = parent.find('TranscodeHLS')\n        if child.text == 'default':\n            child.text = '-y [ANALYZE_DURATION] [SEEK] -i [SOURCE] -map_metadata -1 -threads [THREADS] -ignore_unknown -map 0:v:0? [PREFERRED_LANGUAGE] -map 0:a:[AUDIO_STREAM] -map -0:s -vcodec copy -acodec aac -ac 2 -c:s copy -hls_time [SEGMENT_DURATION] -start_number 0 -hls_list_size [SEGMENT_COUNT] -y [TARGET]'\n        else:\n            child.text = 'default'\n        tree.write(base, encoding='utf-8')\n\n        if child.text == 'default':\n            self.showMessage(LS(30018))\n        else:\n            self.showMessage(LS(30019))\n\n    def resetWebCredentials(self):\n        rewrite = False\n        base = os.path.join(xbmcvfs.translatePath(xbmcaddon.Addon().getAddonInfo('profile')), 'config/config.xml')\n        tree = ET.parse(base)\n        parser = ET.XMLParser(target=ET.TreeBuilder(insert_comments=True))\n        tree = ET.parse(base, parser=parser)\n        root = tree.getroot()\n        parent = root.find(\"WebServer\")\n        child = parent.find('Username')\n        if child.text != 'admin':\n            child.text = 'admin'\n            rewrite = True\n        child = parent.find('Password')\n        if child.text != '5f4dcc3b5aa765d61d8327deb882cf99':\n            child.text = '5f4dcc3b5aa765d61d8327deb882cf99'\n            rewrite = True\n        if rewrite:\n            tree.write(base, encoding='utf-8')\n            self.showMessage(LS(30046))\n\n\nif __name__ == '__main__':\n    option = Controller()\n    try:\n        if sys.argv[1] == 'getscantables':\n            option.downloadScanTable()\n        elif sys.argv[1] == 'updategeneric':\n            option.updateNextPVR()\n        elif sys.argv[1] == 'updateepg':\n            option.updateEpg()\n        elif sys.argv[1] == 'transcode':\n            option.transcodeHLS()\n        elif sys.argv[1] == 'updatem3u':\n            option.updateM3u()\n        elif sys.argv[1] == 'rescan':\n            option.rescanDevices()\n        elif sys.argv[1] == 'defaults':\n            option.resetWebCredentials()\n    except IndexError:\n        pass\n"
  },
  {
    "path": "packages/addons/service/nextpvr/source/bin/nextpvr-downloader",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\noe_setup_addon service.nextpvr\n\nICON=\"${ADDON_DIR}/resources/icon.png\"\nCONTROL_FILE=\"/tmp/curl.nextpvr.done\"\nDATA_FILE=\"/tmp/curl.nextpvr.data\"\nNEXTPVR_VERSION=\"@NEXTPVR_VERSION@\"\nNEXTPVR_FILE=\"NPVR-${NEXTPVR_VERSION%~*}.zip\"\n\n# check for enough free disk space\nif [ $(df . | awk 'END {print $4}') -lt 400000 ]; then\n  kodi-send --action=\"Notification(Not enough disk space, at least 400MB are required,30000,${ICON})\" >/dev/null\n  exit 0\nfi\n\n# remove install status and folders\nif [ -f ${ADDON_DIR}/extract.ok ]; then\n  rm ${ADDON_DIR}/extract.ok\nfi\n\nif [ -d ${ADDON_DIR}/nextpvr-bin ]; then\n  rm -rf ${ADDON_DIR}/nextpvr-bin\nfi\n\nif [ -d ${ADDON_DIR}/tmp_download ]; then\n  rm -rf ${ADDON_DIR}/tmp_download\nfi\n\n# create tmp download dir\nmkdir -p ${ADDON_DIR}/tmp_download\ncd ${ADDON_DIR}/tmp_download\n\necho \"Downloading NextPVR\"\n\n# download NextPVR\nrm -f ${CONTROL_FILE} ${DATA_FILE}\n(\n  curl -L -# -O -C - https://github.com/sub3/releases/releases/download/${NEXTPVR_VERSION%~*}/${NEXTPVR_FILE}  2>${DATA_FILE}\n  touch ${CONTROL_FILE}\n) |\n  while [ : ]; do\n    [ -f ${DATA_FILE} ] && prog=\"$(tr '\\r' '\\n' <${DATA_FILE} | tail -n 1 | sed -r 's/^[# ]+/#/;s/^[^0-9]*//g')\" || prog=\n    kodi-send --action=\"Notification(Downloading NextPVR,\\\"${prog:-0.0%}\\\",3000,${ICON})\" >/dev/null\n    [ -f ${CONTROL_FILE} ] && break\n    sleep 4\n  done\n\nrm -f ${CONTROL_FILE} ${DATA_FILE}\n\n# check for failed download\nif [ ! -f ${NEXTPVR_FILE} ]; then\n  kodi-send --action=\"Notification(Download NextPVR failed,${ICON})\"\n  exit 1\nfi\n\n# extract NextPVR\nkodi-send --action=\"Notification(Extracting NextPVR,starting,1000,${ICON})\" >/dev/null\nmkdir -p ${ADDON_DIR}/nextpvr-bin\nunzip ${NEXTPVR_FILE} -d ${ADDON_DIR}/nextpvr-bin >/dev/null\n\nif [ \"$(uname -m)\" != \"x86_64\" ]; then\n  sed -i 's/<TranscodeHLS>default<\\/TranscodeHLS>/<TranscodeHLS>-y [ANALYZE_DURATION] [SEEK] -i [SOURCE] -map_metadata -1 -threads [THREADS] -ignore_unknown -map 0:v:0? [PREFERRED_LANGUAGE] -map 0:a:[AUDIO_STREAM] -map -0:s -vcodec copy -acodec aac -ac 2 -c:s copy -hls_time [SEGMENT_DURATION] -start_number 0 -hls_list_size [SEGMENT_COUNT] -y [TARGET]<\\/TranscodeHLS>/' ${ADDON_DIR}/nextpvr-bin/data/Config-master-dont-edit.xml\nfi\nsed -i 's/<RecordingDirectory>C:\\\\Users\\\\Public\\\\Videos\\\\<\\/RecordingDirectory>/<RecordingDirectory>\\/storage\\/tvshows\\/<\\/RecordingDirectory>/' ${ADDON_DIR}/nextpvr-bin/data/Config-master-dont-edit.xml\nsed -i 's/<LiveTVBufferDirectory>C:\\\\Users\\\\Public\\\\Videos\\\\<\\/LiveTVBufferDirectory>/<LiveTVBufferDirectory>\\/tmp\\/<\\/LiveTVBufferDirectory>/' ${ADDON_DIR}/nextpvr-bin/data/Config-master-dont-edit.xml\nfind ${ADDON_DIR}/nextpvr-bin/DeviceHost -name DeviceHostLinux -exec chmod 755 {} \\;\n\n# cleanup\ncd ${ADDON_DIR}\nrm -rf ${ADDON_DIR}/tmp_download\ntouch ${ADDON_DIR}/extract.ok\nkodi-send --action=\"Notification(Extracting NextPVR,finished,1000,${ICON})\" >/dev/null\n"
  },
  {
    "path": "packages/addons/service/nextpvr/source/bin/nextpvr.start",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\noe_setup_addon service.nextpvr\n\n# check if nextpvr-server is already successful installed\nif [ ! -f \"${ADDON_DIR}/extract.ok\" ]; then\n  cd ${ADDON_DIR}\n  nextpvr-downloader\nfi\n\nexport NEXTPVR_DATADIR_USERDATA=${ADDON_HOME}/config/\nexport NEXTPVR_DVBDIR=${ADDON_DIR}/dtv-scan-tables/\n\nexport SATIP_RTSP_PORT=$satiprtsp\n\nread -d. uptime < /proc/uptime\nstartdelay=$((waitfor-uptime))\nif  [ $startdelay -gt 0 ]; then\n  sleep $startdelay\nfi\n\ncd ${ADDON_DIR}/nextpvr-bin\nexec dotnet ${ADDON_DIR}/nextpvr-bin/NextPVRServer.dll >/dev/null\n"
  },
  {
    "path": "packages/addons/service/nextpvr/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport xbmc\nimport xbmcaddon\n\nclass Monitor(xbmc.Monitor):\n\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n\n   def onSettingsChanged(self):\n      pass\n\nif __name__ == \"__main__\":\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/nextpvr/source/resources/Language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: nextpvr\n# Addon id: service.nextpvr\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Download\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"Download current Linux NPVR.zip\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"Check the NextPVR forum before updating\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"Manage Server\"\nmsgstr \"\"\n\nmsgctxt \"#30005\"\nmsgid \"Update guide\"\nmsgstr \"\"\n\nmsgctxt \"#30006\"\nmsgid \"Start an unscheduled EPG update\"\nmsgstr \"\"\n\nmsgctxt \"#30007\"\nmsgid \"Update IPTV m3u source\"\nmsgstr \"\"\n\nmsgctxt \"#30008\"\nmsgid \"Rescan m3u file(s) and update URLs\"\nmsgstr \"\"\n\nmsgctxt \"#30009\"\nmsgid \"Toggle custom HLS transcoding with default\"\nmsgstr \"\"\n\nmsgctxt \"#30010\"\nmsgid \"Change HLS transcoding mode, default will not work on all platforms\"\nmsgstr \"\"\n\nmsgctxt \"#30011\"\nmsgid \"Download NPVR.zip\"\nmsgstr \"\"\n\nmsgctxt \"#30012\"\nmsgid \"Extract NPVR.zip\"\nmsgstr \"\"\n\nmsgctxt \"#30013\"\nmsgid \"Rescan tuning devices\"\nmsgstr \"\"\n\nmsgctxt \"#30014\"\nmsgid \"Rescan for tuner changes after start-up\"\nmsgstr \"\"\n\nmsgctxt \"#30015\"\nmsgid \"Update EPG started\"\nmsgstr \"\"\n\nmsgctxt \"#30016\"\nmsgid \"Update m3u started\"\nmsgstr \"\"\n\nmsgctxt \"#30017\"\nmsgid \"Device refresh started\"\nmsgstr \"\"\n\nmsgctxt \"#30018\"\nmsgid \"Transcode set to default\"\nmsgstr \"\"\n\nmsgctxt \"#30019\"\nmsgid \"Transcode set to custom\"\nmsgstr \"\"\n\nmsgctxt \"#30020\"\nmsgid \"Restart server now\"\nmsgstr \"\"\n\nmsgctxt \"#30037\"\nmsgid \"Install the frequency scanning table for digital devices\"\nmsgstr \"\"\n\nmsgctxt \"#30038\"\nmsgid \"Download and install Scan-Tables\"\nmsgstr \"\"\n\nmsgctxt \"#30039\"\nmsgid \"Download completed and installed\"\nmsgstr \"\"\n\nmsgctxt \"#30040\"\nmsgid \"Could not download zip file\"\nmsgstr \"\"\n\nmsgctxt \"#30041\"\nmsgid \"Could not extract zip file\"\nmsgstr \"\"\n\nmsgctxt \"#30042\"\nmsgid \"Download Scan-Tables\"\nmsgstr \"\"\n\nmsgctxt \"#30043\"\nmsgid \"Extract Scan-Tables\"\nmsgstr \"\"\n\nmsgctxt \"#30044\"\nmsgid \"Reset web server credentials\"\nmsgstr \"\"\n\nmsgctxt \"#30045\"\nmsgid \"Reset to defaults Username: admin Password: password\"\nmsgstr \"\"\n\nmsgctxt \"#30046\"\nmsgid \"Set Username: admin Password: password\"\nmsgstr \"\"\n\nmsgctxt \"#30047\"\nmsgid \"SAT>IP RTSP port\"\nmsgstr \"\"\n\nmsgctxt \"#30048\"\nmsgid \"Default is 554 - TVHeadend uses 9983\"\nmsgstr \"\"\n\nmsgctxt \"#30049\"\nmsgid \"Startup uptime wait\"\nmsgstr \"\"\n\nmsgctxt \"#30050\"\nmsgid \"Delay service launch on boot to specified uptime (seconds)\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/nextpvr/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings  version=\"1\">\n <section id=\"service.nextpvr\">\n    <category id=\"download\" label=\"30001\">\n    <group id=\"0\">\n        <setting id=\"scantable\" type=\"action\" label=\"30038\" help=\"30037\">\n          <level>0</level>\n          <data>RunScript(service.nextpvr, getscantables)</data>\n          <control type=\"button\" format=\"action\">\n            <close>false</close>\n          </control>\n        </setting>\n        <setting id=\"update\" type=\"action\" label=\"30002\" help=\"30003\">\n          <level>2</level>\n          <data>RunScript(service.nextpvr, updategeneric)</data>\n          <control type=\"button\" format=\"action\">\n            <close>false</close>\n          </control>\n        </setting>\n      </group>\n    </category>\n    <category id=\"control\" label=\"30004\">\n      <group id=\"0\">\n        <setting id=\"waitfor\" type=\"integer\" label=\"30049\" help=\"30050\">\n          <level>1</level>\n          <default>5</default>\n          <constraints>\n            <minimum>5</minimum>\n            <step>1</step>\n            <maximum>60</maximum>\n          </constraints>\n          <control type=\"slider\" format=\"integer\">\n            <popup>false</popup>\n          </control>\n        </setting>\n        <setting id=\"updateepg\" type=\"action\" label=\"30005\" help=\"30006\">\n          <level>1</level>\n          <data>RunScript(service.nextpvr, updateepg)</data>\n          <control type=\"button\" format=\"action\">\n            <close>false</close>\n          </control>\n        </setting>\n        <setting id=\"updatem3u\" type=\"action\" label=\"30007\" help=\"30008\">\n          <level>3</level>\n          <data>RunScript(service.nextpvr, updatem3u)</data>\n          <control type=\"button\" format=\"action\">\n            <close>false</close>\n          </control>\n        </setting>\n        <setting id=\"rescan\" type=\"action\" label=\"30013\" help=\"30014\">\n          <level>2</level>\n          <data>RunScript(service.nextpvr, rescan)</data>\n          <control type=\"button\" format=\"action\">\n            <close>false</close>\n          </control>\n        </setting>\n        <setting id=\"transcode\" type=\"action\" label=\"30009\" help=\"30010\">\n          <level>3</level>\n          <data>RunScript(service.nextpvr, transcode)</data>\n          <control type=\"button\" format=\"action\">\n            <close>false</close>\n          </control>\n        </setting>\n        <setting id=\"defaults\" type=\"action\" label=\"30044\" help=\"30045\">\n          <level>3</level>\n          <data>RunScript(service.nextpvr, defaults)</data>\n          <control type=\"button\" format=\"action\">\n            <close>false</close>\n          </control>\n        </setting>\n        <setting id=\"satiprtsp\" type=\"integer\" label=\"30047\" help=\"30048\">\n          <level>1</level>\n          <default>554</default>\n          <control type=\"edit\" format=\"integer\">\n            <heading>30047</heading>\n          </control>\n        </setting>\n      </group>\n    </category>\n  </section>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/nextpvr/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"waitfor\" default=\"true\">5</setting>\n    <setting id=\"satiprtsp\" default=\"true\">554</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/nextpvr/source/system.d/service.nextpvr.service",
    "content": "[Unit]\nDescription=NextPVR Server\nDocumentation=https://nextpvr.com\nWants=multi-user.target\nAfter=multi-user.target\n\n[Service]\nSyslogIdentifier=%N\nExecStart=/bin/sh /storage/.kodi/addons/%N/bin/nextpvr.start\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/addons/service/oscam/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/oscam/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"oscam\"\nPKG_VERSION=\"db7c4cbdbd34a9b0464070b1a46e146e6029a2cb\" # 2022-10-22\nPKG_SHA256=\"b5dd1d0dc71553c8504d6982b6bae437d6bef17c6cd8a38ac4710a38300018cf\"\nPKG_VERSION_NUMBER=\"11715\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.streamboard.tv/oscam/wiki\"\nPKG_URL=\"https://repo.or.cz/oscam.git/snapshot/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain openssl pcsc-lite\"\nPKG_SECTION=\"service.softcam\"\nPKG_SHORTDESC=\"OSCam: an Open Source Conditional Access Modul\"\nPKG_LONGDESC=\"OSCam(${PKG_VERSION_NUMBER}) is a software to be used to decrypt digital television channels, as an alternative for a conditional access module.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"OSCam\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nPKG_CMAKE_OPTS_TARGET=\"\\\n  `#Building` \\\n  -DLIBUSBDIR=${SYSROOT_PREFIX}/usr \\\n  -DOPTIONAL_INCLUDE_DIR=${SYSROOT_PREFIX}/usr/include \\\n  \\\n  `#Readers` \\\n  -DCARDREADER_DB2COM=OFF \\\n  -DCARDREADER_DRECAS=ON \\\n  -DCARDREADER_INTERNAL=OFF \\\n  -DCARDREADER_MP35=ON \\\n  -DCARDREADER_PHOENIX=ON \\\n  -DCARDREADER_SC8IN1=ON \\\n  -DCARDREADER_SMARGO=ON \\\n  -DCARDREADER_STAPI5=OFF \\\n  -DCARDREADER_STAPI=OFF \\\n  -DCARDREADER_STINGER=ON \\\n  \\\n  `#Protocol` \\\n  -DMODULE_CAMD33=OFF \\\n  -DMODULE_CAMD35=ON \\\n  -DMODULE_CAMD35_TCP=ON \\\n  -DMODULE_CCCAM=ON \\\n  -DMODULE_CCCSHARE=ON \\\n  -DMODULE_CONSTCW=ON \\\n  -DMODULE_GBOX=ON \\\n  -DMODULE_GHTTP=ON \\\n  -DMODULE_NEWCAMD=ON \\\n  -DMODULE_PANDORA=ON \\\n  -DMODULE_RADEGAST=ON \\\n  -DMODULE_SCAM=ON \\\n  -DMODULE_SERIAL=ON \\\n  \\\n  `#Features` \\\n  -DCLOCKFIX=0 \\\n  -DCS_ANTICASC=ON \\\n  -DCS_CACHEEX=ON \\\n  -DCW_CYCLE_CHECK=ON \\\n  -DHAVE_DVBAPI=1 \\\n  -DHAVE_LIBCRYPTO=1 \\\n  -DSTATIC_LIBUSB=1 \\\n  -DTOUCH=ON \\\n  -DWEBIF=1 \\\n  -DWEBIF_LIVELOG=1 \\\n  -DWEBIF_JQUERY=1 \\\n  -DWITH_DEBUG=0 \\\n  -DWITH_SSL=1 \\\n  -DWITH_STAPI=0\"\n\npre_configure_target() {\n  export OSCAM_ADDON_VERSION=\"${PKG_VERSION_NUMBER}\"\n}\n\nmakeinstall_target() {\n  :\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/oscam ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/utils/list_smargo ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n}\n"
  },
  {
    "path": "packages/addons/service/oscam/patches/oscam-01-revision.patch",
    "content": "--- a/config.sh\n+++ b/config.sh\n@@ -701,7 +701,7 @@ do\n \t\tbreak\n \t;;\n \t'-r'|'--oscam-revision')\n-\t\trevision=`(svnversion -n . 2>/dev/null || printf 0) | sed 's/.*://; s/[^0-9]*$//; s/^$/0/'`\n+\t\techo \"$OSCAM_ADDON_VERSION\"\n \t\tif [ \"$revision\" = \"0\" ]\n \t\tthen\n \t\t\twhich git > /dev/null 2>&1 && revision=`git log -10 --pretty=%B | grep git-svn-id | head -n 1 | sed -n -e 's/^.*trunk@\\([0-9]*\\) .*$/\\1/p'`\n"
  },
  {
    "path": "packages/addons/service/oscam/patches/oscam-02-link-with-ludev.patch",
    "content": "--- a/CMakeLists.txt\n+++ b/CMakeLists.txt\n@@ -498,7 +498,7 @@ add_library (${csoscam} STATIC ${csoscam\n \n set (exe_name \"oscam\")\n add_executable (${exe_name} ${exe_srcs} ${exe_hdrs})\n-target_link_libraries (${exe_name} ${csoscam} ${csmodules} ${csreaders} csctapi cscrypt minilzo)\n+target_link_libraries (${exe_name} ${csoscam} ${csmodules} ${csreaders} csctapi cscrypt minilzo udev)\n if(HAVE_LIBRT AND HAVE_LIBUSB)\n \tif (LIBUSBDIR)\n \t\tset (libusb_link \"imp_libusb\")\n--- a/utils/CMakeLists.txt\n+++ b/utils/CMakeLists.txt\n@@ -12,7 +12,7 @@ file (GLOB all_srcs ${exe_srcs})\n \n set (util_name \"list_smargo\")\n add_executable (${util_name} ${exe_srcs} ${exe_hdrs})\n-target_link_libraries (${util_name} ${libusb_link} ${rt_link} ${setupapi_link} ${ole32_link} ${shell32_link} ${pthread_link} ${dl_link})\n+target_link_libraries (${util_name} ${libusb_link} ${rt_link} ${setupapi_link} ${ole32_link} ${shell32_link} ${pthread_link} ${dl_link} udev)\n #----------------------- printout resume -----------------------------\n \n message (STATUS \"Utils: operating system: ${OSCamOperatingSystem}\")\n"
  },
  {
    "path": "packages/addons/service/oscam/patches/oscam-03-pcsc-pthread.patch",
    "content": "--- a/CMakeLists.txt\n+++ b/CMakeLists.txt\n@@ -561,6 +561,7 @@ if (HAVE_PCSC)\n if (NOT OSCamOperatingSystem MATCHES \"Mac OS X\")\n if (NOT OSCamOperatingSystem MATCHES \"Windows/Cygwin\")\n \ttarget_link_libraries (${exe_name} pcsclite)\n+\ttarget_link_libraries (${exe_name} pthread)\n endif (NOT OSCamOperatingSystem MATCHES \"Windows/Cygwin\")\n endif (NOT OSCamOperatingSystem MATCHES \"Mac OS X\")\n endif (HAVE_PCSC)\n"
  },
  {
    "path": "packages/addons/service/oscam/source/bin/oscam.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.softcam.oscam\n\nmkdir -p $ADDON_HOME/config\nmkdir -p $ADDON_HOME/log\n\nfor config_name in \\\n  oscam.ac oscam.cert oscam.dvbapi oscam.guess oscam.ird oscam.provid \\\n  oscam.server oscam.services oscam.srvid oscam.tiers oscam.user\ndo\n  [ ! -f $ADDON_HOME/config/$config_name ] && touch $ADDON_HOME/config/$config_name\ndone\n\nif [ ! -f \"$ADDON_HOME/config/oscam.conf\" ]; then\n  cp $ADDON_DIR/oscam-default.conf $ADDON_HOME/config/oscam.conf\nfi\n\nfind $ADDON_DIR/bin -maxdepth 1 -type f ! -perm 0755 -exec chmod 0755 \\{\\} \\;\n\nif [ \"$WORKAROUND_SLEEP\" == \"true\" ] ; then\n  sleep $WORKAROUND_SLEEP_TIME\nfi\n\n# start userspace DVB driver/addon\nfor driver_dvb in $(find /storage/.kodi/addons/driver.dvb.*/bin/userspace-driver.sh -type f 2>/dev/null); do\n  driver_dvb_name=$(echo $driver_dvb | awk 'BEGIN {FS=\"/\"} {printf(\"%s\", $5)}')\n  logger -t OSCAM \"### Loading userspace DVB driver: $driver_dvb_name ###\"\n  # use \". \" because of variable export\n  . $driver_dvb\ndone\n\nif [ \"$WAIT_FOR_FEINIT\" == \"true\" ] ; then\n  while [ true ] ; do\n    if [ -e /dev/dvb/adapter$((NUM_ADAPTERS-1))/frontend0 ] ; then\n      break\n    fi\n    sleep 1\n  done\nfi\n\nexec oscam -c $ADDON_HOME/config > /dev/null 2>&1\n\n"
  },
  {
    "path": "packages/addons/service/oscam/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n"
  },
  {
    "path": "packages/addons/service/oscam/source/oscam-default.conf",
    "content": "#\n# main configuration\n#\n\n[global]\nnice          = -1\nWaitForCards  = 1\n\nusrfile                       = /storage/.kodi/userdata/addon_data/service.softcam.oscam/log/oscamuser.log\nlogfile                       = /storage/.kodi/userdata/addon_data/service.softcam.oscam/log/oscam.log\ncwlogdir                      = /storage/.kodi/userdata/addon_data/service.softcam.oscam/log/cw\nsaveinithistory               = 1\n\n[monitor]\nport                          = 988\naulow                         = 120\nhideclient_to                 = 15\nmonlevel                      = 1\nappendchaninfo                = 0\n\n[webif]\nhttpport                      = 8888\nhttpuser                      = oscam\nhttppwd                       = oscam\nhttpallowed                   = 0.0.0.0-255.255.255.255\n\n[dvbapi]\nenabled                       = 1\npmt_mode                      = 4\nboxtype                       = pc\n"
  },
  {
    "path": "packages/addons/service/oscam/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: oscam\n# Addon id: service.oscam\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"General\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Restart on suspend / resume\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"DVBAPI\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"Delay the start of OSCam\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"time (s)\"\nmsgstr \"\"\n\nmsgctxt \"#30005\"\nmsgid \"Wait for frontend initialization\"\nmsgstr \"\"\n\nmsgctxt \"#30006\"\nmsgid \"Number of adapters to wait for\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/oscam/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n    <category label=\"30000\">\n\t\t<setting type=\"sep\" />\n\t\t<setting id=\"RESTART_ON_RESUME\" type=\"bool\" label=\"30001\" default=\"false\" />\n\t\t<setting id=\"WORKAROUND_SLEEP\" type=\"bool\" label=\"30003\" default=\"false\" />\n\t\t<setting id=\"WORKAROUND_SLEEP_TIME\" type=\"slider\" range=\"1,30\" option=\"int\" label=\"30004\" default=\"1\" enable=\"eq(-1,true)\" />\n    </category>\n    <category label=\"30002\">\n\t\t<setting type=\"sep\" />\n\t\t<setting id=\"WAIT_FOR_FEINIT\" type=\"bool\" label=\"30005\" default=\"false\" />\n\t\t<setting id=\"NUM_ADAPTERS\" type=\"slider\" range=\"1,16\" option=\"int\" label=\"30006\" default=\"1\" enable=\"eq(-1,true)\" />\n    </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/oscam/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"NUM_ADAPTERS\">1</setting>\n    <setting id=\"RESTART_ON_RESUME\" default=\"true\">false</setting>\n    <setting id=\"WAIT_FOR_FEINIT\" default=\"true\">false</setting>\n    <setting id=\"WORKAROUND_SLEEP\" default=\"true\">false</setting>\n    <setting id=\"WORKAROUND_SLEEP_TIME\">1</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/oscam/source/sleep.d/oscam.power",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.softcam.oscam\n\nSERVICE=\"service.softcam.oscam.service\"\n\nif [ \"$RESTART_ON_RESUME\" == \"true\" ] ; then\n  case \"$1\" in\n    pre)\n      if systemctl is-active \"$SERVICE\" &>/dev/null ; then\n        systemctl stop \"$SERVICE\"\n      fi\n      ;;\n    post)\n      if systemctl is-enabled \"$SERVICE\" &>/dev/null ; then\n        systemctl start \"$SERVICE\"\n      fi\n      ;;\n  esac\nfi\n"
  },
  {
    "path": "packages/addons/service/oscam/source/system.d/service.softcam.oscam.service",
    "content": "[Unit]\nDescription=OSCam\nAfter=network-online.service\nRequires=network-online.service\n\n[Service]\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.softcam.oscam/bin/oscam.start\"\nTimeoutStopSec=1\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/pcscd/changelog.txt",
    "content": "1\n- ccid: update to 1.5.2\n"
  },
  {
    "path": "packages/addons/service/pcscd/config/reader.conf",
    "content": "# Gemalto reader with serial communication\n#  - n is the serial port to use n in [0..3]\n#  - reader is the reader name. It is needed for multi-slot readers.\n#    Possible reader values are: GemPCPinPad, GemCorePOSPro, GemCoreSIMPro,\n#    GemPCTwin (default value)\n# example: /dev/ttyS0:GemPCPinPad\n#FRIENDLYNAME      \"GemPCTwin serial\"\n#DEVICENAME        /dev/ttySn[:reader]\n#LIBPATH           /storage/.kodi/addons/service.pcscd/drivers/serial/libccidtwin.so\n#CHANNELID         n\n"
  },
  {
    "path": "packages/addons/service/pcscd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2011 Gregor Fuis (gujs@openelec.tv)\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pcscd\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain pcsc-lite libusb ccid\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Middleware to access a smart card using SCard API (PC/SC)\"\nPKG_LONGDESC=\"Middleware to access a smart card using SCard API (PC/SC)\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"PC/SC Smart Card Daemon\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n    cp -Pa $(get_install_dir pcsc-lite)/usr/sbin/pcscd ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/pcscd.bin\n\n  cp -a $(get_install_dir ccid)/storage/.kodi/addons/${PKG_ADDON_ID}/drivers ${ADDON_BUILD}/${PKG_ADDON_ID}\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/config\n    cp -Pa ${PKG_DIR}/config/* ${ADDON_BUILD}/${PKG_ADDON_ID}/config/\n}\n"
  },
  {
    "path": "packages/addons/service/pcscd/source/bin/pcscd.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.pcscd\n\nmkdir -p $ADDON_HOME/config\n\nchmod a+x $ADDON_DIR/bin/*\n\nif [ ! -f \"$ADDON_HOME/config/reader.conf\" ]; then\n  cp $ADDON_DIR/config/reader.conf $ADDON_HOME/config/reader.conf\nfi\n\nexec pcscd.bin --foreground -c $ADDON_HOME/config/reader.conf\n"
  },
  {
    "path": "packages/addons/service/pcscd/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\n\nclass Monitor(xbmc.Monitor):\n\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == \"__main__\":\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/pcscd/source/system.d/service.pcscd.service",
    "content": "[Unit]\nDescription=PCSC lite\nAfter=graphical.target\n\n[Service]\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.pcscd/bin/pcscd.start\"\nTimeoutStopSec=1\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/proftpd/changelog.txt",
    "content": "1\n- proftpd bumped to 1.3.8b\n  use TLS protocols v1.2 and v1.3\n  use 2048-bit key length for certificate\n\ninitial release\n"
  },
  {
    "path": "packages/addons/service/proftpd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"proftpd\"\nPKG_VERSION=\"1.3.8b\"\nPKG_SHA256=\"183ab7c6107de271a2959ff268f55c9b6c76b2cf0029e6584fccc019686601e0\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.proftpd.org/\"\nPKG_URL=\"https://github.com/proftpd/proftpd/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libcap openssl ncurses pcre2\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"ProFTPD: a FTP server for linux\"\nPKG_LONGDESC=\"ProFTPD (${PKG_VERSION}): is a secure and configurable FTP server with SSL/TLS support\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"ProFTPD Server\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nADDON_DIR=\"/storage/.kodi/addons/service.proftpd\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --enable-openssl \\\n                           --with-modules=mod_tls \\\n                           --enable-nls \\\n                           --localedir=${ADDON_DIR}/locale \\\n                           --enable-sendfile \\\n                           --enable-facl \\\n                           --enable-autoshadow \\\n                           --enable-ctrls \\\n                           --enable-ipv6 \\\n                           --enable-nls \\\n                           --enable-pcre2 \\\n                           --enable-largefile \\\n                           install_user=$(id -u) \\\n                           install_group=$(id -g)\"\n\npre_configure_target() {\n  export CFLAGS=\"${CFLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64\"\n  cd ..\n  rm -rf .${TARGET_NAME}\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp ${PKG_INSTALL}/usr/sbin/proftpd ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp ${PKG_INSTALL}/usr/bin/ftpwho ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp ${PKG_INSTALL}/usr/bin/ftptop ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/locale\n    for i in ${PKG_INSTALL}/storage/.kodi/addons/${PKG_ADDON_ID}/locale/*; do\n      cp ${i}/LC_MESSAGES/proftpd.mo ${ADDON_BUILD}/${PKG_ADDON_ID}/locale/${i##*/}.mo\n    done\n}\n"
  },
  {
    "path": "packages/addons/service/proftpd/patches/proftpd-100-llu.patch",
    "content": "diff -urN proftpd-1.3.4d-org/include/conf.h proftpd-1.3.4d-new/include/conf.h\n--- proftpd-1.3.4d-org/include/conf.h\t2011-05-23 22:35:35.000000000 +0200\n+++ proftpd-1.3.4d-new/include/conf.h\t2013-07-20 12:25:28.000000000 +0200\n@@ -360,13 +360,9 @@\n \n #endif\n \n-#if defined(HAVE_LLU) && SIZEOF_OFF_T == 8\n+/* correctly show file size larger than 2GB */\n # define PR_LU\t\t\"llu\"\n # define pr_off_t\tunsigned long long\n-#else\n-# define PR_LU\t\t\"lu\"\n-# define pr_off_t\tunsigned long\n-#endif\n \n /********************************************************************\n  * This is NOT the user configurable section.  Look in options.h\n"
  },
  {
    "path": "packages/addons/service/proftpd/source/bin/proftpd.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2012 x23\n# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2012-2015 ultraman\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\nmkdir -p \"/storage/.kodi/userdata/addon_data/service.proftpd\"\noe_setup_addon service.proftpd\n\nchmod a+x $ADDON_DIR/bin/*\n\nif [ ! -f \"$ADDON_HOME/proftpd.conf\" ]; then\n  cp $ADDON_DIR/etc/proftpd.conf $ADDON_HOME\nfi\n\nif [ ! -f \"$ADDON_HOME/openssl.cnf\" ]; then\n  cp $ADDON_DIR/etc/openssl.cnf $ADDON_HOME\nfi\n\n[ -z \"$Debuglevel\" ] && Debuglevel=0\n\nif [ ! -f \"$ADDON_HOME/proftpd.cert.pem\" -o ! -f \"$ADDON_HOME/proftpd.key.pem\" ]; then\n  openssl req -newkey rsa:${CertBitStrength} -config $ADDON_HOME/openssl.cnf -new -x509 -days \"$CertTTL\" -nodes -out \"$ADDON_HOME/proftpd.cert.pem\" -keyout \"$ADDON_HOME/proftpd.key.pem\"\nfi\n\n# Edit proftpd.conf with user settings\nif [ \"$TLSEngine\" = \"false\" ]; then\n  sed -i 's/TLSEngine.*/TLSEngine off/g' $ADDON_HOME/proftpd.conf\nelse\n  sed -i 's/TLSEngine.*/TLSEngine on/g' $ADDON_HOME/proftpd.conf\nfi\n\nif [ \"$AllowOverwrite\" = \"false\" ]; then\n  sed -i 's/AllowOverwrite.*/AllowOverwrite off/g' $ADDON_HOME/proftpd.conf\nelse\n  sed -i 's/AllowOverwrite.*/AllowOverwrite on/g' $ADDON_HOME/proftpd.conf\nfi\n\nsed -i 's/^Port.*/Port '$Port'/g' $ADDON_HOME/proftpd.conf\nsed -i 's/MaxClients .*/MaxClients '$MaxClients'/g' $ADDON_HOME/proftpd.conf\nsed -i 's/MaxClientsPerHost.*/MaxClientsPerHost '$MaxClientsPerHost'/g' $ADDON_HOME/proftpd.conf\nsed -i 's/MaxHostsPerUser.*/MaxHostsPerUser '$MaxHostsPerUser'/g' $ADDON_HOME/proftpd.conf\nsed -i 's/MaxInstances.*/MaxInstances '$MaxInstances'/g' $ADDON_HOME/proftpd.conf\nsed -i 's/Umask.*/Umask '$Umask'/g' $ADDON_HOME/proftpd.conf\nsed -i 's/ServerName.*/ServerName \"'\"$ServerName\"'\"/g' $ADDON_HOME/proftpd.conf\nsed -i 's/PassivePorts.*/PassivePorts '$PassivePorts' '$PassivePorts2'/g' $ADDON_HOME/proftpd.conf\n\nsed -i '/MasqueradeAddress.*/d' $ADDON_HOME/proftpd.conf\nif [ \"$MasqueradeAddress\" = \"true\" ]; then\n  sed -i '1i\\MasqueradeAddress '$MasqueradeAddress2'' $ADDON_HOME/proftpd.conf\nfi\n\nif [ \"$ServerIdent\" = \"false\" ]; then\n  sed -i 's/ServerIdent.*/ServerIdent off \"'\"$ServerIdentText\"'\"/g' $ADDON_HOME/proftpd.conf\nelse\n  sed -i 's/ServerIdent.*/ServerIdent on \"'\"$ServerIdentText\"'\"/g' $ADDON_HOME/proftpd.conf\nfi\n\nif [ \"$AllowForeignAddress\" = \"false\" ]; then\n  sed -i 's/AllowForeignAddress.*/AllowForeignAddress off/g' $ADDON_HOME/proftpd.conf\nelse\n  sed -i 's/AllowForeignAddress.*/AllowForeignAddress on/g' $ADDON_HOME/proftpd.conf\nfi\n\nif [ \"$AllowStoreRestart\" = \"false\" ]; then\n  sed -i 's/AllowStoreRestart.*/AllowStoreRestart off/g' $ADDON_HOME/proftpd.conf\nelse\n  sed -i 's/AllowStoreRestart.*/AllowStoreRestart on/g' $ADDON_HOME/proftpd.conf\nfi\n\nif [ \"$AllowRetrieveRestart\" = \"false\" ]; then\n  sed -i 's/AllowRetrieveRestart.*/AllowRetrieveRestart off/g' $ADDON_HOME/proftpd.conf\nelse\n  sed -i 's/AllowRetrieveRestart.*/AllowRetrieveRestart on/g' $ADDON_HOME/proftpd.conf\nfi\n\nif [ \"$RootLogin\" = \"false\" ]; then\n  sed -i 's/RootLogin.*/RootLogin off/g' $ADDON_HOME/proftpd.conf\nelse\n  sed -i 's/RootLogin.*/RootLogin on/g' $ADDON_HOME/proftpd.conf\nfi\n\nif [ \"$TLSRequired\" = \"false\" ]; then\n  sed -i 's/TLSRequired.*/TLSRequired off/g' $ADDON_HOME/proftpd.conf\nelse\n  sed -i 's/TLSRequired.*/TLSRequired on/g' $ADDON_HOME/proftpd.conf\nfi\n\ncd \"$ADDON_DIR/bin\"\n\nmkdir -p /var/config/\nrm -f /var/config/proftpd.passwd\ntouch /var/config/proftpd.passwd\nchmod 700 /var/config/proftpd.passwd\n\nfor NUM in $(seq 1 100); do\n  USERNAME=$(eval echo \\$Username${NUM})\n  USERPASS=$(eval echo \\$Userpass${NUM})\n  USERPATH=$(eval echo \\$Userpath${NUM})\n\n  case \"$CryptoHash\" in\n    \"0\") password_entry=$(openssl passwd -6 \"${USERPASS}\");;\n    \"1\") password_entry=$(openssl passwd -5 \"${USERPASS}\");;\n    \"2\") password_entry=$(openssl passwd -1 \"${USERPASS}\");;\n  esac\n\n  if [ -n \"$USERNAME\" ]; then\n    echo $USERNAME:$password_entry:10:10::$USERPATH:/bin/false >> /var/config/proftpd.passwd\n    # user writes with different user/group\n    mkdir -p \"$USERPATH\"\n    chmod 777 \"$USERPATH\"\n  fi\ndone\n\nexec proftpd -n -d $Debuglevel -c $ADDON_HOME/proftpd.conf\n"
  },
  {
    "path": "packages/addons/service/proftpd/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\n\nclass Monitor(xbmc.Monitor):\n\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == \"__main__\":\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/proftpd/source/etc/openssl.cnf",
    "content": "[ req ]\nprompt = no\ndistinguished_name = req_distinguished_name\n\n[ req_distinguished_name ]\nC = GB\nST = Test State\nL = Test Locality\nO = Org Name\nOU = Org Unit Name\nCN = Common Name\nemailAddress = test@email.com"
  },
  {
    "path": "packages/addons/service/proftpd/source/etc/proftpd.conf",
    "content": "ServerName \"ProFTPD\"\nServerType standalone\nDefaultServer on\nUseReverseDNS off\nServerIdent on \"FTP Server\"\nPort 21\nRootLogin on\nListOptions \"-il\"\nMaxClients 10\nMaxHostsPerUser 5\nMaxClientsPerHost 5\nUmask 022\nMaxInstances 30\nUser root\nGroup root\nDefaultRoot ~\nAllowForeignAddress on\n\nTransferLog /storage/.kodi/userdata/addon_data/service.proftpd/transfer.log\nExtendedLog /storage/.kodi/userdata/addon_data/service.proftpd/extended.log\nSystemLog /storage/.kodi/userdata/addon_data/service.proftpd/service.log\n\n# Trace DEFAULT:10\n# TraceLog /storage/.kodi/userdata/addon_data/service.proftpd/trace.log\n \nAuthGroupFile /etc/group\nAuthUserFile /var/config/proftpd.passwd\nRequireValidShell off\nAuthOrder mod_auth_unix.c mod_auth_file.c*\nUseFtpUsers off\nPersistentPasswd off\n \n<Global>\n Umask 022\n TimesGMT off\n DenyFilter \\*.*/\n PassivePorts 45000 45100\n</Global>\n \n<Directory /*>\n  AllowOverwrite on\n  AllowStoreRestart on\n  AllowRetrieveRestart on\n  GroupOwner root\n</Directory>\n\n<IfModule mod_tls.c>\n  TLSEngine on\n  TLSProtocol TLSv1.2 TLSv1.3\n  TLSRequired off\n  TLSVerifyClient off\n  TLSOptions NoSessionReuseRequired\n  TLSRSACertificateFile /storage/.kodi/userdata/addon_data/service.proftpd/proftpd.cert.pem\n  TLSRSACertificateKeyFile /storage/.kodi/userdata/addon_data/service.proftpd/proftpd.key.pem\n</IfModule>\n\n#<IfModule mod_lang.c>\n#  UseEncoding utf8 cp1251\n#</IfModule>\n"
  },
  {
    "path": "packages/addons/service/proftpd/source/resources/language/resource.language.en_gb/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: ProFTPD Server\n# Addon id: service.proftpd\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Kodi Addons\\n\"\n\"Report-Msgid-Bugs-To: https://forum.kodi.tv/\\n\"\n\"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n\"Last-Translator: Kodi Translation Team\\n\"\n\"Language-Team: Team-Kodi\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: en_GB\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\nmsgctxt \"#40000\"\nmsgid \"General\"\nmsgstr \"\"\n\nmsgctxt \"#40010\"\nmsgid \"Settings\"\nmsgstr \"\"\n\nmsgctxt \"#40030\"\nmsgid \"Allow Overwrite\"\nmsgstr \"\"\n\nmsgctxt \"#40040\"\nmsgid \"Port\"\nmsgstr \"\"\n\nmsgctxt \"#40050\"\nmsgid \"Max Clients\"\nmsgstr \"\"\n\nmsgctxt \"#40060\"\nmsgid \"Max Clients per Host\"\nmsgstr \"\"\n\nmsgctxt \"#40070\"\nmsgid \"Max Hosts per User\"\nmsgstr \"\"\n\nmsgctxt \"#40080\"\nmsgid \"Max Instances\"\nmsgstr \"\"\n\nmsgctxt \"#40090\"\nmsgid \"Umask\"\nmsgstr \"\"\n\nmsgctxt \"#40100\"\nmsgid \"Server Name\"\nmsgstr \"\"\n\nmsgctxt \"#40110\"\nmsgid \"Server Ident\"\nmsgstr \"\"\n\nmsgctxt \"#40120\"\nmsgid \"Server Ident Text\"\nmsgstr \"\"\n\nmsgctxt \"#40180\"\nmsgid \"Allow Store Restart\"\nmsgstr \"\"\n\nmsgctxt \"#40190\"\nmsgid \"Allow Retrieve Restart\"\nmsgstr \"\"\n\nmsgctxt \"#40200\"\nmsgid \"Allow Root Login\"\nmsgstr \"\"\n\nmsgctxt \"#40210\"\nmsgid \"Debug level\"\nmsgstr \"\"\n\nmsgctxt \"#50000\"\nmsgid \"User\"\nmsgstr \"\"\n\nmsgctxt \"#50010\"\nmsgid \"Hash Algorithm\"\nmsgstr \"\"\n\nmsgctxt \"#50020\"\nmsgid \"Username 1\"\nmsgstr \"\"\n\nmsgctxt \"#50030\"\nmsgid \"User Password 1\"\nmsgstr \"\"\n\nmsgctxt \"#50040\"\nmsgid \"User Path 1\"\nmsgstr \"\"\n\nmsgctxt \"#50050\"\nmsgid \"Username 2\"\nmsgstr \"\"\n\nmsgctxt \"#50060\"\nmsgid \"User Password 2\"\nmsgstr \"\"\n\nmsgctxt \"#50070\"\nmsgid \"User Path 2\"\nmsgstr \"\"\n\nmsgctxt \"#50080\"\nmsgid \"Username 3\"\nmsgstr \"\"\n\nmsgctxt \"#50090\"\nmsgid \"User Password 3\"\nmsgstr \"\"\n\nmsgctxt \"#50100\"\nmsgid \"User Path 3\"\nmsgstr \"\"\n\nmsgctxt \"#50110\"\nmsgid \"Username 4\"\nmsgstr \"\"\n\nmsgctxt \"#50120\"\nmsgid \"User Password 4\"\nmsgstr \"\"\n\nmsgctxt \"#50130\"\nmsgid \"User Path 4\"\nmsgstr \"\"\n\nmsgctxt \"#50140\"\nmsgid \"Username 5\"\nmsgstr \"\"\n\nmsgctxt \"#50150\"\nmsgid \"User Password 5\"\nmsgstr \"\"\n\nmsgctxt \"#50160\"\nmsgid \"User Path 5\"\nmsgstr \"\"\n\nmsgctxt \"#60000\"\nmsgid \"TLS\"\nmsgstr \"\"\n\nmsgctxt \"#60010\"\nmsgid \"Allow TLS Engine\"\nmsgstr \"\"\n\nmsgctxt \"#60020\"\nmsgid \"TLS Required\"\nmsgstr \"\"\n\nmsgctxt \"#60030\"\nmsgid \"Certificat Lifetime (Days)\"\nmsgstr \"\"\n\nmsgctxt \"#60040\"\nmsgid \"Certificat Hash Algorithm\"\nmsgstr \"\"\n\nmsgctxt \"#60050\"\nmsgid \"Certificat Cryptosystem\"\nmsgstr \"\"\n\nmsgctxt \"#60060\"\nmsgid \"Certificat Bit-Strength\"\nmsgstr \"\"\n\nmsgctxt \"#70000\"\nmsgid \"FXP\"\nmsgstr \"\"\n\nmsgctxt \"#70010\"\nmsgid \"Allow Foreign Address\"\nmsgstr \"\"\n\nmsgctxt \"#70020\"\nmsgid \"Passive Portrange Start\"\nmsgstr \"\"\n\nmsgctxt \"#70030\"\nmsgid \"Passive Portrange End\"\nmsgstr \"\"\n\nmsgctxt \"#70040\"\nmsgid \"Enable Masquerade Address\"\nmsgstr \"\"\n\nmsgctxt \"#70050\"\nmsgid \"Masquerade Address\"\nmsgstr \"\"\n\n"
  },
  {
    "path": "packages/addons/service/proftpd/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n  <category label=\"40000\">\n    <setting type=\"lsep\" />\n    <setting id=\"Port\"                 type=\"number\"    label=\"40040\" default=\"21\" />\n    <setting id=\"MaxClients\"           type=\"number\"    label=\"40050\" default=\"10\" />\n    <setting id=\"MaxClientsPerHost\"    type=\"number\"    label=\"40060\" default=\"5\" />\n    <setting id=\"MaxHostsPerUser\"      type=\"number\"    label=\"40070\" default=\"5\" />\n    <setting id=\"MaxInstances\"         type=\"number\"    label=\"40080\" default=\"30\" />\n    <setting id=\"Umask\"                type=\"number\"    label=\"40090\" default=\"022\" />\n    <setting id=\"ServerName\"           type=\"text\"      label=\"40100\" default=\"ProFTPD on LibreELEC\"/>\n    <setting id=\"ServerIdent\"          type=\"bool\"      label=\"40110\" default=\"true\"               />\n    <setting id=\"ServerIdentText\"      type=\"text\"      label=\"40120\" default=\"LibreELEC\" visible=\"eq(-1,true)\" />\n    <setting id=\"AllowOverwrite\"       type=\"bool\"      label=\"40030\" default=\"true\" />\n    <setting id=\"AllowStoreRestart\"    type=\"bool\"      label=\"40180\" default=\"true\" />\n    <setting id=\"AllowRetrieveRestart\" type=\"bool\"      label=\"40190\" default=\"true\" />\n    <setting id=\"RootLogin\"            type=\"bool\"      label=\"40200\" default=\"true\" />\n    <setting id=\"Debuglevel\"           type=\"labelenum\" label=\"40210\" default=\"0\" values=\"0|1|2|3|4|5|6|7|8|9|10\" />\n  </category>\n  <category label=\"60000\">\n    <setting type=\"lsep\" />\n    <setting id=\"TLSEngine\"       type=\"bool\"   label=\"60010\" default=\"true\" />\n    <setting id=\"TLSRequired\"     type=\"bool\"   label=\"60020\" default=\"false\" visible=\"eq(-1,true)\" />\n    <setting id=\"CertTTL\"         type=\"number\" label=\"60030\" default=\"36500\" />\n    <setting id=\"CertHash\"        type=\"enum\"   label=\"60040\" default=\"sha1\" values=\"sha1\" />\n    <setting id=\"CertCrypto\"      type=\"enum\"   label=\"60050\" default=\"x509\" values=\"rsa|x509\" />\n    <setting id=\"CertBitStrength\" type=\"number\" label=\"60060\" default=\"2048\" />\n  </category>\n  <category label=\"70000\">\n    <setting type=\"lsep\" />\n    <setting id=\"AllowForeignAddress\" type=\"bool\"   label=\"70010\" default=\"true\" />\n    <setting id=\"PassivePorts\"        type=\"number\" label=\"70020\" default=\"45000\" />\n    <setting id=\"PassivePorts2\"       type=\"number\" label=\"70030\" default=\"45100\" />\n    <setting id=\"MasqueradeAddress\"   type=\"bool\"   label=\"70040\" default=\"true\" />\n    <setting id=\"MasqueradeAddress2\"  type=\"text\"   label=\"70050\" default=\"127.0.0.1\" visible=\"eq(-1,true)\" />\n  </category>\n  <category label=\"50000\">\n    <setting type=\"lsep\" />\n    <setting id=\"CryptoHash\" type=\"enum\" label=\"50010\" default=\"sha-512\" values=\"sha-512|sha-256|md5\" />\n    <setting type=\"lsep\" />\n    <setting id=\"Username1\"  type=\"text\"   label=\"50020\" default=\"\" />\n    <setting id=\"Userpass1\"  type=\"text\"   label=\"50030\" default=\"\"         enable=\"!eq(-1,)\" />\n    <setting id=\"Userpath1\"  type=\"folder\" label=\"50040\" default=\"/storage\" enable=\"!eq(-1,)\" option=\"writeable\" />\n    <setting type=\"lsep\" />\n    <setting id=\"Username2\"  type=\"text\"   label=\"50050\" default=\"\"         visible=\"!eq(-3,)\" />\n    <setting id=\"Userpass2\"  type=\"text\"   label=\"50060\" default=\"\"         visible=\"!eq(-4,)\" enable=\"!eq(-1,)\" />\n    <setting id=\"Userpath2\"  type=\"folder\" label=\"50070\" default=\"/storage\" visible=\"!eq(-5,)\" enable=\"!eq(-1,)\"  option=\"writeable\" />\n    <setting type=\"lsep\" />\n    <setting id=\"Username3\"  type=\"text\"   label=\"50080\" default=\"\"         visible=\"!eq(-3,)\" />\n    <setting id=\"Userpass3\"  type=\"text\"   label=\"50090\" default=\"\"         visible=\"!eq(-4,)\" enable=\"!eq(-1,)\" />\n    <setting id=\"Userpath3\"  type=\"folder\" label=\"50100\" default=\"/storage\" visible=\"!eq(-5,)\" enable=\"!eq(-1,)\"  option=\"writeable\" />\n    <setting type=\"lsep\" />\n    <setting id=\"Username4\"  type=\"text\"   label=\"50110\" default=\"\"         visible=\"!eq(-3,)\" />\n    <setting id=\"Userpass4\"  type=\"text\"   label=\"50120\" default=\"\"         visible=\"!eq(-4,)\" enable=\"!eq(-1,)\" />\n    <setting id=\"Userpath4\"  type=\"folder\" label=\"50130\" default=\"/storage\" visible=\"!eq(-5,)\" enable=\"!eq(-1,)\" option=\"writeable\" />\n    <setting type=\"lsep\" />\n    <setting id=\"Username5\"  type=\"text\"   label=\"50140\" default=\"\"         visible=\"!eq(-3,)\" />\n    <setting id=\"Userpass5\"  type=\"text\"   label=\"50150\" default=\"\"         visible=\"!eq(-4,)\" enable=\"!eq(-1,)\" />\n    <setting id=\"Userpath5\"  type=\"folder\" label=\"50160\" default=\"/storage\" visible=\"!eq(-5,)\" enable=\"!eq(-1,)\"  option=\"writeable\" />\n  </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/proftpd/source/settings-default.xml",
    "content": "<settings>\n    <setting id=\"AllowForeignAddress\" value=\"true\" />\n    <setting id=\"AllowOverwrite\" value=\"true\" />\n    <setting id=\"AllowRetrieveRestart\" value=\"true\" />\n    <setting id=\"AllowStoreRestart\" value=\"true\" />\n    <setting id=\"CertBitStrength\" value=\"2048\" />\n    <setting id=\"CertCrypto\" value=\"0\" />\n    <setting id=\"CertHash\" value=\"0\" />\n    <setting id=\"CertTTL\" value=\"36500\" />\n    <setting id=\"CryptoHash\" value=\"0\" />\n    <setting id=\"MasqueradeAddress\" value=\"false\" />\n    <setting id=\"MasqueradeAddress2\" value=\"192.168.1.5\" />\n    <setting id=\"MaxClients\" value=\"10\" />\n    <setting id=\"MaxClientsPerHost\" value=\"5\" />\n    <setting id=\"MaxHostsPerUser\" value=\"5\" />\n    <setting id=\"MaxInstances\" value=\"30\" />\n    <setting id=\"PassivePorts\" value=\"45000\" />\n    <setting id=\"PassivePorts2\" value=\"45100\" />\n    <setting id=\"Port\" value=\"21\" />\n    <setting id=\"RootLogin\" value=\"true\" />\n    <setting id=\"Debuglevel\" value=\"0\" />\n    <setting id=\"ServerIdent\" value=\"true\" />\n    <setting id=\"ServerIdentText\" value=\"LibreELEC\" />\n    <setting id=\"ServerName\" value=\"ProFTPD on LibreELEC\" />\n    <setting id=\"TLSEngine\" value=\"true\" />\n    <setting id=\"TLSRequired\" value=\"false\" />\n    <setting id=\"Umask\" value=\"022\" />\n    <setting id=\"Username1\" value=\"\" />\n    <setting id=\"Username2\" value=\"\" />\n    <setting id=\"Username3\" value=\"\" />\n    <setting id=\"Username4\" value=\"\" />\n    <setting id=\"Username5\" value=\"\" />\n    <setting id=\"Userpass1\" value=\"\" />\n    <setting id=\"Userpass2\" value=\"\" />\n    <setting id=\"Userpass3\" value=\"\" />\n    <setting id=\"Userpass4\" value=\"\" />\n    <setting id=\"Userpass5\" value=\"\" />\n    <setting id=\"Userpath1\" value=\"/storage\" />\n    <setting id=\"Userpath2\" value=\"/storage\" />\n    <setting id=\"Userpath3\" value=\"/storage\" />\n    <setting id=\"Userpath4\" value=\"/storage\" />\n    <setting id=\"Userpath5\" value=\"/storage\" />\n</settings>\n"
  },
  {
    "path": "packages/addons/service/proftpd/source/system.d/service.proftpd.service",
    "content": "[Unit]\nDescription=ProFTPD\nAfter=network-online.service\nRequires=network-online.service\n\n[Service]\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.proftpd/bin/proftpd.start\"\nTimeoutStopSec=2\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/addons/service/prometheus-node-exporter/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/prometheus-node-exporter/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"prometheus-node-exporter\"\nPKG_VERSION=\"1.5.0\"\nPKG_SHA256=\"67c6d59359d8c484e1e28d0a52a971eebe687f083c5fbb35c5e651543e5d0ea4\"\nPKG_REV=\"0\"\nPKG_LICENSE=\"Apache License 2.0\"\nPKG_SITE=\"https://github.com/prometheus/node_exporter\"\nPKG_URL=\"https://github.com/prometheus/node_exporter/archive/refs/tags/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain go:host systemd\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Prometheus exporter for machine metrics.\"\nPKG_LONGDESC=\"Prometheus exporter for hardware and OS metrics exposed by the kernel.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Prometheus Node Exporter\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nconfigure_target() {\n  go_configure\n\n  export LDFLAGS=\"-w -linkmode external -extldflags -Wl,--unresolved-symbols=ignore-in-shared-libs -extld ${CC} \\\n                  -X github.com/prometheus/common/version.Version=${PKG_VERSION} \\\n                  -X github.com/prometheus/common/version.Revision=${PKG_REV} \\\n                  -X github.com/prometheus/common/version.Branch=master \\\n                  -X github.com/prometheus/common/version.BuildUser=root@libreelec \\\n                  -X github.com/prometheus/common/version.BuildDate=$(date '+%Y%m%d-%H:%M:%S')\"\n}\n\nmake_target() {\n  ${GOLANG} build -a -ldflags \"${LDFLAGS}\" -o bin/prometheus-node-exporter -v\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp -P ${PKG_BUILD}/bin/prometheus-node-exporter ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n}\n\n"
  },
  {
    "path": "packages/addons/service/prometheus-node-exporter/source/bin/prometheus-node-exporter.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.prometheus-node-exporter\n\nDAEMON_ARGS=\"\"\n\nwhile read var opt ; do\n  eval [ \\\"\\$${var}\\\" = \"true\" ] && DAEMON_ARGS=\"${DAEMON_ARGS} ${opt}\"\ndone << EOF\nWebDisableExporterMetrics --web.disable-exporter-metrics\nCollectorArp --collector.arp\nCollectorBcache --collector.bcache\nCollectorBonding --collector.bonding\nCollectorBtrfs --collector.btrfs\nCollectorBuddyinfo --collector.buddyinfo\nCollectorConntrack --collector.conntrack\nCollectorCpu --collector.cpu\nCollectorCpufreq --collector.cpufreq\nCollectorDiskstats --collector.diskstats\nCollectorDrbd --collector.drbd\nCollectorEdac --collector.edac\nCollectorEntropy --collector.entropy\nCollectorEthtool --collector.ethtool\nCollectorFibrechannel --collector.fibrechannel\nCollectorFilefd --collector.filefd\nCollectorFilesystem --collector.filesystem\nCollectorHwmon --collector.hwmon\nCollectorInfiniband --collector.infiniband\nCollectorInterrupts --collector.interrupts\nCollectorIpvs --collector.ipvs\nCollectorKsmd --collector.ksmd\nCollectorLoadavg --collector.loadavg\nCollectorLogind --collector.logind\nCollectorMdadm --collector.mdadm\nCollectorMeminfo --collector.meminfo\nCollectorMeminfoNuma --collector.meminfo_numa\nCollectorMountstats --collector.mountstats\nCollectorNetclass --collector.netclass\nCollectorNetdev --collector.netdev\nCollectorNetstat --collector.netstat\nCollectorNetworkRoute --collector.network_route\nCollectorNfs --collector.nfs\nCollectorNfsd --collector.nfsd\nCollectorNtp --collector.ntp\nCollectorNvme --collector.nvme\nCollectorPerf --collector.perf\nCollectorPowersupplyclass --collector.powersupplyclass\nCollectorPressure --collector.pressure\nCollectorProcesses --collector.processes\nCollectorQdisc --collector.qdisc\nCollectorRapl --collector.rapl\nCollectorRunit --collector.runit\nCollectorSchedstat --collector.schedstat\nCollectorSockstat --collector.sockstat\nCollectorSoftnet --collector.softnet\nCollectorStat --collector.stat\nCollectorSupervisord --collector.supervisord\nCollectorSystemd --collector.systemd\nCollectorTapestats --collector.tapestats\nCollectorTcpstat --collector.tcpstat\nCollectorTextfile --collector.textfile\nCollectorThermalZone --collector.thermal_zone\nCollectorTime --collector.time\nCollectorTimex --collector.timex\nCollectorUdpQueues --collector.udp_queues\nCollectorUname --collector.uname\nCollectorVmstat --collector.vmstat\nCollectorWifi --collector.wifi\nCollectorXfs --collector.xfs\nCollectorZfs --collector.zfs\nCollectorZoneinfo --collector.zoneinfo\nEOF\n\n/storage/.kodi/addons/service.prometheus-node-exporter/bin/prometheus-node-exporter --collector.disable-defaults \\\n  --web.listen-address=\":$WebListenPort\" \\\n  --web.telemetry-path=\"$WebTelemetryPath\" \\\n  --web.max-requests=$WebMaxRequest \\\n  $DAEMON_ARGS\n"
  },
  {
    "path": "packages/addons/service/prometheus-node-exporter/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\r\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\r\n\r\nimport subprocess\r\nimport xbmc\r\nimport xbmcaddon\r\n\r\n\r\nclass Monitor(xbmc.Monitor):\r\n\r\n   def __init__(self, *args, **kwargs):\r\n      xbmc.Monitor.__init__(self)\r\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\r\n\r\n   def onSettingsChanged(self):\r\n      subprocess.call(['systemctl', 'restart', self.id])\r\n\r\n\r\nif __name__ == \"__main__\":\r\n   Monitor().waitForAbort()\r\n"
  },
  {
    "path": "packages/addons/service/prometheus-node-exporter/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: node_exporter\n# Addon id: service.node_exporter\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"General\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Listen Port\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"Metrics web path\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"Disable exporter self metrics\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"Max simultaneous request\"\nmsgstr \"\"\n\nmsgctxt \"#30100\"\nmsgid \"Collectors\"\nmsgstr \"\"\n\nmsgctxt \"#30101\"\nmsgid \"Arp\"\nmsgstr \"\"\n\nmsgctxt \"#30102\"\nmsgid \"Bcache\"\nmsgstr \"\"\n\nmsgctxt \"#30103\"\nmsgid \"Bonding\"\nmsgstr \"\"\n\nmsgctxt \"#30104\"\nmsgid \"Btrfs\"\nmsgstr \"\"\n\nmsgctxt \"#30105\"\nmsgid \"Buddyinfo\"\nmsgstr \"\"\n\nmsgctxt \"#30106\"\nmsgid \"Conntrack\"\nmsgstr \"\"\n\nmsgctxt \"#30107\"\nmsgid \"Cpu\"\nmsgstr \"\"\n\nmsgctxt \"#30108\"\nmsgid \"Cpufreq\"\nmsgstr \"\"\n\nmsgctxt \"#30109\"\nmsgid \"Diskstats\"\nmsgstr \"\"\n\nmsgctxt \"#30110\"\nmsgid \"Drbd\"\nmsgstr \"\"\n\nmsgctxt \"#30111\"\nmsgid \"Edac\"\nmsgstr \"\"\n\nmsgctxt \"#30112\"\nmsgid \"Entropy\"\nmsgstr \"\"\n\nmsgctxt \"#30113\"\nmsgid \"Ethtool\"\nmsgstr \"\"\n\nmsgctxt \"#30114\"\nmsgid \"Fibrechannel\"\nmsgstr \"\"\n\nmsgctxt \"#30115\"\nmsgid \"Filefd\"\nmsgstr \"\"\n\nmsgctxt \"#30116\"\nmsgid \"Filesystem\"\nmsgstr \"\"\n\nmsgctxt \"#30117\"\nmsgid \"Hwmon\"\nmsgstr \"\"\n\nmsgctxt \"#30118\"\nmsgid \"Infiniband\"\nmsgstr \"\"\n\nmsgctxt \"#30119\"\nmsgid \"Interrupts\"\nmsgstr \"\"\n\nmsgctxt \"#30120\"\nmsgid \"Ipvs\"\nmsgstr \"\"\n\nmsgctxt \"#30121\"\nmsgid \"Ksmd\"\nmsgstr \"\"\n\nmsgctxt \"#30122\"\nmsgid \"Loadavg\"\nmsgstr \"\"\n\nmsgctxt \"#30123\"\nmsgid \"Logind\"\nmsgstr \"\"\n\nmsgctxt \"#30124\"\nmsgid \"Mdadm\"\nmsgstr \"\"\n\nmsgctxt \"#30125\"\nmsgid \"Meminfo\"\nmsgstr \"\"\n\nmsgctxt \"#30126\"\nmsgid \"MeminfoNuma\"\nmsgstr \"\"\n\nmsgctxt \"#30127\"\nmsgid \"Mountstats\"\nmsgstr \"\"\n\nmsgctxt \"#30128\"\nmsgid \"Netclass\"\nmsgstr \"\"\n\nmsgctxt \"#30129\"\nmsgid \"Netdev\"\nmsgstr \"\"\n\nmsgctxt \"#30130\"\nmsgid \"Netstat\"\nmsgstr \"\"\n\nmsgctxt \"#30131\"\nmsgid \"Network Route\"\nmsgstr \"\"\n\nmsgctxt \"#30132\"\nmsgid \"Nfs\"\nmsgstr \"\"\n\nmsgctxt \"#30133\"\nmsgid \"Nfsd\"\nmsgstr \"\"\n\nmsgctxt \"#30134\"\nmsgid \"Ntp\"\nmsgstr \"\"\n\nmsgctxt \"#30135\"\nmsgid \"Nvme\"\nmsgstr \"\"\n\nmsgctxt \"#30136\"\nmsgid \"Perf\"\nmsgstr \"\"\n\nmsgctxt \"#30137\"\nmsgid \"Powersupplyclass\"\nmsgstr \"\"\n\nmsgctxt \"#30138\"\nmsgid \"Pressure\"\nmsgstr \"\"\n\nmsgctxt \"#30139\"\nmsgid \"Processes\"\nmsgstr \"\"\n\nmsgctxt \"#30140\"\nmsgid \"Qdisc\"\nmsgstr \"\"\n\nmsgctxt \"#30141\"\nmsgid \"Rapl\"\nmsgstr \"\"\n\nmsgctxt \"#30142\"\nmsgid \"Runit\"\nmsgstr \"\"\n\nmsgctxt \"#30143\"\nmsgid \"Schedstat\"\nmsgstr \"\"\n\nmsgctxt \"#30144\"\nmsgid \"Sockstat\"\nmsgstr \"\"\n\nmsgctxt \"#30145\"\nmsgid \"Softnet\"\nmsgstr \"\"\n\nmsgctxt \"#30146\"\nmsgid \"Stat\"\nmsgstr \"\"\n\nmsgctxt \"#30147\"\nmsgid \"Supervisord\"\nmsgstr \"\"\n\nmsgctxt \"#30148\"\nmsgid \"Systemd\"\nmsgstr \"\"\n\nmsgctxt \"#30149\"\nmsgid \"Tapestats\"\nmsgstr \"\"\n\nmsgctxt \"#30150\"\nmsgid \"Tcpstat\"\nmsgstr \"\"\n\nmsgctxt \"#30151\"\nmsgid \"Textfile\"\nmsgstr \"\"\n\nmsgctxt \"#30152\"\nmsgid \"Thermal Zone\"\nmsgstr \"\"\n\nmsgctxt \"#30153\"\nmsgid \"Time\"\nmsgstr \"\"\n\nmsgctxt \"#30154\"\nmsgid \"Timex\"\nmsgstr \"\"\n\nmsgctxt \"#30155\"\nmsgid \"Udp Queues\"\nmsgstr \"\"\n\nmsgctxt \"#30156\"\nmsgid \"Uname\"\nmsgstr \"\"\n\nmsgctxt \"#30157\"\nmsgid \"Vmstat\"\nmsgstr \"\"\n\nmsgctxt \"#30158\"\nmsgid \"Wifi\"\nmsgstr \"\"\n\nmsgctxt \"#30159\"\nmsgid \"Xfs\"\nmsgstr \"\"\n\nmsgctxt \"#30160\"\nmsgid \"Zfs\"\nmsgstr \"\"\n\nmsgctxt \"#30161\"\nmsgid \"Zoneinfo\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/prometheus-node-exporter/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<settings>\n    <category label=\"30000\">\n        <setting id=\"WebListenPort\"             label=\"30001\" type=\"number\" default=\"9100\"     />\n        <setting id=\"WebTelemetryPath\"          label=\"30002\" type=\"text\"   default=\"/metrics\" />\n        <setting id=\"WebDisableExporterMetrics\" label=\"30003\" type=\"bool\"   default=\"false\"    />\n        <setting id=\"WebMaxRequest\"             label=\"30004\" type=\"number\" default=\"40\"       />\n    </category>\n    <category label=\"30100\">\n        <setting id=\"CollectorArp\"              label=\"30101\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorBcache\"           label=\"30102\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorBonding\"          label=\"30103\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorBtrfs\"            label=\"30104\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorBuddyinfo\"        label=\"30105\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorConntrack\"        label=\"30106\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorCpu\"              label=\"30107\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorCpufreq\"          label=\"30108\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorDiskstats\"        label=\"30109\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorDrbd\"             label=\"30110\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorEdac\"             label=\"30111\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorEntropy\"          label=\"30112\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorEthtool\"          label=\"30113\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorFibrechannel\"     label=\"30114\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorFilefd\"           label=\"30115\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorFilesystem\"       label=\"30116\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorHwmon\"            label=\"30117\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorInfiniband\"       label=\"30118\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorInterrupts\"       label=\"30119\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorIpvs\"             label=\"30120\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorKsmd\"             label=\"30121\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorLoadavg\"          label=\"30122\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorLogind\"           label=\"30123\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorMdadm\"            label=\"30124\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorMeminfo\"          label=\"30125\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorMeminfoNuma\"      label=\"30126\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorMountstats\"       label=\"30127\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorNetclass\"         label=\"30128\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorNetdev\"           label=\"30129\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorNetstat\"          label=\"30130\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorNetworkRoute\"     label=\"30131\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorNfs\"              label=\"30132\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorNfsd\"             label=\"30133\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorNtp\"              label=\"30134\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorNvme\"             label=\"30135\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorPerf\"             label=\"30136\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorPowersupplyclass\" label=\"30137\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorPressure\"         label=\"30138\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorProcesses\"        label=\"30139\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorQdisc\"            label=\"30140\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorRapl\"             label=\"30141\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorRunit\"            label=\"30142\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorSchedstat\"        label=\"30143\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorSockstat\"         label=\"30144\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorSoftnet\"          label=\"30145\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorStat\"             label=\"30146\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorSupervisord\"      label=\"30147\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorSystemd\"          label=\"30148\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorTapestats\"        label=\"30149\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorTcpstat\"          label=\"30150\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorTextfile\"         label=\"30151\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorThermalZone\"      label=\"30152\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorTime\"             label=\"30153\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorTimex\"            label=\"30154\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorUdpQueues\"        label=\"30155\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorUname\"            label=\"30156\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorVmstat\"           label=\"30157\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorWifi\"             label=\"30158\" type=\"bool\" default=\"false\" />\n        <setting id=\"CollectorXfs\"              label=\"30159\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorZfs\"              label=\"30160\" type=\"bool\" default=\"true\"  />\n        <setting id=\"CollectorZoneinfo\"         label=\"30161\" type=\"bool\" default=\"false\" />\n    </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/prometheus-node-exporter/source/settings-default.xml",
    "content": "<settings>\n    <setting id=\"WebListenPort\"             value=\"9100\"     />\n    <setting id=\"WebTelemetryPath\"          value=\"/metrics\" />\n    <setting id=\"WebDisableExporterMetrics\" value=\"false\"    />\n    <setting id=\"WebMaxRequest\"             value=\"40\"       />\n    <setting id=\"CollectorArp\"              value=\"true\"     />\n    <setting id=\"CollectorBcache\"           value=\"true\"     />\n    <setting id=\"CollectorBonding\"          value=\"true\"     />\n    <setting id=\"CollectorBtrfs\"            value=\"true\"     />\n    <setting id=\"CollectorBuddyinfo\"        value=\"false\"    />\n    <setting id=\"CollectorConntrack\"        value=\"true\"     />\n    <setting id=\"CollectorCpu\"              value=\"true\"     />\n    <setting id=\"CollectorCpufreq\"          value=\"true\"     />\n    <setting id=\"CollectorDiskstats\"        value=\"true\"     />\n    <setting id=\"CollectorDrbd\"             value=\"false\"    />\n    <setting id=\"CollectorEdac\"             value=\"true\"     />\n    <setting id=\"CollectorEntropy\"          value=\"true\"     />\n    <setting id=\"CollectorEthtool\"          value=\"false\"    />\n    <setting id=\"CollectorFibrechannel\"     value=\"true\"     />\n    <setting id=\"CollectorFilefd\"           value=\"true\"     />\n    <setting id=\"CollectorFilesystem\"       value=\"true\"     />\n    <setting id=\"CollectorHwmon\"            value=\"true\"     />\n    <setting id=\"CollectorInfiniband\"       value=\"true\"     />\n    <setting id=\"CollectorInterrupts\"       value=\"false\"    />\n    <setting id=\"CollectorIpvs\"             value=\"true\"     />\n    <setting id=\"CollectorKsmd\"             value=\"false\"    />\n    <setting id=\"CollectorLoadavg\"          value=\"true\"     />\n    <setting id=\"CollectorLogind\"           value=\"false\"    />\n    <setting id=\"CollectorMdadm\"            value=\"true\"     />\n    <setting id=\"CollectorMeminfo\"          value=\"true\"     />\n    <setting id=\"CollectorMeminfoNuma\"      value=\"false\"    />\n    <setting id=\"CollectorMountstats\"       value=\"false\"    />\n    <setting id=\"CollectorNetclass\"         value=\"true\"     />\n    <setting id=\"CollectorNetdev\"           value=\"true\"     />\n    <setting id=\"CollectorNetstat\"          value=\"true\"     />\n    <setting id=\"CollectorNetworkRoute\"     value=\"false\"    />\n    <setting id=\"CollectorNfs\"              value=\"true\"     />\n    <setting id=\"CollectorNfsd\"             value=\"true\"     />\n    <setting id=\"CollectorNtp\"              value=\"false\"    />\n    <setting id=\"CollectorNvme\"             value=\"true\"     />\n    <setting id=\"CollectorPerf\"             value=\"false\"    />\n    <setting id=\"CollectorPowersupplyclass\" value=\"true\"     />\n    <setting id=\"CollectorPressure\"         value=\"true\"     />\n    <setting id=\"CollectorProcesses\"        value=\"false\"    />\n    <setting id=\"CollectorQdisc\"            value=\"false\"    />\n    <setting id=\"CollectorRapl\"             value=\"true\"     />\n    <setting id=\"CollectorRunit\"            value=\"false\"    />\n    <setting id=\"CollectorSchedstat\"        value=\"true\"     />\n    <setting id=\"CollectorSockstat\"         value=\"true\"     />\n    <setting id=\"CollectorSoftnet\"          value=\"true\"     />\n    <setting id=\"CollectorStat\"             value=\"true\"     />\n    <setting id=\"CollectorSupervisord\"      value=\"false\"    />\n    <setting id=\"CollectorSystemd\"          value=\"false\"    />\n    <setting id=\"CollectorTapestats\"        value=\"true\"     />\n    <setting id=\"CollectorTcpstat\"          value=\"false\"    />\n    <setting id=\"CollectorTextfile\"         value=\"true\"     />\n    <setting id=\"CollectorThermalZone\"      value=\"true\"     />\n    <setting id=\"CollectorTime\"             value=\"true\"     />\n    <setting id=\"CollectorTimex\"            value=\"true\"     />\n    <setting id=\"CollectorUdpQueues\"        value=\"true\"     />\n    <setting id=\"CollectorUname\"            value=\"true\"     />\n    <setting id=\"CollectorVmstat\"           value=\"true\"     />\n    <setting id=\"CollectorWifi\"             value=\"false\"    />\n    <setting id=\"CollectorXfs\"              value=\"true\"     />\n    <setting id=\"CollectorZfs\"              value=\"true\"     />\n    <setting id=\"CollectorZoneinfo\"         value=\"false\"    />\n</settings>\n"
  },
  {
    "path": "packages/addons/service/prometheus-node-exporter/source/system.d/service.prometheus-node-exporter.service",
    "content": "[Unit]\nDescription=Prometheus Node Exporter service\nAfter=network-online.target\nRequires=network-online.target\n\n[Service]\nExecStart=/storage/.kodi/addons/service.prometheus-node-exporter/bin/prometheus-node-exporter.start\nRestart=always\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/rsyslog/changelog.txt",
    "content": "1\n- libfastjson: update to 1.2304.0\n- rsyslog: update to 8.2308.0\n"
  },
  {
    "path": "packages/addons/service/rsyslog/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rsyslog\"\nPKG_VERSION=\"8.2308.0\"\nPKG_SHA256=\"02086b9121e872cea69e5d0f6c8e2d8ebff33234b3cad5503665378d3af2e3c9\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/rsyslog\"\nPKG_URL=\"https://www.rsyslog.com/files/download/rsyslog/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain curl libestr libfastjson libgcrypt liblogging liblognorm librelp util-linux zlib\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Rsyslog: a rocket-fast system for log processing.\"\nPKG_LONGDESC=\"Rsyslog (${PKG_VERSION}) offers high-performance, great security features and a modular design.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Rsyslog\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-default-tests \\\n                           --enable-imfile \\\n                           --enable-imjournal \\\n                           --enable-relp \\\n                           --enable-omjournal \\\n                           ac_cv_func_malloc_0_nonnull=yes \\\n                           ac_cv_func_realloc_0_nonnull=yes\"\n\nexport LIBGCRYPT_CONFIG=\"${SYSROOT_PREFIX}/usr/bin/libgcrypt-config\"\n\npre_configure_target() {\n  CFLAGS+=\" -fcommon\"\n}\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp ${PKG_INSTALL}/usr/sbin/rsyslogd \\\n     ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/rsyslog\n  for l in $(find ${PKG_INSTALL}/usr/lib -name *.so)\n  do\n    cp ${l} ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/rsyslog/\n  done\n}\n"
  },
  {
    "path": "packages/addons/service/rsyslog/source/bin/rsyslog.init",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\noe_setup_addon service.rsyslog\n\n[ \"$RSYSLOG_MANUAL\" == \"true\" ] && exit\n\n(\n  if [ ! -z \"$RSYSLOG_IP_NAME_FQDN\" ]\n  then\n    cat \"$ADDON_DIR/config/common.conf\"\n    [ \"$RSYSLOG_PROTOCOL\" == \"RELP\" ] && cat \"$ADDON_DIR/config/relp.conf\"\n    [ \"$RSYSLOG_JOURNAL_LOGGING\" == \"true\" ] && cat \"$ADDON_DIR/config/journal.conf\"\n    [ \"$RSYSLOG_KODI_LOGGING\" == \"true\" ] && cat \"$ADDON_DIR/config/kodi.conf\"\n    [ \"$RSYSLOG_PROTOCOL\" == \"UDP\" ] && PROTOCOL=\"@\"\n    [ \"$RSYSLOG_PROTOCOL\" == \"TCP\" ] && PROTOCOL=\"@@\"\n    [ \"$RSYSLOG_PROTOCOL\" == \"RELP\" ] && PROTOCOL=\"omrelp\"\n    [ \"$RSYSLOG_PROTOCOL\" == \"RELP\" ] && ZLIB=\"0\" || [ \"$RSYSLOG_ZLIB_COMPRESSION\" == \"true\" ] && ZLIB=\"$RSYSLOG_ZLIB_COMPRESSION_LEVEL\" || ZLIB=\"0\"\n    [ \"$RSYSLOG_PROTOCOL\" == \"RELP\" ] && echo \"action(type=\\\"$PROTOCOL\\\" target=\\\"$RSYSLOG_IP_NAME_FQDN\\\" port=\\\"$RSYSLOG_PORT\\\")\" || echo \"action(type=\\\"omfwd\\\" target=\\\"$RSYSLOG_IP_NAME_FQDN\\\" protocol=\\\"$RSYSLOG_PROTOCOL\\\" port=\\\"$RSYSLOG_PORT\\\")\"\n  fi\n) > \"$ADDON_HOME/rsyslog.conf\"\n"
  },
  {
    "path": "packages/addons/service/rsyslog/source/config/common.conf",
    "content": "module(load=\"imuxsock\"\n  SysSock.RateLimit.Interval=\"1\"\n  sysSock.parseHostname=\"on\")\n\n$AddUnixListenSocket /run/systemd/journal/syslog\n$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat\n$WorkDirectory /storage/.kodi/temp\n"
  },
  {
    "path": "packages/addons/service/rsyslog/source/config/journal.conf",
    "content": "module(load=\"imjournal\")\nmodule(load=\"omjournal\")\nmodule(load=\"imklog\")\n\n"
  },
  {
    "path": "packages/addons/service/rsyslog/source/config/kodi.conf",
    "content": "module(load=\"imfile\")\n\ninput(type=\"imfile\"\n    File=\"/storage/.kodi/temp/kodi.log\"\n    Tag=\"kodi\"\n    Severity=\"emerg\"\n    Facility=\"local0\"\n    deleteStateOnFileDelete=\"on\"\n    escapeLF=\"on\"\n    PersistStateInterval=\"5\")\n\ninput(type=\"imfile\"\n    File=\"/storage/.kodi/temp/kodi.log\"\n    Tag=\"kodi\"\n    Severity=\"alert\"\n    Facility=\"local1\"\n    deleteStateOnFileDelete=\"on\"\n    escapeLF=\"on\"\n    PersistStateInterval=\"5\")\n\ninput(type=\"imfile\"\n    File=\"/storage/.kodi/temp/kodi.log\"\n    Tag=\"kodi\"\n    Severity=\"crit\"\n    Facility=\"local2\"\n    deleteStateOnFileDelete=\"on\"\n    escapeLF=\"on\"\n    PersistStateInterval=\"5\")\n\ninput(type=\"imfile\"\n    File=\"/storage/.kodi/temp/kodi.log\"\n    Tag=\"kodi\"\n    Severity=\"error\"\n    Facility=\"local3\"\n    deleteStateOnFileDelete=\"on\"\n    escapeLF=\"on\"\n    PersistStateInterval=\"5\")\n\ninput(type=\"imfile\"\n    File=\"/storage/.kodi/temp/kodi.log\"\n    Tag=\"kodi\"\n    Severity=\"warning\"\n    Facility=\"local4\"\n    deleteStateOnFileDelete=\"on\"\n    escapeLF=\"on\"\n    PersistStateInterval=\"5\")\n\ninput(type=\"imfile\"\n    File=\"/storage/.kodi/temp/kodi.log\"\n    Tag=\"kodi\"\n    Severity=\"notice\"\n    Facility=\"local5\"\n    deleteStateOnFileDelete=\"on\"\n    escapeLF=\"on\"\n    PersistStateInterval=\"5\")\n\ninput(type=\"imfile\"\n    File=\"/storage/.kodi/temp/kodi.log\"\n    Tag=\"kodi\"\n    Severity=\"info\"\n    Facility=\"local6\"\n    deleteStateOnFileDelete=\"on\"\n    escapeLF=\"on\"\n    PersistStateInterval=\"5\")\n\ninput(type=\"imfile\"\n    File=\"/storage/.kodi/temp/kodi.log\"\n    Tag=\"kodi\"\n    Severity=\"debug\"\n    Facility=\"local7\"\n    deleteStateOnFileDelete=\"on\"\n    escapeLF=\"on\"\n    PersistStateInterval=\"5\")\n\n"
  },
  {
    "path": "packages/addons/service/rsyslog/source/config/relp.conf",
    "content": "module(load=\"omrelp\")\n\n"
  },
  {
    "path": "packages/addons/service/rsyslog/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\nADDON = xbmcaddon.Addon()\n\nclass Monitor(xbmc.Monitor):\n\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == \"__main__\":\n\n   if ADDON.getSetting('RSYSLOG_WIZARD') == 'true':\n      try:\n         ADDON.openSettings(id)\n         ADDON.setSetting('RSYSLOG_WIZARD', 'false')\n      except:\n         pass\n\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/rsyslog/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: service.rsyslog\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Configure rsyslog.conf manually\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"IP | Name | FQDN\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"Port\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"Protocol\"\nmsgstr \"\"\n\nmsgctxt \"#30005\"\nmsgid \"Log journal and kernel\"\nmsgstr \"\"\n\nmsgctxt \"#30006\"\nmsgid \"Log Kodi\"\nmsgstr \"\"\n\nmsgctxt \"#30007\"\nmsgid \"Zlib Compression\"\nmsgstr \"\"\n\nmsgctxt \"#30008\"\nmsgid \"Level\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/rsyslog/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n   <category   label=\"30000\">\n      <setting label=\"30001\" type=\"bool\"      id=\"RSYSLOG_MANUAL\"                                              default=\"false\" />\n      <setting label=\"30002\" type=\"text\"      id=\"RSYSLOG_IP_NAME_FQDN\"                                        default=\"\"       visible=\"eq(-1,false)\" />\n      <setting label=\"30003\" type=\"number\"    id=\"RSYSLOG_PORT\"                                                default=\"514\"    visible=\"eq(-2,false)\" />\n      <setting label=\"30004\" type=\"labelenum\" id=\"RSYSLOG_PROTOCOL\"               values=\"UDP|TCP|RELP\"        default=\"UDP\"    visible=\"eq(-3,false)\" />\n      <setting label=\"30005\" type=\"bool\"      id=\"RSYSLOG_JOURNAL_LOGGING\"                                     default=\"false\"  visible=\"eq(-4,false)\" />\n      <setting label=\"30006\" type=\"bool\"      id=\"RSYSLOG_KODI_LOGGING\"                                        default=\"true\"   visible=\"eq(-5,false)\" />\n      <setting label=\"30007\" type=\"bool\"      id=\"RSYSLOG_ZLIB_COMPRESSION\"                                    default=\"false\"  visible=\"eq(-6,false)+!eq(-3,2)\" />\n      <setting label=\"30008\" type=\"labelenum\" id=\"RSYSLOG_ZLIB_COMPRESSION_LEVEL\" values=\"0|1|2|3|4|5|6|7|8|9\" default=\"0\"      visible=\"eq(-7,false)+!eq(-4,2)+eq(-1,true)\" enable=\"eq(-1,true)\" subsetting=\"true\" />\n   </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/rsyslog/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"RSYSLOG_IP_NAME_FQDN\" default=\"true\"></setting>\n    <setting id=\"RSYSLOG_JOURNAL_LOGGING\" default=\"true\">false</setting>\n    <setting id=\"RSYSLOG_KODI_LOGGING\">true</setting>\n    <setting id=\"RSYSLOG_MANUAL\" default=\"true\">false</setting>\n    <setting id=\"RSYSLOG_PORT\">514</setting>\n    <setting id=\"RSYSLOG_PROTOCOL\" default=\"true\">UDP</setting>\n    <setting id=\"RSYSLOG_WIZARD\" default=\"true\">false</setting>\n    <setting id=\"RSYSLOG_ZLIB_COMPRESSION\" default=\"true\">false</setting>\n    <setting id=\"RSYSLOG_ZLIB_COMPRESSION_LEVEL\" default=\"true\">0</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/rsyslog/source/system.d/service.rsyslog.service",
    "content": "[Unit]\nDescription=System Logging Service\nRequires=syslog.socket\nDocumentation=http://www.rsyslog.com/doc/\n\n[Service]\nType=notify\nEnvironment=RSYSLOG_MODDIR=/storage/.kodi/addons/service.rsyslog/lib/rsyslog/\nExecStartPre=/bin/sh /storage/.kodi/addons/service.rsyslog/bin/rsyslog.init\nExecStart=/storage/.kodi/addons/service.rsyslog/bin/rsyslogd -n -f /storage/.kodi/userdata/addon_data/service.rsyslog/rsyslog.conf\nStandardOutput=null\nRestart=on-failure\n\n[Install]\nWantedBy=kodi.target\nAlias=syslog.service\n"
  },
  {
    "path": "packages/addons/service/snapclient/changelog.txt",
    "content": "2\n- asio: update to 1.28.0\n- nqptp: update to 1.2.1\n- shairport-sync: update to 4.2\n\n1\n- asio: update to 1.27.0\n- snapcast: update to 0.27.0\n"
  },
  {
    "path": "packages/addons/service/snapclient/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"snapclient\"\nPKG_VERSION=\"0.27.0\"\nPKG_REV=\"2\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-plugins snapcast\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Snapclient: Synchronous multi-room audio client\"\nPKG_LONGDESC=\"Snapclient (${PKG_VERSION}) is a Snapcast client. Snapcast is a multi-room client-server audio system, where all clients are time synchronized with the server to play perfectly synced audioplays.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Snapclient\"\nPKG_ADDON_TYPE=\"xbmc.service.library\"\nPKG_MAINTAINER=\"Anton Voyl (awiouy)\"\n\naddon() {\n  mkdir -p \"${ADDON_BUILD}/${PKG_ADDON_ID}/bin\"\n  cp \"$(get_install_dir snapcast)/usr/bin/snapclient\" \\\n     \"${ADDON_BUILD}/${PKG_ADDON_ID}/bin\"\n\n  mkdir -p \"${ADDON_BUILD}/${PKG_ADDON_ID}/lib\"\n  cp \"$(get_install_dir alsa-plugins)/usr/lib/alsa\"/*.so \\\n     \"${ADDON_BUILD}/${PKG_ADDON_ID}/lib\"\n}\n"
  },
  {
    "path": "packages/addons/service/snapclient/source/addon.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nimport os.path\nimport subprocess\nimport xbmcaddon\nimport xbmcgui\n\nSNAPCLIENT = os.path.join(\n    xbmcaddon.Addon().getAddonInfo('path'), 'bin', 'snapclient')\n\nline = ''\ncard = ''\ncards = []\nlines = subprocess.run([SNAPCLIENT, '--list'], capture_output=True, text=True).stdout.splitlines()\n\nfor line in lines:\n    if line != '':\n        card = card + ' ' + line\n    else:\n        cards.append(card)\n        card = ''\n\n# If last line was not empty, make sure to add the last card\nif line != '' and card != '':\n    cards.append(card)\n\ndialog = xbmcgui.Dialog()\ndialog.select(xbmcaddon.Addon().getLocalizedString(30015), cards)\ndel dialog\n"
  },
  {
    "path": "packages/addons/service/snapclient/source/bin/snapclient.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\noe_setup_addon service.snapclient\n\n. /etc/os-release\ncase \"$LIBREELEC_ARCH\" in\n  RPi*.arm)\n    if [ \"$sc_a\" == \"true\" ]; then\n      ALSA=\"/proc/asound/ALSA\"\n      if [ ! -e \"$ALSA\" ]; then\n        echo \"Starting Raspberry Pi onboard audio\"\n        dtparam audio=on\n        sleep 1\n      fi\n      if [ -e \"$ALSA\" ]; then\n        echo \"Setting Raspberry Pi onboard audio playback route\"\n        index=\"$(readlink $ALSA)\"\n        index=\"${index##*card}\"\n        amixer -c \"$index\" cset name=\"PCM Playback Route\" \"$sc_r\"\n      fi\n    fi\n    ;;\nesac\n\n[ -n \"$sc_h\" ] && sc_H=\"--hostID $sc_h\"\n[ -n \"$sc_s\" ] && sc_S=\"--soundcard $sc_s\"\n[ -n \"$sc_addr\" ] && HOST=\"--host $sc_addr\"\n\nHOME=\"$ADDON_HOME\" \\\nnice -n \"$sc_n\" \\\nsnapclient \\\n  $sc_H \\\n  --latency \"$sc_l\" \\\n  $HOST \\\n  --port \"$sc_p\" \\\n  $sc_S \\\n  > /dev/null\n"
  },
  {
    "path": "packages/addons/service/snapclient/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\n\ndef systemctl(command):\n    subprocess.call(\n        ['systemctl', command, xbmcaddon.Addon().getAddonInfo('id')])\n\n\nclass Monitor(xbmc.Monitor):\n\n    def __init__(self, *args, **kwargs):\n        xbmc.Monitor.__init__(self)\n        self.player = Player()\n\n    def onSettingsChanged(self):\n        self.player.start('restart')\n\n\nclass Player(xbmc.Player):\n\n    def __init__(self):\n        super(Player, self).__init__(self)\n        self.start('start')\n\n    def onPlayBackEnded(self):\n        if xbmcaddon.Addon().getSetting('sc_k') == 'true':\n            xbmc.sleep(500)\n            if not self.isPlaying():\n                systemctl('start')\n\n    def onPlayBackStarted(self):\n        if xbmcaddon.Addon().getSetting('sc_k') == 'true':\n            systemctl('stop')\n\n    def onPlayBackStopped(self):\n        if xbmcaddon.Addon().getSetting('sc_k') == 'true':\n            systemctl('start')\n\n    def start(self, command):\n        if xbmcaddon.Addon().getSetting('sc_k') == 'true':\n            if self.isPlaying():\n                systemctl('stop')\n            else:\n                systemctl(command)\n        else:\n            systemctl(command)\n\n\nif __name__ == '__main__':\n    Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/snapclient/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: snapclient\n# Addon id: service.snapclient\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Snapclient\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"List sound cards\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"Sound card\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"Host ID\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"Port\"\nmsgstr \"\"\n\nmsgctxt \"#30005\"\nmsgid \"Priority\"\nmsgstr \"\"\n\nmsgctxt \"#30006\"\nmsgid \"Latency\"\nmsgstr \"\"\n\nmsgctxt \"#30007\"\nmsgid \"Kodi\"\nmsgstr \"\"\n\nmsgctxt \"#30008\"\nmsgid \"Stop Snapclient when Kodi plays\"\nmsgstr \"\"\n\nmsgctxt \"#30009\"\nmsgid \"Rasperry Pi\"\nmsgstr \"\"\n\nmsgctxt \"#30010\"\nmsgid \"Manage onboard audio\"\nmsgstr \"\"\n\nmsgctxt \"#30011\"\nmsgid \"Onboard audio playback route\"\nmsgstr \"\"\n\nmsgctxt \"#30012\"\nmsgid \"Autodetect\"\nmsgstr \"\"\n\nmsgctxt \"#30013\"\nmsgid \"Jack\"\nmsgstr \"\"\n\nmsgctxt \"#30014\"\nmsgid \"HDMI\"\nmsgstr \"\"\n\nmsgctxt \"#30015\"\nmsgid \"Available sound cards\"\nmsgstr \"\"\n\nmsgctxt \"#30016\"\nmsgid \"Server\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/snapclient/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n  <category  label=\"30000\">\n    <setting label=\"30001\" type=\"action\" action=\"RunAddon(service.snapclient)\"/>\n    <setting label=\"30002\" type=\"text\"   id=\"sc_s\" default=\"\"/>\n    <setting label=\"30016\" type=\"text\"   id=\"sc_addr\" default=\"\"/>\n    <setting label=\"30004\" type=\"number\" id=\"sc_p\" default=\"1704\"/>\n    <setting label=\"30003\" type=\"text\"   id=\"sc_h\" default=\"\"/>\n    <setting label=\"30005\" type=\"slider\" id=\"sc_n\" default=\"-3\" range=\"-20,1,19\" option=\"int\"/>\n    <setting label=\"30006\" type=\"number\" id=\"sc_l\" default=\"0\"/>\n  </category>\n  <category  label=\"30007\">\n    <setting label=\"30008\" type=\"bool\"   id=\"sc_k\" default=\"false\"/>\n  </category>\n  <category  label=\"30009\">\n    <setting label=\"30010\" type=\"bool\"   id=\"sc_a\" default=\"false\"/>\n    <setting label=\"30011\" type=\"enum\"   id=\"sc_r\" lvalues=\"30012|30013|30014\" visible=\"eq(-1,true)\"/>\n  </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/snapclient/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"sc_a\" default=\"true\">false</setting>\n    <setting id=\"sc_h\" default=\"true\"></setting>\n    <setting id=\"sc_k\" default=\"true\">false</setting>\n    <setting id=\"sc_l\" default=\"true\">0</setting>\n    <setting id=\"sc_n\" default=\"true\">-3</setting>\n    <setting id=\"sc_addr\" default=\"true\"></setting>\n    <setting id=\"sc_p\" default=\"true\">1704</setting>\n    <setting id=\"sc_r\" default=\"true\">0</setting>\n    <setting id=\"sc_s\" default=\"true\"></setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/snapclient/source/system.d/service.snapclient.service",
    "content": "[Unit]\nDescription=Snapclient\nAfter=kodi.service network-online.target sound.target\nRequires=kodi.service network-online.target sound.target\n\n[Service]\nEnvironment=ALSA_PLUGIN_DIR=/storage/.kodi/addons/service.snapclient/lib\nExecStart=/bin/sh /storage/.kodi/addons/service.snapclient/bin/snapclient.start\nRestart=always\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/snapserver/changelog.txt",
    "content": "2\n- asio: update to 1.28.0\n- nqptp: update to 1.2.1\n- shairport-sync: update to 4.2\n\n1\n- asio: update to 1.27.0\n- snapcast: update to 0.27.0\n"
  },
  {
    "path": "packages/addons/service/snapserver/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"snapserver\"\nPKG_VERSION=\"0.27.0\"\nPKG_REV=\"2\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_DEPENDS_TARGET=\"toolchain nqptp shairport-sync snapcast\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Snapserver: Synchronous multi-room audio server\"\nPKG_LONGDESC=\"Snapclient (${PKG_VERSION}) is a Snapcast server. Snapcast is a multi-room client-server audio system, where all clients are time synchronized with the server to play perfectly synced audioplays.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Snapserver\"\nPKG_ADDON_TYPE=\"xbmc.service\"\nPKG_ADDON_REQUIRES=\"service.librespot:0.0.0\"\nPKG_MAINTAINER=\"Anton Voyl (awiouy)\"\n\naddon() {\n  mkdir -p \"${ADDON_BUILD}/${PKG_ADDON_ID}/bin\"\n  cp \"$(get_install_dir shairport-sync)/usr/bin/shairport-sync\" \\\n     \"$(get_install_dir nqptp)/usr/bin/nqptp\" \\\n     \"$(get_install_dir snapcast)/usr/bin/snapserver\" \\\n     \"${ADDON_BUILD}/${PKG_ADDON_ID}/bin\"\n\n  cp -Pr ${PKG_DIR}/snapweb ${ADDON_BUILD}/${PKG_ADDON_ID}/\n}\n"
  },
  {
    "path": "packages/addons/service/snapserver/snapweb/3rd-party/libflac.js",
    "content": "\n\n// The Module object: Our interface to the outside world. We import\n// and export values on it. There are various ways Module can be used:\n// 1. Not defined. We create it here\n// 2. A function parameter, function(Module) { ..generated code.. }\n// 3. pre-run appended it, var Module = {}; ..generated code..\n// 4. External script tag defines var Module.\n// We need to check if Module already exists (e.g. case 3 above).\n// Substitution will be replaced with actual code on later stage of the build,\n// this way Closure Compiler will not mangle it (e.g. case 4. above).\n// Note that if you want to run closure, and also to use Module\n// after the generated code, you will need to define   var Module = {};\n// before the code. Then that object will be used in the code, and you\n// can continue to use Module afterwards as well.\nvar Module = typeof Module !== 'undefined' ? Module : {};\n\n\n\n// --pre-jses are emitted after the Module integration code, so that they can\n// refer to Module (if they choose; they can also define Module)\n// libflac.js - port of libflac to JavaScript using emscripten\n\n\n(function (root, factory) {\n\n\tif (typeof define === 'function' && define.amd) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine(['module', 'require'], factory.bind(null, root));\n\t} else if (typeof module === 'object' && module.exports) {\n\t\t// Node. Does not work with strict CommonJS, but\n\t\t// only CommonJS-like environments that support module.exports,\n\t\t// like Node.\n\n\t\t// use process.env (if available) for reading Flac environment settings:\n\t\tvar env = typeof process !== 'undefined' && process && process.env? process.env : root;\n\t\tfactory(env, module, module.require);\n\t} else {\n\t\t// Browser globals\n\t\troot.Flac = factory(root);\n\t}\n\n}(typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : this, function (global, expLib, require) {\n'use strict';\n\nvar Module = Module || {};\nvar _flac_ready = false;\n//in case resources are loaded asynchronously (e.g. *.mem file for minified version): setup \"ready\" handling\nModule[\"onRuntimeInitialized\"] = function(){\n\t_flac_ready = true;\n\tif(!_exported){\n\t\t//if _exported is not yet set (may happen, in case initialization was strictly synchronously),\n\t\t// do \"pause\" until sync initialization has run through\n\t\tsetTimeout(function(){do_fire_event('ready', [{type: 'ready', target: _exported}], true);}, 0);\n\t} else {\n\t\tdo_fire_event('ready', [{type: 'ready', target: _exported}], true);\n\t}\n};\n\nif(global && global.FLAC_SCRIPT_LOCATION){\n\n\tModule[\"locateFile\"] = function(fileName){\n\t\tvar path = global.FLAC_SCRIPT_LOCATION || '';\n\t\tif(path[fileName]){\n\t\t\treturn path[fileName];\n\t\t}\n\t\tpath += path && !/\\/$/.test(path)? '/' : '';\n\t\treturn path + fileName;\n\t};\n\n\t//NOTE will be overwritten if emscripten has env specific implementation for this\n\tvar readBinary = function(filePath){\n\n\t\t//for Node: use default implementation (copied from generated code):\n\t\tif(ENVIRONMENT_IS_NODE){\n\t\t\tvar ret = read_(filePath, true);\n\t\t\tif (!ret.buffer) {\n\t\t\t\tret = new Uint8Array(ret);\n\t\t\t}\n\t\t\tassert(ret.buffer);\n\t\t\treturn ret;\n\t\t}\n\n\t\t//otherwise: try \"fallback\" to AJAX\n\t\treturn new Promise(function(resolve, reject){\n\t\t\tvar xhr = new XMLHttpRequest();\n\t\t\txhr.responseType = \"arraybuffer\";\n\t\t\txhr.addEventListener(\"load\", function(evt){\n\t\t\t\tresolve(xhr.response);\n\t\t\t});\n\t\t\txhr.addEventListener(\"error\", function(err){\n\t\t\t\treject(err);\n\t\t\t});\n\t\t\txhr.open(\"GET\", filePath);\n\t\t\txhr.send();\n\t\t});\n\t};\n}\n\n//fallback for fetch && support file://-protocol: try read as binary if fetch fails\nif(global && typeof global.fetch === 'function'){\n\tvar _fetch = global.fetch;\n\tglobal.fetch = function(url){\n\t\treturn _fetch.apply(null, arguments).catch(function(err){\n\t\t\ttry{\n\t\t\t\tvar result = readBinary(url);\n\t\t\t\tif(result && result.catch){\n\t\t\t\t\tresult.catch(function(_err){throw err});\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t} catch(_err){\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t});\n\t};\n}\n\n\n\n// Sometimes an existing Module object exists with properties\n// meant to overwrite the default module functionality. Here\n// we collect those properties and reapply _after_ we configure\n// the current environment's defaults to avoid having to be so\n// defensive during initialization.\nvar moduleOverrides = {};\nvar key;\nfor (key in Module) {\n  if (Module.hasOwnProperty(key)) {\n    moduleOverrides[key] = Module[key];\n  }\n}\n\nvar arguments_ = [];\nvar thisProgram = './this.program';\nvar quit_ = function(status, toThrow) {\n  throw toThrow;\n};\n\n// Determine the runtime environment we are in. You can customize this by\n// setting the ENVIRONMENT setting at compile time (see settings.js).\n\nvar ENVIRONMENT_IS_WEB = false;\nvar ENVIRONMENT_IS_WORKER = false;\nvar ENVIRONMENT_IS_NODE = false;\nvar ENVIRONMENT_IS_SHELL = false;\nENVIRONMENT_IS_WEB = typeof window === 'object';\nENVIRONMENT_IS_WORKER = typeof importScripts === 'function';\n// N.b. Electron.js environment is simultaneously a NODE-environment, but\n// also a web environment.\nENVIRONMENT_IS_NODE = typeof process === 'object' && typeof process.versions === 'object' && typeof process.versions.node === 'string';\nENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;\n\n\n\n\n// `/` should be present at the end if `scriptDirectory` is not empty\nvar scriptDirectory = '';\nfunction locateFile(path) {\n  if (Module['locateFile']) {\n    return Module['locateFile'](path, scriptDirectory);\n  }\n  return scriptDirectory + path;\n}\n\n// Hooks that are implemented differently in different runtime environments.\nvar read_,\n    readAsync,\n    readBinary,\n    setWindowTitle;\n\nvar nodeFS;\nvar nodePath;\n\nif (ENVIRONMENT_IS_NODE) {\n  if (ENVIRONMENT_IS_WORKER) {\n    scriptDirectory = require('path').dirname(scriptDirectory) + '/';\n  } else {\n    scriptDirectory = __dirname + '/';\n  }\n\n\n\n\n  read_ = function shell_read(filename, binary) {\n    var ret = tryParseAsDataURI(filename);\n    if (ret) {\n      return binary ? ret : ret.toString();\n    }\n    if (!nodeFS) nodeFS = require('fs');\n    if (!nodePath) nodePath = require('path');\n    filename = nodePath['normalize'](filename);\n    return nodeFS['readFileSync'](filename, binary ? null : 'utf8');\n  };\n\n  readBinary = function readBinary(filename) {\n    var ret = read_(filename, true);\n    if (!ret.buffer) {\n      ret = new Uint8Array(ret);\n    }\n    assert(ret.buffer);\n    return ret;\n  };\n\n\n\n\n  if (process['argv'].length > 1) {\n    thisProgram = process['argv'][1].replace(/\\\\/g, '/');\n  }\n\n  arguments_ = process['argv'].slice(2);\n\n  if (typeof module !== 'undefined') {\n    module['exports'] = Module;\n  }\n\n\n\n  quit_ = function(status) {\n    process['exit'](status);\n  };\n\n  Module['inspect'] = function () { return '[Emscripten Module object]'; };\n\n\n\n} else\nif (ENVIRONMENT_IS_SHELL) {\n\n\n  if (typeof read != 'undefined') {\n    read_ = function shell_read(f) {\n      var data = tryParseAsDataURI(f);\n      if (data) {\n        return intArrayToString(data);\n      }\n      return read(f);\n    };\n  }\n\n  readBinary = function readBinary(f) {\n    var data;\n    data = tryParseAsDataURI(f);\n    if (data) {\n      return data;\n    }\n    if (typeof readbuffer === 'function') {\n      return new Uint8Array(readbuffer(f));\n    }\n    data = read(f, 'binary');\n    assert(typeof data === 'object');\n    return data;\n  };\n\n  if (typeof scriptArgs != 'undefined') {\n    arguments_ = scriptArgs;\n  } else if (typeof arguments != 'undefined') {\n    arguments_ = arguments;\n  }\n\n  if (typeof quit === 'function') {\n    quit_ = function(status) {\n      quit(status);\n    };\n  }\n\n  if (typeof print !== 'undefined') {\n    // Prefer to use print/printErr where they exist, as they usually work better.\n    if (typeof console === 'undefined') console = /** @type{!Console} */({});\n    console.log = /** @type{!function(this:Console, ...*): undefined} */ (print);\n    console.warn = console.error = /** @type{!function(this:Console, ...*): undefined} */ (typeof printErr !== 'undefined' ? printErr : print);\n  }\n\n\n} else\n\n// Note that this includes Node.js workers when relevant (pthreads is enabled).\n// Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and\n// ENVIRONMENT_IS_NODE.\nif (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {\n  if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled\n    scriptDirectory = self.location.href;\n  } else if (document.currentScript) { // web\n    scriptDirectory = document.currentScript.src;\n  }\n  // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them.\n  // otherwise, slice off the final part of the url to find the script directory.\n  // if scriptDirectory does not contain a slash, lastIndexOf will return -1,\n  // and scriptDirectory will correctly be replaced with an empty string.\n  if (scriptDirectory.indexOf('blob:') !== 0) {\n    scriptDirectory = scriptDirectory.substr(0, scriptDirectory.lastIndexOf('/')+1);\n  } else {\n    scriptDirectory = '';\n  }\n\n\n  // Differentiate the Web Worker from the Node Worker case, as reading must\n  // be done differently.\n  {\n\n\n\n\n  read_ = function shell_read(url) {\n    try {\n      var xhr = new XMLHttpRequest();\n      xhr.open('GET', url, false);\n      xhr.send(null);\n      return xhr.responseText;\n    } catch (err) {\n      var data = tryParseAsDataURI(url);\n      if (data) {\n        return intArrayToString(data);\n      }\n      throw err;\n    }\n  };\n\n  if (ENVIRONMENT_IS_WORKER) {\n    readBinary = function readBinary(url) {\n      try {\n        var xhr = new XMLHttpRequest();\n        xhr.open('GET', url, false);\n        xhr.responseType = 'arraybuffer';\n        xhr.send(null);\n        return new Uint8Array(/** @type{!ArrayBuffer} */(xhr.response));\n      } catch (err) {\n        var data = tryParseAsDataURI(url);\n        if (data) {\n          return data;\n        }\n        throw err;\n      }\n    };\n  }\n\n  readAsync = function readAsync(url, onload, onerror) {\n    var xhr = new XMLHttpRequest();\n    xhr.open('GET', url, true);\n    xhr.responseType = 'arraybuffer';\n    xhr.onload = function xhr_onload() {\n      if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0\n        onload(xhr.response);\n        return;\n      }\n      var data = tryParseAsDataURI(url);\n      if (data) {\n        onload(data.buffer);\n        return;\n      }\n      onerror();\n    };\n    xhr.onerror = onerror;\n    xhr.send(null);\n  };\n\n\n\n\n  }\n\n  setWindowTitle = function(title) { document.title = title };\n} else\n{\n}\n\n\n// Set up the out() and err() hooks, which are how we can print to stdout or\n// stderr, respectively.\nvar out = Module['print'] || console.log.bind(console);\nvar err = Module['printErr'] || console.warn.bind(console);\n\n// Merge back in the overrides\nfor (key in moduleOverrides) {\n  if (moduleOverrides.hasOwnProperty(key)) {\n    Module[key] = moduleOverrides[key];\n  }\n}\n// Free the object hierarchy contained in the overrides, this lets the GC\n// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array.\nmoduleOverrides = null;\n\n// Emit code to handle expected values on the Module object. This applies Module.x\n// to the proper local x. This has two benefits: first, we only emit it if it is\n// expected to arrive, and second, by using a local everywhere else that can be\n// minified.\nif (Module['arguments']) arguments_ = Module['arguments'];\nif (Module['thisProgram']) thisProgram = Module['thisProgram'];\nif (Module['quit']) quit_ = Module['quit'];\n\n// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message\n\n\n\n\n\n// {{PREAMBLE_ADDITIONS}}\n\nvar STACK_ALIGN = 16;\n\nfunction dynamicAlloc(size) {\n  var ret = HEAP32[DYNAMICTOP_PTR>>2];\n  var end = (ret + size + 15) & -16;\n  HEAP32[DYNAMICTOP_PTR>>2] = end;\n  return ret;\n}\n\nfunction alignMemory(size, factor) {\n  if (!factor) factor = STACK_ALIGN; // stack alignment (16-byte) by default\n  return Math.ceil(size / factor) * factor;\n}\n\nfunction getNativeTypeSize(type) {\n  switch (type) {\n    case 'i1': case 'i8': return 1;\n    case 'i16': return 2;\n    case 'i32': return 4;\n    case 'i64': return 8;\n    case 'float': return 4;\n    case 'double': return 8;\n    default: {\n      if (type[type.length-1] === '*') {\n        return 4; // A pointer\n      } else if (type[0] === 'i') {\n        var bits = Number(type.substr(1));\n        assert(bits % 8 === 0, 'getNativeTypeSize invalid bits ' + bits + ', type ' + type);\n        return bits / 8;\n      } else {\n        return 0;\n      }\n    }\n  }\n}\n\nfunction warnOnce(text) {\n  if (!warnOnce.shown) warnOnce.shown = {};\n  if (!warnOnce.shown[text]) {\n    warnOnce.shown[text] = 1;\n    err(text);\n  }\n}\n\n\n\n\n\n\n\n\n// Wraps a JS function as a wasm function with a given signature.\nfunction convertJsFunctionToWasm(func, sig) {\n  return func;\n}\n\nvar freeTableIndexes = [];\n\n// Weak map of functions in the table to their indexes, created on first use.\nvar functionsInTableMap;\n\n// Add a wasm function to the table.\nfunction addFunctionWasm(func, sig) {\n  var table = wasmTable;\n\n  // Check if the function is already in the table, to ensure each function\n  // gets a unique index. First, create the map if this is the first use.\n  if (!functionsInTableMap) {\n    functionsInTableMap = new WeakMap();\n    for (var i = 0; i < table.length; i++) {\n      var item = table.get(i);\n      // Ignore null values.\n      if (item) {\n        functionsInTableMap.set(item, i);\n      }\n    }\n  }\n  if (functionsInTableMap.has(func)) {\n    return functionsInTableMap.get(func);\n  }\n\n  // It's not in the table, add it now.\n\n\n  var ret;\n  // Reuse a free index if there is one, otherwise grow.\n  if (freeTableIndexes.length) {\n    ret = freeTableIndexes.pop();\n  } else {\n    ret = table.length;\n    // Grow the table\n    try {\n      table.grow(1);\n    } catch (err) {\n      if (!(err instanceof RangeError)) {\n        throw err;\n      }\n      throw 'Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.';\n    }\n  }\n\n  // Set the new value.\n  try {\n    // Attempting to call this with JS function will cause of table.set() to fail\n    table.set(ret, func);\n  } catch (err) {\n    if (!(err instanceof TypeError)) {\n      throw err;\n    }\n    var wrapped = convertJsFunctionToWasm(func, sig);\n    table.set(ret, wrapped);\n  }\n\n  functionsInTableMap.set(func, ret);\n\n  return ret;\n}\n\nfunction removeFunctionWasm(index) {\n  functionsInTableMap.delete(wasmTable.get(index));\n  freeTableIndexes.push(index);\n}\n\n// 'sig' parameter is required for the llvm backend but only when func is not\n// already a WebAssembly function.\nfunction addFunction(func, sig) {\n\n  return addFunctionWasm(func, sig);\n}\n\nfunction removeFunction(index) {\n  removeFunctionWasm(index);\n}\n\n\n\nvar funcWrappers = {};\n\nfunction getFuncWrapper(func, sig) {\n  if (!func) return; // on null pointer, return undefined\n  assert(sig);\n  if (!funcWrappers[sig]) {\n    funcWrappers[sig] = {};\n  }\n  var sigCache = funcWrappers[sig];\n  if (!sigCache[func]) {\n    // optimize away arguments usage in common cases\n    if (sig.length === 1) {\n      sigCache[func] = function dynCall_wrapper() {\n        return dynCall(sig, func);\n      };\n    } else if (sig.length === 2) {\n      sigCache[func] = function dynCall_wrapper(arg) {\n        return dynCall(sig, func, [arg]);\n      };\n    } else {\n      // general case\n      sigCache[func] = function dynCall_wrapper() {\n        return dynCall(sig, func, Array.prototype.slice.call(arguments));\n      };\n    }\n  }\n  return sigCache[func];\n}\n\n\n\n\n\n\n\nfunction makeBigInt(low, high, unsigned) {\n  return unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0));\n}\n\n/** @param {Array=} args */\nfunction dynCall(sig, ptr, args) {\n  if (args && args.length) {\n    return Module['dynCall_' + sig].apply(null, [ptr].concat(args));\n  } else {\n    return Module['dynCall_' + sig].call(null, ptr);\n  }\n}\n\nvar tempRet0 = 0;\n\nvar setTempRet0 = function(value) {\n  tempRet0 = value;\n};\n\nvar getTempRet0 = function() {\n  return tempRet0;\n};\n\n\n// The address globals begin at. Very low in memory, for code size and optimization opportunities.\n// Above 0 is static memory, starting with globals.\n// Then the stack.\n// Then 'dynamic' memory for sbrk.\nvar GLOBAL_BASE = 1024;\n\n\n\n\n\n// === Preamble library stuff ===\n\n// Documentation for the public APIs defined in this file must be updated in:\n//    site/source/docs/api_reference/preamble.js.rst\n// A prebuilt local version of the documentation is available at:\n//    site/build/text/docs/api_reference/preamble.js.txt\n// You can also build docs locally as HTML or other formats in site/\n// An online HTML version (which may be of a different version of Emscripten)\n//    is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html\n\n\nvar wasmBinary;if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];\nvar noExitRuntime;if (Module['noExitRuntime']) noExitRuntime = Module['noExitRuntime'];\n\n\n\n\n// wasm2js.js - enough of a polyfill for the WebAssembly object so that we can load\n// wasm2js code that way.\n\n// Emit \"var WebAssembly\" if definitely using wasm2js. Otherwise, in MAYBE_WASM2JS\n// mode, we can't use a \"var\" since it would prevent normal wasm from working.\n/** @suppress{const} */\nvar\nWebAssembly = {\n  // Note that we do not use closure quoting (this['buffer'], etc.) on these\n  // functions, as they are just meant for internal use. In other words, this is\n  // not a fully general polyfill.\n  Memory: function(opts) {\n    this.buffer = new ArrayBuffer(opts['initial'] * 65536);\n    this.grow = function(amount) {\n      var ret = __growWasmMemory(amount);\n      return ret;\n    };\n  },\n\n  // Table is not a normal constructor and instead returns the array object.\n  // That lets us use the length property automatically, which is simpler and\n  // smaller (but instanceof will not report that an instance of Table is an\n  // instance of this function).\n  Table: /** @constructor */ function(opts) {\n    var ret = new Array(opts['initial']);\n    ret.grow = function(by) {\n      if (ret.length >= 22 + 5) {\n        abort('Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH.')\n      }\n      ret.push(null);\n    };\n    ret.set = function(i, func) {\n      ret[i] = func;\n    };\n    ret.get = function(i) {\n      return ret[i];\n    };\n    return ret;\n  },\n\n  Module: function(binary) {\n    // TODO: use the binary and info somehow - right now the wasm2js output is embedded in\n    // the main JS\n  },\n\n  Instance: function(module, info) {\n    // TODO: use the module and info somehow - right now the wasm2js output is embedded in\n    // the main JS\n    // This will be replaced by the actual wasm2js code.\n    this.exports = (\nfunction instantiate(asmLibraryArg, wasmMemory, wasmTable) {\n\n\n  var scratchBuffer = new ArrayBuffer(8);\n  var i32ScratchView = new Int32Array(scratchBuffer);\n  var f32ScratchView = new Float32Array(scratchBuffer);\n  var f64ScratchView = new Float64Array(scratchBuffer);\n  \n  function wasm2js_scratch_load_i32(index) {\n    return i32ScratchView[index];\n  }\n      \n  function wasm2js_scratch_store_i32(index, value) {\n    i32ScratchView[index] = value;\n  }\n      \n  function wasm2js_scratch_load_f64() {\n    return f64ScratchView[0];\n  }\n      \n  function wasm2js_scratch_store_f64(value) {\n    f64ScratchView[0] = value;\n  }\n      \n  function wasm2js_scratch_store_f32(value) {\n    f32ScratchView[0] = value;\n  }\n      \nfunction asmFunc(global, env, buffer) {\n var memory = env.memory;\n var FUNCTION_TABLE = wasmTable;\n var HEAP8 = new global.Int8Array(buffer);\n var HEAP16 = new global.Int16Array(buffer);\n var HEAP32 = new global.Int32Array(buffer);\n var HEAPU8 = new global.Uint8Array(buffer);\n var HEAPU16 = new global.Uint16Array(buffer);\n var HEAPU32 = new global.Uint32Array(buffer);\n var HEAPF32 = new global.Float32Array(buffer);\n var HEAPF64 = new global.Float64Array(buffer);\n var Math_imul = global.Math.imul;\n var Math_fround = global.Math.fround;\n var Math_abs = global.Math.abs;\n var Math_clz32 = global.Math.clz32;\n var Math_min = global.Math.min;\n var Math_max = global.Math.max;\n var Math_floor = global.Math.floor;\n var Math_ceil = global.Math.ceil;\n var Math_sqrt = global.Math.sqrt;\n var abort = env.abort;\n var nan = global.NaN;\n var infinity = global.Infinity;\n var emscripten_resize_heap = env.emscripten_resize_heap;\n var emscripten_memcpy_big = env.emscripten_memcpy_big;\n var __wasi_fd_close = env.fd_close;\n var __wasi_fd_read = env.fd_read;\n var round = env.round;\n var __wasi_fd_write = env.fd_write;\n var setTempRet0 = env.setTempRet0;\n var legalimport$__wasi_fd_seek = env.fd_seek;\n var global$0 = 5257216;\n var global$1 = 14168;\n var __wasm_intrinsics_temp_i64 = 0;\n var __wasm_intrinsics_temp_i64$hi = 0;\n var i64toi32_i32$HIGH_BITS = 0;\n // EMSCRIPTEN_START_FUNCS\n;\n function __wasm_call_ctors() {\n  \n }\n \n function __errno_location() {\n  return 11584;\n }\n \n function sbrk($0) {\n  var $1 = 0, $2 = 0;\n  $1 = HEAP32[3544];\n  $2 = $0 + 3 & -4;\n  $0 = $1 + $2 | 0;\n  label$1 : {\n   if ($0 >>> 0 <= $1 >>> 0 ? ($2 | 0) >= 1 : 0) {\n    break label$1\n   }\n   if ($0 >>> 0 > __wasm_memory_size() << 16 >>> 0) {\n    if (!emscripten_resize_heap($0 | 0)) {\n     break label$1\n    }\n   }\n   HEAP32[3544] = $0;\n   return $1;\n  }\n  HEAP32[2896] = 48;\n  return -1;\n }\n \n function memset($0, $1) {\n  var $2 = 0, $3 = 0;\n  label$1 : {\n   if (!$1) {\n    break label$1\n   }\n   $2 = $0 + $1 | 0;\n   HEAP8[$2 + -1 | 0] = 0;\n   HEAP8[$0 | 0] = 0;\n   if ($1 >>> 0 < 3) {\n    break label$1\n   }\n   HEAP8[$2 + -2 | 0] = 0;\n   HEAP8[$0 + 1 | 0] = 0;\n   HEAP8[$2 + -3 | 0] = 0;\n   HEAP8[$0 + 2 | 0] = 0;\n   if ($1 >>> 0 < 7) {\n    break label$1\n   }\n   HEAP8[$2 + -4 | 0] = 0;\n   HEAP8[$0 + 3 | 0] = 0;\n   if ($1 >>> 0 < 9) {\n    break label$1\n   }\n   $3 = 0 - $0 & 3;\n   $2 = $3 + $0 | 0;\n   HEAP32[$2 >> 2] = 0;\n   $3 = $1 - $3 & -4;\n   $1 = $3 + $2 | 0;\n   HEAP32[$1 + -4 >> 2] = 0;\n   if ($3 >>> 0 < 9) {\n    break label$1\n   }\n   HEAP32[$2 + 8 >> 2] = 0;\n   HEAP32[$2 + 4 >> 2] = 0;\n   HEAP32[$1 + -8 >> 2] = 0;\n   HEAP32[$1 + -12 >> 2] = 0;\n   if ($3 >>> 0 < 25) {\n    break label$1\n   }\n   HEAP32[$2 + 24 >> 2] = 0;\n   HEAP32[$2 + 20 >> 2] = 0;\n   HEAP32[$2 + 16 >> 2] = 0;\n   HEAP32[$2 + 12 >> 2] = 0;\n   HEAP32[$1 + -16 >> 2] = 0;\n   HEAP32[$1 + -20 >> 2] = 0;\n   HEAP32[$1 + -24 >> 2] = 0;\n   HEAP32[$1 + -28 >> 2] = 0;\n   $1 = $3;\n   $3 = $2 & 4 | 24;\n   $1 = $1 - $3 | 0;\n   if ($1 >>> 0 < 32) {\n    break label$1\n   }\n   $2 = $2 + $3 | 0;\n   while (1) {\n    HEAP32[$2 + 24 >> 2] = 0;\n    HEAP32[$2 + 28 >> 2] = 0;\n    HEAP32[$2 + 16 >> 2] = 0;\n    HEAP32[$2 + 20 >> 2] = 0;\n    HEAP32[$2 + 8 >> 2] = 0;\n    HEAP32[$2 + 12 >> 2] = 0;\n    HEAP32[$2 >> 2] = 0;\n    HEAP32[$2 + 4 >> 2] = 0;\n    $2 = $2 + 32 | 0;\n    $1 = $1 + -32 | 0;\n    if ($1 >>> 0 > 31) {\n     continue\n    }\n    break;\n   };\n  }\n  return $0;\n }\n \n function memcpy($0, $1, $2) {\n  var $3 = 0, $4 = 0, $5 = 0;\n  if ($2 >>> 0 >= 512) {\n   emscripten_memcpy_big($0 | 0, $1 | 0, $2 | 0) | 0;\n   return $0;\n  }\n  $4 = $0 + $2 | 0;\n  label$2 : {\n   if (!(($0 ^ $1) & 3)) {\n    label$4 : {\n     if (($2 | 0) < 1) {\n      $2 = $0;\n      break label$4;\n     }\n     if (!($0 & 3)) {\n      $2 = $0;\n      break label$4;\n     }\n     $2 = $0;\n     while (1) {\n      HEAP8[$2 | 0] = HEAPU8[$1 | 0];\n      $1 = $1 + 1 | 0;\n      $2 = $2 + 1 | 0;\n      if ($2 >>> 0 >= $4 >>> 0) {\n       break label$4\n      }\n      if ($2 & 3) {\n       continue\n      }\n      break;\n     };\n    }\n    $3 = $4 & -4;\n    label$8 : {\n     if ($3 >>> 0 < 64) {\n      break label$8\n     }\n     $5 = $3 + -64 | 0;\n     if ($2 >>> 0 > $5 >>> 0) {\n      break label$8\n     }\n     while (1) {\n      HEAP32[$2 >> 2] = HEAP32[$1 >> 2];\n      HEAP32[$2 + 4 >> 2] = HEAP32[$1 + 4 >> 2];\n      HEAP32[$2 + 8 >> 2] = HEAP32[$1 + 8 >> 2];\n      HEAP32[$2 + 12 >> 2] = HEAP32[$1 + 12 >> 2];\n      HEAP32[$2 + 16 >> 2] = HEAP32[$1 + 16 >> 2];\n      HEAP32[$2 + 20 >> 2] = HEAP32[$1 + 20 >> 2];\n      HEAP32[$2 + 24 >> 2] = HEAP32[$1 + 24 >> 2];\n      HEAP32[$2 + 28 >> 2] = HEAP32[$1 + 28 >> 2];\n      HEAP32[$2 + 32 >> 2] = HEAP32[$1 + 32 >> 2];\n      HEAP32[$2 + 36 >> 2] = HEAP32[$1 + 36 >> 2];\n      HEAP32[$2 + 40 >> 2] = HEAP32[$1 + 40 >> 2];\n      HEAP32[$2 + 44 >> 2] = HEAP32[$1 + 44 >> 2];\n      HEAP32[$2 + 48 >> 2] = HEAP32[$1 + 48 >> 2];\n      HEAP32[$2 + 52 >> 2] = HEAP32[$1 + 52 >> 2];\n      HEAP32[$2 + 56 >> 2] = HEAP32[$1 + 56 >> 2];\n      HEAP32[$2 + 60 >> 2] = HEAP32[$1 + 60 >> 2];\n      $1 = $1 - -64 | 0;\n      $2 = $2 - -64 | 0;\n      if ($2 >>> 0 <= $5 >>> 0) {\n       continue\n      }\n      break;\n     };\n    }\n    if ($2 >>> 0 >= $3 >>> 0) {\n     break label$2\n    }\n    while (1) {\n     HEAP32[$2 >> 2] = HEAP32[$1 >> 2];\n     $1 = $1 + 4 | 0;\n     $2 = $2 + 4 | 0;\n     if ($2 >>> 0 < $3 >>> 0) {\n      continue\n     }\n     break;\n    };\n    break label$2;\n   }\n   if ($4 >>> 0 < 4) {\n    $2 = $0;\n    break label$2;\n   }\n   $3 = $4 + -4 | 0;\n   if ($3 >>> 0 < $0 >>> 0) {\n    $2 = $0;\n    break label$2;\n   }\n   $2 = $0;\n   while (1) {\n    HEAP8[$2 | 0] = HEAPU8[$1 | 0];\n    HEAP8[$2 + 1 | 0] = HEAPU8[$1 + 1 | 0];\n    HEAP8[$2 + 2 | 0] = HEAPU8[$1 + 2 | 0];\n    HEAP8[$2 + 3 | 0] = HEAPU8[$1 + 3 | 0];\n    $1 = $1 + 4 | 0;\n    $2 = $2 + 4 | 0;\n    if ($2 >>> 0 <= $3 >>> 0) {\n     continue\n    }\n    break;\n   };\n  }\n  if ($2 >>> 0 < $4 >>> 0) {\n   while (1) {\n    HEAP8[$2 | 0] = HEAPU8[$1 | 0];\n    $1 = $1 + 1 | 0;\n    $2 = $2 + 1 | 0;\n    if (($4 | 0) != ($2 | 0)) {\n     continue\n    }\n    break;\n   }\n  }\n  return $0;\n }\n \n function dlmalloc($0) {\n  $0 = $0 | 0;\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;\n  $11 = global$0 - 16 | 0;\n  global$0 = $11;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     label$4 : {\n      label$5 : {\n       label$6 : {\n        label$7 : {\n         label$8 : {\n          label$9 : {\n           label$10 : {\n            label$11 : {\n             if ($0 >>> 0 <= 244) {\n              $6 = HEAP32[2897];\n              $5 = $0 >>> 0 < 11 ? 16 : $0 + 11 & -8;\n              $0 = $5 >>> 3 | 0;\n              $1 = $6 >>> $0 | 0;\n              if ($1 & 3) {\n               $2 = $0 + (($1 ^ -1) & 1) | 0;\n               $5 = $2 << 3;\n               $1 = HEAP32[$5 + 11636 >> 2];\n               $0 = $1 + 8 | 0;\n               $3 = HEAP32[$1 + 8 >> 2];\n               $5 = $5 + 11628 | 0;\n               label$14 : {\n                if (($3 | 0) == ($5 | 0)) {\n                 (wasm2js_i32$0 = 11588, wasm2js_i32$1 = __wasm_rotl_i32(-2, $2) & $6), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n                 break label$14;\n                }\n                HEAP32[$3 + 12 >> 2] = $5;\n                HEAP32[$5 + 8 >> 2] = $3;\n               }\n               $2 = $2 << 3;\n               HEAP32[$1 + 4 >> 2] = $2 | 3;\n               $1 = $1 + $2 | 0;\n               HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] | 1;\n               break label$1;\n              }\n              $7 = HEAP32[2899];\n              if ($5 >>> 0 <= $7 >>> 0) {\n               break label$11\n              }\n              if ($1) {\n               $2 = 2 << $0;\n               $0 = (0 - $2 | $2) & $1 << $0;\n               $0 = (0 - $0 & $0) + -1 | 0;\n               $1 = $0 >>> 12 & 16;\n               $2 = $1;\n               $0 = $0 >>> $1 | 0;\n               $1 = $0 >>> 5 & 8;\n               $2 = $2 | $1;\n               $0 = $0 >>> $1 | 0;\n               $1 = $0 >>> 2 & 4;\n               $2 = $2 | $1;\n               $0 = $0 >>> $1 | 0;\n               $1 = $0 >>> 1 & 2;\n               $2 = $2 | $1;\n               $0 = $0 >>> $1 | 0;\n               $1 = $0 >>> 1 & 1;\n               $2 = ($2 | $1) + ($0 >>> $1 | 0) | 0;\n               $3 = $2 << 3;\n               $1 = HEAP32[$3 + 11636 >> 2];\n               $0 = HEAP32[$1 + 8 >> 2];\n               $3 = $3 + 11628 | 0;\n               label$17 : {\n                if (($0 | 0) == ($3 | 0)) {\n                 $6 = __wasm_rotl_i32(-2, $2) & $6;\n                 HEAP32[2897] = $6;\n                 break label$17;\n                }\n                HEAP32[$0 + 12 >> 2] = $3;\n                HEAP32[$3 + 8 >> 2] = $0;\n               }\n               $0 = $1 + 8 | 0;\n               HEAP32[$1 + 4 >> 2] = $5 | 3;\n               $4 = $1 + $5 | 0;\n               $2 = $2 << 3;\n               $3 = $2 - $5 | 0;\n               HEAP32[$4 + 4 >> 2] = $3 | 1;\n               HEAP32[$1 + $2 >> 2] = $3;\n               if ($7) {\n                $5 = $7 >>> 3 | 0;\n                $1 = ($5 << 3) + 11628 | 0;\n                $2 = HEAP32[2902];\n                $5 = 1 << $5;\n                label$20 : {\n                 if (!($5 & $6)) {\n                  HEAP32[2897] = $5 | $6;\n                  $5 = $1;\n                  break label$20;\n                 }\n                 $5 = HEAP32[$1 + 8 >> 2];\n                }\n                HEAP32[$1 + 8 >> 2] = $2;\n                HEAP32[$5 + 12 >> 2] = $2;\n                HEAP32[$2 + 12 >> 2] = $1;\n                HEAP32[$2 + 8 >> 2] = $5;\n               }\n               HEAP32[2902] = $4;\n               HEAP32[2899] = $3;\n               break label$1;\n              }\n              $10 = HEAP32[2898];\n              if (!$10) {\n               break label$11\n              }\n              $0 = ($10 & 0 - $10) + -1 | 0;\n              $1 = $0 >>> 12 & 16;\n              $2 = $1;\n              $0 = $0 >>> $1 | 0;\n              $1 = $0 >>> 5 & 8;\n              $2 = $2 | $1;\n              $0 = $0 >>> $1 | 0;\n              $1 = $0 >>> 2 & 4;\n              $2 = $2 | $1;\n              $0 = $0 >>> $1 | 0;\n              $1 = $0 >>> 1 & 2;\n              $2 = $2 | $1;\n              $0 = $0 >>> $1 | 0;\n              $1 = $0 >>> 1 & 1;\n              $1 = HEAP32[(($2 | $1) + ($0 >>> $1 | 0) << 2) + 11892 >> 2];\n              $3 = (HEAP32[$1 + 4 >> 2] & -8) - $5 | 0;\n              $2 = $1;\n              while (1) {\n               label$23 : {\n                $0 = HEAP32[$2 + 16 >> 2];\n                if (!$0) {\n                 $0 = HEAP32[$2 + 20 >> 2];\n                 if (!$0) {\n                  break label$23\n                 }\n                }\n                $4 = (HEAP32[$0 + 4 >> 2] & -8) - $5 | 0;\n                $2 = $4 >>> 0 < $3 >>> 0;\n                $3 = $2 ? $4 : $3;\n                $1 = $2 ? $0 : $1;\n                $2 = $0;\n                continue;\n               }\n               break;\n              };\n              $9 = HEAP32[$1 + 24 >> 2];\n              $4 = HEAP32[$1 + 12 >> 2];\n              if (($4 | 0) != ($1 | 0)) {\n               $0 = HEAP32[$1 + 8 >> 2];\n               HEAP32[$0 + 12 >> 2] = $4;\n               HEAP32[$4 + 8 >> 2] = $0;\n               break label$2;\n              }\n              $2 = $1 + 20 | 0;\n              $0 = HEAP32[$2 >> 2];\n              if (!$0) {\n               $0 = HEAP32[$1 + 16 >> 2];\n               if (!$0) {\n                break label$10\n               }\n               $2 = $1 + 16 | 0;\n              }\n              while (1) {\n               $8 = $2;\n               $4 = $0;\n               $2 = $0 + 20 | 0;\n               $0 = HEAP32[$2 >> 2];\n               if ($0) {\n                continue\n               }\n               $2 = $4 + 16 | 0;\n               $0 = HEAP32[$4 + 16 >> 2];\n               if ($0) {\n                continue\n               }\n               break;\n              };\n              HEAP32[$8 >> 2] = 0;\n              break label$2;\n             }\n             $5 = -1;\n             if ($0 >>> 0 > 4294967231) {\n              break label$11\n             }\n             $0 = $0 + 11 | 0;\n             $5 = $0 & -8;\n             $8 = HEAP32[2898];\n             if (!$8) {\n              break label$11\n             }\n             $2 = 0 - $5 | 0;\n             $0 = $0 >>> 8 | 0;\n             $7 = 0;\n             label$29 : {\n              if (!$0) {\n               break label$29\n              }\n              $7 = 31;\n              if ($5 >>> 0 > 16777215) {\n               break label$29\n              }\n              $3 = $0 + 1048320 >>> 16 & 8;\n              $1 = $0 << $3;\n              $0 = $1 + 520192 >>> 16 & 4;\n              $6 = $1 << $0;\n              $1 = $6 + 245760 >>> 16 & 2;\n              $0 = ($6 << $1 >>> 15 | 0) - ($1 | ($0 | $3)) | 0;\n              $7 = ($0 << 1 | $5 >>> $0 + 21 & 1) + 28 | 0;\n             }\n             $3 = HEAP32[($7 << 2) + 11892 >> 2];\n             label$30 : {\n              label$31 : {\n               label$32 : {\n                if (!$3) {\n                 $0 = 0;\n                 break label$32;\n                }\n                $1 = $5 << (($7 | 0) == 31 ? 0 : 25 - ($7 >>> 1 | 0) | 0);\n                $0 = 0;\n                while (1) {\n                 label$35 : {\n                  $6 = (HEAP32[$3 + 4 >> 2] & -8) - $5 | 0;\n                  if ($6 >>> 0 >= $2 >>> 0) {\n                   break label$35\n                  }\n                  $4 = $3;\n                  $2 = $6;\n                  if ($2) {\n                   break label$35\n                  }\n                  $2 = 0;\n                  $0 = $3;\n                  break label$31;\n                 }\n                 $6 = HEAP32[$3 + 20 >> 2];\n                 $3 = HEAP32[(($1 >>> 29 & 4) + $3 | 0) + 16 >> 2];\n                 $0 = $6 ? (($6 | 0) == ($3 | 0) ? $0 : $6) : $0;\n                 $1 = $1 << (($3 | 0) != 0);\n                 if ($3) {\n                  continue\n                 }\n                 break;\n                };\n               }\n               if (!($0 | $4)) {\n                $0 = 2 << $7;\n                $0 = (0 - $0 | $0) & $8;\n                if (!$0) {\n                 break label$11\n                }\n                $0 = ($0 & 0 - $0) + -1 | 0;\n                $1 = $0 >>> 12 & 16;\n                $3 = $1;\n                $0 = $0 >>> $1 | 0;\n                $1 = $0 >>> 5 & 8;\n                $3 = $3 | $1;\n                $0 = $0 >>> $1 | 0;\n                $1 = $0 >>> 2 & 4;\n                $3 = $3 | $1;\n                $0 = $0 >>> $1 | 0;\n                $1 = $0 >>> 1 & 2;\n                $3 = $3 | $1;\n                $0 = $0 >>> $1 | 0;\n                $1 = $0 >>> 1 & 1;\n                $0 = HEAP32[(($3 | $1) + ($0 >>> $1 | 0) << 2) + 11892 >> 2];\n               }\n               if (!$0) {\n                break label$30\n               }\n              }\n              while (1) {\n               $3 = (HEAP32[$0 + 4 >> 2] & -8) - $5 | 0;\n               $1 = $3 >>> 0 < $2 >>> 0;\n               $2 = $1 ? $3 : $2;\n               $4 = $1 ? $0 : $4;\n               $1 = HEAP32[$0 + 16 >> 2];\n               if ($1) {\n                $0 = $1\n               } else {\n                $0 = HEAP32[$0 + 20 >> 2]\n               }\n               if ($0) {\n                continue\n               }\n               break;\n              };\n             }\n             if (!$4 | $2 >>> 0 >= HEAP32[2899] - $5 >>> 0) {\n              break label$11\n             }\n             $7 = HEAP32[$4 + 24 >> 2];\n             $1 = HEAP32[$4 + 12 >> 2];\n             if (($4 | 0) != ($1 | 0)) {\n              $0 = HEAP32[$4 + 8 >> 2];\n              HEAP32[$0 + 12 >> 2] = $1;\n              HEAP32[$1 + 8 >> 2] = $0;\n              break label$3;\n             }\n             $3 = $4 + 20 | 0;\n             $0 = HEAP32[$3 >> 2];\n             if (!$0) {\n              $0 = HEAP32[$4 + 16 >> 2];\n              if (!$0) {\n               break label$9\n              }\n              $3 = $4 + 16 | 0;\n             }\n             while (1) {\n              $6 = $3;\n              $1 = $0;\n              $3 = $0 + 20 | 0;\n              $0 = HEAP32[$3 >> 2];\n              if ($0) {\n               continue\n              }\n              $3 = $1 + 16 | 0;\n              $0 = HEAP32[$1 + 16 >> 2];\n              if ($0) {\n               continue\n              }\n              break;\n             };\n             HEAP32[$6 >> 2] = 0;\n             break label$3;\n            }\n            $1 = HEAP32[2899];\n            if ($1 >>> 0 >= $5 >>> 0) {\n             $0 = HEAP32[2902];\n             $2 = $1 - $5 | 0;\n             label$45 : {\n              if ($2 >>> 0 >= 16) {\n               HEAP32[2899] = $2;\n               $3 = $0 + $5 | 0;\n               HEAP32[2902] = $3;\n               HEAP32[$3 + 4 >> 2] = $2 | 1;\n               HEAP32[$0 + $1 >> 2] = $2;\n               HEAP32[$0 + 4 >> 2] = $5 | 3;\n               break label$45;\n              }\n              HEAP32[2902] = 0;\n              HEAP32[2899] = 0;\n              HEAP32[$0 + 4 >> 2] = $1 | 3;\n              $1 = $0 + $1 | 0;\n              HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] | 1;\n             }\n             $0 = $0 + 8 | 0;\n             break label$1;\n            }\n            $1 = HEAP32[2900];\n            if ($1 >>> 0 > $5 >>> 0) {\n             $1 = $1 - $5 | 0;\n             HEAP32[2900] = $1;\n             $0 = HEAP32[2903];\n             $2 = $0 + $5 | 0;\n             HEAP32[2903] = $2;\n             HEAP32[$2 + 4 >> 2] = $1 | 1;\n             HEAP32[$0 + 4 >> 2] = $5 | 3;\n             $0 = $0 + 8 | 0;\n             break label$1;\n            }\n            $0 = 0;\n            $4 = $5 + 47 | 0;\n            $3 = $4;\n            if (HEAP32[3015]) {\n             $2 = HEAP32[3017]\n            } else {\n             HEAP32[3018] = -1;\n             HEAP32[3019] = -1;\n             HEAP32[3016] = 4096;\n             HEAP32[3017] = 4096;\n             HEAP32[3015] = $11 + 12 & -16 ^ 1431655768;\n             HEAP32[3020] = 0;\n             HEAP32[3008] = 0;\n             $2 = 4096;\n            }\n            $6 = $3 + $2 | 0;\n            $8 = 0 - $2 | 0;\n            $2 = $6 & $8;\n            if ($2 >>> 0 <= $5 >>> 0) {\n             break label$1\n            }\n            $3 = HEAP32[3007];\n            if ($3) {\n             $7 = HEAP32[3005];\n             $9 = $7 + $2 | 0;\n             if ($9 >>> 0 <= $7 >>> 0 | $9 >>> 0 > $3 >>> 0) {\n              break label$1\n             }\n            }\n            if (HEAPU8[12032] & 4) {\n             break label$6\n            }\n            label$51 : {\n             label$52 : {\n              $3 = HEAP32[2903];\n              if ($3) {\n               $0 = 12036;\n               while (1) {\n                $7 = HEAP32[$0 >> 2];\n                if ($7 + HEAP32[$0 + 4 >> 2] >>> 0 > $3 >>> 0 ? $7 >>> 0 <= $3 >>> 0 : 0) {\n                 break label$52\n                }\n                $0 = HEAP32[$0 + 8 >> 2];\n                if ($0) {\n                 continue\n                }\n                break;\n               };\n              }\n              $1 = sbrk(0);\n              if (($1 | 0) == -1) {\n               break label$7\n              }\n              $6 = $2;\n              $0 = HEAP32[3016];\n              $3 = $0 + -1 | 0;\n              if ($3 & $1) {\n               $6 = ($2 - $1 | 0) + ($1 + $3 & 0 - $0) | 0\n              }\n              if ($6 >>> 0 <= $5 >>> 0 | $6 >>> 0 > 2147483646) {\n               break label$7\n              }\n              $0 = HEAP32[3007];\n              if ($0) {\n               $3 = HEAP32[3005];\n               $8 = $3 + $6 | 0;\n               if ($8 >>> 0 <= $3 >>> 0 | $8 >>> 0 > $0 >>> 0) {\n                break label$7\n               }\n              }\n              $0 = sbrk($6);\n              if (($1 | 0) != ($0 | 0)) {\n               break label$51\n              }\n              break label$5;\n             }\n             $6 = $8 & $6 - $1;\n             if ($6 >>> 0 > 2147483646) {\n              break label$7\n             }\n             $1 = sbrk($6);\n             if (($1 | 0) == (HEAP32[$0 >> 2] + HEAP32[$0 + 4 >> 2] | 0)) {\n              break label$8\n             }\n             $0 = $1;\n            }\n            if (!(($0 | 0) == -1 | $5 + 48 >>> 0 <= $6 >>> 0)) {\n             $1 = HEAP32[3017];\n             $1 = $1 + ($4 - $6 | 0) & 0 - $1;\n             if ($1 >>> 0 > 2147483646) {\n              $1 = $0;\n              break label$5;\n             }\n             if ((sbrk($1) | 0) != -1) {\n              $6 = $1 + $6 | 0;\n              $1 = $0;\n              break label$5;\n             }\n             sbrk(0 - $6 | 0);\n             break label$7;\n            }\n            $1 = $0;\n            if (($0 | 0) != -1) {\n             break label$5\n            }\n            break label$7;\n           }\n           $4 = 0;\n           break label$2;\n          }\n          $1 = 0;\n          break label$3;\n         }\n         if (($1 | 0) != -1) {\n          break label$5\n         }\n        }\n        HEAP32[3008] = HEAP32[3008] | 4;\n       }\n       if ($2 >>> 0 > 2147483646) {\n        break label$4\n       }\n       $1 = sbrk($2);\n       $0 = sbrk(0);\n       if ($1 >>> 0 >= $0 >>> 0 | ($1 | 0) == -1 | ($0 | 0) == -1) {\n        break label$4\n       }\n       $6 = $0 - $1 | 0;\n       if ($6 >>> 0 <= $5 + 40 >>> 0) {\n        break label$4\n       }\n      }\n      $0 = HEAP32[3005] + $6 | 0;\n      HEAP32[3005] = $0;\n      if ($0 >>> 0 > HEAPU32[3006]) {\n       HEAP32[3006] = $0\n      }\n      label$62 : {\n       label$63 : {\n        label$64 : {\n         $3 = HEAP32[2903];\n         if ($3) {\n          $0 = 12036;\n          while (1) {\n           $2 = HEAP32[$0 >> 2];\n           $4 = HEAP32[$0 + 4 >> 2];\n           if (($2 + $4 | 0) == ($1 | 0)) {\n            break label$64\n           }\n           $0 = HEAP32[$0 + 8 >> 2];\n           if ($0) {\n            continue\n           }\n           break;\n          };\n          break label$63;\n         }\n         $0 = HEAP32[2901];\n         if (!($1 >>> 0 >= $0 >>> 0 ? $0 : 0)) {\n          HEAP32[2901] = $1\n         }\n         $0 = 0;\n         HEAP32[3010] = $6;\n         HEAP32[3009] = $1;\n         HEAP32[2905] = -1;\n         HEAP32[2906] = HEAP32[3015];\n         HEAP32[3012] = 0;\n         while (1) {\n          $2 = $0 << 3;\n          $3 = $2 + 11628 | 0;\n          HEAP32[$2 + 11636 >> 2] = $3;\n          HEAP32[$2 + 11640 >> 2] = $3;\n          $0 = $0 + 1 | 0;\n          if (($0 | 0) != 32) {\n           continue\n          }\n          break;\n         };\n         $0 = $6 + -40 | 0;\n         $2 = $1 + 8 & 7 ? -8 - $1 & 7 : 0;\n         $3 = $0 - $2 | 0;\n         HEAP32[2900] = $3;\n         $2 = $1 + $2 | 0;\n         HEAP32[2903] = $2;\n         HEAP32[$2 + 4 >> 2] = $3 | 1;\n         HEAP32[($0 + $1 | 0) + 4 >> 2] = 40;\n         HEAP32[2904] = HEAP32[3019];\n         break label$62;\n        }\n        if (HEAPU8[$0 + 12 | 0] & 8 | $1 >>> 0 <= $3 >>> 0 | $2 >>> 0 > $3 >>> 0) {\n         break label$63\n        }\n        HEAP32[$0 + 4 >> 2] = $4 + $6;\n        $0 = $3 + 8 & 7 ? -8 - $3 & 7 : 0;\n        $1 = $0 + $3 | 0;\n        HEAP32[2903] = $1;\n        $2 = HEAP32[2900] + $6 | 0;\n        $0 = $2 - $0 | 0;\n        HEAP32[2900] = $0;\n        HEAP32[$1 + 4 >> 2] = $0 | 1;\n        HEAP32[($2 + $3 | 0) + 4 >> 2] = 40;\n        HEAP32[2904] = HEAP32[3019];\n        break label$62;\n       }\n       $0 = HEAP32[2901];\n       if ($1 >>> 0 < $0 >>> 0) {\n        HEAP32[2901] = $1;\n        $0 = 0;\n       }\n       $2 = $1 + $6 | 0;\n       $0 = 12036;\n       label$70 : {\n        label$71 : {\n         label$72 : {\n          label$73 : {\n           label$74 : {\n            label$75 : {\n             while (1) {\n              if (($2 | 0) != HEAP32[$0 >> 2]) {\n               $0 = HEAP32[$0 + 8 >> 2];\n               if ($0) {\n                continue\n               }\n               break label$75;\n              }\n              break;\n             };\n             if (!(HEAPU8[$0 + 12 | 0] & 8)) {\n              break label$74\n             }\n            }\n            $0 = 12036;\n            while (1) {\n             $2 = HEAP32[$0 >> 2];\n             if ($2 >>> 0 <= $3 >>> 0) {\n              $4 = $2 + HEAP32[$0 + 4 >> 2] | 0;\n              if ($4 >>> 0 > $3 >>> 0) {\n               break label$73\n              }\n             }\n             $0 = HEAP32[$0 + 8 >> 2];\n             continue;\n            };\n           }\n           HEAP32[$0 >> 2] = $1;\n           HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] + $6;\n           $7 = ($1 + 8 & 7 ? -8 - $1 & 7 : 0) + $1 | 0;\n           HEAP32[$7 + 4 >> 2] = $5 | 3;\n           $1 = $2 + ($2 + 8 & 7 ? -8 - $2 & 7 : 0) | 0;\n           $0 = ($1 - $7 | 0) - $5 | 0;\n           $4 = $5 + $7 | 0;\n           if (($1 | 0) == ($3 | 0)) {\n            HEAP32[2903] = $4;\n            $0 = HEAP32[2900] + $0 | 0;\n            HEAP32[2900] = $0;\n            HEAP32[$4 + 4 >> 2] = $0 | 1;\n            break label$71;\n           }\n           if (HEAP32[2902] == ($1 | 0)) {\n            HEAP32[2902] = $4;\n            $0 = HEAP32[2899] + $0 | 0;\n            HEAP32[2899] = $0;\n            HEAP32[$4 + 4 >> 2] = $0 | 1;\n            HEAP32[$0 + $4 >> 2] = $0;\n            break label$71;\n           }\n           $2 = HEAP32[$1 + 4 >> 2];\n           if (($2 & 3) == 1) {\n            $9 = $2 & -8;\n            label$83 : {\n             if ($2 >>> 0 <= 255) {\n              $3 = HEAP32[$1 + 8 >> 2];\n              $5 = $2 >>> 3 | 0;\n              $2 = HEAP32[$1 + 12 >> 2];\n              if (($2 | 0) == ($3 | 0)) {\n               (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $5)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n               break label$83;\n              }\n              HEAP32[$3 + 12 >> 2] = $2;\n              HEAP32[$2 + 8 >> 2] = $3;\n              break label$83;\n             }\n             $8 = HEAP32[$1 + 24 >> 2];\n             $6 = HEAP32[$1 + 12 >> 2];\n             label$86 : {\n              if (($6 | 0) != ($1 | 0)) {\n               $2 = HEAP32[$1 + 8 >> 2];\n               HEAP32[$2 + 12 >> 2] = $6;\n               HEAP32[$6 + 8 >> 2] = $2;\n               break label$86;\n              }\n              label$89 : {\n               $3 = $1 + 20 | 0;\n               $5 = HEAP32[$3 >> 2];\n               if ($5) {\n                break label$89\n               }\n               $3 = $1 + 16 | 0;\n               $5 = HEAP32[$3 >> 2];\n               if ($5) {\n                break label$89\n               }\n               $6 = 0;\n               break label$86;\n              }\n              while (1) {\n               $2 = $3;\n               $6 = $5;\n               $3 = $5 + 20 | 0;\n               $5 = HEAP32[$3 >> 2];\n               if ($5) {\n                continue\n               }\n               $3 = $6 + 16 | 0;\n               $5 = HEAP32[$6 + 16 >> 2];\n               if ($5) {\n                continue\n               }\n               break;\n              };\n              HEAP32[$2 >> 2] = 0;\n             }\n             if (!$8) {\n              break label$83\n             }\n             $2 = HEAP32[$1 + 28 >> 2];\n             $3 = ($2 << 2) + 11892 | 0;\n             label$91 : {\n              if (HEAP32[$3 >> 2] == ($1 | 0)) {\n               HEAP32[$3 >> 2] = $6;\n               if ($6) {\n                break label$91\n               }\n               (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $2)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n               break label$83;\n              }\n              HEAP32[$8 + (HEAP32[$8 + 16 >> 2] == ($1 | 0) ? 16 : 20) >> 2] = $6;\n              if (!$6) {\n               break label$83\n              }\n             }\n             HEAP32[$6 + 24 >> 2] = $8;\n             $2 = HEAP32[$1 + 16 >> 2];\n             if ($2) {\n              HEAP32[$6 + 16 >> 2] = $2;\n              HEAP32[$2 + 24 >> 2] = $6;\n             }\n             $2 = HEAP32[$1 + 20 >> 2];\n             if (!$2) {\n              break label$83\n             }\n             HEAP32[$6 + 20 >> 2] = $2;\n             HEAP32[$2 + 24 >> 2] = $6;\n            }\n            $1 = $1 + $9 | 0;\n            $0 = $0 + $9 | 0;\n           }\n           HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] & -2;\n           HEAP32[$4 + 4 >> 2] = $0 | 1;\n           HEAP32[$0 + $4 >> 2] = $0;\n           if ($0 >>> 0 <= 255) {\n            $1 = $0 >>> 3 | 0;\n            $0 = ($1 << 3) + 11628 | 0;\n            $2 = HEAP32[2897];\n            $1 = 1 << $1;\n            label$95 : {\n             if (!($2 & $1)) {\n              HEAP32[2897] = $1 | $2;\n              $1 = $0;\n              break label$95;\n             }\n             $1 = HEAP32[$0 + 8 >> 2];\n            }\n            HEAP32[$0 + 8 >> 2] = $4;\n            HEAP32[$1 + 12 >> 2] = $4;\n            HEAP32[$4 + 12 >> 2] = $0;\n            HEAP32[$4 + 8 >> 2] = $1;\n            break label$71;\n           }\n           $6 = $4;\n           $1 = $0 >>> 8 | 0;\n           $2 = 0;\n           label$97 : {\n            if (!$1) {\n             break label$97\n            }\n            $2 = 31;\n            if ($0 >>> 0 > 16777215) {\n             break label$97\n            }\n            $3 = $1 + 1048320 >>> 16 & 8;\n            $2 = $1 << $3;\n            $1 = $2 + 520192 >>> 16 & 4;\n            $5 = $2 << $1;\n            $2 = $5 + 245760 >>> 16 & 2;\n            $1 = ($5 << $2 >>> 15 | 0) - ($2 | ($1 | $3)) | 0;\n            $2 = ($1 << 1 | $0 >>> $1 + 21 & 1) + 28 | 0;\n           }\n           $1 = $2;\n           HEAP32[$6 + 28 >> 2] = $1;\n           HEAP32[$4 + 16 >> 2] = 0;\n           HEAP32[$4 + 20 >> 2] = 0;\n           $2 = ($1 << 2) + 11892 | 0;\n           $3 = HEAP32[2898];\n           $5 = 1 << $1;\n           label$98 : {\n            if (!($3 & $5)) {\n             HEAP32[2898] = $3 | $5;\n             HEAP32[$2 >> 2] = $4;\n             break label$98;\n            }\n            $3 = $0 << (($1 | 0) == 31 ? 0 : 25 - ($1 >>> 1 | 0) | 0);\n            $1 = HEAP32[$2 >> 2];\n            while (1) {\n             $2 = $1;\n             if ((HEAP32[$1 + 4 >> 2] & -8) == ($0 | 0)) {\n              break label$72\n             }\n             $1 = $3 >>> 29 | 0;\n             $3 = $3 << 1;\n             $5 = ($2 + ($1 & 4) | 0) + 16 | 0;\n             $1 = HEAP32[$5 >> 2];\n             if ($1) {\n              continue\n             }\n             break;\n            };\n            HEAP32[$5 >> 2] = $4;\n           }\n           HEAP32[$4 + 24 >> 2] = $2;\n           HEAP32[$4 + 12 >> 2] = $4;\n           HEAP32[$4 + 8 >> 2] = $4;\n           break label$71;\n          }\n          $0 = $6 + -40 | 0;\n          $2 = $1 + 8 & 7 ? -8 - $1 & 7 : 0;\n          $8 = $0 - $2 | 0;\n          HEAP32[2900] = $8;\n          $2 = $1 + $2 | 0;\n          HEAP32[2903] = $2;\n          HEAP32[$2 + 4 >> 2] = $8 | 1;\n          HEAP32[($0 + $1 | 0) + 4 >> 2] = 40;\n          HEAP32[2904] = HEAP32[3019];\n          $0 = ($4 + ($4 + -39 & 7 ? 39 - $4 & 7 : 0) | 0) + -47 | 0;\n          $2 = $0 >>> 0 < $3 + 16 >>> 0 ? $3 : $0;\n          HEAP32[$2 + 4 >> 2] = 27;\n          $0 = HEAP32[3012];\n          HEAP32[$2 + 16 >> 2] = HEAP32[3011];\n          HEAP32[$2 + 20 >> 2] = $0;\n          $0 = HEAP32[3010];\n          HEAP32[$2 + 8 >> 2] = HEAP32[3009];\n          HEAP32[$2 + 12 >> 2] = $0;\n          HEAP32[3011] = $2 + 8;\n          HEAP32[3010] = $6;\n          HEAP32[3009] = $1;\n          HEAP32[3012] = 0;\n          $0 = $2 + 24 | 0;\n          while (1) {\n           HEAP32[$0 + 4 >> 2] = 7;\n           $1 = $0 + 8 | 0;\n           $0 = $0 + 4 | 0;\n           if ($4 >>> 0 > $1 >>> 0) {\n            continue\n           }\n           break;\n          };\n          if (($2 | 0) == ($3 | 0)) {\n           break label$62\n          }\n          HEAP32[$2 + 4 >> 2] = HEAP32[$2 + 4 >> 2] & -2;\n          $6 = $2 - $3 | 0;\n          HEAP32[$3 + 4 >> 2] = $6 | 1;\n          HEAP32[$2 >> 2] = $6;\n          if ($6 >>> 0 <= 255) {\n           $1 = $6 >>> 3 | 0;\n           $0 = ($1 << 3) + 11628 | 0;\n           $2 = HEAP32[2897];\n           $1 = 1 << $1;\n           label$103 : {\n            if (!($2 & $1)) {\n             HEAP32[2897] = $1 | $2;\n             $1 = $0;\n             break label$103;\n            }\n            $1 = HEAP32[$0 + 8 >> 2];\n           }\n           HEAP32[$0 + 8 >> 2] = $3;\n           HEAP32[$1 + 12 >> 2] = $3;\n           HEAP32[$3 + 12 >> 2] = $0;\n           HEAP32[$3 + 8 >> 2] = $1;\n           break label$62;\n          }\n          HEAP32[$3 + 16 >> 2] = 0;\n          HEAP32[$3 + 20 >> 2] = 0;\n          $7 = $3;\n          $0 = $6 >>> 8 | 0;\n          $1 = 0;\n          label$105 : {\n           if (!$0) {\n            break label$105\n           }\n           $1 = 31;\n           if ($6 >>> 0 > 16777215) {\n            break label$105\n           }\n           $2 = $0 + 1048320 >>> 16 & 8;\n           $1 = $0 << $2;\n           $0 = $1 + 520192 >>> 16 & 4;\n           $4 = $1 << $0;\n           $1 = $4 + 245760 >>> 16 & 2;\n           $0 = ($4 << $1 >>> 15 | 0) - ($1 | ($0 | $2)) | 0;\n           $1 = ($0 << 1 | $6 >>> $0 + 21 & 1) + 28 | 0;\n          }\n          $0 = $1;\n          HEAP32[$7 + 28 >> 2] = $0;\n          $1 = ($0 << 2) + 11892 | 0;\n          $2 = HEAP32[2898];\n          $4 = 1 << $0;\n          label$106 : {\n           if (!($2 & $4)) {\n            HEAP32[2898] = $2 | $4;\n            HEAP32[$1 >> 2] = $3;\n            HEAP32[$3 + 24 >> 2] = $1;\n            break label$106;\n           }\n           $0 = $6 << (($0 | 0) == 31 ? 0 : 25 - ($0 >>> 1 | 0) | 0);\n           $1 = HEAP32[$1 >> 2];\n           while (1) {\n            $2 = $1;\n            if (($6 | 0) == (HEAP32[$1 + 4 >> 2] & -8)) {\n             break label$70\n            }\n            $1 = $0 >>> 29 | 0;\n            $0 = $0 << 1;\n            $4 = ($2 + ($1 & 4) | 0) + 16 | 0;\n            $1 = HEAP32[$4 >> 2];\n            if ($1) {\n             continue\n            }\n            break;\n           };\n           HEAP32[$4 >> 2] = $3;\n           HEAP32[$3 + 24 >> 2] = $2;\n          }\n          HEAP32[$3 + 12 >> 2] = $3;\n          HEAP32[$3 + 8 >> 2] = $3;\n          break label$62;\n         }\n         $0 = HEAP32[$2 + 8 >> 2];\n         HEAP32[$0 + 12 >> 2] = $4;\n         HEAP32[$2 + 8 >> 2] = $4;\n         HEAP32[$4 + 24 >> 2] = 0;\n         HEAP32[$4 + 12 >> 2] = $2;\n         HEAP32[$4 + 8 >> 2] = $0;\n        }\n        $0 = $7 + 8 | 0;\n        break label$1;\n       }\n       $0 = HEAP32[$2 + 8 >> 2];\n       HEAP32[$0 + 12 >> 2] = $3;\n       HEAP32[$2 + 8 >> 2] = $3;\n       HEAP32[$3 + 24 >> 2] = 0;\n       HEAP32[$3 + 12 >> 2] = $2;\n       HEAP32[$3 + 8 >> 2] = $0;\n      }\n      $0 = HEAP32[2900];\n      if ($0 >>> 0 <= $5 >>> 0) {\n       break label$4\n      }\n      $1 = $0 - $5 | 0;\n      HEAP32[2900] = $1;\n      $0 = HEAP32[2903];\n      $2 = $0 + $5 | 0;\n      HEAP32[2903] = $2;\n      HEAP32[$2 + 4 >> 2] = $1 | 1;\n      HEAP32[$0 + 4 >> 2] = $5 | 3;\n      $0 = $0 + 8 | 0;\n      break label$1;\n     }\n     HEAP32[2896] = 48;\n     $0 = 0;\n     break label$1;\n    }\n    label$109 : {\n     if (!$7) {\n      break label$109\n     }\n     $0 = HEAP32[$4 + 28 >> 2];\n     $3 = ($0 << 2) + 11892 | 0;\n     label$110 : {\n      if (HEAP32[$3 >> 2] == ($4 | 0)) {\n       HEAP32[$3 >> 2] = $1;\n       if ($1) {\n        break label$110\n       }\n       $8 = __wasm_rotl_i32(-2, $0) & $8;\n       HEAP32[2898] = $8;\n       break label$109;\n      }\n      HEAP32[$7 + (HEAP32[$7 + 16 >> 2] == ($4 | 0) ? 16 : 20) >> 2] = $1;\n      if (!$1) {\n       break label$109\n      }\n     }\n     HEAP32[$1 + 24 >> 2] = $7;\n     $0 = HEAP32[$4 + 16 >> 2];\n     if ($0) {\n      HEAP32[$1 + 16 >> 2] = $0;\n      HEAP32[$0 + 24 >> 2] = $1;\n     }\n     $0 = HEAP32[$4 + 20 >> 2];\n     if (!$0) {\n      break label$109\n     }\n     HEAP32[$1 + 20 >> 2] = $0;\n     HEAP32[$0 + 24 >> 2] = $1;\n    }\n    label$113 : {\n     if ($2 >>> 0 <= 15) {\n      $0 = $2 + $5 | 0;\n      HEAP32[$4 + 4 >> 2] = $0 | 3;\n      $0 = $0 + $4 | 0;\n      HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] | 1;\n      break label$113;\n     }\n     HEAP32[$4 + 4 >> 2] = $5 | 3;\n     $1 = $4 + $5 | 0;\n     HEAP32[$1 + 4 >> 2] = $2 | 1;\n     HEAP32[$1 + $2 >> 2] = $2;\n     if ($2 >>> 0 <= 255) {\n      $2 = $2 >>> 3 | 0;\n      $0 = ($2 << 3) + 11628 | 0;\n      $3 = HEAP32[2897];\n      $2 = 1 << $2;\n      label$116 : {\n       if (!($3 & $2)) {\n        HEAP32[2897] = $2 | $3;\n        $2 = $0;\n        break label$116;\n       }\n       $2 = HEAP32[$0 + 8 >> 2];\n      }\n      HEAP32[$0 + 8 >> 2] = $1;\n      HEAP32[$2 + 12 >> 2] = $1;\n      HEAP32[$1 + 12 >> 2] = $0;\n      HEAP32[$1 + 8 >> 2] = $2;\n      break label$113;\n     }\n     $7 = $1;\n     $0 = $2 >>> 8 | 0;\n     $3 = 0;\n     label$118 : {\n      if (!$0) {\n       break label$118\n      }\n      $3 = 31;\n      if ($2 >>> 0 > 16777215) {\n       break label$118\n      }\n      $5 = $0 + 1048320 >>> 16 & 8;\n      $3 = $0 << $5;\n      $0 = $3 + 520192 >>> 16 & 4;\n      $6 = $3 << $0;\n      $3 = $6 + 245760 >>> 16 & 2;\n      $0 = ($6 << $3 >>> 15 | 0) - ($3 | ($0 | $5)) | 0;\n      $3 = ($0 << 1 | $2 >>> $0 + 21 & 1) + 28 | 0;\n     }\n     $0 = $3;\n     HEAP32[$7 + 28 >> 2] = $0;\n     HEAP32[$1 + 16 >> 2] = 0;\n     HEAP32[$1 + 20 >> 2] = 0;\n     $3 = ($0 << 2) + 11892 | 0;\n     label$119 : {\n      $5 = 1 << $0;\n      label$120 : {\n       if (!($5 & $8)) {\n        HEAP32[2898] = $5 | $8;\n        HEAP32[$3 >> 2] = $1;\n        break label$120;\n       }\n       $0 = $2 << (($0 | 0) == 31 ? 0 : 25 - ($0 >>> 1 | 0) | 0);\n       $5 = HEAP32[$3 >> 2];\n       while (1) {\n        $3 = $5;\n        if ((HEAP32[$3 + 4 >> 2] & -8) == ($2 | 0)) {\n         break label$119\n        }\n        $5 = $0 >>> 29 | 0;\n        $0 = $0 << 1;\n        $6 = ($3 + ($5 & 4) | 0) + 16 | 0;\n        $5 = HEAP32[$6 >> 2];\n        if ($5) {\n         continue\n        }\n        break;\n       };\n       HEAP32[$6 >> 2] = $1;\n      }\n      HEAP32[$1 + 24 >> 2] = $3;\n      HEAP32[$1 + 12 >> 2] = $1;\n      HEAP32[$1 + 8 >> 2] = $1;\n      break label$113;\n     }\n     $0 = HEAP32[$3 + 8 >> 2];\n     HEAP32[$0 + 12 >> 2] = $1;\n     HEAP32[$3 + 8 >> 2] = $1;\n     HEAP32[$1 + 24 >> 2] = 0;\n     HEAP32[$1 + 12 >> 2] = $3;\n     HEAP32[$1 + 8 >> 2] = $0;\n    }\n    $0 = $4 + 8 | 0;\n    break label$1;\n   }\n   label$123 : {\n    if (!$9) {\n     break label$123\n    }\n    $0 = HEAP32[$1 + 28 >> 2];\n    $2 = ($0 << 2) + 11892 | 0;\n    label$124 : {\n     if (HEAP32[$2 >> 2] == ($1 | 0)) {\n      HEAP32[$2 >> 2] = $4;\n      if ($4) {\n       break label$124\n      }\n      (wasm2js_i32$0 = 11592, wasm2js_i32$1 = __wasm_rotl_i32(-2, $0) & $10), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n      break label$123;\n     }\n     HEAP32[(HEAP32[$9 + 16 >> 2] == ($1 | 0) ? 16 : 20) + $9 >> 2] = $4;\n     if (!$4) {\n      break label$123\n     }\n    }\n    HEAP32[$4 + 24 >> 2] = $9;\n    $0 = HEAP32[$1 + 16 >> 2];\n    if ($0) {\n     HEAP32[$4 + 16 >> 2] = $0;\n     HEAP32[$0 + 24 >> 2] = $4;\n    }\n    $0 = HEAP32[$1 + 20 >> 2];\n    if (!$0) {\n     break label$123\n    }\n    HEAP32[$4 + 20 >> 2] = $0;\n    HEAP32[$0 + 24 >> 2] = $4;\n   }\n   label$127 : {\n    if ($3 >>> 0 <= 15) {\n     $0 = $3 + $5 | 0;\n     HEAP32[$1 + 4 >> 2] = $0 | 3;\n     $0 = $0 + $1 | 0;\n     HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] | 1;\n     break label$127;\n    }\n    HEAP32[$1 + 4 >> 2] = $5 | 3;\n    $5 = $1 + $5 | 0;\n    HEAP32[$5 + 4 >> 2] = $3 | 1;\n    HEAP32[$3 + $5 >> 2] = $3;\n    if ($7) {\n     $4 = $7 >>> 3 | 0;\n     $0 = ($4 << 3) + 11628 | 0;\n     $2 = HEAP32[2902];\n     $4 = 1 << $4;\n     label$130 : {\n      if (!($4 & $6)) {\n       HEAP32[2897] = $4 | $6;\n       $6 = $0;\n       break label$130;\n      }\n      $6 = HEAP32[$0 + 8 >> 2];\n     }\n     HEAP32[$0 + 8 >> 2] = $2;\n     HEAP32[$6 + 12 >> 2] = $2;\n     HEAP32[$2 + 12 >> 2] = $0;\n     HEAP32[$2 + 8 >> 2] = $6;\n    }\n    HEAP32[2902] = $5;\n    HEAP32[2899] = $3;\n   }\n   $0 = $1 + 8 | 0;\n  }\n  global$0 = $11 + 16 | 0;\n  return $0 | 0;\n }\n \n function dlfree($0) {\n  $0 = $0 | 0;\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;\n  label$1 : {\n   if (!$0) {\n    break label$1\n   }\n   $3 = $0 + -8 | 0;\n   $2 = HEAP32[$0 + -4 >> 2];\n   $0 = $2 & -8;\n   $5 = $3 + $0 | 0;\n   label$2 : {\n    if ($2 & 1) {\n     break label$2\n    }\n    if (!($2 & 3)) {\n     break label$1\n    }\n    $2 = HEAP32[$3 >> 2];\n    $3 = $3 - $2 | 0;\n    if ($3 >>> 0 < HEAPU32[2901]) {\n     break label$1\n    }\n    $0 = $0 + $2 | 0;\n    if (HEAP32[2902] != ($3 | 0)) {\n     if ($2 >>> 0 <= 255) {\n      $4 = HEAP32[$3 + 8 >> 2];\n      $2 = $2 >>> 3 | 0;\n      $1 = HEAP32[$3 + 12 >> 2];\n      if (($1 | 0) == ($4 | 0)) {\n       (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $2)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n       break label$2;\n      }\n      HEAP32[$4 + 12 >> 2] = $1;\n      HEAP32[$1 + 8 >> 2] = $4;\n      break label$2;\n     }\n     $7 = HEAP32[$3 + 24 >> 2];\n     $2 = HEAP32[$3 + 12 >> 2];\n     label$6 : {\n      if (($2 | 0) != ($3 | 0)) {\n       $1 = HEAP32[$3 + 8 >> 2];\n       HEAP32[$1 + 12 >> 2] = $2;\n       HEAP32[$2 + 8 >> 2] = $1;\n       break label$6;\n      }\n      label$9 : {\n       $4 = $3 + 20 | 0;\n       $1 = HEAP32[$4 >> 2];\n       if ($1) {\n        break label$9\n       }\n       $4 = $3 + 16 | 0;\n       $1 = HEAP32[$4 >> 2];\n       if ($1) {\n        break label$9\n       }\n       $2 = 0;\n       break label$6;\n      }\n      while (1) {\n       $6 = $4;\n       $2 = $1;\n       $4 = $2 + 20 | 0;\n       $1 = HEAP32[$4 >> 2];\n       if ($1) {\n        continue\n       }\n       $4 = $2 + 16 | 0;\n       $1 = HEAP32[$2 + 16 >> 2];\n       if ($1) {\n        continue\n       }\n       break;\n      };\n      HEAP32[$6 >> 2] = 0;\n     }\n     if (!$7) {\n      break label$2\n     }\n     $4 = HEAP32[$3 + 28 >> 2];\n     $1 = ($4 << 2) + 11892 | 0;\n     label$11 : {\n      if (HEAP32[$1 >> 2] == ($3 | 0)) {\n       HEAP32[$1 >> 2] = $2;\n       if ($2) {\n        break label$11\n       }\n       (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $4)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n       break label$2;\n      }\n      HEAP32[$7 + (HEAP32[$7 + 16 >> 2] == ($3 | 0) ? 16 : 20) >> 2] = $2;\n      if (!$2) {\n       break label$2\n      }\n     }\n     HEAP32[$2 + 24 >> 2] = $7;\n     $1 = HEAP32[$3 + 16 >> 2];\n     if ($1) {\n      HEAP32[$2 + 16 >> 2] = $1;\n      HEAP32[$1 + 24 >> 2] = $2;\n     }\n     $1 = HEAP32[$3 + 20 >> 2];\n     if (!$1) {\n      break label$2\n     }\n     HEAP32[$2 + 20 >> 2] = $1;\n     HEAP32[$1 + 24 >> 2] = $2;\n     break label$2;\n    }\n    $2 = HEAP32[$5 + 4 >> 2];\n    if (($2 & 3) != 3) {\n     break label$2\n    }\n    HEAP32[2899] = $0;\n    HEAP32[$5 + 4 >> 2] = $2 & -2;\n    HEAP32[$3 + 4 >> 2] = $0 | 1;\n    HEAP32[$0 + $3 >> 2] = $0;\n    return;\n   }\n   if ($5 >>> 0 <= $3 >>> 0) {\n    break label$1\n   }\n   $2 = HEAP32[$5 + 4 >> 2];\n   if (!($2 & 1)) {\n    break label$1\n   }\n   label$14 : {\n    if (!($2 & 2)) {\n     if (($5 | 0) == HEAP32[2903]) {\n      HEAP32[2903] = $3;\n      $0 = HEAP32[2900] + $0 | 0;\n      HEAP32[2900] = $0;\n      HEAP32[$3 + 4 >> 2] = $0 | 1;\n      if (HEAP32[2902] != ($3 | 0)) {\n       break label$1\n      }\n      HEAP32[2899] = 0;\n      HEAP32[2902] = 0;\n      return;\n     }\n     if (($5 | 0) == HEAP32[2902]) {\n      HEAP32[2902] = $3;\n      $0 = HEAP32[2899] + $0 | 0;\n      HEAP32[2899] = $0;\n      HEAP32[$3 + 4 >> 2] = $0 | 1;\n      HEAP32[$0 + $3 >> 2] = $0;\n      return;\n     }\n     $0 = ($2 & -8) + $0 | 0;\n     label$18 : {\n      if ($2 >>> 0 <= 255) {\n       $1 = HEAP32[$5 + 8 >> 2];\n       $2 = $2 >>> 3 | 0;\n       $4 = HEAP32[$5 + 12 >> 2];\n       if (($1 | 0) == ($4 | 0)) {\n        (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $2)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n        break label$18;\n       }\n       HEAP32[$1 + 12 >> 2] = $4;\n       HEAP32[$4 + 8 >> 2] = $1;\n       break label$18;\n      }\n      $7 = HEAP32[$5 + 24 >> 2];\n      $2 = HEAP32[$5 + 12 >> 2];\n      label$23 : {\n       if (($5 | 0) != ($2 | 0)) {\n        $1 = HEAP32[$5 + 8 >> 2];\n        HEAP32[$1 + 12 >> 2] = $2;\n        HEAP32[$2 + 8 >> 2] = $1;\n        break label$23;\n       }\n       label$26 : {\n        $4 = $5 + 20 | 0;\n        $1 = HEAP32[$4 >> 2];\n        if ($1) {\n         break label$26\n        }\n        $4 = $5 + 16 | 0;\n        $1 = HEAP32[$4 >> 2];\n        if ($1) {\n         break label$26\n        }\n        $2 = 0;\n        break label$23;\n       }\n       while (1) {\n        $6 = $4;\n        $2 = $1;\n        $4 = $2 + 20 | 0;\n        $1 = HEAP32[$4 >> 2];\n        if ($1) {\n         continue\n        }\n        $4 = $2 + 16 | 0;\n        $1 = HEAP32[$2 + 16 >> 2];\n        if ($1) {\n         continue\n        }\n        break;\n       };\n       HEAP32[$6 >> 2] = 0;\n      }\n      if (!$7) {\n       break label$18\n      }\n      $4 = HEAP32[$5 + 28 >> 2];\n      $1 = ($4 << 2) + 11892 | 0;\n      label$28 : {\n       if (($5 | 0) == HEAP32[$1 >> 2]) {\n        HEAP32[$1 >> 2] = $2;\n        if ($2) {\n         break label$28\n        }\n        (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $4)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n        break label$18;\n       }\n       HEAP32[$7 + (($5 | 0) == HEAP32[$7 + 16 >> 2] ? 16 : 20) >> 2] = $2;\n       if (!$2) {\n        break label$18\n       }\n      }\n      HEAP32[$2 + 24 >> 2] = $7;\n      $1 = HEAP32[$5 + 16 >> 2];\n      if ($1) {\n       HEAP32[$2 + 16 >> 2] = $1;\n       HEAP32[$1 + 24 >> 2] = $2;\n      }\n      $1 = HEAP32[$5 + 20 >> 2];\n      if (!$1) {\n       break label$18\n      }\n      HEAP32[$2 + 20 >> 2] = $1;\n      HEAP32[$1 + 24 >> 2] = $2;\n     }\n     HEAP32[$3 + 4 >> 2] = $0 | 1;\n     HEAP32[$0 + $3 >> 2] = $0;\n     if (HEAP32[2902] != ($3 | 0)) {\n      break label$14\n     }\n     HEAP32[2899] = $0;\n     return;\n    }\n    HEAP32[$5 + 4 >> 2] = $2 & -2;\n    HEAP32[$3 + 4 >> 2] = $0 | 1;\n    HEAP32[$0 + $3 >> 2] = $0;\n   }\n   if ($0 >>> 0 <= 255) {\n    $0 = $0 >>> 3 | 0;\n    $2 = ($0 << 3) + 11628 | 0;\n    $1 = HEAP32[2897];\n    $0 = 1 << $0;\n    label$32 : {\n     if (!($1 & $0)) {\n      HEAP32[2897] = $0 | $1;\n      $0 = $2;\n      break label$32;\n     }\n     $0 = HEAP32[$2 + 8 >> 2];\n    }\n    HEAP32[$2 + 8 >> 2] = $3;\n    HEAP32[$0 + 12 >> 2] = $3;\n    HEAP32[$3 + 12 >> 2] = $2;\n    HEAP32[$3 + 8 >> 2] = $0;\n    return;\n   }\n   HEAP32[$3 + 16 >> 2] = 0;\n   HEAP32[$3 + 20 >> 2] = 0;\n   $5 = $3;\n   $4 = $0 >>> 8 | 0;\n   $1 = 0;\n   label$34 : {\n    if (!$4) {\n     break label$34\n    }\n    $1 = 31;\n    if ($0 >>> 0 > 16777215) {\n     break label$34\n    }\n    $2 = $4;\n    $4 = $4 + 1048320 >>> 16 & 8;\n    $1 = $2 << $4;\n    $7 = $1 + 520192 >>> 16 & 4;\n    $1 = $1 << $7;\n    $6 = $1 + 245760 >>> 16 & 2;\n    $1 = ($1 << $6 >>> 15 | 0) - ($6 | ($4 | $7)) | 0;\n    $1 = ($1 << 1 | $0 >>> $1 + 21 & 1) + 28 | 0;\n   }\n   HEAP32[$5 + 28 >> 2] = $1;\n   $6 = ($1 << 2) + 11892 | 0;\n   label$35 : {\n    label$36 : {\n     $4 = HEAP32[2898];\n     $2 = 1 << $1;\n     label$37 : {\n      if (!($4 & $2)) {\n       HEAP32[2898] = $2 | $4;\n       HEAP32[$6 >> 2] = $3;\n       HEAP32[$3 + 24 >> 2] = $6;\n       break label$37;\n      }\n      $4 = $0 << (($1 | 0) == 31 ? 0 : 25 - ($1 >>> 1 | 0) | 0);\n      $2 = HEAP32[$6 >> 2];\n      while (1) {\n       $1 = $2;\n       if ((HEAP32[$2 + 4 >> 2] & -8) == ($0 | 0)) {\n        break label$36\n       }\n       $2 = $4 >>> 29 | 0;\n       $4 = $4 << 1;\n       $6 = ($1 + ($2 & 4) | 0) + 16 | 0;\n       $2 = HEAP32[$6 >> 2];\n       if ($2) {\n        continue\n       }\n       break;\n      };\n      HEAP32[$6 >> 2] = $3;\n      HEAP32[$3 + 24 >> 2] = $1;\n     }\n     HEAP32[$3 + 12 >> 2] = $3;\n     HEAP32[$3 + 8 >> 2] = $3;\n     break label$35;\n    }\n    $0 = HEAP32[$1 + 8 >> 2];\n    HEAP32[$0 + 12 >> 2] = $3;\n    HEAP32[$1 + 8 >> 2] = $3;\n    HEAP32[$3 + 24 >> 2] = 0;\n    HEAP32[$3 + 12 >> 2] = $1;\n    HEAP32[$3 + 8 >> 2] = $0;\n   }\n   $0 = HEAP32[2905] + -1 | 0;\n   HEAP32[2905] = $0;\n   if ($0) {\n    break label$1\n   }\n   $3 = 12044;\n   while (1) {\n    $0 = HEAP32[$3 >> 2];\n    $3 = $0 + 8 | 0;\n    if ($0) {\n     continue\n    }\n    break;\n   };\n   HEAP32[2905] = -1;\n  }\n }\n \n function dlcalloc($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0;\n  $2 = 0;\n  label$2 : {\n   if (!$0) {\n    break label$2\n   }\n   $3 = __wasm_i64_mul($0, 0, $1, 0);\n   $4 = i64toi32_i32$HIGH_BITS;\n   $2 = $3;\n   if (($0 | $1) >>> 0 < 65536) {\n    break label$2\n   }\n   $2 = $4 ? -1 : $3;\n  }\n  $1 = $2;\n  $0 = dlmalloc($1);\n  if (!(!$0 | !(HEAPU8[$0 + -4 | 0] & 3))) {\n   memset($0, $1)\n  }\n  return $0;\n }\n \n function dlrealloc($0, $1) {\n  var $2 = 0, $3 = 0;\n  if (!$0) {\n   return dlmalloc($1)\n  }\n  if ($1 >>> 0 >= 4294967232) {\n   HEAP32[2896] = 48;\n   return 0;\n  }\n  $2 = try_realloc_chunk($0 + -8 | 0, $1 >>> 0 < 11 ? 16 : $1 + 11 & -8);\n  if ($2) {\n   return $2 + 8 | 0\n  }\n  $2 = dlmalloc($1);\n  if (!$2) {\n   return 0\n  }\n  $3 = HEAP32[$0 + -4 >> 2];\n  $3 = ($3 & 3 ? -4 : -8) + ($3 & -8) | 0;\n  memcpy($2, $0, $3 >>> 0 < $1 >>> 0 ? $3 : $1);\n  dlfree($0);\n  return $2;\n }\n \n function try_realloc_chunk($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;\n  $7 = HEAP32[$0 + 4 >> 2];\n  $2 = $7 & 3;\n  $3 = $7 & -8;\n  $5 = $3 + $0 | 0;\n  label$2 : {\n   if (!$2) {\n    $2 = 0;\n    if ($1 >>> 0 < 256) {\n     break label$2\n    }\n    if ($3 >>> 0 >= $1 + 4 >>> 0) {\n     $2 = $0;\n     if ($3 - $1 >>> 0 <= HEAP32[3017] << 1 >>> 0) {\n      break label$2\n     }\n    }\n    return 0;\n   }\n   label$5 : {\n    if ($3 >>> 0 >= $1 >>> 0) {\n     $2 = $3 - $1 | 0;\n     if ($2 >>> 0 < 16) {\n      break label$5\n     }\n     HEAP32[$0 + 4 >> 2] = $7 & 1 | $1 | 2;\n     $1 = $0 + $1 | 0;\n     HEAP32[$1 + 4 >> 2] = $2 | 3;\n     HEAP32[$5 + 4 >> 2] = HEAP32[$5 + 4 >> 2] | 1;\n     dispose_chunk($1, $2);\n     break label$5;\n    }\n    $2 = 0;\n    if (($5 | 0) == HEAP32[2903]) {\n     $4 = $3 + HEAP32[2900] | 0;\n     if ($4 >>> 0 <= $1 >>> 0) {\n      break label$2\n     }\n     HEAP32[$0 + 4 >> 2] = $7 & 1 | $1 | 2;\n     $2 = $0 + $1 | 0;\n     $1 = $4 - $1 | 0;\n     HEAP32[$2 + 4 >> 2] = $1 | 1;\n     HEAP32[2900] = $1;\n     HEAP32[2903] = $2;\n     break label$5;\n    }\n    if (($5 | 0) == HEAP32[2902]) {\n     $4 = $3 + HEAP32[2899] | 0;\n     if ($4 >>> 0 < $1 >>> 0) {\n      break label$2\n     }\n     $2 = $4 - $1 | 0;\n     label$9 : {\n      if ($2 >>> 0 >= 16) {\n       HEAP32[$0 + 4 >> 2] = $7 & 1 | $1 | 2;\n       $1 = $0 + $1 | 0;\n       HEAP32[$1 + 4 >> 2] = $2 | 1;\n       $4 = $0 + $4 | 0;\n       HEAP32[$4 >> 2] = $2;\n       HEAP32[$4 + 4 >> 2] = HEAP32[$4 + 4 >> 2] & -2;\n       break label$9;\n      }\n      HEAP32[$0 + 4 >> 2] = $4 | $7 & 1 | 2;\n      $1 = $0 + $4 | 0;\n      HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] | 1;\n      $2 = 0;\n      $1 = 0;\n     }\n     HEAP32[2902] = $1;\n     HEAP32[2899] = $2;\n     break label$5;\n    }\n    $6 = HEAP32[$5 + 4 >> 2];\n    if ($6 & 2) {\n     break label$2\n    }\n    $8 = $3 + ($6 & -8) | 0;\n    if ($8 >>> 0 < $1 >>> 0) {\n     break label$2\n    }\n    $10 = $8 - $1 | 0;\n    label$11 : {\n     if ($6 >>> 0 <= 255) {\n      $2 = $6 >>> 3 | 0;\n      $6 = HEAP32[$5 + 8 >> 2];\n      $4 = HEAP32[$5 + 12 >> 2];\n      if (($6 | 0) == ($4 | 0)) {\n       (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $2)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n       break label$11;\n      }\n      HEAP32[$6 + 12 >> 2] = $4;\n      HEAP32[$4 + 8 >> 2] = $6;\n      break label$11;\n     }\n     $9 = HEAP32[$5 + 24 >> 2];\n     $3 = HEAP32[$5 + 12 >> 2];\n     label$14 : {\n      if (($5 | 0) != ($3 | 0)) {\n       $2 = HEAP32[$5 + 8 >> 2];\n       HEAP32[$2 + 12 >> 2] = $3;\n       HEAP32[$3 + 8 >> 2] = $2;\n       break label$14;\n      }\n      label$17 : {\n       $2 = $5 + 20 | 0;\n       $6 = HEAP32[$2 >> 2];\n       if ($6) {\n        break label$17\n       }\n       $2 = $5 + 16 | 0;\n       $6 = HEAP32[$2 >> 2];\n       if ($6) {\n        break label$17\n       }\n       $3 = 0;\n       break label$14;\n      }\n      while (1) {\n       $4 = $2;\n       $3 = $6;\n       $2 = $3 + 20 | 0;\n       $6 = HEAP32[$2 >> 2];\n       if ($6) {\n        continue\n       }\n       $2 = $3 + 16 | 0;\n       $6 = HEAP32[$3 + 16 >> 2];\n       if ($6) {\n        continue\n       }\n       break;\n      };\n      HEAP32[$4 >> 2] = 0;\n     }\n     if (!$9) {\n      break label$11\n     }\n     $4 = HEAP32[$5 + 28 >> 2];\n     $2 = ($4 << 2) + 11892 | 0;\n     label$19 : {\n      if (($5 | 0) == HEAP32[$2 >> 2]) {\n       HEAP32[$2 >> 2] = $3;\n       if ($3) {\n        break label$19\n       }\n       (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $4)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n       break label$11;\n      }\n      HEAP32[(($5 | 0) == HEAP32[$9 + 16 >> 2] ? 16 : 20) + $9 >> 2] = $3;\n      if (!$3) {\n       break label$11\n      }\n     }\n     HEAP32[$3 + 24 >> 2] = $9;\n     $2 = HEAP32[$5 + 16 >> 2];\n     if ($2) {\n      HEAP32[$3 + 16 >> 2] = $2;\n      HEAP32[$2 + 24 >> 2] = $3;\n     }\n     $2 = HEAP32[$5 + 20 >> 2];\n     if (!$2) {\n      break label$11\n     }\n     HEAP32[$3 + 20 >> 2] = $2;\n     HEAP32[$2 + 24 >> 2] = $3;\n    }\n    if ($10 >>> 0 <= 15) {\n     HEAP32[$0 + 4 >> 2] = $7 & 1 | $8 | 2;\n     $1 = $0 + $8 | 0;\n     HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] | 1;\n     break label$5;\n    }\n    HEAP32[$0 + 4 >> 2] = $7 & 1 | $1 | 2;\n    $2 = $0 + $1 | 0;\n    HEAP32[$2 + 4 >> 2] = $10 | 3;\n    $1 = $0 + $8 | 0;\n    HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] | 1;\n    dispose_chunk($2, $10);\n   }\n   $2 = $0;\n  }\n  return $2;\n }\n \n function dispose_chunk($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;\n  $5 = $0 + $1 | 0;\n  label$1 : {\n   label$2 : {\n    $2 = HEAP32[$0 + 4 >> 2];\n    if ($2 & 1) {\n     break label$2\n    }\n    if (!($2 & 3)) {\n     break label$1\n    }\n    $2 = HEAP32[$0 >> 2];\n    $1 = $2 + $1 | 0;\n    $0 = $0 - $2 | 0;\n    if (($0 | 0) != HEAP32[2902]) {\n     if ($2 >>> 0 <= 255) {\n      $4 = $2 >>> 3 | 0;\n      $2 = HEAP32[$0 + 8 >> 2];\n      $3 = HEAP32[$0 + 12 >> 2];\n      if (($3 | 0) == ($2 | 0)) {\n       (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $4)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n       break label$2;\n      }\n      HEAP32[$2 + 12 >> 2] = $3;\n      HEAP32[$3 + 8 >> 2] = $2;\n      break label$2;\n     }\n     $7 = HEAP32[$0 + 24 >> 2];\n     $2 = HEAP32[$0 + 12 >> 2];\n     label$6 : {\n      if (($2 | 0) != ($0 | 0)) {\n       $3 = HEAP32[$0 + 8 >> 2];\n       HEAP32[$3 + 12 >> 2] = $2;\n       HEAP32[$2 + 8 >> 2] = $3;\n       break label$6;\n      }\n      label$9 : {\n       $3 = $0 + 20 | 0;\n       $4 = HEAP32[$3 >> 2];\n       if ($4) {\n        break label$9\n       }\n       $3 = $0 + 16 | 0;\n       $4 = HEAP32[$3 >> 2];\n       if ($4) {\n        break label$9\n       }\n       $2 = 0;\n       break label$6;\n      }\n      while (1) {\n       $6 = $3;\n       $2 = $4;\n       $3 = $2 + 20 | 0;\n       $4 = HEAP32[$3 >> 2];\n       if ($4) {\n        continue\n       }\n       $3 = $2 + 16 | 0;\n       $4 = HEAP32[$2 + 16 >> 2];\n       if ($4) {\n        continue\n       }\n       break;\n      };\n      HEAP32[$6 >> 2] = 0;\n     }\n     if (!$7) {\n      break label$2\n     }\n     $3 = HEAP32[$0 + 28 >> 2];\n     $4 = ($3 << 2) + 11892 | 0;\n     label$11 : {\n      if (HEAP32[$4 >> 2] == ($0 | 0)) {\n       HEAP32[$4 >> 2] = $2;\n       if ($2) {\n        break label$11\n       }\n       (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $3)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n       break label$2;\n      }\n      HEAP32[$7 + (HEAP32[$7 + 16 >> 2] == ($0 | 0) ? 16 : 20) >> 2] = $2;\n      if (!$2) {\n       break label$2\n      }\n     }\n     HEAP32[$2 + 24 >> 2] = $7;\n     $3 = HEAP32[$0 + 16 >> 2];\n     if ($3) {\n      HEAP32[$2 + 16 >> 2] = $3;\n      HEAP32[$3 + 24 >> 2] = $2;\n     }\n     $3 = HEAP32[$0 + 20 >> 2];\n     if (!$3) {\n      break label$2\n     }\n     HEAP32[$2 + 20 >> 2] = $3;\n     HEAP32[$3 + 24 >> 2] = $2;\n     break label$2;\n    }\n    $2 = HEAP32[$5 + 4 >> 2];\n    if (($2 & 3) != 3) {\n     break label$2\n    }\n    HEAP32[2899] = $1;\n    HEAP32[$5 + 4 >> 2] = $2 & -2;\n    HEAP32[$0 + 4 >> 2] = $1 | 1;\n    HEAP32[$5 >> 2] = $1;\n    return;\n   }\n   $2 = HEAP32[$5 + 4 >> 2];\n   label$14 : {\n    if (!($2 & 2)) {\n     if (($5 | 0) == HEAP32[2903]) {\n      HEAP32[2903] = $0;\n      $1 = HEAP32[2900] + $1 | 0;\n      HEAP32[2900] = $1;\n      HEAP32[$0 + 4 >> 2] = $1 | 1;\n      if (HEAP32[2902] != ($0 | 0)) {\n       break label$1\n      }\n      HEAP32[2899] = 0;\n      HEAP32[2902] = 0;\n      return;\n     }\n     if (($5 | 0) == HEAP32[2902]) {\n      HEAP32[2902] = $0;\n      $1 = HEAP32[2899] + $1 | 0;\n      HEAP32[2899] = $1;\n      HEAP32[$0 + 4 >> 2] = $1 | 1;\n      HEAP32[$0 + $1 >> 2] = $1;\n      return;\n     }\n     $1 = ($2 & -8) + $1 | 0;\n     label$18 : {\n      if ($2 >>> 0 <= 255) {\n       $4 = $2 >>> 3 | 0;\n       $2 = HEAP32[$5 + 8 >> 2];\n       $3 = HEAP32[$5 + 12 >> 2];\n       if (($2 | 0) == ($3 | 0)) {\n        (wasm2js_i32$0 = 11588, wasm2js_i32$1 = HEAP32[2897] & __wasm_rotl_i32(-2, $4)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n        break label$18;\n       }\n       HEAP32[$2 + 12 >> 2] = $3;\n       HEAP32[$3 + 8 >> 2] = $2;\n       break label$18;\n      }\n      $7 = HEAP32[$5 + 24 >> 2];\n      $2 = HEAP32[$5 + 12 >> 2];\n      label$21 : {\n       if (($5 | 0) != ($2 | 0)) {\n        $3 = HEAP32[$5 + 8 >> 2];\n        HEAP32[$3 + 12 >> 2] = $2;\n        HEAP32[$2 + 8 >> 2] = $3;\n        break label$21;\n       }\n       label$24 : {\n        $3 = $5 + 20 | 0;\n        $4 = HEAP32[$3 >> 2];\n        if ($4) {\n         break label$24\n        }\n        $3 = $5 + 16 | 0;\n        $4 = HEAP32[$3 >> 2];\n        if ($4) {\n         break label$24\n        }\n        $2 = 0;\n        break label$21;\n       }\n       while (1) {\n        $6 = $3;\n        $2 = $4;\n        $3 = $2 + 20 | 0;\n        $4 = HEAP32[$3 >> 2];\n        if ($4) {\n         continue\n        }\n        $3 = $2 + 16 | 0;\n        $4 = HEAP32[$2 + 16 >> 2];\n        if ($4) {\n         continue\n        }\n        break;\n       };\n       HEAP32[$6 >> 2] = 0;\n      }\n      if (!$7) {\n       break label$18\n      }\n      $3 = HEAP32[$5 + 28 >> 2];\n      $4 = ($3 << 2) + 11892 | 0;\n      label$26 : {\n       if (($5 | 0) == HEAP32[$4 >> 2]) {\n        HEAP32[$4 >> 2] = $2;\n        if ($2) {\n         break label$26\n        }\n        (wasm2js_i32$0 = 11592, wasm2js_i32$1 = HEAP32[2898] & __wasm_rotl_i32(-2, $3)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n        break label$18;\n       }\n       HEAP32[$7 + (($5 | 0) == HEAP32[$7 + 16 >> 2] ? 16 : 20) >> 2] = $2;\n       if (!$2) {\n        break label$18\n       }\n      }\n      HEAP32[$2 + 24 >> 2] = $7;\n      $3 = HEAP32[$5 + 16 >> 2];\n      if ($3) {\n       HEAP32[$2 + 16 >> 2] = $3;\n       HEAP32[$3 + 24 >> 2] = $2;\n      }\n      $3 = HEAP32[$5 + 20 >> 2];\n      if (!$3) {\n       break label$18\n      }\n      HEAP32[$2 + 20 >> 2] = $3;\n      HEAP32[$3 + 24 >> 2] = $2;\n     }\n     HEAP32[$0 + 4 >> 2] = $1 | 1;\n     HEAP32[$0 + $1 >> 2] = $1;\n     if (HEAP32[2902] != ($0 | 0)) {\n      break label$14\n     }\n     HEAP32[2899] = $1;\n     return;\n    }\n    HEAP32[$5 + 4 >> 2] = $2 & -2;\n    HEAP32[$0 + 4 >> 2] = $1 | 1;\n    HEAP32[$0 + $1 >> 2] = $1;\n   }\n   if ($1 >>> 0 <= 255) {\n    $2 = $1 >>> 3 | 0;\n    $1 = ($2 << 3) + 11628 | 0;\n    $3 = HEAP32[2897];\n    $2 = 1 << $2;\n    label$30 : {\n     if (!($3 & $2)) {\n      HEAP32[2897] = $2 | $3;\n      $2 = $1;\n      break label$30;\n     }\n     $2 = HEAP32[$1 + 8 >> 2];\n    }\n    HEAP32[$1 + 8 >> 2] = $0;\n    HEAP32[$2 + 12 >> 2] = $0;\n    HEAP32[$0 + 12 >> 2] = $1;\n    HEAP32[$0 + 8 >> 2] = $2;\n    return;\n   }\n   HEAP32[$0 + 16 >> 2] = 0;\n   HEAP32[$0 + 20 >> 2] = 0;\n   $3 = $0;\n   $4 = $1 >>> 8 | 0;\n   $2 = 0;\n   label$32 : {\n    if (!$4) {\n     break label$32\n    }\n    $2 = 31;\n    if ($1 >>> 0 > 16777215) {\n     break label$32\n    }\n    $6 = $4 + 1048320 >>> 16 & 8;\n    $4 = $4 << $6;\n    $2 = $4 + 520192 >>> 16 & 4;\n    $5 = $4 << $2;\n    $4 = $5 + 245760 >>> 16 & 2;\n    $2 = ($5 << $4 >>> 15 | 0) - ($4 | ($2 | $6)) | 0;\n    $2 = ($2 << 1 | $1 >>> $2 + 21 & 1) + 28 | 0;\n   }\n   HEAP32[$3 + 28 >> 2] = $2;\n   $4 = ($2 << 2) + 11892 | 0;\n   label$33 : {\n    $3 = HEAP32[2898];\n    $6 = 1 << $2;\n    label$34 : {\n     if (!($3 & $6)) {\n      HEAP32[2898] = $3 | $6;\n      HEAP32[$4 >> 2] = $0;\n      break label$34;\n     }\n     $3 = $1 << (($2 | 0) == 31 ? 0 : 25 - ($2 >>> 1 | 0) | 0);\n     $2 = HEAP32[$4 >> 2];\n     while (1) {\n      $4 = $2;\n      if ((HEAP32[$2 + 4 >> 2] & -8) == ($1 | 0)) {\n       break label$33\n      }\n      $2 = $3 >>> 29 | 0;\n      $3 = $3 << 1;\n      $6 = ($4 + ($2 & 4) | 0) + 16 | 0;\n      $2 = HEAP32[$6 >> 2];\n      if ($2) {\n       continue\n      }\n      break;\n     };\n     HEAP32[$6 >> 2] = $0;\n    }\n    HEAP32[$0 + 24 >> 2] = $4;\n    HEAP32[$0 + 12 >> 2] = $0;\n    HEAP32[$0 + 8 >> 2] = $0;\n    return;\n   }\n   $1 = HEAP32[$4 + 8 >> 2];\n   HEAP32[$1 + 12 >> 2] = $0;\n   HEAP32[$4 + 8 >> 2] = $0;\n   HEAP32[$0 + 24 >> 2] = 0;\n   HEAP32[$0 + 12 >> 2] = $4;\n   HEAP32[$0 + 8 >> 2] = $1;\n  }\n }\n \n function memchr($0, $1) {\n  var $2 = 0;\n  $2 = ($1 | 0) != 0;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     if (!$1 | !($0 & 3)) {\n      break label$3\n     }\n     while (1) {\n      if (HEAPU8[$0 | 0] == 79) {\n       break label$2\n      }\n      $0 = $0 + 1 | 0;\n      $1 = $1 + -1 | 0;\n      $2 = ($1 | 0) != 0;\n      if (!$1) {\n       break label$3\n      }\n      if ($0 & 3) {\n       continue\n      }\n      break;\n     };\n    }\n    if (!$2) {\n     break label$1\n    }\n   }\n   label$5 : {\n    if (HEAPU8[$0 | 0] == 79 | $1 >>> 0 < 4) {\n     break label$5\n    }\n    while (1) {\n     $2 = HEAP32[$0 >> 2] ^ 1330597711;\n     if (($2 ^ -1) & $2 + -16843009 & -2139062144) {\n      break label$5\n     }\n     $0 = $0 + 4 | 0;\n     $1 = $1 + -4 | 0;\n     if ($1 >>> 0 > 3) {\n      continue\n     }\n     break;\n    };\n   }\n   if (!$1) {\n    break label$1\n   }\n   while (1) {\n    if (HEAPU8[$0 | 0] == 79) {\n     return $0\n    }\n    $0 = $0 + 1 | 0;\n    $1 = $1 + -1 | 0;\n    if ($1) {\n     continue\n    }\n    break;\n   };\n  }\n  return 0;\n }\n \n function frexp($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0;\n  wasm2js_scratch_store_f64(+$0);\n  $2 = wasm2js_scratch_load_i32(1) | 0;\n  $3 = wasm2js_scratch_load_i32(0) | 0;\n  $4 = $2;\n  $2 = $2 >>> 20 & 2047;\n  if (($2 | 0) != 2047) {\n   if (!$2) {\n    $2 = $1;\n    if ($0 == 0.0) {\n     $1 = 0\n    } else {\n     $0 = frexp($0 * 18446744073709551615.0, $1);\n     $1 = HEAP32[$1 >> 2] + -64 | 0;\n    }\n    HEAP32[$2 >> 2] = $1;\n    return $0;\n   }\n   HEAP32[$1 >> 2] = $2 + -1022;\n   wasm2js_scratch_store_i32(0, $3 | 0);\n   wasm2js_scratch_store_i32(1, $4 & -2146435073 | 1071644672);\n   $0 = +wasm2js_scratch_load_f64();\n  }\n  return $0;\n }\n \n function __ashlti3($0, $1, $2, $3, $4, $5) {\n  var $6 = 0, $7 = 0, $8 = 0, $9 = 0;\n  label$1 : {\n   if ($5 & 64) {\n    $3 = $1;\n    $4 = $5 + -64 | 0;\n    $1 = $4 & 31;\n    if (32 <= ($4 & 63) >>> 0) {\n     $4 = $3 << $1;\n     $3 = 0;\n    } else {\n     $4 = (1 << $1) - 1 & $3 >>> 32 - $1 | $2 << $1;\n     $3 = $3 << $1;\n    }\n    $1 = 0;\n    $2 = 0;\n    break label$1;\n   }\n   if (!$5) {\n    break label$1\n   }\n   $6 = $3;\n   $8 = $5;\n   $3 = $5 & 31;\n   if (32 <= ($5 & 63) >>> 0) {\n    $7 = $6 << $3;\n    $9 = 0;\n   } else {\n    $7 = (1 << $3) - 1 & $6 >>> 32 - $3 | $4 << $3;\n    $9 = $6 << $3;\n   }\n   $3 = $2;\n   $6 = $1;\n   $5 = 64 - $5 | 0;\n   $4 = $5 & 31;\n   if (32 <= ($5 & 63) >>> 0) {\n    $5 = 0;\n    $3 = $3 >>> $4 | 0;\n   } else {\n    $5 = $3 >>> $4 | 0;\n    $3 = ((1 << $4) - 1 & $3) << 32 - $4 | $6 >>> $4;\n   }\n   $3 = $9 | $3;\n   $4 = $5 | $7;\n   $5 = $1;\n   $1 = $8 & 31;\n   if (32 <= ($8 & 63) >>> 0) {\n    $7 = $5 << $1;\n    $1 = 0;\n   } else {\n    $7 = (1 << $1) - 1 & $5 >>> 32 - $1 | $2 << $1;\n    $1 = $5 << $1;\n   }\n   $2 = $7;\n  }\n  HEAP32[$0 >> 2] = $1;\n  HEAP32[$0 + 4 >> 2] = $2;\n  HEAP32[$0 + 8 >> 2] = $3;\n  HEAP32[$0 + 12 >> 2] = $4;\n }\n \n function __lshrti3($0, $1, $2, $3, $4, $5) {\n  var $6 = 0, $7 = 0, $8 = 0, $9 = 0;\n  label$1 : {\n   if ($5 & 64) {\n    $2 = $5 + -64 | 0;\n    $1 = $2 & 31;\n    if (32 <= ($2 & 63) >>> 0) {\n     $2 = 0;\n     $1 = $4 >>> $1 | 0;\n    } else {\n     $2 = $4 >>> $1 | 0;\n     $1 = ((1 << $1) - 1 & $4) << 32 - $1 | $3 >>> $1;\n    }\n    $3 = 0;\n    $4 = 0;\n    break label$1;\n   }\n   if (!$5) {\n    break label$1\n   }\n   $7 = $4;\n   $8 = $3;\n   $9 = 64 - $5 | 0;\n   $6 = $9 & 31;\n   if (32 <= ($9 & 63) >>> 0) {\n    $7 = $8 << $6;\n    $9 = 0;\n   } else {\n    $7 = (1 << $6) - 1 & $8 >>> 32 - $6 | $7 << $6;\n    $9 = $8 << $6;\n   }\n   $8 = $1;\n   $6 = $5;\n   $1 = $6 & 31;\n   if (32 <= ($6 & 63) >>> 0) {\n    $6 = 0;\n    $1 = $2 >>> $1 | 0;\n   } else {\n    $6 = $2 >>> $1 | 0;\n    $1 = ((1 << $1) - 1 & $2) << 32 - $1 | $8 >>> $1;\n   }\n   $1 = $9 | $1;\n   $2 = $6 | $7;\n   $6 = $3;\n   $3 = $5 & 31;\n   if (32 <= ($5 & 63) >>> 0) {\n    $7 = 0;\n    $3 = $4 >>> $3 | 0;\n   } else {\n    $7 = $4 >>> $3 | 0;\n    $3 = ((1 << $3) - 1 & $4) << 32 - $3 | $6 >>> $3;\n   }\n   $4 = $7;\n  }\n  HEAP32[$0 >> 2] = $1;\n  HEAP32[$0 + 4 >> 2] = $2;\n  HEAP32[$0 + 8 >> 2] = $3;\n  HEAP32[$0 + 12 >> 2] = $4;\n }\n \n function __trunctfdf2($0, $1, $2, $3) {\n  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0;\n  $6 = global$0 - 32 | 0;\n  global$0 = $6;\n  $4 = $3 & 2147483647;\n  $8 = $4;\n  $4 = $4 + -1006698496 | 0;\n  $7 = $2;\n  $5 = $2;\n  if ($2 >>> 0 < 0) {\n   $4 = $4 + 1 | 0\n  }\n  $9 = $5;\n  $5 = $4;\n  $4 = $8 + -1140785152 | 0;\n  $10 = $7;\n  if ($7 >>> 0 < 0) {\n   $4 = $4 + 1 | 0\n  }\n  label$1 : {\n   if (($4 | 0) == ($5 | 0) & $9 >>> 0 < $10 >>> 0 | $5 >>> 0 < $4 >>> 0) {\n    $4 = $3 << 4 | $2 >>> 28;\n    $2 = $2 << 4 | $1 >>> 28;\n    $1 = $1 & 268435455;\n    $7 = $1;\n    if (($1 | 0) == 134217728 & $0 >>> 0 >= 1 | $1 >>> 0 > 134217728) {\n     $4 = $4 + 1073741824 | 0;\n     $0 = $2 + 1 | 0;\n     if ($0 >>> 0 < 1) {\n      $4 = $4 + 1 | 0\n     }\n     $5 = $0;\n     break label$1;\n    }\n    $5 = $2;\n    $4 = $4 - (($2 >>> 0 < 0) + -1073741824 | 0) | 0;\n    if ($0 | $7 ^ 134217728) {\n     break label$1\n    }\n    $0 = $5 + ($5 & 1) | 0;\n    if ($0 >>> 0 < $5 >>> 0) {\n     $4 = $4 + 1 | 0\n    }\n    $5 = $0;\n    break label$1;\n   }\n   if (!(!$7 & ($8 | 0) == 2147418112 ? !($0 | $1) : ($8 | 0) == 2147418112 & $7 >>> 0 < 0 | $8 >>> 0 < 2147418112)) {\n    $4 = $3 << 4 | $2 >>> 28;\n    $5 = $2 << 4 | $1 >>> 28;\n    $4 = $4 & 524287 | 2146959360;\n    break label$1;\n   }\n   $5 = 0;\n   $4 = 2146435072;\n   if ($8 >>> 0 > 1140785151) {\n    break label$1\n   }\n   $4 = 0;\n   $7 = $8 >>> 16 | 0;\n   if ($7 >>> 0 < 15249) {\n    break label$1\n   }\n   $4 = $3 & 65535 | 65536;\n   __ashlti3($6 + 16 | 0, $0, $1, $2, $4, $7 + -15233 | 0);\n   __lshrti3($6, $0, $1, $2, $4, 15361 - $7 | 0);\n   $2 = HEAP32[$6 + 4 >> 2];\n   $0 = HEAP32[$6 + 8 >> 2];\n   $4 = HEAP32[$6 + 12 >> 2] << 4 | $0 >>> 28;\n   $5 = $0 << 4 | $2 >>> 28;\n   $0 = $2 & 268435455;\n   $2 = $0;\n   $1 = HEAP32[$6 >> 2] | ((HEAP32[$6 + 16 >> 2] | HEAP32[$6 + 24 >> 2]) != 0 | (HEAP32[$6 + 20 >> 2] | HEAP32[$6 + 28 >> 2]) != 0);\n   if (($0 | 0) == 134217728 & $1 >>> 0 >= 1 | $0 >>> 0 > 134217728) {\n    $0 = $5 + 1 | 0;\n    if ($0 >>> 0 < 1) {\n     $4 = $4 + 1 | 0\n    }\n    $5 = $0;\n    break label$1;\n   }\n   if ($1 | $2 ^ 134217728) {\n    break label$1\n   }\n   $0 = $5 + ($5 & 1) | 0;\n   if ($0 >>> 0 < $5 >>> 0) {\n    $4 = $4 + 1 | 0\n   }\n   $5 = $0;\n  }\n  global$0 = $6 + 32 | 0;\n  wasm2js_scratch_store_i32(0, $5 | 0);\n  wasm2js_scratch_store_i32(1, $3 & -2147483648 | $4);\n  return +wasm2js_scratch_load_f64();\n }\n \n function FLAC__crc8($0, $1) {\n  var $2 = 0;\n  if ($1) {\n   while (1) {\n    $2 = HEAPU8[(HEAPU8[$0 | 0] ^ $2) + 1024 | 0];\n    $0 = $0 + 1 | 0;\n    $1 = $1 + -1 | 0;\n    if ($1) {\n     continue\n    }\n    break;\n   }\n  }\n  return $2;\n }\n \n function FLAC__crc16($0, $1) {\n  var $2 = 0, $3 = 0;\n  if ($1 >>> 0 > 7) {\n   while (1) {\n    $3 = $2;\n    $2 = HEAPU8[$0 | 0] | HEAPU8[$0 + 1 | 0] << 8;\n    $2 = $3 ^ ($2 << 8 & 16711680 | $2 << 24) >>> 16;\n    $2 = HEAPU16[(HEAPU8[$0 + 7 | 0] << 1) + 1280 >> 1] ^ (HEAPU16[((HEAPU8[$0 + 6 | 0] << 1) + 1280 | 0) + 512 >> 1] ^ (HEAPU16[(HEAPU8[$0 + 5 | 0] << 1) + 2304 >> 1] ^ (HEAPU16[(HEAPU8[$0 + 4 | 0] << 1) + 2816 >> 1] ^ (HEAPU16[(HEAPU8[$0 + 3 | 0] << 1) + 3328 >> 1] ^ (HEAPU16[(HEAPU8[$0 + 2 | 0] << 1) + 3840 >> 1] ^ (HEAPU16[(($2 & 255) << 1) + 4352 >> 1] ^ HEAPU16[($2 >>> 7 & 510) + 4864 >> 1]))))));\n    $0 = $0 + 8 | 0;\n    $1 = $1 + -8 | 0;\n    if ($1 >>> 0 > 7) {\n     continue\n    }\n    break;\n   }\n  }\n  if ($1) {\n   while (1) {\n    $2 = HEAPU16[((HEAPU8[$0 | 0] ^ ($2 & 65280) >>> 8) << 1) + 1280 >> 1] ^ $2 << 8;\n    $0 = $0 + 1 | 0;\n    $1 = $1 + -1 | 0;\n    if ($1) {\n     continue\n    }\n    break;\n   }\n  }\n  return $2 & 65535;\n }\n \n function FLAC__crc16_update_words32($0, $1, $2) {\n  var $3 = 0;\n  if ($1 >>> 0 >= 2) {\n   while (1) {\n    $3 = $2;\n    $2 = HEAP32[$0 >> 2];\n    $3 = $3 ^ $2 >>> 16;\n    $3 = HEAPU16[(($3 & 255) << 1) + 4352 >> 1] ^ HEAPU16[($3 >>> 7 & 510) + 4864 >> 1] ^ HEAPU16[($2 >>> 7 & 510) + 3840 >> 1] ^ HEAPU16[(($2 & 255) << 1) + 3328 >> 1];\n    $2 = HEAP32[$0 + 4 >> 2];\n    $2 = $3 ^ HEAPU16[($2 >>> 23 & 510) + 2816 >> 1] ^ HEAPU16[($2 >>> 15 & 510) + 2304 >> 1] ^ HEAPU16[(($2 >>> 7 & 510) + 1280 | 0) + 512 >> 1] ^ HEAPU16[(($2 & 255) << 1) + 1280 >> 1];\n    $0 = $0 + 8 | 0;\n    $1 = $1 + -2 | 0;\n    if ($1 >>> 0 > 1) {\n     continue\n    }\n    break;\n   }\n  }\n  if ($1) {\n   $0 = HEAP32[$0 >> 2];\n   $1 = $0 >>> 16 ^ $2;\n   $2 = HEAPU16[(($1 & 255) << 1) + 2304 >> 1] ^ HEAPU16[($1 >>> 7 & 510) + 2816 >> 1] ^ HEAPU16[(($0 >>> 7 & 510) + 1280 | 0) + 512 >> 1] ^ HEAPU16[(($0 & 255) << 1) + 1280 >> 1];\n  }\n  return $2 & 65535;\n }\n \n function memmove($0, $1, $2) {\n  var $3 = 0;\n  label$1 : {\n   if (($0 | 0) == ($1 | 0)) {\n    break label$1\n   }\n   if (($1 - $0 | 0) - $2 >>> 0 <= 0 - ($2 << 1) >>> 0) {\n    memcpy($0, $1, $2);\n    return;\n   }\n   $3 = ($0 ^ $1) & 3;\n   label$3 : {\n    label$4 : {\n     if ($0 >>> 0 < $1 >>> 0) {\n      if ($3) {\n       break label$3\n      }\n      if (!($0 & 3)) {\n       break label$4\n      }\n      while (1) {\n       if (!$2) {\n        break label$1\n       }\n       HEAP8[$0 | 0] = HEAPU8[$1 | 0];\n       $1 = $1 + 1 | 0;\n       $2 = $2 + -1 | 0;\n       $0 = $0 + 1 | 0;\n       if ($0 & 3) {\n        continue\n       }\n       break;\n      };\n      break label$4;\n     }\n     label$9 : {\n      if ($3) {\n       break label$9\n      }\n      if ($0 + $2 & 3) {\n       while (1) {\n        if (!$2) {\n         break label$1\n        }\n        $2 = $2 + -1 | 0;\n        $3 = $2 + $0 | 0;\n        HEAP8[$3 | 0] = HEAPU8[$1 + $2 | 0];\n        if ($3 & 3) {\n         continue\n        }\n        break;\n       }\n      }\n      if ($2 >>> 0 <= 3) {\n       break label$9\n      }\n      while (1) {\n       $2 = $2 + -4 | 0;\n       HEAP32[$2 + $0 >> 2] = HEAP32[$1 + $2 >> 2];\n       if ($2 >>> 0 > 3) {\n        continue\n       }\n       break;\n      };\n     }\n     if (!$2) {\n      break label$1\n     }\n     while (1) {\n      $2 = $2 + -1 | 0;\n      HEAP8[$2 + $0 | 0] = HEAPU8[$1 + $2 | 0];\n      if ($2) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if ($2 >>> 0 <= 3) {\n     break label$3\n    }\n    while (1) {\n     HEAP32[$0 >> 2] = HEAP32[$1 >> 2];\n     $1 = $1 + 4 | 0;\n     $0 = $0 + 4 | 0;\n     $2 = $2 + -4 | 0;\n     if ($2 >>> 0 > 3) {\n      continue\n     }\n     break;\n    };\n   }\n   if (!$2) {\n    break label$1\n   }\n   while (1) {\n    HEAP8[$0 | 0] = HEAPU8[$1 | 0];\n    $0 = $0 + 1 | 0;\n    $1 = $1 + 1 | 0;\n    $2 = $2 + -1 | 0;\n    if ($2) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__bitreader_delete($0) {\n  var $1 = 0;\n  $1 = HEAP32[$0 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  dlfree($0);\n }\n \n function FLAC__bitreader_free($0) {\n  var $1 = 0;\n  $1 = HEAP32[$0 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  HEAP32[$0 + 36 >> 2] = 0;\n  HEAP32[$0 + 40 >> 2] = 0;\n  HEAP32[$0 >> 2] = 0;\n  HEAP32[$0 + 4 >> 2] = 0;\n  HEAP32[$0 + 8 >> 2] = 0;\n  HEAP32[$0 + 12 >> 2] = 0;\n  HEAP32[$0 + 16 >> 2] = 0;\n  HEAP32[$0 + 20 >> 2] = 0;\n }\n \n function FLAC__bitreader_init($0, $1) {\n  var $2 = 0;\n  HEAP32[$0 + 8 >> 2] = 0;\n  HEAP32[$0 + 12 >> 2] = 0;\n  HEAP32[$0 + 4 >> 2] = 2048;\n  HEAP32[$0 + 16 >> 2] = 0;\n  HEAP32[$0 + 20 >> 2] = 0;\n  $2 = dlmalloc(8192);\n  HEAP32[$0 >> 2] = $2;\n  if (!$2) {\n   return 0\n  }\n  HEAP32[$0 + 40 >> 2] = $1;\n  HEAP32[$0 + 36 >> 2] = 7;\n  return 1;\n }\n \n function FLAC__bitreader_get_read_crc16($0) {\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;\n  $5 = HEAP32[$0 + 16 >> 2];\n  $2 = HEAP32[$0 + 28 >> 2];\n  label$1 : {\n   if ($5 >>> 0 <= $2 >>> 0) {\n    $4 = $2;\n    break label$1;\n   }\n   $1 = HEAP32[$0 + 32 >> 2];\n   if (!$1) {\n    $4 = $2;\n    break label$1;\n   }\n   $4 = $2 + 1 | 0;\n   HEAP32[$0 + 28 >> 2] = $4;\n   $3 = HEAP32[$0 + 24 >> 2];\n   if ($1 >>> 0 <= 31) {\n    $2 = HEAP32[HEAP32[$0 >> 2] + ($2 << 2) >> 2];\n    while (1) {\n     $3 = HEAPU16[(($2 >>> 24 - $1 & 255 ^ $3 >>> 8) << 1) + 1280 >> 1] ^ $3 << 8 & 65280;\n     $7 = $1 >>> 0 < 24;\n     $6 = $1 + 8 | 0;\n     $1 = $6;\n     if ($7) {\n      continue\n     }\n     break;\n    };\n    HEAP32[$0 + 32 >> 2] = $6;\n   }\n   HEAP32[$0 + 32 >> 2] = 0;\n   HEAP32[$0 + 24 >> 2] = $3;\n  }\n  $1 = FLAC__crc16_update_words32(HEAP32[$0 >> 2] + ($4 << 2) | 0, $5 - $4 | 0, HEAPU16[$0 + 24 >> 1]);\n  HEAP32[$0 + 28 >> 2] = 0;\n  HEAP32[$0 + 24 >> 2] = $1;\n  $2 = HEAP32[$0 + 20 >> 2];\n  label$6 : {\n   if (!$2) {\n    break label$6\n   }\n   $3 = HEAP32[$0 + 32 >> 2];\n   if ($3 >>> 0 >= $2 >>> 0) {\n    break label$6\n   }\n   $4 = HEAP32[HEAP32[$0 >> 2] + (HEAP32[$0 + 16 >> 2] << 2) >> 2];\n   while (1) {\n    $1 = HEAPU16[(($4 >>> 24 - $3 & 255 ^ $1 >>> 8) << 1) + 1280 >> 1] ^ $1 << 8 & 65280;\n    $3 = $3 + 8 | 0;\n    if ($3 >>> 0 < $2 >>> 0) {\n     continue\n    }\n    break;\n   };\n   HEAP32[$0 + 32 >> 2] = $3;\n   HEAP32[$0 + 24 >> 2] = $1;\n  }\n  return $1;\n }\n \n function FLAC__bitreader_is_consumed_byte_aligned($0) {\n  return !(HEAPU8[$0 + 20 | 0] & 7);\n }\n \n function FLAC__bitreader_bits_left_for_byte_alignment($0) {\n  return 8 - (HEAP32[$0 + 20 >> 2] & 7) | 0;\n }\n \n function FLAC__bitreader_read_raw_uint32($0, $1, $2) {\n  var $3 = 0, $4 = 0, $5 = 0;\n  label$1 : {\n   if ($2) {\n    label$4 : {\n     while (1) {\n      $5 = HEAP32[$0 + 8 >> 2];\n      $4 = HEAP32[$0 + 16 >> 2];\n      $3 = HEAP32[$0 + 20 >> 2];\n      if ((($5 - $4 << 5) + (HEAP32[$0 + 12 >> 2] << 3) | 0) - $3 >>> 0 >= $2 >>> 0) {\n       break label$4\n      }\n      if (bitreader_read_from_client_($0)) {\n       continue\n      }\n      break;\n     };\n     return 0;\n    }\n    if ($5 >>> 0 > $4 >>> 0) {\n     if ($3) {\n      $5 = HEAP32[$0 >> 2];\n      $4 = HEAP32[$5 + ($4 << 2) >> 2] & -1 >>> $3;\n      $3 = 32 - $3 | 0;\n      if ($3 >>> 0 > $2 >>> 0) {\n       HEAP32[$1 >> 2] = $4 >>> $3 - $2;\n       HEAP32[$0 + 20 >> 2] = HEAP32[$0 + 20 >> 2] + $2;\n       break label$1;\n      }\n      HEAP32[$1 >> 2] = $4;\n      HEAP32[$0 + 20 >> 2] = 0;\n      HEAP32[$0 + 16 >> 2] = HEAP32[$0 + 16 >> 2] + 1;\n      $2 = $2 - $3 | 0;\n      if (!$2) {\n       break label$1\n      }\n      $3 = HEAP32[$1 >> 2] << $2;\n      HEAP32[$1 >> 2] = $3;\n      HEAP32[$1 >> 2] = $3 | HEAP32[(HEAP32[$0 + 16 >> 2] << 2) + $5 >> 2] >>> 32 - $2;\n      HEAP32[$0 + 20 >> 2] = $2;\n      return 1;\n     }\n     $3 = HEAP32[HEAP32[$0 >> 2] + ($4 << 2) >> 2];\n     if ($2 >>> 0 <= 31) {\n      HEAP32[$1 >> 2] = $3 >>> 32 - $2;\n      HEAP32[$0 + 20 >> 2] = $2;\n      break label$1;\n     }\n     HEAP32[$1 >> 2] = $3;\n     HEAP32[$0 + 16 >> 2] = HEAP32[$0 + 16 >> 2] + 1;\n     return 1;\n    }\n    $4 = HEAP32[HEAP32[$0 >> 2] + ($4 << 2) >> 2];\n    if ($3) {\n     HEAP32[$1 >> 2] = ($4 & -1 >>> $3) >>> 32 - ($2 + $3 | 0);\n     HEAP32[$0 + 20 >> 2] = HEAP32[$0 + 20 >> 2] + $2;\n     break label$1;\n    }\n    HEAP32[$1 >> 2] = $4 >>> 32 - $2;\n    HEAP32[$0 + 20 >> 2] = HEAP32[$0 + 20 >> 2] + $2;\n    break label$1;\n   }\n   HEAP32[$1 >> 2] = 0;\n  }\n  return 1;\n }\n \n function bitreader_read_from_client_($0) {\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;\n  $6 = global$0 - 16 | 0;\n  global$0 = $6;\n  $5 = HEAP32[$0 + 16 >> 2];\n  label$1 : {\n   if (!$5) {\n    $2 = HEAP32[$0 + 8 >> 2];\n    break label$1;\n   }\n   $1 = HEAP32[$0 + 28 >> 2];\n   label$3 : {\n    if ($5 >>> 0 <= $1 >>> 0) {\n     $3 = $1;\n     break label$3;\n    }\n    $2 = HEAP32[$0 + 32 >> 2];\n    if (!$2) {\n     $3 = $1;\n     break label$3;\n    }\n    $3 = $1 + 1 | 0;\n    HEAP32[$0 + 28 >> 2] = $3;\n    $4 = HEAP32[$0 + 24 >> 2];\n    if ($2 >>> 0 <= 31) {\n     $1 = HEAP32[HEAP32[$0 >> 2] + ($1 << 2) >> 2];\n     while (1) {\n      $4 = HEAPU16[(($1 >>> 24 - $2 & 255 ^ $4 >>> 8) << 1) + 1280 >> 1] ^ $4 << 8 & 65280;\n      $7 = $2 >>> 0 < 24;\n      $8 = $2 + 8 | 0;\n      $2 = $8;\n      if ($7) {\n       continue\n      }\n      break;\n     };\n     HEAP32[$0 + 32 >> 2] = $8;\n    }\n    HEAP32[$0 + 32 >> 2] = 0;\n    HEAP32[$0 + 24 >> 2] = $4;\n   }\n   $1 = FLAC__crc16_update_words32(HEAP32[$0 >> 2] + ($3 << 2) | 0, $5 - $3 | 0, HEAPU16[$0 + 24 >> 1]);\n   HEAP32[$0 + 28 >> 2] = 0;\n   HEAP32[$0 + 24 >> 2] = $1;\n   $3 = HEAP32[$0 >> 2];\n   $1 = HEAP32[$0 + 16 >> 2];\n   memmove($3, $3 + ($1 << 2) | 0, (HEAP32[$0 + 8 >> 2] - $1 | 0) + (HEAP32[$0 + 12 >> 2] != 0) << 2);\n   HEAP32[$0 + 16 >> 2] = 0;\n   $2 = HEAP32[$0 + 8 >> 2] - $1 | 0;\n   HEAP32[$0 + 8 >> 2] = $2;\n  }\n  $1 = HEAP32[$0 + 12 >> 2];\n  $3 = (HEAP32[$0 + 4 >> 2] - $2 << 2) - $1 | 0;\n  HEAP32[$6 + 12 >> 2] = $3;\n  $4 = 0;\n  label$8 : {\n   if (!$3) {\n    break label$8\n   }\n   $3 = HEAP32[$0 >> 2] + ($2 << 2) | 0;\n   $2 = $3 + $1 | 0;\n   if ($1) {\n    $1 = HEAP32[$3 >> 2];\n    HEAP32[$3 >> 2] = $1 << 24 | $1 << 8 & 16711680 | ($1 >>> 8 & 65280 | $1 >>> 24);\n   }\n   if (!FUNCTION_TABLE[HEAP32[$0 + 36 >> 2]]($2, $6 + 12 | 0, HEAP32[$0 + 40 >> 2])) {\n    break label$8\n   }\n   $5 = HEAP32[$6 + 12 >> 2];\n   $2 = HEAP32[$0 + 12 >> 2];\n   $4 = HEAP32[$0 + 8 >> 2];\n   $1 = $4 << 2;\n   $3 = ($5 + ($2 + $1 | 0) | 0) + 3 >>> 2 | 0;\n   $8 = $0;\n   if ($4 >>> 0 < $3 >>> 0) {\n    $2 = HEAP32[$0 >> 2];\n    while (1) {\n     $7 = $2 + ($4 << 2) | 0;\n     $1 = HEAP32[$7 >> 2];\n     HEAP32[$7 >> 2] = $1 << 8 & 16711680 | $1 << 24 | ($1 >>> 8 & 65280 | $1 >>> 24);\n     $4 = $4 + 1 | 0;\n     if (($3 | 0) != ($4 | 0)) {\n      continue\n     }\n     break;\n    };\n    $2 = HEAP32[$0 + 12 >> 2];\n    $1 = HEAP32[$0 + 8 >> 2] << 2;\n   }\n   $1 = $1 + ($2 + $5 | 0) | 0;\n   HEAP32[$8 + 12 >> 2] = $1 & 3;\n   HEAP32[$0 + 8 >> 2] = $1 >>> 2;\n   $4 = 1;\n  }\n  global$0 = $6 + 16 | 0;\n  return $4;\n }\n \n function FLAC__bitreader_read_raw_int32($0, $1, $2) {\n  var $3 = 0, $4 = 0;\n  $3 = global$0 - 16 | 0;\n  global$0 = $3;\n  $4 = 0;\n  label$1 : {\n   if (!FLAC__bitreader_read_raw_uint32($0, $3 + 12 | 0, $2)) {\n    break label$1\n   }\n   $0 = 1 << $2 + -1;\n   HEAP32[$1 >> 2] = ($0 ^ HEAP32[$3 + 12 >> 2]) - $0;\n   $4 = 1;\n  }\n  $0 = $4;\n  global$0 = $3 + 16 | 0;\n  return $0;\n }\n \n function FLAC__bitreader_read_raw_uint64($0, $1, $2) {\n  var $3 = 0, $4 = 0, $5 = 0, $6 = 0;\n  $3 = global$0 - 16 | 0;\n  global$0 = $3;\n  $4 = $1;\n  $5 = $1;\n  label$1 : {\n   label$2 : {\n    if ($2 >>> 0 >= 33) {\n     if (!FLAC__bitreader_read_raw_uint32($0, $3 + 12 | 0, $2 + -32 | 0)) {\n      break label$1\n     }\n     if (!FLAC__bitreader_read_raw_uint32($0, $3 + 8 | 0, 32)) {\n      break label$1\n     }\n     $0 = HEAP32[$3 + 12 >> 2];\n     $2 = 0;\n     HEAP32[$1 >> 2] = $2;\n     HEAP32[$1 + 4 >> 2] = $0;\n     $1 = HEAP32[$3 + 8 >> 2] | $2;\n     break label$2;\n    }\n    if (!FLAC__bitreader_read_raw_uint32($0, $3 + 8 | 0, $2)) {\n     break label$1\n    }\n    $0 = 0;\n    $1 = HEAP32[$3 + 8 >> 2];\n   }\n   HEAP32[$5 >> 2] = $1;\n   HEAP32[$4 + 4 >> 2] = $0;\n   $6 = 1;\n  }\n  global$0 = $3 + 16 | 0;\n  return $6;\n }\n \n function FLAC__bitreader_read_uint32_little_endian($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0;\n  $2 = global$0 - 16 | 0;\n  global$0 = $2;\n  HEAP32[$2 + 8 >> 2] = 0;\n  label$1 : {\n   if (!FLAC__bitreader_read_raw_uint32($0, $2 + 8 | 0, 8)) {\n    break label$1\n   }\n   if (!FLAC__bitreader_read_raw_uint32($0, $2 + 12 | 0, 8)) {\n    break label$1\n   }\n   $3 = HEAP32[$2 + 8 >> 2] | HEAP32[$2 + 12 >> 2] << 8;\n   HEAP32[$2 + 8 >> 2] = $3;\n   if (!FLAC__bitreader_read_raw_uint32($0, $2 + 12 | 0, 8)) {\n    break label$1\n   }\n   $3 = $3 | HEAP32[$2 + 12 >> 2] << 16;\n   HEAP32[$2 + 8 >> 2] = $3;\n   if (!FLAC__bitreader_read_raw_uint32($0, $2 + 12 | 0, 8)) {\n    break label$1\n   }\n   $0 = $3 | HEAP32[$2 + 12 >> 2] << 24;\n   HEAP32[$2 + 8 >> 2] = $0;\n   HEAP32[$1 >> 2] = $0;\n   $4 = 1;\n  }\n  global$0 = $2 + 16 | 0;\n  return $4;\n }\n \n function FLAC__bitreader_skip_bits_no_crc($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0;\n  $3 = global$0 - 16 | 0;\n  global$0 = $3;\n  $4 = 1;\n  label$1 : {\n   if (!$1) {\n    break label$1\n   }\n   $2 = HEAP32[$0 + 20 >> 2] & 7;\n   label$2 : {\n    if ($2) {\n     $2 = 8 - $2 | 0;\n     $2 = $2 >>> 0 < $1 >>> 0 ? $2 : $1;\n     if (!FLAC__bitreader_read_raw_uint32($0, $3 + 8 | 0, $2)) {\n      break label$2\n     }\n     $1 = $1 - $2 | 0;\n    }\n    $2 = $1 >>> 3 | 0;\n    if ($2) {\n     while (1) {\n      label$7 : {\n       if (!HEAP32[$0 + 20 >> 2]) {\n        if ($2 >>> 0 > 3) {\n         while (1) {\n          $5 = HEAP32[$0 + 16 >> 2];\n          label$11 : {\n           if ($5 >>> 0 < HEAPU32[$0 + 8 >> 2]) {\n            HEAP32[$0 + 16 >> 2] = $5 + 1;\n            $2 = $2 + -4 | 0;\n            break label$11;\n           }\n           if (!bitreader_read_from_client_($0)) {\n            break label$2\n           }\n          }\n          if ($2 >>> 0 > 3) {\n           continue\n          }\n          break;\n         };\n         if (!$2) {\n          break label$7\n         }\n        }\n        while (1) {\n         if (!FLAC__bitreader_read_raw_uint32($0, $3 + 12 | 0, 8)) {\n          break label$2\n         }\n         $2 = $2 + -1 | 0;\n         if ($2) {\n          continue\n         }\n         break;\n        };\n        break label$7;\n       }\n       if (!FLAC__bitreader_read_raw_uint32($0, $3 + 12 | 0, 8)) {\n        break label$2\n       }\n       $2 = $2 + -1 | 0;\n       if ($2) {\n        continue\n       }\n      }\n      break;\n     };\n     $1 = $1 & 7;\n    }\n    if (!$1) {\n     break label$1\n    }\n    if (FLAC__bitreader_read_raw_uint32($0, $3 + 8 | 0, $1)) {\n     break label$1\n    }\n   }\n   $4 = 0;\n  }\n  global$0 = $3 + 16 | 0;\n  return $4;\n }\n \n function FLAC__bitreader_skip_byte_block_aligned_no_crc($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0;\n  $2 = global$0 - 16 | 0;\n  global$0 = $2;\n  $3 = 1;\n  label$1 : {\n   if (!$1) {\n    break label$1\n   }\n   while (1) {\n    label$3 : {\n     if (!HEAP32[$0 + 20 >> 2]) {\n      label$5 : {\n       if ($1 >>> 0 < 4) {\n        break label$5\n       }\n       while (1) {\n        $4 = HEAP32[$0 + 16 >> 2];\n        label$7 : {\n         if ($4 >>> 0 < HEAPU32[$0 + 8 >> 2]) {\n          HEAP32[$0 + 16 >> 2] = $4 + 1;\n          $1 = $1 + -4 | 0;\n          break label$7;\n         }\n         if (!bitreader_read_from_client_($0)) {\n          break label$3\n         }\n        }\n        if ($1 >>> 0 > 3) {\n         continue\n        }\n        break;\n       };\n       if ($1) {\n        break label$5\n       }\n       break label$1;\n      }\n      while (1) {\n       if (!FLAC__bitreader_read_raw_uint32($0, $2 + 12 | 0, 8)) {\n        break label$3\n       }\n       $1 = $1 + -1 | 0;\n       if ($1) {\n        continue\n       }\n       break;\n      };\n      break label$1;\n     }\n     if (!FLAC__bitreader_read_raw_uint32($0, $2 + 12 | 0, 8)) {\n      break label$3\n     }\n     $1 = $1 + -1 | 0;\n     if ($1) {\n      continue\n     }\n     break label$1;\n    }\n    break;\n   };\n   $3 = 0;\n  }\n  global$0 = $2 + 16 | 0;\n  return $3;\n }\n \n function FLAC__bitreader_read_byte_block_aligned_no_crc($0, $1, $2) {\n  var $3 = 0, $4 = 0;\n  $4 = global$0 - 16 | 0;\n  global$0 = $4;\n  label$1 : {\n   if (!$2) {\n    $3 = 1;\n    break label$1;\n   }\n   while (1) {\n    if (!HEAP32[$0 + 20 >> 2]) {\n     label$5 : {\n      if ($2 >>> 0 < 4) {\n       break label$5\n      }\n      while (1) {\n       label$7 : {\n        $3 = HEAP32[$0 + 16 >> 2];\n        if ($3 >>> 0 < HEAPU32[$0 + 8 >> 2]) {\n         HEAP32[$0 + 16 >> 2] = $3 + 1;\n         $3 = HEAP32[HEAP32[$0 >> 2] + ($3 << 2) >> 2];\n         $3 = $3 << 24 | $3 << 8 & 16711680 | ($3 >>> 8 & 65280 | $3 >>> 24);\n         HEAP8[$1 | 0] = $3;\n         HEAP8[$1 + 1 | 0] = $3 >>> 8;\n         HEAP8[$1 + 2 | 0] = $3 >>> 16;\n         HEAP8[$1 + 3 | 0] = $3 >>> 24;\n         $2 = $2 + -4 | 0;\n         $1 = $1 + 4 | 0;\n         break label$7;\n        }\n        if (bitreader_read_from_client_($0)) {\n         break label$7\n        }\n        $3 = 0;\n        break label$1;\n       }\n       if ($2 >>> 0 > 3) {\n        continue\n       }\n       break;\n      };\n      if ($2) {\n       break label$5\n      }\n      $3 = 1;\n      break label$1;\n     }\n     while (1) {\n      if (!FLAC__bitreader_read_raw_uint32($0, $4 + 12 | 0, 8)) {\n       $3 = 0;\n       break label$1;\n      }\n      HEAP8[$1 | 0] = HEAP32[$4 + 12 >> 2];\n      $3 = 1;\n      $1 = $1 + 1 | 0;\n      $2 = $2 + -1 | 0;\n      if ($2) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (!FLAC__bitreader_read_raw_uint32($0, $4 + 12 | 0, 8)) {\n     $3 = 0;\n     break label$1;\n    }\n    HEAP8[$1 | 0] = HEAP32[$4 + 12 >> 2];\n    $3 = 1;\n    $1 = $1 + 1 | 0;\n    $2 = $2 + -1 | 0;\n    if ($2) {\n     continue\n    }\n    break;\n   };\n  }\n  global$0 = $4 + 16 | 0;\n  return $3;\n }\n \n function FLAC__bitreader_read_unary_unsigned($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0;\n  HEAP32[$1 >> 2] = 0;\n  label$1 : {\n   while (1) {\n    $3 = HEAP32[$0 + 16 >> 2];\n    label$3 : {\n     if ($3 >>> 0 >= HEAPU32[$0 + 8 >> 2]) {\n      $2 = HEAP32[$0 + 20 >> 2];\n      break label$3;\n     }\n     $2 = HEAP32[$0 + 20 >> 2];\n     $4 = HEAP32[$0 >> 2];\n     while (1) {\n      $3 = HEAP32[$4 + ($3 << 2) >> 2] << $2;\n      if ($3) {\n       $2 = $1;\n       $4 = HEAP32[$1 >> 2];\n       $1 = Math_clz32($3);\n       HEAP32[$2 >> 2] = $4 + $1;\n       $2 = ($1 + HEAP32[$0 + 20 >> 2] | 0) + 1 | 0;\n       HEAP32[$0 + 20 >> 2] = $2;\n       $1 = 1;\n       if ($2 >>> 0 < 32) {\n        break label$1\n       }\n       HEAP32[$0 + 20 >> 2] = 0;\n       HEAP32[$0 + 16 >> 2] = HEAP32[$0 + 16 >> 2] + 1;\n       return 1;\n      }\n      HEAP32[$1 >> 2] = (HEAP32[$1 >> 2] - $2 | 0) + 32;\n      $2 = 0;\n      HEAP32[$0 + 20 >> 2] = 0;\n      $3 = HEAP32[$0 + 16 >> 2] + 1 | 0;\n      HEAP32[$0 + 16 >> 2] = $3;\n      if ($3 >>> 0 < HEAPU32[$0 + 8 >> 2]) {\n       continue\n      }\n      break;\n     };\n    }\n    $4 = HEAP32[$0 + 12 >> 2] << 3;\n    if ($4 >>> 0 > $2 >>> 0) {\n     $3 = (HEAP32[HEAP32[$0 >> 2] + ($3 << 2) >> 2] & -1 << 32 - $4) << $2;\n     if ($3) {\n      $2 = $1;\n      $4 = HEAP32[$1 >> 2];\n      $1 = Math_clz32($3);\n      HEAP32[$2 >> 2] = $4 + $1;\n      HEAP32[$0 + 20 >> 2] = ($1 + HEAP32[$0 + 20 >> 2] | 0) + 1;\n      return 1;\n     }\n     HEAP32[$1 >> 2] = HEAP32[$1 >> 2] + ($4 - $2 | 0);\n     HEAP32[$0 + 20 >> 2] = $4;\n    }\n    if (bitreader_read_from_client_($0)) {\n     continue\n    }\n    break;\n   };\n   $1 = 0;\n  }\n  return $1;\n }\n \n function FLAC__bitreader_read_rice_signed_block($0, $1, $2, $3) {\n  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0;\n  $6 = global$0 - 16 | 0;\n  global$0 = $6;\n  $12 = ($2 << 2) + $1 | 0;\n  label$1 : {\n   if (!$3) {\n    $14 = 1;\n    if (($2 | 0) < 1) {\n     break label$1\n    }\n    while (1) {\n     if (!FLAC__bitreader_read_unary_unsigned($0, $6 + 8 | 0)) {\n      $14 = 0;\n      break label$1;\n     }\n     $2 = HEAP32[$6 + 8 >> 2];\n     HEAP32[$1 >> 2] = $2 >>> 1 ^ 0 - ($2 & 1);\n     $1 = $1 + 4 | 0;\n     if ($1 >>> 0 < $12 >>> 0) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   label$5 : {\n    label$6 : {\n     $4 = HEAP32[$0 + 16 >> 2];\n     $10 = HEAP32[$0 + 8 >> 2];\n     if ($4 >>> 0 >= $10 >>> 0) {\n      break label$6\n     }\n     $11 = HEAP32[$0 >> 2];\n     $13 = HEAP32[$0 + 20 >> 2];\n     $9 = HEAP32[$11 + ($4 << 2) >> 2] << $13;\n     $2 = 0;\n     break label$5;\n    }\n    $2 = 1;\n   }\n   while (1) {\n    label$9 : {\n     label$10 : {\n      label$11 : {\n       label$12 : {\n        if (!$2) {\n         $5 = 32 - $13 | 0;\n         label$14 : {\n          if ($1 >>> 0 < $12 >>> 0) {\n           $15 = 32 - $3 | 0;\n           while (1) {\n            $2 = $4;\n            $7 = $5;\n            label$17 : {\n             if ($9) {\n              $7 = Math_clz32($9);\n              $8 = $7;\n              break label$17;\n             }\n             while (1) {\n              $2 = $2 + 1 | 0;\n              if ($2 >>> 0 >= $10 >>> 0) {\n               break label$14\n              }\n              $9 = HEAP32[($2 << 2) + $11 >> 2];\n              $8 = Math_clz32($9);\n              $7 = $8 + $7 | 0;\n              if (!$9) {\n               continue\n              }\n              break;\n             };\n            }\n            $4 = $9 << $8 << 1;\n            $8 = $4 >>> $15 | 0;\n            HEAP32[$6 + 8 >> 2] = $7;\n            $5 = ($7 ^ -1) + $5 & 31;\n            label$20 : {\n             if ($5 >>> 0 >= $3 >>> 0) {\n              $9 = $4 << $3;\n              $5 = $5 - $3 | 0;\n              $4 = $2;\n              break label$20;\n             }\n             $4 = $2 + 1 | 0;\n             if ($4 >>> 0 >= $10 >>> 0) {\n              break label$12\n             }\n             $2 = HEAP32[($4 << 2) + $11 >> 2];\n             $5 = $5 + $15 | 0;\n             $9 = $2 << 32 - $5;\n             $8 = $2 >>> $5 | $8;\n            }\n            HEAP32[$6 + 12 >> 2] = $8;\n            $2 = $7 << $3 | $8;\n            HEAP32[$1 >> 2] = $2 >>> 1 ^ 0 - ($2 & 1);\n            $1 = $1 + 4 | 0;\n            if ($1 >>> 0 < $12 >>> 0) {\n             continue\n            }\n            break;\n           };\n          }\n          $1 = $4 >>> 0 < $10 >>> 0;\n          HEAP32[$0 + 16 >> 2] = ($1 & !$5) + $4;\n          HEAP32[$0 + 20 >> 2] = 32 - ($5 ? $5 : $1 << 5);\n          $14 = 1;\n          break label$1;\n         }\n         HEAP32[$0 + 20 >> 2] = 0;\n         $2 = $4 + 1 | 0;\n         HEAP32[$0 + 16 >> 2] = $10 >>> 0 > $2 >>> 0 ? $10 : $2;\n         break label$10;\n        }\n        if (!FLAC__bitreader_read_unary_unsigned($0, $6 + 8 | 0)) {\n         break label$1\n        }\n        $7 = HEAP32[$6 + 8 >> 2] + $7 | 0;\n        HEAP32[$6 + 8 >> 2] = $7;\n        $8 = 0;\n        $5 = 0;\n        break label$11;\n       }\n       HEAP32[$0 + 16 >> 2] = $4;\n       HEAP32[$0 + 20 >> 2] = 0;\n      }\n      if (!FLAC__bitreader_read_raw_uint32($0, $6 + 12 | 0, $3 - $5 | 0)) {\n       break label$1\n      }\n      $2 = $7 << $3;\n      $4 = HEAP32[$6 + 12 >> 2] | $8;\n      HEAP32[$6 + 12 >> 2] = $4;\n      $7 = 0;\n      $2 = $2 | $4;\n      HEAP32[$1 >> 2] = $2 >>> 1 ^ 0 - ($2 & 1);\n      $11 = HEAP32[$0 >> 2];\n      $4 = HEAP32[$0 + 16 >> 2];\n      $13 = HEAP32[$0 + 20 >> 2];\n      $9 = HEAP32[$11 + ($4 << 2) >> 2] << $13;\n      $10 = HEAP32[$0 + 8 >> 2];\n      $1 = $1 + 4 | 0;\n      if ($4 >>> 0 < $10 >>> 0 | $1 >>> 0 >= $12 >>> 0) {\n       break label$9\n      }\n     }\n     $2 = 1;\n     continue;\n    }\n    $2 = 0;\n    continue;\n   };\n  }\n  global$0 = $6 + 16 | 0;\n  return $14;\n }\n \n function FLAC__bitreader_read_utf8_uint32($0, $1, $2, $3) {\n  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;\n  $7 = global$0 - 16 | 0;\n  global$0 = $7;\n  label$1 : {\n   if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) {\n    break label$1\n   }\n   $4 = HEAP32[$7 + 12 >> 2];\n   if ($2) {\n    $5 = HEAP32[$3 >> 2];\n    HEAP32[$3 >> 2] = $5 + 1;\n    HEAP8[$2 + $5 | 0] = $4;\n   }\n   label$3 : {\n    label$4 : {\n     label$5 : {\n      label$6 : {\n       if (!($4 & 128)) {\n        break label$6\n       }\n       label$7 : {\n        if (!(!($4 & 192) | $4 & 32)) {\n         $6 = 31;\n         $5 = 1;\n         break label$7;\n        }\n        if (!(!($4 & 224) | $4 & 16)) {\n         $6 = 15;\n         $5 = 2;\n         break label$7;\n        }\n        if (!(!($4 & 240) | $4 & 8)) {\n         $6 = 7;\n         $5 = 3;\n         break label$7;\n        }\n        if ($4 & 248) {\n         $6 = 3;\n         $5 = 4;\n         if (!($4 & 4)) {\n          break label$7\n         }\n        }\n        if (!($4 & 252) | $4 & 2) {\n         break label$5\n        }\n        $6 = 1;\n        $5 = 5;\n       }\n       $4 = $4 & $6;\n       if (!$2) {\n        while (1) {\n         if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) {\n          break label$1\n         }\n         $2 = HEAP32[$7 + 12 >> 2];\n         if (($2 & 192) != 128) {\n          break label$4\n         }\n         $4 = $2 & 63 | $4 << 6;\n         $5 = $5 + -1 | 0;\n         if ($5) {\n          continue\n         }\n         break label$6;\n        }\n       }\n       while (1) {\n        if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) {\n         break label$1\n        }\n        $6 = HEAP32[$7 + 12 >> 2];\n        $8 = HEAP32[$3 >> 2];\n        HEAP32[$3 >> 2] = $8 + 1;\n        HEAP8[$2 + $8 | 0] = $6;\n        if (($6 & 192) != 128) {\n         break label$4\n        }\n        $4 = $6 & 63 | $4 << 6;\n        $5 = $5 + -1 | 0;\n        if ($5) {\n         continue\n        }\n        break;\n       };\n      }\n      HEAP32[$1 >> 2] = $4;\n      break label$3;\n     }\n     HEAP32[$1 >> 2] = -1;\n     break label$3;\n    }\n    HEAP32[$1 >> 2] = -1;\n   }\n   $9 = 1;\n  }\n  global$0 = $7 + 16 | 0;\n  return $9;\n }\n \n function FLAC__bitreader_read_utf8_uint64($0, $1, $2, $3) {\n  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;\n  $7 = global$0 - 16 | 0;\n  global$0 = $7;\n  label$1 : {\n   if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) {\n    break label$1\n   }\n   $4 = HEAP32[$7 + 12 >> 2];\n   if ($2) {\n    $6 = HEAP32[$3 >> 2];\n    HEAP32[$3 >> 2] = $6 + 1;\n    HEAP8[$2 + $6 | 0] = $4;\n   }\n   label$4 : {\n    label$5 : {\n     label$6 : {\n      label$7 : {\n       if ($4 & 128) {\n        if (!(!($4 & 192) | $4 & 32)) {\n         $4 = $4 & 31;\n         $5 = 1;\n         break label$7;\n        }\n        if (!(!($4 & 224) | $4 & 16)) {\n         $4 = $4 & 15;\n         $5 = 2;\n         break label$7;\n        }\n        if (!(!($4 & 240) | $4 & 8)) {\n         $4 = $4 & 7;\n         $5 = 3;\n         break label$7;\n        }\n        if (!(!($4 & 248) | $4 & 4)) {\n         $4 = $4 & 3;\n         $5 = 4;\n         break label$7;\n        }\n        if (!(!($4 & 252) | $4 & 2)) {\n         $4 = $4 & 1;\n         $5 = 5;\n         break label$7;\n        }\n        $5 = 1;\n        if (!(!($4 & 254) | $4 & 1)) {\n         $5 = 6;\n         $4 = 0;\n         break label$7;\n        }\n        HEAP32[$1 >> 2] = -1;\n        HEAP32[$1 + 4 >> 2] = -1;\n        break label$1;\n       }\n       $6 = 0;\n       break label$6;\n      }\n      $6 = 0;\n      if (!$2) {\n       while (1) {\n        if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) {\n         $5 = 0;\n         break label$1;\n        }\n        $2 = HEAP32[$7 + 12 >> 2];\n        if (($2 & 192) != 128) {\n         break label$5\n        }\n        $2 = $2 & 63;\n        $6 = $6 << 6 | $4 >>> 26;\n        $4 = $2 | $4 << 6;\n        $5 = $5 + -1 | 0;\n        if ($5) {\n         continue\n        }\n        break label$6;\n       }\n      }\n      while (1) {\n       if (!FLAC__bitreader_read_raw_uint32($0, $7 + 12 | 0, 8)) {\n        $5 = 0;\n        break label$1;\n       }\n       $8 = HEAP32[$7 + 12 >> 2];\n       $9 = HEAP32[$3 >> 2];\n       HEAP32[$3 >> 2] = $9 + 1;\n       HEAP8[$2 + $9 | 0] = $8;\n       if (($8 & 192) != 128) {\n        break label$5\n       }\n       $6 = $6 << 6 | $4 >>> 26;\n       $4 = $8 & 63 | $4 << 6;\n       $5 = $5 + -1 | 0;\n       if ($5) {\n        continue\n       }\n       break;\n      };\n     }\n     HEAP32[$1 >> 2] = $4;\n     HEAP32[$1 + 4 >> 2] = $6;\n     break label$4;\n    }\n    HEAP32[$1 >> 2] = -1;\n    HEAP32[$1 + 4 >> 2] = -1;\n   }\n   $5 = 1;\n  }\n  global$0 = $7 + 16 | 0;\n  return $5;\n }\n \n function qsort($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;\n  $2 = global$0 - 208 | 0;\n  global$0 = $2;\n  HEAP32[$2 + 8 >> 2] = 1;\n  HEAP32[$2 + 12 >> 2] = 0;\n  label$1 : {\n   $5 = Math_imul($1, 24);\n   if (!$5) {\n    break label$1\n   }\n   HEAP32[$2 + 16 >> 2] = 24;\n   HEAP32[$2 + 20 >> 2] = 24;\n   $1 = 24;\n   $4 = $1;\n   $3 = 2;\n   while (1) {\n    $6 = $4 + 24 | 0;\n    $4 = $1;\n    $1 = $1 + $6 | 0;\n    HEAP32[($2 + 16 | 0) + ($3 << 2) >> 2] = $1;\n    $3 = $3 + 1 | 0;\n    if ($1 >>> 0 < $5 >>> 0) {\n     continue\n    }\n    break;\n   };\n   $4 = ($0 + $5 | 0) + -24 | 0;\n   label$3 : {\n    if ($4 >>> 0 <= $0 >>> 0) {\n     $3 = 1;\n     $1 = 1;\n     break label$3;\n    }\n    $3 = 1;\n    $1 = 1;\n    while (1) {\n     label$6 : {\n      if (($3 & 3) == 3) {\n       sift($0, $1, $2 + 16 | 0);\n       shr($2 + 8 | 0, 2);\n       $1 = $1 + 2 | 0;\n       break label$6;\n      }\n      $3 = $1 + -1 | 0;\n      label$8 : {\n       if (HEAPU32[($2 + 16 | 0) + ($3 << 2) >> 2] >= $4 - $0 >>> 0) {\n        trinkle($0, $2 + 8 | 0, $1, 0, $2 + 16 | 0);\n        break label$8;\n       }\n       sift($0, $1, $2 + 16 | 0);\n      }\n      if (($1 | 0) == 1) {\n       shl($2 + 8 | 0, 1);\n       $1 = 0;\n       break label$6;\n      }\n      shl($2 + 8 | 0, $3);\n      $1 = 1;\n     }\n     $3 = HEAP32[$2 + 8 >> 2] | 1;\n     HEAP32[$2 + 8 >> 2] = $3;\n     $0 = $0 + 24 | 0;\n     if ($0 >>> 0 < $4 >>> 0) {\n      continue\n     }\n     break;\n    };\n   }\n   trinkle($0, $2 + 8 | 0, $1, 0, $2 + 16 | 0);\n   while (1) {\n    label$12 : {\n     label$13 : {\n      label$14 : {\n       if (!(($1 | 0) != 1 | ($3 | 0) != 1)) {\n        if (HEAP32[$2 + 12 >> 2]) {\n         break label$14\n        }\n        break label$1;\n       }\n       if (($1 | 0) > 1) {\n        break label$13\n       }\n      }\n      $4 = pntz($2 + 8 | 0);\n      shr($2 + 8 | 0, $4);\n      $3 = HEAP32[$2 + 8 >> 2];\n      $1 = $1 + $4 | 0;\n      break label$12;\n     }\n     shl($2 + 8 | 0, 2);\n     HEAP32[$2 + 8 >> 2] = HEAP32[$2 + 8 >> 2] ^ 7;\n     shr($2 + 8 | 0, 1);\n     $5 = $0 + -24 | 0;\n     $4 = $1 + -2 | 0;\n     trinkle($5 - HEAP32[($2 + 16 | 0) + ($4 << 2) >> 2] | 0, $2 + 8 | 0, $1 + -1 | 0, 1, $2 + 16 | 0);\n     shl($2 + 8 | 0, 1);\n     $3 = HEAP32[$2 + 8 >> 2] | 1;\n     HEAP32[$2 + 8 >> 2] = $3;\n     trinkle($5, $2 + 8 | 0, $4, 1, $2 + 16 | 0);\n     $1 = $4;\n    }\n    $0 = $0 + -24 | 0;\n    continue;\n   };\n  }\n  global$0 = $2 + 208 | 0;\n }\n \n function sift($0, $1, $2) {\n  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;\n  $3 = global$0 - 240 | 0;\n  global$0 = $3;\n  HEAP32[$3 >> 2] = $0;\n  $6 = 1;\n  label$1 : {\n   if (($1 | 0) < 2) {\n    break label$1\n   }\n   $4 = $0;\n   while (1) {\n    $5 = $4 + -24 | 0;\n    $7 = $1 + -2 | 0;\n    $4 = $5 - HEAP32[($7 << 2) + $2 >> 2] | 0;\n    if ((FUNCTION_TABLE[1]($0, $4) | 0) >= 0) {\n     if ((FUNCTION_TABLE[1]($0, $5) | 0) > -1) {\n      break label$1\n     }\n    }\n    $0 = ($6 << 2) + $3 | 0;\n    label$4 : {\n     if ((FUNCTION_TABLE[1]($4, $5) | 0) >= 0) {\n      HEAP32[$0 >> 2] = $4;\n      $7 = $1 + -1 | 0;\n      break label$4;\n     }\n     HEAP32[$0 >> 2] = $5;\n     $4 = $5;\n    }\n    $6 = $6 + 1 | 0;\n    if (($7 | 0) < 2) {\n     break label$1\n    }\n    $0 = HEAP32[$3 >> 2];\n    $1 = $7;\n    continue;\n   };\n  }\n  cycle($3, $6);\n  global$0 = $3 + 240 | 0;\n }\n \n function shr($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0;\n  $4 = $0;\n  label$1 : {\n   if ($1 >>> 0 <= 31) {\n    $2 = HEAP32[$0 >> 2];\n    $3 = HEAP32[$0 + 4 >> 2];\n    break label$1;\n   }\n   $2 = HEAP32[$0 + 4 >> 2];\n   HEAP32[$0 + 4 >> 2] = 0;\n   HEAP32[$0 >> 2] = $2;\n   $1 = $1 + -32 | 0;\n   $3 = 0;\n  }\n  HEAP32[$4 + 4 >> 2] = $3 >>> $1;\n  HEAP32[$0 >> 2] = $3 << 32 - $1 | $2 >>> $1;\n }\n \n function trinkle($0, $1, $2, $3, $4) {\n  var $5 = 0, $6 = 0, $7 = 0, $8 = 0;\n  $5 = global$0 - 240 | 0;\n  global$0 = $5;\n  $6 = HEAP32[$1 >> 2];\n  HEAP32[$5 + 232 >> 2] = $6;\n  $1 = HEAP32[$1 + 4 >> 2];\n  HEAP32[$5 >> 2] = $0;\n  HEAP32[$5 + 236 >> 2] = $1;\n  $7 = 1;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     label$4 : {\n      if ($1 ? 0 : ($6 | 0) == 1) {\n       break label$4\n      }\n      $6 = $0 - HEAP32[($2 << 2) + $4 >> 2] | 0;\n      if ((FUNCTION_TABLE[1]($6, $0) | 0) < 1) {\n       break label$4\n      }\n      $8 = !$3;\n      while (1) {\n       label$6 : {\n        $1 = $6;\n        if (!(!$8 | ($2 | 0) < 2)) {\n         $3 = HEAP32[(($2 << 2) + $4 | 0) + -8 >> 2];\n         $6 = $0 + -24 | 0;\n         if ((FUNCTION_TABLE[1]($6, $1) | 0) > -1) {\n          break label$6\n         }\n         if ((FUNCTION_TABLE[1]($6 - $3 | 0, $1) | 0) > -1) {\n          break label$6\n         }\n        }\n        HEAP32[($7 << 2) + $5 >> 2] = $1;\n        $0 = pntz($5 + 232 | 0);\n        shr($5 + 232 | 0, $0);\n        $7 = $7 + 1 | 0;\n        $2 = $0 + $2 | 0;\n        if (HEAP32[$5 + 236 >> 2] ? 0 : HEAP32[$5 + 232 >> 2] == 1) {\n         break label$2\n        }\n        $3 = 0;\n        $8 = 1;\n        $0 = $1;\n        $6 = $1 - HEAP32[($2 << 2) + $4 >> 2] | 0;\n        if ((FUNCTION_TABLE[1]($6, HEAP32[$5 >> 2]) | 0) > 0) {\n         continue\n        }\n        break label$3;\n       }\n       break;\n      };\n      $1 = $0;\n      break label$2;\n     }\n     $1 = $0;\n    }\n    if ($3) {\n     break label$1\n    }\n   }\n   cycle($5, $7);\n   sift($1, $2, $4);\n  }\n  global$0 = $5 + 240 | 0;\n }\n \n function shl($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0;\n  $4 = $0;\n  label$1 : {\n   if ($1 >>> 0 <= 31) {\n    $2 = HEAP32[$0 + 4 >> 2];\n    $3 = HEAP32[$0 >> 2];\n    break label$1;\n   }\n   $2 = HEAP32[$0 >> 2];\n   HEAP32[$0 + 4 >> 2] = $2;\n   HEAP32[$0 >> 2] = 0;\n   $1 = $1 + -32 | 0;\n   $3 = 0;\n  }\n  HEAP32[$4 >> 2] = $3 << $1;\n  HEAP32[$0 + 4 >> 2] = $2 << $1 | $3 >>> 32 - $1;\n }\n \n function pntz($0) {\n  var $1 = 0;\n  $1 = __wasm_ctz_i32(HEAP32[$0 >> 2] + -1 | 0);\n  if (!$1) {\n   $0 = __wasm_ctz_i32(HEAP32[$0 + 4 >> 2]);\n   return $0 ? $0 + 32 | 0 : 0;\n  }\n  return $1;\n }\n \n function cycle($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;\n  $3 = 24;\n  $4 = global$0 - 256 | 0;\n  global$0 = $4;\n  label$1 : {\n   if (($1 | 0) < 2) {\n    break label$1\n   }\n   $7 = ($1 << 2) + $0 | 0;\n   HEAP32[$7 >> 2] = $4;\n   $2 = $4;\n   while (1) {\n    $5 = $3 >>> 0 < 256 ? $3 : 256;\n    memcpy($2, HEAP32[$0 >> 2], $5);\n    $2 = 0;\n    while (1) {\n     $6 = ($2 << 2) + $0 | 0;\n     $2 = $2 + 1 | 0;\n     memcpy(HEAP32[$6 >> 2], HEAP32[($2 << 2) + $0 >> 2], $5);\n     HEAP32[$6 >> 2] = HEAP32[$6 >> 2] + $5;\n     if (($1 | 0) != ($2 | 0)) {\n      continue\n     }\n     break;\n    };\n    $3 = $3 - $5 | 0;\n    if (!$3) {\n     break label$1\n    }\n    $2 = HEAP32[$7 >> 2];\n    continue;\n   };\n  }\n  global$0 = $4 + 256 | 0;\n }\n \n function FLAC__format_sample_rate_is_subset($0) {\n  if ($0 + -1 >>> 0 <= 655349) {\n   return !(($0 >>> 0) % 10) | (!(($0 >>> 0) % 1e3) | $0 >>> 0 < 65536)\n  }\n  return 0;\n }\n \n function FLAC__format_seektable_is_legal($0) {\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;\n  $3 = HEAP32[$0 >> 2];\n  if (!$3) {\n   return 1\n  }\n  $6 = HEAP32[$0 + 4 >> 2];\n  $0 = 0;\n  $4 = 1;\n  while (1) {\n   $7 = $2;\n   $5 = $1;\n   $1 = Math_imul($0, 24) + $6 | 0;\n   $2 = HEAP32[$1 >> 2];\n   $1 = HEAP32[$1 + 4 >> 2];\n   if (!(($2 | 0) == -1 & ($1 | 0) == -1 | $4 | (($1 | 0) == ($5 | 0) & $2 >>> 0 > $7 >>> 0 | $1 >>> 0 > $5 >>> 0))) {\n    return 0\n   }\n   $4 = 0;\n   $0 = $0 + 1 | 0;\n   if ($0 >>> 0 < $3 >>> 0) {\n    continue\n   }\n   break;\n  };\n  return 1;\n }\n \n function FLAC__format_seektable_sort($0) {\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;\n  label$1 : {\n   $2 = HEAP32[$0 >> 2];\n   if (!$2) {\n    break label$1\n   }\n   qsort(HEAP32[$0 + 4 >> 2], $2);\n   if (!HEAP32[$0 >> 2]) {\n    break label$1\n   }\n   $2 = 1;\n   $1 = HEAP32[$0 >> 2];\n   if ($1 >>> 0 > 1) {\n    $6 = 1;\n    while (1) {\n     $4 = HEAP32[$0 + 4 >> 2];\n     $3 = $4 + Math_imul($6, 24) | 0;\n     $5 = HEAP32[$3 >> 2];\n     $7 = HEAP32[$3 + 4 >> 2];\n     $8 = $7;\n     label$4 : {\n      if (($5 | 0) != -1 | ($7 | 0) != -1) {\n       $7 = $5;\n       $5 = ($4 + Math_imul($2, 24) | 0) + -24 | 0;\n       if (($7 | 0) == HEAP32[$5 >> 2] & HEAP32[$5 + 4 >> 2] == ($8 | 0)) {\n        break label$4\n       }\n      }\n      $5 = HEAP32[$3 + 4 >> 2];\n      $1 = $4 + Math_imul($2, 24) | 0;\n      HEAP32[$1 >> 2] = HEAP32[$3 >> 2];\n      HEAP32[$1 + 4 >> 2] = $5;\n      $4 = HEAP32[$3 + 20 >> 2];\n      HEAP32[$1 + 16 >> 2] = HEAP32[$3 + 16 >> 2];\n      HEAP32[$1 + 20 >> 2] = $4;\n      $4 = HEAP32[$3 + 12 >> 2];\n      HEAP32[$1 + 8 >> 2] = HEAP32[$3 + 8 >> 2];\n      HEAP32[$1 + 12 >> 2] = $4;\n      $2 = $2 + 1 | 0;\n      $1 = HEAP32[$0 >> 2];\n     }\n     $6 = $6 + 1 | 0;\n     if ($6 >>> 0 < $1 >>> 0) {\n      continue\n     }\n     break;\n    };\n   }\n   if ($2 >>> 0 >= $1 >>> 0) {\n    break label$1\n   }\n   $3 = HEAP32[$0 + 4 >> 2];\n   while (1) {\n    $0 = $3 + Math_imul($2, 24) | 0;\n    HEAP32[$0 + 16 >> 2] = 0;\n    HEAP32[$0 + 8 >> 2] = 0;\n    HEAP32[$0 + 12 >> 2] = 0;\n    HEAP32[$0 >> 2] = -1;\n    HEAP32[$0 + 4 >> 2] = -1;\n    $2 = $2 + 1 | 0;\n    if (($1 | 0) != ($2 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function seekpoint_compare_($0, $1) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  var $2 = 0, $3 = 0;\n  $2 = HEAP32[$0 + 4 >> 2];\n  $3 = HEAP32[$1 + 4 >> 2];\n  $0 = HEAP32[$0 >> 2];\n  $1 = HEAP32[$1 >> 2];\n  return (($0 | 0) == ($1 | 0) & ($2 | 0) == ($3 | 0) ? 0 : ($2 | 0) == ($3 | 0) & $0 >>> 0 < $1 >>> 0 | $2 >>> 0 < $3 >>> 0 ? -1 : 1) | 0;\n }\n \n function utf8len_($0) {\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0;\n  $2 = 1;\n  label$1 : {\n   $1 = HEAPU8[$0 | 0];\n   label$2 : {\n    if (!($1 & 128)) {\n     break label$2\n    }\n    if (!(($1 & 224) != 192 | (HEAPU8[$0 + 1 | 0] & 192) != 128)) {\n     return (($1 & 254) != 192) << 1\n    }\n    label$4 : {\n     if (($1 & 240) != 224) {\n      break label$4\n     }\n     $3 = HEAPU8[$0 + 1 | 0];\n     if (($3 & 192) != 128) {\n      break label$4\n     }\n     $4 = HEAPU8[$0 + 2 | 0];\n     if (($4 & 192) != 128) {\n      break label$4\n     }\n     $2 = 0;\n     if (($3 & 224) == 128 ? ($1 | 0) == 224 : 0) {\n      break label$2\n     }\n     label$5 : {\n      label$6 : {\n       switch ($1 + -237 | 0) {\n       case 0:\n        if (($3 & 224) != 160) {\n         break label$5\n        }\n        break label$2;\n       case 2:\n        break label$6;\n       default:\n        break label$5;\n       };\n      }\n      if (($3 | 0) != 191) {\n       break label$5\n      }\n      if (($4 & 254) == 190) {\n       break label$2\n      }\n     }\n     return 3;\n    }\n    label$8 : {\n     if (($1 & 248) != 240) {\n      break label$8\n     }\n     $2 = HEAPU8[$0 + 1 | 0];\n     if (($2 & 192) != 128 | (HEAPU8[$0 + 2 | 0] & 192) != 128) {\n      break label$8\n     }\n     if ((HEAPU8[$0 + 3 | 0] & 192) == 128) {\n      break label$1\n     }\n    }\n    label$9 : {\n     if (($1 & 252) != 248) {\n      break label$9\n     }\n     $2 = HEAPU8[$0 + 1 | 0];\n     if (($2 & 192) != 128 | (HEAPU8[$0 + 2 | 0] & 192) != 128 | ((HEAPU8[$0 + 3 | 0] & 192) != 128 | (HEAPU8[$0 + 4 | 0] & 192) != 128)) {\n      break label$9\n     }\n     return ($1 | 0) == 248 ? (($2 & 248) == 128 ? 0 : 5) : 5;\n    }\n    $2 = 0;\n    if (($1 & 254) != 252) {\n     break label$2\n    }\n    $3 = HEAPU8[$0 + 1 | 0];\n    if (($3 & 192) != 128 | (HEAPU8[$0 + 2 | 0] & 192) != 128 | ((HEAPU8[$0 + 3 | 0] & 192) != 128 | (HEAPU8[$0 + 4 | 0] & 192) != 128)) {\n     break label$2\n    }\n    if ((HEAPU8[$0 + 5 | 0] & 192) != 128) {\n     break label$2\n    }\n    $2 = ($1 | 0) == 252 ? (($3 & 252) == 128 ? 0 : 6) : 6;\n   }\n   return $2;\n  }\n  return ($1 | 0) == 240 ? (($2 & 240) != 128) << 2 : 4;\n }\n \n function FLAC__format_cuesheet_is_legal($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     label$4 : {\n      label$5 : {\n       label$6 : {\n        label$7 : {\n         if ($1) {\n          $1 = HEAP32[$0 + 140 >> 2];\n          $3 = $1;\n          $2 = HEAP32[$0 + 136 >> 2];\n          if (!$1 & $2 >>> 0 <= 88199 | $1 >>> 0 < 0) {\n           $0 = 0;\n           break label$1;\n          }\n          if (__wasm_i64_urem($2, $3) | i64toi32_i32$HIGH_BITS) {\n           $0 = 0;\n           break label$1;\n          }\n          $3 = HEAP32[$0 + 148 >> 2];\n          if (!$3) {\n           break label$2\n          }\n          if (HEAPU8[(HEAP32[$0 + 152 >> 2] + ($3 << 5) | 0) + -24 | 0] == 170) {\n           break label$7\n          }\n          $0 = 0;\n          break label$1;\n         }\n         $2 = HEAP32[$0 + 148 >> 2];\n         if (!$2) {\n          break label$2\n         }\n         $4 = $2 + -1 | 0;\n         $6 = HEAP32[$0 + 152 >> 2];\n         $1 = 0;\n         while (1) {\n          $0 = $6 + ($1 << 5) | 0;\n          if (!HEAPU8[$0 + 8 | 0]) {\n           break label$3\n          }\n          $3 = HEAPU8[$0 + 23 | 0];\n          label$12 : {\n           label$13 : {\n            if ($1 >>> 0 < $4 >>> 0) {\n             if (!$3) {\n              break label$4\n             }\n             if (HEAPU8[HEAP32[$0 + 24 >> 2] + 8 | 0] > 1) {\n              break label$5\n             }\n             break label$13;\n            }\n            if (!$3) {\n             break label$12\n            }\n           }\n           $7 = $0 + 24 | 0;\n           $0 = 0;\n           while (1) {\n            if ($0) {\n             $5 = HEAP32[$7 >> 2] + ($0 << 4) | 0;\n             if ((HEAPU8[$5 + -8 | 0] + 1 | 0) != HEAPU8[$5 + 8 | 0]) {\n              break label$6\n             }\n            }\n            $0 = $0 + 1 | 0;\n            if ($0 >>> 0 < $3 >>> 0) {\n             continue\n            }\n            break;\n           };\n          }\n          $0 = 1;\n          $1 = $1 + 1 | 0;\n          if (($2 | 0) != ($1 | 0)) {\n           continue\n          }\n          break;\n         };\n         break label$1;\n        }\n        $6 = $3 + -1 | 0;\n        $7 = HEAP32[$0 + 152 >> 2];\n        $1 = 0;\n        while (1) {\n         $0 = $7 + ($1 << 5) | 0;\n         $2 = HEAPU8[$0 + 8 | 0];\n         if (!$2) {\n          break label$3\n         }\n         if (!(($2 | 0) == 170 | $2 >>> 0 < 100)) {\n          $0 = 0;\n          break label$1;\n         }\n         if (__wasm_i64_urem(HEAP32[$0 >> 2], HEAP32[$0 + 4 >> 2]) | i64toi32_i32$HIGH_BITS) {\n          $0 = 0;\n          break label$1;\n         }\n         $2 = HEAPU8[$0 + 23 | 0];\n         label$21 : {\n          label$22 : {\n           if ($1 >>> 0 < $6 >>> 0) {\n            if (!$2) {\n             break label$4\n            }\n            if (HEAPU8[HEAP32[$0 + 24 >> 2] + 8 | 0] < 2) {\n             break label$22\n            }\n            break label$5;\n           }\n           if (!$2) {\n            break label$21\n           }\n          }\n          $5 = HEAP32[$0 + 24 >> 2];\n          $0 = 0;\n          while (1) {\n           $4 = $5 + ($0 << 4) | 0;\n           if (__wasm_i64_urem(HEAP32[$4 >> 2], HEAP32[$4 + 4 >> 2]) | i64toi32_i32$HIGH_BITS) {\n            $0 = 0;\n            break label$1;\n           }\n           if (HEAPU8[$4 + 8 | 0] != (HEAPU8[$4 + -8 | 0] + 1 | 0) ? $0 : 0) {\n            break label$6\n           }\n           $0 = $0 + 1 | 0;\n           if ($0 >>> 0 < $2 >>> 0) {\n            continue\n           }\n           break;\n          };\n         }\n         $0 = 1;\n         $1 = $1 + 1 | 0;\n         if (($3 | 0) != ($1 | 0)) {\n          continue\n         }\n         break;\n        };\n        break label$1;\n       }\n       $0 = 0;\n       break label$1;\n      }\n      $0 = 0;\n      break label$1;\n     }\n     $0 = 0;\n     break label$1;\n    }\n    $0 = 0;\n    break label$1;\n   }\n   $0 = 0;\n  }\n  return $0;\n }\n \n function FLAC__format_picture_is_legal($0) {\n  var $1 = 0, $2 = 0;\n  label$1 : {\n   label$2 : {\n    $2 = HEAP32[$0 + 4 >> 2];\n    $1 = HEAPU8[$2 | 0];\n    if (!$1) {\n     break label$2\n    }\n    while (1) {\n     if (($1 + -32 & 255) >>> 0 < 95) {\n      $2 = $2 + 1 | 0;\n      $1 = HEAPU8[$2 | 0];\n      if ($1) {\n       continue\n      }\n      break label$2;\n     }\n     break;\n    };\n    $2 = 0;\n    break label$1;\n   }\n   $2 = 1;\n   $1 = HEAP32[$0 + 8 >> 2];\n   if (!HEAPU8[$1 | 0]) {\n    break label$1\n   }\n   while (1) {\n    $0 = utf8len_($1);\n    if (!$0) {\n     $2 = 0;\n     break label$1;\n    }\n    $1 = $0 + $1 | 0;\n    if (HEAPU8[$1 | 0]) {\n     continue\n    }\n    break;\n   };\n  }\n  return $2;\n }\n \n function FLAC__format_get_max_rice_partition_order_from_blocksize_limited_max_and_predictor_order($0, $1, $2) {\n  var $3 = 0;\n  while (1) {\n   $3 = $0;\n   if ($3) {\n    $0 = $3 + -1 | 0;\n    if ($1 >>> $3 >>> 0 <= $2 >>> 0) {\n     continue\n    }\n   }\n   break;\n  };\n  return $3;\n }\n \n function FLAC__format_get_max_rice_partition_order_from_blocksize($0) {\n  var $1 = 0, $2 = 0;\n  label$1 : {\n   if (!($0 & 1)) {\n    while (1) {\n     $1 = $1 + 1 | 0;\n     $2 = $0 & 2;\n     $0 = $0 >>> 1 | 0;\n     if (!$2) {\n      continue\n     }\n     break;\n    };\n    $0 = 15;\n    if ($1 >>> 0 > 14) {\n     break label$1\n    }\n   }\n   $0 = $1;\n  }\n  return $0;\n }\n \n function FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0) {\n  HEAP32[$0 + 8 >> 2] = 0;\n  HEAP32[$0 >> 2] = 0;\n  HEAP32[$0 + 4 >> 2] = 0;\n }\n \n function FLAC__format_entropy_coding_method_partitioned_rice_contents_clear($0) {\n  var $1 = 0;\n  $1 = HEAP32[$0 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  $1 = HEAP32[$0 + 4 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  HEAP32[$0 + 8 >> 2] = 0;\n  HEAP32[$0 >> 2] = 0;\n  HEAP32[$0 + 4 >> 2] = 0;\n }\n \n function FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0;\n  $3 = 1;\n  label$1 : {\n   if (HEAPU32[$0 + 8 >> 2] >= $1 >>> 0) {\n    break label$1\n   }\n   $3 = HEAP32[$0 >> 2];\n   $4 = 4 << $1;\n   $2 = dlrealloc($3, $4);\n   if (!($2 | $1 >>> 0 > 29)) {\n    dlfree($3)\n   }\n   HEAP32[$0 >> 2] = $2;\n   $3 = 0;\n   if (!$2) {\n    break label$1\n   }\n   $5 = HEAP32[$0 + 4 >> 2];\n   $2 = dlrealloc($5, $4);\n   if (!($2 | $1 >>> 0 > 29)) {\n    dlfree($5)\n   }\n   HEAP32[$0 + 4 >> 2] = $2;\n   if (!$2) {\n    break label$1\n   }\n   memset($2, $4);\n   HEAP32[$0 + 8 >> 2] = $1;\n   $3 = 1;\n  }\n  return $3;\n }\n \n function ogg_page_serialno($0) {\n  $0 = HEAP32[$0 >> 2];\n  return HEAPU8[$0 + 14 | 0] | HEAPU8[$0 + 15 | 0] << 8 | (HEAPU8[$0 + 16 | 0] << 16 | HEAPU8[$0 + 17 | 0] << 24);\n }\n \n function ogg_stream_init($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0;\n  if ($0) {\n   memset($0 + 8 | 0, 352);\n   HEAP32[$0 + 24 >> 2] = 1024;\n   HEAP32[$0 + 4 >> 2] = 16384;\n   $3 = dlmalloc(16384);\n   HEAP32[$0 >> 2] = $3;\n   $2 = dlmalloc(4096);\n   HEAP32[$0 + 16 >> 2] = $2;\n   $4 = dlmalloc(8192);\n   HEAP32[$0 + 20 >> 2] = $4;\n   label$2 : {\n    if ($3) {\n     if ($2 ? $4 : 0) {\n      break label$2\n     }\n     dlfree($3);\n     $2 = HEAP32[$0 + 16 >> 2];\n    }\n    if ($2) {\n     dlfree($2)\n    }\n    $1 = HEAP32[$0 + 20 >> 2];\n    if ($1) {\n     dlfree($1)\n    }\n    memset($0, 360);\n    return -1;\n   }\n   HEAP32[$0 + 336 >> 2] = $1;\n   $0 = 0;\n  } else {\n   $0 = -1\n  }\n  return $0;\n }\n \n function ogg_stream_clear($0) {\n  var $1 = 0;\n  if ($0) {\n   $1 = HEAP32[$0 >> 2];\n   if ($1) {\n    dlfree($1)\n   }\n   $1 = HEAP32[$0 + 16 >> 2];\n   if ($1) {\n    dlfree($1)\n   }\n   $1 = HEAP32[$0 + 20 >> 2];\n   if ($1) {\n    dlfree($1)\n   }\n   memset($0, 360);\n  }\n }\n \n function ogg_page_checksum_set($0) {\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0;\n  if ($0) {\n   HEAP8[HEAP32[$0 >> 2] + 22 | 0] = 0;\n   HEAP8[HEAP32[$0 >> 2] + 23 | 0] = 0;\n   HEAP8[HEAP32[$0 >> 2] + 24 | 0] = 0;\n   HEAP8[HEAP32[$0 >> 2] + 25 | 0] = 0;\n   $3 = HEAP32[$0 + 4 >> 2];\n   if (($3 | 0) >= 1) {\n    $4 = HEAP32[$0 >> 2];\n    while (1) {\n     $1 = HEAP32[((HEAPU8[$2 + $4 | 0] ^ $1 >>> 24) << 2) + 6512 >> 2] ^ $1 << 8;\n     $2 = $2 + 1 | 0;\n     if (($3 | 0) != ($2 | 0)) {\n      continue\n     }\n     break;\n    };\n   }\n   $3 = HEAP32[$0 + 12 >> 2];\n   if (($3 | 0) >= 1) {\n    $4 = HEAP32[$0 + 8 >> 2];\n    $2 = 0;\n    while (1) {\n     $1 = HEAP32[((HEAPU8[$2 + $4 | 0] ^ $1 >>> 24) << 2) + 6512 >> 2] ^ $1 << 8;\n     $2 = $2 + 1 | 0;\n     if (($3 | 0) != ($2 | 0)) {\n      continue\n     }\n     break;\n    };\n   }\n   HEAP8[HEAP32[$0 >> 2] + 22 | 0] = $1;\n   HEAP8[HEAP32[$0 >> 2] + 23 | 0] = $1 >>> 8;\n   HEAP8[HEAP32[$0 >> 2] + 24 | 0] = $1 >>> 16;\n   HEAP8[HEAP32[$0 >> 2] + 25 | 0] = $1 >>> 24;\n  }\n }\n \n function ogg_stream_iovecin($0, $1, $2, $3, $4) {\n  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0;\n  $6 = -1;\n  folding_inner0 : {\n   label$1 : {\n    if (!$0) {\n     break label$1\n    }\n    $8 = HEAP32[$0 >> 2];\n    if (!$8) {\n     break label$1\n    }\n    if (!$1) {\n     return 0\n    }\n    while (1) {\n     $7 = HEAP32[(($5 << 3) + $1 | 0) + 4 >> 2];\n     if (($7 | 0) < 0 | ($9 | 0) > (2147483647 - $7 | 0)) {\n      break label$1\n     }\n     $9 = $7 + $9 | 0;\n     $5 = $5 + 1 | 0;\n     if (($5 | 0) != 1) {\n      continue\n     }\n     break;\n    };\n    $5 = HEAP32[$0 + 12 >> 2];\n    if ($5) {\n     $7 = HEAP32[$0 + 8 >> 2] - $5 | 0;\n     HEAP32[$0 + 8 >> 2] = $7;\n     if ($7) {\n      memmove($8, $5 + $8 | 0, $7)\n     }\n     HEAP32[$0 + 12 >> 2] = 0;\n    }\n    $5 = HEAP32[$0 + 4 >> 2];\n    if (($5 - $9 | 0) <= HEAP32[$0 + 8 >> 2]) {\n     if (($5 | 0) > (2147483647 - $9 | 0)) {\n      break folding_inner0\n     }\n     $5 = $5 + $9 | 0;\n     $5 = ($5 | 0) < 2147482623 ? $5 + 1024 | 0 : $5;\n     $8 = dlrealloc(HEAP32[$0 >> 2], $5);\n     if (!$8) {\n      break folding_inner0\n     }\n     HEAP32[$0 >> 2] = $8;\n     HEAP32[$0 + 4 >> 2] = $5;\n    }\n    $8 = ($9 | 0) / 255 | 0;\n    $11 = $8 + 1 | 0;\n    if (_os_lacing_expand($0, $11)) {\n     break label$1\n    }\n    $6 = HEAP32[$0 + 8 >> 2];\n    $5 = 0;\n    while (1) {\n     $7 = HEAP32[$0 >> 2] + $6 | 0;\n     $6 = ($5 << 3) + $1 | 0;\n     memcpy($7, HEAP32[$6 >> 2], HEAP32[$6 + 4 >> 2]);\n     $6 = HEAP32[$0 + 8 >> 2] + HEAP32[$6 + 4 >> 2] | 0;\n     HEAP32[$0 + 8 >> 2] = $6;\n     $5 = $5 + 1 | 0;\n     if (($5 | 0) != 1) {\n      continue\n     }\n     break;\n    };\n    $7 = HEAP32[$0 + 16 >> 2];\n    $12 = $7;\n    $1 = HEAP32[$0 + 28 >> 2];\n    $13 = $1;\n    label$19 : {\n     if (($9 | 0) <= 254) {\n      $6 = HEAP32[$0 + 20 >> 2];\n      $5 = 0;\n      break label$19;\n     }\n     $6 = HEAP32[$0 + 20 >> 2];\n     $5 = 0;\n     while (1) {\n      $10 = $1 + $5 | 0;\n      HEAP32[$7 + ($10 << 2) >> 2] = 255;\n      $14 = HEAP32[$0 + 356 >> 2];\n      $10 = ($10 << 3) + $6 | 0;\n      HEAP32[$10 >> 2] = HEAP32[$0 + 352 >> 2];\n      HEAP32[$10 + 4 >> 2] = $14;\n      $5 = $5 + 1 | 0;\n      if (($8 | 0) != ($5 | 0)) {\n       continue\n      }\n      break;\n     };\n     $5 = $8;\n    }\n    $5 = $13 + $5 | 0;\n    HEAP32[$12 + ($5 << 2) >> 2] = $9 - Math_imul($8, 255);\n    $5 = ($5 << 3) + $6 | 0;\n    HEAP32[$5 >> 2] = $3;\n    HEAP32[$5 + 4 >> 2] = $4;\n    HEAP32[$0 + 352 >> 2] = $3;\n    HEAP32[$0 + 356 >> 2] = $4;\n    $3 = $7 + ($1 << 2) | 0;\n    HEAP32[$3 >> 2] = HEAP32[$3 >> 2] | 256;\n    HEAP32[$0 + 28 >> 2] = $1 + $11;\n    $1 = HEAP32[$0 + 348 >> 2];\n    $3 = HEAP32[$0 + 344 >> 2] + 1 | 0;\n    if ($3 >>> 0 < 1) {\n     $1 = $1 + 1 | 0\n    }\n    HEAP32[$0 + 344 >> 2] = $3;\n    HEAP32[$0 + 348 >> 2] = $1;\n    $6 = 0;\n    if (!$2) {\n     break label$1\n    }\n    HEAP32[$0 + 328 >> 2] = 1;\n   }\n   return $6;\n  }\n  $1 = HEAP32[$0 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  $1 = HEAP32[$0 + 16 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  $1 = HEAP32[$0 + 20 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  memset($0, 360);\n  return -1;\n }\n \n function _os_lacing_expand($0, $1) {\n  var $2 = 0;\n  folding_inner0 : {\n   $2 = HEAP32[$0 + 24 >> 2];\n   if (($2 - $1 | 0) <= HEAP32[$0 + 28 >> 2]) {\n    if (($2 | 0) > (2147483647 - $1 | 0)) {\n     break folding_inner0\n    }\n    $1 = $1 + $2 | 0;\n    $1 = ($1 | 0) < 2147483615 ? $1 + 32 | 0 : $1;\n    $2 = dlrealloc(HEAP32[$0 + 16 >> 2], $1 << 2);\n    if (!$2) {\n     break folding_inner0\n    }\n    HEAP32[$0 + 16 >> 2] = $2;\n    $2 = dlrealloc(HEAP32[$0 + 20 >> 2], $1 << 3);\n    if (!$2) {\n     break folding_inner0\n    }\n    HEAP32[$0 + 24 >> 2] = $1;\n    HEAP32[$0 + 20 >> 2] = $2;\n   }\n   return 0;\n  }\n  $1 = HEAP32[$0 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  $1 = HEAP32[$0 + 16 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  $1 = HEAP32[$0 + 20 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  memset($0, 360);\n  return -1;\n }\n \n function ogg_stream_packetin($0, $1) {\n  var $2 = 0;\n  $2 = global$0 - 16 | 0;\n  global$0 = $2;\n  HEAP32[$2 + 8 >> 2] = HEAP32[$1 >> 2];\n  HEAP32[$2 + 12 >> 2] = HEAP32[$1 + 4 >> 2];\n  $0 = ogg_stream_iovecin($0, $2 + 8 | 0, HEAP32[$1 + 12 >> 2], HEAP32[$1 + 16 >> 2], HEAP32[$1 + 20 >> 2]);\n  global$0 = $2 + 16 | 0;\n  return $0;\n }\n \n function ogg_stream_flush_i($0, $1, $2) {\n  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0;\n  label$1 : {\n   if (!$0) {\n    break label$1\n   }\n   $8 = HEAP32[$0 + 28 >> 2];\n   $4 = ($8 | 0) < 255 ? $8 : 255;\n   if (!$4) {\n    break label$1\n   }\n   $10 = HEAP32[$0 >> 2];\n   if (!$10) {\n    break label$1\n   }\n   label$2 : {\n    label$3 : {\n     label$4 : {\n      $11 = HEAP32[$0 + 332 >> 2];\n      if ($11) {\n       if (($8 | 0) >= 1) {\n        break label$4\n       }\n       $7 = -1;\n       $5 = -1;\n       break label$3;\n      }\n      $3 = ($4 | 0) > 0 ? $4 : 0;\n      while (1) {\n       if (($3 | 0) == ($6 | 0)) {\n        break label$3\n       }\n       $9 = $6 << 2;\n       $4 = $6 + 1 | 0;\n       $6 = $4;\n       if (HEAPU8[$9 + HEAP32[$0 + 16 >> 2] | 0] == 255) {\n        continue\n       }\n       break;\n      };\n      $3 = $4;\n      break label$3;\n     }\n     $4 = ($4 | 0) > 1 ? $4 : 1;\n     $7 = -1;\n     $5 = -1;\n     label$7 : {\n      while (1) {\n       if (!(($6 | 0) <= 4096 | ($9 | 0) <= 3)) {\n        $2 = 1;\n        break label$7;\n       }\n       $9 = 0;\n       $12 = HEAPU8[HEAP32[$0 + 16 >> 2] + ($3 << 2) | 0];\n       if (($12 | 0) != 255) {\n        $13 = $13 + 1 | 0;\n        $9 = $13;\n        $5 = HEAP32[$0 + 20 >> 2] + ($3 << 3) | 0;\n        $7 = HEAP32[$5 >> 2];\n        $5 = HEAP32[$5 + 4 >> 2];\n       }\n       $6 = $6 + $12 | 0;\n       $3 = $3 + 1 | 0;\n       if (($4 | 0) != ($3 | 0)) {\n        continue\n       }\n       break;\n      };\n      $3 = $4;\n     }\n     $4 = 255;\n     if (($3 | 0) == 255) {\n      break label$2\n     }\n    }\n    $4 = $3;\n    if (!$2) {\n     break label$1\n    }\n   }\n   HEAP32[$0 + 40 >> 2] = 1399285583;\n   HEAP16[$0 + 44 >> 1] = 0;\n   $2 = HEAP32[$0 + 16 >> 2];\n   $3 = (HEAPU8[$2 + 1 | 0] ^ -1) & 1;\n   $3 = $11 ? $3 : $3 | 2;\n   HEAP8[$0 + 45 | 0] = $3;\n   if (!(!HEAP32[$0 + 328 >> 2] | ($4 | 0) != ($8 | 0))) {\n    HEAP8[$0 + 45 | 0] = $3 | 4\n   }\n   HEAP32[$0 + 332 >> 2] = 1;\n   HEAP8[$0 + 53 | 0] = $5 >>> 24;\n   HEAP8[$0 + 52 | 0] = $5 >>> 16;\n   HEAP8[$0 + 51 | 0] = $5 >>> 8;\n   HEAP8[$0 + 50 | 0] = $5;\n   HEAP8[$0 + 49 | 0] = ($5 & 16777215) << 8 | $7 >>> 24;\n   HEAP8[$0 + 48 | 0] = ($5 & 65535) << 16 | $7 >>> 16;\n   HEAP8[$0 + 47 | 0] = ($5 & 255) << 24 | $7 >>> 8;\n   HEAP8[$0 + 46 | 0] = $7;\n   $3 = HEAP32[$0 + 336 >> 2];\n   HEAP8[$0 + 54 | 0] = $3;\n   HEAP8[$0 + 55 | 0] = $3 >>> 8;\n   HEAP8[$0 + 56 | 0] = $3 >>> 16;\n   HEAP8[$0 + 57 | 0] = $3 >>> 24;\n   $3 = HEAP32[$0 + 340 >> 2];\n   if (($3 | 0) == -1) {\n    HEAP32[$0 + 340 >> 2] = 0;\n    $3 = 0;\n   }\n   HEAP8[$0 + 66 | 0] = $4;\n   $6 = 0;\n   HEAP16[$0 + 62 >> 1] = 0;\n   HEAP16[$0 + 64 >> 1] = 0;\n   HEAP8[$0 + 61 | 0] = $3 >>> 24;\n   HEAP8[$0 + 60 | 0] = $3 >>> 16;\n   HEAP8[$0 + 59 | 0] = $3 >>> 8;\n   HEAP8[$0 + 58 | 0] = $3;\n   $14 = 1;\n   HEAP32[$0 + 340 >> 2] = $3 + 1;\n   if (($4 | 0) >= 1) {\n    $3 = 0;\n    while (1) {\n     $5 = HEAP32[$2 + ($3 << 2) >> 2];\n     HEAP8[($0 + $3 | 0) + 67 | 0] = $5;\n     $6 = ($5 & 255) + $6 | 0;\n     $3 = $3 + 1 | 0;\n     if (($4 | 0) != ($3 | 0)) {\n      continue\n     }\n     break;\n    };\n   }\n   HEAP32[$1 >> 2] = $0 + 40;\n   $3 = $4 + 27 | 0;\n   HEAP32[$0 + 324 >> 2] = $3;\n   HEAP32[$1 + 4 >> 2] = $3;\n   $3 = HEAP32[$0 + 12 >> 2];\n   HEAP32[$1 + 12 >> 2] = $6;\n   HEAP32[$1 + 8 >> 2] = $3 + $10;\n   $3 = $8 - $4 | 0;\n   HEAP32[$0 + 28 >> 2] = $3;\n   memmove($2, $2 + ($4 << 2) | 0, $3 << 2);\n   $2 = HEAP32[$0 + 20 >> 2];\n   memmove($2, $2 + ($4 << 3) | 0, HEAP32[$0 + 28 >> 2] << 3);\n   HEAP32[$0 + 12 >> 2] = HEAP32[$0 + 12 >> 2] + $6;\n   if (!$1) {\n    break label$1\n   }\n   $0 = 0;\n   HEAP8[HEAP32[$1 >> 2] + 22 | 0] = 0;\n   HEAP8[HEAP32[$1 >> 2] + 23 | 0] = 0;\n   HEAP8[HEAP32[$1 >> 2] + 24 | 0] = 0;\n   HEAP8[HEAP32[$1 >> 2] + 25 | 0] = 0;\n   $2 = HEAP32[$1 + 4 >> 2];\n   if (($2 | 0) >= 1) {\n    $4 = HEAP32[$1 >> 2];\n    $3 = 0;\n    while (1) {\n     $0 = HEAP32[((HEAPU8[$3 + $4 | 0] ^ $0 >>> 24) << 2) + 6512 >> 2] ^ $0 << 8;\n     $3 = $3 + 1 | 0;\n     if (($2 | 0) != ($3 | 0)) {\n      continue\n     }\n     break;\n    };\n   }\n   $2 = HEAP32[$1 + 12 >> 2];\n   if (($2 | 0) >= 1) {\n    $4 = HEAP32[$1 + 8 >> 2];\n    $3 = 0;\n    while (1) {\n     $0 = HEAP32[((HEAPU8[$3 + $4 | 0] ^ $0 >>> 24) << 2) + 6512 >> 2] ^ $0 << 8;\n     $3 = $3 + 1 | 0;\n     if (($2 | 0) != ($3 | 0)) {\n      continue\n     }\n     break;\n    };\n   }\n   HEAP8[HEAP32[$1 >> 2] + 22 | 0] = $0;\n   HEAP8[HEAP32[$1 >> 2] + 23 | 0] = $0 >>> 8;\n   HEAP8[HEAP32[$1 >> 2] + 24 | 0] = $0 >>> 16;\n   HEAP8[HEAP32[$1 >> 2] + 25 | 0] = $0 >>> 24;\n  }\n  return $14;\n }\n \n function ogg_stream_pageout($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0;\n  if (!(!$0 | !HEAP32[$0 >> 2])) {\n   $2 = HEAP32[$0 + 28 >> 2];\n   $4 = $0;\n   label$2 : {\n    label$3 : {\n     if (HEAP32[$0 + 328 >> 2]) {\n      if ($2) {\n       break label$3\n      }\n      $3 = 0;\n      break label$2;\n     }\n     $3 = 0;\n     if (HEAP32[$0 + 332 >> 2] | !$2) {\n      break label$2\n     }\n    }\n    $3 = 1;\n   }\n   $2 = ogg_stream_flush_i($4, $1, $3);\n  }\n  return $2;\n }\n \n function ogg_sync_init($0) {\n  if ($0) {\n   HEAP32[$0 >> 2] = 0;\n   HEAP32[$0 + 4 >> 2] = 0;\n   HEAP32[$0 + 24 >> 2] = 0;\n   HEAP32[$0 + 16 >> 2] = 0;\n   HEAP32[$0 + 20 >> 2] = 0;\n   HEAP32[$0 + 8 >> 2] = 0;\n   HEAP32[$0 + 12 >> 2] = 0;\n  }\n  return 0;\n }\n \n function ogg_sync_clear($0) {\n  var $1 = 0;\n  if ($0) {\n   $1 = HEAP32[$0 >> 2];\n   if ($1) {\n    dlfree($1)\n   }\n   HEAP32[$0 >> 2] = 0;\n   HEAP32[$0 + 4 >> 2] = 0;\n   HEAP32[$0 + 24 >> 2] = 0;\n   HEAP32[$0 + 16 >> 2] = 0;\n   HEAP32[$0 + 20 >> 2] = 0;\n   HEAP32[$0 + 8 >> 2] = 0;\n   HEAP32[$0 + 12 >> 2] = 0;\n  }\n }\n \n function ogg_sync_buffer($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0;\n  $2 = HEAP32[$0 + 4 >> 2];\n  if (($2 | 0) >= 0) {\n   $4 = HEAP32[$0 + 12 >> 2];\n   if ($4) {\n    $3 = HEAP32[$0 + 8 >> 2] - $4 | 0;\n    HEAP32[$0 + 8 >> 2] = $3;\n    if (($3 | 0) >= 1) {\n     $2 = HEAP32[$0 >> 2];\n     memmove($2, $2 + $4 | 0, $3);\n     $2 = HEAP32[$0 + 4 >> 2];\n    }\n    HEAP32[$0 + 12 >> 2] = 0;\n   }\n   $3 = $2;\n   $2 = HEAP32[$0 + 8 >> 2];\n   label$4 : {\n    if (($3 - $2 | 0) >= ($1 | 0)) {\n     $1 = HEAP32[$0 >> 2];\n     break label$4;\n    }\n    $2 = ($1 + $2 | 0) + 4096 | 0;\n    $1 = HEAP32[$0 >> 2];\n    label$6 : {\n     if ($1) {\n      $1 = dlrealloc($1, $2);\n      break label$6;\n     }\n     $1 = dlmalloc($2);\n    }\n    if (!$1) {\n     $1 = HEAP32[$0 >> 2];\n     if ($1) {\n      dlfree($1)\n     }\n     HEAP32[$0 >> 2] = 0;\n     HEAP32[$0 + 4 >> 2] = 0;\n     HEAP32[$0 + 24 >> 2] = 0;\n     HEAP32[$0 + 16 >> 2] = 0;\n     HEAP32[$0 + 20 >> 2] = 0;\n     HEAP32[$0 + 8 >> 2] = 0;\n     HEAP32[$0 + 12 >> 2] = 0;\n     return 0;\n    }\n    HEAP32[$0 + 4 >> 2] = $2;\n    HEAP32[$0 >> 2] = $1;\n    $2 = HEAP32[$0 + 8 >> 2];\n   }\n   $0 = $1 + $2 | 0;\n  } else {\n   $0 = 0\n  }\n  return $0;\n }\n \n function ogg_sync_wrote($0, $1) {\n  var $2 = 0, $3 = 0;\n  $2 = -1;\n  $3 = HEAP32[$0 + 4 >> 2];\n  label$1 : {\n   if (($3 | 0) < 0) {\n    break label$1\n   }\n   $1 = HEAP32[$0 + 8 >> 2] + $1 | 0;\n   if (($1 | 0) > ($3 | 0)) {\n    break label$1\n   }\n   HEAP32[$0 + 8 >> 2] = $1;\n   $2 = 0;\n  }\n  return $2;\n }\n \n function ogg_sync_pageseek($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0;\n  $9 = global$0 - 16 | 0;\n  global$0 = $9;\n  label$1 : {\n   if (HEAP32[$0 + 4 >> 2] < 0) {\n    break label$1\n   }\n   $4 = HEAP32[$0 + 12 >> 2];\n   $10 = HEAP32[$0 + 8 >> 2] - $4 | 0;\n   $2 = $4 + HEAP32[$0 >> 2] | 0;\n   label$2 : {\n    label$3 : {\n     label$4 : {\n      $5 = HEAP32[$0 + 20 >> 2];\n      label$5 : {\n       if (!$5) {\n        if (($10 | 0) < 27) {\n         break label$1\n        }\n        if ((HEAPU8[$2 | 0] | HEAPU8[$2 + 1 | 0] << 8 | (HEAPU8[$2 + 2 | 0] << 16 | HEAPU8[$2 + 3 | 0] << 24)) != 1399285583) {\n         break label$5\n        }\n        $4 = HEAPU8[$2 + 26 | 0];\n        $5 = $4 + 27 | 0;\n        if (($10 | 0) < ($5 | 0)) {\n         break label$1\n        }\n        if ($4) {\n         $4 = HEAP32[$0 + 24 >> 2];\n         while (1) {\n          $4 = HEAPU8[($2 + $6 | 0) + 27 | 0] + $4 | 0;\n          HEAP32[$0 + 24 >> 2] = $4;\n          $6 = $6 + 1 | 0;\n          if ($6 >>> 0 < HEAPU8[$2 + 26 | 0]) {\n           continue\n          }\n          break;\n         };\n        }\n        HEAP32[$0 + 20 >> 2] = $5;\n       }\n       if ((HEAP32[$0 + 24 >> 2] + $5 | 0) > ($10 | 0)) {\n        break label$1\n       }\n       $7 = HEAPU8[$2 + 22 | 0] | HEAPU8[$2 + 23 | 0] << 8 | (HEAPU8[$2 + 24 | 0] << 16 | HEAPU8[$2 + 25 | 0] << 24);\n       HEAP32[$9 + 12 >> 2] = $7;\n       $6 = 0;\n       HEAP8[$2 + 22 | 0] = 0;\n       HEAP8[$2 + 23 | 0] = 0;\n       HEAP8[$2 + 24 | 0] = 0;\n       HEAP8[$2 + 25 | 0] = 0;\n       $11 = HEAP32[$0 + 24 >> 2];\n       $8 = HEAP32[$0 + 20 >> 2];\n       HEAP8[$2 + 22 | 0] = 0;\n       HEAP8[$2 + 23 | 0] = 0;\n       HEAP8[$2 + 24 | 0] = 0;\n       HEAP8[$2 + 25 | 0] = 0;\n       if (($8 | 0) > 0) {\n        $5 = 0;\n        while (1) {\n         $3 = HEAP32[((HEAPU8[$2 + $5 | 0] ^ $3 >>> 24) << 2) + 6512 >> 2] ^ $3 << 8;\n         $5 = $5 + 1 | 0;\n         if (($8 | 0) != ($5 | 0)) {\n          continue\n         }\n         break;\n        };\n       }\n       $4 = $2 + 22 | 0;\n       if (($11 | 0) > 0) {\n        $8 = $2 + $8 | 0;\n        while (1) {\n         $3 = HEAP32[((HEAPU8[$6 + $8 | 0] ^ $3 >>> 24) << 2) + 6512 >> 2] ^ $3 << 8;\n         $6 = $6 + 1 | 0;\n         if (($11 | 0) != ($6 | 0)) {\n          continue\n         }\n         break;\n        };\n       }\n       HEAP8[$2 + 22 | 0] = $3;\n       HEAP8[$2 + 23 | 0] = $3 >>> 8;\n       HEAP8[$2 + 24 | 0] = $3 >>> 16;\n       HEAP8[$2 + 25 | 0] = $3 >>> 24;\n       if (HEAP32[$9 + 12 >> 2] == (HEAPU8[$4 | 0] | HEAPU8[$4 + 1 | 0] << 8 | (HEAPU8[$4 + 2 | 0] << 16 | HEAPU8[$4 + 3 | 0] << 24))) {\n        break label$4\n       }\n       HEAP8[$4 | 0] = $7;\n       HEAP8[$4 + 1 | 0] = $7 >>> 8;\n       HEAP8[$4 + 2 | 0] = $7 >>> 16;\n       HEAP8[$4 + 3 | 0] = $7 >>> 24;\n      }\n      HEAP32[$0 + 20 >> 2] = 0;\n      HEAP32[$0 + 24 >> 2] = 0;\n      $3 = memchr($2 + 1 | 0, $10 + -1 | 0);\n      if (!$3) {\n       break label$3\n      }\n      $6 = HEAP32[$0 >> 2];\n      break label$2;\n     }\n     $7 = HEAP32[$0 + 12 >> 2];\n     label$13 : {\n      if (!$1) {\n       $5 = HEAP32[$0 + 24 >> 2];\n       $3 = HEAP32[$0 + 20 >> 2];\n       break label$13;\n      }\n      $4 = $7 + HEAP32[$0 >> 2] | 0;\n      HEAP32[$1 >> 2] = $4;\n      $3 = HEAP32[$0 + 20 >> 2];\n      HEAP32[$1 + 4 >> 2] = $3;\n      HEAP32[$1 + 8 >> 2] = $3 + $4;\n      $5 = HEAP32[$0 + 24 >> 2];\n      HEAP32[$1 + 12 >> 2] = $5;\n     }\n     HEAP32[$0 + 24 >> 2] = 0;\n     HEAP32[$0 + 16 >> 2] = 0;\n     HEAP32[$0 + 20 >> 2] = 0;\n     $3 = $3 + $5 | 0;\n     HEAP32[$0 + 12 >> 2] = $7 + $3;\n     break label$1;\n    }\n    $6 = HEAP32[$0 >> 2];\n    $3 = $6 + HEAP32[$0 + 8 >> 2] | 0;\n   }\n   HEAP32[$0 + 12 >> 2] = $3 - $6;\n   $3 = $2 - $3 | 0;\n  }\n  global$0 = $9 + 16 | 0;\n  return $3;\n }\n \n function ogg_sync_pageout($0, $1) {\n  var $2 = 0;\n  if (HEAP32[$0 + 4 >> 2] >= 0) {\n   while (1) {\n    $2 = ogg_sync_pageseek($0, $1);\n    if (($2 | 0) > 0) {\n     return 1\n    }\n    if (!$2) {\n     return 0\n    }\n    if (HEAP32[$0 + 16 >> 2]) {\n     continue\n    }\n    break;\n   };\n   HEAP32[$0 + 16 >> 2] = 1;\n   $0 = -1;\n  } else {\n   $0 = 0\n  }\n  return $0;\n }\n \n function ogg_stream_pagein($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0;\n  $4 = -1;\n  folding_inner0 : {\n   label$1 : {\n    if (!$0) {\n     break label$1\n    }\n    $6 = HEAP32[$0 >> 2];\n    if (!$6) {\n     break label$1\n    }\n    $3 = HEAP32[$1 >> 2];\n    $10 = HEAPU8[$3 + 5 | 0];\n    $5 = HEAP32[$1 + 12 >> 2];\n    $11 = HEAP32[$1 + 8 >> 2];\n    $8 = HEAPU8[$3 + 26 | 0];\n    $13 = HEAPU8[$3 + 18 | 0] | HEAPU8[$3 + 19 | 0] << 8 | (HEAPU8[$3 + 20 | 0] << 16 | HEAPU8[$3 + 21 | 0] << 24);\n    $9 = HEAPU8[$3 + 14 | 0] | HEAPU8[$3 + 15 | 0] << 8 | (HEAPU8[$3 + 16 | 0] << 16 | HEAPU8[$3 + 17 | 0] << 24);\n    $14 = HEAPU8[$3 + 6 | 0] | HEAPU8[$3 + 7 | 0] << 8 | (HEAPU8[$3 + 8 | 0] << 16 | HEAPU8[$3 + 9 | 0] << 24);\n    $15 = HEAPU8[$3 + 10 | 0] | HEAPU8[$3 + 11 | 0] << 8 | (HEAPU8[$3 + 12 | 0] << 16 | HEAPU8[$3 + 13 | 0] << 24);\n    $12 = HEAPU8[$3 + 4 | 0];\n    $2 = HEAP32[$0 + 36 >> 2];\n    $1 = HEAP32[$0 + 12 >> 2];\n    if ($1) {\n     $7 = HEAP32[$0 + 8 >> 2] - $1 | 0;\n     HEAP32[$0 + 8 >> 2] = $7;\n     if ($7) {\n      memmove($6, $1 + $6 | 0, $7)\n     }\n     HEAP32[$0 + 12 >> 2] = 0;\n    }\n    if ($2) {\n     $1 = $0;\n     $6 = HEAP32[$0 + 28 >> 2] - $2 | 0;\n     if ($6) {\n      $7 = HEAP32[$0 + 16 >> 2];\n      memmove($7, $7 + ($2 << 2) | 0, $6 << 2);\n      $6 = HEAP32[$0 + 20 >> 2];\n      memmove($6, $6 + ($2 << 3) | 0, HEAP32[$0 + 28 >> 2] - $2 << 3);\n      $7 = HEAP32[$0 + 28 >> 2] - $2 | 0;\n     } else {\n      $7 = 0\n     }\n     HEAP32[$1 + 28 >> 2] = $7;\n     HEAP32[$0 + 36 >> 2] = 0;\n     HEAP32[$0 + 32 >> 2] = HEAP32[$0 + 32 >> 2] - $2;\n    }\n    if (($9 | 0) != HEAP32[$0 + 336 >> 2] | $12) {\n     break label$1\n    }\n    if (_os_lacing_expand($0, $8 + 1 | 0)) {\n     break label$1\n    }\n    $7 = $10 & 1;\n    $6 = HEAP32[$0 + 340 >> 2];\n    label$7 : {\n     if (($6 | 0) == ($13 | 0)) {\n      break label$7\n     }\n     $2 = HEAP32[$0 + 32 >> 2];\n     $9 = HEAP32[$0 + 28 >> 2];\n     if (($2 | 0) < ($9 | 0)) {\n      $4 = HEAP32[$0 + 8 >> 2];\n      $12 = HEAP32[$0 + 16 >> 2];\n      $1 = $2;\n      while (1) {\n       $4 = $4 - HEAPU8[$12 + ($1 << 2) | 0] | 0;\n       $1 = $1 + 1 | 0;\n       if (($1 | 0) < ($9 | 0)) {\n        continue\n       }\n       break;\n      };\n      HEAP32[$0 + 8 >> 2] = $4;\n     }\n     HEAP32[$0 + 28 >> 2] = $2;\n     if (($6 | 0) == -1) {\n      break label$7\n     }\n     $1 = $2 + 1 | 0;\n     HEAP32[$0 + 28 >> 2] = $1;\n     HEAP32[HEAP32[$0 + 16 >> 2] + ($2 << 2) >> 2] = 1024;\n     HEAP32[$0 + 32 >> 2] = $1;\n    }\n    $6 = $10 & 2;\n    $4 = 0;\n    label$10 : {\n     if (!$7) {\n      break label$10\n     }\n     $1 = HEAP32[$0 + 28 >> 2];\n     if (HEAP32[(HEAP32[$0 + 16 >> 2] + ($1 << 2) | 0) + -4 >> 2] != 1024 ? ($1 | 0) >= 1 : 0) {\n      break label$10\n     }\n     $6 = 0;\n     if (!$8) {\n      break label$10\n     }\n     $1 = 0;\n     while (1) {\n      $4 = $1 + 1 | 0;\n      $1 = HEAPU8[($1 + $3 | 0) + 27 | 0];\n      $5 = $5 - $1 | 0;\n      $11 = $1 + $11 | 0;\n      if (($1 | 0) != 255) {\n       break label$10\n      }\n      $1 = $4;\n      if (($8 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     $4 = $8;\n    }\n    if ($5) {\n     $2 = HEAP32[$0 + 4 >> 2];\n     $1 = HEAP32[$0 + 8 >> 2];\n     label$15 : {\n      if (($2 - $5 | 0) > ($1 | 0)) {\n       $2 = HEAP32[$0 >> 2];\n       break label$15;\n      }\n      if (($2 | 0) > (2147483647 - $5 | 0)) {\n       break folding_inner0\n      }\n      $1 = $2 + $5 | 0;\n      $1 = ($1 | 0) < 2147482623 ? $1 + 1024 | 0 : $1;\n      $2 = dlrealloc(HEAP32[$0 >> 2], $1);\n      if (!$2) {\n       break folding_inner0\n      }\n      HEAP32[$0 >> 2] = $2;\n      HEAP32[$0 + 4 >> 2] = $1;\n      $1 = HEAP32[$0 + 8 >> 2];\n     }\n     memcpy($1 + $2 | 0, $11, $5);\n     HEAP32[$0 + 8 >> 2] = HEAP32[$0 + 8 >> 2] + $5;\n    }\n    $11 = $10 & 4;\n    label$25 : {\n     if (($4 | 0) >= ($8 | 0)) {\n      break label$25\n     }\n     $10 = HEAP32[$0 + 20 >> 2];\n     $7 = HEAP32[$0 + 16 >> 2];\n     $2 = HEAP32[$0 + 28 >> 2];\n     $1 = $7 + ($2 << 2) | 0;\n     $5 = HEAPU8[($3 + $4 | 0) + 27 | 0];\n     HEAP32[$1 >> 2] = $5;\n     $9 = $10 + ($2 << 3) | 0;\n     HEAP32[$9 >> 2] = -1;\n     HEAP32[$9 + 4 >> 2] = -1;\n     if ($6) {\n      HEAP32[$1 >> 2] = $5 | 256\n     }\n     $1 = $2 + 1 | 0;\n     HEAP32[$0 + 28 >> 2] = $1;\n     $4 = $4 + 1 | 0;\n     label$27 : {\n      if (($5 | 0) == 255) {\n       $2 = -1;\n       break label$27;\n      }\n      HEAP32[$0 + 32 >> 2] = $1;\n     }\n     if (($4 | 0) != ($8 | 0)) {\n      while (1) {\n       $6 = HEAPU8[($3 + $4 | 0) + 27 | 0];\n       HEAP32[$7 + ($1 << 2) >> 2] = $6;\n       $5 = $10 + ($1 << 3) | 0;\n       HEAP32[$5 >> 2] = -1;\n       HEAP32[$5 + 4 >> 2] = -1;\n       $5 = $1 + 1 | 0;\n       HEAP32[$0 + 28 >> 2] = $5;\n       $4 = $4 + 1 | 0;\n       if (($6 | 0) != 255) {\n        HEAP32[$0 + 32 >> 2] = $5;\n        $2 = $1;\n       }\n       $1 = $5;\n       if (($4 | 0) != ($8 | 0)) {\n        continue\n       }\n       break;\n      }\n     }\n     if (($2 | 0) == -1) {\n      break label$25\n     }\n     $1 = HEAP32[$0 + 20 >> 2] + ($2 << 3) | 0;\n     HEAP32[$1 >> 2] = $14;\n     HEAP32[$1 + 4 >> 2] = $15;\n    }\n    label$32 : {\n     if (!$11) {\n      break label$32\n     }\n     HEAP32[$0 + 328 >> 2] = 1;\n     $1 = HEAP32[$0 + 28 >> 2];\n     if (($1 | 0) < 1) {\n      break label$32\n     }\n     $1 = (HEAP32[$0 + 16 >> 2] + ($1 << 2) | 0) + -4 | 0;\n     HEAP32[$1 >> 2] = HEAP32[$1 >> 2] | 512;\n    }\n    HEAP32[$0 + 340 >> 2] = $13 + 1;\n    $4 = 0;\n   }\n   return $4;\n  }\n  $1 = HEAP32[$0 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  $1 = HEAP32[$0 + 16 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  $1 = HEAP32[$0 + 20 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  memset($0, 360);\n  return -1;\n }\n \n function ogg_sync_reset($0) {\n  if (HEAP32[$0 + 4 >> 2] < 0) {\n   return\n  }\n  HEAP32[$0 + 8 >> 2] = 0;\n  HEAP32[$0 + 12 >> 2] = 0;\n  HEAP32[$0 + 24 >> 2] = 0;\n  HEAP32[$0 + 16 >> 2] = 0;\n  HEAP32[$0 + 20 >> 2] = 0;\n }\n \n function ogg_stream_reset($0) {\n  if (!$0 | !HEAP32[$0 >> 2]) {\n   $0 = -1\n  } else {\n   HEAP32[$0 + 344 >> 2] = 0;\n   HEAP32[$0 + 348 >> 2] = 0;\n   HEAP32[$0 + 340 >> 2] = -1;\n   HEAP32[$0 + 332 >> 2] = 0;\n   HEAP32[$0 + 324 >> 2] = 0;\n   HEAP32[$0 + 328 >> 2] = 0;\n   HEAP32[$0 + 36 >> 2] = 0;\n   HEAP32[$0 + 28 >> 2] = 0;\n   HEAP32[$0 + 32 >> 2] = 0;\n   HEAP32[$0 + 8 >> 2] = 0;\n   HEAP32[$0 + 12 >> 2] = 0;\n   HEAP32[$0 + 352 >> 2] = 0;\n   HEAP32[$0 + 356 >> 2] = 0;\n   $0 = 0;\n  }\n }\n \n function ogg_stream_packetout($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;\n  label$1 : {\n   if (!$0) {\n    break label$1\n   }\n   $8 = HEAP32[$0 >> 2];\n   if (!$8) {\n    break label$1\n   }\n   $5 = HEAP32[$0 + 36 >> 2];\n   if (HEAP32[$0 + 32 >> 2] <= ($5 | 0)) {\n    break label$1\n   }\n   $3 = HEAP32[$0 + 16 >> 2];\n   $6 = HEAP32[$3 + ($5 << 2) >> 2];\n   if ($6 & 1024) {\n    HEAP32[$0 + 36 >> 2] = $5 + 1;\n    $1 = $0;\n    $3 = $0;\n    $2 = HEAP32[$0 + 348 >> 2];\n    $0 = HEAP32[$0 + 344 >> 2] + 1 | 0;\n    if ($0 >>> 0 < 1) {\n     $2 = $2 + 1 | 0\n    }\n    HEAP32[$3 + 344 >> 2] = $0;\n    HEAP32[$1 + 348 >> 2] = $2;\n    return -1;\n   }\n   $4 = $6 & 512;\n   $7 = 255;\n   $2 = $6 & 255;\n   label$3 : {\n    if (($2 | 0) != 255) {\n     $7 = $2;\n     break label$3;\n    }\n    while (1) {\n     $5 = $5 + 1 | 0;\n     $2 = HEAP32[($5 << 2) + $3 >> 2];\n     $4 = $2 & 512 ? 512 : $4;\n     $2 = $2 & 255;\n     $7 = $2 + $7 | 0;\n     if (($2 | 0) == 255) {\n      continue\n     }\n     break;\n    };\n   }\n   label$6 : {\n    if (!$1) {\n     $4 = HEAP32[$0 + 344 >> 2];\n     $2 = HEAP32[$0 + 348 >> 2];\n     $6 = HEAP32[$0 + 12 >> 2];\n     break label$6;\n    }\n    HEAP32[$1 + 8 >> 2] = $6 & 256;\n    HEAP32[$1 + 12 >> 2] = $4;\n    $6 = HEAP32[$0 + 12 >> 2];\n    HEAP32[$1 >> 2] = $8 + $6;\n    $3 = HEAP32[$0 + 348 >> 2];\n    $2 = $3;\n    $4 = HEAP32[$0 + 344 >> 2];\n    HEAP32[$1 + 24 >> 2] = $4;\n    HEAP32[$1 + 28 >> 2] = $2;\n    $3 = HEAP32[$0 + 20 >> 2] + ($5 << 3) | 0;\n    $8 = HEAP32[$3 + 4 >> 2];\n    $3 = HEAP32[$3 >> 2];\n    HEAP32[$1 + 4 >> 2] = $7;\n    HEAP32[$1 + 16 >> 2] = $3;\n    HEAP32[$1 + 20 >> 2] = $8;\n   }\n   $3 = $4 + 1 | 0;\n   if ($3 >>> 0 < 1) {\n    $2 = $2 + 1 | 0\n   }\n   HEAP32[$0 + 344 >> 2] = $3;\n   HEAP32[$0 + 348 >> 2] = $2;\n   $4 = 1;\n   HEAP32[$0 + 36 >> 2] = $5 + 1;\n   HEAP32[$0 + 12 >> 2] = $6 + $7;\n  }\n  return $4;\n }\n \n function FLAC__ogg_decoder_aspect_init($0) {\n  var $1 = 0;\n  label$1 : {\n   if (ogg_stream_init($0 + 8 | 0, HEAP32[$0 + 4 >> 2])) {\n    break label$1\n   }\n   if (ogg_sync_init($0 + 368 | 0)) {\n    break label$1\n   }\n   HEAP32[$0 + 396 >> 2] = -1;\n   HEAP32[$0 + 400 >> 2] = -1;\n   HEAP32[$0 + 408 >> 2] = 0;\n   HEAP32[$0 + 412 >> 2] = 0;\n   HEAP32[$0 + 404 >> 2] = HEAP32[$0 >> 2];\n   $1 = 1;\n  }\n  return $1;\n }\n \n function FLAC__ogg_decoder_aspect_set_defaults($0) {\n  HEAP32[$0 >> 2] = 1;\n }\n \n function FLAC__ogg_decoder_aspect_reset($0) {\n  ogg_stream_reset($0 + 8 | 0);\n  ogg_sync_reset($0 + 368 | 0);\n  HEAP32[$0 + 408 >> 2] = 0;\n  HEAP32[$0 + 412 >> 2] = 0;\n  if (HEAP32[$0 >> 2]) {\n   HEAP32[$0 + 404 >> 2] = 1\n  }\n }\n \n function FLAC__ogg_decoder_aspect_read_callback_wrapper($0, $1, $2, $3, $4) {\n  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0;\n  $8 = global$0 - 16 | 0;\n  global$0 = $8;\n  $9 = HEAP32[$2 >> 2];\n  HEAP32[$2 >> 2] = 0;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     if (!$9) {\n      break label$3\n     }\n     $10 = $0 + 416 | 0;\n     $11 = $0 + 368 | 0;\n     $13 = $0 + 440 | 0;\n     $14 = $0 + 8 | 0;\n     $15 = HEAP32[2721];\n     $16 = HEAPU8[7536];\n     while (1) {\n      if (HEAP32[$0 + 408 >> 2]) {\n       break label$3\n      }\n      label$5 : {\n       label$6 : {\n        if (HEAP32[$0 + 412 >> 2]) {\n         if (HEAP32[$0 + 432 >> 2]) {\n          $7 = HEAP32[$0 + 440 >> 2];\n          $6 = HEAP32[$0 + 444 >> 2];\n          $5 = $9 - $5 | 0;\n          if ($6 >>> 0 > $5 >>> 0) {\n           break label$6\n          }\n          $1 = memcpy($1, $7, $6);\n          HEAP32[$2 >> 2] = $6 + HEAP32[$2 >> 2];\n          HEAP32[$0 + 432 >> 2] = 0;\n          $1 = $1 + $6 | 0;\n          break label$5;\n         }\n         $5 = ogg_stream_packetout($14, $13);\n         if (($5 | 0) >= 1) {\n          HEAP32[$0 + 432 >> 2] = 1;\n          $12 = HEAP32[$0 + 444 >> 2];\n          if (($12 | 0) < 1) {\n           break label$5\n          }\n          $6 = HEAP32[$13 >> 2];\n          if (HEAPU8[$6 | 0] != ($16 | 0)) {\n           break label$5\n          }\n          $7 = 3;\n          if (($12 | 0) < 9) {\n           break label$1\n          }\n          $5 = $15;\n          if ((HEAPU8[$6 + 1 | 0] | HEAPU8[$6 + 2 | 0] << 8 | (HEAPU8[$6 + 3 | 0] << 16 | HEAPU8[$6 + 4 | 0] << 24)) != (HEAPU8[$5 | 0] | HEAPU8[$5 + 1 | 0] << 8 | (HEAPU8[$5 + 2 | 0] << 16 | HEAPU8[$5 + 3 | 0] << 24))) {\n           break label$1\n          }\n          $5 = HEAPU8[$6 + 5 | 0];\n          HEAP32[$0 + 396 >> 2] = $5;\n          HEAP32[$0 + 400 >> 2] = HEAPU8[$6 + 6 | 0];\n          if (($5 | 0) != 1) {\n           $7 = 4;\n           break label$1;\n          }\n          HEAP32[$0 + 444 >> 2] = $12 + -9;\n          HEAP32[$0 + 440 >> 2] = $6 + 9;\n          break label$5;\n         }\n         if ($5) {\n          $7 = 2;\n          break label$1;\n         }\n         HEAP32[$0 + 412 >> 2] = 0;\n         break label$5;\n        }\n        $5 = ogg_sync_pageout($11, $10);\n        if (($5 | 0) >= 1) {\n         if (HEAP32[$0 + 404 >> 2]) {\n          $5 = ogg_page_serialno($10);\n          HEAP32[$0 + 404 >> 2] = 0;\n          HEAP32[$0 + 344 >> 2] = $5;\n          HEAP32[$0 + 4 >> 2] = $5;\n         }\n         if (ogg_stream_pagein($14, $10)) {\n          break label$5\n         }\n         HEAP32[$0 + 432 >> 2] = 0;\n         HEAP32[$0 + 412 >> 2] = 1;\n         break label$5;\n        }\n        if ($5) {\n         $7 = 2;\n         break label$1;\n        }\n        $5 = $9 - HEAP32[$2 >> 2] | 0;\n        $5 = $5 >>> 0 > 8192 ? $5 : 8192;\n        $6 = ogg_sync_buffer($11, $5);\n        if (!$6) {\n         $7 = 7;\n         break label$1;\n        }\n        HEAP32[$8 + 12 >> 2] = $5;\n        label$16 : {\n         switch ((FUNCTION_TABLE[8]($3, $6, $8 + 12 | 0, $4) | 0) + -1 | 0) {\n         case 0:\n          HEAP32[$0 + 408 >> 2] = 1;\n          break;\n         case 4:\n          break label$2;\n         default:\n          break label$16;\n         };\n        }\n        if ((ogg_sync_wrote($11, HEAP32[$8 + 12 >> 2]) | 0) >= 0) {\n         break label$5\n        }\n        $7 = 6;\n        break label$1;\n       }\n       $1 = memcpy($1, $7, $5);\n       HEAP32[$2 >> 2] = $5 + HEAP32[$2 >> 2];\n       HEAP32[$0 + 440 >> 2] = $5 + HEAP32[$0 + 440 >> 2];\n       HEAP32[$0 + 444 >> 2] = HEAP32[$0 + 444 >> 2] - $5;\n       $1 = $1 + $5 | 0;\n      }\n      $5 = HEAP32[$2 >> 2];\n      if ($9 >>> 0 > $5 >>> 0) {\n       continue\n      }\n      break;\n     };\n    }\n    global$0 = $8 + 16 | 0;\n    return !$5 & HEAP32[$0 + 408 >> 2] != 0;\n   }\n   $7 = 5;\n  }\n  global$0 = $8 + 16 | 0;\n  return $7;\n }\n \n function FLAC__MD5Init($0) {\n  HEAP32[$0 + 80 >> 2] = 0;\n  HEAP32[$0 + 84 >> 2] = 0;\n  HEAP32[$0 + 64 >> 2] = 1732584193;\n  HEAP32[$0 + 68 >> 2] = -271733879;\n  HEAP32[$0 + 72 >> 2] = -1732584194;\n  HEAP32[$0 + 76 >> 2] = 271733878;\n  HEAP32[$0 + 88 >> 2] = 0;\n  HEAP32[$0 + 92 >> 2] = 0;\n }\n \n function FLAC__MD5Final($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0;\n  $3 = HEAP32[$1 + 80 >> 2] & 63;\n  $2 = $3 + $1 | 0;\n  HEAP8[$2 | 0] = 128;\n  $2 = $2 + 1 | 0;\n  $4 = 56;\n  label$1 : {\n   if ($3 >>> 0 < 56) {\n    $4 = 55 - $3 | 0;\n    break label$1;\n   }\n   memset($2, $3 ^ 63);\n   FLAC__MD5Transform($1 - -64 | 0, $1);\n   $2 = $1;\n  }\n  memset($2, $4);\n  $2 = HEAP32[$1 + 80 >> 2];\n  HEAP32[$1 + 56 >> 2] = $2 << 3;\n  HEAP32[$1 + 60 >> 2] = HEAP32[$1 + 84 >> 2] << 3 | $2 >>> 29;\n  FLAC__MD5Transform($1 - -64 | 0, $1);\n  $2 = HEAPU8[$1 + 76 | 0] | HEAPU8[$1 + 77 | 0] << 8 | (HEAPU8[$1 + 78 | 0] << 16 | HEAPU8[$1 + 79 | 0] << 24);\n  $3 = HEAPU8[$1 + 72 | 0] | HEAPU8[$1 + 73 | 0] << 8 | (HEAPU8[$1 + 74 | 0] << 16 | HEAPU8[$1 + 75 | 0] << 24);\n  HEAP8[$0 + 8 | 0] = $3;\n  HEAP8[$0 + 9 | 0] = $3 >>> 8;\n  HEAP8[$0 + 10 | 0] = $3 >>> 16;\n  HEAP8[$0 + 11 | 0] = $3 >>> 24;\n  HEAP8[$0 + 12 | 0] = $2;\n  HEAP8[$0 + 13 | 0] = $2 >>> 8;\n  HEAP8[$0 + 14 | 0] = $2 >>> 16;\n  HEAP8[$0 + 15 | 0] = $2 >>> 24;\n  $2 = HEAPU8[$1 + 68 | 0] | HEAPU8[$1 + 69 | 0] << 8 | (HEAPU8[$1 + 70 | 0] << 16 | HEAPU8[$1 + 71 | 0] << 24);\n  $3 = HEAPU8[$1 + 64 | 0] | HEAPU8[$1 + 65 | 0] << 8 | (HEAPU8[$1 + 66 | 0] << 16 | HEAPU8[$1 + 67 | 0] << 24);\n  HEAP8[$0 | 0] = $3;\n  HEAP8[$0 + 1 | 0] = $3 >>> 8;\n  HEAP8[$0 + 2 | 0] = $3 >>> 16;\n  HEAP8[$0 + 3 | 0] = $3 >>> 24;\n  HEAP8[$0 + 4 | 0] = $2;\n  HEAP8[$0 + 5 | 0] = $2 >>> 8;\n  HEAP8[$0 + 6 | 0] = $2 >>> 16;\n  HEAP8[$0 + 7 | 0] = $2 >>> 24;\n  $0 = HEAP32[$1 + 88 >> 2];\n  if ($0) {\n   dlfree($0);\n   HEAP32[$1 + 88 >> 2] = 0;\n   HEAP32[$1 + 92 >> 2] = 0;\n  }\n  memset($1, 96);\n }\n \n function FLAC__MD5Transform($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;\n  $11 = HEAP32[$1 + 16 >> 2];\n  $8 = HEAP32[$1 + 32 >> 2];\n  $12 = HEAP32[$1 + 48 >> 2];\n  $13 = HEAP32[$1 + 36 >> 2];\n  $14 = HEAP32[$1 + 52 >> 2];\n  $15 = HEAP32[$1 + 4 >> 2];\n  $6 = HEAP32[$1 + 20 >> 2];\n  $7 = HEAP32[$0 + 4 >> 2];\n  $9 = HEAP32[$1 >> 2];\n  $25 = HEAP32[$0 >> 2];\n  $16 = HEAP32[$0 + 12 >> 2];\n  $10 = HEAP32[$0 + 8 >> 2];\n  $3 = $7 + __wasm_rotl_i32((($9 + $25 | 0) + ($16 ^ ($16 ^ $10) & $7) | 0) + -680876936 | 0, 7) | 0;\n  $17 = HEAP32[$1 + 12 >> 2];\n  $18 = HEAP32[$1 + 8 >> 2];\n  $4 = __wasm_rotl_i32((($15 + $16 | 0) + ($3 & ($7 ^ $10) ^ $10) | 0) + -389564586 | 0, 12) + $3 | 0;\n  $2 = __wasm_rotl_i32((($18 + $10 | 0) + ($4 & ($3 ^ $7) ^ $7) | 0) + 606105819 | 0, 17) + $4 | 0;\n  $5 = __wasm_rotl_i32((($7 + $17 | 0) + ($3 ^ $2 & ($3 ^ $4)) | 0) + -1044525330 | 0, 22) + $2 | 0;\n  $3 = __wasm_rotl_i32((($3 + $11 | 0) + ($4 ^ $5 & ($2 ^ $4)) | 0) + -176418897 | 0, 7) + $5 | 0;\n  $19 = HEAP32[$1 + 28 >> 2];\n  $20 = HEAP32[$1 + 24 >> 2];\n  $4 = __wasm_rotl_i32((($4 + $6 | 0) + ($2 ^ $3 & ($2 ^ $5)) | 0) + 1200080426 | 0, 12) + $3 | 0;\n  $2 = __wasm_rotl_i32((($2 + $20 | 0) + ($5 ^ $4 & ($3 ^ $5)) | 0) + -1473231341 | 0, 17) + $4 | 0;\n  $5 = __wasm_rotl_i32((($5 + $19 | 0) + ($3 ^ $2 & ($3 ^ $4)) | 0) + -45705983 | 0, 22) + $2 | 0;\n  $3 = __wasm_rotl_i32((($3 + $8 | 0) + ($4 ^ $5 & ($2 ^ $4)) | 0) + 1770035416 | 0, 7) + $5 | 0;\n  $21 = HEAP32[$1 + 44 >> 2];\n  $22 = HEAP32[$1 + 40 >> 2];\n  $4 = __wasm_rotl_i32((($4 + $13 | 0) + ($2 ^ $3 & ($2 ^ $5)) | 0) + -1958414417 | 0, 12) + $3 | 0;\n  $2 = __wasm_rotl_i32((($2 + $22 | 0) + ($5 ^ $4 & ($3 ^ $5)) | 0) + -42063 | 0, 17) + $4 | 0;\n  $5 = __wasm_rotl_i32((($5 + $21 | 0) + ($3 ^ $2 & ($3 ^ $4)) | 0) + -1990404162 | 0, 22) + $2 | 0;\n  $3 = __wasm_rotl_i32((($3 + $12 | 0) + ($4 ^ $5 & ($2 ^ $4)) | 0) + 1804603682 | 0, 7) + $5 | 0;\n  $23 = HEAP32[$1 + 56 >> 2];\n  $24 = HEAP32[$1 + 60 >> 2];\n  $4 = __wasm_rotl_i32((($4 + $14 | 0) + ($2 ^ $3 & ($2 ^ $5)) | 0) + -40341101 | 0, 12) + $3 | 0;\n  $1 = $4 + __wasm_rotl_i32((($2 + $23 | 0) + ($5 ^ ($3 ^ $5) & $4) | 0) + -1502002290 | 0, 17) | 0;\n  $26 = $1 + $21 | 0;\n  $2 = $3 + $15 | 0;\n  $3 = __wasm_rotl_i32((($5 + $24 | 0) + ($3 ^ $1 & ($3 ^ $4)) | 0) + 1236535329 | 0, 22) + $1 | 0;\n  $2 = __wasm_rotl_i32(($2 + ($1 ^ ($3 ^ $1) & $4) | 0) + -165796510 | 0, 5) + $3 | 0;\n  $1 = __wasm_rotl_i32((($4 + $20 | 0) + ($3 ^ $1 & ($3 ^ $2)) | 0) + -1069501632 | 0, 9) + $2 | 0;\n  $4 = __wasm_rotl_i32(($26 + (($2 ^ $1) & $3 ^ $2) | 0) + 643717713 | 0, 14) + $1 | 0;\n  $3 = __wasm_rotl_i32((($3 + $9 | 0) + ($1 ^ $2 & ($1 ^ $4)) | 0) + -373897302 | 0, 20) + $4 | 0;\n  $2 = __wasm_rotl_i32((($2 + $6 | 0) + ($4 ^ $1 & ($3 ^ $4)) | 0) + -701558691 | 0, 5) + $3 | 0;\n  $1 = __wasm_rotl_i32((($1 + $22 | 0) + ($3 ^ $4 & ($3 ^ $2)) | 0) + 38016083 | 0, 9) + $2 | 0;\n  $4 = __wasm_rotl_i32((($24 + $4 | 0) + (($2 ^ $1) & $3 ^ $2) | 0) + -660478335 | 0, 14) + $1 | 0;\n  $3 = __wasm_rotl_i32((($3 + $11 | 0) + ($1 ^ $2 & ($1 ^ $4)) | 0) + -405537848 | 0, 20) + $4 | 0;\n  $2 = __wasm_rotl_i32((($2 + $13 | 0) + ($4 ^ $1 & ($3 ^ $4)) | 0) + 568446438 | 0, 5) + $3 | 0;\n  $1 = __wasm_rotl_i32((($1 + $23 | 0) + ($3 ^ $4 & ($3 ^ $2)) | 0) + -1019803690 | 0, 9) + $2 | 0;\n  $4 = __wasm_rotl_i32((($4 + $17 | 0) + (($2 ^ $1) & $3 ^ $2) | 0) + -187363961 | 0, 14) + $1 | 0;\n  $3 = __wasm_rotl_i32((($3 + $8 | 0) + ($1 ^ $2 & ($1 ^ $4)) | 0) + 1163531501 | 0, 20) + $4 | 0;\n  $2 = __wasm_rotl_i32((($2 + $14 | 0) + ($4 ^ $1 & ($3 ^ $4)) | 0) + -1444681467 | 0, 5) + $3 | 0;\n  $1 = __wasm_rotl_i32((($1 + $18 | 0) + ($3 ^ $4 & ($3 ^ $2)) | 0) + -51403784 | 0, 9) + $2 | 0;\n  $4 = __wasm_rotl_i32((($4 + $19 | 0) + (($2 ^ $1) & $3 ^ $2) | 0) + 1735328473 | 0, 14) + $1 | 0;\n  $5 = $1 ^ $4;\n  $3 = __wasm_rotl_i32((($3 + $12 | 0) + ($1 ^ $5 & $2) | 0) + -1926607734 | 0, 20) + $4 | 0;\n  $2 = __wasm_rotl_i32((($2 + $6 | 0) + ($3 ^ $5) | 0) + -378558 | 0, 4) + $3 | 0;\n  $1 = __wasm_rotl_i32((($1 + $8 | 0) + ($3 ^ $4 ^ $2) | 0) + -2022574463 | 0, 11) + $2 | 0;\n  $4 = __wasm_rotl_i32((($4 + $21 | 0) + ($1 ^ ($3 ^ $2)) | 0) + 1839030562 | 0, 16) + $1 | 0;\n  $3 = __wasm_rotl_i32((($3 + $23 | 0) + ($4 ^ ($1 ^ $2)) | 0) + -35309556 | 0, 23) + $4 | 0;\n  $2 = __wasm_rotl_i32((($2 + $15 | 0) + ($3 ^ ($1 ^ $4)) | 0) + -1530992060 | 0, 4) + $3 | 0;\n  $1 = __wasm_rotl_i32((($1 + $11 | 0) + ($2 ^ ($3 ^ $4)) | 0) + 1272893353 | 0, 11) + $2 | 0;\n  $4 = __wasm_rotl_i32((($4 + $19 | 0) + ($1 ^ ($3 ^ $2)) | 0) + -155497632 | 0, 16) + $1 | 0;\n  $3 = __wasm_rotl_i32((($3 + $22 | 0) + ($4 ^ ($1 ^ $2)) | 0) + -1094730640 | 0, 23) + $4 | 0;\n  $2 = __wasm_rotl_i32((($2 + $14 | 0) + ($3 ^ ($1 ^ $4)) | 0) + 681279174 | 0, 4) + $3 | 0;\n  $1 = __wasm_rotl_i32((($1 + $9 | 0) + ($2 ^ ($3 ^ $4)) | 0) + -358537222 | 0, 11) + $2 | 0;\n  $4 = __wasm_rotl_i32((($4 + $17 | 0) + ($1 ^ ($3 ^ $2)) | 0) + -722521979 | 0, 16) + $1 | 0;\n  $3 = __wasm_rotl_i32((($3 + $20 | 0) + ($4 ^ ($1 ^ $2)) | 0) + 76029189 | 0, 23) + $4 | 0;\n  $2 = __wasm_rotl_i32((($2 + $13 | 0) + ($3 ^ ($1 ^ $4)) | 0) + -640364487 | 0, 4) + $3 | 0;\n  $1 = __wasm_rotl_i32((($1 + $12 | 0) + ($2 ^ ($3 ^ $4)) | 0) + -421815835 | 0, 11) + $2 | 0;\n  $5 = $2 + $9 | 0;\n  $9 = $1 ^ $2;\n  $2 = __wasm_rotl_i32((($4 + $24 | 0) + ($1 ^ ($3 ^ $2)) | 0) + 530742520 | 0, 16) + $1 | 0;\n  $4 = __wasm_rotl_i32((($3 + $18 | 0) + ($9 ^ $2) | 0) + -995338651 | 0, 23) + $2 | 0;\n  $3 = __wasm_rotl_i32(($5 + (($4 | $1 ^ -1) ^ $2) | 0) + -198630844 | 0, 6) + $4 | 0;\n  $5 = $4 + $6 | 0;\n  $6 = $2 + $23 | 0;\n  $2 = __wasm_rotl_i32((($1 + $19 | 0) + ($4 ^ ($3 | $2 ^ -1)) | 0) + 1126891415 | 0, 10) + $3 | 0;\n  $4 = __wasm_rotl_i32(($6 + ($3 ^ ($2 | $4 ^ -1)) | 0) + -1416354905 | 0, 15) + $2 | 0;\n  $1 = __wasm_rotl_i32(($5 + (($4 | $3 ^ -1) ^ $2) | 0) + -57434055 | 0, 21) + $4 | 0;\n  $5 = $4 + $22 | 0;\n  $6 = $2 + $17 | 0;\n  $2 = __wasm_rotl_i32((($3 + $12 | 0) + ($4 ^ ($1 | $2 ^ -1)) | 0) + 1700485571 | 0, 6) + $1 | 0;\n  $4 = __wasm_rotl_i32(($6 + ($1 ^ ($2 | $4 ^ -1)) | 0) + -1894986606 | 0, 10) + $2 | 0;\n  $3 = __wasm_rotl_i32(($5 + (($4 | $1 ^ -1) ^ $2) | 0) + -1051523 | 0, 15) + $4 | 0;\n  $5 = $4 + $24 | 0;\n  $8 = $2 + $8 | 0;\n  $2 = __wasm_rotl_i32((($1 + $15 | 0) + ($4 ^ ($3 | $2 ^ -1)) | 0) + -2054922799 | 0, 21) + $3 | 0;\n  $4 = __wasm_rotl_i32(($8 + ($3 ^ ($2 | $4 ^ -1)) | 0) + 1873313359 | 0, 6) + $2 | 0;\n  $1 = __wasm_rotl_i32(($5 + (($4 | $3 ^ -1) ^ $2) | 0) + -30611744 | 0, 10) + $4 | 0;\n  $3 = __wasm_rotl_i32((($3 + $20 | 0) + ($4 ^ ($1 | $2 ^ -1)) | 0) + -1560198380 | 0, 15) + $1 | 0;\n  $2 = __wasm_rotl_i32((($2 + $14 | 0) + ($1 ^ ($3 | $4 ^ -1)) | 0) + 1309151649 | 0, 21) + $3 | 0;\n  $4 = __wasm_rotl_i32((($4 + $11 | 0) + (($2 | $1 ^ -1) ^ $3) | 0) + -145523070 | 0, 6) + $2 | 0;\n  HEAP32[$0 >> 2] = $4 + $25;\n  $1 = __wasm_rotl_i32((($1 + $21 | 0) + ($2 ^ ($4 | $3 ^ -1)) | 0) + -1120210379 | 0, 10) + $4 | 0;\n  HEAP32[$0 + 12 >> 2] = $1 + $16;\n  $3 = __wasm_rotl_i32((($3 + $18 | 0) + ($4 ^ ($1 | $2 ^ -1)) | 0) + 718787259 | 0, 15) + $1 | 0;\n  HEAP32[$0 + 8 >> 2] = $3 + $10;\n  (wasm2js_i32$0 = $0, wasm2js_i32$1 = __wasm_rotl_i32((($2 + $13 | 0) + ($1 ^ ($3 | $4 ^ -1)) | 0) + -343485551 | 0, 21) + ($3 + $7 | 0) | 0), HEAP32[wasm2js_i32$0 + 4 >> 2] = wasm2js_i32$1;\n }\n \n function FLAC__MD5Accumulate($0, $1, $2, $3, $4) {\n  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0;\n  __wasm_i64_mul($4, 0, $2, 0);\n  label$1 : {\n   if (i64toi32_i32$HIGH_BITS) {\n    break label$1\n   }\n   $7 = Math_imul($2, $4);\n   __wasm_i64_mul($3, 0, $7, 0);\n   if (i64toi32_i32$HIGH_BITS) {\n    break label$1\n   }\n   $6 = HEAP32[$0 + 88 >> 2];\n   $11 = Math_imul($3, $7);\n   label$2 : {\n    if (HEAPU32[$0 + 92 >> 2] >= $11 >>> 0) {\n     $5 = $6;\n     break label$2;\n    }\n    $5 = dlrealloc($6, $11);\n    label$4 : {\n     if (!$5) {\n      dlfree($6);\n      $5 = dlmalloc($11);\n      HEAP32[$0 + 88 >> 2] = $5;\n      if ($5) {\n       break label$4\n      }\n      HEAP32[$0 + 92 >> 2] = 0;\n      return 0;\n     }\n     HEAP32[$0 + 88 >> 2] = $5;\n    }\n    HEAP32[$0 + 92 >> 2] = $11;\n   }\n   label$6 : {\n    label$7 : {\n     label$8 : {\n      label$9 : {\n       label$10 : {\n        label$11 : {\n         label$12 : {\n          label$13 : {\n           label$14 : {\n            label$15 : {\n             label$16 : {\n              label$17 : {\n               $6 = Math_imul($4, 100) + $2 | 0;\n               if (($6 | 0) <= 300) {\n                label$19 : {\n                 switch ($6 + -101 | 0) {\n                 case 3:\n                  break label$10;\n                 case 5:\n                  break label$11;\n                 case 7:\n                  break label$12;\n                 case 2:\n                 case 4:\n                 case 6:\n                  break label$7;\n                 case 0:\n                  break label$8;\n                 case 1:\n                  break label$9;\n                 default:\n                  break label$19;\n                 };\n                }\n                switch ($6 + -201 | 0) {\n                case 0:\n                 break label$13;\n                case 1:\n                 break label$14;\n                case 3:\n                 break label$15;\n                case 5:\n                 break label$16;\n                case 7:\n                 break label$17;\n                default:\n                 break label$7;\n                };\n               }\n               label$20 : {\n                label$21 : {\n                 label$22 : {\n                  switch ($6 + -401 | 0) {\n                  default:\n                   switch ($6 + -301 | 0) {\n                   case 0:\n                    break label$20;\n                   case 1:\n                    break label$21;\n                   default:\n                    break label$7;\n                   };\n                  case 7:\n                   if (!$3) {\n                    break label$6\n                   }\n                   $13 = HEAP32[$1 + 28 >> 2];\n                   $8 = HEAP32[$1 + 24 >> 2];\n                   $12 = HEAP32[$1 + 20 >> 2];\n                   $7 = HEAP32[$1 + 16 >> 2];\n                   $10 = HEAP32[$1 + 12 >> 2];\n                   $6 = HEAP32[$1 + 8 >> 2];\n                   $4 = HEAP32[$1 + 4 >> 2];\n                   $1 = HEAP32[$1 >> 2];\n                   $2 = 0;\n                   while (1) {\n                    $9 = $2 << 2;\n                    HEAP32[$5 >> 2] = HEAP32[$9 + $1 >> 2];\n                    HEAP32[$5 + 4 >> 2] = HEAP32[$4 + $9 >> 2];\n                    HEAP32[$5 + 8 >> 2] = HEAP32[$6 + $9 >> 2];\n                    HEAP32[$5 + 12 >> 2] = HEAP32[$10 + $9 >> 2];\n                    HEAP32[$5 + 16 >> 2] = HEAP32[$7 + $9 >> 2];\n                    HEAP32[$5 + 20 >> 2] = HEAP32[$9 + $12 >> 2];\n                    HEAP32[$5 + 24 >> 2] = HEAP32[$8 + $9 >> 2];\n                    HEAP32[$5 + 28 >> 2] = HEAP32[$9 + $13 >> 2];\n                    $5 = $5 + 32 | 0;\n                    $2 = $2 + 1 | 0;\n                    if (($3 | 0) != ($2 | 0)) {\n                     continue\n                    }\n                    break;\n                   };\n                   break label$6;\n                  case 5:\n                   if (!$3) {\n                    break label$6\n                   }\n                   $12 = HEAP32[$1 + 20 >> 2];\n                   $7 = HEAP32[$1 + 16 >> 2];\n                   $10 = HEAP32[$1 + 12 >> 2];\n                   $6 = HEAP32[$1 + 8 >> 2];\n                   $4 = HEAP32[$1 + 4 >> 2];\n                   $1 = HEAP32[$1 >> 2];\n                   $2 = 0;\n                   while (1) {\n                    $8 = $2 << 2;\n                    HEAP32[$5 >> 2] = HEAP32[$8 + $1 >> 2];\n                    HEAP32[$5 + 4 >> 2] = HEAP32[$4 + $8 >> 2];\n                    HEAP32[$5 + 8 >> 2] = HEAP32[$6 + $8 >> 2];\n                    HEAP32[$5 + 12 >> 2] = HEAP32[$8 + $10 >> 2];\n                    HEAP32[$5 + 16 >> 2] = HEAP32[$7 + $8 >> 2];\n                    HEAP32[$5 + 20 >> 2] = HEAP32[$8 + $12 >> 2];\n                    $5 = $5 + 24 | 0;\n                    $2 = $2 + 1 | 0;\n                    if (($3 | 0) != ($2 | 0)) {\n                     continue\n                    }\n                    break;\n                   };\n                   break label$6;\n                  case 3:\n                   if (!$3) {\n                    break label$6\n                   }\n                   $10 = HEAP32[$1 + 12 >> 2];\n                   $6 = HEAP32[$1 + 8 >> 2];\n                   $4 = HEAP32[$1 + 4 >> 2];\n                   $1 = HEAP32[$1 >> 2];\n                   $2 = 0;\n                   while (1) {\n                    $7 = $2 << 2;\n                    HEAP32[$5 >> 2] = HEAP32[$7 + $1 >> 2];\n                    HEAP32[$5 + 4 >> 2] = HEAP32[$4 + $7 >> 2];\n                    HEAP32[$5 + 8 >> 2] = HEAP32[$6 + $7 >> 2];\n                    HEAP32[$5 + 12 >> 2] = HEAP32[$7 + $10 >> 2];\n                    $5 = $5 + 16 | 0;\n                    $2 = $2 + 1 | 0;\n                    if (($3 | 0) != ($2 | 0)) {\n                     continue\n                    }\n                    break;\n                   };\n                   break label$6;\n                  case 1:\n                   if (!$3) {\n                    break label$6\n                   }\n                   $6 = HEAP32[$1 + 4 >> 2];\n                   $4 = HEAP32[$1 >> 2];\n                   $1 = 0;\n                   while (1) {\n                    $2 = $1 << 2;\n                    HEAP32[$5 >> 2] = HEAP32[$2 + $4 >> 2];\n                    HEAP32[$5 + 4 >> 2] = HEAP32[$2 + $6 >> 2];\n                    $5 = $5 + 8 | 0;\n                    $1 = $1 + 1 | 0;\n                    if (($3 | 0) != ($1 | 0)) {\n                     continue\n                    }\n                    break;\n                   };\n                   break label$6;\n                  case 0:\n                   break label$22;\n                  case 2:\n                  case 4:\n                  case 6:\n                   break label$7;\n                  };\n                 }\n                 if (!$3) {\n                  break label$6\n                 }\n                 $2 = HEAP32[$1 >> 2];\n                 $1 = 0;\n                 while (1) {\n                  HEAP32[$5 >> 2] = HEAP32[$2 + ($1 << 2) >> 2];\n                  $5 = $5 + 4 | 0;\n                  $1 = $1 + 1 | 0;\n                  if (($3 | 0) != ($1 | 0)) {\n                   continue\n                  }\n                  break;\n                 };\n                 break label$6;\n                }\n                if (!$3) {\n                 break label$6\n                }\n                $2 = 0;\n                while (1) {\n                 $4 = $2 << 2;\n                 $6 = HEAP32[$4 + HEAP32[$1 >> 2] >> 2];\n                 HEAP8[$5 | 0] = $6;\n                 HEAP8[$5 + 2 | 0] = $6 >>> 16;\n                 HEAP8[$5 + 1 | 0] = $6 >>> 8;\n                 $4 = HEAP32[$4 + HEAP32[$1 + 4 >> 2] >> 2];\n                 HEAP8[$5 + 3 | 0] = $4;\n                 HEAP8[$5 + 5 | 0] = $4 >>> 16;\n                 HEAP8[$5 + 4 | 0] = $4 >>> 8;\n                 $5 = $5 + 6 | 0;\n                 $2 = $2 + 1 | 0;\n                 if (($3 | 0) != ($2 | 0)) {\n                  continue\n                 }\n                 break;\n                };\n                break label$6;\n               }\n               if (!$3) {\n                break label$6\n               }\n               $2 = 0;\n               while (1) {\n                $4 = HEAP32[HEAP32[$1 >> 2] + ($2 << 2) >> 2];\n                HEAP8[$5 | 0] = $4;\n                HEAP8[$5 + 2 | 0] = $4 >>> 16;\n                HEAP8[$5 + 1 | 0] = $4 >>> 8;\n                $5 = $5 + 3 | 0;\n                $2 = $2 + 1 | 0;\n                if (($3 | 0) != ($2 | 0)) {\n                 continue\n                }\n                break;\n               };\n               break label$6;\n              }\n              if (!$3) {\n               break label$6\n              }\n              $13 = HEAP32[$1 + 28 >> 2];\n              $8 = HEAP32[$1 + 24 >> 2];\n              $12 = HEAP32[$1 + 20 >> 2];\n              $7 = HEAP32[$1 + 16 >> 2];\n              $10 = HEAP32[$1 + 12 >> 2];\n              $6 = HEAP32[$1 + 8 >> 2];\n              $4 = HEAP32[$1 + 4 >> 2];\n              $1 = HEAP32[$1 >> 2];\n              $2 = 0;\n              while (1) {\n               $9 = $2 << 2;\n               HEAP16[$5 >> 1] = HEAP32[$9 + $1 >> 2];\n               HEAP16[$5 + 2 >> 1] = HEAP32[$4 + $9 >> 2];\n               HEAP16[$5 + 4 >> 1] = HEAP32[$6 + $9 >> 2];\n               HEAP16[$5 + 6 >> 1] = HEAP32[$10 + $9 >> 2];\n               HEAP16[$5 + 8 >> 1] = HEAP32[$7 + $9 >> 2];\n               HEAP16[$5 + 10 >> 1] = HEAP32[$9 + $12 >> 2];\n               HEAP16[$5 + 12 >> 1] = HEAP32[$8 + $9 >> 2];\n               HEAP16[$5 + 14 >> 1] = HEAP32[$9 + $13 >> 2];\n               $5 = $5 + 16 | 0;\n               $2 = $2 + 1 | 0;\n               if (($3 | 0) != ($2 | 0)) {\n                continue\n               }\n               break;\n              };\n              break label$6;\n             }\n             if (!$3) {\n              break label$6\n             }\n             $12 = HEAP32[$1 + 20 >> 2];\n             $7 = HEAP32[$1 + 16 >> 2];\n             $10 = HEAP32[$1 + 12 >> 2];\n             $6 = HEAP32[$1 + 8 >> 2];\n             $4 = HEAP32[$1 + 4 >> 2];\n             $1 = HEAP32[$1 >> 2];\n             $2 = 0;\n             while (1) {\n              $8 = $2 << 2;\n              HEAP16[$5 >> 1] = HEAP32[$8 + $1 >> 2];\n              HEAP16[$5 + 2 >> 1] = HEAP32[$4 + $8 >> 2];\n              HEAP16[$5 + 4 >> 1] = HEAP32[$6 + $8 >> 2];\n              HEAP16[$5 + 6 >> 1] = HEAP32[$8 + $10 >> 2];\n              HEAP16[$5 + 8 >> 1] = HEAP32[$7 + $8 >> 2];\n              HEAP16[$5 + 10 >> 1] = HEAP32[$8 + $12 >> 2];\n              $5 = $5 + 12 | 0;\n              $2 = $2 + 1 | 0;\n              if (($3 | 0) != ($2 | 0)) {\n               continue\n              }\n              break;\n             };\n             break label$6;\n            }\n            if (!$3) {\n             break label$6\n            }\n            $10 = HEAP32[$1 + 12 >> 2];\n            $6 = HEAP32[$1 + 8 >> 2];\n            $4 = HEAP32[$1 + 4 >> 2];\n            $1 = HEAP32[$1 >> 2];\n            $2 = 0;\n            while (1) {\n             $7 = $2 << 2;\n             HEAP16[$5 >> 1] = HEAP32[$7 + $1 >> 2];\n             HEAP16[$5 + 2 >> 1] = HEAP32[$4 + $7 >> 2];\n             HEAP16[$5 + 4 >> 1] = HEAP32[$6 + $7 >> 2];\n             HEAP16[$5 + 6 >> 1] = HEAP32[$7 + $10 >> 2];\n             $5 = $5 + 8 | 0;\n             $2 = $2 + 1 | 0;\n             if (($3 | 0) != ($2 | 0)) {\n              continue\n             }\n             break;\n            };\n            break label$6;\n           }\n           if (!$3) {\n            break label$6\n           }\n           $6 = HEAP32[$1 + 4 >> 2];\n           $4 = HEAP32[$1 >> 2];\n           $1 = 0;\n           while (1) {\n            $2 = $1 << 2;\n            HEAP16[$5 >> 1] = HEAP32[$2 + $4 >> 2];\n            HEAP16[$5 + 2 >> 1] = HEAP32[$2 + $6 >> 2];\n            $5 = $5 + 4 | 0;\n            $1 = $1 + 1 | 0;\n            if (($3 | 0) != ($1 | 0)) {\n             continue\n            }\n            break;\n           };\n           break label$6;\n          }\n          if (!$3) {\n           break label$6\n          }\n          $2 = HEAP32[$1 >> 2];\n          $1 = 0;\n          while (1) {\n           HEAP16[$5 >> 1] = HEAP32[$2 + ($1 << 2) >> 2];\n           $5 = $5 + 2 | 0;\n           $1 = $1 + 1 | 0;\n           if (($3 | 0) != ($1 | 0)) {\n            continue\n           }\n           break;\n          };\n          break label$6;\n         }\n         if (!$3) {\n          break label$6\n         }\n         $4 = 0;\n         while (1) {\n          $2 = $4 << 2;\n          HEAP8[$5 | 0] = HEAP32[$2 + HEAP32[$1 >> 2] >> 2];\n          HEAP8[$5 + 1 | 0] = HEAP32[$2 + HEAP32[$1 + 4 >> 2] >> 2];\n          HEAP8[$5 + 2 | 0] = HEAP32[$2 + HEAP32[$1 + 8 >> 2] >> 2];\n          HEAP8[$5 + 3 | 0] = HEAP32[$2 + HEAP32[$1 + 12 >> 2] >> 2];\n          HEAP8[$5 + 4 | 0] = HEAP32[$2 + HEAP32[$1 + 16 >> 2] >> 2];\n          HEAP8[$5 + 5 | 0] = HEAP32[$2 + HEAP32[$1 + 20 >> 2] >> 2];\n          HEAP8[$5 + 6 | 0] = HEAP32[$2 + HEAP32[$1 + 24 >> 2] >> 2];\n          HEAP8[$5 + 7 | 0] = HEAP32[$2 + HEAP32[$1 + 28 >> 2] >> 2];\n          $5 = $5 + 8 | 0;\n          $4 = $4 + 1 | 0;\n          if (($4 | 0) != ($3 | 0)) {\n           continue\n          }\n          break;\n         };\n         break label$6;\n        }\n        if (!$3) {\n         break label$6\n        }\n        $4 = 0;\n        while (1) {\n         $2 = $4 << 2;\n         HEAP8[$5 | 0] = HEAP32[$2 + HEAP32[$1 >> 2] >> 2];\n         HEAP8[$5 + 1 | 0] = HEAP32[$2 + HEAP32[$1 + 4 >> 2] >> 2];\n         HEAP8[$5 + 2 | 0] = HEAP32[$2 + HEAP32[$1 + 8 >> 2] >> 2];\n         HEAP8[$5 + 3 | 0] = HEAP32[$2 + HEAP32[$1 + 12 >> 2] >> 2];\n         HEAP8[$5 + 4 | 0] = HEAP32[$2 + HEAP32[$1 + 16 >> 2] >> 2];\n         HEAP8[$5 + 5 | 0] = HEAP32[$2 + HEAP32[$1 + 20 >> 2] >> 2];\n         $5 = $5 + 6 | 0;\n         $4 = $4 + 1 | 0;\n         if (($4 | 0) != ($3 | 0)) {\n          continue\n         }\n         break;\n        };\n        break label$6;\n       }\n       if (!$3) {\n        break label$6\n       }\n       $4 = 0;\n       while (1) {\n        $2 = $4 << 2;\n        HEAP8[$5 | 0] = HEAP32[$2 + HEAP32[$1 >> 2] >> 2];\n        HEAP8[$5 + 1 | 0] = HEAP32[$2 + HEAP32[$1 + 4 >> 2] >> 2];\n        HEAP8[$5 + 2 | 0] = HEAP32[$2 + HEAP32[$1 + 8 >> 2] >> 2];\n        HEAP8[$5 + 3 | 0] = HEAP32[$2 + HEAP32[$1 + 12 >> 2] >> 2];\n        $5 = $5 + 4 | 0;\n        $4 = $4 + 1 | 0;\n        if (($4 | 0) != ($3 | 0)) {\n         continue\n        }\n        break;\n       };\n       break label$6;\n      }\n      if (!$3) {\n       break label$6\n      }\n      $2 = 0;\n      while (1) {\n       $4 = $2 << 2;\n       HEAP8[$5 | 0] = HEAP32[$4 + HEAP32[$1 >> 2] >> 2];\n       HEAP8[$5 + 1 | 0] = HEAP32[$4 + HEAP32[$1 + 4 >> 2] >> 2];\n       $5 = $5 + 2 | 0;\n       $2 = $2 + 1 | 0;\n       if (($3 | 0) != ($2 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$6;\n     }\n     if (!$3) {\n      break label$6\n     }\n     $2 = 0;\n     while (1) {\n      HEAP8[$5 | 0] = HEAP32[HEAP32[$1 >> 2] + ($2 << 2) >> 2];\n      $5 = $5 + 1 | 0;\n      $2 = $2 + 1 | 0;\n      if (($3 | 0) != ($2 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$6;\n    }\n    label$45 : {\n     switch ($4 + -1 | 0) {\n     case 3:\n      if (!$2 | !$3) {\n       break label$6\n      }\n      $6 = 0;\n      while (1) {\n       $4 = 0;\n       while (1) {\n        HEAP32[$5 >> 2] = HEAP32[HEAP32[($4 << 2) + $1 >> 2] + ($6 << 2) >> 2];\n        $5 = $5 + 4 | 0;\n        $4 = $4 + 1 | 0;\n        if (($4 | 0) != ($2 | 0)) {\n         continue\n        }\n        break;\n       };\n       $6 = $6 + 1 | 0;\n       if (($6 | 0) != ($3 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$6;\n     case 2:\n      if (!$2 | !$3) {\n       break label$6\n      }\n      while (1) {\n       $4 = 0;\n       while (1) {\n        $6 = HEAP32[HEAP32[($4 << 2) + $1 >> 2] + ($10 << 2) >> 2];\n        HEAP8[$5 | 0] = $6;\n        HEAP8[$5 + 2 | 0] = $6 >>> 16;\n        HEAP8[$5 + 1 | 0] = $6 >>> 8;\n        $5 = $5 + 3 | 0;\n        $4 = $4 + 1 | 0;\n        if (($4 | 0) != ($2 | 0)) {\n         continue\n        }\n        break;\n       };\n       $10 = $10 + 1 | 0;\n       if (($10 | 0) != ($3 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$6;\n     case 1:\n      if (!$2 | !$3) {\n       break label$6\n      }\n      $6 = 0;\n      while (1) {\n       $4 = 0;\n       while (1) {\n        HEAP16[$5 >> 1] = HEAP32[HEAP32[($4 << 2) + $1 >> 2] + ($6 << 2) >> 2];\n        $5 = $5 + 2 | 0;\n        $4 = $4 + 1 | 0;\n        if (($4 | 0) != ($2 | 0)) {\n         continue\n        }\n        break;\n       };\n       $6 = $6 + 1 | 0;\n       if (($6 | 0) != ($3 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$6;\n     case 0:\n      break label$45;\n     default:\n      break label$6;\n     };\n    }\n    if (!$2 | !$3) {\n     break label$6\n    }\n    $6 = 0;\n    while (1) {\n     $4 = 0;\n     while (1) {\n      HEAP8[$5 | 0] = HEAP32[HEAP32[($4 << 2) + $1 >> 2] + ($6 << 2) >> 2];\n      $5 = $5 + 1 | 0;\n      $4 = $4 + 1 | 0;\n      if (($4 | 0) != ($2 | 0)) {\n       continue\n      }\n      break;\n     };\n     $6 = $6 + 1 | 0;\n     if (($6 | 0) != ($3 | 0)) {\n      continue\n     }\n     break;\n    };\n   }\n   $2 = HEAP32[$0 + 80 >> 2];\n   $1 = $2 + $11 | 0;\n   HEAP32[$0 + 80 >> 2] = $1;\n   $3 = HEAP32[$0 + 88 >> 2];\n   if ($1 >>> 0 < $2 >>> 0) {\n    $1 = $0 + 84 | 0;\n    HEAP32[$1 >> 2] = HEAP32[$1 >> 2] + 1;\n   }\n   $4 = 64 - ($2 & 63) | 0;\n   $1 = ($0 - $4 | 0) - -64 | 0;\n   label$58 : {\n    if ($11 >>> 0 < $4 >>> 0) {\n     memcpy($1, $3, $11);\n     break label$58;\n    }\n    memcpy($1, $3, $4);\n    $2 = $0 - -64 | 0;\n    FLAC__MD5Transform($2, $0);\n    $5 = $3 + $4 | 0;\n    $1 = $11 - $4 | 0;\n    if ($1 >>> 0 >= 64) {\n     while (1) {\n      $4 = HEAPU8[$5 + 4 | 0] | HEAPU8[$5 + 5 | 0] << 8 | (HEAPU8[$5 + 6 | 0] << 16 | HEAPU8[$5 + 7 | 0] << 24);\n      $3 = HEAPU8[$5 | 0] | HEAPU8[$5 + 1 | 0] << 8 | (HEAPU8[$5 + 2 | 0] << 16 | HEAPU8[$5 + 3 | 0] << 24);\n      HEAP8[$0 | 0] = $3;\n      HEAP8[$0 + 1 | 0] = $3 >>> 8;\n      HEAP8[$0 + 2 | 0] = $3 >>> 16;\n      HEAP8[$0 + 3 | 0] = $3 >>> 24;\n      HEAP8[$0 + 4 | 0] = $4;\n      HEAP8[$0 + 5 | 0] = $4 >>> 8;\n      HEAP8[$0 + 6 | 0] = $4 >>> 16;\n      HEAP8[$0 + 7 | 0] = $4 >>> 24;\n      $4 = HEAPU8[$5 + 60 | 0] | HEAPU8[$5 + 61 | 0] << 8 | (HEAPU8[$5 + 62 | 0] << 16 | HEAPU8[$5 + 63 | 0] << 24);\n      $3 = HEAPU8[$5 + 56 | 0] | HEAPU8[$5 + 57 | 0] << 8 | (HEAPU8[$5 + 58 | 0] << 16 | HEAPU8[$5 + 59 | 0] << 24);\n      HEAP8[$0 + 56 | 0] = $3;\n      HEAP8[$0 + 57 | 0] = $3 >>> 8;\n      HEAP8[$0 + 58 | 0] = $3 >>> 16;\n      HEAP8[$0 + 59 | 0] = $3 >>> 24;\n      HEAP8[$0 + 60 | 0] = $4;\n      HEAP8[$0 + 61 | 0] = $4 >>> 8;\n      HEAP8[$0 + 62 | 0] = $4 >>> 16;\n      HEAP8[$0 + 63 | 0] = $4 >>> 24;\n      $4 = HEAPU8[$5 + 52 | 0] | HEAPU8[$5 + 53 | 0] << 8 | (HEAPU8[$5 + 54 | 0] << 16 | HEAPU8[$5 + 55 | 0] << 24);\n      $3 = HEAPU8[$5 + 48 | 0] | HEAPU8[$5 + 49 | 0] << 8 | (HEAPU8[$5 + 50 | 0] << 16 | HEAPU8[$5 + 51 | 0] << 24);\n      HEAP8[$0 + 48 | 0] = $3;\n      HEAP8[$0 + 49 | 0] = $3 >>> 8;\n      HEAP8[$0 + 50 | 0] = $3 >>> 16;\n      HEAP8[$0 + 51 | 0] = $3 >>> 24;\n      HEAP8[$0 + 52 | 0] = $4;\n      HEAP8[$0 + 53 | 0] = $4 >>> 8;\n      HEAP8[$0 + 54 | 0] = $4 >>> 16;\n      HEAP8[$0 + 55 | 0] = $4 >>> 24;\n      $4 = HEAPU8[$5 + 44 | 0] | HEAPU8[$5 + 45 | 0] << 8 | (HEAPU8[$5 + 46 | 0] << 16 | HEAPU8[$5 + 47 | 0] << 24);\n      $3 = HEAPU8[$5 + 40 | 0] | HEAPU8[$5 + 41 | 0] << 8 | (HEAPU8[$5 + 42 | 0] << 16 | HEAPU8[$5 + 43 | 0] << 24);\n      HEAP8[$0 + 40 | 0] = $3;\n      HEAP8[$0 + 41 | 0] = $3 >>> 8;\n      HEAP8[$0 + 42 | 0] = $3 >>> 16;\n      HEAP8[$0 + 43 | 0] = $3 >>> 24;\n      HEAP8[$0 + 44 | 0] = $4;\n      HEAP8[$0 + 45 | 0] = $4 >>> 8;\n      HEAP8[$0 + 46 | 0] = $4 >>> 16;\n      HEAP8[$0 + 47 | 0] = $4 >>> 24;\n      $4 = HEAPU8[$5 + 36 | 0] | HEAPU8[$5 + 37 | 0] << 8 | (HEAPU8[$5 + 38 | 0] << 16 | HEAPU8[$5 + 39 | 0] << 24);\n      $3 = HEAPU8[$5 + 32 | 0] | HEAPU8[$5 + 33 | 0] << 8 | (HEAPU8[$5 + 34 | 0] << 16 | HEAPU8[$5 + 35 | 0] << 24);\n      HEAP8[$0 + 32 | 0] = $3;\n      HEAP8[$0 + 33 | 0] = $3 >>> 8;\n      HEAP8[$0 + 34 | 0] = $3 >>> 16;\n      HEAP8[$0 + 35 | 0] = $3 >>> 24;\n      HEAP8[$0 + 36 | 0] = $4;\n      HEAP8[$0 + 37 | 0] = $4 >>> 8;\n      HEAP8[$0 + 38 | 0] = $4 >>> 16;\n      HEAP8[$0 + 39 | 0] = $4 >>> 24;\n      $4 = HEAPU8[$5 + 28 | 0] | HEAPU8[$5 + 29 | 0] << 8 | (HEAPU8[$5 + 30 | 0] << 16 | HEAPU8[$5 + 31 | 0] << 24);\n      $3 = HEAPU8[$5 + 24 | 0] | HEAPU8[$5 + 25 | 0] << 8 | (HEAPU8[$5 + 26 | 0] << 16 | HEAPU8[$5 + 27 | 0] << 24);\n      HEAP8[$0 + 24 | 0] = $3;\n      HEAP8[$0 + 25 | 0] = $3 >>> 8;\n      HEAP8[$0 + 26 | 0] = $3 >>> 16;\n      HEAP8[$0 + 27 | 0] = $3 >>> 24;\n      HEAP8[$0 + 28 | 0] = $4;\n      HEAP8[$0 + 29 | 0] = $4 >>> 8;\n      HEAP8[$0 + 30 | 0] = $4 >>> 16;\n      HEAP8[$0 + 31 | 0] = $4 >>> 24;\n      $4 = HEAPU8[$5 + 20 | 0] | HEAPU8[$5 + 21 | 0] << 8 | (HEAPU8[$5 + 22 | 0] << 16 | HEAPU8[$5 + 23 | 0] << 24);\n      $3 = HEAPU8[$5 + 16 | 0] | HEAPU8[$5 + 17 | 0] << 8 | (HEAPU8[$5 + 18 | 0] << 16 | HEAPU8[$5 + 19 | 0] << 24);\n      HEAP8[$0 + 16 | 0] = $3;\n      HEAP8[$0 + 17 | 0] = $3 >>> 8;\n      HEAP8[$0 + 18 | 0] = $3 >>> 16;\n      HEAP8[$0 + 19 | 0] = $3 >>> 24;\n      HEAP8[$0 + 20 | 0] = $4;\n      HEAP8[$0 + 21 | 0] = $4 >>> 8;\n      HEAP8[$0 + 22 | 0] = $4 >>> 16;\n      HEAP8[$0 + 23 | 0] = $4 >>> 24;\n      $4 = HEAPU8[$5 + 12 | 0] | HEAPU8[$5 + 13 | 0] << 8 | (HEAPU8[$5 + 14 | 0] << 16 | HEAPU8[$5 + 15 | 0] << 24);\n      $3 = HEAPU8[$5 + 8 | 0] | HEAPU8[$5 + 9 | 0] << 8 | (HEAPU8[$5 + 10 | 0] << 16 | HEAPU8[$5 + 11 | 0] << 24);\n      HEAP8[$0 + 8 | 0] = $3;\n      HEAP8[$0 + 9 | 0] = $3 >>> 8;\n      HEAP8[$0 + 10 | 0] = $3 >>> 16;\n      HEAP8[$0 + 11 | 0] = $3 >>> 24;\n      HEAP8[$0 + 12 | 0] = $4;\n      HEAP8[$0 + 13 | 0] = $4 >>> 8;\n      HEAP8[$0 + 14 | 0] = $4 >>> 16;\n      HEAP8[$0 + 15 | 0] = $4 >>> 24;\n      FLAC__MD5Transform($2, $0);\n      $5 = $5 - -64 | 0;\n      $1 = $1 + -64 | 0;\n      if ($1 >>> 0 > 63) {\n       continue\n      }\n      break;\n     }\n    }\n    memcpy($0, $5, $1);\n   }\n   $5 = 1;\n  }\n  return $5;\n }\n \n function __stdio_close($0) {\n  $0 = $0 | 0;\n  return __wasi_fd_close(HEAP32[$0 + 60 >> 2]) | 0;\n }\n \n function __wasi_syscall_ret($0) {\n  if (!$0) {\n   return 0\n  }\n  HEAP32[2896] = $0;\n  return -1;\n }\n \n function __stdio_read($0, $1, $2) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  var $3 = 0, $4 = 0, $5 = 0, $6 = 0;\n  $3 = global$0 - 32 | 0;\n  global$0 = $3;\n  HEAP32[$3 + 16 >> 2] = $1;\n  $4 = HEAP32[$0 + 48 >> 2];\n  HEAP32[$3 + 20 >> 2] = $2 - (($4 | 0) != 0);\n  $5 = HEAP32[$0 + 44 >> 2];\n  HEAP32[$3 + 28 >> 2] = $4;\n  HEAP32[$3 + 24 >> 2] = $5;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     if (__wasi_syscall_ret(__wasi_fd_read(HEAP32[$0 + 60 >> 2], $3 + 16 | 0, 2, $3 + 12 | 0) | 0)) {\n      HEAP32[$3 + 12 >> 2] = -1;\n      $2 = -1;\n      break label$3;\n     }\n     $4 = HEAP32[$3 + 12 >> 2];\n     if (($4 | 0) > 0) {\n      break label$2\n     }\n     $2 = $4;\n    }\n    HEAP32[$0 >> 2] = HEAP32[$0 >> 2] | $2 & 48 ^ 16;\n    break label$1;\n   }\n   $6 = HEAP32[$3 + 20 >> 2];\n   if ($4 >>> 0 <= $6 >>> 0) {\n    $2 = $4;\n    break label$1;\n   }\n   $5 = HEAP32[$0 + 44 >> 2];\n   HEAP32[$0 + 4 >> 2] = $5;\n   HEAP32[$0 + 8 >> 2] = $5 + ($4 - $6 | 0);\n   if (!HEAP32[$0 + 48 >> 2]) {\n    break label$1\n   }\n   HEAP32[$0 + 4 >> 2] = $5 + 1;\n   HEAP8[($1 + $2 | 0) + -1 | 0] = HEAPU8[$5 | 0];\n  }\n  global$0 = $3 + 32 | 0;\n  return $2 | 0;\n }\n \n function __stdio_seek($0, $1, $2, $3) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  var $4 = 0;\n  $4 = global$0 - 16 | 0;\n  global$0 = $4;\n  label$1 : {\n   if (!__wasi_syscall_ret(legalimport$__wasi_fd_seek(HEAP32[$0 + 60 >> 2], $1 | 0, $2 | 0, $3 & 255, $4 + 8 | 0) | 0)) {\n    $1 = HEAP32[$4 + 12 >> 2];\n    $0 = HEAP32[$4 + 8 >> 2];\n    break label$1;\n   }\n   HEAP32[$4 + 8 >> 2] = -1;\n   HEAP32[$4 + 12 >> 2] = -1;\n   $1 = -1;\n   $0 = -1;\n  }\n  global$0 = $4 + 16 | 0;\n  i64toi32_i32$HIGH_BITS = $1;\n  return $0 | 0;\n }\n \n function fflush($0) {\n  var $1 = 0;\n  if ($0) {\n   if (HEAP32[$0 + 76 >> 2] <= -1) {\n    return __fflush_unlocked($0)\n   }\n   return __fflush_unlocked($0);\n  }\n  if (HEAP32[2794]) {\n   $1 = fflush(HEAP32[2794])\n  }\n  $0 = HEAP32[3023];\n  if ($0) {\n   while (1) {\n    if (HEAPU32[$0 + 20 >> 2] > HEAPU32[$0 + 28 >> 2]) {\n     $1 = __fflush_unlocked($0) | $1\n    }\n    $0 = HEAP32[$0 + 56 >> 2];\n    if ($0) {\n     continue\n    }\n    break;\n   }\n  }\n  return $1;\n }\n \n function __fflush_unlocked($0) {\n  var $1 = 0, $2 = 0;\n  label$1 : {\n   if (HEAPU32[$0 + 20 >> 2] <= HEAPU32[$0 + 28 >> 2]) {\n    break label$1\n   }\n   FUNCTION_TABLE[HEAP32[$0 + 36 >> 2]]($0, 0, 0) | 0;\n   if (HEAP32[$0 + 20 >> 2]) {\n    break label$1\n   }\n   return -1;\n  }\n  $1 = HEAP32[$0 + 4 >> 2];\n  $2 = HEAP32[$0 + 8 >> 2];\n  if ($1 >>> 0 < $2 >>> 0) {\n   $1 = $1 - $2 | 0;\n   FUNCTION_TABLE[HEAP32[$0 + 40 >> 2]]($0, $1, $1 >> 31, 1) | 0;\n  }\n  HEAP32[$0 + 28 >> 2] = 0;\n  HEAP32[$0 + 16 >> 2] = 0;\n  HEAP32[$0 + 20 >> 2] = 0;\n  HEAP32[$0 + 4 >> 2] = 0;\n  HEAP32[$0 + 8 >> 2] = 0;\n  return 0;\n }\n \n function fclose($0) {\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0;\n  $4 = HEAP32[$0 + 76 >> 2] >= 0 ? 1 : 0;\n  $3 = HEAP32[$0 >> 2] & 1;\n  if (!$3) {\n   $1 = HEAP32[$0 + 52 >> 2];\n   if ($1) {\n    HEAP32[$1 + 56 >> 2] = HEAP32[$0 + 56 >> 2]\n   }\n   $2 = HEAP32[$0 + 56 >> 2];\n   if ($2) {\n    HEAP32[$2 + 52 >> 2] = $1\n   }\n   if (HEAP32[3023] == ($0 | 0)) {\n    HEAP32[3023] = $2\n   }\n  }\n  fflush($0);\n  FUNCTION_TABLE[HEAP32[$0 + 12 >> 2]]($0) | 0;\n  $1 = HEAP32[$0 + 96 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  label$7 : {\n   if (!$3) {\n    dlfree($0);\n    break label$7;\n   }\n   if (!$4) {\n    break label$7\n   }\n  }\n }\n \n function memcmp($0, $1, $2) {\n  var $3 = 0, $4 = 0, $5 = 0;\n  label$1 : {\n   if (!$2) {\n    break label$1\n   }\n   while (1) {\n    $3 = HEAPU8[$0 | 0];\n    $4 = HEAPU8[$1 | 0];\n    if (($3 | 0) == ($4 | 0)) {\n     $1 = $1 + 1 | 0;\n     $0 = $0 + 1 | 0;\n     $2 = $2 + -1 | 0;\n     if ($2) {\n      continue\n     }\n     break label$1;\n    }\n    break;\n   };\n   $5 = $3 - $4 | 0;\n  }\n  return $5;\n }\n \n function FLAC__cpu_info($0) {\n  HEAP32[$0 + 8 >> 2] = 0;\n  HEAP32[$0 + 12 >> 2] = 0;\n  HEAP32[$0 >> 2] = 0;\n  HEAP32[$0 + 4 >> 2] = 3;\n  HEAP32[$0 + 56 >> 2] = 0;\n  HEAP32[$0 + 60 >> 2] = 0;\n  HEAP32[$0 + 48 >> 2] = 0;\n  HEAP32[$0 + 52 >> 2] = 0;\n  HEAP32[$0 + 40 >> 2] = 0;\n  HEAP32[$0 + 44 >> 2] = 0;\n  HEAP32[$0 + 32 >> 2] = 0;\n  HEAP32[$0 + 36 >> 2] = 0;\n  HEAP32[$0 + 24 >> 2] = 0;\n  HEAP32[$0 + 28 >> 2] = 0;\n  HEAP32[$0 + 16 >> 2] = 0;\n  HEAP32[$0 + 20 >> 2] = 0;\n }\n \n function lround($0) {\n  $0 = +round(+$0);\n  if (Math_abs($0) < 2147483648.0) {\n   return ~~$0\n  }\n  return -2147483648;\n }\n \n function log($0) {\n  var $1 = 0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $10 = 0.0;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     label$4 : {\n      wasm2js_scratch_store_f64(+$0);\n      $1 = wasm2js_scratch_load_i32(1) | 0;\n      $3 = wasm2js_scratch_load_i32(0) | 0;\n      if (($1 | 0) > 0 ? 1 : ($1 | 0) >= 0 ? ($3 >>> 0 < 0 ? 0 : 1) : 0) {\n       $5 = $1;\n       if ($1 >>> 0 > 1048575) {\n        break label$4\n       }\n      }\n      if (!($1 & 2147483647 | $3)) {\n       return -1.0 / ($0 * $0)\n      }\n      if (($1 | 0) > -1 ? 1 : 0) {\n       break label$3\n      }\n      return ($0 - $0) / 0.0;\n     }\n     if ($5 >>> 0 > 2146435071) {\n      break label$1\n     }\n     $1 = 1072693248;\n     $6 = -1023;\n     if (($5 | 0) != 1072693248) {\n      $1 = $5;\n      break label$2;\n     }\n     if ($3) {\n      break label$2\n     }\n     return 0.0;\n    }\n    wasm2js_scratch_store_f64(+($0 * 18014398509481984.0));\n    $1 = wasm2js_scratch_load_i32(1) | 0;\n    $3 = wasm2js_scratch_load_i32(0) | 0;\n    $6 = -1077;\n   }\n   $1 = $1 + 614242 | 0;\n   $4 = +(($1 >>> 20 | 0) + $6 | 0);\n   wasm2js_scratch_store_i32(0, $3 | 0);\n   wasm2js_scratch_store_i32(1, ($1 & 1048575) + 1072079006 | 0);\n   $0 = +wasm2js_scratch_load_f64() + -1.0;\n   $2 = $0 / ($0 + 2.0);\n   $7 = $4 * .6931471803691238;\n   $8 = $0;\n   $9 = $4 * 1.9082149292705877e-10;\n   $10 = $2;\n   $4 = $0 * ($0 * .5);\n   $2 = $2 * $2;\n   $0 = $2 * $2;\n   $0 = $7 + ($8 + ($9 + $10 * ($4 + ($0 * ($0 * ($0 * .15313837699209373 + .22222198432149784) + .3999999999940942) + $2 * ($0 * ($0 * ($0 * .14798198605116586 + .1818357216161805) + .2857142874366239) + .6666666666666735))) - $4));\n  }\n  return $0;\n }\n \n function FLAC__lpc_window_data($0, $1, $2, $3) {\n  var $4 = 0, $5 = 0;\n  if ($3) {\n   while (1) {\n    $5 = $4 << 2;\n    HEAPF32[$5 + $2 >> 2] = HEAPF32[$1 + $5 >> 2] * Math_fround(HEAP32[$0 + $5 >> 2]);\n    $4 = $4 + 1 | 0;\n    if (($4 | 0) != ($3 | 0)) {\n     continue\n    }\n    break;\n   }\n  }\n }\n \n function FLAC__lpc_compute_autocorrelation($0, $1, $2, $3) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  var $4 = 0, $5 = 0, $6 = 0, $7 = Math_fround(0), $8 = 0, $9 = 0;\n  $6 = $1 - $2 | 0;\n  label$1 : {\n   if (!$2) {\n    while (1) {\n     $4 = $4 + 1 | 0;\n     if ($4 >>> 0 <= $6 >>> 0) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   $9 = memset($3, $2 << 2);\n   while (1) {\n    $7 = HEAPF32[($4 << 2) + $0 >> 2];\n    $5 = 0;\n    while (1) {\n     $8 = ($5 << 2) + $9 | 0;\n     HEAPF32[$8 >> 2] = HEAPF32[$8 >> 2] + Math_fround($7 * HEAPF32[($4 + $5 << 2) + $0 >> 2]);\n     $5 = $5 + 1 | 0;\n     if (($5 | 0) != ($2 | 0)) {\n      continue\n     }\n     break;\n    };\n    $4 = $4 + 1 | 0;\n    if ($4 >>> 0 <= $6 >>> 0) {\n     continue\n    }\n    break;\n   };\n  }\n  if ($4 >>> 0 < $1 >>> 0) {\n   while (1) {\n    $2 = $1 - $4 | 0;\n    if ($2) {\n     $7 = HEAPF32[($4 << 2) + $0 >> 2];\n     $5 = 0;\n     while (1) {\n      $6 = ($5 << 2) + $3 | 0;\n      HEAPF32[$6 >> 2] = HEAPF32[$6 >> 2] + Math_fround($7 * HEAPF32[($4 + $5 << 2) + $0 >> 2]);\n      $5 = $5 + 1 | 0;\n      if ($5 >>> 0 < $2 >>> 0) {\n       continue\n      }\n      break;\n     };\n    }\n    $4 = $4 + 1 | 0;\n    if (($4 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   }\n  }\n }\n \n function FLAC__lpc_compute_lp_coefficients($0, $1, $2, $3) {\n  var $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0.0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0;\n  $7 = global$0 - 256 | 0;\n  global$0 = $7;\n  $13 = HEAP32[$1 >> 2];\n  $10 = +HEAPF32[$0 >> 2];\n  label$1 : {\n   while (1) {\n    if (($5 | 0) == ($13 | 0)) {\n     break label$1\n    }\n    $11 = $5 + 1 | 0;\n    $6 = +Math_fround(-HEAPF32[($11 << 2) + $0 >> 2]);\n    label$3 : {\n     if ($5) {\n      $12 = $5 >>> 1 | 0;\n      $4 = 0;\n      while (1) {\n       $6 = $6 - HEAPF64[($4 << 3) + $7 >> 3] * +HEAPF32[($5 - $4 << 2) + $0 >> 2];\n       $4 = $4 + 1 | 0;\n       if (($5 | 0) != ($4 | 0)) {\n        continue\n       }\n       break;\n      };\n      $6 = $6 / $10;\n      HEAPF64[($5 << 3) + $7 >> 3] = $6;\n      $4 = 0;\n      if ($12) {\n       while (1) {\n        $8 = ($4 << 3) + $7 | 0;\n        $9 = HEAPF64[$8 >> 3];\n        $14 = $8;\n        $8 = (($4 ^ -1) + $5 << 3) + $7 | 0;\n        HEAPF64[$14 >> 3] = $9 + $6 * HEAPF64[$8 >> 3];\n        HEAPF64[$8 >> 3] = $6 * $9 + HEAPF64[$8 >> 3];\n        $4 = $4 + 1 | 0;\n        if (($12 | 0) != ($4 | 0)) {\n         continue\n        }\n        break;\n       }\n      }\n      if (!($5 & 1)) {\n       break label$3\n      }\n      $8 = ($12 << 3) + $7 | 0;\n      $9 = HEAPF64[$8 >> 3];\n      HEAPF64[$8 >> 3] = $9 + $6 * $9;\n      break label$3;\n     }\n     $6 = $6 / $10;\n     HEAPF64[($5 << 3) + $7 >> 3] = $6;\n    }\n    $9 = 1.0 - $6 * $6;\n    $4 = 0;\n    while (1) {\n     HEAPF32[(($5 << 7) + $2 | 0) + ($4 << 2) >> 2] = -Math_fround(HEAPF64[($4 << 3) + $7 >> 3]);\n     $4 = $4 + 1 | 0;\n     if ($4 >>> 0 <= $5 >>> 0) {\n      continue\n     }\n     break;\n    };\n    $10 = $10 * $9;\n    HEAPF64[($5 << 3) + $3 >> 3] = $10;\n    $5 = $11;\n    if ($10 != 0.0) {\n     continue\n    }\n    break;\n   };\n   HEAP32[$1 >> 2] = $11;\n  }\n  global$0 = $7 + 256 | 0;\n }\n \n function FLAC__lpc_quantize_coefficients($0, $1, $2, $3, $4) {\n  var $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = Math_fround(0);\n  $8 = global$0 - 16 | 0;\n  global$0 = $8;\n  label$1 : {\n   if (!$1) {\n    $7 = 2;\n    break label$1;\n   }\n   $5 = $2 + -1 | 0;\n   $2 = 0;\n   while (1) {\n    $11 = +Math_fround(Math_abs(HEAPF32[($2 << 2) + $0 >> 2]));\n    $6 = $6 < $11 ? $11 : $6;\n    $2 = $2 + 1 | 0;\n    if (($2 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n   $7 = 2;\n   if ($6 <= 0.0) {\n    break label$1\n   }\n   $9 = 1 << $5;\n   $12 = $9 + -1 | 0;\n   $10 = 0 - $9 | 0;\n   frexp($6, $8 + 12 | 0);\n   $2 = HEAP32[$8 + 12 >> 2];\n   HEAP32[$8 + 12 >> 2] = $2 + -1;\n   $5 = $5 - $2 | 0;\n   HEAP32[$4 >> 2] = $5;\n   label$4 : {\n    $7 = -1 << HEAP32[1413] + -1;\n    $2 = $7 ^ -1;\n    if (($5 | 0) > ($2 | 0)) {\n     HEAP32[$4 >> 2] = $2;\n     $5 = $2;\n     break label$4;\n    }\n    if (($5 | 0) >= ($7 | 0)) {\n     break label$4\n    }\n    $7 = 1;\n    break label$1;\n   }\n   $7 = 0;\n   if (($5 | 0) >= 0) {\n    if (!$1) {\n     break label$1\n    }\n    $6 = 0.0;\n    $2 = 0;\n    while (1) {\n     $13 = $2 << 2;\n     $6 = $6 + +Math_fround(HEAPF32[$13 + $0 >> 2] * Math_fround(1 << $5));\n     $5 = lround($6);\n     $5 = ($5 | 0) < ($9 | 0) ? (($5 | 0) < ($10 | 0) ? $10 : $5) : $12;\n     HEAP32[$3 + $13 >> 2] = $5;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) == ($1 | 0)) {\n      break label$1\n     }\n     $6 = $6 - +($5 | 0);\n     $5 = HEAP32[$4 >> 2];\n     continue;\n    };\n   }\n   if ($1) {\n    $2 = 0;\n    $14 = Math_fround(1 << 0 - $5);\n    $6 = 0.0;\n    while (1) {\n     $7 = $2 << 2;\n     $6 = $6 + +Math_fround(HEAPF32[$7 + $0 >> 2] / $14);\n     $5 = lround($6);\n     $5 = ($5 | 0) < ($9 | 0) ? (($5 | 0) < ($10 | 0) ? $10 : $5) : $12;\n     HEAP32[$3 + $7 >> 2] = $5;\n     $6 = $6 - +($5 | 0);\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n   }\n   $7 = 0;\n   HEAP32[$4 >> 2] = 0;\n  }\n  global$0 = $8 + 16 | 0;\n  return $7;\n }\n \n function FLAC__lpc_compute_residual_from_qlp_coefficients($0, $1, $2, $3, $4, $5) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  $4 = $4 | 0;\n  $5 = $5 | 0;\n  var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0;\n  label$1 : {\n   if ($3 >>> 0 >= 13) {\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $25 = $3 + -13 | 0;\n    while (1) {\n     $17 = 0;\n     $20 = 0;\n     $19 = 0;\n     $22 = 0;\n     $21 = 0;\n     $24 = 0;\n     $23 = 0;\n     $26 = 0;\n     $18 = 0;\n     $16 = 0;\n     $15 = 0;\n     $14 = 0;\n     $13 = 0;\n     $12 = 0;\n     $11 = 0;\n     $10 = 0;\n     $9 = 0;\n     $8 = 0;\n     $7 = 0;\n     $3 = 0;\n     label$4 : {\n      switch ($25 | 0) {\n      case 19:\n       $17 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -128 >> 2], HEAP32[$2 + 124 >> 2]);\n      case 18:\n       $20 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -124 >> 2], HEAP32[$2 + 120 >> 2]) + $17 | 0;\n      case 17:\n       $19 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -120 >> 2], HEAP32[$2 + 116 >> 2]) + $20 | 0;\n      case 16:\n       $22 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -116 >> 2], HEAP32[$2 + 112 >> 2]) + $19 | 0;\n      case 15:\n       $21 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -112 >> 2], HEAP32[$2 + 108 >> 2]) + $22 | 0;\n      case 14:\n       $24 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -108 >> 2], HEAP32[$2 + 104 >> 2]) + $21 | 0;\n      case 13:\n       $23 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -104 >> 2], HEAP32[$2 + 100 >> 2]) + $24 | 0;\n      case 12:\n       $26 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -100 >> 2], HEAP32[$2 + 96 >> 2]) + $23 | 0;\n      case 11:\n       $18 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -96 >> 2], HEAP32[$2 + 92 >> 2]) + $26 | 0;\n      case 10:\n       $16 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -92 >> 2], HEAP32[$2 + 88 >> 2]) + $18 | 0;\n      case 9:\n       $15 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -88 >> 2], HEAP32[$2 + 84 >> 2]) + $16 | 0;\n      case 8:\n       $14 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -84 >> 2], HEAP32[$2 + 80 >> 2]) + $15 | 0;\n      case 7:\n       $13 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -80 >> 2], HEAP32[$2 + 76 >> 2]) + $14 | 0;\n      case 6:\n       $12 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -76 >> 2], HEAP32[$2 + 72 >> 2]) + $13 | 0;\n      case 5:\n       $11 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -72 >> 2], HEAP32[$2 + 68 >> 2]) + $12 | 0;\n      case 4:\n       $10 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -68 >> 2], HEAP32[$2 + 64 >> 2]) + $11 | 0;\n      case 3:\n       $9 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -64 >> 2], HEAP32[$2 + 60 >> 2]) + $10 | 0;\n      case 2:\n       $8 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -60 >> 2], HEAP32[$2 + 56 >> 2]) + $9 | 0;\n      case 1:\n       $7 = Math_imul(HEAP32[(($6 << 2) + $0 | 0) + -56 >> 2], HEAP32[$2 + 52 >> 2]) + $8 | 0;\n      case 0:\n       $3 = ($6 << 2) + $0 | 0;\n       $3 = ((((((((((((Math_imul(HEAP32[$3 + -52 >> 2], HEAP32[$2 + 48 >> 2]) + $7 | 0) + Math_imul(HEAP32[$3 + -48 >> 2], HEAP32[$2 + 44 >> 2]) | 0) + Math_imul(HEAP32[$3 + -44 >> 2], HEAP32[$2 + 40 >> 2]) | 0) + Math_imul(HEAP32[$3 + -40 >> 2], HEAP32[$2 + 36 >> 2]) | 0) + Math_imul(HEAP32[$3 + -36 >> 2], HEAP32[$2 + 32 >> 2]) | 0) + Math_imul(HEAP32[$3 + -32 >> 2], HEAP32[$2 + 28 >> 2]) | 0) + Math_imul(HEAP32[$3 + -28 >> 2], HEAP32[$2 + 24 >> 2]) | 0) + Math_imul(HEAP32[$3 + -24 >> 2], HEAP32[$2 + 20 >> 2]) | 0) + Math_imul(HEAP32[$3 + -20 >> 2], HEAP32[$2 + 16 >> 2]) | 0) + Math_imul(HEAP32[$3 + -16 >> 2], HEAP32[$2 + 12 >> 2]) | 0) + Math_imul(HEAP32[$3 + -12 >> 2], HEAP32[$2 + 8 >> 2]) | 0) + Math_imul(HEAP32[$3 + -8 >> 2], HEAP32[$2 + 4 >> 2]) | 0) + Math_imul(HEAP32[$3 + -4 >> 2], HEAP32[$2 >> 2]) | 0;\n       break;\n      default:\n       break label$4;\n      };\n     }\n     $7 = $6 << 2;\n     HEAP32[$7 + $5 >> 2] = HEAP32[$0 + $7 >> 2] - ($3 >> $4);\n     $6 = $6 + 1 | 0;\n     if (($6 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if ($3 >>> 0 >= 9) {\n    if ($3 >>> 0 >= 11) {\n     if (($3 | 0) != 12) {\n      if (($1 | 0) < 1) {\n       break label$1\n      }\n      $15 = HEAP32[$0 + -4 >> 2];\n      $6 = HEAP32[$0 + -8 >> 2];\n      $3 = HEAP32[$0 + -12 >> 2];\n      $7 = HEAP32[$0 + -16 >> 2];\n      $8 = HEAP32[$0 + -20 >> 2];\n      $9 = HEAP32[$0 + -24 >> 2];\n      $10 = HEAP32[$0 + -28 >> 2];\n      $11 = HEAP32[$0 + -32 >> 2];\n      $12 = HEAP32[$0 + -36 >> 2];\n      $13 = HEAP32[$0 + -40 >> 2];\n      $16 = HEAP32[$0 + -44 >> 2];\n      $18 = HEAP32[$2 >> 2];\n      $17 = HEAP32[$2 + 4 >> 2];\n      $20 = HEAP32[$2 + 8 >> 2];\n      $19 = HEAP32[$2 + 12 >> 2];\n      $22 = HEAP32[$2 + 16 >> 2];\n      $21 = HEAP32[$2 + 20 >> 2];\n      $24 = HEAP32[$2 + 24 >> 2];\n      $23 = HEAP32[$2 + 28 >> 2];\n      $26 = HEAP32[$2 + 32 >> 2];\n      $25 = HEAP32[$2 + 36 >> 2];\n      $28 = HEAP32[$2 + 40 >> 2];\n      $2 = 0;\n      while (1) {\n       $14 = $13;\n       $13 = $12;\n       $12 = $11;\n       $11 = $10;\n       $10 = $9;\n       $9 = $8;\n       $8 = $7;\n       $7 = $3;\n       $3 = $6;\n       $6 = $15;\n       $27 = $2 << 2;\n       $15 = HEAP32[$27 + $0 >> 2];\n       HEAP32[$5 + $27 >> 2] = $15 - ((((((((((Math_imul($14, $25) + Math_imul($16, $28) | 0) + Math_imul($13, $26) | 0) + Math_imul($12, $23) | 0) + Math_imul($11, $24) | 0) + Math_imul($10, $21) | 0) + Math_imul($9, $22) | 0) + Math_imul($8, $19) | 0) + Math_imul($7, $20) | 0) + Math_imul($3, $17) | 0) + Math_imul($6, $18) >> $4);\n       $16 = $14;\n       $2 = $2 + 1 | 0;\n       if (($2 | 0) != ($1 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$1;\n     }\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $16 = HEAP32[$0 + -4 >> 2];\n     $6 = HEAP32[$0 + -8 >> 2];\n     $3 = HEAP32[$0 + -12 >> 2];\n     $7 = HEAP32[$0 + -16 >> 2];\n     $8 = HEAP32[$0 + -20 >> 2];\n     $9 = HEAP32[$0 + -24 >> 2];\n     $10 = HEAP32[$0 + -28 >> 2];\n     $11 = HEAP32[$0 + -32 >> 2];\n     $12 = HEAP32[$0 + -36 >> 2];\n     $13 = HEAP32[$0 + -40 >> 2];\n     $14 = HEAP32[$0 + -44 >> 2];\n     $18 = HEAP32[$0 + -48 >> 2];\n     $17 = HEAP32[$2 >> 2];\n     $20 = HEAP32[$2 + 4 >> 2];\n     $19 = HEAP32[$2 + 8 >> 2];\n     $22 = HEAP32[$2 + 12 >> 2];\n     $21 = HEAP32[$2 + 16 >> 2];\n     $24 = HEAP32[$2 + 20 >> 2];\n     $23 = HEAP32[$2 + 24 >> 2];\n     $26 = HEAP32[$2 + 28 >> 2];\n     $25 = HEAP32[$2 + 32 >> 2];\n     $28 = HEAP32[$2 + 36 >> 2];\n     $27 = HEAP32[$2 + 40 >> 2];\n     $30 = HEAP32[$2 + 44 >> 2];\n     $2 = 0;\n     while (1) {\n      $15 = $14;\n      $14 = $13;\n      $13 = $12;\n      $12 = $11;\n      $11 = $10;\n      $10 = $9;\n      $9 = $8;\n      $8 = $7;\n      $7 = $3;\n      $3 = $6;\n      $6 = $16;\n      $29 = $2 << 2;\n      $16 = HEAP32[$29 + $0 >> 2];\n      HEAP32[$5 + $29 >> 2] = $16 - (((((((((((Math_imul($15, $27) + Math_imul($18, $30) | 0) + Math_imul($14, $28) | 0) + Math_imul($13, $25) | 0) + Math_imul($12, $26) | 0) + Math_imul($11, $23) | 0) + Math_imul($10, $24) | 0) + Math_imul($9, $21) | 0) + Math_imul($8, $22) | 0) + Math_imul($7, $19) | 0) + Math_imul($3, $20) | 0) + Math_imul($6, $17) >> $4);\n      $18 = $15;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($3 | 0) != 10) {\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $13 = HEAP32[$0 + -4 >> 2];\n     $6 = HEAP32[$0 + -8 >> 2];\n     $3 = HEAP32[$0 + -12 >> 2];\n     $7 = HEAP32[$0 + -16 >> 2];\n     $8 = HEAP32[$0 + -20 >> 2];\n     $9 = HEAP32[$0 + -24 >> 2];\n     $10 = HEAP32[$0 + -28 >> 2];\n     $11 = HEAP32[$0 + -32 >> 2];\n     $14 = HEAP32[$0 + -36 >> 2];\n     $16 = HEAP32[$2 >> 2];\n     $15 = HEAP32[$2 + 4 >> 2];\n     $18 = HEAP32[$2 + 8 >> 2];\n     $17 = HEAP32[$2 + 12 >> 2];\n     $20 = HEAP32[$2 + 16 >> 2];\n     $19 = HEAP32[$2 + 20 >> 2];\n     $22 = HEAP32[$2 + 24 >> 2];\n     $21 = HEAP32[$2 + 28 >> 2];\n     $24 = HEAP32[$2 + 32 >> 2];\n     $2 = 0;\n     while (1) {\n      $12 = $11;\n      $11 = $10;\n      $10 = $9;\n      $9 = $8;\n      $8 = $7;\n      $7 = $3;\n      $3 = $6;\n      $6 = $13;\n      $23 = $2 << 2;\n      $13 = HEAP32[$23 + $0 >> 2];\n      HEAP32[$5 + $23 >> 2] = $13 - ((((((((Math_imul($12, $21) + Math_imul($14, $24) | 0) + Math_imul($11, $22) | 0) + Math_imul($10, $19) | 0) + Math_imul($9, $20) | 0) + Math_imul($8, $17) | 0) + Math_imul($7, $18) | 0) + Math_imul($3, $15) | 0) + Math_imul($6, $16) >> $4);\n      $14 = $12;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $14 = HEAP32[$0 + -4 >> 2];\n    $6 = HEAP32[$0 + -8 >> 2];\n    $3 = HEAP32[$0 + -12 >> 2];\n    $7 = HEAP32[$0 + -16 >> 2];\n    $8 = HEAP32[$0 + -20 >> 2];\n    $9 = HEAP32[$0 + -24 >> 2];\n    $10 = HEAP32[$0 + -28 >> 2];\n    $11 = HEAP32[$0 + -32 >> 2];\n    $12 = HEAP32[$0 + -36 >> 2];\n    $15 = HEAP32[$0 + -40 >> 2];\n    $16 = HEAP32[$2 >> 2];\n    $18 = HEAP32[$2 + 4 >> 2];\n    $17 = HEAP32[$2 + 8 >> 2];\n    $20 = HEAP32[$2 + 12 >> 2];\n    $19 = HEAP32[$2 + 16 >> 2];\n    $22 = HEAP32[$2 + 20 >> 2];\n    $21 = HEAP32[$2 + 24 >> 2];\n    $24 = HEAP32[$2 + 28 >> 2];\n    $23 = HEAP32[$2 + 32 >> 2];\n    $26 = HEAP32[$2 + 36 >> 2];\n    $2 = 0;\n    while (1) {\n     $13 = $12;\n     $12 = $11;\n     $11 = $10;\n     $10 = $9;\n     $9 = $8;\n     $8 = $7;\n     $7 = $3;\n     $3 = $6;\n     $6 = $14;\n     $25 = $2 << 2;\n     $14 = HEAP32[$25 + $0 >> 2];\n     HEAP32[$5 + $25 >> 2] = $14 - (((((((((Math_imul($13, $23) + Math_imul($15, $26) | 0) + Math_imul($12, $24) | 0) + Math_imul($11, $21) | 0) + Math_imul($10, $22) | 0) + Math_imul($9, $19) | 0) + Math_imul($8, $20) | 0) + Math_imul($7, $17) | 0) + Math_imul($3, $18) | 0) + Math_imul($6, $16) >> $4);\n     $15 = $13;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if ($3 >>> 0 >= 5) {\n    if ($3 >>> 0 >= 7) {\n     if (($3 | 0) != 8) {\n      if (($1 | 0) < 1) {\n       break label$1\n      }\n      $11 = HEAP32[$0 + -4 >> 2];\n      $6 = HEAP32[$0 + -8 >> 2];\n      $3 = HEAP32[$0 + -12 >> 2];\n      $7 = HEAP32[$0 + -16 >> 2];\n      $8 = HEAP32[$0 + -20 >> 2];\n      $9 = HEAP32[$0 + -24 >> 2];\n      $12 = HEAP32[$0 + -28 >> 2];\n      $13 = HEAP32[$2 >> 2];\n      $14 = HEAP32[$2 + 4 >> 2];\n      $16 = HEAP32[$2 + 8 >> 2];\n      $15 = HEAP32[$2 + 12 >> 2];\n      $18 = HEAP32[$2 + 16 >> 2];\n      $17 = HEAP32[$2 + 20 >> 2];\n      $20 = HEAP32[$2 + 24 >> 2];\n      $2 = 0;\n      while (1) {\n       $10 = $9;\n       $9 = $8;\n       $8 = $7;\n       $7 = $3;\n       $3 = $6;\n       $6 = $11;\n       $19 = $2 << 2;\n       $11 = HEAP32[$19 + $0 >> 2];\n       HEAP32[$5 + $19 >> 2] = $11 - ((((((Math_imul($10, $17) + Math_imul($12, $20) | 0) + Math_imul($9, $18) | 0) + Math_imul($8, $15) | 0) + Math_imul($7, $16) | 0) + Math_imul($3, $14) | 0) + Math_imul($6, $13) >> $4);\n       $12 = $10;\n       $2 = $2 + 1 | 0;\n       if (($2 | 0) != ($1 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$1;\n     }\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $12 = HEAP32[$0 + -4 >> 2];\n     $6 = HEAP32[$0 + -8 >> 2];\n     $3 = HEAP32[$0 + -12 >> 2];\n     $7 = HEAP32[$0 + -16 >> 2];\n     $8 = HEAP32[$0 + -20 >> 2];\n     $9 = HEAP32[$0 + -24 >> 2];\n     $10 = HEAP32[$0 + -28 >> 2];\n     $13 = HEAP32[$0 + -32 >> 2];\n     $14 = HEAP32[$2 >> 2];\n     $16 = HEAP32[$2 + 4 >> 2];\n     $15 = HEAP32[$2 + 8 >> 2];\n     $18 = HEAP32[$2 + 12 >> 2];\n     $17 = HEAP32[$2 + 16 >> 2];\n     $20 = HEAP32[$2 + 20 >> 2];\n     $19 = HEAP32[$2 + 24 >> 2];\n     $22 = HEAP32[$2 + 28 >> 2];\n     $2 = 0;\n     while (1) {\n      $11 = $10;\n      $10 = $9;\n      $9 = $8;\n      $8 = $7;\n      $7 = $3;\n      $3 = $6;\n      $6 = $12;\n      $21 = $2 << 2;\n      $12 = HEAP32[$21 + $0 >> 2];\n      HEAP32[$5 + $21 >> 2] = $12 - (((((((Math_imul($11, $19) + Math_imul($13, $22) | 0) + Math_imul($10, $20) | 0) + Math_imul($9, $17) | 0) + Math_imul($8, $18) | 0) + Math_imul($7, $15) | 0) + Math_imul($3, $16) | 0) + Math_imul($6, $14) >> $4);\n      $13 = $11;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($3 | 0) != 6) {\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $9 = HEAP32[$0 + -4 >> 2];\n     $6 = HEAP32[$0 + -8 >> 2];\n     $3 = HEAP32[$0 + -12 >> 2];\n     $7 = HEAP32[$0 + -16 >> 2];\n     $10 = HEAP32[$0 + -20 >> 2];\n     $11 = HEAP32[$2 >> 2];\n     $12 = HEAP32[$2 + 4 >> 2];\n     $13 = HEAP32[$2 + 8 >> 2];\n     $14 = HEAP32[$2 + 12 >> 2];\n     $16 = HEAP32[$2 + 16 >> 2];\n     $2 = 0;\n     while (1) {\n      $8 = $7;\n      $7 = $3;\n      $3 = $6;\n      $6 = $9;\n      $15 = $2 << 2;\n      $9 = HEAP32[$15 + $0 >> 2];\n      HEAP32[$5 + $15 >> 2] = $9 - ((((Math_imul($8, $14) + Math_imul($10, $16) | 0) + Math_imul($7, $13) | 0) + Math_imul($3, $12) | 0) + Math_imul($6, $11) >> $4);\n      $10 = $8;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $10 = HEAP32[$0 + -4 >> 2];\n    $6 = HEAP32[$0 + -8 >> 2];\n    $3 = HEAP32[$0 + -12 >> 2];\n    $7 = HEAP32[$0 + -16 >> 2];\n    $8 = HEAP32[$0 + -20 >> 2];\n    $11 = HEAP32[$0 + -24 >> 2];\n    $12 = HEAP32[$2 >> 2];\n    $13 = HEAP32[$2 + 4 >> 2];\n    $14 = HEAP32[$2 + 8 >> 2];\n    $16 = HEAP32[$2 + 12 >> 2];\n    $15 = HEAP32[$2 + 16 >> 2];\n    $18 = HEAP32[$2 + 20 >> 2];\n    $2 = 0;\n    while (1) {\n     $9 = $8;\n     $8 = $7;\n     $7 = $3;\n     $3 = $6;\n     $6 = $10;\n     $17 = $2 << 2;\n     $10 = HEAP32[$17 + $0 >> 2];\n     HEAP32[$5 + $17 >> 2] = $10 - (((((Math_imul($9, $15) + Math_imul($11, $18) | 0) + Math_imul($8, $16) | 0) + Math_imul($7, $14) | 0) + Math_imul($3, $13) | 0) + Math_imul($6, $12) >> $4);\n     $11 = $9;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if ($3 >>> 0 >= 3) {\n    if (($3 | 0) != 4) {\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $7 = HEAP32[$0 + -4 >> 2];\n     $6 = HEAP32[$0 + -8 >> 2];\n     $8 = HEAP32[$0 + -12 >> 2];\n     $9 = HEAP32[$2 >> 2];\n     $10 = HEAP32[$2 + 4 >> 2];\n     $11 = HEAP32[$2 + 8 >> 2];\n     $2 = 0;\n     while (1) {\n      $3 = $6;\n      $6 = $7;\n      $12 = $2 << 2;\n      $7 = HEAP32[$12 + $0 >> 2];\n      HEAP32[$5 + $12 >> 2] = $7 - ((Math_imul($3, $10) + Math_imul($8, $11) | 0) + Math_imul($6, $9) >> $4);\n      $8 = $3;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $8 = HEAP32[$0 + -4 >> 2];\n    $6 = HEAP32[$0 + -8 >> 2];\n    $3 = HEAP32[$0 + -12 >> 2];\n    $9 = HEAP32[$0 + -16 >> 2];\n    $10 = HEAP32[$2 >> 2];\n    $11 = HEAP32[$2 + 4 >> 2];\n    $12 = HEAP32[$2 + 8 >> 2];\n    $13 = HEAP32[$2 + 12 >> 2];\n    $2 = 0;\n    while (1) {\n     $7 = $3;\n     $3 = $6;\n     $6 = $8;\n     $14 = $2 << 2;\n     $8 = HEAP32[$14 + $0 >> 2];\n     HEAP32[$5 + $14 >> 2] = $8 - (((Math_imul($7, $12) + Math_imul($9, $13) | 0) + Math_imul($3, $11) | 0) + Math_imul($6, $10) >> $4);\n     $9 = $7;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if (($3 | 0) != 2) {\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $6 = HEAP32[$0 + -4 >> 2];\n    $3 = HEAP32[$2 >> 2];\n    $2 = 0;\n    while (1) {\n     $7 = Math_imul($3, $6);\n     $8 = $2 << 2;\n     $6 = HEAP32[$8 + $0 >> 2];\n     HEAP32[$5 + $8 >> 2] = $6 - ($7 >> $4);\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if (($1 | 0) < 1) {\n    break label$1\n   }\n   $3 = HEAP32[$0 + -4 >> 2];\n   $7 = HEAP32[$0 + -8 >> 2];\n   $8 = HEAP32[$2 >> 2];\n   $9 = HEAP32[$2 + 4 >> 2];\n   $2 = 0;\n   while (1) {\n    $6 = $3;\n    $10 = $2 << 2;\n    $3 = HEAP32[$10 + $0 >> 2];\n    HEAP32[$5 + $10 >> 2] = $3 - (Math_imul($6, $8) + Math_imul($7, $9) >> $4);\n    $7 = $6;\n    $2 = $2 + 1 | 0;\n    if (($2 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__lpc_compute_residual_from_qlp_coefficients_wide($0, $1, $2, $3, $4, $5) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  $4 = $4 | 0;\n  $5 = $5 | 0;\n  var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0;\n  label$1 : {\n   if ($3 >>> 0 >= 13) {\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $18 = $4;\n    $12 = $3 + -13 | 0;\n    while (1) {\n     $4 = 0;\n     $3 = 0;\n     label$4 : {\n      switch ($12 | 0) {\n      case 19:\n       $3 = HEAP32[(($15 << 2) + $0 | 0) + -128 >> 2];\n       $4 = $3;\n       $7 = $3 >> 31;\n       $3 = HEAP32[$2 + 124 >> 2];\n       $4 = __wasm_i64_mul($4, $7, $3, $3 >> 31);\n       $3 = i64toi32_i32$HIGH_BITS;\n      case 18:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -124 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 120 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 17:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -120 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 116 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 16:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -116 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 112 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 15:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -112 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 108 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 14:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -108 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 104 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 13:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -104 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 100 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 12:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -100 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 96 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 11:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -96 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 92 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 10:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -92 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 88 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 9:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -88 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 84 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 8:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -84 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 80 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 7:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -80 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 76 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 6:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -76 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 72 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 5:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -72 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 68 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 4:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -68 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 64 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 3:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -64 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 60 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 2:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -60 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 56 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 1:\n       $7 = HEAP32[(($15 << 2) + $0 | 0) + -56 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 52 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 0:\n       $8 = ($15 << 2) + $0 | 0;\n       $7 = HEAP32[$8 + -52 >> 2];\n       $6 = $7;\n       $9 = $7 >> 31;\n       $7 = HEAP32[$2 + 48 >> 2];\n       $7 = __wasm_i64_mul($6, $9, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $3 = HEAP32[$8 + -48 >> 2];\n       $4 = $3;\n       $9 = $3 >> 31;\n       $3 = HEAP32[$2 + 44 >> 2];\n       $3 = __wasm_i64_mul($4, $9, $3, $3 >> 31);\n       $4 = $3 + $7 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;\n       $3 = HEAP32[$8 + -44 >> 2];\n       $7 = $3;\n       $9 = $3 >> 31;\n       $3 = HEAP32[$2 + 40 >> 2];\n       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);\n       $4 = $3 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;\n       $3 = HEAP32[$8 + -40 >> 2];\n       $7 = $3;\n       $9 = $3 >> 31;\n       $3 = HEAP32[$2 + 36 >> 2];\n       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);\n       $4 = $3 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;\n       $3 = HEAP32[$8 + -36 >> 2];\n       $7 = $3;\n       $9 = $3 >> 31;\n       $3 = HEAP32[$2 + 32 >> 2];\n       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);\n       $4 = $3 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;\n       $3 = HEAP32[$8 + -32 >> 2];\n       $7 = $3;\n       $9 = $3 >> 31;\n       $3 = HEAP32[$2 + 28 >> 2];\n       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);\n       $4 = $3 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;\n       $3 = HEAP32[$8 + -28 >> 2];\n       $7 = $3;\n       $9 = $3 >> 31;\n       $3 = HEAP32[$2 + 24 >> 2];\n       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);\n       $4 = $3 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;\n       $3 = HEAP32[$8 + -24 >> 2];\n       $7 = $3;\n       $9 = $3 >> 31;\n       $3 = HEAP32[$2 + 20 >> 2];\n       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);\n       $4 = $3 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;\n       $3 = HEAP32[$8 + -20 >> 2];\n       $7 = $3;\n       $9 = $3 >> 31;\n       $3 = HEAP32[$2 + 16 >> 2];\n       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);\n       $4 = $3 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;\n       $3 = HEAP32[$8 + -16 >> 2];\n       $7 = $3;\n       $9 = $3 >> 31;\n       $3 = HEAP32[$2 + 12 >> 2];\n       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);\n       $4 = $3 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;\n       $3 = HEAP32[$8 + -12 >> 2];\n       $7 = $3;\n       $9 = $3 >> 31;\n       $3 = HEAP32[$2 + 8 >> 2];\n       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);\n       $4 = $3 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;\n       $3 = HEAP32[$8 + -8 >> 2];\n       $7 = $3;\n       $9 = $3 >> 31;\n       $3 = HEAP32[$2 + 4 >> 2];\n       $3 = __wasm_i64_mul($7, $9, $3, $3 >> 31);\n       $4 = $3 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;\n       $3 = HEAP32[$8 + -4 >> 2];\n       $7 = $3;\n       $8 = $3 >> 31;\n       $3 = HEAP32[$2 >> 2];\n       $3 = __wasm_i64_mul($7, $8, $3, $3 >> 31);\n       $4 = $3 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $4 >>> 0 < $3 >>> 0 ? $6 + 1 | 0 : $6;\n       $3 = $6;\n       break;\n      default:\n       break label$4;\n      };\n     }\n     $7 = $15 << 2;\n     $6 = $7 + $5 | 0;\n     $9 = HEAP32[$0 + $7 >> 2];\n     $7 = $3;\n     $3 = $18;\n     $8 = $3 & 31;\n     HEAP32[$6 >> 2] = $9 - (32 <= ($3 & 63) >>> 0 ? $7 >> $8 : ((1 << $8) - 1 & $7) << 32 - $8 | $4 >>> $8);\n     $15 = $15 + 1 | 0;\n     if (($15 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if ($3 >>> 0 >= 9) {\n    if ($3 >>> 0 >= 11) {\n     if (($3 | 0) != 12) {\n      if (($1 | 0) < 1) {\n       break label$1\n      }\n      $10 = HEAP32[$0 + -4 >> 2];\n      $15 = HEAP32[$0 + -8 >> 2];\n      $3 = HEAP32[$0 + -12 >> 2];\n      $18 = HEAP32[$0 + -16 >> 2];\n      $7 = HEAP32[$0 + -20 >> 2];\n      $12 = HEAP32[$0 + -24 >> 2];\n      $8 = HEAP32[$0 + -28 >> 2];\n      $9 = HEAP32[$0 + -32 >> 2];\n      $11 = HEAP32[$0 + -36 >> 2];\n      $17 = HEAP32[$0 + -40 >> 2];\n      $13 = HEAP32[$0 + -44 >> 2];\n      $6 = HEAP32[$2 >> 2];\n      $40 = $6;\n      $41 = $6 >> 31;\n      $6 = HEAP32[$2 + 4 >> 2];\n      $42 = $6;\n      $37 = $6 >> 31;\n      $6 = HEAP32[$2 + 8 >> 2];\n      $38 = $6;\n      $39 = $6 >> 31;\n      $6 = HEAP32[$2 + 12 >> 2];\n      $34 = $6;\n      $35 = $6 >> 31;\n      $6 = HEAP32[$2 + 16 >> 2];\n      $36 = $6;\n      $31 = $6 >> 31;\n      $6 = HEAP32[$2 + 20 >> 2];\n      $32 = $6;\n      $33 = $6 >> 31;\n      $6 = HEAP32[$2 + 24 >> 2];\n      $29 = $6;\n      $30 = $6 >> 31;\n      $6 = HEAP32[$2 + 28 >> 2];\n      $26 = $6;\n      $27 = $6 >> 31;\n      $6 = HEAP32[$2 + 32 >> 2];\n      $28 = $6;\n      $23 = $6 >> 31;\n      $6 = HEAP32[$2 + 36 >> 2];\n      $24 = $6;\n      $25 = $6 >> 31;\n      $2 = HEAP32[$2 + 40 >> 2];\n      $21 = $2;\n      $22 = $2 >> 31;\n      $2 = 0;\n      while (1) {\n       $16 = $17;\n       $17 = $11;\n       $11 = $9;\n       $9 = $8;\n       $8 = $12;\n       $12 = $7;\n       $7 = $18;\n       $18 = $3;\n       $3 = $15;\n       $15 = $10;\n       $6 = $2 << 2;\n       $20 = $6 + $5 | 0;\n       $10 = HEAP32[$0 + $6 >> 2];\n       $14 = __wasm_i64_mul($16, $16 >> 31, $24, $25);\n       $6 = i64toi32_i32$HIGH_BITS;\n       $13 = __wasm_i64_mul($13, $13 >> 31, $21, $22);\n       $14 = $13 + $14 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;\n       $13 = __wasm_i64_mul($17, $17 >> 31, $28, $23);\n       $14 = $13 + $14 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;\n       $13 = __wasm_i64_mul($11, $11 >> 31, $26, $27);\n       $14 = $13 + $14 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;\n       $13 = __wasm_i64_mul($9, $9 >> 31, $29, $30);\n       $14 = $13 + $14 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;\n       $13 = __wasm_i64_mul($8, $8 >> 31, $32, $33);\n       $14 = $13 + $14 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;\n       $13 = __wasm_i64_mul($12, $12 >> 31, $36, $31);\n       $14 = $13 + $14 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;\n       $13 = __wasm_i64_mul($7, $7 >> 31, $34, $35);\n       $14 = $13 + $14 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;\n       $13 = __wasm_i64_mul($18, $18 >> 31, $38, $39);\n       $14 = $13 + $14 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;\n       $13 = __wasm_i64_mul($3, $3 >> 31, $42, $37);\n       $14 = $13 + $14 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;\n       $13 = __wasm_i64_mul($15, $15 >> 31, $40, $41);\n       $14 = $13 + $14 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $14 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;\n       $13 = $6;\n       $6 = $4;\n       $19 = $6 & 31;\n       HEAP32[$20 >> 2] = $10 - (32 <= ($6 & 63) >>> 0 ? $13 >> $19 : ((1 << $19) - 1 & $13) << 32 - $19 | $14 >>> $19);\n       $13 = $16;\n       $2 = $2 + 1 | 0;\n       if (($2 | 0) != ($1 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$1;\n     }\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $13 = HEAP32[$0 + -4 >> 2];\n     $15 = HEAP32[$0 + -8 >> 2];\n     $3 = HEAP32[$0 + -12 >> 2];\n     $18 = HEAP32[$0 + -16 >> 2];\n     $7 = HEAP32[$0 + -20 >> 2];\n     $12 = HEAP32[$0 + -24 >> 2];\n     $8 = HEAP32[$0 + -28 >> 2];\n     $9 = HEAP32[$0 + -32 >> 2];\n     $11 = HEAP32[$0 + -36 >> 2];\n     $17 = HEAP32[$0 + -40 >> 2];\n     $16 = HEAP32[$0 + -44 >> 2];\n     $6 = HEAP32[$0 + -48 >> 2];\n     $10 = HEAP32[$2 >> 2];\n     $43 = $10;\n     $44 = $10 >> 31;\n     $10 = HEAP32[$2 + 4 >> 2];\n     $45 = $10;\n     $40 = $10 >> 31;\n     $10 = HEAP32[$2 + 8 >> 2];\n     $41 = $10;\n     $42 = $10 >> 31;\n     $10 = HEAP32[$2 + 12 >> 2];\n     $37 = $10;\n     $38 = $10 >> 31;\n     $10 = HEAP32[$2 + 16 >> 2];\n     $39 = $10;\n     $34 = $10 >> 31;\n     $10 = HEAP32[$2 + 20 >> 2];\n     $35 = $10;\n     $36 = $10 >> 31;\n     $10 = HEAP32[$2 + 24 >> 2];\n     $31 = $10;\n     $32 = $10 >> 31;\n     $10 = HEAP32[$2 + 28 >> 2];\n     $33 = $10;\n     $29 = $10 >> 31;\n     $10 = HEAP32[$2 + 32 >> 2];\n     $30 = $10;\n     $26 = $10 >> 31;\n     $10 = HEAP32[$2 + 36 >> 2];\n     $27 = $10;\n     $28 = $10 >> 31;\n     $10 = HEAP32[$2 + 40 >> 2];\n     $23 = $10;\n     $24 = $10 >> 31;\n     $2 = HEAP32[$2 + 44 >> 2];\n     $25 = $2;\n     $21 = $2 >> 31;\n     $2 = 0;\n     while (1) {\n      $10 = $16;\n      $16 = $17;\n      $17 = $11;\n      $11 = $9;\n      $9 = $8;\n      $8 = $12;\n      $12 = $7;\n      $7 = $18;\n      $18 = $3;\n      $3 = $15;\n      $15 = $13;\n      $13 = $2 << 2;\n      $22 = $13 + $5 | 0;\n      $13 = HEAP32[$0 + $13 >> 2];\n      $14 = __wasm_i64_mul($10, $10 >> 31, $23, $24);\n      $19 = i64toi32_i32$HIGH_BITS;\n      $20 = $14;\n      $14 = __wasm_i64_mul($6, $6 >> 31, $25, $21);\n      $20 = $20 + $14 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $19 | 0;\n      $6 = $20 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $14 = __wasm_i64_mul($16, $16 >> 31, $27, $28);\n      $19 = $14 + $20 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $14 = __wasm_i64_mul($17, $17 >> 31, $30, $26);\n      $19 = $14 + $19 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $14 = __wasm_i64_mul($11, $11 >> 31, $33, $29);\n      $19 = $14 + $19 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $14 = __wasm_i64_mul($9, $9 >> 31, $31, $32);\n      $19 = $14 + $19 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $14 = __wasm_i64_mul($8, $8 >> 31, $35, $36);\n      $19 = $14 + $19 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $14 = __wasm_i64_mul($12, $12 >> 31, $39, $34);\n      $19 = $14 + $19 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $14 = __wasm_i64_mul($7, $7 >> 31, $37, $38);\n      $19 = $14 + $19 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $14 = __wasm_i64_mul($18, $18 >> 31, $41, $42);\n      $19 = $14 + $19 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $14 = __wasm_i64_mul($3, $3 >> 31, $45, $40);\n      $19 = $14 + $19 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $14 = __wasm_i64_mul($15, $15 >> 31, $43, $44);\n      $19 = $14 + $19 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $19 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $14 = $6;\n      $6 = $4;\n      $20 = $6 & 31;\n      HEAP32[$22 >> 2] = $13 - (32 <= ($6 & 63) >>> 0 ? $14 >> $20 : ((1 << $20) - 1 & $14) << 32 - $20 | $19 >>> $20);\n      $6 = $10;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($3 | 0) != 10) {\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $17 = HEAP32[$0 + -4 >> 2];\n     $15 = HEAP32[$0 + -8 >> 2];\n     $3 = HEAP32[$0 + -12 >> 2];\n     $18 = HEAP32[$0 + -16 >> 2];\n     $7 = HEAP32[$0 + -20 >> 2];\n     $12 = HEAP32[$0 + -24 >> 2];\n     $8 = HEAP32[$0 + -28 >> 2];\n     $9 = HEAP32[$0 + -32 >> 2];\n     $16 = HEAP32[$0 + -36 >> 2];\n     $11 = HEAP32[$2 >> 2];\n     $34 = $11;\n     $35 = $11 >> 31;\n     $11 = HEAP32[$2 + 4 >> 2];\n     $36 = $11;\n     $31 = $11 >> 31;\n     $11 = HEAP32[$2 + 8 >> 2];\n     $32 = $11;\n     $33 = $11 >> 31;\n     $11 = HEAP32[$2 + 12 >> 2];\n     $29 = $11;\n     $30 = $11 >> 31;\n     $11 = HEAP32[$2 + 16 >> 2];\n     $26 = $11;\n     $27 = $11 >> 31;\n     $11 = HEAP32[$2 + 20 >> 2];\n     $28 = $11;\n     $23 = $11 >> 31;\n     $11 = HEAP32[$2 + 24 >> 2];\n     $24 = $11;\n     $25 = $11 >> 31;\n     $11 = HEAP32[$2 + 28 >> 2];\n     $21 = $11;\n     $22 = $11 >> 31;\n     $2 = HEAP32[$2 + 32 >> 2];\n     $20 = $2;\n     $19 = $2 >> 31;\n     $2 = 0;\n     while (1) {\n      $11 = $9;\n      $9 = $8;\n      $8 = $12;\n      $12 = $7;\n      $7 = $18;\n      $18 = $3;\n      $3 = $15;\n      $15 = $17;\n      $6 = $2 << 2;\n      $14 = $6 + $5 | 0;\n      $17 = HEAP32[$0 + $6 >> 2];\n      $10 = __wasm_i64_mul($11, $11 >> 31, $21, $22);\n      $6 = i64toi32_i32$HIGH_BITS;\n      $16 = __wasm_i64_mul($16, $16 >> 31, $20, $19);\n      $10 = $16 + $10 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n      $16 = __wasm_i64_mul($9, $9 >> 31, $24, $25);\n      $10 = $16 + $10 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n      $16 = __wasm_i64_mul($8, $8 >> 31, $28, $23);\n      $10 = $16 + $10 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n      $16 = __wasm_i64_mul($12, $12 >> 31, $26, $27);\n      $10 = $16 + $10 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n      $16 = __wasm_i64_mul($7, $7 >> 31, $29, $30);\n      $10 = $16 + $10 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n      $16 = __wasm_i64_mul($18, $18 >> 31, $32, $33);\n      $10 = $16 + $10 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n      $16 = __wasm_i64_mul($3, $3 >> 31, $36, $31);\n      $10 = $16 + $10 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n      $16 = __wasm_i64_mul($15, $15 >> 31, $34, $35);\n      $10 = $16 + $10 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n      $16 = $6;\n      $6 = $4;\n      $13 = $6 & 31;\n      HEAP32[$14 >> 2] = $17 - (32 <= ($6 & 63) >>> 0 ? $16 >> $13 : ((1 << $13) - 1 & $16) << 32 - $13 | $10 >>> $13);\n      $16 = $11;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $16 = HEAP32[$0 + -4 >> 2];\n    $15 = HEAP32[$0 + -8 >> 2];\n    $3 = HEAP32[$0 + -12 >> 2];\n    $18 = HEAP32[$0 + -16 >> 2];\n    $7 = HEAP32[$0 + -20 >> 2];\n    $12 = HEAP32[$0 + -24 >> 2];\n    $8 = HEAP32[$0 + -28 >> 2];\n    $9 = HEAP32[$0 + -32 >> 2];\n    $11 = HEAP32[$0 + -36 >> 2];\n    $10 = HEAP32[$0 + -40 >> 2];\n    $6 = HEAP32[$2 >> 2];\n    $37 = $6;\n    $38 = $6 >> 31;\n    $6 = HEAP32[$2 + 4 >> 2];\n    $39 = $6;\n    $34 = $6 >> 31;\n    $6 = HEAP32[$2 + 8 >> 2];\n    $35 = $6;\n    $36 = $6 >> 31;\n    $6 = HEAP32[$2 + 12 >> 2];\n    $31 = $6;\n    $32 = $6 >> 31;\n    $6 = HEAP32[$2 + 16 >> 2];\n    $33 = $6;\n    $29 = $6 >> 31;\n    $6 = HEAP32[$2 + 20 >> 2];\n    $30 = $6;\n    $26 = $6 >> 31;\n    $6 = HEAP32[$2 + 24 >> 2];\n    $27 = $6;\n    $28 = $6 >> 31;\n    $6 = HEAP32[$2 + 28 >> 2];\n    $23 = $6;\n    $24 = $6 >> 31;\n    $6 = HEAP32[$2 + 32 >> 2];\n    $25 = $6;\n    $21 = $6 >> 31;\n    $2 = HEAP32[$2 + 36 >> 2];\n    $22 = $2;\n    $20 = $2 >> 31;\n    $2 = 0;\n    while (1) {\n     $17 = $11;\n     $11 = $9;\n     $9 = $8;\n     $8 = $12;\n     $12 = $7;\n     $7 = $18;\n     $18 = $3;\n     $3 = $15;\n     $15 = $16;\n     $6 = $2 << 2;\n     $19 = $6 + $5 | 0;\n     $16 = HEAP32[$0 + $6 >> 2];\n     $13 = __wasm_i64_mul($17, $17 >> 31, $25, $21);\n     $6 = i64toi32_i32$HIGH_BITS;\n     $10 = __wasm_i64_mul($10, $10 >> 31, $22, $20);\n     $13 = $10 + $13 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;\n     $10 = __wasm_i64_mul($11, $11 >> 31, $23, $24);\n     $13 = $10 + $13 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;\n     $10 = __wasm_i64_mul($9, $9 >> 31, $27, $28);\n     $13 = $10 + $13 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;\n     $10 = __wasm_i64_mul($8, $8 >> 31, $30, $26);\n     $13 = $10 + $13 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;\n     $10 = __wasm_i64_mul($12, $12 >> 31, $33, $29);\n     $13 = $10 + $13 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;\n     $10 = __wasm_i64_mul($7, $7 >> 31, $31, $32);\n     $13 = $10 + $13 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;\n     $10 = __wasm_i64_mul($18, $18 >> 31, $35, $36);\n     $13 = $10 + $13 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;\n     $10 = __wasm_i64_mul($3, $3 >> 31, $39, $34);\n     $13 = $10 + $13 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;\n     $10 = __wasm_i64_mul($15, $15 >> 31, $37, $38);\n     $13 = $10 + $13 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;\n     $10 = $6;\n     $6 = $4;\n     $14 = $6 & 31;\n     HEAP32[$19 >> 2] = $16 - (32 <= ($6 & 63) >>> 0 ? $10 >> $14 : ((1 << $14) - 1 & $10) << 32 - $14 | $13 >>> $14);\n     $10 = $17;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if ($3 >>> 0 >= 5) {\n    if ($3 >>> 0 >= 7) {\n     if (($3 | 0) != 8) {\n      if (($1 | 0) < 1) {\n       break label$1\n      }\n      $9 = HEAP32[$0 + -4 >> 2];\n      $15 = HEAP32[$0 + -8 >> 2];\n      $3 = HEAP32[$0 + -12 >> 2];\n      $18 = HEAP32[$0 + -16 >> 2];\n      $7 = HEAP32[$0 + -20 >> 2];\n      $12 = HEAP32[$0 + -24 >> 2];\n      $11 = HEAP32[$0 + -28 >> 2];\n      $8 = HEAP32[$2 >> 2];\n      $29 = $8;\n      $30 = $8 >> 31;\n      $8 = HEAP32[$2 + 4 >> 2];\n      $26 = $8;\n      $27 = $8 >> 31;\n      $8 = HEAP32[$2 + 8 >> 2];\n      $28 = $8;\n      $23 = $8 >> 31;\n      $8 = HEAP32[$2 + 12 >> 2];\n      $24 = $8;\n      $25 = $8 >> 31;\n      $8 = HEAP32[$2 + 16 >> 2];\n      $21 = $8;\n      $22 = $8 >> 31;\n      $8 = HEAP32[$2 + 20 >> 2];\n      $20 = $8;\n      $19 = $8 >> 31;\n      $2 = HEAP32[$2 + 24 >> 2];\n      $14 = $2;\n      $13 = $2 >> 31;\n      $2 = 0;\n      while (1) {\n       $8 = $12;\n       $12 = $7;\n       $7 = $18;\n       $18 = $3;\n       $3 = $15;\n       $15 = $9;\n       $9 = $2 << 2;\n       $10 = $9 + $5 | 0;\n       $9 = HEAP32[$0 + $9 >> 2];\n       $17 = __wasm_i64_mul($8, $8 >> 31, $20, $19);\n       $6 = i64toi32_i32$HIGH_BITS;\n       $11 = __wasm_i64_mul($11, $11 >> 31, $14, $13);\n       $17 = $11 + $17 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;\n       $11 = __wasm_i64_mul($12, $12 >> 31, $21, $22);\n       $17 = $11 + $17 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;\n       $11 = __wasm_i64_mul($7, $7 >> 31, $24, $25);\n       $17 = $11 + $17 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;\n       $11 = __wasm_i64_mul($18, $18 >> 31, $28, $23);\n       $17 = $11 + $17 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;\n       $11 = __wasm_i64_mul($3, $3 >> 31, $26, $27);\n       $17 = $11 + $17 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;\n       $11 = __wasm_i64_mul($15, $15 >> 31, $29, $30);\n       $17 = $11 + $17 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $17 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;\n       $16 = $4 & 31;\n       HEAP32[$10 >> 2] = $9 - (32 <= ($4 & 63) >>> 0 ? $6 >> $16 : ((1 << $16) - 1 & $6) << 32 - $16 | $17 >>> $16);\n       $11 = $8;\n       $2 = $2 + 1 | 0;\n       if (($2 | 0) != ($1 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$1;\n     }\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $11 = HEAP32[$0 + -4 >> 2];\n     $15 = HEAP32[$0 + -8 >> 2];\n     $3 = HEAP32[$0 + -12 >> 2];\n     $18 = HEAP32[$0 + -16 >> 2];\n     $7 = HEAP32[$0 + -20 >> 2];\n     $12 = HEAP32[$0 + -24 >> 2];\n     $8 = HEAP32[$0 + -28 >> 2];\n     $17 = HEAP32[$0 + -32 >> 2];\n     $9 = HEAP32[$2 >> 2];\n     $31 = $9;\n     $32 = $9 >> 31;\n     $9 = HEAP32[$2 + 4 >> 2];\n     $33 = $9;\n     $29 = $9 >> 31;\n     $9 = HEAP32[$2 + 8 >> 2];\n     $30 = $9;\n     $26 = $9 >> 31;\n     $9 = HEAP32[$2 + 12 >> 2];\n     $27 = $9;\n     $28 = $9 >> 31;\n     $9 = HEAP32[$2 + 16 >> 2];\n     $23 = $9;\n     $24 = $9 >> 31;\n     $9 = HEAP32[$2 + 20 >> 2];\n     $25 = $9;\n     $21 = $9 >> 31;\n     $9 = HEAP32[$2 + 24 >> 2];\n     $22 = $9;\n     $20 = $9 >> 31;\n     $2 = HEAP32[$2 + 28 >> 2];\n     $19 = $2;\n     $14 = $2 >> 31;\n     $2 = 0;\n     while (1) {\n      $9 = $8;\n      $8 = $12;\n      $12 = $7;\n      $7 = $18;\n      $18 = $3;\n      $3 = $15;\n      $15 = $11;\n      $11 = $2 << 2;\n      $13 = $11 + $5 | 0;\n      $11 = HEAP32[$0 + $11 >> 2];\n      $16 = __wasm_i64_mul($9, $9 >> 31, $22, $20);\n      $6 = i64toi32_i32$HIGH_BITS;\n      $17 = __wasm_i64_mul($17, $17 >> 31, $19, $14);\n      $16 = $17 + $16 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $17 = __wasm_i64_mul($8, $8 >> 31, $25, $21);\n      $16 = $17 + $16 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $17 = __wasm_i64_mul($12, $12 >> 31, $23, $24);\n      $16 = $17 + $16 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $17 = __wasm_i64_mul($7, $7 >> 31, $27, $28);\n      $16 = $17 + $16 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $17 = __wasm_i64_mul($18, $18 >> 31, $30, $26);\n      $16 = $17 + $16 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $17 = __wasm_i64_mul($3, $3 >> 31, $33, $29);\n      $16 = $17 + $16 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $17 = __wasm_i64_mul($15, $15 >> 31, $31, $32);\n      $16 = $17 + $16 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $17 = $6;\n      $6 = $4;\n      $10 = $6 & 31;\n      HEAP32[$13 >> 2] = $11 - (32 <= ($6 & 63) >>> 0 ? $17 >> $10 : ((1 << $10) - 1 & $17) << 32 - $10 | $16 >>> $10);\n      $17 = $9;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($3 | 0) != 6) {\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $12 = HEAP32[$0 + -4 >> 2];\n     $15 = HEAP32[$0 + -8 >> 2];\n     $3 = HEAP32[$0 + -12 >> 2];\n     $18 = HEAP32[$0 + -16 >> 2];\n     $8 = HEAP32[$0 + -20 >> 2];\n     $7 = HEAP32[$2 >> 2];\n     $23 = $7;\n     $24 = $7 >> 31;\n     $7 = HEAP32[$2 + 4 >> 2];\n     $25 = $7;\n     $21 = $7 >> 31;\n     $7 = HEAP32[$2 + 8 >> 2];\n     $22 = $7;\n     $20 = $7 >> 31;\n     $7 = HEAP32[$2 + 12 >> 2];\n     $19 = $7;\n     $14 = $7 >> 31;\n     $2 = HEAP32[$2 + 16 >> 2];\n     $13 = $2;\n     $10 = $2 >> 31;\n     $2 = 0;\n     while (1) {\n      $7 = $18;\n      $18 = $3;\n      $3 = $15;\n      $15 = $12;\n      $12 = $2 << 2;\n      $16 = $12 + $5 | 0;\n      $12 = HEAP32[$0 + $12 >> 2];\n      $11 = __wasm_i64_mul($7, $7 >> 31, $19, $14);\n      $9 = i64toi32_i32$HIGH_BITS;\n      $8 = __wasm_i64_mul($8, $8 >> 31, $13, $10);\n      $11 = $8 + $11 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $9 | 0;\n      $6 = $11 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6;\n      $8 = __wasm_i64_mul($18, $18 >> 31, $22, $20);\n      $9 = $8 + $11 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $9 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6;\n      $8 = __wasm_i64_mul($3, $3 >> 31, $25, $21);\n      $9 = $8 + $9 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $9 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6;\n      $8 = __wasm_i64_mul($15, $15 >> 31, $23, $24);\n      $9 = $8 + $9 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $9 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6;\n      $11 = $4 & 31;\n      HEAP32[$16 >> 2] = $12 - (32 <= ($4 & 63) >>> 0 ? $6 >> $11 : ((1 << $11) - 1 & $6) << 32 - $11 | $9 >>> $11);\n      $8 = $7;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $8 = HEAP32[$0 + -4 >> 2];\n    $15 = HEAP32[$0 + -8 >> 2];\n    $3 = HEAP32[$0 + -12 >> 2];\n    $18 = HEAP32[$0 + -16 >> 2];\n    $7 = HEAP32[$0 + -20 >> 2];\n    $9 = HEAP32[$0 + -24 >> 2];\n    $12 = HEAP32[$2 >> 2];\n    $27 = $12;\n    $28 = $12 >> 31;\n    $12 = HEAP32[$2 + 4 >> 2];\n    $23 = $12;\n    $24 = $12 >> 31;\n    $12 = HEAP32[$2 + 8 >> 2];\n    $25 = $12;\n    $21 = $12 >> 31;\n    $12 = HEAP32[$2 + 12 >> 2];\n    $22 = $12;\n    $20 = $12 >> 31;\n    $12 = HEAP32[$2 + 16 >> 2];\n    $19 = $12;\n    $14 = $12 >> 31;\n    $2 = HEAP32[$2 + 20 >> 2];\n    $13 = $2;\n    $10 = $2 >> 31;\n    $2 = 0;\n    while (1) {\n     $12 = $7;\n     $7 = $18;\n     $18 = $3;\n     $3 = $15;\n     $15 = $8;\n     $8 = $2 << 2;\n     $16 = $8 + $5 | 0;\n     $8 = HEAP32[$0 + $8 >> 2];\n     $6 = __wasm_i64_mul($12, $12 >> 31, $19, $14);\n     $11 = i64toi32_i32$HIGH_BITS;\n     $9 = __wasm_i64_mul($9, $9 >> 31, $13, $10);\n     $26 = $9 + $6 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $11 | 0;\n     $6 = $26 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;\n     $9 = __wasm_i64_mul($7, $7 >> 31, $22, $20);\n     $11 = $9 + $26 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $11 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;\n     $9 = __wasm_i64_mul($18, $18 >> 31, $25, $21);\n     $11 = $9 + $11 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $11 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;\n     $9 = __wasm_i64_mul($3, $3 >> 31, $23, $24);\n     $11 = $9 + $11 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $11 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;\n     $9 = __wasm_i64_mul($15, $15 >> 31, $27, $28);\n     $11 = $9 + $11 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $11 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;\n     $17 = $4 & 31;\n     HEAP32[$16 >> 2] = $8 - (32 <= ($4 & 63) >>> 0 ? $6 >> $17 : ((1 << $17) - 1 & $6) << 32 - $17 | $11 >>> $17);\n     $9 = $12;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if ($3 >>> 0 >= 3) {\n    if (($3 | 0) != 4) {\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $18 = HEAP32[$0 + -4 >> 2];\n     $15 = HEAP32[$0 + -8 >> 2];\n     $7 = HEAP32[$0 + -12 >> 2];\n     $3 = HEAP32[$2 >> 2];\n     $19 = $3;\n     $14 = $3 >> 31;\n     $3 = HEAP32[$2 + 4 >> 2];\n     $13 = $3;\n     $10 = $3 >> 31;\n     $2 = HEAP32[$2 + 8 >> 2];\n     $16 = $2;\n     $17 = $2 >> 31;\n     $2 = 0;\n     while (1) {\n      $3 = $15;\n      $15 = $18;\n      $18 = $2 << 2;\n      $11 = $18 + $5 | 0;\n      $18 = HEAP32[$0 + $18 >> 2];\n      $9 = $18;\n      $8 = __wasm_i64_mul($3, $3 >> 31, $13, $10);\n      $12 = i64toi32_i32$HIGH_BITS;\n      $7 = __wasm_i64_mul($7, $7 >> 31, $16, $17);\n      $8 = $7 + $8 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $12 | 0;\n      $6 = $8 >>> 0 < $7 >>> 0 ? $6 + 1 | 0 : $6;\n      $7 = __wasm_i64_mul($15, $15 >> 31, $19, $14);\n      $12 = $7 + $8 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $12 >>> 0 < $7 >>> 0 ? $6 + 1 | 0 : $6;\n      $7 = $4;\n      $8 = $7 & 31;\n      HEAP32[$11 >> 2] = $9 - (32 <= ($7 & 63) >>> 0 ? $6 >> $8 : ((1 << $8) - 1 & $6) << 32 - $8 | $12 >>> $8);\n      $7 = $3;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $7 = HEAP32[$0 + -4 >> 2];\n    $15 = HEAP32[$0 + -8 >> 2];\n    $3 = HEAP32[$0 + -12 >> 2];\n    $12 = HEAP32[$0 + -16 >> 2];\n    $18 = HEAP32[$2 >> 2];\n    $21 = $18;\n    $22 = $18 >> 31;\n    $18 = HEAP32[$2 + 4 >> 2];\n    $20 = $18;\n    $19 = $18 >> 31;\n    $18 = HEAP32[$2 + 8 >> 2];\n    $14 = $18;\n    $13 = $14 >> 31;\n    $2 = HEAP32[$2 + 12 >> 2];\n    $10 = $2;\n    $16 = $2 >> 31;\n    $2 = 0;\n    while (1) {\n     $18 = $3;\n     $3 = $15;\n     $15 = $7;\n     $7 = $2 << 2;\n     $17 = $7 + $5 | 0;\n     $7 = HEAP32[$0 + $7 >> 2];\n     $9 = __wasm_i64_mul($18, $18 >> 31, $14, $13);\n     $8 = i64toi32_i32$HIGH_BITS;\n     $12 = __wasm_i64_mul($12, $12 >> 31, $10, $16);\n     $9 = $12 + $9 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $8 | 0;\n     $6 = $9 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6;\n     $12 = __wasm_i64_mul($3, $3 >> 31, $20, $19);\n     $8 = $12 + $9 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $8 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6;\n     $12 = __wasm_i64_mul($15, $15 >> 31, $21, $22);\n     $8 = $12 + $8 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $8 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6;\n     $9 = $4 & 31;\n     HEAP32[$17 >> 2] = $7 - (32 <= ($4 & 63) >>> 0 ? $6 >> $9 : ((1 << $9) - 1 & $6) << 32 - $9 | $8 >>> $9);\n     $12 = $18;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if (($3 | 0) != 2) {\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $15 = HEAP32[$0 + -4 >> 2];\n    $2 = HEAP32[$2 >> 2];\n    $9 = $2;\n    $8 = $2 >> 31;\n    $2 = 0;\n    while (1) {\n     $3 = $2 << 2;\n     $6 = $3 + $5 | 0;\n     $18 = HEAP32[$0 + $3 >> 2];\n     $15 = __wasm_i64_mul($15, $15 >> 31, $9, $8);\n     $7 = i64toi32_i32$HIGH_BITS;\n     $3 = $4;\n     $12 = $3 & 31;\n     HEAP32[$6 >> 2] = $18 - (32 <= ($3 & 63) >>> 0 ? $7 >> $12 : ((1 << $12) - 1 & $7) << 32 - $12 | $15 >>> $12);\n     $15 = $18;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if (($1 | 0) < 1) {\n    break label$1\n   }\n   $3 = HEAP32[$0 + -4 >> 2];\n   $18 = HEAP32[$0 + -8 >> 2];\n   $15 = HEAP32[$2 >> 2];\n   $10 = $15;\n   $16 = $10 >> 31;\n   $2 = HEAP32[$2 + 4 >> 2];\n   $17 = $2;\n   $11 = $2 >> 31;\n   $2 = 0;\n   while (1) {\n    $15 = $3;\n    $3 = $2 << 2;\n    $9 = $3 + $5 | 0;\n    $3 = HEAP32[$0 + $3 >> 2];\n    $12 = __wasm_i64_mul($15, $15 >> 31, $10, $16);\n    $7 = i64toi32_i32$HIGH_BITS;\n    $18 = __wasm_i64_mul($18, $18 >> 31, $17, $11);\n    $12 = $18 + $12 | 0;\n    $6 = i64toi32_i32$HIGH_BITS + $7 | 0;\n    $6 = $12 >>> 0 < $18 >>> 0 ? $6 + 1 | 0 : $6;\n    $7 = $12;\n    $12 = $4 & 31;\n    HEAP32[$9 >> 2] = $3 - (32 <= ($4 & 63) >>> 0 ? $6 >> $12 : ((1 << $12) - 1 & $6) << 32 - $12 | $7 >>> $12);\n    $18 = $15;\n    $2 = $2 + 1 | 0;\n    if (($2 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__lpc_restore_signal($0, $1, $2, $3, $4, $5) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  $4 = $4 | 0;\n  $5 = $5 | 0;\n  var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0;\n  label$1 : {\n   if ($3 >>> 0 >= 13) {\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $17 = $3 + -13 | 0;\n    while (1) {\n     $25 = 0;\n     $26 = 0;\n     $23 = 0;\n     $24 = 0;\n     $21 = 0;\n     $22 = 0;\n     $19 = 0;\n     $20 = 0;\n     $18 = 0;\n     $15 = 0;\n     $12 = 0;\n     $10 = 0;\n     $14 = 0;\n     $9 = 0;\n     $13 = 0;\n     $7 = 0;\n     $16 = 0;\n     $11 = 0;\n     $8 = 0;\n     $3 = 0;\n     label$4 : {\n      switch ($17 | 0) {\n      case 19:\n       $25 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -128 >> 2], HEAP32[$2 + 124 >> 2]);\n      case 18:\n       $26 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -124 >> 2], HEAP32[$2 + 120 >> 2]) + $25 | 0;\n      case 17:\n       $23 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -120 >> 2], HEAP32[$2 + 116 >> 2]) + $26 | 0;\n      case 16:\n       $24 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -116 >> 2], HEAP32[$2 + 112 >> 2]) + $23 | 0;\n      case 15:\n       $21 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -112 >> 2], HEAP32[$2 + 108 >> 2]) + $24 | 0;\n      case 14:\n       $22 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -108 >> 2], HEAP32[$2 + 104 >> 2]) + $21 | 0;\n      case 13:\n       $19 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -104 >> 2], HEAP32[$2 + 100 >> 2]) + $22 | 0;\n      case 12:\n       $20 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -100 >> 2], HEAP32[$2 + 96 >> 2]) + $19 | 0;\n      case 11:\n       $18 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -96 >> 2], HEAP32[$2 + 92 >> 2]) + $20 | 0;\n      case 10:\n       $15 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -92 >> 2], HEAP32[$2 + 88 >> 2]) + $18 | 0;\n      case 9:\n       $12 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -88 >> 2], HEAP32[$2 + 84 >> 2]) + $15 | 0;\n      case 8:\n       $10 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -84 >> 2], HEAP32[$2 + 80 >> 2]) + $12 | 0;\n      case 7:\n       $14 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -80 >> 2], HEAP32[$2 + 76 >> 2]) + $10 | 0;\n      case 6:\n       $9 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -76 >> 2], HEAP32[$2 + 72 >> 2]) + $14 | 0;\n      case 5:\n       $13 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -72 >> 2], HEAP32[$2 + 68 >> 2]) + $9 | 0;\n      case 4:\n       $7 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -68 >> 2], HEAP32[$2 + 64 >> 2]) + $13 | 0;\n      case 3:\n       $16 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -64 >> 2], HEAP32[$2 + 60 >> 2]) + $7 | 0;\n      case 2:\n       $11 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -60 >> 2], HEAP32[$2 + 56 >> 2]) + $16 | 0;\n      case 1:\n       $8 = Math_imul(HEAP32[(($6 << 2) + $5 | 0) + -56 >> 2], HEAP32[$2 + 52 >> 2]) + $11 | 0;\n      case 0:\n       $3 = ($6 << 2) + $5 | 0;\n       $3 = ((((((((((((Math_imul(HEAP32[$3 + -52 >> 2], HEAP32[$2 + 48 >> 2]) + $8 | 0) + Math_imul(HEAP32[$3 + -48 >> 2], HEAP32[$2 + 44 >> 2]) | 0) + Math_imul(HEAP32[$3 + -44 >> 2], HEAP32[$2 + 40 >> 2]) | 0) + Math_imul(HEAP32[$3 + -40 >> 2], HEAP32[$2 + 36 >> 2]) | 0) + Math_imul(HEAP32[$3 + -36 >> 2], HEAP32[$2 + 32 >> 2]) | 0) + Math_imul(HEAP32[$3 + -32 >> 2], HEAP32[$2 + 28 >> 2]) | 0) + Math_imul(HEAP32[$3 + -28 >> 2], HEAP32[$2 + 24 >> 2]) | 0) + Math_imul(HEAP32[$3 + -24 >> 2], HEAP32[$2 + 20 >> 2]) | 0) + Math_imul(HEAP32[$3 + -20 >> 2], HEAP32[$2 + 16 >> 2]) | 0) + Math_imul(HEAP32[$3 + -16 >> 2], HEAP32[$2 + 12 >> 2]) | 0) + Math_imul(HEAP32[$3 + -12 >> 2], HEAP32[$2 + 8 >> 2]) | 0) + Math_imul(HEAP32[$3 + -8 >> 2], HEAP32[$2 + 4 >> 2]) | 0) + Math_imul(HEAP32[$3 + -4 >> 2], HEAP32[$2 >> 2]) | 0;\n       break;\n      default:\n       break label$4;\n      };\n     }\n     $8 = $6 << 2;\n     HEAP32[$8 + $5 >> 2] = HEAP32[$0 + $8 >> 2] + ($3 >> $4);\n     $6 = $6 + 1 | 0;\n     if (($6 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if ($3 >>> 0 >= 9) {\n    if ($3 >>> 0 >= 11) {\n     if (($3 | 0) != 12) {\n      if (($1 | 0) < 1) {\n       break label$1\n      }\n      $6 = HEAP32[$5 + -4 >> 2];\n      $3 = HEAP32[$5 + -8 >> 2];\n      $8 = HEAP32[$5 + -12 >> 2];\n      $11 = HEAP32[$5 + -16 >> 2];\n      $16 = HEAP32[$5 + -20 >> 2];\n      $7 = HEAP32[$5 + -24 >> 2];\n      $13 = HEAP32[$5 + -28 >> 2];\n      $9 = HEAP32[$5 + -32 >> 2];\n      $14 = HEAP32[$5 + -36 >> 2];\n      $10 = HEAP32[$5 + -40 >> 2];\n      $12 = HEAP32[$5 + -44 >> 2];\n      $27 = HEAP32[$2 >> 2];\n      $28 = HEAP32[$2 + 4 >> 2];\n      $25 = HEAP32[$2 + 8 >> 2];\n      $26 = HEAP32[$2 + 12 >> 2];\n      $23 = HEAP32[$2 + 16 >> 2];\n      $24 = HEAP32[$2 + 20 >> 2];\n      $21 = HEAP32[$2 + 24 >> 2];\n      $22 = HEAP32[$2 + 28 >> 2];\n      $19 = HEAP32[$2 + 32 >> 2];\n      $20 = HEAP32[$2 + 36 >> 2];\n      $18 = HEAP32[$2 + 40 >> 2];\n      $2 = 0;\n      while (1) {\n       $17 = $10;\n       $12 = Math_imul($10, $20) + Math_imul($12, $18) | 0;\n       $10 = $14;\n       $12 = $12 + Math_imul($19, $10) | 0;\n       $14 = $9;\n       $12 = Math_imul($9, $22) + $12 | 0;\n       $9 = $13;\n       $12 = $12 + Math_imul($21, $9) | 0;\n       $13 = $7;\n       $12 = Math_imul($7, $24) + $12 | 0;\n       $7 = $16;\n       $12 = $12 + Math_imul($23, $7) | 0;\n       $16 = $11;\n       $12 = Math_imul($11, $26) + $12 | 0;\n       $11 = $8;\n       $15 = Math_imul($8, $25) + $12 | 0;\n       $8 = $3;\n       $12 = $2 << 2;\n       $15 = Math_imul($3, $28) + $15 | 0;\n       $3 = $6;\n       $6 = HEAP32[$12 + $0 >> 2] + ($15 + Math_imul($27, $3) >> $4) | 0;\n       HEAP32[$5 + $12 >> 2] = $6;\n       $12 = $17;\n       $2 = $2 + 1 | 0;\n       if (($2 | 0) != ($1 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$1;\n     }\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $6 = HEAP32[$5 + -4 >> 2];\n     $3 = HEAP32[$5 + -8 >> 2];\n     $8 = HEAP32[$5 + -12 >> 2];\n     $11 = HEAP32[$5 + -16 >> 2];\n     $16 = HEAP32[$5 + -20 >> 2];\n     $7 = HEAP32[$5 + -24 >> 2];\n     $13 = HEAP32[$5 + -28 >> 2];\n     $9 = HEAP32[$5 + -32 >> 2];\n     $14 = HEAP32[$5 + -36 >> 2];\n     $10 = HEAP32[$5 + -40 >> 2];\n     $12 = HEAP32[$5 + -44 >> 2];\n     $15 = HEAP32[$5 + -48 >> 2];\n     $29 = HEAP32[$2 >> 2];\n     $30 = HEAP32[$2 + 4 >> 2];\n     $27 = HEAP32[$2 + 8 >> 2];\n     $28 = HEAP32[$2 + 12 >> 2];\n     $25 = HEAP32[$2 + 16 >> 2];\n     $26 = HEAP32[$2 + 20 >> 2];\n     $23 = HEAP32[$2 + 24 >> 2];\n     $24 = HEAP32[$2 + 28 >> 2];\n     $21 = HEAP32[$2 + 32 >> 2];\n     $22 = HEAP32[$2 + 36 >> 2];\n     $19 = HEAP32[$2 + 40 >> 2];\n     $20 = HEAP32[$2 + 44 >> 2];\n     $2 = 0;\n     while (1) {\n      $17 = $12;\n      $15 = Math_imul($12, $19) + Math_imul($15, $20) | 0;\n      $12 = $10;\n      $15 = Math_imul($10, $22) + $15 | 0;\n      $10 = $14;\n      $15 = $15 + Math_imul($21, $10) | 0;\n      $14 = $9;\n      $15 = Math_imul($9, $24) + $15 | 0;\n      $9 = $13;\n      $15 = $15 + Math_imul($23, $9) | 0;\n      $13 = $7;\n      $15 = Math_imul($7, $26) + $15 | 0;\n      $7 = $16;\n      $15 = $15 + Math_imul($25, $7) | 0;\n      $16 = $11;\n      $15 = Math_imul($11, $28) + $15 | 0;\n      $11 = $8;\n      $18 = Math_imul($8, $27) + $15 | 0;\n      $8 = $3;\n      $15 = $2 << 2;\n      $18 = Math_imul($3, $30) + $18 | 0;\n      $3 = $6;\n      $6 = HEAP32[$15 + $0 >> 2] + ($18 + Math_imul($29, $3) >> $4) | 0;\n      HEAP32[$5 + $15 >> 2] = $6;\n      $15 = $17;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($3 | 0) != 10) {\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $6 = HEAP32[$5 + -4 >> 2];\n     $3 = HEAP32[$5 + -8 >> 2];\n     $8 = HEAP32[$5 + -12 >> 2];\n     $11 = HEAP32[$5 + -16 >> 2];\n     $16 = HEAP32[$5 + -20 >> 2];\n     $7 = HEAP32[$5 + -24 >> 2];\n     $13 = HEAP32[$5 + -28 >> 2];\n     $9 = HEAP32[$5 + -32 >> 2];\n     $14 = HEAP32[$5 + -36 >> 2];\n     $23 = HEAP32[$2 >> 2];\n     $24 = HEAP32[$2 + 4 >> 2];\n     $21 = HEAP32[$2 + 8 >> 2];\n     $22 = HEAP32[$2 + 12 >> 2];\n     $19 = HEAP32[$2 + 16 >> 2];\n     $20 = HEAP32[$2 + 20 >> 2];\n     $18 = HEAP32[$2 + 24 >> 2];\n     $15 = HEAP32[$2 + 28 >> 2];\n     $17 = HEAP32[$2 + 32 >> 2];\n     $2 = 0;\n     while (1) {\n      $10 = $9;\n      $14 = Math_imul($9, $15) + Math_imul($14, $17) | 0;\n      $9 = $13;\n      $14 = $14 + Math_imul($18, $9) | 0;\n      $13 = $7;\n      $14 = Math_imul($7, $20) + $14 | 0;\n      $7 = $16;\n      $14 = $14 + Math_imul($19, $7) | 0;\n      $16 = $11;\n      $14 = Math_imul($11, $22) + $14 | 0;\n      $11 = $8;\n      $12 = Math_imul($8, $21) + $14 | 0;\n      $8 = $3;\n      $14 = $2 << 2;\n      $12 = Math_imul($3, $24) + $12 | 0;\n      $3 = $6;\n      $6 = HEAP32[$14 + $0 >> 2] + ($12 + Math_imul($23, $3) >> $4) | 0;\n      HEAP32[$5 + $14 >> 2] = $6;\n      $14 = $10;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $6 = HEAP32[$5 + -4 >> 2];\n    $3 = HEAP32[$5 + -8 >> 2];\n    $8 = HEAP32[$5 + -12 >> 2];\n    $11 = HEAP32[$5 + -16 >> 2];\n    $16 = HEAP32[$5 + -20 >> 2];\n    $7 = HEAP32[$5 + -24 >> 2];\n    $13 = HEAP32[$5 + -28 >> 2];\n    $9 = HEAP32[$5 + -32 >> 2];\n    $14 = HEAP32[$5 + -36 >> 2];\n    $10 = HEAP32[$5 + -40 >> 2];\n    $25 = HEAP32[$2 >> 2];\n    $26 = HEAP32[$2 + 4 >> 2];\n    $23 = HEAP32[$2 + 8 >> 2];\n    $24 = HEAP32[$2 + 12 >> 2];\n    $21 = HEAP32[$2 + 16 >> 2];\n    $22 = HEAP32[$2 + 20 >> 2];\n    $19 = HEAP32[$2 + 24 >> 2];\n    $20 = HEAP32[$2 + 28 >> 2];\n    $18 = HEAP32[$2 + 32 >> 2];\n    $15 = HEAP32[$2 + 36 >> 2];\n    $2 = 0;\n    while (1) {\n     $12 = $14;\n     $10 = Math_imul($18, $12) + Math_imul($10, $15) | 0;\n     $14 = $9;\n     $10 = Math_imul($9, $20) + $10 | 0;\n     $9 = $13;\n     $10 = $10 + Math_imul($19, $9) | 0;\n     $13 = $7;\n     $10 = Math_imul($7, $22) + $10 | 0;\n     $7 = $16;\n     $10 = $10 + Math_imul($21, $7) | 0;\n     $16 = $11;\n     $10 = Math_imul($11, $24) + $10 | 0;\n     $11 = $8;\n     $17 = Math_imul($8, $23) + $10 | 0;\n     $8 = $3;\n     $10 = $2 << 2;\n     $17 = Math_imul($3, $26) + $17 | 0;\n     $3 = $6;\n     $6 = HEAP32[$10 + $0 >> 2] + ($17 + Math_imul($25, $3) >> $4) | 0;\n     HEAP32[$5 + $10 >> 2] = $6;\n     $10 = $12;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if ($3 >>> 0 >= 5) {\n    if ($3 >>> 0 >= 7) {\n     if (($3 | 0) != 8) {\n      if (($1 | 0) < 1) {\n       break label$1\n      }\n      $6 = HEAP32[$5 + -4 >> 2];\n      $3 = HEAP32[$5 + -8 >> 2];\n      $8 = HEAP32[$5 + -12 >> 2];\n      $11 = HEAP32[$5 + -16 >> 2];\n      $16 = HEAP32[$5 + -20 >> 2];\n      $7 = HEAP32[$5 + -24 >> 2];\n      $13 = HEAP32[$5 + -28 >> 2];\n      $19 = HEAP32[$2 >> 2];\n      $20 = HEAP32[$2 + 4 >> 2];\n      $18 = HEAP32[$2 + 8 >> 2];\n      $15 = HEAP32[$2 + 12 >> 2];\n      $17 = HEAP32[$2 + 16 >> 2];\n      $12 = HEAP32[$2 + 20 >> 2];\n      $10 = HEAP32[$2 + 24 >> 2];\n      $2 = 0;\n      while (1) {\n       $9 = $7;\n       $13 = Math_imul($7, $12) + Math_imul($10, $13) | 0;\n       $7 = $16;\n       $13 = $13 + Math_imul($17, $7) | 0;\n       $16 = $11;\n       $13 = Math_imul($11, $15) + $13 | 0;\n       $11 = $8;\n       $14 = Math_imul($8, $18) + $13 | 0;\n       $8 = $3;\n       $13 = $2 << 2;\n       $14 = Math_imul($3, $20) + $14 | 0;\n       $3 = $6;\n       $6 = HEAP32[$13 + $0 >> 2] + ($14 + Math_imul($19, $3) >> $4) | 0;\n       HEAP32[$5 + $13 >> 2] = $6;\n       $13 = $9;\n       $2 = $2 + 1 | 0;\n       if (($2 | 0) != ($1 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$1;\n     }\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $6 = HEAP32[$5 + -4 >> 2];\n     $3 = HEAP32[$5 + -8 >> 2];\n     $8 = HEAP32[$5 + -12 >> 2];\n     $11 = HEAP32[$5 + -16 >> 2];\n     $16 = HEAP32[$5 + -20 >> 2];\n     $7 = HEAP32[$5 + -24 >> 2];\n     $13 = HEAP32[$5 + -28 >> 2];\n     $9 = HEAP32[$5 + -32 >> 2];\n     $21 = HEAP32[$2 >> 2];\n     $22 = HEAP32[$2 + 4 >> 2];\n     $19 = HEAP32[$2 + 8 >> 2];\n     $20 = HEAP32[$2 + 12 >> 2];\n     $18 = HEAP32[$2 + 16 >> 2];\n     $15 = HEAP32[$2 + 20 >> 2];\n     $17 = HEAP32[$2 + 24 >> 2];\n     $12 = HEAP32[$2 + 28 >> 2];\n     $2 = 0;\n     while (1) {\n      $14 = $13;\n      $9 = Math_imul($17, $13) + Math_imul($9, $12) | 0;\n      $13 = $7;\n      $9 = Math_imul($7, $15) + $9 | 0;\n      $7 = $16;\n      $9 = $9 + Math_imul($18, $7) | 0;\n      $16 = $11;\n      $9 = Math_imul($11, $20) + $9 | 0;\n      $11 = $8;\n      $10 = Math_imul($8, $19) + $9 | 0;\n      $8 = $3;\n      $9 = $2 << 2;\n      $10 = Math_imul($3, $22) + $10 | 0;\n      $3 = $6;\n      $6 = HEAP32[$9 + $0 >> 2] + ($10 + Math_imul($21, $3) >> $4) | 0;\n      HEAP32[$5 + $9 >> 2] = $6;\n      $9 = $14;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($3 | 0) != 6) {\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $6 = HEAP32[$5 + -4 >> 2];\n     $3 = HEAP32[$5 + -8 >> 2];\n     $8 = HEAP32[$5 + -12 >> 2];\n     $11 = HEAP32[$5 + -16 >> 2];\n     $16 = HEAP32[$5 + -20 >> 2];\n     $17 = HEAP32[$2 >> 2];\n     $12 = HEAP32[$2 + 4 >> 2];\n     $10 = HEAP32[$2 + 8 >> 2];\n     $14 = HEAP32[$2 + 12 >> 2];\n     $9 = HEAP32[$2 + 16 >> 2];\n     $2 = 0;\n     while (1) {\n      $7 = $11;\n      $16 = Math_imul($14, $7) + Math_imul($9, $16) | 0;\n      $11 = $8;\n      $13 = Math_imul($8, $10) + $16 | 0;\n      $8 = $3;\n      $16 = $2 << 2;\n      $13 = Math_imul($3, $12) + $13 | 0;\n      $3 = $6;\n      $6 = HEAP32[$16 + $0 >> 2] + ($13 + Math_imul($17, $3) >> $4) | 0;\n      HEAP32[$5 + $16 >> 2] = $6;\n      $16 = $7;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $6 = HEAP32[$5 + -4 >> 2];\n    $3 = HEAP32[$5 + -8 >> 2];\n    $8 = HEAP32[$5 + -12 >> 2];\n    $11 = HEAP32[$5 + -16 >> 2];\n    $16 = HEAP32[$5 + -20 >> 2];\n    $7 = HEAP32[$5 + -24 >> 2];\n    $18 = HEAP32[$2 >> 2];\n    $15 = HEAP32[$2 + 4 >> 2];\n    $17 = HEAP32[$2 + 8 >> 2];\n    $12 = HEAP32[$2 + 12 >> 2];\n    $10 = HEAP32[$2 + 16 >> 2];\n    $14 = HEAP32[$2 + 20 >> 2];\n    $2 = 0;\n    while (1) {\n     $13 = $16;\n     $7 = Math_imul($10, $13) + Math_imul($7, $14) | 0;\n     $16 = $11;\n     $7 = Math_imul($11, $12) + $7 | 0;\n     $11 = $8;\n     $9 = Math_imul($8, $17) + $7 | 0;\n     $8 = $3;\n     $7 = $2 << 2;\n     $9 = Math_imul($3, $15) + $9 | 0;\n     $3 = $6;\n     $6 = HEAP32[$7 + $0 >> 2] + ($9 + Math_imul($18, $3) >> $4) | 0;\n     HEAP32[$5 + $7 >> 2] = $6;\n     $7 = $13;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if ($3 >>> 0 >= 3) {\n    if (($3 | 0) != 4) {\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $6 = HEAP32[$5 + -4 >> 2];\n     $3 = HEAP32[$5 + -8 >> 2];\n     $8 = HEAP32[$5 + -12 >> 2];\n     $9 = HEAP32[$2 >> 2];\n     $13 = HEAP32[$2 + 4 >> 2];\n     $7 = HEAP32[$2 + 8 >> 2];\n     $2 = 0;\n     while (1) {\n      $11 = $3;\n      $16 = $2 << 2;\n      $8 = Math_imul($3, $13) + Math_imul($8, $7) | 0;\n      $3 = $6;\n      $6 = HEAP32[$16 + $0 >> 2] + ($8 + Math_imul($9, $3) >> $4) | 0;\n      HEAP32[$5 + $16 >> 2] = $6;\n      $8 = $11;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $6 = HEAP32[$5 + -4 >> 2];\n    $3 = HEAP32[$5 + -8 >> 2];\n    $8 = HEAP32[$5 + -12 >> 2];\n    $11 = HEAP32[$5 + -16 >> 2];\n    $10 = HEAP32[$2 >> 2];\n    $14 = HEAP32[$2 + 4 >> 2];\n    $9 = HEAP32[$2 + 8 >> 2];\n    $13 = HEAP32[$2 + 12 >> 2];\n    $2 = 0;\n    while (1) {\n     $16 = $8;\n     $7 = Math_imul($8, $9) + Math_imul($11, $13) | 0;\n     $8 = $3;\n     $11 = $2 << 2;\n     $7 = Math_imul($3, $14) + $7 | 0;\n     $3 = $6;\n     $6 = HEAP32[$11 + $0 >> 2] + ($7 + Math_imul($10, $3) >> $4) | 0;\n     HEAP32[$5 + $11 >> 2] = $6;\n     $11 = $16;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if (($3 | 0) != 2) {\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $6 = HEAP32[$5 + -4 >> 2];\n    $8 = HEAP32[$2 >> 2];\n    $2 = 0;\n    while (1) {\n     $3 = $2 << 2;\n     $6 = HEAP32[$3 + $0 >> 2] + (Math_imul($6, $8) >> $4) | 0;\n     HEAP32[$3 + $5 >> 2] = $6;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if (($1 | 0) < 1) {\n    break label$1\n   }\n   $6 = HEAP32[$5 + -4 >> 2];\n   $3 = HEAP32[$5 + -8 >> 2];\n   $7 = HEAP32[$2 >> 2];\n   $16 = HEAP32[$2 + 4 >> 2];\n   $2 = 0;\n   while (1) {\n    $8 = $6;\n    $11 = $2 << 2;\n    $6 = HEAP32[$11 + $0 >> 2] + (Math_imul($6, $7) + Math_imul($3, $16) >> $4) | 0;\n    HEAP32[$5 + $11 >> 2] = $6;\n    $3 = $8;\n    $2 = $2 + 1 | 0;\n    if (($2 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__lpc_restore_signal_wide($0, $1, $2, $3, $4, $5) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  $4 = $4 | 0;\n  $5 = $5 | 0;\n  var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0;\n  label$1 : {\n   if ($3 >>> 0 >= 13) {\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $13 = $4;\n    $12 = $3 + -13 | 0;\n    while (1) {\n     $4 = 0;\n     $3 = 0;\n     label$4 : {\n      switch ($12 | 0) {\n      case 19:\n       $3 = HEAP32[(($9 << 2) + $5 | 0) + -128 >> 2];\n       $4 = $3;\n       $7 = $3 >> 31;\n       $3 = HEAP32[$2 + 124 >> 2];\n       $4 = __wasm_i64_mul($4, $7, $3, $3 >> 31);\n       $3 = i64toi32_i32$HIGH_BITS;\n      case 18:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -124 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 120 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 17:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -120 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 116 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 16:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -116 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 112 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 15:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -112 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 108 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 14:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -108 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 104 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 13:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -104 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 100 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 12:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -100 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 96 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 11:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -96 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 92 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 10:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -92 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 88 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 9:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -88 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 84 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 8:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -84 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 80 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 7:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -80 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 76 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 6:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -76 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 72 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 5:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -72 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 68 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 4:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -68 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 64 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 3:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -64 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 60 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 2:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -60 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 56 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 1:\n       $7 = HEAP32[(($9 << 2) + $5 | 0) + -56 >> 2];\n       $6 = $7;\n       $8 = $7 >> 31;\n       $7 = HEAP32[$2 + 52 >> 2];\n       $7 = __wasm_i64_mul($6, $8, $7, $7 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $7 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $7;\n       $3 = $6;\n      case 0:\n       $7 = ($9 << 2) + $5 | 0;\n       $8 = HEAP32[$7 + -52 >> 2];\n       $6 = $8;\n       $10 = $8 >> 31;\n       $8 = HEAP32[$2 + 48 >> 2];\n       $8 = __wasm_i64_mul($6, $10, $8, $8 >> 31) + $4 | 0;\n       $6 = $3 + i64toi32_i32$HIGH_BITS | 0;\n       $6 = $8 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $3 = HEAP32[$7 + -48 >> 2];\n       $4 = $3;\n       $10 = $3 >> 31;\n       $3 = HEAP32[$2 + 44 >> 2];\n       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);\n       $3 = $4 + $8 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $8 = $3;\n       $3 = HEAP32[$7 + -44 >> 2];\n       $4 = $3;\n       $10 = $3 >> 31;\n       $3 = HEAP32[$2 + 40 >> 2];\n       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);\n       $3 = $8 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $8 = $3;\n       $3 = HEAP32[$7 + -40 >> 2];\n       $4 = $3;\n       $10 = $3 >> 31;\n       $3 = HEAP32[$2 + 36 >> 2];\n       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);\n       $3 = $8 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $8 = $3;\n       $3 = HEAP32[$7 + -36 >> 2];\n       $4 = $3;\n       $10 = $3 >> 31;\n       $3 = HEAP32[$2 + 32 >> 2];\n       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);\n       $3 = $8 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $8 = $3;\n       $3 = HEAP32[$7 + -32 >> 2];\n       $4 = $3;\n       $10 = $3 >> 31;\n       $3 = HEAP32[$2 + 28 >> 2];\n       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);\n       $3 = $8 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $8 = $3;\n       $3 = HEAP32[$7 + -28 >> 2];\n       $4 = $3;\n       $10 = $3 >> 31;\n       $3 = HEAP32[$2 + 24 >> 2];\n       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);\n       $3 = $8 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $8 = $3;\n       $3 = HEAP32[$7 + -24 >> 2];\n       $4 = $3;\n       $10 = $3 >> 31;\n       $3 = HEAP32[$2 + 20 >> 2];\n       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);\n       $3 = $8 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $8 = $3;\n       $3 = HEAP32[$7 + -20 >> 2];\n       $4 = $3;\n       $10 = $3 >> 31;\n       $3 = HEAP32[$2 + 16 >> 2];\n       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);\n       $3 = $8 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $8 = $3;\n       $3 = HEAP32[$7 + -16 >> 2];\n       $4 = $3;\n       $10 = $3 >> 31;\n       $3 = HEAP32[$2 + 12 >> 2];\n       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);\n       $3 = $8 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $8 = $3;\n       $3 = HEAP32[$7 + -12 >> 2];\n       $4 = $3;\n       $10 = $3 >> 31;\n       $3 = HEAP32[$2 + 8 >> 2];\n       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);\n       $3 = $8 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $8 = $3;\n       $3 = HEAP32[$7 + -8 >> 2];\n       $4 = $3;\n       $10 = $3 >> 31;\n       $3 = HEAP32[$2 + 4 >> 2];\n       $4 = __wasm_i64_mul($4, $10, $3, $3 >> 31);\n       $3 = $8 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $8 = $3;\n       $3 = HEAP32[$7 + -4 >> 2];\n       $4 = $3;\n       $7 = $3 >> 31;\n       $3 = HEAP32[$2 >> 2];\n       $4 = __wasm_i64_mul($4, $7, $3, $3 >> 31);\n       $3 = $8 + $4 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $3 >>> 0 < $4 >>> 0 ? $6 + 1 | 0 : $6;\n       $4 = $3;\n       $3 = $6;\n       break;\n      default:\n       break label$4;\n      };\n     }\n     $7 = $9 << 2;\n     $10 = $7 + $5 | 0;\n     $6 = HEAP32[$0 + $7 >> 2];\n     $8 = $4;\n     $4 = $13;\n     $7 = $4 & 31;\n     HEAP32[$10 >> 2] = $6 + (32 <= ($4 & 63) >>> 0 ? $3 >> $7 : ((1 << $7) - 1 & $3) << 32 - $7 | $8 >>> $7);\n     $9 = $9 + 1 | 0;\n     if (($9 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if ($3 >>> 0 >= 9) {\n    if ($3 >>> 0 >= 11) {\n     if (($3 | 0) != 12) {\n      if (($1 | 0) < 1) {\n       break label$1\n      }\n      $9 = HEAP32[$5 + -4 >> 2];\n      $3 = HEAP32[$5 + -8 >> 2];\n      $13 = HEAP32[$5 + -12 >> 2];\n      $7 = HEAP32[$5 + -16 >> 2];\n      $8 = HEAP32[$5 + -20 >> 2];\n      $12 = HEAP32[$5 + -24 >> 2];\n      $10 = HEAP32[$5 + -28 >> 2];\n      $11 = HEAP32[$5 + -32 >> 2];\n      $14 = HEAP32[$5 + -36 >> 2];\n      $16 = HEAP32[$5 + -40 >> 2];\n      $15 = HEAP32[$5 + -44 >> 2];\n      $6 = HEAP32[$2 >> 2];\n      $17 = $6;\n      $25 = $6 >> 31;\n      $6 = HEAP32[$2 + 4 >> 2];\n      $26 = $6;\n      $27 = $6 >> 31;\n      $6 = HEAP32[$2 + 8 >> 2];\n      $24 = $6;\n      $29 = $6 >> 31;\n      $6 = HEAP32[$2 + 12 >> 2];\n      $30 = $6;\n      $22 = $6 >> 31;\n      $6 = HEAP32[$2 + 16 >> 2];\n      $31 = $6;\n      $32 = $6 >> 31;\n      $6 = HEAP32[$2 + 20 >> 2];\n      $28 = $6;\n      $34 = $6 >> 31;\n      $6 = HEAP32[$2 + 24 >> 2];\n      $35 = $6;\n      $21 = $6 >> 31;\n      $6 = HEAP32[$2 + 28 >> 2];\n      $36 = $6;\n      $37 = $6 >> 31;\n      $6 = HEAP32[$2 + 32 >> 2];\n      $33 = $6;\n      $39 = $6 >> 31;\n      $6 = HEAP32[$2 + 36 >> 2];\n      $40 = $6;\n      $20 = $6 >> 31;\n      $2 = HEAP32[$2 + 40 >> 2];\n      $41 = $2;\n      $42 = $2 >> 31;\n      $2 = 0;\n      while (1) {\n       $6 = $2 << 2;\n       $38 = $6 + $5 | 0;\n       $43 = HEAP32[$0 + $6 >> 2];\n       $18 = $16;\n       $6 = __wasm_i64_mul($16, $16 >> 31, $40, $20);\n       $44 = i64toi32_i32$HIGH_BITS;\n       $16 = $14;\n       $19 = __wasm_i64_mul($15, $15 >> 31, $41, $42);\n       $15 = $19 + $6 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $44 | 0;\n       $6 = $15 >>> 0 < $19 >>> 0 ? $6 + 1 | 0 : $6;\n       $19 = $15;\n       $15 = __wasm_i64_mul($14, $14 >> 31, $33, $39);\n       $14 = $19 + $15 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $14 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;\n       $15 = $14;\n       $14 = $11;\n       $19 = $15;\n       $15 = __wasm_i64_mul($11, $11 >> 31, $36, $37);\n       $11 = $19 + $15 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $11 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;\n       $15 = $11;\n       $11 = $10;\n       $10 = $15;\n       $15 = __wasm_i64_mul($11, $11 >> 31, $35, $21);\n       $10 = $10 + $15 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $10 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;\n       $15 = $10;\n       $10 = $12;\n       $19 = $15;\n       $15 = __wasm_i64_mul($12, $12 >> 31, $28, $34);\n       $12 = $19 + $15 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $12 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;\n       $15 = $12;\n       $12 = $8;\n       $19 = $15;\n       $15 = __wasm_i64_mul($8, $8 >> 31, $31, $32);\n       $8 = $19 + $15 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $8 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;\n       $15 = $8;\n       $8 = $7;\n       $19 = $15;\n       $15 = __wasm_i64_mul($7, $7 >> 31, $30, $22);\n       $7 = $19 + $15 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $7 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;\n       $19 = $7;\n       $7 = $13;\n       $15 = __wasm_i64_mul($7, $7 >> 31, $24, $29);\n       $13 = $19 + $15 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $13 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;\n       $15 = $13;\n       $13 = $3;\n       $23 = $38;\n       $19 = $15;\n       $15 = __wasm_i64_mul($3, $3 >> 31, $26, $27);\n       $3 = $19 + $15 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $3 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;\n       $19 = $3;\n       $3 = $9;\n       $15 = __wasm_i64_mul($3, $3 >> 31, $17, $25);\n       $9 = $19 + $15 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $9 >>> 0 < $15 >>> 0 ? $6 + 1 | 0 : $6;\n       $38 = $9;\n       $9 = $4;\n       $15 = $9 & 31;\n       $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $15 : ((1 << $15) - 1 & $6) << 32 - $15 | $38 >>> $15) + $43 | 0;\n       HEAP32[$23 >> 2] = $9;\n       $15 = $18;\n       $2 = $2 + 1 | 0;\n       if (($2 | 0) != ($1 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$1;\n     }\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $9 = HEAP32[$5 + -4 >> 2];\n     $3 = HEAP32[$5 + -8 >> 2];\n     $13 = HEAP32[$5 + -12 >> 2];\n     $7 = HEAP32[$5 + -16 >> 2];\n     $8 = HEAP32[$5 + -20 >> 2];\n     $12 = HEAP32[$5 + -24 >> 2];\n     $10 = HEAP32[$5 + -28 >> 2];\n     $11 = HEAP32[$5 + -32 >> 2];\n     $14 = HEAP32[$5 + -36 >> 2];\n     $16 = HEAP32[$5 + -40 >> 2];\n     $15 = HEAP32[$5 + -44 >> 2];\n     $6 = HEAP32[$5 + -48 >> 2];\n     $18 = HEAP32[$2 >> 2];\n     $25 = $18;\n     $26 = $18 >> 31;\n     $18 = HEAP32[$2 + 4 >> 2];\n     $27 = $18;\n     $24 = $18 >> 31;\n     $18 = HEAP32[$2 + 8 >> 2];\n     $29 = $18;\n     $30 = $18 >> 31;\n     $18 = HEAP32[$2 + 12 >> 2];\n     $22 = $18;\n     $31 = $18 >> 31;\n     $18 = HEAP32[$2 + 16 >> 2];\n     $32 = $18;\n     $28 = $18 >> 31;\n     $18 = HEAP32[$2 + 20 >> 2];\n     $34 = $18;\n     $35 = $18 >> 31;\n     $18 = HEAP32[$2 + 24 >> 2];\n     $21 = $18;\n     $36 = $18 >> 31;\n     $18 = HEAP32[$2 + 28 >> 2];\n     $37 = $18;\n     $33 = $18 >> 31;\n     $18 = HEAP32[$2 + 32 >> 2];\n     $39 = $18;\n     $40 = $18 >> 31;\n     $18 = HEAP32[$2 + 36 >> 2];\n     $20 = $18;\n     $41 = $18 >> 31;\n     $18 = HEAP32[$2 + 40 >> 2];\n     $42 = $18;\n     $38 = $18 >> 31;\n     $2 = HEAP32[$2 + 44 >> 2];\n     $43 = $2;\n     $44 = $2 >> 31;\n     $2 = 0;\n     while (1) {\n      $18 = $2 << 2;\n      $19 = $18 + $5 | 0;\n      $46 = HEAP32[$0 + $18 >> 2];\n      $18 = $15;\n      $17 = __wasm_i64_mul($15, $15 >> 31, $42, $38);\n      $23 = i64toi32_i32$HIGH_BITS;\n      $15 = $16;\n      $45 = __wasm_i64_mul($6, $6 >> 31, $43, $44);\n      $17 = $45 + $17 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $23 | 0;\n      $6 = $17 >>> 0 < $45 >>> 0 ? $6 + 1 | 0 : $6;\n      $23 = $17;\n      $17 = __wasm_i64_mul($16, $16 >> 31, $20, $41);\n      $16 = $23 + $17 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $16 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $17 = $16;\n      $16 = $14;\n      $23 = $17;\n      $17 = __wasm_i64_mul($14, $14 >> 31, $39, $40);\n      $14 = $23 + $17 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $14 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $17 = $14;\n      $14 = $11;\n      $23 = $17;\n      $17 = __wasm_i64_mul($11, $11 >> 31, $37, $33);\n      $11 = $23 + $17 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $11 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $17 = $11;\n      $11 = $10;\n      $10 = $17;\n      $17 = __wasm_i64_mul($11, $11 >> 31, $21, $36);\n      $10 = $10 + $17 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $10 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $17 = $10;\n      $10 = $12;\n      $23 = $17;\n      $17 = __wasm_i64_mul($12, $12 >> 31, $34, $35);\n      $12 = $23 + $17 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $12 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $17 = $12;\n      $12 = $8;\n      $23 = $17;\n      $17 = __wasm_i64_mul($8, $8 >> 31, $32, $28);\n      $8 = $23 + $17 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $8 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $17 = $8;\n      $8 = $7;\n      $23 = $17;\n      $17 = __wasm_i64_mul($7, $7 >> 31, $22, $31);\n      $7 = $23 + $17 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $7 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $23 = $7;\n      $7 = $13;\n      $17 = __wasm_i64_mul($7, $7 >> 31, $29, $30);\n      $13 = $23 + $17 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $13 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $17 = $13;\n      $13 = $3;\n      $23 = $19;\n      $19 = $17;\n      $17 = __wasm_i64_mul($3, $3 >> 31, $27, $24);\n      $3 = $19 + $17 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $3 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $19 = $3;\n      $3 = $9;\n      $17 = __wasm_i64_mul($3, $3 >> 31, $25, $26);\n      $9 = $19 + $17 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $9 >>> 0 < $17 >>> 0 ? $6 + 1 | 0 : $6;\n      $19 = $9;\n      $9 = $4;\n      $17 = $9 & 31;\n      $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $17 : ((1 << $17) - 1 & $6) << 32 - $17 | $19 >>> $17) + $46 | 0;\n      HEAP32[$23 >> 2] = $9;\n      $6 = $18;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($3 | 0) != 10) {\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $9 = HEAP32[$5 + -4 >> 2];\n     $3 = HEAP32[$5 + -8 >> 2];\n     $13 = HEAP32[$5 + -12 >> 2];\n     $7 = HEAP32[$5 + -16 >> 2];\n     $8 = HEAP32[$5 + -20 >> 2];\n     $12 = HEAP32[$5 + -24 >> 2];\n     $10 = HEAP32[$5 + -28 >> 2];\n     $11 = HEAP32[$5 + -32 >> 2];\n     $14 = HEAP32[$5 + -36 >> 2];\n     $6 = HEAP32[$2 >> 2];\n     $15 = $6;\n     $18 = $6 >> 31;\n     $6 = HEAP32[$2 + 4 >> 2];\n     $17 = $6;\n     $25 = $6 >> 31;\n     $6 = HEAP32[$2 + 8 >> 2];\n     $26 = $6;\n     $27 = $6 >> 31;\n     $6 = HEAP32[$2 + 12 >> 2];\n     $24 = $6;\n     $29 = $6 >> 31;\n     $6 = HEAP32[$2 + 16 >> 2];\n     $30 = $6;\n     $22 = $6 >> 31;\n     $6 = HEAP32[$2 + 20 >> 2];\n     $31 = $6;\n     $32 = $6 >> 31;\n     $6 = HEAP32[$2 + 24 >> 2];\n     $28 = $6;\n     $34 = $6 >> 31;\n     $6 = HEAP32[$2 + 28 >> 2];\n     $35 = $6;\n     $21 = $6 >> 31;\n     $2 = HEAP32[$2 + 32 >> 2];\n     $36 = $2;\n     $37 = $2 >> 31;\n     $2 = 0;\n     while (1) {\n      $6 = $2 << 2;\n      $33 = $6 + $5 | 0;\n      $39 = HEAP32[$0 + $6 >> 2];\n      $16 = $11;\n      $6 = __wasm_i64_mul($11, $11 >> 31, $35, $21);\n      $40 = i64toi32_i32$HIGH_BITS;\n      $11 = $10;\n      $20 = __wasm_i64_mul($14, $14 >> 31, $36, $37);\n      $14 = $20 + $6 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $40 | 0;\n      $6 = $14 >>> 0 < $20 >>> 0 ? $6 + 1 | 0 : $6;\n      $10 = $14;\n      $14 = __wasm_i64_mul($11, $11 >> 31, $28, $34);\n      $10 = $10 + $14 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $10 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $14 = $10;\n      $10 = $12;\n      $20 = $14;\n      $14 = __wasm_i64_mul($12, $12 >> 31, $31, $32);\n      $12 = $20 + $14 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $12 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $14 = $12;\n      $12 = $8;\n      $20 = $14;\n      $14 = __wasm_i64_mul($8, $8 >> 31, $30, $22);\n      $8 = $20 + $14 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $8 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $14 = $8;\n      $8 = $7;\n      $20 = $14;\n      $14 = __wasm_i64_mul($7, $7 >> 31, $24, $29);\n      $7 = $20 + $14 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $7 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $20 = $7;\n      $7 = $13;\n      $14 = __wasm_i64_mul($7, $7 >> 31, $26, $27);\n      $13 = $20 + $14 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $13 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $14 = $13;\n      $13 = $3;\n      $19 = $33;\n      $20 = $14;\n      $14 = __wasm_i64_mul($3, $3 >> 31, $17, $25);\n      $3 = $20 + $14 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $3 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $20 = $3;\n      $3 = $9;\n      $14 = __wasm_i64_mul($3, $3 >> 31, $15, $18);\n      $9 = $20 + $14 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $9 >>> 0 < $14 >>> 0 ? $6 + 1 | 0 : $6;\n      $33 = $9;\n      $9 = $4;\n      $14 = $9 & 31;\n      $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $14 : ((1 << $14) - 1 & $6) << 32 - $14 | $33 >>> $14) + $39 | 0;\n      HEAP32[$19 >> 2] = $9;\n      $14 = $16;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $9 = HEAP32[$5 + -4 >> 2];\n    $3 = HEAP32[$5 + -8 >> 2];\n    $13 = HEAP32[$5 + -12 >> 2];\n    $7 = HEAP32[$5 + -16 >> 2];\n    $8 = HEAP32[$5 + -20 >> 2];\n    $12 = HEAP32[$5 + -24 >> 2];\n    $10 = HEAP32[$5 + -28 >> 2];\n    $11 = HEAP32[$5 + -32 >> 2];\n    $14 = HEAP32[$5 + -36 >> 2];\n    $16 = HEAP32[$5 + -40 >> 2];\n    $6 = HEAP32[$2 >> 2];\n    $18 = $6;\n    $17 = $6 >> 31;\n    $6 = HEAP32[$2 + 4 >> 2];\n    $25 = $6;\n    $26 = $6 >> 31;\n    $6 = HEAP32[$2 + 8 >> 2];\n    $27 = $6;\n    $24 = $6 >> 31;\n    $6 = HEAP32[$2 + 12 >> 2];\n    $29 = $6;\n    $30 = $6 >> 31;\n    $6 = HEAP32[$2 + 16 >> 2];\n    $22 = $6;\n    $31 = $6 >> 31;\n    $6 = HEAP32[$2 + 20 >> 2];\n    $32 = $6;\n    $28 = $6 >> 31;\n    $6 = HEAP32[$2 + 24 >> 2];\n    $34 = $6;\n    $35 = $6 >> 31;\n    $6 = HEAP32[$2 + 28 >> 2];\n    $21 = $6;\n    $36 = $6 >> 31;\n    $6 = HEAP32[$2 + 32 >> 2];\n    $37 = $6;\n    $33 = $6 >> 31;\n    $2 = HEAP32[$2 + 36 >> 2];\n    $39 = $2;\n    $40 = $2 >> 31;\n    $2 = 0;\n    while (1) {\n     $6 = $2 << 2;\n     $20 = $6 + $5 | 0;\n     $41 = HEAP32[$0 + $6 >> 2];\n     $15 = $14;\n     $6 = __wasm_i64_mul($14, $14 >> 31, $37, $33);\n     $42 = i64toi32_i32$HIGH_BITS;\n     $14 = $11;\n     $38 = __wasm_i64_mul($16, $16 >> 31, $39, $40);\n     $16 = $38 + $6 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $42 | 0;\n     $6 = $16 >>> 0 < $38 >>> 0 ? $6 + 1 | 0 : $6;\n     $19 = $16;\n     $16 = __wasm_i64_mul($11, $11 >> 31, $21, $36);\n     $11 = $19 + $16 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $11 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n     $16 = $11;\n     $11 = $10;\n     $10 = $16;\n     $16 = __wasm_i64_mul($11, $11 >> 31, $34, $35);\n     $10 = $10 + $16 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $10 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n     $16 = $10;\n     $10 = $12;\n     $19 = $16;\n     $16 = __wasm_i64_mul($12, $12 >> 31, $32, $28);\n     $12 = $19 + $16 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $12 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n     $16 = $12;\n     $12 = $8;\n     $19 = $16;\n     $16 = __wasm_i64_mul($8, $8 >> 31, $22, $31);\n     $8 = $19 + $16 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $8 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n     $16 = $8;\n     $8 = $7;\n     $19 = $16;\n     $16 = __wasm_i64_mul($7, $7 >> 31, $29, $30);\n     $7 = $19 + $16 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $7 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n     $19 = $7;\n     $7 = $13;\n     $16 = __wasm_i64_mul($7, $7 >> 31, $27, $24);\n     $13 = $19 + $16 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $13 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n     $16 = $13;\n     $13 = $3;\n     $19 = $20;\n     $20 = $16;\n     $16 = __wasm_i64_mul($3, $3 >> 31, $25, $26);\n     $3 = $20 + $16 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $3 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n     $20 = $3;\n     $3 = $9;\n     $16 = __wasm_i64_mul($3, $3 >> 31, $18, $17);\n     $9 = $20 + $16 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $9 >>> 0 < $16 >>> 0 ? $6 + 1 | 0 : $6;\n     $20 = $9;\n     $9 = $4;\n     $16 = $9 & 31;\n     $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $16 : ((1 << $16) - 1 & $6) << 32 - $16 | $20 >>> $16) + $41 | 0;\n     HEAP32[$19 >> 2] = $9;\n     $16 = $15;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if ($3 >>> 0 >= 5) {\n    if ($3 >>> 0 >= 7) {\n     if (($3 | 0) != 8) {\n      if (($1 | 0) < 1) {\n       break label$1\n      }\n      $9 = HEAP32[$5 + -4 >> 2];\n      $3 = HEAP32[$5 + -8 >> 2];\n      $13 = HEAP32[$5 + -12 >> 2];\n      $7 = HEAP32[$5 + -16 >> 2];\n      $8 = HEAP32[$5 + -20 >> 2];\n      $12 = HEAP32[$5 + -24 >> 2];\n      $10 = HEAP32[$5 + -28 >> 2];\n      $11 = HEAP32[$2 >> 2];\n      $14 = $11;\n      $16 = $11 >> 31;\n      $11 = HEAP32[$2 + 4 >> 2];\n      $15 = $11;\n      $18 = $11 >> 31;\n      $11 = HEAP32[$2 + 8 >> 2];\n      $17 = $11;\n      $25 = $11 >> 31;\n      $11 = HEAP32[$2 + 12 >> 2];\n      $26 = $11;\n      $27 = $11 >> 31;\n      $11 = HEAP32[$2 + 16 >> 2];\n      $24 = $11;\n      $29 = $11 >> 31;\n      $11 = HEAP32[$2 + 20 >> 2];\n      $30 = $11;\n      $22 = $11 >> 31;\n      $2 = HEAP32[$2 + 24 >> 2];\n      $31 = $2;\n      $32 = $2 >> 31;\n      $2 = 0;\n      while (1) {\n       $11 = $2 << 2;\n       $28 = $11 + $5 | 0;\n       $34 = HEAP32[$0 + $11 >> 2];\n       $11 = $12;\n       $6 = __wasm_i64_mul($11, $11 >> 31, $30, $22);\n       $35 = i64toi32_i32$HIGH_BITS;\n       $12 = $8;\n       $21 = __wasm_i64_mul($10, $10 >> 31, $31, $32);\n       $10 = $21 + $6 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $35 | 0;\n       $6 = $10 >>> 0 < $21 >>> 0 ? $6 + 1 | 0 : $6;\n       $21 = $10;\n       $10 = __wasm_i64_mul($8, $8 >> 31, $24, $29);\n       $8 = $21 + $10 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $8 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;\n       $10 = $8;\n       $8 = $7;\n       $21 = $10;\n       $10 = __wasm_i64_mul($7, $7 >> 31, $26, $27);\n       $7 = $21 + $10 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $7 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;\n       $21 = $7;\n       $7 = $13;\n       $10 = __wasm_i64_mul($7, $7 >> 31, $17, $25);\n       $13 = $21 + $10 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $13 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;\n       $10 = $13;\n       $13 = $3;\n       $20 = $28;\n       $21 = $10;\n       $10 = __wasm_i64_mul($3, $3 >> 31, $15, $18);\n       $3 = $21 + $10 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $3 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;\n       $21 = $3;\n       $3 = $9;\n       $10 = __wasm_i64_mul($3, $3 >> 31, $14, $16);\n       $9 = $21 + $10 | 0;\n       $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n       $6 = $9 >>> 0 < $10 >>> 0 ? $6 + 1 | 0 : $6;\n       $28 = $9;\n       $9 = $4;\n       $10 = $9 & 31;\n       $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $10 : ((1 << $10) - 1 & $6) << 32 - $10 | $28 >>> $10) + $34 | 0;\n       HEAP32[$20 >> 2] = $9;\n       $10 = $11;\n       $2 = $2 + 1 | 0;\n       if (($2 | 0) != ($1 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$1;\n     }\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $9 = HEAP32[$5 + -4 >> 2];\n     $3 = HEAP32[$5 + -8 >> 2];\n     $13 = HEAP32[$5 + -12 >> 2];\n     $7 = HEAP32[$5 + -16 >> 2];\n     $8 = HEAP32[$5 + -20 >> 2];\n     $12 = HEAP32[$5 + -24 >> 2];\n     $10 = HEAP32[$5 + -28 >> 2];\n     $11 = HEAP32[$5 + -32 >> 2];\n     $6 = HEAP32[$2 >> 2];\n     $16 = $6;\n     $15 = $6 >> 31;\n     $6 = HEAP32[$2 + 4 >> 2];\n     $18 = $6;\n     $17 = $6 >> 31;\n     $6 = HEAP32[$2 + 8 >> 2];\n     $25 = $6;\n     $26 = $6 >> 31;\n     $6 = HEAP32[$2 + 12 >> 2];\n     $27 = $6;\n     $24 = $6 >> 31;\n     $6 = HEAP32[$2 + 16 >> 2];\n     $29 = $6;\n     $30 = $6 >> 31;\n     $6 = HEAP32[$2 + 20 >> 2];\n     $22 = $6;\n     $31 = $6 >> 31;\n     $6 = HEAP32[$2 + 24 >> 2];\n     $32 = $6;\n     $28 = $6 >> 31;\n     $2 = HEAP32[$2 + 28 >> 2];\n     $34 = $2;\n     $35 = $2 >> 31;\n     $2 = 0;\n     while (1) {\n      $6 = $2 << 2;\n      $21 = $6 + $5 | 0;\n      $36 = HEAP32[$0 + $6 >> 2];\n      $14 = $10;\n      $6 = __wasm_i64_mul($10, $10 >> 31, $32, $28);\n      $37 = i64toi32_i32$HIGH_BITS;\n      $10 = $12;\n      $33 = __wasm_i64_mul($11, $11 >> 31, $34, $35);\n      $11 = $33 + $6 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $37 | 0;\n      $6 = $11 >>> 0 < $33 >>> 0 ? $6 + 1 | 0 : $6;\n      $20 = $11;\n      $11 = __wasm_i64_mul($12, $12 >> 31, $22, $31);\n      $12 = $20 + $11 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $12 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;\n      $11 = $12;\n      $12 = $8;\n      $20 = $11;\n      $11 = __wasm_i64_mul($8, $8 >> 31, $29, $30);\n      $8 = $20 + $11 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $8 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;\n      $11 = $8;\n      $8 = $7;\n      $20 = $11;\n      $11 = __wasm_i64_mul($7, $7 >> 31, $27, $24);\n      $7 = $20 + $11 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $7 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;\n      $20 = $7;\n      $7 = $13;\n      $11 = __wasm_i64_mul($7, $7 >> 31, $25, $26);\n      $13 = $20 + $11 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $13 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;\n      $11 = $13;\n      $13 = $3;\n      $20 = $21;\n      $21 = $11;\n      $11 = __wasm_i64_mul($3, $3 >> 31, $18, $17);\n      $3 = $21 + $11 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $3 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;\n      $21 = $3;\n      $3 = $9;\n      $11 = __wasm_i64_mul($3, $3 >> 31, $16, $15);\n      $9 = $21 + $11 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $9 >>> 0 < $11 >>> 0 ? $6 + 1 | 0 : $6;\n      $21 = $9;\n      $9 = $4;\n      $11 = $9 & 31;\n      $9 = (32 <= ($9 & 63) >>> 0 ? $6 >> $11 : ((1 << $11) - 1 & $6) << 32 - $11 | $21 >>> $11) + $36 | 0;\n      HEAP32[$20 >> 2] = $9;\n      $11 = $14;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($3 | 0) != 6) {\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $9 = HEAP32[$5 + -4 >> 2];\n     $3 = HEAP32[$5 + -8 >> 2];\n     $13 = HEAP32[$5 + -12 >> 2];\n     $7 = HEAP32[$5 + -16 >> 2];\n     $8 = HEAP32[$5 + -20 >> 2];\n     $12 = HEAP32[$2 >> 2];\n     $10 = $12;\n     $11 = $12 >> 31;\n     $12 = HEAP32[$2 + 4 >> 2];\n     $14 = $12;\n     $16 = $12 >> 31;\n     $12 = HEAP32[$2 + 8 >> 2];\n     $15 = $12;\n     $18 = $12 >> 31;\n     $12 = HEAP32[$2 + 12 >> 2];\n     $17 = $12;\n     $25 = $12 >> 31;\n     $2 = HEAP32[$2 + 16 >> 2];\n     $26 = $2;\n     $27 = $2 >> 31;\n     $2 = 0;\n     while (1) {\n      $12 = $2 << 2;\n      $24 = $12 + $5 | 0;\n      $29 = HEAP32[$0 + $12 >> 2];\n      $12 = $7;\n      $6 = __wasm_i64_mul($7, $7 >> 31, $17, $25);\n      $30 = i64toi32_i32$HIGH_BITS;\n      $7 = $13;\n      $22 = __wasm_i64_mul($8, $8 >> 31, $26, $27);\n      $8 = $22 + $6 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $30 | 0;\n      $6 = $8 >>> 0 < $22 >>> 0 ? $6 + 1 | 0 : $6;\n      $13 = $8;\n      $8 = __wasm_i64_mul($7, $7 >> 31, $15, $18);\n      $13 = $13 + $8 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $13 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6;\n      $8 = $13;\n      $13 = $3;\n      $22 = $8;\n      $8 = __wasm_i64_mul($3, $3 >> 31, $14, $16);\n      $3 = $22 + $8 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $3 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6;\n      $8 = $3;\n      $3 = $9;\n      $9 = __wasm_i64_mul($3, $3 >> 31, $10, $11);\n      $8 = $8 + $9 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $8 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;\n      $9 = $4 & 31;\n      $9 = (32 <= ($4 & 63) >>> 0 ? $6 >> $9 : ((1 << $9) - 1 & $6) << 32 - $9 | $8 >>> $9) + $29 | 0;\n      HEAP32[$24 >> 2] = $9;\n      $8 = $12;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $9 = HEAP32[$5 + -4 >> 2];\n    $3 = HEAP32[$5 + -8 >> 2];\n    $13 = HEAP32[$5 + -12 >> 2];\n    $7 = HEAP32[$5 + -16 >> 2];\n    $8 = HEAP32[$5 + -20 >> 2];\n    $12 = HEAP32[$5 + -24 >> 2];\n    $10 = HEAP32[$2 >> 2];\n    $11 = $10;\n    $14 = $11 >> 31;\n    $10 = HEAP32[$2 + 4 >> 2];\n    $16 = $10;\n    $15 = $10 >> 31;\n    $10 = HEAP32[$2 + 8 >> 2];\n    $18 = $10;\n    $17 = $10 >> 31;\n    $10 = HEAP32[$2 + 12 >> 2];\n    $25 = $10;\n    $26 = $10 >> 31;\n    $10 = HEAP32[$2 + 16 >> 2];\n    $27 = $10;\n    $24 = $10 >> 31;\n    $2 = HEAP32[$2 + 20 >> 2];\n    $29 = $2;\n    $30 = $2 >> 31;\n    $2 = 0;\n    while (1) {\n     $10 = $2 << 2;\n     $22 = $10 + $5 | 0;\n     $31 = HEAP32[$0 + $10 >> 2];\n     $10 = $8;\n     $6 = __wasm_i64_mul($8, $8 >> 31, $27, $24);\n     $32 = i64toi32_i32$HIGH_BITS;\n     $8 = $7;\n     $28 = __wasm_i64_mul($12, $12 >> 31, $29, $30);\n     $12 = $28 + $6 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $32 | 0;\n     $6 = $12 >>> 0 < $28 >>> 0 ? $6 + 1 | 0 : $6;\n     $21 = $12;\n     $12 = __wasm_i64_mul($7, $7 >> 31, $25, $26);\n     $7 = $21 + $12 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $7 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6;\n     $21 = $7;\n     $7 = $13;\n     $12 = __wasm_i64_mul($7, $7 >> 31, $18, $17);\n     $13 = $21 + $12 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $13 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6;\n     $12 = $13;\n     $13 = $3;\n     $21 = $22;\n     $22 = $12;\n     $12 = __wasm_i64_mul($3, $3 >> 31, $16, $15);\n     $3 = $22 + $12 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $3 >>> 0 < $12 >>> 0 ? $6 + 1 | 0 : $6;\n     $12 = $3;\n     $3 = $9;\n     $9 = __wasm_i64_mul($3, $3 >> 31, $11, $14);\n     $12 = $12 + $9 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $12 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;\n     $9 = $4 & 31;\n     $9 = (32 <= ($4 & 63) >>> 0 ? $6 >> $9 : ((1 << $9) - 1 & $6) << 32 - $9 | $12 >>> $9) + $31 | 0;\n     HEAP32[$21 >> 2] = $9;\n     $12 = $10;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if ($3 >>> 0 >= 3) {\n    if (($3 | 0) != 4) {\n     if (($1 | 0) < 1) {\n      break label$1\n     }\n     $9 = HEAP32[$5 + -4 >> 2];\n     $3 = HEAP32[$5 + -8 >> 2];\n     $13 = HEAP32[$5 + -12 >> 2];\n     $7 = HEAP32[$2 >> 2];\n     $12 = $7;\n     $10 = $7 >> 31;\n     $7 = HEAP32[$2 + 4 >> 2];\n     $11 = $7;\n     $14 = $7 >> 31;\n     $2 = HEAP32[$2 + 8 >> 2];\n     $16 = $2;\n     $15 = $2 >> 31;\n     $2 = 0;\n     while (1) {\n      $7 = $2 << 2;\n      $8 = $7 + $5 | 0;\n      $18 = HEAP32[$0 + $7 >> 2];\n      $7 = $3;\n      $3 = __wasm_i64_mul($7, $7 >> 31, $11, $14);\n      $6 = i64toi32_i32$HIGH_BITS;\n      $17 = $8;\n      $13 = __wasm_i64_mul($13, $13 >> 31, $16, $15);\n      $3 = $13 + $3 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $3 >>> 0 < $13 >>> 0 ? $6 + 1 | 0 : $6;\n      $8 = $3;\n      $3 = $9;\n      $9 = __wasm_i64_mul($3, $3 >> 31, $12, $10);\n      $13 = $8 + $9 | 0;\n      $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n      $6 = $13 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;\n      $9 = $13;\n      $8 = $4 & 31;\n      $9 = (32 <= ($4 & 63) >>> 0 ? $6 >> $8 : ((1 << $8) - 1 & $6) << 32 - $8 | $9 >>> $8) + $18 | 0;\n      HEAP32[$17 >> 2] = $9;\n      $13 = $7;\n      $2 = $2 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $9 = HEAP32[$5 + -4 >> 2];\n    $3 = HEAP32[$5 + -8 >> 2];\n    $13 = HEAP32[$5 + -12 >> 2];\n    $7 = HEAP32[$5 + -16 >> 2];\n    $8 = HEAP32[$2 >> 2];\n    $10 = $8;\n    $11 = $8 >> 31;\n    $8 = HEAP32[$2 + 4 >> 2];\n    $14 = $8;\n    $16 = $8 >> 31;\n    $8 = HEAP32[$2 + 8 >> 2];\n    $15 = $8;\n    $18 = $8 >> 31;\n    $2 = HEAP32[$2 + 12 >> 2];\n    $17 = $2;\n    $25 = $2 >> 31;\n    $2 = 0;\n    while (1) {\n     $8 = $2 << 2;\n     $12 = $8 + $5 | 0;\n     $26 = HEAP32[$0 + $8 >> 2];\n     $8 = $13;\n     $6 = __wasm_i64_mul($8, $8 >> 31, $15, $18);\n     $27 = i64toi32_i32$HIGH_BITS;\n     $13 = $3;\n     $22 = $12;\n     $24 = __wasm_i64_mul($7, $7 >> 31, $17, $25);\n     $7 = $24 + $6 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $27 | 0;\n     $6 = $7 >>> 0 < $24 >>> 0 ? $6 + 1 | 0 : $6;\n     $12 = $7;\n     $7 = __wasm_i64_mul($3, $3 >> 31, $14, $16);\n     $3 = $12 + $7 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $3 >>> 0 < $7 >>> 0 ? $6 + 1 | 0 : $6;\n     $7 = $3;\n     $3 = $9;\n     $9 = __wasm_i64_mul($3, $3 >> 31, $10, $11);\n     $7 = $7 + $9 | 0;\n     $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n     $6 = $7 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;\n     $9 = $7;\n     $7 = $4;\n     $12 = $7 & 31;\n     $9 = (32 <= ($7 & 63) >>> 0 ? $6 >> $12 : ((1 << $12) - 1 & $6) << 32 - $12 | $9 >>> $12) + $26 | 0;\n     HEAP32[$22 >> 2] = $9;\n     $7 = $8;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if (($3 | 0) != 2) {\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $9 = HEAP32[$5 + -4 >> 2];\n    $2 = HEAP32[$2 >> 2];\n    $8 = $2;\n    $12 = $2 >> 31;\n    $2 = 0;\n    while (1) {\n     $3 = $2 << 2;\n     $10 = $3 + $5 | 0;\n     $6 = HEAP32[$0 + $3 >> 2];\n     $9 = __wasm_i64_mul($9, $9 >> 31, $8, $12);\n     $7 = i64toi32_i32$HIGH_BITS;\n     $3 = $4;\n     $13 = $3 & 31;\n     $9 = $6 + (32 <= ($3 & 63) >>> 0 ? $7 >> $13 : ((1 << $13) - 1 & $7) << 32 - $13 | $9 >>> $13) | 0;\n     HEAP32[$10 >> 2] = $9;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if (($1 | 0) < 1) {\n    break label$1\n   }\n   $9 = HEAP32[$5 + -4 >> 2];\n   $3 = HEAP32[$5 + -8 >> 2];\n   $13 = HEAP32[$2 >> 2];\n   $8 = $13;\n   $12 = $8 >> 31;\n   $2 = HEAP32[$2 + 4 >> 2];\n   $10 = $2;\n   $11 = $2 >> 31;\n   $2 = 0;\n   while (1) {\n    $13 = $2 << 2;\n    $7 = $13 + $5 | 0;\n    $14 = HEAP32[$0 + $13 >> 2];\n    $13 = $9;\n    $9 = __wasm_i64_mul($9, $9 >> 31, $8, $12);\n    $6 = i64toi32_i32$HIGH_BITS;\n    $15 = $7;\n    $7 = $9;\n    $9 = __wasm_i64_mul($3, $3 >> 31, $10, $11);\n    $3 = $7 + $9 | 0;\n    $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n    $6 = $3 >>> 0 < $9 >>> 0 ? $6 + 1 | 0 : $6;\n    $9 = $3;\n    $3 = $4;\n    $7 = $3 & 31;\n    $9 = (32 <= ($3 & 63) >>> 0 ? $6 >> $7 : ((1 << $7) - 1 & $6) << 32 - $7 | $9 >>> $7) + $14 | 0;\n    HEAP32[$15 >> 2] = $9;\n    $3 = $13;\n    $2 = $2 + 1 | 0;\n    if (($2 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__lpc_compute_expected_bits_per_residual_sample($0, $1) {\n  if (!!($0 > 0.0)) {\n   $0 = log(.5 / +($1 >>> 0) * $0) * .5 / .6931471805599453;\n   return $0 >= 0.0 ? $0 : 0.0;\n  }\n  return $0 < 0.0 ? 1.e+32 : 0.0;\n }\n \n function FLAC__lpc_compute_best_order($0, $1, $2, $3) {\n  var $4 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0, $10 = 0.0;\n  $5 = 1;\n  if ($1) {\n   $10 = .5 / +($2 >>> 0);\n   $7 = 4294967295.0;\n   while (1) {\n    $4 = HEAPF64[($6 << 3) + $0 >> 3];\n    label$3 : {\n     if (!!($4 > 0.0)) {\n      $4 = log($10 * $4) * .5 / .6931471805599453;\n      $4 = $4 >= 0.0 ? $4 : 0.0;\n      break label$3;\n     }\n     $4 = $4 < 0.0 ? 1.e+32 : 0.0;\n    }\n    $4 = $4 * +($2 - $5 >>> 0) + +(Math_imul($3, $5) >>> 0);\n    $8 = $4 < $7;\n    $7 = $8 ? $4 : $7;\n    $9 = $8 ? $6 : $9;\n    $5 = $5 + 1 | 0;\n    $6 = $6 + 1 | 0;\n    if (($6 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n   $0 = $9 + 1 | 0;\n  } else {\n   $0 = 1\n  }\n  return $0;\n }\n \n function strlen($0) {\n  var $1 = 0, $2 = 0, $3 = 0;\n  label$1 : {\n   label$2 : {\n    $1 = $0;\n    if (!($1 & 3)) {\n     break label$2\n    }\n    if (!HEAPU8[$0 | 0]) {\n     return 0\n    }\n    while (1) {\n     $1 = $1 + 1 | 0;\n     if (!($1 & 3)) {\n      break label$2\n     }\n     if (HEAPU8[$1 | 0]) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   while (1) {\n    $2 = $1;\n    $1 = $1 + 4 | 0;\n    $3 = HEAP32[$2 >> 2];\n    if (!(($3 ^ -1) & $3 + -16843009 & -2139062144)) {\n     continue\n    }\n    break;\n   };\n   if (!($3 & 255)) {\n    return $2 - $0 | 0\n   }\n   while (1) {\n    $3 = HEAPU8[$2 + 1 | 0];\n    $1 = $2 + 1 | 0;\n    $2 = $1;\n    if ($3) {\n     continue\n    }\n    break;\n   };\n  }\n  return $1 - $0 | 0;\n }\n \n function __strchrnul($0, $1) {\n  var $2 = 0, $3 = 0;\n  label$1 : {\n   $3 = $1 & 255;\n   if ($3) {\n    if ($0 & 3) {\n     while (1) {\n      $2 = HEAPU8[$0 | 0];\n      if (!$2 | ($2 | 0) == ($1 & 255)) {\n       break label$1\n      }\n      $0 = $0 + 1 | 0;\n      if ($0 & 3) {\n       continue\n      }\n      break;\n     }\n    }\n    $2 = HEAP32[$0 >> 2];\n    label$5 : {\n     if (($2 ^ -1) & $2 + -16843009 & -2139062144) {\n      break label$5\n     }\n     $3 = Math_imul($3, 16843009);\n     while (1) {\n      $2 = $2 ^ $3;\n      if (($2 ^ -1) & $2 + -16843009 & -2139062144) {\n       break label$5\n      }\n      $2 = HEAP32[$0 + 4 >> 2];\n      $0 = $0 + 4 | 0;\n      if (!($2 + -16843009 & ($2 ^ -1) & -2139062144)) {\n       continue\n      }\n      break;\n     };\n    }\n    while (1) {\n     $2 = $0;\n     $3 = HEAPU8[$2 | 0];\n     if ($3) {\n      $0 = $2 + 1 | 0;\n      if (($3 | 0) != ($1 & 255)) {\n       continue\n      }\n     }\n     break;\n    };\n    return $2;\n   }\n   return strlen($0) + $0 | 0;\n  }\n  return $0;\n }\n \n function strchr($0, $1) {\n  $0 = __strchrnul($0, $1);\n  return HEAPU8[$0 | 0] == ($1 & 255) ? $0 : 0;\n }\n \n function __stdio_write($0, $1, $2) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;\n  $3 = global$0 - 32 | 0;\n  global$0 = $3;\n  $4 = HEAP32[$0 + 28 >> 2];\n  HEAP32[$3 + 16 >> 2] = $4;\n  $5 = HEAP32[$0 + 20 >> 2];\n  HEAP32[$3 + 28 >> 2] = $2;\n  HEAP32[$3 + 24 >> 2] = $1;\n  $1 = $5 - $4 | 0;\n  HEAP32[$3 + 20 >> 2] = $1;\n  $4 = $1 + $2 | 0;\n  $9 = 2;\n  $1 = $3 + 16 | 0;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     if (!__wasi_syscall_ret(__wasi_fd_write(HEAP32[$0 + 60 >> 2], $3 + 16 | 0, 2, $3 + 12 | 0) | 0)) {\n      while (1) {\n       $5 = HEAP32[$3 + 12 >> 2];\n       if (($5 | 0) == ($4 | 0)) {\n        break label$3\n       }\n       if (($5 | 0) <= -1) {\n        break label$2\n       }\n       $6 = HEAP32[$1 + 4 >> 2];\n       $7 = $5 >>> 0 > $6 >>> 0;\n       $8 = ($7 << 3) + $1 | 0;\n       $6 = $5 - ($7 ? $6 : 0) | 0;\n       HEAP32[$8 >> 2] = $6 + HEAP32[$8 >> 2];\n       $8 = ($7 ? 12 : 4) + $1 | 0;\n       HEAP32[$8 >> 2] = HEAP32[$8 >> 2] - $6;\n       $4 = $4 - $5 | 0;\n       $1 = $7 ? $1 + 8 | 0 : $1;\n       $9 = $9 - $7 | 0;\n       if (!__wasi_syscall_ret(__wasi_fd_write(HEAP32[$0 + 60 >> 2], $1 | 0, $9 | 0, $3 + 12 | 0) | 0)) {\n        continue\n       }\n       break;\n      }\n     }\n     HEAP32[$3 + 12 >> 2] = -1;\n     if (($4 | 0) != -1) {\n      break label$2\n     }\n    }\n    $1 = HEAP32[$0 + 44 >> 2];\n    HEAP32[$0 + 28 >> 2] = $1;\n    HEAP32[$0 + 20 >> 2] = $1;\n    HEAP32[$0 + 16 >> 2] = $1 + HEAP32[$0 + 48 >> 2];\n    $0 = $2;\n    break label$1;\n   }\n   HEAP32[$0 + 28 >> 2] = 0;\n   HEAP32[$0 + 16 >> 2] = 0;\n   HEAP32[$0 + 20 >> 2] = 0;\n   HEAP32[$0 >> 2] = HEAP32[$0 >> 2] | 32;\n   $0 = 0;\n   if (($9 | 0) == 2) {\n    break label$1\n   }\n   $0 = $2 - HEAP32[$1 + 4 >> 2] | 0;\n  }\n  global$0 = $3 + 32 | 0;\n  return $0 | 0;\n }\n \n function FLAC__memory_alloc_aligned_int32_array($0, $1, $2) {\n  var $3 = 0;\n  label$1 : {\n   if ($0 >>> 0 > 1073741823) {\n    break label$1\n   }\n   $0 = dlmalloc($0 ? $0 << 2 : 1);\n   if (!$0) {\n    break label$1\n   }\n   $3 = HEAP32[$1 >> 2];\n   if ($3) {\n    dlfree($3)\n   }\n   HEAP32[$1 >> 2] = $0;\n   HEAP32[$2 >> 2] = $0;\n   $3 = 1;\n  }\n  return $3;\n }\n \n function FLAC__memory_alloc_aligned_uint64_array($0, $1, $2) {\n  var $3 = 0;\n  label$1 : {\n   if ($0 >>> 0 > 536870911) {\n    break label$1\n   }\n   $0 = dlmalloc($0 ? $0 << 3 : 1);\n   if (!$0) {\n    break label$1\n   }\n   $3 = HEAP32[$1 >> 2];\n   if ($3) {\n    dlfree($3)\n   }\n   HEAP32[$1 >> 2] = $0;\n   HEAP32[$2 >> 2] = $0;\n   $3 = 1;\n  }\n  return $3;\n }\n \n function safe_malloc_mul_2op_p($0, $1) {\n  if (!($1 ? $0 : 0)) {\n   return dlmalloc(1)\n  }\n  __wasm_i64_mul($1, 0, $0, 0);\n  if (i64toi32_i32$HIGH_BITS) {\n   $0 = 0\n  } else {\n   $0 = dlmalloc(Math_imul($0, $1))\n  }\n  return $0;\n }\n \n function FLAC__fixed_compute_best_predictor($0, $1, $2) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  var $3 = 0, $4 = Math_fround(0), $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);\n  if ($1) {\n   $3 = HEAP32[$0 + -4 >> 2];\n   $8 = HEAP32[$0 + -8 >> 2];\n   $12 = $3 - $8 | 0;\n   $5 = HEAP32[$0 + -12 >> 2];\n   $9 = $12 + ($5 - $8 | 0) | 0;\n   $17 = $9 + ((($5 << 1) - $8 | 0) - HEAP32[$0 + -16 >> 2] | 0) | 0;\n   while (1) {\n    $8 = HEAP32[($15 << 2) + $0 >> 2];\n    $5 = $8 >> 31;\n    $14 = ($5 ^ $5 + $8) + $14 | 0;\n    $5 = $8 - $3 | 0;\n    $11 = $5 >> 31;\n    $13 = ($11 ^ $5 + $11) + $13 | 0;\n    $11 = $5 - $12 | 0;\n    $3 = $11 >> 31;\n    $10 = ($3 ^ $3 + $11) + $10 | 0;\n    $9 = $11 - $9 | 0;\n    $3 = $9 >> 31;\n    $6 = ($3 ^ $3 + $9) + $6 | 0;\n    $12 = $9 - $17 | 0;\n    $3 = $12 >> 31;\n    $7 = ($3 ^ $3 + $12) + $7 | 0;\n    $3 = $8;\n    $12 = $5;\n    $17 = $9;\n    $9 = $11;\n    $15 = $15 + 1 | 0;\n    if (($15 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n  $0 = $13 >>> 0 < $10 >>> 0 ? $13 : $10;\n  $0 = $0 >>> 0 < $6 >>> 0 ? $0 : $6;\n  label$3 : {\n   if ($14 >>> 0 < ($0 >>> 0 < $7 >>> 0 ? $0 : $7) >>> 0) {\n    break label$3\n   }\n   $16 = 1;\n   $0 = $10 >>> 0 < $6 >>> 0 ? $10 : $6;\n   if ($13 >>> 0 < ($0 >>> 0 < $7 >>> 0 ? $0 : $7) >>> 0) {\n    break label$3\n   }\n   $0 = $6 >>> 0 < $7 >>> 0;\n   $16 = $10 >>> 0 < ($0 ? $6 : $7) >>> 0 ? 2 : $0 ? 3 : 4;\n  }\n  $0 = $2;\n  if ($14) {\n   $4 = Math_fround(log(+($14 >>> 0) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)\n  } else {\n   $4 = Math_fround(0.0)\n  }\n  HEAPF32[$0 >> 2] = $4;\n  $0 = $2;\n  if ($13) {\n   $4 = Math_fround(log(+($13 >>> 0) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)\n  } else {\n   $4 = Math_fround(0.0)\n  }\n  HEAPF32[$0 + 4 >> 2] = $4;\n  $0 = $2;\n  if ($10) {\n   $4 = Math_fround(log(+($10 >>> 0) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)\n  } else {\n   $4 = Math_fround(0.0)\n  }\n  HEAPF32[$0 + 8 >> 2] = $4;\n  $0 = $2;\n  if ($6) {\n   $4 = Math_fround(log(+($6 >>> 0) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)\n  } else {\n   $4 = Math_fround(0.0)\n  }\n  HEAPF32[$0 + 12 >> 2] = $4;\n  if (!$7) {\n   HEAPF32[$2 + 16 >> 2] = 0;\n   return $16 | 0;\n  }\n  (wasm2js_i32$0 = $2, wasm2js_f32$0 = Math_fround(log(+($7 >>> 0) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)), HEAPF32[wasm2js_i32$0 + 16 >> 2] = wasm2js_f32$0;\n  return $16 | 0;\n }\n \n function FLAC__fixed_compute_best_predictor_wide($0, $1, $2) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = Math_fround(0), $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);\n  label$1 : {\n   if (!$1) {\n    break label$1\n   }\n   $5 = HEAP32[$0 + -4 >> 2];\n   $8 = HEAP32[$0 + -8 >> 2];\n   $6 = $5 - $8 | 0;\n   $9 = HEAP32[$0 + -12 >> 2];\n   $14 = $6 + ($9 - $8 | 0) | 0;\n   $21 = $14 + ((($9 << 1) - $8 | 0) - HEAP32[$0 + -16 >> 2] | 0) | 0;\n   $9 = 0;\n   $8 = 0;\n   while (1) {\n    $3 = HEAP32[($20 << 2) + $0 >> 2];\n    $4 = $3 >> 31;\n    $4 = $4 ^ $3 + $4;\n    $7 = $4 + $19 | 0;\n    if ($7 >>> 0 < $4 >>> 0) {\n     $18 = $18 + 1 | 0\n    }\n    $19 = $7;\n    $4 = $3 - $5 | 0;\n    $7 = $4 >> 31;\n    $7 = $7 ^ $4 + $7;\n    $5 = $7 + $17 | 0;\n    if ($5 >>> 0 < $7 >>> 0) {\n     $15 = $15 + 1 | 0\n    }\n    $17 = $5;\n    $7 = $4 - $6 | 0;\n    $5 = $7 >> 31;\n    $5 = $5 ^ $5 + $7;\n    $6 = $5 + $16 | 0;\n    if ($6 >>> 0 < $5 >>> 0) {\n     $10 = $10 + 1 | 0\n    }\n    $16 = $6;\n    $14 = $7 - $14 | 0;\n    $5 = $14 >> 31;\n    $5 = $5 ^ $5 + $14;\n    $6 = $5 + $12 | 0;\n    if ($6 >>> 0 < $5 >>> 0) {\n     $8 = $8 + 1 | 0\n    }\n    $12 = $6;\n    $6 = $14 - $21 | 0;\n    $5 = $6 >> 31;\n    $5 = $5 ^ $5 + $6;\n    $6 = $5 + $13 | 0;\n    if ($6 >>> 0 < $5 >>> 0) {\n     $9 = $9 + 1 | 0\n    }\n    $13 = $6;\n    $5 = $3;\n    $6 = $4;\n    $21 = $14;\n    $14 = $7;\n    $20 = $20 + 1 | 0;\n    if (($20 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n  $3 = ($10 | 0) == ($15 | 0) & $17 >>> 0 < $16 >>> 0 | $15 >>> 0 < $10 >>> 0;\n  $4 = $3 ? $17 : $16;\n  $0 = $4;\n  $3 = $3 ? $15 : $10;\n  $4 = ($8 | 0) == ($3 | 0) & $4 >>> 0 < $12 >>> 0 | $3 >>> 0 < $8 >>> 0;\n  $7 = $4 ? $0 : $12;\n  $3 = $4 ? $3 : $8;\n  $4 = ($9 | 0) == ($3 | 0) & $7 >>> 0 < $13 >>> 0 | $3 >>> 0 < $9 >>> 0;\n  $7 = $4 ? $7 : $13;\n  $3 = $4 ? $3 : $9;\n  $0 = 0;\n  label$4 : {\n   if (($3 | 0) == ($18 | 0) & $19 >>> 0 < $7 >>> 0 | $18 >>> 0 < $3 >>> 0) {\n    break label$4\n   }\n   $3 = ($8 | 0) == ($10 | 0) & $16 >>> 0 < $12 >>> 0 | $10 >>> 0 < $8 >>> 0;\n   $4 = $3 ? $16 : $12;\n   $0 = $4;\n   $3 = $3 ? $10 : $8;\n   $4 = ($9 | 0) == ($3 | 0) & $4 >>> 0 < $13 >>> 0 | $3 >>> 0 < $9 >>> 0;\n   $7 = $4 ? $0 : $13;\n   $3 = $4 ? $3 : $9;\n   $0 = 1;\n   if (($3 | 0) == ($15 | 0) & $17 >>> 0 < $7 >>> 0 | $15 >>> 0 < $3 >>> 0) {\n    break label$4\n   }\n   $0 = ($8 | 0) == ($9 | 0) & $12 >>> 0 < $13 >>> 0 | $8 >>> 0 < $9 >>> 0;\n   $3 = $0;\n   $4 = $3 ? $12 : $13;\n   $0 = $3 ? $8 : $9;\n   $0 = ($0 | 0) == ($10 | 0) & $16 >>> 0 < $4 >>> 0 | $10 >>> 0 < $0 >>> 0 ? 2 : $3 ? 3 : 4;\n  }\n  $6 = $2;\n  if ($18 | $19) {\n   $11 = Math_fround(log((+($19 >>> 0) + 4294967296.0 * +($18 >>> 0)) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)\n  } else {\n   $11 = Math_fround(0.0)\n  }\n  HEAPF32[$6 >> 2] = $11;\n  $6 = $2;\n  if ($15 | $17) {\n   $11 = Math_fround(log((+($17 >>> 0) + 4294967296.0 * +($15 >>> 0)) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)\n  } else {\n   $11 = Math_fround(0.0)\n  }\n  HEAPF32[$6 + 4 >> 2] = $11;\n  $6 = $2;\n  if ($10 | $16) {\n   $11 = Math_fround(log((+($16 >>> 0) + 4294967296.0 * +($10 >>> 0)) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)\n  } else {\n   $11 = Math_fround(0.0)\n  }\n  HEAPF32[$6 + 8 >> 2] = $11;\n  $6 = $2;\n  if ($8 | $12) {\n   $11 = Math_fround(log((+($12 >>> 0) + 4294967296.0 * +($8 >>> 0)) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)\n  } else {\n   $11 = Math_fround(0.0)\n  }\n  HEAPF32[$6 + 12 >> 2] = $11;\n  if (!($9 | $13)) {\n   HEAPF32[$2 + 16 >> 2] = 0;\n   return $0 | 0;\n  }\n  (wasm2js_i32$0 = $2, wasm2js_f32$0 = Math_fround(log((+($13 >>> 0) + 4294967296.0 * +($9 >>> 0)) * .6931471805599453 / +($1 >>> 0)) / .6931471805599453)), HEAPF32[wasm2js_i32$0 + 16 >> 2] = wasm2js_f32$0;\n  return $0 | 0;\n }\n \n function FLAC__fixed_compute_residual($0, $1, $2, $3) {\n  var $4 = 0, $5 = 0;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     switch ($2 | 0) {\n     case 4:\n      $2 = 0;\n      if (($1 | 0) <= 0) {\n       break label$2\n      }\n      while (1) {\n       $5 = $2 << 2;\n       $4 = $5 + $0 | 0;\n       HEAP32[$3 + $5 >> 2] = (HEAP32[$4 + -16 >> 2] + (HEAP32[$4 >> 2] + Math_imul(HEAP32[$4 + -8 >> 2], 6) | 0) | 0) - (HEAP32[$4 + -12 >> 2] + HEAP32[$4 + -4 >> 2] << 2);\n       $2 = $2 + 1 | 0;\n       if (($2 | 0) != ($1 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$2;\n     case 3:\n      $2 = 0;\n      if (($1 | 0) <= 0) {\n       break label$2\n      }\n      while (1) {\n       $5 = $2 << 2;\n       $4 = $5 + $0 | 0;\n       HEAP32[$3 + $5 >> 2] = (HEAP32[$4 >> 2] - HEAP32[$4 + -12 >> 2] | 0) + Math_imul(HEAP32[$4 + -8 >> 2] - HEAP32[$4 + -4 >> 2] | 0, 3);\n       $2 = $2 + 1 | 0;\n       if (($2 | 0) != ($1 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$2;\n     case 2:\n      $2 = 0;\n      if (($1 | 0) <= 0) {\n       break label$2\n      }\n      while (1) {\n       $5 = $2 << 2;\n       $4 = $5 + $0 | 0;\n       HEAP32[$3 + $5 >> 2] = HEAP32[$4 + -8 >> 2] + (HEAP32[$4 >> 2] - (HEAP32[$4 + -4 >> 2] << 1) | 0);\n       $2 = $2 + 1 | 0;\n       if (($2 | 0) != ($1 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$2;\n     case 0:\n      break label$1;\n     case 1:\n      break label$3;\n     default:\n      break label$2;\n     };\n    }\n    $2 = 0;\n    if (($1 | 0) <= 0) {\n     break label$2\n    }\n    while (1) {\n     $5 = $2 << 2;\n     $4 = $5 + $0 | 0;\n     HEAP32[$3 + $5 >> 2] = HEAP32[$4 >> 2] - HEAP32[$4 + -4 >> 2];\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n   }\n   return;\n  }\n  memcpy($3, $0, $1 << 2);\n }\n \n function FLAC__fixed_restore_signal($0, $1, $2, $3) {\n  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     switch ($2 | 0) {\n     case 4:\n      if (($1 | 0) < 1) {\n       break label$2\n      }\n      $5 = HEAP32[$3 + -12 >> 2];\n      $6 = HEAP32[$3 + -4 >> 2];\n      $2 = 0;\n      while (1) {\n       $8 = $2 << 2;\n       $7 = $8 + $3 | 0;\n       $4 = HEAP32[$7 + -8 >> 2];\n       $6 = ((HEAP32[$0 + $8 >> 2] + Math_imul($4, -6) | 0) - HEAP32[$7 + -16 >> 2] | 0) + ($5 + $6 << 2) | 0;\n       HEAP32[$7 >> 2] = $6;\n       $5 = $4;\n       $2 = $2 + 1 | 0;\n       if (($2 | 0) != ($1 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$2;\n     case 3:\n      if (($1 | 0) < 1) {\n       break label$2\n      }\n      $4 = HEAP32[$3 + -12 >> 2];\n      $5 = HEAP32[$3 + -4 >> 2];\n      $2 = 0;\n      while (1) {\n       $6 = $2 << 2;\n       $7 = $6 + $3 | 0;\n       $8 = HEAP32[$0 + $6 >> 2] + $4 | 0;\n       $4 = HEAP32[$7 + -8 >> 2];\n       $5 = $8 + Math_imul($5 - $4 | 0, 3) | 0;\n       HEAP32[$7 >> 2] = $5;\n       $2 = $2 + 1 | 0;\n       if (($2 | 0) != ($1 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$2;\n     case 2:\n      if (($1 | 0) < 1) {\n       break label$2\n      }\n      $4 = HEAP32[$3 + -4 >> 2];\n      $2 = 0;\n      while (1) {\n       $5 = $2 << 2;\n       $6 = $5 + $3 | 0;\n       $4 = (HEAP32[$0 + $5 >> 2] + ($4 << 1) | 0) - HEAP32[$6 + -8 >> 2] | 0;\n       HEAP32[$6 >> 2] = $4;\n       $2 = $2 + 1 | 0;\n       if (($2 | 0) != ($1 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$2;\n     case 0:\n      break label$1;\n     case 1:\n      break label$3;\n     default:\n      break label$2;\n     };\n    }\n    if (($1 | 0) < 1) {\n     break label$2\n    }\n    $4 = HEAP32[$3 + -4 >> 2];\n    $2 = 0;\n    while (1) {\n     $5 = $2 << 2;\n     $4 = HEAP32[$5 + $0 >> 2] + $4 | 0;\n     HEAP32[$3 + $5 >> 2] = $4;\n     $2 = $2 + 1 | 0;\n     if (($2 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n   }\n   return;\n  }\n  memcpy($3, $0, $1 << 2);\n }\n \n function __toread($0) {\n  var $1 = 0, $2 = 0;\n  $1 = HEAPU8[$0 + 74 | 0];\n  HEAP8[$0 + 74 | 0] = $1 + -1 | $1;\n  if (HEAPU32[$0 + 20 >> 2] > HEAPU32[$0 + 28 >> 2]) {\n   FUNCTION_TABLE[HEAP32[$0 + 36 >> 2]]($0, 0, 0) | 0\n  }\n  HEAP32[$0 + 28 >> 2] = 0;\n  HEAP32[$0 + 16 >> 2] = 0;\n  HEAP32[$0 + 20 >> 2] = 0;\n  $1 = HEAP32[$0 >> 2];\n  if ($1 & 4) {\n   HEAP32[$0 >> 2] = $1 | 32;\n   return -1;\n  }\n  $2 = HEAP32[$0 + 44 >> 2] + HEAP32[$0 + 48 >> 2] | 0;\n  HEAP32[$0 + 8 >> 2] = $2;\n  HEAP32[$0 + 4 >> 2] = $2;\n  return $1 << 27 >> 31;\n }\n \n function FLAC__stream_decoder_new() {\n  var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0;\n  $3 = dlcalloc(1, 8);\n  if ($3) {\n   $2 = dlcalloc(1, 504);\n   HEAP32[$3 >> 2] = $2;\n   if ($2) {\n    $0 = dlcalloc(1, 6160);\n    HEAP32[$3 + 4 >> 2] = $0;\n    if ($0) {\n     $1 = dlcalloc(1, 44);\n     HEAP32[$0 + 56 >> 2] = $1;\n     if ($1) {\n      HEAP32[$0 + 1128 >> 2] = 16;\n      $4 = dlmalloc(HEAP32[1364] << 1 & -16);\n      HEAP32[$0 + 1120 >> 2] = $4;\n      if ($4) {\n       HEAP32[$0 + 252 >> 2] = 0;\n       HEAP32[$0 + 220 >> 2] = 0;\n       HEAP32[$0 + 224 >> 2] = 0;\n       $1 = $0 + 3616 | 0;\n       HEAP32[$1 >> 2] = 0;\n       HEAP32[$1 + 4 >> 2] = 0;\n       $1 = $0 + 3608 | 0;\n       HEAP32[$1 >> 2] = 0;\n       HEAP32[$1 + 4 >> 2] = 0;\n       $1 = $0 + 3600 | 0;\n       HEAP32[$1 >> 2] = 0;\n       HEAP32[$1 + 4 >> 2] = 0;\n       $1 = $0 + 3592 | 0;\n       HEAP32[$1 >> 2] = 0;\n       HEAP32[$1 + 4 >> 2] = 0;\n       HEAP32[$0 + 60 >> 2] = 0;\n       HEAP32[$0 + 64 >> 2] = 0;\n       HEAP32[$0 + 68 >> 2] = 0;\n       HEAP32[$0 + 72 >> 2] = 0;\n       HEAP32[$0 + 76 >> 2] = 0;\n       HEAP32[$0 + 80 >> 2] = 0;\n       HEAP32[$0 + 84 >> 2] = 0;\n       HEAP32[$0 + 88 >> 2] = 0;\n       HEAP32[$0 + 92 >> 2] = 0;\n       HEAP32[$0 + 96 >> 2] = 0;\n       HEAP32[$0 + 100 >> 2] = 0;\n       HEAP32[$0 + 104 >> 2] = 0;\n       HEAP32[$0 + 108 >> 2] = 0;\n       HEAP32[$0 + 112 >> 2] = 0;\n       HEAP32[$0 + 116 >> 2] = 0;\n       HEAP32[$0 + 120 >> 2] = 0;\n       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 124 | 0);\n       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 136 | 0);\n       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 148 | 0);\n       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 160 | 0);\n       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 172 | 0);\n       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 184 | 0);\n       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 196 | 0);\n       FLAC__format_entropy_coding_method_partitioned_rice_contents_init($0 + 208 | 0);\n       HEAP32[$0 + 48 >> 2] = 0;\n       HEAP32[$0 + 52 >> 2] = 0;\n       memset($0 + 608 | 0, 512);\n       HEAP32[$0 + 1124 >> 2] = 0;\n       HEAP32[$0 + 608 >> 2] = 1;\n       HEAP32[$0 + 32 >> 2] = 0;\n       HEAP32[$0 + 24 >> 2] = 0;\n       HEAP32[$0 + 28 >> 2] = 0;\n       HEAP32[$0 + 16 >> 2] = 0;\n       HEAP32[$0 + 20 >> 2] = 0;\n       HEAP32[$0 + 8 >> 2] = 0;\n       HEAP32[$0 + 12 >> 2] = 0;\n       HEAP32[$0 >> 2] = 0;\n       HEAP32[$0 + 4 >> 2] = 0;\n       HEAP32[$2 + 28 >> 2] = 0;\n       FLAC__ogg_decoder_aspect_set_defaults($2 + 32 | 0);\n       HEAP32[$2 >> 2] = 9;\n       return $3 | 0;\n      }\n      FLAC__bitreader_delete($1);\n     }\n     dlfree($0);\n    }\n    dlfree($2);\n   }\n   dlfree($3);\n  }\n  return 0;\n }\n \n function FLAC__stream_decoder_delete($0) {\n  $0 = $0 | 0;\n  var $1 = 0, $2 = 0;\n  if ($0) {\n   FLAC__stream_decoder_finish($0);\n   $1 = HEAP32[$0 + 4 >> 2];\n   $2 = HEAP32[$1 + 1120 >> 2];\n   if ($2) {\n    dlfree($2);\n    $1 = HEAP32[$0 + 4 >> 2];\n   }\n   FLAC__bitreader_delete(HEAP32[$1 + 56 >> 2]);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 124 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 136 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 148 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 160 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 172 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 184 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 196 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 208 | 0);\n   dlfree(HEAP32[$0 + 4 >> 2]);\n   dlfree(HEAP32[$0 >> 2]);\n   dlfree($0);\n  }\n }\n \n function FLAC__stream_decoder_finish($0) {\n  $0 = $0 | 0;\n  var $1 = 0, $2 = 0, $3 = 0;\n  $3 = 1;\n  if (HEAP32[HEAP32[$0 >> 2] >> 2] != 9) {\n   $1 = HEAP32[$0 + 4 >> 2];\n   FLAC__MD5Final($1 + 3732 | 0, $1 + 3636 | 0);\n   dlfree(HEAP32[HEAP32[$0 + 4 >> 2] + 452 >> 2]);\n   HEAP32[HEAP32[$0 + 4 >> 2] + 452 >> 2] = 0;\n   $1 = HEAP32[$0 + 4 >> 2];\n   HEAP32[$1 + 252 >> 2] = 0;\n   FLAC__bitreader_free(HEAP32[$1 + 56 >> 2]);\n   $3 = $0 + 4 | 0;\n   $1 = HEAP32[$0 + 4 >> 2];\n   $2 = HEAP32[$1 + 60 >> 2];\n   if ($2) {\n    dlfree($2 + -16 | 0);\n    HEAP32[HEAP32[$3 >> 2] + 60 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   $2 = HEAP32[$1 + 3592 >> 2];\n   if ($2) {\n    dlfree($2);\n    HEAP32[HEAP32[$3 >> 2] + 92 >> 2] = 0;\n    HEAP32[HEAP32[$3 >> 2] + 3592 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   $2 = HEAP32[$1 - -64 >> 2];\n   if ($2) {\n    dlfree($2 + -16 | 0);\n    HEAP32[HEAP32[$3 >> 2] - -64 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   $2 = HEAP32[$1 + 3596 >> 2];\n   if ($2) {\n    dlfree($2);\n    HEAP32[HEAP32[$3 >> 2] + 96 >> 2] = 0;\n    HEAP32[HEAP32[$3 >> 2] + 3596 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   $2 = HEAP32[$1 + 68 >> 2];\n   if ($2) {\n    dlfree($2 + -16 | 0);\n    HEAP32[HEAP32[$3 >> 2] + 68 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   $2 = HEAP32[$1 + 3600 >> 2];\n   if ($2) {\n    dlfree($2);\n    HEAP32[HEAP32[$3 >> 2] + 100 >> 2] = 0;\n    HEAP32[HEAP32[$3 >> 2] + 3600 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   $2 = HEAP32[$1 + 72 >> 2];\n   if ($2) {\n    dlfree($2 + -16 | 0);\n    HEAP32[HEAP32[$3 >> 2] + 72 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   $2 = HEAP32[$1 + 3604 >> 2];\n   if ($2) {\n    dlfree($2);\n    HEAP32[HEAP32[$3 >> 2] + 104 >> 2] = 0;\n    HEAP32[HEAP32[$3 >> 2] + 3604 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   $2 = HEAP32[$1 + 76 >> 2];\n   if ($2) {\n    dlfree($2 + -16 | 0);\n    HEAP32[HEAP32[$3 >> 2] + 76 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   $2 = HEAP32[$1 + 3608 >> 2];\n   if ($2) {\n    dlfree($2);\n    HEAP32[HEAP32[$3 >> 2] + 108 >> 2] = 0;\n    HEAP32[HEAP32[$3 >> 2] + 3608 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   $2 = HEAP32[$1 + 80 >> 2];\n   if ($2) {\n    dlfree($2 + -16 | 0);\n    HEAP32[HEAP32[$3 >> 2] + 80 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   $2 = HEAP32[$1 + 3612 >> 2];\n   if ($2) {\n    dlfree($2);\n    HEAP32[HEAP32[$3 >> 2] + 112 >> 2] = 0;\n    HEAP32[HEAP32[$3 >> 2] + 3612 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   $2 = HEAP32[$1 + 84 >> 2];\n   if ($2) {\n    dlfree($2 + -16 | 0);\n    HEAP32[HEAP32[$3 >> 2] + 84 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   $2 = HEAP32[$1 + 3616 >> 2];\n   if ($2) {\n    dlfree($2);\n    HEAP32[HEAP32[$3 >> 2] + 116 >> 2] = 0;\n    HEAP32[HEAP32[$3 >> 2] + 3616 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   $2 = HEAP32[$1 + 88 >> 2];\n   if ($2) {\n    dlfree($2 + -16 | 0);\n    HEAP32[HEAP32[$3 >> 2] + 88 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   $2 = HEAP32[$1 + 3620 >> 2];\n   if ($2) {\n    dlfree($2);\n    HEAP32[HEAP32[$3 >> 2] + 120 >> 2] = 0;\n    HEAP32[HEAP32[$3 >> 2] + 3620 >> 2] = 0;\n    $1 = HEAP32[$3 >> 2];\n   }\n   HEAP32[$1 + 220 >> 2] = 0;\n   HEAP32[$1 + 224 >> 2] = 0;\n   if (HEAP32[$1 >> 2]) {\n    $1 = HEAP32[$0 >> 2] + 32 | 0;\n    ogg_sync_clear($1 + 368 | 0);\n    ogg_stream_clear($1 + 8 | 0);\n    $1 = HEAP32[$0 + 4 >> 2];\n   }\n   $2 = HEAP32[$1 + 52 >> 2];\n   if ($2) {\n    if (($2 | 0) != HEAP32[1887]) {\n     fclose($2);\n     $1 = HEAP32[$3 >> 2];\n    }\n    HEAP32[$1 + 52 >> 2] = 0;\n   }\n   $3 = 1;\n   if (HEAP32[$1 + 3624 >> 2]) {\n    $3 = !memcmp($1 + 312 | 0, $1 + 3732 | 0, 16)\n   }\n   HEAP32[$1 + 48 >> 2] = 0;\n   HEAP32[$1 + 3632 >> 2] = 0;\n   memset($1 + 608 | 0, 512);\n   HEAP32[$1 + 32 >> 2] = 0;\n   HEAP32[$1 + 24 >> 2] = 0;\n   HEAP32[$1 + 28 >> 2] = 0;\n   HEAP32[$1 + 16 >> 2] = 0;\n   HEAP32[$1 + 20 >> 2] = 0;\n   HEAP32[$1 + 8 >> 2] = 0;\n   HEAP32[$1 + 12 >> 2] = 0;\n   HEAP32[$1 >> 2] = 0;\n   HEAP32[$1 + 4 >> 2] = 0;\n   $1 = HEAP32[$0 + 4 >> 2];\n   HEAP32[$1 + 1124 >> 2] = 0;\n   HEAP32[$1 + 608 >> 2] = 1;\n   $1 = HEAP32[$0 >> 2];\n   HEAP32[$1 + 28 >> 2] = 0;\n   FLAC__ogg_decoder_aspect_set_defaults($1 + 32 | 0);\n   HEAP32[HEAP32[$0 >> 2] >> 2] = 9;\n  }\n  return $3 | 0;\n }\n \n function FLAC__stream_decoder_init_stream($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  $4 = $4 | 0;\n  $5 = $5 | 0;\n  $6 = $6 | 0;\n  $7 = $7 | 0;\n  $8 = $8 | 0;\n  $9 = $9 | 0;\n  return init_stream_internal_($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, 0) | 0;\n }\n \n function init_stream_internal_($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10) {\n  var $11 = 0, $12 = 0;\n  $11 = 5;\n  label$1 : {\n   $12 = HEAP32[$0 >> 2];\n   label$2 : {\n    if (HEAP32[$12 >> 2] != 9) {\n     break label$2\n    }\n    $11 = 2;\n    if (!$8 | (!$1 | !$6)) {\n     break label$2\n    }\n    if ($2) {\n     if (!$5 | (!$3 | !$4)) {\n      break label$2\n     }\n    }\n    $11 = HEAP32[$0 + 4 >> 2];\n    HEAP32[$11 >> 2] = $10;\n    if ($10) {\n     if (!FLAC__ogg_decoder_aspect_init($12 + 32 | 0)) {\n      break label$1\n     }\n     $11 = HEAP32[$0 + 4 >> 2];\n    }\n    FLAC__cpu_info($11 + 3524 | 0);\n    $10 = HEAP32[$0 + 4 >> 2];\n    HEAP32[$10 + 44 >> 2] = 5;\n    HEAP32[$10 + 40 >> 2] = 6;\n    HEAP32[$10 + 36 >> 2] = 5;\n    if (!FLAC__bitreader_init(HEAP32[$10 + 56 >> 2], $0)) {\n     HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n     return 3;\n    }\n    $10 = HEAP32[$0 + 4 >> 2];\n    HEAP32[$10 + 48 >> 2] = $9;\n    HEAP32[$10 + 32 >> 2] = $8;\n    HEAP32[$10 + 28 >> 2] = $7;\n    HEAP32[$10 + 24 >> 2] = $6;\n    HEAP32[$10 + 20 >> 2] = $5;\n    HEAP32[$10 + 16 >> 2] = $4;\n    HEAP32[$10 + 12 >> 2] = $3;\n    HEAP32[$10 + 8 >> 2] = $2;\n    HEAP32[$10 + 4 >> 2] = $1;\n    HEAP32[$10 + 3520 >> 2] = 0;\n    HEAP32[$10 + 248 >> 2] = 0;\n    HEAP32[$10 + 240 >> 2] = 0;\n    HEAP32[$10 + 244 >> 2] = 0;\n    HEAP32[$10 + 228 >> 2] = 0;\n    HEAP32[$10 + 232 >> 2] = 0;\n    HEAP32[$10 + 3624 >> 2] = HEAP32[HEAP32[$0 >> 2] + 28 >> 2];\n    HEAP32[$10 + 3628 >> 2] = 1;\n    HEAP32[$10 + 3632 >> 2] = 0;\n    $11 = FLAC__stream_decoder_reset($0) ? 0 : 3;\n   }\n   return $11;\n  }\n  HEAP32[HEAP32[$0 >> 2] + 4 >> 2] = 4;\n  return 4;\n }\n \n function read_callback_($0, $1, $2) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  var $3 = 0, $4 = 0;\n  label$1 : {\n   $3 = HEAP32[$2 + 4 >> 2];\n   if (HEAP32[$3 >> 2]) {\n    break label$1\n   }\n   $4 = HEAP32[$3 + 20 >> 2];\n   if (!$4) {\n    break label$1\n   }\n   if (!FUNCTION_TABLE[$4]($2, HEAP32[$3 + 48 >> 2])) {\n    break label$1\n   }\n   HEAP32[$1 >> 2] = 0;\n   HEAP32[HEAP32[$2 >> 2] >> 2] = 4;\n   return 0;\n  }\n  label$2 : {\n   label$3 : {\n    if (HEAP32[$1 >> 2]) {\n     $3 = HEAP32[$2 + 4 >> 2];\n     if (!(!HEAP32[$3 + 3632 >> 2] | HEAPU32[$3 + 6152 >> 2] < 21)) {\n      HEAP32[HEAP32[$2 >> 2] >> 2] = 7;\n      break label$3;\n     }\n     label$6 : {\n      label$7 : {\n       label$8 : {\n        label$9 : {\n         if (HEAP32[$3 >> 2]) {\n          $4 = 0;\n          switch (FLAC__ogg_decoder_aspect_read_callback_wrapper(HEAP32[$2 >> 2] + 32 | 0, $0, $1, $2, HEAP32[$3 + 48 >> 2]) | 0) {\n          case 0:\n          case 2:\n           break label$7;\n          case 1:\n           break label$8;\n          default:\n           break label$9;\n          };\n         }\n         $4 = FUNCTION_TABLE[HEAP32[$3 + 4 >> 2]]($2, $0, $1, HEAP32[$3 + 48 >> 2]) | 0;\n         if (($4 | 0) != 2) {\n          break label$7\n         }\n        }\n        HEAP32[HEAP32[$2 >> 2] >> 2] = 7;\n        break label$3;\n       }\n       $0 = 1;\n       if (!HEAP32[$1 >> 2]) {\n        break label$6\n       }\n       break label$2;\n      }\n      $0 = 1;\n      if (HEAP32[$1 >> 2]) {\n       break label$2\n      }\n      if (($4 | 0) == 1) {\n       break label$6\n      }\n      $1 = HEAP32[$2 + 4 >> 2];\n      if (HEAP32[$1 >> 2]) {\n       break label$2\n      }\n      $3 = HEAP32[$1 + 20 >> 2];\n      if (!$3) {\n       break label$2\n      }\n      if (!FUNCTION_TABLE[$3]($2, HEAP32[$1 + 48 >> 2])) {\n       break label$2\n      }\n     }\n     HEAP32[HEAP32[$2 >> 2] >> 2] = 4;\n     break label$3;\n    }\n    HEAP32[HEAP32[$2 >> 2] >> 2] = 7;\n   }\n   $0 = 0;\n  }\n  return $0 | 0;\n }\n \n function FLAC__stream_decoder_reset($0) {\n  $0 = $0 | 0;\n  var $1 = 0, $2 = 0, $3 = 0;\n  $1 = HEAP32[$0 + 4 >> 2];\n  label$1 : {\n   if (HEAP32[HEAP32[$0 >> 2] >> 2] == 9 ? !HEAP32[$1 + 3628 >> 2] : 0) {\n    break label$1\n   }\n   HEAP32[$1 + 3624 >> 2] = 0;\n   HEAP32[$1 + 240 >> 2] = 0;\n   HEAP32[$1 + 244 >> 2] = 0;\n   if (HEAP32[$1 >> 2]) {\n    $1 = HEAP32[$0 >> 2] + 32 | 0;\n    ogg_stream_reset($1 + 8 | 0);\n    ogg_sync_reset($1 + 368 | 0);\n    HEAP32[$1 + 408 >> 2] = 0;\n    HEAP32[$1 + 412 >> 2] = 0;\n    $1 = HEAP32[$0 + 4 >> 2];\n   }\n   $1 = HEAP32[$1 + 56 >> 2];\n   HEAP32[$1 + 8 >> 2] = 0;\n   HEAP32[$1 + 12 >> 2] = 0;\n   HEAP32[$1 + 16 >> 2] = 0;\n   HEAP32[$1 + 20 >> 2] = 0;\n   $1 = 1;\n   $2 = HEAP32[$0 >> 2];\n   if (!$1) {\n    HEAP32[$2 >> 2] = 8;\n    return 0;\n   }\n   HEAP32[$2 >> 2] = 2;\n   $1 = HEAP32[$0 + 4 >> 2];\n   if (HEAP32[$1 >> 2]) {\n    FLAC__ogg_decoder_aspect_reset($2 + 32 | 0);\n    $1 = HEAP32[$0 + 4 >> 2];\n   }\n   label$6 : {\n    if (!HEAP32[$1 + 3628 >> 2]) {\n     $2 = 0;\n     if (HEAP32[$1 + 52 >> 2] == HEAP32[1887]) {\n      break label$1\n     }\n     $3 = HEAP32[$1 + 8 >> 2];\n     if (!$3) {\n      break label$6\n     }\n     if ((FUNCTION_TABLE[$3]($0, 0, 0, HEAP32[$1 + 48 >> 2]) | 0) == 1) {\n      break label$1\n     }\n     $1 = HEAP32[$0 + 4 >> 2];\n     break label$6;\n    }\n    HEAP32[$1 + 3628 >> 2] = 0;\n   }\n   HEAP32[HEAP32[$0 >> 2] >> 2] = 0;\n   HEAP32[$1 + 248 >> 2] = 0;\n   dlfree(HEAP32[$1 + 452 >> 2]);\n   HEAP32[HEAP32[$0 + 4 >> 2] + 452 >> 2] = 0;\n   $1 = HEAP32[$0 + 4 >> 2];\n   HEAP32[$1 + 252 >> 2] = 0;\n   HEAP32[$1 + 3624 >> 2] = HEAP32[HEAP32[$0 >> 2] + 28 >> 2];\n   HEAP32[$1 + 228 >> 2] = 0;\n   HEAP32[$1 + 232 >> 2] = 0;\n   FLAC__MD5Init($1 + 3636 | 0);\n   $0 = HEAP32[$0 + 4 >> 2];\n   HEAP32[$0 + 6152 >> 2] = 0;\n   HEAP32[$0 + 6136 >> 2] = 0;\n   HEAP32[$0 + 6140 >> 2] = 0;\n   $2 = 1;\n  }\n  return $2 | 0;\n }\n \n function FLAC__stream_decoder_init_ogg_stream($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  $4 = $4 | 0;\n  $5 = $5 | 0;\n  $6 = $6 | 0;\n  $7 = $7 | 0;\n  $8 = $8 | 0;\n  $9 = $9 | 0;\n  return init_stream_internal_($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, 1) | 0;\n }\n \n function FLAC__stream_decoder_set_ogg_serial_number($0, $1) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $0 = HEAP32[$0 >> 2];\n  if (HEAP32[$0 >> 2] == 9) {\n   $0 = $0 + 32 | 0;\n   HEAP32[$0 + 4 >> 2] = $1;\n   HEAP32[$0 >> 2] = 0;\n   $0 = 1;\n  } else {\n   $0 = 0\n  }\n  return $0 | 0;\n }\n \n function FLAC__stream_decoder_set_md5_checking($0, $1) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $0 = HEAP32[$0 >> 2];\n  if (HEAP32[$0 >> 2] == 9) {\n   HEAP32[$0 + 28 >> 2] = $1;\n   $0 = 1;\n  } else {\n   $0 = 0\n  }\n  return $0 | 0;\n }\n \n function FLAC__stream_decoder_set_metadata_respond($0, $1) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  var $2 = 0;\n  label$1 : {\n   if (HEAP32[HEAP32[$0 >> 2] >> 2] != 9 | $1 >>> 0 > 126) {\n    break label$1\n   }\n   $2 = 1;\n   $0 = HEAP32[$0 + 4 >> 2];\n   HEAP32[($0 + ($1 << 2) | 0) + 608 >> 2] = 1;\n   if (($1 | 0) != 2) {\n    break label$1\n   }\n   HEAP32[$0 + 1124 >> 2] = 0;\n  }\n  return $2 | 0;\n }\n \n function FLAC__stream_decoder_set_metadata_respond_application($0, $1) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  var $2 = 0, $3 = 0, $4 = 0;\n  $2 = 0;\n  label$1 : {\n   if (HEAP32[HEAP32[$0 >> 2] >> 2] != 9) {\n    break label$1\n   }\n   $3 = HEAP32[$0 + 4 >> 2];\n   $2 = 1;\n   if (HEAP32[$3 + 616 >> 2]) {\n    break label$1\n   }\n   $2 = HEAP32[$3 + 1120 >> 2];\n   label$2 : {\n    $4 = HEAP32[$3 + 1124 >> 2];\n    label$3 : {\n     if (($4 | 0) != HEAP32[$3 + 1128 >> 2]) {\n      $3 = $2;\n      break label$3;\n     }\n     label$5 : {\n      if (!$4) {\n       $3 = dlrealloc($2, 0);\n       break label$5;\n      }\n      if ($4 + $4 >>> 0 >= $4 >>> 0) {\n       $3 = dlrealloc($2, $4 << 1);\n       if ($3) {\n        break label$5\n       }\n       dlfree($2);\n       $3 = HEAP32[$0 + 4 >> 2];\n      }\n      HEAP32[$3 + 1120 >> 2] = 0;\n      break label$2;\n     }\n     $2 = HEAP32[$0 + 4 >> 2];\n     HEAP32[$2 + 1120 >> 2] = $3;\n     if (!$3) {\n      break label$2\n     }\n     HEAP32[$2 + 1128 >> 2] = HEAP32[$2 + 1128 >> 2] << 1;\n     $4 = HEAP32[$2 + 1124 >> 2];\n    }\n    $2 = $3;\n    $3 = HEAP32[1364] >>> 3 | 0;\n    memcpy($2 + Math_imul($3, $4) | 0, $1, $3);\n    $0 = HEAP32[$0 + 4 >> 2];\n    HEAP32[$0 + 1124 >> 2] = HEAP32[$0 + 1124 >> 2] + 1;\n    return 1;\n   }\n   HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n   $2 = 0;\n  }\n  return $2 | 0;\n }\n \n function FLAC__stream_decoder_set_metadata_respond_all($0) {\n  $0 = $0 | 0;\n  var $1 = 0;\n  if (HEAP32[HEAP32[$0 >> 2] >> 2] == 9) {\n   $1 = HEAP32[$0 + 4 >> 2];\n   $0 = 0;\n   while (1) {\n    HEAP32[($1 + ($0 << 2) | 0) + 608 >> 2] = 1;\n    $0 = $0 + 1 | 0;\n    if (($0 | 0) != 128) {\n     continue\n    }\n    break;\n   };\n   HEAP32[$1 + 1124 >> 2] = 0;\n   $0 = 1;\n  } else {\n   $0 = 0\n  }\n  return $0 | 0;\n }\n \n function FLAC__stream_decoder_set_metadata_ignore($0, $1) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  var $2 = 0;\n  label$1 : {\n   if (HEAP32[HEAP32[$0 >> 2] >> 2] != 9 | $1 >>> 0 > 126) {\n    break label$1\n   }\n   $0 = HEAP32[$0 + 4 >> 2];\n   HEAP32[($0 + ($1 << 2) | 0) + 608 >> 2] = 0;\n   $2 = 1;\n   if (($1 | 0) != 2) {\n    break label$1\n   }\n   HEAP32[$0 + 1124 >> 2] = 0;\n  }\n  return $2 | 0;\n }\n \n function FLAC__stream_decoder_set_metadata_ignore_application($0, $1) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  var $2 = 0, $3 = 0, $4 = 0;\n  if (HEAP32[HEAP32[$0 >> 2] >> 2] == 9) {\n   $2 = HEAP32[$0 + 4 >> 2];\n   if (!HEAP32[$2 + 616 >> 2]) {\n    return 1\n   }\n   $3 = HEAP32[$2 + 1120 >> 2];\n   label$3 : {\n    $4 = HEAP32[$2 + 1124 >> 2];\n    label$4 : {\n     if (($4 | 0) != HEAP32[$2 + 1128 >> 2]) {\n      $2 = $3;\n      break label$4;\n     }\n     label$6 : {\n      if (!$4) {\n       $2 = dlrealloc($3, 0);\n       break label$6;\n      }\n      if ($4 + $4 >>> 0 >= $4 >>> 0) {\n       $2 = dlrealloc($3, $4 << 1);\n       if ($2) {\n        break label$6\n       }\n       dlfree($3);\n       $2 = HEAP32[$0 + 4 >> 2];\n      }\n      HEAP32[$2 + 1120 >> 2] = 0;\n      break label$3;\n     }\n     $3 = HEAP32[$0 + 4 >> 2];\n     HEAP32[$3 + 1120 >> 2] = $2;\n     if (!$2) {\n      break label$3\n     }\n     HEAP32[$3 + 1128 >> 2] = HEAP32[$3 + 1128 >> 2] << 1;\n     $4 = HEAP32[$3 + 1124 >> 2];\n    }\n    $3 = $2;\n    $2 = HEAP32[1364] >>> 3 | 0;\n    memcpy($3 + Math_imul($2, $4) | 0, $1, $2);\n    $0 = HEAP32[$0 + 4 >> 2];\n    HEAP32[$0 + 1124 >> 2] = HEAP32[$0 + 1124 >> 2] + 1;\n    return 1;\n   }\n   HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n  }\n  return 0;\n }\n \n function FLAC__stream_decoder_set_metadata_ignore_all($0) {\n  $0 = $0 | 0;\n  if (HEAP32[HEAP32[$0 >> 2] >> 2] == 9) {\n   memset(HEAP32[$0 + 4 >> 2] + 608 | 0, 512);\n   HEAP32[HEAP32[$0 + 4 >> 2] + 1124 >> 2] = 0;\n   $0 = 1;\n  } else {\n   $0 = 0\n  }\n  return $0 | 0;\n }\n \n function FLAC__stream_decoder_get_state($0) {\n  $0 = $0 | 0;\n  return HEAP32[HEAP32[$0 >> 2] >> 2];\n }\n \n function FLAC__stream_decoder_get_md5_checking($0) {\n  $0 = $0 | 0;\n  return HEAP32[HEAP32[$0 >> 2] + 28 >> 2];\n }\n \n function FLAC__stream_decoder_process_single($0) {\n  $0 = $0 | 0;\n  var $1 = 0, $2 = 0, $3 = 0;\n  $1 = global$0 - 16 | 0;\n  global$0 = $1;\n  $2 = 1;\n  label$1 : {\n   while (1) {\n    label$3 : {\n     label$4 : {\n      switch (HEAP32[HEAP32[$0 >> 2] >> 2]) {\n      case 0:\n       if (find_metadata_($0)) {\n        continue\n       }\n       $2 = 0;\n       break label$3;\n      case 1:\n       $3 = (read_metadata_($0) | 0) != 0;\n       break label$1;\n      case 2:\n       if (frame_sync_($0)) {\n        continue\n       }\n       break label$3;\n      case 4:\n      case 7:\n       break label$3;\n      case 3:\n       break label$4;\n      default:\n       break label$1;\n      };\n     }\n     if (!read_frame_($0, $1 + 12 | 0)) {\n      $2 = 0;\n      break label$3;\n     }\n     if (!HEAP32[$1 + 12 >> 2]) {\n      continue\n     }\n    }\n    break;\n   };\n   $3 = $2;\n  }\n  global$0 = $1 + 16 | 0;\n  return $3 | 0;\n }\n \n function find_metadata_($0) {\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;\n  $2 = global$0 - 16 | 0;\n  global$0 = $2;\n  $5 = 1;\n  label$1 : {\n   while (1) {\n    $1 = 0;\n    label$3 : {\n     while (1) {\n      $6 = HEAP32[$0 + 4 >> 2];\n      label$5 : {\n       if (HEAP32[$6 + 3520 >> 2]) {\n        $4 = HEAPU8[$6 + 3590 | 0];\n        HEAP32[$2 + 8 >> 2] = $4;\n        HEAP32[$6 + 3520 >> 2] = 0;\n        break label$5;\n       }\n       if (!FLAC__bitreader_read_raw_uint32(HEAP32[$6 + 56 >> 2], $2 + 8 | 0, 8)) {\n        $3 = 0;\n        break label$1;\n       }\n       $4 = HEAP32[$2 + 8 >> 2];\n      }\n      if (HEAPU8[$3 + 5409 | 0] == ($4 | 0)) {\n       $3 = $3 + 1 | 0;\n       $1 = 1;\n       break label$3;\n      }\n      $3 = 0;\n      if (($1 | 0) == 3) {\n       break label$1\n      }\n      if (HEAPU8[$1 + 7552 | 0] == ($4 | 0)) {\n       $1 = $1 + 1 | 0;\n       if (($1 | 0) != 3) {\n        continue\n       }\n       label$10 : {\n        label$11 : {\n         if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 12 | 0, 24)) {\n          break label$11\n         }\n         if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 12 | 0, 8)) {\n          break label$11\n         }\n         $4 = HEAP32[$2 + 12 >> 2];\n         if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 12 | 0, 8)) {\n          break label$11\n         }\n         $6 = HEAP32[$2 + 12 >> 2];\n         if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 12 | 0, 8)) {\n          break label$11\n         }\n         $7 = HEAP32[$2 + 12 >> 2];\n         if (FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 12 | 0, 8)) {\n          break label$10\n         }\n        }\n        break label$1;\n       }\n       if (FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], HEAP32[$2 + 12 >> 2] & 127 | ($7 << 7 & 16256 | ($6 & 127 | $4 << 7 & 16256) << 14))) {\n        continue\n       }\n       break label$1;\n      }\n      break;\n     };\n     label$12 : {\n      if (($4 | 0) != 255) {\n       break label$12\n      }\n      HEAP8[HEAP32[$0 + 4 >> 2] + 3588 | 0] = 255;\n      if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $2 + 8 | 0, 8)) {\n       break label$1\n      }\n      $1 = HEAP32[$2 + 8 >> 2];\n      if (($1 | 0) == 255) {\n       $1 = HEAP32[$0 + 4 >> 2];\n       HEAP32[$1 + 3520 >> 2] = 1;\n       HEAP8[$1 + 3590 | 0] = 255;\n       break label$12;\n      }\n      if (($1 & -2) != 248) {\n       break label$12\n      }\n      HEAP8[HEAP32[$0 + 4 >> 2] + 3589 | 0] = $1;\n      HEAP32[HEAP32[$0 >> 2] >> 2] = 3;\n      $3 = 1;\n      break label$1;\n     }\n     $1 = 0;\n     if (!$5) {\n      break label$3\n     }\n     $5 = HEAP32[$0 + 4 >> 2];\n     $1 = 0;\n     if (HEAP32[$5 + 3632 >> 2]) {\n      break label$3\n     }\n     FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 0, HEAP32[$5 + 48 >> 2]);\n     $1 = 0;\n    }\n    $5 = $1;\n    if ($3 >>> 0 < 4) {\n     continue\n    }\n    break;\n   };\n   $3 = 1;\n   HEAP32[HEAP32[$0 >> 2] >> 2] = 1;\n  }\n  global$0 = $2 + 16 | 0;\n  return $3;\n }\n \n function read_metadata_($0) {\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0;\n  $7 = global$0 - 192 | 0;\n  global$0 = $7;\n  label$1 : {\n   label$2 : {\n    if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $7 + 184 | 0, HEAP32[1391])) {\n     break label$2\n    }\n    $15 = HEAP32[$7 + 184 >> 2];\n    $4 = $0 + 4 | 0;\n    if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 180 | 0, HEAP32[1392])) {\n     break label$1\n    }\n    if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 176 | 0, HEAP32[1393])) {\n     break label$1\n    }\n    $6 = ($15 | 0) != 0;\n    label$3 : {\n     label$4 : {\n      label$5 : {\n       label$6 : {\n        label$7 : {\n         $2 = HEAP32[$7 + 180 >> 2];\n         switch ($2 | 0) {\n         case 3:\n          break label$6;\n         case 0:\n          break label$7;\n         default:\n          break label$5;\n         };\n        }\n        $3 = HEAP32[$7 + 176 >> 2];\n        $2 = 0;\n        $1 = HEAP32[$4 >> 2];\n        HEAP32[$1 + 256 >> 2] = 0;\n        HEAP32[$1 + 264 >> 2] = $3;\n        HEAP32[$1 + 260 >> 2] = $6;\n        $5 = HEAP32[$1 + 56 >> 2];\n        $1 = HEAP32[1356];\n        if (!FLAC__bitreader_read_raw_uint32($5, $7, $1)) {\n         break label$1\n        }\n        HEAP32[HEAP32[$4 >> 2] + 272 >> 2] = HEAP32[$7 >> 2];\n        $5 = HEAP32[1357];\n        if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $5)) {\n         break label$1\n        }\n        HEAP32[HEAP32[$4 >> 2] + 276 >> 2] = HEAP32[$7 >> 2];\n        $6 = HEAP32[1358];\n        if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $6)) {\n         break label$1\n        }\n        HEAP32[HEAP32[$4 >> 2] + 280 >> 2] = HEAP32[$7 >> 2];\n        $8 = HEAP32[1359];\n        if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $8)) {\n         break label$1\n        }\n        HEAP32[HEAP32[$4 >> 2] + 284 >> 2] = HEAP32[$7 >> 2];\n        $9 = HEAP32[1360];\n        if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $9)) {\n         break label$1\n        }\n        HEAP32[HEAP32[$4 >> 2] + 288 >> 2] = HEAP32[$7 >> 2];\n        $10 = HEAP32[1361];\n        if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $10)) {\n         break label$1\n        }\n        HEAP32[HEAP32[$4 >> 2] + 292 >> 2] = HEAP32[$7 >> 2] + 1;\n        $11 = HEAP32[1362];\n        if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7, $11)) {\n         break label$1\n        }\n        HEAP32[HEAP32[$4 >> 2] + 296 >> 2] = HEAP32[$7 >> 2] + 1;\n        $12 = HEAP32[$4 >> 2];\n        $13 = HEAP32[$12 + 56 >> 2];\n        $14 = $12 + 304 | 0;\n        $12 = HEAP32[1363];\n        if (!FLAC__bitreader_read_raw_uint64($13, $14, $12)) {\n         break label$1\n        }\n        $13 = HEAP32[$4 >> 2];\n        if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[$13 + 56 >> 2], $13 + 312 | 0, 16)) {\n         break label$1\n        }\n        if (!FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3 - (($12 + ($11 + ($10 + ($9 + ($8 + ($6 + ($1 + $5 | 0) | 0) | 0) | 0) | 0) | 0) | 0) + 128 >>> 3 | 0) | 0)) {\n         break label$2\n        }\n        $1 = HEAP32[$4 >> 2];\n        HEAP32[$1 + 248 >> 2] = 1;\n        if (!memcmp($1 + 312 | 0, 7555, 16)) {\n         HEAP32[$1 + 3624 >> 2] = 0\n        }\n        if (HEAP32[$1 + 3632 >> 2] | !HEAP32[$1 + 608 >> 2]) {\n         break label$4\n        }\n        $2 = HEAP32[$1 + 28 >> 2];\n        if (!$2) {\n         break label$4\n        }\n        FUNCTION_TABLE[$2]($0, $1 + 256 | 0, HEAP32[$1 + 48 >> 2]);\n        break label$4;\n       }\n       $1 = HEAP32[$4 >> 2];\n       HEAP32[$1 + 252 >> 2] = 0;\n       $5 = HEAP32[$7 + 176 >> 2];\n       HEAP32[$1 + 448 >> 2] = ($5 >>> 0) / 18;\n       HEAP32[$1 + 440 >> 2] = $5;\n       HEAP32[$1 + 436 >> 2] = $6;\n       HEAP32[$1 + 432 >> 2] = 3;\n       $1 = HEAP32[$4 >> 2];\n       $2 = HEAP32[$1 + 452 >> 2];\n       $3 = HEAP32[$1 + 448 >> 2];\n       label$9 : {\n        if ($3) {\n         __wasm_i64_mul($3, 0, 24, 0);\n         if (!i64toi32_i32$HIGH_BITS) {\n          $1 = dlrealloc($2, Math_imul($3, 24));\n          if ($1) {\n           HEAP32[HEAP32[$4 >> 2] + 452 >> 2] = $1;\n           break label$9;\n          }\n          dlfree($2);\n          $1 = HEAP32[$4 >> 2];\n         }\n         HEAP32[$1 + 452 >> 2] = 0;\n         break label$3;\n        }\n        $1 = dlrealloc($2, 0);\n        HEAP32[HEAP32[$4 >> 2] + 452 >> 2] = $1;\n        if (!$1) {\n         break label$3\n        }\n       }\n       $2 = HEAP32[$4 >> 2];\n       $1 = 0;\n       label$14 : {\n        if (!HEAP32[$2 + 448 >> 2]) {\n         break label$14\n        }\n        $6 = HEAP32[1367];\n        $8 = HEAP32[1366];\n        $9 = HEAP32[1365];\n        $3 = 0;\n        while (1) {\n         if (!FLAC__bitreader_read_raw_uint64(HEAP32[$2 + 56 >> 2], $7, $9)) {\n          break label$2\n         }\n         $2 = HEAP32[$7 + 4 >> 2];\n         $1 = Math_imul($3, 24);\n         $10 = HEAP32[$4 >> 2];\n         $11 = $1 + HEAP32[$10 + 452 >> 2] | 0;\n         HEAP32[$11 >> 2] = HEAP32[$7 >> 2];\n         HEAP32[$11 + 4 >> 2] = $2;\n         if (!FLAC__bitreader_read_raw_uint64(HEAP32[$10 + 56 >> 2], $7, $8)) {\n          break label$2\n         }\n         $2 = HEAP32[$7 + 4 >> 2];\n         $10 = HEAP32[$4 >> 2];\n         $11 = $1 + HEAP32[$10 + 452 >> 2] | 0;\n         HEAP32[$11 + 8 >> 2] = HEAP32[$7 >> 2];\n         HEAP32[$11 + 12 >> 2] = $2;\n         if (!FLAC__bitreader_read_raw_uint32(HEAP32[$10 + 56 >> 2], $7 + 188 | 0, $6)) {\n          break label$2\n         }\n         $2 = HEAP32[$4 >> 2];\n         HEAP32[($1 + HEAP32[$2 + 452 >> 2] | 0) + 16 >> 2] = HEAP32[$7 + 188 >> 2];\n         $3 = $3 + 1 | 0;\n         $1 = HEAP32[$2 + 448 >> 2];\n         if ($3 >>> 0 < $1 >>> 0) {\n          continue\n         }\n         break;\n        };\n        $1 = Math_imul($1, -18);\n       }\n       $1 = $1 + $5 | 0;\n       if ($1) {\n        if (!FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[$2 + 56 >> 2], $1)) {\n         break label$2\n        }\n        $2 = HEAP32[$4 >> 2];\n       }\n       HEAP32[$2 + 252 >> 2] = 1;\n       if (HEAP32[$2 + 3632 >> 2] | !HEAP32[$2 + 620 >> 2]) {\n        break label$4\n       }\n       $1 = HEAP32[$2 + 28 >> 2];\n       if (!$1) {\n        break label$4\n       }\n       FUNCTION_TABLE[$1]($0, $2 + 432 | 0, HEAP32[$2 + 48 >> 2]);\n       break label$4;\n      }\n      $3 = HEAP32[$4 >> 2];\n      $8 = HEAP32[($3 + ($2 << 2) | 0) + 608 >> 2];\n      $5 = HEAP32[$7 + 176 >> 2];\n      $1 = memset($7, 176);\n      HEAP32[$1 + 8 >> 2] = $5;\n      HEAP32[$1 >> 2] = $2;\n      HEAP32[$1 + 4 >> 2] = $6;\n      $9 = !$8;\n      label$17 : {\n       if (($2 | 0) != 2) {\n        break label$17\n       }\n       $10 = $1 + 16 | 0;\n       $6 = HEAP32[1364] >>> 3 | 0;\n       if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $10, $6)) {\n        break label$2\n       }\n       if ($5 >>> 0 < $6 >>> 0) {\n        HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n        $2 = 0;\n        break label$1;\n       }\n       $5 = $5 - $6 | 0;\n       $3 = HEAP32[$4 >> 2];\n       $11 = HEAP32[$3 + 1124 >> 2];\n       if (!$11) {\n        break label$17\n       }\n       $12 = HEAP32[$3 + 1120 >> 2];\n       $2 = 0;\n       while (1) {\n        if (memcmp($12 + Math_imul($2, $6) | 0, $10, $6)) {\n         $2 = $2 + 1 | 0;\n         if (($11 | 0) != ($2 | 0)) {\n          continue\n         }\n         break label$17;\n        }\n        break;\n       };\n       $9 = ($8 | 0) != 0;\n      }\n      if ($9) {\n       if (!FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $5)) {\n        break label$2\n       }\n       break label$4;\n      }\n      label$22 : {\n       label$23 : {\n        label$24 : {\n         label$25 : {\n          label$26 : {\n           label$27 : {\n            label$28 : {\n             switch (HEAP32[$1 + 180 >> 2]) {\n             case 1:\n              if (FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $5)) {\n               break label$26\n              }\n              $6 = 0;\n              break label$22;\n             case 2:\n              if (!$5) {\n               break label$27\n              }\n              $2 = dlmalloc($5);\n              HEAP32[$1 + 20 >> 2] = $2;\n              if (!$2) {\n               HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n               $6 = 0;\n               break label$22;\n              }\n              if (FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $2, $5)) {\n               break label$26\n              }\n              $6 = 0;\n              break label$22;\n             case 4:\n              label$35 : {\n               if ($5 >>> 0 < 8) {\n                break label$35\n               }\n               $6 = 0;\n               if (!FLAC__bitreader_read_uint32_little_endian(HEAP32[$3 + 56 >> 2], $1 + 16 | 0)) {\n                break label$22\n               }\n               $5 = $5 + -8 | 0;\n               $2 = HEAP32[$1 + 16 >> 2];\n               label$36 : {\n                if ($2) {\n                 if ($5 >>> 0 < $2 >>> 0) {\n                  HEAP32[$1 + 16 >> 2] = 0;\n                  HEAP32[$1 + 20 >> 2] = 0;\n                  break label$35;\n                 }\n                 label$39 : {\n                  label$40 : {\n                   if (($2 | 0) == -1) {\n                    HEAP32[$1 + 20 >> 2] = 0;\n                    break label$40;\n                   }\n                   $3 = dlmalloc($2 + 1 | 0);\n                   HEAP32[$1 + 20 >> 2] = $3;\n                   if ($3) {\n                    break label$39\n                   }\n                  }\n                  HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n                  break label$22;\n                 }\n                 if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3, $2)) {\n                  break label$22\n                 }\n                 $5 = $5 - $2 | 0;\n                 HEAP8[HEAP32[$1 + 20 >> 2] + HEAP32[$1 + 16 >> 2] | 0] = 0;\n                 break label$36;\n                }\n                HEAP32[$1 + 20 >> 2] = 0;\n               }\n               if (!FLAC__bitreader_read_uint32_little_endian(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 24 | 0)) {\n                break label$22\n               }\n               $2 = HEAP32[$1 + 24 >> 2];\n               if ($2 >>> 0 >= 100001) {\n                HEAP32[$1 + 24 >> 2] = 0;\n                break label$22;\n               }\n               if (!$2) {\n                break label$35\n               }\n               $3 = safe_malloc_mul_2op_p($2, 8);\n               HEAP32[$1 + 28 >> 2] = $3;\n               if (!$3) {\n                break label$24\n               }\n               if (!HEAP32[$1 + 24 >> 2]) {\n                break label$35\n               }\n               HEAP32[$3 >> 2] = 0;\n               HEAP32[$3 + 4 >> 2] = 0;\n               $2 = 0;\n               label$43 : {\n                if ($5 >>> 0 < 4) {\n                 break label$43\n                }\n                while (1) {\n                 if (!FLAC__bitreader_read_uint32_little_endian(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3)) {\n                  break label$23\n                 }\n                 $5 = $5 + -4 | 0;\n                 $8 = HEAP32[$1 + 28 >> 2];\n                 $9 = $2 << 3;\n                 $3 = $8 + $9 | 0;\n                 $6 = HEAP32[$3 >> 2];\n                 label$45 : {\n                  if ($6) {\n                   if ($5 >>> 0 < $6 >>> 0) {\n                    break label$43\n                   }\n                   label$47 : {\n                    label$48 : {\n                     if (($6 | 0) == -1) {\n                      HEAP32[($8 + ($2 << 3) | 0) + 4 >> 2] = 0;\n                      break label$48;\n                     }\n                     $8 = dlmalloc($6 + 1 | 0);\n                     HEAP32[$3 + 4 >> 2] = $8;\n                     if ($8) {\n                      break label$47\n                     }\n                    }\n                    HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n                    break label$23;\n                   }\n                   $5 = $5 - $6 | 0;\n                   memset($8, HEAP32[$3 >> 2]);\n                   $6 = FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], HEAP32[$3 + 4 >> 2], HEAP32[$3 >> 2]);\n                   $8 = $9 + HEAP32[$1 + 28 >> 2] | 0;\n                   $3 = HEAP32[$8 + 4 >> 2];\n                   if (!$6) {\n                    dlfree($3);\n                    HEAP32[(HEAP32[$1 + 28 >> 2] + ($2 << 3) | 0) + 4 >> 2] = 0;\n                    break label$43;\n                   }\n                   HEAP8[$3 + HEAP32[$8 >> 2] | 0] = 0;\n                   break label$45;\n                  }\n                  HEAP32[$3 + 4 >> 2] = 0;\n                 }\n                 $2 = $2 + 1 | 0;\n                 if ($2 >>> 0 >= HEAPU32[$1 + 24 >> 2]) {\n                  break label$35\n                 }\n                 $3 = HEAP32[$1 + 28 >> 2] + ($2 << 3) | 0;\n                 HEAP32[$3 >> 2] = 0;\n                 HEAP32[$3 + 4 >> 2] = 0;\n                 if ($5 >>> 0 >= 4) {\n                  continue\n                 }\n                 break;\n                };\n               }\n               HEAP32[$1 + 24 >> 2] = $2;\n              }\n              if (!$5) {\n               break label$26\n              }\n              if (!HEAP32[$1 + 24 >> 2]) {\n               $2 = $1 + 28 | 0;\n               dlfree(HEAP32[$2 >> 2]);\n               HEAP32[$2 >> 2] = 0;\n              }\n              if (FLAC__bitreader_skip_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $5)) {\n               break label$26\n              }\n              $6 = 0;\n              break label$22;\n             case 5:\n              $6 = 0;\n              $2 = memset($1 + 16 | 0, 160);\n              if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $2, HEAP32[1378] >>> 3 | 0)) {\n               break label$22\n              }\n              if (!FLAC__bitreader_read_raw_uint64(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 152 | 0, HEAP32[1379])) {\n               break label$22\n              }\n              if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, HEAP32[1380])) {\n               break label$22\n              }\n              HEAP32[$1 + 160 >> 2] = HEAP32[$1 + 188 >> 2] != 0;\n              if (!FLAC__bitreader_skip_bits_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], HEAP32[1381])) {\n               break label$22\n              }\n              if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, HEAP32[1382])) {\n               break label$22\n              }\n              $2 = HEAP32[$1 + 188 >> 2];\n              HEAP32[$1 + 164 >> 2] = $2;\n              if (!$2) {\n               break label$26\n              }\n              $2 = dlcalloc($2, 32);\n              HEAP32[$1 + 168 >> 2] = $2;\n              if (!$2) {\n               break label$25\n              }\n              $9 = HEAP32[1371];\n              if (!FLAC__bitreader_read_raw_uint64(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $2, $9)) {\n               break label$22\n              }\n              $10 = HEAP32[1373] >>> 3 | 0;\n              $11 = HEAP32[1370];\n              $12 = HEAP32[1369];\n              $8 = HEAP32[1368];\n              $13 = HEAP32[1377];\n              $16 = HEAP32[1376];\n              $17 = HEAP32[1375];\n              $18 = HEAP32[1374];\n              $19 = HEAP32[1372];\n              $5 = 0;\n              while (1) {\n               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, $19)) {\n                break label$22\n               }\n               $2 = ($5 << 5) + $2 | 0;\n               HEAP8[$2 + 8 | 0] = HEAP32[$1 + 188 >> 2];\n               if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $2 + 9 | 0, $10)) {\n                break label$22\n               }\n               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, $18)) {\n                break label$22\n               }\n               HEAP8[$2 + 22 | 0] = HEAPU8[$2 + 22 | 0] & 254 | HEAP8[$1 + 188 | 0] & 1;\n               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, $17)) {\n                break label$22\n               }\n               $3 = $2 + 22 | 0;\n               HEAP8[$3 | 0] = HEAPU8[$1 + 188 | 0] << 1 & 2 | HEAPU8[$3 | 0] & 253;\n               if (!FLAC__bitreader_skip_bits_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $16)) {\n                break label$22\n               }\n               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, $13)) {\n                break label$22\n               }\n               $3 = HEAP32[$1 + 188 >> 2];\n               HEAP8[$2 + 23 | 0] = $3;\n               label$53 : {\n                $3 = $3 & 255;\n                if (!$3) {\n                 break label$53\n                }\n                $3 = dlcalloc($3, 16);\n                HEAP32[$2 + 24 >> 2] = $3;\n                label$54 : {\n                 if ($3) {\n                  $14 = $2 + 23 | 0;\n                  if (!HEAPU8[$14 | 0]) {\n                   break label$53\n                  }\n                  if (!FLAC__bitreader_read_raw_uint64(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3, $8)) {\n                   break label$22\n                  }\n                  $20 = $2 + 24 | 0;\n                  $2 = 0;\n                  break label$54;\n                 }\n                 HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n                 break label$22;\n                }\n                while (1) {\n                 if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, $12)) {\n                  break label$22\n                 }\n                 HEAP8[(($2 << 4) + $3 | 0) + 8 | 0] = HEAP32[$1 + 188 >> 2];\n                 if (!FLAC__bitreader_skip_bits_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $11)) {\n                  break label$22\n                 }\n                 $2 = $2 + 1 | 0;\n                 if ($2 >>> 0 >= HEAPU8[$14 | 0]) {\n                  break label$53\n                 }\n                 $3 = HEAP32[$20 >> 2];\n                 if (FLAC__bitreader_read_raw_uint64(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3 + ($2 << 4) | 0, $8)) {\n                  continue\n                 }\n                 break;\n                };\n                break label$22;\n               }\n               $5 = $5 + 1 | 0;\n               if ($5 >>> 0 >= HEAPU32[$1 + 164 >> 2]) {\n                break label$26\n               }\n               $2 = HEAP32[$1 + 168 >> 2];\n               if (FLAC__bitreader_read_raw_uint64(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $2 + ($5 << 5) | 0, $9)) {\n                continue\n               }\n               break;\n              };\n              break label$22;\n             case 6:\n              label$57 : {\n               if (!FLAC__bitreader_read_raw_uint32(HEAP32[$3 + 56 >> 2], $1 + 188 | 0, HEAP32[1383])) {\n                break label$57\n               }\n               HEAP32[$1 + 16 >> 2] = HEAP32[$1 + 188 >> 2];\n               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, HEAP32[1384])) {\n                break label$57\n               }\n               label$58 : {\n                $2 = HEAP32[$1 + 188 >> 2];\n                label$59 : {\n                 if (($2 | 0) == -1) {\n                  HEAP32[$1 + 20 >> 2] = 0;\n                  break label$59;\n                 }\n                 $3 = dlmalloc($2 + 1 | 0);\n                 HEAP32[$1 + 20 >> 2] = $3;\n                 if ($3) {\n                  break label$58\n                 }\n                }\n                HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n                $6 = 0;\n                break label$22;\n               }\n               if ($2) {\n                if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3, $2)) {\n                 break label$57\n                }\n                $3 = HEAP32[$1 + 20 >> 2];\n                $2 = HEAP32[$1 + 188 >> 2];\n               } else {\n                $2 = 0\n               }\n               HEAP8[$2 + $3 | 0] = 0;\n               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 188 | 0, HEAP32[1385])) {\n                break label$57\n               }\n               label$63 : {\n                $2 = HEAP32[$1 + 188 >> 2];\n                label$64 : {\n                 if (($2 | 0) == -1) {\n                  HEAP32[$1 + 24 >> 2] = 0;\n                  break label$64;\n                 }\n                 $3 = dlmalloc($2 + 1 | 0);\n                 HEAP32[$1 + 24 >> 2] = $3;\n                 if ($3) {\n                  break label$63\n                 }\n                }\n                HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n                $6 = 0;\n                break label$22;\n               }\n               if ($2) {\n                if (!FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3, $2)) {\n                 break label$57\n                }\n                $3 = HEAP32[$1 + 24 >> 2];\n                $2 = HEAP32[$1 + 188 >> 2];\n               } else {\n                $2 = 0\n               }\n               HEAP8[$2 + $3 | 0] = 0;\n               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 28 | 0, HEAP32[1386])) {\n                break label$57\n               }\n               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 32 | 0, HEAP32[1387])) {\n                break label$57\n               }\n               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 36 | 0, HEAP32[1388])) {\n                break label$57\n               }\n               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 40 | 0, HEAP32[1389])) {\n                break label$57\n               }\n               if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $1 + 44 | 0, HEAP32[1390])) {\n                break label$57\n               }\n               $2 = HEAP32[$1 + 44 >> 2];\n               $3 = dlmalloc($2 ? $2 : 1);\n               HEAP32[$1 + 48 >> 2] = $3;\n               if (!$3) {\n                HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n                $6 = 0;\n                break label$22;\n               }\n               if (!$2) {\n                break label$26\n               }\n               if (FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $3, $2)) {\n                break label$26\n               }\n              }\n              $6 = 0;\n              break label$22;\n             case 0:\n             case 3:\n              break label$26;\n             default:\n              break label$28;\n             };\n            }\n            label$69 : {\n             if ($5) {\n              $2 = dlmalloc($5);\n              HEAP32[$1 + 16 >> 2] = $2;\n              if ($2) {\n               break label$69\n              }\n              HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n              $6 = 0;\n              break label$22;\n             }\n             HEAP32[$1 + 16 >> 2] = 0;\n             break label$26;\n            }\n            if (FLAC__bitreader_read_byte_block_aligned_no_crc(HEAP32[$3 + 56 >> 2], $2, $5)) {\n             break label$26\n            }\n            $6 = 0;\n            break label$22;\n           }\n           HEAP32[$1 + 20 >> 2] = 0;\n          }\n          $6 = 1;\n          $2 = HEAP32[$4 >> 2];\n          if (HEAP32[$2 + 3632 >> 2]) {\n           break label$22\n          }\n          $3 = HEAP32[$2 + 28 >> 2];\n          if (!$3) {\n           break label$22\n          }\n          FUNCTION_TABLE[$3]($0, $1, HEAP32[$2 + 48 >> 2]);\n          break label$22;\n         }\n         HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n         break label$22;\n        }\n        HEAP32[$1 + 24 >> 2] = 0;\n        HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n        break label$22;\n       }\n       HEAP32[$1 + 24 >> 2] = $2;\n       $6 = 0;\n      }\n      label$71 : {\n       label$72 : {\n        switch (HEAP32[$1 + 180 >> 2] + -1 | 0) {\n        case 1:\n         $1 = HEAP32[$1 + 20 >> 2];\n         if (!$1) {\n          break label$71\n         }\n         dlfree($1);\n         break label$71;\n        case 3:\n         $2 = HEAP32[$1 + 20 >> 2];\n         if ($2) {\n          dlfree($2)\n         }\n         $3 = HEAP32[$1 + 24 >> 2];\n         if ($3) {\n          $2 = 0;\n          while (1) {\n           $5 = HEAP32[(HEAP32[$1 + 28 >> 2] + ($2 << 3) | 0) + 4 >> 2];\n           if ($5) {\n            dlfree($5);\n            $3 = HEAP32[$1 + 24 >> 2];\n           }\n           $2 = $2 + 1 | 0;\n           if ($2 >>> 0 < $3 >>> 0) {\n            continue\n           }\n           break;\n          };\n         }\n         $1 = HEAP32[$1 + 28 >> 2];\n         if (!$1) {\n          break label$71\n         }\n         dlfree($1);\n         break label$71;\n        case 4:\n         $3 = HEAP32[$1 + 164 >> 2];\n         if ($3) {\n          $2 = 0;\n          while (1) {\n           $5 = HEAP32[(HEAP32[$1 + 168 >> 2] + ($2 << 5) | 0) + 24 >> 2];\n           if ($5) {\n            dlfree($5);\n            $3 = HEAP32[$1 + 164 >> 2];\n           }\n           $2 = $2 + 1 | 0;\n           if ($2 >>> 0 < $3 >>> 0) {\n            continue\n           }\n           break;\n          };\n         }\n         $1 = HEAP32[$1 + 168 >> 2];\n         if (!$1) {\n          break label$71\n         }\n         dlfree($1);\n         break label$71;\n        case 5:\n         $2 = HEAP32[$1 + 20 >> 2];\n         if ($2) {\n          dlfree($2)\n         }\n         $2 = HEAP32[$1 + 24 >> 2];\n         if ($2) {\n          dlfree($2)\n         }\n         $1 = HEAP32[$1 + 48 >> 2];\n         if (!$1) {\n          break label$71\n         }\n         dlfree($1);\n         break label$71;\n        case 0:\n         break label$71;\n        default:\n         break label$72;\n        };\n       }\n       $1 = HEAP32[$1 + 16 >> 2];\n       if (!$1) {\n        break label$71\n       }\n       dlfree($1);\n      }\n      if (!$6) {\n       break label$2\n      }\n     }\n     $2 = 1;\n     if (!$15) {\n      break label$1\n     }\n     label$86 : {\n      label$87 : {\n       $3 = HEAP32[$4 >> 2];\n       if (HEAP32[$3 >> 2]) {\n        break label$87\n       }\n       $5 = HEAP32[$3 + 12 >> 2];\n       if (!$5) {\n        break label$87\n       }\n       $1 = $3 + 6136 | 0;\n       if (FUNCTION_TABLE[$5]($0, $1, HEAP32[$3 + 48 >> 2])) {\n        break label$87\n       }\n       if (!FLAC__bitreader_is_consumed_byte_aligned(HEAP32[HEAP32[$4 >> 2] + 56 >> 2])) {\n        break label$87\n       }\n       $3 = HEAP32[$1 >> 2];\n       $4 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2];\n       $4 = ((HEAP32[$4 + 8 >> 2] - HEAP32[$4 + 16 >> 2] << 5) + (HEAP32[$4 + 12 >> 2] << 3) | 0) - HEAP32[$4 + 20 >> 2] >>> 3 | 0;\n       $5 = HEAP32[$1 + 4 >> 2] - ($3 >>> 0 < $4 >>> 0) | 0;\n       HEAP32[$1 >> 2] = $3 - $4;\n       HEAP32[$1 + 4 >> 2] = $5;\n       break label$86;\n      }\n      $1 = HEAP32[$4 >> 2];\n      HEAP32[$1 + 6136 >> 2] = 0;\n      HEAP32[$1 + 6140 >> 2] = 0;\n     }\n     HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n     break label$1;\n    }\n    HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n   }\n   $2 = 0;\n  }\n  global$0 = $7 + 192 | 0;\n  return $2;\n }\n \n function frame_sync_($0) {\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0;\n  $4 = global$0 - 16 | 0;\n  global$0 = $4;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     $2 = HEAP32[$0 + 4 >> 2];\n     if (!HEAP32[$2 + 248 >> 2]) {\n      break label$3\n     }\n     $3 = HEAP32[$2 + 308 >> 2];\n     $1 = $3;\n     $5 = HEAP32[$2 + 304 >> 2];\n     if (!($1 | $5)) {\n      break label$3\n     }\n     $3 = HEAP32[$2 + 244 >> 2];\n     if (($1 | 0) == ($3 | 0) & HEAPU32[$2 + 240 >> 2] < $5 >>> 0 | $3 >>> 0 < $1 >>> 0) {\n      break label$3\n     }\n     HEAP32[HEAP32[$0 >> 2] >> 2] = 4;\n     break label$2;\n    }\n    label$4 : {\n     if (FLAC__bitreader_is_consumed_byte_aligned(HEAP32[$2 + 56 >> 2])) {\n      break label$4\n     }\n     $2 = HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2];\n     if (FLAC__bitreader_read_raw_uint32($2, $4 + 12 | 0, FLAC__bitreader_bits_left_for_byte_alignment($2))) {\n      break label$4\n     }\n     $1 = 0;\n     break label$1;\n    }\n    $2 = 0;\n    while (1) {\n     $3 = HEAP32[$0 + 4 >> 2];\n     label$6 : {\n      if (HEAP32[$3 + 3520 >> 2]) {\n       $1 = HEAPU8[$3 + 3590 | 0];\n       HEAP32[$4 + 12 >> 2] = $1;\n       HEAP32[$3 + 3520 >> 2] = 0;\n       break label$6;\n      }\n      $1 = 0;\n      if (!FLAC__bitreader_read_raw_uint32(HEAP32[$3 + 56 >> 2], $4 + 12 | 0, 8)) {\n       break label$1\n      }\n      $1 = HEAP32[$4 + 12 >> 2];\n     }\n     label$8 : {\n      if (($1 | 0) != 255) {\n       break label$8\n      }\n      HEAP8[HEAP32[$0 + 4 >> 2] + 3588 | 0] = 255;\n      $1 = 0;\n      if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $4 + 12 | 0, 8)) {\n       break label$1\n      }\n      $1 = HEAP32[$4 + 12 >> 2];\n      if (($1 | 0) == 255) {\n       $1 = HEAP32[$0 + 4 >> 2];\n       HEAP32[$1 + 3520 >> 2] = 1;\n       HEAP8[$1 + 3590 | 0] = 255;\n       break label$8;\n      }\n      if (($1 & -2) != 248) {\n       break label$8\n      }\n      HEAP8[HEAP32[$0 + 4 >> 2] + 3589 | 0] = $1;\n      HEAP32[HEAP32[$0 >> 2] >> 2] = 3;\n      break label$2;\n     }\n     $1 = $2;\n     $2 = 1;\n     if ($1) {\n      continue\n     }\n     $1 = HEAP32[$0 + 4 >> 2];\n     if (HEAP32[$1 + 3632 >> 2]) {\n      continue\n     }\n     FUNCTION_TABLE[HEAP32[$1 + 32 >> 2]]($0, 0, HEAP32[$1 + 48 >> 2]);\n     continue;\n    };\n   }\n   $1 = 1;\n  }\n  global$0 = $4 + 16 | 0;\n  return $1;\n }\n \n function read_frame_($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;\n  $7 = global$0 + -64 | 0;\n  global$0 = $7;\n  HEAP32[$1 >> 2] = 0;\n  $2 = HEAP32[$0 + 4 >> 2];\n  $4 = HEAPU16[(HEAPU8[$2 + 3588 | 0] << 1) + 1280 >> 1];\n  $5 = HEAP32[$2 + 56 >> 2];\n  HEAP32[$5 + 24 >> 2] = HEAPU16[((HEAPU8[$2 + 3589 | 0] ^ $4 >>> 8) << 1) + 1280 >> 1] ^ $4 << 8 & 65280;\n  $2 = HEAP32[$5 + 20 >> 2];\n  HEAP32[$5 + 28 >> 2] = HEAP32[$5 + 16 >> 2];\n  HEAP32[$5 + 32 >> 2] = $2;\n  $5 = HEAP32[$0 + 4 >> 2];\n  HEAP8[$7 + 32 | 0] = HEAPU8[$5 + 3588 | 0];\n  $2 = HEAPU8[$5 + 3589 | 0];\n  HEAP32[$7 + 12 >> 2] = 2;\n  HEAP8[$7 + 33 | 0] = $2;\n  label$1 : {\n   if (!FLAC__bitreader_read_raw_uint32(HEAP32[$5 + 56 >> 2], $7 + 28 | 0, 8)) {\n    break label$1\n   }\n   $4 = $0 + 4 | 0;\n   label$2 : {\n    label$3 : {\n     label$4 : {\n      label$5 : {\n       $5 = HEAP32[$7 + 28 >> 2];\n       if (($5 | 0) == 255) {\n        break label$5\n       }\n       HEAP8[$7 + 34 | 0] = $5;\n       HEAP32[$7 + 12 >> 2] = 3;\n       if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 28 | 0, 8)) {\n        break label$3\n       }\n       $5 = HEAP32[$7 + 28 >> 2];\n       if (($5 | 0) == 255) {\n        break label$5\n       }\n       $8 = $2 >>> 1 & 1;\n       $2 = HEAP32[$7 + 12 >> 2];\n       HEAP8[$2 + ($7 + 32 | 0) | 0] = $5;\n       $5 = 1;\n       HEAP32[$7 + 12 >> 2] = $2 + 1;\n       $2 = HEAPU8[$7 + 34 | 0];\n       $3 = $2 >>> 4 | 0;\n       HEAP32[$7 + 28 >> 2] = $3;\n       label$6 : {\n        label$7 : {\n         label$8 : {\n          label$9 : {\n           switch ($3 - 1 | 0) {\n           case 7:\n           case 8:\n           case 9:\n           case 10:\n           case 11:\n           case 12:\n           case 13:\n           case 14:\n            HEAP32[HEAP32[$4 >> 2] + 1136 >> 2] = 256 << $3 + -8;\n            break label$8;\n           case 1:\n           case 2:\n           case 3:\n           case 4:\n            HEAP32[HEAP32[$4 >> 2] + 1136 >> 2] = 576 << $3 + -2;\n            break label$8;\n           case 5:\n           case 6:\n            break label$7;\n           case 0:\n            break label$9;\n           default:\n            break label$6;\n           };\n          }\n          HEAP32[HEAP32[$4 >> 2] + 1136 >> 2] = 192;\n         }\n         $3 = 0;\n        }\n        $5 = $8;\n       }\n       $6 = $2 & 15;\n       HEAP32[$7 + 28 >> 2] = $6;\n       label$12 : {\n        label$13 : {\n         label$14 : {\n          switch ($6 - 1 | 0) {\n          default:\n           $6 = 0;\n           $8 = HEAP32[$4 >> 2];\n           if (HEAP32[$8 + 248 >> 2]) {\n            break label$13\n           }\n           $5 = 1;\n           break label$12;\n          case 0:\n           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 88200;\n           $6 = 0;\n           break label$12;\n          case 1:\n           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 176400;\n           $6 = 0;\n           break label$12;\n          case 2:\n           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 192e3;\n           $6 = 0;\n           break label$12;\n          case 3:\n           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 8e3;\n           $6 = 0;\n           break label$12;\n          case 4:\n           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 16e3;\n           $6 = 0;\n           break label$12;\n          case 5:\n           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 22050;\n           $6 = 0;\n           break label$12;\n          case 6:\n           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 24e3;\n           $6 = 0;\n           break label$12;\n          case 7:\n           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 32e3;\n           $6 = 0;\n           break label$12;\n          case 8:\n           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 44100;\n           $6 = 0;\n           break label$12;\n          case 9:\n           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 48e3;\n           $6 = 0;\n           break label$12;\n          case 10:\n           HEAP32[HEAP32[$4 >> 2] + 1140 >> 2] = 96e3;\n           $6 = 0;\n           break label$12;\n          case 11:\n          case 12:\n          case 13:\n           break label$12;\n          case 14:\n           break label$14;\n          };\n         }\n         $5 = HEAP32[$4 >> 2];\n         if (!HEAP32[$5 + 3632 >> 2]) {\n          FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 1, HEAP32[$5 + 48 >> 2])\n         }\n         $2 = HEAP32[$0 >> 2];\n         HEAP32[$2 >> 2] = 2;\n         break label$4;\n        }\n        HEAP32[$8 + 1140 >> 2] = HEAP32[$8 + 288 >> 2];\n       }\n       $10 = HEAPU8[$7 + 35 | 0];\n       $9 = $10 >>> 4 | 0;\n       HEAP32[$7 + 28 >> 2] = $9;\n       label$28 : {\n        label$29 : {\n         if ($9 & 8) {\n          $2 = HEAP32[$4 >> 2];\n          HEAP32[$2 + 1144 >> 2] = 2;\n          $8 = 1;\n          label$31 : {\n           switch ($9 & 7) {\n           case 1:\n            $8 = 2;\n            break label$29;\n           case 0:\n            break label$29;\n           case 2:\n            break label$31;\n           default:\n            break label$28;\n           };\n          }\n          $8 = 3;\n          break label$29;\n         }\n         $2 = HEAP32[$4 >> 2];\n         HEAP32[$2 + 1144 >> 2] = $9 + 1;\n         $8 = 0;\n        }\n        HEAP32[$2 + 1148 >> 2] = $8;\n        $8 = $5;\n       }\n       $9 = $10 >>> 1 & 7;\n       HEAP32[$7 + 28 >> 2] = $9;\n       $5 = 1;\n       label$33 : {\n        label$34 : {\n         label$35 : {\n          switch ($9 - 1 | 0) {\n          default:\n           if (!HEAP32[$2 + 248 >> 2]) {\n            break label$33\n           }\n           HEAP32[$2 + 1152 >> 2] = HEAP32[$2 + 296 >> 2];\n           break label$34;\n          case 0:\n           HEAP32[$2 + 1152 >> 2] = 8;\n           break label$34;\n          case 1:\n           HEAP32[$2 + 1152 >> 2] = 12;\n           break label$34;\n          case 3:\n           HEAP32[$2 + 1152 >> 2] = 16;\n           break label$34;\n          case 4:\n           HEAP32[$2 + 1152 >> 2] = 20;\n           break label$34;\n          case 2:\n          case 6:\n           break label$33;\n          case 5:\n           break label$35;\n          };\n         }\n         HEAP32[$2 + 1152 >> 2] = 24;\n        }\n        $5 = $8;\n       }\n       label$41 : {\n        if (!(!HEAP32[$2 + 248 >> 2] | HEAP32[$2 + 272 >> 2] == HEAP32[$2 + 276 >> 2] ? !(HEAP8[$7 + 33 | 0] & 1) : 0)) {\n         if (!FLAC__bitreader_read_utf8_uint64(HEAP32[$2 + 56 >> 2], $7 + 16 | 0, $7 + 32 | 0, $7 + 12 | 0)) {\n          break label$3\n         }\n         $8 = HEAP32[$7 + 20 >> 2];\n         $2 = $8;\n         $9 = HEAP32[$7 + 16 >> 2];\n         if (($9 | 0) == -1 & ($2 | 0) == -1) {\n          $8 = HEAPU8[(HEAP32[$7 + 12 >> 2] + $7 | 0) + 31 | 0];\n          $5 = HEAP32[$4 >> 2];\n          HEAP32[$5 + 3520 >> 2] = 1;\n          HEAP8[$5 + 3590 | 0] = $8;\n          if (!HEAP32[$5 + 3632 >> 2]) {\n           FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 1, HEAP32[$5 + 48 >> 2])\n          }\n          $2 = HEAP32[$0 >> 2];\n          HEAP32[$2 >> 2] = 2;\n          break label$4;\n         }\n         $8 = HEAP32[$4 >> 2];\n         $11 = $8 + 1160 | 0;\n         HEAP32[$11 >> 2] = $9;\n         HEAP32[$11 + 4 >> 2] = $2;\n         HEAP32[$8 + 1156 >> 2] = 1;\n         break label$41;\n        }\n        if (!FLAC__bitreader_read_utf8_uint32(HEAP32[$2 + 56 >> 2], $7 + 28 | 0, $7 + 32 | 0, $7 + 12 | 0)) {\n         break label$3\n        }\n        $8 = HEAP32[$7 + 28 >> 2];\n        if (($8 | 0) == -1) {\n         $8 = HEAPU8[(HEAP32[$7 + 12 >> 2] + $7 | 0) + 31 | 0];\n         $5 = HEAP32[$4 >> 2];\n         HEAP32[$5 + 3520 >> 2] = 1;\n         HEAP8[$5 + 3590 | 0] = $8;\n         if (!HEAP32[$5 + 3632 >> 2]) {\n          FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 1, HEAP32[$5 + 48 >> 2])\n         }\n         $2 = HEAP32[$0 >> 2];\n         HEAP32[$2 >> 2] = 2;\n         break label$4;\n        }\n        $2 = HEAP32[$4 >> 2];\n        HEAP32[$2 + 1160 >> 2] = $8;\n        HEAP32[$2 + 1156 >> 2] = 0;\n       }\n       $2 = HEAP32[$4 >> 2];\n       if ($3) {\n        if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 28 | 0, 8)) {\n         break label$3\n        }\n        $2 = HEAP32[$7 + 12 >> 2];\n        $8 = HEAP32[$7 + 28 >> 2];\n        HEAP8[$2 + ($7 + 32 | 0) | 0] = $8;\n        HEAP32[$7 + 12 >> 2] = $2 + 1;\n        if (($3 | 0) == 7) {\n         if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 8 | 0, 8)) {\n          break label$3\n         }\n         $8 = HEAP32[$7 + 12 >> 2];\n         $2 = HEAP32[$7 + 8 >> 2];\n         HEAP8[$8 + ($7 + 32 | 0) | 0] = $2;\n         HEAP32[$7 + 12 >> 2] = $8 + 1;\n         $8 = $2 | HEAP32[$7 + 28 >> 2] << 8;\n         HEAP32[$7 + 28 >> 2] = $8;\n        }\n        $2 = HEAP32[$4 >> 2];\n        HEAP32[$2 + 1136 >> 2] = $8 + 1;\n       }\n       if ($6) {\n        if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 28 | 0, 8)) {\n         break label$3\n        }\n        $8 = HEAP32[$7 + 12 >> 2];\n        $2 = HEAP32[$7 + 28 >> 2];\n        HEAP8[$8 + ($7 + 32 | 0) | 0] = $2;\n        HEAP32[$7 + 12 >> 2] = $8 + 1;\n        label$51 : {\n         if (($6 | 0) != 12) {\n          if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 8 | 0, 8)) {\n           break label$3\n          }\n          $8 = HEAP32[$7 + 12 >> 2];\n          $2 = HEAP32[$7 + 8 >> 2];\n          HEAP8[$8 + ($7 + 32 | 0) | 0] = $2;\n          HEAP32[$7 + 12 >> 2] = $8 + 1;\n          $3 = $2 | HEAP32[$7 + 28 >> 2] << 8;\n          HEAP32[$7 + 28 >> 2] = $3;\n          if (($6 | 0) == 13) {\n           break label$51\n          }\n          $3 = Math_imul($3, 10);\n          break label$51;\n         }\n         $3 = Math_imul($2, 1e3);\n        }\n        $2 = HEAP32[$4 >> 2];\n        HEAP32[$2 + 1140 >> 2] = $3;\n       }\n       if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 28 | 0, 8)) {\n        break label$3\n       }\n       $8 = HEAPU8[$7 + 28 | 0];\n       $3 = FLAC__crc8($7 + 32 | 0, HEAP32[$7 + 12 >> 2]);\n       $2 = HEAP32[$4 >> 2];\n       if (($3 | 0) != ($8 | 0)) {\n        if (!HEAP32[$2 + 3632 >> 2]) {\n         FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 1, HEAP32[$2 + 48 >> 2])\n        }\n        $2 = HEAP32[$0 >> 2];\n        HEAP32[$2 >> 2] = 2;\n        break label$4;\n       }\n       HEAP32[$2 + 232 >> 2] = 0;\n       label$55 : {\n        label$56 : {\n         if (HEAP32[$2 + 1156 >> 2]) {\n          break label$56\n         }\n         $3 = $2 + 1160 | 0;\n         $8 = HEAP32[$3 >> 2];\n         HEAP32[$7 + 28 >> 2] = $8;\n         HEAP32[$2 + 1156 >> 2] = 1;\n         $6 = HEAP32[$2 + 228 >> 2];\n         if ($6) {\n          (wasm2js_i32$0 = $3, wasm2js_i32$1 = __wasm_i64_mul($6, 0, $8, 0)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n          HEAP32[$3 + 4 >> 2] = i64toi32_i32$HIGH_BITS;\n          break label$56;\n         }\n         if (HEAP32[$2 + 248 >> 2]) {\n          $3 = HEAP32[$2 + 272 >> 2];\n          if (($3 | 0) != HEAP32[$2 + 276 >> 2]) {\n           break label$55\n          }\n          $2 = $2 + 1160 | 0;\n          (wasm2js_i32$0 = $2, wasm2js_i32$1 = __wasm_i64_mul($3, 0, $8, 0)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n          HEAP32[$2 + 4 >> 2] = i64toi32_i32$HIGH_BITS;\n          $8 = HEAP32[$4 >> 2];\n          HEAP32[$8 + 232 >> 2] = HEAP32[$8 + 276 >> 2];\n          break label$56;\n         }\n         if (!$8) {\n          $8 = $2 + 1160 | 0;\n          HEAP32[$8 >> 2] = 0;\n          HEAP32[$8 + 4 >> 2] = 0;\n          $8 = HEAP32[$4 >> 2];\n          HEAP32[$8 + 232 >> 2] = HEAP32[$8 + 1136 >> 2];\n          break label$56;\n         }\n         $3 = $2 + 1160 | 0;\n         (wasm2js_i32$0 = $3, wasm2js_i32$1 = __wasm_i64_mul(HEAP32[$2 + 1136 >> 2], 0, $8, 0)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n         HEAP32[$3 + 4 >> 2] = i64toi32_i32$HIGH_BITS;\n        }\n        if (!($5 | $10 & 1)) {\n         $2 = HEAP32[$0 >> 2];\n         break label$4;\n        }\n        $2 = HEAP32[$4 >> 2];\n       }\n       label$61 : {\n        if (!HEAP32[$2 + 3632 >> 2]) {\n         FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 3, HEAP32[$2 + 48 >> 2]);\n         break label$61;\n        }\n        HEAP32[$2 + 6152 >> 2] = HEAP32[$2 + 6152 >> 2] + 1;\n       }\n       $2 = HEAP32[$0 >> 2];\n       HEAP32[$2 >> 2] = 2;\n       break label$4;\n      }\n      $5 = HEAP32[$4 >> 2];\n      HEAP32[$5 + 3520 >> 2] = 1;\n      HEAP8[$5 + 3590 | 0] = 255;\n      if (!HEAP32[$5 + 3632 >> 2]) {\n       FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 1, HEAP32[$5 + 48 >> 2])\n      }\n      $2 = HEAP32[$0 >> 2];\n      HEAP32[$2 >> 2] = 2;\n     }\n     $8 = 1;\n     if (HEAP32[$2 >> 2] == 2) {\n      break label$1\n     }\n     $2 = HEAP32[$4 >> 2];\n     $5 = HEAP32[$2 + 1144 >> 2];\n     $6 = HEAP32[$2 + 1136 >> 2];\n     if (!(HEAPU32[$2 + 224 >> 2] >= $5 >>> 0 ? HEAPU32[$2 + 220 >> 2] >= $6 >>> 0 : 0)) {\n      $3 = HEAP32[$2 + 60 >> 2];\n      if ($3) {\n       dlfree($3 + -16 | 0);\n       HEAP32[HEAP32[$4 >> 2] + 60 >> 2] = 0;\n       $2 = HEAP32[$4 >> 2];\n      }\n      $3 = HEAP32[$2 + 3592 >> 2];\n      if ($3) {\n       dlfree($3);\n       HEAP32[HEAP32[$4 >> 2] + 92 >> 2] = 0;\n       HEAP32[HEAP32[$4 >> 2] + 3592 >> 2] = 0;\n       $2 = HEAP32[$4 >> 2];\n      }\n      $3 = HEAP32[$2 - -64 >> 2];\n      if ($3) {\n       dlfree($3 + -16 | 0);\n       HEAP32[HEAP32[$4 >> 2] - -64 >> 2] = 0;\n       $2 = HEAP32[$4 >> 2];\n      }\n      $3 = HEAP32[$2 + 3596 >> 2];\n      if ($3) {\n       dlfree($3);\n       HEAP32[HEAP32[$4 >> 2] + 96 >> 2] = 0;\n       HEAP32[HEAP32[$4 >> 2] + 3596 >> 2] = 0;\n       $2 = HEAP32[$4 >> 2];\n      }\n      $3 = HEAP32[$2 + 68 >> 2];\n      if ($3) {\n       dlfree($3 + -16 | 0);\n       HEAP32[HEAP32[$4 >> 2] + 68 >> 2] = 0;\n       $2 = HEAP32[$4 >> 2];\n      }\n      $3 = HEAP32[$2 + 3600 >> 2];\n      if ($3) {\n       dlfree($3);\n       HEAP32[HEAP32[$4 >> 2] + 100 >> 2] = 0;\n       HEAP32[HEAP32[$4 >> 2] + 3600 >> 2] = 0;\n       $2 = HEAP32[$4 >> 2];\n      }\n      $3 = HEAP32[$2 + 72 >> 2];\n      if ($3) {\n       dlfree($3 + -16 | 0);\n       HEAP32[HEAP32[$4 >> 2] + 72 >> 2] = 0;\n       $2 = HEAP32[$4 >> 2];\n      }\n      $3 = HEAP32[$2 + 3604 >> 2];\n      if ($3) {\n       dlfree($3);\n       HEAP32[HEAP32[$4 >> 2] + 104 >> 2] = 0;\n       HEAP32[HEAP32[$4 >> 2] + 3604 >> 2] = 0;\n       $2 = HEAP32[$4 >> 2];\n      }\n      $3 = HEAP32[$2 + 76 >> 2];\n      if ($3) {\n       dlfree($3 + -16 | 0);\n       HEAP32[HEAP32[$4 >> 2] + 76 >> 2] = 0;\n       $2 = HEAP32[$4 >> 2];\n      }\n      $3 = HEAP32[$2 + 3608 >> 2];\n      if ($3) {\n       dlfree($3);\n       HEAP32[HEAP32[$4 >> 2] + 108 >> 2] = 0;\n       HEAP32[HEAP32[$4 >> 2] + 3608 >> 2] = 0;\n       $2 = HEAP32[$4 >> 2];\n      }\n      $3 = HEAP32[$2 + 80 >> 2];\n      if ($3) {\n       dlfree($3 + -16 | 0);\n       HEAP32[HEAP32[$4 >> 2] + 80 >> 2] = 0;\n       $2 = HEAP32[$4 >> 2];\n      }\n      $3 = HEAP32[$2 + 3612 >> 2];\n      if ($3) {\n       dlfree($3);\n       HEAP32[HEAP32[$4 >> 2] + 112 >> 2] = 0;\n       HEAP32[HEAP32[$4 >> 2] + 3612 >> 2] = 0;\n       $2 = HEAP32[$4 >> 2];\n      }\n      $3 = HEAP32[$2 + 84 >> 2];\n      if ($3) {\n       dlfree($3 + -16 | 0);\n       HEAP32[HEAP32[$4 >> 2] + 84 >> 2] = 0;\n       $2 = HEAP32[$4 >> 2];\n      }\n      $3 = HEAP32[$2 + 3616 >> 2];\n      if ($3) {\n       dlfree($3);\n       HEAP32[HEAP32[$4 >> 2] + 116 >> 2] = 0;\n       HEAP32[HEAP32[$4 >> 2] + 3616 >> 2] = 0;\n       $2 = HEAP32[$4 >> 2];\n      }\n      $3 = HEAP32[$2 + 88 >> 2];\n      if ($3) {\n       dlfree($3 + -16 | 0);\n       HEAP32[HEAP32[$4 >> 2] + 88 >> 2] = 0;\n       $2 = HEAP32[$4 >> 2];\n      }\n      $2 = HEAP32[$2 + 3620 >> 2];\n      if ($2) {\n       dlfree($2);\n       HEAP32[HEAP32[$4 >> 2] + 120 >> 2] = 0;\n       HEAP32[HEAP32[$4 >> 2] + 3620 >> 2] = 0;\n      }\n      label$97 : {\n       if (!$5) {\n        break label$97\n       }\n       if ($6 >>> 0 > 4294967291) {\n        break label$2\n       }\n       $2 = $6 + 4 | 0;\n       if (($2 & 1073741823) != ($2 | 0)) {\n        break label$2\n       }\n       $9 = $2 << 2;\n       $3 = 0;\n       while (1) {\n        $2 = dlmalloc($9);\n        if (!$2) {\n         break label$2\n        }\n        HEAP32[$2 >> 2] = 0;\n        HEAP32[$2 + 4 >> 2] = 0;\n        HEAP32[$2 + 8 >> 2] = 0;\n        HEAP32[$2 + 12 >> 2] = 0;\n        $10 = $3 << 2;\n        HEAP32[($10 + HEAP32[$4 >> 2] | 0) + 60 >> 2] = $2 + 16;\n        $2 = $10 + HEAP32[$4 >> 2] | 0;\n        if (FLAC__memory_alloc_aligned_int32_array($6, $2 + 3592 | 0, $2 + 92 | 0)) {\n         $3 = $3 + 1 | 0;\n         if (($5 | 0) == ($3 | 0)) {\n          break label$97\n         }\n         continue;\n        }\n        break;\n       };\n       HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n       break label$3;\n      }\n      $2 = HEAP32[$4 >> 2];\n      HEAP32[$2 + 224 >> 2] = $5;\n      HEAP32[$2 + 220 >> 2] = $6;\n      $5 = HEAP32[$2 + 1144 >> 2];\n     }\n     label$100 : {\n      if ($5) {\n       $17 = HEAP32[1412];\n       $20 = -1 << $17 ^ -1;\n       $18 = HEAP32[1406];\n       $19 = HEAP32[1405];\n       $21 = HEAP32[1413];\n       $5 = 0;\n       while (1) {\n        $3 = HEAP32[$2 + 1152 >> 2];\n        label$103 : {\n         label$104 : {\n          switch (HEAP32[$2 + 1148 >> 2] + -1 | 0) {\n          case 0:\n           $3 = (($5 | 0) == 1) + $3 | 0;\n           break label$103;\n          case 1:\n           $3 = !$5 + $3 | 0;\n           break label$103;\n          case 2:\n           break label$104;\n          default:\n           break label$103;\n          };\n         }\n         $3 = (($5 | 0) == 1) + $3 | 0;\n        }\n        if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 28 | 0, 8)) {\n         break label$3\n        }\n        $2 = HEAP32[$7 + 28 >> 2];\n        HEAP32[$7 + 28 >> 2] = $2 & 254;\n        $13 = $2 & 1;\n        label$107 : {\n         if ($13) {\n          if (!FLAC__bitreader_read_unary_unsigned(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 32 | 0)) {\n           break label$3\n          }\n          $2 = HEAP32[$4 >> 2];\n          $6 = HEAP32[$7 + 32 >> 2] + 1 | 0;\n          HEAP32[($2 + Math_imul($5, 292) | 0) + 1464 >> 2] = $6;\n          if ($3 >>> 0 <= $6 >>> 0) {\n           break label$3\n          }\n          $3 = $3 - $6 | 0;\n          break label$107;\n         }\n         $2 = HEAP32[$4 >> 2];\n         HEAP32[($2 + Math_imul($5, 292) | 0) + 1464 >> 2] = 0;\n        }\n        $6 = HEAP32[$7 + 28 >> 2];\n        label$109 : {\n         if ($6 & 128) {\n          if (!HEAP32[$2 + 3632 >> 2]) {\n           FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 0, HEAP32[$2 + 48 >> 2])\n          }\n          HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n          break label$109;\n         }\n         label$112 : {\n          label$113 : {\n           label$114 : {\n            switch ($6 | 0) {\n            case 0:\n             $6 = HEAP32[(($5 << 2) + $2 | 0) + 60 >> 2];\n             $9 = Math_imul($5, 292) + $2 | 0;\n             HEAP32[$9 + 1176 >> 2] = 0;\n             if (!FLAC__bitreader_read_raw_int32(HEAP32[$2 + 56 >> 2], $7 + 32 | 0, $3)) {\n              break label$3\n             }\n             HEAP32[$9 + 1180 >> 2] = HEAP32[$7 + 32 >> 2];\n             $2 = 0;\n             $3 = HEAP32[$4 >> 2];\n             if (!HEAP32[$3 + 1136 >> 2]) {\n              break label$113\n             }\n             while (1) {\n              HEAP32[$6 + ($2 << 2) >> 2] = HEAP32[$7 + 32 >> 2];\n              $2 = $2 + 1 | 0;\n              if ($2 >>> 0 < HEAPU32[$3 + 1136 >> 2]) {\n               continue\n              }\n              break;\n             };\n             break label$113;\n            case 2:\n             $6 = ($2 + 1136 | 0) + Math_imul($5, 292) | 0;\n             $9 = $6 + 44 | 0;\n             $10 = $5 << 2;\n             $11 = HEAP32[($10 + $2 | 0) + 92 >> 2];\n             HEAP32[$9 >> 2] = $11;\n             HEAP32[$6 + 40 >> 2] = 1;\n             $6 = 0;\n             if (HEAP32[$2 + 1136 >> 2]) {\n              while (1) {\n               if (!FLAC__bitreader_read_raw_int32(HEAP32[$2 + 56 >> 2], $7 + 32 | 0, $3)) {\n                break label$3\n               }\n               HEAP32[$11 + ($6 << 2) >> 2] = HEAP32[$7 + 32 >> 2];\n               $6 = $6 + 1 | 0;\n               $2 = HEAP32[$4 >> 2];\n               $12 = HEAP32[$2 + 1136 >> 2];\n               if ($6 >>> 0 < $12 >>> 0) {\n                continue\n               }\n               break;\n              };\n              $6 = $12 << 2;\n             }\n             memcpy(HEAP32[($2 + $10 | 0) + 60 >> 2], HEAP32[$9 >> 2], $6);\n             break label$113;\n            default:\n             break label$114;\n            };\n           }\n           if ($6 >>> 0 <= 15) {\n            label$121 : {\n             if (!HEAP32[$2 + 3632 >> 2]) {\n              FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 3, HEAP32[$2 + 48 >> 2]);\n              break label$121;\n             }\n             HEAP32[$2 + 6152 >> 2] = HEAP32[$2 + 6152 >> 2] + 1;\n            }\n            HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n            break label$109;\n           }\n           if ($6 >>> 0 <= 24) {\n            $9 = Math_imul($5, 292) + $2 | 0;\n            HEAP32[$9 + 1176 >> 2] = 2;\n            $11 = $5 << 2;\n            $12 = HEAP32[($11 + $2 | 0) + 92 >> 2];\n            $10 = $6 >>> 1 & 7;\n            HEAP32[$9 + 1192 >> 2] = $10;\n            HEAP32[$9 + 1212 >> 2] = $12;\n            $6 = HEAP32[$2 + 56 >> 2];\n            if ($10) {\n             $12 = $9 + 1196 | 0;\n             $2 = 0;\n             while (1) {\n              if (!FLAC__bitreader_read_raw_int32($6, $7 + 32 | 0, $3)) {\n               break label$3\n              }\n              HEAP32[$12 + ($2 << 2) >> 2] = HEAP32[$7 + 32 >> 2];\n              $6 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2];\n              $2 = $2 + 1 | 0;\n              if (($10 | 0) != ($2 | 0)) {\n               continue\n              }\n              break;\n             };\n            }\n            if (!FLAC__bitreader_read_raw_uint32($6, $7 + 16 | 0, $19)) {\n             break label$3\n            }\n            $6 = $9 + 1180 | 0;\n            $3 = HEAP32[$7 + 16 >> 2];\n            HEAP32[$6 >> 2] = $3;\n            $2 = HEAP32[$4 >> 2];\n            label$126 : {\n             label$127 : {\n              if ($3 >>> 0 <= 1) {\n               if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 16 | 0, $18)) {\n                break label$3\n               }\n               $2 = HEAP32[$4 >> 2];\n               $3 = HEAP32[$7 + 16 >> 2];\n               if (HEAP32[$2 + 1136 >> 2] >>> $3 >>> 0 >= $10 >>> 0) {\n                break label$127\n               }\n               if (!HEAP32[$2 + 3632 >> 2]) {\n                FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 0, HEAP32[$2 + 48 >> 2])\n               }\n               HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n               break label$126;\n              }\n              label$130 : {\n               if (!HEAP32[$2 + 3632 >> 2]) {\n                FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 3, HEAP32[$2 + 48 >> 2]);\n                break label$130;\n               }\n               HEAP32[$2 + 6152 >> 2] = HEAP32[$2 + 6152 >> 2] + 1;\n              }\n              HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n              break label$126;\n             }\n             HEAP32[$9 + 1184 >> 2] = $3;\n             $2 = Math_imul($5, 12);\n             HEAP32[$9 + 1188 >> 2] = ($2 + HEAP32[$4 >> 2] | 0) + 124;\n             $6 = HEAP32[$6 >> 2];\n             if ($6 >>> 0 < 2) {\n              $14 = $3;\n              $3 = HEAP32[$0 + 4 >> 2];\n              if (!read_residual_partitioned_rice_($0, $10, $14, ($2 + $3 | 0) + 124 | 0, HEAP32[($3 + $11 | 0) + 92 >> 2], ($6 | 0) == 1)) {\n               break label$3\n              }\n             }\n             $2 = $10 << 2;\n             memcpy(HEAP32[($11 + HEAP32[$4 >> 2] | 0) + 60 >> 2], $9 + 1196 | 0, $2);\n             $3 = HEAP32[$4 >> 2];\n             $6 = $3 + $11 | 0;\n             FLAC__fixed_restore_signal(HEAP32[$6 + 92 >> 2], HEAP32[$3 + 1136 >> 2] - $10 | 0, $10, $2 + HEAP32[$6 + 60 >> 2] | 0);\n            }\n            if (HEAP32[HEAP32[$0 >> 2] >> 2] == 2) {\n             break label$109\n            }\n            if ($13) {\n             break label$112\n            }\n            break label$109;\n           }\n           if ($6 >>> 0 <= 63) {\n            label$134 : {\n             if (!HEAP32[$2 + 3632 >> 2]) {\n              FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 3, HEAP32[$2 + 48 >> 2]);\n              break label$134;\n             }\n             HEAP32[$2 + 6152 >> 2] = HEAP32[$2 + 6152 >> 2] + 1;\n            }\n            HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n            break label$109;\n           }\n           $9 = Math_imul($5, 292) + $2 | 0;\n           HEAP32[$9 + 1176 >> 2] = 3;\n           $11 = $5 << 2;\n           $15 = HEAP32[($11 + $2 | 0) + 92 >> 2];\n           $12 = $6 >>> 1 & 31;\n           $10 = $12 + 1 | 0;\n           HEAP32[$9 + 1192 >> 2] = $10;\n           HEAP32[$9 + 1460 >> 2] = $15;\n           $6 = HEAP32[$2 + 56 >> 2];\n           $2 = 0;\n           while (1) {\n            if (!FLAC__bitreader_read_raw_int32($6, $7 + 32 | 0, $3)) {\n             break label$3\n            }\n            HEAP32[($9 + ($2 << 2) | 0) + 1332 >> 2] = HEAP32[$7 + 32 >> 2];\n            $15 = ($2 | 0) != ($12 | 0);\n            $6 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2];\n            $2 = $2 + 1 | 0;\n            if ($15) {\n             continue\n            }\n            break;\n           };\n           if (!FLAC__bitreader_read_raw_uint32($6, $7 + 16 | 0, $17)) {\n            break label$3\n           }\n           $2 = HEAP32[$7 + 16 >> 2];\n           label$137 : {\n            if (($2 | 0) == ($20 | 0)) {\n             $2 = HEAP32[$4 >> 2];\n             if (!HEAP32[$2 + 3632 >> 2]) {\n              FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 0, HEAP32[$2 + 48 >> 2])\n             }\n             HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n             break label$137;\n            }\n            $16 = $9 + 1196 | 0;\n            HEAP32[$16 >> 2] = $2 + 1;\n            if (!FLAC__bitreader_read_raw_int32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 32 | 0, $21)) {\n             break label$3\n            }\n            $2 = HEAP32[$7 + 32 >> 2];\n            if (($2 | 0) <= -1) {\n             $2 = HEAP32[$4 >> 2];\n             if (!HEAP32[$2 + 3632 >> 2]) {\n              FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 0, HEAP32[$2 + 48 >> 2])\n             }\n             HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n             break label$137;\n            }\n            $15 = $9 + 1200 | 0;\n            HEAP32[$15 >> 2] = $2;\n            $6 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2];\n            $2 = 0;\n            while (1) {\n             if (!FLAC__bitreader_read_raw_int32($6, $7 + 32 | 0, HEAP32[$16 >> 2])) {\n              break label$3\n             }\n             HEAP32[($9 + ($2 << 2) | 0) + 1204 >> 2] = HEAP32[$7 + 32 >> 2];\n             $14 = ($2 | 0) != ($12 | 0);\n             $6 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2];\n             $2 = $2 + 1 | 0;\n             if ($14) {\n              continue\n             }\n             break;\n            };\n            if (!FLAC__bitreader_read_raw_uint32($6, $7 + 16 | 0, $19)) {\n             break label$3\n            }\n            $14 = $9 + 1180 | 0;\n            $6 = HEAP32[$7 + 16 >> 2];\n            HEAP32[$14 >> 2] = $6;\n            $2 = HEAP32[$4 >> 2];\n            label$143 : {\n             if ($6 >>> 0 <= 1) {\n              if (!FLAC__bitreader_read_raw_uint32(HEAP32[$2 + 56 >> 2], $7 + 16 | 0, $18)) {\n               break label$3\n              }\n              $2 = HEAP32[$4 >> 2];\n              $6 = HEAP32[$7 + 16 >> 2];\n              if (HEAP32[$2 + 1136 >> 2] >>> $6 >>> 0 > $12 >>> 0) {\n               break label$143\n              }\n              if (!HEAP32[$2 + 3632 >> 2]) {\n               FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 0, HEAP32[$2 + 48 >> 2])\n              }\n              HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n              break label$137;\n             }\n             label$146 : {\n              if (!HEAP32[$2 + 3632 >> 2]) {\n               FUNCTION_TABLE[HEAP32[$2 + 32 >> 2]]($0, 3, HEAP32[$2 + 48 >> 2]);\n               break label$146;\n              }\n              HEAP32[$2 + 6152 >> 2] = HEAP32[$2 + 6152 >> 2] + 1;\n             }\n             HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n             break label$137;\n            }\n            HEAP32[$9 + 1184 >> 2] = $6;\n            $2 = Math_imul($5, 12);\n            HEAP32[$9 + 1188 >> 2] = ($2 + HEAP32[$4 >> 2] | 0) + 124;\n            $12 = HEAP32[$14 >> 2];\n            if ($12 >>> 0 < 2) {\n             $14 = $6;\n             $6 = HEAP32[$0 + 4 >> 2];\n             if (!read_residual_partitioned_rice_($0, $10, $14, ($2 + $6 | 0) + 124 | 0, HEAP32[($6 + $11 | 0) + 92 >> 2], ($12 | 0) == 1)) {\n              break label$3\n             }\n            }\n            $6 = $10 << 2;\n            memcpy(HEAP32[(HEAP32[$4 >> 2] + $11 | 0) + 60 >> 2], $9 + 1332 | 0, $6);\n            label$149 : {\n             $12 = HEAP32[$16 >> 2];\n             if ($12 + ((Math_clz32($10) ^ 31) + $3 | 0) >>> 0 <= 32) {\n              $2 = HEAP32[$4 >> 2];\n              if ($3 >>> 0 > 16 | $12 >>> 0 > 16) {\n               break label$149\n              }\n              $3 = $2 + $11 | 0;\n              FUNCTION_TABLE[HEAP32[$2 + 44 >> 2]](HEAP32[$3 + 92 >> 2], HEAP32[$2 + 1136 >> 2] - $10 | 0, $9 + 1204 | 0, $10, HEAP32[$15 >> 2], $6 + HEAP32[$3 + 60 >> 2] | 0);\n              break label$137;\n             }\n             $2 = HEAP32[$4 >> 2];\n             $3 = $2 + $11 | 0;\n             FUNCTION_TABLE[HEAP32[$2 + 40 >> 2]](HEAP32[$3 + 92 >> 2], HEAP32[$2 + 1136 >> 2] - $10 | 0, $9 + 1204 | 0, $10, HEAP32[$15 >> 2], $6 + HEAP32[$3 + 60 >> 2] | 0);\n             break label$137;\n            }\n            $3 = $2 + $11 | 0;\n            FUNCTION_TABLE[HEAP32[$2 + 36 >> 2]](HEAP32[$3 + 92 >> 2], HEAP32[$2 + 1136 >> 2] - $10 | 0, $9 + 1204 | 0, $10, HEAP32[$15 >> 2], $6 + HEAP32[$3 + 60 >> 2] | 0);\n           }\n           if (!$13 | HEAP32[HEAP32[$0 >> 2] >> 2] == 2) {\n            break label$109\n           }\n           break label$112;\n          }\n          if (!$13) {\n           break label$109\n          }\n         }\n         $3 = HEAP32[$4 >> 2];\n         $2 = HEAP32[($3 + Math_imul($5, 292) | 0) + 1464 >> 2];\n         HEAP32[$7 + 28 >> 2] = $2;\n         if (!HEAP32[$3 + 1136 >> 2]) {\n          break label$109\n         }\n         $6 = HEAP32[($3 + ($5 << 2) | 0) + 60 >> 2];\n         HEAP32[$6 >> 2] = HEAP32[$6 >> 2] << $2;\n         $2 = 1;\n         if (HEAPU32[$3 + 1136 >> 2] < 2) {\n          break label$109\n         }\n         while (1) {\n          $9 = $6 + ($2 << 2) | 0;\n          HEAP32[$9 >> 2] = HEAP32[$9 >> 2] << HEAP32[$7 + 28 >> 2];\n          $2 = $2 + 1 | 0;\n          if ($2 >>> 0 < HEAPU32[$3 + 1136 >> 2]) {\n           continue\n          }\n          break;\n         };\n        }\n        if (HEAP32[HEAP32[$0 >> 2] >> 2] == 2) {\n         break label$100\n        }\n        $5 = $5 + 1 | 0;\n        $2 = HEAP32[$4 >> 2];\n        if ($5 >>> 0 < HEAPU32[$2 + 1144 >> 2]) {\n         continue\n        }\n        break;\n       };\n      }\n      label$152 : {\n       if (FLAC__bitreader_is_consumed_byte_aligned(HEAP32[$2 + 56 >> 2])) {\n        break label$152\n       }\n       HEAP32[$7 + 32 >> 2] = 0;\n       $5 = HEAP32[HEAP32[$4 >> 2] + 56 >> 2];\n       if (!FLAC__bitreader_read_raw_uint32($5, $7 + 32 | 0, FLAC__bitreader_bits_left_for_byte_alignment($5))) {\n        break label$3\n       }\n       if (!HEAP32[$7 + 32 >> 2]) {\n        break label$152\n       }\n       $5 = HEAP32[$4 >> 2];\n       if (!HEAP32[$5 + 3632 >> 2]) {\n        FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 0, HEAP32[$5 + 48 >> 2])\n       }\n       HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n      }\n      if (HEAP32[HEAP32[$0 >> 2] >> 2] == 2) {\n       break label$1\n      }\n      $5 = FLAC__bitreader_get_read_crc16(HEAP32[HEAP32[$4 >> 2] + 56 >> 2]);\n      $8 = 0;\n      if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$4 >> 2] + 56 >> 2], $7 + 16 | 0, HEAP32[1404])) {\n       break label$1\n      }\n      label$154 : {\n       if (($5 | 0) == HEAP32[$7 + 16 >> 2]) {\n        label$156 : {\n         label$157 : {\n          label$158 : {\n           $5 = HEAP32[$4 >> 2];\n           switch (HEAP32[$5 + 1148 >> 2] + -1 | 0) {\n           case 2:\n            break label$156;\n           case 0:\n            break label$157;\n           case 1:\n            break label$158;\n           default:\n            break label$154;\n           };\n          }\n          if (!HEAP32[$5 + 1136 >> 2]) {\n           break label$154\n          }\n          $2 = HEAP32[$5 - -64 >> 2];\n          $6 = HEAP32[$5 + 60 >> 2];\n          $3 = 0;\n          while (1) {\n           $9 = $3 << 2;\n           $10 = $9 + $6 | 0;\n           HEAP32[$10 >> 2] = HEAP32[$10 >> 2] + HEAP32[$2 + $9 >> 2];\n           $3 = $3 + 1 | 0;\n           if ($3 >>> 0 < HEAPU32[$5 + 1136 >> 2]) {\n            continue\n           }\n           break;\n          };\n          break label$154;\n         }\n         if (!HEAP32[$5 + 1136 >> 2]) {\n          break label$154\n         }\n         $2 = HEAP32[$5 - -64 >> 2];\n         $6 = HEAP32[$5 + 60 >> 2];\n         $3 = 0;\n         while (1) {\n          $9 = $3 << 2;\n          $10 = $9 + $2 | 0;\n          HEAP32[$10 >> 2] = HEAP32[$6 + $9 >> 2] - HEAP32[$10 >> 2];\n          $3 = $3 + 1 | 0;\n          if ($3 >>> 0 < HEAPU32[$5 + 1136 >> 2]) {\n           continue\n          }\n          break;\n         };\n         break label$154;\n        }\n        if (!HEAP32[$5 + 1136 >> 2]) {\n         break label$154\n        }\n        $10 = HEAP32[$5 - -64 >> 2];\n        $11 = HEAP32[$5 + 60 >> 2];\n        $3 = 0;\n        while (1) {\n         $6 = $3 << 2;\n         $2 = $6 + $11 | 0;\n         $13 = $6 + $10 | 0;\n         $6 = HEAP32[$13 >> 2];\n         $9 = $6 & 1 | HEAP32[$2 >> 2] << 1;\n         HEAP32[$2 >> 2] = $6 + $9 >> 1;\n         HEAP32[$13 >> 2] = $9 - $6 >> 1;\n         $3 = $3 + 1 | 0;\n         if ($3 >>> 0 < HEAPU32[$5 + 1136 >> 2]) {\n          continue\n         }\n         break;\n        };\n        break label$154;\n       }\n       $5 = HEAP32[$4 >> 2];\n       if (!HEAP32[$5 + 3632 >> 2]) {\n        FUNCTION_TABLE[HEAP32[$5 + 32 >> 2]]($0, 2, HEAP32[$5 + 48 >> 2])\n       }\n       $2 = HEAP32[$4 >> 2];\n       if (!HEAP32[$2 + 1144 >> 2]) {\n        break label$154\n       }\n       $3 = 0;\n       while (1) {\n        memset(HEAP32[(($3 << 2) + $2 | 0) + 60 >> 2], HEAP32[$2 + 1136 >> 2] << 2);\n        $3 = $3 + 1 | 0;\n        $2 = HEAP32[$4 >> 2];\n        if ($3 >>> 0 < HEAPU32[$2 + 1144 >> 2]) {\n         continue\n        }\n        break;\n       };\n      }\n      HEAP32[$1 >> 2] = 1;\n      $2 = HEAP32[$4 >> 2];\n      $1 = HEAP32[$2 + 232 >> 2];\n      if ($1) {\n       HEAP32[$2 + 228 >> 2] = $1\n      }\n      $1 = HEAP32[$0 >> 2];\n      $6 = HEAP32[$2 + 1144 >> 2];\n      HEAP32[$1 + 8 >> 2] = $6;\n      HEAP32[$1 + 12 >> 2] = HEAP32[$2 + 1148 >> 2];\n      $13 = HEAP32[$2 + 1152 >> 2];\n      HEAP32[$1 + 16 >> 2] = $13;\n      HEAP32[$1 + 20 >> 2] = HEAP32[$2 + 1140 >> 2];\n      $5 = HEAP32[$2 + 1136 >> 2];\n      HEAP32[$1 + 24 >> 2] = $5;\n      $1 = $2 + 1160 | 0;\n      $9 = HEAP32[$1 >> 2];\n      $3 = HEAP32[$1 + 4 >> 2];\n      $1 = $3;\n      $12 = $5 + $9 | 0;\n      if ($12 >>> 0 < $5 >>> 0) {\n       $1 = $1 + 1 | 0\n      }\n      HEAP32[$2 + 240 >> 2] = $12;\n      HEAP32[$2 + 244 >> 2] = $1;\n      $10 = $2 + 60 | 0;\n      $11 = $2 + 1136 | 0;\n      label$165 : {\n       label$166 : {\n        label$167 : {\n         if (HEAP32[$2 + 3632 >> 2]) {\n          HEAP32[$2 + 6156 >> 2] = 1;\n          $13 = HEAP32[$2 + 6144 >> 2];\n          $5 = HEAP32[$2 + 6148 >> 2];\n          memcpy($2 + 3752 | 0, $11, 2384);\n          if (($3 | 0) == ($5 | 0) & $13 >>> 0 < $9 >>> 0 | $5 >>> 0 < $3 >>> 0 | (($1 | 0) == ($5 | 0) & $13 >>> 0 >= $12 >>> 0 | $5 >>> 0 > $1 >>> 0)) {\n           break label$165\n          }\n          $3 = 0;\n          $1 = HEAP32[$4 >> 2];\n          HEAP32[$1 + 3632 >> 2] = 0;\n          $5 = $13 - $9 | 0;\n          $4 = $5;\n          if ($4) {\n           if ($6) {\n            while (1) {\n             $9 = $3 << 2;\n             HEAP32[$9 + ($7 + 32 | 0) >> 2] = HEAP32[($2 + $9 | 0) + 60 >> 2] + ($4 << 2);\n             $3 = $3 + 1 | 0;\n             if (($6 | 0) != ($3 | 0)) {\n              continue\n             }\n             break;\n            }\n           }\n           HEAP32[$1 + 3752 >> 2] = HEAP32[$1 + 3752 >> 2] - $4;\n           $2 = $1 + 3776 | 0;\n           $4 = $2;\n           $3 = $2;\n           $1 = HEAP32[$2 + 4 >> 2];\n           $2 = $5 + HEAP32[$2 >> 2] | 0;\n           if ($2 >>> 0 < $5 >>> 0) {\n            $1 = $1 + 1 | 0\n           }\n           HEAP32[$3 >> 2] = $2;\n           HEAP32[$4 + 4 >> 2] = $1;\n           $1 = HEAP32[$0 + 4 >> 2];\n           $1 = FUNCTION_TABLE[HEAP32[$1 + 24 >> 2]]($0, $1 + 3752 | 0, $7 + 32 | 0, HEAP32[$1 + 48 >> 2]) | 0;\n           break label$167;\n          }\n          $1 = FUNCTION_TABLE[HEAP32[$1 + 24 >> 2]]($0, $11, $10, HEAP32[$1 + 48 >> 2]) | 0;\n          break label$167;\n         }\n         label$172 : {\n          if (!HEAP32[$2 + 248 >> 2]) {\n           HEAP32[$2 + 3624 >> 2] = 0;\n           break label$172;\n          }\n          if (!HEAP32[$2 + 3624 >> 2]) {\n           break label$172\n          }\n          if (!FLAC__MD5Accumulate($2 + 3636 | 0, $10, $6, $5, $13 + 7 >>> 3 | 0)) {\n           break label$166\n          }\n          $2 = HEAP32[$4 >> 2];\n         }\n         $1 = FUNCTION_TABLE[HEAP32[$2 + 24 >> 2]]($0, $11, $10, HEAP32[$2 + 48 >> 2]) | 0;\n        }\n        if (!$1) {\n         break label$165\n        }\n       }\n       HEAP32[HEAP32[$0 >> 2] >> 2] = 7;\n       break label$1;\n      }\n      HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n     }\n     $8 = 1;\n     break label$1;\n    }\n    $8 = 0;\n    break label$1;\n   }\n   HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n   $8 = 0;\n  }\n  global$0 = $7 - -64 | 0;\n  return $8;\n }\n \n function read_residual_partitioned_rice_($0, $1, $2, $3, $4, $5) {\n  var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0;\n  $6 = global$0 - 16 | 0;\n  global$0 = $6;\n  $7 = HEAP32[HEAP32[$0 + 4 >> 2] + 1136 >> 2];\n  $11 = HEAP32[($5 ? 5644 : 5640) >> 2];\n  $12 = HEAP32[($5 ? 5632 : 5628) >> 2];\n  label$1 : {\n   label$2 : {\n    if (FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size($3, $2 >>> 0 > 6 ? $2 : 6)) {\n     $8 = $2 ? $7 >>> $2 | 0 : $7 - $1 | 0;\n     $13 = HEAP32[1409];\n     if (!$2) {\n      break label$2\n     }\n     $5 = 0;\n     while (1) {\n      if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 12 | 0, $12)) {\n       $7 = 0;\n       break label$1;\n      }\n      $9 = $10 << 2;\n      HEAP32[$9 + HEAP32[$3 >> 2] >> 2] = HEAP32[$6 + 12 >> 2];\n      label$6 : {\n       if (HEAPU32[$6 + 12 >> 2] < $11 >>> 0) {\n        $7 = 0;\n        HEAP32[$9 + HEAP32[$3 + 4 >> 2] >> 2] = 0;\n        $9 = $8 - ($10 ? 0 : $1) | 0;\n        if (!FLAC__bitreader_read_rice_signed_block(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], ($5 << 2) + $4 | 0, $9, HEAP32[$6 + 12 >> 2])) {\n         break label$1\n        }\n        $5 = $5 + $9 | 0;\n        break label$6;\n       }\n       if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 12 | 0, $13)) {\n        $7 = 0;\n        break label$1;\n       }\n       HEAP32[$9 + HEAP32[$3 + 4 >> 2] >> 2] = HEAP32[$6 + 12 >> 2];\n       $7 = $10 ? 0 : $1;\n       if ($7 >>> 0 >= $8 >>> 0) {\n        break label$6\n       }\n       while (1) {\n        if (!FLAC__bitreader_read_raw_int32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 8 | 0, HEAP32[$6 + 12 >> 2])) {\n         $7 = 0;\n         break label$1;\n        }\n        HEAP32[($5 << 2) + $4 >> 2] = HEAP32[$6 + 8 >> 2];\n        $5 = $5 + 1 | 0;\n        $7 = $7 + 1 | 0;\n        if (($8 | 0) != ($7 | 0)) {\n         continue\n        }\n        break;\n       };\n      }\n      $7 = 1;\n      $10 = $10 + 1 | 0;\n      if (!($10 >>> $2)) {\n       continue\n      }\n      break;\n     };\n     break label$1;\n    }\n    HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n    $7 = 0;\n    break label$1;\n   }\n   $7 = 0;\n   if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 12 | 0, $12)) {\n    break label$1\n   }\n   HEAP32[HEAP32[$3 >> 2] >> 2] = HEAP32[$6 + 12 >> 2];\n   label$11 : {\n    if (HEAPU32[$6 + 12 >> 2] >= $11 >>> 0) {\n     if (!FLAC__bitreader_read_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 12 | 0, $13)) {\n      break label$1\n     }\n     HEAP32[HEAP32[$3 + 4 >> 2] >> 2] = HEAP32[$6 + 12 >> 2];\n     if (!$8) {\n      break label$11\n     }\n     $5 = 0;\n     while (1) {\n      if (!FLAC__bitreader_read_raw_int32(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $6 + 8 | 0, HEAP32[$6 + 12 >> 2])) {\n       $7 = 0;\n       break label$1;\n      }\n      HEAP32[($5 << 2) + $4 >> 2] = HEAP32[$6 + 8 >> 2];\n      $5 = $5 + 1 | 0;\n      $7 = $7 + 1 | 0;\n      if (($8 | 0) != ($7 | 0)) {\n       continue\n      }\n      break;\n     };\n     break label$11;\n    }\n    HEAP32[HEAP32[$3 + 4 >> 2] >> 2] = 0;\n    if (!FLAC__bitreader_read_rice_signed_block(HEAP32[HEAP32[$0 + 4 >> 2] + 56 >> 2], $4, $8, HEAP32[$6 + 12 >> 2])) {\n     break label$1\n    }\n   }\n   $7 = 1;\n  }\n  global$0 = $6 + 16 | 0;\n  return $7;\n }\n \n function FLAC__stream_decoder_process_until_end_of_metadata($0) {\n  $0 = $0 | 0;\n  var $1 = 0, $2 = 0;\n  label$1 : {\n   label$2 : {\n    while (1) {\n     label$4 : {\n      $1 = 1;\n      label$5 : {\n       switch (HEAP32[HEAP32[$0 >> 2] >> 2]) {\n       case 0:\n        if (find_metadata_($0)) {\n         continue\n        }\n        break label$4;\n       case 2:\n       case 3:\n       case 4:\n       case 7:\n        break label$2;\n       case 1:\n        break label$5;\n       default:\n        break label$1;\n       };\n      }\n      if (read_metadata_($0)) {\n       continue\n      }\n     }\n     break;\n    };\n    $1 = 0;\n   }\n   $2 = $1;\n  }\n  return $2 | 0;\n }\n \n function FLAC__stream_decoder_process_until_end_of_stream($0) {\n  $0 = $0 | 0;\n  var $1 = 0, $2 = 0, $3 = 0;\n  $1 = global$0 - 16 | 0;\n  global$0 = $1;\n  $2 = 1;\n  label$1 : {\n   label$2 : {\n    while (1) {\n     label$4 : {\n      label$5 : {\n       switch (HEAP32[HEAP32[$0 >> 2] >> 2]) {\n       case 0:\n        if (find_metadata_($0)) {\n         continue\n        }\n        break label$4;\n       case 1:\n        if (read_metadata_($0)) {\n         continue\n        }\n        break label$4;\n       case 2:\n        if (frame_sync_($0)) {\n         continue\n        }\n        break label$2;\n       case 4:\n       case 7:\n        break label$2;\n       case 3:\n        break label$5;\n       default:\n        break label$1;\n       };\n      }\n      if (read_frame_($0, $1 + 12 | 0)) {\n       continue\n      }\n     }\n     break;\n    };\n    $2 = 0;\n   }\n   $3 = $2;\n  }\n  global$0 = $1 + 16 | 0;\n  return $3 | 0;\n }\n \n function read_callback_proxy_($0, $1, $2, $3) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  $0 = FUNCTION_TABLE[HEAP32[HEAP32[$0 + 4 >> 2] + 4 >> 2]]($0, $1, $2, $3) | 0;\n  if ($0 >>> 0 <= 2) {\n   return HEAP32[($0 << 2) + 7572 >> 2]\n  }\n  return 5;\n }\n \n function FLAC__bitwriter_free($0) {\n  var $1 = 0;\n  $1 = HEAP32[$0 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  HEAP32[$0 + 16 >> 2] = 0;\n  HEAP32[$0 >> 2] = 0;\n  HEAP32[$0 + 8 >> 2] = 0;\n  HEAP32[$0 + 12 >> 2] = 0;\n }\n \n function FLAC__bitwriter_init($0) {\n  var $1 = 0;\n  HEAP32[$0 + 16 >> 2] = 0;\n  HEAP32[$0 + 8 >> 2] = 8192;\n  HEAP32[$0 + 12 >> 2] = 0;\n  $1 = $0;\n  $0 = dlmalloc(32768);\n  HEAP32[$1 >> 2] = $0;\n  return ($0 | 0) != 0;\n }\n \n function FLAC__bitwriter_clear($0) {\n  HEAP32[$0 + 12 >> 2] = 0;\n  HEAP32[$0 + 16 >> 2] = 0;\n }\n \n function FLAC__bitwriter_get_write_crc16($0, $1) {\n  var $2 = 0, $3 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;\n  $2 = global$0 - 16 | 0;\n  global$0 = $2;\n  $3 = 0;\n  label$1 : {\n   if (!FLAC__bitwriter_get_buffer($0, $2 + 12 | 0, $2 + 8 | 0)) {\n    break label$1\n   }\n   (wasm2js_i32$0 = $1, wasm2js_i32$1 = FLAC__crc16(HEAP32[$2 + 12 >> 2], HEAP32[$2 + 8 >> 2])), HEAP16[wasm2js_i32$0 >> 1] = wasm2js_i32$1;\n   $3 = 1;\n  }\n  global$0 = $2 + 16 | 0;\n  return $3;\n }\n \n function FLAC__bitwriter_get_buffer($0, $1, $2) {\n  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;\n  $5 = HEAP32[$0 + 16 >> 2];\n  label$1 : {\n   if ($5 & 7) {\n    break label$1\n   }\n   label$2 : {\n    if (!$5) {\n     $4 = HEAP32[$0 >> 2];\n     $3 = 0;\n     break label$2;\n    }\n    $6 = HEAP32[$0 + 12 >> 2];\n    label$4 : {\n     if (($6 | 0) != HEAP32[$0 + 8 >> 2]) {\n      break label$4\n     }\n     $4 = $5 + 63 >>> 5 | 0;\n     $3 = $4 + $6 | 0;\n     if ($3 >>> 0 <= $6 >>> 0) {\n      break label$4\n     }\n     $6 = 0;\n     $5 = HEAP32[$0 >> 2];\n     $7 = $3;\n     $3 = $4 & 1023;\n     $3 = $7 + ($3 ? 1024 - $3 | 0 : 0) | 0;\n     label$5 : {\n      if ($3) {\n       if (($3 | 0) != ($3 & 1073741823)) {\n        break label$1\n       }\n       $4 = dlrealloc($5, $3 << 2);\n       if ($4) {\n        break label$5\n       }\n       dlfree($5);\n       return 0;\n      }\n      $4 = dlrealloc($5, 0);\n      if (!$4) {\n       break label$1\n      }\n     }\n     HEAP32[$0 + 8 >> 2] = $3;\n     HEAP32[$0 >> 2] = $4;\n     $6 = HEAP32[$0 + 12 >> 2];\n     $5 = HEAP32[$0 + 16 >> 2];\n    }\n    $4 = HEAP32[$0 >> 2];\n    $3 = HEAP32[$0 + 4 >> 2] << 32 - $5;\n    HEAP32[$4 + ($6 << 2) >> 2] = $3 << 24 | $3 << 8 & 16711680 | ($3 >>> 8 & 65280 | $3 >>> 24);\n    $3 = HEAP32[$0 + 16 >> 2] >>> 3 | 0;\n   }\n   HEAP32[$1 >> 2] = $4;\n   HEAP32[$2 >> 2] = $3 + (HEAP32[$0 + 12 >> 2] << 2);\n   $6 = 1;\n  }\n  return $6;\n }\n \n function FLAC__bitwriter_get_write_crc8($0, $1) {\n  var $2 = 0, $3 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;\n  $2 = global$0 - 16 | 0;\n  global$0 = $2;\n  $3 = 0;\n  label$1 : {\n   if (!FLAC__bitwriter_get_buffer($0, $2 + 12 | 0, $2 + 8 | 0)) {\n    break label$1\n   }\n   (wasm2js_i32$0 = $1, wasm2js_i32$1 = FLAC__crc8(HEAP32[$2 + 12 >> 2], HEAP32[$2 + 8 >> 2])), HEAP8[wasm2js_i32$0 | 0] = wasm2js_i32$1;\n   $3 = 1;\n  }\n  global$0 = $2 + 16 | 0;\n  return $3;\n }\n \n function FLAC__bitwriter_write_zeroes($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0;\n  label$1 : {\n   label$2 : {\n    if (!$1) {\n     break label$2\n    }\n    $2 = HEAP32[$0 + 8 >> 2];\n    $3 = HEAP32[$0 + 12 >> 2];\n    label$3 : {\n     if ($2 >>> 0 > $3 + $1 >>> 0) {\n      break label$3\n     }\n     $4 = $3 + ((HEAP32[$0 + 16 >> 2] + $1 | 0) + 31 >>> 5 | 0) | 0;\n     if ($4 >>> 0 <= $2 >>> 0) {\n      break label$3\n     }\n     $3 = 0;\n     $5 = HEAP32[$0 >> 2];\n     $2 = $4 - $2 & 1023;\n     $2 = $4 + ($2 ? 1024 - $2 | 0 : 0) | 0;\n     label$4 : {\n      if ($2) {\n       if (($2 | 0) != ($2 & 1073741823)) {\n        break label$1\n       }\n       $4 = dlrealloc($5, $2 << 2);\n       if ($4) {\n        break label$4\n       }\n       dlfree($5);\n       return 0;\n      }\n      $4 = dlrealloc($5, 0);\n      if (!$4) {\n       break label$1\n      }\n     }\n     HEAP32[$0 + 8 >> 2] = $2;\n     HEAP32[$0 >> 2] = $4;\n    }\n    $2 = HEAP32[$0 + 16 >> 2];\n    if ($2) {\n     $4 = $2;\n     $2 = 32 - $2 | 0;\n     $3 = $2 >>> 0 < $1 >>> 0 ? $2 : $1;\n     $5 = $4 + $3 | 0;\n     HEAP32[$0 + 16 >> 2] = $5;\n     $2 = HEAP32[$0 + 4 >> 2] << $3;\n     HEAP32[$0 + 4 >> 2] = $2;\n     if (($5 | 0) != 32) {\n      break label$2\n     }\n     $5 = HEAP32[$0 + 12 >> 2];\n     HEAP32[$0 + 12 >> 2] = $5 + 1;\n     HEAP32[HEAP32[$0 >> 2] + ($5 << 2) >> 2] = $2 << 8 & 16711680 | $2 << 24 | ($2 >>> 8 & 65280 | $2 >>> 24);\n     HEAP32[$0 + 16 >> 2] = 0;\n     $1 = $1 - $3 | 0;\n    }\n    if ($1 >>> 0 >= 32) {\n     $2 = HEAP32[$0 >> 2];\n     while (1) {\n      $3 = HEAP32[$0 + 12 >> 2];\n      HEAP32[$0 + 12 >> 2] = $3 + 1;\n      HEAP32[$2 + ($3 << 2) >> 2] = 0;\n      $1 = $1 + -32 | 0;\n      if ($1 >>> 0 > 31) {\n       continue\n      }\n      break;\n     };\n    }\n    if (!$1) {\n     break label$2\n    }\n    HEAP32[$0 + 16 >> 2] = $1;\n    HEAP32[$0 + 4 >> 2] = 0;\n   }\n   $3 = 1;\n  }\n  return $3;\n }\n \n function FLAC__bitwriter_write_raw_uint32($0, $1, $2) {\n  var $3 = 0;\n  label$1 : {\n   if ($2 >>> 0 <= 31) {\n    $3 = 0;\n    if ($1 >>> $2) {\n     break label$1\n    }\n   }\n   $3 = FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, $2);\n  }\n  return $3;\n }\n \n function FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, $2) {\n  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;\n  label$1 : {\n   if (!$0 | $2 >>> 0 > 32) {\n    break label$1\n   }\n   $4 = HEAP32[$0 >> 2];\n   if (!$4) {\n    break label$1\n   }\n   $6 = 1;\n   if (!$2) {\n    break label$1\n   }\n   $7 = HEAP32[$0 + 8 >> 2];\n   $3 = HEAP32[$0 + 12 >> 2];\n   label$2 : {\n    if ($7 >>> 0 > $3 + $2 >>> 0) {\n     $3 = $4;\n     break label$2;\n    }\n    $5 = $3 + ((HEAP32[$0 + 16 >> 2] + $2 | 0) + 31 >>> 5 | 0) | 0;\n    if ($5 >>> 0 <= $7 >>> 0) {\n     $3 = $4;\n     break label$2;\n    }\n    $6 = 0;\n    $3 = $5 - $7 & 1023;\n    $5 = $5 + ($3 ? 1024 - $3 | 0 : 0) | 0;\n    label$5 : {\n     if ($5) {\n      if (($5 | 0) != ($5 & 1073741823)) {\n       break label$1\n      }\n      $3 = dlrealloc($4, $5 << 2);\n      if ($3) {\n       break label$5\n      }\n      dlfree($4);\n      return 0;\n     }\n     $3 = dlrealloc($4, 0);\n     if (!$3) {\n      break label$1\n     }\n    }\n    HEAP32[$0 + 8 >> 2] = $5;\n    HEAP32[$0 >> 2] = $3;\n   }\n   $4 = HEAP32[$0 + 16 >> 2];\n   $5 = 32 - $4 | 0;\n   if ($5 >>> 0 > $2 >>> 0) {\n    HEAP32[$0 + 16 >> 2] = $2 + $4;\n    HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] << $2 | $1;\n    return 1;\n   }\n   if ($4) {\n    $4 = $2 - $5 | 0;\n    HEAP32[$0 + 16 >> 2] = $4;\n    $2 = HEAP32[$0 + 12 >> 2];\n    HEAP32[$0 + 12 >> 2] = $2 + 1;\n    $3 = ($2 << 2) + $3 | 0;\n    $2 = HEAP32[$0 + 4 >> 2] << $5 | $1 >>> $4;\n    HEAP32[$3 >> 2] = $2 << 24 | $2 << 8 & 16711680 | ($2 >>> 8 & 65280 | $2 >>> 24);\n    HEAP32[$0 + 4 >> 2] = $1;\n    return 1;\n   }\n   $6 = 1;\n   $2 = $0;\n   $0 = HEAP32[$0 + 12 >> 2];\n   HEAP32[$2 + 12 >> 2] = $0 + 1;\n   HEAP32[($0 << 2) + $3 >> 2] = $1 << 8 & 16711680 | $1 << 24 | ($1 >>> 8 & 65280 | $1 >>> 24);\n  }\n  return $6;\n }\n \n function FLAC__bitwriter_write_raw_int32($0, $1, $2) {\n  return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 >>> 0 < 32 ? -1 << $2 ^ -1 : -1) & $1, $2);\n }\n \n function FLAC__bitwriter_write_raw_uint64($0, $1, $2, $3) {\n  var $4 = 0;\n  label$1 : {\n   if ($3 >>> 0 >= 33) {\n    $3 = $3 + -32 | 0;\n    if ($2 >>> $3 | 0 ? $3 >>> 0 <= 31 : 0) {\n     break label$1\n    }\n    if (!FLAC__bitwriter_write_raw_uint32_nocheck($0, $2, $3)) {\n     break label$1\n    }\n    return (FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, 32) | 0) != 0;\n   }\n   if (($3 | 0) != 32) {\n    if ($1 >>> $3) {\n     break label$1\n    }\n   }\n   $4 = FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, $3);\n  }\n  return $4;\n }\n \n function FLAC__bitwriter_write_raw_uint32_little_endian($0, $1) {\n  var $2 = 0;\n  label$1 : {\n   if (!FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 255, 8)) {\n    break label$1\n   }\n   if (!FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 8 & 255, 8)) {\n    break label$1\n   }\n   if (!FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 16 & 255, 8)) {\n    break label$1\n   }\n   $2 = (FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 24 | 0, 8) | 0) != 0;\n  }\n  return $2;\n }\n \n function FLAC__bitwriter_write_byte_block($0, $1, $2) {\n  var $3 = 0, $4 = 0, $5 = 0, $6 = 0;\n  $3 = HEAP32[$0 + 8 >> 2];\n  $4 = HEAP32[$0 + 12 >> 2];\n  label$1 : {\n   label$2 : {\n    if ($3 >>> 0 > ($4 + ($2 >>> 2 | 0) | 0) + 1 >>> 0) {\n     break label$2\n    }\n    $5 = $4 + ((HEAP32[$0 + 16 >> 2] + ($2 << 3) | 0) + 31 >>> 5 | 0) | 0;\n    if ($5 >>> 0 <= $3 >>> 0) {\n     break label$2\n    }\n    $4 = 0;\n    $6 = HEAP32[$0 >> 2];\n    $3 = $5 - $3 & 1023;\n    $3 = $5 + ($3 ? 1024 - $3 | 0 : 0) | 0;\n    label$3 : {\n     if ($3) {\n      if (($3 | 0) != ($3 & 1073741823)) {\n       break label$1\n      }\n      $5 = dlrealloc($6, $3 << 2);\n      if ($5) {\n       break label$3\n      }\n      dlfree($6);\n      return 0;\n     }\n     $5 = dlrealloc($6, 0);\n     if (!$5) {\n      break label$1\n     }\n    }\n    HEAP32[$0 + 8 >> 2] = $3;\n    HEAP32[$0 >> 2] = $5;\n   }\n   $4 = 1;\n   if (!$2) {\n    break label$1\n   }\n   $4 = 0;\n   label$5 : {\n    while (1) {\n     if (!FLAC__bitwriter_write_raw_uint32_nocheck($0, HEAPU8[$1 + $4 | 0], 8)) {\n      break label$5\n     }\n     $4 = $4 + 1 | 0;\n     if (($4 | 0) != ($2 | 0)) {\n      continue\n     }\n     break;\n    };\n    return 1;\n   }\n   $4 = 0;\n  }\n  return $4;\n }\n \n function FLAC__bitwriter_write_unary_unsigned($0, $1) {\n  if ($1 >>> 0 <= 31) {\n   return FLAC__bitwriter_write_raw_uint32_nocheck($0, 1, $1 + 1 | 0)\n  }\n  if (!FLAC__bitwriter_write_zeroes($0, $1)) {\n   return 0\n  }\n  return (FLAC__bitwriter_write_raw_uint32_nocheck($0, 1, 1) | 0) != 0;\n }\n \n function FLAC__bitwriter_write_rice_signed_block($0, $1, $2, $3) {\n  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0;\n  $4 = 1;\n  label$1 : {\n   if (!$2) {\n    break label$1\n   }\n   $10 = $3 + 1 | 0;\n   $11 = -1 << $3;\n   $12 = -1 >>> 31 - $3 | 0;\n   while (1) {\n    $6 = HEAP32[$1 >> 2];\n    $9 = $6 << 1 ^ $6 >> 31;\n    $6 = $9 >>> $3 | 0;\n    $4 = $10 + $6 | 0;\n    label$3 : {\n     label$4 : {\n      $5 = HEAP32[$0 + 16 >> 2];\n      if (!$5) {\n       break label$4\n      }\n      $7 = $4 + $5 | 0;\n      if ($7 >>> 0 > 31) {\n       break label$4\n      }\n      HEAP32[$0 + 16 >> 2] = $7;\n      HEAP32[$0 + 4 >> 2] = ($9 | $11) & $12 | HEAP32[$0 + 4 >> 2] << $4;\n      break label$3;\n     }\n     $8 = HEAP32[$0 + 8 >> 2];\n     $7 = HEAP32[$0 + 12 >> 2];\n     label$5 : {\n      if ($8 >>> 0 > ($7 + ($5 + $6 | 0) | 0) + 1 >>> 0) {\n       break label$5\n      }\n      $4 = $7 + (($4 + $5 | 0) + 31 >>> 5 | 0) | 0;\n      if ($4 >>> 0 <= $8 >>> 0) {\n       break label$5\n      }\n      $7 = HEAP32[$0 >> 2];\n      $5 = $4 - $8 & 1023;\n      $5 = $4 + ($5 ? 1024 - $5 | 0 : 0) | 0;\n      label$6 : {\n       if ($5) {\n        $4 = 0;\n        if (($5 | 0) != ($5 & 1073741823)) {\n         break label$1\n        }\n        $8 = dlrealloc($7, $5 << 2);\n        if ($8) {\n         break label$6\n        }\n        dlfree($7);\n        return 0;\n       }\n       $8 = dlrealloc($7, 0);\n       $4 = 0;\n       if (!$8) {\n        break label$1\n       }\n      }\n      HEAP32[$0 + 8 >> 2] = $5;\n      HEAP32[$0 >> 2] = $8;\n     }\n     label$8 : {\n      if (!$6) {\n       break label$8\n      }\n      $4 = HEAP32[$0 + 16 >> 2];\n      if ($4) {\n       $5 = HEAP32[$0 + 4 >> 2];\n       $7 = 32 - $4 | 0;\n       if ($6 >>> 0 < $7 >>> 0) {\n        HEAP32[$0 + 16 >> 2] = $4 + $6;\n        HEAP32[$0 + 4 >> 2] = $5 << $6;\n        break label$8;\n       }\n       $4 = $5 << $7;\n       HEAP32[$0 + 4 >> 2] = $4;\n       $5 = HEAP32[$0 + 12 >> 2];\n       HEAP32[$0 + 12 >> 2] = $5 + 1;\n       HEAP32[HEAP32[$0 >> 2] + ($5 << 2) >> 2] = $4 << 8 & 16711680 | $4 << 24 | ($4 >>> 8 & 65280 | $4 >>> 24);\n       HEAP32[$0 + 16 >> 2] = 0;\n       $6 = $6 - $7 | 0;\n      }\n      if ($6 >>> 0 >= 32) {\n       $4 = HEAP32[$0 >> 2];\n       while (1) {\n        $5 = HEAP32[$0 + 12 >> 2];\n        HEAP32[$0 + 12 >> 2] = $5 + 1;\n        HEAP32[$4 + ($5 << 2) >> 2] = 0;\n        $6 = $6 + -32 | 0;\n        if ($6 >>> 0 > 31) {\n         continue\n        }\n        break;\n       };\n      }\n      if (!$6) {\n       break label$8\n      }\n      HEAP32[$0 + 16 >> 2] = $6;\n      HEAP32[$0 + 4 >> 2] = 0;\n     }\n     $6 = ($9 | $11) & $12;\n     $4 = HEAP32[$0 + 4 >> 2];\n     $7 = HEAP32[$0 + 16 >> 2];\n     $5 = 32 - $7 | 0;\n     if ($10 >>> 0 < $5 >>> 0) {\n      HEAP32[$0 + 16 >> 2] = $7 + $10;\n      HEAP32[$0 + 4 >> 2] = $6 | $4 << $10;\n      break label$3;\n     }\n     $7 = $10 - $5 | 0;\n     HEAP32[$0 + 16 >> 2] = $7;\n     $9 = HEAP32[$0 + 12 >> 2];\n     HEAP32[$0 + 12 >> 2] = $9 + 1;\n     $4 = $4 << $5 | $6 >>> $7;\n     HEAP32[HEAP32[$0 >> 2] + ($9 << 2) >> 2] = $4 << 24 | $4 << 8 & 16711680 | ($4 >>> 8 & 65280 | $4 >>> 24);\n     HEAP32[$0 + 4 >> 2] = $6;\n    }\n    $1 = $1 + 4 | 0;\n    $2 = $2 + -1 | 0;\n    if ($2) {\n     continue\n    }\n    break;\n   };\n   $4 = 1;\n  }\n  return $4;\n }\n \n function FLAC__bitwriter_write_utf8_uint32($0, $1) {\n  if (($1 | 0) >= 0) {\n   if ($1 >>> 0 <= 127) {\n    return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, 8)\n   }\n   if ($1 >>> 0 <= 2047) {\n    return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 | 192, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1\n   }\n   if ($1 >>> 0 <= 65535) {\n    return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 | 224, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1\n   }\n   if ($1 >>> 0 <= 2097151) {\n    return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 | 240, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1\n   }\n   if ($1 >>> 0 <= 67108863) {\n    return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 24 | 248, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1\n   }\n   $0 = FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 30 | 252, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 24 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1;\n  } else {\n   $0 = 0\n  }\n  return $0;\n }\n \n function FLAC__bitwriter_write_utf8_uint64($0, $1, $2) {\n  if (($2 | 0) == 15 | $2 >>> 0 < 15) {\n   if (!$2 & $1 >>> 0 <= 127 | $2 >>> 0 < 0) {\n    return FLAC__bitwriter_write_raw_uint32_nocheck($0, $1, 8)\n   }\n   if (!$2 & $1 >>> 0 <= 2047 | $2 >>> 0 < 0) {\n    return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 63) << 26 | $1 >>> 6 | 192, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1\n   }\n   if (!$2 & $1 >>> 0 <= 65535 | $2 >>> 0 < 0) {\n    return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 4095) << 20 | $1 >>> 12 | 224, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1\n   }\n   if (!$2 & $1 >>> 0 <= 2097151 | $2 >>> 0 < 0) {\n    return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 262143) << 14 | $1 >>> 18 | 240, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1\n   }\n   if (!$2 & $1 >>> 0 <= 67108863 | $2 >>> 0 < 0) {\n    return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 16777215) << 8 | $1 >>> 24 | 248, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1\n   }\n   if (!$2 & $1 >>> 0 <= 2147483647 | $2 >>> 0 < 0) {\n    return FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 1073741823) << 2 | $1 >>> 30 | 252, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 24 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1\n   }\n   $0 = FLAC__bitwriter_write_raw_uint32_nocheck($0, 254, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, ($2 & 1073741823) << 2 | $1 >>> 30 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 24 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 18 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 12 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 >>> 6 & 63 | 128, 8) & FLAC__bitwriter_write_raw_uint32_nocheck($0, $1 & 63 | 128, 8) & 1;\n  } else {\n   $0 = 0\n  }\n  return $0;\n }\n \n function FLAC__ogg_encoder_aspect_init($0) {\n  if (ogg_stream_init($0 + 8 | 0, HEAP32[$0 >> 2])) {\n   $0 = 0\n  } else {\n   HEAP32[$0 + 392 >> 2] = 0;\n   HEAP32[$0 + 396 >> 2] = 0;\n   HEAP32[$0 + 384 >> 2] = 0;\n   HEAP32[$0 + 388 >> 2] = 1;\n   $0 = 1;\n  }\n  return $0;\n }\n \n function FLAC__ogg_encoder_aspect_set_defaults($0) {\n  HEAP32[$0 >> 2] = 0;\n  HEAP32[$0 + 4 >> 2] = 0;\n }\n \n function FLAC__ogg_encoder_aspect_write_callback_wrapper($0, $1, $2, $3, $4, $5, $6, $7, $8) {\n  var $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0;\n  $9 = global$0 - 96 | 0;\n  global$0 = $9;\n  label$1 : {\n   label$2 : {\n    if (HEAP32[$0 + 384 >> 2]) {\n     HEAP32[$9 + 72 >> 2] = 0;\n     HEAP32[$9 + 76 >> 2] = 0;\n     $12 = $9 + 80 | 0;\n     $11 = $12;\n     HEAP32[$11 >> 2] = 0;\n     HEAP32[$11 + 4 >> 2] = 0;\n     HEAP32[$9 + 88 >> 2] = 0;\n     HEAP32[$9 + 92 >> 2] = 0;\n     HEAP32[$9 + 64 >> 2] = 0;\n     HEAP32[$9 + 68 >> 2] = 0;\n     $10 = HEAP32[$0 + 396 >> 2];\n     $11 = $3;\n     $13 = HEAP32[$0 + 392 >> 2];\n     $14 = $11 + $13 | 0;\n     if ($14 >>> 0 < $13 >>> 0) {\n      $10 = $10 + 1 | 0\n     }\n     HEAP32[$12 >> 2] = $14;\n     HEAP32[$12 + 4 >> 2] = $10;\n     label$4 : {\n      label$5 : {\n       if (HEAP32[$0 + 388 >> 2]) {\n        if (($2 | 0) != 38) {\n         break label$4\n        }\n        HEAP8[$9 | 0] = HEAPU8[7536];\n        $2 = HEAP32[2721];\n        $2 = HEAPU8[$2 | 0] | HEAPU8[$2 + 1 | 0] << 8 | (HEAPU8[$2 + 2 | 0] << 16 | HEAPU8[$2 + 3 | 0] << 24);\n        HEAP8[$9 + 5 | 0] = 1;\n        HEAP8[$9 + 6 | 0] = 0;\n        HEAP8[$9 + 1 | 0] = $2;\n        HEAP8[$9 + 2 | 0] = $2 >>> 8;\n        HEAP8[$9 + 3 | 0] = $2 >>> 16;\n        HEAP8[$9 + 4 | 0] = $2 >>> 24;\n        $10 = HEAP32[$0 + 4 >> 2];\n        $2 = HEAPU8[5409] | HEAPU8[5410] << 8 | (HEAPU8[5411] << 16 | HEAPU8[5412] << 24);\n        HEAP8[$9 + 9 | 0] = $2;\n        HEAP8[$9 + 10 | 0] = $2 >>> 8;\n        HEAP8[$9 + 11 | 0] = $2 >>> 16;\n        HEAP8[$9 + 12 | 0] = $2 >>> 24;\n        HEAP8[$9 + 8 | 0] = $10;\n        HEAP8[$9 + 7 | 0] = $10 >>> 8;\n        $2 = HEAPU8[$1 + 34 | 0] | HEAPU8[$1 + 35 | 0] << 8 | (HEAPU8[$1 + 36 | 0] << 16 | HEAPU8[$1 + 37 | 0] << 24);\n        $10 = HEAPU8[$1 + 30 | 0] | HEAPU8[$1 + 31 | 0] << 8 | (HEAPU8[$1 + 32 | 0] << 16 | HEAPU8[$1 + 33 | 0] << 24);\n        HEAP8[$9 + 43 | 0] = $10;\n        HEAP8[$9 + 44 | 0] = $10 >>> 8;\n        HEAP8[$9 + 45 | 0] = $10 >>> 16;\n        HEAP8[$9 + 46 | 0] = $10 >>> 24;\n        HEAP8[$9 + 47 | 0] = $2;\n        HEAP8[$9 + 48 | 0] = $2 >>> 8;\n        HEAP8[$9 + 49 | 0] = $2 >>> 16;\n        HEAP8[$9 + 50 | 0] = $2 >>> 24;\n        $2 = HEAPU8[$1 + 28 | 0] | HEAPU8[$1 + 29 | 0] << 8 | (HEAPU8[$1 + 30 | 0] << 16 | HEAPU8[$1 + 31 | 0] << 24);\n        $10 = HEAPU8[$1 + 24 | 0] | HEAPU8[$1 + 25 | 0] << 8 | (HEAPU8[$1 + 26 | 0] << 16 | HEAPU8[$1 + 27 | 0] << 24);\n        HEAP8[$9 + 37 | 0] = $10;\n        HEAP8[$9 + 38 | 0] = $10 >>> 8;\n        HEAP8[$9 + 39 | 0] = $10 >>> 16;\n        HEAP8[$9 + 40 | 0] = $10 >>> 24;\n        HEAP8[$9 + 41 | 0] = $2;\n        HEAP8[$9 + 42 | 0] = $2 >>> 8;\n        HEAP8[$9 + 43 | 0] = $2 >>> 16;\n        HEAP8[$9 + 44 | 0] = $2 >>> 24;\n        $2 = HEAPU8[$1 + 20 | 0] | HEAPU8[$1 + 21 | 0] << 8 | (HEAPU8[$1 + 22 | 0] << 16 | HEAPU8[$1 + 23 | 0] << 24);\n        $10 = HEAPU8[$1 + 16 | 0] | HEAPU8[$1 + 17 | 0] << 8 | (HEAPU8[$1 + 18 | 0] << 16 | HEAPU8[$1 + 19 | 0] << 24);\n        HEAP8[$9 + 29 | 0] = $10;\n        HEAP8[$9 + 30 | 0] = $10 >>> 8;\n        HEAP8[$9 + 31 | 0] = $10 >>> 16;\n        HEAP8[$9 + 32 | 0] = $10 >>> 24;\n        HEAP8[$9 + 33 | 0] = $2;\n        HEAP8[$9 + 34 | 0] = $2 >>> 8;\n        HEAP8[$9 + 35 | 0] = $2 >>> 16;\n        HEAP8[$9 + 36 | 0] = $2 >>> 24;\n        $2 = HEAPU8[$1 + 12 | 0] | HEAPU8[$1 + 13 | 0] << 8 | (HEAPU8[$1 + 14 | 0] << 16 | HEAPU8[$1 + 15 | 0] << 24);\n        $10 = HEAPU8[$1 + 8 | 0] | HEAPU8[$1 + 9 | 0] << 8 | (HEAPU8[$1 + 10 | 0] << 16 | HEAPU8[$1 + 11 | 0] << 24);\n        HEAP8[$9 + 21 | 0] = $10;\n        HEAP8[$9 + 22 | 0] = $10 >>> 8;\n        HEAP8[$9 + 23 | 0] = $10 >>> 16;\n        HEAP8[$9 + 24 | 0] = $10 >>> 24;\n        HEAP8[$9 + 25 | 0] = $2;\n        HEAP8[$9 + 26 | 0] = $2 >>> 8;\n        HEAP8[$9 + 27 | 0] = $2 >>> 16;\n        HEAP8[$9 + 28 | 0] = $2 >>> 24;\n        $2 = HEAPU8[$1 + 4 | 0] | HEAPU8[$1 + 5 | 0] << 8 | (HEAPU8[$1 + 6 | 0] << 16 | HEAPU8[$1 + 7 | 0] << 24);\n        $1 = HEAPU8[$1 | 0] | HEAPU8[$1 + 1 | 0] << 8 | (HEAPU8[$1 + 2 | 0] << 16 | HEAPU8[$1 + 3 | 0] << 24);\n        HEAP8[$9 + 13 | 0] = $1;\n        HEAP8[$9 + 14 | 0] = $1 >>> 8;\n        HEAP8[$9 + 15 | 0] = $1 >>> 16;\n        HEAP8[$9 + 16 | 0] = $1 >>> 24;\n        HEAP8[$9 + 17 | 0] = $2;\n        HEAP8[$9 + 18 | 0] = $2 >>> 8;\n        HEAP8[$9 + 19 | 0] = $2 >>> 16;\n        HEAP8[$9 + 20 | 0] = $2 >>> 24;\n        HEAP32[$9 + 68 >> 2] = 51;\n        HEAP32[$9 + 72 >> 2] = 1;\n        HEAP32[$9 + 64 >> 2] = $9;\n        HEAP32[$0 + 388 >> 2] = 0;\n        break label$5;\n       }\n       HEAP32[$9 + 68 >> 2] = $2;\n       HEAP32[$9 + 64 >> 2] = $1;\n      }\n      if ($5) {\n       HEAP32[$9 + 76 >> 2] = 1\n      }\n      $1 = $0 + 8 | 0;\n      if (ogg_stream_packetin($1, $9 - -64 | 0)) {\n       break label$4\n      }\n      $2 = $0 + 368 | 0;\n      if (!$3) {\n       while (1) {\n        if (!ogg_stream_flush_i($1, $2, 1)) {\n         break label$2\n        }\n        if (FUNCTION_TABLE[$6]($7, HEAP32[$0 + 368 >> 2], HEAP32[$0 + 372 >> 2], 0, $4, $8)) {\n         break label$4\n        }\n        if (!FUNCTION_TABLE[$6]($7, HEAP32[$0 + 376 >> 2], HEAP32[$0 + 380 >> 2], 0, $4, $8)) {\n         continue\n        }\n        break label$4;\n       }\n      }\n      while (1) {\n       if (!ogg_stream_pageout($1, $2)) {\n        break label$2\n       }\n       if (FUNCTION_TABLE[$6]($7, HEAP32[$0 + 368 >> 2], HEAP32[$0 + 372 >> 2], 0, $4, $8)) {\n        break label$4\n       }\n       if (!FUNCTION_TABLE[$6]($7, HEAP32[$0 + 376 >> 2], HEAP32[$0 + 380 >> 2], 0, $4, $8)) {\n        continue\n       }\n       break;\n      };\n     }\n     $6 = 1;\n     break label$1;\n    }\n    $6 = 1;\n    if ($3 | $4 | ($2 | 0) != 4 | (HEAPU8[$1 | 0] | HEAPU8[$1 + 1 | 0] << 8 | (HEAPU8[$1 + 2 | 0] << 16 | HEAPU8[$1 + 3 | 0] << 24)) != (HEAPU8[5409] | HEAPU8[5410] << 8 | (HEAPU8[5411] << 16 | HEAPU8[5412] << 24))) {\n     break label$1\n    }\n    HEAP32[$0 + 384 >> 2] = 1;\n    $11 = $3;\n   }\n   $1 = $0;\n   $3 = $1;\n   $2 = HEAP32[$1 + 396 >> 2];\n   $0 = $11 + HEAP32[$1 + 392 >> 2] | 0;\n   if ($0 >>> 0 < $11 >>> 0) {\n    $2 = $2 + 1 | 0\n   }\n   HEAP32[$3 + 392 >> 2] = $0;\n   HEAP32[$1 + 396 >> 2] = $2;\n   $6 = 0;\n  }\n  global$0 = $9 + 96 | 0;\n  return $6;\n }\n \n function simple_ogg_page__init($0) {\n  HEAP32[$0 >> 2] = 0;\n  HEAP32[$0 + 4 >> 2] = 0;\n  HEAP32[$0 + 8 >> 2] = 0;\n  HEAP32[$0 + 12 >> 2] = 0;\n }\n \n function simple_ogg_page__clear($0) {\n  var $1 = 0;\n  $1 = HEAP32[$0 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  $1 = HEAP32[$0 + 8 >> 2];\n  if ($1) {\n   dlfree($1)\n  }\n  HEAP32[$0 >> 2] = 0;\n  HEAP32[$0 + 4 >> 2] = 0;\n  HEAP32[$0 + 8 >> 2] = 0;\n  HEAP32[$0 + 12 >> 2] = 0;\n }\n \n function simple_ogg_page__get_at($0, $1, $2, $3, $4, $5, $6) {\n  var $7 = 0, $8 = 0, $9 = 0;\n  $7 = global$0 - 16 | 0;\n  global$0 = $7;\n  label$1 : {\n   if (!$4) {\n    break label$1\n   }\n   label$2 : {\n    switch (FUNCTION_TABLE[$4]($0, $1, $2, $6) | 0) {\n    case 1:\n     HEAP32[HEAP32[$0 >> 2] >> 2] = 5;\n     break label$1;\n    case 0:\n     break label$2;\n    default:\n     break label$1;\n    };\n   }\n   $4 = dlmalloc(282);\n   HEAP32[$3 >> 2] = $4;\n   if (!$4) {\n    HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n    break label$1;\n   }\n   $8 = 27;\n   while (1) {\n    HEAP32[$7 + 12 >> 2] = $8;\n    $1 = 5;\n    label$6 : {\n     label$7 : {\n      switch (FUNCTION_TABLE[$5]($0, $4, $7 + 12 | 0, $6) | 0) {\n      case 1:\n       $1 = HEAP32[$7 + 12 >> 2];\n       if ($1) {\n        break label$6\n       }\n       $1 = 2;\n      default:\n       HEAP32[HEAP32[$0 >> 2] >> 2] = $1;\n       break label$1;\n      case 3:\n       break label$1;\n      case 0:\n       break label$7;\n      };\n     }\n     $1 = HEAP32[$7 + 12 >> 2];\n    }\n    $4 = $1 + $4 | 0;\n    $8 = $8 - $1 | 0;\n    if ($8) {\n     continue\n    }\n    break;\n   };\n   $1 = HEAP32[$3 >> 2];\n   HEAP32[$3 + 4 >> 2] = HEAPU8[$1 + 26 | 0] + 27;\n   label$10 : {\n    if (!(HEAP8[$1 + 5 | 0] & 1 | (HEAPU8[$1 | 0] | HEAPU8[$1 + 1 | 0] << 8 | (HEAPU8[$1 + 2 | 0] << 16 | HEAPU8[$1 + 3 | 0] << 24)) != 1399285583 | ((HEAPU8[$1 + 6 | 0] | HEAPU8[$1 + 7 | 0] << 8 | (HEAPU8[$1 + 8 | 0] << 16 | HEAPU8[$1 + 9 | 0] << 24)) != 0 | (HEAPU8[$1 + 10 | 0] | HEAPU8[$1 + 11 | 0] << 8 | (HEAPU8[$1 + 12 | 0] << 16 | HEAPU8[$1 + 13 | 0] << 24)) != 0))) {\n     $8 = HEAPU8[$1 + 26 | 0];\n     if ($8) {\n      break label$10\n     }\n    }\n    HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n    break label$1;\n   }\n   $4 = $1 + 27 | 0;\n   while (1) {\n    HEAP32[$7 + 12 >> 2] = $8;\n    $1 = 5;\n    label$13 : {\n     label$14 : {\n      switch (FUNCTION_TABLE[$5]($0, $4, $7 + 12 | 0, $6) | 0) {\n      case 1:\n       $1 = HEAP32[$7 + 12 >> 2];\n       if ($1) {\n        break label$13\n       }\n       $1 = 2;\n      default:\n       HEAP32[HEAP32[$0 >> 2] >> 2] = $1;\n       break label$1;\n      case 3:\n       break label$1;\n      case 0:\n       break label$14;\n      };\n     }\n     $1 = HEAP32[$7 + 12 >> 2];\n    }\n    $4 = $1 + $4 | 0;\n    $8 = $8 - $1 | 0;\n    if ($8) {\n     continue\n    }\n    break;\n   };\n   $4 = 0;\n   $1 = HEAP32[$3 >> 2];\n   $2 = HEAPU8[$1 + 26 | 0];\n   label$17 : {\n    if (($2 | 0) != 1) {\n     $2 = $2 + -1 | 0;\n     while (1) {\n      if (HEAPU8[($1 + $4 | 0) + 27 | 0] != 255) {\n       HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n       break label$17;\n      }\n      $4 = $4 + 1 | 0;\n      if ($4 >>> 0 < $2 >>> 0) {\n       continue\n      }\n      break;\n     };\n    }\n    $4 = HEAPU8[($1 + $4 | 0) + 27 | 0] + Math_imul($4, 255) | 0;\n    HEAP32[$3 + 12 >> 2] = $4;\n    $8 = dlmalloc($4 ? $4 : 1);\n    HEAP32[$3 + 8 >> 2] = $8;\n    if (!$8) {\n     HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n     break label$17;\n    }\n    $2 = $7;\n    if ($4) {\n     while (1) {\n      HEAP32[$7 + 12 >> 2] = $4;\n      $1 = 5;\n      label$24 : {\n       label$25 : {\n        switch (FUNCTION_TABLE[$5]($0, $8, $7 + 12 | 0, $6) | 0) {\n        case 1:\n         $1 = HEAP32[$7 + 12 >> 2];\n         if ($1) {\n          break label$24\n         }\n         $1 = 2;\n        default:\n         HEAP32[HEAP32[$0 >> 2] >> 2] = $1;\n         break label$17;\n        case 3:\n         break label$17;\n        case 0:\n         break label$25;\n        };\n       }\n       $1 = HEAP32[$7 + 12 >> 2];\n      }\n      $8 = $1 + $8 | 0;\n      $4 = $4 - $1 | 0;\n      if ($4) {\n       continue\n      }\n      break;\n     };\n     $1 = HEAP32[$3 >> 2];\n    }\n    HEAP32[$2 + 12 >> 2] = HEAPU8[$1 + 22 | 0] | HEAPU8[$1 + 23 | 0] << 8 | (HEAPU8[$1 + 24 | 0] << 16 | HEAPU8[$1 + 25 | 0] << 24);\n    ogg_page_checksum_set($3);\n    $1 = HEAP32[$3 >> 2];\n    if (HEAP32[$7 + 12 >> 2] == (HEAPU8[$1 + 22 | 0] | HEAPU8[$1 + 23 | 0] << 8 | (HEAPU8[$1 + 24 | 0] << 16 | HEAPU8[$1 + 25 | 0] << 24))) {\n     $9 = 1;\n     break label$1;\n    }\n    HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n   }\n  }\n  global$0 = $7 + 16 | 0;\n  return $9;\n }\n \n function simple_ogg_page__set_at($0, $1, $2, $3, $4, $5, $6) {\n  folding_inner0 : {\n   label$1 : {\n    if (!$4) {\n     break label$1\n    }\n    label$2 : {\n     switch (FUNCTION_TABLE[$4]($0, $1, $2, $6) | 0) {\n     case 1:\n      break folding_inner0;\n     case 0:\n      break label$2;\n     default:\n      break label$1;\n     };\n    }\n    ogg_page_checksum_set($3);\n    if (FUNCTION_TABLE[$5]($0, HEAP32[$3 >> 2], HEAP32[$3 + 4 >> 2], 0, 0, $6)) {\n     break folding_inner0\n    }\n    if (!FUNCTION_TABLE[$5]($0, HEAP32[$3 + 8 >> 2], HEAP32[$3 + 12 >> 2], 0, 0, $6)) {\n     return 1\n    }\n    HEAP32[HEAP32[$0 >> 2] >> 2] = 5;\n   }\n   return 0;\n  }\n  HEAP32[HEAP32[$0 >> 2] >> 2] = 5;\n  return 0;\n }\n \n function __emscripten_stdout_close($0) {\n  $0 = $0 | 0;\n  return 0;\n }\n \n function __emscripten_stdout_seek($0, $1, $2, $3) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  i64toi32_i32$HIGH_BITS = 0;\n  return 0;\n }\n \n function strcmp($0, $1) {\n  var $2 = 0, $3 = 0;\n  $2 = HEAPU8[$0 | 0];\n  $3 = HEAPU8[$1 | 0];\n  label$1 : {\n   if (!$2 | ($2 | 0) != ($3 | 0)) {\n    break label$1\n   }\n   while (1) {\n    $3 = HEAPU8[$1 + 1 | 0];\n    $2 = HEAPU8[$0 + 1 | 0];\n    if (!$2) {\n     break label$1\n    }\n    $1 = $1 + 1 | 0;\n    $0 = $0 + 1 | 0;\n    if (($2 | 0) == ($3 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n  return $2 - $3 | 0;\n }\n \n function __cos($0, $1) {\n  var $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0;\n  $2 = $0 * $0;\n  $3 = $2 * .5;\n  $4 = 1.0 - $3;\n  $5 = 1.0 - $4 - $3;\n  $3 = $2 * $2;\n  return $4 + ($5 + ($2 * ($2 * ($2 * ($2 * 2.480158728947673e-05 + -.001388888888887411) + .0416666666666666) + $3 * $3 * ($2 * ($2 * -1.1359647557788195e-11 + 2.087572321298175e-09) + -2.7557314351390663e-07)) - $0 * $1));\n }\n \n function scalbn($0, $1) {\n  label$1 : {\n   if (($1 | 0) >= 1024) {\n    $0 = $0 * 8988465674311579538646525.0e283;\n    if (($1 | 0) < 2047) {\n     $1 = $1 + -1023 | 0;\n     break label$1;\n    }\n    $0 = $0 * 8988465674311579538646525.0e283;\n    $1 = (($1 | 0) < 3069 ? $1 : 3069) + -2046 | 0;\n    break label$1;\n   }\n   if (($1 | 0) > -1023) {\n    break label$1\n   }\n   $0 = $0 * 2.2250738585072014e-308;\n   if (($1 | 0) > -2045) {\n    $1 = $1 + 1022 | 0;\n    break label$1;\n   }\n   $0 = $0 * 2.2250738585072014e-308;\n   $1 = (($1 | 0) > -3066 ? $1 : -3066) + 2044 | 0;\n  }\n  wasm2js_scratch_store_i32(0, 0);\n  wasm2js_scratch_store_i32(1, $1 + 1023 << 20);\n  return $0 * +wasm2js_scratch_load_f64();\n }\n \n function __rem_pio2_large($0, $1, $2, $3) {\n  var $4 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0;\n  $7 = global$0 - 560 | 0;\n  global$0 = $7;\n  $5 = ($2 + -3 | 0) / 24 | 0;\n  $16 = ($5 | 0) > 0 ? $5 : 0;\n  $10 = $2 + Math_imul($16, -24) | 0;\n  $12 = HEAP32[1901];\n  $9 = $3 + -1 | 0;\n  if (($12 + $9 | 0) >= 0) {\n   $5 = $3 + $12 | 0;\n   $2 = $16 - $9 | 0;\n   while (1) {\n    HEAPF64[($7 + 320 | 0) + ($6 << 3) >> 3] = ($2 | 0) < 0 ? 0.0 : +HEAP32[($2 << 2) + 7616 >> 2];\n    $2 = $2 + 1 | 0;\n    $6 = $6 + 1 | 0;\n    if (($5 | 0) != ($6 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n  $13 = $10 + -24 | 0;\n  $5 = 0;\n  $6 = ($12 | 0) > 0 ? $12 : 0;\n  $11 = ($3 | 0) < 1;\n  while (1) {\n   label$6 : {\n    if ($11) {\n     $4 = 0.0;\n     break label$6;\n    }\n    $8 = $5 + $9 | 0;\n    $2 = 0;\n    $4 = 0.0;\n    while (1) {\n     $4 = $4 + HEAPF64[($2 << 3) + $0 >> 3] * HEAPF64[($7 + 320 | 0) + ($8 - $2 << 3) >> 3];\n     $2 = $2 + 1 | 0;\n     if (($3 | 0) != ($2 | 0)) {\n      continue\n     }\n     break;\n    };\n   }\n   HEAPF64[($5 << 3) + $7 >> 3] = $4;\n   $2 = ($5 | 0) == ($6 | 0);\n   $5 = $5 + 1 | 0;\n   if (!$2) {\n    continue\n   }\n   break;\n  };\n  $20 = 47 - $10 | 0;\n  $17 = 48 - $10 | 0;\n  $21 = $10 + -25 | 0;\n  $5 = $12;\n  label$9 : {\n   while (1) {\n    $4 = HEAPF64[($5 << 3) + $7 >> 3];\n    $2 = 0;\n    $6 = $5;\n    $9 = ($5 | 0) < 1;\n    if (!$9) {\n     while (1) {\n      $11 = ($7 + 480 | 0) + ($2 << 2) | 0;\n      $14 = $4;\n      $4 = $4 * 5.9604644775390625e-08;\n      label$14 : {\n       if (Math_abs($4) < 2147483648.0) {\n        $8 = ~~$4;\n        break label$14;\n       }\n       $8 = -2147483648;\n      }\n      $4 = +($8 | 0);\n      $14 = $14 + $4 * -16777216.0;\n      label$13 : {\n       if (Math_abs($14) < 2147483648.0) {\n        $8 = ~~$14;\n        break label$13;\n       }\n       $8 = -2147483648;\n      }\n      HEAP32[$11 >> 2] = $8;\n      $6 = $6 + -1 | 0;\n      $4 = HEAPF64[($6 << 3) + $7 >> 3] + $4;\n      $2 = $2 + 1 | 0;\n      if (($5 | 0) != ($2 | 0)) {\n       continue\n      }\n      break;\n     }\n    }\n    $4 = scalbn($4, $13);\n    $4 = $4 + Math_floor($4 * .125) * -8.0;\n    label$17 : {\n     if (Math_abs($4) < 2147483648.0) {\n      $11 = ~~$4;\n      break label$17;\n     }\n     $11 = -2147483648;\n    }\n    $4 = $4 - +($11 | 0);\n    label$19 : {\n     label$20 : {\n      label$21 : {\n       $18 = ($13 | 0) < 1;\n       label$22 : {\n        if (!$18) {\n         $6 = (($5 << 2) + $7 | 0) + 476 | 0;\n         $8 = HEAP32[$6 >> 2];\n         $2 = $8 >> $17;\n         $15 = $6;\n         $6 = $8 - ($2 << $17) | 0;\n         HEAP32[$15 >> 2] = $6;\n         $11 = $2 + $11 | 0;\n         $8 = $6 >> $20;\n         break label$22;\n        }\n        if ($13) {\n         break label$21\n        }\n        $8 = HEAP32[(($5 << 2) + $7 | 0) + 476 >> 2] >> 23;\n       }\n       if (($8 | 0) < 1) {\n        break label$19\n       }\n       break label$20;\n      }\n      $8 = 2;\n      if (!!($4 >= .5)) {\n       break label$20\n      }\n      $8 = 0;\n      break label$19;\n     }\n     $2 = 0;\n     $6 = 0;\n     if (!$9) {\n      while (1) {\n       $15 = ($7 + 480 | 0) + ($2 << 2) | 0;\n       $19 = HEAP32[$15 >> 2];\n       $9 = 16777215;\n       label$26 : {\n        label$27 : {\n         if ($6) {\n          break label$27\n         }\n         $9 = 16777216;\n         if ($19) {\n          break label$27\n         }\n         $6 = 0;\n         break label$26;\n        }\n        HEAP32[$15 >> 2] = $9 - $19;\n        $6 = 1;\n       }\n       $2 = $2 + 1 | 0;\n       if (($5 | 0) != ($2 | 0)) {\n        continue\n       }\n       break;\n      }\n     }\n     label$28 : {\n      if ($18) {\n       break label$28\n      }\n      label$29 : {\n       switch ($21 | 0) {\n       case 0:\n        $2 = (($5 << 2) + $7 | 0) + 476 | 0;\n        HEAP32[$2 >> 2] = HEAP32[$2 >> 2] & 8388607;\n        break label$28;\n       case 1:\n        break label$29;\n       default:\n        break label$28;\n       };\n      }\n      $2 = (($5 << 2) + $7 | 0) + 476 | 0;\n      HEAP32[$2 >> 2] = HEAP32[$2 >> 2] & 4194303;\n     }\n     $11 = $11 + 1 | 0;\n     if (($8 | 0) != 2) {\n      break label$19\n     }\n     $4 = 1.0 - $4;\n     $8 = 2;\n     if (!$6) {\n      break label$19\n     }\n     $4 = $4 - scalbn(1.0, $13);\n    }\n    if ($4 == 0.0) {\n     $6 = 0;\n     label$32 : {\n      $2 = $5;\n      if (($2 | 0) <= ($12 | 0)) {\n       break label$32\n      }\n      while (1) {\n       $2 = $2 + -1 | 0;\n       $6 = HEAP32[($7 + 480 | 0) + ($2 << 2) >> 2] | $6;\n       if (($2 | 0) > ($12 | 0)) {\n        continue\n       }\n       break;\n      };\n      if (!$6) {\n       break label$32\n      }\n      $10 = $13;\n      while (1) {\n       $10 = $10 + -24 | 0;\n       $5 = $5 + -1 | 0;\n       if (!HEAP32[($7 + 480 | 0) + ($5 << 2) >> 2]) {\n        continue\n       }\n       break;\n      };\n      break label$9;\n     }\n     $2 = 1;\n     while (1) {\n      $6 = $2;\n      $2 = $2 + 1 | 0;\n      if (!HEAP32[($7 + 480 | 0) + ($12 - $6 << 2) >> 2]) {\n       continue\n      }\n      break;\n     };\n     $6 = $5 + $6 | 0;\n     while (1) {\n      $9 = $3 + $5 | 0;\n      $5 = $5 + 1 | 0;\n      HEAPF64[($7 + 320 | 0) + ($9 << 3) >> 3] = HEAP32[($16 + $5 << 2) + 7616 >> 2];\n      $2 = 0;\n      $4 = 0.0;\n      if (($3 | 0) >= 1) {\n       while (1) {\n        $4 = $4 + HEAPF64[($2 << 3) + $0 >> 3] * HEAPF64[($7 + 320 | 0) + ($9 - $2 << 3) >> 3];\n        $2 = $2 + 1 | 0;\n        if (($3 | 0) != ($2 | 0)) {\n         continue\n        }\n        break;\n       }\n      }\n      HEAPF64[($5 << 3) + $7 >> 3] = $4;\n      if (($5 | 0) < ($6 | 0)) {\n       continue\n      }\n      break;\n     };\n     $5 = $6;\n     continue;\n    }\n    break;\n   };\n   $4 = scalbn($4, 0 - $13 | 0);\n   label$39 : {\n    if (!!($4 >= 16777216.0)) {\n     $3 = ($7 + 480 | 0) + ($5 << 2) | 0;\n     $14 = $4;\n     $4 = $4 * 5.9604644775390625e-08;\n     label$42 : {\n      if (Math_abs($4) < 2147483648.0) {\n       $2 = ~~$4;\n       break label$42;\n      }\n      $2 = -2147483648;\n     }\n     $4 = $14 + +($2 | 0) * -16777216.0;\n     label$41 : {\n      if (Math_abs($4) < 2147483648.0) {\n       $0 = ~~$4;\n       break label$41;\n      }\n      $0 = -2147483648;\n     }\n     HEAP32[$3 >> 2] = $0;\n     $5 = $5 + 1 | 0;\n     break label$39;\n    }\n    $2 = Math_abs($4) < 2147483648.0 ? ~~$4 : -2147483648;\n    $10 = $13;\n   }\n   HEAP32[($7 + 480 | 0) + ($5 << 2) >> 2] = $2;\n  }\n  $4 = scalbn(1.0, $10);\n  label$47 : {\n   if (($5 | 0) <= -1) {\n    break label$47\n   }\n   $2 = $5;\n   while (1) {\n    HEAPF64[($2 << 3) + $7 >> 3] = $4 * +HEAP32[($7 + 480 | 0) + ($2 << 2) >> 2];\n    $4 = $4 * 5.9604644775390625e-08;\n    $0 = ($2 | 0) > 0;\n    $2 = $2 + -1 | 0;\n    if ($0) {\n     continue\n    }\n    break;\n   };\n   $9 = 0;\n   if (($5 | 0) < 0) {\n    break label$47\n   }\n   $0 = ($12 | 0) > 0 ? $12 : 0;\n   $6 = $5;\n   while (1) {\n    $3 = $0 >>> 0 < $9 >>> 0 ? $0 : $9;\n    $10 = $5 - $6 | 0;\n    $2 = 0;\n    $4 = 0.0;\n    while (1) {\n     $4 = $4 + HEAPF64[($2 << 3) + 10384 >> 3] * HEAPF64[($2 + $6 << 3) + $7 >> 3];\n     $13 = ($2 | 0) != ($3 | 0);\n     $2 = $2 + 1 | 0;\n     if ($13) {\n      continue\n     }\n     break;\n    };\n    HEAPF64[($7 + 160 | 0) + ($10 << 3) >> 3] = $4;\n    $6 = $6 + -1 | 0;\n    $2 = ($5 | 0) != ($9 | 0);\n    $9 = $9 + 1 | 0;\n    if ($2) {\n     continue\n    }\n    break;\n   };\n  }\n  $4 = 0.0;\n  if (($5 | 0) >= 0) {\n   $2 = $5;\n   while (1) {\n    $4 = $4 + HEAPF64[($7 + 160 | 0) + ($2 << 3) >> 3];\n    $0 = ($2 | 0) > 0;\n    $2 = $2 + -1 | 0;\n    if ($0) {\n     continue\n    }\n    break;\n   };\n  }\n  HEAPF64[$1 >> 3] = $8 ? -$4 : $4;\n  $4 = HEAPF64[$7 + 160 >> 3] - $4;\n  $2 = 1;\n  if (($5 | 0) >= 1) {\n   while (1) {\n    $4 = $4 + HEAPF64[($7 + 160 | 0) + ($2 << 3) >> 3];\n    $0 = ($2 | 0) != ($5 | 0);\n    $2 = $2 + 1 | 0;\n    if ($0) {\n     continue\n    }\n    break;\n   }\n  }\n  HEAPF64[$1 + 8 >> 3] = $8 ? -$4 : $4;\n  global$0 = $7 + 560 | 0;\n  return $11 & 7;\n }\n \n function __rem_pio2($0, $1) {\n  var $2 = 0.0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, $10 = 0;\n  $6 = global$0 - 48 | 0;\n  global$0 = $6;\n  wasm2js_scratch_store_f64(+$0);\n  $5 = wasm2js_scratch_load_i32(1) | 0;\n  $3 = wasm2js_scratch_load_i32(0) | 0;\n  label$1 : {\n   label$2 : {\n    $4 = $5;\n    $5 = $4;\n    $7 = $4 & 2147483647;\n    label$3 : {\n     if ($7 >>> 0 <= 1074752122) {\n      if (($5 & 1048575) == 598523) {\n       break label$3\n      }\n      if ($7 >>> 0 <= 1073928572) {\n       if (($4 | 0) > 0 ? 1 : ($4 | 0) >= 0 ? ($3 >>> 0 < 0 ? 0 : 1) : 0) {\n        $0 = $0 + -1.5707963267341256;\n        $2 = $0 + -6.077100506506192e-11;\n        HEAPF64[$1 >> 3] = $2;\n        HEAPF64[$1 + 8 >> 3] = $0 - $2 + -6.077100506506192e-11;\n        $3 = 1;\n        break label$1;\n       }\n       $0 = $0 + 1.5707963267341256;\n       $2 = $0 + 6.077100506506192e-11;\n       HEAPF64[$1 >> 3] = $2;\n       HEAPF64[$1 + 8 >> 3] = $0 - $2 + 6.077100506506192e-11;\n       $3 = -1;\n       break label$1;\n      }\n      if (($4 | 0) > 0 ? 1 : ($4 | 0) >= 0 ? ($3 >>> 0 < 0 ? 0 : 1) : 0) {\n       $0 = $0 + -3.1415926534682512;\n       $2 = $0 + -1.2154201013012384e-10;\n       HEAPF64[$1 >> 3] = $2;\n       HEAPF64[$1 + 8 >> 3] = $0 - $2 + -1.2154201013012384e-10;\n       $3 = 2;\n       break label$1;\n      }\n      $0 = $0 + 3.1415926534682512;\n      $2 = $0 + 1.2154201013012384e-10;\n      HEAPF64[$1 >> 3] = $2;\n      HEAPF64[$1 + 8 >> 3] = $0 - $2 + 1.2154201013012384e-10;\n      $3 = -2;\n      break label$1;\n     }\n     if ($7 >>> 0 <= 1075594811) {\n      if ($7 >>> 0 <= 1075183036) {\n       if (($7 | 0) == 1074977148) {\n        break label$3\n       }\n       if (($4 | 0) > 0 ? 1 : ($4 | 0) >= 0 ? ($3 >>> 0 < 0 ? 0 : 1) : 0) {\n        $0 = $0 + -4.712388980202377;\n        $2 = $0 + -1.8231301519518578e-10;\n        HEAPF64[$1 >> 3] = $2;\n        HEAPF64[$1 + 8 >> 3] = $0 - $2 + -1.8231301519518578e-10;\n        $3 = 3;\n        break label$1;\n       }\n       $0 = $0 + 4.712388980202377;\n       $2 = $0 + 1.8231301519518578e-10;\n       HEAPF64[$1 >> 3] = $2;\n       HEAPF64[$1 + 8 >> 3] = $0 - $2 + 1.8231301519518578e-10;\n       $3 = -3;\n       break label$1;\n      }\n      if (($7 | 0) == 1075388923) {\n       break label$3\n      }\n      if (($4 | 0) > 0 ? 1 : ($4 | 0) >= 0 ? ($3 >>> 0 < 0 ? 0 : 1) : 0) {\n       $0 = $0 + -6.2831853069365025;\n       $2 = $0 + -2.430840202602477e-10;\n       HEAPF64[$1 >> 3] = $2;\n       HEAPF64[$1 + 8 >> 3] = $0 - $2 + -2.430840202602477e-10;\n       $3 = 4;\n       break label$1;\n      }\n      $0 = $0 + 6.2831853069365025;\n      $2 = $0 + 2.430840202602477e-10;\n      HEAPF64[$1 >> 3] = $2;\n      HEAPF64[$1 + 8 >> 3] = $0 - $2 + 2.430840202602477e-10;\n      $3 = -4;\n      break label$1;\n     }\n     if ($7 >>> 0 > 1094263290) {\n      break label$2\n     }\n    }\n    $9 = $0 * .6366197723675814 + 6755399441055744.0 + -6755399441055744.0;\n    $2 = $0 + $9 * -1.5707963267341256;\n    $8 = $9 * 6.077100506506192e-11;\n    $0 = $2 - $8;\n    HEAPF64[$1 >> 3] = $0;\n    wasm2js_scratch_store_f64(+$0);\n    $3 = wasm2js_scratch_load_i32(1) | 0;\n    wasm2js_scratch_load_i32(0) | 0;\n    $4 = $7 >>> 20 | 0;\n    $5 = ($4 - ($3 >>> 20 & 2047) | 0) < 17;\n    if (Math_abs($9) < 2147483648.0) {\n     $3 = ~~$9\n    } else {\n     $3 = -2147483648\n    }\n    label$14 : {\n     if ($5) {\n      break label$14\n     }\n     $8 = $2;\n     $0 = $9 * 6.077100506303966e-11;\n     $2 = $2 - $0;\n     $8 = $9 * 2.0222662487959506e-21 - ($8 - $2 - $0);\n     $0 = $2 - $8;\n     HEAPF64[$1 >> 3] = $0;\n     $5 = $4;\n     wasm2js_scratch_store_f64(+$0);\n     $4 = wasm2js_scratch_load_i32(1) | 0;\n     wasm2js_scratch_load_i32(0) | 0;\n     if (($5 - ($4 >>> 20 & 2047) | 0) < 50) {\n      break label$14\n     }\n     $8 = $2;\n     $0 = $9 * 2.0222662487111665e-21;\n     $2 = $2 - $0;\n     $8 = $9 * 8.4784276603689e-32 - ($8 - $2 - $0);\n     $0 = $2 - $8;\n     HEAPF64[$1 >> 3] = $0;\n    }\n    HEAPF64[$1 + 8 >> 3] = $2 - $0 - $8;\n    break label$1;\n   }\n   if ($7 >>> 0 >= 2146435072) {\n    $0 = $0 - $0;\n    HEAPF64[$1 >> 3] = $0;\n    HEAPF64[$1 + 8 >> 3] = $0;\n    $3 = 0;\n    break label$1;\n   }\n   wasm2js_scratch_store_i32(0, $3 | 0);\n   wasm2js_scratch_store_i32(1, $4 & 1048575 | 1096810496);\n   $0 = +wasm2js_scratch_load_f64();\n   $3 = 0;\n   $5 = 1;\n   while (1) {\n    $10 = ($6 + 16 | 0) + ($3 << 3) | 0;\n    if (Math_abs($0) < 2147483648.0) {\n     $3 = ~~$0\n    } else {\n     $3 = -2147483648\n    }\n    $2 = +($3 | 0);\n    HEAPF64[$10 >> 3] = $2;\n    $0 = ($0 - $2) * 16777216.0;\n    $3 = 1;\n    $10 = $5 & 1;\n    $5 = 0;\n    if ($10) {\n     continue\n    }\n    break;\n   };\n   HEAPF64[$6 + 32 >> 3] = $0;\n   label$20 : {\n    if ($0 != 0.0) {\n     $3 = 2;\n     break label$20;\n    }\n    $5 = 1;\n    while (1) {\n     $3 = $5;\n     $5 = $3 + -1 | 0;\n     if (HEAPF64[($6 + 16 | 0) + ($3 << 3) >> 3] == 0.0) {\n      continue\n     }\n     break;\n    };\n   }\n   $3 = __rem_pio2_large($6 + 16 | 0, $6, ($7 >>> 20 | 0) + -1046 | 0, $3 + 1 | 0);\n   $0 = HEAPF64[$6 >> 3];\n   if (($4 | 0) < -1 ? 1 : ($4 | 0) <= -1 ? 1 : 0) {\n    HEAPF64[$1 >> 3] = -$0;\n    HEAPF64[$1 + 8 >> 3] = -HEAPF64[$6 + 8 >> 3];\n    $3 = 0 - $3 | 0;\n    break label$1;\n   }\n   HEAPF64[$1 >> 3] = $0;\n   $4 = HEAP32[$6 + 12 >> 2];\n   HEAP32[$1 + 8 >> 2] = HEAP32[$6 + 8 >> 2];\n   HEAP32[$1 + 12 >> 2] = $4;\n  }\n  global$0 = $6 + 48 | 0;\n  return $3;\n }\n \n function __sin($0, $1) {\n  var $2 = 0.0, $3 = 0.0;\n  $2 = $0 * $0;\n  $3 = $0;\n  $0 = $2 * $0;\n  return $3 - ($2 * ($1 * .5 - $0 * ($2 * ($2 * $2) * ($2 * 1.58969099521155e-10 + -2.5050760253406863e-08) + ($2 * ($2 * 2.7557313707070068e-06 + -1.984126982985795e-04) + .00833333333332249))) - $1 + $0 * .16666666666666632);\n }\n \n function cos($0) {\n  var $1 = 0, $2 = 0.0, $3 = 0;\n  $1 = global$0 - 16 | 0;\n  global$0 = $1;\n  wasm2js_scratch_store_f64(+$0);\n  $3 = wasm2js_scratch_load_i32(1) | 0;\n  wasm2js_scratch_load_i32(0) | 0;\n  $3 = $3 & 2147483647;\n  label$1 : {\n   if ($3 >>> 0 <= 1072243195) {\n    $2 = 1.0;\n    if ($3 >>> 0 < 1044816030) {\n     break label$1\n    }\n    $2 = __cos($0, 0.0);\n    break label$1;\n   }\n   $2 = $0 - $0;\n   if ($3 >>> 0 >= 2146435072) {\n    break label$1\n   }\n   label$3 : {\n    switch (__rem_pio2($0, $1) & 3) {\n    case 0:\n     $2 = __cos(HEAPF64[$1 >> 3], HEAPF64[$1 + 8 >> 3]);\n     break label$1;\n    case 1:\n     $2 = -__sin(HEAPF64[$1 >> 3], HEAPF64[$1 + 8 >> 3]);\n     break label$1;\n    case 2:\n     $2 = -__cos(HEAPF64[$1 >> 3], HEAPF64[$1 + 8 >> 3]);\n     break label$1;\n    default:\n     break label$3;\n    };\n   }\n   $2 = __sin(HEAPF64[$1 >> 3], HEAPF64[$1 + 8 >> 3]);\n  }\n  $0 = $2;\n  global$0 = $1 + 16 | 0;\n  return $0;\n }\n \n function exp($0) {\n  var $1 = 0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0;\n  wasm2js_scratch_store_f64(+$0);\n  $3 = wasm2js_scratch_load_i32(1) | 0;\n  $7 = wasm2js_scratch_load_i32(0) | 0;\n  $5 = $3 >>> 31 | 0;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     label$4 : {\n      $6 = $0;\n      label$5 : {\n       label$6 : {\n        $1 = $3;\n        $3 = $1 & 2147483647;\n        label$7 : {\n         if ($3 >>> 0 >= 1082532651) {\n          $1 = $1 & 2147483647;\n          if (($1 | 0) == 2146435072 & $7 >>> 0 > 0 | $1 >>> 0 > 2146435072) {\n           return $0\n          }\n          if (!!($0 > 709.782712893384)) {\n           return $0 * 8988465674311579538646525.0e283\n          }\n          if (!($0 < -708.3964185322641)) {\n           break label$7\n          }\n          if (!($0 < -745.1332191019411)) {\n           break label$7\n          }\n          break label$2;\n         }\n         if ($3 >>> 0 < 1071001155) {\n          break label$4\n         }\n         if ($3 >>> 0 < 1072734898) {\n          break label$6\n         }\n        }\n        $0 = $0 * 1.4426950408889634 + HEAPF64[($5 << 3) + 10448 >> 3];\n        if (Math_abs($0) < 2147483648.0) {\n         $1 = ~~$0;\n         break label$5;\n        }\n        $1 = -2147483648;\n        break label$5;\n       }\n       $1 = ($5 ^ 1) - $5 | 0;\n      }\n      $2 = +($1 | 0);\n      $0 = $6 + $2 * -.6931471803691238;\n      $4 = $2 * 1.9082149292705877e-10;\n      $2 = $0 - $4;\n      break label$3;\n     }\n     if ($3 >>> 0 <= 1043333120) {\n      break label$1\n     }\n     $1 = 0;\n     $2 = $0;\n    }\n    $6 = $0;\n    $0 = $2 * $2;\n    $0 = $2 - $0 * ($0 * ($0 * ($0 * ($0 * 4.1381367970572385e-08 + -1.6533902205465252e-06) + 6.613756321437934e-05) + -2.7777777777015593e-03) + .16666666666666602);\n    $4 = $6 + ($2 * $0 / (2.0 - $0) - $4) + 1.0;\n    if (!$1) {\n     break label$2\n    }\n    $4 = scalbn($4, $1);\n   }\n   return $4;\n  }\n  return $0 + 1.0;\n }\n \n function FLAC__window_bartlett($0, $1) {\n  var $2 = 0, $3 = Math_fround(0), $4 = 0, $5 = Math_fround(0), $6 = 0, $7 = 0, $8 = 0;\n  $7 = $1 + -1 | 0;\n  label$1 : {\n   if ($1 & 1) {\n    $4 = ($7 | 0) / 2 | 0;\n    if (($1 | 0) >= 0) {\n     $8 = ($4 | 0) > 0 ? $4 : 0;\n     $6 = $8 + 1 | 0;\n     $5 = Math_fround($7 | 0);\n     while (1) {\n      $3 = Math_fround($2 | 0);\n      HEAPF32[($2 << 2) + $0 >> 2] = Math_fround($3 + $3) / $5;\n      $4 = ($2 | 0) == ($8 | 0);\n      $2 = $2 + 1 | 0;\n      if (!$4) {\n       continue\n      }\n      break;\n     };\n    }\n    if (($6 | 0) >= ($1 | 0)) {\n     break label$1\n    }\n    $5 = Math_fround($7 | 0);\n    while (1) {\n     $3 = Math_fround($6 | 0);\n     HEAPF32[($6 << 2) + $0 >> 2] = Math_fround(2.0) - Math_fround(Math_fround($3 + $3) / $5);\n     $6 = $6 + 1 | 0;\n     if (($6 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   $4 = ($1 | 0) / 2 | 0;\n   if (($1 | 0) >= 2) {\n    $5 = Math_fround($7 | 0);\n    while (1) {\n     $3 = Math_fround($2 | 0);\n     HEAPF32[($2 << 2) + $0 >> 2] = Math_fround($3 + $3) / $5;\n     $2 = $2 + 1 | 0;\n     if (($4 | 0) != ($2 | 0)) {\n      continue\n     }\n     break;\n    };\n    $2 = $4;\n   }\n   if (($2 | 0) >= ($1 | 0)) {\n    break label$1\n   }\n   $5 = Math_fround($7 | 0);\n   while (1) {\n    $3 = Math_fround($2 | 0);\n    HEAPF32[($2 << 2) + $0 >> 2] = Math_fround(2.0) - Math_fround(Math_fround($3 + $3) / $5);\n    $2 = $2 + 1 | 0;\n    if (($2 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__window_bartlett_hann($0, $1) {\n  var $2 = 0, $3 = Math_fround(0), $4 = Math_fround(0), wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);\n  if (($1 | 0) >= 1) {\n   $4 = Math_fround($1 + -1 | 0);\n   while (1) {\n    $3 = Math_fround(Math_fround($2 | 0) / $4);\n    (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(+Math_fround(Math_abs(Math_fround($3 + Math_fround(-.5)))) * -.47999998927116394 + .6200000047683716 + cos(+$3 * 6.283185307179586) * -.3799999952316284)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $2 = $2 + 1 | 0;\n    if (($2 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__window_blackman($0, $1) {\n  var $2 = 0, $3 = 0.0, $4 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);\n  if (($1 | 0) >= 1) {\n   $3 = +($1 + -1 | 0);\n   while (1) {\n    $4 = +($2 | 0);\n    (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos($4 * 12.566370614359172 / $3) * .07999999821186066 + (cos($4 * 6.283185307179586 / $3) * -.5 + .41999998688697815))), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $2 = $2 + 1 | 0;\n    if (($2 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__window_blackman_harris_4term_92db_sidelobe($0, $1) {\n  var $2 = 0, $3 = 0.0, $4 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);\n  if (($1 | 0) >= 1) {\n   $3 = +($1 + -1 | 0);\n   while (1) {\n    $4 = +($2 | 0);\n    (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos($4 * 12.566370614359172 / $3) * .14127999544143677 + (cos($4 * 6.283185307179586 / $3) * -.488290011882782 + .35874998569488525) + cos($4 * 18.84955592153876 / $3) * -.011680000461637974)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $2 = $2 + 1 | 0;\n    if (($2 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__window_connes($0, $1) {\n  var $2 = 0.0, $3 = 0, $4 = 0.0;\n  if (($1 | 0) >= 1) {\n   $4 = +($1 + -1 | 0) * .5;\n   while (1) {\n    $2 = (+($3 | 0) - $4) / $4;\n    $2 = 1.0 - $2 * $2;\n    HEAPF32[($3 << 2) + $0 >> 2] = $2 * $2;\n    $3 = $3 + 1 | 0;\n    if (($3 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__window_flattop($0, $1) {\n  var $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);\n  if (($1 | 0) >= 1) {\n   $2 = +($1 + -1 | 0);\n   while (1) {\n    $4 = +($3 | 0);\n    $5 = cos($4 * 12.566370614359172 / $2);\n    $6 = cos($4 * 6.283185307179586 / $2);\n    $7 = cos($4 * 18.84955592153876 / $2);\n    (wasm2js_i32$0 = ($3 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos($4 * 25.132741228718345 / $2) * 6.9473679177463055e-03 + ($5 * .27726316452026367 + ($6 * -.4166315793991089 + .21557894349098206) + $7 * -.08357894420623779))), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $3 = $3 + 1 | 0;\n    if (($3 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__window_gauss($0, $1, $2) {\n  var $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);\n  if (($1 | 0) >= 1) {\n   $4 = +($1 + -1 | 0) * .5;\n   $6 = $4 * +$2;\n   while (1) {\n    $5 = (+($3 | 0) - $4) / $6;\n    (wasm2js_i32$0 = ($3 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(exp($5 * ($5 * -.5)))), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $3 = $3 + 1 | 0;\n    if (($3 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__window_hamming($0, $1) {\n  var $2 = 0, $3 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);\n  if (($1 | 0) >= 1) {\n   $3 = +($1 + -1 | 0);\n   while (1) {\n    (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos(+($2 | 0) * 6.283185307179586 / $3) * -.46000000834465027 + .5400000214576721)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $2 = $2 + 1 | 0;\n    if (($2 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__window_hann($0, $1) {\n  var $2 = 0, $3 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);\n  if (($1 | 0) >= 1) {\n   $3 = +($1 + -1 | 0);\n   while (1) {\n    (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($2 | 0) * 6.283185307179586 / $3) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $2 = $2 + 1 | 0;\n    if (($2 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__window_kaiser_bessel($0, $1) {\n  var $2 = 0, $3 = 0.0, $4 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);\n  if (($1 | 0) >= 1) {\n   $3 = +($1 + -1 | 0);\n   while (1) {\n    $4 = +($2 | 0);\n    (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos($4 * 12.566370614359172 / $3) * .09799999743700027 + (cos($4 * 6.283185307179586 / $3) * -.49799999594688416 + .4020000100135803) + cos($4 * 18.84955592153876 / $3) * -1.0000000474974513e-03)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $2 = $2 + 1 | 0;\n    if (($2 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__window_nuttall($0, $1) {\n  var $2 = 0, $3 = 0.0, $4 = 0.0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);\n  if (($1 | 0) >= 1) {\n   $3 = +($1 + -1 | 0);\n   while (1) {\n    $4 = +($2 | 0);\n    (wasm2js_i32$0 = ($2 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(cos($4 * 12.566370614359172 / $3) * .13659949600696564 + (cos($4 * 6.283185307179586 / $3) * -.48917749524116516 + .36358189582824707) + cos($4 * 18.84955592153876 / $3) * -.010641099885106087)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $2 = $2 + 1 | 0;\n    if (($2 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__window_rectangle($0, $1) {\n  var $2 = 0;\n  if (($1 | 0) >= 1) {\n   while (1) {\n    HEAP32[($2 << 2) + $0 >> 2] = 1065353216;\n    $2 = $2 + 1 | 0;\n    if (($2 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   }\n  }\n }\n \n function FLAC__window_triangle($0, $1) {\n  var $2 = 0, $3 = 0, $4 = Math_fround(0), $5 = 0, $6 = Math_fround(0), $7 = 0;\n  $3 = 1;\n  label$1 : {\n   if ($1 & 1) {\n    $2 = ($1 + 1 | 0) / 2 | 0;\n    if (($1 | 0) >= 1) {\n     $4 = Math_fround(Math_fround($1 | 0) + Math_fround(1.0));\n     $5 = ($2 | 0) > 1 ? $2 : 1;\n     $3 = $5 + 1 | 0;\n     $2 = 1;\n     while (1) {\n      $6 = Math_fround($2 | 0);\n      HEAPF32[(($2 << 2) + $0 | 0) + -4 >> 2] = Math_fround($6 + $6) / $4;\n      $7 = ($2 | 0) == ($5 | 0);\n      $2 = $2 + 1 | 0;\n      if (!$7) {\n       continue\n      }\n      break;\n     };\n    }\n    if (($3 | 0) > ($1 | 0)) {\n     break label$1\n    }\n    $4 = Math_fround(Math_fround($1 | 0) + Math_fround(1.0));\n    while (1) {\n     HEAPF32[(($3 << 2) + $0 | 0) + -4 >> 2] = Math_fround(($1 - $3 << 1) + 2 | 0) / $4;\n     $2 = ($1 | 0) == ($3 | 0);\n     $3 = $3 + 1 | 0;\n     if (!$2) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   $2 = 1;\n   if (($1 | 0) >= 2) {\n    $5 = $1 >>> 1 | 0;\n    $2 = $5 + 1 | 0;\n    $4 = Math_fround(Math_fround($1 | 0) + Math_fround(1.0));\n    while (1) {\n     $6 = Math_fround($3 | 0);\n     HEAPF32[(($3 << 2) + $0 | 0) + -4 >> 2] = Math_fround($6 + $6) / $4;\n     $7 = ($3 | 0) == ($5 | 0);\n     $3 = $3 + 1 | 0;\n     if (!$7) {\n      continue\n     }\n     break;\n    };\n   }\n   if (($2 | 0) > ($1 | 0)) {\n    break label$1\n   }\n   $4 = Math_fround(Math_fround($1 | 0) + Math_fround(1.0));\n   while (1) {\n    HEAPF32[(($2 << 2) + $0 | 0) + -4 >> 2] = Math_fround(($1 - $2 << 1) + 2 | 0) / $4;\n    $3 = ($1 | 0) != ($2 | 0);\n    $2 = $2 + 1 | 0;\n    if ($3) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__window_tukey($0, $1, $2) {\n  var $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);\n  label$1 : {\n   if (!!($2 <= Math_fround(0.0))) {\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    while (1) {\n     HEAP32[($3 << 2) + $0 >> 2] = 1065353216;\n     $3 = $3 + 1 | 0;\n     if (($3 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   if (!!($2 >= Math_fround(1.0))) {\n    if (($1 | 0) < 1) {\n     break label$1\n    }\n    $5 = +($1 + -1 | 0);\n    while (1) {\n     (wasm2js_i32$0 = ($3 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($3 | 0) * 6.283185307179586 / $5) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n     $3 = $3 + 1 | 0;\n     if (($3 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   $2 = Math_fround(Math_fround($2 * Math_fround(.5)) * Math_fround($1 | 0));\n   label$6 : {\n    if (Math_fround(Math_abs($2)) < Math_fround(2147483648.0)) {\n     $4 = ~~$2;\n     break label$6;\n    }\n    $4 = -2147483648;\n   }\n   if (($1 | 0) >= 1) {\n    while (1) {\n     HEAP32[($3 << 2) + $0 >> 2] = 1065353216;\n     $3 = $3 + 1 | 0;\n     if (($3 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    }\n   }\n   if (($4 | 0) < 2) {\n    break label$1\n   }\n   $1 = $1 - $4 | 0;\n   $6 = $4 + -1 | 0;\n   $5 = +($6 | 0);\n   $3 = 0;\n   while (1) {\n    (wasm2js_i32$0 = ($3 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($3 | 0) * 3.141592653589793 / $5) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    (wasm2js_i32$0 = ($1 + $3 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($3 + $6 | 0) * 3.141592653589793 / $5) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $3 = $3 + 1 | 0;\n    if (($4 | 0) != ($3 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__window_partial_tukey($0, $1, $2, $3, $4) {\n  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = Math_fround(0), $12 = 0.0, $13 = 0, wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);\n  while (1) {\n   $11 = $2;\n   $2 = Math_fround(.05000000074505806);\n   if ($11 <= Math_fround(0.0)) {\n    continue\n   }\n   $2 = Math_fround(.949999988079071);\n   if ($11 >= Math_fround(1.0)) {\n    continue\n   }\n   break;\n  };\n  $2 = Math_fround($1 | 0);\n  $3 = Math_fround($2 * $3);\n  label$2 : {\n   if (Math_fround(Math_abs($3)) < Math_fround(2147483648.0)) {\n    $6 = ~~$3;\n    break label$2;\n   }\n   $6 = -2147483648;\n  }\n  $3 = Math_fround($11 * Math_fround(.5));\n  $2 = Math_fround($2 * $4);\n  label$5 : {\n   if (Math_fround(Math_abs($2)) < Math_fround(2147483648.0)) {\n    $10 = ~~$2;\n    break label$5;\n   }\n   $10 = -2147483648;\n  }\n  $2 = Math_fround($3 * Math_fround($10 - $6 | 0));\n  label$4 : {\n   if (Math_fround(Math_abs($2)) < Math_fround(2147483648.0)) {\n    $7 = ~~$2;\n    break label$4;\n   }\n   $7 = -2147483648;\n  }\n  if (!(($6 | 0) < 1 | ($1 | 0) < 1)) {\n   $5 = $6 + -1 | 0;\n   $8 = $1 + -1 | 0;\n   $8 = $5 >>> 0 < $8 >>> 0 ? $5 : $8;\n   memset($0, ($8 << 2) + 4 | 0);\n   $5 = $8 + 1 | 0;\n   while (1) {\n    $13 = ($9 | 0) == ($8 | 0);\n    $9 = $9 + 1 | 0;\n    if (!$13) {\n     continue\n    }\n    break;\n   };\n  }\n  $6 = $6 + $7 | 0;\n  label$10 : {\n   if (($5 | 0) >= ($6 | 0) | ($5 | 0) >= ($1 | 0)) {\n    break label$10\n   }\n   $12 = +($7 | 0);\n   $9 = 1;\n   while (1) {\n    (wasm2js_i32$0 = ($5 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($9 | 0) * 3.141592653589793 / $12) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $5 = $5 + 1 | 0;\n    if (($5 | 0) >= ($6 | 0)) {\n     break label$10\n    }\n    $9 = $9 + 1 | 0;\n    if (($5 | 0) < ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n  $6 = $10 - $7 | 0;\n  label$12 : {\n   if (($5 | 0) >= ($6 | 0) | ($5 | 0) >= ($1 | 0)) {\n    break label$12\n   }\n   while (1) {\n    HEAP32[($5 << 2) + $0 >> 2] = 1065353216;\n    $5 = $5 + 1 | 0;\n    if (($5 | 0) >= ($6 | 0)) {\n     break label$12\n    }\n    if (($5 | 0) < ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n  label$14 : {\n   if (($5 | 0) >= ($10 | 0) | ($5 | 0) >= ($1 | 0)) {\n    break label$14\n   }\n   $12 = +($7 | 0);\n   while (1) {\n    (wasm2js_i32$0 = ($5 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($7 | 0) * 3.141592653589793 / $12) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $5 = $5 + 1 | 0;\n    if (($5 | 0) >= ($10 | 0)) {\n     break label$14\n    }\n    $7 = $7 + -1 | 0;\n    if (($5 | 0) < ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n  if (($5 | 0) < ($1 | 0)) {\n   memset(($5 << 2) + $0 | 0, $1 - $5 << 2)\n  }\n }\n \n function FLAC__window_punchout_tukey($0, $1, $2, $3, $4) {\n  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0.0, $12 = Math_fround(0), $13 = 0, $14 = Math_fround(0), wasm2js_i32$0 = 0, wasm2js_f32$0 = Math_fround(0);\n  while (1) {\n   $12 = $2;\n   $2 = Math_fround(.05000000074505806);\n   if ($12 <= Math_fround(0.0)) {\n    continue\n   }\n   $2 = Math_fround(.949999988079071);\n   if ($12 >= Math_fround(1.0)) {\n    continue\n   }\n   break;\n  };\n  $2 = Math_fround($12 * Math_fround(.5));\n  $14 = $2;\n  $12 = Math_fround($1 | 0);\n  $3 = Math_fround($12 * $3);\n  label$3 : {\n   if (Math_fround(Math_abs($3)) < Math_fround(2147483648.0)) {\n    $10 = ~~$3;\n    break label$3;\n   }\n   $10 = -2147483648;\n  }\n  $3 = Math_fround($14 * Math_fround($10 | 0));\n  label$2 : {\n   if (Math_fround(Math_abs($3)) < Math_fround(2147483648.0)) {\n    $6 = ~~$3;\n    break label$2;\n   }\n   $6 = -2147483648;\n  }\n  $8 = ($6 | 0) < 1;\n  $7 = $1;\n  $3 = Math_fround($12 * $4);\n  label$7 : {\n   if (Math_fround(Math_abs($3)) < Math_fround(2147483648.0)) {\n    $9 = ~~$3;\n    break label$7;\n   }\n   $9 = -2147483648;\n  }\n  $2 = Math_fround($2 * Math_fround($7 - $9 | 0));\n  label$6 : {\n   if (Math_fround(Math_abs($2)) < Math_fround(2147483648.0)) {\n    $7 = ~~$2;\n    break label$6;\n   }\n   $7 = -2147483648;\n  }\n  if (!(($1 | 0) < 1 | $8)) {\n   $5 = $6 + -1 >>> 0 < $1 + -1 >>> 0 ? $6 : $1;\n   $11 = +($6 | 0);\n   $8 = 0;\n   $13 = 1;\n   while (1) {\n    (wasm2js_i32$0 = ($8 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($13 | 0) * 3.141592653589793 / $11) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $13 = $13 + 1 | 0;\n    $8 = $8 + 1 | 0;\n    if (($8 | 0) != ($5 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n  $8 = $10 - $6 | 0;\n  label$12 : {\n   if (($5 | 0) >= ($8 | 0) | ($5 | 0) >= ($1 | 0)) {\n    break label$12\n   }\n   while (1) {\n    HEAP32[($5 << 2) + $0 >> 2] = 1065353216;\n    $5 = $5 + 1 | 0;\n    if (($5 | 0) >= ($8 | 0)) {\n     break label$12\n    }\n    if (($5 | 0) < ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n  label$14 : {\n   if (($5 | 0) >= ($10 | 0) | ($5 | 0) >= ($1 | 0)) {\n    break label$14\n   }\n   $11 = +($6 | 0);\n   while (1) {\n    (wasm2js_i32$0 = ($5 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($6 | 0) * 3.141592653589793 / $11) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $5 = $5 + 1 | 0;\n    if (($5 | 0) >= ($10 | 0)) {\n     break label$14\n    }\n    $6 = $6 + -1 | 0;\n    if (($5 | 0) < ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n  label$16 : {\n   if (($5 | 0) >= ($9 | 0) | ($5 | 0) >= ($1 | 0)) {\n    break label$16\n   }\n   $6 = $5 ^ -1;\n   $10 = $6 + $9 | 0;\n   $6 = $1 + $6 | 0;\n   memset(($5 << 2) + $0 | 0, (($10 >>> 0 < $6 >>> 0 ? $10 : $6) << 2) + 4 | 0);\n   while (1) {\n    $5 = $5 + 1 | 0;\n    if (($5 | 0) >= ($9 | 0)) {\n     break label$16\n    }\n    if (($5 | 0) < ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n  $9 = $7 + $9 | 0;\n  label$18 : {\n   if (($5 | 0) >= ($9 | 0) | ($5 | 0) >= ($1 | 0)) {\n    break label$18\n   }\n   $11 = +($7 | 0);\n   $6 = 1;\n   while (1) {\n    (wasm2js_i32$0 = ($5 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($6 | 0) * 3.141592653589793 / $11) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $5 = $5 + 1 | 0;\n    if (($5 | 0) >= ($9 | 0)) {\n     break label$18\n    }\n    $6 = $6 + 1 | 0;\n    if (($5 | 0) < ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n  $6 = $1 - $7 | 0;\n  label$20 : {\n   if (($5 | 0) >= ($6 | 0) | ($5 | 0) >= ($1 | 0)) {\n    break label$20\n   }\n   while (1) {\n    HEAP32[($5 << 2) + $0 >> 2] = 1065353216;\n    $5 = $5 + 1 | 0;\n    if (($5 | 0) >= ($6 | 0)) {\n     break label$20\n    }\n    if (($5 | 0) < ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n  if (($5 | 0) < ($1 | 0)) {\n   $11 = +($7 | 0);\n   while (1) {\n    (wasm2js_i32$0 = ($5 << 2) + $0 | 0, wasm2js_f32$0 = Math_fround(.5 - cos(+($7 | 0) * 3.141592653589793 / $11) * .5)), HEAPF32[wasm2js_i32$0 >> 2] = wasm2js_f32$0;\n    $7 = $7 + -1 | 0;\n    $5 = $5 + 1 | 0;\n    if (($5 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__window_welch($0, $1) {\n  var $2 = 0, $3 = 0.0, $4 = 0.0;\n  if (($1 | 0) >= 1) {\n   $3 = +($1 + -1 | 0) * .5;\n   while (1) {\n    $4 = (+($2 | 0) - $3) / $3;\n    HEAPF32[($2 << 2) + $0 >> 2] = 1.0 - $4 * $4;\n    $2 = $2 + 1 | 0;\n    if (($2 | 0) != ($1 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function FLAC__add_metadata_block($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0;\n  $3 = strlen(HEAP32[2720]);\n  label$1 : {\n   if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 4 >> 2], HEAP32[1391])) {\n    break label$1\n   }\n   if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 >> 2], HEAP32[1392])) {\n    break label$1\n   }\n   $2 = HEAP32[$0 + 8 >> 2];\n   $2 = HEAP32[$0 >> 2] == 4 ? ($2 + $3 | 0) - HEAP32[$0 + 16 >> 2] | 0 : $2;\n   $4 = HEAP32[1393];\n   if ($2 >>> $4) {\n    break label$1\n   }\n   if (!FLAC__bitwriter_write_raw_uint32($1, $2, $4)) {\n    break label$1\n   }\n   label$3 : {\n    label$4 : {\n     label$5 : {\n      label$6 : {\n       label$7 : {\n        label$8 : {\n         label$9 : {\n          switch (HEAP32[$0 >> 2]) {\n          case 3:\n           if (!HEAP32[$0 + 16 >> 2]) {\n            break label$3\n           }\n           $4 = HEAP32[1367];\n           $6 = HEAP32[1366];\n           $7 = HEAP32[1365];\n           $2 = 0;\n           break label$8;\n          case 0:\n           if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 16 >> 2], HEAP32[1356])) {\n            break label$1\n           }\n           if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 20 >> 2], HEAP32[1357])) {\n            break label$1\n           }\n           if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 24 >> 2], HEAP32[1358])) {\n            break label$1\n           }\n           if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 28 >> 2], HEAP32[1359])) {\n            break label$1\n           }\n           if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 32 >> 2], HEAP32[1360])) {\n            break label$1\n           }\n           if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 36 >> 2] + -1 | 0, HEAP32[1361])) {\n            break label$1\n           }\n           if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 40 >> 2] + -1 | 0, HEAP32[1362])) {\n            break label$1\n           }\n           if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$0 + 48 >> 2], HEAP32[$0 + 52 >> 2], HEAP32[1363])) {\n            break label$1\n           }\n           if (FLAC__bitwriter_write_byte_block($1, $0 + 56 | 0, 16)) {\n            break label$3\n           }\n           break label$1;\n          case 1:\n           if (FLAC__bitwriter_write_zeroes($1, HEAP32[$0 + 8 >> 2] << 3)) {\n            break label$3\n           }\n           break label$1;\n          case 6:\n           break label$5;\n          case 5:\n           break label$6;\n          case 4:\n           break label$7;\n          case 2:\n           break label$9;\n          default:\n           break label$4;\n          };\n         }\n         $2 = HEAP32[1364] >>> 3 | 0;\n         if (!FLAC__bitwriter_write_byte_block($1, $0 + 16 | 0, $2)) {\n          break label$1\n         }\n         if (FLAC__bitwriter_write_byte_block($1, HEAP32[$0 + 20 >> 2], HEAP32[$0 + 8 >> 2] - $2 | 0)) {\n          break label$3\n         }\n         break label$1;\n        }\n        while (1) {\n         $3 = Math_imul($2, 24);\n         $5 = $3 + HEAP32[$0 + 20 >> 2] | 0;\n         if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$5 >> 2], HEAP32[$5 + 4 >> 2], $7)) {\n          break label$1\n         }\n         $5 = $3 + HEAP32[$0 + 20 >> 2] | 0;\n         if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$5 + 8 >> 2], HEAP32[$5 + 12 >> 2], $6)) {\n          break label$1\n         }\n         if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[($3 + HEAP32[$0 + 20 >> 2] | 0) + 16 >> 2], $4)) {\n          break label$1\n         }\n         $2 = $2 + 1 | 0;\n         if ($2 >>> 0 < HEAPU32[$0 + 16 >> 2]) {\n          continue\n         }\n         break;\n        };\n        break label$3;\n       }\n       if (!FLAC__bitwriter_write_raw_uint32_little_endian($1, $3)) {\n        break label$1\n       }\n       if (!FLAC__bitwriter_write_byte_block($1, HEAP32[2720], $3)) {\n        break label$1\n       }\n       if (!FLAC__bitwriter_write_raw_uint32_little_endian($1, HEAP32[$0 + 24 >> 2])) {\n        break label$1\n       }\n       if (!HEAP32[$0 + 24 >> 2]) {\n        break label$3\n       }\n       $2 = 0;\n       while (1) {\n        $3 = $2 << 3;\n        if (!FLAC__bitwriter_write_raw_uint32_little_endian($1, HEAP32[$3 + HEAP32[$0 + 28 >> 2] >> 2])) {\n         break label$1\n        }\n        $3 = $3 + HEAP32[$0 + 28 >> 2] | 0;\n        if (!FLAC__bitwriter_write_byte_block($1, HEAP32[$3 + 4 >> 2], HEAP32[$3 >> 2])) {\n         break label$1\n        }\n        $2 = $2 + 1 | 0;\n        if ($2 >>> 0 < HEAPU32[$0 + 24 >> 2]) {\n         continue\n        }\n        break;\n       };\n       break label$3;\n      }\n      if (!FLAC__bitwriter_write_byte_block($1, $0 + 16 | 0, HEAP32[1378] >>> 3 | 0)) {\n       break label$1\n      }\n      if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$0 + 152 >> 2], HEAP32[$0 + 156 >> 2], HEAP32[1379])) {\n       break label$1\n      }\n      if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 160 >> 2] != 0, HEAP32[1380])) {\n       break label$1\n      }\n      if (!FLAC__bitwriter_write_zeroes($1, HEAP32[1381])) {\n       break label$1\n      }\n      if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 164 >> 2], HEAP32[1382])) {\n       break label$1\n      }\n      if (!HEAP32[$0 + 164 >> 2]) {\n       break label$3\n      }\n      $6 = HEAP32[1373] >>> 3 | 0;\n      $7 = HEAP32[1370];\n      $5 = HEAP32[1369];\n      $9 = HEAP32[1368];\n      $10 = HEAP32[1377];\n      $11 = HEAP32[1376];\n      $12 = HEAP32[1375];\n      $13 = HEAP32[1374];\n      $14 = HEAP32[1372];\n      $15 = HEAP32[1371];\n      $3 = 0;\n      while (1) {\n       $2 = HEAP32[$0 + 168 >> 2] + ($3 << 5) | 0;\n       if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$2 >> 2], HEAP32[$2 + 4 >> 2], $15)) {\n        break label$1\n       }\n       if (!FLAC__bitwriter_write_raw_uint32($1, HEAPU8[$2 + 8 | 0], $14)) {\n        break label$1\n       }\n       if (!FLAC__bitwriter_write_byte_block($1, $2 + 9 | 0, $6)) {\n        break label$1\n       }\n       if (!FLAC__bitwriter_write_raw_uint32($1, HEAP8[$2 + 22 | 0] & 1, $13)) {\n        break label$1\n       }\n       if (!FLAC__bitwriter_write_raw_uint32($1, HEAPU8[$2 + 22 | 0] >>> 1 & 1, $12)) {\n        break label$1\n       }\n       if (!FLAC__bitwriter_write_zeroes($1, $11)) {\n        break label$1\n       }\n       if (!FLAC__bitwriter_write_raw_uint32($1, HEAPU8[$2 + 23 | 0], $10)) {\n        break label$1\n       }\n       label$16 : {\n        $8 = $2 + 23 | 0;\n        if (!HEAPU8[$8 | 0]) {\n         break label$16\n        }\n        $16 = $2 + 24 | 0;\n        $2 = 0;\n        while (1) {\n         $4 = HEAP32[$16 >> 2] + ($2 << 4) | 0;\n         if (!FLAC__bitwriter_write_raw_uint64($1, HEAP32[$4 >> 2], HEAP32[$4 + 4 >> 2], $9)) {\n          return 0\n         }\n         if (!FLAC__bitwriter_write_raw_uint32($1, HEAPU8[$4 + 8 | 0], $5)) {\n          return 0\n         }\n         if (FLAC__bitwriter_write_zeroes($1, $7)) {\n          $2 = $2 + 1 | 0;\n          if ($2 >>> 0 >= HEAPU8[$8 | 0]) {\n           break label$16\n          }\n          continue;\n         }\n         break;\n        };\n        return 0;\n       }\n       $3 = $3 + 1 | 0;\n       if ($3 >>> 0 < HEAPU32[$0 + 164 >> 2]) {\n        continue\n       }\n       break;\n      };\n      break label$3;\n     }\n     if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 16 >> 2], HEAP32[1383])) {\n      break label$1\n     }\n     $2 = strlen(HEAP32[$0 + 20 >> 2]);\n     if (!FLAC__bitwriter_write_raw_uint32($1, $2, HEAP32[1384])) {\n      break label$1\n     }\n     if (!FLAC__bitwriter_write_byte_block($1, HEAP32[$0 + 20 >> 2], $2)) {\n      break label$1\n     }\n     $2 = strlen(HEAP32[$0 + 24 >> 2]);\n     if (!FLAC__bitwriter_write_raw_uint32($1, $2, HEAP32[1385])) {\n      break label$1\n     }\n     if (!FLAC__bitwriter_write_byte_block($1, HEAP32[$0 + 24 >> 2], $2)) {\n      break label$1\n     }\n     if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 28 >> 2], HEAP32[1386])) {\n      break label$1\n     }\n     if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 32 >> 2], HEAP32[1387])) {\n      break label$1\n     }\n     if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 36 >> 2], HEAP32[1388])) {\n      break label$1\n     }\n     if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 40 >> 2], HEAP32[1389])) {\n      break label$1\n     }\n     if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 44 >> 2], HEAP32[1390])) {\n      break label$1\n     }\n     if (FLAC__bitwriter_write_byte_block($1, HEAP32[$0 + 48 >> 2], HEAP32[$0 + 44 >> 2])) {\n      break label$3\n     }\n     break label$1;\n    }\n    if (!FLAC__bitwriter_write_byte_block($1, HEAP32[$0 + 16 >> 2], HEAP32[$0 + 8 >> 2])) {\n     break label$1\n    }\n   }\n   $17 = 1;\n  }\n  return $17;\n }\n \n function FLAC__frame_add_header($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;\n  $5 = global$0 - 16 | 0;\n  global$0 = $5;\n  label$1 : {\n   if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[1394], HEAP32[1395])) {\n    break label$1\n   }\n   if (!FLAC__bitwriter_write_raw_uint32($1, 0, HEAP32[1396])) {\n    break label$1\n   }\n   if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 20 >> 2] != 0, HEAP32[1397])) {\n    break label$1\n   }\n   $8 = 16;\n   $9 = 1;\n   $3 = $1;\n   label$3 : {\n    label$4 : {\n     label$5 : {\n      label$6 : {\n       label$7 : {\n        label$8 : {\n         label$9 : {\n          label$10 : {\n           label$11 : {\n            $2 = HEAP32[$0 >> 2];\n            if (($2 | 0) <= 2047) {\n             if (($2 | 0) <= 575) {\n              $4 = 1;\n              if (($2 | 0) == 192) {\n               break label$3\n              }\n              if (($2 | 0) == 256) {\n               break label$8\n              }\n              if (($2 | 0) != 512) {\n               break label$4\n              }\n              $4 = 9;\n              break label$3;\n             }\n             if (($2 | 0) == 576) {\n              break label$11\n             }\n             if (($2 | 0) == 1024) {\n              break label$7\n             }\n             if (($2 | 0) != 1152) {\n              break label$4\n             }\n             $4 = 3;\n             break label$3;\n            }\n            if (($2 | 0) <= 4607) {\n             if (($2 | 0) == 2048) {\n              break label$6\n             }\n             if (($2 | 0) == 2304) {\n              break label$10\n             }\n             if (($2 | 0) != 4096) {\n              break label$4\n             }\n             $4 = 12;\n             break label$3;\n            }\n            if (($2 | 0) <= 16383) {\n             if (($2 | 0) == 4608) {\n              break label$9\n             }\n             if (($2 | 0) != 8192) {\n              break label$4\n             }\n             $4 = 13;\n             break label$3;\n            }\n            if (($2 | 0) == 16384) {\n             break label$5\n            }\n            if (($2 | 0) != 32768) {\n             break label$4\n            }\n            $4 = 15;\n            break label$3;\n           }\n           $4 = 2;\n           break label$3;\n          }\n          $4 = 4;\n          break label$3;\n         }\n         $4 = 5;\n         break label$3;\n        }\n        $4 = 8;\n        break label$3;\n       }\n       $4 = 10;\n       break label$3;\n      }\n      $4 = 11;\n      break label$3;\n     }\n     $4 = 14;\n     break label$3;\n    }\n    $2 = $2 >>> 0 < 257;\n    $8 = $2 ? 8 : 16;\n    $9 = 0;\n    $4 = $2 ? 6 : 7;\n   }\n   if (!FLAC__bitwriter_write_raw_uint32($3, $4, HEAP32[1398])) {\n    break label$1\n   }\n   label$16 : {\n    label$17 : {\n     label$18 : {\n      label$19 : {\n       label$20 : {\n        label$21 : {\n         label$22 : {\n          label$23 : {\n           $2 = HEAP32[$0 + 4 >> 2];\n           if (($2 | 0) <= 44099) {\n            if (($2 | 0) <= 22049) {\n             if (($2 | 0) == 8e3) {\n              break label$23\n             }\n             if (($2 | 0) != 16e3) {\n              break label$17\n             }\n             $3 = 5;\n             break label$16;\n            }\n            if (($2 | 0) == 22050) {\n             break label$22\n            }\n            if (($2 | 0) == 24e3) {\n             break label$21\n            }\n            if (($2 | 0) != 32e3) {\n             break label$17\n            }\n            $3 = 8;\n            break label$16;\n           }\n           if (($2 | 0) <= 95999) {\n            if (($2 | 0) == 44100) {\n             break label$20\n            }\n            if (($2 | 0) == 48e3) {\n             break label$19\n            }\n            $3 = 1;\n            if (($2 | 0) == 88200) {\n             break label$16\n            }\n            break label$17;\n           }\n           if (($2 | 0) == 96e3) {\n            break label$18\n           }\n           if (($2 | 0) != 192e3) {\n            if (($2 | 0) != 176400) {\n             break label$17\n            }\n            $3 = 2;\n            break label$16;\n           }\n           $3 = 3;\n           break label$16;\n          }\n          $3 = 4;\n          break label$16;\n         }\n         $3 = 6;\n         break label$16;\n        }\n        $3 = 7;\n        break label$16;\n       }\n       $3 = 9;\n       break label$16;\n      }\n      $3 = 10;\n      break label$16;\n     }\n     $3 = 11;\n     break label$16;\n    }\n    $6 = ($2 >>> 0) % 1e3 | 0;\n    if ($2 >>> 0 <= 255e3) {\n     $3 = 12;\n     $7 = 12;\n     if (!$6) {\n      break label$16\n     }\n    }\n    if (!(($2 >>> 0) % 10)) {\n     $3 = 14;\n     $7 = 14;\n     break label$16;\n    }\n    $3 = $2 >>> 0 < 65536 ? 13 : 0;\n    $7 = $3;\n   }\n   $6 = 0;\n   if (!FLAC__bitwriter_write_raw_uint32($1, $3, HEAP32[1399])) {\n    break label$1\n   }\n   label$30 : {\n    label$31 : {\n     switch (HEAP32[$0 + 12 >> 2]) {\n     case 0:\n      $3 = HEAP32[$0 + 8 >> 2] + -1 | 0;\n      break label$30;\n     case 1:\n      $3 = 8;\n      break label$30;\n     case 2:\n      $3 = 9;\n      break label$30;\n     case 3:\n      break label$31;\n     default:\n      break label$30;\n     };\n    }\n    $3 = 10;\n   }\n   if (!FLAC__bitwriter_write_raw_uint32($1, $3, HEAP32[1400])) {\n    break label$1\n   }\n   $3 = $1;\n   $2 = __wasm_rotl_i32(HEAP32[$0 + 16 >> 2] + -8 | 0, 30);\n   if ($2 >>> 0 <= 4) {\n    $2 = HEAP32[($2 << 2) + 10464 >> 2]\n   } else {\n    $2 = 0\n   }\n   if (!FLAC__bitwriter_write_raw_uint32($3, $2, HEAP32[1401])) {\n    break label$1\n   }\n   if (!FLAC__bitwriter_write_raw_uint32($1, 0, HEAP32[1402])) {\n    break label$1\n   }\n   label$37 : {\n    if (!HEAP32[$0 + 20 >> 2]) {\n     if (FLAC__bitwriter_write_utf8_uint32($1, HEAP32[$0 + 24 >> 2])) {\n      break label$37\n     }\n     break label$1;\n    }\n    if (!FLAC__bitwriter_write_utf8_uint64($1, HEAP32[$0 + 24 >> 2], HEAP32[$0 + 28 >> 2])) {\n     break label$1\n    }\n   }\n   if (!$9) {\n    if (!FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 >> 2] + -1 | 0, $8)) {\n     break label$1\n    }\n   }\n   label$40 : {\n    label$41 : {\n     switch ($7 + -12 | 0) {\n     case 0:\n      if (FLAC__bitwriter_write_raw_uint32($1, HEAPU32[$0 + 4 >> 2] / 1e3 | 0, 8)) {\n       break label$40\n      }\n      break label$1;\n     case 1:\n      if (FLAC__bitwriter_write_raw_uint32($1, HEAP32[$0 + 4 >> 2], 16)) {\n       break label$40\n      }\n      break label$1;\n     case 2:\n      break label$41;\n     default:\n      break label$40;\n     };\n    }\n    if (!FLAC__bitwriter_write_raw_uint32($1, HEAPU32[$0 + 4 >> 2] / 10 | 0, 16)) {\n     break label$1\n    }\n   }\n   if (!FLAC__bitwriter_get_write_crc8($1, $5 + 15 | 0)) {\n    break label$1\n   }\n   $6 = (FLAC__bitwriter_write_raw_uint32($1, HEAPU8[$5 + 15 | 0], HEAP32[1403]) | 0) != 0;\n  }\n  global$0 = $5 + 16 | 0;\n  return $6;\n }\n \n function FLAC__subframe_add_constant($0, $1, $2, $3) {\n  var $4 = 0;\n  label$1 : {\n   if (!FLAC__bitwriter_write_raw_uint32($3, HEAP32[1417] | ($2 | 0) != 0, HEAP32[1416] + (HEAP32[1415] + HEAP32[1414] | 0) | 0)) {\n    break label$1\n   }\n   if ($2) {\n    if (!FLAC__bitwriter_write_unary_unsigned($3, $2 + -1 | 0)) {\n     break label$1\n    }\n   }\n   $4 = (FLAC__bitwriter_write_raw_int32($3, HEAP32[$0 >> 2], $1) | 0) != 0;\n  }\n  return $4;\n }\n \n function FLAC__subframe_add_fixed($0, $1, $2, $3, $4) {\n  var $5 = 0;\n  label$1 : {\n   if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[1419] | ($3 | 0) != 0 | HEAP32[$0 + 12 >> 2] << 1, HEAP32[1416] + (HEAP32[1415] + HEAP32[1414] | 0) | 0)) {\n    break label$1\n   }\n   if ($3) {\n    if (!FLAC__bitwriter_write_unary_unsigned($4, $3 + -1 | 0)) {\n     break label$1\n    }\n   }\n   label$3 : {\n    if (!HEAP32[$0 + 12 >> 2]) {\n     break label$3\n    }\n    $3 = 0;\n    while (1) {\n     if (FLAC__bitwriter_write_raw_int32($4, HEAP32[(($3 << 2) + $0 | 0) + 16 >> 2], $2)) {\n      $3 = $3 + 1 | 0;\n      if ($3 >>> 0 < HEAPU32[$0 + 12 >> 2]) {\n       continue\n      }\n      break label$3;\n     }\n     break;\n    };\n    return 0;\n   }\n   if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[$0 >> 2], HEAP32[1405])) {\n    break label$1\n   }\n   label$6 : {\n    if (HEAPU32[$0 >> 2] > 1) {\n     break label$6\n    }\n    if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[$0 + 4 >> 2], HEAP32[1406])) {\n     break label$1\n    }\n    $2 = HEAP32[$0 >> 2];\n    if ($2 >>> 0 > 1) {\n     break label$6\n    }\n    $3 = $1;\n    $1 = HEAP32[$0 + 8 >> 2];\n    if (!add_residual_partitioned_rice_($4, HEAP32[$0 + 32 >> 2], $3, HEAP32[$0 + 12 >> 2], HEAP32[$1 >> 2], HEAP32[$1 + 4 >> 2], HEAP32[$0 + 4 >> 2], ($2 | 0) == 1)) {\n     break label$1\n    }\n   }\n   $5 = 1;\n  }\n  return $5;\n }\n \n function add_residual_partitioned_rice_($0, $1, $2, $3, $4, $5, $6, $7) {\n  var $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0;\n  $12 = HEAP32[($7 ? 5644 : 5640) >> 2];\n  $9 = HEAP32[($7 ? 5632 : 5628) >> 2];\n  label$1 : {\n   label$2 : {\n    if (!$6) {\n     if (!HEAP32[$5 >> 2]) {\n      if (!FLAC__bitwriter_write_raw_uint32($0, HEAP32[$4 >> 2], $9)) {\n       break label$2\n      }\n      if (!FLAC__bitwriter_write_rice_signed_block($0, $1, $2, HEAP32[$4 >> 2])) {\n       break label$2\n      }\n      break label$1;\n     }\n     if (!FLAC__bitwriter_write_raw_uint32($0, $12, $9)) {\n      break label$2\n     }\n     if (!FLAC__bitwriter_write_raw_uint32($0, HEAP32[$5 >> 2], HEAP32[1409])) {\n      break label$2\n     }\n     if (!$2) {\n      break label$1\n     }\n     $7 = 0;\n     while (1) {\n      if (FLAC__bitwriter_write_raw_int32($0, HEAP32[($7 << 2) + $1 >> 2], HEAP32[$5 >> 2])) {\n       $7 = $7 + 1 | 0;\n       if (($7 | 0) != ($2 | 0)) {\n        continue\n       }\n       break label$1;\n      }\n      break;\n     };\n     return 0;\n    }\n    $15 = $2 + $3 >>> $6 | 0;\n    $16 = HEAP32[1409];\n    $2 = 0;\n    while (1) {\n     $7 = $2;\n     $13 = $15 - ($10 ? 0 : $3) | 0;\n     $2 = $7 + $13 | 0;\n     $14 = $10 << 2;\n     $8 = $14 + $5 | 0;\n     label$8 : {\n      if (!HEAP32[$8 >> 2]) {\n       $11 = 0;\n       $8 = $4 + $14 | 0;\n       if (!FLAC__bitwriter_write_raw_uint32($0, HEAP32[$8 >> 2], $9)) {\n        break label$2\n       }\n       if (FLAC__bitwriter_write_rice_signed_block($0, ($7 << 2) + $1 | 0, $13, HEAP32[$8 >> 2])) {\n        break label$8\n       }\n       break label$2;\n      }\n      $11 = 0;\n      if (!FLAC__bitwriter_write_raw_uint32($0, $12, $9)) {\n       break label$2\n      }\n      if (!FLAC__bitwriter_write_raw_uint32($0, HEAP32[$8 >> 2], $16)) {\n       break label$2\n      }\n      if ($7 >>> 0 >= $2 >>> 0) {\n       break label$8\n      }\n      while (1) {\n       if (!FLAC__bitwriter_write_raw_int32($0, HEAP32[($7 << 2) + $1 >> 2], HEAP32[$8 >> 2])) {\n        break label$2\n       }\n       $7 = $7 + 1 | 0;\n       if (($7 | 0) != ($2 | 0)) {\n        continue\n       }\n       break;\n      };\n     }\n     $11 = 1;\n     $10 = $10 + 1 | 0;\n     if (!($10 >>> $6)) {\n      continue\n     }\n     break;\n    };\n   }\n   return $11;\n  }\n  return 1;\n }\n \n function FLAC__subframe_add_lpc($0, $1, $2, $3, $4) {\n  var $5 = 0;\n  label$1 : {\n   if (!FLAC__bitwriter_write_raw_uint32($4, (HEAP32[$0 + 12 >> 2] << 1) + -2 | (HEAP32[1420] | ($3 | 0) != 0), HEAP32[1416] + (HEAP32[1415] + HEAP32[1414] | 0) | 0)) {\n    break label$1\n   }\n   if ($3) {\n    if (!FLAC__bitwriter_write_unary_unsigned($4, $3 + -1 | 0)) {\n     break label$1\n    }\n   }\n   label$3 : {\n    if (!HEAP32[$0 + 12 >> 2]) {\n     break label$3\n    }\n    $3 = 0;\n    while (1) {\n     if (FLAC__bitwriter_write_raw_int32($4, HEAP32[(($3 << 2) + $0 | 0) + 152 >> 2], $2)) {\n      $3 = $3 + 1 | 0;\n      if ($3 >>> 0 < HEAPU32[$0 + 12 >> 2]) {\n       continue\n      }\n      break label$3;\n     }\n     break;\n    };\n    return 0;\n   }\n   if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[$0 + 16 >> 2] + -1 | 0, HEAP32[1412])) {\n    break label$1\n   }\n   if (!FLAC__bitwriter_write_raw_int32($4, HEAP32[$0 + 20 >> 2], HEAP32[1413])) {\n    break label$1\n   }\n   label$6 : {\n    if (!HEAP32[$0 + 12 >> 2]) {\n     break label$6\n    }\n    $3 = 0;\n    while (1) {\n     if (FLAC__bitwriter_write_raw_int32($4, HEAP32[(($3 << 2) + $0 | 0) + 24 >> 2], HEAP32[$0 + 16 >> 2])) {\n      $3 = $3 + 1 | 0;\n      if ($3 >>> 0 < HEAPU32[$0 + 12 >> 2]) {\n       continue\n      }\n      break label$6;\n     }\n     break;\n    };\n    return 0;\n   }\n   if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[$0 >> 2], HEAP32[1405])) {\n    break label$1\n   }\n   label$9 : {\n    if (HEAPU32[$0 >> 2] > 1) {\n     break label$9\n    }\n    if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[$0 + 4 >> 2], HEAP32[1406])) {\n     break label$1\n    }\n    $2 = HEAP32[$0 >> 2];\n    if ($2 >>> 0 > 1) {\n     break label$9\n    }\n    $3 = $1;\n    $1 = HEAP32[$0 + 8 >> 2];\n    if (!add_residual_partitioned_rice_($4, HEAP32[$0 + 280 >> 2], $3, HEAP32[$0 + 12 >> 2], HEAP32[$1 >> 2], HEAP32[$1 + 4 >> 2], HEAP32[$0 + 4 >> 2], ($2 | 0) == 1)) {\n     break label$1\n    }\n   }\n   $5 = 1;\n  }\n  return $5;\n }\n \n function FLAC__subframe_add_verbatim($0, $1, $2, $3, $4) {\n  $0 = HEAP32[$0 >> 2];\n  label$1 : {\n   if (!FLAC__bitwriter_write_raw_uint32($4, HEAP32[1418] | ($3 | 0) != 0, HEAP32[1416] + (HEAP32[1415] + HEAP32[1414] | 0) | 0)) {\n    break label$1\n   }\n   if ($3) {\n    if (!FLAC__bitwriter_write_unary_unsigned($4, $3 + -1 | 0)) {\n     break label$1\n    }\n   }\n   if (!$1) {\n    return 1\n   }\n   $3 = 0;\n   label$4 : {\n    while (1) {\n     if (!FLAC__bitwriter_write_raw_int32($4, HEAP32[$0 + ($3 << 2) >> 2], $2)) {\n      break label$4\n     }\n     $3 = $3 + 1 | 0;\n     if (($3 | 0) != ($1 | 0)) {\n      continue\n     }\n     break;\n    };\n    return 1;\n   }\n  }\n  return 0;\n }\n \n function strncmp($0, $1, $2) {\n  var $3 = 0, $4 = 0, $5 = 0;\n  if (!$2) {\n   return 0\n  }\n  $3 = HEAPU8[$0 | 0];\n  label$2 : {\n   if (!$3) {\n    break label$2\n   }\n   while (1) {\n    label$4 : {\n     $4 = HEAPU8[$1 | 0];\n     if (($4 | 0) != ($3 | 0)) {\n      break label$4\n     }\n     $2 = $2 + -1 | 0;\n     if (!$2 | !$4) {\n      break label$4\n     }\n     $1 = $1 + 1 | 0;\n     $3 = HEAPU8[$0 + 1 | 0];\n     $0 = $0 + 1 | 0;\n     if ($3) {\n      continue\n     }\n     break label$2;\n    }\n    break;\n   };\n   $5 = $3;\n  }\n  return ($5 & 255) - HEAPU8[$1 | 0] | 0;\n }\n \n function __uflow($0) {\n  var $1 = 0, $2 = 0;\n  $1 = global$0 - 16 | 0;\n  global$0 = $1;\n  $2 = -1;\n  label$1 : {\n   if (__toread($0)) {\n    break label$1\n   }\n   if ((FUNCTION_TABLE[HEAP32[$0 + 32 >> 2]]($0, $1 + 15 | 0, 1) | 0) != 1) {\n    break label$1\n   }\n   $2 = HEAPU8[$1 + 15 | 0];\n  }\n  global$0 = $1 + 16 | 0;\n  return $2;\n }\n \n function __shlim($0) {\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0;\n  HEAP32[$0 + 112 >> 2] = 0;\n  HEAP32[$0 + 116 >> 2] = 0;\n  $3 = HEAP32[$0 + 8 >> 2];\n  $4 = HEAP32[$0 + 4 >> 2];\n  $1 = $3 - $4 | 0;\n  $2 = $1 >> 31;\n  HEAP32[$0 + 120 >> 2] = $1;\n  HEAP32[$0 + 124 >> 2] = $2;\n  if (!((($2 | 0) < 0 ? 1 : ($2 | 0) <= 0 ? ($1 >>> 0 > 0 ? 0 : 1) : 0) | 1)) {\n   HEAP32[$0 + 104 >> 2] = $4;\n   return;\n  }\n  HEAP32[$0 + 104 >> 2] = $3;\n }\n \n function __shgetc($0) {\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;\n  $2 = HEAP32[$0 + 116 >> 2];\n  $3 = $2;\n  label$1 : {\n   $5 = HEAP32[$0 + 112 >> 2];\n   label$2 : {\n    if ($2 | $5) {\n     $2 = HEAP32[$0 + 124 >> 2];\n     if (($2 | 0) > ($3 | 0) ? 1 : ($2 | 0) >= ($3 | 0) ? (HEAPU32[$0 + 120 >> 2] < $5 >>> 0 ? 0 : 1) : 0) {\n      break label$2\n     }\n    }\n    $5 = __uflow($0);\n    if (($5 | 0) > -1) {\n     break label$1\n    }\n   }\n   HEAP32[$0 + 104 >> 2] = 0;\n   return -1;\n  }\n  $2 = HEAP32[$0 + 8 >> 2];\n  $3 = HEAP32[$0 + 116 >> 2];\n  $4 = $3;\n  label$4 : {\n   label$5 : {\n    $1 = HEAP32[$0 + 112 >> 2];\n    if (!($3 | $1)) {\n     break label$5\n    }\n    $3 = (HEAP32[$0 + 124 >> 2] ^ -1) + $4 | 0;\n    $4 = HEAP32[$0 + 120 >> 2] ^ -1;\n    $1 = $4 + $1 | 0;\n    if ($1 >>> 0 < $4 >>> 0) {\n     $3 = $3 + 1 | 0\n    }\n    $4 = $1;\n    $1 = HEAP32[$0 + 4 >> 2];\n    $6 = $2 - $1 | 0;\n    $7 = $4 >>> 0 < $6 >>> 0 ? 0 : 1;\n    $6 = $6 >> 31;\n    if (($3 | 0) > ($6 | 0) ? 1 : ($3 | 0) >= ($6 | 0) ? $7 : 0) {\n     break label$5\n    }\n    HEAP32[$0 + 104 >> 2] = $4 + $1;\n    break label$4;\n   }\n   HEAP32[$0 + 104 >> 2] = $2;\n  }\n  label$6 : {\n   if (!$2) {\n    $2 = HEAP32[$0 + 4 >> 2];\n    break label$6;\n   }\n   $3 = $0;\n   $1 = $2;\n   $2 = HEAP32[$0 + 4 >> 2];\n   $1 = ($1 - $2 | 0) + 1 | 0;\n   $4 = $1 + HEAP32[$0 + 120 >> 2] | 0;\n   $0 = HEAP32[$0 + 124 >> 2] + ($1 >> 31) | 0;\n   HEAP32[$3 + 120 >> 2] = $4;\n   HEAP32[$3 + 124 >> 2] = $4 >>> 0 < $1 >>> 0 ? $0 + 1 | 0 : $0;\n  }\n  $0 = $2 + -1 | 0;\n  if (HEAPU8[$0 | 0] != ($5 | 0)) {\n   HEAP8[$0 | 0] = $5\n  }\n  return $5;\n }\n \n function __extendsftf2($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;\n  $4 = global$0 - 16 | 0;\n  global$0 = $4;\n  $5 = (wasm2js_scratch_store_f32($1), wasm2js_scratch_load_i32(0));\n  $2 = $5 & 2147483647;\n  label$1 : {\n   if ($2 + -8388608 >>> 0 <= 2130706431) {\n    $3 = $2;\n    $2 = $2 >>> 7 | 0;\n    $3 = $3 << 25;\n    $2 = $2 + 1065353216 | 0;\n    $6 = $3;\n    $2 = $3 >>> 0 < 0 ? $2 + 1 | 0 : $2;\n    break label$1;\n   }\n   if ($2 >>> 0 >= 2139095040) {\n    $2 = $5;\n    $3 = $2 >>> 7 | 0;\n    $6 = $2 << 25;\n    $2 = $3 | 2147418112;\n    break label$1;\n   }\n   if (!$2) {\n    $2 = 0;\n    break label$1;\n   }\n   $3 = $2;\n   $2 = Math_clz32($2);\n   __ashlti3($4, $3, 0, 0, 0, $2 + 81 | 0);\n   $7 = HEAP32[$4 >> 2];\n   $8 = HEAP32[$4 + 4 >> 2];\n   $6 = HEAP32[$4 + 8 >> 2];\n   $2 = HEAP32[$4 + 12 >> 2] ^ 65536 | 16265 - $2 << 16;\n  }\n  HEAP32[$0 >> 2] = $7;\n  HEAP32[$0 + 4 >> 2] = $8;\n  HEAP32[$0 + 8 >> 2] = $6;\n  HEAP32[$0 + 12 >> 2] = $5 & -2147483648 | $2;\n  global$0 = $4 + 16 | 0;\n }\n \n function __floatsitf($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;\n  $3 = global$0 - 16 | 0;\n  global$0 = $3;\n  $6 = $0;\n  $7 = $0;\n  label$1 : {\n   if (!$1) {\n    $1 = 0;\n    $5 = 0;\n    break label$1;\n   }\n   $2 = $1 >> 31;\n   $4 = $2 + $1 ^ $2;\n   $2 = Math_clz32($4);\n   __ashlti3($3, $4, 0, 0, 0, $2 + 81 | 0);\n   $2 = (HEAP32[$3 + 12 >> 2] ^ 65536) + (16414 - $2 << 16) | 0;\n   $4 = 0 + HEAP32[$3 + 8 >> 2] | 0;\n   if ($4 >>> 0 < $5 >>> 0) {\n    $2 = $2 + 1 | 0\n   }\n   $1 = $1 & -2147483648 | $2;\n   $2 = HEAP32[$3 + 4 >> 2];\n   $5 = HEAP32[$3 >> 2];\n  }\n  HEAP32[$7 >> 2] = $5;\n  HEAP32[$6 + 4 >> 2] = $2;\n  HEAP32[$0 + 8 >> 2] = $4;\n  HEAP32[$0 + 12 >> 2] = $1;\n  global$0 = $3 + 16 | 0;\n }\n \n function __multf3($0, $1, $2, $3, $4, $5, $6, $7, $8) {\n  var $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0;\n  $13 = global$0 - 96 | 0;\n  global$0 = $13;\n  $15 = $2;\n  $10 = $6;\n  $19 = ($10 & 131071) << 15 | $5 >>> 17;\n  $9 = $8 & 65535;\n  $21 = $9;\n  $17 = $7;\n  $10 = $7;\n  $24 = $10 << 15 | $6 >>> 17;\n  $14 = ($4 ^ $8) & -2147483648;\n  $10 = $4 & 65535;\n  $12 = $10;\n  $16 = $3;\n  $27 = $10;\n  $10 = $9;\n  $25 = ($10 & 131071) << 15 | $7 >>> 17;\n  $37 = $8 >>> 16 & 32767;\n  $38 = $4 >>> 16 & 32767;\n  label$1 : {\n   label$2 : {\n    if ($38 + -1 >>> 0 <= 32765) {\n     $20 = 0;\n     if ($37 + -1 >>> 0 < 32766) {\n      break label$2\n     }\n    }\n    $11 = $4 & 2147483647;\n    $9 = $11;\n    $10 = $3;\n    if (!(!$3 & ($9 | 0) == 2147418112 ? !($1 | $2) : ($9 | 0) == 2147418112 & $3 >>> 0 < 0 | $9 >>> 0 < 2147418112)) {\n     $22 = $3;\n     $14 = $4 | 32768;\n     break label$1;\n    }\n    $11 = $8 & 2147483647;\n    $4 = $11;\n    $3 = $7;\n    if (!(!$3 & ($4 | 0) == 2147418112 ? !($5 | $6) : ($4 | 0) == 2147418112 & $3 >>> 0 < 0 | $4 >>> 0 < 2147418112)) {\n     $22 = $7;\n     $14 = $8 | 32768;\n     $1 = $5;\n     $2 = $6;\n     break label$1;\n    }\n    if (!($1 | $10 | ($9 ^ 2147418112 | $2))) {\n     if (!($3 | $5 | ($4 | $6))) {\n      $14 = 2147450880;\n      $1 = 0;\n      $2 = 0;\n      break label$1;\n     }\n     $14 = $14 | 2147418112;\n     $1 = 0;\n     $2 = 0;\n     break label$1;\n    }\n    if (!($3 | $5 | ($4 ^ 2147418112 | $6))) {\n     $3 = $1 | $10;\n     $4 = $2 | $9;\n     $1 = 0;\n     $2 = 0;\n     if (!($3 | $4)) {\n      $14 = 2147450880;\n      break label$1;\n     }\n     $14 = $14 | 2147418112;\n     break label$1;\n    }\n    if (!($1 | $10 | ($2 | $9))) {\n     $1 = 0;\n     $2 = 0;\n     break label$1;\n    }\n    if (!($3 | $5 | ($4 | $6))) {\n     $1 = 0;\n     $2 = 0;\n     break label$1;\n    }\n    $3 = 0;\n    if (($9 | 0) == 65535 | $9 >>> 0 < 65535) {\n     $9 = $1;\n     $8 = $2;\n     $3 = !($12 | $16);\n     $7 = $3 << 6;\n     $10 = Math_clz32($3 ? $1 : $16) + 32 | 0;\n     $1 = Math_clz32($3 ? $2 : $12);\n     $1 = $7 + (($1 | 0) == 32 ? $10 : $1) | 0;\n     __ashlti3($13 + 80 | 0, $9, $8, $16, $12, $1 + -15 | 0);\n     $16 = HEAP32[$13 + 88 >> 2];\n     $15 = HEAP32[$13 + 84 >> 2];\n     $27 = HEAP32[$13 + 92 >> 2];\n     $3 = 16 - $1 | 0;\n     $1 = HEAP32[$13 + 80 >> 2];\n    }\n    $20 = $3;\n    if ($4 >>> 0 > 65535) {\n     break label$2\n    }\n    $2 = !($17 | $21);\n    $4 = $2 << 6;\n    $7 = Math_clz32($2 ? $5 : $17) + 32 | 0;\n    $2 = Math_clz32($2 ? $6 : $21);\n    $2 = $4 + (($2 | 0) == 32 ? $7 : $2) | 0;\n    $8 = $2;\n    __ashlti3($13 - -64 | 0, $5, $6, $17, $21, $2 + -15 | 0);\n    $5 = HEAP32[$13 + 76 >> 2];\n    $2 = $5;\n    $7 = HEAP32[$13 + 72 >> 2];\n    $4 = $7;\n    $4 = $4 << 15;\n    $10 = HEAP32[$13 + 68 >> 2];\n    $24 = $10 >>> 17 | $4;\n    $4 = $10;\n    $5 = HEAP32[$13 + 64 >> 2];\n    $19 = ($4 & 131071) << 15 | $5 >>> 17;\n    $25 = ($2 & 131071) << 15 | $7 >>> 17;\n    $20 = ($3 - $8 | 0) + 16 | 0;\n   }\n   $3 = $19;\n   $17 = 0;\n   $8 = __wasm_i64_mul($3, 0, $1, $17);\n   $2 = i64toi32_i32$HIGH_BITS;\n   $26 = $2;\n   $23 = $5 << 15 & -32768;\n   $5 = __wasm_i64_mul($23, 0, $15, 0);\n   $4 = $5 + $8 | 0;\n   $11 = i64toi32_i32$HIGH_BITS + $2 | 0;\n   $11 = $4 >>> 0 < $5 >>> 0 ? $11 + 1 | 0 : $11;\n   $2 = $4;\n   $5 = 0;\n   $6 = __wasm_i64_mul($23, $28, $1, $17);\n   $4 = $5 + $6 | 0;\n   $9 = i64toi32_i32$HIGH_BITS + $2 | 0;\n   $9 = $4 >>> 0 < $6 >>> 0 ? $9 + 1 | 0 : $9;\n   $19 = $4;\n   $6 = $9;\n   $32 = ($2 | 0) == ($9 | 0) & $4 >>> 0 < $5 >>> 0 | $9 >>> 0 < $2 >>> 0;\n   $41 = __wasm_i64_mul($3, $39, $15, $40);\n   $33 = i64toi32_i32$HIGH_BITS;\n   $29 = $16;\n   $5 = __wasm_i64_mul($23, $28, $16, 0);\n   $4 = $5 + $41 | 0;\n   $12 = i64toi32_i32$HIGH_BITS + $33 | 0;\n   $12 = $4 >>> 0 < $5 >>> 0 ? $12 + 1 | 0 : $12;\n   $42 = $4;\n   $7 = __wasm_i64_mul($24, 0, $1, $17);\n   $4 = $4 + $7 | 0;\n   $5 = i64toi32_i32$HIGH_BITS + $12 | 0;\n   $34 = $4;\n   $5 = $4 >>> 0 < $7 >>> 0 ? $5 + 1 | 0 : $5;\n   $21 = $5;\n   $7 = $5;\n   $5 = ($11 | 0) == ($26 | 0) & $2 >>> 0 < $8 >>> 0 | $11 >>> 0 < $26 >>> 0;\n   $4 = $11;\n   $2 = $4 + $34 | 0;\n   $9 = $5 + $7 | 0;\n   $26 = $2;\n   $9 = $2 >>> 0 < $4 >>> 0 ? $9 + 1 | 0 : $9;\n   $4 = $9;\n   $7 = $2;\n   $44 = __wasm_i64_mul($3, $39, $16, $43);\n   $35 = i64toi32_i32$HIGH_BITS;\n   $2 = $23;\n   $30 = $27 | 65536;\n   $23 = $18;\n   $5 = __wasm_i64_mul($2, $28, $30, $18);\n   $2 = $5 + $44 | 0;\n   $9 = i64toi32_i32$HIGH_BITS + $35 | 0;\n   $9 = $2 >>> 0 < $5 >>> 0 ? $9 + 1 | 0 : $9;\n   $45 = $2;\n   $10 = __wasm_i64_mul($15, $40, $24, $46);\n   $2 = $2 + $10 | 0;\n   $18 = $9;\n   $5 = $9 + i64toi32_i32$HIGH_BITS | 0;\n   $5 = $2 >>> 0 < $10 >>> 0 ? $5 + 1 | 0 : $5;\n   $36 = $2;\n   $31 = $25 & 2147483647 | -2147483648;\n   $2 = __wasm_i64_mul($31, 0, $1, $17);\n   $1 = $36 + $2 | 0;\n   $17 = $5;\n   $10 = $5 + i64toi32_i32$HIGH_BITS | 0;\n   $28 = $1;\n   $2 = $1 >>> 0 < $2 >>> 0 ? $10 + 1 | 0 : $10;\n   $9 = $4 + $1 | 0;\n   $5 = 0;\n   $1 = $5 + $7 | 0;\n   if ($1 >>> 0 < $5 >>> 0) {\n    $9 = $9 + 1 | 0\n   }\n   $27 = $1;\n   $25 = $9;\n   $5 = $9;\n   $7 = $1 + $32 | 0;\n   if ($7 >>> 0 < $1 >>> 0) {\n    $5 = $5 + 1 | 0\n   }\n   $8 = $5;\n   $16 = ($20 + ($37 + $38 | 0) | 0) + -16383 | 0;\n   $5 = __wasm_i64_mul($29, $43, $24, $46);\n   $1 = i64toi32_i32$HIGH_BITS;\n   $11 = 0;\n   $10 = __wasm_i64_mul($3, $39, $30, $23);\n   $3 = $10 + $5 | 0;\n   $9 = i64toi32_i32$HIGH_BITS + $1 | 0;\n   $9 = $3 >>> 0 < $10 >>> 0 ? $9 + 1 | 0 : $9;\n   $20 = $3;\n   $10 = $3;\n   $3 = $9;\n   $9 = ($1 | 0) == ($3 | 0) & $10 >>> 0 < $5 >>> 0 | $3 >>> 0 < $1 >>> 0;\n   $5 = __wasm_i64_mul($31, $47, $15, $40);\n   $1 = $5 + $10 | 0;\n   $10 = i64toi32_i32$HIGH_BITS + $3 | 0;\n   $10 = $1 >>> 0 < $5 >>> 0 ? $10 + 1 | 0 : $10;\n   $15 = $1;\n   $5 = $1;\n   $1 = $10;\n   $3 = ($3 | 0) == ($1 | 0) & $5 >>> 0 < $20 >>> 0 | $1 >>> 0 < $3 >>> 0;\n   $5 = $9 + $3 | 0;\n   if ($5 >>> 0 < $3 >>> 0) {\n    $11 = 1\n   }\n   $10 = $5;\n   $3 = $1;\n   $5 = $11;\n   $32 = $10;\n   $9 = 0;\n   $10 = ($12 | 0) == ($21 | 0) & $34 >>> 0 < $42 >>> 0 | $21 >>> 0 < $12 >>> 0;\n   $12 = $10 + (($12 | 0) == ($33 | 0) & $42 >>> 0 < $41 >>> 0 | $12 >>> 0 < $33 >>> 0) | 0;\n   if ($12 >>> 0 < $10 >>> 0) {\n    $9 = 1\n   }\n   $11 = $12;\n   $12 = $12 + $15 | 0;\n   $10 = $3 + $9 | 0;\n   $20 = $12;\n   $9 = $12;\n   $10 = $9 >>> 0 < $11 >>> 0 ? $10 + 1 | 0 : $10;\n   $3 = $10;\n   $1 = ($1 | 0) == ($3 | 0) & $9 >>> 0 < $15 >>> 0 | $3 >>> 0 < $1 >>> 0;\n   $10 = $32 + $1 | 0;\n   if ($10 >>> 0 < $1 >>> 0) {\n    $5 = $5 + 1 | 0\n   }\n   $1 = $10;\n   $10 = __wasm_i64_mul($31, $47, $30, $23);\n   $1 = $1 + $10 | 0;\n   $9 = i64toi32_i32$HIGH_BITS + $5 | 0;\n   $9 = $1 >>> 0 < $10 >>> 0 ? $9 + 1 | 0 : $9;\n   $11 = $1;\n   $12 = __wasm_i64_mul($31, $47, $29, $43);\n   $5 = i64toi32_i32$HIGH_BITS;\n   $15 = __wasm_i64_mul($24, $46, $30, $23);\n   $1 = $15 + $12 | 0;\n   $10 = i64toi32_i32$HIGH_BITS + $5 | 0;\n   $10 = $1 >>> 0 < $15 >>> 0 ? $10 + 1 | 0 : $10;\n   $15 = $1;\n   $1 = $10;\n   $10 = ($5 | 0) == ($1 | 0) & $15 >>> 0 < $12 >>> 0 | $1 >>> 0 < $5 >>> 0;\n   $5 = $1 + $11 | 0;\n   $11 = $9 + $10 | 0;\n   $10 = $5 >>> 0 < $1 >>> 0 ? $11 + 1 | 0 : $11;\n   $29 = $5;\n   $9 = $3 + $15 | 0;\n   $11 = 0;\n   $1 = $11 + $20 | 0;\n   if ($1 >>> 0 < $11 >>> 0) {\n    $9 = $9 + 1 | 0\n   }\n   $12 = $1;\n   $5 = $1;\n   $1 = $9;\n   $3 = ($3 | 0) == ($1 | 0) & $5 >>> 0 < $20 >>> 0 | $1 >>> 0 < $3 >>> 0;\n   $5 = $29 + $3 | 0;\n   if ($5 >>> 0 < $3 >>> 0) {\n    $10 = $10 + 1 | 0\n   }\n   $15 = $5;\n   $11 = $1;\n   $9 = 0;\n   $5 = ($18 | 0) == ($17 | 0) & $36 >>> 0 < $45 >>> 0 | $17 >>> 0 < $18 >>> 0;\n   $18 = $5 + (($18 | 0) == ($35 | 0) & $45 >>> 0 < $44 >>> 0 | $18 >>> 0 < $35 >>> 0) | 0;\n   if ($18 >>> 0 < $5 >>> 0) {\n    $9 = 1\n   }\n   $5 = $18 + (($2 | 0) == ($17 | 0) & $28 >>> 0 < $36 >>> 0 | $2 >>> 0 < $17 >>> 0) | 0;\n   $3 = $2;\n   $2 = $3 + $12 | 0;\n   $11 = $5 + $11 | 0;\n   $11 = $2 >>> 0 < $3 >>> 0 ? $11 + 1 | 0 : $11;\n   $18 = $2;\n   $3 = $2;\n   $2 = $11;\n   $1 = ($1 | 0) == ($2 | 0) & $3 >>> 0 < $12 >>> 0 | $2 >>> 0 < $1 >>> 0;\n   $3 = $1 + $15 | 0;\n   if ($3 >>> 0 < $1 >>> 0) {\n    $10 = $10 + 1 | 0\n   }\n   $1 = $2;\n   $9 = $10;\n   $10 = $3;\n   $5 = 0;\n   $3 = ($4 | 0) == ($25 | 0) & $27 >>> 0 < $26 >>> 0 | $25 >>> 0 < $4 >>> 0;\n   $4 = $3 + (($4 | 0) == ($21 | 0) & $26 >>> 0 < $34 >>> 0 | $4 >>> 0 < $21 >>> 0) | 0;\n   if ($4 >>> 0 < $3 >>> 0) {\n    $5 = 1\n   }\n   $3 = $4 + $18 | 0;\n   $11 = $1 + $5 | 0;\n   $11 = $3 >>> 0 < $4 >>> 0 ? $11 + 1 | 0 : $11;\n   $1 = $3;\n   $4 = $11;\n   $1 = ($2 | 0) == ($4 | 0) & $1 >>> 0 < $18 >>> 0 | $4 >>> 0 < $2 >>> 0;\n   $2 = $10 + $1 | 0;\n   if ($2 >>> 0 < $1 >>> 0) {\n    $9 = $9 + 1 | 0\n   }\n   $1 = $2;\n   $2 = $9;\n   label$13 : {\n    if ($2 & 65536) {\n     $16 = $16 + 1 | 0;\n     break label$13;\n    }\n    $12 = $6 >>> 31 | 0;\n    $9 = $2 << 1 | $1 >>> 31;\n    $1 = $1 << 1 | $4 >>> 31;\n    $2 = $9;\n    $9 = $4 << 1 | $3 >>> 31;\n    $3 = $3 << 1 | $8 >>> 31;\n    $4 = $9;\n    $10 = $19;\n    $9 = $6 << 1 | $10 >>> 31;\n    $19 = $10 << 1;\n    $6 = $9;\n    $10 = $8 << 1 | $7 >>> 31;\n    $7 = $7 << 1 | $12;\n    $8 = $10;\n   }\n   if (($16 | 0) >= 32767) {\n    $14 = $14 | 2147418112;\n    $1 = 0;\n    $2 = 0;\n    break label$1;\n   }\n   label$16 : {\n    if (($16 | 0) <= 0) {\n     $5 = 1 - $16 | 0;\n     if ($5 >>> 0 <= 127) {\n      $10 = $16 + 127 | 0;\n      __ashlti3($13 + 48 | 0, $19, $6, $7, $8, $10);\n      __ashlti3($13 + 32 | 0, $3, $4, $1, $2, $10);\n      __lshrti3($13 + 16 | 0, $19, $6, $7, $8, $5);\n      __lshrti3($13, $3, $4, $1, $2, $5);\n      $19 = (HEAP32[$13 + 48 >> 2] | HEAP32[$13 + 56 >> 2]) != 0 | (HEAP32[$13 + 52 >> 2] | HEAP32[$13 + 60 >> 2]) != 0 | (HEAP32[$13 + 32 >> 2] | HEAP32[$13 + 16 >> 2]);\n      $6 = HEAP32[$13 + 36 >> 2] | HEAP32[$13 + 20 >> 2];\n      $7 = HEAP32[$13 + 40 >> 2] | HEAP32[$13 + 24 >> 2];\n      $8 = HEAP32[$13 + 44 >> 2] | HEAP32[$13 + 28 >> 2];\n      $3 = HEAP32[$13 >> 2];\n      $4 = HEAP32[$13 + 4 >> 2];\n      $2 = HEAP32[$13 + 12 >> 2];\n      $1 = HEAP32[$13 + 8 >> 2];\n      break label$16;\n     }\n     $1 = 0;\n     $2 = 0;\n     break label$1;\n    }\n    $2 = $2 & 65535 | $16 << 16;\n   }\n   $22 = $1 | $22;\n   $14 = $2 | $14;\n   if (!(!$7 & ($8 | 0) == -2147483648 ? !($6 | $19) : ($8 | 0) > -1 ? 1 : 0)) {\n    $11 = $14;\n    $12 = $4;\n    $1 = $3 + 1 | 0;\n    if ($1 >>> 0 < 1) {\n     $12 = $12 + 1 | 0\n    }\n    $2 = $12;\n    $3 = ($4 | 0) == ($2 | 0) & $1 >>> 0 < $3 >>> 0 | $2 >>> 0 < $4 >>> 0;\n    $4 = $3 + $22 | 0;\n    if ($4 >>> 0 < $3 >>> 0) {\n     $11 = $11 + 1 | 0\n    }\n    $22 = $4;\n    $14 = $11;\n    break label$1;\n   }\n   if ($7 | $19 | ($8 ^ -2147483648 | $6)) {\n    $1 = $3;\n    $2 = $4;\n    break label$1;\n   }\n   $12 = $14;\n   $9 = $4;\n   $1 = $3 & 1;\n   $2 = $1 + $3 | 0;\n   if ($2 >>> 0 < $1 >>> 0) {\n    $9 = $9 + 1 | 0\n   }\n   $1 = $2;\n   $2 = $9;\n   $3 = ($4 | 0) == ($2 | 0) & $1 >>> 0 < $3 >>> 0 | $2 >>> 0 < $4 >>> 0;\n   $4 = $3 + $22 | 0;\n   if ($4 >>> 0 < $3 >>> 0) {\n    $12 = $12 + 1 | 0\n   }\n   $22 = $4;\n   $14 = $12;\n  }\n  HEAP32[$0 >> 2] = $1;\n  HEAP32[$0 + 4 >> 2] = $2;\n  HEAP32[$0 + 8 >> 2] = $22;\n  HEAP32[$0 + 12 >> 2] = $14;\n  global$0 = $13 + 96 | 0;\n }\n \n function __addtf3($0, $1, $2, $3, $4, $5, $6, $7, $8) {\n  var $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0;\n  $11 = global$0 - 112 | 0;\n  global$0 = $11;\n  $12 = $7;\n  $14 = $8 & 2147483647;\n  $10 = $2 + -1 | 0;\n  $9 = $1 + -1 | 0;\n  if (($9 | 0) != -1) {\n   $10 = $10 + 1 | 0\n  }\n  $13 = $9;\n  $17 = ($9 | 0) == -1 & ($10 | 0) == -1;\n  $15 = $4 & 2147483647;\n  $9 = $15;\n  $16 = $3;\n  $10 = ($2 | 0) == ($10 | 0) & $13 >>> 0 < $1 >>> 0 | $10 >>> 0 < $2 >>> 0;\n  $13 = $3 + $10 | 0;\n  if ($13 >>> 0 < $10 >>> 0) {\n   $9 = $9 + 1 | 0\n  }\n  $13 = $13 + -1 | 0;\n  $10 = $9 + -1 | 0;\n  $9 = $13;\n  label$1 : {\n   label$2 : {\n    $10 = ($9 | 0) != -1 ? $10 + 1 | 0 : $10;\n    if (!(($9 | 0) == -1 & ($10 | 0) == 2147418111 ? $17 : $10 >>> 0 > 2147418111)) {\n     $10 = $6 + -1 | 0;\n     $9 = $5 + -1 | 0;\n     if (($9 | 0) != -1) {\n      $10 = $10 + 1 | 0\n     }\n     $13 = $9;\n     $17 = ($9 | 0) != -1 | ($10 | 0) != -1;\n     $9 = $14;\n     $10 = ($6 | 0) == ($10 | 0) & $13 >>> 0 < $5 >>> 0 | $10 >>> 0 < $6 >>> 0;\n     $13 = $10 + $12 | 0;\n     if ($13 >>> 0 < $10 >>> 0) {\n      $9 = $9 + 1 | 0\n     }\n     $10 = $13 + -1 | 0;\n     $9 = $9 + -1 | 0;\n     $9 = ($10 | 0) != -1 ? $9 + 1 | 0 : $9;\n     if (($10 | 0) == -1 & ($9 | 0) == 2147418111 ? $17 : ($9 | 0) == 2147418111 & ($10 | 0) != -1 | $9 >>> 0 < 2147418111) {\n      break label$2\n     }\n    }\n    if (!(!$16 & ($15 | 0) == 2147418112 ? !($1 | $2) : ($15 | 0) == 2147418112 & $16 >>> 0 < 0 | $15 >>> 0 < 2147418112)) {\n     $7 = $3;\n     $8 = $4 | 32768;\n     $5 = $1;\n     $6 = $2;\n     break label$1;\n    }\n    if (!(!$12 & ($14 | 0) == 2147418112 ? !($5 | $6) : ($14 | 0) == 2147418112 & $12 >>> 0 < 0 | $14 >>> 0 < 2147418112)) {\n     $8 = $8 | 32768;\n     break label$1;\n    }\n    if (!($1 | $16 | ($15 ^ 2147418112 | $2))) {\n     $9 = $3;\n     $3 = !($1 ^ $5 | $3 ^ $7 | ($2 ^ $6 | $4 ^ $8 ^ -2147483648));\n     $7 = $3 ? 0 : $9;\n     $8 = $3 ? 2147450880 : $4;\n     $5 = $3 ? 0 : $1;\n     $6 = $3 ? 0 : $2;\n     break label$1;\n    }\n    if (!($5 | $12 | ($14 ^ 2147418112 | $6))) {\n     break label$1\n    }\n    if (!($1 | $16 | ($2 | $15))) {\n     if ($5 | $12 | ($6 | $14)) {\n      break label$1\n     }\n     $5 = $1 & $5;\n     $6 = $2 & $6;\n     $7 = $3 & $7;\n     $8 = $4 & $8;\n     break label$1;\n    }\n    if ($5 | $12 | ($6 | $14)) {\n     break label$2\n    }\n    $5 = $1;\n    $6 = $2;\n    $7 = $3;\n    $8 = $4;\n    break label$1;\n   }\n   $10 = ($12 | 0) == ($16 | 0) & ($14 | 0) == ($15 | 0) ? ($2 | 0) == ($6 | 0) & $5 >>> 0 > $1 >>> 0 | $6 >>> 0 > $2 >>> 0 : ($14 | 0) == ($15 | 0) & $12 >>> 0 > $16 >>> 0 | $14 >>> 0 > $15 >>> 0;\n   $9 = $10;\n   $15 = $9 ? $5 : $1;\n   $14 = $9 ? $6 : $2;\n   $12 = $9 ? $8 : $4;\n   $16 = $12;\n   $13 = $9 ? $7 : $3;\n   $9 = $12 & 65535;\n   $4 = $10 ? $4 : $8;\n   $18 = $4;\n   $3 = $10 ? $3 : $7;\n   $17 = $4 >>> 16 & 32767;\n   $12 = $12 >>> 16 & 32767;\n   if (!$12) {\n    $4 = !($9 | $13);\n    $7 = $4 << 6;\n    $8 = Math_clz32($4 ? $15 : $13) + 32 | 0;\n    $4 = Math_clz32($4 ? $14 : $9);\n    $4 = $7 + (($4 | 0) == 32 ? $8 : $4) | 0;\n    __ashlti3($11 + 96 | 0, $15, $14, $13, $9, $4 + -15 | 0);\n    $13 = HEAP32[$11 + 104 >> 2];\n    $15 = HEAP32[$11 + 96 >> 2];\n    $14 = HEAP32[$11 + 100 >> 2];\n    $12 = 16 - $4 | 0;\n    $9 = HEAP32[$11 + 108 >> 2];\n   }\n   $5 = $10 ? $1 : $5;\n   $6 = $10 ? $2 : $6;\n   $1 = $3;\n   $2 = $18 & 65535;\n   if ($17) {\n    $1 = $2\n   } else {\n    $7 = $1;\n    $3 = !($1 | $2);\n    $4 = $3 << 6;\n    $8 = Math_clz32($3 ? $5 : $1) + 32 | 0;\n    $1 = Math_clz32($3 ? $6 : $2);\n    $1 = $4 + (($1 | 0) == 32 ? $8 : $1) | 0;\n    __ashlti3($11 + 80 | 0, $5, $6, $7, $2, $1 + -15 | 0);\n    $17 = 16 - $1 | 0;\n    $5 = HEAP32[$11 + 80 >> 2];\n    $6 = HEAP32[$11 + 84 >> 2];\n    $3 = HEAP32[$11 + 88 >> 2];\n    $1 = HEAP32[$11 + 92 >> 2];\n   }\n   $2 = $3;\n   $10 = $1 << 3 | $2 >>> 29;\n   $7 = $2 << 3 | $6 >>> 29;\n   $8 = $10 | 524288;\n   $1 = $13;\n   $3 = $9 << 3 | $1 >>> 29;\n   $4 = $1 << 3 | $14 >>> 29;\n   $13 = $3;\n   $10 = $16 ^ $18;\n   $1 = $5;\n   $9 = $6 << 3 | $1 >>> 29;\n   $1 = $1 << 3;\n   $2 = $9;\n   $5 = $12 - $17 | 0;\n   $3 = $1;\n   label$11 : {\n    if (!$5) {\n     break label$11\n    }\n    if ($5 >>> 0 > 127) {\n     $7 = 0;\n     $8 = 0;\n     $9 = 0;\n     $3 = 1;\n     break label$11;\n    }\n    __ashlti3($11 - -64 | 0, $1, $2, $7, $8, 128 - $5 | 0);\n    __lshrti3($11 + 48 | 0, $1, $2, $7, $8, $5);\n    $7 = HEAP32[$11 + 56 >> 2];\n    $8 = HEAP32[$11 + 60 >> 2];\n    $9 = HEAP32[$11 + 52 >> 2];\n    $3 = HEAP32[$11 + 48 >> 2] | ((HEAP32[$11 + 64 >> 2] | HEAP32[$11 + 72 >> 2]) != 0 | (HEAP32[$11 + 68 >> 2] | HEAP32[$11 + 76 >> 2]) != 0);\n   }\n   $6 = $9;\n   $13 = $13 | 524288;\n   $1 = $15;\n   $9 = $14 << 3 | $1 >>> 29;\n   $2 = $1 << 3;\n   label$13 : {\n    if (($10 | 0) < -1 ? 1 : ($10 | 0) <= -1 ? 1 : 0) {\n     $14 = $3;\n     $1 = $2 - $3 | 0;\n     $15 = $4 - $7 | 0;\n     $3 = ($6 | 0) == ($9 | 0) & $2 >>> 0 < $3 >>> 0 | $9 >>> 0 < $6 >>> 0;\n     $5 = $15 - $3 | 0;\n     $2 = $9 - (($2 >>> 0 < $14 >>> 0) + $6 | 0) | 0;\n     $6 = ($13 - (($4 >>> 0 < $7 >>> 0) + $8 | 0) | 0) - ($15 >>> 0 < $3 >>> 0) | 0;\n     if (!($1 | $5 | ($2 | $6))) {\n      $5 = 0;\n      $6 = 0;\n      $7 = 0;\n      $8 = 0;\n      break label$1;\n     }\n     if ($6 >>> 0 > 524287) {\n      break label$13\n     }\n     $7 = $1;\n     $3 = !($5 | $6);\n     $4 = $3 << 6;\n     $8 = Math_clz32($3 ? $1 : $5) + 32 | 0;\n     $1 = Math_clz32($3 ? $2 : $6);\n     $1 = $4 + (($1 | 0) == 32 ? $8 : $1) | 0;\n     $1 = $1 + -12 | 0;\n     __ashlti3($11 + 32 | 0, $7, $2, $5, $6, $1);\n     $12 = $12 - $1 | 0;\n     $5 = HEAP32[$11 + 40 >> 2];\n     $6 = HEAP32[$11 + 44 >> 2];\n     $1 = HEAP32[$11 + 32 >> 2];\n     $2 = HEAP32[$11 + 36 >> 2];\n     break label$13;\n    }\n    $10 = $6 + $9 | 0;\n    $1 = $3;\n    $2 = $1 + $2 | 0;\n    if ($2 >>> 0 < $1 >>> 0) {\n     $10 = $10 + 1 | 0\n    }\n    $1 = $2;\n    $2 = $10;\n    $6 = ($6 | 0) == ($2 | 0) & $1 >>> 0 < $3 >>> 0 | $2 >>> 0 < $6 >>> 0;\n    $10 = $8 + $13 | 0;\n    $3 = $4 + $7 | 0;\n    if ($3 >>> 0 < $4 >>> 0) {\n     $10 = $10 + 1 | 0\n    }\n    $5 = $3;\n    $4 = $6 + $3 | 0;\n    $3 = $10;\n    $3 = $4 >>> 0 < $5 >>> 0 ? $3 + 1 | 0 : $3;\n    $5 = $4;\n    $6 = $3;\n    if (!($3 & 1048576)) {\n     break label$13\n    }\n    $1 = $1 & 1 | (($2 & 1) << 31 | $1 >>> 1);\n    $2 = $5 << 31 | $2 >>> 1;\n    $12 = $12 + 1 | 0;\n    $5 = ($6 & 1) << 31 | $5 >>> 1;\n    $6 = $6 >>> 1 | 0;\n   }\n   $7 = 0;\n   $9 = $16 & -2147483648;\n   if (($12 | 0) >= 32767) {\n    $8 = $9 | 2147418112;\n    $5 = 0;\n    $6 = 0;\n    break label$1;\n   }\n   $4 = 0;\n   label$17 : {\n    if (($12 | 0) > 0) {\n     $4 = $12;\n     break label$17;\n    }\n    __ashlti3($11 + 16 | 0, $1, $2, $5, $6, $12 + 127 | 0);\n    __lshrti3($11, $1, $2, $5, $6, 1 - $12 | 0);\n    $1 = HEAP32[$11 >> 2] | ((HEAP32[$11 + 16 >> 2] | HEAP32[$11 + 24 >> 2]) != 0 | (HEAP32[$11 + 20 >> 2] | HEAP32[$11 + 28 >> 2]) != 0);\n    $2 = HEAP32[$11 + 4 >> 2];\n    $5 = HEAP32[$11 + 8 >> 2];\n    $6 = HEAP32[$11 + 12 >> 2];\n   }\n   $7 = $7 | (($6 & 7) << 29 | $5 >>> 3);\n   $4 = $9 | $6 >>> 3 & 65535 | $4 << 16;\n   $9 = $5 << 29;\n   $3 = 0;\n   $5 = $9;\n   $6 = ($2 & 7) << 29 | $1 >>> 3 | $3;\n   $9 = $4;\n   $3 = $2 >>> 3 | $5;\n   $10 = $3;\n   $4 = $1 & 7;\n   $1 = $4 >>> 0 > 4;\n   $2 = $1 + $6 | 0;\n   if ($2 >>> 0 < $1 >>> 0) {\n    $10 = $10 + 1 | 0\n   }\n   $1 = $2;\n   $2 = $10;\n   $3 = ($3 | 0) == ($2 | 0) & $1 >>> 0 < $6 >>> 0 | $2 >>> 0 < $3 >>> 0;\n   $5 = $3 + $7 | 0;\n   if ($5 >>> 0 < $3 >>> 0) {\n    $9 = $9 + 1 | 0\n   }\n   $4 = ($4 | 0) == 4;\n   $3 = $4 ? $1 & 1 : 0;\n   $8 = $9;\n   $7 = $5;\n   $4 = 0;\n   $9 = $2 + $4 | 0;\n   $2 = $1 + $3 | 0;\n   if ($2 >>> 0 < $1 >>> 0) {\n    $9 = $9 + 1 | 0\n   }\n   $5 = $2;\n   $1 = $2;\n   $6 = $9;\n   $1 = ($4 | 0) == ($9 | 0) & $1 >>> 0 < $3 >>> 0 | $9 >>> 0 < $4 >>> 0;\n   $2 = $7 + $1 | 0;\n   if ($2 >>> 0 < $1 >>> 0) {\n    $8 = $8 + 1 | 0\n   }\n   $7 = $2;\n  }\n  HEAP32[$0 >> 2] = $5;\n  HEAP32[$0 + 4 >> 2] = $6;\n  HEAP32[$0 + 8 >> 2] = $7;\n  HEAP32[$0 + 12 >> 2] = $8;\n  global$0 = $11 + 112 | 0;\n }\n \n function __extenddftf2($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;\n  $5 = global$0 - 16 | 0;\n  global$0 = $5;\n  wasm2js_scratch_store_f64(+$1);\n  $8 = wasm2js_scratch_load_i32(1) | 0;\n  $6 = wasm2js_scratch_load_i32(0) | 0;\n  $7 = $8 & 2147483647;\n  $2 = $7;\n  $4 = $2 + -1048576 | 0;\n  $3 = $6;\n  if ($3 >>> 0 < 0) {\n   $4 = $4 + 1 | 0\n  }\n  label$1 : {\n   if (($4 | 0) == 2145386495 | $4 >>> 0 < 2145386495) {\n    $7 = $3 << 28;\n    $4 = ($2 & 15) << 28 | $3 >>> 4;\n    $2 = ($2 >>> 4 | 0) + 1006632960 | 0;\n    $3 = $4;\n    $2 = $3 >>> 0 < 0 ? $2 + 1 | 0 : $2;\n    break label$1;\n   }\n   if (($2 | 0) == 2146435072 & $3 >>> 0 >= 0 | $2 >>> 0 > 2146435072) {\n    $7 = $6 << 28;\n    $4 = $6;\n    $2 = $8;\n    $6 = $2 >>> 4 | 0;\n    $3 = ($2 & 15) << 28 | $4 >>> 4;\n    $2 = $6 | 2147418112;\n    break label$1;\n   }\n   if (!($2 | $3)) {\n    $7 = 0;\n    $3 = 0;\n    $2 = 0;\n    break label$1;\n   }\n   $4 = $2;\n   $2 = ($2 | 0) == 1 & $3 >>> 0 < 0 | $2 >>> 0 < 1 ? Math_clz32($6) + 32 | 0 : Math_clz32($2);\n   __ashlti3($5, $3, $4, 0, 0, $2 + 49 | 0);\n   $9 = HEAP32[$5 >> 2];\n   $7 = HEAP32[$5 + 4 >> 2];\n   $3 = HEAP32[$5 + 8 >> 2];\n   $2 = HEAP32[$5 + 12 >> 2] ^ 65536 | 15372 - $2 << 16;\n  }\n  HEAP32[$0 >> 2] = $9;\n  HEAP32[$0 + 4 >> 2] = $7;\n  HEAP32[$0 + 8 >> 2] = $3;\n  HEAP32[$0 + 12 >> 2] = $8 & -2147483648 | $2;\n  global$0 = $5 + 16 | 0;\n }\n \n function __letf2($0, $1, $2, $3, $4, $5, $6, $7) {\n  var $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0;\n  $9 = 1;\n  $8 = $3 & 2147483647;\n  $12 = $8;\n  $10 = $2;\n  label$1 : {\n   if (!$2 & ($8 | 0) == 2147418112 ? $0 | $1 : ($8 | 0) == 2147418112 & $2 >>> 0 > 0 | $8 >>> 0 > 2147418112) {\n    break label$1\n   }\n   $11 = $7 & 2147483647;\n   $13 = $11;\n   $8 = $6;\n   if (!$6 & ($11 | 0) == 2147418112 ? $4 | $5 : ($11 | 0) == 2147418112 & $6 >>> 0 > 0 | $11 >>> 0 > 2147418112) {\n    break label$1\n   }\n   if (!($0 | $4 | ($8 | $10) | ($1 | $5 | ($12 | $13)))) {\n    return 0\n   }\n   $10 = $3 & $7;\n   if (($10 | 0) > 0 ? 1 : ($10 | 0) >= 0 ? (($2 & $6) >>> 0 < 0 ? 0 : 1) : 0) {\n    $9 = -1;\n    if (($2 | 0) == ($6 | 0) & ($3 | 0) == ($7 | 0) ? ($1 | 0) == ($5 | 0) & $0 >>> 0 < $4 >>> 0 | $1 >>> 0 < $5 >>> 0 : ($3 | 0) < ($7 | 0) ? 1 : ($3 | 0) <= ($7 | 0) ? ($2 >>> 0 >= $6 >>> 0 ? 0 : 1) : 0) {\n     break label$1\n    }\n    return ($0 ^ $4 | $2 ^ $6) != 0 | ($1 ^ $5 | $3 ^ $7) != 0;\n   }\n   $9 = -1;\n   if (($2 | 0) == ($6 | 0) & ($3 | 0) == ($7 | 0) ? ($1 | 0) == ($5 | 0) & $0 >>> 0 > $4 >>> 0 | $1 >>> 0 > $5 >>> 0 : ($3 | 0) > ($7 | 0) ? 1 : ($3 | 0) >= ($7 | 0) ? ($2 >>> 0 <= $6 >>> 0 ? 0 : 1) : 0) {\n    break label$1\n   }\n   $9 = ($0 ^ $4 | $2 ^ $6) != 0 | ($1 ^ $5 | $3 ^ $7) != 0;\n  }\n  return $9;\n }\n \n function __getf2($0, $1, $2, $3, $4) {\n  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;\n  $7 = -1;\n  $5 = $3 & 2147483647;\n  $8 = $5;\n  $6 = $2;\n  label$1 : {\n   if (!$2 & ($5 | 0) == 2147418112 ? $0 | $1 : ($5 | 0) == 2147418112 & $2 >>> 0 > 0 | $5 >>> 0 > 2147418112) {\n    break label$1\n   }\n   $5 = $4 & 2147483647;\n   $9 = $5;\n   if (($5 | 0) == 2147418112 ? 0 : $5 >>> 0 > 2147418112) {\n    break label$1\n   }\n   if (!($0 | $6 | ($1 | ($8 | $9)))) {\n    return 0\n   }\n   $6 = $3 & $4;\n   if (($6 | 0) > 0 ? 1 : ($6 | 0) >= 0 ? 1 : 0) {\n    if (!$2 & ($3 | 0) == ($4 | 0) ? !$1 & $0 >>> 0 < 0 | $1 >>> 0 < 0 : ($3 | 0) < ($4 | 0) ? 1 : ($3 | 0) <= ($4 | 0) ? ($2 >>> 0 >= 0 ? 0 : 1) : 0) {\n     break label$1\n    }\n    return ($0 | $2) != 0 | ($1 | $3 ^ $4) != 0;\n   }\n   if (!$2 & ($3 | 0) == ($4 | 0) ? !$1 & $0 >>> 0 > 0 | $1 >>> 0 > 0 : ($3 | 0) > ($4 | 0) ? 1 : ($3 | 0) >= ($4 | 0) ? ($2 >>> 0 <= 0 ? 0 : 1) : 0) {\n    break label$1\n   }\n   $7 = ($0 | $2) != 0 | ($1 | $3 ^ $4) != 0;\n  }\n  return $7;\n }\n \n function copysignl($0, $1, $2, $3, $4, $5, $6, $7, $8) {\n  HEAP32[$0 >> 2] = $1;\n  HEAP32[$0 + 4 >> 2] = $2;\n  HEAP32[$0 + 8 >> 2] = $3;\n  HEAP32[$0 + 12 >> 2] = $4 & 65535 | ($8 >>> 16 & 32768 | $4 >>> 16 & 32767) << 16;\n }\n \n function __floatunsitf($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;\n  $2 = global$0 - 16 | 0;\n  global$0 = $2;\n  $6 = $0;\n  $7 = $0;\n  label$1 : {\n   if (!$1) {\n    $1 = 0;\n    $3 = 0;\n    break label$1;\n   }\n   $3 = $1;\n   $1 = Math_clz32($1) ^ 31;\n   __ashlti3($2, $3, 0, 0, 0, 112 - $1 | 0);\n   $1 = (HEAP32[$2 + 12 >> 2] ^ 65536) + ($1 + 16383 << 16) | 0;\n   $4 = 0 + HEAP32[$2 + 8 >> 2] | 0;\n   if ($4 >>> 0 < $5 >>> 0) {\n    $1 = $1 + 1 | 0\n   }\n   $5 = HEAP32[$2 + 4 >> 2];\n   $3 = HEAP32[$2 >> 2];\n  }\n  HEAP32[$7 >> 2] = $3;\n  HEAP32[$6 + 4 >> 2] = $5;\n  HEAP32[$0 + 8 >> 2] = $4;\n  HEAP32[$0 + 12 >> 2] = $1;\n  global$0 = $2 + 16 | 0;\n }\n \n function __subtf3($0, $1, $2, $3, $4, $5, $6, $7, $8) {\n  var $9 = 0;\n  $9 = global$0 - 16 | 0;\n  global$0 = $9;\n  __addtf3($9, $1, $2, $3, $4, $5, $6, $7, $8 ^ -2147483648);\n  $1 = HEAP32[$9 + 4 >> 2];\n  HEAP32[$0 >> 2] = HEAP32[$9 >> 2];\n  HEAP32[$0 + 4 >> 2] = $1;\n  $1 = HEAP32[$9 + 12 >> 2];\n  HEAP32[$0 + 8 >> 2] = HEAP32[$9 + 8 >> 2];\n  HEAP32[$0 + 12 >> 2] = $1;\n  global$0 = $9 + 16 | 0;\n }\n \n function scalbnl($0, $1, $2, $3, $4, $5) {\n  var $6 = 0;\n  $6 = global$0 - 80 | 0;\n  global$0 = $6;\n  label$1 : {\n   if (($5 | 0) >= 16384) {\n    __multf3($6 + 32 | 0, $1, $2, $3, $4, 0, 0, 0, 2147352576);\n    $3 = HEAP32[$6 + 40 >> 2];\n    $4 = HEAP32[$6 + 44 >> 2];\n    $1 = HEAP32[$6 + 32 >> 2];\n    $2 = HEAP32[$6 + 36 >> 2];\n    if (($5 | 0) < 32767) {\n     $5 = $5 + -16383 | 0;\n     break label$1;\n    }\n    __multf3($6 + 16 | 0, $1, $2, $3, $4, 0, 0, 0, 2147352576);\n    $5 = (($5 | 0) < 49149 ? $5 : 49149) + -32766 | 0;\n    $3 = HEAP32[$6 + 24 >> 2];\n    $4 = HEAP32[$6 + 28 >> 2];\n    $1 = HEAP32[$6 + 16 >> 2];\n    $2 = HEAP32[$6 + 20 >> 2];\n    break label$1;\n   }\n   if (($5 | 0) > -16383) {\n    break label$1\n   }\n   __multf3($6 - -64 | 0, $1, $2, $3, $4, 0, 0, 0, 65536);\n   $3 = HEAP32[$6 + 72 >> 2];\n   $4 = HEAP32[$6 + 76 >> 2];\n   $1 = HEAP32[$6 + 64 >> 2];\n   $2 = HEAP32[$6 + 68 >> 2];\n   if (($5 | 0) > -32765) {\n    $5 = $5 + 16382 | 0;\n    break label$1;\n   }\n   __multf3($6 + 48 | 0, $1, $2, $3, $4, 0, 0, 0, 65536);\n   $5 = (($5 | 0) > -49146 ? $5 : -49146) + 32764 | 0;\n   $3 = HEAP32[$6 + 56 >> 2];\n   $4 = HEAP32[$6 + 60 >> 2];\n   $1 = HEAP32[$6 + 48 >> 2];\n   $2 = HEAP32[$6 + 52 >> 2];\n  }\n  __multf3($6, $1, $2, $3, $4, 0, 0, 0, $5 + 16383 << 16);\n  $1 = HEAP32[$6 + 12 >> 2];\n  HEAP32[$0 + 8 >> 2] = HEAP32[$6 + 8 >> 2];\n  HEAP32[$0 + 12 >> 2] = $1;\n  $1 = HEAP32[$6 + 4 >> 2];\n  HEAP32[$0 >> 2] = HEAP32[$6 >> 2];\n  HEAP32[$0 + 4 >> 2] = $1;\n  global$0 = $6 + 80 | 0;\n }\n \n function __multi3($0, $1, $2, $3, $4) {\n  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0;\n  $5 = __wasm_i64_mul($1, $2, 0, 0);\n  $6 = i64toi32_i32$HIGH_BITS;\n  $7 = __wasm_i64_mul(0, 0, $3, $4);\n  $5 = $5 + $7 | 0;\n  $6 = i64toi32_i32$HIGH_BITS + $6 | 0;\n  $9 = __wasm_i64_mul($4, 0, $2, 0);\n  $8 = $5 + $9 | 0;\n  $5 = i64toi32_i32$HIGH_BITS + ($5 >>> 0 < $7 >>> 0 ? $6 + 1 | 0 : $6) | 0;\n  $6 = __wasm_i64_mul($3, 0, $1, 0);\n  $10 = i64toi32_i32$HIGH_BITS;\n  $7 = __wasm_i64_mul($2, 0, $3, 0);\n  $3 = $10 + $7 | 0;\n  $2 = $8 >>> 0 < $9 >>> 0 ? $5 + 1 | 0 : $5;\n  $5 = i64toi32_i32$HIGH_BITS;\n  $5 = $3 >>> 0 < $7 >>> 0 ? $5 + 1 | 0 : $5;\n  $8 = $5 + $8 | 0;\n  if ($8 >>> 0 < $5 >>> 0) {\n   $2 = $2 + 1 | 0\n  }\n  $1 = __wasm_i64_mul($1, 0, $4, 0) + $3 | 0;\n  $4 = i64toi32_i32$HIGH_BITS;\n  $3 = $1 >>> 0 < $3 >>> 0 ? $4 + 1 | 0 : $4;\n  $4 = $8 + $3 | 0;\n  if ($4 >>> 0 < $3 >>> 0) {\n   $2 = $2 + 1 | 0\n  }\n  HEAP32[$0 + 8 >> 2] = $4;\n  HEAP32[$0 + 12 >> 2] = $2;\n  HEAP32[$0 >> 2] = $6;\n  HEAP32[$0 + 4 >> 2] = $1;\n }\n \n function __divtf3($0, $1, $2, $3, $4, $5, $6, $7, $8) {\n  var $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0;\n  $13 = global$0 - 192 | 0;\n  global$0 = $13;\n  $29 = $7;\n  $32 = $8 & 65535;\n  $16 = $3;\n  $14 = $4 & 65535;\n  $28 = ($4 ^ $8) & -2147483648;\n  $17 = $8 >>> 16 & 32767;\n  label$1 : {\n   $19 = $4 >>> 16 & 32767;\n   label$2 : {\n    label$3 : {\n     if ($19 + -1 >>> 0 <= 32765) {\n      if ($17 + -1 >>> 0 < 32766) {\n       break label$3\n      }\n     }\n     $10 = $4 & 2147483647;\n     $11 = $10;\n     $9 = $3;\n     if (!(!$9 & ($10 | 0) == 2147418112 ? !($1 | $2) : ($10 | 0) == 2147418112 & $9 >>> 0 < 0 | $10 >>> 0 < 2147418112)) {\n      $33 = $3;\n      $28 = $4 | 32768;\n      break label$2;\n     }\n     $10 = $8 & 2147483647;\n     $4 = $10;\n     $3 = $7;\n     if (!(!$3 & ($10 | 0) == 2147418112 ? !($5 | $6) : ($10 | 0) == 2147418112 & $3 >>> 0 < 0 | $10 >>> 0 < 2147418112)) {\n      $33 = $7;\n      $28 = $8 | 32768;\n      $1 = $5;\n      $2 = $6;\n      break label$2;\n     }\n     if (!($1 | $9 | ($11 ^ 2147418112 | $2))) {\n      if (!($3 | $5 | ($4 ^ 2147418112 | $6))) {\n       $1 = 0;\n       $2 = 0;\n       $28 = 2147450880;\n       break label$2;\n      }\n      $28 = $28 | 2147418112;\n      $1 = 0;\n      $2 = 0;\n      break label$2;\n     }\n     if (!($3 | $5 | ($4 ^ 2147418112 | $6))) {\n      $1 = 0;\n      $2 = 0;\n      break label$2;\n     }\n     if (!($1 | $9 | ($2 | $11))) {\n      break label$1\n     }\n     if (!($3 | $5 | ($4 | $6))) {\n      $28 = $28 | 2147418112;\n      $1 = 0;\n      $2 = 0;\n      break label$2;\n     }\n     $10 = 0;\n     if (($11 | 0) == 65535 | $11 >>> 0 < 65535) {\n      $8 = $1;\n      $3 = !($14 | $16);\n      $7 = $3 << 6;\n      $9 = Math_clz32($3 ? $1 : $16) + 32 | 0;\n      $1 = Math_clz32($3 ? $2 : $14);\n      $1 = $7 + (($1 | 0) == 32 ? $9 : $1) | 0;\n      __ashlti3($13 + 176 | 0, $8, $2, $16, $14, $1 + -15 | 0);\n      $10 = 16 - $1 | 0;\n      $16 = HEAP32[$13 + 184 >> 2];\n      $14 = HEAP32[$13 + 188 >> 2];\n      $2 = HEAP32[$13 + 180 >> 2];\n      $1 = HEAP32[$13 + 176 >> 2];\n     }\n     if ($4 >>> 0 > 65535) {\n      break label$3\n     }\n     $3 = !($29 | $32);\n     $4 = $3 << 6;\n     $7 = Math_clz32($3 ? $5 : $29) + 32 | 0;\n     $3 = Math_clz32($3 ? $6 : $32);\n     $3 = $4 + (($3 | 0) == 32 ? $7 : $3) | 0;\n     __ashlti3($13 + 160 | 0, $5, $6, $29, $32, $3 + -15 | 0);\n     $10 = ($3 + $10 | 0) + -16 | 0;\n     $29 = HEAP32[$13 + 168 >> 2];\n     $32 = HEAP32[$13 + 172 >> 2];\n     $5 = HEAP32[$13 + 160 >> 2];\n     $6 = HEAP32[$13 + 164 >> 2];\n    }\n    $4 = $32 | 65536;\n    $31 = $4;\n    $38 = $29;\n    $3 = $29;\n    $12 = $4 << 15 | $3 >>> 17;\n    $3 = $3 << 15 | $6 >>> 17;\n    $7 = -102865788 - $3 | 0;\n    $4 = $12;\n    $9 = $4;\n    $8 = 1963258675 - ($9 + (4192101508 < $3 >>> 0) | 0) | 0;\n    __multi3($13 + 144 | 0, $3, $9, $7, $8);\n    $9 = HEAP32[$13 + 152 >> 2];\n    __multi3($13 + 128 | 0, 0 - $9 | 0, 0 - (HEAP32[$13 + 156 >> 2] + (0 < $9 >>> 0) | 0) | 0, $7, $8);\n    $7 = HEAP32[$13 + 136 >> 2];\n    $8 = $7 << 1 | HEAP32[$13 + 132 >> 2] >>> 31;\n    $7 = HEAP32[$13 + 140 >> 2] << 1 | $7 >>> 31;\n    __multi3($13 + 112 | 0, $8, $7, $3, $4);\n    $9 = $7;\n    $7 = HEAP32[$13 + 120 >> 2];\n    __multi3($13 + 96 | 0, $8, $9, 0 - $7 | 0, 0 - (HEAP32[$13 + 124 >> 2] + (0 < $7 >>> 0) | 0) | 0);\n    $7 = HEAP32[$13 + 104 >> 2];\n    $11 = HEAP32[$13 + 108 >> 2] << 1 | $7 >>> 31;\n    $8 = $7 << 1 | HEAP32[$13 + 100 >> 2] >>> 31;\n    __multi3($13 + 80 | 0, $8, $11, $3, $4);\n    $7 = HEAP32[$13 + 88 >> 2];\n    __multi3($13 - -64 | 0, $8, $11, 0 - $7 | 0, 0 - (HEAP32[$13 + 92 >> 2] + (0 < $7 >>> 0) | 0) | 0);\n    $7 = HEAP32[$13 + 72 >> 2];\n    $8 = $7 << 1 | HEAP32[$13 + 68 >> 2] >>> 31;\n    $7 = HEAP32[$13 + 76 >> 2] << 1 | $7 >>> 31;\n    __multi3($13 + 48 | 0, $8, $7, $3, $4);\n    $9 = $7;\n    $7 = HEAP32[$13 + 56 >> 2];\n    __multi3($13 + 32 | 0, $8, $9, 0 - $7 | 0, 0 - (HEAP32[$13 + 60 >> 2] + (0 < $7 >>> 0) | 0) | 0);\n    $7 = HEAP32[$13 + 40 >> 2];\n    $11 = HEAP32[$13 + 44 >> 2] << 1 | $7 >>> 31;\n    $8 = $7 << 1 | HEAP32[$13 + 36 >> 2] >>> 31;\n    __multi3($13 + 16 | 0, $8, $11, $3, $4);\n    $7 = HEAP32[$13 + 24 >> 2];\n    __multi3($13, $8, $11, 0 - $7 | 0, 0 - (HEAP32[$13 + 28 >> 2] + (0 < $7 >>> 0) | 0) | 0);\n    $34 = ($19 - $17 | 0) + $10 | 0;\n    $7 = HEAP32[$13 + 8 >> 2];\n    $9 = HEAP32[$13 + 12 >> 2] << 1 | $7 >>> 31;\n    $8 = $7 << 1;\n    $10 = $9 + -1 | 0;\n    $8 = (HEAP32[$13 + 4 >> 2] >>> 31 | $8) + -1 | 0;\n    if (($8 | 0) != -1) {\n     $10 = $10 + 1 | 0\n    }\n    $7 = $8;\n    $9 = 0;\n    $21 = $9;\n    $20 = $4;\n    $11 = 0;\n    $12 = __wasm_i64_mul($7, $9, $4, $11);\n    $4 = i64toi32_i32$HIGH_BITS;\n    $19 = $4;\n    $22 = $10;\n    $17 = 0;\n    $9 = $3;\n    $7 = __wasm_i64_mul($10, $17, $9, 0);\n    $3 = $7 + $12 | 0;\n    $10 = i64toi32_i32$HIGH_BITS + $4 | 0;\n    $10 = $3 >>> 0 < $7 >>> 0 ? $10 + 1 | 0 : $10;\n    $7 = $3;\n    $3 = $10;\n    $15 = __wasm_i64_mul($8, $21, $9, $15);\n    $4 = 0 + $15 | 0;\n    $10 = $7;\n    $9 = $10 + i64toi32_i32$HIGH_BITS | 0;\n    $9 = $4 >>> 0 < $15 >>> 0 ? $9 + 1 | 0 : $9;\n    $15 = $4;\n    $4 = $9;\n    $9 = ($10 | 0) == ($9 | 0) & $15 >>> 0 < $23 >>> 0 | $9 >>> 0 < $10 >>> 0;\n    $10 = ($3 | 0) == ($19 | 0) & $10 >>> 0 < $12 >>> 0 | $3 >>> 0 < $19 >>> 0;\n    $7 = $3;\n    $3 = __wasm_i64_mul($22, $17, $20, $11) + $3 | 0;\n    $11 = $10 + i64toi32_i32$HIGH_BITS | 0;\n    $11 = $3 >>> 0 < $7 >>> 0 ? $11 + 1 | 0 : $11;\n    $7 = $3;\n    $3 = $9 + $3 | 0;\n    $9 = $11;\n    $26 = $3;\n    $7 = $3 >>> 0 < $7 >>> 0 ? $9 + 1 | 0 : $9;\n    $3 = $6;\n    $24 = ($3 & 131071) << 15 | $5 >>> 17;\n    $20 = __wasm_i64_mul($8, $21, $24, 0);\n    $3 = i64toi32_i32$HIGH_BITS;\n    $23 = $3;\n    $10 = $5;\n    $18 = $10 << 15 & -32768;\n    $11 = __wasm_i64_mul($22, $17, $18, 0);\n    $9 = $11 + $20 | 0;\n    $10 = i64toi32_i32$HIGH_BITS + $3 | 0;\n    $10 = $9 >>> 0 < $11 >>> 0 ? $10 + 1 | 0 : $10;\n    $3 = $10;\n    $25 = __wasm_i64_mul($8, $21, $18, $25);\n    $18 = 0 + $25 | 0;\n    $10 = $9 + i64toi32_i32$HIGH_BITS | 0;\n    $10 = $18 >>> 0 < $25 >>> 0 ? $10 + 1 | 0 : $10;\n    $10 = ($9 | 0) == ($10 | 0) & $18 >>> 0 < $30 >>> 0 | $10 >>> 0 < $9 >>> 0;\n    $9 = ($3 | 0) == ($23 | 0) & $9 >>> 0 < $20 >>> 0 | $3 >>> 0 < $23 >>> 0;\n    $12 = $3;\n    $3 = __wasm_i64_mul($22, $17, $24, $27) + $3 | 0;\n    $11 = $9 + i64toi32_i32$HIGH_BITS | 0;\n    $11 = $3 >>> 0 < $12 >>> 0 ? $11 + 1 | 0 : $11;\n    $9 = $3;\n    $3 = $10 + $9 | 0;\n    $12 = $3 >>> 0 < $9 >>> 0 ? $11 + 1 | 0 : $11;\n    $10 = $3;\n    $3 = $15 + $3 | 0;\n    $9 = $12 + $4 | 0;\n    $9 = $3 >>> 0 < $10 >>> 0 ? $9 + 1 | 0 : $9;\n    $19 = $3;\n    $10 = $7;\n    $20 = $9;\n    $3 = ($4 | 0) == ($9 | 0) & $3 >>> 0 < $15 >>> 0 | $9 >>> 0 < $4 >>> 0;\n    $4 = $3 + $26 | 0;\n    if ($4 >>> 0 < $3 >>> 0) {\n     $10 = $10 + 1 | 0\n    }\n    $9 = $10;\n    $3 = ($19 | 0) != 0 | ($20 | 0) != 0;\n    $4 = $4 + $3 | 0;\n    if ($4 >>> 0 < $3 >>> 0) {\n     $9 = $9 + 1 | 0\n    }\n    $10 = $4;\n    $4 = 0 - $10 | 0;\n    $15 = 0;\n    $7 = __wasm_i64_mul($4, $15, $8, $21);\n    $3 = i64toi32_i32$HIGH_BITS;\n    $23 = $3;\n    $18 = __wasm_i64_mul($22, $17, $4, $15);\n    $4 = i64toi32_i32$HIGH_BITS;\n    $26 = $4;\n    $24 = 0 - ((0 < $10 >>> 0) + $9 | 0) | 0;\n    $9 = 0;\n    $15 = __wasm_i64_mul($8, $21, $24, $9);\n    $12 = $15 + $18 | 0;\n    $10 = i64toi32_i32$HIGH_BITS + $4 | 0;\n    $10 = $12 >>> 0 < $15 >>> 0 ? $10 + 1 | 0 : $10;\n    $4 = $12;\n    $15 = 0 + $7 | 0;\n    $11 = $3 + $4 | 0;\n    $11 = $15 >>> 0 < $27 >>> 0 ? $11 + 1 | 0 : $11;\n    $12 = $15;\n    $3 = $11;\n    $11 = ($23 | 0) == ($3 | 0) & $12 >>> 0 < $7 >>> 0 | $3 >>> 0 < $23 >>> 0;\n    $12 = ($10 | 0) == ($26 | 0) & $4 >>> 0 < $18 >>> 0 | $10 >>> 0 < $26 >>> 0;\n    $4 = __wasm_i64_mul($22, $17, $24, $9) + $10 | 0;\n    $9 = $12 + i64toi32_i32$HIGH_BITS | 0;\n    $9 = $4 >>> 0 < $10 >>> 0 ? $9 + 1 | 0 : $9;\n    $7 = $4;\n    $4 = $11 + $4 | 0;\n    if ($4 >>> 0 < $7 >>> 0) {\n     $9 = $9 + 1 | 0\n    }\n    $24 = $4;\n    $7 = $9;\n    $4 = 0 - $19 | 0;\n    $27 = 0 - ((0 < $19 >>> 0) + $20 | 0) | 0;\n    $19 = 0;\n    $26 = __wasm_i64_mul($27, $19, $8, $21);\n    $18 = i64toi32_i32$HIGH_BITS;\n    $20 = $4;\n    $25 = 0;\n    $9 = __wasm_i64_mul($4, $25, $22, $17);\n    $4 = $9 + $26 | 0;\n    $10 = i64toi32_i32$HIGH_BITS + $18 | 0;\n    $11 = $4;\n    $4 = $4 >>> 0 < $9 >>> 0 ? $10 + 1 | 0 : $10;\n    $20 = __wasm_i64_mul($8, $21, $20, $25);\n    $8 = 0 + $20 | 0;\n    $9 = $11;\n    $10 = $9 + i64toi32_i32$HIGH_BITS | 0;\n    $10 = $8 >>> 0 < $20 >>> 0 ? $10 + 1 | 0 : $10;\n    $10 = ($9 | 0) == ($10 | 0) & $8 >>> 0 < $30 >>> 0 | $10 >>> 0 < $9 >>> 0;\n    $9 = ($4 | 0) == ($18 | 0) & $9 >>> 0 < $26 >>> 0 | $4 >>> 0 < $18 >>> 0;\n    $8 = $4;\n    $4 = __wasm_i64_mul($27, $19, $22, $17) + $4 | 0;\n    $12 = $9 + i64toi32_i32$HIGH_BITS | 0;\n    $12 = $4 >>> 0 < $8 >>> 0 ? $12 + 1 | 0 : $12;\n    $8 = $4;\n    $4 = $10 + $4 | 0;\n    $9 = $12;\n    $9 = $4 >>> 0 < $8 >>> 0 ? $9 + 1 | 0 : $9;\n    $8 = $4;\n    $4 = $15 + $4 | 0;\n    $9 = $9 + $3 | 0;\n    $9 = $4 >>> 0 < $8 >>> 0 ? $9 + 1 | 0 : $9;\n    $8 = $4;\n    $10 = $7;\n    $4 = $9;\n    $3 = ($3 | 0) == ($9 | 0) & $8 >>> 0 < $15 >>> 0 | $9 >>> 0 < $3 >>> 0;\n    $7 = $3 + $24 | 0;\n    if ($7 >>> 0 < $3 >>> 0) {\n     $10 = $10 + 1 | 0\n    }\n    $3 = $7;\n    $9 = $10;\n    $12 = $3;\n    $11 = $4 + -1 | 0;\n    $3 = $8 + -2 | 0;\n    if ($3 >>> 0 < 4294967294) {\n     $11 = $11 + 1 | 0\n    }\n    $7 = $3;\n    $10 = $3;\n    $3 = $11;\n    $4 = ($4 | 0) == ($3 | 0) & $10 >>> 0 < $8 >>> 0 | $3 >>> 0 < $4 >>> 0;\n    $8 = $12 + $4 | 0;\n    if ($8 >>> 0 < $4 >>> 0) {\n     $9 = $9 + 1 | 0\n    }\n    $4 = $8 + -1 | 0;\n    $10 = $9 + -1 | 0;\n    $10 = ($4 | 0) != -1 ? $10 + 1 | 0 : $10;\n    $8 = 0;\n    $22 = $8;\n    $17 = $4;\n    $9 = $16;\n    $18 = $9 << 2 | $2 >>> 30;\n    $24 = 0;\n    $12 = __wasm_i64_mul($4, $8, $18, $24);\n    $8 = i64toi32_i32$HIGH_BITS;\n    $15 = $8;\n    $11 = $8;\n    $8 = $2;\n    $27 = ($8 & 1073741823) << 2 | $1 >>> 30;\n    $25 = $10;\n    $8 = 0;\n    $9 = __wasm_i64_mul($27, 0, $10, $8);\n    $4 = $9 + $12 | 0;\n    $11 = i64toi32_i32$HIGH_BITS + $11 | 0;\n    $11 = $4 >>> 0 < $9 >>> 0 ? $11 + 1 | 0 : $11;\n    $9 = $4;\n    $20 = $11;\n    $23 = ($15 | 0) == ($11 | 0) & $9 >>> 0 < $12 >>> 0 | $11 >>> 0 < $15 >>> 0;\n    $12 = $11;\n    $11 = 0;\n    $15 = $11;\n    $10 = 0;\n    $26 = $3;\n    $30 = (($14 & 1073741823) << 2 | $16 >>> 30) & -262145 | 262144;\n    $4 = __wasm_i64_mul($3, $11, $30, 0);\n    $3 = $4 + $9 | 0;\n    $12 = i64toi32_i32$HIGH_BITS + $12 | 0;\n    $12 = $3 >>> 0 < $4 >>> 0 ? $12 + 1 | 0 : $12;\n    $16 = $3;\n    $4 = $12;\n    $3 = ($20 | 0) == ($4 | 0) & $3 >>> 0 < $9 >>> 0 | $4 >>> 0 < $20 >>> 0;\n    $9 = $3 + $23 | 0;\n    if ($9 >>> 0 < $3 >>> 0) {\n     $10 = 1\n    }\n    $11 = __wasm_i64_mul($25, $8, $30, $35);\n    $3 = $11 + $9 | 0;\n    $9 = i64toi32_i32$HIGH_BITS + $10 | 0;\n    $10 = $3 >>> 0 < $11 >>> 0 ? $9 + 1 | 0 : $9;\n    $11 = __wasm_i64_mul($17, $22, $30, $35);\n    $9 = i64toi32_i32$HIGH_BITS;\n    $2 = $3;\n    $14 = __wasm_i64_mul($18, $24, $25, $8);\n    $3 = $14 + $11 | 0;\n    $12 = i64toi32_i32$HIGH_BITS + $9 | 0;\n    $12 = $3 >>> 0 < $14 >>> 0 ? $12 + 1 | 0 : $12;\n    $14 = $3;\n    $3 = $12;\n    $12 = ($9 | 0) == ($3 | 0) & $14 >>> 0 < $11 >>> 0 | $3 >>> 0 < $9 >>> 0;\n    $11 = $2 + $3 | 0;\n    $10 = $10 + $12 | 0;\n    $9 = $11;\n    $12 = $9 >>> 0 < $3 >>> 0 ? $10 + 1 | 0 : $10;\n    $2 = $9;\n    $11 = $4 + $14 | 0;\n    $10 = 0;\n    $3 = $10 + $16 | 0;\n    if ($3 >>> 0 < $10 >>> 0) {\n     $11 = $11 + 1 | 0\n    }\n    $14 = $3;\n    $9 = $3;\n    $3 = $11;\n    $4 = ($4 | 0) == ($3 | 0) & $9 >>> 0 < $16 >>> 0 | $3 >>> 0 < $4 >>> 0;\n    $9 = $2 + $4 | 0;\n    if ($9 >>> 0 < $4 >>> 0) {\n     $12 = $12 + 1 | 0\n    }\n    $39 = $9;\n    $4 = $14;\n    $10 = $3;\n    $16 = __wasm_i64_mul($27, $19, $26, $15);\n    $11 = i64toi32_i32$HIGH_BITS;\n    $20 = $7;\n    $23 = __wasm_i64_mul($7, 0, $18, $24);\n    $7 = $23 + $16 | 0;\n    $9 = i64toi32_i32$HIGH_BITS + $11 | 0;\n    $9 = $7 >>> 0 < $23 >>> 0 ? $9 + 1 | 0 : $9;\n    $21 = $7;\n    $7 = $9;\n    $16 = ($11 | 0) == ($9 | 0) & $21 >>> 0 < $16 >>> 0 | $9 >>> 0 < $11 >>> 0;\n    $11 = $9;\n    $40 = $4;\n    $9 = 0;\n    $41 = $16;\n    $36 = $1 << 2 & -4;\n    $2 = 0;\n    $16 = __wasm_i64_mul($17, $22, $36, $2);\n    $4 = $16 + $21 | 0;\n    $11 = i64toi32_i32$HIGH_BITS + $11 | 0;\n    $11 = $4 >>> 0 < $16 >>> 0 ? $11 + 1 | 0 : $11;\n    $23 = $4;\n    $16 = $4;\n    $4 = $11;\n    $7 = ($7 | 0) == ($4 | 0) & $16 >>> 0 < $21 >>> 0 | $4 >>> 0 < $7 >>> 0;\n    $11 = $41 + $7 | 0;\n    if ($11 >>> 0 < $7 >>> 0) {\n     $9 = 1\n    }\n    $7 = $40 + $11 | 0;\n    $10 = $9 + $10 | 0;\n    $10 = $7 >>> 0 < $11 >>> 0 ? $10 + 1 | 0 : $10;\n    $16 = $7;\n    $11 = $12;\n    $7 = $10;\n    $3 = ($3 | 0) == ($10 | 0) & $16 >>> 0 < $14 >>> 0 | $10 >>> 0 < $3 >>> 0;\n    $9 = $3 + $39 | 0;\n    if ($9 >>> 0 < $3 >>> 0) {\n     $11 = $11 + 1 | 0\n    }\n    $40 = $9;\n    $14 = $16;\n    $21 = $7;\n    $39 = __wasm_i64_mul($25, $8, $36, $2);\n    $25 = i64toi32_i32$HIGH_BITS;\n    $8 = __wasm_i64_mul($30, $35, $20, $37);\n    $3 = $8 + $39 | 0;\n    $12 = i64toi32_i32$HIGH_BITS + $25 | 0;\n    $12 = $3 >>> 0 < $8 >>> 0 ? $12 + 1 | 0 : $12;\n    $30 = $3;\n    $9 = __wasm_i64_mul($18, $24, $26, $15);\n    $3 = $3 + $9 | 0;\n    $8 = $12;\n    $10 = $8 + i64toi32_i32$HIGH_BITS | 0;\n    $10 = $3 >>> 0 < $9 >>> 0 ? $10 + 1 | 0 : $10;\n    $18 = $3;\n    $12 = __wasm_i64_mul($17, $22, $27, $19);\n    $3 = $3 + $12 | 0;\n    $9 = i64toi32_i32$HIGH_BITS + $10 | 0;\n    $17 = $3;\n    $9 = $3 >>> 0 < $12 >>> 0 ? $9 + 1 | 0 : $9;\n    $22 = 0;\n    $12 = $11;\n    $3 = $9;\n    $9 = ($9 | 0) == ($10 | 0) & $17 >>> 0 < $18 >>> 0 | $9 >>> 0 < $10 >>> 0;\n    $11 = ($8 | 0) == ($25 | 0) & $30 >>> 0 < $39 >>> 0 | $8 >>> 0 < $25 >>> 0;\n    $8 = ($8 | 0) == ($10 | 0) & $18 >>> 0 < $30 >>> 0 | $10 >>> 0 < $8 >>> 0;\n    $10 = $11 + $8 | 0;\n    $10 >>> 0 < $8 >>> 0;\n    $8 = $9 + $10 | 0;\n    $10 = $8;\n    $9 = $3 | 0;\n    $8 = $9 + $14 | 0;\n    $10 = ($10 | $22) + $21 | 0;\n    $10 = $8 >>> 0 < $9 >>> 0 ? $10 + 1 | 0 : $10;\n    $21 = $8;\n    $14 = $10;\n    $7 = ($7 | 0) == ($10 | 0) & $8 >>> 0 < $16 >>> 0 | $10 >>> 0 < $7 >>> 0;\n    $8 = $7 + $40 | 0;\n    if ($8 >>> 0 < $7 >>> 0) {\n     $12 = $12 + 1 | 0\n    }\n    $24 = $8;\n    $8 = $12;\n    $12 = $21;\n    $16 = $14;\n    $22 = $23;\n    $26 = __wasm_i64_mul($26, $15, $36, $2);\n    $15 = i64toi32_i32$HIGH_BITS;\n    $9 = __wasm_i64_mul($27, $19, $20, $37);\n    $7 = $9 + $26 | 0;\n    $11 = i64toi32_i32$HIGH_BITS + $15 | 0;\n    $11 = $7 >>> 0 < $9 >>> 0 ? $11 + 1 | 0 : $11;\n    $10 = $11;\n    $19 = $10;\n    $11 = 0;\n    $9 = ($10 | 0) == ($15 | 0) & $7 >>> 0 < $26 >>> 0 | $10 >>> 0 < $15 >>> 0;\n    $7 = $10 + $22 | 0;\n    $10 = ($9 | $11) + $4 | 0;\n    $10 = $7 >>> 0 < $19 >>> 0 ? $10 + 1 | 0 : $10;\n    $19 = $7;\n    $9 = $7;\n    $7 = $10;\n    $9 = ($4 | 0) == ($10 | 0) & $9 >>> 0 < $22 >>> 0 | $10 >>> 0 < $4 >>> 0;\n    $23 = $12;\n    $4 = $9;\n    $9 = $10 + $17 | 0;\n    $12 = 0;\n    $3 = $12 + $19 | 0;\n    if ($3 >>> 0 < $12 >>> 0) {\n     $9 = $9 + 1 | 0\n    }\n    $3 = ($7 | 0) == ($9 | 0) & $3 >>> 0 < $19 >>> 0 | $9 >>> 0 < $7 >>> 0;\n    $4 = $4 + $3 | 0;\n    if ($4 >>> 0 < $3 >>> 0) {\n     $11 = 1\n    }\n    $3 = $23 + $4 | 0;\n    $12 = $11 + $16 | 0;\n    $7 = $3;\n    $9 = $8;\n    $12 = $3 >>> 0 < $4 >>> 0 ? $12 + 1 | 0 : $12;\n    $8 = $12;\n    $3 = ($14 | 0) == ($8 | 0) & $3 >>> 0 < $21 >>> 0 | $8 >>> 0 < $14 >>> 0;\n    $4 = $3 + $24 | 0;\n    if ($4 >>> 0 < $3 >>> 0) {\n     $9 = $9 + 1 | 0\n    }\n    $3 = $4;\n    $4 = $9;\n    label$12 : {\n     if (($9 | 0) == 131071 | $9 >>> 0 < 131071) {\n      $22 = 0;\n      $14 = $5;\n      $18 = 0;\n      $10 = __wasm_i64_mul($7, $22, $14, $18);\n      $11 = i64toi32_i32$HIGH_BITS;\n      $9 = $1 << 17;\n      $1 = 0;\n      $2 = ($10 | 0) != 0 | ($11 | 0) != 0;\n      $16 = $1 - $2 | 0;\n      $30 = $9 - ($1 >>> 0 < $2 >>> 0) | 0;\n      $19 = 0 - $10 | 0;\n      $15 = 0 - ((0 < $10 >>> 0) + $11 | 0) | 0;\n      $2 = 0;\n      $24 = __wasm_i64_mul($8, $2, $14, $18);\n      $1 = i64toi32_i32$HIGH_BITS;\n      $27 = $1;\n      $17 = 0;\n      $10 = __wasm_i64_mul($7, $22, $6, $17);\n      $9 = $10 + $24 | 0;\n      $11 = i64toi32_i32$HIGH_BITS + $1 | 0;\n      $11 = $9 >>> 0 < $10 >>> 0 ? $11 + 1 | 0 : $11;\n      $1 = $9;\n      $10 = $9;\n      $20 = 0;\n      $9 = $20;\n      $23 = $10;\n      $9 = ($10 | 0) == ($15 | 0) & $19 >>> 0 < $9 >>> 0 | $15 >>> 0 < $10 >>> 0;\n      $21 = $16 - $9 | 0;\n      $30 = $30 - ($16 >>> 0 < $9 >>> 0) | 0;\n      $9 = __wasm_i64_mul($3, 0, $14, $18);\n      $10 = i64toi32_i32$HIGH_BITS;\n      $14 = __wasm_i64_mul($7, $22, $29, 0);\n      $9 = $14 + $9 | 0;\n      $12 = i64toi32_i32$HIGH_BITS + $10 | 0;\n      $12 = $9 >>> 0 < $14 >>> 0 ? $12 + 1 | 0 : $12;\n      $14 = __wasm_i64_mul($8, $2, $6, $17);\n      $9 = $14 + $9 | 0;\n      $10 = i64toi32_i32$HIGH_BITS + $12 | 0;\n      $10 = $9 >>> 0 < $14 >>> 0 ? $10 + 1 | 0 : $10;\n      $12 = $10;\n      $10 = ($11 | 0) == ($27 | 0) & $1 >>> 0 < $24 >>> 0 | $11 >>> 0 < $27 >>> 0;\n      $1 = $11 + $9 | 0;\n      $10 = $10 + $12 | 0;\n      $10 = $1 >>> 0 < $11 >>> 0 ? $10 + 1 | 0 : $10;\n      $11 = $1;\n      $1 = $10;\n      $9 = __wasm_i64_mul($7, $8, $31, 0);\n      $14 = i64toi32_i32$HIGH_BITS;\n      $16 = $11;\n      $11 = __wasm_i64_mul($5, $6, $4, 0);\n      $10 = $11 + $9 | 0;\n      $9 = i64toi32_i32$HIGH_BITS + $14 | 0;\n      $9 = $10 >>> 0 < $11 >>> 0 ? $9 + 1 | 0 : $9;\n      $12 = __wasm_i64_mul($3, $4, $6, $17);\n      $11 = $12 + $10 | 0;\n      $9 = __wasm_i64_mul($8, $2, $29, $32);\n      $2 = $9 + $11 | 0;\n      $9 = $2;\n      $10 = 0;\n      $2 = $16 + $10 | 0;\n      $9 = $1 + $9 | 0;\n      $1 = $2;\n      $16 = $21 - $1 | 0;\n      $2 = $30 - (($21 >>> 0 < $1 >>> 0) + ($1 >>> 0 < $10 >>> 0 ? $9 + 1 | 0 : $9) | 0) | 0;\n      $34 = $34 + -1 | 0;\n      $29 = $19 - $20 | 0;\n      $1 = $15 - (($19 >>> 0 < $20 >>> 0) + $23 | 0) | 0;\n      break label$12;\n     }\n     $17 = $8 >>> 1 | 0;\n     $11 = 0;\n     $12 = $1 << 16;\n     $10 = $3 << 31;\n     $7 = ($8 & 1) << 31 | $7 >>> 1;\n     $8 = $8 >>> 1 | $10;\n     $27 = 0;\n     $25 = 0;\n     $1 = __wasm_i64_mul($7, $27, $5, $25);\n     $9 = i64toi32_i32$HIGH_BITS;\n     $10 = $9;\n     $9 = ($1 | 0) != 0 | ($9 | 0) != 0;\n     $14 = $2 - $9 | 0;\n     $37 = $12 - ($2 >>> 0 < $9 >>> 0) | 0;\n     $21 = 0 - $1 | 0;\n     $22 = 0 - ((0 < $1 >>> 0) + $10 | 0) | 0;\n     $12 = $22;\n     $15 = 0;\n     $20 = __wasm_i64_mul($7, $27, $6, $15);\n     $1 = i64toi32_i32$HIGH_BITS;\n     $35 = $1;\n     $23 = $17 | $3 << 31;\n     $36 = $4 << 31 | $3 >>> 1 | $11;\n     $10 = $23;\n     $17 = __wasm_i64_mul($10, 0, $5, $25);\n     $2 = $17 + $20 | 0;\n     $9 = i64toi32_i32$HIGH_BITS + $1 | 0;\n     $9 = $2 >>> 0 < $17 >>> 0 ? $9 + 1 | 0 : $9;\n     $1 = $9;\n     $9 = $2;\n     $26 = $9;\n     $18 = 0;\n     $9 = ($9 | 0) == ($12 | 0) & $21 >>> 0 < $18 >>> 0 | $12 >>> 0 < $9 >>> 0;\n     $24 = $14 - $9 | 0;\n     $37 = $37 - ($14 >>> 0 < $9 >>> 0) | 0;\n     $10 = __wasm_i64_mul($6, $15, $10, $11);\n     $11 = i64toi32_i32$HIGH_BITS;\n     $9 = $4;\n     $12 = $9 >>> 1 | 0;\n     $17 = ($9 & 1) << 31 | $3 >>> 1;\n     $14 = $12;\n     $12 = __wasm_i64_mul($17, 0, $5, $25);\n     $9 = $12 + $10 | 0;\n     $10 = i64toi32_i32$HIGH_BITS + $11 | 0;\n     $10 = $9 >>> 0 < $12 >>> 0 ? $10 + 1 | 0 : $10;\n     $12 = __wasm_i64_mul($7, $27, $29, 0);\n     $11 = $12 + $9 | 0;\n     $9 = i64toi32_i32$HIGH_BITS + $10 | 0;\n     $10 = $11;\n     $11 = $10 >>> 0 < $12 >>> 0 ? $9 + 1 | 0 : $9;\n     $9 = ($1 | 0) == ($35 | 0) & $2 >>> 0 < $20 >>> 0 | $1 >>> 0 < $35 >>> 0;\n     $2 = $1;\n     $1 = $1 + $10 | 0;\n     $11 = $9 + $11 | 0;\n     $9 = $1;\n     $1 = $9 >>> 0 < $2 >>> 0 ? $11 + 1 | 0 : $11;\n     $2 = __wasm_i64_mul($7, $8, $31, 0);\n     $10 = i64toi32_i32$HIGH_BITS;\n     $11 = $9;\n     $3 = __wasm_i64_mul($5, $6, $4 >>> 1 | 0, 0);\n     $2 = $3 + $2 | 0;\n     $9 = i64toi32_i32$HIGH_BITS + $10 | 0;\n     $9 = $2 >>> 0 < $3 >>> 0 ? $9 + 1 | 0 : $9;\n     $3 = __wasm_i64_mul($6, $15, $17, $14);\n     $2 = $3 + $2 | 0;\n     $9 = i64toi32_i32$HIGH_BITS + $9 | 0;\n     $3 = __wasm_i64_mul($23, $36, $29, $32);\n     $2 = $3 + $2 | 0;\n     $9 = $2;\n     $3 = 0;\n     $2 = $11 + $3 | 0;\n     $10 = $1 + $9 | 0;\n     $1 = $2;\n     $16 = $24 - $1 | 0;\n     $2 = $37 - (($24 >>> 0 < $1 >>> 0) + ($1 >>> 0 < $3 >>> 0 ? $10 + 1 | 0 : $10) | 0) | 0;\n     $3 = $17;\n     $4 = $14;\n     $29 = $21 - $18 | 0;\n     $1 = $22 - (($21 >>> 0 < $18 >>> 0) + $26 | 0) | 0;\n    }\n    if (($34 | 0) >= 16384) {\n     $28 = $28 | 2147418112;\n     $1 = 0;\n     $2 = 0;\n     break label$2;\n    }\n    $11 = $34 + 16383 | 0;\n    if (($34 | 0) <= -16383) {\n     label$16 : {\n      if ($11) {\n       break label$16\n      }\n      $11 = $8;\n      $14 = $29;\n      $12 = $1 << 1 | $14 >>> 31;\n      $9 = $14 << 1;\n      $6 = ($6 | 0) == ($12 | 0) & $9 >>> 0 > $5 >>> 0 | $12 >>> 0 > $6 >>> 0;\n      $9 = $4 & 65535;\n      $5 = $16;\n      $12 = $2 << 1 | $5 >>> 31;\n      $2 = $5 << 1 | $1 >>> 31;\n      $4 = $2;\n      $1 = $12;\n      $1 = ($4 | 0) == ($38 | 0) & ($1 | 0) == ($31 | 0) ? $6 : ($31 | 0) == ($1 | 0) & $4 >>> 0 > $38 >>> 0 | $1 >>> 0 > $31 >>> 0;\n      $2 = $1 + $7 | 0;\n      if ($2 >>> 0 < $1 >>> 0) {\n       $11 = $11 + 1 | 0\n      }\n      $1 = $2;\n      $4 = $1;\n      $2 = $11;\n      $4 = $3 + (($8 | 0) == ($11 | 0) & $4 >>> 0 < $7 >>> 0 | $11 >>> 0 < $8 >>> 0) | 0;\n      if ($4 >>> 0 < $3 >>> 0) {\n       $9 = $9 + 1 | 0\n      }\n      $3 = $9;\n      if (!($9 & 65536)) {\n       break label$16\n      }\n      $33 = $4 | $33;\n      $28 = $3 | $28;\n      break label$2;\n     }\n     $1 = 0;\n     $2 = 0;\n     break label$2;\n    }\n    $10 = $8;\n    $4 = $4 & 65535;\n    $14 = $29;\n    $9 = $1 << 1 | $14 >>> 31;\n    $14 = $14 << 1;\n    $6 = ($6 | 0) == ($9 | 0) & $14 >>> 0 >= $5 >>> 0 | $9 >>> 0 > $6 >>> 0;\n    $5 = $16;\n    $9 = $2 << 1 | $5 >>> 31;\n    $2 = $5 << 1 | $1 >>> 31;\n    $1 = ($2 | 0) == ($38 | 0) & ($9 | 0) == ($31 | 0) ? $6 : ($31 | 0) == ($9 | 0) & $2 >>> 0 >= $38 >>> 0 | $9 >>> 0 > $31 >>> 0;\n    $2 = $1 + $7 | 0;\n    if ($2 >>> 0 < $1 >>> 0) {\n     $10 = $10 + 1 | 0\n    }\n    $1 = $2;\n    $2 = $10;\n    $5 = $3;\n    $3 = (($8 | 0) == ($10 | 0) & $1 >>> 0 < $7 >>> 0 | $10 >>> 0 < $8 >>> 0) + $3 | 0;\n    $10 = $11 << 16 | $4;\n    $33 = $3 | $33;\n    $28 = $28 | ($3 >>> 0 < $5 >>> 0 ? $10 + 1 | 0 : $10);\n   }\n   HEAP32[$0 >> 2] = $1;\n   HEAP32[$0 + 4 >> 2] = $2;\n   HEAP32[$0 + 8 >> 2] = $33;\n   HEAP32[$0 + 12 >> 2] = $28;\n   global$0 = $13 + 192 | 0;\n   return;\n  }\n  HEAP32[$0 >> 2] = 0;\n  HEAP32[$0 + 4 >> 2] = 0;\n  $1 = !($3 | $5 | ($4 | $6));\n  HEAP32[$0 + 8 >> 2] = $1 ? 0 : $33;\n  HEAP32[$0 + 12 >> 2] = $1 ? 2147450880 : $28;\n  global$0 = $13 + 192 | 0;\n }\n \n function __fpclassifyl($0, $1, $2, $3) {\n  var $4 = 0, $5 = 0;\n  $5 = $3 & 65535;\n  $3 = $3 >>> 16 & 32767;\n  label$1 : {\n   if (($3 | 0) != 32767) {\n    $4 = 4;\n    if ($3) {\n     break label$1\n    }\n    return $0 | $2 | ($1 | $5) ? 3 : 2;\n   }\n   $4 = !($0 | $2 | ($1 | $5));\n  }\n  return $4;\n }\n \n function fmodl($0, $1, $2, $3, $4, $5, $6, $7, $8) {\n  var $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0;\n  $9 = global$0 - 128 | 0;\n  global$0 = $9;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     if (!__letf2($5, $6, $7, $8, 0, 0, 0, 0)) {\n      break label$3\n     }\n     $10 = __fpclassifyl($5, $6, $7, $8);\n     $19 = $4 >>> 16 | 0;\n     $14 = $19 & 32767;\n     if (($14 | 0) == 32767) {\n      break label$3\n     }\n     if ($10) {\n      break label$2\n     }\n    }\n    __multf3($9 + 16 | 0, $1, $2, $3, $4, $5, $6, $7, $8);\n    $4 = HEAP32[$9 + 16 >> 2];\n    $3 = HEAP32[$9 + 20 >> 2];\n    $2 = HEAP32[$9 + 24 >> 2];\n    $1 = HEAP32[$9 + 28 >> 2];\n    __divtf3($9, $4, $3, $2, $1, $4, $3, $2, $1);\n    $3 = HEAP32[$9 + 8 >> 2];\n    $4 = HEAP32[$9 + 12 >> 2];\n    $7 = HEAP32[$9 >> 2];\n    $8 = HEAP32[$9 + 4 >> 2];\n    break label$1;\n   }\n   $11 = $4 & 65535 | $14 << 16;\n   $12 = $11;\n   $13 = $3;\n   $15 = $7;\n   $18 = $8 >>> 16 & 32767;\n   $10 = $8 & 65535 | $18 << 16;\n   if ((__letf2($1, $2, $13, $12, $5, $6, $7, $10) | 0) <= 0) {\n    if (__letf2($1, $2, $13, $12, $5, $6, $15, $10)) {\n     $7 = $1;\n     $8 = $2;\n     break label$1;\n    }\n    __multf3($9 + 112 | 0, $1, $2, $3, $4, 0, 0, 0, 0);\n    $3 = HEAP32[$9 + 120 >> 2];\n    $4 = HEAP32[$9 + 124 >> 2];\n    $7 = HEAP32[$9 + 112 >> 2];\n    $8 = HEAP32[$9 + 116 >> 2];\n    break label$1;\n   }\n   if ($14) {\n    $8 = $2;\n    $7 = $1;\n   } else {\n    __multf3($9 + 96 | 0, $1, $2, $13, $12, 0, 0, 0, 1081540608);\n    $7 = HEAP32[$9 + 108 >> 2];\n    $12 = $7;\n    $13 = HEAP32[$9 + 104 >> 2];\n    $14 = ($7 >>> 16 | 0) + -120 | 0;\n    $8 = HEAP32[$9 + 100 >> 2];\n    $7 = HEAP32[$9 + 96 >> 2];\n   }\n   if (!$18) {\n    __multf3($9 + 80 | 0, $5, $6, $15, $10, 0, 0, 0, 1081540608);\n    $5 = HEAP32[$9 + 92 >> 2];\n    $10 = $5;\n    $15 = HEAP32[$9 + 88 >> 2];\n    $18 = ($10 >>> 16 | 0) + -120 | 0;\n    $6 = HEAP32[$9 + 84 >> 2];\n    $5 = HEAP32[$9 + 80 >> 2];\n   }\n   $21 = $15;\n   $11 = $15;\n   $15 = $13 - $11 | 0;\n   $12 = $12 & 65535 | 65536;\n   $20 = $10 & 65535 | 65536;\n   $10 = ($6 | 0) == ($8 | 0) & $7 >>> 0 < $5 >>> 0 | $8 >>> 0 < $6 >>> 0;\n   $11 = ($12 - ($20 + ($13 >>> 0 < $11 >>> 0) | 0) | 0) - ($15 >>> 0 < $10 >>> 0) | 0;\n   $17 = $15 - $10 | 0;\n   $16 = ($11 | 0) > -1 ? 1 : 0;\n   $15 = $7 - $5 | 0;\n   $10 = $8 - (($7 >>> 0 < $5 >>> 0) + $6 | 0) | 0;\n   if (($14 | 0) > ($18 | 0)) {\n    while (1) {\n     label$11 : {\n      if ($16 & 1) {\n       if (!($15 | $17 | ($10 | $11))) {\n        __multf3($9 + 32 | 0, $1, $2, $3, $4, 0, 0, 0, 0);\n        $3 = HEAP32[$9 + 40 >> 2];\n        $4 = HEAP32[$9 + 44 >> 2];\n        $7 = HEAP32[$9 + 32 >> 2];\n        $8 = HEAP32[$9 + 36 >> 2];\n        break label$1;\n       }\n       $7 = $17;\n       $16 = $11 << 1 | $7 >>> 31;\n       $17 = $7 << 1;\n       $11 = $16;\n       $16 = 0;\n       $7 = $10 >>> 31 | 0;\n       break label$11;\n      }\n      $11 = 0;\n      $10 = $8;\n      $17 = $8 >>> 31 | 0;\n      $15 = $7;\n      $7 = $13;\n      $16 = $12 << 1 | $7 >>> 31;\n      $7 = $7 << 1;\n     }\n     $13 = $7 | $17;\n     $8 = $13;\n     $7 = $21;\n     $17 = $8 - $7 | 0;\n     $12 = $11 | $16;\n     $11 = $12 - (($8 >>> 0 < $7 >>> 0) + $20 | 0) | 0;\n     $7 = $15;\n     $16 = $10 << 1 | $7 >>> 31;\n     $7 = $7 << 1;\n     $8 = $16;\n     $10 = ($6 | 0) == ($8 | 0) & $7 >>> 0 < $5 >>> 0 | $8 >>> 0 < $6 >>> 0;\n     $11 = $11 - ($17 >>> 0 < $10 >>> 0) | 0;\n     $17 = $17 - $10 | 0;\n     $16 = ($11 | 0) > -1 ? 1 : 0;\n     $15 = $7 - $5 | 0;\n     $10 = $8 - (($7 >>> 0 < $5 >>> 0) + $6 | 0) | 0;\n     $14 = $14 + -1 | 0;\n     if (($14 | 0) > ($18 | 0)) {\n      continue\n     }\n     break;\n    };\n    $14 = $18;\n   }\n   label$14 : {\n    if (!$16) {\n     break label$14\n    }\n    $7 = $15;\n    $13 = $17;\n    $8 = $10;\n    $12 = $11;\n    if ($7 | $13 | ($8 | $12)) {\n     break label$14\n    }\n    __multf3($9 + 48 | 0, $1, $2, $3, $4, 0, 0, 0, 0);\n    $3 = HEAP32[$9 + 56 >> 2];\n    $4 = HEAP32[$9 + 60 >> 2];\n    $7 = HEAP32[$9 + 48 >> 2];\n    $8 = HEAP32[$9 + 52 >> 2];\n    break label$1;\n   }\n   if (($12 | 0) == 65535 | $12 >>> 0 < 65535) {\n    while (1) {\n     $3 = $8 >>> 31 | 0;\n     $1 = 0;\n     $14 = $14 + -1 | 0;\n     $11 = $8 << 1 | $7 >>> 31;\n     $7 = $7 << 1;\n     $8 = $11;\n     $2 = $13;\n     $16 = $12 << 1 | $2 >>> 31;\n     $13 = $2 << 1 | $3;\n     $1 = $1 | $16;\n     $12 = $1;\n     if (($1 | 0) == 65536 & $13 >>> 0 < 0 | $1 >>> 0 < 65536) {\n      continue\n     }\n     break;\n    }\n   }\n   $1 = $19 & 32768;\n   if (($14 | 0) <= 0) {\n    __multf3($9 - -64 | 0, $7, $8, $13, $12 & 65535 | ($1 | $14 + 120) << 16, 0, 0, 0, 1065811968);\n    $3 = HEAP32[$9 + 72 >> 2];\n    $4 = HEAP32[$9 + 76 >> 2];\n    $7 = HEAP32[$9 + 64 >> 2];\n    $8 = HEAP32[$9 + 68 >> 2];\n    break label$1;\n   }\n   $3 = $13;\n   $4 = $12 & 65535 | ($1 | $14) << 16;\n  }\n  HEAP32[$0 >> 2] = $7;\n  HEAP32[$0 + 4 >> 2] = $8;\n  HEAP32[$0 + 8 >> 2] = $3;\n  HEAP32[$0 + 12 >> 2] = $4;\n  global$0 = $9 + 128 | 0;\n }\n \n function __floatscan($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0;\n  $5 = global$0 - 48 | 0;\n  global$0 = $5;\n  $4 = $1 + 4 | 0;\n  $7 = HEAP32[2644];\n  $10 = HEAP32[2641];\n  while (1) {\n   $2 = HEAP32[$1 + 4 >> 2];\n   label$4 : {\n    if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {\n     HEAP32[$4 >> 2] = $2 + 1;\n     $2 = HEAPU8[$2 | 0];\n     break label$4;\n    }\n    $2 = __shgetc($1);\n   }\n   if (($2 | 0) == 32 | $2 + -9 >>> 0 < 5) {\n    continue\n   }\n   break;\n  };\n  $6 = 1;\n  label$6 : {\n   label$7 : {\n    switch ($2 + -43 | 0) {\n    case 0:\n    case 2:\n     break label$7;\n    default:\n     break label$6;\n    };\n   }\n   $6 = ($2 | 0) == 45 ? -1 : 1;\n   $2 = HEAP32[$1 + 4 >> 2];\n   if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {\n    HEAP32[$4 >> 2] = $2 + 1;\n    $2 = HEAPU8[$2 | 0];\n    break label$6;\n   }\n   $2 = __shgetc($1);\n  }\n  label$1 : {\n   label$9 : {\n    label$10 : {\n     while (1) {\n      if (HEAP8[$3 + 10484 | 0] == ($2 | 32)) {\n       label$13 : {\n        if ($3 >>> 0 > 6) {\n         break label$13\n        }\n        $2 = HEAP32[$1 + 4 >> 2];\n        if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {\n         HEAP32[$4 >> 2] = $2 + 1;\n         $2 = HEAPU8[$2 | 0];\n         break label$13;\n        }\n        $2 = __shgetc($1);\n       }\n       $3 = $3 + 1 | 0;\n       if (($3 | 0) != 8) {\n        continue\n       }\n       break label$10;\n      }\n      break;\n     };\n     if (($3 | 0) != 3) {\n      if (($3 | 0) == 8) {\n       break label$10\n      }\n      if ($3 >>> 0 < 4) {\n       break label$9\n      }\n      if (($3 | 0) == 8) {\n       break label$10\n      }\n     }\n     $1 = HEAP32[$1 + 104 >> 2];\n     if ($1) {\n      HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1\n     }\n     if ($3 >>> 0 < 4) {\n      break label$10\n     }\n     while (1) {\n      if ($1) {\n       HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1\n      }\n      $3 = $3 + -1 | 0;\n      if ($3 >>> 0 > 3) {\n       continue\n      }\n      break;\n     };\n    }\n    __extendsftf2($5, Math_fround(Math_fround($6 | 0) * Math_fround(infinity)));\n    $6 = HEAP32[$5 + 8 >> 2];\n    $2 = HEAP32[$5 + 12 >> 2];\n    $8 = HEAP32[$5 >> 2];\n    $9 = HEAP32[$5 + 4 >> 2];\n    break label$1;\n   }\n   label$19 : {\n    label$20 : {\n     label$21 : {\n      if ($3) {\n       break label$21\n      }\n      $3 = 0;\n      while (1) {\n       if (HEAP8[$3 + 10493 | 0] != ($2 | 32)) {\n        break label$21\n       }\n       label$23 : {\n        if ($3 >>> 0 > 1) {\n         break label$23\n        }\n        $2 = HEAP32[$1 + 4 >> 2];\n        if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {\n         HEAP32[$4 >> 2] = $2 + 1;\n         $2 = HEAPU8[$2 | 0];\n         break label$23;\n        }\n        $2 = __shgetc($1);\n       }\n       $3 = $3 + 1 | 0;\n       if (($3 | 0) != 3) {\n        continue\n       }\n       break;\n      };\n      break label$20;\n     }\n     label$25 : {\n      switch ($3 | 0) {\n      case 0:\n       label$27 : {\n        if (($2 | 0) != 48) {\n         break label$27\n        }\n        $3 = HEAP32[$1 + 4 >> 2];\n        label$28 : {\n         if ($3 >>> 0 < HEAPU32[$1 + 104 >> 2]) {\n          HEAP32[$4 >> 2] = $3 + 1;\n          $3 = HEAPU8[$3 | 0];\n          break label$28;\n         }\n         $3 = __shgetc($1);\n        }\n        if (($3 & -33) == 88) {\n         hexfloat($5 + 16 | 0, $1, $10, $7, $6);\n         $6 = HEAP32[$5 + 24 >> 2];\n         $2 = HEAP32[$5 + 28 >> 2];\n         $8 = HEAP32[$5 + 16 >> 2];\n         $9 = HEAP32[$5 + 20 >> 2];\n         break label$1;\n        }\n        if (!HEAP32[$1 + 104 >> 2]) {\n         break label$27\n        }\n        HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1;\n       }\n       decfloat($5 + 32 | 0, $1, $2, $10, $7, $6);\n       $6 = HEAP32[$5 + 40 >> 2];\n       $2 = HEAP32[$5 + 44 >> 2];\n       $8 = HEAP32[$5 + 32 >> 2];\n       $9 = HEAP32[$5 + 36 >> 2];\n       break label$1;\n      case 3:\n       break label$20;\n      default:\n       break label$25;\n      };\n     }\n     if (HEAP32[$1 + 104 >> 2]) {\n      HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1\n     }\n     break label$19;\n    }\n    label$32 : {\n     $3 = HEAP32[$1 + 4 >> 2];\n     label$33 : {\n      if ($3 >>> 0 < HEAPU32[$1 + 104 >> 2]) {\n       HEAP32[$4 >> 2] = $3 + 1;\n       $2 = HEAPU8[$3 | 0];\n       break label$33;\n      }\n      $2 = __shgetc($1);\n     }\n     if (($2 | 0) == 40) {\n      $3 = 1;\n      break label$32;\n     }\n     $6 = 0;\n     $2 = 2147450880;\n     if (!HEAP32[$1 + 104 >> 2]) {\n      break label$1\n     }\n     HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1;\n     break label$1;\n    }\n    while (1) {\n     $2 = HEAP32[$1 + 4 >> 2];\n     label$37 : {\n      if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {\n       HEAP32[$4 >> 2] = $2 + 1;\n       $7 = HEAPU8[$2 | 0];\n       break label$37;\n      }\n      $7 = __shgetc($1);\n     }\n     if (!($7 + -97 >>> 0 >= 26 ? !($7 + -48 >>> 0 < 10 | $7 + -65 >>> 0 < 26 | ($7 | 0) == 95) : 0)) {\n      $3 = $3 + 1 | 0;\n      continue;\n     }\n     break;\n    };\n    $6 = 0;\n    $2 = 2147450880;\n    if (($7 | 0) == 41) {\n     break label$1\n    }\n    $1 = HEAP32[$1 + 104 >> 2];\n    if ($1) {\n     HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1\n    }\n    if (!$3) {\n     break label$1\n    }\n    while (1) {\n     $3 = $3 + -1 | 0;\n     if ($1) {\n      HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + -1\n     }\n     if ($3) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   HEAP32[2896] = 28;\n   __shlim($1);\n   $6 = 0;\n   $2 = 0;\n  }\n  HEAP32[$0 >> 2] = $8;\n  HEAP32[$0 + 4 >> 2] = $9;\n  HEAP32[$0 + 8 >> 2] = $6;\n  HEAP32[$0 + 12 >> 2] = $2;\n  global$0 = $5 + 48 | 0;\n }\n \n function hexfloat($0, $1, $2, $3, $4) {\n  var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;\n  $5 = global$0 - 432 | 0;\n  global$0 = $5;\n  $6 = HEAP32[$1 + 4 >> 2];\n  label$1 : {\n   if ($6 >>> 0 < HEAPU32[$1 + 104 >> 2]) {\n    HEAP32[$1 + 4 >> 2] = $6 + 1;\n    $7 = HEAPU8[$6 | 0];\n    break label$1;\n   }\n   $7 = __shgetc($1);\n  }\n  label$3 : {\n   label$4 : {\n    while (1) {\n     if (($7 | 0) != 48) {\n      label$6 : {\n       if (($7 | 0) != 46) {\n        break label$3\n       }\n       $6 = HEAP32[$1 + 4 >> 2];\n       if ($6 >>> 0 >= HEAPU32[$1 + 104 >> 2]) {\n        break label$6\n       }\n       HEAP32[$1 + 4 >> 2] = $6 + 1;\n       $7 = HEAPU8[$6 | 0];\n       break label$4;\n      }\n     } else {\n      $6 = HEAP32[$1 + 4 >> 2];\n      if ($6 >>> 0 < HEAPU32[$1 + 104 >> 2]) {\n       HEAP32[$1 + 4 >> 2] = $6 + 1;\n       $7 = HEAPU8[$6 | 0];\n      } else {\n       $7 = __shgetc($1)\n      }\n      $21 = 1;\n      continue;\n     }\n     break;\n    };\n    $7 = __shgetc($1);\n   }\n   $20 = 1;\n   if (($7 | 0) != 48) {\n    break label$3\n   }\n   while (1) {\n    $6 = HEAP32[$1 + 4 >> 2];\n    label$10 : {\n     if ($6 >>> 0 < HEAPU32[$1 + 104 >> 2]) {\n      HEAP32[$1 + 4 >> 2] = $6 + 1;\n      $7 = HEAPU8[$6 | 0];\n      break label$10;\n     }\n     $7 = __shgetc($1);\n    }\n    $13 = $13 + -1 | 0;\n    $17 = $17 + -1 | 0;\n    if (($17 | 0) != -1) {\n     $13 = $13 + 1 | 0\n    }\n    if (($7 | 0) == 48) {\n     continue\n    }\n    break;\n   };\n   $21 = 1;\n  }\n  $12 = 1073676288;\n  $6 = 0;\n  while (1) {\n   label$13 : {\n    $22 = $7 | 32;\n    label$14 : {\n     label$15 : {\n      $23 = $7 + -48 | 0;\n      if ($23 >>> 0 < 10) {\n       break label$15\n      }\n      if ($22 + -97 >>> 0 > 5 ? ($7 | 0) != 46 : 0) {\n       break label$13\n      }\n      if (($7 | 0) != 46) {\n       break label$15\n      }\n      if ($20) {\n       break label$13\n      }\n      $20 = 1;\n      $17 = $9;\n      $13 = $6;\n      break label$14;\n     }\n     $7 = ($7 | 0) > 57 ? $22 + -87 | 0 : $23;\n     label$16 : {\n      if (($6 | 0) < 0 ? 1 : ($6 | 0) <= 0 ? ($9 >>> 0 > 7 ? 0 : 1) : 0) {\n       $14 = $7 + ($14 << 4) | 0;\n       break label$16;\n      }\n      if (($6 | 0) < 0 ? 1 : ($6 | 0) <= 0 ? ($9 >>> 0 > 28 ? 0 : 1) : 0) {\n       __floatsitf($5 + 48 | 0, $7);\n       __multf3($5 + 32 | 0, $18, $19, $8, $12, 0, 0, 0, 1073414144);\n       $18 = HEAP32[$5 + 32 >> 2];\n       $19 = HEAP32[$5 + 36 >> 2];\n       $8 = HEAP32[$5 + 40 >> 2];\n       $12 = HEAP32[$5 + 44 >> 2];\n       __multf3($5 + 16 | 0, $18, $19, $8, $12, HEAP32[$5 + 48 >> 2], HEAP32[$5 + 52 >> 2], HEAP32[$5 + 56 >> 2], HEAP32[$5 + 60 >> 2]);\n       __addtf3($5, $10, $11, $15, $16, HEAP32[$5 + 16 >> 2], HEAP32[$5 + 20 >> 2], HEAP32[$5 + 24 >> 2], HEAP32[$5 + 28 >> 2]);\n       $15 = HEAP32[$5 + 8 >> 2];\n       $16 = HEAP32[$5 + 12 >> 2];\n       $10 = HEAP32[$5 >> 2];\n       $11 = HEAP32[$5 + 4 >> 2];\n       break label$16;\n      }\n      if (!$7 | $24) {\n       break label$16\n      }\n      __multf3($5 + 80 | 0, $18, $19, $8, $12, 0, 0, 0, 1073610752);\n      __addtf3($5 - -64 | 0, $10, $11, $15, $16, HEAP32[$5 + 80 >> 2], HEAP32[$5 + 84 >> 2], HEAP32[$5 + 88 >> 2], HEAP32[$5 + 92 >> 2]);\n      $15 = HEAP32[$5 + 72 >> 2];\n      $16 = HEAP32[$5 + 76 >> 2];\n      $24 = 1;\n      $10 = HEAP32[$5 + 64 >> 2];\n      $11 = HEAP32[$5 + 68 >> 2];\n     }\n     $9 = $9 + 1 | 0;\n     if ($9 >>> 0 < 1) {\n      $6 = $6 + 1 | 0\n     }\n     $21 = 1;\n    }\n    $7 = HEAP32[$1 + 4 >> 2];\n    if ($7 >>> 0 < HEAPU32[$1 + 104 >> 2]) {\n     HEAP32[$1 + 4 >> 2] = $7 + 1;\n     $7 = HEAPU8[$7 | 0];\n    } else {\n     $7 = __shgetc($1)\n    }\n    continue;\n   }\n   break;\n  };\n  label$20 : {\n   label$21 : {\n    if (!$21) {\n     if (!HEAP32[$1 + 104 >> 2]) {\n      break label$21\n     }\n     $2 = HEAP32[$1 + 4 >> 2];\n     HEAP32[$1 + 4 >> 2] = $2 + -1;\n     HEAP32[$1 + 4 >> 2] = $2 + -2;\n     if (!$20) {\n      break label$21\n     }\n     HEAP32[$1 + 4 >> 2] = $2 + -3;\n     break label$21;\n    }\n    if (($6 | 0) < 0 ? 1 : ($6 | 0) <= 0 ? ($9 >>> 0 > 7 ? 0 : 1) : 0) {\n     $8 = $9;\n     $12 = $6;\n     while (1) {\n      $14 = $14 << 4;\n      $8 = $8 + 1 | 0;\n      if ($8 >>> 0 < 1) {\n       $12 = $12 + 1 | 0\n      }\n      if (($8 | 0) != 8 | $12) {\n       continue\n      }\n      break;\n     };\n    }\n    label$27 : {\n     if (($7 & -33) == 80) {\n      $8 = scanexp($1);\n      $7 = i64toi32_i32$HIGH_BITS;\n      $12 = $7;\n      if ($8 | ($7 | 0) != -2147483648) {\n       break label$27\n      }\n      $8 = 0;\n      $12 = 0;\n      if (!HEAP32[$1 + 104 >> 2]) {\n       break label$27\n      }\n      HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] + -1;\n      break label$27;\n     }\n     $8 = 0;\n     $12 = 0;\n     if (!HEAP32[$1 + 104 >> 2]) {\n      break label$27\n     }\n     HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] + -1;\n    }\n    if (!$14) {\n     __extenddftf2($5 + 112 | 0, +($4 | 0) * 0.0);\n     $10 = HEAP32[$5 + 112 >> 2];\n     $11 = HEAP32[$5 + 116 >> 2];\n     $2 = HEAP32[$5 + 120 >> 2];\n     $1 = HEAP32[$5 + 124 >> 2];\n     break label$20;\n    }\n    $1 = $20 ? $17 : $9;\n    $6 = ($20 ? $13 : $6) << 2 | $1 >>> 30;\n    $1 = $8 + ($1 << 2) | 0;\n    $13 = $1 + -32 | 0;\n    $9 = $13;\n    $6 = $6 + $12 | 0;\n    $1 = ($1 >>> 0 < $8 >>> 0 ? $6 + 1 | 0 : $6) + -1 | 0;\n    $6 = $9 >>> 0 < 4294967264 ? $1 + 1 | 0 : $1;\n    if (($6 | 0) > 0 ? 1 : ($6 | 0) >= 0 ? ($9 >>> 0 <= 0 - $3 >>> 0 ? 0 : 1) : 0) {\n     HEAP32[2896] = 68;\n     __floatsitf($5 + 160 | 0, $4);\n     __multf3($5 + 144 | 0, HEAP32[$5 + 160 >> 2], HEAP32[$5 + 164 >> 2], HEAP32[$5 + 168 >> 2], HEAP32[$5 + 172 >> 2], -1, -1, -1, 2147418111);\n     __multf3($5 + 128 | 0, HEAP32[$5 + 144 >> 2], HEAP32[$5 + 148 >> 2], HEAP32[$5 + 152 >> 2], HEAP32[$5 + 156 >> 2], -1, -1, -1, 2147418111);\n     $10 = HEAP32[$5 + 128 >> 2];\n     $11 = HEAP32[$5 + 132 >> 2];\n     $2 = HEAP32[$5 + 136 >> 2];\n     $1 = HEAP32[$5 + 140 >> 2];\n     break label$20;\n    }\n    $1 = $3 + -226 | 0;\n    $7 = $9 >>> 0 < $1 >>> 0 ? 0 : 1;\n    $1 = $1 >> 31;\n    if (($6 | 0) > ($1 | 0) ? 1 : ($6 | 0) >= ($1 | 0) ? $7 : 0) {\n     if (($14 | 0) > -1) {\n      while (1) {\n       __addtf3($5 + 416 | 0, $10, $11, $15, $16, 0, 0, 0, -1073807360);\n       $1 = __getf2($10, $11, $15, $16, 1073610752);\n       $8 = ($1 | 0) < 0;\n       __addtf3($5 + 400 | 0, $10, $11, $15, $16, $8 ? $10 : HEAP32[$5 + 416 >> 2], $8 ? $11 : HEAP32[$5 + 420 >> 2], $8 ? $15 : HEAP32[$5 + 424 >> 2], $8 ? $16 : HEAP32[$5 + 428 >> 2]);\n       $6 = $6 + -1 | 0;\n       $9 = $9 + -1 | 0;\n       if (($9 | 0) != -1) {\n        $6 = $6 + 1 | 0\n       }\n       $15 = HEAP32[$5 + 408 >> 2];\n       $16 = HEAP32[$5 + 412 >> 2];\n       $10 = HEAP32[$5 + 400 >> 2];\n       $11 = HEAP32[$5 + 404 >> 2];\n       $14 = $14 << 1 | ($1 | 0) > -1;\n       if (($14 | 0) > -1) {\n        continue\n       }\n       break;\n      }\n     }\n     $1 = ($9 - $3 | 0) + 32 | 0;\n     $8 = $1;\n     $7 = $2;\n     $12 = $1 >>> 0 >= $2 >>> 0 ? 0 : 1;\n     $2 = $6 - (($3 >> 31) + ($9 >>> 0 < $3 >>> 0) | 0) | 0;\n     $1 = $1 >>> 0 < 32 ? $2 + 1 | 0 : $2;\n     $1 = (($1 | 0) < 0 ? 1 : ($1 | 0) <= 0 ? $12 : 0) ? (($8 | 0) > 0 ? $8 : 0) : $7;\n     label$35 : {\n      if (($1 | 0) >= 113) {\n       __floatsitf($5 + 384 | 0, $4);\n       $17 = HEAP32[$5 + 392 >> 2];\n       $13 = HEAP32[$5 + 396 >> 2];\n       $18 = HEAP32[$5 + 384 >> 2];\n       $19 = HEAP32[$5 + 388 >> 2];\n       $6 = 0;\n       $4 = 0;\n       $3 = 0;\n       $2 = 0;\n       break label$35;\n      }\n      __extenddftf2($5 + 352 | 0, scalbn(1.0, 144 - $1 | 0));\n      __floatsitf($5 + 336 | 0, $4);\n      $18 = HEAP32[$5 + 336 >> 2];\n      $19 = HEAP32[$5 + 340 >> 2];\n      $17 = HEAP32[$5 + 344 >> 2];\n      $13 = HEAP32[$5 + 348 >> 2];\n      copysignl($5 + 368 | 0, HEAP32[$5 + 352 >> 2], HEAP32[$5 + 356 >> 2], HEAP32[$5 + 360 >> 2], HEAP32[$5 + 364 >> 2], $18, $19, $17, $13);\n      $6 = HEAP32[$5 + 376 >> 2];\n      $4 = HEAP32[$5 + 380 >> 2];\n      $3 = HEAP32[$5 + 372 >> 2];\n      $2 = HEAP32[$5 + 368 >> 2];\n     }\n     $1 = !($14 & 1) & ((__letf2($10, $11, $15, $16, 0, 0, 0, 0) | 0) != 0 & ($1 | 0) < 32);\n     __floatunsitf($5 + 320 | 0, $1 + $14 | 0);\n     __multf3($5 + 304 | 0, $18, $19, $17, $13, HEAP32[$5 + 320 >> 2], HEAP32[$5 + 324 >> 2], HEAP32[$5 + 328 >> 2], HEAP32[$5 + 332 >> 2]);\n     __addtf3($5 + 272 | 0, HEAP32[$5 + 304 >> 2], HEAP32[$5 + 308 >> 2], HEAP32[$5 + 312 >> 2], HEAP32[$5 + 316 >> 2], $2, $3, $6, $4);\n     __multf3($5 + 288 | 0, $1 ? 0 : $10, $1 ? 0 : $11, $1 ? 0 : $15, $1 ? 0 : $16, $18, $19, $17, $13);\n     __addtf3($5 + 256 | 0, HEAP32[$5 + 288 >> 2], HEAP32[$5 + 292 >> 2], HEAP32[$5 + 296 >> 2], HEAP32[$5 + 300 >> 2], HEAP32[$5 + 272 >> 2], HEAP32[$5 + 276 >> 2], HEAP32[$5 + 280 >> 2], HEAP32[$5 + 284 >> 2]);\n     __subtf3($5 + 240 | 0, HEAP32[$5 + 256 >> 2], HEAP32[$5 + 260 >> 2], HEAP32[$5 + 264 >> 2], HEAP32[$5 + 268 >> 2], $2, $3, $6, $4);\n     $1 = HEAP32[$5 + 240 >> 2];\n     $2 = HEAP32[$5 + 244 >> 2];\n     $3 = HEAP32[$5 + 248 >> 2];\n     $4 = HEAP32[$5 + 252 >> 2];\n     if (!__letf2($1, $2, $3, $4, 0, 0, 0, 0)) {\n      HEAP32[2896] = 68\n     }\n     scalbnl($5 + 224 | 0, $1, $2, $3, $4, $9);\n     $10 = HEAP32[$5 + 224 >> 2];\n     $11 = HEAP32[$5 + 228 >> 2];\n     $2 = HEAP32[$5 + 232 >> 2];\n     $1 = HEAP32[$5 + 236 >> 2];\n     break label$20;\n    }\n    HEAP32[2896] = 68;\n    __floatsitf($5 + 208 | 0, $4);\n    __multf3($5 + 192 | 0, HEAP32[$5 + 208 >> 2], HEAP32[$5 + 212 >> 2], HEAP32[$5 + 216 >> 2], HEAP32[$5 + 220 >> 2], 0, 0, 0, 65536);\n    __multf3($5 + 176 | 0, HEAP32[$5 + 192 >> 2], HEAP32[$5 + 196 >> 2], HEAP32[$5 + 200 >> 2], HEAP32[$5 + 204 >> 2], 0, 0, 0, 65536);\n    $10 = HEAP32[$5 + 176 >> 2];\n    $11 = HEAP32[$5 + 180 >> 2];\n    $2 = HEAP32[$5 + 184 >> 2];\n    $1 = HEAP32[$5 + 188 >> 2];\n    break label$20;\n   }\n   __extenddftf2($5 + 96 | 0, +($4 | 0) * 0.0);\n   $10 = HEAP32[$5 + 96 >> 2];\n   $11 = HEAP32[$5 + 100 >> 2];\n   $2 = HEAP32[$5 + 104 >> 2];\n   $1 = HEAP32[$5 + 108 >> 2];\n  }\n  HEAP32[$0 >> 2] = $10;\n  HEAP32[$0 + 4 >> 2] = $11;\n  HEAP32[$0 + 8 >> 2] = $2;\n  HEAP32[$0 + 12 >> 2] = $1;\n  global$0 = $5 + 432 | 0;\n }\n \n function decfloat($0, $1, $2, $3, $4, $5) {\n  var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0;\n  $6 = global$0 - 8976 | 0;\n  global$0 = $6;\n  $22 = $3 + $4 | 0;\n  $25 = 0 - $22 | 0;\n  label$1 : {\n   label$2 : {\n    while (1) {\n     if (($2 | 0) != 48) {\n      label$4 : {\n       if (($2 | 0) != 46) {\n        break label$1\n       }\n       $2 = HEAP32[$1 + 4 >> 2];\n       if ($2 >>> 0 >= HEAPU32[$1 + 104 >> 2]) {\n        break label$4\n       }\n       HEAP32[$1 + 4 >> 2] = $2 + 1;\n       $2 = HEAPU8[$2 | 0];\n       break label$2;\n      }\n     } else {\n      $2 = HEAP32[$1 + 4 >> 2];\n      if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {\n       $9 = 1;\n       HEAP32[$1 + 4 >> 2] = $2 + 1;\n       $2 = HEAPU8[$2 | 0];\n      } else {\n       $9 = 1;\n       $2 = __shgetc($1);\n      }\n      continue;\n     }\n     break;\n    };\n    $2 = __shgetc($1);\n   }\n   $14 = 1;\n   if (($2 | 0) != 48) {\n    break label$1\n   }\n   while (1) {\n    $2 = HEAP32[$1 + 4 >> 2];\n    label$8 : {\n     if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {\n      HEAP32[$1 + 4 >> 2] = $2 + 1;\n      $2 = HEAPU8[$2 | 0];\n      break label$8;\n     }\n     $2 = __shgetc($1);\n    }\n    $7 = $7 + -1 | 0;\n    $8 = $8 + -1 | 0;\n    if (($8 | 0) != -1) {\n     $7 = $7 + 1 | 0\n    }\n    if (($2 | 0) == 48) {\n     continue\n    }\n    break;\n   };\n   $9 = 1;\n  }\n  HEAP32[$6 + 784 >> 2] = 0;\n  label$10 : {\n   label$11 : {\n    $12 = ($2 | 0) == 46;\n    $13 = $2 + -48 | 0;\n    label$13 : {\n     label$14 : {\n      label$15 : {\n       if ($12 | $13 >>> 0 <= 9) {\n        while (1) {\n         label$19 : {\n          if ($12 & 1) {\n           if (!$14) {\n            $8 = $10;\n            $7 = $11;\n            $14 = 1;\n            break label$19;\n           }\n           $9 = !$9;\n           break label$15;\n          }\n          $10 = $10 + 1 | 0;\n          if ($10 >>> 0 < 1) {\n           $11 = $11 + 1 | 0\n          }\n          if (($15 | 0) <= 2044) {\n           $20 = ($2 | 0) == 48 ? $20 : $10;\n           $9 = ($6 + 784 | 0) + ($15 << 2) | 0;\n           HEAP32[$9 >> 2] = $17 ? (Math_imul(HEAP32[$9 >> 2], 10) + $2 | 0) + -48 | 0 : $13;\n           $9 = 1;\n           $13 = $17 + 1 | 0;\n           $2 = ($13 | 0) == 9;\n           $17 = $2 ? 0 : $13;\n           $15 = $2 + $15 | 0;\n           break label$19;\n          }\n          if (($2 | 0) == 48) {\n           break label$19\n          }\n          HEAP32[$6 + 8960 >> 2] = HEAP32[$6 + 8960 >> 2] | 1;\n          $20 = 18396;\n         }\n         $2 = HEAP32[$1 + 4 >> 2];\n         label$25 : {\n          if ($2 >>> 0 < HEAPU32[$1 + 104 >> 2]) {\n           HEAP32[$1 + 4 >> 2] = $2 + 1;\n           $2 = HEAPU8[$2 | 0];\n           break label$25;\n          }\n          $2 = __shgetc($1);\n         }\n         $12 = ($2 | 0) == 46;\n         $13 = $2 + -48 | 0;\n         if ($12 | $13 >>> 0 < 10) {\n          continue\n         }\n         break;\n        }\n       }\n       $8 = $14 ? $8 : $10;\n       $7 = $14 ? $7 : $11;\n       if (!(!$9 | ($2 & -33) != 69)) {\n        $12 = scanexp($1);\n        $2 = i64toi32_i32$HIGH_BITS;\n        $16 = $2;\n        label$28 : {\n         if ($12 | ($2 | 0) != -2147483648) {\n          break label$28\n         }\n         $12 = 0;\n         $16 = 0;\n         if (!HEAP32[$1 + 104 >> 2]) {\n          break label$28\n         }\n         HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] + -1;\n        }\n        if (!$9) {\n         break label$13\n        }\n        $7 = $7 + $16 | 0;\n        $8 = $8 + $12 | 0;\n        if ($8 >>> 0 < $12 >>> 0) {\n         $7 = $7 + 1 | 0\n        }\n        break label$11;\n       }\n       $9 = !$9;\n       if (($2 | 0) < 0) {\n        break label$14\n       }\n      }\n      if (!HEAP32[$1 + 104 >> 2]) {\n       break label$14\n      }\n      HEAP32[$1 + 4 >> 2] = HEAP32[$1 + 4 >> 2] + -1;\n     }\n     if (!$9) {\n      break label$11\n     }\n    }\n    HEAP32[2896] = 28;\n    $10 = 0;\n    $11 = 0;\n    __shlim($1);\n    $2 = 0;\n    $1 = 0;\n    break label$10;\n   }\n   $1 = HEAP32[$6 + 784 >> 2];\n   if (!$1) {\n    __extenddftf2($6, +($5 | 0) * 0.0);\n    $10 = HEAP32[$6 >> 2];\n    $11 = HEAP32[$6 + 4 >> 2];\n    $2 = HEAP32[$6 + 8 >> 2];\n    $1 = HEAP32[$6 + 12 >> 2];\n    break label$10;\n   }\n   if (!(($8 | 0) != ($10 | 0) | ($7 | 0) != ($11 | 0) | (($11 | 0) > 0 ? 1 : ($11 | 0) >= 0 ? ($10 >>> 0 <= 9 ? 0 : 1) : 0) | ($1 >>> $3 | 0 ? ($3 | 0) <= 30 : 0))) {\n    __floatsitf($6 + 48 | 0, $5);\n    __floatunsitf($6 + 32 | 0, $1);\n    __multf3($6 + 16 | 0, HEAP32[$6 + 48 >> 2], HEAP32[$6 + 52 >> 2], HEAP32[$6 + 56 >> 2], HEAP32[$6 + 60 >> 2], HEAP32[$6 + 32 >> 2], HEAP32[$6 + 36 >> 2], HEAP32[$6 + 40 >> 2], HEAP32[$6 + 44 >> 2]);\n    $10 = HEAP32[$6 + 16 >> 2];\n    $11 = HEAP32[$6 + 20 >> 2];\n    $2 = HEAP32[$6 + 24 >> 2];\n    $1 = HEAP32[$6 + 28 >> 2];\n    break label$10;\n   }\n   if (($7 | 0) > 0 ? 1 : ($7 | 0) >= 0 ? ($8 >>> 0 <= ($4 | 0) / -2 >>> 0 ? 0 : 1) : 0) {\n    HEAP32[2896] = 68;\n    __floatsitf($6 + 96 | 0, $5);\n    __multf3($6 + 80 | 0, HEAP32[$6 + 96 >> 2], HEAP32[$6 + 100 >> 2], HEAP32[$6 + 104 >> 2], HEAP32[$6 + 108 >> 2], -1, -1, -1, 2147418111);\n    __multf3($6 - -64 | 0, HEAP32[$6 + 80 >> 2], HEAP32[$6 + 84 >> 2], HEAP32[$6 + 88 >> 2], HEAP32[$6 + 92 >> 2], -1, -1, -1, 2147418111);\n    $10 = HEAP32[$6 + 64 >> 2];\n    $11 = HEAP32[$6 + 68 >> 2];\n    $2 = HEAP32[$6 + 72 >> 2];\n    $1 = HEAP32[$6 + 76 >> 2];\n    break label$10;\n   }\n   $1 = $4 + -226 | 0;\n   $2 = $8 >>> 0 >= $1 >>> 0 ? 0 : 1;\n   $1 = $1 >> 31;\n   if (($7 | 0) < ($1 | 0) ? 1 : ($7 | 0) <= ($1 | 0) ? $2 : 0) {\n    HEAP32[2896] = 68;\n    __floatsitf($6 + 144 | 0, $5);\n    __multf3($6 + 128 | 0, HEAP32[$6 + 144 >> 2], HEAP32[$6 + 148 >> 2], HEAP32[$6 + 152 >> 2], HEAP32[$6 + 156 >> 2], 0, 0, 0, 65536);\n    __multf3($6 + 112 | 0, HEAP32[$6 + 128 >> 2], HEAP32[$6 + 132 >> 2], HEAP32[$6 + 136 >> 2], HEAP32[$6 + 140 >> 2], 0, 0, 0, 65536);\n    $10 = HEAP32[$6 + 112 >> 2];\n    $11 = HEAP32[$6 + 116 >> 2];\n    $2 = HEAP32[$6 + 120 >> 2];\n    $1 = HEAP32[$6 + 124 >> 2];\n    break label$10;\n   }\n   if ($17) {\n    if (($17 | 0) <= 8) {\n     $2 = ($6 + 784 | 0) + ($15 << 2) | 0;\n     $1 = HEAP32[$2 >> 2];\n     while (1) {\n      $1 = Math_imul($1, 10);\n      $17 = $17 + 1 | 0;\n      if (($17 | 0) != 9) {\n       continue\n      }\n      break;\n     };\n     HEAP32[$2 >> 2] = $1;\n    }\n    $15 = $15 + 1 | 0;\n   }\n   label$36 : {\n    $14 = $8;\n    if (($20 | 0) > ($8 | 0) | ($20 | 0) >= 9 | ($8 | 0) > 17) {\n     break label$36\n    }\n    if (($14 | 0) == 9) {\n     __floatsitf($6 + 192 | 0, $5);\n     __floatunsitf($6 + 176 | 0, HEAP32[$6 + 784 >> 2]);\n     __multf3($6 + 160 | 0, HEAP32[$6 + 192 >> 2], HEAP32[$6 + 196 >> 2], HEAP32[$6 + 200 >> 2], HEAP32[$6 + 204 >> 2], HEAP32[$6 + 176 >> 2], HEAP32[$6 + 180 >> 2], HEAP32[$6 + 184 >> 2], HEAP32[$6 + 188 >> 2]);\n     $10 = HEAP32[$6 + 160 >> 2];\n     $11 = HEAP32[$6 + 164 >> 2];\n     $2 = HEAP32[$6 + 168 >> 2];\n     $1 = HEAP32[$6 + 172 >> 2];\n     break label$10;\n    }\n    if (($14 | 0) <= 8) {\n     __floatsitf($6 + 272 | 0, $5);\n     __floatunsitf($6 + 256 | 0, HEAP32[$6 + 784 >> 2]);\n     __multf3($6 + 240 | 0, HEAP32[$6 + 272 >> 2], HEAP32[$6 + 276 >> 2], HEAP32[$6 + 280 >> 2], HEAP32[$6 + 284 >> 2], HEAP32[$6 + 256 >> 2], HEAP32[$6 + 260 >> 2], HEAP32[$6 + 264 >> 2], HEAP32[$6 + 268 >> 2]);\n     __floatsitf($6 + 224 | 0, HEAP32[(0 - $14 << 2) + 10560 >> 2]);\n     __divtf3($6 + 208 | 0, HEAP32[$6 + 240 >> 2], HEAP32[$6 + 244 >> 2], HEAP32[$6 + 248 >> 2], HEAP32[$6 + 252 >> 2], HEAP32[$6 + 224 >> 2], HEAP32[$6 + 228 >> 2], HEAP32[$6 + 232 >> 2], HEAP32[$6 + 236 >> 2]);\n     $10 = HEAP32[$6 + 208 >> 2];\n     $11 = HEAP32[$6 + 212 >> 2];\n     $2 = HEAP32[$6 + 216 >> 2];\n     $1 = HEAP32[$6 + 220 >> 2];\n     break label$10;\n    }\n    $1 = (Math_imul($14, -3) + $3 | 0) + 27 | 0;\n    $2 = HEAP32[$6 + 784 >> 2];\n    if ($2 >>> $1 | 0 ? ($1 | 0) <= 30 : 0) {\n     break label$36\n    }\n    __floatsitf($6 + 352 | 0, $5);\n    __floatunsitf($6 + 336 | 0, $2);\n    __multf3($6 + 320 | 0, HEAP32[$6 + 352 >> 2], HEAP32[$6 + 356 >> 2], HEAP32[$6 + 360 >> 2], HEAP32[$6 + 364 >> 2], HEAP32[$6 + 336 >> 2], HEAP32[$6 + 340 >> 2], HEAP32[$6 + 344 >> 2], HEAP32[$6 + 348 >> 2]);\n    __floatsitf($6 + 304 | 0, HEAP32[($14 << 2) + 10488 >> 2]);\n    __multf3($6 + 288 | 0, HEAP32[$6 + 320 >> 2], HEAP32[$6 + 324 >> 2], HEAP32[$6 + 328 >> 2], HEAP32[$6 + 332 >> 2], HEAP32[$6 + 304 >> 2], HEAP32[$6 + 308 >> 2], HEAP32[$6 + 312 >> 2], HEAP32[$6 + 316 >> 2]);\n    $10 = HEAP32[$6 + 288 >> 2];\n    $11 = HEAP32[$6 + 292 >> 2];\n    $2 = HEAP32[$6 + 296 >> 2];\n    $1 = HEAP32[$6 + 300 >> 2];\n    break label$10;\n   }\n   while (1) {\n    $2 = $15;\n    $15 = $2 + -1 | 0;\n    if (!HEAP32[($6 + 784 | 0) + ($15 << 2) >> 2]) {\n     continue\n    }\n    break;\n   };\n   $17 = 0;\n   $1 = ($14 | 0) % 9 | 0;\n   label$40 : {\n    if (!$1) {\n     $9 = 0;\n     break label$40;\n    }\n    $13 = ($14 | 0) > -1 ? $1 : $1 + 9 | 0;\n    label$42 : {\n     if (!$2) {\n      $9 = 0;\n      $2 = 0;\n      break label$42;\n     }\n     $8 = HEAP32[(0 - $13 << 2) + 10560 >> 2];\n     $10 = 1e9 / ($8 | 0) | 0;\n     $12 = 0;\n     $1 = 0;\n     $9 = 0;\n     while (1) {\n      $11 = ($6 + 784 | 0) + ($1 << 2) | 0;\n      $15 = HEAP32[$11 >> 2];\n      $16 = ($15 >>> 0) / ($8 >>> 0) | 0;\n      $7 = $12 + $16 | 0;\n      HEAP32[$11 >> 2] = $7;\n      $7 = !$7 & ($1 | 0) == ($9 | 0);\n      $9 = $7 ? $9 + 1 & 2047 : $9;\n      $14 = $7 ? $14 + -9 | 0 : $14;\n      $12 = Math_imul($10, $15 - Math_imul($8, $16) | 0);\n      $1 = $1 + 1 | 0;\n      if (($2 | 0) != ($1 | 0)) {\n       continue\n      }\n      break;\n     };\n     if (!$12) {\n      break label$42\n     }\n     HEAP32[($6 + 784 | 0) + ($2 << 2) >> 2] = $12;\n     $2 = $2 + 1 | 0;\n    }\n    $14 = ($14 - $13 | 0) + 9 | 0;\n   }\n   while (1) {\n    $11 = ($6 + 784 | 0) + ($9 << 2) | 0;\n    label$46 : {\n     while (1) {\n      if (($14 | 0) != 36 | HEAPU32[$11 >> 2] >= 10384593 ? ($14 | 0) >= 36 : 0) {\n       break label$46\n      }\n      $15 = $2 + 2047 | 0;\n      $12 = 0;\n      $13 = $2;\n      while (1) {\n       $2 = $13;\n       $10 = $15 & 2047;\n       $13 = ($6 + 784 | 0) + ($10 << 2) | 0;\n       $1 = HEAP32[$13 >> 2];\n       $7 = $1 >>> 3 | 0;\n       $1 = $1 << 29;\n       $8 = $1 + $12 | 0;\n       if ($8 >>> 0 < $1 >>> 0) {\n        $7 = $7 + 1 | 0\n       }\n       $1 = 0;\n       if (!(!$7 & $8 >>> 0 < 1000000001 | $7 >>> 0 < 0)) {\n        $1 = __wasm_i64_udiv($8, $7, 1e9);\n        $8 = $8 - __wasm_i64_mul($1, i64toi32_i32$HIGH_BITS, 1e9, 0) | 0;\n       }\n       $12 = $1;\n       HEAP32[$13 >> 2] = $8;\n       $13 = ($10 | 0) != ($2 + -1 & 2047) ? $2 : ($9 | 0) == ($10 | 0) ? $2 : $8 ? $2 : $10;\n       $15 = $10 + -1 | 0;\n       if (($9 | 0) != ($10 | 0)) {\n        continue\n       }\n       break;\n      };\n      $17 = $17 + -29 | 0;\n      if (!$12) {\n       continue\n      }\n      break;\n     };\n     $9 = $9 + -1 & 2047;\n     if (($13 | 0) == ($9 | 0)) {\n      $1 = ($6 + 784 | 0) + (($13 + 2046 & 2047) << 2) | 0;\n      $2 = $13 + -1 & 2047;\n      HEAP32[$1 >> 2] = HEAP32[$1 >> 2] | HEAP32[($6 + 784 | 0) + ($2 << 2) >> 2];\n     }\n     $14 = $14 + 9 | 0;\n     HEAP32[($6 + 784 | 0) + ($9 << 2) >> 2] = $12;\n     continue;\n    }\n    break;\n   };\n   label$52 : {\n    label$53 : while (1) {\n     $8 = $2 + 1 & 2047;\n     $10 = ($6 + 784 | 0) + (($2 + -1 & 2047) << 2) | 0;\n     while (1) {\n      $7 = ($14 | 0) > 45 ? 9 : 1;\n      label$55 : {\n       while (1) {\n        $13 = $9;\n        $1 = 0;\n        label$57 : {\n         while (1) {\n          label$59 : {\n           $9 = $1 + $13 & 2047;\n           if (($9 | 0) == ($2 | 0)) {\n            break label$59\n           }\n           $9 = HEAP32[($6 + 784 | 0) + ($9 << 2) >> 2];\n           $11 = HEAP32[($1 << 2) + 10512 >> 2];\n           if ($9 >>> 0 < $11 >>> 0) {\n            break label$59\n           }\n           if ($9 >>> 0 > $11 >>> 0) {\n            break label$57\n           }\n           $1 = $1 + 1 | 0;\n           if (($1 | 0) != 4) {\n            continue\n           }\n          }\n          break;\n         };\n         if (($14 | 0) != 36) {\n          break label$57\n         }\n         $8 = 0;\n         $7 = 0;\n         $1 = 0;\n         $10 = 0;\n         $11 = 0;\n         while (1) {\n          $9 = $1 + $13 & 2047;\n          if (($9 | 0) == ($2 | 0)) {\n           $2 = $2 + 1 & 2047;\n           HEAP32[(($2 << 2) + $6 | 0) + 780 >> 2] = 0;\n          }\n          __multf3($6 + 768 | 0, $8, $7, $10, $11, 0, 0, 1342177280, 1075633366);\n          __floatunsitf($6 + 752 | 0, HEAP32[($6 + 784 | 0) + ($9 << 2) >> 2]);\n          __addtf3($6 + 736 | 0, HEAP32[$6 + 768 >> 2], HEAP32[$6 + 772 >> 2], HEAP32[$6 + 776 >> 2], HEAP32[$6 + 780 >> 2], HEAP32[$6 + 752 >> 2], HEAP32[$6 + 756 >> 2], HEAP32[$6 + 760 >> 2], HEAP32[$6 + 764 >> 2]);\n          $10 = HEAP32[$6 + 744 >> 2];\n          $11 = HEAP32[$6 + 748 >> 2];\n          $8 = HEAP32[$6 + 736 >> 2];\n          $7 = HEAP32[$6 + 740 >> 2];\n          $1 = $1 + 1 | 0;\n          if (($1 | 0) != 4) {\n           continue\n          }\n          break;\n         };\n         __floatsitf($6 + 720 | 0, $5);\n         __multf3($6 + 704 | 0, $8, $7, $10, $11, HEAP32[$6 + 720 >> 2], HEAP32[$6 + 724 >> 2], HEAP32[$6 + 728 >> 2], HEAP32[$6 + 732 >> 2]);\n         $10 = HEAP32[$6 + 712 >> 2];\n         $11 = HEAP32[$6 + 716 >> 2];\n         $8 = 0;\n         $7 = 0;\n         $12 = HEAP32[$6 + 704 >> 2];\n         $16 = HEAP32[$6 + 708 >> 2];\n         $23 = $17 + 113 | 0;\n         $4 = $23 - $4 | 0;\n         $20 = ($4 | 0) < ($3 | 0);\n         $1 = $20 ? (($4 | 0) > 0 ? $4 : 0) : $3;\n         if (($1 | 0) <= 112) {\n          break label$55\n         }\n         $14 = 0;\n         $15 = 0;\n         $9 = 0;\n         $3 = 0;\n         break label$52;\n        }\n        $17 = $7 + $17 | 0;\n        $9 = $2;\n        if (($2 | 0) == ($13 | 0)) {\n         continue\n        }\n        break;\n       };\n       $11 = 1e9 >>> $7 | 0;\n       $12 = -1 << $7 ^ -1;\n       $1 = 0;\n       $9 = $13;\n       while (1) {\n        $15 = ($6 + 784 | 0) + ($13 << 2) | 0;\n        $16 = HEAP32[$15 >> 2];\n        $1 = $1 + ($16 >>> $7 | 0) | 0;\n        HEAP32[$15 >> 2] = $1;\n        $1 = !$1 & ($9 | 0) == ($13 | 0);\n        $9 = $1 ? $9 + 1 & 2047 : $9;\n        $14 = $1 ? $14 + -9 | 0 : $14;\n        $1 = Math_imul($11, $12 & $16);\n        $13 = $13 + 1 & 2047;\n        if (($13 | 0) != ($2 | 0)) {\n         continue\n        }\n        break;\n       };\n       if (!$1) {\n        continue\n       }\n       if (($8 | 0) != ($9 | 0)) {\n        HEAP32[($6 + 784 | 0) + ($2 << 2) >> 2] = $1;\n        $2 = $8;\n        continue label$53;\n       }\n       HEAP32[$10 >> 2] = HEAP32[$10 >> 2] | 1;\n       $9 = $8;\n       continue;\n      }\n      break;\n     };\n     break;\n    };\n    __extenddftf2($6 + 656 | 0, scalbn(1.0, 225 - $1 | 0));\n    copysignl($6 + 688 | 0, HEAP32[$6 + 656 >> 2], HEAP32[$6 + 660 >> 2], HEAP32[$6 + 664 >> 2], HEAP32[$6 + 668 >> 2], $12, $16, $10, $11);\n    $9 = HEAP32[$6 + 696 >> 2];\n    $3 = HEAP32[$6 + 700 >> 2];\n    $14 = HEAP32[$6 + 688 >> 2];\n    $15 = HEAP32[$6 + 692 >> 2];\n    __extenddftf2($6 + 640 | 0, scalbn(1.0, 113 - $1 | 0));\n    fmodl($6 + 672 | 0, $12, $16, $10, $11, HEAP32[$6 + 640 >> 2], HEAP32[$6 + 644 >> 2], HEAP32[$6 + 648 >> 2], HEAP32[$6 + 652 >> 2]);\n    $8 = HEAP32[$6 + 672 >> 2];\n    $7 = HEAP32[$6 + 676 >> 2];\n    $18 = HEAP32[$6 + 680 >> 2];\n    $19 = HEAP32[$6 + 684 >> 2];\n    __subtf3($6 + 624 | 0, $12, $16, $10, $11, $8, $7, $18, $19);\n    __addtf3($6 + 608 | 0, $14, $15, $9, $3, HEAP32[$6 + 624 >> 2], HEAP32[$6 + 628 >> 2], HEAP32[$6 + 632 >> 2], HEAP32[$6 + 636 >> 2]);\n    $10 = HEAP32[$6 + 616 >> 2];\n    $11 = HEAP32[$6 + 620 >> 2];\n    $12 = HEAP32[$6 + 608 >> 2];\n    $16 = HEAP32[$6 + 612 >> 2];\n   }\n   $21 = $13 + 4 & 2047;\n   label$64 : {\n    if (($21 | 0) == ($2 | 0)) {\n     break label$64\n    }\n    $21 = HEAP32[($6 + 784 | 0) + ($21 << 2) >> 2];\n    label$65 : {\n     if ($21 >>> 0 <= 499999999) {\n      if (($13 + 5 & 2047) == ($2 | 0) ? !$21 : 0) {\n       break label$65\n      }\n      __extenddftf2($6 + 496 | 0, +($5 | 0) * .25);\n      __addtf3($6 + 480 | 0, $8, $7, $18, $19, HEAP32[$6 + 496 >> 2], HEAP32[$6 + 500 >> 2], HEAP32[$6 + 504 >> 2], HEAP32[$6 + 508 >> 2]);\n      $18 = HEAP32[$6 + 488 >> 2];\n      $19 = HEAP32[$6 + 492 >> 2];\n      $8 = HEAP32[$6 + 480 >> 2];\n      $7 = HEAP32[$6 + 484 >> 2];\n      break label$65;\n     }\n     if (($21 | 0) != 5e8) {\n      __extenddftf2($6 + 592 | 0, +($5 | 0) * .75);\n      __addtf3($6 + 576 | 0, $8, $7, $18, $19, HEAP32[$6 + 592 >> 2], HEAP32[$6 + 596 >> 2], HEAP32[$6 + 600 >> 2], HEAP32[$6 + 604 >> 2]);\n      $18 = HEAP32[$6 + 584 >> 2];\n      $19 = HEAP32[$6 + 588 >> 2];\n      $8 = HEAP32[$6 + 576 >> 2];\n      $7 = HEAP32[$6 + 580 >> 2];\n      break label$65;\n     }\n     $24 = +($5 | 0);\n     if (($13 + 5 & 2047) == ($2 | 0)) {\n      __extenddftf2($6 + 528 | 0, $24 * .5);\n      __addtf3($6 + 512 | 0, $8, $7, $18, $19, HEAP32[$6 + 528 >> 2], HEAP32[$6 + 532 >> 2], HEAP32[$6 + 536 >> 2], HEAP32[$6 + 540 >> 2]);\n      $18 = HEAP32[$6 + 520 >> 2];\n      $19 = HEAP32[$6 + 524 >> 2];\n      $8 = HEAP32[$6 + 512 >> 2];\n      $7 = HEAP32[$6 + 516 >> 2];\n      break label$65;\n     }\n     __extenddftf2($6 + 560 | 0, $24 * .75);\n     __addtf3($6 + 544 | 0, $8, $7, $18, $19, HEAP32[$6 + 560 >> 2], HEAP32[$6 + 564 >> 2], HEAP32[$6 + 568 >> 2], HEAP32[$6 + 572 >> 2]);\n     $18 = HEAP32[$6 + 552 >> 2];\n     $19 = HEAP32[$6 + 556 >> 2];\n     $8 = HEAP32[$6 + 544 >> 2];\n     $7 = HEAP32[$6 + 548 >> 2];\n    }\n    if (($1 | 0) > 111) {\n     break label$64\n    }\n    fmodl($6 + 464 | 0, $8, $7, $18, $19, 0, 0, 0, 1073676288);\n    if (__letf2(HEAP32[$6 + 464 >> 2], HEAP32[$6 + 468 >> 2], HEAP32[$6 + 472 >> 2], HEAP32[$6 + 476 >> 2], 0, 0, 0, 0)) {\n     break label$64\n    }\n    __addtf3($6 + 448 | 0, $8, $7, $18, $19, 0, 0, 0, 1073676288);\n    $18 = HEAP32[$6 + 456 >> 2];\n    $19 = HEAP32[$6 + 460 >> 2];\n    $8 = HEAP32[$6 + 448 >> 2];\n    $7 = HEAP32[$6 + 452 >> 2];\n   }\n   __addtf3($6 + 432 | 0, $12, $16, $10, $11, $8, $7, $18, $19);\n   __subtf3($6 + 416 | 0, HEAP32[$6 + 432 >> 2], HEAP32[$6 + 436 >> 2], HEAP32[$6 + 440 >> 2], HEAP32[$6 + 444 >> 2], $14, $15, $9, $3);\n   $10 = HEAP32[$6 + 424 >> 2];\n   $11 = HEAP32[$6 + 428 >> 2];\n   $12 = HEAP32[$6 + 416 >> 2];\n   $16 = HEAP32[$6 + 420 >> 2];\n   label$69 : {\n    if (($23 & 2147483647) <= (-2 - $22 | 0)) {\n     break label$69\n    }\n    $2 = $6 + 400 | 0;\n    HEAP32[$2 + 8 >> 2] = $10;\n    HEAP32[$2 + 12 >> 2] = $11 & 2147483647;\n    HEAP32[$2 >> 2] = $12;\n    HEAP32[$2 + 4 >> 2] = $16;\n    __multf3($6 + 384 | 0, $12, $16, $10, $11, 0, 0, 0, 1073610752);\n    $3 = __getf2(HEAP32[$6 + 400 >> 2], HEAP32[$6 + 404 >> 2], HEAP32[$6 + 408 >> 2], HEAP32[$6 + 412 >> 2], 1081081856);\n    $2 = ($3 | 0) < 0;\n    $10 = $2 ? $10 : HEAP32[$6 + 392 >> 2];\n    $11 = $2 ? $11 : HEAP32[$6 + 396 >> 2];\n    $12 = $2 ? $12 : HEAP32[$6 + 384 >> 2];\n    $16 = $2 ? $16 : HEAP32[$6 + 388 >> 2];\n    $17 = (($3 | 0) > -1) + $17 | 0;\n    if (wasm2js_i32$0 = !($20 & ($2 | ($1 | 0) != ($4 | 0)) & (__letf2($8, $7, $18, $19, 0, 0, 0, 0) | 0) != 0), wasm2js_i32$1 = 0, wasm2js_i32$2 = ($17 + 110 | 0) <= ($25 | 0), wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1) {\n     break label$69\n    }\n    HEAP32[2896] = 68;\n   }\n   scalbnl($6 + 368 | 0, $12, $16, $10, $11, $17);\n   $10 = HEAP32[$6 + 368 >> 2];\n   $11 = HEAP32[$6 + 372 >> 2];\n   $2 = HEAP32[$6 + 376 >> 2];\n   $1 = HEAP32[$6 + 380 >> 2];\n  }\n  HEAP32[$0 >> 2] = $10;\n  HEAP32[$0 + 4 >> 2] = $11;\n  HEAP32[$0 + 8 >> 2] = $2;\n  HEAP32[$0 + 12 >> 2] = $1;\n  global$0 = $6 + 8976 | 0;\n }\n \n function scanexp($0) {\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     $3 = HEAP32[$0 + 4 >> 2];\n     label$4 : {\n      if ($3 >>> 0 < HEAPU32[$0 + 104 >> 2]) {\n       HEAP32[$0 + 4 >> 2] = $3 + 1;\n       $2 = HEAPU8[$3 | 0];\n       break label$4;\n      }\n      $2 = __shgetc($0);\n     }\n     switch ($2 + -43 | 0) {\n     case 0:\n     case 2:\n      break label$2;\n     default:\n      break label$3;\n     };\n    }\n    $1 = $2 + -48 | 0;\n    break label$1;\n   }\n   $5 = ($2 | 0) == 45;\n   $3 = HEAP32[$0 + 4 >> 2];\n   label$6 : {\n    if ($3 >>> 0 < HEAPU32[$0 + 104 >> 2]) {\n     HEAP32[$0 + 4 >> 2] = $3 + 1;\n     $2 = HEAPU8[$3 | 0];\n     break label$6;\n    }\n    $2 = __shgetc($0);\n   }\n   $1 = $2 + -48 | 0;\n   if (!($1 >>> 0 < 10 | !HEAP32[$0 + 104 >> 2])) {\n    HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] + -1\n   }\n  }\n  label$9 : {\n   if ($1 >>> 0 < 10) {\n    $1 = 0;\n    while (1) {\n     $1 = Math_imul($1, 10) + $2 | 0;\n     $3 = HEAP32[$0 + 4 >> 2];\n     label$12 : {\n      if ($3 >>> 0 < HEAPU32[$0 + 104 >> 2]) {\n       HEAP32[$0 + 4 >> 2] = $3 + 1;\n       $2 = HEAPU8[$3 | 0];\n       break label$12;\n      }\n      $2 = __shgetc($0);\n     }\n     $4 = $2 + -48 | 0;\n     $1 = $1 + -48 | 0;\n     if (($1 | 0) < 214748364 ? $4 >>> 0 <= 9 : 0) {\n      continue\n     }\n     break;\n    };\n    $3 = $1;\n    $1 = $1 >> 31;\n    label$14 : {\n     if ($4 >>> 0 >= 10) {\n      break label$14\n     }\n     while (1) {\n      $1 = __wasm_i64_mul($3, $1, 10, 0);\n      $3 = $1 + $2 | 0;\n      $2 = i64toi32_i32$HIGH_BITS;\n      $4 = $3 >>> 0 < $1 >>> 0 ? $2 + 1 | 0 : $2;\n      $1 = HEAP32[$0 + 4 >> 2];\n      label$16 : {\n       if ($1 >>> 0 < HEAPU32[$0 + 104 >> 2]) {\n        HEAP32[$0 + 4 >> 2] = $1 + 1;\n        $2 = HEAPU8[$1 | 0];\n        break label$16;\n       }\n       $2 = __shgetc($0);\n      }\n      $1 = $4 + -1 | 0;\n      $3 = $3 + -48 | 0;\n      if ($3 >>> 0 < 4294967248) {\n       $1 = $1 + 1 | 0\n      }\n      $4 = $2 + -48 | 0;\n      if ($4 >>> 0 > 9) {\n       break label$14\n      }\n      if (($1 | 0) < 21474836 ? 1 : ($1 | 0) <= 21474836 ? ($3 >>> 0 >= 2061584302 ? 0 : 1) : 0) {\n       continue\n      }\n      break;\n     };\n    }\n    if ($4 >>> 0 < 10) {\n     while (1) {\n      $2 = HEAP32[$0 + 4 >> 2];\n      label$20 : {\n       if ($2 >>> 0 < HEAPU32[$0 + 104 >> 2]) {\n        HEAP32[$0 + 4 >> 2] = $2 + 1;\n        $2 = HEAPU8[$2 | 0];\n        break label$20;\n       }\n       $2 = __shgetc($0);\n      }\n      if ($2 + -48 >>> 0 < 10) {\n       continue\n      }\n      break;\n     }\n    }\n    if (HEAP32[$0 + 104 >> 2]) {\n     HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] + -1\n    }\n    $0 = $3;\n    $3 = $5 ? 0 - $0 | 0 : $0;\n    $1 = $5 ? 0 - ($1 + (0 < $0 >>> 0) | 0) | 0 : $1;\n    break label$9;\n   }\n   $3 = 0;\n   $1 = -2147483648;\n   if (!HEAP32[$0 + 104 >> 2]) {\n    break label$9\n   }\n   HEAP32[$0 + 4 >> 2] = HEAP32[$0 + 4 >> 2] + -1;\n   i64toi32_i32$HIGH_BITS = -2147483648;\n   return 0;\n  }\n  i64toi32_i32$HIGH_BITS = $1;\n  return $3;\n }\n \n function strtox($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0;\n  $2 = global$0 - 160 | 0;\n  global$0 = $2;\n  memset($2 + 16 | 0, 144);\n  HEAP32[$2 + 92 >> 2] = -1;\n  HEAP32[$2 + 60 >> 2] = $1;\n  HEAP32[$2 + 24 >> 2] = -1;\n  HEAP32[$2 + 20 >> 2] = $1;\n  __shlim($2 + 16 | 0);\n  __floatscan($2, $2 + 16 | 0);\n  $1 = HEAP32[$2 + 8 >> 2];\n  $3 = HEAP32[$2 + 12 >> 2];\n  $4 = HEAP32[$2 + 4 >> 2];\n  HEAP32[$0 >> 2] = HEAP32[$2 >> 2];\n  HEAP32[$0 + 4 >> 2] = $4;\n  HEAP32[$0 + 8 >> 2] = $1;\n  HEAP32[$0 + 12 >> 2] = $3;\n  global$0 = $2 + 160 | 0;\n }\n \n function strtod($0) {\n  var $1 = 0, $2 = 0.0;\n  $1 = global$0 - 16 | 0;\n  global$0 = $1;\n  strtox($1, $0);\n  $2 = __trunctfdf2(HEAP32[$1 >> 2], HEAP32[$1 + 4 >> 2], HEAP32[$1 + 8 >> 2], HEAP32[$1 + 12 >> 2]);\n  global$0 = $1 + 16 | 0;\n  return $2;\n }\n \n function FLAC__stream_encoder_new() {\n  var $0 = 0, $1 = 0, $2 = 0, $3 = 0;\n  $1 = dlcalloc(1, 8);\n  if (!$1) {\n   return 0\n  }\n  $0 = dlcalloc(1, 1032);\n  HEAP32[$1 >> 2] = $0;\n  label$2 : {\n   if (!$0) {\n    break label$2\n   }\n   $3 = dlcalloc(1, 11856);\n   HEAP32[$1 + 4 >> 2] = $3;\n   if (!$3) {\n    dlfree($0);\n    break label$2;\n   }\n   $0 = dlcalloc(1, 20);\n   $3 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$3 + 6856 >> 2] = $0;\n   if (!$0) {\n    dlfree($3);\n    dlfree(HEAP32[$1 >> 2]);\n    break label$2;\n   }\n   HEAP32[$3 + 7296 >> 2] = 0;\n   $0 = HEAP32[$1 >> 2];\n   HEAP32[$0 + 44 >> 2] = 13;\n   HEAP32[$0 + 48 >> 2] = 1056964608;\n   HEAP32[$0 + 36 >> 2] = 0;\n   HEAP32[$0 + 40 >> 2] = 1;\n   HEAP32[$0 + 28 >> 2] = 16;\n   HEAP32[$0 + 32 >> 2] = 44100;\n   HEAP32[$0 + 20 >> 2] = 0;\n   HEAP32[$0 + 24 >> 2] = 2;\n   HEAP32[$0 + 12 >> 2] = 1;\n   HEAP32[$0 + 16 >> 2] = 0;\n   HEAP32[$0 + 4 >> 2] = 0;\n   HEAP32[$0 + 8 >> 2] = 1;\n   $0 = HEAP32[$1 >> 2];\n   HEAP32[$0 + 592 >> 2] = 0;\n   HEAP32[$0 + 596 >> 2] = 0;\n   HEAP32[$0 + 556 >> 2] = 0;\n   HEAP32[$0 + 560 >> 2] = 0;\n   HEAP32[$0 + 564 >> 2] = 0;\n   HEAP32[$0 + 568 >> 2] = 0;\n   HEAP32[$0 + 572 >> 2] = 0;\n   HEAP32[$0 + 576 >> 2] = 0;\n   HEAP32[$0 + 580 >> 2] = 0;\n   HEAP32[$0 + 584 >> 2] = 0;\n   HEAP32[$0 + 600 >> 2] = 0;\n   HEAP32[$0 + 604 >> 2] = 0;\n   $3 = HEAP32[$1 + 4 >> 2];\n   $2 = $3;\n   HEAP32[$2 + 7248 >> 2] = 0;\n   HEAP32[$2 + 7252 >> 2] = 0;\n   HEAP32[$2 + 7048 >> 2] = 0;\n   $2 = $2 + 7256 | 0;\n   HEAP32[$2 >> 2] = 0;\n   HEAP32[$2 + 4 >> 2] = 0;\n   $2 = $3 + 7264 | 0;\n   HEAP32[$2 >> 2] = 0;\n   HEAP32[$2 + 4 >> 2] = 0;\n   $2 = $3 + 7272 | 0;\n   HEAP32[$2 >> 2] = 0;\n   HEAP32[$2 + 4 >> 2] = 0;\n   $2 = $3 + 7280 | 0;\n   HEAP32[$2 >> 2] = 0;\n   HEAP32[$2 + 4 >> 2] = 0;\n   HEAP32[$3 + 7288 >> 2] = 0;\n   FLAC__ogg_encoder_aspect_set_defaults($0 + 632 | 0);\n   $0 = HEAP32[$1 >> 2];\n   label$5 : {\n    if (HEAP32[$0 >> 2] != 1) {\n     break label$5\n    }\n    HEAP32[$0 + 16 >> 2] = 1;\n    HEAP32[$0 + 20 >> 2] = 0;\n    FLAC__stream_encoder_set_apodization($1, 10777);\n    $0 = HEAP32[$1 >> 2];\n    if (HEAP32[$0 >> 2] != 1) {\n     break label$5\n    }\n    HEAP32[$0 + 576 >> 2] = 0;\n    HEAP32[$0 + 580 >> 2] = 5;\n    HEAP32[$0 + 564 >> 2] = 0;\n    HEAP32[$0 + 568 >> 2] = 0;\n    HEAP32[$0 + 556 >> 2] = 8;\n    HEAP32[$0 + 560 >> 2] = 0;\n   }\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 11848 >> 2] = 0;\n   HEAP32[$0 + 6176 >> 2] = $0 + 336;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6180 >> 2] = $0 + 628;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6184 >> 2] = $0 + 920;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6188 >> 2] = $0 + 1212;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6192 >> 2] = $0 + 1504;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6196 >> 2] = $0 + 1796;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6200 >> 2] = $0 + 2088;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6204 >> 2] = $0 + 2380;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6208 >> 2] = $0 + 2672;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6212 >> 2] = $0 + 2964;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6216 >> 2] = $0 + 3256;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6220 >> 2] = $0 + 3548;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6224 >> 2] = $0 + 3840;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6228 >> 2] = $0 + 4132;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6232 >> 2] = $0 + 4424;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6236 >> 2] = $0 + 4716;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6240 >> 2] = $0 + 5008;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6244 >> 2] = $0 + 5300;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6248 >> 2] = $0 + 5592;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6252 >> 2] = $0 + 5884;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6640 >> 2] = $0 + 6256;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6644 >> 2] = $0 + 6268;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6648 >> 2] = $0 + 6280;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6652 >> 2] = $0 + 6292;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6656 >> 2] = $0 + 6304;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6660 >> 2] = $0 + 6316;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6664 >> 2] = $0 + 6328;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6668 >> 2] = $0 + 6340;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6672 >> 2] = $0 + 6352;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6676 >> 2] = $0 + 6364;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6680 >> 2] = $0 + 6376;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6684 >> 2] = $0 + 6388;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6688 >> 2] = $0 + 6400;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6692 >> 2] = $0 + 6412;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6696 >> 2] = $0 + 6424;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6700 >> 2] = $0 + 6436;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6704 >> 2] = $0 + 6448;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6708 >> 2] = $0 + 6460;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6712 >> 2] = $0 + 6472;\n   $0 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$0 + 6716 >> 2] = $0 + 6484;\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6256 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6268 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6280 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6292 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6304 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6316 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6328 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6340 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6352 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6364 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6376 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6388 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6400 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6412 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6424 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6436 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6448 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6460 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6472 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 6484 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 11724 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_init(HEAP32[$1 + 4 >> 2] + 11736 | 0);\n   HEAP32[HEAP32[$1 >> 2] >> 2] = 1;\n   return $1 | 0;\n  }\n  dlfree($1);\n  return 0;\n }\n \n function FLAC__stream_encoder_set_apodization($0, $1) {\n  var $2 = 0, $3 = 0, $4 = 0, $5 = Math_fround(0), $6 = Math_fround(0), $7 = 0, $8 = 0.0, $9 = Math_fround(0), $10 = 0, $11 = 0;\n  $2 = HEAP32[$0 >> 2];\n  label$1 : {\n   if (HEAP32[$2 >> 2] != 1) {\n    break label$1\n   }\n   HEAP32[$2 + 40 >> 2] = 0;\n   while (1) {\n    label$3 : {\n     label$4 : {\n      label$5 : {\n       label$6 : {\n        label$7 : {\n         label$8 : {\n          label$9 : {\n           label$10 : {\n            label$11 : {\n             label$12 : {\n              label$13 : {\n               label$14 : {\n                label$15 : {\n                 label$16 : {\n                  $10 = strchr($1, 59);\n                  label$17 : {\n                   if ($10) {\n                    $4 = $10 - $1 | 0;\n                    break label$17;\n                   }\n                   $4 = strlen($1);\n                  }\n                  $11 = ($4 | 0) != 8;\n                  if (!$11) {\n                   if (strncmp(10584, $1, 8)) {\n                    break label$16\n                   }\n                   HEAP32[$2 + 40 >> 2] = $3 + 1;\n                   HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 0;\n                   break label$3;\n                  }\n                  label$20 : {\n                   switch ($4 + -6 | 0) {\n                   case 1:\n                    break label$13;\n                   case 0:\n                    break label$14;\n                   case 20:\n                    break label$15;\n                   case 7:\n                    break label$20;\n                   default:\n                    break label$12;\n                   };\n                  }\n                  $7 = 1;\n                  if (strncmp(10593, $1, 13)) {\n                   break label$11\n                  }\n                  HEAP32[$2 + 40 >> 2] = $3 + 1;\n                  HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 1;\n                  break label$3;\n                 }\n                 $7 = 0;\n                 if (strncmp(10607, $1, 8)) {\n                  break label$11\n                 }\n                 HEAP32[$2 + 40 >> 2] = $3 + 1;\n                 HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 2;\n                 break label$3;\n                }\n                $7 = 0;\n                if (strncmp(10616, $1, 26)) {\n                 break label$11\n                }\n                HEAP32[$2 + 40 >> 2] = $3 + 1;\n                HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 3;\n                break label$3;\n               }\n               if (strncmp(10643, $1, 6)) {\n                break label$3\n               }\n               HEAP32[$2 + 40 >> 2] = $3 + 1;\n               HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 4;\n               break label$3;\n              }\n              if (strncmp(10650, $1, 7)) {\n               break label$10\n              }\n              HEAP32[$2 + 40 >> 2] = $3 + 1;\n              HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 5;\n              break label$3;\n             }\n             $7 = 0;\n             if ($4 >>> 0 < 8) {\n              break label$9\n             }\n            }\n            if (strncmp(10658, $1, 6)) {\n             break label$8\n            }\n            $6 = Math_fround(strtod($1 + 6 | 0));\n            if ($6 > Math_fround(0.0) ^ 1 | $6 <= Math_fround(.5) ^ 1) {\n             break label$3\n            }\n            $1 = HEAP32[$0 >> 2];\n            HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 48 >> 2] = $6;\n            $1 = HEAP32[$0 >> 2];\n            $4 = HEAP32[$1 + 40 >> 2];\n            HEAP32[$1 + 40 >> 2] = $4 + 1;\n            HEAP32[($1 + ($4 << 4) | 0) + 44 >> 2] = 6;\n            break label$3;\n           }\n           if (strncmp(10665, $1, 7)) {\n            break label$7\n           }\n           HEAP32[$2 + 40 >> 2] = $3 + 1;\n           HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 7;\n           break label$3;\n          }\n          label$21 : {\n           switch ($4 + -4 | 0) {\n           case 0:\n            break label$21;\n           case 1:\n            break label$5;\n           default:\n            break label$3;\n           };\n          }\n          if (strncmp(10673, $1, 4)) {\n           break label$3\n          }\n          HEAP32[$2 + 40 >> 2] = $3 + 1;\n          HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 8;\n          break label$3;\n         }\n         if (!$7) {\n          break label$6\n         }\n         if (strncmp(10678, $1, 13)) {\n          break label$6\n         }\n         HEAP32[$2 + 40 >> 2] = $3 + 1;\n         HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 9;\n         break label$3;\n        }\n        if (strncmp(10692, $1, 7)) {\n         break label$3\n        }\n        HEAP32[$2 + 40 >> 2] = $3 + 1;\n        HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 10;\n        break label$3;\n       }\n       label$22 : {\n        if (($4 | 0) != 9) {\n         break label$22\n        }\n        if (strncmp(10700, $1, 9)) {\n         break label$22\n        }\n        HEAP32[$2 + 40 >> 2] = $3 + 1;\n        HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 11;\n        break label$3;\n       }\n       if (!$11) {\n        if (!strncmp(10710, $1, 8)) {\n         HEAP32[$2 + 40 >> 2] = $3 + 1;\n         HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 12;\n         break label$3;\n        }\n        if (strncmp(10719, $1, 6)) {\n         break label$3\n        }\n        break label$4;\n       }\n       if (!strncmp(10719, $1, 6)) {\n        break label$4\n       }\n       if ($4 >>> 0 < 16) {\n        break label$3\n       }\n       if (!strncmp(10726, $1, 14)) {\n        $8 = strtod($1 + 14 | 0);\n        label$26 : {\n         if (Math_abs($8) < 2147483648.0) {\n          $4 = ~~$8;\n          break label$26;\n         }\n         $4 = -2147483648;\n        }\n        $3 = strchr($1, 47);\n        $5 = Math_fround(.10000000149011612);\n        label$28 : {\n         if (!$3) {\n          break label$28\n         }\n         $2 = $3 + 1 | 0;\n         $5 = Math_fround(.9900000095367432);\n         if (!(Math_fround(strtod($2)) < Math_fround(.9900000095367432))) {\n          break label$28\n         }\n         $5 = Math_fround(strtod($2));\n        }\n        $1 = strchr($3 ? $3 + 1 | 0 : $1, 47);\n        $6 = Math_fround(.20000000298023224);\n        label$30 : {\n         if (!$1) {\n          break label$30\n         }\n         $6 = Math_fround(strtod($1 + 1 | 0));\n        }\n        $1 = HEAP32[$0 >> 2];\n        $2 = HEAP32[$1 + 40 >> 2];\n        if (($4 | 0) <= 1) {\n         HEAPF32[(($2 << 4) + $1 | 0) + 48 >> 2] = $6;\n         $1 = HEAP32[$0 >> 2];\n         $4 = HEAP32[$1 + 40 >> 2];\n         HEAP32[$1 + 40 >> 2] = $4 + 1;\n         HEAP32[($1 + ($4 << 4) | 0) + 44 >> 2] = 13;\n         break label$3;\n        }\n        if ($2 + $4 >>> 0 > 31) {\n         break label$3\n        }\n        $9 = Math_fround(Math_fround(Math_fround(1.0) / Math_fround(Math_fround(1.0) - $5)) + Math_fround(-1.0));\n        $5 = Math_fround($9 + Math_fround($4 | 0));\n        $3 = 0;\n        while (1) {\n         HEAPF32[(($2 << 4) + $1 | 0) + 48 >> 2] = $6;\n         $1 = HEAP32[$0 >> 2];\n         HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 52 >> 2] = Math_fround($3 | 0) / $5;\n         $1 = HEAP32[$0 >> 2];\n         $3 = $3 + 1 | 0;\n         HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 56 >> 2] = Math_fround($9 + Math_fround($3 | 0)) / $5;\n         $1 = HEAP32[$0 >> 2];\n         $7 = HEAP32[$1 + 40 >> 2];\n         $2 = $7 + 1 | 0;\n         HEAP32[$1 + 40 >> 2] = $2;\n         HEAP32[(($7 << 4) + $1 | 0) + 44 >> 2] = 14;\n         if (($3 | 0) != ($4 | 0)) {\n          continue\n         }\n         break;\n        };\n        break label$3;\n       }\n       if ($4 >>> 0 < 17) {\n        break label$3\n       }\n       if (strncmp(10741, $1, 15)) {\n        break label$3\n       }\n       $8 = strtod($1 + 15 | 0);\n       label$33 : {\n        if (Math_abs($8) < 2147483648.0) {\n         $4 = ~~$8;\n         break label$33;\n        }\n        $4 = -2147483648;\n       }\n       $6 = Math_fround(.20000000298023224);\n       $3 = strchr($1, 47);\n       $5 = Math_fround(.20000000298023224);\n       label$35 : {\n        if (!$3) {\n         break label$35\n        }\n        $2 = $3 + 1 | 0;\n        $5 = Math_fround(.9900000095367432);\n        if (!(Math_fround(strtod($2)) < Math_fround(.9900000095367432))) {\n         break label$35\n        }\n        $5 = Math_fround(strtod($2));\n       }\n       $1 = strchr($3 ? $3 + 1 | 0 : $1, 47);\n       if ($1) {\n        $6 = Math_fround(strtod($1 + 1 | 0))\n       }\n       $1 = HEAP32[$0 >> 2];\n       $2 = HEAP32[$1 + 40 >> 2];\n       if (($4 | 0) <= 1) {\n        HEAPF32[(($2 << 4) + $1 | 0) + 48 >> 2] = $6;\n        $1 = HEAP32[$0 >> 2];\n        $4 = HEAP32[$1 + 40 >> 2];\n        HEAP32[$1 + 40 >> 2] = $4 + 1;\n        HEAP32[($1 + ($4 << 4) | 0) + 44 >> 2] = 13;\n        break label$3;\n       }\n       if ($2 + $4 >>> 0 > 31) {\n        break label$3\n       }\n       $9 = Math_fround(Math_fround(Math_fround(1.0) / Math_fround(Math_fround(1.0) - $5)) + Math_fround(-1.0));\n       $5 = Math_fround($9 + Math_fround($4 | 0));\n       $3 = 0;\n       while (1) {\n        HEAPF32[(($2 << 4) + $1 | 0) + 48 >> 2] = $6;\n        $1 = HEAP32[$0 >> 2];\n        HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 52 >> 2] = Math_fround($3 | 0) / $5;\n        $1 = HEAP32[$0 >> 2];\n        $3 = $3 + 1 | 0;\n        HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 56 >> 2] = Math_fround($9 + Math_fround($3 | 0)) / $5;\n        $1 = HEAP32[$0 >> 2];\n        $7 = HEAP32[$1 + 40 >> 2];\n        $2 = $7 + 1 | 0;\n        HEAP32[$1 + 40 >> 2] = $2;\n        HEAP32[(($7 << 4) + $1 | 0) + 44 >> 2] = 15;\n        if (($3 | 0) != ($4 | 0)) {\n         continue\n        }\n        break;\n       };\n       break label$3;\n      }\n      if (strncmp(10757, $1, 5)) {\n       break label$3\n      }\n      HEAP32[$2 + 40 >> 2] = $3 + 1;\n      HEAP32[(($3 << 4) + $2 | 0) + 44 >> 2] = 16;\n      break label$3;\n     }\n     $6 = Math_fround(strtod($1 + 6 | 0));\n     if ($6 >= Math_fround(0.0) ^ 1 | $6 <= Math_fround(1.0) ^ 1) {\n      break label$3\n     }\n     $1 = HEAP32[$0 >> 2];\n     HEAPF32[((HEAP32[$1 + 40 >> 2] << 4) + $1 | 0) + 48 >> 2] = $6;\n     $1 = HEAP32[$0 >> 2];\n     $4 = HEAP32[$1 + 40 >> 2];\n     HEAP32[$1 + 40 >> 2] = $4 + 1;\n     HEAP32[($1 + ($4 << 4) | 0) + 44 >> 2] = 13;\n    }\n    $2 = HEAP32[$0 >> 2];\n    $3 = HEAP32[$2 + 40 >> 2];\n    if ($10) {\n     $1 = $10 + 1 | 0;\n     if (($3 | 0) != 32) {\n      continue\n     }\n    }\n    break;\n   };\n   $4 = 1;\n   if ($3) {\n    break label$1\n   }\n   HEAP32[$2 + 40 >> 2] = 1;\n   HEAP32[$2 + 44 >> 2] = 13;\n   HEAP32[$2 + 48 >> 2] = 1056964608;\n  }\n  return $4;\n }\n \n function FLAC__stream_encoder_delete($0) {\n  $0 = $0 | 0;\n  var $1 = 0, $2 = 0;\n  if ($0) {\n   HEAP32[HEAP32[$0 + 4 >> 2] + 11848 >> 2] = 1;\n   FLAC__stream_encoder_finish($0);\n   $1 = HEAP32[$0 + 4 >> 2];\n   $2 = HEAP32[$1 + 11752 >> 2];\n   if ($2) {\n    FLAC__stream_decoder_delete($2);\n    $1 = HEAP32[$0 + 4 >> 2];\n   }\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear($1 + 6256 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6268 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6280 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6292 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6304 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6316 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6328 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6340 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6352 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6364 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6376 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6388 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6400 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6412 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6424 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6436 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6448 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6460 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6472 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 6484 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 11724 | 0);\n   FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(HEAP32[$0 + 4 >> 2] + 11736 | 0);\n   FLAC__bitreader_delete(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2]);\n   dlfree(HEAP32[$0 + 4 >> 2]);\n   dlfree(HEAP32[$0 >> 2]);\n   dlfree($0);\n  }\n }\n \n function FLAC__stream_encoder_finish($0) {\n  $0 = $0 | 0;\n  var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0;\n  $7 = global$0 - 32 | 0;\n  global$0 = $7;\n  label$1 : {\n   if (!$0) {\n    break label$1\n   }\n   label$3 : {\n    label$4 : {\n     $5 = HEAP32[$0 >> 2];\n     $1 = HEAP32[$5 >> 2];\n     switch ($1 | 0) {\n     case 1:\n      break label$1;\n     case 0:\n      break label$4;\n     default:\n      break label$3;\n     };\n    }\n    $2 = HEAP32[$0 + 4 >> 2];\n    if (HEAP32[$2 + 11848 >> 2]) {\n     break label$3\n    }\n    $2 = HEAP32[$2 + 7052 >> 2];\n    if (!$2) {\n     break label$3\n    }\n    $3 = HEAP32[$5 + 36 >> 2];\n    HEAP32[$5 + 36 >> 2] = $2;\n    $3 = !process_frame_($0, ($2 | 0) != ($3 | 0), 1);\n    $5 = HEAP32[$0 >> 2];\n   }\n   if (HEAP32[$5 + 12 >> 2]) {\n    $2 = HEAP32[$0 + 4 >> 2];\n    FLAC__MD5Final($2 + 6928 | 0, $2 + 7060 | 0);\n   }\n   $5 = $0 + 4 | 0;\n   $1 = HEAP32[$0 + 4 >> 2];\n   label$6 : {\n    if (HEAP32[$1 + 11848 >> 2]) {\n     $2 = $3;\n     break label$6;\n    }\n    $4 = HEAP32[$0 >> 2];\n    label$8 : {\n     if (HEAP32[$4 >> 2]) {\n      break label$8\n     }\n     $11 = HEAP32[$1 + 7268 >> 2];\n     if ($11) {\n      label$10 : {\n       if (HEAP32[$1 + 7260 >> 2]) {\n        $13 = HEAP32[$1 + 6900 >> 2];\n        $12 = HEAP32[$1 + 6896 >> 2];\n        $2 = $1 + 6920 | 0;\n        $8 = HEAP32[$2 >> 2];\n        $9 = HEAP32[$2 + 4 >> 2];\n        if ((FUNCTION_TABLE[$11]($0, 0, 0, HEAP32[$1 + 7288 >> 2]) | 0) == 2) {\n         break label$10\n        }\n        simple_ogg_page__init($7);\n        $2 = HEAP32[$0 >> 2];\n        $4 = HEAP32[$2 + 608 >> 2];\n        $6 = HEAP32[$2 + 612 >> 2];\n        $2 = HEAP32[$0 + 4 >> 2];\n        label$12 : {\n         if (!simple_ogg_page__get_at($0, $4, $6, $7, HEAP32[$2 + 7268 >> 2], HEAP32[$2 + 7264 >> 2], HEAP32[$2 + 7288 >> 2])) {\n          break label$12\n         }\n         $11 = HEAP32[1357] + HEAP32[1356] | 0;\n         $14 = HEAP32[1362] + (HEAP32[1361] + (HEAP32[1360] + (HEAP32[1359] + ($11 + HEAP32[1358] | 0) | 0) | 0) | 0) | 0;\n         $2 = $14 + HEAP32[1363] >>> 3 | 0;\n         if ($2 + 33 >>> 0 > HEAPU32[$7 + 12 >> 2]) {\n          HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n          simple_ogg_page__clear($7);\n          break label$10;\n         }\n         $4 = $1 + 6936 | 0;\n         $10 = HEAPU8[$4 + 4 | 0] | HEAPU8[$4 + 5 | 0] << 8 | (HEAPU8[$4 + 6 | 0] << 16 | HEAPU8[$4 + 7 | 0] << 24);\n         $2 = $2 + HEAP32[$7 + 8 >> 2] | 0;\n         $4 = HEAPU8[$4 | 0] | HEAPU8[$4 + 1 | 0] << 8 | (HEAPU8[$4 + 2 | 0] << 16 | HEAPU8[$4 + 3 | 0] << 24);\n         HEAP8[$2 + 25 | 0] = $4;\n         HEAP8[$2 + 26 | 0] = $4 >>> 8;\n         HEAP8[$2 + 27 | 0] = $4 >>> 16;\n         HEAP8[$2 + 28 | 0] = $4 >>> 24;\n         HEAP8[$2 + 29 | 0] = $10;\n         HEAP8[$2 + 30 | 0] = $10 >>> 8;\n         HEAP8[$2 + 31 | 0] = $10 >>> 16;\n         HEAP8[$2 + 32 | 0] = $10 >>> 24;\n         $1 = $1 + 6928 | 0;\n         $4 = HEAPU8[$1 + 4 | 0] | HEAPU8[$1 + 5 | 0] << 8 | (HEAPU8[$1 + 6 | 0] << 16 | HEAPU8[$1 + 7 | 0] << 24);\n         $1 = HEAPU8[$1 | 0] | HEAPU8[$1 + 1 | 0] << 8 | (HEAPU8[$1 + 2 | 0] << 16 | HEAPU8[$1 + 3 | 0] << 24);\n         HEAP8[$2 + 17 | 0] = $1;\n         HEAP8[$2 + 18 | 0] = $1 >>> 8;\n         HEAP8[$2 + 19 | 0] = $1 >>> 16;\n         HEAP8[$2 + 20 | 0] = $1 >>> 24;\n         HEAP8[$2 + 21 | 0] = $4;\n         HEAP8[$2 + 22 | 0] = $4 >>> 8;\n         HEAP8[$2 + 23 | 0] = $4 >>> 16;\n         HEAP8[$2 + 24 | 0] = $4 >>> 24;\n         $2 = $14 + -4 >>> 3 | 0;\n         if ($2 + 22 >>> 0 > HEAPU32[$7 + 12 >> 2]) {\n          HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n          simple_ogg_page__clear($7);\n          break label$10;\n         }\n         $2 = $2 + HEAP32[$7 + 8 >> 2] | 0;\n         HEAP8[$2 + 21 | 0] = $8;\n         HEAP8[$2 + 20 | 0] = ($9 & 255) << 24 | $8 >>> 8;\n         HEAP8[$2 + 19 | 0] = ($9 & 65535) << 16 | $8 >>> 16;\n         HEAP8[$2 + 18 | 0] = ($9 & 16777215) << 8 | $8 >>> 24;\n         $2 = $2 + 17 | 0;\n         HEAP8[$2 | 0] = HEAPU8[$2 | 0] & 240 | $9 & 15;\n         $2 = $11 >>> 3 | 0;\n         if ($2 + 23 >>> 0 > HEAPU32[$7 + 12 >> 2]) {\n          HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n          simple_ogg_page__clear($7);\n          break label$10;\n         }\n         $2 = $2 + HEAP32[$7 + 8 >> 2] | 0;\n         HEAP8[$2 + 22 | 0] = $13;\n         HEAP8[$2 + 21 | 0] = $13 >>> 8;\n         HEAP8[$2 + 20 | 0] = $13 >>> 16;\n         HEAP8[$2 + 19 | 0] = $12;\n         HEAP8[$2 + 18 | 0] = $12 >>> 8;\n         HEAP8[$2 + 17 | 0] = $12 >>> 16;\n         $2 = HEAP32[$0 >> 2];\n         $4 = HEAP32[$2 + 608 >> 2];\n         $1 = HEAP32[$2 + 612 >> 2];\n         $2 = HEAP32[$0 + 4 >> 2];\n         $2 = simple_ogg_page__set_at($0, $4, $1, $7, HEAP32[$2 + 7268 >> 2], HEAP32[$2 + 7276 >> 2], HEAP32[$2 + 7288 >> 2]);\n         simple_ogg_page__clear($7);\n         if (!$2) {\n          break label$10\n         }\n         $2 = HEAP32[HEAP32[$5 >> 2] + 7048 >> 2];\n         if (!$2 | !HEAP32[$2 >> 2]) {\n          break label$10\n         }\n         $1 = HEAP32[$0 >> 2];\n         if (!(HEAP32[$1 + 616 >> 2] | HEAP32[$1 + 620 >> 2])) {\n          break label$10\n         }\n         FLAC__format_seektable_sort($2);\n         simple_ogg_page__init($7);\n         $2 = HEAP32[$0 >> 2];\n         $4 = HEAP32[$2 + 616 >> 2];\n         $1 = HEAP32[$2 + 620 >> 2];\n         $2 = HEAP32[$0 + 4 >> 2];\n         if (!simple_ogg_page__get_at($0, $4, $1, $7, HEAP32[$2 + 7268 >> 2], HEAP32[$2 + 7264 >> 2], HEAP32[$2 + 7288 >> 2])) {\n          break label$12\n         }\n         $6 = HEAP32[$5 >> 2];\n         $2 = HEAP32[$6 + 7048 >> 2];\n         $1 = HEAP32[$2 >> 2];\n         if (HEAP32[$7 + 12 >> 2] != (Math_imul($1, 18) + 4 | 0)) {\n          HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n          simple_ogg_page__clear($7);\n          break label$10;\n         }\n         if ($1) {\n          $1 = HEAP32[$7 + 8 >> 2] + 4 | 0;\n          $4 = 0;\n          while (1) {\n           $8 = HEAP32[$2 + 4 >> 2] + Math_imul($4, 24) | 0;\n           $9 = HEAP32[$8 >> 2];\n           $2 = HEAP32[$8 + 4 >> 2];\n           $10 = HEAP32[$8 + 8 >> 2];\n           $6 = HEAP32[$8 + 12 >> 2];\n           $8 = HEAP32[$8 + 16 >> 2];\n           HEAP8[$1 + 17 | 0] = $8;\n           HEAP8[$1 + 15 | 0] = $10;\n           HEAP8[$1 + 7 | 0] = $9;\n           HEAP8[$1 + 16 | 0] = $8 >>> 8;\n           HEAP8[$1 + 14 | 0] = ($6 & 255) << 24 | $10 >>> 8;\n           HEAP8[$1 + 13 | 0] = ($6 & 65535) << 16 | $10 >>> 16;\n           HEAP8[$1 + 12 | 0] = ($6 & 16777215) << 8 | $10 >>> 24;\n           HEAP8[$1 + 11 | 0] = $6;\n           HEAP8[$1 + 10 | 0] = $6 >>> 8;\n           HEAP8[$1 + 9 | 0] = $6 >>> 16;\n           HEAP8[$1 + 8 | 0] = $6 >>> 24;\n           HEAP8[$1 + 6 | 0] = ($2 & 255) << 24 | $9 >>> 8;\n           HEAP8[$1 + 5 | 0] = ($2 & 65535) << 16 | $9 >>> 16;\n           HEAP8[$1 + 4 | 0] = ($2 & 16777215) << 8 | $9 >>> 24;\n           HEAP8[$1 + 3 | 0] = $2;\n           HEAP8[$1 + 2 | 0] = $2 >>> 8;\n           HEAP8[$1 + 1 | 0] = $2 >>> 16;\n           HEAP8[$1 | 0] = $2 >>> 24;\n           $1 = $1 + 18 | 0;\n           $4 = $4 + 1 | 0;\n           $6 = HEAP32[$5 >> 2];\n           $2 = HEAP32[$6 + 7048 >> 2];\n           if ($4 >>> 0 < HEAPU32[$2 >> 2]) {\n            continue\n           }\n           break;\n          };\n         }\n         $2 = HEAP32[$0 >> 2];\n         simple_ogg_page__set_at($0, HEAP32[$2 + 616 >> 2], HEAP32[$2 + 620 >> 2], $7, HEAP32[$6 + 7268 >> 2], HEAP32[$6 + 7276 >> 2], HEAP32[$6 + 7288 >> 2]);\n        }\n        simple_ogg_page__clear($7);\n        break label$10;\n       }\n       $13 = HEAP32[$1 + 6912 >> 2];\n       $8 = HEAP32[$1 + 6900 >> 2];\n       $9 = HEAP32[$1 + 6896 >> 2];\n       $6 = $1 + 6920 | 0;\n       $2 = HEAP32[$6 >> 2];\n       $6 = HEAP32[$6 + 4 >> 2];\n       label$19 : {\n        label$20 : {\n         $16 = $0;\n         $10 = HEAP32[$4 + 612 >> 2];\n         $12 = HEAP32[1357] + HEAP32[1356] | 0;\n         $14 = HEAP32[1362] + (HEAP32[1361] + (HEAP32[1360] + (HEAP32[1359] + ($12 + HEAP32[1358] | 0) | 0) | 0) | 0) | 0;\n         $15 = ($14 + HEAP32[1363] >>> 3 | 0) + 4 | 0;\n         $4 = $15 + HEAP32[$4 + 608 >> 2] | 0;\n         if ($4 >>> 0 < $15 >>> 0) {\n          $10 = $10 + 1 | 0\n         }\n         switch (FUNCTION_TABLE[$11]($16, $4, $10, HEAP32[$1 + 7288 >> 2]) | 0) {\n         case 0:\n          break label$19;\n         case 1:\n          break label$20;\n         default:\n          break label$10;\n         };\n        }\n        HEAP32[HEAP32[$0 >> 2] >> 2] = 5;\n        break label$10;\n       }\n       $4 = $1 + 6928 | 0;\n       $1 = HEAP32[$0 + 4 >> 2];\n       if (FUNCTION_TABLE[HEAP32[$1 + 7276 >> 2]]($0, $4, 16, 0, 0, HEAP32[$1 + 7288 >> 2])) {\n        HEAP32[HEAP32[$0 >> 2] >> 2] = 5;\n        break label$10;\n       }\n       HEAP8[$7 + 4 | 0] = $2;\n       HEAP8[$7 + 3 | 0] = ($6 & 255) << 24 | $2 >>> 8;\n       HEAP8[$7 + 2 | 0] = ($6 & 65535) << 16 | $2 >>> 16;\n       HEAP8[$7 + 1 | 0] = ($6 & 16777215) << 8 | $2 >>> 24;\n       HEAP8[$7 | 0] = ($6 & 15 | $13 << 4) + 240;\n       label$22 : {\n        label$23 : {\n         $2 = ($14 + -4 >>> 3 | 0) + 4 | 0;\n         $1 = HEAP32[$0 >> 2];\n         $4 = $2 + HEAP32[$1 + 608 >> 2] | 0;\n         $1 = HEAP32[$1 + 612 >> 2];\n         $1 = $4 >>> 0 < $2 >>> 0 ? $1 + 1 | 0 : $1;\n         $2 = HEAP32[$0 + 4 >> 2];\n         switch (FUNCTION_TABLE[HEAP32[$2 + 7268 >> 2]]($0, $4, $1, HEAP32[$2 + 7288 >> 2]) | 0) {\n         case 0:\n          break label$22;\n         case 1:\n          break label$23;\n         default:\n          break label$10;\n         };\n        }\n        HEAP32[HEAP32[$0 >> 2] >> 2] = 5;\n        break label$10;\n       }\n       $2 = HEAP32[$0 + 4 >> 2];\n       if (FUNCTION_TABLE[HEAP32[$2 + 7276 >> 2]]($0, $7, 5, 0, 0, HEAP32[$2 + 7288 >> 2])) {\n        HEAP32[HEAP32[$0 >> 2] >> 2] = 5;\n        break label$10;\n       }\n       HEAP8[$7 + 5 | 0] = $8;\n       HEAP8[$7 + 4 | 0] = $8 >>> 8;\n       HEAP8[$7 + 3 | 0] = $8 >>> 16;\n       HEAP8[$7 + 2 | 0] = $9;\n       HEAP8[$7 + 1 | 0] = $9 >>> 8;\n       HEAP8[$7 | 0] = $9 >>> 16;\n       label$25 : {\n        label$26 : {\n         $2 = ($12 >>> 3 | 0) + 4 | 0;\n         $1 = HEAP32[$0 >> 2];\n         $4 = $2 + HEAP32[$1 + 608 >> 2] | 0;\n         $1 = HEAP32[$1 + 612 >> 2];\n         $1 = $4 >>> 0 < $2 >>> 0 ? $1 + 1 | 0 : $1;\n         $2 = HEAP32[$0 + 4 >> 2];\n         switch (FUNCTION_TABLE[HEAP32[$2 + 7268 >> 2]]($0, $4, $1, HEAP32[$2 + 7288 >> 2]) | 0) {\n         case 0:\n          break label$25;\n         case 1:\n          break label$26;\n         default:\n          break label$10;\n         };\n        }\n        HEAP32[HEAP32[$0 >> 2] >> 2] = 5;\n        break label$10;\n       }\n       $2 = HEAP32[$0 + 4 >> 2];\n       if (FUNCTION_TABLE[HEAP32[$2 + 7276 >> 2]]($0, $7, 6, 0, 0, HEAP32[$2 + 7288 >> 2])) {\n        HEAP32[HEAP32[$0 >> 2] >> 2] = 5;\n        break label$10;\n       }\n       $2 = HEAP32[HEAP32[$5 >> 2] + 7048 >> 2];\n       if (!$2 | !HEAP32[$2 >> 2]) {\n        break label$10\n       }\n       $1 = HEAP32[$0 >> 2];\n       if (!(HEAP32[$1 + 616 >> 2] | HEAP32[$1 + 620 >> 2])) {\n        break label$10\n       }\n       FLAC__format_seektable_sort($2);\n       label$28 : {\n        label$29 : {\n         label$30 : {\n          $2 = HEAP32[$0 >> 2];\n          $1 = HEAP32[$2 + 616 >> 2] + 4 | 0;\n          $2 = HEAP32[$2 + 620 >> 2];\n          $4 = $1 >>> 0 < 4 ? $2 + 1 | 0 : $2;\n          $2 = HEAP32[$0 + 4 >> 2];\n          switch (FUNCTION_TABLE[HEAP32[$2 + 7268 >> 2]]($0, $1, $4, HEAP32[$2 + 7288 >> 2]) | 0) {\n          case 1:\n           break label$29;\n          case 0:\n           break label$30;\n          default:\n           break label$10;\n          };\n         }\n         $4 = HEAP32[$5 >> 2];\n         $1 = HEAP32[$4 + 7048 >> 2];\n         if (!HEAP32[$1 >> 2]) {\n          break label$10\n         }\n         $6 = 0;\n         break label$28;\n        }\n        HEAP32[HEAP32[$0 >> 2] >> 2] = 5;\n        break label$10;\n       }\n       while (1) {\n        label$32 : {\n         $9 = Math_imul($6, 24);\n         $8 = $9 + HEAP32[$1 + 4 >> 2] | 0;\n         $2 = HEAP32[$8 + 4 >> 2];\n         $8 = HEAP32[$8 >> 2];\n         $10 = $8 << 24 | $8 << 8 & 16711680;\n         HEAP32[$7 >> 2] = (($2 & 255) << 24 | $8 >>> 8) & -16777216 | (($2 & 16777215) << 8 | $8 >>> 24) & 16711680 | ($2 >>> 8 & 65280 | $2 >>> 24);\n         HEAP32[$7 + 4 >> 2] = ($2 << 24 | $8 >>> 8) & 65280 | ($2 << 8 | $8 >>> 24) & 255 | $10;\n         $8 = $9 + HEAP32[$1 + 4 >> 2] | 0;\n         $2 = HEAP32[$8 + 12 >> 2];\n         $8 = HEAP32[$8 + 8 >> 2];\n         $10 = $8 << 24 | $8 << 8 & 16711680;\n         HEAP32[$7 + 8 >> 2] = (($2 & 255) << 24 | $8 >>> 8) & -16777216 | (($2 & 16777215) << 8 | $8 >>> 24) & 16711680 | ($2 >>> 8 & 65280 | $2 >>> 24);\n         HEAP32[$7 + 12 >> 2] = ($2 << 24 | $8 >>> 8) & 65280 | ($2 << 8 | $8 >>> 24) & 255 | $10;\n         $2 = HEAPU16[($9 + HEAP32[$1 + 4 >> 2] | 0) + 16 >> 1];\n         HEAP16[$7 + 16 >> 1] = ($2 << 24 | $2 << 8 & 16711680) >>> 16;\n         if (FUNCTION_TABLE[HEAP32[$4 + 7276 >> 2]]($0, $7, 18, 0, 0, HEAP32[$4 + 7288 >> 2])) {\n          break label$32\n         }\n         $6 = $6 + 1 | 0;\n         $4 = HEAP32[$5 >> 2];\n         $1 = HEAP32[$4 + 7048 >> 2];\n         if ($6 >>> 0 < HEAPU32[$1 >> 2]) {\n          continue\n         }\n         break label$10;\n        }\n        break;\n       };\n       HEAP32[HEAP32[$0 >> 2] >> 2] = 5;\n      }\n      $1 = HEAP32[$0 + 4 >> 2];\n      $4 = HEAP32[$0 >> 2];\n      $3 = HEAP32[$4 >> 2] ? 1 : $3;\n     }\n     $2 = HEAP32[$1 + 7280 >> 2];\n     if (!$2) {\n      break label$8\n     }\n     FUNCTION_TABLE[$2]($0, $1 + 6872 | 0, HEAP32[$1 + 7288 >> 2]);\n     $4 = HEAP32[$0 >> 2];\n    }\n    if (!HEAP32[$4 + 4 >> 2]) {\n     $2 = $3;\n     break label$6;\n    }\n    $2 = HEAP32[HEAP32[$5 >> 2] + 11752 >> 2];\n    if (!$2) {\n     $2 = $3;\n     break label$6;\n    }\n    if (FLAC__stream_decoder_finish($2)) {\n     $2 = $3;\n     break label$6;\n    }\n    $2 = 1;\n    if ($3) {\n     break label$6\n    }\n    HEAP32[HEAP32[$0 >> 2] >> 2] = 4;\n   }\n   $1 = HEAP32[$5 >> 2];\n   $3 = HEAP32[$1 + 7296 >> 2];\n   if ($3) {\n    if (($3 | 0) != HEAP32[1896]) {\n     fclose($3);\n     $1 = HEAP32[$5 >> 2];\n    }\n    HEAP32[$1 + 7296 >> 2] = 0;\n   }\n   if (HEAP32[$1 + 7260 >> 2]) {\n    ogg_stream_clear(HEAP32[$0 >> 2] + 640 | 0)\n   }\n   $1 = HEAP32[$0 >> 2];\n   $3 = HEAP32[$1 + 600 >> 2];\n   if ($3) {\n    dlfree($3);\n    $1 = HEAP32[$0 >> 2];\n    HEAP32[$1 + 600 >> 2] = 0;\n    HEAP32[$1 + 604 >> 2] = 0;\n   }\n   if (HEAP32[$1 + 24 >> 2]) {\n    $3 = 0;\n    while (1) {\n     $4 = HEAP32[$5 >> 2];\n     $1 = $3 << 2;\n     $6 = HEAP32[($4 + $1 | 0) + 7328 >> 2];\n     if ($6) {\n      dlfree($6);\n      HEAP32[($1 + HEAP32[$5 >> 2] | 0) + 7328 >> 2] = 0;\n      $4 = HEAP32[$5 >> 2];\n     }\n     $4 = HEAP32[($4 + $1 | 0) + 7368 >> 2];\n     if ($4) {\n      dlfree($4);\n      HEAP32[($1 + HEAP32[$5 >> 2] | 0) + 7368 >> 2] = 0;\n     }\n     $3 = $3 + 1 | 0;\n     if ($3 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) {\n      continue\n     }\n     break;\n    };\n   }\n   $1 = HEAP32[$5 >> 2];\n   $3 = HEAP32[$1 + 7360 >> 2];\n   if ($3) {\n    dlfree($3);\n    HEAP32[HEAP32[$5 >> 2] + 7360 >> 2] = 0;\n    $1 = HEAP32[$5 >> 2];\n   }\n   $3 = HEAP32[$1 + 7400 >> 2];\n   if ($3) {\n    dlfree($3);\n    HEAP32[HEAP32[$5 >> 2] + 7400 >> 2] = 0;\n    $1 = HEAP32[$5 >> 2];\n   }\n   $3 = HEAP32[$1 + 7364 >> 2];\n   if ($3) {\n    dlfree($3);\n    HEAP32[HEAP32[$5 >> 2] + 7364 >> 2] = 0;\n    $1 = HEAP32[$5 >> 2];\n   }\n   $3 = HEAP32[$1 + 7404 >> 2];\n   if ($3) {\n    dlfree($3);\n    HEAP32[HEAP32[$5 >> 2] + 7404 >> 2] = 0;\n    $1 = HEAP32[$5 >> 2];\n   }\n   $4 = HEAP32[$0 >> 2];\n   if (HEAP32[$4 + 40 >> 2]) {\n    $3 = 0;\n    while (1) {\n     $6 = $3 << 2;\n     $8 = HEAP32[($6 + $1 | 0) + 7408 >> 2];\n     if ($8) {\n      dlfree($8);\n      HEAP32[($6 + HEAP32[$0 + 4 >> 2] | 0) + 7408 >> 2] = 0;\n      $4 = HEAP32[$0 >> 2];\n      $1 = HEAP32[$0 + 4 >> 2];\n     }\n     $3 = $3 + 1 | 0;\n     if ($3 >>> 0 < HEAPU32[$4 + 40 >> 2]) {\n      continue\n     }\n     break;\n    };\n   }\n   $3 = HEAP32[$1 + 7536 >> 2];\n   if ($3) {\n    dlfree($3);\n    $1 = HEAP32[$0 + 4 >> 2];\n    HEAP32[$1 + 7536 >> 2] = 0;\n    $4 = HEAP32[$0 >> 2];\n   }\n   if (HEAP32[$4 + 24 >> 2]) {\n    $4 = 0;\n    while (1) {\n     $3 = $4 << 3;\n     $6 = HEAP32[($3 + $1 | 0) + 7540 >> 2];\n     if ($6) {\n      dlfree($6);\n      HEAP32[($3 + HEAP32[$5 >> 2] | 0) + 7540 >> 2] = 0;\n      $1 = HEAP32[$5 >> 2];\n     }\n     $6 = HEAP32[($1 + $3 | 0) + 7544 >> 2];\n     if ($6) {\n      dlfree($6);\n      HEAP32[($3 + HEAP32[$5 >> 2] | 0) + 7544 >> 2] = 0;\n      $1 = HEAP32[$5 >> 2];\n     }\n     $4 = $4 + 1 | 0;\n     if ($4 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) {\n      continue\n     }\n     break;\n    };\n   }\n   $3 = HEAP32[$1 + 7604 >> 2];\n   if ($3) {\n    dlfree($3);\n    HEAP32[HEAP32[$5 >> 2] + 7604 >> 2] = 0;\n    $1 = HEAP32[$5 >> 2];\n   }\n   $3 = HEAP32[$1 + 7608 >> 2];\n   if ($3) {\n    dlfree($3);\n    HEAP32[HEAP32[$5 >> 2] + 7608 >> 2] = 0;\n    $1 = HEAP32[$5 >> 2];\n   }\n   $3 = HEAP32[$1 + 7612 >> 2];\n   if ($3) {\n    dlfree($3);\n    HEAP32[HEAP32[$5 >> 2] + 7612 >> 2] = 0;\n    $1 = HEAP32[$5 >> 2];\n   }\n   $3 = HEAP32[$1 + 7616 >> 2];\n   if ($3) {\n    dlfree($3);\n    HEAP32[HEAP32[$5 >> 2] + 7616 >> 2] = 0;\n    $1 = HEAP32[$5 >> 2];\n   }\n   $3 = HEAP32[$1 + 7620 >> 2];\n   if ($3) {\n    dlfree($3);\n    $1 = HEAP32[$5 >> 2];\n    HEAP32[$1 + 7620 >> 2] = 0;\n   }\n   $3 = HEAP32[$1 + 7624 >> 2];\n   if ($3) {\n    dlfree($3);\n    $1 = HEAP32[$5 >> 2];\n    HEAP32[$1 + 7624 >> 2] = 0;\n   }\n   $3 = HEAP32[$0 >> 2];\n   if (!(!HEAP32[$3 + 4 >> 2] | !HEAP32[$3 + 24 >> 2])) {\n    $5 = 0;\n    while (1) {\n     $4 = $5 << 2;\n     $6 = HEAP32[($4 + $1 | 0) + 11764 >> 2];\n     if ($6) {\n      dlfree($6);\n      HEAP32[($4 + HEAP32[$0 + 4 >> 2] | 0) + 11764 >> 2] = 0;\n      $1 = HEAP32[$0 + 4 >> 2];\n      $3 = HEAP32[$0 >> 2];\n     }\n     $5 = $5 + 1 | 0;\n     if ($5 >>> 0 < HEAPU32[$3 + 24 >> 2]) {\n      continue\n     }\n     break;\n    };\n   }\n   FLAC__bitwriter_free(HEAP32[$1 + 6856 >> 2]);\n   $3 = HEAP32[$0 >> 2];\n   HEAP32[$3 + 44 >> 2] = 13;\n   HEAP32[$3 + 48 >> 2] = 1056964608;\n   HEAP32[$3 + 36 >> 2] = 0;\n   HEAP32[$3 + 40 >> 2] = 1;\n   HEAP32[$3 + 28 >> 2] = 16;\n   HEAP32[$3 + 32 >> 2] = 44100;\n   HEAP32[$3 + 20 >> 2] = 0;\n   HEAP32[$3 + 24 >> 2] = 2;\n   HEAP32[$3 + 12 >> 2] = 1;\n   HEAP32[$3 + 16 >> 2] = 0;\n   HEAP32[$3 + 4 >> 2] = 0;\n   HEAP32[$3 + 8 >> 2] = 1;\n   $3 = HEAP32[$0 >> 2];\n   HEAP32[$3 + 592 >> 2] = 0;\n   HEAP32[$3 + 596 >> 2] = 0;\n   HEAP32[$3 + 556 >> 2] = 0;\n   HEAP32[$3 + 560 >> 2] = 0;\n   HEAP32[$3 + 564 >> 2] = 0;\n   HEAP32[$3 + 568 >> 2] = 0;\n   HEAP32[$3 + 572 >> 2] = 0;\n   HEAP32[$3 + 576 >> 2] = 0;\n   HEAP32[$3 + 580 >> 2] = 0;\n   HEAP32[$3 + 584 >> 2] = 0;\n   HEAP32[$3 + 600 >> 2] = 0;\n   HEAP32[$3 + 604 >> 2] = 0;\n   $1 = HEAP32[$0 + 4 >> 2];\n   HEAP32[$1 + 7248 >> 2] = 0;\n   HEAP32[$1 + 7252 >> 2] = 0;\n   HEAP32[$1 + 7048 >> 2] = 0;\n   $5 = $1 + 7256 | 0;\n   HEAP32[$5 >> 2] = 0;\n   HEAP32[$5 + 4 >> 2] = 0;\n   $5 = $1 + 7264 | 0;\n   HEAP32[$5 >> 2] = 0;\n   HEAP32[$5 + 4 >> 2] = 0;\n   $5 = $1 + 7272 | 0;\n   HEAP32[$5 >> 2] = 0;\n   HEAP32[$5 + 4 >> 2] = 0;\n   $5 = $1 + 7280 | 0;\n   HEAP32[$5 >> 2] = 0;\n   HEAP32[$5 + 4 >> 2] = 0;\n   HEAP32[$1 + 7288 >> 2] = 0;\n   FLAC__ogg_encoder_aspect_set_defaults($3 + 632 | 0);\n   $1 = HEAP32[$0 >> 2];\n   label$74 : {\n    if (HEAP32[$1 >> 2] != 1) {\n     break label$74\n    }\n    HEAP32[$1 + 16 >> 2] = 1;\n    HEAP32[$1 + 20 >> 2] = 0;\n    FLAC__stream_encoder_set_apodization($0, 10777);\n    $1 = HEAP32[$0 >> 2];\n    if (HEAP32[$1 >> 2] != 1) {\n     break label$74\n    }\n    HEAP32[$1 + 576 >> 2] = 0;\n    HEAP32[$1 + 580 >> 2] = 5;\n    HEAP32[$1 + 564 >> 2] = 0;\n    HEAP32[$1 + 568 >> 2] = 0;\n    HEAP32[$1 + 556 >> 2] = 8;\n    HEAP32[$1 + 560 >> 2] = 0;\n   }\n   if (!$2) {\n    HEAP32[$1 >> 2] = 1\n   }\n   $1 = !$2;\n  }\n  global$0 = $7 + 32 | 0;\n  return $1 | 0;\n }\n \n function process_frame_($0, $1, $2) {\n  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0;\n  $8 = global$0 - 48 | 0;\n  global$0 = $8;\n  label$1 : {\n   label$2 : {\n    $4 = HEAP32[$0 >> 2];\n    if (!HEAP32[$4 + 12 >> 2]) {\n     break label$2\n    }\n    $3 = HEAP32[$0 + 4 >> 2];\n    $3 = FLAC__MD5Accumulate($3 + 7060 | 0, $3 + 4 | 0, HEAP32[$4 + 24 >> 2], HEAP32[$4 + 36 >> 2], HEAP32[$4 + 28 >> 2] + 7 >>> 3 | 0);\n    $4 = HEAP32[$0 >> 2];\n    if ($3) {\n     break label$2\n    }\n    HEAP32[$4 >> 2] = 8;\n    $1 = 0;\n    break label$1;\n   }\n   $3 = HEAP32[$4 + 576 >> 2];\n   if ($1) {\n    $12 = 0\n   } else {\n    $1 = FLAC__format_get_max_rice_partition_order_from_blocksize(HEAP32[$4 + 36 >> 2]);\n    $4 = HEAP32[$0 >> 2];\n    $5 = HEAP32[$4 + 580 >> 2];\n    $12 = $1 >>> 0 < $5 >>> 0 ? $1 : $5;\n   }\n   $7 = HEAP32[$4 + 36 >> 2];\n   HEAP32[$8 + 8 >> 2] = $7;\n   HEAP32[$8 + 12 >> 2] = HEAP32[$4 + 32 >> 2];\n   $1 = HEAP32[$4 + 24 >> 2];\n   HEAP32[$8 + 20 >> 2] = 0;\n   HEAP32[$8 + 16 >> 2] = $1;\n   $1 = HEAP32[$4 + 28 >> 2];\n   HEAP32[$8 + 28 >> 2] = 0;\n   HEAP32[$8 + 24 >> 2] = $1;\n   $5 = HEAP32[$0 + 4 >> 2];\n   HEAP32[$8 + 32 >> 2] = HEAP32[$5 + 7056 >> 2];\n   $14 = $3 >>> 0 < $12 >>> 0 ? $3 : $12;\n   label$5 : {\n    label$6 : {\n     label$7 : {\n      label$8 : {\n       label$9 : {\n        label$10 : {\n         label$11 : {\n          if (!HEAP32[$4 + 16 >> 2]) {\n           $10 = 1;\n           break label$11;\n          }\n          if (!HEAP32[$4 + 20 >> 2] | !HEAP32[$5 + 6864 >> 2]) {\n           break label$11\n          }\n          $10 = 1;\n          $13 = 1;\n          if (HEAP32[$5 + 6868 >> 2]) {\n           break label$10\n          }\n         }\n         label$13 : {\n          if (!HEAP32[$4 + 24 >> 2]) {\n           $3 = 0;\n           break label$13;\n          }\n          while (1) {\n           $13 = ($6 << 2) + $5 | 0;\n           $3 = 0;\n           $11 = 0;\n           label$16 : {\n            if (!$7) {\n             break label$16\n            }\n            $15 = HEAP32[$13 + 4 >> 2];\n            $1 = 0;\n            while (1) {\n             label$18 : {\n              $3 = HEAP32[$15 + ($1 << 2) >> 2] | $3;\n              $9 = $3 & 1;\n              $1 = $1 + 1 | 0;\n              if ($1 >>> 0 >= $7 >>> 0) {\n               break label$18\n              }\n              if (!$9) {\n               continue\n              }\n             }\n             break;\n            };\n            $1 = 0;\n            $11 = 0;\n            if (!$3) {\n             break label$16\n            }\n            $11 = 0;\n            if ($9) {\n             break label$16\n            }\n            while (1) {\n             $1 = $1 + 1 | 0;\n             $9 = $3 & 2;\n             $3 = $3 >> 1;\n             if (!$9) {\n              continue\n             }\n             break;\n            };\n            $9 = 0;\n            $11 = 0;\n            if (!$1) {\n             break label$16\n            }\n            while (1) {\n             $3 = $15 + ($9 << 2) | 0;\n             HEAP32[$3 >> 2] = HEAP32[$3 >> 2] >> $1;\n             $9 = $9 + 1 | 0;\n             if (($9 | 0) != ($7 | 0)) {\n              continue\n             }\n             break;\n            };\n            $11 = $1;\n           }\n           $1 = $11;\n           $7 = Math_imul($6, 584) + $5 | 0;\n           $3 = HEAP32[$4 + 28 >> 2];\n           $1 = $1 >>> 0 > $3 >>> 0 ? $3 : $1;\n           HEAP32[$7 + 624 >> 2] = $1;\n           HEAP32[$7 + 916 >> 2] = $1;\n           HEAP32[$13 + 216 >> 2] = $3 - $1;\n           $6 = $6 + 1 | 0;\n           $3 = HEAP32[$4 + 24 >> 2];\n           if ($6 >>> 0 >= $3 >>> 0) {\n            break label$13\n           }\n           $7 = HEAP32[$4 + 36 >> 2];\n           continue;\n          };\n         }\n         $1 = 1;\n         if ($10) {\n          break label$9\n         }\n         $7 = HEAP32[$4 + 36 >> 2];\n         $13 = 0;\n        }\n        $9 = HEAP32[$5 + 36 >> 2];\n        $3 = 0;\n        $6 = 0;\n        label$21 : {\n         if (!$7) {\n          break label$21\n         }\n         $1 = 0;\n         while (1) {\n          label$23 : {\n           $1 = HEAP32[($6 << 2) + $9 >> 2] | $1;\n           $10 = $1 & 1;\n           $6 = $6 + 1 | 0;\n           if ($6 >>> 0 >= $7 >>> 0) {\n            break label$23\n           }\n           if (!$10) {\n            continue\n           }\n          }\n          break;\n         };\n         $6 = 0;\n         if ($10 | !$1) {\n          break label$21\n         }\n         while (1) {\n          $6 = $6 + 1 | 0;\n          $10 = $1 & 2;\n          $1 = $1 >> 1;\n          if (!$10) {\n           continue\n          }\n          break;\n         };\n         $1 = 0;\n         if (!$6) {\n          $6 = 0;\n          break label$21;\n         }\n         while (1) {\n          $10 = ($1 << 2) + $9 | 0;\n          HEAP32[$10 >> 2] = HEAP32[$10 >> 2] >> $6;\n          $1 = $1 + 1 | 0;\n          if (($7 | 0) != ($1 | 0)) {\n           continue\n          }\n          break;\n         };\n        }\n        $1 = HEAP32[$4 + 28 >> 2];\n        $6 = $6 >>> 0 > $1 >>> 0 ? $1 : $6;\n        HEAP32[$5 + 5296 >> 2] = $6;\n        HEAP32[$5 + 5588 >> 2] = $6;\n        HEAP32[$5 + 248 >> 2] = $1 - $6;\n        $6 = HEAP32[$4 + 36 >> 2];\n        label$27 : {\n         if (!$6) {\n          break label$27\n         }\n         $7 = HEAP32[$5 + 40 >> 2];\n         $1 = 0;\n         while (1) {\n          label$29 : {\n           $3 = HEAP32[$7 + ($1 << 2) >> 2] | $3;\n           $10 = $3 & 1;\n           $1 = $1 + 1 | 0;\n           if ($1 >>> 0 >= $6 >>> 0) {\n            break label$29\n           }\n           if (!$10) {\n            continue\n           }\n          }\n          break;\n         };\n         $1 = 0;\n         if (!$3) {\n          $3 = 0;\n          break label$27;\n         }\n         if ($10) {\n          $3 = 0;\n          break label$27;\n         }\n         while (1) {\n          $1 = $1 + 1 | 0;\n          $10 = $3 & 2;\n          $3 = $3 >> 1;\n          if (!$10) {\n           continue\n          }\n          break;\n         };\n         $3 = 0;\n         if (!$1) {\n          break label$27\n         }\n         while (1) {\n          $10 = $7 + ($3 << 2) | 0;\n          HEAP32[$10 >> 2] = HEAP32[$10 >> 2] >> $1;\n          $3 = $3 + 1 | 0;\n          if (($6 | 0) != ($3 | 0)) {\n           continue\n          }\n          break;\n         };\n         $3 = $1;\n        }\n        $1 = HEAP32[$4 + 28 >> 2];\n        $3 = $3 >>> 0 > $1 >>> 0 ? $1 : $3;\n        HEAP32[$5 + 5880 >> 2] = $3;\n        HEAP32[$5 + 6172 >> 2] = $3;\n        HEAP32[$5 + 252 >> 2] = ($1 - $3 | 0) + 1;\n        if ($13) {\n         break label$8\n        }\n        $3 = HEAP32[$4 + 24 >> 2];\n        $1 = 0;\n       }\n       $4 = $1;\n       if ($3) {\n        $3 = 0;\n        while (1) {\n         $1 = ($3 << 2) + $5 | 0;\n         $5 = ($3 << 3) + $5 | 0;\n         process_subframe_($0, $14, $12, $8 + 8 | 0, HEAP32[$1 + 216 >> 2], HEAP32[$1 + 4 >> 2], $5 + 6176 | 0, $5 + 6640 | 0, $5 + 256 | 0, $1 + 6768 | 0, $1 + 6808 | 0);\n         $5 = HEAP32[$0 + 4 >> 2];\n         $3 = $3 + 1 | 0;\n         if ($3 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) {\n          continue\n         }\n         break;\n        };\n       }\n       if ($4) {\n        break label$7\n       }\n       $9 = HEAP32[$5 + 36 >> 2];\n      }\n      process_subframe_($0, $14, $12, $8 + 8 | 0, HEAP32[$5 + 248 >> 2], $9, $5 + 6240 | 0, $5 + 6704 | 0, $5 + 320 | 0, $5 + 6800 | 0, $5 + 6840 | 0);\n      $1 = HEAP32[$0 + 4 >> 2];\n      process_subframe_($0, $14, $12, $8 + 8 | 0, HEAP32[$1 + 252 >> 2], HEAP32[$1 + 40 >> 2], $1 + 6248 | 0, $1 + 6712 | 0, $1 + 328 | 0, $1 + 6804 | 0, $1 + 6844 | 0);\n      $11 = $8;\n      $1 = HEAP32[$0 + 4 >> 2];\n      label$36 : {\n       if (!(!HEAP32[HEAP32[$0 >> 2] + 20 >> 2] | !HEAP32[$1 + 6864 >> 2])) {\n        $3 = HEAP32[$1 + 6868 >> 2] ? 3 : 0;\n        break label$36;\n       }\n       $3 = HEAP32[$1 + 6844 >> 2];\n       $5 = HEAP32[$1 + 6808 >> 2];\n       $4 = $3 + $5 | 0;\n       $6 = HEAP32[$1 + 6812 >> 2];\n       $5 = $5 + $6 | 0;\n       $7 = $4 >>> 0 < $5 >>> 0;\n       $6 = $3 + $6 | 0;\n       $5 = $7 ? $4 : $5;\n       $4 = $6 >>> 0 < $5 >>> 0;\n       $3 = $3 + HEAP32[$1 + 6840 >> 2] >>> 0 < ($4 ? $6 : $5) >>> 0 ? 3 : $4 ? 2 : $7;\n      }\n      HEAP32[$11 + 20 >> 2] = $3;\n      if (!FLAC__frame_add_header($8 + 8 | 0, HEAP32[$1 + 6856 >> 2])) {\n       HEAP32[HEAP32[$0 >> 2] >> 2] = 7;\n       $1 = 0;\n       break label$1;\n      }\n      $5 = $0;\n      $6 = HEAP32[$8 + 8 >> 2];\n      label$39 : {\n       label$40 : {\n        switch ($3 | 0) {\n        default:\n         $3 = HEAP32[$0 + 4 >> 2];\n         $7 = 0;\n         $1 = 0;\n         $4 = 0;\n         $9 = 0;\n         break label$39;\n        case 0:\n         $3 = HEAP32[$0 + 4 >> 2];\n         $4 = $3 + 336 | 0;\n         $1 = $4 + Math_imul(HEAP32[$3 + 6768 >> 2], 292) | 0;\n         $7 = ($4 + Math_imul(HEAP32[$3 + 6772 >> 2], 292) | 0) + 584 | 0;\n         $4 = HEAP32[$3 + 216 >> 2];\n         $9 = HEAP32[$3 + 220 >> 2];\n         break label$39;\n        case 1:\n         $3 = HEAP32[$0 + 4 >> 2];\n         $1 = ($3 + Math_imul(HEAP32[$3 + 6768 >> 2], 292) | 0) + 336 | 0;\n         $7 = (Math_imul(HEAP32[$3 + 6804 >> 2], 292) + $3 | 0) + 5592 | 0;\n         $4 = HEAP32[$3 + 216 >> 2];\n         $9 = HEAP32[$3 + 252 >> 2];\n         break label$39;\n        case 2:\n         $3 = HEAP32[$0 + 4 >> 2];\n         $7 = ($3 + Math_imul(HEAP32[$3 + 6772 >> 2], 292) | 0) + 920 | 0;\n         $1 = (Math_imul(HEAP32[$3 + 6804 >> 2], 292) + $3 | 0) + 5592 | 0;\n         $4 = HEAP32[$3 + 252 >> 2];\n         $9 = HEAP32[$3 + 220 >> 2];\n         break label$39;\n        case 3:\n         break label$40;\n        };\n       }\n       $3 = HEAP32[$0 + 4 >> 2];\n       $4 = $3 + 5008 | 0;\n       $1 = $4 + Math_imul(HEAP32[$3 + 6800 >> 2], 292) | 0;\n       $7 = ($4 + Math_imul(HEAP32[$3 + 6804 >> 2], 292) | 0) + 584 | 0;\n       $4 = HEAP32[$3 + 248 >> 2];\n       $9 = HEAP32[$3 + 252 >> 2];\n      }\n      if (!add_subframe_($5, $6, $4, $1, HEAP32[$3 + 6856 >> 2])) {\n       break label$6\n      }\n      if (!add_subframe_($0, HEAP32[$8 + 8 >> 2], $9, $7, HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2])) {\n       break label$6\n      }\n      $1 = HEAP32[$0 >> 2];\n      break label$5;\n     }\n     $3 = FLAC__frame_add_header($8 + 8 | 0, HEAP32[$5 + 6856 >> 2]);\n     $1 = HEAP32[$0 >> 2];\n     if ($3) {\n      if (!HEAP32[$1 + 24 >> 2]) {\n       break label$5\n      }\n      $3 = 0;\n      while (1) {\n       $1 = HEAP32[$0 + 4 >> 2];\n       $5 = $1 + ($3 << 2) | 0;\n       if (!add_subframe_($0, HEAP32[$8 + 8 >> 2], HEAP32[$5 + 216 >> 2], (($1 + Math_imul($3, 584) | 0) + Math_imul(HEAP32[$5 + 6768 >> 2], 292) | 0) + 336 | 0, HEAP32[$1 + 6856 >> 2])) {\n        break label$6\n       }\n       $3 = $3 + 1 | 0;\n       $1 = HEAP32[$0 >> 2];\n       if ($3 >>> 0 < HEAPU32[$1 + 24 >> 2]) {\n        continue\n       }\n       break;\n      };\n      break label$5;\n     }\n     HEAP32[$1 >> 2] = 7;\n    }\n    $1 = 0;\n    break label$1;\n   }\n   if (HEAP32[$1 + 20 >> 2]) {\n    $1 = HEAP32[$0 + 4 >> 2];\n    $3 = HEAP32[$1 + 6864 >> 2] + 1 | 0;\n    HEAP32[$1 + 6864 >> 2] = $3 >>> 0 < HEAPU32[$1 + 6860 >> 2] ? $3 : 0;\n   }\n   $1 = HEAP32[$0 + 4 >> 2];\n   HEAP32[$1 + 6868 >> 2] = HEAP32[$8 + 20 >> 2];\n   $1 = HEAP32[$1 + 6856 >> 2];\n   $3 = HEAP32[$1 + 16 >> 2] & 7;\n   $11 = 1;\n   __inlined_func$FLAC__bitwriter_zero_pad_to_byte_boundary : {\n    if (!$3) {\n     break __inlined_func$FLAC__bitwriter_zero_pad_to_byte_boundary\n    }\n    $11 = FLAC__bitwriter_write_zeroes($1, 8 - $3 | 0);\n   }\n   if (!$11) {\n    HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n    $1 = 0;\n    break label$1;\n   }\n   label$49 : {\n    if (FLAC__bitwriter_get_write_crc16(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2], $8 + 8 | 0)) {\n     if (FLAC__bitwriter_write_raw_uint32(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2], HEAPU16[$8 + 8 >> 1], HEAP32[1404])) {\n      break label$49\n     }\n    }\n    HEAP32[HEAP32[$0 >> 2] >> 2] = 8;\n    $1 = 0;\n    break label$1;\n   }\n   $1 = 0;\n   if (!write_bitbuffer_($0, HEAP32[HEAP32[$0 >> 2] + 36 >> 2], $2)) {\n    break label$1\n   }\n   $1 = HEAP32[$0 + 4 >> 2];\n   HEAP32[$1 + 7052 >> 2] = 0;\n   HEAP32[$1 + 7056 >> 2] = HEAP32[$1 + 7056 >> 2] + 1;\n   $2 = $1 + 6920 | 0;\n   $3 = $2;\n   $11 = $3;\n   $1 = HEAP32[$3 + 4 >> 2];\n   $0 = HEAP32[HEAP32[$0 >> 2] + 36 >> 2];\n   $2 = $0 + HEAP32[$3 >> 2] | 0;\n   if ($2 >>> 0 < $0 >>> 0) {\n    $1 = $1 + 1 | 0\n   }\n   HEAP32[$11 >> 2] = $2;\n   HEAP32[$3 + 4 >> 2] = $1;\n   $1 = 1;\n  }\n  $0 = $1;\n  global$0 = $8 + 48 | 0;\n  return $0;\n }\n \n function FLAC__stream_encoder_init_stream($0, $1, $2, $3, $4, $5) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  $4 = $4 | 0;\n  $5 = $5 | 0;\n  return init_stream_internal__1($0, 0, $1, $2, $3, $4, $5, 0) | 0;\n }\n \n function init_stream_internal__1($0, $1, $2, $3, $4, $5, $6, $7) {\n  var $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0;\n  $15 = global$0 - 176 | 0;\n  global$0 = $15;\n  $9 = 13;\n  $8 = HEAP32[$0 >> 2];\n  label$1 : {\n   if (HEAP32[$8 >> 2] != 1) {\n    break label$1\n   }\n   $9 = 3;\n   if (!$2 | ($4 ? 0 : $3)) {\n    break label$1\n   }\n   $9 = 4;\n   $11 = HEAP32[$8 + 24 >> 2];\n   if ($11 + -1 >>> 0 > 7) {\n    break label$1\n   }\n   label$2 : {\n    label$3 : {\n     if (($11 | 0) != 2) {\n      HEAP32[$8 + 16 >> 2] = 0;\n      break label$3;\n     }\n     if (HEAP32[$8 + 16 >> 2]) {\n      break label$2\n     }\n    }\n    HEAP32[$8 + 20 >> 2] = 0;\n   }\n   $11 = HEAP32[$8 + 28 >> 2];\n   if ($11 >>> 0 >= 32) {\n    HEAP32[$8 + 16 >> 2] = 0;\n    $9 = 5;\n    break label$1;\n   }\n   $9 = 5;\n   if ($11 + -4 >>> 0 > 20) {\n    break label$1\n   }\n   if (HEAP32[$8 + 32 >> 2] + -1 >>> 0 >= 655350) {\n    $9 = 6;\n    break label$1;\n   }\n   $8 = HEAP32[$0 >> 2];\n   $10 = HEAP32[$8 + 36 >> 2];\n   label$7 : {\n    if (!$10) {\n     $10 = HEAP32[$8 + 556 >> 2] ? 4096 : 1152;\n     HEAP32[$8 + 36 >> 2] = $10;\n     break label$7;\n    }\n    $9 = 7;\n    if ($10 + -16 >>> 0 > 65519) {\n     break label$1\n    }\n   }\n   $9 = 8;\n   $11 = HEAP32[$8 + 556 >> 2];\n   if ($11 >>> 0 > 32) {\n    break label$1\n   }\n   $9 = 10;\n   if ($10 >>> 0 < $11 >>> 0) {\n    break label$1\n   }\n   $11 = HEAP32[$8 + 560 >> 2];\n   label$9 : {\n    if (!$11) {\n     $13 = $8;\n     $11 = HEAP32[$8 + 28 >> 2];\n     label$11 : {\n      if ($11 >>> 0 <= 15) {\n       $11 = $11 >>> 0 > 5 ? ($11 >>> 1 | 0) + 2 | 0 : 5;\n       break label$11;\n      }\n      if (($11 | 0) == 16) {\n       $11 = 7;\n       if ($10 >>> 0 < 193) {\n        break label$11\n       }\n       $11 = 8;\n       if ($10 >>> 0 < 385) {\n        break label$11\n       }\n       $11 = 9;\n       if ($10 >>> 0 < 577) {\n        break label$11\n       }\n       $11 = 10;\n       if ($10 >>> 0 < 1153) {\n        break label$11\n       }\n       $11 = 11;\n       if ($10 >>> 0 < 2305) {\n        break label$11\n       }\n       $11 = $10 >>> 0 < 4609 ? 12 : 13;\n       break label$11;\n      }\n      $11 = 13;\n      if ($10 >>> 0 < 385) {\n       break label$11\n      }\n      $11 = $10 >>> 0 < 1153 ? 14 : 15;\n     }\n     HEAP32[$13 + 560 >> 2] = $11;\n     break label$9;\n    }\n    $9 = 9;\n    if ($11 + -5 >>> 0 > 10) {\n     break label$1\n    }\n   }\n   label$14 : {\n    if (!HEAP32[$8 + 8 >> 2]) {\n     $10 = HEAP32[$8 + 580 >> 2];\n     break label$14;\n    }\n    $9 = 11;\n    if (!(($10 >>> 0 < 4609 | HEAPU32[$8 + 32 >> 2] > 48e3) & $10 >>> 0 < 16385)) {\n     break label$1\n    }\n    if (!FLAC__format_sample_rate_is_subset(HEAP32[HEAP32[$0 >> 2] + 32 >> 2])) {\n     break label$1\n    }\n    $8 = HEAP32[$0 >> 2];\n    if (__wasm_rotl_i32(HEAP32[$8 + 28 >> 2] + -8 | 0, 30) >>> 0 > 4) {\n     break label$1\n    }\n    $10 = HEAP32[$8 + 580 >> 2];\n    if ($10 >>> 0 > 8) {\n     break label$1\n    }\n    if (HEAPU32[$8 + 32 >> 2] > 48e3) {\n     break label$14\n    }\n    if (HEAPU32[$8 + 36 >> 2] > 4608 | HEAPU32[$8 + 556 >> 2] > 12) {\n     break label$1\n    }\n   }\n   $11 = 1 << HEAP32[1406];\n   if ($10 >>> 0 >= $11 >>> 0) {\n    $10 = $11 + -1 | 0;\n    HEAP32[$8 + 580 >> 2] = $10;\n   }\n   if (HEAPU32[$8 + 576 >> 2] >= $10 >>> 0) {\n    HEAP32[$8 + 576 >> 2] = $10\n   }\n   label$18 : {\n    if (!$7) {\n     break label$18\n    }\n    $10 = HEAP32[$8 + 600 >> 2];\n    if (!$10) {\n     break label$18\n    }\n    $13 = HEAP32[$8 + 604 >> 2];\n    if ($13 >>> 0 < 2) {\n     break label$18\n    }\n    $9 = 1;\n    while (1) {\n     $11 = HEAP32[($9 << 2) + $10 >> 2];\n     if (!(!$11 | HEAP32[$11 >> 2] != 4)) {\n      while (1) {\n       $8 = ($9 << 2) + $10 | 0;\n       $9 = $9 + -1 | 0;\n       HEAP32[$8 >> 2] = HEAP32[($9 << 2) + $10 >> 2];\n       $10 = HEAP32[HEAP32[$0 >> 2] + 600 >> 2];\n       if ($9) {\n        continue\n       }\n       break;\n      };\n      HEAP32[$10 >> 2] = $11;\n      $8 = HEAP32[$0 >> 2];\n      break label$18;\n     }\n     $9 = $9 + 1 | 0;\n     if (($13 | 0) != ($9 | 0)) {\n      continue\n     }\n     break;\n    };\n   }\n   $13 = HEAP32[$8 + 604 >> 2];\n   label$22 : {\n    label$23 : {\n     $10 = HEAP32[$8 + 600 >> 2];\n     if ($10) {\n      $11 = 0;\n      if (!$13) {\n       break label$22\n      }\n      while (1) {\n       $8 = HEAP32[($11 << 2) + $10 >> 2];\n       if (!(!$8 | HEAP32[$8 >> 2] != 3)) {\n        HEAP32[HEAP32[$0 + 4 >> 2] + 7048 >> 2] = $8 + 16;\n        break label$23;\n       }\n       $11 = $11 + 1 | 0;\n       if (($13 | 0) != ($11 | 0)) {\n        continue\n       }\n       break;\n      };\n      break label$23;\n     }\n     $9 = 12;\n     if ($13) {\n      break label$1\n     }\n     $11 = 0;\n     break label$22;\n    }\n    $8 = 0;\n    $13 = 0;\n    $11 = 0;\n    while (1) {\n     $9 = 12;\n     label$28 : {\n      label$29 : {\n       label$30 : {\n        label$31 : {\n         label$32 : {\n          $10 = HEAP32[($14 << 2) + $10 >> 2];\n          switch (HEAP32[$10 >> 2]) {\n          case 0:\n           break label$1;\n          case 6:\n           break label$29;\n          case 5:\n           break label$30;\n          case 4:\n           break label$31;\n          case 3:\n           break label$32;\n          default:\n           break label$28;\n          };\n         }\n         if ($18) {\n          break label$1\n         }\n         $18 = 1;\n         $11 = $13;\n         $12 = $8;\n         if (FLAC__format_seektable_is_legal($10 + 16 | 0)) {\n          break label$28\n         }\n         break label$1;\n        }\n        $11 = 1;\n        $12 = $8;\n        if (!$13) {\n         break label$28\n        }\n        break label$1;\n       }\n       $11 = $13;\n       $12 = $8;\n       if (FLAC__format_cuesheet_is_legal($10 + 16 | 0, HEAP32[$10 + 160 >> 2])) {\n        break label$28\n       }\n       break label$1;\n      }\n      $17 = $10 + 16 | 0;\n      if (!FLAC__format_picture_is_legal($17)) {\n       break label$1\n      }\n      $11 = $13;\n      $12 = $8;\n      label$33 : {\n       switch (HEAP32[$17 >> 2] + -1 | 0) {\n       case 0:\n        if ($19) {\n         break label$1\n        }\n        $12 = HEAP32[$10 + 20 >> 2];\n        if (strcmp($12, 10763)) {\n         if (strcmp($12, 10773)) {\n          break label$1\n         }\n        }\n        if (HEAP32[$10 + 28 >> 2] != 32) {\n         break label$1\n        }\n        $19 = 1;\n        $11 = $13;\n        $12 = $8;\n        if (HEAP32[$10 + 32 >> 2] == 32) {\n         break label$28\n        }\n        break label$1;\n       case 1:\n        break label$33;\n       default:\n        break label$28;\n       };\n      }\n      $12 = 1;\n      if ($8) {\n       break label$1\n      }\n     }\n     $14 = $14 + 1 | 0;\n     $8 = HEAP32[$0 >> 2];\n     if ($14 >>> 0 >= HEAPU32[$8 + 604 >> 2]) {\n      break label$22\n     }\n     $10 = HEAP32[$8 + 600 >> 2];\n     $8 = $12;\n     $13 = $11;\n     continue;\n    };\n   }\n   $10 = 0;\n   $14 = HEAP32[$0 + 4 >> 2];\n   HEAP32[$14 >> 2] = 0;\n   if (HEAP32[$8 + 24 >> 2]) {\n    while (1) {\n     $8 = $10 << 2;\n     HEAP32[($8 + $14 | 0) + 4 >> 2] = 0;\n     HEAP32[($8 + HEAP32[$0 + 4 >> 2] | 0) + 7328 >> 2] = 0;\n     HEAP32[($8 + HEAP32[$0 + 4 >> 2] | 0) + 44 >> 2] = 0;\n     HEAP32[($8 + HEAP32[$0 + 4 >> 2] | 0) + 7368 >> 2] = 0;\n     $14 = HEAP32[$0 + 4 >> 2];\n     $10 = $10 + 1 | 0;\n     if ($10 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) {\n      continue\n     }\n     break;\n    }\n   }\n   $8 = 0;\n   HEAP32[$14 + 36 >> 2] = 0;\n   HEAP32[HEAP32[$0 + 4 >> 2] + 7360 >> 2] = 0;\n   HEAP32[HEAP32[$0 + 4 >> 2] + 76 >> 2] = 0;\n   HEAP32[HEAP32[$0 + 4 >> 2] + 7400 >> 2] = 0;\n   HEAP32[HEAP32[$0 + 4 >> 2] + 40 >> 2] = 0;\n   HEAP32[HEAP32[$0 + 4 >> 2] + 7364 >> 2] = 0;\n   HEAP32[HEAP32[$0 + 4 >> 2] + 80 >> 2] = 0;\n   HEAP32[HEAP32[$0 + 4 >> 2] + 7404 >> 2] = 0;\n   $9 = HEAP32[$0 + 4 >> 2];\n   $10 = HEAP32[$0 >> 2];\n   if (HEAP32[$10 + 40 >> 2]) {\n    while (1) {\n     $12 = $8 << 2;\n     HEAP32[($12 + $9 | 0) + 84 >> 2] = 0;\n     HEAP32[($12 + HEAP32[$0 + 4 >> 2] | 0) + 7408 >> 2] = 0;\n     $9 = HEAP32[$0 + 4 >> 2];\n     $8 = $8 + 1 | 0;\n     $10 = HEAP32[$0 >> 2];\n     if ($8 >>> 0 < HEAPU32[$10 + 40 >> 2]) {\n      continue\n     }\n     break;\n    }\n   }\n   $8 = 0;\n   HEAP32[$9 + 7536 >> 2] = 0;\n   HEAP32[$9 + 212 >> 2] = 0;\n   if (HEAP32[$10 + 24 >> 2]) {\n    while (1) {\n     $12 = $8 << 3;\n     HEAP32[($12 + $9 | 0) + 256 >> 2] = 0;\n     HEAP32[($12 + HEAP32[$0 + 4 >> 2] | 0) + 7540 >> 2] = 0;\n     HEAP32[($12 + HEAP32[$0 + 4 >> 2] | 0) + 260 >> 2] = 0;\n     HEAP32[($12 + HEAP32[$0 + 4 >> 2] | 0) + 7544 >> 2] = 0;\n     $9 = HEAP32[$0 + 4 >> 2];\n     HEAP32[($9 + ($8 << 2) | 0) + 6768 >> 2] = 0;\n     $8 = $8 + 1 | 0;\n     if ($8 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) {\n      continue\n     }\n     break;\n    }\n   }\n   HEAP32[$9 + 320 >> 2] = 0;\n   HEAP32[HEAP32[$0 + 4 >> 2] + 7604 >> 2] = 0;\n   HEAP32[HEAP32[$0 + 4 >> 2] + 324 >> 2] = 0;\n   HEAP32[HEAP32[$0 + 4 >> 2] + 7608 >> 2] = 0;\n   $8 = HEAP32[$0 + 4 >> 2];\n   HEAP32[$8 + 6800 >> 2] = 0;\n   HEAP32[$8 + 328 >> 2] = 0;\n   HEAP32[HEAP32[$0 + 4 >> 2] + 7612 >> 2] = 0;\n   HEAP32[HEAP32[$0 + 4 >> 2] + 332 >> 2] = 0;\n   HEAP32[HEAP32[$0 + 4 >> 2] + 7616 >> 2] = 0;\n   $8 = HEAP32[$0 + 4 >> 2];\n   HEAP32[$8 + 7620 >> 2] = 0;\n   HEAP32[$8 + 7624 >> 2] = 0;\n   HEAP32[$8 + 6848 >> 2] = 0;\n   HEAP32[$8 + 6852 >> 2] = 0;\n   HEAP32[$8 + 6804 >> 2] = 0;\n   $12 = HEAP32[$0 >> 2];\n   $13 = HEAP32[$12 + 36 >> 2];\n   $12 = HEAP32[$12 + 32 >> 2];\n   HEAP32[$8 + 7052 >> 2] = 0;\n   HEAP32[$8 + 7056 >> 2] = 0;\n   HEAP32[$8 + 6864 >> 2] = 0;\n   $9 = $8;\n   $16 = +($12 >>> 0) * .4 / +($13 >>> 0) + .5;\n   label$42 : {\n    if ($16 < 4294967296.0 & $16 >= 0.0) {\n     $12 = ~~$16 >>> 0;\n     break label$42;\n    }\n    $12 = 0;\n   }\n   HEAP32[$9 + 6860 >> 2] = $12 ? $12 : 1;\n   FLAC__cpu_info($8 + 7156 | 0);\n   $9 = HEAP32[$0 + 4 >> 2];\n   HEAP32[$9 + 7244 >> 2] = 12;\n   HEAP32[$9 + 7240 >> 2] = 13;\n   HEAP32[$9 + 7236 >> 2] = 12;\n   HEAP32[$9 + 7228 >> 2] = 14;\n   HEAP32[$9 + 7224 >> 2] = 15;\n   HEAP32[$9 + 7220 >> 2] = 16;\n   HEAP32[$9 + 7232 >> 2] = 17;\n   $10 = HEAP32[$0 >> 2];\n   HEAP32[$10 >> 2] = 0;\n   HEAP32[$9 + 7260 >> 2] = $7;\n   label$44 : {\n    label$45 : {\n     label$46 : {\n      if ($7) {\n       if (!FLAC__ogg_encoder_aspect_init($10 + 632 | 0)) {\n        break label$46\n       }\n       $10 = HEAP32[$0 >> 2];\n       $9 = HEAP32[$0 + 4 >> 2];\n      }\n      $8 = $0 + 4 | 0;\n      HEAP32[$9 + 7276 >> 2] = $2;\n      HEAP32[$9 + 7264 >> 2] = $1;\n      HEAP32[$9 + 7288 >> 2] = $6;\n      HEAP32[$9 + 7280 >> 2] = $5;\n      HEAP32[$9 + 7272 >> 2] = $4;\n      HEAP32[$9 + 7268 >> 2] = $3;\n      $1 = HEAP32[$10 + 36 >> 2];\n      if (HEAPU32[$9 >> 2] < $1 >>> 0) {\n       $3 = $1 + 5 | 0;\n       label$49 : {\n        label$50 : {\n         label$51 : {\n          if (HEAP32[$10 + 24 >> 2]) {\n           $2 = 0;\n           while (1) {\n            $5 = $2 << 2;\n            $4 = $5 + HEAP32[$8 >> 2] | 0;\n            $6 = FLAC__memory_alloc_aligned_int32_array($3, $4 + 7328 | 0, $4 + 4 | 0);\n            $4 = HEAP32[($5 + HEAP32[$8 >> 2] | 0) + 4 >> 2];\n            HEAP32[$4 >> 2] = 0;\n            HEAP32[$4 + 4 >> 2] = 0;\n            HEAP32[$4 + 8 >> 2] = 0;\n            HEAP32[$4 + 12 >> 2] = 0;\n            $4 = ($5 + HEAP32[$8 >> 2] | 0) + 4 | 0;\n            HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + 16;\n            if (!$6) {\n             break label$51\n            }\n            $2 = $2 + 1 | 0;\n            if ($2 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) {\n             continue\n            }\n            break;\n           };\n          }\n          $2 = HEAP32[$8 >> 2];\n          $4 = FLAC__memory_alloc_aligned_int32_array($3, $2 + 7360 | 0, $2 + 36 | 0);\n          $2 = HEAP32[HEAP32[$8 >> 2] + 36 >> 2];\n          HEAP32[$2 >> 2] = 0;\n          HEAP32[$2 + 4 >> 2] = 0;\n          HEAP32[$2 + 8 >> 2] = 0;\n          HEAP32[$2 + 12 >> 2] = 0;\n          $2 = HEAP32[$8 >> 2];\n          HEAP32[$2 + 36 >> 2] = HEAP32[$2 + 36 >> 2] + 16;\n          if ($4) {\n           $2 = HEAP32[$8 >> 2];\n           $3 = FLAC__memory_alloc_aligned_int32_array($3, $2 + 7364 | 0, $2 + 40 | 0);\n           $2 = HEAP32[HEAP32[$8 >> 2] + 40 >> 2];\n           HEAP32[$2 >> 2] = 0;\n           HEAP32[$2 + 4 >> 2] = 0;\n           HEAP32[$2 + 8 >> 2] = 0;\n           HEAP32[$2 + 12 >> 2] = 0;\n           $2 = HEAP32[$8 >> 2] + 40 | 0;\n           HEAP32[$2 >> 2] = HEAP32[$2 >> 2] + 16;\n           $2 = ($3 | 0) != 0;\n          } else {\n           $2 = ($4 | 0) != 0\n          }\n          if (!$2) {\n           break label$51\n          }\n          $3 = HEAP32[$0 >> 2];\n          if (HEAP32[$3 + 556 >> 2]) {\n           $2 = HEAP32[$8 >> 2];\n           if (HEAP32[$3 + 40 >> 2]) {\n            $9 = 0;\n            while (1) {\n             $2 = ($9 << 2) + $2 | 0;\n             if (!FLAC__memory_alloc_aligned_int32_array($1, $2 + 7408 | 0, $2 + 84 | 0)) {\n              break label$51\n             }\n             $2 = HEAP32[$0 + 4 >> 2];\n             $9 = $9 + 1 | 0;\n             if ($9 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 40 >> 2]) {\n              continue\n             }\n             break;\n            };\n           }\n           if (!FLAC__memory_alloc_aligned_int32_array($1, $2 + 7536 | 0, $2 + 212 | 0)) {\n            break label$51\n           }\n          }\n          $6 = 0;\n          $10 = 1;\n          $5 = 0;\n          while (1) {\n           if ($5 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 24 >> 2]) {\n            $9 = 0;\n            $2 = 1;\n            $3 = 0;\n            while (1) {\n             if ($9 & 1) {\n              break label$51\n             }\n             $3 = (HEAP32[$8 >> 2] + ($5 << 3) | 0) + ($3 << 2) | 0;\n             $4 = FLAC__memory_alloc_aligned_int32_array($1, $3 + 7540 | 0, $3 + 256 | 0);\n             $7 = $2 & ($4 | 0) != 0;\n             $9 = !$4;\n             $3 = 1;\n             $2 = 0;\n             if ($7) {\n              continue\n             }\n             break;\n            };\n            $5 = $5 + 1 | 0;\n            if ($4) {\n             continue\n            }\n            break label$51;\n           }\n           break;\n          };\n          $7 = 1;\n          while (1) {\n           $9 = 0;\n           $2 = 1;\n           $3 = 0;\n           if (!$7) {\n            break label$51\n           }\n           while (1) {\n            if ($9 & 1) {\n             break label$51\n            }\n            $3 = (HEAP32[$8 >> 2] + ($6 << 3) | 0) + ($3 << 2) | 0;\n            $4 = FLAC__memory_alloc_aligned_int32_array($1, $3 + 7604 | 0, $3 + 320 | 0);\n            $5 = $2 & ($4 | 0) != 0;\n            $9 = !$4;\n            $3 = 1;\n            $2 = 0;\n            if ($5) {\n             continue\n            }\n            break;\n           };\n           $7 = ($4 | 0) != 0;\n           $2 = $10 & $7;\n           $6 = 1;\n           $10 = 0;\n           if ($2) {\n            continue\n           }\n           break;\n          };\n          if (!$4) {\n           break label$51\n          }\n          $3 = $1 << 1;\n          $2 = HEAP32[$0 + 4 >> 2];\n          $2 = FLAC__memory_alloc_aligned_uint64_array($3, $2 + 7620 | 0, $2 + 6848 | 0);\n          $9 = HEAP32[$0 >> 2];\n          $4 = HEAP32[$9 + 572 >> 2];\n          if (!$4 | !$2) {\n           break label$50\n          }\n          $2 = HEAP32[$8 >> 2];\n          if (FLAC__memory_alloc_aligned_int32_array($3, $2 + 7624 | 0, $2 + 6852 | 0)) {\n           break label$49\n          }\n         }\n         $9 = HEAP32[$0 >> 2];\n         break label$44;\n        }\n        if ($4 | !$2) {\n         break label$44\n        }\n       }\n       $9 = HEAP32[$8 >> 2];\n       label$64 : {\n        if (($1 | 0) == HEAP32[$9 >> 2]) {\n         break label$64\n        }\n        $2 = HEAP32[$0 >> 2];\n        if (!HEAP32[$2 + 556 >> 2] | !HEAP32[$2 + 40 >> 2]) {\n         break label$64\n        }\n        $9 = 0;\n        while (1) {\n         label$66 : {\n          label$67 : {\n           label$68 : {\n            label$69 : {\n             label$70 : {\n              label$71 : {\n               label$72 : {\n                label$73 : {\n                 label$74 : {\n                  label$75 : {\n                   label$76 : {\n                    label$77 : {\n                     label$78 : {\n                      label$79 : {\n                       label$80 : {\n                        label$81 : {\n                         label$82 : {\n                          label$83 : {\n                           label$84 : {\n                            $2 = ($9 << 4) + $2 | 0;\n                            switch (HEAP32[$2 + 44 >> 2]) {\n                            case 16:\n                             break label$68;\n                            case 15:\n                             break label$69;\n                            case 14:\n                             break label$70;\n                            case 13:\n                             break label$71;\n                            case 12:\n                             break label$72;\n                            case 11:\n                             break label$73;\n                            case 10:\n                             break label$74;\n                            case 9:\n                             break label$75;\n                            case 8:\n                             break label$76;\n                            case 7:\n                             break label$77;\n                            case 6:\n                             break label$78;\n                            case 5:\n                             break label$79;\n                            case 4:\n                             break label$80;\n                            case 3:\n                             break label$81;\n                            case 2:\n                             break label$82;\n                            case 1:\n                             break label$83;\n                            case 0:\n                             break label$84;\n                            default:\n                             break label$67;\n                            };\n                           }\n                           FLAC__window_bartlett(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);\n                           break label$66;\n                          }\n                          FLAC__window_bartlett_hann(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);\n                          break label$66;\n                         }\n                         FLAC__window_blackman(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);\n                         break label$66;\n                        }\n                        FLAC__window_blackman_harris_4term_92db_sidelobe(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);\n                        break label$66;\n                       }\n                       FLAC__window_connes(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);\n                       break label$66;\n                      }\n                      FLAC__window_flattop(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);\n                      break label$66;\n                     }\n                     FLAC__window_gauss(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1, HEAPF32[$2 + 48 >> 2]);\n                     break label$66;\n                    }\n                    FLAC__window_hamming(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);\n                    break label$66;\n                   }\n                   FLAC__window_hann(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);\n                   break label$66;\n                  }\n                  FLAC__window_kaiser_bessel(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);\n                  break label$66;\n                 }\n                 FLAC__window_nuttall(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);\n                 break label$66;\n                }\n                FLAC__window_rectangle(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);\n                break label$66;\n               }\n               FLAC__window_triangle(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);\n               break label$66;\n              }\n              FLAC__window_tukey(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1, HEAPF32[$2 + 48 >> 2]);\n              break label$66;\n             }\n             FLAC__window_partial_tukey(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1, HEAPF32[$2 + 48 >> 2], HEAPF32[$2 + 52 >> 2], HEAPF32[$2 + 56 >> 2]);\n             break label$66;\n            }\n            FLAC__window_punchout_tukey(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1, HEAPF32[$2 + 48 >> 2], HEAPF32[$2 + 52 >> 2], HEAPF32[$2 + 56 >> 2]);\n            break label$66;\n           }\n           FLAC__window_welch(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);\n           break label$66;\n          }\n          FLAC__window_hann(HEAP32[(HEAP32[$8 >> 2] + ($9 << 2) | 0) + 84 >> 2], $1);\n         }\n         $9 = $9 + 1 | 0;\n         $2 = HEAP32[$0 >> 2];\n         if ($9 >>> 0 < HEAPU32[$2 + 40 >> 2]) {\n          continue\n         }\n         break;\n        };\n        $9 = HEAP32[$8 >> 2];\n       }\n       HEAP32[$9 >> 2] = $1;\n      }\n      $1 = FLAC__bitwriter_init(HEAP32[$9 + 6856 >> 2]);\n      $3 = HEAP32[$0 >> 2];\n      if (!$1) {\n       HEAP32[$3 >> 2] = 8;\n       $9 = 1;\n       break label$1;\n      }\n      if (HEAP32[$3 + 4 >> 2]) {\n       $9 = 1;\n       $2 = HEAP32[$8 >> 2];\n       $1 = HEAP32[$3 + 36 >> 2] + 1 | 0;\n       HEAP32[$2 + 11796 >> 2] = $1;\n       label$87 : {\n        if (!HEAP32[$3 + 24 >> 2]) {\n         break label$87\n        }\n        $1 = safe_malloc_mul_2op_p(4, $1);\n        HEAP32[HEAP32[$0 + 4 >> 2] + 11764 >> 2] = $1;\n        $3 = HEAP32[$0 >> 2];\n        if ($1) {\n         while (1) {\n          $2 = HEAP32[$8 >> 2];\n          if ($9 >>> 0 >= HEAPU32[$3 + 24 >> 2]) {\n           break label$87\n          }\n          $1 = safe_malloc_mul_2op_p(4, HEAP32[$2 + 11796 >> 2]);\n          HEAP32[(HEAP32[$0 + 4 >> 2] + ($9 << 2) | 0) + 11764 >> 2] = $1;\n          $9 = $9 + 1 | 0;\n          $3 = HEAP32[$0 >> 2];\n          if ($1) {\n           continue\n          }\n          break;\n         }\n        }\n        HEAP32[$3 >> 2] = 8;\n        $9 = 1;\n        break label$1;\n       }\n       HEAP32[$2 + 11800 >> 2] = 0;\n       label$90 : {\n        $2 = HEAP32[$2 + 11752 >> 2];\n        if ($2) {\n         break label$90\n        }\n        $2 = FLAC__stream_decoder_new();\n        HEAP32[HEAP32[$8 >> 2] + 11752 >> 2] = $2;\n        if ($2) {\n         break label$90\n        }\n        HEAP32[HEAP32[$0 >> 2] >> 2] = 3;\n        $9 = 1;\n        break label$1;\n       }\n       $1 = FLAC__stream_decoder_init_stream($2, 18, 0, 0, 0, 0, 19, 20, 21, $0);\n       $3 = HEAP32[$0 >> 2];\n       if ($1) {\n        break label$45\n       }\n       $2 = !HEAP32[$3 + 4 >> 2];\n      } else {\n       $2 = 1\n      }\n      $1 = HEAP32[$8 >> 2];\n      HEAP32[$1 + 7312 >> 2] = 0;\n      HEAP32[$1 + 7316 >> 2] = 0;\n      HEAP32[$1 + 7292 >> 2] = 0;\n      $4 = $1 + 11816 | 0;\n      HEAP32[$4 >> 2] = 0;\n      HEAP32[$4 + 4 >> 2] = 0;\n      $4 = $1 + 11824 | 0;\n      HEAP32[$4 >> 2] = 0;\n      HEAP32[$4 + 4 >> 2] = 0;\n      $4 = $1 + 11832 | 0;\n      HEAP32[$4 >> 2] = 0;\n      HEAP32[$4 + 4 >> 2] = 0;\n      HEAP32[$1 + 11840 >> 2] = 0;\n      HEAP32[$3 + 624 >> 2] = 0;\n      HEAP32[$3 + 628 >> 2] = 0;\n      HEAP32[$3 + 616 >> 2] = 0;\n      HEAP32[$3 + 620 >> 2] = 0;\n      HEAP32[$3 + 608 >> 2] = 0;\n      HEAP32[$3 + 612 >> 2] = 0;\n      if (!$2) {\n       HEAP32[$1 + 11756 >> 2] = 0\n      }\n      if (!FLAC__bitwriter_write_raw_uint32(HEAP32[$1 + 6856 >> 2], HEAP32[1354], HEAP32[1355])) {\n       HEAP32[HEAP32[$0 >> 2] >> 2] = 7;\n       $9 = 1;\n       break label$1;\n      }\n      $9 = 1;\n      if (!write_bitbuffer_($0, 0, 0)) {\n       break label$1\n      }\n      $1 = HEAP32[$0 + 4 >> 2];\n      $2 = HEAP32[$0 >> 2];\n      if (HEAP32[$2 + 4 >> 2]) {\n       HEAP32[$1 + 11756 >> 2] = 1\n      }\n      HEAP32[$1 + 6872 >> 2] = 0;\n      HEAP32[$1 + 6876 >> 2] = 0;\n      HEAP32[$1 + 6880 >> 2] = 34;\n      HEAP32[$1 + 6888 >> 2] = HEAP32[$2 + 36 >> 2];\n      HEAP32[HEAP32[$0 + 4 >> 2] + 6892 >> 2] = HEAP32[HEAP32[$0 >> 2] + 36 >> 2];\n      HEAP32[HEAP32[$0 + 4 >> 2] + 6896 >> 2] = 0;\n      HEAP32[HEAP32[$0 + 4 >> 2] + 6900 >> 2] = 0;\n      HEAP32[HEAP32[$0 + 4 >> 2] + 6904 >> 2] = HEAP32[HEAP32[$0 >> 2] + 32 >> 2];\n      HEAP32[HEAP32[$0 + 4 >> 2] + 6908 >> 2] = HEAP32[HEAP32[$0 >> 2] + 24 >> 2];\n      HEAP32[HEAP32[$0 + 4 >> 2] + 6912 >> 2] = HEAP32[HEAP32[$0 >> 2] + 28 >> 2];\n      $1 = HEAP32[$0 >> 2];\n      $2 = HEAP32[$1 + 596 >> 2];\n      $3 = HEAP32[$0 + 4 >> 2] + 6920 | 0;\n      HEAP32[$3 >> 2] = HEAP32[$1 + 592 >> 2];\n      HEAP32[$3 + 4 >> 2] = $2;\n      $1 = HEAP32[$0 + 4 >> 2];\n      $2 = $1 + 6936 | 0;\n      HEAP32[$2 >> 2] = 0;\n      HEAP32[$2 + 4 >> 2] = 0;\n      $1 = $1 + 6928 | 0;\n      HEAP32[$1 >> 2] = 0;\n      HEAP32[$1 + 4 >> 2] = 0;\n      if (HEAP32[HEAP32[$0 >> 2] + 12 >> 2]) {\n       FLAC__MD5Init(HEAP32[$8 >> 2] + 7060 | 0)\n      }\n      $1 = HEAP32[$8 >> 2];\n      if (!FLAC__add_metadata_block($1 + 6872 | 0, HEAP32[$1 + 6856 >> 2])) {\n       HEAP32[HEAP32[$0 >> 2] >> 2] = 7;\n       break label$1;\n      }\n      if (!write_bitbuffer_($0, 0, 0)) {\n       break label$1\n      }\n      HEAP32[HEAP32[$8 >> 2] + 6896 >> 2] = -1 << HEAP32[1358] ^ -1;\n      $1 = HEAP32[$8 >> 2] + 6920 | 0;\n      HEAP32[$1 >> 2] = 0;\n      HEAP32[$1 + 4 >> 2] = 0;\n      if (!$11) {\n       HEAP32[$15 >> 2] = 4;\n       $2 = HEAP32[HEAP32[$0 >> 2] + 604 >> 2];\n       $1 = $15;\n       HEAP32[$1 + 24 >> 2] = 0;\n       HEAP32[$1 + 28 >> 2] = 0;\n       HEAP32[$1 + 16 >> 2] = 0;\n       HEAP32[$1 + 20 >> 2] = 0;\n       HEAP32[$1 + 8 >> 2] = 8;\n       HEAP32[$1 + 4 >> 2] = !$2;\n       if (!FLAC__add_metadata_block($1, HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2])) {\n        HEAP32[HEAP32[$0 >> 2] >> 2] = 7;\n        break label$1;\n       }\n       if (!write_bitbuffer_($0, 0, 0)) {\n        break label$1\n       }\n      }\n      label$98 : {\n       $3 = HEAP32[$0 >> 2];\n       $4 = HEAP32[$3 + 604 >> 2];\n       if (!$4) {\n        break label$98\n       }\n       $2 = 0;\n       while (1) {\n        $1 = HEAP32[HEAP32[$3 + 600 >> 2] + ($2 << 2) >> 2];\n        HEAP32[$1 + 4 >> 2] = ($4 + -1 | 0) == ($2 | 0);\n        if (!FLAC__add_metadata_block($1, HEAP32[HEAP32[$8 >> 2] + 6856 >> 2])) {\n         HEAP32[HEAP32[$0 >> 2] >> 2] = 7;\n         break label$1;\n        }\n        if (write_bitbuffer_($0, 0, 0)) {\n         $2 = $2 + 1 | 0;\n         $3 = HEAP32[$0 >> 2];\n         $4 = HEAP32[$3 + 604 >> 2];\n         if ($2 >>> 0 >= $4 >>> 0) {\n          break label$98\n         }\n         continue;\n        }\n        break;\n       };\n       break label$1;\n      }\n      label$102 : {\n       $1 = HEAP32[$8 >> 2];\n       $2 = HEAP32[$1 + 7272 >> 2];\n       if (!$2) {\n        break label$102\n       }\n       $1 = FUNCTION_TABLE[$2]($0, $3 + 624 | 0, HEAP32[$1 + 7288 >> 2]) | 0;\n       $3 = HEAP32[$0 >> 2];\n       if (($1 | 0) != 1) {\n        break label$102\n       }\n       HEAP32[$3 >> 2] = 5;\n       break label$1;\n      }\n      $9 = 0;\n      if (!HEAP32[$3 + 4 >> 2]) {\n       break label$1\n      }\n      HEAP32[HEAP32[$8 >> 2] + 11756 >> 2] = 2;\n      break label$1;\n     }\n     HEAP32[HEAP32[$0 >> 2] >> 2] = 2;\n     $9 = 1;\n     break label$1;\n    }\n    HEAP32[$3 >> 2] = 3;\n    $9 = 1;\n    break label$1;\n   }\n   HEAP32[$9 >> 2] = 8;\n   $9 = 1;\n  }\n  global$0 = $15 + 176 | 0;\n  return $9;\n }\n \n function precompute_partition_info_sums_($0, $1, $2, $3, $4, $5, $6) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  $4 = $4 | 0;\n  $5 = $5 | 0;\n  $6 = $6 | 0;\n  var $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0;\n  $11 = 1 << $5;\n  $14 = $11 >>> 0 > 1 ? $11 : 1;\n  $8 = 0 - $3 | 0;\n  $12 = $2 + $3 >>> $5 | 0;\n  $9 = $12 - $3 | 0;\n  label$1 : {\n   if ($6 + 4 >>> 0 < (Math_clz32($12) ^ -32) + 33 >>> 0) {\n    $6 = 0;\n    while (1) {\n     $3 = 0;\n     $8 = $8 + $12 | 0;\n     if ($7 >>> 0 < $8 >>> 0) {\n      while (1) {\n       $2 = HEAP32[($7 << 2) + $0 >> 2];\n       $10 = $2 >> 31;\n       $3 = ($10 ^ $2 + $10) + $3 | 0;\n       $7 = $7 + 1 | 0;\n       if ($7 >>> 0 < $8 >>> 0) {\n        continue\n       }\n       break;\n      };\n      $7 = $9;\n     }\n     $2 = ($6 << 3) + $1 | 0;\n     HEAP32[$2 >> 2] = $3;\n     HEAP32[$2 + 4 >> 2] = 0;\n     $9 = $9 + $12 | 0;\n     $6 = $6 + 1 | 0;\n     if (($14 | 0) != ($6 | 0)) {\n      continue\n     }\n     break;\n    };\n    break label$1;\n   }\n   $2 = 0;\n   while (1) {\n    $13 = 0;\n    $3 = 0;\n    $8 = $8 + $12 | 0;\n    if ($7 >>> 0 < $8 >>> 0) {\n     while (1) {\n      $6 = HEAP32[($7 << 2) + $0 >> 2];\n      $10 = $6 >> 31;\n      $10 = $10 ^ $6 + $10;\n      $6 = $10 + $13 | 0;\n      if ($6 >>> 0 < $10 >>> 0) {\n       $3 = $3 + 1 | 0\n      }\n      $13 = $6;\n      $7 = $7 + 1 | 0;\n      if ($7 >>> 0 < $8 >>> 0) {\n       continue\n      }\n      break;\n     };\n     $7 = $9;\n    }\n    $6 = ($2 << 3) + $1 | 0;\n    HEAP32[$6 >> 2] = $13;\n    HEAP32[$6 + 4 >> 2] = $3;\n    $9 = $9 + $12 | 0;\n    $2 = $2 + 1 | 0;\n    if (($14 | 0) != ($2 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n  if (($5 | 0) > ($4 | 0)) {\n   $7 = 0;\n   $0 = $11;\n   while (1) {\n    $5 = $5 + -1 | 0;\n    $8 = 0;\n    $0 = $0 >>> 1 | 0;\n    if ($0) {\n     while (1) {\n      $3 = ($7 << 3) + $1 | 0;\n      $2 = HEAP32[$3 + 8 >> 2];\n      $9 = HEAP32[$3 + 12 >> 2] + HEAP32[$3 + 4 >> 2] | 0;\n      $3 = HEAP32[$3 >> 2];\n      $2 = $3 + $2 | 0;\n      if ($2 >>> 0 < $3 >>> 0) {\n       $9 = $9 + 1 | 0\n      }\n      $6 = ($11 << 3) + $1 | 0;\n      HEAP32[$6 >> 2] = $2;\n      HEAP32[$6 + 4 >> 2] = $9;\n      $7 = $7 + 2 | 0;\n      $11 = $11 + 1 | 0;\n      $8 = $8 + 1 | 0;\n      if (($8 | 0) != ($0 | 0)) {\n       continue\n      }\n      break;\n     }\n    }\n    if (($5 | 0) > ($4 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n }\n \n function verify_read_callback_($0, $1, $2, $3) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  var $4 = 0, $5 = 0;\n  $5 = HEAP32[$3 + 4 >> 2];\n  if (HEAP32[$5 + 11760 >> 2]) {\n   HEAP32[$2 >> 2] = 4;\n   $0 = HEAPU8[5409] | HEAPU8[5410] << 8 | (HEAPU8[5411] << 16 | HEAPU8[5412] << 24);\n   HEAP8[$1 | 0] = $0;\n   HEAP8[$1 + 1 | 0] = $0 >>> 8;\n   HEAP8[$1 + 2 | 0] = $0 >>> 16;\n   HEAP8[$1 + 3 | 0] = $0 >>> 24;\n   HEAP32[HEAP32[$3 + 4 >> 2] + 11760 >> 2] = 0;\n   return 0;\n  }\n  $0 = HEAP32[$5 + 11812 >> 2];\n  if (!$0) {\n   return 2\n  }\n  $4 = HEAP32[$2 >> 2];\n  if ($0 >>> 0 < $4 >>> 0) {\n   HEAP32[$2 >> 2] = $0;\n   $4 = $0;\n  }\n  memcpy($1, HEAP32[$5 + 11804 >> 2], $4);\n  $0 = HEAP32[$3 + 4 >> 2];\n  $1 = $0 + 11804 | 0;\n  $3 = $1;\n  $4 = HEAP32[$1 >> 2];\n  $1 = HEAP32[$2 >> 2];\n  HEAP32[$3 >> 2] = $4 + $1;\n  $0 = $0 + 11812 | 0;\n  HEAP32[$0 >> 2] = HEAP32[$0 >> 2] - $1;\n  return 0;\n }\n \n function verify_write_callback_($0, $1, $2, $3) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;\n  $7 = HEAP32[$1 >> 2];\n  $5 = HEAP32[$3 + 4 >> 2];\n  $0 = HEAP32[$1 + 8 >> 2];\n  if ($0) {\n   $4 = $7 << 2;\n   while (1) {\n    $8 = $6 << 2;\n    $9 = HEAP32[$8 + $2 >> 2];\n    $10 = HEAP32[($5 + $8 | 0) + 11764 >> 2];\n    if (memcmp($9, $10, $4)) {\n     $4 = 0;\n     label$4 : {\n      if ($7) {\n       $0 = 0;\n       while (1) {\n        $2 = $0 << 2;\n        $8 = HEAP32[$2 + $9 >> 2];\n        $2 = HEAP32[$2 + $10 >> 2];\n        if (($8 | 0) != ($2 | 0)) {\n         $4 = $0;\n         break label$4;\n        }\n        $0 = $0 + 1 | 0;\n        if (($7 | 0) != ($0 | 0)) {\n         continue\n        }\n        break;\n       };\n      }\n      $2 = 0;\n      $8 = 0;\n     }\n     $9 = HEAP32[$1 + 28 >> 2];\n     $0 = $4;\n     $11 = $0 + HEAP32[$1 + 24 >> 2] | 0;\n     if ($11 >>> 0 < $0 >>> 0) {\n      $9 = $9 + 1 | 0\n     }\n     $10 = $5 + 11816 | 0;\n     HEAP32[$10 >> 2] = $11;\n     HEAP32[$10 + 4 >> 2] = $9;\n     $0 = HEAP32[$1 + 28 >> 2];\n     $1 = HEAP32[$1 + 24 >> 2];\n     HEAP32[$5 + 11840 >> 2] = $8;\n     HEAP32[$5 + 11836 >> 2] = $2;\n     HEAP32[$5 + 11832 >> 2] = $4;\n     HEAP32[$5 + 11828 >> 2] = $6;\n     (wasm2js_i32$0 = $5 + 11824 | 0, wasm2js_i32$1 = __wasm_i64_udiv($1, $0, $7)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;\n     HEAP32[HEAP32[$3 >> 2] >> 2] = 4;\n     return 1;\n    }\n    $6 = $6 + 1 | 0;\n    if (($0 | 0) != ($6 | 0)) {\n     continue\n    }\n    break;\n   };\n   $2 = $5 + 11800 | 0;\n   $1 = HEAP32[$2 >> 2] - $7 | 0;\n   HEAP32[$2 >> 2] = $1;\n   label$8 : {\n    if (!$0) {\n     break label$8\n    }\n    $2 = HEAP32[$5 + 11764 >> 2];\n    $4 = $2;\n    $2 = $7 << 2;\n    memmove($4, $4 + $2 | 0, $1 << 2);\n    $6 = 1;\n    if (($0 | 0) == 1) {\n     break label$8\n    }\n    while (1) {\n     $1 = HEAP32[$3 + 4 >> 2];\n     $4 = HEAP32[($1 + ($6 << 2) | 0) + 11764 >> 2];\n     memmove($4, $2 + $4 | 0, HEAP32[$1 + 11800 >> 2] << 2);\n     $6 = $6 + 1 | 0;\n     if (($0 | 0) != ($6 | 0)) {\n      continue\n     }\n     break;\n    };\n   }\n   return 0;\n  }\n  $0 = $5 + 11800 | 0;\n  HEAP32[$0 >> 2] = HEAP32[$0 >> 2] - $7;\n  return 0;\n }\n \n function verify_metadata_callback_($0, $1, $2) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n }\n \n function verify_error_callback_($0, $1, $2) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  HEAP32[HEAP32[$2 >> 2] >> 2] = 3;\n }\n \n function write_bitbuffer_($0, $1, $2) {\n  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0;\n  $5 = global$0 - 16 | 0;\n  global$0 = $5;\n  $4 = FLAC__bitwriter_get_buffer(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2], $5 + 4 | 0, $5);\n  $3 = HEAP32[$0 >> 2];\n  label$1 : {\n   label$2 : {\n    if (!$4) {\n     HEAP32[$3 >> 2] = 8;\n     break label$2;\n    }\n    label$4 : {\n     if (!HEAP32[$3 + 4 >> 2]) {\n      break label$4\n     }\n     $3 = HEAP32[$0 + 4 >> 2];\n     HEAP32[$3 + 11804 >> 2] = HEAP32[$5 + 4 >> 2];\n     HEAP32[$3 + 11812 >> 2] = HEAP32[$5 >> 2];\n     if (!HEAP32[$3 + 11756 >> 2]) {\n      HEAP32[$3 + 11760 >> 2] = 1;\n      break label$4;\n     }\n     if (FLAC__stream_decoder_process_single(HEAP32[$3 + 11752 >> 2])) {\n      break label$4\n     }\n     FLAC__bitwriter_clear(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2]);\n     $0 = HEAP32[$0 >> 2];\n     if (HEAP32[$0 >> 2] == 4) {\n      break label$1\n     }\n     HEAP32[$0 >> 2] = 3;\n     break label$1;\n    }\n    $12 = HEAP32[$5 >> 2];\n    $14 = HEAP32[$5 + 4 >> 2];\n    HEAP32[$5 + 8 >> 2] = 0;\n    HEAP32[$5 + 12 >> 2] = 0;\n    label$6 : {\n     label$7 : {\n      $3 = HEAP32[$0 + 4 >> 2];\n      $4 = HEAP32[$3 + 7272 >> 2];\n      if (!$4) {\n       break label$7\n      }\n      if ((FUNCTION_TABLE[$4]($0, $5 + 8 | 0, HEAP32[$3 + 7288 >> 2]) | 0) != 1) {\n       break label$7\n      }\n      break label$6;\n     }\n     label$8 : {\n      if ($1) {\n       break label$8\n      }\n      label$9 : {\n       switch (HEAPU8[$14 | 0] & 127) {\n       case 0:\n        $3 = HEAP32[$5 + 12 >> 2];\n        $4 = HEAP32[$0 >> 2];\n        HEAP32[$4 + 608 >> 2] = HEAP32[$5 + 8 >> 2];\n        HEAP32[$4 + 612 >> 2] = $3;\n        break label$8;\n       case 3:\n        break label$9;\n       default:\n        break label$8;\n       };\n      }\n      $3 = HEAP32[$0 >> 2];\n      if (HEAP32[$3 + 616 >> 2] | HEAP32[$3 + 620 >> 2]) {\n       break label$8\n      }\n      $4 = HEAP32[$5 + 12 >> 2];\n      HEAP32[$3 + 616 >> 2] = HEAP32[$5 + 8 >> 2];\n      HEAP32[$3 + 620 >> 2] = $4;\n     }\n     $6 = HEAP32[$0 + 4 >> 2];\n     $7 = HEAP32[$6 + 7048 >> 2];\n     label$11 : {\n      if (!$7) {\n       break label$11\n      }\n      $8 = HEAP32[$0 >> 2];\n      $4 = $8;\n      $3 = HEAP32[$4 + 628 >> 2];\n      $15 = HEAP32[$4 + 624 >> 2];\n      if (!($3 | $15)) {\n       break label$11\n      }\n      $16 = HEAP32[$7 >> 2];\n      if (!$16) {\n       break label$11\n      }\n      $10 = HEAP32[$6 + 7292 >> 2];\n      if ($10 >>> 0 >= $16 >>> 0) {\n       break label$11\n      }\n      $13 = HEAP32[$6 + 7316 >> 2];\n      $4 = $13;\n      $17 = HEAP32[$6 + 7312 >> 2];\n      $18 = HEAP32[$8 + 36 >> 2];\n      $8 = $18;\n      $9 = $17 + $8 | 0;\n      if ($9 >>> 0 < $8 >>> 0) {\n       $4 = $4 + 1 | 0\n      }\n      $4 = $4 + -1 | 0;\n      $11 = $4 + 1 | 0;\n      $8 = $4;\n      $4 = $9 + -1 | 0;\n      $8 = ($4 | 0) != -1 ? $11 : $8;\n      $19 = HEAP32[$7 + 4 >> 2];\n      while (1) {\n       $7 = $19 + Math_imul($10, 24) | 0;\n       $11 = HEAP32[$7 >> 2];\n       $9 = HEAP32[$7 + 4 >> 2];\n       if (($8 | 0) == ($9 | 0) & $11 >>> 0 > $4 >>> 0 | $9 >>> 0 > $8 >>> 0) {\n        break label$11\n       }\n       if (($9 | 0) == ($13 | 0) & $11 >>> 0 >= $17 >>> 0 | $9 >>> 0 > $13 >>> 0) {\n        HEAP32[$7 >> 2] = $17;\n        HEAP32[$7 + 4 >> 2] = $13;\n        $9 = HEAP32[$5 + 8 >> 2];\n        $11 = HEAP32[$5 + 12 >> 2];\n        HEAP32[$7 + 16 >> 2] = $18;\n        HEAP32[$7 + 8 >> 2] = $9 - $15;\n        HEAP32[$7 + 12 >> 2] = $11 - ($3 + ($9 >>> 0 < $15 >>> 0) | 0);\n       }\n       $10 = $10 + 1 | 0;\n       HEAP32[$6 + 7292 >> 2] = $10;\n       if (($10 | 0) != ($16 | 0)) {\n        continue\n       }\n       break;\n      };\n     }\n     label$14 : {\n      if (HEAP32[$6 + 7260 >> 2]) {\n       $2 = FLAC__ogg_encoder_aspect_write_callback_wrapper(HEAP32[$0 >> 2] + 632 | 0, $14, $12, $1, HEAP32[$6 + 7056 >> 2], $2, HEAP32[$6 + 7276 >> 2], $0, HEAP32[$6 + 7288 >> 2]);\n       break label$14;\n      }\n      $2 = FUNCTION_TABLE[HEAP32[$6 + 7276 >> 2]]($0, $14, $12, $1, HEAP32[$6 + 7056 >> 2], HEAP32[$6 + 7288 >> 2]) | 0;\n     }\n     if (!$2) {\n      $2 = HEAP32[$0 + 4 >> 2];\n      $3 = $2;\n      $8 = $3;\n      $4 = HEAP32[$3 + 7308 >> 2];\n      $6 = $12 + HEAP32[$3 + 7304 >> 2] | 0;\n      if ($6 >>> 0 < $12 >>> 0) {\n       $4 = $4 + 1 | 0\n      }\n      HEAP32[$8 + 7304 >> 2] = $6;\n      HEAP32[$3 + 7308 >> 2] = $4;\n      $3 = HEAP32[$2 + 7316 >> 2];\n      $4 = HEAP32[$2 + 7312 >> 2] + $1 | 0;\n      if ($4 >>> 0 < $1 >>> 0) {\n       $3 = $3 + 1 | 0\n      }\n      HEAP32[$2 + 7312 >> 2] = $4;\n      HEAP32[$2 + 7316 >> 2] = $3;\n      $10 = 1;\n      $4 = $2;\n      $3 = HEAP32[$2 + 7320 >> 2];\n      $2 = HEAP32[$2 + 7056 >> 2] + 1 | 0;\n      HEAP32[$4 + 7320 >> 2] = $3 >>> 0 > $2 >>> 0 ? $3 : $2;\n      FLAC__bitwriter_clear(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2]);\n      if (!$1) {\n       break label$1\n      }\n      $1 = HEAP32[$0 + 4 >> 2] + 6896 | 0;\n      $2 = HEAP32[$1 >> 2];\n      $4 = $1;\n      $1 = HEAP32[$5 >> 2];\n      HEAP32[$4 >> 2] = $1 >>> 0 < $2 >>> 0 ? $1 : $2;\n      $2 = HEAP32[$0 + 4 >> 2] + 6900 | 0;\n      $0 = HEAP32[$2 >> 2];\n      HEAP32[$2 >> 2] = $1 >>> 0 > $0 >>> 0 ? $1 : $0;\n      break label$1;\n     }\n    }\n    HEAP32[HEAP32[$0 >> 2] >> 2] = 5;\n    FLAC__bitwriter_clear(HEAP32[HEAP32[$0 + 4 >> 2] + 6856 >> 2]);\n    HEAP32[HEAP32[$0 >> 2] >> 2] = 5;\n   }\n   $10 = 0;\n  }\n  global$0 = $5 + 16 | 0;\n  return $10;\n }\n \n function FLAC__stream_encoder_init_ogg_stream($0, $1, $2, $3, $4, $5, $6) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  $4 = $4 | 0;\n  $5 = $5 | 0;\n  $6 = $6 | 0;\n  return init_stream_internal__1($0, $1, $2, $3, $4, $5, $6, 1) | 0;\n }\n \n function process_subframe_($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10) {\n  var $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = Math_fround(0), $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = Math_fround(0), $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0;\n  $14 = global$0 - 576 | 0;\n  global$0 = $14;\n  $25 = HEAP32[(HEAPU32[HEAP32[$0 >> 2] + 28 >> 2] > 16 ? 5644 : 5640) >> 2];\n  $12 = HEAP32[$3 >> 2];\n  label$1 : {\n   label$2 : {\n    if (HEAP32[HEAP32[$0 + 4 >> 2] + 7256 >> 2]) {\n     $11 = -1;\n     if ($12 >>> 0 > 3) {\n      break label$2\n     }\n    }\n    $16 = HEAP32[$6 >> 2];\n    HEAP32[$16 + 4 >> 2] = $5;\n    HEAP32[$16 >> 2] = 1;\n    $11 = HEAP32[$16 + 288 >> 2] + (HEAP32[1416] + (HEAP32[1415] + (HEAP32[1414] + Math_imul($4, $12) | 0) | 0) | 0) | 0;\n    $12 = HEAP32[$3 >> 2];\n    if ($12 >>> 0 < 4) {\n     break label$1\n    }\n   }\n   $13 = HEAP32[$0 + 4 >> 2];\n   $16 = $12 + -4 | 0;\n   label$4 : {\n    if (((Math_clz32($16 | 1) ^ 31) + $4 | 0) + 4 >>> 0 <= 32) {\n     $13 = FUNCTION_TABLE[HEAP32[$13 + 7224 >> 2]]($5 + 16 | 0, $16, $14 + 416 | 0) | 0;\n     break label$4;\n    }\n    $13 = FUNCTION_TABLE[HEAP32[$13 + 7228 >> 2]]($5 + 16 | 0, $16, $14 + 416 | 0) | 0;\n   }\n   label$6 : {\n    label$7 : {\n     label$8 : {\n      label$9 : {\n       $15 = HEAP32[$0 + 4 >> 2];\n       if (HEAP32[$15 + 7248 >> 2] | HEAPF32[$14 + 420 >> 2] != Math_fround(0.0)) {\n        break label$9\n       }\n       $12 = 1;\n       $17 = HEAP32[$5 >> 2];\n       $16 = HEAP32[$3 >> 2];\n       if ($16 >>> 0 <= 1) {\n        break label$8\n       }\n       while (1) {\n        if (($17 | 0) != HEAP32[($12 << 2) + $5 >> 2]) {\n         break label$9\n        }\n        $12 = $12 + 1 | 0;\n        if ($12 >>> 0 < $16 >>> 0) {\n         continue\n        }\n        break;\n       };\n       break label$8;\n      }\n      $12 = HEAP32[$0 >> 2];\n      if (!HEAP32[$15 + 7252 >> 2]) {\n       $16 = $11;\n       break label$7;\n      }\n      $16 = -1;\n      if (($11 | 0) != -1) {\n       $16 = $11;\n       break label$6;\n      }\n      if (!HEAP32[$12 + 556 >> 2]) {\n       break label$7\n      }\n      $16 = $11;\n      break label$6;\n     }\n     $0 = HEAP32[$6 + 4 >> 2];\n     HEAP32[$0 + 4 >> 2] = $17;\n     HEAP32[$0 >> 2] = 0;\n     $0 = HEAP32[$0 + 288 >> 2] + (HEAP32[1416] + (HEAP32[1415] + (HEAP32[1414] + $4 | 0) | 0) | 0) | 0;\n     $19 = $0 >>> 0 < $11 >>> 0;\n     $11 = $19 ? $0 : $11;\n     break label$1;\n    }\n    $11 = HEAP32[$12 + 568 >> 2];\n    $18 = $11 ? 0 : $13;\n    $13 = $11 ? 4 : $13;\n    $11 = HEAP32[$3 >> 2];\n    $29 = $13 >>> 0 < $11 >>> 0 ? $13 : $11 + -1 | 0;\n    if ($18 >>> 0 > $29 >>> 0) {\n     break label$6\n    }\n    $32 = $25 + -1 | 0;\n    $33 = HEAP32[1416];\n    $30 = HEAP32[1415];\n    $34 = HEAP32[1414];\n    $42 = Math_fround($4 >>> 0);\n    while (1) {\n     $12 = $18 << 2;\n     $35 = HEAPF32[$12 + ($14 + 416 | 0) >> 2];\n     if (!($35 >= $42)) {\n      $31 = !$19;\n      $17 = $31 << 2;\n      $36 = HEAP32[$17 + $7 >> 2];\n      $21 = HEAP32[$6 + $17 >> 2];\n      $23 = HEAP32[HEAP32[$0 >> 2] + 572 >> 2];\n      $11 = HEAP32[$0 + 4 >> 2];\n      $13 = HEAP32[$11 + 6852 >> 2];\n      $15 = HEAP32[$11 + 6848 >> 2];\n      $11 = $5 + $12 | 0;\n      $12 = HEAP32[$3 >> 2] - $18 | 0;\n      $17 = HEAP32[$8 + $17 >> 2];\n      FLAC__fixed_compute_residual($11, $12, $18, $17);\n      HEAP32[$21 + 36 >> 2] = $17;\n      HEAP32[$21 + 12 >> 2] = $36;\n      HEAP32[$21 >> 2] = 2;\n      HEAP32[$21 + 4 >> 2] = 0;\n      $37 = $35 > Math_fround(0.0);\n      $26 = HEAP32[$0 + 4 >> 2];\n      $22 = $18;\n      $27 = +$35 + .5;\n      label$15 : {\n       if ($27 < 4294967296.0 & $27 >= 0.0) {\n        $11 = ~~$27 >>> 0;\n        break label$15;\n       }\n       $11 = 0;\n      }\n      $11 = $37 ? $11 + 1 | 0 : 1;\n      $15 = find_best_partition_order_($26, $17, $15, $13, $12, $22, $11 >>> 0 < $25 >>> 0 ? $11 : $32, $25, $1, $2, $4, $23, $21 + 4 | 0);\n      HEAP32[$21 + 16 >> 2] = $18;\n      if ($18) {\n       $13 = $21 + 20 | 0;\n       $11 = 0;\n       while (1) {\n        $12 = $11 << 2;\n        HEAP32[$12 + $13 >> 2] = HEAP32[$5 + $12 >> 2];\n        $11 = $11 + 1 | 0;\n        if (($18 | 0) != ($11 | 0)) {\n         continue\n        }\n        break;\n       };\n      }\n      $11 = HEAP32[$21 + 288 >> 2] + ($33 + ($30 + ($34 + ($15 + Math_imul($4, $18) | 0) | 0) | 0) | 0) | 0;\n      $12 = $11 >>> 0 < $16 >>> 0;\n      $19 = $12 ? $31 : $19;\n      $16 = $12 ? $11 : $16;\n     }\n     $18 = $18 + 1 | 0;\n     if ($18 >>> 0 <= $29 >>> 0) {\n      continue\n     }\n     break;\n    };\n    $12 = HEAP32[$0 >> 2];\n   }\n   $13 = HEAP32[$12 + 556 >> 2];\n   if (!$13) {\n    $11 = $16;\n    break label$1;\n   }\n   $11 = HEAP32[$3 >> 2];\n   $13 = $13 >>> 0 < $11 >>> 0 ? $13 : $11 + -1 | 0;\n   HEAP32[$14 + 12 >> 2] = $13;\n   if (!$13) {\n    $11 = $16;\n    break label$1;\n   }\n   if (!HEAP32[$12 + 40 >> 2]) {\n    $11 = $16;\n    break label$1;\n   }\n   $40 = 33 - $4 | 0;\n   $43 = $25 + -1 | 0;\n   $44 = HEAP32[1413];\n   $45 = HEAP32[1412];\n   $46 = HEAP32[1416];\n   $21 = HEAP32[1415];\n   $47 = HEAP32[1414];\n   $27 = +($4 >>> 0);\n   $29 = $4 >>> 0 < 18;\n   $32 = $4 >>> 0 > 16;\n   $33 = $4 >>> 0 > 17;\n   while (1) {\n    $12 = HEAP32[$0 + 4 >> 2];\n    FLAC__lpc_window_data($5, HEAP32[($12 + ($38 << 2) | 0) + 84 >> 2], HEAP32[$12 + 212 >> 2], $11);\n    $11 = HEAP32[$0 + 4 >> 2];\n    FUNCTION_TABLE[HEAP32[$11 + 7232 >> 2]](HEAP32[$11 + 212 >> 2], HEAP32[$3 >> 2], HEAP32[$14 + 12 >> 2] + 1 | 0, $14 + 272 | 0);\n    label$23 : {\n     if (HEAPF32[$14 + 272 >> 2] == Math_fround(0.0)) {\n      break label$23\n     }\n     FLAC__lpc_compute_lp_coefficients($14 + 272 | 0, $14 + 12 | 0, HEAP32[$0 + 4 >> 2] + 7628 | 0, $14 + 16 | 0);\n     $15 = 1;\n     $12 = HEAP32[$14 + 12 >> 2];\n     $17 = HEAP32[$0 >> 2];\n     if (!HEAP32[$17 + 568 >> 2]) {\n      $11 = $14;\n      $12 = FLAC__lpc_compute_best_order($11 + 16 | 0, $12, HEAP32[$3 >> 2], (HEAP32[$17 + 564 >> 2] ? 5 : HEAP32[$17 + 560 >> 2]) + $4 | 0);\n      HEAP32[$11 + 12 >> 2] = $12;\n      $15 = $12;\n     }\n     $11 = HEAP32[$3 >> 2];\n     if ($12 >>> 0 >= $11 >>> 0) {\n      $12 = $11 + -1 | 0;\n      HEAP32[$14 + 12 >> 2] = $12;\n     }\n     if ($15 >>> 0 > $12 >>> 0) {\n      break label$23\n     }\n     while (1) {\n      label$29 : {\n       $30 = $15 + -1 | 0;\n       $24 = FLAC__lpc_compute_expected_bits_per_residual_sample(HEAPF64[($14 + 16 | 0) + ($30 << 3) >> 3], $11 - $15 | 0);\n       if ($24 >= $27) {\n        break label$29\n       }\n       $11 = $24 > 0.0;\n       $24 = $24 + .5;\n       label$30 : {\n        if ($24 < 4294967296.0 & $24 >= 0.0) {\n         $13 = ~~$24 >>> 0;\n         break label$30;\n        }\n        $13 = 0;\n       }\n       $13 = $11 ? $13 + 1 | 0 : 1;\n       $11 = $13 >>> 0 < $25 >>> 0;\n       $12 = HEAP32[$0 >> 2];\n       label$32 : {\n        if (HEAP32[$12 + 564 >> 2]) {\n         $22 = 5;\n         $26 = 15;\n         if ($33) {\n          break label$32\n         }\n         $17 = (Math_clz32($15) ^ -32) + $40 | 0;\n         if ($17 >>> 0 > 14) {\n          break label$32\n         }\n         $26 = $17 >>> 0 > 5 ? $17 : 5;\n         break label$32;\n        }\n        $26 = HEAP32[$12 + 560 >> 2];\n        $22 = $26;\n       }\n       $34 = $11 ? $13 : $43;\n       $39 = ($15 << 2) + $5 | 0;\n       $11 = Math_clz32($15);\n       $31 = $11 ^ 31;\n       $41 = ($11 ^ -32) + $40 | 0;\n       while (1) {\n        $23 = HEAP32[$3 >> 2];\n        $13 = !$19;\n        $11 = $13 << 2;\n        $37 = HEAP32[$11 + $7 >> 2];\n        $20 = HEAP32[$6 + $11 >> 2];\n        $28 = HEAP32[$8 + $11 >> 2];\n        $36 = HEAP32[$12 + 572 >> 2];\n        $12 = HEAP32[$0 + 4 >> 2];\n        $18 = HEAP32[$12 + 6852 >> 2];\n        $17 = HEAP32[$12 + 6848 >> 2];\n        $11 = 0;\n        $48 = $19;\n        $19 = ($12 + ($30 << 7) | 0) + 7628 | 0;\n        $12 = $29 ? ($41 >>> 0 > $22 >>> 0 ? $22 : $41) : $22;\n        if (!FLAC__lpc_quantize_coefficients($19, $15, $12, $14 + 448 | 0, $14 + 444 | 0)) {\n         $23 = $23 - $15 | 0;\n         $19 = $4 + $12 | 0;\n         label$37 : {\n          if ($19 + $31 >>> 0 <= 32) {\n           $11 = HEAP32[$0 + 4 >> 2];\n           if (!($12 >>> 0 > 16 | $32)) {\n            FUNCTION_TABLE[HEAP32[$11 + 7244 >> 2]]($39, $23, $14 + 448 | 0, $15, HEAP32[$14 + 444 >> 2], $28);\n            break label$37;\n           }\n           FUNCTION_TABLE[HEAP32[$11 + 7236 >> 2]]($39, $23, $14 + 448 | 0, $15, HEAP32[$14 + 444 >> 2], $28);\n           break label$37;\n          }\n          FUNCTION_TABLE[HEAP32[HEAP32[$0 + 4 >> 2] + 7240 >> 2]]($39, $23, $14 + 448 | 0, $15, HEAP32[$14 + 444 >> 2], $28);\n         }\n         HEAP32[$20 >> 2] = 3;\n         HEAP32[$20 + 4 >> 2] = 0;\n         HEAP32[$20 + 284 >> 2] = $28;\n         HEAP32[$20 + 12 >> 2] = $37;\n         $18 = find_best_partition_order_(HEAP32[$0 + 4 >> 2], $28, $17, $18, $23, $15, $34, $25, $1, $2, $4, $36, $20 + 4 | 0);\n         HEAP32[$20 + 20 >> 2] = $12;\n         HEAP32[$20 + 16 >> 2] = $15;\n         HEAP32[$20 + 24 >> 2] = HEAP32[$14 + 444 >> 2];\n         memcpy($20 + 28 | 0, $14 + 448 | 0, 128);\n         $11 = 0;\n         if ($15) {\n          while (1) {\n           $17 = $11 << 2;\n           HEAP32[($17 + $20 | 0) + 156 >> 2] = HEAP32[$5 + $17 >> 2];\n           $11 = $11 + 1 | 0;\n           if (($15 | 0) != ($11 | 0)) {\n            continue\n           }\n           break;\n          }\n         }\n         $11 = ((HEAP32[$20 + 288 >> 2] + (((($18 + Math_imul($15, $19) | 0) + $47 | 0) + $21 | 0) + $46 | 0) | 0) + $45 | 0) + $44 | 0;\n        }\n        $12 = ($11 | 0) != 0 & $11 >>> 0 < $16 >>> 0;\n        $19 = $12 ? $13 : $48;\n        $16 = $12 ? $11 : $16;\n        $22 = $22 + 1 | 0;\n        if ($22 >>> 0 > $26 >>> 0) {\n         break label$29\n        }\n        $12 = HEAP32[$0 >> 2];\n        continue;\n       };\n      }\n      $15 = $15 + 1 | 0;\n      if ($15 >>> 0 > HEAPU32[$14 + 12 >> 2]) {\n       break label$23\n      }\n      $11 = HEAP32[$3 >> 2];\n      continue;\n     };\n    }\n    $38 = $38 + 1 | 0;\n    if ($38 >>> 0 < HEAPU32[HEAP32[$0 >> 2] + 40 >> 2]) {\n     $11 = HEAP32[$3 >> 2];\n     continue;\n    }\n    break;\n   };\n   $11 = $16;\n  }\n  if (($11 | 0) == -1) {\n   $0 = HEAP32[$3 >> 2];\n   $1 = HEAP32[($19 << 2) + $6 >> 2];\n   HEAP32[$1 + 4 >> 2] = $5;\n   HEAP32[$1 >> 2] = 1;\n   $11 = HEAP32[$1 + 288 >> 2] + (HEAP32[1416] + (HEAP32[1415] + (HEAP32[1414] + Math_imul($0, $4) | 0) | 0) | 0) | 0;\n  }\n  HEAP32[$9 >> 2] = $19;\n  HEAP32[$10 >> 2] = $11;\n  global$0 = $14 + 576 | 0;\n }\n \n function add_subframe_($0, $1, $2, $3, $4) {\n  var $5 = 0;\n  $5 = 1;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     switch (HEAP32[$3 >> 2]) {\n     case 0:\n      if (FLAC__subframe_add_constant($3 + 4 | 0, $2, HEAP32[$3 + 288 >> 2], $4)) {\n       break label$1\n      }\n      break label$2;\n     case 2:\n      if (FLAC__subframe_add_fixed($3 + 4 | 0, $1 - HEAP32[$3 + 16 >> 2] | 0, $2, HEAP32[$3 + 288 >> 2], $4)) {\n       break label$1\n      }\n      break label$2;\n     case 3:\n      if (FLAC__subframe_add_lpc($3 + 4 | 0, $1 - HEAP32[$3 + 16 >> 2] | 0, $2, HEAP32[$3 + 288 >> 2], $4)) {\n       break label$1\n      }\n      break label$2;\n     case 1:\n      break label$3;\n     default:\n      break label$1;\n     };\n    }\n    if (FLAC__subframe_add_verbatim($3 + 4 | 0, $1, $2, HEAP32[$3 + 288 >> 2], $4)) {\n     break label$1\n    }\n   }\n   HEAP32[HEAP32[$0 >> 2] >> 2] = 7;\n   $5 = 0;\n  }\n  return $5;\n }\n \n function FLAC__stream_encoder_set_ogg_serial_number($0, $1) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $0 = HEAP32[$0 >> 2];\n  if (HEAP32[$0 >> 2] == 1) {\n   HEAP32[$0 + 632 >> 2] = $1;\n   $0 = 1;\n  } else {\n   $0 = 0\n  }\n  return $0 | 0;\n }\n \n function FLAC__stream_encoder_set_verify($0, $1) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $0 = HEAP32[$0 >> 2];\n  if (HEAP32[$0 >> 2] == 1) {\n   HEAP32[$0 + 4 >> 2] = $1;\n   $0 = 1;\n  } else {\n   $0 = 0\n  }\n  return $0 | 0;\n }\n \n function FLAC__stream_encoder_set_channels($0, $1) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $0 = HEAP32[$0 >> 2];\n  if (HEAP32[$0 >> 2] == 1) {\n   HEAP32[$0 + 24 >> 2] = $1;\n   $0 = 1;\n  } else {\n   $0 = 0\n  }\n  return $0 | 0;\n }\n \n function FLAC__stream_encoder_set_bits_per_sample($0, $1) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $0 = HEAP32[$0 >> 2];\n  if (HEAP32[$0 >> 2] == 1) {\n   HEAP32[$0 + 28 >> 2] = $1;\n   $0 = 1;\n  } else {\n   $0 = 0\n  }\n  return $0 | 0;\n }\n \n function FLAC__stream_encoder_set_sample_rate($0, $1) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $0 = HEAP32[$0 >> 2];\n  if (HEAP32[$0 >> 2] == 1) {\n   HEAP32[$0 + 32 >> 2] = $1;\n   $0 = 1;\n  } else {\n   $0 = 0\n  }\n  return $0 | 0;\n }\n \n function FLAC__stream_encoder_set_compression_level($0, $1) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  var $2 = 0, $3 = 0, $4 = 0;\n  $3 = HEAP32[$0 >> 2];\n  if (HEAP32[$3 >> 2] == 1) {\n   $2 = Math_imul($1 >>> 0 < 8 ? $1 : 8, 44);\n   $1 = $2 + 11184 | 0;\n   $4 = HEAP32[$1 + 4 >> 2];\n   HEAP32[$3 + 16 >> 2] = HEAP32[$1 >> 2];\n   HEAP32[$3 + 20 >> 2] = $4;\n   $3 = FLAC__stream_encoder_set_apodization($0, HEAP32[$1 + 40 >> 2]);\n   $1 = 0;\n   $0 = HEAP32[$0 >> 2];\n   if (HEAP32[$0 >> 2] == 1) {\n    $1 = $2 + 11184 | 0;\n    $2 = HEAP32[$1 + 32 >> 2];\n    HEAP32[$0 + 576 >> 2] = HEAP32[$1 + 28 >> 2];\n    HEAP32[$0 + 580 >> 2] = $2;\n    HEAP32[$0 + 568 >> 2] = HEAP32[$1 + 24 >> 2];\n    HEAP32[$0 + 564 >> 2] = HEAP32[$1 + 16 >> 2];\n    $2 = HEAP32[$1 + 12 >> 2];\n    HEAP32[$0 + 556 >> 2] = HEAP32[$1 + 8 >> 2];\n    HEAP32[$0 + 560 >> 2] = $2;\n    $1 = $3 & 1;\n    $0 = 1;\n   } else {\n    $0 = 0\n   }\n   $0 = $0 & $1;\n  } else {\n   $0 = 0\n  }\n  return $0 | 0;\n }\n \n function FLAC__stream_encoder_set_blocksize($0, $1) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $0 = HEAP32[$0 >> 2];\n  if (HEAP32[$0 >> 2] == 1) {\n   HEAP32[$0 + 36 >> 2] = $1;\n   $0 = 1;\n  } else {\n   $0 = 0\n  }\n  return $0 | 0;\n }\n \n function FLAC__stream_encoder_set_total_samples_estimate($0, $1, $2) {\n  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;\n  $0 = HEAP32[$0 >> 2];\n  if (HEAP32[$0 >> 2] == 1) {\n   $6 = $2;\n   $7 = $0;\n   $8 = $1;\n   $4 = HEAP32[1363];\n   $3 = $4 & 31;\n   if (32 <= ($4 & 63) >>> 0) {\n    $4 = -1 << $3;\n    $3 = 0;\n   } else {\n    $4 = (1 << $3) - 1 & -1 >>> 32 - $3 | -1 << $3;\n    $3 = -1 << $3;\n   }\n   $5 = $3 ^ -1;\n   $3 = $4 ^ -1;\n   $1 = ($2 | 0) == ($3 | 0) & $5 >>> 0 > $1 >>> 0 | $3 >>> 0 > $2 >>> 0;\n   HEAP32[$7 + 592 >> 2] = $1 ? $8 : $5;\n   HEAP32[$0 + 596 >> 2] = $1 ? $6 : $3;\n   $0 = 1;\n  } else {\n   $0 = 0\n  }\n  return $0;\n }\n \n function FLAC__stream_encoder_set_metadata($0, $1, $2) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  var $3 = 0, $4 = 0;\n  $3 = HEAP32[$0 >> 2];\n  if (HEAP32[$3 >> 2] == 1) {\n   $4 = HEAP32[$3 + 600 >> 2];\n   if ($4) {\n    dlfree($4);\n    $3 = HEAP32[$0 >> 2];\n    HEAP32[$3 + 600 >> 2] = 0;\n    HEAP32[$3 + 604 >> 2] = 0;\n   }\n   $2 = $1 ? $2 : 0;\n   if ($2) {\n    $3 = safe_malloc_mul_2op_p(4, $2);\n    if (!$3) {\n     return 0\n    }\n    $1 = memcpy($3, $1, $2 << 2);\n    $3 = HEAP32[$0 >> 2];\n    HEAP32[$3 + 604 >> 2] = $2;\n    HEAP32[$3 + 600 >> 2] = $1;\n   }\n   $0 = $3 + 632 | 0;\n   if ($2 >>> HEAP32[1886]) {\n    $0 = 0\n   } else {\n    HEAP32[$0 + 4 >> 2] = $2;\n    $0 = 1;\n   }\n   $0 = ($0 | 0) != 0;\n  } else {\n   $0 = 0\n  }\n  return $0 | 0;\n }\n \n function FLAC__stream_encoder_get_verify_decoder_state($0) {\n  $0 = $0 | 0;\n  if (!HEAP32[HEAP32[$0 >> 2] + 4 >> 2]) {\n   return 9\n  }\n  return FLAC__stream_decoder_get_state(HEAP32[HEAP32[$0 + 4 >> 2] + 11752 >> 2]) | 0;\n }\n \n function FLAC__stream_encoder_get_verify($0) {\n  $0 = $0 | 0;\n  return HEAP32[HEAP32[$0 >> 2] + 4 >> 2];\n }\n \n function FLAC__stream_encoder_process($0, $1, $2) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0;\n  $5 = HEAP32[$0 >> 2];\n  $11 = HEAP32[$5 + 36 >> 2];\n  $16 = $11 + 1 | 0;\n  $4 = HEAP32[$0 + 4 >> 2];\n  $10 = HEAP32[$5 + 24 >> 2];\n  $13 = $11 << 2;\n  label$1 : {\n   while (1) {\n    $3 = $16 - HEAP32[$4 + 7052 >> 2] | 0;\n    $6 = $2 - $7 | 0;\n    $6 = $3 >>> 0 < $6 >>> 0 ? $3 : $6;\n    if (HEAP32[$5 + 4 >> 2]) {\n     if ($10) {\n      $5 = $6 << 2;\n      $3 = 0;\n      while (1) {\n       $8 = $3 << 2;\n       memcpy(HEAP32[($8 + $4 | 0) + 11764 >> 2] + (HEAP32[$4 + 11800 >> 2] << 2) | 0, HEAP32[$1 + $8 >> 2] + ($7 << 2) | 0, $5);\n       $3 = $3 + 1 | 0;\n       if (($10 | 0) != ($3 | 0)) {\n        continue\n       }\n       break;\n      };\n     }\n     $4 = $4 + 11800 | 0;\n     HEAP32[$4 >> 2] = HEAP32[$4 >> 2] + $6;\n    }\n    if ($10) {\n     $5 = $6 << 2;\n     $4 = 0;\n     $3 = 0;\n     while (1) {\n      $8 = $3 << 2;\n      $12 = HEAP32[$8 + $1 >> 2];\n      if (!$12) {\n       break label$1\n      }\n      $9 = $8;\n      $8 = HEAP32[$0 + 4 >> 2];\n      memcpy(HEAP32[($9 + $8 | 0) + 4 >> 2] + (HEAP32[$8 + 7052 >> 2] << 2) | 0, $12 + ($7 << 2) | 0, $5);\n      $3 = $3 + 1 | 0;\n      if (($10 | 0) != ($3 | 0)) {\n       continue\n      }\n      break;\n     };\n    }\n    $5 = HEAP32[$0 >> 2];\n    label$8 : {\n     if (HEAP32[$5 + 16 >> 2]) {\n      $4 = HEAP32[$0 + 4 >> 2];\n      if ($7 >>> 0 >= $2 >>> 0) {\n       break label$8\n      }\n      $3 = HEAP32[$4 + 7052 >> 2];\n      if ($3 >>> 0 > $11 >>> 0) {\n       break label$8\n      }\n      $8 = HEAP32[$4 + 40 >> 2];\n      $12 = HEAP32[$4 + 36 >> 2];\n      $17 = HEAP32[$1 + 4 >> 2];\n      $18 = HEAP32[$1 >> 2];\n      while (1) {\n       $14 = $3 << 2;\n       $9 = $7 << 2;\n       $15 = $9 + $18 | 0;\n       $9 = $9 + $17 | 0;\n       HEAP32[$14 + $8 >> 2] = HEAP32[$15 >> 2] - HEAP32[$9 >> 2];\n       HEAP32[$12 + $14 >> 2] = HEAP32[$9 >> 2] + HEAP32[$15 >> 2] >> 1;\n       $7 = $7 + 1 | 0;\n       if ($7 >>> 0 >= $2 >>> 0) {\n        break label$8\n       }\n       $3 = $3 + 1 | 0;\n       if ($3 >>> 0 <= $11 >>> 0) {\n        continue\n       }\n       break;\n      };\n      break label$8;\n     }\n     $7 = $7 + $6 | 0;\n     $4 = HEAP32[$0 + 4 >> 2];\n    }\n    $3 = HEAP32[$4 + 7052 >> 2] + $6 | 0;\n    HEAP32[$4 + 7052 >> 2] = $3;\n    if ($3 >>> 0 > $11 >>> 0) {\n     $4 = 0;\n     if (!process_frame_($0, 0, 0)) {\n      break label$1\n     }\n     if ($10) {\n      $4 = HEAP32[$0 + 4 >> 2];\n      $3 = 0;\n      while (1) {\n       $6 = HEAP32[($4 + ($3 << 2) | 0) + 4 >> 2];\n       HEAP32[$6 >> 2] = HEAP32[$6 + $13 >> 2];\n       $3 = $3 + 1 | 0;\n       if (($10 | 0) != ($3 | 0)) {\n        continue\n       }\n       break;\n      };\n     }\n     $4 = HEAP32[$0 + 4 >> 2];\n     $5 = HEAP32[$0 >> 2];\n     if (HEAP32[$5 + 16 >> 2]) {\n      $3 = HEAP32[$4 + 36 >> 2];\n      HEAP32[$3 >> 2] = HEAP32[$3 + $13 >> 2];\n      $3 = HEAP32[$4 + 40 >> 2];\n      HEAP32[$3 >> 2] = HEAP32[$3 + $13 >> 2];\n     }\n     HEAP32[$4 + 7052 >> 2] = 1;\n    }\n    if ($7 >>> 0 < $2 >>> 0) {\n     continue\n    }\n    break;\n   };\n   $4 = 1;\n  }\n  return $4 | 0;\n }\n \n function FLAC__stream_encoder_process_interleaved($0, $1, $2) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0;\n  $3 = HEAP32[$0 >> 2];\n  $9 = HEAP32[$3 + 36 >> 2];\n  $16 = $9 + 1 | 0;\n  label$1 : {\n   label$2 : {\n    $10 = HEAP32[$3 + 24 >> 2];\n    if (!(!HEAP32[$3 + 16 >> 2] | ($10 | 0) != 2)) {\n     while (1) {\n      $4 = HEAP32[$0 + 4 >> 2];\n      if (HEAP32[$3 + 4 >> 2]) {\n       $3 = HEAP32[$4 + 11800 >> 2];\n       $5 = $16 - HEAP32[$4 + 7052 >> 2] | 0;\n       $6 = $2 - $7 | 0;\n       $8 = $5 >>> 0 < $6 >>> 0 ? $5 : $6;\n       label$6 : {\n        if (!$8) {\n         break label$6\n        }\n        if (!$10) {\n         $3 = $3 + $8 | 0;\n         break label$6;\n        }\n        $5 = $7 << 1;\n        $11 = HEAP32[$4 + 11768 >> 2];\n        $15 = HEAP32[$4 + 11764 >> 2];\n        $6 = 0;\n        while (1) {\n         $13 = $3 << 2;\n         $14 = $5 << 2;\n         HEAP32[$13 + $15 >> 2] = HEAP32[$14 + $1 >> 2];\n         HEAP32[$11 + $13 >> 2] = HEAP32[($14 | 4) + $1 >> 2];\n         $3 = $3 + 1 | 0;\n         $5 = $5 + 2 | 0;\n         $6 = $6 + 1 | 0;\n         if (($8 | 0) != ($6 | 0)) {\n          continue\n         }\n         break;\n        };\n       }\n       HEAP32[$4 + 11800 >> 2] = $3;\n      }\n      $5 = $7 >>> 0 < $2 >>> 0;\n      $3 = HEAP32[$4 + 7052 >> 2];\n      label$9 : {\n       if ($3 >>> 0 > $9 >>> 0 | $7 >>> 0 >= $2 >>> 0) {\n        break label$9\n       }\n       $11 = HEAP32[$4 + 40 >> 2];\n       $15 = HEAP32[$4 + 8 >> 2];\n       $13 = HEAP32[$4 + 36 >> 2];\n       $14 = HEAP32[$4 + 4 >> 2];\n       while (1) {\n        $5 = $3 << 2;\n        $8 = ($12 << 2) + $1 | 0;\n        $6 = HEAP32[$8 >> 2];\n        HEAP32[$5 + $14 >> 2] = $6;\n        $8 = HEAP32[$8 + 4 >> 2];\n        HEAP32[$5 + $15 >> 2] = $8;\n        HEAP32[$5 + $11 >> 2] = $6 - $8;\n        HEAP32[$5 + $13 >> 2] = $6 + $8 >> 1;\n        $3 = $3 + 1 | 0;\n        $12 = $12 + 2 | 0;\n        $7 = $7 + 1 | 0;\n        $5 = $7 >>> 0 < $2 >>> 0;\n        if ($7 >>> 0 >= $2 >>> 0) {\n         break label$9\n        }\n        if ($3 >>> 0 <= $9 >>> 0) {\n         continue\n        }\n        break;\n       };\n      }\n      HEAP32[$4 + 7052 >> 2] = $3;\n      if ($3 >>> 0 > $9 >>> 0) {\n       $3 = 0;\n       if (!process_frame_($0, 0, 0)) {\n        break label$1\n       }\n       $3 = HEAP32[$0 + 4 >> 2];\n       $6 = HEAP32[$3 + 4 >> 2];\n       $4 = $6;\n       $6 = $9 << 2;\n       HEAP32[$4 >> 2] = HEAP32[$4 + $6 >> 2];\n       $4 = HEAP32[$3 + 8 >> 2];\n       HEAP32[$4 >> 2] = HEAP32[$4 + $6 >> 2];\n       $4 = HEAP32[$3 + 36 >> 2];\n       HEAP32[$4 >> 2] = HEAP32[$4 + $6 >> 2];\n       $4 = HEAP32[$3 + 40 >> 2];\n       HEAP32[$4 >> 2] = HEAP32[$4 + $6 >> 2];\n       HEAP32[$3 + 7052 >> 2] = 1;\n      }\n      if (!$5) {\n       break label$2\n      }\n      $3 = HEAP32[$0 >> 2];\n      continue;\n     }\n    }\n    while (1) {\n     $7 = HEAP32[$0 + 4 >> 2];\n     if (HEAP32[$3 + 4 >> 2]) {\n      $6 = HEAP32[$7 + 11800 >> 2];\n      $3 = $16 - HEAP32[$7 + 7052 >> 2] | 0;\n      $5 = $2 - $4 | 0;\n      $8 = $3 >>> 0 < $5 >>> 0 ? $3 : $5;\n      label$14 : {\n       if (!$8) {\n        break label$14\n       }\n       if (!$10) {\n        $6 = $6 + $8 | 0;\n        break label$14;\n       }\n       $5 = Math_imul($4, $10);\n       $11 = 0;\n       while (1) {\n        $3 = 0;\n        while (1) {\n         HEAP32[HEAP32[($7 + ($3 << 2) | 0) + 11764 >> 2] + ($6 << 2) >> 2] = HEAP32[($5 << 2) + $1 >> 2];\n         $5 = $5 + 1 | 0;\n         $3 = $3 + 1 | 0;\n         if (($10 | 0) != ($3 | 0)) {\n          continue\n         }\n         break;\n        };\n        $6 = $6 + 1 | 0;\n        $11 = $11 + 1 | 0;\n        if (($8 | 0) != ($11 | 0)) {\n         continue\n        }\n        break;\n       };\n      }\n      HEAP32[$7 + 11800 >> 2] = $6;\n     }\n     $6 = $4 >>> 0 < $2 >>> 0;\n     $5 = HEAP32[$7 + 7052 >> 2];\n     label$18 : {\n      if ($5 >>> 0 > $9 >>> 0 | $4 >>> 0 >= $2 >>> 0) {\n       break label$18\n      }\n      if ($10) {\n       while (1) {\n        $3 = 0;\n        while (1) {\n         HEAP32[HEAP32[($7 + ($3 << 2) | 0) + 4 >> 2] + ($5 << 2) >> 2] = HEAP32[($12 << 2) + $1 >> 2];\n         $12 = $12 + 1 | 0;\n         $3 = $3 + 1 | 0;\n         if (($10 | 0) != ($3 | 0)) {\n          continue\n         }\n         break;\n        };\n        $5 = $5 + 1 | 0;\n        $4 = $4 + 1 | 0;\n        $6 = $4 >>> 0 < $2 >>> 0;\n        if ($4 >>> 0 >= $2 >>> 0) {\n         break label$18\n        }\n        if ($5 >>> 0 <= $9 >>> 0) {\n         continue\n        }\n        break label$18;\n       }\n      }\n      while (1) {\n       $5 = $5 + 1 | 0;\n       $4 = $4 + 1 | 0;\n       $6 = $4 >>> 0 < $2 >>> 0;\n       if ($4 >>> 0 >= $2 >>> 0) {\n        break label$18\n       }\n       if ($5 >>> 0 <= $9 >>> 0) {\n        continue\n       }\n       break;\n      };\n     }\n     HEAP32[$7 + 7052 >> 2] = $5;\n     if ($5 >>> 0 > $9 >>> 0) {\n      $3 = 0;\n      if (!process_frame_($0, 0, 0)) {\n       break label$1\n      }\n      $5 = HEAP32[$0 + 4 >> 2];\n      if ($10) {\n       $3 = 0;\n       while (1) {\n        $7 = HEAP32[($5 + ($3 << 2) | 0) + 4 >> 2];\n        HEAP32[$7 >> 2] = HEAP32[$7 + ($9 << 2) >> 2];\n        $3 = $3 + 1 | 0;\n        if (($10 | 0) != ($3 | 0)) {\n         continue\n        }\n        break;\n       };\n      }\n      HEAP32[$5 + 7052 >> 2] = 1;\n     }\n     if (!$6) {\n      break label$2\n     }\n     $3 = HEAP32[$0 >> 2];\n     continue;\n    };\n   }\n   $3 = 1;\n  }\n  return $3 | 0;\n }\n \n function find_best_partition_order_($0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) {\n  var $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0;\n  $26 = $4 + $5 | 0;\n  $14 = FLAC__format_get_max_rice_partition_order_from_blocksize_limited_max_and_predictor_order($9, $26, $5);\n  $22 = $14 >>> 0 > $8 >>> 0 ? $8 : $14;\n  FUNCTION_TABLE[HEAP32[$0 + 7220 >> 2]]($1, $2, $4, $5, $22, $14, $10);\n  label$1 : {\n   if (!$11) {\n    break label$1\n   }\n   $10 = 0;\n   $8 = 0;\n   if (($14 | 0) >= 0) {\n    $8 = 1 << $14;\n    $20 = $8 >>> 0 > 1 ? $8 : 1;\n    $16 = $26 >>> $14 | 0;\n    while (1) {\n     $17 = 0;\n     $9 = $13;\n     $18 = 0;\n     $27 = ($15 << 2) + $3 | 0;\n     label$4 : {\n      label$5 : {\n       $23 = $15 ? 0 : $5;\n       $19 = $16 - $23 | 0;\n       if (!$19) {\n        break label$5\n       }\n       while (1) {\n        $21 = $17;\n        $17 = HEAP32[($9 << 2) + $1 >> 2];\n        $17 = $21 | $17 >> 31 ^ $17;\n        $9 = $9 + 1 | 0;\n        $18 = $18 + 1 | 0;\n        if (($19 | 0) != ($18 | 0)) {\n         continue\n        }\n        break;\n       };\n       $13 = ($13 + $16 | 0) - $23 | 0;\n       if (!$17) {\n        break label$5\n       }\n       $9 = (Math_clz32($17) ^ 31) + 2 | 0;\n       break label$4;\n      }\n      $9 = 1;\n     }\n     HEAP32[$27 >> 2] = $9;\n     $15 = $15 + 1 | 0;\n     if (($20 | 0) != ($15 | 0)) {\n      continue\n     }\n     break;\n    };\n   }\n   if (($14 | 0) <= ($22 | 0)) {\n    break label$1\n   }\n   $1 = $14;\n   while (1) {\n    $1 = $1 + -1 | 0;\n    $9 = 0;\n    while (1) {\n     $13 = ($10 << 2) + $3 | 0;\n     $15 = HEAP32[$13 >> 2];\n     $13 = HEAP32[$13 + 4 >> 2];\n     HEAP32[($8 << 2) + $3 >> 2] = $15 >>> 0 > $13 >>> 0 ? $15 : $13;\n     $8 = $8 + 1 | 0;\n     $10 = $10 + 2 | 0;\n     $9 = $9 + 1 | 0;\n     if (!($9 >>> $1)) {\n      continue\n     }\n     break;\n    };\n    if (($1 | 0) > ($22 | 0)) {\n     continue\n    }\n    break;\n   };\n  }\n  label$9 : {\n   if (($14 | 0) < ($22 | 0)) {\n    HEAP32[$12 + 4 >> 2] = 0;\n    $2 = 6;\n    break label$9;\n   }\n   $28 = HEAP32[1407];\n   $40 = $28 + (Math_imul($6 + 1 | 0, $4) - ($4 >>> 1 | 0) | 0) | 0;\n   $35 = $7 + -1 | 0;\n   $36 = HEAP32[1409] + HEAP32[1408] | 0;\n   $23 = HEAP32[1406] + HEAP32[1405] | 0;\n   $27 = $6 + -1 | 0;\n   while (1) {\n    label$12 : {\n     $20 = $14;\n     $37 = !$29;\n     $1 = Math_imul($37, 12) + $0 | 0;\n     $8 = $1 + 11724 | 0;\n     FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size($8, $14 >>> 0 > 6 ? $14 : 6);\n     $38 = ($30 << 2) + $3 | 0;\n     $25 = ($30 << 3) + $2 | 0;\n     $39 = HEAP32[$1 + 11728 >> 2];\n     $31 = HEAP32[$8 >> 2];\n     label$13 : {\n      if ($14) {\n       $32 = $26 >>> $20 | 0;\n       if ($32 >>> 0 <= $5 >>> 0) {\n        break label$12\n       }\n       $18 = 0;\n       $33 = 0;\n       $21 = $23;\n       if (!$11) {\n        while (1) {\n         $17 = $32 - ($18 ? 0 : $5) | 0;\n         $1 = $25 + ($18 << 3) | 0;\n         $13 = HEAP32[$1 + 4 >> 2];\n         $16 = HEAP32[$1 >> 2];\n         label$17 : {\n          if (!$13 & $16 >>> 0 >= 268435457 | $13 >>> 0 > 0) {\n           $1 = $17;\n           $10 = 0;\n           $8 = 0;\n           label$19 : {\n            if (($13 | 0) == 16777216 & $16 >>> 0 > 0 | $13 >>> 0 > 16777216) {\n             $14 = $1;\n             $9 = 0;\n             break label$19;\n            }\n            $14 = $1;\n            $9 = 0;\n            $15 = $1 >>> 25 | 0;\n            $19 = $1 << 7;\n            if (($13 | 0) == ($15 | 0) & $19 >>> 0 >= $16 >>> 0 | $15 >>> 0 > $13 >>> 0) {\n             break label$19\n            }\n            while (1) {\n             $8 = $8 + 8 | 0;\n             $15 = $10 << 15 | $1 >>> 17;\n             $19 = $1 << 15;\n             $9 = $10 << 8 | $1 >>> 24;\n             $14 = $1 << 8;\n             $1 = $14;\n             $10 = $9;\n             if (($13 | 0) == ($15 | 0) & $19 >>> 0 < $16 >>> 0 | $15 >>> 0 < $13 >>> 0) {\n              continue\n             }\n             break;\n            };\n           }\n           if (($9 | 0) == ($13 | 0) & $14 >>> 0 >= $16 >>> 0 | $9 >>> 0 > $13 >>> 0) {\n            break label$17\n           }\n           while (1) {\n            $8 = $8 + 1 | 0;\n            $1 = $14;\n            $15 = $9 << 1 | $1 >>> 31;\n            $14 = $1 << 1;\n            $1 = $14;\n            $9 = $15;\n            if (($13 | 0) == ($9 | 0) & $1 >>> 0 < $16 >>> 0 | $9 >>> 0 < $13 >>> 0) {\n             continue\n            }\n            break;\n           };\n           break label$17;\n          }\n          $8 = 0;\n          $10 = $17;\n          $1 = $16;\n          if ($10 << 3 >>> 0 < $1 >>> 0) {\n           while (1) {\n            $8 = $8 + 4 | 0;\n            $9 = $10 << 7;\n            $10 = $10 << 4;\n            if ($9 >>> 0 < $1 >>> 0) {\n             continue\n            }\n            break;\n           }\n          }\n          if ($10 >>> 0 >= $1 >>> 0) {\n           break label$17\n          }\n          while (1) {\n           $8 = $8 + 1 | 0;\n           $10 = $10 << 1;\n           if ($10 >>> 0 < $1 >>> 0) {\n            continue\n           }\n           break;\n          };\n         }\n         $8 = $8 >>> 0 < $7 >>> 0 ? $8 : $35;\n         $10 = $8 + -1 | 0;\n         $1 = $10 & 31;\n         $1 = (($28 - ($17 >>> 1 | 0) | 0) + Math_imul($17, $8 + 1 | 0) | 0) + ($8 ? (32 <= ($10 & 63) >>> 0 ? $13 >>> $1 | 0 : ((1 << $1) - 1 & $13) << 32 - $1 | $16 >>> $1) : $16 << 1) | 0;\n         $33 = ($1 | 0) == -1 ? $33 : $8;\n         HEAP32[$31 + ($18 << 2) >> 2] = $33;\n         $21 = $1 + $21 | 0;\n         $18 = $18 + 1 | 0;\n         if (!($18 >>> $20)) {\n          continue\n         }\n         break label$13;\n        }\n       }\n       while (1) {\n        $17 = $32 - ($18 ? 0 : $5) | 0;\n        $1 = $25 + ($18 << 3) | 0;\n        $13 = HEAP32[$1 + 4 >> 2];\n        $16 = HEAP32[$1 >> 2];\n        label$27 : {\n         label$28 : {\n          if (!$13 & $16 >>> 0 >= 268435457 | $13 >>> 0 > 0) {\n           $1 = $17;\n           $10 = 0;\n           $8 = 0;\n           if (($13 | 0) == 16777216 & $16 >>> 0 > 0 | $13 >>> 0 > 16777216) {\n            break label$28\n           }\n           $14 = $1;\n           $9 = 0;\n           $15 = $1 >>> 25 | 0;\n           $19 = $1 << 7;\n           if (($13 | 0) == ($15 | 0) & $19 >>> 0 >= $16 >>> 0 | $15 >>> 0 > $13 >>> 0) {\n            break label$28\n           }\n           while (1) {\n            $8 = $8 + 8 | 0;\n            $1 = $9;\n            $10 = $14;\n            $15 = $1 << 15 | $10 >>> 17;\n            $19 = $10 << 15;\n            $9 = $1 << 8;\n            $1 = $10;\n            $9 = $9 | $1 >>> 24;\n            $1 = $1 << 8;\n            $14 = $1;\n            $10 = $9;\n            if (($13 | 0) == ($15 | 0) & $19 >>> 0 < $16 >>> 0 | $15 >>> 0 < $13 >>> 0) {\n             continue\n            }\n            break;\n           };\n           break label$28;\n          }\n          $8 = 0;\n          $10 = $17;\n          $1 = $16;\n          if ($10 << 3 >>> 0 < $1 >>> 0) {\n           while (1) {\n            $8 = $8 + 4 | 0;\n            $9 = $10 << 7;\n            $10 = $10 << 4;\n            if ($9 >>> 0 < $1 >>> 0) {\n             continue\n            }\n            break;\n           }\n          }\n          if ($10 >>> 0 >= $1 >>> 0) {\n           break label$27\n          }\n          while (1) {\n           $8 = $8 + 1 | 0;\n           $10 = $10 << 1;\n           if ($10 >>> 0 < $1 >>> 0) {\n            continue\n           }\n           break;\n          };\n          break label$27;\n         }\n         if (($10 | 0) == ($13 | 0) & $1 >>> 0 >= $16 >>> 0 | $10 >>> 0 > $13 >>> 0) {\n          break label$27\n         }\n         while (1) {\n          $8 = $8 + 1 | 0;\n          $15 = $10 << 1 | $1 >>> 31;\n          $1 = $1 << 1;\n          $10 = $15;\n          if (($13 | 0) == ($10 | 0) & $1 >>> 0 < $16 >>> 0 | $10 >>> 0 < $13 >>> 0) {\n           continue\n          }\n          break;\n         };\n        }\n        $9 = $18 << 2;\n        $1 = HEAP32[$9 + $38 >> 2];\n        $19 = $1;\n        $10 = Math_imul($1, $17) + $36 | 0;\n        $8 = $8 >>> 0 < $7 >>> 0 ? $8 : $35;\n        $15 = $8 + -1 | 0;\n        $1 = $15 & 31;\n        $14 = (($28 - ($17 >>> 1 | 0) | 0) + Math_imul($17, $8 + 1 | 0) | 0) + ($8 ? (32 <= ($15 & 63) >>> 0 ? $13 >>> $1 | 0 : ((1 << $1) - 1 & $13) << 32 - $1 | $16 >>> $1) : $16 << 1) | 0;\n        $1 = $10 >>> 0 > $14 >>> 0;\n        HEAP32[$9 + $39 >> 2] = $1 ? 0 : $19;\n        HEAP32[$9 + $31 >> 2] = $1 ? $8 : 0;\n        $21 = ($1 ? $14 : $10) + $21 | 0;\n        $18 = $18 + 1 | 0;\n        if (!($18 >>> $20)) {\n         continue\n        }\n        break;\n       };\n       break label$13;\n      }\n      $9 = HEAP32[$25 + 4 >> 2];\n      $1 = $27;\n      $8 = $1 & 31;\n      $10 = HEAP32[$25 >> 2];\n      $8 = ($6 ? (32 <= ($1 & 63) >>> 0 ? $9 >>> $8 | 0 : ((1 << $8) - 1 & $9) << 32 - $8 | $10 >>> $8) : $10 << 1) + $40 | 0;\n      $10 = ($8 | 0) == -1 ? 0 : $6;\n      if ($11) {\n       $9 = HEAP32[$38 >> 2];\n       $14 = Math_imul($9, $4) + $36 | 0;\n       $1 = $14 >>> 0 > $8 >>> 0;\n       HEAP32[$39 >> 2] = $1 ? 0 : $9;\n       $10 = $1 ? $10 : 0;\n       $8 = $1 ? $8 : $14;\n      }\n      HEAP32[$31 >> 2] = $10;\n      $21 = $8 + $23 | 0;\n     }\n     $1 = $34 + -1 >>> 0 < $21 >>> 0;\n     $24 = $1 ? $24 : $20;\n     $29 = $1 ? $29 : $37;\n     $34 = $1 ? $34 : $21;\n     $14 = $20 + -1 | 0;\n     $30 = (1 << $20) + $30 | 0;\n     if (($20 | 0) > ($22 | 0)) {\n      continue\n     }\n    }\n    break;\n   };\n   HEAP32[$12 + 4 >> 2] = $24;\n   $2 = $24 >>> 0 > 6 ? $24 : 6;\n  }\n  $1 = HEAP32[$12 + 8 >> 2];\n  FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_size($1, $2);\n  $2 = Math_imul($29, 12) + $0 | 0;\n  $0 = 1 << $24;\n  $3 = $0 << 2;\n  memcpy(HEAP32[$1 >> 2], HEAP32[$2 + 11724 >> 2], $3);\n  if ($11) {\n   memcpy(HEAP32[$1 + 4 >> 2], HEAP32[$2 + 11728 >> 2], $3)\n  }\n  $0 = $0 >>> 0 > 1 ? $0 : 1;\n  $2 = HEAP32[1410];\n  $1 = HEAP32[$1 >> 2];\n  $8 = 0;\n  label$37 : {\n   while (1) {\n    if (HEAPU32[$1 + ($8 << 2) >> 2] < $2 >>> 0) {\n     $8 = $8 + 1 | 0;\n     if (($0 | 0) != ($8 | 0)) {\n      continue\n     }\n     break label$37;\n    }\n    break;\n   };\n   HEAP32[$12 >> 2] = 1;\n  }\n  return $34;\n }\n \n function stackSave() {\n  return global$0 | 0;\n }\n \n function stackRestore($0) {\n  $0 = $0 | 0;\n  global$0 = $0;\n }\n \n function stackAlloc($0) {\n  $0 = $0 | 0;\n  $0 = global$0 - $0 & -16;\n  global$0 = $0;\n  return $0 | 0;\n }\n \n function __growWasmMemory($0) {\n  $0 = $0 | 0;\n  return __wasm_memory_grow($0 | 0) | 0;\n }\n \n function dynCall_iii($0, $1, $2) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  return FUNCTION_TABLE[$0]($1, $2) | 0;\n }\n \n function dynCall_ii($0, $1) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  return FUNCTION_TABLE[$0]($1) | 0;\n }\n \n function dynCall_iiii($0, $1, $2, $3) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  return FUNCTION_TABLE[$0]($1, $2, $3) | 0;\n }\n \n function dynCall_viiiiii($0, $1, $2, $3, $4, $5, $6) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  $4 = $4 | 0;\n  $5 = $5 | 0;\n  $6 = $6 | 0;\n  FUNCTION_TABLE[$0]($1, $2, $3, $4, $5, $6);\n }\n \n function dynCall_iiiii($0, $1, $2, $3, $4) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  $4 = $4 | 0;\n  return FUNCTION_TABLE[$0]($1, $2, $3, $4) | 0;\n }\n \n function dynCall_viiiiiii($0, $1, $2, $3, $4, $5, $6, $7) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  $4 = $4 | 0;\n  $5 = $5 | 0;\n  $6 = $6 | 0;\n  $7 = $7 | 0;\n  FUNCTION_TABLE[$0]($1, $2, $3, $4, $5, $6, $7);\n }\n \n function dynCall_viiii($0, $1, $2, $3, $4) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  $4 = $4 | 0;\n  FUNCTION_TABLE[$0]($1, $2, $3, $4);\n }\n \n function dynCall_viii($0, $1, $2, $3) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  FUNCTION_TABLE[$0]($1, $2, $3);\n }\n \n function legalstub$FLAC__stream_encoder_set_total_samples_estimate($0, $1, $2) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  return FLAC__stream_encoder_set_total_samples_estimate($0, $1, $2) | 0;\n }\n \n function legalstub$dynCall_jiji($0, $1, $2, $3, $4) {\n  $0 = $0 | 0;\n  $1 = $1 | 0;\n  $2 = $2 | 0;\n  $3 = $3 | 0;\n  $4 = $4 | 0;\n  $0 = FUNCTION_TABLE[$0]($1, $2, $3, $4) | 0;\n  setTempRet0(i64toi32_i32$HIGH_BITS | 0);\n  return $0 | 0;\n }\n \n function _ZN17compiler_builtins3int3mul3Mul3mul17h070e9a1c69faec5bE($0, $1, $2, $3) {\n  var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;\n  $4 = $2 >>> 16 | 0;\n  $5 = $0 >>> 16 | 0;\n  $9 = Math_imul($4, $5);\n  $6 = $2 & 65535;\n  $7 = $0 & 65535;\n  $8 = Math_imul($6, $7);\n  $5 = ($8 >>> 16 | 0) + Math_imul($5, $6) | 0;\n  $4 = ($5 & 65535) + Math_imul($4, $7) | 0;\n  $0 = (Math_imul($1, $2) + $9 | 0) + Math_imul($0, $3) + ($5 >>> 16) + ($4 >>> 16) | 0;\n  $1 = $8 & 65535 | $4 << 16;\n  i64toi32_i32$HIGH_BITS = $0;\n  return $1;\n }\n \n function _ZN17compiler_builtins3int4udiv10divmod_u6417h6026910b5ed08e40E($0, $1, $2) {\n  var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $10 = 0, $11 = 0;\n  label$1 : {\n   label$2 : {\n    label$3 : {\n     label$4 : {\n      label$5 : {\n       label$6 : {\n        label$7 : {\n         label$9 : {\n          label$11 : {\n           $3 = $1;\n           if ($3) {\n            $4 = $2;\n            if (!$4) {\n             break label$11\n            }\n            break label$9;\n           }\n           $1 = $0;\n           $0 = ($0 >>> 0) / ($2 >>> 0) | 0;\n           __wasm_intrinsics_temp_i64 = $1 - Math_imul($0, $2) | 0;\n           __wasm_intrinsics_temp_i64$hi = 0;\n           i64toi32_i32$HIGH_BITS = 0;\n           return $0;\n          }\n          if (!$0) {\n           break label$7\n          }\n          break label$6;\n         }\n         $6 = $4 + -1 | 0;\n         if (!($6 & $4)) {\n          break label$5\n         }\n         $6 = (Math_clz32($4) + 33 | 0) - Math_clz32($3) | 0;\n         $7 = 0 - $6 | 0;\n         break label$3;\n        }\n        __wasm_intrinsics_temp_i64 = 0;\n        $0 = ($3 >>> 0) / 0 | 0;\n        __wasm_intrinsics_temp_i64$hi = $3 - Math_imul($0, 0) | 0;\n        i64toi32_i32$HIGH_BITS = 0;\n        return $0;\n       }\n       $3 = 32 - Math_clz32($3) | 0;\n       if ($3 >>> 0 < 31) {\n        break label$4\n       }\n       break label$2;\n      }\n      __wasm_intrinsics_temp_i64 = $0 & $6;\n      __wasm_intrinsics_temp_i64$hi = 0;\n      if (($4 | 0) == 1) {\n       break label$1\n      }\n      $3 = __wasm_ctz_i32($4);\n      $2 = $3 & 31;\n      if (32 <= ($3 & 63) >>> 0) {\n       $4 = 0;\n       $0 = $1 >>> $2 | 0;\n      } else {\n       $4 = $1 >>> $2 | 0;\n       $0 = ((1 << $2) - 1 & $1) << 32 - $2 | $0 >>> $2;\n      }\n      i64toi32_i32$HIGH_BITS = $4;\n      return $0;\n     }\n     $6 = $3 + 1 | 0;\n     $7 = 63 - $3 | 0;\n    }\n    $3 = $1;\n    $4 = $6 & 63;\n    $5 = $4 & 31;\n    if (32 <= $4 >>> 0) {\n     $4 = 0;\n     $5 = $3 >>> $5 | 0;\n    } else {\n     $4 = $3 >>> $5 | 0;\n     $5 = ((1 << $5) - 1 & $3) << 32 - $5 | $0 >>> $5;\n    }\n    $7 = $7 & 63;\n    $3 = $7 & 31;\n    if (32 <= $7 >>> 0) {\n     $1 = $0 << $3;\n     $0 = 0;\n    } else {\n     $1 = (1 << $3) - 1 & $0 >>> 32 - $3 | $1 << $3;\n     $0 = $0 << $3;\n    }\n    if ($6) {\n     $7 = -1;\n     $3 = $2 + -1 | 0;\n     if (($3 | 0) != -1) {\n      $7 = 0\n     }\n     while (1) {\n      $8 = $5 << 1 | $1 >>> 31;\n      $9 = $8;\n      $4 = $4 << 1 | $5 >>> 31;\n      $8 = $7 - ($4 + ($3 >>> 0 < $8 >>> 0) | 0) >> 31;\n      $10 = $2 & $8;\n      $5 = $9 - $10 | 0;\n      $4 = $4 - ($9 >>> 0 < $10 >>> 0) | 0;\n      $1 = $1 << 1 | $0 >>> 31;\n      $0 = $11 | $0 << 1;\n      $8 = $8 & 1;\n      $11 = $8;\n      $6 = $6 + -1 | 0;\n      if ($6) {\n       continue\n      }\n      break;\n     };\n    }\n    __wasm_intrinsics_temp_i64 = $5;\n    __wasm_intrinsics_temp_i64$hi = $4;\n    i64toi32_i32$HIGH_BITS = $1 << 1 | $0 >>> 31;\n    return $8 | $0 << 1;\n   }\n   __wasm_intrinsics_temp_i64 = $0;\n   __wasm_intrinsics_temp_i64$hi = $1;\n   $0 = 0;\n   $1 = 0;\n  }\n  i64toi32_i32$HIGH_BITS = $1;\n  return $0;\n }\n \n function __wasm_ctz_i32($0) {\n  if ($0) {\n   return 31 - Math_clz32($0 + -1 ^ $0) | 0\n  }\n  return 32;\n }\n \n function __wasm_i64_mul($0, $1, $2, $3) {\n  $0 = _ZN17compiler_builtins3int3mul3Mul3mul17h070e9a1c69faec5bE($0, $1, $2, $3);\n  return $0;\n }\n \n function __wasm_i64_udiv($0, $1, $2) {\n  return _ZN17compiler_builtins3int4udiv10divmod_u6417h6026910b5ed08e40E($0, $1, $2);\n }\n \n function __wasm_i64_urem($0, $1) {\n  _ZN17compiler_builtins3int4udiv10divmod_u6417h6026910b5ed08e40E($0, $1, 588);\n  i64toi32_i32$HIGH_BITS = __wasm_intrinsics_temp_i64$hi;\n  return __wasm_intrinsics_temp_i64;\n }\n \n function __wasm_rotl_i32($0, $1) {\n  var $2 = 0, $3 = 0;\n  $2 = $1 & 31;\n  $3 = (-1 >>> $2 & $0) << $2;\n  $2 = $0;\n  $0 = 0 - $1 & 31;\n  return $3 | ($2 & -1 << $0) >>> $0;\n }\n \n // EMSCRIPTEN_END_FUNCS\n;\n FUNCTION_TABLE[1] = seekpoint_compare_;\n FUNCTION_TABLE[2] = __stdio_close;\n FUNCTION_TABLE[3] = __stdio_read;\n FUNCTION_TABLE[4] = __stdio_seek;\n FUNCTION_TABLE[5] = FLAC__lpc_restore_signal;\n FUNCTION_TABLE[6] = FLAC__lpc_restore_signal_wide;\n FUNCTION_TABLE[7] = read_callback_;\n FUNCTION_TABLE[8] = read_callback_proxy_;\n FUNCTION_TABLE[9] = __emscripten_stdout_close;\n FUNCTION_TABLE[10] = __stdio_write;\n FUNCTION_TABLE[11] = __emscripten_stdout_seek;\n FUNCTION_TABLE[12] = FLAC__lpc_compute_residual_from_qlp_coefficients;\n FUNCTION_TABLE[13] = FLAC__lpc_compute_residual_from_qlp_coefficients_wide;\n FUNCTION_TABLE[14] = FLAC__fixed_compute_best_predictor_wide;\n FUNCTION_TABLE[15] = FLAC__fixed_compute_best_predictor;\n FUNCTION_TABLE[16] = precompute_partition_info_sums_;\n FUNCTION_TABLE[17] = FLAC__lpc_compute_autocorrelation;\n FUNCTION_TABLE[18] = verify_read_callback_;\n FUNCTION_TABLE[19] = verify_write_callback_;\n FUNCTION_TABLE[20] = verify_metadata_callback_;\n FUNCTION_TABLE[21] = verify_error_callback_;\n function __wasm_memory_size() {\n  return buffer.byteLength / 65536 | 0;\n }\n \n function __wasm_memory_grow(pagesToAdd) {\n  pagesToAdd = pagesToAdd | 0;\n  var oldPages = __wasm_memory_size() | 0;\n  var newPages = oldPages + pagesToAdd | 0;\n  if ((oldPages < newPages) && (newPages < 65536)) {\n   var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));\n   var newHEAP8 = new global.Int8Array(newBuffer);\n   newHEAP8.set(HEAP8);\n   HEAP8 = newHEAP8;\n   HEAP8 = new global.Int8Array(newBuffer);\n   HEAP16 = new global.Int16Array(newBuffer);\n   HEAP32 = new global.Int32Array(newBuffer);\n   HEAPU8 = new global.Uint8Array(newBuffer);\n   HEAPU16 = new global.Uint16Array(newBuffer);\n   HEAPU32 = new global.Uint32Array(newBuffer);\n   HEAPF32 = new global.Float32Array(newBuffer);\n   HEAPF64 = new global.Float64Array(newBuffer);\n   buffer = newBuffer;\n   memory.buffer = newBuffer;\n  }\n  return oldPages;\n }\n \n return {\n  \"__wasm_call_ctors\": __wasm_call_ctors, \n  \"FLAC__stream_decoder_new\": FLAC__stream_decoder_new, \n  \"FLAC__stream_decoder_delete\": FLAC__stream_decoder_delete, \n  \"FLAC__stream_decoder_finish\": FLAC__stream_decoder_finish, \n  \"FLAC__stream_decoder_init_stream\": FLAC__stream_decoder_init_stream, \n  \"FLAC__stream_decoder_reset\": FLAC__stream_decoder_reset, \n  \"FLAC__stream_decoder_init_ogg_stream\": FLAC__stream_decoder_init_ogg_stream, \n  \"FLAC__stream_decoder_set_ogg_serial_number\": FLAC__stream_decoder_set_ogg_serial_number, \n  \"FLAC__stream_decoder_set_md5_checking\": FLAC__stream_decoder_set_md5_checking, \n  \"FLAC__stream_decoder_set_metadata_respond\": FLAC__stream_decoder_set_metadata_respond, \n  \"FLAC__stream_decoder_set_metadata_respond_application\": FLAC__stream_decoder_set_metadata_respond_application, \n  \"FLAC__stream_decoder_set_metadata_respond_all\": FLAC__stream_decoder_set_metadata_respond_all, \n  \"FLAC__stream_decoder_set_metadata_ignore\": FLAC__stream_decoder_set_metadata_ignore, \n  \"FLAC__stream_decoder_set_metadata_ignore_application\": FLAC__stream_decoder_set_metadata_ignore_application, \n  \"FLAC__stream_decoder_set_metadata_ignore_all\": FLAC__stream_decoder_set_metadata_ignore_all, \n  \"FLAC__stream_decoder_get_state\": FLAC__stream_decoder_get_state, \n  \"FLAC__stream_decoder_get_md5_checking\": FLAC__stream_decoder_get_md5_checking, \n  \"FLAC__stream_decoder_process_single\": FLAC__stream_decoder_process_single, \n  \"FLAC__stream_decoder_process_until_end_of_metadata\": FLAC__stream_decoder_process_until_end_of_metadata, \n  \"FLAC__stream_decoder_process_until_end_of_stream\": FLAC__stream_decoder_process_until_end_of_stream, \n  \"FLAC__stream_encoder_new\": FLAC__stream_encoder_new, \n  \"FLAC__stream_encoder_delete\": FLAC__stream_encoder_delete, \n  \"FLAC__stream_encoder_finish\": FLAC__stream_encoder_finish, \n  \"FLAC__stream_encoder_init_stream\": FLAC__stream_encoder_init_stream, \n  \"FLAC__stream_encoder_init_ogg_stream\": FLAC__stream_encoder_init_ogg_stream, \n  \"FLAC__stream_encoder_set_ogg_serial_number\": FLAC__stream_encoder_set_ogg_serial_number, \n  \"FLAC__stream_encoder_set_verify\": FLAC__stream_encoder_set_verify, \n  \"FLAC__stream_encoder_set_channels\": FLAC__stream_encoder_set_channels, \n  \"FLAC__stream_encoder_set_bits_per_sample\": FLAC__stream_encoder_set_bits_per_sample, \n  \"FLAC__stream_encoder_set_sample_rate\": FLAC__stream_encoder_set_sample_rate, \n  \"FLAC__stream_encoder_set_compression_level\": FLAC__stream_encoder_set_compression_level, \n  \"FLAC__stream_encoder_set_blocksize\": FLAC__stream_encoder_set_blocksize, \n  \"FLAC__stream_encoder_set_total_samples_estimate\": legalstub$FLAC__stream_encoder_set_total_samples_estimate, \n  \"FLAC__stream_encoder_set_metadata\": FLAC__stream_encoder_set_metadata, \n  \"FLAC__stream_encoder_get_state\": FLAC__stream_decoder_get_state, \n  \"FLAC__stream_encoder_get_verify_decoder_state\": FLAC__stream_encoder_get_verify_decoder_state, \n  \"FLAC__stream_encoder_get_verify\": FLAC__stream_encoder_get_verify, \n  \"FLAC__stream_encoder_process\": FLAC__stream_encoder_process, \n  \"FLAC__stream_encoder_process_interleaved\": FLAC__stream_encoder_process_interleaved, \n  \"__errno_location\": __errno_location, \n  \"stackSave\": stackSave, \n  \"stackRestore\": stackRestore, \n  \"stackAlloc\": stackAlloc, \n  \"malloc\": dlmalloc, \n  \"free\": dlfree, \n  \"__growWasmMemory\": __growWasmMemory, \n  \"dynCall_iii\": dynCall_iii, \n  \"dynCall_ii\": dynCall_ii, \n  \"dynCall_iiii\": dynCall_iiii, \n  \"dynCall_jiji\": legalstub$dynCall_jiji, \n  \"dynCall_viiiiii\": dynCall_viiiiii, \n  \"dynCall_iiiii\": dynCall_iiiii, \n  \"dynCall_viiiiiii\": dynCall_viiiiiii, \n  \"dynCall_viiii\": dynCall_viiii, \n  \"dynCall_viii\": dynCall_viii\n };\n}\n\nvar bufferView = new Uint8Array(wasmMemory.buffer);\nfor (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i) {\n    base64ReverseLookup[48+i] = 52+i; // '0-9'\n    base64ReverseLookup[65+i] = i; // 'A-Z'\n    base64ReverseLookup[97+i] = 26+i; // 'a-z'\n  }\n  base64ReverseLookup[43] = 62; // '+'\n  base64ReverseLookup[47] = 63; // '/'\n  /** @noinline Inlining this function would mean expanding the base64 string 4x times in the source code, which Closure seems to be happy to do. */\n  function base64DecodeToExistingUint8Array(uint8Array, offset, b64) {\n    var b1, b2, i = 0, j = offset, bLength = b64.length, end = offset + (bLength*3>>2) - (b64[bLength-2] == '=') - (b64[bLength-1] == '=');\n    for (; i < bLength; i += 4) {\n      b1 = base64ReverseLookup[b64.charCodeAt(i+1)];\n      b2 = base64ReverseLookup[b64.charCodeAt(i+2)];\n      uint8Array[j++] = base64ReverseLookup[b64.charCodeAt(i)] << 2 | b1 >> 4;\n      if (j < end) uint8Array[j++] = b1 << 4 | b2 >> 2;\n      if (j < end) uint8Array[j++] = b2 << 6 | base64ReverseLookup[b64.charCodeAt(i+3)];\n    } \n  }\n  base64DecodeToExistingUint8Array(bufferView, 1025, \"Bw4JHBsSFTg/NjEkIyotcHd+eWxrYmVIT0ZBVFNaXeDn7un8+/L12N/W0cTDys2Ql56ZjIuChaivpqG0s7q9x8DJztvc1dL/+PH24+Tt6rewub6rrKWij4iBhpOUnZonICkuOzw1Mh8YERYDBA0KV1BZXktMRUJvaGFmc3R9eomOh4CVkpucsba/uK2qo6T5/vfw5eLr7MHGz8jd2tPUaW5nYHVye3xRVl9YTUpDRBkeFxAFAgsMISYvKD06MzROSUBHUlVcW3ZxeH9qbWRjPjkwNyIlLCsGAQgPGh0UE66poKeytby7lpGYn4qNhIPe2dDXwsXMy+bh6O/6/fTzAAAFgA+ACgAbgB4AFAARgDOANgA8ADmAKAAtgCeAIgBjgGYAbABpgHgAfYB3gHIAUABVgF+AWgBLgE4ARABBgMOAxgDMAMmA2ADdgNeA0gDwAPWA/4D6AOuA7gDkAOGAoAClgK+AqgC7gL4AtACxgJOAlgCcAJmAiACNgIeAggCDgYYBjAGJgZgBnYGXgZIBsAG1gb+BugGrga4BpAGhgeAB5YHvgeoB+4H+AfQB8YHTgdYB3AHZgcgBzYHHgcIBQAFFgU+BSgFbgV4BVAFRgXOBdgF8AXmBaAFtgWeBYgEjgSYBLAEpgTgBPYE3gTIBEAEVgR+BGgELgQ4BBAEBgQODBgMMAwmDGAMdgxeDEgMwAzWDP4M6AyuDLgMkAyGDYANlg2+DagN7g34DdANxg1ODVgNcA1mDSANNg0eDQgPAA8WDz4PKA9uD3gPUA9GD84P2A/wD+YPoA+2D54PiA6ODpgOsA6mDuAO9g7eDsgOQA5WDn4OaA4uDjgOEA4GDgAKFgo+CigKbgp4ClAKRgrOCtgK8ArmCqAKtgqeCogLjguYC7ALpgvgC/YL3gvIC0ALVgt+C2gLLgs4CxALBgkOCRgJMAkmCWAJdgleCUgJwAnWCf4J6AmuCbgJkAmGCIAIlgi+CKgI7gj4CNAIxghOCFgIcAhmCCAINggeCAgIAAAOGA4wACgOYAB4AFAOSA7AANgA8A7oAKAOuA6QAIgPgAGYAbAPqAHgD/gP0AHIAUAPWA9wAWgPIAE4ARAPCA0AAxgDMA0oA2ANeA1QA0gDwA3YDfAD6A2gA7gDkA2IAoAMmAywAqgM4AL4AtAMyAxAAlgCcAxoAiAMOAwQAggaABQYFDAaKBRgGngaUBRIFMAa2BrwFOgaoBS4FJAaiBWAG5gbsBWoG+AV+BXQG8gbQBVYFXAbaBUgGzgbEBUIFwAZGBkwFygZYBd4F1AZSBnAF9gX8BnoF6AZuBmQF4gYgBaYFrAYqBbgGPgY0BbIFkAYWBhwFmgYIBY4FhAYCCYAKBgoMCYoKGAmeCZQKEgowCbYJvAo6CagKLgokCaIKYAnmCewKagn4Cn4KdAnyCdAKVgpcCdoKSAnOCcQKQgrACUYJTArKCVgK3grUCVIJcAr2CvwJegroCW4JZAriCSAKpgqsCSoKuAk+CTQKsgqQCRYJHAqaCQgKjgqECQIPAAyGDIwPCgyYDx4PFAySDLAPNg88DLoPKAyuDKQPIgzgD2YPbAzqD3gM/gz0D3IPUAzWDNwPWgzID04PRAzCDEAPxg/MDEoP2AxeDFQP0g/wDHYMfA/6DGgP7g/kDGIPoAwmDCwPqgw4D74PtAwyDBAPlg+cDBoPiAwODAQPggAAF4ArgDwAU4BEAHgAb4CjgLQAiACfgPAA54DbgMwAQ4FUAWgBf4EQAQeBO4EsAeAB94HLgdwBs4GkAZgBj4GDgpQCqAK/gtACx4L7guwCIAI3gguCHAJzgmQCWAJPgsAD14Prg/wDk4OEA7gDr4Njg3QDSANfgzADJ4MbgwwDA4UUBSgFP4VQBUeFe4VsBaAFt4WLhZwF84XkBdgFz4VABFeEa4R8BBOEBAQ4BC+E44T0BMgE34SwBKeEm4SMBIAHl4erh7wH04fEB/gH74cjhzQHCAcfh3AHZ4dbh0wHw4bUBugG/4aQBoeGu4asBmAGd4ZLhlwGM4YkBhgGD4YDihQKKAo/ilAKR4p7imwKoAq3iouKnArziuQK2ArPikALV4tri3wLE4sECzgLL4vji/QLyAvfi7ALp4ubi4wLgAiXiKuIvAjTiMQI+AjviCOINAgICB+IcAhniFuITAjDidQJ6An/iZAJh4m7iawJYAl3iUuJXAkziSQJGAkPiQAPF48rjzwPU49ED3gPb4+jj7QPiA+fj/AP54/bj8wPQ45UDmgOf44QDgeOO44sDuAO947LjtwOs46kDpgOj46DjZQNqA2/jdANx437jewNIA03jQuNHA1zjWQNWA1PjcAM14zrjPwMk4yEDLgMr4xjjHQMSAxfjDAMJ4wbjAwMAAADlAOoADwD0ABEAHgD7AMgALQAiAMcAPADZANYAMwGQAXUBegGfAWQBgQGOAWsBWAG9AbIBVwGsAUkBRgGjAyADxQPKAy8D1AMxAz4D2wPoAw0DAgPnAxwD+QP2AxMCsAJVAloCvwJEAqECrgJLAngCnQKSAncCjAJpAmYCgwdgB4UHigdvB5QHcQd+B5sHqAdNB0IHpwdcB7kHtgdTBvAGFQYaBv8GBAbhBu4GCwY4Bt0G0gY3BswGKQYmBsMEQASlBKoETwS0BFEEXgS7BIgEbQRiBIcEfASZBJYEcwXQBTUFOgXfBSQFwQXOBSsFGAX9BfIFFwXsBQkFBgXjD+APBQ8KD+8PFA/xD/4PGw8oD80Pwg8nD9wPOQ82D9MOcA6VDpoOfw6EDmEObg6LDrgOXQ5SDrcOTA6pDqYOQwzADCUMKgzPDDQM0QzeDDsMCAztDOIMBwz8DBkMFgzzDVANtQ26DV8NpA1BDU4Nqw2YDX0Ncg2XDWwNiQ2GDWMIgAhlCGoIjwh0CJEIngh7CEgIrQiiCEcIvAhZCFYIswkQCfUJ+gkfCeQJAQkOCesJ2Ak9CTIJ1wksCckJxgkjC6ALRQtKC68LVAuxC74LWwtoC40LggtnC5wLeQt2C5MKMArVCtoKPwrECiEKLgrLCvgKHQoSCvcKDArpCuYKAwAAHuA84CIAOOBmAEQAWuBw4O4AzADS4MgAluC04KoAoOH+AdwBwuHYAYbhpOG6AZABDuEs4TIBKOF2AVQBSuFA494D/APi4/gDpuOE45oDsAMu4wzjEgMI41YDdANq42ACPuIc4gICGOJGAmQCeuJQ4s4C7ALy4ugCtuKU4ooCgOeeB7wHoue4B+bnxOfaB/AHbudM51IHSOcWBzQHKucgBn7mXOZCBljmBgYkBjrmEOaOBqwGsuaoBvbm1ObKBsAEXuR85GIEeOQmBAQEGuQw5K4EjASS5IgE1uT05OoE4OW+BZwFguWYBcbl5OX6BdAFTuVs5XIFaOU2BRQFCuUA7x4PPA8i7zgPZu9E71oPcA/u78zv0g/I75YPtA+q76AO/u7c7sIO2O6GDqQOuu6Q7g4OLA4y7igOdu5U7koOQAze7Pzs4gz47KYMhAya7LDsLgwMDBLsCAxW7HTsagxg7T4NHA0C7RgNRu1k7XoNUA3O7ezt8g3o7bYNlA2K7YAInui86KIIuOjmCMQI2ujw6G4ITAhS6EgIFug06CoIIOl+CVwJQulYCQbpJOk6CRAJjums6bIJqOn2CdQJyunA614LfAti63gLJusE6xoLMAuu64zrkguI69YL9Avq6+AKvuqc6oIKmOrGCuQK+urQ6k4KbApy6mgKNuoU6goKAAAA/gDcACIBuAFGAWQBmgJQAq4CjAJyA+gDFgM0A8oEoAReBHwEggUYBeYFxAU6BvAGDgYsBtIHSAe2B5QHaghgCJ4IvAhCCdgJJgkECfoKMArOCuwKEguIC3YLVAuqDMAMPgwcDOINeA2GDaQNWg6QDm4OTA6yDygP1g/0DwoR4BEeETwRwhBYEKYQhBB6E7ATThNsE5ISCBL2EtQSKhVAFb4VnBViFPgUBhQkFNoXEBfuF8wXMhaoFlYWdBaKGYAZfhlcGaIYOBjGGOQYGhvQGy4bDBvyGmgalhq0GkodIB3eHfwdAhyYHGYcRBy6H3Afjh+sH1IeyB42HhQe6iLgIh4iPCLCI1gjpiOEI3ogsCBOIGwgkiEIIfYh1CEqJkAmviacJmIn+CcGJyQn2iQQJO4kzCQyJaglViV0JYoqgCp+Klwqois4K8Yr5CsaKNAoLigMKPIpaCmWKbQpSi4gLt4u/C4CL5gvZi9EL7oscCyOLKwsUi3ILTYtFC3qMwAz/jPcMyIyuDJGMmQymjFQMa4xjDFyMOgwFjA0MMo3oDdeN3w3gjYYNuY2xDY6NfA1DjUsNdI0SDS2NJQ0ajtgO547vDtCOtg6JjoEOvo5MDnOOew5EjiIOHY4VDiqP8A/Pj8cP+I+eD6GPqQ+Wj2QPW49TD2yPCg81jz0PAoAAATgSOCMANDhFAFYAZzh4OIkAmgCrOLwAzTjeOO8A8DkRAQIBMzkkAVU5Rjl3AWgBmTmKObsBrDndAc4B/zngOiECMgIDOhQCZTp2OkcCWAKpOro6iwKcOu0C/gLPOtADMTsiOxMDBDt1A2YDVztIO7kDqgObO4wD/TvuO98DwDxBBFIEYzx0BAU8FjwnBDgEyTzaPOsE/DyNBJ4ErzywBVE9Qj1zBWQ9FQUGBTc9KD3ZBcoF+z3sBZ09jj2/BaAGYT5yPkMGVD4lBjYGBz4YPukG+gbLPtwGrT6+Po8GkD9xB2IHUz9EBzU/Jj8XBwgH+T/qP9sHzD+9B64Hnz+AMIEIkgijMLQIxTDWMOcI+AgJMBowKwg8ME0IXghvMHAJkTGCMbMJpDHVCcYJ9zHoMRkJCgk7MSwJXTFOMX8JYAqhMrIygwqUMuUK9grHMtgyKQo6CgsyHAptMn4yTwpQM7ELoguTM4QL9TPmM9cLyAs5MyozGwsMM30LbgtfM0AMwTTSNOMM9DSFDJYMpzS4NEkMWgxrNHwMDTQeNC8MMDXRDcIN8zXkDZU1hjW3DagNWTVKNXsNbDUdDQ4NPzUgNuEO8g7DNtQOpTa2NocOmA5pNno2Sw5cNi0OPg4PNhAP8TfiN9MPxDe1D6YPlzeIN3kPag9bN0wPPTcuNx8PAAAAYQDCAKMBhAHlAUYBJwMIA2kDygOrAowC7QJOAi8GWAY5BpoG+wfcB70HHgd/BVAFMQWSBfME1AS1BBYEdwz4DJkMOgxbDXwNHQ2+Dd8P8A+RDzIPUw50DhUOtg7XCqAKwQpiCgMLJAtFC+YLhwmoCckJagkLCCwITQjuCI8JuBnZGXoZGxg8GF0Y/hifGrAa0RpyGhMbNBtVG/Yblx/gH4EfIh9DHmQeBR6mHscc6ByJHCocSx1sHQ0drh3PFUAVIRWCFeMUxBSlFAYUZxZIFikWihbrF8wXrRcOF28TGBN5E9oTuxKcEv0SXhI/EBAQcRDSELMRlBH1EVYRNxM4M1kz+jObMrwy3TJ+Mh8wMDBRMPIwkzG0MdUxdjEXNWA1ATWiNcM05DSFNCY0RzZoNgk2qjbLN+w3jTcuN08/wD+hPwI/Yz5EPiU+hj7nPMg8qTwKPGs9TD0tPY497zmYOfk5Wjk7OBw4fTjeOL86kDrxOlI6MzsUO3U71ju3OoAq4SpCKiMrBCtlK8YrpymIKekpSikrKAwobSjOKK8s2Cy5LBosey1cLT0tni3/L9AvsS8SL3MuVC41LpYu9yZ4JhkmuibbJ/wnnSc+J18lcCURJbIl0yT0JJUkNiRXICAgQSDiIIMhpCHFIWYhByMoI0kj6iOLIqwizSJuIg8nJlZmVyZW5jZSBsaWJGTEFDIDEuMy4zIDIwMTkwODA0AGZMYUMAAABDYUxmIAAAABAAAAAQAAAAGAAAABgAAAAUAAAAAwAAAAUAAAAkAAAAIAAAAEAAAABAAAAAEAAAAEAAAAAIAAAAGAAAAEAAAAAIAAAAYAAAAAEAAAABAAAAbgAAAAgAAAAABAAAQAAAAAEAAAAXCAAACAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAAQAAAAcAAAAYAAAA/j8AAA4AAAABAAAAAQAAAAQAAAAEAAAABAAAAAMAAAABAAAACAAAABAAAAACAAAABAAAAAQAAAAFAAAABQAAAA8AAAAfAAAABAAAAAUAAAABAAAABgAAAAEAAAAAAAAAAgAAABAAAABAAAAAQ0QtREEgY3VlIHNoZWV0IG11c3QgaGF2ZSBhIGxlYWQtaW4gbGVuZ3RoIG9mIGF0IGxlYXN0IDIgc2Vjb25kcwBDRC1EQSBjdWUgc2hlZXQgbGVhZC1pbiBsZW5ndGggbXVzdCBiZSBldmVubHkgZGl2aXNpYmxlIGJ5IDU4OCBzYW1wbGVzAGN1ZSBzaGVldCBtdXN0IGhhdmUgYXQgbGVhc3Qgb25lIHRyYWNrICh0aGUgbGVhZC1vdXQpAENELURBIGN1ZSBzaGVldCBtdXN0IGhhdmUgYSBsZWFkLW91dCB0cmFjayBudW1iZXIgMTcwICgweEFBKQBjdWUgc2hlZXQgbWF5IG5vdCBoYXZlIGEgdHJhY2sgbnVtYmVyIDAAQ0QtREEgY3VlIHNoZWV0IHRyYWNrIG51bWJlciBtdXN0IGJlIDEtOTkgb3IgMTcwAENELURBIGN1ZSBzaGVldCBsZWFkLW91dCBvZmZzZXQgbXVzdCBiZSBldmVubHkgZGl2aXNpYmxlIGJ5IDU4OCBzYW1wbGVzAENELURBIGN1ZSBzaGVldCB0cmFjayBvZmZzZXQgbXVzdCBiZSBldmVubHkgZGl2aXNpYmxlIGJ5IDU4OCBzYW1wbGVzAGN1ZSBzaGVldCB0cmFjayBtdXN0IGhhdmUgYXQgbGVhc3Qgb25lIGluZGV4IHBvaW50AGN1ZSBzaGVldCB0cmFjaydzIGZpcnN0IGluZGV4IG51bWJlciBtdXN0IGJlIDAgb3IgMQBDRC1EQSBjdWUgc2hlZXQgdHJhY2sgaW5kZXggb2Zmc2V0IG11c3QgYmUgZXZlbmx5IGRpdmlzaWJsZSBieSA1ODggc2FtcGxlcwBjdWUgc2hlZXQgdHJhY2sgaW5kZXggbnVtYmVycyBtdXN0IGluY3JlYXNlIGJ5IDEATUlNRSB0eXBlIHN0cmluZyBtdXN0IGNvbnRhaW4gb25seSBwcmludGFibGUgQVNDSUkgY2hhcmFjdGVycyAoMHgyMC0weDdlKQBkZXNjcmlwdGlvbiBzdHJpbmcgbXVzdCBiZSB2YWxpZCBVVEYtOA==\");\nbase64DecodeToExistingUint8Array(bufferView, 6516, \"tx3BBG47ggnZJkMN3HYEE2trxReyTYYaBVBHHrjtCCYP8Mki1taKL2HLSytkmww104bNMQqgjjy9vU84cNsRTMfG0Ege4JNFqf1SQaytFV8bsNRbwpaXVnWLVlLINhlqfyvYbqYNm2MREFpnFEAdeaNd3H16e59wzWZedOC2I5hXq+Kcjo2hkTmQYJU8wCeLi93mj1L7pYLl5mSGWFsrvu9G6ro2YKm3gX1os4QtL60zMO6p6hatpF0LbKCQbTLUJ3Dz0P5WsN1JS3HZTBs2x/sG98MiILTOlT11yiiAOvKfnfv2Rru4+/Gmef/09j7hQ+v/5ZrNvOgt0H3sd3CGNMBtRzAZSwQ9rlbFOasGgiccG0MjxT0ALnIgwSrPnY4SeIBPFqGmDBsWu80fE+uKAaT2SwV90AgIys3JDAerl3iwtlZ8aZAVcd6N1HXb3ZNrbMBSb7XmEWIC+9Bmv0afXghbXlrRfR1XZmDcU2Mwm03ULVpJDQsZRLoW2ECXxqWsINtkqPn9J6VO4OahS7Chv/ytYLsliyO2kpbisi8rrYqYNmyOQRAvg/YN7ofzXamZREBonZ1mK5Aqe+qU5x204FAAdeSJJjbpPjv37TtrsPOMdnH3VVAy+uJN8/5f8LzG6O19wjHLPs+G1v/Lg4a41TSbedHtvTrcWqD72O7gDGlZ/c1tgNuOYDfGT2Qylgh6hYvJflytinPrsEt3Vg0ET+EQxUs4NoZGjytHQop7AFw9ZsFY5ECCVVNdQ1GeOx0lKSbcIfAAnyxHHV4oQk0ZNvVQ2DIsdps/m2taOybWFQORy9QHSO2XCv/wVg76oBEQTb3QFJSbkxkjhlIdDlYv8blL7vVgba3413Bs/NIgK+JlPermvBup6wsGaO+2uyfXAabm09iApd5vnWTaas0jxN3Q4sAE9qHNs+tgyX6NPr3JkP+5ELa8tKerfbCi+zquFeb7qszAuKd73XmjxmA2m3F995+oW7SSH0Z1lhoWMoitC/OMdC2wgcMwcYWZkIpdLo1LWferCFRAtslQReaOTvL7T0or3QxHnMDNQyF9gnuWYEN/T0YAcvhbwXb9C4ZoShZHbJMwBGEkLcVl6UubEV5WWhWHcBkYMG3YHDU9nwKCIF4GWwYdC+wb3A9RppM35rtSMz+dET6IgNA6jdCXJDrNViDj6xUtVPbUKXkmqcXOO2jBFx0rzKAA6silUK3WEk1s0strL998du7bwcuh43bWYOev8CPqGO3i7h29pfCqoGT0c4Yn+cSb5v0J/biJvuB5jWfGOoDQ2/uE1Yu8mmKWfZ67sD6TDK3/l7EQsK8GDXGr3ysypmg286JtZrS82nt1uANdNrW0QPexf0ZMQUMAAAAQAAAAiCoAAElEMw==\");\nbase64DecodeToExistingUint8Array(bufferView, 7576, \"AQAAAAUAAAAYKw==\");\nbase64DecodeToExistingUint8Array(bufferView, 7600, \"AwAAAAQAAAAEAAAABgAAAIP5ogBETm4A/CkVANFXJwDdNPUAYtvAADyZlQBBkEMAY1H+ALveqwC3YcUAOm4kANJNQgBJBuAACeouAByS0QDrHf4AKbEcAOg+pwD1NYIARLsuAJzphAC0JnAAQX5fANaROQBTgzkAnPQ5AItfhAAo+b0A+B87AN7/lwAPmAUAES/vAApaiwBtH20Az342AAnLJwBGT7cAnmY/AC3qXwC6J3UA5evHAD178QD3OQcAklKKAPtr6gAfsV8ACF2NADADVgB7/EYA8KtrACC8zwA29JoA46kdAF5hkQAIG+YAhZllAKAUXwCNQGgAgNj/ACdzTQAGBjEAylYVAMmocwB74mAAa4zAABnERwDNZ8MACejcAFmDKgCLdsQAphyWAESv3QAZV9EApT4FAAUH/wAzfj8AwjLoAJhP3gC7fTIAJj3DAB5r7wCf+F4ANR86AH/yygDxhx0AfJAhAGokfADVbvoAMC13ABU7QwC1FMYAwxmdAK3EwgAsTUEADABdAIZ9RgDjcS0Am8aaADNiAAC00nwAtKeXADdV1QDXPvYAoxAYAE12/ABknSoAcNerAGN8+AB6sFcAFxXnAMBJVgA71tkAp4Q4ACQjywDWincAWlQjAAAfuQDxChsAGc7fAJ8x/wBmHmoAmVdhAKz7RwB+f9gAImW3ADLoiQDmv2AA78TNAGw2CQBdP9QAFt7XAFg73gDem5IA0iIoACiG6ADiWE0AxsoyAAjjFgDgfcsAF8BQAPMdpwAY4FsALhM0AIMSYgCDSAEA9Y5bAK2wfwAe6fIASEpDABBn0wCq3dgArl9CAGphzgAKKKQA05m0AAam8gBcd38Ao8KDAGE8iACKc3gAr4xaAG/XvQAtpmMA9L/LAI2B7wAmwWcAVcpFAMrZNgAoqNIAwmGNABLJdwAEJhQAEkabAMRZxADIxUQATbKRAAAX8wDUQ60AKUnlAP3VEAAAvvwAHpTMAHDO7gATPvUA7PGAALPnwwDH+CgAkwWUAMFxPgAuCbMAC0XzAIgSnACrIHsALrWfAEeSwgB7Mi8ADFVtAHKnkABr5x8AMcuWAHkWSgBBeeIA9N+JAOiUlwDi5oQAmTGXAIjtawBfXzYAu/0OAEiatABnpGwAcXJCAI1dMgCfFbgAvOUJAI0xJQD3dDkAMAUcAA0MAQBLCGgALO5YAEeqkAB05wIAvdYkAPd9pgBuSHIAnxbvAI6UpgC0kfYA0VNRAM8K8gAgmDMA9Ut+ALJjaADdPl8AQF0DAIWJfwBVUikAN2TAAG3YEAAySDIAW0x1AE5x1ABFVG4ACwnBACr1aQAUZtUAJwedAF0EUAC0O9sA6nbFAIf5FwBJa30AHSe6AJZpKQDGzKwArRRUAJDiagCI2YkALHJQAASkvgB3B5QA8zBwAAD8JwDqcagAZsJJAGTgPQCX3YMAoz+XAEOU/QANhowAMUHeAJI5nQDdcIwAF7fnAAjfOwAVNysAXICgAFqAkwAQEZIAD+jYAGyArwDb/0sAOJAPAFkYdgBipRUAYcu7AMeJuQAQQL0A0vIEAEl1JwDrtvYA2yK7AAoUqgCJJi8AZIN2AAk7MwAOlBoAUTqqAB2jwgCv7a4AXCYSAG3CTQAtepwAwFaXAAM/gwAJ8PYAK0CMAG0xmQA5tAcADCAVANjDWwD1ksQAxq1LAE7KpQCnN80A5qk2AKuSlADdQmgAGWPeAHaM7wBoi1IA/Ns3AK6hqwDfFTEAAK6hAAz72gBkTWYA7QW3ACllMABXVr8AR/86AGr5uQB1vvMAKJPfAKuAMABmjPYABMsVAPoiBgDZ5B0APbOkAFcbjwA2zQkATkLpABO+pAAzI7UA8KoaAE9lqADSwaUACz8PAFt4zQAj+XYAe4sEAIkXcgDGplMAb27iAO/rAACbSlgAxNq3AKpmugB2z88A0QIdALHxLQCMmcEAw613AIZI2gD3XaAAxoD0AKzwLwDd7JoAP1y8ANDebQCQxx8AKtu2AKMlOgAAr5oArVOTALZXBAApLbQAS4B+ANoHpwB2qg4Ae1mhABYSKgDcty0A+uX9AInb/gCJvv0A5HZsAAap/AA+gHAAhW4VAP2H/wAoPgcAYWczACoYhgBNveoAs+evAI9tbgCVZzkAMb9bAITXSAAw3xYAxy1DACVhNQDJcM4AMMu4AL9s/QCkAKIABWzkAFrdoAAhb0cAYhLSALlchABwYUkAa1bgAJlSAQBQVTcAHtW3ADPxxAATbl8AXTDkAIUuqQAdssMAoTI2AAi3pADqsdQAFvchAI9p5AAn/3cADAOAAI1ALQBPzaAAIKWZALOi0wAvXQoAtPlCABHaywB9vtAAm9vBAKsXvQDKooEACGpcAC5VFwAnAFUAfxTwAOEHhgAUC2QAlkGNAIe+3gDa/SoAayW2AHuJNAAF8/4Aub+eAGhqTwBKKqgAT8RaAC34vADXWpgA9MeVAA1NjQAgOqYApFdfABQ/sQCAOJUAzCABAHHdhgDJ3rYAv2D1AE1lEQABB2sAjLCsALLA0ABRVUgAHvsOAJVywwCjBjsAwEA1AAbcewDgRcwATin6ANbKyADo80EAfGTeAJtk2ADZvjEApJfDAHdY1ABp48UA8NoTALo6PABGGEYAVXVfANK99QBuksYArC5dAA5E7QAcPkIAYcSHACn96QDn1vMAInzKAG+RNQAI4MUA/9eNAG5q4gCw/cYAkwjBAHxddABrrbIAzW6dAD5yewDGEWoA98+pAClz3wC1yboAtwBRAOKyDQB0uiQA5X1gAHTYigANFSwAgRgMAH5mlAABKRYAn3p2AP39vgBWRe8A2X42AOzZEwCLurkAxJf8ADGoJwDxbsMAlMU2ANioVgC0qLUAz8wOABKJLQBvVzQALFaJAJnO4wDWILkAa16qAD4qnAARX8wA/QtKAOH0+wCOO20A4oYsAOnUhAD8tKkA7+7RAC41yQAvOWEAOCFEABvZyACB/AoA+0pqAC8c2ABTtIQATpmMAFQizAAqVdwAwMbWAAsZlgAacLgAaZVkACZaYAA/Uu4AfxEPAPS1EQD8y/UANLwtADS87gDoXcwA3V5gAGeOmwCSM+8AyRe4AGFYmwDhV7wAUYPGANg+EADdcUgALRzdAK8YoQAhLEYAWfPXANl6mACeVMAAT4b6AFYG/ADlea4AiSI2ADitIgBnk9wAVeiqAIImOADK55sAUQ2kAJkzsQCp1w4AaQVIAGWy8AB/iKcAiEyXAPnRNgAhkrMAe4JKAJjPIQBAn9wA3EdVAOF0OgBn60IA/p3fAF7UXwB7Z6QAuqx6AFX2ogAriCMAQbpVAFluCAAhKoYAOUeDAInj5gDlntQASftAAP9W6QAcD8oAxVmKAJT6KwDTwcUAD8XPANtargBHxYYAhUNiACGGOwAseZQAEGGHACpMewCALBoAQ78SAIgmkAB4PIkAqMTkAOXbewDEOsIAJvTqAPdnigANkr8AZaMrAD2TsQC9fAsApFHcACfdYwBp4d0AmpQZAKgplQBozigACe20AESfIABOmMoAcIJjAH58IwAPuTIAp/WOABRW5wAh8QgAtZ0qAG9+TQClGVEAtfmrAILf1gCW3WEAFjYCAMQ6nwCDoqEAcu1tADmNegCCuKkAazJcAEYnWwAANO0A0gB3APz0VQABWU0A4HGA\");\nbase64DecodeToExistingUint8Array(bufferView, 10387, \"QPsh+T8AAAAALUR0PgAAAICYRvg8AAAAYFHMeDsAAACAgxvwOQAAAEAgJXo4AAAAgCKC4zYAAAAAHfNpNQAAAAAAAOA/AAAAAAAA4L8BAAAAAgAAAAQAAAAFAAAABgAAAGluZmluaXR5AG5hbg==\");\nbase64DecodeToExistingUint8Array(bufferView, 10512, \"0XSeAFedvSqAcFIP//8+JwoAAABkAAAA6AMAABAnAACghgEAQEIPAICWmAAA4fUFGAAAADUAAABxAAAAa////877//+Sv///YmFydGxldHQAYmFydGxldHRfaGFubgBibGFja21hbgBibGFja21hbl9oYXJyaXNfNHRlcm1fOTJkYgBjb25uZXMAZmxhdHRvcABnYXVzcygAaGFtbWluZwBoYW5uAGthaXNlcl9iZXNzZWwAbnV0dGFsbAByZWN0YW5nbGUAdHJpYW5nbGUAdHVrZXkoAHBhcnRpYWxfdHVrZXkoAHB1bmNob3V0X3R1a2V5KAB3ZWxjaABpbWFnZS9wbmcALS0+AHR1a2V5KDVlLTEpAHR1a2V5KDVlLTEpO3BhcnRpYWxfdHVrZXkoMikAdHVrZXkoNWUtMSk7cGFydGlhbF90dWtleSgyKTtwdW5jaG91dF90dWtleSgzKQ==\");\nbase64DecodeToExistingUint8Array(bufferView, 10881, \"FQAAcR0AAAk=\");\nbase64DecodeToExistingUint8Array(bufferView, 10900, \"Ag==\");\nbase64DecodeToExistingUint8Array(bufferView, 10920, \"AwAAAAAAAAAEAAAASC8AAAAE\");\nbase64DecodeToExistingUint8Array(bufferView, 10964, \"/////w==\");\nbase64DecodeToExistingUint8Array(bufferView, 11032, \"BQ==\");\nbase64DecodeToExistingUint8Array(bufferView, 11044, \"CQ==\");\nbase64DecodeToExistingUint8Array(bufferView, 11068, \"CgAAAAsAAABYMwAAAAQ=\");\nbase64DecodeToExistingUint8Array(bufferView, 11092, \"AQ==\");\nbase64DecodeToExistingUint8Array(bufferView, 11107, \"Cv////8=\");\nbase64DecodeToExistingUint8Array(bufferView, 11176, \"GCs=\");\nbase64DecodeToExistingUint8Array(bufferView, 11216, \"AwAAAAAAAAAZKgAAAQAAAAE=\");\nbase64DecodeToExistingUint8Array(bufferView, 11260, \"AwAAAAAAAAAZKgAAAQ==\");\nbase64DecodeToExistingUint8Array(bufferView, 11304, \"AwAAAAAAAAAZKg==\");\nbase64DecodeToExistingUint8Array(bufferView, 11324, \"Bg==\");\nbase64DecodeToExistingUint8Array(bufferView, 11348, \"BAAAAAAAAAAZKgAAAQAAAAEAAAAI\");\nbase64DecodeToExistingUint8Array(bufferView, 11392, \"BAAAAAAAAAAZKgAAAQAAAAAAAAAI\");\nbase64DecodeToExistingUint8Array(bufferView, 11436, \"BQAAAAAAAAAZKgAAAQAAAAAAAAAI\");\nbase64DecodeToExistingUint8Array(bufferView, 11480, \"BgAAAAAAAAAlKgAAAQAAAAAAAAAM\");\nbase64DecodeToExistingUint8Array(bufferView, 11524, \"BgAAAAAAAAAlKgAAAQAAAAAAAAAM\");\nbase64DecodeToExistingUint8Array(bufferView, 11568, \"BgAAAAAAAABCKg==\");\nreturn asmFunc({\n    'Int8Array': Int8Array,\n    'Int16Array': Int16Array,\n    'Int32Array': Int32Array,\n    'Uint8Array': Uint8Array,\n    'Uint16Array': Uint16Array,\n    'Uint32Array': Uint32Array,\n    'Float32Array': Float32Array,\n    'Float64Array': Float64Array,\n    'NaN': NaN,\n    'Infinity': Infinity,\n    'Math': Math\n  },\n  asmLibraryArg,\n  wasmMemory.buffer\n)\n\n}\n)(asmLibraryArg, wasmMemory, wasmTable);\n  },\n\n  instantiate: /** @suppress{checkTypes} */ function(binary, info) {\n    return {\n      then: function(ok) {\n        ok({\n          'instance': new WebAssembly.Instance(new WebAssembly.Module(binary))\n        });\n      }\n    };\n  },\n\n  RuntimeError: Error\n};\n\n// We don't need to actually download a wasm binary, mark it as present but empty.\nwasmBinary = [];\n\n\n\nif (typeof WebAssembly !== 'object') {\n  abort('no native wasm support detected');\n}\n\n\n\n\n// In MINIMAL_RUNTIME, setValue() and getValue() are only available when building with safe heap enabled, for heap safety checking.\n// In traditional runtime, setValue() and getValue() are always available (although their use is highly discouraged due to perf penalties)\n\n/** @param {number} ptr\n    @param {number} value\n    @param {string} type\n    @param {number|boolean=} noSafe */\nfunction setValue(ptr, value, type, noSafe) {\n  type = type || 'i8';\n  if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit\n    switch(type) {\n      case 'i1': HEAP8[((ptr)>>0)]=value; break;\n      case 'i8': HEAP8[((ptr)>>0)]=value; break;\n      case 'i16': HEAP16[((ptr)>>1)]=value; break;\n      case 'i32': HEAP32[((ptr)>>2)]=value; break;\n      case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break;\n      case 'float': HEAPF32[((ptr)>>2)]=value; break;\n      case 'double': HEAPF64[((ptr)>>3)]=value; break;\n      default: abort('invalid type for setValue: ' + type);\n    }\n}\n\n/** @param {number} ptr\n    @param {string} type\n    @param {number|boolean=} noSafe */\nfunction getValue(ptr, type, noSafe) {\n  type = type || 'i8';\n  if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit\n    switch(type) {\n      case 'i1': return HEAP8[((ptr)>>0)];\n      case 'i8': return HEAP8[((ptr)>>0)];\n      case 'i16': return HEAP16[((ptr)>>1)];\n      case 'i32': return HEAP32[((ptr)>>2)];\n      case 'i64': return HEAP32[((ptr)>>2)];\n      case 'float': return HEAPF32[((ptr)>>2)];\n      case 'double': return HEAPF64[((ptr)>>3)];\n      default: abort('invalid type for getValue: ' + type);\n    }\n  return null;\n}\n\n\n\n\n\n\n// Wasm globals\n\nvar wasmMemory;\n\n// In fastcomp asm.js, we don't need a wasm Table at all.\n// In the wasm backend, we polyfill the WebAssembly object,\n// so this creates a (non-native-wasm) table for us.\nvar wasmTable = new WebAssembly.Table({\n  'initial': 22,\n  'maximum': 22 + 5,\n  'element': 'anyfunc'\n});\n\n\n//========================================\n// Runtime essentials\n//========================================\n\n// whether we are quitting the application. no code should run after this.\n// set in exit() and abort()\nvar ABORT = false;\n\n// set by exit() and abort().  Passed to 'onExit' handler.\n// NOTE: This is also used as the process return code code in shell environments\n// but only when noExitRuntime is false.\nvar EXITSTATUS = 0;\n\n/** @type {function(*, string=)} */\nfunction assert(condition, text) {\n  if (!condition) {\n    abort('Assertion failed: ' + text);\n  }\n}\n\n// Returns the C function with a specified identifier (for C++, you need to do manual name mangling)\nfunction getCFunc(ident) {\n  var func = Module['_' + ident]; // closure exported function\n  assert(func, 'Cannot call unknown function ' + ident + ', make sure it is exported');\n  return func;\n}\n\n// C calling interface.\n/** @param {string|null=} returnType\n    @param {Array=} argTypes\n    @param {Arguments|Array=} args\n    @param {Object=} opts */\nfunction ccall(ident, returnType, argTypes, args, opts) {\n  // For fast lookup of conversion functions\n  var toC = {\n    'string': function(str) {\n      var ret = 0;\n      if (str !== null && str !== undefined && str !== 0) { // null string\n        // at most 4 bytes per UTF-8 code point, +1 for the trailing '\\0'\n        var len = (str.length << 2) + 1;\n        ret = stackAlloc(len);\n        stringToUTF8(str, ret, len);\n      }\n      return ret;\n    },\n    'array': function(arr) {\n      var ret = stackAlloc(arr.length);\n      writeArrayToMemory(arr, ret);\n      return ret;\n    }\n  };\n\n  function convertReturnValue(ret) {\n    if (returnType === 'string') return UTF8ToString(ret);\n    if (returnType === 'boolean') return Boolean(ret);\n    return ret;\n  }\n\n  var func = getCFunc(ident);\n  var cArgs = [];\n  var stack = 0;\n  if (args) {\n    for (var i = 0; i < args.length; i++) {\n      var converter = toC[argTypes[i]];\n      if (converter) {\n        if (stack === 0) stack = stackSave();\n        cArgs[i] = converter(args[i]);\n      } else {\n        cArgs[i] = args[i];\n      }\n    }\n  }\n  var ret = func.apply(null, cArgs);\n\n  ret = convertReturnValue(ret);\n  if (stack !== 0) stackRestore(stack);\n  return ret;\n}\n\n/** @param {string=} returnType\n    @param {Array=} argTypes\n    @param {Object=} opts */\nfunction cwrap(ident, returnType, argTypes, opts) {\n  argTypes = argTypes || [];\n  // When the function takes numbers and returns a number, we can just return\n  // the original function\n  var numericArgs = argTypes.every(function(type){ return type === 'number'});\n  var numericRet = returnType !== 'string';\n  if (numericRet && numericArgs && !opts) {\n    return getCFunc(ident);\n  }\n  return function() {\n    return ccall(ident, returnType, argTypes, arguments, opts);\n  }\n}\n\nvar ALLOC_NORMAL = 0; // Tries to use _malloc()\nvar ALLOC_STACK = 1; // Lives for the duration of the current function call\nvar ALLOC_DYNAMIC = 2; // Cannot be freed except through sbrk\nvar ALLOC_NONE = 3; // Do not allocate\n\n// allocate(): This is for internal use. You can use it yourself as well, but the interface\n//             is a little tricky (see docs right below). The reason is that it is optimized\n//             for multiple syntaxes to save space in generated code. So you should\n//             normally not use allocate(), and instead allocate memory using _malloc(),\n//             initialize it with setValue(), and so forth.\n// @slab: An array of data, or a number. If a number, then the size of the block to allocate,\n//        in *bytes* (note that this is sometimes confusing: the next parameter does not\n//        affect this!)\n// @types: Either an array of types, one for each byte (or 0 if no type at that position),\n//         or a single type which is used for the entire block. This only matters if there\n//         is initial data - if @slab is a number, then this does not matter at all and is\n//         ignored.\n// @allocator: How to allocate memory, see ALLOC_*\n/** @type {function((TypedArray|Array<number>|number), string, number, number=)} */\nfunction allocate(slab, types, allocator, ptr) {\n  var zeroinit, size;\n  if (typeof slab === 'number') {\n    zeroinit = true;\n    size = slab;\n  } else {\n    zeroinit = false;\n    size = slab.length;\n  }\n\n  var singleType = typeof types === 'string' ? types : null;\n\n  var ret;\n  if (allocator == ALLOC_NONE) {\n    ret = ptr;\n  } else {\n    ret = [_malloc,\n    stackAlloc,\n    dynamicAlloc][allocator](Math.max(size, singleType ? 1 : types.length));\n  }\n\n  if (zeroinit) {\n    var stop;\n    ptr = ret;\n    assert((ret & 3) == 0);\n    stop = ret + (size & ~3);\n    for (; ptr < stop; ptr += 4) {\n      HEAP32[((ptr)>>2)]=0;\n    }\n    stop = ret + size;\n    while (ptr < stop) {\n      HEAP8[((ptr++)>>0)]=0;\n    }\n    return ret;\n  }\n\n  if (singleType === 'i8') {\n    if (slab.subarray || slab.slice) {\n      HEAPU8.set(/** @type {!Uint8Array} */ (slab), ret);\n    } else {\n      HEAPU8.set(new Uint8Array(slab), ret);\n    }\n    return ret;\n  }\n\n  var i = 0, type, typeSize, previousType;\n  while (i < size) {\n    var curr = slab[i];\n\n    type = singleType || types[i];\n    if (type === 0) {\n      i++;\n      continue;\n    }\n\n    if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later\n\n    setValue(ret+i, curr, type);\n\n    // no need to look up size unless type changes, so cache it\n    if (previousType !== type) {\n      typeSize = getNativeTypeSize(type);\n      previousType = type;\n    }\n    i += typeSize;\n  }\n\n  return ret;\n}\n\n// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready\nfunction getMemory(size) {\n  if (!runtimeInitialized) return dynamicAlloc(size);\n  return _malloc(size);\n}\n\n\n\n\n// runtime_strings.js: Strings related runtime functions that are part of both MINIMAL_RUNTIME and regular runtime.\n\n// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns\n// a copy of that string as a Javascript String object.\n\nvar UTF8Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined;\n\n/**\n * @param {number} idx\n * @param {number=} maxBytesToRead\n * @return {string}\n */\nfunction UTF8ArrayToString(heap, idx, maxBytesToRead) {\n  var endIdx = idx + maxBytesToRead;\n  var endPtr = idx;\n  // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself.\n  // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage.\n  // (As a tiny code save trick, compare endPtr against endIdx using a negation, so that undefined means Infinity)\n  while (heap[endPtr] && !(endPtr >= endIdx)) ++endPtr;\n\n  if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) {\n    return UTF8Decoder.decode(heap.subarray(idx, endPtr));\n  } else {\n    var str = '';\n    // If building with TextDecoder, we have already computed the string length above, so test loop end condition against that\n    while (idx < endPtr) {\n      // For UTF8 byte structure, see:\n      // http://en.wikipedia.org/wiki/UTF-8#Description\n      // https://www.ietf.org/rfc/rfc2279.txt\n      // https://tools.ietf.org/html/rfc3629\n      var u0 = heap[idx++];\n      if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }\n      var u1 = heap[idx++] & 63;\n      if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }\n      var u2 = heap[idx++] & 63;\n      if ((u0 & 0xF0) == 0xE0) {\n        u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;\n      } else {\n        u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heap[idx++] & 63);\n      }\n\n      if (u0 < 0x10000) {\n        str += String.fromCharCode(u0);\n      } else {\n        var ch = u0 - 0x10000;\n        str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));\n      }\n    }\n  }\n  return str;\n}\n\n// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns a\n// copy of that string as a Javascript String object.\n// maxBytesToRead: an optional length that specifies the maximum number of bytes to read. You can omit\n//                 this parameter to scan the string until the first \\0 byte. If maxBytesToRead is\n//                 passed, and the string at [ptr, ptr+maxBytesToReadr[ contains a null byte in the\n//                 middle, then the string will cut short at that byte index (i.e. maxBytesToRead will\n//                 not produce a string of exact length [ptr, ptr+maxBytesToRead[)\n//                 N.B. mixing frequent uses of UTF8ToString() with and without maxBytesToRead may\n//                 throw JS JIT optimizations off, so it is worth to consider consistently using one\n//                 style or the other.\n/**\n * @param {number} ptr\n * @param {number=} maxBytesToRead\n * @return {string}\n */\nfunction UTF8ToString(ptr, maxBytesToRead) {\n  return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : '';\n}\n\n// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx',\n// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP.\n// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write.\n// Parameters:\n//   str: the Javascript string to copy.\n//   heap: the array to copy to. Each index in this array is assumed to be one 8-byte element.\n//   outIdx: The starting offset in the array to begin the copying.\n//   maxBytesToWrite: The maximum number of bytes this function can write to the array.\n//                    This count should include the null terminator,\n//                    i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else.\n//                    maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator.\n// Returns the number of bytes written, EXCLUDING the null terminator.\n\nfunction stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {\n  if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes.\n    return 0;\n\n  var startIdx = outIdx;\n  var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator.\n  for (var i = 0; i < str.length; ++i) {\n    // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8.\n    // See http://unicode.org/faq/utf_bom.html#utf16-3\n    // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629\n    var u = str.charCodeAt(i); // possibly a lead surrogate\n    if (u >= 0xD800 && u <= 0xDFFF) {\n      var u1 = str.charCodeAt(++i);\n      u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF);\n    }\n    if (u <= 0x7F) {\n      if (outIdx >= endIdx) break;\n      heap[outIdx++] = u;\n    } else if (u <= 0x7FF) {\n      if (outIdx + 1 >= endIdx) break;\n      heap[outIdx++] = 0xC0 | (u >> 6);\n      heap[outIdx++] = 0x80 | (u & 63);\n    } else if (u <= 0xFFFF) {\n      if (outIdx + 2 >= endIdx) break;\n      heap[outIdx++] = 0xE0 | (u >> 12);\n      heap[outIdx++] = 0x80 | ((u >> 6) & 63);\n      heap[outIdx++] = 0x80 | (u & 63);\n    } else {\n      if (outIdx + 3 >= endIdx) break;\n      heap[outIdx++] = 0xF0 | (u >> 18);\n      heap[outIdx++] = 0x80 | ((u >> 12) & 63);\n      heap[outIdx++] = 0x80 | ((u >> 6) & 63);\n      heap[outIdx++] = 0x80 | (u & 63);\n    }\n  }\n  // Null-terminate the pointer to the buffer.\n  heap[outIdx] = 0;\n  return outIdx - startIdx;\n}\n\n// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr',\n// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP.\n// Use the function lengthBytesUTF8 to compute the exact number of bytes (excluding null terminator) that this function will write.\n// Returns the number of bytes written, EXCLUDING the null terminator.\n\nfunction stringToUTF8(str, outPtr, maxBytesToWrite) {\n  return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite);\n}\n\n// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte.\nfunction lengthBytesUTF8(str) {\n  var len = 0;\n  for (var i = 0; i < str.length; ++i) {\n    // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8.\n    // See http://unicode.org/faq/utf_bom.html#utf16-3\n    var u = str.charCodeAt(i); // possibly a lead surrogate\n    if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF);\n    if (u <= 0x7F) ++len;\n    else if (u <= 0x7FF) len += 2;\n    else if (u <= 0xFFFF) len += 3;\n    else len += 4;\n  }\n  return len;\n}\n\n\n\n\n\n// runtime_strings_extra.js: Strings related runtime functions that are available only in regular runtime.\n\n// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns\n// a copy of that string as a Javascript String object.\n\nfunction AsciiToString(ptr) {\n  var str = '';\n  while (1) {\n    var ch = HEAPU8[((ptr++)>>0)];\n    if (!ch) return str;\n    str += String.fromCharCode(ch);\n  }\n}\n\n// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr',\n// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP.\n\nfunction stringToAscii(str, outPtr) {\n  return writeAsciiToMemory(str, outPtr, false);\n}\n\n// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns\n// a copy of that string as a Javascript String object.\n\nvar UTF16Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-16le') : undefined;\n\nfunction UTF16ToString(ptr, maxBytesToRead) {\n  var endPtr = ptr;\n  // TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself.\n  // Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage.\n  var idx = endPtr >> 1;\n  var maxIdx = idx + maxBytesToRead / 2;\n  // If maxBytesToRead is not passed explicitly, it will be undefined, and this\n  // will always evaluate to true. This saves on code size.\n  while (!(idx >= maxIdx) && HEAPU16[idx]) ++idx;\n  endPtr = idx << 1;\n\n  if (endPtr - ptr > 32 && UTF16Decoder) {\n    return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr));\n  } else {\n    var i = 0;\n\n    var str = '';\n    while (1) {\n      var codeUnit = HEAP16[(((ptr)+(i*2))>>1)];\n      if (codeUnit == 0 || i == maxBytesToRead / 2) return str;\n      ++i;\n      // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through.\n      str += String.fromCharCode(codeUnit);\n    }\n  }\n}\n\n// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr',\n// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP.\n// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write.\n// Parameters:\n//   str: the Javascript string to copy.\n//   outPtr: Byte address in Emscripten HEAP where to write the string to.\n//   maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null\n//                    terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else.\n//                    maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator.\n// Returns the number of bytes written, EXCLUDING the null terminator.\n\nfunction stringToUTF16(str, outPtr, maxBytesToWrite) {\n  // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed.\n  if (maxBytesToWrite === undefined) {\n    maxBytesToWrite = 0x7FFFFFFF;\n  }\n  if (maxBytesToWrite < 2) return 0;\n  maxBytesToWrite -= 2; // Null terminator.\n  var startPtr = outPtr;\n  var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length;\n  for (var i = 0; i < numCharsToWrite; ++i) {\n    // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP.\n    var codeUnit = str.charCodeAt(i); // possibly a lead surrogate\n    HEAP16[((outPtr)>>1)]=codeUnit;\n    outPtr += 2;\n  }\n  // Null-terminate the pointer to the HEAP.\n  HEAP16[((outPtr)>>1)]=0;\n  return outPtr - startPtr;\n}\n\n// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte.\n\nfunction lengthBytesUTF16(str) {\n  return str.length*2;\n}\n\nfunction UTF32ToString(ptr, maxBytesToRead) {\n  var i = 0;\n\n  var str = '';\n  // If maxBytesToRead is not passed explicitly, it will be undefined, and this\n  // will always evaluate to true. This saves on code size.\n  while (!(i >= maxBytesToRead / 4)) {\n    var utf32 = HEAP32[(((ptr)+(i*4))>>2)];\n    if (utf32 == 0) break;\n    ++i;\n    // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing.\n    // See http://unicode.org/faq/utf_bom.html#utf16-3\n    if (utf32 >= 0x10000) {\n      var ch = utf32 - 0x10000;\n      str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));\n    } else {\n      str += String.fromCharCode(utf32);\n    }\n  }\n  return str;\n}\n\n// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr',\n// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP.\n// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write.\n// Parameters:\n//   str: the Javascript string to copy.\n//   outPtr: Byte address in Emscripten HEAP where to write the string to.\n//   maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null\n//                    terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else.\n//                    maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator.\n// Returns the number of bytes written, EXCLUDING the null terminator.\n\nfunction stringToUTF32(str, outPtr, maxBytesToWrite) {\n  // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed.\n  if (maxBytesToWrite === undefined) {\n    maxBytesToWrite = 0x7FFFFFFF;\n  }\n  if (maxBytesToWrite < 4) return 0;\n  var startPtr = outPtr;\n  var endPtr = startPtr + maxBytesToWrite - 4;\n  for (var i = 0; i < str.length; ++i) {\n    // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap.\n    // See http://unicode.org/faq/utf_bom.html#utf16-3\n    var codeUnit = str.charCodeAt(i); // possibly a lead surrogate\n    if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) {\n      var trailSurrogate = str.charCodeAt(++i);\n      codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF);\n    }\n    HEAP32[((outPtr)>>2)]=codeUnit;\n    outPtr += 4;\n    if (outPtr + 4 > endPtr) break;\n  }\n  // Null-terminate the pointer to the HEAP.\n  HEAP32[((outPtr)>>2)]=0;\n  return outPtr - startPtr;\n}\n\n// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte.\n\nfunction lengthBytesUTF32(str) {\n  var len = 0;\n  for (var i = 0; i < str.length; ++i) {\n    // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap.\n    // See http://unicode.org/faq/utf_bom.html#utf16-3\n    var codeUnit = str.charCodeAt(i);\n    if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate.\n    len += 4;\n  }\n\n  return len;\n}\n\n// Allocate heap space for a JS string, and write it there.\n// It is the responsibility of the caller to free() that memory.\nfunction allocateUTF8(str) {\n  var size = lengthBytesUTF8(str) + 1;\n  var ret = _malloc(size);\n  if (ret) stringToUTF8Array(str, HEAP8, ret, size);\n  return ret;\n}\n\n// Allocate stack space for a JS string, and write it there.\nfunction allocateUTF8OnStack(str) {\n  var size = lengthBytesUTF8(str) + 1;\n  var ret = stackAlloc(size);\n  stringToUTF8Array(str, HEAP8, ret, size);\n  return ret;\n}\n\n// Deprecated: This function should not be called because it is unsafe and does not provide\n// a maximum length limit of how many bytes it is allowed to write. Prefer calling the\n// function stringToUTF8Array() instead, which takes in a maximum length that can be used\n// to be secure from out of bounds writes.\n/** @deprecated\n    @param {boolean=} dontAddNull */\nfunction writeStringToMemory(string, buffer, dontAddNull) {\n  warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!');\n\n  var /** @type {number} */ lastChar, /** @type {number} */ end;\n  if (dontAddNull) {\n    // stringToUTF8Array always appends null. If we don't want to do that, remember the\n    // character that existed at the location where the null will be placed, and restore\n    // that after the write (below).\n    end = buffer + lengthBytesUTF8(string);\n    lastChar = HEAP8[end];\n  }\n  stringToUTF8(string, buffer, Infinity);\n  if (dontAddNull) HEAP8[end] = lastChar; // Restore the value under the null character.\n}\n\nfunction writeArrayToMemory(array, buffer) {\n  HEAP8.set(array, buffer);\n}\n\n/** @param {boolean=} dontAddNull */\nfunction writeAsciiToMemory(str, buffer, dontAddNull) {\n  for (var i = 0; i < str.length; ++i) {\n    HEAP8[((buffer++)>>0)]=str.charCodeAt(i);\n  }\n  // Null-terminate the pointer to the HEAP.\n  if (!dontAddNull) HEAP8[((buffer)>>0)]=0;\n}\n\n\n\n// Memory management\n\nvar PAGE_SIZE = 16384;\nvar WASM_PAGE_SIZE = 65536;\nvar ASMJS_PAGE_SIZE = 16777216;\n\nfunction alignUp(x, multiple) {\n  if (x % multiple > 0) {\n    x += multiple - (x % multiple);\n  }\n  return x;\n}\n\nvar HEAP,\n/** @type {ArrayBuffer} */\n  buffer,\n/** @type {Int8Array} */\n  HEAP8,\n/** @type {Uint8Array} */\n  HEAPU8,\n/** @type {Int16Array} */\n  HEAP16,\n/** @type {Uint16Array} */\n  HEAPU16,\n/** @type {Int32Array} */\n  HEAP32,\n/** @type {Uint32Array} */\n  HEAPU32,\n/** @type {Float32Array} */\n  HEAPF32,\n/** @type {Float64Array} */\n  HEAPF64;\n\nfunction updateGlobalBufferAndViews(buf) {\n  buffer = buf;\n  Module['HEAP8'] = HEAP8 = new Int8Array(buf);\n  Module['HEAP16'] = HEAP16 = new Int16Array(buf);\n  Module['HEAP32'] = HEAP32 = new Int32Array(buf);\n  Module['HEAPU8'] = HEAPU8 = new Uint8Array(buf);\n  Module['HEAPU16'] = HEAPU16 = new Uint16Array(buf);\n  Module['HEAPU32'] = HEAPU32 = new Uint32Array(buf);\n  Module['HEAPF32'] = HEAPF32 = new Float32Array(buf);\n  Module['HEAPF64'] = HEAPF64 = new Float64Array(buf);\n}\n\nvar STATIC_BASE = 1024,\n    STACK_BASE = 5257216,\n    STACKTOP = STACK_BASE,\n    STACK_MAX = 14336,\n    DYNAMIC_BASE = 5257216,\n    DYNAMICTOP_PTR = 14176;\n\n\n\nvar TOTAL_STACK = 5242880;\n\nvar INITIAL_INITIAL_MEMORY = Module['INITIAL_MEMORY'] || 16777216;\n\n\n\n\n\n\n\n\n\n// In non-standalone/normal mode, we create the memory here.\n\n\n\n// Create the main memory. (Note: this isn't used in STANDALONE_WASM mode since the wasm\n// memory is created in the wasm, not in JS.)\n\n  if (Module['wasmMemory']) {\n    wasmMemory = Module['wasmMemory'];\n  } else\n  {\n    wasmMemory = new WebAssembly.Memory({\n      'initial': INITIAL_INITIAL_MEMORY / WASM_PAGE_SIZE\n      ,\n      'maximum': 2147483648 / WASM_PAGE_SIZE\n    });\n  }\n\n\nif (wasmMemory) {\n  buffer = wasmMemory.buffer;\n}\n\n// If the user provides an incorrect length, just use that length instead rather than providing the user to\n// specifically provide the memory length with Module['INITIAL_MEMORY'].\nINITIAL_INITIAL_MEMORY = buffer.byteLength;\nupdateGlobalBufferAndViews(buffer);\n\nHEAP32[DYNAMICTOP_PTR>>2] = DYNAMIC_BASE;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction callRuntimeCallbacks(callbacks) {\n  while(callbacks.length > 0) {\n    var callback = callbacks.shift();\n    if (typeof callback == 'function') {\n      callback(Module); // Pass the module as the first argument.\n      continue;\n    }\n    var func = callback.func;\n    if (typeof func === 'number') {\n      if (callback.arg === undefined) {\n        Module['dynCall_v'](func);\n      } else {\n        Module['dynCall_vi'](func, callback.arg);\n      }\n    } else {\n      func(callback.arg === undefined ? null : callback.arg);\n    }\n  }\n}\n\nvar __ATPRERUN__  = []; // functions called before the runtime is initialized\nvar __ATINIT__    = []; // functions called during startup\nvar __ATMAIN__    = []; // functions called when main() is to be run\nvar __ATEXIT__    = []; // functions called during shutdown\nvar __ATPOSTRUN__ = []; // functions called after the main() is called\n\nvar runtimeInitialized = false;\nvar runtimeExited = false;\n\n\nfunction preRun() {\n\n  if (Module['preRun']) {\n    if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];\n    while (Module['preRun'].length) {\n      addOnPreRun(Module['preRun'].shift());\n    }\n  }\n\n  callRuntimeCallbacks(__ATPRERUN__);\n}\n\nfunction initRuntime() {\n  runtimeInitialized = true;\n  if (!Module[\"noFSInit\"] && !FS.init.initialized) FS.init();\nTTY.init();\n  callRuntimeCallbacks(__ATINIT__);\n}\n\nfunction preMain() {\n  FS.ignorePermissions = false;\n  callRuntimeCallbacks(__ATMAIN__);\n}\n\nfunction exitRuntime() {\n  runtimeExited = true;\n}\n\nfunction postRun() {\n\n  if (Module['postRun']) {\n    if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']];\n    while (Module['postRun'].length) {\n      addOnPostRun(Module['postRun'].shift());\n    }\n  }\n\n  callRuntimeCallbacks(__ATPOSTRUN__);\n}\n\nfunction addOnPreRun(cb) {\n  __ATPRERUN__.unshift(cb);\n}\n\nfunction addOnInit(cb) {\n  __ATINIT__.unshift(cb);\n}\n\nfunction addOnPreMain(cb) {\n  __ATMAIN__.unshift(cb);\n}\n\nfunction addOnExit(cb) {\n}\n\nfunction addOnPostRun(cb) {\n  __ATPOSTRUN__.unshift(cb);\n}\n\n/** @param {number|boolean=} ignore */\nfunction unSign(value, bits, ignore) {\n  if (value >= 0) {\n    return value;\n  }\n  return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts\n                    : Math.pow(2, bits)         + value;\n}\n/** @param {number|boolean=} ignore */\nfunction reSign(value, bits, ignore) {\n  if (value <= 0) {\n    return value;\n  }\n  var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32\n                        : Math.pow(2, bits-1);\n  if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that\n                                                       // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors\n                                                       // TODO: In i64 mode 1, resign the two parts separately and safely\n    value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts\n  }\n  return value;\n}\n\n\n\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc\n\n\nvar Math_abs = Math.abs;\nvar Math_cos = Math.cos;\nvar Math_sin = Math.sin;\nvar Math_tan = Math.tan;\nvar Math_acos = Math.acos;\nvar Math_asin = Math.asin;\nvar Math_atan = Math.atan;\nvar Math_atan2 = Math.atan2;\nvar Math_exp = Math.exp;\nvar Math_log = Math.log;\nvar Math_sqrt = Math.sqrt;\nvar Math_ceil = Math.ceil;\nvar Math_floor = Math.floor;\nvar Math_pow = Math.pow;\nvar Math_imul = Math.imul;\nvar Math_fround = Math.fround;\nvar Math_round = Math.round;\nvar Math_min = Math.min;\nvar Math_max = Math.max;\nvar Math_clz32 = Math.clz32;\nvar Math_trunc = Math.trunc;\n\n\n\n// A counter of dependencies for calling run(). If we need to\n// do asynchronous work before running, increment this and\n// decrement it. Incrementing must happen in a place like\n// Module.preRun (used by emcc to add file preloading).\n// Note that you can add dependencies in preRun, even though\n// it happens right before run - run will be postponed until\n// the dependencies are met.\nvar runDependencies = 0;\nvar runDependencyWatcher = null;\nvar dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled\n\nfunction getUniqueRunDependency(id) {\n  return id;\n}\n\nfunction addRunDependency(id) {\n  runDependencies++;\n\n  if (Module['monitorRunDependencies']) {\n    Module['monitorRunDependencies'](runDependencies);\n  }\n\n}\n\nfunction removeRunDependency(id) {\n  runDependencies--;\n\n  if (Module['monitorRunDependencies']) {\n    Module['monitorRunDependencies'](runDependencies);\n  }\n\n  if (runDependencies == 0) {\n    if (runDependencyWatcher !== null) {\n      clearInterval(runDependencyWatcher);\n      runDependencyWatcher = null;\n    }\n    if (dependenciesFulfilled) {\n      var callback = dependenciesFulfilled;\n      dependenciesFulfilled = null;\n      callback(); // can add another dependenciesFulfilled\n    }\n  }\n}\n\nModule[\"preloadedImages\"] = {}; // maps url to image data\nModule[\"preloadedAudios\"] = {}; // maps url to audio data\n\n/** @param {string|number=} what */\nfunction abort(what) {\n  if (Module['onAbort']) {\n    Module['onAbort'](what);\n  }\n\n  what += '';\n  out(what);\n  err(what);\n\n  ABORT = true;\n  EXITSTATUS = 1;\n\n  what = 'abort(' + what + '). Build with -s ASSERTIONS=1 for more info.';\n\n  // Throw a wasm runtime error, because a JS error might be seen as a foreign\n  // exception, which means we'd run destructors on it. We need the error to\n  // simply make the program stop.\n  throw new WebAssembly.RuntimeError(what);\n}\n\n\nvar memoryInitializer = null;\n\n\n\n\n\n\n\n\n\n\n\n\nfunction hasPrefix(str, prefix) {\n  return String.prototype.startsWith ?\n      str.startsWith(prefix) :\n      str.indexOf(prefix) === 0;\n}\n\n// Prefix of data URIs emitted by SINGLE_FILE and related options.\nvar dataURIPrefix = 'data:application/octet-stream;base64,';\n\n// Indicates whether filename is a base64 data URI.\nfunction isDataURI(filename) {\n  return hasPrefix(filename, dataURIPrefix);\n}\n\nvar fileURIPrefix = \"file://\";\n\n// Indicates whether filename is delivered via file protocol (as opposed to http/https)\nfunction isFileURI(filename) {\n  return hasPrefix(filename, fileURIPrefix);\n}\n\n\n\n\nvar wasmBinaryFile = 'libflac.wasm';\nif (!isDataURI(wasmBinaryFile)) {\n  wasmBinaryFile = locateFile(wasmBinaryFile);\n}\n\nfunction getBinary() {\n  try {\n    if (wasmBinary) {\n      return new Uint8Array(wasmBinary);\n    }\n\n    var binary = tryParseAsDataURI(wasmBinaryFile);\n    if (binary) {\n      return binary;\n    }\n    if (readBinary) {\n      return readBinary(wasmBinaryFile);\n    } else {\n      throw \"both async and sync fetching of the wasm failed\";\n    }\n  }\n  catch (err) {\n    abort(err);\n  }\n}\n\nfunction getBinaryPromise() {\n  // If we don't have the binary yet, and have the Fetch api, use that;\n  // in some environments, like Electron's render process, Fetch api may be present, but have a different context than expected, let's only use it on the Web\n  if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && typeof fetch === 'function'\n      // Let's not use fetch to get objects over file:// as it's most likely Cordova which doesn't support fetch for file://\n      && !isFileURI(wasmBinaryFile)\n      ) {\n    return fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function(response) {\n      if (!response['ok']) {\n        throw \"failed to load wasm binary file at '\" + wasmBinaryFile + \"'\";\n      }\n      return response['arrayBuffer']();\n    }).catch(function () {\n      return getBinary();\n    });\n  }\n  // Otherwise, getBinary should be able to get it synchronously\n  return new Promise(function(resolve, reject) {\n    resolve(getBinary());\n  });\n}\n\n\n\n// Create the wasm instance.\n// Receives the wasm imports, returns the exports.\nfunction createWasm() {\n  // prepare imports\n  var info = {\n    'env': asmLibraryArg,\n    'wasi_snapshot_preview1': asmLibraryArg\n  };\n  // Load the wasm module and create an instance of using native support in the JS engine.\n  // handle a generated wasm instance, receiving its exports and\n  // performing other necessary setup\n  /** @param {WebAssembly.Module=} module*/\n  function receiveInstance(instance, module) {\n    var exports = instance.exports;\n    Module['asm'] = exports;\n    removeRunDependency('wasm-instantiate');\n  }\n  // we can't run yet (except in a pthread, where we have a custom sync instantiator)\n  addRunDependency('wasm-instantiate');\n\n\n  function receiveInstantiatedSource(output) {\n    // 'output' is a WebAssemblyInstantiatedSource object which has both the module and instance.\n    // receiveInstance() will swap in the exports (to Module.asm) so they can be called\n    // TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line.\n    // When the regression is fixed, can restore the above USE_PTHREADS-enabled path.\n    receiveInstance(output['instance']);\n  }\n\n\n  function instantiateArrayBuffer(receiver) {\n    return getBinaryPromise().then(function(binary) {\n      return WebAssembly.instantiate(binary, info);\n    }).then(receiver, function(reason) {\n      err('failed to asynchronously prepare wasm: ' + reason);\n\n\n      abort(reason);\n    });\n  }\n\n  // Prefer streaming instantiation if available.\n  function instantiateAsync() {\n    if (!wasmBinary &&\n        typeof WebAssembly.instantiateStreaming === 'function' &&\n        !isDataURI(wasmBinaryFile) &&\n        // Don't use streaming for file:// delivered objects in a webview, fetch them synchronously.\n        !isFileURI(wasmBinaryFile) &&\n        typeof fetch === 'function') {\n      fetch(wasmBinaryFile, { credentials: 'same-origin' }).then(function (response) {\n        var result = WebAssembly.instantiateStreaming(response, info);\n        return result.then(receiveInstantiatedSource, function(reason) {\n            // We expect the most common failure cause to be a bad MIME type for the binary,\n            // in which case falling back to ArrayBuffer instantiation should work.\n            err('wasm streaming compile failed: ' + reason);\n            err('falling back to ArrayBuffer instantiation');\n            return instantiateArrayBuffer(receiveInstantiatedSource);\n          });\n      });\n    } else {\n      return instantiateArrayBuffer(receiveInstantiatedSource);\n    }\n  }\n  // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback\n  // to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel\n  // to any other async startup actions they are performing.\n  if (Module['instantiateWasm']) {\n    try {\n      var exports = Module['instantiateWasm'](info, receiveInstance);\n      return exports;\n    } catch(e) {\n      err('Module.instantiateWasm callback failed with error: ' + e);\n      return false;\n    }\n  }\n\n  instantiateAsync();\n  return {}; // no exports yet; we'll fill them in later\n}\n\n\n// Globals used by JS i64 conversions\nvar tempDouble;\nvar tempI64;\n\n// === Body ===\n\nvar ASM_CONSTS = {\n  \n};\n\n\n\n\n// STATICTOP = STATIC_BASE + 13312;\n/* global initializers */  __ATINIT__.push({ func: function() { ___wasm_call_ctors() } });\n\n\n\n\n/* no memory initializer */\n// {{PRE_LIBRARY}}\n\n\n  function demangle(func) {\n      return func;\n    }\n\n  function demangleAll(text) {\n      var regex =\n        /\\b_Z[\\w\\d_]+/g;\n      return text.replace(regex,\n        function(x) {\n          var y = demangle(x);\n          return x === y ? x : (y + ' [' + x + ']');\n        });\n    }\n\n  function jsStackTrace() {\n      var err = new Error();\n      if (!err.stack) {\n        // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown,\n        // so try that as a special-case.\n        try {\n          throw new Error();\n        } catch(e) {\n          err = e;\n        }\n        if (!err.stack) {\n          return '(no stack trace available)';\n        }\n      }\n      return err.stack.toString();\n    }\n\n  function stackTrace() {\n      var js = jsStackTrace();\n      if (Module['extraStackTrace']) js += '\\n' + Module['extraStackTrace']();\n      return demangleAll(js);\n    }\n\n  function _emscripten_get_sbrk_ptr() {\n      return 14176;\n    }\n\n  function _emscripten_memcpy_big(dest, src, num) {\n      HEAPU8.copyWithin(dest, src, src + num);\n    }\n\n  \n  function _emscripten_get_heap_size() {\n      return HEAPU8.length;\n    }\n  \n  function emscripten_realloc_buffer(size) {\n      try {\n        // round size grow request up to wasm page size (fixed 64KB per spec)\n        wasmMemory.grow((size - buffer.byteLength + 65535) >>> 16); // .grow() takes a delta compared to the previous size\n        updateGlobalBufferAndViews(wasmMemory.buffer);\n        return 1 /*success*/;\n      } catch(e) {\n      }\n    }function _emscripten_resize_heap(requestedSize) {\n      requestedSize = requestedSize >>> 0;\n      var oldSize = _emscripten_get_heap_size();\n      // With pthreads, races can happen (another thread might increase the size in between), so return a failure, and let the caller retry.\n  \n  \n      var PAGE_MULTIPLE = 65536;\n  \n      // Memory resize rules:\n      // 1. When resizing, always produce a resized heap that is at least 16MB (to avoid tiny heap sizes receiving lots of repeated resizes at startup)\n      // 2. Always increase heap size to at least the requested size, rounded up to next page multiple.\n      // 3a. If MEMORY_GROWTH_LINEAR_STEP == -1, excessively resize the heap geometrically: increase the heap size according to \n      //                                         MEMORY_GROWTH_GEOMETRIC_STEP factor (default +20%),\n      //                                         At most overreserve by MEMORY_GROWTH_GEOMETRIC_CAP bytes (default 96MB).\n      // 3b. If MEMORY_GROWTH_LINEAR_STEP != -1, excessively resize the heap linearly: increase the heap size by at least MEMORY_GROWTH_LINEAR_STEP bytes.\n      // 4. Max size for the heap is capped at 2048MB-PAGE_MULTIPLE, or by MAXIMUM_MEMORY, or by ASAN limit, depending on which is smallest\n      // 5. If we were unable to allocate as much memory, it may be due to over-eager decision to excessively reserve due to (3) above.\n      //    Hence if an allocation fails, cut down on the amount of excess growth, in an attempt to succeed to perform a smaller allocation.\n  \n      // A limit was set for how much we can grow. We should not exceed that\n      // (the wasm binary specifies it, so if we tried, we'd fail anyhow).\n      var maxHeapSize = 2147483648;\n      if (requestedSize > maxHeapSize) {\n        return false;\n      }\n  \n      var minHeapSize = 16777216;\n  \n      // Loop through potential heap size increases. If we attempt a too eager reservation that fails, cut down on the\n      // attempted size and reserve a smaller bump instead. (max 3 times, chosen somewhat arbitrarily)\n      for(var cutDown = 1; cutDown <= 4; cutDown *= 2) {\n        var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); // ensure geometric growth\n        // but limit overreserving (default to capping at +96MB overgrowth at most)\n        overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296 );\n  \n  \n        var newSize = Math.min(maxHeapSize, alignUp(Math.max(minHeapSize, requestedSize, overGrownHeapSize), PAGE_MULTIPLE));\n  \n        var replacement = emscripten_realloc_buffer(newSize);\n        if (replacement) {\n  \n          return true;\n        }\n      }\n      return false;\n    }\n\n  \n  \n  var PATH={splitPath:function(filename) {\n        var splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\n        return splitPathRe.exec(filename).slice(1);\n      },normalizeArray:function(parts, allowAboveRoot) {\n        // if the path tries to go above the root, `up` ends up > 0\n        var up = 0;\n        for (var i = parts.length - 1; i >= 0; i--) {\n          var last = parts[i];\n          if (last === '.') {\n            parts.splice(i, 1);\n          } else if (last === '..') {\n            parts.splice(i, 1);\n            up++;\n          } else if (up) {\n            parts.splice(i, 1);\n            up--;\n          }\n        }\n        // if the path is allowed to go above the root, restore leading ..s\n        if (allowAboveRoot) {\n          for (; up; up--) {\n            parts.unshift('..');\n          }\n        }\n        return parts;\n      },normalize:function(path) {\n        var isAbsolute = path.charAt(0) === '/',\n            trailingSlash = path.substr(-1) === '/';\n        // Normalize the path\n        path = PATH.normalizeArray(path.split('/').filter(function(p) {\n          return !!p;\n        }), !isAbsolute).join('/');\n        if (!path && !isAbsolute) {\n          path = '.';\n        }\n        if (path && trailingSlash) {\n          path += '/';\n        }\n        return (isAbsolute ? '/' : '') + path;\n      },dirname:function(path) {\n        var result = PATH.splitPath(path),\n            root = result[0],\n            dir = result[1];\n        if (!root && !dir) {\n          // No dirname whatsoever\n          return '.';\n        }\n        if (dir) {\n          // It has a dirname, strip trailing slash\n          dir = dir.substr(0, dir.length - 1);\n        }\n        return root + dir;\n      },basename:function(path) {\n        // EMSCRIPTEN return '/'' for '/', not an empty string\n        if (path === '/') return '/';\n        var lastSlash = path.lastIndexOf('/');\n        if (lastSlash === -1) return path;\n        return path.substr(lastSlash+1);\n      },extname:function(path) {\n        return PATH.splitPath(path)[3];\n      },join:function() {\n        var paths = Array.prototype.slice.call(arguments, 0);\n        return PATH.normalize(paths.join('/'));\n      },join2:function(l, r) {\n        return PATH.normalize(l + '/' + r);\n      }};\n  \n  \n  function setErrNo(value) {\n      HEAP32[((___errno_location())>>2)]=value;\n      return value;\n    }\n  \n  var PATH_FS={resolve:function() {\n        var resolvedPath = '',\n          resolvedAbsolute = false;\n        for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n          var path = (i >= 0) ? arguments[i] : FS.cwd();\n          // Skip empty and invalid entries\n          if (typeof path !== 'string') {\n            throw new TypeError('Arguments to path.resolve must be strings');\n          } else if (!path) {\n            return ''; // an invalid portion invalidates the whole thing\n          }\n          resolvedPath = path + '/' + resolvedPath;\n          resolvedAbsolute = path.charAt(0) === '/';\n        }\n        // At this point the path should be resolved to a full absolute path, but\n        // handle relative paths to be safe (might happen when process.cwd() fails)\n        resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) {\n          return !!p;\n        }), !resolvedAbsolute).join('/');\n        return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n      },relative:function(from, to) {\n        from = PATH_FS.resolve(from).substr(1);\n        to = PATH_FS.resolve(to).substr(1);\n        function trim(arr) {\n          var start = 0;\n          for (; start < arr.length; start++) {\n            if (arr[start] !== '') break;\n          }\n          var end = arr.length - 1;\n          for (; end >= 0; end--) {\n            if (arr[end] !== '') break;\n          }\n          if (start > end) return [];\n          return arr.slice(start, end - start + 1);\n        }\n        var fromParts = trim(from.split('/'));\n        var toParts = trim(to.split('/'));\n        var length = Math.min(fromParts.length, toParts.length);\n        var samePartsLength = length;\n        for (var i = 0; i < length; i++) {\n          if (fromParts[i] !== toParts[i]) {\n            samePartsLength = i;\n            break;\n          }\n        }\n        var outputParts = [];\n        for (var i = samePartsLength; i < fromParts.length; i++) {\n          outputParts.push('..');\n        }\n        outputParts = outputParts.concat(toParts.slice(samePartsLength));\n        return outputParts.join('/');\n      }};\n  \n  var TTY={ttys:[],init:function () {\n        // https://github.com/emscripten-core/emscripten/pull/1555\n        // if (ENVIRONMENT_IS_NODE) {\n        //   // currently, FS.init does not distinguish if process.stdin is a file or TTY\n        //   // device, it always assumes it's a TTY device. because of this, we're forcing\n        //   // process.stdin to UTF8 encoding to at least make stdin reading compatible\n        //   // with text files until FS.init can be refactored.\n        //   process['stdin']['setEncoding']('utf8');\n        // }\n      },shutdown:function() {\n        // https://github.com/emscripten-core/emscripten/pull/1555\n        // if (ENVIRONMENT_IS_NODE) {\n        //   // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)?\n        //   // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation\n        //   // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists?\n        //   // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle\n        //   // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call\n        //   process['stdin']['pause']();\n        // }\n      },register:function(dev, ops) {\n        TTY.ttys[dev] = { input: [], output: [], ops: ops };\n        FS.registerDevice(dev, TTY.stream_ops);\n      },stream_ops:{open:function(stream) {\n          var tty = TTY.ttys[stream.node.rdev];\n          if (!tty) {\n            throw new FS.ErrnoError(43);\n          }\n          stream.tty = tty;\n          stream.seekable = false;\n        },close:function(stream) {\n          // flush any pending line data\n          stream.tty.ops.flush(stream.tty);\n        },flush:function(stream) {\n          stream.tty.ops.flush(stream.tty);\n        },read:function(stream, buffer, offset, length, pos /* ignored */) {\n          if (!stream.tty || !stream.tty.ops.get_char) {\n            throw new FS.ErrnoError(60);\n          }\n          var bytesRead = 0;\n          for (var i = 0; i < length; i++) {\n            var result;\n            try {\n              result = stream.tty.ops.get_char(stream.tty);\n            } catch (e) {\n              throw new FS.ErrnoError(29);\n            }\n            if (result === undefined && bytesRead === 0) {\n              throw new FS.ErrnoError(6);\n            }\n            if (result === null || result === undefined) break;\n            bytesRead++;\n            buffer[offset+i] = result;\n          }\n          if (bytesRead) {\n            stream.node.timestamp = Date.now();\n          }\n          return bytesRead;\n        },write:function(stream, buffer, offset, length, pos) {\n          if (!stream.tty || !stream.tty.ops.put_char) {\n            throw new FS.ErrnoError(60);\n          }\n          try {\n            for (var i = 0; i < length; i++) {\n              stream.tty.ops.put_char(stream.tty, buffer[offset+i]);\n            }\n          } catch (e) {\n            throw new FS.ErrnoError(29);\n          }\n          if (length) {\n            stream.node.timestamp = Date.now();\n          }\n          return i;\n        }},default_tty_ops:{get_char:function(tty) {\n          if (!tty.input.length) {\n            var result = null;\n            if (ENVIRONMENT_IS_NODE) {\n              // we will read data by chunks of BUFSIZE\n              var BUFSIZE = 256;\n              var buf = Buffer.alloc ? Buffer.alloc(BUFSIZE) : new Buffer(BUFSIZE);\n              var bytesRead = 0;\n  \n              try {\n                bytesRead = nodeFS.readSync(process.stdin.fd, buf, 0, BUFSIZE, null);\n              } catch(e) {\n                // Cross-platform differences: on Windows, reading EOF throws an exception, but on other OSes,\n                // reading EOF returns 0. Uniformize behavior by treating the EOF exception to return 0.\n                if (e.toString().indexOf('EOF') != -1) bytesRead = 0;\n                else throw e;\n              }\n  \n              if (bytesRead > 0) {\n                result = buf.slice(0, bytesRead).toString('utf-8');\n              } else {\n                result = null;\n              }\n            } else\n            if (typeof window != 'undefined' &&\n              typeof window.prompt == 'function') {\n              // Browser.\n              result = window.prompt('Input: ');  // returns null on cancel\n              if (result !== null) {\n                result += '\\n';\n              }\n            } else if (typeof readline == 'function') {\n              // Command line.\n              result = readline();\n              if (result !== null) {\n                result += '\\n';\n              }\n            }\n            if (!result) {\n              return null;\n            }\n            tty.input = intArrayFromString(result, true);\n          }\n          return tty.input.shift();\n        },put_char:function(tty, val) {\n          if (val === null || val === 10) {\n            out(UTF8ArrayToString(tty.output, 0));\n            tty.output = [];\n          } else {\n            if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle.\n          }\n        },flush:function(tty) {\n          if (tty.output && tty.output.length > 0) {\n            out(UTF8ArrayToString(tty.output, 0));\n            tty.output = [];\n          }\n        }},default_tty1_ops:{put_char:function(tty, val) {\n          if (val === null || val === 10) {\n            err(UTF8ArrayToString(tty.output, 0));\n            tty.output = [];\n          } else {\n            if (val != 0) tty.output.push(val);\n          }\n        },flush:function(tty) {\n          if (tty.output && tty.output.length > 0) {\n            err(UTF8ArrayToString(tty.output, 0));\n            tty.output = [];\n          }\n        }}};\n  \n  var MEMFS={ops_table:null,mount:function(mount) {\n        return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0);\n      },createNode:function(parent, name, mode, dev) {\n        if (FS.isBlkdev(mode) || FS.isFIFO(mode)) {\n          // no supported\n          throw new FS.ErrnoError(63);\n        }\n        if (!MEMFS.ops_table) {\n          MEMFS.ops_table = {\n            dir: {\n              node: {\n                getattr: MEMFS.node_ops.getattr,\n                setattr: MEMFS.node_ops.setattr,\n                lookup: MEMFS.node_ops.lookup,\n                mknod: MEMFS.node_ops.mknod,\n                rename: MEMFS.node_ops.rename,\n                unlink: MEMFS.node_ops.unlink,\n                rmdir: MEMFS.node_ops.rmdir,\n                readdir: MEMFS.node_ops.readdir,\n                symlink: MEMFS.node_ops.symlink\n              },\n              stream: {\n                llseek: MEMFS.stream_ops.llseek\n              }\n            },\n            file: {\n              node: {\n                getattr: MEMFS.node_ops.getattr,\n                setattr: MEMFS.node_ops.setattr\n              },\n              stream: {\n                llseek: MEMFS.stream_ops.llseek,\n                read: MEMFS.stream_ops.read,\n                write: MEMFS.stream_ops.write,\n                allocate: MEMFS.stream_ops.allocate,\n                mmap: MEMFS.stream_ops.mmap,\n                msync: MEMFS.stream_ops.msync\n              }\n            },\n            link: {\n              node: {\n                getattr: MEMFS.node_ops.getattr,\n                setattr: MEMFS.node_ops.setattr,\n                readlink: MEMFS.node_ops.readlink\n              },\n              stream: {}\n            },\n            chrdev: {\n              node: {\n                getattr: MEMFS.node_ops.getattr,\n                setattr: MEMFS.node_ops.setattr\n              },\n              stream: FS.chrdev_stream_ops\n            }\n          };\n        }\n        var node = FS.createNode(parent, name, mode, dev);\n        if (FS.isDir(node.mode)) {\n          node.node_ops = MEMFS.ops_table.dir.node;\n          node.stream_ops = MEMFS.ops_table.dir.stream;\n          node.contents = {};\n        } else if (FS.isFile(node.mode)) {\n          node.node_ops = MEMFS.ops_table.file.node;\n          node.stream_ops = MEMFS.ops_table.file.stream;\n          node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity.\n          // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred\n          // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size\n          // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme.\n          node.contents = null; \n        } else if (FS.isLink(node.mode)) {\n          node.node_ops = MEMFS.ops_table.link.node;\n          node.stream_ops = MEMFS.ops_table.link.stream;\n        } else if (FS.isChrdev(node.mode)) {\n          node.node_ops = MEMFS.ops_table.chrdev.node;\n          node.stream_ops = MEMFS.ops_table.chrdev.stream;\n        }\n        node.timestamp = Date.now();\n        // add the new node to the parent\n        if (parent) {\n          parent.contents[name] = node;\n        }\n        return node;\n      },getFileDataAsRegularArray:function(node) {\n        if (node.contents && node.contents.subarray) {\n          var arr = [];\n          for (var i = 0; i < node.usedBytes; ++i) arr.push(node.contents[i]);\n          return arr; // Returns a copy of the original data.\n        }\n        return node.contents; // No-op, the file contents are already in a JS array. Return as-is.\n      },getFileDataAsTypedArray:function(node) {\n        if (!node.contents) return new Uint8Array(0);\n        if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes.\n        return new Uint8Array(node.contents);\n      },expandFileStorage:function(node, newCapacity) {\n        var prevCapacity = node.contents ? node.contents.length : 0;\n        if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough.\n        // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity.\n        // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to\n        // avoid overshooting the allocation cap by a very large margin.\n        var CAPACITY_DOUBLING_MAX = 1024 * 1024;\n        newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) >>> 0);\n        if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding.\n        var oldContents = node.contents;\n        node.contents = new Uint8Array(newCapacity); // Allocate new storage.\n        if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage.\n        return;\n      },resizeFileStorage:function(node, newSize) {\n        if (node.usedBytes == newSize) return;\n        if (newSize == 0) {\n          node.contents = null; // Fully decommit when requesting a resize to zero.\n          node.usedBytes = 0;\n          return;\n        }\n        if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store.\n          var oldContents = node.contents;\n          node.contents = new Uint8Array(newSize); // Allocate new storage.\n          if (oldContents) {\n            node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage.\n          }\n          node.usedBytes = newSize;\n          return;\n        }\n        // Backing with a JS array.\n        if (!node.contents) node.contents = [];\n        if (node.contents.length > newSize) node.contents.length = newSize;\n        else while (node.contents.length < newSize) node.contents.push(0);\n        node.usedBytes = newSize;\n      },node_ops:{getattr:function(node) {\n          var attr = {};\n          // device numbers reuse inode numbers.\n          attr.dev = FS.isChrdev(node.mode) ? node.id : 1;\n          attr.ino = node.id;\n          attr.mode = node.mode;\n          attr.nlink = 1;\n          attr.uid = 0;\n          attr.gid = 0;\n          attr.rdev = node.rdev;\n          if (FS.isDir(node.mode)) {\n            attr.size = 4096;\n          } else if (FS.isFile(node.mode)) {\n            attr.size = node.usedBytes;\n          } else if (FS.isLink(node.mode)) {\n            attr.size = node.link.length;\n          } else {\n            attr.size = 0;\n          }\n          attr.atime = new Date(node.timestamp);\n          attr.mtime = new Date(node.timestamp);\n          attr.ctime = new Date(node.timestamp);\n          // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize),\n          //       but this is not required by the standard.\n          attr.blksize = 4096;\n          attr.blocks = Math.ceil(attr.size / attr.blksize);\n          return attr;\n        },setattr:function(node, attr) {\n          if (attr.mode !== undefined) {\n            node.mode = attr.mode;\n          }\n          if (attr.timestamp !== undefined) {\n            node.timestamp = attr.timestamp;\n          }\n          if (attr.size !== undefined) {\n            MEMFS.resizeFileStorage(node, attr.size);\n          }\n        },lookup:function(parent, name) {\n          throw FS.genericErrors[44];\n        },mknod:function(parent, name, mode, dev) {\n          return MEMFS.createNode(parent, name, mode, dev);\n        },rename:function(old_node, new_dir, new_name) {\n          // if we're overwriting a directory at new_name, make sure it's empty.\n          if (FS.isDir(old_node.mode)) {\n            var new_node;\n            try {\n              new_node = FS.lookupNode(new_dir, new_name);\n            } catch (e) {\n            }\n            if (new_node) {\n              for (var i in new_node.contents) {\n                throw new FS.ErrnoError(55);\n              }\n            }\n          }\n          // do the internal rewiring\n          delete old_node.parent.contents[old_node.name];\n          old_node.name = new_name;\n          new_dir.contents[new_name] = old_node;\n          old_node.parent = new_dir;\n        },unlink:function(parent, name) {\n          delete parent.contents[name];\n        },rmdir:function(parent, name) {\n          var node = FS.lookupNode(parent, name);\n          for (var i in node.contents) {\n            throw new FS.ErrnoError(55);\n          }\n          delete parent.contents[name];\n        },readdir:function(node) {\n          var entries = ['.', '..'];\n          for (var key in node.contents) {\n            if (!node.contents.hasOwnProperty(key)) {\n              continue;\n            }\n            entries.push(key);\n          }\n          return entries;\n        },symlink:function(parent, newname, oldpath) {\n          var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0);\n          node.link = oldpath;\n          return node;\n        },readlink:function(node) {\n          if (!FS.isLink(node.mode)) {\n            throw new FS.ErrnoError(28);\n          }\n          return node.link;\n        }},stream_ops:{read:function(stream, buffer, offset, length, position) {\n          var contents = stream.node.contents;\n          if (position >= stream.node.usedBytes) return 0;\n          var size = Math.min(stream.node.usedBytes - position, length);\n          if (size > 8 && contents.subarray) { // non-trivial, and typed array\n            buffer.set(contents.subarray(position, position + size), offset);\n          } else {\n            for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i];\n          }\n          return size;\n        },write:function(stream, buffer, offset, length, position, canOwn) {\n          // If the buffer is located in main memory (HEAP), and if\n          // memory can grow, we can't hold on to references of the\n          // memory buffer, as they may get invalidated. That means we\n          // need to do copy its contents.\n          if (buffer.buffer === HEAP8.buffer) {\n            canOwn = false;\n          }\n  \n          if (!length) return 0;\n          var node = stream.node;\n          node.timestamp = Date.now();\n  \n          if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array?\n            if (canOwn) {\n              node.contents = buffer.subarray(offset, offset + length);\n              node.usedBytes = length;\n              return length;\n            } else if (node.usedBytes === 0 && position === 0) { // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data.\n              node.contents = buffer.slice(offset, offset + length);\n              node.usedBytes = length;\n              return length;\n            } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file?\n              node.contents.set(buffer.subarray(offset, offset + length), position);\n              return length;\n            }\n          }\n  \n          // Appending to an existing file and we need to reallocate, or source data did not come as a typed array.\n          MEMFS.expandFileStorage(node, position+length);\n          if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available.\n          else {\n            for (var i = 0; i < length; i++) {\n             node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not.\n            }\n          }\n          node.usedBytes = Math.max(node.usedBytes, position + length);\n          return length;\n        },llseek:function(stream, offset, whence) {\n          var position = offset;\n          if (whence === 1) {\n            position += stream.position;\n          } else if (whence === 2) {\n            if (FS.isFile(stream.node.mode)) {\n              position += stream.node.usedBytes;\n            }\n          }\n          if (position < 0) {\n            throw new FS.ErrnoError(28);\n          }\n          return position;\n        },allocate:function(stream, offset, length) {\n          MEMFS.expandFileStorage(stream.node, offset + length);\n          stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length);\n        },mmap:function(stream, address, length, position, prot, flags) {\n          // We don't currently support location hints for the address of the mapping\n          assert(address === 0);\n  \n          if (!FS.isFile(stream.node.mode)) {\n            throw new FS.ErrnoError(43);\n          }\n          var ptr;\n          var allocated;\n          var contents = stream.node.contents;\n          // Only make a new copy when MAP_PRIVATE is specified.\n          if (!(flags & 2) && contents.buffer === buffer) {\n            // We can't emulate MAP_SHARED when the file is not backed by the buffer\n            // we're mapping to (e.g. the HEAP buffer).\n            allocated = false;\n            ptr = contents.byteOffset;\n          } else {\n            // Try to avoid unnecessary slices.\n            if (position > 0 || position + length < contents.length) {\n              if (contents.subarray) {\n                contents = contents.subarray(position, position + length);\n              } else {\n                contents = Array.prototype.slice.call(contents, position, position + length);\n              }\n            }\n            allocated = true;\n            ptr = _malloc(length);\n            if (!ptr) {\n              throw new FS.ErrnoError(48);\n            }\n            HEAP8.set(contents, ptr);\n          }\n          return { ptr: ptr, allocated: allocated };\n        },msync:function(stream, buffer, offset, length, mmapFlags) {\n          if (!FS.isFile(stream.node.mode)) {\n            throw new FS.ErrnoError(43);\n          }\n          if (mmapFlags & 2) {\n            // MAP_PRIVATE calls need not to be synced back to underlying fs\n            return 0;\n          }\n  \n          var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false);\n          // should we check if bytesWritten and length are the same?\n          return 0;\n        }}};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:\"/\",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e) {\n        if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace();\n        return setErrNo(e.errno);\n      },lookupPath:function(path, opts) {\n        path = PATH_FS.resolve(FS.cwd(), path);\n        opts = opts || {};\n  \n        if (!path) return { path: '', node: null };\n  \n        var defaults = {\n          follow_mount: true,\n          recurse_count: 0\n        };\n        for (var key in defaults) {\n          if (opts[key] === undefined) {\n            opts[key] = defaults[key];\n          }\n        }\n  \n        if (opts.recurse_count > 8) {  // max recursive lookup of 8\n          throw new FS.ErrnoError(32);\n        }\n  \n        // split the path\n        var parts = PATH.normalizeArray(path.split('/').filter(function(p) {\n          return !!p;\n        }), false);\n  \n        // start at the root\n        var current = FS.root;\n        var current_path = '/';\n  \n        for (var i = 0; i < parts.length; i++) {\n          var islast = (i === parts.length-1);\n          if (islast && opts.parent) {\n            // stop resolving\n            break;\n          }\n  \n          current = FS.lookupNode(current, parts[i]);\n          current_path = PATH.join2(current_path, parts[i]);\n  \n          // jump to the mount's root node if this is a mountpoint\n          if (FS.isMountpoint(current)) {\n            if (!islast || (islast && opts.follow_mount)) {\n              current = current.mounted.root;\n            }\n          }\n  \n          // by default, lookupPath will not follow a symlink if it is the final path component.\n          // setting opts.follow = true will override this behavior.\n          if (!islast || opts.follow) {\n            var count = 0;\n            while (FS.isLink(current.mode)) {\n              var link = FS.readlink(current_path);\n              current_path = PATH_FS.resolve(PATH.dirname(current_path), link);\n  \n              var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count });\n              current = lookup.node;\n  \n              if (count++ > 40) {  // limit max consecutive symlinks to 40 (SYMLOOP_MAX).\n                throw new FS.ErrnoError(32);\n              }\n            }\n          }\n        }\n  \n        return { path: current_path, node: current };\n      },getPath:function(node) {\n        var path;\n        while (true) {\n          if (FS.isRoot(node)) {\n            var mount = node.mount.mountpoint;\n            if (!path) return mount;\n            return mount[mount.length-1] !== '/' ? mount + '/' + path : mount + path;\n          }\n          path = path ? node.name + '/' + path : node.name;\n          node = node.parent;\n        }\n      },hashName:function(parentid, name) {\n        var hash = 0;\n  \n  \n        for (var i = 0; i < name.length; i++) {\n          hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0;\n        }\n        return ((parentid + hash) >>> 0) % FS.nameTable.length;\n      },hashAddNode:function(node) {\n        var hash = FS.hashName(node.parent.id, node.name);\n        node.name_next = FS.nameTable[hash];\n        FS.nameTable[hash] = node;\n      },hashRemoveNode:function(node) {\n        var hash = FS.hashName(node.parent.id, node.name);\n        if (FS.nameTable[hash] === node) {\n          FS.nameTable[hash] = node.name_next;\n        } else {\n          var current = FS.nameTable[hash];\n          while (current) {\n            if (current.name_next === node) {\n              current.name_next = node.name_next;\n              break;\n            }\n            current = current.name_next;\n          }\n        }\n      },lookupNode:function(parent, name) {\n        var errCode = FS.mayLookup(parent);\n        if (errCode) {\n          throw new FS.ErrnoError(errCode, parent);\n        }\n        var hash = FS.hashName(parent.id, name);\n        for (var node = FS.nameTable[hash]; node; node = node.name_next) {\n          var nodeName = node.name;\n          if (node.parent.id === parent.id && nodeName === name) {\n            return node;\n          }\n        }\n        // if we failed to find it in the cache, call into the VFS\n        return FS.lookup(parent, name);\n      },createNode:function(parent, name, mode, rdev) {\n        var node = new FS.FSNode(parent, name, mode, rdev);\n  \n        FS.hashAddNode(node);\n  \n        return node;\n      },destroyNode:function(node) {\n        FS.hashRemoveNode(node);\n      },isRoot:function(node) {\n        return node === node.parent;\n      },isMountpoint:function(node) {\n        return !!node.mounted;\n      },isFile:function(mode) {\n        return (mode & 61440) === 32768;\n      },isDir:function(mode) {\n        return (mode & 61440) === 16384;\n      },isLink:function(mode) {\n        return (mode & 61440) === 40960;\n      },isChrdev:function(mode) {\n        return (mode & 61440) === 8192;\n      },isBlkdev:function(mode) {\n        return (mode & 61440) === 24576;\n      },isFIFO:function(mode) {\n        return (mode & 61440) === 4096;\n      },isSocket:function(mode) {\n        return (mode & 49152) === 49152;\n      },flagModes:{\"r\":0,\"rs\":1052672,\"r+\":2,\"w\":577,\"wx\":705,\"xw\":705,\"w+\":578,\"wx+\":706,\"xw+\":706,\"a\":1089,\"ax\":1217,\"xa\":1217,\"a+\":1090,\"ax+\":1218,\"xa+\":1218},modeStringToFlags:function(str) {\n        var flags = FS.flagModes[str];\n        if (typeof flags === 'undefined') {\n          throw new Error('Unknown file open mode: ' + str);\n        }\n        return flags;\n      },flagsToPermissionString:function(flag) {\n        var perms = ['r', 'w', 'rw'][flag & 3];\n        if ((flag & 512)) {\n          perms += 'w';\n        }\n        return perms;\n      },nodePermissions:function(node, perms) {\n        if (FS.ignorePermissions) {\n          return 0;\n        }\n        // return 0 if any user, group or owner bits are set.\n        if (perms.indexOf('r') !== -1 && !(node.mode & 292)) {\n          return 2;\n        } else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) {\n          return 2;\n        } else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) {\n          return 2;\n        }\n        return 0;\n      },mayLookup:function(dir) {\n        var errCode = FS.nodePermissions(dir, 'x');\n        if (errCode) return errCode;\n        if (!dir.node_ops.lookup) return 2;\n        return 0;\n      },mayCreate:function(dir, name) {\n        try {\n          var node = FS.lookupNode(dir, name);\n          return 20;\n        } catch (e) {\n        }\n        return FS.nodePermissions(dir, 'wx');\n      },mayDelete:function(dir, name, isdir) {\n        var node;\n        try {\n          node = FS.lookupNode(dir, name);\n        } catch (e) {\n          return e.errno;\n        }\n        var errCode = FS.nodePermissions(dir, 'wx');\n        if (errCode) {\n          return errCode;\n        }\n        if (isdir) {\n          if (!FS.isDir(node.mode)) {\n            return 54;\n          }\n          if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) {\n            return 10;\n          }\n        } else {\n          if (FS.isDir(node.mode)) {\n            return 31;\n          }\n        }\n        return 0;\n      },mayOpen:function(node, flags) {\n        if (!node) {\n          return 44;\n        }\n        if (FS.isLink(node.mode)) {\n          return 32;\n        } else if (FS.isDir(node.mode)) {\n          if (FS.flagsToPermissionString(flags) !== 'r' || // opening for write\n              (flags & 512)) { // TODO: check for O_SEARCH? (== search for dir only)\n            return 31;\n          }\n        }\n        return FS.nodePermissions(node, FS.flagsToPermissionString(flags));\n      },MAX_OPEN_FDS:4096,nextfd:function(fd_start, fd_end) {\n        fd_start = fd_start || 0;\n        fd_end = fd_end || FS.MAX_OPEN_FDS;\n        for (var fd = fd_start; fd <= fd_end; fd++) {\n          if (!FS.streams[fd]) {\n            return fd;\n          }\n        }\n        throw new FS.ErrnoError(33);\n      },getStream:function(fd) {\n        return FS.streams[fd];\n      },createStream:function(stream, fd_start, fd_end) {\n        if (!FS.FSStream) {\n          FS.FSStream = /** @constructor */ function(){};\n          FS.FSStream.prototype = {\n            object: {\n              get: function() { return this.node; },\n              set: function(val) { this.node = val; }\n            },\n            isRead: {\n              get: function() { return (this.flags & 2097155) !== 1; }\n            },\n            isWrite: {\n              get: function() { return (this.flags & 2097155) !== 0; }\n            },\n            isAppend: {\n              get: function() { return (this.flags & 1024); }\n            }\n          };\n        }\n        // clone it, so we can return an instance of FSStream\n        var newStream = new FS.FSStream();\n        for (var p in stream) {\n          newStream[p] = stream[p];\n        }\n        stream = newStream;\n        var fd = FS.nextfd(fd_start, fd_end);\n        stream.fd = fd;\n        FS.streams[fd] = stream;\n        return stream;\n      },closeStream:function(fd) {\n        FS.streams[fd] = null;\n      },chrdev_stream_ops:{open:function(stream) {\n          var device = FS.getDevice(stream.node.rdev);\n          // override node's stream ops with the device's\n          stream.stream_ops = device.stream_ops;\n          // forward the open call\n          if (stream.stream_ops.open) {\n            stream.stream_ops.open(stream);\n          }\n        },llseek:function() {\n          throw new FS.ErrnoError(70);\n        }},major:function(dev) {\n        return ((dev) >> 8);\n      },minor:function(dev) {\n        return ((dev) & 0xff);\n      },makedev:function(ma, mi) {\n        return ((ma) << 8 | (mi));\n      },registerDevice:function(dev, ops) {\n        FS.devices[dev] = { stream_ops: ops };\n      },getDevice:function(dev) {\n        return FS.devices[dev];\n      },getMounts:function(mount) {\n        var mounts = [];\n        var check = [mount];\n  \n        while (check.length) {\n          var m = check.pop();\n  \n          mounts.push(m);\n  \n          check.push.apply(check, m.mounts);\n        }\n  \n        return mounts;\n      },syncfs:function(populate, callback) {\n        if (typeof(populate) === 'function') {\n          callback = populate;\n          populate = false;\n        }\n  \n        FS.syncFSRequests++;\n  \n        if (FS.syncFSRequests > 1) {\n          err('warning: ' + FS.syncFSRequests + ' FS.syncfs operations in flight at once, probably just doing extra work');\n        }\n  \n        var mounts = FS.getMounts(FS.root.mount);\n        var completed = 0;\n  \n        function doCallback(errCode) {\n          FS.syncFSRequests--;\n          return callback(errCode);\n        }\n  \n        function done(errCode) {\n          if (errCode) {\n            if (!done.errored) {\n              done.errored = true;\n              return doCallback(errCode);\n            }\n            return;\n          }\n          if (++completed >= mounts.length) {\n            doCallback(null);\n          }\n        };\n  \n        // sync all mounts\n        mounts.forEach(function (mount) {\n          if (!mount.type.syncfs) {\n            return done(null);\n          }\n          mount.type.syncfs(mount, populate, done);\n        });\n      },mount:function(type, opts, mountpoint) {\n        var root = mountpoint === '/';\n        var pseudo = !mountpoint;\n        var node;\n  \n        if (root && FS.root) {\n          throw new FS.ErrnoError(10);\n        } else if (!root && !pseudo) {\n          var lookup = FS.lookupPath(mountpoint, { follow_mount: false });\n  \n          mountpoint = lookup.path;  // use the absolute path\n          node = lookup.node;\n  \n          if (FS.isMountpoint(node)) {\n            throw new FS.ErrnoError(10);\n          }\n  \n          if (!FS.isDir(node.mode)) {\n            throw new FS.ErrnoError(54);\n          }\n        }\n  \n        var mount = {\n          type: type,\n          opts: opts,\n          mountpoint: mountpoint,\n          mounts: []\n        };\n  \n        // create a root node for the fs\n        var mountRoot = type.mount(mount);\n        mountRoot.mount = mount;\n        mount.root = mountRoot;\n  \n        if (root) {\n          FS.root = mountRoot;\n        } else if (node) {\n          // set as a mountpoint\n          node.mounted = mount;\n  \n          // add the new mount to the current mount's children\n          if (node.mount) {\n            node.mount.mounts.push(mount);\n          }\n        }\n  \n        return mountRoot;\n      },unmount:function (mountpoint) {\n        var lookup = FS.lookupPath(mountpoint, { follow_mount: false });\n  \n        if (!FS.isMountpoint(lookup.node)) {\n          throw new FS.ErrnoError(28);\n        }\n  \n        // destroy the nodes for this mount, and all its child mounts\n        var node = lookup.node;\n        var mount = node.mounted;\n        var mounts = FS.getMounts(mount);\n  \n        Object.keys(FS.nameTable).forEach(function (hash) {\n          var current = FS.nameTable[hash];\n  \n          while (current) {\n            var next = current.name_next;\n  \n            if (mounts.indexOf(current.mount) !== -1) {\n              FS.destroyNode(current);\n            }\n  \n            current = next;\n          }\n        });\n  \n        // no longer a mountpoint\n        node.mounted = null;\n  \n        // remove this mount from the child mounts\n        var idx = node.mount.mounts.indexOf(mount);\n        node.mount.mounts.splice(idx, 1);\n      },lookup:function(parent, name) {\n        return parent.node_ops.lookup(parent, name);\n      },mknod:function(path, mode, dev) {\n        var lookup = FS.lookupPath(path, { parent: true });\n        var parent = lookup.node;\n        var name = PATH.basename(path);\n        if (!name || name === '.' || name === '..') {\n          throw new FS.ErrnoError(28);\n        }\n        var errCode = FS.mayCreate(parent, name);\n        if (errCode) {\n          throw new FS.ErrnoError(errCode);\n        }\n        if (!parent.node_ops.mknod) {\n          throw new FS.ErrnoError(63);\n        }\n        return parent.node_ops.mknod(parent, name, mode, dev);\n      },create:function(path, mode) {\n        mode = mode !== undefined ? mode : 438 /* 0666 */;\n        mode &= 4095;\n        mode |= 32768;\n        return FS.mknod(path, mode, 0);\n      },mkdir:function(path, mode) {\n        mode = mode !== undefined ? mode : 511 /* 0777 */;\n        mode &= 511 | 512;\n        mode |= 16384;\n        return FS.mknod(path, mode, 0);\n      },mkdirTree:function(path, mode) {\n        var dirs = path.split('/');\n        var d = '';\n        for (var i = 0; i < dirs.length; ++i) {\n          if (!dirs[i]) continue;\n          d += '/' + dirs[i];\n          try {\n            FS.mkdir(d, mode);\n          } catch(e) {\n            if (e.errno != 20) throw e;\n          }\n        }\n      },mkdev:function(path, mode, dev) {\n        if (typeof(dev) === 'undefined') {\n          dev = mode;\n          mode = 438 /* 0666 */;\n        }\n        mode |= 8192;\n        return FS.mknod(path, mode, dev);\n      },symlink:function(oldpath, newpath) {\n        if (!PATH_FS.resolve(oldpath)) {\n          throw new FS.ErrnoError(44);\n        }\n        var lookup = FS.lookupPath(newpath, { parent: true });\n        var parent = lookup.node;\n        if (!parent) {\n          throw new FS.ErrnoError(44);\n        }\n        var newname = PATH.basename(newpath);\n        var errCode = FS.mayCreate(parent, newname);\n        if (errCode) {\n          throw new FS.ErrnoError(errCode);\n        }\n        if (!parent.node_ops.symlink) {\n          throw new FS.ErrnoError(63);\n        }\n        return parent.node_ops.symlink(parent, newname, oldpath);\n      },rename:function(old_path, new_path) {\n        var old_dirname = PATH.dirname(old_path);\n        var new_dirname = PATH.dirname(new_path);\n        var old_name = PATH.basename(old_path);\n        var new_name = PATH.basename(new_path);\n        // parents must exist\n        var lookup, old_dir, new_dir;\n        try {\n          lookup = FS.lookupPath(old_path, { parent: true });\n          old_dir = lookup.node;\n          lookup = FS.lookupPath(new_path, { parent: true });\n          new_dir = lookup.node;\n        } catch (e) {\n          throw new FS.ErrnoError(10);\n        }\n        if (!old_dir || !new_dir) throw new FS.ErrnoError(44);\n        // need to be part of the same mount\n        if (old_dir.mount !== new_dir.mount) {\n          throw new FS.ErrnoError(75);\n        }\n        // source must exist\n        var old_node = FS.lookupNode(old_dir, old_name);\n        // old path should not be an ancestor of the new path\n        var relative = PATH_FS.relative(old_path, new_dirname);\n        if (relative.charAt(0) !== '.') {\n          throw new FS.ErrnoError(28);\n        }\n        // new path should not be an ancestor of the old path\n        relative = PATH_FS.relative(new_path, old_dirname);\n        if (relative.charAt(0) !== '.') {\n          throw new FS.ErrnoError(55);\n        }\n        // see if the new path already exists\n        var new_node;\n        try {\n          new_node = FS.lookupNode(new_dir, new_name);\n        } catch (e) {\n          // not fatal\n        }\n        // early out if nothing needs to change\n        if (old_node === new_node) {\n          return;\n        }\n        // we'll need to delete the old entry\n        var isdir = FS.isDir(old_node.mode);\n        var errCode = FS.mayDelete(old_dir, old_name, isdir);\n        if (errCode) {\n          throw new FS.ErrnoError(errCode);\n        }\n        // need delete permissions if we'll be overwriting.\n        // need create permissions if new doesn't already exist.\n        errCode = new_node ?\n          FS.mayDelete(new_dir, new_name, isdir) :\n          FS.mayCreate(new_dir, new_name);\n        if (errCode) {\n          throw new FS.ErrnoError(errCode);\n        }\n        if (!old_dir.node_ops.rename) {\n          throw new FS.ErrnoError(63);\n        }\n        if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) {\n          throw new FS.ErrnoError(10);\n        }\n        // if we are going to change the parent, check write permissions\n        if (new_dir !== old_dir) {\n          errCode = FS.nodePermissions(old_dir, 'w');\n          if (errCode) {\n            throw new FS.ErrnoError(errCode);\n          }\n        }\n        try {\n          if (FS.trackingDelegate['willMovePath']) {\n            FS.trackingDelegate['willMovePath'](old_path, new_path);\n          }\n        } catch(e) {\n          err(\"FS.trackingDelegate['willMovePath']('\"+old_path+\"', '\"+new_path+\"') threw an exception: \" + e.message);\n        }\n        // remove the node from the lookup hash\n        FS.hashRemoveNode(old_node);\n        // do the underlying fs rename\n        try {\n          old_dir.node_ops.rename(old_node, new_dir, new_name);\n        } catch (e) {\n          throw e;\n        } finally {\n          // add the node back to the hash (in case node_ops.rename\n          // changed its name)\n          FS.hashAddNode(old_node);\n        }\n        try {\n          if (FS.trackingDelegate['onMovePath']) FS.trackingDelegate['onMovePath'](old_path, new_path);\n        } catch(e) {\n          err(\"FS.trackingDelegate['onMovePath']('\"+old_path+\"', '\"+new_path+\"') threw an exception: \" + e.message);\n        }\n      },rmdir:function(path) {\n        var lookup = FS.lookupPath(path, { parent: true });\n        var parent = lookup.node;\n        var name = PATH.basename(path);\n        var node = FS.lookupNode(parent, name);\n        var errCode = FS.mayDelete(parent, name, true);\n        if (errCode) {\n          throw new FS.ErrnoError(errCode);\n        }\n        if (!parent.node_ops.rmdir) {\n          throw new FS.ErrnoError(63);\n        }\n        if (FS.isMountpoint(node)) {\n          throw new FS.ErrnoError(10);\n        }\n        try {\n          if (FS.trackingDelegate['willDeletePath']) {\n            FS.trackingDelegate['willDeletePath'](path);\n          }\n        } catch(e) {\n          err(\"FS.trackingDelegate['willDeletePath']('\"+path+\"') threw an exception: \" + e.message);\n        }\n        parent.node_ops.rmdir(parent, name);\n        FS.destroyNode(node);\n        try {\n          if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path);\n        } catch(e) {\n          err(\"FS.trackingDelegate['onDeletePath']('\"+path+\"') threw an exception: \" + e.message);\n        }\n      },readdir:function(path) {\n        var lookup = FS.lookupPath(path, { follow: true });\n        var node = lookup.node;\n        if (!node.node_ops.readdir) {\n          throw new FS.ErrnoError(54);\n        }\n        return node.node_ops.readdir(node);\n      },unlink:function(path) {\n        var lookup = FS.lookupPath(path, { parent: true });\n        var parent = lookup.node;\n        var name = PATH.basename(path);\n        var node = FS.lookupNode(parent, name);\n        var errCode = FS.mayDelete(parent, name, false);\n        if (errCode) {\n          // According to POSIX, we should map EISDIR to EPERM, but\n          // we instead do what Linux does (and we must, as we use\n          // the musl linux libc).\n          throw new FS.ErrnoError(errCode);\n        }\n        if (!parent.node_ops.unlink) {\n          throw new FS.ErrnoError(63);\n        }\n        if (FS.isMountpoint(node)) {\n          throw new FS.ErrnoError(10);\n        }\n        try {\n          if (FS.trackingDelegate['willDeletePath']) {\n            FS.trackingDelegate['willDeletePath'](path);\n          }\n        } catch(e) {\n          err(\"FS.trackingDelegate['willDeletePath']('\"+path+\"') threw an exception: \" + e.message);\n        }\n        parent.node_ops.unlink(parent, name);\n        FS.destroyNode(node);\n        try {\n          if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path);\n        } catch(e) {\n          err(\"FS.trackingDelegate['onDeletePath']('\"+path+\"') threw an exception: \" + e.message);\n        }\n      },readlink:function(path) {\n        var lookup = FS.lookupPath(path);\n        var link = lookup.node;\n        if (!link) {\n          throw new FS.ErrnoError(44);\n        }\n        if (!link.node_ops.readlink) {\n          throw new FS.ErrnoError(28);\n        }\n        return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link));\n      },stat:function(path, dontFollow) {\n        var lookup = FS.lookupPath(path, { follow: !dontFollow });\n        var node = lookup.node;\n        if (!node) {\n          throw new FS.ErrnoError(44);\n        }\n        if (!node.node_ops.getattr) {\n          throw new FS.ErrnoError(63);\n        }\n        return node.node_ops.getattr(node);\n      },lstat:function(path) {\n        return FS.stat(path, true);\n      },chmod:function(path, mode, dontFollow) {\n        var node;\n        if (typeof path === 'string') {\n          var lookup = FS.lookupPath(path, { follow: !dontFollow });\n          node = lookup.node;\n        } else {\n          node = path;\n        }\n        if (!node.node_ops.setattr) {\n          throw new FS.ErrnoError(63);\n        }\n        node.node_ops.setattr(node, {\n          mode: (mode & 4095) | (node.mode & ~4095),\n          timestamp: Date.now()\n        });\n      },lchmod:function(path, mode) {\n        FS.chmod(path, mode, true);\n      },fchmod:function(fd, mode) {\n        var stream = FS.getStream(fd);\n        if (!stream) {\n          throw new FS.ErrnoError(8);\n        }\n        FS.chmod(stream.node, mode);\n      },chown:function(path, uid, gid, dontFollow) {\n        var node;\n        if (typeof path === 'string') {\n          var lookup = FS.lookupPath(path, { follow: !dontFollow });\n          node = lookup.node;\n        } else {\n          node = path;\n        }\n        if (!node.node_ops.setattr) {\n          throw new FS.ErrnoError(63);\n        }\n        node.node_ops.setattr(node, {\n          timestamp: Date.now()\n          // we ignore the uid / gid for now\n        });\n      },lchown:function(path, uid, gid) {\n        FS.chown(path, uid, gid, true);\n      },fchown:function(fd, uid, gid) {\n        var stream = FS.getStream(fd);\n        if (!stream) {\n          throw new FS.ErrnoError(8);\n        }\n        FS.chown(stream.node, uid, gid);\n      },truncate:function(path, len) {\n        if (len < 0) {\n          throw new FS.ErrnoError(28);\n        }\n        var node;\n        if (typeof path === 'string') {\n          var lookup = FS.lookupPath(path, { follow: true });\n          node = lookup.node;\n        } else {\n          node = path;\n        }\n        if (!node.node_ops.setattr) {\n          throw new FS.ErrnoError(63);\n        }\n        if (FS.isDir(node.mode)) {\n          throw new FS.ErrnoError(31);\n        }\n        if (!FS.isFile(node.mode)) {\n          throw new FS.ErrnoError(28);\n        }\n        var errCode = FS.nodePermissions(node, 'w');\n        if (errCode) {\n          throw new FS.ErrnoError(errCode);\n        }\n        node.node_ops.setattr(node, {\n          size: len,\n          timestamp: Date.now()\n        });\n      },ftruncate:function(fd, len) {\n        var stream = FS.getStream(fd);\n        if (!stream) {\n          throw new FS.ErrnoError(8);\n        }\n        if ((stream.flags & 2097155) === 0) {\n          throw new FS.ErrnoError(28);\n        }\n        FS.truncate(stream.node, len);\n      },utime:function(path, atime, mtime) {\n        var lookup = FS.lookupPath(path, { follow: true });\n        var node = lookup.node;\n        node.node_ops.setattr(node, {\n          timestamp: Math.max(atime, mtime)\n        });\n      },open:function(path, flags, mode, fd_start, fd_end) {\n        if (path === \"\") {\n          throw new FS.ErrnoError(44);\n        }\n        flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags;\n        mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode;\n        if ((flags & 64)) {\n          mode = (mode & 4095) | 32768;\n        } else {\n          mode = 0;\n        }\n        var node;\n        if (typeof path === 'object') {\n          node = path;\n        } else {\n          path = PATH.normalize(path);\n          try {\n            var lookup = FS.lookupPath(path, {\n              follow: !(flags & 131072)\n            });\n            node = lookup.node;\n          } catch (e) {\n            // ignore\n          }\n        }\n        // perhaps we need to create the node\n        var created = false;\n        if ((flags & 64)) {\n          if (node) {\n            // if O_CREAT and O_EXCL are set, error out if the node already exists\n            if ((flags & 128)) {\n              throw new FS.ErrnoError(20);\n            }\n          } else {\n            // node doesn't exist, try to create it\n            node = FS.mknod(path, mode, 0);\n            created = true;\n          }\n        }\n        if (!node) {\n          throw new FS.ErrnoError(44);\n        }\n        // can't truncate a device\n        if (FS.isChrdev(node.mode)) {\n          flags &= ~512;\n        }\n        // if asked only for a directory, then this must be one\n        if ((flags & 65536) && !FS.isDir(node.mode)) {\n          throw new FS.ErrnoError(54);\n        }\n        // check permissions, if this is not a file we just created now (it is ok to\n        // create and write to a file with read-only permissions; it is read-only\n        // for later use)\n        if (!created) {\n          var errCode = FS.mayOpen(node, flags);\n          if (errCode) {\n            throw new FS.ErrnoError(errCode);\n          }\n        }\n        // do truncation if necessary\n        if ((flags & 512)) {\n          FS.truncate(node, 0);\n        }\n        // we've already handled these, don't pass down to the underlying vfs\n        flags &= ~(128 | 512 | 131072);\n  \n        // register the stream with the filesystem\n        var stream = FS.createStream({\n          node: node,\n          path: FS.getPath(node),  // we want the absolute path to the node\n          flags: flags,\n          seekable: true,\n          position: 0,\n          stream_ops: node.stream_ops,\n          // used by the file family libc calls (fopen, fwrite, ferror, etc.)\n          ungotten: [],\n          error: false\n        }, fd_start, fd_end);\n        // call the new stream's open function\n        if (stream.stream_ops.open) {\n          stream.stream_ops.open(stream);\n        }\n        if (Module['logReadFiles'] && !(flags & 1)) {\n          if (!FS.readFiles) FS.readFiles = {};\n          if (!(path in FS.readFiles)) {\n            FS.readFiles[path] = 1;\n            err(\"FS.trackingDelegate error on read file: \" + path);\n          }\n        }\n        try {\n          if (FS.trackingDelegate['onOpenFile']) {\n            var trackingFlags = 0;\n            if ((flags & 2097155) !== 1) {\n              trackingFlags |= FS.tracking.openFlags.READ;\n            }\n            if ((flags & 2097155) !== 0) {\n              trackingFlags |= FS.tracking.openFlags.WRITE;\n            }\n            FS.trackingDelegate['onOpenFile'](path, trackingFlags);\n          }\n        } catch(e) {\n          err(\"FS.trackingDelegate['onOpenFile']('\"+path+\"', flags) threw an exception: \" + e.message);\n        }\n        return stream;\n      },close:function(stream) {\n        if (FS.isClosed(stream)) {\n          throw new FS.ErrnoError(8);\n        }\n        if (stream.getdents) stream.getdents = null; // free readdir state\n        try {\n          if (stream.stream_ops.close) {\n            stream.stream_ops.close(stream);\n          }\n        } catch (e) {\n          throw e;\n        } finally {\n          FS.closeStream(stream.fd);\n        }\n        stream.fd = null;\n      },isClosed:function(stream) {\n        return stream.fd === null;\n      },llseek:function(stream, offset, whence) {\n        if (FS.isClosed(stream)) {\n          throw new FS.ErrnoError(8);\n        }\n        if (!stream.seekable || !stream.stream_ops.llseek) {\n          throw new FS.ErrnoError(70);\n        }\n        if (whence != 0 && whence != 1 && whence != 2) {\n          throw new FS.ErrnoError(28);\n        }\n        stream.position = stream.stream_ops.llseek(stream, offset, whence);\n        stream.ungotten = [];\n        return stream.position;\n      },read:function(stream, buffer, offset, length, position) {\n        if (length < 0 || position < 0) {\n          throw new FS.ErrnoError(28);\n        }\n        if (FS.isClosed(stream)) {\n          throw new FS.ErrnoError(8);\n        }\n        if ((stream.flags & 2097155) === 1) {\n          throw new FS.ErrnoError(8);\n        }\n        if (FS.isDir(stream.node.mode)) {\n          throw new FS.ErrnoError(31);\n        }\n        if (!stream.stream_ops.read) {\n          throw new FS.ErrnoError(28);\n        }\n        var seeking = typeof position !== 'undefined';\n        if (!seeking) {\n          position = stream.position;\n        } else if (!stream.seekable) {\n          throw new FS.ErrnoError(70);\n        }\n        var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position);\n        if (!seeking) stream.position += bytesRead;\n        return bytesRead;\n      },write:function(stream, buffer, offset, length, position, canOwn) {\n        if (length < 0 || position < 0) {\n          throw new FS.ErrnoError(28);\n        }\n        if (FS.isClosed(stream)) {\n          throw new FS.ErrnoError(8);\n        }\n        if ((stream.flags & 2097155) === 0) {\n          throw new FS.ErrnoError(8);\n        }\n        if (FS.isDir(stream.node.mode)) {\n          throw new FS.ErrnoError(31);\n        }\n        if (!stream.stream_ops.write) {\n          throw new FS.ErrnoError(28);\n        }\n        if (stream.seekable && stream.flags & 1024) {\n          // seek to the end before writing in append mode\n          FS.llseek(stream, 0, 2);\n        }\n        var seeking = typeof position !== 'undefined';\n        if (!seeking) {\n          position = stream.position;\n        } else if (!stream.seekable) {\n          throw new FS.ErrnoError(70);\n        }\n        var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn);\n        if (!seeking) stream.position += bytesWritten;\n        try {\n          if (stream.path && FS.trackingDelegate['onWriteToFile']) FS.trackingDelegate['onWriteToFile'](stream.path);\n        } catch(e) {\n          err(\"FS.trackingDelegate['onWriteToFile']('\"+stream.path+\"') threw an exception: \" + e.message);\n        }\n        return bytesWritten;\n      },allocate:function(stream, offset, length) {\n        if (FS.isClosed(stream)) {\n          throw new FS.ErrnoError(8);\n        }\n        if (offset < 0 || length <= 0) {\n          throw new FS.ErrnoError(28);\n        }\n        if ((stream.flags & 2097155) === 0) {\n          throw new FS.ErrnoError(8);\n        }\n        if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) {\n          throw new FS.ErrnoError(43);\n        }\n        if (!stream.stream_ops.allocate) {\n          throw new FS.ErrnoError(138);\n        }\n        stream.stream_ops.allocate(stream, offset, length);\n      },mmap:function(stream, address, length, position, prot, flags) {\n        // User requests writing to file (prot & PROT_WRITE != 0).\n        // Checking if we have permissions to write to the file unless\n        // MAP_PRIVATE flag is set. According to POSIX spec it is possible\n        // to write to file opened in read-only mode with MAP_PRIVATE flag,\n        // as all modifications will be visible only in the memory of\n        // the current process.\n        if ((prot & 2) !== 0\n            && (flags & 2) === 0\n            && (stream.flags & 2097155) !== 2) {\n          throw new FS.ErrnoError(2);\n        }\n        if ((stream.flags & 2097155) === 1) {\n          throw new FS.ErrnoError(2);\n        }\n        if (!stream.stream_ops.mmap) {\n          throw new FS.ErrnoError(43);\n        }\n        return stream.stream_ops.mmap(stream, address, length, position, prot, flags);\n      },msync:function(stream, buffer, offset, length, mmapFlags) {\n        if (!stream || !stream.stream_ops.msync) {\n          return 0;\n        }\n        return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags);\n      },munmap:function(stream) {\n        return 0;\n      },ioctl:function(stream, cmd, arg) {\n        if (!stream.stream_ops.ioctl) {\n          throw new FS.ErrnoError(59);\n        }\n        return stream.stream_ops.ioctl(stream, cmd, arg);\n      },readFile:function(path, opts) {\n        opts = opts || {};\n        opts.flags = opts.flags || 'r';\n        opts.encoding = opts.encoding || 'binary';\n        if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') {\n          throw new Error('Invalid encoding type \"' + opts.encoding + '\"');\n        }\n        var ret;\n        var stream = FS.open(path, opts.flags);\n        var stat = FS.stat(path);\n        var length = stat.size;\n        var buf = new Uint8Array(length);\n        FS.read(stream, buf, 0, length, 0);\n        if (opts.encoding === 'utf8') {\n          ret = UTF8ArrayToString(buf, 0);\n        } else if (opts.encoding === 'binary') {\n          ret = buf;\n        }\n        FS.close(stream);\n        return ret;\n      },writeFile:function(path, data, opts) {\n        opts = opts || {};\n        opts.flags = opts.flags || 'w';\n        var stream = FS.open(path, opts.flags, opts.mode);\n        if (typeof data === 'string') {\n          var buf = new Uint8Array(lengthBytesUTF8(data)+1);\n          var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length);\n          FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn);\n        } else if (ArrayBuffer.isView(data)) {\n          FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn);\n        } else {\n          throw new Error('Unsupported data type');\n        }\n        FS.close(stream);\n      },cwd:function() {\n        return FS.currentPath;\n      },chdir:function(path) {\n        var lookup = FS.lookupPath(path, { follow: true });\n        if (lookup.node === null) {\n          throw new FS.ErrnoError(44);\n        }\n        if (!FS.isDir(lookup.node.mode)) {\n          throw new FS.ErrnoError(54);\n        }\n        var errCode = FS.nodePermissions(lookup.node, 'x');\n        if (errCode) {\n          throw new FS.ErrnoError(errCode);\n        }\n        FS.currentPath = lookup.path;\n      },createDefaultDirectories:function() {\n        FS.mkdir('/tmp');\n        FS.mkdir('/home');\n        FS.mkdir('/home/web_user');\n      },createDefaultDevices:function() {\n        // create /dev\n        FS.mkdir('/dev');\n        // setup /dev/null\n        FS.registerDevice(FS.makedev(1, 3), {\n          read: function() { return 0; },\n          write: function(stream, buffer, offset, length, pos) { return length; }\n        });\n        FS.mkdev('/dev/null', FS.makedev(1, 3));\n        // setup /dev/tty and /dev/tty1\n        // stderr needs to print output using Module['printErr']\n        // so we register a second tty just for it.\n        TTY.register(FS.makedev(5, 0), TTY.default_tty_ops);\n        TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops);\n        FS.mkdev('/dev/tty', FS.makedev(5, 0));\n        FS.mkdev('/dev/tty1', FS.makedev(6, 0));\n        // setup /dev/[u]random\n        var random_device;\n        if (typeof crypto === 'object' && typeof crypto['getRandomValues'] === 'function') {\n          // for modern web browsers\n          var randomBuffer = new Uint8Array(1);\n          random_device = function() { crypto.getRandomValues(randomBuffer); return randomBuffer[0]; };\n        } else\n        if (ENVIRONMENT_IS_NODE) {\n          // for nodejs with or without crypto support included\n          try {\n            var crypto_module = require('crypto');\n            // nodejs has crypto support\n            random_device = function() { return crypto_module['randomBytes'](1)[0]; };\n          } catch (e) {\n            // nodejs doesn't have crypto support\n          }\n        } else\n        {}\n        if (!random_device) {\n          // we couldn't find a proper implementation, as Math.random() is not suitable for /dev/random, see emscripten-core/emscripten/pull/7096\n          random_device = function() { abort(\"random_device\"); };\n        }\n        FS.createDevice('/dev', 'random', random_device);\n        FS.createDevice('/dev', 'urandom', random_device);\n        // we're not going to emulate the actual shm device,\n        // just create the tmp dirs that reside in it commonly\n        FS.mkdir('/dev/shm');\n        FS.mkdir('/dev/shm/tmp');\n      },createSpecialDirectories:function() {\n        // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the name of the stream for fd 6 (see test_unistd_ttyname)\n        FS.mkdir('/proc');\n        FS.mkdir('/proc/self');\n        FS.mkdir('/proc/self/fd');\n        FS.mount({\n          mount: function() {\n            var node = FS.createNode('/proc/self', 'fd', 16384 | 511 /* 0777 */, 73);\n            node.node_ops = {\n              lookup: function(parent, name) {\n                var fd = +name;\n                var stream = FS.getStream(fd);\n                if (!stream) throw new FS.ErrnoError(8);\n                var ret = {\n                  parent: null,\n                  mount: { mountpoint: 'fake' },\n                  node_ops: { readlink: function() { return stream.path } }\n                };\n                ret.parent = ret; // make it look like a simple root node\n                return ret;\n              }\n            };\n            return node;\n          }\n        }, {}, '/proc/self/fd');\n      },createStandardStreams:function() {\n        // TODO deprecate the old functionality of a single\n        // input / output callback and that utilizes FS.createDevice\n        // and instead require a unique set of stream ops\n  \n        // by default, we symlink the standard streams to the\n        // default tty devices. however, if the standard streams\n        // have been overwritten we create a unique device for\n        // them instead.\n        if (Module['stdin']) {\n          FS.createDevice('/dev', 'stdin', Module['stdin']);\n        } else {\n          FS.symlink('/dev/tty', '/dev/stdin');\n        }\n        if (Module['stdout']) {\n          FS.createDevice('/dev', 'stdout', null, Module['stdout']);\n        } else {\n          FS.symlink('/dev/tty', '/dev/stdout');\n        }\n        if (Module['stderr']) {\n          FS.createDevice('/dev', 'stderr', null, Module['stderr']);\n        } else {\n          FS.symlink('/dev/tty1', '/dev/stderr');\n        }\n  \n        // open default streams for the stdin, stdout and stderr devices\n        var stdin = FS.open('/dev/stdin', 'r');\n        var stdout = FS.open('/dev/stdout', 'w');\n        var stderr = FS.open('/dev/stderr', 'w');\n      },ensureErrnoError:function() {\n        if (FS.ErrnoError) return;\n        FS.ErrnoError = /** @this{Object} */ function ErrnoError(errno, node) {\n          this.node = node;\n          this.setErrno = /** @this{Object} */ function(errno) {\n            this.errno = errno;\n          };\n          this.setErrno(errno);\n          this.message = 'FS error';\n  \n        };\n        FS.ErrnoError.prototype = new Error();\n        FS.ErrnoError.prototype.constructor = FS.ErrnoError;\n        // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info)\n        [44].forEach(function(code) {\n          FS.genericErrors[code] = new FS.ErrnoError(code);\n          FS.genericErrors[code].stack = '<generic error, no stack>';\n        });\n      },staticInit:function() {\n        FS.ensureErrnoError();\n  \n        FS.nameTable = new Array(4096);\n  \n        FS.mount(MEMFS, {}, '/');\n  \n        FS.createDefaultDirectories();\n        FS.createDefaultDevices();\n        FS.createSpecialDirectories();\n  \n        FS.filesystems = {\n          'MEMFS': MEMFS,\n        };\n      },init:function(input, output, error) {\n        FS.init.initialized = true;\n  \n        FS.ensureErrnoError();\n  \n        // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here\n        Module['stdin'] = input || Module['stdin'];\n        Module['stdout'] = output || Module['stdout'];\n        Module['stderr'] = error || Module['stderr'];\n  \n        FS.createStandardStreams();\n      },quit:function() {\n        FS.init.initialized = false;\n        // force-flush all streams, so we get musl std streams printed out\n        var fflush = Module['_fflush'];\n        if (fflush) fflush(0);\n        // close all of our streams\n        for (var i = 0; i < FS.streams.length; i++) {\n          var stream = FS.streams[i];\n          if (!stream) {\n            continue;\n          }\n          FS.close(stream);\n        }\n      },getMode:function(canRead, canWrite) {\n        var mode = 0;\n        if (canRead) mode |= 292 | 73;\n        if (canWrite) mode |= 146;\n        return mode;\n      },joinPath:function(parts, forceRelative) {\n        var path = PATH.join.apply(null, parts);\n        if (forceRelative && path[0] == '/') path = path.substr(1);\n        return path;\n      },absolutePath:function(relative, base) {\n        return PATH_FS.resolve(base, relative);\n      },standardizePath:function(path) {\n        return PATH.normalize(path);\n      },findObject:function(path, dontResolveLastLink) {\n        var ret = FS.analyzePath(path, dontResolveLastLink);\n        if (ret.exists) {\n          return ret.object;\n        } else {\n          setErrNo(ret.error);\n          return null;\n        }\n      },analyzePath:function(path, dontResolveLastLink) {\n        // operate from within the context of the symlink's target\n        try {\n          var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink });\n          path = lookup.path;\n        } catch (e) {\n        }\n        var ret = {\n          isRoot: false, exists: false, error: 0, name: null, path: null, object: null,\n          parentExists: false, parentPath: null, parentObject: null\n        };\n        try {\n          var lookup = FS.lookupPath(path, { parent: true });\n          ret.parentExists = true;\n          ret.parentPath = lookup.path;\n          ret.parentObject = lookup.node;\n          ret.name = PATH.basename(path);\n          lookup = FS.lookupPath(path, { follow: !dontResolveLastLink });\n          ret.exists = true;\n          ret.path = lookup.path;\n          ret.object = lookup.node;\n          ret.name = lookup.node.name;\n          ret.isRoot = lookup.path === '/';\n        } catch (e) {\n          ret.error = e.errno;\n        };\n        return ret;\n      },createFolder:function(parent, name, canRead, canWrite) {\n        var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);\n        var mode = FS.getMode(canRead, canWrite);\n        return FS.mkdir(path, mode);\n      },createPath:function(parent, path, canRead, canWrite) {\n        parent = typeof parent === 'string' ? parent : FS.getPath(parent);\n        var parts = path.split('/').reverse();\n        while (parts.length) {\n          var part = parts.pop();\n          if (!part) continue;\n          var current = PATH.join2(parent, part);\n          try {\n            FS.mkdir(current);\n          } catch (e) {\n            // ignore EEXIST\n          }\n          parent = current;\n        }\n        return current;\n      },createFile:function(parent, name, properties, canRead, canWrite) {\n        var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);\n        var mode = FS.getMode(canRead, canWrite);\n        return FS.create(path, mode);\n      },createDataFile:function(parent, name, data, canRead, canWrite, canOwn) {\n        var path = name ? PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent;\n        var mode = FS.getMode(canRead, canWrite);\n        var node = FS.create(path, mode);\n        if (data) {\n          if (typeof data === 'string') {\n            var arr = new Array(data.length);\n            for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i);\n            data = arr;\n          }\n          // make sure we can write to the file\n          FS.chmod(node, mode | 146);\n          var stream = FS.open(node, 'w');\n          FS.write(stream, data, 0, data.length, 0, canOwn);\n          FS.close(stream);\n          FS.chmod(node, mode);\n        }\n        return node;\n      },createDevice:function(parent, name, input, output) {\n        var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);\n        var mode = FS.getMode(!!input, !!output);\n        if (!FS.createDevice.major) FS.createDevice.major = 64;\n        var dev = FS.makedev(FS.createDevice.major++, 0);\n        // Create a fake device that a set of stream ops to emulate\n        // the old behavior.\n        FS.registerDevice(dev, {\n          open: function(stream) {\n            stream.seekable = false;\n          },\n          close: function(stream) {\n            // flush any pending line data\n            if (output && output.buffer && output.buffer.length) {\n              output(10);\n            }\n          },\n          read: function(stream, buffer, offset, length, pos /* ignored */) {\n            var bytesRead = 0;\n            for (var i = 0; i < length; i++) {\n              var result;\n              try {\n                result = input();\n              } catch (e) {\n                throw new FS.ErrnoError(29);\n              }\n              if (result === undefined && bytesRead === 0) {\n                throw new FS.ErrnoError(6);\n              }\n              if (result === null || result === undefined) break;\n              bytesRead++;\n              buffer[offset+i] = result;\n            }\n            if (bytesRead) {\n              stream.node.timestamp = Date.now();\n            }\n            return bytesRead;\n          },\n          write: function(stream, buffer, offset, length, pos) {\n            for (var i = 0; i < length; i++) {\n              try {\n                output(buffer[offset+i]);\n              } catch (e) {\n                throw new FS.ErrnoError(29);\n              }\n            }\n            if (length) {\n              stream.node.timestamp = Date.now();\n            }\n            return i;\n          }\n        });\n        return FS.mkdev(path, mode, dev);\n      },createLink:function(parent, name, target, canRead, canWrite) {\n        var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);\n        return FS.symlink(target, path);\n      },forceLoadFile:function(obj) {\n        if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true;\n        var success = true;\n        if (typeof XMLHttpRequest !== 'undefined') {\n          throw new Error(\"Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.\");\n        } else if (read_) {\n          // Command-line.\n          try {\n            // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as\n            //          read() will try to parse UTF8.\n            obj.contents = intArrayFromString(read_(obj.url), true);\n            obj.usedBytes = obj.contents.length;\n          } catch (e) {\n            success = false;\n          }\n        } else {\n          throw new Error('Cannot load without read() or XMLHttpRequest.');\n        }\n        if (!success) setErrNo(29);\n        return success;\n      },createLazyFile:function(parent, name, url, canRead, canWrite) {\n        // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse.\n        /** @constructor */\n        function LazyUint8Array() {\n          this.lengthKnown = false;\n          this.chunks = []; // Loaded chunks. Index is the chunk number\n        }\n        LazyUint8Array.prototype.get = /** @this{Object} */ function LazyUint8Array_get(idx) {\n          if (idx > this.length-1 || idx < 0) {\n            return undefined;\n          }\n          var chunkOffset = idx % this.chunkSize;\n          var chunkNum = (idx / this.chunkSize)|0;\n          return this.getter(chunkNum)[chunkOffset];\n        };\n        LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) {\n          this.getter = getter;\n        };\n        LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() {\n          // Find length\n          var xhr = new XMLHttpRequest();\n          xhr.open('HEAD', url, false);\n          xhr.send(null);\n          if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error(\"Couldn't load \" + url + \". Status: \" + xhr.status);\n          var datalength = Number(xhr.getResponseHeader(\"Content-length\"));\n          var header;\n          var hasByteServing = (header = xhr.getResponseHeader(\"Accept-Ranges\")) && header === \"bytes\";\n          var usesGzip = (header = xhr.getResponseHeader(\"Content-Encoding\")) && header === \"gzip\";\n  \n          var chunkSize = 1024*1024; // Chunk size in bytes\n  \n          if (!hasByteServing) chunkSize = datalength;\n  \n          // Function to get a range from the remote URL.\n          var doXHR = (function(from, to) {\n            if (from > to) throw new Error(\"invalid range (\" + from + \", \" + to + \") or no bytes requested!\");\n            if (to > datalength-1) throw new Error(\"only \" + datalength + \" bytes available! programmer error!\");\n  \n            // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available.\n            var xhr = new XMLHttpRequest();\n            xhr.open('GET', url, false);\n            if (datalength !== chunkSize) xhr.setRequestHeader(\"Range\", \"bytes=\" + from + \"-\" + to);\n  \n            // Some hints to the browser that we want binary data.\n            if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer';\n            if (xhr.overrideMimeType) {\n              xhr.overrideMimeType('text/plain; charset=x-user-defined');\n            }\n  \n            xhr.send(null);\n            if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error(\"Couldn't load \" + url + \". Status: \" + xhr.status);\n            if (xhr.response !== undefined) {\n              return new Uint8Array(/** @type{Array<number>} */(xhr.response || []));\n            } else {\n              return intArrayFromString(xhr.responseText || '', true);\n            }\n          });\n          var lazyArray = this;\n          lazyArray.setDataGetter(function(chunkNum) {\n            var start = chunkNum * chunkSize;\n            var end = (chunkNum+1) * chunkSize - 1; // including this byte\n            end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block\n            if (typeof(lazyArray.chunks[chunkNum]) === \"undefined\") {\n              lazyArray.chunks[chunkNum] = doXHR(start, end);\n            }\n            if (typeof(lazyArray.chunks[chunkNum]) === \"undefined\") throw new Error(\"doXHR failed!\");\n            return lazyArray.chunks[chunkNum];\n          });\n  \n          if (usesGzip || !datalength) {\n            // if the server uses gzip or doesn't supply the length, we have to download the whole file to get the (uncompressed) length\n            chunkSize = datalength = 1; // this will force getter(0)/doXHR do download the whole file\n            datalength = this.getter(0).length;\n            chunkSize = datalength;\n            out(\"LazyFiles on gzip forces download of the whole file when length is accessed\");\n          }\n  \n          this._length = datalength;\n          this._chunkSize = chunkSize;\n          this.lengthKnown = true;\n        };\n        if (typeof XMLHttpRequest !== 'undefined') {\n          if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc';\n          var lazyArray = new LazyUint8Array();\n          Object.defineProperties(lazyArray, {\n            length: {\n              get: /** @this{Object} */ function() {\n                if(!this.lengthKnown) {\n                  this.cacheLength();\n                }\n                return this._length;\n              }\n            },\n            chunkSize: {\n              get: /** @this{Object} */ function() {\n                if(!this.lengthKnown) {\n                  this.cacheLength();\n                }\n                return this._chunkSize;\n              }\n            }\n          });\n  \n          var properties = { isDevice: false, contents: lazyArray };\n        } else {\n          var properties = { isDevice: false, url: url };\n        }\n  \n        var node = FS.createFile(parent, name, properties, canRead, canWrite);\n        // This is a total hack, but I want to get this lazy file code out of the\n        // core of MEMFS. If we want to keep this lazy file concept I feel it should\n        // be its own thin LAZYFS proxying calls to MEMFS.\n        if (properties.contents) {\n          node.contents = properties.contents;\n        } else if (properties.url) {\n          node.contents = null;\n          node.url = properties.url;\n        }\n        // Add a function that defers querying the file size until it is asked the first time.\n        Object.defineProperties(node, {\n          usedBytes: {\n            get: /** @this {FSNode} */ function() { return this.contents.length; }\n          }\n        });\n        // override each stream op with one that tries to force load the lazy file first\n        var stream_ops = {};\n        var keys = Object.keys(node.stream_ops);\n        keys.forEach(function(key) {\n          var fn = node.stream_ops[key];\n          stream_ops[key] = function forceLoadLazyFile() {\n            if (!FS.forceLoadFile(node)) {\n              throw new FS.ErrnoError(29);\n            }\n            return fn.apply(null, arguments);\n          };\n        });\n        // use a custom read function\n        stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) {\n          if (!FS.forceLoadFile(node)) {\n            throw new FS.ErrnoError(29);\n          }\n          var contents = stream.node.contents;\n          if (position >= contents.length)\n            return 0;\n          var size = Math.min(contents.length - position, length);\n          if (contents.slice) { // normal array\n            for (var i = 0; i < size; i++) {\n              buffer[offset + i] = contents[position + i];\n            }\n          } else {\n            for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR\n              buffer[offset + i] = contents.get(position + i);\n            }\n          }\n          return size;\n        };\n        node.stream_ops = stream_ops;\n        return node;\n      },createPreloadedFile:function(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) {\n        Browser.init(); // XXX perhaps this method should move onto Browser?\n        // TODO we should allow people to just pass in a complete filename instead\n        // of parent and name being that we just join them anyways\n        var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent;\n        var dep = getUniqueRunDependency('cp ' + fullname); // might have several active requests for the same fullname\n        function processData(byteArray) {\n          function finish(byteArray) {\n            if (preFinish) preFinish();\n            if (!dontCreateFile) {\n              FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn);\n            }\n            if (onload) onload();\n            removeRunDependency(dep);\n          }\n          var handled = false;\n          Module['preloadPlugins'].forEach(function(plugin) {\n            if (handled) return;\n            if (plugin['canHandle'](fullname)) {\n              plugin['handle'](byteArray, fullname, finish, function() {\n                if (onerror) onerror();\n                removeRunDependency(dep);\n              });\n              handled = true;\n            }\n          });\n          if (!handled) finish(byteArray);\n        }\n        addRunDependency(dep);\n        if (typeof url == 'string') {\n          Browser.asyncLoad(url, function(byteArray) {\n            processData(byteArray);\n          }, onerror);\n        } else {\n          processData(url);\n        }\n      },indexedDB:function() {\n        return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;\n      },DB_NAME:function() {\n        return 'EM_FS_' + window.location.pathname;\n      },DB_VERSION:20,DB_STORE_NAME:\"FILE_DATA\",saveFilesToDB:function(paths, onload, onerror) {\n        onload = onload || function(){};\n        onerror = onerror || function(){};\n        var indexedDB = FS.indexedDB();\n        try {\n          var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION);\n        } catch (e) {\n          return onerror(e);\n        }\n        openRequest.onupgradeneeded = function openRequest_onupgradeneeded() {\n          out('creating db');\n          var db = openRequest.result;\n          db.createObjectStore(FS.DB_STORE_NAME);\n        };\n        openRequest.onsuccess = function openRequest_onsuccess() {\n          var db = openRequest.result;\n          var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite');\n          var files = transaction.objectStore(FS.DB_STORE_NAME);\n          var ok = 0, fail = 0, total = paths.length;\n          function finish() {\n            if (fail == 0) onload(); else onerror();\n          }\n          paths.forEach(function(path) {\n            var putRequest = files.put(FS.analyzePath(path).object.contents, path);\n            putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish() };\n            putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish() };\n          });\n          transaction.onerror = onerror;\n        };\n        openRequest.onerror = onerror;\n      },loadFilesFromDB:function(paths, onload, onerror) {\n        onload = onload || function(){};\n        onerror = onerror || function(){};\n        var indexedDB = FS.indexedDB();\n        try {\n          var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION);\n        } catch (e) {\n          return onerror(e);\n        }\n        openRequest.onupgradeneeded = onerror; // no database to load from\n        openRequest.onsuccess = function openRequest_onsuccess() {\n          var db = openRequest.result;\n          try {\n            var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly');\n          } catch(e) {\n            onerror(e);\n            return;\n          }\n          var files = transaction.objectStore(FS.DB_STORE_NAME);\n          var ok = 0, fail = 0, total = paths.length;\n          function finish() {\n            if (fail == 0) onload(); else onerror();\n          }\n          paths.forEach(function(path) {\n            var getRequest = files.get(path);\n            getRequest.onsuccess = function getRequest_onsuccess() {\n              if (FS.analyzePath(path).exists) {\n                FS.unlink(path);\n              }\n              FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true);\n              ok++;\n              if (ok + fail == total) finish();\n            };\n            getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish() };\n          });\n          transaction.onerror = onerror;\n        };\n        openRequest.onerror = onerror;\n      }};var SYSCALLS={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(dirfd, path) {\n        if (path[0] !== '/') {\n          // relative path\n          var dir;\n          if (dirfd === -100) {\n            dir = FS.cwd();\n          } else {\n            var dirstream = FS.getStream(dirfd);\n            if (!dirstream) throw new FS.ErrnoError(8);\n            dir = dirstream.path;\n          }\n          path = PATH.join2(dir, path);\n        }\n        return path;\n      },doStat:function(func, path, buf) {\n        try {\n          var stat = func(path);\n        } catch (e) {\n          if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) {\n            // an error occurred while trying to look up the path; we should just report ENOTDIR\n            return -54;\n          }\n          throw e;\n        }\n        HEAP32[((buf)>>2)]=stat.dev;\n        HEAP32[(((buf)+(4))>>2)]=0;\n        HEAP32[(((buf)+(8))>>2)]=stat.ino;\n        HEAP32[(((buf)+(12))>>2)]=stat.mode;\n        HEAP32[(((buf)+(16))>>2)]=stat.nlink;\n        HEAP32[(((buf)+(20))>>2)]=stat.uid;\n        HEAP32[(((buf)+(24))>>2)]=stat.gid;\n        HEAP32[(((buf)+(28))>>2)]=stat.rdev;\n        HEAP32[(((buf)+(32))>>2)]=0;\n        (tempI64 = [stat.size>>>0,(tempDouble=stat.size,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(40))>>2)]=tempI64[0],HEAP32[(((buf)+(44))>>2)]=tempI64[1]);\n        HEAP32[(((buf)+(48))>>2)]=4096;\n        HEAP32[(((buf)+(52))>>2)]=stat.blocks;\n        HEAP32[(((buf)+(56))>>2)]=(stat.atime.getTime() / 1000)|0;\n        HEAP32[(((buf)+(60))>>2)]=0;\n        HEAP32[(((buf)+(64))>>2)]=(stat.mtime.getTime() / 1000)|0;\n        HEAP32[(((buf)+(68))>>2)]=0;\n        HEAP32[(((buf)+(72))>>2)]=(stat.ctime.getTime() / 1000)|0;\n        HEAP32[(((buf)+(76))>>2)]=0;\n        (tempI64 = [stat.ino>>>0,(tempDouble=stat.ino,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[(((buf)+(80))>>2)]=tempI64[0],HEAP32[(((buf)+(84))>>2)]=tempI64[1]);\n        return 0;\n      },doMsync:function(addr, stream, len, flags, offset) {\n        var buffer = HEAPU8.slice(addr, addr + len);\n        FS.msync(stream, buffer, offset, len, flags);\n      },doMkdir:function(path, mode) {\n        // remove a trailing slash, if one - /a/b/ has basename of '', but\n        // we want to create b in the context of this function\n        path = PATH.normalize(path);\n        if (path[path.length-1] === '/') path = path.substr(0, path.length-1);\n        FS.mkdir(path, mode, 0);\n        return 0;\n      },doMknod:function(path, mode, dev) {\n        // we don't want this in the JS API as it uses mknod to create all nodes.\n        switch (mode & 61440) {\n          case 32768:\n          case 8192:\n          case 24576:\n          case 4096:\n          case 49152:\n            break;\n          default: return -28;\n        }\n        FS.mknod(path, mode, dev);\n        return 0;\n      },doReadlink:function(path, buf, bufsize) {\n        if (bufsize <= 0) return -28;\n        var ret = FS.readlink(path);\n  \n        var len = Math.min(bufsize, lengthBytesUTF8(ret));\n        var endChar = HEAP8[buf+len];\n        stringToUTF8(ret, buf, bufsize+1);\n        // readlink is one of the rare functions that write out a C string, but does never append a null to the output buffer(!)\n        // stringToUTF8() always appends a null byte, so restore the character under the null byte after the write.\n        HEAP8[buf+len] = endChar;\n  \n        return len;\n      },doAccess:function(path, amode) {\n        if (amode & ~7) {\n          // need a valid mode\n          return -28;\n        }\n        var node;\n        var lookup = FS.lookupPath(path, { follow: true });\n        node = lookup.node;\n        if (!node) {\n          return -44;\n        }\n        var perms = '';\n        if (amode & 4) perms += 'r';\n        if (amode & 2) perms += 'w';\n        if (amode & 1) perms += 'x';\n        if (perms /* otherwise, they've just passed F_OK */ && FS.nodePermissions(node, perms)) {\n          return -2;\n        }\n        return 0;\n      },doDup:function(path, flags, suggestFD) {\n        var suggest = FS.getStream(suggestFD);\n        if (suggest) FS.close(suggest);\n        return FS.open(path, flags, 0, suggestFD, suggestFD).fd;\n      },doReadv:function(stream, iov, iovcnt, offset) {\n        var ret = 0;\n        for (var i = 0; i < iovcnt; i++) {\n          var ptr = HEAP32[(((iov)+(i*8))>>2)];\n          var len = HEAP32[(((iov)+(i*8 + 4))>>2)];\n          var curr = FS.read(stream, HEAP8,ptr, len, offset);\n          if (curr < 0) return -1;\n          ret += curr;\n          if (curr < len) break; // nothing more to read\n        }\n        return ret;\n      },doWritev:function(stream, iov, iovcnt, offset) {\n        var ret = 0;\n        for (var i = 0; i < iovcnt; i++) {\n          var ptr = HEAP32[(((iov)+(i*8))>>2)];\n          var len = HEAP32[(((iov)+(i*8 + 4))>>2)];\n          var curr = FS.write(stream, HEAP8,ptr, len, offset);\n          if (curr < 0) return -1;\n          ret += curr;\n        }\n        return ret;\n      },varargs:undefined,get:function() {\n        SYSCALLS.varargs += 4;\n        var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)];\n        return ret;\n      },getStr:function(ptr) {\n        var ret = UTF8ToString(ptr);\n        return ret;\n      },getStreamFromFD:function(fd) {\n        var stream = FS.getStream(fd);\n        if (!stream) throw new FS.ErrnoError(8);\n        return stream;\n      },get64:function(low, high) {\n        return low;\n      }};function _fd_close(fd) {try {\n  \n      var stream = SYSCALLS.getStreamFromFD(fd);\n      FS.close(stream);\n      return 0;\n    } catch (e) {\n    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);\n    return e.errno;\n  }\n  }\n\n  function _fd_read(fd, iov, iovcnt, pnum) {try {\n  \n      var stream = SYSCALLS.getStreamFromFD(fd);\n      var num = SYSCALLS.doReadv(stream, iov, iovcnt);\n      HEAP32[((pnum)>>2)]=num\n      return 0;\n    } catch (e) {\n    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);\n    return e.errno;\n  }\n  }\n\n  function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {try {\n  \n      \n      var stream = SYSCALLS.getStreamFromFD(fd);\n      var HIGH_OFFSET = 0x100000000; // 2^32\n      // use an unsigned operator on low and shift high by 32-bits\n      var offset = offset_high * HIGH_OFFSET + (offset_low >>> 0);\n  \n      var DOUBLE_LIMIT = 0x20000000000000; // 2^53\n      // we also check for equality since DOUBLE_LIMIT + 1 == DOUBLE_LIMIT\n      if (offset <= -DOUBLE_LIMIT || offset >= DOUBLE_LIMIT) {\n        return -61;\n      }\n  \n      FS.llseek(stream, offset, whence);\n      (tempI64 = [stream.position>>>0,(tempDouble=stream.position,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((newOffset)>>2)]=tempI64[0],HEAP32[(((newOffset)+(4))>>2)]=tempI64[1]);\n      if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state\n      return 0;\n    } catch (e) {\n    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);\n    return e.errno;\n  }\n  }\n\n  function _fd_write(fd, iov, iovcnt, pnum) {try {\n  \n      var stream = SYSCALLS.getStreamFromFD(fd);\n      var num = SYSCALLS.doWritev(stream, iov, iovcnt);\n      HEAP32[((pnum)>>2)]=num\n      return 0;\n    } catch (e) {\n    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);\n    return e.errno;\n  }\n  }\n\n  \n  function _round(d) {\n      d = +d;\n      return d >= +0 ? +Math_floor(d + +0.5) : +Math_ceil(d - +0.5);\n    }\n\n  function _setTempRet0($i) {\n      setTempRet0(($i) | 0);\n    }\nvar FSNode = /** @constructor */ function(parent, name, mode, rdev) {\n    if (!parent) {\n      parent = this;  // root node sets parent to itself\n    }\n    this.parent = parent;\n    this.mount = parent.mount;\n    this.mounted = null;\n    this.id = FS.nextInode++;\n    this.name = name;\n    this.mode = mode;\n    this.node_ops = {};\n    this.stream_ops = {};\n    this.rdev = rdev;\n  };\n  var readMode = 292/*292*/ | 73/*73*/;\n  var writeMode = 146/*146*/;\n  Object.defineProperties(FSNode.prototype, {\n   read: {\n    get: /** @this{FSNode} */function() {\n     return (this.mode & readMode) === readMode;\n    },\n    set: /** @this{FSNode} */function(val) {\n     val ? this.mode |= readMode : this.mode &= ~readMode;\n    }\n   },\n   write: {\n    get: /** @this{FSNode} */function() {\n     return (this.mode & writeMode) === writeMode;\n    },\n    set: /** @this{FSNode} */function(val) {\n     val ? this.mode |= writeMode : this.mode &= ~writeMode;\n    }\n   },\n   isFolder: {\n    get: /** @this{FSNode} */function() {\n     return FS.isDir(this.mode);\n    }\n   },\n   isDevice: {\n    get: /** @this{FSNode} */function() {\n     return FS.isChrdev(this.mode);\n    }\n   }\n  });\n  FS.FSNode = FSNode;\n  FS.staticInit();;\nvar ASSERTIONS = false;\n\n\n\n/** @type {function(string, boolean=, number=)} */\nfunction intArrayFromString(stringy, dontAddNull, length) {\n  var len = length > 0 ? length : lengthBytesUTF8(stringy)+1;\n  var u8array = new Array(len);\n  var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length);\n  if (dontAddNull) u8array.length = numBytesWritten;\n  return u8array;\n}\n\nfunction intArrayToString(array) {\n  var ret = [];\n  for (var i = 0; i < array.length; i++) {\n    var chr = array[i];\n    if (chr > 0xFF) {\n      if (ASSERTIONS) {\n        assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ')  at offset ' + i + ' not in 0x00-0xFF.');\n      }\n      chr &= 0xFF;\n    }\n    ret.push(String.fromCharCode(chr));\n  }\n  return ret.join('');\n}\n\n\n// Copied from https://github.com/strophe/strophejs/blob/e06d027/src/polyfills.js#L149\n\n// This code was written by Tyler Akins and has been placed in the\n// public domain.  It would be nice if you left this header intact.\n// Base64 code from Tyler Akins -- http://rumkin.com\n\n/**\n * Decodes a base64 string.\n * @param {string} input The string to decode.\n */\nvar decodeBase64 = typeof atob === 'function' ? atob : function (input) {\n  var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n  var output = '';\n  var chr1, chr2, chr3;\n  var enc1, enc2, enc3, enc4;\n  var i = 0;\n  // remove all characters that are not A-Z, a-z, 0-9, +, /, or =\n  input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, '');\n  do {\n    enc1 = keyStr.indexOf(input.charAt(i++));\n    enc2 = keyStr.indexOf(input.charAt(i++));\n    enc3 = keyStr.indexOf(input.charAt(i++));\n    enc4 = keyStr.indexOf(input.charAt(i++));\n\n    chr1 = (enc1 << 2) | (enc2 >> 4);\n    chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n    chr3 = ((enc3 & 3) << 6) | enc4;\n\n    output = output + String.fromCharCode(chr1);\n\n    if (enc3 !== 64) {\n      output = output + String.fromCharCode(chr2);\n    }\n    if (enc4 !== 64) {\n      output = output + String.fromCharCode(chr3);\n    }\n  } while (i < input.length);\n  return output;\n};\n\n// Converts a string of base64 into a byte array.\n// Throws error on invalid input.\nfunction intArrayFromBase64(s) {\n  if (typeof ENVIRONMENT_IS_NODE === 'boolean' && ENVIRONMENT_IS_NODE) {\n    var buf;\n    try {\n      // TODO: Update Node.js externs, Closure does not recognize the following Buffer.from()\n      /**@suppress{checkTypes}*/\n      buf = Buffer.from(s, 'base64');\n    } catch (_) {\n      buf = new Buffer(s, 'base64');\n    }\n    return new Uint8Array(buf['buffer'], buf['byteOffset'], buf['byteLength']);\n  }\n\n  try {\n    var decoded = decodeBase64(s);\n    var bytes = new Uint8Array(decoded.length);\n    for (var i = 0 ; i < decoded.length ; ++i) {\n      bytes[i] = decoded.charCodeAt(i);\n    }\n    return bytes;\n  } catch (_) {\n    throw new Error('Converting base64 string to bytes failed.');\n  }\n}\n\n// If filename is a base64 data URI, parses and returns data (Buffer on node,\n// Uint8Array otherwise). If filename is not a base64 data URI, returns undefined.\nfunction tryParseAsDataURI(filename) {\n  if (!isDataURI(filename)) {\n    return;\n  }\n\n  return intArrayFromBase64(filename.slice(dataURIPrefix.length));\n}\n\n\n// ASM_LIBRARY EXTERN PRIMITIVES: Math_floor,Math_ceil\n\nvar asmGlobalArg = {};\nvar asmLibraryArg = { \"emscripten_get_sbrk_ptr\": _emscripten_get_sbrk_ptr, \"emscripten_memcpy_big\": _emscripten_memcpy_big, \"emscripten_resize_heap\": _emscripten_resize_heap, \"fd_close\": _fd_close, \"fd_read\": _fd_read, \"fd_seek\": _fd_seek, \"fd_write\": _fd_write, \"getTempRet0\": getTempRet0, \"memory\": wasmMemory, \"round\": _round, \"setTempRet0\": setTempRet0, \"table\": wasmTable };\nvar asm = createWasm();\n/** @type {function(...*):?} */\nvar ___wasm_call_ctors = Module[\"___wasm_call_ctors\"] = function() {\n  return (___wasm_call_ctors = Module[\"___wasm_call_ctors\"] = Module[\"asm\"][\"__wasm_call_ctors\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_new = Module[\"_FLAC__stream_decoder_new\"] = function() {\n  return (_FLAC__stream_decoder_new = Module[\"_FLAC__stream_decoder_new\"] = Module[\"asm\"][\"FLAC__stream_decoder_new\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_delete = Module[\"_FLAC__stream_decoder_delete\"] = function() {\n  return (_FLAC__stream_decoder_delete = Module[\"_FLAC__stream_decoder_delete\"] = Module[\"asm\"][\"FLAC__stream_decoder_delete\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_finish = Module[\"_FLAC__stream_decoder_finish\"] = function() {\n  return (_FLAC__stream_decoder_finish = Module[\"_FLAC__stream_decoder_finish\"] = Module[\"asm\"][\"FLAC__stream_decoder_finish\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_init_stream = Module[\"_FLAC__stream_decoder_init_stream\"] = function() {\n  return (_FLAC__stream_decoder_init_stream = Module[\"_FLAC__stream_decoder_init_stream\"] = Module[\"asm\"][\"FLAC__stream_decoder_init_stream\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_reset = Module[\"_FLAC__stream_decoder_reset\"] = function() {\n  return (_FLAC__stream_decoder_reset = Module[\"_FLAC__stream_decoder_reset\"] = Module[\"asm\"][\"FLAC__stream_decoder_reset\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_init_ogg_stream = Module[\"_FLAC__stream_decoder_init_ogg_stream\"] = function() {\n  return (_FLAC__stream_decoder_init_ogg_stream = Module[\"_FLAC__stream_decoder_init_ogg_stream\"] = Module[\"asm\"][\"FLAC__stream_decoder_init_ogg_stream\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_set_ogg_serial_number = Module[\"_FLAC__stream_decoder_set_ogg_serial_number\"] = function() {\n  return (_FLAC__stream_decoder_set_ogg_serial_number = Module[\"_FLAC__stream_decoder_set_ogg_serial_number\"] = Module[\"asm\"][\"FLAC__stream_decoder_set_ogg_serial_number\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_set_md5_checking = Module[\"_FLAC__stream_decoder_set_md5_checking\"] = function() {\n  return (_FLAC__stream_decoder_set_md5_checking = Module[\"_FLAC__stream_decoder_set_md5_checking\"] = Module[\"asm\"][\"FLAC__stream_decoder_set_md5_checking\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_set_metadata_respond = Module[\"_FLAC__stream_decoder_set_metadata_respond\"] = function() {\n  return (_FLAC__stream_decoder_set_metadata_respond = Module[\"_FLAC__stream_decoder_set_metadata_respond\"] = Module[\"asm\"][\"FLAC__stream_decoder_set_metadata_respond\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_set_metadata_respond_application = Module[\"_FLAC__stream_decoder_set_metadata_respond_application\"] = function() {\n  return (_FLAC__stream_decoder_set_metadata_respond_application = Module[\"_FLAC__stream_decoder_set_metadata_respond_application\"] = Module[\"asm\"][\"FLAC__stream_decoder_set_metadata_respond_application\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_set_metadata_respond_all = Module[\"_FLAC__stream_decoder_set_metadata_respond_all\"] = function() {\n  return (_FLAC__stream_decoder_set_metadata_respond_all = Module[\"_FLAC__stream_decoder_set_metadata_respond_all\"] = Module[\"asm\"][\"FLAC__stream_decoder_set_metadata_respond_all\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_set_metadata_ignore = Module[\"_FLAC__stream_decoder_set_metadata_ignore\"] = function() {\n  return (_FLAC__stream_decoder_set_metadata_ignore = Module[\"_FLAC__stream_decoder_set_metadata_ignore\"] = Module[\"asm\"][\"FLAC__stream_decoder_set_metadata_ignore\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_set_metadata_ignore_application = Module[\"_FLAC__stream_decoder_set_metadata_ignore_application\"] = function() {\n  return (_FLAC__stream_decoder_set_metadata_ignore_application = Module[\"_FLAC__stream_decoder_set_metadata_ignore_application\"] = Module[\"asm\"][\"FLAC__stream_decoder_set_metadata_ignore_application\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_set_metadata_ignore_all = Module[\"_FLAC__stream_decoder_set_metadata_ignore_all\"] = function() {\n  return (_FLAC__stream_decoder_set_metadata_ignore_all = Module[\"_FLAC__stream_decoder_set_metadata_ignore_all\"] = Module[\"asm\"][\"FLAC__stream_decoder_set_metadata_ignore_all\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_get_state = Module[\"_FLAC__stream_decoder_get_state\"] = function() {\n  return (_FLAC__stream_decoder_get_state = Module[\"_FLAC__stream_decoder_get_state\"] = Module[\"asm\"][\"FLAC__stream_decoder_get_state\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_get_md5_checking = Module[\"_FLAC__stream_decoder_get_md5_checking\"] = function() {\n  return (_FLAC__stream_decoder_get_md5_checking = Module[\"_FLAC__stream_decoder_get_md5_checking\"] = Module[\"asm\"][\"FLAC__stream_decoder_get_md5_checking\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_process_single = Module[\"_FLAC__stream_decoder_process_single\"] = function() {\n  return (_FLAC__stream_decoder_process_single = Module[\"_FLAC__stream_decoder_process_single\"] = Module[\"asm\"][\"FLAC__stream_decoder_process_single\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_process_until_end_of_metadata = Module[\"_FLAC__stream_decoder_process_until_end_of_metadata\"] = function() {\n  return (_FLAC__stream_decoder_process_until_end_of_metadata = Module[\"_FLAC__stream_decoder_process_until_end_of_metadata\"] = Module[\"asm\"][\"FLAC__stream_decoder_process_until_end_of_metadata\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_decoder_process_until_end_of_stream = Module[\"_FLAC__stream_decoder_process_until_end_of_stream\"] = function() {\n  return (_FLAC__stream_decoder_process_until_end_of_stream = Module[\"_FLAC__stream_decoder_process_until_end_of_stream\"] = Module[\"asm\"][\"FLAC__stream_decoder_process_until_end_of_stream\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_new = Module[\"_FLAC__stream_encoder_new\"] = function() {\n  return (_FLAC__stream_encoder_new = Module[\"_FLAC__stream_encoder_new\"] = Module[\"asm\"][\"FLAC__stream_encoder_new\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_delete = Module[\"_FLAC__stream_encoder_delete\"] = function() {\n  return (_FLAC__stream_encoder_delete = Module[\"_FLAC__stream_encoder_delete\"] = Module[\"asm\"][\"FLAC__stream_encoder_delete\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_finish = Module[\"_FLAC__stream_encoder_finish\"] = function() {\n  return (_FLAC__stream_encoder_finish = Module[\"_FLAC__stream_encoder_finish\"] = Module[\"asm\"][\"FLAC__stream_encoder_finish\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_init_stream = Module[\"_FLAC__stream_encoder_init_stream\"] = function() {\n  return (_FLAC__stream_encoder_init_stream = Module[\"_FLAC__stream_encoder_init_stream\"] = Module[\"asm\"][\"FLAC__stream_encoder_init_stream\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_init_ogg_stream = Module[\"_FLAC__stream_encoder_init_ogg_stream\"] = function() {\n  return (_FLAC__stream_encoder_init_ogg_stream = Module[\"_FLAC__stream_encoder_init_ogg_stream\"] = Module[\"asm\"][\"FLAC__stream_encoder_init_ogg_stream\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_set_ogg_serial_number = Module[\"_FLAC__stream_encoder_set_ogg_serial_number\"] = function() {\n  return (_FLAC__stream_encoder_set_ogg_serial_number = Module[\"_FLAC__stream_encoder_set_ogg_serial_number\"] = Module[\"asm\"][\"FLAC__stream_encoder_set_ogg_serial_number\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_set_verify = Module[\"_FLAC__stream_encoder_set_verify\"] = function() {\n  return (_FLAC__stream_encoder_set_verify = Module[\"_FLAC__stream_encoder_set_verify\"] = Module[\"asm\"][\"FLAC__stream_encoder_set_verify\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_set_channels = Module[\"_FLAC__stream_encoder_set_channels\"] = function() {\n  return (_FLAC__stream_encoder_set_channels = Module[\"_FLAC__stream_encoder_set_channels\"] = Module[\"asm\"][\"FLAC__stream_encoder_set_channels\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_set_bits_per_sample = Module[\"_FLAC__stream_encoder_set_bits_per_sample\"] = function() {\n  return (_FLAC__stream_encoder_set_bits_per_sample = Module[\"_FLAC__stream_encoder_set_bits_per_sample\"] = Module[\"asm\"][\"FLAC__stream_encoder_set_bits_per_sample\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_set_sample_rate = Module[\"_FLAC__stream_encoder_set_sample_rate\"] = function() {\n  return (_FLAC__stream_encoder_set_sample_rate = Module[\"_FLAC__stream_encoder_set_sample_rate\"] = Module[\"asm\"][\"FLAC__stream_encoder_set_sample_rate\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_set_compression_level = Module[\"_FLAC__stream_encoder_set_compression_level\"] = function() {\n  return (_FLAC__stream_encoder_set_compression_level = Module[\"_FLAC__stream_encoder_set_compression_level\"] = Module[\"asm\"][\"FLAC__stream_encoder_set_compression_level\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_set_blocksize = Module[\"_FLAC__stream_encoder_set_blocksize\"] = function() {\n  return (_FLAC__stream_encoder_set_blocksize = Module[\"_FLAC__stream_encoder_set_blocksize\"] = Module[\"asm\"][\"FLAC__stream_encoder_set_blocksize\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_set_total_samples_estimate = Module[\"_FLAC__stream_encoder_set_total_samples_estimate\"] = function() {\n  return (_FLAC__stream_encoder_set_total_samples_estimate = Module[\"_FLAC__stream_encoder_set_total_samples_estimate\"] = Module[\"asm\"][\"FLAC__stream_encoder_set_total_samples_estimate\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_set_metadata = Module[\"_FLAC__stream_encoder_set_metadata\"] = function() {\n  return (_FLAC__stream_encoder_set_metadata = Module[\"_FLAC__stream_encoder_set_metadata\"] = Module[\"asm\"][\"FLAC__stream_encoder_set_metadata\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_get_state = Module[\"_FLAC__stream_encoder_get_state\"] = function() {\n  return (_FLAC__stream_encoder_get_state = Module[\"_FLAC__stream_encoder_get_state\"] = Module[\"asm\"][\"FLAC__stream_encoder_get_state\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_get_verify_decoder_state = Module[\"_FLAC__stream_encoder_get_verify_decoder_state\"] = function() {\n  return (_FLAC__stream_encoder_get_verify_decoder_state = Module[\"_FLAC__stream_encoder_get_verify_decoder_state\"] = Module[\"asm\"][\"FLAC__stream_encoder_get_verify_decoder_state\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_get_verify = Module[\"_FLAC__stream_encoder_get_verify\"] = function() {\n  return (_FLAC__stream_encoder_get_verify = Module[\"_FLAC__stream_encoder_get_verify\"] = Module[\"asm\"][\"FLAC__stream_encoder_get_verify\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_process = Module[\"_FLAC__stream_encoder_process\"] = function() {\n  return (_FLAC__stream_encoder_process = Module[\"_FLAC__stream_encoder_process\"] = Module[\"asm\"][\"FLAC__stream_encoder_process\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _FLAC__stream_encoder_process_interleaved = Module[\"_FLAC__stream_encoder_process_interleaved\"] = function() {\n  return (_FLAC__stream_encoder_process_interleaved = Module[\"_FLAC__stream_encoder_process_interleaved\"] = Module[\"asm\"][\"FLAC__stream_encoder_process_interleaved\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar ___errno_location = Module[\"___errno_location\"] = function() {\n  return (___errno_location = Module[\"___errno_location\"] = Module[\"asm\"][\"__errno_location\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar stackSave = Module[\"stackSave\"] = function() {\n  return (stackSave = Module[\"stackSave\"] = Module[\"asm\"][\"stackSave\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar stackRestore = Module[\"stackRestore\"] = function() {\n  return (stackRestore = Module[\"stackRestore\"] = Module[\"asm\"][\"stackRestore\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar stackAlloc = Module[\"stackAlloc\"] = function() {\n  return (stackAlloc = Module[\"stackAlloc\"] = Module[\"asm\"][\"stackAlloc\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _malloc = Module[\"_malloc\"] = function() {\n  return (_malloc = Module[\"_malloc\"] = Module[\"asm\"][\"malloc\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar _free = Module[\"_free\"] = function() {\n  return (_free = Module[\"_free\"] = Module[\"asm\"][\"free\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar __growWasmMemory = Module[\"__growWasmMemory\"] = function() {\n  return (__growWasmMemory = Module[\"__growWasmMemory\"] = Module[\"asm\"][\"__growWasmMemory\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar dynCall_iii = Module[\"dynCall_iii\"] = function() {\n  return (dynCall_iii = Module[\"dynCall_iii\"] = Module[\"asm\"][\"dynCall_iii\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar dynCall_ii = Module[\"dynCall_ii\"] = function() {\n  return (dynCall_ii = Module[\"dynCall_ii\"] = Module[\"asm\"][\"dynCall_ii\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar dynCall_iiii = Module[\"dynCall_iiii\"] = function() {\n  return (dynCall_iiii = Module[\"dynCall_iiii\"] = Module[\"asm\"][\"dynCall_iiii\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar dynCall_jiji = Module[\"dynCall_jiji\"] = function() {\n  return (dynCall_jiji = Module[\"dynCall_jiji\"] = Module[\"asm\"][\"dynCall_jiji\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar dynCall_viiiiii = Module[\"dynCall_viiiiii\"] = function() {\n  return (dynCall_viiiiii = Module[\"dynCall_viiiiii\"] = Module[\"asm\"][\"dynCall_viiiiii\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar dynCall_iiiii = Module[\"dynCall_iiiii\"] = function() {\n  return (dynCall_iiiii = Module[\"dynCall_iiiii\"] = Module[\"asm\"][\"dynCall_iiiii\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar dynCall_viiiiiii = Module[\"dynCall_viiiiiii\"] = function() {\n  return (dynCall_viiiiiii = Module[\"dynCall_viiiiiii\"] = Module[\"asm\"][\"dynCall_viiiiiii\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar dynCall_viiii = Module[\"dynCall_viiii\"] = function() {\n  return (dynCall_viiii = Module[\"dynCall_viiii\"] = Module[\"asm\"][\"dynCall_viiii\"]).apply(null, arguments);\n};\n\n/** @type {function(...*):?} */\nvar dynCall_viii = Module[\"dynCall_viii\"] = function() {\n  return (dynCall_viii = Module[\"dynCall_viii\"] = Module[\"asm\"][\"dynCall_viii\"]).apply(null, arguments);\n};\n\n\n\n\n\n// === Auto-generated postamble setup entry stuff ===\n\n\n\n\nModule[\"ccall\"] = ccall;\nModule[\"cwrap\"] = cwrap;\nModule[\"setValue\"] = setValue;\nModule[\"getValue\"] = getValue;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar calledRun;\n\n/**\n * @constructor\n * @this {ExitStatus}\n */\nfunction ExitStatus(status) {\n  this.name = \"ExitStatus\";\n  this.message = \"Program terminated with exit(\" + status + \")\";\n  this.status = status;\n}\n\nvar calledMain = false;\n\n\ndependenciesFulfilled = function runCaller() {\n  // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false)\n  if (!calledRun) run();\n  if (!calledRun) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled\n};\n\n\n\n\n\n/** @type {function(Array=)} */\nfunction run(args) {\n  args = args || arguments_;\n\n  if (runDependencies > 0) {\n    return;\n  }\n\n\n  preRun();\n\n  if (runDependencies > 0) return; // a preRun added a dependency, run will be called later\n\n  function doRun() {\n    // run may have just been called through dependencies being fulfilled just in this very frame,\n    // or while the async setStatus time below was happening\n    if (calledRun) return;\n    calledRun = true;\n    Module['calledRun'] = true;\n\n    if (ABORT) return;\n\n    initRuntime();\n\n    preMain();\n\n    if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();\n\n\n    postRun();\n  }\n\n  if (Module['setStatus']) {\n    Module['setStatus']('Running...');\n    setTimeout(function() {\n      setTimeout(function() {\n        Module['setStatus']('');\n      }, 1);\n      doRun();\n    }, 1);\n  } else\n  {\n    doRun();\n  }\n}\nModule['run'] = run;\n\n\n/** @param {boolean|number=} implicit */\nfunction exit(status, implicit) {\n\n  // if this is just main exit-ing implicitly, and the status is 0, then we\n  // don't need to do anything here and can just leave. if the status is\n  // non-zero, though, then we need to report it.\n  // (we may have warned about this earlier, if a situation justifies doing so)\n  if (implicit && noExitRuntime && status === 0) {\n    return;\n  }\n\n  if (noExitRuntime) {\n  } else {\n\n    ABORT = true;\n    EXITSTATUS = status;\n\n    exitRuntime();\n\n    if (Module['onExit']) Module['onExit'](status);\n  }\n\n  quit_(status, new ExitStatus(status));\n}\n\nif (Module['preInit']) {\n  if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']];\n  while (Module['preInit'].length > 0) {\n    Module['preInit'].pop()();\n  }\n}\n\n\n  noExitRuntime = true;\n\nrun();\n\n\n\n\n\n\n// {{MODULE_ADDITIONS}}\n\n\n\n//libflac function wrappers\n\n/**\n * HELPER read/extract stream info meta-data from frame header / meta-data\n * @param {POINTER} p_streaminfo\n * @returns StreamInfo\n */\nfunction _readStreamInfo(p_streaminfo){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_STREAMINFO (0)\n\n\t/*\n\ttypedef struct {\n\t\tunsigned min_blocksize, max_blocksize;\n\t\tunsigned min_framesize, max_framesize;\n\t\tunsigned sample_rate;\n\t\tunsigned channels;\n\t\tunsigned bits_per_sample;\n\t\tFLAC__uint64 total_samples;\n\t\tFLAC__byte md5sum[16];\n\t} FLAC__StreamMetadata_StreamInfo;\n\t */\n\n\tvar min_blocksize = Module.getValue(p_streaminfo,'i32');//4 bytes\n\tvar max_blocksize = Module.getValue(p_streaminfo+4,'i32');//4 bytes\n\n\tvar min_framesize = Module.getValue(p_streaminfo+8,'i32');//4 bytes\n\tvar max_framesize = Module.getValue(p_streaminfo+12,'i32');//4 bytes\n\n\tvar sample_rate = Module.getValue(p_streaminfo+16,'i32');//4 bytes\n\tvar channels = Module.getValue(p_streaminfo+20,'i32');//4 bytes\n\n\tvar bits_per_sample = Module.getValue(p_streaminfo+24,'i32');//4 bytes\n\n\t//FIXME should be at p_streaminfo+28, but seems to be at p_streaminfo+32\n\tvar total_samples = Module.getValue(p_streaminfo+32,'i64');//8 bytes\n\n\tvar md5sum = _readMd5(p_streaminfo+40);//16 bytes\n\n\treturn {\n\t\tmin_blocksize: min_blocksize,\n\t\tmax_blocksize: max_blocksize,\n\t\tmin_framesize: min_framesize,\n\t\tmax_framesize: max_framesize,\n\t\tsampleRate: sample_rate,\n\t\tchannels: channels,\n\t\tbitsPerSample: bits_per_sample,\n\t\ttotal_samples: total_samples,\n\t\tmd5sum: md5sum\n\t};\n}\n\n/**\n * read MD5 checksum\n * @param {POINTER} p_md5\n * @returns {String} as HEX string representation\n */\nfunction _readMd5(p_md5){\n\n\tvar sb = [], v, str;\n\tfor(var i=0, len = 16; i < len; ++i){\n\t\tv = Module.getValue(p_md5+i,'i8');//1 byte\n\t\tif(v < 0) v = 256 + v;//<- \"convert\" to uint8, if necessary\n\t\tstr = v.toString(16);\n\t\tif(str.length < 2) str = '0' + str;//<- add padding, if necessary\n\t\tsb.push(str);\n\t}\n\treturn sb.join('');\n}\n\n/**\n * HELPER: read frame data\n *\n * @param {POINTER} p_frame\n * @param {CodingOptions} [enc_opt]\n * @returns FrameHeader\n */\nfunction _readFrameHdr(p_frame, enc_opt){\n\n\t/*\n\ttypedef struct {\n\t\tunsigned blocksize;\n\t\tunsigned sample_rate;\n\t\tunsigned channels;\n\t\tFLAC__ChannelAssignment channel_assignment;\n\t\tunsigned bits_per_sample;\n\t\tFLAC__FrameNumberType number_type;\n\t\tunion {\n\t\t\tFLAC__uint32 frame_number;\n\t\t\tFLAC__uint64 sample_number;\n\t\t} number;\n\t\tFLAC__uint8 crc;\n\t} FLAC__FrameHeader;\n\t */\n\n\tvar blocksize = Module.getValue(p_frame,'i32');//4 bytes\n\tvar sample_rate = Module.getValue(p_frame+4,'i32');//4 bytes\n\tvar channels = Module.getValue(p_frame+8,'i32');//4 bytes\n\n\t// 0: FLAC__CHANNEL_ASSIGNMENT_INDEPENDENT\tindependent channels\n\t// 1: FLAC__CHANNEL_ASSIGNMENT_LEFT_SIDE \tleft+side stereo\n\t// 2: FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDE \tright+side stereo\n\t// 3: FLAC__CHANNEL_ASSIGNMENT_MID_SIDE \tmid+side stereo\n\tvar channel_assignment = Module.getValue(p_frame+12,'i32');//4 bytes\n\n\tvar bits_per_sample = Module.getValue(p_frame+16,'i32');\n\n\t// 0: FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER \tnumber contains the frame number\n\t// 1: FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER\tnumber contains the sample number of first sample in frame\n\tvar number_type = Module.getValue(p_frame+20,'i32');\n\n\t// union {} number: The frame number or sample number of first sample in frame; use the number_type value to determine which to use.\n\tvar frame_number = Module.getValue(p_frame+24,'i32');\n\tvar sample_number = Module.getValue(p_frame+24,'i64');\n\n\tvar number = number_type === 0? frame_number : sample_number;\n\tvar numberType = number_type === 0? 'frames' : 'samples';\n\n\tvar crc = Module.getValue(p_frame+36,'i8');\n\n\tvar subframes;\n\tif(enc_opt && enc_opt.analyseSubframes){\n\t\tvar subOffset = {offset: 40};\n\t\tsubframes = [];\n\t\tfor(var i=0; i < channels; ++i){\n\t\t\tsubframes.push(_readSubFrameHdr(p_frame, subOffset, blocksize, enc_opt));\n\t\t}\n\t\t//TODO read footer\n\t\t// console.log('  footer crc ', Module.getValue(p_frame + subOffset.offset,'i16'));\n\t}\n\n\treturn {\n\t\tblocksize: blocksize,\n\t\tsampleRate: sample_rate,\n\t\tchannels: channels,\n\t\tchannelAssignment: channel_assignment,\n\t\tbitsPerSample: bits_per_sample,\n\t\tnumber: number,\n\t\tnumberType: numberType,\n\t\tcrc: crc,\n\t\tsubframes: subframes\n\t};\n}\n\n\nfunction _readSubFrameHdr(p_subframe, subOffset, block_size, enc_opt){\n\t/*\n\tFLAC__SubframeType \ttype\n\tunion {\n\t   FLAC__Subframe_Constant   constant\n\t   FLAC__Subframe_Fixed   fixed\n\t   FLAC__Subframe_LPC   lpc\n\t   FLAC__Subframe_Verbatim   verbatim\n\t} \tdata\n\tunsigned \twasted_bits\n\t*/\n\n\tvar type = Module.getValue(p_subframe + subOffset.offset, 'i32');\n\tsubOffset.offset += 4;\n\n\tvar data;\n\tswitch(type){\n\t\tcase 0:\t//FLAC__SUBFRAME_TYPE_CONSTANT\n\t\t\tdata = {value: Module.getValue(p_subframe + subOffset.offset, 'i32')};\n\t\t\tsubOffset.offset += 284;//4;\n\t\t\tbreak;\n\t\tcase 1:\t//FLAC__SUBFRAME_TYPE_VERBATIM\n\t\t\tdata = Module.getValue(p_subframe + subOffset.offset, 'i32');\n\t\t\tsubOffset.offset += 284;//4;\n\t\t\tbreak;\n\t\tcase 2:\t//FLAC__SUBFRAME_TYPE_FIXED\n\t\t\tdata = _readSubFrameHdrFixedData(p_subframe, subOffset, block_size, false, enc_opt);\n\t\t\tbreak;\n\t\tcase 3:\t//FLAC__SUBFRAME_TYPE_LPC\n\t\t\tdata = _readSubFrameHdrFixedData(p_subframe, subOffset, block_size, true, enc_opt);\n\t\t\tbreak;\n\t}\n\n\tvar offset =  subOffset.offset;\n\tvar wasted_bits = Module.getValue(p_subframe + offset, 'i32');\n\tsubOffset.offset += 4;\n\n\treturn {\n\t\ttype: type,//['CONSTANT', 'VERBATIM', 'FIXED', 'LPC'][type],\n\t\tdata: data,\n\t\twastedBits: wasted_bits\n\t}\n}\n\nfunction _readSubFrameHdrFixedData(p_subframe_data, subOffset, block_size, is_lpc, enc_opt){\n\n\tvar offset = subOffset.offset;\n\n\tvar data = {order: -1, contents: {parameters: [], rawBits: []}};\n\t//FLAC__Subframe_Fixed:\n\t// FLAC__EntropyCodingMethod \tentropy_coding_method\n\t// unsigned \torder\n\t// FLAC__int32 \twarmup [FLAC__MAX_FIXED_ORDER]\n\t// const FLAC__int32 * \tresidual\n\n\t//FLAC__EntropyCodingMethod:\n\t// FLAC__EntropyCodingMethodType \ttype\n\t// union {\n\t//    FLAC__EntropyCodingMethod_PartitionedRice   partitioned_rice\n\t// } \tdata\n\n\t//FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE\t0\t\tResidual is coded by partitioning into contexts, each with it's own 4-bit Rice parameter.\n\t//FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2 1\tResidual is coded by partitioning into contexts, each with it's own 5-bit Rice parameter.\n\tvar entropyType = Module.getValue(p_subframe_data, 'i32');\n\toffset += 4;\n\n\t//FLAC__EntropyCodingMethod_PartitionedRice:\n\t//\tunsigned \torder\n\tvar entropyOrder = Module.getValue(p_subframe_data + offset, 'i32');\n\tdata.order = entropyOrder;\n\toffset += 4;\n\n\t//FLAC__EntropyCodingMethod_PartitionedRice:\n\t//\tFLAC__EntropyCodingMethod_PartitionedRiceContents * \tcontents\n\tvar partitions = 1 << entropyOrder, params = data.contents.parameters, raws = data.contents.rawBits;\n\t//FLAC__EntropyCodingMethod_PartitionedRiceContents\n\t// unsigned * \tparameters\n\t// unsigned * \traw_bits\n\t// unsigned \tcapacity_by_order\n\tvar ppart = Module.getValue(p_subframe_data + offset, 'i32');\n\tvar pparams = Module.getValue(ppart, 'i32');\n\tvar praw = Module.getValue(ppart + 4, 'i32');\n\tdata.contents.capacityByOrder = Module.getValue(ppart + 8, 'i32');\n\tfor(var i=0; i < partitions; ++i){\n\t\tparams.push(Module.getValue(pparams + (i*4), 'i32'));\n\t\traws.push(Module.getValue(praw + (i*4), 'i32'));\n\t}\n\toffset += 4;\n\n\t//FLAC__Subframe_Fixed:\n\t//\tunsigned \torder\n\tvar order = Module.getValue(p_subframe_data + offset, 'i32');\n\toffset += 4;\n\n\tvar warmup = [], res;\n\n\tif(is_lpc){\n\t\t//FLAC__Subframe_LPC\n\n\t\t// unsigned \tqlp_coeff_precision\n\t\tvar qlp_coeff_precision = Module.getValue(p_subframe_data + offset, 'i32');\n\t\toffset += 4;\n\t\t// int \tquantization_level\n\t\tvar quantization_level = Module.getValue(p_subframe_data + offset, 'i32');\n\t\toffset += 4;\n\n\t\t//FLAC__Subframe_LPC :\n\t\t// FLAC__int32 \tqlp_coeff [FLAC__MAX_LPC_ORDER]\n\t\tvar qlp_coeff = [];\n\t\tfor(var i=0; i < order; ++i){\n\t\t\tqlp_coeff.push(Module.getValue(p_subframe_data + offset, 'i32'));\n\t\t\toffset += 4;\n\t\t}\n\t\tdata.qlp_coeff = qlp_coeff;\n\t\tdata.qlp_coeff_precision = qlp_coeff_precision;\n\t\tdata.quantization_level = quantization_level;\n\n\t\t//FLAC__Subframe_LPC:\n\t\t// FLAC__int32 \twarmup [FLAC__MAX_LPC_ORDER]\n\t\toffset = subOffset.offset + 152;\n\t\toffset = _readSubFrameHdrWarmup(p_subframe_data, offset, warmup, order);\n\n\t\t//FLAC__Subframe_LPC:\n\t\t// const FLAC__int32 * \tresidual\n\t\tif(enc_opt && enc_opt.analyseResiduals){\n\t\t\toffset = subOffset.offset + 280;\n\t\t\tres = _readSubFrameHdrResidual(p_subframe_data + offset, block_size, order);\n\t\t}\n\n\t} else {\n\n\t\t//FLAC__Subframe_Fixed:\n\t\t// FLAC__int32 \twarmup [FLAC__MAX_FIXED_ORDER]\n\t\toffset = _readSubFrameHdrWarmup(p_subframe_data, offset, warmup, order);\n\n\t\t//FLAC__Subframe_Fixed:\n\t\t// const FLAC__int32 * \tresidual\n\t\toffset = subOffset.offset + 32;\n\t\tif(enc_opt && enc_opt.analyseResiduals){\n\t\t\tres = _readSubFrameHdrResidual(p_subframe_data + offset, block_size, order);\n\t\t}\n\t}\n\n\tsubOffset.offset += 284;\n\treturn {\n\t\tpartition: {\n\t\t\ttype: entropyType,\n\t\t\tdata: data\n\t\t},\n\t\torder: order,\n\t\twarmup: warmup,\n\t\tresidual: res\n\t}\n}\n\n\nfunction _readSubFrameHdrWarmup(p_subframe_data, offset, warmup, order){\n\n\t// FLAC__int32 \twarmup [FLAC__MAX_FIXED_ORDER | FLAC__MAX_LPC_ORDER]\n\tfor(var i=0; i < order; ++i){\n\t\twarmup.push(Module.getValue(p_subframe_data + offset, 'i32'));\n\t\toffset += 4;\n\t}\n\treturn offset;\n}\n\n\nfunction _readSubFrameHdrResidual(p_subframe_data_res, block_size, order){\n\t// const FLAC__int32 * \tresidual\n\tvar pres = Module.getValue(p_subframe_data_res, 'i32');\n\tvar res = [];//Module.getValue(pres, 'i32');\n\t//TODO read residual all values(?)\n\t// -> \"The residual signal, length == (blocksize minus order) samples.\n\tfor(var i=0, size = block_size - order; i < size; ++i){\n\t\tres.push(Module.getValue(pres + (i*4), 'i32'));\n\t}\n\treturn res;\n}\n\nfunction _readConstChar(ptr, length, sb){\n\tsb.splice(0);\n\tvar ch;\n\tfor(var i=0; i < length; ++i){\n\t\tch = Module.getValue(ptr + i,'i8');\n\t\tif(ch === 0){\n\t\t\tbreak;\n\t\t}\n\t\tsb.push(String.fromCodePoint(ch));\n\t}\n\treturn sb.join('');\n}\n\nfunction _readNullTerminatedChar(ptr, sb){\n\tsb.splice(0);\n\tvar ch = 1, i = 0;\n\twhile(ch > 0){\n\t\tch = Module.getValue(ptr + i++, 'i8');\n\t\tif(ch === 0){\n\t\t\tbreak;\n\t\t}\n\t\tsb.push(String.fromCodePoint(ch));\n\t}\n\treturn sb.join('');\n}\n\n\n/**\n * HELPER read/extract padding metadata meta-data from meta-data block\n * @param {POINTER} p_padding_metadata\n * @returns PaddingMetadata\n */\nfunction _readPaddingMetadata(p_padding_metadata){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_PADDING (1)\n\n\t//FLAC__StreamMetadata_Padding:\n\t//\t\tint \tdummy\n\treturn {\n\t\tdummy: Module.getValue(p_padding_metadata,'i32')\n\t}\n}\n\n/**\n * HELPER read/extract application metadata meta-data from meta-data block\n * @param {POINTER} p_application_metadata\n * @returns ApplicationMetadata\n */\nfunction _readApplicationMetadata(p_application_metadata){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_APPLICATION (2)\n\n\t//FLAC__StreamMetadata_Application:\n\t// FLAC__byte \tid [4]\n\t// FLAC__byte * \tdata\n\treturn {\n\t\tid : Module.getValue(p_application_metadata,'i32'),\n\t\tdata: Module.getValue(p_application_metadata + 4,'i32')//TODO should read (binary) data?\n\t}\n}\n\n\n/**\n * HELPER read/extract seek table metadata meta-data from meta-data block\n * @param {POINTER} p_seek_table_metadata\n * @returns SeekTableMetadata\n */\nfunction _readSeekTableMetadata(p_seek_table_metadata){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_SEEKTABLE (3)\n\n\t//FLAC__StreamMetadata_SeekTable:\n\t// \tunsigned \tnum_points\n\t// \tFLAC__StreamMetadata_SeekPoint * \tpoints\n\n\tvar num_points = Module.getValue(p_seek_table_metadata,'i32');\n\n\tvar ptrPoints = Module.getValue(p_seek_table_metadata + 4,'i32');\n\tvar points = [];\n\tfor(var i=0; i < num_points; ++i){\n\n\t\t//FLAC__StreamMetadata_SeekPoint:\n\t\t// \tFLAC__uint64 \tsample_number\n\t\t// \tFLAC__uint64 \tstream_offset\n\t\t// \tunsigned \tframe_samples\n\n\t\tpoints.push({\n\t\t\tsample_number: Module.getValue(ptrPoints + (i * 24),'i64'),\n\t\t\tstream_offset: Module.getValue(ptrPoints + (i * 24) + 8,'i64'),\n\t\t\tframe_samples: Module.getValue(ptrPoints + (i * 24) + 16,'i32')\n\t\t});\n\t}\n\n\treturn {\n\t\tnum_points: num_points,\n\t\tpoints: points\n\t}\n}\n\n/**\n * HELPER read/extract vorbis comment meta-data from meta-data block\n * @param {POINTER} p_vorbiscomment\n * @returns VorbisComment\n */\nfunction _readVorbisComment(p_vorbiscomment){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_VORBIS_COMMENT (4)\n\n\t// FLAC__StreamMetadata_VorbisComment\n\t// FLAC__StreamMetadata_VorbisComment_Entry vendor_string:\n\t// \t\tFLAC__uint32 \tlength\n\t// \t\tFLAC__byte * \tentry\n\tvar length = Module.getValue(p_vorbiscomment,'i32');\n\tvar entry = Module.getValue(p_vorbiscomment + 4,'i32');\n\n\tvar sb = [];\n\tvar strEntry = _readConstChar(entry, length, sb);\n\n\t// FLAC__uint32 \tnum_comments\n\tvar num_comments = Module.getValue(p_vorbiscomment + 8,'i32');\n\n\t// FLAC__StreamMetadata_VorbisComment_Entry * \tcomments\n\tvar comments = [], clen, centry;\n\tvar pc = Module.getValue(p_vorbiscomment + 12, 'i32')\n\tfor(var i=0; i < num_comments; ++i){\n\n\t\t// FLAC__StreamMetadata_VorbisComment_Entry\n\t\t// \t\tFLAC__uint32 \tlength\n\t\t// \t\tFLAC__byte * \tentry\n\n\t\tclen = Module.getValue(pc + (i*8), 'i32');\n\t\tif(clen === 0){\n\t\t\tcontinue;\n\t\t}\n\n\t\tcentry = Module.getValue(pc + (i*8) + 4, 'i32');\n\t\tcomments.push(_readConstChar(centry, clen, sb));\n\t}\n\n\treturn {\n\t\tvendor_string: strEntry,\n\t\tnum_comments: num_comments,\n\t\tcomments: comments\n\t}\n}\n\n/**\n * HELPER read/extract cue sheet meta-data from meta-data block\n * @param {POINTER} p_cue_sheet\n * @returns CueSheetMetadata\n */\nfunction _readCueSheetMetadata(p_cue_sheet){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_CUESHEET (5)\n\n\t// char \tmedia_catalog_number [129]\n\t// FLAC__uint64 \tlead_in\n\t// FLAC__bool \tis_cd\n\t// unsigned \tnum_tracks\n\t// FLAC__StreamMetadata_CueSheet_Track * \ttracks\n\n\tvar sb = [];\n\tvar media_catalog_number = _readConstChar(p_cue_sheet, 129, sb);\n\n\tvar lead_in = Module.getValue(p_cue_sheet + 136,'i64');\n\n\tvar is_cd = Module.getValue(p_cue_sheet + 144,'i8');\n\tvar num_tracks = Module.getValue(p_cue_sheet + 148,'i32');\n\n\tvar ptrTrack = Module.getValue(p_cue_sheet + 152,'i32');\n\tvar tracks = [], trackOffset = ptrTrack;\n\tif(ptrTrack !== 0){\n\n\t\tfor(var i=0; i < num_tracks; ++i){\n\n\t\t\tvar tr = _readCueSheetMetadata_track(trackOffset, sb);\n\t\t\ttracks.push(tr);\n\t\t\ttrackOffset += 32;\n\t\t}\n\t}\n\n\treturn {\n\t\tmedia_catalog_number: media_catalog_number,\n\t\tlead_in: lead_in,\n\t\tis_cd: is_cd,\n\t\tnum_tracks: num_tracks,\n\t\ttracks: tracks\n\t}\n}\n\n/**\n * helper read track data for cue-sheet metadata\n * @param       {POINTER} p_cue_sheet_track pointer to the track data\n * @param       {string[]} sb \"string buffer\" temporary buffer for reading string (may be reset)\n * @return      {CueSheetTrack}\n */\nfunction _readCueSheetMetadata_track(p_cue_sheet_track, sb){\n\n\t// FLAC__StreamMetadata_CueSheet_Track:\n\t// \t\tFLAC__uint64 \toffset\n\t// \t\tFLAC__byte \tnumber\n\t// \t\tchar \tisrc [13]\n\t//\t\t unsigned \ttype:1\n\t// \t\tunsigned \tpre_emphasis:1\n\t// \t\tFLAC__byte \tnum_indices\n\t// \t\tFLAC__StreamMetadata_CueSheet_Index * \tindices\n\n\tvar typePremph = Module.getValue(p_cue_sheet_track + 22,'i8');\n\tvar num_indices = Module.getValue(p_cue_sheet_track + 23,'i8');\n\n\tvar indices = [];\n\tvar track = {\n\t\toffset: Module.getValue(p_cue_sheet_track,'i64'),\n\t\tnumber: Module.getValue(p_cue_sheet_track + 8,'i8') &255,\n\t\tisrc: _readConstChar(p_cue_sheet_track + 9, 13, sb),\n\t\ttype: typePremph & 1? 'NON_AUDIO' : 'AUDIO',\n\t\tpre_emphasis: !!(typePremph & 2),\n\t\tnum_indices: num_indices,\n\t\tindices: indices\n\t}\n\n\tvar idx;\n\tif(num_indices > 0){\n\t\tidx = Module.getValue(p_cue_sheet_track + 24,'i32');\n\n\t\t//FLAC__StreamMetadata_CueSheet_Index:\n\t\t// \tFLAC__uint64 \toffset\n\t\t// \tFLAC__byte \tnumber\n\n\t\tfor(var i=0; i < num_indices; ++i){\n\t\t\tindices.push({\n\t\t\t\toffset: Module.getValue(idx + (i*16),'i64'),\n\t\t\t\tnumber: Module.getValue(idx + (i*16) + 8,'i8')\n\t\t\t});\n\t\t}\n\t}\n\n\treturn track;\n}\n\n/**\n * HELPER read/extract picture meta-data from meta-data block\n * @param {POINTER} p_picture_metadata\n * @returns PictureMetadata\n */\nfunction _readPictureMetadata(p_picture_metadata){//-> FLAC__StreamMetadata.type (FLAC__MetadataType) === FLAC__METADATA_TYPE_PICTURE (6)\n\n\t// FLAC__StreamMetadata_Picture_Type \ttype\n\t// char * \tmime_type\n\t// FLAC__byte * \tdescription\n\t// FLAC__uint32 \twidth\n\t// FLAC__uint32 \theight\n\t// FLAC__uint32 \tdepth\n\t// FLAC__uint32 \tcolors\n\t// FLAC__uint32 \tdata_length\n\t// FLAC__byte * \tdata\n\n\tvar type = Module.getValue(p_picture_metadata,'i32');\n\n\tvar mime = Module.getValue(p_picture_metadata + 4,'i32');\n\n\tvar sb = [];\n\tvar mime_type = _readNullTerminatedChar(mime, sb);\n\n\tvar desc = Module.getValue(p_picture_metadata + 8,'i32');\n\tvar description = _readNullTerminatedChar(desc, sb);\n\n\tvar width  = Module.getValue(p_picture_metadata + 12,'i32');\n\tvar height = Module.getValue(p_picture_metadata + 16,'i32');\n\tvar depth  = Module.getValue(p_picture_metadata + 20,'i32');\n\tvar colors = Module.getValue(p_picture_metadata + 24,'i32');\n\tvar data_length = Module.getValue(p_picture_metadata + 28,'i32');\n\n\tvar data = Module.getValue(p_picture_metadata + 32,'i32');\n\n\tvar buffer = Uint8Array.from(Module.HEAPU8.subarray(data, data + data_length));\n\n\treturn {\n\t\ttype: type,\n\t\tmime_type: mime_type,\n\t\tdescription: description,\n\t\twidth: width,\n\t\theight: height,\n\t\tdepth: depth,\n\t\tcolors: colors,\n\t\tdata_length: data_length,\n\t\tdata: buffer\n\t}\n}\n\n/**\n * HELPER workaround / fix for returned write-buffer when decoding FLAC\n *\n * @param {number} heapOffset\n * \t\t\t\tthe offset for the data on HEAPU8\n * @param {Uint8Array} newBuffer\n * \t\t\t\tthe target buffer into which the data should be written -- with the correct (block) size\n * @param {boolean} applyFix\n * \t\t\t\twhether or not to apply the data repair heuristics\n * \t\t\t\t(handling duplicated/triplicated values in raw data)\n */\nfunction __fix_write_buffer(heapOffset, newBuffer, applyFix){\n\n\tvar dv = new DataView(newBuffer.buffer);\n\tvar targetSize = newBuffer.length;\n\n\tvar increase = !applyFix? 1 : 2;//<- for FIX/workaround, NOTE: e.g. if 24-bit padding occurres, there is no fix/increase needed (more details comment below)\n\tvar buffer = HEAPU8.subarray(heapOffset, heapOffset + targetSize * increase);\n\n\t// FIXME for some reason, the bytes values 0 (min) and 255 (max) get \"triplicated\",\n\t//\t\tor inserted \"doubled\" which should be ignored, i.e.\n\t//\t\tx x x\t-> x\n\t//\t\tx x\t\t-> <ignored>\n\t//\t\twhere x is 0 or 255\n\t// -> HACK for now: remove/\"over-read\" 2 of the values, for each of these triplets/doublications\n\tvar jump, isPrint;\n\tfor(var i=0, j=0, size = buffer.length; i < size && j < targetSize; ++i, ++j){\n\n\t\tif(i === size-1 && j < targetSize - 1){\n\t\t\t//increase heap-view, in order to read more (valid) data into the target buffer\n\t\t\tbuffer = HEAPU8.subarray(heapOffset, size + targetSize);\n\t\t\tsize = buffer.length;\n\t\t}\n\n\t\t// NOTE if e.g. 24-bit padding occurres, there does not seem to be no duplication/triplication of 255 or 0, so must not try to fix!\n\t\tif(applyFix && (buffer[i] === 0 || buffer[i] === 255)){\n\n\t\t\tjump = 0;\n\t\t\tisPrint = true;\n\n\t\t\tif(i + 1 < size && buffer[i] === buffer[i+1]){\n\n\t\t\t\t++jump;\n\n\t\t\t\tif(i + 2 < size){\n\t\t\t\t\tif(buffer[i] === buffer[i+2]){\n\t\t\t\t\t\t++jump;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//if only 2 occurrences: ignore value\n\t\t\t\t\t\tisPrint = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}//else: if single value: do print (an do not jump)\n\n\n\t\t\tif(isPrint){\n\t\t\t\tdv.setUint8(j, buffer[i]);\n\t\t\t\tif(jump === 2 && i + 3 < size && buffer[i] === buffer[i+3]){\n\t\t\t\t\t//special case for reducing triples in case the following value is also the same\n\t\t\t\t\t// (ie. something like: x x x |+ x)\n\t\t\t\t\t// -> then: do write the value one more time, and jump one further ahead\n\t\t\t\t\t// i.e. if value occurs 4 times in a row, write 2 values\n\t\t\t\t\t++jump;\n\t\t\t\t\tdv.setUint8(++j, buffer[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t--j;\n\t\t\t}\n\n\t\t\ti += jump;//<- apply jump, if there were value duplications\n\n\t\t} else {\n\t\t\tdv.setUint8(j, buffer[i]);\n\t\t}\n\n\t}\n}\n\n\n// FLAC__STREAM_DECODER_READ_STATUS_CONTINUE     \tThe read was OK and decoding can continue.\n// FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM   The read was attempted while at the end of the stream. Note that the client must only return this value when the read callback was called when already at the end of the stream. Otherwise, if the read itself moves to the end of the stream, the client should still return the data and FLAC__STREAM_DECODER_READ_STATUS_CONTINUE, and then on the next read callback it should return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM with a byte count of 0.\n// FLAC__STREAM_DECODER_READ_STATUS_ABORT       \tAn unrecoverable error occurred. The decoder will return from the process call.\nvar FLAC__STREAM_DECODER_READ_STATUS_CONTINUE = 0;\nvar FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM = 1;\nvar FLAC__STREAM_DECODER_READ_STATUS_ABORT = 2;\n\n// FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE   The write was OK and decoding can continue.\n// FLAC__STREAM_DECODER_WRITE_STATUS_ABORT     \tAn unrecoverable error occurred. The decoder will return from the process call.\nvar FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE = 0;\nvar FLAC__STREAM_DECODER_WRITE_STATUS_ABORT = 1;\n\n/**\n * @interface FLAC__StreamDecoderInitStatus\n * @memberOf Flac\n *\n * @property {\"FLAC__STREAM_DECODER_INIT_STATUS_OK\"}\t\t\t\t\t\t0 \tInitialization was successful.\n * @property {\"FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER\"}\t\t1 \tThe library was not compiled with support for the given container format.\n * @property {\"FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS\"}\t\t\t2 \tA required callback was not supplied.\n * @property {\"FLAC__STREAM_DECODER_INIT_STATUS_MEMORY_ALLOCATION_ERROR\"}\t3 \tAn error occurred allocating memory.\n * @property {\"FLAC__STREAM_DECODER_INIT_STATUS_ERROR_OPENING_FILE\"}\t\t4 \tfopen() failed in FLAC__stream_decoder_init_file() or FLAC__stream_decoder_init_ogg_file().\n * @property {\"FLAC__STREAM_DECODER_INIT_STATUS_ALREADY_INITIALIZED\"}\t\t5 \tFLAC__stream_decoder_init_*() was called when the decoder was already initialized, usually because FLAC__stream_decoder_finish() was not called.\n */\nvar FLAC__STREAM_DECODER_INIT_STATUS_OK\t= 0;\nvar FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER\t= 1;\nvar FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS\t= 2;\nvar FLAC__STREAM_DECODER_INIT_STATUS_MEMORY_ALLOCATION_ERROR = 3;\nvar FLAC__STREAM_DECODER_INIT_STATUS_ERROR_OPENING_FILE = 4;\nvar FLAC__STREAM_DECODER_INIT_STATUS_ALREADY_INITIALIZED = 5;\n\n/**\n * @interface FLAC__StreamEncoderInitStatus\n * @memberOf Flac\n *\n * @property {\"FLAC__STREAM_ENCODER_INIT_STATUS_OK\"}\t\t\t\t\t\t\t\t\t0 \tInitialization was successful.\n * @property {\"FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR\"}\t\t\t\t\t\t\t1 \tGeneral failure to set up encoder; call FLAC__stream_encoder_get_state() for cause.\n * @property {\"FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER\"}\t\t\t\t\t2 \tThe library was not compiled with support for the given container format.\n * @property {\"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS\"}\t\t\t\t\t\t3 \tA required callback was not supplied.\n * @property {\"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS\"}\t\t\t4 \tThe encoder has an invalid setting for number of channels.\n * @property {\"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE\"}\t\t\t\t5 \tThe encoder has an invalid setting for bits-per-sample. FLAC supports 4-32 bps but the reference encoder currently supports only up to 24 bps.\n * @property {\"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE\"}\t\t\t\t\t6 \tThe encoder has an invalid setting for the input sample rate.\n * @property {\"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE\"}\t\t\t\t\t7 \tThe encoder has an invalid setting for the block size.\n * @property {\"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER\"}\t\t\t\t\t8 \tThe encoder has an invalid setting for the maximum LPC order.\n * @property {\"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION\"}\t\t\t9 \tThe encoder has an invalid setting for the precision of the quantized linear predictor coefficients.\n * @property {\"FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER\"}\t10 \tThe specified block size is less than the maximum LPC order.\n * @property {\"FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE\"}\t\t\t\t\t\t11 \tThe encoder is bound to the Subset but other settings violate it.\n * @property {\"FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA\"}\t\t\t\t\t\t12 \tThe metadata input to the encoder is invalid, in one of the following ways:\n *\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t      FLAC__stream_encoder_set_metadata() was called with a null pointer but a block count > 0\n *\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t      One of the metadata blocks contains an undefined type\n *\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t      It contains an illegal CUESHEET as checked by FLAC__format_cuesheet_is_legal()\n *\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t      It contains an illegal SEEKTABLE as checked by FLAC__format_seektable_is_legal()\n *\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t      It contains more than one SEEKTABLE block or more than one VORBIS_COMMENT block\n * @property {\"FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED\"}\t\t\t\t\t13 \tFLAC__stream_encoder_init_*() was called when the encoder was already initialized, usually because FLAC__stream_encoder_finish() was not called.\n */\nvar FLAC__STREAM_ENCODER_INIT_STATUS_OK = 0;\nvar FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR = 1;\nvar FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER = 2;\nvar FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS = 3;\nvar FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS = 4;\nvar FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE = 5;\nvar FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE = 6;\nvar FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE = 7;\nvar FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER = 8;\nvar FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION = 9;\nvar FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER = 10;\nvar FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE = 11;\nvar FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA = 12;\nvar FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED = 13;\n\n//FLAC__STREAM_ENCODER_WRITE_STATUS_OK \t\t\t\tThe write was OK and encoding can continue.\n//FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR\t\tAn unrecoverable error occurred. The encoder will return from the process call\nvar FLAC__STREAM_ENCODER_WRITE_STATUS_OK = 0;\nvar FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR = 1;\n\n\n/**\n * Map for encoder/decoder callback functions\n *\n * <pre>[ID] -> {function_type: FUNCTION}</pre>\n *\n * type: {[id: number]: {[callback_type: string]: function}}\n * @private\n */\nvar coders = {};\n\n/**\n * Get a registered callback for the encoder / decoder instance\n *\n * @param {Number} p_coder\n * \t\t\tthe encoder/decoder pointer (ID)\n * @param {String} func_type\n * \t\t\tthe callback type, one of\n * \t\t\t\t\"write\" | \"read\" | \"error\" | \"metadata\"\n * @returns {Function} the callback (or VOID if there is no callback registered)\n * @private\n */\nfunction getCallback(p_coder, func_type){\n\tif(coders[p_coder]){\n\t\treturn coders[p_coder][func_type];\n\t}\n}\n\n/**\n * Register a callback for an encoder / decoder instance (will / should be deleted, when finish()/delete())\n *\n * @param {Number} p_coder\n * \t\t\tthe encoder/decoder pointer (ID)\n * @param {String} func_type\n * \t\t\tthe callback type, one of\n * \t\t\t\t\"write\" | \"read\" | \"error\" | \"metadata\"\n * @param {Function} callback\n * \t\t\tthe callback function\n * @private\n */\nfunction setCallback(p_coder, func_type, callback){\n\tif(!coders[p_coder]){\n\t\tcoders[p_coder] = {};\n\t}\n\tcoders[p_coder][func_type] = callback;\n}\n\n/**\n * Get coding options for the encoder / decoder instance:\n * returns FALSY when not set.\n *\n * @param {Number} p_coder\n * \t\t\tthe encoder/decoder pointer (ID)\n * @returns {CodingOptions} the coding options\n * @private\n * @memberOf Flac\n */\nfunction _getOptions(p_coder){\n\tif(coders[p_coder]){\n\t\treturn coders[p_coder][\"options\"];\n\t}\n}\n\n/**\n * Set coding options for an encoder / decoder instance (will / should be deleted, when finish()/delete())\n *\n * @param {Number} p_coder\n * \t\t\tthe encoder/decoder pointer (ID)\n * @param {CodingOptions} options\n * \t\t\tthe coding options\n * @private\n * @memberOf Flac\n */\nfunction _setOptions(p_coder, options){\n\tif(!coders[p_coder]){\n\t\tcoders[p_coder] = {};\n\t}\n\tcoders[p_coder][\"options\"] = options;\n}\n\n//(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data)\n// -> FLAC__StreamEncoderWriteStatus\nvar enc_write_fn_ptr = addFunction(function(p_encoder, buffer, bytes, samples, current_frame, p_client_data){\n\tvar retdata = new Uint8Array(bytes);\n\tretdata.set(HEAPU8.subarray(buffer, buffer + bytes));\n\tvar write_callback_fn = getCallback(p_encoder, 'write');\n\ttry{\n\t\twrite_callback_fn(retdata, bytes, samples, current_frame, p_client_data);\n\t} catch(err) {\n\t\tconsole.error(err);\n\t\treturn FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR;\n\t}\n\treturn FLAC__STREAM_ENCODER_WRITE_STATUS_OK;\n}, 'iiiiiii');\n\n//(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)\n// -> FLAC__StreamDecoderReadStatus\nvar dec_read_fn_ptr = addFunction(function(p_decoder, buffer, bytes, p_client_data){\n\t//FLAC__StreamDecoderReadCallback, see https://xiph.org/flac/api/group__flac__stream__decoder.html#ga7a5f593b9bc2d163884348b48c4285fd\n\n\tvar len = Module.getValue(bytes, 'i32');\n\n\tif(len === 0){\n\t\treturn FLAC__STREAM_DECODER_READ_STATUS_ABORT;\n\t}\n\n\tvar read_callback_fn = getCallback(p_decoder, 'read');\n\n\t//callback must return object with: {buffer: TypedArray, readDataLength: number, error: boolean}\n\tvar readResult = read_callback_fn(len, p_client_data);\n\t//in case of END_OF_STREAM or an error, readResult.readDataLength must be returned with 0\n\n\tvar readLen = readResult.readDataLength;\n\tModule.setValue(bytes, readLen, 'i32');\n\n\tif(readResult.error){\n\t\treturn FLAC__STREAM_DECODER_READ_STATUS_ABORT;\n\t}\n\n\tif(readLen === 0){\n\t\treturn FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;\n\t}\n\n\tvar readBuf = readResult.buffer;\n\n\tvar dataHeap = new Uint8Array(Module.HEAPU8.buffer, buffer, readLen);\n\tdataHeap.set(new Uint8Array(readBuf));\n\n\treturn FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;\n}, 'iiiii');\n\n//(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 *const buffer[], void *client_data)\n// -> FLAC__StreamDecoderWriteStatus\nvar dec_write_fn_ptr = addFunction(function(p_decoder, p_frame, p_buffer, p_client_data){\n\n\t// var dec = Module.getValue(p_decoder,'i32');\n\t// var clientData = Module.getValue(p_client_data,'i32');\n\n\tvar dec_opts = _getOptions(p_decoder);\n\tvar frameInfo = _readFrameHdr(p_frame, dec_opts);\n\n//\tconsole.log(frameInfo);//DEBUG\n\n\tvar channels = frameInfo.channels;\n\tvar block_size = frameInfo.blocksize * (frameInfo.bitsPerSample / 8);\n\n\t//whether or not to apply data fixing heuristics (e.g. not needed for 24-bit samples)\n\tvar isFix = frameInfo.bitsPerSample !== 24;\n\n\t//take padding bits into account for calculating buffer size\n\t// -> seems to be done for uneven byte sizes, i.e. 1 (8 bits) and 3 (24 bits)\n\tvar padding = (frameInfo.bitsPerSample / 8)%2;\n\tif(padding > 0){\n\t\tblock_size += frameInfo.blocksize * padding;\n\t}\n\n\tvar data = [];//<- array for the data of each channel\n\tvar bufferOffset, _buffer;\n\n\tfor(var i=0; i < channels; ++i){\n\n\t\tbufferOffset = Module.getValue(p_buffer + (i*4),'i32');\n\n\t\t_buffer = new Uint8Array(block_size);\n\t\t//FIXME HACK for \"strange\" data (see helper function __fix_write_buffer)\n\t\t__fix_write_buffer(bufferOffset, _buffer, isFix);\n\n\t\tdata.push(_buffer.subarray(0, block_size));\n\t}\n\n\tvar write_callback_fn = getCallback(p_decoder, 'write');\n\tvar res = write_callback_fn(data, frameInfo);//, clientData);\n\n\t// FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE\tThe write was OK and decoding can continue.\n\t// FLAC__STREAM_DECODER_WRITE_STATUS_ABORT     \tAn unrecoverable error occurred. The decoder will return from the process call.\n\n\treturn res !== false? FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE : FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;\n}, 'iiiii');\n\n/**\n * Decoding error codes.\n *\n * <br>\n * If the error code is not known, value <code>FLAC__STREAM_DECODER_ERROR__UNKNOWN__</code> is used.\n *\n * @property {\"FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC\"}\t\t\t0   An error in the stream caused the decoder to lose synchronization.\n * @property {\"FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER\"}  \t\t\t1   The decoder encountered a corrupted frame header.\n * @property {\"FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH\"}\t2   The frame's data did not match the CRC in the footer.\n * @property {\"FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM\"}\t3   The decoder encountered reserved fields in use in the stream.\n *\n *\n * @interface FLAC__StreamDecoderErrorStatus\n * @memberOf Flac\n */\nvar DecoderErrorCode = {\n\t0: 'FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC',\n\t1: 'FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER',\n\t2: 'FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH',\n\t3: 'FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM'\n}\n\n//(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)\n// -> void\nvar dec_error_fn_ptr = addFunction(function(p_decoder, err, p_client_data){\n\n\t//err:\n\tvar msg = DecoderErrorCode[err] || 'FLAC__STREAM_DECODER_ERROR__UNKNOWN__';//<- this should never happen;\n\n\tvar error_callback_fn = getCallback(p_decoder, 'error');\n\terror_callback_fn(err, msg, p_client_data);\n}, 'viii');\n\n//(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data) -> void\n//(const FLAC__StreamEncoder *encoder, const FLAC__StreamMetadata *metadata, void *client_data) -> void\nvar metadata_fn_ptr = addFunction(function(p_coder, p_metadata, p_client_data){\n\t/*\n\t typedef struct {\n\t\tFLAC__MetadataType type;\n\t\tFLAC__bool is_last;\n\t\tunsigned length;\n\t\tunion {\n\t\t\tFLAC__StreamMetadata_StreamInfo stream_info;\n\t\t\tFLAC__StreamMetadata_Padding padding;\n\t\t\tFLAC__StreamMetadata_Application application;\n\t\t\tFLAC__StreamMetadata_SeekTable seek_table;\n\t\t\tFLAC__StreamMetadata_VorbisComment vorbis_comment;\n\t\t\tFLAC__StreamMetadata_CueSheet cue_sheet;\n\t\t\tFLAC__StreamMetadata_Picture picture;\n\t\t\tFLAC__StreamMetadata_Unknown unknown;\n\t\t} data;\n\t} FLAC__StreamMetadata;\n\t */\n\n\t/*\n\tFLAC__METADATA_TYPE_STREAMINFO \t\tSTREAMINFO block\n\tFLAC__METADATA_TYPE_PADDING \t\tPADDING block\n\tFLAC__METADATA_TYPE_APPLICATION \tAPPLICATION block\n\tFLAC__METADATA_TYPE_SEEKTABLE \t\tSEEKTABLE block\n\tFLAC__METADATA_TYPE_VORBIS_COMMENT \tVORBISCOMMENT block (a.k.a. FLAC tags)\n\tFLAC__METADATA_TYPE_CUESHEET \t\tCUESHEET block\n\tFLAC__METADATA_TYPE_PICTURE \t\tPICTURE block\n\tFLAC__METADATA_TYPE_UNDEFINED \t\tmarker to denote beginning of undefined type range; this number will increase as new metadata types are added\n\tFLAC__MAX_METADATA_TYPE \t\t\tNo type will ever be greater than this. There is not enough room in the protocol block.\n\t */\n\n\tvar type = Module.getValue(p_metadata,'i32');//4 bytes\n\tvar is_last = Module.getValue(p_metadata+4,'i32');//4 bytes\n\tvar length = Module.getValue(p_metadata+8,'i64');//8 bytes\n\n\tvar meta_data = {\n\t\ttype: type,\n\t\tisLast: is_last,\n\t\tlength: length,\n\t\tdata: void(0)\n\t};\n\n\tvar metadata_callback_fn = getCallback(p_coder, 'metadata');\n\tif(type === 0){// === FLAC__METADATA_TYPE_STREAMINFO\n\n\t\tmeta_data.data = _readStreamInfo(p_metadata+16);\n\t\tmetadata_callback_fn(meta_data.data, meta_data);\n\n\t} else {\n\n\t\tvar data;\n\t\tswitch(type){\n\t\t\tcase 1: //FLAC__METADATA_TYPE_PADDING\n\t\t\t\tdata = _readPaddingMetadata(p_metadata+16);\n\t\t\t\tbreak;\n\t\t\tcase 2: //FLAC__METADATA_TYPE_APPLICATION\n\t\t\t\tdata =  readApplicationMetadata(p_metadata+16);\n\t\t\t\tbreak;\n\t\t\tcase 3: //FLAC__METADATA_TYPE_SEEKTABLE\n\t\t\t\tdata = _readSeekTableMetadata(p_metadata+16);\n\t\t\t\tbreak;\n\n\t\t\tcase 4: //FLAC__METADATA_TYPE_VORBIS_COMMENT\n\t\t\t\tdata = _readVorbisComment(p_metadata+16);\n\t\t\t\tbreak;\n\n\t\t\tcase 5: //FLAC__METADATA_TYPE_CUESHEET\n\t\t\t\tdata = _readCueSheetMetadata(p_metadata+16);\n\t\t\t\tbreak;\n\n\t\t\tcase 6: //FLAC__METADATA_TYPE_PICTURE\n\t\t\t\tdata = _readPictureMetadata(p_metadata+16);\n\t\t\t\tbreak;\n\t\t\tdefault: { //NOTE this should not happen, and the raw data is very likely not correct!\n\t\t\t\tvar cod_opts = _getOptions(p_coder);\n\t\t\t\tif(cod_opts && cod_opts.enableRawMetadata){\n\t\t\t\t\tvar buffer = Uint8Array.from(HEAPU8.subarray(p_metadata+16, p_metadata+16+length));\n\t\t\t\t\tmeta_data.raw = buffer;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tmeta_data.data = data;\n\t\tmetadata_callback_fn(void(0), meta_data);\n\t}\n\n}, 'viii');\n\n\n////////////// helper fields and functions for event handling\n// see exported on()/off() functions\nvar listeners = {};\nvar persistedEvents = [];\nvar add_event_listener = function (eventName, listener){\n\tvar list = listeners[eventName];\n\tif(!list){\n\t\tlist = [listener];\n\t\tlisteners[eventName] = list;\n\t} else {\n\t\tlist.push(listener);\n\t}\n\tcheck_and_trigger_persisted_event(eventName, listener);\n};\nvar check_and_trigger_persisted_event = function(eventName, listener){\n\tvar activated;\n\tfor(var i=persistedEvents.length-1; i >= 0; --i){\n\t\tactivated = persistedEvents[i];\n\t\tif(activated && activated.event === eventName){\n\t\t\tlistener.apply(null, activated.args);\n\t\t\tbreak;\n\t\t}\n\t}\n};\nvar remove_event_listener = function (eventName, listener){\n\tvar list = listeners[eventName];\n\tif(list){\n\t\tfor(var i=list.length-1; i >= 0; --i){\n\t\t\tif(list[i] === listener){\n\t\t\t\tlist.splice(i, 1);\n\t\t\t}\n\t\t}\n\t}\n};\n/**\n * HELPER: fire an event\n * @param  {string} eventName\n * \t\t\t\t\t\t\t\t\t\tthe event name\n * @param  {any[]} [args] OPITIONAL\n * \t\t\t\t\t\t\t\t\t\tthe arguments when triggering the listeners\n * @param  {boolean} [isPersist] OPTIONAL (positinal argument!)\n * \t\t\t\t\t\t\t\t\t\tif TRUE, handlers for this event that will be registered after this will get triggered immediately\n * \t\t\t\t\t\t\t\t\t\t(i.e. event is \"persistent\": once triggered it stays \"active\")\n *\n */\nvar do_fire_event = function (eventName, args, isPersist){\n\tif(_exported['on'+eventName]){\n\t\t_exported['on'+eventName].apply(null, args);\n\t}\n\tvar list = listeners[eventName];\n\tif(list){\n\t\tfor(var i=0, size=list.length; i < size; ++i){\n\t\t\tlist[i].apply(null, args)\n\t\t}\n\t}\n\tif(isPersist){\n\t\tpersistedEvents.push({event: eventName, args: args});\n\t}\n}\n\n/////////////////////////////////////    export / public: /////////////////////////////////////////////\n/**\n * The <code>Flac</code> module that provides functionality\n * for encoding WAV/PCM audio to Flac and decoding Flac to PCM.\n *\n * <br/><br/>\n * <p>\n * NOTE most functions are named analogous to the original C library functions,\n *      so that its documentation may be used for further reading.\n * </p>\n *\n * @see https://xiph.org/flac/api/group__flac__stream__encoder.html\n * @see https://xiph.org/flac/api/group__flac__stream__decoder.html\n *\n * @class Flac\n * @namespace Flac\n */\nvar _exported = {\n\t_module: Module,//internal: reference to Flac module\n\t_clear_enc_cb: function(enc_ptr){//internal function: remove reference to encoder instance and its callbacks\n\t\tdelete coders[enc_ptr];\n\t},\n\t_clear_dec_cb: function(dec_ptr){//internal function: remove reference to decoder instance and its callbacks\n\t\tdelete coders[dec_ptr];\n\t},\n\t/**\n\t * Additional options for encoding or decoding\n\t * @interface CodingOptions\n\t * @memberOf Flac\n\t * @property {boolean}  [analyseSubframes] for decoding: include subframes metadata in write-callback metadata, DEFAULT: false\n\t * @property {boolean}  [analyseResiduals] for decoding: include residual data in subframes metadata in write-callback metadata, NOTE {@link #analyseSubframes} muste also be enabled, DEFAULT: false\n\t * @property {boolean}  [enableRawMetadata] DEBUG option for decoding: enable receiving raw metadata for unknown metadata types in second argument in the metadata-callback, DEFAULT: false\n\t *\n\t * @see Flac#setOptions\n\t * @see Flac~metadata_callback_fn\n\t * @see Flac#FLAC__stream_decoder_set_metadata_respond_all\n\t */\n\t/**\n\t * FLAC raw metadata\n\t *\n\t * @interface MetadataBlock\n\t * @memberOf Flac\n\t * @property {Flac.FLAC__MetadataType}  type the type of the metadata\n\t * @property {boolean}  isLast if it is the last block of metadata\n\t * @property {number}  length the length of the metadata block (bytes)\n\t * @property {Flac.StreamMetadata | Flac.PaddingMetadata | Flac.ApplicationMetadata | Flac.SeekTableMetadata | Flac.CueSheetMetadata | Flac.PictureMetadata}  [data] the metadata (omitted for unknown metadata types)\n\t * @property {Uint8Array}  [raw] raw metadata (for debugging: enable via {@link Flac#setOptions})\n\t */\n\t/**\n\t * FLAC padding metadata block\n\t *\n\t * @interface PaddingMetadata\n\t * @memberOf Flac\n\t * @property {number}  dummy Conceptually this is an empty struct since we don't store the padding bytes. Empty structs are not allowed by some C compilers, hence the dummy.\n\t *\n\t * @see Flac.FLAC__MetadataType#FLAC__METADATA_TYPE_PADDING\n\t */\n\t/**\n\t * FLAC application metadata block\n\t *\n\t * NOTE the application meta data type is not really supported, i.e. the\n\t *      (binary) data is only a pointer to the memory heap.\n\t *\n\t * @interface ApplicationMetadata\n\t * @memberOf Flac\n\t * @property {number}  id the application ID\n\t * @property {number}  data (pointer)\n\t *\n\t * @see Flac.FLAC__MetadataType#FLAC__METADATA_TYPE_APPLICATION\n\t * @see <a href=\"https://xiph.org/flac/format.html#metadata_block_application\">application block format specification</a>\n\t */\n\t/**\n\t * FLAC seek table metadata block\n\t *\n\t * <p>\n\t * From the format specification:\n\t *\n\t * The seek points must be sorted by ascending sample number.\n\t *\n\t * Each seek point's sample number must be the first sample of the target frame.\n\t *\n\t * Each seek point's sample number must be unique within the table\n\t *\n\t * Existence of a SEEKTABLE block implies a correct setting of total_samples in the stream_info block.\n\t *\n\t * Behavior is undefined when more than one SEEKTABLE block is present in a stream.\n\t *\n\t * @interface SeekTableMetadata\n\t * @memberOf Flac\n\t * @property {number}  num_points the number of seek points\n\t * @property {Flac.SeekPoint[]}  points the seek points\n\t *\n\t * @see Flac.FLAC__MetadataType#FLAC__METADATA_TYPE_SEEKTABLE\n\t */\n\t/**\n\t * FLAC seek point data\n\t *\n\t * @interface SeekPoint\n\t * @memberOf Flac\n\t * @property {number}  sample_number The sample number of the target frame. NOTE <code>-1</code> for a placeholder point.\n\t * @property {number}  stream_offset The offset, in bytes, of the target frame with respect to beginning of the first frame.\n\t * @property {number}  frame_samples The number of samples in the target frame.\n\t *\n\t * @see Flac.SeekTableMetadata\n\t */\n\t/**\n\t * FLAC vorbis comment metadata block\n\t *\n\t * @interface VorbisCommentMetadata\n\t * @memberOf Flac\n\t * @property {string}  vendor_string the vendor string\n\t * @property {number}  num_comments the number of comments\n\t * @property {string[]}  comments the comments\n\t *\n\t * @see Flac.FLAC__MetadataType#FLAC__METADATA_TYPE_VORBIS_COMMENT\n\t */\n\t /**\n\t * FLAC cue sheet metadata block\n\t *\n\t * @interface CueSheetMetadata\n\t * @memberOf Flac\n\t * @property {string}  media_catalog_number Media catalog number, in ASCII printable characters 0x20-0x7e. In general, the media catalog number may be 0 to 128 bytes long.\n\t * @property {number}  lead_in The number of lead-in samples.\n\t * @property {boolean}  is_cd true if CUESHEET corresponds to a Compact Disc, else false.\n\t * @property {number}  num_tracks The number of tracks.\n\t * @property {Flac.CueSheetTrack[]}  tracks the tracks\n\t *\n\t * @see Flac.FLAC__MetadataType#FLAC__METADATA_TYPE_CUESHEET\n\t */\n\t /**\n\t * FLAC cue sheet track data\n\t *\n\t * @interface CueSheetTrack\n\t * @memberOf Flac\n\t * @property {number}  offset Track offset in samples, relative to the beginning of the FLAC audio stream.\n\t * @property {number}  number The track number.\n\t * @property {string}  isrc Track ISRC. This is a 12-digit alphanumeric code.\n\t * @property {\"AUDIO\" | \"NON_AUDIO\"}  type The track type: audio or non-audio.\n\t * @property {boolean}  pre_emphasis The pre-emphasis flag\n\t * @property {number}  num_indices The number of track index points.\n\t * @property {Flac.CueSheetTracIndex}  indices The track index points.\n\t *\n\t * @see Flac.CueSheetMetadata\n\t */\n\t/**\n\t * FLAC track index data for cue sheet metadata\n\t *\n\t * @interface CueSheetTracIndex\n\t * @memberOf Flac\n\t * @property {number}  offset Offset in samples, relative to the track offset, of the index point.\n\t * @property {number}  number The index point number.\n\t *\n\t * @see Flac.CueSheetTrack\n\t */\n\t/**\n\t * FLAC picture metadata block\n\t *\n\t * @interface PictureMetadata\n\t * @memberOf Flac\n\t * @property {Flac.FLAC__StreamMetadata_Picture_Type}  type The kind of picture stored.\n\t * @property {string}  mime_type Picture data's MIME type, in ASCII printable characters 0x20-0x7e, NUL terminated. For best compatibility with players, use picture data of MIME type image/jpeg or image/png. A MIME type of '–>' is also allowed, in which case the picture data should be a complete URL.\n\t * @property {string}  description Picture's description.\n\t * @property {number}  width Picture's width in pixels.\n\t * @property {number}  height Picture's height in pixels.\n\t * @property {number}  depth Picture's color depth in bits-per-pixel.\n\t * @property {number}  colors For indexed palettes (like GIF), picture's number of colors (the number of palette entries), or 0 for non-indexed (i.e. 2^depth).\n\t * @property {number}  data_length Length of binary picture data in bytes.\n\t * @property {Uint8Array}  data Binary picture data.\n\t */\n\t/**\n\t * An enumeration of the PICTURE types (see FLAC__StreamMetadataPicture and id3 v2.4 APIC tag).\n\t *\n\t * @interface FLAC__StreamMetadata_Picture_Type\n\t * @memberOf Flac\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_OTHER\"} \t\t\t\t\t0\t\tOther\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON_STANDARD\"} \t\t1\t\t32x32 pixels 'file icon' (PNG only)\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON\"} \t\t\t\t2\t\tOther file icon\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER\"} \t\t\t3\t\tCover (front)\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_BACK_COVER\"} \t\t\t\t4\t\tCover (back)\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_LEAFLET_PAGE\"} \t\t\t5\t\tLeaflet page\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_MEDIA\"} \t\t\t\t\t6\t\tMedia (e.g. label side of CD)\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_LEAD_ARTIST\"} \t\t\t7\t\tLead artist/lead performer/soloist\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_ARTIST\"} \t\t\t\t\t8\t\tArtist/performer\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_CONDUCTOR\"} \t\t\t\t9\t\tConductor\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_BAND\"} \t\t\t\t\t10\t\tBand/Orchestra\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_COMPOSER\"} \t\t\t\t11\t\tComposer\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_LYRICIST\"} \t\t\t\t12\t\tLyricist/text writer\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_RECORDING_LOCATION\"} \t\t13\t\tRecording Location\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_DURING_RECORDING\"} \t\t14\t\tDuring recording\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_DURING_PERFORMANCE\"} \t\t15\t\tDuring performance\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_VIDEO_SCREEN_CAPTURE\"} \t16\t\tMovie/video screen capture\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_FISH\"} \t\t\t\t\t17\t\tA bright coloured fish\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_ILLUSTRATION\"} \t\t\t18\t\tIllustration\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_BAND_LOGOTYPE\"} \t\t\t19\t\tBand/artist logotype\n\t * @property {\"FLAC__STREAM_METADATA_PICTURE_TYPE_PUBLISHER_LOGOTYPE\"} \t\t20\t\tPublisher/Studio logotype\n\t *\n\t * @see Flac.PictureMetadata\n\t */\n\n\t/**\n\t * An enumeration of the available metadata block types.\n\t *\n\t * @interface FLAC__MetadataType\n\t * @memberOf Flac\n\t *\n\t * @property {\"FLAC__METADATA_TYPE_STREAMINFO\"} \t\t0\tSTREAMINFO block\n\t * @property {\"FLAC__METADATA_TYPE_PADDING\"} \t\t\t1\tPADDING block\n\t * @property {\"FLAC__METADATA_TYPE_APPLICATION\"} \t\t2\tAPPLICATION block\n\t * @property {\"FLAC__METADATA_TYPE_SEEKTABLE\"} \t\t\t3\tSEEKTABLE block\n\t * @property {\"FLAC__METADATA_TYPE_VORBIS_COMMENT\"} \t4\tVORBISCOMMENT block (a.k.a. FLAC tags)\n\t * @property {\"FLAC__METADATA_TYPE_CUESHEET\"} \t\t\t5\tCUESHEET block\n\t * @property {\"FLAC__METADATA_TYPE_PICTURE\"} \t\t\t6\tPICTURE block\n\t * @property {\"FLAC__METADATA_TYPE_UNDEFINED\"} \t\t\t7\tmarker to denote beginning of undefined type range; this number will increase as new metadata types are added\n\t * @property {\"FLAC__MAX_METADATA_TYPE\"} \t\t\t\t126\tNo type will ever be greater than this. There is not enough room in the protocol block.\n\t *\n\t * @see Flac.MetadataBlock\n\t * @see <a href=\"https://xiph.org/flac/format.html\">FLAC format documentation</a>\n\t */\n\t/**\n\t * @function\n\t * @public\n\t * @memberOf Flac#\n\t * @copydoc Flac._setOptions\n\t */\n\tsetOptions: _setOptions,\n\t/**\n\t * @function\n\t * @public\n\t * @memberOf Flac#\n\t * @copydoc Flac._getOptions\n\t */\n\tgetOptions: _getOptions,\n\t/**\n\t * Returns if Flac has been initialized / is ready to be used.\n\t *\n\t * @returns {boolean} <code>true</code>, if Flac is ready to be used\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t * @see #onready\n\t * @see #on\n\t */\n\tisReady: function() { return _flac_ready; },\n\t/**\n\t * Hook for handler function that gets called, when asynchronous initialization has finished.\n\t *\n\t * NOTE that if the execution environment does not support <code>Object#defineProperty</code>, then\n\t *      this function is not called, after {@link #isReady} is <code>true</code>.\n\t *      In this case, {@link #isReady} should be checked, before setting <code>onready</code>\n\t *      and if it is <code>true</code>, handler should be executed immediately instead of setting <code>onready</code>.\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t * @param {Flac.event:ReadyEvent} event the ready-event object\n\t * @see #isReady\n\t * @see #on\n\t * @default undefined\n\t * @example\n\t *  // [1] if Object.defineProperty() IS supported:\n\t *  Flac.onready = function(event){\n\t *     //gets executed when library becomes ready, or immediately, if it already is ready...\n\t *\t   doSomethingWithFlac();\n\t *  };\n\t *\n\t *  // [2] if Object.defineProperty() is NOT supported:\n\t *\t// do check Flac.isReady(), and only set handler, if not ready yet\n\t *  // (otherwise immediately excute handler code)\n\t *  if(!Flac.isReady()){\n\t *    Flac.onready = function(event){\n\t *       //gets executed when library becomes ready...\n\t *\t\t doSomethingWithFlac();\n\t *    };\n\t *  } else {\n\t * \t\t// Flac is already ready: immediately start processing\n\t *\t\tdoSomethingWithFlac();\n\t *\t}\n\t */\n\tonready: void(0),\n\t/**\n\t * Ready event: is fired when the library has been initialized and is ready to be used\n\t * (e.g. asynchronous loading of binary / WASM modules has been completed).\n\t *\n\t * Before this event is fired, use of functions related to encoding and decoding may\n\t * cause errors.\n\t *\n\t * @event ReadyEvent\n\t * @memberOf Flac\n\t * @type {object}\n\t * @property {\"ready\"} type \tthe type of the event <code>\"ready\"</code>\n\t * @property {Flac} target \tthe initalized FLAC library instance\n\t *\n\t * @see #isReady\n\t * @see #on\n\t */\n\t/**\n\t * Created event: is fired when an encoder or decoder was created.\n\t *\n\t * @event CreatedEvent\n\t * @memberOf Flac\n\t * @type {object}\n\t * @property {\"created\"} type \tthe type of the event <code>\"created\"</code>\n\t * @property {Flac.CoderChangedEventData} target \tthe information for the created encoder or decoder\n\t *\n\t * @see #on\n\t */\n\t/**\n\t * Destroyed event: is fired when an encoder or decoder was destroyed.\n\t *\n\t * @event DestroyedEvent\n\t * @memberOf Flac\n\t * @type {object}\n\t * @property {\"destroyed\"} type \tthe type of the event <code>\"destroyed\"</code>\n\t * @property {Flac.CoderChangedEventData} target \tthe information for the destroyed encoder or decoder\n\t *\n\t * @see #on\n\t */\n\t/**\n\t * Life cycle event data for signaling life cycle changes of encoder or decoder instances\n\t * @interface CoderChangedEventData\n\t * @memberOf Flac\n\t * @property {number}  id  the ID for the encoder or decoder instance\n\t * @property {\"encoder\" | \"decoder\"}  type  signifies whether the event is for an encoder or decoder instance\n\t * @property {any}  [data]  specific data for the life cycle change\n\t *\n\t * @see Flac.event:CreatedEvent\n\t * @see Flac.event:DestroyedEvent\n\t */\n\t/**\n\t * Add an event listener for module-events.\n\t * Supported events:\n\t * <ul>\n\t *  <li> <code>\"ready\"</code> &rarr; {@link Flac.event:ReadyEvent}: emitted when module is ready for usage (i.e. {@link #isReady} is true)<br/>\n\t *             <em>NOTE listener will get immediately triggered if module is already <code>\"ready\"</code></em>\n\t *  </li>\n\t *  <li> <code>\"created\"</code> &rarr; {@link Flac.event:CreatedEvent}: emitted when an encoder or decoder instance was created<br/>\n\t *  </li>\n\t *  <li> <code>\"destroyed\"</code> &rarr; {@link Flac.event:DestroyedEvent}: emitted when an encoder or decoder instance was destroyed<br/>\n\t *  </li>\n\t * </ul>\n\t *\n\t * @param {string} eventName\n\t * @param {Function} listener\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t * @see #off\n\t * @see #onready\n\t * @see Flac.event:ReadyEvent\n\t * @see Flac.event:CreatedEvent\n\t * @see Flac.event:DestroyedEvent\n\t * @example\n\t *  Flac.on('ready', function(event){\n\t *     //gets executed when library is ready, or becomes ready...\n\t *  });\n\t */\n\ton: add_event_listener,\n\t/**\n\t * Remove an event listener for module-events.\n\t * @param {string} eventName\n\t * @param {Function} listener\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t * @see #on\n\t */\n\toff: remove_event_listener,\n\n\t/**\n\t * Set the \"verify\" flag. If true, the encoder will verify it's own encoded output by feeding it through an internal decoder and comparing the original signal against the decoded signal. If a mismatch occurs, the process call will return false. Note that this will slow the encoding process by the extra time required for decoding and comparison.\n\t *\n\t * <p>\n\t * NOTE: only use on un-initilized encoder instances!\n\t *\n\t * @param {number} encoder\n\t * \t\t\t\tthe ID of the encoder instance\n\t *\n\t * @param {boolean} is_verify enable/disable checksum verification during encoding\n\t *\n\t * @returns {boolean} <code>false</code> if the encoder is already initialized, else <code>true</code>\n\t *\n\t * @see #create_libflac_encoder\n\t * @see #FLAC__stream_encoder_get_verify\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_encoder_set_verify: function(encoder, is_verify){\n\t\tis_verify = is_verify? 1 : 0;\n\t\tModule.ccall('FLAC__stream_encoder_set_verify', 'number', ['number', 'number'], [ encoder, is_verify ]);\n\t},\n\t/**\n\t * Set the compression level\n\t *\n\t * The compression level is roughly proportional to the amount of effort the encoder expends to compress the file. A higher level usually means more computation but higher compression. The default level is suitable for most applications.\n\t *\n\t * Currently the levels range from 0 (fastest, least compression) to 8 (slowest, most compression). A value larger than 8 will be treated as 8.\n\t *\n\t *\n\t * <p>\n\t * NOTE: only use on un-initilized encoder instances!\n\t *\n\t * @param {number} encoder\n\t * \t\t\t\tthe ID of the encoder instance\n\t *\n\t * @param {Flac.CompressionLevel} compression_level the desired Flac compression level: [0, 8]\n\t *\n\t * @returns {boolean} <code>false</code> if the encoder is already initialized, else <code>true</code>\n\t *\n\t * @see #create_libflac_encoder\n\t * @see Flac.CompressionLevel\n\t * @see <a href=\"https://xiph.org/flac/api/group__flac__stream__encoder.html#gae49cf32f5256cb47eecd33779493ac85\">FLAC API for FLAC__stream_encoder_set_compression_level()</a>\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_encoder_set_compression_level: Module.cwrap('FLAC__stream_encoder_set_compression_level', 'number', [ 'number', 'number' ]),\n\t/**\n\t * Set the blocksize to use while encoding.\n\t * The number of samples to use per frame. Use 0 to let the encoder estimate a blocksize; this is usually best.\n\t *\n\t * <p>\n\t * NOTE: only use on un-initilized encoder instances!\n\t *\n\t * @param {number} encoder\n\t * \t\t\t\tthe ID of the encoder instance\n\t *\n\t * @param {number} block_size  the number of samples to use per frame\n\t *\n\t * @returns {boolean} <code>false</code> if the encoder is already initialized, else <code>true</code>\n\t *\n\t * @see #create_libflac_encoder\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_encoder_set_blocksize: Module.cwrap('FLAC__stream_encoder_set_blocksize', 'number', [ 'number', 'number']),\n\n\n\t/**\n\t * Get the state of the verify stream decoder. Useful when the stream encoder state is FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR.\n\t *\n\t * @param {number} encoder\n\t * \t\t\t\tthe ID of the encoder instance\n\t *\n\t * @returns {Flac.FLAC__StreamDecoderState} the verify stream decoder state\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_encoder_get_verify_decoder_state: Module.cwrap('FLAC__stream_encoder_get_verify_decoder_state', 'number', ['number']),\n\n\t/**\n\t * Get the \"verify\" flag for the encoder.\n\t *\n\t * @param {number} encoder\n\t * \t\t\t\tthe ID of the encoder instance\n\t *\n\t * @returns {boolean} the verify flag for the encoder\n\t *\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t *\n\t * @see #FLAC__stream_encoder_set_verify\n\t */\n\tFLAC__stream_encoder_get_verify: Module.cwrap('FLAC__stream_encoder_get_verify', 'number', ['number']),\n/*\n\nTODO export other encoder API functions?:\n\nFLAC__bool \tFLAC__stream_encoder_set_channels (FLAC__StreamEncoder *encoder, unsigned value)\n\nFLAC__bool \tFLAC__stream_encoder_set_bits_per_sample (FLAC__StreamEncoder *encoder, unsigned value)\n\nFLAC__bool \tFLAC__stream_encoder_set_sample_rate (FLAC__StreamEncoder *encoder, unsigned value)\n\nFLAC__bool \tFLAC__stream_encoder_set_do_mid_side_stereo (FLAC__StreamEncoder *encoder, FLAC__bool value)\n\nFLAC__bool \tFLAC__stream_encoder_set_loose_mid_side_stereo (FLAC__StreamEncoder *encoder, FLAC__bool value)\n\nFLAC__bool \tFLAC__stream_encoder_set_apodization (FLAC__StreamEncoder *encoder, const char *specification)\n\nFLAC__bool \tFLAC__stream_encoder_set_max_lpc_order (FLAC__StreamEncoder *encoder, unsigned value)\n\nFLAC__bool \tFLAC__stream_encoder_set_qlp_coeff_precision (FLAC__StreamEncoder *encoder, unsigned value)\n\nFLAC__bool \tFLAC__stream_encoder_set_do_qlp_coeff_prec_search (FLAC__StreamEncoder *encoder, FLAC__bool value)\n\nFLAC__bool \tFLAC__stream_encoder_set_do_escape_coding (FLAC__StreamEncoder *encoder, FLAC__bool value)\n\nFLAC__bool \tFLAC__stream_encoder_set_do_exhaustive_model_search (FLAC__StreamEncoder *encoder, FLAC__bool value)\n\nFLAC__bool \tFLAC__stream_encoder_set_min_residual_partition_order (FLAC__StreamEncoder *encoder, unsigned value)\n\nFLAC__bool \tFLAC__stream_encoder_set_max_residual_partition_order (FLAC__StreamEncoder *encoder, unsigned value)\n\nFLAC__bool \tFLAC__stream_encoder_set_rice_parameter_search_dist (FLAC__StreamEncoder *encoder, unsigned value)\n\nFLAC__bool \tFLAC__stream_encoder_get_streamable_subset (const FLAC__StreamEncoder *encoder)\n\nunsigned \tFLAC__stream_encoder_get_channels (const FLAC__StreamEncoder *encoder)\n\nunsigned \tFLAC__stream_encoder_get_bits_per_sample (const FLAC__StreamEncoder *encoder)\n\nunsigned \tFLAC__stream_encoder_get_sample_rate (const FLAC__StreamEncoder *encoder)\n\nunsigned \tFLAC__stream_encoder_get_blocksize (const FLAC__StreamEncoder *encoder)\n\nFLAC__bool \tFLAC__stream_encoder_get_do_mid_side_stereo (const FLAC__StreamEncoder *encoder)\n\nFLAC__bool \tFLAC__stream_encoder_get_loose_mid_side_stereo (const FLAC__StreamEncoder *encoder)\n\nunsigned \tFLAC__stream_encoder_get_max_lpc_order (const FLAC__StreamEncoder *encoder)\n\nunsigned \tFLAC__stream_encoder_get_qlp_coeff_precision (const FLAC__StreamEncoder *encoder)\n\nFLAC__bool \tFLAC__stream_encoder_get_do_qlp_coeff_prec_search (const FLAC__StreamEncoder *encoder)\n\nFLAC__bool \tFLAC__stream_encoder_get_do_escape_coding (const FLAC__StreamEncoder *encoder)\n\nFLAC__bool \tFLAC__stream_encoder_get_do_exhaustive_model_search (const FLAC__StreamEncoder *encoder)\n\nunsigned \tFLAC__stream_encoder_get_min_residual_partition_order (const FLAC__StreamEncoder *encoder)\n\nunsigned \tFLAC__stream_encoder_get_max_residual_partition_order (const FLAC__StreamEncoder *encoder)\n\nunsigned \tFLAC__stream_encoder_get_rice_parameter_search_dist (const FLAC__StreamEncoder *encoder)\n\nFLAC__uint64 \tFLAC__stream_encoder_get_total_samples_estimate (const FLAC__StreamEncoder *encoder)\n\n\n\nTODO export other decoder API functions?:\n\n\nconst char * \tFLAC__stream_decoder_get_resolved_state_string (const FLAC__StreamDecoder *decoder)\n\nFLAC__uint64 \tFLAC__stream_decoder_get_total_samples (const FLAC__StreamDecoder *decoder)\n\nunsigned \tFLAC__stream_decoder_get_channels (const FLAC__StreamDecoder *decoder)\n\nunsigned \tFLAC__stream_decoder_get_bits_per_sample (const FLAC__StreamDecoder *decoder)\n\nunsigned \tFLAC__stream_decoder_get_sample_rate (const FLAC__StreamDecoder *decoder)\n\nunsigned \tFLAC__stream_decoder_get_blocksize (const FLAC__StreamDecoder *decoder)\n\n\nFLAC__bool \tFLAC__stream_decoder_flush (FLAC__StreamDecoder *decoder)\n\nFLAC__bool \tFLAC__stream_decoder_skip_single_frame (FLAC__StreamDecoder *decoder)\n\n */\n\n\t /**\n\t * Set the compression level\n\t *\n\t * The compression level is roughly proportional to the amount of effort the encoder expends to compress the file. A higher level usually means more computation but higher compression. The default level is suitable for most applications.\n\t *\n\t * Currently the levels range from 0 (fastest, least compression) to 8 (slowest, most compression). A value larger than 8 will be treated as 8.\n\t *\n\t * This function automatically calls the following other set functions with appropriate values, so the client does not need to unless it specifically wants to override them:\n\t * <pre>\n\t *     FLAC__stream_encoder_set_do_mid_side_stereo()\n\t *     FLAC__stream_encoder_set_loose_mid_side_stereo()\n\t *     FLAC__stream_encoder_set_apodization()\n\t *     FLAC__stream_encoder_set_max_lpc_order()\n\t *     FLAC__stream_encoder_set_qlp_coeff_precision()\n\t *     FLAC__stream_encoder_set_do_qlp_coeff_prec_search()\n\t *     FLAC__stream_encoder_set_do_escape_coding()\n\t *     FLAC__stream_encoder_set_do_exhaustive_model_search()\n\t *     FLAC__stream_encoder_set_min_residual_partition_order()\n\t *     FLAC__stream_encoder_set_max_residual_partition_order()\n\t *     FLAC__stream_encoder_set_rice_parameter_search_dist()\n\t * </pre>\n\t * The actual values set for each level are:\n\t * | level  | do mid-side stereo  | loose mid-side stereo  | apodization                                    | max lpc order  | qlp coeff precision  | qlp coeff prec search  | escape coding  | exhaustive model search  | min residual partition order  | max residual partition order  | rice parameter search dist   |\n\t * |--------|---------------------|------------------------|------------------------------------------------|----------------|----------------------|------------------------|----------------|--------------------------|-------------------------------|-------------------------------|------------------------------|\n\t * | 0      | false               | false                  | tukey(0.5)                                     | 0              | 0                    | false                  | false          | false                    | 0                             | 3                             | 0                            |\n\t * | 1      | true                | true                   | tukey(0.5)                                     | 0              | 0                    | false                  | false          | false                    | 0                             | 3                             | 0                            |\n\t * | 2      | true                | false                  | tukey(0.5)                                     | 0              | 0                    | false                  | false          | false                    | 0                             | 3                             | 0                            |\n\t * | 3      | false               | false                  | tukey(0.5)                                     | 6              | 0                    | false                  | false          | false                    | 0                             | 4                             | 0                            |\n\t * | 4      | true                | true                   | tukey(0.5)                                     | 8              | 0                    | false                  | false          | false                    | 0                             | 4                             | 0                            |\n\t * | 5      | true                | false                  | tukey(0.5)                                     | 8              | 0                    | false                  | false          | false                    | 0                             | 5                             | 0                            |\n\t * | 6      | true                | false                  | tukey(0.5);partial_tukey(2)                    | 8              | 0                    | false                  | false          | false                    | 0                             | 6                             | 0                            |\n\t * | 7      | true                | false                  | tukey(0.5);partial_tukey(2)                    | 12             | 0                    | false                  | false          | false                    | 0                             | 6                             | 0                            |\n\t * | 8      | true                | false                  | tukey(0.5);partial_tukey(2);punchout_tukey(3)  | 12             | 0                    | false                  | false          | false                    | 0                             | 6                             | 0                            |\n\t *\n\t * @interface CompressionLevel\n\t * @memberOf Flac\n\t *\n\t * @property {\"FLAC__COMPRESSION_LEVEL_0\"} \t\t0\tcompression level 0\n\t * @property {\"FLAC__COMPRESSION_LEVEL_1\"} \t\t1\tcompression level 1\n\t * @property {\"FLAC__COMPRESSION_LEVEL_2\"} \t\t2\tcompression level 2\n\t * @property {\"FLAC__COMPRESSION_LEVEL_3\"} \t\t3\tcompression level 3\n\t * @property {\"FLAC__COMPRESSION_LEVEL_4\"} \t\t4\tcompression level 4\n\t * @property {\"FLAC__COMPRESSION_LEVEL_5\"} \t\t5\tcompression level 5\n\t * @property {\"FLAC__COMPRESSION_LEVEL_6\"} \t\t6\tcompression level 6\n\t * @property {\"FLAC__COMPRESSION_LEVEL_7\"} \t\t7\tcompression level 7\n\t * @property {\"FLAC__COMPRESSION_LEVEL_8\"} \t\t8\tcompression level 8\n\t */\n\t/**\n\t * Create an encoder.\n\t *\n\t * @param {number} sample_rate\n\t * \t\t\t\t\tthe sample rate of the input PCM data\n\t * @param {number} channels\n\t * \t\t\t\t\tthe number of channels of the input PCM data\n\t * @param {number} bps\n\t * \t\t\t\t\tbits per sample of the input PCM data\n\t * @param {Flac.CompressionLevel} compression_level\n\t * \t\t\t\t\tthe desired Flac compression level: [0, 8]\n\t * @param {number} [total_samples] OPTIONAL\n\t * \t\t\t\t\tthe number of total samples of the input PCM data:<br>\n\t * \t\t\t\t\t Sets an estimate of the total samples that will be encoded.\n\t * \t\t\t\t\t This is merely an estimate and may be set to 0 if unknown.\n\t * \t\t\t\t\t This value will be written to the STREAMINFO block before encoding,\n\t * \t\t\t\t\t and can remove the need for the caller to rewrite the value later if\n\t * \t\t\t\t\t the value is known before encoding.<br>\n\t * \t\t\t\t\tIf specified, the it will be written into metadata of the FLAC header.<br>\n\t * \t\t\t\t\tDEFAULT: 0 (i.e. unknown number of samples)\n\t * @param {boolean} [is_verify] OPTIONAL\n\t * \t\t\t\t\tenable/disable checksum verification during encoding<br>\n\t * \t\t\t\t\tDEFAULT: true<br>\n\t * \t\t\t\t\tNOTE: this argument is positional (i.e. total_samples must also be given)\n\t * @param {number} [block_size] OPTIONAL\n\t * \t\t\t\t\tthe number of samples to use per frame.<br>\n\t * \t\t\t\t\tDEFAULT: 0 (i.e. encoder sets block size automatically)\n\t * \t\t\t\t\tNOTE: this argument is positional (i.e. total_samples and is_verify must also be given)\n\t *\n\t *\n\t * @returns {number} the ID of the created encoder instance (or 0, if there was an error)\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tcreate_libflac_encoder: function(sample_rate, channels, bps, compression_level, total_samples, is_verify, block_size){\n\t\tis_verify = typeof is_verify === 'undefined'? 1 : is_verify + 0;\n\t\ttotal_samples = typeof total_samples === 'number'? total_samples : 0;\n\t\tblock_size = typeof block_size === 'number'? block_size : 0;\n\t\tvar ok = true;\n\t\tvar encoder = Module.ccall('FLAC__stream_encoder_new', 'number', [ ], [ ]);\n\t\tok &= Module.ccall('FLAC__stream_encoder_set_verify', 'number', ['number', 'number'], [ encoder, is_verify ]);\n\t\tok &= Module.ccall('FLAC__stream_encoder_set_compression_level', 'number', ['number', 'number'], [ encoder, compression_level ]);\n\t\tok &= Module.ccall('FLAC__stream_encoder_set_channels', 'number', ['number', 'number'], [ encoder, channels ]);\n\t\tok &= Module.ccall('FLAC__stream_encoder_set_bits_per_sample', 'number', ['number', 'number'], [ encoder, bps ]);\n\t\tok &= Module.ccall('FLAC__stream_encoder_set_sample_rate', 'number', ['number', 'number'], [ encoder, sample_rate ]);\n\t\tok &= Module.ccall('FLAC__stream_encoder_set_blocksize', 'number', [ 'number', 'number'], [ encoder, block_size ]);\n\t\tok &= Module.ccall('FLAC__stream_encoder_set_total_samples_estimate', 'number', ['number', 'number'], [ encoder, total_samples ]);\n\t\tif (ok){\n\t\t\tdo_fire_event('created', [{type: 'created', target: {id: encoder, type: 'encoder'}}], false);\n\t\t\treturn encoder;\n\t\t}\n\t\treturn 0;\n\t},\n\t/**\n\t * @deprecated use {@link #create_libflac_encoder} instead\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tinit_libflac_encoder: function(){\n\t\tconsole.warn('Flac.init_libflac_encoder() is deprecated, use Flac.create_libflac_encoder() instead!');\n\t\treturn this.create_libflac_encoder.apply(this, arguments);\n\t},\n\n\t/**\n\t * Create a decoder.\n\t *\n\t * @param {boolean} [is_verify]\n\t * \t\t\t\tenable/disable checksum verification during decoding<br>\n\t * \t\t\t\tDEFAULT: true\n\t *\n\t * @returns {number} the ID of the created decoder instance (or 0, if there was an error)\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tcreate_libflac_decoder: function(is_verify){\n\t\tis_verify = typeof is_verify === 'undefined'? 1 : is_verify + 0;\n\t\tvar ok = true;\n\t\tvar decoder = Module.ccall('FLAC__stream_decoder_new', 'number', [ ], [ ]);\n\t\tok &= Module.ccall('FLAC__stream_decoder_set_md5_checking', 'number', ['number', 'number'], [ decoder, is_verify ]);\n\t\tif (ok){\n\t\t\tdo_fire_event('created', [{type: 'created', target: {id: decoder, type: 'decoder'}}], false);\n\t\t\treturn decoder;\n\t\t}\n\t\treturn 0;\n\t},\n\t/**\n\t * @deprecated use {@link #create_libflac_decoder} instead\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tinit_libflac_decoder: function(){\n\t\tconsole.warn('Flac.init_libflac_decoder() is deprecated, use Flac.create_libflac_decoder() instead!');\n\t\treturn this.create_libflac_decoder.apply(this, arguments);\n\t},\n\t/**\n\t * The callback for writing the encoded FLAC data.\n\t *\n\t * @callback Flac~encoder_write_callback_fn\n\t * @param {Uint8Array} data the encoded FLAC data\n\t * @param {number} numberOfBytes the number of bytes in data\n\t * @param {number} samples the number of samples encoded in data\n\t * @param {number} currentFrame the number of the (current) encoded frame in data\n\t * @returns {void | false} returning <code>false</code> indicates that an\n\t * \t\t\t\t\t\t\t\tunrecoverable error occurred and decoding should be aborted\n\t */\n\t/**\n\t * The callback for the metadata of the encoded/decoded Flac data.\n\t *\n\t * By default, only the STREAMINFO metadata is enabled.\n\t *\n\t * For other metadata types {@link Flac.FLAC__MetadataType} they need to be enabled,\n\t * see e.g. {@link Flac#FLAC__stream_decoder_set_metadata_respond}\n\t *\n\t * @callback Flac~metadata_callback_fn\n\t * @param {Flac.StreamMetadata | undefined} metadata the FLAC meta data, NOTE only STREAMINFO is returned in first argument, for other types use 2nd argument's <code>metadataBlock.data<code>\n\t * @param {Flac.MetadataBlock} metadataBlock the detailed meta data block\n\t *\n\t * @see Flac#init_decoder_stream\n\t * @see Flac#init_encoder_stream\n\t * @see Flac.CodingOptions\n\t * @see Flac#FLAC__stream_decoder_set_metadata_respond_all\n\t */\n\t/**\n\t * FLAC meta data\n\t * @interface Metadata\n\t * @memberOf Flac\n\t * @property {number}  sampleRate the sample rate (Hz)\n\t * @property {number}  channels the number of channels\n\t * @property {number}  bitsPerSample bits per sample\n\t */\n\t/**\n\t * FLAC stream meta data\n\t * @interface StreamMetadata\n\t * @memberOf Flac\n\t * @augments Flac.Metadata\n\t * @property {number}  min_blocksize the minimal block size (bytes)\n\t * @property {number}  max_blocksize the maximal block size (bytes)\n\t * @property {number}  min_framesize the minimal frame size (bytes)\n\t * @property {number}  max_framesize the maximal frame size (bytes)\n\t * @property {number}  total_samples the total number of (encoded/decoded) samples\n\t * @property {string}  md5sum  the MD5 checksum for the decoded data (if validation is active)\n\t */\n\t/**\n\t * Initialize the encoder.\n\t *\n\t * @param {number} encoder\n\t * \t\t\t\tthe ID of the encoder instance that has not been initialized (or has been reset)\n\t *\n\t * @param {Flac~encoder_write_callback_fn} write_callback_fn\n\t * \t\t\t\tthe callback for writing the encoded Flac data:\n\t * \t\t\t\t<pre>write_callback_fn(data: Uint8Array, numberOfBytes: Number, samples: Number, currentFrame: Number)</pre>\n\t *\n\t * @param {Flac~metadata_callback_fn} [metadata_callback_fn] OPTIONAL\n\t * \t\t\t\tthe callback for the metadata of the encoded Flac data:\n\t * \t\t\t\t<pre>metadata_callback_fn(metadata: StreamMetadata)</pre>\n\t *\n\t * @param {number|boolean} [ogg_serial_number] OPTIONAL\n\t * \t\t\t\tif number or <code>true</code> is specified, the encoder will be initialized to\n\t * \t\t\t\twrite to an OGG container, see {@link Flac.init_encoder_ogg_stream}:\n\t * \t\t\t\t<code>true</code> will set a default serial number (<code>1</code>),\n\t * \t\t\t\tif specified as number, it will be used as the stream's serial number within the ogg container.\n\t *\n\t * @returns {Flac.FLAC__StreamEncoderInitStatus} the encoder status (<code>0</code> for <code>FLAC__STREAM_ENCODER_INIT_STATUS_OK</code>)\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tinit_encoder_stream: function(encoder, write_callback_fn, metadata_callback_fn, ogg_serial_number, client_data){\n\n\t\tvar is_ogg = (ogg_serial_number === true);\n\t\tclient_data = client_data|0;\n\n\t\tif(typeof write_callback_fn !== 'function'){\n\t\t\treturn FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS;\n\t\t}\n\t\tsetCallback(encoder, 'write', write_callback_fn);\n\n\t\tvar __metadata_callback_fn_ptr = 0;\n\t\tif(typeof metadata_callback_fn === 'function'){\n\t\t\tsetCallback(encoder, 'metadata', metadata_callback_fn);\n\t\t\t__metadata_callback_fn_ptr = metadata_fn_ptr;\n\t\t}\n\n\t\t//NOTE the following comments are used for auto-detecting exported functions (only change if ccall function name(s) change!):\n\t\t//\tModule.ccall('FLAC__stream_encoder_init_stream'\n\t\tvar func_name = 'FLAC__stream_encoder_init_stream';\n\t\tvar args_types = ['number', 'number', 'number', 'number', 'number', 'number'];\n\t\tvar args = [\n\t\t\tencoder,\n\t\t\tenc_write_fn_ptr,\n\t\t\t0,//\tFLAC__StreamEncoderSeekCallback\n\t\t\t0,//\tFLAC__StreamEncoderTellCallback\n\t\t\t__metadata_callback_fn_ptr,\n\t\t\tclient_data\n\t\t];\n\n\t\tif(typeof ogg_serial_number === 'number'){\n\n\t\t\tis_ogg = true;\n\n\t\t} else if(is_ogg){//else: set default serial number for stream in OGG container\n\n\t\t\t//NOTE from FLAC docs: \"It is recommended to set a serial number explicitly as the default of '0' may collide with other streams.\"\n\t\t\togg_serial_number = 1;\n\t\t}\n\n\t\tif(is_ogg){\n\t\t\t//NOTE the following comments are used for auto-detecting exported functions (only change if ccall function name(s) change!):\n\t\t\t//\tModule.ccall('FLAC__stream_encoder_init_ogg_stream'\n\t\t\tfunc_name = 'FLAC__stream_encoder_init_ogg_stream';\n\n\t\t\t//2nd arg: FLAC__StreamEncoderReadCallback ptr -> duplicate first entry & insert at [1]\n\t\t\targs.unshift(args[0]);\n\t\t\targs[1] = 0;//\tFLAC__StreamEncoderReadCallback\n\n\t\t\targs_types.unshift(args_types[0]);\n\t\t\targs_types[1] = 'number';\n\n\n\t\t\t//NOTE ignore BOOL return value when setting serial number, since init-call's returned\n\t\t\t//     status will also indicate, if encoder already has been initialized\n\t\t\tModule.ccall(\n\t\t\t\t'FLAC__stream_encoder_set_ogg_serial_number', 'number',\n\t\t\t\t['number', 'number'],\n\t\t\t\t[ encoder, ogg_serial_number ]\n\t\t\t);\n\t\t}\n\n\t\tvar init_status = Module.ccall(func_name, 'number', args_types, args);\n\n\t\treturn init_status;\n\t},\n\t/**\n\t * Initialize the encoder for writing to an OGG container.\n\t *\n\t * @param {number} [ogg_serial_number] OPTIONAL\n\t * \t\t\t\tthe serial number for the stream in the OGG container\n\t * \t\t\t\tDEFAULT: <code>1</code>\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t * @copydoc #init_encoder_stream\n\t */\n\tinit_encoder_ogg_stream: function(encoder, write_callback_fn, metadata_callback_fn, ogg_serial_number, client_data){\n\n\t\tif(typeof ogg_serial_number !== 'number'){\n\t\t\togg_serial_number = true;\n\t\t}\n\t\treturn this.init_encoder_stream(encoder, write_callback_fn, metadata_callback_fn, ogg_serial_number, client_data);\n\t},\n\t/**\n\t * Result / return value for {@link Flac~decoder_read_callback_fn} callback function\n\t *\n\t * @interface ReadResult\n\t * @memberOf Flac\n\t * @property {TypedArray}  buffer  a TypedArray (e.g. Uint8Array) with the read data\n\t * @property {number}  readDataLength the number of read data bytes. A number of <code>0</code> (zero) indicates that the end-of-stream is reached.\n\t * @property {boolean}  [error] OPTIONAL value of <code>true</code> indicates that an error occured (decoding will be aborted)\n\t */\n\t/**\n\t * Result / return value for {@link Flac~decoder_read_callback_fn} callback function for signifying that there is no more data to read\n\t *\n\t * @interface CompletedReadResult\n\t * @memberOf Flac\n\t * @augments Flac.ReadResult\n\t * @property {TypedArray | undefined}  buffer  a TypedArray (e.g. Uint8Array) with the read data (will be ignored in case readDataLength is <code>0</code>)\n\t * @property {0}  readDataLength the number of read data bytes: The number of <code>0</code> (zero) indicates that the end-of-stream is reached.\n\t */\n\t/**\n\t * The callback for reading the FLAC data that will be decoded.\n\t *\n\t * @callback Flac~decoder_read_callback_fn\n\t * @param {number} numberOfBytes the maximal number of bytes that the read callback can return\n\t * @returns {Flac.ReadResult | Flac.CompletedReadResult} the result of the reading action/request\n\t */\n\t/**\n\t * The callback for writing the decoded FLAC data.\n\t *\n\t * @callback Flac~decoder_write_callback_fn\n\t * @param {Uint8Array[]} data array of the channels with the decoded PCM data as <code>Uint8Array</code>s\n\t * @param {Flac.BlockMetadata} frameInfo the metadata information for the decoded data\n\t */\n\t/**\n\t * The callback for reporting decoding errors.\n\t *\n\t * @callback Flac~decoder_error_callback_fn\n\t * @param {number} errorCode the error code\n\t * @param {Flac.FLAC__StreamDecoderErrorStatus} errorDescription the string representation / description of the error\n\t */\n\t/**\n\t * FLAC block meta data\n\t * @interface BlockMetadata\n\t * @augments Flac.Metadata\n\t * @memberOf Flac\n\t *\n\t * @property {number}  blocksize the block size (bytes)\n\t * @property {number}  number the number of the decoded samples or frames\n\t * @property {string}  numberType the type to which <code>number</code> refers to: either <code>\"frames\"</code> or <code>\"samples\"</code>\n\t * @property {Flac.FLAC__ChannelAssignment} channelAssignment the channel assignment\n\t * @property {string}  crc the MD5 checksum for the decoded data, if validation is enabled\n\t * @property {Flac.SubFrameMetadata[]}  [subframes] the metadata of the subframes. The array length corresponds to the number of channels. NOTE will only be included if {@link Flac.CodingOptions CodingOptions.analyseSubframes} is enabled for the decoder.\n\t *\n\t * @see Flac.CodingOptions\n\t * @see Flac#setOptions\n\t */\n\t/**\n\t * FLAC subframe metadata\n\t * @interface SubFrameMetadata\n\t * @memberOf Flac\n\t *\n\t * @property {Flac.FLAC__SubframeType}  type the type of the subframe\n\t * @property {number|Flac.FixedSubFrameData|Flac.LPCSubFrameData}  data the type specific metadata for subframe\n\t * @property {number}  wastedBits the wasted bits-per-sample\n\t */\n\t/**\n\t * metadata for FIXED subframe type\n\t * @interface FixedSubFrameData\n\t * @memberOf Flac\n\t *\n\t * @property {number}  order  The polynomial order.\n\t * @property {number[]}  warmup  Warmup samples to prime the predictor, length == order.\n\t * @property {Flac.SubFramePartition}  partition  The residual coding method.\n\t * @property {number[]}  [residual]  The residual signal, length == (blocksize minus order) samples.\n\t * \t\t\t\t\t\t\t\t\tNOTE will only be included if {@link Flac.CodingOptions CodingOptions.analyseSubframes} is enabled for the decoder.\n\t */\n\t/**\n\t * metadata for LPC subframe type\n\t * @interface LPCSubFrameData\n\t * @augments Flac.FixedSubFrameData\n\t * @memberOf Flac\n\t *\n\t * @property {number}  order  The FIR order.\n\t * @property {number[]}  qlp_coeff  FIR filter coefficients.\n\t * @property {number}  qlp_coeff_precision  Quantized FIR filter coefficient precision in bits.\n\t * @property {number}  quantization_level The qlp coeff shift needed.\n\t */\n\t/**\n\t * metadata for FIXED or LPC subframe partitions\n\t * @interface SubFramePartition\n\t * @memberOf Flac\n\t *\n\t * @property {Flac.FLAC__EntropyCodingMethodType}  type  the entropy coding method\n\t * @property {Flac.SubFramePartitionData}  data  metadata for a Rice partitioned residual\n\t */\n\t/**\n\t * metadata for FIXED or LPC subframe partition data\n\t * @interface SubFramePartitionData\n\t * @memberOf Flac\n\t *\n\t * @property {number}  order  The partition order, i.e. # of contexts = 2 ^ order.\n\t * @property {Flac.SubFramePartitionContent}  contents  The context's Rice parameters and/or raw bits.\n\t */\n\t/**\n\t * metadata for FIXED or LPC subframe partition data content\n\t * @interface SubFramePartitionContent\n\t * @memberOf Flac\n\t *\n\t * @property {number[]}  parameters  The Rice parameters for each context.\n\t * @property {number[]}  rawBits  Widths for escape-coded partitions. Will be non-zero for escaped partitions and zero for unescaped partitions.\n\t * @property {number}  capacityByOrder  The capacity of the parameters and raw_bits arrays specified as an order, i.e. the number of array elements allocated is 2 ^ capacity_by_order.\n\t */\n\t/**\n\t * The types for FLAC subframes\n\t *\n\t * @interface FLAC__SubframeType\n\t * @memberOf Flac\n\t *\n\t * @property {\"FLAC__SUBFRAME_TYPE_CONSTANT\"} \t0\tconstant signal\n\t * @property {\"FLAC__SUBFRAME_TYPE_VERBATIM\"} \t1\tuncompressed signal\n\t * @property {\"FLAC__SUBFRAME_TYPE_FIXED\"} \t\t2\tfixed polynomial prediction\n\t * @property {\"FLAC__SUBFRAME_TYPE_LPC\"} \t\t3\tlinear prediction\n\t */\n\t/**\n\t * The channel assignment for the (decoded) frame.\n\t *\n\t * @interface FLAC__ChannelAssignment\n\t * @memberOf Flac\n\t *\n\t * @property {\"FLAC__CHANNEL_ASSIGNMENT_INDEPENDENT\"} \t\t0\tindependent channels\n\t * @property {\"FLAC__CHANNEL_ASSIGNMENT_LEFT_SIDE\"}  \t\t1\tleft+side stereo\n\t * @property {\"FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDE\"} \t\t2\tright+side stereo\n\t * @property {\"FLAC__CHANNEL_ASSIGNMENT_MID_SIDE\"}\t\t\t3\tmid+side stereo\n\t */\n\t/**\n\t * entropy coding methods\n\t *\n\t * @interface FLAC__EntropyCodingMethodType\n\t * @memberOf Flac\n\t *\n\t * @property {\"FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE\"} \t0\tResidual is coded by partitioning into contexts, each with it's own 4-bit Rice parameter.\n\t * @property {\"FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2\"} \t1\tResidual is coded by partitioning into contexts, each with it's own 5-bit Rice parameter.\n\t */\n\t/**\n\t * Initialize the decoder.\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance that has not been initialized (or has been reset)\n\t *\n\t * @param {Flac~decoder_read_callback_fn} read_callback_fn\n\t * \t\t\t\tthe callback for reading the Flac data that should get decoded:\n\t * \t\t\t\t<pre>read_callback_fn(numberOfBytes: Number) : {buffer: ArrayBuffer, readDataLength: number, error: boolean}</pre>\n\t *\n\t * @param {Flac~decoder_write_callback_fn} write_callback_fn\n\t * \t\t\t\tthe callback for writing the decoded data:\n\t * \t\t\t\t<pre>write_callback_fn(data: Uint8Array[], frameInfo: Metadata)</pre>\n\t *\n\t * @param {Flac~decoder_error_callback_fn} error_callback_fn\n\t * \t\t\t\tthe error callback:\n\t * \t\t\t\t<pre>error_callback_fn(errorCode: Number, errorDescription: String)</pre>\n\t *\n\t * @param {Flac~metadata_callback_fn} [metadata_callback_fn] OPTIONAL\n\t * \t\t\t\tcallback for receiving the metadata of FLAC data that will be decoded:\n\t * \t\t\t\t<pre>metadata_callback_fn(metadata: StreamMetadata)</pre>\n\t *\n\t * @param {number|boolean} [ogg_serial_number] OPTIONAL\n\t * \t\t\t\tif number or <code>true</code> is specified, the decoder will be initilized to\n\t * \t\t\t\tread from an OGG container, see {@link Flac.init_decoder_ogg_stream}:<br/>\n\t * \t\t\t\t<code>true</code> will use the default serial number, if specified as number the\n\t * \t\t\t\tcorresponding stream with the serial number from the ogg container will be used.\n\t *\n\t * @returns {Flac.FLAC__StreamDecoderInitStatus} the decoder status(<code>0</code> for <code>FLAC__STREAM_DECODER_INIT_STATUS_OK</code>)\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tinit_decoder_stream: function(decoder, read_callback_fn, write_callback_fn, error_callback_fn, metadata_callback_fn, ogg_serial_number, client_data){\n\n\t\tclient_data = client_data|0;\n\n\t\tif(typeof read_callback_fn !== 'function'){\n\t\t\treturn FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS;\n\t\t}\n\t\tsetCallback(decoder, 'read', read_callback_fn);\n\n\t\tif(typeof write_callback_fn !== 'function'){\n\t\t\treturn FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS;\n\t\t}\n\t\tsetCallback(decoder, 'write', write_callback_fn);\n\n\t\tvar __error_callback_fn_ptr = 0;\n\t\tif(typeof error_callback_fn === 'function'){\n\t\t\tsetCallback(decoder, 'error', error_callback_fn);\n\t\t\t__error_callback_fn_ptr = dec_error_fn_ptr;\n\t\t}\n\n\t\tvar __metadata_callback_fn_ptr = 0;\n\t\tif(typeof metadata_callback_fn === 'function'){\n\t\t\tsetCallback(decoder, 'metadata', metadata_callback_fn);\n\t\t\t__metadata_callback_fn_ptr = metadata_fn_ptr;\n\t\t}\n\n\t\tvar is_ogg = (ogg_serial_number === true);\n\t\tif(typeof ogg_serial_number === 'number'){\n\n\t\t\tis_ogg = true;\n\n\t\t\t//NOTE ignore BOOL return value when setting serial number, since init-call's returned\n\t\t\t//     status will also indicate, if decoder already has been initialized\n\t\t\tModule.ccall(\n\t\t\t\t'FLAC__stream_decoder_set_ogg_serial_number', 'number',\n\t\t\t\t['number', 'number'],\n\t\t\t\t[ decoder, ogg_serial_number ]\n\t\t\t);\n\t\t}\n\n\t\t//NOTE the following comments are used for auto-detecting exported functions (only change if ccall function name(s) change!):\n\t\t//\tModule.ccall('FLAC__stream_decoder_init_stream'\n\t\t//\tModule.ccall('FLAC__stream_decoder_init_ogg_stream'\n\t\tvar init_func_name = !is_ogg? 'FLAC__stream_decoder_init_stream' : 'FLAC__stream_decoder_init_ogg_stream';\n\n\t\tvar init_status = Module.ccall(\n\t\t\t\tinit_func_name, 'number',\n\t\t\t\t[ 'number', 'number', 'number', 'number', 'number', 'number', 'number', 'number', 'number', 'number'],\n\t\t\t\t[\n\t\t\t\t\t decoder,\n\t\t\t\t\t dec_read_fn_ptr,\n\t\t\t\t\t 0,// \tFLAC__StreamDecoderSeekCallback\n\t\t\t\t\t 0,// \tFLAC__StreamDecoderTellCallback\n\t\t\t\t\t 0,//\tFLAC__StreamDecoderLengthCallback\n\t\t\t\t\t 0,//\tFLAC__StreamDecoderEofCallback\n\t\t\t\t\t dec_write_fn_ptr,\n\t\t\t\t\t __metadata_callback_fn_ptr,\n\t\t\t\t\t __error_callback_fn_ptr,\n\t\t\t\t\t client_data\n\t\t\t\t]\n\t\t);\n\n\t\treturn init_status;\n\t},\n\t/**\n\t * Initialize the decoder for writing to an OGG container.\n\t *\n\t * @param {number} [ogg_serial_number] OPTIONAL\n\t * \t\t\t\tthe serial number for the stream in the OGG container that should be decoded.<br/>\n\t * \t\t\t\tThe default behavior is to use the serial number of the first Ogg page. Setting a serial number here will explicitly specify which stream is to be decoded.\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t * @copydoc #init_decoder_stream\n\t */\n\tinit_decoder_ogg_stream: function(decoder, read_callback_fn, write_callback_fn, error_callback_fn, metadata_callback_fn, ogg_serial_number, client_data){\n\n\t\tif(typeof ogg_serial_number !== 'number'){\n\t\t\togg_serial_number = true;\n\t\t}\n\t\treturn this.init_decoder_stream(decoder, read_callback_fn, write_callback_fn, error_callback_fn, metadata_callback_fn, ogg_serial_number, client_data);\n\t},\n\t/**\n\t * Encode / submit data for encoding.\n\t *\n\t * This version allows you to supply the input data where the channels are interleaved into a\n\t * single array (i.e. channel0_sample0, channel1_sample0, ... , channelN_sample0, channel0_sample1, ...).\n\t *\n\t * The samples need not be block-aligned but they must be sample-aligned, i.e. the first value should be\n\t * channel0_sample0 and the last value channelN_sampleM.\n\t *\n\t * Each sample should be a signed integer, right-justified to the resolution set by bits-per-sample.\n\t *\n\t * For example, if the resolution is 16 bits per sample, the samples should all be in the range [-32768,32767].\n\t *\n\t *\n\t * For applications where channel order is important, channels must follow the order as described in the frame header.\n\t *\n\t * @param {number} encoder\n\t * \t\t\t\tthe ID of the encoder instance\n\t *\n\t * @param {TypedArray} buffer\n\t * \t\t\t\tthe audio data in a typed array with signed integers (and size according to the set bits-per-sample setting)\n\t *\n\t * @param {number} num_of_samples\n\t * \t\t\t\tthe number of samples in buffer\n\t *\n\t * @returns {boolean} true if successful, else false; in this case, check the encoder state with FLAC__stream_encoder_get_state() to see what went wrong.\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_encoder_process_interleaved: function(encoder, buffer, num_of_samples){\n\t\t// get the length of the data in bytes\n\t\tvar numBytes = buffer.length * buffer.BYTES_PER_ELEMENT;\n\t\t// malloc enough space for the data\n\t\tvar ptr = Module._malloc(numBytes);\n\t\t// get a bytes-wise view on the newly allocated buffer\n\t\tvar heapBytes= new Uint8Array(Module.HEAPU8.buffer, ptr, numBytes);\n\t\t// copy data into heapBytes\n\t\theapBytes.set(new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength));// issue #11 (2): do use byteOffset and byteLength for copying the data in case the underlying buffer/ArrayBuffer of the TypedArray view is larger than the TypedArray\n\t\tvar status = Module.ccall('FLAC__stream_encoder_process_interleaved', 'number',\n\t\t\t\t['number', 'number', 'number'],\n\t\t\t\t[encoder, heapBytes.byteOffset, num_of_samples]\n\t\t);\n\t\tModule._free(ptr);\n\t\treturn status;\n\t},\n\n\t/**\n\t * Encode / submit data for encoding.\n\t *\n\t * Submit data for encoding. This version allows you to supply the input data via an array of pointers,\n\t * each pointer pointing to an array of samples samples representing one channel.\n\t * The samples need not be block-aligned, but each channel should have the same number of samples.\n\t *\n\t * Each sample should be a signed integer, right-justified to the resolution set by FLAC__stream_encoder_set_bits_per_sample().\n\t * For example, if the resolution is 16 bits per sample, the samples should all be in the range [-32768,32767].\n\t *\n\t *\n\t * For applications where channel order is important, channels must follow the order as described in the frame header.\n\t *\n\t * @param {number} encoder\n\t * \t\t\t\tthe ID of the encoder instance\n\t *\n\t * @param {TypedArray[]} channelBuffers\n\t * \t\t\t\tan array for the audio data channels as typed arrays with signed integers (and size according to the set bits-per-sample setting)\n\t *\n\t * @param {number} num_of_samples\n\t * \t\t\t\tthe number of samples in one channel (i.e. one of the buffers)\n\t *\n\t * @returns {boolean} true if successful, else false; in this case, check the encoder state with FLAC__stream_encoder_get_state() to see what went wrong.\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_encoder_process: function(encoder, channelBuffers, num_of_samples){\n\n\t\tvar ptrInfo = this._create_pointer_array(channelBuffers);\n\t\tvar pointerPtr = ptrInfo.pointerPointer;\n\n\t\tvar status = Module.ccall('FLAC__stream_encoder_process', 'number',\n\t\t\t\t['number', 'number', 'number'],\n\t\t\t\t[encoder, pointerPtr, num_of_samples]\n\t\t);\n\n\t\tthis._destroy_pointer_array(ptrInfo);\n\t\treturn status;\n\t},\n\t/**\n\t * Decodes a single frame.\n\t *\n\t * To check decoding progress, use {@link #FLAC__stream_decoder_get_state}.\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance\n\t *\n\t * @returns {boolean} FALSE if an error occurred\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_decoder_process_single: Module.cwrap('FLAC__stream_decoder_process_single', 'number', ['number']),\n\n\t/**\n\t * Decodes data until end of stream.\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance\n\t *\n\t * @returns {boolean} FALSE if an error occurred\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_decoder_process_until_end_of_stream: Module.cwrap('FLAC__stream_decoder_process_until_end_of_stream', 'number', ['number']),\n\n\t/**\n\t * Decodes data until end of metadata.\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance\n\t *\n\t * @returns {boolean} false if any fatal read, write, or memory allocation error occurred (meaning decoding must stop), else true.\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_decoder_process_until_end_of_metadata: Module.cwrap('FLAC__stream_decoder_process_until_end_of_metadata', 'number', ['number']),\n\n\t/**\n\t * Decoder state code.\n\t *\n\t * @interface FLAC__StreamDecoderState\n\t * @memberOf Flac\n\t *\n\t * @property {\"FLAC__STREAM_DECODER_SEARCH_FOR_METADATA\"} \t\t0\tThe decoder is ready to search for metadata\n\t * @property {\"FLAC__STREAM_DECODER_READ_METADATA\"}  \t\t\t1\tThe decoder is ready to or is in the process of reading metadata\n\t * @property {\"FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC\"} \t2\tThe decoder is ready to or is in the process of searching for the frame sync code\n\t * @property {\"FLAC__STREAM_DECODER_READ_FRAME\"}\t\t\t\t3\tThe decoder is ready to or is in the process of reading a frame\n\t * @property {\"FLAC__STREAM_DECODER_END_OF_STREAM\"}\t\t\t\t4\tThe decoder has reached the end of the stream\n\t * @property {\"FLAC__STREAM_DECODER_OGG_ERROR\"}\t\t\t\t\t5\tAn error occurred in the underlying Ogg layer\n\t * @property {\"FLAC__STREAM_DECODER_SEEK_ERROR\"}\t\t\t\t6\tAn error occurred while seeking. The decoder must be flushed with FLAC__stream_decoder_flush() or reset with FLAC__stream_decoder_reset() before decoding can continue\n\t * @property {\"FLAC__STREAM_DECODER_ABORTED\"}\t\t\t\t\t7\tThe decoder was aborted by the read callback\n\t * @property {\"FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR\"}\t8\tAn error occurred allocating memory. The decoder is in an invalid state and can no longer be used\n\t * @property {\"FLAC__STREAM_DECODER_UNINITIALIZED\"}\t\t\t\t9\tThe decoder is in the uninitialized state; one of the FLAC__stream_decoder_init_*() functions must be called before samples can be processed.\n\t *\n\t */\n\t/**\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance\n\t *\n\t * @returns {Flac.FLAC__StreamDecoderState} the decoder state\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_decoder_get_state: Module.cwrap('FLAC__stream_decoder_get_state', 'number', ['number']),\n\n\t/**\n\t * Encoder state code.\n\t *\n\t * @interface FLAC__StreamEncoderState\n\t * @memberOf Flac\n\t *\n\t * @property {\"FLAC__STREAM_ENCODER_OK\"}\t\t\t\t\t\t\t\t0 \tThe encoder is in the normal OK state and samples can be processed.\n\t * @property {\"FLAC__STREAM_ENCODER_UNINITIALIZED\"}\t\t\t\t\t\t1 \tThe encoder is in the uninitialized state; one of the FLAC__stream_encoder_init_*() functions must be called before samples can be processed.\n\t * @property {\"FLAC__STREAM_ENCODER_OGG_ERROR\"}\t\t\t\t\t\t\t2 \tAn error occurred in the underlying Ogg layer.\n\t * @property {\"FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR\"}\t\t\t\t3 \tAn error occurred in the underlying verify stream decoder; check FLAC__stream_encoder_get_verify_decoder_state().\n\t * @property {\"FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA\"}\t\t4 \tThe verify decoder detected a mismatch between the original audio signal and the decoded audio signal.\n\t * @property {\"FLAC__STREAM_ENCODER_CLIENT_ERROR\"}\t\t\t\t\t\t5 \tOne of the callbacks returned a fatal error.\n\t * @property {\"FLAC__STREAM_ENCODER_IO_ERROR\"}\t\t\t\t\t\t\t6 \tAn I/O error occurred while opening/reading/writing a file. Check errno.\n\t * @property {\"FLAC__STREAM_ENCODER_FRAMING_ERROR\"}\t\t\t\t\t\t7 \tAn error occurred while writing the stream; usually, the write_callback returned an error.\n\t * @property {\"FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR\"}\t\t\t8 \tMemory allocation failed.\n\t *\n\t */\n\t/**\n\t *\n\t * @param {number} encoder\n\t * \t\t\t\tthe ID of the encoder instance\n\t *\n\t * @returns {Flac.FLAC__StreamEncoderState} the encoder state\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_encoder_get_state:  Module.cwrap('FLAC__stream_encoder_get_state', 'number', ['number']),\n\t/**\n\t * Direct the decoder to pass on all metadata blocks of type type.\n\t *\n\t * By default, only the STREAMINFO block is returned via the metadata callback.\n\t *\n\t * <p>\n\t * NOTE: only use on un-initilized decoder instances!\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance\n\t *\n\t * @param {Flac.FLAC__MetadataType} type  the metadata type to be enabled\n\t *\n\t * @returns {boolean} <code>false</code> if the decoder is already initialized, else <code>true</code>\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t *\n\t * @see Flac#FLAC__stream_decoder_set_metadata_respond_all\n\t */\n\tFLAC__stream_decoder_set_metadata_respond: Module.cwrap('FLAC__stream_decoder_set_metadata_respond', 'number', ['number', 'number']),\n\t/**\n\t * Direct the decoder to pass on all APPLICATION metadata blocks of the given id.\n\t *\n\t * By default, only the STREAMINFO block is returned via the metadata callback.\n\t *\n\t * <p>\n\t * NOTE: only use on un-initilized decoder instances!\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance\n\t *\n\t * @param {number} id  the ID of application metadata\n\t *\n\t * @returns {boolean} <code>false</code> if the decoder is already initialized, else <code>true</code>\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t *\n\t * @see Flac#FLAC__stream_decoder_set_metadata_respond_all\n\t */\n\tFLAC__stream_decoder_set_metadata_respond_application: Module.cwrap('FLAC__stream_decoder_set_metadata_respond_application', 'number', ['number', 'number']),// (FLAC__StreamDecoder *decoder, const FLAC__byte id[4])\n\t/**\n\t * Direct the decoder to pass on all metadata blocks of any type.\n\t *\n\t * By default, only the STREAMINFO block is returned via the metadata callback.\n\t *\n\t * <p>\n\t * NOTE: only use on un-initilized decoder instances!\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance\n\t *\n\t * @returns {boolean} <code>false</code> if the decoder is already initialized, else <code>true</code>\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t *\n\t * @see Flac#FLAC__stream_decoder_set_metadata_ignore_all\n\t * @see Flac#FLAC__stream_decoder_set_metadata_respond_application\n\t * @see Flac#FLAC__stream_decoder_set_metadata_respond\n\t */\n\tFLAC__stream_decoder_set_metadata_respond_all: Module.cwrap('FLAC__stream_decoder_set_metadata_respond_all', 'number', ['number']),// (FLAC__StreamDecoder *decoder)\n\t/**\n\t * Direct the decoder to filter out all metadata blocks of type type.\n\t *\n\t * By default, only the STREAMINFO block is returned via the metadata callback.\n\t *\n\t * <p>\n\t * NOTE: only use on un-initilized decoder instances!\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance\n\t *\n\t * @param {Flac.FLAC__MetadataType} type  the metadata type to be ignored\n\t *\n\t * @returns {boolean} <code>false</code> if the decoder is already initialized, else <code>true</code>\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t *\n\t * @see Flac#FLAC__stream_decoder_set_metadata_ignore_all\n\t */\n\tFLAC__stream_decoder_set_metadata_ignore: Module.cwrap('FLAC__stream_decoder_set_metadata_ignore', 'number', ['number', 'number']),// (FLAC__StreamDecoder *decoder, FLAC__MetadataType type)\n\t/**\n\t * Direct the decoder to filter out all APPLICATION metadata blocks of the given id.\n\t *\n\t * By default, only the STREAMINFO block is returned via the metadata callback.\n\t *\n\t * <p>\n\t * NOTE: only use on un-initilized decoder instances!\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance\n\t *\n\t * @param {number} id  the ID of application metadata\n\t *\n\t * @returns {boolean} <code>false</code> if the decoder is already initialized, else <code>true</code>\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t *\n\t * @see Flac#FLAC__stream_decoder_set_metadata_ignore_all\n\t */\n\tFLAC__stream_decoder_set_metadata_ignore_application: Module.cwrap('FLAC__stream_decoder_set_metadata_ignore_application', 'number', ['number', 'number']),// (FLAC__StreamDecoder *decoder, const FLAC__byte id[4])\n\t/**\n\t * Direct the decoder to filter out all metadata blocks of any type.\n\t *\n\t * By default, only the STREAMINFO block is returned via the metadata callback.\n\t *\n\t * <p>\n\t * NOTE: only use on un-initilized decoder instances!\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance\n\t *\n\t * @returns {boolean} <code>false</code> if the decoder is already initialized, else <code>true</code>\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t *\n\t * @see Flac#FLAC__stream_decoder_set_metadata_respond_all\n\t * @see Flac#FLAC__stream_decoder_set_metadata_ignore\n\t * @see Flac#FLAC__stream_decoder_set_metadata_ignore_application\n\t */\n\tFLAC__stream_decoder_set_metadata_ignore_all: Module.cwrap('FLAC__stream_decoder_set_metadata_ignore_all', 'number', ['number']),// (FLAC__StreamDecoder *decoder)\n\t/**\n\t * Set the metadata blocks to be emitted to the stream before encoding. A value of NULL, 0 implies no metadata; otherwise, supply an array of pointers to metadata blocks.\n\t * The array is non-const since the encoder may need to change the is_last flag inside them, and in some cases update seek point offsets. Otherwise, the encoder\n\t * will not modify or free the blocks. It is up to the caller to free the metadata blocks after encoding finishes.\n\t *\n\t * <p>\n\t *     The encoder stores only copies of the pointers in the metadata array; the metadata blocks themselves must survive at least until after FLAC__stream_encoder_finish() returns.\n\t *     Do not free the blocks until then.\n\t *\n\t *     The STREAMINFO block is always written and no STREAMINFO block may occur in the supplied array.\n\t *\n\t *     By default the encoder does not create a SEEKTABLE. If one is supplied in the metadata array, but the client has specified that it does not support seeking,\n\t *     then the SEEKTABLE will be written verbatim. However by itself this is not very useful as the client will not know the stream offsets for the seekpoints ahead of time.\n\t *     In order to get a proper seektable the client must support seeking. See next note.\n\t *\n\t *     SEEKTABLE blocks are handled specially. Since you will not know the values for the seek point stream offsets, you should pass in a SEEKTABLE 'template', that is,\n\t *     a SEEKTABLE object with the required sample numbers (or placeholder points), with 0 for the frame_samples and stream_offset fields for each point.\n\t *     If the client has specified that it supports seeking by providing a seek callback to FLAC__stream_encoder_init_stream() or both seek AND read callback to\n\t *      FLAC__stream_encoder_init_ogg_stream() (or by using FLAC__stream_encoder_init*_file() or FLAC__stream_encoder_init*_FILE()), then while it is encoding the encoder will\n\t *      fill the stream offsets in for you and when encoding is finished, it will seek back and write the real values into the SEEKTABLE block in the stream. There are helper\n\t *      routines for manipulating seektable template blocks; see metadata.h: FLAC__metadata_object_seektable_template_*(). If the client does not support seeking,\n\t *      the SEEKTABLE will have inaccurate offsets which will slow down or remove the ability to seek in the FLAC stream.\n\t *\n\t *     The encoder instance will modify the first SEEKTABLE block as it transforms the template to a valid seektable while encoding, but it is still up to the caller to free\n\t *     all metadata blocks after encoding.\n\t *\n\t *     A VORBIS_COMMENT block may be supplied. The vendor string in it will be ignored. libFLAC will use it's own vendor string. libFLAC will not modify the passed-in\n\t *     VORBIS_COMMENT's vendor string, it will simply write it's own into the stream. If no VORBIS_COMMENT block is present in the metadata array, libFLAC will write an\n\t *     empty one, containing only the vendor string.\n\t *\n\t *     The Ogg FLAC mapping requires that the VORBIS_COMMENT block be the second metadata block of the stream. The encoder already supplies the STREAMINFO block automatically.\n\t *\n\t *     If metadata does not contain a VORBIS_COMMENT block, the encoder will supply that too. Otherwise, if metadata does contain a VORBIS_COMMENT block and it is not the first,\n\t *     the init function will reorder metadata by moving the VORBIS_COMMENT block to the front; the relative ordering of the other blocks will remain as they were.\n\t *\n\t *     The Ogg FLAC mapping limits the number of metadata blocks per stream to 65535. If num_blocks exceeds this the function will return false.\n\t *\n\t * @param {number} encoder\n\t * \t\t\t\tthe ID of the encoder instance\n\t *\n\t * @param {Flac.PointerInfo} metadataBuffersPointer\n\t *\n\t * @param {number} num_blocks\n\t *\n\t * @returns {boolean} <code>false</code> if the encoder is already initialized, else <code>true</code>. <code>false</code> if the encoder is already initialized, or if num_blocks > 65535 if encoding to Ogg FLAC, else true.\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t *\n\t * @see Flac.FLAC__MetadataType\n\t * @see Flac#_create_pointer_array\n\t * @see Flac#_destroy_pointer_array\n\t */\n\tFLAC__stream_encoder_set_metadata: function(encoder, metadataBuffersPointer, num_blocks){// ( FLAC__StreamEncoder *  encoder, FLAC__StreamMetadata **  metadata, unsigned  num_blocks)\n\t\tvar status = Module.ccall('FLAC__stream_encoder_set_metadata', 'number',\n\t\t\t\t['number', 'number', 'number'],\n\t\t\t\t[encoder, metadataBuffersPointer.pointerPointer, num_blocks]\n\t\t);\n\t\treturn status;\n\t},\n\t/**\n\t * Helper object for allocating an array of buffers on the (memory) heap.\n\t *\n\t * @interface PointerInfo\n\t * @memberOf Flac\n\t * @property {number}  pointerPointer pointer to the array of (pointer) buffers\n\t * @property {number[]}  dataPointer array of pointers to the allocated data arrays (i.e. buffers)\n\t *\n\t * @see Flac#_create_pointer_array\n\t * @see Flac#_destroy_pointer_array\n\t */\n\t/**\n\t * Helper function for creating pointer (and allocating the data) to an array of buffers on the (memory) heap.\n\t *\n\t * Use the returned <code>PointerInfo.dataPointer</code> as argument, where the array-pointer is required.\n\t *\n\t * NOTE: afer use, the allocated buffers on the heap need be freed, see {@link #_destroy_pointer_array}.\n\t *\n\t * @param {Uint8Array[]} bufferArray\n\t * \t\t\t\t\t\tthe buffer for which to create\n\t *\n\t * @returns {Flac.PointerInfo} <code>false</code> if the decoder is already initialized, else <code>true</code>\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t *\n\t * @see Flac#_destroy_pointer_array\n\t */\n\t_create_pointer_array: function(bufferArray){\n\t\tvar size=bufferArray.length;\n\t\tvar ptrs = [], ptrData = new Uint32Array(size);\n\t\tvar ptrOffsets = new DataView(ptrData.buffer);\n\t\tvar buffer, numBytes, heapBytes, ptr;\n\t\tfor(var i=0, size; i < size; ++i){\n\t\t\tbuffer = bufferArray[i];\n\t\t\t// get the length of the data in bytes\n\t\t\tnumBytes = buffer.length * buffer.BYTES_PER_ELEMENT;\n\t\t\t// malloc enough space for the data\n\t\t\tptr = Module._malloc(numBytes);\n\t\t\tptrs.push(ptr);\n\t\t\t// get a bytes-wise view on the newly allocated buffer\n\t\t\theapBytes = new Uint8Array(Module.HEAPU8.buffer, ptr, numBytes);\n\t\t\t// copy data into heapBytes\n\t\t\theapBytes.set(new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength));// use FIX for issue #11 (2)\n\t\t\tptrOffsets.setUint32(i*4, ptr, true);\n\t\t}\n\t\tvar nPointerBytes = ptrData.length * ptrData.BYTES_PER_ELEMENT\n\t\tvar pointerPtr = Module._malloc(nPointerBytes);\n\t\tvar pointerHeap = new Uint8Array(Module.HEAPU8.buffer, pointerPtr, nPointerBytes);\n\t\tpointerHeap.set( new Uint8Array(ptrData.buffer) );\n\n\t\treturn {\n\t\t\tdataPointer: ptrs,\n\t\t\tpointerPointer: pointerPtr\n\t\t};\n\t},\n\t/**\n\t * Helper function for destroying/freeing a previously created pointer (and allocating the data) of an array of buffers on the (memory) heap.\n\t *\n\t * @param {Flac.PointerInfo} pointerInfo\n\t * \t\t\t\t\t\tthe pointer / allocation information that should be destroyed/freed\n\t *\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t *\n\t * @see Flac#_create_pointer_array\n\t */\n\t_destroy_pointer_array: function(pointerInfo){\n\t\tvar pointerArray = pointerInfo.dataPointer;\n\t\tfor(var i=0, size=pointerArray.length; i < size; ++i){\n\t\t\tModule._free(pointerArray[i]);\n\t\t}\n\t\tModule._free(pointerInfo.pointerPointer);\n\t},\n\t/**\n\t * Get if MD5 verification is enabled for the decoder\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance\n\t *\n\t * @returns {boolean} <code>true</code> if MD5 verification is enabled\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t *\n\t * @see #FLAC__stream_decoder_set_md5_checking\n\t */\n\tFLAC__stream_decoder_get_md5_checking: Module.cwrap('FLAC__stream_decoder_get_md5_checking', 'number', ['number']),\n\n\t/**\n\t * Set the \"MD5 signature checking\" flag. If true, the decoder will compute the MD5 signature of the unencoded audio data while decoding and compare it to the signature from the STREAMINFO block,\n\t * if it exists, during {@link Flac.FLAC__stream_decoder_finish FLAC__stream_decoder_finish()}.\n\t *\n\t * MD5 signature checking will be turned off (until the next {@link Flac.FLAC__stream_decoder_reset FLAC__stream_decoder_reset()}) if there is no signature in the STREAMINFO block or when a seek is attempted.\n\t *\n\t * Clients that do not use the MD5 check should leave this off to speed up decoding.\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance\n\t * @param {boolean} is_verify\n\t * \t\t\t\tenable/disable checksum verification during decoding\n\t * @returns {boolean} FALSE if the decoder is already initialized, else TRUE.\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t *\n\t * @see #FLAC__stream_decoder_get_md5_checking\n\t */\n\tFLAC__stream_decoder_set_md5_checking: function(decoder, is_verify){\n\t\tis_verify = is_verify? 1 : 0;\n\t\treturn Module.ccall('FLAC__stream_decoder_set_md5_checking', 'number', ['number', 'number'], [ decoder, is_verify ]);\n\t},\n\n\t/**\n\t * Finish the encoding process.\n\t *\n\t * @param {number} encoder\n\t * \t\t\t\tthe ID of the encoder instance\n\t *\n\t * @returns {boolean} <code>false</code> if an error occurred processing the last frame;\n\t * \t\t\t\t\t or if verify mode is set, there was a verify mismatch; else <code>true</code>.\n\t * \t\t\t\t\t If <code>false</code>, caller should check the state with {@link Flac#FLAC__stream_encoder_get_state}\n\t * \t\t\t\t\t for more information about the error.\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_encoder_finish: Module.cwrap('FLAC__stream_encoder_finish', 'number', [ 'number' ]),\n\t/**\n\t * Finish the decoding process.\n\t *\n\t * The decoder can be reused, after initializing it again.\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance\n\t *\n\t * @returns {boolean} <code>false</code> if MD5 checking is on AND a STREAMINFO block was available AND the MD5 signature in\n\t * \t\t\t\t\t\t the STREAMINFO block was non-zero AND the signature does not match the one computed by the decoder;\n\t * \t\t\t\t\t\t else <code>true</code>.\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_decoder_finish: Module.cwrap('FLAC__stream_decoder_finish', 'number', [ 'number' ]),\n\t/**\n\t * Reset the decoder for reuse.\n\t *\n\t * <p>\n\t * NOTE: Needs to be re-initialized, before it can be used again\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance\n\t *\n\t * @returns {boolean} true if successful\n\t *\n\t * @see #init_decoder_stream\n\t * @see #init_decoder_ogg_stream\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_decoder_reset: Module.cwrap('FLAC__stream_decoder_reset', 'number', [ 'number' ]),\n\t/**\n\t * Delete the encoder instance, and free up its resources.\n\t *\n\t * @param {number} encoder\n\t * \t\t\t\tthe ID of the encoder instance\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_encoder_delete: function(encoder){\n\t\tthis._clear_enc_cb(encoder);//<- remove callback references\n\t\tModule.ccall('FLAC__stream_encoder_delete', 'number', [ 'number' ], [encoder]);\n\t\tdo_fire_event('destroyed', [{type: 'destroyed', target: {id: encoder, type: 'encoder'}}], false);\n\t},\n\t/**\n\t * Delete the decoder instance, and free up its resources.\n\t *\n\t * @param {number} decoder\n\t * \t\t\t\tthe ID of the decoder instance\n\t *\n\t * @memberOf Flac#\n\t * @function\n\t */\n\tFLAC__stream_decoder_delete: function(decoder){\n\t\tthis._clear_dec_cb(decoder);//<- remove callback references\n\t\tModule.ccall('FLAC__stream_decoder_delete', 'number', [ 'number' ], [decoder]);\n\t\tdo_fire_event('destroyed', [{type: 'destroyed', target: {id: decoder, type: 'decoder'}}], false);\n\t}\n\n};//END: var _exported = {\n\n//if Properties are supported by JS execution environment:\n// support \"immediate triggering\" onready function, if library is already initialized when setting onready callback\nif(typeof Object.defineProperty === 'function'){\n\t//add internal field for storing onready callback:\n\t_exported._onready = void(0);\n\t//define getter & define setter with \"immediate trigger\" functionality:\n\tObject.defineProperty(_exported, 'onready', {\n\t\tget() { return this._onready; },\n\t\tset(newValue) {\n\t\t\tthis._onready = newValue;\n\t\t\tif(newValue && this.isReady()){\n\t\t\t\tcheck_and_trigger_persisted_event('ready', newValue);\n\t\t\t}\n\t\t}\n\t});\n} else {\n\t//if Properties are NOTE supported by JS execution environment:\n\t// pring usage warning for onready hook instead\n\tconsole.warn('WARN: note that setting Flac.onready handler after Flac.isReady() is already true, will have no effect, that is, the handler function will not be triggered!');\n}\n\nif(expLib && expLib.exports){\n\texpLib.exports = _exported;\n}\nreturn _exported;\n\n}));//END: UMD wrapper\n\n"
  },
  {
    "path": "packages/addons/service/snapserver/snapweb/config.js",
    "content": "\"use strict\";\nlet config = {\n    baseUrl: (window.location.protocol === 'https:' ? 'wss://' : 'ws://') + window.location.host\n};\n//# sourceMappingURL=config.js.map"
  },
  {
    "path": "packages/addons/service/snapserver/snapweb/index.html",
    "content": "<html>\r\n\r\n<head>\r\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\r\n  <meta name=\"theme-color\" content=\"#455A64\">\r\n  <meta name=\"author\" content=\"Johannes M. Pohl\">\r\n  <meta name=\"version\" content=\"0.2.0\">\r\n  <meta charset=\"utf-8\">\r\n  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n  <link rel=\"manifest\" href=\"manifest.json\">\r\n  <link rel=\"stylesheet\" href=\"styles.css\">\r\n  <link rel=\"shortcut icon\" href=\"favicon.ico\" type=\"image/x-icon\">\r\n  <title>Snapweb</title>\r\n  <script src=\"3rd-party/libflac.js\"></script>\r\n  <script src=\"config.js\"></script>\r\n  <script src=\"snapstream.js\"></script>\r\n  <script src=\"snapcontrol.js\"></script>\r\n</head>\r\n\r\n<body>\r\n  <div id=\"show\"></div>\r\n</body>\r\n\r\n</html>"
  },
  {
    "path": "packages/addons/service/snapserver/snapweb/manifest.json",
    "content": "{\n    \"short_name\": \"Snapweb\",\n    \"name\": \"Snapcast WebApp\",\n    \"icons\": [\n        {\n            \"src\": \"launcher-icon.png\",\n            \"sizes\": \"192x192\",\n            \"type\": \"image/png\"\n        }\n    ],\n    \"start_url\": \"/index.html\",\n    \"display\": \"standalone\",\n    \"categories\": [\"music\"],\n    \"description\": \"Snapcast web client\",\n    \"theme_color\": \"#455A64\"\n}\n"
  },
  {
    "path": "packages/addons/service/snapserver/snapweb/snapcontrol.js",
    "content": "\"use strict\";\nclass Host {\n    constructor(json) {\n        this.arch = \"\";\n        this.ip = \"\";\n        this.mac = \"\";\n        this.name = \"\";\n        this.os = \"\";\n        this.fromJson(json);\n    }\n    fromJson(json) {\n        this.arch = json.arch;\n        this.ip = json.ip;\n        this.mac = json.mac;\n        this.name = json.name;\n        this.os = json.os;\n    }\n}\nclass Client {\n    constructor(json) {\n        this.id = \"\";\n        this.connected = false;\n        this.fromJson(json);\n    }\n    fromJson(json) {\n        this.id = json.id;\n        this.host = new Host(json.host);\n        let jsnapclient = json.snapclient;\n        this.snapclient = { name: jsnapclient.name, protocolVersion: jsnapclient.protocolVersion, version: jsnapclient.version };\n        let jconfig = json.config;\n        this.config = { instance: jconfig.instance, latency: jconfig.latency, name: jconfig.name, volume: { muted: jconfig.volume.muted, percent: jconfig.volume.percent } };\n        this.lastSeen = { sec: json.lastSeen.sec, usec: json.lastSeen.usec };\n        this.connected = Boolean(json.connected);\n    }\n}\nclass Group {\n    constructor(json) {\n        this.name = \"\";\n        this.id = \"\";\n        this.stream_id = \"\";\n        this.muted = false;\n        this.clients = [];\n        this.fromJson(json);\n    }\n    fromJson(json) {\n        this.name = json.name;\n        this.id = json.id;\n        this.stream_id = json.stream_id;\n        this.muted = Boolean(json.muted);\n        for (let client of json.clients)\n            this.clients.push(new Client(client));\n    }\n    getClient(id) {\n        for (let client of this.clients) {\n            if (client.id == id)\n                return client;\n        }\n        return null;\n    }\n}\nclass Stream {\n    constructor(json) {\n        this.id = \"\";\n        this.status = \"\";\n        this.fromJson(json);\n    }\n    fromJson(json) {\n        this.id = json.id;\n        this.status = json.status;\n        let juri = json.uri;\n        this.uri = { raw: juri.raw, scheme: juri.scheme, host: juri.host, path: juri.path, fragment: juri.fragment, query: juri.query };\n    }\n}\nclass Server {\n    constructor(json) {\n        this.groups = [];\n        this.streams = [];\n        if (json)\n            this.fromJson(json);\n    }\n    fromJson(json) {\n        this.groups = [];\n        for (let jgroup of json.groups)\n            this.groups.push(new Group(jgroup));\n        let jsnapserver = json.server.snapserver;\n        this.server = { host: new Host(json.server.host), snapserver: { controlProtocolVersion: jsnapserver.controlProtocolVersion, name: jsnapserver.name, protocolVersion: jsnapserver.protocolVersion, version: jsnapserver.version } };\n        this.streams = [];\n        for (let jstream of json.streams) {\n            this.streams.push(new Stream(jstream));\n        }\n    }\n    getClient(id) {\n        for (let group of this.groups) {\n            let client = group.getClient(id);\n            if (client)\n                return client;\n        }\n        return null;\n    }\n    getGroup(id) {\n        for (let group of this.groups) {\n            if (group.id == id)\n                return group;\n        }\n        return null;\n    }\n    getStream(id) {\n        for (let stream of this.streams) {\n            if (stream.id == id)\n                return stream;\n        }\n        return null;\n    }\n}\nclass SnapControl {\n    constructor(baseUrl) {\n        this.server = new Server();\n        this.baseUrl = baseUrl;\n        this.msg_id = 0;\n        this.status_req_id = -1;\n        this.connect();\n    }\n    connect() {\n        this.connection = new WebSocket(this.baseUrl + '/jsonrpc');\n        this.connection.onmessage = (msg) => this.onMessage(msg.data);\n        this.connection.onopen = () => { this.status_req_id = this.sendRequest('Server.GetStatus'); };\n        this.connection.onerror = (ev) => { console.error('error:', ev); };\n        this.connection.onclose = () => {\n            console.info('connection lost, reconnecting in 1s');\n            setTimeout(() => this.connect(), 1000);\n        };\n    }\n    action(answer) {\n        switch (answer.method) {\n            case 'Client.OnVolumeChanged':\n                let client = this.getClient(answer.params.id);\n                client.config.volume = answer.params.volume;\n                updateGroupVolume(this.getGroupFromClient(client.id));\n                break;\n            case 'Client.OnLatencyChanged':\n                this.getClient(answer.params.id).config.latency = answer.params.latency;\n                break;\n            case 'Client.OnNameChanged':\n                this.getClient(answer.params.id).config.name = answer.params.name;\n                break;\n            case 'Client.OnConnect':\n            case 'Client.OnDisconnect':\n                this.getClient(answer.params.client.id).fromJson(answer.params.client);\n                break;\n            case 'Group.OnMute':\n                this.getGroup(answer.params.id).muted = Boolean(answer.params.mute);\n                break;\n            case 'Group.OnStreamChanged':\n                this.getGroup(answer.params.id).stream_id = answer.params.stream_id;\n                break;\n            case 'Stream.OnUpdate':\n                this.getStream(answer.params.id).fromJson(answer.params.stream);\n                break;\n            case 'Server.OnUpdate':\n                this.server.fromJson(answer.params.server);\n                break;\n            default:\n                break;\n        }\n    }\n    getClient(client_id) {\n        let client = this.server.getClient(client_id);\n        if (client == null) {\n            throw new Error(`client ${client_id} was null`);\n        }\n        return client;\n    }\n    getGroup(group_id) {\n        let group = this.server.getGroup(group_id);\n        if (group == null) {\n            throw new Error(`group ${group_id} was null`);\n        }\n        return group;\n    }\n    getGroupVolume(group, online) {\n        if (group.clients.length == 0)\n            return 0;\n        let group_vol = 0;\n        let client_count = 0;\n        for (let client of group.clients) {\n            if (online && !client.connected)\n                continue;\n            group_vol += client.config.volume.percent;\n            ++client_count;\n        }\n        if (client_count == 0)\n            return 0;\n        return group_vol / client_count;\n    }\n    getGroupFromClient(client_id) {\n        for (let group of this.server.groups)\n            for (let client of group.clients)\n                if (client.id == client_id)\n                    return group;\n        throw new Error(`group for client ${client_id} was null`);\n    }\n    getStream(stream_id) {\n        let stream = this.server.getStream(stream_id);\n        if (stream == null) {\n            throw new Error(`stream ${stream_id} was null`);\n        }\n        return stream;\n    }\n    setVolume(client_id, percent, mute) {\n        percent = Math.max(0, Math.min(100, percent));\n        let client = this.getClient(client_id);\n        client.config.volume.percent = percent;\n        if (mute != undefined)\n            client.config.volume.muted = mute;\n        this.sendRequest('Client.SetVolume', { id: client_id, volume: { muted: client.config.volume.muted, percent: client.config.volume.percent } });\n    }\n    setClientName(client_id, name) {\n        let client = this.getClient(client_id);\n        let current_name = (client.config.name != \"\") ? client.config.name : client.host.name;\n        if (name != current_name) {\n            this.sendRequest('Client.SetName', { id: client_id, name: name });\n            client.config.name = name;\n        }\n    }\n    setClientLatency(client_id, latency) {\n        let client = this.getClient(client_id);\n        let current_latency = client.config.latency;\n        if (latency != current_latency) {\n            this.sendRequest('Client.SetLatency', { id: client_id, latency: latency });\n            client.config.latency = latency;\n        }\n    }\n    deleteClient(client_id) {\n        this.sendRequest('Server.DeleteClient', { id: client_id });\n        this.server.groups.forEach((g, gi) => {\n            g.clients.forEach((c, ci) => {\n                if (c.id == client_id) {\n                    this.server.groups[gi].clients.splice(ci, 1);\n                }\n            });\n        });\n        this.server.groups.forEach((g, gi) => {\n            if (g.clients.length == 0) {\n                this.server.groups.splice(gi, 1);\n            }\n        });\n        show();\n    }\n    setStream(group_id, stream_id) {\n        this.getGroup(group_id).stream_id = stream_id;\n        this.sendRequest('Group.SetStream', { id: group_id, stream_id: stream_id });\n    }\n    setClients(group_id, clients) {\n        this.status_req_id = this.sendRequest('Group.SetClients', { id: group_id, clients: clients });\n    }\n    muteGroup(group_id, mute) {\n        this.getGroup(group_id).muted = mute;\n        this.sendRequest('Group.SetMute', { id: group_id, mute: mute });\n    }\n    sendRequest(method, params) {\n        let msg = {\n            id: ++this.msg_id,\n            jsonrpc: '2.0',\n            method: method\n        };\n        if (params)\n            msg.params = params;\n        let msgJson = JSON.stringify(msg);\n        console.log(\"Sending: \" + msgJson);\n        this.connection.send(msgJson);\n        return this.msg_id;\n    }\n    onMessage(msg) {\n        let answer = JSON.parse(msg);\n        let is_response = (answer.id != undefined);\n        console.log(\"Received \" + (is_response ? \"response\" : \"notification\") + \", json: \" + JSON.stringify(answer));\n        if (is_response) {\n            if (answer.id == this.status_req_id) {\n                this.server = new Server(answer.result.server);\n                show();\n            }\n        }\n        else {\n            if (Array.isArray(answer)) {\n                for (let a of answer) {\n                    this.action(a);\n                }\n            }\n            else {\n                this.action(answer);\n            }\n            // TODO: don't update everything, but only the changed, \n            // e.g. update the values for the volume sliders\n            show();\n        }\n    }\n}\nlet snapcontrol;\nlet snapstream = null;\nlet hide_offline = true;\nlet autoplay_done = false;\nfunction autoplayRequested() {\n    return document.location.hash.match(/autoplay/) !== null;\n}\nfunction show() {\n    // Render the page\n    const versionElem = document.getElementsByTagName(\"meta\").namedItem(\"version\");\n    console.log(\"Snapweb version \" + (versionElem ? versionElem.content : \"null\"));\n    let play_img;\n    if (snapstream) {\n        play_img = 'stop.png';\n    }\n    else {\n        play_img = 'play.png';\n    }\n    let content = \"\";\n    content += \"<div class='navbar'>Snapcast\";\n    let serverVersion = snapcontrol.server.server.snapserver.version.split('.');\n    if ((serverVersion.length >= 2) && (+serverVersion[1] >= 21)) {\n        content += \"    <img src='\" + play_img + \"' class='play-button' id='play-button'></a>\";\n        // Stream became ready and was not playing. If autoplay is requested, start playing.\n        if (!snapstream && !autoplay_done && autoplayRequested()) {\n            autoplay_done = true;\n            play();\n        }\n    }\n    content += \"</div>\";\n    content += \"<div class='content'>\";\n    let server = snapcontrol.server;\n    for (let group of server.groups) {\n        if (hide_offline) {\n            let groupActive = false;\n            for (let client of group.clients) {\n                if (client.connected) {\n                    groupActive = true;\n                    break;\n                }\n            }\n            if (!groupActive)\n                continue;\n        }\n        // Set mute variables\n        let classgroup;\n        let muted;\n        let mute_img;\n        if (group.muted == true) {\n            classgroup = 'group muted';\n            muted = true;\n            mute_img = 'mute_icon.png';\n        }\n        else {\n            classgroup = 'group';\n            muted = false;\n            mute_img = 'speaker_icon.png';\n        }\n        // Start group div\n        content += \"<div id='g_\" + group.id + \"' class='\" + classgroup + \"'>\";\n        // Create stream selection dropdown\n        let streamselect = \"<select id='stream_\" + group.id + \"' onchange='setStream(\\\"\" + group.id + \"\\\")' class='stream'>\";\n        for (let i_stream = 0; i_stream < server.streams.length; i_stream++) {\n            let streamselected = \"\";\n            if (group.stream_id == server.streams[i_stream].id) {\n                streamselected = 'selected';\n            }\n            streamselect += \"<option value='\" + server.streams[i_stream].id + \"' \" + streamselected + \">\" + server.streams[i_stream].id + \": \" + server.streams[i_stream].status + \"</option>\";\n        }\n        streamselect += \"</select>\";\n        // Group mute and refresh button\n        content += \"<div class='groupheader'>\";\n        content += streamselect;\n        let clientCount = 0;\n        for (let client of group.clients)\n            if (!hide_offline || client.connected)\n                clientCount++;\n        if (clientCount > 1) {\n            let volume = snapcontrol.getGroupVolume(group, hide_offline);\n            content += \"<a href=\\\"javascript:setMuteGroup('\" + group.id + \"',\" + !muted + \");\\\"><img src='\" + mute_img + \"' class='mute-button'></a>\";\n            content += \"<div class='slidergroupdiv'>\";\n            content += \"    <input type='range' draggable='false' min=0 max=100 step=1 id='vol_\" + group.id + \"' oninput='javascript:setGroupVolume(\\\"\" + group.id + \"\\\")' value=\" + volume + \" class='slider'>\";\n            // content += \"    <input type='range' min=0 max=100 step=1 id='vol_\" + group.id + \"' oninput='javascript:setVolume(\\\"\" + client.id + \"\\\",\" + client.config.volume.muted + \")' value=\" + client.config.volume.percent + \" class='\" + sliderclass + \"'>\";\n            content += \"</div>\";\n        }\n        // transparent placeholder edit icon\n        content += \"<div class='edit-group-icon'>&#9998</div>\";\n        content += \"</div>\";\n        content += \"<hr class='groupheader-separator'>\";\n        // Create clients in group\n        for (let client of group.clients) {\n            if (!client.connected && hide_offline)\n                continue;\n            // Set name and connection state vars, start client div\n            let name;\n            let clas = 'client';\n            if (client.config.name != \"\") {\n                name = client.config.name;\n            }\n            else {\n                name = client.host.name;\n            }\n            if (client.connected == false) {\n                clas = 'client disconnected';\n            }\n            content += \"<div id='c_\" + client.id + \"' class='\" + clas + \"'>\";\n            // Client mute status vars\n            let muted;\n            let mute_img;\n            let sliderclass;\n            if (client.config.volume.muted == true) {\n                muted = true;\n                sliderclass = 'slider muted';\n                mute_img = 'mute_icon.png';\n            }\n            else {\n                sliderclass = 'slider';\n                muted = false;\n                mute_img = 'speaker_icon.png';\n            }\n            // Populate client div\n            content += \"<a href=\\\"javascript:setVolume('\" + client.id + \"',\" + !muted + \");\\\"><img src='\" + mute_img + \"' class='mute-button'></a>\";\n            content += \"    <div class='sliderdiv'>\";\n            content += \"        <input type='range' min=0 max=100 step=1 id='vol_\" + client.id + \"' oninput='javascript:setVolume(\\\"\" + client.id + \"\\\",\" + client.config.volume.muted + \")' value=\" + client.config.volume.percent + \" class='\" + sliderclass + \"'>\";\n            content += \"    </div>\";\n            content += \"    <span class='edit-icons'>\";\n            content += \"        <a href=\\\"javascript:openClientSettings('\" + client.id + \"');\\\" class='edit-icon'>&#9998</a>\";\n            if (client.connected == false) {\n                content += \"      <a href=\\\"javascript:deleteClient('\" + client.id + \"');\\\" class='delete-icon'>&#128465</a>\";\n                content += \"   </span>\";\n            }\n            else {\n                content += \"</span>\";\n            }\n            content += \"    <div class='name'>\" + name + \"</div>\";\n            content += \"</div>\";\n        }\n        content += \"</div>\";\n    }\n    content += \"</div>\"; // content\n    content += \"<div id='client-settings' class='client-settings'>\";\n    content += \"    <div class='client-setting-content'>\";\n    content += \"        <form action='javascript:closeClientSettings()'>\";\n    content += \"        <label for='client-name'>Name</label>\";\n    content += \"        <input type='text' class='client-input' id='client-name' name='client-name' placeholder='Client name..'>\";\n    content += \"        <label for='client-latency'>Latency</label>\";\n    content += \"        <input type='number' class='client-input' min='-10000' max='10000' id='client-latency' name='client-latency' placeholder='Latency in ms..'>\";\n    content += \"        <label for='client-group'>Group</label>\";\n    content += \"        <select id='client-group' class='client-input' name='client-group'>\";\n    content += \"        </select>\";\n    content += \"        <input type='submit' value='Submit'>\";\n    content += \"        </form>\";\n    content += \"    </div>\";\n    content += \"</div>\";\n    // Pad then update page\n    content = content + \"<br><br>\";\n    document.getElementById('show').innerHTML = content;\n    let playElem = document.getElementById('play-button');\n    playElem.onclick = () => {\n        play();\n    };\n    for (let group of snapcontrol.server.groups) {\n        if (group.clients.length > 1) {\n            let slider = document.getElementById(\"vol_\" + group.id);\n            if (slider == null)\n                continue;\n            slider.addEventListener('pointerdown', function () {\n                groupVolumeEnter(group.id);\n            });\n            slider.addEventListener('touchstart', function () {\n                groupVolumeEnter(group.id);\n            });\n        }\n    }\n}\nfunction updateGroupVolume(group) {\n    let group_vol = snapcontrol.getGroupVolume(group, hide_offline);\n    let slider = document.getElementById(\"vol_\" + group.id);\n    if (slider == null)\n        return;\n    console.log(\"updateGroupVolume group: \" + group.id + \", volume: \" + group_vol + \", slider: \" + (slider != null));\n    slider.value = String(group_vol);\n}\nlet client_volumes;\nlet group_volume;\nfunction setGroupVolume(group_id) {\n    let group = snapcontrol.getGroup(group_id);\n    let percent = document.getElementById('vol_' + group.id).valueAsNumber;\n    console.log(\"setGroupVolume id: \" + group.id + \", volume: \" + percent);\n    // show()\n    let delta = percent - group_volume;\n    let ratio;\n    if (delta < 0)\n        ratio = (group_volume - percent) / group_volume;\n    else\n        ratio = (percent - group_volume) / (100 - group_volume);\n    for (let i = 0; i < group.clients.length; ++i) {\n        let new_volume = client_volumes[i];\n        if (delta < 0)\n            new_volume -= ratio * client_volumes[i];\n        else\n            new_volume += ratio * (100 - client_volumes[i]);\n        let client_id = group.clients[i].id;\n        // TODO: use batch request to update all client volumes at once\n        snapcontrol.setVolume(client_id, new_volume);\n        let slider = document.getElementById('vol_' + client_id);\n        if (slider)\n            slider.value = String(new_volume);\n    }\n}\nfunction groupVolumeEnter(group_id) {\n    let group = snapcontrol.getGroup(group_id);\n    let percent = document.getElementById('vol_' + group.id).valueAsNumber;\n    console.log(\"groupVolumeEnter id: \" + group.id + \", volume: \" + percent);\n    group_volume = percent;\n    client_volumes = [];\n    for (let i = 0; i < group.clients.length; ++i) {\n        client_volumes.push(group.clients[i].config.volume.percent);\n    }\n    // show()\n}\nfunction setVolume(id, mute) {\n    console.log(\"setVolume id: \" + id + \", mute: \" + mute);\n    let percent = document.getElementById('vol_' + id).valueAsNumber;\n    let client = snapcontrol.getClient(id);\n    let needs_update = (mute != client.config.volume.muted);\n    snapcontrol.setVolume(id, percent, mute);\n    let group = snapcontrol.getGroupFromClient(id);\n    updateGroupVolume(group);\n    if (needs_update)\n        show();\n}\nfunction play() {\n    if (snapstream) {\n        snapstream.stop();\n        snapstream = null;\n    }\n    else {\n        snapstream = new SnapStream(config.baseUrl);\n    }\n    show();\n}\nfunction setMuteGroup(id, mute) {\n    snapcontrol.muteGroup(id, mute);\n    show();\n}\nfunction setStream(id) {\n    snapcontrol.setStream(id, document.getElementById('stream_' + id).value);\n    show();\n}\nfunction setGroup(client_id, group_id) {\n    console.log(\"setGroup id: \" + client_id + \", group: \" + group_id);\n    let server = snapcontrol.server;\n    // Get client group id\n    let current_group = snapcontrol.getGroupFromClient(client_id);\n    // Get\n    //   List of target group's clients\n    // OR\n    //   List of current group's other clients\n    let send_clients = [];\n    for (let i_group = 0; i_group < server.groups.length; i_group++) {\n        if (server.groups[i_group].id == group_id || (group_id == \"new\" && server.groups[i_group].id == current_group.id)) {\n            for (let i_client = 0; i_client < server.groups[i_group].clients.length; i_client++) {\n                if (group_id == \"new\" && server.groups[i_group].clients[i_client].id == client_id) { }\n                else {\n                    send_clients[send_clients.length] = server.groups[i_group].clients[i_client].id;\n                }\n            }\n        }\n    }\n    if (group_id == \"new\")\n        group_id = current_group.id;\n    else\n        send_clients[send_clients.length] = client_id;\n    snapcontrol.setClients(group_id, send_clients);\n}\nfunction setName(id) {\n    // Get current name and lacency\n    let client = snapcontrol.getClient(id);\n    let current_name = (client.config.name != \"\") ? client.config.name : client.host.name;\n    let current_latency = client.config.latency;\n    let new_name = window.prompt(\"New Name\", current_name);\n    let new_latency = Number(window.prompt(\"New Latency\", String(current_latency)));\n    if (new_name != null)\n        snapcontrol.setClientName(id, new_name);\n    if (new_latency != null)\n        snapcontrol.setClientLatency(id, new_latency);\n    show();\n}\nfunction openClientSettings(id) {\n    let modal = document.getElementById(\"client-settings\");\n    let client = snapcontrol.getClient(id);\n    let current_name = (client.config.name != \"\") ? client.config.name : client.host.name;\n    let name = document.getElementById(\"client-name\");\n    name.name = id;\n    name.value = current_name;\n    let latency = document.getElementById(\"client-latency\");\n    latency.valueAsNumber = client.config.latency;\n    let group = snapcontrol.getGroupFromClient(id);\n    let group_input = document.getElementById(\"client-group\");\n    while (group_input.length > 0)\n        group_input.remove(0);\n    let group_num = 0;\n    for (let ogroup of snapcontrol.server.groups) {\n        let option = document.createElement('option');\n        option.value = ogroup.id;\n        option.text = \"Group \" + (group_num + 1) + \" (\" + ogroup.clients.length + \" Clients)\";\n        group_input.add(option);\n        if (ogroup == group) {\n            console.log(\"Selected: \" + group_num);\n            group_input.selectedIndex = group_num;\n        }\n        ++group_num;\n    }\n    let option = document.createElement('option');\n    option.value = option.text = \"new\";\n    group_input.add(option);\n    modal.style.display = \"block\";\n}\nfunction closeClientSettings() {\n    let name = document.getElementById(\"client-name\");\n    let id = name.name;\n    console.log(\"onclose \" + id + \", value: \" + name.value);\n    snapcontrol.setClientName(id, name.value);\n    let latency = document.getElementById(\"client-latency\");\n    snapcontrol.setClientLatency(id, latency.valueAsNumber);\n    let group_input = document.getElementById(\"client-group\");\n    let option = group_input.options[group_input.selectedIndex];\n    setGroup(id, option.value);\n    let modal = document.getElementById(\"client-settings\");\n    modal.style.display = \"none\";\n    show();\n}\nfunction deleteClient(id) {\n    if (confirm('Are you sure?')) {\n        snapcontrol.deleteClient(id);\n    }\n}\nwindow.onload = function () {\n    snapcontrol = new SnapControl(config.baseUrl);\n};\n// When the user clicks anywhere outside of the modal, close it\nwindow.onclick = function (event) {\n    let modal = document.getElementById(\"client-settings\");\n    if (event.target == modal) {\n        modal.style.display = \"none\";\n    }\n};\n//# sourceMappingURL=snapcontrol.js.map"
  },
  {
    "path": "packages/addons/service/snapserver/snapweb/snapstream.js",
    "content": "\"use strict\";\nfunction setCookie(key, value, exdays = -1) {\n    let d = new Date();\n    if (exdays < 0)\n        exdays = 10 * 365;\n    d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n    let expires = \"expires=\" + d.toUTCString();\n    document.cookie = key + \"=\" + value + \";\" + expires + \";sameSite=Strict;path=/\";\n}\nfunction getPersistentValue(key, defaultValue = \"\") {\n    if (!!window.localStorage) {\n        const value = window.localStorage.getItem(key);\n        if (value !== null) {\n            return value;\n        }\n        window.localStorage.setItem(key, defaultValue);\n        return defaultValue;\n    }\n    // Fallback to cookies if localStorage is not available.\n    let name = key + \"=\";\n    let decodedCookie = decodeURIComponent(document.cookie);\n    let ca = decodedCookie.split(';');\n    for (let c of ca) {\n        c = c.trimLeft();\n        if (c.indexOf(name) == 0) {\n            return c.substring(name.length, c.length);\n        }\n    }\n    setCookie(key, defaultValue);\n    return defaultValue;\n}\nfunction getChromeVersion() {\n    const raw = navigator.userAgent.match(/Chrom(e|ium)\\/([0-9]+)\\./);\n    return raw ? parseInt(raw[2]) : null;\n}\nfunction uuidv4() {\n    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n        var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);\n        return v.toString(16);\n    });\n}\nclass Tv {\n    constructor(sec, usec) {\n        this.sec = 0;\n        this.usec = 0;\n        this.sec = sec;\n        this.usec = usec;\n    }\n    setMilliseconds(ms) {\n        this.sec = Math.floor(ms / 1000);\n        this.usec = Math.floor(ms * 1000) % 1000000;\n    }\n    getMilliseconds() {\n        return this.sec * 1000 + this.usec / 1000;\n    }\n}\nclass BaseMessage {\n    constructor(_buffer) {\n        this.type = 0;\n        this.id = 0;\n        this.refersTo = 0;\n        this.received = new Tv(0, 0);\n        this.sent = new Tv(0, 0);\n        this.size = 0;\n    }\n    deserialize(buffer) {\n        let view = new DataView(buffer);\n        this.type = view.getUint16(0, true);\n        this.id = view.getUint16(2, true);\n        this.refersTo = view.getUint16(4, true);\n        this.received = new Tv(view.getInt32(6, true), view.getInt32(10, true));\n        this.sent = new Tv(view.getInt32(14, true), view.getInt32(18, true));\n        this.size = view.getUint32(22, true);\n    }\n    serialize() {\n        this.size = 26 + this.getSize();\n        let buffer = new ArrayBuffer(this.size);\n        let view = new DataView(buffer);\n        view.setUint16(0, this.type, true);\n        view.setUint16(2, this.id, true);\n        view.setUint16(4, this.refersTo, true);\n        view.setInt32(6, this.sent.sec, true);\n        view.setInt32(10, this.sent.usec, true);\n        view.setInt32(14, this.received.sec, true);\n        view.setInt32(18, this.received.usec, true);\n        view.setUint32(22, this.size, true);\n        return buffer;\n    }\n    getSize() {\n        return 0;\n    }\n}\nclass CodecMessage extends BaseMessage {\n    constructor(buffer) {\n        super(buffer);\n        this.codec = \"\";\n        this.payload = new ArrayBuffer(0);\n        if (buffer) {\n            this.deserialize(buffer);\n        }\n        this.type = 1;\n    }\n    deserialize(buffer) {\n        super.deserialize(buffer);\n        let view = new DataView(buffer);\n        let codecSize = view.getInt32(26, true);\n        let decoder = new TextDecoder(\"utf-8\");\n        this.codec = decoder.decode(buffer.slice(30, 30 + codecSize));\n        let payloadSize = view.getInt32(30 + codecSize, true);\n        console.log(\"payload size: \" + payloadSize);\n        this.payload = buffer.slice(34 + codecSize, 34 + codecSize + payloadSize);\n        console.log(\"payload: \" + this.payload);\n    }\n}\nclass TimeMessage extends BaseMessage {\n    constructor(buffer) {\n        super(buffer);\n        this.latency = new Tv(0, 0);\n        if (buffer) {\n            this.deserialize(buffer);\n        }\n        this.type = 4;\n    }\n    deserialize(buffer) {\n        super.deserialize(buffer);\n        let view = new DataView(buffer);\n        this.latency = new Tv(view.getInt32(26, true), view.getInt32(30, true));\n    }\n    serialize() {\n        let buffer = super.serialize();\n        let view = new DataView(buffer);\n        view.setInt32(26, this.latency.sec, true);\n        view.setInt32(30, this.latency.usec, true);\n        return buffer;\n    }\n    getSize() {\n        return 8;\n    }\n}\nclass JsonMessage extends BaseMessage {\n    constructor(buffer) {\n        super(buffer);\n        if (buffer) {\n            this.deserialize(buffer);\n        }\n    }\n    deserialize(buffer) {\n        super.deserialize(buffer);\n        let view = new DataView(buffer);\n        let size = view.getUint32(26, true);\n        let decoder = new TextDecoder();\n        this.json = JSON.parse(decoder.decode(buffer.slice(30, 30 + size)));\n    }\n    serialize() {\n        let buffer = super.serialize();\n        let view = new DataView(buffer);\n        let jsonStr = JSON.stringify(this.json);\n        view.setUint32(26, jsonStr.length, true);\n        let encoder = new TextEncoder();\n        let encoded = encoder.encode(jsonStr);\n        for (let i = 0; i < encoded.length; ++i)\n            view.setUint8(30 + i, encoded[i]);\n        return buffer;\n    }\n    getSize() {\n        let encoder = new TextEncoder();\n        let encoded = encoder.encode(JSON.stringify(this.json));\n        return encoded.length + 4;\n        // return JSON.stringify(this.json).length;\n    }\n}\nclass HelloMessage extends JsonMessage {\n    constructor(buffer) {\n        super(buffer);\n        this.mac = \"\";\n        this.hostname = \"\";\n        this.version = \"0.1.0\";\n        this.clientName = \"Snapweb\";\n        this.os = \"\";\n        this.arch = \"web\";\n        this.instance = 1;\n        this.uniqueId = \"\";\n        this.snapStreamProtocolVersion = 2;\n        if (buffer) {\n            this.deserialize(buffer);\n        }\n        this.type = 5;\n    }\n    deserialize(buffer) {\n        super.deserialize(buffer);\n        this.mac = this.json[\"MAC\"];\n        this.hostname = this.json[\"HostName\"];\n        this.version = this.json[\"Version\"];\n        this.clientName = this.json[\"ClientName\"];\n        this.os = this.json[\"OS\"];\n        this.arch = this.json[\"Arch\"];\n        this.instance = this.json[\"Instance\"];\n        this.uniqueId = this.json[\"ID\"];\n        this.snapStreamProtocolVersion = this.json[\"SnapStreamProtocolVersion\"];\n    }\n    serialize() {\n        this.json = { \"MAC\": this.mac, \"HostName\": this.hostname, \"Version\": this.version, \"ClientName\": this.clientName, \"OS\": this.os, \"Arch\": this.arch, \"Instance\": this.instance, \"ID\": this.uniqueId, \"SnapStreamProtocolVersion\": this.snapStreamProtocolVersion };\n        return super.serialize();\n    }\n}\nclass ServerSettingsMessage extends JsonMessage {\n    constructor(buffer) {\n        super(buffer);\n        this.bufferMs = 0;\n        this.latency = 0;\n        this.volumePercent = 0;\n        this.muted = false;\n        if (buffer) {\n            this.deserialize(buffer);\n        }\n        this.type = 3;\n    }\n    deserialize(buffer) {\n        super.deserialize(buffer);\n        this.bufferMs = this.json[\"bufferMs\"];\n        this.latency = this.json[\"latency\"];\n        this.volumePercent = this.json[\"volume\"];\n        this.muted = this.json[\"muted\"];\n    }\n    serialize() {\n        this.json = { \"bufferMs\": this.bufferMs, \"latency\": this.latency, \"volume\": this.volumePercent, \"muted\": this.muted };\n        return super.serialize();\n    }\n}\nclass PcmChunkMessage extends BaseMessage {\n    constructor(buffer, sampleFormat) {\n        super(buffer);\n        this.timestamp = new Tv(0, 0);\n        // payloadSize: number = 0;\n        this.payload = new ArrayBuffer(0);\n        this.idx = 0;\n        this.deserialize(buffer);\n        this.sampleFormat = sampleFormat;\n        this.type = 2;\n    }\n    deserialize(buffer) {\n        super.deserialize(buffer);\n        let view = new DataView(buffer);\n        this.timestamp = new Tv(view.getInt32(26, true), view.getInt32(30, true));\n        // this.payloadSize = view.getUint32(34, true);\n        this.payload = buffer.slice(38); //, this.payloadSize + 38));// , this.payloadSize);\n        // console.log(\"ts: \" + this.timestamp.sec + \" \" + this.timestamp.usec + \", payload: \" + this.payloadSize + \", len: \" + this.payload.byteLength);\n    }\n    readFrames(frames) {\n        let frameCnt = frames;\n        let frameSize = this.sampleFormat.frameSize();\n        if (this.idx + frames > this.payloadSize() / frameSize)\n            frameCnt = (this.payloadSize() / frameSize) - this.idx;\n        let begin = this.idx * frameSize;\n        this.idx += frameCnt;\n        let end = begin + frameCnt * frameSize;\n        // console.log(\"readFrames: \" + frames + \", result: \" + frameCnt + \", begin: \" + begin + \", end: \" + end + \", payload: \" + this.payload.byteLength);\n        return this.payload.slice(begin, end);\n    }\n    getFrameCount() {\n        return (this.payloadSize() / this.sampleFormat.frameSize());\n    }\n    isEndOfChunk() {\n        return this.idx >= this.getFrameCount();\n    }\n    startMs() {\n        return this.timestamp.getMilliseconds() + 1000 * (this.idx / this.sampleFormat.rate);\n    }\n    duration() {\n        return 1000 * ((this.getFrameCount() - this.idx) / this.sampleFormat.rate);\n    }\n    payloadSize() {\n        return this.payload.byteLength;\n    }\n    clearPayload() {\n        this.payload = new ArrayBuffer(0);\n    }\n    addPayload(buffer) {\n        let payload = new ArrayBuffer(this.payload.byteLength + buffer.byteLength);\n        let view = new DataView(payload);\n        let viewOld = new DataView(this.payload);\n        let viewNew = new DataView(buffer);\n        for (let i = 0; i < viewOld.byteLength; ++i) {\n            view.setInt8(i, viewOld.getInt8(i));\n        }\n        for (let i = 0; i < viewNew.byteLength; ++i) {\n            view.setInt8(i + viewOld.byteLength, viewNew.getInt8(i));\n        }\n        this.payload = payload;\n    }\n}\nclass AudioStream {\n    constructor(timeProvider, sampleFormat, bufferMs) {\n        this.timeProvider = timeProvider;\n        this.sampleFormat = sampleFormat;\n        this.bufferMs = bufferMs;\n        this.chunks = new Array();\n        // setRealSampleRate(sampleRate: number) {\n        //     if (sampleRate == this.sampleFormat.rate) {\n        //         this.correctAfterXFrames = 0;\n        //     }\n        //     else {\n        //         this.correctAfterXFrames = Math.ceil((this.sampleFormat.rate / sampleRate) / (this.sampleFormat.rate / sampleRate - 1.));\n        //         console.debug(\"setRealSampleRate: \" + sampleRate + \", correct after X: \" + this.correctAfterXFrames);\n        //     }\n        // }\n        this.chunk = undefined;\n        this.volume = 1;\n        this.muted = false;\n        this.lastLog = 0;\n    }\n    setVolume(percent, muted) {\n        // let base = 10;\n        this.volume = percent / 100; // (Math.pow(base, percent / 100) - 1) / (base - 1);\n        console.log(\"setVolume: \" + percent + \" => \" + this.volume + \", muted: \" + this.muted);\n        this.muted = muted;\n    }\n    addChunk(chunk) {\n        this.chunks.push(chunk);\n        // let oldest = this.timeProvider.serverNow() - this.chunks[0].timestamp.getMilliseconds();\n        // let newest = this.timeProvider.serverNow() - this.chunks[this.chunks.length - 1].timestamp.getMilliseconds();\n        // console.debug(\"chunks: \" + this.chunks.length + \", oldest: \" + oldest.toFixed(2) + \", newest: \" + newest.toFixed(2));\n        while (this.chunks.length > 0) {\n            let age = this.timeProvider.serverNow() - this.chunks[0].timestamp.getMilliseconds();\n            // todo: consider buffer ms\n            if (age > 5000 + this.bufferMs) {\n                this.chunks.shift();\n                console.log(\"Dropping old chunk: \" + age.toFixed(2) + \", left: \" + this.chunks.length);\n            }\n            else\n                break;\n        }\n    }\n    getNextBuffer(buffer, playTimeMs) {\n        if (!this.chunk) {\n            this.chunk = this.chunks.shift();\n        }\n        // let age = this.timeProvider.serverTime(this.playTime * 1000) - startMs;\n        let frames = buffer.length;\n        // console.debug(\"getNextBuffer: \" + frames + \", play time: \" + playTimeMs.toFixed(2));\n        let left = new Float32Array(frames);\n        let right = new Float32Array(frames);\n        let read = 0;\n        let pos = 0;\n        // let volume = this.muted ? 0 : this.volume;\n        let serverPlayTimeMs = this.timeProvider.serverTime(playTimeMs);\n        if (this.chunk) {\n            let age = serverPlayTimeMs - this.chunk.startMs(); // - 500;\n            let reqChunkDuration = frames / this.sampleFormat.msRate();\n            let secs = Math.floor(Date.now() / 1000);\n            if (this.lastLog != secs) {\n                this.lastLog = secs;\n                console.log(\"age: \" + age.toFixed(2) + \", req: \" + reqChunkDuration);\n            }\n            if (age < -reqChunkDuration) {\n                console.log(\"age: \" + age.toFixed(2) + \" < req: \" + reqChunkDuration * -1 + \", chunk.startMs: \" + this.chunk.startMs().toFixed(2) + \", timestamp: \" + this.chunk.timestamp.getMilliseconds().toFixed(2));\n                console.log(\"Chunk too young, returning silence\");\n            }\n            else {\n                if (Math.abs(age) > 5) {\n                    // We are 5ms apart, do a hard sync, i.e. don't play faster/slower, \n                    // but seek to the desired position instead\n                    while (this.chunk && age > this.chunk.duration()) {\n                        console.log(\"Chunk too old, dropping (age: \" + age.toFixed(2) + \" > \" + this.chunk.duration().toFixed(2) + \")\");\n                        this.chunk = this.chunks.shift();\n                        if (!this.chunk)\n                            break;\n                        age = serverPlayTimeMs - this.chunk.startMs();\n                    }\n                    if (this.chunk) {\n                        if (age > 0) {\n                            console.log(\"Fast forwarding \" + age.toFixed(2) + \"ms\");\n                            this.chunk.readFrames(Math.floor(age * this.chunk.sampleFormat.msRate()));\n                        }\n                        else if (age < 0) {\n                            console.log(\"Playing silence \" + -age.toFixed(2) + \"ms\");\n                            let silentFrames = Math.floor(-age * this.chunk.sampleFormat.msRate());\n                            left.fill(0, 0, silentFrames);\n                            right.fill(0, 0, silentFrames);\n                            read = silentFrames;\n                            pos = silentFrames;\n                        }\n                        age = 0;\n                    }\n                }\n                // else if (age > 0.1) {\n                //     let rate = age * 0.0005;\n                //     rate = 1.0 - Math.min(rate, 0.0005);\n                //     console.debug(\"Age > 0, rate: \" + rate);\n                //     // we are late (age > 0), this means we are not playing fast enough\n                //     // => the real sample rate seems to be lower, we have to drop some frames\n                //     this.setRealSampleRate(this.sampleFormat.rate * rate); // 0.9999);    \n                // }\n                // else if (age < -0.1) {\n                //     let rate = -age * 0.0005;\n                //     rate = 1.0 + Math.min(rate, 0.0005);\n                //     console.debug(\"Age < 0, rate: \" + rate);\n                //     // we are early (age > 0), this means we are playing too fast\n                //     // => the real sample rate seems to be higher, we have to insert some frames\n                //     this.setRealSampleRate(this.sampleFormat.rate * rate); // 0.9999);    \n                // }\n                // else {\n                //     this.setRealSampleRate(this.sampleFormat.rate);\n                // }\n                let addFrames = 0;\n                let everyN = 0;\n                if (age > 0.1) {\n                    addFrames = Math.ceil(age); // / 5);\n                }\n                else if (age < -0.1) {\n                    addFrames = Math.floor(age); // / 5);\n                }\n                // addFrames = -2;\n                let readFrames = frames + addFrames - read;\n                if (addFrames != 0)\n                    everyN = Math.ceil((frames + addFrames - read) / (Math.abs(addFrames) + 1));\n                // addFrames = 0;\n                // console.debug(\"frames: \" + frames + \", readFrames: \" + readFrames + \", addFrames: \" + addFrames + \", everyN: \" + everyN);\n                while ((read < readFrames) && this.chunk) {\n                    let pcmChunk = this.chunk;\n                    let pcmBuffer = pcmChunk.readFrames(readFrames - read);\n                    let payload = new Int16Array(pcmBuffer);\n                    // console.debug(\"readFrames: \" + (frames - read) + \", read: \" + pcmBuffer.byteLength + \", payload: \" + payload.length);\n                    // read += (pcmBuffer.byteLength / this.sampleFormat.frameSize());\n                    for (let i = 0; i < payload.length; i += 2) {\n                        read++;\n                        left[pos] = (payload[i] / 32768); // * volume;\n                        right[pos] = (payload[i + 1] / 32768); // * volume;\n                        if ((everyN != 0) && (read % everyN == 0)) {\n                            if (addFrames > 0) {\n                                pos--;\n                            }\n                            else {\n                                left[pos + 1] = left[pos];\n                                right[pos + 1] = right[pos];\n                                pos++;\n                                // console.log(\"Add: \" + pos);\n                            }\n                        }\n                        pos++;\n                    }\n                    if (pcmChunk.isEndOfChunk()) {\n                        this.chunk = this.chunks.shift();\n                    }\n                }\n                if (addFrames != 0)\n                    console.debug(\"Pos: \" + pos + \", frames: \" + frames + \", add: \" + addFrames + \", everyN: \" + everyN);\n                if (read == readFrames)\n                    read = frames;\n            }\n        }\n        if (read < frames) {\n            console.log(\"Failed to get chunk, read: \" + read + \"/\" + frames + \", chunks left: \" + this.chunks.length);\n            left.fill(0, pos);\n            right.fill(0, pos);\n        }\n        // copyToChannel is not supported by Safari\n        buffer.getChannelData(0).set(left);\n        buffer.getChannelData(1).set(right);\n    }\n}\nclass TimeProvider {\n    constructor(ctx = undefined) {\n        this.diffBuffer = new Array();\n        this.diff = 0;\n        if (ctx) {\n            this.setAudioContext(ctx);\n        }\n    }\n    setAudioContext(ctx) {\n        this.ctx = ctx;\n        this.reset();\n    }\n    reset() {\n        this.diffBuffer.length = 0;\n        this.diff = 0;\n    }\n    setDiff(c2s, s2c) {\n        if (this.now() == 0) {\n            this.reset();\n        }\n        else {\n            if (this.diffBuffer.push((c2s - s2c) / 2) > 100)\n                this.diffBuffer.shift();\n            let sorted = [...this.diffBuffer];\n            sorted.sort();\n            this.diff = sorted[Math.floor(sorted.length / 2)];\n        }\n        // console.debug(\"c2s: \" + c2s.toFixed(2) + \", s2c: \" + s2c.toFixed(2) + \", diff: \" + this.diff.toFixed(2) + \", now: \" + this.now().toFixed(2) + \", server.now: \" + this.serverNow().toFixed(2) + \", win.now: \" + window.performance.now().toFixed(2));\n        // console.log(\"now: \" + this.now() + \"\\t\" + this.now() + \"\\t\" + this.now());\n    }\n    now() {\n        if (!this.ctx) {\n            return window.performance.now();\n        }\n        else {\n            // Use the more accurate getOutputTimestamp if available, fallback to ctx.currentTime otherwise.\n            const contextTime = !!this.ctx.getOutputTimestamp ? this.ctx.getOutputTimestamp().contextTime : undefined;\n            return (contextTime !== undefined ? contextTime : this.ctx.currentTime) * 1000;\n        }\n    }\n    nowSec() {\n        return this.now() / 1000;\n    }\n    serverNow() {\n        return this.serverTime(this.now());\n    }\n    serverTime(localTimeMs) {\n        return localTimeMs + this.diff;\n    }\n}\nclass SampleFormat {\n    constructor() {\n        this.rate = 48000;\n        this.channels = 2;\n        this.bits = 16;\n    }\n    msRate() {\n        return this.rate / 1000;\n    }\n    toString() {\n        return this.rate + \":\" + this.bits + \":\" + this.channels;\n    }\n    sampleSize() {\n        if (this.bits == 24) {\n            return 4;\n        }\n        return this.bits / 8;\n    }\n    frameSize() {\n        return this.channels * this.sampleSize();\n    }\n    durationMs(bytes) {\n        return (bytes / this.frameSize()) * this.msRate();\n    }\n}\nclass Decoder {\n    setHeader(_buffer) {\n        return new SampleFormat();\n    }\n    decode(_chunk) {\n        return null;\n    }\n}\nclass OpusDecoder extends Decoder {\n    setHeader(buffer) {\n        let view = new DataView(buffer);\n        let ID_OPUS = 0x4F505553;\n        if (buffer.byteLength < 12) {\n            console.error(\"Opus header too small: \" + buffer.byteLength);\n            return null;\n        }\n        else if (view.getUint32(0, true) != ID_OPUS) {\n            console.error(\"Opus header too small: \" + buffer.byteLength);\n            return null;\n        }\n        let format = new SampleFormat();\n        format.rate = view.getUint32(4, true);\n        format.bits = view.getUint16(8, true);\n        format.channels = view.getUint16(10, true);\n        console.log(\"Opus samplerate: \" + format.toString());\n        return format;\n    }\n    decode(_chunk) {\n        return null;\n    }\n}\nclass FlacDecoder extends Decoder {\n    constructor() {\n        super();\n        this.header = null;\n        this.cacheInfo = { isCachedChunk: false, cachedBlocks: 0 };\n        this.decoder = Flac.create_libflac_decoder(true);\n        if (this.decoder) {\n            let init_status = Flac.init_decoder_stream(this.decoder, this.read_callback_fn.bind(this), this.write_callback_fn.bind(this), this.error_callback_fn.bind(this), this.metadata_callback_fn.bind(this), false);\n            console.log(\"Flac init: \" + init_status);\n            Flac.setOptions(this.decoder, { analyseSubframes: true, analyseResiduals: true });\n        }\n        this.sampleFormat = new SampleFormat();\n        this.flacChunk = new ArrayBuffer(0);\n        // this.pcmChunk  = new PcmChunkMessage();\n        // Flac.setOptions(this.decoder, {analyseSubframes: analyse_frames, analyseResiduals: analyse_residuals});\n        // flac_ok &= init_status == 0;\n        // console.log(\"flac init     : \" + flac_ok);//DEBUG\n    }\n    decode(chunk) {\n        // console.log(\"Flac decode: \" + chunk.payload.byteLength);\n        this.flacChunk = chunk.payload.slice(0);\n        this.pcmChunk = chunk;\n        this.pcmChunk.clearPayload();\n        this.cacheInfo = { cachedBlocks: 0, isCachedChunk: true };\n        // console.log(\"Flac len: \" + this.flacChunk.byteLength);\n        while (this.flacChunk.byteLength && Flac.FLAC__stream_decoder_process_single(this.decoder)) {\n            Flac.FLAC__stream_decoder_get_state(this.decoder);\n            // let state = Flac.FLAC__stream_decoder_get_state(this.decoder);\n            // console.log(\"State: \" + state);\n        }\n        // console.log(\"Pcm payload: \" + this.pcmChunk!.payloadSize());\n        if (this.cacheInfo.cachedBlocks > 0) {\n            let diffMs = this.cacheInfo.cachedBlocks / this.sampleFormat.msRate();\n            // console.log(\"Cached: \" + this.cacheInfo.cachedBlocks + \", \" + diffMs + \"ms\");\n            this.pcmChunk.timestamp.setMilliseconds(this.pcmChunk.timestamp.getMilliseconds() - diffMs);\n        }\n        return this.pcmChunk;\n    }\n    read_callback_fn(bufferSize) {\n        // console.log('  decode read callback, buffer bytes max=', bufferSize);\n        if (this.header) {\n            console.log(\"  header: \" + this.header.byteLength);\n            let data = new Uint8Array(this.header);\n            this.header = null;\n            return { buffer: data, readDataLength: data.byteLength, error: false };\n        }\n        else if (this.flacChunk) {\n            // console.log(\"  flacChunk: \" + this.flacChunk.byteLength);\n            // a fresh read => next call to write will not be from cached data\n            this.cacheInfo.isCachedChunk = false;\n            let data = new Uint8Array(this.flacChunk.slice(0, Math.min(bufferSize, this.flacChunk.byteLength)));\n            this.flacChunk = this.flacChunk.slice(data.byteLength);\n            return { buffer: data, readDataLength: data.byteLength, error: false };\n        }\n        return { buffer: new Uint8Array(0), readDataLength: 0, error: false };\n    }\n    write_callback_fn(data, frameInfo) {\n        // console.log(\"  write frame metadata: \" + frameInfo + \", len: \" + data.length);\n        if (this.cacheInfo.isCachedChunk) {\n            // there was no call to read, so it's some cached data\n            this.cacheInfo.cachedBlocks += frameInfo.blocksize;\n        }\n        let payload = new ArrayBuffer((frameInfo.bitsPerSample / 8) * frameInfo.channels * frameInfo.blocksize);\n        let view = new DataView(payload);\n        for (let channel = 0; channel < frameInfo.channels; ++channel) {\n            let channelData = new DataView(data[channel].buffer, 0, data[channel].buffer.byteLength);\n            // console.log(\"channelData: \" + channelData.byteLength + \", blocksize: \" + frameInfo.blocksize);\n            for (let i = 0; i < frameInfo.blocksize; ++i) {\n                view.setInt16(2 * (frameInfo.channels * i + channel), channelData.getInt16(2 * i, true), true);\n            }\n        }\n        this.pcmChunk.addPayload(payload);\n        // console.log(\"write: \" + payload.byteLength + \", len: \" + this.pcmChunk!.payloadSize());\n    }\n    /** @memberOf decode */\n    metadata_callback_fn(data) {\n        console.info('meta data: ', data);\n        // let view = new DataView(data);\n        this.sampleFormat.rate = data.sampleRate;\n        this.sampleFormat.channels = data.channels;\n        this.sampleFormat.bits = data.bitsPerSample;\n        console.log(\"metadata_callback_fn, sampleformat: \" + this.sampleFormat.toString());\n    }\n    /** @memberOf decode */\n    error_callback_fn(err, errMsg) {\n        console.error('decode error callback', err, errMsg);\n    }\n    setHeader(buffer) {\n        this.header = buffer.slice(0);\n        Flac.FLAC__stream_decoder_process_until_end_of_metadata(this.decoder);\n        return this.sampleFormat;\n    }\n}\nclass PlayBuffer {\n    constructor(buffer, playTime, source, destination) {\n        this.num = 0;\n        this.buffer = buffer;\n        this.playTime = playTime;\n        this.source = source;\n        this.source.buffer = this.buffer;\n        this.source.connect(destination);\n        this.onended = (_playBuffer) => { };\n    }\n    start() {\n        this.source.onended = () => {\n            this.onended(this);\n        };\n        this.source.start(this.playTime);\n    }\n}\nclass PcmDecoder extends Decoder {\n    setHeader(buffer) {\n        let sampleFormat = new SampleFormat();\n        let view = new DataView(buffer);\n        sampleFormat.channels = view.getUint16(22, true);\n        sampleFormat.rate = view.getUint32(24, true);\n        sampleFormat.bits = view.getUint16(34, true);\n        return sampleFormat;\n    }\n    decode(chunk) {\n        return chunk;\n    }\n}\nclass SnapStream {\n    constructor(baseUrl) {\n        this.playTime = 0;\n        this.msgId = 0;\n        this.bufferDurationMs = 80; // 0;\n        this.bufferFrameCount = 3844; // 9600; // 2400;//8192;\n        this.syncHandle = -1;\n        // ageBuffer: Array<number>;\n        this.audioBuffers = new Array();\n        this.freeBuffers = new Array();\n        // median: number = 0;\n        this.audioBufferCount = 3;\n        this.bufferMs = 1000;\n        this.bufferNum = 0;\n        this.latency = 0;\n        this.baseUrl = baseUrl;\n        this.timeProvider = new TimeProvider();\n        if (this.setupAudioContext()) {\n            this.connect();\n        }\n        else {\n            alert(\"Sorry, but the Web Audio API is not supported by your browser\");\n        }\n    }\n    setupAudioContext() {\n        let AudioContext = window.AudioContext // Default\n            || window.webkitAudioContext // Safari and old versions of Chrome\n            || false;\n        if (AudioContext) {\n            let options;\n            options = { latencyHint: \"playback\", sampleRate: this.sampleFormat ? this.sampleFormat.rate : undefined };\n            const chromeVersion = getChromeVersion();\n            if ((chromeVersion !== null && chromeVersion < 55) || !window.AudioContext) {\n                // Some older browsers won't decode the stream if options are provided.\n                options = undefined;\n            }\n            this.ctx = new AudioContext(options);\n            this.gainNode = this.ctx.createGain();\n            this.gainNode.connect(this.ctx.destination);\n        }\n        else {\n            // Web Audio API is not supported\n            return false;\n        }\n        return true;\n    }\n    connect() {\n        this.streamsocket = new WebSocket(this.baseUrl + '/stream');\n        this.streamsocket.binaryType = \"arraybuffer\";\n        this.streamsocket.onmessage = (ev) => this.onMessage(ev);\n        this.streamsocket.onopen = () => {\n            console.log(\"on open\");\n            let hello = new HelloMessage();\n            hello.mac = \"00:00:00:00:00:00\";\n            hello.arch = \"web\";\n            hello.os = navigator.platform;\n            hello.hostname = \"Snapweb client\";\n            hello.uniqueId = getPersistentValue(\"uniqueId\", uuidv4());\n            this.sendMessage(hello);\n            this.syncTime();\n            this.syncHandle = window.setInterval(() => this.syncTime(), 1000);\n        };\n        this.streamsocket.onerror = (ev) => { console.error('error:', ev); };\n        this.streamsocket.onclose = () => {\n            window.clearInterval(this.syncHandle);\n            console.info('connection lost, reconnecting in 1s');\n            setTimeout(() => this.connect(), 1000);\n        };\n    }\n    onMessage(msg) {\n        let view = new DataView(msg.data);\n        let type = view.getUint16(0, true);\n        if (type == 1) {\n            let codec = new CodecMessage(msg.data);\n            console.log(\"Codec: \" + codec.codec);\n            if (codec.codec == \"flac\") {\n                this.decoder = new FlacDecoder();\n            }\n            else if (codec.codec == \"pcm\") {\n                this.decoder = new PcmDecoder();\n            }\n            else if (codec.codec == \"opus\") {\n                this.decoder = new OpusDecoder();\n                alert(\"Codec not supported: \" + codec.codec);\n            }\n            else {\n                alert(\"Codec not supported: \" + codec.codec);\n            }\n            if (this.decoder) {\n                this.sampleFormat = this.decoder.setHeader(codec.payload);\n                console.log(\"Sampleformat: \" + this.sampleFormat.toString());\n                if ((this.sampleFormat.channels != 2) || (this.sampleFormat.bits != 16)) {\n                    alert(\"Stream must be stereo with 16 bit depth, actual format: \" + this.sampleFormat.toString());\n                }\n                else {\n                    if (this.bufferDurationMs != 0) {\n                        this.bufferFrameCount = Math.floor(this.bufferDurationMs * this.sampleFormat.msRate());\n                    }\n                    if (window.AudioContext) {\n                        // we are not using webkitAudioContext, so it's safe to setup a new AudioContext with the new samplerate\n                        // since this code is not triggered by direct user input, we cannt create a webkitAudioContext here\n                        this.stopAudio();\n                        this.setupAudioContext();\n                    }\n                    this.ctx.resume();\n                    this.timeProvider.setAudioContext(this.ctx);\n                    this.gainNode.gain.value = this.serverSettings.muted ? 0 : this.serverSettings.volumePercent / 100;\n                    // this.timeProvider = new TimeProvider(this.ctx);\n                    this.stream = new AudioStream(this.timeProvider, this.sampleFormat, this.bufferMs);\n                    this.latency = (this.ctx.baseLatency !== undefined ? this.ctx.baseLatency : 0) + (this.ctx.outputLatency !== undefined ? this.ctx.outputLatency : 0);\n                    console.log(\"Base latency: \" + this.ctx.baseLatency + \", output latency: \" + this.ctx.outputLatency + \", latency: \" + this.latency);\n                    this.play();\n                }\n            }\n        }\n        else if (type == 2) {\n            let pcmChunk = new PcmChunkMessage(msg.data, this.sampleFormat);\n            if (this.decoder) {\n                let decoded = this.decoder.decode(pcmChunk);\n                if (decoded) {\n                    this.stream.addChunk(decoded);\n                }\n            }\n        }\n        else if (type == 3) {\n            this.serverSettings = new ServerSettingsMessage(msg.data);\n            this.gainNode.gain.value = this.serverSettings.muted ? 0 : this.serverSettings.volumePercent / 100;\n            this.bufferMs = this.serverSettings.bufferMs - this.serverSettings.latency;\n            console.log(\"ServerSettings bufferMs: \" + this.serverSettings.bufferMs + \", latency: \" + this.serverSettings.latency + \", volume: \" + this.serverSettings.volumePercent + \", muted: \" + this.serverSettings.muted);\n        }\n        else if (type == 4) {\n            if (this.timeProvider) {\n                let time = new TimeMessage(msg.data);\n                this.timeProvider.setDiff(time.latency.getMilliseconds(), this.timeProvider.now() - time.sent.getMilliseconds());\n            }\n            // console.log(\"Time sec: \" + time.latency.sec + \", usec: \" + time.latency.usec + \", diff: \" + this.timeProvider.diff);\n        }\n        else {\n            console.info(\"Message not handled, type: \" + type);\n        }\n    }\n    sendMessage(msg) {\n        msg.sent = new Tv(0, 0);\n        msg.sent.setMilliseconds(this.timeProvider.now());\n        msg.id = ++this.msgId;\n        if (this.streamsocket.readyState == this.streamsocket.OPEN) {\n            this.streamsocket.send(msg.serialize());\n        }\n    }\n    syncTime() {\n        let t = new TimeMessage();\n        t.latency.setMilliseconds(this.timeProvider.now());\n        this.sendMessage(t);\n        // console.log(\"prepareSource median: \" + Math.round(this.median * 10) / 10);\n    }\n    stopAudio() {\n        // if (this.ctx) {\n        //     this.ctx.close();\n        // }\n        this.ctx.suspend();\n        while (this.audioBuffers.length > 0) {\n            let buffer = this.audioBuffers.pop();\n            buffer.onended = () => { };\n            buffer.source.stop();\n        }\n        while (this.freeBuffers.length > 0) {\n            this.freeBuffers.pop();\n        }\n    }\n    stop() {\n        window.clearInterval(this.syncHandle);\n        this.stopAudio();\n        if ([WebSocket.OPEN, WebSocket.CONNECTING].includes(this.streamsocket.readyState)) {\n            this.streamsocket.onclose = () => { };\n            this.streamsocket.close();\n        }\n    }\n    play() {\n        this.playTime = this.timeProvider.nowSec() + 0.1;\n        for (let i = 1; i <= this.audioBufferCount; ++i) {\n            this.playNext();\n        }\n    }\n    playNext() {\n        let buffer = this.freeBuffers.pop() || this.ctx.createBuffer(this.sampleFormat.channels, this.bufferFrameCount, this.sampleFormat.rate);\n        let playTimeMs = (this.playTime + this.latency) * 1000 - this.bufferMs;\n        this.stream.getNextBuffer(buffer, playTimeMs);\n        let source = this.ctx.createBufferSource();\n        let playBuffer = new PlayBuffer(buffer, this.playTime, source, this.gainNode);\n        this.audioBuffers.push(playBuffer);\n        playBuffer.num = ++this.bufferNum;\n        playBuffer.onended = (buffer) => {\n            // let diff = this.timeProvider.nowSec() - buffer.playTime;\n            this.freeBuffers.push(this.audioBuffers.splice(this.audioBuffers.indexOf(buffer), 1)[0].buffer);\n            // console.debug(\"PlayBuffer \" + playBuffer.num + \" ended after: \" + (diff * 1000) + \", in flight: \" + this.audioBuffers.length);\n            this.playNext();\n        };\n        playBuffer.start();\n        this.playTime += this.bufferFrameCount / this.sampleFormat.rate;\n    }\n}\n//# sourceMappingURL=snapstream.js.map"
  },
  {
    "path": "packages/addons/service/snapserver/snapweb/styles.css",
    "content": "body {\n    background-color: rgb(246, 246, 246);\n    color: rgb(255, 255, 255);\n    font-family: 'Arial', sans-serif;\n    width: 100%;\n    margin: 0;\n    font-size: 20px;\n    overscroll-behavior: contain;\n}\n\n/* width */\n::-webkit-scrollbar {\n    width: 10px;\n}\n\n/* Track */\n::-webkit-scrollbar-track {\n    background: #1f1f1f;\n}\n\n/* Handle */\n::-webkit-scrollbar-thumb {\n    background: #333;\n}\n\n/* Handle on hover */\n::-webkit-scrollbar-thumb:hover {\n    background: #555;\n}\n\n.navbar {\n    overflow: hidden;\n    background-color: #607d8b;\n    z-index: 1; /* Sit on top */\n    padding: 13px;\n    color: white;\n    position: fixed; /* Set the navbar to fixed position */\n    top: 0; /* Position the navbar at the top of the page */\n    width: 100%; /* Full width */\n    font-size: 21px;\n    font-weight: 500;\n    user-select: none;\n}\n\n.play-button {\n    display: block;\n    position: absolute;\n    right: 34px;\n    top: 5px;\n    height: 40px;\n    width: 40px;\n}\n\n.content {\n    margin-top: 62px\n}\n\n.group {\n    float: none;\n    background-color: white;\n    box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.2);\n    clear: both;\n    padding: 8px;\n    margin: 10px 15px 10px 15px;\n    overflow: auto;\n    width: auto;\n    border-radius: 3px;\n    user-select: none;\n}\n\n.group.muted {\n    opacity: 0.27;\n}\n\n.groupheader {\n    /* margin: 10px; */\n    width: auto;\n    height: fit-content;\n    /* padding: 10px; */\n    padding-bottom: 0px;\n    display: grid;\n    grid-template-columns: min-content auto min-content;\n    grid-template-rows: min-content min-content;\n    grid-gap: 0px;\n}\n\n.groupheader-separator {\n    height: 1px;\n    margin: 8px 0px;\n    border-width: 0px;\n    color: lightgray;\n    background-color: lightgray;\n}\n\n.stream {\n    color: #686868;\n    grid-row: 1;\n    grid-column: 1/3;\n    width: fit-content;\n}\n\nselect {\n    background-color: transparent;\n    border: 0px;\n    width: 150px;\n    font-size: 20px;\n    color: #e3e3e3;\n    -moz-appearance: none;\n    -webkit-appearance: none;\n    appearance: none;\n}\n\n.slidergroupdiv {\n    /* background: greenyellow; */\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    grid-row: 2;\n    grid-column: 2;\n}\n\n.client {\n    /* text-align: left; */\n    /* margin: 10px; */\n    width: auto;\n    height: fit-content;\n    /* padding: 10px; */\n    display: grid;\n    grid-template-columns: min-content auto min-content;\n    grid-template-rows: min-content min-content;\n    grid-gap: 0px;\n}\n\n/* .client:hover {\n    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);\n} */\n\n.client.disconnected {\n    opacity: 0.27;\n}\n\n.name {\n    color: #686868;\n    user-select: none;\n    /* background: red; */\n    padding-top: 5px;\n    grid-row: 1;\n    grid-column: 1/3;\n    text-decoration: none;\n}\n\n.editdiv {\n    background: violet;\n    grid-row: 0/4;\n    grid-column: 3;\n}\n\n.edit-icon {\n    color: #686868;\n    text-decoration: none;\n}\n\n.delete-icon {\n    color: #ff4081;\n    text-decoration: none;\n}\n\n.edit-icons {\n    align-items: center;\n    display: flex;\n    grid-row: 1/3;\n    grid-column: 3;\n}\n\n.edit-group-icon {\n    display: flex;\n    color: transparent;\n    align-items: center;\n    grid-row: 1/3;\n    grid-column: 3;\n    text-decoration: none;\n}\n\n.mute-button {\n    color: #686868;\n    grid-row: 2;\n    grid-column: 1;\n    height: 25px;\n    width: 25px;\n    padding-left: 10px;\n    padding-right: 10px;\n    text-decoration: none;\n}\n\n.sliderdiv {\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    grid-row: 2;\n    grid-column: 2;\n    /* padding-left: 40px; */\n    /* display: inline-block;\n    text-align: left;\n    width: 250px; */\n}\n\n.slider {\n     writing-mode: bt-lr;\n    -webkit-appearance: none;\n    background: #dbdbdb;\n    outline: none;\n    -webkit-transition: .2s;\n    transition: opacity .2s;\n    height: 2px;\n    width: 90%;\n}\n\n.slider::-moz-range-track {\n    padding: 6px;\n    background-color: transparent;\n    border: none;\n}\n\n.slider::-webkit-slider-thumb {\n    -webkit-appearance: none;\n    appearance: none;\n    height: 12px;\n    width: 12px;\n    border-radius: 50%;\n    background: #ff4081;\n    cursor: pointer;\n}\n\n.slider::-moz-range-thumb {\n    height: 12px;\n    width: 12px;\n    border-radius: 50%;\n    background: #ff4081;\n    cursor: pointer;\n}\n\n.slider.muted {\n    opacity: 0.27;\n}\n\n .client-settings {\n    display: none; /* Hidden by default */\n    position: fixed; /* Stay in place */\n    z-index: 1; /* Sit on top */\n    left: 0;\n    top: 0;\n    width: 100%; /* Full width */\n    height: 100%; /* Full height */\n    overflow: auto; /* Enable scroll if needed */\n    background-color: rgb(0,0,0); /* Fallback color */\n    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */\n}\n  \n.client-setting-content {\n    background-color: #fefefe;\n    color: #686868;\n    margin: 15% auto; /* 15% from the top and centered */\n    padding: 20px;\n    border: 1px solid #888;\n    width: 80%; /* Could be more or less, depending on screen size */\n}\n\n.client-input {\n    color: #686868;\n    width: 100%;\n    padding: 12px 20px;\n    margin: 8px 0;\n    display: block;\n    border: 1px solid #ccc;\n    border-radius: 4px;\n    box-sizing: border-box;\n}\n  \ninput[type=submit] {\n    width: 100%;\n    background-color: #4CAF50;\n    color: white;\n    padding: 14px 20px;\n    margin: 8px 0;\n    border: none;\n    border-radius: 4px;\n    cursor: pointer;\n}\n\ninput[type=submit]:hover {\n    background-color: #45a049;\n}\n\ndiv.container {\n    border-radius: 5px;\n    background-color: #f2f2f2;\n    padding: 20px;\n}\n\n"
  },
  {
    "path": "packages/addons/service/snapserver/source/bin/snapserver.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\noe_setup_addon service.snapserver\n\nconfig=\"pulseaudio.conf\"\nlink=\"/storage/.config/pulse-daemon.conf.d/50-snapserver.conf\"\nmkdir -p \"$(dirname $link)\"\nln -sf \"$ADDON_HOME/$config\" \"$link\"\nif [ ! -e \"$ADDON_HOME/$config\" ]; then\n  cp \"$ADDON_DIR/config/$config\" \"$ADDON_HOME\"\nfi\n\nfile=\"/tmp/snapkodi\"\nsink_name=\"Snapserver\"\nif [ -z \"$(pactl list short | grep $sink_name)\" ]; then\n  pactl load-module module-pipe-sink \\\n                    file=\"$file\" \\\n                    rate=48000 \\\n                    sink_name=\"$sink_name\" \\\n                    sink_properties=device.description=\"$sink_name\"\nfi\n\ncase \"$ss_st\" in\n  Default)\n    stream=\"pipe:///tmp/snapfifo?name=Default\"\n    ;;\n  Kodi)\n    stream=\"pipe://$file?name=Kodi\"\n    ;;\n  Spotify)\n    stream=\"spotify:///librespot?name=Spotify&devicename=$ss_ln\"\n    if [ \"$ss_lp\" != 0 ]; then\n        stream=\"$stream&params=--zeroconf-port%3D$ss_lp\"\n    fi\n    ;;\n  *)\n    stream=\"airplay:///shairport-sync?name=AirPlay\"\n    ;;\nesac\n\nif [ \"$ss_eh\" = \"true\" ] ; then\n  enable_http=1\nelse\n  enable_http=0\nfi\n\nnqptp &\n\nHOME=\"$ADDON_HOME\" \\\nnice -n \"$ss_ni\" \\\nsnapserver \\\n  --controlPort          \"$ss_cp\"  \\\n  --port                 \"$ss_sp\"  \\\n  --http.enabled         \"$enable_http\" \\\n  --http.port            \"$ss_hp\" \\\n  --http.bind_to_address \"$ss_ha\" \\\n  --http.doc_root=\"$ADDON_DIR/snapweb\" \\\n  --stream.stream        \"$stream\" \\\n  > /dev/null\n"
  },
  {
    "path": "packages/addons/service/snapserver/source/config/pulseaudio.conf",
    "content": "### Pulseaudio reads this file when it starts-up\n### Uncomment or add options if you know what you are doing\n\n#resample-method = soxr-vhq\n#default-sample-format = s16le\n#default-sample-rate = 48000\n"
  },
  {
    "path": "packages/addons/service/snapserver/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\n\ndef systemctl(command):\n    subprocess.call(\n        ['systemctl', command, xbmcaddon.Addon().getAddonInfo('id')])\n\n\nclass Monitor(xbmc.Monitor):\n\n    def __init__(self, *args, **kwargs):\n        xbmc.Monitor.__init__(self)\n\n    def onSettingsChanged(self):\n        systemctl('restart')\n\n\nif __name__ == '__main__':\n    Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/snapserver/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: snapserver\n# Addon id: service.snapclient\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Server port\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"Control port\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"Priority\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"Stream\"\nmsgstr \"\"\n\nmsgctxt \"#30005\"\nmsgid \"Enable HTTP server\"\nmsgstr \"\"\n\nmsgctxt \"#30006\"\nmsgid \"HTTP server port\"\nmsgstr \"\"\n\nmsgctxt \"#30007\"\nmsgid \"HTTP server bind address\"\nmsgstr \"\"\n\nmsgctxt \"#30008\"\nmsgid \"Librespot devicename\"\nmsgstr \"\"\n\nmsgctxt \"#30009\"\nmsgid \"Librespot zeroconf-port\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/snapserver/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n  <category  label=\"30000\">\n    <setting label=\"30001\" type=\"number\" id=\"ss_sp\" default=\"1704\"/>\n    <setting label=\"30002\" type=\"number\" id=\"ss_cp\" default=\"1705\"/>\n    <setting label=\"30003\" type=\"slider\" id=\"ss_ni\" default=\"0\" range=\"-20,1,19\" option=\"int\"/>\n    <setting label=\"30004\" type=\"select\" id=\"ss_st\" values=\"AirPlay|Default|Kodi|Spotify\"/>\n    <setting label=\"30008\" type=\"text\" id=\"ss_ln\" subsetting=\"true\" visible=\"eq(-1,Spotify)\" default=\"Snapcast\"/>\n    <setting label=\"30009\" type=\"number\" id=\"ss_lp\" subsetting=\"true\" visible=\"eq(-2,Spotify)\" default=\"0\"/>\n    <setting type=\"sep\"/>\n    <setting label=\"30005\" type=\"bool\" id=\"ss_eh\" default=\"false\"/>\n    <setting label=\"30006\" type=\"number\" id=\"ss_hp\" default=\"1780\" visible=\"eq(-1,true)\"/>\n    <setting label=\"30007\" type=\"ipaddress\" id=\"ss_ha\" default=\"0.0.0.0\" visible=\"eq(-2,true)\"/>\n  </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/snapserver/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"ss_cp\" default=\"true\">1705</setting>\n    <setting id=\"ss_ni\" default=\"true\">0</setting>\n    <setting id=\"ss_sp\" default=\"true\">1704</setting>\n    <setting id=\"ss_st\" default=\"true\">AirPlay</setting>\n    <setting id=\"ss_ln\" default=\"true\">Snapcast</setting>\n    <setting id=\"ss_lp\" default=\"true\">0</setting>\n    <setting id=\"ss_eh\" default=\"true\">false</setting>\n    <setting id=\"ss_hp\" default=\"true\">1780</setting>\n    <setting id=\"ss_ha\" default=\"true\">0.0.0.0</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/snapserver/source/system.d/service.snapserver.service",
    "content": "[Unit]\nDescription=Snapserver\nAfter=kodi.service network-online.target sound.target\nRequires=kodi.service network-online.target sound.target\n\n[Service]\nExecStart=/bin/sh /storage/.kodi/addons/service.snapserver/bin/snapserver.start\nRestart=always\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/syncthing/changelog.txt",
    "content": "1\n- not released for LE11\n\n2\n- syncthing: update to 1.23.4\n"
  },
  {
    "path": "packages/addons/service/syncthing/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"syncthing\"\nPKG_VERSION=\"1.23.4\"\nPKG_SHA256=\"06a2882f8ac49e15faf96025b01d0edcd4cc190a419d5de98fbe8271695329fa\"\nPKG_REV=\"2\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MPLv2\"\nPKG_SITE=\"https://syncthing.net/\"\nPKG_URL=\"https://github.com/syncthing/syncthing/releases/download/v${PKG_VERSION}/syncthing-source-v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain go:host\"\nPKG_SECTION=\"service/system\"\nPKG_SHORTDESC=\"Syncthing: open source continuous file synchronization\"\nPKG_LONGDESC=\"Syncthing (${PKG_VERSION}) replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it's transmitted over the Internet.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Syncthing\"\nPKG_ADDON_TYPE=\"xbmc.service\"\nPKG_MAINTAINER=\"Anton Voyl (awiouy)\"\n\nconfigure_target() {\n  go_configure\n  export LDFLAGS=\"-w -linkmode external -extldflags -Wl,--unresolved-symbols=ignore-in-shared-libs -extld ${CC} \\\n                  -X github.com/syncthing/syncthing/lib/build.Version=v${PKG_VERSION}\"\n}\n\nmake_target() {\n  ${GOLANG} build -a -ldflags \"${LDFLAGS}\" -o bin/syncthing -v ./cmd/syncthing\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P ${PKG_BUILD}/bin/syncthing \\\n        ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n}\n"
  },
  {
    "path": "packages/addons/service/syncthing/source/bin/syncthing-service",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\noe_setup_addon service.system.syncthing\n\nSTNODEFAULTFOLDER=\"1\" syncthing -home=$ADDON_HOME           \\\n                                -gui-address=\"$gui_address\" \\\n                                -logflags=0                 \\\n                                -no-browser                 \\\n                                -no-restart                 \\\n                                &\n\n"
  },
  {
    "path": "packages/addons/service/syncthing/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\n\nclass Monitor(xbmc.Monitor):\n\n    def __init__(self, *args, **kwargs):\n        xbmc.Monitor.__init__(self)\n        self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n    def onSettingsChanged(self):\n        subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == '__main__':\n    Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/syncthing/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: syncthing\n# Addon id: service.system.syncthing\n# Addon Provider: awiouy at gmail dot com\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"GUI Address\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"GUI Address\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/syncthing/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<settings>\n   <category label=\"30000\">\n      <setting id=\"gui_address\" label=\"30001\" type=\"text\" default=\"0.0.0.0:8384\" />\n   </category>\n</settings>\n\n"
  },
  {
    "path": "packages/addons/service/syncthing/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"gui_address\" default=\"true\">0.0.0.0:8384</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/syncthing/source/system.d/service.system.syncthing.service",
    "content": "[Unit]\nDescription=Syncthing - Open Source Continuous File Synchronization\nDocumentation=http://docs.syncthing.net/\nAfter=network.target\nRequires=network.target\n\n[Service]\nType=forking\nExecStart=/bin/sh /storage/.kodi/addons/service.system.syncthing/bin/syncthing-service\nRestart=on-failure\nSuccessExitStatus=3 4\nRestartForceExitStatus=3 4\n\n[Install]\nWantedBy=kodi.target\n\n"
  },
  {
    "path": "packages/addons/service/tigervnc/changelog.txt",
    "content": "1\n- fix not working TigerVNC\n"
  },
  {
    "path": "packages/addons/service/tigervnc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tigervnc\"\nPKG_VERSION=\"1.10.1\"\nPKG_SHA256=\"19fcc80d7d35dd58115262e53cac87d8903180261d94c2a6b0c19224f50b58c4\"\nPKG_REV=\"1\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"http://www.tigervnc.org\"\nPKG_URL=\"https://github.com/TigerVNC/tigervnc/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain cmake:host libX11 libXdamage libXext libXtst zlib libjpeg-turbo\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"${PKG_ADDON_NAME} server\"\nPKG_LONGDESC=\"${PKG_ADDON_NAME} (${PKG_VERSION}) is a high-performance, platform-neutral implementation of Virtual Network Computing, a client/server application that allows users to launch and interact with graphical applications on remote machines\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"TigerVNC\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_VIEWER=off -Wno-dev\"\n\nmakeinstall_target() {\n  : # nothing to do\n}\n\n# find ${1}.so.[0-9]* in ${2} and copy it to dest\n_pkg_copy_lib() {\n  find \"${2}/usr/lib\" -regextype sed -regex \".*/${1}\\.so\\.[0-9]*\" \\\n    -exec cp {} \"${ADDON_BUILD}/${PKG_ADDON_ID}/lib\" \\;\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/{bin,lib}\n\n  cp ${PKG_BUILD}/.${TARGET_NAME}/unix/vncconfig/vncconfig     \\\n     ${PKG_BUILD}/.${TARGET_NAME}/unix/vncpasswd/vncpasswd     \\\n     ${PKG_BUILD}/.${TARGET_NAME}/unix/x0vncserver/x0vncserver \\\n     ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n\n  # copy required libraries for tigervnc\n  _pkg_copy_lib libXtst $(get_install_dir libXtst)\n}\n"
  },
  {
    "path": "packages/addons/service/tigervnc/patches/tigervnc-system-notests.patch",
    "content": "--- a/CMakeLists.txt\t2017-06-12 12:08:55.347685243 +0000\n+++ b/CMakeLists.txt\t2017-06-12 12:09:01.337595834 +0000\n@@ -300,7 +300,6 @@\n   add_subdirectory(media)\n endif()\n \n-add_subdirectory(tests)\n \n \n include(cmake/BuildPackages.cmake)\n"
  },
  {
    "path": "packages/addons/service/tigervnc/source/bin/tigervnc.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\noe_setup_addon service.tigervnc\n\nif [ ! -f \"$ADDON_HOME/passwd\" ]\nthen\n  cp \"$ADDON_DIR/config/passwd\" \"$ADDON_HOME/passwd\"\nfi\n\nx0vncserver -PasswordFile=\"$ADDON_HOME/passwd\" -rfbport=\"$vnc_port\"\n"
  },
  {
    "path": "packages/addons/service/tigervnc/source/config/passwd",
    "content": "u@(8"
  },
  {
    "path": "packages/addons/service/tigervnc/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\n\nclass Monitor(xbmc.Monitor):\n\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == \"__main__\":\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/tigervnc/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: tigervnc\n# Addon id: service.tigervnc\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"port\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/tigervnc/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n   <category   label=\"30000\">\n      <setting label=\"30001\" id=\"vnc_port\" type=\"number\" default=\"5900\" />\n    </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/tigervnc/source/settings-default.xml",
    "content": "<settings>\n    <setting id=\"vnc_port\" value=\"5900\" />\n</settings>\n"
  },
  {
    "path": "packages/addons/service/tigervnc/source/system.d/service.tigervnc.service",
    "content": "[Unit]\nDescription=TigerVNC\nAfter=graphical.target\n\n[Service]\nEnvironment=DISPLAY=:0.0\nExecStart=/bin/sh /storage/.kodi/addons/service.tigervnc/bin/tigervnc.start\nTimeoutStopSec=1\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/tinc/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/tinc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tinc\"\nPKG_VERSION=\"1.1pre18\"\nPKG_SHA256=\"bd2d010a1bdeb1dd767f6fbc769fce2a2169119fb3d177df928c27d1f20b5775\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"http://www.tinc-vpn.org/\"\nPKG_URL=\"https://github.com/gsliepen/tinc/archive/release-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain lzo miniupnpc ncurses openssl readline zlib\"\nPKG_SECTION=\"service/system\"\nPKG_SHORTDESC=\"tinc: a Virtual Private Network daemon\"\nPKG_LONGDESC=\"tinc (${PKG_VERSION}) is a Virtual Private Network (VPN) daemon that uses tunnelling and encryption to create a secure private network between hosts on the Internet. Because the VPN appears to the IP level network code as a normal network device, there is no need to adapt any existing software. This allows VPN sites to share information with each other over the Internet without exposing any information to others.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"tinc\"\nPKG_ADDON_TYPE=\"xbmc.service\"\nPKG_MAINTAINER=\"Anton Voyl (awiouy)\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-miniupnpc \\\n                           --sysconfdir=/run\"\nPKG_MAKE_OPTS_TARGET=\"SUBDIRS=src\"\nPKG_MAKEINSTALL_OPTS_TARGET=\"SUBDIRS=src\"\n\nmake_target() {\n  :\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp ${PKG_INSTALL}/usr/sbin/* \\\n     ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n}\n"
  },
  {
    "path": "packages/addons/service/tinc/patches/tinc-0001-fix-autoconf-archive.patch",
    "content": "From 9f1151cd9813477dafb939f3b0234a654e80a3b0 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Tue, 28 Jan 2020 03:22:15 +0000\nSubject: [PATCH] fix API change since autoconf-archive-2019.01.06\n\n---\n Makefile.am | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile.am b/Makefile.am\nindex e69542e..19d1e31 100644\n--- a/Makefile.am\n+++ b/Makefile.am\n@@ -8,7 +8,7 @@ ACLOCAL_AMFLAGS = -I m4\n \n EXTRA_DIST = COPYING.README README.android\n \n-@CODE_COVERAGE_RULES@\n+include $(top_srcdir)/aminclude_static.am\n \n # If git describe works, force autoconf to run in order to make sure we have the\n # current version number from git in the resulting configure script.\n-- \n2.7.4\n\n"
  },
  {
    "path": "packages/addons/service/tinc/source/bin/tinc.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\noe_setup_addon service.system.tinc\n\nDIR_LEGACY=\"$ADDON_HOME/.config\"\nif [ -d \"$DIR_LEGACY\" ]; then\n  echo \"Warning: using legacy configuration $DIR_LEGACY, ignoring Kodi settings\"\n  tincd --config \"$DIR_LEGACY\" --no-detach\n  exit $?\nfi\n\n[ -z \"$tinc_loglevel\" ] && tinc_loglevel=\"3\"\n\nNET=\"vmnet_le\"\nNAME=\"${tinc_subnet//./_}\"\nCONF_KEYS=\"/storage/.cache/tinc.$NET\"\nCONF_TINC=\"/run/tinc/$NET\"\nDATA_LOCAL=\"$ADDON_HOME/Local\"\nDATA_REMOTES=\"$ADDON_HOME/Remotes\"\n\nrm -fr \"$CONF_TINC\" \"$DATA_LOCAL\" &> /dev/null\n\nif [ ! -d \"$CONF_KEYS\" ]; then\n  rm -fr \"$CONF_KEYS\" &> /dev/null\n  mkdir -p \"$CONF_KEYS\"\n  tinc --batch --config \"$CONF_KEYS\" generate-ed25519-keys\nfi\n\nif [ ! -d \"$DATA_REMOTES\" ]; then\n  rm -fr \"$DATA_REMOTES\" &> /dev/null\n  mkdir -p \"$DATA_REMOTES\"\nfi\n\nif [ \"$tinc_subnet\" == \"0.0.0.0\" ]; then\n  echo \"Warning: default subnet $tinc_subnet, aborting\"\n  exit\nfi\n\nif [ -e \"$DATA_REMOTES/$NAME\" ]; then\n  echo \"Error: $NAME in $DATA_REMOTES, aborting\"\n  exit\nfi\n\nmkdir -p \"$CONF_TINC\"\ncp -RT \"$ADDON_DIR/config\" \"$CONF_TINC\"\nchmod +x \"$CONF_TINC\"/*-*\nln -sf \"$DATA_REMOTES\" \"$CONF_TINC/hosts\"\ntee >> \"$CONF_TINC/tinc.conf\" << EOF\nEd25519PrivateKeyFile = $CONF_KEYS/ed25519_key.priv\nLogLevel              = $tinc_loglevel\nName                  = $NAME\nEOF\n\nmkdir -p \"$DATA_LOCAL\"\nif [ -n \"$tinc_address\" ]; then\n  echo \"Address          = $tinc_address\" >> \"$DATA_LOCAL/$NAME\"\nfi\ncat \"$CONF_KEYS/ed25519_key.pub\" >> \"$DATA_LOCAL/$NAME\"\n\ntee -a \"$CONF_TINC/tinc.conf\" >> \"$DATA_LOCAL/$NAME\" << EOF\nPort             = $tinc_port\nSubnet           = $tinc_subnet\nEOF\n\ntincd --net \"$NET\" --no-detach\n"
  },
  {
    "path": "packages/addons/service/tinc/source/config/subnet-down",
    "content": "#!/bin/sh\nif [ \"$NAME\" != \"$NODE\" ]; then\n  ip route del \"$SUBNET\" dev \"$INTERFACE\"\nfi\n"
  },
  {
    "path": "packages/addons/service/tinc/source/config/subnet-up",
    "content": "#!/bin/sh\nif [ \"$NAME\" == \"$NODE\" ]; then\n  ip addr replace \"$SUBNET\" dev \"$INTERFACE\"\nelse\n  ip route replace \"$SUBNET\" dev \"$INTERFACE\"\nfi\n"
  },
  {
    "path": "packages/addons/service/tinc/source/config/tinc-up",
    "content": "#!/bin/sh\nip link set up dev \"$INTERFACE\"\n"
  },
  {
    "path": "packages/addons/service/tinc/source/config/tinc.conf",
    "content": "AutoConnect           = yes\nExperimentalProtocol  = yes\nLocalDiscovery        = yes\nMode                  = Router\nTunnelServer          = yes\nUPnP                  = yes\n"
  },
  {
    "path": "packages/addons/service/tinc/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\n\nclass Monitor(xbmc.Monitor):\n\n    def __init__(self, *args, **kwargs):\n        xbmc.Monitor.__init__(self)\n        self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n    def onSettingsChanged(self):\n        subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == '__main__':\n    Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/tinc/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: tinc\n# Addon id: service.system.tinc\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Host\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Subnet (private IP address)\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"Port\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"Address (public DNS name)\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"Debug\"\nmsgstr \"\"\n\nmsgctxt \"#30005\"\nmsgid \"LogLevel\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/tinc/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>\n<settings>\n  <category  label=\"30000\">\n    <setting label=\"30001\" type=\"ipaddress\" id=\"tinc_subnet\"   default=\"0.0.0.0\"/>\n    <setting label=\"30002\" type=\"number\"    id=\"tinc_port\"     default=\"6550\"/>\n    <setting label=\"30003\" type=\"text\"      id=\"tinc_address\"  default=\"\"/>\n  </category>\n  <category  label=\"30004\">\n    <setting label=\"30005\" type=\"select\"    id=\"tinc_loglevel\" values=\"0|1|2|3|4|5\"/>\n  </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/tinc/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"tinc_address\" default=\"true\"></setting>\n    <setting id=\"tinc_loglevel\" default=\"true\">3</setting>\n    <setting id=\"tinc_port\" default=\"true\">6550</setting>\n    <setting id=\"tinc_subnet\" default=\"true\">0.0.0.0</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/tinc/source/system.d/service.system.tinc.service",
    "content": "[Unit]\nDescription=tinc for LibreELEC\nDocumentation=http://tinc-vpn.org/docs/\nAfter=network-online.target\nRequires=network-online.target\n\n[Service]\nExecStart=/bin/sh /storage/.kodi/addons/service.system.tinc/bin/tinc.start\nRestart=on-failure\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/touchscreen/addon.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"@PKG_ADDON_ID@\"\n       name=\"@ADDON_NAME@\"\n       version=\"@ADDON_VERSION@\"\n       provider-name=\"@PROVIDER_NAME@\">\n  <requires>\n    <import addon=\"xbmc.python\" version=\"3.0.0\"/>\n@REQUIRES@\n  </requires>\n  <extension point=\"xbmc.service\" library=\"service.py\">\n    <provides></provides>\n  </extension>\n  <extension point=\"xbmc.python.pluginsource\" library=\"calibrate.py\">\n    <provides>executable</provides>\n  </extension>\n  <extension point=\"xbmc.addon.metadata\">\n    <summary>@PKG_SHORTDESC@</summary>\n    <description>\n@PKG_LONGDESC@\n    </description>\n    <disclaimer>\n@PKG_DISCLAIMER@\n    </disclaimer>\n    <platform>all</platform>\n    <news>\n@PKG_ADDON_NEWS@\n    </news>\n    <assets>\n      <icon>resources/icon.png</icon>\n      <fanart>resources/fanart.png</fanart>\n@PKG_ADDON_SCREENSHOT@\n    </assets>\n  </extension>\n</addon>\n"
  },
  {
    "path": "packages/addons/service/touchscreen/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/touchscreen/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"touchscreen\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_ADDON_PROJECTS=\"Generic RPi ARM\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain tslib evtest\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Touchscreen: support addon for Touchscreens\"\nPKG_LONGDESC=\"Touchscreen: addon creates new virtual input device and \\\nconverts data from touchscreen to Kodi. Short tap sends button press event \\\nand long tap sends only xy coordinates. Also includes calibration program.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Touchscreen\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n  cp ${PKG_DIR}/addon.xml ${ADDON_BUILD}/${PKG_ADDON_ID}\n\n  # set only version (revision will be added by buildsystem)\n  sed -e \"s|@ADDON_VERSION@|${ADDON_VERSION}|g\" \\\n      -i ${ADDON_BUILD}/${PKG_ADDON_ID}/addon.xml\n\n  cp $(get_install_dir tslib)/usr/bin/* ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp $(get_install_dir evtest)/usr/bin/evtest ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n}\n"
  },
  {
    "path": "packages/addons/service/touchscreen/source/bin/ts_calibrate.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.touchscreen\n\nif [ -d /usr/share/kodi/addons/service.touchscreen ]; then\n  # addon included in image\n  ADDON_DIR=\"/usr/share/kodi/addons/service.touchscreen\"\nfi\n\n. $ADDON_DIR/bin/ts_env.sh\n\necho \"touchscreen device: $TSLIB_TSDEVICE\"\n\nif [ \"$1\" = \"service\" ]; then\n  # recalibrate from service if required\n  SETTINGS_XML=\"$ADDON_HOME/settings.xml\"\n  if [ -f \"$SETTINGS_XML\" ]; then\n    mkdir -p /var/config\n\n    # check settings version\n    XML_SETTINGS_VER=\"$(xmlstarlet sel -t -m settings -v @version $SETTINGS_XML)\"\n    if [ \"$XML_SETTINGS_VER\" = \"2\" ]; then\n      xmlstarlet sel -t -m settings/setting -v @id -o \"=\\\"\" -v . -o \"\\\"\" -n \"$SETTINGS_XML\" > /var/config/ts_calibration_addon.conf\n    else\n      xmlstarlet sel -t -m settings -m setting -v @id -o \"=\\\"\" -v @value -o \"\\\"\" -n \"$SETTINGS_XML\" > /var/config/ts_calibration_addon.conf\n    fi\n\n    . /var/config/ts_calibration_addon.conf\n\n    if [ \"$TS_RECALIBRATE\" = \"true\" ]; then\n      sed -i 's|id=\"TS_RECALIBRATE\"[ ]*value=\"true\"|id=\"TS_RECALIBRATE\" value=\"false\"|g' \"$SETTINGS_XML\"\n      touch $ADDON_HOME/recalibrate\n    fi\n  fi\n\n  if [ -f $ADDON_HOME/recalibrate ]; then\n    echo \"recalibrating...\"\n    rm -f $ADDON_HOME/recalibrate\n    ts_calibrate\n  fi\nelse\n  echo \"Stopping Kodi and touchscreen daemon...\"\n  systemctl stop kodi\n  systemctl stop ts_uinput_touch\n\n  while pidof kodi.bin &>/dev/null; do\n    sleep 0.5\n  done\n\n  killall ts_uinput_touch &>/dev/null\n\n  ts_calibrate\n\n  # restart both if argument was set\n  if [ \"$1\" = \"run\" ]; then\n    echo \"Starting touchscreen daemon and Kodi...\"\n    systemctl start ts_uinput_touch\n    systemctl start kodi\n  fi\nfi\n"
  },
  {
    "path": "packages/addons/service/touchscreen/source/bin/ts_env.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.touchscreen\n\nif [ -d /usr/share/kodi/addons/service.touchscreen ]; then\n  # addon included in image\n  ADDON_DIR=/usr/share/kodi/addons/service.touchscreen\nfi\n\nif [ ! -f $ADDON_HOME/ts.conf-generic ]; then\n  cp $ADDON_DIR/config/* $ADDON_HOME\nfi\n\nif [ -f $ADDON_HOME/ts_env.sh ]; then\n  # use user supplied script\n  if [ ! -x $ADDON_HOME/ts_env.sh ]; then\n    chmod +x $ADDON_HOME/ts_env.sh\n  fi\n  \n  dos2unix $ADDON_HOME/ts_env.sh\n  dos2unix $ADDON_HOME/ts.conf\n\n  . $ADDON_HOME/ts_env.sh\nelse\n  # automatic start only on Udoo dual/quad for ldb screen\n  LDB=\"\"\n  if grep -iq \":dev=ldb\" /proc/cmdline; then\n    LDB=\"yes\"\n    # maybe 7\" LVDS display\n    modprobe st1232 >/dev/null 2>&1\n  fi\n\n  if [ -n \"$LDB\" ]; then\n    # find event# with command\n    #  ls -l /dev/input/by-id\n    # or using evtest program\n\n    # st1232 module is always loaded so check for 3M first\n    TS_DEVICE_1=\"3M 3M USB Touchscreen - EX II\"\n    TS_DEVICE_2=\"st1232-touchscreen\"\n    TS_DEVICE_CONF_1=\"ts.conf-udoo_15_6\"\n    TS_DEVICE_CONF_2=\"ts.conf-udoo_7\"\n    TS_DEVICE_CONF_GENERIC=\"ts.conf-generic\"\n\n    #TS_DEVICE=\"$TS_DEVICE_1\" # use specified one, should exist ts.conf for it\n    TS_DEVICE=\"\"  # find one automatically\n    #echo \"device: $TS_DEVICE\"\n\n    TS_DEVICE_CONF=\"\"\n    if [ -n \"$TS_DEVICE\" ]; then\n      TSLIB_TSDEVICE=$(echo 999 | evtest 2>&1 >/dev/null | awk -F':' -v TS_DEVICE=\"$TS_DEVICE\" '$0 ~ TS_DEVICE {print $1}')\n      TS_DEVICE_CONF=\"$TS_DEVICE_CONF_GENERIC\"\n    else\n      TSLIB_TSDEVICE=$(echo 999 | evtest 2>&1 >/dev/null | awk -F':' -v TS_DEVICE=\"$TS_DEVICE_1\" '$0 ~ TS_DEVICE {print $1}')\n      if [ -n \"$TSLIB_TSDEVICE\" ]; then\n        TS_DEVICE_CONF=\"$TS_DEVICE_CONF_1\"\n        rmmod st1232 >/dev/null 2>&1    # it's not\n      else\n        TSLIB_TSDEVICE=$(echo 999 | evtest 2>&1 >/dev/null | awk -F':' -v TS_DEVICE=\"$TS_DEVICE_2\" '$0 ~ TS_DEVICE {print $1}')\n        if [ -n \"$TSLIB_TSDEVICE\" ]; then\n          TS_DEVICE_CONF=\"$TS_DEVICE_CONF_2\"\n        fi\n      fi\n    fi\n\n    if [ ! -f $ADDON_HOME/ts.conf -a -n \"$TS_DEVICE_CONF\" ]; then\n      cp \"$ADDON_HOME/$TS_DEVICE_CONF\" $ADDON_HOME/ts.conf\n    fi\n\n    export TSLIB_TSDEVICE=\"$TSLIB_TSDEVICE\"\n    export TSLIB_PLUGINDIR=$ADDON_DIR/lib\n    export TSLIB_CONSOLEDEVICE=none\n    export TSLIB_FBDEVICE=/dev/fb0\n    export TSLIB_CALIBFILE=$ADDON_HOME/pointercal\n    export TSLIB_CONFFILE=$ADDON_HOME/ts.conf\n\n    #export TSLIB_RES_X=800\n    #export TSLIB_RES_Y=480\n  fi\nfi\n"
  },
  {
    "path": "packages/addons/service/touchscreen/source/bin/ts_uinput_touch.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.touchscreen\n\nif [ -d /usr/share/kodi/addons/service.touchscreen ]; then\n  # addon included in image\n  ADDON_DIR=\"/usr/share/kodi/addons/service.touchscreen\"\nfi\n\n. $ADDON_DIR/bin/ts_env.sh\n\nparams=$*\n\nif [ \"$1\" = \"service\" ]; then\n  # skip service parameter and daemonize\n  params=\"-d\"\nelse\n  # started from command line\n  systemctl stop ts_uinput_touch >/dev/null 2>&1\n  killall ts_uinput_touch >/dev/null 2>&1\nfi\n\necho \"    touchscreen device: '$TSLIB_TSDEVICE'\"\n\nif [ -n \"$TSLIB_RES_X\" -a -n \"$TSLIB_RES_Y\" ]; then\n  echo \"touchscreen resolution: '${TSLIB_RES_X}x${TSLIB_RES_Y}'\"\n  params=\"-x $TSLIB_RES_X -y $TSLIB_RES_Y $params\"\nfi\n\necho \"params: .$params.\"\nif [ ! -x $ADDON_HOME/ts_uinput_touch ]; then\n  ts_uinput_touch $params\nelse\n  echo \"Using $ADDON_HOME/ts_uinput_touch\"\n  $ADDON_HOME/ts_uinput_touch $params\nfi\n"
  },
  {
    "path": "packages/addons/service/touchscreen/source/calibrate.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport os\nimport socket\nimport sys\nfrom threading import Thread\nimport xbmc\nimport xbmcgui\nimport xbmcaddon\n\nTEXT_ALIGN_LEFT = 0\nTEXT_ALIGN_RIGHT = 1\nTEXT_ALIGN_CENTER_X = 2\nTEXT_ALIGN_CENTER_Y = 4\nTEXT_ALIGN_RIGHT_CENTER_Y = 5\nTEXT_ALIGN_LEFT_CENTER_X_CENTER_Y = 6\nACTION_PREVIOUS_MENU = 10\nACTION_BACKSPACE = 92\n\nSOCK_PATH = \"/tmp/ts_calibrate.socket\"\nTSLIB_EDGE_OFFEST = 50\nCROSSHAIR_IMAGE_SIZE = 23\nCROSSHAIR_IMAGE_OFFSET = 11\nSKIN_WIDTH  = 1280   # we are using 720p skin\nSKIN_HEIGHT =  720\n\nclass coordinates:\n  var_x = 0\n  var_y = 0\n\ndef server_thread(conn, self):\n  while True:\n    data = conn.recv(128)\n    if not data:\n      break\n\n    self.currentTarget = self.currentTarget + 1\n    if self.currentTarget > 0:\n      self.removeControl(self.targetImage)\n\n    if self.currentTarget == 5:\n      xbmcgui.Dialog().ok(\"Calibration\", \"Calibration done.\")\n      break\n\n    self.info.setLabel(\"Touch '\" + data + \"' crosshair\")\n    self.targetImage = xbmcgui.ControlImage(\n      self.touch_points[self.currentTarget].var_x - CROSSHAIR_IMAGE_OFFSET,\n      self.touch_points[self.currentTarget].var_y - CROSSHAIR_IMAGE_OFFSET,\n      CROSSHAIR_IMAGE_SIZE, CROSSHAIR_IMAGE_SIZE,\n      self.crosshair_path, colorDiffuse='0x00000000')\n    self.addControl(self.targetImage)\n\n  # out of loop, close connection\n  conn.close()\n  os.remove(SOCK_PATH)\n  self.retval = 0\n  self.close()\n\nclass ts_calibrate(xbmcgui.WindowDialog):\n  def __init__(self):\n    self.retval = 0\n    self.media_path=os.path.join(addon.getAddonInfo('path'), 'resources','media') + '/'\n    self.crosshair_path = self.media_path + 'crosshair.png'\n    self.currentTarget = -1\n\n    self.edge_offset_x = TSLIB_EDGE_OFFEST * SKIN_WIDTH / self.getWidth()\n    self.edge_offset_y = TSLIB_EDGE_OFFEST * SKIN_HEIGHT / self.getHeight()\n\n    self.touch_points = [coordinates() for i in range(5)]\n    self.touch_points[0].var_x = self.edge_offset_x\n    self.touch_points[0].var_y = self.edge_offset_y\n    self.touch_points[1].var_x = SKIN_WIDTH - self.edge_offset_x\n    self.touch_points[1].var_y = self.edge_offset_y\n    self.touch_points[2].var_x = SKIN_WIDTH - self.edge_offset_x\n    self.touch_points[2].var_y = SKIN_HEIGHT - self.edge_offset_y\n    self.touch_points[3].var_x = self.edge_offset_x\n    self.touch_points[3].var_y = SKIN_HEIGHT - self.edge_offset_y\n    self.touch_points[4].var_x = SKIN_WIDTH / 2\n    self.touch_points[4].var_y = SKIN_HEIGHT / 2\n\n    self.background = xbmcgui.ControlImage(0, 0, SKIN_WIDTH, SKIN_HEIGHT,\n          self.media_path + 'background.jpg', colorDiffuse = '0xffffffff')\n    self.addControl(self.background)\n\n    tmp_str  = \"Tslib/Kodi calibration utility\\n\\nTouch crosshair to calibrate\"\n    tmp_str += \"\\n\\nresolution: \" + str(self.getWidth()) + \"x\" + str(self.getHeight())\n    tmp_str += \"\\nskin: \" + str(SKIN_WIDTH) + \"x\" + str(SKIN_HEIGHT)\n\n    self.about = xbmcgui.ControlLabel(\n      10, 80, SKIN_WIDTH, 400,\n      \"\", textColor = '0xffffffff', font = 'font25', alignment = TEXT_ALIGN_CENTER_X)\n    self.addControl(self.about)\n    self.about.setLabel(tmp_str)\n\n    self.info = xbmcgui.ControlLabel(\n      20, SKIN_HEIGHT/2 - 40,\n      1000, 400,\n      \"\", textColor = '0xffffffff', font = 'font30', alignment = TEXT_ALIGN_LEFT)\n    self.addControl(self.info)\n    self.info.setLabel(\"\")\n\n    if os.path.exists(SOCK_PATH):\n      os.remove(SOCK_PATH)\n\n    sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)\n    sock.bind(SOCK_PATH)\n    sock.listen(1)\n\n    # enter calibration mode\n    os.system(\"killall -SIGUSR1 ts_uinput_touch\")\n\n    print 'Waiting for calibration connection'\n    conn, addr = sock.accept()\n    print 'Calibration connection accepted'\n\n    self.t = Thread(target=server_thread, args=(conn, self,))\n    self.t.start()\n\n  def onAction(self, action):\n    if action == ACTION_PREVIOUS_MENU or action == ACTION_BACKSPACE:\n      self.retval = 0\n      self.close()\n\naddon = xbmcaddon.Addon(id = 'service.touchscreen')\nfinished = False\n\nwhile finished == False:\n  dialog = ts_calibrate()\n  dialog.doModal()\n\n  if dialog.retval == 0:\n    finished = True\n  del dialog\n\ndel addon\n# exit calibration mode\nos.system(\"killall -SIGUSR2 ts_uinput_touch\")\n\nif os.path.exists(SOCK_PATH):\n  os.remove(SOCK_PATH)\n      "
  },
  {
    "path": "packages/addons/service/touchscreen/source/config/ts.conf-generic",
    "content": "module_raw input grab_events=1\nmodule pthres pmin=1\nmodule variance delta=30\nmodule dejitter delta=100\n\nmodule linear\n# or use swap_xy parameter to swap axes\n#module linear swap_xy=1\n"
  },
  {
    "path": "packages/addons/service/touchscreen/source/config/ts.conf-udoo_15_6",
    "content": "# Udoo with 15.6\" 1366x768 display with 3M USB Touchscreen - EX II\nmodule_raw input grab_events=1\nmodule pthres pmin=1\nmodule variance delta=30\nmodule dejitter delta=100\nmodule linear\n"
  },
  {
    "path": "packages/addons/service/touchscreen/source/config/ts.conf-udoo_7",
    "content": "# Udoo with 7\" 800x480 display with ST1232 touch controler\n# only st1232 raw input module is used\nmodule_raw st1232 grab_events=1 invert_y=480\n"
  },
  {
    "path": "packages/addons/service/touchscreen/source/config/ts.conf-waveshare",
    "content": "# len is hidraw data size\nmodule_raw waveshare len=22\nmodule pthres pmin=1\nmodule variance delta=30\nmodule dejitter delta=100\nmodule linear\n"
  },
  {
    "path": "packages/addons/service/touchscreen/source/config/ts_env.sh-sample",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n# find touchscreen device by name (substring) using evtest program\n\n#  $ evtest\n#  No device specified, trying to scan all of /dev/input/event*\n#  Available devices:\n#  /dev/input/event0:\tVideo Bus\n#  /dev/input/event1:\tGoodix Capacitive TouchScreen\n#  Select the device event number [0-1]: \n\nTOUCHSCREEN_NAME=\"Goodix Capacitive TouchScreen\"\n\nTSLIB_TSDEVICE=$(echo 999 | evtest 2>&1 >/dev/null | awk -F':' -v TS_NAME=\"$TOUCHSCREEN_NAME\" '$0 ~ TS_NAME {print $1; exit}')\nexport TSLIB_TSDEVICE\n\nexport TSLIB_PLUGINDIR=$ADDON_DIR/lib\nexport TSLIB_CONSOLEDEVICE=none\nexport TSLIB_FBDEVICE=/dev/fb0\nexport TSLIB_CALIBFILE=/storage/.kodi/userdata/addon_data/service.touchscreen/pointercal\nexport TSLIB_CONFFILE=/storage/.kodi/userdata/addon_data/service.touchscreen/ts.conf\n\n# sometimes needed\n#export TSLIB_RES_X=800\n#export TSLIB_RES_Y=480\n"
  },
  {
    "path": "packages/addons/service/touchscreen/source/config/ts_env.sh-waveshare",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n# change vid/pid for waveshare touchscreen device\nPRODUCT_VID=0EEF\nPRODUCT_PID=0005\n\n# device set directly or find automaticaly at the end of this script\nexport TSLIB_TSDEVICE=\"\"\n#export TSLIB_TSDEVICE=\"/dev/hidrawN\"\n\nexport TSLIB_PLUGINDIR=$ADDON_DIR/lib\nexport TSLIB_CONSOLEDEVICE=none\nexport TSLIB_FBDEVICE=/dev/fb0\nexport TSLIB_CALIBFILE=/storage/.kodi/userdata/addon_data/service.touchscreen/pointercal\nexport TSLIB_CONFFILE=/storage/.kodi/userdata/addon_data/service.touchscreen/ts.conf\n\nexport TSLIB_RES_X=800\nexport TSLIB_RES_Y=480\n\n\n# find touchscreen device\nif [ \"$TSLIB_TSDEVICE\" = \"\" ]; then\n  PRODUCT_VID_PID=\"0000${PRODUCT_VID}:0000${PRODUCT_PID}\"\n  echo \"PRODUCT_VID_PID: $PRODUCT_VID_PID\"\n\n  hidrawN=\"\"\n  for dev in /sys/class/hidraw/hidraw*/device/uevent; do\n    echo\n    echo \"device: $dev\"\n\n    HID_ID=$(cat $dev | grep HID_ID | grep \"$PRODUCT_VID_PID\")\n    if [ -n \"$HID_ID\" ]; then\n      hidrawN=$(echo $dev | awk -F \"/\" '{print $5}')\n      hidrawN=\"/dev/$hidrawN\"\n      echo \"OK HID_ID: $HID_ID\"\n      echo \"OK hidrawN: $hidrawN\"\n      break\n    fi\n  done\n\n  if [ -n \"$hidrawN\" ]; then\n    echo \"found hidrawN: $hidrawN\"\n    export TSLIB_TSDEVICE=$hidrawN\n  fi\nfi\n"
  },
  {
    "path": "packages/addons/service/touchscreen/source/lock-screen.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport xbmc\nimport xbmcgui\nimport xbmcaddon\n\n__scriptid__ = 'service.touchscreen'\n__addon__    = xbmcaddon.Addon(id=__scriptid__)\n_            = __addon__.getLocalizedString\n\n# http://forum.kodi.tv/showthread.php?tid=230766\ndef handle_wait(time_to_wait, title, text):\n    dialog = xbmcgui.DialogProgress()\n    ret = dialog.create(' ' + title)\n    secs = 0\n    percent = 0\n    increment = int(100 / time_to_wait)\n\n    while secs < time_to_wait:\n        secs += 1\n        percent = increment*secs\n        secs_left = time_to_wait - secs\n        remaining_display = (_(2030).encode('utf-8')) % secs_left\n        dialog.update(percent, text, \"\", remaining_display)\n        xbmc.sleep(1000)\n\n    dialog.close()\n    return False\n\n# how long to lock the screen\nlock_secs = 30\nhandle_wait(lock_secs, _(2010).encode('utf-8'), _(2020).encode('utf-8'))\n"
  },
  {
    "path": "packages/addons/service/touchscreen/source/resources/language/English/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<strings>\n  <string id=\"1000\">General</string>\n  <string id=\"1010\">Recalibrate after reboot</string>\n  <string id=\"1020\">Clean screen</string>\n\n  <string id=\"2010\">Touchscreen</string>\n  <string id=\"2020\">Now you can safely clean the screen.</string>\n  <string id=\"2030\">Still %d seconds left.</string>\n</strings>\n"
  },
  {
    "path": "packages/addons/service/touchscreen/source/resources/language/German/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<strings>\n  <string id=\"1000\">Allgemein</string>\n  <string id=\"1010\">Nach einem Neustart neu kalibrieren</string>\n  <string id=\"1020\">Touchscreen reinigen</string>\n\n  <string id=\"2010\">Touchscreen</string>\n  <string id=\"2020\">Sie können jetzt den Touchscreen sicher reinigen.</string>\n  <string id=\"2030\">Noch %d Sekunden übrig.</string>\n</strings>\n"
  },
  {
    "path": "packages/addons/service/touchscreen/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n  <category label=\"1000\" >\n    <setting type=\"sep\" />\n    <setting label=\"1010\" id=\"TS_RECALIBRATE\" type=\"bool\" default=\"false\" />\n    <setting label=\"1020\" id=\"clean_screen\" type=\"action\" option=\"close\" action=\"RunScript($CWD/lock-screen.py)\" />\n  </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/touchscreen/source/service.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n"
  },
  {
    "path": "packages/addons/service/touchscreen/source/system.d/service.touchscreen.service",
    "content": "[Unit]\nDescription=Touchscreen support daemon\nAfter=graphical.target\nBefore=kodi.target\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStartPre=-/bin/sh -c \"exec /bin/sh /storage/.kodi/addons/service.touchscreen/bin/ts_calibrate.sh service\"\nExecStart=-/bin/sh -c    \"exec /bin/sh /storage/.kodi/addons/service.touchscreen/bin/ts_uinput_touch.sh service\"\nRemainAfterExit=yes\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/ttyd/changelog.txt",
    "content": "1\n- ttyd: update to 1.7.3\n"
  },
  {
    "path": "packages/addons/service/ttyd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ttyd\"\nPKG_VERSION=\"1.7.3\"\nPKG_SHA256=\"c9cf5eece52d27c5d728000f11315d36cb400c6948d1964a34a7eae74b454099\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/tsl0922/ttyd\"\nPKG_URL=\"https://github.com/tsl0922/ttyd/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libwebsockets\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"ttyd: a tool for accessing the terminal over a browser\"\nPKG_LONGDESC=\"ttyd (${PKG_VERSION}): is a simple command-line tool for sharing terminal over the web\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Web SSH Terminal\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp -P ${PKG_INSTALL}/usr/bin/ttyd ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n  cp -p $(get_install_dir json-c)/usr/lib/libjson-c.so.5 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n  cp -p $(get_install_dir libwebsockets)/usr/lib/libwebsockets.so.19 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n  cp -p $(get_install_dir libwebsockets)/usr/lib/libwebsockets-evlib_uv.so ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n  cp -p $(get_install_dir libuv)/usr/lib/libuv.so.1 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n}\n"
  },
  {
    "path": "packages/addons/service/ttyd/source/bin/ttyd.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.ttyd\n\nchmod a+x $ADDON_DIR/bin/*\n\nif [ \"$TTYD_NOLOGIN\" = \"true\" ]; then\n  TTYD_NOLOGIN=\"bash\"\nelif [ \"$TTYD_NOLOGIN\" = \"false\" ]; then\n  TTYD_NOLOGIN=\"login root\"\nfi\n\nexec $ADDON_DIR/bin/ttyd -O -T xterm -p ${TTYD_WEBPORT} ${TTYD_NOLOGIN} &>$ADDON_HOME/service.log\n"
  },
  {
    "path": "packages/addons/service/ttyd/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\n\nclass Monitor(xbmc.Monitor):\n\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == \"__main__\":\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/ttyd/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: ttyd\n# Addon id: service.ttyd\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"Settings\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Webui Port\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"[COLOR FFFF0000][SECURITY RISK][/COLOR] Allow usage without password\"\nmsgstr \"\"\n\n"
  },
  {
    "path": "packages/addons/service/ttyd/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n  <category label=\"30000\">\n    <setting id=\"TTYD_WEBPORT\" type=\"text\" label=\"30001\" default=\"11111\" />\n    <setting id=\"TTYD_NOLOGIN\" type=\"bool\" label=\"30002\" default=\"false\" />\n  </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/ttyd/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"TTYD_NOLOGIN\" default=\"true\">false</setting>\n    <setting id=\"TTYD_WEBPORT\" default=\"true\">11111</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/ttyd/source/system.d/service.ttyd.service",
    "content": "[Unit]\nDescription=ttyd\nAfter=graphical.target\n\n[Service]\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.ttyd/bin/ttyd.start\"\nTimeoutStopSec=1\nRestart=always\nRestartSec=2\nStartLimitInterval=0\nType=exec\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/tvheadend/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tvheadend\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"service.multimedia\"\nPKG_SHORTDESC=\"Add-on removed\"\nPKG_LONGDESC=\"Add-on removed\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_ADDON_BROKEN=\"Tvheadend 4.0 is no longer maintained and has been superseded by Tvheadend 4.2.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Tvheadend Server 4.0\"\nPKG_ADDON_TYPE=\"xbmc.broken\"\n\naddon() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/addon.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"@PKG_ADDON_ID@\"\n       name=\"@ADDON_NAME@\"\n       version=\"@ADDON_VERSION@\"\n       provider-name=\"@PROVIDER_NAME@\">\n  <requires>\n    <import addon=\"xbmc.python\" version=\"3.0.0\"/>\n@REQUIRES@\n  </requires>\n  <extension point=\"xbmc.service\" library=\"default.py\">\n    <provides>@PKG_ADDON_PROVIDES@</provides>\n  </extension>\n  <extension point=\"xbmc.python.script\" library=\"download.py\">\n    <provides>@PKG_ADDON_PROVIDES@</provides>\n  </extension>\n  <extension point=\"xbmc.addon.metadata\">\n    <summary>@PKG_SHORTDESC@</summary>\n    <description>\n@PKG_LONGDESC@\n    </description>\n    <disclaimer>\n@PKG_DISCLAIMER@\n    </disclaimer>\n    <platform>all</platform>\n    <news>\n@PKG_ADDON_NEWS@\n    </news>\n    <assets>\n      <icon>resources/icon.png</icon>\n      <fanart>resources/fanart.png</fanart>\n@PKG_ADDON_SCREENSHOT@\n    </assets>\n  </extension>\n</addon>\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tvheadend42\"\nPKG_VERSION=\"5bdcfd8ac97b3337e1c7911ae24127df76fa693a\"\nPKG_SHA256=\"b562a26248cdc02dc94cc62038deea172668fa4c079b2ea4e1b4220f3b1d34f5\"\nPKG_VERSION_NUMBER=\"4.2.8-36\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.tvheadend.org\"\nPKG_URL=\"https://github.com/tvheadend/tvheadend/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain avahi comskip curl dvb-apps ffmpegx libdvbcsa libhdhomerun \\\n                    libiconv openssl pngquant:host Python3:host tvh-dtv-scan-tables\"\nPKG_DEPENDS_CONFIG=\"ffmpegx\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Tvheadend: a TV streaming server for Linux\"\nPKG_LONGDESC=\"Tvheadend (${PKG_VERSION_NUMBER}): is a TV streaming server for Linux supporting DVB-S/S2, DVB-C, DVB-T/T2, IPTV, SAT>IP, ATSC and ISDB-T\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Tvheadend Server 4.2\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\n# basic transcoding options\nPKG_TVH_TRANSCODING=\"\\\n  --disable-ffmpeg_static \\\n  --disable-libfdkaac_static \\\n  --disable-libopus_static \\\n  --disable-libtheora \\\n  --disable-libtheora_static \\\n  --disable-libvorbis_static \\\n  --disable-libvpx_static \\\n  --disable-libx264_static \\\n  --disable-libx265_static \\\n  --enable-libav \\\n  --enable-libfdkaac \\\n  --enable-libopus \\\n  --enable-libvorbis \\\n  --enable-libx264\"\n\n# hw specific transcoding options\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  PKG_DEPENDS_TARGET+=\" libva\"\n  # specific transcoding options\n  PKG_TVH_TRANSCODING=\"${PKG_TVH_TRANSCODING} \\\n    --enable-vaapi \\\n    --enable-libvpx \\\n    --enable-libx265\"\nelse\n  # for != \"x86_64\" targets\n  # specific transcoding options\n  PKG_TVH_TRANSCODING=\"${PKG_TVH_TRANSCODING} \\\n    --disable-libvpx \\\n    --disable-libx265\"\nfi\n\npost_unpack() {\n  sed -e 's/VER=\"0.0.0~unknown\"/VER=\"'${PKG_VERSION_NUMBER}' ~ LibreELEC Tvh-addon v'${ADDON_VERSION}'.'${PKG_REV}'\"/g' -i ${PKG_BUILD}/support/version\n  sed -e 's|'/usr/bin/pngquant'|'${TOOLCHAIN}/bin/pngquant'|g' -i ${PKG_BUILD}/support/mkbundle\n}\n\npre_configure_target() {\n  PKG_CONFIGURE_OPTS_TARGET=\"--prefix=/usr \\\n                             --arch=${TARGET_ARCH} \\\n                             --cpu=${TARGET_CPU} \\\n                             --cc=${CC} \\\n                             ${PKG_TVH_TRANSCODING} \\\n                             --enable-avahi \\\n                             --enable-bundle \\\n                             --disable-dbus_1 \\\n                             --enable-dvbcsa \\\n                             --disable-dvben50221 \\\n                             --disable-dvbscan \\\n                             --enable-hdhomerun_client \\\n                             --disable-hdhomerun_static \\\n                             --enable-epoll \\\n                             --enable-inotify \\\n                             --enable-pngquant \\\n                             --disable-libmfx_static \\\n                             --disable-nvenc \\\n                             --disable-uriparser \\\n                             --enable-tvhcsa \\\n                             --enable-trace \\\n                             --nowerror \\\n                             --disable-bintray_cache \\\n                             --python=${TOOLCHAIN}/bin/python\"\n\n# fails to build in subdirs\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n\n# pass ffmpegx to build\n  CFLAGS+=\" -I$(get_install_dir ffmpegx)/usr/local/include\"\n  LDFLAGS+=\" -L$(get_install_dir ffmpegx)/usr/local/lib\"\n\n# pass libhdhomerun to build\n  CFLAGS+=\" -I${SYSROOT_PREFIX}/usr/include/hdhomerun\"\n\n  export CROSS_COMPILE=\"${TARGET_PREFIX}\"\n  export CFLAGS+=\" -I${SYSROOT_PREFIX}/usr/include/iconv -L${SYSROOT_PREFIX}/usr/lib/iconv\"\n}\n\npost_make_target() {\n  ${CC} -O -fbuiltin -fomit-frame-pointer -fPIC -shared -o capmt_ca.so src/extra/capmt_ca.c -ldl\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib\n  cp -p capmt_ca.so ${INSTALL}/usr/lib\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/{bin,lib}\n\n  cp ${PKG_DIR}/addon.xml ${ADDON_BUILD}/${PKG_ADDON_ID}\n\n  # set only version (revision will be added by buildsystem)\n  sed -e \"s|@ADDON_VERSION@|${ADDON_VERSION}|g\" \\\n      -i ${ADDON_BUILD}/${PKG_ADDON_ID}/addon.xml\n\n  cp -P ${PKG_INSTALL}/usr/bin/tvheadend ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp -P ${PKG_INSTALL}/usr/lib/capmt_ca.so ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp -P $(get_install_dir comskip)/usr/bin/comskip ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n  if [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n    cp -P $(get_install_dir x265)/usr/lib/libx265.so.199 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n  fi\n\n  # dvb-scan files\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/dvb-scan\n  cp -r $(get_install_dir tvh-dtv-scan-tables)/usr/share/dvbv5/* \\\n        ${ADDON_BUILD}/${PKG_ADDON_ID}/dvb-scan\n}\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/patches/tvheadend42-01-dvb-scan-path.patch",
    "content": "--- a/src/input/mpegts/scanfile.c\n+++ b/src/input/mpegts/scanfile.c\n@@ -903,7 +903,7 @@ scanfile_init ( const char *muxconf_path, int lock )\n #elif defined(PLATFORM_FREEBSD)\n     path = \"/usr/local/share/dtv-scan-tables\";\n #else\n-    path = \"/usr/share/dvb\";\n+    path = \"/storage/.kodi/addons/service.tvheadend42/dvb-scan\";\n #endif\n \n   if (!initialized) {\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/patches/tvheadend42-02-hdhomerun-includes.patch",
    "content": "fix libhdhomerun includes\n\n--- a/configure\n+++ b/configure\n@@ -362,7 +362,7 @@ if enabled hdhomerun_static; then\n else\n \n   if enabled_or_auto hdhomerun_client; then\n-    if check_cc_header 'libhdhomerun/hdhomerun' libhdhomerun; then\n+    if check_cc_header 'hdhomerun' libhdhomerun; then\n       enable  hdhomerun_client\n       LDFLAGS=\"$LDFLAGS -lhdhomerun\"\n     fi\n--- a/src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h\n+++ b/src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h\n@@ -24,7 +24,7 @@\n #include \"htsbuf.h\"\n #include \"tvhdhomerun.h\"\n \n-#include \"libhdhomerun/hdhomerun.h\"\n+#include \"hdhomerun.h\"\n \n typedef struct tvhdhomerun_device_info tvhdhomerun_device_info_t;\n typedef struct tvhdhomerun_device      tvhdhomerun_device_t;\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/patches/tvheadend42-03-hdhomerun-fix.patch",
    "content": "https://github.com/tvheadend/tvheadend/commit/13cd23c371e3377973502f8dc65654b6a0ff372b\n\nFrom: Michael Marley <michael@michaelmarley.com>\nDate: Wed, 26 Jun 2019 19:35:50 -0400\nSubject: [PATCH] Fix compilation with libhdhomerun 20190621\n\nThey renamed the symbol that was used to determine whether the\n\"hdhomerun_discover_find_devices_custom\" needed to be aliased,\ncausing an FTBFS.  Instead, recognize both the old and new symbols.\n---\n src/input/mpegts/tvhdhomerun/tvhdhomerun.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/src/input/mpegts/tvhdhomerun/tvhdhomerun.c b/src/input/mpegts/tvhdhomerun/tvhdhomerun.c\nindex 58dec51ab3..18068faf5d 100644\n--- a/src/input/mpegts/tvhdhomerun/tvhdhomerun.c\n+++ b/src/input/mpegts/tvhdhomerun/tvhdhomerun.c\n@@ -32,7 +32,8 @@\n \n #include \"config.h\"\n \n-#ifdef HDHOMERUN_TAG_DEVICE_AUTH_BIN\n+#if defined(HDHOMERUN_TAG_DEVICE_AUTH_BIN) \\\n+           || defined(HDHOMERUN_TAG_DEVICE_AUTH_BIN_DEPRECATED)\n #define hdhomerun_discover_find_devices_custom \\\n            hdhomerun_discover_find_devices_custom_v2\n #endif\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/patches/tvheadend42-04-Fix-building-with-fno-common.patch",
    "content": "From 8a2942a361e95ccdbd30c1edc7627df3862cdbbe Mon Sep 17 00:00:00 2001\nFrom: James Le Cuirot <chewi@gentoo.org>\nDate: Fri, 15 May 2020 17:45:30 +0100\nSubject: [PATCH] Fix building with -fno-common (default from GCC 10)\n\n---\n src/input.h        | 4 ++--\n src/input/mpegts.c | 2 ++\n src/input/mpegts.h | 2 +-\n 3 files changed, 5 insertions(+), 3 deletions(-)\n\ndiff --git a/src/input.h b/src/input.h\nindex a9c96df048..3dce355c6a 100644\n--- a/src/input.h\n+++ b/src/input.h\n@@ -133,8 +133,8 @@ void tvh_hardware_delete ( tvh_hardware_t *th );\n extern const idclass_t tvh_input_class;\n extern const idclass_t tvh_input_instance_class;\n \n-tvh_input_list_t    tvh_inputs;\n-tvh_hardware_list_t tvh_hardware;\n+extern tvh_input_list_t    tvh_inputs;\n+extern tvh_hardware_list_t tvh_hardware;\n \n #define TVH_INPUT_FOREACH(x) LIST_FOREACH(x, &tvh_inputs, ti_link)\n #define TVH_HARDWARE_FOREACH(x) LIST_FOREACH(x, &tvh_hardware, th_link)\ndiff --git a/src/input/mpegts.c b/src/input/mpegts.c\nindex e02d491f19..fca4f34296 100644\n--- a/src/input/mpegts.c\n+++ b/src/input/mpegts.c\n@@ -20,6 +20,8 @@\n #include \"mpegts/fastscan.h\"\n #include \"memoryinfo.h\"\n \n+struct mpegts_listeners mpegts_listeners;\n+\n extern memoryinfo_t mpegts_input_queue_memoryinfo;\n extern memoryinfo_t mpegts_input_table_memoryinfo;\n \ndiff --git a/src/input/mpegts.h b/src/input/mpegts.h\nindex 9dda3bacaa..9c4c57b73b 100644\n--- a/src/input/mpegts.h\n+++ b/src/input/mpegts.h\n@@ -1149,7 +1149,7 @@ typedef struct mpegts_listener\n   void (*ml_mux_delete) (mpegts_mux_t *mm, void *p);\n } mpegts_listener_t;\n \n-LIST_HEAD(,mpegts_listener) mpegts_listeners;\n+extern LIST_HEAD(mpegts_listeners, mpegts_listener) mpegts_listeners;\n \n #define mpegts_add_listener(ml)\\\n   LIST_INSERT_HEAD(&mpegts_listeners, ml, ml_link)\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/patches/tvheadend42-05-webui-query-url-fix.patch",
    "content": "Fix query urls for imdb.com and thetvdb.com\nBased on tvheadend master branch\nhttps://github.com/tvheadend/tvheadend/commit/d8a31e57a492be6628b685488fcc7f1d9d262679\nhttps://github.com/tvheadend/tvheadend/commit/ce09077056f9c6558c188d135cec3be85cc9c200\n\n--- a/src/webui/static/app/epg.js\n+++ b/src/webui/static/app/epg.js\n@@ -287,13 +287,11 @@ tvheadend.epgDetails = function(event) {\n     win.show();\n \n     function searchIMDB() {\n-        window.open('http://akas.imdb.com/find?q=' +\n-                    encodeURIComponent(event.title), '_blank');\n+        window.open('https://www.imdb.com/find?q=' + encodeURIComponent(event.title), '_blank');\n     }\n \n     function searchTheTVDB(){\n-        window.open('http://thetvdb.com/?string='+\n-                    encodeURIComponent(event.title)+'&searchseriesid=&tab=listseries&function=Search','_blank');\n+        window.open('https://www.thetvdb.com/search?query=' + encodeURIComponent(event.title), '_blank');\n     }\n \n     function playProgram() {\n\n--- a/src/webui/static/app/dvr.js\n+++ b/src/webui/static/app/dvr.js\n@@ -87,13 +87,11 @@ tvheadend.dvrDetails = function(uuid) {\n         }));\n \n         function searchIMDB() {\n-            window.open('http://akas.imdb.com/find?q=' +\n-                        encodeURIComponent(title), '_blank');\n+            window.open('https://www.imdb.com/find?q=' + encodeURIComponent(title), '_blank');\n         }\n \n         function searchTheTVDB(){\n-            window.open('http://thetvdb.com/?string='+\n-                        encodeURIComponent(title)+'&searchseriesid=&tab=listseries&function=Search','_blank');\n+            window.open('https://www.thetvdb.com/search?query=' + encodeURIComponent(title),'_blank');\n         }\n \n         var win = new Ext.Window({\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/patches/tvheadend42-06-satip-upnp-fix.patch",
    "content": "From 1ebf9bf548540f935ff4ce1d380f5ce7849572f3 Mon Sep 17 00:00:00 2001\nFrom: Matthieu Poullet <matthieu.poullet@gmail.com>\nDate: Tue, 15 Mar 2022 10:40:44 +0100\nSubject: [PATCH] SAT>IP client: UPnP header field names are case insensitive\n\n- SAT>IP Protocol Specification 1.2.2: 3.3.2 Server Advertisements\n---\n src/input/mpegts/satip/satip.c | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/src/input/mpegts/satip/satip.c b/src/input/mpegts/satip/satip.c\nindex 4d522e19c4..58e91d30bb 100644\n--- a/src/input/mpegts/satip/satip.c\n+++ b/src/input/mpegts/satip/satip.c\n@@ -1175,19 +1175,19 @@ satip_discovery_service_received\n     if (ptr == NULL)\n       break;\n     if (http_tokenize(ptr, argv, 2, ':') == 2) {\n-      if (strcmp(argv[0], \"ST\") == 0)\n+      if (strcasecmp(argv[0], \"ST\") == 0)\n         st = argv[1];\n-      else if (strcmp(argv[0], \"LOCATION\") == 0)\n+      else if (strcasecmp(argv[0], \"LOCATION\") == 0)\n         location = argv[1];\n-      else if (strcmp(argv[0], \"SERVER\") == 0)\n+      else if (strcasecmp(argv[0], \"SERVER\") == 0)\n         server = argv[1];\n-      else if (strcmp(argv[0], \"BOOTID.UPNP.ORG\") == 0)\n+      else if (strcasecmp(argv[0], \"BOOTID.UPNP.ORG\") == 0)\n         bootid = argv[1];\n-      else if (strcmp(argv[0], \"CONFIGID.UPNP.ORG\") == 0)\n+      else if (strcasecmp(argv[0], \"CONFIGID.UPNP.ORG\") == 0)\n         configid = argv[1];\n-      else if (strcmp(argv[0], \"DEVICEID.SES.COM\") == 0)\n+      else if (strcasecmp(argv[0], \"DEVICEID.SES.COM\") == 0)\n         deviceid = argv[1];\n-      else if (strcmp(argv[0], \"USN\") == 0) {\n+      else if (strcasecmp(argv[0], \"USN\") == 0) {\n         n = http_tokenize(argv[1], argv, ARRAY_SIZE(argv), ':');\n         for (i = 0; i < n-1; i++)\n           if (argv[i] && strcmp(argv[i], \"uuid\") == 0) {\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/source/bin/tv_grab_file",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nif [ $# -lt 1 ]\nthen\n  . /etc/profile\n\n  ADDON_HOME=\"$HOME/.kodi/userdata/addon_data/service.tvheadend42\"\n  ADDON_SETTINGS=\"$ADDON_HOME/settings.xml\"\n  XML_SETTINGS_VER=\"$(xmlstarlet sel -t -m settings -v @version $ADDON_SETTINGS)\"\n  if [ \"$XML_SETTINGS_VER\" = \"2\" ]; then\n    XMLTV_TYPE=\"$(xmlstarlet sel -t -v '/settings/setting[@id=\"XMLTV_TYPE\"]' $ADDON_SETTINGS)\"\n    XMLTV_LOCATION_FILE=\"$(xmlstarlet sel -t -v '/settings/setting[@id=\"XMLTV_LOCATION_FILE\"]' $ADDON_SETTINGS)\"\n    XMLTV_LOCATION_WEB=\"$(xmlstarlet sel -t -v '/settings/setting[@id=\"XMLTV_LOCATION_WEB\"]' $ADDON_SETTINGS | xmlstarlet unesc)\"\n    XMLTV_LOCATION_SCRIPT=\"$(xmlstarlet sel -t -v '/settings/setting[@id=\"XMLTV_LOCATION_SCRIPT\"]' $ADDON_SETTINGS)\"\n  else\n    XMLTV_TYPE=\"$(xmlstarlet sel -t -m '/settings/setting[@id=\"XMLTV_TYPE\"]' -v @value $ADDON_SETTINGS)\"\n    XMLTV_LOCATION_FILE=\"$(xmlstarlet sel -t -m '/settings/setting[@id=\"XMLTV_LOCATION_FILE\"]' -v @value $ADDON_SETTINGS)\"\n    XMLTV_LOCATION_WEB=\"$(xmlstarlet sel -t -m '/settings/setting[@id=\"XMLTV_LOCATION_WEB\"]' -v @value $ADDON_SETTINGS | xmlstarlet unesc)\"\n    XMLTV_LOCATION_SCRIPT=\"$(xmlstarlet sel -t -m '/settings/setting[@id=\"XMLTV_LOCATION_SCRIPT\"]' -v @value $ADDON_SETTINGS)\"\n  fi\n\n  if [ \"$XMLTV_TYPE\" = \"FILE\" ]; then\n    case \"$XMLTV_LOCATION_FILE\" in\n    *.gz | *.bz2 | *.xz)\n        zcat \"$XMLTV_LOCATION_FILE\"\n        ;;\n    *)\n        cat \"$XMLTV_LOCATION_FILE\"\n        ;;\n    esac\n    exit 0\n  elif [ \"$XMLTV_TYPE\" = \"SCRIPT\" ]; then\n    if [ -e \"$XMLTV_LOCATION_SCRIPT\" ] ; then\n      exec \"$XMLTV_LOCATION_SCRIPT\"\n    fi\n  elif [ \"$XMLTV_TYPE\" = \"WEB\" ]; then\n    case \"$XMLTV_LOCATION_WEB\" in\n    *.gz | *.bz2 | *.xz)\n        wget -qO - \"$XMLTV_LOCATION_WEB\" | zcat\n        ;;\n    *)\n        wget -qO - \"$XMLTV_LOCATION_WEB\"\n        ;;\n    esac\n    exit 0\n  fi\nfi\n\ndflag=\nvflag=\ncflag=\n\nfor a in \"$@\"\ndo\n  [ \"$a\" = \"-d\" -o \"$a\" = \"--description\"  ] && dflag=1\n  [ \"$a\" = \"-v\" -o \"$a\" = \"--version\"      ] && vflag=1\n  [ \"$a\" = \"-c\" -o \"$a\" = \"--capabilities\" ] && cflag=1\ndone\n\nif [ -n \"$dflag\" ]\nthen\n  echo \"tv_grab_file is a simple grabber that can be configured through the addon settings from Kodi\"\nfi\n\nif [ -n \"$vflag\" ]\nthen\n  echo \"1.0\"\nfi\n\nif [ -n \"$cflag\" ]\nthen\n  echo \"baseline\"\nfi\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/source/bin/tvheadend42.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.tvheadend42\n\nADDON_SETTINGS=\"$ADDON_HOME/settings.xml\"\n\nCOMSKIP_DIR=\"$ADDON_HOME/comskip\"\nCOMSKIP_SETTINGS_FILE=\"$COMSKIP_DIR/comskip.ini\"\n\nDVR_SETTINGS_DIR=\"$ADDON_HOME/dvr/config\"\nDVR_SETTINGS_FILE=\"$DVR_SETTINGS_DIR/8d0f5b7ae354d956d7fe5db25f5d0d24\"\n\nEPGGRAB_SETTINGS_DIR=\"$ADDON_HOME/epggrab\"\nEPGGRAB_SETTINGS_FILE=\"$EPGGRAB_SETTINGS_DIR/config\"\n\nTIMESHIFT_SETTINGS_DIR=\"$ADDON_HOME/timeshift\"\nTIMESHIFT_SETTINGS_FILE=\"$TIMESHIFT_SETTINGS_DIR/config\"\n\nTVH_SETTINGS_DIR=\"$ADDON_HOME\"\nTVH_SETTINGS_FILE=\"$TVH_SETTINGS_DIR/config\"\n\nXMLTV_SETTINGS_DIR=\"$ADDON_HOME/xmltv\"\nXMLTV_SETTINGS_FILE=\"$XMLTV_SETTINGS_DIR/config\"\n\nTIMESHIFT_DIR=\"$ADDON_HOME/cache/timeshift\"\nXMLTV_FILE=\"$ADDON_DIR/bin/tv_grab_file\"\n\nchmod a+x $ADDON_DIR/bin/*\n\n# workaround to support old 4.1.x version upgrade for Tvh after 4.1.2369\nif [ -f \"$ADDON_HOME/dvr/config/dvr-config\" ]; then\n  rm $ADDON_HOME/dvr/config/dvr-config\nfi\n\n# workaround to create default Tvh directories without entering samba share\nif [ ! -d \"/storage/recordings\" ]; then\n  mkdir -p /storage/recordings /storage/picons/tvh /storage/picons/vdr\nfi\n\nif [ -f \"$ADDON_HOME/channel/config/config.tmp\" ]; then\n  rm $ADDON_HOME/channel/config/config.tmp\nfi\n\nif [ -f \"$ADDON_HOME/channel/config/tag.tmp\" ]; then\n  rm $ADDON_HOME/channel/config/tag.tmp\nfi\n\n# copy config files to userdata\nif [ ! -f \"$COMSKIP_SETTINGS_FILE\" ]; then\n  mkdir -p $COMSKIP_DIR\n  cp $ADDON_DIR/defaults/comskip/comskip.ini $COMSKIP_SETTINGS_FILE\nfi\n\nif [ ! -f \"$DVR_SETTINGS_FILE\" ]; then\n  mkdir -p $DVR_SETTINGS_DIR\n  cp $ADDON_DIR/defaults/dvr/config/8d0f5b7ae354d956d7fe5db25f5d0d24 $DVR_SETTINGS_FILE\nfi\n\nif [ ! -f \"$EPGGRAB_SETTINGS_FILE\" ]; then\n  mkdir -p $EPGGRAB_SETTINGS_DIR\n  cp $ADDON_DIR/defaults/epggrab/config $EPGGRAB_SETTINGS_FILE\nfi\n\nif [ ! -f \"$TIMESHIFT_SETTINGS_FILE\" ]; then\n  mkdir -p $TIMESHIFT_DIR\n  mkdir -p $TIMESHIFT_SETTINGS_DIR\n  cp $ADDON_DIR/defaults/timeshift/config $TIMESHIFT_SETTINGS_FILE\nfi\n\nif [ ! -f \"$TVH_SETTINGS_FILE\" ]; then\n  mkdir -p $TVH_SETTINGS_DIR\n  cp $ADDON_DIR/defaults/config $TVH_SETTINGS_FILE\nfi\n\nif [ ! -f \"$XMLTV_SETTINGS_FILE\" ]; then\n  mkdir -p $XMLTV_SETTINGS_DIR\n  cp $ADDON_DIR/defaults/xmltv/config $XMLTV_SETTINGS_FILE\nfi\n\n# delayed Tvh startup\nif [ \"$WORKAROUND_SLEEP\" == \"true\" ]; then\n  sleep $WORKAROUND_SLEEP_TIME\nfi\n\n# support FritzBox Sat>IP Server detection workaround for AVM-Repeater and AVM-6490\nif [ \"$AVM_SATIP_SERVER\" == \"true\" ]; then\n  if [ \"$AVM_DEVICE\" == \"AVM_Repeater\" ]; then\n    AVM_SATIP=\"--satip_xml http://${AVM_ROUTER_IP}:49000/satipdesc.xml\"\n  fi\n  if [ \"$AVM_DEVICE\" == \"AVM_6490\" ]; then\n    AVM_SATIP=\"--satip_xml http://${AVM_ROUTER_FAKE_IP}:49000/satipdesc.xml\"\n    AVM_NUM=\"4\"\n  fi\n\n  # add virtual ip as workaround for AVM limitation of one stream per ip\n  # AVM-Repeater (2 tuners)\n  ip address add ${AVM_IP1}/24 dev $AVM_ETH\n  ip address add ${AVM_IP2}/24 dev $AVM_ETH\n\n  # AVM-6490 (4 tuners)\n  if [ \"$AVM_NUM\" = \"4\" ]; then\n    ip address add ${AVM_IP3}/24 dev $AVM_ETH\n    ip address add ${AVM_IP4}/24 dev $AVM_ETH\n  fi\nfi\n\n# custom startup parameters\nif [ \"$CUSTOM_START\" != \"true\" ]; then\n  CUSTOM_ARGS=\"\"\nfi\n\n# debug value generation\nif [ \"$DEBUG_LOG_TRACE_1\" != \"NONE\" ]; then\n  DEBUG_LOG_ARG=\"$DEBUG_LOG_TRACE_1\"\nfi\n\nif [ \"$DEBUG_LOG_TRACE_2\" != \"NONE\" ]; then\n  DEBUG_LOG_ARG=\"$DEBUG_LOG_ARG,$DEBUG_LOG_TRACE_2\"\nfi\n\nif [ \"$DEBUG_LOG_TRACE_3\" != \"NONE\" ]; then\n  DEBUG_LOG_ARG=\"$DEBUG_LOG_ARG,$DEBUG_LOG_TRACE_3\"\nfi\n\nif [ \"$DEBUG_LOG_TRACE_4\" != \"NONE\" ]; then\n  DEBUG_LOG_ARG=\"$DEBUG_LOG_ARG,$DEBUG_LOG_TRACE_4\"\nfi\n\nif [ \"$DEBUG_LOG_TRACE_5\" != \"NONE\" ]; then\n  DEBUG_LOG_ARG=\"$DEBUG_LOG_ARG,$DEBUG_LOG_TRACE_5\"\nfi\n\n# if debuglog is activated and nothing selected to trace\nif [ -z \"$DEBUG_LOG_ARG\" ];then\n  DEBUG_LOG_ARG=\"all\"\nfi\n\n# rename debuglog if already exist to prevent overwriting after crash\nif [ -f \"${DEBUG_LOG_PATH}\" ]; then\n  cp ${DEBUG_LOG_PATH} ${DEBUG_LOG_PATH}_$(date '+%Y-%m-%d_%H.%M.%S').txt\nfi\n\n# debug commandline\nif [ \"$DEBUG_LOG\" = \"true\" ]; then\n  TVHEADEND_ARG=\"-B -C -u root -g video -c $ADDON_HOME $AVM_SATIP $CUSTOM_ARGS -l ${DEBUG_LOG_PATH} --trace $DEBUG_LOG_ARG\"\nelse\n  TVHEADEND_ARG=\"-B -C -u root -g video -c $ADDON_HOME $AVM_SATIP $CUSTOM_ARGS\"\nfi\n\n# start userspace DVB driver/addon\nfor driver_dvb in $(find /storage/.kodi/addons/driver.dvb.*/bin/userspace-driver.sh -type f 2>/dev/null); do\n  driver_dvb_name=$(echo $driver_dvb | awk 'BEGIN {FS=\"/\"} {printf(\"%s\", $5)}')\n  logger -t Tvheadend \"### Loading userspace DVB driver: $driver_dvb_name ###\"\n  # use \". \" because of variable export\n  . $driver_dvb\ndone\n\nif [ \"$WAIT_FOR_FEINIT\" == \"true\" ] ; then\n  while [ true ] ; do\n    if [ -e /dev/dvb/adapter$((NUM_ADAPTERS-1))/frontend0 ] ; then\n      break\n    fi\n    sleep 1\n  done\nfi\n\nif [ \"$PRELOAD_CAPMT_CA\" == \"true\" ] ; then\n  logger -t Tvheadend \"### Preloading capmt_ca.so library ###\"\n  LD_PRELOAD=\"$ADDON_DIR/bin/capmt_ca.so $LD_PRELOAD\" exec $ADDON_DIR/bin/tvheadend $TVHEADEND_ARG &>$ADDON_LOG_FILE\nelse\n  exec $ADDON_DIR/bin/tvheadend $TVHEADEND_ARG &>$ADDON_LOG_FILE\nfi\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\n\nclass Monitor(xbmc.Monitor):\n\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == \"__main__\":\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/source/defaults/comskip/comskip.ini",
    "content": "; See comskip.txt in the distribution zip file for many settable parameters, read manual.html, tuning.html and debugwindow.html for how to tune and debug comskip\r\nedl_mode=3                              ; the mode specified in the generated edl file, 0=cut, 3=commercial break\r\nmkv_time_offset=30.0                    ; offset in seconds, to work around what appears to be an Kodi or ffmpeg bug\r\nalways_keep_first_seconds=2             ; Kodi has a bug that causes a segfault if we don't keep the start of the stream, I'll fix that when I get a chance\r\n\r\ndetect_method=43                        ; 1=black frame, 2=logo, 4=scene change, 8=fuzzy logic, 16=closed captions, 32=aspect ration, 64=silence, 128=cutscenes, 255=all\r\nvalidate_silence=1                      ; Default, set to 0 to force using this clues if selected above.\r\nvalidate_uniform=1                      ; Default, set to 0 to force using this clues (like pure white frames) if blackframe is selected above.\r\nvalidate_scenechange=1                  ; Default, set to 0 to force using this clues if selected above.\r\nverbose=10                              ; show a lot of extra info, level 5 is also OK, set to 0 to disable\r\nmax_brightness=60                       ; frame not black if any pixels checked are greater than this (scale 0 to 255)\r\ntest_brightness=40                      ; frame not pure black if any pixels checked are greater than this, will check average brightness (scale 0 to 255)\r\nmax_avg_brightness=25                   ; maximum average brightness for a dim frame to be considered black (scale 0 to 255) 0 means autosetting\r\nmax_commercialbreak=600                 ; maximum length in seconds to consider a segment a commercial break\r\nmin_commercialbreak=25                  ; minimum length in seconds to consider a segment a commercial break\r\nmax_commercial_size=125                 ; maximum time in seconds for a single commercial or multiple commercials if no breaks in between\r\nmin_commercial_size=4                   ; mimimum time in seconds for a single commercial\r\nmin_show_segment_length=250             ; any segment longer than this will be scored towards show.\r\nnon_uniformity=500                      ; Set to 0 to disable cutpoints based on uniform frames\r\nmax_volume=500                          ; any frame with sound volume larger than this will not be regarded as black frame\r\nmin_silence=12                          ; Any deep silence longer than this amount  of frames is a possible cutpoint\r\nticker_tape=0                           ; Amount of pixels from bottom to ignore in all processing \r\nlogo_at_bottom=0                        ; Set to 1 to search only for logo at the lower half of the video, do not combine with subtitle setting\r\npunish=0                                ; Compare to average for sum of 1=brightness, 2=uniform 4=volume, 8=silence, 16=schange, set to 0 to disable\r\npunish_threshold=1.3                    ; Multiply when amount is above average * punish_threshold\r\npunish_modifier=2                       ; When above average * threshold multiply score by this value\r\nintelligent_brightness=0                ; Set to 1 to use a USA specific algorithm to tune some of the settings, not adviced outside the USA\r\nlogo_percentile=0.92                    ; if more then this amount of logo is found then logo detection will be disabled\r\nlogo_threshold=0.75\r\npunish_no_logo=1                        ; Default, set to 0 to avoid show segments without logo to be scored towards commercial\r\naggressive_logo_rejection=0\r\nconnect_blocks_with_logo=1              ; set to 1 if you want successive blocks with logo on the transition to be regarded as connected, set to 0 to disable\r\nlogo_filter=0                           ; set the size of the filter to apply to bad logo detection, 4 seems to be a good value.\r\ncut_on_ar_change=1                      ; set to 1 if you want to cut also on aspect ratio changes when logo is present, set to 2 to force cuts on aspect ratio changes. set to 0 to disable\r\ndelete_show_after_last_commercial=0     ; set to 1 if you want to delete the last block if its a show and after a commercial\r\ndelete_show_before_or_after_current=0   ; set to 1 if you want to delete the previous and the next show in the recording, this can lead to the deletion of trailers of next show\r\ndelete_block_after_commercial=0         ; set to max size of block in seconds to be discarded, set to 0 to disable \r\nremove_before=0                         ; amount of seconds of show to be removed before ALL commercials\r\nremove_after=0                          ; amount of seconds of show to be removed after ALL commercials\r\nshrink_logo=5                           ; Reduce the duration of the logo with this amount of seconds\r\nafter_logo=0                            ; set to number of seconds after logo disappears comskip should start to search for silence to insert an additional cutpoint\r\npadding=0\r\nms_audio_delay=5\r\nvolume_slip=40\r\nskip_b_frames=0                         ; Set to 1 to force Comskip to skip frames for higher processing speed.\r\nhardware_decode=0                       ; Set to 1 to enable hardware accelerated video decoding, only available in donator version\r\nmax_repair_size=200                     ; Will repair maximum 200 missing MPEG frames in the timeline, set to 0 to disable repairing for players that don't use PTS. \r\ndisable_heuristics=4                    ; bit pattern for disabling heuristics, adding 1 disables heristics 1, adding 2 disables heristics 2, adding 4 disables heristics 3, 255  disables all heuristics \r\ndelete_logo_file=0                      ; set to 1 if you want comskip to tidy up after finishing\r\noutput_framearray=0                     ; create a big excel file for detailed analysis, set to 0 to disable\r\noutput_data=0                           ; create a dump of the user data channel, used for CC and XDS (such as V-Chip info). Can be use together with output_framearray to remote debug CC decoding\r\noutput_videoredo=0                      ; The old videoredo format\r\noutput_videoredo3=0                     ; The new videoredo v3 format.\r\noutput_womble=0\r\noutput_mls=0                            ; set to 1 if you want MPeg Video Wizard bookmark file output\r\noutput_cuttermaran=0\r\noutput_mpeg2schnitt=0\r\noutput_mpgtx=0\r\noutput_dvrcut=0\r\noutput_zoomplayer_chapter=0\r\noutput_zoomplayer_cutlist=0\r\noutput_edl=1\r\noutput_dvrmstb=0                        ; Set to 1 if you're running DVRMS-Toolbox\r\noutput_edlx=0\r\noutput_vcf=0\r\noutput_bsplayer=0\r\noutput_btv=0                            ; set to 1 if you want Beyond TV chapter cutlist output\r\noutput_projectx=0                       ; set to 1 if you want ProjectX cutlist output (Xcl)\r\noutput_avisynth=0\r\noutput_vdr=1                            ; set to 1 if you want Kodi to skipping commercials\r\noutput_demux=0                          ; set to 1 if you want comskip to demux the mpeg file while scanning\r\nsage_framenumber_bug=0\r\nsage_minute_bug=0\r\nlive_tv=0                               ; set to 1 if you use parallelprocessing and need the output while recording\r\nlive_tv_retries=4                       ; change to 16 when using live_tv in BTV, used for mpeg PS and TS\r\ndvrms_live_tv_retries=300               ; only used for dvr_ms\r\nstandoff=0                              ; change to 8000000 when using live_tv in BTV\r\n\r\ncuttermaran_options=\"cut=\\\"true\\\" unattended=\\\"true\\\" muxResult=\\\"false\\\" snapToCutPoints=\\\"true\\\" closeApp=\\\"true\\\"\"\r\nmpeg2schnitt_options=\"mpeg2schnitt.exe /S /E /R25  /Z %2 %1\"\r\navisynth_options=\"LoadPlugin(\\\"MPEG2Dec3.dll\\\") \\nMPEG2Source(\\\"%s\\\")\\n\"\r\ndvrcut_options=\"dvrcut \\\"%s.dvr-ms\\\" \\\"%s_clean.dvr-ms\\\" \"\r\nwindowtitle=\"Comskip - %s\""
  },
  {
    "path": "packages/addons/service/tvheadend42/source/defaults/config",
    "content": "{\n\t\"wizard\": \"hello\",\n\t\"uilevel\": 1,\n\t\"uilevel_nochange\": true,\n\t\"ui_quicktips\": true,\n\t\"cookie_expires\": 14,\n\t\"caclient_ui\": true,\n\t\"epg_compress\": true,\n\t\"prefer_picon\": true,\n\t\"chiconpath\": \"file:///storage/picons/tvh/%C.png\",\n\t\"chiconscheme\": 2,\n\t\"piconpath\": \"file:///storage/picons/vdr/\",\n\t\"piconscheme\": 1\n}\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/source/defaults/dvr/config/8d0f5b7ae354d956d7fe5db25f5d0d24",
    "content": "{\n\t\"storage\": \"/storage/recordings\",\n\t\"retention-days\": 2147483646,\n\t\"removal-days\": 2147483647,\n\t\"pre-extra-time\": 0,\n\t\"post-extra-time\": 0,\n\t\"day-dir\": false,\n\t\"channel-dir\": false,\n\t\"channel-in-title\": true,\n\t\"date-in-title\": true,\n\t\"time-in-title\": true,\n\t\"whitespace-in-title\": false,\n\t\"title-dir\": true,\n\t\"episode-in-title\": true,\n\t\"tag-files\": true,\n\t\"windows-compatible-filenames\": true,\n\t\"charset\": \"UTF-8\"\n}\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/source/defaults/epggrab/config",
    "content": "{\n\t\"channel_rename\": true,\n\t\"channel_renumber\": false,\n\t\"channel_reicon\": false,\n\t\"epgdb_periodicsave\": 2,\n\t\"ota_initial\": true,\n\t\"modules\": {\n\t\t\"opentv-skyit\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"OpenTV: Sky Italia\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 2\n\t\t},\n\t\t\"opentv-skynz\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"OpenTV: Sky NZ\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 2\n\t\t},\n\t\t\"opentv-skyuk\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"OpenTV: Sky UK\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 2\n\t\t},\n\t\t\"opentv-ausat\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"OpenTV: Ausat\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 2\n\t\t},\n\t\t\"psip\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"PSIP: ATSC Grabber\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 1\n\t\t},\n\t\t\"Bulsatcom_39E\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"Bulsatcom: Bula 39E\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 5\n\t\t},\n\t\t\"viasat_baltic\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"VIASAT: Baltic\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 5\n\t\t},\n\t\t\"uk_freeview\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"UK: Freeview\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 5\n\t\t},\n\t\t\"uk_freesat\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"UK: Freesat\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 5\n\t\t},\n\t\t\"eit\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"EIT: DVB Grabber\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 1\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/source/defaults/timeshift/config",
    "content": "{\n\t\"enabled\": 0,\n\t\"ondemand\": 0,\n\t\"path\": \"/storage/.kodi/userdata/addon_data/service.tvheadend42/cache/timeshift\",\n\t\"unlimited_period\": 0,\n\t\"max_period\": 3600,\n\t\"unlimited_size\": 0,\n\t\"max_size\": 3072\n}\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/source/defaults/xmltv/config",
    "content": "{\n\t\"grabbers\": [\n\t\t{\n\t\t\t\"path\": \"/storage/.kodi/addons/service.tvheadend42/bin/tv_grab_file\",\n\t\t\t\"description\": \"tv_grag_file is a simple grabber that just read the ~/.xmltv/tv_grab_file.xmltv file\",\n\t\t\t\"version\": \"0.1\\n\",\n\t\t\t\"mtime\": 1318774706,\n\t\t\t\"capabilities\": 1\n\t\t}\n\t],\n\t\"grab-interval\": 12,\n\t\"grab-enabled\": 1,\n\t\"current-grabber\": \"/storage/.kodi/addons/service.tvheadend42/bin/tv_grab_file\"\n}\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/source/download.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\r\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\r\n\r\nimport urllib.request, urllib.parse, urllib.error, os, zipfile\r\nfrom urllib.error import URLError\r\nimport xbmc, xbmcvfs, xbmcgui, xbmcaddon\r\nimport shutil\r\nimport sys\r\n\r\nurl = 'https://github.com/tvheadend/dtv-scan-tables/archive/tvheadend.zip'\r\ntemp = xbmcvfs.translatePath('special://temp')\r\ntemp_folder = os.path.join(temp, 'dtv-scan-tables-tvheadend')\r\ndest_folder = os.path.join(xbmcvfs.translatePath(xbmcaddon.Addon().getAddonInfo('path')), 'dvb-scan')\r\narchive = os.path.join(temp, 'dtv_scantables.zip')\r\n\r\nADDON_NAME = xbmcaddon.Addon().getAddonInfo('name')\r\nLS = xbmcaddon.Addon().getLocalizedString\r\nSCANTABLES = ['atsc', 'channels-conf', 'dvb-c', 'dvb-s', 'dvb-t', 'isdb-t']\r\n\r\nclass DownLoader():\r\n\r\n    def __init__(self):\r\n        self.dp = xbmcgui.DialogProgressBG()\r\n\r\n    def download(self, url, dest):\r\n        try:\r\n            self.dp.create(ADDON_NAME, LS(30042))\r\n            urllib.request.urlretrieve(url, dest, reporthook=self._pbhook)\r\n            self.dp.close()\r\n            zip = zipfile.ZipFile(archive)\r\n            if zip.testzip() is not None: raise zipfile.BadZipfile\r\n\r\n            if os.path.exists(temp_folder): shutil.rmtree(temp_folder)\r\n            if os.path.exists(dest_folder): shutil.rmtree(dest_folder)\r\n\r\n            self.dp.create(ADDON_NAME, LS(30043))\r\n            for idx, folder in enumerate(SCANTABLES):\r\n                self._pbhook(idx, 1, len(SCANTABLES) - 1)\r\n                for z in zip.filelist:\r\n                    if folder in z.filename: zip.extract(z.filename, temp)\r\n\r\n            self.dp.close()\r\n            for folder in SCANTABLES:\r\n                shutil.copytree(os.path.join(temp_folder, folder), os.path.join(dest_folder, folder))\r\n\r\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30039), xbmcgui.NOTIFICATION_INFO)\r\n        except URLError as e:\r\n            xbmc.log('Could not download file: %s' % e.reason, xbmc.LOGERROR)\r\n            self.dp.close()\r\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30040), xbmcgui.NOTIFICATION_ERROR)\r\n        except zipfile.BadZipfile:\r\n            xbmc.log('Could not extract files from zip, bad zipfile', xbmc.LOGERROR)\r\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30041), xbmcgui.NOTIFICATION_ERROR)\r\n\r\n    def _pbhook(self, numblocks, blocksize, filesize):\r\n            percent = int((numblocks * blocksize * 100) / filesize)\r\n            self.dp.update(percent)\r\n\r\n\r\nif __name__ == '__main__':\r\n    try:\r\n        if sys.argv[1] == 'getscantables':\r\n            dl = DownLoader()\r\n            dl.download(url, archive)\r\n    except IndexError:\r\n        pass\r\n\r\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: tvheadend42\n# Addon id: service.tvheadend42\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"XMLTV\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"DVB\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"DEBUG\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"FRITZ!Box Sat>IP\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"XMLTV Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30005\"\nmsgid \"XMLTV source type\"\nmsgstr \"\"\n\nmsgctxt \"#30006\"\nmsgid \"XMLTV File location\"\nmsgstr \"\"\n\nmsgctxt \"#30007\"\nmsgid \"XMLTV Web location\"\nmsgstr \"\"\n\nmsgctxt \"#30008\"\nmsgid \"XMLTV Script location\"\nmsgstr \"\"\n\nmsgctxt \"#30009\"\nmsgid \"DVB Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30010\"\nmsgid \"Unload DVB modules before suspend\"\nmsgstr \"\"\n\nmsgctxt \"#30011\"\nmsgid \"Wait for frontend initialization\"\nmsgstr \"\"\n\nmsgctxt \"#30012\"\nmsgid \"Number of adapters to wait for\"\nmsgstr \"\"\n\nmsgctxt \"#30013\"\nmsgid \"Preload capmt_ca.so library\"\nmsgstr \"\"\n\nmsgctxt \"#30014\"\nmsgid \"Delay the start of Tvheadend\"\nmsgstr \"\"\n\nmsgctxt \"#30015\"\nmsgid \"Seconds delay\"\nmsgstr \"\"\n\nmsgctxt \"#30016\"\nmsgid \"Custom start parameter\"\nmsgstr \"\"\n\nmsgctxt \"#30017\"\nmsgid \"Parameter\"\nmsgstr \"\"\n\nmsgctxt \"#30018\"\nmsgid \"FRITZ!Box Sat>IP server\"\nmsgstr \"\"\n\nmsgctxt \"#30019\"\nmsgid \"AVM device\"\nmsgstr \"\"\n\nmsgctxt \"#30020\"\nmsgid \"IP of the AVM Repeater\"\nmsgstr \"\"\n\nmsgctxt \"#30021\"\nmsgid \"Router IP range (last digits are always .254)\"\nmsgstr \"\"\n\nmsgctxt \"#30022\"\nmsgid \"Used network\"\nmsgstr \"\"\n\nmsgctxt \"#30023\"\nmsgid \"Virtual IP #1\"\nmsgstr \"\"\n\nmsgctxt \"#30024\"\nmsgid \"Virtual IP #2\"\nmsgstr \"\"\n\nmsgctxt \"#30025\"\nmsgid \"Virtual IP #3\"\nmsgstr \"\"\n\nmsgctxt \"#30026\"\nmsgid \"Virtual IP #4\"\nmsgstr \"\"\n\nmsgctxt \"#30027\"\nmsgid \"TRACE Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30028\"\nmsgid \"Path\"\nmsgstr \"\"\n\nmsgctxt \"#30029\"\nmsgid \"Activate TRACE Debug\"\nmsgstr \"\"\n\nmsgctxt \"#30030\"\nmsgid \"Debug Value #1\"\nmsgstr \"\"\n\nmsgctxt \"#30031\"\nmsgid \"Debug Value #2\"\nmsgstr \"\"\n\nmsgctxt \"#30032\"\nmsgid \"Debug Value #3\"\nmsgstr \"\"\n\nmsgctxt \"#30033\"\nmsgid \"Debug Value #4\"\nmsgstr \"\"\n\nmsgctxt \"#30034\"\nmsgid \"Debug Value #5\"\nmsgstr \"\"\n\nmsgctxt \"#30035\"\nmsgid \"FRITZ!Box Configuration for FRITZ!OS 6.x (do not use for 7.x)\"\nmsgstr \"\"\n\nmsgctxt \"#30036\"\nmsgid \"Scan Tables\"\nmsgstr \"\"\n\nmsgctxt \"#30037\"\nmsgid \"Manage Scan-Tables\"\nmsgstr \"\"\n\nmsgctxt \"#30038\"\nmsgid \"Download and install Scan-Tables\"\nmsgstr \"\"\n\nmsgctxt \"#30039\"\nmsgid \"Download completed, tables installed\"\nmsgstr \"\"\n\nmsgctxt \"#30040\"\nmsgid \"Could not download Scan-Tables\"\nmsgstr \"\"\n\nmsgctxt \"#30041\"\nmsgid \"Could not extract zip files\"\nmsgstr \"\"\n\nmsgctxt \"#30042\"\nmsgid \"Download Scan-Tables\"\nmsgstr \"\"\n\nmsgctxt \"#30043\"\nmsgid \"Extract Scan-Tables\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n  <!-- HTS TVHEADEND -->\n  <category label=\"30000\">\n    <setting label=\"30004\" type=\"lsep\"/>\n    <setting type=\"sep\" />\n    <setting id=\"XMLTV_TYPE\" type=\"labelenum\" label=\"30005\" values=\"NONE|FILE|SCRIPT|WEB\" sort=\"yes\" default=\"NONE\"/>\n    <setting id=\"XMLTV_LOCATION_FILE\" type=\"file\" label=\"30006\" default=\"\" enable=\"eq(-1,0)\"/>\n    <setting id=\"XMLTV_LOCATION_WEB\" type=\"text\" label=\"30007\" default=\"http://\" enable=\"eq(-2,3)\"/>\n    <setting id=\"XMLTV_LOCATION_SCRIPT\" type=\"file\" label=\"30008\" default=\"\" enable=\"eq(-3,2)\"/>\n  </category>\n  <category label=\"30001\">\n    <setting label=\"30009\" type=\"lsep\"/>\n    <setting type=\"sep\" />\n    <setting id=\"WAIT_FOR_FEINIT\" type=\"bool\" label=\"30011\" default=\"false\" />\n    <setting id=\"NUM_ADAPTERS\" type=\"slider\" range=\"1,16\" option=\"int\" label=\"30012\" default=\"1\" enable=\"eq(-1,true)\" />\n    <setting id=\"REMOVE_MODULES\" type=\"text\" label=\"30010\" values=\"\" default=\"\"/>\n    <setting id=\"PRELOAD_CAPMT_CA\" type=\"bool\" label=\"30013\" default=\"false\" />\n    <setting id=\"WORKAROUND_SLEEP\" type=\"bool\" label=\"30014\" default=\"false\" />\n    <setting id=\"WORKAROUND_SLEEP_TIME\" type=\"slider\" range=\"1,30\" option=\"int\" label=\"30015\" default=\"1\" enable=\"eq(-1,true)\" />\n  </category>\n  <category label=\"30002\">\n    <setting label=\"30027\" type=\"lsep\"/>\n    <setting type=\"sep\" />\n    <setting id=\"DEBUG_LOG\" type=\"bool\" label=\"30029\" default=\"false\" />\n    <setting type=\"sep\" />\n    <setting id=\"DEBUG_LOG_PATH\" type=\"text\" label=\"30028\" default=\"/storage/.kodi/userdata/addon_data/service.tvheadend42/debug.txt\" enable=\"eq(-2,true)\"/>\n    <setting id=\"DEBUG_LOG_TRACE_1\" type=\"select\" default=\"NONE\" visible=\"eq(-3,true)\" enable=\"eq(-3,true)\" label=\"30030\" values=\"NONE|all|access|api|avahi|bat|bonjour|bouquet|caclient|capmt|channel|charset|config|CPU|cron|csa|cwc|dbus|descrambler|diseqc|dvb|dvbcam|dvr|epg|epgdb|epggrab|esfilter|fastscan|fsmonitor|globalheaders|gtimer|hevc|htsp|htsp-ans|htsp-req|htsp-sub|http|httpc|idnode|imagecache|iptv|iptv-pcr|libav|linuxdvb|lock|main|mkv|mpegts|mtimer|muxer|muxsched|opentv|parser|pass|pat|pmt|profile|psip|pyepg|rtsp|satip|satips|scanfile|service|service-mapper|settings|spawn|subscription|tbl|tbl-atsc|tbl-base|tbl-csa|tbl-eit|tbl-pass|tbl-satip|tbl-time|tcp|thread|time|timeshift|transcode|TS|tsfile|tsfix|tvhdhomerun|tvhpoll|upnp|url|uuid|webui|xmltv\" />\n    <setting id=\"DEBUG_LOG_TRACE_2\" type=\"select\" default=\"NONE\" visible=\"eq(-4,true)\" enable=\"!eq(-1,NONE)+eq(-4,true)\" label=\"30031\" values=\"NONE|access|api|avahi|bat|bonjour|bouquet|caclient|capmt|channel|charset|config|CPU|cron|csa|cwc|dbus|descrambler|diseqc|dvb|dvbcam|dvr|epg|epgdb|epggrab|esfilter|fastscan|fsmonitor|globalheaders|gtimer|hevc|htsp|htsp-ans|htsp-req|htsp-sub|http|httpc|idnode|imagecache|iptv|iptv-pcr|libav|linuxdvb|lock|main|mkv|mpegts|mtimer|muxer|muxsched|opentv|parser|pass|pat|pmt|profile|psip|pyepg|rtsp|satip|satips|scanfile|service|service-mapper|settings|spawn|subscription|tbl|tbl-atsc|tbl-base|tbl-csa|tbl-eit|tbl-pass|tbl-satip|tbl-time|tcp|thread|time|timeshift|transcode|TS|tsfile|tsfix|tvhdhomerun|tvhpoll|upnp|url|uuid|webui|xmltv\" />\n    <setting id=\"DEBUG_LOG_TRACE_3\" type=\"select\" default=\"NONE\" visible=\"eq(-5,true)\" enable=\"!eq(-1,NONE)+!eq(-2,NONE)+eq(-5,true)\" label=\"30032\" values=\"NONE|access|api|avahi|bat|bonjour|bouquet|caclient|capmt|channel|charset|config|CPU|cron|csa|cwc|dbus|descrambler|diseqc|dvb|dvbcam|dvr|epg|epgdb|epggrab|esfilter|fastscan|fsmonitor|globalheaders|gtimer|hevc|htsp|htsp-ans|htsp-req|htsp-sub|http|httpc|idnode|imagecache|iptv|iptv-pcr|libav|linuxdvb|lock|main|mkv|mpegts|mtimer|muxer|muxsched|opentv|parser|pass|pat|pmt|profile|psip|pyepg|rtsp|satip|satips|scanfile|service|service-mapper|settings|spawn|subscription|tbl|tbl-atsc|tbl-base|tbl-csa|tbl-eit|tbl-pass|tbl-satip|tbl-time|tcp|thread|time|timeshift|transcode|TS|tsfile|tsfix|tvhdhomerun|tvhpoll|upnp|url|uuid|webui|xmltv\" />\n    <setting id=\"DEBUG_LOG_TRACE_4\" type=\"select\" default=\"NONE\" visible=\"eq(-6,true)\" enable=\"!eq(-1,NONE)+!eq(-2,NONE)+!eq(-3,NONE)+eq(-6,true)\" label=\"30033\" values=\"NONE|access|api|avahi|bat|bonjour|bouquet|caclient|capmt|channel|charset|config|CPU|cron|csa|cwc|dbus|descrambler|diseqc|dvb|dvbcam|dvr|epg|epgdb|epggrab|esfilter|fastscan|fsmonitor|globalheaders|gtimer|hevc|htsp|htsp-ans|htsp-req|htsp-sub|http|httpc|idnode|imagecache|iptv|iptv-pcr|libav|linuxdvb|lock|main|mkv|mpegts|mtimer|muxer|muxsched|opentv|parser|pass|pat|pmt|profile|psip|pyepg|rtsp|satip|satips|scanfile|service|service-mapper|settings|spawn|subscription|tbl|tbl-atsc|tbl-base|tbl-csa|tbl-eit|tbl-pass|tbl-satip|tbl-time|tcp|thread|time|timeshift|transcode|TS|tsfile|tsfix|tvhdhomerun|tvhpoll|upnp|url|uuid|webui|xmltv\" />\n    <setting id=\"DEBUG_LOG_TRACE_5\" type=\"select\" default=\"NONE\" visible=\"eq(-7,true)\" enable=\"!eq(-1,NONE)+!eq(-2,NONE)+!eq(-3,NONE)+!eq(-4,NONE)+eq(-7,true)\" label=\"30034\" values=\"NONE|access|api|avahi|bat|bonjour|bouquet|caclient|capmt|channel|charset|config|CPU|cron|csa|cwc|dbus|descrambler|diseqc|dvb|dvbcam|dvr|epg|epgdb|epggrab|esfilter|fastscan|fsmonitor|globalheaders|gtimer|hevc|htsp|htsp-ans|htsp-req|htsp-sub|http|httpc|idnode|imagecache|iptv|iptv-pcr|libav|linuxdvb|lock|main|mkv|mpegts|mtimer|muxer|muxsched|opentv|parser|pass|pat|pmt|profile|psip|pyepg|rtsp|satip|satips|scanfile|service|service-mapper|settings|spawn|subscription|tbl|tbl-atsc|tbl-base|tbl-csa|tbl-eit|tbl-pass|tbl-satip|tbl-time|tcp|thread|time|timeshift|transcode|TS|tsfile|tsfix|tvhdhomerun|tvhpoll|upnp|url|uuid|webui|xmltv\" />\n    <setting type=\"sep\" />\n    <setting id=\"CUSTOM_START\" type=\"bool\" label=\"30016\" default=\"false\" />\n    <setting id=\"CUSTOM_ARGS\" type=\"text\" label=\"30017\" default=\"\" enable=\"eq(-1,true)\" />\n  </category>\n  <category label=\"30003\">\n    <setting label=\"30035\" type=\"lsep\"/>\n    <setting type=\"sep\" />\n    <setting id=\"AVM_SATIP_SERVER\" type=\"bool\" label=\"30018\" default=\"false\"/>\n    <setting id=\"AVM_DEVICE\" type=\"labelenum\" label=\"30019\" values=\"AVM_Repeater|AVM_6490\" visible=\"eq(-1,true)\"/>\n    <setting id=\"AVM_ROUTER_IP\" type=\"ipaddress\" label=\"30020\" default=\"192.168.178.2\" visible=\"eq(-2,true)+eq(-1,0)\"/>\n    <setting id=\"AVM_ROUTER_FAKE_IP\" type=\"ipaddress\" label=\"30021\" default=\"192.168.178.254\" visible=\"eq(-3,true)+eq(-2,1)\"/>\n    <setting id=\"AVM_ETH\" type=\"labelenum\" label=\"30022\" default=\"eth0\" visible=\"eq(-4,true)\" values=\"eth0|wlan0|eth1|wlan1\" />\n    <setting type=\"sep\" visible=\"eq(-5,true)\"/>\n    <setting id=\"AVM_IP1\" type=\"ipaddress\" label=\"30023\" default=\"192.168.178.201\" visible=\"eq(-6,true)\"/>\n    <setting id=\"AVM_IP2\" type=\"ipaddress\" label=\"30024\" default=\"192.168.178.202\" visible=\"eq(-7,true)\"/>\n    <setting id=\"AVM_IP3\" type=\"ipaddress\" label=\"30025\" default=\"192.168.178.203\" visible=\"eq(-8,true)+eq(-7,1)\"/>\n    <setting id=\"AVM_IP4\" type=\"ipaddress\" label=\"30026\" default=\"192.168.178.204\" visible=\"eq(-9,true)+eq(-8,1)\"/>\n  </category>\n  <category label=\"30036\">\n    <setting label=\"30037\" type=\"lsep\"/>\n    <setting id=\"DOWNLOAD_SCAN_TABLES\" type=\"action\" label=\"30038\" option=\"close\" action=\"RunScript(service.tvheadend42,getscantables)\"/>\n  </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"AVM_DEVICE\" default=\"true\"></setting>\n    <setting id=\"AVM_ETH\" default=\"true\">eth0</setting>\n    <setting id=\"AVM_IP1\" default=\"true\">192.168.178.201</setting>\n    <setting id=\"AVM_IP2\" default=\"true\">192.168.178.202</setting>\n    <setting id=\"AVM_IP3\" default=\"true\">192.168.178.203</setting>\n    <setting id=\"AVM_IP4\" default=\"true\">192.168.178.204</setting>\n    <setting id=\"AVM_ROUTER_FAKE_IP\" default=\"true\">192.168.178.254</setting>\n    <setting id=\"AVM_ROUTER_IP\" default=\"true\">192.168.178.2</setting>\n    <setting id=\"AVM_SATIP_SERVER\" default=\"true\">false</setting>\n    <setting id=\"CUSTOM_ARGS\" default=\"true\"></setting>\n    <setting id=\"CUSTOM_START\" default=\"true\">false</setting>\n    <setting id=\"DEBUG_LOG\" default=\"true\">false</setting>\n    <setting id=\"DEBUG_LOG_PATH\" default=\"true\">/storage/.kodi/userdata/addon_data/service.tvheadend42/debug.txt</setting>\n    <setting id=\"DEBUG_LOG_TRACE_1\" default=\"true\">NONE</setting>\n    <setting id=\"DEBUG_LOG_TRACE_2\" default=\"true\">NONE</setting>\n    <setting id=\"DEBUG_LOG_TRACE_3\" default=\"true\">NONE</setting>\n    <setting id=\"DEBUG_LOG_TRACE_4\" default=\"true\">NONE</setting>\n    <setting id=\"DEBUG_LOG_TRACE_5\" default=\"true\">NONE</setting>\n    <setting id=\"DOWNLOAD_SCAN_TABLES\" default=\"true\"></setting>\n    <setting id=\"NUM_ADAPTERS\">1</setting>\n    <setting id=\"PRELOAD_CAPMT_CA\" default=\"true\">false</setting>\n    <setting id=\"REMOVE_MODULES\" default=\"true\"></setting>\n    <setting id=\"WAIT_FOR_FEINIT\" default=\"true\">false</setting>\n    <setting id=\"WORKAROUND_SLEEP\" default=\"true\">false</setting>\n    <setting id=\"WORKAROUND_SLEEP_TIME\">1</setting>\n    <setting id=\"XMLTV_LOCATION_FILE\" default=\"true\"></setting>\n    <setting id=\"XMLTV_LOCATION_SCRIPT\" default=\"true\"></setting>\n    <setting id=\"XMLTV_LOCATION_WEB\" default=\"true\">http://</setting>\n    <setting id=\"XMLTV_TYPE\" default=\"true\">NONE</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/source/sleep.d/tvheadend.power",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.tvheadend42\n\nSERVICE=\"service.tvheadend42\"\n\ncase \"$1\" in\n  pre)\n    if systemctl is-active \"$SERVICE\" &>/dev/null ; then\n      systemctl stop \"$SERVICE\"\n      for module in $REMOVE_MODULES ; do\n        rmmod $module\n      done\n    fi\n    ;;\n  post)\n    if systemctl is-enabled \"$SERVICE\" &>/dev/null ; then\n      for module in $REMOVE_MODULES ; do\n        modprobe $module\n      done\n      systemctl start \"$SERVICE\"\n    fi\n    ;;\nesac\n"
  },
  {
    "path": "packages/addons/service/tvheadend42/source/system.d/service.tvheadend42.service",
    "content": "[Unit]\nDescription=TVHeadend42 Service\nAfter=network-online.service\n\n[Service]\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.tvheadend42/bin/tvheadend42.start\"\nTimeoutStopSec=2\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/addon.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"@PKG_ADDON_ID@\"\n       name=\"@ADDON_NAME@\"\n       version=\"@ADDON_VERSION@\"\n       provider-name=\"@PROVIDER_NAME@\">\n  <requires>\n    <import addon=\"xbmc.python\" version=\"3.0.0\"/>\n@REQUIRES@\n  </requires>\n  <extension point=\"xbmc.service\" library=\"default.py\">\n    <provides>@PKG_ADDON_PROVIDES@</provides>\n  </extension>\n  <extension point=\"xbmc.python.script\" library=\"download.py\">\n    <provides>@PKG_ADDON_PROVIDES@</provides>\n  </extension>\n  <extension point=\"xbmc.addon.metadata\">\n    <summary>@PKG_SHORTDESC@</summary>\n    <description>\n@PKG_LONGDESC@\n    </description>\n    <disclaimer>\n@PKG_DISCLAIMER@\n    </disclaimer>\n    <platform>all</platform>\n    <news>\n@PKG_ADDON_NEWS@\n    </news>\n    <assets>\n      <icon>resources/icon.png</icon>\n      <fanart>resources/fanart.png</fanart>\n@PKG_ADDON_SCREENSHOT@\n    </assets>\n  </extension>\n</addon>\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tvheadend43\"\nPKG_VERSION=\"905b4f0d0387818cbbf7012bf4dffb25e9893748\"\nPKG_SHA256=\"3decc29681e7eefac7a734116078b6f36fa125d81c8b9c9998b96070fcbe53a0\"\nPKG_VERSION_NUMBER=\"4.3-2091\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.tvheadend.org\"\nPKG_URL=\"https://github.com/tvheadend/tvheadend/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain avahi comskip curl dvb-apps ffmpegx libdvbcsa libhdhomerun \\\n                    libiconv openssl pcre2 pngquant:host Python3:host tvh-dtv-scan-tables\"\nPKG_DEPENDS_CONFIG=\"ffmpegx\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Tvheadend: a TV streaming server for Linux\"\nPKG_LONGDESC=\"Tvheadend (${PKG_VERSION_NUMBER}): is a TV streaming server for Linux supporting DVB-S/S2, DVB-C, DVB-T/T2, IPTV, SAT>IP, ATSC and ISDB-T\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Tvheadend Server 4.3 (Alpha)\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\n# basic transcoding options\nPKG_TVH_TRANSCODING=\"\\\n  --disable-ffmpeg_static \\\n  --disable-libfdkaac_static \\\n  --disable-libopus_static \\\n  --disable-libtheora \\\n  --disable-libtheora_static \\\n  --disable-libvorbis_static \\\n  --disable-libvpx_static \\\n  --disable-libx264_static \\\n  --disable-libx265_static \\\n  --enable-libav \\\n  --enable-libfdkaac \\\n  --enable-libopus \\\n  --enable-libvorbis \\\n  --enable-libx264\"\n\n# hw specific transcoding options\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  PKG_DEPENDS_TARGET+=\" libva\"\n  # specific transcoding options\n  PKG_TVH_TRANSCODING=\"${PKG_TVH_TRANSCODING} \\\n    --enable-vaapi \\\n    --enable-libvpx \\\n    --enable-libx265\"\nelse\n  # for != \"x86_64\" targets\n  # specific transcoding options\n  PKG_TVH_TRANSCODING=\"${PKG_TVH_TRANSCODING} \\\n    --disable-libvpx \\\n    --disable-libx265\"\nfi\n\npost_unpack() {\n  sed -e 's/VER=\"0.0.0~unknown\"/VER=\"'${PKG_VERSION_NUMBER}' ~ LibreELEC Tvh-addon v'${ADDON_VERSION}'.'${PKG_REV}'\"/g' -i ${PKG_BUILD}/support/version\n  sed -e 's|'/usr/bin/pngquant'|'${TOOLCHAIN}/bin/pngquant'|g' -i ${PKG_BUILD}/support/mkbundle\n}\n\npre_configure_target() {\n  PKG_CONFIGURE_OPTS_TARGET=\"--prefix=/usr \\\n                             --arch=${TARGET_ARCH} \\\n                             --cpu=${TARGET_CPU} \\\n                             --cc=${CC} \\\n                             ${PKG_TVH_TRANSCODING} \\\n                             --enable-avahi \\\n                             --enable-bundle \\\n                             --disable-dbus_1 \\\n                             --enable-dvbcsa \\\n                             --disable-dvben50221 \\\n                             --disable-dvbscan \\\n                             --enable-hdhomerun_client \\\n                             --disable-hdhomerun_static \\\n                             --enable-epoll \\\n                             --enable-inotify \\\n                             --enable-pngquant \\\n                             --disable-libmfx_static \\\n                             --disable-nvenc \\\n                             --disable-uriparser \\\n                             --enable-tvhcsa \\\n                             --enable-trace \\\n                             --nowerror \\\n                             --disable-bintray_cache \\\n                             --python=${TOOLCHAIN}/bin/python\"\n\n# fails to build in subdirs\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n\n# pass ffmpegx to build\n  CFLAGS+=\" -I$(get_install_dir ffmpegx)/usr/local/include\"\n  LDFLAGS+=\" -L$(get_install_dir ffmpegx)/usr/local/lib\"\n\n# pass libhdhomerun to build\n  CFLAGS+=\" -I${SYSROOT_PREFIX}/usr/include/hdhomerun\"\n\n  export CROSS_COMPILE=\"${TARGET_PREFIX}\"\n  export CFLAGS+=\" -I${SYSROOT_PREFIX}/usr/include/iconv -L${SYSROOT_PREFIX}/usr/lib/iconv\"\n}\n\npost_make_target() {\n  ${CC} -O -fbuiltin -fomit-frame-pointer -fPIC -shared -o capmt_ca.so src/extra/capmt_ca.c -ldl\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib\n  cp -p capmt_ca.so ${INSTALL}/usr/lib\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/{bin,lib}\n\n  cp ${PKG_DIR}/addon.xml ${ADDON_BUILD}/${PKG_ADDON_ID}\n\n  # set only version (revision will be added by buildsystem)\n  sed -e \"s|@ADDON_VERSION@|${ADDON_VERSION}|g\" \\\n      -i ${ADDON_BUILD}/${PKG_ADDON_ID}/addon.xml\n\n  cp -P ${PKG_INSTALL}/usr/bin/tvheadend ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp -P ${PKG_INSTALL}/usr/lib/capmt_ca.so ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp -P $(get_install_dir comskip)/usr/bin/comskip ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n  if [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n    cp -P $(get_install_dir x265)/usr/lib/libx265.so.199 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n  fi\n\n  # dvb-scan files\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/dvb-scan\n  cp -r $(get_install_dir tvh-dtv-scan-tables)/usr/share/dvbv5/* \\\n        ${ADDON_BUILD}/${PKG_ADDON_ID}/dvb-scan\n}\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/patches/tvheadend43-01-dvb-scan-path.patch",
    "content": "--- a/src/input/mpegts/scanfile.c\n+++ b/src/input/mpegts/scanfile.c\n@@ -921,7 +921,7 @@ scanfile_init ( const char *muxconf_path\n #elif defined(PLATFORM_FREEBSD)\n     path = \"/usr/local/share/dtv-scan-tables\";\n #else\n-    path = \"/usr/share/dvb\";\n+    path = \"/storage/.kodi/addons/service.tvheadend43/dvb-scan\";\n #endif\n \n   if (!initialized) {\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/patches/tvheadend43-02-hdhomerun-includes.patch",
    "content": "fix libhdhomerun includes\n\n--- a/configure\n+++ b/configure\n@@ -419,7 +419,7 @@ if enabled hdhomerun_static; then\n else\n \n   if enabled_or_auto hdhomerun_client; then\n-    if check_cc_header 'libhdhomerun/hdhomerun' libhdhomerun; then\n+    if check_cc_header 'hdhomerun' libhdhomerun; then\n       enable  hdhomerun_client\n       LDFLAGS=\"$LDFLAGS -lhdhomerun\"\n     fi\n--- a/src/input/mpegts/tvhdhomerun/tvhdhomerun.c\n+++ b/src/input/mpegts/tvhdhomerun/tvhdhomerun.c\n@@ -17,7 +17,7 @@\n  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n  */\n \n-#include \"libhdhomerun/hdhomerun.h\"\n+#include \"hdhomerun.h\"\n \n #include \"tvheadend.h\"\n #include \"input.h\"\n--- a/src/input/mpegts/tvhdhomerun/tvhdhomerun_frontend.c\n+++ b/src/input/mpegts/tvhdhomerun/tvhdhomerun_frontend.c\n@@ -17,7 +17,7 @@\n  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n  */\n \n-#include \"libhdhomerun/hdhomerun.h\"\n+#include \"hdhomerun.h\"\n \n #include <fcntl.h>\n #include \"tvheadend.h\"\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/source/bin/tv_grab_file",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nif [ $# -lt 1 ]\nthen\n  . /etc/profile\n\n  ADDON_HOME=\"$HOME/.kodi/userdata/addon_data/service.tvheadend43\"\n  ADDON_SETTINGS=\"$ADDON_HOME/settings.xml\"\n  XML_SETTINGS_VER=\"$(xmlstarlet sel -t -m settings -v @version $ADDON_SETTINGS)\"\n  if [ \"$XML_SETTINGS_VER\" = \"2\" ]; then\n    XMLTV_TYPE=\"$(xmlstarlet sel -t -v '/settings/setting[@id=\"XMLTV_TYPE\"]' $ADDON_SETTINGS)\"\n    XMLTV_LOCATION_FILE=\"$(xmlstarlet sel -t -v '/settings/setting[@id=\"XMLTV_LOCATION_FILE\"]' $ADDON_SETTINGS)\"\n    XMLTV_LOCATION_WEB=\"$(xmlstarlet sel -t -v '/settings/setting[@id=\"XMLTV_LOCATION_WEB\"]' $ADDON_SETTINGS | xmlstarlet unesc)\"\n    XMLTV_LOCATION_SCRIPT=\"$(xmlstarlet sel -t -v '/settings/setting[@id=\"XMLTV_LOCATION_SCRIPT\"]' $ADDON_SETTINGS)\"\n  else\n    XMLTV_TYPE=\"$(xmlstarlet sel -t -m '/settings/setting[@id=\"XMLTV_TYPE\"]' -v @value $ADDON_SETTINGS)\"\n    XMLTV_LOCATION_FILE=\"$(xmlstarlet sel -t -m '/settings/setting[@id=\"XMLTV_LOCATION_FILE\"]' -v @value $ADDON_SETTINGS)\"\n    XMLTV_LOCATION_WEB=\"$(xmlstarlet sel -t -m '/settings/setting[@id=\"XMLTV_LOCATION_WEB\"]' -v @value $ADDON_SETTINGS | xmlstarlet unesc)\"\n    XMLTV_LOCATION_SCRIPT=\"$(xmlstarlet sel -t -m '/settings/setting[@id=\"XMLTV_LOCATION_SCRIPT\"]' -v @value $ADDON_SETTINGS)\"\n  fi\n\n  if [ \"$XMLTV_TYPE\" = \"FILE\" ]; then\n    case \"$XMLTV_LOCATION_FILE\" in\n    *.gz | *.bz2 | *.xz)\n        zcat \"$XMLTV_LOCATION_FILE\"\n        ;;\n    *)\n        cat \"$XMLTV_LOCATION_FILE\"\n        ;;\n    esac\n    exit 0\n  elif [ \"$XMLTV_TYPE\" = \"SCRIPT\" ]; then\n    if [ -e \"$XMLTV_LOCATION_SCRIPT\" ] ; then\n      exec \"$XMLTV_LOCATION_SCRIPT\"\n    fi\n  elif [ \"$XMLTV_TYPE\" = \"WEB\" ]; then\n    case \"$XMLTV_LOCATION_WEB\" in\n    *.gz | *.bz2 | *.xz)\n        wget -qO - \"$XMLTV_LOCATION_WEB\" | zcat\n        ;;\n    *)\n        wget -qO - \"$XMLTV_LOCATION_WEB\"\n        ;;\n    esac\n    exit 0\n  fi\nfi\n\ndflag=\nvflag=\ncflag=\n\nfor a in \"$@\"\ndo\n  [ \"$a\" = \"-d\" -o \"$a\" = \"--description\"  ] && dflag=1\n  [ \"$a\" = \"-v\" -o \"$a\" = \"--version\"      ] && vflag=1\n  [ \"$a\" = \"-c\" -o \"$a\" = \"--capabilities\" ] && cflag=1\ndone\n\nif [ -n \"$dflag\" ]\nthen\n  echo \"tv_grab_file is a simple grabber that can be configured through the addon settings from Kodi\"\nfi\n\nif [ -n \"$vflag\" ]\nthen\n  echo \"1.0\"\nfi\n\nif [ -n \"$cflag\" ]\nthen\n  echo \"baseline\"\nfi\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/source/bin/tvheadend43.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.tvheadend43\n\nADDON_SETTINGS=\"$ADDON_HOME/settings.xml\"\n\nCOMSKIP_DIR=\"$ADDON_HOME/comskip\"\nCOMSKIP_SETTINGS_FILE=\"$COMSKIP_DIR/comskip.ini\"\n\nDVR_SETTINGS_DIR=\"$ADDON_HOME/dvr/config\"\nDVR_SETTINGS_FILE=\"$DVR_SETTINGS_DIR/8d0f5b7ae354d956d7fe5db25f5d0d24\"\n\nEPGGRAB_SETTINGS_DIR=\"$ADDON_HOME/epggrab\"\nEPGGRAB_SETTINGS_FILE=\"$EPGGRAB_SETTINGS_DIR/config\"\n\nTIMESHIFT_SETTINGS_DIR=\"$ADDON_HOME/timeshift\"\nTIMESHIFT_SETTINGS_FILE=\"$TIMESHIFT_SETTINGS_DIR/config\"\n\nTVH_SETTINGS_DIR=\"$ADDON_HOME\"\nTVH_SETTINGS_FILE=\"$TVH_SETTINGS_DIR/config\"\n\nXMLTV_SETTINGS_DIR=\"$ADDON_HOME/xmltv\"\nXMLTV_SETTINGS_FILE=\"$XMLTV_SETTINGS_DIR/config\"\n\nTIMESHIFT_DIR=\"$ADDON_HOME/cache/timeshift\"\nXMLTV_FILE=\"$ADDON_DIR/bin/tv_grab_file\"\n\nchmod a+x $ADDON_DIR/bin/*\n\n# workaround to support old 4.1.x version upgrade for Tvh after 4.1.2369\nif [ -f \"$ADDON_HOME/dvr/config/dvr-config\" ]; then\n  rm $ADDON_HOME/dvr/config/dvr-config\nfi\n\n# workaround to create default Tvh directories without entering samba share\nif [ ! -d \"/storage/recordings\" ]; then\n  mkdir -p /storage/recordings /storage/picons/tvh /storage/picons/vdr\nfi\n\nif [ -f \"$ADDON_HOME/channel/config/config.tmp\" ]; then\n  rm $ADDON_HOME/channel/config/config.tmp\nfi\n\nif [ -f \"$ADDON_HOME/channel/config/tag.tmp\" ]; then\n  rm $ADDON_HOME/channel/config/tag.tmp\nfi\n\n# copy config files to userdata\nif [ ! -f \"$COMSKIP_SETTINGS_FILE\" ]; then\n  mkdir -p $COMSKIP_DIR\n  cp $ADDON_DIR/defaults/comskip/comskip.ini $COMSKIP_SETTINGS_FILE\nfi\n\nif [ ! -f \"$DVR_SETTINGS_FILE\" ]; then\n  mkdir -p $DVR_SETTINGS_DIR\n  cp $ADDON_DIR/defaults/dvr/config/8d0f5b7ae354d956d7fe5db25f5d0d24 $DVR_SETTINGS_FILE\nfi\n\nif [ ! -f \"$EPGGRAB_SETTINGS_FILE\" ]; then\n  mkdir -p $EPGGRAB_SETTINGS_DIR\n  cp $ADDON_DIR/defaults/epggrab/config $EPGGRAB_SETTINGS_FILE\nfi\n\nif [ ! -f \"$TIMESHIFT_SETTINGS_FILE\" ]; then\n  mkdir -p $TIMESHIFT_DIR\n  mkdir -p $TIMESHIFT_SETTINGS_DIR\n  cp $ADDON_DIR/defaults/timeshift/config $TIMESHIFT_SETTINGS_FILE\nfi\n\nif [ ! -f \"$TVH_SETTINGS_FILE\" ]; then\n  mkdir -p $TVH_SETTINGS_DIR\n  cp $ADDON_DIR/defaults/config $TVH_SETTINGS_FILE\nfi\n\nif [ ! -f \"$XMLTV_SETTINGS_FILE\" ]; then\n  mkdir -p $XMLTV_SETTINGS_DIR\n  cp $ADDON_DIR/defaults/xmltv/config $XMLTV_SETTINGS_FILE\nfi\n\n# delayed Tvh startup\nif [ \"$WORKAROUND_SLEEP\" == \"true\" ]; then\n  sleep $WORKAROUND_SLEEP_TIME\nfi\n\n# support FritzBox Sat>IP Server detection workaround for AVM-Repeater and AVM-6490\nif [ \"$AVM_SATIP_SERVER\" == \"true\" ]; then\n  if [ \"$AVM_DEVICE\" == \"AVM_Repeater\" ]; then\n    AVM_SATIP=\"--satip_xml http://${AVM_ROUTER_IP}:49000/satipdesc.xml\"\n  fi\n  if [ \"$AVM_DEVICE\" == \"AVM_6490\" ]; then\n    AVM_SATIP=\"--satip_xml http://${AVM_ROUTER_FAKE_IP}:49000/satipdesc.xml\"\n    AVM_NUM=\"4\"\n  fi\n\n  # add virtual ip as workaround for AVM limitation of one stream per ip\n  # AVM-Repeater (2 tuners)\n  ip address add ${AVM_IP1}/24 dev $AVM_ETH\n  ip address add ${AVM_IP2}/24 dev $AVM_ETH\n\n  # AVM-6490 (4 tuners)\n  if [ \"$AVM_NUM\" = \"4\" ]; then\n    ip address add ${AVM_IP3}/24 dev $AVM_ETH\n    ip address add ${AVM_IP4}/24 dev $AVM_ETH\n  fi\nfi\n\n# custom startup parameters\nif [ \"$CUSTOM_START\" != \"true\" ]; then\n  CUSTOM_ARGS=\"\"\nfi\n\n# debug value generation\nif [ \"$DEBUG_LOG_TRACE_1\" != \"NONE\" ]; then\n  DEBUG_LOG_ARG=\"$DEBUG_LOG_TRACE_1\"\nfi\n\nif [ \"$DEBUG_LOG_TRACE_2\" != \"NONE\" ]; then\n  DEBUG_LOG_ARG=\"$DEBUG_LOG_ARG,$DEBUG_LOG_TRACE_2\"\nfi\n\nif [ \"$DEBUG_LOG_TRACE_3\" != \"NONE\" ]; then\n  DEBUG_LOG_ARG=\"$DEBUG_LOG_ARG,$DEBUG_LOG_TRACE_3\"\nfi\n\nif [ \"$DEBUG_LOG_TRACE_4\" != \"NONE\" ]; then\n  DEBUG_LOG_ARG=\"$DEBUG_LOG_ARG,$DEBUG_LOG_TRACE_4\"\nfi\n\nif [ \"$DEBUG_LOG_TRACE_5\" != \"NONE\" ]; then\n  DEBUG_LOG_ARG=\"$DEBUG_LOG_ARG,$DEBUG_LOG_TRACE_5\"\nfi\n\n# if debuglog is activated and nothing selected to trace\nif [ -z \"$DEBUG_LOG_ARG\" ];then\n  DEBUG_LOG_ARG=\"all\"\nfi\n\n# rename debuglog if already exist to prevent overwriting after crash\nif [ -f \"${DEBUG_LOG_PATH}\" ]; then\n  cp ${DEBUG_LOG_PATH} ${DEBUG_LOG_PATH}_$(date '+%Y-%m-%d_%H.%M.%S').txt\nfi\n\n# debug commandline\nif [ \"$DEBUG_LOG\" = \"true\" ]; then\n  TVHEADEND_ARG=\"-B -C -u root -g video -c $ADDON_HOME $AVM_SATIP $CUSTOM_ARGS -l ${DEBUG_LOG_PATH} --trace $DEBUG_LOG_ARG\"\nelse\n  TVHEADEND_ARG=\"-B -C -u root -g video -c $ADDON_HOME $AVM_SATIP $CUSTOM_ARGS\"\nfi\n\n# start userspace DVB driver/addon\nfor driver_dvb in $(find /storage/.kodi/addons/driver.dvb.*/bin/userspace-driver.sh -type f 2>/dev/null); do\n  driver_dvb_name=$(echo $driver_dvb | awk 'BEGIN {FS=\"/\"} {printf(\"%s\", $5)}')\n  logger -t Tvheadend \"### Loading userspace DVB driver: $driver_dvb_name ###\"\n  # use \". \" because of variable export\n  . $driver_dvb\ndone\n\nif [ \"$WAIT_FOR_FEINIT\" == \"true\" ] ; then\n  while [ true ] ; do\n    if [ -e /dev/dvb/adapter$((NUM_ADAPTERS-1))/frontend0 ] ; then\n      break\n    fi\n    sleep 1\n  done\nfi\n\nif [ \"$PRELOAD_CAPMT_CA\" == \"true\" ] ; then\n  logger -t Tvheadend \"### Preloading capmt_ca.so library ###\"\n  LD_PRELOAD=\"$ADDON_DIR/bin/capmt_ca.so $LD_PRELOAD\" exec $ADDON_DIR/bin/tvheadend $TVHEADEND_ARG &>$ADDON_LOG_FILE\nelse\n  exec $ADDON_DIR/bin/tvheadend $TVHEADEND_ARG &>$ADDON_LOG_FILE\nfi\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\n\nclass Monitor(xbmc.Monitor):\n\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == \"__main__\":\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/source/defaults/comskip/comskip.ini",
    "content": "; See comskip.txt in the distribution zip file for many settable parameters, read manual.html, tuning.html and debugwindow.html for how to tune and debug comskip\r\nedl_mode=3                              ; the mode specified in the generated edl file, 0=cut, 3=commercial break\r\nmkv_time_offset=30.0                    ; offset in seconds, to work around what appears to be an Kodi or ffmpeg bug\r\nalways_keep_first_seconds=2             ; Kodi has a bug that causes a segfault if we don't keep the start of the stream, I'll fix that when I get a chance\r\n\r\ndetect_method=43                        ; 1=black frame, 2=logo, 4=scene change, 8=fuzzy logic, 16=closed captions, 32=aspect ration, 64=silence, 128=cutscenes, 255=all\r\nvalidate_silence=1                      ; Default, set to 0 to force using this clues if selected above.\r\nvalidate_uniform=1                      ; Default, set to 0 to force using this clues (like pure white frames) if blackframe is selected above.\r\nvalidate_scenechange=1                  ; Default, set to 0 to force using this clues if selected above.\r\nverbose=10                              ; show a lot of extra info, level 5 is also OK, set to 0 to disable\r\nmax_brightness=60                       ; frame not black if any pixels checked are greater than this (scale 0 to 255)\r\ntest_brightness=40                      ; frame not pure black if any pixels checked are greater than this, will check average brightness (scale 0 to 255)\r\nmax_avg_brightness=25                   ; maximum average brightness for a dim frame to be considered black (scale 0 to 255) 0 means autosetting\r\nmax_commercialbreak=600                 ; maximum length in seconds to consider a segment a commercial break\r\nmin_commercialbreak=25                  ; minimum length in seconds to consider a segment a commercial break\r\nmax_commercial_size=125                 ; maximum time in seconds for a single commercial or multiple commercials if no breaks in between\r\nmin_commercial_size=4                   ; mimimum time in seconds for a single commercial\r\nmin_show_segment_length=250             ; any segment longer than this will be scored towards show.\r\nnon_uniformity=500                      ; Set to 0 to disable cutpoints based on uniform frames\r\nmax_volume=500                          ; any frame with sound volume larger than this will not be regarded as black frame\r\nmin_silence=12                          ; Any deep silence longer than this amount  of frames is a possible cutpoint\r\nticker_tape=0                           ; Amount of pixels from bottom to ignore in all processing \r\nlogo_at_bottom=0                        ; Set to 1 to search only for logo at the lower half of the video, do not combine with subtitle setting\r\npunish=0                                ; Compare to average for sum of 1=brightness, 2=uniform 4=volume, 8=silence, 16=schange, set to 0 to disable\r\npunish_threshold=1.3                    ; Multiply when amount is above average * punish_threshold\r\npunish_modifier=2                       ; When above average * threshold multiply score by this value\r\nintelligent_brightness=0                ; Set to 1 to use a USA specific algorithm to tune some of the settings, not adviced outside the USA\r\nlogo_percentile=0.92                    ; if more then this amount of logo is found then logo detection will be disabled\r\nlogo_threshold=0.75\r\npunish_no_logo=1                        ; Default, set to 0 to avoid show segments without logo to be scored towards commercial\r\naggressive_logo_rejection=0\r\nconnect_blocks_with_logo=1              ; set to 1 if you want successive blocks with logo on the transition to be regarded as connected, set to 0 to disable\r\nlogo_filter=0                           ; set the size of the filter to apply to bad logo detection, 4 seems to be a good value.\r\ncut_on_ar_change=1                      ; set to 1 if you want to cut also on aspect ratio changes when logo is present, set to 2 to force cuts on aspect ratio changes. set to 0 to disable\r\ndelete_show_after_last_commercial=0     ; set to 1 if you want to delete the last block if its a show and after a commercial\r\ndelete_show_before_or_after_current=0   ; set to 1 if you want to delete the previous and the next show in the recording, this can lead to the deletion of trailers of next show\r\ndelete_block_after_commercial=0         ; set to max size of block in seconds to be discarded, set to 0 to disable \r\nremove_before=0                         ; amount of seconds of show to be removed before ALL commercials\r\nremove_after=0                          ; amount of seconds of show to be removed after ALL commercials\r\nshrink_logo=5                           ; Reduce the duration of the logo with this amount of seconds\r\nafter_logo=0                            ; set to number of seconds after logo disappears comskip should start to search for silence to insert an additional cutpoint\r\npadding=0\r\nms_audio_delay=5\r\nvolume_slip=40\r\nskip_b_frames=0                         ; Set to 1 to force Comskip to skip frames for higher processing speed.\r\nhardware_decode=0                       ; Set to 1 to enable hardware accelerated video decoding, only available in donator version\r\nmax_repair_size=200                     ; Will repair maximum 200 missing MPEG frames in the timeline, set to 0 to disable repairing for players that don't use PTS. \r\ndisable_heuristics=4                    ; bit pattern for disabling heuristics, adding 1 disables heristics 1, adding 2 disables heristics 2, adding 4 disables heristics 3, 255  disables all heuristics \r\ndelete_logo_file=0                      ; set to 1 if you want comskip to tidy up after finishing\r\noutput_framearray=0                     ; create a big excel file for detailed analysis, set to 0 to disable\r\noutput_data=0                           ; create a dump of the user data channel, used for CC and XDS (such as V-Chip info). Can be use together with output_framearray to remote debug CC decoding\r\noutput_videoredo=0                      ; The old videoredo format\r\noutput_videoredo3=0                     ; The new videoredo v3 format.\r\noutput_womble=0\r\noutput_mls=0                            ; set to 1 if you want MPeg Video Wizard bookmark file output\r\noutput_cuttermaran=0\r\noutput_mpeg2schnitt=0\r\noutput_mpgtx=0\r\noutput_dvrcut=0\r\noutput_zoomplayer_chapter=0\r\noutput_zoomplayer_cutlist=0\r\noutput_edl=1\r\noutput_dvrmstb=0                        ; Set to 1 if you're running DVRMS-Toolbox\r\noutput_edlx=0\r\noutput_vcf=0\r\noutput_bsplayer=0\r\noutput_btv=0                            ; set to 1 if you want Beyond TV chapter cutlist output\r\noutput_projectx=0                       ; set to 1 if you want ProjectX cutlist output (Xcl)\r\noutput_avisynth=0\r\noutput_vdr=1                            ; set to 1 if you want Kodi to skipping commercials\r\noutput_demux=0                          ; set to 1 if you want comskip to demux the mpeg file while scanning\r\nsage_framenumber_bug=0\r\nsage_minute_bug=0\r\nlive_tv=0                               ; set to 1 if you use parallelprocessing and need the output while recording\r\nlive_tv_retries=4                       ; change to 16 when using live_tv in BTV, used for mpeg PS and TS\r\ndvrms_live_tv_retries=300               ; only used for dvr_ms\r\nstandoff=0                              ; change to 8000000 when using live_tv in BTV\r\n\r\ncuttermaran_options=\"cut=\\\"true\\\" unattended=\\\"true\\\" muxResult=\\\"false\\\" snapToCutPoints=\\\"true\\\" closeApp=\\\"true\\\"\"\r\nmpeg2schnitt_options=\"mpeg2schnitt.exe /S /E /R25  /Z %2 %1\"\r\navisynth_options=\"LoadPlugin(\\\"MPEG2Dec3.dll\\\") \\nMPEG2Source(\\\"%s\\\")\\n\"\r\ndvrcut_options=\"dvrcut \\\"%s.dvr-ms\\\" \\\"%s_clean.dvr-ms\\\" \"\r\nwindowtitle=\"Comskip - %s\""
  },
  {
    "path": "packages/addons/service/tvheadend43/source/defaults/config",
    "content": "{\n\t\"wizard\": \"hello\",\n\t\"uilevel\": 1,\n\t\"uilevel_nochange\": true,\n\t\"ui_quicktips\": true,\n\t\"cookie_expires\": 14,\n\t\"caclient_ui\": true,\n\t\"epg_compress\": true,\n\t\"prefer_picon\": true,\n\t\"chiconpath\": \"file:///storage/picons/tvh/%C.png\",\n\t\"chiconscheme\": 2,\n\t\"piconpath\": \"file:///storage/picons/vdr/\",\n\t\"piconscheme\": 1\n}\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/source/defaults/dvr/config/8d0f5b7ae354d956d7fe5db25f5d0d24",
    "content": "{\n\t\"storage\": \"/storage/recordings\",\n\t\"retention-days\": 2147483646,\n\t\"removal-days\": 2147483647,\n\t\"pre-extra-time\": 0,\n\t\"post-extra-time\": 0,\n\t\"day-dir\": false,\n\t\"channel-dir\": false,\n\t\"channel-in-title\": true,\n\t\"date-in-title\": true,\n\t\"time-in-title\": true,\n\t\"whitespace-in-title\": false,\n\t\"title-dir\": true,\n\t\"episode-in-title\": true,\n\t\"tag-files\": true,\n\t\"windows-compatible-filenames\": true,\n\t\"charset\": \"UTF-8\"\n}\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/source/defaults/epggrab/config",
    "content": "{\n\t\"channel_rename\": true,\n\t\"channel_renumber\": false,\n\t\"channel_reicon\": false,\n\t\"epgdb_periodicsave\": 2,\n\t\"ota_initial\": true,\n\t\"modules\": {\n\t\t\"opentv-skyit\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"OpenTV: Sky Italia\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 2\n\t\t},\n\t\t\"opentv-skynz\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"OpenTV: Sky NZ\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 2\n\t\t},\n\t\t\"opentv-skyuk\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"OpenTV: Sky UK\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 2\n\t\t},\n\t\t\"opentv-ausat\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"OpenTV: Ausat\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 2\n\t\t},\n\t\t\"psip\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"PSIP: ATSC Grabber\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 1\n\t\t},\n\t\t\"Bulsatcom_39E\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"Bulsatcom: Bula 39E\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 5\n\t\t},\n\t\t\"viasat_baltic\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"VIASAT: Baltic\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 5\n\t\t},\n\t\t\"uk_freeview\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"UK: Freeview\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 5\n\t\t},\n\t\t\"uk_freesat\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"UK: Freesat\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 5\n\t\t},\n\t\t\"eit\": {\n\t\t\t\"class\": \"epggrab_mod_ota\",\n\t\t\t\"name\": \"EIT: DVB Grabber\",\n\t\t\t\"type\": \"Over-the-air\",\n\t\t\t\"enabled\": true,\n\t\t\t\"priority\": 1\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/source/defaults/timeshift/config",
    "content": "{\n\t\"enabled\": 0,\n\t\"ondemand\": 0,\n\t\"path\": \"/storage/.kodi/userdata/addon_data/service.tvheadend43/cache/timeshift\",\n\t\"unlimited_period\": 0,\n\t\"max_period\": 3600,\n\t\"unlimited_size\": 0,\n\t\"max_size\": 3072\n}\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/source/defaults/xmltv/config",
    "content": "{\n\t\"grabbers\": [\n\t\t{\n\t\t\t\"path\": \"/storage/.kodi/addons/service.tvheadend43/bin/tv_grab_file\",\n\t\t\t\"description\": \"tv_grag_file is a simple grabber that just read the ~/.xmltv/tv_grab_file.xmltv file\",\n\t\t\t\"version\": \"0.1\\n\",\n\t\t\t\"mtime\": 1318774706,\n\t\t\t\"capabilities\": 1\n\t\t}\n\t],\n\t\"grab-interval\": 12,\n\t\"grab-enabled\": 1,\n\t\"current-grabber\": \"/storage/.kodi/addons/service.tvheadend43/bin/tv_grab_file\"\n}\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/source/download.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\r\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\r\n\r\nimport urllib.request, urllib.parse, urllib.error, os, zipfile\r\nfrom urllib.error import URLError\r\nimport xbmc, xbmcvfs, xbmcgui, xbmcaddon\r\nimport shutil\r\nimport sys\r\n\r\nurl = 'https://github.com/tvheadend/dtv-scan-tables/archive/tvheadend.zip'\r\ntemp = xbmcvfs.translatePath('special://temp')\r\ntemp_folder = os.path.join(temp, 'dtv-scan-tables-tvheadend')\r\ndest_folder = os.path.join(xbmcvfs.translatePath(xbmcaddon.Addon().getAddonInfo('path')), 'dvb-scan')\r\narchive = os.path.join(temp, 'dtv_scantables.zip')\r\n\r\nADDON_NAME = xbmcaddon.Addon().getAddonInfo('name')\r\nLS = xbmcaddon.Addon().getLocalizedString\r\nSCANTABLES = ['atsc', 'channels-conf', 'dvb-c', 'dvb-s', 'dvb-t', 'isdb-t']\r\n\r\nclass DownLoader():\r\n\r\n    def __init__(self):\r\n        self.dp = xbmcgui.DialogProgressBG()\r\n\r\n    def download(self, url, dest):\r\n        try:\r\n            self.dp.create(ADDON_NAME, LS(30042))\r\n            urllib.request.urlretrieve(url, dest, reporthook=self._pbhook)\r\n            self.dp.close()\r\n            zip = zipfile.ZipFile(archive)\r\n            if zip.testzip() is not None: raise zipfile.BadZipfile\r\n\r\n            if os.path.exists(temp_folder): shutil.rmtree(temp_folder)\r\n            if os.path.exists(dest_folder): shutil.rmtree(dest_folder)\r\n\r\n            self.dp.create(ADDON_NAME, LS(30043))\r\n            for idx, folder in enumerate(SCANTABLES):\r\n                self._pbhook(idx, 1, len(SCANTABLES) - 1)\r\n                for z in zip.filelist:\r\n                    if folder in z.filename: zip.extract(z.filename, temp)\r\n\r\n            self.dp.close()\r\n            for folder in SCANTABLES:\r\n                shutil.copytree(os.path.join(temp_folder, folder), os.path.join(dest_folder, folder))\r\n\r\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30039), xbmcgui.NOTIFICATION_INFO)\r\n        except URLError as e:\r\n            xbmc.log('Could not download file: %s' % e.reason, xbmc.LOGERROR)\r\n            self.dp.close()\r\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30040), xbmcgui.NOTIFICATION_ERROR)\r\n        except zipfile.BadZipfile:\r\n            xbmc.log('Could not extract files from zip, bad zipfile', xbmc.LOGERROR)\r\n            xbmcgui.Dialog().notification(ADDON_NAME, LS(30041), xbmcgui.NOTIFICATION_ERROR)\r\n\r\n    def _pbhook(self, numblocks, blocksize, filesize):\r\n            percent = int((numblocks * blocksize * 100) / filesize)\r\n            self.dp.update(percent)\r\n\r\n\r\nif __name__ == '__main__':\r\n    try:\r\n        if sys.argv[1] == 'getscantables':\r\n            dl = DownLoader()\r\n            dl.download(url, archive)\r\n    except IndexError:\r\n        pass\r\n\r\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: tvheadend43\n# Addon id: service.tvheadend43\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"XMLTV\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"DVB\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"DEBUG\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"FRITZ!Box Sat>IP\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"XMLTV Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30005\"\nmsgid \"XMLTV source type\"\nmsgstr \"\"\n\nmsgctxt \"#30006\"\nmsgid \"XMLTV File location\"\nmsgstr \"\"\n\nmsgctxt \"#30007\"\nmsgid \"XMLTV Web location\"\nmsgstr \"\"\n\nmsgctxt \"#30008\"\nmsgid \"XMLTV Script location\"\nmsgstr \"\"\n\nmsgctxt \"#30009\"\nmsgid \"DVB Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30010\"\nmsgid \"Unload DVB modules before suspend\"\nmsgstr \"\"\n\nmsgctxt \"#30011\"\nmsgid \"Wait for frontend initialization\"\nmsgstr \"\"\n\nmsgctxt \"#30012\"\nmsgid \"Number of adapters to wait for\"\nmsgstr \"\"\n\nmsgctxt \"#30013\"\nmsgid \"Preload capmt_ca.so library\"\nmsgstr \"\"\n\nmsgctxt \"#30014\"\nmsgid \"Delay the start of Tvheadend\"\nmsgstr \"\"\n\nmsgctxt \"#30015\"\nmsgid \"Seconds delay\"\nmsgstr \"\"\n\nmsgctxt \"#30016\"\nmsgid \"Custom start parameter\"\nmsgstr \"\"\n\nmsgctxt \"#30017\"\nmsgid \"Parameter\"\nmsgstr \"\"\n\nmsgctxt \"#30018\"\nmsgid \"FRITZ!Box Sat>IP server\"\nmsgstr \"\"\n\nmsgctxt \"#30019\"\nmsgid \"AVM device\"\nmsgstr \"\"\n\nmsgctxt \"#30020\"\nmsgid \"IP of the AVM Repeater\"\nmsgstr \"\"\n\nmsgctxt \"#30021\"\nmsgid \"Router IP range (last digits are always .254)\"\nmsgstr \"\"\n\nmsgctxt \"#30022\"\nmsgid \"Used network\"\nmsgstr \"\"\n\nmsgctxt \"#30023\"\nmsgid \"Virtual IP #1\"\nmsgstr \"\"\n\nmsgctxt \"#30024\"\nmsgid \"Virtual IP #2\"\nmsgstr \"\"\n\nmsgctxt \"#30025\"\nmsgid \"Virtual IP #3\"\nmsgstr \"\"\n\nmsgctxt \"#30026\"\nmsgid \"Virtual IP #4\"\nmsgstr \"\"\n\nmsgctxt \"#30027\"\nmsgid \"TRACE Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30028\"\nmsgid \"Path\"\nmsgstr \"\"\n\nmsgctxt \"#30029\"\nmsgid \"Activate TRACE Debug\"\nmsgstr \"\"\n\nmsgctxt \"#30030\"\nmsgid \"Debug Value #1\"\nmsgstr \"\"\n\nmsgctxt \"#30031\"\nmsgid \"Debug Value #2\"\nmsgstr \"\"\n\nmsgctxt \"#30032\"\nmsgid \"Debug Value #3\"\nmsgstr \"\"\n\nmsgctxt \"#30033\"\nmsgid \"Debug Value #4\"\nmsgstr \"\"\n\nmsgctxt \"#30034\"\nmsgid \"Debug Value #5\"\nmsgstr \"\"\n\nmsgctxt \"#30035\"\nmsgid \"FRITZ!Box Configuration for FRITZ!OS 6.x (do not use for 7.x)\"\nmsgstr \"\"\n\nmsgctxt \"#30036\"\nmsgid \"Scan Tables\"\nmsgstr \"\"\n\nmsgctxt \"#30037\"\nmsgid \"Manage Scan-Tables\"\nmsgstr \"\"\n\nmsgctxt \"#30038\"\nmsgid \"Download and install Scan-Tables\"\nmsgstr \"\"\n\nmsgctxt \"#30039\"\nmsgid \"Download completed, tables installed\"\nmsgstr \"\"\n\nmsgctxt \"#30040\"\nmsgid \"Could not download Scan-Tables\"\nmsgstr \"\"\n\nmsgctxt \"#30041\"\nmsgid \"Could not extract zip files\"\nmsgstr \"\"\n\nmsgctxt \"#30042\"\nmsgid \"Download Scan-Tables\"\nmsgstr \"\"\n\nmsgctxt \"#30043\"\nmsgid \"Extract Scan-Tables\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n  <!-- HTS TVHEADEND -->\n  <category label=\"30000\">\n    <setting label=\"30004\" type=\"lsep\"/>\n    <setting type=\"sep\" />\n    <setting id=\"XMLTV_TYPE\" type=\"labelenum\" label=\"30005\" values=\"NONE|FILE|SCRIPT|WEB\" sort=\"yes\" default=\"NONE\"/>\n    <setting id=\"XMLTV_LOCATION_FILE\" type=\"file\" label=\"30006\" default=\"\" enable=\"eq(-1,0)\"/>\n    <setting id=\"XMLTV_LOCATION_WEB\" type=\"text\" label=\"30007\" default=\"http://\" enable=\"eq(-2,3)\"/>\n    <setting id=\"XMLTV_LOCATION_SCRIPT\" type=\"file\" label=\"30008\" default=\"\" enable=\"eq(-3,2)\"/>\n  </category>\n  <category label=\"30001\">\n    <setting label=\"30009\" type=\"lsep\"/>\n    <setting type=\"sep\" />\n    <setting id=\"WAIT_FOR_FEINIT\" type=\"bool\" label=\"30011\" default=\"false\" />\n    <setting id=\"NUM_ADAPTERS\" type=\"slider\" range=\"1,16\" option=\"int\" label=\"30012\" default=\"1\" enable=\"eq(-1,true)\" />\n    <setting id=\"REMOVE_MODULES\" type=\"text\" label=\"30010\" values=\"\" default=\"\"/>\n    <setting id=\"PRELOAD_CAPMT_CA\" type=\"bool\" label=\"30013\" default=\"false\" />\n    <setting id=\"WORKAROUND_SLEEP\" type=\"bool\" label=\"30014\" default=\"false\" />\n    <setting id=\"WORKAROUND_SLEEP_TIME\" type=\"slider\" range=\"1,30\" option=\"int\" label=\"30015\" default=\"1\" enable=\"eq(-1,true)\" />\n  </category>\n  <category label=\"30002\">\n    <setting label=\"30027\" type=\"lsep\"/>\n    <setting type=\"sep\" />\n    <setting id=\"DEBUG_LOG\" type=\"bool\" label=\"30029\" default=\"false\" />\n    <setting type=\"sep\" />\n    <setting id=\"DEBUG_LOG_PATH\" type=\"text\" label=\"30028\" default=\"/storage/.kodi/userdata/addon_data/service.tvheadend43/debug.txt\" enable=\"eq(-2,true)\"/>\n    <setting id=\"DEBUG_LOG_TRACE_1\" type=\"select\" default=\"NONE\" visible=\"eq(-3,true)\" enable=\"eq(-3,true)\" label=\"30030\" values=\"NONE|all|access|api|avahi|bat|bonjour|bouquet|caclient|capmt|channel|charset|config|CPU|cron|csa|cwc|dbus|descrambler|diseqc|dvb|dvbcam|dvr|epg|epgdb|epggrab|esfilter|fastscan|fsmonitor|globalheaders|gtimer|hevc|htsp|htsp-ans|htsp-req|htsp-sub|http|httpc|idnode|imagecache|iptv|iptv-pcr|libav|linuxdvb|lock|main|mkv|mpegts|mtimer|muxer|muxsched|opentv|parser|pass|pat|pmt|profile|psip|pyepg|rtsp|satip|satips|scanfile|service|service-mapper|settings|spawn|subscription|tbl|tbl-atsc|tbl-base|tbl-csa|tbl-eit|tbl-pass|tbl-satip|tbl-time|tcp|thread|time|timeshift|transcode|TS|tsfile|tsfix|tvhdhomerun|tvhpoll|upnp|url|uuid|webui|xmltv\" />\n    <setting id=\"DEBUG_LOG_TRACE_2\" type=\"select\" default=\"NONE\" visible=\"eq(-4,true)\" enable=\"!eq(-1,NONE)+eq(-4,true)\" label=\"30031\" values=\"NONE|access|api|avahi|bat|bonjour|bouquet|caclient|capmt|channel|charset|config|CPU|cron|csa|cwc|dbus|descrambler|diseqc|dvb|dvbcam|dvr|epg|epgdb|epggrab|esfilter|fastscan|fsmonitor|globalheaders|gtimer|hevc|htsp|htsp-ans|htsp-req|htsp-sub|http|httpc|idnode|imagecache|iptv|iptv-pcr|libav|linuxdvb|lock|main|mkv|mpegts|mtimer|muxer|muxsched|opentv|parser|pass|pat|pmt|profile|psip|pyepg|rtsp|satip|satips|scanfile|service|service-mapper|settings|spawn|subscription|tbl|tbl-atsc|tbl-base|tbl-csa|tbl-eit|tbl-pass|tbl-satip|tbl-time|tcp|thread|time|timeshift|transcode|TS|tsfile|tsfix|tvhdhomerun|tvhpoll|upnp|url|uuid|webui|xmltv\" />\n    <setting id=\"DEBUG_LOG_TRACE_3\" type=\"select\" default=\"NONE\" visible=\"eq(-5,true)\" enable=\"!eq(-1,NONE)+!eq(-2,NONE)+eq(-5,true)\" label=\"30032\" values=\"NONE|access|api|avahi|bat|bonjour|bouquet|caclient|capmt|channel|charset|config|CPU|cron|csa|cwc|dbus|descrambler|diseqc|dvb|dvbcam|dvr|epg|epgdb|epggrab|esfilter|fastscan|fsmonitor|globalheaders|gtimer|hevc|htsp|htsp-ans|htsp-req|htsp-sub|http|httpc|idnode|imagecache|iptv|iptv-pcr|libav|linuxdvb|lock|main|mkv|mpegts|mtimer|muxer|muxsched|opentv|parser|pass|pat|pmt|profile|psip|pyepg|rtsp|satip|satips|scanfile|service|service-mapper|settings|spawn|subscription|tbl|tbl-atsc|tbl-base|tbl-csa|tbl-eit|tbl-pass|tbl-satip|tbl-time|tcp|thread|time|timeshift|transcode|TS|tsfile|tsfix|tvhdhomerun|tvhpoll|upnp|url|uuid|webui|xmltv\" />\n    <setting id=\"DEBUG_LOG_TRACE_4\" type=\"select\" default=\"NONE\" visible=\"eq(-6,true)\" enable=\"!eq(-1,NONE)+!eq(-2,NONE)+!eq(-3,NONE)+eq(-6,true)\" label=\"30033\" values=\"NONE|access|api|avahi|bat|bonjour|bouquet|caclient|capmt|channel|charset|config|CPU|cron|csa|cwc|dbus|descrambler|diseqc|dvb|dvbcam|dvr|epg|epgdb|epggrab|esfilter|fastscan|fsmonitor|globalheaders|gtimer|hevc|htsp|htsp-ans|htsp-req|htsp-sub|http|httpc|idnode|imagecache|iptv|iptv-pcr|libav|linuxdvb|lock|main|mkv|mpegts|mtimer|muxer|muxsched|opentv|parser|pass|pat|pmt|profile|psip|pyepg|rtsp|satip|satips|scanfile|service|service-mapper|settings|spawn|subscription|tbl|tbl-atsc|tbl-base|tbl-csa|tbl-eit|tbl-pass|tbl-satip|tbl-time|tcp|thread|time|timeshift|transcode|TS|tsfile|tsfix|tvhdhomerun|tvhpoll|upnp|url|uuid|webui|xmltv\" />\n    <setting id=\"DEBUG_LOG_TRACE_5\" type=\"select\" default=\"NONE\" visible=\"eq(-7,true)\" enable=\"!eq(-1,NONE)+!eq(-2,NONE)+!eq(-3,NONE)+!eq(-4,NONE)+eq(-7,true)\" label=\"30034\" values=\"NONE|access|api|avahi|bat|bonjour|bouquet|caclient|capmt|channel|charset|config|CPU|cron|csa|cwc|dbus|descrambler|diseqc|dvb|dvbcam|dvr|epg|epgdb|epggrab|esfilter|fastscan|fsmonitor|globalheaders|gtimer|hevc|htsp|htsp-ans|htsp-req|htsp-sub|http|httpc|idnode|imagecache|iptv|iptv-pcr|libav|linuxdvb|lock|main|mkv|mpegts|mtimer|muxer|muxsched|opentv|parser|pass|pat|pmt|profile|psip|pyepg|rtsp|satip|satips|scanfile|service|service-mapper|settings|spawn|subscription|tbl|tbl-atsc|tbl-base|tbl-csa|tbl-eit|tbl-pass|tbl-satip|tbl-time|tcp|thread|time|timeshift|transcode|TS|tsfile|tsfix|tvhdhomerun|tvhpoll|upnp|url|uuid|webui|xmltv\" />\n    <setting type=\"sep\" />\n    <setting id=\"CUSTOM_START\" type=\"bool\" label=\"30016\" default=\"false\" />\n    <setting id=\"CUSTOM_ARGS\" type=\"text\" label=\"30017\" default=\"\" enable=\"eq(-1,true)\" />\n  </category>\n  <category label=\"30003\">\n    <setting label=\"30035\" type=\"lsep\"/>\n    <setting type=\"sep\" />\n    <setting id=\"AVM_SATIP_SERVER\" type=\"bool\" label=\"30018\" default=\"false\"/>\n    <setting id=\"AVM_DEVICE\" type=\"labelenum\" label=\"30019\" values=\"AVM_Repeater|AVM_6490\" visible=\"eq(-1,true)\"/>\n    <setting id=\"AVM_ROUTER_IP\" type=\"ipaddress\" label=\"30020\" default=\"192.168.178.2\" visible=\"eq(-2,true)+eq(-1,0)\"/>\n    <setting id=\"AVM_ROUTER_FAKE_IP\" type=\"ipaddress\" label=\"30021\" default=\"192.168.178.254\" visible=\"eq(-3,true)+eq(-2,1)\"/>\n    <setting id=\"AVM_ETH\" type=\"labelenum\" label=\"30022\" default=\"eth0\" visible=\"eq(-4,true)\" values=\"eth0|wlan0|eth1|wlan1\" />\n    <setting type=\"sep\" visible=\"eq(-5,true)\"/>\n    <setting id=\"AVM_IP1\" type=\"ipaddress\" label=\"30023\" default=\"192.168.178.201\" visible=\"eq(-6,true)\"/>\n    <setting id=\"AVM_IP2\" type=\"ipaddress\" label=\"30024\" default=\"192.168.178.202\" visible=\"eq(-7,true)\"/>\n    <setting id=\"AVM_IP3\" type=\"ipaddress\" label=\"30025\" default=\"192.168.178.203\" visible=\"eq(-8,true)+eq(-7,1)\"/>\n    <setting id=\"AVM_IP4\" type=\"ipaddress\" label=\"30026\" default=\"192.168.178.204\" visible=\"eq(-9,true)+eq(-8,1)\"/>\n  </category>\n  <category label=\"30036\">\n    <setting label=\"30037\" type=\"lsep\"/>\n    <setting id=\"DOWNLOAD_SCAN_TABLES\" type=\"action\" label=\"30038\" option=\"close\" action=\"RunScript(service.tvheadend43,getscantables)\"/>\n  </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"AVM_DEVICE\" default=\"true\"></setting>\n    <setting id=\"AVM_ETH\" default=\"true\">eth0</setting>\n    <setting id=\"AVM_IP1\" default=\"true\">192.168.178.201</setting>\n    <setting id=\"AVM_IP2\" default=\"true\">192.168.178.202</setting>\n    <setting id=\"AVM_IP3\" default=\"true\">192.168.178.203</setting>\n    <setting id=\"AVM_IP4\" default=\"true\">192.168.178.204</setting>\n    <setting id=\"AVM_ROUTER_FAKE_IP\" default=\"true\">192.168.178.254</setting>\n    <setting id=\"AVM_ROUTER_IP\" default=\"true\">192.168.178.2</setting>\n    <setting id=\"AVM_SATIP_SERVER\" default=\"true\">false</setting>\n    <setting id=\"CUSTOM_ARGS\" default=\"true\"></setting>\n    <setting id=\"CUSTOM_START\" default=\"true\">false</setting>\n    <setting id=\"DEBUG_LOG\" default=\"true\">false</setting>\n    <setting id=\"DEBUG_LOG_PATH\" default=\"true\">/storage/.kodi/userdata/addon_data/service.tvheadend43/debug.txt</setting>\n    <setting id=\"DEBUG_LOG_TRACE_1\" default=\"true\">NONE</setting>\n    <setting id=\"DEBUG_LOG_TRACE_2\" default=\"true\">NONE</setting>\n    <setting id=\"DEBUG_LOG_TRACE_3\" default=\"true\">NONE</setting>\n    <setting id=\"DEBUG_LOG_TRACE_4\" default=\"true\">NONE</setting>\n    <setting id=\"DEBUG_LOG_TRACE_5\" default=\"true\">NONE</setting>\n    <setting id=\"DOWNLOAD_SCAN_TABLES\" default=\"true\"></setting>\n    <setting id=\"NUM_ADAPTERS\">1</setting>\n    <setting id=\"PRELOAD_CAPMT_CA\" default=\"true\">false</setting>\n    <setting id=\"REMOVE_MODULES\" default=\"true\"></setting>\n    <setting id=\"WAIT_FOR_FEINIT\" default=\"true\">false</setting>\n    <setting id=\"WORKAROUND_SLEEP\" default=\"true\">false</setting>\n    <setting id=\"WORKAROUND_SLEEP_TIME\">1</setting>\n    <setting id=\"XMLTV_LOCATION_FILE\" default=\"true\"></setting>\n    <setting id=\"XMLTV_LOCATION_SCRIPT\" default=\"true\"></setting>\n    <setting id=\"XMLTV_LOCATION_WEB\" default=\"true\">http://</setting>\n    <setting id=\"XMLTV_TYPE\" default=\"true\">NONE</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/source/sleep.d/tvheadend.power",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.tvheadend43\n\nSERVICE=\"service.tvheadend43\"\n\ncase \"$1\" in\n  pre)\n    if systemctl is-active \"$SERVICE\" &>/dev/null ; then\n      systemctl stop \"$SERVICE\"\n      for module in $REMOVE_MODULES ; do\n        rmmod $module\n      done\n    fi\n    ;;\n  post)\n    if systemctl is-enabled \"$SERVICE\" &>/dev/null ; then\n      for module in $REMOVE_MODULES ; do\n        modprobe $module\n      done\n      systemctl start \"$SERVICE\"\n    fi\n    ;;\nesac\n"
  },
  {
    "path": "packages/addons/service/tvheadend43/source/system.d/service.tvheadend43.service",
    "content": "[Unit]\nDescription=TVHeadend43 Service\nAfter=network-online.service\n\n[Service]\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.tvheadend43/bin/tvheadend43.start\"\nTimeoutStopSec=2\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/tvmosaic/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tvmosaic\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Add-on removed\"\nPKG_LONGDESC=\"Add-on removed\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_ADDON_BROKEN=\"TV Mosaic is no longer maintained and has been removed.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"TV Mosaic\"\nPKG_ADDON_TYPE=\"xbmc.broken\"\n\naddon() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/service/usbmuxd/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/usbmuxd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"usbmuxd\"\nPKG_VERSION=\"1.1.1\"\nPKG_SHA256=\"c0ec9700172bf635ccb5bed98daae607d2925c2bc3597f25706ecd9dfbfd2d9e\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.libimobiledevice.org\"\nPKG_URL=\"https://github.com/libimobiledevice/usbmuxd/releases/download/${PKG_VERSION}/usbmuxd-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libusb libimobiledevice\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"USB Multiplex Daemon\"\nPKG_LONGDESC=\"USB Multiplex Daemon\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"iPhone Tether\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nPKG_DISCLAIMER=\"Additional data charges may occur. The LibreELEC team doesn't take any resposibility for extra data charges.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_func_malloc_0_nonnull=yes \\\n                           ac_cv_func_realloc_0_nonnull=yes\"\n\nmakeinstall_target() {\n  :\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/src/usbmuxd ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n}\n"
  },
  {
    "path": "packages/addons/service/usbmuxd/patches/usbmuxd-0001-remove-duplicate-functions.patch",
    "content": "diff --git a/src/utils.c b/src/utils.c\nindex 206c684..2ce59ff 100644\n--- a/src/utils.c\n+++ b/src/utils.c\n@@ -160,170 +160,6 @@ char *stpcpy(char * s1, const char * s2)\n }\n #endif\n \n-/**\n- * Concatenate strings into a newly allocated string\n- *\n- * @note: Specify NULL for the last string in the varargs list\n- *\n- * @str: The first string in the list\n- * @...: Subsequent strings.  Use NULL for the last item.\n- *\n- * @return a newly allocated string, or NULL if @str is NULL.  This will also\n- * return NULL and set errno to ENOMEM if memory is exhausted.\n- */\n-char *string_concat(const char *str, ...)\n-{\n-\tsize_t len;\n-\tva_list args;\n-\tchar *s;\n-\tchar *result;\n-\tchar *dest;\n-\n-\tif (!str)\n-\t\treturn NULL;\n-\n-\t/* Compute final length */\n-\n-\tlen = strlen(str) + 1; /* plus 1 for the null terminator */\n-\n-\tva_start(args, str);\n-\ts = va_arg(args, char *);\n-\twhile (s) {\n-\t\tlen += strlen(s);\n-\t\ts = va_arg(args, char*);\n-\t}\n-\tva_end(args);\n-\n-\t/* Concat each string */\n-\n-\tresult = malloc(len);\n-\tif (!result)\n-\t\treturn NULL; /* errno remains set */\n-\n-\tdest = result;\n-\n-\tdest = stpcpy(dest, str);\n-\n-\tva_start(args, str);\n-\ts = va_arg(args, char *);\n-\twhile (s) {\n-\t\tdest = stpcpy(dest, s);\n-\t\ts = va_arg(args, char *);\n-\t}\n-\tva_end(args);\n-\n-\treturn result;\n-}\n-\n-int buffer_read_from_filename(const char *filename, char **buffer, uint64_t *length)\n-{\n-\tFILE *f;\n-\tuint64_t size;\n-\n-\t*length = 0;\n-\n-\tf = fopen(filename, \"rb\");\n-\tif (!f) {\n-\t\treturn 0;\n-\t}\n-\n-\tfseek(f, 0, SEEK_END);\n-\tsize = ftell(f);\n-\trewind(f);\n-\n-\tif (size == 0) {\n-\t\tfclose(f);\n-\t\treturn 0;\n-\t}\n-\n-\t*buffer = (char*)malloc(sizeof(char)*(size+1));\n-\n-\tif (!buffer) {\n-\t\treturn 0;\n-\t}\n-\n-\tint ret = 1;\n-\tif (fread(*buffer, sizeof(char), size, f) != size) {\n-\t\tusbmuxd_log(LL_ERROR, \"%s: ERROR: couldn't read %d bytes from %s\", __func__, (int)size, filename);\n-\t\tfree(*buffer);\n-\t\tret = 0;\n-\t\terrno = EIO;\n-\t}\n-\tfclose(f);\n-\n-\t*length = size;\n-\treturn ret;\n-}\n-\n-int buffer_write_to_filename(const char *filename, const char *buffer, uint64_t length)\n-{\n-\tFILE *f;\n-\n-\tf = fopen(filename, \"wb\");\n-\tif (f) {\n-\t\tsize_t written = fwrite(buffer, sizeof(char), length, f);\n-\t\tfclose(f);\n-\n-\t\tif (written == length) {\n-\t\t\treturn 1;\n-\t\t}\n-\t\telse {\n-\t\t\t// Not all data could be written.\n-\t\t\terrno = EIO;\n-\t\t\treturn 0;\n-\t\t}\n-\t}\n-\telse {\n-\t\t// Failed to open the file, let the caller know.\n-\t\treturn 0;\n-\t}\n-}\n-\n-int plist_read_from_filename(plist_t *plist, const char *filename)\n-{\n-\tchar *buffer = NULL;\n-\tuint64_t length;\n-\n-\tif (!filename)\n-\t\treturn 0;\n-\n-\tif (!buffer_read_from_filename(filename, &buffer, &length)) {\n-\t\treturn 0;\n-\t}\n-\n-\tif ((length > 8) && (memcmp(buffer, \"bplist00\", 8) == 0)) {\n-\t\tplist_from_bin(buffer, length, plist);\n-\t} else {\n-\t\tplist_from_xml(buffer, length, plist);\n-\t}\n-\n-\tfree(buffer);\n-\n-\treturn 1;\n-}\n-\n-int plist_write_to_filename(plist_t plist, const char *filename, enum plist_format_t format)\n-{\n-\tchar *buffer = NULL;\n-\tuint32_t length;\n-\n-\tif (!plist || !filename)\n-\t\treturn 0;\n-\n-\tif (format == PLIST_FORMAT_XML)\n-\t\tplist_to_xml(plist, &buffer, &length);\n-\telse if (format == PLIST_FORMAT_BINARY)\n-\t\tplist_to_bin(plist, &buffer, &length);\n-\telse\n-\t\treturn 0;\n-\n-\tint res  = buffer_write_to_filename(filename, buffer, length);\n-\n-\tfree(buffer);\n-\n-\treturn res;\n-}\n-\n #ifndef HAVE_CLOCK_GETTIME\n typedef int clockid_t;\n #define CLOCK_MONOTONIC 1\ndiff --git a/src/utils.h b/src/utils.h\nindex b5cab3f..f862271 100644\n--- a/src/utils.h\n+++ b/src/utils.h\n@@ -19,6 +19,8 @@\n  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n  */\n \n+#include <libimobiledevice/utils.h>\n+\n #ifndef UTILS_H\n #define UTILS_H\n \n@@ -73,18 +75,6 @@ void collection_copy(struct collection *dest, struct collection *src);\n #ifndef HAVE_STPCPY\n char *stpcpy(char * s1, const char * s2);\n #endif\n-char *string_concat(const char *str, ...);\n-\n-int buffer_read_from_filename(const char *filename, char **buffer, uint64_t *length);\n-int buffer_write_to_filename(const char *filename, const char *buffer, uint64_t length);\n-\n-enum plist_format_t {\n-\tPLIST_FORMAT_XML,\n-\tPLIST_FORMAT_BINARY\n-};\n-\n-int plist_read_from_filename(plist_t *plist, const char *filename);\n-int plist_write_to_filename(plist_t plist, const char *filename, enum plist_format_t format);\n \n uint64_t mstime64(void);\n void get_tick_count(struct timeval * tv);\n"
  },
  {
    "path": "packages/addons/service/usbmuxd/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n"
  },
  {
    "path": "packages/addons/service/usbmuxd/source/system.d/service.usbmuxd.service",
    "content": "[Unit]\nDescription=Socket daemon for the usbmux protocol used by Apple devices\n\n[Service]\nType=simple\nExecStartPre=/sbin/modprobe ipheth\nExecStart=/storage/.kodi/addons/service.usbmuxd/bin/usbmuxd --systemd\nPIDFile=/var/run/usbmuxd.pid\n\n[Install]\nWantedBy=multi-user.target\n\n"
  },
  {
    "path": "packages/addons/service/vdr-addon/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/service/vdr-addon/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2011 Anthony Nash (nash.ant@gmail.com)\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vdr-addon\"\nPKG_VERSION=\"2.6.3\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain vdr vdr-plugin-ddci2 vdr-plugin-dummydevice vdr-plugin-dvbapi vdr-plugin-eepg vdr-plugin-epgfixer \\\n                    vdr-plugin-epgsearch vdr-plugin-iptv vdr-plugin-live vdr-plugin-restfulapi vdr-plugin-robotv vdr-plugin-satip \\\n                    vdr-plugin-streamdev vdr-plugin-vnsiserver vdr-plugin-wirbelscan vdr-plugin-wirbelscancontrol vdr-plugin-xmltv2vdr\"\nPKG_SECTION=\"service.multimedia\"\nPKG_SHORTDESC=\"VDR: a TV streaming server for Linux\"\nPKG_LONGDESC=\"VDR (2.6.x) is a TV streaming server for Linux supporting DVB-S/S2, DVB-C, DVB-T/T2, IPTV and SAT>IP\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"VDR PVR Backend\"\nPKG_ADDON_TYPE=\"xbmc.service\"\nPKG_ADDON_REQUIRES=\"pvr.vdr.vnsi:0.0.0 script.config.vdr:0.0.0\"\n\naddon() {\n  # create dirs\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/{bin,lib,plugin,locale}\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/config/epgsources\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/config/plugins/{eepg,epgfixer,epgsearch,streamdev-server,vnsiserver}\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/res/plugins/{live,restfulapi}\n\n  # configs\n  cp -P $(get_build_dir vdr)/{diseqc.conf,keymacros.conf,scr.conf,sources.conf,svdrphosts.conf} ${ADDON_BUILD}/${PKG_ADDON_ID}/config\n  cp -P $(get_build_dir vdr-plugin-epgfixer)/epgfixer/*.conf ${ADDON_BUILD}/${PKG_ADDON_ID}/config/plugins/epgfixer\n  cp -P $(get_build_dir vdr-plugin-streamdev)/streamdev-server/streamdevhosts.conf ${ADDON_BUILD}/${PKG_ADDON_ID}/config/plugins/streamdev-server\n  cp -P $(get_build_dir vdr-plugin-vnsiserver)/vnsiserver/allowed_hosts.conf ${ADDON_BUILD}/${PKG_ADDON_ID}/config/plugins/vnsiserver\n\n  touch ${ADDON_BUILD}/${PKG_ADDON_ID}/config/channels.conf\n  echo '0.0.0.0/0' >> ${ADDON_BUILD}/${PKG_ADDON_ID}/config/svdrphosts.conf\n\n  # copy static files\n  cp -PR $(get_build_dir vdr-plugin-restfulapi)/web/* \\\n         $(get_build_dir vdr-plugin-restfulapi)/API.html \\\n         ${ADDON_BUILD}/${PKG_ADDON_ID}/res/plugins/restfulapi\n\n  cp -PR $(get_build_dir vdr-plugin-live)/live/* ${ADDON_BUILD}/${PKG_ADDON_ID}/res/plugins/live\n\n  cp -P $(get_build_dir vdr-plugin-xmltv2vdr)/dist/epgdata2xmltv/epgdata2xmltv.dist ${ADDON_BUILD}/${PKG_ADDON_ID}/config/epgsources/epgdata2xmltv\n\n  # copy binaries\n  for pkg in ddci2 dummydevice dvbapi eepg epgfixer epgsearch iptv live restfulapi robotv satip vnsiserver wirbelscan wirbelscancontrol xmltv2vdr; do\n    cp -PR $(get_build_dir vdr-plugin-${pkg})/libvdr*.so.* ${ADDON_BUILD}/${PKG_ADDON_ID}/plugin\n  done\n\n  # copy locale (omit ddci, dummydevice, robotv)\n  for pkg in dvbapi eepg epgfixer epgsearch iptv live restfulapi satip vnsiserver wirbelscan wirbelscancontrol xmltv2vdr; do\n    cp -PR $(get_build_dir vdr-plugin-${pkg})/locale/* ${ADDON_BUILD}/${PKG_ADDON_ID}/locale\n  done\n\n  cp -P $(get_build_dir vdr-plugin-streamdev)/client/libvdr*.so.* \\\n        $(get_build_dir vdr-plugin-streamdev)/server/libvdr*.so.* \\\n        ${ADDON_BUILD}/${PKG_ADDON_ID}/plugin\n  cp -PR $(get_build_dir vdr-plugin-streamdev)/client/locale/* \\\n        $(get_build_dir vdr-plugin-streamdev)/server/locale/* \\\n        ${ADDON_BUILD}/${PKG_ADDON_ID}/locale\n\n  cp -PL $(get_install_dir tntnet)/usr/lib/libtntnet.so.13 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n\n  cp -P $(get_build_dir vdr)/vdr ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/vdr.bin\n  cp -PR $(get_build_dir vdr)/locale/* ${ADDON_BUILD}/${PKG_ADDON_ID}/locale\n\n  cp -P $(get_build_dir vdr-plugin-xmltv2vdr)/dist/epgdata2xmltv/epgdata2xmltv ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n}\n"
  },
  {
    "path": "packages/addons/service/vdr-addon/source/bin/vdr.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.multimedia.vdr-addon\n\nfix_config() {\n  if [ -f \"$ADDON_CONFIG_DIR/setup.conf\" ]; then\n    sed -i -e '/^$/d' $ADDON_CONFIG_DIR/setup.conf\n    sed -i -e '/^AlwaysSortFoldersFirst.*$/d' $ADDON_CONFIG_DIR/setup.conf\n    sed -i -e '/^SetSystemTime.*$/d' $ADDON_CONFIG_DIR/setup.conf\n    sed -i -e '/^epgsearch.SVDRPPort.*$/d' $ADDON_CONFIG_DIR/setup.conf\n    sed -i -e '/^OSD.*$/d' $ADDON_CONFIG_DIR/setup.conf\n    sed -i -e '/^Font.*$/d' $ADDON_CONFIG_DIR/setup.conf\n  fi\n  cat >>$ADDON_CONFIG_DIR/setup.conf << MYDATA\nAlwaysSortFoldersFirst = 1\nSetSystemTime = 0\nepgsearch.SVDRPPort = 6419\nOSDSkin = sttng\nMYDATA\n}\n\nADDON_CONFIG_DIR=\"$ADDON_HOME/config\"\nADDON_PLUGIN_DIR=\"$ADDON_DIR/plugin\"\n\nchmod a+x $ADDON_DIR/bin/*\n\nADDON_CACHE_DIR=\"$ADDON_HOME/cache\"\nmkdir -p $ADDON_CACHE_DIR\n\nVDR_ARG=\"-g /tmp --no-kbd\"\nif [ \"$DEBUG\" = \"yes\" -o \"$ENABLE_VDR_DEBUG\" == \"true\" ]; then\n  VDR_ARG=\"$VDR_ARG --log=3\"\nelse\n  VDR_ARG=\"$VDR_ARG --log=1\"\nfi\n\nSVDRP_PORT=0\n\n# epgsearch needs svdrp\nif [ \"$ENABLE_EPGSEARCH\" == \"true\" ] ; then\n  SVDRP_PORT=6419\nfi\nVDR_ARG=\"$VDR_ARG --port=$SVDRP_PORT\"\n\nVDR_ARG=\"$VDR_ARG --dirnames=,,1\"\n\nVDR_ARG=\"$VDR_ARG --config=$ADDON_CONFIG_DIR\"\nVDR_ARG=\"$VDR_ARG --resdir=$ADDON_DIR/res\"\nVDR_ARG=\"$VDR_ARG --cachedir=$ADDON_CACHE_DIR\"\nVDR_ARG=\"$VDR_ARG --lib=$ADDON_PLUGIN_DIR\"\nVDR_ARG=\"$VDR_ARG --video=\\\"$VDR_VIDEO_DIR\\\"\"\nVDR_ARG=\"$VDR_ARG --localedir=$ADDON_DIR/locale\"\n\nif [ \"$ENABLE_EXTERNAL_RECCMD\" == \"true\" ] ; then\n  if [ ! -z \"$EXTERNAL_RECCMD_PATH\" -a -x \"$EXTERNAL_RECCMD_PATH\" ] ; then\n    VDR_ARG=\"$VDR_ARG -r \\\"$EXTERNAL_RECCMD_PATH\\\"\"\n  fi\nfi\n\nif [ \"$ENABLE_CHARSET_OVERRIDE\" == \"true\" ] ; then\n  if [ ! -z \"$CHARSET_OVERRIDE_STR\" ] ; then\n    VDR_ARG=\"$VDR_ARG --chartab=$CHARSET_OVERRIDE_STR\"\n  fi\nfi\n\n# keep softcam first\nif [ \"$ENABLE_SOFTCAM\" == \"true\" ] ; then\n  VDR_ARG=\"$VDR_ARG -P dvbapi\"\nfi\nVDR_ARG=\"$VDR_ARG -P wirbelscan -P wirbelscancontrol\"\nif [ \"$ENABLE_IPTV\" == \"true\" ] ; then\n  VDR_ARG=\"$VDR_ARG -P 'iptv -d $IPTV_NUM_DEVICES'\"\nfi\nif [ \"$ENABLE_STREAMDEV_SERVER\" == \"true\" ] ; then\n  VDR_ARG=\"$VDR_ARG -P streamdev-server\"\nfi\nif [ \"$ENABLE_STREAMDEV_CLIENT\" == \"true\" ] ; then\n  VDR_ARG=\"$VDR_ARG -P streamdev-client\"\nfi\nif [ \"$ENABLE_LIVE\" == \"true\" ] ; then\n  VDR_ARG=\"$VDR_ARG -P 'live -i $LIVE_IP -p $LIVE_PORT'\"\nfi\nif [ \"$ENABLE_EEPG\" == \"true\" ] ; then\n  VDR_ARG=\"$VDR_ARG -P eepg\"\nfi\nif [ \"$ENABLE_EPGFIXER\" == \"true\" ] ; then\n  VDR_ARG=\"$VDR_ARG -P epgfixer\"\nfi\nif [ \"$ENABLE_EPGSEARCH\" == \"true\" ] ; then\n  VDR_ARG=\"$VDR_ARG -P epgsearch\"\nfi\nif [ \"$ENABLE_DUMMYDEVICE\" == \"true\" \\\n     -o ! \\( -d /dev/dvb/adapter0 -o \"$WAIT_FOR_FEINIT\" == \"true\" \\\n             -o \"$ENABLE_SATIP\" == \"true\" \\\n             -o \"$ENABLE_STREAMDEV_CLIENT\" == \"true\" \\) ] ; then\n  VDR_ARG=\"$VDR_ARG -P dummydevice\"\nelse\n  VNSI_ARG=\" -d\"\nfi\nif [ \"$ENABLE_SATIP\" == \"true\" ] ; then\n  VDR_ARG=\"$VDR_ARG -P 'satip -d $SATIP_NUM_DEVICES'\"\nfi\nif [ \"$ENABLE_XMLTV2VDR\" == \"true\" ] ; then\n  VDR_ARG=\"$VDR_ARG -P 'xmltv2vdr --epgfile=$ADDON_CACHE_DIR/epg.db'\"\n  # xmltv2vdr needs /var/run/vdr\n  grep -q \" /var/run/vdr \" /proc/mounts || ( mkdir -p /var/run/vdr && mount -t tmpfs -o size=10% tmpfs /var/run/vdr )\n  #handle epgsources\n  mkdir -p /var/lib/epgsources\n  mkdir -p $ADDON_HOME/config/epgsources\n  for source in `find $ADDON_DIR/config/epgsources -type f`; do\n    if [ ! -e $ADDON_HOME/config/epgsources/`basename $source` ] ; then\n      cp $source $ADDON_HOME/config/epgsources/\n    fi\n  done\n  for source in `find $ADDON_HOME/config/epgsources -type f`; do\n    cp $source /var/lib/epgsources\n  done\nfi\nif [ \"$ENABLE_ROBOTV\" == \"true\" ] ; then\n  VDR_ARG=\"$VDR_ARG -P robotv\"\nfi\nif [ \"$ENABLE_DDCI2\" == \"true\" ] ; then\n  VDR_ARG=\"$VDR_ARG -P ddci2\"\nfi\n\nif [ ! -d \"$ADDON_HOME/epgimages\" ]; then\n  mkdir -p \"$ADDON_HOME/epgimages\"\nfi\nif [ ! -z \"$ADDON_HOME/channellogos\" ]; then\n  mkdir -p \"$ADDON_HOME/channellogos\"\nfi\n\nRESTFULAPI_ARGS=\"--ip $RESTFULAPI_IP --port $RESTFULAPI_PORT\"\nRESTFULAPI_ARGS=\"$RESTFULAPI_ARGS --epgimages=\\\"$ADDON_HOME/epgimages\\\"\"\nRESTFULAPI_ARGS=\"$RESTFULAPI_ARGS --channellogos=\\\"$ADDON_HOME/channellogos\\\"\"\nVDR_ARG=\"$VDR_ARG -P 'restfulapi $RESTFULAPI_ARGS'\"\n\n# vnsi last\nVDR_ARG=\"$VDR_ARG -P 'vnsiserver$VNSI_ARG'\"\n\ncd $ADDON_DIR/config\nmkdir -p $ADDON_CONFIG_DIR\nmkdir -p \"$VDR_VIDEO_DIR\"\n\nfor dir in `find . -type d`; do\n  mkdir -p $ADDON_CONFIG_DIR/$dir\ndone\n\nfor config in `find . -type f`; do\n  if [ ! -f $ADDON_CONFIG_DIR/$config ]; then\n    cp $config $ADDON_CONFIG_DIR/$config\n  fi\ndone\n\n# start userspace DVB driver/addon\nfor driver_dvb in $(find /storage/.kodi/addons/driver.dvb.*/bin/userspace-driver.sh -type f 2>/dev/null); do\n  driver_dvb_name=$(echo $driver_dvb | awk 'BEGIN {FS=\"/\"} {printf(\"%s\", $5)}')\n  logger -t VDR \"### Loading userspace DVB driver: $driver_dvb_name ###\"\n  # use \". \" because of variable export\n  . $driver_dvb\ndone\n\nif [ \"$WAIT_FOR_FEINIT\" == \"true\" ] ; then\n  while [ true ] ; do\n    if [ -e /dev/dvb/adapter$((NUM_ADAPTERS-1))/frontend0 ] ; then\n      break\n    fi\n    sleep 1\n  done\nfi\n\nfix_config\n\nif [ \"$ENABLE_VDR_DEBUG\" == \"true\" ] ; then\n  /usr/bin/journalctl -b -0 -f -u service.multimedia.vdr-addon > $ADDON_LOG_FILE &\n  sleep 1\nfi\n\n[ -z \"$LANG\" ] && export LANG=en_US.UTF-8\n\neval exec vdr.bin $VDR_ARG\n"
  },
  {
    "path": "packages/addons/service/vdr-addon/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\n\nclass Monitor(xbmc.Monitor):\n\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\n\nif __name__ == \"__main__\":\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "packages/addons/service/vdr-addon/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: vdr-addon\n# Addon id: service.multimedia.vdr-addon\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"DVB\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"PLUGINS\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"VDR\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"DVB Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"Unload DVB modules before suspend\"\nmsgstr \"\"\n\nmsgctxt \"#30005\"\nmsgid \"Wait for frontend initialization\"\nmsgstr \"\"\n\nmsgctxt \"#30006\"\nmsgid \"Number of adapters to wait for\"\nmsgstr \"\"\n\nmsgctxt \"#30007\"\nmsgid \"Enable charset override\"\nmsgstr \"\"\n\nmsgctxt \"#30008\"\nmsgid \"- charset\"\nmsgstr \"\"\n\nmsgctxt \"#30009\"\nmsgid \"Plugin Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30010\"\nmsgid \"Enable plugin: iptv\"\nmsgstr \"\"\n\nmsgctxt \"#30011\"\nmsgid \"Enable plugin: streamdev-client\"\nmsgstr \"\"\n\nmsgctxt \"#30012\"\nmsgid \"Enable plugin: streamdev-server\"\nmsgstr \"\"\n\nmsgctxt \"#30013\"\nmsgid \"Enable plugin: dvbapi (softcam)\"\nmsgstr \"\"\n\nmsgctxt \"#30014\"\nmsgid \"Enable plugin: live\"\nmsgstr \"\"\n\nmsgctxt \"#30015\"\nmsgid \"- listen on ip\"\nmsgstr \"\"\n\nmsgctxt \"#30016\"\nmsgid \"- listen on port\"\nmsgstr \"\"\n\nmsgctxt \"#30017\"\nmsgid \"Enable plugin: epgsearch\"\nmsgstr \"\"\n\nmsgctxt \"#30018\"\nmsgid \"Enable plugin: xmltv2vdr\"\nmsgstr \"\"\n\nmsgctxt \"#30019\"\nmsgid \"Enable plugin: extended EPG\"\nmsgstr \"\"\n\nmsgctxt \"#30020\"\nmsgid \"Enable plugin: dummydevice\"\nmsgstr \"\"\n\nmsgctxt \"#30021\"\nmsgid \"Enable plugin: satip\"\nmsgstr \"\"\n\nmsgctxt \"#30022\"\nmsgid \"Enable plugin: epgfixer\"\nmsgstr \"\"\n\nmsgctxt \"#30023\"\nmsgid \"VDR Configuration\"\nmsgstr \"\"\n\nmsgctxt \"#30024\"\nmsgid \"VDR Video Dir\"\nmsgstr \"\"\n\nmsgctxt \"#30025\"\nmsgid \"Enable external recdmd\"\nmsgstr \"\"\n\nmsgctxt \"#30026\"\nmsgid \"External recdmd path\"\nmsgstr \"\"\n\nmsgctxt \"#30027\"\nmsgid \"- number of devices\"\nmsgstr \"\"\n\nmsgctxt \"#30028\"\nmsgid \"restfulapi plugin options\"\nmsgstr \"\"\n\nmsgctxt \"#30029\"\nmsgid \"- listen on ip\"\nmsgstr \"\"\n\nmsgctxt \"#30030\"\nmsgid \"- listen on port\"\nmsgstr \"\"\n\nmsgctxt \"#30031\"\nmsgid \"Enable plugin: roboTV\"\nmsgstr \"\"\n\nmsgctxt \"#30032\"\nmsgid \"Enable plugin: DDCI2\"\nmsgstr \"\"\n\nmsgctxt \"#30033\"\nmsgid \"DEBUG\"\nmsgstr \"\"\n\nmsgctxt \"#30034\"\nmsgid \"VDR Debugging\"\nmsgstr \"\"\n\nmsgctxt \"#30035\"\nmsgid \"Enable Debug Log\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/service/vdr-addon/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n    <category label=\"30000\">\n                <setting label=\"30003\" type=\"lsep\" />\n                <setting type=\"sep\" />\n                <setting id=\"WAIT_FOR_FEINIT\" type=\"bool\" label=\"30005\" default=\"false\" />\n                <setting id=\"NUM_ADAPTERS\" type=\"slider\" range=\"1,16\" option=\"int\" label=\"30006\" default=\"1\" enable=\"eq(-1,true)\" />\n                <setting id=\"REMOVE_MODULES\" type=\"text\" label=\"30004\" values=\"\" default=\"\" />\n                <setting id=\"ENABLE_CHARSET_OVERRIDE\" type=\"bool\" label=\"30007\" default=\"false\" />\n                <setting id=\"CHARSET_OVERRIDE_STR\" type=\"text\" label=\"30008\" visible=\"!eq(-1,false)\" default=\"\" />\n    </category>\n    <category label=\"30002\">\n                <setting label=\"30023\" type=\"lsep\"/>\n                <setting type=\"sep\" />\n                <setting id=\"VDR_VIDEO_DIR\" type=\"folder\" label=\"30024\" value=\"\" default=\"/storage/videos\" />\n                <setting type=\"sep\" />\n                <setting id=\"ENABLE_EXTERNAL_RECCMD\" type=\"bool\" label=\"30025\" default=\"false\" />\n                <setting id=\"EXTERNAL_RECCMD_PATH\" type=\"file\" label=\"30026\" visible=\"!eq(-1,false)\" default=\"\" />\n    </category>\n    <category label=\"30001\">\n                <setting label=\"30009\" type=\"lsep\" />\n                <setting type=\"sep\" />\n                <setting id=\"ENABLE_DDCI2\" type=\"bool\" label=\"30032\" default=\"false\" />\n                <setting id=\"ENABLE_DUMMYDEVICE\" type=\"bool\" label=\"30020\" default=\"false\" />\n                <setting id=\"ENABLE_SOFTCAM\" type=\"bool\" label=\"30013\" default=\"false\" />\n                <setting id=\"ENABLE_EPGFIXER\" type=\"bool\" label=\"30022\" default=\"false\" />\n                <setting id=\"ENABLE_EPGSEARCH\" type=\"bool\" label=\"30017\" default=\"false\" />\n                <setting id=\"ENABLE_EEPG\" type=\"bool\" label=\"30019\" default=\"false\" />\n                <setting id=\"ENABLE_IPTV\" type=\"bool\" label=\"30010\" default=\"false\" />\n                <setting id=\"IPTV_NUM_DEVICES\" type=\"slider\" option=\"int\" range=\"1,4\" label=\"30027\" visible=\"!eq(-1,false)\" default=\"1\" />\n                <setting id=\"ENABLE_LIVE\" type=\"bool\" label=\"30014\" default=\"false\" />\n                <setting id=\"LIVE_IP\" type=\"ipaddress\" label=\"30015\" values=\"\" visible=\"!eq(-1,false)\" default=\"0.0.0.0\" />\n                <setting id=\"LIVE_PORT\" type=\"number\" label=\"30016\" values=\"\" visible=\"!eq(-2,false)\"  default=\"8008\" />\n                <setting id=\"ENABLE_ROBOTV\" type=\"bool\" label=\"30031\" default=\"false\" />\n                <setting id=\"ENABLE_SATIP\" type=\"bool\" label=\"30021\" default=\"false\" />\n                <setting id=\"SATIP_NUM_DEVICES\" type=\"slider\" option=\"int\" range=\"1,10\" label=\"30027\" visible=\"!eq(-1,false)\" default=\"1\" />\n                <setting id=\"ENABLE_STREAMDEV_CLIENT\" type=\"bool\" label=\"30011\" default=\"false\" />\n                <setting id=\"ENABLE_STREAMDEV_SERVER\" type=\"bool\" label=\"30012\" default=\"false\" />\n                <setting id=\"ENABLE_XMLTV2VDR\" type=\"bool\" label=\"30018\" default=\"false\" />\n                <setting type=\"lsep\" label=\"30028\" />\n                <setting id=\"RESTFULAPI_IP\" type=\"ipaddress\" label=\"30029\" values=\"\" default=\"127.0.0.1\" />\n                <setting id=\"RESTFULAPI_PORT\" type=\"number\" label=\"30030\" values=\"\" default=\"8002\" />\n    </category>\n    <category label=\"30033\">\n                <setting label=\"30034\" type=\"lsep\" />\n                <setting type=\"sep\" />\n                <setting id=\"ENABLE_VDR_DEBUG\" type=\"bool\" label=\"30035\" default=\"false\" />\n    </category>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/vdr-addon/source/settings-default.xml",
    "content": "<settings version=\"2\">\n    <setting id=\"CHARSET_OVERRIDE_STR\" default=\"true\"></setting>\n    <setting id=\"ENABLE_CHARSET_OVERRIDE\" default=\"true\">false</setting>\n    <setting id=\"ENABLE_DDCI2\" default=\"true\">false</setting>\n    <setting id=\"ENABLE_DUMMYDEVICE\" default=\"true\">false</setting>\n    <setting id=\"ENABLE_EEPG\" default=\"true\">false</setting>\n    <setting id=\"ENABLE_EPGFIXER\" default=\"true\">false</setting>\n    <setting id=\"ENABLE_EPGSEARCH\" default=\"true\">false</setting>\n    <setting id=\"ENABLE_EXTERNAL_RECCMD\" default=\"true\">false</setting>\n    <setting id=\"ENABLE_IPTV\" default=\"true\">false</setting>\n    <setting id=\"ENABLE_LIVE\" default=\"true\">false</setting>\n    <setting id=\"ENABLE_ROBOTV\" default=\"true\">false</setting>\n    <setting id=\"ENABLE_SATIP\" default=\"true\">false</setting>\n    <setting id=\"ENABLE_SOFTCAM\">true</setting>\n    <setting id=\"ENABLE_STREAMDEV_CLIENT\" default=\"true\">false</setting>\n    <setting id=\"ENABLE_STREAMDEV_SERVER\" default=\"true\">false</setting>\n    <setting id=\"ENABLE_VDR_DEBUG\" default=\"true\">false</setting>\n    <setting id=\"ENABLE_XMLTV2VDR\" default=\"true\">false</setting>\n    <setting id=\"EXTERNAL_RECCMD_PATH\" default=\"true\"></setting>\n    <setting id=\"IPTV_NUM_DEVICES\">1</setting>\n    <setting id=\"LIVE_IP\" default=\"true\">0.0.0.0</setting>\n    <setting id=\"LIVE_PORT\">8008</setting>\n    <setting id=\"NUM_ADAPTERS\">1</setting>\n    <setting id=\"REMOVE_MODULES\" default=\"true\"></setting>\n    <setting id=\"RESTFULAPI_IP\" default=\"true\">127.0.0.1</setting>\n    <setting id=\"RESTFULAPI_PORT\">8002</setting>\n    <setting id=\"SATIP_NUM_DEVICES\">1</setting>\n    <setting id=\"VDR_VIDEO_DIR\" default=\"true\">/storage/videos</setting>\n    <setting id=\"WAIT_FOR_FEINIT\" default=\"true\">false</setting>\n</settings>\n"
  },
  {
    "path": "packages/addons/service/vdr-addon/source/sleep.d/vdr.power",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\noe_setup_addon service.multimedia.vdr-addon\n\nSERVICE=\"service.multimedia.vdr-addon.service\"\n\ncase \"$1\" in\n  pre)\n    if systemctl is-active \"$SERVICE\" &>/dev/null ; then\n      systemctl stop \"$SERVICE\"\n      for module in $REMOVE_MODULES ; do\n        rmmod $module\n      done\n    fi\n    ;;\n  post)\n    if systemctl is-enabled \"$SERVICE\" &>/dev/null ; then\n      for module in $REMOVE_MODULES ; do\n        modprobe $module\n      done\n      systemctl start \"$SERVICE\"\n    fi\n    ;;\nesac\n\n"
  },
  {
    "path": "packages/addons/service/vdr-addon/source/system.d/service.multimedia.vdr-addon.service",
    "content": "[Unit]\nDescription=vdr\nAfter=graphical.target\nBefore=kodi.service\n\n[Service]\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.multimedia.vdr-addon/bin/vdr.start\"\nTimeoutStopSec=5\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/addons/service/webgrabplus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"webgrabplus\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Add-on removed\"\nPKG_LONGDESC=\"Add-on removed\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_ADDON_BROKEN=\"Webgrab++ is no longer maintained and has been removed.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"WebGrab+Plus\"\nPKG_ADDON_TYPE=\"xbmc.broken\"\n\naddon() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/skin/estouchy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"estouchy\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kodi.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"TexturePacker:host\"\nPKG_DEPENDS_UNPACK=\"kodi\"\nPKG_SECTION=\"skin\"\nPKG_SHORTDESC=\"Kodi skin Estouchy\"\nPKG_LONGDESC=\"Kodi skin Estouchy\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Estouchy\"\nPKG_ADDON_TYPE=\"xbmc.gui.skin\"\n\nmake_target() {\n  TexturePacker -dupecheck -input $(get_build_dir kodi)/addons/skin.estouchy/media/ -output Textures.xbt\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}\n    cp -a $(get_build_dir kodi)/addons/skin.estouchy/* ${ADDON_BUILD}/${PKG_ADDON_ID}\n\trm -rf ${ADDON_BUILD}/${PKG_ADDON_ID}/media/*\n\tcp ${PKG_BUILD}/Textures.xbt ${ADDON_BUILD}/${PKG_ADDON_ID}/media\n}\n"
  },
  {
    "path": "packages/addons/tools/btrfs-progs/changelog.txt",
    "content": "2\n- btrfs-progs: update to 6.3.3\n\n1\n- btrfs-progs: update to 6.2.2\n"
  },
  {
    "path": "packages/addons/tools/btrfs-progs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"btrfs-progs\"\nPKG_VERSION=\"6.3.3\"\nPKG_SHA256=\"0e55374e448ad4d8876db9c676669bedc16cb763e2493b14c245df8c5d00064b\"\nPKG_REV=\"2\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://btrfs.wiki.kernel.org/index.php/Main_Page\"\nPKG_URL=\"https://github.com/kdave/btrfs-progs/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain util-linux zlib systemd lzo\"\nPKG_SECTION=\"tools\"\nPKG_SHORTDESC=\"tools for the btrfs filesystem\"\nPKG_LONGDESC=\"tools for the btrfs filesystem\"\nPKG_TOOLCHAIN=\"configure\"\n\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"BTRFS Tools\"\nPKG_ADDON_TYPE=\"xbmc.python.script\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-backtrace \\\n                           --disable-convert \\\n                           --disable-documentation \\\n                           --disable-python \\\n                           --disable-zstd\"\n\npre_configure_target() {\n  ./autogen.sh\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n    cp -P ${PKG_INSTALL}/usr/bin/{btrfs,btrfsck,btrfstune,fsck.btrfs,mkfs.btrfs} ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n}\n"
  },
  {
    "path": "packages/addons/tools/btrfs-progs/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport xbmcgui\n\ndialog = xbmcgui.Dialog()\ndialog.ok('', 'This is a console-only addon')\n"
  },
  {
    "path": "packages/addons/tools/dotnet-runtime/changelog.txt",
    "content": "7\n- aspnet6-runtime: update to 6.0.24\n\n6\n- aspnet6-runtime: update to 6.0.21\n\n5\n- aspnet6-runtime: update to 6.0.20\n\n4\n- aspnet6-runtime: update to 6.0.19\n\n3\n- aspnet6-runtime: update to 6.0.18\n\n2\n- aspnet6-runtime: update to 6.0.16\n\n1\n- aspnet6-runtime: update to 6.0.15\n"
  },
  {
    "path": "packages/addons/tools/dotnet-runtime/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dotnet-runtime\"\nPKG_REV=\"7\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://dotnet.microsoft.com/\"\nPKG_DEPENDS_TARGET=\"toolchain icu aspnet6-runtime\"\nPKG_SECTION=\"tools\"\nPKG_SHORTDESC=\"ASP.NET Core Runtime\"\nPKG_LONGDESC=\"ASP.NET Core Runtime ($(get_pkg_version aspnet6-runtime)) enables you to run existing console/web/server applications.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"ASP.Net Core Runtimes\"\nPKG_ADDON_PROJECTS=\"any !RPi1\"\nPKG_ADDON_TYPE=\"xbmc.python.script\"\nPKG_MAINTAINER=\"Anton Voyl (awiouy)\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -r $(get_build_dir aspnet6-runtime)/* \\\n          ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n    cp -L $(get_install_dir icu)/usr/lib/lib*.so.?? \\\n          ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n}\n"
  },
  {
    "path": "packages/addons/tools/dvb-tools/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/tools/dvb-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dvb-tools\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"virtual\"\nPKG_SHORTDESC=\"DVB-Tools: is a bundle of dvb tools and programs\"\nPKG_LONGDESC=\"This bundle currently includes blindscan-s2, dvb-apps, dvblast, dvbsnoop, mumudvb, szap-s2, tune-s2, t2scan and w_scan.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"DVB Tools\"\nPKG_ADDON_TYPE=\"xbmc.python.script\"\n\nPKG_DEPENDS_TARGET=\"toolchain \\\n                    blindscan-s2 \\\n                    dvb-apps \\\n                    dvblast \\\n                    dvbsnoop \\\n                    mumudvb \\\n                    szap-s2 \\\n                    tune-s2 \\\n                    t2scan \\\n                    w_scan\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n\n    # blindscan-s2\n    cp -P $(get_install_dir blindscan-s2)/usr/bin/blindscan-s2 ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # dvb-apps\n    cp -P $(get_install_dir dvb-apps)/usr/bin/dvbdate ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir dvb-apps)/usr/bin/dvbnet ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir dvb-apps)/usr/bin/dvbscan ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir dvb-apps)/usr/bin/dvbtraffic ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir dvb-apps)/usr/bin/femon ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir dvb-apps)/usr/bin/scan ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir dvb-apps)/usr/bin/azap ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir dvb-apps)/usr/bin/czap ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir dvb-apps)/usr/bin/szap ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir dvb-apps)/usr/bin/tzap ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir dvb-apps)/usr/bin/zap ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # dvblast\n    cp -P $(get_install_dir dvblast)/usr/bin/dvblast ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # dvbsnoop\n    cp -P $(get_install_dir dvbsnoop)/usr/bin/dvbsnoop ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # mumudvb\n    cp -P $(get_install_dir mumudvb)/usr/bin/mumudvb ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # szap-s2\n    cp -P $(get_install_dir szap-s2)/usr/bin/szap-s2 ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # tune-s2\n    cp -P $(get_install_dir tune-s2)/usr/bin/tune-s2 ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # t2scan\n    cp -P $(get_install_dir t2scan)/usr/bin/t2scan ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # w_scan\n    cp -P $(get_install_dir w_scan)/usr/bin/w_scan ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n}\n"
  },
  {
    "path": "packages/addons/tools/dvb-tools/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport xbmcgui\n\ndialog = xbmcgui.Dialog()\ndialog.ok('', 'This is a console-only addon')\n"
  },
  {
    "path": "packages/addons/tools/ffmpeg-tools/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/tools/ffmpeg-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ffmpeg-tools\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain ffmpegx\"\nPKG_SECTION=\"tools\"\nPKG_SHORTDESC=\"FFmpeg binary for transcoding and audio/video manipulating.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"FFmpeg Tools\"\nPKG_ADDON_TYPE=\"xbmc.python.script\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/{bin,lib}\n\n  cp -L $(get_install_dir ffmpegx)/usr/local/bin/* ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n  # libs\n  if [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n    cp -PL $(get_install_dir x265)/usr/lib/libx265.so.199 \\\n           ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n  fi\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    cp -PL $(get_install_dir libxcb)/usr/lib/{libxcb.so.1,libxcb-shm.so.0,libxcb-shape.so.0,libxcb-xfixes.so.0} \\\n           ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n  fi\n}\n"
  },
  {
    "path": "packages/addons/tools/ffmpeg-tools/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nimport xbmcaddon\nimport xbmcgui\n\ndialog = xbmcgui.Dialog()\nstrings  = xbmcaddon.Addon().getLocalizedString\n\ndialog.ok(strings(30000), strings(30001))\n"
  },
  {
    "path": "packages/addons/tools/ffmpeg-tools/source/resources/language/English/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: ffmpeg-tools\n# Addon id: tools.ffmpeg-tools\n# Addon Provider: Team LibreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#30000\"\nmsgid \"FFmpeg Tools Help\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Please have a look at our Wiki (https://libreelec.wiki) for instructions how the FFmpeg binary could be used.\"\nmsgstr \"\"\n"
  },
  {
    "path": "packages/addons/tools/flirc_util/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/tools/flirc_util/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"flirc_util\"\nPKG_VERSION=\"8d3c86e8bb419ad44297c1b186f0cdc7dfcac915\" # 30/10/2023\nPKG_SHA256=\"fc460e6ce5477cb6b83c90a5f8b2ebb9876ed23cdd813a6a4a0fdc3730052a2b\"\nPKG_LICENSE=\"FLIRC\"\nPKG_SITE=\"http://www.flirc.tv\"\nPKG_URL=\"https://github.com/flirc/sdk/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain hidapi libusb\"\nPKG_SECTION=\"tools\"\nPKG_SHORTDESC=\"CLI utility for flirc IR receivers\"\nPKG_LONGDESC=\"Command-Line utility for configuring flirc IR receivers\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"flirc_util\"\nPKG_ADDON_TYPE=\"xbmc.python.script\"\n\nmake_target() {\n  cd cli\n  make VERBOSE=\"1\" \\\n       CONFIG=\"release\" \\\n       HOSTOS=\"LIBREELEC\" \\\n       MACHINE=\"Linux_${TARGET_ARCH}\" \\\n       BUILDDIR_ROOT=\"${PKG_BUILD}/build\" \\\n       BUILDDIR=\"${PKG_BUILD}/build\" \\\n       LSEARCH+=\" -L../libs/Linux_${TARGET_ARCH}\" \\\n       flirc_util\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/{bin,lib}\n    cp -P ${PKG_BUILD}/build/flirc_util ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n    cp -P $(get_install_dir hidapi)/usr/lib/libhidapi-hidraw.so* ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n}\n"
  },
  {
    "path": "packages/addons/tools/flirc_util/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport xbmcgui\nimport subprocess\n\nxbmcgui.Dialog().ok('', 'This is a console-only addon')\n\n"
  },
  {
    "path": "packages/addons/tools/game-tools/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/tools/game-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game-tools\"\nPKG_VERSION=\"\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"virtual\"\nPKG_SHORTDESC=\"A bundle of game tools and programs\"\nPKG_LONGDESC=\"This bundle currently includes bchunk, ecm-tools, iat, and linuxconsoletools\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Game Tools\"\nPKG_ADDON_TYPE=\"xbmc.python.script\"\n\nPKG_DEPENDS_TARGET=\"toolchain \\\n                    bchunk \\\n                    ecm-tools \\\n                    iat \\\n                    linuxconsoletools\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n    # bchunk\n    cp -P $(get_install_dir bchunk)/usr/bin/bchunk ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # ecm-tools\n    cp -P $(get_install_dir ecm-tools)/usr/bin/bin2ecm ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    ln -s bin2ecm ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/ecm2bin\n\n    # iat\n    cp -P $(get_install_dir iat)/usr/bin/iat ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # linuxconsoletools\n    cp -P $(get_install_dir linuxconsoletools)/usr/bin/fftest ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir linuxconsoletools)/usr/bin/jscal ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir linuxconsoletools)/usr/bin/jstest ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n}\n"
  },
  {
    "path": "packages/addons/tools/game-tools/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport xbmcgui\nimport subprocess\n\nxbmcgui.Dialog().ok('', 'This is a console-only addon')\n\n"
  },
  {
    "path": "packages/addons/tools/jre.zulu/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/tools/jre.zulu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Peter Vicman (peter.vicman@gmail.com)\n\nPKG_NAME=\"jre.zulu\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_LICENSE=\"GPL2\"\nPKG_DEPENDS_TARGET=\"jre-libbluray libXext libXi libXrender chrome-libXtst jre-libXinerama\"\nPKG_DEPENDS_UNPACK=\"jdk-${TARGET_ARCH}-zulu\"\nPKG_SECTION=\"tools\"\nPKG_SHORTDESC=\"Java Runtime Environment 8 for Blu-ray Disc Java menus from Azul Systems.\"\nPKG_LONGDESC=\"${PKG_SHORTDESC}\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"JRE for BD-J menus\"\nPKG_ADDON_TYPE=\"xbmc.python.script\"\n\n# find ${1}.so.[0-9]* in ${2} and copy it to dest\n_pkg_copy_lib() {\n  find \"${2}/usr/lib\" -regextype sed -regex \".*/${1}\\.so\\.[0-9]*\" \\\n    -exec cp {} \"${ADDON_BUILD}/${PKG_ADDON_ID}/lib\" \\;\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n\n  cp -a $(get_build_dir jdk-${TARGET_ARCH}-zulu)/jre \\\n        $(get_install_dir jre-libbluray)/usr/share/java/*.jar \\\n        ${PKG_DIR}/profile.d \\\n    ${ADDON_BUILD}/${PKG_ADDON_ID}\n\n  # copy required libraries for JRE\n  _pkg_copy_lib libXtst $(get_install_dir chrome-libXtst)\n  _pkg_copy_lib libXinerama $(get_install_dir jre-libXinerama)\n\n  if [ \"${DISPLAYSERVER}\" != \"X11\" ]; then\n    _pkg_copy_lib libXi $(get_install_dir libXi)\n    _pkg_copy_lib libXrender $(get_install_dir libXrender)\n    _pkg_copy_lib libX11 $(get_install_dir libX11)\n    _pkg_copy_lib libXext $(get_install_dir libXext)\n    _pkg_copy_lib libxcb $(get_install_dir libxcb)\n  fi\n}\n"
  },
  {
    "path": "packages/addons/tools/jre.zulu/profile.d/jre.profile",
    "content": "# point to folder with jre\nexport JAVA_HOME=\"/storage/.kodi/addons/tools.jre.zulu\"\n\n# libbluray-*.jar in this folder (need / at the end)\nexport LIBBLURAY_CP=\"/storage/.kodi/addons/tools.jre.zulu/\"\n\n# or set file directly\n# export LIBBLURAY_CP=\"/storage/.kodi/addons/tools.jre.zulu/libbluray-j2se-1.0.2.jar\"\n"
  },
  {
    "path": "packages/addons/tools/jre.zulu/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n"
  },
  {
    "path": "packages/addons/tools/mono/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mono\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"tools\"\nPKG_SHORTDESC=\"Add-on removed\"\nPKG_LONGDESC=\"Add-on removed\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_ADDON_BROKEN=\"Mono is no longer maintained and has been removed.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Mono\"\nPKG_ADDON_TYPE=\"xbmc.broken\"\n\naddon() {\n  :\n}\n"
  },
  {
    "path": "packages/addons/tools/multimedia-tools/changelog.txt",
    "content": "2\n- libmediainfo: update to 23.07\n- libzen: update to 0.4.41\n- mediainfo: update to 23.07\n- mpv-drmprime: update to 0.36.0\n\n1\n- mpg123: update to 1.31.3\n- mpv-drmprime: update to 0.35.1\n"
  },
  {
    "path": "packages/addons/tools/multimedia-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"multimedia-tools\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"2\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"virtual\"\nPKG_SHORTDESC=\"A bundle of multimedia tools and programs\"\nPKG_LONGDESC=\"This bundle currently includes alsamixer, mediainfo, mpg123, opencaster, squeezelite, tsdecrypt and tstools.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Multimedia Tools\"\nPKG_ADDON_TYPE=\"xbmc.python.script\"\n\nPKG_DEPENDS_TARGET=\"toolchain \\\n                    alsa-utils \\\n                    mediainfo \\\n                    mpg123 \\\n                    opencaster \\\n                    squeezelite \\\n                    tsdecrypt \\\n                    tstools\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n    # alsamixer\n    cp -P $(get_install_dir alsa-utils)/.noinstall/alsamixer ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n\n    # mediainfo\n    cp -P $(get_install_dir mediainfo)/usr/bin/mediainfo ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # mpg123\n    cp -P $(get_install_dir mpg123)/usr/bin/* ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n\n    # opencaster\n    cp -P $(get_install_dir opencaster)/usr/bin/* ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n\n    # squeezelite\n    cp -P $(get_install_dir squeezelite)/usr/bin/squeezelite ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n\n    # tsdecrypt\n    cp -P $(get_install_dir tsdecrypt)/usr/bin/tsdecrypt ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # tstools\n    cp -P $(get_install_dir tstools)/usr/bin/* ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n}\n"
  },
  {
    "path": "packages/addons/tools/multimedia-tools/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport xbmcgui\n\ndialog = xbmcgui.Dialog()\ndialog.ok('', 'This is a console-only addon')\n"
  },
  {
    "path": "packages/addons/tools/network-tools/changelog.txt",
    "content": "1\n- iperf: update to 3.13\n- libpcap: update to 1.10.3\n- rar2fs: update to 1.29.6\n- tcpdump: update to 4.99.3\n"
  },
  {
    "path": "packages/addons/tools/network-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"network-tools\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"virtual\"\nPKG_SHORTDESC=\"A bundle of network tools and programs\"\nPKG_LONGDESC=\"This bundle currently includes bwm-ng, iftop, iperf, irssi, lftp, ncftp, ngrep, nmap, rar2fs, rsync, sshfs, sshpass, tcpdump, udpxy and wireless_tools.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Network Tools\"\nPKG_ADDON_TYPE=\"xbmc.python.script\"\n\nPKG_DEPENDS_TARGET=\"toolchain \\\n                    bwm-ng \\\n                    iftop \\\n                    iperf \\\n                    irssi \\\n                    lftp \\\n                    ncftp \\\n                    ngrep \\\n                    nmap \\\n                    rar2fs \\\n                    rsync \\\n                    sshfs \\\n                    sshpass \\\n                    tcpdump \\\n                    udpxy \\\n                    wireless_tools\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/{bin,lib}\n    # bwm-ng\n    cp -P $(get_install_dir bwm-ng)/usr/bin/bwm-ng ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # fuse\n    cp -P $(get_install_dir fuse)/usr/bin/{fusermount,ulockmgr_server} ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir fuse)/usr/sbin/mount.fuse ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir fuse)/usr/lib/{libfuse.so*,libulockmgr.so*} ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n\n    # fuse3\n    cp -P $(get_install_dir fuse3)/usr/bin/fusermount3 ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir fuse3)/usr/sbin/mount.fuse3  ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir fuse3)/usr/lib/libfuse3.so* ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n\n    # iftop\n    cp -P $(get_install_dir iftop)/usr/sbin/iftop ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # iperf\n    cp -P $(get_install_dir iperf)/usr/bin/iperf3 ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    ln -s iperf3 ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/iperf\n\n    # irssi\n    cp -P $(get_install_dir irssi)/usr/bin/irssi ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # lftp\n    cp -P $(get_install_dir lftp)/usr/bin/lftp ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # ncftp\n    cp -P $(get_install_dir ncftp)/usr/bin/ncftp ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir ncftp)/usr/bin/ncftpbatch ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir ncftp)/usr/bin/ncftpget ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir ncftp)/usr/bin/ncftpls ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir ncftp)/usr/bin/ncftpput ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # ngrep\n    cp -P $(get_install_dir ngrep)/usr/bin/ngrep ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # nmap\n    cp -P $(get_install_dir nmap)/usr/bin/nmap ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # rar2fs\n    cp -P $(get_install_dir rar2fs)/usr/bin/mkr2i ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir rar2fs)/usr/bin/rar2fs ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # rsync\n    cp -P $(get_install_dir rsync)/usr/bin/rsync ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # sshfs\n    cp -P $(get_install_dir sshfs)/usr/bin/sshfs ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # sshpass\n    cp -P $(get_install_dir sshpass)/usr/bin/sshpass ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # tcpdump\n    cp -P $(get_install_dir tcpdump)/usr/bin/tcpdump ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # udpxy\n    cp -P $(get_install_dir udpxy)/usr/bin/udpxy ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # wireless_tools\n    cp -P $(get_install_dir wireless_tools)/usr/sbin/iwconfig ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    ln -s iwconfig ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/iwgetid\n    ln -s iwconfig ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/iwlist\n    ln -s iwconfig ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/iwspy\n    ln -s iwconfig ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/iwpriv\n}\n"
  },
  {
    "path": "packages/addons/tools/network-tools/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport xbmcgui\n\ndialog = xbmcgui.Dialog()\ndialog.ok('', 'This is a console-only addon')\n"
  },
  {
    "path": "packages/addons/tools/rpi-tools/changelog.txt",
    "content": "initial release\n"
  },
  {
    "path": "packages/addons/tools/rpi-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rpi-tools\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"0\"\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain RPi.GPIO gpiozero colorzero lan951x-led-ctl\"\nPKG_SECTION=\"virtual\"\nPKG_SHORTDESC=\"A bundle of tools and programs for use on the Raspberry Pi\"\nPKG_LONGDESC=\"This bundle currently includes RPi.GPIO, gpiozero and lan951x-led-ctl\"\nPKG_DISCAIMER=\"Raspberry Pi is a trademark of the Raspberry Pi Foundation http://www.raspberrypi.org\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Raspberry Pi Tools\"\nPKG_ADDON_TYPE=\"xbmc.python.module\"\nPKG_ADDON_PROJECTS=\"RPi ARM\"\n\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/RPi/\n    cp -PR $(get_build_dir RPi.GPIO)/build/lib.linux-*/RPi/* ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/RPi\n    cp -PR $(get_build_dir gpiozero)/gpiozero ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n    cp -PR $(get_build_dir colorzero)/colorzero ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n    cp -P $(get_build_dir lan951x-led-ctl)/lan951x-led-ctl ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n}\n"
  },
  {
    "path": "packages/addons/tools/rpi-tools/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport xbmcgui\n\ndialog = xbmcgui.Dialog()\ndialog.ok('', 'This is a console-only addon')\n"
  },
  {
    "path": "packages/addons/tools/system-tools/changelog.txt",
    "content": "4\n- bottom: update to 0.9.4\n- libmtp: update to 1.1.21\n- mc: update to 4.8.30\n- screen: update to 4.9.1\n- smartmontools: update to 7.4\n- stress-ng: update to 0.16.04\n\n3\n- file: update to 5.45\n- libssh2: dont build shared library\n  - fix build of mc\n- pv: update to 1.7.24\n- unrar: update to 6.2.10\n\n2\n- replace dstat with dool\n- bottom: update to 0.9.3\n- diffutils: update to 3.10\n- libssh2: update to 1.11.0\n- stress-ng: update to 0.16.02\n- unrar: update to 6.2.8\n\n1\n- bottom: update to 0.8.0\n- diffutils: update to 3.9\n- htop: update to 3.2.2\n- lshw: fix lshw -version display\n- mc: update to 4.8.29\n- stress-ng: update to 0.15.06\n- unrar: update to 6.2.6\n- vim: update to 9.0.1417\n"
  },
  {
    "path": "packages/addons/tools/system-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"system-tools\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"4\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"virtual\"\nPKG_SHORTDESC=\"A bundle of system tools and programs\"\nPKG_LONGDESC=\"This bundle currently includes 7-zip, autossh, bottom, diffutils, dool, dtach, efibootmgr, encfs, evtest, fdupes, file, getscancodes, hddtemp, hd-idle, hid_mapper, htop, i2c-tools, inotify-tools, jq, libgpiod, lm_sensors, lshw, mc, mmc-utils, mtpfs, nmon, patch, pv, screen, smartmontools, stress-ng, unrar, usb-modeswitch and vim.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"System Tools\"\nPKG_ADDON_TYPE=\"xbmc.python.script\"\n\nPKG_DEPENDS_TARGET=\"toolchain \\\n                    7-zip \\\n                    autossh \\\n                    bottom \\\n                    diffutils \\\n                    dool \\\n                    dtach \\\n                    encfs \\\n                    evtest \\\n                    fdupes \\\n                    file \\\n                    getscancodes \\\n                    hddtemp \\\n                    hd-idle \\\n                    hid_mapper \\\n                    htop \\\n                    i2c-tools \\\n                    inotify-tools \\\n                    jq \\\n                    libgpiod \\\n                    lm_sensors \\\n                    lshw \\\n                    mc \\\n                    mmc-utils \\\n                    mtpfs \\\n                    nmon \\\n                    patch \\\n                    pv \\\n                    screen \\\n                    sdparm \\\n                    smartmontools \\\n                    stress-ng \\\n                    unrar \\\n                    usb-modeswitch \\\n                    vim\"\n\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  PKG_DEPENDS_TARGET+=\" efibootmgr st\"\nfi\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/{bin,data,lib}\n\n    # 7-zip\n    cp -P $(get_install_dir 7-zip)/usr/bin/7zz ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # autossh\n    cp -P $(get_install_dir autossh)/usr/bin/autossh ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # bottom\n    cp -P $(get_install_dir bottom)/btm ${ADDON_BUILD}/${PKG_ADDON_ID}/bin 2>/dev/null || :\n\n    # diffutils\n    cp -P $(get_install_dir diffutils)/usr/bin/{cmp,diff,diff3,sdiff} ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # dool\n    cp -Pa $(get_install_dir dool)/usr/bin/* ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # dtach\n    cp -P $(get_install_dir dtach)/usr/bin/dtach ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # efibootmgr\n    cp -P $(get_install_dir efibootmgr)/usr/bin/efibootmgr ${ADDON_BUILD}/${PKG_ADDON_ID}/bin 2>/dev/null || :\n\n    # encfs\n    cp -P $(get_install_dir encfs)/usr/bin/{encfs,encfsctl} ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # evtest\n    cp -P $(get_install_dir evtest)/usr/bin/evtest ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # fdupes\n    cp -P $(get_install_dir fdupes)/usr/bin/fdupes ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # file\n    cp -P $(get_install_dir file)/usr/bin/file ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir file)/usr/share/misc/magic.mgc ${ADDON_BUILD}/${PKG_ADDON_ID}/data\n\n    # fuse\n    cp -P $(get_install_dir fuse)/usr/bin/{fusermount,ulockmgr_server} ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir fuse)/usr/sbin/mount.fuse ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir fuse)/usr/lib/{libfuse.so*,libulockmgr.so*} ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n\n    # getscancodes\n    cp -P $(get_install_dir getscancodes)/usr/bin/getscancodes ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # hddtemp\n    cp -P $(get_install_dir hddtemp)/usr/sbin/hddtemp ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir hddtemp)/usr/share/misc/hddtemp.db ${ADDON_BUILD}/${PKG_ADDON_ID}/data\n\n    # hd-idle\n    cp -P $(get_install_dir hd-idle)/usr/sbin/hd-idle ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # hid_mapper\n    cp -P $(get_install_dir hid_mapper)/usr/bin/hid_mapper ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # htop\n    cp -P $(get_install_dir htop)/usr/bin/htop ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # i2c-tools\n    cp -P $(get_install_dir i2c-tools)/usr/sbin/{i2cdetect,i2cdump,i2cget,i2cset} ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir i2c-tools)/usr/lib/${PKG_PYTHON_VERSION}/site-packages/smbus.so ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n    cp -P $(get_install_dir i2c-tools)/usr/lib/libi2c.so.0.1.1 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/libi2c.so\n    cp -P $(get_install_dir i2c-tools)/usr/lib/libi2c.so.0.1.1 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/libi2c.so.0\n    cp -P $(get_install_dir i2c-tools)/usr/lib/libi2c.so.0.1.1 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/libi2c.so.0.1.1\n\n    # inotify-tools\n    cp -P $(get_install_dir inotify-tools)/usr/bin/{inotifywait,inotifywatch} ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # jq\n    cp -P $(get_install_dir jq)/usr/bin/jq ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -P $(get_install_dir oniguruma)/usr/lib/{libonig.so,libonig.so.5,libonig.so.5.*.*} ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n\n    # libgpiod\n    cp -P $(get_install_dir libgpiod)/usr/bin/{gpiodetect,gpiofind,gpioget,gpioinfo,gpiomon,gpioset} ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # lm_sensors\n    cp -P $(get_install_dir lm_sensors)/usr/bin/sensors ${ADDON_BUILD}/${PKG_ADDON_ID}/bin 2>/dev/null || :\n\n    # lshw\n    cp -P $(get_install_dir lshw)/usr/sbin/lshw ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # mc\n    cp -Pa $(get_install_dir mc)/usr/bin/* ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n    cp -Pa $(get_install_dir mc)/storage/.kodi/addons/virtual.system-tools/* ${ADDON_BUILD}/${PKG_ADDON_ID}\n\n    # mmc-utils\n    cp -P $(get_install_dir mmc-utils)/usr/local/bin/mmc ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # mtpfs\n    cp -P $(get_install_dir mtpfs)/usr/bin/mtpfs ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n\n    # nmon\n    cp -P $(get_install_dir nmon)/usr/bin/nmon ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/\n\n    # patch\n    cp -P $(get_install_dir patch)/usr/bin/patch ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # pv\n    cp -P $(get_install_dir pv)/usr/bin/pv ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # screen\n    cp -L $(get_install_dir screen)/usr/bin/screen ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # sdparm\n    cp -P $(get_install_dir sdparm)/usr/bin/sdparm ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # smartmontools\n    cp -P $(get_install_dir smartmontools)/usr/sbin/smartctl ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # st\n    cp -P $(get_build_dir st)/st ${ADDON_BUILD}/${PKG_ADDON_ID}/bin 2>/dev/null || :\n\n    # stress-ng\n    cp -P $(get_install_dir stress-ng)/usr/bin/stress-ng ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # unrar\n    cp -P $(get_install_dir unrar)/usr/bin/unrar ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # usb-modeswitch\n    cp -P $(get_install_dir usb-modeswitch)/usr/sbin/usb_modeswitch ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n\n    # vim\n    cp -P $(get_install_dir vim)/usr/bin/vim ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n    cp -Pa $(get_install_dir vim)/storage/.kodi/addons/virtual.system-tools/data/vim/ ${ADDON_BUILD}/${PKG_ADDON_ID}/data\n}\n"
  },
  {
    "path": "packages/addons/tools/system-tools/source/bin/7z",
    "content": "#!/bin/sh\nfile=/storage/.kodi/addons/virtual.system-tools/bin/7zz\nexec ${file} \"$@\"\n"
  },
  {
    "path": "packages/addons/tools/system-tools/source/bin/7za",
    "content": "#!/bin/sh\nfile=/storage/.kodi/addons/virtual.system-tools/bin/7zz\nexec ${file} \"$@\"\n"
  },
  {
    "path": "packages/addons/tools/system-tools/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport xbmcaddon\nimport xbmcgui\nimport subprocess\nimport re\nimport csv\n\nwith open('/etc/os-release') as stream:\n    contents = stream.read().strip()\nvars = re.findall(r\"^[a-zA-Z0-9_]+=.*$\", contents, flags=re.MULTILINE)\nreader = csv.reader(vars, delimiter=\"=\")\nosrelease = dict(reader)\n\nif osrelease['LIBREELEC_ARCH'] == 'x11.x86_64' or osrelease['LIBREELEC_ARCH'] == 'Generic-legacy.x86_64':\n  yes = xbmcgui.Dialog().yesno('System Tools', 'This is a console-only addon.[CR][CR]Open a terminal window?',nolabel='No',yeslabel='Yes')\n  if yes:\n    subprocess.Popen([\"systemd-run\",\"sh\",\"-c\",\". /etc/profile;cd;exec st -e sh -l\"], shell=False, close_fds=True)\nelse:\n  xbmcgui.Dialog().ok('System Tools', 'This is a console-only addon')\n"
  },
  {
    "path": "packages/audio/alsa-lib/config/modprobe.d/disable-spdif-for-hd-audio.conf",
    "content": "# INTEL HBR WORKAROUND FOR DTS-MA & Dolby TrueHD PLAYBACK\n\n# Uncomment the following lines to disable any S/PDIF out to deliver\n# bitstreamed audio on Intel builds. This is a rough workaround for \n# users that have both S/PDIF and HDMI audio outputs on their motherboard\n# or motherboard+discrete graphics combo.\n\n# EVEN IF YOU ARE NOT USING THE S/PDIF OUTPUT\n# but still have one, you will need to uncomment the lines below !\n\n# after uncommenting these lines, you must reboot for these settings to take effect\n\n# blacklist snd_hda_codec_realtek\n# blacklist snd_hda_codec_sigmatel\n# blacklist snd_hda_codec_cirrus\n\n"
  },
  {
    "path": "packages/audio/alsa-lib/modprobe.d/alsa-base.conf",
    "content": "#############################\n# ALSA drivers load options #\n#############################\n\n# Prevent abnormal drivers from grabbing index 0\noptions snd-bt87x index=-2\noptions cx88-alsa index=-2\noptions saa7134-alsa index=-2\noptions snd-atiixp-modem index=-2\noptions snd-intel8x0m index=-2\noptions snd-via82xx-modem index=-2\noptions snd-usb-audio index=-2\noptions snd-usb-usx2y index=-2\noptions snd-usb-caiaq index=-2\noptions snd-cmipci mpu_port=0x330 fm_port=0x388\n\n# Some Toshiba laptops might require this\n# options snd-hda-intel model=toshiba\noptions snd-hda-intel model=auto\n\n# fix some Audio Problems with HDMI on ION based Hardware\n# see: http://xbmc.org/forum/showthread.php?t=69479\nalias snd-card-0 snd-hda-codec-nvhdmi\n"
  },
  {
    "path": "packages/audio/alsa-lib/modprobe.d/intel-audio.conf",
    "content": "# use legacy hda-intel driver even if a DSP is present\noptions snd_intel_dspcfg dsp_driver=1\n"
  },
  {
    "path": "packages/audio/alsa-lib/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"alsa-lib\"\nPKG_VERSION=\"1.2.8\"\nPKG_SHA256=\"1ab01b74e33425ca99c2e36c0844fd6888273193bd898240fe8f93accbcbf347\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.alsa-project.org/\"\nPKG_URL=\"https://www.alsa-project.org/files/pub/lib/alsa-lib-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"ALSA (Advanced Linux Sound Architecture) is the next generation Linux Sound API.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nif build_with_debug; then\n  PKG_ALSA_DEBUG=--with-debug\nelse\n  PKG_ALSA_DEBUG=--without-debug\nfi\n\nPKG_CONFIGURE_OPTS_TARGET=\"${PKG_ALSA_DEBUG} \\\n                           --disable-dependency-tracking \\\n                           --with-plugindir=/usr/lib/alsa \\\n                           --disable-python\"\n\npost_configure_target() {\n  sed -i 's/.*PKGLIBDIR.*/#define PKGLIBDIR \"\"/' include/config.h\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n\n  mkdir -p ${INSTALL}/usr/config\n    cp -PR ${PKG_DIR}/config/modprobe.d ${INSTALL}/usr/config\n}\n"
  },
  {
    "path": "packages/audio/alsa-lib/patches/alsa-lib-asound.conf_configdir.patch",
    "content": "diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf\nindex a04173a0..1f13fd84 100644\n--- a/src/conf/alsa.conf\n+++ b/src/conf/alsa.conf\n@@ -11,7 +11,8 @@\n \t\t\t\"/usr/etc/alsa/conf.d\"\n \t\t\t\"/etc/alsa/conf.d\"\n \t\t\t\"/etc/asound.conf|||/usr/etc/asound.conf\"\n-\t\t\t\"~/.asoundrc\"\n+\t\t\t\"/run/asound.conf\"\n+\t\t\t\"/storage/.config/asound.conf\"\n \t\t\t{\n \t\t\t\t@func concat\n \t\t\t\tstrings [\n"
  },
  {
    "path": "packages/audio/alsa-topology-conf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"alsa-topology-conf\"\nPKG_VERSION=\"1.2.5.1\"\nPKG_SHA256=\"f7c5bae1545abcd73824bc97f4e72c340e11abea188ba0f1c06f5e0ad776b179\"\nPKG_LICENSE=\"BSD-3c\"\nPKG_SITE=\"https://www.alsa-project.org/\"\nPKG_URL=\"https://www.alsa-project.org/files/pub/lib/alsa-topology-conf-${PKG_VERSION}.tar.bz2\"\nPKG_LONGDESC=\"ALSA topology configuration files\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/alsa/\n  cp -PR ${PKG_BUILD}/topology ${INSTALL}/usr/share/alsa/\n}\n"
  },
  {
    "path": "packages/audio/alsa-ucm-conf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"alsa-ucm-conf\"\nPKG_VERSION=\"1.2.8\"\nPKG_SHA256=\"fee4a737830fd25f969d83da46a2b231beb086efd966fcc07d225e7823260ae8\"\nPKG_LICENSE=\"BSD-3c\"\nPKG_SITE=\"https://www.alsa-project.org/\"\nPKG_URL=\"https://www.alsa-project.org/files/pub/lib/alsa-ucm-conf-${PKG_VERSION}.tar.bz2\"\nPKG_LONGDESC=\"ALSA Use Case Manager configuration (and topologies)\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/alsa/\n  cp -PR ${PKG_BUILD}/ucm2 ${INSTALL}/usr/share/alsa/\n  # work around scripts/build removing empty directories, this leads to errors in ucm\n  touch ${INSTALL}/usr/share/alsa/ucm2/conf.virt.d/.dont_remove_this_dir\n}\n"
  },
  {
    "path": "packages/audio/alsa-utils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"alsa-utils\"\nPKG_VERSION=\"1.2.8\"\nPKG_SHA256=\"e140fa604c351f36bd72167c8860c69d81b964ae6ab53992d6434dde38e9333c\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.alsa-project.org/\"\nPKG_URL=\"https://www.alsa-project.org/files/pub/utils/alsa-utils-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib ncurses systemd\"\nPKG_LONGDESC=\"This package includes the utilities for ALSA, like alsamixer, aplay, arecord, alsactl, iecset and speaker-test.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-alsaconf \\\n                           --disable-alsaloop \\\n                           --enable-alsatest \\\n                           --disable-bat \\\n                           --disable-dependency-tracking \\\n                           --disable-nls \\\n                           --disable-rst2man \\\n                           --disable-xmlto\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/lib ${INSTALL}/var\n  rm -rf ${INSTALL}/usr/share/alsa/speaker-test\n  rm -rf ${INSTALL}/usr/share/sounds\n  rm -rf ${INSTALL}/usr/lib/systemd/system\n\n# remove default udev rule to restore mixer configs, we install our own.\n# so we avoid resetting our soundconfig\n  rm -rf ${INSTALL}/usr/lib/udev/rules.d/90-alsa-restore.rules\n\n  mkdir -p ${INSTALL}/.noinstall\n  for i in aconnect alsamixer amidi aplaymidi arecord arecordmidi aseqdump aseqnet iecset; do\n    mv ${INSTALL}/usr/bin/${i} ${INSTALL}/.noinstall\n  done\n\n  mkdir -p ${INSTALL}/usr/lib/udev\n    cp ${PKG_DIR}/scripts/soundconfig ${INSTALL}/usr/lib/udev\n}\n"
  },
  {
    "path": "packages/audio/alsa-utils/scripts/soundconfig",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n# setup alsa (especially the mixer config)\n\nmixer() {\n  parm=${4:-on}\n  amixer -c \"$1\" sset \"$2\" \"$3\" $parm >/dev/null 2>&1\n  amixer -c \"$1\" sset \"$2\" $parm >/dev/null 2>&1\n}\n\n(\n. /etc/profile\n\nprogress \"Setting up sound card\"\n\nif [ -f $HOME/.config/sound.conf ]; then\n\n  alsactl restore -f $HOME/.config/sound.conf\n\nelse\n\n# get card num\n  card=`echo $1 | sed 's/[^0-9]*//g'`\n\n# set common mixer params\n  mixer \"$card\" Master 0db\n  mixer \"$card\" Front 100%\n  mixer \"$card\" PCM 0db\n  mixer \"$card\" Synth 100%\n\n# mute CD, since using digital audio instead\n  mixer \"$card\" CD 0% mute\n\n# Only unmute Line and Aux if they are possibly used.\n#  mixer \"$card\" Line 100%\n#  mixer \"$card\" Aux 100%\n\n# mute mic\n  mixer \"$card\" Mic 0% mute\n\n# ESS 1969 chipset has 2 PCM channels\n  mixer \"$card\" PCM,1 100%\n\n# Trident/YMFPCI/emu10k1\n  mixer \"$card\" Wave 100%\n  mixer \"$card\" Music 100%\n  mixer \"$card\" AC97 100%\n  mixer \"$card\" Surround 90%\n  mixer \"$card\" 'Surround Digital' 90%\n  mixer \"$card\" 'Wave Surround' 90%\n  mixer \"$card\" 'Duplicate Front' 90%\n  mixer \"$card\" 'Sigmatel 4-Speaker Stereo' 90%\n\n# CS4237B chipset:\n  mixer \"$card\" 'Master Digital' 100%\n\n# DRC\n  mixer \"$card\" 'Dynamic Range Compression' 90%\n\n# Envy24 chips with analog outs\n  mixer \"$card\" DAC 100%\n  mixer \"$card\" DAC,0 100%\n  mixer \"$card\" DAC,1 100%\n\n# some notebooks use headphone instead of master\n  mixer \"$card\" Headphone 100%\n  mixer \"$card\" Speaker 100%\n  mixer \"$card\" 'Internal Speaker' 0% mute\n  mixer \"$card\" Playback 100%\n  mixer \"$card\" Headphone 100%\n  mixer \"$card\" Speaker 100%\n  mixer \"$card\" Center 100%\n  mixer \"$card\" LFE 100%\n  mixer \"$card\" Center/LFE 100%\n\n# Intel P4P800-MX  (Ubuntu bug #5813)\n  mixer \"$card\" 'Master Playback Switch' on\n\n# set digital output mixer params\n  mixer \"$card\" 'IEC958' 100% on\n  mixer \"$card\" 'IEC958 Output' 100%\n  mixer \"$card\" 'IEC958 Coaxial' 100%\n  mixer \"$card\" 'IEC958 LiveDrive' 100%\n  mixer \"$card\" 'IEC958 Optical Raw' 100%\n  mixer \"$card\" 'SPDIF Out' 100%\n  mixer \"$card\" 'SPDIF Front' 100%\n  mixer \"$card\" 'SPDIF Rear' 100%\n  mixer \"$card\" 'SPDIF Center/LFE' 100%\n  mixer \"$card\" 'Master Digital' 100%\n\n  mixer \"$card\" 'Analog Front' 100%\n  mixer \"$card\" 'Analog Rear' 100%\n  mixer \"$card\" 'Analog Center/LFE' 100%\n\n# ASRock ION 330 (and perhaps others) has 2 IEC958 channels\n  mixer \"$card\" IEC958,0 on\n  mixer \"$card\" IEC958,1 on\n\n# some ION2 has much more IEC958 channels ...\n  mixer \"$card\" IEC958,2 on\n  mixer \"$card\" IEC958,3 on\n\n# ASRock ION 330 has Master Front set to 0\n  mixer \"$card\" 'Master Front' 100%\n\n# Shuttle XS35GT needs this too\n  mixer \"$card\" 'Master',0 100% on\n\n# and this for various Fusion devices like Zotac ZBOX\n  mixer \"$card\" 'Front',0 100% on\n\n# NVidia CK804 sound devices\n  mixer \"$card\" 'IEC958 Playback AC97-SPSA' 100%\n\n# Allwinner H3 Analog\n  mixer \"$card\" 'Line Out' 0db on\n\n# Allwinner A20 Analog\n  mixer \"$card\" 'Power Amplifier' 0db\n  mixer \"$card\" 'Power Amplifier DAC' on\n  mixer \"$card\" 'Power Amplifier Mute' on\n\n# Allwinner A64 Analog\n  mixer \"$card\" Headphone 0db on\n  mixer \"$card\" 'AIF1 Slot 0 Digital DAC' on\n\n# Amlogic audio devices\n  case $(dtsoc) in\n    amlogic,g12*|amlogic,sm1)\n      # AXG HDMI // Logic assumes TDMOUT_A is not present in device-tree when TDMOUT_B is used\n      TDMOUT=$(awk '/TDMOUT/ && $2==\"OUT\" {print substr($1,length($1),1)}' /sys/firmware/devicetree/base/sound/audio-routing | sort | head -n 1)\n      if [ \"${TDMOUT}\" = \"A\" ]; then\n        mixer \"$card\" 'FRDDR_A SINK 1 SEL' 'OUT 0'\n        mixer \"$card\" 'FRDDR_A SRC 1 EN' on\n        mixer \"$card\" 'TDMOUT_A SRC SEL' 'IN 0'\n        mixer \"$card\" 'TOHDMITX' on\n        mixer \"$card\" 'TOHDMITX I2S SRC' 'I2S A'\n      elif [ \"${TDMOUT}\" = \"B\" ]; then\n        mixer \"$card\" 'FRDDR_A SINK 1 SEL' 'OUT 1'\n        mixer \"$card\" 'FRDDR_A SRC 1 EN' on\n        mixer \"$card\" 'TDMOUT_B SRC SEL' 'IN 0'\n        mixer \"$card\" 'TOHDMITX' on\n        mixer \"$card\" 'TOHDMITX I2S SRC' 'I2S B'\n      fi\n      # AXG S/PDIF\n      SPDIFOUT=$(awk '/SPDIF/' /sys/firmware/devicetree/base/sound/audio-routing | sort | head -n 1)\n      if [ -n \"${SPDIFOUT}\" ]; then\n        mixer \"$card\" 'FRDDR_B SINK 1 SEL' 'OUT 3'\n        mixer \"$card\" 'FRDDR_B SRC 1 EN' on\n        mixer \"$card\" 'SPDIFOUT SRC SEL' 'IN 1'\n        mixer \"$card\" 'SPDIFOUT Playback' on\n      fi\n      # AXG Headphone Jack\n      ACODEC=$(awk '/ACODEC/' /sys/firmware/devicetree/base/sound/audio-routing | sort | head -n 1)\n      if [ -n \"${ACODEC}\" ]; then\n        mixer \"$card\" 'TOACODEC OUT EN' on\n        mixer \"$card\" 'TOACODEC SRC' 'I2S ${TDMOUT}'\n        mixer \"$card\" 'ACODEC Playback Switch' on\n        mixer \"$card\" 'ACODEC Playback Channel Mode' Stereo\n      fi\n      ;;\n    amlogic,meson-gx*)\n      # AIU HDMI and S/PDIF\n      mixer \"$card\" 'AIU HDMI CTRL SRC' 'I2S'\n      mixer \"$card\" 'AIU SPDIF SRC SEL' 'SPDIF'\n      # AIU ACODEC headphone jack\n      mixer \"$card\" 'ACODEC' 80% on\n      mixer \"$card\" 'AIU ACODEC SRC' 'I2S'\n      mixer \"$card\" 'AIU ACODEC OUT EN' on\n      ;;\n  esac\n\n# ES8316 headphone jack\n  mixer \"$card\" 'Right Headphone Mixer Right DAC' on\n  mixer \"$card\" 'Left Headphone Mixer Left DAC' on\nfi\n\nexit 0\n)&\n"
  },
  {
    "path": "packages/audio/alsa-utils/udev.d/90-alsa-restore.rules",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n# When a sound device is detected, restore the volume settings\n  KERNEL==\"controlC[0-9]*\",  NAME=\"snd/%k\", ACTION==\"add\", RUN+=\"soundconfig %k\"\n"
  },
  {
    "path": "packages/audio/espeak-ng/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"espeak-ng\"\nPKG_VERSION=\"1.51.1\"\nPKG_SHA256=\"0823df5648659dcb67915baaf99118dcc8853639f47cadaa029c174bdd768d20\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/espeak-ng/espeak-ng\"\nPKG_URL=\"https://github.com/espeak-ng/espeak-ng/archive/refs/tags/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"gcc:host\"\nPKG_DEPENDS_TARGET=\"toolchain pcaudiolib espeak-ng:host\"\nPKG_LONGDESC=\"eSpeak NG is an open source speech synthesizer that supports more than a hundred languages and accents\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+sysroot +debug\"\n\nmake_host() {\n  mkdir phsource dictsource\n  (cd dictsource; ln -s ../../dictsource/* .)\n  (cd phsource; ln -s ../../phsource/* .)\n  cp -aP ../espeak-ng-data .\n  make DESTDIR=`pwd` -j1\n}\n\nmakeinstall_host() {\nmkdir -p ${TOOLCHAIN}/share/espeak-ng-data\ncp -prf  ${PKG_BUILD}/.x86_64-linux-gnu/espeak-ng-data/* ${TOOLCHAIN}/share/espeak-ng-data/\n}\n\nmake_target() {\n  make src/espeak-ng src/speak-ng\n}\n\nmakeinstall_target() {\n  make src/espeak-ng src/speak-ng\n  make install-exec DESTDIR=${INSTALL}\n  mkdir -p ${INSTALL}/usr/share/espeak-ng-data\n  cp -prf ${TOOLCHAIN}/share/espeak-ng-data ${INSTALL}/usr/share\n  cp -prf ${INSTALL}/usr/lib/* ${SYSROOT_PREFIX}/usr/lib/\n  cp -prf ${PKG_BUILD}/src/include/espea* ${SYSROOT_PREFIX}/usr/include\n}\n"
  },
  {
    "path": "packages/audio/espeak-ng/patches/PR1858-fix-compiling-in-build-directory.patch",
    "content": "From 9e6083c12a41334b2817b443d430637f01ee5fb9 Mon Sep 17 00:00:00 2001\nFrom: Rudi Heitbaum <rudi@heitbaum.com>\nDate: Sun, 14 Jan 2024 11:33:08 +1100\nSubject: [PATCH] fix compiling in build directory\n\n$(srcdir) was missing on includes for src/include/espeak-ng/espeak-ng.h\n---\n Makefile.am | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile.am b/Makefile.am\nindex 595546899..d8671efa3 100644\n--- a/Makefile.am\n+++ b/Makefile.am\n@@ -16,7 +16,7 @@ SHARED_VERSION=2:51:1 # = *.so.1.1.51\n MKDIR=mkdir -p\n \n AM_CFLAGS = \\\n-\t-Isrc/include -Isrc/include/compat -I$(srcdir)/src/speechPlayer/include -I$(srcdir)/src/ucd-tools/src/include \\\n+\t-I$(srcdir)/src/include -Isrc/include/compat -I$(srcdir)/src/speechPlayer/include -I$(srcdir)/src/ucd-tools/src/include \\\n \t-D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112L\n AM_CXXFLAGS =\n \n"
  },
  {
    "path": "packages/audio/espeak-ng/pcaudiolib/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2024-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"pcaudiolib\"\nPKG_VERSION=\"c651ccb767abede0228570968293219e429899d5\"\nPKG_SHA256=\"6cfd54c227fadecadf6e2e175ab4928395fe736846e0f6c0a30f7a20fff988d5\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/espeak-ng/pcaudiolib\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"eSpeak NG is an open source speech synthesizer that supports more than a hundred languages and accents\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+sysroot\"\n\npre_configure() {\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-pulseaudio=no\"\n\ncd ..\n./autogen.sh\n}\n\n#post_makeinstall_target(){\n#mkdir -p ${SYSROOT_PREFIX}/usr\n#cp -rf ${INSTALL}/usr/* ${SYSROOT_PREFIX}/usr/\n#}\n"
  },
  {
    "path": "packages/audio/flac/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"flac\"\nPKG_VERSION=\"1.4.3\"\nPKG_SHA256=\"6c58e69cd22348f441b861092b825e591d0b822e106de6eb0ee4d05d27205b70\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://xiph.org/flac/\"\nPKG_URL=\"https://downloads.xiph.org/releases/flac/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libogg\"\nPKG_LONGDESC=\"An Free Lossless Audio Codec.\"\nPKG_TOOLCHAIN=\"autotools\"\n# flac-1.3.1 dont build with LTO support\nPKG_BUILD_FLAGS=\"+pic\"\n\n# package specific configure options\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-shared \\\n                           --disable-static \\\n                           --disable-rpath \\\n                           --disable-altivec \\\n                           --disable-doxygen-docs \\\n                           --disable-thorough-tests \\\n                           --disable-cpplibs \\\n                           --disable-xmms-plugin \\\n                           --disable-oggtest \\\n                           --with-ogg=${SYSROOT_PREFIX}/usr \\\n                           --with-gnu-ld\"\n\nif target_has_feature sse; then\n  PKG_CONFIGURE_OPTS_TARGET+=\" --enable-sse\"\nelse\n  PKG_CONFIGURE_OPTS_TARGET+=\" --disable-sse\"\nfi\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/audio/fluidsynth/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"fluidsynth\"\nPKG_VERSION=\"2.3.2\"\nPKG_SHA256=\"cd610810f30566e28fb98c36501f00446a06fa6bae3dc562c8cd3868fe1c0fc7\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://fluidsynth.org/\"\nPKG_URL=\"https://github.com/FluidSynth/fluidsynth/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain glib libsndfile\"\nPKG_LONGDESC=\"FluidSynth renders midi music files as raw audio data, for playing or conversion.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_SHARED_LIBS=0 \\\n                       -DLIB_SUFFIX= \\\n                       -Denable-libsndfile=1 \\\n                       -Denable-pkgconfig=1 \\\n                       -Denable-pulseaudio=0 \\\n                       -Denable-readline=0\"\n"
  },
  {
    "path": "packages/audio/fluidsynth/patches/libsndfile-use-static-libraries.patch",
    "content": "--- a/CMakeLists.txt\t2021-09-12 13:53:14.192948082 +1000\n+++ b/CMakeLists.txt\t2021-09-12 13:54:27.389413149 +1000\n@@ -535,6 +535,7 @@\n            LIBSNDFILE_STATIC_LDFLAGS MATCHES \"vorbis\" OR\n            LIBSNDFILE_STATIC_LDFLAGS_OTHER MATCHES \"vorbis\" )\n         set ( LIBSNDFILE_HASVORBIS 1 )\n+        set ( LIBSNDFILE_LIBRARIES ${LIBSNDFILE_STATIC_LIBRARIES} )\n     else ()\n         message ( NOTICE \"Seems like libsndfile was compiled without OGG/Vorbis support.\" )\n     endif ()\n"
  },
  {
    "path": "packages/audio/lame/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"lame\"\nPKG_VERSION=\"3.100\"\nPKG_SHA256=\"ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"http://lame.sourceforge.net/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/lame/lame/3.100/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A high quality MPEG Audio Layer III (MP3) encoder.\"\nPKG_BUILD_FLAGS=\"-parallel +pic\"\n\n# package specific configure options\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-static \\\n                           --enable-shared \\\n                           --disable-nasm \\\n                           --disable-rpath \\\n                           --disable-cpml \\\n                           --disable-gtktest \\\n                           --disable-efence \\\n                           --disable-analyzer-hooks \\\n                           --enable-decoder \\\n                           --disable-frontend \\\n                           --disable-mp3x \\\n                           --disable-mp3rtp \\\n                           --disable-dynamic-frontends \\\n                           --enable-expopt=no \\\n                           --enable-debug=no \\\n                           --with-gnu-ld \\\n                           --with-fileio=lame \\\n                           GTK_CONFIG=no\"\n"
  },
  {
    "path": "packages/audio/ldacBT/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ldacBT\"\nPKG_VERSION=\"2.0.2.3\"\nPKG_SHA256=\"c02998718f9c4620437d7594b4d121b3ab4c5cfeba8d41fa31dd5c71db09edca\"\nPKG_LICENSE=\"Apache\"\nPKG_SITE=\"https://github.com/EHfive/ldacBT\"\nPKG_URL=\"https://github.com/EHfive/ldacBT/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_DEPENDS_UNPACK=\"libldac\"\nPKG_LONGDESC=\"LDAC Bluetooth encoder library (build tools)\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DLDAC_SOFT_FLOAT=OFF\"\n\npost_unpack() {\n  rm -rf ${PKG_BUILD}/libldac\n  ln -sf $(get_build_dir libldac) ${PKG_BUILD}/libldac\n}\n"
  },
  {
    "path": "packages/audio/libcdio/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libcdio\"\nPKG_VERSION=\"2.1.0\"\nPKG_SHA256=\"8550e9589dbd594bfac93b81ecf129b1dc9d0d51e90f9696f1b2f9b2af32712b\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://www.gnu.org/software/libcdio/\"\nPKG_URL=\"http://ftpmirror.gnu.org/libcdio/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A CD-ROM reading and control library.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\n# package specific configure options\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-cxx \\\n                           --disable-cpp-progs \\\n                           --disable-shared \\\n                           --enable-static \\\n                           --enable-joliet \\\n                           --disable-rpath \\\n                           --enable-rock \\\n                           --disable-cddb \\\n                           --disable-vcd-info \\\n                           --without-cd-drive \\\n                           --without-cd-info \\\n                           --without-cdda-player \\\n                           --without-cd-read \\\n                           --without-iso-info \\\n                           --without-iso-read \\\n                           --without-libiconv-prefix \\\n                           --with-gnu-ld\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/audio/libcdio/patches/0001-Use-getmntent-setmntent-for-reading-mounts.patch",
    "content": "From 0d550dc9307901edd817333a5b530241d08ad889 Mon Sep 17 00:00:00 2001\nFrom: Miguel Borges de Freitas <enen92@kodi.tv>\nDate: Wed, 2 Feb 2022 20:47:02 +0000\nSubject: [PATCH] Use getmntent/setmntent for reading mounts\n\nSince fields in the mtab and fstab files are separated by\nwhitespace, octal escapes are used to represent the characters\nspace (\\040), tab (\\011), newline (\\012), and backslash (\\\\) in\nthose files when they occur in one of the four strings in a\nmntent structure.  The routines addmntent() and getmntent() will\nconvert from string representation to escaped representation and\nback.  When converting from escaped representation, the sequence\n\\134 is also converted to a backslash.\n---\n lib/driver/gnu_linux.c | 20 ++++++++++----------\n 1 file changed, 10 insertions(+), 10 deletions(-)\n\ndiff --git a/lib/driver/gnu_linux.c b/lib/driver/gnu_linux.c\nindex 6a6aa4dd..dddf333c 100644\n--- a/lib/driver/gnu_linux.c\n+++ b/lib/driver/gnu_linux.c\n@@ -672,13 +672,13 @@ static int is_mounted (const char * device, char * target) {\n   char real_device_1[PATH_MAX];\n   char real_device_2[PATH_MAX];\n \n-  char file_device[PATH_MAX];\n-  char file_target[PATH_MAX];\n+  struct mntent *fs;\n+\n+  fp = setmntent(\"/proc/mounts\", \"r\");\n \n-  fp = fopen ( \"/proc/mounts\", \"r\");\n   /* Older systems just have /etc/mtab */\n   if(!fp)\n-    fp = fopen ( \"/etc/mtab\", \"r\");\n+    fp = setmntent(\"/etc/mtab\", \"r\");\n \n   /* Neither /proc/mounts nor /etc/mtab could be opened, give up here */\n   if(!fp) return 0;\n@@ -691,19 +691,19 @@ static int is_mounted (const char * device, char * target) {\n \n   /* Read entries */\n \n-  while ( fscanf(fp, \"%s %s %*s %*s %*d %*d\\n\", file_device, file_target) != EOF ) {\n-      if (NULL == cdio_realpath(file_device, real_device_2)) {\n+  while ((fs = getmntent(fp)) != NULL) {\n+      if (NULL == cdio_realpath(fs->mnt_fsname, real_device_2)) {\n           cdio_debug(\"Problems resolving device %s: %s\\n\",\n-                     file_device, strerror(errno));\n+                     fs->mnt_fsname, strerror(errno));\n       }\n     if(!strcmp(real_device_1, real_device_2)) {\n-      strcpy(target, file_target);\n-      fclose(fp);\n+      strcpy(target, fs->mnt_dir);\n+      endmntent(fp);\n       return 1;\n     }\n \n   }\n-  fclose(fp);\n+  endmntent(fp);\n   return 0;\n }\n \n-- \n2.30.2\n\n"
  },
  {
    "path": "packages/audio/libfreeaptx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libfreeaptx\"\nPKG_VERSION=\"0.1.1\"\nPKG_SHA256=\"7acf514446cae59585d9bc21e4f98f4a3856f4741c3a7a09d06e8ac5bf2f7315\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://github.com/iamthehorker/libfreeaptx\"\nPKG_URL=\"https://github.com/iamthehorker/libfreeaptx/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Open Source aptX codec library\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nmake_target() {\n  ${CC} ${CFLAGS} -I${PKG_BUILD} -c -o ${PKG_NAME##*lib}.o ${PKG_NAME##*lib}.c\n  ${AR} -rcs ${PKG_NAME}.a ${PKG_NAME##*lib}.o\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n    cp -a ${PKG_NAME}.a ${SYSROOT_PREFIX}/usr/lib/\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/include\n    cp -a ${PKG_NAME##*lib}.h ${SYSROOT_PREFIX}/usr/include/\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n    cat > ${SYSROOT_PREFIX}/usr/lib/pkgconfig/${PKG_NAME}.pc << EOF\nprefix=/usr\nexec_prefix=\\${prefix}\nlibdir=\\${exec_prefix}/lib\nincludedir=\\${prefix}/include\n\nName: ${PKG_NAME}\nDescription: Open Source aptX codec library\nVersion: ${PKG_VERSION}\nLibs: -Wl,-rpath=\\${libdir} -L\\${libdir} -l${PKG_NAME##*lib}\nCflags: -I\\${includedir}\nEOF\n}\n"
  },
  {
    "path": "packages/audio/libldac/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libldac\"\nPKG_VERSION=\"82b6a1abee84787b8fa167efe20290073f60db2d\"\nPKG_SHA256=\"d61edcd3bfc4b71123136895fe71e7ba974f4a91f16a158f0ec8d5eb1913c51a\"\nPKG_LICENSE=\"Apache\"\nPKG_SITE=\"https://android.googlesource.com/platform/external/libldac\"\nPKG_URL=\"https://github.com/brucehw/libldac/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"LDAC Bluetooth encoder library\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/audio/libmodplug/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libmodplug\"\nPKG_VERSION=\"0.8.9.0\"\nPKG_SHA256=\"457ca5a6c179656d66c01505c0d95fafaead4329b9dbaa0f997d00a3508ad9de\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://modplug-xmms.sourceforge.net/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/modplug-xmms/libmodplug/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"libmodplug renders mod music files as raw audio data, for playing or conversion.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared\"\n"
  },
  {
    "path": "packages/audio/libogg/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libogg\"\nPKG_VERSION=\"1.3.5\"\nPKG_SHA256=\"c4d91be36fc8e54deae7575241e03f4211eb102afb3fc0775fbbc1b740016705\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://www.xiph.org/ogg/\"\nPKG_URL=\"https://downloads.xiph.org/releases/ogg/libogg-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Libogg contains necessary functionality to create, decode, and work with Ogg bitstreams.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DINSTALL_DOCS=OFF\"\n"
  },
  {
    "path": "packages/audio/libopenmpt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libopenmpt\"\nPKG_VERSION=\"0.6.6\"\nPKG_SHA256=\"6ddb9e26a430620944891796fefb1bbb38bd9148f6cfc558810c0d3f269876c7\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://lib.openmpt.org/libopenmpt/\"\nPKG_URL=\"https://lib.openmpt.org/files/libopenmpt/src/${PKG_NAME}-${PKG_VERSION}+release.autotools.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libogg libvorbis zlib\"\nPKG_LONGDESC=\"libopenmpt renders mod music files as raw audio data, for playing or conversion.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           --without-mpg123 \\\n                           --with-vorbis \\\n                           --with-vorbisfile \\\n                           --without-pulseaudio \\\n                           --without-portaudio \\\n                           --without-portaudiocpp \\\n                           --without-sdl \\\n                           --without-sdl2 \\\n                           --without-sndfile \\\n                           --without-flac\"\n"
  },
  {
    "path": "packages/audio/libopenmpt/patches/libopenmpt-add-libvorbisfile-to-pkgconfig.patch",
    "content": "--- a/libopenmpt/libopenmpt.pc.in\t2016-07-09 18:17:00.000000000 +0000\n+++ b/libopenmpt/libopenmpt.pc.in\t2021-12-25 00:53:54.189008995 +0000\n@@ -8,7 +8,7 @@\n Description: Tracker module player based on OpenMPT\n Version: @VERSION@\n Requires.private: @LIBOPENMPT_REQUIRES_PRIVATE@\n-Libs: -L${libdir} -lopenmpt\n+Libs: -L${libdir} -lopenmpt -lvorbisfile\n Libs.private: @LIBOPENMPT_LIBS_PRIVATE@\n Cflags: -I${includedir}\n \n"
  },
  {
    "path": "packages/audio/libsamplerate/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libsamplerate\"\nPKG_VERSION=\"0.2.2\"\nPKG_SHA256=\"3258da280511d24b49d6b08615bbe824d0cacc9842b0e4caf11c52cf2b043893\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://libsndfile.github.io/libsamplerate/\"\nPKG_URL=\"https://github.com/libsndfile/libsamplerate/releases/download/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A Sample Rate Converter for audio.\"\nPKG_TOOLCHAIN=\"autotools\"\n\n# package specific configure options\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-shared \\\n                           --enable-static \\\n                           --datadir=/usr/share \\\n                           --disable-fftw \\\n                           --disable-sndfile\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/audio/libsndfile/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libsndfile\"\nPKG_VERSION=\"1.1.0\"\nPKG_SHA256=\"642a876bd61b63f9346628dba5f8a0356a3ad750c7f6f42019d26ce60ba6a15b\"\nPKG_LICENSE=\"LGPL-2.1-or-later\"\nPKG_SITE=\"https://libsndfile.github.io/libsndfile/\"\nPKG_URL=\"https://github.com/libsndfile/libsndfile/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib flac libogg libvorbis opus\"\nPKG_LONGDESC=\"A C library for reading and writing sound files containing sampled audio data.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\n# As per notes in configure.ac:\n#  One or more of the external libraries (ie libflac, libogg, libvorbis and libopus)\n#  is either missing ... Unfortunately, for ease of maintenance, the external libs\n#  are an all or nothing affair.\n# So all of flac, libogg, libvorbis, opus are required.\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_PROGRAMS=OFF \\\n                       -DBUILD_EXAMPLES=OFF \\\n                       -DBUILD_REGTEST=OFF \\\n                       -DBUILD_TESTING=OFF \\\n                       -DBUILD_SHARED_LIBS=ON \\\n                       -DENABLE_EXTERNAL_LIBS=ON \\\n                       -DINSTALL_MANPAGES=OFF \\\n                       -DINSTALL_PKGCONFIG_MODULE=ON\"\n"
  },
  {
    "path": "packages/audio/libsndfile/patches/libsndfile-add-required-static-libaries-to-pkg-config.patch",
    "content": "--- a/sndfile.pc.in\t2021-01-24 23:22:23.000000000 +1100\n+++ b/sndfile.pc.in\t2021-09-12 14:30:47.763655089 +1000\n@@ -8,6 +8,6 @@\n Requires:\n Requires.private: @EXTERNAL_XIPH_REQUIRE@ @EXTERNAL_MPEG_REQUIRE@\n Version: @VERSION@\n-Libs: -L${libdir} -lsndfile\n+Libs: -L${libdir} -lsndfile -lFLAC -lvorbis -logg -lvorbisenc -lopus\n Libs.private: @EXTERNAL_MPEG_LIBS@\n Cflags: -I${includedir}\n"
  },
  {
    "path": "packages/audio/libvorbis/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libvorbis\"\nPKG_VERSION=\"1.3.7\"\nPKG_SHA256=\"b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://www.vorbis.com/\"\nPKG_URL=\"http://downloads.xiph.org/releases/vorbis/libvorbis-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libogg\"\nPKG_LONGDESC=\"Lossless audio compression tools using the ogg-vorbis algorithms.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-shared \\\n                           --disable-static \\\n                           --with-ogg=${SYSROOT_PREFIX}/usr \\\n                           --disable-docs \\\n                           --disable-examples \\\n                           --disable-oggtest\"\n"
  },
  {
    "path": "packages/audio/openal-soft/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"openal-soft\"\nPKG_VERSION=\"1.22.2\"\nPKG_SHA256=\"3e58f3d4458f5ee850039b1a6b4dac2343b3a5985a6a2e7ae2d143369c5b8135\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.openal.org/\"\nPKG_URL=\"https://github.com/kcat/openal-soft/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib\"\nPKG_LONGDESC=\"OpenAL Soft is a software implementation of the OpenAL 3D audio API.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DALSOFT_BACKEND_OSS=off \\\n                       -DALSOFT_BACKEND_PULSEAUDIO=off \\\n                       -DALSOFT_BACKEND_WAVE=off \\\n                       -DALSOFT_EXAMPLES=off \\\n                       -DALSOFT_UTILS=off\"\n\n"
  },
  {
    "path": "packages/audio/pipewire/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pipewire\"\nPKG_VERSION=\"0.3.66\"\nPKG_SHA256=\"36b6028434c16aacfc6695073b7ca4996c5476eb92833340566d27538b635508\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://pipewire.org\"\nPKG_URL=\"https://github.com/PipeWire/pipewire/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libpthread-stubs dbus ncurses alsa-lib systemd libsndfile libusb\"\nPKG_LONGDESC=\"PipeWire is a server and user space API to deal with multimedia pipeline\"\n\nif [ \"${BLUETOOTH_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" bluez sbc ldacBT libfreeaptx\"\n  PKG_PIPEWIRE_BLUETOOTH=\"-Dbluez5=enabled \\\n                          -Dbluez5-backend-hsp-native=disabled \\\n                          -Dbluez5-backend-hfp-native=disabled \\\n                          -Dbluez5-backend-ofono=disabled \\\n                          -Dbluez5-backend-hsphfpd=disabled \\\n                          -Dbluez5-codec-aptx=enabled \\\n                          -Dbluez5-codec-ldac=enabled \\\n                          -Dbluez5-codec-aac=disabled\"\nelse\n  PKG_PIPEWIRE_BLUETOOTH=\"-Dbluez5=disabled\"\nfi\n\nPKG_MESON_OPTS_TARGET=\"-Ddocs=disabled \\\n                       -Dexamples=disabled \\\n                       -Dman=disabled \\\n                       -Dtests=disabled \\\n                       -Dinstalled_tests=disabled \\\n                       -Dgstreamer=disabled \\\n                       -Dgstreamer-device-provider=disabled \\\n                       -Dsystemd=enabled \\\n                       -Dsystemd-system-service=enabled \\\n                       -Dsystemd-user-service=disabled \\\n                       -Dpipewire-alsa=enabled \\\n                       -Dpipewire-jack=disabled \\\n                       -Dpipewire-v4l2=disabled \\\n                       -Djack-devel=false\n                       -Dspa-plugins=enabled \\\n                       -Dalsa=enabled \\\n                       -Daudiomixer=enabled \\\n                       -Daudioconvert=enabled \\\n                       ${PKG_PIPEWIRE_BLUETOOTH} \\\n                       -Dcontrol=enabled \\\n                       -Daudiotestsrc=disabled \\\n                       -Dffmpeg=disabled \\\n                       -Djack=disabled \\\n                       -Dsupport=enabled \\\n                       -Devl=disabled \\\n                       -Dtest=disabled \\\n                       -Dv4l2=disabled \\\n                       -Ddbus=enabled \\\n                       -Dlibcamera=disabled \\\n                       -Dvideoconvert=disabled \\\n                       -Dvideotestsrc=disabled \\\n                       -Dvolume=enabled \\\n                       -Dvulkan=disabled \\\n                       -Dpw-cat=enabled \\\n                       -Dudev=enabled \\\n                       -Dudevrulesdir=/usr/lib/udev/rules.d \\\n                       -Dsdl2=disabled \\\n                       -Dsndfile=enabled \\\n                       -Dlibpulse=disabled \\\n                       -Droc=disabled \\\n                       -Davahi=disabled \\\n                       -Decho-cancel-webrtc=disabled \\\n                       -Dlibusb=enabled \\\n                       -Dsession-managers=[] \\\n                       -Draop=disabled \\\n                       -Dlv2=disabled \\\n                       -Dx11=disabled \\\n                       -Dx11-xfixes=disabled \\\n                       -Dlibcanberra=disabled \\\n                       -Dlegacy-rtkit=false\"\n\npost_makeinstall_target() {\n  # connect to the system bus\n  sed '/^\\[Service\\]/a Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket' -i ${INSTALL}/usr/lib/systemd/system/pipewire.service\n}\n\npost_install() {\n  add_user pipewire x 982 980 \"pipewire-daemon\" \"/var/run/pipewire\" \"/bin/sh\"\n  add_group pipewire 980\n  # note that the pipewire user is added to the audio and video groups in systemd/package.mk\n  # todo: maybe there is a better way to add users to groups in the future?\n\n  enable_service pipewire.socket\n  enable_service pipewire.service\n}\n"
  },
  {
    "path": "packages/audio/pulseaudio/config/pulse-daemon.conf.d/README",
    "content": "Files have to have the .conf file name extension, but otherwise the file names can be\nchosen freely. The files under pulse-daemon.conf.d are processed in alphabetical order. \nIn case the same option is set in multiple files, the last file to set an option \noverrides earlier files. The main daemon.conf file is processed first, so \noptions set in files under pulse-daemon.conf.d override the main file.\n"
  },
  {
    "path": "packages/audio/pulseaudio/config/system.pa",
    "content": "#!/usr/bin/pulseaudio -nF\n#\n# This file is part of PulseAudio.\n#\n# PulseAudio is free software; you can redistribute it and/or modify it\n# under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# PulseAudio is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public License\n# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.\n\n# This startup script is used only if PulseAudio is started in system\n# mode.\n\n### Load several protocols\nload-module module-native-protocol-unix\n\n### Automatically restore the volume of streams and devices\nload-module module-stream-restore\nload-module module-device-restore\nload-module module-card-restore\n\n### Automatically restore the default sink/source when changed by the user\n### during runtime\n### NOTE: This should be loaded as early as possible so that subsequent modules\n### that look up the default sink/source get the right value\nload-module module-default-device-restore\n\n### Make sure we always have a sink around, even if it is a null sink.\nload-module module-always-sink\n\n### Automatically suspend sinks/sources that become idle for too long\nload-module module-suspend-on-idle\n\n### Automatically load modules for dbus\n.ifexists module-dbus-protocol.so\n load-module module-dbus-protocol\n.endif\n\n### Automatically load modules for bluetooth\n.ifexists module-bluetooth-policy.so\n load-module module-bluetooth-policy\n.endif\n\n.ifexists module-bluetooth-discover.so\n load-module module-bluetooth-discover\n.endif\n\n.ifexists module-zeroconf-publish.so\n  load-module module-zeroconf-publish\n.endif\n\nload-module module-switch-on-connect\n"
  },
  {
    "path": "packages/audio/pulseaudio/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pulseaudio\"\nPKG_VERSION=\"16.1\"\nPKG_SHA256=\"8eef32ce91d47979f95fd9a935e738cd7eb7463430dabc72863251751e504ae4\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://pulseaudio.org/\"\nPKG_URL=\"http://www.freedesktop.org/software/pulseaudio/releases/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib dbus libcap libsndfile libtool openssl soxr speexdsp systemd glib:host glib\"\nPKG_LONGDESC=\"PulseAudio is a sound system for POSIX OSes, meaning that it is a proxy for your sound applications.\"\n\nif [ \"${BLUETOOTH_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" sbc bluez\"\n  PKG_PULSEAUDIO_BLUETOOTH=\"-Dbluez5=enabled\"\nelse\n  PKG_PULSEAUDIO_BLUETOOTH=\"-Dbluez5=disabled\"\nfi\n\nif [ \"${AVAHI_DAEMON}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" avahi\"\n  PKG_PULSEAUDIO_AVAHI=\"-Davahi=enabled\"\nelse\n  PKG_PULSEAUDIO_AVAHI=\"-Davahi=disabled\"\nfi\n\nPKG_MESON_OPTS_TARGET=\"-Ddaemon=true \\\n                       -Ddoxygen=false \\\n                       -Dgcov=false \\\n                       -Dman=false \\\n                       -Dtests=false \\\n                       -Dsystem_user=root \\\n                       -Dsystem_group=root \\\n                       -Daccess_group=root \\\n                       -Ddatabase=simple \\\n                       -Dlegacy-database-entry-format=false \\\n                       -Dstream-restore-clear-old-devices=false \\\n                       -Drunning-from-build-tree=false \\\n                       -Datomic-arm-linux-helpers=true \\\n                       -Datomic-arm-memory-barrier=false \\\n                       -Dmodlibexecdir=/usr/lib/pulse \\\n                       -Dudevrulesdir=/usr/lib/udev/rules.d \\\n                       -Dalsa=enabled \\\n                       -Dasyncns=disabled \\\n                       ${PKG_PULSEAUDIO_AVAHI} \\\n                       ${PKG_PULSEAUDIO_BLUETOOTH} \\\n                       -Dbluez5-gstreamer=disabled \\\n                       -Dbluez5-native-headset=false \\\n                       -Dbluez5-ofono-headset=false \\\n                       -Ddbus=enabled \\\n                       -Delogind=disabled \\\n                       -Dfftw=disabled \\\n                       -Dglib=enabled \\\n                       -Dgsettings=disabled \\\n                       -Dgstreamer=disabled \\\n                       -Dgtk=disabled \\\n                       -Dhal-compat=false \\\n                       -Dipv6=true \\\n                       -Djack=disabled \\\n                       -Dlirc=disabled \\\n                       -Dopenssl=enabled \\\n                       -Dorc=disabled \\\n                       -Doss-output=disabled \\\n                       -Dsamplerate=disabled \\\n                       -Dsoxr=enabled \\\n                       -Dspeex=enabled \\\n                       -Dsystemd=enabled \\\n                       -Dtcpwrap=disabled \\\n                       -Dudev=enabled \\\n                       -Dvalgrind=disabled \\\n                       -Dx11=disabled \\\n                       -Dadrian-aec=true \\\n                       -Dwebrtc-aec=disabled\"\n\npre_configure_target() {\n  sed -e 's|; remixing-use-all-sink-channels = yes|; remixing-use-all-sink-channels = no|' \\\n      -i ${PKG_BUILD}/src/daemon/daemon.conf.in\n\n# for some reason I have to add this when rebuilding or the compilation will fail, this is not a proper fix but a workaround  \n      rm -rf ${SYSROOT_PREFIX}/usr/share/bash-completion/completions/pulseaudio\n      rm -rf ${SYSROOT_PREFIX}/usr/share/bash-completion/completions/pa*\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/lib/cmake\n  safe_remove ${INSTALL}/usr/lib/pkgconfig\n  safe_remove ${INSTALL}/usr/lib/systemd\n  safe_remove ${INSTALL}/usr/share/vala\n  safe_remove ${INSTALL}/usr/share/zsh\n  safe_remove ${INSTALL}/usr/share/bash-completion\n\n  cp ${PKG_DIR}/config/system.pa ${INSTALL}/etc/pulse/\n\n  sed 's/user=\"pulse\"/user=\"root\"/' -i ${INSTALL}/etc/dbus-1/system.d/pulseaudio-system.conf\n\n  mkdir -p ${INSTALL}/usr/config\n    cp -PR ${PKG_DIR}/config/pulse-daemon.conf.d ${INSTALL}/usr/config\n\n  ln -sf /storage/.config/pulse-daemon.conf.d ${INSTALL}/etc/pulse/daemon.conf.d\n}\n\npost_install() {\n  enable_service pulseaudio.service\n}\n"
  },
  {
    "path": "packages/audio/pulseaudio/patches/pulseaudio-100.01-never-append-dirty-to-server-module-version.patch",
    "content": "From c9d7dcaa87f9ada49d75483a7c604dba27a0d71a Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Tue, 7 Jan 2014 13:22:48 +0200\nSubject: [PATCH] never append -dirty to server/module version\n\n---\n git-version-gen |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/git-version-gen b/git-version-gen\nindex 9d65b80..fcf11fd 100755\n--- a/git-version-gen\n+++ b/git-version-gen\n@@ -152,6 +152,7 @@ v=`echo \"$v\" |sed 's/^v//'`\n git status > /dev/null 2>&1\n \n dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=\n+dirty=\n case \"$dirty\" in\n     '') ;;\n     *) # Append the suffix only if there isn't one already.\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/audio/pulseaudio/patches/pulseaudio-100.02-check_uid.patch",
    "content": "--- pulseaudio-4.0.orig/src/pulsecore/core-util.c\t2014-01-12 23:31:26.281525000 -0800\n+++ pulseaudio-4.0/src/pulsecore/core-util.c\t2014-01-12 23:32:32.977118803 -0800\n@@ -1447,10 +1447,6 @@\n     if (stat(p, &st) < 0)\n         return -errno;\n \n-#ifdef HAVE_GETUID\n-    if (st.st_uid != getuid() && st.st_uid != 0)\n-        return -EACCES;\n-#endif\n\n     return 0;\n }\n"
  },
  {
    "path": "packages/audio/pulseaudio/profile.d/99-pulseaudio.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nexport LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH:/usr/lib/pulseaudio\"\n"
  },
  {
    "path": "packages/audio/pulseaudio/system.d/pulseaudio.service",
    "content": "[Unit]\nDescription=PulseAudio Sound Service\nAfter=syslog.target local-fs.target\n\n[Service]\nType=dbus\nBusName=org.pulseaudio.Server\nExecStart=/usr/bin/pulseaudio --system --disallow-exit --exit-idle-time=-1 --disable-shm --enable-memfd --realtime\nRestart=on-failure\nEnvironment=PULSE_STATE_PATH=/storage/.config/pulse\nEnvironment=PULSE_CONFIG_PATH=/storage/.config/pulse\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/audio/rpi-cirrus-config/config/rpi-cirrus-config.sh.sample",
    "content": "#!/bin/sh\n#\n# Sample user config script to setup Cirrus Logic Audio Card\n\n# load helper functions and definitions\n. /usr/lib/alsa/rpi-cirrus-functions.sh\n\n# enable output to S/PDIF, line out and headset out\nplayback_to_spdif\nplayback_to_lineout\nplayback_to_headset\n\n# disable noise gate - this can cut off the first few ms of playback\nmixer 'Noise Gate Switch' off\n\n# Uncomment this line to enable output to speakers\n# playback_to_speakers\n\n# example: mix line in and headset in into line out using a high-pass filter\n# - line in gain is set to +8dB\n# - headset in gain is set to +20dB\n# - line in and headset in are mixed together in the filter, each using\n#   a gain of -3dB (volume 29). line in uses input 1, headset in input 2\n# - first input of line out is connected to audio signal from RPi/Kodi,\n#   using a -3dB gain\n# - second input of line out is connected to output of the filter\n#\n# mixer \"${line_out} Digital Switch\" off\t# mute output\n# setup_line_in 8\n# setup_headset_in 20\n# setup_filter \"High-Pass\" \"240,3\"\n# set_mixer $filter_signals $line_in_signals 29 1\n# set_mixer $filter_signals $headset_in_signals 29 2\n# set_mixer $line_out_signals $rpi_out_signals 29 1\n# set_mixer $line_out_signals $filter_signals 29 2\n# mixer \"${line_out} Digital Switch\" on\t\t# unmute output\n"
  },
  {
    "path": "packages/audio/rpi-cirrus-config/modprobe.d/rpi-cirrus.conf",
    "content": "softdep arizona-spi pre: arizona-ldo1\n"
  },
  {
    "path": "packages/audio/rpi-cirrus-config/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rpi-cirrus-config\"\nPKG_VERSION=\"0.0.2\"\nPKG_SHA256=\"cc11c47f1f2b6d5e72dcdea828ba57e0dcaf74161f675a4a9f395054f5d82d31\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/HiassofT/rpi-cirrus-config\"\nPKG_URL=\"https://github.com/HiassofT/rpi-cirrus-config/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"alsa-utils\"\nPKG_LONGDESC=\"Config scripts for the Wolfson/Cirrus Logic audio card\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/udev\n  install -m 0755 ${PKG_DIR}/scripts/rpi-cirrus-config ${INSTALL}/usr/lib/udev/rpi-cirrus-config\n\n  mkdir -p ${INSTALL}/usr/share/alsa/cards\n  cp alsa/RPiCirrus.conf ${INSTALL}/usr/share/alsa/cards\n\n  mkdir -p ${INSTALL}/usr/lib/alsa\n  cp mixer-scripts/rpi-cirrus-functions.sh ${INSTALL}/usr/lib/alsa\n\n  mkdir -p ${INSTALL}/usr/config\n  cp -PR ${PKG_DIR}/config/* ${INSTALL}/usr/config\n}\n"
  },
  {
    "path": "packages/audio/rpi-cirrus-config/scripts/rpi-cirrus-config",
    "content": "#!/bin/sh\n\n# setup default mixer settings for Cirrus Logic Audio Card\n\n. /etc/profile\n\nif [ -f $HOME/.config/sound.conf ] ; then\n    alsactl restore -f $HOME/.config/sound.conf\nelse\n    if [ -r $HOME/.config/rpi-cirrus-config.sh ] ; then\n        progress \"Setting up Cirrus Logic Audio Card with user config\"\n        sh $HOME/.config/rpi-cirrus-config.sh\n    else\n        progress \"Setting up Cirrus Logic Audio Card\"\n\n        # load helper functions and definitions\n        . /usr/lib/alsa/rpi-cirrus-functions.sh\n\n        playback_to_spdif\n        playback_to_lineout\n        playback_to_headset\n        mixer 'Noise Gate Switch' off\n    fi\nfi\n"
  },
  {
    "path": "packages/audio/rpi-cirrus-config/udev.d/90-alsa-restore.rules",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n# When a sound device is detected, restore the volume settings\nSUBSYSTEM==\"sound\", KERNEL==\"controlC*\", NAME=\"snd/%k\", ACTION==\"add\", GOTO=\"alsa_restore_go\"\nGOTO=\"alsa_restore_end\"\n\nLABEL=\"alsa_restore_go\"\n\n# Separate config-script for RPi-Cirrus card\nDRIVERS==\"snd-rpi-cirrus\", RUN+=\"rpi-cirrus-config\", GOTO=\"alsa_restore_end\"\n\n# Default config-script for all other cards\nRUN+=\"soundconfig %k\"\n\nLABEL=\"alsa_restore_end\"\n\n"
  },
  {
    "path": "packages/audio/sbc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"sbc\"\nPKG_VERSION=\"2.0\"\nPKG_SHA256=\"8f12368e1dbbf55e14536520473cfb338c84b392939cc9b64298360fd4a07992\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.bluez.org/\"\nPKG_URL=\"https://www.kernel.org/pub/linux/bluetooth/sbc-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"standalone SBC library\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           --disable-tools \\\n                           --disable-tester\"\n\npost_makeinstall_target() {\n  # fix static library\n  sed -i 's/-lsbc/-lsbc -lbluetooth/' ${SYSROOT_PREFIX}/usr/lib/pkgconfig/sbc.pc\n}\n"
  },
  {
    "path": "packages/audio/sidplay-libs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"sidplay-libs\"\nPKG_VERSION=\"2.1.1\"\nPKG_SHA256=\"e9a24ada48215a46d2c232a70c5601bc9505e997f120e8f2ba3713e09e28d1f9\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://sidplay2.sourceforge.net/\"\nPKG_URL=\"http://mirrors.xbmc.org/build-deps/sources/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"sidplay-libs\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-shared --enable-static\"\n\npre_configure_target() {\n  # fails to build in subdirs\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n\n  export CXXFLAGS=\"${CXXFLAGS} -Wno-narrowing\"\n}\n"
  },
  {
    "path": "packages/audio/sidplay-libs/patches/sidplay-libs-01-m4-tests.patch",
    "content": "--- sidplay-libs-2.1.1/libsidplay/unix/my_macros.m4.orig\t2004-06-14 22:08:04.000000000 +0200\n+++ sidplay-libs-2.1.1/libsidplay/unix/my_macros.m4\t2013-11-18 01:23:32.195297135 +0100\n@@ -80,8 +80,8 @@\n     AC_CACHE_VAL(test_cv_have_ios_binary,\n     [\n         AC_TRY_COMPILE(\n-            [#include <fstream.h>],\n-            [ifstream myTest(ios::in|ios::binary);],\n+            [#include <fstream>],\n+            [std::ifstream myTest(std::ios::in|std::ios::binary);],\n             [test_cv_have_ios_binary=yes],\n             [test_cv_have_ios_binary=no]\n         )\n@@ -105,9 +105,9 @@\n     AC_CACHE_VAL(test_cv_have_ios_openmode,\n     [\n         AC_TRY_COMPILE(\n-            [#include <fstream.h>\n-             #include <iomanip.h>],\n-            [ios::openmode myTest = ios::in;],\n+            [#include <fstream>\n+             #include <iomanip>],\n+            [std::ios_base::openmode myTest = std::ios::in;],\n             [test_cv_have_ios_openmode=yes],\n             [test_cv_have_ios_openmode=no]\n         )\n"
  },
  {
    "path": "packages/audio/sidplay-libs/patches/sidplay-libs-02-inherited.patch",
    "content": "--- sidplay-libs-2.1.1/libsidplay/include/sidplay/SmartPtr.h.old\t2013-11-18 00:40:16.679173012 +0100\n+++ sidplay-libs-2.1.1/libsidplay/include/sidplay/SmartPtr.h\t2013-11-18 00:41:22.451176157 +0100\n@@ -211,16 +211,16 @@\n \t{\n \t\tif ( bufferLen >= 1 )\n \t\t{\n-\t\t\tpBufCurrent = ( bufBegin = buffer );\n-\t\t\tbufEnd = bufBegin + bufferLen;\n-\t\t\tbufLen = bufferLen;\n-\t\t\tstatus = true;\n+\t\t\tthis->pBufCurrent = ( this->bufBegin = buffer );\n+\t\t\tthis->bufEnd = this->bufBegin + bufferLen;\n+\t\t\tthis->bufLen = bufferLen;\n+\t\t\tthis->status = true;\n \t\t}\n \t\telse\n \t\t{\n-\t\t\tpBufCurrent = bufBegin = bufEnd = 0;\n-\t\t\tbufLen = 0;\n-\t\t\tstatus = false;\n+\t\t\tthis->pBufCurrent = this->bufBegin = this->bufEnd = 0;\n+\t\t\tthis->bufLen = 0;\n+\t\t\tthis->status = false;\n \t\t}\n \t}\n };\n"
  },
  {
    "path": "packages/audio/sidplay-libs/patches/sidplay-libs-03-operator.patch",
    "content": "--- sidplay-libs-2.1.1/libsidutils/include/sidplay/utils/SidUsage.h.orig\t2013-11-18 00:58:06.111224154 +0100\n+++ sidplay-libs-2.1.1/libsidutils/include/sidplay/utils/SidUsage.h\t2013-11-18 00:58:28.219225212 +0100\n@@ -33,7 +33,7 @@\n     uint_least16_t length;  // usage scan length\n \n     // Copy common parts of basic usage to extended usage.\n-    sid2_usage_t &sid2_usage_t::operator= (const sid_usage_t &usage)\n+    sid2_usage_t &operator= (const sid_usage_t &usage)\n     {\n         *((sid_usage_t *) this) = usage;\n         return *this;\n"
  },
  {
    "path": "packages/audio/sidplay-libs/patches/sidplay-libs-04-includes.patch",
    "content": "--- sidplay-libs-2.1.1/builders/hardsid-builder/src/hardsid-builder.cpp.orig\t2004-06-14 22:07:57.000000000 +0200\n+++ sidplay-libs-2.1.1/builders/hardsid-builder/src/hardsid-builder.cpp\t2013-11-18 01:01:50.399234880 +0100\n@@ -55,6 +55,7 @@\n \n #include \"hardsid.h\"\n #include \"hardsid-emu.h\"\n+#include <string.h>\n \n \n #ifdef HAVE_MSWINDOWS\n--- sidplay-libs-2.1.1/builders/resid-builder/src/resid.cpp.orig\t2013-11-18 01:00:07.827229975 +0100\n+++ sidplay-libs-2.1.1/builders/resid-builder/src/resid.cpp\t2013-11-18 01:00:21.563230632 +0100\n@@ -24,6 +24,7 @@\n \n #include \"resid.h\"\n #include \"resid-emu.h\"\n+#include <string.h>\n \n \n char ReSID::m_credit[];\n--- sidplay-libs-2.1.1/builders/resid-builder/src/resid-builder.cpp.orig\t2013-11-18 01:00:39.727231501 +0100\n+++ sidplay-libs-2.1.1/builders/resid-builder/src/resid-builder.cpp\t2013-11-18 01:00:57.415232346 +0100\n@@ -45,6 +45,7 @@\n \n #include \"resid.h\"\n #include \"resid-emu.h\"\n+#include <string.h>\n \n // Error String(s)\n const char *ReSIDBuilder::ERR_FILTER_DEFINITION = \"RESID ERROR: Filter definition is not valid (see docs).\";\n"
  },
  {
    "path": "packages/audio/soxr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"soxr\"\nPKG_VERSION=\"0.1.3\"\nPKG_SHA256=\"b111c15fdc8c029989330ff559184198c161100a59312f5dc19ddeb9b5a15889\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://sourceforge.net/projects/soxr/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/soxr/soxr-${PKG_VERSION}-Source.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain cmake:host\"\nPKG_LONGDESC=\"The SoX Resampler library performs one-dimensional sample-rate conversion. It may be used to resample PCM-encoded audio.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_EXAMPLES=OFF \\\n                       -DWITH_OPENMP=OFF \\\n                       -DBUILD_SHARED_LIBS=OFF \\\n                       -DBUILD_TESTS=OFF \\\n                       -DWITH_AVFFT=OFF\"\n\nif [ \"${TARGET_ARCH}\" = \"arm\" ]; then\n  if target_has_feature neon; then\n    PKG_CMAKE_OPTS_TARGET+=\" -DWITH_CR32=OFF\"\n  else\n    PKG_CMAKE_OPTS_TARGET+=\" -DWITH_CR32S=OFF\"\n  fi\nfi\n"
  },
  {
    "path": "packages/audio/speex/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"speex\"\nPKG_VERSION=\"1.2.1\"\nPKG_SHA256=\"cc55cce69d8753940d56936f7a1fe6db4b302df144aec93a92de1c65b1a87681\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://speex.org\"\nPKG_URL=\"https://gitlab.xiph.org/xiph/speex/-/archive/Speex-${PKG_VERSION}/speex-Speex-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"An Open Source Software patent-free audio compression format designed for speech.\"\nPKG_TOOLCHAIN=\"autotools\"\n"
  },
  {
    "path": "packages/audio/speexdsp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"speexdsp\"\nPKG_VERSION=\"1.2.1\"\nPKG_SHA256=\"b36d4f16e42b7103b7fc3e4a8f98b6bf889dd1f70f65c2365af07be82844db29\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://speex.org\"\nPKG_URL=\"https://gitlab.xiph.org/xiph/speexdsp/-/archive/SpeexDSP-${PKG_VERSION}/speexdsp-SpeexDSP-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Speex audio processing library\"\nPKG_TOOLCHAIN=\"autotools\"\n"
  },
  {
    "path": "packages/audio/taglib/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"taglib\"\nPKG_VERSION=\"1.13\"\nPKG_SHA256=\"58f08b4db3dc31ed152c04896ee9172d22052bc7ef12888028c01d8b1d60ade0\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://taglib.org\"\nPKG_URL=\"https://taglib.org/releases/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain cmake:host zlib\"\nPKG_LONGDESC=\"TagLib is a library for reading and editing the meta-data of several popular audio formats.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_EXAMPLES=OFF \\\n                       -DBUILD_SHARED_LIBS=OFF \\\n                       -DBUILD_TESTING=OFF \\\n                       -DENABLE_CCACHE=ON \\\n                       -DWITH_ZLIB=ON\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n  # pkgconf hack\n  sed -e \"s:\\(['=\\\" ]\\)/usr:\\\\1${SYSROOT_PREFIX}/usr:g\" -i ${SYSROOT_PREFIX}/usr/bin/taglib-config\n  sed -e \"s:\\([':\\\" ]\\)-I/usr:\\\\1-I${SYSROOT_PREFIX}/usr:g\" -i ${SYSROOT_PREFIX}/usr/lib/pkgconfig/taglib.pc\n  sed -e \"s:\\([':\\\" ]\\)-L/usr:\\\\1-L${SYSROOT_PREFIX}/usr:g\" -i ${SYSROOT_PREFIX}/usr/lib/pkgconfig/taglib.pc\n  sed -e \"s:\\([':\\\" ]\\)-I/usr:\\\\1-I${SYSROOT_PREFIX}/usr:g\" -i ${SYSROOT_PREFIX}/usr/lib/pkgconfig/taglib_c.pc\n  sed -e \"s:\\([':\\\" ]\\)-L/usr:\\\\1-L${SYSROOT_PREFIX}/usr:g\" -i ${SYSROOT_PREFIX}/usr/lib/pkgconfig/taglib_c.pc\n}\n"
  },
  {
    "path": "packages/audio/wavpack/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"wavpack\"\nPKG_VERSION=\"5.6.0\"\nPKG_SHA256=\"af8035f457509c3d338b895875228a9b81de276c88c79bb2d3e31d9b605da9a9\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://www.wavpack.com\"\nPKG_URL=\"https://www.wavpack.com/wavpack-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libiconv\"\nPKG_LONGDESC=\"Audio compression format providing lossless, high-quality lossy and hybrid compression mode.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_TESTING=OFF \\\n                       -DCMAKE_INSTALL_INCLUDEDIR=include/wavpack \\\n                       -DWAVPACK_BUILD_PROGRAMS=OFF \\\n                       -DWAVPACK_BUILD_DOCS=OFF \\\n                       -DWAVPACK_ENABLE_ASM=OFF \\\n                       -DWAVPACK_INSTALL_DOCS=OFF\"\n"
  },
  {
    "path": "packages/audio/wireplumber/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"wireplumber\"\nPKG_VERSION=\"0.4.13\"\nPKG_SHA256=\"2c3cd85a743249d418a64b137adaea475e9d36a3bb31e4230da83458c4d99e48\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://gitlab.freedesktop.org/pipewire/wireplumber\"\nPKG_URL=\"https://gitlab.freedesktop.org/pipewire/wireplumber/-/archive/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"pipewire glib lua54 glib:host\"\nPKG_LONGDESC=\"Session / policy manager implementation for PipeWire\"\n\nPKG_MESON_OPTS_TARGET=\"-Dintrospection=disabled \\\n                       -Ddoc=disabled \\\n                       -Dsystem-lua=true \\\n                       -Delogind=disabled \\\n                       -Dsystemd=enabled \\\n                       -Dsystemd-system-service=true \\\n                       -Dsystemd-user-service=false \\\n                       -Dsystemd-system-unit-dir=/usr/lib/systemd/system \\\n                       -Dtests=false\"\n\npost_makeinstall_target() {\n  # connect to the system bus\n  sed '/^\\[Service\\]/a Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket' -i ${INSTALL}/usr/lib/systemd/system/wireplumber.service\n\n  # ref https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/0da29f38181e391160fa8702623050b8544ec775\n  cat > ${INSTALL}/usr/share/wireplumber/main.lua.d/89-disable-session-dbus-dependent-features.lua << EOF\nalsa_monitor.properties[\"alsa.reserve\"] = false\ndefault_access.properties[\"enable-flatpak-portal\"] = false\nEOF\n\n  cat > ${INSTALL}/usr/share/wireplumber/main.lua.d/89-disable-v4l2.lua << EOF\nv4l2_monitor.enabled = false\nEOF\n\n  cat > ${INSTALL}/usr/share/wireplumber/bluetooth.lua.d/89-disable-session-dbus-dependent-features.lua << EOF\nbluez_monitor.properties[\"with-logind\"] = false\nEOF\n\n  cat > ${INSTALL}/usr/share/wireplumber/bluetooth.lua.d/89-disable-bluez-hfphsp-backend.lua << EOF\nbluez_monitor.properties[\"bluez5.hfphsp-backend\"] = \"none\"\nEOF\n}\n\npost_install() {\n  enable_service wireplumber.service\n}\n"
  },
  {
    "path": "packages/compress/7-zip/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"7-zip\"\nPKG_VERSION=\"23.01\"\nPKG_SHA256=\"356071007360e5a1824d9904993e8b2480b51b570e8c9faf7c0f58ebe4bf9f74\"\nPKG_LICENSE=\"7-Zip\"\nPKG_SITE=\"https://www.7-zip.org\"\nPKG_URL=\"https://www.7-zip.org/a/7z${PKG_VERSION/./}-src.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"7-Zip is a file archiver with a high compression ratio\"\nPKG_TAR_STRIP_COMPONENTS=\"--strip-components=0\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_build_host() {\n  rm -fr ${PKG_BUILD}/.${HOST_NAME}\n  mkdir -p ${PKG_BUILD}/.${HOST_NAME}\n  cp -RP ${PKG_BUILD}/* ${PKG_BUILD}/.${HOST_NAME}\n}\n\nmake_host() {\n  # compile without 7-Zip's assembler code (not required in toolchain)\n  make CXX=${CXX} CC=${CC} -f makefile.gcc -C ${PKG_BUILD}/.${HOST_NAME}/CPP/7zip/Bundles/Alone\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n  cp ${PKG_BUILD}/.${HOST_NAME}/CPP/7zip/Bundles/Alone/_o/7za ${TOOLCHAIN}/bin\n}\n\npre_build_target() {\n  rm -fr ${PKG_BUILD}/.${TARGET_NAME}\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n  cp -RP ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}\n}\n\nmake_target() {\n  # arm (arm32) does not have an assembler code option for 7-Zip\n  # dont use x86_64 ../../cmpl_gcc_x64.mak file to build 7-Zip's assembler code (as asmc is not available)\n  if [ \"${TARGET_ARCH}\" = \"aarch64\" ]; then\n    make CXX=${CXX} CC=${CC} -f ../../cmpl_gcc_arm64.mak -C ${PKG_BUILD}/.${TARGET_NAME}/CPP/7zip/Bundles/Alone2\n  else\n    make CXX=${CXX} CC=${CC} -f makefile.gcc -C ${PKG_BUILD}/.${TARGET_NAME}/CPP/7zip/Bundles/Alone2\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  if [ \"${TARGET_ARCH}\" = \"aarch64\" ]; then\n    cp -p ${PKG_BUILD}/.${TARGET_NAME}/CPP/7zip/Bundles/Alone2/b/g_arm64/7zz ${INSTALL}/usr/bin\n  else\n    cp -p ${PKG_BUILD}/.${TARGET_NAME}/CPP/7zip/Bundles/Alone2/_o/7zz ${INSTALL}/usr/bin\n  fi\n}\n"
  },
  {
    "path": "packages/compress/bzip2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"bzip2\"\nPKG_VERSION=\"1.0.8\"\nPKG_SHA256=\"ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://sourceware.org/bzip2/\"\nPKG_URL=\"https://sourceware.org/pub/bzip2/bzip2-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A high-quality bzip2 data compressor.\"\nPKG_BUILD_FLAGS=\"+pic +pic:host\"\n\npre_build_host() {\n  mkdir -p ${PKG_BUILD}/.${HOST_NAME}\n  cp -r ${PKG_BUILD}/* ${PKG_BUILD}/.${HOST_NAME}\n}\n\nmake_host() {\n  cd ${PKG_BUILD}/.${HOST_NAME}\n  make -f Makefile-libbz2_so CC=${HOST_CC} CFLAGS=\"${CFLAGS}\"\n}\n\nmakeinstall_host() {\n  make install PREFIX=${TOOLCHAIN}\n}\n\npre_build_target() {\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n  cp -r ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}\n}\n\npre_make_target() {\n  cd ${PKG_BUILD}/.${TARGET_NAME}\n  sed -e \"s,ln -s (lib.*),ln -snf \\$${1}; ln -snf libbz2.so.${PKG_VERSION} libbz2.so,g\" -i Makefile-libbz2_so\n}\n\nmake_target() {\n  make -f Makefile-libbz2_so CC=${CC} CFLAGS=\"${CFLAGS}\"\n}\n\npost_make_target() {\n  ln -snf libbz2.so.1.0 libbz2.so\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/include\n    cp bzlib.h ${SYSROOT_PREFIX}/usr/include\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n    cp -P libbz2.so* ${SYSROOT_PREFIX}/usr/lib\n\n  mkdir -p ${INSTALL}/usr/lib\n    cp -P libbz2.so* ${INSTALL}/usr/lib\n}\n"
  },
  {
    "path": "packages/compress/bzip2/patches/bzip2-1.0.8-cflags.patch",
    "content": "--- bzip2-1.0.8/Makefile-libbz2_so.orig\t2019-07-28 09:43:16.597589341 +0200\n+++ bzip2-1.0.8/Makefile-libbz2_so\t2019-07-28 09:53:41.142160730 +0200\n@@ -35,7 +35,7 @@\n       bzlib.o\n \n all: $(OBJS)\n-\t$(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS)\n+\t$(CC) $(CFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS)\n \t$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8\n \trm -f libbz2.so.1.0\n \tln -s libbz2.so.1.0.8 libbz2.so.1.0\n"
  },
  {
    "path": "packages/compress/libarchive/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libarchive\"\nPKG_VERSION=\"3.6.2\"\nPKG_SHA256=\"9e2c1b80d5fbe59b61308fdfab6c79b5021d7ff4ff2489fb12daf0a96a83551d\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.libarchive.org\"\nPKG_URL=\"https://www.libarchive.org/downloads/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\"A multi-format archive and compression library.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DCMAKE_POSITION_INDEPENDENT_CODE=1 \\\n                       -DENABLE_EXPAT=0 \\\n                       -DENABLE_ICONV=0 \\\n                       -DENABLE_LIBXML2=0 \\\n                       -DENABLE_LZO=1 \\\n                       -DENABLE_TEST=0 \\\n                       -DENABLE_COVERAGE=0 \\\n                       -DENABLE_WERROR=0\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}\n\n  # delete the shared library as we only want static\n  rm ${SYSROOT_PREFIX}/usr/lib/libarchive.so*\n}\n"
  },
  {
    "path": "packages/compress/lz4/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"lz4\"\nPKG_VERSION=\"1.9.4\"\nPKG_SHA256=\"0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/lz4/lz4\"\nPKG_URL=\"https://github.com/lz4/lz4/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"lz4 data compressor/decompressor\"\n\nconfigure_package() {\n  PKG_CMAKE_SCRIPT=\"${PKG_BUILD}/build/cmake/CMakeLists.txt\"\n\n  PKG_CMAKE_OPTS_TARGET=\"-DBUILD_SHARED_LIBS=0 -DCMAKE_POSITION_INDEPENDENT_CODE=0\"\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}\n}\n"
  },
  {
    "path": "packages/compress/lzo/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"lzo\"\nPKG_VERSION=\"2.10\"\nPKG_SHA256=\"c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.oberhumer.com/opensource/lzo\"\nPKG_URL=\"http://www.oberhumer.com/opensource/lzo/download/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A data compression library which is suitable for data de-/compression.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CMAKE_OPTS_HOST=\"-DENABLE_SHARED=OFF -DENABLE_STATIC=ON\"\nPKG_CMAKE_OPTS_TARGET=\"-DENABLE_SHARED=OFF -DENABLE_STATIC=ON\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/libexec\n}\n"
  },
  {
    "path": "packages/compress/p7zip/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"p7zip\"\nPKG_VERSION=\"16.02\"\nPKG_SHA256=\"5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://p7zip.sourceforge.net/\"\nPKG_URL=\"http://downloads.sourceforge.net/project/p7zip/p7zip/${PKG_VERSION}/p7zip_${PKG_VERSION}_src_all.tar.bz2\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"p7zip is a port of 7za.exe for POSIX systems like Unix.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_build_host() {\n  rm -fr ${PKG_BUILD}/.${HOST_NAME}\n  mkdir -p ${PKG_BUILD}/.${HOST_NAME}\n  cp -RP ${PKG_BUILD}/* ${PKG_BUILD}/.${HOST_NAME}\n}\n\nmake_host() {\n  make CXX=${CXX} CC=${CC} -C ${PKG_BUILD}/.${HOST_NAME} 7za\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp ${PKG_BUILD}/.${HOST_NAME}/bin/7za ${TOOLCHAIN}/bin\n}\n\npre_build_target() {\n  rm -fr ${PKG_BUILD}/.${TARGET_NAME}\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n  cp -RP ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}\n}\n\nmake_target() {\n  make CXX=${CXX} CC=${CC} -C ${PKG_BUILD}/.${TARGET_NAME} 7z 7za 7zr\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp -p ${PKG_BUILD}/.${TARGET_NAME}/bin/7z.so ${INSTALL}/usr/bin\n    cp -pr ${PKG_BUILD}/.${TARGET_NAME}/bin/Codecs ${INSTALL}/usr/bin\n    cp -p ${PKG_BUILD}/.${TARGET_NAME}/bin/7z ${INSTALL}/usr/bin\n    cp -p ${PKG_BUILD}/.${TARGET_NAME}/bin/7za ${INSTALL}/usr/bin\n    cp -p ${PKG_BUILD}/.${TARGET_NAME}/bin/7zr ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/compress/p7zip/patches/p7zip-0100-CVE-2016-9296.patch",
    "content": "--- ./CPP/7zip/Archive/7z/7zIn.cpp.orig\t2016-11-21 01:42:29.460901230 +0000\n+++ ./CPP/7zip/Archive/7z/7zIn.cpp\t2016-11-21 01:42:57.481197725 +0000\n@@ -1097,7 +1097,8 @@ HRESULT CInArchive::ReadAndDecodePackedS\n       if (CrcCalc(data, unpackSize) != folders.FolderCRCs.Vals[i])\n         ThrowIncorrect();\n   }\n-  HeadersSize += folders.PackPositions[folders.NumPackStreams];\n+  if (folders.PackPositions)\n+      HeadersSize += folders.PackPositions[folders.NumPackStreams];\n   return S_OK;\n }\n \n"
  },
  {
    "path": "packages/compress/p7zip/patches/p7zip-0200-CVE-2017-17969.patch",
    "content": "From 79bca880ce7bcf07216c45f93afea545e0344418 Mon Sep 17 00:00:00 2001\nFrom: aone <aone@keka.io>\nDate: Mon, 5 Feb 2018 13:01:09 +0100\nSubject: [PATCH] Security fix CVE-2017-17969\n\n---\n CPP/7zip/Compress/ShrinkDecoder.cpp | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/CPP/7zip/Compress/ShrinkDecoder.cpp b/CPP/7zip/Compress/ShrinkDecoder.cpp\nindex 80b7e67..5bb0559 100644\n--- a/CPP/7zip/Compress/ShrinkDecoder.cpp\n+++ b/CPP/7zip/Compress/ShrinkDecoder.cpp\n@@ -121,7 +121,12 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *\n     {\n       _stack[i++] = _suffixes[cur];\n       cur = _parents[cur];\n+\t  if (cur >= kNumItems || i >= kNumItems)\n+\t  \tbreak;\n     }\n+\t\n+\tif (cur >= kNumItems || i >= kNumItems)\n+\t\tbreak;\n     \n     _stack[i++] = (Byte)cur;\n     lastChar2 = (Byte)cur;\n"
  },
  {
    "path": "packages/compress/p7zip/patches/p7zip-0300-CVE-2018-5996.patch",
    "content": "From: Robert Luberda <robert@debian.org>\nDate: Sun, 28 Jan 2018 23:47:40 +0100\nSubject: CVE-2018-5996\n\nHopefully fix Memory Corruptions via RAR PPMd (CVE-2018-5996) by\napplying a few changes from 7Zip 18.00-beta.\n\nBug-Debian: https://bugs.debian.org/#888314\n---\n CPP/7zip/Compress/Rar1Decoder.cpp | 13 +++++++++----\n CPP/7zip/Compress/Rar1Decoder.h   |  1 +\n CPP/7zip/Compress/Rar2Decoder.cpp | 10 +++++++++-\n CPP/7zip/Compress/Rar2Decoder.h   |  1 +\n CPP/7zip/Compress/Rar3Decoder.cpp | 23 ++++++++++++++++++++---\n CPP/7zip/Compress/Rar3Decoder.h   |  2 ++\n 6 files changed, 42 insertions(+), 8 deletions(-)\n\ndiff --git a/CPP/7zip/Compress/Rar1Decoder.cpp b/CPP/7zip/Compress/Rar1Decoder.cpp\nindex 1aaedcc..68030c7 100644\n--- a/CPP/7zip/Compress/Rar1Decoder.cpp\n+++ b/CPP/7zip/Compress/Rar1Decoder.cpp\n@@ -29,7 +29,7 @@ public:\n };\n */\n \n-CDecoder::CDecoder(): m_IsSolid(false) { }\n+CDecoder::CDecoder(): m_IsSolid(false), _errorMode(false) { }\n \n void CDecoder::InitStructures()\n {\n@@ -406,9 +406,14 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *\n   InitData();\n   if (!m_IsSolid)\n   {\n+    _errorMode = false;\n     InitStructures();\n     InitHuff();\n   }\n+\n+  if (_errorMode)\n+    return S_FALSE;\n+\n   if (m_UnpackSize > 0)\n   {\n     GetFlagsBuf();\n@@ -477,9 +482,9 @@ STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream\n     const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress)\n {\n   try { return CodeReal(inStream, outStream, inSize, outSize, progress); }\n-  catch(const CInBufferException &e) { return e.ErrorCode; }\n-  catch(const CLzOutWindowException &e) { return e.ErrorCode; }\n-  catch(...) { return S_FALSE; }\n+  catch(const CInBufferException &e) { _errorMode = true; return e.ErrorCode; }\n+  catch(const CLzOutWindowException &e) { _errorMode = true; return e.ErrorCode; }\n+  catch(...) { _errorMode = true; return S_FALSE; }\n }\n \n STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *data, UInt32 size)\ndiff --git a/CPP/7zip/Compress/Rar1Decoder.h b/CPP/7zip/Compress/Rar1Decoder.h\nindex 630f089..01b606b 100644\n--- a/CPP/7zip/Compress/Rar1Decoder.h\n+++ b/CPP/7zip/Compress/Rar1Decoder.h\n@@ -39,6 +39,7 @@ public:\n \n   Int64 m_UnpackSize;\n   bool m_IsSolid;\n+  bool _errorMode;\n \n   UInt32 ReadBits(int numBits);\n   HRESULT CopyBlock(UInt32 distance, UInt32 len);\ndiff --git a/CPP/7zip/Compress/Rar2Decoder.cpp b/CPP/7zip/Compress/Rar2Decoder.cpp\nindex b3f2b4b..0580c8d 100644\n--- a/CPP/7zip/Compress/Rar2Decoder.cpp\n+++ b/CPP/7zip/Compress/Rar2Decoder.cpp\n@@ -80,7 +80,8 @@ static const UInt32 kHistorySize = 1 << 20;\n static const UInt32 kWindowReservSize = (1 << 22) + 256;\n \n CDecoder::CDecoder():\n-  m_IsSolid(false)\n+  m_IsSolid(false),\n+  m_TablesOK(false)\n {\n }\n \n@@ -100,6 +101,8 @@ UInt32 CDecoder::ReadBits(unsigned numBits) { return m_InBitStream.ReadBits(numB\n \n bool CDecoder::ReadTables(void)\n {\n+  m_TablesOK = false;\n+\n   Byte levelLevels[kLevelTableSize];\n   Byte newLevels[kMaxTableSize];\n   m_AudioMode = (ReadBits(1) == 1);\n@@ -170,6 +173,8 @@ bool CDecoder::ReadTables(void)\n   }\n   \n   memcpy(m_LastLevels, newLevels, kMaxTableSize);\n+  m_TablesOK = true;\n+\n   return true;\n }\n \n@@ -344,6 +349,9 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *\n       return S_FALSE;\n   }\n \n+  if (!m_TablesOK)\n+    return S_FALSE;\n+\n   UInt64 startPos = m_OutWindowStream.GetProcessedSize();\n   while (pos < unPackSize)\n   {\ndiff --git a/CPP/7zip/Compress/Rar2Decoder.h b/CPP/7zip/Compress/Rar2Decoder.h\nindex 3a0535c..0e9005f 100644\n--- a/CPP/7zip/Compress/Rar2Decoder.h\n+++ b/CPP/7zip/Compress/Rar2Decoder.h\n@@ -139,6 +139,7 @@ class CDecoder :\n \n   UInt64 m_PackSize;\n   bool m_IsSolid;\n+  bool m_TablesOK;\n \n   void InitStructures();\n   UInt32 ReadBits(unsigned numBits);\ndiff --git a/CPP/7zip/Compress/Rar3Decoder.cpp b/CPP/7zip/Compress/Rar3Decoder.cpp\nindex 3bf2513..6cb8a6a 100644\n--- a/CPP/7zip/Compress/Rar3Decoder.cpp\n+++ b/CPP/7zip/Compress/Rar3Decoder.cpp\n@@ -92,7 +92,8 @@ CDecoder::CDecoder():\n   _writtenFileSize(0),\n   _vmData(0),\n   _vmCode(0),\n-  m_IsSolid(false)\n+  m_IsSolid(false),\n+  _errorMode(false)\n {\n   Ppmd7_Construct(&_ppmd);\n }\n@@ -545,6 +546,9 @@ HRESULT CDecoder::ReadTables(bool &keepDecompressing)\n     return InitPPM();\n   }\n \n+  TablesRead = false;\n+  TablesOK = false;\n+\n   _lzMode = true;\n   PrevAlignBits = 0;\n   PrevAlignCount = 0;\n@@ -606,6 +610,9 @@ HRESULT CDecoder::ReadTables(bool &keepDecompressing)\n       }\n     }\n   }\n+  if (InputEofError())\n+    return S_FALSE;\n+\n   TablesRead = true;\n \n   // original code has check here:\n@@ -623,6 +630,9 @@ HRESULT CDecoder::ReadTables(bool &keepDecompressing)\n   RIF(m_LenDecoder.Build(&newLevels[kMainTableSize + kDistTableSize + kAlignTableSize]));\n \n   memcpy(m_LastLevels, newLevels, kTablesSizesSum);\n+\n+  TablesOK = true;\n+\n   return S_OK;\n }\n \n@@ -824,7 +834,12 @@ HRESULT CDecoder::CodeReal(ICompressProgressInfo *progress)\n     PpmEscChar = 2;\n     PpmError = true;\n     InitFilters();\n+    _errorMode = false;\n   }\n+\n+  if (_errorMode)\n+    return S_FALSE;\n+\n   if (!m_IsSolid || !TablesRead)\n   {\n     bool keepDecompressing;\n@@ -838,6 +853,8 @@ HRESULT CDecoder::CodeReal(ICompressProgressInfo *progress)\n     bool keepDecompressing;\n     if (_lzMode)\n     {\n+      if (!TablesOK)\n+        return S_FALSE;\n       RINOK(DecodeLZ(keepDecompressing))\n     }\n     else\n@@ -901,8 +918,8 @@ STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream\n     _unpackSize = outSize ? *outSize : (UInt64)(Int64)-1;\n     return CodeReal(progress);\n   }\n-  catch(const CInBufferException &e)  { return e.ErrorCode; }\n-  catch(...) { return S_FALSE; }\n+  catch(const CInBufferException &e)  { _errorMode = true; return e.ErrorCode; }\n+  catch(...) { _errorMode = true; return S_FALSE; }\n   // CNewException is possible here. But probably CNewException is caused\n   // by error in data stream.\n }\ndiff --git a/CPP/7zip/Compress/Rar3Decoder.h b/CPP/7zip/Compress/Rar3Decoder.h\nindex c130cec..2f72d7d 100644\n--- a/CPP/7zip/Compress/Rar3Decoder.h\n+++ b/CPP/7zip/Compress/Rar3Decoder.h\n@@ -192,6 +192,7 @@ class CDecoder:\n   UInt32 _lastFilter;\n \n   bool m_IsSolid;\n+  bool _errorMode;\n \n   bool _lzMode;\n   bool _unsupportedFilter;\n@@ -200,6 +201,7 @@ class CDecoder:\n   UInt32 PrevAlignCount;\n \n   bool TablesRead;\n+  bool TablesOK;\n \n   CPpmd7 _ppmd;\n   int PpmEscChar;\n"
  },
  {
    "path": "packages/compress/p7zip/patches/p7zip-0400-CVE-2018-10115.patch",
    "content": "From: Robert Luberda <robert@debian.org>\nDate: Tue, 29 May 2018 23:59:09 +0200\nSubject: Fix CVE-2018-10115\n\nApply \"patch\" taken from https://landave.io/files/patch_7zip_CVE-2018-10115.txt\n\n\nBugs-Debian: https://bugs.debian.org/897674\n---\n CPP/7zip/Compress/Rar1Decoder.cpp | 16 +++++++++++-----\n CPP/7zip/Compress/Rar1Decoder.h   |  3 ++-\n CPP/7zip/Compress/Rar2Decoder.cpp | 17 +++++++++++++----\n CPP/7zip/Compress/Rar2Decoder.h   |  3 ++-\n CPP/7zip/Compress/Rar3Decoder.cpp | 19 +++++++++++++++----\n CPP/7zip/Compress/Rar3Decoder.h   |  3 ++-\n CPP/7zip/Compress/Rar5Decoder.cpp |  8 ++++++++\n CPP/7zip/Compress/Rar5Decoder.h   |  1 +\n 8 files changed, 54 insertions(+), 16 deletions(-)\n\ndiff --git a/CPP/7zip/Compress/Rar1Decoder.cpp b/CPP/7zip/Compress/Rar1Decoder.cpp\nindex 68030c7..8c890c8 100644\n--- a/CPP/7zip/Compress/Rar1Decoder.cpp\n+++ b/CPP/7zip/Compress/Rar1Decoder.cpp\n@@ -29,7 +29,7 @@ public:\n };\n */\n \n-CDecoder::CDecoder(): m_IsSolid(false), _errorMode(false) { }\n+CDecoder::CDecoder(): _isSolid(false), _solidAllowed(false), _errorMode(false) { }\n \n void CDecoder::InitStructures()\n {\n@@ -345,7 +345,7 @@ void CDecoder::GetFlagsBuf()\n \n void CDecoder::InitData()\n {\n-  if (!m_IsSolid)\n+  if (!_isSolid)\n   {\n     AvrPlcB = AvrLn1 = AvrLn2 = AvrLn3 = NumHuf = Buf60 = 0;\n     AvrPlc = 0x3500;\n@@ -391,6 +391,11 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *\n   if (inSize == NULL || outSize == NULL)\n     return E_INVALIDARG;\n \n+  if (_isSolid && !_solidAllowed)\n+    return S_FALSE;\n+\n+  _solidAllowed = false;\n+\n   if (!m_OutWindowStream.Create(kHistorySize))\n     return E_OUTOFMEMORY;\n   if (!m_InBitStream.Create(1 << 20))\n@@ -398,13 +403,13 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *\n \n   m_UnpackSize = (Int64)*outSize;\n   m_OutWindowStream.SetStream(outStream);\n-  m_OutWindowStream.Init(m_IsSolid);\n+  m_OutWindowStream.Init(_isSolid);\n   m_InBitStream.SetStream(inStream);\n   m_InBitStream.Init();\n \n   // CCoderReleaser coderReleaser(this);\n   InitData();\n-  if (!m_IsSolid)\n+  if (!_isSolid)\n   {\n     _errorMode = false;\n     InitStructures();\n@@ -475,6 +480,7 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *\n   }\n   if (m_UnpackSize < 0)\n     return S_FALSE;\n+  _solidAllowed = true;\n   return m_OutWindowStream.Flush();\n }\n \n@@ -491,7 +497,7 @@ STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *data, UInt32 size)\n {\n   if (size < 1)\n     return E_INVALIDARG;\n-  m_IsSolid = ((data[0] & 1) != 0);\n+  _isSolid = ((data[0] & 1) != 0);\n   return S_OK;\n }\n \ndiff --git a/CPP/7zip/Compress/Rar1Decoder.h b/CPP/7zip/Compress/Rar1Decoder.h\nindex 01b606b..8abb3a3 100644\n--- a/CPP/7zip/Compress/Rar1Decoder.h\n+++ b/CPP/7zip/Compress/Rar1Decoder.h\n@@ -38,7 +38,8 @@ public:\n   UInt32 LastLength;\n \n   Int64 m_UnpackSize;\n-  bool m_IsSolid;\n+  bool _isSolid;\n+  bool _solidAllowed;\n   bool _errorMode;\n \n   UInt32 ReadBits(int numBits);\ndiff --git a/CPP/7zip/Compress/Rar2Decoder.cpp b/CPP/7zip/Compress/Rar2Decoder.cpp\nindex 0580c8d..be8d842 100644\n--- a/CPP/7zip/Compress/Rar2Decoder.cpp\n+++ b/CPP/7zip/Compress/Rar2Decoder.cpp\n@@ -80,7 +80,8 @@ static const UInt32 kHistorySize = 1 << 20;\n static const UInt32 kWindowReservSize = (1 << 22) + 256;\n \n CDecoder::CDecoder():\n-  m_IsSolid(false),\n+  _isSolid(false),\n+  _solidAllowed(false),\n   m_TablesOK(false)\n {\n }\n@@ -320,6 +321,10 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *\n   if (inSize == NULL || outSize == NULL)\n     return E_INVALIDARG;\n \n+  if (_isSolid && !_solidAllowed)\n+    return S_FALSE;\n+  _solidAllowed = false;\n+\n   if (!m_OutWindowStream.Create(kHistorySize))\n     return E_OUTOFMEMORY;\n   if (!m_InBitStream.Create(1 << 20))\n@@ -330,12 +335,12 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *\n   UInt64 pos = 0, unPackSize = *outSize;\n   \n   m_OutWindowStream.SetStream(outStream);\n-  m_OutWindowStream.Init(m_IsSolid);\n+  m_OutWindowStream.Init(_isSolid);\n   m_InBitStream.SetStream(inStream);\n   m_InBitStream.Init();\n \n   // CCoderReleaser coderReleaser(this);\n-  if (!m_IsSolid)\n+  if (!_isSolid)\n   {\n     InitStructures();\n     if (unPackSize == 0)\n@@ -343,6 +348,7 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *\n       if (m_InBitStream.GetProcessedSize() + 2 <= m_PackSize) // test it: probably incorrect;\n         if (!ReadTables())\n           return S_FALSE;\n+      _solidAllowed = true;\n       return S_OK;\n     }\n     if (!ReadTables())\n@@ -386,6 +392,9 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *\n \n   if (!ReadLastTables())\n     return S_FALSE;\n+\n+  _solidAllowed = true;\n+\n   return m_OutWindowStream.Flush();\n }\n \n@@ -402,7 +411,7 @@ STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *data, UInt32 size)\n {\n   if (size < 1)\n     return E_INVALIDARG;\n-  m_IsSolid = ((data[0] & 1) != 0);\n+  _isSolid = ((data[0] & 1) != 0);\n   return S_OK;\n }\n \ndiff --git a/CPP/7zip/Compress/Rar2Decoder.h b/CPP/7zip/Compress/Rar2Decoder.h\nindex 0e9005f..370bce2 100644\n--- a/CPP/7zip/Compress/Rar2Decoder.h\n+++ b/CPP/7zip/Compress/Rar2Decoder.h\n@@ -138,7 +138,8 @@ class CDecoder :\n   Byte m_LastLevels[kMaxTableSize];\n \n   UInt64 m_PackSize;\n-  bool m_IsSolid;\n+  bool _isSolid;\n+  bool _solidAllowed;\n   bool m_TablesOK;\n \n   void InitStructures();\ndiff --git a/CPP/7zip/Compress/Rar3Decoder.cpp b/CPP/7zip/Compress/Rar3Decoder.cpp\nindex 6cb8a6a..7b85833 100644\n--- a/CPP/7zip/Compress/Rar3Decoder.cpp\n+++ b/CPP/7zip/Compress/Rar3Decoder.cpp\n@@ -92,7 +92,8 @@ CDecoder::CDecoder():\n   _writtenFileSize(0),\n   _vmData(0),\n   _vmCode(0),\n-  m_IsSolid(false),\n+  _isSolid(false),\n+  _solidAllowed(false),\n   _errorMode(false)\n {\n   Ppmd7_Construct(&_ppmd);\n@@ -821,7 +822,7 @@ HRESULT CDecoder::CodeReal(ICompressProgressInfo *progress)\n {\n   _writtenFileSize = 0;\n   _unsupportedFilter = false;\n-  if (!m_IsSolid)\n+  if (!_isSolid)\n   {\n     _lzSize = 0;\n     _winPos = 0;\n@@ -840,12 +841,15 @@ HRESULT CDecoder::CodeReal(ICompressProgressInfo *progress)\n   if (_errorMode)\n     return S_FALSE;\n \n-  if (!m_IsSolid || !TablesRead)\n+  if (!_isSolid || !TablesRead)\n   {\n     bool keepDecompressing;\n     RINOK(ReadTables(keepDecompressing));\n     if (!keepDecompressing)\n+    {\n+      _solidAllowed = true;\n       return S_OK;\n+    }\n   }\n \n   for (;;)\n@@ -870,6 +874,9 @@ HRESULT CDecoder::CodeReal(ICompressProgressInfo *progress)\n     if (!keepDecompressing)\n       break;\n   }\n+\n+  _solidAllowed = true;\n+\n   RINOK(WriteBuf());\n   UInt64 packSize = m_InBitStream.BitDecoder.GetProcessedSize();\n   RINOK(progress->SetRatioInfo(&packSize, &_writtenFileSize));\n@@ -890,6 +897,10 @@ STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream\n     if (!inSize)\n       return E_INVALIDARG;\n \n+    if (_isSolid && !_solidAllowed)\n+      return S_FALSE;\n+    _solidAllowed = false;\n+\n     if (!_vmData)\n     {\n       _vmData = (Byte *)::MidAlloc(kVmDataSizeMax + kVmCodeSizeMax);\n@@ -928,7 +939,7 @@ STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *data, UInt32 size)\n {\n   if (size < 1)\n     return E_INVALIDARG;\n-  m_IsSolid = ((data[0] & 1) != 0);\n+  _isSolid = ((data[0] & 1) != 0);\n   return S_OK;\n }\n \ndiff --git a/CPP/7zip/Compress/Rar3Decoder.h b/CPP/7zip/Compress/Rar3Decoder.h\nindex 2f72d7d..32c8943 100644\n--- a/CPP/7zip/Compress/Rar3Decoder.h\n+++ b/CPP/7zip/Compress/Rar3Decoder.h\n@@ -191,7 +191,8 @@ class CDecoder:\n   CRecordVector<CTempFilter *>  _tempFilters;\n   UInt32 _lastFilter;\n \n-  bool m_IsSolid;\n+  bool _isSolid;\n+  bool _solidAllowed;\n   bool _errorMode;\n \n   bool _lzMode;\ndiff --git a/CPP/7zip/Compress/Rar5Decoder.cpp b/CPP/7zip/Compress/Rar5Decoder.cpp\nindex dc8830f..a826d5a 100644\n--- a/CPP/7zip/Compress/Rar5Decoder.cpp\n+++ b/CPP/7zip/Compress/Rar5Decoder.cpp\n@@ -72,6 +72,7 @@ CDecoder::CDecoder():\n     _writtenFileSize(0),\n     _dictSizeLog(0),\n     _isSolid(false),\n+    _solidAllowed(false),\n     _wasInit(false),\n     _inputBuf(NULL)\n {\n@@ -801,7 +802,10 @@ HRESULT CDecoder::CodeReal()\n   */\n \n   if (res == S_OK)\n+  {\n+    _solidAllowed = true;\n     res = res2;\n+  }\n      \n   if (res == S_OK && _unpackSize_Defined && _writtenFileSize != _unpackSize)\n     return S_FALSE;\n@@ -821,6 +825,10 @@ STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream\n {\n   try\n   {\n+    if (_isSolid && !_solidAllowed)\n+      return S_FALSE;\n+    _solidAllowed = false;\n+\n     if (_dictSizeLog >= sizeof(size_t) * 8)\n       return E_NOTIMPL;\n \ndiff --git a/CPP/7zip/Compress/Rar5Decoder.h b/CPP/7zip/Compress/Rar5Decoder.h\nindex b0a4dd1..3db5018 100644\n--- a/CPP/7zip/Compress/Rar5Decoder.h\n+++ b/CPP/7zip/Compress/Rar5Decoder.h\n@@ -271,6 +271,7 @@ class CDecoder:\n   Byte _dictSizeLog;\n   bool _tableWasFilled;\n   bool _isSolid;\n+  bool _solidAllowed;\n   bool _wasInit;\n \n   UInt32 _reps[kNumReps];\n"
  },
  {
    "path": "packages/compress/p7zip/patches/p7zip-0500-gcc10-build-fix.patch",
    "content": "diff -Nrup a/CPP/Windows/ErrorMsg.cpp b/CPP/Windows/ErrorMsg.cpp\n--- a/CPP/Windows/ErrorMsg.cpp\t2015-01-18 11:20:28.000000000 -0700\n+++ b/CPP/Windows/ErrorMsg.cpp\t2019-09-24 13:01:18.887289152 -0600\n@@ -14,14 +14,14 @@ UString MyFormatMessage(DWORD errorCode)\n   AString msg;\n \n   switch(errorCode) {\n-    case ERROR_NO_MORE_FILES   : txt = \"No more files\"; break ;\n-    case E_NOTIMPL             : txt = \"E_NOTIMPL\"; break ;\n-    case E_NOINTERFACE         : txt = \"E_NOINTERFACE\"; break ;\n-    case E_ABORT               : txt = \"E_ABORT\"; break ;\n-    case E_FAIL                : txt = \"E_FAIL\"; break ;\n-    case STG_E_INVALIDFUNCTION : txt = \"STG_E_INVALIDFUNCTION\"; break ;\n-    case E_OUTOFMEMORY         : txt = \"E_OUTOFMEMORY\"; break ;\n-    case E_INVALIDARG          : txt = \"E_INVALIDARG\"; break ;\n+    case unsigned (ERROR_NO_MORE_FILES)   : txt = \"No more files\"; break ;\n+    case unsigned (E_NOTIMPL)             : txt = \"E_NOTIMPL\"; break ;\n+    case unsigned (E_NOINTERFACE)         : txt = \"E_NOINTERFACE\"; break ;\n+    case unsigned (E_ABORT)               : txt = \"E_ABORT\"; break ;\n+    case unsigned (E_FAIL)                : txt = \"E_FAIL\"; break ;\n+    case unsigned (STG_E_INVALIDFUNCTION) : txt = \"STG_E_INVALIDFUNCTION\"; break ;\n+    case unsigned (E_OUTOFMEMORY)         : txt = \"E_OUTOFMEMORY\"; break ;\n+    case unsigned (E_INVALIDARG)          : txt = \"E_INVALIDARG\"; break ;\n     case ERROR_DIRECTORY          : txt = \"Error Directory\"; break ;\n     default:\n       txt = strerror(errorCode);\n"
  },
  {
    "path": "packages/compress/p7zip/patches/p7zip-0501-change-numMethods-from-bool-to-unsigned.patch",
    "content": "From 0820ef4b9238c1e39ae5bda32cc08cce3fd3ce89 Mon Sep 17 00:00:00 2001\nFrom: Nisha Parrakat <Nisha.Parrakat@kpit.com>\nDate: Wed, 26 May 2021 19:59:28 +0000\nSubject: [PATCH] fixes the below error\n\n| ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp: In member function 'virtual LONG NArchive::NWim::CHandler::GetArchiveProperty(PROPID, PROPVARIANT*)':\n| ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:308:11: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17\n|   308 |           numMethods++;\n|       |           ^~~~~~~~~~\n| ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:318:9: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17\n|   318 |         numMethods++;\n\nuse unsigned instead of bool\nSigned-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>\n\nUpstream-Status: Pending\n\n---\n CPP/7zip/Archive/Wim/WimHandler.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/CPP/7zip/Archive/Wim/WimHandler.cpp b/CPP/7zip/Archive/Wim/WimHandler.cpp\nindex 27d3298..4ff5cfe 100644\n--- a/CPP/7zip/Archive/Wim/WimHandler.cpp\n+++ b/CPP/7zip/Archive/Wim/WimHandler.cpp\n@@ -298,7 +298,7 @@ STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value)\n \n       AString res;\n \n-      bool numMethods = 0;\n+      unsigned numMethods = 0;\n       for (unsigned i = 0; i < ARRAY_SIZE(k_Methods); i++)\n       {\n         if (methodMask & ((UInt32)1 << i))\n"
  },
  {
    "path": "packages/compress/pigz/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pigz\"\nPKG_VERSION=\"2.7\"\nPKG_SHA256=\"d2045087dae5e9482158f1f1c0f21c7d3de6f7cdc7cc5848bdabda544e69aa58\"\nPKG_LICENSE=\"Other\"\nPKG_SITE=\"https://zlib.net/pigz/\"\nPKG_URL=\"https://github.com/madler/pigz/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"make:host zlib:host\"\nPKG_LONGDESC=\"a parallel implementation of the gzip file compressor\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_host() {\n  make CPPFLAGS=\"${CPPFLAGS} -I${TOOLCHAIN}/include\" \\\n       LDFLAGS=\"${LDFLAGS}\" \\\n       CXX=\"${CXX}\" \\\n       CC=\"${CC}\" \\\n       pigz\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp pigz ${TOOLCHAIN}/bin\n}\n"
  },
  {
    "path": "packages/compress/xz/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xz\"\nPKG_VERSION=\"5.4.1\"\nPKG_SHA256=\"5d9827aa1875b21c288f78864bb26d2650b436ea8d2cad364e4921eb6266a5a5\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://tukaani.org/xz/\"\nPKG_URL=\"https://tukaani.org/xz/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A free general-purpose data compression software with high compression ratio.\"\nPKG_BUILD_FLAGS=\"+pic +pic:host\"\nPKG_TOOLCHAIN=\"configure\"\n\n# never build shared or k0p happens when building\n# on fedora due to host selinux/liblzma\nPKG_CONFIGURE_OPTS_HOST=\"--disable-shared --enable-static \\\n                         --disable-lzmadec \\\n                         --disable-lzmainfo \\\n                         --enable-lzma-links \\\n                         --disable-nls \\\n                         --disable-scripts \\\n                         --enable-symbol-versions=no\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-shared --enable-static \\\n                           --enable-symbol-versions=no\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}\n}\n"
  },
  {
    "path": "packages/compress/xz/patches/xz-01-init-uninitialized-variables.patch",
    "content": "From 5cd389f1fe1fe095cdf555194df875ee3ab445cf Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Sun, 26 Nov 2017 22:21:15 +0000\nSubject: [PATCH] uninitialized variables build error\n\n---\n src/liblzma/lzma/lzma_encoder.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/src/liblzma/lzma/lzma_encoder.c b/src/liblzma/lzma/lzma_encoder.c\nindex ba9ce69..08e8c87 100644\n--- a/src/liblzma/lzma/lzma_encoder.c\n+++ b/src/liblzma/lzma/lzma_encoder.c\n@@ -359,8 +359,8 @@ lzma_lzma_encode(lzma_lzma1_encoder *restrict coder, lzma_mf *restrict mf,\n \t\t//   - UINT32_MAX: not a match but a literal\n \t\t// Value ranges for len:\n \t\t//   - [MATCH_LEN_MIN, MATCH_LEN_MAX]\n-\t\tuint32_t len;\n-\t\tuint32_t back;\n+\t\tuint32_t len = 0;\n+\t\tuint32_t back = 0;\n \n \t\tif (coder->fast_mode)\n \t\t\tlzma_lzma_optimum_fast(coder, mf, &back, &len);\n-- \n2.14.1\n\n"
  },
  {
    "path": "packages/compress/zip/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"zip\"\nPKG_VERSION=\"3.0\"\nPKG_SHA256=\"f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369\"\nPKG_LICENSE=\"Info-ZIP\"\nPKG_SITE=\"http://www.info-zip.org/pub/infozip/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/infozip/Zip%203.x%20%28latest%29/3.0/${PKG_NAME}${PKG_VERSION/./}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain bzip2\"\nPKG_LONGDESC=\"A compression and file packaging utility.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  make CC=${CC} CPP=${CPP} RANLIB=${RANLIB} AR=${AR} STRIP=${STRIP} LOCAL_ZIP=\"${CFLAGS}\" \\\n       -f unix/Makefile generic\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp zip ${INSTALL}/usr/bin\n    ${STRIP} ${INSTALL}/usr/bin/zip\n}\n"
  },
  {
    "path": "packages/compress/zlib/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"zlib\"\nPKG_VERSION=\"1.2.13\"\nPKG_SHA256=\"b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.zlib.net\"\nPKG_URL=\"https://zlib.net/fossils/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host cmake:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A general purpose (ZIP) data compression library.\"\nPKG_TOOLCHAIN=\"cmake-make\"\n\nPKG_CMAKE_OPTS_HOST=\"-DINSTALL_PKGCONFIG_DIR=${TOOLCHAIN}/lib/pkgconfig\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DINSTALL_PKGCONFIG_DIR=/usr/lib/pkgconfig\"\n"
  },
  {
    "path": "packages/compress/zstd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"zstd\"\nPKG_VERSION=\"1.5.2\"\nPKG_SHA256=\"3ea06164971edec7caa2045a1932d757c1815858e4c2b68c7ef812647535c23f\"\nPKG_LICENSE=\"BSD/GPLv2\"\nPKG_SITE=\"http://www.zstd.net\"\nPKG_URL=\"https://github.com/facebook/zstd/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.zst\"\nPKG_DEPENDS_HOST=\"cmake:host make:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A fast real-time compression algorithm.\"\n# Override toolchain as meson and ninja are not built yet\n# and zstd is a dependency of ccache\nPKG_TOOLCHAIN=\"cmake-make\"\nPKG_BUILD_FLAGS=\"+local-cc\"\n\nconfigure_package() {\n  PKG_CMAKE_SCRIPT=\"${PKG_BUILD}/build/cmake/CMakeLists.txt\"\n}\n\nconfigure_host() {\n  # custom cmake build to override the LOCAL_CC/CXX\n  cp ${CMAKE_CONF} cmake-zstd.conf\n\n  echo \"SET(CMAKE_C_COMPILER   $CC)\"  >> cmake-zstd.conf\n  echo \"SET(CMAKE_CXX_COMPILER $CXX)\" >> cmake-zstd.conf\n\n  cmake -DCMAKE_TOOLCHAIN_FILE=cmake-zstd.conf \\\n        -DCMAKE_INSTALL_PREFIX=${TOOLCHAIN} \\\n        -DZSTD_LEGACY_SUPPORT=0 \\\n        -DZSTD_BUILD_PROGRAMS=OFF \\\n        -DZSTD_BUILD_TESTS=OFF \\\n        ${PKG_CMAKE_SCRIPT%/*}\n}\n"
  },
  {
    "path": "packages/databases/mariadb-connector-c/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mariadb-connector-c\"\nPKG_VERSION=\"3.3.4\"\nPKG_SHA256=\"ea6a23850d6a2f6f2e0d9e9fdb7d94fe905a4317f73842272cf121ed25903e1f\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://mariadb.org/\"\nPKG_URL=\"https://github.com/mariadb-corporation/mariadb-connector-c/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib openssl\"\nPKG_LONGDESC=\"mariadb-connector: library to conntect to mariadb/mysql database server\"\nPKG_BUILD_FLAGS=\"-gold\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DWITH_EXTERNAL_ZLIB=ON\n                       -DCLIENT_PLUGIN_DIALOG=STATIC\n                       -DCLIENT_PLUGIN_MYSQL_CLEAR_PASSWORD=STATIC\n                       -DCLIENT_PLUGIN_MYSQL_OLD_PASSWORD=STATIC\n                       -DCLIENT_PLUGIN_REMOTE_IO=OFF\n                      \"\n\npost_makeinstall_target() {\n  # keep modern authentication plugins\n  PLUGINP=${INSTALL}/usr/lib/mariadb/plugin\n  mkdir -p ${INSTALL}/.tmp\n  mv ${PLUGINP}/{caching_sha2_password,client_ed25519,sha256_password}.so ${INSTALL}/.tmp\n\n  # drop all unneeded\n  rm -rf ${INSTALL}/usr\n\n  mkdir -p ${PLUGINP}\n  mv ${INSTALL}/.tmp/* ${PLUGINP}/\n  rmdir ${INSTALL}/.tmp\n}\n"
  },
  {
    "path": "packages/databases/sqlite/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"sqlite\"\nPKG_VERSION=\"3.40.1\"\nPKG_VERSION_SQLITE=\"${PKG_VERSION/./}00\"\nPKG_SHA256=\"2c5dea207fa508d765af1ef620b637dcb06572afa6f01f0815bd5bbf864b33d9\"\nPKG_LICENSE=\"PublicDomain\"\nPKG_SITE=\"https://www.sqlite.org/\"\nPKG_URL=\"https://www.sqlite.org/2022/${PKG_NAME}-autoconf-${PKG_VERSION_SQLITE/./0}.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host autoconf:host automake:host\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses\"\nPKG_LONGDESC=\"An Embeddable SQL Database Engine.\"\n# libsqlite3.a(sqlite3.o): requires dynamic R_X86_64_PC32 reloc against 'sqlite3_stricmp' which may overflow at runtime\nPKG_BUILD_FLAGS=\"+pic +pic:host -parallel\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-static \\\n                           --enable-shared \\\n                           --disable-readline \\\n                           --enable-threadsafe \\\n                           --enable-dynamic-extensions \\\n                           --with-gnu-ld\"\n\npre_configure_target() {\n# sqlite fails to compile with fast-math link time optimization.\n  CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-Ofast|-O3|g\")\n  CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-ffast-math||g\")\n\n# This option adds additional logic to the ANALYZE command and to the query planner\n# that can help SQLite to chose a better query plan under certain situations. The\n# ANALYZE command is enhanced to collect histogram data from each index and store\n# that data in the sqlite_stat4 table. The query planner will then use the histogram\n# data to help it make better index choices.\n  CFLAGS+=\" -DSQLITE_ENABLE_STAT4\"\n\n# When this C-preprocessor macro is defined, SQLite includes some additional APIs\n# that provide convenient access to meta-data about tables and queries. The APIs that\n# are enabled by this option are:\n#  - sqlite3_column_database_name()\n#  - sqlite3_column_database_name16()\n#  - sqlite3_column_table_name()\n#  - sqlite3_column_table_name16()\n#  - sqlite3_column_origin_name()\n#  - sqlite3_column_origin_name16()\n#  - sqlite3_table_column_metadata()\n  CFLAGS+=\" -DSQLITE_ENABLE_COLUMN_METADATA=1\"\n\n# This macro sets the default limit on the amount of memory that will be used for\n# memory-mapped I/O for each open database file. If the N is zero, then memory\n# mapped I/O is disabled by default. This compile-time limit and the\n# SQLITE_MAX_MMAP_SIZE can be modified at start-time using the\n# sqlite3_config(SQLITE_CONFIG_MMAP_SIZE) call, or at run-time using the\n# mmap_size pragma.\n  CFLAGS+=\" -DSQLITE_TEMP_STORE=3 -DSQLITE_DEFAULT_MMAP_SIZE=268435456\"\n}\n"
  },
  {
    "path": "packages/databases/sqlite/patches/sqlite-01_map_populate.patch",
    "content": "diff --git a/sqlite3.c b/sqlite3.c\nindex d0057a6..63b80c7 100644\n--- a/sqlite3.c\n+++ b/sqlite3.c\n@@ -28278,7 +28278,7 @@ static void unixRemapfile(\n     pNew = osMremap(pOrig, nReuse, nNew, MREMAP_MAYMOVE);\n     zErr = \"mremap\";\n #else\n-    pNew = osMmap(pReq, nNew-nReuse, flags, MAP_SHARED, h, nReuse);\n+    pNew = osMmap(pReq, nNew-nReuse, flags, MAP_SHARED | MAP_POPULATE, h, nReuse);\n     if( pNew!=MAP_FAILED ){\n       if( pNew!=pReq ){\n         osMunmap(pNew, nNew - nReuse);\n@@ -28297,7 +28297,7 @@ static void unixRemapfile(\n \n   /* If pNew is still NULL, try to create an entirely new mapping. */\n   if( pNew==0 ){\n-    pNew = osMmap(0, nNew, flags, MAP_SHARED, h, 0);\n+    pNew = osMmap(0, nNew, flags, MAP_SHARED | MAP_POPULATE, h, 0);\n   }\n \n   if( pNew==MAP_FAILED ){\n"
  },
  {
    "path": "packages/debug/edid-decode/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"edid-decode\"\nPKG_VERSION=\"9ba4e90f3c0705351d32f526653e3e765fa2cf64\" # 2022-09-23\nPKG_SHA256=\"8b55a1c09a32c4c39ea0092e1f468f545a535323eb36016e042e0bf156833a1b\"\nPKG_LICENSE=\"None\"\nPKG_SITE=\"https://git.linuxtv.org/edid-decode.git/\"\nPKG_URL=\"https://repo.or.cz/edid-decode.git/snapshot/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Decode EDID data in human-readable format\"\n\nEDID_SOURCES=\"calc-gtf-cvt.cpp calc-ovt.cpp \\\n              edid-decode.cpp parse-base-block.cpp parse-cta-block.cpp \\\n              parse-displayid-block.cpp parse-ls-ext-block.cpp \\\n              parse-di-ext-block.cpp parse-vtb-ext-block.cpp\"\n\nmake_target() {\n  echo \"${CXX} ${CPPFLAGS} -Wall ${LDFLAGS} -g -DSHA=${PKG_VERSION:0:12} -o edid-decode ${EDID_SOURCES} -lm\"\n  ${CXX} ${CPPFLAGS} -Wall ${LDFLAGS} -g -DSHA=${PKG_VERSION:0:12} -o edid-decode ${EDID_SOURCES} -lm\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp edid-decode ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/debug/gdb/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gdb\"\nPKG_VERSION=\"12.1\"\nPKG_SHA256=\"0e1793bf8f2b54d53f46dea84ccfd446f48f81b297b28c4f7fc017b818d69fed\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.gnu.org/software/gdb/\"\nPKG_URL=\"https://ftp.gnu.org/gnu/gdb/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib ncurses expat gmp\"\nPKG_DEPENDS_HOST=\"toolchain:host zlib:host ncurses:host expat:host gmp:host\"\nPKG_LONGDESC=\"GNU Project debugger, allows you to see what is going on inside another program while it executes.\"\nPKG_BUILD_FLAGS=\"+size\"\n\nPKG_CONFIGURE_OPTS_COMMON=\"bash_cv_have_mbstate_t=set \\\n                           --disable-shared \\\n                           --enable-static \\\n                           --with-auto-load-safe-path=/ \\\n                           --with-python=no \\\n                           --with-guile=no \\\n                           --with-mpfr=no \\\n                           --with-intel-pt=no \\\n                           --with-babeltrace=no \\\n                           --with-expat=yes \\\n                           --disable-source-highlight \\\n                           --disable-nls \\\n                           --disable-rpath \\\n                           --disable-sim \\\n                           --without-x \\\n                           --disable-tui \\\n                           --disable-libada \\\n                           --without-lzma \\\n                           --disable-libquadmath \\\n                           --disable-libquadmath-support \\\n                           --enable-libada \\\n                           --enable-libssp \\\n                           --disable-werror\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"${PKG_CONFIGURE_OPTS_COMMON} \\\n                           --with-libexpat-prefix=${SYSROOT_PREFIX}/usr \\\n                           --with-libgmp-prefix=${SYSROOT_PREFIX}/usr\"\n\nPKG_CONFIGURE_OPTS_HOST=\"${PKG_CONFIGURE_OPTS_COMMON} \\\n                         --target=${TARGET_NAME}\"\n\npre_configure_target() {\n  CC_FOR_BUILD=\"${HOST_CC}\"\n  CFLAGS_FOR_BUILD=\"${HOST_CFLAGS}\"\n}\n\nmakeinstall_target() {\n  make DESTDIR=${INSTALL} install\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/share/gdb/python\n}\n"
  },
  {
    "path": "packages/debug/gdb/patches/0001-gdbserver-ctrl-c-handling.patch",
    "content": "From 589e7f396af4c8e4a33dcd1b22be481f150b4fc0 Mon Sep 17 00:00:00 2001\nFrom: Khem Raj <raj.khem@gmail.com>\nDate: Thu, 29 Nov 2018 18:00:23 -0800\nSubject: [PATCH] gdbserver ctrl-c handling\n\nThis problem was created by the upstream commit 78708b7c8c\nAfter applying the commit, it will send SIGINT to the process\ngroup(-signal_pid).\nBut if we use gdbserver send SIGINT, and the attached process is not a\nprocess\ngroup leader, then the \"kill (-signal_pid, SIGINT)\" returns error and\nfails  to\ninterrupt the attached process.\n\nUpstream-Status: Submitted\n[https://sourceware.org/bugzilla/show_bug.cgi?id=18945]\n\nAuthor: Josh Gao\nSigned-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>\nSigned-off-by: Khem Raj <raj.khem@gmail.com>\n---\n gdbserver/linux-low.cc | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc\nindex 8b8614f6ed4..e71e6667c51 100644\n--- a/gdbserver/linux-low.cc\n+++ b/gdbserver/linux-low.cc\n@@ -5465,7 +5465,7 @@ linux_process_target::request_interrupt ()\n {\n   /* Send a SIGINT to the process group.  This acts just like the user\n      typed a ^C on the controlling terminal.  */\n-  ::kill (-signal_pid, SIGINT);\n+  ::kill (signal_pid, SIGINT);\n }\n \n bool\n-- \n2.25.1\n\n"
  },
  {
    "path": "packages/debug/gdb/patches/gdb-001-notex.patch",
    "content": "--- gdb-7.11.1/missing.orig\t2017-01-30 19:01:55.652407184 +0900\n+++ gdb-7.11.1/missing\t2017-01-30 19:02:53.703405905 +0900\n@@ -83,6 +83,9 @@\n # If it succeeded, we are done.\n test $st -eq 0 && exit 0\n \n+# No need for tex monster\n+test $1 = makeinfo && exit 0\n+\n # Also exit now if we it failed (or wasn't found), and '--version' was\n # passed; such an option is passed most likely to detect whether the\n # program is present and works.\n"
  },
  {
    "path": "packages/debug/libunwind/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libunwind\"\nPKG_VERSION=\"1.6.2\"\nPKG_SHA256=\"4a6aec666991fb45d0889c44aede8ad6eb108071c3554fcdff671f9c94794976\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.nongnu.org/libunwind/\"\nPKG_URL=\"http://download.savannah.nongnu.org/releases/libunwind/libunwind-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib\"\nPKG_LONGDESC=\"library to determine the call-chain of a program\"\nPKG_BUILD_FLAGS=\"+pic\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           --disable-minidebuginfo \\\n                           --disable-documentation \\\n                           --disable-tests\"\n\nmakeinstall_target() {\n  make DESTDIR=${SYSROOT_PREFIX} install\n}\n"
  },
  {
    "path": "packages/debug/libunwind/patches/libunwind-0001-fix-multiple-definition.patch",
    "content": "From f40db1e2562934fd21485ba7f62e4521945f17e4 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Mon, 17 Feb 2020 05:52:10 +0000\nSubject: [PATCH] fix multiple definition\n\nhttps://lists.nongnu.org/archive/html/libunwind-devel/2017-08/msg00039.html\nhttps://github.com/libunwind/libunwind/commit/0e74e583ae18d6852835f327921ee130a5fa3e6f\n---\n include/tdep-arm/ex_tables.h | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/include/tdep-arm/ex_tables.h b/include/tdep-arm/ex_tables.h\nindex 9df5e0a..0b5388a 100644\n--- a/include/tdep-arm/ex_tables.h\n+++ b/include/tdep-arm/ex_tables.h\n@@ -47,6 +47,7 @@ struct arm_exbuf_data\n #define arm_exidx_extract       UNW_OBJ(arm_exidx_extract)\n #define arm_exidx_decode        UNW_OBJ(arm_exidx_decode)\n #define arm_exidx_apply_cmd     UNW_OBJ(arm_exidx_apply_cmd)\n+#define arm_search_unwind_table UNW_OBJ(arm_search_unwind_table)\n \n int arm_exidx_extract (struct dwarf_cursor *c, uint8_t *buf);\n int arm_exidx_decode (const uint8_t *buf, uint8_t len, struct dwarf_cursor *c);\n-- \n2.7.4\n\n"
  },
  {
    "path": "packages/debug/libunwind/patches/libunwind-0002-add-dependant-static-libraries.patch",
    "content": "--- a/src/unwind/libunwind.pc.in\t2020-11-10 16:14:18.000000000 +0000\n+++ b/src/unwind/libunwind.pc.in\t2021-12-05 08:16:04.467881118 +0000\n@@ -6,6 +6,6 @@\n Name: libunwind\n Description: libunwind base library\n Version: @VERSION@\n-Libs: -L${libdir} -lunwind\n+Libs: -L${libdir} -lunwind @LIBLZMA@ @LIBZ@\n Libs.private: @LIBLZMA@ @LIBZ@\n Cflags: -I${includedir}\n"
  },
  {
    "path": "packages/debug/libva-utils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libva-utils\"\nPKG_VERSION=\"2.17.1\"\nPKG_SHA256=\"6ea5993c3eba230a979fa9d35b4cad8df06d4474a773dc0918033bf50353f966\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/01org/libva-utils\"\nPKG_URL=\"https://github.com/intel/libva-utils/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"Libva-utils is a collection of tests for VA-API (VIdeo Acceleration API)\"\n\nif [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n  PKG_DEPENDS_TARGET=\"toolchain libva libdrm libX11\"\n  DISPLAYSERVER_LIBVA=\"-Dx11=true\"\nelse\n  PKG_DEPENDS_TARGET=\"toolchain libva libdrm\"\n  DISPLAYSERVER_LIBVA=\"-Dx11=false\"\nfi\n\nPKG_MESON_OPTS_TARGET=\"-Ddrm=true \\\n                       ${DISPLAYSERVER_LIBVA} \\\n                       -Dwayland=false \\\n                       -Dtests=false\"\n"
  },
  {
    "path": "packages/debug/memtester/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"memtester\"\nPKG_VERSION=\"4.5.1\"\nPKG_SHA256=\"1c5fc2382576c084b314cfd334d127a66c20bd63892cac9f445bc1d8b4ca5a47\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://pyropus.ca/software/memtester/\"\nPKG_URL=\"http://pyropus.ca/software/memtester/old-versions/memtester-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A userspace utility for testing the memory subsystem for faults.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  make memtester\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp memtester ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/debug/memtester/patches/memtester-001-cross-compile.patch",
    "content": "Author: Helmut Grohne <helmut@subdivi.de>\nDescription: make the build system honor $CC to facilitate cross builds\n\nIndex: memtester-4.3.0/conf-cc\n===================================================================\n--- memtester-4.3.0.orig/conf-cc\t2012-06-09 23:45:22.000000000 +0200\n+++ memtester-4.3.0/conf-cc\t2015-09-12 20:36:27.000000000 +0200\n@@ -1,3 +1,3 @@\n-cc -O2 -DPOSIX -D_POSIX_C_SOURCE=200809L -D_FILE_OFFSET_BITS=64 -DTEST_NARROW_WRITES -c\n+$CC -O2 -DPOSIX -D_POSIX_C_SOURCE=200809L -D_FILE_OFFSET_BITS=64 -DTEST_NARROW_WRITES -c\n \n This will be used to compile .c files.\nIndex: memtester-4.3.0/conf-ld\n===================================================================\n--- memtester-4.3.0.orig/conf-ld\t2012-06-09 23:45:22.000000000 +0200\n+++ memtester-4.3.0/conf-ld\t2015-09-12 20:36:33.000000000 +0200\n@@ -1,3 +1,3 @@\n-cc -s\n+$CC -s\n \n This will be used to link .o files into an executable.\nIndex: memtester-4.3.0/Makefile\n===================================================================\n--- memtester-4.3.0.orig/Makefile\t2015-09-12 20:01:06.000000000 +0200\n+++ memtester-4.3.0/Makefile\t2015-09-12 20:50:40.000000000 +0200\n@@ -10,8 +10,6 @@\n # You don't need to edit these; change the contents of the conf-cc and conf-ld\n # files if you need to change the compile/link commands.  See the README for\n # more information.\n-CC\t\t\t= $(shell head -n 1 conf-cc)\n-LD\t\t\t= $(shell head -n 1 conf-ld)\n \n SOURCES\t\t= memtester.c tests.c\n OBJECTS\t\t= $(SOURCES:.c=.o)\n"
  },
  {
    "path": "packages/debug/strace/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"strace\"\nPKG_VERSION=\"6.1\"\nPKG_SHA256=\"2579e9cec37dbb786f6ea0bebd15f40dd561ef2bde2a2a2ecdce5963b01859fd\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://strace.io/\"\nPKG_URL=\"https://strace.io/files/${PKG_VERSION}/strace-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"strace is a diagnostic, debugging and instructional userspace utility\"\nPKG_TOOLCHAIN=\"autotools\"\n\nif [ \"${TARGET_ARCH}\" = x86_64 -o \"${TARGET_ARCH}\" = \"aarch64\" ]; then\n  PKG_CONFIGURE_OPTS_TARGET=\"--enable-mpers=no\"\nfi\n"
  },
  {
    "path": "packages/debug/strace/patches/strace-0001-autoreconf.patch",
    "content": "diff --git a/configure.ac b/configure.ac\nindex 4e7bc2a89..3b762c94c 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -11,11 +11,7 @@\n # SPDX-License-Identifier: LGPL-2.1-or-later\n \n AC_PREREQ(2.57)\n-AC_INIT([strace],\n-\tst_esyscmd_s([./build-aux/git-version-gen .tarball-version]),\n-\t[strace-devel@lists.strace.io],\n-\t[strace],\n-\t[https://strace.io])\n+AC_INIT([strace],[5.11])\n m4_define([copyright_year], st_esyscmd_s([./build-aux/copyright-year-gen .year]))\n m4_define([manpage_date], st_esyscmd_s([./build-aux/file-date-gen doc/strace.1.in]))\n AC_COPYRIGHT([Copyright (c) 1999-]copyright_year[ The strace developers.])\n"
  },
  {
    "path": "packages/debug/strace/patches/strace-0002-fix-autoconf-archive.patch",
    "content": "From ba71a5f3778df1bb19ba593f6a5550c01f5349ad Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Tue, 28 Jan 2020 03:17:14 +0000\nSubject: [PATCH] fix API change since autoconf-archive-2019.01.06\n\n---\n Makefile.am | 2 +-\n Makefile.in | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile.am b/Makefile.am\nindex 723460f2e..a6a0f5f9c 100644\n--- a/Makefile.am\n+++ b/Makefile.am\n@@ -408,7 +408,7 @@ strace_LDADD += $(libiberty_LIBS)\n endif\n endif\n \n-@CODE_COVERAGE_RULES@\n+include $(top_srcdir)/aminclude_static.am\n CODE_COVERAGE_BRANCH_COVERAGE = 1\n CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \\\n \t--prefix $(shell cd $(abs_top_srcdir)/.. && pwd || echo .)\ndiff --git a/Makefile.in b/Makefile.in\nindex b0ec9f686..9b4b93d8b 100644\n--- a/Makefile.in\n+++ b/Makefile.in\n@@ -10351,7 +10351,7 @@ $(top_srcdir)/xlat/xfs_dqblk_flags.h: $(top_srcdir)/xlat/xfs_dqblk_flags.in $(to\n $(top_srcdir)/xlat/xfs_quota_flags.h: $(top_srcdir)/xlat/xfs_quota_flags.in $(top_srcdir)/xlat/gen.sh\n \t$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@\n \n-@CODE_COVERAGE_RULES@\n+include $(top_srcdir)/aminclude_static.am\n \n .PHONY: check-valgrind-local\n check-valgrind-local:\n-- \n2.7.4\n\n"
  },
  {
    "path": "packages/debug/vadumpcaps/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vadumpcaps\"\nPKG_VERSION=\"38a446e33de5e65f0e5d263dd9a262a4e316a461\"\nPKG_SHA256=\"04847fcae7ed5529371c3ff27518e6ef4623db65955ad6c7633a538c6b2aeae8\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/fhvwy/vadumpcaps\"\nPKG_URL=\"https://github.com/fhvwy/vadumpcaps/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"This is a utility to show all capabilities of a VAAPI device/driver.\"\nPKG_DEPENDS_TARGET=\"toolchain libva\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp vadumpcaps ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/debug/valgrind/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"valgrind\"\nPKG_VERSION=\"3.20.0\"\nPKG_SHA256=\"8536c031dbe078d342f121fa881a9ecd205cb5a78e639005ad570011bdb9f3c6\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://valgrind.org/\"\nPKG_URL=\"https://sourceware.org/pub/valgrind/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A tool to help find memory-management problems in programs\"\n\nif [ \"${TARGET_ARCH}\" = \"arm\" ]; then\n  PKG_CONFIGURE_OPTS_TARGET=\"--enable-only32bit\"\nelif [ \"${TARGET_ARCH}\" = \"aarch64\" -o \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  PKG_CONFIGURE_OPTS_TARGET=\"--enable-only64bit\"\nfi\n"
  },
  {
    "path": "packages/debug/valgrind/patches/valgrind-0001-enable-armv8.patch",
    "content": "diff -Naur a/configure b/configure\n--- a/configure\t2017-06-15 06:41:35.000000000 -0700\n+++ b/configure\t2018-06-26 14:51:02.264580174 -0700\n@@ -5627,7 +5627,7 @@\n         ARCH_MAX=\"s390x\"\n         ;;\n \n-     armv7*)\n+     armv7*|armv8*)\n \t{ printf \"%s\\n\" \"$as_me:${as_lineno-$LINENO}: result: ok (${host_cpu})\" >&5\n printf \"%s\\n\" \"ok (${host_cpu})\" >&6; }\n \tARCH_MAX=\"arm\"\n"
  },
  {
    "path": "packages/debug/vdpauinfo/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"vdpauinfo\"\nPKG_VERSION=\"1.0\"\nPKG_SHA256=\"4054960b7ae618c351ff1ce3e7831b5cbda964ae1fbf9969b7146404d3044bc4\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://freedesktop.org/wiki/Software/VDPAU\"\nPKG_URL=\"http://people.freedesktop.org/~aplattner/vdpau/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libvdpau\"\nPKG_LONGDESC=\"A tool to show vdpau infos.\"\n"
  },
  {
    "path": "packages/debug/xorg-intel-gpu-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xorg-intel-gpu-tools\"\nPKG_VERSION=\"1.27.1\"\nPKG_SHA256=\"93b9a4816ed22b5145bb61024314c8a65caeea991ce93027643f1d40723bf417\"\nPKG_LICENSE=\"GPL\"\nPKG_DEPENDS_TARGET=\"toolchain cairo procps-ng\"\nPKG_SITE=\"https://gitlab.freedesktop.org/drm/igt-gpu-tools\"\nPKG_URL=\"https://www.x.org/releases/individual/app/igt-gpu-tools-${PKG_VERSION}.tar.xz\"\nPKG_LONGDESC=\"Test suite and tools for DRM/KMS drivers\"\n\nPKG_MESON_OPTS_TARGET=\"-Dchamelium=disabled \\\n                       -Ddocs=disabled \\\n                       -Dlibdrm_drivers=auto \\\n                       -Dlibunwind=disabled \\\n                       -Dman=disabled \\\n                       -Doverlay=disabled \\\n                       -Drunner=disabled \\\n                       -Dtests=enabled \\\n                       -Dvalgrind=disabled\"\n\npre_configure_target() {\n  # xorg-intel-gpu-tools does not build with NDEBUG (requires assert for tests)\n  export TARGET_CFLAGS=$(echo ${TARGET_CFLAGS} | sed -e \"s|-DNDEBUG||g\")\n}\n"
  },
  {
    "path": "packages/devel/arm-mem/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"arm-mem\"\nPKG_VERSION=\"b48ea154fd74410022d8189003cd69fad8f3d02c\" # Apr 30, 2019\nPKG_SHA256=\"93240defef3abba7d42a7420e55ae4f8b90cc99ef16044fdfb8b5820a17e766d\"\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/bavison/arm-mem\"\nPKG_URL=\"https://github.com/bavison/arm-mem/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_DEPENDS_INIT=\"toolchain arm-mem\"\nPKG_LONGDESC=\"arm-mem is a ARM-accelerated versions of selected functions from string.h\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nif target_has_feature neon; then\n  PKG_LIB_ARM_MEM=\"libarmmem-v7l.so\"\nelse\n  PKG_LIB_ARM_MEM=\"libarmmem-v6l.so\"\nfi\n\nPKG_MAKE_OPTS_TARGET=\"${PKG_LIB_ARM_MEM}\"\n\npre_make_target() {\n  export CROSS_COMPILE=${TARGET_PREFIX}\n}\n\nmake_init() {\n  : # reuse make_target()\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib\n    cp -P ${PKG_LIB_ARM_MEM} ${INSTALL}/usr/lib\n\n  mkdir -p ${INSTALL}/etc\n    echo \"/usr/lib/${PKG_LIB_ARM_MEM}\" >> ${INSTALL}/etc/ld.so.preload\n}\n\nmakeinstall_init() {\n  mkdir -p ${INSTALL}/usr/lib\n    cp -P ${PKG_LIB_ARM_MEM} ${INSTALL}/usr/lib\n\n  mkdir -p ${INSTALL}/etc\n    echo \"/usr/lib/${PKG_LIB_ARM_MEM}\" >> ${INSTALL}/etc/ld.so.preload\n}\n"
  },
  {
    "path": "packages/devel/asn1c/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"asn1c\"\nPKG_VERSION=\"0.9.28\"\nPKG_SHA256=\"8007440b647ef2dd9fb73d931c33ac11764e6afb2437dbe638bb4e5fc82386b9\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://lionet.info/asn1c/blog/\"\nPKG_URL=\"https://github.com/vlm/asn1c/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"The ASN.1 Compiler\"\n"
  },
  {
    "path": "packages/devel/attr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2010-2011 Roman Weber (roman@openelec.tv)\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"attr\"\nPKG_VERSION=\"2.5.1\"\nPKG_SHA256=\"bae1c6949b258a0d68001367ce0c741cebdacdd3b62965d17e5eb23cd78adaf8\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://savannah.nongnu.org/projects/attr\"\nPKG_URL=\"http://download.savannah.nongnu.org/releases/attr/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Extended Attributes Of Filesystem Objects.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"OPTIMIZER= \\\n                           CONFIG_SHELL=/bin/bash \\\n                           INSTALL_USER=root INSTALL_GROUP=root \\\n                           --disable-shared --enable-static\"\n\nif build_with_debug; then\n  PKG_CONFIGURE_OPTS_TARGET+=\" DEBUG=-DDEBUG\"\nelse\n  PKG_CONFIGURE_OPTS_TARGET+=\" DEBUG=-DNDEBUG\"\nfi\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/\n    cp .libs/libattr.a ${SYSROOT_PREFIX}/usr/lib/\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/attr\n    cp include/*.h ${SYSROOT_PREFIX}/usr/include/attr\n}\n"
  },
  {
    "path": "packages/devel/autoconf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"autoconf\"\nPKG_VERSION=\"2.71\"\nPKG_SHA256=\"f14c83cfebcc9427f2c3cea7258bd90df972d92eb26752da4ddad81c87a0faa4\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://sources.redhat.com/autoconf/\"\nPKG_URL=\"http://ftpmirror.gnu.org/autoconf/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host m4:host gettext:host\"\nPKG_LONGDESC=\"A GNU tool for automatically configuring source code.\"\n\nPKG_CONFIGURE_OPTS_HOST=\"EMACS=no \\\n                         ac_cv_path_M4=${TOOLCHAIN}/bin/m4 \\\n                         ac_cv_prog_gnu_m4_gnu=no \\\n                         --target=${TARGET_NAME}\"\n\npost_makeinstall_host() {\n  make prefix=${SYSROOT_PREFIX}/usr install\n}\n"
  },
  {
    "path": "packages/devel/autoconf/patches/autoconf-autoreconf-exclude.patch",
    "content": "Upstream-Status: Pending\n\nIndex: autoconf-2.63/bin/autoreconf.in\n===================================================================\n--- autoconf-2.63.orig/bin/autoreconf.in\t2008-12-31 17:39:01.000000000 +0000\n+++ autoconf-2.63/bin/autoreconf.in\t2008-12-31 17:43:38.000000000 +0000\n@@ -76,6 +76,7 @@\n   -i, --install            copy missing auxiliary files\n       --no-recursive       don't rebuild sub-packages\n   -s, --symlink            with -i, install symbolic links instead of copies\n+  -x, --exclude=STEPS      steps we should not run\n   -m, --make               when applicable, re-run ./configure && make\n   -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [syntax]\n \n@@ -136,6 +137,13 @@\n # Recurse into subpackages\n my $recursive = 1;\n \n+# Steps to exclude\n+my @exclude;\n+my @ex;\n+\n+my $uses_gettext;\n+my $configure_ac;\n+\n ## ---------- ##\n ## Routines.  ##\n ## ---------- ##\n@@ -153,6 +161,7 @@\n \t  'B|prepend-include=s'\t => \\@prepend_include,\n \t  'i|install'            => \\$install,\n \t  's|symlink'            => \\$symlink,\n+  \t  'x|exclude=s'          => \\@exclude,\n \t  'm|make'               => \\$run_make,\n \t  'recursive!'           => \\$recursive);\n \n@@ -162,6 +171,8 @@\n   parse_WARNINGS;\n   parse_warnings '--warnings', @warning;\n \n+  @exclude = map { split /,/ } @exclude;\n+\n   # Even if the user specified a configure.ac, trim to get the\n   # directory, and look for configure.ac again.  Because (i) the code\n   # is simpler, and (ii) we are still able to diagnose simultaneous\n@@ -368,7 +384,10 @@\n     }\n   else\n     {\n-      xsystem_hint (\"autopoint is needed because this package uses Gettext\",\n-                    $autopoint);\n+      @ex = grep (/^autopoint$/, @exclude);\n+      if ($#ex == -1) {\n+        xsystem_hint (\"autopoint is needed because this package uses Gettext\",\n+                      $autopoint);\n+      }\n     }\n \n@@ -532,16 +551,19 @@\n \t{\n \t  $libtoolize .= \" --ltdl\";\n \t}\n-      xsystem_hint (\"libtoolize is needed because this package uses Libtool\",\n-\t\t    $libtoolize);\n-      $rerun_aclocal = 1;\n+      @ex = grep (/^libtoolize$/, @exclude);\n+      if ($#ex == -1) {\n+        xsystem_hint (\"libtoolize is needed because this package uses Libtool\",\n+                      $libtoolize);\n+        $rerun_aclocal = 1;\n+      }\n     }\n   else\n     {\n       verb \"$configure_ac: not running libtoolize: --install not given\";\n     }\n \n \n   # --------------------- #\n   # Running intltoolize.  #\n   # --------------------- #\n@@ -748,8 +748,11 @@\n     }\n   elsif ($install)\n     {\n-      xsystem_hint (\"gtkdocize is needed because this package uses Gtkdoc\",\n-\t\t    $gtkdocize);\n+      @ex = grep (/^autopoint$/, @exclude);\n+      if ($#ex == -1) {\n+        xsystem_hint (\"gtkdocize is needed because this package uses Gtkdoc\",\n+\t\t      $gtkdocize);\n+      }\n     }\n   else\n     {\n@@ -572,7 +592,10 @@\n   # latter runs the former, and (ii) autoconf is stricter than\n   # autoheader.  So all in all, autoconf should give better error\n   # messages.\n-  xsystem ($autoconf);\n+  @ex = grep (/^autoconf$/, @exclude);\n+  if ($#ex == -1) {\n+    xsystem (\"$autoconf\");\n+  }\n \n \n   # -------------------- #\n@@ -593,7 +616,10 @@\n     }\n   else\n     {\n-      xsystem ($autoheader);\n+      @ex = grep (/^autoheader$/, @exclude);\n+      if ($#ex == -1) {\n+        xsystem (\"$autoheader\");\n+      }\n     }\n \n \n@@ -610,7 +636,10 @@\n       # We should always run automake, and let it decide whether it shall\n       # update the file or not.  In fact, the effect of '$force' is already\n       # included in '$automake' via '--no-force'.\n-      xsystem ($automake);\n+      @ex = grep (/^automake$/, @exclude);\n+      if ($#ex == -1) {\n+        xsystem (\"$automake\");\n+      }\n     }\n \n   # ---------------------------------------------------- #\n@@ -634,7 +663,10 @@\n \t    }\n \t  else\n \t    {\n-\t      xsystem (\"$make\");\n+              @ex = grep (/^make$/, @exclude);\n+              if ($#ex == -1) {\n+\t        xsystem (\"$make\");\n+              }\n \t    }\n \t}\n     }\n"
  },
  {
    "path": "packages/devel/autoconf/patches/man-exclude.patch",
    "content": "--- a/Makefile.in\t2021-02-28 12:25:11.000000000 +0000\n+++ b/Makefile.in\t2021-02-28 12:25:11.000000000 +0000\n@@ -780,7 +780,6 @@\n   man/autoconf.1 \\\n   man/autoheader.1 \\\n   man/autom4te.1 \\\n-  man/autoreconf.1 \\\n   man/autoscan.1 \\\n   man/autoupdate.1 \\\n   man/ifnames.1\n"
  },
  {
    "path": "packages/devel/autoconf-archive/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"autoconf-archive\"\nPKG_VERSION=\"2022.09.03\"\nPKG_SHA256=\"e07454f00d8cae7907bed42d0747798927809947684d94c37207a4d63a32f423\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.gnu.org/software/autoconf-archive/\"\nPKG_URL=\"http://ftpmirror.gnu.org/autoconf-archive/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"autoconf-archive is an package of m4 macros\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--target=${TARGET_NAME} --prefix=${TOOLCHAIN}\"\n\nmakeinstall_host() {\n# make install\n  make prefix=${SYSROOT_PREFIX}/usr install\n\n# remove problematic m4 file\n  rm -rf ${SYSROOT_PREFIX}/usr/share/aclocal/ax_prog_cc_for_build.m4\n}\n"
  },
  {
    "path": "packages/devel/automake/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"automake\"\nPKG_VERSION=\"1.16.5\"\nPKG_SHA256=\"f01d58cd6d9d77fbdca9eb4bbd5ead1988228fdb73d6f7a201f5f8d6b118b469\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://sources.redhat.com/automake/\"\nPKG_URL=\"http://ftpmirror.gnu.org/automake/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host autoconf:host\"\nPKG_LONGDESC=\"A GNU tool for automatically creating Makefiles.\"\nPKG_BUILD_FLAGS=\"-parallel\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--target=${TARGET_NAME} --disable-silent-rules\"\n\npost_makeinstall_host() {\n  make prefix=${SYSROOT_PREFIX}/usr install\n}\n"
  },
  {
    "path": "packages/devel/automake/patches/automake-01-fix-help2man.patch",
    "content": "From fc19cd1da6161ec5602e692488dfc8e670797afe Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Fri, 15 Aug 2014 22:10:03 +0300\nSubject: [PATCH] meh help2man\n\n---\n Makefile.in |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile.in b/Makefile.in\nindex 5a336df..2d2029b 100644\n--- a/Makefile.in\n+++ b/Makefile.in\n@@ -701,7 +701,7 @@ update_mans = \\\n update_mans = \\\n   $(AM_V_GEN): \\\n     && $(MKDIR_P) doc \\\n-    && ./pre-inst-env $(PERL) $(srcdir)/doc/help2man --output=$@\n+    && ./pre-inst-env $(PERL) $(srcdir)/doc/help2man --output=$@ --no-discard-stderr\n \n checklinkx = $(top_srcdir)/contrib/checklinkx\n # that 4-second sleep seems to be what gnu.org likes.\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/devel/binutils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"binutils\"\nPKG_VERSION=\"2.39\"\nPKG_SHA256=\"645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.gnu.org/software/binutils/\"\nPKG_URL=\"https://ftp.gnu.org/gnu/binutils/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host bison:host flex:host linux:host\"\nPKG_DEPENDS_TARGET=\"toolchain zlib binutils:host\"\nPKG_LONGDESC=\"A GNU collection of binary utilities.\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--target=${TARGET_NAME} \\\n                         --with-sysroot=${SYSROOT_PREFIX} \\\n                         --with-lib-path=${SYSROOT_PREFIX}/lib:${SYSROOT_PREFIX}/usr/lib \\\n                         --without-ppl \\\n                         --enable-static \\\n                         --without-cloog \\\n                         --disable-werror \\\n                         --disable-multilib \\\n                         --disable-libada \\\n                         --disable-libssp \\\n                         --enable-version-specific-runtime-libs \\\n                         --enable-plugins \\\n                         --enable-gold \\\n                         --enable-ld=default \\\n                         --enable-lto \\\n                         --disable-nls\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--target=${TARGET_NAME} \\\n                         --with-sysroot=${SYSROOT_PREFIX} \\\n                         --with-lib-path=${SYSROOT_PREFIX}/lib:${SYSROOT_PREFIX}/usr/lib \\\n                         --with-system-zlib \\\n                         --without-ppl \\\n                         --without-cloog \\\n                         --enable-static \\\n                         --disable-shared \\\n                         --disable-werror \\\n                         --disable-multilib \\\n                         --disable-libada \\\n                         --disable-libssp \\\n                         --disable-plugins \\\n                         --disable-gold \\\n                         --disable-ld \\\n                         --disable-lto \\\n                         --disable-nls\"\n\npre_configure_host() {\n  unset CPPFLAGS\n  unset CFLAGS\n  unset CXXFLAGS\n  unset LDFLAGS\n}\n\nmake_host() {\n  make configure-host\n  # override the makeinfo binary with true - this does not build the documentation\n  make MAKEINFO=true\n}\n\nmakeinstall_host() {\n  cp -v ../include/libiberty.h ${SYSROOT_PREFIX}/usr/include\n  make -C bfd install # fix parallel build with libctf requiring bfd\n  # override the makeinfo binary with true - this does not build the documentation\n  make HELP2MAN=true MAKEINFO=true install\n}\n\nmake_target() {\n  make configure-host\n  make -C libiberty\n  make -C bfd\n  make -C opcodes\n  make -C binutils strings\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n    cp libiberty/libiberty.a ${SYSROOT_PREFIX}/usr/lib\n  make DESTDIR=\"${SYSROOT_PREFIX}\" -C bfd install\n  make DESTDIR=\"${SYSROOT_PREFIX}\" -C opcodes install\n\n  mkdir -p ${INSTALL}/usr/bin\n    cp binutils/strings ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/devel/binutils/patches/binutils-01-warn-for-uses-of-system-directories-when-link.patch",
    "content": "simplified patch based on\nhttp://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch\njust detect and skip system directories if used by mistake\n\nlinker output in case of using /usr/lib path:\n/data/LibreELEC.tv/build.LibreELEC-Generic.x86_64-8.0-devel/toolchain/lib/gcc/x86_64-libreelec-linux-gnu/6.2.0/../../../../x86_64-libreelec-linux-gnu/bin/ld: warning: library search path \"/usr/lib\" is unsafe for cross-compilation, ignore it\n\nFrom 7ab8e318659eb5d9adc758c78d084a95560b93fd Mon Sep 17 00:00:00 2001\nFrom: Khem Raj <raj.khem@gmail.com>\nDate: Fri, 15 Jan 2016 06:31:09 +0000\nSubject: [PATCH 09/13] warn for uses of system directories when cross linking\n\n--- a/ld/ldfile.c\n+++ b/ld/ldfile.c\n@@ -103,6 +103,17 @@ ldfile_add_library_path (const char *nam\n   if (!cmdline && config.only_cmd_line_lib_dirs)\n     return;\n \n+  /* skip those directories when linking */\n+  if ((!strncmp (name, \"/lib\", 4)) ||\n+      (!strncmp (name, \"/usr/lib\", 8)) ||\n+      (!strncmp (name, \"/usr/local/lib\", 14)) ||\n+      (!strncmp (name, \"/usr/X11R6/lib\", 14)))\n+  {\n+    einfo (_(\"%P: warning: library search path \\\"%s\\\" is unsafe for \"\n+             \"cross-compilation, ignore it\\n\"), name);\n+    return;\n+  }\n+\n   new_dirs = (search_dirs_type *) xmalloc (sizeof (search_dirs_type));\n   new_dirs->next = NULL;\n   new_dirs->cmdline = cmdline;\n"
  },
  {
    "path": "packages/devel/binutils/patches/binutils-02-binutils-2-39-dont-error-on-missing-makeinfo.patch",
    "content": "--- a/bfd/Makefile.in\t2022-08-05 09:53:59.000000000 +0000\n+++ b/bfd/Makefile.in\t2022-08-07 11:22:25.397501975 +0000\n@@ -264,7 +264,7 @@\n am__v_texidevnull_0 = > /dev/null\n am__v_texidevnull_1 = \n am__dirstamp = $(am__leading_dot)dirstamp\n-INFO_DEPS = doc/bfd.info\n+INFO_DEPS = \n am__TEXINFO_TEX_DIR = $(srcdir)\n DVIS = doc/bfd.dvi\n PDFS = doc/bfd.pdf\n"
  },
  {
    "path": "packages/devel/binutils-aarch64/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"binutils-aarch64\"\nPKG_VERSION=\"$(get_pkg_version binutils)\"\nPKG_LICENSE=\"GPL\"\nPKG_URL=\"\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_LONGDESC=\"A GNU collection of binary utilities for 64-bit ARM.\"\nPKG_DEPENDS_UNPACK+=\" binutils\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory binutils)/patches\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--target=aarch64-none-elf \\\n                         --with-sysroot=${SYSROOT_PREFIX} \\\n                         --with-lib-path=${SYSROOT_PREFIX}/lib:${SYSROOT_PREFIX}/usr/lib \\\n                         --without-ppl \\\n                         --enable-static \\\n                         --without-cloog \\\n                         --disable-werror \\\n                         --disable-multilib \\\n                         --disable-libada \\\n                         --disable-libssp \\\n                         --enable-version-specific-runtime-libs \\\n                         --enable-plugins \\\n                         --enable-gold \\\n                         --enable-ld=default \\\n                         --enable-lto \\\n                         --disable-nls\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/binutils/binutils-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npre_configure_host() {\n  unset CPPFLAGS\n  unset CFLAGS\n  unset CXXFLAGS\n  unset LDFLAGS\n}\n\nmake_host() {\n  make configure-host\n  # override the makeinfo binary with true - this does not build the documentation\n  make MAKEINFO=true\n}\n\nmakeinstall_host() {\n  cp -v ../include/libiberty.h ${SYSROOT_PREFIX}/usr/include\n  make -C bfd install # fix parallel build with libctf requiring bfd\n  # override the makeinfo binary with true - this does not build the documentation\n  make MAKEINFO=true install\n}\n"
  },
  {
    "path": "packages/devel/binutils-arm-none-eabi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"binutils-arm-none-eabi\"\nPKG_VERSION=\"$(get_pkg_version binutils)\"\nPKG_LICENSE=\"GPL\"\nPKG_URL=\"\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_LONGDESC=\"A GNU collection of binary utilities for ARM Cortex-R/M processors.\"\nPKG_DEPENDS_UNPACK+=\" binutils\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory binutils)/patches\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--target=arm-none-eabi \\\n                         --with-sysroot=${SYSROOT_PREFIX} \\\n                         --with-lib-path=${SYSROOT_PREFIX}/lib:${SYSROOT_PREFIX}/usr/lib \\\n                         --without-ppl \\\n                         --enable-static \\\n                         --without-cloog \\\n                         --disable-werror \\\n                         --disable-multilib \\\n                         --disable-libada \\\n                         --disable-libssp \\\n                         --enable-version-specific-runtime-libs \\\n                         --enable-plugins \\\n                         --enable-gold \\\n                         --enable-ld=default \\\n                         --enable-lto \\\n                         --disable-nls\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/binutils/binutils-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npre_configure_host() {\n  unset CPPFLAGS\n  unset CFLAGS\n  unset CXXFLAGS\n  unset LDFLAGS\n}\n\nmake_host() {\n  make configure-host\n  # override the makeinfo binary with true - this does not build the documentation\n  make MAKEINFO=true\n}\n\nmakeinstall_host() {\n  cp -v ../include/libiberty.h ${SYSROOT_PREFIX}/usr/include\n  make -C bfd install # fix parallel build with libctf requiring bfd\n  # override the makeinfo binary with true - this does not build the documentation\n  make MAKEINFO=true install\n}\n"
  },
  {
    "path": "packages/devel/binutils-bpf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"binutils-bpf\"\nPKG_VERSION=\"$(get_pkg_version binutils)\"\nPKG_LICENSE=\"GPL\"\nPKG_URL=\"\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_LONGDESC=\"A GNU collection of binary utilities for 64-bit ARM.\"\nPKG_DEPENDS_UNPACK+=\" binutils\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory binutils)/patches\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--target=bpf \\\n                         --with-sysroot=${SYSROOT_PREFIX} \\\n                         --with-lib-path=${SYSROOT_PREFIX}/lib:${SYSROOT_PREFIX}/usr/lib \\\n                         --without-ppl \\\n                         --enable-static \\\n                         --without-cloog \\\n                         --disable-werror \\\n                         --disable-multilib \\\n                         --disable-libada \\\n                         --disable-libssp \\\n                         --enable-version-specific-runtime-libs \\\n                         --enable-plugins \\\n                         --enable-gold \\\n                         --enable-ld=default \\\n                         --enable-lto \\\n                         --disable-nls\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/binutils/binutils-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npre_configure_host() {\n  unset CPPFLAGS\n  unset CFLAGS\n  unset CXXFLAGS\n  unset LDFLAGS\n}\n\nmake_host() {\n  make configure-host\n  # override the makeinfo binary with true - this does not build the documentation\n  make MAKEINFO=true\n}\n\nmakeinstall_host() {\n  cp -v ../include/libiberty.h ${SYSROOT_PREFIX}/usr/include\n  make -C bfd install # fix parallel build with libctf requiring bfd\n  # override the makeinfo binary with true - this does not build the documentation\n  make MAKEINFO=true install\n}\n"
  },
  {
    "path": "packages/devel/binutils-or1k/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"binutils-or1k\"\nPKG_VERSION=\"$(get_pkg_version binutils)\"\nPKG_LICENSE=\"GPL\"\nPKG_URL=\"\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_LONGDESC=\"A GNU collection of binary utilities for OpenRISC 1000.\"\nPKG_DEPENDS_UNPACK+=\" binutils\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory binutils)/patches\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--target=or1k-none-elf \\\n                         --with-sysroot=${SYSROOT_PREFIX} \\\n                         --with-lib-path=${SYSROOT_PREFIX}/lib:${SYSROOT_PREFIX}/usr/lib \\\n                         --without-ppl \\\n                         --enable-static \\\n                         --without-cloog \\\n                         --disable-werror \\\n                         --disable-multilib \\\n                         --disable-libada \\\n                         --disable-libssp \\\n                         --enable-version-specific-runtime-libs \\\n                         --enable-plugins \\\n                         --enable-gold \\\n                         --enable-ld=default \\\n                         --enable-lto \\\n                         --disable-nls\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/binutils/binutils-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npre_configure_host() {\n  unset CPPFLAGS\n  unset CFLAGS\n  unset CXXFLAGS\n  unset LDFLAGS\n}\n\nmake_host() {\n  make configure-host\n  # override the makeinfo binary with true - this does not build the documentation\n  make MAKEINFO=true\n}\n\nmakeinstall_host() {\n  cp -v ../include/libiberty.h ${SYSROOT_PREFIX}/usr/include\n  make -C bfd install # fix parallel build with libctf requiring bfd\n  # override the makeinfo binary with true - this does not build the documentation\n  make MAKEINFO=true install\n}\n"
  },
  {
    "path": "packages/devel/bison/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"bison\"\nPKG_VERSION=\"3.8.2\"\nPKG_SHA256=\"9bba0214ccf7f1079c5d59210045227bcf619519840ebfa80cd3849cff5a5bf2\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.gnu.org/software/bison/\"\nPKG_URL=\"http://ftpmirror.gnu.org/bison/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host m4:host\"\nPKG_LONGDESC=\"A general-purpose parser generator.\"\nPKG_BUILD_FLAGS=\"-parallel\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--disable-rpath --with-gnu-ld\"\n\npost_configure_host() {\n# The configure system causes Bison to be built without support for\n# internationalization of error messages if a bison program is not already in\n# ${PATH}. The following addition will correct this:\n  echo '#define YYENABLE_NLS 1' >> lib/config.h\n}\n"
  },
  {
    "path": "packages/devel/boost/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"boost\"\nPKG_VERSION=\"1.83.0\"\n#PKG_SHA256=\"af57be25cb4c4f4b413ed692fe378affb4352ea50fbe294a11ef548f4d527d89\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.boost.org/\"\nPKG_URL=\"https://archives.boost.io/release/${PKG_VERSION}/source/${PKG_NAME}_${PKG_VERSION//./_}.tar.bz2\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain boost:host Python3 zlib bzip2\"\nPKG_LONGDESC=\"boost: Peer-reviewed STL style libraries for C++\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nmake_host() {\n  cd tools/build/src/engine\n    sh build.sh\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp b2 ${TOOLCHAIN}/bin\n}\n\npre_configure_target() {\n  export CFLAGS=\"${CFLAGS} -I${SYSROOT_PREFIX}/usr/include/${PKG_PYTHON_VERSION}\"\n  export CXXFLAGS=\"${CXXFLAGS} -I${SYSROOT_PREFIX}/usr/include/${PKG_PYTHON_VERSION}\"\n}\n\nconfigure_target() {\n  sh bootstrap.sh --prefix=/usr \\\n                  --with-bjam=${TOOLCHAIN}/bin/b2 \\\n                  --with-python=${TOOLCHAIN}/bin/python \\\n                  --with-python-root=${SYSROOT_PREFIX}/usr\n\n  echo \"using gcc : $(${CC} -v 2>&1  | tail -n 1 |awk '{print $3}') : ${CC}  : <compileflags>\\\"${CFLAGS}\\\" <linkflags>\\\"${LDFLAGS}\\\" ;\" \\\n    > tools/build/src/user-config.jam\n  echo \"using python : ${PKG_PYTHON_VERSION/#python} : ${TOOLCHAIN} : ${SYSROOT_PREFIX}/usr/include : ${SYSROOT_PREFIX}/usr/lib ;\" \\\n    >> tools/build/src/user-config.jam\n}\n\nmakeinstall_target() {\n  ${TOOLCHAIN}/bin/b2 -d2 --ignore-site-config \\\n                      --layout=system \\\n                      --prefix=${SYSROOT_PREFIX}/usr \\\n                      --toolset=gcc link=static \\\n                      --with-chrono \\\n                      --with-date_time \\\n                      --with-filesystem \\\n                      --with-iostreams \\\n                      --with-program_options \\\n                      --with-python \\\n                      --with-locale \\\n                      --with-random \\\n                      --with-regex -sICU_PATH=\"${SYSROOT_PREFIX}/usr\" \\\n                      --with-serialization \\\n                      --with-system \\\n                      --with-thread \\\n                      install\n}\n"
  },
  {
    "path": "packages/devel/ccache/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ccache\"\nPKG_VERSION=\"4.7.4\"\nPKG_SHA256=\"df0c64d15d3efaf0b4f6837dd6b1467e40eeaaa807db25ce79c3a08a46a84e36\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://ccache.dev/download.html\"\nPKG_URL=\"https://github.com/ccache/ccache/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"cmake:host make:host zstd:host\"\nPKG_LONGDESC=\"A compiler cache to speed up re-compilation of C/C++ code by caching.\"\n# Override toolchain as ninja is not built yet\nPKG_TOOLCHAIN=\"cmake-make\"\nPKG_BUILD_FLAGS=\"+local-cc\"\n\nconfigure_host() {\n  # custom cmake build to override the LOCAL_CC/CXX\n  cp ${CMAKE_CONF} cmake-ccache.conf\n\n  echo \"SET(CMAKE_C_COMPILER   $CC)\"  >> cmake-ccache.conf\n  echo \"SET(CMAKE_CXX_COMPILER $CXX)\" >> cmake-ccache.conf\n\n  cmake -DCMAKE_TOOLCHAIN_FILE=cmake-ccache.conf \\\n        -DCMAKE_INSTALL_PREFIX=${TOOLCHAIN} \\\n        -DENABLE_DOCUMENTATION=OFF \\\n        -DREDIS_STORAGE_BACKEND=OFF \\\n        -DZSTD_FROM_INTERNET=OFF \\\n        -DENABLE_TESTING=OFF \\\n        ..\n}\n\npost_makeinstall_host() {\n# setup ccache\n  if [ -z \"${CCACHE_DISABLE}\" ]; then\n    CCACHE_DIR=\"${BUILD_CCACHE_DIR}\" ${TOOLCHAIN}/bin/ccache --max-size=${CCACHE_CACHE_SIZE}\n    CCACHE_DIR=\"${BUILD_CCACHE_DIR}\" ${TOOLCHAIN}/bin/ccache --set-config compression_level=${CCACHE_COMPRESSLEVEL}\n  fi\n\n  cat > ${TOOLCHAIN}/bin/host-gcc <<EOF\n#!/bin/sh\n${TOOLCHAIN}/bin/ccache ${LOCAL_CC} \"\\$@\"\nEOF\n\n  chmod +x ${TOOLCHAIN}/bin/host-gcc\n\n  cat > ${TOOLCHAIN}/bin/host-g++ <<EOF\n#!/bin/sh\n${TOOLCHAIN}/bin/ccache ${LOCAL_CXX} \"\\$@\"\nEOF\n\n  chmod +x ${TOOLCHAIN}/bin/host-g++\n}\n"
  },
  {
    "path": "packages/devel/cmake/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"cmake\"\nPKG_VERSION=\"3.28.1\"\nPKG_SHA256=\"15e94f83e647f7d620a140a7a5da76349fc47a1bfed66d0f5cdee8e7344079ad\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://cmake.org/\"\nPKG_URL=\"https://cmake.org/files/v$(get_pkg_version_maj_min)/cmake-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"openssl:host pkg-config:host\"\nPKG_LONGDESC=\"A cross-platform, open-source make system.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"+local-cc\"\n\nconfigure_host() {\n  ../configure --prefix=${TOOLCHAIN} \\\n               --no-qt-gui --no-system-libs \\\n               -- \\\n               -DCMAKE_C_FLAGS=\"-O2 -Wall -pipe -Wno-format-security\" \\\n               -DCMAKE_CXX_FLAGS=\"-O2 -Wall -pipe -Wno-format-security\" \\\n               -DCMAKE_EXE_LINKER_FLAGS=\"${HOST_LDFLAGS}\" \\\n               -DCMAKE_USE_OPENSSL=ON \\\n               -DBUILD_CursesDialog=0\n}\n"
  },
  {
    "path": "packages/devel/cmake/patches/cmake-001-disable-free-comp-methods.patch",
    "content": "--- a/Utilities/cmcurl/lib/vtls/openssl.c.orig\t2016-10-19 19:17:49.615923691 +0200\n+++ b/Utilities/cmcurl/lib/vtls/openssl.c\t2016-10-19 19:22:50.849565684 +0200\n@@ -134,6 +134,11 @@\n #define HAVE_SSL_COMP_FREE_COMPRESSION_METHODS 1\n #endif\n \n+#if !defined(OPENSSL_NO_COMP) || \\\n+  OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0+ has no free compression methods */ \n+#undef HAVE_SSL_COMP_FREE_COMPRESSION_METHODS /* undef */\n+#endif\n+\n #if (OPENSSL_VERSION_NUMBER < 0x0090808fL)\n /* not present in older OpenSSL */\n #define OPENSSL_load_builtin_modules(x)\n"
  },
  {
    "path": "packages/devel/configtools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"configtools\"\nPKG_VERSION=\"28ea239c53a2d5d8800c472bc2452eaa16e37af2\"\n#PKG_SHA256=\"d89be2c5a06d45e4a8731404cd6eb52ddde393480a56754a68b44f36753e38d7\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://git.savannah.gnu.org/cgit/config.git\"\nPKG_URL=\"http://git.savannah.gnu.org/cgit/config.git/snapshot/config-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"\"\nPKG_LONGDESC=\"configtools\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/configtools\n  cp config.* ${TOOLCHAIN}/configtools\n}\n"
  },
  {
    "path": "packages/devel/crossguid/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"crossguid\"\nPKG_VERSION=\"ca1bf4b810e2d188d04cb6286f957008ee1b7681\" # 2019-05-30\nPKG_SHA256=\"6be27e0b3a4907f0cd3cfadec255ee1b925569e1bd06e67a4d2f4267299b69c4\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/graeme-hill/crossguid\"\nPKG_URL=\"https://github.com/graeme-hill/crossguid/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain util-linux\"\nPKG_LONGDESC=\"minimal, cross platform, C++ GUID library\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DCROSSGUID_TESTS=OFF \\\n                       -Wno-dev\"\n"
  },
  {
    "path": "packages/devel/dbus-glib/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"dbus-glib\"\nPKG_VERSION=\"0.112\"\nPKG_SHA256=\"7d550dccdfcd286e33895501829ed971eeb65c614e73aadb4a08aeef719b143a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://freedesktop.org/wiki/Software/dbus\"\nPKG_URL=\"https://dbus.freedesktop.org/releases/dbus-glib/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain dbus glib expat\"\nPKG_LONGDESC=\"A message bus, used for sending messages between applications.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic +lto\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_have_abstract_sockets=yes \\\n                           ac_cv_func_posix_getpwnam_r=yes \\\n                           have_abstract_sockets=yes \\\n                           --enable-static \\\n                           --disable-shared \\\n                           --disable-tests \\\n                           --disable-bash-completion \\\n                           --enable-asserts=no\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin/dbus-binding-tool\n}\n"
  },
  {
    "path": "packages/devel/dbus-glib/patches/dbus-glib-01-dont-build-tools-examples.patch",
    "content": "From a45f914870e923741f3123799bd9e126b5da4aa0 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Wed, 20 Aug 2014 22:43:28 +0300\nSubject: [PATCH] dont build tools / examples\n\n---\n Makefile.am      |    4 ++--\n dbus/Makefile.am |    2 +-\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Makefile.am b/Makefile.am\nindex dd76c7e..78cb56f 100644\n--- a/Makefile.am\n+++ b/Makefile.am\n@@ -1,8 +1,8 @@\n ACLOCAL_AMFLAGS = -I m4\n GLIB_PC=dbus-glib-1.pc\n \n-SUBDIRS = dbus-gmain dbus tools test doc\n-DIST_SUBDIRS = dbus-gmain dbus tools test doc m4\n+SUBDIRS = dbus-gmain dbus test doc\n+DIST_SUBDIRS = dbus-gmain dbus test doc m4\n \n pkgconfigdir = $(libdir)/pkgconfig\n pkgconfig_DATA = $(GLIB_PC)\ndiff --git a/dbus/Makefile.am b/dbus/Makefile.am\nindex 6d885f9..8bc102d 100644\n--- a/dbus/Makefile.am\n+++ b/dbus/Makefile.am\n@@ -1,4 +1,4 @@\n-SUBDIRS = . examples\n+SUBDIRS = .\n \n INCLUDES = \\\n \t-I$(top_srcdir)\t\t\t\t\t\t\\\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/devel/elfutils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"elfutils\"\nPKG_VERSION=\"0.188\"\nPKG_SHA256=\"fb8b0e8d0802005b9a309c60c1d8de32dd2951b56f0c3a3cb56d21ce01595dff\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://sourceware.org/elfutils/\"\nPKG_URL=\"https://sourceware.org/elfutils/ftp/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_HOST=\"autoconf:host automake:host m4:host make:host zlib:host\"\nPKG_DEPENDS_TARGET=\"toolchain zlib elfutils:host\"\nPKG_LONGDESC=\"A collection of utilities to handle ELF objects.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nif [ \"${LIBREELEC_VERSION}\" = \"devel\" ]; then\n  PKG_PROGRAMS=\"--enable-programs --program-prefix=\"\n  PKG_PROGRAMS_LIST=\"readelf\"\nelse\n  PKG_PROGRAMS=\"--disable-programs\"\n  PKG_PROGRAMS_LIST=\nfi\n\nPKG_CONFIGURE_OPTS_HOST=\"utrace_cv_cc_biarch=false \\\n                         --disable-programs \\\n                         --disable-nls \\\n                         --disable-debuginfod \\\n                         --disable-libdebuginfod \\\n                         --with-zlib \\\n                         --without-bzlib \\\n                         --without-lzma\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"utrace_cv_cc_biarch=false \\\n                           ${PKG_PROGRAMS} \\\n                           --disable-nls \\\n                           --disable-debuginfod \\\n                           --disable-libdebuginfod \\\n                           --with-zlib \\\n                           --without-bzlib \\\n                           --without-lzma\"\n\npost_makeinstall_target() {\n  # don't install progs into sysroot\n  rm -fr ${SYSROOT_PREFIX}/usr/bin\n\n  if [ -n \"${PKG_PROGRAMS_LIST}\" ]; then\n    for PKG_TEMP in $(find ${INSTALL}/usr/bin -type f); do\n      listcontains \"${PKG_PROGRAMS_LIST}\" ${PKG_TEMP#${INSTALL}/usr/bin/} || rm ${PKG_TEMP}\n    done\n  fi\n}\n"
  },
  {
    "path": "packages/devel/elfutils/patches/elfutils-001-make-executables-optional.patch",
    "content": "From be854357189b6a3bd7e846b4e7914877f0deaf9f Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Sat, 25 Jan 2020 21:28:52 +0000\nSubject: [PATCH] make executables optional\n\n---\n Makefile.am  | 6 +++++-\n configure.ac | 5 +++++\n 2 files changed, 10 insertions(+), 1 deletion(-)\n\ndiff --git a/Makefile.am b/Makefile.am\nindex bd8926b..1733937 100644\n--- a/Makefile.am\n+++ b/Makefile.am\n@@ -27,7 +27,11 @@\n pkginclude_HEADERS = version.h\n \n SUBDIRS = config lib libelf libcpu backends libebl libdwelf libdwfl libdw \\\n-\t  libasm debuginfod src po doc tests\n+\t  libasm debuginfod po doc tests\n+\n+if BUILD_PROGRAMS\n+  SUBDIRS += src\n+endif\n \n EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \\\n \t     COPYING COPYING-GPLV2 COPYING-LGPLV3\ndiff --git a/configure.ac b/configure.ac\nindex 5a2dc37..a1e856a 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -88,6 +88,11 @@ AS_IF([test \"$use_locks\" = yes],\n \n AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])\n \n+AC_ARG_ENABLE([programs],\n+AS_HELP_STRING([--enable-programs], [Build and install programs when enabled (default: disabled)]),\n+               [build_programs=$enableval], [build_programs=no])\n+AM_CONDITIONAL(BUILD_PROGRAMS, test \"$build_programs\" = yes)\n+\n m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_C99])\n AC_PROG_CXX\n AC_PROG_RANLIB\n-- \n2.7.4\n\n"
  },
  {
    "path": "packages/devel/fakeroot/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"fakeroot\"\nPKG_VERSION=\"1.30.1\"\nPKG_SHA256=\"32ebb1f421aca0db7141c32a8c104eb95d2b45c393058b9435fbf903dd2b6a75\"\nPKG_LICENSE=\"GPL3\"\nPKG_SITE=\"https://tracker.debian.org/pkg/fakeroot\"\nPKG_URL=\"http://ftp.debian.org/debian/pool/main/f/fakeroot/${PKG_NAME}_${PKG_VERSION}.orig.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host libcap:host autoconf:host libtool:host\"\nPKG_LONGDESC=\"fakeroot provides a fake root environment by means of LD_PRELOAD and SYSV IPC (or TCP) trickery.\"\nPKG_TOOLCHAIN=\"configure\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--with-gnu-ld\"\n\npre_configure_host() {\n  cd ${PKG_BUILD}\n  ./bootstrap\n}\n"
  },
  {
    "path": "packages/devel/fakeroot/patches/fakeroot-001-disable-docs-tests.patch",
    "content": "--- fakeroot-1.25.3/configure.ac\t2020-10-08 17:13:18.000000000 +0000\n+++ fakeroot-1.25.3/configure.ac\t2021-01-10 03:57:50.295218481 +0000\n@@ -597,9 +597,7 @@\n AC_CONFIG_FILES([\n    Makefile\n    scripts/Makefile\n-   doc/Makefile\n-   doc/de/Makefile doc/es/Makefile doc/fr/Makefile doc/nl/Makefile doc/pt/Makefile doc/sv/Makefile\n-   test/Makefile test/defs])\n+   ])\n AC_OUTPUT\n \n dnl Local variables:\n--- fakeroot-1.25.3/Makefile.am\t2020-10-08 17:13:18.000000000 +0000\n+++ fakeroot-1.25.3/Makefile.am\t2021-01-10 04:02:06.703081728 +0000\n@@ -1,6 +1,6 @@\n AUTOMAKE_OPTIONS=foreign\n ACLOCAL_AMFLAGS = -I build-aux\n-SUBDIRS=doc scripts test\n+SUBDIRS=scripts\n \n noinst_LTLIBRARIES = libcommunicate.la libmacosx.la\n libcommunicate_la_SOURCES = communicate.c\n"
  },
  {
    "path": "packages/devel/flatbuffers/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"flatbuffers\"\nPKG_VERSION=\"22.12.06\"\nPKG_SHA256=\"209823306f2cbedab6ff70997e0d236fcfd1864ca9ad082cbfdb196e7386daed\"\nPKG_LICENSE=\"Apache-2.0\"\nPKG_SITE=\"https://github.com/google/flatbuffers\"\nPKG_URL=\"https://github.com/google/flatbuffers/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"An efficient cross platform serialization library for games and other memory constrained apps.\"\n\nPKG_CMAKE_OPTS_HOST=\"-DFLATBUFFERS_CODE_COVERAGE=OFF \\\n                     -DFLATBUFFERS_BUILD_TESTS=OFF \\\n                     -DFLATBUFFERS_INSTALL=ON \\\n                     -DFLATBUFFERS_BUILD_FLATLIB=OFF \\\n                     -DFLATBUFFERS_BUILD_FLATC=ON \\\n                     -DFLATBUFFERS_BUILD_FLATHASH=OFF \\\n                     -DFLATBUFFERS_BUILD_GRPCTEST=OFF \\\n                     -DFLATBUFFERS_BUILD_SHAREDLIB=OFF\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DFLATBUFFERS_CODE_COVERAGE=OFF \\\n                       -DFLATBUFFERS_BUILD_TESTS=OFF \\\n                       -DFLATBUFFERS_INSTALL=ON \\\n                       -DFLATBUFFERS_BUILD_FLATLIB=ON \\\n                       -DFLATBUFFERS_BUILD_FLATC=OFF \\\n                       -DFLATBUFFERS_BUILD_FLATHASH=OFF \\\n                       -DFLATBUFFERS_BUILD_GRPCTEST=OFF \\\n                       -DFLATBUFFERS_BUILD_SHAREDLIB=OFF\"\n\npre_configure_host() {\n  export CXXFLAGS=\"${CXXFLAGS} -std=c++11\"\n}\n\npost_makeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp -PR ${PKG_BUILD}/.${HOST_NAME}/flatc ${TOOLCHAIN}/bin\n}\n"
  },
  {
    "path": "packages/devel/flex/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"flex\"\nPKG_VERSION=\"2.6.4\"\nPKG_SHA256=\"e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/westes/flex\"\nPKG_URL=\"https://github.com/westes/flex/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host m4:host autotools:host bison:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A tool for generating programs that perform pattern-matching on text.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--enable-static --disable-shared --disable-rpath --with-gnu-ld\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_func_realloc_0_nonnull=yes \\\n                           ac_cv_func_malloc_0_nonnull=yes\"\n\npost_makeinstall_host() {\n  cat > ${TOOLCHAIN}/bin/lex << \"EOF\"\n#!/bin/sh\nexec flex \"$@\"\nEOF\n\n  chmod -v 755 ${TOOLCHAIN}/bin/lex\n}\n"
  },
  {
    "path": "packages/devel/flex/patches/c5a26b17a2b091c560f6c4e6703e55f496bf74fa.patch",
    "content": "From c5a26b17a2b091c560f6c4e6703e55f496bf74fa Mon Sep 17 00:00:00 2001\nFrom: Explorer09 <explorer09@gmail.com>\nDate: Mon, 4 Sep 2017 10:47:33 +0800\nSubject: [PATCH] AC_USE_SYSTEM_EXTENSIONS in configure.ac\n\nThis would define _GNU_SOURCE in config.h, enabling the reallocarray()\nprototype in glibc 2.26+.\n\nFixes #241.\n---\n configure.ac | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex c6f12d64..3c977a4e 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -25,8 +25,10 @@\n # autoconf requirements and initialization\n \n AC_INIT([the fast lexical analyser generator],[2.6.4],[flex-help@lists.sourceforge.net],[flex])\n+AC_PREREQ([2.60])\n AC_CONFIG_SRCDIR([src/scan.l])\n AC_CONFIG_AUX_DIR([build-aux])\n+AC_USE_SYSTEM_EXTENSIONS\n LT_INIT\n AM_INIT_AUTOMAKE([1.15 -Wno-portability foreign std-options dist-lzip parallel-tests subdir-objects])\n AC_CONFIG_HEADER([src/config.h])\n"
  },
  {
    "path": "packages/devel/flex/patches/flex-002-nocrap.patch",
    "content": "--- a/Makefile.am\t2020-01-08 12:57:40.940081434 +0100\n+++ b/Makefile.am\t2020-01-08 12:57:59.603818146 +0100\n@@ -50,10 +50,6 @@\n SUBDIRS = \\\n \tlib \\\n \tsrc \\\n-\tdoc \\\n-\texamples \\\n-\tpo \\\n-\ttests \\\n \ttools\n \n # Create the ChangeLog, but only if we're inside a git working directory\n"
  },
  {
    "path": "packages/devel/fribidi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"fribidi\"\nPKG_VERSION=\"1.0.12\"\nPKG_SHA256=\"0cd233f97fc8c67bb3ac27ce8440def5d3ffacf516765b91c2cc654498293495\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"http://fribidi.freedesktop.org/\"\nPKG_URL=\"https://github.com/fribidi/fribidi/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A bidirectional algorithm library.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_MESON_OPTS_TARGET=\"-Ddeprecated=false \\\n                       -Ddocs=false \\\n                       -Ddefault_library=static\"\n\npost_makeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/bin\n    cp -f ${PKG_DIR}/scripts/fribidi-config ${SYSROOT_PREFIX}/usr/bin\n    chmod +x ${SYSROOT_PREFIX}/usr/bin/fribidi-config\n\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/devel/fribidi/scripts/fribidi-config",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nwhile test $# -gt 0; do\n  case $1 in\n    --libs)\n      echo \"-lfribidi\"\n      ;;\n  esac\n  shift\ndone\n"
  },
  {
    "path": "packages/devel/gettext/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gettext\"\nPKG_VERSION=\"0.21.1\"\nPKG_SHA256=\"50dbc8f39797950aa2c98e939947c527e5ac9ebd2c1b99dd7b06ba33a6767ae6\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.gnu.org/s/gettext/\"\nPKG_URL=\"https://ftp.gnu.org/pub/gnu/gettext/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"make:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A program internationalization library and tools.\"\nPKG_BUILD_FLAGS=\"+local-cc\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--disable-static --enable-shared \\\n                         --disable-rpath \\\n                         --with-gnu-ld \\\n                         --disable-java \\\n                         --disable-curses \\\n                         --with-included-libxml \\\n                         --disable-native-java \\\n                         --disable-csharp \\\n                         --without-emacs\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-rpath\"\n\npost_configure_target() {\n  libtool_remove_rpath gettext-runtime/libasprintf/libtool\n  libtool_remove_rpath gettext-tools/libtool\n}\n"
  },
  {
    "path": "packages/devel/gettext/patches/gettext-0.18.2-non_interactive.patch",
    "content": "diff -Naur gettext-0.18.1.1-old/gettext-tools/misc/gettextize.in gettext-0.18.1.1-new/gettext-tools/misc/gettextize.in\n--- gettext-0.18.1.1-old/gettext-tools/misc/gettextize.in\t2010-06-06 05:49:57.000000000 -0700\n+++ gettext-0.18.1.1-new/gettext-tools/misc/gettextize.in\t2010-08-18 06:52:51.000000000 -0700\n@@ -1272,10 +1272,10 @@\n     5) count=\"five paragraphs\";;\n     *) count=\"$count paragraphs\";;\n   esac\n-  echo \"Press Return to acknowledge the previous $count.\"\n-  # Read from /dev/tty, not stdin, so that gettextize cannot be abused by\n-  # non-interactive tools.\n-  read dummy < /dev/tty\n+#  echo \"Press Return to acknowledge the previous $count.\"\n+#  # Read from /dev/tty, not stdin, so that gettextize cannot be abused by\n+#  # non-interactive tools.\n+#  read dummy < /dev/tty\n fi\n \n exit 0\n"
  },
  {
    "path": "packages/devel/gettext/patches/gettext-dont_build_docs_and_examples.patch",
    "content": "diff -Naur gettext-0.19.7/gettext-tools/Makefile.am gettext-0.19.7.patch/gettext-tools/Makefile.am\n--- gettext-0.19.7/gettext-tools/Makefile.am\t2015-12-08 13:50:04.000000000 +0100\n+++ gettext-0.19.7.patch/gettext-tools/Makefile.am\t2016-01-01 20:49:07.476011819 +0100\n@@ -19,7 +19,7 @@\n AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies\n ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4\n\n-SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc\n+SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests\n \n EXTRA_DIST = misc/DISCLAIM\n MOSTLYCLEANFILES = core *.stackdump\ndiff -Naur gettext-0.19.7/gettext-tools/Makefile.in gettext-0.19.7.patch/gettext-tools/Makefile.in\n--- gettext-0.19.7/gettext-tools/Makefile.in\t2015-12-28 00:09:39.000000000 +0100\n+++ gettext-0.19.7.patch/gettext-tools/Makefile.in\t2016-01-01 20:49:29.444038357 +0100\n@@ -1865,7 +1865,7 @@\n top_srcdir = @top_srcdir@\n AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies\n ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4\n-SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc\n+SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests\n \n # Allow users to use \"gnulib-tool --update\".\n \n"
  },
  {
    "path": "packages/devel/glib/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"glib\"\nPKG_VERSION=\"2.75.2\"\nPKG_SHA256=\"360d6fb75202c0eb0d07f0ab812b19b526f1c05ccc0a8ed7e5d2c988616d343a\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://www.gtk.org/\"\nPKG_URL=\"https://download.gnome.org/sources/glib/$(get_pkg_version_maj_min)/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"libffi:host pcre2:host Python3:host meson:host ninja:host\"\nPKG_DEPENDS_TARGET=\"toolchain pcre2 zlib libffi Python3:host util-linux\"\nPKG_LONGDESC=\"A library which includes support routines for C such as lists, trees, hashes, memory allocation.\"\n\nPKG_MESON_OPTS_HOST=\"-Ddefault_library=shared \\\n                     -Dinstalled_tests=false \\\n                     -Dlibmount=disabled \\\n                     -Dtests=false\"\n\nPKG_MESON_OPTS_TARGET=\"-Ddefault_library=shared \\\n                       -Dinstalled_tests=false \\\n                       -Dselinux=disabled \\\n                       -Dxattr=true \\\n                       -Dgtk_doc=false \\\n                       -Dman=false \\\n                       -Ddtrace=false \\\n                       -Dsystemtap=false \\\n                       -Dbsymbolic_functions=true \\\n                       -Dforce_posix_threads=true \\\n                       -Dtests=false\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n  rm -rf ${INSTALL}/usr/lib/gdbus-2.0\n  rm -rf ${INSTALL}/usr/lib/glib-2.0\n  rm -rf ${INSTALL}/usr/lib/installed-tests\n  rm -rf ${INSTALL}/usr/share\n}\n"
  },
  {
    "path": "packages/devel/glibc/config/gai.conf",
    "content": "# Configuration for getaddrinfo(3).\n#\n# So far only configuration for the destination address sorting is needed.\n# RFC 3484 governs the sorting.  But the RFC also says that system\n# administrators should be able to overwrite the defaults.  This can be\n# achieved here.\n#\n# All lines have an initial identifier specifying the option followed by\n# up to two values.  Information specified in this file replaces the\n# default information.  Complete absence of data of one kind causes the\n# appropriate default information to be used.  The supported commands include:\n#\n# reload  <yes|no>\n#    If set to yes, each getaddrinfo(3) call will check whether this file\n#    changed and if necessary reload.  This option should not really be\n#    used.  There are possible runtime problems.  The default is no.\n#\n# label   <mask>   <value>\n#    Add another rule to the RFC 3484 label table.  See section 2.1 in\n#    RFC 3484.  The default is:\n#\n#label ::1/128       0\n#label ::/0          1\n#label 2002::/16     2\n#label ::/96         3\n#label ::ffff:0:0/96 4\n#label fec0::/10     5\n#label fc00::/7      6\n#label 2001:0::/32   7\n#\n#    This default differs from the tables given in RFC 3484 by handling\n#    (now obsolete) site-local IPv6 addresses and Unique Local Addresses.\n#    The reason for this difference is that these addresses are never\n#    NATed while IPv4 site-local addresses most probably are.  Given\n#    the precedence of IPv6 over IPv4 (see below) on machines having only\n#    site-local IPv4 and IPv6 addresses a lookup for a global address would\n#    see the IPv6 be preferred.  The result is a long delay because the\n#    site-local IPv6 addresses cannot be used while the IPv4 address is\n#    (at least for the foreseeable future) NATed.  We also treat Teredo\n#    tunnels special.\n#\n# precedence  <mask>   <value>\n#    Add another rule to the RFC 3484 precedence table.  See section 2.1\n#    and 10.3 in RFC 3484.  The default is:\n#\n#precedence  ::1/128       50\n#precedence  ::/0          40\n#precedence  2002::/16     30\n#precedence ::/96          20\n#precedence ::ffff:0:0/96  10\n#\n#    For sites which prefer IPv4 connections change the last line to\n#\n#precedence ::ffff:0:0/96  100\n\n#\n# scopev4  <mask>  <value>\n#    Add another rule to the RFC 6724 scope table for IPv4 addresses.\n#    By default the scope IDs described in section 3.2 in RFC 6724 are\n#    used.  Changing these defaults should hardly ever be necessary.\n#    The defaults are equivalent to:\n#\n#scopev4 ::ffff:169.254.0.0/112  2\n#scopev4 ::ffff:127.0.0.0/104    2\n#scopev4 ::ffff:0.0.0.0/96       14\n"
  },
  {
    "path": "packages/devel/glibc/config/host.conf",
    "content": "multi on\n"
  },
  {
    "path": "packages/devel/glibc/config/nsswitch-init.conf",
    "content": "# This is just enough to get DNS resolution working in the initramfs\n\nhosts:\t\tdns\n"
  },
  {
    "path": "packages/devel/glibc/config/nsswitch-target.conf",
    "content": "# /etc/nsswitch.conf\n#\n# Example configuration of GNU Name Service Switch functionality.\n#\n\npasswd:\t\tfiles\ngroup:\t\tfiles\nshadow:\t\tfiles\ngshadow:\tfiles\n\nhosts:\t\tfiles dns\nnetworks:\tfiles dns\n\nprotocols:\tfiles\nservices:\tfiles\nethers:\t\tfiles\nrpc:\t\tfiles\n\nnetgroup:\tfiles\n"
  },
  {
    "path": "packages/devel/glibc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"glibc\"\nPKG_VERSION=\"2.36\"\nPKG_SHA256=\"1c959fea240906226062cb4b1e7ebce71a9f0e3c0836c09e7e3423d434fcfe75\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.gnu.org/software/libc/\"\nPKG_URL=\"https://ftp.gnu.org/pub/gnu/glibc/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"ccache:host autotools:host linux:host gcc:bootstrap pigz:host Python3:host\"\nPKG_DEPENDS_INIT=\"glibc\"\nPKG_LONGDESC=\"The Glibc package contains the main C library.\"\nPKG_BUILD_FLAGS=\"+bfd\"\n\ncase \"${LINUX}\" in\n  amlogic-4.9|rk356x-4.19|OdroidM1-4.19)\n    OPT_ENABLE_KERNEL=4.9.0\n    ;;\n  gameforce-4.4|rockchip-4.4|odroid-go-a-4.4)\n    OPT_ENABLE_KERNEL=4.4.0\n    ;;\n  amlogic-5.15)\n    OPT_ENABLE_KERNEL=5.15.0\n    ;;\n  amlogic-5.4)\n    OPT_ENABLE_KERNEL=5.4.0\n    ;;\n  amlogic-3.14)\n    OPT_ENABLE_KERNEL=3.0.0\n    ;;\n  *)\n    OPT_ENABLE_KERNEL=6.1.0\n    ;;\nesac\n\nif [ \"${TARGET_ARCH}\" = \"arm\" ] || [ \"${TARGET_ARCH}\" = \"aarch64\" ]; then\n  PKG_PATCH_DIRS=\"widevine-arm\"\nfi\n\nPKG_CONFIGURE_OPTS_TARGET=\"BASH_SHELL=/bin/sh \\\n                           ac_cv_path_PERL=no \\\n                           ac_cv_prog_MAKEINFO= \\\n                           --libexecdir=/usr/lib/glibc \\\n                           --cache-file=config.cache \\\n                           --disable-profile \\\n                           --disable-sanity-checks \\\n                           --enable-add-ons \\\n                           --enable-bind-now \\\n                           --with-elf \\\n                           --with-tls \\\n                           --with-__thread \\\n                           --with-binutils=${BUILD}/toolchain/bin \\\n                           --with-headers=${SYSROOT_PREFIX}/usr/include \\\n                           --enable-kernel=${OPT_ENABLE_KERNEL} \\\n                           --without-cvs \\\n                           --without-gd \\\n                           --disable-build-nscd \\\n                           --disable-nscd \\\n                           --disable-timezone-tools\"\n\nif build_with_debug; then\n  PKG_CONFIGURE_OPTS_TARGET+=\" --enable-debug\"\nelse\n  PKG_CONFIGURE_OPTS_TARGET+=\" --disable-debug\"\nfi\n\npost_unpack() {\n  find \"${PKG_BUILD}\" -type f -name '*.py' -exec sed -e '1s,^#![[:space:]]*/usr/bin/python.*,#!/usr/bin/env python3,' -i {} \\;\n}\n\npre_configure_target() {\n# Filter out some problematic *FLAGS\n  export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-ffast-math||g\")\n  export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-Ofast|-O2|g\")\n  export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-O.|-O2|g\")\n\n  export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-Wunused-but-set-variable||g\")\n  export CFLAGS=\"${CFLAGS} -Wno-unused-variable\"\n\n  if [ -n \"${PROJECT_CFLAGS}\" ]; then\n    export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|${PROJECT_CFLAGS}||g\")\n  fi\n\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-ffast-math||g\")\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-Ofast|-O2|g\")\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-O.|-O2|g\")\n\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-Wl,--as-needed||\")\n\n  unset LD_LIBRARY_PATH\n\n  # set some CFLAGS we need\n  export CFLAGS=\"${CFLAGS} -g -fno-stack-protector\"\n\n  export BUILD_CC=${HOST_CC}\n  export OBJDUMP_FOR_HOST=objdump\n\n  cat >config.cache <<EOF\nlibc_cv_forced_unwind=yes\nlibc_cv_c_cleanup=yes\nlibc_cv_ssp=no\nlibc_cv_ssp_strong=no\nlibc_cv_slibdir=/usr/lib\nEOF\n\n  cat >configparms <<EOF\nlibdir=/usr/lib\nslibdir=/usr/lib\nsbindir=/usr/bin\nrootsbindir=/usr/bin\nbuild-programs=yes\nEOF\n\n  # binaries to install into target\n  GLIBC_INCLUDE_BIN=\"getent ldd locale localedef\"\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/.noinstall\n    cp -p ${INSTALL}/usr/bin/localedef ${INSTALL}/.noinstall\n    cp -a ${INSTALL}/usr/share/i18n/locales ${INSTALL}/.noinstall\n    mv ${INSTALL}/usr/share/i18n/charmaps ${INSTALL}/.noinstall\n\n# cleanup\n# remove any programs we don't want/need, keeping only those we want\n  for f in $(find ${INSTALL}/usr/bin -type f); do\n    listcontains \"${GLIBC_INCLUDE_BIN}\" \"$(basename \"${f}\")\" || safe_remove \"${f}\"\n  done\n\n  safe_remove ${INSTALL}/usr/lib/audit\n  safe_remove ${INSTALL}/usr/lib/glibc\n  safe_remove ${INSTALL}/usr/lib/*.o\n  safe_remove ${INSTALL}/var\n\n# add UTF-8 charmap\n  mkdir -p ${INSTALL}/usr/share/i18n/charmaps\n    cp -PR ${INSTALL}/.noinstall/charmaps/UTF-8.gz ${INSTALL}/usr/share/i18n/charmaps\n\n  if [ ! \"${GLIBC_LOCALES}\" = yes ]; then\n    safe_remove ${INSTALL}/usr/share/i18n/locales\n\n    mkdir -p ${INSTALL}/usr/share/i18n/locales\n      cp -PR ${PKG_BUILD}/localedata/locales/POSIX ${INSTALL}/usr/share/i18n/locales\n  fi\n\n# create default configs\n  mkdir -p ${INSTALL}/etc\n    cp ${PKG_DIR}/config/nsswitch-target.conf ${INSTALL}/etc/nsswitch.conf\n    cp ${PKG_DIR}/config/host.conf ${INSTALL}/etc\n    cp ${PKG_DIR}/config/gai.conf ${INSTALL}/etc\n}\n\nconfigure_init() {\n  cd ${PKG_BUILD}\n    rm -rf ${PKG_BUILD}/.${TARGET_NAME}-init\n}\n\nmake_init() {\n  : # reuse make_target()\n}\n\nmakeinstall_init() {\n  mkdir -p ${INSTALL}/usr/lib\n    cp -PR ${PKG_BUILD}/.${TARGET_NAME}/elf/ld*.so* ${INSTALL}/usr/lib\n    cp -PR ${PKG_BUILD}/.${TARGET_NAME}/libc.so* ${INSTALL}/usr/lib\n    cp -PR ${PKG_BUILD}/.${TARGET_NAME}/math/libm.so* ${INSTALL}/usr/lib\n    cp -PR ${PKG_BUILD}/.${TARGET_NAME}/nptl/libpthread.so* ${INSTALL}/usr/lib\n    cp -PR ${PKG_BUILD}/.${TARGET_NAME}/rt/librt.so* ${INSTALL}/usr/lib\n    cp -PR ${PKG_BUILD}/.${TARGET_NAME}/resolv/libnss_dns.so* ${INSTALL}/usr/lib\n    cp -PR ${PKG_BUILD}/.${TARGET_NAME}/resolv/libresolv.so* ${INSTALL}/usr/lib\n}\n\npost_makeinstall_init() {\n# create default configs\n  mkdir -p ${INSTALL}/etc\n    cp ${PKG_DIR}/config/nsswitch-init.conf ${INSTALL}/etc/nsswitch.conf\n}\n"
  },
  {
    "path": "packages/devel/glibc/patches/arm/0001-Revert-Linux-statx-syscall-number-is-always-availabl.patch",
    "content": "From d25ea6e7a433b21e270491cdd420ebcc14016963 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 16 May 2023 10:20:38 +0200\nSubject: [PATCH 1/3] Revert \"Linux: statx syscall number is always available\"\n\nThis reverts commit 7255ccbec997312033c9fe48e0971a2e7cb19fbf.\n\nRevert as this is not true for older kernels.\n---\n sysdeps/unix/sysv/linux/statx.c | 11 +++++++----\n 1 file changed, 7 insertions(+), 4 deletions(-)\n\ndiff --git a/sysdeps/unix/sysv/linux/statx.c b/sysdeps/unix/sysv/linux/statx.c\nindex 8211ef4b68..9da6c0821c 100644\n--- a/sysdeps/unix/sysv/linux/statx.c\n+++ b/sysdeps/unix/sysv/linux/statx.c\n@@ -25,14 +25,17 @@ int\n statx (int fd, const char *path, int flags,\n        unsigned int mask, struct statx *buf)\n {\n+#ifdef __NR_statx\n   int ret = INLINE_SYSCALL_CALL (statx, fd, path, flags, mask, buf);\n-#ifdef __ASSUME_STATX\n+# ifdef __ASSUME_STATX\n   return ret;\n-#else\n+# else\n   if (ret == 0 || errno != ENOSYS)\n     /* Preserve non-error/non-ENOSYS return values.  */\n     return ret;\n-  else\n-    return statx_generic (fd, path, flags, mask, buf);\n+# endif\n+#endif\n+#ifndef __ASSUME_STATX\n+  return statx_generic (fd, path, flags, mask, buf);\n #endif\n }\n-- \n2.41.0\n\n"
  },
  {
    "path": "packages/devel/glibc/patches/arm/0002-Linux-arm-fixup-statx-syscall-number-missing.patch",
    "content": "From 6404339d284203199febb7e28dcc53a3d57858ed Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 16 May 2023 10:47:18 +0200\nSubject: [PATCH 2/3] Linux: arm: fixup statx syscall number missing\n\n---\n sysdeps/unix/sysv/linux/fstatat64.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/sysdeps/unix/sysv/linux/fstatat64.c b/sysdeps/unix/sysv/linux/fstatat64.c\nindex 8b1a1a290d..ca66485968 100644\n--- a/sysdeps/unix/sysv/linux/fstatat64.c\n+++ b/sysdeps/unix/sysv/linux/fstatat64.c\n@@ -40,7 +40,7 @@ _Static_assert (sizeof (__blkcnt_t) == sizeof (__blkcnt64_t),\n                 \"__blkcnt_t and __blkcnt64_t must match\");\n #endif\n \n-#if (__WORDSIZE == 32 \\\n+#if (__WORDSIZE == 32 && defined __NR_statx \\\n      && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) \\\n      || defined STAT_HAS_TIME32 \\\n      || (!defined __NR_newfstatat && !defined __NR_fstatat64)\n-- \n2.41.0\n\n"
  },
  {
    "path": "packages/devel/glibc/patches/arm/0003-arm-disable-__NR_statx-as-it-s-not-available-in-4.9.patch",
    "content": "From d466d07f9bf8c3fd42d92b4f9412df50c0faff42 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Wed, 17 May 2023 15:36:51 +0200\nSubject: [PATCH 3/3] arm: disable __NR_statx as it's not available in 4.9\n\n---\n sysdeps/unix/sysv/linux/arm/arch-syscall.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/sysdeps/unix/sysv/linux/arm/arch-syscall.h b/sysdeps/unix/sysv/linux/arm/arch-syscall.h\nindex e7ba04c106..7ad958d643 100644\n--- a/sysdeps/unix/sysv/linux/arm/arch-syscall.h\n+++ b/sysdeps/unix/sysv/linux/arm/arch-syscall.h\n@@ -355,7 +355,7 @@\n #define __NR_stat64 195\n #define __NR_statfs 99\n #define __NR_statfs64 266\n-#define __NR_statx 397\n+//#define __NR_statx 397\n #define __NR_swapoff 115\n #define __NR_swapon 87\n #define __NR_symlink 83\n-- \n2.41.0\n\n"
  },
  {
    "path": "packages/devel/glibc/patches/glibc-fix-dns-with-broken-routers.patch",
    "content": "commit 45918e237cd32bb3d9a5fde83f81f83b52584771\nAuthor: Stefan Saraev <stefan@saraev.ca>\nDate:   Tue Oct 1 12:09:07 2013 +0300\n\n    fix dns with broken routers\n    \n    ref: https://fedoraproject.org/wiki/Networking/NameResolution/ADDRCONFIG\n\n--- a/sysdeps/posix/getaddrinfo.c\n+++ b/sysdeps/posix/getaddrinfo.c\n@@ -730,6 +730,38 @@ gaih_inet (const char *name, const struc\n   if (res_ctx == NULL)\n     no_more = 1;\n \n+  /* AI_ADDRCONFIG determines whether or not we should suppress any\n+   * hostname lookups. If the local host has only IPv4 interfaces,\n+   * then suppress lookups for IPv6 addresses, and vice versa; if\n+   * the local host has only IPv6 interfaces, suppress any lookups\n+   * for IPv4 addresses..\n+   * \n+   * Link-local IPv6 addresses and loopback addresses of either\n+   * family are ignored when determining whether or not the host has\n+   * an interface of the given address family, cf. __check_pf().\n+   *\n+   * This logic is only applied for AF_UNSPEC. If the caller\n+   * explicitly requested an address family, give him what he asked\n+   * for.\n+   *\n+   * If we didn't find any interfaces of either address family,\n+   * we ignore AI_ADDRCONFIG and return all available resutlts.  */\n+  int suppress_af = 0;\n+  if (req->ai_family == AF_UNSPEC)\n+    {\n+      struct in6addrinfo *in6ai = NULL;\n+      size_t in6ailen = 0;\n+      bool seen_ipv4 = false;\n+      bool seen_ipv6 = false;\n+      __check_pf (&seen_ipv4, &seen_ipv6, &in6ai, &in6ailen);\n+      __free_in6ai (in6ai);\n+\n+      if(seen_ipv4 && !seen_ipv6)\n+\t  suppress_af = AF_INET6;\n+      else if(seen_ipv6 && !seen_ipv4)\n+\t  suppress_af = AF_INET;\n+    }\n+\n   while (!no_more)\n     {\n       no_data = 0;\n@@ -737,7 +769,7 @@ gaih_inet (const char *name, const struc\n \n       /* gethostbyname4_r sends out parallel A and AAAA queries and\n \t is thus only suitable for PF_UNSPEC.  */\n-      if (req->ai_family == PF_UNSPEC)\n+      if (req->ai_family == PF_UNSPEC && !suppress_af)\n \tfct4 = __nss_lookup_function (nip, \"gethostbyname4_r\");\n \n       if (fct4 != NULL)\n@@ -826,25 +858,27 @@ gaih_inet (const char *name, const struc\n \n \t  if (fct != NULL)\n \t    {\n-\t      if (req->ai_family == AF_INET6\n-\t\t  || req->ai_family == AF_UNSPEC)\n+\t      if ((req->ai_family == AF_INET6\n+\t\t   || req->ai_family == AF_UNSPEC)\n+\t\t  && suppress_af != AF_INET6)\n \t\t{\n \t\t  if ((result = gethosts (fct, AF_INET6, name, req, tmpbuf,\n \t\t\t\t\t  res, &status, &no_data)) != 0)\n \t\t    {\n \t\t      __resolv_context_put (res_ctx);\n \t\t      goto out;\n \t\t    }\n \t\t  no_inet6_data = no_data;\n \t\t  inet6_status = status;\n \t\t}\n-\t      if (req->ai_family == AF_INET\n-\t\t  || req->ai_family == AF_UNSPEC\n-\t\t  || (req->ai_family == AF_INET6\n-\t\t      && (req->ai_flags & AI_V4MAPPED)\n-\t\t      /* Avoid generating the mapped addresses if we\n-\t\t\t know we are not going to need them.  */\n-\t\t      && ((req->ai_flags & AI_ALL) || !res->got_ipv6)))\n+\t      if ((req->ai_family == AF_INET\n+\t\t   || req->ai_family == AF_UNSPEC\n+\t\t   || (req->ai_family == AF_INET6\n+\t\t       && (req->ai_flags & AI_V4MAPPED)\n+\t\t       /* Avoid generating the mapped addresses if we\n+\t\t\t  know we are not going to need them.  */\n+\t\t       && ((req->ai_flags & AI_ALL) || !res->got_ipv6)))\n+\t\t       && suppress_af != AF_INET)\n \t\t{\n \t\t  if ((result = gethosts (fct, AF_INET, name, req, tmpbuf,\n \t\t\t\t\t  res, &status, &no_data)) != 0)\n--- a/sysdeps/unix/sysv/linux/check_pf.c\n+++ b/sysdeps/unix/sysv/linux/check_pf.c\n@@ -224,7 +224,8 @@ make_request (int fd, pid_t pid)\n \t\t    }\n \t\t  else\n \t\t    {\n-\t\t      if (!IN6_IS_ADDR_LOOPBACK (address))\n+\t\t      if (!IN6_IS_ADDR_LOOPBACK (address) &&\n+\t\t\t  !IN6_IS_ADDR_LINKLOCAL (address))\n \t\t\tseen_ipv6 = true;\n \t\t    }\n \t\t}\n"
  },
  {
    "path": "packages/devel/glibc/patches/glibc-ld.so.cache-to-writable-cache.patch",
    "content": "From bfdcab6e5f8352d5a1ee9724244d98cfd1d1d309 Mon Sep 17 00:00:00 2001\nFrom: 7Ji <pugokushin@gmail.com>\nDate: Fri, 15 Jul 2022 11:30:30 +0800\nSubject: [PATCH] glibc: ld.so.cache to .cache\n\n---\n sysdeps/generic/dl-cache.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h\nindex 93d4bea930..34aa313cf0 100644\n--- a/sysdeps/generic/dl-cache.h\n+++ b/sysdeps/generic/dl-cache.h\n@@ -35,7 +35,7 @@\n #endif\n \n #ifndef LD_SO_CACHE\n-# define LD_SO_CACHE SYSCONFDIR \"/ld.so.cache\"\n+# define LD_SO_CACHE \"/storage/.cache/ld.so.cache\"\n #endif\n \n #ifndef add_system_dir\n-- \n2.37.1\n\n"
  },
  {
    "path": "packages/devel/glibc/patches/widevine-arm/glibc-HACK-Don-t-check-GLIBC_ABI_DT_RELR-support-for-Chrom.patch",
    "content": "From 85892fbc0d6f64f564f0d4c9514a7183ad8eb985 Mon Sep 17 00:00:00 2001\nFrom: alex <knaerzche@gmail.com>\nDate: Sun, 17 Jul 2022 12:16:20 +0200\nSubject: [PATCH] HACK: Don't check GLIBC_ABI_DT_RELR support for ChromeOS\n libwidevinecdm.so\n\nRequired starting with glibc 2.36\n---\n elf/dl-version.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/elf/dl-version.c b/elf/dl-version.c\nindex cda0889209..058394f148 100644\n--- a/elf/dl-version.c\n+++ b/elf/dl-version.c\n@@ -373,7 +373,8 @@ _dl_check_map_versions (struct link_map *map, int verbose, int trace_mode)\n \tif (d->d_tag == DT_NEEDED)\n \t  {\n \t    const char *name = strtab + d->d_un.d_val;\n-\t    if (strncmp (name, \"libc.so.\", 8) == 0)\n+\t    if (strncmp (name, \"libc.so.\", 8) == 0 &&\n+\t        strstr (map->l_name, \"libwidevinecdm.so\") == NULL)\n \t      {\n \t\t_dl_exception_create\n \t\t  (&exception, DSO_FILENAME (map->l_name),\n-- \n2.37.1\n\n"
  },
  {
    "path": "packages/devel/glibc/patches/widevine-arm/glibc-tls-libwidevinecdm.so-since-4.10.2252.0-has-TLS-with.patch",
    "content": "From 61b3b546450ae0a70cb4a57fbb0e0fc47b331370 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Sat, 5 Jun 2021 19:41:25 +0200\nSubject: [PATCH] tls: libwidevinecdm.so: since 4.10.2252.0 has TLS with\n 64-byte alignment Change the max_align to 64U instead 16 to make it possible\n to use dlopen again. Tests by changing TLS_TCB_ALIGN directly showed up some\n random crashes. Reverence: https://lkml.org/lkml/2020/7/3/754\n\nWithout this patch, a SEGV is encountered when dlopen(libwidevinecdm.so),\ninside dl-init.c call_init()\n---\n elf/dl-tls.c | 5 +++++\n 1 file changed, 5 insertions(+)\n\n--- a/elf/dl-tls.c\n+++ b/elf/dl-tls.c\n@@ -220,6 +220,11 @@ void\n _dl_determine_tlsoffset (void)\n {\n   size_t max_align = TCB_ALIGNMENT;\n+  /* libwidevinecdm.so: since 4.10.2252.0 has TLS with 64-byte alignment.\n+     Since TLS is initialized before audit modules are loaded and slotinfo\n+     information is available, this is not taken into account below in\n+     the audit case.  */\n+  max_align = MAX (max_align, 64U);\n   size_t freetop = 0;\n   size_t freebottom = 0;\n \n"
  },
  {
    "path": "packages/devel/gmp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gmp\"\nPKG_VERSION=\"6.2.1\"\nPKG_SHA256=\"fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2\"\nPKG_LICENSE=\"LGPLv3+\"\nPKG_SITE=\"http://gmplib.org/\"\nPKG_URL=\"https://gmplib.org/download/gmp/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host m4:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers.\"\nPKG_BUILD_FLAGS=\"+pic:host\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--enable-cxx --enable-static --disable-shared\"\n\npre_configure_host() {\n  export CPPFLAGS=\"${CPPFLAGS} -fexceptions\"\n}\n"
  },
  {
    "path": "packages/devel/gnulib/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gnulib\"\n# Match version with GNULIB_REVISION in grub bootstrap.conf\nPKG_VERSION=\"ebaa53c5f1253974c6f23bb1500d8de198e84ab8\"\nPKG_SHA256=\"473ec80d80147ad45c38f8ea7bed2db973f266fddee853c646795e35ce928c39\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://savannah.gnu.org/git/?group=gnulib\"\nPKG_URL=\"http://git.savannah.gnu.org/cgit/gnulib.git/snapshot/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"GNU portability library\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/devel/gobject-introspection/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"gobject-introspection\"\nPKG_VERSION=\"1.75.4\"\nPKG_SHA256=\"5356640b5941368fe8abfa7810fd8b5e07160038a177dcf4b683efb840932b5b\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"http://www.gtk.org/\"\nPKG_URL=\"https://github.com/GNOME/$PKG_NAME/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libffi glib Python3 qemu:host gobject-introspection:host\"\nPKG_DEPENDS_HOST=\"libffi:host glib:host\"\nPKG_SECTION=\"devel\"\nPKG_SHORTDESC=\"glib: C support library\"\nPKG_LONGDESC=\"GLib is a library which includes support routines for C such as lists, trees, hashes, memory allocation, and many other things.\"\nPKG_TOOLCHAIN=\"meson\"\n\npre_configure_host() {\n  PKG_MESON_OPTS_HOST=\"-Ddoctool=disabled\"\n\n  # prevent g-ir-scanner from writing cache data to $HOME\n  export GI_SCANNER_DISABLE_CACHE=\"1\"\n}\n\npre_configure_target() {\n  GLIBC_DYNAMIC_LINKER=\"$(ls ${SYSROOT_PREFIX}/usr/lib/ld-linux-*.so.*)\"\n  QEMU_BINARY=\"${TOOLCHAIN}/bin/qemu-${TARGET_ARCH}\"\n  PKG_CONFIG_PATH=\"${SYSROOT_PREFIX}/usr/lib/pkgconfig\"\n\n  # for gi this variables must be defined for target and not for host\n  # because they are used in\n  # toolchain/lib/gobject-introspection/giscanner/ccompiler.py\n  CC=\"${TARGET_CC}\"\n  CXX=\"${TARGET_CXX}\"\n  AR=\"${TARGET_AR}\"\n  CPP=\"${TARGET_PREFIX}cpp\"\n  CPPFLAGS=\"${TARGET_CPPFLAGS}\"\n  CFLAGS=\"${TARGET_CFLAGS}\"\n  LDFLAGS=\"${TARGET_LDFLAGS}\"\n\n  PKG_MESON_OPTS_TARGET=\" \\\n    -Ddoctool=disabled \\\n    -Dpython=${TOOLCHAIN}/bin/${PKG_PYTHON_VERSION} \\\n    -Dgi_cross_use_prebuilt_gi=true \\\n    -Dgi_cross_binary_wrapper=${TOOLCHAIN}/bin/g-ir-scanner-binary-wrapper \\\n    -Dgi_cross_ldd_wrapper=${TOOLCHAIN}/bin/g-ir-scanner-ldd-wrapper \\\n    -Dbuild_introspection_data=true\"\n\n  # prevent g-ir-scanner from writing cache data to $HOME\n  export GI_SCANNER_DISABLE_CACHE=\"1\"\n\n  # write out a qemu wrapper that will be given to gi-scanner\n  # so that it can run target helper binaries through that\n  cat > ${TOOLCHAIN}/bin/g-ir-scanner-binary-wrapper << EOF\n#!/bin/sh\n  ${QEMU_BINARY} \\\n    -E LD_LIBRARY_PATH=\"${SYSROOT_PREFIX}/usr/lib:${TOOLCHAIN}/${TARGET_NAME}/lib\" \\\n    -L ${SYSROOT_PREFIX}/usr \\\n    \"\\$@\"\nEOF\n\n  # write out a wrapper to use instead of ldd, which does not\n  # work when a binary is built for a different architecture\n  cat > ${TOOLCHAIN}/bin/g-ir-scanner-ldd-wrapper << EOF\n#!/bin/sh\n  ${QEMU_BINARY} \\\n    -E LD_LIBRARY_PATH=\"${SYSROOT_PREFIX}/usr/lib:${TOOLCHAIN}/${TARGET_NAME}/lib\" \\\n    ${GLIBC_DYNAMIC_LINKER} --list \"\\$1\"\nEOF\n\n  chmod +x ${TOOLCHAIN}/bin/g-ir-scanner-*-wrapper\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n  rm -rf ${INSTALL}/usr/lib/gobject-introspection\n  rm -rf ${INSTALL}/usr/share\n}\n"
  },
  {
    "path": "packages/devel/gobject-introspection/patches/gobject-introspection-0004-fix-7568.patch",
    "content": "diff --git a/girepository/girepository.c b/girepository/girepository.c\nindex 7d03485..aef2320 100644\n--- a/girepository/girepository.c\t\n+++ b/girepository/girepository.c\n@@ -824,6 +824,8 @@ g_irepository_find_by_gtype (GIRepository *repository,\n     return NULL;\n \n   data.gtype_name = g_type_name (gtype);\n+  if (data.gtype_name == NULL)\n+    return NULL;\n   data.result_typelib = NULL;\n \n   /* Inside each typelib, we include the \"C prefix\" which acts as\n"
  },
  {
    "path": "packages/devel/gperftools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"gperftools\"\nPKG_VERSION=\"2.9.1\"\nPKG_SHA256=\"484a88279d2fa5753d7e9dea5f86954b64975f20e796a6ffaf2f3426a674a06a\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://github.com/gperftools/gperftools\"\nPKG_URL=\"https://github.com/gperftools/gperftools/archive/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Google Performance Tools\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-minimal --disable-debugalloc --disable-static\"\n"
  },
  {
    "path": "packages/devel/heimdal/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2017 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"heimdal\"\nPKG_VERSION=\"f4faaeaba371fff3f8d1bc14389f5e6d70ca8e17\"\nPKG_SHA256=\"2576c5e2d793db53c86e108fd117b278437bb02d6c6db2bec4d1b86958f1980a\"\nPKG_LICENSE=\"BSD-3c\"\nPKG_SITE=\"http://www.h5l.org/\"\nPKG_URL=\"https://github.com/heimdal/heimdal/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host Python3:host ncurses:host asn1c:host\"\nPKG_LONGDESC=\"Kerberos 5, PKIX, CMS, GSS-API, SPNEGO, NTLM, Digest-MD5 and, SASL implementation.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"-parallel\"\n\nPKG_CONFIGURE_OPTS_HOST=\"ac_cv_prog_COMPILE_ET=no \\\n                         --enable-static --disable-shared \\\n                         --without-openldap \\\n                         --without-capng \\\n                         --without-sqlite3 \\\n                         --without-libintl \\\n                         --without-openssl \\\n                         --without-berkeley-db \\\n                         --without-readline \\\n                         --without-libedit \\\n                         --without-hesiod \\\n                         --without-x \\\n                         --disable-otp \\\n                         --disable-heimdal-documentation\"\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp -PR lib/asn1/asn1_compile ${TOOLCHAIN}/bin/heimdal_asn1_compile\n    cp -PR lib/com_err/compile_et ${TOOLCHAIN}/bin/heimdal_compile_et\n}\n"
  },
  {
    "path": "packages/devel/intltool/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"intltool\"\nPKG_VERSION=\"0.51.0\"\nPKG_SHA256=\"67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.gnome.org\"\nPKG_URL=\"http://launchpad.net/intltool/trunk/${PKG_VERSION}/+download/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"Tools to translate strings from various source files (.xml.in, .glade, .desktop.in, .server.in, .oaf.in).\"\n\npost_makeinstall_host() {\n  mkdir -p  ${SYSROOT_PREFIX}/usr/share/aclocal\n    cp ../intltool.m4 ${SYSROOT_PREFIX}/usr/share/aclocal\n}\n"
  },
  {
    "path": "packages/devel/intltool/patches/intltool-0001-fix-regex-expressions.patch",
    "content": "=== modified file 'intltool-update.in'\n--- a/intltool-update.in\t2014-05-14 02:15:53 +0000\n+++ b/intltool-update.in\t2016-01-19 15:59:38 +0000\n@@ -1062,7 +1062,7 @@\n \t}\n     }\n \n-    if ($str =~ /^(.*)\\${?([A-Z_]+)}?(.*)$/)\n+    if ($str =~ /^(.*)\\$\\{?([A-Z_]+)}?(.*)$/)\n     {\n \tmy $rest = $3;\n \tmy $untouched = $1;\n@@ -1190,10 +1190,10 @@\n \t$name    =~ s/\\(+$//g;\n \t$version =~ s/\\(+$//g;\n \n-\t$varhash{\"PACKAGE_NAME\"} = $name if (not $name =~ /\\${?AC_PACKAGE_NAME}?/);\n-\t$varhash{\"PACKAGE\"} = $name if (not $name =~ /\\${?PACKAGE}?/);\n-\t$varhash{\"PACKAGE_VERSION\"} = $version if (not $name =~ /\\${?AC_PACKAGE_VERSION}?/);\n-\t$varhash{\"VERSION\"} = $version if (not $name =~ /\\${?VERSION}?/);\n+\t$varhash{\"PACKAGE_NAME\"} = $name if (not $name =~ /\\$\\{?AC_PACKAGE_NAME}?/);\n+\t$varhash{\"PACKAGE\"} = $name if (not $name =~ /\\$\\{?PACKAGE}?/);\n+\t$varhash{\"PACKAGE_VERSION\"} = $version if (not $name =~ /\\$\\{?AC_PACKAGE_VERSION}?/);\n+\t$varhash{\"VERSION\"} = $version if (not $name =~ /\\$\\{?VERSION}?/);\n     }\n \n     if ($conf_source =~ /^AC_INIT\\(([^,\\)]+),([^,\\)]+)[,]?([^,\\)]+)?/m)\n@@ -1219,11 +1219,11 @@\n \t$version =~ s/\\(+$//g;\n         $bugurl  =~ s/\\(+$//g if (defined $bugurl);\n \n-\t$varhash{\"PACKAGE_NAME\"} = $name if (not $name =~ /\\${?AC_PACKAGE_NAME}?/);\n-\t$varhash{\"PACKAGE\"} = $name if (not $name =~ /\\${?PACKAGE}?/);\n-\t$varhash{\"PACKAGE_VERSION\"} = $version if (not $name =~ /\\${?AC_PACKAGE_VERSION}?/);\n-\t$varhash{\"VERSION\"} = $version if (not $name =~ /\\${?VERSION}?/);\n-        $varhash{\"PACKAGE_BUGREPORT\"} = $bugurl if (defined $bugurl and not $bugurl =~ /\\${?\\w+}?/);\n+\t$varhash{\"PACKAGE_NAME\"} = $name if (not $name =~ /\\$\\{?AC_PACKAGE_NAME}?/);\n+\t$varhash{\"PACKAGE\"} = $name if (not $name =~ /\\$\\{?PACKAGE}?/);\n+\t$varhash{\"PACKAGE_VERSION\"} = $version if (not $name =~ /\\$\\{?AC_PACKAGE_VERSION}?/);\n+\t$varhash{\"VERSION\"} = $version if (not $name =~ /\\$\\{?VERSION}?/);\n+        $varhash{\"PACKAGE_BUGREPORT\"} = $bugurl if (defined $bugurl and not $bugurl =~ /\\$\\{?\\w+}?/);\n     }\n \n     # \\s makes this not work, why?\n\n"
  },
  {
    "path": "packages/devel/json-c/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2010-2011 Roman Weber (roman@openelec.tv)\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"json-c\"\nPKG_VERSION=\"0.16\"\nPKG_SHA256=\"c169436bd63a30fce4f9560befccb6bad3d375c8c7e9905ceb4e1f28f2cb24f7\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/json-c/json-c\"\nPKG_URL=\"https://github.com/json-c/json-c/archive/json-c-${PKG_VERSION%-*}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Implements a reference counting object model that allows you to easily construct JSON objects in C.\"\n"
  },
  {
    "path": "packages/devel/json-glib/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"json-glib\"\nPKG_VERSION=\"1.6.6\"\nPKG_SHA256=\"bf4d1cd6c343ce13b9258e6703a0411a3b659887b65877e85a2aa488ae18b865\"\nPKG_LICENSE=\"LGPL-2.1\"\nPKG_SITE=\"https://github.com/GNOME/json-glib\"\nPKG_URL=\"https://github.com/GNOME/json-glib/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain glib glib:host\"\nPKG_LONGDESC=\"JSON-GLib implements a full suite of JSON-related tools using GLib and GObject.\"\n\nPKG_MESON_OPTS_TARGET=\"-Dintrospection=disabled \\\n                       -Dgtk_doc=disabled \\\n                       -Dman=false \\\n                       -Dtests=false\"\n"
  },
  {
    "path": "packages/devel/libaio/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2017 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libaio\"\nPKG_VERSION=\"0.3.113\"\nPKG_SHA256=\"716c7059703247344eb066b54ecbc3ca2134f0103307192e6c2b7dab5f9528ab\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://pagure.io/libaio\"\nPKG_URL=\"https://pagure.io/${PKG_NAME}/archive/${PKG_NAME}-${PKG_VERSION}/${PKG_NAME}-${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Kernel Asynchronous I/O (AIO) Support for Linux.\"\n\nmake_target() {\n  make -C src\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n    cp -PR src/libaio.a ${SYSROOT_PREFIX}/usr/lib\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/include\n    cp -PR src/libaio.h ${SYSROOT_PREFIX}/usr/include\n}\n"
  },
  {
    "path": "packages/devel/libbpf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libbpf\"\nPKG_VERSION=\"1.1.0\"\nPKG_SHA256=\"5da826c968fdb8a2f714701cfef7a4b7078be030cf58b56143b245816301cbb8\"\nPKG_LICENSE=\"LGPL-2.1\"\nPKG_SITE=\"https://github.com/libbpf/libbpf\"\nPKG_URL=\"https://github.com/libbpf/libbpf/archive/refs/tags/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain elfutils\"\nPKG_LONGDESC=\"libbpf supports building BPF CO-RE-enabled applications\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\n  make BUILD_STATIC_ONLY=1 \\\n       PREFIX=${SYSROOT_PREFIX}/usr \\\n       -C src\n}\n\nmakeinstall_target() {\n  make BUILD_STATIC_ONLY=1 \\\n       PREFIX=${SYSROOT_PREFIX}/usr \\\n       -C src install\n}\n"
  },
  {
    "path": "packages/devel/libbpf/patches/libbpf-fix-crosscompile-and-sysroot.patch",
    "content": "diff --git a/src/Makefile b/src/Makefile\nindex 81ea6b8..7ab5f13 100644\n--- a/src/Makefile\n+++ b/src/Makefile\n@@ -67,15 +67,12 @@ INSTALL = install\n DESTDIR ?=\n \n HOSTARCH = $(firstword $(subst -, ,$(shell $(CC) -dumpmachine)))\n-ifeq ($(filter-out %64 %64be %64eb %64le %64el s390x, $(HOSTARCH)),)\n-\tLIBSUBDIR := lib64\n-else\n-\tLIBSUBDIR := lib\n-endif\n+LIBSUBDIR := lib\n \n # By default let the pc file itself use ${prefix} in includedir/libdir so that\n # the prefix can be overridden at runtime (eg: --define-prefix)\n ifndef LIBDIR\n+\tPREFIX_PC := /usr\n \tLIBDIR_PC := $$\\{prefix\\}/$(LIBSUBDIR)\n else\n \tLIBDIR_PC := $(LIBDIR)\n@@ -106,7 +103,7 @@ $(OBJDIR)/libbpf.so.$(LIBBPF_VERSION): $(SHARED_OBJS)\n \t\t  $^ $(ALL_LDFLAGS) -o $@\n \n $(OBJDIR)/libbpf.pc: force\n-\t$(Q)sed -e \"s|@PREFIX@|$(PREFIX)|\" \\\n+\t$(Q)sed -e \"s|@PREFIX@|$(PREFIX_PC)|\" \\\n \t\t-e \"s|@LIBDIR@|$(LIBDIR_PC)|\" \\\n \t\t-e \"s|@VERSION@|$(LIBBPF_VERSION)|\" \\\n \t\t< libbpf.pc.template > $@\ndiff --git a/src/libbpf.pc.template b/src/libbpf.pc.template\nindex b45ed53..fe6ddde 100644\n--- a/src/libbpf.pc.template\n+++ b/src/libbpf.pc.template\n@@ -7,6 +7,6 @@ includedir=${prefix}/include\n Name: libbpf\n Description: BPF library\n Version: @VERSION@\n-Libs: -L${libdir} -lbpf\n+Libs: -L${libdir} -lbpf -lz\n Requires.private: libelf zlib\n Cflags: -I${includedir}\n"
  },
  {
    "path": "packages/devel/libcap/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2010-2011 Roman Weber (roman@openelec.tv)\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libcap\"\nPKG_VERSION=\"2.66\"\nPKG_SHA256=\"15c40ededb3003d70a283fe587a36b7d19c8b3b554e33f86129c059a4bb466b2\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://git.kernel.org/pub/scm/libs/libcap/libcap.git/log/\"\nPKG_URL=\"https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A library for getting and setting POSIX.1e capabilities.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\npost_unpack() {\n  mkdir -p ${PKG_BUILD}/.${HOST_NAME}\n  cp -r ${PKG_BUILD}/* ${PKG_BUILD}/.${HOST_NAME}\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n  cp -r ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}\n}\n\nmake_host() {\n  cd ${PKG_BUILD}/.${HOST_NAME}\n  make CC=${CC} \\\n       AR=${AR} \\\n       RANLIB=${RANLIB} \\\n       CFLAGS=\"${HOST_CFLAGS}\" \\\n       BUILD_CFLAGS=\"${HOST_CFLAGS} -I${PKG_BUILD}/libcap/include\" \\\n       PAM_CAP=no \\\n       lib=/lib \\\n       USE_GPERF=no \\\n       -C libcap libcap.pc libcap.a\n}\n\nmake_target() {\n  cd ${PKG_BUILD}/.${TARGET_NAME}\n  make CC=${CC} \\\n       AR=${AR} \\\n       RANLIB=${RANLIB} \\\n       CFLAGS=\"${TARGET_CFLAGS}\" \\\n       BUILD_CC=${HOST_CC} \\\n       BUILD_CFLAGS=\"${HOST_CFLAGS} -I${PKG_BUILD}/libcap/include\" \\\n       PAM_CAP=no \\\n       lib=/lib \\\n       USE_GPERF=no \\\n       -C libcap libcap.pc libcap.a\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/lib\n    cp libcap/libcap.a ${TOOLCHAIN}/lib\n\n  mkdir -p ${TOOLCHAIN}/lib/pkgconfig\n    cp libcap/libcap.pc ${TOOLCHAIN}/lib/pkgconfig\n\n  mkdir -p ${TOOLCHAIN}/include/sys\n    cp libcap/include/sys/capability.h ${TOOLCHAIN}/include/sys\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n    cp libcap/libcap.a ${SYSROOT_PREFIX}/usr/lib\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n    cp libcap/libcap.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/sys\n    cp libcap/include/sys/capability.h ${SYSROOT_PREFIX}/usr/include/sys\n}\n"
  },
  {
    "path": "packages/devel/libcec/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libcec\"\nPKG_VERSION=\"6.0.2\"\nPKG_SHA256=\"090696d7a4fb772d7acebbb06f91ab92e025531c7c91824046b9e4e71ecb3377\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://libcec.pulse-eight.com/\"\nPKG_URL=\"https://github.com/Pulse-Eight/libcec/archive/libcec-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain systemd p8-platform swig:host\"\nPKG_LONGDESC=\"libCEC is an open-source dual licensed library designed for communicating with the Pulse-Eight USB - CEC Adaptor.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_SHARED_LIBS=1 \\\n                       -DCMAKE_INSTALL_LIBDIR:STRING=lib \\\n                       -DCMAKE_INSTALL_LIBDIR_NOARCH:STRING=lib \\\n                       -DSKIP_PYTHON_WRAPPER=1 \\\n                       -DHAVE_IMX_API=0 \\\n                       -DHAVE_GIT_BIN=0 \\\n                       -DHAVE_RPI_LIB=0\"\n\nif [ \"${KODIPLAYER_DRIVER}\" = \"libamcodec\" ]; then\n  PKG_CMAKE_OPTS_TARGET=\"${PKG_CMAKE_OPTS_TARGET} -DHAVE_AOCEC_API=1\"\nelse\n  PKG_CMAKE_OPTS_TARGET=\"${PKG_CMAKE_OPTS_TARGET} -DHAVE_AOCEC_API=0 -DHAVE_AMLOGIC_API=0\"\nfi\n\n# libX11 and xrandr to read the sink's EDID, used to determine the PC's HDMI physical address\nif [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n  PKG_DEPENDS_TARGET+=\" libX11 libXrandr\"\nfi\n\nif [ \"${CEC_FRAMEWORK_SUPPORT}\" = \"yes\" ]; then\n  PKG_CMAKE_OPTS_TARGET+=\" -DHAVE_LINUX_API=1\"\nelse\n  PKG_CMAKE_OPTS_TARGET+=\" -DHAVE_LINUX_API=0\"\nfi\n\npost_makeinstall_target() {\n  # Remove the Python3 demo - useless for us\n  rm -f ${INSTALL}/usr/bin/pyCecClient\n\n  # Remove the sysmlink and redirect to /var/lib so that we can change libcec versions at run time\n  rm -f ${INSTALL}/usr/lib/libcec.so.6\n  ln -sf /var/lib/libcec.so.6 ${INSTALL}/usr/lib/libcec.so.6\n\n\tPYTHON_DIR=${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}\n  if [ -d ${PYTHON_DIR}/dist-packages ]; then\n    mv ${PYTHON_DIR}/dist-packages ${PYTHON_DIR}/site-packages\n  fi\n}\n"
  },
  {
    "path": "packages/devel/libdaemon/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"libdaemon\"\nPKG_VERSION=\"0.14\"\nPKG_SHA256=\"fd23eb5f6f986dcc7e708307355ba3289abe03cc381fc47a80bca4a50aa6b834\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://0pointer.de/lennart/projects/libdaemon/\"\nPKG_URL=\"http://0pointer.de/lennart/projects/libdaemon/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A lightweight C library which eases the writing of UNIX daemons.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_func_setpgrp_void=no \\\n                           --enable-static \\\n                           --disable-shared \\\n                           --disable-lynx\"\n"
  },
  {
    "path": "packages/devel/libevent/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"libevent\"\nPKG_VERSION=\"2.1.11-stable\"\nPKG_SHA256=\"a65bac6202ea8c5609fd5c7e480e6d25de467ea1917c08290c521752f147283d\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://libevent.org\"\nPKG_URL=\"https://github.com/libevent/libevent/releases/download/release-$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain openssl\"\nPKG_LONGDESC=\"The libevent API provides a mechanism to execute a callback function when a specific event occurs.\"\nPKG_TOOLCHAIN=\"configure\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-static \\\n                           --disable-libevent-regress \\\n                           --disable-samples \\\n                           --enable-openssl\"\n\npost_unpack() {\n  # https://github.com/libevent/libevent/issues/863\n  #  Uninstall.cmake.in is missing from 2.1.11 release\n  touch $PKG_BUILD/cmake/Uninstall.cmake.in\n}\n\npost_makeinstall_target() {\n  rm -f $INSTALL/usr/bin/event_rpcgen.py\n}\n"
  },
  {
    "path": "packages/devel/libffi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libffi\"\nPKG_VERSION=\"3.4.4\"\nPKG_SHA256=\"d66c56ad259a82cf2a9dfc408b32bf5da52371500b84745f7fb8b645712df676\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://sourceware.org/${PKG_NAME}/\"\nPKG_URL=\"https://github.com/libffi/libffi/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host autoconf:host automake:host libtool:host pkg-config:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Foreign Function Interface Library.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-debug \\\n                           --enable-static --disable-shared \\\n                           --with-pic \\\n                           --enable-structs \\\n                           --enable-raw-api \\\n                           --disable-purify-safety \\\n                           --with-gnu-ld\"\n"
  },
  {
    "path": "packages/devel/libffi/patches/libffi-Fix-installation-location-of-libffi.patch",
    "content": "From 102c02de867bfe831b5366c89d66bcf170db962e Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Thu, 7 Feb 2013 22:26:56 +0100\nSubject: [PATCH] Fix installation location of libffi\n\nThe libffi is currently declared as toolexeclib_LTLIBRARIES. In many\ncases, toolexeclib libraries will be installed in /usr/lib, so it\ndoesn't make any difference.\n\nHowever, with multilib toolchains, they get installed in a\nsubdirectory of /usr/lib/. For example, with a Sourcery CodeBench\nPowerPC toolchain, if the e500mc multilib variant is used, the libffi\nlibrary gets installed in /usr/lib/te500mc/. This is due to the\nfollowing code in the configure script:\n\n  multi_os_directory=`$CC -print-multi-os-directory`\n  case $multi_os_directory in\n    .) ;; # Avoid trailing /.\n    *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;\n  esac\n\nOnce the library is installed in /usr/lib/te500mc/, nothing works\nbecause this installation location is inconsistent with the\ninstallation location declared in libffi.pc.\n\nSo, instead of using this bizarre toolexeclib_LTLIBRARIES, simply use\nthe more standard lib_LTLIBRARIES, which ensures that the libffi\nlibrary is always installed in /usr/lib.\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n---\n Makefile.am |    2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile.am b/Makefile.am\nindex 6f669ca..b60bcc1 100644\n--- a/Makefile.am\n+++ b/Makefile.am\n@@ -93,7 +93,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS)\n \n MAKEOVERRIDES=\n \n-toolexeclib_LTLIBRARIES = libffi.la\n+lib_LTLIBRARIES = libffi.la\n noinst_LTLIBRARIES = libffi_convenience.la\n \n libffi_la_SOURCES = src/prep_cif.c src/types.c \\\n-- \n1.7.9.5\n\n"
  },
  {
    "path": "packages/devel/libffi/patches/libffi-fix-pkgconf.patch",
    "content": "From a2d10693e352db0cdfc22550f23f8294564ce939 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Sat, 16 Aug 2014 12:26:53 +0300\nSubject: [PATCH] fix pkgconf\n\n---\n libffi.pc.in |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/libffi.pc.in b/libffi.pc.in\nindex 1477a66..1dd4ebd 100644\n--- a/libffi.pc.in\n+++ b/libffi.pc.in\n@@ -7,5 +7,5 @@ includedir=@includedir@/@PACKAGE_NAME@\n Name: @PACKAGE_NAME@\n Description: Library supporting Foreign Function Interfaces\n Version: @PACKAGE_VERSION@\n-Libs: -L${toolexeclibdir} -lffi\n+Libs: -L${libdir} -lffi\n Cflags: -I${includedir}\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/devel/libfmt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libfmt\"\nPKG_VERSION=\"9.1.0\"\nPKG_SHA256=\"5dea48d1fcddc3ec571ce2058e13910a0d4a6bab4cc09a809d8b1dd1c88ae6f2\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://github.com/fmtlib/fmt\"\nPKG_URL=\"https://github.com/fmtlib/fmt/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"fmt is an open-source formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DCMAKE_CXX_STANDARD=14 \\\n                       -DCMAKE_CXX_EXTENSIONS:BOOL=OFF \\\n                       -DFMT_DOC=OFF \\\n                       -DFMT_INSTALL=ON \\\n                       -DFMT_TEST=OFF \\\n                       -DBUILD_SHARED_LIBS=ON\"\n"
  },
  {
    "path": "packages/devel/libfstrcmp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libfstrcmp\"\nPKG_VERSION=\"0.7.D001\"\nPKG_SHA256=\"e4018e850f80700acee8da296e56e15b1eef711ab15157e542e7d7e1237c3476\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://fstrcmp.sourceforge.net/\"\nPKG_URL=\"https://downloads.sourceforge.net/project/fstrcmp/fstrcmp/$(get_pkg_version_maj_min)/fstrcmp-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"The fstrcmp project provides a library that is used to make fuzzy comparisons of strings and byte arrays, including multi-byte character strings.\"\n\npre_configure_target() {\n  cd \"${PKG_BUILD}\"\n}\n\nmake_target() {\n  make all-bin\n}\n\nmakeinstall_target() {\n  make DESTDIR=\"${SYSROOT_PREFIX}\" install-include install-libdir\n}\n"
  },
  {
    "path": "packages/devel/libftdi1/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libftdi1\"\nPKG_VERSION=\"1.5\"\nPKG_SHA256=\"7c7091e9c86196148bd41177b4590dccb1510bfe6cea5bf7407ff194482eb049\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"http://www.intra2net.com/en/developer/libftdi/\"\nPKG_URL=\"http://www.intra2net.com/en/developer/libftdi/download/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libusb libconfuse\"\nPKG_LONGDESC=\"libFTDI is an open source library to talk to FTDI chips\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DSTATICLIBS=ON \\\n                       -DDOCUMENTATION=FALSE \\\n                       -DEXAMPLES=FALSE \\\n                       -DFTDIPP=FALSE \\\n                       -DPYTHON_BINDINGS=FALSE\"\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/libftdi1\n    cp ../src/ftdi.h ${SYSROOT_PREFIX}/usr/include/libftdi1\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n    cp src/libftdi1.a ${SYSROOT_PREFIX}/usr/lib\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n    cp libftdi1.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n}\n"
  },
  {
    "path": "packages/devel/libirman/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libirman\"\nPKG_VERSION=\"0.5.2\"\nPKG_SHA256=\"43e58d7cd22b3a4c4dc8dcf8542a269ebcb4d8f6ceea0577b9fc882898f09a47\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://sourceforge.net/projects/libirman\"\nPKG_URL=\"http://downloads.sourceforge.net/project/libirman/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain systemd lirc\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory lirc)\"\nPKG_LONGDESC=\"libirman library for lircd\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic -parallel\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-swtest\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/devel/libirman/patches/libirman-0001-fix-poll-include.patch",
    "content": "diff -Naur a/config.h.in b/config.h.in\n--- a/config.h.in\t2016-05-18 18:19:56.000000000 +0200\n+++ b/config.h.in\t2016-12-26 22:49:43.514203152 +0100\n@@ -21,6 +21,9 @@\n /* Define to 1 if you have the `mkfifo' function. */\n #undef HAVE_MKFIFO\n \n+/* defined if poll.h is available */\n+#undef HAVE_POLL_H\n+\n /* Define to 1 if you have the `select' function. */\n #undef HAVE_SELECT\n \n@@ -48,6 +51,9 @@\n /* Define to 1 if you have the <sys/file.h> header file. */\n #undef HAVE_SYS_FILE_H\n \n+/* defined if sys/poll.h is available */\n+#undef HAVE_SYS_POLL_H\n+\n /* Define to 1 if you have the <sys/stat.h> header file. */\n #undef HAVE_SYS_STAT_H\n \ndiff -Naur a/configure.ac b/configure.ac\n--- a/configure.ac\t2016-05-18 18:19:41.000000000 +0200\n+++ b/configure.ac\t2016-12-26 22:48:40.190031280 +0100\n@@ -20,7 +20,7 @@\n \n dnl Checks for header files.\n AC_HEADER_STDC\n-AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h termios.h memory.hi sys/file.h)\n+AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h termios.h memory.hi sys/file.h poll.h sys/poll.h)\n \n dnl Checks for typedefs, structures, and compiler characteristics.\n AC_TYPE_PID_T\n"
  },
  {
    "path": "packages/devel/libplist/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"libplist\"\nPKG_VERSION=\"2.2.0\"\nPKG_SHA256=\"4a5517e5377ec421df84c586ba85bb4e1d26f11ad203d7d450a907c0156fbd9a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.libimobiledevice.org/\"\nPKG_URL=\"https://github.com/libimobiledevice/libplist/releases/download/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain glib\"\nPKG_LONGDESC=\"libplist is a library for manipulating Apple Binary and XML Property Lists\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--without-cython\"\n\npre_configure_target() {\n  # work around bashism in configure script\n  export CONFIG_SHELL=\"/bin/bash\"\n}\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/devel/libpthread-stubs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"libpthread-stubs\"\nPKG_VERSION=\"0.4\"\nPKG_SHA256=\"50d5686b79019ccea08bcbd7b02fe5a40634abcfd4146b6e75c6420cc170e9d9\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://xcb.freedesktop.org/\"\nPKG_URL=\"http://xcb.freedesktop.org/dist/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A library providing weak aliases for pthread functions.\"\n"
  },
  {
    "path": "packages/devel/libtool/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libtool\"\nPKG_VERSION=\"2.4.6\"\nPKG_SHA256=\"e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.gnu.org/software/libtool/\"\nPKG_URL=\"http://ftpmirror.gnu.org/libtool/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host autoconf:host automake:host intltool:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A generic library support script.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--enable-static --disable-shared\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n  rm -rf ${INSTALL}/usr/share\n}\n"
  },
  {
    "path": "packages/devel/libtool/patches/libtool-01_dont_relink_against_host.patch",
    "content": "diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh\nindex 5eca4ae..23901ff 100644\n--- a/build-aux/ltmain.sh\n+++ b/build-aux/ltmain.sh\n@@ -8333,7 +8333,7 @@ func_mode_link ()\n \t      fi\n \t    else\n \t      # We cannot seem to hardcode it, guess we'll fake it.\n-\t      add_dir=-L$libdir\n+\t      #add_dir=-L$libdir\n \t      # Try looking first in the location we're being installed to.\n \t      if test -n \"$inst_prefix_dir\"; then\n \t\tcase $libdir in\n"
  },
  {
    "path": "packages/devel/libtool/patches/libtool-02-use_ld.patch",
    "content": "diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh\nindex 23901ff..df26ab5 100644\n--- a/build-aux/ltmain.sh\n+++ b/build-aux/ltmain.sh\n@@ -7250,7 +7250,7 @@ func_mode_link ()\n       # -stdlib=*            select c++ std lib with clang\n       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \\\n       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \\\n-      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)\n+      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*|-fuse-ld=*)\n         func_quote_for_eval \"$arg\"\n \targ=$func_quote_for_eval_result\n         func_append compile_command \" $arg\"\n"
  },
  {
    "path": "packages/devel/libtool/patches/libtool-03-remove-help2man-dependency.patch",
    "content": "diff -Naur a/Makefile.am b/Makefile.am\n--- a/Makefile.am\t2015-01-20 07:34:33.000000000 -0800\n+++ b/Makefile.am\t2015-10-27 11:16:49.027497480 -0700\n@@ -406,22 +406,6 @@\n \t$(AM_V_GEN)$(MAKEINFO) -P '$(srcdir)/doc' --no-headers \\\n \t    $(MAKEINFOFLAGS) -o '$@' '$(notes_texi)'\n \n-dist_man1_MANS\t\t= $(libtool_1) $(libtoolize_1)\n-MAINTAINERCLEANFILES\t+= $(dist_man1_MANS)\n-update_mans = \\\n-  PATH=\".$(PATH_SEPARATOR)$$PATH\"; export PATH; \\\n-  $(HELP2MAN) --output='$@'\n-\n-# It's wrong to make distributed files (e.g. $(libtool_1)) rely on\n-# files created in the build tree, so instead we regenerate the\n-# manual pages if the sources for the build-tree files we want to\n-# run have changed.\n-$(libtool_1): $(ltmain_sh)\n-\t$(AM_V_GEN)$(update_mans) --help-option=--help-all libtool\n-$(libtoolize_1): $(libtoolize_in)\n-\t$(AM_V_GEN)$(update_mans) libtoolize\n-\n-\n ## ------------- ##\n ## Installation. ##\n ## ------------- ##\n"
  },
  {
    "path": "packages/devel/m4/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"m4\"\nPKG_VERSION=\"1.4.19\"\nPKG_SHA256=\"b306a91c0fd93bc4280cfc2e98cb7ab3981ff75a187bea3293811f452c89a8c8\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.gnu.org/software/m4/\"\nPKG_URL=\"http://ftpmirror.gnu.org/m4/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"The m4 macro processor.\"\n\nPKG_CONFIGURE_OPTS_HOST=\"gl_cv_func_gettimeofday_clobber=no --target=${TARGET_NAME}\"\n\npost_makeinstall_host() {\n  make prefix=${SYSROOT_PREFIX}/usr install\n}\n"
  },
  {
    "path": "packages/devel/make/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"make\"\nPKG_VERSION=\"4.4.1\"\nPKG_SHA256=\"dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://www.gnu.org/software/make/\"\nPKG_URL=\"http://ftpmirror.gnu.org/make/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"\"\nPKG_LONGDESC=\"Utility to maintain groups of programs.\"\nPKG_BUILD_FLAGS=\"+local-cc\"\n\npost_makeinstall_host() {\n  ln -sf make ${TOOLCHAIN}/bin/gmake\n}\n"
  },
  {
    "path": "packages/devel/make/patches/make-02-fix-large-command-line-on-POSIX-systems.patch",
    "content": "From e249c43741779ae7dd6834f6840384257d4c3dd8 Mon Sep 17 00:00:00 2001\nFrom: Mike Crowe <mac@mcrowe.com>\nDate: Fri, 6 Nov 2020 15:22:37 +0000\nSubject: [PATCH] [SV 45763] Fix large command line on POSIX systems\n\nWhen presented with a very long command line (as is common when linking\na large number of files with absolute paths in a deep subdirectory),\nmake fails to execute the command as it doesn't split the command line\nto fit within the limits.\n\nThis is based on a fix for Debian bug 688601[1] by Adam Conrad applied\nby Manoj Srivastava originally applied for Debian make-dfsg 4.0-5 in\n2014 but dropped in 2018 (it seems under the incorrect assumption that\nit had been accepted upstream.)\n\nI've tweaked Adam's original patch so that it compiles successfully with\n-Werror on top of current master. This required:\n\n* moving the eval_line declaration to the top of the block, so I moved\n  the macros too\n* using a const variable when iterating over the shell\n* adding a cast to avoid a signed/unsigned mismatch.\n\nAs suggested in the Savannah bug report[2], I've added a test case that\nfails without the rest of the patch. I'm not sure what the consequences\nof running the test on non-POSIX targets would be and whether it needs\nmarking as an expected failure.\n\n* src/job.c (construct_command_argv_internal): support running commands\nlonger than MAX_ARG_STRLEN\n* tests/scripts/features/long_command_line: add test for such a command\n* configure.ac: check for now-required sys/user.h and linux/binfmts.h\nheaders\n\n[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688601\n[2] https://savannah.gnu.org/bugs/?45763#comment2\n---\n src/job.c                                | 52 +++++++++++++++++++++++-\n tests/scripts/features/long_command_line | 30 ++++++++++++++\n 2 files changed, 81 insertions(+), 1 deletions(-)\n create mode 100644 tests/scripts/features/long_command_line\n\ndiff --git a/src/job.c b/src/job.c\nindex 3bcec38..734c591 100644\n--- a/src/job.c\n+++ b/src/job.c\n@@ -26,6 +26,12 @@ this program.  If not, see <http://www.gnu.org/licenses/>.  */\n #include \"variable.h\"\n #include \"os.h\"\n \n+#include <sys/user.h>\n+#include <linux/binfmts.h>\n+#ifndef PAGE_SIZE\n+# define PAGE_SIZE (sysconf(_SC_PAGESIZE))\n+#endif\n+\n /* Default shell to use.  */\n #ifdef WINDOWS32\n # ifdef HAVE_STRINGS_H\n@@ -3228,6 +3236,15 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,\n     size_t sflags_len = shellflags ? strlen (shellflags) : 0;\n #ifdef WINDOWS32\n     char *command_ptr = NULL; /* used for batch_mode_shell mode */\n+#endif\n+    char *args_ptr;\n+#ifdef MAX_ARG_STRLEN\n+    static char eval_line[] = \"eval\\\\ \\\\\\\"set\\\\ x\\\\;\\\\ shift\\\\;\\\\ \";\n+#define ARG_NUMBER_DIGITS 5\n+#define EVAL_LEN (sizeof(eval_line)-1 + shell_len + 4                   \\\n+                  + (7 + ARG_NUMBER_DIGITS) * 2 * line_len / (MAX_ARG_STRLEN - 2))\n+#else\n+#define EVAL_LEN 0\n #endif\n \n # ifdef __EMX__ /* is this necessary? */\n@@ -3395,7 +3412,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,\n       }\n \n     new_line = xmalloc ((shell_len*2) + 1 + sflags_len + 1\n-                        + (line_len*2) + 1);\n+                        + (line_len*2) + 1 + EVAL_LEN);\n     ap = new_line;\n     /* Copy SHELL, escaping any characters special to the shell.  If\n        we don't escape them, construct_command_argv_internal will\n@@ -3415,6 +3432,31 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,\n #ifdef WINDOWS32\n     command_ptr = ap;\n #endif\n+\n+#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN)\n+    if (unixy_shell && line_len > MAX_ARG_STRLEN)\n+      {\n+       const char *q;\n+       unsigned j;\n+       memcpy (ap, eval_line, sizeof (eval_line) - 1);\n+       ap += sizeof (eval_line) - 1;\n+       for (j = 1; j <= 2 * line_len / (MAX_ARG_STRLEN - 2); j++)\n+         ap += sprintf (ap, \"\\\\$\\\\{%u\\\\}\", j);\n+       *ap++ = '\\\\';\n+       *ap++ = '\"';\n+       *ap++ = ' ';\n+       /* Copy only the first word of SHELL to $0.  */\n+       for (q = shell; *q != '\\0'; ++q)\n+         {\n+           if (isspace ((unsigned char)*q))\n+             break;\n+           *ap++ = *q;\n+         }\n+       *ap++ = ' ';\n+      }\n+#endif\n+    args_ptr = ap;\n+\n     for (p = line; *p != '\\0'; ++p)\n       {\n         if (restp != NULL && *p == '\\n')\n@@ -3462,6 +3504,14 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,\n           }\n #endif\n         *ap++ = *p;\n+#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN)\n+        if (unixy_shell && line_len > MAX_ARG_STRLEN\n+            && (ap - args_ptr > (long)(MAX_ARG_STRLEN - 2)))\n+         {\n+           *ap++ = ' ';\n+           args_ptr = ap;\n+         }\n+#endif\n       }\n     if (ap == new_line + shell_len + sflags_len + 2)\n       {\ndiff --git a/tests/scripts/features/long_command_line b/tests/scripts/features/long_command_line\nnew file mode 100644\nindex 0000000..3899ac8\n--- /dev/null\n+++ b/tests/scripts/features/long_command_line\n@@ -0,0 +1,30 @@\n+#                                                                    -*-perl-*-\n+$description = \"Test long command line.\";\n+\n+$details = \"\";\n+\n+# Variable names containing UTF8 characters\n+run_make_test(q!\n+# 49 characters\n+ARGS:=one two three four five six seven eight niner ten\n+# 49*4+3 = 199 characters\n+ARGS:=$(ARGS) $(ARGS) $(ARGS) $(ARGS)\n+# 199*4+3 = 799 characters\n+ARGS:=$(ARGS) $(ARGS) $(ARGS) $(ARGS)\n+# 799*4+3 = 3199 characters\n+ARGS:=$(ARGS) $(ARGS) $(ARGS) $(ARGS)\n+# 3199*4+3 = 12799 characters\n+ARGS:=$(ARGS) $(ARGS) $(ARGS) $(ARGS)\n+# 12799*4+3 = 51199 characters\n+ARGS:=$(ARGS) $(ARGS) $(ARGS) $(ARGS)\n+# 51199*4+3 = 204799 characters\n+ARGS:=$(ARGS) $(ARGS) $(ARGS) $(ARGS)\n+# 24799*2+1 = 409599 characters\n+#ARGS:=$(ARGS) $(ARGS)\n+\n+test:\n+\t@: $(ARGS)\n+!,\n+              '', \"\");\n+\n+1;\n-- \n2.20.1\n\n"
  },
  {
    "path": "packages/devel/mimalloc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mimalloc\"\nPKG_VERSION=\"2.0.9\"\nPKG_SHA256=\"4a29edae32a914a706715e2ac8e7e4109e25353212edeed0888f4e3e15db5850\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/microsoft/mimalloc\"\nPKG_URL=\"https://github.com/microsoft/mimalloc/archive/refs/tags/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"cmake:host ninja:host\"\nPKG_LONGDESC=\"mimalloc (pronounced \"me-malloc\") is a general purpose allocator with excellent performance characteristics\"\n\nPKG_CMAKE_OPTS_HOST=\"-DMI_SECURE=OFF \\\n                     -DMI_DEBUG_FULL=OFF \\\n                     -DMI_OVERRIDE=ON \\\n                     -DMI_XMALLOC=OFF \\\n                     -DMI_SHOW_ERRORS=OFF \\\n                     -DMI_USE_CXX=OFF \\\n                     -DMI_SEE_ASM=OFF \\\n                     -DMI_LOCAL_DYNAMIC_TLS=OFF \\\n                     -DMI_BUILD_SHARED=ON \\\n                     -DMI_BUILD_STATIC=OFF \\\n                     -DMI_BUILD_OBJECT=OFF \\\n                     -DMI_BUILD_TESTS=OFF \\\n                     -DMI_DEBUG_TSAN=OFF \\\n                     -DMI_DEBUG_UBSAN=OFF \\\n                     -DMI_SKIP_COLLECT_ON_EXIT=OFF\"\n"
  },
  {
    "path": "packages/devel/mold/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mold\"\nPKG_VERSION=\"1.10.1\"\nPKG_SHA256=\"19e4aa16b249b7e6d2e0897aa1843a048a0780f5c76d8d7e643ab3a4be1e4787\"\nPKG_LICENSE=\"AGPL-3.0-or-later\"\nPKG_SITE=\"https://github.com/rui314/mold\"\nPKG_URL=\"https://github.com/rui314/mold/archive/refs/tags/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"cmake:host zlib:host zstd:host openssl:host tbb:host mimalloc:host\"\nPKG_LONGDESC=\"mold is a faster drop-in replacement for existing Unix linkers\"\n\nPKG_CMAKE_OPTS_HOST=\"-DCMAKE_INSTALL_LIBDIR=\"${TOOLCHAIN}/${TARGET_NAME}/lib\"\n                     -DCMAKE_INSTALL_BINDIR=\"${TARGET_NAME}/bin\" \\\n                     -DCMAKE_INSTALL_LIBEXECDIR=\"${TARGET_NAME}\" \\\n                     -DMOLD_LTO=ON \\\n                     -DMOLD_MOSTLY_STATIC=ON \\\n                     -DMOLD_USE_SYSTEM_MIMALLOC=ON \\\n                     -DMOLD_USE_SYSTEM_TBB=ON\"\n\npost_makeinstall_host() {\n  ln -sf ${TOOLCHAIN}/${TARGET_NAME}/bin/mold ${TARGET_PREFIX}ld.mold\n}\n"
  },
  {
    "path": "packages/devel/mold/patches/mold-999.01-PR740-allow-custom-mold-binary-install-path.patch",
    "content": "From f7f2ef6182d058f7c58401d9278aa3136cb996f5 Mon Sep 17 00:00:00 2001\nFrom: SupervisedThinking <supervisedthinking@gmail.com>\nDate: Thu, 29 Sep 2022 11:49:57 +0200\nSubject: [PATCH] CMakeLists: allow custom mold binary install path\n\n- https://cmake.org/cmake/help/latest/command/install.html\n- ${CMAKE_INSTALL_BINDIR} defaults to bin if not set\n---\n CMakeLists.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/CMakeLists.txt b/CMakeLists.txt\nindex 7136cf2b..4542f915 100644\n--- a/CMakeLists.txt\n+++ b/CMakeLists.txt\n@@ -287,7 +287,7 @@ if(BUILD_TESTING)\n endif()\n \n if(NOT CMAKE_SKIP_INSTALL_RULES)\n-  install(TARGETS mold RUNTIME DESTINATION bin)\n+  install(TARGETS mold RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})\n   install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})\n   install(FILES docs/mold.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/)\n   install(CODE \"\n"
  },
  {
    "path": "packages/devel/mpc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mpc\"\nPKG_VERSION=\"1.3.1\"\nPKG_SHA256=\"ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://www.multiprecision.org\"\nPKG_URL=\"http://ftpmirror.gnu.org/mpc/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host gmp:host mpfr:host\"\nPKG_LONGDESC=\"A C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result.\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--target=${TARGET_NAME} \\\n                         --enable-static --disable-shared \\\n                         --with-gmp=${TOOLCHAIN} \\\n                         --with-mpfr=${TOOLCHAIN}\"\n"
  },
  {
    "path": "packages/devel/mpfr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mpfr\"\nPKG_VERSION=\"4.1.1\"\nPKG_SHA256=\"ffd195bd567dbaffc3b98b23fd00aad0537680c9896171e44fe3ff79e28ac33d\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"http://www.mpfr.org/\"\nPKG_URL=\"http://ftpmirror.gnu.org/mpfr/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host gmp:host\"\nPKG_LONGDESC=\"A C library for multiple-precision floating-point computations with exact rounding.\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--target=${TARGET_NAME} \\\n                         --enable-static --disable-shared \\\n                         --prefix=${TOOLCHAIN} \\\n                         --with-gmp-lib=${TOOLCHAIN}/lib \\\n                         --with-gmp-include=${TOOLCHAIN}/include\"\n"
  },
  {
    "path": "packages/devel/ncurses/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ncurses\"\nPKG_VERSION=\"6.3\"\nPKG_SHA256=\"97fc51ac2b085d4cde31ef4d2c3122c21abc217e9090a43a30fc5ec21684e059\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"http://www.gnu.org/software/ncurses/\"\nPKG_URL=\"http://invisible-mirror.net/archives/ncurses/ncurses-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_DEPENDS_TARGET=\"toolchain zlib ncurses:host\"\nPKG_LONGDESC=\"A library is a free software emulation of curses in System V Release 4.0, and more.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--without-ada \\\n                           --without-cxx \\\n                           --without-cxx-binding \\\n                           --disable-db-install \\\n                           --without-manpages \\\n                           --without-progs \\\n                           --without-tests \\\n                           --without-shared \\\n                           --with-normal \\\n                           --without-debug \\\n                           --without-profile \\\n                           --without-ticlib \\\n                           --without-gpm \\\n                           --without-dbmalloc \\\n                           --without-dmalloc \\\n                           --disable-rpath \\\n                           --disable-database \\\n                           --with-fallbacks=linux,screen,xterm,xterm-color,dumb,st-256color \\\n                           --with-termpath=/storage/.config/termcap \\\n                           --disable-big-core \\\n                           --enable-termcap \\\n                           --enable-getcap \\\n                           --disable-getcap-cache \\\n                           --enable-symlinks \\\n                           --disable-bsdpad \\\n                           --without-rcs-ids \\\n                           --enable-ext-funcs \\\n                           --disable-const \\\n                           --enable-no-padding \\\n                           --disable-sigwinch \\\n                           --enable-pc-files \\\n                           --with-pkg-config-libdir=/usr/lib/pkgconfig \\\n                           --disable-tcap-names \\\n                           --without-develop \\\n                           --disable-hard-tabs \\\n                           --disable-xmc-glitch \\\n                           --disable-hashmap \\\n                           --disable-safe-sprintf \\\n                           --disable-scroll-hints \\\n                           --enable-widec \\\n                           --disable-echo \\\n                           --disable-warnings \\\n                           --disable-home-terminfo \\\n                           --disable-assertions \\\n                           --enable-leaks\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--enable-termcap \\\n                         --with-shared \\\n                         --enable-pc-files \\\n                         --without-manpages \\\n                         --without-tests\"\n\npost_makeinstall_target() {\n  local f\n  cp misc/ncurses-config ${TOOLCHAIN}/bin\n  chmod +x ${TOOLCHAIN}/bin/ncurses-config\n  sed -e \"s:\\(['=\\\" ]\\)/usr:\\\\1${PKG_ORIG_SYSROOT_PREFIX}/usr:g\" -i ${TOOLCHAIN}/bin/ncurses-config\n  rm -f ${TOOLCHAIN}/bin/ncurses6-config\n  rm -rf ${INSTALL}/usr/bin\n  # create links to be compatible with any ncurses include path and lib names\n  ln -sf . ${SYSROOT_PREFIX}/usr/include/ncursesw\n  ln -sf . ${SYSROOT_PREFIX}/usr/include/ncurses\n  for f in form menu ncurses panel; do\n    ln -sf lib${f}w.a ${SYSROOT_PREFIX}/usr/lib/lib${f}.a\n    ln -sf ${f}w.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig/${f}.pc\n  done\n}\n"
  },
  {
    "path": "packages/devel/ncurses/patches/ncurses-001-terminfo-xterm.patch",
    "content": "\nRemove recent xterm terminfo features to be compatible with other emulations\n\n--- a/misc/terminfo.src\t2021-03-20 22:45:39.000000000 +0100\n+++ b/misc/terminfo.src\t2021-06-01 23:53:10.335516419 +0200\n@@ -4808,8 +4808,8 @@ xterm-xfree86|xterm terminal emulator (X\n xterm+nofkeys|building block for xterm fkey-variants,\n \tnpc,\n \tkcbt=\\E[Z, kent=\\EOM, nel=\\EE, use=ecma+index,\n-\tuse=ansi+rep, use=ecma+strikeout, use=vt420+lrmm,\n-\tuse=xterm+sm+1006, use=xterm+tmux, use=ecma+italics,\n+\tuse=ecma+strikeout, use=vt420+lrmm,\n+\tuse=xterm+sm+1005, use=xterm+tmux, use=ecma+italics,\n \tuse=xterm+keypad, use=xterm-basic,\n \n # This version reflects the current xterm features.\n"
  },
  {
    "path": "packages/devel/ncurses/patches/ncurses-002-alloc-fallbacks.patch",
    "content": "Fix freeing not allocated fallback entries by allocating a copy.\n\n--- a/ncurses/tinfo/tinfo_driver.c\t2018-11-24 23:17:03.000000000 +0100\n+++ b/ncurses/tinfo/tinfo_driver.c\t2018-12-29 10:27:19.000000000 +0100\n@@ -180,6 +180,8 @@ drv_CanHandle(TERMINAL_CONTROL_BLOCK * T\n     if (status != TGETENT_YES) {\n \tconst TERMTYPE2 *fallback = _nc_fallback2(tname);\n \n+\tif (fallback)\n+            fallback = _nc_copy_entry(fallback);\n \tif (fallback) {\n \t    T((\"found fallback entry\"));\n \t    TerminalType(termp) = *fallback;\n"
  },
  {
    "path": "packages/devel/ncurses/patches/ncurses-003-fix_hints.patch",
    "content": "Fix USE_SCROLL_HINTS/USE_HASHMAP logic\n\n--- a/ncurses/curses.priv.h\t2018-12-16 02:16:58.000000000 +0100\n+++ a/ncurses/curses.priv.h\t2021-05-30 00:12:14.086528124 +0200\n@@ -258,10 +258,9 @@ extern NCURSES_EXPORT(void *) _nc_memmov\n /*\n  * Scroll hints are useless when hashmap is used\n  */\n-#if !USE_SCROLL_HINTS\n-#if !USE_HASHMAP\n-#define USE_SCROLL_HINTS 1\n-#else\n+#if USE_SCROLL_HINTS\n+#if USE_HASHMAP\n+#undef USE_SCROLL_HINTS\n #define USE_SCROLL_HINTS 0\n #endif\n #endif\n"
  },
  {
    "path": "packages/devel/ncurses/patches/ncurses-004-fix_configure_pkgconfig.patch",
    "content": "Fix configure option --with-pkg-config-libdir is broken for cross compilation\n\n--- a/configure\t2021-10-17 17:12:23.000000000 +0200\n+++ b/configure\t2021-11-26 00:27:00.224815736 +0100\n@@ -4229,7 +4229,7 @@ echo $ECHO_N \"checking for first directo\n cf_pkg_config_path=none\n for cf_config in $cf_search_path\n do\n-\tif test -d \"$cf_config\"\n+\tif test -n \"$cf_config\"\n \tthen\n \t\tcf_pkg_config_path=$cf_config\n \t\tbreak\n"
  },
  {
    "path": "packages/devel/pcre/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pcre\"\nPKG_VERSION=\"8.45\"\nPKG_SHA256=\"4dae6fdcd2bb0bb6c37b5f97c33c2be954da743985369cddac3546e3218bffb8\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.pcre.org/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/pcre/${PKG_NAME}/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain pcre:host\"\nPKG_LONGDESC=\"A set of functions that implement regular expression pattern matching.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--prefix=${TOOLCHAIN} \\\n             --enable-static \\\n             --enable-utf8 \\\n             --enable-unicode-properties \\\n             --with-gnu-ld\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n             --enable-utf8 \\\n             --enable-pcre16 \\\n             --enable-unicode-properties \\\n             --with-gnu-ld\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n  cp ${PKG_NAME}-config ${TOOLCHAIN}/bin\n  sed -e \"s:\\(['= ]\\)/usr:\\\\1${PKG_ORIG_SYSROOT_PREFIX}/usr:g\" -i ${TOOLCHAIN}/bin/${PKG_NAME}-config\n  chmod +x ${TOOLCHAIN}/bin/${PKG_NAME}-config\n}\n"
  },
  {
    "path": "packages/devel/pcre2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pcre2\"\nPKG_VERSION=\"10.42\"\nPKG_SHA256=\"8d36cd8cb6ea2a4c2bb358ff6411b0c788633a2a45dabbf1aeb4b701d1b5e840\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://www.pcre.org/\"\nPKG_URL=\"https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${PKG_VERSION}/pcre2-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A set of functions that implement regular expression pattern matching using the same syntax.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CMAKE_OPTS_HOST=\"-DBUILD_SHARED_LIBS=OFF \\\n                     -DBUILD_STATIC_LIBS=ON \\\n                     -DPCRE2_STATIC_PIC=ON \\\n                     -DPCRE2_BUILD_PCRE2_8=ON \\\n                     -DPCRE2_BUILD_PCRE2_16=ON \\\n                     -DPCRE2_BUILD_PCRE2_32=ON \\\n                     -DPCRE2_SUPPORT_JIT=ON \\\n                     -DPCRE2_BUILD_TESTS=OFF \\\n                     -DPCRE2_SUPPORT_LIBEDIT=OFF \\\n                     -DPCRE2_SUPPORT_LIBREADLINE=OFF\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_SHARED_LIBS=OFF \\\n                       -DPCRE2_BUILD_PCRE2_16=ON \\\n                       -DPCRE2_SUPPORT_LIBREADLINE=OFF \\\n                       -DPCRE2_STATIC_PIC=ON\"\n\nPKG_CMAKE_OPTS_HOST=\"-DBUILD_SHARED_LIBS=OFF \\\n                       -DPCRE2_BUILD_PCRE2_16=ON \\\n                       -DPCRE2_SUPPORT_LIBREADLINE=OFF \\\n                       -DPCRE2_STATIC_PIC=ON\"\n\npost_unpack() {\n  sed -e 's|^INSTALL(FILES ${man1} DESTINATION man/man1)||' \\\n      -e 's|^INSTALL(FILES ${man3} DESTINATION man/man3)||' \\\n      -e 's|^INSTALL(FILES ${html} DESTINATION share/doc/pcre2/html)||' \\\n      -i ${PKG_BUILD}/CMakeLists.txt\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/devel/pkg-config/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"pkg-config\"\nPKG_VERSION=\"0.29.2\"\nPKG_SHA256=\"6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.freedesktop.org/software/pkgconfig/\"\nPKG_URL=\"http://pkg-config.freedesktop.org/releases/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"gettext:host\"\nPKG_LONGDESC=\"A system for managing library compile/link flags that works with automake and autoconf.\"\nPKG_BUILD_FLAGS=\"+local-cc\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--disable-silent-rules \\\n                         --with-internal-glib --disable-dtrace \\\n                         --with-gnu-ld\"\n\npost_makeinstall_host() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/share/aclocal\n    cp pkg.m4 ${SYSROOT_PREFIX}/usr/share/aclocal\n}\n"
  },
  {
    "path": "packages/devel/pkg-config/patches/0001-Add-support-for-multiple-sysroots.patch",
    "content": "From 64a39cd046040552729d32caef2a753b7f3dfc9c Mon Sep 17 00:00:00 2001\nFrom: Andre Heider <a.heider@gmail.com>\nDate: Thu, 19 Dec 2019 17:42:01 +0100\nSubject: [PATCH] Add support for multiple sysroots\n\nIntroduce PKG_CONFIG_SYSROOT_BASE, which can be set to a base directory\nunder which multiple install prefixes exist.\n\nNow it's possible to:\n* configure and install libfoo with --prefix=/base/foo/usr\n* configure and install libbar with --prefix=/base/bar/usr\n* export PKG_CONFIG_SYSROOT_BASE=/base\n\nand pkg-config attempts to detect the sysroot directory for each .pc\nfile located under the base directory, and sets its sysroot accordingly.\n\nExample with libfoo.pc and libbar.pc both contain includedir=/usr/include\n\n$ PKG_CONFIG_PATH=/base/foo/usr/lib/pkg-config:/base/bar/usr/lib/pkgconfig \\\n  PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \\\n  pkg-config --cflags libfoo libbar\n\nWill print \"-I/base/foo/usr/include -I/base/bar/usr/include\"\n---\n main.c  |  5 ++++\n parse.c |  2 ++\n pkg.c   | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---\n pkg.h   |  2 ++\n 4 files changed, 84 insertions(+), 3 deletions(-)\n\ndiff --git a/main.c b/main.c\nindex 9b27d9a..409d474 100644\n--- a/main.c\n+++ b/main.c\n@@ -35,6 +35,7 @@\n #undef STRICT\n #endif\n \n+GString *pcsysrootbase = NULL;\n char *pcsysrootdir = NULL;\n char *pkg_config_pc_path = NULL;\n \n@@ -531,6 +532,8 @@ main (int argc, char **argv)\n       add_search_dirs(pkg_config_pc_path, G_SEARCHPATH_SEPARATOR_S);\n     }\n \n+  pcsysrootbase = g_string_new(getenv(\"PKG_CONFIG_SYSROOT_BASE\"));\n+\n   pcsysrootdir = getenv (\"PKG_CONFIG_SYSROOT_DIR\");\n   if (pcsysrootdir)\n     {\n@@ -834,5 +837,7 @@ main (int argc, char **argv)\n   if (need_newline)\n     printf (\"\\n\");\n \n+  g_string_free(pcsysrootbase, FALSE);\n+\n   return 0;\n }\ndiff --git a/parse.c b/parse.c\nindex 6e9907c..bea87f3 100644\n--- a/parse.c\n+++ b/parse.c\n@@ -634,6 +634,7 @@ static void _do_parse_libs (Package *pkg, int argc, char **argv)\n   while (i < argc)\n     {\n       Flag *flag = g_new (Flag, 1);\n+      flag->pkg = pkg;\n       char *tmp = trim_string (argv[i]);\n       char *arg = strdup_escape_shell(tmp);\n       char *p;\n@@ -837,6 +838,7 @@ parse_cflags (Package *pkg, const char *str, const char *path)\n   while (i < argc)\n     {\n       Flag *flag = g_new (Flag, 1);\n+      flag->pkg = pkg;\n       char *tmp = trim_string (argv[i]);\n       char *arg = strdup_escape_shell(tmp);\n       char *p = arg;\ndiff --git a/pkg.c b/pkg.c\nindex f29ecc7..ecae401 100644\n--- a/pkg.c\n+++ b/pkg.c\n@@ -408,6 +408,9 @@ flag_list_strip_duplicates (GList *list)\n \n       if (cur->type == prev->type && g_strcmp0 (cur->arg, prev->arg) == 0)\n         {\n+          if (cur->type & (CFLAGS_I | LIBS_L) && cur->pkg != prev->pkg)\n+            continue;\n+\n           /* Remove the duplicate flag from the list and move to the last\n            * element to prepare for the next iteration. */\n           GList *dup = tmp;\n@@ -421,19 +424,75 @@ flag_list_strip_duplicates (GList *list)\n   return list;\n }\n \n+static const struct _suffix {\n+  const char * const suffix;\n+  const size_t len;\n+} suffixes[] = {\n+  {\n+    \"/usr/local/lib/pkgconfig\",\n+    24,\n+  },\n+  {\n+    \"/usr/local/share/pkgconfig\",\n+    26,\n+  },\n+  {\n+    \"/usr/lib/pkgconfig\",\n+    18,\n+  },\n+  {\n+    \"/usr/share/pkgconfig\",\n+    20,\n+  },\n+  {\n+    \"/lib/pkgconfig\",\n+    14,\n+  },\n+  {\n+    \"/share/pkgconfig\",\n+    16,\n+  },\n+};\n+\n+static void\n+get_sysroot(const Package *pkg, GString *dst)\n+{\n+  if (pcsysrootbase->len && !strncmp(pkg->pcfiledir, pcsysrootbase->str, pcsysrootbase->len))\n+  {\n+    size_t len = strlen(pkg->pcfiledir);\n+\n+    for (int i = 0; i < sizeof(suffixes) / sizeof(*suffixes); i++)\n+    {\n+      const struct _suffix *x = &suffixes[i];\n+\n+      if (len > x->len && !strcmp(pkg->pcfiledir + len - x->len, x->suffix))\n+      {\n+        g_string_assign(dst, pkg->pcfiledir);\n+        g_string_truncate(dst, dst->len - x->len);\n+        return;\n+      }\n+    }\n+  }\n+\n+  g_string_assign(dst, pcsysrootdir ? pcsysrootdir : \"\");\n+}\n+\n static char *\n flag_list_to_string (GList *list)\n {\n   GList *tmp;\n   GString *str = g_string_new (\"\");\n+  GString *sysroot = g_string_new (\"\");\n+  GString *cmp = g_string_new(pcsysrootbase->len ? pcsysrootbase->str : pcsysrootdir);\n   char *retval;\n   \n   tmp = list;\n   while (tmp != NULL) {\n     Flag *flag = tmp->data;\n+    get_sysroot(flag->pkg, sysroot);\n     char *tmpstr = flag->arg;\n \n-    if (pcsysrootdir != NULL && flag->type & (CFLAGS_I | LIBS_L)) {\n+    if (sysroot->len && flag->type & (CFLAGS_I | LIBS_L) && strncmp(tmpstr + 2, cmp->str, cmp->len)) {\n       /* Handle non-I Cflags like -isystem */\n       if (flag->type & CFLAGS_I && strncmp (tmpstr, \"-I\", 2) != 0) {\n         char *space = strchr (tmpstr, ' ');\n@@ -441,14 +500,17 @@ flag_list_to_string (GList *list)\n         /* Ensure this has a separate arg */\n         g_assert (space != NULL && space[1] != '\\0');\n         g_string_append_len (str, tmpstr, space - tmpstr + 1);\n-        g_string_append (str, pcsysrootdir);\n+        g_string_append (str, sysroot->str);\n         g_string_append (str, space + 1);\n       } else {\n         g_string_append_c (str, '-');\n         g_string_append_c (str, tmpstr[1]);\n-        g_string_append (str, pcsysrootdir);\n+        g_string_append (str, sysroot->str);\n         g_string_append (str, tmpstr+2);\n       }\n+    } else if (sysroot->len && !strncmp(tmpstr, \"/usr\", 4) && strncmp(tmpstr, cmp->str, cmp->len)) {\n+      g_string_append (str, sysroot->str);\n+      g_string_append (str, tmpstr);\n     } else {\n       g_string_append (str, tmpstr);\n     }\n@@ -458,6 +520,8 @@ flag_list_to_string (GList *list)\n \n   retval = str->str;\n   g_string_free (str, FALSE);\n+  g_string_free (cmp, FALSE);\n+  g_string_free (sysroot, TRUE);\n \n   return retval;\n }\n@@ -1046,6 +1110,8 @@ packages_get_var (GList      *pkgs,\n {\n   GList *tmp;\n   GString *str;\n+  GString *sysroot = g_string_new (\"\");\n+  GString *cmp = g_string_new(pcsysrootbase->len ? pcsysrootbase->str : pcsysrootdir);\n \n   str = g_string_new (NULL);\n \n@@ -1055,11 +1121,14 @@ packages_get_var (GList      *pkgs,\n       Package *pkg = tmp->data;\n       char *var;\n \n+      get_sysroot(pkg, sysroot);\n       var = parse_package_variable (pkg, varname);\n       if (var)\n         {\n           if (str->len > 0)\n             g_string_append_c (str, ' ');\n+          if (sysroot->len && (!strcmp(varname, \"includedir\") || !strcmp(varname, \"libdir\")) && strncmp(var, sysroot->str, sysroot->len))\n+            g_string_append(str, sysroot->str);\n           g_string_append (str, var);\n           g_free (var);\n         }\n@@ -1067,6 +1136,9 @@ packages_get_var (GList      *pkgs,\n       tmp = g_list_next (tmp);\n     }\n \n+  g_string_free(cmp, FALSE);\n+  g_string_free(sysroot, TRUE);\n+\n   return g_string_free (str, FALSE);\n }\n \ndiff --git a/pkg.h b/pkg.h\nindex c6732bd..58edf38 100644\n--- a/pkg.h\n+++ b/pkg.h\n@@ -53,6 +53,7 @@ struct Flag_\n {\n   FlagType type;\n   char *arg;\n+  Package *pkg;\n };\n \n struct RequiredVersion_\n@@ -126,6 +127,7 @@ void disable_requires_private(void);\n /* If TRUE, do not automatically prefer uninstalled versions */\n extern gboolean disable_uninstalled;\n \n+extern GString *pcsysrootbase;\n extern char *pcsysrootdir;\n \n /* pkg-config default search path. On Windows the current pkg-config install\n-- \n2.24.0\n\n"
  },
  {
    "path": "packages/devel/popt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"popt\"\nPKG_VERSION=\"1.19\"\nPKG_SHA256=\"c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/rpm-software-management/popt\"\nPKG_URL=\"http://ftp.rpm.org/popt/releases/popt-1.x/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"The popt library exists essentially for parsing command-line options.\"\n\npre_configure_target() {\n cd ${PKG_BUILD}\n rm -rf .${TARGET_NAME}\n}\n\npre_configure_host() {\n cd ${PKG_BUILD}\n rm -rf .${HOST_NAME}\n}\n"
  },
  {
    "path": "packages/devel/rapidjson/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rapidjson\"\nPKG_VERSION=\"1.1.0\"\nPKG_SHA256=\"bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/miloyip/rapidjson\"\nPKG_URL=\"https://github.com/miloyip/rapidjson/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A fast JSON parser/generator for C++ with both SAX/DOM style API\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DRAPIDJSON_BUILD_DOC=OFF \\\n                       -DRAPIDJSON_BUILD_EXAMPLES=OFF \\\n                       -DRAPIDJSON_BUILD_TESTS=OFF \\\n                       -DRAPIDJSON_BUILD_THIRDPARTY_GTEST=OFF \\\n                       -DRAPIDJSON_BUILD_ASAN=OFF \\\n                       -DRAPIDJSON_BUILD_UBSAN=OFF \\\n                       -DRAPIDJSON_HAS_STDSTRING=ON\"\n"
  },
  {
    "path": "packages/devel/rapidjson/patches/rapidjson-0001-remove_custom_cxx_flags.patch",
    "content": "diff --git a/CMakeLists.txt b/CMakeLists.txt\nindex ceda71b..efb259e 100644\n--- a/CMakeLists.txt\n+++ b/CMakeLists.txt\n@@ -50,7 +50,6 @@ if(CCACHE_FOUND)\n endif(CCACHE_FOUND)\n \n if (\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"GNU\")\n-    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Werror\")\n     if (RAPIDJSON_BUILD_CXX11)\n         if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS \"4.7.0\")\n             set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -std=c++0x\")\n@@ -73,7 +72,6 @@ if (\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"GNU\")\n         endif()\n     endif()\n elseif (CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n-    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Werror -Wno-missing-field-initializers\")\n     if (RAPIDJSON_BUILD_CXX11)\n         set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -std=c++11\")\n     endif()\n@@ -88,7 +86,6 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n         endif()\n     endif()\n elseif (\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"MSVC\")\n-    add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)\n     set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} /EHsc\")\n endif()\n \n\n"
  },
  {
    "path": "packages/devel/readline/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"readline\"\nPKG_VERSION=\"8.2\"\nPKG_SHA256=\"3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"http://www.gnu.org/software/readline/\"\nPKG_URL=\"http://ftpmirror.gnu.org/readline/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses\"\nPKG_LONGDESC=\"The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"bash_cv_wcwidth_broken=no \\\n                           --disable-shared \\\n                           --enable-static \\\n                           --with-curses\"\n\npost_makeinstall_target() {\n  # fix static library\n  sed -i 's/-lreadline/-lreadline -lncursesw/' ${SYSROOT_PREFIX}/usr/lib/pkgconfig/readline.pc\n\n  rm -rf ${INSTALL}/usr/share/readline\n}\n"
  },
  {
    "path": "packages/devel/shared-mime-info/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"shared-mime-info\"\nPKG_VERSION=\"2.2\"\nPKG_SHA256=\"418c480019d9865f67f922dfb88de00e9f38bf971205d55cdffab50432919e61\"\nPKG_LICENSE=\"GPL-2.0-only\"\nPKG_SITE=\"https://freedesktop.org/wiki/Software/shared-mime-info/\"\nPKG_URL=\"https://gitlab.freedesktop.org/xdg/${PKG_NAME}/-/archive/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_HOST=\"toolchain:host glib:host libxml2:host gettext:host itstool:host\"\nPKG_DEPENDS_TARGET=\"toolchain glib libxml2 gettext shared-mime-info:host\"\nPKG_LONGDESC=\"The shared-mime-info package contains the core database of common types.\"\nPKG_BUILD_FLAGS=\"-parallel\"\n\nconfigure_package() {\n  # Sway Support\n  if [ ! \"${WINDOWMANAGER}\" = \"sway\" ]; then\n    PKG_BUILD_FLAGS+=\" -sysroot\"\n  fi\n}\n\nPKG_MESON_OPTS_HOST=\"-Dupdate-mimedb=false\"\nPKG_MESON_OPTS_TARGET=\"-Dupdate-mimedb=false\"\n\npost_makeinstall_target() {\n  # Create /usr/share/mime/mime.cache\n  if [ \"${WINDOWMANAGER}\" = \"sway\" ]; then\n    ${TOOLCHAIN}/bin/update-mime-database ${INSTALL}/usr/share/mime\n  fi\n}\n"
  },
  {
    "path": "packages/devel/slang/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"slang\"\nPKG_VERSION=\"2.3.3\"\nPKG_SHA256=\"f9145054ae131973c61208ea82486d5dd10e3c5cdad23b7c4a0617743c8f5a18\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.jedsoft.org/slang/\"\nPKG_URL=\"https://www.jedsoft.org/releases/slang/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain pcre\"\nPKG_LONGDESC=\"A library designed to allow a developer to create robust multi-platform software.\"\nPKG_BUILD_FLAGS=\"-parallel\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--without-onig\"\n\npre_configure_target() {\n # slang fails to build in subdirs\n cd ${PKG_BUILD}\n sed -i 's|RPATH=\".*\"|RPATH=\"\"|' configure\n rm -rf .${TARGET_NAME}\n}\n\npre_configure_host() {\n # slang fails to build in subdirs\n cd ${PKG_BUILD}\n rm -rf .${HOST_NAME}\n}\n"
  },
  {
    "path": "packages/devel/spdlog/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"spdlog\"\nPKG_VERSION=\"1.11.0\"\nPKG_SHA256=\"ca5cae8d6cac15dae0ec63b21d6ad3530070650f68076f3a4a862ca293a858bb\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/gabime/spdlog\"\nPKG_URL=\"https://github.com/gabime/spdlog/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libfmt\"\nPKG_LONGDESC=\"Very fast, header only, C++ logging library.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DCMAKE_CXX_STANDARD=14 \\\n                       -DCMAKE_CXX_EXTENSIONS:BOOL=OFF \\\n                       -DSPDLOG_BUILD_SHARED=ON \\\n                       -DSPDLOG_FMT_EXTERNAL=ON \\\n                       -DSPDLOG_BUILD_EXAMPLE=OFF \\\n                       -DSPDLOG_BUILD_TESTS=OFF\"\n"
  },
  {
    "path": "packages/devel/swig/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"swig\"\nPKG_VERSION=\"4.1.1\"\nPKG_SHA256=\"2af08aced8fcd65cdb5cc62426768914bedc735b1c250325203716f78e39ac9b\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.swig.org\"\nPKG_URL=\"${SOURCEFORGE_SRC}/swig/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.\"\nPKG_TOOLCHAIN=\"configure\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--program-suffix=4.0 \\\n                         --with-pcre-prefix=${TOOLCHAIN} \\\n                         --with-boost=no \\\n                         --without-pcre \\\n                         --without-x \\\n                         --without-tcl \\\n                         --without-python \\\n                         --without-python3 \\\n                         --without-perl5 \\\n                         --without-octave \\\n                         --without-java \\\n                         --without-gcj \\\n                         --without-android \\\n                         --without-guile \\\n                         --without-mzscheme \\\n                         --without-ruby \\\n                         --without-php \\\n                         --without-ocaml \\\n                         --without-pike \\\n                         --without-chicken \\\n                         --without-csharp \\\n                         --without-lua \\\n                         --without-allegrocl \\\n                         --without-clisp \\\n                         --without-r \\\n                         --without-go \\\n                         --without-d\"\n\npost_makeinstall_host() {\n  ln -sf swig4.0 ${TOOLCHAIN}/bin/swig\n}\n"
  },
  {
    "path": "packages/devel/tbb/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tbb\"\nPKG_VERSION=\"2021.8.0\"\nPKG_SHA256=\"eee380323bb7ce864355ed9431f85c43955faaae9e9bce35c62b372d7ffd9f8b\"\nPKG_LICENSE=\"Apache-2.0\"\nPKG_SITE=\"https://github.com/oneapi-src/oneTBB\"\nPKG_URL=\"https://github.com/oneapi-src/oneTBB/archive/refs/tags/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"cmake:host ninja:host\"\nPKG_LONGDESC=\"oneTBB is a flexible C++ library that simplifies the work of adding parallelism to complex applications\"\n\nPKG_CMAKE_OPTS_HOST=\"-DTBB_TEST=OFF \\\n                     -DTBB_EXAMPLES=OFF \\\n                     -DTBB_STRICT=OFF \\\n                     -DTBB4PY_BUILD=OFF \\\n                     -DTBB_BUILD=ON \\\n                     -DTBBMALLOC_BUILD=ON \\\n                     -DTBBMALLOC_PROXY_BUILD=ON \\\n                     -DTBB_CPF=OFF \\\n                     -DTBB_FIND_PACKAGE=OFF \\\n                     -DTBB_DISABLE_HWLOC_AUTOMATIC_SEARCH=OFF \\\n                     -DTBB_ENABLE_IPO=ON\"\n\npre_configure_host() {\n  export CXXFLAGS+=\" -D__TBB_DYNAMIC_LOAD_ENABLED=0\"\n}\n"
  },
  {
    "path": "packages/devel/tbb/patches/tbb-999.01-PR824-retry-if-pthread_create-fails-with-EAGAIN.patch",
    "content": "From 3a8bc6478654afcbd219f45e7ea01353c2d57eb6 Mon Sep 17 00:00:00 2001\nFrom: Rui Ueyama <ruiu@cs.stanford.edu>\nDate: Sat, 7 May 2022 19:55:24 +0800\nSubject: [PATCH] Retry if pthread_create fails with EAGAIN\n\nOn many Unix-like systems, pthread_create can fail spuriously even if\nthe running machine has enough resources to spawn a new thread.\nTherefore, if EAGAIN is returned from pthread_create, we actually have\nto try again.\n\nI observed this issue when running the mold linker\n(https://github.com/rui314/mold) under a heavy load. mold uses OneTBB\nfor parallelization.\n\nAs another data point, Go has the same logic to retry on EAGAIN:\nhttps://go-review.googlesource.com/c/go/+/33894/\n\nnanosleep is defined in POSIX 2001, so I believe that all Unix-like\nsystems support it.\n\nSigned-off-by: Rui Ueyama <ruiu@cs.stanford.edu>\n---\n src/tbb/rml_thread_monitor.h     | 30 +++++++++++++++-\n test/CMakeLists.txt              |  3 ++\n test/tbb/test_pthread_create.cpp | 59 ++++++++++++++++++++++++++++++++\n 3 files changed, 91 insertions(+), 1 deletion(-)\n create mode 100644 test/tbb/test_pthread_create.cpp\n\ndiff --git a/src/tbb/rml_thread_monitor.h b/src/tbb/rml_thread_monitor.h\nindex 13b556380..dc046ba00 100644\n src/tbb/rml_thread_monitor.h | 19 ++++++++++++++++++-\n 1 file changed, 18 insertions(+), 1 deletion(-)\n\ndiff --git a/src/tbb/rml_thread_monitor.h b/src/tbb/rml_thread_monitor.h\nindex 13b556380..5b844b232 100644\n--- a/src/tbb/rml_thread_monitor.h\n+++ b/src/tbb/rml_thread_monitor.h\n@@ -31,6 +31,7 @@\n #include <pthread.h>\n #include <cstring>\n #include <cstdlib>\n+#include <time.h>\n #else\n #error Unsupported platform\n #endif\n@@ -183,6 +184,32 @@ inline void thread_monitor::check( int error_code, const char* routine ) {\n     }\n }\n\n+// pthread_create(2) can spuriously fail on Linux. This is a function\n+// to wrap pthread_create(2) to retry if it fails with EAGAIN.\n+inline void do_pthread_create(pthread_t *handle, pthread_attr_t *s, void* (*thread_routine)(void*), void* arg) {\n+#ifdef __linux__\n+  int tries = 0;\n+  const int max_num_tries = 20;\n+\n+  for (;;) {\n+    int error_code = pthread_create(handle, s, thread_routine, arg);\n+    if (!error_code)\n+      break;\n+    if (error_code != EAGAIN || tries++ > max_num_tries) {\n+      handle_perror(error_code, \"pthread_create has failed\");\n+      break;\n+    }\n+\n+    // Retry after tries * 1 millisecond.\n+    struct timespec ts = {0, tries * 1000 * 1000};\n+    nanosleep(&ts, NULL);\n+  }\n+#else\n+  if (int error_code = pthread_create(handle, s, thread_routine, arg))\n+    handle_perror(error_code, \"pthread_create has failed\");\n+#endif\n+}\n+\n inline thread_monitor::handle_type thread_monitor::launch( void* (*thread_routine)(void*), void* arg, std::size_t stack_size ) {\n     // FIXME - consider more graceful recovery than just exiting if a thread cannot be launched.\n     // Note that there are some tricky situations to deal with, such that the thread is already\n@@ -191,8 +218,9 @@ inline thread_monitor::handle_type thread_monitor::launch( void* (*thread_routin\n     check(pthread_attr_init( &s ), \"pthread_attr_init has failed\");\n     if( stack_size>0 )\n         check(pthread_attr_setstacksize( &s, stack_size ), \"pthread_attr_setstack_size has failed\" );\n+\n     pthread_t handle;\n-    check( pthread_create( &handle, &s, thread_routine, arg ), \"pthread_create has failed\" );\n+    do_pthread_create(&handle, &s, thread_routine, arg);\n     check( pthread_attr_destroy( &s ), \"pthread_attr_destroy has failed\" );\n     return handle;\n }\ndiff --git a/test/CMakeLists.txt b/test/CMakeLists.txt\nindex f15679e83..92802b015 100644\n--- a/test/CMakeLists.txt\n+++ b/test/CMakeLists.txt\n@@ -373,6 +373,9 @@ if (TARGET TBB::tbb)\n     if (APPLE OR ANDROID_PLATFORM)\n         target_link_libraries(test_dynamic_link PRIVATE -rdynamic) # for the test_dynamic_link\n     endif()\n+    if (UNIX AND NOT APPLE)\n+      tbb_add_test(SUBDIR tbb NAME test_pthread_create DEPENDENCIES TBB::tbb)\n+    endif()\n     tbb_add_test(SUBDIR tbb NAME test_collaborative_call_once DEPENDENCIES TBB::tbb)\n     tbb_add_test(SUBDIR tbb NAME test_concurrent_lru_cache DEPENDENCIES TBB::tbb)\n     tbb_add_test(SUBDIR tbb NAME test_concurrent_unordered_map DEPENDENCIES TBB::tbb)\ndiff --git a/test/tbb/test_pthread_create.cpp b/test/tbb/test_pthread_create.cpp\nnew file mode 100644\nindex 000000000..4cb1f4ea5\n--- /dev/null\n+++ b/test/tbb/test_pthread_create.cpp\n@@ -0,0 +1,59 @@\n+/*\n+    Copyright (c) 2005-2022 Intel Corporation\n+\n+    Licensed under the Apache License, Version 2.0 (the \"License\");\n+    you may not use this file except in compliance with the License.\n+    You may obtain a copy of the License at\n+\n+        http://www.apache.org/licenses/LICENSE-2.0\n+\n+    Unless required by applicable law or agreed to in writing, software\n+    distributed under the License is distributed on an \"AS IS\" BASIS,\n+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+    See the License for the specific language governing permissions and\n+    limitations under the License.\n+*/\n+\n+#include \"common/test.h\"\n+#include \"common/utils.h\"\n+\n+#include <atomic>\n+#include <sys/types.h>\n+#include <sys/wait.h>\n+#include <tbb/global_control.h>\n+#include <tbb/parallel_for.h>\n+#include <thread>\n+#include <unistd.h>\n+\n+//! Test that thread pool creation won't be affected with a spurious failure of pthread_create().\n+//! \\brief \\ref error_guessing\n+TEST_CASE(\"pthread_create is not affected by fork\") {\n+    std::atomic_bool done;\n+\n+    std::thread thr([&]() {\n+        while (!done) {\n+            pid_t pid = fork();\n+            CHECK(pid != -1);\n+\n+            if (pid == 0) {\n+                // child\n+              _exit(0);\n+            } else {\n+                int wstatus;\n+                do {\n+                  pid_t pid2 = waitpid(pid, &wstatus, 0);\n+                  CHECK(pid2 != -1);\n+                } while (!WIFEXITED(wstatus) && !WIFSIGNALED(wstatus));\n+            }\n+        }\n+    });\n+\n+    for (int i = 0; i < 50; i++) {\n+        tbb::task_scheduler_handle handle{tbb::attach{}};\n+        tbb::parallel_for(0, 10000, [](int) {});\n+        tbb::finalize(handle);\n+    }\n+\n+    done = true;\n+    thr.join();\n+}\n"
  },
  {
    "path": "packages/devel/xxd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xxd\"\nPKG_VERSION=\"$(get_pkg_version vim)\"\nPKG_LICENSE=\"VIM\"\nPKG_URL=\"\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_UNPACK+=\" vim\"\nPKG_LONGDESC=\"make a hexdump or do the reverse\"\nPKG_BUILD_FLAGS=\"-sysroot\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/vim/vim-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\nmake_host() {\n  ${HOST_CXX} -x c -std=c11 -O3 -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion ../src/xxd/xxd.c -o xxd\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n  cp -p xxd ${TOOLCHAIN}/bin\n}\n"
  },
  {
    "path": "packages/devel/yajl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"yajl\"\nPKG_VERSION=\"2.1.0\"\nPKG_SHA256=\"020f55a2dfc979ad63dc99b629b3fea7e7e4b9f20d8b10b856cfcb8850f03c61\"\nPKG_LICENSE=\"ISC\"\nPKG_SITE=\"http://lloyd.github.com/yajl/\"\nPKG_URL=\"${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A small event-driven (SAX-style) JSON parser.\"\n\npost_makeinstall_target() {\n  mv ${SYSROOT_PREFIX}/usr/lib/libyajl_s.a ${SYSROOT_PREFIX}/usr/lib/libyajl.a\n  rm ${SYSROOT_PREFIX}/usr/lib/libyajl.so*\n\n  rm -rf ${INSTALL}/usr/bin\n  rm -rf ${INSTALL}/usr/lib\n}\n"
  },
  {
    "path": "packages/emulation/cyclone68000/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"cyclone68000\"\nPKG_VERSION=\"66dda842eae01f47f5389b931ec9567fb0bbb6a1\"\nPKG_SHA256=\"c59900531e35e7303e1172d9bd5d161491b4554983930ad855614252156ea0e0\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/notaz/cyclone68000\"\nPKG_URL=\"https://github.com/notaz/cyclone68000/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Motorola 68000 emulator written in ARM assembly\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/emulation/libretro-2048/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-2048\"\nPKG_VERSION=\"331c1de588ed8f8c370dcbc488e5434a3c09f0f2\"\nPKG_SHA256=\"9b30278e61b8dfe067d8f7cc9cb0d467e16a3d2de995e950b712570d7e4aa195\"\nPKG_LICENSE=\"Public domain\"\nPKG_SITE=\"https://github.com/libretro/libretro-2048\"\nPKG_URL=\"https://github.com/libretro/libretro-2048/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.2048: 2048 for Kodi\"\n\nPKG_LIBNAME=\"2048_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"2048_LIB\"\n\nmake_target() {\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-atari800/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-atari800\"\nPKG_VERSION=\"94033288b026fe699bc50703609807aa8075f4dd\"\nPKG_SHA256=\"4e33976c2de88fdfb1ceaecda99a205419cb19b5125b55835fb3414cef58abf6\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/libretro-atari800\"\nPKG_URL=\"https://github.com/libretro/libretro-atari800/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"Atari 8-bit computer and 5200 console emulator\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_MAKE_OPTS_TARGET=\"platform=unix\"\n\nPKG_LIBNAME=\"atari800_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"ATARI800_LIB\"\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-beetle-bsnes/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-beetle-bsnes\"\nPKG_VERSION=\"d770563fc3c4bd9abb522952cefb4aa923ba0b91\"\nPKG_SHA256=\"838693257f9c8924c62ec6d88891fbeca310ac2fd7b8efa3d96775c3b34d4040\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-bsnes-libretro\"\nPKG_URL=\"https://github.com/libretro/beetle-bsnes-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.beetle-bsnes: Beetle bSNES for Kodi\"\n\nPKG_LIBNAME=\"mednafen_snes_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"BEETLE-BSNES_LIB\"\n\nmake_target() {\n  LDFLAGS+=\" -ldl\"\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-beetle-gba/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-beetle-gba\"\nPKG_VERSION=\"38182572571a48cb58057cde64b915237c4e2d58\"\nPKG_SHA256=\"e4eaf64e9160b501cadf983a46b8a2a98c8b590a13ca9082793d9a11e17fdcaf\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-gba-libretro\"\nPKG_URL=\"https://github.com/libretro/beetle-gba-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.beetle-gba: Beetle GBA for Kodi\"\n\nPKG_LIBNAME=\"mednafen_gba_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"BEETLE-GBA_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-beetle-lynx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-beetle-lynx\"\nPKG_VERSION=\"d718564b468590f6ed8abf5de6d2e9dfab64cb53\"\nPKG_SHA256=\"b40158ba62f271ac5f9fb3034aa41fa1977b8375583763abd22231ddf0d88ca5\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-lynx-libretro\"\nPKG_URL=\"https://github.com/libretro/beetle-lynx-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"Standalone port of Mednafen Lynx to libretro, itself a fork of Handy\"\n\nPKG_LIBNAME=\"mednafen_lynx_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"BEETLE-LYNX_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-beetle-ngp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-beetle-ngp\"\nPKG_VERSION=\"65460e3a9ad529f6901caf669abbda11f437ab55\"\nPKG_SHA256=\"2d866f6be840b5cbcf6c4159b860d8cb0dffd00c540d230c98de48941d12c38e\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-ngp-libretro\"\nPKG_URL=\"https://github.com/libretro/beetle-ngp-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"Standalone port of Mednafen NGP to the libretro API, itself a fork of Neopop\"\n\nPKG_LIBNAME=\"mednafen_ngp_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"BEETLE-NGP_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-beetle-pce-fast/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-beetle-pce-fast\"\nPKG_VERSION=\"703d0566858bf693996213af7b2a438636d8d991\"\nPKG_SHA256=\"2a1c7e4251e56e60fd3c7c91ead660055bb97e7417621ec1b04ede688edc3818\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-pce-fast-libretro\"\nPKG_URL=\"https://github.com/libretro/beetle-pce-fast-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.beetle-pce-fast: Beetle PCE Fast for Kodi\"\n\nPKG_LIBNAME=\"mednafen_pce_fast_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"BEETLE-PCE-FAST_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-beetle-pcfx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-beetle-pcfx\"\nPKG_VERSION=\"06f7ff996051feaf9e0d928bd2bce3c4c35af45a\"\nPKG_SHA256=\"12545b05a6ec0374de91b3467ee5ec0afae82a3ebccdd6dce0fa66f4f7496db6\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-pcfx-libretro\"\nPKG_URL=\"https://github.com/libretro/beetle-pcfx-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"Standalone port of Mednafen PCFX to libretro\"\n\nPKG_LIBNAME=\"mednafen_pcfx_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"BEETLE-PCFX_LIB\"\n\nmake_target() {\n  case ${TARGET_CPU} in\n    arm1176jzf-s)\n      make platform=armv6-hardfloat\n      ;;\n    cortex-a7|cortex-a8)\n      make platform=armv7-neon-hardfloat\n      ;;\n    cortex-a9|*cortex-a53|cortex-a17)\n      if [ \"${TARGET_ARCH}\" = \"aarch64\" ]; then\n        make platform=armv\n      else\n        make platform=armv7-cortexa9-neon-hardfloat\n      fi\n      ;;\n    x86-64)\n      make\n      ;;\n  esac\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-beetle-psx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-beetle-psx\"\nPKG_VERSION=\"17df2b9b93ba20c520c4592deed4531afc37bc7a\"\nPKG_SHA256=\"505c0db4bab3ff81bae5230ea52618a48e2ee84e24f1c3783c1ea4d91d9bc6e4\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-psx-libretro\"\nPKG_URL=\"https://github.com/libretro/beetle-psx-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"Fork of Mednafen PSX\"\n\nPKG_LIBNAME=\"mednafen_psx_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"BEETLE-PSX_LIB\"\n\nPKG_MAKE_OPTS_TARGET=\"GIT_VERSION=${PKG_VERSION:0:7} LINK_STATIC_LIBCPLUSPLUS=0\"\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-beetle-supergrafx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-beetle-supergrafx\"\nPKG_VERSION=\"bd50eae63ef38f4ff6d61e8f3a782fdac6a3eeb3\"\nPKG_SHA256=\"e194b968e853b9787bc71eb2a7010be9f2a248d8990fee6a59c855c1be531b0f\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-supergrafx-libretro\"\nPKG_URL=\"https://github.com/libretro/beetle-supergrafx-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"Standalone port of Mednafen PCE Fast to libretro. This one only emulates a SuperGrafx TG-16\"\n\nPKG_LIBNAME=\"mednafen_supergrafx_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"BEETLE-SUPERGRAFX_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-beetle-vb/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-beetle-vb\"\nPKG_VERSION=\"34996eb1aa7d84ef9bf768628ab0235f85662406\"\nPKG_SHA256=\"6c9aa6cc8565d77ec3d037f2634fa33b0b21baa52d599c488395ca2c3ab71d98\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-vb-libretro\"\nPKG_URL=\"https://github.com/libretro/beetle-vb-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"Standalone port of Mednafen VB to libretro\"\n\nPKG_LIBNAME=\"mednafen_vb_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"BEETLE-VB_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-beetle-wswan/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-beetle-wswan\"\nPKG_VERSION=\"4b1bf823fca4c489e13d826913a875b544432828\"\nPKG_SHA256=\"f4fac412969d0b846552dcf69c29b77d6e4e3eb61f4a0ddd2f08b9fcf1347002\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-wswan-libretro\"\nPKG_URL=\"https://github.com/libretro/beetle-wswan-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"Standalone port of Mednafen WonderSwan to libretro, itself a fork of Cygne\"\n\nPKG_LIBNAME=\"mednafen_wswan_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"BEETLE-WSWAN_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-bluemsx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-bluemsx\"\nPKG_VERSION=\"acf358be18644a9df0ed9602d63c2f73d4fe605a\"\nPKG_SHA256=\"2e4a7b5cc6b1eb90436d230591a23d775a3aec8fa26ce36d4443fce26bc05f40\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/blueMSX-libretro\"\nPKG_URL=\"https://github.com/libretro/blueMSX-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.bluemsx: BlueMSX for Kodi\"\n\nPKG_LIBNAME=\"bluemsx_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"BLUEMSX_LIB\"\n\nmake_target() {\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-bnes/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-bnes\"\nPKG_VERSION=\"8e26e89a93bef8eb8992d1921b539dce1792660a\"\nPKG_SHA256=\"c151e1296b8f6c035014dc62919692097feeebb19ae73294f1b9781edf1921b1\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/bnes-libretro\"\nPKG_URL=\"https://github.com/libretro/bnes-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.bnes: bNES for Kodi\"\n\nPKG_LIBNAME=\"bnes_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"BNES_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-bsnes-mercury-accuracy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-bsnes-mercury-accuracy\"\nPKG_VERSION=\"fb9a41fe9bc230a07c4506cad3cbf21d3fa635b4\"\nPKG_SHA256=\"5217be2136f120f2ed2aa3bd5225c039c6e45d618b88ceed1f607d8e3b3d79b6\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/bsnes-mercury\"\nPKG_URL=\"https://github.com/libretro/bsnes-mercury/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.beetle-bsnes-accuracy: Beetle bSNES for Kodi\"\n\nPKG_LIBNAME=\"bsnes_mercury_accuracy_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"BSNES-MERCURY-ACCURACY_LIB\"\n\nmake_target() {\n  make PROFILE=accuracy\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-bsnes-mercury-accuracy/patches/libretro-bsnes-mercury-accuracy-0001_fix-cross-compile.patch",
    "content": "From da71b9ec79482c31c37496019792da316626f1f2 Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Sun, 5 Feb 2017 20:40:42 -0800\nSubject: [PATCH 2/2] no -O3\n\n---\n Makefile | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex 948f5fb..04e585d 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -459,7 +459,7 @@ OBJECTS := $(SOURCES_CXX:.cpp=.o) $(SOURCES_C:.c=.o)\n all: $(TARGET)\n \n ifeq ($(DEBUG),0)\n-   FLAGS += -O3 $(EXTRA_GCC_FLAGS)\n+   FLAGS += $(EXTRA_GCC_FLAGS)\n else\n    FLAGS += -O0 -g\n endif\n-- \n2.9.3\n\n"
  },
  {
    "path": "packages/emulation/libretro-bsnes-mercury-balanced/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-bsnes-mercury-balanced\"\nPKG_VERSION=\"fb9a41fe9bc230a07c4506cad3cbf21d3fa635b4\"\nPKG_SHA256=\"5217be2136f120f2ed2aa3bd5225c039c6e45d618b88ceed1f607d8e3b3d79b6\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/bsnes-mercury\"\nPKG_URL=\"https://github.com/libretro/bsnes-mercury/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.beetle-bsnes-balanced: Beetle bSNES for Kodi\"\n\nPKG_LIBNAME=\"bsnes_mercury_balanced_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"BSNES-MERCURY-BALANCED_LIB\"\n\nmake_target() {\n  make PROFILE=balanced\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-bsnes-mercury-balanced/patches/libretro-bsnes-mercury-balanced-0001_fix-cross-compile.patch",
    "content": "From da71b9ec79482c31c37496019792da316626f1f2 Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Sun, 5 Feb 2017 20:40:42 -0800\nSubject: [PATCH 2/2] no -O3\n\n---\n Makefile | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex 948f5fb..04e585d 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -459,7 +459,7 @@ OBJECTS := $(SOURCES_CXX:.cpp=.o) $(SOURCES_C:.c=.o)\n all: $(TARGET)\n \n ifeq ($(DEBUG),0)\n-   FLAGS += -O3 $(EXTRA_GCC_FLAGS)\n+   FLAGS += $(EXTRA_GCC_FLAGS)\n else\n    FLAGS += -O0 -g\n endif\n-- \n2.9.3\n\n"
  },
  {
    "path": "packages/emulation/libretro-bsnes-mercury-performance/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-bsnes-mercury-performance\"\nPKG_VERSION=\"fb9a41fe9bc230a07c4506cad3cbf21d3fa635b4\"\nPKG_SHA256=\"5217be2136f120f2ed2aa3bd5225c039c6e45d618b88ceed1f607d8e3b3d79b6\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/bsnes-mercury\"\nPKG_URL=\"https://github.com/libretro/bsnes-mercury/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.beetle-bsnes-performance: Beetle bSNES for Kodi\"\n\nPKG_LIBNAME=\"bsnes_mercury_performance_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"BSNES-MERCURY-PERFORMANCE_LIB\"\n\nmake_target() {\n  make PROFILE=performance\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-bsnes-mercury-performance/patches/libretro-bsnes-mercury-performance-0001_fix-cross-compile.patch",
    "content": "From da71b9ec79482c31c37496019792da316626f1f2 Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Sun, 5 Feb 2017 20:40:42 -0800\nSubject: [PATCH 2/2] no -O3\n\n---\n Makefile | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex 948f5fb..04e585d 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -459,7 +459,7 @@ OBJECTS := $(SOURCES_CXX:.cpp=.o) $(SOURCES_C:.c=.o)\n all: $(TARGET)\n \n ifeq ($(DEBUG),0)\n-   FLAGS += -O3 $(EXTRA_GCC_FLAGS)\n+   FLAGS += $(EXTRA_GCC_FLAGS)\n else\n    FLAGS += -O0 -g\n endif\n-- \n2.9.3\n\n"
  },
  {
    "path": "packages/emulation/libretro-cap32/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-cap32\"\nPKG_VERSION=\"22d0475be7f6249669358d02b6cba4bc98abe936\"\nPKG_SHA256=\"8c564b645035cc475ce308297161c84a4241d710e641542704d58f8c8341f4de\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/libretro-cap32\"\nPKG_URL=\"https://github.com/libretro/libretro-cap32/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.cap32: cap32 for Kodi\"\n\nPKG_LIBNAME=\"cap32_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"CAP32_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-common/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-common\"\nPKG_VERSION=\"e9a4ccc4a6b05f136ef5358218a5a94ebeccb7cb\"\nPKG_SHA256=\"553eb4855300a72ac00b79a69749bafa4bc35e9108f012a799901c6cfcaf17cc\"\nPKG_LICENSE=\"Public domain\"\nPKG_SITE=\"https://github.com/libretro/libretro-common\"\nPKG_URL=\"https://github.com/libretro/libretro-common/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"Reusable coding blocks useful for libretro core and frontend development\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p \"${SYSROOT_PREFIX}/usr/include/${PKG_NAME}\"\n  cp -pR ${PKG_BUILD}/include/* \"${SYSROOT_PREFIX}/usr/include/${PKG_NAME}/\"\n}\n"
  },
  {
    "path": "packages/emulation/libretro-dinothawr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-dinothawr\"\nPKG_VERSION=\"33fb82a8df4e440f96d19bba38668beaa1b414fc\"\nPKG_SHA256=\"092c5c97b73605747baa4cfb3156c7ff80ba2128618ee1cc4d8f12900a0d374b\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/Dinothawr\"\nPKG_URL=\"https://github.com/libretro/Dinothawr/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.dinothawr: dinothawr for Kodi\"\n\nPKG_LIBNAME=\"dinothawr_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"DINOTHAWR_LIB\"\n\npre_make_target() {\n  if target_has_feature neon; then\n    export HAVE_NEON=1\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-dosbox/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-dosbox\"\nPKG_VERSION=\"b7b24262c282c0caef2368c87323ff8c381b3102\"\nPKG_SHA256=\"83d8b06eebc67f85ff7505271330b1f1c8ef6c4233ef85d070b0789eab83c33d\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/dosbox-libretro\"\nPKG_URL=\"https://github.com/libretro/dosbox-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.dosbox: DOSBox for Kodi\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_LIBNAME=\"dosbox_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"DOSBOX_LIB\"\n\npre_make_target() {\n  export CXXFLAGS=\"${CXXFLAGS} -std=gnu++11\"\n}\n\nmake_target() {\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-dosbox-pure/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-dosbox-pure\"\nPKG_VERSION=\"4fdb557e415698aae5bd90b076f76437f5e9b0b4\"\nPKG_SHA256=\"a523019fd18123eda4dfd04d5ea458d24ce670c0c30c9ce01b2b9be94870968e\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/dosbox-pure\"\nPKG_URL=\"https://github.com/libretro/dosbox-pure/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.dosbox-pure: DOSBox-Pure for Kodi\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_LIBNAME=\"dosbox_pure_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"DOSBOX-PURE_LIB\"\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-dosbox-pure/patches/libretro-dosbox-pure-001-cross-compile-fix.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -33,7 +33,7 @@ SOURCES := \\\n   src/*/*/*.cpp\n \n CPUFLAGS := $(MAKE_CPUFLAGS)\n-STRIPCMD := strip --strip-all\n+STRIPCMD := ${STRIP}\n ifneq ($(ISWIN),)\n   OUTNAME := dosbox_pure_libretro.dll\n   CXX     ?= g++\n@@ -152,6 +152,9 @@ else\n   CXX     ?= g++\n   LDFLAGS := -Wl,--gc-sections -fno-ident\n   COMMONFLAGS += -pthread\n+ifeq (1,1) # always\n+  CPUFLAGS :=\n+else\n   ifeq ($(CPUFLAGS),)\n     # ARM optimizations\n     PROCCPU := $(shell cat /proc/cpuinfo))\n@@ -180,6 +183,7 @@ else\n     CXX := g++-9\n   endif\n endif\n+endif\n \n ifeq ($(BUILD),DEBUG)\n   BUILDDIR := debug\n"
  },
  {
    "path": "packages/emulation/libretro-fbneo/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-fbneo\"\nPKG_VERSION=\"afcd7234fc93b2824f6b8fe1aa80c142a61ad528\"\nPKG_SHA256=\"94d5f9215a3231ee040a2841e3512e32cc21416e7eec5f6c3b42f1d6eca2a4ea\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://github.com/libretro/FBNeo\"\nPKG_URL=\"https://github.com/libretro/FBNeo/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.fbneo: FinalBurn Neo GameClient for Kodi\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"-gold +lto\"\n\nPKG_LIBNAME=\"fbneo_libretro.so\"\nPKG_LIBPATH=\"src/burner/libretro/${PKG_LIBNAME}\"\nPKG_LIBVAR=\"FBNEO_LIB\"\n\nPKG_MAKE_OPTS_TARGET=\"-C src/burner/libretro/ GIT_VERSION=${PKG_VERSION:0:7}\"\n\npre_configure_target() {\n  if [ \"${ARCH}\" = \"arm\" ]; then\n    PKG_MAKE_OPTS_TARGET+=\" platform=armv\"\n\n    # NEON Support\n    if target_has_feature neon; then\n      PKG_MAKE_OPTS_TARGET+=\"-neon\"\n    fi\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-fceumm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-fceumm\"\nPKG_VERSION=\"c795a25647614ee68cc3c8c187566fae3acfde60\"\nPKG_SHA256=\"74be2198a61d561bf513b42d235abd78401a287b3f9ed88eb0acd6b831ea6ee5\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/libretro-fceumm\"\nPKG_URL=\"https://github.com/libretro/libretro-fceumm/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.fceumm: FCEUmm emulator for Kodi\"\n\nPKG_LIBNAME=\"fceumm_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"FCEUMM_LIB\"\n\nmake_target() {\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-fmsx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-fmsx\"\nPKG_VERSION=\"1360c9ff32b390383567774d01fbe5d6dfcadaa3\"\nPKG_SHA256=\"32f235b88629ac3566f845d721e44e4bc334814c0372f034ce4b8153729bcf2d\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/fmsx-libretro\"\nPKG_URL=\"https://github.com/libretro/fmsx-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.fmsx: fmsx for Kodi\"\n\nPKG_LIBNAME=\"fmsx_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"FMSX_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-fsuae/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-fsuae\"\nPKG_VERSION=\"db00e95fc7dcbe29f16926ec749e4693136a5c22\"\nPKG_SHA256=\"3fb34add880330c0d1431fb016b1e7385342f7af91051f0f716f149baab07d6b\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/libretro-fsuae\"\nPKG_URL=\"https://github.com/kodi-game/libretro-fsuae/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host libmpeg2:host glib:host libpng:host\"\nPKG_DEPENDS_TARGET=\"toolchain glib libmpeg2 openal-soft libpng libretro-fsuae:host\"\nPKG_LONGDESC=\"FS-UAE amiga emulator.\"\nPKG_BUILD_FLAGS=\"-lto\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_LIBNAME=\"fsuae_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"FSUAE_LIB\"\n\nif [ \"${TARGET_ARCH}\" = \"arm\" ] && target_has_feature neon; then\n  PKG_CONFIGURE_OPTS_TARGET=\"--disable-jit --enable-neon\"\nfi\n\npre_configure_host() {\n  cd ${PKG_BUILD}\n  rm -rf .${HOST_NAME}\n  # check if this flag is still needed when this package is updated\n  export CFLAGS=\"${CFLAGS} -fcommon\"\n  export ac_cv_func_realloc_0_nonnull=yes\n}\n\nmake_host() {\n  make -j1 CC=\"${CC}\" gen\n}\n\nmakeinstall_host() {\n  :\n}\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n  # check if this flag is still needed when this package is updated\n  export CFLAGS=\"${CFLAGS} -fcommon\"\n  export ac_cv_func_realloc_0_nonnull=yes\n}\n\nmake_target() {\n  make CC=\"${CC}\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-fuse/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-fuse\"\nPKG_VERSION=\"3f9344ddf88dfd251d95cffdea615692479e8cc6\"\nPKG_SHA256=\"5b4f1b5d2eaacca013a46ed9a7105162500d15ed9d25da3f88b212226cd999e2\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/fuse-libretro\"\nPKG_URL=\"https://github.com/libretro/fuse-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.fuse: fuse for Kodi\"\n\nPKG_LIBNAME=\"fuse_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"FUSE_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-gambatte/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-gambatte\"\nPKG_VERSION=\"5ae3727f51798b1da437429f7559ffb36c575127\"\nPKG_SHA256=\"81465ee673c8f64ad07a18603aeaf9161a425f84dff245fa95bc78b71ea71749\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/gambatte-libretro\"\nPKG_URL=\"https://github.com/libretro/gambatte-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.gambatte: Gambatte for Kodi\"\n\nPKG_LIBNAME=\"gambatte_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"GAMBATTE_LIB\"\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-genplus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-genplus\"\nPKG_VERSION=\"118e2b83873beba1a2f154a8bad8a02bdd8ea98d\"\nPKG_SHA256=\"b6599120b736b2579cf56725b7eff8454f469c42d5039eaf6524dbb6d138eff0\"\nPKG_LICENSE=\"Modified BSD / LGPLv2.1\"\nPKG_SITE=\"https://github.com/libretro/Genesis-Plus-GX\"\nPKG_URL=\"https://github.com/libretro/Genesis-Plus-GX/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.genplus: Genesis Plus GX for Kodi\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_LIBNAME=\"genesis_plus_gx_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"GENPLUS_LIB\"\n\nmake_target() {\n  if [ \"${ARCH}\" = \"arm\" ]; then\n    CFLAGS+=\" -DALIGN_LONG\"\n  fi\n\n  make -f Makefile.libretro GIT_VERSION=${PKG_VERSION}\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-gw/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-gw\"\nPKG_VERSION=\"19a1cb3105ca4a82139fb4994e7995fd956f6f8d\"\nPKG_SHA256=\"26ec953669e2fc817c448797d43b0434340c3a9ee43ea02569a5a83eb39ffccb\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/gw-libretro\"\nPKG_URL=\"https://github.com/libretro/gw-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.gw: gw for Kodi\"\n\nPKG_LIBNAME=\"gw_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"GW_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-handy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-handy\"\nPKG_VERSION=\"7c2dbcb46a26cdb2355ccb4e982460095a55ba44\"\nPKG_SHA256=\"4f15dcfa77cd94995fc72c205acaf242c2a45cf6ea18d244563994bfc54c9a0b\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/libretro-handy\"\nPKG_URL=\"https://github.com/libretro/libretro-handy/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.handy: handy for Kodi\"\n\nPKG_LIBNAME=\"handy_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"HANDY_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-hatari/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-hatari\"\nPKG_VERSION=\"1ebf0a0488580ef95c0b28f02223b31813c867c5\"\nPKG_SHA256=\"520b3666a8cf795a89f8bf322dc77749cf8b1994a1f613f098cd6d4ed5382011\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/hatari\"\nPKG_URL=\"https://github.com/libretro/hatari/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.hatari: hatari for Kodi\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_LIBNAME=\"hatari_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"HATARI_LIB\"\n\nmake_target() {\n  cd ${PKG_BUILD}\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-mame2000/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-mame2000\"\nPKG_VERSION=\"0208517404e841fce0c094f1a2776a0e1c6c101d\"\nPKG_SHA256=\"7981c04b3efb9a3c4d31cb05c56745b729da0aea01f0b2543ee9e25a2c53aced\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/mame2000-libretro\"\nPKG_URL=\"https://github.com/libretro/mame2000-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"2000 version of MAME (0.37b5) for libretro\"\n\nPKG_LIBNAME=\"mame2000_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"MAME2000_LIB\"\n\nmake_target() {\n  if [ \"${TARGET_ARCH}\" = \"arm\" ]; then\n    make ARM=1\n  else\n    sed -i \"s|IS_X86 = 1|IS_X86 = 0|g\" Makefile\n    make\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-mame2003/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-mame2003\"\nPKG_VERSION=\"b1cc49cf1d8bbef88b890e1c2a315a39d009171b\"\nPKG_SHA256=\"c6c262d8997abadd09447be9a428b442c82898abad71cda48a8af36cb16493ae\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/mame2003-libretro\"\nPKG_URL=\"https://github.com/libretro/mame2003-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Late 2003 version of MAME (0.78) for libretro\"\n\nPKG_LIBNAME=\"mame2003_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"MAME2003_LIB\"\n\nconfigure_target() {\n  export LD=\"${CC}\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-mame2003_plus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-mame2003_plus\"\nPKG_VERSION=\"0b9309d9d86aea2457df74709e997bea37899475\"\nPKG_SHA256=\"c2909c4149f3cb329ebac1555c637eabfa38a2a75cf55c1287274c0563deda71\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/mame2003-plus-libretro\"\nPKG_URL=\"https://github.com/libretro/mame2003-plus-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Updated 2018 version of MAME (0.78) with added game support plus many fixes and improvements\"\n\nPKG_LIBNAME=\"mame2003_plus_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"MAME2003_PLUS_LIB\"\n\nconfigure_target() {\n  export LD=\"${CC}\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-mame2010/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-mame2010\"\nPKG_VERSION=\"5f524dd5fca63ec1dcf5cca63885286109937587\"\nPKG_SHA256=\"deb2a5126fcf9791ebaaba604143b6fb1bf4fa48fdc7a2ef919c900a3f9e4d69\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/mame2010-libretro\"\nPKG_URL=\"https://github.com/libretro/mame2010-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib\"\nPKG_LONGDESC=\"Late 2010 version of MAME (0.139) for libretro\"\n\nPKG_LIBNAME=\"mame2010_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"MAME2010_LIB\"\n\npre_configure_target() {\n  export CFLAGS=\"${CFLAGS} -fpermissive\"\n  export CXXFLAGS=\"${CXXFLAGS} -fpermissive\"\n  export LD=\"${CXX}\"\n\n  case ${TARGET_CPU} in\n    arm1176jzf-s)\n      PKG_MAKE_OPTS_TARGET=\"platform=armv6-hardfloat-${TARGET_CPU}\"\n      ;;\n    cortex-a7|cortex-a8|cortex-a9)\n      PKG_MAKE_OPTS_TARGET=\"platform=armv7-neon-hardfloat-${TARGET_CPU}\"\n      ;;\n    *cortex-a53|cortex-a17)\n      if [ \"${TARGET_ARCH}\" = \"aarch64\" ]; then\n        PKG_MAKE_OPTS_TARGET=\"platform=unix PTR64=1 ARM_ENABLED=1 LCPU=arm64\"\n      else\n        PKG_MAKE_OPTS_TARGET=\"platform=armv7-neon-hardfloat-cortex-a9\"\n      fi\n      ;;\n  esac\n}\n\npre_make_target() {\n  # precreate the build directories because they may be created too late\n  make ${PKG_MAKE_OPTS_TARGET} maketree\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-mame2010/patches/libretro-mame2010-0001_fix-cross-build.patch",
    "content": "diff --git a/Makefile b/Makefile\nindex 65ece36..bd7d670 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -61,7 +61,7 @@ COBJFLAGS =\n CPPONLYFLAGS =\r\n # LDFLAGS are used generally; LDFLAGSEMULATOR are additional\r\n # flags only used when linking the core emulator\r\n-LDFLAGS =\r\n+LDFLAGS ?=\r\n LDFLAGSEMULATOR =\r\n \r\n GIT_VERSION ?= \" $(shell git rev-parse --short HEAD || echo unknown)\"\r\n@@ -104,27 +104,25 @@ ifeq ($(VRENDER),opengl)\n \tCCOMFLAGS  += -DHAVE_OPENGL\r\n endif\r\n \r\n-UNAME=$(shell uname -m)\r\n-\r\n-ifeq ($(firstword $(filter x86_64,$(UNAME))),x86_64)\r\n+ifeq ($(firstword $(filter x86_64,$(ARCH))),x86_64)\r\n PTR64 ?= 1\r\n endif\r\n-ifeq ($(firstword $(filter amd64,$(UNAME))),amd64)\r\n+ifeq ($(firstword $(filter amd64,$(ARCH))),amd64)\r\n PTR64 ?= 1\r\n endif\r\n-ifeq ($(firstword $(filter ppc64,$(UNAME))),ppc64)\r\n+ifeq ($(firstword $(filter ppc64,$(ARCH))),ppc64)\r\n PTR64 ?= 1\r\n endif\r\n ifneq (,$(findstring mingw64-w64,$(PATH)))\r\n PTR64 ?= 1\r\n endif\r\n-ifeq ($(firstword $(filter arm64,$(UNAME))),arm64)\r\n+ifeq ($(firstword $(filter arm64,$(ARCH))),arm64)\r\n PTR64 ?= 1\r\n endif\r\n-ifneq (,$(findstring Power,$(UNAME)))\r\n+ifneq (,$(findstring Power,$(ARCH)))\r\n BIGENDIAN=1\r\n endif\r\n-ifneq (,$(findstring ppc,$(UNAME)))\r\n+ifneq (,$(findstring ppc,$(ARCH)))\r\n BIGENDIAN=1\r\n endif\r\n \r\n@@ -146,14 +144,10 @@ ifeq ($(VRENDER),opengl)\n    LIBS += -lGL\r\n endif\r\n LDFLAGS += $(SHARED)\r\n-   NATIVELD = g++\r\n-   NATIVELDFLAGS = -Wl,--warn-common -lstdc++\r\n-   NATIVECC = g++\r\n-   NATIVECFLAGS = -std=gnu99\r\n-   CC_AS = gcc \r\n-   CC = g++\r\n-   AR = @ar\r\n-   LD = g++ \r\n+   CC_AS ?= $(CC)\r\n+   CC ?= g++\r\n+   AR ?= @ar\r\n+   LD ?= g++\r\n    CCOMFLAGS += $(PLATCFLAGS) -ffast-math  \r\n    LIBS += -lstdc++ -lpthread \r\n \r\n@@ -462,10 +456,13 @@ else ifneq (,$(findstring rpi,$(platform)))\n \r\n # ARM\r\n else ifneq (,$(findstring armv,$(platform)))\r\n+   ARM_ENABLED = 1\r\n+   EXTRA_RULES = 1\r\n    TARGETLIB := $(TARGET_NAME)_libretro.so\r\n-   SHARED := -shared -Wl,--no-undefined\r\n+   SHARED := -shared -Wl,--version-script=src/osd/retro/link.T\r\n+   LDFLAGS += $(SHARED)\r\n    fpic = -fPIC\r\n-   CC = g++\r\n+   CC ?= g++\r\n    LDFLAGS +=  $(SHARED)\r\n    ARM_ENABLED = 1\r\n    X86_SH2DRC = 0\r\n@@ -683,7 +680,7 @@ DEFS += -DFLAC__NO_DLL\n \r\n # CFLAGS is defined based on C or C++ targets\r\n # (remember, expansion only happens when used, so doing it here is ok)\r\n-CFLAGS = $(CCOMFLAGS) $(CPPONLYFLAGS)\r\n+CFLAGS += $(CCOMFLAGS) $(CPPONLYFLAGS)\r\n \r\n # we compile C-only to C89 standard with GNU extensions\r\n # we compile C++ code to C++98 standard with GNU extensions\r\n"
  },
  {
    "path": "packages/emulation/libretro-mame2015/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-mame2015\"\nPKG_VERSION=\"2599c8aeaf84f62fe16ea00daa460a19298c121c\"\nPKG_SHA256=\"8f9a295f5d280130101c473e9754ec68ccbf45a1c1fe72d3405183ee6270b50d\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/mame2015-libretro\"\nPKG_URL=\"https://github.com/libretro/mame2015-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Late 2014/Early 2015 version of MAME (0.160-ish) for libretro. Compatible with MAME 0.160 romsets.\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_LIBNAME=\"mame2015_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"MAME2015_LIB\"\n\nPKG_MAKE_OPTS_TARGET=\"GIT_VERSION=${PKG_VERSION:0:7}\"\n\npre_configure_target() {\n  if [ \"${ARCH}\" = \"arm\" ]; then\n    PKG_MAKE_OPTS_TARGET+=\" platform=armv\"\n    # ARM NEON support\n    if target_has_feature neon; then\n      PKG_MAKE_OPTS_TARGET+=\"-neon\"\n    fi\n    PKG_MAKE_OPTS_TARGET+=\"-${TARGET_FLOAT}float-${TARGET_CPU}\"\n  fi\n  # Fix build\n  export REALCC=${CC}\n  export CC=${CXX}\n  export LD=${CXX}\n}\n\npre_make_target() {\n  # precreate the build directories because they may be created too late\n  make ${PKG_MAKE_OPTS_TARGET} maketree\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-mame2015/patches/libretro-mame2015-100.01-cross-compile.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -146,23 +146,23 @@\n    AR ?= @ar\n    LD := $(CXX)\n    LIBS += -lstdc++ -lpthread -ldl\n-   ifeq ($(firstword $(filter x86_64,$(UNAME))),x86_64)\n+   ifeq ($(firstword $(filter x86_64,$(ARCH))),x86_64)\n       PTR64 = 1\n    endif\n-   ifeq ($(firstword $(filter amd64,$(UNAME))),amd64)\n+   ifeq ($(firstword $(filter amd64,$(ARCH))),amd64)\n       PTR64 = 1\n    endif\n-   ifeq ($(firstword $(filter aarch64,$(UNAME))),aarch64)\n+   ifeq ($(firstword $(filter aarch64,$(ARCH))),aarch64)\n       PTR64 = 1\n       PLATCFLAGS += -DSDLMAME_NO64BITIO -DSDLMAME_ARM -DFORCE_DRC_C_BACKEND\n    endif\n-   ifeq ($(firstword $(filter ppc64,$(UNAME))),ppc64)\n+   ifeq ($(firstword $(filter ppc64,$(ARCH))),ppc64)\n       PTR64 = 1\n    endif\n-   ifneq (,$(findstring ppc,$(UNAME)))\n+   ifneq (,$(findstring ppc,$(ARCH)))\n       BIGENDIAN=1\n    endif\n-   ifneq (,$(findstring armv,$(UNAME) $(platform)))\n+   ifneq (,$(findstring armv,$(ARCH) $(platform)))\n       CCOMFLAGS += -mstructure-size-boundary=32\n       PLATCFLAGS += -DSDLMAME_NO64BITIO -DSDLMAME_ARM -DRETRO_SETJMP_HACK -DARM\n       LDFLAGS += -Wl,--fix-cortex-a8 -Wl,--no-as-needed\n"
  },
  {
    "path": "packages/emulation/libretro-mame2015/patches/libretro-mame2015-100.02-python-3.patch",
    "content": "diff -ru a/src/emu/cpu/m6502/m6502make.py b/src/emu/cpu/m6502/m6502make.py\n--- a/src/emu/cpu/m6502/m6502make.py\t2022-06-14 23:05:06.000000000 +0200\n+++ b/src/emu/cpu/m6502/m6502make.py\t2022-11-11 20:52:38.708407499 +0100\n@@ -16,7 +16,7 @@\n     opcodes = []\n     logging.info(\"load_opcodes: %s\", fname)\n     try:\n-        f = open(fname, \"rU\")\n+        f = open(fname, \"r\")\n     except Exception:\n         err = sys.exc_info()[1]\n         logging.error(\"cannot read opcodes file %s [%s]\", fname, err)\n@@ -39,7 +39,7 @@\n     logging.info(\"load_disp: %s\", fname)\n     states = []\n     try:\n-        f = open(fname, \"rU\")\n+        f = open(fname, \"r\")\n     except Exception:\n         err = sys.exc_info()[1]\n         logging.error(\"cannot read display file %s [%s]\", fname, err)\ndiff -ru a/src/emu/cpu/m6809/m6809make.py b/src/emu/cpu/m6809/m6809make.py\n--- a/src/emu/cpu/m6809/m6809make.py\t2022-06-14 23:05:06.000000000 +0200\n+++ b/src/emu/cpu/m6809/m6809make.py\t2022-11-11 20:51:33.652739538 +0100\n@@ -14,7 +14,7 @@\n \tif path != \"\":\n \t\tpath += '/'\n \ttry:\n-\t\tf = open(fname, \"rU\")\n+\t\tf = open(fname, \"r\")\n \texcept Exception:\n \t\terr = sys.exc_info()[1]\n \t\tsys.stderr.write(\"Cannot read opcodes file %s [%s]\\n\" % (fname, err))\ndiff -ru a/src/emu/cpu/mcs96/mcs96make.py b/src/emu/cpu/mcs96/mcs96make.py\n--- a/src/emu/cpu/mcs96/mcs96make.py\t2022-06-14 23:05:06.000000000 +0200\n+++ b/src/emu/cpu/mcs96/mcs96make.py\t2022-11-11 20:51:06.048897688 +0100\n@@ -71,7 +71,7 @@\n         self.ea = {}\n         self.macros = {}\n         try:\n-            f = open(fname, \"rU\")\n+            f = open(fname, \"r\")\n         except Exception:\n             err = sys.exc_info()[1]\n             sys.stderr.write(\"Cannot read opcodes file %s [%s]\\n\" % (fname, err))\ndiff -ru a/src/emu/cpu/tms57002/tmsmake.py b/src/emu/cpu/tms57002/tmsmake.py\n--- a/src/emu/cpu/tms57002/tmsmake.py\t2022-06-14 23:05:06.000000000 +0200\n+++ b/src/emu/cpu/tms57002/tmsmake.py\t2022-11-11 20:51:48.124660879 +0100\n@@ -326,7 +326,7 @@\n def LoadLst(filename):\n     instructions = []\n     ins = None\n-    for n, line in enumerate(open(filename, \"rU\")):\n+    for n, line in enumerate(open(filename, \"r\")):\n         line = line.rstrip()\n         if not line and ins:\n             # new lines separate intructions\n"
  },
  {
    "path": "packages/emulation/libretro-mame2016/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-mame2016\"\nPKG_VERSION=\"01058613a0109424c4e7211e49ed83ac950d3993\"\nPKG_SHA256=\"3faaf226279d0c08d2a945a208c43d3851d4b86981b5224231de80098a97ea27\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/mame2016-libretro\"\nPKG_URL=\"https://github.com/libretro/mame2016-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux:host alsa-lib\"\nPKG_LONGDESC=\"Late 2016 version of MAME (0.174) for libretro. Compatible with MAME 0.174 romsets.\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_LIBNAME=\"mame2016_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"MAME2016_LIB\"\n\npre_make_target() {\n  PKG_MAKE_OPTS_TARGET=\" \\\n    REGENIE=1 VERBOSE=1 NOWERROR=1 PYTHON_EXECUTABLE=python3 CONFIG=libretro \\\n    LIBRETRO_OS=\"unix\" ARCH=\"\" PROJECT=\"\" LIBRETRO_CPU=\"${ARCH}\" DISTRO=\"debian-stable\" \\\n    CROSS_BUILD=\"1\" OVERRIDE_CC=\"${CC}\" OVERRIDE_CXX=\"${CXX}\" \\\n    TARGET=\"mame\" SUBTARGET=\"arcade\" PLATFORM=\"${ARCH}\" RETRO=1 OSD=\"retro\" \\\n    GIT_VERSION=${PKG_VERSION:0:7}\"\n\n  if [ \"${ARCH}\" = \"arm\" ]; then\n    PKG_MAKE_OPTS_TARGET+=\" NOASM=\"1\" ARCHITECTURE=\"\"\"\n  elif [ \"${ARCH}\" = \"x86_64\" ]; then\n    PKG_MAKE_OPTS_TARGET+=\" NOASM=\"0\" PTR64=\"1\"\"\n  fi\n}\n\npost_make_target() {\n  mv ${PKG_BUILD}/mamearcade2016_libretro.so ${PKG_BUILD}/mame2016_libretro.so\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-mame2016/patches/bgfx.patch",
    "content": "--- a/3rdparty/bgfx/src/config.h\t2020-01-14 08:42:35.023108564 +0100\n+++ b/3rdparty/bgfx/src/config.h\t2020-01-14 08:42:39.527041246 +0100\n@@ -12,7 +12,7 @@\n #\tdefine BGFX_CONFIG_DEBUG 0\n #endif // BGFX_CONFIG_DEBUG\n \n-#if !defined(BGFX_CONFIG_RENDERER_DIRECT3D9) \\\n+#if 0 && !defined(BGFX_CONFIG_RENDERER_DIRECT3D9) \\\n \t&& !defined(BGFX_CONFIG_RENDERER_DIRECT3D11) \\\n \t&& !defined(BGFX_CONFIG_RENDERER_DIRECT3D12) \\\n \t&& !defined(BGFX_CONFIG_RENDERER_METAL) \\\n"
  },
  {
    "path": "packages/emulation/libretro-mame2016/patches/build.patch",
    "content": "--- a/makefile\t2020-01-08 21:26:00.559307012 +0100\n+++ b/makefile\t2020-01-08 21:26:17.743082994 +0100\n@@ -1499,7 +1499,7 @@\n \t@echo Compressing $<...\n \t$(SILENT)$(PYTHON) scripts/build/complay.py $< $@ layout_$(basename $(notdir $<))\n \n-$(GENDIR)/mame/drivers/ymmu100.hxx: $(SRC)/mame/drivers/ymmu100.ppm scripts/build/file2str.py\n+$(GENDIR)/mame/drivers/ymmu100.hxx: $(SRC)/mame/drivers/ymmu100.ppm scripts/build/file2str.py | $(GEN_FOLDERS)\n \t@echo Converting $<...\n \t$(SILENT)$(PYTHON) scripts/build/file2str.py $< $@ ymmu100_bkg UINT8\n \n--- a/3rdparty/genie/src/actions/make/make_cpp.lua\t2020-01-09 10:47:07.915711959 +0100\n+++ b/3rdparty/genie/src/actions/make/make_cpp.lua\t2020-01-09 10:47:10.627673879 +0100\n@@ -474,7 +474,7 @@\n \tfunction cpp.fileRules(prj)\n \t\tfor _, file in ipairs(prj.files or {}) do\n \t\t\tif path.isSourceFile(file) then\n-\t\t\t\t_p('$(OBJDIR)/%s.o: %s $(GCH)'\n+\t\t\t\t_p('$(OBJDIR)/%s.o: %s $(GCH) | $(OBJDIRS)'\n \t\t\t\t\t, _MAKE.esc(path.trimdots(path.removeext(file)))\n \t\t\t\t\t, _MAKE.esc(file)\n \t\t\t\t\t)\n@@ -497,7 +497,7 @@\n \n \t\t\t\t_p('')\n \t\t\telseif (path.getextension(file) == \".rc\") then\n-\t\t\t\t_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\n+\t\t\t\t_p('$(OBJDIR)/%s.res: %s | $(OBJDIRS)', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\n \t\t\t\tif prj.msgresource then\n \t\t\t\t\t_p('\\t@echo ' .. prj.msgresource)\n \t\t\t\telse\n--- a/3rdparty/genie/src/host/scripts.c\t2020-01-10 15:55:33.330479398 +0100\n+++ b/3rdparty/genie/src/host/scripts.c\t2020-01-10 15:56:01.313900664 +0100\n@@ -222,7 +222,7 @@\n \t\"E.esc(path.trimdots(path.removeext(file)))\\n)\\nend\\nend\\nend\\n_p('')\\n_p('  define PREBUILDCMDS')\\nif #cfg.prebuildcommands > 0 then\\n_p('\\\\t@echo Running pre-build commands')\\n_p('\\\\t%s', table.implode(cfg.prebuildcommands, \\\"\\\", \\\"\\\", \\\"\\\\n\\\\t\\\"))\\nend\\n_p('  endef')\\n_p('  define PRELINKCMDS')\\nif #cfg.prelinkcommands > 0 then\\n_p('\\\\t@echo Running pre-link commands')\\n_p('\\\\t%s', table.implode(cfg.prelinkcommands, \\\"\\\", \\\"\\\", \\\"\\\\n\\\\t\\\"))\\nend\\n_p('  endef')\\n_p('  define POSTBUILDCMDS')\\nif #cfg.postbuildcommands > 0 then\\n_p('\\\\t@echo Running post-build commands')\\n_p('\\\\t%s', table.implode(cfg.postbuildcommands, \\\"\\\", \\\"\\\", \\\"\\\\n\\\\t\\\"))\\nend\\n_p('  endef')\\nmake.settings(cfg, cc)\\n_p('endif')\\n_p('')\\nend\\nfunction cpp.platformtools(cfg, cc)\\nlocal platform = cc.platforms[cfg.platform]\\nif platform.cc then\\n_p('  CC         = %s', platform.cc)\\nend\\nif platform.cxx then\\n_p('  CXX        = %s', platform.cxx)\\nend\\nif platform.ar then\\n_p('  AR         = %s', platform.ar)\\nend\\nend\\nfunction cpp.flags(cf\"\n \t\"g, cc)\\nif cfg.pchheader and not cfg.flags.NoPCH then\\n_p('  FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')\\nend\\nif #cfg.forcedincludes > 0 then\\n_p('  FORCE_INCLUDE += -include %s'\\n,_MAKE.esc(table.concat(cfg.forcedincludes, \\\";\\\")))\\nend\\n_p('  ALL_CPPFLAGS  += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)', table.concat(cc.getcppflags(cfg), \\\" \\\"))\\n_p('  ALL_CFLAGS    += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)))\\n_p('  ALL_CXXFLAGS  += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\\n_p('  ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)))\\n_p('  ALL_RESFLAGS  += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s',\\n        make.list(table.join(cc.getdefines(cfg.resdefines),\\n                                cc.getincludedi\"\n \t\"rs(cfg.resincludedirs), cfg.resoptions)))\\nend\\nfunction cpp.linker(prj, cfg, cc)\\n_p('  ALL_LDFLAGS   += $(LDFLAGS)%s', make.list(table.join(cc.getlibdirflags(cfg), cc.getldflags(cfg), cfg.linkoptions)))\\n_p('  LDDEPS    +=%s', make.list(_MAKE.esc(premake.getlinks(cfg, \\\"siblings\\\", \\\"fullpath\\\"))))\\n_p('  LIBS      += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))\\n_p('  EXTERNAL_LIBS +=%s', make.list(cc.getlibfiles(cfg)))\\nif cfg.kind == \\\"StaticLib\\\" then\\nif (not prj.options.ArchiveSplit) then\\n_p('  LINKCMD    = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\\nelse\\n_p('  LINKCMD    = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\\n_p('  LINKCMD_NDX= $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, true)))\\nend\\nelse\\nlocal tool = iif(cfg.language == \\\"C\\\", \\\"CC\\\", \\\"CXX\\\")\\n_p('  LINKCMD    = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', tool)\\nend\\nend\\nfunction cpp.pchconfig(cfg)\\nif not cfg.pchheader or cfg.flags.NoPC\"\n-\t\"H then\\nreturn\\nend\\nlocal pch = cfg.pchheader\\nfor _, incdir in ipairs(cfg.includedirs) do\\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\\nlocal testname = path.join(abspath, pch)\\nif os.isfile(testname) then\\npch = path.getrelative(cfg.location, testname)\\nbreak\\nend\\nend\\n_p('  PCH        = %s', _MAKE.esc(pch))\\n_p('  GCH        = $(OBJDIR)/$(notdir $(PCH)).gch')\\nend\\nfunction cpp.pchrules(prj)\\n_p('ifneq (,$(PCH))')\\n_p('$(GCH): $(PCH) | $(OBJDIR)')\\nif prj.msgprecompile then\\n_p('\\\\t@echo ' .. prj.msgprecompile)\\nelse\\n_p('\\\\t@echo $(notdir $<)')\\nend\\nlocal cmd = iif(prj.language == \\\"C\\\", \\\"$(CC) $(ALL_CFLAGS) -x c-header\\\", \\\"$(CXX) $(ALL_CXXFLAGS) -x c++-header\\\")\\n_p('\\\\t$(SILENT) %s $(DEFINES) $(INCLUDES) -o \\\"$@\\\" -c \\\"$<\\\"', cmd)\\n_p('endif')\\n_p('')\\nend\\nfunction cpp.fileRules(prj)\\nfor _, file in ipairs(prj.files or {}) do\\nif path.isSourceFile(file) then\\n_p('$(OBJDIR)/%s.o: %s $(GCH)'\\n, _MAKE.esc(path.trimdots(path.removeext(file)))\\n, _MAKE.esc(file)\\n)\\nif (pat\"\n+\t\"H then\\nreturn\\nend\\nlocal pch = cfg.pchheader\\nfor _, incdir in ipairs(cfg.includedirs) do\\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\\nlocal testname = path.join(abspath, pch)\\nif os.isfile(testname) then\\npch = path.getrelative(cfg.location, testname)\\nbreak\\nend\\nend\\n_p('  PCH        = %s', _MAKE.esc(pch))\\n_p('  GCH        = $(OBJDIR)/$(notdir $(PCH)).gch')\\nend\\nfunction cpp.pchrules(prj)\\n_p('ifneq (,$(PCH))')\\n_p('$(GCH): $(PCH) | $(OBJDIR)')\\nif prj.msgprecompile then\\n_p('\\\\t@echo ' .. prj.msgprecompile)\\nelse\\n_p('\\\\t@echo $(notdir $<)')\\nend\\nlocal cmd = iif(prj.language == \\\"C\\\", \\\"$(CC) $(ALL_CFLAGS) -x c-header\\\", \\\"$(CXX) $(ALL_CXXFLAGS) -x c++-header\\\")\\n_p('\\\\t$(SILENT) %s $(DEFINES) $(INCLUDES) -o \\\"$@\\\" -c \\\"$<\\\"', cmd)\\n_p('endif')\\n_p('')\\nend\\nfunction cpp.fileRules(prj)\\nfor _, file in ipairs(prj.files or {}) do\\nif path.isSourceFile(file) then\\n_p('$(OBJDIR)/%s.o: %s $(GCH) | $(OBJDIRS)'\\n, _MAKE.esc(path.trimdots(path.removeext(file)))\\n, _MAKE.esc(file)\\n)\\nif (pat\"\n \t\"h.isobjcfile(file) and prj.msgcompile_objc) then\\n_p('\\\\t@echo ' .. prj.msgcompile_objc)\\nelseif prj.msgcompile then\\n_p('\\\\t@echo ' .. prj.msgcompile)\\nelse\\n_p('\\\\t@echo $(notdir $<)')\\nend\\nif (path.isobjcfile(file)) then\\n_p('\\\\t$(SILENT) $(CXX) $(ALL_OBJCFLAGS) $(FORCE_INCLUDE) -o \\\"$@\\\" -c \\\"$<\\\"')\\nelse\\ncpp.buildcommand(path.iscfile(file) and not prj.options.ForceCPP, \\\"o\\\")\\nend\\nfor _, task in ipairs(prj.postcompiletasks or {}) do\\n_p('\\\\t$(SILENT) %s', task)\\n_p('')\\nend\\n_p('')\\nelseif (path.getextension(file) == \\\".rc\\\") then\\n_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\\nif prj.msgresource then\\n_p('\\\\t@echo ' .. prj.msgresource)\\nelse\\n_p('\\\\t@echo $(notdir $<)')\\nend\\n_p('\\\\t$(SILENT) $(RESCOMP) $< -O coff -o \\\"$@\\\" $(ALL_RESFLAGS)')\\n_p('')\\nend\\nend\\nend\\nfunction cpp.dependencyRules(prj)\\nfor _, dependency in ipairs(prj.dependency or {}) do\\nfor _, dep in ipairs(dependency or {}) do\\nif (dep[3]==nil or dep[3]==false) then\\n_p('$(OBJDIR)/%s.o: %s'\\n, _MAKE.es\"\n \t\"c(path.trimdots(path.removeext(path.getrelative(prj.location, dep[1]))))\\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\\n)\\nelse\\n_p('%s: %s'\\n, _MAKE.esc(dep[1])\\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\\n)\\nend\\n_p('')\\nend\\nend\\nend\\nfunction cpp.buildcommand(iscfile, objext)\\nlocal flags = iif(iscfile, '$(CC) $(ALL_CFLAGS)', '$(CXX) $(ALL_CXXFLAGS)')\\n_p('\\\\t$(SILENT) %s $(FORCE_INCLUDE) -o \\\"$@\\\" -c \\\"$<\\\"', flags, objext)\\nend\\n\",\n \n"
  },
  {
    "path": "packages/emulation/libretro-mame2016/patches/genie.patch",
    "content": "--- a/3rdparty/genie/build/gmake.linux/genie.make\t2020-01-14 06:27:22.077161784 +0100\n+++ b/3rdparty/genie/build/gmake.linux/genie.make\t2020-01-14 06:27:49.856857764 +0100\n@@ -28,8 +28,12 @@\n   RM    = $(SILENT) del /F \"$(subst /,\\\\,$(1))\" 2> nul || exit 0\n endif\n \n-CC  = gcc\n-CXX = g++\n+CC  = $(HOST_CC)\n+CXX = $(HOST_CXX)\n+CPPFLAGS = $(HOST_CPPFLAGS)\n+CFLAGS = $(HOST_CFLAGS)\n+CXXFLAGS = $(HOST_CXXFLAGS)\n+LDFLAGS = $(HOST_LDFLAGS)\n AR  = ar\n \n ifndef RESCOMP\n@@ -247,211 +243,211 @@\n \t$(SILENT) $(CC) $(ALL_CFLAGS) -x c-header $(DEFINES) $(INCLUDES) -o \"$@\" -c \"$<\"\n endif\n \n-$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH)\n+$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH)\n+$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH)\n+$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH)\n+$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH)\n+$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH)\n+$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH)\n+$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH)\n+$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH)\n+$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH)\n+$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH)\n+$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH)\n+$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH)\n+$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH)\n+$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH)\n+$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH)\n+$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH)\n+$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH)\n+$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH)\n+$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n"
  },
  {
    "path": "packages/emulation/libretro-mame2016/patches/pregenerate.patch",
    "content": "--- a/makefile\t2020-01-15 17:56:35.780589637 +0100\n+++ b/makefile\t2020-01-15 17:56:15.020900841 +0100\n@@ -1201,16 +1201,19 @@\n .PHONY: linux_x64\n linux_x64: generate $(PROJECTDIR)/gmake-linux/Makefile\n \t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)64 precompile\n+\t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)64 dasm\n \t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)64\n \n .PHONY: linux_x86\n linux_x86: generate $(PROJECTDIR)/gmake-linux/Makefile\n \t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)32 precompile\n+\t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)32 dasm\n \t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)32\n \n .PHONY: linux\n linux: generate $(PROJECTDIR)/gmake-linux/Makefile\n \t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG) precompile\n+\t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG) dasm\n \t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)\n \n #-------------------------------------------------\n"
  },
  {
    "path": "packages/emulation/libretro-mame2016/patches/python3.patch",
    "content": "diff -ru a/scripts/build/verinfo.py b/scripts/build/verinfo.py\n--- a/scripts/build/verinfo.py\t2022-04-06 22:13:09.000000000 +0200\n+++ b/scripts/build/verinfo.py\t2022-11-12 01:58:14.560895085 +0100\n@@ -63,7 +63,7 @@\n build, outfmt, srcfile, dstfile = parse_args()\n \n try:\n-    fp = open(srcfile, 'rU')\n+    fp = open(srcfile, 'r')\n except IOError:\n     sys.stderr.write(\"Unable to open source file '%s'\\n\" % srcfile)\n     sys.exit(1)\ndiff -ru a/src/devices/cpu/m6502/m6502make.py b/src/devices/cpu/m6502/m6502make.py\n--- a/src/devices/cpu/m6502/m6502make.py\t2022-04-06 22:13:09.000000000 +0200\n+++ b/src/devices/cpu/m6502/m6502make.py\t2022-11-12 01:58:41.276911837 +0100\n@@ -18,7 +18,7 @@\n     opcodes = []\n     logging.info(\"load_opcodes: %s\", fname)\n     try:\n-        f = open(fname, \"rU\")\n+        f = open(fname, \"r\")\n     except Exception:\n         err = sys.exc_info()[1]\n         logging.error(\"cannot read opcodes file %s [%s]\", fname, err)\n@@ -41,7 +41,7 @@\n     logging.info(\"load_disp: %s\", fname)\n     states = []\n     try:\n-        f = open(fname, \"rU\")\n+        f = open(fname, \"r\")\n     except Exception:\n         err = sys.exc_info()[1]\n         logging.error(\"cannot read display file %s [%s]\", fname, err)\ndiff -ru a/src/devices/cpu/m6809/m6809make.py b/src/devices/cpu/m6809/m6809make.py\n--- a/src/devices/cpu/m6809/m6809make.py\t2022-04-06 22:13:09.000000000 +0200\n+++ b/src/devices/cpu/m6809/m6809make.py\t2022-11-12 01:58:23.972900989 +0100\n@@ -16,7 +16,7 @@\n \tif path != \"\":\n \t\tpath += '/'\n \ttry:\n-\t\tf = open(fname, \"rU\")\n+\t\tf = open(fname, \"r\")\n \texcept Exception:\n \t\terr = sys.exc_info()[1]\n \t\tsys.stderr.write(\"Cannot read opcodes file %s [%s]\\n\" % (fname, err))\ndiff -ru a/src/devices/cpu/mcs96/mcs96make.py b/src/devices/cpu/mcs96/mcs96make.py\n--- a/src/devices/cpu/mcs96/mcs96make.py\t2022-04-06 22:13:09.000000000 +0200\n+++ b/src/devices/cpu/mcs96/mcs96make.py\t2022-11-12 01:59:08.144928680 +0100\n@@ -73,7 +73,7 @@\n         self.ea = {}\n         self.macros = {}\n         try:\n-            f = open(fname, \"rU\")\n+            f = open(fname, \"r\")\n         except Exception:\n             err = sys.exc_info()[1]\n             sys.stderr.write(\"Cannot read opcodes file %s [%s]\\n\" % (fname, err))\ndiff -ru a/src/devices/cpu/tms57002/tmsmake.py b/src/devices/cpu/tms57002/tmsmake.py\n--- a/src/devices/cpu/tms57002/tmsmake.py\t2022-04-06 22:13:09.000000000 +0200\n+++ b/src/devices/cpu/tms57002/tmsmake.py\t2022-11-12 01:58:58.908922895 +0100\n@@ -323,7 +323,7 @@\n def LoadLst(filename):\n     instructions = []\n     ins = None\n-    for n, line in enumerate(open(filename, \"rU\")):\n+    for n, line in enumerate(open(filename, \"r\")):\n         line = line.rstrip()\n         if not line and ins:\n             # new lines separate intructions\n"
  },
  {
    "path": "packages/emulation/libretro-mesen/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-mesen\"\nPKG_VERSION=\"c89474c9d87df967d21b7b7d5971dc9475fec028\"\nPKG_SHA256=\"f389c3f7670d8df115a9603cca4ebff19bf3a9e722149820d2db7cfa31445755\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/SourMesen/Mesen/\"\nPKG_URL=\"https://github.com/libretro/Mesen/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.mesen: mesen for Kodi\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_LIBNAME=\"mesen_libretro.so\"\nPKG_LIBPATH=\"Libretro/${PKG_LIBNAME}\"\nPKG_LIBVAR=\"MESEN_LIB\"\n\nmake_target() {\n  make -C Libretro/\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-meteor/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-meteor\"\nPKG_VERSION=\"e533d300d0561564451bde55a2b73119c768453c\"\nPKG_SHA256=\"09df1661aa8d5c830e9ef3b62f01d7e2ae108bce2572e199b181e0c13d87e084\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/meteor-libretro\"\nPKG_URL=\"https://github.com/libretro/meteor-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.meteor: Meteor GBA for Kodi\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_LIBNAME=\"meteor_libretro.so\"\nPKG_LIBPATH=\"libretro/${PKG_LIBNAME}\"\nPKG_LIBVAR=\"METEOR_LIB\"\n\npre_configure_target() {\n  # fails to build in subdirs\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n}\n\nmake_target() {\n  make -C libretro/\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-mgba/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-mgba\"\nPKG_VERSION=\"a69c3434afe8b26cb8f9463077794edfa7d5efad\"\nPKG_SHA256=\"e166ad04c46b631f9001fff6155dbde956b57983fdcb4e50d8bbb57980b99840\"\nPKG_LICENSE=\"MPL 2.0\"\nPKG_SITE=\"https://github.com/libretro/mgba\"\nPKG_URL=\"https://github.com/libretro/mgba/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform zlib\"\nPKG_LONGDESC=\"game.libretro.mgba: mGBA for Kodi\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_LIBNAME=\"mgba_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"MGBA_LIB\"\n\npre_configure_target() {\n  # fails to build in subdirs\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n}\n\nmake_target() {\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-mrboom/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-mrboom\"\nPKG_VERSION=\"787f7a09dad0e2fd3fea71517261ae34445e5c63\"\nPKG_SHA256=\"4a9e8bad643ae43f327920686d872c56c2c812ab4dbd0abecf02a6315cd3a42c\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/Javanaise/mrboom-libretro\"\nPKG_URL=\"https://github.com/kodi-game/mrboom-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.mrboom: mrboom for Kodi\"\n\nPKG_LIBNAME=\"mrboom_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"MRBOOM_LIB\"\n\npre_make_target() {\n  # Disable NEON otherwise build fails\n  if target_has_feature neon; then\n    CFLAGS+=\" -DDONT_WANT_ARM_OPTIMIZATIONS\"\n  fi\n}\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-nestopia/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-nestopia\"\nPKG_VERSION=\"0867e83383661055ead5ecdab99150bb90922d93\"\nPKG_SHA256=\"b82c0ba7cc41463c9ce69149019032819e0db74f46df2ff3caed382e9fddc6c6\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/nestopia\"\nPKG_URL=\"https://github.com/libretro/nestopia/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.nestopia: Nestopia for Kodi\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_LIBNAME=\"nestopia_libretro.so\"\nPKG_LIBPATH=\"libretro/${PKG_LIBNAME}\"\nPKG_LIBVAR=\"NESTOPIA_LIB\"\n\nmake_target() {\n  make -C libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-nx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-nx\"\nPKG_VERSION=\"1f371e51c7a19049e00f4364cbe9c68ca08b303a\"\nPKG_SHA256=\"f85987a9497339f292df6a34af1c2b1020992465d0dd2c4a9acc9734ea857877\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/nxengine-libretro\"\nPKG_URL=\"https://github.com/libretro/nxengine-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.nx: nx for Kodi\"\n\nPKG_LIBNAME=\"nxengine_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"NX_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-o2em/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-o2em\"\nPKG_VERSION=\"a2a12472fde910b6089ac3ca6de805bd58a9c999\"\nPKG_SHA256=\"19cff8eff5227a955158e10a5a37790300ad89312033f9f1df542dad5b3caf4e\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/libretro-o2em\"\nPKG_URL=\"https://github.com/libretro/libretro-o2em/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.o2em: o2em for Kodi\"\n\nPKG_LIBNAME=\"o2em_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"O2EM_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-opera/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-opera\"\nPKG_VERSION=\"8a49bb8877611037438aeb857cb182f41ee0e3a1\"\nPKG_SHA256=\"48f94380633808ea01f4608f03ceb6b4b10709ba18abf1df6665f06ae839e7a7\"\nPKG_LICENSE=\"GPL-2.0-or-later\"\nPKG_SITE=\"https://github.com/libretro/opera-libretro\"\nPKG_URL=\"https://github.com/libretro/opera-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.opera: Port of 4DO/libfreedo for Kodi.\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"+lto\"\n\nPKG_LIBNAME=\"opera_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"OPERA_LIB\"\n\nPKG_MAKE_OPTS_TARGET=\"GIT_VERSION=${PKG_VERSION:0:7}\"\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-opera/patches/libretro-opera-995.01-crosscompile.patch",
    "content": "diff --git a/Makefile b/Makefile\nindex c62fee2..49b0e98 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -49,8 +49,8 @@ unixpath = $(subst \\,/,$1)\n unixcygpath = /$(subst :,,$(call unixpath,$1))\n \n ifneq (,$(findstring unix,$(platform)))\n-    AR = ${CC_PREFIX}ar\n-    CC = ${CC_PREFIX}gcc\n+    AR ?= ${CC_PREFIX}ar\n+    CC ?= ${CC_PREFIX}gcc\n \n     TARGET := $(TARGET_NAME)_libretro.so\n     fpic := -fPIC\n@@ -138,8 +138,8 @@ else ifeq ($(platform), classic_armv7_a7)\n \n # ARM\n else ifneq (,$(findstring armv,$(platform)))\n-    AR = ${CC_PREFIX}ar\n-    CC = ${CC_PREFIX}gcc\n+    AR ?= ${CC_PREFIX}ar\n+    CC ?= ${CC_PREFIX}gcc\n \n     TARGET := $(TARGET_NAME)_libretro.so\n     fpic := -fPIC\n@@ -181,9 +181,9 @@ ifeq ($(IOSSDK),)\n    IOSSDK := $(shell xcodebuild -version -sdk iphoneos Path)\n endif\n ifeq ($(platform),ios-arm64)\n-   CC = cc -arch arm64 -isysroot $(IOSSDK) -stdlib=libc++\n+   CC ?= cc -arch arm64 -isysroot $(IOSSDK) -stdlib=libc++\n else\n-   CC = cc -arch armv7 -isysroot $(IOSSDK)\n+   CC ?= cc -arch armv7 -isysroot $(IOSSDK)\n endif\n ifeq ($(platform),$(filter $(platform),ios9 ios-arm64))\n    MINVERSION = -miphoneos-version-min=8.0\n@@ -216,18 +216,18 @@ else ifeq ($(platform), qnx)\n    TARGET := $(TARGET_NAME)_libretro_$(platform).so\n    fpic := -fPIC\n    SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T\n-   CC = qcc -Vgcc_ntoarmv7le\n+   CC ?= qcc -Vgcc_ntoarmv7le\n else ifeq ($(platform), ps3)\n    TARGET := $(TARGET_NAME)_libretro_$(platform).a\n-   CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe\n-   AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe\n+   CC ?= $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe\n+   AR ?= $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe\n    STATIC_LINKING = 1\n    FLAGS += -DMSB_FIRST -D__CELLOS_LV2__\n    OLD_GCC = 1\n else ifeq ($(platform), sncps3)\n    TARGET := $(TARGET_NAME)_libretro_ps3.a\n-   CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe\n-   AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe\n+   CC ?= $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe\n+   AR ?= $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe\n    STATIC_LINKING = 1\n    FLAGS += -DMSB_FIRST\n    NO_GCC = 1\n@@ -235,25 +235,25 @@ else ifeq ($(platform), sncps3)\n # PSP1\n else ifeq ($(platform), psp1)\n    TARGET := $(TARGET_NAME)_libretro_$(platform).a\n-   CC = psp-gcc$(EXE_EXT)\n-   AR = psp-ar$(EXE_EXT)\n+   CC ?= psp-gcc$(EXE_EXT)\n+   AR ?= psp-ar$(EXE_EXT)\n    STATIC_LINKING = 1\n    FLAGS += -G0\n \n # Vita\n else ifeq ($(platform), vita)\n    TARGET := $(TARGET_NAME)_libretro_$(platform).a\n-   CC = arm-vita-eabi-gcc$(EXE_EXT)\n-   AR = arm-vita-eabi-ar$(EXE_EXT)\n+   CC ?= arm-vita-eabi-gcc$(EXE_EXT)\n+   AR ?= arm-vita-eabi-ar$(EXE_EXT)\n    STATIC_LINKING = 1\n    FLAGS += -DVITA\n \n # CTR (3DS)\n else ifeq ($(platform), ctr)\n    TARGET := $(TARGET_NAME)_libretro_$(platform).a\n-   CC = $(DEVKITARM)/bin/arm-none-eabi-gcc$(EXE_EXT)\n-   CXX = $(DEVKITARM)/bin/arm-none-eabi-g++$(EXE_EXT)\n-   AR = $(DEVKITARM)/bin/arm-none-eabi-ar$(EXE_EXT)\n+   CC ?= $(DEVKITARM)/bin/arm-none-eabi-gcc$(EXE_EXT)\n+   CXX ?=$(DEVKITARM)/bin/arm-none-eabi-g++$(EXE_EXT)\n+   AR ?= $(DEVKITARM)/bin/arm-none-eabi-ar$(EXE_EXT)\n    FLAGS += -march=armv6k -mtune=mpcore -mfloat-abi=hard\n    FLAGS += -Wall -mword-relocations\n    FLAGS += -fomit-frame-pointer -ffast-math\n@@ -311,8 +311,8 @@ else ifeq ($(platform), emscripten)\n # Windows MSVC 2003 Xbox 1\n else ifeq ($(platform), xbox1_msvc2003)\n TARGET := $(TARGET_NAME)_libretro_xdk1.lib\n-CC = CL.exe\n-LD = lib.exe\n+CC ?= CL.exe\n+LD ?= lib.exe\n \n export INCLUDE := $(XDK)/xbox/include\n export LIB := $(XDK)/xbox/lib\n@@ -325,8 +325,8 @@ HAS_GCC := 0\n else ifeq ($(platform), xbox360_msvc2010)\n TARGET := $(TARGET_NAME)_libretro_xdk360.lib\n MSVCBINDIRPREFIX = $(XEDK)/bin/win32\n-CC = \"$(MSVCBINDIRPREFIX)/cl.exe\"\n-LD = \"$(MSVCBINDIRPREFIX)/lib.exe\"\n+CC ?= \"$(MSVCBINDIRPREFIX)/cl.exe\"\n+LD ?= \"$(MSVCBINDIRPREFIX)/lib.exe\"\n \n export INCLUDE := $(XEDK)/include/xbox\n export LIB := $(XEDK)/lib/xbox\n@@ -461,9 +461,9 @@ else ifneq (,$(findstring windows_msvc2017,$(platform)))\n \n \tTargetArchMoniker = $(subst $(WinPartition)_,,$(PlatformSuffix))\n \n-\tCC  = cl.exe\n-\tCXX = cl.exe\n-\tLD = link.exe\n+\tCC  ?= cl.exe\n+\tCXX ?= cl.exe\n+\tLD ?= link.exe\n \n \treg_query = $(call filter_out2,$(subst $2,,$(shell reg query \"$2\" -v \"$1\" 2>nul)))\n \tfix_path = $(subst $(SPACE),\\ ,$(subst \\,/,$1))\n@@ -617,7 +617,7 @@ ifeq ($(STATIC_LINKING),1)\n \tLD ?= lib.exe\n \tSTATIC_LINKING=0\n else\n-\tLD = link.exe\n+\tLD ?= link.exe\n endif\n else\n \tLD = $(CC)\n"
  },
  {
    "path": "packages/emulation/libretro-pcsx-rearmed/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-pcsx-rearmed\"\nPKG_VERSION=\"4373e29de72c917dbcd04ec2a5fb685e69d9def3\"\nPKG_SHA256=\"85560938cdad30be5994e935d35b0b4b8a12f6d2ca39c0034bfaa3d98cbcb11a\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/pcsx_rearmed\"\nPKG_URL=\"https://github.com/libretro/pcsx_rearmed/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.pcsx-rearmed: PCSX Rearmed for Kodi\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"-gold\"\n\nPKG_LIBNAME=\"pcsx_rearmed_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"PCSX-REARMED_LIB\"\n\nPKG_MAKE_OPTS_TARGET=\"-f Makefile.libretro GIT_VERSION=${PKG_VERSION:0:7}\"\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n\n  if [ \"${ARCH}\" = \"arm\" ]; then\n    if target_has_feature neon; then\n      PKG_MAKE_OPTS_TARGET+=\" HAVE_NEON=1 HAVE_NEON_ASM=1 BUILTIN_GPU=neon\"\n    else\n      PKG_MAKE_OPTS_TARGET+=\" HAVE_NEON=0\"\n    fi\n    PKG_MAKE_OPTS_TARGET+=\" DYNAREC=ari64\"\n  elif [ \"${ARCH}\" = \"aarch64\" ]; then\n    PKG_MAKE_OPTS_TARGET+=\" platform=unix DYNAREC=ari64\"\n  else\n    PKG_MAKE_OPTS_TARGET+=\" platform=unix DYNAREC=lightrec\"\n  fi\n\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-picodrive/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-picodrive\"\nPKG_VERSION=\"c567d74ce42078f58168debe7e5e414bda441b6c\"\nPKG_SHA256=\"a4a737c6a550454969ae81f3c525c66eaf9253500430e9e1184fc620b0d5e2db\"\nPKG_LICENSE=\"MAME\"\nPKG_SITE=\"https://github.com/kodi-game/picodrive\"\nPKG_URL=\"https://github.com/kodi-game/picodrive/releases/download/picodrive-${PKG_VERSION}/picodrive-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform ${PKG_NAME}:host\"\nPKG_DEPENDS_UNPACK=\"cyclone68000\"\nPKG_LONGDESC=\"Fast MegaDrive/MegaCD/32X emulator\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"-gold\"\n\nPKG_LIBNAME=\"picodrive_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"PICODRIVE_LIB\"\n\npre_build_host() {\n  cp -a $(get_build_dir cyclone68000)/* ${PKG_BUILD}/cpu/cyclone/\n}\n\npre_configure_host() {\n  # fails to build in subdirs\n  cd ${PKG_BUILD}\n  rm -rf .${HOST_NAME}\n}\n\nmake_host() {\n  if [ \"${ARCH}\" = \"arm\" ]; then\n    make -C cpu/cyclone CONFIG_FILE=../cyclone_config.h\n  fi\n}\n\npre_configure_target() {\n  # fails to build in subdirs\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n}\n\npost_configure_target() {\n  sed -e \"s|^GIT_VERSION :=.*$|GIT_VERSION := \\\" ${PKG_VERSION:0:7}\\\"|\" -i Makefile.libretro\n}\n\nmake_target() {\n  if target_has_feature neon; then\n    export HAVE_NEON=1\n    export BUILTIN_GPU=neon\n   else\n    export HAVE_NEON=0\n  fi\n\n  case ${TARGET_ARCH} in\n    aarch64)\n      R= make -f Makefile.libretro platform=aarch64\n      ;;\n    arm)\n      R= make -f Makefile.libretro platform=armv\n      ;;\n    x86_64)\n      R= make -f Makefile.libretro\n      ;;\n  esac\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-pokemini/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-pokemini\"\nPKG_VERSION=\"9ba2c2d98bef98794095f3ef50e22f1a3cbc6166\"\nPKG_SHA256=\"7dd450e5e26c9b66ce0811ec4eac125e71b6752951bdbf3851d0312d268c09c2\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/pokemini\"\nPKG_URL=\"https://github.com/libretro/PokeMini/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"libretro wrapper for PokeMini emulator.\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_LIBNAME=\"pokemini_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"POKEMINI_LIB\"\n\nconfigure_target() {\n  cd ${PKG_BUILD}\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-prboom/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-prboom\"\nPKG_VERSION=\"d9c3975669b4aab5a1397e0174838bcbbc3c1582\"\nPKG_SHA256=\"bce89eac47d612b5745ecb65f7b69d13efb5efa29a6bd64d21d529ca2792d199\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/libretro-prboom\"\nPKG_URL=\"https://github.com/libretro/libretro-prboom/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.prboom: prboom for Kodi\"\n\nPKG_LIBNAME=\"prboom_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"PRBOOM_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-prosystem/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-prosystem\"\nPKG_VERSION=\"763ad22c7de51c8f06d6be0d49c554ce6a94a29b\"\nPKG_SHA256=\"289ed69df4503cd7772b6ec621aabc4a12eaedeb7dcf287a7ba01cf38aeb6c75\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/prosystem-libretro\"\nPKG_URL=\"https://github.com/libretro/prosystem-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"Port of ProSystem to libretro\"\n\nPKG_LIBNAME=\"prosystem_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"PROSYSTEM_LIB\"\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-quicknes/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-quicknes\"\nPKG_VERSION=\"75d501a87ec2074e8d2f7256fb0359513c263c29\"\nPKG_SHA256=\"751feab59dad87c708c21eaaf55017ec8e1cc088a53230bb910b0b92854eb0ca\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/QuickNES_Core\"\nPKG_URL=\"https://github.com/libretro/QuickNES_Core/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.quicknes: QuickNES for Kodi\"\n\nPKG_LIBNAME=\"quicknes_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"QUICKNES_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-sameboy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-sameboy\"\nPKG_VERSION=\"09138330990da32362246c7034cf4de2ea0a2a2b\"\nPKG_SHA256=\"9ef470c7c6bee83bbeb1e861a1c76b722d78de5e5a3849e7132d03d40fa8828d\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/libretro/sameboy\"\nPKG_URL=\"https://github.com/libretro/SameBoy/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform util-linux:host\"\nPKG_LONGDESC=\"libretro wrapper for SameBoy emulator.\"\n\nPKG_LIBNAME=\"sameboy_libretro.so\"\nPKG_LIBPATH=\"libretro/${PKG_LIBNAME}\"\nPKG_LIBVAR=\"SAMEBOY_LIB\"\n\nmake_target() {\n  make -C libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-scummvm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-scummvm\"\nPKG_VERSION=\"0b219a46770776e10c954c6242870928113cacc0\"\nPKG_SHA256=\"aff5f337ec9b6d5baa951610eec5f405c20f8840b53cac9a4fcaf061de9ac2cc\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/scummvm-wrapper\"\nPKG_URL=\"https://github.com/libretro/scummvm-wrapper/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.scummvm: scummvm for Kodi\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_LIBNAME=\"scummvm_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"SCUMMVM_LIB\"\n\nPKG_MAKE_OPTS_TARGET=\"platform=unix GIT_VERSION=${PKG_VERSION:0:7}\"\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n\n  if [ \"${TARGET_ARCH}\" = \"arm\" ]; then\n    PKG_MAKE_OPTS_TARGET+=\" TARGET_64BIT=0\"\n  else\n    PKG_MAKE_OPTS_TARGET+=\" TARGET_64BIT=1\"\n  fi\n\n  if target_has_feature neon; then\n    PKG_MAKE_OPTS_TARGET+=\" HAVE_NEON=1\"\n  fi\n\n  if [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ]; then\n    PKG_MAKE_OPTS_TARGET+=\" DEBUG=1\"\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-scummvm/patches/0001-libretro-Move-scummvm.ini-to-writable-save-directory.patch",
    "content": "From a7c2f414b2e5db27e896072cbb45abedcbfb61e1 Mon Sep 17 00:00:00 2001\nFrom: Garrett Brown <themagnificentmrb@gmail.com>\nDate: Thu, 28 Oct 2021 16:00:20 -0700\nSubject: [PATCH] libretro: Move scummvm.ini to writable save directory\n\n---\n src/libretro_os.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/src/libretro_os.cpp b/src/libretro_os.cpp\nindex eeb29baf5e..0630f1c565 100644\n--- a/src/libretro_os.cpp\n+++ b/src/libretro_os.cpp\n@@ -681,7 +681,7 @@ public:\n \n   virtual Audio::Mixer *getMixer() { return _mixer; }\n \n-  virtual Common::String getDefaultConfigFileName() { return s_systemDir + \"/scummvm.ini\"; }\n+  virtual Common::String getDefaultConfigFileName() { return s_saveDir + \"/scummvm.ini\"; }\n \n   virtual void logMessage(LogMessageType::Type type, const char *message) {\n     if (log_cb)\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/emulation/libretro-snes9x/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-snes9x\"\nPKG_VERSION=\"bc3bbb28c1723742d102c867e264574915d7c8ef\"\nPKG_SHA256=\"59e43b695021f2444103a345bb95f44870bd4792af7580d71b95f61bb9ad35f9\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/snes9x\"\nPKG_URL=\"https://github.com/libretro/snes9x/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.snes9x: snes9x for Kodi\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_LIBNAME=\"snes9x_libretro.so\"\nPKG_LIBPATH=\"libretro/${PKG_LIBNAME}\"\nPKG_LIBVAR=\"SNES9X_LIB\"\n\nmake_target() {\n  make -C libretro/\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-snes9x2002/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-snes9x2002\"\nPKG_VERSION=\"540baad622d9833bba7e0696193cb06f5f02f564\"\nPKG_SHA256=\"07f0e54c61b2608480157a2259dfa7aba2ff3e746935b3b51068b0f69d67d289\"\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libretro/snes9x2002\"\nPKG_URL=\"https://github.com/libretro/snes9x2002/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"Port of SNES9x 1.39 for libretro. Heavily optimized for ARM.\"\n\nPKG_LIBNAME=\"snes9x2002_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"SNES9X2002_LIB\"\n\npre_make_target() {\n  export CFLAGS=\"${CFLAGS} -std=gnu11\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-snes9x2010/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-snes9x2010\"\nPKG_VERSION=\"d8b10c4cd7606ed58f9c562864c986bc960faaaf\"\nPKG_SHA256=\"7faf4243226cfed3a2926ef78d7db74905947ecda8770575a81b1792b2345302\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/snes9x2010\"\nPKG_URL=\"https://github.com/libretro/snes9x2010/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"snes9x2010 for Kodi\"\n\nPKG_LIBNAME=\"snes9x2010_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"SNES9X2010_LIB\"\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-stella/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-stella\"\nPKG_VERSION=\"8ab051edd4816f33a5631d230d54059eeed52c5f\"\nPKG_SHA256=\"08976546ed707e7d83a1e4b1204bba8e854f41c0a0a9d8d5d8447c4489fb1fe0\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/stella-libretro\"\nPKG_URL=\"https://github.com/libretro/stella2014-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.stella: Stella for Kodi\"\n\nPKG_LIBNAME=\"stella2014_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"STELLA_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-tgbdual/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-tgbdual\"\nPKG_VERSION=\"a6f3018e6a23030afc1873845ee54d4b2d8ec9d3\"\nPKG_SHA256=\"5df48cf8a8091cb68b5f21e90671cf27afaf2d0fcf35431093cccff0e4e95c7f\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/tgbdual-libretro\"\nPKG_URL=\"https://github.com/libretro/tgbdual-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.tgbdual: tgbdual for Kodi\"\n\nPKG_LIBNAME=\"tgbdual_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"TGBDUAL_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-tyrquake/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-tyrquake\"\nPKG_VERSION=\"fdd8d2746d527722dffe2ac9a208a753bef62f7b\"\nPKG_SHA256=\"f2c4a88974230ad7b517dc1de4e24a9cfb2f5b4c0f38b1b0a4c9e5c7721f7fad\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/tyrquake\"\nPKG_URL=\"https://github.com/libretro/tyrquake/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.tyrquake: tyrquake for Kodi\"\n\nPKG_LIBNAME=\"tyrquake_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"TYRQUAKE_LIB\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-uae/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-uae\"\nPKG_VERSION=\"9f0f10d92cc83afa66d35d398b7af959bd4b90c5\"\nPKG_SHA256=\"6e9afa5c7711587f64e91cee456d1aa0a13ce22068999598b508f2bc6e0bd9ad\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libretro/libretro-uae\"\nPKG_URL=\"https://github.com/libretro/libretro-uae/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"libretro wrapper for UAE emulator.\"\nPKG_BUILD_FLAGS=\"-lto\"\n\nPKG_LIBNAME=\"puae_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"UAE_LIB\"\n\npre_configure_target() {\n  CFLAGS+=\" -fcommon\"\n  if [ \"${TARGET_ARCH}\" = \"arm\" ]; then\n    CFLAGS+=\" -DARM -marm\"\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-uae4arm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-uae4arm\"\nPKG_VERSION=\"5cbf44464507ff9262c2403c9f8d5bc5957afd1a\"\nPKG_SHA256=\"4d97fb681f6de97569ad9e653bd4178aea37803d6370c23a1d3d5d4a06f5e2dd\"\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libretro/uae4arm-libretro\"\nPKG_URL=\"https://github.com/libretro/uae4arm-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib\"\nPKG_LONGDESC=\"UAE4ARM amiga emulator.\"\n\nPKG_LIBNAME=\"uae4arm_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"UAE4ARM_LIB\"\n\npre_configure_target() {\n  if target_has_feature neon; then\n    CFLAGS+=\" -D__NEON_OPT\"\n  fi\n}\n\nmake_target() {\n  if target_has_feature neon; then\n    PKG_HAVE_NEON=1\n  else\n    PKG_HAVE_NEON=0\n  fi\n\n  make HAVE_NEON=${PKG_HAVE_NEON} USE_PICASSO96=1\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-vba-next/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-vba-next\"\nPKG_VERSION=\"5f497a9e70c94cbaaf6deb3c8299bd6b02002a5d\"\nPKG_SHA256=\"2c8553acefc84131b518e9c2ae6683533cc1c183ea4d6610bdadc10fa9c265b4\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/vba-next\"\nPKG_URL=\"https://github.com/libretro/vba-next/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.vba-next: VBA-Next for Kodi\"\n\nPKG_LIBNAME=\"vba_next_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"VBA-NEXT_LIB\"\n\nmake_target() {\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-vbam/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-vbam\"\nPKG_VERSION=\"7e30b038893de63e674944f75581d57c7685ea3a\"\nPKG_SHA256=\"589d4c4ff0764ea0f3b4829291bff773ef228926531fb35a1705f8770ea130a2\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/vbam-libretro\"\nPKG_URL=\"https://github.com/libretro/vbam-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.vbam: VBA-M for Kodi\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_LIBNAME=\"vbam_libretro.so\"\nPKG_LIBPATH=\"src/libretro/${PKG_LIBNAME}\"\nPKG_LIBVAR=\"VBAM_LIB\"\n\npre_configure_target() {\n  # fails to build in subdirs\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n}\n\nmake_target() {\n  make -C src/libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-vecx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-vecx\"\nPKG_VERSION=\"8e932c1d585ae9e467186dea9e73ce38fe1490f7\"\nPKG_SHA256=\"19eaa6d1ad035c01e979550787319f7d0b2398288f7c657eefea6c6d9b4cf49f\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/libretro-vecx\"\nPKG_URL=\"https://github.com/libretro/libretro-vecx/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.vecx: vecx for Kodi\"\n\nPKG_LIBNAME=\"vecx_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"VECX_LIB\"\n\nif [ \"${OPENGLES_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\nfi\n\nif [ \"${OPENGL_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGL}\"\nfi\n\nmake_target() {\n  if [ \"${OPENGL_SUPPORT}\" = no ]; then\n    HAS_GLES=1 make\n  else\n    make\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-vice/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-vice\"\nPKG_VERSION=\"3934cf8b507a14376d99971ef364fc6c7386ba5e\"\nPKG_SHA256=\"377914aa2e0a78b1da5dd33513cc038733b331d33cbfb974e068d36c4cba640f\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/vice-libretro\"\nPKG_URL=\"https://github.com/libretro/vice-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"VICE C64 libretro\"\n\nPKG_LIBNAME=\"vice_x64_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"VICE_LIB\"\n\npre_build_target() {\n  export GIT_VERSION=${PKG_VERSION}\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-vircon32/package.mk",
    "content": "PKG_NAME=\"libretro-vircon32\"\nPKG_VERSION=\"d8a92430e887286b4e5351916ef0bd35d8cb40e8\"\nPKG_SHA512=\"8746ba64b721954adab761dad17071d6c92a48bb35944d6cc1360c25046774ec9cc2f6c144036a3376deb9723e9d106ffc2bf520e4a4595130e8ef864bb5bd2d\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/vircon32/vircon32-libretro\"\nPKG_URL=\"${PKG_SITE}.git\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"cmake\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"opengl-meson\"\nPKG_LONGDESC=\"Vircon32 32-bit Virtual Console\"\n\npre_configure_target() {\n  PKG_CMAKE_OPTS_TARGET+=\" \\\n  -DENABLE_OPENGLES2=1 \\\n  -DPLATFORM=EMUELEC \\\n  -DOPENGL_INCLUDE_DIR=${SYSROOT_PREFIX}/usr/include \\\n  -DCMAKE_BUILD_TYPE=Release\"\n}\n\nPKG_LIBNAME=\"vircon32_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"VIRCON32_LIB\"\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}"
  },
  {
    "path": "packages/emulation/libretro-virtualjaguar/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-virtualjaguar\"\nPKG_VERSION=\"2cc06899b839639397b8b30384a191424b6f529d\"\nPKG_SHA256=\"08d0f3403b41a2606e66aa78e35e3cd8fff8bf14050b260ce6f0395f51d48f7b\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/virtualjaguar-libretro\"\nPKG_URL=\"https://github.com/libretro/virtualjaguar-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"Port of Virtual Jaguar to Libretro\"\n\nPKG_LIBNAME=\"virtualjaguar_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\nPKG_LIBVAR=\"VIRTUALJAGUAR_LIB\"\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/libretro-yabause/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libretro-yabause\"\nPKG_VERSION=\"4c96b96f7fbe07223627c469ff33376b2a634748\"\nPKG_SHA256=\"76f50b21d81507ac29e80bbcfbfc8dbf71d6bf051f1267973eabed99a6681654\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/yabause\"\nPKG_URL=\"https://github.com/libretro/yabause/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_LONGDESC=\"game.libretro.yabause: Yabause for Kodi\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_LIBNAME=\"yabause_libretro.so\"\nPKG_LIBPATH=\"yabause/src/libretro/${PKG_LIBNAME}\"\n\nPKG_MAKE_OPTS_TARGET=\"-C yabause/src/libretro GIT_VERSION=${PKG_VERSION:0:7}\"\n\npre_configure_target() {\n  if [ \"${ARCH}\" = \"arm\" ]; then\n    PKG_MAKE_OPTS_TARGET+=\" platform=armv\"\n    # ARM NEON support\n    if target_has_feature neon; then\n      PKG_MAKE_OPTS_TARGET+=\"-neon\"\n    fi\n    PKG_MAKE_OPTS_TARGET+=\"-${TARGET_FLOAT}float-${TARGET_CPU}\"\n  elif [ \"${TARGET_ARCH}\" = \"aarch64\" ]; then\n    sed -i \"s|FLAGS += -marm||\" ${PKG_BUILD}/yabause/src/libretro/Makefile\n    PKG_MAKE_OPTS_TARGET+=\" platform=armv\"\n  fi\n}\n\npre_make_target() {\n  make CC=${HOST_CC} -C yabause/src/libretro generate-files\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}\n  cp ${PKG_LIBPATH} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME}\n  echo \"set(${PKG_LIBVAR} ${SYSROOT_PREFIX}/usr/lib/${PKG_LIBNAME})\" > ${SYSROOT_PREFIX}/usr/lib/cmake/${PKG_NAME}/${PKG_NAME}-config.cmake\n}\n"
  },
  {
    "path": "packages/emulation/rcheevos/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rcheevos\"\nPKG_VERSION=\"9.2.0\"\nPKG_SHA256=\"c8ed6ca74f905ea0c256250e46cced579922880001337e7c3d3d68179ad89d4e\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/RetroAchievements/rcheevos\"\nPKG_URL=\"https://github.com/RetroAchievements/rcheevos/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Library to parse and evaluate achievements and leaderboards for RetroAchievements\"\nPKG_BUILD_FLAGS=\"+pic\"\n\npost_unpack() {\n  # rcheevos doesn't come with any build files, use a copy of the cmake file in\n  # game.libretro (depends/common/rcheevos/CMakeLists.txt)\n  cp \"${PKG_DIR}/source/CMakeLists.txt\" \"${PKG_BUILD}\"\n}\n"
  },
  {
    "path": "packages/emulation/rcheevos/source/CMakeLists.txt",
    "content": "project(rcheevos)\n\ncmake_minimum_required(VERSION 3.0)\n\n# Disable Lua for now\nadd_definitions(-DRC_DISABLE_LUA)\n\ninclude_directories(\n  include\n)\n\nadd_library(${PROJECT_NAME}lib\n  src/rcheevos/alloc.c\n  src/rcheevos/compat.c\n  src/rcheevos/condition.c\n  src/rcheevos/condset.c\n  src/rcheevos/consoleinfo.c\n  src/rcheevos/format.c\n  src/rcheevos/lboard.c\n  src/rcheevos/memref.c\n  src/rcheevos/operand.c\n  src/rcheevos/richpresence.c\n  src/rcheevos/runtime.c\n  src/rcheevos/runtime_progress.c\n  src/rcheevos/trigger.c\n  src/rcheevos/value.c\n  src/rhash/cdreader.c\n  src/rhash/hash.c\n  src/rhash/md5.c\n  src/rurl/url.c\n)\n\n#add_dependencies(rcheevos\n#  lua # TODO\n#)\n\n#target_link_libraries(rcheevos\n#  lua\n#)\n\ninstall(TARGETS\n  ${PROJECT_NAME}lib\n  ARCHIVE DESTINATION\n    lib\n  DESTINATION\n    lib\n)\n\ninstall(\n  FILES\n    include/rcheevos.h\n    include/rconsoles.h\n    include/rhash.h\n    include/rurl.h\n  DESTINATION\n    include/${PROJECT_NAME}\n)\n\n#install(\n#  DIRECTORY\n#    include\n#  DESTINATION\n#    include\n#)\n"
  },
  {
    "path": "packages/graphics/assimp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"assimp\"\nPKG_VERSION=\"5.2.5\"\nPKG_SHA256=\"b5219e63ae31d895d60d98001ee5bb809fb2c7b2de1e7f78ceeb600063641e1a\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://github.com/assimp/assimp\"\nPKG_URL=\"https://github.com/assimp/assimp/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib\"\nPKG_LONGDESC=\"A library to import and export various 3d-model-formats including scene-post-processing to generate missing render data.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DASSIMP_BUILD_ASSIMP_TOOLS=OFF \\\n                       -DASSIMP_BUILD_TESTS=OFF \\\n                       -DASSIMP_WARNINGS_AS_ERRORS=OFF\"\n"
  },
  {
    "path": "packages/graphics/bcm2835-driver/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"bcm2835-driver\"\nPKG_VERSION=\"fdb9eafae4b83e553593937eae8e77b0193903c3\"\nPKG_SHA256=\"ae590baa29a507fa50b5beae46643519a2d2e012945668cfc7393f9275793c78\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"http://www.broadcom.com\"\nPKG_URL=\"${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain dtc\"\nPKG_LONGDESC=\"OpenMAX-bcm2835: OpenGL-ES and OpenMAX driver for BCM2835\"\nPKG_TOOLCHAIN=\"manual\"\n\n# Set SoftFP ABI or HardFP ABI\nif [ \"${TARGET_FLOAT}\" = \"soft\" ]; then\n  PKG_FLOAT=\"softfp\"\nelse\n  PKG_FLOAT=\"hardfp\"\nfi\n\nmakeinstall_target() {\n  # Install vendor header files except proprietary GL headers\n  mkdir -p ${SYSROOT_PREFIX}/usr/include\n    for f in $(cd ${PKG_FLOAT}/opt/vc/include; ls | grep -v \"GL\"); do\n      cp -PRv ${PKG_FLOAT}/opt/vc/include/${f} ${SYSROOT_PREFIX}/usr/include\n    done\n\n  # Install vendor libs & pkgconfigs except proprietary GL libs\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n    for f in $(cd ${PKG_FLOAT}/opt/vc/lib; ls *.so *.a | grep -Ev \"^lib(EGL|GL)\"); do\n      cp -PRv ${PKG_FLOAT}/opt/vc/lib/${f}              ${SYSROOT_PREFIX}/usr/lib\n    done\n    mkdir -p ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n      for f in $(cd ${PKG_FLOAT}/opt/vc/lib/pkgconfig; ls | grep -v \"gl\"); do\n        cp -PRv ${PKG_FLOAT}/opt/vc/lib/pkgconfig/${f}  ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n      done\n\n  # Update prefix in vendor pkgconfig files\n  for PKG_CONFIGS in $(find \"${SYSROOT_PREFIX}/usr/lib\" -type f -name \"*.pc\" 2>/dev/null); do\n    sed -e \"s#prefix=/opt/vc#prefix=/usr#g\" -i \"${PKG_CONFIGS}\"\n  done\n\n  # Create symlinks to /opt/vc to satisfy hardcoded include & lib paths\n  mkdir -p ${SYSROOT_PREFIX}/opt/vc\n    ln -sf ${SYSROOT_PREFIX}/usr/lib     ${SYSROOT_PREFIX}/opt/vc/lib\n    ln -sf ${SYSROOT_PREFIX}/usr/include ${SYSROOT_PREFIX}/opt/vc/include\n\n  # Install vendor libs except proprietary GL\n  mkdir -p ${INSTALL}/usr/lib\n    for f in $(cd ${PKG_FLOAT}/opt/vc/lib; ls *.so | grep -Ev \"^lib(EGL|GL)\"); do\n      cp -PRv ${PKG_FLOAT}/opt/vc/lib/${f} ${INSTALL}/usr/lib\n    done\n\n  # Install useful tools\n  mkdir -p ${INSTALL}/usr/bin\n    cp -PRv ${PKG_FLOAT}/opt/vc/bin/dtoverlay  ${INSTALL}/usr/bin\n    ln -s dtoverlay                            ${INSTALL}/usr/bin/dtparam\n    cp -PRv ${PKG_FLOAT}/opt/vc/bin/vcdbg      ${INSTALL}/usr/bin\n    cp -PRv ${PKG_FLOAT}/opt/vc/bin/vcgencmd   ${INSTALL}/usr/bin\n    cp -PRv ${PKG_FLOAT}/opt/vc/bin/vcmailbox  ${INSTALL}/usr/bin\n    cp -PRv ${PKG_FLOAT}/opt/vc/bin/tvservice  ${INSTALL}/usr/bin\n    cp -PRv ${PKG_FLOAT}/opt/vc/bin/edidparser ${INSTALL}/usr/bin\n\n  # Create symlinks to /opt/vc to satisfy hardcoded lib paths\n  mkdir -p ${INSTALL}/opt/vc\n    ln -sf /usr/bin ${INSTALL}/opt/vc/bin\n    ln -sf /usr/lib ${INSTALL}/opt/vc/lib\n}\n\n"
  },
  {
    "path": "packages/graphics/cairo/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"cairo\"\nPKG_VERSION=\"1.17.6\"\nPKG_SHA256=\"4eebc4c2bad0402bc3f501db184417094657d111fb6c06f076a82ea191fe1faf\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://cairographics.org/\"\nPKG_URL=\"https://download.gnome.org/sources/cairo/$(get_pkg_version_maj_min)/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib freetype fontconfig glib libpng pixman\"\nPKG_LONGDESC=\"Cairo is a vector graphics library with cross-device output support.\"\nPKG_TOOLCHAIN=\"configure\"\n\nconfigure_package() {\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_DEPENDS_TARGET+=\" libXrender libX11 mesa\"\n  fi\n\n  if [ \"${OPENGL_SUPPORT}\" = \"yes\" ]; then\n    PKG_DEPENDS_TARGET+=\" ${OPENGL}\"\n  elif [ \"${OPENGLES_SUPPORT}\" = \"yes\" ]; then\n    PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\n  fi\n}\n\npre_configure_target() {\n  PKG_CONFIGURE_OPTS_TARGET=\"--disable-silent-rules \\\n                             --enable-shared \\\n                             --disable-static \\\n                             --disable-gtk-doc \\\n                             --enable-largefile \\\n                             --enable-atomic \\\n                             --disable-gcov \\\n                             --disable-valgrind \\\n                             --disable-xcb \\\n                             --disable-xlib-xcb \\\n                             --disable-xcb-shm \\\n                             --disable-qt \\\n                             --disable-quartz \\\n                             --disable-quartz-font \\\n                             --disable-quartz-image \\\n                             --disable-win32 \\\n                             --disable-win32-font \\\n                             --disable-os2 \\\n                             --disable-beos \\\n                             --disable-cogl \\\n                             --disable-drm \\\n                             --disable-gallium \\\n                             --enable-png \\\n                             --disable-directfb \\\n                             --disable-vg \\\n                             --disable-wgl \\\n                             --disable-script \\\n                             --enable-ft \\\n                             --enable-fc \\\n                             --enable-ps \\\n                             --enable-pdf \\\n                             --enable-svg \\\n                             --disable-test-surfaces \\\n                             --disable-tee \\\n                             --disable-xml \\\n                             --enable-pthread \\\n                             --enable-gobject=yes \\\n                             --disable-full-testing \\\n                             --disable-rpath \\\n                             --disable-trace \\\n                             --enable-interpreter \\\n                             --disable-symbol-lookup \\\n                             --enable-some-floating-point \\\n                             --with-gnu-ld\"\n\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_CONFIGURE_OPTS_TARGET+=\" --x-includes=\"${SYSROOT_PREFIX}/usr/include\" \\\n                                 --x-libraries=\"${SYSROOT_PREFIX}/usr/lib\" \\\n                                 --enable-xlib \\\n                                 --enable-xlib-xrender \\\n                                 --with-x\"\n  else\n    PKG_CONFIGURE_OPTS_TARGET+=\" --disable-xlib \\\n                                 --disable-xlib-xrender \\\n                                 --without-x\"\n  fi\n\n  if [ \"${OPENGL_SUPPORT}\" = \"yes\" ]; then\n    PKG_CONFIGURE_OPTS_TARGET+=\" --enable-gl \\\n                                 --enable-glx \\\n                                 --disable-glesv2 \\\n                                 --disable-egl\"\n  elif [ \"${OPENGLES_SUPPORT}\" = \"yes\" ]; then\n    PKG_CONFIGURE_OPTS_TARGET+=\" --disable-gl \\\n                                 --disable-glx \\\n                                 --enable-glesv2 \\\n                                 --enable-egl\"\n  else\n    PKG_CONFIGURE_OPTS_TARGET+=\" --disable-gl \\\n                                 --disable-glx \\\n                                 --disable-glesv2 \\\n                                 --disable-egl\"\n  fi\n}\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/graphics/ftgl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"ftgl\"\nPKG_VERSION=\"2.1.2\"\nPKG_SHA256=\"0f61d978c28cd5d78daded591f5b03f71248c0a51c7965733e8729c874265f50\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://sourceforge.net/projects/ftgl/\"\nPKG_URL=\"${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain freetype\"\nPKG_LONGDESC=\"a free cross-platform Open Source C++ library that uses Freetype2 to simplify rendering fonts in OpenGL applications\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DOUTPUT_DIR=${SYSROOT_PREFIX}/usr\"\n"
  },
  {
    "path": "packages/graphics/ftgl/patches/ftgl-01-cmake.patch",
    "content": "From c6dea8249d50f1f463db6ca89bc582259c54b86a Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Sat, 4 Jul 2015 12:42:40 +0300\nSubject: [PATCH] cmake\n\n---\n CMakeLists.txt |   16 ++++++++++++++++\n 1 file changed, 16 insertions(+)\n create mode 100644 CMakeLists.txt\n\ndiff --git a/CMakeLists.txt b/CMakeLists.txt\nnew file mode 100644\nindex 0000000..18791c4\n--- /dev/null\n+++ b/CMakeLists.txt\n@@ -0,0 +1,16 @@\n+project(ftgl)\n+\n+cmake_minimum_required(VERSION 2.6)\n+enable_language(CXX)\n+\n+include(ExternalProject)\n+\n+externalproject_add(ftgl\n+                    SOURCE_DIR ${CMAKE_SOURCE_DIR}\n+                    UPDATE_COMMAND cd unix && autoreconf -vif \n+                    CONFIGURE_COMMAND cd unix && CXXFLAGS=-fpermissive ./configure --prefix=${OUTPUT_DIR} --with-freetype-prefix=${OUTPUT_DIR} --with-pic\n+                    BUILD_COMMAND cd unix && make\n+                    INSTALL_COMMAND \"\"\n+                    BUILD_IN_SOURCE 1)\n+\n+install(CODE \"execute_process(COMMAND make install WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/unix)\")\n-- \n1.7.10.4\n\n"
  },
  {
    "path": "packages/graphics/ftgl/patches/ftgl-01-ftgl-disable-docs.patch",
    "content": "--- ftgl.orig/unix/Makefile\t2014-08-04 17:21:22.210742862 +0200\n+++ ftgl/unix/Makefile\t2003-01-12 22:27:04.000000000 +0100\n@@ -1,7 +1,7 @@\n top_builddir=.\n -include $(top_builddir)/Make.conf\n \n-SUBDIRS = src demo docs\n+SUBDIRS = src demo\n \n AUTOGEN = Make.conf config.log config.status libtool autom4te.cache ftgl.pc\n AUTOGEN_MAINT = aclocal.m4 acinclude.m4 config.guess config.sub configure ltmain.sh install-sh\n\n"
  },
  {
    "path": "packages/graphics/gdk-pixbuf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gdk-pixbuf\"\nPKG_VERSION=\"2.42.10\"\nPKG_SHA256=\"ee9b6c75d13ba096907a2e3c6b27b61bcd17f5c7ebeab5a5b439d2f2e39fe44b\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.gtk.org/\"\nPKG_URL=\"https://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/${PKG_VERSION:0:4}/gdk-pixbuf-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain glib libjpeg-turbo libpng jasper shared-mime-info tiff\"\nPKG_DEPENDS_CONFIG=\"shared-mime-info\"\nPKG_LONGDESC=\"GdkPixbuf is a a GNOME library for image loading and manipulation.\"\n\nconfigure_package() {\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_DEPENDS_TARGET+=\" libX11\"\n  fi\n}\n\npre_configure_target() {\n  PKG_MESON_OPTS_TARGET=\"--wrap-mode=nodownload \\\n                         -Dgtk_doc=false \\\n                         -Ddocs=false \\\n                         -Dintrospection=disabled \\\n                         -Dman=false \\\n                         -Drelocatable=false \\\n                         -Dinstalled_tests=false \\\n                         -Dtests=false\"\n\n  if [ \"${DISPLAYSERVER}\" != \"x11\" ]; then\n    PKG_MESON_OPTS_TARGET+=\" -Dbuiltin_loaders=all\"\n  fi\n}\n"
  },
  {
    "path": "packages/graphics/giflib/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"giflib\"\nPKG_VERSION=\"5.2.1\"\nPKG_SHA256=\"31da5562f44c5f15d63340a09a4fd62b48c45620cd302f77a6d9acf0077879bd\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://giflib.sourceforge.net/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/giflib/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"zlib:host\"\nPKG_DEPENDS_TARGET=\"toolchain zlib\"\nPKG_LONGDESC=\"giflib: giflib service library\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_host() {\n  make libgif.a CFLAGS=\"${CFLAGS}\" LDFLAGS=\"${LDFLAGS}\"\n}\n\nmakeinstall_host() {\n  make install-include PREFIX=\"${TOOLCHAIN}\"\n  make install-lib PREFIX=\"${TOOLCHAIN}\"\n}\n"
  },
  {
    "path": "packages/graphics/giflib/patches/giflib-01-static-lib.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -99,9 +99,6 @@\n install-lib:\n \t$(INSTALL) -d \"$(DESTDIR)$(LIBDIR)\"\n \t$(INSTALL) -m 644 libgif.a \"$(DESTDIR)$(LIBDIR)/libgif.a\"\n-\t$(INSTALL) -m 755 libgif.so \"$(DESTDIR)$(LIBDIR)/libgif.so.$(LIBVER)\"\n-\tln -sf libgif.so.$(LIBVER) \"$(DESTDIR)$(LIBDIR)/libgif.so.$(LIBMAJOR)\"\n-\tln -sf libgif.so.$(LIBMAJOR) \"$(DESTDIR)$(LIBDIR)/libgif.so\"\n install-man:\n \t$(INSTALL) -d \"$(DESTDIR)$(MANDIR)/man1\"\n \t$(INSTALL) -m 644 doc/*.1 \"$(DESTDIR)$(MANDIR)/man1\"\n"
  },
  {
    "path": "packages/graphics/glew/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"glew\"\nPKG_VERSION=\"2.2.0\"\nPKG_SHA256=\"d4fc82893cfb00109578d0a1a2337fb8ca335b3ceccf97b97e5cc7f08e4353e1\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://glew.sourceforge.net/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/glew/glew/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tgz\"\nPKG_DEPENDS_TARGET=\"toolchain libX11\"\nPKG_LONGDESC=\"A cross-platform C/C++ extension loading library.\"\n\nmake_target() {\n  make CC=\"${CC}\" LD=\"${CC}\" AR=\"${AR}\" \\\n       POPT=\"${CFLAGS}\" LDFLAGS.EXTRA=\"${LDFLAGS}\" \\\n       GLEW_DEST=\"/usr\" LIBDIR=\"/usr/lib\" lib/libGLEW.a glew.pc\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n    cp -PR lib/libGLEW.a ${SYSROOT_PREFIX}/usr/lib\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n    cp -PR glew.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/include\n    cp -PR include/GL ${SYSROOT_PREFIX}/usr/include\n}\n"
  },
  {
    "path": "packages/graphics/glew/patches/glew-01-fix-pkgconf.patch",
    "content": "diff -Naur glew-1.13.0/glew.pc.in glew-1.13.0.patch/glew.pc.in\n--- glew-1.13.0/glew.pc.in\t2015-08-10 13:47:22.000000000 +0200\n+++ glew-1.13.0.patch/glew.pc.in\t2015-11-19 10:01:42.694904497 +0100\n@@ -1,6 +1,6 @@\n prefix=@prefix@\n exec_prefix=${prefix}\n-libdir=@libdir@\n+libdir=${exec_prefix}/lib\n includedir=${prefix}/include\n \n Name: glew\n"
  },
  {
    "path": "packages/graphics/glm/config/glm.pc",
    "content": "prefix=/usr\nincludedir=${prefix}/include\n\nName: GLM\nDescription: OpenGL Mathematics\nVersion: @@VERSION@@\nCflags: -I${includedir}\n"
  },
  {
    "path": "packages/graphics/glm/config/glmConfig.cmake",
    "content": "set(GLM_VERSION \"@@VERSION@@\")\n\n\n####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######\nget_filename_component(PACKAGE_PREFIX_DIR \"${CMAKE_CURRENT_LIST_DIR}/../../../\" ABSOLUTE)\n\nmacro(set_and_check _var _file)\n  set(${_var} \"${_file}\")\n  if(NOT EXISTS \"${_file}\")\n    message(FATAL_ERROR \"File or directory ${_file} referenced by variable ${_var} does not exist !\")\n  endif()\nendmacro()\n\n####################################################################################\n\nset_and_check(GLM_INCLUDE_DIRS \"${PACKAGE_PREFIX_DIR}/include\")\n\nif (NOT CMAKE_VERSION VERSION_LESS \"3.0\")\n    include(\"${CMAKE_CURRENT_LIST_DIR}/glmTargets.cmake\")\nendif()\n"
  },
  {
    "path": "packages/graphics/glm/config/glmConfigVersion.cmake",
    "content": "# This is a basic version file for the Config-mode of find_package().\n# It is used by write_basic_package_version_file() as input file for configure_file()\n# to create a version-file which can be installed along a config.cmake file.\n#\n# The created file sets PACKAGE_VERSION_EXACT if the current version string and\n# the requested version string are exactly the same and it sets\n# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.\n# The variable CVF_VERSION must be set before calling configure_file().\n\nset(PACKAGE_VERSION \"@@VERSION@@\")\n\nif(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)\n  set(PACKAGE_VERSION_COMPATIBLE FALSE)\nelse()\n  set(PACKAGE_VERSION_COMPATIBLE TRUE)\n  if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)\n    set(PACKAGE_VERSION_EXACT TRUE)\n  endif()\nendif()\n\n# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:\nif(\"${CMAKE_SIZEOF_VOID_P}\" STREQUAL \"\" OR \"@@VOID_SIZE@@\" STREQUAL \"\")\n   return()\nendif()\n\n# check that the installed version has the same 32/64bit-ness as the one which is currently searching:\nif(NOT CMAKE_SIZEOF_VOID_P STREQUAL \"@@VOID_SIZE@@\")\n   math(EXPR installedBits \"@@VOID_SIZE@@ * 8\")\n   set(PACKAGE_VERSION \"${PACKAGE_VERSION} (${installedBits}bit)\")\n   set(PACKAGE_VERSION_UNSUITABLE FALSE)\nendif()\n"
  },
  {
    "path": "packages/graphics/glm/config/glmTargets.cmake",
    "content": "# Generated by CMake\n\nif(\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" LESS 2.5)\n   message(FATAL_ERROR \"CMake >= 2.6.0 required\")\nendif()\ncmake_policy(PUSH)\ncmake_policy(VERSION 2.6)\n#----------------------------------------------------------------\n# Generated CMake target import file.\n#----------------------------------------------------------------\n\n# Commands may need to know the format version.\nset(CMAKE_IMPORT_FILE_VERSION 1)\n\n# Protect against multiple inclusion, which would fail when already imported targets are added once more.\nset(_targetsDefined)\nset(_targetsNotDefined)\nset(_expectedTargets)\nforeach(_expectedTarget glm)\n  list(APPEND _expectedTargets ${_expectedTarget})\n  if(NOT TARGET ${_expectedTarget})\n    list(APPEND _targetsNotDefined ${_expectedTarget})\n  endif()\n  if(TARGET ${_expectedTarget})\n    list(APPEND _targetsDefined ${_expectedTarget})\n  endif()\nendforeach()\nif(\"${_targetsDefined}\" STREQUAL \"${_expectedTargets}\")\n  unset(_targetsDefined)\n  unset(_targetsNotDefined)\n  unset(_expectedTargets)\n  set(CMAKE_IMPORT_FILE_VERSION)\n  cmake_policy(POP)\n  return()\nendif()\nif(NOT \"${_targetsDefined}\" STREQUAL \"\")\n  message(FATAL_ERROR \"Some (but not all) targets in this export set were already defined.\\nTargets Defined: ${_targetsDefined}\\nTargets not yet defined: ${_targetsNotDefined}\\n\")\nendif()\nunset(_targetsDefined)\nunset(_targetsNotDefined)\nunset(_expectedTargets)\n\n\n# Compute the installation prefix relative to this file.\nget_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n# Use original install prefix when loaded through a\n# cross-prefix symbolic link such as /lib -> /usr/lib.\nget_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH)\nget_filename_component(_realOrig \"/usr/lib/cmake/glm\" REALPATH)\nif(_realCurr STREQUAL _realOrig)\n  set(_IMPORT_PREFIX \"/usr/lib/cmake/glm\")\nendif()\nunset(_realOrig)\nunset(_realCurr)\nget_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)\nif(_IMPORT_PREFIX STREQUAL \"/\")\n  set(_IMPORT_PREFIX \"\")\nendif()\n\n# Create imported target glm\nadd_library(glm INTERFACE IMPORTED)\n\nset_target_properties(glm PROPERTIES\n  INTERFACE_INCLUDE_DIRECTORIES \"${_IMPORT_PREFIX}/include\"\n)\n\nif(CMAKE_VERSION VERSION_LESS 3.0.0)\n  message(FATAL_ERROR \"This file relies on consumers using CMake 3.0.0 or greater.\")\nendif()\n\n# Load information for each installed configuration.\nget_filename_component(_DIR \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\nfile(GLOB CONFIG_FILES \"${_DIR}/glmTargets-*.cmake\")\nforeach(f ${CONFIG_FILES})\n  include(${f})\nendforeach()\n\n# Cleanup temporary variables.\nset(_IMPORT_PREFIX)\n\n# Loop over all imported files and verify that they actually exist\nforeach(target ${_IMPORT_CHECK_TARGETS} )\n  foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )\n    if(NOT EXISTS \"${file}\" )\n      message(FATAL_ERROR \"The imported target \\\"${target}\\\" references the file\n   \\\"${file}\\\"\nbut this file does not exist.  Possible reasons include:\n* The file was deleted, renamed, or moved to another location.\n* An install or uninstall procedure did not complete successfully.\n* The installation package was faulty and contained\n   \\\"${CMAKE_CURRENT_LIST_FILE}\\\"\nbut not all the files it references.\n\")\n    endif()\n  endforeach()\n  unset(_IMPORT_CHECK_FILES_FOR_${target})\nendforeach()\nunset(_IMPORT_CHECK_TARGETS)\n\n# This file does not depend on other imported targets which have\n# been exported from the same project but in a separate export set.\n\n# Commands beyond this point should not need to know the version.\nset(CMAKE_IMPORT_FILE_VERSION)\ncmake_policy(POP)\n"
  },
  {
    "path": "packages/graphics/glm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"glm\"\nPKG_VERSION=\"0.9.9.8\"\nPKG_SHA256=\"37e2a3d62ea3322e43593c34bae29f57e3e251ea89f4067506c94043769ade4c\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://glm.g-truc.net/\"\nPKG_URL=\"https://github.com/g-truc/glm/releases/download/${PKG_VERSION}/glm-${PKG_VERSION}.zip\"\nPKG_SOURCE_DIR=\"glm\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"OpenGL Mathematics (GLM)\"\n\n# Not needed by GLM itself, but users will need it. So instead of adding this\n# to every user, put it here once.\nif [ \"${OPENGLES_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\nfi\n\nif [ \"${OPENGL_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGL}\"\nfi\n\n# Hack install solution until cmake install restored in upstream package\nmakeinstall_target() {\n  target_has_feature 32bit && PKG_VOID_SIZE=4 || PKG_VOID_SIZE=8\n\n  for _dir in ${SYSROOT_PREFIX} ${INSTALL}; do\n    mkdir -p ${_dir}/usr/include ${_dir}/usr/lib/pkgconfig ${_dir}/usr/lib/cmake/glm\n      cp -r ${PKG_BUILD}/glm ${_dir}/usr/include\n      cp ${PKG_DIR}/config/glm.pc ${_dir}/usr/lib/pkgconfig\n      cp ${PKG_DIR}/config/*.cmake ${_dir}/usr/lib/cmake/glm\n\n      sed -e \"s/@@VERSION@@/${PKG_VERSION}/g\" \\\n          -e \"s/@@VOID_SIZE@@/${PKG_VOID_SIZE}/g\" \\\n          -i ${_dir}/usr/lib/pkgconfig/glm.pc ${_dir}/usr/lib/cmake/glm/*.cmake\n  done\n}\n"
  },
  {
    "path": "packages/graphics/glmark2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"glmark2\"\nPKG_VERSION=\"2023.01\"\nPKG_SHA256=\"8fece3fc323b643644a525be163dc4931a4189971eda1de8ad4c1712c5db3d67\"\nPKG_LICENSE=\"GPL-3.0-or-later\"\nPKG_SITE=\"https://github.com/glmark2/glmark2\"\nPKG_URL=\"https://github.com/glmark2/glmark2/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libjpeg-turbo libpng\"\nPKG_LONGDESC=\"glmark2 is an OpenGL 2.0 and ES 2.0 benchmark\"\n\nif [ \"${OPENGL_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGL}\"\nelif [ \"${OPENGLES_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\nfi\n\ncase ${DISPLAYSERVER} in\n  wl)\n    PKG_DEPENDS_TARGET+=\" wayland wayland-protocols\"\n    PKG_MESON_OPTS_TARGET=\"-Dflavors=wayland-glesv2\"\n    ;;\n  x11)\n    PKG_DEPENDS_TARGET+=\" libX11\"\n    PKG_MESON_OPTS_TARGET=\"-Dflavors=x11-gl\"\n    ;;\n  *)\n    PKG_DEPENDS_TARGET+=\" systemd libdrm\"\n    PKG_MESON_OPTS_TARGET=\"-Dflavors=drm-glesv2\"\n    ;;\nesac\n"
  },
  {
    "path": "packages/graphics/glu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"glu\"\nPKG_VERSION=\"9.0.2\"\nPKG_SHA256=\"6e7280ff585c6a1d9dfcdf2fca489251634b3377bfc33c29e4002466a38d02d4\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://gitlab.freedesktop.org/mesa/glu/\"\nPKG_URL=\"https://mesa.freedesktop.org/archive/glu/glu-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libglvnd mesa\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory mesa)\"\nPKG_LONGDESC=\"libglu is the The OpenGL utility library\"\n\nPKG_MESON_OPTS_TARGET=\"-Dgl_provider=gl\"\n"
  },
  {
    "path": "packages/graphics/harfbuzz/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"harfbuzz\"\nPKG_VERSION=\"6.0.0\"\nPKG_SHA256=\"1d1010a1751d076d5291e433c138502a794d679a7498d1268ee21e2d4a140eb4\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.freedesktop.org/wiki/Software/HarfBuzz\"\nPKG_URL=\"https://github.com/harfbuzz/harfbuzz/releases/download/${PKG_VERSION}/harfbuzz-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain cairo freetype glib\"\nPKG_LONGDESC=\"HarfBuzz is an OpenType text shaping engine.\"\n\nPKG_MESON_OPTS_TARGET=\"-Dbenchmark=disabled \\\n                       -Dcairo=enabled \\\n                       -Ddocs=disabled \\\n                       -Dfreetype=enabled \\\n                       -Dglib=enabled \\\n                       -Dgobject=disabled \\\n                       -Dgraphite=disabled \\\n                       -Dicu=disabled \\\n                       -Dtests=disabled\"\n"
  },
  {
    "path": "packages/graphics/jasper/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"jasper\"\nPKG_VERSION=\"4.0.0\"\nPKG_SHA256=\"977c4c2e4210f4e37313cd2232d99e73d57ab561917b3c060bcdd5e83a0a13f1\"\nPKG_LICENSE=\"OpenSource\"\nPKG_SITE=\"http://www.ece.uvic.ca/~mdadams/jasper/\"\nPKG_URL=\"https://github.com/jasper-software/jasper/archive/refs/tags/version-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libjpeg-turbo\"\nPKG_LONGDESC=\"A implementation of the ISO/IEC 15444-1 also known as JPEG-2000 standard for image compression.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DJAS_ENABLE_DOC=false \\\n                       -DJAS_ENABLE_PROGRAMS=false \\\n                       -DJAS_ENABLE_SHARED=false \\\n                       -DJAS_STDC_VERSION=201710L\"\n\npre_configure_target() {\n  export CFLAGS=\"${CFLAGS} -std=gnu17\"\n}\n"
  },
  {
    "path": "packages/graphics/kmscube/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"kmscube\"\nPKG_VERSION=\"9f63f359fab1b5d8e862508e4e51c9dfe339ccb0\"\nPKG_SHA256=\"896ac76671a9b89836a7014b16cc85b45b041e03fe34a8f529f4718aa2b15cef\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://gitlab.freedesktop.org/mesa/kmscube\"\nPKG_URL=\"https://gitlab.freedesktop.org/mesa/kmscube/-/archive/master/kmscube-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Example KMS/GBM/EGL application\"\n\nif [ \"${OPENGLES_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\nelif [ \"${OPENGL_SUPPORT}\" = \"yes\" ]; then\n  echo \"kmscube only supports OpenGLESv2\"\n  exit 0\nfi\n"
  },
  {
    "path": "packages/graphics/kmsxx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"kmsxx\"\nPKG_VERSION=\"2bd85abc108e0688384f42b0ec83dcd5a622d50d\"\nPKG_SHA256=\"b8746018d076f1474b48211ff5c1895dc668d93d206d0b2dbd03da1a3d5bb12b\"\nPKG_LICENSE=\"MPL-2.0\"\nPKG_SITE=\"https://github.com/tomba/kmsxx\"\nPKG_URL=\"https://github.com/tomba/kmsxx/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libdrm libfmt\"\nPKG_LONGDESC=\"Library and utilities for kernel mode setting\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_MESON_OPTS_TARGET=\"-Ddefault_library=shared \\\n                       -Dkmscube=false \\\n                       -Domap=disabled \\\n                       -Dpykms=disabled\"\n\n"
  },
  {
    "path": "packages/graphics/lcms2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"lcms2\"\nPKG_VERSION=\"2.14\"\nPKG_SHA256=\"28474ea6f6591c4d4cee972123587001a4e6e353412a41b3e9e82219818d5740\"\nPKG_LICENSE=\"MIT/GPLv3\"\nPKG_SITE=\"http://www.littlecms.com\"\nPKG_URL=\"https://github.com/mm2/Little-CMS/releases/download/lcms${PKG_VERSION}/lcms2-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain tiff\"\nPKG_LONGDESC=\"An small-footprint color management engine, with special focus on accuracy and performance.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_MESON_OPTS_TARGET=\"--default-library static\"\n"
  },
  {
    "path": "packages/graphics/libde265/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libde265\"\nPKG_VERSION=\"1.0.9\"\nPKG_SHA256=\"29bc6b64bf658d81a4446a3f98e0e4636fd4fd3d971b072d440cef987d5439de\"\nPKG_LICENSE=\"LGPLv3\"\nPKG_SITE=\"http://www.libde265.org\"\nPKG_URL=\"https://github.com/strukturag/libde265/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Open h.265 video codec implementation.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_SHARED_LIBS=OFF \\\n                       -DENABLE_SDL=OFF \\\n                       -DENABLE_DECODER=OFF \\\n                       -DENABLE_ENCODER=OFF\"\n"
  },
  {
    "path": "packages/graphics/libde265/patches/libde265-0002-Add-CMake-option-ENABLE-ENCODER.patch",
    "content": "commit 657a6ea9161d1afe780bb46c4df0e95473353e6b\nAuthor: Rudi Heitbaum <rudi@heitbaum.com>\nDate:   Sun Sep 4 00:45:25 2022 +0000\n\n    Add CMake options ENABLE_DECODER and ENABLE_ENCODER\n\ndiff --git a/CMakeLists.txt b/CMakeLists.txt\nindex ff93c52..160dbb1 100644\n--- a/CMakeLists.txt\n+++ b/CMakeLists.txt\n@@ -68,6 +68,13 @@ if(MSVC)\n   add_definitions(-DHAVE_STDBOOL_H)\n endif()\n \n+option(ENABLE_DECODER \"Enable Decoder\" ON)\n+option(ENABLE_ENCODER \"Enable Encoder\" ON)\n+\n add_subdirectory (libde265)\n-add_subdirectory (dec265)\n-add_subdirectory (enc265)\n+if (ENABLE_DECODER)\n+  add_subdirectory (dec265)\n+endif()\n+if (ENABLE_ENCODER)\n+  add_subdirectory (enc265)\n+endif()\n"
  },
  {
    "path": "packages/graphics/libdrm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libdrm\"\nPKG_VERSION=\"2.4.115\"\nPKG_SHA256=\"554cfbfe0542bddb391b4e3e05bfbbfc3e282b955bd56218d21c0616481f65eb\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://dri.freedesktop.org\"\nPKG_URL=\"https://dri.freedesktop.org/libdrm/libdrm-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libpciaccess\"\nPKG_LONGDESC=\"The userspace interface library to kernel DRM services.\"\n\nget_graphicdrivers\n\nPKG_MESON_OPTS_TARGET=\"-Dnouveau=disabled \\\n                       -Domap=disabled \\\n                       -Dexynos=disabled \\\n                       -Dtegra=disabled \\\n                       -Dcairo-tests=disabled \\\n                       -Dman-pages=disabled \\\n                       -Dvalgrind=disabled \\\n                       -Dfreedreno-kgsl=false \\\n                       -Dinstall-test-programs=true \\\n                       -Dudev=false\"\n\nlistcontains \"${GRAPHIC_DRIVERS}\" \"(crocus|i915|iris)\" &&\n  PKG_MESON_OPTS_TARGET+=\" -Dintel=enabled\" || PKG_MESON_OPTS_TARGET+=\" -Dintel=disabled\"\n\nlistcontains \"${GRAPHIC_DRIVERS}\" \"(r300|r600|radeonsi)\" &&\n  PKG_MESON_OPTS_TARGET+=\" -Dradeon=enabled\" || PKG_MESON_OPTS_TARGET+=\" -Dradeon=disabled\"\n\nlistcontains \"${GRAPHIC_DRIVERS}\" \"radeonsi\" &&\n  PKG_MESON_OPTS_TARGET+=\" -Damdgpu=enabled\" || PKG_MESON_OPTS_TARGET+=\" -Damdgpu=disabled\"\n\nlistcontains \"${GRAPHIC_DRIVERS}\" \"vmware\" &&\n  PKG_MESON_OPTS_TARGET+=\" -Dvmwgfx=enabled\" || PKG_MESON_OPTS_TARGET+=\" -Dvmwgfx=disabled\"\n\nlistcontains \"${GRAPHIC_DRIVERS}\" \"vc4\" &&\n  PKG_MESON_OPTS_TARGET+=\" -Dvc4=enabled\" || PKG_MESON_OPTS_TARGET+=\" -Dvc4=disabled\"\n\nlistcontains \"${GRAPHIC_DRIVERS}\" \"freedreno\" &&\n  PKG_MESON_OPTS_TARGET+=\" -Dfreedreno=enabled\" || PKG_MESON_OPTS_TARGET+=\" -Dfreedreno=disabled\"\n\nlistcontains \"${GRAPHIC_DRIVERS}\" \"etnaviv\" &&\n  PKG_MESON_OPTS_TARGET+=\" -Detnaviv=enabled\" || PKG_MESON_OPTS_TARGET+=\" -Detnaviv=disabled\"\n\npost_makeinstall_target() {\n  # Remove all test programs installed by install-test-programs=true except modetest\n  for PKG_LIBDRM_TEST in \\\n    drmdevice modeprint proptest vbltest\n  do\n    safe_remove ${INSTALL}/usr/bin/${PKG_LIBDRM_TEST}\n  done\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"radeonsi\"; then\n    safe_remove ${INSTALL}/usr/bin/amdgpu_stress\n  fi\n}\n"
  },
  {
    "path": "packages/graphics/libepoxy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n# libepoxy (actually) needs to be built shared, to avoid\n# (EE) Failed to load /usr/lib/xorg/modules/libglamoregl.so:\n# /usr/lib/xorg/modules/libglamoregl.so: undefined symbol: epoxy_eglCreateImageKHR\n# in Xorg.log\n\nPKG_NAME=\"libepoxy\"\nPKG_VERSION=\"1.5.10\"\nPKG_SHA256=\"a7ced37f4102b745ac86d6a70a9da399cc139ff168ba6b8002b4d8d43c900c15\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/anholt/libepoxy\"\nPKG_URL=\"https://github.com/anholt/libepoxy/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Epoxy is a library for handling OpenGL function pointer management for you.\"\n\nif [ \"${OPENGL_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGL}\"\nfi\n\nif [ \"${OPENGLES_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\nfi\n\nif [ \"${DISPLAYSERVER}\" != \"x11\" ]; then\n  PKG_MESON_OPTS_TARGET=\"-Dglx=no\"\nfi\n"
  },
  {
    "path": "packages/graphics/libglvnd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libglvnd\"\nPKG_VERSION=\"1.6.0\"\nPKG_SHA256=\"e31dd71441604cf7467397e740af8070caa84133b5ed71241d3d5ca84c950baf\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/NVIDIA/libglvnd\"\nPKG_URL=\"https://github.com/NVIDIA/libglvnd/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"libglvnd is a vendor-neutral dispatch layer for arbitrating OpenGL API calls between multiple vendors.\"\n\nconfigure_package() {\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_DEPENDS_TARGET+=\" libX11 libXext xorgproto\"\n  fi\n}\n\npre_configure_target(){\n  PKG_MESON_OPTS_TARGET=\"-Dgles1=false\"\n\n  if [ \"${OPENGLES_SUPPORT}\" = \"no\" ]; then\n    PKG_MESON_OPTS_TARGET+=\" -Dgles2=false\"\n  fi\n}\n\npost_makeinstall_target() {\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    # Remove old symlinks to libGL.so.1.7.0 (GLVND)\n    safe_remove              ${INSTALL}/usr/lib/libGL.so\n    safe_remove              ${INSTALL}/usr/lib/libGL.so.1\n    # Create new symlinks to /var/lib/libGL.so\n    ln -sf libGL.so.1        ${INSTALL}/usr/lib/libGL.so\n    ln -sf /var/lib/libGL.so ${INSTALL}/usr/lib/libGL.so.1\n    # Create new symlink to libGL.so.1.7.0\n    ln -sf libGL.so.1.7.0    ${INSTALL}/usr/lib/libGL_glvnd.so.1\n\n    # Remove old symlinks to libGLX.so.0.0.0 (GLVND)\n    safe_remove               ${INSTALL}/usr/lib/libGLX.so\n    safe_remove               ${INSTALL}/usr/lib/libGLX.so.0\n    # Create new symlinks to /var/lib/libGLX.so\n    ln -sf libGLX.so.0        ${INSTALL}/usr/lib/libGLX.so\n    ln -sf /var/lib/libGLX.so ${INSTALL}/usr/lib/libGLX.so.0\n    # Create new symlink to libGLX.so.0.0.0\n    ln -sf libGLX.so.0.0.0    ${INSTALL}/usr/lib/libGLX_glvnd.so.0\n\n    # indirect rendering\n    ln -sf /var/lib/libGLX_indirect.so.0 ${INSTALL}/usr/lib/libGLX_indirect.so.0\n  fi\n}\n"
  },
  {
    "path": "packages/graphics/libheif/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libheif\"\nPKG_VERSION=\"1.14.2\"\nPKG_SHA256=\"d016905e247d6952cd7ee4f9b90957350b6a6caa466bc76fdfe6eb302b6d088c\"\nPKG_LICENSE=\"LGPLv3\"\nPKG_SITE=\"https://www.libde265.org\"\nPKG_URL=\"https://github.com/strukturag/libheif/releases/download/v${PKG_VERSION}/libheif-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libde265 libjpeg-turbo libpng\"\nPKG_LONGDESC=\"A HEIF file format decoder and encoder.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_SHARED_LIBS=OFF \\\n                       -DWITH_EXAMPLES=OFF \\\n                       -DWITH_AOM_DECODER=OFF \\\n                       -DWITH_AOM_ENCODER=OFF\"\n\npre_configure_target() {\n  export CXXFLAGS=\"${CXXFLAGS} -Wno-unused-variable\"\n}\n"
  },
  {
    "path": "packages/graphics/libjpeg-turbo/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libjpeg-turbo\"\nPKG_VERSION=\"2.1.4\"\nPKG_SHA256=\"a78b05c0d8427a90eb5b4eb08af25309770c8379592bb0b8a863373128e6143f\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libjpeg-turbo.org/\"\nPKG_URL=\"https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A high-speed version of libjpeg for x86 and x86-64 processors which uses SIMD.\"\nPKG_BUILD_FLAGS=\"+pic +pic:host\"\n\nPKG_CMAKE_OPTS_HOST=\"-DENABLE_STATIC=ON \\\n                     -DENABLE_SHARED=OFF \\\n                     -DWITH_JPEG8=ON \\\n                     -DWITH_SIMD=OFF\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DENABLE_STATIC=OFF \\\n                       -DENABLE_SHARED=ON \\\n                       -DWITH_JPEG8=ON\"\n\nif target_has_feature \"(neon|sse)\"; then\n  PKG_CMAKE_OPTS_TARGET+=\" -DWITH_SIMD=ON\"\nelse\n  PKG_CMAKE_OPTS_TARGET+=\" -DWITH_SIMD=OFF\"\nfi\n\nif [ ${TARGET_ARCH} = \"x86_64\" ]; then\n  PKG_DEPENDS_HOST+=\" nasm:host\"\n  PKG_DEPENDS_TARGET+=\" nasm:host\"\nfi\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/graphics/libmali/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libmali\"\nPKG_VERSION=\"d4000def121b818ae0f583d8372d57643f723fdc\"\nPKG_SHA256=\"4f2103fc927cc006ee5c9b647e899f50b0dcaeee127fec713387d06a333eb404\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"https://github.com/LibreELEC/libmali\"\nPKG_URL=\"https://github.com/LibreELEC/libmali/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"OpenGL ES user-space binary for the ARM Mali GPU family\"\nPKG_STAMP=\"${MALI_FAMILY}\"\n\nPKG_DEPENDS_TARGET=\"libdrm\"\n\nif listcontains \"${MALI_FAMILY}\" \"(t620|t720)\"; then\n  PKG_DEPENDS_TARGET+=\" wayland\"\nfi\n\nlistcontains \"${MALI_FAMILY}\" \"4[0-9]+\" && PKG_DEPENDS_TARGET+=\" mali-utgard\"\nlistcontains \"${MALI_FAMILY}\" \"t[0-9]+\" && PKG_DEPENDS_TARGET+=\" mali-midgard\"\nlistcontains \"${MALI_FAMILY}\" \"g[0-9]+\" && PKG_DEPENDS_TARGET+=\" mali-bifrost\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DMALI_VARIANT=${MALI_FAMILY// /;}\"\n\nif [ \"${TARGET_ARCH}\" = \"aarch64\" ]; then\n  PKG_CMAKE_OPTS_TARGET+=\" -DMALI_ARCH=aarch64-linux-gnu\"\nfi\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp -v ${PKG_DIR}/scripts/libmali-setup ${INSTALL}/usr/bin\n\n  if [ $(ls -1q ${INSTALL}/usr/lib/libmali-*.so | wc -l) -gt 1 ]; then\n    ln -sfv /var/lib/libmali/libmali.so ${INSTALL}/usr/lib/libmali.so\n  fi\n}\n\npost_install() {\n  enable_service libmali-setup.service\n}\n"
  },
  {
    "path": "packages/graphics/libmali/scripts/libmali-setup",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nGPUINFO=/sys/kernel/debug/mali/version\n[ ! -f \"$GPUINFO\" ] && GPUINFO=$(find /sys/devices/platform -name gpuinfo)\n\necho \"GPUINFO: $GPUINFO\"\n[ ! -f \"$GPUINFO\" ] && exit\n\nGPU=$(cat $GPUINFO)\necho \"GPU: $GPU\"\n\ncase $GPU in\n  Mali-400*) LIB=\"libmali-utgard-400-*.so\" ;;\n  Mali-450*) LIB=\"libmali-utgard-450-*.so\" ;;\n  Mali-T60x*) LIB=\"libmali-midgard-t60x-*.so\" ;;\n  Mali-T62x*) LIB=\"libmali-midgard-t620-*.so\" ;;\n  Mali-T72x*) LIB=\"libmali-midgard-t720-*.so\" ;;\n  Mali-T76x*r0p0*) LIB=\"libmali-midgard-t76x-*-r0p0-*.so\" ;;\n  Mali-T76x*r1p0*) LIB=\"libmali-midgard-t76x-*-r1p0-*.so\" ;;\n  Mali-T82x*) LIB=\"libmali-midgard-t82x-*.so\" ;;\n  Mali-T83x*) LIB=\"libmali-midgard-t83x-*.so\" ;;\n  Mali-T86x*) LIB=\"libmali-midgard-t86x-*.so\" ;;\n  Mali-T88x*) LIB=\"libmali-midgard-t88x-*.so\" ;;\n  Mali-G31*) LIB=\"libmali-bifrost-g31-*.so\" ;;\n  Mali-G51*) LIB=\"libmali-bifrost-g51-*.so\" ;;\n  Mali-G52*) LIB=\"libmali-bifrost-g52-*.so\" ;;\n  Mali-G71*) LIB=\"libmali-bifrost-g71-*.so\" ;;\n  Mali-G72*) LIB=\"libmali-bifrost-g72-*.so\" ;;\n  Mali-G76*) LIB=\"libmali-bifrost-g76-*.so\" ;;\nesac\n\necho \"LIB: $LIB\"\n[ -z \"$LIB\" ] && exit\n\nLIBMALI=$(find /usr/lib -name $LIB)\n\necho \"LIBMALI: $LIBMALI\"\n[ ! -f \"$LIBMALI\" ] && exit\n\nmkdir -p /var/lib/libmali\nln -sf $LIBMALI /var/lib/libmali/libmali.so\n"
  },
  {
    "path": "packages/graphics/libmali/system.d/libmali-setup.service",
    "content": "[Unit]\nDescription=Setup symlink for ARM Mali library\nBefore=graphical.target\nAfter=multi-user.target\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/libmali-setup\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/graphics/libpng/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libpng\"\nPKG_VERSION=\"1.6.40\"\nPKG_SHA256=\"535b479b2467ff231a3ec6d92a525906fb8ef27978be4f66dbe05d3f3a01b3a1\"\nPKG_LICENSE=\"LibPNG2\"\nPKG_SITE=\"http://www.libpng.org/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/libpng/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"zlib:host\"\nPKG_DEPENDS_TARGET=\"toolchain zlib\"\nPKG_LONGDESC=\"An extensible file format for the lossless, portable, well-compressed storage of raster images.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"+pic +pic:host\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_lib_z_zlibVersion=yes \\\n                           --enable-static \\\n                           --enable-shared\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--enable-static --disable-shared\"\n\npre_configure_host() {\n  export CPPFLAGS=\"${CPPFLAGS} -I${TOOLCHAIN}/include\"\n}\n\npre_configure_target() {\n  export CPPFLAGS=\"${CPPFLAGS} -I${SYSROOT_PREFIX}/usr/include\"\n}\n\npost_makeinstall_target() {\n  sed -e \"s:\\([\\\"'= ]\\)/usr:\\\\1${SYSROOT_PREFIX}/usr:g\" \\\n      -e \"s:libs=\\\"-lpng16\\\":libs=\\\"-lpng16 -lz\\\":g\" \\\n      -i ${SYSROOT_PREFIX}/usr/bin/libpng*-config\n\n  sed -e 's|^Libs: -L${libdir} -lpng16|Libs: -L${libdir} -lpng16 -lz|g' \\\n      -i ${SYSROOT_PREFIX}/usr/lib/pkgconfig/libpng*.pc\n\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/graphics/libprojectM/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libprojectM\"\nPKG_VERSION=\"3.1.12\"\nPKG_SHA256=\"62b5b1b543b25cb8ad392d879378cfdc5c129165cf4d4f33fb159e364d42f135\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/projectM-visualizer/projectm\"\nPKG_URL=\"https://github.com/projectM-visualizer/projectm/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain freetype glm ${OPENGL}\"\nPKG_LONGDESC=\"A MilkDrop compatible opensource music visualizer.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-shared \\\n                           --enable-static \\\n                           --disable-qt \\\n                           --disable-pulseaudio \\\n                           --disable-jack \\\n                           --enable-preset-subdirs\"\n\n# workaround due broken release files, remove at next bump\npre_configure_target() {\n  ./autogen.sh\n}\n"
  },
  {
    "path": "packages/graphics/libraw/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libraw\"\nPKG_VERSION=\"0.21.1\"\nPKG_SHA256=\"630a6bcf5e65d1b1b40cdb8608bdb922316759bfb981c65091fec8682d1543cd\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://www.libraw.org/\"\nPKG_URL=\"https://www.libraw.org/data/LibRaw-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libjpeg-turbo lcms2\"\nPKG_LONGDESC=\"A library for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, and others)\"\nPKG_BUILD_FLAGS=\"+pic\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           --disable-openmp \\\n                           --enable-jpeg \\\n                           --disable-jasper \\\n                           --enable-lcms \\\n                           --disable-examples\"\n"
  },
  {
    "path": "packages/graphics/libspng/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"libspng\"\nPKG_VERSION=\"0.6.1\"\nPKG_SHA256=\"336856bea0216fe0ddc6cc584be5823cfd3a142e9d90d8e1635d2d2a5241f584\"\nPKG_LICENSE=\"BSD 2-clause 'Simplified'\"\nPKG_SITE=\"https://libspng.org/\"\nPKG_URL=\"https://github.com/randy408/libspng/archive/v$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_HOST=\"zlib:host\"\nPKG_DEPENDS_TARGET=\"toolchain zlib\"\nPKG_LONGDESC=\"libspng is a C library for reading and writing Portable Network Graphics (PNG) format files with a focus on security and ease of use.\"\nPKG_TOOLCHAIN=\"cmake\"\n\nPKG_CMAKE_OPTS_HOST=\"-DSPNG_STATIC=ON \\\n                     -DSPNG_SHARED=OFF\"\n"
  },
  {
    "path": "packages/graphics/libspng/patches/libspng-0001-implement-BGRA8-for-framebuffer.patch",
    "content": "From 394469b37c98a213b7ae2e2cdd257e98b6c40124 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 1 Dec 2020 07:51:01 +0100\nSubject: [PATCH] implement BGRA8 for framebuffer\n\n---\n spng/spng.c | 53 +++++++++++++++++++++++++++++++++++++++++++----------\n spng/spng.h |  1 +\n 2 files changed, 44 insertions(+), 10 deletions(-)\n\ndiff --git a/spng/spng.c b/spng/spng.c\nindex 6b24763..00feaca 100644\n--- a/spng/spng.c\n+++ b/spng/spng.c\n@@ -458,6 +458,18 @@ static void rgb8_row_to_rgba8(const unsigned char *row, unsigned char *out, uint\n     }\n }\n \n+static void rgb8_row_to_bgra8(const unsigned char *row, unsigned char *out, uint32_t n)\n+{\n+    uint32_t i;\n+    for(i=0; i < n; i++)\n+    {\n+        *(unsigned char *)(out + i * 4 + 0) = *(unsigned char *)(row + i * 3 + 2);\n+        *(unsigned char *)(out + i * 4 + 1) = *(unsigned char *)(row + i * 3 + 1);\n+        *(unsigned char *)(out + i * 4 + 2) = *(unsigned char *)(row + i * 3 + 0);\n+        out[i*4+3] = 255;\n+    }\n+}\n+\n /* Calculate scanline width in bits, round up to the nearest byte */\n static int calculate_scanline_width(struct spng_ctx *ctx, uint32_t width, size_t *scanline_width)\n {\n@@ -1085,7 +1097,7 @@ static inline void gamma_correct_row(unsigned char *row, uint32_t pixels, int fm\n {\n     uint32_t i;\n \n-    if(fmt == SPNG_FMT_RGBA8)\n+    if(fmt == SPNG_FMT_RGBA8 || fmt == SPNG_FMT_BGRA8)\n     {\n         unsigned char *px;\n         for(i=0; i < pixels; i++)\n@@ -1138,7 +1150,7 @@ static inline void trns_row(unsigned char *row,\n     unsigned row_stride;\n     unsigned depth = ihdr->bit_depth;\n \n-    if(fmt == SPNG_FMT_RGBA8)\n+    if(fmt == SPNG_FMT_RGBA8 || fmt == SPNG_FMT_BGRA8)\n     {\n         if(ihdr->color_type == SPNG_COLOR_TYPE_GRAYSCALE) return; /* already applied in the decoding loop */\n \n@@ -1207,7 +1219,7 @@ static inline void scale_row(unsigned char *row, uint32_t pixels, int fmt, unsig\n {\n     uint32_t i;\n \n-    if(fmt == SPNG_FMT_RGBA8)\n+    if(fmt == SPNG_FMT_RGBA8 || fmt == SPNG_FMT_BGRA8)\n     {\n         unsigned char px[4];\n         for(i=0; i < pixels; i++)\n@@ -1273,7 +1285,7 @@ void expand_row(unsigned char *row, unsigned char *scanline, struct spng_plte_en\n     uint32_t i;\n     unsigned char *px;\n     unsigned char entry;\n-    if(fmt == SPNG_FMT_RGBA8)\n+    if(fmt == SPNG_FMT_RGBA8 || fmt == SPNG_FMT_BGRA8)\n     {\n         for(i=0; i < width; i++)\n         {\n@@ -2510,6 +2522,11 @@ int spng_decode_scanline(spng_ctx *ctx, void *out, size_t len)\n                     rgb8_row_to_rgba8(scanline, out, width);\n                     break;\n                 }\n+                else if(fmt == SPNG_FMT_BGRA8)\n+                {\n+                    rgb8_row_to_bgra8(scanline, out, width);\n+                    break;\n+                }\n \n                 memcpy(&r_8, scanline + (k * 3), 1);\n                 memcpy(&g_8, scanline + (k * 3) + 1, 1);\n@@ -2524,7 +2541,7 @@ int spng_decode_scanline(spng_ctx *ctx, void *out, size_t len)\n \n             if(ctx->ihdr.bit_depth == 8)\n             {\n-                if(fmt & (SPNG_FMT_RGBA8 | SPNG_FMT_RGB8))\n+                if(fmt & (SPNG_FMT_RGBA8 | SPNG_FMT_RGB8 | SPNG_FMT_BGRA8))\n                 {\n                     expand_row(out, scanline, plte, width, fmt);\n                     break;\n@@ -2543,7 +2560,7 @@ int spng_decode_scanline(spng_ctx *ctx, void *out, size_t len)\n                 shift_amount -= ctx->ihdr.bit_depth;\n             }\n \n-            if(fmt & (SPNG_FMT_RGBA8 | SPNG_FMT_RGB8))\n+            if(fmt & (SPNG_FMT_RGBA8 | SPNG_FMT_RGB8 | SPNG_FMT_BGRA8))\n             {\n                 pixel[0] = plte[entry].red;\n                 pixel[1] = plte[entry].green;\n@@ -2552,6 +2569,15 @@ int spng_decode_scanline(spng_ctx *ctx, void *out, size_t len)\n \n                 continue;\n             }\n+            else if(fmt & SPNG_FMT_BGRA8)\n+            {\n+                pixel[0] = plte[entry].blue;\n+                pixel[1] = plte[entry].green;\n+                pixel[2] = plte[entry].red;\n+                pixel[3] = plte[entry].alpha;\n+\n+                continue;\n+            }\n             else /* RGBA16 */\n             {\n                 r_16 = plte[entry].red;\n@@ -2652,6 +2678,13 @@ int spng_decode_scanline(spng_ctx *ctx, void *out, size_t len)\n \n             if(fmt == SPNG_FMT_RGBA8) memcpy(pixel + 3, &a_8, 1);\n         }\n+        else if(fmt & SPNG_FMT_BGRA8)\n+        {\n+            memcpy(pixel, &b_8, 1);\n+            memcpy(pixel + 1, &g_8, 1);\n+            memcpy(pixel + 2, &r_8, 1);\n+            memcpy(pixel + 3, &a_8, 1);\n+        }\n         else if(fmt == SPNG_FMT_RGBA16)\n         {\n             if(ctx->ihdr.bit_depth != 16)\n@@ -2901,7 +2934,7 @@ int spng_decode_image(spng_ctx *ctx, void *out, size_t len, int fmt, int flags)\n \n         unsigned lut_entries;\n \n-        if(fmt & (SPNG_FMT_RGBA8 | SPNG_FMT_RGB8))\n+        if(fmt & (SPNG_FMT_RGBA8 | SPNG_FMT_RGB8 | SPNG_FMT_BGRA8))\n         {\n             lut_entries = 256;\n             max = 255.0f;\n@@ -2974,7 +3007,7 @@ int spng_decode_image(spng_ctx *ctx, void *out, size_t len, int fmt, int flags)\n         }\n     }\n \n-    if(ihdr->bit_depth == 16 && fmt & (SPNG_FMT_RGBA8 | SPNG_FMT_RGB8))\n+    if(ihdr->bit_depth == 16 && fmt & (SPNG_FMT_RGBA8 | SPNG_FMT_RGB8 | SPNG_FMT_BGRA8))\n     {/* samples are scaled down by 8 bits in the decode loop */\n         sb->red_bits -= 8;\n         sb->green_bits -= 8;\n@@ -3037,7 +3070,7 @@ int spng_decode_image(spng_ctx *ctx, void *out, size_t len, int fmt, int flags)\n \n     if(f.apply_trns)\n     {\n-        if(fmt & (SPNG_FMT_RGBA8 | SPNG_FMT_RGBA16))\n+        if(fmt & (SPNG_FMT_RGBA8 | SPNG_FMT_RGBA16 | SPNG_FMT_BGRA8))\n         {\n             if(ihdr->color_type == SPNG_COLOR_TYPE_TRUECOLOR)\n             {\n@@ -3366,7 +3399,7 @@ int spng_decoded_image_size(spng_ctx *ctx, int fmt, size_t *len)\n     /* Currently all enums are single-bit values */\n     if(fmt & ((unsigned)fmt - 1)) return SPNG_EFMT; /* More than one bit is set */\n \n-    if(fmt == SPNG_FMT_RGBA8)\n+    if(fmt == SPNG_FMT_RGBA8 || fmt == SPNG_FMT_BGRA8)\n     {\n         bytes_per_pixel = 4;\n     }\ndiff --git a/spng/spng.h b/spng/spng.h\nindex 70ea494..048ee9e 100644\n--- a/spng/spng.h\n+++ b/spng/spng.h\n@@ -144,6 +144,7 @@ enum spng_format\n     SPNG_FMT_RGBA8 = 1,\n     SPNG_FMT_RGBA16 = 2,\n     SPNG_FMT_RGB8 = 4,\n+    SPNG_FMT_BGRA8 = 8,\n \n     /* Partially implemented, see documentation */\n     SPNG_FMT_GA8 = 16,\n-- \n2.29.2\n\n"
  },
  {
    "path": "packages/graphics/libwebp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present EmuELEC (https://github.com/EmuELEC)\n\nPKG_NAME=\"libwebp\"\nPKG_VERSION=\"1.4.0\"\nPKG_SHA256=\"12af50c45530f0a292d39a88d952637e43fb2d4ab1883c44ae729840f7273381\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://chromium.googlesource.com/webm/libwebp\"\nPKG_URL=\"https://github.com/webmproject/libwebp/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain tiff\"\nPKG_LONGDESC=\"WebP codec is a library to encode and decode images in WebP format.\"\nPKG_TOOLCHAIN=\"cmake-make\"\nPKG_BUILD_FLAGS=\"+lto-parallel\"\nPKG_CMAKE_OPTS_TARGET=\" -DBUILD_SHARED_LIBS=ON -DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_IMG2WEBP=OFF -DWEBP_BUILD_EXTRAS=OFF -DWEBP_BUILD_DWEBP=OFF\"\n"
  },
  {
    "path": "packages/graphics/mesa/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mesa\"\nif [ \"${DEVICE}\" = \"RPi5\" ]; then\n  PKG_VERSION=\"23.2.1\"\n  PKG_SHA256=\"64de0616fc2d801f929ab1ac2a4f16b3e2783c4309a724c8a259b20df8bbc1cc\"\nelse\n  PKG_VERSION=\"22.3.7\"\n  PKG_SHA256=\"894ce2f4a1c2e76177cdd2284620192d0da3066b243eec2fbb1d7cf37f13042c\"\nfi\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.mesa3d.org/\"\nPKG_URL=\"https://mesa.freedesktop.org/archive/mesa-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain expat libdrm Mako:host\"\nPKG_LONGDESC=\"Mesa is a 3-D graphics library with an API.\"\n\nget_graphicdrivers\n\nPKG_MESON_OPTS_TARGET=\"-Dgallium-drivers=${GALLIUM_DRIVERS// /,} \\\n                       -Dgallium-extra-hud=false \\\n                       -Dgallium-omx=disabled \\\n                       -Dgallium-nine=false \\\n                       -Dgallium-opencl=disabled \\\n                       -Dshader-cache=enabled \\\n                       -Dshared-glapi=enabled \\\n                       -Dopengl=true \\\n                       -Dgbm=enabled \\\n                       -Degl=enabled \\\n                       -Dvalgrind=disabled \\\n                       -Dlibunwind=disabled \\\n                       -Dlmsensors=disabled \\\n                       -Dbuild-tests=false \\\n                       -Dselinux=false \\\n                       -Dosmesa=false\"\n\nif [ \"${DEVICE}\" = \"RPi5\" ]; then\n  PKG_MESON_OPTS_TARGET+=\" -Ddraw-use-llvm=false\"\nelse\n  PKG_MESON_OPTS_TARGET+=\" -Ddri-drivers=\"\nfi\n\nif [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n  PKG_DEPENDS_TARGET+=\" xorgproto libXext libXdamage libXfixes libXxf86vm libxcb libX11 libxshmfence libXrandr\"\n  export X11_INCLUDES=\n  PKG_MESON_OPTS_TARGET+=\" -Dplatforms=x11 \\\n                           -Ddri3=enabled \\\n                           -Dglx=dri\"\nelif [ \"${DISPLAYSERVER}\" = \"wl\" ]; then\n  PKG_DEPENDS_TARGET+=\" wayland wayland-protocols\"\n  PKG_MESON_OPTS_TARGET+=\" -Dplatforms=wayland \\\n                           -Ddri3=disabled \\\n                           -Dglx=disabled\"\nelse\n  PKG_MESON_OPTS_TARGET+=\" -Dplatforms=\"\" \\\n                           -Ddri3=disabled \\\n                           -Dglx=disabled\"\nfi\n\nif listcontains \"${GRAPHIC_DRIVERS}\" \"(nvidia|nvidia-ng)\"; then\n  PKG_DEPENDS_TARGET+=\" libglvnd\"\n  PKG_MESON_OPTS_TARGET+=\" -Dglvnd=true\"\nelse\n  PKG_MESON_OPTS_TARGET+=\" -Dglvnd=false\"\nfi\n\nif [ \"${LLVM_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" elfutils llvm\"\n  PKG_MESON_OPTS_TARGET+=\" -Dllvm=enabled\"\nelse\n  PKG_MESON_OPTS_TARGET+=\" -Dllvm=disabled\"\nfi\n\nif [ \"${VDPAU_SUPPORT}\" = \"yes\" -a \"${DISPLAYSERVER}\" = \"x11\" ]; then\n  PKG_DEPENDS_TARGET+=\" libvdpau\"\n  PKG_MESON_OPTS_TARGET+=\" -Dgallium-vdpau=enabled\"\nelse\n  PKG_MESON_OPTS_TARGET+=\" -Dgallium-vdpau=disabled\"\nfi\n\nif [ \"${VAAPI_SUPPORT}\" = \"yes\" ] && listcontains \"${GRAPHIC_DRIVERS}\" \"(r600|radeonsi)\"; then\n  PKG_DEPENDS_TARGET+=\" libva\"\n  PKG_MESON_OPTS_TARGET+=\" -Dgallium-va=enabled \\\n                           -Dvideo-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc\"\nelse\n  PKG_MESON_OPTS_TARGET+=\" -Dgallium-va=disabled\"\nfi\n\nif listcontains \"${GRAPHIC_DRIVERS}\" \"vmware\"; then\n  PKG_MESON_OPTS_TARGET+=\" -Dgallium-xa=enabled\"\nelse\n  PKG_MESON_OPTS_TARGET+=\" -Dgallium-xa=disabled\"\nfi\n\nif [ \"${OPENGLES_SUPPORT}\" = \"yes\" ]; then\n  PKG_MESON_OPTS_TARGET+=\" -Dgles1=disabled -Dgles2=enabled\"\nelse\n  PKG_MESON_OPTS_TARGET+=\" -Dgles1=disabled -Dgles2=disabled\"\nfi\n\nif [ \"${VULKAN_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${VULKAN} vulkan-tools\"\n  PKG_MESON_OPTS_TARGET+=\" -Dvulkan-drivers=${VULKAN_DRIVERS_MESA// /,}\"\nelse\n  PKG_MESON_OPTS_TARGET+=\" -Dvulkan-drivers=\"\nfi\n"
  },
  {
    "path": "packages/graphics/nvidia/modprobe.d/nvidia-modesetting.conf",
    "content": "options nvidia-drm modeset=1\n"
  },
  {
    "path": "packages/graphics/nvidia/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"nvidia\"\nPKG_VERSION=\"520.56.06\"\nPKG_SHA256=\"e46ae5f497bd75370c8dea19cf3766d1bf4ae62e6343bc3c31b9a6d523f21eb3\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"https://www.nvidia.com/en-us/drivers/unix/\"\nPKG_URL=\"http://us.download.nvidia.com/XFree86/Linux-x86_64/${PKG_VERSION}/NVIDIA-Linux-x86_64-${PKG_VERSION}-no-compat32.run\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libglvnd\"\nPKG_LONGDESC=\"The GBM/Wayland graphic driver for NVIDIA GPUs supporting the GeForce 700 Series & above.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_KERNEL_PKG=\"yes\"\n\nif [ \"${VULKAN_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${VULKAN} vulkan-tools\"\nfi\n\nunpack() {\n  [ -d ${PKG_BUILD} ] && rm -rf ${PKG_BUILD}\n\n  sh ${SOURCES}/${PKG_NAME}/${PKG_SOURCE_NAME} --extract-only --target ${PKG_BUILD}\n}\n\nmake_target() {\n  unset LDFLAGS\n\n  cd kernel\n    make module CC=${CC} LD=${LD} SYSSRC=$(kernel_path) SYSOUT=$(kernel_path)\n    ${STRIP} --strip-debug nvidia.ko\n  cd ..\n}\n\nmakeinstall_target() {\n  # Linux kernel modules\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/nvidia\n    cp -P kernel/nvidia.ko         ${INSTALL}/$(get_full_module_dir)/nvidia\n    cp -P kernel/nvidia-drm.ko     ${INSTALL}/$(get_full_module_dir)/nvidia\n    cp -P kernel/nvidia-uvm.ko     ${INSTALL}/$(get_full_module_dir)/nvidia\n    cp -P kernel/nvidia-modeset.ko ${INSTALL}/$(get_full_module_dir)/nvidia\n\n  # GBM\n  mkdir -p ${INSTALL}/usr/lib/gbm\n    cp -p libnvidia-allocator.so.${PKG_VERSION}     ${INSTALL}/usr/lib\n    ln -sf libnvidia-allocator.so.${PKG_VERSION}    ${INSTALL}/usr/lib/liballocator.so.0\n    ln -sf ../libnvidia-allocator.so.${PKG_VERSION} ${INSTALL}/usr/lib/gbm/nvidia-drm_gbm.so\n\n  mkdir -p ${INSTALL}/usr/share/egl/egl_external_platform.d\n    cp -p 15_nvidia_gbm.json          ${INSTALL}/usr/share/egl/egl_external_platform.d\n    cp -p libnvidia-egl-gbm.so.1.1.0  ${INSTALL}/usr/lib\n    ln -sf libnvidia-egl-gbm.so.1.1.0 ${INSTALL}/usr/lib/libnvidia-egl-gbm.so.1\n    ln -sf libnvidia-egl-gbm.so.1     ${INSTALL}/usr/lib/libnvidia-egl-gbm.so\n\n  # GLVND\n  mkdir -p ${INSTALL}/usr/share/glvnd/egl_vendor.d\n    cp -p 10_nvidia.json ${INSTALL}/usr/share/glvnd/egl_vendor.d\n\n  # Wayland\n  mkdir -p ${INSTALL}/usr/lib\n    cp -p libnvidia-egl-wayland.so.1.1.9  ${INSTALL}/usr/lib/\n    ln -sf libnvidia-egl-wayland.so.1.1.9 ${INSTALL}/usr/lib/libnvidia-egl-wayland.so.1\n    ln -sf libnvidia-egl-wayland.so.1     ${INSTALL}/usr/lib/libnvidia-egl-wayland.so\n\n  mkdir -p ${INSTALL}/usr/share/egl/egl_external_platform.d\n    cp -p 10_nvidia_wayland.json ${INSTALL}/usr/share/egl/egl_external_platform.d\n\n  # OpenGL / EGL\n  mkdir -p ${INSTALL}/usr/lib\n    cp -p libEGL_nvidia.so.${PKG_VERSION}  ${INSTALL}/usr/lib/\n    ln -sf libEGL_nvidia.so.${PKG_VERSION} ${INSTALL}/usr/lib/libEGL_nvidia.so.0\n    ln -sf libEGL_nvidia.so.0              ${INSTALL}/usr/lib/libEGL_nvidia.so\n\n  # OpenGL core\n  mkdir -p ${INSTALL}/usr/lib\n    cp -p libnvidia-eglcore.so.${PKG_VERSION}  ${INSTALL}/usr/lib/\n    ln -sf libnvidia-eglcore.so.${PKG_VERSION} ${INSTALL}/usr/lib/libnvidia-eglcore.so\n    cp -p libnvidia-glsi.so.${PKG_VERSION}  ${INSTALL}/usr/lib\n    ln -sf libnvidia-glsi.so.${PKG_VERSION} ${INSTALL}/usr/lib/libnvidia-glsi.so\n\n  # OpenGL ES\n  mkdir -p ${INSTALL}/usr/lib\n    cp -p libGLESv2_nvidia.so.${PKG_VERSION}  ${INSTALL}/usr/lib\n    ln -sf libGLESv2_nvidia.so.${PKG_VERSION} ${INSTALL}/usr/lib/libGLESv2_nvidia.so.2\n    ln -sf libGLESv2_nvidia.so.2              ${INSTALL}/usr/lib/libGLESv2_nvidia.so\n\n  # Vulkan\n  if [ \"${VULKAN_SUPPORT}\" = \"yes\" ]; then\n    mkdir -p ${INSTALL}/usr/lib\n      cp -P libnvidia-glvkspirv.so.${PKG_VERSION}  ${INSTALL}/usr/lib\n      ln -sf libnvidia-glvkspirv.so.${PKG_VERSION} ${INSTALL}/usr/lib/libnvidia-glvkspirv.so\n\n      cp -p libnvidia-vulkan-producer.so.${PKG_VERSION}  ${INSTALL}/usr/lib\n      ln -sf libnvidia-vulkan-producer.so.${PKG_VERSION} ${INSTALL}/usr/lib/libnvidia-vulkan-producer.so.1\n      ln -sf libnvidia-vulkan-producer.so.1              ${INSTALL}/usr/lib/libnvidia-vulkan-producer.so\n\n    mkdir -p ${INSTALL}/usr/share/vulkan/implicit_layer.d\n      sed \"s#libGLX_nvidia.so.0#libEGL_nvidia.so.0#\" nvidia_layers.json > ${INSTALL}/usr/share/vulkan/implicit_layer.d/nvidia_layers.json\n    mkdir -p ${INSTALL}/usr/share/vulkan/icd.d\n      sed \"s#libGLX_nvidia.so.0#libEGL_nvidia.so.0#\" nvidia_icd.json > ${INSTALL}/usr/share/vulkan/icd.d/nvidia_icd.json\n  fi\n\n  # CUDA\n  mkdir -p ${INSTALL}/usr/lib\n    cp -p libcuda.so.${PKG_VERSION}  ${INSTALL}/usr/lib\n    ln -sf libcuda.so.${PKG_VERSION} ${INSTALL}/usr/lib/libcuda.so.1\n    ln -sf libcuda.so.1              ${INSTALL}/usr/lib/libcuda.so\n\n  # NVDEC\n  mkdir -p ${INSTALL}/usr/lib\n    cp -p libnvcuvid.so.${PKG_VERSION}  ${INSTALL}/usr/lib\n    ln -sf libnvcuvid.so.${PKG_VERSION} ${INSTALL}/usr/lib/libnvcuvid.so.1\n    ln -sf libnvcuvid.so.1              ${INSTALL}/usr/lib/libnvcuvid.so\n\n  # nvidia-tls\n  mkdir -p ${INSTALL}/usr/lib\n    cp -P libnvidia-tls.so.${PKG_VERSION}  ${INSTALL}/usr/lib\n    ln -sf libnvidia-tls.so.${PKG_VERSION} ${INSTALL}/usr/lib/libnvidia-tls.so\n\n  # NVIDIA Management Library (NVML) / System Management Interface\n  mkdir -p ${INSTALL}/usr/bin\n    cp -P nvidia-smi ${INSTALL}/usr/bin\n\n  mkdir -p ${INSTALL}/usr/lib\n    cp -P libnvidia-ml.so.${PKG_VERSION}  ${INSTALL}/usr/lib\n    ln -sf libnvidia-ml.so.${PKG_VERSION} ${INSTALL}/usr/lib/libnvidia-ml.so.1\n    ln -sf libnvidia-ml.so.1              ${INSTALL}/usr/lib/libnvidia-ml.so\n\n  # App profiles\n  mkdir -p ${INSTALL}/usr/share/nvidia\n    cp -P nvidia-application-profiles-${PKG_VERSION}-rc ${INSTALL}/usr/share/nvidia\n}\n"
  },
  {
    "path": "packages/graphics/pango/config/pango.modules",
    "content": "# Pango Modules file\n# Automatically generated file, do not edit\n#\n# ModulesPath = /usr/lib/pango/1.8.0/modules\n#\n/usr/lib/pango/1.8.0/modules/pango-arabic-lang.so ArabicScriptEngineLang PangoEngineLang PangoRenderNone arabic:*\n/usr/lib/pango/1.8.0/modules/pango-basic-fc.so BasicScriptEngineFc PangoEngineShape PangoRenderFc common:\n/usr/lib/pango/1.8.0/modules/pango-indic-lang.so devaIndicScriptEngineLang PangoEngineLang PangoRenderNone devanagari:*\n/usr/lib/pango/1.8.0/modules/pango-indic-lang.so bengIndicScriptEngineLang PangoEngineLang PangoRenderNone bengali:*\n/usr/lib/pango/1.8.0/modules/pango-indic-lang.so guruIndicScriptEngineLang PangoEngineLang PangoRenderNone gurmukhi:*\n/usr/lib/pango/1.8.0/modules/pango-indic-lang.so gujrIndicScriptEngineLang PangoEngineLang PangoRenderNone gujarati:*\n/usr/lib/pango/1.8.0/modules/pango-indic-lang.so oryaIndicScriptEngineLang PangoEngineLang PangoRenderNone oriya:*\n/usr/lib/pango/1.8.0/modules/pango-indic-lang.so tamlIndicScriptEngineLang PangoEngineLang PangoRenderNone tamil:*\n/usr/lib/pango/1.8.0/modules/pango-indic-lang.so teluIndicScriptEngineLang PangoEngineLang PangoRenderNone telugu:*\n/usr/lib/pango/1.8.0/modules/pango-indic-lang.so kndaIndicScriptEngineLang PangoEngineLang PangoRenderNone kannada:*\n/usr/lib/pango/1.8.0/modules/pango-indic-lang.so mlymIndicScriptEngineLang PangoEngineLang PangoRenderNone malayalam:*\n/usr/lib/pango/1.8.0/modules/pango-indic-lang.so sinhIndicScriptEngineLang PangoEngineLang PangoRenderNone sinhala:*\n\n"
  },
  {
    "path": "packages/graphics/pango/config/pangorc",
    "content": "[Pango]\nModuleFiles = /etc/pango/pango.modules\nModulesPath = /usr/lib/pango/1.8.0/modules\n\n[PangoX]\nAliasFiles = /etc/pango/pangox.aliases\n"
  },
  {
    "path": "packages/graphics/pango/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pango\"\nPKG_VERSION=\"1.50.12\"\nPKG_SHA256=\"caef96d27bbe792a6be92727c73468d832b13da57c8071ef79b9df69ee058fe3\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.pango.org/\"\nPKG_URL=\"https://download.gnome.org/sources/pango/${PKG_VERSION:0:4}/pango-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain cairo freetype fontconfig fribidi glib json-glib harfbuzz\"\nPKG_DEPENDS_CONFIG=\"cairo\"\nPKG_LONGDESC=\"The Pango library for layout and rendering of internationalized text.\"\n\nconfigure_package() {\n  # Build with X11 support\n  if [ ${DISPLAYSERVER} = \"x11\" ]; then\n    PKG_DEPENDS_TARGET+=\" libX11 libXft\"\n    PKG_DEPENDS_CONFIG+=\" libXft\"\n    PKG_BUILD_FLAGS=\"-sysroot\"\n  fi\n}\n\npre_configure_target() {\n  PKG_MESON_OPTS_TARGET=\"-Dgtk_doc=false \\\n                         -Dintrospection=disabled\"\n}\n"
  },
  {
    "path": "packages/graphics/tiff/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tiff\"\nPKG_VERSION=\"4.5.0\"\nPKG_SHA256=\"c7a1d9296649233979fa3eacffef3fa024d73d05d589cb622727b5b08c423464\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.remotesensing.org/libtiff/\"\nPKG_URL=\"http://download.osgeo.org/libtiff/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libjpeg-turbo zlib\"\nPKG_LONGDESC=\"libtiff is a library for reading and writing TIFF files.\"\nPKG_BUILD_FLAGS=\"+pic -gold\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_SHARED_LIBS=OFF \\\n                       -Dtiff-tools=OFF \\\n                       -Dtiff-tests=OFF \\\n                       -Dtiff-contrib=OFF \\\n                       -Dtiff-docs=OFF \\\n                       -Dmdi=OFF \\\n                       -Djbig=OFF \\\n                       -Dlzma=OFF \\\n                       -Dzstd=OFF \\\n                       -Dwebp=ON \\\n                       -Dcxx=ON \\\n                       -Djpeg=ON\"\n"
  },
  {
    "path": "packages/graphics/vulkan/glslang/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Frank Hartung (supervisedthinking (@) gmail.com)\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"glslang\"\n# The SPIRV-Tools & SPIRV-Headers pkg_version/s need to match the compatible (known_good) glslang pkg_version.\n# https://raw.githubusercontent.com/KhronosGroup/glslang/${PKG_VERSION}/known_good.json\n# When updating glslang pkg_version please update to the known_good spirv-tools & spirv-headers pkg_version/s.\nPKG_VERSION=\"12.0.0\"\nPKG_SHA256=\"7cb45842ec1d4b6ea775d624c3d2d8ba9450aa416b0482b0cc7e4fdd399c3d75\"\nPKG_LICENSE=\"Apache-2.0\"\nPKG_SITE=\"https://github.com/KhronosGroup/glslang\"\nPKG_URL=\"https://github.com/KhronosGroup/glslang/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host Python3:host\"\nPKG_DEPENDS_TARGET=\"toolchain Python3\"\nPKG_LONGDESC=\"Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.\"\nPKG_DEPENDS_UNPACK=\"spirv-headers spirv-tools\"\n\nPKG_CMAKE_OPTS_COMMON=\"-DBUILD_EXTERNAL=ON \\\n                       -DENABLE_SPVREMAPPER=OFF \\\n                       -DENABLE_GLSLANG_JS=OFF \\\n                       -DENABLE_RTTI=OFF \\\n                       -DENABLE_EXCEPTIONS=OFF \\\n                       -DENABLE_OPT=ON \\\n                       -DENABLE_PCH=ON \\\n                       -DENABLE_CTEST=OFF \\\n                       -DUSE_CCACHE=ON \\\n                       -Wno-dev\"\n\npost_unpack() {\n  # Enables SPIR-V optimzer capability needed for ENABLE_OPT CMake build option\n  mkdir -p ${PKG_BUILD}/External/spirv-tools/external/spirv-headers\n    cp -R $(get_build_dir spirv-tools)/* ${PKG_BUILD}/External/spirv-tools\n    cp -R $(get_build_dir spirv-headers)/* ${PKG_BUILD}/External/spirv-tools/external/spirv-headers\n}\n\npre_configure_host() {\n  PKG_CMAKE_OPTS_HOST+=\"${PKG_CMAKE_OPTS_COMMON} \\\n                        -DBUILD_SHARED_LIBS=OFF\"\n\n}\n\npre_configure_target() {\n  PKG_CMAKE_OPTS_TARGET+=\"${PKG_CMAKE_OPTS_COMMON} \\\n                          -DBUILD_SHARED_LIBS=ON \\\n                          -DENABLE_GLSLANG_BINARIES=OFF\"\n}\n"
  },
  {
    "path": "packages/graphics/vulkan/glslang/patches/glslang-100.01-build-static-spirv-tools.patch",
    "content": "--- a/External/CMakeLists.txt\n+++ b/External/CMakeLists.txt\n@@ -71,7 +71,8 @@ endif()\n if(ENABLE_OPT AND NOT TARGET SPIRV-Tools-opt)\n     if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools)\n         set(SPIRV_SKIP_TESTS ON CACHE BOOL \"Skip building SPIRV-Tools tests\")\n-        add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools spirv-tools)\n+        set(BUILD_SHARED_LIBS OFF CACHE BOOL \"Disable build shared libs\" FORCE)\n+        add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools EXCLUDE_FROM_ALL)\n     endif()\n endif()\n \n--- a/SPIRV/CMakeLists.txt\n+++ b/SPIRV/CMakeLists.txt\n@@ -100,7 +100,7 @@ if(ENABLE_OPT)\n     target_link_libraries(SPIRV PRIVATE MachineIndependent SPIRV-Tools-opt)\n     target_include_directories(SPIRV PUBLIC\n         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>\n-        $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)\n+        $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)\n else()\n     target_link_libraries(SPIRV PRIVATE MachineIndependent)\n endif()\n--- a/StandAlone/CMakeLists.txt\n+++ b/StandAlone/CMakeLists.txt\n@@ -83,7 +83,7 @@ endif()\n target_link_libraries(glslangValidator ${LIBRARIES})\n target_include_directories(glslangValidator PUBLIC\n     $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>\n-    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)\n+    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)\n \n if(ENABLE_OPT)\n     target_include_directories(glslangValidator\n"
  },
  {
    "path": "packages/graphics/vulkan/spirv-headers/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Frank Hartung (supervisedthinking (@) gmail.com)\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"spirv-headers\"\n# The SPIRV-Headers pkg_version needs to match the compatible (known_good) glslang pkg_version.\n# https://raw.githubusercontent.com/KhronosGroup/glslang/${PKG_VERSION}/known_good.json\n# When updating glslang pkg_version please update to the known_good spirv-headers pkg_version.\nPKG_VERSION=\"d13b52222c39a7e9a401b44646f0ca3a640fbd47\"\nPKG_SHA256=\"9dd5ae25bcec65db633990477e5b9a9b84cdbc0aa87eaaea159813a5d707fb31\"\nPKG_LICENSE=\"Apache-2.0\"\nPKG_SITE=\"https://github.com/KhronosGroup/SPIRV-headers\"\nPKG_URL=\"https://github.com/KhronosGroup/SPIRV-headers/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"\"\nPKG_LONGDESC=\"SPIRV-Headers\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/graphics/vulkan/spirv-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Frank Hartung (supervisedthinking (@) gmail.com)\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"spirv-tools\"\n# The SPIRV-Tools pkg_version needs to match the compatible (known_good) glslang pkg_version.\n# https://raw.githubusercontent.com/KhronosGroup/glslang/${PKG_VERSION}/known_good.json\n# When updating glslang pkg_version please update to the known_good spirv-tools pkg_version.\nPKG_VERSION=\"63de608daeb7e91fbea6d7477a50debe7cac57ce\"\nPKG_SHA256=\"f223272718ffa622feff49f3f1b4caf754c57634be70ef6eadfa3f74f2938e53\"\nPKG_LICENSE=\"Apache-2.0\"\nPKG_SITE=\"https://github.com/KhronosGroup/SPIRV-Tools\"\nPKG_URL=\"https://github.com/KhronosGroup/SPIRV-Tools/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"\"\nPKG_LONGDESC=\"The SPIR-V Tools project provides an API and commands for processing SPIR-V modules.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/graphics/vulkan/vkmark/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vkmark\"\nPKG_VERSION=\"30d2cd37f0566589d90914501fc7c51a4e51f559\"\nPKG_SHA256=\"6a2ab6a9c58b4bd11eb0235a8e31b10b3d0cbcd5c64b799d342572936a717745\"\nPKG_LICENSE=\"LGPL-2.1-or-later\"\nPKG_SITE=\"https://github.com/vkmark/vkmark\"\nPKG_URL=\"https://github.com/vkmark/vkmark/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain glm assimp vulkan-loader\"\nPKG_LONGDESC=\"Vulkan benchmark\"\nPKG_BUILD_FLAGS=\"-parallel +speed\"\n\ncase ${DISPLAYSERVER} in\n  wl)\n    PKG_DEPENDS_TARGET+=\" wayland wayland-protocols\"\n    PKG_MESON_OPTS_TARGET=\"-Dwayland=true\"\n    ;;\n  x11)\n    PKG_DEPENDS_TARGET+=\" libxcb xcb-util-wm\"\n    PKG_MESON_OPTS_TARGET=\"-Dxcb=true\"\n    ;;\n  *)\n    PKG_DEPENDS_TARGET+=\" systemd libdrm mesa\"\n    PKG_MESON_OPTS_TARGET=\"-Dkms=true\"\n    ;;\nesac\n"
  },
  {
    "path": "packages/graphics/vulkan/vkmark/patches/vkmark-999.01-PR47-drop-the-vkCreateDmaBufImageINTEL-extension.patch",
    "content": "From 51c7eb0c8c1cd4872eec176775276cca3565a0a6 Mon Sep 17 00:00:00 2001\nFrom: Alexandros Frantzis <alexandros.frantzis@collabora.com>\nDate: Fri, 9 Sep 2022 18:32:03 +0300\nSubject: [PATCH 1/4] github: Build with both ubuntu-20.04 and ubuntu-22.04 in\n CI\n\n---\n .github/workflows/build.yml | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/.github/workflows/build.yml b/.github/workflows/build.yml\nindex fbb5682..b60ad80 100644\n--- a/.github/workflows/build.yml\n+++ b/.github/workflows/build.yml\n@@ -10,7 +10,10 @@ on:\n \n jobs:\n   build:\n-    runs-on: ubuntu-latest\n+    strategy:\n+      matrix:\n+        os: [ubuntu-20.04, ubuntu-22.04]\n+    runs-on: ${{ matrix.os }}\n     steps:\n     - uses: actions/checkout@v1\n     - name: Install dependencies\n\nFrom 7bbe275e49045237f2cdbc2f441a394b562b0aa5 Mon Sep 17 00:00:00 2001\nFrom: Alexandros Frantzis <alexandros.frantzis@collabora.com>\nDate: Fri, 9 Sep 2022 18:08:12 +0300\nSubject: [PATCH 2/4] core: Improve log message consistency\n\n---\n src/vulkan_state.cpp | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/src/vulkan_state.cpp b/src/vulkan_state.cpp\nindex 6f50673..fbd789c 100644\n--- a/src/vulkan_state.cpp\n+++ b/src/vulkan_state.cpp\n@@ -44,7 +44,7 @@ std::vector<vk::PhysicalDevice> VulkanState::available_devices(VulkanWSI& vulkan\n     {\n         if (!vulkan_wsi.is_physical_device_supported(*it_device))\n         {\n-            Log::debug(\"device with uuid %s is not supported by window system integration layer\",\n+            Log::debug(\"Device with uuid %s is not supported by window system integration layer\\n\",\n                 static_cast<DeviceUUID>(it_device->getProperties().pipelineCacheUUID).representation().data());\n             it_device = available_devices.erase(it_device);\n         }\n@@ -193,17 +193,17 @@ void VulkanState::create_command_pool()\n \n vk::PhysicalDevice ChooseFirstSupportedStrategy::operator()(const std::vector<vk::PhysicalDevice>& available_devices)\n {\n-    Log::debug(\"Trying to use first supported device.\\n\");\n+    Log::debug(\"Trying to use first supported device\\n\");\n \n     for (auto const& physical_device : available_devices)\n     {\n         if (find_queue_family_index(physical_device, vk::QueueFlagBits::eGraphics).second)\n         {\n-            Log::debug(\"First supported device choosen!\\n\");\n+            Log::debug(\"First supported device chosen\\n\");\n             return physical_device;\n         }\n \n-        Log::debug(\"device with uuid %s skipped!\\n\",\n+        Log::debug(\"Device with uuid %s skipped\\n\",\n                static_cast<DeviceUUID>(physical_device.getProperties().pipelineCacheUUID).representation().data()\n         );\n     }\n@@ -213,7 +213,7 @@ vk::PhysicalDevice ChooseFirstSupportedStrategy::operator()(const std::vector<vk\n \n vk::PhysicalDevice ChooseByUUIDStrategy::operator()(const std::vector<vk::PhysicalDevice>& available_devices)\n {\n-    Log::debug(\"Trying to use device with specified UUID %s.\\n\",\n+    Log::debug(\"Trying to use device with specified UUID %s\\n\",\n         m_selected_device_uuid.representation().data());\n \n     for (auto const& physical_device: available_devices)\n@@ -227,5 +227,5 @@ vk::PhysicalDevice ChooseByUUIDStrategy::operator()(const std::vector<vk::Physic\n     }\n \n     // if device is not supported by wsi it would appear in list_all_devices but is not available here\n-    throw std::runtime_error(std::string(\"Device specified by uuid is not available!\"));\n+    throw std::runtime_error(std::string(\"Device specified by uuid is not available\"));\n }\n\nFrom 6395c5621fb8d83d649a174f53cfdb1626959f0e Mon Sep 17 00:00:00 2001\nFrom: Alexandros Frantzis <alexandros.frantzis@collabora.com>\nDate: Fri, 9 Sep 2022 17:48:44 +0300\nSubject: [PATCH 3/4] core,ws: Allow WSI backends to request device extensions\n\nThe backends were able to request instance extensions, support\nrequesting device extensions, too.\n---\n src/vulkan_state.cpp                | 5 ++---\n src/vulkan_wsi.h                    | 8 +++++++-\n src/ws/kms_window_system.cpp        | 2 +-\n src/ws/kms_window_system.h          | 2 +-\n src/ws/native_system.h              | 2 +-\n src/ws/swapchain_window_system.cpp  | 4 ++--\n src/ws/swapchain_window_system.h    | 2 +-\n src/ws/wayland_native_system.cpp    | 2 +-\n src/ws/wayland_native_system.h      | 2 +-\n src/ws/xcb_native_system.cpp        | 2 +-\n src/ws/xcb_native_system.h          | 2 +-\n tests/null_window_system.h          | 2 +-\n tests/test_window_system_plugin.cpp | 2 +-\n tests/window_system_loader_test.cpp | 2 +-\n 14 files changed, 22 insertions(+), 17 deletions(-)\n\ndiff --git a/src/vulkan_state.cpp b/src/vulkan_state.cpp\nindex fbd789c..b1973ed 100644\n--- a/src/vulkan_state.cpp\n+++ b/src/vulkan_state.cpp\n@@ -87,7 +87,7 @@ void VulkanState::create_instance(VulkanWSI& vulkan_wsi)\n     auto const app_info = vk::ApplicationInfo{}\n         .setPApplicationName(\"vkmark\");\n \n-    std::vector<char const*> enabled_extensions{vulkan_wsi.vulkan_extensions()};\n+    std::vector<char const*> enabled_extensions{vulkan_wsi.required_extensions().instance};\n     enabled_extensions.push_back(VK_KHR_SURFACE_EXTENSION_NAME);\n \n     auto const create_info = vk::InstanceCreateInfo{}\n@@ -159,8 +159,7 @@ void VulkanState::create_logical_device(VulkanWSI& vulkan_wsi)\n     Log::debug(\"VulkanState: Using queue family index %d for rendering\\n\",\n                graphics_queue_family_index());\n \n-    std::array<char const*,1> enabled_extensions{\n-        {VK_KHR_SWAPCHAIN_EXTENSION_NAME}};\n+    std::vector<char const*> enabled_extensions{vulkan_wsi.required_extensions().device};\n \n     auto const device_features = vk::PhysicalDeviceFeatures{}\n         .setSamplerAnisotropy(true);\ndiff --git a/src/vulkan_wsi.h b/src/vulkan_wsi.h\nindex f8c50eb..22e87f1 100644\n--- a/src/vulkan_wsi.h\n+++ b/src/vulkan_wsi.h\n@@ -32,7 +32,13 @@ class VulkanWSI\n public:\n     virtual ~VulkanWSI() = default;\n \n-    virtual std::vector<char const*> vulkan_extensions() = 0;\n+    struct Extensions\n+    {\n+        std::vector<char const*> instance;\n+        std::vector<char const*> device;\n+    };\n+\n+    virtual Extensions required_extensions() = 0;\n     virtual bool is_physical_device_supported(vk::PhysicalDevice const& pd) = 0;\n     virtual std::vector<uint32_t> physical_device_queue_family_indices(\n         vk::PhysicalDevice const& pd) = 0;\ndiff --git a/src/ws/kms_window_system.cpp b/src/ws/kms_window_system.cpp\nindex ca8220f..6132e64 100644\n--- a/src/ws/kms_window_system.cpp\n+++ b/src/ws/kms_window_system.cpp\n@@ -533,7 +533,7 @@ void KMSWindowSystem::wait_for_drm_page_flip_event()\n     }\n }\n \n-std::vector<char const*> KMSWindowSystem::vulkan_extensions()\n+VulkanWSI::Extensions KMSWindowSystem::required_extensions()\n {\n     return {};\n }\ndiff --git a/src/ws/kms_window_system.h b/src/ws/kms_window_system.h\nindex 4389ef7..20a067f 100644\n--- a/src/ws/kms_window_system.h\n+++ b/src/ws/kms_window_system.h\n@@ -61,7 +61,7 @@ class KMSWindowSystem : public WindowSystem, public VulkanWSI\n     bool should_quit() override;\n \n     // VulkanWSI\n-    std::vector<char const*> vulkan_extensions() override;\n+    Extensions required_extensions() override;\n     bool is_physical_device_supported(vk::PhysicalDevice const& pd) override;\n     std::vector<uint32_t> physical_device_queue_family_indices(\n         vk::PhysicalDevice const& pd) override;\ndiff --git a/src/ws/native_system.h b/src/ws/native_system.h\nindex 076948e..cbe073a 100644\n--- a/src/ws/native_system.h\n+++ b/src/ws/native_system.h\n@@ -34,7 +34,7 @@ class NativeSystem\n public:\n     virtual ~NativeSystem() = default;\n \n-    virtual std::vector<char const*> vulkan_extensions() = 0;\n+    virtual std::vector<char const*> instance_extensions() = 0;\n     virtual uint32_t get_presentation_queue_family_index(vk::PhysicalDevice const& pd) = 0;\n     virtual bool should_quit() = 0;\n     virtual vk::Extent2D get_vk_extent() = 0;\ndiff --git a/src/ws/swapchain_window_system.cpp b/src/ws/swapchain_window_system.cpp\nindex d38fa6b..9f9fba3 100644\n--- a/src/ws/swapchain_window_system.cpp\n+++ b/src/ws/swapchain_window_system.cpp\n@@ -251,9 +251,9 @@ ManagedResource<vk::SwapchainKHR> SwapchainWindowSystem::create_vk_swapchain()\n         [this] (auto& s) { vulkan->device().destroySwapchainKHR(s); }};\n }\n \n-std::vector<char const*> SwapchainWindowSystem::vulkan_extensions()\n+VulkanWSI::Extensions SwapchainWindowSystem::required_extensions()\n {\n-    return native->vulkan_extensions();\n+    return {native->instance_extensions(), {VK_KHR_SWAPCHAIN_EXTENSION_NAME}};\n }\n \n bool SwapchainWindowSystem::is_physical_device_supported(vk::PhysicalDevice const& pd)\ndiff --git a/src/ws/swapchain_window_system.h b/src/ws/swapchain_window_system.h\nindex c3b2780..412b924 100644\n--- a/src/ws/swapchain_window_system.h\n+++ b/src/ws/swapchain_window_system.h\n@@ -51,7 +51,7 @@ class SwapchainWindowSystem : public WindowSystem, public VulkanWSI\n     bool should_quit() override;\n \n     // VulkanWSI\n-    std::vector<char const*> vulkan_extensions() override;\n+    Extensions required_extensions() override;\n     bool is_physical_device_supported(vk::PhysicalDevice const& pd) override;\n     std::vector<uint32_t> physical_device_queue_family_indices(\n         vk::PhysicalDevice const& pd) override;\ndiff --git a/src/ws/wayland_native_system.cpp b/src/ws/wayland_native_system.cpp\nindex 642d8fe..816a7b9 100644\n--- a/src/ws/wayland_native_system.cpp\n+++ b/src/ws/wayland_native_system.cpp\n@@ -145,7 +145,7 @@ WaylandNativeSystem::WaylandNativeSystem(int width, int height)\n     create_native_window();\n }\n \n-std::vector<char const*> WaylandNativeSystem::vulkan_extensions()\n+std::vector<char const*> WaylandNativeSystem::instance_extensions()\n {\n     return {VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME};\n }\ndiff --git a/src/ws/wayland_native_system.h b/src/ws/wayland_native_system.h\nindex 400c358..01cdbaa 100644\n--- a/src/ws/wayland_native_system.h\n+++ b/src/ws/wayland_native_system.h\n@@ -35,7 +35,7 @@ class WaylandNativeSystem : public NativeSystem\n public:\n     WaylandNativeSystem(int width, int height);\n \n-    std::vector<char const*> vulkan_extensions() override;\n+    std::vector<char const*> instance_extensions() override;\n     uint32_t get_presentation_queue_family_index(vk::PhysicalDevice const& pd) override;\n     bool should_quit() override;\n     vk::Extent2D get_vk_extent() override;\ndiff --git a/src/ws/xcb_native_system.cpp b/src/ws/xcb_native_system.cpp\nindex 59c84f0..b683772 100644\n--- a/src/ws/xcb_native_system.cpp\n+++ b/src/ws/xcb_native_system.cpp\n@@ -47,7 +47,7 @@ XcbNativeSystem::~XcbNativeSystem()\n     xcb_disconnect(connection);\n }\n \n-std::vector<char const*> XcbNativeSystem::vulkan_extensions()\n+std::vector<char const*> XcbNativeSystem::instance_extensions()\n {\n     return {VK_KHR_XCB_SURFACE_EXTENSION_NAME};\n }\ndiff --git a/src/ws/xcb_native_system.h b/src/ws/xcb_native_system.h\nindex 7fcc44a..dadc32f 100644\n--- a/src/ws/xcb_native_system.h\n+++ b/src/ws/xcb_native_system.h\n@@ -35,7 +35,7 @@ class XcbNativeSystem : public NativeSystem\n     XcbNativeSystem(int width, int height, xcb_visualid_t visual_id);\n     ~XcbNativeSystem();\n \n-    std::vector<char const*> vulkan_extensions() override;\n+    std::vector<char const*> instance_extensions() override;\n     uint32_t get_presentation_queue_family_index(vk::PhysicalDevice const& pd) override;\n     bool should_quit() override;\n     vk::Extent2D get_vk_extent() override;\ndiff --git a/tests/null_window_system.h b/tests/null_window_system.h\nindex bc01276..b7cc9ba 100644\n--- a/tests/null_window_system.h\n+++ b/tests/null_window_system.h\n@@ -39,7 +39,7 @@ class NullWindowSystem : public WindowSystem, public VulkanWSI\n \n     bool should_quit() override { return false; }\n \n-    std::vector<char const*> vulkan_extensions() override { return {}; }\n+    Extensions required_extensions() override { return {}; }\n     bool is_physical_device_supported(vk::PhysicalDevice const&) override { return true; }\n     std::vector<uint32_t> physical_device_queue_family_indices(\n         vk::PhysicalDevice const&) override\ndiff --git a/tests/test_window_system_plugin.cpp b/tests/test_window_system_plugin.cpp\nindex 7877c8e..a562958 100644\n--- a/tests/test_window_system_plugin.cpp\n+++ b/tests/test_window_system_plugin.cpp\n@@ -32,7 +32,7 @@ class TestWindowSystem : public NullWindowSystem\n {\n public:\n     TestWindowSystem(std::string const& id) : id{id} {}\n-    std::vector<char const*> vulkan_extensions() override { return {id.c_str()}; }\n+    Extensions required_extensions() override { return {{id.c_str()}, {}}; }\n \n private:\n     std::string const id;\ndiff --git a/tests/window_system_loader_test.cpp b/tests/window_system_loader_test.cpp\nindex 8aed335..c458e61 100644\n--- a/tests/window_system_loader_test.cpp\n+++ b/tests/window_system_loader_test.cpp\n@@ -84,7 +84,7 @@ class TestWindowSystems\n \n int window_system_id(WindowSystem& ws)\n {\n-    return std::stoi(ws.vulkan_wsi().vulkan_extensions()[0]);\n+    return std::stoi(ws.vulkan_wsi().required_extensions().instance[0]);\n }\n \n }\n\nFrom dd75130a7ddf747eb7fd755946e84baf98a6e05f Mon Sep 17 00:00:00 2001\nFrom: Alexandros Frantzis <alexandros.frantzis@collabora.com>\nDate: Fri, 9 Sep 2022 16:23:40 +0300\nSubject: [PATCH 4/4] kms: Use VK_EXT_external_memory_dmabuf to create\n dmabuf-backed Vulkan images\n\nDrop the vkCreateDmaBufImageINTEL extension function and use the\nfunctionality provided by the official VK_EXT_external_memory_dmabuf\nextension to create dmabuf-backed Vulkan images.\n\nFixes #33\n\nCo-authored-by: Jeffy Chen <jeffy.chen@rock-chips.com>\n---\n meson.build                  |   7 +-\n src/ws/kms_window_system.cpp | 132 +++++++++++++++++++++++------------\n 2 files changed, 89 insertions(+), 50 deletions(-)\n\ndiff --git a/meson.build b/meson.build\nindex 7d305dc..0d83918 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -32,16 +32,11 @@ wayland_protocols_dep = dependency('wayland-protocols', version : '>= 1.12',\n wayland_scanner_dep = dependency('wayland-scanner', required : get_option('wayland') == 'true')\n libdrm_dep = dependency('libdrm', required : get_option('kms') == 'true')\n gbm_dep = dependency('gbm', required : get_option('kms') == 'true')\n-has_vulkan_intel_header = cpp.has_header('vulkan/vulkan_intel.h', dependencies: vulkan_dep)\n-\n-if get_option('kms') == 'true' and not has_vulkan_intel_header\n-    error('KMS plugin needs the vulkan_intel.h header, but it couldn\\'t be found')\n-endif\n \n build_xcb_ws = xcb_dep.found() and xcb_icccm_dep.found() and get_option('xcb') != 'false'\n build_wayland_ws = (wayland_client_dep.found() and wayland_protocols_dep.found() and\n                     wayland_scanner_dep.found() and get_option('wayland') != 'false')\n-build_kms_ws = libdrm_dep.found() and gbm_dep.found() and has_vulkan_intel_header and get_option('kms') != 'false'\n+build_kms_ws = libdrm_dep.found() and gbm_dep.found() and get_option('kms') != 'false'\n \n if not build_xcb_ws and not build_wayland_ws and not build_kms_ws\n     error('vkmark needs at least one winsys to work - xcb, wayland or kms')\ndiff --git a/src/ws/kms_window_system.cpp b/src/ws/kms_window_system.cpp\nindex 6132e64..fc02eae 100644\n--- a/src/ws/kms_window_system.cpp\n+++ b/src/ws/kms_window_system.cpp\n@@ -29,8 +29,8 @@\n \n #include <xf86drm.h>\n #include <drm_fourcc.h>\n-#include <vulkan/vulkan_intel.h>\n \n+#include <algorithm>\n #include <system_error>\n #include <fcntl.h>\n #include <unistd.h>\n@@ -270,6 +270,24 @@ void restore_vt(int)\n         global_vt_state->restore();\n }\n \n+uint32_t find_memory_type_index(vk::PhysicalDevice const& physical_device,\n+                                vk::MemoryRequirements const& requirements,\n+                                vk::MemoryPropertyFlags flags)\n+{\n+    auto const properties = physical_device.getMemoryProperties();\n+\n+    for (uint32_t i = 0; i < properties.memoryTypeCount; i++)\n+    {\n+        if ((requirements.memoryTypeBits & (1 << i)) &&\n+            (properties.memoryTypes[i].propertyFlags & flags) == flags)\n+        {\n+            return i;\n+        }\n+    }\n+\n+    throw std::runtime_error{\"Coudn't find matching memory type\"};\n+}\n+\n }\n \n VTState::VTState()\n@@ -433,14 +451,20 @@ void KMSWindowSystem::create_drm_fbs()\n     for (auto const& gbm_bo : gbm_bos)\n     {\n         uint32_t fb = 0;\n+        uint32_t handles[4] = {0};\n+        uint32_t strides[4] = {0};\n+        uint32_t offsets[4] = {0};\n \n-        uint32_t handles[4] = {gbm_bo_get_handle(gbm_bo).u32, 0, 0, 0};\n-        uint32_t strides[4] = {gbm_bo_get_stride(gbm_bo), 0, 0, 0};\n-        uint32_t offsets[4] = {0, 0, 0, 0};\n+        for (auto i = 0; i < gbm_bo_get_plane_count(gbm_bo); i++)\n+        {\n+            handles[i] = gbm_bo_get_handle_for_plane(gbm_bo, i).u32;\n+            offsets[i] = gbm_bo_get_offset(gbm_bo, i);\n+            strides[i] = gbm_bo_get_stride_for_plane(gbm_bo, i);\n+        }\n \n         auto const ret = drmModeAddFB2(\n             drm_fd, vk_extent.width, vk_extent.height,\n-            DRM_FORMAT_XRGB8888,\n+            gbm_bo_get_format(gbm_bo),\n             handles, strides, offsets, &fb, 0);\n \n         if (ret < 0)\n@@ -453,52 +477,65 @@ void KMSWindowSystem::create_drm_fbs()\n     }\n }\n \n-// TODO: Use an official extension to create the VkImages when it becomes\n-// available (e.g. VK_MESAX_external_image_dma_buf)\n void KMSWindowSystem::create_vk_images()\n {\n-    auto const create_dma_buf_image =\n-        reinterpret_cast<PFN_vkCreateDmaBufImageINTEL>(\n-            vulkan->device().getProcAddr(\"vkCreateDmaBufImageINTEL\"));\n-\n-    if (!create_dma_buf_image)\n-        throw std::runtime_error{\"Failed to get vkCreateDmaBufImageINTEL function pointer\"};\n-\n     for (auto const& gbm_bo : gbm_bos)\n     {\n         auto const fd = ManagedResource<int>{gbm_bo_get_fd(gbm_bo), close};\n-        auto const stride = gbm_bo_get_stride(gbm_bo);\n-\n-        VkDmaBufImageCreateInfo create_info{};\n-        create_info.sType = static_cast<VkStructureType>(VK_STRUCTURE_TYPE_DMA_BUF_IMAGE_CREATE_INFO_INTEL);\n-        create_info.fd = fd;\n-        create_info.format = static_cast<VkFormat>(vk_image_format);\n-        create_info.extent = {vk_extent.width, vk_extent.height, 1};\n-        create_info.strideInBytes = stride;\n-\n-        VkImage image;\n-        VkDeviceMemory device_memory;\n-\n-        VkResult result = create_dma_buf_image(\n-            vulkan->device(),\n-            &create_info,\n-            nullptr,\n-            &device_memory,\n-            &image);\n-\n-        if (result != VK_SUCCESS)\n-        {\n-            vk::throwResultException(static_cast<vk::Result>(result),\n-                                     \"vkCreateDmbBufImageINTEL\");\n-        }\n+        uint64_t modifier = gbm_bo_get_modifier(gbm_bo);\n+\n+        auto const modifier_info = vk::ImageDrmFormatModifierListCreateInfoEXT{}\n+            .setDrmFormatModifierCount(1)\n+            .setPDrmFormatModifiers(&modifier);\n+        auto const external_memory_create_info = vk::ExternalMemoryImageCreateInfoKHR{}\n+            .setHandleTypes(vk::ExternalMemoryHandleTypeFlagBitsKHR::eDmaBufEXT)\n+            .setPNext(&modifier_info);\n+        auto const image_create_info = vk::ImageCreateInfo{}\n+            .setPNext(&external_memory_create_info)\n+            .setImageType(vk::ImageType::e2D)\n+            .setFormat(vk_image_format)\n+            .setExtent({vk_extent.width, vk_extent.height, 1})\n+            .setMipLevels(1)\n+            .setArrayLayers(1)\n+            .setSamples(vk::SampleCountFlagBits::e1)\n+            .setTiling(vk::ImageTiling::eDrmFormatModifierEXT)\n+            .setUsage(vk::ImageUsageFlagBits::eColorAttachment)\n+            .setSharingMode(vk::SharingMode::eExclusive)\n+            .setInitialLayout(vk::ImageLayout::eUndefined);\n+\n+        auto vk_image = ManagedResource<vk::Image>{\n+            vulkan->device().createImage(image_create_info),\n+            [vptr=vulkan] (auto const& i) { vptr->device().destroyImage(i); }};\n+\n+        auto const requirements = vulkan->device().getImageMemoryRequirements(vk_image);\n+        uint32_t index = find_memory_type_index(vulkan->physical_device(),\n+                                                requirements,\n+                                                vk::MemoryPropertyFlagBits::eDeviceLocal);\n+\n+        auto const import_memory_fd_info = vk::ImportMemoryFdInfoKHR{}\n+            .setHandleType(vk::ExternalMemoryHandleTypeFlagBitsKHR::eDmaBufEXT)\n+            .setFd(fd);\n+        auto const dedicated_allocate_info = vk::MemoryDedicatedAllocateInfoKHR{}\n+            .setPNext(&import_memory_fd_info)\n+            .setImage(vk_image);\n+        auto const memory_allocate_info = vk::MemoryAllocateInfo{}\n+            .setPNext(&dedicated_allocate_info)\n+            .setAllocationSize(requirements.size)\n+            .setMemoryTypeIndex((uint32_t)index);\n+\n+        auto device_memory = ManagedResource<vk::DeviceMemory>{\n+            vulkan->device().allocateMemory(memory_allocate_info),\n+            [vptr=vulkan] (auto const& m) { vptr->device().freeMemory(m); }};\n+\n+        vulkan->device().bindImageMemory(vk_image, device_memory, 0);\n \n         vk_images.push_back(\n             ManagedResource<vk::Image>{\n-                vk::Image{image},\n-                [vptr=vulkan, device_memory] (auto& image)\n+                vk_image.steal(),\n+                [vptr=vulkan, mem=device_memory.steal()] (auto const& image)\n                 {\n                     vptr->device().destroyImage(image);\n-                    vptr->device().freeMemory(device_memory);\n+                    vptr->device().freeMemory(mem);\n                 }});\n     }\n }\n@@ -535,12 +572,19 @@ void KMSWindowSystem::wait_for_drm_page_flip_event()\n \n VulkanWSI::Extensions KMSWindowSystem::required_extensions()\n {\n-    return {};\n+    return {{}, {VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME}};\n }\n \n-bool KMSWindowSystem::is_physical_device_supported(vk::PhysicalDevice const&)\n+bool KMSWindowSystem::is_physical_device_supported(vk::PhysicalDevice const& physdev)\n {\n-    return true;\n+    auto const props = physdev.enumerateDeviceExtensionProperties();\n+    auto const iter = std::find_if(\n+        props.begin(), props.end(),\n+        [](vk::ExtensionProperties prop)\n+        {\n+            return std::string{VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME} == prop.extensionName;\n+        });\n+    return iter != props.end();\n }\n \n std::vector<uint32_t> KMSWindowSystem::physical_device_queue_family_indices(\n"
  },
  {
    "path": "packages/graphics/vulkan/vulkan-headers/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vulkan-headers\"\nPKG_VERSION=\"1.3.241\"\nPKG_SHA256=\"4322fd17d456c0687ed947b1b75d7b10b121ec20ed43d1cfa76e721f7e803bec\"\nPKG_LICENSE=\"Apache-2.0\"\nPKG_SITE=\"https://github.com/KhronosGroup/Vulkan-Headers\"\nPKG_URL=\"https://github.com/KhronosGroup/Vulkan-Headers/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Vulkan Header files and API registry\"\n"
  },
  {
    "path": "packages/graphics/vulkan/vulkan-loader/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vulkan-loader\"\nPKG_VERSION=\"1.3.241\"\nPKG_SHA256=\"c107034a5ee958f912d5a234fd11f7e6b28bf227b51c8f12f3eee633351c1d70\"\nPKG_LICENSE=\"Apache-2.0\"\nPKG_SITE=\"https://github.com/KhronosGroup/Vulkan-Loader\"\nPKG_URL=\"https://github.com/KhronosGroup/Vulkan-Loader/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3:host vulkan-headers\"\nPKG_LONGDESC=\"Vulkan Installable Client Driver (ICD) Loader.\"\n\nconfigure_package() {\n  # Displayserver Support\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_DEPENDS_TARGET+=\" libxcb libX11 libXrandr\"\n  elif [ \"${DISPLAYSERVER}\" = \"wl\" ]; then\n    PKG_DEPENDS_TARGET+=\" wayland\"\n  fi\n}\n\npre_configure_target() {\n  PKG_CMAKE_OPTS_TARGET=\"-DBUILD_TESTS=OFF\"\n\n  # GAS / GNU Assembler is only supported by aarch64 & x86_64\n  if [ \"${ARCH}\" = \"arm\" ]; then\n    PKG_CMAKE_OPTS_TARGET+=\" -DUSE_GAS=OFF\"\n  fi\n\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_CMAKE_OPTS_TARGET+=\" -DBUILD_WSI_XCB_SUPPORT=ON \\\n                             -DBUILD_WSI_XLIB_SUPPORT=ON \\\n                             -DBUILD_WSI_WAYLAND_SUPPORT=OFF\"\n  elif [ \"${DISPLAYSERVER}\" = \"wl\" ]; then\n    PKG_CMAKE_OPTS_TARGET+=\" -DBUILD_WSI_XCB_SUPPORT=OFF \\\n                             -DBUILD_WSI_XLIB_SUPPORT=OFF \\\n                             -DBUILD_WSI_WAYLAND_SUPPORT=ON\"\n  else\n    PKG_CMAKE_OPTS_TARGET+=\" -DBUILD_WSI_XCB_SUPPORT=OFF \\\n                             -DBUILD_WSI_XLIB_SUPPORT=OFF \\\n                             -DBUILD_WSI_WAYLAND_SUPPORT=OFF\"\n  fi\n}\n"
  },
  {
    "path": "packages/graphics/vulkan/vulkan-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vulkan-tools\"\nPKG_VERSION=\"1.3.241\"\nPKG_SHA256=\"e8bb61e6c4514cb60b85d74cd27204001a19492310e3055659778b1d33bb0078\"\nPKG_LICENSE=\"Apache-2.0\"\nPKG_SITE=\"https://github.com/KhronosGroup/Vulkan-Tools\"\nPKG_URL=\"https://github.com/KhronosGroup/Vulkan-tools/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain vulkan-loader glslang:host\"\nPKG_LONGDESC=\"This project provides Khronos official Vulkan Tools and Utilities.\"\n\nconfigure_package() {\n  # Displayserver Support\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_DEPENDS_TARGET+=\" libxcb libX11\"\n  elif [ \"${DISPLAYSERVER}\" = \"wl\" ]; then\n    PKG_DEPENDS_TARGET+=\" wayland\"\n  fi\n}\n\npre_configure_target() {\n  PKG_CMAKE_OPTS_TARGET=\"-DVULKAN_HEADERS_INSTALL_DIR=${SYSROOT_PREFIX}/usr \\\n                         -DBUILD_VULKANINFO=ON \\\n                         -DBUILD_ICD=OFF \\\n                         -DINSTALL_ICD=OFF \\\n                         -DBUILD_WSI_DIRECTFB_SUPPORT=OFF \\\n                         -Wno-dev\"\n\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_CMAKE_OPTS_TARGET+=\" -DBUILD_CUBE=ON \\\n                             -DBUILD_WSI_XCB_SUPPORT=ON \\\n                             -DBUILD_WSI_XLIB_SUPPORT=ON \\\n                             -DBUILD_WSI_WAYLAND_SUPPORT=OFF \\\n                             -DCUBE_WSI_SELECTION=XCB\"\n  elif [ \"${DISPLAYSERVER}\" = \"wl\" ]; then\n    PKG_CMAKE_OPTS_TARGET+=\" -DBUILD_CUBE=ON \\\n                             -DBUILD_WSI_XCB_SUPPORT=OFF \\\n                             -DBUILD_WSI_XLIB_SUPPORT=OFF \\\n                             -DBUILD_WSI_WAYLAND_SUPPORT=ON\n                             -DCUBE_WSI_SELECTION=WAYLAND\"\n  else\n    PKG_CMAKE_OPTS_TARGET+=\" -DBUILD_CUBE=ON \\\n                             -DBUILD_WSI_XCB_SUPPORT=OFF \\\n                             -DBUILD_WSI_XLIB_SUPPORT=OFF \\\n                             -DBUILD_WSI_WAYLAND_SUPPORT=OFF \\\n                             -DCUBE_WSI_SELECTION=DISPLAY\"\n  fi\n}\n\npre_make_target() {\n  # Fix cross compiling\n  find ${PKG_BUILD} -name flags.make -exec sed -i  \"s:isystem :I:g\" \\{} \\;\n  find ${PKG_BUILD} -name build.ninja -exec sed -i \"s:isystem :I:g\" \\{} \\;\n}\n\npost_makeinstall_target() {\n  # Clean up - two graphic test tools are superflous\n  safe_remove ${INSTALL}/usr/bin/vkcubepp\n}\n"
  },
  {
    "path": "packages/graphics/vulkan/vulkan-tools/patches/vulkan-tools-995.01-cmakelists-opts.patch",
    "content": "From c9c7423f2d0ecfc7ab354d2a3d9ea9c2e4998416 Mon Sep 17 00:00:00 2001\nFrom: SupervisedThinking <supervisedthinking@gmail.com>\nDate: Thu, 18 Nov 2021 15:02:55 +0100\nSubject: [PATCH] CMakeLists: add CMake options for cube & vulkaninfo\n\n---\n CMakeLists.txt | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/CMakeLists.txt b/CMakeLists.txt\nindex 422b7d2cc..d123c9dc5 100644\n--- a/CMakeLists.txt\n+++ b/CMakeLists.txt\n@@ -41,6 +41,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} \"${CMAKE_CURRENT_SOURCE_DIR}/cmake\")\n option(BUILD_CUBE \"Build cube\" ON)\n option(BUILD_VULKANINFO \"Build vulkaninfo\" ON)\n option(BUILD_ICD \"Build icd\" ON)\n+option(BUILD_WSI_XCB_SUPPORT \"Build XCB WSI support\" ON)\n+option(BUILD_WSI_XLIB_SUPPORT \"Build Xlib WSI support\" ON)\n+option(BUILD_WSI_WAYLAND_SUPPORT \"Build Wayland WSI support\" ON)\n+option(BUILD_WSI_DIRECTFB_SUPPORT \"Build DirectFB WSI support\" OFF)\n+set(CUBE_WSI_SELECTION \"XCB\" CACHE STRING \"Select WSI target for vkcube (XCB, XLIB, WAYLAND, DIRECTFB, DISPLAY)\")\n+\n # Installing the Mock ICD to system directories is probably not desired since this ICD is not a very complete implementation.\n # Require the user to ask that it be installed if they really want it.\n option(INSTALL_ICD \"Install icd\" OFF)\n"
  },
  {
    "path": "packages/graphics/vulkan/vulkan-tools/patches/vulkan-tools-995.04-fix-glslangValidator-logik.patch",
    "content": "From a1894dc9f650ab94fb7e348e1b06ee75a1e9728b Mon Sep 17 00:00:00 2001\nFrom: SupervisedThinking <supervisedthinking@gmail.com>\nDate: Sat, 20 Nov 2021 18:39:04 +0100\nSubject: [PATCH] CMakeLists: updated glslangValidator logik\n\n---\n cube/CMakeLists.txt | 43 +++++++++++++++++++++++++++----------------\n 1 file changed, 27 insertions(+), 16 deletions(-)\n\ndiff --git a/cube/CMakeLists.txt b/cube/CMakeLists.txt\nindex d59eb4366..a684fc4f0 100644\n--- a/cube/CMakeLists.txt\n+++ b/cube/CMakeLists.txt\n@@ -26,26 +26,37 @@ endif()\n if(GLSLANG_INSTALL_DIR)\n     message(STATUS \"Using GLSLANG_INSTALL_DIR to look for glslangValidator\")\n     find_program(GLSLANG_VALIDATOR names glslangValidator HINTS \"${GLSLANG_INSTALL_DIR}/bin\")\n+\n else()\n     set(GLSLANG_VALIDATOR_NAME \"glslangValidator\")\n-    message(STATUS \"Using cmake find_program to look for glslangValidator\")\n-    if(WIN32)\n-        execute_process(\n-            COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/fetch_glslangvalidator.py glslang-master-windows-x64-Release.zip)\n-        set(GLSLANG_VALIDATOR_NAME \"glslangValidator.exe\")\n-    elseif(APPLE)\n-        execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/fetch_glslangvalidator.py glslang-master-osx-Release.zip)\n-    elseif(UNIX AND NOT APPLE) # i.e. Linux\n-        execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/fetch_glslangvalidator.py glslang-master-linux-Release.zip)\n-    endif()\n-    if (WIN32)\n-        set(PLATFORM_DIR \"${PROJECT_SOURCE_DIR}/glslang/windows/bin\")\n-    elseif(APPLE)\n-        set(PLATFORM_DIR \"${PROJECT_SOURCE_DIR}/glslang/darwin/bin\")\n+    message(CHECK_START \"Looking for glslangValidator\")\n+    find_program(GLSLANG_VALIDATOR NAMES ${GLSLANG_VALIDATOR_NAME} HINTS ${PLATFORM_DIR})\n+    if(GLSLANG_VALIDATOR)\n+        message(CHECK_PASS ${GLSLANG_VALIDATOR})\n     else()\n-        set(PLATFORM_DIR \"${PROJECT_SOURCE_DIR}/glslang/linux/bin\")\n+        if(WIN32)\n+            execute_process(\n+                COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/fetch_glslangvalidator.py glslang-master-windows-x64-Release.zip)\n+            set(GLSLANG_VALIDATOR_NAME \"glslangValidator.exe\")\n+        elseif(APPLE)\n+            execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/fetch_glslangvalidator.py glslang-master-osx-Release.zip)\n+        elseif(UNIX AND NOT APPLE) # i.e. Linux\n+            execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/fetch_glslangvalidator.py glslang-master-linux-Release.zip)\n+        endif()\n+        if (WIN32)\n+            set(PLATFORM_DIR \"${PROJECT_SOURCE_DIR}/glslang/windows/bin\")\n+        elseif(APPLE)\n+            set(PLATFORM_DIR \"${PROJECT_SOURCE_DIR}/glslang/darwin/bin\")\n+        else()\n+            set(PLATFORM_DIR \"${PROJECT_SOURCE_DIR}/glslang/linux/bin\")\n+        endif()\n+        find_program(GLSLANG_VALIDATOR NAMES ${GLSLANG_VALIDATOR_NAME} HINTS ${PLATFORM_DIR})\n+        if(GLSLANG_VALIDATOR)\n+            message(CHECK_PASS ${GLSLANG_VALIDATOR})\n+        else()\n+            message(FATAL_ERROR \"no glslangValidator binary found\")\n+        endif()\n     endif()\n-    find_program(GLSLANG_VALIDATOR NAMES ${GLSLANG_VALIDATOR_NAME} HINTS ${PLATFORM_DIR})\n endif()\n \n if(UNIX AND NOT APPLE) # i.e. Linux\n"
  },
  {
    "path": "packages/lang/Python3/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Python3\"\n# When changing PKG_VERSION remember to sync PKG_PYTHON_VERSION!\nPKG_VERSION=\"3.11.2\"\nPKG_SHA256=\"29e4b8f5f1658542a8c13e2dd277358c9c48f2b2f7318652ef1675e402b9d2af\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.python.org/\"\nPKG_URL=\"https://www.python.org/ftp/python/${PKG_VERSION}/${PKG_NAME::-1}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"zlib:host bzip2:host libffi:host util-linux:host xz:host autoconf-archive:host\"\nPKG_DEPENDS_TARGET=\"toolchain Python3:host sqlite expat zlib bzip2 xz openssl libffi readline ncurses util-linux\"\nPKG_LONGDESC=\"Python3 is an interpreted object-oriented programming language.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_PYTHON_VERSION=\"python3.11\"\n\nPKG_PY_DISABLED_MODULES=\"_tkinter nis gdbm bsddb ossaudiodev\"\n\nPKG_CONFIGURE_OPTS_HOST=\"ac_cv_prog_HAS_HG=/bin/false\n                         ac_cv_prog_SVNVERSION=/bin/false\n                         --disable-pyc-build\n                         --disable-ossaudiodev\n                         --disable-sqlite3\n                         --disable-codecs-cjk\n                         --disable-nis\n                         --enable-unicodedata\n                         --enable-openssl\n                         --disable-readline\n                         --disable-bzip2\n                         --enable-zlib\n                         --enable-xz\n                         --disable-tk\n                         --disable-curses\n                         --disable-pydoc\n                         --disable-test-modules\n                         --disable-lib2to3\n                         --disable-idle3\n                         --without-cxx-main\n                         --with-expat=builtin\n                         --with-libmpdec=none\n                         --with-doc-strings\n                         --with-system-ffi\n                         --without-pymalloc\n                         --without-ensurepip\n\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_prog_HAS_HG=/bin/false\n                           ac_cv_prog_SVNVERSION=/bin/false\n                           ac_cv_file__dev_ptmx=no\n                           ac_cv_file__dev_ptc=no\n                           ac_cv_have_long_long_format=yes\n                           ac_cv_working_tzset=yes\n                           ac_cv_func_lchflags_works=no\n                           ac_cv_func_chflags_works=no\n                           ac_cv_func_printf_zd=yes\n                           ac_cv_buggy_getaddrinfo=no\n                           ac_cv_header_bluetooth_bluetooth_h=no\n                           ac_cv_header_bluetooth_h=no\n                           --disable-pyc-build\n                           --disable-ossaudiodev\n                           --enable-sqlite3\n                           --disable-codecs-cjk\n                           --disable-nis\n                           --enable-unicodedata\n                           --enable-openssl\n                           --enable-readline\n                           --enable-bzip2\n                           --enable-zlib\n                           --enable-xz\n                           --disable-tk\n                           --enable-curses\n                           --disable-pydoc\n                           --disable-test-modules\n                           --disable-lib2to3\n                           --disable-idle3\n                           --without-cxx-main\n                           --with-expat=system\n                           --with-libmpdec=none\n                           --with-doc-strings\n                           --with-system-ffi\n                           --without-pymalloc\n                           --without-ensurepip\n                           --enable-ipv6\n                           --with-build-python=${TOOLCHAIN}/bin/python\n\"\n\npre_configure_host() {\n  export PYTHON_MODULES_INCLUDE=\"${HOST_INCDIR}\"\n  export PYTHON_MODULES_LIB=\"${HOST_LIBDIR}\"\n  export DISABLED_EXTENSIONS=\"readline _curses _curses_panel ${PKG_PY_DISABLED_MODULES}\"\n}\n\npost_make_host() {\n  # python distutils per default adds -L${LIBDIR} when linking binary extensions\n  sed -e \"s|^ 'LIBDIR':.*| 'LIBDIR': '/usr/lib',|g\" -i $(find ${PKG_BUILD}/.${HOST_NAME} -not -path '*/__pycache__/*' -name '_sysconfigdata__*.py')\n}\n\npost_makeinstall_host() {\n  ln -sf ${PKG_PYTHON_VERSION} ${TOOLCHAIN}/bin/python\n\n  rm -f ${TOOLCHAIN}/bin/smtpd.py*\n  rm -f ${TOOLCHAIN}/bin/pyvenv\n  rm -f ${TOOLCHAIN}/bin/pydoc*\n\n  rm -fr ${PKG_BUILD}/.${HOST_NAME}/build/temp.*\n\n  cp ${PKG_BUILD}/Tools/scripts/reindent.py ${TOOLCHAIN}/lib/${PKG_PYTHON_VERSION}\n}\n\npre_configure_target() {\n  export PYTHON_MODULES_INCLUDE=\"${TARGET_INCDIR}\"\n  export PYTHON_MODULES_LIB=\"${TARGET_LIBDIR}\"\n  export DISABLED_EXTENSIONS=\"${PKG_PY_DISABLED_MODULES}\"\n}\n\npost_makeinstall_target() {\n  ln -sf ${PKG_PYTHON_VERSION} ${INSTALL}/usr/bin/python\n\n  rm -fr ${PKG_BUILD}/.${TARGET_NAME}/build/temp.*\n\n  PKG_INSTALL_PATH_LIB=${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}\n\n  for dir in config compiler sysconfigdata lib-dynload/sysconfigdata lib2to3/tests test; do\n    rm -rf ${PKG_INSTALL_PATH_LIB}/${dir}\n  done\n\n  rm -rf ${PKG_INSTALL_PATH_LIB}/distutils/command/*.exe\n\n  rm -rf ${INSTALL}/usr/bin/pyvenv\n  rm -rf ${INSTALL}/usr/bin/python*-config\n  rm -rf ${INSTALL}/usr/bin/smtpd.py ${INSTALL}/usr/bin/smtpd.py.*\n\n  find ${INSTALL} -name '*.o' -delete\n\n  python_compile ${PKG_INSTALL_PATH_LIB}\n\n  # strip\n  chmod u+w ${INSTALL}/usr/lib/libpython*.so.*\n  debug_strip ${INSTALL}/usr\n}\n"
  },
  {
    "path": "packages/lang/Python3/patches/0001-Make-the-build-of-pyc-files-conditional.patch",
    "content": "From 51ed7f93cc0333efa8fccd9b88db713c48993df9 Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 22 Feb 2017 16:21:31 -0800\nSubject: [PATCH] Make the build of pyc files conditional\n\nThis commit adds a new configure option --disable-pyc-build to disable\nthe compilation of pyc.\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n[ Andrey Smrinov: ported to Python 3.6 ]\nSigned-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>\n---\n Makefile.pre.in | 2 ++\n configure.ac    | 6 ++++++\n 2 files changed, 8 insertions(+)\n\ndiff --git a/Makefile.pre.in b/Makefile.pre.in\nindex 8fbcd7ac17..2957c8e5a1 100644\n--- a/Makefile.pre.in\n+++ b/Makefile.pre.in\n@@ -2078,6 +2078,7 @@ libinstall:\tall $(srcdir)/Modules/xxmodule.c\n \t\t$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \\\n \t\t\t$(DESTDIR)$(LIBDEST)/distutils/tests ; \\\n \tfi\n+ifeq (@PYC_BUILD@,yes)\n \t-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \\\n \t\t$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \\\n \t\t-j0 -d $(LIBDEST) -f \\\n@@ -2105,6 +2106,7 @@ libinstall:\tall $(srcdir)/Modules/xxmodule.c\n \t\t$(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \\\n \t\t-j0 -d $(LIBDEST)/site-packages -f \\\n \t\t-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages\n+endif\n \t-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \\\n \t\t$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt\n \t-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \\\ndiff --git a/configure.ac b/configure.ac\nindex ab5e1de6fa..0cf89ed641 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -1441,6 +1441,12 @@ fi\n \n AC_MSG_CHECKING(LDLIBRARY)\n \n+AC_SUBST(PYC_BUILD)\n+\n+AC_ARG_ENABLE(pyc-build,\n+\tAS_HELP_STRING([--disable-pyc-build], [disable build of pyc files]),\n+\t[ PYC_BUILD=\"${enableval}\" ], [ PYC_BUILD=yes ])\n+\n # MacOSX framework builds need more magic. LDLIBRARY is the dynamic\n # library that we build, but we do not want to link against it (we\n # will find it with a -framework option). For this reason there is an\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0002-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch",
    "content": "From b180ab302e2a82be239af334382436628b81381e Mon Sep 17 00:00:00 2001\nFrom: Vanya Sergeev <vsergeev@gmail.com>\nDate: Wed, 23 Dec 2015 11:30:33 +0100\nSubject: [PATCH] Disable buggy_getaddrinfo configure test when cross-compiling\n with IPv6 support\n\nSigned-off-by: Vanya Sergeev <vsergeev@gmail.com>\n---\n configure.ac | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 0cf89ed641..830885fcb3 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -5086,7 +5086,7 @@ fi]))\n dnl if ac_cv_func_getaddrinfo\n ])\n \n-if test \"$ac_cv_func_getaddrinfo\" = no -o \"$ac_cv_buggy_getaddrinfo\" = yes\n+if test \"$ac_cv_func_getaddrinfo\" = no || test \"$cross_compiling\" != \"yes\" -a \"$ac_cv_buggy_getaddrinfo\" = yes\n then\n   AS_VAR_IF([ipv6], [yes], [\n     AC_MSG_ERROR([m4_normalize([\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0003-Add-infrastructure-to-disable-the-build-of-certain-e.patch",
    "content": "From 8e02cebdac536dfb6748da2c50656a26f70d9da7 Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 22 Feb 2017 16:33:22 -0800\nSubject: [PATCH] Add infrastructure to disable the build of certain extensions\n\nSome of the extensions part of the Python core have dependencies on\nexternal libraries (sqlite, tk, etc.) or are relatively big and not\nnecessarly always useful (CJK codecs for example). By extensions, we\nmean part of Python modules that are written in C and therefore\ncompiled to binary code.\n\nTherefore, we introduce a small infrastructure that allows to disable\nsome of those extensions. This can be done inside the configure.ac by\nadding values to the DISABLED_EXTENSIONS variable (which is a\nword-separated list of extensions).\n\nThe implementation works as follow :\n\n * configure.ac defines a DISABLED_EXTENSIONS variable, which is\n   substituted (so that when Makefile.pre is generated from\n   Makefile.pre.in, the value of the variable is substituted). For\n   now, this DISABLED_EXTENSIONS variable is empty, later patches will\n   use it.\n\n * Makefile.pre.in passes the DISABLED_EXTENSIONS value down to the\n   variables passed in the environment when calling the setup.py\n   script that actually builds and installs those extensions.\n\n * setup.py is modified so that the existing \"disabled_module_list\" is\n   filled with those pre-disabled extensions listed in\n   DISABLED_EXTENSIONS.\n\nPatch ported to python2.7 by Maxime Ripard <ripard@archos.com>, and\nthen extended by Thomas Petazzoni\n<thomas.petazzoni@free-electrons.com>.\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n[ Andrey Smirnov: ported to Python 3.6 ]\nSigned-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>\n---\n Makefile.pre.in | 6 +++++-\n configure.ac    | 2 ++\n setup.py        | 5 ++++-\n 3 files changed, 11 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile.pre.in b/Makefile.pre.in\nindex 2957c8e5a1..c1cfb96767 100644\n--- a/Makefile.pre.in\n+++ b/Makefile.pre.in\n@@ -239,6 +239,8 @@ FILEMODE=\t644\n # configure script arguments\n CONFIG_ARGS=\t@CONFIG_ARGS@\n \n+# disabled extensions\n+DISABLED_EXTENSIONS=\t@DISABLED_EXTENSIONS@\n \n # Subdirectories with code\n SRCDIRS= \t@SRCDIRS@\n@@ -739,6 +741,7 @@ sharedmods: $(PYTHON_FOR_BUILD_DEPS) pybuilddir.txt @LIBMPDEC_INTERNAL@ @LIBEXPA\n \t    *) quiet=\"\";; \\\n \tesac; \\\n \techo \"$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \\\n+\t\tDISABLED_EXTENSIONS=\"$(DISABLED_EXTENSIONS)\" \\\n \t\t$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build\"; \\\n \t$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \\\n \t\t$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build\n@@ -2228,7 +2231,8 @@ libainstall: all python-config\n # Install the dynamically loadable modules\n # This goes into $(exec_prefix)\n sharedinstall: all\n-\t$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \\\n+\t$(RUNSHARED) DISABLED_EXTENSIONS=\"$(DISABLED_EXTENSIONS)\" \\\n+\t\t$(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \\\n \t   \t--prefix=$(prefix) \\\n \t\t--install-scripts=$(BINDIR) \\\n \t\t--install-platlib=$(DESTSHARED) \\\ndiff --git a/configure.ac b/configure.ac\nindex 830885fcb3..5a6a1fe608 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -3562,6 +3562,8 @@ LIBS=\"$withval $LIBS\"\n ],\n [AC_MSG_RESULT(no)])\n \n+AC_SUBST(DISABLED_EXTENSIONS)\n+\n # Check for use of the system expat library\n AC_MSG_CHECKING(for --with-system-expat)\n AC_ARG_WITH(system_expat,\ndiff --git a/setup.py b/setup.py\nindex 15d0d4576a..e496ee34c2 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -56,7 +56,10 @@\n \n \n # This global variable is used to hold the list of modules to be disabled.\n-DISABLED_MODULE_LIST = []\n+try:\n+    DISABLED_MODULE_LIST = sysconfig.get_config_var(\"DISABLED_EXTENSIONS\").split(\" \")\n+except KeyError:\n+    DISABLED_MODULE_LIST = list()\n \n # --list-module-names option used by Tools/scripts/generate_module_names.py\n LIST_MODULE_NAMES = False\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0004-Adjust-library-header-paths-for-cross-compilation.patch",
    "content": "From 132b9dca3bb4d4682f7e318648ce11e1abb31b62 Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 23 Dec 2015 11:33:14 +0100\nSubject: [PATCH] Adjust library/header paths for cross-compilation\n\nWhen cross-compiling third-party extensions, the get_python_inc() or\nget_python_lib() can be called, to return the path to headers or\nlibraries. However, they use the sys.prefix of the host Python, which\nreturns incorrect paths when cross-compiling (paths pointing to host\nheaders and libraries).\n\nIn order to fix this, we introduce the _python_sysroot, _python_prefix\nand _python_exec_prefix variables, that allow to override these\nvalues, and get correct header/library paths when cross-compiling\nthird-party Python modules.\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nSigned-off-by: Adam Duskett <aduskett@gmail.com>\nRefresh for 3.10.0\n---\n Lib/distutils/command/build_ext.py |  5 ++++-\n Lib/sysconfig.py                   | 15 +++++++++++----\n 2 files changed, 15 insertions(+), 5 deletions(-)\n\ndiff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py\nindex f287b34998..298234d6a1 100644\n--- a/Lib/distutils/command/build_ext.py\n+++ b/Lib/distutils/command/build_ext.py\n@@ -234,7 +234,10 @@ def finalize_options(self):\n         if (sysconfig.get_config_var('Py_ENABLE_SHARED')):\n             if not sysconfig.python_build:\n                 # building third party extensions\n-                self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))\n+                libdir = sysconfig.get_config_var('LIBDIR')\n+                if \"_python_sysroot\" in os.environ:\n+                    libdir = os.environ.get(\"_python_sysroot\") + libdir\n+                self.library_dirs.append(libdir)\n             else:\n                 # building python standard extensions\n                 self.library_dirs.append('.')\ndiff --git a/Lib/sysconfig.py b/Lib/sysconfig.py\nindex ebe3711827..6328ec41af 100644\n--- a/Lib/sysconfig.py\n+++ b/Lib/sysconfig.py\n@@ -168,10 +168,17 @@ def joinuser(*args):\n _PY_VERSION = sys.version.split()[0]\n _PY_VERSION_SHORT = f'{sys.version_info[0]}.{sys.version_info[1]}'\n _PY_VERSION_SHORT_NO_DOT = f'{sys.version_info[0]}{sys.version_info[1]}'\n-_PREFIX = os.path.normpath(sys.prefix)\n-_BASE_PREFIX = os.path.normpath(sys.base_prefix)\n-_EXEC_PREFIX = os.path.normpath(sys.exec_prefix)\n-_BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)\n+if \"_python_sysroot\" in os.environ:\n+    _sysroot=os.environ.get('_python_sysroot')\n+    _PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))\n+    _EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))\n+    _BASE_PREFIX = _PREFIX\n+    _BASE_EXEC_PREFIX = _EXEC_PREFIX\n+else:\n+    _PREFIX = os.path.normpath(sys.prefix)\n+    _EXEC_PREFIX = os.path.normpath(sys.exec_prefix)\n+    _BASE_PREFIX = os.path.normpath(sys.base_prefix)\n+    _BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)\n _CONFIG_VARS = None\n _USER_BASE = None\n \n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch",
    "content": "From 5d13e384b30a2c0b1c7b65718590b7fb0c3ba55e Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 23 Dec 2015 11:36:00 +0100\nSubject: [PATCH] Don't look in /usr/lib/termcap for libraries\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n---\n setup.py | 5 +----\n 1 file changed, 1 insertion(+), 4 deletions(-)\n\ndiff --git a/setup.py b/setup.py\nindex e496ee34c2..1904898165 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -1107,12 +1107,9 @@ def detect_readline_curses(self):\n                 pass # Issue 7384: Already linked against curses or tinfo.\n             elif curses_library:\n                 readline_libs.append(curses_library)\n-            elif self.compiler.find_library_file(self.lib_dirs +\n-                                                     ['/usr/lib/termcap'],\n-                                                     'termcap'):\n+            elif self.compiler.find_library_file(self.lib_dirs, 'termcap'):\n                 readline_libs.append('termcap')\n             self.add(Extension('readline', ['readline.c'],\n-                               library_dirs=['/usr/lib/termcap'],\n                                libraries=readline_libs))\n         else:\n             self.missing.append('readline')\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0006-Don-t-add-multiarch-paths.patch",
    "content": "From ad463b5d58ae79f69b011fb048861bd874d34369 Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 23 Dec 2015 11:36:27 +0100\nSubject: [PATCH] Don't add multiarch paths\n\nThe add_multiarch_paths() function leads, in certain build\nenvironments, to the addition of host header paths to the CFLAGS,\nwhich is not appropriate for cross-compilation. This patch fixes that\nby simply removing the call to add_multiarch_paths() when we're\ncross-compiling.\n\nInvestigation done by David <buildroot-2014@inbox.com>.\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n---\n setup.py | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/setup.py b/setup.py\nindex 1904898165..32294546b6 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -852,10 +852,10 @@ def configure_compiler(self):\n         if not CROSS_COMPILING:\n             add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')\n             add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')\n+            self.add_multiarch_paths()\n         # only change this for cross builds for 3.3, issues on Mageia\n         if CROSS_COMPILING:\n             self.add_cross_compiling_paths()\n-        self.add_multiarch_paths()\n         self.add_ldflags_cppflags()\n \n     def init_inc_lib_dirs(self):\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0007-Abort-on-failed-module-build.patch",
    "content": "From 60b1664a7acebadb1a3d6df871145147f33b5afe Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 23 Dec 2015 11:43:24 +0100\nSubject: [PATCH] Abort on failed module build\n\nWhen building a Python module fails, the setup.py script currently\ndoesn't exit with an error, and simply continues. This is not a really\nnice behavior, so this patch changes setup.py to abort with an error,\nso that the build issue is clearly noticeable.\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n---\n setup.py | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/setup.py b/setup.py\nindex 32294546b6..0e04944ce0 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -579,6 +579,7 @@ def print_three_column(lst):\n             print(\"Failed to build these modules:\")\n             print_three_column(failed)\n             print()\n+            sys.exit(1)\n \n         if self.failed_on_import:\n             failed = self.failed_on_import[:]\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0008-Serial-ioctl-workaround.patch",
    "content": "From 90f3075b629d90d942da1d22ef7563f7149f4f6c Mon Sep 17 00:00:00 2001\nFrom: Baruch Siach <baruch@tkos.co.il>\nDate: Wed, 23 Dec 2015 11:44:02 +0100\nSubject: [PATCH] Serial ioctl() workaround\n\nThe ioctls.h of some architectures (notably xtensa) references structs from\nlinux/serial.h. Make sure to include this header as well.\n\nAlso, undef TIOCTTYGSTRUCT that require reference to internal kernel tty_struct,\nbut isn't actually referenced in modern kernels.\n\nSigned-off-by: Baruch Siach <baruch@tkos.co.il>\n---\n Modules/termios.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/Modules/termios.c b/Modules/termios.c\nindex 354e5ca18d..c08957c500 100644\n--- a/Modules/termios.c\n+++ b/Modules/termios.c\n@@ -15,7 +15,9 @@\n #endif\n \n #include <termios.h>\n+#include <linux/serial.h>\n #include <sys/ioctl.h>\n+#undef TIOCTTYGSTRUCT\n \n /* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,\n  * MDTR, MRI, and MRTS (apparently used internally by some things\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch",
    "content": "From 2439bd2ed5dbdd7e5fda15adefd0f6f1b047ec1b Mon Sep 17 00:00:00 2001\nFrom: Christophe Vu-Brugier <cvubrugier@fastmail.fm>\nDate: Wed, 23 Dec 2015 11:44:30 +0100\nSubject: [PATCH] Do not adjust the shebang of Python scripts for\n cross-compilation\n\nThe copy_scripts() method in distutils copies the scripts listed in\nthe setup file and adjusts the first line to refer to the current\nPython interpreter. When cross-compiling, this means that the adjusted\nshebang refers to the host Python interpreter.\n\nThis patch modifies copy_scripts() to preserve the shebang when\ncross-compilation is detected.\n\nSigned-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>\n---\n Lib/distutils/command/build_scripts.py | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py\nindex ccc70e6465..d6d54195c1 100644\n--- a/Lib/distutils/command/build_scripts.py\n+++ b/Lib/distutils/command/build_scripts.py\n@@ -91,7 +91,7 @@ def copy_scripts(self):\n                     adjust = True\n                     post_interp = match.group(1) or b''\n \n-            if adjust:\n+            if adjust and not '_python_sysroot' in os.environ:\n                 log.info(\"copying and adjusting %s -> %s\", script,\n                          self.build_dir)\n                 updated_files.append(outfile)\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch",
    "content": "From 55ef5552e4ee60266e3299f253bec3b13785e585 Mon Sep 17 00:00:00 2001\nFrom: Peter Korsgaard <peter@korsgaard.com>\nDate: Thu, 20 Nov 2014 13:24:59 +0100\nSubject: [PATCH] Misc/python-config.sh.in: ensure sed invocations only match\n beginning of strings\n\nThe build/real prefix handling using sed breaks if build != real and the\nstandard include / lib directories are used ($prefix/include and $prefix/lib).\n\nE.G.\n\nprefix_build=\"/usr\", libdir=\"$prefix/lib\", includedir=\"$prefix/include\".\n\nIf this gets installed with make DESTDIR=\"/foo\" install, then we end up with\nprefix_real = prefix = \"/foo/usr\" as expected, but\nincludedir=\"/foo/foo/usr/include\" and libdir=\"/foo/foo/usr/lib\" because of\nthe double sed invocation (prefix is already expanded).  Work around it by\nensuring we only match the beginning of the string.\n\nSubmitted upstream: http://bugs.python.org/issue22907\n\nSigned-off-by: Peter Korsgaard <peter@korsgaard.com>\n---\n Misc/python-config.sh.in | 13 +++++++------\n 1 file changed, 7 insertions(+), 6 deletions(-)\n\ndiff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in\nindex 2602fe24c0..a1bc3cd5f7 100644\n--- a/Misc/python-config.sh.in\n+++ b/Misc/python-config.sh.in\n@@ -24,18 +24,19 @@ installed_prefix ()\n     echo $RESULT\n }\n \n+prefix_build=\"@prefix@\"\n prefix_real=$(installed_prefix \"$0\")\n \n # Use sed to fix paths from their built-to locations to their installed-to\n # locations. Keep prefix & exec_prefix using their original values in case\n # they are referenced in other configure variables, to prevent double\n # substitution, issue #22140.\n-prefix=\"@prefix@\"\n-exec_prefix=\"@exec_prefix@\"\n+prefix=$(echo \"$prefix_build\" | sed \"s#^$prefix_build#$prefix_real#\")\n+exec_prefix=$(echo \"$exec_prefix_build\" | sed \"s#^$exec_prefix_build#$prefix_real#\")\n exec_prefix_real=${prefix_real}\n-includedir=$(echo \"@includedir@\" | sed \"s#$prefix#$prefix_real#\")\n-libdir=$(echo \"@libdir@\" | sed \"s#$prefix#$prefix_real#\")\n-CFLAGS=$(echo \"@CFLAGS@\" | sed \"s#$prefix#$prefix_real#\")\n+includedir=$(echo \"@includedir@\" | sed \"s#^$prefix_build#$prefix_real#\")\n+libdir=$(echo \"@libdir@\" | sed \"s#^$prefix_build#$prefix_real#\")\n+CFLAGS=$(echo \"@CFLAGS@\" | sed \"s#^$prefix_build#$prefix_real#\")\n VERSION=\"@VERSION@\"\n LIBM=\"@LIBM@\"\n LIBC=\"@LIBC@\"\n@@ -49,7 +50,7 @@ OPT=\"@OPT@\"\n PY_ENABLE_SHARED=\"@PY_ENABLE_SHARED@\"\n LDVERSION=\"@LDVERSION@\"\n LIBDEST=${prefix_real}/lib/python${VERSION}\n-LIBPL=$(echo \"@LIBPL@\" | sed \"s#$prefix#$prefix_real#\")\n+LIBPL=$(echo \"@LIBPL@\" | sed \"s#^$prefix_build#$prefix_real#\")\n SO=\"@EXT_SUFFIX@\"\n PYTHONFRAMEWORK=\"@PYTHONFRAMEWORK@\"\n INCDIR=\"-I$includedir/python${VERSION}${ABIFLAGS}\"\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0011-Add-an-option-to-disable-pydoc.patch",
    "content": "From 38b7f7949258aeadf8bc45525be91340bb732a2a Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 22 Feb 2017 17:07:56 -0800\nSubject: [PATCH] Add an option to disable pydoc\n\nIt removes 0.5 MB of data from the target plus the pydoc script\nitself.\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nSigned-off-by: Samuel Martin <s.martin49@gmail.com>\n[ Andrey Smirnov: ported to Python 3.6 ]\nSigned-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>\n[ Adam Duskett: ported to Python 3.10.0 ]\nSigned-off-by: Adam Duskett <aduskett@gmail.com>\n---\n Makefile.pre.in | 7 ++++++-\n configure.ac    | 6 ++++++\n setup.py        | 9 +++++++--\n 3 files changed, 19 insertions(+), 3 deletions(-)\n\ndiff --git a/Makefile.pre.in b/Makefile.pre.in\nindex c1cfb96767..403380e181 100644\n--- a/Makefile.pre.in\n+++ b/Makefile.pre.in\n@@ -1864,7 +1864,9 @@ bininstall: altbininstall\n \t-rm -f $(DESTDIR)$(BINDIR)/idle3\n \t(cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)\n \t-rm -f $(DESTDIR)$(BINDIR)/pydoc3\n+ifeq (@PYDOC@,yes)\n \t(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)\n+endif\n \t-rm -f $(DESTDIR)$(BINDIR)/2to3\n \t(cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)\n \tif test \"x$(LIPO_32BIT_FLAGS)\" != \"x\" ; then \\\n@@ -1915,7 +1917,6 @@ LIBSUBDIRS=\tasyncio \\\n \t\tlib2to3 lib2to3/fixes lib2to3/pgen2 \\\n \t\tlogging \\\n \t\tmultiprocessing multiprocessing/dummy \\\n-\t\tpydoc_data \\\n \t\tre \\\n \t\tsite-packages \\\n \t\tsqlite3 \\\n@@ -2008,6 +2009,10 @@ TESTSUBDIRS=\tctypes/test \\\n \t\ttkinter/test/test_ttk \\\n \t\tunittest/test unittest/test/testmock\n \n+ifeq (@PYDOC@,yes)\n+LIBSUBDIRS += pydoc_data\n+endif\n+\n TEST_MODULES=@TEST_MODULES@\n libinstall:\tall $(srcdir)/Modules/xxmodule.c\n \t@for i in $(SCRIPTDIR) $(LIBDEST); \\\ndiff --git a/configure.ac b/configure.ac\nindex 5a6a1fe608..f68ea72321 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -4171,6 +4171,12 @@ AS_VAR_IF([posix_threads], [stub], [\n   AC_DEFINE([HAVE_PTHREAD_STUBS], [1], [Define if platform requires stubbed pthreads support])\n ])\n \n+AC_SUBST(PYDOC)\n+\n+AC_ARG_ENABLE(pydoc,\n+\tAS_HELP_STRING([--disable-pydoc], [disable pydoc]),\n+\t[ PYDOC=\"${enableval}\" ], [ PYDOC=yes ])\n+\n # Check for enable-ipv6\n AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])\n AC_MSG_CHECKING([if --enable-ipv6 is specified])\ndiff --git a/setup.py b/setup.py\nindex 0e04944ce0..3e55f5b2e0 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -1593,6 +1593,12 @@ class DummyProcess:\n     # turn off warnings when deprecated modules are imported\n     import warnings\n     warnings.filterwarnings(\"ignore\",category=DeprecationWarning)\n+\n+    scripts = ['Tools/scripts/idle3', 'Tools/scripts/2to3',\n+               'Lib/smtpd.py']\n+    if not '--disable-pydoc' in sysconfig.get_config_var(\"CONFIG_ARGS\"):\n+        scripts += [ 'Tools/scripts/pydoc3' ]\n+\n     setup(# PyPI Metadata (PEP 301)\n           name = \"Python\",\n           version = sys.version.split()[0],\n@@ -1617,8 +1623,7 @@ class DummyProcess:\n           # If you change the scripts installed here, you also need to\n           # check the PyBuildScripts command above, and change the links\n           # created by the bininstall target in Makefile.pre.in\n-          scripts = [\"Tools/scripts/pydoc3\", \"Tools/scripts/idle3\",\n-                     \"Tools/scripts/2to3\"]\n+          scripts = scripts\n         )\n \n # --install-platlib\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0012-Add-an-option-to-disable-lib2to3.patch",
    "content": "From 0e4f0a525ea0a68f6d4c5349c301da2e9b0c8ac9 Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 22 Feb 2017 17:15:31 -0800\nSubject: [PATCH] Add an option to disable lib2to3\n\nlib2to3 is a library to convert Python 2.x code to Python 3.x. As\nsuch, it is probably not very useful on embedded system targets.\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nSigned-off-by: Samuel Martin <s.martin49@gmail.com>\n[ Andrey Smirnov: ported to Python 3.6 ]\nSigned-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>\n[ Adam Duskett: ported to Python 3.10.0 ]\nSigned-off-by: Adam Duskett <aduskett@gmail.com>\n---\n Makefile.pre.in | 17 ++++++++++++-----\n configure.ac    |  6 ++++++\n setup.py        |  6 +++---\n 3 files changed, 21 insertions(+), 8 deletions(-)\n\ndiff --git a/Makefile.pre.in b/Makefile.pre.in\nindex 403380e181..f5d0573067 100644\n--- a/Makefile.pre.in\n+++ b/Makefile.pre.in\n@@ -1868,7 +1868,9 @@ ifeq (@PYDOC@,yes)\n \t(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)\n endif\n \t-rm -f $(DESTDIR)$(BINDIR)/2to3\n+ifeq (@LIB2TO3@,yes)\n \t(cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)\n+endif\n \tif test \"x$(LIPO_32BIT_FLAGS)\" != \"x\" ; then \\\n \t\trm -f $(DESTDIR)$(BINDIR)/python3-32$(EXE); \\\n \t\t(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-32$(EXE) python3-32$(EXE)) \\\n@@ -1914,7 +1916,6 @@ LIBSUBDIRS=\tasyncio \\\n \t\tidlelib idlelib/Icons \\\n \t\timportlib importlib/resources importlib/metadata \\\n \t\tjson \\\n-\t\tlib2to3 lib2to3/fixes lib2to3/pgen2 \\\n \t\tlogging \\\n \t\tmultiprocessing multiprocessing/dummy \\\n \t\tre \\\n@@ -1934,10 +1935,6 @@ LIBSUBDIRS=\tasyncio \\\n TESTSUBDIRS=\tctypes/test \\\n \t\tdistutils/tests \\\n \t\tidlelib/idle_test \\\n-\t\tlib2to3/tests \\\n-\t\tlib2to3/tests/data \\\n-\t\tlib2to3/tests/data/fixers \\\n-\t\tlib2to3/tests/data/fixers/myfixes \\\n \t\ttest test/audiodata \\\n \t\ttest/capath test/cjkencodings \\\n \t\ttest/data test/decimaltestdata \\\n@@ -2013,6 +2010,14 @@ ifeq (@PYDOC@,yes)\n LIBSUBDIRS += pydoc_data\n endif\n \n+ifeq (@LIB2TO3@,yes)\n+LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2\n+TESTSUBDIRS += lib2to3/tests\t\t\t\\\n+\tlib2to3/tests/data\t\t\t\\\n+\tlib2to3/tests/data/fixers\t\t\\\n+\tlib2to3/tests/data/fixers/myfixes\n+endif\n+\n TEST_MODULES=@TEST_MODULES@\n libinstall:\tall $(srcdir)/Modules/xxmodule.c\n \t@for i in $(SCRIPTDIR) $(LIBDEST); \\\n@@ -2115,10 +2120,12 @@ ifeq (@PYC_BUILD@,yes)\n \t\t-j0 -d $(LIBDEST)/site-packages -f \\\n \t\t-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages\n endif\n+ifeq (@LIB2TO3@,yes)\n \t-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \\\n \t\t$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt\n \t-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \\\n \t\t$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt\n+endif\n \n # bpo-21536: Misc/python-config.sh is generated in the build directory\n # from $(srcdir)Misc/python-config.sh.in.\ndiff --git a/configure.ac b/configure.ac\nindex f68ea72321..d8e10cf2b2 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -7078,6 +7078,12 @@ PY_STDLIB_MOD([xxlimited_35], [test \"$with_trace_refs\" = \"no\"], [test \"$ac_cv_fu\n # substitute multiline block, must come after last PY_STDLIB_MOD()\n AC_SUBST([MODULE_BLOCK])\n \n+AC_SUBST(LIB2TO3)\n+\n+AC_ARG_ENABLE(lib2to3,\n+\tAS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),\n+\t[ LIB2TO3=\"${enableval}\" ], [ LIB2TO3=yes ])\n+\n # generate output files\n AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh)\n AC_CONFIG_FILES([Modules/Setup.bootstrap Modules/Setup.stdlib])\ndiff --git a/setup.py b/setup.py\nindex 3e55f5b2e0..c490b0b08f 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -1594,11 +1594,11 @@ class DummyProcess:\n     import warnings\n     warnings.filterwarnings(\"ignore\",category=DeprecationWarning)\n \n-    scripts = ['Tools/scripts/idle3', 'Tools/scripts/2to3',\n-               'Lib/smtpd.py']\n+    scripts = ['Tools/scripts/idle3', 'Lib/smtpd.py']\n     if not '--disable-pydoc' in sysconfig.get_config_var(\"CONFIG_ARGS\"):\n         scripts += [ 'Tools/scripts/pydoc3' ]\n-\n+    if not '--disable-lib2to3' in sysconfig.get_config_var(\"CONFIG_ARGS\"):\n+        scripts += [ 'Tools/scripts/2to3' ]\n     setup(# PyPI Metadata (PEP 301)\n           name = \"Python\",\n           version = sys.version.split()[0],\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0013-Add-option-to-disable-the-sqlite3-module.patch",
    "content": "From ef8c030e01b1be8be582e90c31298a5863094858 Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 22 Feb 2017 17:20:45 -0800\nSubject: [PATCH] Add option to disable the sqlite3 module\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nSigned-off-by: Samuel Martin <s.martin49@gmail.com>\n[ Andrey Smirnov: ported to Python 3.6 ]\nSigned-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>\n[ Adam Duskett: ported to Python 3.10.0 ]\nSigned-off-by: Adam Duskett <aduskett@gmail.com>\n---\n Makefile.pre.in | 5 ++++-\n configure.ac    | 9 +++++++++\n 2 files changed, 13 insertions(+), 1 deletion(-)\n\ndiff --git a/Makefile.pre.in b/Makefile.pre.in\nindex f5d0573067..9f4cdf14cf 100644\n--- a/Makefile.pre.in\n+++ b/Makefile.pre.in\n@@ -1920,7 +1920,6 @@ LIBSUBDIRS=\tasyncio \\\n \t\tmultiprocessing multiprocessing/dummy \\\n \t\tre \\\n \t\tsite-packages \\\n-\t\tsqlite3 \\\n \t\ttkinter \\\n \t\ttomllib \\\n \t\tturtledemo \\\n@@ -2018,6 +2017,10 @@ TESTSUBDIRS += lib2to3/tests\t\t\t\\\n \tlib2to3/tests/data/fixers/myfixes\n endif\n \n+ifeq (@SQLITE3@,yes)\n+LIBSUBDIRS += sqlite3\n+endif\n+\n TEST_MODULES=@TEST_MODULES@\n libinstall:\tall $(srcdir)/Modules/xxmodule.c\n \t@for i in $(SCRIPTDIR) $(LIBDEST); \\\ndiff --git a/configure.ac b/configure.ac\nindex d8e10cf2b2..4cc0951ab9 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -4171,6 +4171,15 @@ AS_VAR_IF([posix_threads], [stub], [\n   AC_DEFINE([HAVE_PTHREAD_STUBS], [1], [Define if platform requires stubbed pthreads support])\n ])\n \n+AC_SUBST(SQLITE3)\n+AC_ARG_ENABLE(sqlite3,\n+\tAS_HELP_STRING([--disable-sqlite3], [disable sqlite3]),\n+\t[ SQLITE3=\"${enableval}\" ], [ SQLITE3=yes ])\n+\n+if test \"$SQLITE3\" = \"no\" ; then\n+   DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} _sqlite3\"\n+fi\n+\n AC_SUBST(PYDOC)\n \n AC_ARG_ENABLE(pydoc,\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0014-Add-an-option-to-disable-the-tk-module.patch",
    "content": "From bbbfe699d648a5cb191203b16e1786e8cf4ea908 Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 22 Feb 2017 17:23:42 -0800\nSubject: [PATCH] Add an option to disable the tk module\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nSigned-off-by: Samuel Martin <s.martin49@gmail.com>\n[ Andrey Smirnov: ported to Python 3.6 ]\nSigned-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>\n[ Adam Duskett: ported to Python 3.10.0 ]\nSigned-off-by: Adam Duskett <aduskett@gmail.com>\n---\n Makefile.pre.in | 10 +++++++---\n configure.ac    |  9 +++++++++\n 2 files changed, 16 insertions(+), 3 deletions(-)\n\ndiff --git a/Makefile.pre.in b/Makefile.pre.in\nindex 9f4cdf14cf..4f83911200 100644\n--- a/Makefile.pre.in\n+++ b/Makefile.pre.in\n@@ -1920,7 +1920,6 @@ LIBSUBDIRS=\tasyncio \\\n \t\tmultiprocessing multiprocessing/dummy \\\n \t\tre \\\n \t\tsite-packages \\\n-\t\ttkinter \\\n \t\ttomllib \\\n \t\tturtledemo \\\n \t\tunittest \\\n@@ -2001,8 +2000,6 @@ TESTSUBDIRS=\tctypes/test \\\n \t\ttest/tracedmodules \\\n \t\ttest/xmltestdata test/xmltestdata/c14n-20 \\\n \t\ttest/ziptestdata \\\n-\t\ttkinter/test tkinter/test/test_tkinter \\\n-\t\ttkinter/test/test_ttk \\\n \t\tunittest/test unittest/test/testmock\n \n ifeq (@PYDOC@,yes)\n@@ -2021,6 +2018,13 @@ ifeq (@SQLITE3@,yes)\n LIBSUBDIRS += sqlite3\n endif\n \n+ifeq (@TK@,yes)\n+LIBSUBDIRS += tkinter\n+TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \\\n+\ttkinter/test/test_ttk\n+endif\n+\n+\n TEST_MODULES=@TEST_MODULES@\n libinstall:\tall $(srcdir)/Modules/xxmodule.c\n \t@for i in $(SCRIPTDIR) $(LIBDEST); \\\ndiff --git a/configure.ac b/configure.ac\nindex 4cc0951ab9..f4ce506801 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -4180,6 +4180,15 @@ if test \"$SQLITE3\" = \"no\" ; then\n    DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} _sqlite3\"\n fi\n \n+AC_SUBST(TK)\n+AC_ARG_ENABLE(tk,\n+\tAS_HELP_STRING([--disable-tk], [disable tk]),\n+\t[ TK=\"${enableval}\" ], [ TK=yes ])\n+\n+if test \"$TK\" = \"no\"; then\n+   DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} _tkinter\"\n+fi\n+\n AC_SUBST(PYDOC)\n \n AC_ARG_ENABLE(pydoc,\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0015-Add-an-option-to-disable-the-curses-module.patch",
    "content": "From 03e28cdd46dac1b7e4e9c8bbd2ea44b09e514205 Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 22 Feb 2017 17:31:51 -0800\nSubject: [PATCH] Add an option to disable the curses module\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nSigned-off-by: Samuel Martin <s.martin49@gmail.com>\n[ Andrey Smirnov: ported to Python 3.6 ]\nSigned-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>\n[ Adam Duskett: ported to Python 3.10.0 ]\nSigned-off-by: Adam Duskett <aduskett@gmail.com>\n---\n Makefile.pre.in | 4 +++-\n configure.ac    | 9 +++++++++\n 2 files changed, 12 insertions(+), 1 deletion(-)\n\ndiff --git a/Makefile.pre.in b/Makefile.pre.in\nindex 4f83911200..8e879b35c6 100644\n--- a/Makefile.pre.in\n+++ b/Makefile.pre.in\n@@ -1905,7 +1905,6 @@ LIBSUBDIRS=\tasyncio \\\n \t\tconcurrent concurrent/futures \\\n \t\tcsv \\\n \t\tctypes ctypes/macholib \\\n-\t\tcurses \\\n \t\tdbm \\\n \t\tdistutils distutils/command \\\n \t\temail email/mime \\\n@@ -2024,6 +2023,9 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \\\n \ttkinter/test/test_ttk\n endif\n \n+ifeq (@CURSES@,yes)\n+LIBSUBDIRS += curses\n+endif\n \n TEST_MODULES=@TEST_MODULES@\n libinstall:\tall $(srcdir)/Modules/xxmodule.c\ndiff --git a/configure.ac b/configure.ac\nindex f4ce506801..0ae9863cd6 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -4189,6 +4189,15 @@ if test \"$TK\" = \"no\"; then\n    DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} _tkinter\"\n fi\n \n+AC_SUBST(CURSES)\n+AC_ARG_ENABLE(curses,\n+\tAS_HELP_STRING([--disable-curses], [disable curses]),\n+\t[ CURSES=\"${enableval}\" ], [ CURSES=yes ])\n+\n+if test \"$CURSES\" = \"no\"; then\n+   DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} _curses _curses_panel\"\n+fi\n+\n AC_SUBST(PYDOC)\n \n AC_ARG_ENABLE(pydoc,\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0016-Add-an-option-to-disable-expat.patch",
    "content": "From c9a2ea3edacf57746517600ccc11c254a9fd6c48 Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 22 Feb 2017 17:40:45 -0800\nSubject: [PATCH] Add an option to disable expat\n\nThis patch replaces the existing --with-system-expat option with a\n--with-expat={system,builtin,none} option, which allows to tell Python\nwhether we want to use the system expat (already installed), the expat\nbuiltin the Python sources, or no expat at all (which disables the\ninstallation of XML modules).\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nSigned-off-by: Samuel Martin <s.martin49@gmail.com>\n[ Andrey Smirnov: ported to Python 3.6 ]\nSigned-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>\n[ Adam Duskett: ported to Python 3.10.0 ]\nSigned-off-by: Adam Duskett <aduskett@gmail.com>\n---\n Makefile.pre.in |  5 ++++-\n configure.ac    | 20 ++++++++++++++------\n 2 files changed, 18 insertions(+), 7 deletions(-)\n\ndiff --git a/Makefile.pre.in b/Makefile.pre.in\nindex 8e879b35c6..80d617cf7f 100644\n--- a/Makefile.pre.in\n+++ b/Makefile.pre.in\n@@ -1925,7 +1925,6 @@ LIBSUBDIRS=\tasyncio \\\n \t\turllib \\\n \t\tvenv venv/scripts venv/scripts/common venv/scripts/posix \\\n \t\twsgiref \\\n-\t\t$(XMLLIBSUBDIRS) \\\n \t\txmlrpc \\\n \t\tzoneinfo \\\n \t\t__phello__\n@@ -2027,6 +2026,10 @@ ifeq (@CURSES@,yes)\n LIBSUBDIRS += curses\n endif\n \n+ifeq (@EXPAT@,yes)\n+LIBSUBDIRS += $(XMLLIBSUBDIRS)\n+endif\n+\n TEST_MODULES=@TEST_MODULES@\n libinstall:\tall $(srcdir)/Modules/xxmodule.c\n \t@for i in $(SCRIPTDIR) $(LIBDEST); \\\ndiff --git a/configure.ac b/configure.ac\nindex 0ae9863cd6..201cad0bfc 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -3565,15 +3565,23 @@ LIBS=\"$withval $LIBS\"\n AC_SUBST(DISABLED_EXTENSIONS)\n \n # Check for use of the system expat library\n-AC_MSG_CHECKING(for --with-system-expat)\n-AC_ARG_WITH(system_expat,\n-            AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library, see Doc/library/pyexpat.rst (default is no)]),\n+AC_MSG_CHECKING(for --with-expat)\n+AC_ARG_WITH(expat,\n+            AS_HELP_STRING([--with-expat], [select which expat version to use: system, builtin, none]),\n             [],\n-            [with_system_expat=\"no\"])\n+            [with_expat=\"builtin\"])\n \n-AC_MSG_RESULT($with_system_expat)\n+AC_MSG_RESULT($with_expat)\n \n-AS_VAR_IF([with_system_expat], [yes], [\n+if test \"$with_expat\" != \"none\"; then\n+   EXPAT=yes\n+else\n+   DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} pyexpat\"\n+   EXPAT=no\n+fi\n+AC_SUBST(EXPAT)\n+\n+AS_VAR_IF([with_expat], [system], [\n   LIBEXPAT_CFLAGS=${LIBEXPAT_CFLAGS-\"\"}\n   LIBEXPAT_LDFLAGS=${LIBEXPAT_LDFLAGS-\"-lexpat\"}\n   LIBEXPAT_INTERNAL=\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0017-Add-an-option-to-disable-CJK-codecs.patch",
    "content": "From d8ef6a7a9f2b954cf1c1e37fc3c35055b42af0f5 Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 23 Dec 2015 11:49:55 +0100\nSubject: [PATCH] Add an option to disable CJK codecs\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n---\n configure.ac | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex 201cad0bfc..ecdd7dbc07 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -4188,6 +4188,12 @@ if test \"$SQLITE3\" = \"no\" ; then\n    DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} _sqlite3\"\n fi\n \n+AC_ARG_ENABLE(codecs-cjk,\n+\tAS_HELP_STRING([--disable-codecs-cjk], [disable CJK codecs]),\n+\t[ if test \"$enableval\" = \"no\"; then\n+\t\tDISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022\"\n+\tfi])\n+\n AC_SUBST(TK)\n AC_ARG_ENABLE(tk,\n \tAS_HELP_STRING([--disable-tk], [disable tk]),\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0018-Add-an-option-to-disable-NIS.patch",
    "content": "From 09fc9f72ebe60bb65e80732a6bd4f12a84159f6d Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 23 Dec 2015 11:50:11 +0100\nSubject: [PATCH] Add an option to disable NIS\n\nNIS is not necessarily available in uClibc, so we need an option to\nnot compile support for it.\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n---\n configure.ac | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex ecdd7dbc07..1bdde7f69d 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -4194,6 +4194,12 @@ AC_ARG_ENABLE(codecs-cjk,\n \t\tDISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022\"\n \tfi])\n \n+AC_ARG_ENABLE(nis,\n+\tAS_HELP_STRING([--disable-nis], [disable NIS]),\n+\t[ if test \"$enableval\" = \"no\"; then\n+    \t     DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} nis\"\n+  \t  fi])\n+\n AC_SUBST(TK)\n AC_ARG_ENABLE(tk,\n \tAS_HELP_STRING([--disable-tk], [disable tk]),\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0019-Add-an-option-to-disable-unicodedata.patch",
    "content": "From 4fe7f375a3d171d294caebdd7b7ce49bbc9ad9f3 Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 23 Dec 2015 11:50:27 +0100\nSubject: [PATCH] Add an option to disable unicodedata\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n---\n configure.ac | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex 1bdde7f69d..ba4b0e0c1c 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -4200,6 +4200,12 @@ AC_ARG_ENABLE(nis,\n     \t     DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} nis\"\n   \t  fi])\n \n+AC_ARG_ENABLE(unicodedata,\n+\tAS_HELP_STRING([--disable-unicodedata], [disable unicodedata]),\n+\t[ if test \"$enableval\" = \"no\"; then\n+    \t     DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} unicodedata\"\n+  \t  fi])\n+\n AC_SUBST(TK)\n AC_ARG_ENABLE(tk,\n \tAS_HELP_STRING([--disable-tk], [disable tk]),\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0020-Add-an-option-to-disable-IDLE.patch",
    "content": "From 2c9dbd6d49744aa8da8ebf8d0187d6b06f93c2b5 Mon Sep 17 00:00:00 2001\nFrom: Maxime Ripard <maxime.ripard@free-electrons.com>\nDate: Wed, 22 Feb 2017 17:45:14 -0800\nSubject: [PATCH] Add an option to disable IDLE\n\nIDLE is an IDE embedded into python, written using Tk, so it doesn't make\nmuch sense to have it into our build.\n\nSigned-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>\n[ Andrey Smirnov: ported to Python 3.6 ]\nSigned-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>\n[ Adam Duskett: ported to Python 3.10.0 ]\nSigned-off-by: Adam Duskett <aduskett@gmail.com>\n---\n Makefile.pre.in | 7 ++++++-\n configure.ac    | 6 ++++++\n setup.py        | 5 ++++-\n 3 files changed, 16 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile.pre.in b/Makefile.pre.in\nindex 80d617cf7f..8d1ba1356c 100644\n--- a/Makefile.pre.in\n+++ b/Makefile.pre.in\n@@ -1862,7 +1862,9 @@ bininstall: altbininstall\n \t-rm -f $(DESTDIR)$(LIBPC)/python3-embed.pc\n \t(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python3-embed.pc)\n \t-rm -f $(DESTDIR)$(BINDIR)/idle3\n+ifeq (@IDLE@,yes)\n \t(cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)\n+endif\n \t-rm -f $(DESTDIR)$(BINDIR)/pydoc3\n ifeq (@PYDOC@,yes)\n \t(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)\n@@ -1912,7 +1914,6 @@ LIBSUBDIRS=\tasyncio \\\n \t\tensurepip ensurepip/_bundled \\\n \t\thtml \\\n \t\thttp \\\n-\t\tidlelib idlelib/Icons \\\n \t\timportlib importlib/resources importlib/metadata \\\n \t\tjson \\\n \t\tlogging \\\n@@ -2030,6 +2031,10 @@ ifeq (@EXPAT@,yes)\n LIBSUBDIRS += $(XMLLIBSUBDIRS)\n endif\n \n+ifeq (@IDLE@,yes)\n+LIBSUBDIRS += idlelib idlelib/Icons\n+endif\n+\n TEST_MODULES=@TEST_MODULES@\n libinstall:\tall $(srcdir)/Modules/xxmodule.c\n \t@for i in $(SCRIPTDIR) $(LIBDEST); \\\ndiff --git a/configure.ac b/configure.ac\nindex ba4b0e0c1c..5e6d72f7db 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -7137,6 +7137,12 @@ AC_ARG_ENABLE(lib2to3,\n \tAS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),\n \t[ LIB2TO3=\"${enableval}\" ], [ LIB2TO3=yes ])\n \n+AC_SUBST(IDLE)\n+\n+AC_ARG_ENABLE(idle3,\n+\tAS_HELP_STRING([--disable-idle3], [disable idle3 IDE]),\n+\t[ IDLE=\"${enableval}\" ], [ IDLE=yes ])\n+\n # generate output files\n AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh)\n AC_CONFIG_FILES([Modules/Setup.bootstrap Modules/Setup.stdlib])\ndiff --git a/setup.py b/setup.py\nindex c490b0b08f..4d49a792f7 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -1594,11 +1594,14 @@ class DummyProcess:\n     import warnings\n     warnings.filterwarnings(\"ignore\",category=DeprecationWarning)\n \n-    scripts = ['Tools/scripts/idle3', 'Lib/smtpd.py']\n+    scripts = [ 'Lib/smtpd.py']\n     if not '--disable-pydoc' in sysconfig.get_config_var(\"CONFIG_ARGS\"):\n         scripts += [ 'Tools/scripts/pydoc3' ]\n     if not '--disable-lib2to3' in sysconfig.get_config_var(\"CONFIG_ARGS\"):\n         scripts += [ 'Tools/scripts/2to3' ]\n+    if not '--disable-idle3' in sysconfig.get_config_var(\"CONFIG_ARGS\"):\n+        scripts += [ 'Tools/scripts/idle3' ]\n+\n     setup(# PyPI Metadata (PEP 301)\n           name = \"Python\",\n           version = sys.version.split()[0],\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0021-Add-an-option-to-disable-decimal.patch",
    "content": "From 7091fdf77f612425c178a75148560f9c3514e8b8 Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 23 Dec 2015 11:51:31 +0100\nSubject: [PATCH] Add an option to disable decimal\n\nThis patch replaces the existing --with-system-libmpdec option with a\n--with-libmpdec={system,builtin,none} option, which allows to tell\nPython whether we want to use the system libmpdec (already installed),\nthe libmpdec builtin the Python sources, or no libmpdec at all.\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n[aduskett@gmail.com: Update for python 3.7.0]\nSigned-off-by: Adam Duskett <aduskett@gmail.com>\n[james.hilliard1@gmail.com: adapt to python 3.9]\nSigned-off-by: James Hilliard <james.hilliard1@gmail.com>\n---\n configure.ac | 19 +++++++++++++------\n 1 file changed, 13 insertions(+), 6 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 5e6d72f7db..e6b1f1e9de 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -3630,14 +3630,21 @@ fi\n AC_SUBST(LIBFFI_INCLUDEDIR)\n \n # Check for use of the system libmpdec library\n-AC_MSG_CHECKING(for --with-system-libmpdec)\n-AC_ARG_WITH(system_libmpdec,\n-            AS_HELP_STRING([--with-system-libmpdec], [build _decimal module using an installed libmpdec library, see Doc/library/decimal.rst (default is no)]),\n+AC_MSG_CHECKING(for --with-libmpdec)\n+AC_ARG_WITH(libmpdec,\n+            AS_HELP_STRING([--with-libmpdec], [select which libmpdec version to use: system, builtin, none]),\n             [],\n-            [with_system_libmpdec=\"no\"])\n-AC_MSG_RESULT($with_system_libmpdec)\n+            [with_libmpdec=\"builtin\"])\n+AC_MSG_RESULT($with_libmpdec)\n+if test \"$with_libmpdec\" != \"none\"; then\n+   MPDEC=yes\n+else\n+   DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} _decimal\"\n+   MPDEC=no\n+fi\n+AC_SUBST(MPDEC)\n \n-AS_VAR_IF([with_system_libmpdec], [yes], [\n+AS_VAR_IF([with_libmpdec], [system], [\n   LIBMPDEC_CFLAGS=${LIBMPDEC_CFLAGS-\"\"}\n   LIBMPDEC_LDFLAGS=${LIBMPDEC_LDFLAGS-\"-lmpdec\"}\n   LIBMPDEC_INTERNAL=\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0022-Add-an-option-to-disable-the-ossaudiodev-module.patch",
    "content": "From d48d9da534cec7891ae444b4ab94a76ac67f5daa Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Wed, 23 Dec 2015 11:51:58 +0100\nSubject: [PATCH] Add an option to disable the ossaudiodev module\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n---\n configure.ac | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex e6b1f1e9de..db33d567ad 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -3678,6 +3678,12 @@ fi\n \n AC_MSG_RESULT($with_decimal_contextvar)\n \n+AC_ARG_ENABLE(ossaudiodev,\n+\tAS_HELP_STRING([--disable-ossaudiodev], [disable OSSAUDIODEV]),\n+\t[ if test \"$enableval\" = \"no\"; then\n+\t  DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} ossaudiodev\"\n+\t  fi])\n+\n # Check for libmpdec machine flavor\n AC_MSG_CHECKING(for decimal libmpdec machine)\n AS_CASE([$ac_sys_system],\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0023-Add-an-option-to-disable-openssl-support.patch",
    "content": "From 25c900e81a2fc0bbe35e7c94e2e5028cfbf6582a Mon Sep 17 00:00:00 2001\nFrom: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>\nDate: Wed, 22 Feb 2017 17:55:59 -0800\nSubject: [PATCH] Add an option to disable openssl support.\n\nSigned-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>\n---\n configure.ac | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex db33d567ad..42fe6c8f5a 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -4219,6 +4219,12 @@ AC_ARG_ENABLE(unicodedata,\n     \t     DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} unicodedata\"\n   \t  fi])\n \n+AC_ARG_ENABLE(openssl,\n+\tAS_HELP_STRING([--disable-openssl], [disable openssl support]),\n+\t[ if test \"$enableval\" = \"no\"; then\n+\t     DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} ssl _ssl _hashlib\"\n+\t  fi])\n+\n AC_SUBST(TK)\n AC_ARG_ENABLE(tk,\n \tAS_HELP_STRING([--disable-tk], [disable tk]),\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0024-Add-an-option-to-disable-the-readline-module.patch",
    "content": "From 9082468ca620db77b670ccf568a96bbabb865f80 Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Tue, 7 Mar 2017 23:29:05 +0100\nSubject: [PATCH] Add an option to disable the readline module\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n---\n configure.ac | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex 42fe6c8f5a..19875d7d30 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -4225,6 +4225,12 @@ AC_ARG_ENABLE(openssl,\n \t     DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} ssl _ssl _hashlib\"\n \t  fi])\n \n+AC_ARG_ENABLE(readline,\n+\tAS_HELP_STRING([--disable-readline], [disable readline]),\n+\t[ if test \"$enableval\" = \"no\"; then\n+\t     DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} readline\"\n+\t  fi])\n+\n AC_SUBST(TK)\n AC_ARG_ENABLE(tk,\n \tAS_HELP_STRING([--disable-tk], [disable tk]),\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0025-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch",
    "content": "From 988a335cb34b5fc25ea345ba04ff5ddffe2e946c Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nDate: Tue, 7 Mar 2017 23:31:11 +0100\nSubject: [PATCH] Add options to disable zlib, bzip2 and xz modules\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n---\n configure.ac | 18 ++++++++++++++++++\n 1 file changed, 18 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex 19875d7d30..ca6c16491a 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -4231,6 +4231,24 @@ AC_ARG_ENABLE(readline,\n \t     DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} readline\"\n \t  fi])\n \n+AC_ARG_ENABLE(bzip2,\n+\tAS_HELP_STRING([--disable-bzip2], [disable bzip2]),\n+\t[ if test \"$enableval\" = \"no\"; then\n+\t     DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} _bz2\"\n+\t  fi])\n+\n+AC_ARG_ENABLE(zlib,\n+\tAS_HELP_STRING([--disable-zlib], [disable zlib]),\n+\t[ if test \"$enableval\" = \"no\"; then\n+\t     DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} zlib\"\n+\t  fi])\n+\n+AC_ARG_ENABLE(xz,\n+\tAS_HELP_STRING([--disable-xz], [disable xz]),\n+\t[ if test \"$enableval\" = \"no\"; then\n+\t     DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} _lzma\"\n+\t  fi])\n+\n AC_SUBST(TK)\n AC_ARG_ENABLE(tk,\n \tAS_HELP_STRING([--disable-tk], [disable tk]),\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0026-python-config.sh-don-t-reassign-prefix.patch",
    "content": "From 755fb526a62df2a73560f42184db8aadb6899bb0 Mon Sep 17 00:00:00 2001\nFrom: Matt Weber <matthew.weber@rockwellcollins.com>\nDate: Fri, 6 Oct 2017 09:54:15 -0500\nSubject: [PATCH] python-config.sh: don't reassign ${prefix}\n\nWhen prefix is set to a path like /usr during crossbuild\nthe sed operations end up executing twice, once for the prefix\nreassignment and another for includedir if it is set as a string\nincluding the ${prefix} variable.  This results in an issue\nwhen the build directory is under /usr.\n\nThis patch updates the remaining location which uses the prefix\nvariable to also sed and update to use the real path.\n\nUpstream bug report:\nhttps://bugs.python.org/issue31713\n\nBuildroot bug:\nhttps://bugs.busybox.net/show_bug.cgi?id=10361\n\nFixes failures like the following:\ndbus-python-1.2.4 | NOK | http://autobuild.buildroot.net/results/758858efa97b6273c1b470513f5492258a6d8853\n\nSigned-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>\n---\n Misc/python-config.sh.in | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in\nindex a1bc3cd5f7..164d2d3603 100644\n--- a/Misc/python-config.sh.in\n+++ b/Misc/python-config.sh.in\n@@ -31,7 +31,7 @@ prefix_real=$(installed_prefix \"$0\")\n # locations. Keep prefix & exec_prefix using their original values in case\n # they are referenced in other configure variables, to prevent double\n # substitution, issue #22140.\n-prefix=$(echo \"$prefix_build\" | sed \"s#^$prefix_build#$prefix_real#\")\n+prefix=$prefix_build\n exec_prefix=$(echo \"$exec_prefix_build\" | sed \"s#^$exec_prefix_build#$prefix_real#\")\n exec_prefix_real=${prefix_real}\n includedir=$(echo \"@includedir@\" | sed \"s#^$prefix_build#$prefix_real#\")\n@@ -49,7 +49,7 @@ LDLIBRARY=\"@LDLIBRARY@\"\n OPT=\"@OPT@\"\n PY_ENABLE_SHARED=\"@PY_ENABLE_SHARED@\"\n LDVERSION=\"@LDVERSION@\"\n-LIBDEST=${prefix_real}/lib/python${VERSION}\n+LIBDEST=$( echo \"${prefix}/lib/python${VERSION}\" | sed \"s#^$prefix_build#$prefix_real#\")\n LIBPL=$(echo \"@LIBPL@\" | sed \"s#^$prefix_build#$prefix_real#\")\n SO=\"@EXT_SUFFIX@\"\n PYTHONFRAMEWORK=\"@PYTHONFRAMEWORK@\"\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0027-Add-an-option-to-disable-uuid-module.patch",
    "content": "From 58027d25c3cabcf654cb0b31a61d7cbd53dc68c0 Mon Sep 17 00:00:00 2001\nFrom: Thomas Petazzoni <thomas.petazzoni@bootlin.com>\nDate: Sat, 18 Aug 2018 10:54:56 +0200\nSubject: [PATCH] Add an option to disable uuid module\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>\n---\n configure.ac | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex ca6c16491a..ed03b27fb1 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -4267,6 +4267,15 @@ if test \"$CURSES\" = \"no\"; then\n    DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} _curses _curses_panel\"\n fi\n \n+AC_SUBST(UUID)\n+AC_ARG_ENABLE(uuid,\n+\tAS_HELP_STRING([--disable-uuid], [disable uuid]),\n+\t[ UUID=\"${enableval}\" ], [ UUID=yes ])\n+\n+if test \"$UUID\" = \"no\"; then\n+   DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} _uuid\"\n+fi\n+\n AC_SUBST(PYDOC)\n \n AC_ARG_ENABLE(pydoc,\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0029-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch",
    "content": "From 07b950aadd570b9f96a1f128505a959b32f40962 Mon Sep 17 00:00:00 2001\nFrom: Peter Korsgaard <peter@korsgaard.com>\nDate: Fri, 2 Aug 2019 15:53:16 +0200\nSubject: [PATCH] configure.ac: fixup $CC --print-multiarch output for\n musl/uclibc GCC 8+ toolchains\n\nGCC commit 6834b83784dcf0364eb820e8 (multiarch support for non-glibc linux\nsystems), which is part of GCC 8+, changed the multiarch logic to use\n$arch-linux-musl / $arch-linux-uclibc rather than $arch-linux-gnu.\n\nThis then causes the python3 configure script to error out:\n\nchecking for the platform triplet based on compiler characteristics... powerpc-linux-gnu\nconfigure: error: internal configure error for the platform triplet, please file a bug report\n\nhttp://autobuild.buildroot.net/results/cb4/cb49c539501342e45cbe5ade82e588fcdf51f05b\n\nAs it requires that the --print-multiarch output (if not empty) matches the\ndeduced triplet (which always uses -linux-gnu).\n\nIt isn't quite clear why --print-multiarch returns something for a\nnon-multiarch toolchain on some architectures (E.G.  PowerPC), but as a\nworkaround, rewrite the --print-multiarch output to match older GCC versions\nto keep the configure script happy.\n\nSigned-off-by: Peter Korsgaard <peter@korsgaard.com>\n[Peter: updated for 3.10.2]\n---\n configure.ac | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex ed03b27fb1..841fd6732c 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -1086,7 +1086,11 @@ AC_MSG_CHECKING([for multiarch])\n AS_CASE([$ac_sys_system],\n   [Darwin*], [MULTIARCH=\"\"],\n   [FreeBSD*], [MULTIARCH=\"\"],\n-  [MULTIARCH=$($CC --print-multiarch 2>/dev/null)]\n+  [\n+  # GCC 8+ returns $arch-linux-{musl,uclibc} for musl/uClibc based\n+  # toolchains confusing python. Fix that up\n+  MULTIARCH=$($CC --print-multiarch 2>/dev/null | sed -E 's/-linux-(musl|uclibc)*$/-linux-gnu/')\n+  ]\n )\n AC_SUBST([MULTIARCH])\n AC_MSG_RESULT([$MULTIARCH])\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0030-Add-an-option-to-disable-the-berkeleydb-module.patch",
    "content": "From 67e9793d070ac5c8e83abbe95b9208533ffeadd0 Mon Sep 17 00:00:00 2001\nFrom: Bernd Kuhls <bernd.kuhls@t-online.de>\nDate: Sat, 11 Apr 2020 22:01:40 +0200\nSubject: [PATCH] Add an option to disable the berkeleydb module\n\nSigned-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>\n---\n configure.ac | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex 841fd6732c..06c9a81f95 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -4280,6 +4280,12 @@ if test \"$UUID\" = \"no\"; then\n    DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} _uuid\"\n fi\n \n+AC_ARG_ENABLE(berkeleydb,\n+\tAS_HELP_STRING([--disable-berkeleydb], [disable berkeleydb]),\n+\t[ if test \"$enableval\" = \"no\"; then\n+\t     DISABLED_EXTENSIONS=\"${DISABLED_EXTENSIONS} _dbm\"\n+\t  fi])\n+\n AC_SUBST(PYDOC)\n \n AC_ARG_ENABLE(pydoc,\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/0031-lib-crypt-uClibc-ng-doesn-t-set-errno-when-encryptio.patch",
    "content": "From 3edeed879871a10acbe802f4a68cff3d4869dbde Mon Sep 17 00:00:00 2001\nFrom: Romain Naour <romain.naour@gmail.com>\nDate: Thu, 12 Nov 2020 00:16:18 +0100\nSubject: [PATCH] lib/crypt: uClibc-ng doesn't set errno when encryption method\n is not available\n\nSince commit [1] in cpython, an exception is raised when an encryption method\nis not available. This eception is handled only if errno is set to EINVAL by\ncrypt() but uClibc-ng doesn't set errno in crypt() [2].\n\nFixes:\nhttps://gitlab.com/buildroot.org/buildroot/-/jobs/830981961\nhttps://gitlab.com/buildroot.org/buildroot/-/jobs/830981979\n\n[1] https://github.com/python/cpython/commit/0d3fe8ae4961bf551e7d5e42559e2ede1a08fd7c\n[2] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/libcrypt/crypt.c?h=v1.0.36#n29\n\nSigned-off-by: Romain Naour <romain.naour@gmail.com>\n[Daniel: updated for 3.10.7]\nSigned-off-by: Daniel Lang <d.lang@abatec.at>\n---\n Lib/crypt.py | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/Lib/crypt.py b/Lib/crypt.py\nindex de4a14a388..ba482487a7 100644\n--- a/Lib/crypt.py\n+++ b/Lib/crypt.py\n@@ -98,7 +98,9 @@ def _add_method(name, *args, rounds=None):\n         result = crypt('', salt)\n     except OSError as e:\n         # Not all libc libraries support all encryption methods.\n-        if e.errno in {errno.EINVAL, errno.EPERM, errno.ENOSYS}:\n+        # Not all libc libraries set errno when encryption method is not\n+        # available.\n+        if e.errno in {errno.EINVAL, errno.EPERM, errno.ENOSYS} or e.errno == 0:\n             return False\n         raise\n     if result and len(result) == method.total_size:\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/lang/Python3/patches/Python3-0000-default-is-optimized.patch",
    "content": "Refreshed MilhouseVH patch from Python3.7. Original message:\n\nDo *not* enable Py_OptimizeFlag=2 (or higher) as this will stop\n__doc__ output from being generated which will prevent the qemu\npackage for Generic from building.\n\n---\ndiff -aur a/Python/initconfig.c b/Python/initconfig.c\n--- a/Python/initconfig.c\t2020-07-20 09:01:32.000000000 -0400\n+++ b/Python/initconfig.c\t2020-08-08 03:24:02.796189739 -0400\n@@ -153,7 +153,7 @@\n int Py_QuietFlag = 0; /* Needed by sysmodule.c */\n int Py_InteractiveFlag = 0; /* Needed by Py_FdIsInteractive() below */\n int Py_InspectFlag = 0; /* Needed to determine whether to exit at SystemExit */\n-int Py_OptimizeFlag = 0; /* Needed by compile.c */\n+int Py_OptimizeFlag = 1; /* Needed by compile.c */\n int Py_NoSiteFlag = 0; /* Suppress 'import site' */\n int Py_BytesWarningFlag = 0; /* Warn on str(bytes) and str(buffer) */\n int Py_FrozenFlag = 0; /* Needed by getpath.c */\n"
  },
  {
    "path": "packages/lang/Python3/patches/Python3-0201-xcompile.patch",
    "content": "--- a/Makefile.pre.in\n+++ b/Makefile.pre.in\n@@ -633,9 +633,11 @@ sharedmods: $(BUILDPYTHON) pybuilddir.tx\n \t    *) quiet=\"\";; \\\n \tesac; \\\n \techo \"$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \\\n+\t\tPYTHONXCPREFIX='$(DESTDIR)$(prefix)' \\\n \t\tDISABLED_EXTENSIONS=\"$(DISABLED_EXTENSIONS)\" \\\n \t\t$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build\"; \\\n \t$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \\\n+\t\tPYTHONXCPREFIX='$(DESTDIR)$(prefix)' \\\n \t\t$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build\n \n \n@@ -1750,8 +1752,10 @@ libainstall:\t@DEF_MAKE_RULE@ python-conf\n # Install the dynamically loadable modules\n # This goes into $(exec_prefix)\n sharedinstall: all\n+\tCC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \\\n \t$(RUNSHARED) DISABLED_EXTENSIONS=\"$(DISABLED_EXTENSIONS)\" \\\n \t\t$(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \\\n+\t\t--skip-build \\\n \t   \t--prefix=$(prefix) \\\n \t\t--install-scripts=$(BINDIR) \\\n \t\t--install-platlib=$(DESTSHARED) \\\n--- a/setup.py\n+++ b/setup.py\n@@ -61,7 +61,7 @@ def get_platform():\n     return sys.platform\n \n \n-CROSS_COMPILING = (\"_PYTHON_HOST_PLATFORM\" in os.environ)\n+CROSS_COMPILING = (\"_PYTHON_HOST_PLATFORM\" in os.environ) or ('PYTHONXCPREFIX' in os.environ)\n HOST_PLATFORM = get_platform()\n MS_WINDOWS = (HOST_PLATFORM == 'win32')\n CYGWIN = (HOST_PLATFORM == 'cygwin')\n@@ -575,6 +575,13 @@ class PyBuildExt(build_ext):\n                 ext.name, level=1)\n             return\n \n+        # Import check will not work when cross-compiling.\n+        if 'PYTHONXCPREFIX' in os.environ:\n+            self.announce(\n+                'WARNING: skipping import check for cross-compiled: \"%s\"' %\n+                ext.name)\n+            return\n+\n         # Workaround for Mac OS X: The Carbon-based modules cannot be\n         # reliably imported into a command-line Python\n         if 'Carbon' in ext.extra_link_args:\n"
  },
  {
    "path": "packages/lang/Python3/patches/Python3-0202-xcompile.patch",
    "content": "--- a/setup.py\n+++ b/setup.py\n@@ -742,31 +742,23 @@ class PyBuildExt(build_ext):\n                         add_dir_to_list(dir_list, directory)\n \n     def configure_compiler(self):\n-        # Ensure that /usr/local is always used, but the local build\n-        # directories (i.e. '.' and 'Include') must be first.  See issue\n-        # 10520.\n-        if not CROSS_COMPILING:\n-            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')\n-            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')\n+        try:\n+            modules_include_dirs = os.environ[\"PYTHON_MODULES_INCLUDE\"].split()\n+        except KeyError:\n+            modules_include_dirs = ['/usr/include']\n+        try:\n+            modules_lib_dirs = os.environ[\"PYTHON_MODULES_LIB\"].split()\n+        except KeyError:\n+            modules_lib_dirs = ['/usr/lib']\n             self.add_multiarch_paths()\n-        # only change this for cross builds for 3.3, issues on Mageia\n-        if CROSS_COMPILING:\n-            self.add_cross_compiling_paths()\n+        for dir in modules_include_dirs:\n+            add_dir_to_list(self.compiler.include_dirs, dir)\n+        for dir in modules_lib_dirs:\n+            add_dir_to_list(self.compiler.library_dirs, dir)\n+\n         self.add_ldflags_cppflags()\n \n     def init_inc_lib_dirs(self):\n-        if (not CROSS_COMPILING and\n-                os.path.normpath(sys.base_prefix) != '/usr' and\n-                not sysconfig.get_config_var('PYTHONFRAMEWORK')):\n-            # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework\n-            # (PYTHONFRAMEWORK is set) to avoid # linking problems when\n-            # building a framework with different architectures than\n-            # the one that is currently installed (issue #7473)\n-            add_dir_to_list(self.compiler.library_dirs,\n-                            sysconfig.get_config_var(\"LIBDIR\"))\n-            add_dir_to_list(self.compiler.include_dirs,\n-                            sysconfig.get_config_var(\"INCLUDEDIR\"))\n-\n         system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']\n         system_include_dirs = ['/usr/include']\n         # lib_dirs and inc_dirs are used to search for files;\n"
  },
  {
    "path": "packages/lang/Python3/patches/Python3-0300-generate-legacy-pyc-bytecode.patch",
    "content": "From dc39d0d93427a92c387e3c1944368d7f08299c06 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Sun, 20 Oct 2019 02:32:03 +0100\nSubject: [PATCH] Always generate legacy bytecode (allows removal of py source\n code)\n\nWe want to create compiled bytecode for modules in the read-only\nsquashfs, and we also want to avoid distributing the py source code\nwhich is a waste of space.\n\nUnfortunately, after PEP3147, it's no longer possible to distribute\npyc bytecode without the corresponding py source code unless the\nbytecode is generated using the \"legacy\" layout (ie. not using __pycache__).\n\nSince all packages process their Python source code in different ways,\nbut ultimately all compile it via a call to py_compile.compile(), the\neasiest solution is to patch py_compile.compile() so that it only\ngenerates legacy bytecode.\n\nhttps://www.python.org/dev/peps/pep-3147/#case-4-legacy-pyc-files-and-source-less-imports\n---\n Lib/py_compile.py | 4 ++++\n 1 file changed, 4 insertions(+)\n\n--- a/Lib/py_compile.py\n+++ b/Lib/py_compile.py\n@@ -121,6 +121,10 @@ def compile(file, cfile=None, dfile=None\n     the resulting file would be regular and thus not the same type of file as\n     it was previously.\n     \"\"\"\n+\n+    if cfile:\n+      cfile = file + 'c'\n+\n     if invalidation_mode is None:\n         invalidation_mode = _get_default_invalidation_mode()\n     if cfile is None:\n"
  },
  {
    "path": "packages/lang/Python3/patches/Python3-0400-fix-bpo5537.patch",
    "content": "From 7c35472bc734876f940fdc71090ad3d526e95a82 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Fri, 14 Feb 2020 01:33:34 +0000\nSubject: [PATCH] Fix issue 5537 - regression on 32-bit\n\nhttps://bugs.python.org/issue5537\nhttps://forum.kodi.tv/showthread.php?tid=343068&pid=2923934#pid2923934\n---\n Lib/http/cookiejar.py | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\n--- a/Lib/http/cookiejar.py\n+++ b/Lib/http/cookiejar.py\n@@ -99,7 +99,7 @@ def time2isoz(t=None):\n     if t is None:\n         dt = datetime.datetime.utcnow()\n     else:\n-        dt = datetime.datetime.utcfromtimestamp(t)\n+        dt = datetime.datetime(1970, 1, 1) + datetime.timedelta(seconds=t)\n     return \"%04d-%02d-%02d %02d:%02d:%02dZ\" % (\n         dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second)\n \n"
  },
  {
    "path": "packages/lang/Python3/patches/arm/Python3-0001-fix_platform_machine_func_for_32bit_userspace.patch",
    "content": "From 6689a2fe3dc4ba422078c79c480aff30dc8c3bfd Mon Sep 17 00:00:00 2001\nFrom: Raybuntu <57228613+Raybuntu@users.noreply.github.com>\nDate: Sat, 19 Dec 2020 11:05:04 +0100\nSubject: [PATCH] platform.py: Set correct machine value when kernel is aarch64\n but userspace is aarch32.\n\n---\n Lib/platform.py | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/Lib/platform.py b/Lib/platform.py\nindex 994d892c5e..b8150a6070 100755\n--- a/Lib/platform.py\n+++ b/Lib/platform.py\n@@ -875,6 +875,10 @@ def uname():\n         system = 'Windows'\n         release = 'Vista'\n \n+\n+    if machine == 'aarch64' and sys.maxsize <= 2**32:\n+        machine = 'armv7l'\n+\n     vals = system, node, release, version, machine\n     # Replace 'unknown' values with the more portable ''\n     _uname_cache = uname_result(*map(_unknown_as_blank, vals))\n-- \n2.20.1\n\n"
  },
  {
    "path": "packages/lang/gcc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gcc\"\nPKG_VERSION=\"12.2.0\"\nPKG_SHA256=\"e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff\"\nPKG_LICENSE=\"GPL-2.0-or-later\"\nPKG_SITE=\"https://gcc.gnu.org/\"\nPKG_URL=\"https://ftpmirror.gnu.org/gcc/${PKG_NAME}-${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_BOOTSTRAP=\"ccache:host autoconf:host binutils:host gmp:host mpfr:host mpc:host zstd:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_DEPENDS_HOST=\"ccache:host autoconf:host binutils:host gmp:host mpfr:host mpc:host zstd:host glibc\"\nPKG_DEPENDS_INIT=\"toolchain\"\nPKG_LONGDESC=\"This package contains the GNU Compiler Collection.\"\n\nif [ \"${MOLD_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_HOST+=\" mold:host\"\nfi\n\ncase ${TARGET_ARCH} in\n  arm|riscv64)\n    OPTS_LIBATOMIC=\"--enable-libatomic\"\n    ;;\n  *)\n    OPTS_LIBATOMIC=\"--disable-libatomic\"\n    ;;\nesac\n\nGCC_COMMON_CONFIGURE_OPTS=\"--target=${TARGET_NAME} \\\n                           --with-sysroot=${SYSROOT_PREFIX} \\\n                           --with-gmp=${TOOLCHAIN} \\\n                           --with-mpfr=${TOOLCHAIN} \\\n                           --with-mpc=${TOOLCHAIN} \\\n                           --with-zstd=${TOOLCHAIN} \\\n                           --with-gnu-as \\\n                           --with-gnu-ld \\\n                           --enable-plugin \\\n                           --enable-lto \\\n                           --enable-gold \\\n                           --enable-ld=default \\\n                           --with-linker-hash-style=gnu \\\n                           --disable-multilib \\\n                           --disable-nls \\\n                           --enable-checking=release \\\n                           --without-ppl \\\n                           --without-cloog \\\n                           --disable-libada \\\n                           --disable-libmudflap \\\n                           --disable-libitm \\\n                           --disable-libquadmath \\\n                           --disable-libmpx \\\n                           --disable-libssp \\\n                           --enable-__cxa_atexit\"\n\nPKG_CONFIGURE_OPTS_BOOTSTRAP=\"${GCC_COMMON_CONFIGURE_OPTS} \\\n                              --enable-cloog-backend=isl \\\n                              --disable-decimal-float \\\n                              --disable-gcov \\\n                              --enable-languages=c \\\n                              --disable-libatomic \\\n                              --disable-libgomp \\\n                              --disable-libsanitizer \\\n                              --disable-shared \\\n\t\t\t\t\t\t\t  --disable-libgomp \\\n                              --disable-threads \\\n                              --without-headers \\\n                              --with-newlib \\\n                              ${TARGET_ARCH_GCC_OPTS}\"\n\nPKG_CONFIGURE_OPTS_HOST=\"${GCC_COMMON_CONFIGURE_OPTS} \\\n                         --enable-languages=c,c++ \\\n                         ${OPTS_LIBATOMIC} \\\n                         --enable-decimal-float \\\n                         --enable-tls \\\n                         --enable-shared \\\n                         --disable-static \\\n                         --enable-long-long \\\n                         --enable-threads=posix \\\n                         --disable-libstdcxx-pch \\\n                         --enable-libstdcxx-time \\\n                         --enable-clocale=gnu \\\n                         ${TARGET_ARCH_GCC_OPTS}\"\n\npost_makeinstall_bootstrap() {\n  GCC_VERSION=$(${TOOLCHAIN}/bin/${TARGET_NAME}-gcc -dumpversion)\n  DATE=\"0401$(echo ${GCC_VERSION} | sed 's/\\./0/g')\"\n  CROSS_CC=${TARGET_PREFIX}gcc-${GCC_VERSION}\n\n  rm -f ${TARGET_PREFIX}gcc\n\ncat > ${TARGET_PREFIX}gcc <<EOF\n#!/bin/sh\n${TOOLCHAIN}/bin/ccache ${CROSS_CC} \"\\$@\"\nEOF\n\n  chmod +x ${TARGET_PREFIX}gcc\n\n  # To avoid cache trashing\n  touch -c -t ${DATE} ${CROSS_CC}\n\n  # install lto plugin for binutils\n  mkdir -p ${TOOLCHAIN}/lib/bfd-plugins\n    ln -sf ../gcc/${TARGET_NAME}/${GCC_VERSION}/liblto_plugin.so ${TOOLCHAIN}/lib/bfd-plugins\n}\n\npre_configure_host() {\n  unset CPP\n}\npost_make_host() {\n  \n  if [ \"${ARCH}\" != \"aarch64\" ]; then \n\t# fix wrong link\n\trm -rf ${TARGET_NAME}/libgcc/libgcc_s.so\n\tln -sf libgcc_s.so.1 ${TARGET_NAME}/libgcc/libgcc_s.so\n  fi\n\n  if [ ! \"${BUILD_WITH_DEBUG}\" = \"yes\" ]; then\n  \n  if [ \"${ARCH}\" != \"aarch64\" ]; then \n    ${TARGET_PREFIX}strip ${TARGET_NAME}/libgcc/libgcc_s.so*\n  fi\n  \n    ${TARGET_PREFIX}strip ${TARGET_NAME}/libgomp/.libs/libgomp.so*\n    ${TARGET_PREFIX}strip ${TARGET_NAME}/libstdc++-v3/src/.libs/libstdc++.so*\n  fi\n}\n\npost_makeinstall_host() {\n  cp -PR ${TARGET_NAME}/libstdc++-v3/src/.libs/libstdc++.so* ${SYSROOT_PREFIX}/usr/lib\n\n  GCC_VERSION=$(${TOOLCHAIN}/bin/${TARGET_NAME}-gcc -dumpversion)\n  DATE=\"0501$(echo ${GCC_VERSION} | sed 's/\\./0/g')\"\n  CROSS_CC=${TARGET_PREFIX}gcc-${GCC_VERSION}\n  CROSS_CXX=${TARGET_PREFIX}g++-${GCC_VERSION}\n\n  rm -f ${TARGET_PREFIX}gcc\n\ncat > ${TARGET_PREFIX}gcc <<EOF\n#!/bin/sh\n${TOOLCHAIN}/bin/ccache ${CROSS_CC} \"\\$@\"\nEOF\n\n  chmod +x ${TARGET_PREFIX}gcc\n\n  # To avoid cache trashing\n  touch -c -t ${DATE} ${CROSS_CC}\n\n  [ ! -f \"${CROSS_CXX}\" ] && mv ${TARGET_PREFIX}g++ ${CROSS_CXX}\n\ncat > ${TARGET_PREFIX}g++ <<EOF\n#!/bin/sh\n${TOOLCHAIN}/bin/ccache ${CROSS_CXX} \"\\$@\"\nEOF\n\n  chmod +x ${TARGET_PREFIX}g++\n\n  # To avoid cache trashing\n  touch -c -t ${DATE} ${CROSS_CXX}\n\n  # install lto plugin for binutils\n  mkdir -p ${TOOLCHAIN}/lib/bfd-plugins\n    ln -sf ../gcc/${TARGET_NAME}/${GCC_VERSION}/liblto_plugin.so ${TOOLCHAIN}/lib/bfd-plugins\n}\n\nconfigure_target() {\n : # reuse configure_host()\n}\n\nmake_target() {\n : # reuse make_host()\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/${TARGET_NAME}/libgcc/libgcc_s.so* ${INSTALL}/usr/lib\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/${TARGET_NAME}/libgomp/.libs/libgomp.so* ${INSTALL}/usr/lib\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/${TARGET_NAME}/libstdc++-v3/src/.libs/libstdc++.so* ${INSTALL}/usr/lib\n    if [ \"${OPTS_LIBATOMIC}\" = \"--enable-libatomic\" ]; then\n      cp -P ${PKG_BUILD}/.${HOST_NAME}/${TARGET_NAME}/libatomic/.libs/libatomic.so* ${INSTALL}/usr/lib\n    fi\n}\n\nconfigure_init() {\n : # reuse configure_host()\n}\n\nmake_init() {\n : # reuse make_host()\n}\n\nmakeinstall_init() {\n  mkdir -p ${INSTALL}/usr/lib\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/${TARGET_NAME}/libgcc/libgcc_s.so* ${INSTALL}/usr/lib\n}\n"
  },
  {
    "path": "packages/lang/gcc/patches/gcc-4.8.2-disable_multilib_i386_linux64.patch",
    "content": "diff -Naur gcc-4.8.2/gcc/config/i386/t-linux64 gcc-4.8.2.patch/gcc/config/i386/t-linux64\n--- gcc-4.8.2/gcc/config/i386/t-linux64\t2013-01-10 21:38:27.000000000 +0100\n+++ gcc-4.8.2.patch/gcc/config/i386/t-linux64\t2014-01-25 00:04:49.091673299 +0100\n@@ -33,6 +33,6 @@\n comma=,\n MULTILIB_OPTIONS    = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))\n MULTILIB_DIRNAMES   = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))\n-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)\n-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)\n-MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)\n+#MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)\n+#MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)\n+#MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)\n"
  },
  {
    "path": "packages/lang/gcc/patches/gcc-allow-newer-autoconf.patch",
    "content": "From c611cd5416ff1042a4adec0e1b12c71e307b508d Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Thu, 24 Apr 2014 22:33:27 +0300\nSubject: [PATCH] allow newer autoconf\n\n---\n config/override.m4 |    9 ---------\n 1 files changed, 0 insertions(+), 9 deletions(-)\n\ndiff --git a/config/override.m4 b/config/override.m4\nindex 52bd1c3..6c39656 100644\n--- a/config/override.m4\n+++ b/config/override.m4\n@@ -38,15 +38,6 @@ dnl   m4_define([_GCC_AUTOCONF_VERSION], [X.Y])\n dnl in configure.ac before AC_INIT,\n dnl without rewriting this file.\n dnl Or for updating the whole tree at once with the definition above.\n-AC_DEFUN([_GCC_AUTOCONF_VERSION_CHECK],\n-[m4_if(m4_defn([_GCC_AUTOCONF_VERSION]),\n-  m4_defn([m4_PACKAGE_VERSION]), [],\n-  [m4_fatal([Please use exactly Autoconf ]_GCC_AUTOCONF_VERSION[ instead of ]m4_defn([m4_PACKAGE_VERSION])[.])])\n-])\n-m4_define([AC_INIT], m4_defn([AC_INIT])[\n-_GCC_AUTOCONF_VERSION_CHECK\n-])\n-\n \n dnl Ensure we do not use a buggy M4.\n m4_if(m4_index([..wi.d.], [.d.]), [-1],\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/lang/gcc/patches/gcc-crosscompile-badness.patch",
    "content": "Index: gcc-4.4+svnr145550/gcc/incpath.cc\n===================================================================\n--- gcc-4.4+svnr145550.orig/gcc/incpath.cc\t2009-04-04 13:48:31.000000000 -0700\n+++ gcc-4.4+svnr145550/gcc/incpath.cc\t2009-04-04 14:49:29.000000000 -0700\n@@ -417,6 +417,26 @@\n   p->construct = 0;\n   p->user_supplied_p = user_supplied_p;\n \n+    /* A common error when cross compiling is including\n+    host headers. This code below will try to fail fast\n+    for cross compiling. Currently we consider /usr/include,\n+    /opt/include and /sw/include as harmful.  */\n+\n+\t{\n+\t\t/* printf(\"Adding Path: %s\\n\", p->name ); */\n+\t\tif( strstr(p->name, \"/usr/include\" ) == p->name ) {\n+\t\t\tfprintf(stderr, _(\"CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\\n\"), p->name);\n+\t\t\tabort();\n+\t\t} else if( strstr(p->name, \"/sw/include\") == p->name ) {\n+\t\t\tfprintf(stderr, _(\"CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\\n\"), p->name);\n+\t\t\tabort();\n+\t\t} else if( strstr(p->name, \"/opt/include\") == p->name ) {\n+\t\t\tfprintf(stderr, _(\"CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\\n\"), p->name);\n+\t\t\tabort();\n+\t\t }\n+\t}\n+\n+\n   add_cpp_dir_path (p, chain);\n }\n \n"
  },
  {
    "path": "packages/lang/gcc-aarch64/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gcc-aarch64\"\nPKG_VERSION=\"$(get_pkg_version gcc)\"\nPKG_LICENSE=\"GPL-2.0-or-later\"\nPKG_URL=\"\"\nPKG_DEPENDS_HOST=\"toolchain:host ccache:host autoconf:host binutils-aarch64:host gmp:host mpfr:host mpc:host zstd:host\"\nPKG_LONGDESC=\"This package contains the GNU Compiler Collection for 64-bit ARM.\"\nPKG_DEPENDS_UNPACK+=\" gcc\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory gcc)/patches\"\n\nif [ \"${MOLD_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_HOST+=\" mold:host\"\nfi\n\nPKG_CONFIGURE_OPTS_HOST=\"--target=aarch64-none-elf \\\n                         --with-sysroot=${SYSROOT_PREFIX} \\\n                         --with-gmp=${TOOLCHAIN} \\\n                         --with-mpfr=${TOOLCHAIN} \\\n                         --with-mpc=${TOOLCHAIN} \\\n                         --with-zstd=${TOOLCHAIN} \\\n                         --with-gnu-as \\\n                         --with-gnu-ld \\\n                         --with-newlib \\\n                         --without-ppl \\\n                         --without-headers \\\n                         --without-cloog \\\n                         --enable-__cxa_atexit \\\n                         --enable-checking=release \\\n                         --enable-gold \\\n                         --enable-languages=c \\\n                         --enable-ld=default \\\n                         --enable-lto \\\n                         --enable-plugin \\\n                         --enable-static \\\n                         --disable-decimal-float \\\n                         --disable-gcov \\\n                         --disable-libada \\\n                         --disable-libatomic \\\n                         --disable-libgomp \\\n                         --disable-libitm \\\n                         --disable-libmpx \\\n                         --disable-libmudflap \\\n                         --disable-libquadmath \\\n                         --disable-libquadmath-support \\\n                         --disable-libsanitizer \\\n                         --disable-libssp \\\n                         --disable-multilib \\\n                         --disable-nls \\\n                         --disable-shared \\\n                         --disable-threads\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/gcc/gcc-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_host() {\n  PKG_GCC_PREFIX=\"${TOOLCHAIN}/bin/aarch64-none-elf-\"\n  GCC_VERSION=$(${PKG_GCC_PREFIX}gcc -dumpversion)\n  DATE=\"0501$(echo ${GCC_VERSION} | sed 's/\\./0/g')\"\n  CROSS_CC=${PKG_GCC_PREFIX}gcc-${GCC_VERSION}\n\n  rm -f ${PKG_GCC_PREFIX}gcc\n\ncat > ${PKG_GCC_PREFIX}gcc <<EOF\n#!/bin/sh\n${TOOLCHAIN}/bin/ccache ${CROSS_CC} \"\\$@\"\nEOF\n\n  chmod +x ${PKG_GCC_PREFIX}gcc\n\n  # To avoid cache trashing\n  touch -c -t ${DATE} ${CROSS_CC}\n}\n"
  },
  {
    "path": "packages/lang/gcc-arm-none-eabi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gcc-arm-none-eabi\"\nPKG_VERSION=\"$(get_pkg_version gcc)\"\nPKG_LICENSE=\"GPL-2.0-or-later\"\nPKG_URL=\"\"\nPKG_DEPENDS_HOST=\"toolchain:host ccache:host autoconf:host binutils-arm-none-eabi:host gmp:host mpfr:host mpc:host zstd:host\"\nPKG_LONGDESC=\"This package contains the GNU Compiler Collection for ARM Cortex-R/M processors.\"\nPKG_DEPENDS_UNPACK+=\" gcc\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory gcc)/patches\"\n\nif [ \"${MOLD_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_HOST+=\" mold:host\"\nfi\n\nPKG_CONFIGURE_OPTS_HOST=\"--target=arm-none-eabi \\\n                         --with-sysroot=${SYSROOT_PREFIX} \\\n                         --with-gmp=${TOOLCHAIN} \\\n                         --with-mpfr=${TOOLCHAIN} \\\n                         --with-mpc=${TOOLCHAIN} \\\n                         --with-zstd=${TOOLCHAIN} \\\n                         --with-gnu-as \\\n                         --with-gnu-ld \\\n                         --with-newlib \\\n                         --without-ppl \\\n                         --without-headers \\\n                         --without-cloog \\\n                         --enable-__cxa_atexit \\\n                         --enable-checking=release \\\n                         --enable-languages=c \\\n                         --enable-ld=default \\\n                         --enable-lto \\\n                         --enable-plugin \\\n                         --enable-static \\\n                         --disable-decimal-float \\\n                         --disable-gcov \\\n                         --disable-libada \\\n                         --disable-libatomic \\\n                         --disable-libgomp \\\n                         --disable-libitm \\\n                         --disable-libmpx \\\n                         --disable-libmudflap \\\n                         --disable-libquadmath \\\n                         --disable-libquadmath-support \\\n                         --disable-libsanitizer \\\n                         --disable-libssp \\\n                         --disable-multilib \\\n                         --disable-nls \\\n                         --disable-shared \\\n                         --disable-threads\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/gcc/gcc-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_host() {\n  PKG_GCC_PREFIX=\"${TOOLCHAIN}/bin/arm-none-eabi-\"\n  GCC_VERSION=$(${PKG_GCC_PREFIX}gcc -dumpversion)\n  DATE=\"0501$(echo ${GCC_VERSION} | sed 's/\\./0/g')\"\n  CROSS_CC=${PKG_GCC_PREFIX}gcc-${GCC_VERSION}\n\n  rm -f ${PKG_GCC_PREFIX}gcc\n\ncat > ${PKG_GCC_PREFIX}gcc <<EOF\n#!/bin/sh\n${TOOLCHAIN}/bin/ccache ${CROSS_CC} \"\\$@\"\nEOF\n\n  chmod +x ${PKG_GCC_PREFIX}gcc\n\n  # To avoid cache trashing\n  touch -c -t ${DATE} ${CROSS_CC}\n}\n"
  },
  {
    "path": "packages/lang/gcc-bpf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gcc-bpf\"\nPKG_VERSION=\"$(get_pkg_version gcc)\"\nPKG_LICENSE=\"GPL-2.0-or-later\"\nPKG_URL=\"\"\nPKG_DEPENDS_HOST=\"toolchain:host ccache:host autoconf:host binutils-bpf:host gmp:host mpfr:host mpc:host zstd:host\"\nPKG_LONGDESC=\"This package contains the GNU Compiler Collection for 64-bit ARM.\"\nPKG_DEPENDS_UNPACK+=\" gcc\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory gcc)/patches\"\n\nif [ \"${MOLD_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_HOST+=\" mold:host\"\nfi\n\nPKG_CONFIGURE_OPTS_HOST=\"--target=bpf \\\n                         --with-sysroot=${SYSROOT_PREFIX} \\\n                         --with-gmp=${TOOLCHAIN} \\\n                         --with-mpfr=${TOOLCHAIN} \\\n                         --with-mpc=${TOOLCHAIN} \\\n                         --with-zstd=${TOOLCHAIN} \\\n                         --with-gnu-as \\\n                         --with-gnu-ld \\\n                         --with-newlib \\\n                         --without-ppl \\\n                         --without-headers \\\n                         --without-cloog \\\n                         --enable-__cxa_atexit \\\n                         --enable-checking=release \\\n                         --enable-gold \\\n                         --enable-languages=c \\\n                         --enable-ld=default \\\n                         --enable-lto \\\n                         --enable-plugin \\\n                         --enable-static \\\n                         --disable-decimal-float \\\n                         --disable-gcov \\\n                         --disable-libada \\\n                         --disable-libatomic \\\n                         --disable-libgomp \\\n                         --disable-libitm \\\n                         --disable-libmpx \\\n                         --disable-libmudflap \\\n                         --disable-libquadmath \\\n                         --disable-libquadmath-support \\\n                         --disable-libsanitizer \\\n                         --disable-libssp \\\n                         --disable-multilib \\\n                         --disable-nls \\\n                         --disable-shared \\\n                         --disable-threads\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/gcc/gcc-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n"
  },
  {
    "path": "packages/lang/gcc-or1k/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gcc-or1k\"\nPKG_VERSION=\"$(get_pkg_version gcc)\"\nPKG_LICENSE=\"GPL-2.0-or-later\"\nPKG_URL=\"\"\nPKG_DEPENDS_HOST=\"toolchain:host ccache:host autoconf:host binutils-or1k:host gmp:host mpfr:host mpc:host zstd:host\"\nPKG_LONGDESC=\"This package contains the GNU Compiler Collection for OpenRISC 1000.\"\nPKG_DEPENDS_UNPACK+=\" gcc\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory gcc)/patches\"\n\nif [ \"${MOLD_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_HOST+=\" mold:host\"\nfi\n\nPKG_CONFIGURE_OPTS_HOST=\"--target=or1k-none-elf \\\n                         --with-sysroot=${SYSROOT_PREFIX} \\\n                         --with-gmp=${TOOLCHAIN} \\\n                         --with-mpfr=${TOOLCHAIN} \\\n                         --with-mpc=${TOOLCHAIN} \\\n                         --with-zstd=${TOOLCHAIN} \\\n                         --with-gnu-as \\\n                         --with-gnu-ld \\\n                         --with-newlib \\\n                         --without-ppl \\\n                         --without-headers \\\n                         --without-cloog \\\n                         --enable-__cxa_atexit \\\n                         --enable-checking=release \\\n                         --enable-gold \\\n                         --enable-languages=c \\\n                         --enable-ld=default \\\n                         --enable-lto \\\n                         --enable-plugin \\\n                         --enable-static \\\n                         --disable-decimal-float \\\n                         --disable-gcov \\\n                         --disable-libada \\\n                         --disable-libatomic \\\n                         --disable-libgomp \\\n                         --disable-libitm \\\n                         --disable-libmpx \\\n                         --disable-libmudflap \\\n                         --disable-libquadmath \\\n                         --disable-libquadmath-support \\\n                         --disable-libsanitizer \\\n                         --disable-libssp \\\n                         --disable-multilib \\\n                         --disable-nls \\\n                         --disable-shared \\\n                         --disable-threads\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/gcc/gcc-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_host() {\n  PKG_GCC_PREFIX=\"${TOOLCHAIN}/bin/or1k-none-elf-\"\n  GCC_VERSION=$(${PKG_GCC_PREFIX}gcc -dumpversion)\n  DATE=\"0501$(echo ${GCC_VERSION} | sed 's/\\./0/g')\"\n  CROSS_CC=${PKG_GCC_PREFIX}gcc-${GCC_VERSION}\n\n  rm -f ${PKG_GCC_PREFIX}gcc\n\ncat > ${PKG_GCC_PREFIX}gcc <<EOF\n#!/bin/sh\n${TOOLCHAIN}/bin/ccache ${CROSS_CC} \"\\$@\"\nEOF\n\n  chmod +x ${PKG_GCC_PREFIX}gcc\n\n  # To avoid cache trashing\n  touch -c -t ${DATE} ${CROSS_CC}\n}\n"
  },
  {
    "path": "packages/lang/llvm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"llvm\"\nPKG_VERSION=\"15.0.7\"\nPKG_SHA256=\"8b5fcb24b4128cf04df1b0b9410ce8b1a729cb3c544e6da885d234280dedeac6\"\nPKG_LICENSE=\"Apache-2.0\"\nPKG_SITE=\"http://llvm.org/\"\nPKG_URL=\"https://github.com/llvm/llvm-project/releases/download/llvmorg-${PKG_VERSION}/llvm-project-${PKG_VERSION}.src.tar.xz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain llvm:host zlib\"\nPKG_LONGDESC=\"Low-Level Virtual Machine (LLVM) is a compiler infrastructure.\"\nPKG_TOOLCHAIN=\"cmake\"\n\nPKG_CMAKE_OPTS_COMMON=\"-DLLVM_INCLUDE_TOOLS=ON \\\n                       -DLLVM_BUILD_TOOLS=OFF \\\n                       -DLLVM_BUILD_UTILS=OFF \\\n                       -DLLVM_BUILD_EXAMPLES=OFF \\\n                       -DLLVM_INCLUDE_EXAMPLES=OFF \\\n                       -DLLVM_BUILD_TESTS=OFF \\\n                       -DLLVM_INCLUDE_TESTS=OFF \\\n                       -DLLVM_INCLUDE_GO_TESTS=OFF \\\n                       -DLLVM_BUILD_BENCHMARKS=OFF \\\n                       -DLLVM_INCLUDE_BENCHMARKS=OFF \\\n                       -DLLVM_BUILD_DOCS=OFF \\\n                       -DLLVM_INCLUDE_DOCS=OFF \\\n                       -DLLVM_ENABLE_DOXYGEN=OFF \\\n                       -DLLVM_ENABLE_SPHINX=OFF \\\n                       -DLLVM_ENABLE_OCAMLDOC=OFF \\\n                       -DLLVM_ENABLE_BINDINGS=OFF \\\n                       -DLLVM_ENABLE_TERMINFO=OFF \\\n                       -DLLVM_ENABLE_ASSERTIONS=OFF \\\n                       -DLLVM_ENABLE_WERROR=OFF \\\n                       -DLLVM_ENABLE_ZLIB=OFF \\\n                       -DLLVM_ENABLE_ZSTD=OFF \\\n                       -DLLVM_ENABLE_LIBXML2=OFF \\\n                       -DLLVM_BUILD_LLVM_DYLIB=ON \\\n                       -DLLVM_LINK_LLVM_DYLIB=ON \\\n                       -DLLVM_OPTIMIZED_TABLEGEN=ON \\\n                       -DLLVM_APPEND_VC_REV=OFF \\\n                       -DLLVM_ENABLE_RTTI=ON \\\n                       -DLLVM_ENABLE_UNWIND_TABLES=OFF \\\n                       -DLLVM_ENABLE_Z3_SOLVER=OFF \\\n                       -DCMAKE_SKIP_RPATH=ON\"\n\npre_configure() {\n  PKG_CMAKE_SCRIPT=${PKG_BUILD}/llvm/CMakeLists.txt\n}\n\npre_configure_host() {\n  case \"${TARGET_ARCH}\" in\n    \"arm\")\n      LLVM_BUILD_TARGETS=\"X86\\;ARM\"\n      ;;\n    \"aarch64\")\n      LLVM_BUILD_TARGETS=\"X86\\;AArch64\"\n      ;;\n    \"x86_64\")\n      LLVM_BUILD_TARGETS=\"X86\\;AMDGPU\"\n      ;;\n  esac\n\n  mkdir -p ${PKG_BUILD}/.${HOST_NAME}\n  cd ${PKG_BUILD}/.${HOST_NAME}\n  PKG_CMAKE_OPTS_HOST=\"${PKG_CMAKE_OPTS_COMMON} \\\n                       -DCMAKE_BINARY_DIR=${PKG_BUILD}/.${HOST_NAME} \\\n                       -DLLVM_NATIVE_BUILD=${PKG_BUILD}/.${HOST_NAME}/native \\\n                       -DLLVM_ENABLE_PROJECTS='clang' \\\n                       -DCLANG_LINK_CLANG_DYLIB=ON \\\n                       -DLLVM_TARGETS_TO_BUILD=${LLVM_BUILD_TARGETS}\"\n}\n\npost_make_host() {\n  ninja ${NINJA_OPTS} llvm-config llvm-tblgen\n}\n\npost_makeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp -a bin/llvm-config ${TOOLCHAIN}/bin\n    cp -a bin/llvm-tblgen ${TOOLCHAIN}/bin\n}\n\npre_configure_target() {\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n  cd ${PKG_BUILD}/.${TARGET_NAME}\n  PKG_CMAKE_OPTS_TARGET=\"${PKG_CMAKE_OPTS_COMMON} \\\n                         -DCMAKE_BINARY_DIR=${PKG_BUILD}/.${TARGET_NAME} \\\n                         -DLLVM_NATIVE_BUILD=${PKG_BUILD}/.${TARGET_NAME}/native \\\n                         -DCMAKE_CROSSCOMPILING=ON \\\n                         -DLLVM_ENABLE_PROJECTS='' \\\n                         -DLLVM_TARGETS_TO_BUILD=AMDGPU \\\n                         -DLLVM_TARGET_ARCH=\"${TARGET_ARCH}\" \\\n                         -DLLVM_TABLEGEN=${TOOLCHAIN}/bin/llvm-tblgen\"\n}\n\npost_makeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/bin\n    cp -a ${TOOLCHAIN}/bin/llvm-config ${SYSROOT_PREFIX}/usr/bin\n\n  rm -rf ${INSTALL}/usr/bin\n  rm -rf ${INSTALL}/usr/lib/LLVMHello.so\n  rm -rf ${INSTALL}/usr/lib/libLTO.so\n  rm -rf ${INSTALL}/usr/share\n}\n"
  },
  {
    "path": "packages/lang/llvm/patches/llvm-14.0.0-force-disable-cmakelist-options.patch",
    "content": "--- a/llvm/CMakeLists.txt\t2022-04-02 06:26:04.688530539 +0000\n+++ b/llvm/CMakeLists.txt\t2022-04-02 06:44:00.015717360 +0000\n@@ -396,7 +396,7 @@\n set(LLVM_TARGET_ARCH \"host\"\n   CACHE STRING \"Set target to use for LLVM JIT or use \\\"host\\\" for automatic detection.\")\n \n-option(LLVM_ENABLE_TERMINFO \"Use terminfo database if available.\" ON)\n+option(LLVM_ENABLE_TERMINFO \"Use terminfo database if available.\" OFF)\n \n set(LLVM_ENABLE_LIBXML2 \"ON\" CACHE STRING \"Use libxml2 if available. Can be ON, OFF, or FORCE_ON\")\n \n@@ -616,7 +616,7 @@\n \n option(LLVM_BUILD_BENCHMARKS \"Add LLVM benchmark targets to the list of default\n targets. If OFF, benchmarks still could be built using Benchmarks target.\" OFF)\n-option(LLVM_INCLUDE_BENCHMARKS \"Generate benchmark targets. If OFF, benchmarks can't be built.\" ON)\n+option(LLVM_INCLUDE_BENCHMARKS \"Generate benchmark targets. If OFF, benchmarks can't be built.\" OFF)\n \n option (LLVM_BUILD_DOCS \"Build the llvm documentation.\" OFF)\n option (LLVM_INCLUDE_DOCS \"Generate build targets for llvm documentation.\" ON)\n"
  },
  {
    "path": "packages/lang/llvm/patches/llvm-15.0.0-D108864-misleading-indentation.patch",
    "content": "diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake\n--- a/llvm/cmake/modules/HandleLLVMOptions.cmake\n+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake\n@@ -789,7 +789,11 @@\n   add_flag_if_supported(\"-Wstring-conversion\" STRING_CONVERSION_FLAG)\n \n   # Prevent bugs that can happen with llvm's brace style.\n-  add_flag_if_supported(\"-Wmisleading-indentation\" MISLEADING_INDENTATION_FLAG)\n+  if (CMAKE_COMPILER_IS_GNUCXX)\n+    add_flag_if_supported(\"-Wno-misleading-indentation\" MISLEADING_INDENTATION_FLAG)\n+  else()\n+    add_flag_if_supported(\"-Wmisleading-indentation\" MISLEADING_INDENTATION_FLAG)\n+  endif()\n endif (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))\n \n if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT LLVM_ENABLE_WARNINGS)\n\n"
  },
  {
    "path": "packages/lang/lua52/config/lua52.pc",
    "content": "prefix=/usr\nlibdir=${prefix}/lib\nincludedir=${prefix}/include/lua@@VERSION_MM@@\n\nName: Lua\nDescription: An Extensible Extension Language\nVersion: @@VERSION@@\nRequires:\nLibs: -L${libdir} -llua@@VERSION_MM@@ -lm\nCflags: -I${includedir}\n"
  },
  {
    "path": "packages/lang/lua52/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"lua52\"\nPKG_VERSION=\"5.2.4\"\nPKG_SHA256=\"b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://www.lua.org\"\nPKG_URL=\"http://www.lua.org/ftp/lua-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Lua is a powerful, efficient, lightweight, embeddable scripting language.\"\n\nmake_target() {\n  make CC=${CC} AR=\"${AR} rcu\" posix\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/lua$(get_pkg_version_maj_min)\n  cp src/lua.h src/luaconf.h src/lualib.h src/lauxlib.h ${SYSROOT_PREFIX}/usr/include/lua$(get_pkg_version_maj_min)\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n  cp src/liblua.a ${SYSROOT_PREFIX}/usr/lib/liblua$(get_pkg_version_maj_min).a\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n  cp ${PKG_DIR}/config/lua52.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n  sed -e \"s/@@VERSION@@/${PKG_VERSION}/g\" \\\n      -e \"s/@@VERSION_MM@@/$(get_pkg_version_maj_min)/g\" \\\n      -i ${SYSROOT_PREFIX}/usr/lib/pkgconfig/lua52.pc\n}\n"
  },
  {
    "path": "packages/lang/lua54/config/lua54.pc",
    "content": "prefix=/usr\nlibdir=${prefix}/lib\nincludedir=${prefix}/include/lua@@VERSION_MM@@\n\nName: Lua\nDescription: An Extensible Extension Language\nVersion: @@VERSION@@\nRequires:\nLibs: -L${libdir} -llua@@VERSION_MM@@ -lm\nCflags: -I${includedir}\n"
  },
  {
    "path": "packages/lang/lua54/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"lua54\"\nPKG_VERSION=\"5.4.4\"\nPKG_SHA256=\"164c7849653b80ae67bec4b7473b884bf5cc8d2dca05653475ec2ed27b9ebf61\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://www.lua.org\"\nPKG_URL=\"http://www.lua.org/ftp/lua-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Lua is a powerful, efficient, lightweight, embeddable scripting language.\"\n\nmake_target() {\n  make CC=${CC} AR=\"${AR} rcu\" MYCFLAGS=\"-fPIC\" posix\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/lua$(get_pkg_version_maj_min)\n  cp src/lua.h src/luaconf.h src/lualib.h src/lauxlib.h ${SYSROOT_PREFIX}/usr/include/lua$(get_pkg_version_maj_min)\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n  cp src/liblua.a ${SYSROOT_PREFIX}/usr/lib/liblua$(get_pkg_version_maj_min).a\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n  cp ${PKG_DIR}/config/lua54.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n  sed -e \"s/@@VERSION@@/${PKG_VERSION}/g\" \\\n      -e \"s/@@VERSION_MM@@/$(get_pkg_version_maj_min)/g\" \\\n      -i ${SYSROOT_PREFIX}/usr/lib/pkgconfig/lua54.pc\n}\n"
  },
  {
    "path": "packages/lang/nasm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"nasm\"\nPKG_VERSION=\"2.15.05\"\nPKG_SHA256=\"3caf6729c1073bf96629b57cee31eeb54f4f8129b01902c73428836550b30a3f\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://www.nasm.us/\"\nPKG_URL=\"http://www.nasm.us/pub/nasm/releasebuilds/${PKG_VERSION}/nasm-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"The Netwide Assembler, NASM, is an 80x86 and x86-64 assembler designed for portability and modularity.\"\n"
  },
  {
    "path": "packages/lib32/audio/lib32-SDL2_mixer/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-2022 Team CoreELEC (https://coreelec.org)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-SDL2_mixer\"\nPKG_VERSION=\"2.0.4\"\nPKG_SHA256=\"b4cf5a382c061cd75081cf246c2aa2f9df8db04bdda8dcdc6b6cca55bede2419\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"http://www.libsdl.org/projects/SDL_mixer/release\"\nPKG_URL=\"${PKG_SITE}/SDL2_mixer-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-alsa-lib lib32-SDL2 lib32-mpg123-compat lib32-libvorbis lib32-libvorbisidec lib32-libogg lib32-opusfile lib32-libmodplug lib32-flac\"\nPKG_LONGDESC=\"SDL_mixer 2.0.4\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-sdltest \\\n                           --disable-music-midi-fluidsynth \\\n                           --enable-music-flac \\\n                           --enable-music-mod-modplug \\\n                           --enable-music-ogg-tremor \\\n                           --enable-music-ogg \\\n                           --enable-music-mp3\"\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/audio/lib32-alsa-lib/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-alsa-lib\"\nPKG_VERSION=\"$(get_pkg_version alsa-lib)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory alsa-lib)\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.alsa-project.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory alsa-lib)/patches\"\nPKG_LONGDESC=\"ALSA (Advanced Linux Sound Architecture) is the next generation Linux Sound API.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic lib32\"\n\nif build_with_debug; then\n  PKG_ALSA_DEBUG=--with-debug\nelse\n  PKG_ALSA_DEBUG=--without-debug\nfi\n\nPKG_CONFIGURE_OPTS_TARGET=\"${PKG_ALSA_DEBUG} \\\n                           --disable-dependency-tracking \\\n                           --with-plugindir=/usr/lib/alsa \\\n                           --disable-python\"\n\nunpack() {\n  ${SCRIPTS}/get alsa-lib\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/alsa-lib/alsa-lib-${PKG_VERSION}.tar.bz2 -C ${PKG_BUILD}\n}\n\n\npost_configure_target() {\n  sed -i 's/.*PKGLIBDIR.*/#define PKGLIBDIR \"\"/' include/config.h\n}\n\npost_makeinstall_target() {\n  # Don't need any binary\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/share\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/audio/lib32-flac/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-flac\"\nPKG_VERSION=\"$(get_pkg_version flac)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory flac)\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://xiph.org/flac/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-libogg\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory flac)/patches\"\nPKG_LONGDESC=\"An Free Lossless Audio Codec.\"\nPKG_TOOLCHAIN=\"autotools\"\n# flac-1.3.1 dont build with LTO support\nPKG_BUILD_FLAGS=\"lib32 +pic\"\n\n# package specific configure options\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-shared \\\n                           --disable-static \\\n                           --disable-rpath \\\n                           --disable-altivec \\\n                           --disable-doxygen-docs \\\n                           --disable-thorough-tests \\\n                           --disable-cpplibs \\\n                           --disable-xmms-plugin \\\n                           --disable-oggtest \\\n                           --with-ogg=${LIB32_SYSROOT_PREFIX}/usr \\\n                           --with-gnu-ld\"\n\nif target_has_feature sse; then\n  PKG_CONFIGURE_OPTS_TARGET+=\" --enable-sse\"\nelse\n  PKG_CONFIGURE_OPTS_TARGET+=\" --disable-sse\"\nfi\n\nunpack() {\n  ${SCRIPTS}/get flac\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/flac/flac-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/share\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/audio/lib32-libmodplug/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libmodplug\"\nPKG_VERSION=\"$(get_pkg_version libmodplug)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libmodplug)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://modplug-xmms.sourceforge.net/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libmodplug)/patches\"\nPKG_LONGDESC=\"libmodplug renders mod music files as raw audio data, for playing or conversion.\"\nPKG_BUILD_FLAGS=\"lib32 +pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared\"\n\nunpack() {\n  ${SCRIPTS}/get libmodplug\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libmodplug/libmodplug-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/audio/lib32-libogg/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libogg\"\nPKG_VERSION=\"$(get_pkg_version libogg)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libogg)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://www.xiph.org/ogg/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libogg)/patches\"\nPKG_LONGDESC=\"Libogg contains necessary functionality to create, decode, and work with Ogg bitstreams.\"\nPKG_BUILD_FLAGS=\"lib32 +pic\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DINSTALL_DOCS=OFF\"\n\nunpack() {\n  ${SCRIPTS}/get libogg\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libogg/libogg-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/audio/lib32-libpulse/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libpulse\"\nPKG_VERSION=\"$(get_pkg_version pulseaudio)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory pulseaudio)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://pulseaudio.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-alsa-lib lib32-dbus lib32-libcap lib32-libsndfile lib32-openssl lib32-systemd-libs glib:host lib32-glib\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory pulseaudio)/patches\"\nPKG_LONGDESC=\"PulseAudio is a sound system for POSIX OSes, meaning that it is a proxy for your sound applications.\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_MESON_OPTS_TARGET=\"-Ddaemon=false \\\n                       -Ddoxygen=false \\\n                       -Dgcov=false \\\n                       -Dman=false \\\n                       -Dtests=false \\\n                       -Dsystem_user=root \\\n                       -Dsystem_group=root \\\n                       -Daccess_group=root \\\n                       -Ddatabase=simple \\\n                       -Dlegacy-database-entry-format=false \\\n                       -Dstream-restore-clear-old-devices=false \\\n                       -Drunning-from-build-tree=false \\\n                       -Datomic-arm-linux-helpers=true \\\n                       -Datomic-arm-memory-barrier=false \\\n                       -Dmodlibexecdir=/usr/lib/pulse \\\n                       -Dudevrulesdir=/usr/lib/udev/rules.d \\\n                       -Dbashcompletiondir=no \\\n                       -Dzshcompletiondir=no \\\n                       -Dalsa=enabled \\\n                       -Dasyncns=disabled \\\n                       -Davahi=disabled \\\n                       -Dbluez5=disabled\n                       -Dbluez5-gstreamer=disabled \\\n                       -Dbluez5-native-headset=false \\\n                       -Dbluez5-ofono-headset=false \\\n                       -Ddbus=enabled \\\n                       -Delogind=disabled \\\n                       -Dfftw=disabled \\\n                       -Dglib=enabled \\\n                       -Dgsettings=disabled \\\n                       -Dgstreamer=disabled \\\n                       -Dgtk=disabled \\\n                       -Dhal-compat=false \\\n                       -Dipv6=true \\\n                       -Djack=disabled \\\n                       -Dlirc=disabled \\\n                       -Dopenssl=enabled \\\n                       -Dorc=disabled \\\n                       -Doss-output=disabled \\\n                       -Dsamplerate=disabled \\\n                       -Dsoxr=disabled \\\n                       -Dspeex=disabled \\\n                       -Dsystemd=enabled \\\n                       -Dtcpwrap=disabled \\\n                       -Dudev=enabled \\\n                       -Dvalgrind=disabled \\\n                       -Dx11=disabled \\\n                       -Dadrian-aec=true \\\n                       -Dwebrtc-aec=disabled\"\n\n\nunpack() {\n  ${SCRIPTS}/get pulseaudio\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/pulseaudio/pulseaudio-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npre_configure_target() {\n  sed -e 's|; remixing-use-all-sink-channels = yes|; remixing-use-all-sink-channels = no|' \\\n      -i ${PKG_BUILD}/src/daemon/daemon.conf.in\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/etc\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/share\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n  mkdir -p ${INSTALL}/etc/ld.so.conf.d\n    echo /usr/lib32/pulseaudio > ${INSTALL}/etc/ld.so.conf.d/pulseaudio.conf\n    echo /usr/lib/pulseaudio >> ${INSTALL}/etc/ld.so.conf.d/pulseaudio.conf\n}\n"
  },
  {
    "path": "packages/lib32/audio/lib32-libsndfile/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libsndfile\"\nPKG_VERSION=\"$(get_pkg_version libsndfile)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libsndfile)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"LGPL-2.1-or-later\"\nPKG_SITE=\"https://libsndfile.github.io/libsndfile/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-alsa-lib lib32-flac lib32-libogg lib32-libvorbis lib32-opus\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libsndfile)/patches\"\nPKG_LONGDESC=\"A C library for reading and writing sound files containing sampled audio data.\"\nPKG_BUILD_FLAGS=\"lib32 +pic\"\n\n# As per notes in configure.ac:\n#  One or more of the external libraries (ie libflac, libogg, libvorbis and libopus)\n#  is either missing ... Unfortunately, for ease of maintenance, the external libs\n#  are an all or nothing affair.\n# So all of flac, libogg, libvorbis, opus are required.\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_PROGRAMS=OFF \\\n                       -DBUILD_EXAMPLES=OFF \\\n                       -DBUILD_REGTEST=OFF \\\n                       -DBUILD_TESTING=OFF \\\n                       -DBUILD_SHARED_LIBS=ON \\\n                       -DENABLE_EXTERNAL_LIBS=ON \\\n                       -DINSTALL_MANPAGES=OFF \\\n                       -DINSTALL_PKGCONFIG_MODULE=ON\"\n\nunpack() {\n  ${SCRIPTS}/get libsndfile\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libsndfile/libsndfile-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/audio/lib32-libvorbis/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libvorbis\"\nPKG_VERSION=\"$(get_pkg_version libvorbis)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libvorbis)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://www.vorbis.com/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-libogg\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libvorbis)/patches\"\nPKG_LONGDESC=\"Lossless audio compression tools using the ogg-vorbis algorithms.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"lib32 +pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-shared \\\n                           --disable-static \\\n                           --with-ogg=${LIB32_SYSROOT_PREFIX}/usr \\\n                           --disable-docs \\\n                           --disable-examples \\\n                           --disable-oggtest\"\n\nunpack() {\n  ${SCRIPTS}/get libvorbis\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libvorbis/libvorbis-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/share\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/audio/lib32-libvorbisidec/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libvorbisidec\"\nPKG_VERSION=\"$(get_pkg_version libvorbisidec)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libvorbisidec)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/sezero/tremor\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-libogg lib32-freetype\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libvorbisidec)/patches\"\nPKG_LONGDESC=\"libvorbisidec\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nunpack() {\n  ${SCRIPTS}/get libvorbisidec\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libvorbisidec/libvorbisidec-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\nconfigure_target() {\n  cd ${PKG_BUILD}\n  ./autogen.sh HAVE_OGG=no --disable-mmx --prefix=/usr --datadir=/usr/share --datarootdir=/usr/share --host=${TARGET_NAME} --enable-fb --enable-freetype --with-freetype-prefix=${SYSROOT_PREFIX}/usr --enable-slang\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/audio/lib32-mpg123-compat/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-2022 5schatten (https://github.com/5schatten)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-mpg123-compat\"\nPKG_VERSION=\"$(get_pkg_version mpg123-compat)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory mpg123-compat)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"LGPLv2\"\nPKG_SITE=\"http://www.mpg123.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-alsa-lib lib32-SDL2\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory mpg123-compat)/patches\"\nPKG_LONGDESC=\"A console based real time MPEG Audio Player for Layer 1, 2 and 3.\"\nPKG_BUILD_FLAGS=\"lib32 -fpic\"\n\nif [ \"${PULSEAUDIO_SUPPORT}\" = yes ]; then\n  PKG_DEPENDS_TARGET+=\" lib32-libpulse\"\n  PKG_CONFIGURE_OPTS_TARGET=\"--with-default-audio=pulse --with-audio=alsa,pulse\"\nelse\n  PKG_CONFIGURE_OPTS_TARGET=\"--with-default-audio=alsa --with-audio=alsa\"\nfi\n\nunpack() {\n  ${SCRIPTS}/get mpg123-compat\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/mpg123-compat/mpg123-compat-${PKG_VERSION}.tar.bz2 -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/audio/lib32-openal-soft/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-openal-soft\"\nPKG_VERSION=\"$(get_pkg_version openal-soft)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory openal-soft)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.openal.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-alsa-lib\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory openal-soft)/patches\"\nPKG_LONGDESC=\"OpenAL Soft is a software implementation of the OpenAL 3D audio API.\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DALSOFT_BACKEND_OSS=off \\\n                       -DALSOFT_BACKEND_PULSEAUDIO=off \\\n                       -DALSOFT_BACKEND_WAVE=off \\\n                       -DALSOFT_EXAMPLES=off \\\n                       -DALSOFT_UTILS=off\"\n\nunpack() {\n  ${SCRIPTS}/get openal-soft\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/openal-soft/openal-soft-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/share\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/audio/lib32-opus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji\n\nPKG_NAME=\"lib32-opus\"\nPKG_VERSION=\"$(get_pkg_version opus)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory opus)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://www.opus-codec.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory opus)/patches\"\nPKG_LONGDESC=\"Codec designed for interactive speech and audio transmission over the Internet.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"lib32 +pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           --enable-fixed-point\"\n\nunpack() {\n  ${SCRIPTS}/get opus\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/opus/opus-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/share\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/audio/lib32-opusfile/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-opusfile\"\nPKG_VERSION=\"$(get_pkg_version opusfile)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory opusfile)\"\nPKG_ARCH=\"aarch64\"\nPKG_SITE=\"https://github.com/xiph/opusfile\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-openssl lib32-opus lib32-libogg\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory opusfile)/patches\"\nPKG_SHORTDESC=\"Stand-alone decoder library for .opus streams\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nunpack() {\n  ${SCRIPTS}/get opusfile\n  mkdir -p ${PKG_BUILD}\n  tar cf - -C ${SOURCES}/opusfile/opusfile-${PKG_VERSION} ${PKG_TAR_COPY_OPTS} . | tar xf - -C ${PKG_BUILD}\n}\n\npre_configure_target() {\n  ${PKG_BUILD}/autogen.sh\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/compress/lib32-bzip2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-bzip2\"\nPKG_VERSION=\"$(get_pkg_version bzip2)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory bzip2)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://sourceware.org/bzip2/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory bzip2)/patches\"\nPKG_LONGDESC=\"A high-quality bzip2 data compressor.\"\nPKG_BUILD_FLAGS=\"lib32 +pic +pic:host\"\n\nunpack() {\n  ${SCRIPTS}/get bzip2\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/bzip2/bzip2-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npre_build_target() {\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n  cp -r ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}\n}\n\npre_make_target() {\n  cd ${PKG_BUILD}/.${TARGET_NAME}\n  sed -e \"s,ln -s (lib.*),ln -snf \\$${1}; ln -snf libbz2.so.${PKG_VERSION} libbz2.so,g\" -i Makefile-libbz2_so\n}\n\nmake_target() {\n  make -f Makefile-libbz2_so CC=${CC} CFLAGS=\"${CFLAGS}\"\n}\n\npost_make_target() {\n  ln -snf libbz2.so.1.0 libbz2.so\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/include\n    cp bzlib.h ${SYSROOT_PREFIX}/usr/include\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n    cp -P libbz2.so* ${SYSROOT_PREFIX}/usr/lib\n  mkdir -p ${INSTALL}/usr/lib32\n    cp -P libbz2.so* ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/compress/lib32-libzip/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-2022 Team CoreELEC (https://coreelec.org)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libzip\"\nPKG_VERSION=\"$(get_pkg_version libzip)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libzip)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.nih.at/libzip/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-zlib lib32-zstd\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libzip)/patches\"\nPKG_LONGDESC=\"A C library for reading, creating, and modifying zip archives.\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nunpack() {\n  ${SCRIPTS}/get libzip\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libzip/libzip-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/compress/lib32-zlib/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-zlib\"\nPKG_VERSION=\"$(get_pkg_version zlib)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory zlib)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.zlib.net\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain zlib\"\nPKG_LONGDESC=\"A general purpose (ZIP) data compression library.\"\nPKG_TOOLCHAIN=\"cmake-make\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory zlib)/patches\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DINSTALL_PKGCONFIG_DIR=/usr/lib/pkgconfig\"\n\nunpack() {\n  ${SCRIPTS}/get zlib\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/zlib/zlib-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/compress/lib32-zstd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-2022 Team CoreELEC (https://coreelec.org)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-zstd\"\nPKG_VERSION=\"$(get_pkg_version zstd)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory zstd)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"BSD/GPLv2\"\nPKG_SITE=\"http://www.zstd.net\"\nPKG_URL=\"\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory zstd)/patches\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_LONGDESC=\"A fast real-time compression algorithm.\"\nPKG_TOOLCHAIN=\"meson\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nconfigure_package() {\n  PKG_MESON_SCRIPT=\"${PKG_BUILD}/build/meson/meson.build\"\n}\n\nunpack() {\n  ${SCRIPTS}/get zstd\n  mkdir -p ${PKG_BUILD}\n  tar -I zstd --strip-components=1 -xf ${SOURCES}/zstd/zstd-${PKG_VERSION}.tar.zst -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/devel/lib32-binutils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-binutils\"\nPKG_VERSION=\"$(get_pkg_version binutils)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory binutils)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_URL=\"\"\nPKG_DEPENDS_HOST=\"ccache:host bison:host flex:host lib32-linux-headers\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain binutils\"\nPKG_LONGDESC=\"A GNU collection of binary utilities for multilib ARM.\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory binutils)/patches\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--target=${LIB32_TARGET_NAME} \\\n                         --with-sysroot=${LIB32_SYSROOT_PREFIX} \\\n                         --with-lib-path=${LIB32_SYSROOT_PREFIX}/lib:${LIB32_SYSROOT_PREFIX}/usr/lib \\\n                         --without-ppl \\\n                         --enable-static \\\n                         --without-cloog \\\n                         --disable-werror \\\n                         --disable-multilib \\\n                         --disable-libada \\\n                         --disable-libssp \\\n                         --enable-version-specific-runtime-libs \\\n                         --enable-plugins \\\n                         --enable-gold \\\n                         --enable-ld=default \\\n                         --enable-lto \\\n                         --disable-nls\"\n\nunpack() {\n  ${SCRIPTS}/get binutils\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/binutils/binutils-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npre_configure_host() {\n  unset CPPFLAGS\n  unset CFLAGS\n  unset CXXFLAGS\n  unset LDFLAGS\n}\n\nmake_host() {\n  make configure-host\n  make MAKEINFO=true\n}\n\nmakeinstall_host() {\n  cp -v ../include/libiberty.h ${LIB32_SYSROOT_PREFIX}/usr/include\n  make -C bfd install # fix parallel build with libctf requiring bfd\n  make MAKEINFO=true install\n}\n\nconfigure_target() {\n  :\n}\n\nmake_target() {\n  :\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/etc\n    # ln -sf /storage/.cache/ld.so.cache ${INSTALL}/etc/ld.so.cache\n    # ln -sf /storage/.cache/ld.so.cache~ ${INSTALL}/etc/ld.so.cache~\n    echo \"include /etc/ld.so.conf.d/*.conf\" > ${INSTALL}/etc/ld.so.conf\n  # mkdir -p ${INSTALL}/usr/cache\n  #   touch ${INSTALL}/usr/cache/ld.so.cache\n  #   touch ${INSTALL}/usr/cache/ld.so.cache~\n  mkdir -p ${INSTALL}/usr/lib\n    ln -sf ../lib32/ld-linux-armhf.so.3 ${INSTALL}/usr/lib\n}\n"
  },
  {
    "path": "packages/lib32/devel/lib32-fribidi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-fribidi\"\nPKG_VERSION=\"$(get_pkg_version fribidi)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory fribidi)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"http://fribidi.freedesktop.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory fribidi)/patches\"\nPKG_LONGDESC=\"A bidirectional algorithm library.\"\nPKG_TOOLCHAIN=\"meson\"\nPKG_BUILD_FLAGS=\"lib32 +pic\"\n\nPKG_MESON_OPTS_TARGET=\"-Ddeprecated=false \\\n                       -Ddocs=false \\\n                       -Ddefault_library=static\"\n\nunpack() {\n  ${SCRIPTS}/get fribidi\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/fribidi/fribidi-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/bin\n    cp -f $(get_pkg_directory fribidi)/scripts/fribidi-config ${SYSROOT_PREFIX}/usr/bin\n    chmod +x ${SYSROOT_PREFIX}/usr/bin/fribidi-config\n\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/devel/lib32-glib/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-glib\"\nPKG_VERSION=\"$(get_pkg_version glib)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory glib)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://www.gtk.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-pcre2 lib32-zlib lib32-libffi Python3:host lib32-util-linux\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory glib)/patches\"\nPKG_LONGDESC=\"A library which includes support routines for C such as lists, trees, hashes, memory allocation.\"\nPKG_TOOLCHAIN=\"meson\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_MESON_OPTS_TARGET=\"-Ddefault_library=shared \\\n                       -Dinstalled_tests=false \\\n                       -Dselinux=disabled \\\n                       -Dxattr=true \\\n                       -Dgtk_doc=false \\\n                       -Dman=false \\\n                       -Ddtrace=false \\\n                       -Dsystemtap=false \\\n                       -Dbsymbolic_functions=true \\\n                       -Dforce_posix_threads=true \\\n                       -Dtests=false\"\n\nunpack() {\n  ${SCRIPTS}/get glib\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/glib/glib-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/share\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/devel/lib32-glibc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-glibc\"\nPKG_VERSION=\"$(get_pkg_version glibc)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory glibc)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.gnu.org/software/libc/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"ccache:host autotools:host lib32-linux-headers lib32-gcc:bootstrap pigz:host glibc Python3:host\" # Make sure both 64 and 32 are built\nPKG_LONGDESC=\"The Glibc package contains the main C library, for multilib ARM.\"\nGLIBC_DIRECTORY=\"$(get_pkg_directory glibc)\"\nPKG_NEED_UNPACK+=\" ${GLIBC_DIRECTORY}\"\nPKG_PATCH_DIRS+=\" ${GLIBC_DIRECTORY}/patches ${GLIBC_DIRECTORY}/patches/arm\"\nPKG_BUILD_FLAGS=\"-gold lib32\"\n\ncase \"${LINUX}\" in\n  amlogic-4.9|rk356x-4.19|OdroidM1-4.19)\n    OPT_ENABLE_KERNEL=4.9.0\n    ;;\n  gameforce-4.4|rockchip-4.4|odroid-go-a-4.4)\n    OPT_ENABLE_KERNEL=4.4.0\n    ;;\n  amlogic-5.15)\n    OPT_ENABLE_KERNEL=5.15.0\n    ;;\n  amlogic-5.4)\n    OPT_ENABLE_KERNEL=5.4.0\n    ;;\n  amlogic-3.14)\n    OPT_ENABLE_KERNEL=3.0.0\n    ;;\n  *)\n    OPT_ENABLE_KERNEL=6.1.0\n    ;;\nesac\n\nPKG_CONFIGURE_OPTS_TARGET=\"BASH_SHELL=/bin/sh \\\n                           ac_cv_path_PERL=no \\\n                           ac_cv_prog_MAKEINFO= \\\n                           --libexecdir=/usr/lib/glibc \\\n                           --cache-file=config.cache \\\n                           --disable-profile \\\n                           --disable-sanity-checks \\\n                           --enable-add-ons \\\n                           --enable-bind-now \\\n                           --with-elf \\\n                           --with-tls \\\n                           --with-__thread \\\n                           --with-binutils=${BUILD}/toolchain/bin \\\n                           --with-headers=${LIB32_SYSROOT_PREFIX}/usr/include \\\n                           --enable-kernel=${OPT_ENABLE_KERNEL} \\\n                           --without-cvs \\\n                           --without-gd \\\n                           --disable-build-nscd \\\n                           --disable-nscd \\\n                           --disable-timezone-tools\"\n\nif build_with_debug; then\n  PKG_CONFIGURE_OPTS_TARGET+=\" --enable-debug\"\nelse\n  PKG_CONFIGURE_OPTS_TARGET+=\" --disable-debug\"\nfi\n\nunpack() {\n  ${SCRIPTS}/get glibc\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/glibc/glibc-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_unpack() {\n  find \"${PKG_BUILD}\" -type f -name '*.py' -exec sed -e '1s,^#![[:space:]]*/usr/bin/python.*,#!/usr/bin/env python3,' -i {} \\;\n}\n\npre_configure_target() {\n# Filter out some problematic *FLAGS\n  export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-ffast-math||g\")\n  export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-Ofast|-O2|g\")\n  export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-O.|-O2|g\")\n\n  export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-Wunused-but-set-variable||g\")\n  export CFLAGS=\"${CFLAGS} -Wno-unused-variable\"\n\n  if [ -n \"${PROJECT_CFLAGS}\" ]; then\n    export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|${PROJECT_CFLAGS}||g\")\n  fi\n\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-ffast-math||g\")\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-Ofast|-O2|g\")\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-O.|-O2|g\")\n\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-Wl,--as-needed||\")\n\n  unset LD_LIBRARY_PATH\n\n  # set some CFLAGS we need\n  export CFLAGS=\"${CFLAGS} -g -fno-stack-protector\"\n\n  export BUILD_CC=${HOST_CC}\n  export OBJDUMP_FOR_HOST=objdump\n\n  cat >config.cache <<EOF\nlibc_cv_forced_unwind=yes\nlibc_cv_c_cleanup=yes\nlibc_cv_ssp=no\nlibc_cv_ssp_strong=no\nlibc_cv_slibdir=/usr/lib\nEOF\n\n  cat >configparms <<EOF\nlibdir=/usr/lib\nslibdir=/usr/lib\nsbindir=/usr/bin\nrootsbindir=/usr/bin\nbuild-programs=no\nEOF\n\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/etc\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/lib/audit\n  safe_remove ${INSTALL}/usr/lib/*.o\n  safe_remove ${INSTALL}/usr/share\n  safe_remove ${INSTALL}/var\n  mkdir -p \"${INSTALL}/etc/ld.so.conf.d\"\n    echo \"/usr/lib32\" > \"${INSTALL}/etc/ld.so.conf.d/lib32-glibc.conf\"\n    # printf \"/emuelec/lib32\\n/emuelec/lib\\n\" > \"${INSTALL}/etc/ld.so.conf.d/emuelec.conf\"\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/devel/lib32-gmp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-gmp\"\nPKG_VERSION=\"$(get_pkg_version gmp)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory gmp)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"LGPLv3+\"\nPKG_SITE=\"http://gmplib.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory gmp)/patches\"\nPKG_LONGDESC=\"A library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers.\"\nPKG_BUILD_FLAGS=\"lib32 +pic:host\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--enable-cxx --enable-static --disable-shared\"\n\nunpack() {\n  ${SCRIPTS}/get gmp\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/gmp/gmp-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npre_configure_host() {\n  export CPPFLAGS=\"${CPPFLAGS} -fexceptions\"\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/devel/lib32-libcap/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2010-2011 Roman Weber (roman@openelec.tv)\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libcap\"\nPKG_VERSION=\"$(get_pkg_version libcap)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libcap)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://git.kernel.org/pub/scm/libs/libcap/libcap.git/log/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libcap)/patches\"\nPKG_LONGDESC=\"A library for getting and setting POSIX.1e capabilities.\"\nPKG_BUILD_FLAGS=\"+pic lib32\"\n\nunpack() {\n  ${SCRIPTS}/get libcap\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libcap/libcap-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_unpack() {\n  mkdir -p ${PKG_BUILD}/.${LIB32_TARGET_NAME}\n  cp -r ${PKG_BUILD}/* ${PKG_BUILD}/.${LIB32_TARGET_NAME}\n}\n\nmake_target() {\n  cd ${PKG_BUILD}/.${TARGET_NAME}\n  make CC=${CC} \\\n       AR=${AR} \\\n       RANLIB=${RANLIB} \\\n       CFLAGS=\"${TARGET_CFLAGS}\" \\\n       BUILD_CC=${HOST_CC} \\\n       BUILD_CFLAGS=\"${HOST_CFLAGS} -I${PKG_BUILD}/libcap/include\" \\\n       PAM_CAP=no \\\n       lib=/lib \\\n       USE_GPERF=no \\\n       -C libcap libcap.pc libcap.a\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n    cp libcap/libcap.a ${SYSROOT_PREFIX}/usr/lib\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n    cp libcap/libcap.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/sys\n    cp libcap/include/sys/capability.h ${SYSROOT_PREFIX}/usr/include/sys\n}\n"
  },
  {
    "path": "packages/lib32/devel/lib32-libffi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libffi\"\nPKG_VERSION=\"$(get_pkg_version libffi)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libffi)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://sourceware.org/${PKG_NAME}/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libffi)/patches\"\nPKG_LONGDESC=\"Foreign Function Interface Library.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-debug \\\n                           --enable-static --disable-shared \\\n                           --with-pic \\\n                           --enable-structs \\\n                           --enable-raw-api \\\n                           --disable-purify-safety \\\n                           --with-gnu-ld\"\n\nunpack() {\n  ${SCRIPTS}/get libffi\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libffi/libffi-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/devel/lib32-libpcap/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2025-present EmuELEC (https://github.com/EmuELEC)\n\nPKG_NAME=\"lib32-libpcap\"\nPKG_VERSION=\"$(get_pkg_version libpcap)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libpcap)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://git.kernel.org/pub/scm/libs/libpcap/libpcap.git/log/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libpcap)/patches\"\nPKG_LONGDESC=\"A library for getting and setting POSIX.1e capabilities.\"\nPKG_BUILD_FLAGS=\"+pic lib32\"\nPKG_TOOLCHAIN=\"configure\"\n\nunpack() {\n  ${SCRIPTS}/get libpcap\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libpcap/libpcap-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npost_unpack() {\n  mkdir -p ${PKG_BUILD}/.${LIB32_TARGET_NAME}\n  cp -r ${PKG_BUILD}/* ${PKG_BUILD}/.${LIB32_TARGET_NAME}\n}\n\nPKG_CONFIGURE_OPTS_TARGET=\"LIBS=-lpthread \\\n                           ac_cv_header_libusb_1_0_libusb_h=no \\\n                           --disable-shared \\\n                           --with-pcap=linux \\\n                           --disable-bluetooth \\\n                           --disable-can \\\n                           --without-libnl \\\n                           --disable-dbus \\\n                           --disable-canusb\"\n      \npre_configure_target() {\n# When cross-compiling, configure can't set linux version\n# forcing it\n  sed -i -e 's/ac_cv_linux_vers=unknown/ac_cv_linux_vers=2/' ../configure\n}\n\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/lib32/devel/lib32-libtool/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libtool\"\nPKG_VERSION=\"$(get_pkg_version libtool)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libtool)\"\nPKG_SHA256=\"e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.gnu.org/software/libtool/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libtool)/patches\"\nPKG_LONGDESC=\"A generic library support script.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"lib32\"\n\n\nunpack() {\n  ${SCRIPTS}/get libtool\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libtool/libtool-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\nmake_target() {\n  : # Does not work!\n}\n\nmakeinstall_target() {\n  : # Does not work!\n}\n\npost_makeinstall_target() {\n  :\n  # rm -rf ${INSTALL}/usr/bin\n  # rm -rf ${INSTALL}/usr/share\n}\n"
  },
  {
    "path": "packages/lib32/devel/lib32-linux-headers/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-linux-headers\"\nPKG_VERSION=\"$(get_pkg_version linux)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory linux)\"\nPKG_ARCH=\"aarch64\"\nPKG_URL=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kernel.org\"\nPKG_DEPENDS_TARGET=\"ccache:host rsync:host openssl:host linux:host\"\nPKG_DEPENDS_UNPACK=\"linux\"\nPKG_LONGDESC=\"This package contains Linux headers.\"\n# PKG_BUILD_FLAGS=\"lib32\"\nPKG_TOOLCHAIN=\"manual\"\n\n# unpack() {\n#   ${SCRIPTS}/get linux\n#   mkdir -p ${PKG_BUILD}\n#   if [ \"${LINUX}\" = \"default\" ]; then\n#     tar --strip-components=1 -xf ${SOURCES}/linux/linux-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}  \n#   else\n#     tar --strip-components=1 -xf ${SOURCES}/linux/linux-${LINUX}-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n#   fi\n# }\n\n# make_target() {\n#   :\n# }\n\nmakeinstall_target() {\n  pushd \"$(get_build_dir linux)\" &>/dev/null\n  # local TARGET_KERNEL_PATCH_ARCH=aarch64\n  make \\\n    ARCH=arm \\\n    HOSTCC=\"${TOOLCHAIN}/bin/host-gcc\" \\\n    HOSTCXX=\"${TOOLCHAIN}/bin/host-g++\" \\\n    HOSTCFLAGS=\"${HOST_CFLAGS}\" \\\n    HOSTCXXFLAGS=\"${HOST_CXXFLAGS}\" \\\n    HOSTLDFLAGS=\"${HOST_LDFLAGS}\" \\\n    INSTALL_HDR_PATH=${PKG_BUILD} \\\n    headers_install\n  mkdir -p ${LIB32_SYSROOT_PREFIX}/usr/include\n    cp -R ${PKG_BUILD}/include/* ${LIB32_SYSROOT_PREFIX}/usr/include\n  popd &>/dev/null\n}\n"
  },
  {
    "path": "packages/lib32/devel/lib32-pcre/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-pcre\"\nPKG_VERSION=\"$(get_pkg_version pcre)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory pcre)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.pcre.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain pcre:host\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory pcre)/patches\"\nPKG_LONGDESC=\"A set of functions that implement regular expression pattern matching.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"lib32 +pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n             --enable-utf8 \\\n             --enable-pcre16 \\\n             --enable-unicode-properties \\\n             --with-gnu-ld\"\n\nunpack() {\n  ${SCRIPTS}/get pcre\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/pcre/pcre-${PKG_VERSION}.tar.bz2 -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n  # rm -rf ${INSTALL}/usr/bin\n  # cp ${PKG_NAME}-config ${TOOLCHAIN}/bin\n  # sed -e \"s:\\(['= ]\\)/usr:\\\\1${PKG_ORIG_SYSROOT_PREFIX}/usr:g\" -i ${TOOLCHAIN}/bin/${PKG_NAME}-config\n  # chmod +x ${TOOLCHAIN}/bin/${PKG_NAME}-config\n}\n"
  },
  {
    "path": "packages/lib32/devel/lib32-pcre2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-pcre2\"\nPKG_VERSION=\"$(get_pkg_version pcre2)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory pcre2)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.pcre.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain pcre2:host\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory pcre2)/patches\"\nPKG_LONGDESC=\"A set of functions that implement regular expression pattern matching.\"\nPKG_TOOLCHAIN=\"cmake\"\nPKG_BUILD_FLAGS=\"lib32 +pic\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_SHARED_LIBS=OFF \\\n                       -DPCRE2_BUILD_PCRE2_16=ON \\\n                       -DPCRE2_SUPPORT_LIBREADLINE=OFF \\\n                       -DPCRE2_STATIC_PIC=ON\"\nunpack() {\n  ${SCRIPTS}/get pcre2\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/pcre2/pcre2-${PKG_VERSION}.tar.bz2 -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n  # rm -rf ${INSTALL}/usr/bin\n  # cp ${PKG_NAME}-config ${TOOLCHAIN}/bin\n  # sed -e \"s:\\(['= ]\\)/usr:\\\\1${PKG_ORIG_SYSROOT_PREFIX}/usr:g\" -i ${TOOLCHAIN}/bin/${PKG_NAME}-config\n  # chmod +x ${TOOLCHAIN}/bin/${PKG_NAME}-config\n}\n"
  },
  {
    "path": "packages/lib32/emuelec/emulators/lib32-box86/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-box86\"\nPKG_VERSION=\"$(get_pkg_version box86)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory box86)\"\nPKG_ARCH=\"aarch64\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/ptitSeb/box86\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-gl4es\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory box86)/patches\"\nPKG_LONGDESC=\"Box86 - Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices\"\nPKG_TOOLCHAIN=\"cmake\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nif [ \"${PROJECT}\" = \"Amlogic-ce\" ]; then\n  if [ \"${DEVICE}\" = \"Amlogic-old\" ]; then\n    PKG_PATCH_DIRS+=\" ${PROJECT_DIR}/Amlogic-ce/devices/Amlogic-old/patches/box86\"\n  fi\n  PKG_CMAKE_OPTS_TARGET=\" -DRK3399=ON -DCMAKE_BUILD_TYPE=Release\"\nelse\n  PKG_CMAKE_OPTS_TARGET=\" -DGOA_CLONE=ON -DCMAKE_BUILD_TYPE=Release\"\nfi\n\nunpack() {\n  ${SCRIPTS}/get box86\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/box86/box86-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/config/emuelec/bin/box86/lib\n  cp ${PKG_BUILD}/x86lib/* ${INSTALL}/usr/config/emuelec/bin/box86/lib\n  cp ${PKG_BUILD}/.${TARGET_NAME}/box86 ${INSTALL}/usr/config/emuelec/bin/box86/\n  \n  mkdir -p ${INSTALL}/etc/binfmt.d\n  ln -sf /emuelec/configs/box86.conf ${INSTALL}/etc/binfmt.d/box86.conf\n}\n"
  },
  {
    "path": "packages/lib32/emuelec/emulators/lib32-droidports/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-droidports\"\nPKG_VERSION=\"$(get_pkg_version droidports)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory droidports)\"\nPKG_ARCH=\"aarch64\"\nPKG_SITE=\"https://github.com/JohnnyonFlame/droidports\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-SDL2 lib32-SDL2_image lib32-openal-soft lib32-bzip2 lib32-libzip lib32-libpng\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory droidports)/patches\" \nPKG_LONGDESC=\"A repository for experimenting with elf loading and in-place patching of android native libraries on non-android operating systems.\"\nPKG_TOOLCHAIN=\"cmake\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CMAKE_OPTS_TARGET=\" -DCMAKE_BUILD_TYPE=Release -DPLATFORM=linux -DPORT=gmloader -DUSE_BUILTIN_FREETYPE=ON\"\n\nunpack() {\n  ${SCRIPTS}/get droidports\n  mkdir -p ${PKG_BUILD}\n  tar cf - -C ${SOURCES}/droidports/droidports-${PKG_VERSION} ${PKG_TAR_COPY_OPTS} . | tar xf - -C ${PKG_BUILD}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp ${PKG_BUILD}/.${TARGET_NAME}/gmloader ${INSTALL}/usr/bin\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/gmloader\n  cp $(get_pkg_directory droidports)/config/* ${INSTALL}/usr/config/emuelec/configs/gmloader\n  cp $(get_pkg_directory droidports)/scripts/* ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/lib32/emuelec/libretro/lib32-desmume/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-desmume\"\nPKG_VERSION=\"$(get_pkg_version desmume)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory desmume)\"\nPKG_ARCH=\"aarch64\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/desmume\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-alsa-lib lib32-libpcap\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory desmume)/patches\"\nPKG_SHORTDESC=\"ARM optimized PCSX fork\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"lib32 +speed -gold\"\n\nunpack() {\n  ${SCRIPTS}/get desmume\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/desmume/desmume-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\nmake_target() {\n  cd ${PKG_BUILD}/desmume/src/frontend/libretro\n\tmake CC=${CC} platform=classic_armv7_a7\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/desmume/src/frontend/libretro/desmume_libretro.so ${INSTALL}/usr/lib/libretro/desmume_32b_libretro.so\n}\n"
  },
  {
    "path": "packages/lib32/emuelec/libretro/lib32-flycast/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-flycast\"\nPKG_VERSION=\"$(get_pkg_version flycast)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory flycast)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/flyinghead/flycast\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-${OPENGLES}\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory flycast)/patches\" \nPKG_SHORTDESC=\"Flycast is a multiplatform Sega Dreamcast emulator\"\nPKG_BUILD_FLAGS=\"lib32 -lto\"\nPKG_TOOLCHAIN=\"cmake\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DLIBRETRO=ON \\\n                        -DUSE_OPENMP=OFF \\ \n                        -DCMAKE_BUILD_TYPE=Release \\\n                        -DUSE_GLES2=OFF \\\n                        -DUSE_GLES=ON \\\n                        -DUSE_VULKAN=OFF\"\n\nunpack() {\n  ${SCRIPTS}/get flycast\n  mkdir -p ${PKG_BUILD}\n  tar cf - -C ${SOURCES}/flycast/flycast-${PKG_VERSION} ${PKG_TAR_COPY_OPTS} . | tar xf - -C ${PKG_BUILD}\n}\n\npre_make_target() {\n  find ${PKG_BUILD} -name flags.make -exec sed -i \"s:isystem :I:g\" \\{} \\;\n  find ${PKG_BUILD} -name build.ninja -exec sed -i \"s:isystem :I:g\" \\{} \\;\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp -va flycast_libretro.so ${INSTALL}/usr/lib/libretro/flycast_32b_libretro.so\n}\n"
  },
  {
    "path": "packages/lib32/emuelec/libretro/lib32-mupen64plus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-mupen64plus\"\nPKG_VERSION=\"$(get_pkg_version mupen64plus)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory mupen64plus)\"\nPKG_ARCH=\"aarch64\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/mupen64plus-libretro\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain nasm:host lib32-${OPENGLES}\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory mupen64plus)/patches\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"mupen64plus + RSP-HLE + GLideN64 + libretro\"\nPKG_LONGDESC=\"mupen64plus + RSP-HLE + GLideN64 + libretro\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"lib32 -lto\"\n\nif [ \"${PROJECT}\" = \"Amlogic-ce\" ]; then\n  PKG_MAKE_OPTS_TARGET=\"platform=odroid BOARD=c2\"\nelif [[ \"${DEVICE}\" =~ ^(OdroidGoAdvance|GameForce|RK356x|OdroidM1)$ ]]; then\n  PKG_MAKE_OPTS_TARGET=\"platform=unix GLES=1 FORCE_GLES=1 HAVE_NEON=1 WITH_DYNAREC=arm\"\nfi\n\nunpack() {\n  ${SCRIPTS}/get mupen64plus\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/mupen64plus/mupen64plus-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npre_configure_target() {\n  CFLAGS+=\"-DLINUX -DEGL_API_FB -fcommon\"\n  CPPFLAGS+=\"-DLINUX -DEGL_API_FB\"\n  \n  sed -i \"s|BOARD :=.*|BOARD = N2|g\" Makefile\n  sed -i \"s|odroid64|emuelec64|g\" Makefile\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mupen64plus_libretro.so ${INSTALL}/usr/lib/libretro/mupen64plus_32b_libretro.so\n}\n"
  },
  {
    "path": "packages/lib32/emuelec/libretro/lib32-parallel-n64/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-parallel-n64\"\nPKG_VERSION=\"$(get_pkg_version parallel-n64)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory parallel-n64)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/parallel-n64\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-${OPENGLES}\"\nP64_DIRECTORY=\"$(get_pkg_directory parallel-n64)\"\nPKG_PATCH_DIRS+=\" ${P64_DIRECTORY}/patches ${P64_DIRECTORY}/patches/arm ${P64_DIRECTORY}/patches/emuelec-arm32\"\nPKG_LONGDESC=\"Optimized/rewritten Nintendo 64 emulator made specifically for Libretro. Originally based on Mupen64 Plus.\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"lib32 -lto\"\n\ncase ${DEVICE} in \n  OdroidGoAdvance|GameForce)\n    PKG_MAKE_OPTS_TARGET=\"platform=Odroidgoa\"\n  ;;\n  RK356x|OdroidM1)\n    PKG_MAKE_OPTS_TARGET=\"platform=Odroidgoa-RK356x\"\n  ;;\n  *)\n    PKG_MAKE_OPTS_TARGET=\"platform=${DEVICE}\"\n  ;;\nesac\n\nunpack() {\n  ${SCRIPTS}/get parallel-n64\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/parallel-n64/parallel-n64-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp parallel_n64_libretro.so ${INSTALL}/usr/lib/libretro/parallel_n64_32b_libretro.so\n}\n"
  },
  {
    "path": "packages/lib32/emuelec/libretro/lib32-pcsx_rearmed/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-pcsx_rearmed\"\nPKG_VERSION=\"$(get_pkg_version pcsx_rearmed)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory pcsx_rearmed)\"\nPKG_ARCH=\"aarch64\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/pcsx_rearmed\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-alsa-lib\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory pcsx_rearmed)/patches\"\nPKG_SHORTDESC=\"ARM optimized PCSX fork\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"lib32 +speed -gold\"\n\nunpack() {\n  ${SCRIPTS}/get pcsx_rearmed\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/pcsx_rearmed/pcsx_rearmed-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\nmake_target() {\n  cd ${PKG_BUILD}\n  export ALLOW_LIGHTREC_ON_ARM=1\n  if [ \"${DEVICE}\" = \"Amlogic-old\" ]; then\n    make -f Makefile.libretro GIT_VERSION=${PKG_VERSION} platform=rpi3\n  else\n    make -f Makefile.libretro GIT_VERSION=${PKG_VERSION} platform=rpi4\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp pcsx_rearmed_libretro.so ${INSTALL}/usr/lib/libretro/pcsx_rearmed_32b_libretro.so\n}\n"
  },
  {
    "path": "packages/lib32/emuelec/libretro/lib32-retroarch/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-retroarch\"\nPKG_VERSION=\"$(get_pkg_version retroarch)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory retroarch)\"\nPKG_ARCH=\"aarch64\"\nPKG_SITE=\"https://github.com/libretro/RetroArch\"\nPKG_URL=\"\"\nPKG_LICENSE=\"GPLv3\"\n#PKG_DEPENDS_TARGET=\"retroarch lib32-zlib lib32-${OPENGLES}\"\nPKG_DEPENDS_TARGET=\"retroarch lib32-toolchain lib32-SDL2 lib32-alsa-lib lib32-openssl lib32-freetype lib32-zlib lib32-ffmpeg lib32-libass lib32-${OPENGLES}\"\n# samba avahi nss-mdns  openal-soft\nPKG_LONGDESC=\"Reference frontend for the libretro API.\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nRA_DIRECTORY=\"$(get_pkg_directory retroarch)\"\nPKG_PATCH_DIRS+=\" ${RA_DIRECTORY}/patches\" \n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-qt \\\n                           --enable-alsa \\\n                           --enable-udev \\\n                           --disable-opengl1 \\\n                           --disable-opengl \\\n                           --enable-egl \\\n                           --enable-opengles \\\n                           --disable-wayland \\\n                           --disable-x11 \\\n                           --enable-zlib \\\n                           --enable-freetype \\\n                           --disable-discord \\\n                           --disable-vg \\\n                           --disable-sdl \\\n                           --enable-sdl2 \\\n                           --enable-ffmpeg \\\n                           --enable-neon\"\n\nif [ \"${PROJECT}\" = \"Amlogic-ce\" ]; then\n  PKG_PATCH_DIRS+=\" ${RA_DIRECTORY}/patches/Amlogic\"\n  PKG_CONFIGURE_OPTS_TARGET+=\" --disable-kms \\\n                           --enable-mali_fbdev\"\nelif [[ \"${DEVICE}\" =~ ^(OdroidGoAdvance|GameForce|RK356x|OdroidM1)$ ]]; then\n  PKG_RKMISC=\"yes\"\n  PKG_DEPENDS_TARGET+=\" lib32-libdrm lib32-librga\"\n  PKG_CONFIGURE_OPTS_TARGET+=\" --enable-opengles3 \\\n                           --enable-opengles3_2 \\\n                           --enable-kms \\\n                           --disable-mali_fbdev\"\n  if [ \"${DEVICE}\" = \"OdroidGoAdvance\" ]; then\n    PKG_PATCH_DIRS+=\" ${RA_DIRECTORY}/patches/OdroidGoAdvance\"\n    PKG_CONFIGURE_OPTS_TARGET+=\" --enable-odroidgo2\"\n  elif [ \"${DEVICE}\" = \"GameForce\" ]; then\n    PKG_PATCH_DIRS+=\" ${RA_DIRECTORY}/patches/OdroidGoAdvance\"\n  fi\nelse\n  echo \"${PKG_NAME}: Unsupported devices ${DEVICE} when only AmlNG, AmlOld, OGA, GF, RK356X, M1 is supported\" 1>&2\n  false\nfi\n\nif [ \"${PULSEAUDIO_SUPPORT}\" = yes ]; then\n  PKG_DEPENDS_TARGET+=\" lib32-libpulse\"\nfi\n\nunpack() {\n  ${SCRIPTS}/get retroarch\n  mkdir -p ${PKG_BUILD}\n  tar cf - -C ${SOURCES}/retroarch/retroarch-${PKG_VERSION} ${PKG_TAR_COPY_OPTS} . | tar xf - -C ${PKG_BUILD}\n}\n\npre_configure_target() {\n# Retroarch does not like -O3 for CHD loading with cheevos\n  export CFLAGS=\"${CFLAGS} -O3 -fno-tree-vectorize\"\n  TARGET_CONFIGURE_OPTS=\"\"\n  cd ${PKG_BUILD}\n}\n\nmake_target() {\n\tmake HAVE_UPDATE_ASSETS=1 HAVE_LIBRETRODB=1 HAVE_BLUETOOTH=1 HAVE_NETWORKING=1 HAVE_LAKKA=1 HAVE_ZARCH=1 HAVE_QT=0 HAVE_LANGEXTRA=1 HAVE_LAKKA_PROJECT=0 HAVE_LAKKA_SERVER=0\n  [ $? -eq 0 ] && echo \"(retroarch ok)\" || { echo \"(retroarch failed)\" ; exit 1 ; }\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  #patchelf --set-interpreter /usr/lib32/ld-linux-armhf.so.3 ${PKG_BUILD}/retroarch\n  cp ${PKG_BUILD}/retroarch ${INSTALL}/usr/bin/retroarch32\n}\n"
  },
  {
    "path": "packages/lib32/emuelec/libretro/lib32-retrorun/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-retrorun\"\nPKG_VERSION=\"$(get_pkg_version retrorun)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory retrorun)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/navy1978/retrorun-go2\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-libgo2 lib32-libdrm linux:host\"\nPKG_DEPENDS_UNPACK=\"linux\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory retrorun)/patches\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_MAKE_OPTS_TARGET=\"config=release ARCH=\" \n\nunpack() {\n  ${SCRIPTS}/get retrorun\n  mkdir -p ${PKG_BUILD}\n  tar cf - -C ${SOURCES}/retrorun/retrorun-${PKG_VERSION} ${PKG_TAR_COPY_OPTS} . | tar xf - -C ${PKG_BUILD}\n}\n\npre_configure_target() {\n  local TARGET_KERNEL_PATCH_ARCH=aarch64\n  CFLAGS+=\" -I$(get_build_dir lib32-libdrm)/include/drm\"\n  CFLAGS+=\" -I$(get_build_dir linux)/include/uapi\"\n  CFLAGS+=\" -I$(get_build_dir linux)/tools/include\"\n  sed -i \"s|/storage/.config/distribution/|/emuelec/|g\" ${PKG_BUILD}/src/main.cpp\n  safe_remove ${PKG_BUILD}/retrorun\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp -va retrorun ${INSTALL}/usr/bin/retrorun32\n}\n"
  },
  {
    "path": "packages/lib32/emuelec/libretro/lib32-uae4arm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-uae4arm\"\nPKG_VERSION=\"$(get_pkg_version uae4arm)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory uae4arm)\"\nPKG_ARCH=\"aarch64\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libretro/uae4arm-libretro\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory uae4arm)/patches\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of uae4arm for libretro (rpi/android)\"\nPKG_LONGDESC=\"Port of uae4arm for libretro (rpi/android) \"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\nPKG_BUILD_FLAGS=\"lib32 -lto\"\n\nunpack() {\n  ${SCRIPTS}/get uae4arm\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/uae4arm/uae4arm-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\nmake_target() {\n  CFLAGS=\"${CFLAGS} -DARM -marm\"\n  if [[ \"${LIB32_TARGET_FPU}\" =~ \"neon\" ]]; then\n    CFLAGS=\"-D__NEON_OPT\"\n  fi\n  make HAVE_NEON=1 USE_PICASSO96=1\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp uae4arm_libretro.so ${INSTALL}/usr/lib/libretro/uae4arm_32b_libretro.so\n}\n"
  },
  {
    "path": "packages/lib32/emuelec/ports/lib32-bennugd-monolithic/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-bennugd-monolithic\"\nPKG_VERSION=\"$(get_pkg_version bennugd-monolithic)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory bennugd-monolithic)\"\nPKG_ARCH=\"aarch64\"\nPKG_SITE=\"https://github.com/christianhaitian/bennugd-monolithic\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-libvorbisidec lib32-SDL2 lib32-SDL2_mixer lib32-libpng lib32-tre\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory bennugd-monolithic)/patches\" \nPKG_SHORTDESC=\"Use for executing bennugd games like Streets of Rage Remake \"\nPKG_TOOLCHAIN=\"cmake-make\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nunpack() {\n  ${SCRIPTS}/get bennugd-monolithic\n  mkdir -p ${PKG_BUILD}\n  tar cf - -C ${SOURCES}/bennugd-monolithic/bennugd-monolithic-${PKG_VERSION} ${PKG_TAR_COPY_OPTS} . | tar xf - -C ${PKG_BUILD}\n}\n\npre_configure_target() {\n  chainfile=\"cmake-${TARGET_NAME}.conf\"\n\n  PKG_CMAKE_SCRIPT=\"${PKG_BUILD}/projects/cmake/bgdc/CMakeLists.txt\"\n  cd ${PKG_BUILD}/projects/cmake/bgdc/\n  cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN}/etc/${chainfile} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=MinSizeRel ${PKG_CMAKE_SCRIPT}\n  make\n\n  PKG_CMAKE_SCRIPT=\"${PKG_BUILD}/projects/cmake/bgdi/CMakeLists.txt\"\n  cd ${PKG_BUILD}/projects/cmake/bgdi/\n  cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN}/etc/${chainfile} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=MinSizeRel ${PKG_CMAKE_SCRIPT}\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp ${PKG_BUILD}/projects/cmake/bgdi/bgdi ${INSTALL}/usr/bin\n    cp ${PKG_BUILD}/projects/cmake/bgdc/bgdc ${INSTALL}/usr/bin\n} \n"
  },
  {
    "path": "packages/lib32/graphics/lib32-SDL2_image/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 0riginally created by Escalade (https://github.com/escalade)\n# Copyright (C) 2018-2022 5schatten (https://github.com/5schatten)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-SDL2_image\"\nPKG_VERSION=\"$(get_pkg_version SDL2_image)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory SDL2_image)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.libsdl.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-SDL2\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory SDL2_image)/patches\"\nPKG_LONGDESC=\"SDL_image is an image file loading library. \"\nPKG_BUILD_FLAGS=\"lib32\"\n\nunpack() {\n  ${SCRIPTS}/get SDL2_image\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/SDL2_image/SDL2_image-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/graphics/lib32-cairo/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-cairo\"\nPKG_VERSION=\"$(get_pkg_version cairo)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory cairo)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"http://cairographics.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-zlib lib32-freetype lib32-fontconfig lib32-glib lib32-libpng lib32-pixman lib32-${OPENGLES}\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory cairo)/patches\"\nPKG_LONGDESC=\"Cairo is a vector graphics library with cross-device output support.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-silent-rules \\\n                            --enable-shared \\\n                            --disable-static \\\n                            --disable-gtk-doc \\\n                            --enable-largefile \\\n                            --enable-atomic \\\n                            --disable-gcov \\\n                            --disable-valgrind \\\n                            --disable-xcb \\\n                            --disable-xlib-xcb \\\n                            --disable-xcb-shm \\\n                            --disable-qt \\\n                            --disable-quartz \\\n                            --disable-quartz-font \\\n                            --disable-quartz-image \\\n                            --disable-win32 \\\n                            --disable-win32-font \\\n                            --disable-os2 \\\n                            --disable-beos \\\n                            --disable-cogl \\\n                            --disable-drm \\\n                            --disable-gallium \\\n                            --enable-png \\\n                            --disable-directfb \\\n                            --disable-vg \\\n                            --disable-wgl \\\n                            --disable-script \\\n                            --enable-ft \\\n                            --enable-fc \\\n                            --enable-ps \\\n                            --enable-pdf \\\n                            --enable-svg \\\n                            --disable-test-surfaces \\\n                            --disable-tee \\\n                            --disable-xml \\\n                            --enable-pthread \\\n                            --enable-gobject=yes \\\n                            --disable-full-testing \\\n                            --disable-rpath \\\n                            --disable-trace \\\n                            --enable-interpreter \\\n                            --disable-symbol-lookup \\\n                            --enable-some-floating-point \\\n                            --with-gnu-ld \\\n                            --disable-xlib \\\n                            --disable-xlib-xrender \\\n                            --without-x \\\n                            --disable-gl \\\n                            --disable-glx \\\n                            --enable-glesv2 \\\n                            --enable-egl\"\n\nunpack() {\n  ${SCRIPTS}/get cairo\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/cairo/cairo-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/graphics/lib32-gl4es/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-gl4es\"\nPKG_VERSION=\"$(get_pkg_version gl4es)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory gl4es)\"\nPKG_ARCH=\"aarch64\"\nPKG_SITE=\"https://github.com/JohnnyonFlame/gl4es\"\nPKG_LICENSE=\"GPL\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-${OPENGLES}\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory gl4es)/patches\"\nPKG_LONGDESC=\" GL4ES is a OpenGL 2.1/1.5 to GL ES 2.0/1.1 translation library, with support for Pandora, ODroid, OrangePI, CHIP, Raspberry PI, Android, Emscripten and AmigaOS4. \"\nPKG_TOOLCHAIN=\"cmake-make\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nif [ \"${PROJECT}\" = \"Amlogic-ce\" ]; then\n  PKG_CMAKE_OPTS_TARGET=\"-DNOX11=1 -DODROID=1 -DGBM=OFF -DCMAKE_BUILD_TYPE=Release\"\nelse\n  PKG_CMAKE_OPTS_TARGET=\"-DNOX11=1 -DODROID=1 -DGBM=ON -DCMAKE_BUILD_TYPE=Release\"\nfi\n\nunpack() {\n  ${SCRIPTS}/get gl4es\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/gl4es/gl4es-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\nmakeinstall_target(){\n  mkdir -p ${INSTALL}/usr/lib32\n    cp ${PKG_BUILD}/lib/libGL.so.1 ${INSTALL}/usr/lib32/\n    ln -sf libGL.so.1 ${INSTALL}/usr/lib32/libGL.so\n}\n"
  },
  {
    "path": "packages/lib32/graphics/lib32-harfbuzz/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-harfbuzz\"\nPKG_VERSION=\"$(get_pkg_version harfbuzz)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory harfbuzz)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.freedesktop.org/wiki/Software/HarfBuzz\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-cairo lib32-freetype lib32-glib\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory harfbuzz)/patches\"\nPKG_LONGDESC=\"HarfBuzz is an OpenType text shaping engine.\"\nPKG_TOOLCHAIN=\"meson\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_MESON_OPTS_TARGET=\"-Dbenchmark=disabled \\\n                       -Dcairo=enabled \\\n                       -Ddocs=disabled \\\n                       -Dfreetype=enabled \\\n                       -Dglib=enabled \\\n                       -Dgobject=disabled \\\n                       -Dgraphite=disabled \\\n                       -Dicu=disabled \\\n                       -Dtests=disabled\"\n\nunpack() {\n  ${SCRIPTS}/get harfbuzz\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/harfbuzz/harfbuzz-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/graphics/lib32-libdrm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libdrm\"\nPKG_VERSION=\"$(get_pkg_version libdrm)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libdrm)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://dri.freedesktop.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-libpciaccess\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libdrm)/patches\"\nPKG_LONGDESC=\"The userspace interface library to kernel DRM services.\"\nPKG_TOOLCHAIN=\"meson\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nget_graphicdrivers\n\nPKG_MESON_OPTS_TARGET=\"-Dnouveau=disabled \\\n                       -Domap=disabled \\\n                       -Dexynos=disabled \\\n                       -Dtegra=disabled \\\n                       -Dcairo-tests=disabled \\\n                       -Dman-pages=disabled \\\n                       -Dvalgrind=disabled \\\n                       -Dfreedreno-kgsl=false \\\n                       -Dinstall-test-programs=true \\\n                       -Dudev=false\"\n\nunpack() {\n  ${SCRIPTS}/get libdrm\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libdrm/libdrm-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  # We don't need any binary, since we only want lib32\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/share\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/graphics/lib32-libpng/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libpng\"\nPKG_VERSION=\"$(get_pkg_version libpng)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libpng)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"LibPNG2\"\nPKG_SITE=\"http://www.libpng.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-zlib\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libpng)/patches\"\nPKG_LONGDESC=\"An extensible file format for the lossless, portable, well-compressed storage of raster images.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"lib32 +pic +pic:host\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_lib_z_zlibVersion=yes \\\n                           --enable-static \\\n                           --enable-shared\"\n\nunpack() {\n  ${SCRIPTS}/get libpng\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libpng/libpng-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npre_configure_target() {\n  export CPPFLAGS=\"${CPPFLAGS} -I${SYSROOT_PREFIX}/usr/include\"\n}\n\npost_makeinstall_target() {\n  sed -e \"s:\\([\\\"'= ]\\)/usr:\\\\1${SYSROOT_PREFIX}/usr:g\" \\\n      -e \"s:libs=\\\"-lpng16\\\":libs=\\\"-lpng16 -lz\\\":g\" \\\n      -i ${SYSROOT_PREFIX}/usr/bin/libpng*-config\n\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/graphics/lib32-librga/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-librga\"\nPKG_VERSION=\"$(get_pkg_version librga)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory librga)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GNU\"\nPKG_SITE=\"https://github.com/shantigilbert/linux-rga\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-libdrm\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory librga)/patches\"\nPKG_LONGDESC=\"The RGA driver userspace\"\nPKG_TOOLCHAIN=\"auto\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nunpack() {\n  ${SCRIPTS}/get librga\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/librga/librga-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/graphics/lib32-mali-bifrost/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-mali-bifrost\"\nPKG_VERSION=\"$(get_pkg_version mali-bifrost)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory mali-bifrost)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"https://github.com/emuelec/libmali\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-libdrm\"\nPKG_LONGDESC=\"The Mali GPU library used in Rockchip Platform for Odroidgo Advance\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory mali-bifrost)/patches\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nif [[ \"${DEVICE}\" =~ ^(OdroidGoAdvance|GameForce)$ ]]; then\n  PKG_RK3326=\"yes\"\nfi\n\nunpack() {\n  ${SCRIPTS}/get mali-bifrost\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/mali-bifrost/mali-bifrost-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n  if [ \"${PKG_RK3326}\" = \"yes\" ]; then\n    unzip -o \"${SOURCES}/mali-bifrost/rk3326_r13p0_gbm_with_vulkan_and_cl.zip\" -d ${PKG_BUILD}\n  fi\n  safe_remove ${PKG_BUILD}/lib/aarch64-linux-gnu\n}\n\nmakeinstall_target() {\n  if [ \"${PKG_RK3326}\" = \"yes\" ]; then\n    local BLOB=\"libmali.so_rk3326_gbm_arm32_r13p0_with_vulkan_and_cl\"\n    local LIBDIR=${INSTALL}/usr/lib32\n  else\n    local BLOB=\"lib/arm-linux-gnueabihf/libmali-bifrost-g52-g2p0-gbm.so\"\n    local LIBDIR=${INSTALL}/usr/lib32/libmali\n    mkdir -p ${INSTALL}/etc/profile.d\n    # Add it after the existing LD_LIBRARY_PATH, to make sure /emuelec/libs are read before it\n    echo 'export LD_LIBRARY_PATH=\"${LD_LIBRARY_PATH}:/usr/lib32/libmali\"' > ${INSTALL}/etc/profile.d/99-rk-mali-workaround.conf\n  fi\n\n  mkdir -p ${LIBDIR} \\\n           ${SYSROOT_PREFIX}/usr/lib/pkgconfig \\\n           ${SYSROOT_PREFIX}/usr/lib/include/KHR\n\n  BLOB=${PKG_BUILD}/${BLOB}\n  cp ${BLOB} ${LIBDIR}/libmali.so\n  cp ${BLOB} ${SYSROOT_PREFIX}/usr/lib/libmali.so\n\n  local LINK_LIST=\"libEGL.so \\\n                   libEGL.so.1 \\\n                   libgbm.so \\\n                   libgbm.so.1 \\\n                   libGLESv2.so \\\n                   libGLESv2.so.2 \\\n                   libGLESv3.so \\\n                   libGLESv3.so.3 \\\n                   libGLESv1_CM.so.1 \\\n                   libGLES_CM.so.1 \\\n                   libmali.so.1\"\n  local LINK_NAME\n  for LINK_NAME in ${LINK_LIST}; do\n    ln -sf libmali.so ${LIBDIR}/${LINK_NAME}\n    ln -sf libmali.so ${SYSROOT_PREFIX}/usr/lib/${LINK_NAME}\n  done\n  cp -va ${PKG_BUILD}/.${TARGET_NAME}/meson-private/*.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig/\n  cp -rva ${PKG_BUILD}/include/* \\\n          ${PKG_BUILD}/include/GBM/gbm.h \\\n          ${SYSROOT_PREFIX}/usr/include/\n  cp -va ${PKG_BUILD}/include/KHR/mali_khrplatform.h ${SYSROOT_PREFIX}/usr/include/KHR/khrplatform.h\n}\n"
  },
  {
    "path": "packages/lib32/graphics/lib32-opengl-meson/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-opengl-meson\"\nPKG_VERSION=\"$(get_pkg_version opengl-meson)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory opengl-meson)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"http://openlinux.amlogic.com:8000/download/ARM/filesystem/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain opengl-meson\"\nPKG_LONGDESC=\"OpenGL ES pre-compiled libraries for Mali GPUs found in Amlogic Meson SoCs.\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory opengl-meson)/patches\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib32\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n  local DIR_MESON=\"$(get_build_dir opengl-meson)\"\n  local DIR_ARM=${DIR_MESON}/lib/eabihf\n  local SINGLE_LIBMALI='no'\n  case \"${DEVICE}\" in \n    Amlogic-ng)\n      cp -p ${DIR_ARM}/gondul/r12p0/fbdev/libMali.so ${INSTALL}/usr/lib32/libMali.gondul.so\n      cp -p ${DIR_ARM}/dvalin/r12p0/fbdev/libMali.so ${INSTALL}/usr/lib32/libMali.dvalin.so\n      cp -p ${DIR_ARM}/m450/r7p0/fbdev/libMali.so ${INSTALL}/usr/lib32/libMali.m450.so\n      cp -p ${DIR_ARM}/gondul/r12p0/fbdev/libMali.so ${SYSROOT_PREFIX}/usr/lib/\n    ;;\n    Amlogic-old)\n      cp -p ${DIR_ARM}/m450/r7p0/fbdev/libMali.so ${INSTALL}/usr/lib32/\n      cp -p ${DIR_ARM}/m450/r7p0/fbdev/libMali.so ${SYSROOT_PREFIX}/usr/lib/\n      SINGLE_LIBMALI='yes'\n    ;;\n    Amlogic-ne)\n      cp -p ${DIR_ARM}/gondul/r25p0/fbdev/libMali.so ${INSTALL}/usr/lib32/libMali.gondul.so\n      cp -p ${DIR_ARM}/dvalin/r25p0/fbdev/libMali.so ${INSTALL}/usr/lib32/libMali.dvalin.so\n      cp -p ${DIR_ARM}/gondul/r25p0/fbdev/libMali.so ${SYSROOT_PREFIX}/usr/lib/\n    ;;\n   Amlogic-no)\n      cp -p \"${DIR_ARM}/gondul/r25p0/fbdev/libMali-r1p0.so\" \"${INSTALL}/usr/lib32/libMali.gondul.so\"\n      cp -p ${DIR_ARM}/dvalin/r25p0/fbdev/libMali.so ${INSTALL}/usr/lib32/libMali.dvalin.so\n      cp -p ${DIR_ARM}/valhall/r41p0/fbdev/libMali.so ${INSTALL}/usr/lib32/libMali.valhall.so\n      cp -p ${DIR_ARM}/gondul/r25p0/fbdev/libMali.so ${SYSROOT_PREFIX}/usr/lib/\n    ;;\n    *)\n      echo \"${PKG_NAME}: Trying to install for device ${DEVICE} when only Amlogic-ng, Amlogic-no, Amlogic-old and Amlogic-ne are supported\" 1>&2\n      return 1\n    ;;\n  esac\n\n  if [[ \"${SINGLE_LIBMALI}\" == 'no' ]]; then\n    ln -sf /var/lib32/libMali.so ${INSTALL}/usr/lib32/libMali.so\n  fi\n\n  local LINK_LIST=\"libmali.so \\\n                   libmali.so.0 \\\n                   libEGL.so \\\n                   libEGL.so.1 \\\n                   libEGL.so.1.0.0 \\\n                   libGLES_CM.so.1 \\\n                   libGLESv1_CM.so \\\n                   libGLESv1_CM.so.1 \\\n                   libGLESv1_CM.so.1.0.1 \\\n                   libGLESv1_CM.so.1.1 \\\n                   libGLESv2.so \\\n                   libGLESv2.so.2 \\\n                   libGLESv2.so.2.0 \\\n                   libGLESv2.so.2.0.0 \\\n                   libGLESv3.so \\\n                   libGLESv3.so.3 \\\n                   libGLESv3.so.3.0 \\\n                   libGLESv3.so.3.0.0\"\n  local LINK_NAME\n  for LINK_NAME in ${LINK_LIST}; do\n    ln -sf libMali.so ${INSTALL}/usr/lib32/${LINK_NAME}\n    ln -sf libMali.so ${SYSROOT_PREFIX}/usr/lib/${LINK_NAME}\n  done\n\n# install headers and libraries to TOOLCHAIN\n  cp -rf ${DIR_MESON}/include/* ${SYSROOT_PREFIX}/usr/include\n  cp -rf \"$(get_build_dir opengl-meson)/lib/pkgconfig/\"* ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n  cp ${SYSROOT_PREFIX}/usr/include/EGL_platform/platform_fbdev/* ${SYSROOT_PREFIX}/usr/include/EGL\n  rm -rf ${SYSROOT_PREFIX}/usr/include/EGL_platform\n}\n"
  },
  {
    "path": "packages/lib32/lang/lib32-gcc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-gcc\"\nPKG_VERSION=\"$(get_pkg_version gcc)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory gcc)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL-2.0-or-later\"\nPKG_URL=\"\"\nPKG_DEPENDS_BOOTSTRAP=\"ccache:host autoconf:host lib32-binutils:host gmp:host mpfr:host mpc:host zstd:host\"\nPKG_DEPENDS_HOST=\"ccache:host autoconf:host lib32-binutils:host gmp:host mpfr:host mpc:host zstd:host lib32-glibc\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_LONGDESC=\"This package contains the GNU Compiler Collection for multilib ARM.\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory gcc)/patches\"\n\nGCC_COMMON_CONFIGURE_OPTS=\"--target=${LIB32_TARGET_NAME} \\\n                           --with-sysroot=${LIB32_SYSROOT_PREFIX} \\\n                           --with-gmp=${TOOLCHAIN} \\\n                           --with-mpfr=${TOOLCHAIN} \\\n                           --with-mpc=${TOOLCHAIN} \\\n                           --with-zstd=${TOOLCHAIN} \\\n                           --with-gnu-as \\\n                           --with-gnu-ld \\\n                           --enable-plugin \\\n                           --enable-lto \\\n                           --enable-gold \\\n                           --enable-ld=default \\\n                           --with-linker-hash-style=gnu \\\n                           --disable-multilib \\\n                           --disable-nls \\\n                           --enable-checking=release \\\n                           --without-ppl \\\n                           --without-cloog \\\n                           --disable-libada \\\n                           --disable-libmudflap \\\n                           --disable-libitm \\\n                           --disable-libquadmath \\\n                           --disable-libmpx \\\n                           --disable-libssp \\\n                           --enable-__cxa_atexit\"\n\nPKG_CONFIGURE_OPTS_BOOTSTRAP=\"${GCC_COMMON_CONFIGURE_OPTS} \\\n                              --enable-cloog-backend=isl \\\n                              --disable-decimal-float \\\n                              --disable-gcov \\\n                              --enable-languages=c \\\n                              --disable-libatomic \\\n                              --disable-libgomp \\\n                              --disable-libsanitizer \\\n                              --disable-shared \\\n                              --disable-threads \\\n                              --without-headers \\\n                              --with-newlib \\\n                              ${LIB32_TARGET_ARCH_GCC_OPTS}\"\n\nPKG_CONFIGURE_OPTS_HOST=\"${GCC_COMMON_CONFIGURE_OPTS} \\\n                         --enable-languages=c,c++ \\\n                         --enable-libatomic \\\n                         --enable-decimal-float \\\n                         --enable-tls \\\n                         --enable-shared \\\n                         --disable-static \\\n                         --enable-long-long \\\n                         --enable-threads=posix \\\n                         --disable-libstdcxx-pch \\\n                         --enable-libstdcxx-time \\\n                         --enable-clocale=gnu \\\n                         ${LIB32_TARGET_ARCH_GCC_OPTS}\"\n\nunpack() {\n  ${SCRIPTS}/get gcc\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/gcc/gcc-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_bootstrap() {\n  GCC_VERSION=$(${TOOLCHAIN}/bin/${LIB32_TARGET_NAME}-gcc -dumpversion)\n  DATE=\"0401$(echo ${GCC_VERSION} | sed 's/\\./0/g')\"\n  CROSS_CC=${LIB32_TARGET_PREFIX}gcc-${GCC_VERSION}\n\n  rm -f ${LIB32_TARGET_PREFIX}gcc\n\ncat > ${LIB32_TARGET_PREFIX}gcc <<EOF\n#!/bin/sh\n${TOOLCHAIN}/bin/ccache ${CROSS_CC} \"\\$@\"\nEOF\n\n  chmod +x ${LIB32_TARGET_PREFIX}gcc\n\n  # To avoid cache trashing\n  touch -c -t ${DATE} ${CROSS_CC}\n\n  # install lto plugin for binutils\n  mkdir -p ${TOOLCHAIN}/lib/bfd-plugins\n    ln -sf ../gcc/${LIB32_TARGET_NAME}/${GCC_VERSION}/liblto_plugin.so ${TOOLCHAIN}/lib/bfd-plugins\n}\n\npre_configure_host() {\n  unset CPP\n}\n\npost_make_host() {\n  # fix wrong link\n  ln -sf libgcc_s.so.1 ${LIB32_TARGET_NAME}/libgcc/libgcc_s.so\n  if [ ! \"${BUILD_WITH_DEBUG}\" = \"yes\" ]; then\n    ${LIB32_TARGET_PREFIX}strip ${LIB32_TARGET_NAME}/libgcc/libgcc_s.so*\n    ${LIB32_TARGET_PREFIX}strip ${LIB32_TARGET_NAME}/libgomp/.libs/libgomp.so*\n    ${LIB32_TARGET_PREFIX}strip ${LIB32_TARGET_NAME}/libstdc++-v3/src/.libs/libstdc++.so*\n    ${LIB32_TARGET_PREFIX}strip ${LIB32_TARGET_NAME}/libatomic/.libs/libatomic.so*\n  fi\n}\n\n\npost_makeinstall_host() {\n  GCC_VERSION=$(${LIB32_TARGET_PREFIX}gcc -dumpversion)\n  DATE=\"0501$(echo ${GCC_VERSION} | sed 's/\\./0/g')\"\n  CROSS_CC=${LIB32_TARGET_PREFIX}gcc-${GCC_VERSION}\n  CROSS_CXX=${LIB32_TARGET_PREFIX}g++-${GCC_VERSION}\n\n  rm -f ${LIB32_TARGET_PREFIX}gcc\n\ncat > ${LIB32_TARGET_PREFIX}gcc <<EOF\n#!/bin/sh\n${TOOLCHAIN}/bin/ccache ${CROSS_CC} \"\\$@\"\nEOF\n\n  chmod +x ${LIB32_TARGET_PREFIX}gcc\n\n  # To avoid cache trashing\n  touch -c -t ${DATE} ${CROSS_CC}\n\n  [ ! -f \"${CROSS_CXX}\" ] && mv ${LIB32_TARGET_PREFIX}g++ ${CROSS_CXX}\n\ncat > ${LIB32_TARGET_PREFIX}g++ <<EOF\n#!/bin/sh\n${TOOLCHAIN}/bin/ccache ${CROSS_CXX} \"\\$@\"\nEOF\n\n  chmod +x ${LIB32_TARGET_PREFIX}g++\n\n  # To avoid cache trashing\n  touch -c -t ${DATE} ${CROSS_CXX}\n\n  # install lto plugin for binutils\n  mkdir -p ${TOOLCHAIN}/lib32/bfd-plugins\n    ln -sf ../gcc/${LIB32_TARGET_NAME}/${GCC_VERSION}/liblto_plugin.so ${TOOLCHAIN}/lib/bfd-plugins\n}\n\nconfigure_target() {\n : # reuse configure_host()\n}\n\nmake_target() {\n : # reuse make_host()\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib32\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/${LIB32_TARGET_NAME}/libgcc/libgcc_s.so* ${INSTALL}/usr/lib32\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/${LIB32_TARGET_NAME}/libgomp/.libs/libgomp.so* ${INSTALL}/usr/lib32\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/${LIB32_TARGET_NAME}/libstdc++-v3/src/.libs/libstdc++.so* ${INSTALL}/usr/lib32\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/${LIB32_TARGET_NAME}/libatomic/.libs/libatomic.so* ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/multimedia/lib32-SDL2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-2022 5schatten (https://github.com/5schatten)\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-SDL2\"\nPKG_VERSION=\"$(get_pkg_version SDL2)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory SDL2)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.libsdl.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-alsa-lib lib32-systemd-libs lib32-dbus lib32-${OPENGLES} lib32-libpulse\"\nPKG_LONGDESC=\"Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware. (lib32)\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DSDL_STATIC=OFF \\\n                       -DSDL_LIBC=ON \\\n                       -DSDL_GCC_ATOMICS=ON \\\n                       -DSDL_ALTIVEC=OFF \\\n                       -DSDL_OSS=OFF \\\n                       -DSDL_ALSA=ON \\\n                       -DSDL_ALSA_SHARED=ON \\\n                       -DSDL_JACK=OFF \\\n                       -DSDL_JACK_SHARED=OFF \\\n                       -DSDL_ESD=OFF \\\n                       -DSDL_ESD_SHARED=OFF \\\n                       -DSDL_ARTS=OFF \\\n                       -DSDL_ARTS_SHARED=OFF \\\n                       -DSDL_NAS=OFF \\\n                       -DSDL_NAS_SHARED=OFF \\\n                       -DSDL_LIBSAMPLERATE=OFF \\\n                       -DSDL_LIBSAMPLERATE_SHARED=OFF \\\n                       -DSDL_SNDIO=OFF \\\n                       -DSDL_DISKAUDIO=OFF \\\n                       -DSDL_DUMMYAUDIO=OFF \\\n                       -DSDL_DUMMYVIDEO=OFF \\\n                       -DSDL_WAYLAND=OFF \\\n                       -DSDL_WAYLAND_QT_TOUCH=ON \\\n                       -DSDL_WAYLAND_SHARED=OFF \\\n                       -DSDL_COCOA=OFF \\\n                       -DSDL_DIRECTFB=OFF \\\n                       -DSDL_VIVANTE=OFF \\\n                       -DSDL_DIRECTFB_SHARED=OFF \\\n                       -DSDL_FUSIONSOUND=OFF \\\n                       -DSDL_FUSIONSOUND_SHARED=OFF \\\n                       -DSDL_PTHREADS=ON \\\n                       -DSDL_PTHREADS_SEM=ON \\\n                       -DSDL_DIRECTX=OFF \\\n                       -DSDL_CLOCK_GETTIME=OFF \\\n                       -DSDL_RPATH=OFF \\\n                       -DSDL_RENDER_D3D=OFF \\\n                       -DSDL_X11=OFF \\\n                       -DSDL_OPENGLES=ON \\\n                       -DSDL_VULKAN=OFF \\\n                       -DSDL_PULSEAUDIO=ON \\\n                       -DSDL_HIDAPI_JOYSTICK=OFF\"\n\nSDL2_DIRECTORY=\"$(get_pkg_directory SDL2)\"\nPKG_PATCH_DIRS+=\" ${SDL2_DIRECTORY}/patches\" \ncase \"${DEVICE}\" in\n  'Amlogic-ng'|'Amlogic-no'|'Amlogic-old')  # We should've used PROJECT=Amlogic-ce logically, but using these two device names here saves a comparasion (only device needs to be compared)\n    PKG_PATCH_DIRS+=\" ${SDL2_DIRECTORY}/patches/Amlogic\"\n    PKG_CMAKE_OPTS_TARGET+=\" -DSDL_MALI=ON -DSDL_KMSDRM=OFF\"\n  ;;\n  'OdroidGoAdvance'|'GameForce'|'RK356x'|'OdroidM1')\n    PKG_PATCH_DIRS+=\" ${SDL2_DIRECTORY}/patches/Rockchip\"\n    PKG_CMAKE_OPTS_TARGET+=\" -DSDL_KMSDRM=ON\"\n    PKG_DEPENDS_TARGET+=\" lib32-libdrm lib32-mali-bifrost\"\n    if [ \"${DEVICE}\" = \"OdroidGoAdvance\" ]; then\n      PKG_PATCH_DIRS+=\" ${SDL2_DIRECTORY}/patches/OdroidGoAdvance\"\n      PKG_DEPENDS_TARGET+=\" lib32-librga\"\n      # This is evil, but we save multiple comparasions\n      pre_make_host() {\n        sed -i \"s| -lrga||g\" ${PKG_BUILD}/CMakeLists.txt\n      }\n      pre_make_target() {\n        if ! `grep -rnw \"${PKG_BUILD}/CMakeLists.txt\" -e '-lrga'`; then\n          sed -i \"s|--no-undefined|--no-undefined -lrga|\" ${PKG_BUILD}/CMakeLists.txt\n        fi\n      }\n    fi\n  ;;\nesac\n\nunpack() {\n  ${SCRIPTS}/get SDL2\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/SDL2/SDL2-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  sed -e \"s:\\(['=LI]\\)/usr:\\\\1${SYSROOT_PREFIX}/usr:g\" -i ${SYSROOT_PREFIX}/usr/bin/sdl2-config\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/share\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/multimedia/lib32-ffmpeg/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-ffmpeg\"\nPKG_VERSION=\"$(get_pkg_version ffmpeg)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory ffmpeg)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"LGPLv2.1+\"\nPKG_SITE=\"https://ffmpeg.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-zlib lib32-bzip2 lib32-openssl lib32-SDL2\"\nPKG_LONGDESC=\"FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video.\"\nPKG_BUILD_FLAGS=\"lib32 -gold\"\n\nFF_DIRECTORY=\"$(get_pkg_directory ffmpeg)\"\nPKG_PATCH_DIRS+=\" ${FF_DIRECTORY}/patches \\\n                  ${FF_DIRECTORY}/patches/libreelec \\\n                  ${FF_DIRECTORY}/patches/v4l2-request \\\n                  ${FF_DIRECTORY}/patches/v4l2-drmprime\" \n\n# Dependencies\nget_graphicdrivers\n\nif [ \"${V4L2_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" lib32-libdrm\"\n  PKG_NEED_UNPACK+=\" $(get_pkg_directory lib32-libdrm)\"\n  PKG_FFMPEG_V4L2=\"--enable-v4l2_m2m --enable-libdrm\"\n\n  if [ \"${PROJECT}\" = \"Rockchip\" ]; then\n    PKG_V4L2_REQUEST=\"yes\"\n    PKG_DEPENDS_TARGET+=\" lib32-systemd-libs\"\n    PKG_NEED_UNPACK+=\" $(get_pkg_directory lib32-systemd-libs)\"\n    PKG_FFMPEG_V4L2+=\" --enable-libudev --enable-v4l2-request\"\n  else\n    PKG_V4L2_REQUEST=\"no\"\n    PKG_FFMPEG_V4L2+=\" --disable-libudev --disable-v4l2-request\"\n  fi\nelse\n  PKG_FFMPEG_V4L2=\"--disable-v4l2_m2m --disable-libudev --disable-v4l2-request\"\nfi\n\nif [ \"${DISPLAYSERVER}\" != \"x11\" ] && [ \"${PROJECT}\" != \"Amlogic-ce\" ]; then\n  PKG_DEPENDS_TARGET+=\" lib32-libdrm\"\n  PKG_NEED_UNPACK+=\" $(get_pkg_directory lib32-libdrm)\"\n  PKG_FFMPEG_LIBDRM=\" --enable-libdrm\"\nfi\n\nunpack() {\n  ${SCRIPTS}/get ffmpeg\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/ffmpeg/ffmpeg-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n  if [ ${DISTRO} == \"EmuELEC\" ]; then\n    sed -i \"s|int hide_banner = 0|int hide_banner = 1|\" ${PKG_BUILD}/fftools/cmdutils.c\n    sed -i \"s|SDL2_CONFIG=\\\"\\${cross_prefix}sdl2-config\\\"|SDL2_CONFIG=\\\"${SYSROOT_PREFIX}/usr/bin/sdl2-config\\\"|\" ${PKG_BUILD}/configure\n  fi\n}\n\nconfigure_target() {\n  ./configure --prefix=\"/usr\" \\\n              --cpu=\"${LIB32_TARGET_CPU}\" \\\n              --arch=arm \\\n              --enable-cross-compile \\\n              --cross-prefix=\"${TARGET_PREFIX}\" \\\n              --sysroot=\"${SYSROOT_PREFIX}\" \\\n              --sysinclude=\"${SYSROOT_PREFIX}/usr/include\" \\\n              --target-os=\"linux\" \\\n              --nm=\"${NM}\" \\\n              --ar=\"${AR}\" \\\n              --as=\"${CC}\" \\\n              --cc=\"${CC}\" \\\n              --ld=\"${CC}\" \\\n              --host-cc=\"${HOST_CC}\" \\\n              --host-cflags=\"${HOST_CFLAGS}\" \\\n              --host-ldflags=\"${HOST_LDFLAGS}\" \\\n              --extra-cflags=\"${CFLAGS}\" \\\n              --extra-ldflags=\"${LDFLAGS}\" \\\n              --extra-libs=\"${PKG_FFMPEG_LIBS}\" \\\n              --disable-static \\\n              --enable-shared \\\n              --enable-gpl \\\n              --enable-version3 \\\n              --enable-logging \\\n              --disable-doc \\\n              --disable-debug \\\n              --enable-stripping \\\n              --enable-pic \\\n              --pkg-config=\"${TOOLCHAIN}/bin/pkg-config\" \\\n              --enable-optimizations \\\n              --disable-extra-warnings \\\n              --enable-avdevice \\\n              --enable-avcodec \\\n              --enable-avformat \\\n              --enable-swscale \\\n              --enable-postproc \\\n              --enable-avfilter \\\n              --enable-pthreads \\\n              --enable-network \\\n              --disable-gnutls \\\n              --enable-openssl \\\n              --disable-gray \\\n              --enable-swscale-alpha \\\n              --disable-small \\\n              --enable-dct \\\n              --enable-fft \\\n              --enable-mdct \\\n              --enable-rdft \\\n              --disable-crystalhd \\\n              ${PKG_FFMPEG_V4L2} \\\n              --disable-vaapi \\\n              --disable-vdpau \\\n              ${PKG_FFMPEG_LIBDRM} \\\n              --enable-runtime-cpudetect \\\n              --disable-hardcoded-tables \\\n              --enable-encoder=ac3 \\\n              --enable-encoder=aac \\\n              --enable-encoder=wmav2 \\\n              --enable-encoder=mjpeg \\\n              --enable-encoder=png \\\n              --enable-encoder=mpeg4 \\\n              --enable-hwaccels \\\n              --enable-muxer=spdif \\\n              --enable-muxer=adts \\\n              --enable-muxer=asf \\\n              --enable-muxer=ipod \\\n              --enable-muxer=mpegts \\\n              --enable-demuxers \\\n              --enable-parsers \\\n              --enable-bsfs \\\n              --enable-protocol=http \\\n              --enable-filters \\\n              --disable-avisynth \\\n              --enable-bzlib \\\n              --disable-lzma \\\n              --disable-alsa \\\n              --disable-frei0r \\\n              --disable-libopencore-amrnb \\\n              --disable-libopencore-amrwb \\\n              --disable-libopencv \\\n              --disable-libdc1394 \\\n              --disable-libfreetype \\\n              --disable-libgsm \\\n              --disable-libmp3lame \\\n              --disable-libopenjpeg \\\n              --disable-librtmp \\\n              --disable-libdav1d \\\n              --disable-libspeex \\\n              --disable-libtheora \\\n              --disable-libvo-amrwbenc \\\n              --disable-libvorbis \\\n              --disable-libvpx \\\n              --disable-libx264 \\\n              --disable-libxavs \\\n              --disable-libxvid \\\n              --enable-zlib \\\n              --enable-asm \\\n              --disable-altivec \\\n              --enable-neon \\\n              --disable-symver\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/share\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/multimedia/lib32-libass/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libass\"\nPKG_VERSION=\"$(get_pkg_version libass)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libass)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://github.com/libass/libass\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-freetype lib32-fontconfig lib32-fribidi lib32-harfbuzz\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libass)/patches\"\nPKG_LONGDESC=\"A portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format.\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-test \\\n                           --enable-fontconfig \\\n                           --disable-silent-rules \\\n                           --with-gnu-ld\"\n\nunpack() {\n  ${SCRIPTS}/get libass\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libass/libass-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/print/lib32-freetype/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-freetype\"\nPKG_VERSION=\"$(get_pkg_version freetype)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory freetype)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://freetype.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-zlib lib32-libpng\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory freetype)/patches\"\nPKG_LONGDESC=\"The FreeType engine is a free and portable TrueType font rendering engine.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"lib32\"\n\n# package specific configure options\nPKG_CONFIGURE_OPTS_TARGET=\"LIBPNG_CFLAGS=-I${LIB32_SYSROOT_PREFIX}/usr/include \\\n                           LIBPNG_LDFLAGS=-L${LIB32_SYSROOT_PREFIX}/usr/lib \\\n                           --with-zlib\"\n\nunpack() {\n  ${SCRIPTS}/get freetype\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/freetype/freetype-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npre_configure_target() {\n  # unset LIBTOOL because freetype uses its own\n    ( cd ..\n      unset LIBTOOL\n      sh autogen.sh\n    )\n}\n\npost_makeinstall_target() {\n  sed -e \"s#prefix=/usr#prefix=${SYSROOT_PREFIX}/usr#\" -i \"${SYSROOT_PREFIX}/usr/lib/pkgconfig/freetype2.pc\"\n  cp -P \"${PKG_BUILD}/.${TARGET_NAME}/freetype-config\" \"${SYSROOT_PREFIX}/usr/bin\"\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/share\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/readme.MD",
    "content": "# EmuELEC multilib packages\n## Introduction\nThese packages and the updated EmuELEC build system provides real **aarch64** + **aarch32** multilib support to the build system and the image. It brings the ``ld.so.conf`` and ``/usr/lib32`` style multilib support to the target system just like standard Linux distros, and there's no more need to do tedious ``LD_LIBRARY_PATH`` hacks! ``ldconfig`` binary and systemd units will index the libs and make multilib applications load much faster\n\n## Inclusion in build\nTo get a multilib target image, the package ``lib32-essential`` must be added, in EmuELEC we achive this by including it in ``emuelec`` meta package's dependencies. Ideally this pacakge should be included first before other lib32 packages, but it can still work even it's added last.\n\n## Library search order\n\nOn the EmuELEC target system, the libraries will be searched in the following order:\n - Any path defined in ``LD_LIBRARY_PATH``. Most of them come from /etc/profile. Not indexed in ``ld.so.cache`` (slow)\n   - /etc/profile.d\n     - 99-emuelec.conf\n       - ``/emuelec/lib32`` => ``/storage/.config/emuelec/lib32``, writable\n       - ``/emuelec/lib`` => ``/storage/.config/emuelec/lib``, writable\n     - 99-rk-mali-workaround.conf (only on OdroidM1 and RK356x)\n       - ``/usr/lib32/libmali``, read-only\n - Any path defined in ``ld.so.conf`` and ``ld.so.conf.d/*.conf``, *.conf files indexed in alphabetical order. Indexed in ``ld.so.cache`` (fast)\n   - gcc-lib32.conf\n     - ``/usr/lib32``, read-only\n   - pulseaudio.conf\n     - ``/usr/lib32/pulseaudio``, read-only\n     - ``/usr/lib/pulseaudio``, read-only\n - Built-in path. Indexed in ``ld.so.cache`` (fast)\n   - ``/usr/lib``, read-only\n\nIf user wants to overwrite a certain library or provide additional libraries, they can achieve this in one of the following way:\n - Place it under ``/emuelec/lib32`` or ``/emuelec/lib``. **The libraries will be applied system-wide, not only for your user session(SSH/service)**\n - Place it anywhere else, and add the path to ``LD_LIBRARY_PATH``, this is suggested if the path is not indexed by ``ld.so.cache``, and you only want to use these libraries for a specific program/user session. Do note this is slow to lookup so don't add too many libraries.\n - **Do not add the paths that's already indexed by ``ld.so.cache`` to ``LD_LIBRARY_PATH``, unless you want to re-write the lookup order, as this will significantly slows down the lookup speed**\n   - Bad practice: (most paths in the following ``LD_LIBRARY_PATH`` is already indexed by ``ld.so.cache`` and this just adds meaningless search time) ``LD_LIBRARY_PATH=/emuelec/lib32:/emuelec/lib:/usr/lib32/pulseaudio:/usr/lib/pulseaudio:/usr/lib32:/usr/lib``\n## Daemons\nThe systemd unit ``ldconfig.service`` is what made it possible to drop ``LD_LIBRARY_PATH`` for the system-wide \"static\" libraries stored under ``/usr/lib`` and ``/usr/lib32`` (note it is still supported for out-of-tree paths like when you load ports, and the LD_LIBRARY_PATH is still used for ``/emuelec/libs``). \n\nThe ``ldconfig.service`` will refresh ``ld.so.cache`` every time EmuELEC boots, you can also manually run it with ``systemctl restart ldconfig`` or ``ldconfig -vX`` to refresh the cache.\n\n\n## Image layout\nThe following part is different from non-multilib images, if ``lib32-essential`` is installed\n- ``/etc/``\n  - ``ld.so.conf``\n    ````\n    include /etc/ld.so.conf.d/*.conf\n    ````\n  - ``ld.so.conf.d/``\n    - ``lib32-glibc.conf``\n      ````\n      /usr/lib32\n      ````\n    - ``pulseaudio.conf``\n      ````\n      /usr/lib32/pulseaudio\n      /usr/lib/pulseaudio\n      ````\n- ``/usr/``\n  - ``bin/``\n    - ``ldconfig`` The binary to create ld cache\n  - ``lib/systemd/system``\n    - ``ldconfig.service`` The systemd unit to rebuild ld cache on boot\n- ``/storage/.cache/ld.so.cache`` Actual ld cache\n\nThe ``ld.so.conf`` and ``ld.so.conf.d`` are very similar to those you will find on standard Linux distros like ArchLinux, Debian, Ubuntu, etc, even they will have some differences. A Big difference is that we keep ``ld.so.cache`` at ``/storage/.cache/`` instead of ``/etc/`` since on EmuELEC ``/etc/`` is read-only.\n\n## Package requirement\nTo add packages here, the following requirement must be met:\n### Variables\n***Variable scope***\n - Since the **lib32** flag is checked before setup_toolchian() and any package-specific functions are called, and after the package is read, outside of functions the variables ``TARGET_NAME``, ``SYSROOT_PREFIX``, etc will still be the same as generic 64, since ``use_32_options()`` is not called yet. \n   - Outside of functions, LIB32_ prefixed variables should be used to get 32bit target infos, and no prefix variables should be used to get 64bit target infos\n   - Inside of functions, LIB64_ prefixed variables hould be used to get 64bit target infos, and no prefix/Lib32_ prefixed variables should be used to get 32bit target infos\n\n**PKG_NAME**\n - Packages should use a **lib32-** prefixed name, even it will still work without, this will help to distinguish the package from other generic pacakges\n\n**PKG_VERSION** \n- If the package has a corresponding generic version, the lib32 one must have the same version as the generic one, this can be set with ``PKG_VERSION=$(get_pkg_version generic-pkg)``\n - Otherwise, use the actual one.\n\n**PKG_NEED_UNPACK**\n- If the package relies on another package (e.g. it uses ``PKG_VERSION=$(get_pkg_version generic-pkg)``) then PKG_NEED_UNPACK must be set as well in order for it to update when doing dirty builds, this can be set with ``PKG_NEED_UNPACK=\"$(get_pkg_directory generic-pkg)``\n\n**PKG_ARCH** \n - The arch **must** be **aarch64**, to avoid building it in singlelib 32-bit builds.\n\n**PKG_URL** \n - If a corresponding generic package exists, then the package should **not** have its own source and URL should be **empty** (explicitly set it empty with ``PKG_URL=\"\"``)\n - If so, it should use the **same source** as the generic version and a custom ``unpack()`` function should extract it from the corresponding generic package's source. This saves time and disk space.\n\n**PKG_DEPENDS** \n - ``lib32-toolchain`` must be depended on for target packages, other libraries, if lib32, should also be adapted, be careful of these special packages:\n    - systemd -> lib32-systemd-libs (since we only build ``libudev.so`` and ``libsystemd.so``)\n    - pulseaudio -> lib32-libpulse (since we only build libraries)\n    - linux:host -> lib32-linux-headers (no host) (since we only install headers to toolchain)\n    \n    The corresponding generic package should be depended on if the lib32 version does not provide configs/binaries where the generic version would.\n\n    E.g. lib32-retroarch depends on retroarch, as lib32-retroarch only provides binary ``/usr/bin/retroarch32`` and expects configs/libraries installed by retroarch.\n\n**PKG_PATCH_DIRS** \n- At least ``$(get_pkg_directory generic-pkg)/patches`` should be added so the lib32 version can also be patched if the generic version is patched\n\n**PKG_BUILD_FLAGS** \n- Unless it's a bootstrap package, the ``lib32`` or ``lib32:[target]`` flag must be set in ``PKG_BUILD_FLAGS``. Usually install-only packages don't need this flag, such as ``lib32-nold``, ``lib32-ldconfig``, etc\n\n### Functions\n**unpack()** \n- Unless there's no corresponding generic version, the lib32-pkg should extract source from the generic version with a custom function like this:    \n  Archive\n  ````\n  unpack() {\n    ${SCRIPTS}/get generic-pkg\n    mkdir -p ${PKG_BUILD}\n    tar --strip-components=1 -xf ${SOURCES}/generic-pkg/generic-pkg-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n  }\n  ````\n  Git\n  ````\n  unpack() {\n    ${SCRIPTS}/get generic-pkg\n    mkdir -p ${PKG_BUILD}\n    tar cf - -C ${SOURCES}/generic-pkg/generic-pkg-${PKG_VERSION} ${PKG_TAR_COPY_OPTS} . | tar xf - -C ${PKG_BUILD}\n  }\n  ````\n  The reason we don't use ``{SCRIPTS}/unpack generic-pkg ${PKG_BUILD}`` is that it will also apply patches from generic-pkg, which is not always what we want, and this may introduce recursive patches. And I want to keep the changes made to the build system as minumum as possible.\n\n**makeinstall_target()** \n- Since we use ``/usr/lib32`` as actual multilib path, manual tweaks are needed when installing the package\n- For SYSROOT installation, libraries still go to ``/usr/lib``, this is for the ease of toolchain lookup\n\n- For target image installation, libraries should go to ``/usr/lib32``. If this is not possible, then it can still go to ``/usr/lib``, and you can mv it to ``/usr/lib32`` in ``post_makeinstall_target()``. The exception is 32bit libretro cores, they should go to ``/usr/lib/libretro``, with **32b** in their name\n\n**post_makeinstall_target()** \n- For most packages, since we only need the libraries, everything outside of ``/usr/lib``(if makeinstall_target() can't be manipulated) or ``/usr/lib32`` (if makeinstall_target() can be manipulated) should be removed, these remove should be done with ``safe_remove``, and then ``/usr/lib`` should be moved to ``/usr/lib32`` if needed\n\n## Structure\nAll pacakges under this folder should have the similiar parent folders as the outer packages folder, especially the same as their corresponding universal pacakge, these are the examples:\n  - toolchain (virual/toolchain) => lib32-toolchain (lib32/virtual/toolchain)\n  - gcc (lang) => lib32-gcc (lib32/lang/lib32-gcc)\n  - box86 (sx05re/emulators/box86) => lib32-box86 (lib32/sx05re/emulators/lib32-box86)\n\nBut there's still exceptions that're allowed here:\n - If its corresponding generic version is placed deeply in ``sx05re``, it can be moved to to ``emuelec``, or other corresponding greater types. For the ease of looking up. E.g.\n   - ``sx05re/tools/SDL2/SDL2_mixer`` => ``lib32/audio/lib32-SDL2_mixer``\n   - ``sx05re/libretro/mupen64plus`` => ``lib32/emuelec/libretro/lib32-mupen64plus``\n - If it's a project/device-specific package, it can be moved to meaningful greater types. E.g.\n   - ``projects/Amlogic-ce/devices/Amlogic-ng/packages/opengl-meson`` => ``lib32/graphics/lib32-opengl-meson``. Note this package also combines the ``opengl-meson`` from ``Amlogic-old`` device\n   - ``projects/Rockchip/packages/libgo2`` => ``lib32/sysutils/lib32-libgo2``\n\n## Contribution\nWhen copying/moving existing packages under this package, you should use either of the following command to keep the commit history:\n  - ``git mv parent/package lib32/parent/lib32-package``\n  - ``git cp parent/package lib32/parent/lib32-package`` (provided by git-extras, although it seems broken for me)\n\nIn the header, please keep the older contributors and then add your name like the others\n\n# Port to other projects\n## Dependency\n\nIf you just copy/paste these packages to other projects blindly, **they won't build!!!** They'll most likely corrupt your build folder and toolchain which can only be rescued by ``make clean``\n\nThese packages will only work with a build system that recognizes the PKG_BUILD_FLAGS ``lib32`` and/or ``lib32:[target]``, if you come from other distros and want to port these packages, the following part in the build system must also be ported, i.e. these are also what made it possible to build them in EmuELEC itself:\n- ``config/options32`` adds a series of ``LIB32_`` and ``LIB64_`` prefixed variables\n- ``config/options`` adds a check to invoke ``config/options32`` for ``aarch64`` build\n- ``config/functions`` adds a function ``use_32_options()`` to replace key variables to 32-bit versions\n- ``scripts/build`` adds a check before ``setup_toolchain()`` that'll call ``use_32_options()`` if a flag ``lib32`` or ``lib32:[target]`` is detected\n- ``scripts/install`` adds two more folders to exclude when installing packages (not essential)\n- ``glibc`` should be patched to use ``/storage/.cache/ld.so.cache`` instead of ``/etc/ld.so.cache`` for ``LD_SO_CACHE``\n\nAdditionally, these changes expect a build system that has the changes introduced in [the PR](https://github.com/LibreELEC/LibreELEC.tv/pull/4042) that's merged in upstream LibreELEC in 2019, and EmuELEC's build system didn't have these changes until Oct, 2021. I haven't tested if this will work with an older build system, so you should pay attention if you want to make these changes work in your project's build system.\n"
  },
  {
    "path": "packages/lib32/security/lib32-gnutls/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-gnutls\"\nPKG_VERSION=\"$(get_pkg_version gnutls)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory gnutls)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"LGPL2.1\"\nPKG_SITE=\"https://gnutls.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-libidn2 lib32-nettle lib32-zlib\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory gnutls)/patches\"\nPKG_LONGDESC=\"A library which provides a secure layer over a reliable transport layer.\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-doc \\\n                           --disable-full-test-suite \\\n                           --disable-guile \\\n                           --disable-libdane \\\n                           --disable-padlock \\\n                           --disable-rpath \\\n                           --disable-tests \\\n                           --disable-tools \\\n                           --disable-valgrind-tests \\\n                           --with-idn \\\n                           --with-included-libtasn1 \\\n                           --with-included-unistring \\\n                           --without-p11-kit \\\n                           --without-tpm\"\n\nunpack() {\n  ${SCRIPTS}/get gnutls\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/gnutls/gnutls-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/security/lib32-nettle/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-nettle\"\nPKG_VERSION=\"$(get_pkg_version nettle)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory nettle)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"http://www.lysator.liu.se/~nisse/nettle\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-gmp\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory nettle)/patches\"\nPKG_LONGDESC=\"A low-level cryptographic library.\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-documentation \\\n                           --disable-openssl\"\n\nif target_has_feature neon; then\n  PKG_CONFIGURE_OPTS_TARGET+=\" --enable-arm-neon\"\nfi\n\nunpack() {\n  ${SCRIPTS}/get nettle\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/nettle/nettle-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/security/lib32-openssl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-openssl\"\nPKG_VERSION=\"$(get_pkg_version openssl)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory openssl)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"Apache-2.0\"\nPKG_SITE=\"https://www.openssl.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory openssl)/patches\"\nPKG_LONGDESC=\"The Open Source toolkit for Secure Sockets Layer and Transport Layer Security\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--prefix=/usr \\\n                           --openssldir=/etc/ssl\n                           --libdir=lib \\\n                           shared \\\n                           threads \\\n                           no-ec2m \\\n                           no-md2 \\\n                           no-rc5 \\\n                           no-rfc3779 \\\n                           no-sctp \\\n                           no-ssl-trace \\\n                           no-ssl3 \\\n                           no-unit-test \\\n                           no-weak-ssl-ciphers \\\n                           no-zlib \\\n                           no-zlib-dynamic \\\n                           no-static-engine \\\n                           linux-armv4\"\n\nunpack() {\n  ${SCRIPTS}/get openssl\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/openssl/openssl-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npost_unpack() {\n  find ${PKG_BUILD}/apps -type f | xargs -n 1 -t sed 's|./demoCA|/etc/ssl|' -i\n}\n\npre_configure_target() {\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n  cp -a ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}/\n}\n\nconfigure_target() {\n  cd ${PKG_BUILD}/.${TARGET_NAME}\n  ./Configure ${PKG_CONFIGURE_OPTS_TARGET} ${CFLAGS} ${LDFLAGS}\n}\n\nmakeinstall_target() {\n  make DESTDIR=${INSTALL} install_sw\n  make DESTDIR=${SYSROOT_PREFIX} install_sw\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/sysutils/lib32-dbus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-dbus\"\nPKG_VERSION=\"$(get_pkg_version dbus)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory dbus)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://dbus.freedesktop.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-expat lib32-systemd-libs\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory dbus)/patches\"\nPKG_LONGDESC=\"D-Bus is a message bus, used for sending messages between applications.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"export ac_cv_have_abstract_sockets=yes \\\n                           --with-sysroot=${LIB32_SYSROOT_PREFIX} \\\n                           --libexecdir=/usr/lib/dbus \\\n                           --disable-verbose-mode \\\n                           --disable-asserts \\\n                           --enable-checks \\\n                           --disable-tests \\\n                           --disable-ansi \\\n                           --disable-xml-docs \\\n                           --disable-doxygen-docs \\\n                           --disable-x11-autolaunch \\\n                           --disable-selinux \\\n                           --disable-libaudit \\\n                           --enable-systemd \\\n                           --enable-inotify \\\n                           --without-valgrind \\\n                           --without-x \\\n                           --with-dbus-user=dbus \\\n                           --runstatedir=/run \\\n                           --with-system-socket=/run/dbus/system_bus_socket\"\n\n\nunpack() {\n  ${SCRIPTS}/get dbus\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/dbus/dbus-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/etc\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/share\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/sysutils/lib32-libevdev/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libevdev\"\nPKG_VERSION=\"$(get_pkg_version libevdev)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libevdev)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"http://www.freedesktop.org/wiki/Software/libevdev/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libevdev)/patches\"\nPKG_LONGDESC=\"libevdev is a wrapper library for evdev devices.\"\nPKG_BUILD_FLAGS=\"lib32 +pic\"\nPKG_TOOLCHAIN=\"meson\"\n\nPKG_MESON_OPTS_TARGET=\" \\\n  -Ddefault_library=shared \\\n  -Ddocumentation=disabled \\\n  -Dtests=disabled\"\n\nunpack() {\n  ${SCRIPTS}/get libevdev\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libevdev/libevdev-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/sysutils/lib32-libgo2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libgo2\"\nPKG_VERSION=\"$(get_pkg_version libgo2)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libgo2)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://github.com/OtherCrashOverride/libgo2\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-libevdev lib32-librga lib32-libpng lib32-openal-soft lib32-${OPENGLES}\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libgo2)/patches\"\nPKG_LONGDESC=\"Support library for the ODROID-GO Advance \"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nif [ \"${DEVICE}\" = \"GameForce\" ]; then\n  PKG_PATCH_DIRS+=\" ${PROJECT_DIR}/Rockchip/devices/GameForce/patches/libgo2\"\nfi\n\nPKG_MAKE_OPTS_TARGET=\"config=release ARCH= INCLUDES=-I${LIB32_SYSROOT_PREFIX}/usr/include/libdrm -I${LIB32_SYSROOT_PREFIX}/usr/include\"\n\nunpack() {\n  ${SCRIPTS}/get libgo2\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libgo2/libgo2-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib32 \\\n           ${SYSROOT_PREFIX}/usr/include/go2 \\\n           ${SYSROOT_PREFIX}/usr/lib\n  cp libgo2.so ${INSTALL}/usr/lib32/\n  cp src/*.h ${SYSROOT_PREFIX}/usr/include/go2/\n  cp libgo2.so ${SYSROOT_PREFIX}/usr/lib/\n}\n"
  },
  {
    "path": "packages/lib32/sysutils/lib32-libusb/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libusb\"\nPKG_VERSION=\"$(get_pkg_version libusb)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libusb)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"LGPLv2.1\"\nPKG_SITE=\"http://libusb.info/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-systemd-libs\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libusb)/patches\"\nPKG_LONGDESC=\"The libusb project's aim is to create a Library for use by user level applications to USB devices.\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-shared \\\n            --enable-static \\\n            --disable-log \\\n            --disable-debug-log \\\n            --enable-udev \\\n            --disable-examples-build\"\n\nunpack() {\n  ${SCRIPTS}/get libusb\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libusb/libusb-${PKG_VERSION}.tar.bz2 -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/sysutils/lib32-systemd-libs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-systemd-libs\"\nPKG_VERSION=\"$(get_pkg_version systemd)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory systemd)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"LGPL2.1+\"\nPKG_SITE=\"http://www.freedesktop.org/wiki/Software/systemd\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain Jinja2:host lib32-libcap lib32-util-linux\"\nSD_DIRECTORY=\"$(get_pkg_directory systemd)\"\nPKG_PATCH_DIRS+=\" ${SD_DIRECTORY}/patches\"\nPKG_LONGDESC=\"A system and session manager for Linux, compatible with SysV and LSB init scripts.\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nif [ \"${DEVICE}\" = \"Amlogic-old\" ]; then\n  PKG_PATCH_DIRS+=\" ${SD_DIRECTORY}/patches/amlogic\"\nfi\n\nPKG_MESON_OPTS_TARGET=\"--libdir=/usr/lib \\\n                       -Drootprefix=/usr \\\n                       -Dsplit-usr=false \\\n                       -Dsplit-bin=true \\\n                       -Ddefault-hierarchy=unified \\\n                       -Dtty-gid=5 \\\n                       -Dtests=false \\\n                       -Dseccomp=false \\\n                       -Dselinux=false \\\n                       -Dapparmor=false \\\n                       -Dpolkit=false \\\n                       -Dacl=false \\\n                       -Daudit=false \\\n                       -Dblkid=true \\\n                       -Dkmod=false \\\n                       -Dpam=false \\\n                       -Dmicrohttpd=false \\\n                       -Dlibcryptsetup=false \\\n                       -Dlibcurl=false \\\n                       -Dlibidn=false \\\n                       -Dlibidn2=false \\\n                       -Dlibiptc=false \\\n                       -Dqrencode=false \\\n                       -Dgcrypt=false \\\n                       -Dgnutls=false \\\n                       -Dopenssl=false \n                       -Delfutils=false \\\n                       -Dzlib=false \\\n                       -Dbzip2=false \\\n                       -Dxz=false \\\n                       -Dlz4=false \\\n                       -Dxkbcommon=false \\\n                       -Dpcre2=false \\\n                       -Dglib=false \\\n                       -Ddbus=false \\\n                       -Ddefault-dnssec=no \\\n                       -Dimportd=false \\\n                       -Dremote=false \\\n                       -Dutmp=true \\\n                       -Dhibernate=false \\\n                       -Denvironment-d=false \\\n                       -Dbinfmt=false \\\n                       -Dcoredump=false \\\n                       -Dresolve=false \\\n                       -Dlogind=true \\\n                       -Dhostnamed=true \\\n                       -Dlocaled=false \\\n                       -Dmachined=false \\\n                       -Dportabled=false \\\n                       -Dnetworkd=false \\\n                       -Dtimedated=false \\\n                       -Dtimesyncd=true \\\n                       -Dfirstboot=false \\\n                       -Drandomseed=false \\\n                       -Dbacklight=false \\\n                       -Dvconsole=false \\\n                       -Dquotacheck=false \\\n                       -Dsysusers=false \\\n                       -Dtmpfiles=true \\\n                       -Dhwdb=true \\\n                       -Drfkill=false \\\n                       -Dldconfig=false \\\n                       -Defi=false \\\n                       -Dtpm=false \\\n                       -Dima=false \\\n                       -Dsmack=false \\\n                       -Dgshadow=false \\\n                       -Didn=false \\\n                       -Dnss-myhostname=false \\\n                       -Dnss-mymachines=false \\\n                       -Dnss-resolve=false \\\n                       -Dnss-systemd=false \\\n                       -Dman=false \\\n                       -Dhtml=false \\\n                       -Dlink-udev-shared=true \\\n                       -Dlink-systemctl-shared=true \\\n                       -Dbashcompletiondir=no \\\n                       -Dzshcompletiondir=no \\\n                       -Dkmod-path=/usr/bin/kmod \\\n                       -Dmount-path=/usr/bin/mount \\\n                       -Dumount-path=/usr/bin/umount \\\n                       -Ddebug-tty=${DEBUG_TTY} \\\n                       -Dpkgconfigdatadir=/usr/lib/pkgconfig \\\n                       -Dversion-tag=${PKG_VERSION}\"\n\nif [ \"${DEVICE}\" != \"Amlogic-old\" ]; then\n  PKG_MESON_OPTS_TARGET+=\" -Dfdisk=false \\\n                           -Dhomed=false \\\n                           -Dlink-networkd-shared=false \\\n                           -Dp11kit=false \\\n                           -Dpwquality=false \\\n                           -Drepart=false \\\n                           -Duserdb=false\"\nfi\n\nunpack() {\n  ${SCRIPTS}/get systemd\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/systemd/systemd-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npre_configure_target() {\n  export TARGET_CFLAGS=\"${TARGET_CFLAGS} -fno-schedule-insns -fno-schedule-insns2 -Wno-format-truncation\"\n  export LC_ALL=en_US.UTF-8\n}\n\nmake_target() {\n  local LIBSYSTEMD_VERSION=$(grep \"^libsystemd_version = '[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+'\" \"${PKG_BUILD}/meson.build\" | awk -F \"'\" '{print $2}')\n  local LIBUDEV_VERSION=$(grep \"^libudev_version = '[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+'\" \"${PKG_BUILD}/meson.build\" | awk -F \"'\" '{print $2}')\n  if [ \"${DEVICE}\" = \"Amlogic-old\" ]; then\n    LIBUDEV_TARGET=src/udev/libudev.so.${LIBUDEV_VERSION}\n    local PC_TARGETS=\"\"\n  else\n    LIBUDEV_TARGET=libudev.so.${LIBUDEV_VERSION}\n    local PC_TARGETS=\"src/libudev/libudev.pc \\\n                      src/libsystemd/libsystemd.pc\"\n  fi\n  LIBSYSTEMD_TARGET=libsystemd.so.${LIBSYSTEMD_VERSION}\n  ninja ${NINJA_OPTS} ${LIBUDEV_TARGET} \\\n                      ${LIBSYSTEMD_TARGET} \\\n                      ${PC_TARGETS}\n                      \n  ${TARGET_PREFIX}strip ${LIBUDEV_TARGET} \\\n                        ${LIBSYSTEMD_TARGET}\n}\n\nmakeinstall_target() {\n  mkdir -p \"${INSTALL}/usr/lib32\"\n  mkdir -p \"${SYSROOT_PREFIX}/usr/lib\"\n    local i\n    for i in ${LIBUDEV_TARGET%%.so*}.so* ${LIBSYSTEMD_TARGET%%.so*}.so*; do \n      if [ \"${i: -1}\" = 'p' ]; then\n        continue\n      fi\n      cp -va \"${i}\" \"${INSTALL}/usr/lib32/\"\n      cp -va \"${i}\" \"${SYSROOT_PREFIX}/usr/lib/\"\n    done\n  mkdir -p \"${SYSROOT_PREFIX}/usr/include/systemd\"\n    cp -va \"../src/libudev/libudev.h\" \"${SYSROOT_PREFIX}/usr/include/\"\n    cp -va \"../src/systemd/_sd-common.h\" \"${SYSROOT_PREFIX}/usr/include/systemd/\"\n    for i in bus-protocol \\\n             bus-vtable \\\n             bus \\\n             daemon \\\n             device \\\n             event \\\n             hwdb \\\n             id128 \\\n             journal \\\n             login \\\n             messages \\\n             path; do\n      cp -va \"../src/systemd/sd-${i}.h\" \"${SYSROOT_PREFIX}/usr/include/systemd/\"\n    done\n  mkdir -p \"${SYSROOT_PREFIX}/usr/lib/pkgconfig\"\n    cp -va \"src/libudev/libudev.pc\" \"src/libsystemd/libsystemd.pc\"  \"${SYSROOT_PREFIX}/usr/lib/pkgconfig/\"\n}\n"
  },
  {
    "path": "packages/lib32/sysutils/lib32-util-linux/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-util-linux\"\nPKG_VERSION=\"$(get_pkg_version util-linux)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory util-linux)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory util-linux)/patches\"\nPKG_LONGDESC=\"A large variety of low-level system utilities that are necessary for a Linux system to function.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic:host lib32\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-gtk-doc \\\n                           --disable-nls \\\n                           --disable-rpath \\\n                           --enable-tls \\\n                           --enable-chsh-only-listed \\\n                           --disable-bash-completion \\\n                           --disable-colors-default \\\n                           --disable-pylibmount \\\n                           --disable-pg-bell \\\n                           --disable-use-tty-group \\\n                           --disable-makeinstall-chown \\\n                           --disable-makeinstall-setuid \\\n                           --with-gnu-ld \\\n                           --without-selinux \\\n                           --without-audit \\\n                           --without-udev \\\n                           --without-ncurses \\\n                           --without-ncursesw \\\n                           --without-readline \\\n                           --without-slang \\\n                           --without-tinfo \\\n                           --without-utempter \\\n                           --without-util \\\n                           --without-libz \\\n                           --without-user \\\n                           --without-systemd \\\n                           --without-smack \\\n                           --without-python \\\n                           --without-systemdsystemunitdir \\\n                           --disable-all-programs \\\n                           --enable-libblkid \\\n                           --enable-libmount\"\n\nunpack() {\n  ${SCRIPTS}/get util-linux\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/util-linux/util-linux-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/textproc/lib32-expat/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-expat\"\nPKG_VERSION=\"$(get_pkg_version expat)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory expat)\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://expat.sourceforge.net/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory expat)/patches\"\nPKG_LONGDESC=\"Expat is an XML parser library written in C.\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DEXPAT_BUILD_DOCS=OFF \\\n                       -DEXPAT_BUILD_TOOLS=OFF \\\n                       -DEXPAT_BUILD_EXAMPLES=OFF \\\n                       -DEXPAT_BUILD_TESTS=OFF \\\n                       -DEXPAT_SHARED_LIBS=ON\"\n\nunpack() {\n  ${SCRIPTS}/get expat\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/expat/expat-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/textproc/lib32-libidn2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libidn2\"\nPKG_VERSION=\"$(get_pkg_version libidn2)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libidn2)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"LGPL3\"\nPKG_SITE=\"https://www.gnu.org/software/libidn/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libidn2)/patches\"\nPKG_LONGDESC=\"Free software implementation of IDNA2008, Punycode and TR46.\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-doc \\\n                           --enable-shared \\\n                           --disable-static\"\n\nunpack() {\n  ${SCRIPTS}/get libidn2\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libidn2/libidn2-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/textproc/lib32-libxml2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libxml2\"\nPKG_VERSION=\"$(get_pkg_version libxml2)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libxml2)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"http://xmlsoft.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-zlib\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libxml2)/patches\"\nPKG_LONGDESC=\"The libxml package contains an XML library, which allows you to manipulate XML files.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_header_ansidecl_h=no \\\n                           --enable-static \\\n                           --enable-shared \\\n                           --disable-silent-rules \\\n                           --enable-ipv6 \\\n                            --without-lzma \\\n                           --with-zlib=${LIB32_SYSROOT_PREFIX}/usr \\\n                           --without-python \\\n                           --with-sysroot=${LIB32_SYSROOT_PREFIX}\"\n\nunpack() {\n  ${SCRIPTS}/get libxml2\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libxml2/libxml2-${PKG_VERSION}.tar.bz2 -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  sed -e \"s:\\(['= ]\\)/usr:\\\\1${SYSROOT_PREFIX}/usr:g\" -i ${SYSROOT_PREFIX}/usr/bin/xml2-config\n\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/share\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/textproc/lib32-tre/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-tre\"\nPKG_VERSION=\"$(get_pkg_version tre)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory tre)\"\nPKG_ARCH=\"aarch64\"\nPKG_SITE=\"https://github.com/laurikari/tre\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory tre)/patches\" \nPKG_SHORTDESC=\"The approximate regex matching library and agrep command line tool.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nunpack() {\n  ${SCRIPTS}/get tre\n  mkdir -p ${PKG_BUILD}\n  tar cf - -C ${SOURCES}/tre/tre-${PKG_VERSION} ${PKG_TAR_COPY_OPTS} . | tar xf - -C ${PKG_BUILD}\n}\n\npre_configure_target() {\n  sed -i \"s|AM_GNU_GETTEXT_VERSION(0.17)|AM_GNU_GETTEXT_REQUIRE_VERSION(0.17)|\" ${PKG_BUILD}/configure.ac\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/tools/lib32-ldconfig/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-ldconfig\"\nPKG_VERSION=\"1\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.gnu.org/software/libc/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"glibc\"\nPKG_LONGDESC=\"ldconfig binary and service\"\nPKG_NEED_UNPACK+=\" $(get_pkg_directory glibc)\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  # Nah, we don't build it, just steal it from glibc\n  cp \"$(get_build_dir glibc)/.${TARGET_NAME}/elf/ldconfig\" ${PKG_BUILD}/ldconfig\n  ${TARGET_PREFIX}strip ${PKG_BUILD}/ldconfig\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp -ra ${PKG_BUILD}/ldconfig ${INSTALL}/usr/bin/\n}\n\npost_install() {\n  enable_service ldconfig.service\n}"
  },
  {
    "path": "packages/lib32/tools/lib32-ldconfig/system.d/ldconfig.service",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\n[Unit]\nDescription=Rebuild Dynamic Linker Cache On Bootup\nAfter=local-fs.target libmali.service\nBefore=ldconfig.path\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/ldconfig -X\n\n[Install]\nWantedBy=multi-user.target"
  },
  {
    "path": "packages/lib32/tools/lib32-nold/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-nold\"\nPKG_ARCH=\"aarch64\"\nPKG_VERSION=\"1\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"busybox pulseaudio\"\nPKG_LONGDESC=\"Remove LD_LIBRARY_PATH since we don't need them\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_install() {\n  DIR_PROFILE=${BUILD}/image/system/etc/profile.d\n  safe_remove ${DIR_PROFILE}/99-pulseaudio.conf\n  sed -i \"/^export LD_LIBRARY_PATH/d\" ${DIR_PROFILE}/98-busybox.conf\n}"
  },
  {
    "path": "packages/lib32/virtual/lib32-essential/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-essential\"\nPKG_VERSION=\"\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://emuelec.org\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-binutils lib32-gcc lib32-ldconfig lib32-nold\"\n# lib32-binutils adds multilib support (/etc/ld.so.conf, and a link under /usr/lib to point to the ld-linux-armhf.so.3 under /usr/lib32)\n# lib32-gcc adds stdc++ library, and lib32 config (/etc/ld.so.conf.d/lib32-gcc.conf, so /usr/lib32 will be searched by ld)\n# lib32-ldconfig adds ldconfig binary, and ldconfig systemd units\n# lib32-nold removes the LD_LIBRARY_PATH set by busybox and pulseaudio\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"Root package used to build and create complete image\"\n"
  },
  {
    "path": "packages/lib32/virtual/lib32-toolchain/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present 7Ji (https://github/com/7Ji)\n\nPKG_NAME=\"lib32-toolchain\"\nPKG_VERSION=\"\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://emuelec.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain lib32-gcc:host\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"EmuELEC toolchain to compile lib32 packages\"\n"
  },
  {
    "path": "packages/lib32/x11/lib/lib32-libpciaccess/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji ()\n\nPKG_NAME=\"lib32-libpciaccess\"\nPKG_VERSION=\"$(get_pkg_version libpciaccess)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libpciaccess)\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://freedesktop.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-util-macros lib32-zlib\"\nPKG_LONGDESC=\"X.org libpciaccess library.\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libpciaccess)/patches\"\nPKG_BUILD_FLAGS=\"lib32\"\nPKG_TOOLCHAIN=\"autotools\"\n\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_header_asm_mtrr_h=set \\\n                           --with-pciids-path=/usr/share \\\n                           --with-zlib \"\n\nunpack() {\n  ${SCRIPTS}/get libpciaccess\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libpciaccess/libpciaccess-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npre_configure_target() {\n  CFLAGS+=\" -D_LARGEFILE64_SOURCE\"\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/x11/lib/lib32-pixman/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-pixman\"\nPKG_VERSION=\"$(get_pkg_version pixman)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory pixman)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.x.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-util-macros\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory pixman)/patches\"\nPKG_LONGDESC=\"Pixman is a generic library for manipulating pixel regions, contains low-level pixel manipulation routines.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-openmp \\\n                           --disable-loongson-mmi \\\n                           --disable-mmx \\\n                           --disable-sse2 \\\n                           --disable-vmx \\\n                           --enable-arm-simd \\\n                           --enable-arm-neon \\\n                           --disable-arm-iwmmxt \\\n                           --disable-mips-dspr2 \\\n                           --enable-gcc-inline-asm \\\n                           --disable-timers \\\n                           --disable-gtk \\\n                           --disable-libpng \\\n                           --with-gnu-ld\"\n\nunpack() {\n  ${SCRIPTS}/get pixman\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/pixman/pixman-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  cp -f ${SYSROOT_PREFIX}/usr/lib/pkgconfig/pixman-1.pc \\\n     ${SYSROOT_PREFIX}/usr/lib/pkgconfig/pixman.pc\n  cp -rf ${SYSROOT_PREFIX}/usr/include/pixman-1 \\\n     ${SYSROOT_PREFIX}/usr/include/pixman\n  safe_remove ${INSTALL}/usr/include\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/x11/other/lib32-fontconfig/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-fontconfig\"\nPKG_VERSION=\"$(get_pkg_version fontconfig)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory fontconfig)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.fontconfig.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-util-linux lib32-util-macros lib32-freetype lib32-libxml2 lib32-zlib lib32-expat\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory fontconfig)/patches\"\nPKG_LONGDESC=\"Fontconfig is a library for font customization and configuration.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-arch=${LIB32_TARGET_ARCH} \\\n                           --with-cache-dir=/storage/.cache/fontconfig \\\n                           --with-default-fonts=/usr/share/fonts \\\n                           --without-add-fonts \\\n                           --disable-dependency-tracking \\\n                           --disable-docs \\\n                           --disable-rpath\"\n\nunpack() {\n  ${SCRIPTS}/get fontconfig\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/fontconfig/fontconfig-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\npre_configure_target() {\n# ensure we dont use '-O3' optimization.\n  CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-O3|-O2|\")\n  CXXFLAGS=$(echo ${CXXFLAGS} | sed -e \"s|-O3|-O2|\")\n  CFLAGS+=\" -I${PKG_BUILD}\"\n  CXXFLAGS+=\" -I${PKG_BUILD}\"\n}\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/etc\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/share\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "packages/lib32/x11/util/lib32-util-macros/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-util-macros\"\nPKG_VERSION=\"$(get_pkg_version util-macros)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory util-macros)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.X.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain\"\nPKG_LONGDESC=\"X.org autoconf utilities such as M4 macros.\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory util-macros)/patches\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nunpack() {\n  ${SCRIPTS}/get util-macros\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/util-macros/util-macros-${PKG_VERSION}.tar.bz2 -C ${PKG_BUILD}\n}\n\npre_configure_target() {\n  sed -i 's|^pkgconfigdir = .*|pkgconfigdir = /usr/lib/pkgconfig|' ${PKG_BUILD}/Makefile.am\n  sed -i 's|^pkgconfigdir = .*|pkgconfigdir = /usr/lib/pkgconfig|' ${PKG_BUILD}/Makefile.in\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr\n}\n"
  },
  {
    "path": "packages/linux/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"linux\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kernel.org\"\nPKG_DEPENDS_HOST=\"ccache:host rsync:host\"\nPKG_DEPENDS_TARGET=\"linux:host kmod:host xz:host keyutils openssl:host ${KERNEL_EXTRA_DEPENDS_TARGET}\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS} $(get_pkg_directory initramfs) $(get_pkg_variable initramfs PKG_NEED_UNPACK)\"\nPKG_LONGDESC=\"This package contains a precompiled kernel image and the modules.\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_STAMP=\"${KERNEL_TARGET} ${KERNEL_MAKE_EXTRACMD}\"\n\nPKG_PATCH_DIRS=\"${LINUX}\"\n\ncase \"${LINUX}\" in\n  amlogic)\n    PKG_VERSION=\"16f603617dbbc30cafbacaf78ef6468a081fa482\" # 6.1.38\n    PKG_SHA256=\"aab5563a0ff2f7581b8f40d28950d4e9a30e51ea72397e3bf26efd85719af28c\"\n    PKG_URL=\"https://github.com/torvalds/linux/archive/${PKG_VERSION}.tar.gz\"\n    PKG_SOURCE_NAME=\"linux-${LINUX}-${PKG_VERSION}.tar.gz\"\n    PKG_PATCH_DIRS=\"default\"\n    ;;\n  raspberrypi)\n    PKG_VERSION=\"db53b52e7a54b6eed59dbbfb6f4b19ac6ed4edb3\" # 6.1.72\n    PKG_SHA256=\"7211cd729ac63e005b1c81a20aac0c1b0cc4ba3a483b799705ad691f6074e720\"\n    PKG_URL=\"https://github.com/raspberrypi/linux/archive/${PKG_VERSION}.tar.gz\"\n    PKG_SOURCE_NAME=\"linux-${LINUX}-${PKG_VERSION}.tar.gz\"\n    ;;\n  *)\n    PKG_VERSION=\"6.1.73\"\n    PKG_SHA256=\"6cad48706bf1cde342613dca2a2cd6dd4f79f88f9e4d356263564e4b2a5d7e87\"\n    PKG_URL=\"https://www.kernel.org/pub/linux/kernel/v${PKG_VERSION/.*/}.x/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\n    PKG_PATCH_DIRS=\"default\"\n    ;;\nesac\n\nPKG_KERNEL_CFG_FILE=$(kernel_config_path) || die\n\nif [ -n \"${KERNEL_TOOLCHAIN}\" ]; then\n  PKG_DEPENDS_TARGET+=\" gcc-${KERNEL_TOOLCHAIN}:host\"\n  HEADERS_ARCH=${TARGET_ARCH}\nelse\n  PKG_DEPENDS_TARGET+=\" toolchain\"\nfi\n\nif [ \"${PKG_BUILD_PERF}\" != \"no\" ] && grep -q ^CONFIG_PERF_EVENTS= ${PKG_KERNEL_CFG_FILE}; then\n  PKG_BUILD_PERF=\"yes\"\n  PKG_DEPENDS_TARGET+=\" binutils elfutils libunwind zlib openssl\"\nfi\n\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  PKG_DEPENDS_TARGET+=\" elfutils:host pciutils\"\n  PKG_DEPENDS_UNPACK+=\" intel-ucode kernel-firmware\"\nelif [ \"${TARGET_ARCH}\" = \"arm\" -a \"${DEVICE}\" = \"iMX6\" ]; then\n  PKG_DEPENDS_UNPACK+=\" firmware-imx\"\nfi\n\nif [[ \"${KERNEL_TARGET}\" = uImage* ]]; then\n  PKG_DEPENDS_TARGET+=\" u-boot-tools:host\"\nfi\n\n# Ensure that the dependencies of initramfs:target are built correctly, but\n# we don't want to add initramfs:target as a direct dependency as we install\n# this \"manually\" from within linux:target\nfor pkg in $(get_pkg_variable initramfs PKG_DEPENDS_TARGET); do\n  ! listcontains \"${PKG_DEPENDS_TARGET}\" \"${pkg}\" && PKG_DEPENDS_TARGET+=\" ${pkg}\" || true\ndone\n\npost_patch() {\n  # linux was already built and its build dir autoremoved - prepare it again for kernel packages\n  if [ -d ${PKG_INSTALL}/.image ]; then\n    cp -p ${PKG_INSTALL}/.image/.config ${PKG_BUILD}\n    kernel_make -C ${PKG_BUILD} prepare\n\n    # restore the required Module.symvers from an earlier build\n    cp -p ${PKG_INSTALL}/.image/Module.symvers ${PKG_BUILD}\n  fi\n}\n\nmake_host() {\n  :\n}\n\nmakeinstall_host() {\n  make \\\n    ARCH=${HEADERS_ARCH:-${TARGET_KERNEL_ARCH}} \\\n    HOSTCC=\"${TOOLCHAIN}/bin/host-gcc\" \\\n    HOSTCXX=\"${TOOLCHAIN}/bin/host-g++\" \\\n    HOSTCFLAGS=\"${HOST_CFLAGS}\" \\\n    HOSTCXXFLAGS=\"${HOST_CXXFLAGS}\" \\\n    HOSTLDFLAGS=\"${HOST_LDFLAGS}\" \\\n    INSTALL_HDR_PATH=dest \\\n    headers_install\n  mkdir -p ${SYSROOT_PREFIX}/usr/include\n    cp -R dest/include/* ${SYSROOT_PREFIX}/usr/include\n}\n\npre_make_target() {\n  ( cd ${ROOT}\n    rm -rf ${BUILD}/initramfs\n    rm -f ${STAMPS_INSTALL}/initramfs/install_target ${STAMPS_INSTALL}/*/install_init\n    ${SCRIPTS}/install initramfs\n  )\n  pkg_lock_status \"ACTIVE\" \"linux:target\" \"build\"\n\n  cp ${PKG_KERNEL_CFG_FILE} ${PKG_BUILD}/.config\n\n  # set initramfs source\n  ${PKG_BUILD}/scripts/config --set-str CONFIG_INITRAMFS_SOURCE \"$(kernel_initramfs_confs) ${BUILD}/initramfs\"\n\n  # set default hostname based on ${DISTRONAME}\n  ${PKG_BUILD}/scripts/config --set-str CONFIG_DEFAULT_HOSTNAME \"${DISTRONAME}\"\n\n  # disable swap support if not enabled\n  if [ ! \"${SWAP_SUPPORT}\" = yes ]; then\n    ${PKG_BUILD}/scripts/config --disable CONFIG_SWAP\n  fi\n\n  # disable nfs support if not enabled\n  if [ ! \"${NFS_SUPPORT}\" = yes ]; then\n    ${PKG_BUILD}/scripts/config --disable CONFIG_NFS_FS\n  fi\n\n  # disable cifs support if not enabled\n  if [ ! \"${SAMBA_SUPPORT}\" = yes ]; then\n    ${PKG_BUILD}/scripts/config --disable CONFIG_CIFS\n  fi\n\n  # disable iscsi support if not enabled\n  if [ ! \"${ISCSI_SUPPORT}\" = yes ]; then\n    ${PKG_BUILD}/scripts/config --disable CONFIG_SCSI_ISCSI_ATTRS\n    ${PKG_BUILD}/scripts/config --disable CONFIG_ISCSI_TCP\n    ${PKG_BUILD}/scripts/config --disable CONFIG_ISCSI_BOOT_SYSFS\n    ${PKG_BUILD}/scripts/config --disable CONFIG_ISCSI_IBFT_FIND\n    ${PKG_BUILD}/scripts/config --disable CONFIG_ISCSI_IBFT\n  fi\n\n  # disable lima/panfrost if libmali is configured\n  if [ \"${OPENGLES}\" = \"libmali\" ]; then\n    ${PKG_BUILD}/scripts/config --disable CONFIG_DRM_LIMA\n    ${PKG_BUILD}/scripts/config --disable CONFIG_DRM_PANFROST\n  fi\n\n  # disable wireguard support if not enabled\n  if [ ! \"${WIREGUARD_SUPPORT}\" = yes ]; then\n    ${PKG_BUILD}/scripts/config --disable CONFIG_WIREGUARD\n  fi\n\n  if [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n    # copy some extra firmware to linux tree\n    mkdir -p ${PKG_BUILD}/external-firmware\n      cp -a $(get_build_dir kernel-firmware)/.copied-firmware/{amdgpu,amd-ucode,i915,radeon,e100,rtl_nic} ${PKG_BUILD}/external-firmware\n\n    cp -a $(get_build_dir intel-ucode)/intel-ucode ${PKG_BUILD}/external-firmware\n\n    FW_LIST=\"$(find ${PKG_BUILD}/external-firmware \\( -type f -o -type l \\) \\( -iname '*.bin' -o -iname '*.fw' -o -path '*/intel-ucode/*' \\) | sed 's|.*external-firmware/||' | sort | xargs)\"\n\n    ${PKG_BUILD}/scripts/config --set-str CONFIG_EXTRA_FIRMWARE \"${FW_LIST}\"\n    ${PKG_BUILD}/scripts/config --set-str CONFIG_EXTRA_FIRMWARE_DIR \"external-firmware\"\n\n  elif [ \"${TARGET_ARCH}\" = \"arm\" -a \"${DEVICE}\" = \"iMX6\" ]; then\n    mkdir -p ${PKG_BUILD}/external-firmware/imx/sdma\n      cp -a $(get_build_dir firmware-imx)/firmware/sdma/*imx6*.bin ${PKG_BUILD}/external-firmware/imx/sdma\n      cp -a $(get_build_dir firmware-imx)/firmware/vpu/*imx6*.bin ${PKG_BUILD}/external-firmware\n\n    FW_LIST=\"$(find ${PKG_BUILD}/external-firmware -type f | sed 's|.*external-firmware/||' | sort | xargs)\"\n\n    ${PKG_BUILD}/scripts/config --set-str CONFIG_EXTRA_FIRMWARE \"${FW_LIST}\"\n    ${PKG_BUILD}/scripts/config --set-str CONFIG_EXTRA_FIRMWARE_DIR \"external-firmware\"\n  fi\n\n  kernel_make oldconfig\n\n  if [ -f \"${DISTRO_DIR}/${DISTRO}/kernel_options\" ]; then\n    while read OPTION; do\n      [ -z \"${OPTION}\" -o -n \"$(echo \"${OPTION}\" | grep '^#')\" ] && continue\n\n      if [ \"${OPTION##*=}\" == \"n\" -a \"$(${PKG_BUILD}/scripts/config --state ${OPTION%%=*})\" == \"undef\" ]; then\n        continue\n      fi\n\n      if [ \"$(${PKG_BUILD}/scripts/config --state ${OPTION%%=*})\" != \"$(echo ${OPTION##*=} | tr -d '\"')\" ]; then\n        MISSING_KERNEL_OPTIONS+=\"\\t${OPTION}\\n\"\n      fi\n    done < ${DISTRO_DIR}/${DISTRO}/kernel_options\n\n    if [ -n \"${MISSING_KERNEL_OPTIONS}\" ]; then\n      print_color CLR_WARNING \"LINUX: kernel options not correct: \\n${MISSING_KERNEL_OPTIONS%%}\\nPlease run ./tools/check_kernel_config\\n\"\n    fi\n  fi\n}\n\nmake_target() {\n  # arm64 target does not support creating uImage.\n  # Build Image first, then wrap it using u-boot's mkimage.\n  if [[ \"${TARGET_KERNEL_ARCH}\" = \"arm64\" && \"${KERNEL_TARGET}\" = uImage* ]]; then\n    if [ -z \"${KERNEL_UIMAGE_LOADADDR}\" -o -z \"${KERNEL_UIMAGE_ENTRYADDR}\" ]; then\n      die \"ERROR: KERNEL_UIMAGE_LOADADDR and KERNEL_UIMAGE_ENTRYADDR have to be set to build uImage - aborting\"\n    fi\n    KERNEL_UIMAGE_TARGET=\"${KERNEL_TARGET}\"\n    KERNEL_TARGET=\"${KERNEL_TARGET/uImage/Image}\"\n  fi\n\n  DTC_FLAGS=-@ kernel_make ${KERNEL_TARGET} ${KERNEL_MAKE_EXTRACMD} modules\n\n  if [ \"${PKG_BUILD_PERF}\" = \"yes\" ]; then\n    ( cd tools/perf\n\n      # arch specific perf build args\n      case \"${TARGET_ARCH}\" in\n        x86_64)\n          PERF_BUILD_ARGS=\"ARCH=x86\"\n          ;;\n        aarch64)\n          PERF_BUILD_ARGS=\"ARCH=arm64\"\n          ;;\n        *)\n          PERF_BUILD_ARGS=\"ARCH=${TARGET_ARCH}\"\n          ;;\n      esac\n\n      WERROR=0 \\\n      NO_LIBPERL=1 \\\n      NO_LIBPYTHON=1 \\\n      NO_SLANG=1 \\\n      NO_GTK2=1 \\\n      NO_LIBNUMA=1 \\\n      NO_LIBAUDIT=1 \\\n      NO_LZMA=1 \\\n      NO_SDT=1 \\\n      CROSS_COMPILE=\"${TARGET_PREFIX}\" \\\n      JOBS=\"${CONCURRENCY_MAKE_LEVEL}\" \\\n        make ${PERF_BUILD_ARGS}\n      mkdir -p ${INSTALL}/usr/bin\n        cp perf ${INSTALL}/usr/bin\n    )\n  fi\n\n  if [ -n \"${KERNEL_UIMAGE_TARGET}\" ]; then\n    # determine compression used for kernel image\n    KERNEL_UIMAGE_COMP=${KERNEL_UIMAGE_TARGET:7}\n    KERNEL_UIMAGE_COMP=$(echo ${KERNEL_UIMAGE_COMP:-none} | sed 's/gz/gzip/; s/bz2/bzip2/')\n\n    # calculate new load address to make kernel Image unpack to memory area after compressed image\n    if [ \"${KERNEL_UIMAGE_COMP}\" != \"none\" ]; then\n      COMPRESSED_SIZE=$(stat -t \"arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_TARGET}\" | awk '{print $2}')\n      # align to 1 MiB\n      COMPRESSED_SIZE=$(( ((${COMPRESSED_SIZE} - 1 >> 20) + 1) << 20 ))\n      PKG_KERNEL_UIMAGE_LOADADDR=$(printf '%X' \"$(( ${KERNEL_UIMAGE_LOADADDR} + ${COMPRESSED_SIZE} ))\")\n      PKG_KERNEL_UIMAGE_ENTRYADDR=$(printf '%X' \"$(( ${KERNEL_UIMAGE_ENTRYADDR} + ${COMPRESSED_SIZE} ))\")\n    else\n      PKG_KERNEL_UIMAGE_LOADADDR=${KERNEL_UIMAGE_LOADADDR}\n      PKG_KERNEL_UIMAGE_ENTRYADDR=${KERNEL_UIMAGE_ENTRYADDR}\n    fi\n\n    mkimage -A ${TARGET_KERNEL_ARCH} \\\n            -O linux \\\n            -T kernel \\\n            -C ${KERNEL_UIMAGE_COMP} \\\n            -a ${PKG_KERNEL_UIMAGE_LOADADDR} \\\n            -e ${PKG_KERNEL_UIMAGE_ENTRYADDR} \\\n            -d arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_TARGET} \\\n               arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_UIMAGE_TARGET}\n\n    KERNEL_TARGET=\"${KERNEL_UIMAGE_TARGET}\"\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/.image\n  cp -p arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_TARGET} System.map .config Module.symvers ${INSTALL}/.image/\n\n  kernel_make INSTALL_MOD_PATH=${INSTALL}/$(get_kernel_overlay_dir) modules_install\n  rm -f ${INSTALL}/$(get_kernel_overlay_dir)/lib/modules/*/build\n  rm -f ${INSTALL}/$(get_kernel_overlay_dir)/lib/modules/*/source\n\n  if [ \"${BOOTLOADER}\" = \"u-boot\" ]; then\n    mkdir -p ${INSTALL}/usr/share/bootloader\n    for dtb in arch/${TARGET_KERNEL_ARCH}/boot/dts/*.dtb arch/${TARGET_KERNEL_ARCH}/boot/dts/*/*.dtb; do\n      if [ -f ${dtb} ]; then\n        cp -v ${dtb} ${INSTALL}/usr/share/bootloader\n      fi\n    done\n  elif [ \"${BOOTLOADER}\" = \"bcm2835-bootloader\" ]; then\n    # RPi firmware will decompress gzipped kernels prior to booting\n    if [ \"${TARGET_KERNEL_ARCH}\" = \"arm64\" ]; then\n      pigz --best --force ${INSTALL}/.image/${KERNEL_TARGET}\n      mv ${INSTALL}/.image/${KERNEL_TARGET}.gz ${INSTALL}/.image/${KERNEL_TARGET}\n    fi\n\n    mkdir -p ${INSTALL}/usr/share/bootloader/overlays\n\n    # install platform dtbs, but remove upstream kernel dtbs (i.e. without downstream\n    # drivers and decent USB support) as these are not required by LibreELEC\n    for dtb in arch/${TARGET_KERNEL_ARCH}/boot/dts/*.dtb arch/${TARGET_KERNEL_ARCH}/boot/dts/*/*.dtb; do\n      if [ -f ${dtb} ]; then\n        cp -v ${dtb} ${INSTALL}/usr/share/bootloader\n      fi\n    done\n    rm -f ${INSTALL}/usr/share/bootloader/bcm283*.dtb\n    # duplicated in overlays below\n    safe_remove ${INSTALL}/usr/share/bootloader/overlay_map.dtb\n\n    # install overlay dtbs\n    for dtb in arch/arm/boot/dts/overlays/*.dtb \\\n               arch/arm/boot/dts/overlays/*.dtbo; do\n      cp ${dtb} ${INSTALL}/usr/share/bootloader/overlays 2>/dev/null || :\n    done\n    cp -p arch/${TARGET_KERNEL_ARCH}/boot/dts/overlays/README ${INSTALL}/usr/share/bootloader/overlays\n  fi\n}\n"
  },
  {
    "path": "packages/linux/patches/default/linux-020-ALSA-pcm-fix-ELD-constraints-for-E-AC3-DTS-HD-and-ML.patch",
    "content": "From 94d0a9815c99385e57a17fb20448e47a1f229bcf Mon Sep 17 00:00:00 2001\nFrom: Matthias Reichl <hias@horus.com>\nDate: Sat, 3 Jun 2023 12:00:28 +0200\nSubject: [PATCH 1/2] ALSA: pcm: fix ELD constraints for (E)AC3, DTS(-HD) and\n MLP formats\n\nThe SADs of compressed formats contain the channel and sample rate\ninfo of the audio data inside the compressed stream, but when\nbuilding constraints we must use the rates and channels used to\ntransport the compressed streams.\n\neg 48kHz 6ch EAC3 needs to be transmitted as a 2ch 192kHz stream.\n\nThis patch fixes the constraints for the common AC3 and DTS formats,\nthe constraints for the less common MPEG, DSD etc formats are copied\ndirectly from the info in the SADs as before as I don't have the specs\nand equipment to test those.\n\nSigned-off-by: Matthias Reichl <hias@horus.com>\n---\n sound/core/pcm_drm_eld.c | 73 ++++++++++++++++++++++++++++++++++++++--\n 1 file changed, 70 insertions(+), 3 deletions(-)\n\ndiff --git a/sound/core/pcm_drm_eld.c b/sound/core/pcm_drm_eld.c\nindex 4b5faae5d16e5..07075071972dd 100644\n--- a/sound/core/pcm_drm_eld.c\n+++ b/sound/core/pcm_drm_eld.c\n@@ -2,11 +2,25 @@\n /*\n  *  PCM DRM helpers\n  */\n+#include <linux/bitfield.h>\n #include <linux/export.h>\n+#include <linux/hdmi.h>\n #include <drm/drm_edid.h>\n #include <sound/pcm.h>\n #include <sound/pcm_drm_eld.h>\n \n+#define SAD0_CHANNELS_MASK\tGENMASK(2, 0) /* max number of channels - 1 */\n+#define SAD0_FORMAT_MASK\tGENMASK(6, 3) /* audio format */\n+\n+#define SAD1_RATE_MASK\t\tGENMASK(6, 0) /* bitfield of supported rates */\n+#define SAD1_RATE_32000_MASK\tBIT(0)\n+#define SAD1_RATE_44100_MASK\tBIT(1)\n+#define SAD1_RATE_48000_MASK\tBIT(2)\n+#define SAD1_RATE_88200_MASK\tBIT(3)\n+#define SAD1_RATE_96000_MASK\tBIT(4)\n+#define SAD1_RATE_176400_MASK\tBIT(5)\n+#define SAD1_RATE_192000_MASK\tBIT(6)\n+\n static const unsigned int eld_rates[] = {\n \t32000,\n \t44100,\n@@ -17,9 +31,62 @@ static const unsigned int eld_rates[] = {\n \t192000,\n };\n \n+static unsigned int map_rate_families(const u8 *sad,\n+\t\t\t\t      unsigned int mask_32000,\n+\t\t\t\t      unsigned int mask_44100,\n+\t\t\t\t      unsigned int mask_48000)\n+{\n+\tunsigned int rate_mask = 0;\n+\n+\tif (sad[1] & SAD1_RATE_32000_MASK)\n+\t\trate_mask |= mask_32000;\n+\tif (sad[1] & (SAD1_RATE_44100_MASK | SAD1_RATE_88200_MASK | SAD1_RATE_176400_MASK))\n+\t\trate_mask |= mask_44100;\n+\tif (sad[1] & (SAD1_RATE_48000_MASK | SAD1_RATE_96000_MASK | SAD1_RATE_192000_MASK))\n+\t\trate_mask |= mask_48000;\n+\treturn rate_mask;\n+}\n+\n+static unsigned int sad_rate_mask(const u8 *sad)\n+{\n+\tswitch (FIELD_GET(SAD0_FORMAT_MASK, sad[0])) {\n+\tcase HDMI_AUDIO_CODING_TYPE_PCM:\n+\t\treturn sad[1] & SAD1_RATE_MASK;\n+\tcase HDMI_AUDIO_CODING_TYPE_AC3:\n+\tcase HDMI_AUDIO_CODING_TYPE_DTS:\n+\t\treturn map_rate_families(sad,\n+\t\t\t\t\t SAD1_RATE_32000_MASK,\n+\t\t\t\t\t SAD1_RATE_44100_MASK,\n+\t\t\t\t\t SAD1_RATE_48000_MASK);\n+\tcase HDMI_AUDIO_CODING_TYPE_EAC3:\n+\tcase HDMI_AUDIO_CODING_TYPE_DTS_HD:\n+\tcase HDMI_AUDIO_CODING_TYPE_MLP:\n+\t\treturn map_rate_families(sad,\n+\t\t\t\t\t 0,\n+\t\t\t\t\t SAD1_RATE_176400_MASK,\n+\t\t\t\t\t SAD1_RATE_192000_MASK);\n+\tdefault:\n+\t\t/* TODO adjust for other compressed formats as well */\n+\t\treturn sad[1] & SAD1_RATE_MASK;\n+\t}\n+}\n+\n static unsigned int sad_max_channels(const u8 *sad)\n {\n-\treturn 1 + (sad[0] & 7);\n+\tswitch (FIELD_GET(SAD0_FORMAT_MASK, sad[0])) {\n+\tcase HDMI_AUDIO_CODING_TYPE_PCM:\n+\t\treturn 1 + FIELD_GET(SAD0_CHANNELS_MASK, sad[0]);\n+\tcase HDMI_AUDIO_CODING_TYPE_AC3:\n+\tcase HDMI_AUDIO_CODING_TYPE_DTS:\n+\tcase HDMI_AUDIO_CODING_TYPE_EAC3:\n+\t\treturn 2;\n+\tcase HDMI_AUDIO_CODING_TYPE_DTS_HD:\n+\tcase HDMI_AUDIO_CODING_TYPE_MLP:\n+\t\treturn 8;\n+\tdefault:\n+\t\t/* TODO adjust for other compressed formats as well */\n+\t\treturn 1 + FIELD_GET(SAD0_CHANNELS_MASK, sad[0]);\n+\t}\n }\n \n static int eld_limit_rates(struct snd_pcm_hw_params *params,\n@@ -42,7 +109,7 @@ static int eld_limit_rates(struct snd_pcm_hw_params *params,\n \t\t\t * requested number of channels.\n \t\t\t */\n \t\t\tif (c->min <= max_channels)\n-\t\t\t\trate_mask |= sad[1];\n+\t\t\t\trate_mask |= sad_rate_mask(sad);\n \t\t}\n \t}\n \n@@ -70,7 +137,7 @@ static int eld_limit_channels(struct snd_pcm_hw_params *params,\n \t\t\t\trate_mask |= BIT(i);\n \n \t\tfor (i = drm_eld_sad_count(eld); i > 0; i--, sad += 3)\n-\t\t\tif (rate_mask & sad[1])\n+\t\t\tif (rate_mask & sad_rate_mask(sad))\n \t\t\t\tt.max = max(t.max, sad_max_channels(sad));\n \t}\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "packages/linux/patches/default/linux-021-ASoC-hdmi-codec-don-t-set-channel-and-speaker-info-f.patch",
    "content": "From 99586e3f502fcc4fdd21b621f3c87ae7a8f7c170 Mon Sep 17 00:00:00 2001\nFrom: Matthias Reichl <hias@horus.com>\nDate: Sat, 3 Jun 2023 12:12:28 +0200\nSubject: [PATCH 2/2] ASoC: hdmi-codec: don't set channel and speaker info for\n compressed formats\n\nCTA 861 only mandates that the speaker allocation in the audio info frame\nis set for multichannel PCM formats. Likewise the number of channels in the\naudio infoframe is only relevant for PCM.\n\nSome TVs won't decode compressed formats if the number of channels isn't\nset to 0 (refer to stream header) and the speaker allocation is set to the\ndefault 0 (FL and FR).\n\nSo fill in this info only for PCM audio and set it to 0 for compressed\naudio formats.\n\nThis also prevents hdmi_codec_prepare failing with an error when trying to\nplay back DTS-HD or MLP (which is passed through as 8ch) if the sink only\nsupports 2ch PCM and announces only FL/FR speaker support in the EDID.\n\nSigned-off-by: Matthias Reichl <hias@horus.com>\n---\n sound/soc/codecs/hdmi-codec.c | 36 +++++++++++++++++++++++------------\n 1 file changed, 24 insertions(+), 12 deletions(-)\n\ndiff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c\nindex 0b1cdb2d60498..a192d985c5f18 100644\n--- a/sound/soc/codecs/hdmi-codec.c\n+++ b/sound/soc/codecs/hdmi-codec.c\n@@ -484,31 +484,43 @@ static int hdmi_codec_fill_codec_params(struct snd_soc_dai *dai,\n \t\t\t\t\tstruct hdmi_codec_params *hp)\n {\n \tstruct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);\n-\tint idx;\n-\n-\t/* Select a channel allocation that matches with ELD and pcm channels */\n-\tidx = hdmi_codec_get_ch_alloc_table_idx(hcp, channels);\n-\tif (idx < 0) {\n-\t\tdev_err(dai->dev, \"Not able to map channels to speakers (%d)\\n\",\n-\t\t\tidx);\n-\t\thcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN;\n-\t\treturn idx;\n+\tint idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN;\n+\tu8 ca_id = 0;\n+\tbool pcm_audio = !(hcp->iec_status[0] & IEC958_AES0_NONAUDIO);\n+\n+\tif (pcm_audio) {\n+\t\t/* Select a channel allocation that matches with ELD and pcm channels */\n+\t\tidx = hdmi_codec_get_ch_alloc_table_idx(hcp, channels);\n+\n+\t\tif (idx < 0) {\n+\t\t\tdev_err(dai->dev, \"Not able to map channels to speakers (%d)\\n\",\n+\t\t\t\tidx);\n+\t\t\thcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN;\n+\t\t\treturn idx;\n+\t\t}\n+\n+\t\tca_id = hdmi_codec_channel_alloc[idx].ca_id;\n \t}\n \n \tmemset(hp, 0, sizeof(*hp));\n \n \thdmi_audio_infoframe_init(&hp->cea);\n-\thp->cea.channels = channels;\n+\n+\tif (pcm_audio)\n+\t\thp->cea.channels = channels;\n+\telse\n+\t\thp->cea.channels = 0;\n+\n \thp->cea.coding_type = HDMI_AUDIO_CODING_TYPE_STREAM;\n \thp->cea.sample_size = HDMI_AUDIO_SAMPLE_SIZE_STREAM;\n \thp->cea.sample_frequency = HDMI_AUDIO_SAMPLE_FREQUENCY_STREAM;\n-\thp->cea.channel_allocation = hdmi_codec_channel_alloc[idx].ca_id;\n+\thp->cea.channel_allocation = ca_id;\n \n \thp->sample_width = sample_width;\n \thp->sample_rate = sample_rate;\n \thp->channels = channels;\n \n-\thcp->chmap_idx = hdmi_codec_channel_alloc[idx].ca_id;\n+\thcp->chmap_idx = idx;\n \n \treturn 0;\n }\n-- \n2.39.2\n\n"
  },
  {
    "path": "packages/linux/patches/default/linux-022-ASoC-hdmi-codec-Fix-broken-channel-map-reporting.patch",
    "content": "From 5e4400b24fc1f8ad41bccb6a6bdb54b961526556 Mon Sep 17 00:00:00 2001\nFrom: Matthias Reichl <hias@horus.com>\nDate: Thu, 7 Sep 2023 20:33:25 +0200\nSubject: [PATCH] ASoC: hdmi-codec: Fix broken channel map reporting\n\nCommit 4e0871333661 (\"ASoC: hdmi-codec: fix channel info for\ncompressed formats\") accidentally changed hcp->chmap_idx from\nca_id, the CEA channel allocation ID, to idx, the index to\nthe table of channel mappings ordered by preference.\n\nThis resulted in wrong channel maps being reported to userspace,\neg for 5.1 \"FL,FR,LFE,FC\" was reported instead of the expected\n\"FL,FR,LFE,FC,RL,RR\":\n\n~ # speaker-test -c 6 -t sine\n...\n 0 - Front Left\n 3 - Front Center\n 1 - Front Right\n 2 - LFE\n 4 - Unknown\n 5 - Unknown\n\n~ # amixer cget iface=PCM,name='Playback Channel Map' | grep ': values'\n  : values=3,4,8,7,0,0,0,0\n\nSwitch this back to ca_id in case of PCM audio so the correct channel\nmap is reported again and set it to HDMI_CODEC_CHMAP_IDX_UNKNOWN in\ncase of non-PCM audio so the PCM channel map control returns \"Unknown\"\nchannels (value 0).\n\nFixes: 4e0871333661 (\"ASoC: hdmi-codec: fix channel info for compressed formats\")\nCc: stable@vger.kernel.org\nSigned-off-by: Matthias Reichl <hias@horus.com>\n---\n sound/soc/codecs/hdmi-codec.c | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c\nindex 13689e718d36f..09eef6042aad6 100644\n--- a/sound/soc/codecs/hdmi-codec.c\n+++ b/sound/soc/codecs/hdmi-codec.c\n@@ -531,7 +531,10 @@ static int hdmi_codec_fill_codec_params(struct snd_soc_dai *dai,\n \thp->sample_rate = sample_rate;\n \thp->channels = channels;\n \n-\thcp->chmap_idx = idx;\n+\tif (pcm_audio)\n+\t\thcp->chmap_idx = ca_id;\n+\telse\n+\t\thcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN;\n \n \treturn 0;\n }\n-- \n2.39.2\n\n"
  },
  {
    "path": "packages/linux/patches/default/linux-051-ouya_controller_support.patch",
    "content": "commit 5a596921a4636e62843a59b7eab7b87b70a6d296\nAuthor: Lukas Rusak <lorusak@gmail.com>\nDate:   Sun May 6 22:03:11 2018 -0700\n\n    HID: add ouya HID driver\n    \n    This driver is a simple implementation to get the controller working and mapped properly.\n    This driver does not include functionality for the touchpad (yet). The original driver\n    was taken from from the ouya linux tree and has been simplified. It seems there may have\n    been other versions of the controller present that had a broken report descriptor. I have\n    removed that for now.\n\ndiff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig\nindex 60252fd796f6..6be2c454e72e 100644\n--- a/drivers/hid/Kconfig\n+++ b/drivers/hid/Kconfig\n@@ -659,6 +659,12 @@ config HID_ORTEK\n \t   - Ortek WKB-2000\n \t   - Skycable wireless presenter\n \n+config HID_OUYA\n+\ttristate \"OUYA Game Controller\"\n+\tdepends on USB_HID\n+\thelp\n+\t  Support for OUYA Game Controller.\n+\n config HID_PANTHERLORD\n \ttristate \"Pantherlord/GreenAsia game controller\"\n \tdepends on HID\ndiff --git a/drivers/hid/Makefile b/drivers/hid/Makefile\nindex 17a8bd97da9d..4425890934e4 100644\n--- a/drivers/hid/Makefile\n+++ b/drivers/hid/Makefile\n@@ -71,6 +71,7 @@ obj-$(CONFIG_HID_MULTITOUCH)\t+= hid-multitouch.o\n obj-$(CONFIG_HID_NTI)\t\t\t+= hid-nti.o\n obj-$(CONFIG_HID_NTRIG)\t\t+= hid-ntrig.o\n obj-$(CONFIG_HID_ORTEK)\t\t+= hid-ortek.o\n+obj-$(CONFIG_HID_OUYA)\t\t+= hid-ouya.o\n obj-$(CONFIG_HID_PRODIKEYS)\t+= hid-prodikeys.o\n obj-$(CONFIG_HID_PANTHERLORD)\t+= hid-pl.o\n obj-$(CONFIG_HID_PENMOUNT)\t+= hid-penmount.o\ndiff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h\nindex 0b5cc910f62e..0528efb825fa 100644\n--- a/drivers/hid/hid-ids.h\n+++ b/drivers/hid/hid-ids.h\n@@ -859,6 +859,9 @@\n #define USB_DEVICE_ID_ORTEK_WKB2000\t0x2000\n #define USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S\t0x8003\n \n+#define USB_VENDOR_ID_OUYA 0x2836\n+#define USB_DEVICE_ID_OUYA_CONTROLLER 0x0001\n+\n #define USB_VENDOR_ID_PLANTRONICS\t0x047f\n \n #define USB_VENDOR_ID_PANASONIC\t\t0x04da\ndiff --git a/drivers/hid/hid-ouya.c b/drivers/hid/hid-ouya.c\nnew file mode 100644\nindex 000000000000..4344a47b40af\n--- /dev/null\n+++ b/drivers/hid/hid-ouya.c\n@@ -0,0 +1,131 @@\n+/*\n+ *  HID driver for OUYA Game Controller(s)\n+ *\n+ *  Copyright (c) 2013 OUYA\n+ *  Copyright (c) 2013 Gregorios Leach <optikflux@gmail.com>\n+ *  Copyright (c) 2018 Lukas Rusak <lorusak@gmail.com>\n+ */\n+\n+#include <linux/device.h>\n+#include <linux/hid.h>\n+#include <linux/input.h>\n+#include <linux/module.h>\n+\n+#include \"hid-ids.h\"\n+\n+static const unsigned int ouya_absmap[] = {\n+\t[0x30] = ABS_X,\t\t/* left stick X */\n+\t[0x31] = ABS_Y,\t\t/* left stick Y */\n+\t[0x32] = ABS_Z,\t\t/* L2 */\n+\t[0x33] = ABS_RX,\t/* right stick X */\n+\t[0x34] = ABS_RY,\t/* right stick Y */\n+\t[0x35] = ABS_RZ,\t/* R2 */\n+};\n+\n+static const unsigned int ouya_keymap[] = {\n+\t[0x1] = BTN_SOUTH,\t/* O */\n+\t[0x2] = BTN_WEST,\t/* U */\n+\t[0x3] = BTN_NORTH,\t/* Y */\n+\t[0x4] = BTN_EAST,\t/* A */\n+\t[0x5] = BTN_TL,\t\t/* L1 */\n+\t[0x6] = BTN_TR,\t\t/* R1 */\n+\t[0x7] = BTN_THUMBL,\t/* L3 */\n+\t[0x8] = BTN_THUMBR,\t/* R3 */\n+\t[0x9] = BTN_DPAD_UP,\t/* Up */\n+\t[0xa] = BTN_DPAD_DOWN,\t/* Down */\n+\t[0xb] = BTN_DPAD_LEFT,\t/* Left */\n+\t[0xc] = BTN_DPAD_RIGHT, /* Right */\n+\t[0xd] = BTN_TL2,\t/* L2 */\n+\t[0xe] = BTN_TR2,\t/* R2 */\n+\t[0xf] = BTN_MODE,\t/* Power */\n+};\n+\n+static int ouya_input_mapping(struct hid_device *hdev, struct hid_input *hi,\n+\t\t\t       struct hid_field *field, struct hid_usage *usage,\n+\t\t\t       unsigned long **bit, int *max)\n+{\n+\tif ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) {\n+\t\tunsigned int key = usage->hid & HID_USAGE;\n+\n+\t\tif (key >= ARRAY_SIZE(ouya_keymap))\n+\t\t\treturn -1;\n+\n+\t\tkey = ouya_keymap[key];\n+\t\thid_map_usage_clear(hi, usage, bit, max, EV_KEY, key);\n+\n+\t\treturn 1;\n+\n+\t} else if ((usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK) {\n+\t\tunsigned int abs = usage->hid & HID_USAGE;\n+\n+\t\tif (abs >= ARRAY_SIZE(ouya_absmap))\n+\t\t\treturn -1;\n+\n+\t\tabs = ouya_absmap[abs];\n+\t\thid_map_usage_clear(hi, usage, bit, max, EV_ABS, abs);\n+\n+\t\treturn 1;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int ouya_probe(struct hid_device *hdev, const struct hid_device_id *id)\n+{\n+\tint ret;\n+\n+\tret = hid_parse(hdev);\n+\tif (ret) {\n+\t\thid_err(hdev, \"parse failed\\n\");\n+\t\tgoto err_free;\n+\t}\n+\n+\tret = hid_hw_start(hdev, HID_CONNECT_DEFAULT | HID_CONNECT_HIDDEV_FORCE);\n+\tif (ret) {\n+\t\thid_err(hdev, \"hw start failed\\n\");\n+\t\tgoto err_free;\n+\t}\n+\n+\treturn 0;\n+\n+err_free:\n+\treturn ret;\n+}\n+\n+static void ouya_remove(struct hid_device *hdev)\n+{\n+\thid_hw_stop(hdev);\n+\tkfree(hid_get_drvdata(hdev));\n+}\n+\n+static const struct hid_device_id ouya_devices[] = {\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },\n+\t{ }\n+};\n+MODULE_DEVICE_TABLE(hid, ouya_devices);\n+\n+static struct hid_driver ouya_driver = {\n+\t.name = \"ouya\",\n+\t.id_table = ouya_devices,\n+\t.input_mapping = ouya_input_mapping,\n+\t.probe = ouya_probe,\n+\t.remove = ouya_remove,\n+};\n+\n+static int __init ouya_init(void)\n+{\n+\treturn hid_register_driver(&ouya_driver);\n+}\n+\n+static void __exit ouya_exit(void)\n+{\n+\thid_unregister_driver(&ouya_driver);\n+}\n+\n+module_init(ouya_init);\n+module_exit(ouya_exit);\n+\n+MODULE_LICENSE(\"GPL\");\n+MODULE_AUTHOR(\"Lukas Rusak <lorusak@gmail.com>\");\n+MODULE_AUTHOR(\"Gregorios Leach <optikflux@gmail.com>\");\n+MODULE_DESCRIPTION(\"Ouya Controller Driver\");\ndiff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c\nindex 587e2681a53f..b5adc13e0df1 100644\n--- a/drivers/hid/hid-quirks.c\n+++ b/drivers/hid/hid-quirks.c\n@@ -538,6 +538,9 @@ static const struct hid_device_id hid_have_special_driver[] = {\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },\n #endif\n+#if IS_ENABLED(CONFIG_HID_OUYA)\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },\n+#endif\n #if IS_ENABLED(CONFIG_HID_PANTHERLORD)\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },\n"
  },
  {
    "path": "packages/linux/patches/default/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch",
    "content": "From 7051422474e4c4e302ede3d07ffd8ef2682e07a2 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Tue, 22 Apr 2014 16:05:14 +0300\nSubject: [PATCH] [RFC] hid/sony: add autorepeat for PS3 remotes\n\nadapted to 4.6\n\nBetreff: [RFC] hid/sony: add autorepeat for PS3 remotes\nVon: David Dillow <dave@thedillows.org>\nDatum: 28.06.2013 04:28\nAn: linux-input@vger.kernel.org\nKopie (CC): Stephan Raue <stephan@openelec.tv>\n\nSome applications using the PS3 remote would like to have autorepeat\nfrom the device. Use the input subsystem's software emulation to provide\nthis capability, and enable those that don't need it to turn it off.\n---\nI'm not sure this is the correct approach, or if it is even appropriate\nfor a remote to do autorepeat. However, the media/rc subsystem does do\nit by default, and it's been requested by users, so there is at least\nsome demand.\n\nThis compiled against the hid-sony driver with the PS3 remote changes\nmerged, but I have done no testing of it. If the approach seems\nreasonable, I'll try to test it when the MythTV is idle.\n\nSigned-off-by: Matt DeVillier <matt.devillier@gmail.com>\n---\n drivers/hid/hid-sony.c | 21 +++++++++++++++++++++\n 1 file changed, 21 insertions(+)\n\ndiff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c\nindex 310436a..84f7f41 100644\n--- a/drivers/hid/hid-sony.c\n+++ b/drivers/hid/hid-sony.c\n@@ -1120,6 +1120,25 @@ static int ps3remote_mapping(struct hid_device *hdev, struct hid_input *hi,\n \treturn 1;\n }\n \n+static int ps3remote_setup_repeat(struct hid_device *hdev)\n+{\n+\tstruct hid_input *hidinput = list_first_entry(&hdev->inputs,\n+\t\t\t\t\t\t struct hid_input, list);\n+\tstruct input_dev *input = hidinput->input;\n+\n+\t/*\n+\t * Set up autorepeat defaults per the remote control subsystem;\n+\t * this must be done after hid_hw_start(), as having these non-zero\n+\t * at the time of input_register_device() tells the input system that\n+\t * the hardware does the autorepeat, and the PS3 remote does not.\n+\t*/\n+\tset_bit(EV_REP, input->evbit);\n+\tinput->rep[REP_DELAY]  = 500;\n+\tinput->rep[REP_PERIOD] = 125;\n+\n+\treturn 0;\n+}\n+\n static u8 *sony_report_fixup(struct hid_device *hdev, u8 *rdesc,\n \t\tunsigned int *rsize)\n {\n@@ -2372,6 +2391,8 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)\n \t\tsony_init_output_report(sc, dualshock4_send_output_report);\n \t} else if (sc->quirks & MOTION_CONTROLLER) {\n \t\tsony_init_output_report(sc, motion_send_output_report);\n+\t} else if (sc->quirks & PS3REMOTE) {\n+\t\tret = ps3remote_setup_repeat(hdev);\n \t} else {\n \t\tret = 0;\n \t}\n-- \n2.5.0\n"
  },
  {
    "path": "packages/linux/patches/default/linux-062-imon_pad_ignore_diagonal.patch",
    "content": "diff -Naur linux-3.16.1/drivers/media/rc/imon.c linux-3.16.1.patch/drivers/media/rc/imon.c\n--- linux-3.16.1/drivers/media/rc/imon.c\t2014-08-14 04:36:35.000000000 +0200\n+++ linux-3.16.1.patch/drivers/media/rc/imon.c\t2014-08-15 13:57:16.587620642 +0200\n@@ -1344,6 +1344,17 @@\n \t\t\t}\n \t\t} else {\n \t\t\t/*\n+\t\t\t * For users without stabilized, just ignore any value getting\n+\t\t\t * to close to the diagonal.\n+\t\t\t */\n+\t\t\tif ((abs(rel_y) < 2 && abs(rel_x) < 2) ||\n+\t\t\t\tabs(abs(rel_y) - abs(rel_x)) < 2 ) {\n+\t\t\t\tspin_lock_irqsave(&ictx->kc_lock, flags);\n+\t\t\t\tictx->kc = KEY_UNKNOWN;\n+\t\t\t\tspin_unlock_irqrestore(&ictx->kc_lock, flags);\n+\t\t\t\treturn;\n+\t\t\t}\n+\t\t\t/*\n \t\t\t * Hack alert: instead of using keycodes, we have\n \t\t\t * to use hard-coded scancodes here...\n \t\t\t */\n"
  },
  {
    "path": "packages/linux/patches/default/linux-121-rtw88-linux-next-6-2.patch",
    "content": "From 823092a53556ebf8656623d0e857626d30fe1e18 Mon Sep 17 00:00:00 2001\nFrom: Ji-Pin Jou <neo_jou@realtek.com>\nDate: Thu, 24 Nov 2022 14:44:42 +0800\nSubject: wifi: rtw88: fix race condition when doing H2C command\n\nFor SDIO/USB interface, since the tranferring speed is slower than\nthat in PCIE, it may have race condition when the driver sets down\nH2C command to the FW.\n\nIn the function rtw_fw_send_h2c_command, before the patch, box_reg\nis written first, then box_ex_reg is written. FW starts to work and\nfetch the value of box_ex_reg,  when the most significant byte of\nbox_reg(4 bytes) is written. Meanwhile, for SDIO/USB interface,\nsince the transferring speed is slow, the driver is still in writing\nthe new value of box_ex_reg through the bus, and FW may get the\nwrong value of box_ex_reg at the moment.\n\nTo prevent the above driver/FW racing situation, box_ex_reg is\nwritten first then box_reg. Furthermore, it is written in 4 bytes at\na time, instead of written in one byte one by one. It can increase\nthe speed for SDIO/USB interface.\n\nSigned-off-by: Ji-Pin Jou <neo_jou@realtek.com>\nSigned-off-by: Ping-Ke Shih <pkshih@realtek.com>\nTested-by: Sascha Hauer <s.hauer@pengutronix.de>\nSigned-off-by: Kalle Valo <kvalo@kernel.org>\nLink: https://lore.kernel.org/r/20221124064442.28042-1-pkshih@realtek.com\n---\n drivers/net/wireless/realtek/rtw88/fw.c | 8 +++-----\n drivers/net/wireless/realtek/rtw88/fw.h | 5 +++++\n 2 files changed, 8 insertions(+), 5 deletions(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/fw.c b/drivers/net/wireless/realtek/rtw88/fw.c\nindex 0b5f903c0f366..b290811d75e1c 100644\n--- a/drivers/net/wireless/realtek/rtw88/fw.c\n+++ b/drivers/net/wireless/realtek/rtw88/fw.c\n@@ -311,10 +311,10 @@ EXPORT_SYMBOL(rtw_fw_c2h_cmd_isr);\n static void rtw_fw_send_h2c_command(struct rtw_dev *rtwdev,\n \t\t\t\t    u8 *h2c)\n {\n+\tstruct rtw_h2c_cmd *h2c_cmd = (struct rtw_h2c_cmd *)h2c;\n \tu8 box;\n \tu8 box_state;\n \tu32 box_reg, box_ex_reg;\n-\tint idx;\n \tint ret;\n \n \trtw_dbg(rtwdev, RTW_DBG_FW,\n@@ -356,10 +356,8 @@ static void rtw_fw_send_h2c_command(struct rtw_dev *rtwdev,\n \t\tgoto out;\n \t}\n \n-\tfor (idx = 0; idx < 4; idx++)\n-\t\trtw_write8(rtwdev, box_reg + idx, h2c[idx]);\n-\tfor (idx = 0; idx < 4; idx++)\n-\t\trtw_write8(rtwdev, box_ex_reg + idx, h2c[idx + 4]);\n+\trtw_write32(rtwdev, box_ex_reg, le32_to_cpu(h2c_cmd->msg_ext));\n+\trtw_write32(rtwdev, box_reg, le32_to_cpu(h2c_cmd->msg));\n \n \tif (++rtwdev->h2c.last_box_num >= 4)\n \t\trtwdev->h2c.last_box_num = 0;\ndiff --git a/drivers/net/wireless/realtek/rtw88/fw.h b/drivers/net/wireless/realtek/rtw88/fw.h\nindex a5a965803a3cc..bca610dc99ab7 100644\n--- a/drivers/net/wireless/realtek/rtw88/fw.h\n+++ b/drivers/net/wireless/realtek/rtw88/fw.h\n@@ -81,6 +81,11 @@ struct rtw_c2h_adaptivity {\n \tu8 option;\n } __packed;\n \n+struct rtw_h2c_cmd {\n+\t__le32 msg;\n+\t__le32 msg_ext;\n+} __packed;\n+\n enum rtw_rsvd_packet_type {\n \tRSVD_BEACON,\n \tRSVD_DUMMY,\n-- \ncgit \n\nFrom 1d89660494402168565e0637268486ae28bad642 Mon Sep 17 00:00:00 2001\nFrom: Sascha Hauer <s.hauer@pengutronix.de>\nDate: Fri, 2 Dec 2022 09:12:14 +0100\nSubject: wifi: rtw88: print firmware type in info message\n\nIt's confusing to read two different firmware versions in the syslog\nfor the same device:\n\nrtw_8822cu 2-1:1.2: Firmware version 9.9.4, H2C version 15\nrtw_8822cu 2-1:1.2: Firmware version 9.9.11, H2C version 15\n\nPrint the firmware type in this message to make clear these are really\ntwo different firmwares for different purposes:\n\nrtw_8822cu 1-1.4:1.2: WOW Firmware version 9.9.4, H2C version 15\nrtw_8822cu 1-1.4:1.2: Firmware version 9.9.11, H2C version 15\n\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>\nReviewed-by: Ping-Ke Shih <pkshih@realtek.com>\nSigned-off-by: Kalle Valo <kvalo@kernel.org>\nLink: https://lore.kernel.org/r/20221202081224.2779981-2-s.hauer@pengutronix.de\n---\n drivers/net/wireless/realtek/rtw88/main.c | 4 +++-\n drivers/net/wireless/realtek/rtw88/main.h | 1 +\n 2 files changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c\nindex 67151dbf83842..a7331872e8530 100644\n--- a/drivers/net/wireless/realtek/rtw88/main.c\n+++ b/drivers/net/wireless/realtek/rtw88/main.c\n@@ -1731,7 +1731,8 @@ static void rtw_load_firmware_cb(const struct firmware *firmware, void *context)\n \tupdate_firmware_info(rtwdev, fw);\n \tcomplete_all(&fw->completion);\n \n-\trtw_info(rtwdev, \"Firmware version %u.%u.%u, H2C version %u\\n\",\n+\trtw_info(rtwdev, \"%sFirmware version %u.%u.%u, H2C version %u\\n\",\n+\t\t fw->type == RTW_WOWLAN_FW ? \"WOW \" : \"\",\n \t\t fw->version, fw->sub_version, fw->sub_index, fw->h2c_version);\n }\n \n@@ -1757,6 +1758,7 @@ static int rtw_load_firmware(struct rtw_dev *rtwdev, enum rtw_fw_type type)\n \t\treturn -ENOENT;\n \t}\n \n+\tfw->type = type;\n \tfw->rtwdev = rtwdev;\n \tinit_completion(&fw->completion);\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h\nindex bccd7b28f60c7..6e5875f6d07f4 100644\n--- a/drivers/net/wireless/realtek/rtw88/main.h\n+++ b/drivers/net/wireless/realtek/rtw88/main.h\n@@ -1851,6 +1851,7 @@ struct rtw_fw_state {\n \tu16 h2c_version;\n \tu32 feature;\n \tu32 feature_ext;\n+\tenum rtw_fw_type type;\n };\n \n enum rtw_sar_sources {\n-- \ncgit \n\nFrom 69020957bcb783184af1a86c8483139557cec751 Mon Sep 17 00:00:00 2001\nFrom: Sascha Hauer <s.hauer@pengutronix.de>\nDate: Fri, 2 Dec 2022 09:12:15 +0100\nSubject: wifi: rtw88: Call rtw_fw_beacon_filter_config() with rtwdev->mutex\n held\n\nrtw_fw_beacon_filter_config() is called once with rtwdev->mutex held\nand once without the mutex held. Call it consistently with rtwdev->mutex\nheld.\n\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>\nReviewed-by: Ping-Ke Shih <pkshih@realtek.com>\nSigned-off-by: Kalle Valo <kvalo@kernel.org>\nLink: https://lore.kernel.org/r/20221202081224.2779981-3-s.hauer@pengutronix.de\n---\n drivers/net/wireless/realtek/rtw88/mac80211.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c\nindex 07578ccc4bab3..776a9a9884b5d 100644\n--- a/drivers/net/wireless/realtek/rtw88/mac80211.c\n+++ b/drivers/net/wireless/realtek/rtw88/mac80211.c\n@@ -487,8 +487,8 @@ static int rtw_ops_sta_remove(struct ieee80211_hw *hw,\n {\n \tstruct rtw_dev *rtwdev = hw->priv;\n \n-\trtw_fw_beacon_filter_config(rtwdev, false, vif);\n \tmutex_lock(&rtwdev->mutex);\n+\trtw_fw_beacon_filter_config(rtwdev, false, vif);\n \trtw_sta_remove(rtwdev, sta, true);\n \tmutex_unlock(&rtwdev->mutex);\n \n-- \ncgit \n\nFrom d57ca103e54e2b3eea7e2603548c58bcc4155541 Mon Sep 17 00:00:00 2001\nFrom: Sascha Hauer <s.hauer@pengutronix.de>\nDate: Fri, 2 Dec 2022 09:12:16 +0100\nSubject: wifi: rtw88: Drop rf_lock\n\nThe rtwdev->rf_lock spinlock protects the rf register accesses in\nrtw_read_rf() and rtw_write_rf(). Most callers of these functions hold\nrtwdev->mutex already with the exception of the callsites in the debugfs\ncode. The debugfs code doesn't justify an extra lock, so acquire the mutex\nthere as well before calling rf register accessors and drop the now\nunnecessary spinlock.\n\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>\nReviewed-by: Ping-Ke Shih <pkshih@realtek.com>\nSigned-off-by: Kalle Valo <kvalo@kernel.org>\nLink: https://lore.kernel.org/r/20221202081224.2779981-4-s.hauer@pengutronix.de\n---\n drivers/net/wireless/realtek/rtw88/debug.c | 11 +++++++++++\n drivers/net/wireless/realtek/rtw88/hci.h   |  9 +++------\n drivers/net/wireless/realtek/rtw88/main.c  |  1 -\n drivers/net/wireless/realtek/rtw88/main.h  |  3 ---\n 4 files changed, 14 insertions(+), 10 deletions(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c\nindex 9ebe544e51d0d..70e19f2a1a355 100644\n--- a/drivers/net/wireless/realtek/rtw88/debug.c\n+++ b/drivers/net/wireless/realtek/rtw88/debug.c\n@@ -144,7 +144,9 @@ static int rtw_debugfs_get_rf_read(struct seq_file *m, void *v)\n \taddr = debugfs_priv->rf_addr;\n \tmask = debugfs_priv->rf_mask;\n \n+\tmutex_lock(&rtwdev->mutex);\n \tval = rtw_read_rf(rtwdev, path, addr, mask);\n+\tmutex_unlock(&rtwdev->mutex);\n \n \tseq_printf(m, \"rf_read path:%d addr:0x%08x mask:0x%08x val=0x%08x\\n\",\n \t\t   path, addr, mask, val);\n@@ -414,7 +416,9 @@ static ssize_t rtw_debugfs_set_rf_write(struct file *filp,\n \t\treturn count;\n \t}\n \n+\tmutex_lock(&rtwdev->mutex);\n \trtw_write_rf(rtwdev, path, addr, mask, val);\n+\tmutex_unlock(&rtwdev->mutex);\n \trtw_dbg(rtwdev, RTW_DBG_DEBUGFS,\n \t\t\"write_rf path:%d addr:0x%08x mask:0x%08x, val:0x%08x\\n\",\n \t\tpath, addr, mask, val);\n@@ -519,6 +523,8 @@ static int rtw_debug_get_rf_dump(struct seq_file *m, void *v)\n \tu32 addr, offset, data;\n \tu8 path;\n \n+\tmutex_lock(&rtwdev->mutex);\n+\n \tfor (path = 0; path < rtwdev->hal.rf_path_num; path++) {\n \t\tseq_printf(m, \"RF path:%d\\n\", path);\n \t\tfor (addr = 0; addr < 0x100; addr += 4) {\n@@ -533,6 +539,8 @@ static int rtw_debug_get_rf_dump(struct seq_file *m, void *v)\n \t\tseq_puts(m, \"\\n\");\n \t}\n \n+\tmutex_unlock(&rtwdev->mutex);\n+\n \treturn 0;\n }\n \n@@ -1026,6 +1034,8 @@ static void dump_gapk_status(struct rtw_dev *rtwdev, struct seq_file *m)\n \t\t   dm_info->dm_flags & BIT(RTW_DM_CAP_TXGAPK) ? '-' : '+',\n \t\t   rtw_dm_cap_strs[RTW_DM_CAP_TXGAPK]);\n \n+\tmutex_lock(&rtwdev->mutex);\n+\n \tfor (path = 0; path < rtwdev->hal.rf_path_num; path++) {\n \t\tval = rtw_read_rf(rtwdev, path, RF_GAINTX, RFREG_MASK);\n \t\tseq_printf(m, \"path %d:\\n0x%x = 0x%x\\n\", path, RF_GAINTX, val);\n@@ -1035,6 +1045,7 @@ static void dump_gapk_status(struct rtw_dev *rtwdev, struct seq_file *m)\n \t\t\t\t   txgapk->rf3f_fs[path][i], i);\n \t\tseq_puts(m, \"\\n\");\n \t}\n+\tmutex_unlock(&rtwdev->mutex);\n }\n \n static int rtw_debugfs_get_dm_cap(struct seq_file *m, void *v)\ndiff --git a/drivers/net/wireless/realtek/rtw88/hci.h b/drivers/net/wireless/realtek/rtw88/hci.h\nindex 4c6fc6fb3f83b..830d7532f2a35 100644\n--- a/drivers/net/wireless/realtek/rtw88/hci.h\n+++ b/drivers/net/wireless/realtek/rtw88/hci.h\n@@ -166,12 +166,11 @@ static inline u32\n rtw_read_rf(struct rtw_dev *rtwdev, enum rtw_rf_path rf_path,\n \t    u32 addr, u32 mask)\n {\n-\tunsigned long flags;\n \tu32 val;\n \n-\tspin_lock_irqsave(&rtwdev->rf_lock, flags);\n+\tlockdep_assert_held(&rtwdev->mutex);\n+\n \tval = rtwdev->chip->ops->read_rf(rtwdev, rf_path, addr, mask);\n-\tspin_unlock_irqrestore(&rtwdev->rf_lock, flags);\n \n \treturn val;\n }\n@@ -180,11 +179,9 @@ static inline void\n rtw_write_rf(struct rtw_dev *rtwdev, enum rtw_rf_path rf_path,\n \t     u32 addr, u32 mask, u32 data)\n {\n-\tunsigned long flags;\n+\tlockdep_assert_held(&rtwdev->mutex);\n \n-\tspin_lock_irqsave(&rtwdev->rf_lock, flags);\n \trtwdev->chip->ops->write_rf(rtwdev, rf_path, addr, mask, data);\n-\tspin_unlock_irqrestore(&rtwdev->rf_lock, flags);\n }\n \n static inline u32\ndiff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c\nindex a7331872e8530..710ddb0283c82 100644\n--- a/drivers/net/wireless/realtek/rtw88/main.c\n+++ b/drivers/net/wireless/realtek/rtw88/main.c\n@@ -2067,7 +2067,6 @@ int rtw_core_init(struct rtw_dev *rtwdev)\n \tskb_queue_head_init(&rtwdev->coex.queue);\n \tskb_queue_head_init(&rtwdev->tx_report.queue);\n \n-\tspin_lock_init(&rtwdev->rf_lock);\n \tspin_lock_init(&rtwdev->h2c.lock);\n \tspin_lock_init(&rtwdev->txq_lock);\n \tspin_lock_init(&rtwdev->tx_report.q_lock);\ndiff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h\nindex 6e5875f6d07f4..f24d17f482aaa 100644\n--- a/drivers/net/wireless/realtek/rtw88/main.h\n+++ b/drivers/net/wireless/realtek/rtw88/main.h\n@@ -1995,9 +1995,6 @@ struct rtw_dev {\n \t/* ensures exclusive access from mac80211 callbacks */\n \tstruct mutex mutex;\n \n-\t/* read/write rf register */\n-\tspinlock_t rf_lock;\n-\n \t/* watch dog every 2 sec */\n \tstruct delayed_work watch_dog_work;\n \tu32 watch_dog_cnt;\n-- \ncgit \n\nFrom 1e2701f4079a7906ff3fb43a315925d303e289d8 Mon Sep 17 00:00:00 2001\nFrom: Sascha Hauer <s.hauer@pengutronix.de>\nDate: Fri, 2 Dec 2022 09:12:17 +0100\nSubject: wifi: rtw88: Drop h2c.lock\n\nThe h2c.lock spinlock is used in rtw_fw_send_h2c_command() and\nrtw_fw_send_h2c_packet().  Most callers call this with rtwdev->mutex\nheld, except from one callsite in the debugfs code. The debugfs code\nalone doesn't justify the extra lock, so acquire rtwdev->mutex in\ndebugfs and drop the now unnecessary spinlock.\n\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>\nSigned-off-by: Kalle Valo <kvalo@kernel.org>\nLink: https://lore.kernel.org/r/20221202081224.2779981-5-s.hauer@pengutronix.de\n---\n drivers/net/wireless/realtek/rtw88/debug.c |  2 ++\n drivers/net/wireless/realtek/rtw88/fw.c    | 13 ++++---------\n drivers/net/wireless/realtek/rtw88/main.c  |  1 -\n drivers/net/wireless/realtek/rtw88/main.h  |  2 --\n 4 files changed, 6 insertions(+), 12 deletions(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c\nindex 70e19f2a1a355..f5b8a77ebc67b 100644\n--- a/drivers/net/wireless/realtek/rtw88/debug.c\n+++ b/drivers/net/wireless/realtek/rtw88/debug.c\n@@ -392,7 +392,9 @@ static ssize_t rtw_debugfs_set_h2c(struct file *filp,\n \t\treturn -EINVAL;\n \t}\n \n+\tmutex_lock(&rtwdev->mutex);\n \trtw_fw_h2c_cmd_dbg(rtwdev, param);\n+\tmutex_unlock(&rtwdev->mutex);\n \n \treturn count;\n }\ndiff --git a/drivers/net/wireless/realtek/rtw88/fw.c b/drivers/net/wireless/realtek/rtw88/fw.c\nindex 5e760c884f89d..82295ac6402ee 100644\n--- a/drivers/net/wireless/realtek/rtw88/fw.c\n+++ b/drivers/net/wireless/realtek/rtw88/fw.c\n@@ -322,7 +322,7 @@ static void rtw_fw_send_h2c_command(struct rtw_dev *rtwdev,\n \t\th2c[3], h2c[2], h2c[1], h2c[0],\n \t\th2c[7], h2c[6], h2c[5], h2c[4]);\n \n-\tspin_lock(&rtwdev->h2c.lock);\n+\tlockdep_assert_held(&rtwdev->mutex);\n \n \tbox = rtwdev->h2c.last_box_num;\n \tswitch (box) {\n@@ -344,7 +344,7 @@ static void rtw_fw_send_h2c_command(struct rtw_dev *rtwdev,\n \t\tbreak;\n \tdefault:\n \t\tWARN(1, \"invalid h2c mail box number\\n\");\n-\t\tgoto out;\n+\t\treturn;\n \t}\n \n \tret = read_poll_timeout_atomic(rtw_read8, box_state,\n@@ -353,7 +353,7 @@ static void rtw_fw_send_h2c_command(struct rtw_dev *rtwdev,\n \n \tif (ret) {\n \t\trtw_err(rtwdev, \"failed to send h2c command\\n\");\n-\t\tgoto out;\n+\t\treturn;\n \t}\n \n \trtw_write32(rtwdev, box_ex_reg, le32_to_cpu(h2c_cmd->msg_ext));\n@@ -361,9 +361,6 @@ static void rtw_fw_send_h2c_command(struct rtw_dev *rtwdev,\n \n \tif (++rtwdev->h2c.last_box_num >= 4)\n \t\trtwdev->h2c.last_box_num = 0;\n-\n-out:\n-\tspin_unlock(&rtwdev->h2c.lock);\n }\n \n void rtw_fw_h2c_cmd_dbg(struct rtw_dev *rtwdev, u8 *h2c)\n@@ -375,15 +372,13 @@ static void rtw_fw_send_h2c_packet(struct rtw_dev *rtwdev, u8 *h2c_pkt)\n {\n \tint ret;\n \n-\tspin_lock(&rtwdev->h2c.lock);\n+\tlockdep_assert_held(&rtwdev->mutex);\n \n \tFW_OFFLOAD_H2C_SET_SEQ_NUM(h2c_pkt, rtwdev->h2c.seq);\n \tret = rtw_hci_write_data_h2c(rtwdev, h2c_pkt, H2C_PKT_SIZE);\n \tif (ret)\n \t\trtw_err(rtwdev, \"failed to send h2c packet\\n\");\n \trtwdev->h2c.seq++;\n-\n-\tspin_unlock(&rtwdev->h2c.lock);\n }\n \n void\ndiff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c\nindex 710ddb0283c82..c98e56890401c 100644\n--- a/drivers/net/wireless/realtek/rtw88/main.c\n+++ b/drivers/net/wireless/realtek/rtw88/main.c\n@@ -2067,7 +2067,6 @@ int rtw_core_init(struct rtw_dev *rtwdev)\n \tskb_queue_head_init(&rtwdev->coex.queue);\n \tskb_queue_head_init(&rtwdev->tx_report.queue);\n \n-\tspin_lock_init(&rtwdev->h2c.lock);\n \tspin_lock_init(&rtwdev->txq_lock);\n \tspin_lock_init(&rtwdev->tx_report.q_lock);\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h\nindex f24d17f482aaa..4b57542bef1e9 100644\n--- a/drivers/net/wireless/realtek/rtw88/main.h\n+++ b/drivers/net/wireless/realtek/rtw88/main.h\n@@ -2020,8 +2020,6 @@ struct rtw_dev {\n \tstruct {\n \t\t/* incicate the mail box to use with fw */\n \t\tu8 last_box_num;\n-\t\t/* protect to send h2c to fw */\n-\t\tspinlock_t lock;\n \t\tu32 seq;\n \t} h2c;\n \n-- \ncgit \n\nFrom 8647f7f0b9080bc2d2f6e02524782f2f02f159bc Mon Sep 17 00:00:00 2001\nFrom: Sascha Hauer <s.hauer@pengutronix.de>\nDate: Fri, 2 Dec 2022 09:12:18 +0100\nSubject: wifi: rtw88: Drop coex mutex\n\ncoex->mutex is used in rtw_coex_info_request() only. Most callers of this\nfunction hold rtwdev->mutex already, except for one callsite in the\ndebugfs code. The debugfs code alone doesn't justify the extra lock, so\nacquire rtwdev->mutex there as well and drop the now unnecessary\nspinlock.\n\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>\nSigned-off-by: Kalle Valo <kvalo@kernel.org>\nLink: https://lore.kernel.org/r/20221202081224.2779981-6-s.hauer@pengutronix.de\n---\n drivers/net/wireless/realtek/rtw88/coex.c  | 3 +--\n drivers/net/wireless/realtek/rtw88/debug.c | 2 ++\n drivers/net/wireless/realtek/rtw88/main.c  | 2 --\n drivers/net/wireless/realtek/rtw88/main.h  | 2 --\n 4 files changed, 3 insertions(+), 6 deletions(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/coex.c b/drivers/net/wireless/realtek/rtw88/coex.c\nindex 6276ad6242991..38697237ee5f0 100644\n--- a/drivers/net/wireless/realtek/rtw88/coex.c\n+++ b/drivers/net/wireless/realtek/rtw88/coex.c\n@@ -633,7 +633,7 @@ static struct sk_buff *rtw_coex_info_request(struct rtw_dev *rtwdev,\n \tstruct rtw_coex *coex = &rtwdev->coex;\n \tstruct sk_buff *skb_resp = NULL;\n \n-\tmutex_lock(&coex->mutex);\n+\tlockdep_assert_held(&rtwdev->mutex);\n \n \trtw_fw_query_bt_mp_info(rtwdev, req);\n \n@@ -650,7 +650,6 @@ static struct sk_buff *rtw_coex_info_request(struct rtw_dev *rtwdev,\n \t}\n \n out:\n-\tmutex_unlock(&coex->mutex);\n \treturn skb_resp;\n }\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c\nindex f5b8a77ebc67b..fa3d73b333ba0 100644\n--- a/drivers/net/wireless/realtek/rtw88/debug.c\n+++ b/drivers/net/wireless/realtek/rtw88/debug.c\n@@ -841,7 +841,9 @@ static int rtw_debugfs_get_coex_info(struct seq_file *m, void *v)\n \tstruct rtw_debugfs_priv *debugfs_priv = m->private;\n \tstruct rtw_dev *rtwdev = debugfs_priv->rtwdev;\n \n+\tmutex_lock(&rtwdev->mutex);\n \trtw_coex_display_coex_info(rtwdev, m);\n+\tmutex_unlock(&rtwdev->mutex);\n \n \treturn 0;\n }\ndiff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c\nindex c98e56890401c..0a2ce7f50f412 100644\n--- a/drivers/net/wireless/realtek/rtw88/main.c\n+++ b/drivers/net/wireless/realtek/rtw88/main.c\n@@ -2071,7 +2071,6 @@ int rtw_core_init(struct rtw_dev *rtwdev)\n \tspin_lock_init(&rtwdev->tx_report.q_lock);\n \n \tmutex_init(&rtwdev->mutex);\n-\tmutex_init(&rtwdev->coex.mutex);\n \tmutex_init(&rtwdev->hal.tx_power_mutex);\n \n \tinit_waitqueue_head(&rtwdev->coex.wait);\n@@ -2143,7 +2142,6 @@ void rtw_core_deinit(struct rtw_dev *rtwdev)\n \t}\n \n \tmutex_destroy(&rtwdev->mutex);\n-\tmutex_destroy(&rtwdev->coex.mutex);\n \tmutex_destroy(&rtwdev->hal.tx_power_mutex);\n }\n EXPORT_SYMBOL(rtw_core_deinit);\ndiff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h\nindex 4b57542bef1e9..77fd48b6cc453 100644\n--- a/drivers/net/wireless/realtek/rtw88/main.h\n+++ b/drivers/net/wireless/realtek/rtw88/main.h\n@@ -1501,8 +1501,6 @@ struct rtw_coex_stat {\n };\n \n struct rtw_coex {\n-\t/* protects coex info request section */\n-\tstruct mutex mutex;\n \tstruct sk_buff_head queue;\n \twait_queue_head_t wait;\n \n-- \ncgit \n\nFrom 78d5bf925f30bf9f79a69ce77386902672defe68 Mon Sep 17 00:00:00 2001\nFrom: Sascha Hauer <s.hauer@pengutronix.de>\nDate: Fri, 2 Dec 2022 09:12:19 +0100\nSubject: wifi: rtw88: iterate over vif/sta list non-atomically\n\nThe driver uses ieee80211_iterate_active_interfaces_atomic()\nand ieee80211_iterate_stations_atomic() in several places and does\nregister accesses in the iterators. This doesn't cope with upcoming\nUSB support as registers can only be accessed non-atomically.\n\nSplit these into a two stage process: First use the atomic iterator\nfunctions to collect all active interfaces or stations on a list, then\niterate over the list non-atomically and call the iterator on each\nentry.\n\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>\nSuggested-by: Ping-Ke shih <pkshih@realtek.com>\nReviewed-by: Ping-Ke Shih <pkshih@realtek.com>\nSigned-off-by: Kalle Valo <kvalo@kernel.org>\nLink: https://lore.kernel.org/r/20221202081224.2779981-7-s.hauer@pengutronix.de\n---\n drivers/net/wireless/realtek/rtw88/phy.c  |   6 +-\n drivers/net/wireless/realtek/rtw88/ps.c   |   2 +-\n drivers/net/wireless/realtek/rtw88/util.c | 103 ++++++++++++++++++++++++++++++\n drivers/net/wireless/realtek/rtw88/util.h |  12 +++-\n 4 files changed, 116 insertions(+), 7 deletions(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/phy.c b/drivers/net/wireless/realtek/rtw88/phy.c\nindex bd7d05e080848..128e75a81bf3c 100644\n--- a/drivers/net/wireless/realtek/rtw88/phy.c\n+++ b/drivers/net/wireless/realtek/rtw88/phy.c\n@@ -300,7 +300,7 @@ static void rtw_phy_stat_rssi(struct rtw_dev *rtwdev)\n \n \tdata.rtwdev = rtwdev;\n \tdata.min_rssi = U8_MAX;\n-\trtw_iterate_stas_atomic(rtwdev, rtw_phy_stat_rssi_iter, &data);\n+\trtw_iterate_stas(rtwdev, rtw_phy_stat_rssi_iter, &data);\n \n \tdm_info->pre_min_rssi = dm_info->min_rssi;\n \tdm_info->min_rssi = data.min_rssi;\n@@ -544,7 +544,7 @@ static void rtw_phy_ra_info_update(struct rtw_dev *rtwdev)\n \tif (rtwdev->watch_dog_cnt & 0x3)\n \t\treturn;\n \n-\trtw_iterate_stas_atomic(rtwdev, rtw_phy_ra_info_update_iter, rtwdev);\n+\trtw_iterate_stas(rtwdev, rtw_phy_ra_info_update_iter, rtwdev);\n }\n \n static u32 rtw_phy_get_rrsr_mask(struct rtw_dev *rtwdev, u8 rate_idx)\n@@ -597,7 +597,7 @@ static void rtw_phy_rrsr_update(struct rtw_dev *rtwdev)\n \tstruct rtw_dm_info *dm_info = &rtwdev->dm_info;\n \n \tdm_info->rrsr_mask_min = RRSR_RATE_ORDER_MAX;\n-\trtw_iterate_stas_atomic(rtwdev, rtw_phy_rrsr_mask_min_iter, rtwdev);\n+\trtw_iterate_stas(rtwdev, rtw_phy_rrsr_mask_min_iter, rtwdev);\n \trtw_write32(rtwdev, REG_RRSR, dm_info->rrsr_val_init & dm_info->rrsr_mask_min);\n }\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/ps.c b/drivers/net/wireless/realtek/rtw88/ps.c\nindex c93da743681fc..11594940d6b00 100644\n--- a/drivers/net/wireless/realtek/rtw88/ps.c\n+++ b/drivers/net/wireless/realtek/rtw88/ps.c\n@@ -61,7 +61,7 @@ int rtw_leave_ips(struct rtw_dev *rtwdev)\n \t\treturn ret;\n \t}\n \n-\trtw_iterate_vifs_atomic(rtwdev, rtw_restore_port_cfg_iter, rtwdev);\n+\trtw_iterate_vifs(rtwdev, rtw_restore_port_cfg_iter, rtwdev);\n \n \trtw_coex_ips_notify(rtwdev, COEX_IPS_LEAVE);\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/util.c b/drivers/net/wireless/realtek/rtw88/util.c\nindex cdfd66a85075a..ff3c269fb1a72 100644\n--- a/drivers/net/wireless/realtek/rtw88/util.c\n+++ b/drivers/net/wireless/realtek/rtw88/util.c\n@@ -105,3 +105,106 @@ void rtw_desc_to_mcsrate(u16 rate, u8 *mcs, u8 *nss)\n \t\t*mcs = rate - DESC_RATEMCS0;\n \t}\n }\n+\n+struct rtw_stas_entry {\n+\tstruct list_head list;\n+\tstruct ieee80211_sta *sta;\n+};\n+\n+struct rtw_iter_stas_data {\n+\tstruct rtw_dev *rtwdev;\n+\tstruct list_head list;\n+};\n+\n+static void rtw_collect_sta_iter(void *data, struct ieee80211_sta *sta)\n+{\n+\tstruct rtw_iter_stas_data *iter_stas = data;\n+\tstruct rtw_stas_entry *stas_entry;\n+\n+\tstas_entry = kmalloc(sizeof(*stas_entry), GFP_ATOMIC);\n+\tif (!stas_entry)\n+\t\treturn;\n+\n+\tstas_entry->sta = sta;\n+\tlist_add_tail(&stas_entry->list, &iter_stas->list);\n+}\n+\n+void rtw_iterate_stas(struct rtw_dev *rtwdev,\n+\t\t      void (*iterator)(void *data,\n+\t\t\t\t       struct ieee80211_sta *sta),\n+\t\t      void *data)\n+{\n+\tstruct rtw_iter_stas_data iter_data;\n+\tstruct rtw_stas_entry *sta_entry, *tmp;\n+\n+\t/* &rtwdev->mutex makes sure no stations can be removed between\n+\t * collecting the stations and iterating over them.\n+\t */\n+\tlockdep_assert_held(&rtwdev->mutex);\n+\n+\titer_data.rtwdev = rtwdev;\n+\tINIT_LIST_HEAD(&iter_data.list);\n+\n+\tieee80211_iterate_stations_atomic(rtwdev->hw, rtw_collect_sta_iter,\n+\t\t\t\t\t  &iter_data);\n+\n+\tlist_for_each_entry_safe(sta_entry, tmp, &iter_data.list,\n+\t\t\t\t list) {\n+\t\tlist_del_init(&sta_entry->list);\n+\t\titerator(data, sta_entry->sta);\n+\t\tkfree(sta_entry);\n+\t}\n+}\n+\n+struct rtw_vifs_entry {\n+\tstruct list_head list;\n+\tstruct ieee80211_vif *vif;\n+\tu8 mac[ETH_ALEN];\n+};\n+\n+struct rtw_iter_vifs_data {\n+\tstruct rtw_dev *rtwdev;\n+\tstruct list_head list;\n+};\n+\n+static void rtw_collect_vif_iter(void *data, u8 *mac, struct ieee80211_vif *vif)\n+{\n+\tstruct rtw_iter_vifs_data *iter_stas = data;\n+\tstruct rtw_vifs_entry *vifs_entry;\n+\n+\tvifs_entry = kmalloc(sizeof(*vifs_entry), GFP_ATOMIC);\n+\tif (!vifs_entry)\n+\t\treturn;\n+\n+\tvifs_entry->vif = vif;\n+\tether_addr_copy(vifs_entry->mac, mac);\n+\tlist_add_tail(&vifs_entry->list, &iter_stas->list);\n+}\n+\n+void rtw_iterate_vifs(struct rtw_dev *rtwdev,\n+\t\t      void (*iterator)(void *data, u8 *mac,\n+\t\t\t\t       struct ieee80211_vif *vif),\n+\t\t      void *data)\n+{\n+\tstruct rtw_iter_vifs_data iter_data;\n+\tstruct rtw_vifs_entry *vif_entry, *tmp;\n+\n+\t/* &rtwdev->mutex makes sure no interfaces can be removed between\n+\t * collecting the interfaces and iterating over them.\n+\t */\n+\tlockdep_assert_held(&rtwdev->mutex);\n+\n+\titer_data.rtwdev = rtwdev;\n+\tINIT_LIST_HEAD(&iter_data.list);\n+\n+\tieee80211_iterate_active_interfaces_atomic(rtwdev->hw,\n+\t\t\t\t\t\t   IEEE80211_IFACE_ITER_NORMAL,\n+\t\t\t\t\t\t   rtw_collect_vif_iter, &iter_data);\n+\n+\tlist_for_each_entry_safe(vif_entry, tmp, &iter_data.list,\n+\t\t\t\t list) {\n+\t\tlist_del_init(&vif_entry->list);\n+\t\titerator(data, vif_entry->mac, vif_entry->vif);\n+\t\tkfree(vif_entry);\n+\t}\n+}\ndiff --git a/drivers/net/wireless/realtek/rtw88/util.h b/drivers/net/wireless/realtek/rtw88/util.h\nindex 0c23b5069be0b..dc89655254002 100644\n--- a/drivers/net/wireless/realtek/rtw88/util.h\n+++ b/drivers/net/wireless/realtek/rtw88/util.h\n@@ -7,9 +7,6 @@\n \n struct rtw_dev;\n \n-#define rtw_iterate_vifs(rtwdev, iterator, data)                               \\\n-\tieee80211_iterate_active_interfaces(rtwdev->hw,                        \\\n-\t\t\tIEEE80211_IFACE_ITER_NORMAL, iterator, data)\n #define rtw_iterate_vifs_atomic(rtwdev, iterator, data)                        \\\n \tieee80211_iterate_active_interfaces_atomic(rtwdev->hw,                 \\\n \t\t\tIEEE80211_IFACE_ITER_NORMAL, iterator, data)\n@@ -20,6 +17,15 @@ struct rtw_dev;\n #define rtw_iterate_keys_rcu(rtwdev, vif, iterator, data)\t\t       \\\n \tieee80211_iter_keys_rcu((rtwdev)->hw, vif, iterator, data)\n \n+void rtw_iterate_vifs(struct rtw_dev *rtwdev,\n+\t\t      void (*iterator)(void *data, u8 *mac,\n+\t\t\t\t       struct ieee80211_vif *vif),\n+\t\t      void *data);\n+void rtw_iterate_stas(struct rtw_dev *rtwdev,\n+\t\t      void (*iterator)(void *data,\n+\t\t\t\t       struct ieee80211_sta *sta),\n+\t\t\t\t       void *data);\n+\n static inline u8 *get_hdr_bssid(struct ieee80211_hdr *hdr)\n {\n \t__le16 fc = hdr->frame_control;\n-- \ncgit \n\nFrom a82dfd33d1237f6c0fb8a7077022189d1fc7ec98 Mon Sep 17 00:00:00 2001\nFrom: Sascha Hauer <s.hauer@pengutronix.de>\nDate: Fri, 2 Dec 2022 09:12:20 +0100\nSubject: wifi: rtw88: Add common USB chip support\n\nAdd the common bits and pieces to add USB support to the RTW88 driver.\nThis is based on https://github.com/ulli-kroll/rtw88-usb.git which\nitself is first written by Neo Jou.\n\nSigned-off-by: neo_jou <neo_jou@realtek.com>\nSigned-off-by: Hans Ulli Kroll <linux@ulli-kroll.de>\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>\nSigned-off-by: Kalle Valo <kvalo@kernel.org>\nLink: https://lore.kernel.org/r/20221202081224.2779981-8-s.hauer@pengutronix.de\n---\n drivers/net/wireless/realtek/rtw88/Kconfig  |   3 +\n drivers/net/wireless/realtek/rtw88/Makefile |   3 +\n drivers/net/wireless/realtek/rtw88/mac.c    |   3 +\n drivers/net/wireless/realtek/rtw88/main.c   |   4 +\n drivers/net/wireless/realtek/rtw88/main.h   |   4 +\n drivers/net/wireless/realtek/rtw88/reg.h    |   1 +\n drivers/net/wireless/realtek/rtw88/tx.h     |  31 +\n drivers/net/wireless/realtek/rtw88/usb.c    | 911 ++++++++++++++++++++++++++++\n drivers/net/wireless/realtek/rtw88/usb.h    | 107 ++++\n 9 files changed, 1067 insertions(+)\n create mode 100644 drivers/net/wireless/realtek/rtw88/usb.c\n create mode 100644 drivers/net/wireless/realtek/rtw88/usb.h\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/Kconfig b/drivers/net/wireless/realtek/rtw88/Kconfig\nindex e3d7cb6c12902..1624c5db69bac 100644\n--- a/drivers/net/wireless/realtek/rtw88/Kconfig\n+++ b/drivers/net/wireless/realtek/rtw88/Kconfig\n@@ -16,6 +16,9 @@ config RTW88_CORE\n config RTW88_PCI\n \ttristate\n \n+config RTW88_USB\n+\ttristate\n+\n config RTW88_8822B\n \ttristate\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/Makefile b/drivers/net/wireless/realtek/rtw88/Makefile\nindex 834c66ec0af9e..2c2b0e5133cdf 100644\n--- a/drivers/net/wireless/realtek/rtw88/Makefile\n+++ b/drivers/net/wireless/realtek/rtw88/Makefile\n@@ -46,3 +46,6 @@ rtw88_8821ce-objs\t\t:= rtw8821ce.o\n \n obj-$(CONFIG_RTW88_PCI)\t\t+= rtw88_pci.o\n rtw88_pci-objs\t\t\t:= pci.o\n+\n+obj-$(CONFIG_RTW88_USB)\t\t+= rtw88_usb.o\n+rtw88_usb-objs\t\t\t:= usb.o\ndiff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wireless/realtek/rtw88/mac.c\nindex c7e64f7036ac2..98777f294945f 100644\n--- a/drivers/net/wireless/realtek/rtw88/mac.c\n+++ b/drivers/net/wireless/realtek/rtw88/mac.c\n@@ -1048,6 +1048,9 @@ static int txdma_queue_mapping(struct rtw_dev *rtwdev)\n \tif (rtw_chip_wcpu_11ac(rtwdev))\n \t\trtw_write32(rtwdev, REG_H2CQ_CSR, BIT_H2CQ_FULL);\n \n+\tif (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_USB)\n+\t\trtw_write8_set(rtwdev, REG_TXDMA_PQ_MAP, BIT_RXDMA_ARBBW_EN);\n+\n \treturn 0;\n }\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c\nindex 0a2ce7f50f412..888427cf3bdf9 100644\n--- a/drivers/net/wireless/realtek/rtw88/main.c\n+++ b/drivers/net/wireless/realtek/rtw88/main.c\n@@ -1783,6 +1783,10 @@ static int rtw_chip_parameter_setup(struct rtw_dev *rtwdev)\n \t\trtwdev->hci.rpwm_addr = 0x03d9;\n \t\trtwdev->hci.cpwm_addr = 0x03da;\n \t\tbreak;\n+\tcase RTW_HCI_TYPE_USB:\n+\t\trtwdev->hci.rpwm_addr = 0xfe58;\n+\t\trtwdev->hci.cpwm_addr = 0xfe57;\n+\t\tbreak;\n \tdefault:\n \t\trtw_err(rtwdev, \"unsupported hci type\\n\");\n \t\treturn -EINVAL;\ndiff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h\nindex 77fd48b6cc453..165f299e8e1f9 100644\n--- a/drivers/net/wireless/realtek/rtw88/main.h\n+++ b/drivers/net/wireless/realtek/rtw88/main.h\n@@ -871,6 +871,10 @@ struct rtw_chip_ops {\n \t\t\t       bool is_tx2_path);\n \tvoid (*config_txrx_mode)(struct rtw_dev *rtwdev, u8 tx_path,\n \t\t\t\t u8 rx_path, bool is_tx2_path);\n+\t/* for USB/SDIO only */\n+\tvoid (*fill_txdesc_checksum)(struct rtw_dev *rtwdev,\n+\t\t\t\t     struct rtw_tx_pkt_info *pkt_info,\n+\t\t\t\t     u8 *txdesc);\n \n \t/* for coex */\n \tvoid (*coex_set_init)(struct rtw_dev *rtwdev);\ndiff --git a/drivers/net/wireless/realtek/rtw88/reg.h b/drivers/net/wireless/realtek/rtw88/reg.h\nindex 03bd8dc53f72a..8852b24d6c2ac 100644\n--- a/drivers/net/wireless/realtek/rtw88/reg.h\n+++ b/drivers/net/wireless/realtek/rtw88/reg.h\n@@ -184,6 +184,7 @@\n #define BIT_TXDMA_VIQ_MAP(x)                                                   \\\n \t(((x) & BIT_MASK_TXDMA_VIQ_MAP) << BIT_SHIFT_TXDMA_VIQ_MAP)\n #define REG_TXDMA_PQ_MAP\t0x010C\n+#define BIT_RXDMA_ARBBW_EN\tBIT(0)\n #define BIT_SHIFT_TXDMA_BEQ_MAP\t8\n #define BIT_MASK_TXDMA_BEQ_MAP\t0x3\n #define BIT_TXDMA_BEQ_MAP(x)                                                   \\\ndiff --git a/drivers/net/wireless/realtek/rtw88/tx.h b/drivers/net/wireless/realtek/rtw88/tx.h\nindex 8419603adce4a..a2f3ac326041b 100644\n--- a/drivers/net/wireless/realtek/rtw88/tx.h\n+++ b/drivers/net/wireless/realtek/rtw88/tx.h\n@@ -71,6 +71,14 @@\n \tle32p_replace_bits((__le32 *)(txdesc) + 0x03, value, BIT(15))\n #define SET_TX_DESC_BT_NULL(txdesc, value)\t\t\t\t       \\\n \tle32p_replace_bits((__le32 *)(txdesc) + 0x02, value, BIT(23))\n+#define SET_TX_DESC_TXDESC_CHECKSUM(txdesc, value)\t\t\t\t\\\n+\tle32p_replace_bits((__le32 *)(txdesc) + 0x07, value, GENMASK(15, 0))\n+#define SET_TX_DESC_DMA_TXAGG_NUM(txdesc, value)\t\t\t\t\\\n+\tle32p_replace_bits((__le32 *)(txdesc) + 0x07, value, GENMASK(31, 24))\n+#define GET_TX_DESC_PKT_OFFSET(txdesc)\t\t\t\t\t\t\\\n+\tle32_get_bits(*((__le32 *)(txdesc) + 0x01), GENMASK(28, 24))\n+#define GET_TX_DESC_QSEL(txdesc)\t\t\t\t\t\t\\\n+\tle32_get_bits(*((__le32 *)(txdesc) + 0x01), GENMASK(12, 8))\n \n enum rtw_tx_desc_queue_select {\n \tTX_DESC_QSEL_TID0\t= 0,\n@@ -123,4 +131,27 @@ rtw_tx_write_data_h2c_get(struct rtw_dev *rtwdev,\n \t\t\t  struct rtw_tx_pkt_info *pkt_info,\n \t\t\t  u8 *buf, u32 size);\n \n+static inline\n+void fill_txdesc_checksum_common(u8 *txdesc, size_t words)\n+{\n+\t__le16 chksum = 0;\n+\t__le16 *data = (__le16 *)(txdesc);\n+\n+\tSET_TX_DESC_TXDESC_CHECKSUM(txdesc, 0x0000);\n+\n+\twhile (words--)\n+\t\tchksum ^= *data++;\n+\n+\tSET_TX_DESC_TXDESC_CHECKSUM(txdesc, __le16_to_cpu(chksum));\n+}\n+\n+static inline void rtw_tx_fill_txdesc_checksum(struct rtw_dev *rtwdev,\n+\t\t\t\t\t       struct rtw_tx_pkt_info *pkt_info,\n+\t\t\t\t\t       u8 *txdesc)\n+{\n+\tconst struct rtw_chip_info *chip = rtwdev->chip;\n+\n+\tchip->ops->fill_txdesc_checksum(rtwdev, pkt_info, txdesc);\n+}\n+\n #endif\ndiff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c\nnew file mode 100644\nindex 0000000000000..4ef38279b64c9\n--- /dev/null\n+++ b/drivers/net/wireless/realtek/rtw88/usb.c\n@@ -0,0 +1,911 @@\n+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause\n+/* Copyright(c) 2018-2019  Realtek Corporation\n+ */\n+\n+#include <linux/module.h>\n+#include <linux/usb.h>\n+#include <linux/mutex.h>\n+#include \"main.h\"\n+#include \"debug.h\"\n+#include \"reg.h\"\n+#include \"tx.h\"\n+#include \"rx.h\"\n+#include \"fw.h\"\n+#include \"ps.h\"\n+#include \"usb.h\"\n+\n+#define RTW_USB_MAX_RXQ_LEN\t512\n+\n+struct rtw_usb_txcb {\n+\tstruct rtw_dev *rtwdev;\n+\tstruct sk_buff_head tx_ack_queue;\n+};\n+\n+static void rtw_usb_fill_tx_checksum(struct rtw_usb *rtwusb,\n+\t\t\t\t     struct sk_buff *skb, int agg_num)\n+{\n+\tstruct rtw_dev *rtwdev = rtwusb->rtwdev;\n+\tstruct rtw_tx_pkt_info pkt_info;\n+\n+\tSET_TX_DESC_DMA_TXAGG_NUM(skb->data, agg_num);\n+\tpkt_info.pkt_offset = GET_TX_DESC_PKT_OFFSET(skb->data);\n+\trtw_tx_fill_txdesc_checksum(rtwdev, &pkt_info, skb->data);\n+}\n+\n+static u32 rtw_usb_read(struct rtw_dev *rtwdev, u32 addr, u16 len)\n+{\n+\tstruct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev);\n+\tstruct usb_device *udev = rtwusb->udev;\n+\t__le32 *data;\n+\tunsigned long flags;\n+\tint idx, ret;\n+\tstatic int count;\n+\n+\tspin_lock_irqsave(&rtwusb->usb_lock, flags);\n+\n+\tidx = rtwusb->usb_data_index;\n+\trtwusb->usb_data_index = (idx + 1) & (RTW_USB_MAX_RXTX_COUNT - 1);\n+\n+\tspin_unlock_irqrestore(&rtwusb->usb_lock, flags);\n+\n+\tdata = &rtwusb->usb_data[idx];\n+\n+\tret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),\n+\t\t\t      RTW_USB_CMD_REQ, RTW_USB_CMD_READ, addr,\n+\t\t\t      RTW_USB_VENQT_CMD_IDX, data, len, 1000);\n+\tif (ret < 0 && ret != -ENODEV && count++ < 4)\n+\t\trtw_err(rtwdev, \"read register 0x%x failed with %d\\n\",\n+\t\t\taddr, ret);\n+\n+\treturn le32_to_cpu(*data);\n+}\n+\n+static u8 rtw_usb_read8(struct rtw_dev *rtwdev, u32 addr)\n+{\n+\treturn (u8)rtw_usb_read(rtwdev, addr, 1);\n+}\n+\n+static u16 rtw_usb_read16(struct rtw_dev *rtwdev, u32 addr)\n+{\n+\treturn (u16)rtw_usb_read(rtwdev, addr, 2);\n+}\n+\n+static u32 rtw_usb_read32(struct rtw_dev *rtwdev, u32 addr)\n+{\n+\treturn (u32)rtw_usb_read(rtwdev, addr, 4);\n+}\n+\n+static void rtw_usb_write(struct rtw_dev *rtwdev, u32 addr, u32 val, int len)\n+{\n+\tstruct rtw_usb *rtwusb = (struct rtw_usb *)rtwdev->priv;\n+\tstruct usb_device *udev = rtwusb->udev;\n+\tunsigned long flags;\n+\t__le32 *data;\n+\tint idx, ret;\n+\tstatic int count;\n+\n+\tspin_lock_irqsave(&rtwusb->usb_lock, flags);\n+\n+\tidx = rtwusb->usb_data_index;\n+\trtwusb->usb_data_index = (idx + 1) & (RTW_USB_MAX_RXTX_COUNT - 1);\n+\n+\tspin_unlock_irqrestore(&rtwusb->usb_lock, flags);\n+\n+\tdata = &rtwusb->usb_data[idx];\n+\n+\t*data = cpu_to_le32(val);\n+\n+\tret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),\n+\t\t\t      RTW_USB_CMD_REQ, RTW_USB_CMD_WRITE,\n+\t\t\t      addr, 0, data, len, 30000);\n+\tif (ret < 0 && ret != -ENODEV && count++ < 4)\n+\t\trtw_err(rtwdev, \"write register 0x%x failed with %d\\n\",\n+\t\t\taddr, ret);\n+}\n+\n+static void rtw_usb_write8(struct rtw_dev *rtwdev, u32 addr, u8 val)\n+{\n+\trtw_usb_write(rtwdev, addr, val, 1);\n+}\n+\n+static void rtw_usb_write16(struct rtw_dev *rtwdev, u32 addr, u16 val)\n+{\n+\trtw_usb_write(rtwdev, addr, val, 2);\n+}\n+\n+static void rtw_usb_write32(struct rtw_dev *rtwdev, u32 addr, u32 val)\n+{\n+\trtw_usb_write(rtwdev, addr, val, 4);\n+}\n+\n+static int rtw_usb_parse(struct rtw_dev *rtwdev,\n+\t\t\t struct usb_interface *interface)\n+{\n+\tstruct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev);\n+\tstruct usb_host_interface *host_interface = &interface->altsetting[0];\n+\tstruct usb_interface_descriptor *interface_desc = &host_interface->desc;\n+\tstruct usb_endpoint_descriptor *endpoint;\n+\tstruct usb_device *usbd = interface_to_usbdev(interface);\n+\tint num_out_pipes = 0;\n+\tint i;\n+\tu8 num;\n+\n+\tfor (i = 0; i < interface_desc->bNumEndpoints; i++) {\n+\t\tendpoint = &host_interface->endpoint[i].desc;\n+\t\tnum = usb_endpoint_num(endpoint);\n+\n+\t\tif (usb_endpoint_dir_in(endpoint) &&\n+\t\t    usb_endpoint_xfer_bulk(endpoint)) {\n+\t\t\tif (rtwusb->pipe_in) {\n+\t\t\t\trtw_err(rtwdev, \"IN pipes overflow\\n\");\n+\t\t\t\treturn -EINVAL;\n+\t\t\t}\n+\n+\t\t\trtwusb->pipe_in = num;\n+\t\t}\n+\n+\t\tif (usb_endpoint_dir_in(endpoint) &&\n+\t\t    usb_endpoint_xfer_int(endpoint)) {\n+\t\t\tif (rtwusb->pipe_interrupt) {\n+\t\t\t\trtw_err(rtwdev, \"INT pipes overflow\\n\");\n+\t\t\t\treturn -EINVAL;\n+\t\t\t}\n+\n+\t\t\trtwusb->pipe_interrupt = num;\n+\t\t}\n+\n+\t\tif (usb_endpoint_dir_out(endpoint) &&\n+\t\t    usb_endpoint_xfer_bulk(endpoint)) {\n+\t\t\tif (num_out_pipes >= ARRAY_SIZE(rtwusb->out_ep)) {\n+\t\t\t\trtw_err(rtwdev, \"OUT pipes overflow\\n\");\n+\t\t\t\treturn -EINVAL;\n+\t\t\t}\n+\n+\t\t\trtwusb->out_ep[num_out_pipes++] = num;\n+\t\t}\n+\t}\n+\n+\tswitch (usbd->speed) {\n+\tcase USB_SPEED_LOW:\n+\tcase USB_SPEED_FULL:\n+\t\trtwusb->bulkout_size = RTW_USB_FULL_SPEED_BULK_SIZE;\n+\t\tbreak;\n+\tcase USB_SPEED_HIGH:\n+\t\trtwusb->bulkout_size = RTW_USB_HIGH_SPEED_BULK_SIZE;\n+\t\tbreak;\n+\tcase USB_SPEED_SUPER:\n+\t\trtwusb->bulkout_size = RTW_USB_SUPER_SPEED_BULK_SIZE;\n+\t\tbreak;\n+\tdefault:\n+\t\trtw_err(rtwdev, \"failed to detect usb speed\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\trtwdev->hci.bulkout_num = num_out_pipes;\n+\n+\tswitch (num_out_pipes) {\n+\tcase 4:\n+\tcase 3:\n+\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID0] = 2;\n+\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID1] = 2;\n+\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID2] = 2;\n+\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID3] = 2;\n+\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID4] = 1;\n+\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID5] = 1;\n+\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID6] = 0;\n+\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID7] = 0;\n+\t\tbreak;\n+\tcase 2:\n+\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID0] = 1;\n+\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID1] = 1;\n+\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID2] = 1;\n+\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID3] = 1;\n+\t\tbreak;\n+\tcase 1:\n+\t\tbreak;\n+\tdefault:\n+\t\trtw_err(rtwdev, \"failed to get out_pipes(%d)\\n\", num_out_pipes);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static void rtw_usb_write_port_tx_complete(struct urb *urb)\n+{\n+\tstruct rtw_usb_txcb *txcb = urb->context;\n+\tstruct rtw_dev *rtwdev = txcb->rtwdev;\n+\tstruct ieee80211_hw *hw = rtwdev->hw;\n+\n+\twhile (true) {\n+\t\tstruct sk_buff *skb = skb_dequeue(&txcb->tx_ack_queue);\n+\t\tstruct ieee80211_tx_info *info;\n+\t\tstruct rtw_usb_tx_data *tx_data;\n+\n+\t\tif (!skb)\n+\t\t\tbreak;\n+\n+\t\tinfo = IEEE80211_SKB_CB(skb);\n+\t\ttx_data = rtw_usb_get_tx_data(skb);\n+\n+\t\t/* enqueue to wait for tx report */\n+\t\tif (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS) {\n+\t\t\trtw_tx_report_enqueue(rtwdev, skb, tx_data->sn);\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\t/* always ACK for others, then they won't be marked as drop */\n+\t\tieee80211_tx_info_clear_status(info);\n+\t\tif (info->flags & IEEE80211_TX_CTL_NO_ACK)\n+\t\t\tinfo->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED;\n+\t\telse\n+\t\t\tinfo->flags |= IEEE80211_TX_STAT_ACK;\n+\n+\t\tieee80211_tx_status_irqsafe(hw, skb);\n+\t}\n+\n+\tkfree(txcb);\n+}\n+\n+static int qsel_to_ep(struct rtw_usb *rtwusb, unsigned int qsel)\n+{\n+\tif (qsel >= ARRAY_SIZE(rtwusb->qsel_to_ep))\n+\t\treturn 0;\n+\n+\treturn rtwusb->qsel_to_ep[qsel];\n+}\n+\n+static int rtw_usb_write_port(struct rtw_dev *rtwdev, u8 qsel, struct sk_buff *skb,\n+\t\t\t      usb_complete_t cb, void *context)\n+{\n+\tstruct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev);\n+\tstruct usb_device *usbd = rtwusb->udev;\n+\tstruct urb *urb;\n+\tunsigned int pipe;\n+\tint ret;\n+\tint ep = qsel_to_ep(rtwusb, qsel);\n+\n+\tpipe = usb_sndbulkpipe(usbd, rtwusb->out_ep[ep]);\n+\turb = usb_alloc_urb(0, GFP_ATOMIC);\n+\tif (!urb)\n+\t\treturn -ENOMEM;\n+\n+\tusb_fill_bulk_urb(urb, usbd, pipe, skb->data, skb->len, cb, context);\n+\tret = usb_submit_urb(urb, GFP_ATOMIC);\n+\n+\tusb_free_urb(urb);\n+\n+\treturn ret;\n+}\n+\n+static bool rtw_usb_tx_agg_skb(struct rtw_usb *rtwusb, struct sk_buff_head *list)\n+{\n+\tstruct rtw_dev *rtwdev = rtwusb->rtwdev;\n+\tstruct rtw_usb_txcb *txcb;\n+\tstruct sk_buff *skb_head;\n+\tstruct sk_buff *skb_iter;\n+\tint agg_num = 0;\n+\tunsigned int align_next = 0;\n+\n+\tif (skb_queue_empty(list))\n+\t\treturn false;\n+\n+\ttxcb = kmalloc(sizeof(*txcb), GFP_ATOMIC);\n+\tif (!txcb)\n+\t\treturn false;\n+\n+\ttxcb->rtwdev = rtwdev;\n+\tskb_queue_head_init(&txcb->tx_ack_queue);\n+\n+\tskb_iter = skb_dequeue(list);\n+\n+\tif (skb_queue_empty(list)) {\n+\t\tskb_head = skb_iter;\n+\t\tgoto queue;\n+\t}\n+\n+\tskb_head = dev_alloc_skb(RTW_USB_MAX_XMITBUF_SZ);\n+\tif (!skb_head) {\n+\t\tskb_head = skb_iter;\n+\t\tgoto queue;\n+\t}\n+\n+\twhile (skb_iter) {\n+\t\tunsigned long flags;\n+\n+\t\tskb_put(skb_head, align_next);\n+\t\tskb_put_data(skb_head, skb_iter->data, skb_iter->len);\n+\n+\t\talign_next = ALIGN(skb_iter->len, 8) - skb_iter->len;\n+\n+\t\tagg_num++;\n+\n+\t\tskb_queue_tail(&txcb->tx_ack_queue, skb_iter);\n+\n+\t\tspin_lock_irqsave(&list->lock, flags);\n+\n+\t\tskb_iter = skb_peek(list);\n+\n+\t\tif (skb_iter && skb_iter->len + skb_head->len <= RTW_USB_MAX_XMITBUF_SZ)\n+\t\t\t__skb_unlink(skb_iter, list);\n+\t\telse\n+\t\t\tskb_iter = NULL;\n+\t\tspin_unlock_irqrestore(&list->lock, flags);\n+\t}\n+\n+\tif (agg_num > 1)\n+\t\trtw_usb_fill_tx_checksum(rtwusb, skb_head, agg_num);\n+\n+queue:\n+\tskb_queue_tail(&txcb->tx_ack_queue, skb_head);\n+\n+\trtw_usb_write_port(rtwdev, GET_TX_DESC_QSEL(skb_head->data), skb_head,\n+\t\t\t   rtw_usb_write_port_tx_complete, txcb);\n+\n+\treturn true;\n+}\n+\n+static void rtw_usb_tx_handler(struct work_struct *work)\n+{\n+\tstruct rtw_usb *rtwusb = container_of(work, struct rtw_usb, tx_work);\n+\tint i, limit;\n+\n+\tfor (i = ARRAY_SIZE(rtwusb->tx_queue) - 1; i >= 0; i--) {\n+\t\tfor (limit = 0; limit < 200; limit++) {\n+\t\t\tstruct sk_buff_head *list = &rtwusb->tx_queue[i];\n+\n+\t\t\tif (!rtw_usb_tx_agg_skb(rtwusb, list))\n+\t\t\t\tbreak;\n+\t\t}\n+\t}\n+}\n+\n+static void rtw_usb_tx_queue_purge(struct rtw_usb *rtwusb)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < ARRAY_SIZE(rtwusb->tx_queue); i++)\n+\t\tskb_queue_purge(&rtwusb->tx_queue[i]);\n+}\n+\n+static void rtw_usb_write_port_complete(struct urb *urb)\n+{\n+\tstruct sk_buff *skb = urb->context;\n+\n+\tdev_kfree_skb_any(skb);\n+}\n+\n+static int rtw_usb_write_data(struct rtw_dev *rtwdev,\n+\t\t\t      struct rtw_tx_pkt_info *pkt_info,\n+\t\t\t      u8 *buf)\n+{\n+\tconst struct rtw_chip_info *chip = rtwdev->chip;\n+\tstruct sk_buff *skb;\n+\tunsigned int desclen, headsize, size;\n+\tu8 qsel;\n+\tint ret = 0;\n+\n+\tsize = pkt_info->tx_pkt_size;\n+\tqsel = pkt_info->qsel;\n+\tdesclen = chip->tx_pkt_desc_sz;\n+\theadsize = pkt_info->offset ? pkt_info->offset : desclen;\n+\n+\tskb = dev_alloc_skb(headsize + size);\n+\tif (unlikely(!skb))\n+\t\treturn -ENOMEM;\n+\n+\tskb_reserve(skb, headsize);\n+\tskb_put_data(skb, buf, size);\n+\tskb_push(skb, headsize);\n+\tmemset(skb->data, 0, headsize);\n+\trtw_tx_fill_tx_desc(pkt_info, skb);\n+\trtw_tx_fill_txdesc_checksum(rtwdev, pkt_info, skb->data);\n+\n+\tret = rtw_usb_write_port(rtwdev, qsel, skb,\n+\t\t\t\t rtw_usb_write_port_complete, skb);\n+\tif (unlikely(ret))\n+\t\trtw_err(rtwdev, \"failed to do USB write, ret=%d\\n\", ret);\n+\n+\treturn ret;\n+}\n+\n+static int rtw_usb_write_data_rsvd_page(struct rtw_dev *rtwdev, u8 *buf,\n+\t\t\t\t\tu32 size)\n+{\n+\tconst struct rtw_chip_info *chip = rtwdev->chip;\n+\tstruct rtw_usb *rtwusb;\n+\tstruct rtw_tx_pkt_info pkt_info = {0};\n+\tu32 len, desclen;\n+\n+\trtwusb = rtw_get_usb_priv(rtwdev);\n+\n+\tpkt_info.tx_pkt_size = size;\n+\tpkt_info.qsel = TX_DESC_QSEL_BEACON;\n+\n+\tdesclen = chip->tx_pkt_desc_sz;\n+\tlen = desclen + size;\n+\tif (len % rtwusb->bulkout_size == 0) {\n+\t\tlen += RTW_USB_PACKET_OFFSET_SZ;\n+\t\tpkt_info.offset = desclen + RTW_USB_PACKET_OFFSET_SZ;\n+\t\tpkt_info.pkt_offset = 1;\n+\t} else {\n+\t\tpkt_info.offset = desclen;\n+\t}\n+\n+\treturn rtw_usb_write_data(rtwdev, &pkt_info, buf);\n+}\n+\n+static int rtw_usb_write_data_h2c(struct rtw_dev *rtwdev, u8 *buf, u32 size)\n+{\n+\tstruct rtw_tx_pkt_info pkt_info = {0};\n+\n+\tpkt_info.tx_pkt_size = size;\n+\tpkt_info.qsel = TX_DESC_QSEL_H2C;\n+\n+\treturn rtw_usb_write_data(rtwdev, &pkt_info, buf);\n+}\n+\n+static u8 rtw_usb_tx_queue_mapping_to_qsel(struct sk_buff *skb)\n+{\n+\tstruct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;\n+\t__le16 fc = hdr->frame_control;\n+\tu8 qsel;\n+\n+\tif (unlikely(ieee80211_is_mgmt(fc) || ieee80211_is_ctl(fc)))\n+\t\tqsel = TX_DESC_QSEL_MGMT;\n+\telse if (skb_get_queue_mapping(skb) <= IEEE80211_AC_BK)\n+\t\tqsel = skb->priority;\n+\telse\n+\t\tqsel = TX_DESC_QSEL_BEACON;\n+\n+\treturn qsel;\n+}\n+\n+static int rtw_usb_tx_write(struct rtw_dev *rtwdev,\n+\t\t\t    struct rtw_tx_pkt_info *pkt_info,\n+\t\t\t    struct sk_buff *skb)\n+{\n+\tstruct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev);\n+\tconst struct rtw_chip_info *chip = rtwdev->chip;\n+\tstruct rtw_usb_tx_data *tx_data;\n+\tu8 *pkt_desc;\n+\tint ep;\n+\n+\tpkt_desc = skb_push(skb, chip->tx_pkt_desc_sz);\n+\tmemset(pkt_desc, 0, chip->tx_pkt_desc_sz);\n+\tpkt_info->qsel = rtw_usb_tx_queue_mapping_to_qsel(skb);\n+\tep = qsel_to_ep(rtwusb, pkt_info->qsel);\n+\trtw_tx_fill_tx_desc(pkt_info, skb);\n+\trtw_tx_fill_txdesc_checksum(rtwdev, pkt_info, skb->data);\n+\ttx_data = rtw_usb_get_tx_data(skb);\n+\ttx_data->sn = pkt_info->sn;\n+\n+\tskb_queue_tail(&rtwusb->tx_queue[ep], skb);\n+\n+\treturn 0;\n+}\n+\n+static void rtw_usb_tx_kick_off(struct rtw_dev *rtwdev)\n+{\n+\tstruct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev);\n+\n+\tqueue_work(rtwusb->txwq, &rtwusb->tx_work);\n+}\n+\n+static void rtw_usb_rx_handler(struct work_struct *work)\n+{\n+\tstruct rtw_usb *rtwusb = container_of(work, struct rtw_usb, rx_work);\n+\tstruct rtw_dev *rtwdev = rtwusb->rtwdev;\n+\tconst struct rtw_chip_info *chip = rtwdev->chip;\n+\tstruct rtw_rx_pkt_stat pkt_stat;\n+\tstruct ieee80211_rx_status rx_status;\n+\tstruct sk_buff *skb;\n+\tu32 pkt_desc_sz = chip->rx_pkt_desc_sz;\n+\tu32 pkt_offset;\n+\tu8 *rx_desc;\n+\tint limit;\n+\n+\tfor (limit = 0; limit < 200; limit++) {\n+\t\tskb = skb_dequeue(&rtwusb->rx_queue);\n+\t\tif (!skb)\n+\t\t\tbreak;\n+\n+\t\trx_desc = skb->data;\n+\t\tchip->ops->query_rx_desc(rtwdev, rx_desc, &pkt_stat,\n+\t\t\t\t\t &rx_status);\n+\t\tpkt_offset = pkt_desc_sz + pkt_stat.drv_info_sz +\n+\t\t\t     pkt_stat.shift;\n+\n+\t\tif (pkt_stat.is_c2h) {\n+\t\t\tskb_put(skb, pkt_stat.pkt_len + pkt_offset);\n+\t\t\trtw_fw_c2h_cmd_rx_irqsafe(rtwdev, pkt_offset, skb);\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\tif (skb_queue_len(&rtwusb->rx_queue) >= RTW_USB_MAX_RXQ_LEN) {\n+\t\t\trtw_err(rtwdev, \"failed to get rx_queue, overflow\\n\");\n+\t\t\tdev_kfree_skb_any(skb);\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\tskb_put(skb, pkt_stat.pkt_len);\n+\t\tskb_reserve(skb, pkt_offset);\n+\t\tmemcpy(skb->cb, &rx_status, sizeof(rx_status));\n+\t\tieee80211_rx_irqsafe(rtwdev->hw, skb);\n+\t}\n+}\n+\n+static void rtw_usb_read_port_complete(struct urb *urb);\n+\n+static void rtw_usb_rx_resubmit(struct rtw_usb *rtwusb, struct rx_usb_ctrl_block *rxcb)\n+{\n+\tstruct rtw_dev *rtwdev = rtwusb->rtwdev;\n+\tint error;\n+\n+\trxcb->rx_skb = alloc_skb(RTW_USB_MAX_RECVBUF_SZ, GFP_ATOMIC);\n+\tif (!rxcb->rx_skb)\n+\t\treturn;\n+\n+\tusb_fill_bulk_urb(rxcb->rx_urb, rtwusb->udev,\n+\t\t\t  usb_rcvbulkpipe(rtwusb->udev, rtwusb->pipe_in),\n+\t\t\t  rxcb->rx_skb->data, RTW_USB_MAX_RECVBUF_SZ,\n+\t\t\t  rtw_usb_read_port_complete, rxcb);\n+\n+\terror = usb_submit_urb(rxcb->rx_urb, GFP_ATOMIC);\n+\tif (error) {\n+\t\tkfree_skb(rxcb->rx_skb);\n+\t\tif (error != -ENODEV)\n+\t\t\trtw_err(rtwdev, \"Err sending rx data urb %d\\n\",\n+\t\t\t\terror);\n+\t}\n+}\n+\n+static void rtw_usb_read_port_complete(struct urb *urb)\n+{\n+\tstruct rx_usb_ctrl_block *rxcb = urb->context;\n+\tstruct rtw_dev *rtwdev = rxcb->rtwdev;\n+\tstruct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev);\n+\tstruct sk_buff *skb = rxcb->rx_skb;\n+\n+\tif (urb->status == 0) {\n+\t\tif (urb->actual_length >= RTW_USB_MAX_RECVBUF_SZ ||\n+\t\t    urb->actual_length < 24) {\n+\t\t\trtw_err(rtwdev, \"failed to get urb length:%d\\n\",\n+\t\t\t\turb->actual_length);\n+\t\t\tif (skb)\n+\t\t\t\tdev_kfree_skb_any(skb);\n+\t\t} else {\n+\t\t\tskb_queue_tail(&rtwusb->rx_queue, skb);\n+\t\t\tqueue_work(rtwusb->rxwq, &rtwusb->rx_work);\n+\t\t}\n+\t\trtw_usb_rx_resubmit(rtwusb, rxcb);\n+\t} else {\n+\t\tswitch (urb->status) {\n+\t\tcase -EINVAL:\n+\t\tcase -EPIPE:\n+\t\tcase -ENODEV:\n+\t\tcase -ESHUTDOWN:\n+\t\tcase -ENOENT:\n+\t\tcase -EPROTO:\n+\t\tcase -EILSEQ:\n+\t\tcase -ETIME:\n+\t\tcase -ECOMM:\n+\t\tcase -EOVERFLOW:\n+\t\tcase -EINPROGRESS:\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\trtw_err(rtwdev, \"status %d\\n\", urb->status);\n+\t\t\tbreak;\n+\t\t}\n+\t\tif (skb)\n+\t\t\tdev_kfree_skb_any(skb);\n+\t}\n+}\n+\n+static void rtw_usb_cancel_rx_bufs(struct rtw_usb *rtwusb)\n+{\n+\tstruct rx_usb_ctrl_block *rxcb;\n+\tint i;\n+\n+\tfor (i = 0; i < RTW_USB_RXCB_NUM; i++) {\n+\t\trxcb = &rtwusb->rx_cb[i];\n+\t\tif (rxcb->rx_urb)\n+\t\t\tusb_kill_urb(rxcb->rx_urb);\n+\t}\n+}\n+\n+static void rtw_usb_free_rx_bufs(struct rtw_usb *rtwusb)\n+{\n+\tstruct rx_usb_ctrl_block *rxcb;\n+\tint i;\n+\n+\tfor (i = 0; i < RTW_USB_RXCB_NUM; i++) {\n+\t\trxcb = &rtwusb->rx_cb[i];\n+\t\tif (rxcb->rx_urb) {\n+\t\t\tusb_kill_urb(rxcb->rx_urb);\n+\t\t\tusb_free_urb(rxcb->rx_urb);\n+\t\t}\n+\t}\n+}\n+\n+static int rtw_usb_alloc_rx_bufs(struct rtw_usb *rtwusb)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < RTW_USB_RXCB_NUM; i++) {\n+\t\tstruct rx_usb_ctrl_block *rxcb = &rtwusb->rx_cb[i];\n+\n+\t\trxcb->n = i;\n+\t\trxcb->rtwdev = rtwusb->rtwdev;\n+\t\trxcb->rx_urb = usb_alloc_urb(0, GFP_KERNEL);\n+\t\tif (!rxcb->rx_urb)\n+\t\t\tgoto err;\n+\t}\n+\n+\treturn 0;\n+err:\n+\trtw_usb_free_rx_bufs(rtwusb);\n+\treturn -ENOMEM;\n+}\n+\n+static int rtw_usb_setup(struct rtw_dev *rtwdev)\n+{\n+\t/* empty function for rtw_hci_ops */\n+\treturn 0;\n+}\n+\n+static int rtw_usb_start(struct rtw_dev *rtwdev)\n+{\n+\treturn 0;\n+}\n+\n+static void rtw_usb_stop(struct rtw_dev *rtwdev)\n+{\n+}\n+\n+static void rtw_usb_deep_ps(struct rtw_dev *rtwdev, bool enter)\n+{\n+\t/* empty function for rtw_hci_ops */\n+}\n+\n+static void rtw_usb_link_ps(struct rtw_dev *rtwdev, bool enter)\n+{\n+\t/* empty function for rtw_hci_ops */\n+}\n+\n+static void rtw_usb_interface_cfg(struct rtw_dev *rtwdev)\n+{\n+\t/* empty function for rtw_hci_ops */\n+}\n+\n+static struct rtw_hci_ops rtw_usb_ops = {\n+\t.tx_write = rtw_usb_tx_write,\n+\t.tx_kick_off = rtw_usb_tx_kick_off,\n+\t.setup = rtw_usb_setup,\n+\t.start = rtw_usb_start,\n+\t.stop = rtw_usb_stop,\n+\t.deep_ps = rtw_usb_deep_ps,\n+\t.link_ps = rtw_usb_link_ps,\n+\t.interface_cfg = rtw_usb_interface_cfg,\n+\n+\t.write8  = rtw_usb_write8,\n+\t.write16 = rtw_usb_write16,\n+\t.write32 = rtw_usb_write32,\n+\t.read8\t= rtw_usb_read8,\n+\t.read16 = rtw_usb_read16,\n+\t.read32 = rtw_usb_read32,\n+\n+\t.write_data_rsvd_page = rtw_usb_write_data_rsvd_page,\n+\t.write_data_h2c = rtw_usb_write_data_h2c,\n+};\n+\n+static int rtw_usb_init_rx(struct rtw_dev *rtwdev)\n+{\n+\tstruct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev);\n+\tint i;\n+\n+\trtwusb->rxwq = create_singlethread_workqueue(\"rtw88_usb: rx wq\");\n+\tif (!rtwusb->rxwq) {\n+\t\trtw_err(rtwdev, \"failed to create RX work queue\\n\");\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\tskb_queue_head_init(&rtwusb->rx_queue);\n+\n+\tINIT_WORK(&rtwusb->rx_work, rtw_usb_rx_handler);\n+\n+\tfor (i = 0; i < RTW_USB_RXCB_NUM; i++) {\n+\t\tstruct rx_usb_ctrl_block *rxcb = &rtwusb->rx_cb[i];\n+\n+\t\trtw_usb_rx_resubmit(rtwusb, rxcb);\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static void rtw_usb_deinit_rx(struct rtw_dev *rtwdev)\n+{\n+\tstruct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev);\n+\n+\tskb_queue_purge(&rtwusb->rx_queue);\n+\n+\tflush_workqueue(rtwusb->rxwq);\n+\tdestroy_workqueue(rtwusb->rxwq);\n+}\n+\n+static int rtw_usb_init_tx(struct rtw_dev *rtwdev)\n+{\n+\tstruct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev);\n+\tint i;\n+\n+\trtwusb->txwq = create_singlethread_workqueue(\"rtw88_usb: tx wq\");\n+\tif (!rtwusb->txwq) {\n+\t\trtw_err(rtwdev, \"failed to create TX work queue\\n\");\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\tfor (i = 0; i < ARRAY_SIZE(rtwusb->tx_queue); i++)\n+\t\tskb_queue_head_init(&rtwusb->tx_queue[i]);\n+\n+\tINIT_WORK(&rtwusb->tx_work, rtw_usb_tx_handler);\n+\n+\treturn 0;\n+}\n+\n+static void rtw_usb_deinit_tx(struct rtw_dev *rtwdev)\n+{\n+\tstruct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev);\n+\n+\trtw_usb_tx_queue_purge(rtwusb);\n+\tflush_workqueue(rtwusb->txwq);\n+\tdestroy_workqueue(rtwusb->txwq);\n+}\n+\n+static int rtw_usb_intf_init(struct rtw_dev *rtwdev,\n+\t\t\t     struct usb_interface *intf)\n+{\n+\tstruct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev);\n+\tstruct usb_device *udev = usb_get_dev(interface_to_usbdev(intf));\n+\tint ret;\n+\n+\trtwusb->udev = udev;\n+\tret = rtw_usb_parse(rtwdev, intf);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\trtwusb->usb_data = kcalloc(RTW_USB_MAX_RXTX_COUNT, sizeof(u32),\n+\t\t\t\t   GFP_KERNEL);\n+\tif (!rtwusb->usb_data)\n+\t\treturn -ENOMEM;\n+\n+\tusb_set_intfdata(intf, rtwdev->hw);\n+\n+\tSET_IEEE80211_DEV(rtwdev->hw, &intf->dev);\n+\tspin_lock_init(&rtwusb->usb_lock);\n+\n+\treturn 0;\n+}\n+\n+static void rtw_usb_intf_deinit(struct rtw_dev *rtwdev,\n+\t\t\t\tstruct usb_interface *intf)\n+{\n+\tstruct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev);\n+\n+\tusb_put_dev(rtwusb->udev);\n+\tusb_set_intfdata(intf, NULL);\n+}\n+\n+int rtw_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)\n+{\n+\tstruct rtw_dev *rtwdev;\n+\tstruct ieee80211_hw *hw;\n+\tstruct rtw_usb *rtwusb;\n+\tint drv_data_size;\n+\tint ret;\n+\n+\tdrv_data_size = sizeof(struct rtw_dev) + sizeof(struct rtw_usb);\n+\thw = ieee80211_alloc_hw(drv_data_size, &rtw_ops);\n+\tif (!hw)\n+\t\treturn -ENOMEM;\n+\n+\trtwdev = hw->priv;\n+\trtwdev->hw = hw;\n+\trtwdev->dev = &intf->dev;\n+\trtwdev->chip = (struct rtw_chip_info *)id->driver_info;\n+\trtwdev->hci.ops = &rtw_usb_ops;\n+\trtwdev->hci.type = RTW_HCI_TYPE_USB;\n+\n+\trtwusb = rtw_get_usb_priv(rtwdev);\n+\trtwusb->rtwdev = rtwdev;\n+\n+\tret = rtw_usb_alloc_rx_bufs(rtwusb);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = rtw_core_init(rtwdev);\n+\tif (ret)\n+\t\tgoto err_release_hw;\n+\n+\tret = rtw_usb_intf_init(rtwdev, intf);\n+\tif (ret) {\n+\t\trtw_err(rtwdev, \"failed to init USB interface\\n\");\n+\t\tgoto err_deinit_core;\n+\t}\n+\n+\tret = rtw_usb_init_tx(rtwdev);\n+\tif (ret) {\n+\t\trtw_err(rtwdev, \"failed to init USB TX\\n\");\n+\t\tgoto err_destroy_usb;\n+\t}\n+\n+\tret = rtw_usb_init_rx(rtwdev);\n+\tif (ret) {\n+\t\trtw_err(rtwdev, \"failed to init USB RX\\n\");\n+\t\tgoto err_destroy_txwq;\n+\t}\n+\n+\tret = rtw_chip_info_setup(rtwdev);\n+\tif (ret) {\n+\t\trtw_err(rtwdev, \"failed to setup chip information\\n\");\n+\t\tgoto err_destroy_rxwq;\n+\t}\n+\n+\tret = rtw_register_hw(rtwdev, rtwdev->hw);\n+\tif (ret) {\n+\t\trtw_err(rtwdev, \"failed to register hw\\n\");\n+\t\tgoto err_destroy_rxwq;\n+\t}\n+\n+\treturn 0;\n+\n+err_destroy_rxwq:\n+\trtw_usb_deinit_rx(rtwdev);\n+\n+err_destroy_txwq:\n+\trtw_usb_deinit_tx(rtwdev);\n+\n+err_destroy_usb:\n+\trtw_usb_intf_deinit(rtwdev, intf);\n+\n+err_deinit_core:\n+\trtw_core_deinit(rtwdev);\n+\n+err_release_hw:\n+\tieee80211_free_hw(hw);\n+\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(rtw_usb_probe);\n+\n+void rtw_usb_disconnect(struct usb_interface *intf)\n+{\n+\tstruct ieee80211_hw *hw = usb_get_intfdata(intf);\n+\tstruct rtw_dev *rtwdev;\n+\tstruct rtw_usb *rtwusb;\n+\n+\tif (!hw)\n+\t\treturn;\n+\n+\trtwdev = hw->priv;\n+\trtwusb = rtw_get_usb_priv(rtwdev);\n+\n+\trtw_usb_cancel_rx_bufs(rtwusb);\n+\n+\trtw_unregister_hw(rtwdev, hw);\n+\trtw_usb_deinit_tx(rtwdev);\n+\trtw_usb_deinit_rx(rtwdev);\n+\n+\tif (rtwusb->udev->state != USB_STATE_NOTATTACHED)\n+\t\tusb_reset_device(rtwusb->udev);\n+\n+\trtw_usb_free_rx_bufs(rtwusb);\n+\n+\trtw_usb_intf_deinit(rtwdev, intf);\n+\trtw_core_deinit(rtwdev);\n+\tieee80211_free_hw(hw);\n+}\n+EXPORT_SYMBOL(rtw_usb_disconnect);\n+\n+MODULE_AUTHOR(\"Realtek Corporation\");\n+MODULE_DESCRIPTION(\"Realtek 802.11ac wireless USB driver\");\n+MODULE_LICENSE(\"Dual BSD/GPL\");\ndiff --git a/drivers/net/wireless/realtek/rtw88/usb.h b/drivers/net/wireless/realtek/rtw88/usb.h\nnew file mode 100644\nindex 0000000000000..30647f0dd61c6\n--- /dev/null\n+++ b/drivers/net/wireless/realtek/rtw88/usb.h\n@@ -0,0 +1,107 @@\n+/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */\n+/* Copyright(c) 2018-2019  Realtek Corporation\n+ */\n+\n+#ifndef __RTW_USB_H_\n+#define __RTW_USB_H_\n+\n+#define FW_8192C_START_ADDRESS\t\t0x1000\n+#define FW_8192C_END_ADDRESS\t\t0x5fff\n+\n+#define RTW_USB_MAX_RXTX_COUNT\t\t128\n+#define RTW_USB_VENQT_MAX_BUF_SIZE\t254\n+#define MAX_USBCTRL_VENDORREQ_TIMES\t10\n+\n+#define RTW_USB_CMD_READ\t\t0xc0\n+#define RTW_USB_CMD_WRITE\t\t0x40\n+#define RTW_USB_CMD_REQ\t\t\t0x05\n+\n+#define RTW_USB_VENQT_CMD_IDX\t\t0x00\n+\n+#define RTW_USB_SUPER_SPEED_BULK_SIZE\t1024\n+#define RTW_USB_HIGH_SPEED_BULK_SIZE\t512\n+#define RTW_USB_FULL_SPEED_BULK_SIZE\t64\n+\n+#define RTW_USB_TX_SEL_HQ\t\tBIT(0)\n+#define RTW_USB_TX_SEL_LQ\t\tBIT(1)\n+#define RTW_USB_TX_SEL_NQ\t\tBIT(2)\n+#define RTW_USB_TX_SEL_EQ\t\tBIT(3)\n+\n+#define RTW_USB_BULK_IN_ADDR\t\t0x80\n+#define RTW_USB_INT_IN_ADDR\t\t0x81\n+\n+#define RTW_USB_HW_QUEUE_ENTRY\t\t8\n+\n+#define RTW_USB_PACKET_OFFSET_SZ\t8\n+#define RTW_USB_MAX_XMITBUF_SZ\t\t(1024 * 20)\n+#define RTW_USB_MAX_RECVBUF_SZ\t\t32768\n+\n+#define RTW_USB_RECVBUFF_ALIGN_SZ\t8\n+\n+#define RTW_USB_RXAGG_SIZE\t\t6\n+#define RTW_USB_RXAGG_TIMEOUT\t\t10\n+\n+#define RTW_USB_RXCB_NUM\t\t4\n+\n+#define RTW_USB_EP_MAX\t\t\t4\n+\n+#define TX_DESC_QSEL_MAX\t\t20\n+\n+#define RTW_USB_VENDOR_ID_REALTEK\t0x0bda\n+\n+static inline struct rtw_usb *rtw_get_usb_priv(struct rtw_dev *rtwdev)\n+{\n+\treturn (struct rtw_usb *)rtwdev->priv;\n+}\n+\n+struct rx_usb_ctrl_block {\n+\tstruct rtw_dev *rtwdev;\n+\tstruct urb *rx_urb;\n+\tstruct sk_buff *rx_skb;\n+\tint n;\n+};\n+\n+struct rtw_usb_tx_data {\n+\tu8 sn;\n+};\n+\n+struct rtw_usb {\n+\tstruct rtw_dev *rtwdev;\n+\tstruct usb_device *udev;\n+\n+\t/* protects usb_data_index */\n+\tspinlock_t usb_lock;\n+\t__le32 *usb_data;\n+\tunsigned int usb_data_index;\n+\n+\tu32 bulkout_size;\n+\tu8 pipe_interrupt;\n+\tu8 pipe_in;\n+\tu8 out_ep[RTW_USB_EP_MAX];\n+\tu8 qsel_to_ep[TX_DESC_QSEL_MAX];\n+\tu8 usb_txagg_num;\n+\n+\tstruct workqueue_struct *txwq, *rxwq;\n+\n+\tstruct sk_buff_head tx_queue[RTW_USB_EP_MAX];\n+\tstruct work_struct tx_work;\n+\n+\tstruct rx_usb_ctrl_block rx_cb[RTW_USB_RXCB_NUM];\n+\tstruct sk_buff_head rx_queue;\n+\tstruct work_struct rx_work;\n+};\n+\n+static inline struct rtw_usb_tx_data *rtw_usb_get_tx_data(struct sk_buff *skb)\n+{\n+\tstruct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);\n+\n+\tBUILD_BUG_ON(sizeof(struct rtw_usb_tx_data) >\n+\t\t     sizeof(info->status.status_driver_data));\n+\n+\treturn (struct rtw_usb_tx_data *)info->status.status_driver_data;\n+}\n+\n+int rtw_usb_probe(struct usb_interface *intf, const struct usb_device_id *id);\n+void rtw_usb_disconnect(struct usb_interface *intf);\n+\n+#endif\n-- \ncgit \n\nFrom aff5ffd718de23cb8603f2e229204670e2644334 Mon Sep 17 00:00:00 2001\nFrom: Sascha Hauer <s.hauer@pengutronix.de>\nDate: Fri, 2 Dec 2022 09:12:21 +0100\nSubject: wifi: rtw88: Add rtw8821cu chipset support\n\nAdd support for the rtw8821cu chipset based on\nhttps://github.com/ulli-kroll/rtw88-usb.git\n\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>\nSigned-off-by: Kalle Valo <kvalo@kernel.org>\nLink: https://lore.kernel.org/r/20221202081224.2779981-9-s.hauer@pengutronix.de\n---\n drivers/net/wireless/realtek/rtw88/Kconfig     | 11 ++++++\n drivers/net/wireless/realtek/rtw88/Makefile    |  3 ++\n drivers/net/wireless/realtek/rtw88/rtw8821c.c  | 18 ++++++++++\n drivers/net/wireless/realtek/rtw88/rtw8821c.h  | 21 +++++++++++\n drivers/net/wireless/realtek/rtw88/rtw8821cu.c | 50 ++++++++++++++++++++++++++\n 5 files changed, 103 insertions(+)\n create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8821cu.c\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/Kconfig b/drivers/net/wireless/realtek/rtw88/Kconfig\nindex 1624c5db69bac..2b500dbefbc2d 100644\n--- a/drivers/net/wireless/realtek/rtw88/Kconfig\n+++ b/drivers/net/wireless/realtek/rtw88/Kconfig\n@@ -75,6 +75,17 @@ config RTW88_8821CE\n \n \t  802.11ac PCIe wireless network adapter\n \n+config RTW88_8821CU\n+\ttristate \"Realtek 8821CU USB wireless network adapter\"\n+\tdepends on USB\n+\tselect RTW88_CORE\n+\tselect RTW88_USB\n+\tselect RTW88_8821C\n+\thelp\n+\t  Select this option will enable support for 8821CU chipset\n+\n+\t  802.11ac USB wireless network adapter\n+\n config RTW88_DEBUG\n \tbool \"Realtek rtw88 debug support\"\n \tdepends on RTW88_CORE\ndiff --git a/drivers/net/wireless/realtek/rtw88/Makefile b/drivers/net/wireless/realtek/rtw88/Makefile\nindex 2c2b0e5133cdf..552661a638def 100644\n--- a/drivers/net/wireless/realtek/rtw88/Makefile\n+++ b/drivers/net/wireless/realtek/rtw88/Makefile\n@@ -44,6 +44,9 @@ rtw88_8821c-objs\t\t:= rtw8821c.o rtw8821c_table.o\n obj-$(CONFIG_RTW88_8821CE)\t+= rtw88_8821ce.o\n rtw88_8821ce-objs\t\t:= rtw8821ce.o\n \n+obj-$(CONFIG_RTW88_8821CU)\t+= rtw88_8821cu.o\n+rtw88_8821cu-objs\t\t:= rtw8821cu.o\n+\n obj-$(CONFIG_RTW88_PCI)\t\t+= rtw88_pci.o\n rtw88_pci-objs\t\t\t:= pci.o\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8821c.c b/drivers/net/wireless/realtek/rtw88/rtw8821c.c\nindex 9afdc5ce86b43..17f800f6efbd0 100644\n--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c\n@@ -26,6 +26,12 @@ static void rtw8821ce_efuse_parsing(struct rtw_efuse *efuse,\n \tether_addr_copy(efuse->addr, map->e.mac_addr);\n }\n \n+static void rtw8821cu_efuse_parsing(struct rtw_efuse *efuse,\n+\t\t\t\t    struct rtw8821c_efuse *map)\n+{\n+\tether_addr_copy(efuse->addr, map->u.mac_addr);\n+}\n+\n enum rtw8821ce_rf_set {\n \tSWITCH_TO_BTG,\n \tSWITCH_TO_WLG,\n@@ -68,6 +74,9 @@ static int rtw8821c_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)\n \tcase RTW_HCI_TYPE_PCIE:\n \t\trtw8821ce_efuse_parsing(efuse, map);\n \t\tbreak;\n+\tcase RTW_HCI_TYPE_USB:\n+\t\trtw8821cu_efuse_parsing(efuse, map);\n+\t\tbreak;\n \tdefault:\n \t\t/* unsupported now */\n \t\treturn -ENOTSUPP;\n@@ -1148,6 +1157,13 @@ static void rtw8821c_phy_cck_pd_set(struct rtw_dev *rtwdev, u8 new_lvl)\n \t\t\t dm_info->cck_pd_default + new_lvl * 2);\n }\n \n+static void rtw8821c_fill_txdesc_checksum(struct rtw_dev *rtwdev,\n+\t\t\t\t\t  struct rtw_tx_pkt_info *pkt_info,\n+\t\t\t\t\t  u8 *txdesc)\n+{\n+\tfill_txdesc_checksum_common(txdesc, 16);\n+}\n+\n static struct rtw_pwr_seq_cmd trans_carddis_to_cardemu_8821c[] = {\n \t{0x0086,\n \t RTW_PWR_CUT_ALL_MSK,\n@@ -1521,6 +1537,7 @@ static const struct rtw_rfe_def rtw8821c_rfe_defs[] = {\n \t[2] = RTW_DEF_RFE_EXT(8821c, 0, 0, 2),\n \t[4] = RTW_DEF_RFE_EXT(8821c, 0, 0, 2),\n \t[6] = RTW_DEF_RFE(8821c, 0, 0),\n+\t[34] = RTW_DEF_RFE(8821c, 0, 0),\n };\n \n static struct rtw_hw_reg rtw8821c_dig[] = {\n@@ -1595,6 +1612,7 @@ static struct rtw_chip_ops rtw8821c_ops = {\n \t.config_bfee\t\t= rtw8821c_bf_config_bfee,\n \t.set_gid_table\t\t= rtw_bf_set_gid_table,\n \t.cfg_csi_rate\t\t= rtw_bf_cfg_csi_rate,\n+\t.fill_txdesc_checksum\t= rtw8821c_fill_txdesc_checksum,\n \n \t.coex_set_init\t\t= rtw8821c_coex_cfg_init,\n \t.coex_set_ant_switch\t= rtw8821c_coex_cfg_ant_switch,\ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8821c.h b/drivers/net/wireless/realtek/rtw88/rtw8821c.h\nindex 2698801fc35d5..1c81260f3a542 100644\n--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.h\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.h\n@@ -9,6 +9,26 @@\n \n #define RCR_VHT_ACK\t\tBIT(26)\n \n+struct rtw8821cu_efuse {\n+\tu8 res4[4];\t\t\t/* 0xd0 */\n+\tu8 usb_optional_function;\n+\tu8 res5[0x1e];\n+\tu8 res6[2];\n+\tu8 serial[0x0b];\t\t/* 0xf5 */\n+\tu8 vid;\t\t\t\t/* 0x100 */\n+\tu8 res7;\n+\tu8 pid;\n+\tu8 res8[4];\n+\tu8 mac_addr[ETH_ALEN];\t\t/* 0x107 */\n+\tu8 res9[2];\n+\tu8 vendor_name[0x07];\n+\tu8 res10[2];\n+\tu8 device_name[0x14];\n+\tu8 res11[0xcf];\n+\tu8 package_type;\t\t/* 0x1fb */\n+\tu8 res12[0x4];\n+};\n+\n struct rtw8821ce_efuse {\n \tu8 mac_addr[ETH_ALEN];\t\t/* 0xd0 */\n \tu8 vender_id[2];\n@@ -73,6 +93,7 @@ struct rtw8821c_efuse {\n \tu8 res[3];\n \tunion {\n \t\tstruct rtw8821ce_efuse e;\n+\t\tstruct rtw8821cu_efuse u;\n \t};\n };\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8821cu.c b/drivers/net/wireless/realtek/rtw88/rtw8821cu.c\nnew file mode 100644\nindex 0000000000000..7a5cbdc31ef79\n--- /dev/null\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8821cu.c\n@@ -0,0 +1,50 @@\n+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause\n+/* Copyright(c) 2018-2019  Realtek Corporation\n+ */\n+\n+#include <linux/module.h>\n+#include <linux/usb.h>\n+#include \"main.h\"\n+#include \"rtw8821c.h\"\n+#include \"usb.h\"\n+\n+static const struct usb_device_id rtw_8821cu_id_table[] = {\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xb82b, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8821CU */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xb820, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8821CU */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc821, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8821CU */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc820, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8821CU */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc82a, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8821CU */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc82b, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8821CU */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc811, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8811CU */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0x8811, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* 8811CU */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0x2006, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* TOTOLINK A650UA v3 */\n+\t{},\n+};\n+MODULE_DEVICE_TABLE(usb, rtw_8821cu_id_table);\n+\n+static int rtw_8821cu_probe(struct usb_interface *intf,\n+\t\t\t    const struct usb_device_id *id)\n+{\n+\treturn rtw_usb_probe(intf, id);\n+}\n+\n+static struct usb_driver rtw_8821cu_driver = {\n+\t.name = \"rtw_8821cu\",\n+\t.id_table = rtw_8821cu_id_table,\n+\t.probe = rtw_8821cu_probe,\n+\t.disconnect = rtw_usb_disconnect,\n+};\n+module_usb_driver(rtw_8821cu_driver);\n+\n+MODULE_AUTHOR(\"Hans Ulli Kroll <linux@ulli-kroll.de>\");\n+MODULE_DESCRIPTION(\"Realtek 802.11ac wireless 8821cu driver\");\n+MODULE_LICENSE(\"Dual BSD/GPL\");\n-- \ncgit \n\nFrom 45794099f5e1d7abc5eb07e6eec7e1e5c6cb540d Mon Sep 17 00:00:00 2001\nFrom: Sascha Hauer <s.hauer@pengutronix.de>\nDate: Fri, 2 Dec 2022 09:12:22 +0100\nSubject: wifi: rtw88: Add rtw8822bu chipset support\n\nAdd support for the rtw8822bu chipset based on\nhttps://github.com/ulli-kroll/rtw88-usb.git\n\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>\nSigned-off-by: Kalle Valo <kvalo@kernel.org>\nLink: https://lore.kernel.org/r/20221202081224.2779981-10-s.hauer@pengutronix.de\n---\n drivers/net/wireless/realtek/rtw88/Kconfig     | 11 ++++\n drivers/net/wireless/realtek/rtw88/Makefile    |  3 +\n drivers/net/wireless/realtek/rtw88/rtw8822b.c  | 19 ++++++\n drivers/net/wireless/realtek/rtw88/rtw8822bu.c | 90 ++++++++++++++++++++++++++\n 4 files changed, 123 insertions(+)\n create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822bu.c\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/Kconfig b/drivers/net/wireless/realtek/rtw88/Kconfig\nindex 2b500dbefbc2d..10f4e7f88b858 100644\n--- a/drivers/net/wireless/realtek/rtw88/Kconfig\n+++ b/drivers/net/wireless/realtek/rtw88/Kconfig\n@@ -42,6 +42,17 @@ config RTW88_8822BE\n \n \t  802.11ac PCIe wireless network adapter\n \n+config RTW88_8822BU\n+\ttristate \"Realtek 8822BU USB wireless network adapter\"\n+\tdepends on USB\n+\tselect RTW88_CORE\n+\tselect RTW88_USB\n+\tselect RTW88_8822B\n+\thelp\n+\t  Select this option will enable support for 8822BU chipset\n+\n+\t  802.11ac USB wireless network adapter\n+\n config RTW88_8822CE\n \ttristate \"Realtek 8822CE PCI wireless network adapter\"\n \tdepends on PCI\ndiff --git a/drivers/net/wireless/realtek/rtw88/Makefile b/drivers/net/wireless/realtek/rtw88/Makefile\nindex 552661a638def..6984bfb7a3170 100644\n--- a/drivers/net/wireless/realtek/rtw88/Makefile\n+++ b/drivers/net/wireless/realtek/rtw88/Makefile\n@@ -26,6 +26,9 @@ rtw88_8822b-objs\t\t:= rtw8822b.o rtw8822b_table.o\n obj-$(CONFIG_RTW88_8822BE)\t+= rtw88_8822be.o\n rtw88_8822be-objs\t\t:= rtw8822be.o\n \n+obj-$(CONFIG_RTW88_8822BU)\t+= rtw88_8822bu.o\n+rtw88_8822bu-objs\t\t:= rtw8822bu.o\n+\n obj-$(CONFIG_RTW88_8822C)\t+= rtw88_8822c.o\n rtw88_8822c-objs\t\t:= rtw8822c.o rtw8822c_table.o\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c\nindex 690e35c98f6e5..74dfb89b2c948 100644\n--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c\n@@ -26,6 +26,12 @@ static void rtw8822be_efuse_parsing(struct rtw_efuse *efuse,\n \tether_addr_copy(efuse->addr, map->e.mac_addr);\n }\n \n+static void rtw8822bu_efuse_parsing(struct rtw_efuse *efuse,\n+\t\t\t\t    struct rtw8822b_efuse *map)\n+{\n+\tether_addr_copy(efuse->addr, map->u.mac_addr);\n+}\n+\n static int rtw8822b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)\n {\n \tstruct rtw_efuse *efuse = &rtwdev->efuse;\n@@ -56,6 +62,9 @@ static int rtw8822b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)\n \tcase RTW_HCI_TYPE_PCIE:\n \t\trtw8822be_efuse_parsing(efuse, map);\n \t\tbreak;\n+\tcase RTW_HCI_TYPE_USB:\n+\t\trtw8822bu_efuse_parsing(efuse, map);\n+\t\tbreak;\n \tdefault:\n \t\t/* unsupported now */\n \t\treturn -ENOTSUPP;\n@@ -1588,6 +1597,15 @@ static void rtw8822b_adaptivity(struct rtw_dev *rtwdev)\n \trtw_phy_set_edcca_th(rtwdev, l2h, h2l);\n }\n \n+static void rtw8822b_fill_txdesc_checksum(struct rtw_dev *rtwdev,\n+\t\t\t\t\t  struct rtw_tx_pkt_info *pkt_info,\n+\t\t\t\t\t  u8 *txdesc)\n+{\n+\tsize_t words = 32 / 2; /* calculate the first 32 bytes (16 words) */\n+\n+\tfill_txdesc_checksum_common(txdesc, words);\n+}\n+\n static const struct rtw_pwr_seq_cmd trans_carddis_to_cardemu_8822b[] = {\n \t{0x0086,\n \t RTW_PWR_CUT_ALL_MSK,\n@@ -2163,6 +2181,7 @@ static struct rtw_chip_ops rtw8822b_ops = {\n \t.cfg_csi_rate\t\t= rtw_bf_cfg_csi_rate,\n \t.adaptivity_init\t= rtw8822b_adaptivity_init,\n \t.adaptivity\t\t= rtw8822b_adaptivity,\n+\t.fill_txdesc_checksum\t= rtw8822b_fill_txdesc_checksum,\n \n \t.coex_set_init\t\t= rtw8822b_coex_cfg_init,\n \t.coex_set_ant_switch\t= rtw8822b_coex_cfg_ant_switch,\ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8822bu.c b/drivers/net/wireless/realtek/rtw88/rtw8822bu.c\nnew file mode 100644\nindex 0000000000000..ab620a0b1dfc6\n--- /dev/null\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8822bu.c\n@@ -0,0 +1,90 @@\n+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause\n+/* Copyright(c) 2018-2019  Realtek Corporation\n+ */\n+\n+#include <linux/module.h>\n+#include <linux/usb.h>\n+#include \"main.h\"\n+#include \"rtw8822b.h\"\n+#include \"usb.h\"\n+\n+static const struct usb_device_id rtw_8822bu_id_table[] = {\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xb812, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) },\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xb82c, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) },\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0x2102, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* CCNC */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xb822, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Edimax EW-7822ULC */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xc822, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Edimax EW-7822UTC */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xd822, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Edimax */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xe822, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Edimax */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xf822, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Edimax EW-7822UAD */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xb81a, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Default ID */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x0b05, 0x1841, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* ASUS AC1300 USB-AC55 B1 */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x0b05, 0x184c, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* ASUS U2 */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x0B05, 0x19aa, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* ASUS - USB-AC58 rev A1 */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x0B05, 0x1870, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* ASUS */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x0B05, 0x1874, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* ASUS */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x331e, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Dlink - DWA-181 */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x331c, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Dlink - DWA-182 - D1 */\n+\t{USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x331f, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec)}, /* Dlink - DWA-183 D Ver */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x13b1, 0x0043, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Linksys WUSB6400M */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x13b1, 0x0045, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Linksys WUSB3600 v2 */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x012d, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* TP-Link Archer T3U v1 */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0138, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* TP-Link Archer T3U Plus v1 */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0115, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* TP-Link Archer T4U V3 */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x012e, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* TP-LINK */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0116, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* TP-LINK */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0117, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* TP-LINK */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x0846, 0x9055, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Netgear A6150 */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x0e66, 0x0025, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* Hawking HW12ACU */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x04ca, 0x8602, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* LiteOn */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x20f4, 0x808a, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* TRENDnet TEW-808UBM */\n+\t{},\n+};\n+MODULE_DEVICE_TABLE(usb, rtw_8822bu_id_table);\n+\n+static int rtw8822bu_probe(struct usb_interface *intf,\n+\t\t\t   const struct usb_device_id *id)\n+{\n+\treturn rtw_usb_probe(intf, id);\n+}\n+\n+static struct usb_driver rtw_8822bu_driver = {\n+\t.name = \"rtw_8822bu\",\n+\t.id_table = rtw_8822bu_id_table,\n+\t.probe = rtw8822bu_probe,\n+\t.disconnect = rtw_usb_disconnect,\n+};\n+module_usb_driver(rtw_8822bu_driver);\n+\n+MODULE_AUTHOR(\"Realtek Corporation\");\n+MODULE_DESCRIPTION(\"Realtek 802.11ac wireless 8822bu driver\");\n+MODULE_LICENSE(\"Dual BSD/GPL\");\n-- \ncgit \n\nFrom 07cef03b8d44dee7488de3d1585387e603c78676 Mon Sep 17 00:00:00 2001\nFrom: Sascha Hauer <s.hauer@pengutronix.de>\nDate: Fri, 2 Dec 2022 09:12:23 +0100\nSubject: wifi: rtw88: Add rtw8822cu chipset support\n\nAdd support for the rtw8822cu chipset based on\nhttps://github.com/ulli-kroll/rtw88-usb.git\n\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>\nSigned-off-by: Kalle Valo <kvalo@kernel.org>\nLink: https://lore.kernel.org/r/20221202081224.2779981-11-s.hauer@pengutronix.de\n---\n drivers/net/wireless/realtek/rtw88/Kconfig     | 11 +++++++\n drivers/net/wireless/realtek/rtw88/Makefile    |  3 ++\n drivers/net/wireless/realtek/rtw88/rtw8822c.c  | 24 ++++++++++++++\n drivers/net/wireless/realtek/rtw88/rtw8822cu.c | 44 ++++++++++++++++++++++++++\n 4 files changed, 82 insertions(+)\n create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822cu.c\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/Kconfig b/drivers/net/wireless/realtek/rtw88/Kconfig\nindex 10f4e7f88b858..138289bc5ad0c 100644\n--- a/drivers/net/wireless/realtek/rtw88/Kconfig\n+++ b/drivers/net/wireless/realtek/rtw88/Kconfig\n@@ -64,6 +64,17 @@ config RTW88_8822CE\n \n \t  802.11ac PCIe wireless network adapter\n \n+config RTW88_8822CU\n+\ttristate \"Realtek 8822CU USB wireless network adapter\"\n+\tdepends on USB\n+\tselect RTW88_CORE\n+\tselect RTW88_USB\n+\tselect RTW88_8822C\n+\thelp\n+\t  Select this option will enable support for 8822CU chipset\n+\n+\t  802.11ac USB wireless network adapter\n+\n config RTW88_8723DE\n \ttristate \"Realtek 8723DE PCI wireless network adapter\"\n \tdepends on PCI\ndiff --git a/drivers/net/wireless/realtek/rtw88/Makefile b/drivers/net/wireless/realtek/rtw88/Makefile\nindex 6984bfb7a3170..fe2dd90204a78 100644\n--- a/drivers/net/wireless/realtek/rtw88/Makefile\n+++ b/drivers/net/wireless/realtek/rtw88/Makefile\n@@ -35,6 +35,9 @@ rtw88_8822c-objs\t\t:= rtw8822c.o rtw8822c_table.o\n obj-$(CONFIG_RTW88_8822CE)\t+= rtw88_8822ce.o\n rtw88_8822ce-objs\t\t:= rtw8822ce.o\n \n+obj-$(CONFIG_RTW88_8822CU)\t+= rtw88_8822cu.o\n+rtw88_8822cu-objs\t\t:= rtw8822cu.o\n+\n obj-$(CONFIG_RTW88_8723D)\t+= rtw88_8723d.o\n rtw88_8723d-objs\t\t:= rtw8723d.o rtw8723d_table.o\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c\nindex fccb15dfb9595..964e27887fe2d 100644\n--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c\n@@ -29,6 +29,12 @@ static void rtw8822ce_efuse_parsing(struct rtw_efuse *efuse,\n \tether_addr_copy(efuse->addr, map->e.mac_addr);\n }\n \n+static void rtw8822cu_efuse_parsing(struct rtw_efuse *efuse,\n+\t\t\t\t    struct rtw8822c_efuse *map)\n+{\n+\tether_addr_copy(efuse->addr, map->u.mac_addr);\n+}\n+\n static int rtw8822c_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)\n {\n \tstruct rtw_efuse *efuse = &rtwdev->efuse;\n@@ -58,6 +64,9 @@ static int rtw8822c_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)\n \tcase RTW_HCI_TYPE_PCIE:\n \t\trtw8822ce_efuse_parsing(efuse, map);\n \t\tbreak;\n+\tcase RTW_HCI_TYPE_USB:\n+\t\trtw8822cu_efuse_parsing(efuse, map);\n+\t\tbreak;\n \tdefault:\n \t\t/* unsupported now */\n \t\treturn -ENOTSUPP;\n@@ -4557,6 +4566,18 @@ static void rtw8822c_adaptivity(struct rtw_dev *rtwdev)\n \trtw_phy_set_edcca_th(rtwdev, l2h, h2l);\n }\n \n+static void rtw8822c_fill_txdesc_checksum(struct rtw_dev *rtwdev,\n+\t\t\t\t\t  struct rtw_tx_pkt_info *pkt_info,\n+\t\t\t\t\t  u8 *txdesc)\n+{\n+\tconst struct rtw_chip_info *chip = rtwdev->chip;\n+\tsize_t words;\n+\n+\twords = (pkt_info->pkt_offset * 8 + chip->tx_pkt_desc_sz) / 2;\n+\n+\tfill_txdesc_checksum_common(txdesc, words);\n+}\n+\n static const struct rtw_pwr_seq_cmd trans_carddis_to_cardemu_8822c[] = {\n \t{0x0086,\n \t RTW_PWR_CUT_ALL_MSK,\n@@ -4895,6 +4916,8 @@ static const struct rtw_rfe_def rtw8822c_rfe_defs[] = {\n \t[0] = RTW_DEF_RFE(8822c, 0, 0),\n \t[1] = RTW_DEF_RFE(8822c, 0, 0),\n \t[2] = RTW_DEF_RFE(8822c, 0, 0),\n+\t[3] = RTW_DEF_RFE(8822c, 0, 0),\n+\t[4] = RTW_DEF_RFE(8822c, 0, 0),\n \t[5] = RTW_DEF_RFE(8822c, 0, 5),\n \t[6] = RTW_DEF_RFE(8822c, 0, 0),\n };\n@@ -4978,6 +5001,7 @@ static struct rtw_chip_ops rtw8822c_ops = {\n \t.cfo_track\t\t= rtw8822c_cfo_track,\n \t.config_tx_path\t\t= rtw8822c_config_tx_path,\n \t.config_txrx_mode\t= rtw8822c_config_trx_mode,\n+\t.fill_txdesc_checksum\t= rtw8822c_fill_txdesc_checksum,\n \n \t.coex_set_init\t\t= rtw8822c_coex_cfg_init,\n \t.coex_set_ant_switch\t= NULL,\ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8822cu.c b/drivers/net/wireless/realtek/rtw88/rtw8822cu.c\nnew file mode 100644\nindex 0000000000000..af28ca09d41fb\n--- /dev/null\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8822cu.c\n@@ -0,0 +1,44 @@\n+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause\n+/* Copyright(c) 2018-2019  Realtek Corporation\n+ */\n+\n+#include <linux/module.h>\n+#include <linux/usb.h>\n+#include \"main.h\"\n+#include \"rtw8822c.h\"\n+#include \"usb.h\"\n+\n+static const struct usb_device_id rtw_8822cu_id_table[] = {\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc82c, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) },\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc812, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) },\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc82e, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) },\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xd820, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) },\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xd82b, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) },\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x13b1, 0x0043, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) }, /* Alpha - Alpha */\n+\t{},\n+};\n+MODULE_DEVICE_TABLE(usb, rtw_8822cu_id_table);\n+\n+static int rtw8822bu_probe(struct usb_interface *intf,\n+\t\t\t   const struct usb_device_id *id)\n+{\n+\treturn rtw_usb_probe(intf, id);\n+}\n+\n+static struct usb_driver rtw_8822cu_driver = {\n+\t.name = \"rtw_8822cu\",\n+\t.id_table = rtw_8822cu_id_table,\n+\t.probe = rtw8822bu_probe,\n+\t.disconnect = rtw_usb_disconnect,\n+};\n+module_usb_driver(rtw_8822cu_driver);\n+\n+MODULE_AUTHOR(\"Realtek Corporation\");\n+MODULE_DESCRIPTION(\"Realtek 802.11ac wireless 8822cu driver\");\n+MODULE_LICENSE(\"Dual BSD/GPL\");\n-- \ncgit \n\nFrom 87caeef032fc3921bc866ad7becb6ed51aa8b27b Mon Sep 17 00:00:00 2001\nFrom: Sascha Hauer <s.hauer@pengutronix.de>\nDate: Fri, 2 Dec 2022 09:12:24 +0100\nSubject: wifi: rtw88: Add rtw8723du chipset support\n\nAdd support for the rtw8723du chipset based on\nhttps://github.com/ulli-kroll/rtw88-usb.git\n\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>\nSigned-off-by: Kalle Valo <kvalo@kernel.org>\nLink: https://lore.kernel.org/r/20221202081224.2779981-12-s.hauer@pengutronix.de\n---\n drivers/net/wireless/realtek/rtw88/Kconfig     | 11 ++++++++\n drivers/net/wireless/realtek/rtw88/Makefile    |  3 +++\n drivers/net/wireless/realtek/rtw88/rtw8723d.c  | 28 ++++++++++++++++++++\n drivers/net/wireless/realtek/rtw88/rtw8723d.h  | 13 +++++++++-\n drivers/net/wireless/realtek/rtw88/rtw8723du.c | 36 ++++++++++++++++++++++++++\n 5 files changed, 90 insertions(+), 1 deletion(-)\n create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8723du.c\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/Kconfig b/drivers/net/wireless/realtek/rtw88/Kconfig\nindex 138289bc5ad0c..651ab56d9c6bd 100644\n--- a/drivers/net/wireless/realtek/rtw88/Kconfig\n+++ b/drivers/net/wireless/realtek/rtw88/Kconfig\n@@ -86,6 +86,17 @@ config RTW88_8723DE\n \n \t  802.11n PCIe wireless network adapter\n \n+config RTW88_8723DU\n+\ttristate \"Realtek 8723DU USB wireless network adapter\"\n+\tdepends on USB\n+\tselect RTW88_CORE\n+\tselect RTW88_USB\n+\tselect RTW88_8723D\n+\thelp\n+\t  Select this option will enable support for 8723DU chipset\n+\n+\t  802.11n USB wireless network adapter\n+\n config RTW88_8821CE\n \ttristate \"Realtek 8821CE PCI wireless network adapter\"\n \tdepends on PCI\ndiff --git a/drivers/net/wireless/realtek/rtw88/Makefile b/drivers/net/wireless/realtek/rtw88/Makefile\nindex fe2dd90204a78..fe7293ee87b45 100644\n--- a/drivers/net/wireless/realtek/rtw88/Makefile\n+++ b/drivers/net/wireless/realtek/rtw88/Makefile\n@@ -44,6 +44,9 @@ rtw88_8723d-objs\t\t:= rtw8723d.o rtw8723d_table.o\n obj-$(CONFIG_RTW88_8723DE)\t+= rtw88_8723de.o\n rtw88_8723de-objs\t\t:= rtw8723de.o\n \n+obj-$(CONFIG_RTW88_8723DU)\t+= rtw88_8723du.o\n+rtw88_8723du-objs\t\t:= rtw8723du.o\n+\n obj-$(CONFIG_RTW88_8821C)\t+= rtw88_8821c.o\n rtw88_8821c-objs\t\t:= rtw8821c.o rtw8821c_table.o\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8723d.c b/drivers/net/wireless/realtek/rtw88/rtw8723d.c\nindex 0a4f770fcbb7e..2d2f768bae2ea 100644\n--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.c\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.c\n@@ -210,6 +210,12 @@ static void rtw8723de_efuse_parsing(struct rtw_efuse *efuse,\n \tether_addr_copy(efuse->addr, map->e.mac_addr);\n }\n \n+static void rtw8723du_efuse_parsing(struct rtw_efuse *efuse,\n+\t\t\t\t    struct rtw8723d_efuse *map)\n+{\n+\tether_addr_copy(efuse->addr, map->u.mac_addr);\n+}\n+\n static int rtw8723d_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)\n {\n \tstruct rtw_efuse *efuse = &rtwdev->efuse;\n@@ -239,6 +245,9 @@ static int rtw8723d_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)\n \tcase RTW_HCI_TYPE_PCIE:\n \t\trtw8723de_efuse_parsing(efuse, map);\n \t\tbreak;\n+\tcase RTW_HCI_TYPE_USB:\n+\t\trtw8723du_efuse_parsing(efuse, map);\n+\t\tbreak;\n \tdefault:\n \t\t/* unsupported now */\n \t\treturn -ENOTSUPP;\n@@ -1945,6 +1954,24 @@ static void rtw8723d_pwr_track(struct rtw_dev *rtwdev)\n \tdm_info->pwr_trk_triggered = false;\n }\n \n+static void rtw8723d_fill_txdesc_checksum(struct rtw_dev *rtwdev,\n+\t\t\t\t\t  struct rtw_tx_pkt_info *pkt_info,\n+\t\t\t\t\t  u8 *txdesc)\n+{\n+\tsize_t words = 32 / 2; /* calculate the first 32 bytes (16 words) */\n+\t__le16 chksum = 0;\n+\t__le16 *data = (__le16 *)(txdesc);\n+\n+\tSET_TX_DESC_TXDESC_CHECKSUM(txdesc, 0x0000);\n+\n+\twhile (words--)\n+\t\tchksum ^= *data++;\n+\n+\tchksum = ~chksum;\n+\n+\tSET_TX_DESC_TXDESC_CHECKSUM(txdesc, __le16_to_cpu(chksum));\n+}\n+\n static struct rtw_chip_ops rtw8723d_ops = {\n \t.phy_set_param\t\t= rtw8723d_phy_set_param,\n \t.read_efuse\t\t= rtw8723d_read_efuse,\n@@ -1965,6 +1992,7 @@ static struct rtw_chip_ops rtw8723d_ops = {\n \t.config_bfee\t\t= NULL,\n \t.set_gid_table\t\t= NULL,\n \t.cfg_csi_rate\t\t= NULL,\n+\t.fill_txdesc_checksum\t= rtw8723d_fill_txdesc_checksum,\n \n \t.coex_set_init\t\t= rtw8723d_coex_cfg_init,\n \t.coex_set_ant_switch\t= NULL,\ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8723d.h b/drivers/net/wireless/realtek/rtw88/rtw8723d.h\nindex 4641f6e047b41..a356318a5c15b 100644\n--- a/drivers/net/wireless/realtek/rtw88/rtw8723d.h\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8723d.h\n@@ -41,6 +41,14 @@ struct rtw8723de_efuse {\n \tu8 sub_device_id[2];\n };\n \n+struct rtw8723du_efuse {\n+\tu8 res4[48];                    /* 0xd0 */\n+\tu8 vender_id[2];                /* 0x100 */\n+\tu8 product_id[2];               /* 0x102 */\n+\tu8 usb_option;                  /* 0x104 */\n+\tu8 mac_addr[ETH_ALEN];          /* 0x107 */\n+};\n+\n struct rtw8723d_efuse {\n \t__le16 rtl_id;\n \tu8 rsvd[2];\n@@ -69,7 +77,10 @@ struct rtw8723d_efuse {\n \tu8 rfe_option;\n \tu8 country_code[2];\n \tu8 res[3];\n-\tstruct rtw8723de_efuse e;\n+\tunion {\n+\t\tstruct rtw8723de_efuse e;\n+\t\tstruct rtw8723du_efuse u;\n+\t};\n };\n \n extern const struct rtw_chip_info rtw8723d_hw_spec;\ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8723du.c b/drivers/net/wireless/realtek/rtw88/rtw8723du.c\nnew file mode 100644\nindex 0000000000000..322a805da76b0\n--- /dev/null\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8723du.c\n@@ -0,0 +1,36 @@\n+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause\n+/* Copyright(c) 2018-2019  Realtek Corporation\n+ */\n+\n+#include <linux/module.h>\n+#include <linux/usb.h>\n+#include \"main.h\"\n+#include \"rtw8723d.h\"\n+#include \"usb.h\"\n+\n+static const struct usb_device_id rtw_8723du_id_table[] = {\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xd723, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8723d_hw_spec) }, /* 8723DU 1*1 */\n+\t{ USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xd611, 0xff, 0xff, 0xff),\n+\t  .driver_info = (kernel_ulong_t)&(rtw8723d_hw_spec) }, /* Edimax EW-7611ULB V2 */\n+\t{ },\n+};\n+MODULE_DEVICE_TABLE(usb, rtw_8723du_id_table);\n+\n+static int rtw8723du_probe(struct usb_interface *intf,\n+\t\t\t   const struct usb_device_id *id)\n+{\n+\treturn rtw_usb_probe(intf, id);\n+}\n+\n+static struct usb_driver rtw_8723du_driver = {\n+\t.name = \"rtw_8723du\",\n+\t.id_table = rtw_8723du_id_table,\n+\t.probe = rtw8723du_probe,\n+\t.disconnect = rtw_usb_disconnect,\n+};\n+module_usb_driver(rtw_8723du_driver);\n+\n+MODULE_AUTHOR(\"Hans Ulli Kroll <linux@ulli-kroll.de>\");\n+MODULE_DESCRIPTION(\"Realtek 802.11n wireless 8723du driver\");\n+MODULE_LICENSE(\"Dual BSD/GPL\");\n-- \ncgit \n\n"
  },
  {
    "path": "packages/linux/patches/default/linux-122-rtw88-USB-fixes.patch",
    "content": "From: Sascha Hauer <s.hauer@pengutronix.de>\nTo: linux-wireless@vger.kernel.org\nCc: Neo Jou <neojou@gmail.com>, Hans Ulli Kroll <linux@ulli-kroll.de>,\n        Ping-Ke Shih <pkshih@realtek.com>,\n        Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>, netdev@vger.kernel.org,\n        linux-kernel@vger.kernel.org,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>,\n        kernel@pengutronix.de, Alexander Hochbaum <alex@appudo.com>,\n        Da Xue <da@libre.computer>, Po-Hao Huang <phhuang@realtek.com>,\n        Andreas Henriksson <andreas@fatal.se>,\n        Viktor Petrenko <g0000ga@gmail.com>,\n        Sascha Hauer <s.hauer@pengutronix.de>\nSubject: [PATCH v2 0/3] wifi: rtw88: USB fixes\nDate: Fri, 10 Feb 2023 12:16:29 +0100\nMessage-Id: <20230210111632.1985205-1-s.hauer@pengutronix.de>\nX-Mailer: git-send-email 2.30.2\nMIME-Version: 1.0\nX-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2\nX-SA-Exim-Mail-From: sha@pengutronix.de\nX-SA-Exim-Scanned: No (on metis.ext.pengutronix.de);\n SAEximRunCond expanded to false\nX-PTX-Original-Recipient: linux-wireless@vger.kernel.org\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nThis series addresses issues for the recently added RTW88 USB support\nreported by Andreas Henriksson and also our customer.\n\nThe hardware can't handle urbs that have a size of multiple of the\nbulkout_size (usually 512 bytes). The symptom is that the hardware\nstalls completely. The issue can be reproduced by sending a suitably\nsized ping packet from the device:\n\nping -s 394 <somehost>\n\n(It's 394 bytes here on a RTL8822CU and RTL8821CU, the actual size may\ndiffer on other chips, it was 402 bytes on a RTL8723DU)\n\nOther than that qsel was not set correctly. The sympton here is that\nonly one of multiple bulk endpoints was used to send data.\n\nChanges since v1:\n- Use URB_ZERO_PACKET to let the USB host controller handle it automatically\n  rather than working around the issue.\n\nSascha Hauer (3):\n  wifi: rtw88: usb: Set qsel correctly\n  wifi: rtw88: usb: send Zero length packets if necessary\n  wifi: rtw88: usb: drop now unnecessary URB size check\n\n drivers/net/wireless/realtek/rtw88/usb.c | 18 +++---------------\n 1 file changed, 3 insertions(+), 15 deletions(-)\nReported-by: Andreas Henriksson <andreas@fatal.se>\nTested-by: Andreas Henriksson <andreas@fatal.se>\n\nFrom: Sascha Hauer <s.hauer@pengutronix.de>\nTo: linux-wireless@vger.kernel.org\nCc: Neo Jou <neojou@gmail.com>, Hans Ulli Kroll <linux@ulli-kroll.de>,\n        Ping-Ke Shih <pkshih@realtek.com>,\n        Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>, netdev@vger.kernel.org,\n        linux-kernel@vger.kernel.org,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>,\n        kernel@pengutronix.de, Alexander Hochbaum <alex@appudo.com>,\n        Da Xue <da@libre.computer>, Po-Hao Huang <phhuang@realtek.com>,\n        Andreas Henriksson <andreas@fatal.se>,\n        Viktor Petrenko <g0000ga@gmail.com>,\n        Sascha Hauer <s.hauer@pengutronix.de>\nSubject: [PATCH v2 1/3] wifi: rtw88: usb: Set qsel correctly\nDate: Fri, 10 Feb 2023 12:16:30 +0100\nMessage-Id: <20230210111632.1985205-2-s.hauer@pengutronix.de>\nX-Mailer: git-send-email 2.30.2\nIn-Reply-To: <20230210111632.1985205-1-s.hauer@pengutronix.de>\nReferences: <20230210111632.1985205-1-s.hauer@pengutronix.de>\nMIME-Version: 1.0\nX-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2\nX-SA-Exim-Mail-From: sha@pengutronix.de\nX-SA-Exim-Scanned: No (on metis.ext.pengutronix.de);\n SAEximRunCond expanded to false\nX-PTX-Original-Recipient: linux-wireless@vger.kernel.org\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nWe have to extract qsel from the skb before doing skb_push() on it,\notherwise qsel will always be 0.\n\nFixes: a82dfd33d1237 (\"wifi: rtw88: Add common USB chip support\")\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>\n---\n drivers/net/wireless/realtek/rtw88/usb.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c\nindex 4ef38279b64c9..d9e995544e405 100644\n--- a/drivers/net/wireless/realtek/rtw88/usb.c\n+++ b/drivers/net/wireless/realtek/rtw88/usb.c\n@@ -471,9 +471,9 @@ static int rtw_usb_tx_write(struct rtw_dev *rtwdev,\n \tu8 *pkt_desc;\n \tint ep;\n \n+\tpkt_info->qsel = rtw_usb_tx_queue_mapping_to_qsel(skb);\n \tpkt_desc = skb_push(skb, chip->tx_pkt_desc_sz);\n \tmemset(pkt_desc, 0, chip->tx_pkt_desc_sz);\n-\tpkt_info->qsel = rtw_usb_tx_queue_mapping_to_qsel(skb);\n \tep = qsel_to_ep(rtwusb, pkt_info->qsel);\n \trtw_tx_fill_tx_desc(pkt_info, skb);\n \trtw_tx_fill_txdesc_checksum(rtwdev, pkt_info, skb->data);\n\nFrom: Sascha Hauer <s.hauer@pengutronix.de>\nTo: linux-wireless@vger.kernel.org\nCc: Neo Jou <neojou@gmail.com>, Hans Ulli Kroll <linux@ulli-kroll.de>,\n        Ping-Ke Shih <pkshih@realtek.com>,\n        Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>, netdev@vger.kernel.org,\n        linux-kernel@vger.kernel.org,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>,\n        kernel@pengutronix.de, Alexander Hochbaum <alex@appudo.com>,\n        Da Xue <da@libre.computer>, Po-Hao Huang <phhuang@realtek.com>,\n        Andreas Henriksson <andreas@fatal.se>,\n        Viktor Petrenko <g0000ga@gmail.com>,\n        Sascha Hauer <s.hauer@pengutronix.de>\nSubject: [PATCH v2 2/3] wifi: rtw88: usb: send Zero length packets if\n necessary\nDate: Fri, 10 Feb 2023 12:16:31 +0100\nMessage-Id: <20230210111632.1985205-3-s.hauer@pengutronix.de>\nX-Mailer: git-send-email 2.30.2\nIn-Reply-To: <20230210111632.1985205-1-s.hauer@pengutronix.de>\nReferences: <20230210111632.1985205-1-s.hauer@pengutronix.de>\nMIME-Version: 1.0\nX-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2\nX-SA-Exim-Mail-From: sha@pengutronix.de\nX-SA-Exim-Scanned: No (on metis.ext.pengutronix.de);\n SAEximRunCond expanded to false\nX-PTX-Original-Recipient: linux-wireless@vger.kernel.org\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nZero length packets are necessary when sending URBs with size\nmultiple of bulkout_size, otherwise the hardware just stalls.\n\nFixes: a82dfd33d1237 (\"wifi: rtw88: Add common USB chip support\")\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>\n---\n drivers/net/wireless/realtek/rtw88/usb.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c\nindex d9e995544e405..1a09c9288198a 100644\n--- a/drivers/net/wireless/realtek/rtw88/usb.c\n+++ b/drivers/net/wireless/realtek/rtw88/usb.c\n@@ -271,6 +271,7 @@ static int rtw_usb_write_port(struct rtw_dev *rtwdev, u8 qsel, struct sk_buff *s\n \t\treturn -ENOMEM;\n \n \tusb_fill_bulk_urb(urb, usbd, pipe, skb->data, skb->len, cb, context);\n+\turb->transfer_flags |= URB_ZERO_PACKET;\n \tret = usb_submit_urb(urb, GFP_ATOMIC);\n \n \tusb_free_urb(urb);\n\nFrom: Sascha Hauer <s.hauer@pengutronix.de>\nTo: linux-wireless@vger.kernel.org\nCc: Neo Jou <neojou@gmail.com>, Hans Ulli Kroll <linux@ulli-kroll.de>,\n        Ping-Ke Shih <pkshih@realtek.com>,\n        Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>, netdev@vger.kernel.org,\n        linux-kernel@vger.kernel.org,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>,\n        kernel@pengutronix.de, Alexander Hochbaum <alex@appudo.com>,\n        Da Xue <da@libre.computer>, Po-Hao Huang <phhuang@realtek.com>,\n        Andreas Henriksson <andreas@fatal.se>,\n        Viktor Petrenko <g0000ga@gmail.com>,\n        Sascha Hauer <s.hauer@pengutronix.de>\nSubject: [PATCH v2 3/3] wifi: rtw88: usb: drop now unnecessary URB size check\nDate: Fri, 10 Feb 2023 12:16:32 +0100\nMessage-Id: <20230210111632.1985205-4-s.hauer@pengutronix.de>\nX-Mailer: git-send-email 2.30.2\nIn-Reply-To: <20230210111632.1985205-1-s.hauer@pengutronix.de>\nReferences: <20230210111632.1985205-1-s.hauer@pengutronix.de>\nMIME-Version: 1.0\nX-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2\nX-SA-Exim-Mail-From: sha@pengutronix.de\nX-SA-Exim-Scanned: No (on metis.ext.pengutronix.de);\n SAEximRunCond expanded to false\nX-PTX-Original-Recipient: linux-wireless@vger.kernel.org\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nNow that we send URBs with the URB_ZERO_PACKET flag set we no longer\nneed to make sure that the URB sizes are not multiple of the\nbulkout_size. Drop the check.\n\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>\n---\n drivers/net/wireless/realtek/rtw88/usb.c | 15 +--------------\n 1 file changed, 1 insertion(+), 14 deletions(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c\nindex 1a09c9288198a..2a8336b1847a5 100644\n--- a/drivers/net/wireless/realtek/rtw88/usb.c\n+++ b/drivers/net/wireless/realtek/rtw88/usb.c\n@@ -414,24 +414,11 @@ static int rtw_usb_write_data_rsvd_page(struct rtw_dev *rtwdev, u8 *buf,\n \t\t\t\t\tu32 size)\n {\n \tconst struct rtw_chip_info *chip = rtwdev->chip;\n-\tstruct rtw_usb *rtwusb;\n \tstruct rtw_tx_pkt_info pkt_info = {0};\n-\tu32 len, desclen;\n-\n-\trtwusb = rtw_get_usb_priv(rtwdev);\n \n \tpkt_info.tx_pkt_size = size;\n \tpkt_info.qsel = TX_DESC_QSEL_BEACON;\n-\n-\tdesclen = chip->tx_pkt_desc_sz;\n-\tlen = desclen + size;\n-\tif (len % rtwusb->bulkout_size == 0) {\n-\t\tlen += RTW_USB_PACKET_OFFSET_SZ;\n-\t\tpkt_info.offset = desclen + RTW_USB_PACKET_OFFSET_SZ;\n-\t\tpkt_info.pkt_offset = 1;\n-\t} else {\n-\t\tpkt_info.offset = desclen;\n-\t}\n+\tpkt_info.offset = chip->tx_pkt_desc_sz;\n \n \treturn rtw_usb_write_data(rtwdev, &pkt_info, buf);\n }\n"
  },
  {
    "path": "packages/linux/patches/default/linux-122-rtw88-USB-fixes2.patch",
    "content": "From:   Sascha Hauer <s.hauer@pengutronix.de>\nTo:     linux-wireless <linux-wireless@vger.kernel.org>\nCc:     Hans Ulli Kroll <linux@ulli-kroll.de>,\n        Larry Finger <Larry.Finger@lwfinger.net>,\n        Pkshih <pkshih@realtek.com>, Tim K <tpkuester@gmail.com>,\n        \"Alex G .\" <mr.nuke.me@gmail.com>,\n        Nick Morrow <morrownr@gmail.com>,\n        Viktor Petrenko <g0000ga@gmail.com>,\n        Andreas Henriksson <andreas@fatal.se>,\n        ValdikSS <iam@valdikss.org.ru>, kernel@pengutronix.de,\n        stable@vger.kernel.org, Sascha Hauer <s.hauer@pengutronix.de>\nSubject: [PATCH 0/2] RTW88 USB bug fixes\nDate:   Fri, 31 Mar 2023 14:10:52 +0200\nMessage-Id: <20230331121054.112758-1-s.hauer@pengutronix.de>\nX-Mailer: git-send-email 2.39.2\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nX-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2\nX-SA-Exim-Mail-From: sha@pengutronix.de\nX-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false\nX-PTX-Original-Recipient: linux-wireless@vger.kernel.org\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nThis series fixes two bugs in the RTW88 USB driver I was reported from\nseveral people and that I also encountered myself.\n\nThe first one resulted in \"timed out to flush queue 3\" messages from the\ndriver and sometimes a complete stall of the TX queues.\n\nThe second one is specific to the RTW8821CU chipset. Here 2GHz networks\nwere hardly seen and impossible to connect to. This goes down to\nmisinterpreting the rfe_option field in the efuse.\n\nSascha Hauer (2):\n  wifi: rtw88: usb: fix priority queue to endpoint mapping\n  wifi: rtw88: rtw8821c: Fix rfe_option field width\n\n drivers/net/wireless/realtek/rtw88/rtw8821c.c |  3 +-\n drivers/net/wireless/realtek/rtw88/usb.c      | 70 +++++++++++++------\n 2 files changed, 48 insertions(+), 25 deletions(-)\n\n-- \n2.39.2\n\n\nFrom:   Sascha Hauer <s.hauer@pengutronix.de>\nTo:     linux-wireless <linux-wireless@vger.kernel.org>\nCc:     Hans Ulli Kroll <linux@ulli-kroll.de>,\n        Larry Finger <Larry.Finger@lwfinger.net>,\n        Pkshih <pkshih@realtek.com>, Tim K <tpkuester@gmail.com>,\n        \"Alex G .\" <mr.nuke.me@gmail.com>,\n        Nick Morrow <morrownr@gmail.com>,\n        Viktor Petrenko <g0000ga@gmail.com>,\n        Andreas Henriksson <andreas@fatal.se>,\n        ValdikSS <iam@valdikss.org.ru>, kernel@pengutronix.de,\n        stable@vger.kernel.org, Sascha Hauer <s.hauer@pengutronix.de>\nSubject: [PATCH 1/2] wifi: rtw88: usb: fix priority queue to endpoint mapping\nDate:   Fri, 31 Mar 2023 14:10:53 +0200\nMessage-Id: <20230331121054.112758-2-s.hauer@pengutronix.de>\nX-Mailer: git-send-email 2.39.2\nIn-Reply-To: <20230331121054.112758-1-s.hauer@pengutronix.de>\nReferences: <20230331121054.112758-1-s.hauer@pengutronix.de>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nX-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2\nX-SA-Exim-Mail-From: sha@pengutronix.de\nX-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false\nX-PTX-Original-Recipient: linux-wireless@vger.kernel.org\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nThe RTW88 chipsets have four different priority queues in hardware. For\nthe USB type chipsets the packets destined for a specific priority queue\nmust be sent through the endpoint corresponding to the queue. This was\nnot fully understood when porting from the RTW88 USB out of tree driver\nand thus violated.\n\nThis patch implements the qsel to endpoint mapping as in\nget_usb_bulkout_id_88xx() in the downstream driver.\n\nWithout this the driver often issues \"timed out to flush queue 3\"\nwarnings and often TX stalls completely.\n\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>\n---\n drivers/net/wireless/realtek/rtw88/usb.c | 70 ++++++++++++++++--------\n 1 file changed, 47 insertions(+), 23 deletions(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c\nindex 2a8336b1847a5..a10d6fef4ffaf 100644\n--- a/drivers/net/wireless/realtek/rtw88/usb.c\n+++ b/drivers/net/wireless/realtek/rtw88/usb.c\n@@ -118,6 +118,22 @@ static void rtw_usb_write32(struct rtw_dev *rtwdev, u32 addr, u32 val)\n \trtw_usb_write(rtwdev, addr, val, 4);\n }\n \n+static int dma_mapping_to_ep(enum rtw_dma_mapping dma_mapping)\n+{\n+\tswitch (dma_mapping) {\n+\tcase RTW_DMA_MAPPING_HIGH:\n+\t\treturn 0;\n+\tcase RTW_DMA_MAPPING_NORMAL:\n+\t\treturn 1;\n+\tcase RTW_DMA_MAPPING_LOW:\n+\t\treturn 2;\n+\tcase RTW_DMA_MAPPING_EXTRA:\n+\t\treturn 3;\n+\tdefault:\n+\t\treturn -EINVAL;\n+\t}\n+}\n+\n static int rtw_usb_parse(struct rtw_dev *rtwdev,\n \t\t\t struct usb_interface *interface)\n {\n@@ -129,6 +145,8 @@ static int rtw_usb_parse(struct rtw_dev *rtwdev,\n \tint num_out_pipes = 0;\n \tint i;\n \tu8 num;\n+\tconst struct rtw_chip_info *chip = rtwdev->chip;\n+\tconst struct rtw_rqpn *rqpn;\n \n \tfor (i = 0; i < interface_desc->bNumEndpoints; i++) {\n \t\tendpoint = &host_interface->endpoint[i].desc;\n@@ -183,31 +201,34 @@ static int rtw_usb_parse(struct rtw_dev *rtwdev,\n \n \trtwdev->hci.bulkout_num = num_out_pipes;\n \n-\tswitch (num_out_pipes) {\n-\tcase 4:\n-\tcase 3:\n-\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID0] = 2;\n-\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID1] = 2;\n-\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID2] = 2;\n-\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID3] = 2;\n-\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID4] = 1;\n-\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID5] = 1;\n-\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID6] = 0;\n-\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID7] = 0;\n-\t\tbreak;\n-\tcase 2:\n-\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID0] = 1;\n-\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID1] = 1;\n-\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID2] = 1;\n-\t\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID3] = 1;\n-\t\tbreak;\n-\tcase 1:\n-\t\tbreak;\n-\tdefault:\n-\t\trtw_err(rtwdev, \"failed to get out_pipes(%d)\\n\", num_out_pipes);\n+\tif (num_out_pipes < 1 || num_out_pipes > 4) {\n+\t\trtw_err(rtwdev, \"invalid number of endpoints %d\\n\", num_out_pipes);\n \t\treturn -EINVAL;\n \t}\n \n+\trqpn = &chip->rqpn_table[num_out_pipes];\n+\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID0] = dma_mapping_to_ep(rqpn->dma_map_be);\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID1] = dma_mapping_to_ep(rqpn->dma_map_bk);\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID2] = dma_mapping_to_ep(rqpn->dma_map_bk);\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID3] = dma_mapping_to_ep(rqpn->dma_map_be);\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID4] = dma_mapping_to_ep(rqpn->dma_map_vi);\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID5] = dma_mapping_to_ep(rqpn->dma_map_vi);\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID6] = dma_mapping_to_ep(rqpn->dma_map_vo);\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID7] = dma_mapping_to_ep(rqpn->dma_map_vo);\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID8] = -EINVAL;\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID9] = -EINVAL;\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID10] = -EINVAL;\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID11] = -EINVAL;\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID12] = -EINVAL;\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID13] = -EINVAL;\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID14] = -EINVAL;\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_TID15] = -EINVAL;\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_BEACON] = dma_mapping_to_ep(rqpn->dma_map_hi);\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_HIGH] = dma_mapping_to_ep(rqpn->dma_map_hi);\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_MGMT] = dma_mapping_to_ep(rqpn->dma_map_mg);\n+\trtwusb->qsel_to_ep[TX_DESC_QSEL_H2C] = dma_mapping_to_ep(rqpn->dma_map_hi);\n+\n \treturn 0;\n }\n \n@@ -250,7 +271,7 @@ static void rtw_usb_write_port_tx_complete(struct urb *urb)\n static int qsel_to_ep(struct rtw_usb *rtwusb, unsigned int qsel)\n {\n \tif (qsel >= ARRAY_SIZE(rtwusb->qsel_to_ep))\n-\t\treturn 0;\n+\t\treturn -EINVAL;\n \n \treturn rtwusb->qsel_to_ep[qsel];\n }\n@@ -265,6 +286,9 @@ static int rtw_usb_write_port(struct rtw_dev *rtwdev, u8 qsel, struct sk_buff *s\n \tint ret;\n \tint ep = qsel_to_ep(rtwusb, qsel);\n \n+\tif (ep < 0)\n+\t\treturn ep;\n+\n \tpipe = usb_sndbulkpipe(usbd, rtwusb->out_ep[ep]);\n \turb = usb_alloc_urb(0, GFP_ATOMIC);\n \tif (!urb)\n-- \n2.39.2\n\n"
  },
  {
    "path": "packages/linux/patches/default/linux-122-rtw88-fix-rcu-lock.patch",
    "content": "From:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     tony0620emma@gmail.com, kvalo@kernel.org, pkshih@realtek.com,\n        s.hauer@pengutronix.de, netdev@vger.kernel.org,\n        linux-kernel@vger.kernel.org,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [PATCH v3 0/3] wifi: rtw88: Three locking fixes for existing code\nDate:   Sun,  8 Jan 2023 22:13:21 +0100\nMessage-Id: <20230108211324.442823-1-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nThis series consists of three patches which are fixing existing\nbehavior (meaning: it either affects PCIe or USB or both) in the rtw88\ndriver.\nWe previously had discussed patches for these locking issues while\nworking on SDIO support, but the problem never ocurred while testing\nUSB cards. It turns out that these are still needed and I think that\nthey also fix the same problems for USB users (it's not clear how often\nit happens there though) - and possibly even PCIe card users.\n\nThe issue fixed by the second and third patches have been spotted by a\nuser who tested rtw88 SDIO support. Everything is working fine for him\nbut there are warnings [1] and [2] in the kernel log stating \"Voluntary\ncontext switch within RCU read-side critical section!\".\n\nThe solution in the third and fourth patch was actually suggested by\nPing-Ke in [3]. Thanks again!\n\nThese fixes are indepdent of my other series adding SDIO support to the\nrtw88 driver, meaning they can be added to the wireless driver tree on\ntop of Linux 6.2-rc1 or linux-next.\n\n\nChanges since v1 at [4]:\n- Keep the u8 bitfields in patch 1 but split the res2 field into res2_1\n  and res2_2 as suggested by Ping-Ke\n- Added Ping-Ke's reviewed-by to patches 2-4 - thank you!\n- Added a paragraph in the cover-letter to avoid confusion whether\n  these patches depend on the rtw88 SDIO support series\n\nChanges since v2 at [5]:\n- Added Ping-Ke's Reviewed-by and Sascha's Tested-by (thanks to both of\n  you!)\n- Dropped patch 1/4 \"rtw88: Add packed attribute to the eFuse structs\"\n  This requires more discussion. I'll send a separate patch for this.\n- Updated cover letter title so it's clear that this is independent of\n  SDIO support code\n\n\n[0] https://lore.kernel.org/linux-wireless/695c976e02ed44a2b2345a3ceb226fc4@realtek.com/\n[1] https://github.com/LibreELEC/LibreELEC.tv/pull/7301#issuecomment-1366421445\n[2] https://github.com/LibreELEC/LibreELEC.tv/pull/7301#issuecomment-1366610249\n[3] https://lore.kernel.org/lkml/e0aa1ba4336ab130712e1fcb425e6fd0adca4145.camel@realtek.com/\n[4] https://lore.kernel.org/linux-wireless/20221228133547.633797-1-martin.blumenstingl@googlemail.com/\n[5] https://lore.kernel.org/linux-wireless/20221229124845.1155429-1-martin.blumenstingl@googlemail.com/\n\n\nMartin Blumenstingl (3):\n  wifi: rtw88: Move register access from rtw_bf_assoc() outside the RCU\n  wifi: rtw88: Use rtw_iterate_vifs() for rtw_vif_watch_dog_iter()\n  wifi: rtw88: Use non-atomic sta iterator in rtw_ra_mask_info_update()\n\n drivers/net/wireless/realtek/rtw88/bf.c       | 13 +++++++------\n drivers/net/wireless/realtek/rtw88/mac80211.c |  4 +++-\n drivers/net/wireless/realtek/rtw88/main.c     |  6 ++++--\n 3 files changed, 14 insertions(+), 9 deletions(-)\n\n-- \n2.39.0\n\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     tony0620emma@gmail.com, kvalo@kernel.org, pkshih@realtek.com,\n        s.hauer@pengutronix.de, netdev@vger.kernel.org,\n        linux-kernel@vger.kernel.org,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [PATCH v3 1/3] wifi: rtw88: Move register access from rtw_bf_assoc() outside the RCU\nDate:   Sun,  8 Jan 2023 22:13:22 +0100\nMessage-Id: <20230108211324.442823-2-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20230108211324.442823-1-martin.blumenstingl@googlemail.com>\nReferences: <20230108211324.442823-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nUSB and (upcoming) SDIO support may sleep in the read/write handlers.\nShrink the RCU critical section so it only cover the call to\nieee80211_find_sta() and finding the ic_vht_cap/vht_cap based on the\nfound station. This moves the chip's BFEE configuration outside the\nrcu_read_lock section and thus prevent \"scheduling while atomic\" or\n\"Voluntary context switch within RCU read-side critical section!\"\nwarnings when accessing the registers using an SDIO card (which is\nwhere this issue has been spotted in the real world - but it also\naffects USB cards).\n\nReviewed-by: Ping-Ke Shih <pkshih@realtek.com>\nTested-by: Sascha Hauer <s.hauer@pengutronix.de>\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\nv1 -> v2:\n- Added Ping-Ke's Reviewed-by (thank you!)\n\nv2 -> v3:\n- Added Sascha's Tested-by (thank you!)\n- added \"wifi\" prefix to the subject and reworded the title accordingly\n\n\n drivers/net/wireless/realtek/rtw88/bf.c | 13 +++++++------\n 1 file changed, 7 insertions(+), 6 deletions(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/bf.c b/drivers/net/wireless/realtek/rtw88/bf.c\nindex 038a30b170ef..c827c4a2814b 100644\n--- a/drivers/net/wireless/realtek/rtw88/bf.c\n+++ b/drivers/net/wireless/realtek/rtw88/bf.c\n@@ -49,19 +49,23 @@ void rtw_bf_assoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,\n \n \tsta = ieee80211_find_sta(vif, bssid);\n \tif (!sta) {\n+\t\trcu_read_unlock();\n+\n \t\trtw_warn(rtwdev, \"failed to find station entry for bss %pM\\n\",\n \t\t\t bssid);\n-\t\tgoto out_unlock;\n+\t\treturn;\n \t}\n \n \tic_vht_cap = &hw->wiphy->bands[NL80211_BAND_5GHZ]->vht_cap;\n \tvht_cap = &sta->deflink.vht_cap;\n \n+\trcu_read_unlock();\n+\n \tif ((ic_vht_cap->cap & IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE) &&\n \t    (vht_cap->cap & IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE)) {\n \t\tif (bfinfo->bfer_mu_cnt >= chip->bfer_mu_max_num) {\n \t\t\trtw_dbg(rtwdev, RTW_DBG_BF, \"mu bfer number over limit\\n\");\n-\t\t\tgoto out_unlock;\n+\t\t\treturn;\n \t\t}\n \n \t\tether_addr_copy(bfee->mac_addr, bssid);\n@@ -75,7 +79,7 @@ void rtw_bf_assoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,\n \t\t   (vht_cap->cap & IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE)) {\n \t\tif (bfinfo->bfer_su_cnt >= chip->bfer_su_max_num) {\n \t\t\trtw_dbg(rtwdev, RTW_DBG_BF, \"su bfer number over limit\\n\");\n-\t\t\tgoto out_unlock;\n+\t\t\treturn;\n \t\t}\n \n \t\tsound_dim = vht_cap->cap &\n@@ -98,9 +102,6 @@ void rtw_bf_assoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,\n \n \t\trtw_chip_config_bfee(rtwdev, rtwvif, bfee, true);\n \t}\n-\n-out_unlock:\n-\trcu_read_unlock();\n }\n \n void rtw_bf_init_bfer_entry_mu(struct rtw_dev *rtwdev,\n-- \n2.39.0\n\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     tony0620emma@gmail.com, kvalo@kernel.org, pkshih@realtek.com,\n        s.hauer@pengutronix.de, netdev@vger.kernel.org,\n        linux-kernel@vger.kernel.org,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [PATCH v3 2/3] wifi: rtw88: Use rtw_iterate_vifs() for rtw_vif_watch_dog_iter()\nDate:   Sun,  8 Jan 2023 22:13:23 +0100\nMessage-Id: <20230108211324.442823-3-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20230108211324.442823-1-martin.blumenstingl@googlemail.com>\nReferences: <20230108211324.442823-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nUSB and (upcoming) SDIO support may sleep in the read/write handlers.\nMake rtw_watch_dog_work() use rtw_iterate_vifs() to prevent \"scheduling\nwhile atomic\" or \"Voluntary context switch within RCU read-side\ncritical section!\" warnings when accessing the registers using an SDIO\ncard (which is where this issue has been spotted in the real world but\nit also affects USB cards).\n\nFixes: 78d5bf925f30 (\"wifi: rtw88: iterate over vif/sta list non-atomically\")\nSuggested-by: Ping-Ke Shih <pkshih@realtek.com>\nReviewed-by: Ping-Ke Shih <pkshih@realtek.com>\nTested-by: Sascha Hauer <s.hauer@pengutronix.de>\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\nv1 -> v2:\n- no change\n\nv2 -> v3:\n- Added Ping-Ke's Reviewed-by (thank you!)\n- Added Sascha's Tested-by (thank you!)\n- added \"wifi\" prefix to the subject and reworded the title accordingly\n\n\n drivers/net/wireless/realtek/rtw88/main.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c\nindex 888427cf3bdf..b2e78737bd5d 100644\n--- a/drivers/net/wireless/realtek/rtw88/main.c\n+++ b/drivers/net/wireless/realtek/rtw88/main.c\n@@ -241,8 +241,10 @@ static void rtw_watch_dog_work(struct work_struct *work)\n \trtw_phy_dynamic_mechanism(rtwdev);\n \n \tdata.rtwdev = rtwdev;\n-\t/* use atomic version to avoid taking local->iflist_mtx mutex */\n-\trtw_iterate_vifs_atomic(rtwdev, rtw_vif_watch_dog_iter, &data);\n+\t/* rtw_iterate_vifs internally uses an atomic iterator which is needed\n+\t * to avoid taking local->iflist_mtx mutex\n+\t */\n+\trtw_iterate_vifs(rtwdev, rtw_vif_watch_dog_iter, &data);\n \n \t/* fw supports only one station associated to enter lps, if there are\n \t * more than two stations associated to the AP, then we can not enter\n-- \n2.39.0\n\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     tony0620emma@gmail.com, kvalo@kernel.org, pkshih@realtek.com,\n        s.hauer@pengutronix.de, netdev@vger.kernel.org,\n        linux-kernel@vger.kernel.org,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [PATCH v3 3/3] wifi: rtw88: Use non-atomic sta iterator in rtw_ra_mask_info_update()\nDate:   Sun,  8 Jan 2023 22:13:24 +0100\nMessage-Id: <20230108211324.442823-4-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20230108211324.442823-1-martin.blumenstingl@googlemail.com>\nReferences: <20230108211324.442823-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nUSB and (upcoming) SDIO support may sleep in the read/write handlers.\nUse non-atomic rtw_iterate_stas() in rtw_ra_mask_info_update() because\nthe iterator function rtw_ra_mask_info_update_iter() needs to read and\nwrite registers from within rtw_update_sta_info(). Using the non-atomic\niterator ensures that we can sleep during USB and SDIO register reads\nand writes. This fixes \"scheduling while atomic\" or \"Voluntary context\nswitch within RCU read-side critical section!\" warnings as seen by SDIO\ncard users (but it also affects USB cards).\n\nFixes: 78d5bf925f30 (\"wifi: rtw88: iterate over vif/sta list non-atomically\")\nSuggested-by: Ping-Ke Shih <pkshih@realtek.com>\nReviewed-by: Ping-Ke Shih <pkshih@realtek.com>\nTested-by: Sascha Hauer <s.hauer@pengutronix.de>\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\nv1 -> v2:\n- Added Ping-Ke's Reviewed-by (thank you!)\n\nv2 -> v3:\n- Added Sascha's Tested-by (thank you!)\n- added \"wifi\" prefix to the subject and reworded the title accordingly\n\n\n drivers/net/wireless/realtek/rtw88/mac80211.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c\nindex 776a9a9884b5..3b92ac611d3f 100644\n--- a/drivers/net/wireless/realtek/rtw88/mac80211.c\n+++ b/drivers/net/wireless/realtek/rtw88/mac80211.c\n@@ -737,7 +737,7 @@ static void rtw_ra_mask_info_update(struct rtw_dev *rtwdev,\n \tbr_data.rtwdev = rtwdev;\n \tbr_data.vif = vif;\n \tbr_data.mask = mask;\n-\trtw_iterate_stas_atomic(rtwdev, rtw_ra_mask_info_update_iter, &br_data);\n+\trtw_iterate_stas(rtwdev, rtw_ra_mask_info_update_iter, &br_data);\n }\n \n static int rtw_ops_set_bitrate_mask(struct ieee80211_hw *hw,\n@@ -746,7 +746,9 @@ static int rtw_ops_set_bitrate_mask(struct ieee80211_hw *hw,\n {\n \tstruct rtw_dev *rtwdev = hw->priv;\n \n+\tmutex_lock(&rtwdev->mutex);\n \trtw_ra_mask_info_update(rtwdev, vif, mask);\n+\tmutex_unlock(&rtwdev->mutex);\n \n \treturn 0;\n }\n-- \n2.39.0\n\n"
  },
  {
    "path": "packages/linux/patches/default/linux-122-rtw88-rfc-v1.patch",
    "content": "From mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 00655C4708D\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:30:41 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S231630AbiL0Xaj (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:30:39 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:56954 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S229583AbiL0Xai (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:30:38 -0500\nReceived: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5A52B1D;\n        Tue, 27 Dec 2022 15:30:36 -0800 (PST)\nReceived: by mail-ed1-x533.google.com with SMTP id m21so20870944edc.3;\n        Tue, 27 Dec 2022 15:30:36 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:from:to:cc:subject:date:message-id:reply-to;\n        bh=gNI4glAP8RCHIX0Vc1rrjcz+Kvrw2hTC3GBQO91dTzE=;\n        b=PgAZ5aZt60CG6sLLPDEVEddXtgBvZGHfbo1q7Kaoz+jVwewez6JV0OjWtiLxgYp3go\n         ZB/sbiE+D/1GRwsm29iOS73d+TJblGHu+/6dMjl7e/jSdgsbZ/tGayRqj4SlrwUkN/FZ\n         20AzPMvBQCXMRBBOu0pmzBPTV+LKLIwmHCYIzCZ9Byq6xzVZc808I0LoDRtTCmanS219\n         exX6w96YxESVe38a7SieSwm7goZ0V3nfc3KZvT99EgrQY61Oj4Pn8V5Xk4wj0DchHoqf\n         QTAZxF1fH6HQJ3toICNcXwmpSgvjPw8fM9I8ujGwxoGCvJsV8013XlMduN9sXK9gJDN9\n         Z4tA==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n         :reply-to;\n        bh=gNI4glAP8RCHIX0Vc1rrjcz+Kvrw2hTC3GBQO91dTzE=;\n        b=VOrEV6O+1RjGwO4f3/HGUDBv0qC4KE3TjMviH2gG1xZGiEZCmSnchLvIhWt5ZwTfND\n         IHdpgpN26/moSnH+rCHmt4agaoJGwgToAtyT2oUPypkDvq4olhr+47B0+jGEVAY3Dbz6\n         8H4bsFwv2VZdHwHANy9JYD2AzD7DKdGN9w/oFPIl42yJr7Usy//7ODNmTyHh2ZMKfm74\n         529x9FoIdFhSwwd/ltQvbT+EvcNxg6UPFyDKUMkUtKCcjdpI0rMjxuj1+NSmzuD8BO9y\n         ERvux4ECYoFKuc3wE62owLURxv0CaE5yliHrDIH/k/LjIcNNvvKtJtGofXZ0LDfkyKE7\n         KnXA==\nX-Gm-Message-State: AFqh2kpjcIzhUbpNiXXevs7B73TYFp9mtSj6UueOZdTehN46SwzQ9EqQ\n        wtIoxxp6N3frBG/ufdcyxHAng6jnWVA=\nX-Google-Smtp-Source: AMrXdXtHXTSThumsWgqSjQD28Ytz9upkuh0X8wck3S2bYI+sMZUeOkNp1Rj+Gpe9CHiPCzeYET7Dhg==\nX-Received: by 2002:a50:ec19:0:b0:46c:fabe:837b with SMTP id g25-20020a50ec19000000b0046cfabe837bmr19326490edr.41.1672183834861;\n        Tue, 27 Dec 2022 15:30:34 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.33\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:34 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 00/19] rtw88: Add SDIO support\nDate:   Wed, 28 Dec 2022 00:30:01 +0100\nMessage-Id: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nRecently the rtw88 driver has gained locking support for the \"slow\" bus\ntypes (USB, SDIO) as part of USB support. Thanks to everyone who helped\nmake this happen!\n\nBased on the USB work (especially the locking part and various\nbugfixes) this series adds support for SDIO based cards. It's the\nresult of a collaboration between Jernej and myself. Neither of us has\naccess to the rtw88 datasheets. All of our work is based on studying\nthe RTL8822BS and RTL8822CS vendor drivers and trial and error.\n\nJernej and myself have tested this with RTL8822BS and RTL8822CS cards.\nOther users have confirmed that RTL8821CS support is working as well.\nRTL8723DS may also work (we tried our best to handle rtw_chip_wcpu_11n\nwhere needed) but has not been tested at this point.\n\nJernej's results with a RTL8822BS:\n- Main functionality works\n- Had a case where no traffic got across the link until he issued a\n  scan\n\nMy results with a RTL8822CS:\n- 2.4GHz and 5GHz bands are both working\n- TX throughput on a 5GHz network is between 50 Mbit/s and 90 Mbit/s\n- RX throughput on a 5GHz network is at 19 Mbit/s\n- Sometimes there are frequent reconnects (once every 1-5 minutes)\n  after the link has been up for a long time (multiple hours). Today\n  I was unable to reproduce this though (I only had reconnect in 8\n  hours).\n\nWhy is this an RFC?\n- It needs a through review especially by the rtw88 maintainers\n- It's not clear to me how the \"mmc: sdio\" patch will be merged (will\n  Ulf take this or can we merge it thorugh the rtw88/linux wireless\n  driver tree?)\n- Any comments / debugging hints on the reconnect / no traffic issues\n  (see above) are welcome\n- My understanding is that there's a discussion about the rtw88 Kconfig\n  symbols. We're adding four new ones within this series. It's not\n  clear to me what the conclusion is on this topic though.\n- As with most patches: testing is very welcome. If things are working\n  fine then a Tested-by is appreciated (with some details about the\n  card, throughput, ...). If something doesn't work for you: please\n  still report back so we can investigate that problem!\n\n\n\nJernej Skrabec (2):\n  rtw88: ps: Increase LEAVE_LPS_TRY_CNT for SDIO based chipsets\n  rtw88: Add support for the SDIO based RTL8822BS chipset\n\nMartin Blumenstingl (17):\n  rtw88: mac: Use existing interface mask macros in rtw_pwr_seq_parser()\n  rtw88: pci: Change type of rtw_hw_queue_mapping() and ac_to_hwq to\n    enum\n  rtw88: pci: Change queue datatype from u8 to enum rtw_tx_queue_type\n  rtw88: Move enum rtw_tx_queue_type mapping code to tx.{c,h}\n  mmc: sdio: add Realtek SDIO vendor ID and various wifi device IDs\n  rtw88: rtw8821c: Add support for parsing the RTL8821CS (SDIO) efuse\n  rtw88: rtw8822b: Add support for parsing the RTL8822BS (SDIO) efuse\n  rtw88: rtw8822c: Add support for parsing the RTL8822CS (SDIO) efuse\n  rtw88: hci: Add an optional power_switch() callback to rtw_hci_ops\n  rtw88: mac: Add support for the SDIO HCI in rtw_pwr_seq_parser()\n  rtw88: mac: Add support for the SDIO HCI in the TX/page table setup\n  rtw88: sdio: Add HCI implementation for SDIO based chipsets\n  rtw88: mac: Add support for SDIO specifics in the power on sequence\n  rtw88: main: Add the rpwm_addr and cpwm_addr for SDIO based chipsets\n  rtw88: main: Reserve 8 bytes of extra TX headroom for SDIO based cards\n  rtw88: Add support for the SDIO based RTL8822CS chipset\n  rtw88: Add support for the SDIO based RTL8821CS chipset\n\n drivers/net/wireless/realtek/rtw88/Kconfig    |   36 +\n drivers/net/wireless/realtek/rtw88/Makefile   |   12 +\n drivers/net/wireless/realtek/rtw88/debug.h    |    1 +\n drivers/net/wireless/realtek/rtw88/hci.h      |    8 +\n drivers/net/wireless/realtek/rtw88/mac.c      |   62 +-\n drivers/net/wireless/realtek/rtw88/mac.h      |    1 -\n drivers/net/wireless/realtek/rtw88/main.c     |    9 +-\n drivers/net/wireless/realtek/rtw88/pci.c      |   50 +-\n drivers/net/wireless/realtek/rtw88/ps.h       |    2 +-\n drivers/net/wireless/realtek/rtw88/reg.h      |   10 +\n drivers/net/wireless/realtek/rtw88/rtw8821c.c |    9 +\n drivers/net/wireless/realtek/rtw88/rtw8821c.h |    6 +\n .../net/wireless/realtek/rtw88/rtw8821cs.c    |   34 +\n drivers/net/wireless/realtek/rtw88/rtw8822b.c |   10 +\n drivers/net/wireless/realtek/rtw88/rtw8822b.h |    6 +\n .../net/wireless/realtek/rtw88/rtw8822bs.c    |   34 +\n drivers/net/wireless/realtek/rtw88/rtw8822c.c |    9 +\n drivers/net/wireless/realtek/rtw88/rtw8822c.h |    6 +\n .../net/wireless/realtek/rtw88/rtw8822cs.c    |   34 +\n drivers/net/wireless/realtek/rtw88/sdio.c     | 1242 +++++++++++++++++\n drivers/net/wireless/realtek/rtw88/sdio.h     |  175 +++\n drivers/net/wireless/realtek/rtw88/tx.c       |   41 +\n drivers/net/wireless/realtek/rtw88/tx.h       |    3 +\n include/linux/mmc/sdio_ids.h                  |    9 +\n 24 files changed, 1763 insertions(+), 46 deletions(-)\n create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8821cs.c\n create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822bs.c\n create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822cs.c\n create mode 100644 drivers/net/wireless/realtek/rtw88/sdio.c\n create mode 100644 drivers/net/wireless/realtek/rtw88/sdio.h\n\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 558E6C4708D\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:30:45 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S229583AbiL0Xam (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:30:42 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:56968 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S231736AbiL0Xaj (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:30:39 -0500\nReceived: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF060B1D;\n        Tue, 27 Dec 2022 15:30:38 -0800 (PST)\nReceived: by mail-ed1-x533.google.com with SMTP id m21so20871091edc.3;\n        Tue, 27 Dec 2022 15:30:38 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=QgYIIlUvjlkzoxTeBuZUOBlSUY/sYjLMbmvA+ggqjk4=;\n        b=f8Q1fmpjOhzEzXHLPY1LdK57FaUha8exOzkLcZooLGGFKyh2mqirDEHC+lPYFj8jyo\n         SKnx/gUtLtgjouRtJ+hoK5JiIrDhns3umKoqi9vMl46y9NHIPWMWTcxTmC0IAq6Xxe9+\n         AEZOtIsYqUPhA4+t1KuArfIY5wpJyjAqzd90dXmJAzmSfsbwYhcOGtMBs9ro+hgxYT8n\n         QTkSawKFC8jApbFf50mY5WTKBGwhnmk5wweKAEJhL67FxeS/igD3pz0SQnxpR7BW2Xql\n         EWVXA6jCutyT2rRrXCnw/foPbG5r2Y4gGw4eEGpkcPLBumD5JU+M+lpzuRQTDqpXIRR9\n         ngIg==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=QgYIIlUvjlkzoxTeBuZUOBlSUY/sYjLMbmvA+ggqjk4=;\n        b=z+81AYuSuJ7vmZn71AEZ0wD03rwVlSmGI/Ip+1g+QjtrWxmC5Wm6ARONowlxgttll3\n         vT/Msad7/FO6QChqRrT+ys8Ut4EObVjGmt7qc9pXZrvqbD6LREhGZDxcHiR1KDC3jv26\n         ZcPd5J3htqLqGHsAVpf9A58KSeei+4nhw8glWNxnRcU0e/Br8Xx2pti1malSVqDbHbXm\n         OD+YUwoVLFxLraedRepp9o/GHL/Ik1od6cs2c+wlloetGC6ywXIH9PuncOUk+l147aVO\n         wk4s356CVEQX3c3Qizp6aIc3XEi2vSNYFeYIlQ7IsEvoGJMHJUd5Yo5gKQWftlOjRN9h\n         u3KA==\nX-Gm-Message-State: AFqh2krWqyUE1w/J7eUaY4dFUBAHCdD35rY/dm3eJ/23SGdhUpFDKGnP\n        xIO3r5XcIav26avEuk43FdE1TN4Ed7k=\nX-Google-Smtp-Source: AMrXdXtYznvIwhA5xcrLA4jT1xTMSU2g3QGo4kymjSxBSJ4mdDphNO4Ov1B2Tad9ek0tC3WBKJRpCA==\nX-Received: by 2002:a05:6402:550e:b0:45c:835b:ac64 with SMTP id fi14-20020a056402550e00b0045c835bac64mr19668822edb.31.1672183838243;\n        Tue, 27 Dec 2022 15:30:38 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.37\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:37 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 03/19] rtw88: pci: Change queue datatype from u8 to enum rtw_tx_queue_type\nDate:   Wed, 28 Dec 2022 00:30:04 +0100\nMessage-Id: <20221227233020.284266-4-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nThis makes it easier to understand which values are allowed for the\n\"queue\" variable.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/pci.c | 17 ++++++++++-------\n 1 file changed, 10 insertions(+), 7 deletions(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c\nindex 45ce7e624c03..5492107fc85b 100644\n--- a/drivers/net/wireless/realtek/rtw88/pci.c\n+++ b/drivers/net/wireless/realtek/rtw88/pci.c\n@@ -30,7 +30,8 @@ static u32 rtw_pci_tx_queue_idx_addr[] = {\n \t[RTW_TX_QUEUE_H2C]\t= RTK_PCI_TXBD_IDX_H2CQ,\n };\n \n-static u8 rtw_pci_get_tx_qsel(struct sk_buff *skb, u8 queue)\n+static u8 rtw_pci_get_tx_qsel(struct sk_buff *skb,\n+\t\t\t      enum rtw_tx_queue_type queue)\n {\n \tswitch (queue) {\n \tcase RTW_TX_QUEUE_BCN:\n@@ -542,7 +543,7 @@ static int rtw_pci_setup(struct rtw_dev *rtwdev)\n static void rtw_pci_dma_release(struct rtw_dev *rtwdev, struct rtw_pci *rtwpci)\n {\n \tstruct rtw_pci_tx_ring *tx_ring;\n-\tu8 queue;\n+\tenum rtw_tx_queue_type queue;\n \n \trtw_pci_reset_trx_ring(rtwdev);\n \tfor (queue = 0; queue < RTK_MAX_TX_QUEUE_NUM; queue++) {\n@@ -608,8 +609,8 @@ static void rtw_pci_deep_ps_enter(struct rtw_dev *rtwdev)\n {\n \tstruct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv;\n \tstruct rtw_pci_tx_ring *tx_ring;\n+\tenum rtw_tx_queue_type queue;\n \tbool tx_empty = true;\n-\tu8 queue;\n \n \tif (rtw_fw_feature_check(&rtwdev->fw, FW_FEATURE_TX_WAKE))\n \t\tgoto enter_deep_ps;\n@@ -803,7 +804,8 @@ static void rtw_pci_flush_queues(struct rtw_dev *rtwdev, u32 queues, bool drop)\n \t__rtw_pci_flush_queues(rtwdev, pci_queues, drop);\n }\n \n-static void rtw_pci_tx_kick_off_queue(struct rtw_dev *rtwdev, u8 queue)\n+static void rtw_pci_tx_kick_off_queue(struct rtw_dev *rtwdev,\n+\t\t\t\t      enum rtw_tx_queue_type queue)\n {\n \tstruct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv;\n \tstruct rtw_pci_tx_ring *ring;\n@@ -822,7 +824,7 @@ static void rtw_pci_tx_kick_off_queue(struct rtw_dev *rtwdev, u8 queue)\n static void rtw_pci_tx_kick_off(struct rtw_dev *rtwdev)\n {\n \tstruct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv;\n-\tu8 queue;\n+\tenum rtw_tx_queue_type queue;\n \n \tfor (queue = 0; queue < RTK_MAX_TX_QUEUE_NUM; queue++)\n \t\tif (test_and_clear_bit(queue, rtwpci->tx_queued))\n@@ -831,7 +833,8 @@ static void rtw_pci_tx_kick_off(struct rtw_dev *rtwdev)\n \n static int rtw_pci_tx_write_data(struct rtw_dev *rtwdev,\n \t\t\t\t struct rtw_tx_pkt_info *pkt_info,\n-\t\t\t\t struct sk_buff *skb, u8 queue)\n+\t\t\t\t struct sk_buff *skb,\n+\t\t\t\t enum rtw_tx_queue_type queue)\n {\n \tstruct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv;\n \tconst struct rtw_chip_info *chip = rtwdev->chip;\n@@ -949,9 +952,9 @@ static int rtw_pci_tx_write(struct rtw_dev *rtwdev,\n \t\t\t    struct rtw_tx_pkt_info *pkt_info,\n \t\t\t    struct sk_buff *skb)\n {\n+\tenum rtw_tx_queue_type queue = rtw_hw_queue_mapping(skb);\n \tstruct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv;\n \tstruct rtw_pci_tx_ring *ring;\n-\tu8 queue = rtw_hw_queue_mapping(skb);\n \tint ret;\n \n \tret = rtw_pci_tx_write_data(rtwdev, pkt_info, skb, queue);\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id E9CD6C4332F\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:30:47 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S232147AbiL0Xao (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:30:44 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:56970 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S231771AbiL0Xal (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:30:41 -0500\nReceived: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D661FB30;\n        Tue, 27 Dec 2022 15:30:37 -0800 (PST)\nReceived: by mail-ed1-x529.google.com with SMTP id i9so20869954edj.4;\n        Tue, 27 Dec 2022 15:30:37 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=h1onIReQ5ODXVSyv0b1/9HLSWm0hUVA7Xk38y7M8c2U=;\n        b=Df8qMwCuW8cm4WyFWmo2vn9IeBhUpQbbxzTpBts52ctPvyR66nbu95qWp0nuVkXbWT\n         8DyaeshDFmzvg48x2tAxGuhtJVxRNkOUGXewKplLtkyIqlTYqhF5uGRCHpSIrhBvAQYc\n         RRpwYhZWwGMfUK1yiyUq3/x6iPJaIk/OX3e9hdbsdhgTGwOTgoCBJPvEzJvg8VPhVcPt\n         5AV6gzEeN4izFixPg2s6xkJFAkFrW0iEhFF6A9wHuADDb66qsSHKrCPuf38UX+u5ukH0\n         7LA7Vp7KcN/07WaXqq9rJnVs9jcJ2nkq8i7OOSgREVy3JxxCP/I1QNbiI7Y8/0dHsUo8\n         v+vw==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=h1onIReQ5ODXVSyv0b1/9HLSWm0hUVA7Xk38y7M8c2U=;\n        b=kSHgaspvNBV12/4toCVG0DQ3mgBqfhlGQAEXuyTD5OlgCf+evf7MiIer7SBNJE7ijJ\n         4fEp7Uvb6pbzCSCrT8dkROtykvYF49capmceMXWGNx8sYezu26fUrrAeGBGmGmT4V042\n         6rHnWlSE8MqjdT4C6OnBxW4PKk3AqzaIpKOY+qHUpgUnBRKF4LQKDctB7cle7IALqtiu\n         4+xWSG2kMSfTmx35pNIgcCqFihAwq+htzyDcPU+UdxsTBP4IW/YT4/aOeVCzqADnRtTA\n         tCb1u1V9eVNWw+9fSaDIudbt4vOkcvyIkZE79wd+Oam4KNiaNEue/eMzJ8NkKg3QwnHN\n         b0yg==\nX-Gm-Message-State: AFqh2kp2eoYCRpyfxL0Ip3d0y0PQ33ppwyAwgR3bTpN2MwkKDECNhRtz\n        ObHug8L2k6/Yvsg/cYn/vsClevkl+1U=\nX-Google-Smtp-Source: AMrXdXuC3Lrm0vqhcWSxgt9v2Dlw0EC+6jU6Yug/OR3FfYch83uV5zHH3+QRNBOfBNMFCGHdpUGU0g==\nX-Received: by 2002:a05:6402:5145:b0:462:7b85:33aa with SMTP id n5-20020a056402514500b004627b8533aamr19561385edd.2.1672183835963;\n        Tue, 27 Dec 2022 15:30:35 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.34\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:35 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 01/19] rtw88: mac: Use existing interface mask macros in rtw_pwr_seq_parser()\nDate:   Wed, 28 Dec 2022 00:30:02 +0100\nMessage-Id: <20221227233020.284266-2-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nReplace the magic numbers for the intf_mask with their existing\nRTW_PWR_INTF_PCI_MSK and RTW_PWR_INTF_USB_MSK macros to make the code\neasier to understand.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/mac.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wireless/realtek/rtw88/mac.c\nindex 98777f294945..4e5c194aac29 100644\n--- a/drivers/net/wireless/realtek/rtw88/mac.c\n+++ b/drivers/net/wireless/realtek/rtw88/mac.c\n@@ -217,10 +217,10 @@ static int rtw_pwr_seq_parser(struct rtw_dev *rtwdev,\n \tcut_mask = cut_version_to_mask(cut);\n \tswitch (rtw_hci_type(rtwdev)) {\n \tcase RTW_HCI_TYPE_PCIE:\n-\t\tintf_mask = BIT(2);\n+\t\tintf_mask = RTW_PWR_INTF_PCI_MSK;\n \t\tbreak;\n \tcase RTW_HCI_TYPE_USB:\n-\t\tintf_mask = BIT(1);\n+\t\tintf_mask = RTW_PWR_INTF_USB_MSK;\n \t\tbreak;\n \tdefault:\n \t\treturn -EINVAL;\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id DFE7FC4332F\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:30:50 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S232384AbiL0Xar (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:30:47 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:56974 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S231809AbiL0Xal (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:30:41 -0500\nReceived: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 174F4640A;\n        Tue, 27 Dec 2022 15:30:39 -0800 (PST)\nReceived: by mail-ed1-x529.google.com with SMTP id i15so20927597edf.2;\n        Tue, 27 Dec 2022 15:30:39 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=On9zqZfBSd6xwFAzv2KqvU5VwSXHqqET7/qhE6YwsIw=;\n        b=SNTmAxZHbI4rGrDL7WSqhXiMSYLuok7XiLn5jsUBjNZsBWfLGdEDvkwzYn9kEt+ExM\n         yM01zDvSzvFF7btI3VKgLCuKWyCjzSN+oxtbnnNtANe7++q877ohJS16q7qtb+peoLGT\n         379THwFkmXqEVK9LNWbZlaOwXWM9iWHwyXFNrN1L+LS62ez69W/wfVm9DP60TQxDcDMH\n         Q0KGjBV8EPo9dceholSgOX+RCkfC+K6D8rq7TOSrGFZrR73jNZaxK+dgq8e2H3dtwDCX\n         CRnRHBY8N6ymfOg0ZMvNjLoSF96sgPeplR8IkhyS5/ADf7al6pndKCfylPoELyjwhWSI\n         iE5A==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=On9zqZfBSd6xwFAzv2KqvU5VwSXHqqET7/qhE6YwsIw=;\n        b=K3W+chiaRArHiKSV1lOoCmnCOznquzW+yTX7DxyPfSIN97SIOQ1y2ON66NPUVvF6U+\n         +p+v1q9alH56ll9haMyhzLHslPLL0lQqfkAsBvXhXu4VPphbgPML8kRGF/Uf4/ESmlNo\n         UK9fIMdKWPNrOG/PXJbSVmdC1KlsF0rgYr8tsfwM8a3aFtlbk8l1qMRy76e6CY+QjhVR\n         xZvnFFYcIkSjC/q1Ie5tPQSSAF6KE484lmlxIAVJgiODnDbjWt5zMYQfynctbLZHrGpK\n         KW1NAuIYfYK1e5Z0N3m6QP31F/CG+Az5H7/fgGvrf1rtyyfvMzhpDpJb9TuapU7hAmcq\n         ojuw==\nX-Gm-Message-State: AFqh2kqpzSyCyb18SioF6HlD7/0GVialvYtc/ue5762f5olQy8mkLmab\n        3izNhsS8hHtpUW4UlzKqJyauiA8S13Y=\nX-Google-Smtp-Source: AMrXdXuwosdtKiTC3mmRWDVuPEeTdqyk/vj73kPIT20gET9jjxQKc5Hyp65eea/c0ByvQPRSemJWOA==\nX-Received: by 2002:a05:6402:754:b0:485:9d0f:6193 with SMTP id p20-20020a056402075400b004859d0f6193mr5697630edy.38.1672183837463;\n        Tue, 27 Dec 2022 15:30:37 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.36\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:36 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 02/19] rtw88: pci: Change type of rtw_hw_queue_mapping() and ac_to_hwq to enum\nDate:   Wed, 28 Dec 2022 00:30:03 +0100\nMessage-Id: <20221227233020.284266-3-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nrtw_hw_queue_mapping() and ac_to_hwq[] hold values of type enum\nrtw_tx_queue_type. Change their types to reflect this to make it easier\nto understand this part of the code.\n\nWhile here, also change the array to be static const as it is not\nsupposed to be modified at runtime.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/pci.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c\nindex 0975d27240e4..45ce7e624c03 100644\n--- a/drivers/net/wireless/realtek/rtw88/pci.c\n+++ b/drivers/net/wireless/realtek/rtw88/pci.c\n@@ -669,7 +669,7 @@ static void rtw_pci_deep_ps(struct rtw_dev *rtwdev, bool enter)\n \tspin_unlock_bh(&rtwpci->irq_lock);\n }\n \n-static u8 ac_to_hwq[] = {\n+static const enum rtw_tx_queue_type ac_to_hwq[] = {\n \t[IEEE80211_AC_VO] = RTW_TX_QUEUE_VO,\n \t[IEEE80211_AC_VI] = RTW_TX_QUEUE_VI,\n \t[IEEE80211_AC_BE] = RTW_TX_QUEUE_BE,\n@@ -678,12 +678,12 @@ static u8 ac_to_hwq[] = {\n \n static_assert(ARRAY_SIZE(ac_to_hwq) == IEEE80211_NUM_ACS);\n \n-static u8 rtw_hw_queue_mapping(struct sk_buff *skb)\n+static enum rtw_tx_queue_type rtw_hw_queue_mapping(struct sk_buff *skb)\n {\n \tstruct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;\n \t__le16 fc = hdr->frame_control;\n \tu8 q_mapping = skb_get_queue_mapping(skb);\n-\tu8 queue;\n+\tenum rtw_tx_queue_type queue;\n \n \tif (unlikely(ieee80211_is_beacon(fc)))\n \t\tqueue = RTW_TX_QUEUE_BCN;\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 87981C53210\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:30:52 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S232417AbiL0Xau (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:30:50 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:57100 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232048AbiL0Xan (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:30:43 -0500\nReceived: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A29AAB30;\n        Tue, 27 Dec 2022 15:30:41 -0800 (PST)\nReceived: by mail-ed1-x52d.google.com with SMTP id s5so20852904edc.12;\n        Tue, 27 Dec 2022 15:30:41 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=btb9JCFbAduIuQyMWX4fEkp8lECM3tHdIlZQhT1+ifQ=;\n        b=VR4staqyRagqWvg9HiMYvJRnLd/Z8E0ODa8AFk92I16qqZlovxWvgmxnSedR7gqRCr\n         UZBJf8fwSL+duyK9wHOttFt7I4UUSsNEzLUymFxIO6hB2xfqBCngHLOSbkgneOX+sxts\n         cvrNT/npALLXAQaqIuzzYWSEb50lVc3dUzOmdBrryFl7AGlFKiEynTGwi5NONJCLrjAr\n         ZvQ/L1k6S2kCRlbTiNc93nc9m1iL07gDKiOAiUqvBGscesyxetRdSb9Y6I/8DIGURmX9\n         sFK0NxrzbevRS0fB13HyfPiAZThRJARi6nKRRYh1dXw/SM9JCuXDwW+F0lKmUvofaPYK\n         0MTw==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=btb9JCFbAduIuQyMWX4fEkp8lECM3tHdIlZQhT1+ifQ=;\n        b=R5WqDZZFQilNwpS7iFCqzXfKNEZrhynA9y1A25rI/DB2P0S3nu7bp9MRU58VEQr6mw\n         V5vYjBfUbyDd3FqEkXsMmUjPV40pSjg+yavlFB50GJeywp/q9lWz7lvxyS/DlrnsZwoA\n         BW/JqBF/HKI4jVU075m8J/n4Kue2nhCfbwOjO9sTwm0/zB5EVMyQFJeiwZHnRf932etB\n         saPCzk0Crbmnn1mjSbyqOFGzpVT7QyWIO5yFdUNWuFZLeJtJfKc3NcottLMJyK5+MxNM\n         PhhkHh1OQmhyJaw8Y/xQhCNir0pUCtmPyZGBlRAlTcfASIUpv6tXg8giifZg9tfbISxp\n         fVdw==\nX-Gm-Message-State: AFqh2ko1p9o6Tp5JPhfFU3YH4sBORiQgWos7XOneOxkIfG2ZpDi8DgX/\n        VkrleIauF83hplmXb0uIHsoSYKbXmJU=\nX-Google-Smtp-Source: AMrXdXs2lyI3DW7x++xTstNUDhNGbja194swr2CllpVhgdnt/hjiY4o8QguagNs8T4n4kVsk0lOzFQ==\nX-Received: by 2002:aa7:da4c:0:b0:46f:9a53:fdce with SMTP id w12-20020aa7da4c000000b0046f9a53fdcemr19915029eds.41.1672183840006;\n        Tue, 27 Dec 2022 15:30:40 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.39\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:39 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 05/19] mmc: sdio: add Realtek SDIO vendor ID and various wifi device IDs\nDate:   Wed, 28 Dec 2022 00:30:06 +0100\nMessage-Id: <20221227233020.284266-6-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nAdd the SDIO vendor ID for Realtek and some device IDs extracted from\ntheir GPL vendor driver. This will be useful in the future when the\nrtw88 driver gains support for these chips.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n include/linux/mmc/sdio_ids.h | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\ndiff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h\nindex 74f9d9a6d330..bba39d4565da 100644\n--- a/include/linux/mmc/sdio_ids.h\n+++ b/include/linux/mmc/sdio_ids.h\n@@ -115,6 +115,15 @@\n #define SDIO_VENDOR_ID_MICROCHIP_WILC\t\t0x0296\n #define SDIO_DEVICE_ID_MICROCHIP_WILC1000\t0x5347\n \n+#define SDIO_VENDOR_ID_REALTEK\t\t\t0x024c\n+#define SDIO_DEVICE_ID_REALTEK_RTW8723BS\t0xb723\n+#define SDIO_DEVICE_ID_REALTEK_RTW8723DS\t0xd723\n+#define SDIO_DEVICE_ID_REALTEK_RTW8821BS\t0xb821\n+#define SDIO_DEVICE_ID_REALTEK_RTW8821CS\t0xc821\n+#define SDIO_DEVICE_ID_REALTEK_RTW8821DS\t0xd821\n+#define SDIO_DEVICE_ID_REALTEK_RTW8822BS\t0xb822\n+#define SDIO_DEVICE_ID_REALTEK_RTW8822CS\t0xc822\n+\n #define SDIO_VENDOR_ID_SIANO\t\t\t0x039a\n #define SDIO_DEVICE_ID_SIANO_NOVA_B0\t\t0x0201\n #define SDIO_DEVICE_ID_SIANO_NICE\t\t0x0202\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 2C430C4708D\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:31:01 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S231809AbiL0Xa5 (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:30:57 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:57126 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232081AbiL0Xan (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:30:43 -0500\nReceived: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6C4DDEBA;\n        Tue, 27 Dec 2022 15:30:40 -0800 (PST)\nReceived: by mail-ed1-x52a.google.com with SMTP id u18so19465924eda.9;\n        Tue, 27 Dec 2022 15:30:40 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=dm4pitK4ZNMJZL5DH9iTHJHi+FnWxGRFQtHIaCaoNGo=;\n        b=YWwi7CzLyKrwEdFyuUxmvizsWkIpPn2Rka2qKD03A3ewM59kw2KvC5v6EpON1xlSSq\n         UOaqKeBlhGa/2dVFREhtyFZmlTdOSWMO1pbXfH8y5NntpGghgcjPjDvN8RC0ny8CJtUE\n         oRcmdiMR1EXhw5f3m69RFo89af3ku7UJalnnCn2j9AaUyzDoDNRkmj7sz9Qm0sbaRxxa\n         9Q4FSp2zIY2u6nwYxeV8CJuLjEjRaExTmMOd4hhCcfo6iBgouRLa6Rk4o1zSjDh3VLkA\n         PvqMl7qUCM5cvszlAUsHnWBFyyvBjergKkMhdQ1kidb6MaVWZNdfjMw6lNcFGCDqjsVz\n         PLeQ==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=dm4pitK4ZNMJZL5DH9iTHJHi+FnWxGRFQtHIaCaoNGo=;\n        b=Sboh7uBIxISXXw6Qr5GGuWT/hc4Se5cb0ygTkz6fb0lRu22OLh+kwktWEv16Kap8cW\n         7SQrpuPEQozdieKBmNN5vAlwtRWdba0fN9mNf2zrdMncYgOywN+BJHuK/zeA3GB8QpwL\n         YUuvfY12buRTXWwa2Y+AXn6s4qglulcwSKsKi015xjsfgJvmP+Uh2NGr301HC/4iyke6\n         ge7BBUKsFQTiS+inqAeECr+hOQJKW2M2OxdZgWxq5jY18IPVZ7JM+n+pkADooXdqorPT\n         oDz4UIlAxvpQNsFtQ4VOMXLFgAgoV2z7YVDvpfusxDwSY+YkriJXjudSH2xjZc+Rk8ux\n         THQg==\nX-Gm-Message-State: AFqh2krTLZPec1BeaePGH+yIM/xE7h7osKZ03oi5Uiwu7MZpW7C0abFJ\n        +dQ5oQLo4ccuSrHwaLUavao8oJNV+4Y=\nX-Google-Smtp-Source: AMrXdXsS9hX335Fkht6+2053XGKLxjVMk10eknNraAxGKhiL8aCk1KR+3rgtmHKYD77nKNtWUI+8iA==\nX-Received: by 2002:a05:6402:501f:b0:46c:a763:5889 with SMTP id p31-20020a056402501f00b0046ca7635889mr29038360eda.25.1672183839073;\n        Tue, 27 Dec 2022 15:30:39 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.38\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:38 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 04/19] rtw88: Move enum rtw_tx_queue_type mapping code to tx.{c,h}\nDate:   Wed, 28 Dec 2022 00:30:05 +0100\nMessage-Id: <20221227233020.284266-5-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nThis code is not specific to the PCIe bus type but can be re-used by USB\nand SDIO bus types. Move it to tx.{c,h} to avoid code-duplication in the\nfuture. While here, add checking of the ac argument in\nrtw_tx_ac_to_hwq() so we're not accessing entries beyond the end of the\narray.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/pci.c | 35 ++------------------\n drivers/net/wireless/realtek/rtw88/tx.c  | 41 ++++++++++++++++++++++++\n drivers/net/wireless/realtek/rtw88/tx.h  |  3 ++\n 3 files changed, 46 insertions(+), 33 deletions(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c\nindex 5492107fc85b..b4bd831c9845 100644\n--- a/drivers/net/wireless/realtek/rtw88/pci.c\n+++ b/drivers/net/wireless/realtek/rtw88/pci.c\n@@ -670,37 +670,6 @@ static void rtw_pci_deep_ps(struct rtw_dev *rtwdev, bool enter)\n \tspin_unlock_bh(&rtwpci->irq_lock);\n }\n \n-static const enum rtw_tx_queue_type ac_to_hwq[] = {\n-\t[IEEE80211_AC_VO] = RTW_TX_QUEUE_VO,\n-\t[IEEE80211_AC_VI] = RTW_TX_QUEUE_VI,\n-\t[IEEE80211_AC_BE] = RTW_TX_QUEUE_BE,\n-\t[IEEE80211_AC_BK] = RTW_TX_QUEUE_BK,\n-};\n-\n-static_assert(ARRAY_SIZE(ac_to_hwq) == IEEE80211_NUM_ACS);\n-\n-static enum rtw_tx_queue_type rtw_hw_queue_mapping(struct sk_buff *skb)\n-{\n-\tstruct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;\n-\t__le16 fc = hdr->frame_control;\n-\tu8 q_mapping = skb_get_queue_mapping(skb);\n-\tenum rtw_tx_queue_type queue;\n-\n-\tif (unlikely(ieee80211_is_beacon(fc)))\n-\t\tqueue = RTW_TX_QUEUE_BCN;\n-\telse if (unlikely(ieee80211_is_mgmt(fc) || ieee80211_is_ctl(fc)))\n-\t\tqueue = RTW_TX_QUEUE_MGMT;\n-\telse if (is_broadcast_ether_addr(hdr->addr1) ||\n-\t\t is_multicast_ether_addr(hdr->addr1))\n-\t\tqueue = RTW_TX_QUEUE_HI0;\n-\telse if (WARN_ON_ONCE(q_mapping >= ARRAY_SIZE(ac_to_hwq)))\n-\t\tqueue = ac_to_hwq[IEEE80211_AC_BE];\n-\telse\n-\t\tqueue = ac_to_hwq[q_mapping];\n-\n-\treturn queue;\n-}\n-\n static void rtw_pci_release_rsvd_page(struct rtw_pci *rtwpci,\n \t\t\t\t      struct rtw_pci_tx_ring *ring)\n {\n@@ -798,7 +767,7 @@ static void rtw_pci_flush_queues(struct rtw_dev *rtwdev, u32 queues, bool drop)\n \t} else {\n \t\tfor (i = 0; i < rtwdev->hw->queues; i++)\n \t\t\tif (queues & BIT(i))\n-\t\t\t\tpci_queues |= BIT(ac_to_hwq[i]);\n+\t\t\t\tpci_queues |= BIT(rtw_tx_ac_to_hwq(i));\n \t}\n \n \t__rtw_pci_flush_queues(rtwdev, pci_queues, drop);\n@@ -952,7 +921,7 @@ static int rtw_pci_tx_write(struct rtw_dev *rtwdev,\n \t\t\t    struct rtw_tx_pkt_info *pkt_info,\n \t\t\t    struct sk_buff *skb)\n {\n-\tenum rtw_tx_queue_type queue = rtw_hw_queue_mapping(skb);\n+\tenum rtw_tx_queue_type queue = rtw_tx_queue_mapping(skb);\n \tstruct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv;\n \tstruct rtw_pci_tx_ring *ring;\n \tint ret;\ndiff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c\nindex ab39245e9c2f..bb5c7492c98b 100644\n--- a/drivers/net/wireless/realtek/rtw88/tx.c\n+++ b/drivers/net/wireless/realtek/rtw88/tx.c\n@@ -682,3 +682,44 @@ void rtw_txq_cleanup(struct rtw_dev *rtwdev, struct ieee80211_txq *txq)\n \t\tlist_del_init(&rtwtxq->list);\n \tspin_unlock_bh(&rtwdev->txq_lock);\n }\n+\n+static const enum rtw_tx_queue_type ac_to_hwq[] = {\n+\t[IEEE80211_AC_VO] = RTW_TX_QUEUE_VO,\n+\t[IEEE80211_AC_VI] = RTW_TX_QUEUE_VI,\n+\t[IEEE80211_AC_BE] = RTW_TX_QUEUE_BE,\n+\t[IEEE80211_AC_BK] = RTW_TX_QUEUE_BK,\n+};\n+\n+static_assert(ARRAY_SIZE(ac_to_hwq) == IEEE80211_NUM_ACS);\n+\n+enum rtw_tx_queue_type rtw_tx_ac_to_hwq(enum ieee80211_ac_numbers ac)\n+{\n+\tif (WARN_ON(unlikely(ac >= IEEE80211_NUM_ACS)))\n+\t\treturn RTW_TX_QUEUE_BE;\n+\n+\treturn ac_to_hwq[ac];\n+}\n+EXPORT_SYMBOL(rtw_tx_ac_to_hwq);\n+\n+enum rtw_tx_queue_type rtw_tx_queue_mapping(struct sk_buff *skb)\n+{\n+\tstruct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;\n+\t__le16 fc = hdr->frame_control;\n+\tu8 q_mapping = skb_get_queue_mapping(skb);\n+\tenum rtw_tx_queue_type queue;\n+\n+\tif (unlikely(ieee80211_is_beacon(fc)))\n+\t\tqueue = RTW_TX_QUEUE_BCN;\n+\telse if (unlikely(ieee80211_is_mgmt(fc) || ieee80211_is_ctl(fc)))\n+\t\tqueue = RTW_TX_QUEUE_MGMT;\n+\telse if (is_broadcast_ether_addr(hdr->addr1) ||\n+\t\t is_multicast_ether_addr(hdr->addr1))\n+\t\tqueue = RTW_TX_QUEUE_HI0;\n+\telse if (WARN_ON_ONCE(q_mapping >= ARRAY_SIZE(ac_to_hwq)))\n+\t\tqueue = ac_to_hwq[IEEE80211_AC_BE];\n+\telse\n+\t\tqueue = ac_to_hwq[q_mapping];\n+\n+\treturn queue;\n+}\n+EXPORT_SYMBOL(rtw_tx_queue_mapping);\ndiff --git a/drivers/net/wireless/realtek/rtw88/tx.h b/drivers/net/wireless/realtek/rtw88/tx.h\nindex a2f3ac326041..197d5868c8ad 100644\n--- a/drivers/net/wireless/realtek/rtw88/tx.h\n+++ b/drivers/net/wireless/realtek/rtw88/tx.h\n@@ -131,6 +131,9 @@ rtw_tx_write_data_h2c_get(struct rtw_dev *rtwdev,\n \t\t\t  struct rtw_tx_pkt_info *pkt_info,\n \t\t\t  u8 *buf, u32 size);\n \n+enum rtw_tx_queue_type rtw_tx_ac_to_hwq(enum ieee80211_ac_numbers ac);\n+enum rtw_tx_queue_type rtw_tx_queue_mapping(struct sk_buff *skb);\n+\n static inline\n void fill_txdesc_checksum_common(u8 *txdesc, size_t words)\n {\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 79991C46467\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:31:07 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S230141AbiL0XbB (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:31:01 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:57152 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232120AbiL0Xao (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:30:44 -0500\nReceived: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F6A6272;\n        Tue, 27 Dec 2022 15:30:42 -0800 (PST)\nReceived: by mail-ed1-x532.google.com with SMTP id b88so13594876edf.6;\n        Tue, 27 Dec 2022 15:30:42 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=sNWvI++owPQOhkWmIVtBzTJGEAJPDCSXNhp2rWrEL5E=;\n        b=nnK0OOhJzlEX0vbgyycR/6mSAdx38bY4ctjiPkAFM/et3F9o33fqvbfQknun6/zKL6\n         7wIzhdFmv9PkW14a/bmTB8upYCN3TOFiq9U8IBv9UT2Dkcu90IUNT1acTQSrvPjwz6/4\n         fu8Yelrnas5yHDWvzILmx7uBXlV6ZgCNCExNGCWpWohlgkkRZZhlvLAGde0O6m5/FHUo\n         TjRpVM7FS60jdQPyie5iMQSf3yWjlJER6icUBy4uXM1t2dRnKuSavtjcDNVh2wWcj69b\n         AxtPjJBQErC0gI1C+mB0C9OtMKjGFcfpydzMi+hlIvkH8WE8iqzk/kB75aM4stCnh9aa\n         YndA==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=sNWvI++owPQOhkWmIVtBzTJGEAJPDCSXNhp2rWrEL5E=;\n        b=F698HlMHi1vCF+ockccMqJgKoJuSWe1LXvbsNmJtxSI2p16Llm7nWAyvV3/37YC4jN\n         BZXieXg+vSBm3vE6aPm0OousIWPtIXomYoa4MHaynK0N/q5kvaAipfnmQh6KGDPwzely\n         i2W97Zy4wZqE5p/pcxZawK/4qawqdUhHZn40m+FwI2J/mtc8R/DrijbvmQ6p6dijURXE\n         u2PVgPacuI4I6Ql1H88qp1ZGH7367o0/x+xobATMv88egUWFXxoi8eu+mqWwhb73B2El\n         VZ+TlAmFxZkfSryMGABKHR5qIxJ/l8AqXvQg2KJzMyZP3pHdWb+Mmak7sOyE8Scgj+SQ\n         J1PQ==\nX-Gm-Message-State: AFqh2koCrM7MvTBP6zQmnXZtJLUsEb/oKhMqLfJfxX/rdx96EpXw/3Tr\n        srxGnaSH+DOZwcOTHxjzKCEjdT/Ka/8=\nX-Google-Smtp-Source: AMrXdXsBqs+Vq4I04+NA9mmrJqZnpfOmTy9EWmu/hHEHZqKU0cVeCXeXtTioSKGs0UEMCFEUUIQ7Jw==\nX-Received: by 2002:a05:6402:a55:b0:475:9918:37ce with SMTP id bt21-20020a0564020a5500b00475991837cemr19976275edb.13.1672183840839;\n        Tue, 27 Dec 2022 15:30:40 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.40\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:40 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 06/19] rtw88: rtw8821c: Add support for parsing the RTL8821CS (SDIO) efuse\nDate:   Wed, 28 Dec 2022 00:30:07 +0100\nMessage-Id: <20221227233020.284266-7-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nThe efuse of the SDIO RTL8821CS chip has only one known member: the mac\naddress is at offset 0x11a. Add a struct rtw8821cs_efuse describing this\nand use it for copying the mac address when the SDIO bus is used.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/rtw8821c.c | 9 +++++++++\n drivers/net/wireless/realtek/rtw88/rtw8821c.h | 6 ++++++\n 2 files changed, 15 insertions(+)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8821c.c b/drivers/net/wireless/realtek/rtw88/rtw8821c.c\nindex 17f800f6efbd..dd01b22f9770 100644\n--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c\n@@ -26,6 +26,12 @@ static void rtw8821ce_efuse_parsing(struct rtw_efuse *efuse,\n \tether_addr_copy(efuse->addr, map->e.mac_addr);\n }\n \n+static void rtw8821cs_efuse_parsing(struct rtw_efuse *efuse,\n+\t\t\t\t    struct rtw8821c_efuse *map)\n+{\n+\tether_addr_copy(efuse->addr, map->s.mac_addr);\n+}\n+\n static void rtw8821cu_efuse_parsing(struct rtw_efuse *efuse,\n \t\t\t\t    struct rtw8821c_efuse *map)\n {\n@@ -74,6 +80,9 @@ static int rtw8821c_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)\n \tcase RTW_HCI_TYPE_PCIE:\n \t\trtw8821ce_efuse_parsing(efuse, map);\n \t\tbreak;\n+\tcase RTW_HCI_TYPE_SDIO:\n+\t\trtw8821cs_efuse_parsing(efuse, map);\n+\t\tbreak;\n \tcase RTW_HCI_TYPE_USB:\n \t\trtw8821cu_efuse_parsing(efuse, map);\n \t\tbreak;\ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8821c.h b/drivers/net/wireless/realtek/rtw88/rtw8821c.h\nindex 1c81260f3a54..1deea54575b5 100644\n--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.h\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.h\n@@ -65,6 +65,11 @@ struct rtw8821ce_efuse {\n \tu8 res7;\n };\n \n+struct rtw8821cs_efuse {\n+\tu8 res4[0x4a];\t\t\t/* 0xd0 */\n+\tu8 mac_addr[ETH_ALEN];\t\t/* 0x11a */\n+};\n+\n struct rtw8821c_efuse {\n \t__le16 rtl_id;\n \tu8 res0[0x0e];\n@@ -93,6 +98,7 @@ struct rtw8821c_efuse {\n \tu8 res[3];\n \tunion {\n \t\tstruct rtw8821ce_efuse e;\n+\t\tstruct rtw8821cs_efuse s;\n \t\tstruct rtw8821cu_efuse u;\n \t};\n };\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 29474C4332F\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:31:10 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S232207AbiL0XbH (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:31:07 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:57236 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232272AbiL0Xar (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:30:47 -0500\nReceived: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85D5F3BB;\n        Tue, 27 Dec 2022 15:30:43 -0800 (PST)\nReceived: by mail-ed1-x52a.google.com with SMTP id r26so15660428edc.5;\n        Tue, 27 Dec 2022 15:30:43 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=A522Jt6HhfnBCacJa8yLyhSRn9fiN5RDQFLQBl+szdU=;\n        b=MJQ/XSgTkapv3EpIbAO8XLCrxJPt/iWc1zTsffUVfG6sA/ybEptpnXcuLak7XB3PIQ\n         Ihdw5tH4+sscSaNDvtOvKul2WNmJrPasn5e6wzXj5Zuu0dy0ygDshPp7s0ID0F0veT+Y\n         OiiKr1tzJB+kStlcwVFqJbgK1herJfnG0Q8d+wOBrPRXmYNzuSROK9gVhwdD32+2QFbj\n         TgTYPhjgnFih9U7IrxdQttkH4vEvGLtK6Qb4NhvqEKx8r4QI80Ds1yNXTzBFdAG0GBIK\n         7FaP28dkjw0mNSp/E00hk0fTjqtiZKPTPeJfHqMAXnOG7adcQIRwtAlQEEaGGGoxOAxW\n         vjCA==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=A522Jt6HhfnBCacJa8yLyhSRn9fiN5RDQFLQBl+szdU=;\n        b=AsukRgtTPdznlbyyBZfa5HNwQ2SeRsEv7T5Y++hYWHazuj6CIp6RZ03w4Nw+NxAF23\n         9knLQDK3bvCHNcHAyiXeZvGuRUf5gu0LVuXhxmu5Hqhw2lXTTNovh/Q955JAX/nQm+wl\n         9IZILAlXkn+JK3XHIHss1CoYdbKr1XJZAuD81mqjom00qqiZtami9oAFyNdJnL3UA+lt\n         aQNF0LfIH241/5crnLyvTmzQn6opVcCL6JgzGSKVbcCHtSaHBbb6AJ2L5/yiaiLs/7yN\n         JNdqQH7iVWHRCqMpDHzRyniUn7i+mvPqrbT/elCwMpCCsFoA7SrLgR3B5uulruIOX8g6\n         ZGng==\nX-Gm-Message-State: AFqh2kouJA03nhjVEHVPi9iZEzgq+/Be1BG7i2EzgWyUKzEAGLIHIBGy\n        i+TDvNOjjmkvFdC0TmBW2jsIXxJwbv0=\nX-Google-Smtp-Source: AMrXdXvaPCVvWtHhAnIq7AgnnY4Rij/5C/GKq7b6fzjPX++szIm4uKWvqh3zdPh1eXYWl1fb8NEN7A==\nX-Received: by 2002:a05:6402:48c:b0:483:d49f:e26c with SMTP id k12-20020a056402048c00b00483d49fe26cmr9760873edv.15.1672183841899;\n        Tue, 27 Dec 2022 15:30:41 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.40\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:41 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 07/19] rtw88: rtw8822b: Add support for parsing the RTL8822BS (SDIO) efuse\nDate:   Wed, 28 Dec 2022 00:30:08 +0100\nMessage-Id: <20221227233020.284266-8-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nThe efuse of the SDIO RTL8822BS chip has only one known member: the mac\naddress is at offset 0x11a. Add a struct rtw8822bs_efuse describing this\nand use it for copying the mac address when the SDIO bus is used.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/rtw8822b.c | 10 ++++++++++\n drivers/net/wireless/realtek/rtw88/rtw8822b.h |  6 ++++++\n 2 files changed, 16 insertions(+)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c\nindex 74dfb89b2c94..4ed5b98fab23 100644\n--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c\n@@ -26,10 +26,17 @@ static void rtw8822be_efuse_parsing(struct rtw_efuse *efuse,\n \tether_addr_copy(efuse->addr, map->e.mac_addr);\n }\n \n+static void rtw8822bs_efuse_parsing(struct rtw_efuse *efuse,\n+\t\t\t\t    struct rtw8822b_efuse *map)\n+{\n+\tether_addr_copy(efuse->addr, map->s.mac_addr);\n+}\n+\n static void rtw8822bu_efuse_parsing(struct rtw_efuse *efuse,\n \t\t\t\t    struct rtw8822b_efuse *map)\n {\n \tether_addr_copy(efuse->addr, map->u.mac_addr);\n+\n }\n \n static int rtw8822b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)\n@@ -62,6 +69,9 @@ static int rtw8822b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)\n \tcase RTW_HCI_TYPE_PCIE:\n \t\trtw8822be_efuse_parsing(efuse, map);\n \t\tbreak;\n+\tcase RTW_HCI_TYPE_SDIO:\n+\t\trtw8822bs_efuse_parsing(efuse, map);\n+\t\tbreak;\n \tcase RTW_HCI_TYPE_USB:\n \t\trtw8822bu_efuse_parsing(efuse, map);\n \t\tbreak;\ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.h b/drivers/net/wireless/realtek/rtw88/rtw8822b.h\nindex 01d3644e0c94..f84bfb6b0df9 100644\n--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.h\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.h\n@@ -65,6 +65,11 @@ struct rtw8822be_efuse {\n \tu8 res7;\n };\n \n+struct rtw8822bs_efuse {\n+\tu8 res4[0x4a];\t\t\t/* 0xd0 */\n+\tu8 mac_addr[ETH_ALEN];\t\t/* 0x11a */\n+};\n+\n struct rtw8822b_efuse {\n \t__le16 rtl_id;\n \tu8 res0[0x0e];\n@@ -94,6 +99,7 @@ struct rtw8822b_efuse {\n \tunion {\n \t\tstruct rtw8822bu_efuse u;\n \t\tstruct rtw8822be_efuse e;\n+\t\tstruct rtw8822bs_efuse s;\n \t};\n };\n \n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 39E79C4332F\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:31:14 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S232597AbiL0XbJ (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:31:09 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:57584 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232483AbiL0Xay (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:30:54 -0500\nReceived: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CEB4DED5;\n        Tue, 27 Dec 2022 15:30:45 -0800 (PST)\nReceived: by mail-ed1-x532.google.com with SMTP id b88so13595040edf.6;\n        Tue, 27 Dec 2022 15:30:45 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=YaL9++5/wfs1MVtqhD+aK5GRmljQ+ncXaK8G/SyoCYA=;\n        b=V+1tmN6IeYc7cQVzpdQQEGr6cdYbtX1xkGlLY73RuW0o6HanAQyNubEMT6TEX03XIp\n         wpll0fCMqyXAqhtoAQz4LqYvWPjGb25rlSRYWkXbnw8ZGeHNyvEXY5Ax3QH6JR9LQ4Fo\n         iMynJ4OYJk6RjcP0D22XyQoX4riDWY6Zdaps8pB5GBhjsGR0DV8/tMqELR+PEYhjQJJZ\n         AheI7mgNg2ttV2iSsYrVBqvZqkBuAUdiyPF9YuadS179fcYJZc2Yfvhahh+t/0Zh7Imw\n         18cagXdQsTDyqDpOAUsflOxdPaNgkPm8egzCuaCdjC23V6gjFBmL20J7tWacuombl4M8\n         1ypg==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=YaL9++5/wfs1MVtqhD+aK5GRmljQ+ncXaK8G/SyoCYA=;\n        b=GVmvUQBjX0mFdlziMBUJECKXXTmrXUYyemdiPkRDU7kKtsZHb5HyDhAVGxK4rDM3Pt\n         LfQFvMvJmf+Vn0NF/f2yoh0eqsN5KMpd4S55IAR+pBtLlEK8gc6TZ2DvMROsH3kWmpQI\n         n4EY+KKBTS8+er4RzCUlr+DaYD6yJga+yDf3o/2852Y6s3tNrDqsEmaXivUwlykgStQk\n         Smwo3aNrVdwk51sanOpByxKZv7FucbIxWQkAw7a20ct6e4GJmtgL78tmJi15mzMzTosi\n         eBxt0IcDP7ZBAPW3sGqrpK378JGOw7f5fLqaoVLnK8bG6ezi/S3ezDlw0dO1VOXExXMq\n         KsSg==\nX-Gm-Message-State: AFqh2kpnbeW1LGtD/HReZIxKcvdTs6vagJxveHg5Rb9bvheF8j0vz3GT\n        7BWmqENfMfFn7SUD8FMnLOlMtheU/i4=\nX-Google-Smtp-Source: AMrXdXtsMVFApahSdC8eXR6eymLJm2FGMn6nsnE1CscohpsNBKfCufIUPgYGrzD/qHH0f/lTICtouQ==\nX-Received: by 2002:aa7:c1c9:0:b0:468:fd17:aeb9 with SMTP id d9-20020aa7c1c9000000b00468fd17aeb9mr20546629edp.0.1672183844758;\n        Tue, 27 Dec 2022 15:30:44 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.43\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:44 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 10/19] rtw88: mac: Add support for the SDIO HCI in rtw_pwr_seq_parser()\nDate:   Wed, 28 Dec 2022 00:30:11 +0100\nMessage-Id: <20221227233020.284266-11-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nrtw_pwr_seq_parser() needs to know about the HCI bus interface mask for\nthe SDIO bus so it can parse the chip state change sequences.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/mac.c | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wireless/realtek/rtw88/mac.c\nindex bf1291902661..c04938691add 100644\n--- a/drivers/net/wireless/realtek/rtw88/mac.c\n+++ b/drivers/net/wireless/realtek/rtw88/mac.c\n@@ -222,6 +222,9 @@ static int rtw_pwr_seq_parser(struct rtw_dev *rtwdev,\n \tcase RTW_HCI_TYPE_USB:\n \t\tintf_mask = RTW_PWR_INTF_USB_MSK;\n \t\tbreak;\n+\tcase RTW_HCI_TYPE_SDIO:\n+\t\tintf_mask = RTW_PWR_INTF_SDIO_MSK;\n+\t\tbreak;\n \tdefault:\n \t\treturn -EINVAL;\n \t}\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 6C7F1C10F1B\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:31:16 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S232376AbiL0XbM (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:31:12 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:57580 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232481AbiL0Xay (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:30:54 -0500\nReceived: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63F0CC67;\n        Tue, 27 Dec 2022 15:30:44 -0800 (PST)\nReceived: by mail-ed1-x52e.google.com with SMTP id c34so14286300edf.0;\n        Tue, 27 Dec 2022 15:30:44 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=jtp+Q5wSGg2dbN7IB0CSpN39c6sHF9pt2C0cg9z9mH4=;\n        b=XTfv8m/9UeiXT+Lnke3zrSb/yxTzSWi4OktNW0xgv112VbA2RKvgE/Qbf9plT1WrZY\n         rTW28YU+AYw0fOXf56t/QpDbMx8UAjZe7uDhv/U0U/N9wGKHI9+6cS3y3bQi0T/QBBeq\n         ejNPgiZKGY/tr3AAj1rf4yksSnWlLSPl0KwnsZ0pZo7xkPahOqLznG9qJw2NnWP6HpD5\n         XQKR15QAlIDEjUc35iF6VreZpjJHe7KGwruDWjWWATc7k1aNtAagwuRnbniLlnxWuJJX\n         usWaj/HI6Gutb8QXWjTI4dQwENH48dW68+zDg6PEfwVpsIFw73zl+c2IRnXfcgmWPA4M\n         anbQ==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=jtp+Q5wSGg2dbN7IB0CSpN39c6sHF9pt2C0cg9z9mH4=;\n        b=zm2Wrns3cc8/WQu3M+ghR27qTEBlyto1fUuMkIzVmOgNJGgp/PTW2N9SmOe/ZS9xrJ\n         Bi0cTlcRi79g5J6AAGPUrZ9nGjITm/mYloILg4VgLMYqQ8TiCK4oRy3fNYSoKCBMkUEO\n         arNjfgrJQMQp3xU9rqzmbBRyHqI2BgVVeiWOLeRRh2xzsDbiqqQRIPDQCql+8sOjzltK\n         fnnKJIzHGdNarOkmjq60cY5mEtxzjpymZaTzKRH1O3SGw3zHJA6l49sCFcpN1p5hhnR5\n         La1MkTRCUQajfrs9GT/6DAdGoirkmzQTc8leo9IDydU9gBIup771Llw6NQF4RRT2A/tq\n         LFsw==\nX-Gm-Message-State: AFqh2kpOnKRs/tQ24e/GeaDiJ+nG5r9hHdiUUkL4FPtsGBNOMECCbZyv\n        oIoJhYsOb5PF48PHxfD2sCwutvgurBw=\nX-Google-Smtp-Source: AMrXdXsEsGarnDTsLe6s+u0UA/QgLaIg4VNmdykpjVmDg1XqR/mGtl3dgpS6yzDCqBFDV4im8Cz0Cw==\nX-Received: by 2002:a50:ec8b:0:b0:486:6d75:9a0c with SMTP id e11-20020a50ec8b000000b004866d759a0cmr4498140edr.12.1672183842746;\n        Tue, 27 Dec 2022 15:30:42 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.41\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:42 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 08/19] rtw88: rtw8822c: Add support for parsing the RTL8822CS (SDIO) efuse\nDate:   Wed, 28 Dec 2022 00:30:09 +0100\nMessage-Id: <20221227233020.284266-9-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nThe efuse of the SDIO RTL8822CS chip has only one known member: the mac\naddress is at offset 0x16a. Add a struct rtw8822cs_efuse describing this\nand use it for copying the mac address when the SDIO bus is used.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/rtw8822c.c | 9 +++++++++\n drivers/net/wireless/realtek/rtw88/rtw8822c.h | 6 ++++++\n 2 files changed, 15 insertions(+)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c\nindex 964e27887fe2..8ec779c7ab84 100644\n--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c\n@@ -29,6 +29,12 @@ static void rtw8822ce_efuse_parsing(struct rtw_efuse *efuse,\n \tether_addr_copy(efuse->addr, map->e.mac_addr);\n }\n \n+static void rtw8822cs_efuse_parsing(struct rtw_efuse *efuse,\n+\t\t\t\t    struct rtw8822c_efuse *map)\n+{\n+\tether_addr_copy(efuse->addr, map->s.mac_addr);\n+}\n+\n static void rtw8822cu_efuse_parsing(struct rtw_efuse *efuse,\n \t\t\t\t    struct rtw8822c_efuse *map)\n {\n@@ -64,6 +70,9 @@ static int rtw8822c_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)\n \tcase RTW_HCI_TYPE_PCIE:\n \t\trtw8822ce_efuse_parsing(efuse, map);\n \t\tbreak;\n+\tcase RTW_HCI_TYPE_SDIO:\n+\t\trtw8822cs_efuse_parsing(efuse, map);\n+\t\tbreak;\n \tcase RTW_HCI_TYPE_USB:\n \t\trtw8822cu_efuse_parsing(efuse, map);\n \t\tbreak;\ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.h b/drivers/net/wireless/realtek/rtw88/rtw8822c.h\nindex 479d5d769c52..eec2e3074087 100644\n--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.h\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.h\n@@ -16,6 +16,11 @@ struct rtw8822cu_efuse {\n \tu8 res2[0x3d];\n };\n \n+struct rtw8822cs_efuse {\n+\tu8 res0[0x4a];\t\t\t/* 0x120 */\n+\tu8 mac_addr[ETH_ALEN];\t\t/* 0x16a */\n+};\n+\n struct rtw8822ce_efuse {\n \tu8 mac_addr[ETH_ALEN];\t\t/* 0x120 */\n \tu8 vender_id[2];\n@@ -92,6 +97,7 @@ struct rtw8822c_efuse {\n \tu8 res10[0x42];\n \tunion {\n \t\tstruct rtw8822cu_efuse u;\n+\t\tstruct rtw8822cs_efuse s;\n \t\tstruct rtw8822ce_efuse e;\n \t};\n };\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 49372C4708D\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:31:18 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S229744AbiL0XbQ (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:31:16 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:57616 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232050AbiL0Xaz (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:30:55 -0500\nReceived: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8392BDED6;\n        Tue, 27 Dec 2022 15:30:45 -0800 (PST)\nReceived: by mail-ed1-x52d.google.com with SMTP id r26so15660520edc.5;\n        Tue, 27 Dec 2022 15:30:45 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=P3w67rXYb4ve8I5B5m+YRlvZDv2zR1R4FBsmmtE/Ozc=;\n        b=ij2yiiak3n1tbzP0a4ZRCOYWftMiGqXaFkS/INqNNpDGY65+9PvFg7KZShqKx9azIA\n         QlDHFUs0ax10yOWKAXOiisG8EGBT1OKPDSleEgIYXuFA1ACblgIPv+pRl9WgjbTpw/z7\n         ZlPD/iBf41KZOHP7su1h5w5oeBmknkU+IuetVJiJgABN79qAF8r+5UwwE9aMnC5J2VEi\n         spcgfQ1WgoIQGYlHDVihThvHe7kuMIlfdzAd6tt74k5UQ0WpgqGGdCjFmR9CjfAfY9yH\n         SUwrDITzciL3rNiW8nTw12TUjjvCti8Au3jlUjm4SSHkCO7Aco+wOCe+i71l1Is1hKPP\n         rbBg==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=P3w67rXYb4ve8I5B5m+YRlvZDv2zR1R4FBsmmtE/Ozc=;\n        b=ITbvyGZLHVQlUoBRfS+oiX+RiQTrnJIm0T7hmfvtyDuzcBV2yfqr9HLbZF1AgJJlK0\n         yL9sFxmAkjCHU0xr03rbeNKaJ5VAGcrJLJKhv8XR+df1wV+eVLcqxCvxl2L04nKA774q\n         LiLAg9/xeRrfZA8Jin/y9Mbalk4uX0ivtaji1Wqz5fSkFQ4ZvIug2IHLOisUKHEJT9fE\n         Eo41RSbIT9CfzwkO0WdvqM6UZ1rRkj5qLhkZP5jP8G9/fJGhJRTLnSChprIpm1uq+Q6U\n         3lGkm63/k0oVhX5XG4SeqxOm8KX1kOxr1cTl+xKo3v7osJzjtExTbtIjFAbaxhHTR+fz\n         WEvg==\nX-Gm-Message-State: AFqh2kqf2CrZEKx7FxMFNs0CDq1XDfFgZc9dA+aXSd+i+L+WkepoVVmc\n        hG8wsnCV24unckpLD7vq63FtuS4d7CY=\nX-Google-Smtp-Source: AMrXdXuZuZZ7LwRM5nmqIXSaJ14M6sThRtWPouK1QxqOssAmKEQQESQFbRVXVZ7rsppPlDHbBG6ngw==\nX-Received: by 2002:aa7:d8da:0:b0:474:5de4:a5d1 with SMTP id k26-20020aa7d8da000000b004745de4a5d1mr24070817eds.39.1672183843624;\n        Tue, 27 Dec 2022 15:30:43 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.42\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:43 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 09/19] rtw88: hci: Add an optional power_switch() callback to rtw_hci_ops\nDate:   Wed, 28 Dec 2022 00:30:10 +0100\nMessage-Id: <20221227233020.284266-10-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\n32-bit SDIO bus reads/writes only work when the card is powered on. Add\nan optional power_switch() callback to struct rtw_hci_ops where we\ninform the HCI sub-driver that the chip is now powered on. Based on this\ninformation the upcoming SDIO HCI implementation can then use the\nappropriate 32-bit read/write accessors.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/hci.h | 8 ++++++++\n drivers/net/wireless/realtek/rtw88/mac.c | 8 ++++++++\n 2 files changed, 16 insertions(+)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/hci.h b/drivers/net/wireless/realtek/rtw88/hci.h\nindex 830d7532f2a3..602a6acc1ca1 100644\n--- a/drivers/net/wireless/realtek/rtw88/hci.h\n+++ b/drivers/net/wireless/realtek/rtw88/hci.h\n@@ -22,6 +22,8 @@ struct rtw_hci_ops {\n \tint (*write_data_rsvd_page)(struct rtw_dev *rtwdev, u8 *buf, u32 size);\n \tint (*write_data_h2c)(struct rtw_dev *rtwdev, u8 *buf, u32 size);\n \n+\tvoid (*power_switch)(struct rtw_dev *rtwdev, bool on);\n+\n \tu8 (*read8)(struct rtw_dev *rtwdev, u32 addr);\n \tu16 (*read16)(struct rtw_dev *rtwdev, u32 addr);\n \tu32 (*read32)(struct rtw_dev *rtwdev, u32 addr);\n@@ -84,6 +86,12 @@ rtw_hci_write_data_h2c(struct rtw_dev *rtwdev, u8 *buf, u32 size)\n \treturn rtwdev->hci.ops->write_data_h2c(rtwdev, buf, size);\n }\n \n+static inline void rtw_hci_power_switch(struct rtw_dev *rtwdev, bool on)\n+{\n+\tif (rtwdev->hci.ops->power_switch)\n+\t\trtwdev->hci.ops->power_switch(rtwdev, on);\n+}\n+\n static inline u8 rtw_read8(struct rtw_dev *rtwdev, u32 addr)\n {\n \treturn rtwdev->hci.ops->read8(rtwdev, addr);\ndiff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wireless/realtek/rtw88/mac.c\nindex 4e5c194aac29..bf1291902661 100644\n--- a/drivers/net/wireless/realtek/rtw88/mac.c\n+++ b/drivers/net/wireless/realtek/rtw88/mac.c\n@@ -273,16 +273,24 @@ static int rtw_mac_power_switch(struct rtw_dev *rtwdev, bool pwr_on)\n \tif (pwr_on == cur_pwr)\n \t\treturn -EALREADY;\n \n+\t/* Always signal power off before power sequence. This way\n+\t * read/write functions will take path which works in both\n+\t * states. State will change in the middle of the sequence.\n+\t */\n+\trtw_hci_power_switch(rtwdev, false);\n+\n \tpwr_seq = pwr_on ? chip->pwr_on_seq : chip->pwr_off_seq;\n \tret = rtw_pwr_seq_parser(rtwdev, pwr_seq);\n \tif (ret)\n \t\treturn ret;\n\n \tif (pwr_on)\n \t\tset_bit(RTW_FLAG_POWERON, rtwdev->flags);\n \telse\n \t\tclear_bit(RTW_FLAG_POWERON, rtwdev->flags);\n \n+\trtw_hci_power_switch(rtwdev, pwr_on);\n+\n \treturn 0;\n }\n \n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 05E17C4708E\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:31:39 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S232679AbiL0Xbg (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:31:36 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:57812 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232572AbiL0XbB (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:31:01 -0500\nReceived: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8756BDF21;\n        Tue, 27 Dec 2022 15:30:46 -0800 (PST)\nReceived: by mail-ed1-x52d.google.com with SMTP id s5so20853172edc.12;\n        Tue, 27 Dec 2022 15:30:46 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=69RnArZw8pH7v6gYxnQGzkJOThGnroKfpqTaxkmeVcY=;\n        b=VAG6baKX/Mbr2DiVvAd65r0OFECQlNI7HMyeV5xK5EFM/UA2S2OKtOulpjvKMcBtfl\n         5HrY4slBX+ZTCC8atGBqBz4TNbgCVtEYt256Ba86Qr5xa3cZBnBY7ewZZq0wPNzLx5+/\n         EdzV9LQ964qkyv3XzxNFudAa37qfu9eW2JlrrmSqIrqJI1SNB8szOKArWKknQcT2EfqK\n         tjWtVUw5C3i6F3Y02mKz1ynaR+cATwqAkwAG8FIHrTQKyuCK3MvWReYEkidjBwHxieRY\n         rt4+TzAwkZY2EnxqlHAkctd8d6QH6cWJZRCnPp1cXsZQZbv/e7Fi254KasR44zT4Hsxh\n         kXBg==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=69RnArZw8pH7v6gYxnQGzkJOThGnroKfpqTaxkmeVcY=;\n        b=jsZ67VLsCP1dNPvGLQ5VZlc4KhD3jBZmZ99BbHccDPwFDicerqKqgTYrWeUeZNvwZw\n         uvyqMLVp3DL7d0ngjf35M6rjx+Vren0YiWVA+WxX8CNaBmvSImT3eib3sHLxrJp1RmFj\n         dcaRMHc3zgqvV4nR0MsRqHlbe9N6P+hytnVM33mGjdp3z3UVMw/+Epi2vS42Ojzn/tlF\n         ltdT8281OsleaPKkk1fXHsci8K5lpwZ3oKTSc2J0QH2p+LDbkGU18SHVCT7PIjR+veSL\n         kfmQ7JYtqcYJlnO/p3S7SypEbDZmulZ9hxRCLhzo+o2qPCb7WbzUc9WDxOMP6c4lwk9b\n         iQwA==\nX-Gm-Message-State: AFqh2kob/Wb1picBH8fwdi/jHG82un/MEMM8swhCTwsRUB0uycpFonMa\n        zZCuhEw/NAIp4o5CMuz+SUveORk5t/k=\nX-Google-Smtp-Source: AMrXdXuFjWYhuXY54NqEai5crXRnZmHWyZmaV0No9HAtAyd8YZaEWgoMr1yvq0OCoKF2/JAOZP3PgA==\nX-Received: by 2002:a05:6402:1055:b0:467:c3cb:49aa with SMTP id e21-20020a056402105500b00467c3cb49aamr19724907edu.4.1672183845760;\n        Tue, 27 Dec 2022 15:30:45 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.44\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:45 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 11/19] rtw88: mac: Add support for the SDIO HCI in the TX/page table setup\nDate:   Wed, 28 Dec 2022 00:30:12 +0100\nMessage-Id: <20221227233020.284266-12-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\ntxdma_queue_mapping() and priority_queue_cfg() can use the first entry\nof each chip's rqpn_table and page_table. Add this mapping so data\ntransmission is possible on SDIO based chipsets.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/mac.c | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wireless/realtek/rtw88/mac.c\nindex c04938691add..8e1fa824b32b 100644\n--- a/drivers/net/wireless/realtek/rtw88/mac.c\n+++ b/drivers/net/wireless/realtek/rtw88/mac.c\n@@ -1053,6 +1053,9 @@ static int txdma_queue_mapping(struct rtw_dev *rtwdev)\n \t\telse\n \t\t\treturn -EINVAL;\n \t\tbreak;\n+\tcase RTW_HCI_TYPE_SDIO:\n+\t\trqpn = &chip->rqpn_table[0];\n+\t\tbreak;\n \tdefault:\n \t\treturn -EINVAL;\n \t}\n@@ -1215,6 +1218,9 @@ static int priority_queue_cfg(struct rtw_dev *rtwdev)\n \t\telse\n \t\t\treturn -EINVAL;\n \t\tbreak;\n+\tcase RTW_HCI_TYPE_SDIO:\n+\t\tpg_tbl = &chip->page_table[0];\n+\t\tbreak;\n \tdefault:\n \t\treturn -EINVAL;\n \t}\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 98469C46467\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:32:31 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S232730AbiL0Xc2 (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:32:28 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:58402 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232645AbiL0Xb3 (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:31:29 -0500\nReceived: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 027ABE02F;\n        Tue, 27 Dec 2022 15:30:49 -0800 (PST)\nReceived: by mail-ed1-x535.google.com with SMTP id c17so20833998edj.13;\n        Tue, 27 Dec 2022 15:30:49 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=Z1azAtpeEKYDc3NsUxyyhrkCkOfc9fkFfo7oykDXpuo=;\n        b=XlGMCT0G2gcvou7A9Uz3FQJacwyUgb1Zz5lAyFoZzyZHCj1HKXqd+/VkL80XXWWrRJ\n         SVsmc35bG4CZMUFjWlknxhSyXoMi0KWKe2VP0Zho3Y7CU6Xk7NliivisFCzVOOs8NlGQ\n         Y0zNWolAgXyiIKDs26GR7w7hct40DjTv0GzA+YgZLLtglN0cWduBlAOziEajdQ44u8bC\n         TeJuBAJQgs39nuwxrriA2O9KS5UQYldzGB5e3Qo9+CHpcajWmj/fcoUV46vc4nMBFN4t\n         rtvMi1t1azNEkEGqD7iSN8wjhJdspfYH8PfehG1RwOox+e0+Lcu8ESu7ZDUTTa6ayi3v\n         61kQ==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=Z1azAtpeEKYDc3NsUxyyhrkCkOfc9fkFfo7oykDXpuo=;\n        b=6TSN+AtHBQvF2axE+sBzP/WZdXUWdQJ6OF0inkKj66AQNsfurIYglv2+6Z2pMLfD9d\n         FEd62EBhWYabGms2LWfh2lLd03sgvTXfGVWa+LuFMPR84MBZqgVsyrcEQErxRft2/dp8\n         HytKwmX9XuOLaGbCsDpxY2ZuUvMaffqYZcl/lUY3WnxXibVDocFHquTpVhSluub1iI6o\n         WxcL2T7VmkNSlgtC9RDl0QIXM1thUBCi6XhhW0gJBOz5BdPZZ1ykLq/h+CSOn3BqcWYv\n         99QyfiS6yjoZAqL3j0OX+D2SQbB3bl2FD1mbbXaz9EHfkFD00gO8m6DN/bkES0RUb23R\n         vUtQ==\nX-Gm-Message-State: AFqh2kreKyCx11dR2mEx05XQBJhSAGI/nokM4q+fAaDBkiWF4LLuLKls\n        aRzcZQVUtCxz0EHG+IPB8EUSan4ubqs=\nX-Google-Smtp-Source: AMrXdXviXpG2jnGIM6KWSd7+hKRFh7JMbeSihF1O6ETNZdqhS0oAdWefk7N0xooLLUxc3msgYlPS0w==\nX-Received: by 2002:a05:6402:282:b0:480:c06:2833 with SMTP id l2-20020a056402028200b004800c062833mr15317548edv.38.1672183847852;\n        Tue, 27 Dec 2022 15:30:47 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.46\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:47 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 13/19] rtw88: mac: Add support for SDIO specifics in the power on sequence\nDate:   Wed, 28 Dec 2022 00:30:14 +0100\nMessage-Id: <20221227233020.284266-14-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nAdd the code specific to SDIO HCI in the MAC power on sequence. This is\nbased on the RTL8822BS and RTL8822CS vendor drivers.\n\nCo-developed-by: Jernej Skrabec <jernej.skrabec@gmail.com>\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/mac.c | 41 ++++++++++++++++++++++--\n 1 file changed, 39 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wireless/realtek/rtw88/mac.c\nindex 8e1fa824b32b..ad71f9838d1d 100644\n--- a/drivers/net/wireless/realtek/rtw88/mac.c\n+++ b/drivers/net/wireless/realtek/rtw88/mac.c\n@@ -7,6 +7,7 @@\n #include \"reg.h\"\n #include \"fw.h\"\n #include \"debug.h\"\n+#include \"sdio.h\"\n \n void rtw_set_channel_mac(struct rtw_dev *rtwdev, u8 channel, u8 bw,\n \t\t\t u8 primary_ch_idx)\n@@ -60,6 +61,7 @@ EXPORT_SYMBOL(rtw_set_channel_mac);\n \n static int rtw_mac_pre_system_cfg(struct rtw_dev *rtwdev)\n {\n+\tunsigned int retry;\n \tu32 value32;\n \tu8 value8;\n \n@@ -77,6 +79,26 @@ static int rtw_mac_pre_system_cfg(struct rtw_dev *rtwdev)\n \tcase RTW_HCI_TYPE_PCIE:\n \t\trtw_write32_set(rtwdev, REG_HCI_OPT_CTRL, BIT_USB_SUS_DIS);\n \t\tbreak;\n+\tcase RTW_HCI_TYPE_SDIO:\n+\t\trtw_write8_clr(rtwdev, REG_SDIO_HSUS_CTRL, BIT(0));\n+\n+\t\tfor (retry = 0; retry < RTW_PWR_POLLING_CNT; retry++) {\n+\t\t\tif (rtw_read8(rtwdev, REG_SDIO_HSUS_CTRL) & BIT(1))\n+\t\t\t\tbreak;\n+\n+\t\t\tusleep_range(10, 50);\n+\t\t}\n+\n+\t\tif (retry == RTW_PWR_POLLING_CNT) {\n+\t\t\trtw_err(rtwdev, \"failed to poll REG_SDIO_HSUS_CTRL[1]\");\n+\t\t\treturn -ETIMEDOUT;\n+\t\t}\n+\n+\t\tif (rtw_sdio_is_sdio30_supported(rtwdev))\n+\t\t\trtw_write8_set(rtwdev, REG_HCI_OPT_CTRL + 2, BIT(2));\n+\t\telse\n+\t\t\trtw_write8_clr(rtwdev, REG_HCI_OPT_CTRL + 2, BIT(2));\n+\t\tbreak;\n \tcase RTW_HCI_TYPE_USB:\n \t\tbreak;\n \tdefault:\n@@ -248,6 +270,7 @@ static int rtw_mac_power_switch(struct rtw_dev *rtwdev, bool pwr_on)\n {\n \tconst struct rtw_chip_info *chip = rtwdev->chip;\n \tconst struct rtw_pwr_seq_cmd **pwr_seq;\n+\tu32 imr;\n \tu8 rpwm;\n \tbool cur_pwr;\n \tint ret;\n@@ -279,18 +302,25 @@ static int rtw_mac_power_switch(struct rtw_dev *rtwdev, bool pwr_on)\n \t */\n \trtw_hci_power_switch(rtwdev, false);\n \n+\timr = rtw_read32(rtwdev, REG_SDIO_HIMR);\n+\trtw_write32(rtwdev, REG_SDIO_HIMR, 0);\n+\n \tpwr_seq = pwr_on ? chip->pwr_on_seq : chip->pwr_off_seq;\n \tret = rtw_pwr_seq_parser(rtwdev, pwr_seq);\n-\tif (ret)\n+\tif (ret) {\n+\t\trtw_write32(rtwdev, REG_SDIO_HIMR, imr);\n \t\treturn ret;\n+\t}\n \n \tif (pwr_on)\n \t\tset_bit(RTW_FLAG_POWERON, rtwdev->flags);\n \telse\n \t\tclear_bit(RTW_FLAG_POWERON, rtwdev->flags);\n \n \trtw_hci_power_switch(rtwdev, pwr_on);\n \n+\trtw_write32(rtwdev, REG_SDIO_HIMR, imr);\n+\n \treturn 0;\n }\n \n@@ -462,6 +492,9 @@ static void download_firmware_reg_backup(struct rtw_dev *rtwdev,\n \trtw_write16(rtwdev, REG_FIFOPAGE_INFO_1, 0x200);\n \trtw_write32(rtwdev, REG_RQPN_CTRL_2, bckp[bckp_idx - 1].val);\n \n+\tif (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_SDIO)\n+\t\trtw_read32(rtwdev, REG_SDIO_FREE_TXPG);\n+\n \t/* Disable beacon related functions */\n \ttmp = rtw_read8(rtwdev, REG_BCN_CTRL);\n \tbckp[bckp_idx].len = 1;\n@@ -1074,8 +1107,12 @@ static int txdma_queue_mapping(struct rtw_dev *rtwdev)\n \tif (rtw_chip_wcpu_11ac(rtwdev))\n \t\trtw_write32(rtwdev, REG_H2CQ_CSR, BIT_H2CQ_FULL);\n \n-\tif (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_USB)\n+\tif (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_SDIO) {\n+\t\trtw_read32(rtwdev, REG_SDIO_FREE_TXPG);\n+\t\trtw_write32(rtwdev, REG_SDIO_TX_CTRL, 0);\n+\t} else if (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_USB) {\n \t\trtw_write8_set(rtwdev, REG_TXDMA_PQ_MAP, BIT_RXDMA_ARBBW_EN);\n+\t}\n \n \treturn 0;\n }\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 655F7C4332F\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:32:33 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S229915AbiL0Xcb (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:32:31 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:58412 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232483AbiL0Xb3 (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:31:29 -0500\nReceived: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BC01E027;\n        Tue, 27 Dec 2022 15:30:48 -0800 (PST)\nReceived: by mail-ed1-x534.google.com with SMTP id c17so20833966edj.13;\n        Tue, 27 Dec 2022 15:30:48 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=fD8uT7fYa3hod/z3QeBx+v6brl7qVd4PgX6NXRL4Rps=;\n        b=SJzQoUQKDmrooPw/DApb/rVN0+I8IgHb0qq/0KlQku5R2RWlaE3YX1mn3E6vkEhTAk\n         PFEJbad9I2ogfIkc4c5dk4oj1ovsidKXZPCcEMOpSopq8ttIkeurO96HeXLdA52Ss6Pp\n         iGQnIUb8v8By4rQ8sx2bbX/803eOMjE+cOdWkC3T0MfdXII9LS3pJR4aY35DmSe9BEeu\n         bMxt5XenqFpLMpyeUGOxVoLfo4Cc/qflGVCrbwJ4Rp+3xxgS4s9YfPfPLdLENvDWZlvV\n         riEu/9F0O+YAx1HTNpCJ0J+kNjwGnXDLM8Ug+NKhj6AOvjVq55mORe1sqUacbX+AkSX5\n         KMfQ==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=fD8uT7fYa3hod/z3QeBx+v6brl7qVd4PgX6NXRL4Rps=;\n        b=zlgHjkI/7H1+WSDrPXbRO1q40YZ0C3fdpF2qDCGuyPb90gAobXYHpKjdVaz6BI+rL/\n         MqEAWkKion/uW3i8/VUBKKQDH65UIwNkvLaHupJGD9yNpKQUV/TAao3BSu5gatCePYhV\n         LuGEG07GgtQCwm/K0Vw/nBQv9NMWuD99DdMMaW09260Vkirx8F8f4aNnKrgxtd4QamcJ\n         TmfyorsEf/vuzb4cwevnuywzKvY/Kg2+5d+BtfKSjjGimS4Jx8IZQB9+Ja31u+pYKe4l\n         LcyuFxtIL69jiVYSmSsvnZHLQNmrYoHT4dzTfmuJRhQRBeGZPXswjzfrMJUrIYUqxpHU\n         TdYw==\nX-Gm-Message-State: AFqh2kopXzdYbozbHS1r0xSRo+egAwi41jNUYLAld7oqzPjEdi6RpV7e\n        fp4PFCFXjFB48+JMi/8MbBH4FBcsiGY=\nX-Google-Smtp-Source: AMrXdXtBFpZOTTSeitCGHkMLUuDviJqkIgxAJ23rDWbLVnQFFXXGkrWkjIQUpRR20hnHPTUHCRQviw==\nX-Received: by 2002:a50:9f09:0:b0:46b:2b37:ffa6 with SMTP id b9-20020a509f09000000b0046b2b37ffa6mr21141670edf.13.1672183846738;\n        Tue, 27 Dec 2022 15:30:46 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.45\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:46 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 12/19] rtw88: sdio: Add HCI implementation for SDIO based chipsets\nDate:   Wed, 28 Dec 2022 00:30:13 +0100\nMessage-Id: <20221227233020.284266-13-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nAdd a sub-driver for SDIO based chipsets which implements the following\nfunctionality:\n- register accessors for 8, 16 and 32 bits for all states of the card\n  (including usage of 4x 8 bit access for one 32 bit buffer if the card\n  is not fully powered on yet - or if it's fully powered on then 1x 32\n  bit access is used)\n- checking whether there's space in the TX FIFO queue to transmit data\n- transfers from the host to the device for actual network traffic,\n  reserved pages (for firmware download) and H2C (host-to-card)\n  transfers\n- receiving data from the device\n- deep power saving state\n\nThe transmit path is optimized so DMA-capable SDIO host controllers can\ndirectly use the buffers provided because the buffer's physical\naddresses are 8 byte aligned.\n\nThe receive path is prepared to support RX aggregation where the\nchipset combines multiple MAC frames into one bigger buffer to reduce\nSDIO transfer overhead.\n\nCo-developed-by: Jernej Skrabec <jernej.skrabec@gmail.com>\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/Kconfig  |    3 +\n drivers/net/wireless/realtek/rtw88/Makefile |    3 +\n drivers/net/wireless/realtek/rtw88/debug.h  |    1 +\n drivers/net/wireless/realtek/rtw88/mac.h    |    1 -\n drivers/net/wireless/realtek/rtw88/reg.h    |   10 +\n drivers/net/wireless/realtek/rtw88/sdio.c   | 1242 +++++++++++++++++++\n drivers/net/wireless/realtek/rtw88/sdio.h   |  175 +++\n 7 files changed, 1434 insertions(+), 1 deletion(-)\n create mode 100644 drivers/net/wireless/realtek/rtw88/sdio.c\n create mode 100644 drivers/net/wireless/realtek/rtw88/sdio.h\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/Kconfig b/drivers/net/wireless/realtek/rtw88/Kconfig\nindex 651ab56d9c6b..cdf9cb478ee2 100644\n--- a/drivers/net/wireless/realtek/rtw88/Kconfig\n+++ b/drivers/net/wireless/realtek/rtw88/Kconfig\n@@ -16,6 +16,9 @@ config RTW88_CORE\n config RTW88_PCI\n \ttristate\n \n+config RTW88_SDIO\n+\ttristate\n+\n config RTW88_USB\n \ttristate\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/Makefile b/drivers/net/wireless/realtek/rtw88/Makefile\nindex fe7293ee87b4..892cad60ba31 100644\n--- a/drivers/net/wireless/realtek/rtw88/Makefile\n+++ b/drivers/net/wireless/realtek/rtw88/Makefile\n@@ -59,5 +59,8 @@ rtw88_8821cu-objs\t\t:= rtw8821cu.o\n obj-$(CONFIG_RTW88_PCI)\t\t+= rtw88_pci.o\n rtw88_pci-objs\t\t\t:= pci.o\n \n+obj-$(CONFIG_RTW88_SDIO)\t+= rtw88_sdio.o\n+rtw88_sdio-objs\t\t\t:= sdio.o\n+\n obj-$(CONFIG_RTW88_USB)\t\t+= rtw88_usb.o\n rtw88_usb-objs\t\t\t:= usb.o\ndiff --git a/drivers/net/wireless/realtek/rtw88/debug.h b/drivers/net/wireless/realtek/rtw88/debug.h\nindex 066792dd96af..a9149c6c2b48 100644\n--- a/drivers/net/wireless/realtek/rtw88/debug.h\n+++ b/drivers/net/wireless/realtek/rtw88/debug.h\n@@ -24,6 +24,7 @@ enum rtw_debug_mask {\n \tRTW_DBG_ADAPTIVITY\t= 0x00008000,\n \tRTW_DBG_HW_SCAN\t\t= 0x00010000,\n \tRTW_DBG_STATE\t\t= 0x00020000,\n+\tRTW_DBG_SDIO\t\t= 0x00040000,\n \n \tRTW_DBG_ALL\t\t= 0xffffffff\n };\ndiff --git a/drivers/net/wireless/realtek/rtw88/mac.h b/drivers/net/wireless/realtek/rtw88/mac.h\nindex 3172aa5ac4de..58c3dccc14bb 100644\n--- a/drivers/net/wireless/realtek/rtw88/mac.h\n+++ b/drivers/net/wireless/realtek/rtw88/mac.h\n@@ -7,7 +7,6 @@\n \n #define RTW_HW_PORT_NUM\t\t5\n #define cut_version_to_mask(cut) (0x1 << ((cut) + 1))\n-#define SDIO_LOCAL_OFFSET\t0x10250000\n #define DDMA_POLLING_COUNT\t1000\n #define C2H_PKT_BUF\t\t256\n #define REPORT_BUF\t\t128\ndiff --git a/drivers/net/wireless/realtek/rtw88/reg.h b/drivers/net/wireless/realtek/rtw88/reg.h\nindex 8852b24d6c2a..4ea2c6b491e9 100644\n--- a/drivers/net/wireless/realtek/rtw88/reg.h\n+++ b/drivers/net/wireless/realtek/rtw88/reg.h\n@@ -185,6 +185,9 @@\n \t(((x) & BIT_MASK_TXDMA_VIQ_MAP) << BIT_SHIFT_TXDMA_VIQ_MAP)\n #define REG_TXDMA_PQ_MAP\t0x010C\n #define BIT_RXDMA_ARBBW_EN\tBIT(0)\n+#define BIT_RXSHFT_EN\t\tBIT(1)\n+#define BIT_RXDMA_AGG_EN\tBIT(2)\n+#define BIT_TXDMA_BW_EN\t\tBIT(3)\n #define BIT_SHIFT_TXDMA_BEQ_MAP\t8\n #define BIT_MASK_TXDMA_BEQ_MAP\t0x3\n #define BIT_TXDMA_BEQ_MAP(x)                                                   \\\n@@ -283,10 +286,17 @@\n #define REG_H2C_TAIL\t\t0x0248\n #define REG_H2C_READ_ADDR\t0x024C\n #define REG_H2C_INFO\t\t0x0254\n+#define REG_RXDMA_AGG_PG_TH\t0x0280\n+#define BIT_SHIFT_DMA_AGG_TO_V1\t8\n+#define BIT_EN_PRE_CALC\t\tBIT(29)\n #define REG_RXPKT_NUM\t\t0x0284\n #define BIT_RXDMA_REQ\t\tBIT(19)\n #define BIT_RW_RELEASE\t\tBIT(18)\n #define BIT_RXDMA_IDLE\t\tBIT(17)\n+#define REG_RXDMA_STATUS\t0x0288\n+#define REG_RXDMA_DPR\t\t0x028C\n+#define REG_RXDMA_MODE\t\t0x0290\n+#define BIT_DMA_MODE\t\tBIT(1)\n #define REG_RXPKTNUM\t\t0x02B0\n \n #define REG_INT_MIG\t\t0x0304\ndiff --git a/drivers/net/wireless/realtek/rtw88/sdio.c b/drivers/net/wireless/realtek/rtw88/sdio.c\nnew file mode 100644\nindex 000000000000..0e637ff2293f\n--- /dev/null\n+++ b/drivers/net/wireless/realtek/rtw88/sdio.c\n@@ -0,0 +1,1242 @@\n+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause\n+/* Copyright (C) 2021 Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n+ * Copyright (C) 2021 Jernej Skrabec <jernej.skrabec@gmail.com>\n+ *\n+ * Based on rtw88/pci.c:\n+ *   Copyright(c) 2018-2019  Realtek Corporation\n+ */\n+\n+#include <linux/module.h>\n+#include <linux/mmc/host.h>\n+#include <linux/mmc/sdio_func.h>\n+#include \"sdio.h\"\n+#include \"reg.h\"\n+#include \"tx.h\"\n+#include \"rx.h\"\n+#include \"fw.h\"\n+#include \"ps.h\"\n+#include \"debug.h\"\n+\n+#define RTW_SDIO_INDIRECT_RW_RETRIES\t\t50\n+\n+static bool rtw_sdio_is_bus_addr(u32 addr)\n+{\n+\treturn (addr & RTW_SDIO_BUS_MSK) != 0;\n+}\n+\n+static bool rtw_sdio_bus_claim_needed(struct rtw_sdio *rtwsdio)\n+{\n+\treturn !rtwsdio->irq_thread ||\n+\t       rtwsdio->irq_thread != current;\n+}\n+\n+static u32 rtw_sdio_to_bus_offset(struct rtw_dev *rtwdev, u32 addr)\n+{\n+\tswitch (addr & RTW_SDIO_BUS_MSK) {\n+\tcase WLAN_IOREG_OFFSET:\n+\t\taddr &= WLAN_IOREG_REG_MSK;\n+\t\taddr |= FIELD_PREP(REG_SDIO_CMD_ADDR_MSK,\n+\t\t\t\t   REG_SDIO_CMD_ADDR_MAC_REG);\n+\t\tbreak;\n+\tcase SDIO_LOCAL_OFFSET:\n+\t\taddr &= SDIO_LOCAL_REG_MSK;\n+\t\taddr |= FIELD_PREP(REG_SDIO_CMD_ADDR_MSK,\n+\t\t\t\t   REG_SDIO_CMD_ADDR_SDIO_REG);\n+\t\tbreak;\n+\tdefault:\n+\t\trtw_warn(rtwdev, \"Cannot convert addr 0x%08x to bus offset\",\n+\t\t\t addr);\n+\t}\n+\n+\treturn addr;\n+}\n+\n+static void rtw_sdio_writel(struct rtw_sdio *rtwsdio, u32 val,\n+\t\t\t    u32 addr, int *ret)\n+{\n+\tu8 buf[4];\n+\tint i;\n+\n+\tif (!(addr & 3) && rtwsdio->is_powered_on) {\n+\t\tsdio_writel(rtwsdio->sdio_func, val, addr, ret);\n+\t\treturn;\n+\t}\n+\n+\t*(__le32 *)buf = cpu_to_le32(val);\n+\n+\tfor (i = 0; i < 4; i++) {\n+\t\tsdio_writeb(rtwsdio->sdio_func, buf[i], addr + i, ret);\n+\t\tif (*ret)\n+\t\t\treturn;\n+\t}\n+}\n+\n+static u32 rtw_sdio_readl(struct rtw_sdio *rtwsdio, u32 addr, int *ret)\n+{\n+\tu8 buf[4];\n+\tint i;\n+\n+\tif (!(addr & 3) && rtwsdio->is_powered_on)\n+\t\treturn sdio_readl(rtwsdio->sdio_func, addr, ret);\n+\n+\tfor (i = 0; i < 4; i++) {\n+\t\tbuf[i] = sdio_readb(rtwsdio->sdio_func, addr + i, ret);\n+\t\tif (*ret)\n+\t\t\treturn 0;\n+\t}\n+\n+\treturn le32_to_cpu(*(__le32 *)buf);\n+}\n+\n+static u8 rtw_sdio_read_indirect8(struct rtw_dev *rtwdev, u32 addr, int *ret)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tu32 reg_cfg, reg_data;\n+\tint retry;\n+\tu8 tmp;\n+\n+\treg_cfg = rtw_sdio_to_bus_offset(rtwdev, REG_SDIO_INDIRECT_REG_CFG);\n+\treg_data = rtw_sdio_to_bus_offset(rtwdev, REG_SDIO_INDIRECT_REG_DATA);\n+\n+\trtw_sdio_writel(rtwsdio, BIT(19) | addr, reg_cfg, ret);\n+\tif (*ret)\n+\t\treturn 0;\n+\n+\tfor (retry = 0; retry < RTW_SDIO_INDIRECT_RW_RETRIES; retry++) {\n+\t\ttmp = sdio_readb(rtwsdio->sdio_func, reg_cfg + 2, ret);\n+\t\tif (!ret && tmp & BIT(4))\n+\t\t\tbreak;\n+\t}\n+\n+\tif (*ret)\n+\t\treturn 0;\n+\n+\treturn sdio_readb(rtwsdio->sdio_func, reg_data, ret);\n+}\n+\n+static int rtw_sdio_read_indirect_bytes(struct rtw_dev *rtwdev, u32 addr,\n+\t\t\t\t\tu8 *buf, int count)\n+{\n+\tint i, ret;\n+\n+\tfor (i = 0; i < count; i++) {\n+\t\tbuf[0] = rtw_sdio_read_indirect8(rtwdev, addr + i, &ret);\n+\t\tif (ret)\n+\t\t\tbreak;\n+\t}\n+\n+\treturn ret;\n+}\n+\n+static u32 rtw_sdio_read_indirect32(struct rtw_dev *rtwdev, u32 addr, int *ret)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tu32 reg_cfg, reg_data, val;\n+\tint retry;\n+\n+\treg_cfg = rtw_sdio_to_bus_offset(rtwdev, REG_SDIO_INDIRECT_REG_CFG);\n+\treg_data = rtw_sdio_to_bus_offset(rtwdev, REG_SDIO_INDIRECT_REG_DATA);\n+\n+\trtw_sdio_writel(rtwsdio, BIT(19) | BIT(17) | addr, reg_cfg, ret);\n+\tif (*ret)\n+\t\treturn 0;\n+\n+\tfor (retry = 0; retry < RTW_SDIO_INDIRECT_RW_RETRIES; retry++) {\n+\t\tval = sdio_readb(rtwsdio->sdio_func, reg_cfg + 2, ret);\n+\t\tif (!ret && (val & BIT(4)))\n+\t\t\tbreak;\n+\t}\n+\n+\tif (!*ret)\n+\t\tval = rtw_sdio_readl(rtwsdio, reg_data, ret);\n+\n+\treturn val;\n+}\n+\n+static u8 rtw_sdio_read8(struct rtw_dev *rtwdev, u32 addr)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tbool direct, bus_claim;\n+\tint ret;\n+\tu8 val;\n+\n+\tbus_claim = rtw_sdio_bus_claim_needed(rtwsdio);\n+\tdirect = rtw_sdio_is_bus_addr(addr);\n+\n+\tif (bus_claim)\n+\t\tsdio_claim_host(rtwsdio->sdio_func);\n+\n+\tif (direct) {\n+\t\taddr = rtw_sdio_to_bus_offset(rtwdev, addr);\n+\t\tval = sdio_readb(rtwsdio->sdio_func, addr, &ret);\n+\t} else {\n+\t\tval = rtw_sdio_read_indirect8(rtwdev, addr, &ret);\n+\t}\n+\n+\tif (bus_claim)\n+\t\tsdio_release_host(rtwsdio->sdio_func);\n+\n+\tif (ret)\n+\t\trtw_warn(rtwdev, \"sdio read8 failed (0x%x): %d\", addr, ret);\n+\n+\treturn val;\n+}\n+\n+static u16 rtw_sdio_read16(struct rtw_dev *rtwdev, u32 addr)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tbool direct, bus_claim;\n+\tu8 buf[2];\n+\tint ret;\n+\tu16 val;\n+\n+\tbus_claim = rtw_sdio_bus_claim_needed(rtwsdio);\n+\tdirect = rtw_sdio_is_bus_addr(addr);\n+\n+\tif (bus_claim)\n+\t\tsdio_claim_host(rtwsdio->sdio_func);\n+\n+\tif (direct) {\n+\t\taddr = rtw_sdio_to_bus_offset(rtwdev, addr);\n+\t\tbuf[0] = sdio_readb(rtwsdio->sdio_func, addr, &ret);\n+\t\tif (!ret)\n+\t\t\tbuf[1] = sdio_readb(rtwsdio->sdio_func, addr + 1, &ret);\n+\t\tval = le16_to_cpu(*(__le16 *)buf);\n+\t} else if (addr & 1) {\n+\t\tret = rtw_sdio_read_indirect_bytes(rtwdev, addr, buf, 2);\n+\t\tval = le16_to_cpu(*(__le16 *)buf);\n+\t} else {\n+\t\tval = rtw_sdio_read_indirect32(rtwdev, addr, &ret);\n+\t}\n+\n+\tif (bus_claim)\n+\t\tsdio_release_host(rtwsdio->sdio_func);\n+\n+\tif (ret)\n+\t\trtw_warn(rtwdev, \"sdio read16 failed (0x%x): %d\", addr, ret);\n+\n+\treturn val;\n+}\n+\n+static u32 rtw_sdio_read32(struct rtw_dev *rtwdev, u32 addr)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tbool direct, bus_claim;\n+\tu8 buf[4];\n+\tu32 val;\n+\tint ret;\n+\n+\tbus_claim = rtw_sdio_bus_claim_needed(rtwsdio);\n+\tdirect = rtw_sdio_is_bus_addr(addr);\n+\n+\tif (bus_claim)\n+\t\tsdio_claim_host(rtwsdio->sdio_func);\n+\n+\tif (direct) {\n+\t\taddr = rtw_sdio_to_bus_offset(rtwdev, addr);\n+\t\tval = rtw_sdio_readl(rtwsdio, addr, &ret);\n+\t} else if (addr & 3) {\n+\t\tret = rtw_sdio_read_indirect_bytes(rtwdev, addr, buf, 4);\n+\t\tval = le32_to_cpu(*(__le32 *)buf);\n+\t} else {\n+\t\tval = rtw_sdio_read_indirect32(rtwdev, addr, &ret);\n+\t}\n+\n+\tif (bus_claim)\n+\t\tsdio_release_host(rtwsdio->sdio_func);\n+\n+\tif (ret)\n+\t\trtw_warn(rtwdev, \"sdio read32 failed (0x%x): %d\", addr, ret);\n+\n+\treturn val;\n+}\n+\n+static u32 rtw_sdio_to_write_address(struct rtw_dev *rtwdev, u32 addr)\n+{\n+\tif (!rtw_sdio_is_bus_addr(addr))\n+\t\taddr |= WLAN_IOREG_OFFSET;\n+\n+\treturn rtw_sdio_to_bus_offset(rtwdev, addr);\n+}\n+\n+static void rtw_sdio_write8(struct rtw_dev *rtwdev, u32 addr, u8 val)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tbool bus_claim;\n+\tint ret;\n+\n+\taddr = rtw_sdio_to_write_address(rtwdev, addr);\n+\tbus_claim = rtw_sdio_bus_claim_needed(rtwsdio);\n+\n+\tif (bus_claim)\n+\t\tsdio_claim_host(rtwsdio->sdio_func);\n+\n+\tsdio_writeb(rtwsdio->sdio_func, val, addr, &ret);\n+\n+\tif (bus_claim)\n+\t\tsdio_release_host(rtwsdio->sdio_func);\n+\n+\tif (ret)\n+\t\trtw_warn(rtwdev, \"sdio write8 failed (0x%x): %d\", addr, ret);\n+}\n+\n+static void rtw_sdio_write16(struct rtw_dev *rtwdev, u32 addr, u16 val)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tbool bus_claim;\n+\tint ret;\n+\n+\taddr = rtw_sdio_to_write_address(rtwdev, addr);\n+\tbus_claim = rtw_sdio_bus_claim_needed(rtwsdio);\n+\n+\tif (bus_claim)\n+\t\tsdio_claim_host(rtwsdio->sdio_func);\n+\n+\tsdio_writeb(rtwsdio->sdio_func, val, addr, &ret);\n+\tif (!ret)\n+\t\tsdio_writeb(rtwsdio->sdio_func, val >> 8, addr + 1, &ret);\n+\n+\tif (bus_claim)\n+\t\tsdio_release_host(rtwsdio->sdio_func);\n+\n+\tif (ret)\n+\t\trtw_warn(rtwdev, \"sdio write16 failed (0x%x): %d\", addr, ret);\n+}\n+\n+static void rtw_sdio_write32(struct rtw_dev *rtwdev, u32 addr, u32 val)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tbool bus_claim;\n+\tint ret;\n+\n+\taddr = rtw_sdio_to_write_address(rtwdev, addr);\n+\tbus_claim = rtw_sdio_bus_claim_needed(rtwsdio);\n+\n+\tif (bus_claim)\n+\t\tsdio_claim_host(rtwsdio->sdio_func);\n+\n+\trtw_sdio_writel(rtwsdio, val, addr, &ret);\n+\n+\tif (bus_claim)\n+\t\tsdio_release_host(rtwsdio->sdio_func);\n+\n+\tif (ret)\n+\t\trtw_warn(rtwdev, \"sdio write32 failed (0x%x): %d\", addr, ret);\n+}\n+\n+static u32 rtw_sdio_get_tx_addr(struct rtw_dev *rtwdev, size_t size,\n+\t\t\t\tenum rtw_tx_queue_type queue)\n+{\n+\tu32 txaddr;\n+\n+\tswitch (queue) {\n+\tcase RTW_TX_QUEUE_BCN:\n+\tcase RTW_TX_QUEUE_H2C:\n+\tcase RTW_TX_QUEUE_HI0:\n+\t\ttxaddr = FIELD_PREP(REG_SDIO_CMD_ADDR_MSK,\n+\t\t\t\t    REG_SDIO_CMD_ADDR_TXFF_HIGH);\n+\t\tbreak;\n+\tcase RTW_TX_QUEUE_VI:\n+\tcase RTW_TX_QUEUE_VO:\n+\t\ttxaddr = FIELD_PREP(REG_SDIO_CMD_ADDR_MSK,\n+\t\t\t\t    REG_SDIO_CMD_ADDR_TXFF_NORMAL);\n+\t\tbreak;\n+\tcase RTW_TX_QUEUE_BE:\n+\tcase RTW_TX_QUEUE_BK:\n+\t\ttxaddr = FIELD_PREP(REG_SDIO_CMD_ADDR_MSK,\n+\t\t\t\t    REG_SDIO_CMD_ADDR_TXFF_LOW);\n+\t\tbreak;\n+\tcase RTW_TX_QUEUE_MGMT:\n+\t\ttxaddr = FIELD_PREP(REG_SDIO_CMD_ADDR_MSK,\n+\t\t\t\t    REG_SDIO_CMD_ADDR_TXFF_EXTRA);\n+\t\tbreak;\n+\tdefault:\n+\t\trtw_warn(rtwdev, \"Unsupported queue for TX addr: 0x%02x\\n\",\n+\t\t\t queue);\n+\t\treturn 0;\n+\t}\n+\n+\ttxaddr += DIV_ROUND_UP(size, 4);\n+\n+\treturn txaddr;\n+};\n+\n+static int rtw_sdio_read_port(struct rtw_dev *rtwdev, u8 *buf, size_t count)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tu32 rxaddr = rtwsdio->rx_addr++;\n+\tint ret;\n+\n+\tret = sdio_memcpy_fromio(rtwsdio->sdio_func, buf,\n+\t\t\t\t RTW_SDIO_ADDR_RX_RX0FF_GEN(rxaddr), count);\n+\tif (ret)\n+\t\trtw_warn(rtwdev,\n+\t\t\t \"Failed to read %lu byte(s) from SDIO port 0x%08x\",\n+\t\t\t count, rxaddr);\n+\n+\treturn ret;\n+}\n+\n+static int rtw_sdio_check_free_txpg(struct rtw_dev *rtwdev, u8 queue,\n+\t\t\t\t    size_t count)\n+{\n+\tunsigned int pages_free, pages_needed;\n+\n+\tif (rtw_chip_wcpu_11n(rtwdev)) {\n+\t\tu32 free_txpg;\n+\n+\t\tfree_txpg = rtw_sdio_read32(rtwdev, REG_SDIO_FREE_TXPG);\n+\n+\t\tswitch (queue) {\n+\t\tcase RTW_TX_QUEUE_BCN:\n+\t\tcase RTW_TX_QUEUE_H2C:\n+\t\tcase RTW_TX_QUEUE_HI0:\n+\t\tcase RTW_TX_QUEUE_MGMT:\n+\t\t\t/* high */\n+\t\t\tpages_free = free_txpg & 0xff;\n+\t\t\tbreak;\n+\t\tcase RTW_TX_QUEUE_VI:\n+\t\tcase RTW_TX_QUEUE_VO:\n+\t\t\t/* normal */\n+\t\t\tpages_free = (free_txpg >> 8) & 0xff;\n+\t\t\tbreak;\n+\t\tcase RTW_TX_QUEUE_BE:\n+\t\tcase RTW_TX_QUEUE_BK:\n+\t\t\t/* low */\n+\t\t\tpages_free = (free_txpg >> 16) & 0xff;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\trtw_warn(rtwdev, \"Unknown mapping for queue %u\\n\", queue);\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\t/* add the pages from the public queue */\n+\t\tpages_free += (free_txpg >> 24) & 0xff;\n+\t} else {\n+\t\tu32 free_txpg[3];\n+\n+\t\tfree_txpg[0] = rtw_sdio_read32(rtwdev, REG_SDIO_FREE_TXPG);\n+\t\tfree_txpg[1] = rtw_sdio_read32(rtwdev, REG_SDIO_FREE_TXPG + 4);\n+\t\tfree_txpg[2] = rtw_sdio_read32(rtwdev, REG_SDIO_FREE_TXPG + 8);\n+\n+\t\tswitch (queue) {\n+\t\tcase RTW_TX_QUEUE_BCN:\n+\t\tcase RTW_TX_QUEUE_H2C:\n+\t\tcase RTW_TX_QUEUE_HI0:\n+\t\t\t/* high */\n+\t\t\tpages_free = free_txpg[0] & 0xfff;\n+\t\t\tbreak;\n+\t\tcase RTW_TX_QUEUE_VI:\n+\t\tcase RTW_TX_QUEUE_VO:\n+\t\t\t/* normal */\n+\t\t\tpages_free = (free_txpg[0] >> 16) & 0xfff;\n+\t\t\tbreak;\n+\t\tcase RTW_TX_QUEUE_BE:\n+\t\tcase RTW_TX_QUEUE_BK:\n+\t\t\t/* low */\n+\t\t\tpages_free = free_txpg[1] & 0xfff;\n+\t\t\tbreak;\n+\t\tcase RTW_TX_QUEUE_MGMT:\n+\t\t\t/* extra */\n+\t\t\tpages_free = free_txpg[2] & 0xfff;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\trtw_warn(rtwdev, \"Unknown mapping for queue %u\\n\", queue);\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n+\t\t/* add the pages from the public queue */\n+\t\tpages_free += (free_txpg[1] >> 16) & 0xfff;\n+\t}\n+\n+\tpages_needed = DIV_ROUND_UP(count, rtwdev->chip->page_size);\n+\n+\tif (pages_needed > pages_free) {\n+\t\trtw_dbg(rtwdev, RTW_DBG_SDIO,\n+\t\t\t\"Not enough free pages (%u needed, %u free) in queue %u for %zu bytes\\n\",\n+\t\t\tpages_needed, pages_free, queue, count);\n+\t\treturn -EBUSY;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int rtw_sdio_write_port(struct rtw_dev *rtwdev, struct sk_buff *skb,\n+\t\t\t       enum rtw_tx_queue_type queue)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tbool bus_claim;\n+\tsize_t txsize;\n+\tu32 txaddr;\n+\tint ret;\n+\n+\ttxaddr = rtw_sdio_get_tx_addr(rtwdev, skb->len, queue);\n+\tif (!txaddr)\n+\t\treturn -EINVAL;\n+\n+\ttxsize = sdio_align_size(rtwsdio->sdio_func, skb->len);\n+\n+\tret = rtw_sdio_check_free_txpg(rtwdev, queue, txsize);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tif (!IS_ALIGNED((unsigned long)skb->data, RTW_SDIO_DATA_PTR_ALIGN))\n+\t\trtw_warn(rtwdev, \"Got unaligned SKB in %s() for queue %u\\n\",\n+\t\t\t __func__, queue);\n+\n+\tbus_claim = rtw_sdio_bus_claim_needed(rtwsdio);\n+\n+\tif (bus_claim)\n+\t\tsdio_claim_host(rtwsdio->sdio_func);\n+\n+\tret = sdio_memcpy_toio(rtwsdio->sdio_func, txaddr, skb->data, txsize);\n+\n+\tif (bus_claim)\n+\t\tsdio_release_host(rtwsdio->sdio_func);\n+\n+\tif (ret)\n+\t\trtw_warn(rtwdev,\n+\t\t\t \"Failed to write %lu byte(s) to SDIO port 0x%08x\",\n+\t\t\t txsize, txaddr);\n+\n+\treturn ret;\n+}\n+\n+static void rtw_sdio_init(struct rtw_dev *rtwdev)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\n+\trtwsdio->irq_mask = REG_SDIO_HIMR_RX_REQUEST | REG_SDIO_HIMR_CPWM1;\n+}\n+\n+static void rtw_sdio_rx_aggregation(struct rtw_dev *rtwdev, bool enable)\n+{\n+\tu8 size, timeout;\n+\n+\tif (enable) {\n+\t\tif (rtwdev->chip->id == RTW_CHIP_TYPE_8822C) {\n+\t\t\tsize = 0xff;\n+\t\t\ttimeout = 0x20;\n+\t\t} else {\n+\t\t\tsize = 0x6;\n+\t\t\ttimeout = 0x6;\n+\t\t}\n+\n+\t\t/* Make the firmware honor the size limit configured below */\n+\t\trtw_write32_set(rtwdev, REG_RXDMA_AGG_PG_TH, BIT_EN_PRE_CALC);\n+\n+\t\trtw_write8_set(rtwdev, REG_TXDMA_PQ_MAP, BIT_RXDMA_AGG_EN);\n+\n+\t\trtw_write16(rtwdev, REG_RXDMA_AGG_PG_TH, size |\n+\t\t\t    (timeout << BIT_SHIFT_DMA_AGG_TO_V1));\n+\n+\t\trtw_write8_set(rtwdev, REG_RXDMA_MODE, BIT_DMA_MODE);\n+\t} else {\n+\t\trtw_write32_clr(rtwdev, REG_RXDMA_AGG_PG_TH, BIT_EN_PRE_CALC);\n+\t\trtw_write8_clr(rtwdev, REG_TXDMA_PQ_MAP, BIT_RXDMA_AGG_EN);\n+\t\trtw_write8_clr(rtwdev, REG_RXDMA_MODE, BIT_DMA_MODE);\n+\t}\n+}\n+\n+static void rtw_sdio_enable_interrupt(struct rtw_dev *rtwdev)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\n+\trtw_write32(rtwdev, REG_SDIO_HIMR, rtwsdio->irq_mask);\n+}\n+\n+static void rtw_sdio_disable_interrupt(struct rtw_dev *rtwdev)\n+{\n+\trtw_write32(rtwdev, REG_SDIO_HIMR, 0x0);\n+}\n+\n+static u8 rtw_sdio_get_tx_qsel(struct rtw_dev *rtwdev, struct sk_buff *skb,\n+\t\t\t       u8 queue)\n+{\n+\tswitch (queue) {\n+\tcase RTW_TX_QUEUE_BCN:\n+\t\treturn TX_DESC_QSEL_BEACON;\n+\tcase RTW_TX_QUEUE_H2C:\n+\t\treturn TX_DESC_QSEL_H2C;\n+\tcase RTW_TX_QUEUE_MGMT:\n+\t\tif (rtw_chip_wcpu_11n(rtwdev))\n+\t\t\treturn TX_DESC_QSEL_HIGH;\n+\t\telse\n+\t\t\treturn TX_DESC_QSEL_MGMT;\n+\tcase RTW_TX_QUEUE_HI0:\n+\t\treturn TX_DESC_QSEL_HIGH;\n+\tdefault:\n+\t\treturn skb->priority;\n+\t}\n+};\n+\n+static int rtw_sdio_setup(struct rtw_dev *rtwdev)\n+{\n+\t/* nothing to do */\n+\treturn 0;\n+}\n+\n+static int rtw_sdio_start(struct rtw_dev *rtwdev)\n+{\n+\trtw_sdio_rx_aggregation(rtwdev, false);\n+\trtw_sdio_enable_interrupt(rtwdev);\n+\n+\treturn 0;\n+}\n+\n+static void rtw_sdio_stop(struct rtw_dev *rtwdev)\n+{\n+\trtw_sdio_disable_interrupt(rtwdev);\n+}\n+\n+static void rtw_sdio_deep_ps_enter(struct rtw_dev *rtwdev)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tbool tx_empty = true;\n+\tu8 queue;\n+\n+\tif (!rtw_fw_feature_check(&rtwdev->fw, FW_FEATURE_TX_WAKE)) {\n+\t\t/* Deep PS state is not allowed to TX-DMA */\n+\t\tfor (queue = 0; queue < RTK_MAX_TX_QUEUE_NUM; queue++) {\n+\t\t\t/* BCN queue is rsvd page, does not have DMA interrupt\n+\t\t\t * H2C queue is managed by firmware\n+\t\t\t */\n+\t\t\tif (queue == RTW_TX_QUEUE_BCN ||\n+\t\t\t    queue == RTW_TX_QUEUE_H2C)\n+\t\t\t\tcontinue;\n+\n+\t\t\t/* check if there is any skb DMAing */\n+\t\t\tif (skb_queue_len(&rtwsdio->tx_queue[queue])) {\n+\t\t\t\ttx_empty = false;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\tif (!tx_empty) {\n+\t\trtw_dbg(rtwdev, RTW_DBG_PS,\n+\t\t\t\"TX path not empty, cannot enter deep power save state\\n\");\n+\t\treturn;\n+\t}\n+\n+\tset_bit(RTW_FLAG_LEISURE_PS_DEEP, rtwdev->flags);\n+\trtw_power_mode_change(rtwdev, true);\n+}\n+\n+static void rtw_sdio_deep_ps_leave(struct rtw_dev *rtwdev)\n+{\n+\tif (test_and_clear_bit(RTW_FLAG_LEISURE_PS_DEEP, rtwdev->flags))\n+\t\trtw_power_mode_change(rtwdev, false);\n+}\n+\n+static void rtw_sdio_deep_ps(struct rtw_dev *rtwdev, bool enter)\n+{\n+\tif (enter && !test_bit(RTW_FLAG_LEISURE_PS_DEEP, rtwdev->flags))\n+\t\trtw_sdio_deep_ps_enter(rtwdev);\n+\n+\tif (!enter && test_bit(RTW_FLAG_LEISURE_PS_DEEP, rtwdev->flags))\n+\t\trtw_sdio_deep_ps_leave(rtwdev);\n+}\n+\n+static void rtw_sdio_tx_kick_off(struct rtw_dev *rtwdev)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\n+\tqueue_work(rtwsdio->txwq, &rtwsdio->tx_handler_data->work);\n+}\n+\n+static void rtw_sdio_link_ps(struct rtw_dev *rtwdev, bool enter)\n+{\n+\t/* nothing to do */\n+}\n+\n+static void rtw_sdio_interface_cfg(struct rtw_dev *rtwdev)\n+{\n+\tu32 val;\n+\n+\trtw_read32(rtwdev, REG_SDIO_FREE_TXPG);\n+\n+\tval = rtw_read32(rtwdev, REG_SDIO_TX_CTRL);\n+\tval &= 0xfff8;\n+\trtw_write32(rtwdev, REG_SDIO_TX_CTRL, val);\n+}\n+\n+static void rtw_sdio_power_switch(struct rtw_dev *rtwdev, bool on)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\n+\trtwsdio->is_powered_on = on;\n+}\n+\n+static struct rtw_sdio_tx_data *rtw_sdio_get_tx_data(struct sk_buff *skb)\n+{\n+\tstruct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);\n+\n+\tBUILD_BUG_ON(sizeof(struct rtw_sdio_tx_data) >\n+\t\t     sizeof(info->status.status_driver_data));\n+\n+\treturn (struct rtw_sdio_tx_data *)info->status.status_driver_data;\n+}\n+\n+static void rtw_sdio_tx_skb_prepare(struct rtw_dev *rtwdev,\n+\t\t\t\t    struct rtw_tx_pkt_info *pkt_info,\n+\t\t\t\t    struct sk_buff *skb,\n+\t\t\t\t    enum rtw_tx_queue_type queue)\n+{\n+\tconst struct rtw_chip_info *chip = rtwdev->chip;\n+\tunsigned long data_addr, aligned_addr;\n+\tsize_t offset;\n+\tu8 *pkt_desc;\n+\n+\tpkt_desc = skb_push(skb, chip->tx_pkt_desc_sz);\n+\n+\tdata_addr = (unsigned long)pkt_desc;\n+\taligned_addr = ALIGN(data_addr, RTW_SDIO_DATA_PTR_ALIGN);\n+\n+\tif (data_addr != aligned_addr) {\n+\t\t/* Ensure that the start of the pkt_desc is always aligned at\n+\t\t * RTW_SDIO_DATA_PTR_ALIGN.\n+\t\t */\n+\t\toffset = RTW_SDIO_DATA_PTR_ALIGN - (aligned_addr - data_addr);\n+\n+\t\tpkt_desc = skb_push(skb, offset);\n+\n+\t\t/* By inserting padding to align the start of the pkt_desc we\n+\t\t * need to inform the firmware that the actual data starts at\n+\t\t * a different offset than normal.\n+\t\t */\n+\t\tpkt_info->offset += offset;\n+\t}\n+\n+\tmemset(pkt_desc, 0, chip->tx_pkt_desc_sz);\n+\n+\tpkt_info->qsel = rtw_sdio_get_tx_qsel(rtwdev, skb, queue);\n+\n+\trtw_tx_fill_tx_desc(pkt_info, skb);\n+\tchip->ops->fill_txdesc_checksum(rtwdev, pkt_info, pkt_desc);\n+}\n+\n+static int rtw_sdio_write_data(struct rtw_dev *rtwdev,\n+\t\t\t       struct rtw_tx_pkt_info *pkt_info,\n+\t\t\t       struct sk_buff *skb,\n+\t\t\t       enum rtw_tx_queue_type queue)\n+{\n+\tint ret;\n+\n+\trtw_sdio_tx_skb_prepare(rtwdev, pkt_info, skb, queue);\n+\n+\tret = rtw_sdio_write_port(rtwdev, skb, queue);\n+\tdev_kfree_skb_any(skb);\n+\n+\treturn ret;\n+}\n+\n+static int rtw_sdio_write_data_rsvd_page(struct rtw_dev *rtwdev, u8 *buf,\n+\t\t\t\t\t u32 size)\n+{\n+\tstruct rtw_tx_pkt_info pkt_info = {};\n+\tstruct sk_buff *skb;\n+\n+\tskb = rtw_tx_write_data_rsvd_page_get(rtwdev, &pkt_info, buf, size);\n+\tif (!skb)\n+\t\treturn -ENOMEM;\n+\n+\treturn rtw_sdio_write_data(rtwdev, &pkt_info, skb, RTW_TX_QUEUE_BCN);\n+}\n+\n+static int rtw_sdio_write_data_h2c(struct rtw_dev *rtwdev, u8 *buf, u32 size)\n+{\n+\tstruct rtw_tx_pkt_info pkt_info = {};\n+\tstruct sk_buff *skb;\n+\n+\tskb = rtw_tx_write_data_h2c_get(rtwdev, &pkt_info, buf, size);\n+\tif (!skb)\n+\t\treturn -ENOMEM;\n+\n+\treturn rtw_sdio_write_data(rtwdev, &pkt_info, skb, RTW_TX_QUEUE_H2C);\n+}\n+\n+static int rtw_sdio_tx_write(struct rtw_dev *rtwdev,\n+\t\t\t     struct rtw_tx_pkt_info *pkt_info,\n+\t\t\t     struct sk_buff *skb)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tenum rtw_tx_queue_type queue = rtw_tx_queue_mapping(skb);\n+\tstruct rtw_sdio_tx_data *tx_data;\n+\n+\trtw_sdio_tx_skb_prepare(rtwdev, pkt_info, skb, queue);\n+\n+\ttx_data = rtw_sdio_get_tx_data(skb);\n+\ttx_data->sn = pkt_info->sn;\n+\n+\tskb_queue_tail(&rtwsdio->tx_queue[queue], skb);\n+\n+\treturn 0;\n+}\n+\n+static void rtw_sdio_tx_err_isr(struct rtw_dev *rtwdev)\n+{\n+\tu32 val = rtw_read32(rtwdev, REG_TXDMA_STATUS);\n+\n+\trtw_write32(rtwdev, REG_TXDMA_STATUS, val);\n+}\n+\n+static void rtw_sdio_rx_skb(struct rtw_dev *rtwdev, struct sk_buff *skb,\n+\t\t\t    u32 pkt_offset, struct rtw_rx_pkt_stat *pkt_stat,\n+\t\t\t    struct ieee80211_rx_status *rx_status)\n+{\n+\tmemcpy(IEEE80211_SKB_RXCB(skb), rx_status, sizeof(*rx_status));\n+\n+\tif (pkt_stat->is_c2h) {\n+\t\tskb_put(skb, pkt_stat->pkt_len + pkt_offset);\n+\t\trtw_fw_c2h_cmd_rx_irqsafe(rtwdev, pkt_offset, skb);\n+\t\treturn;\n+\t}\n+\n+\tskb_put(skb, pkt_stat->pkt_len);\n+\tskb_reserve(skb, pkt_offset);\n+\n+\trtw_rx_stats(rtwdev, pkt_stat->vif, skb);\n+\n+\tieee80211_rx_irqsafe(rtwdev->hw, skb);\n+}\n+\n+static void rtw_sdio_rxfifo_recv(struct rtw_dev *rtwdev, u32 rx_len)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tconst struct rtw_chip_info *chip = rtwdev->chip;\n+\tu32 pkt_desc_sz = chip->rx_pkt_desc_sz;\n+\tstruct ieee80211_rx_status rx_status;\n+\tstruct rtw_rx_pkt_stat pkt_stat;\n+\tstruct sk_buff *skb, *split_skb;\n+\tu32 pkt_offset, curr_pkt_len;\n+\tsize_t bufsz;\n+\tu8 *rx_desc;\n+\tint ret;\n+\n+\tbufsz = sdio_align_size(rtwsdio->sdio_func, rx_len);\n+\n+\tskb = dev_alloc_skb(bufsz);\n+\tif (!skb)\n+\t\treturn;\n+\n+\tret = rtw_sdio_read_port(rtwdev, skb->data, bufsz);\n+\tif (ret) {\n+\t\tdev_kfree_skb_any(skb);\n+\t\treturn;\n+\t}\n+\n+\twhile (true) {\n+\t\trx_desc = skb->data;\n+\t\tchip->ops->query_rx_desc(rtwdev, rx_desc, &pkt_stat,\n+\t\t\t\t\t &rx_status);\n+\t\tpkt_offset = pkt_desc_sz + pkt_stat.drv_info_sz +\n+\t\t\t     pkt_stat.shift;\n+\n+\t\tcurr_pkt_len = ALIGN(pkt_offset + pkt_stat.pkt_len,\n+\t\t\t\t     RTW_SDIO_DATA_PTR_ALIGN);\n+\n+\t\tif ((curr_pkt_len + pkt_desc_sz) >= rx_len) {\n+\t\t\t/* Use the original skb (with it's adjusted offset)\n+\t\t\t * when processing the last (or even the only) entry to\n+\t\t\t * have it's memory freed automatically.\n+\t\t\t */\n+\t\t\trtw_sdio_rx_skb(rtwdev, skb, pkt_offset, &pkt_stat,\n+\t\t\t\t\t&rx_status);\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tsplit_skb = dev_alloc_skb(curr_pkt_len);\n+\t\tif (!split_skb) {\n+\t\t\trtw_sdio_rx_skb(rtwdev, skb, pkt_offset, &pkt_stat,\n+\t\t\t\t\t&rx_status);\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tskb_copy_header(split_skb, skb);\n+\t\tmemcpy(split_skb->data, skb->data, curr_pkt_len);\n+\n+\t\trtw_sdio_rx_skb(rtwdev, split_skb, pkt_offset, &pkt_stat,\n+\t\t\t\t&rx_status);\n+\n+\t\t/* Move to the start of the next RX descriptor */\n+\t\tskb_reserve(skb, curr_pkt_len);\n+\t\trx_len -= curr_pkt_len;\n+\t}\n+}\n+\n+static void rtw_sdio_rx_isr(struct rtw_dev *rtwdev)\n+{\n+\tu32 rx_len;\n+\n+\twhile (true) {\n+\t\tif (rtw_chip_wcpu_11n(rtwdev))\n+\t\t\trx_len = rtw_read16(rtwdev, REG_SDIO_RX0_REQ_LEN);\n+\t\telse\n+\t\t\trx_len = rtw_read32(rtwdev, REG_SDIO_RX0_REQ_LEN);\n+\n+\t\tif (!rx_len)\n+\t\t\tbreak;\n+\n+\t\trtw_sdio_rxfifo_recv(rtwdev, rx_len);\n+\t}\n+}\n+\n+static void rtw_sdio_handle_interrupt(struct sdio_func *sdio_func)\n+{\n+\tstruct ieee80211_hw *hw = sdio_get_drvdata(sdio_func);\n+\tstruct rtw_dev *rtwdev = hw->priv;\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tu32 hisr;\n+\n+\trtwsdio->irq_thread = current;\n+\n+\thisr = rtw_read32(rtwdev, REG_SDIO_HISR);\n+\n+\tif (hisr & REG_SDIO_HISR_TXERR)\n+\t\trtw_sdio_tx_err_isr(rtwdev);\n+\tif (hisr & REG_SDIO_HISR_RX_REQUEST) {\n+\t\thisr &= ~REG_SDIO_HISR_RX_REQUEST;\n+\t\trtw_sdio_rx_isr(rtwdev);\n+\t}\n+\n+\trtw_write32(rtwdev, REG_SDIO_HISR, hisr);\n+\n+\trtwsdio->irq_thread = NULL;\n+}\n+\n+static int __maybe_unused rtw_sdio_suspend(struct device *dev)\n+{\n+\treturn 0;\n+}\n+\n+static int __maybe_unused rtw_sdio_resume(struct device *dev)\n+{\n+\treturn 0;\n+}\n+\n+SIMPLE_DEV_PM_OPS(rtw_sdio_pm_ops, rtw_sdio_suspend, rtw_sdio_resume);\n+EXPORT_SYMBOL(rtw_sdio_pm_ops);\n+\n+static int rtw_sdio_claim(struct rtw_dev *rtwdev, struct sdio_func *sdio_func)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tint ret;\n+\n+\tsdio_claim_host(sdio_func);\n+\n+\tret = sdio_enable_func(sdio_func);\n+\tif (ret) {\n+\t\trtw_err(rtwdev, \"Failed to enable SDIO func\");\n+\t\tgoto err_release_host;\n+\t}\n+\n+\tret = sdio_set_block_size(sdio_func, RTW_SDIO_BLOCK_SIZE);\n+\tif (ret) {\n+\t\trtw_err(rtwdev, \"Failed to set SDIO block size to 512\");\n+\t\tgoto err_disable_func;\n+\t}\n+\n+\trtwsdio->sdio_func = sdio_func;\n+\n+\trtwsdio->sdio3_bus_mode = mmc_card_uhs(sdio_func->card);\n+\n+\tsdio_set_drvdata(sdio_func, rtwdev->hw);\n+\tSET_IEEE80211_DEV(rtwdev->hw, &sdio_func->dev);\n+\n+\tsdio_release_host(sdio_func);\n+\n+\treturn 0;\n+\n+err_disable_func:\n+\tsdio_disable_func(sdio_func);\n+err_release_host:\n+\tsdio_release_host(sdio_func);\n+\treturn ret;\n+}\n+\n+static void rtw_sdio_declaim(struct rtw_dev *rtwdev,\n+\t\t\t     struct sdio_func *sdio_func)\n+{\n+\tsdio_claim_host(sdio_func);\n+\tsdio_disable_func(sdio_func);\n+\tsdio_release_host(sdio_func);\n+}\n+\n+static struct rtw_hci_ops rtw_sdio_ops = {\n+\t.tx_write = rtw_sdio_tx_write,\n+\t.tx_kick_off = rtw_sdio_tx_kick_off,\n+\t.setup = rtw_sdio_setup,\n+\t.start = rtw_sdio_start,\n+\t.stop = rtw_sdio_stop,\n+\t.deep_ps = rtw_sdio_deep_ps,\n+\t.link_ps = rtw_sdio_link_ps,\n+\t.interface_cfg = rtw_sdio_interface_cfg,\n+\n+\t.power_switch = rtw_sdio_power_switch,\n+\n+\t.read8 = rtw_sdio_read8,\n+\t.read16 = rtw_sdio_read16,\n+\t.read32 = rtw_sdio_read32,\n+\t.write8 = rtw_sdio_write8,\n+\t.write16 = rtw_sdio_write16,\n+\t.write32 = rtw_sdio_write32,\n+\t.write_data_rsvd_page = rtw_sdio_write_data_rsvd_page,\n+\t.write_data_h2c = rtw_sdio_write_data_h2c,\n+};\n+\n+static int rtw_sdio_request_irq(struct rtw_dev *rtwdev,\n+\t\t\t\tstruct sdio_func *sdio_func)\n+{\n+\tint ret;\n+\n+\tsdio_claim_host(sdio_func);\n+\tret = sdio_claim_irq(sdio_func, &rtw_sdio_handle_interrupt);\n+\tsdio_release_host(sdio_func);\n+\n+\tif (ret) {\n+\t\trtw_err(rtwdev, \"failed to claim SDIO IRQ\");\n+\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static void rtw_sdio_indicate_tx_status(struct rtw_dev *rtwdev,\n+\t\t\t\t\tstruct sk_buff *skb)\n+{\n+\tstruct rtw_sdio_tx_data *tx_data = rtw_sdio_get_tx_data(skb);\n+\tstruct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);\n+\tstruct ieee80211_hw *hw = rtwdev->hw;\n+\n+\t/* enqueue to wait for tx report */\n+\tif (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS) {\n+\t\trtw_tx_report_enqueue(rtwdev, skb, tx_data->sn);\n+\t\treturn;\n+\t}\n+\n+\t/* always ACK for others, then they won't be marked as drop */\n+\tieee80211_tx_info_clear_status(info);\n+\tif (info->flags & IEEE80211_TX_CTL_NO_ACK)\n+\t\tinfo->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED;\n+\telse\n+\t\tinfo->flags |= IEEE80211_TX_STAT_ACK;\n+\n+\tieee80211_tx_status_irqsafe(hw, skb);\n+}\n+\n+static void rtw_sdio_process_tx_queue(struct rtw_dev *rtwdev,\n+\t\t\t\t      enum rtw_tx_queue_type queue)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tstruct sk_buff *skb;\n+\tint ret;\n+\n+\twhile (true) {\n+\t\tskb = skb_dequeue(&rtwsdio->tx_queue[queue]);\n+\t\tif (!skb)\n+\t\t\tbreak;\n+\n+\t\tret = rtw_sdio_write_port(rtwdev, skb, queue);\n+\t\tif (ret) {\n+\t\t\tskb_queue_head(&rtwsdio->tx_queue[queue], skb);\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tif (queue <= RTW_TX_QUEUE_VO)\n+\t\t\trtw_sdio_indicate_tx_status(rtwdev, skb);\n+\t\telse\n+\t\t\tdev_kfree_skb_any(skb);\n+\t}\n+}\n+\n+static void rtw_sdio_tx_handler(struct work_struct *work)\n+{\n+\tstruct rtw_sdio_work_data *work_data =\n+\t\tcontainer_of(work, struct rtw_sdio_work_data, work);\n+\tstruct rtw_dev *rtwdev = work_data->rtwdev;\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tbool has_more_tx_data;\n+\tint queue;\n+\n+\tif (!rtw_fw_feature_check(&rtwdev->fw, FW_FEATURE_TX_WAKE))\n+\t\trtw_sdio_deep_ps_leave(rtwdev);\n+\n+\tdo {\n+\t\thas_more_tx_data = false;\n+\n+\t\tfor (queue = RTK_MAX_TX_QUEUE_NUM - 1; queue >= 0; queue--) {\n+\t\t\trtw_sdio_process_tx_queue(rtwdev, queue);\n+\n+\t\t\tif (!skb_queue_empty(&rtwsdio->tx_queue[queue]))\n+\t\t\t\thas_more_tx_data = true;\n+\t\t}\n+\t} while (has_more_tx_data);\n+}\n+\n+static void rtw_sdio_free_irq(struct rtw_dev *rtwdev,\n+\t\t\t      struct sdio_func *sdio_func)\n+{\n+\tsdio_release_irq(sdio_func);\n+}\n+\n+static int rtw_sdio_init_tx(struct rtw_dev *rtwdev)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tint i;\n+\n+\trtwsdio->txwq = create_singlethread_workqueue(\"rtw88_sdio: tx wq\");\n+\tif (!rtwsdio->txwq) {\n+\t\trtw_err(rtwdev, \"failed to create TX work queue\\n\");\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\tfor (i = 0; i < RTK_MAX_TX_QUEUE_NUM; i++)\n+\t\tskb_queue_head_init(&rtwsdio->tx_queue[i]);\n+\trtwsdio->tx_handler_data = kmalloc(sizeof(*rtwsdio->tx_handler_data),\n+\t\t\t\t\t   GFP_KERNEL);\n+\tif (!rtwsdio->tx_handler_data)\n+\t\tgoto err_destroy_wq;\n+\n+\trtwsdio->tx_handler_data->rtwdev = rtwdev;\n+\tINIT_WORK(&rtwsdio->tx_handler_data->work, rtw_sdio_tx_handler);\n+\n+\treturn 0;\n+\n+err_destroy_wq:\n+\tdestroy_workqueue(rtwsdio->txwq);\n+\treturn -ENOMEM;\n+}\n+\n+static void rtw_sdio_deinit_tx(struct rtw_dev *rtwdev)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\tint i;\n+\n+\tfor (i = 0; i < RTK_MAX_TX_QUEUE_NUM; i++)\n+\t\tskb_queue_purge(&rtwsdio->tx_queue[i]);\n+\n+\tflush_workqueue(rtwsdio->txwq);\n+\tdestroy_workqueue(rtwsdio->txwq);\n+\tkfree(rtwsdio->tx_handler_data);\n+}\n+\n+int rtw_sdio_probe(struct sdio_func *sdio_func,\n+\t\t   const struct sdio_device_id *id)\n+{\n+\tstruct ieee80211_hw *hw;\n+\tstruct rtw_dev *rtwdev;\n+\tint drv_data_size;\n+\tint ret;\n+\n+\tdrv_data_size = sizeof(struct rtw_dev) + sizeof(struct rtw_sdio);\n+\thw = ieee80211_alloc_hw(drv_data_size, &rtw_ops);\n+\tif (!hw) {\n+\t\tdev_err(&sdio_func->dev, \"failed to allocate hw\");\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\trtwdev = hw->priv;\n+\trtwdev->hw = hw;\n+\trtwdev->dev = &sdio_func->dev;\n+\trtwdev->chip = (struct rtw_chip_info *)id->driver_data;\n+\trtwdev->hci.ops = &rtw_sdio_ops;\n+\trtwdev->hci.type = RTW_HCI_TYPE_SDIO;\n+\n+\tret = rtw_core_init(rtwdev);\n+\tif (ret)\n+\t\tgoto err_release_hw;\n+\n+\trtw_dbg(rtwdev, RTW_DBG_SDIO,\n+\t\t\"rtw88 SDIO probe: vendor=0x%04x device=%04x class=%02x\",\n+\t\tid->vendor, id->device, id->class);\n+\n+\tret = rtw_sdio_claim(rtwdev, sdio_func);\n+\tif (ret) {\n+\t\trtw_err(rtwdev, \"failed to claim SDIO device\");\n+\t\tgoto err_deinit_core;\n+\t}\n+\n+\trtw_sdio_init(rtwdev);\n+\n+\tret = rtw_sdio_init_tx(rtwdev);\n+\tif (ret) {\n+\t\trtw_err(rtwdev, \"failed to init SDIO TX queue\\n\");\n+\t\tgoto err_sdio_declaim;\n+\t}\n+\n+\tret = rtw_chip_info_setup(rtwdev);\n+\tif (ret) {\n+\t\trtw_err(rtwdev, \"failed to setup chip information\");\n+\t\tgoto err_destroy_txwq;\n+\t}\n+\n+\tret = rtw_register_hw(rtwdev, hw);\n+\tif (ret) {\n+\t\trtw_err(rtwdev, \"failed to register hw\");\n+\t\tgoto err_destroy_txwq;\n+\t}\n+\n+\tret = rtw_sdio_request_irq(rtwdev, sdio_func);\n+\tif (ret)\n+\t\tgoto err_unregister_hw;\n+\n+\treturn 0;\n+\n+err_unregister_hw:\n+\trtw_unregister_hw(rtwdev, hw);\n+err_destroy_txwq:\n+\trtw_sdio_deinit_tx(rtwdev);\n+err_sdio_declaim:\n+\trtw_sdio_declaim(rtwdev, sdio_func);\n+err_deinit_core:\n+\trtw_core_deinit(rtwdev);\n+err_release_hw:\n+\tieee80211_free_hw(hw);\n+\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(rtw_sdio_probe);\n+\n+void rtw_sdio_remove(struct sdio_func *sdio_func)\n+{\n+\tstruct ieee80211_hw *hw = sdio_get_drvdata(sdio_func);\n+\tstruct rtw_dev *rtwdev;\n+\n+\tif (!hw)\n+\t\treturn;\n+\n+\trtwdev = hw->priv;\n+\n+\trtw_unregister_hw(rtwdev, hw);\n+\trtw_sdio_disable_interrupt(rtwdev);\n+\trtw_sdio_declaim(rtwdev, sdio_func);\n+\trtw_sdio_free_irq(rtwdev, sdio_func);\n+\trtw_sdio_deinit_tx(rtwdev);\n+\trtw_core_deinit(rtwdev);\n+\tieee80211_free_hw(hw);\n+}\n+EXPORT_SYMBOL(rtw_sdio_remove);\n+\n+void rtw_sdio_shutdown(struct device *dev)\n+{\n+\tstruct sdio_func *sdio_func = dev_to_sdio_func(dev);\n+\tstruct ieee80211_hw *hw = sdio_get_drvdata(sdio_func);\n+\tconst struct rtw_chip_info *chip;\n+\tstruct rtw_dev *rtwdev;\n+\n+\tif (!hw)\n+\t\treturn;\n+\n+\trtwdev = hw->priv;\n+\tchip = rtwdev->chip;\n+\n+\tif (chip->ops->shutdown)\n+\t\tchip->ops->shutdown(rtwdev);\n+}\n+EXPORT_SYMBOL(rtw_sdio_shutdown);\n+\n+MODULE_AUTHOR(\"Martin Blumenstingl\");\n+MODULE_AUTHOR(\"Jernej Skrabec\");\n+MODULE_DESCRIPTION(\"Realtek 802.11ac wireless SDIO driver\");\n+MODULE_LICENSE(\"Dual BSD/GPL\");\ndiff --git a/drivers/net/wireless/realtek/rtw88/sdio.h b/drivers/net/wireless/realtek/rtw88/sdio.h\nnew file mode 100644\nindex 000000000000..7339e35f808a\n--- /dev/null\n+++ b/drivers/net/wireless/realtek/rtw88/sdio.h\n@@ -0,0 +1,175 @@\n+/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */\n+/* Copyright (C) 2021 Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n+ * Copyright (C) 2021 Jernej Skrabec <jernej.skrabec@gmail.com>\n+ */\n+\n+#ifndef __REG_SDIO_H_\n+#define __REG_SDIO_H_\n+\n+#include \"main.h\"\n+\n+/* I/O bus domain address mapping */\n+#define SDIO_LOCAL_OFFSET\t\t\t0x10250000\n+#define WLAN_IOREG_OFFSET\t\t\t0x10260000\n+#define FIRMWARE_FIFO_OFFSET\t\t\t0x10270000\n+#define TX_HIQ_OFFSET\t\t\t\t0x10310000\n+#define TX_MIQ_OFFSET\t\t\t\t0x10320000\n+#define TX_LOQ_OFFSET\t\t\t\t0x10330000\n+#define TX_EPQ_OFFSET\t\t\t\t0x10350000\n+#define RX_RX0FF_OFFSET\t\t\t\t0x10340000\n+\n+#define RTW_SDIO_BUS_MSK\t\t\t0xffff0000\n+#define SDIO_LOCAL_REG_MSK\t\t\t0x00000fff\n+#define WLAN_IOREG_REG_MSK\t\t\t0x0000ffff\n+\n+/* SDIO Tx Control */\n+#define REG_SDIO_TX_CTRL\t\t\t(SDIO_LOCAL_OFFSET + 0x0000)\n+\n+/*SDIO status timeout*/\n+#define REG_SDIO_TIMEOUT\t\t\t(SDIO_LOCAL_OFFSET + 0x0002)\n+\n+/* SDIO Host Interrupt Mask */\n+#define REG_SDIO_HIMR\t\t\t\t(SDIO_LOCAL_OFFSET + 0x0014)\n+#define REG_SDIO_HIMR_RX_REQUEST\t\tBIT(0)\n+#define REG_SDIO_HIMR_AVAL\t\t\tBIT(1)\n+#define REG_SDIO_HIMR_TXERR\t\t\tBIT(2)\n+#define REG_SDIO_HIMR_RXERR\t\t\tBIT(3)\n+#define REG_SDIO_HIMR_TXFOVW\t\t\tBIT(4)\n+#define REG_SDIO_HIMR_RXFOVW\t\t\tBIT(5)\n+#define REG_SDIO_HIMR_TXBCNOK\t\t\tBIT(6)\n+#define REG_SDIO_HIMR_TXBCNERR\t\t\tBIT(7)\n+#define REG_SDIO_HIMR_BCNERLY_INT\t\tBIT(16)\n+#define REG_SDIO_HIMR_C2HCMD\t\t\tBIT(17)\n+#define REG_SDIO_HIMR_CPWM1\t\t\tBIT(18)\n+#define REG_SDIO_HIMR_CPWM2\t\t\tBIT(19)\n+#define REG_SDIO_HIMR_HSISR_IND\t\t\tBIT(20)\n+#define REG_SDIO_HIMR_GTINT3_IND\t\tBIT(21)\n+#define REG_SDIO_HIMR_GTINT4_IND\t\tBIT(22)\n+#define REG_SDIO_HIMR_PSTIMEOUT\t\t\tBIT(23)\n+#define REG_SDIO_HIMR_OCPINT\t\t\tBIT(24)\n+#define REG_SDIO_HIMR_ATIMEND\t\t\tBIT(25)\n+#define REG_SDIO_HIMR_ATIMEND_E\t\t\tBIT(26)\n+#define REG_SDIO_HIMR_CTWEND\t\t\tBIT(27)\n+/* the following two are RTL8188 SDIO Specific */\n+#define REG_SDIO_HIMR_MCU_ERR\t\t\tBIT(28)\n+#define REG_SDIO_HIMR_TSF_BIT32_TOGGLE\t\tBIT(29)\n+\n+/* SDIO Host Interrupt Service Routine */\n+#define REG_SDIO_HISR\t\t\t\t(SDIO_LOCAL_OFFSET + 0x0018)\n+#define REG_SDIO_HISR_RX_REQUEST\t\tBIT(0)\n+#define REG_SDIO_HISR_AVAL\t\t\tBIT(1)\n+#define REG_SDIO_HISR_TXERR\t\t\tBIT(2)\n+#define REG_SDIO_HISR_RXERR\t\t\tBIT(3)\n+#define REG_SDIO_HISR_TXFOVW\t\t\tBIT(4)\n+#define REG_SDIO_HISR_RXFOVW\t\t\tBIT(5)\n+#define REG_SDIO_HISR_TXBCNOK\t\t\tBIT(6)\n+#define REG_SDIO_HISR_TXBCNERR\t\t\tBIT(7)\n+#define REG_SDIO_HISR_BCNERLY_INT\t\tBIT(16)\n+#define REG_SDIO_HISR_C2HCMD\t\t\tBIT(17)\n+#define REG_SDIO_HISR_CPWM1\t\t\tBIT(18)\n+#define REG_SDIO_HISR_CPWM2\t\t\tBIT(19)\n+#define REG_SDIO_HISR_HSISR_IND\t\t\tBIT(20)\n+#define REG_SDIO_HISR_GTINT3_IND\t\tBIT(21)\n+#define REG_SDIO_HISR_GTINT4_IND\t\tBIT(22)\n+#define REG_SDIO_HISR_PSTIMEOUT\t\t\tBIT(23)\n+#define REG_SDIO_HISR_OCPINT\t\t\tBIT(24)\n+#define REG_SDIO_HISR_ATIMEND\t\t\tBIT(25)\n+#define REG_SDIO_HISR_ATIMEND_E\t\t\tBIT(26)\n+#define REG_SDIO_HISR_CTWEND\t\t\tBIT(27)\n+/* the following two are RTL8188 SDIO Specific */\n+#define REG_SDIO_HISR_MCU_ERR\t\t\tBIT(28)\n+#define REG_SDIO_HISR_TSF_BIT32_TOGGLE\t\tBIT(29)\n+\n+/* HCI Current Power Mode */\n+#define REG_SDIO_HCPWM\t\t\t\t(SDIO_LOCAL_OFFSET + 0x0019)\n+/* RXDMA Request Length */\n+#define REG_SDIO_RX0_REQ_LEN\t\t\t(SDIO_LOCAL_OFFSET + 0x001C)\n+/* OQT Free Page */\n+#define REG_SDIO_OQT_FREE_PG\t\t\t(SDIO_LOCAL_OFFSET + 0x001E)\n+/* Free Tx Buffer Page */\n+#define REG_SDIO_FREE_TXPG\t\t\t(SDIO_LOCAL_OFFSET + 0x0020)\n+/* HCI Current Power Mode 1 */\n+#define REG_SDIO_HCPWM1\t\t\t\t(SDIO_LOCAL_OFFSET + 0x0024)\n+/* HCI Current Power Mode 2 */\n+#define REG_SDIO_HCPWM2\t\t\t\t(SDIO_LOCAL_OFFSET + 0x0026)\n+/* Free Tx Page Sequence */\n+#define REG_SDIO_FREE_TXPG_SEQ\t\t\t(SDIO_LOCAL_OFFSET + 0x0028)\n+/* HTSF Informaion */\n+#define REG_SDIO_HTSFR_INFO\t\t\t(SDIO_LOCAL_OFFSET + 0x0030)\n+#define REG_SDIO_HCPWM1_V2\t\t\t(SDIO_LOCAL_OFFSET + 0x0038)\n+/* H2C */\n+#define REG_SDIO_H2C\t\t\t\t(SDIO_LOCAL_OFFSET + 0x0060)\n+/* HCI Request Power Mode 1 */\n+#define REG_SDIO_HRPWM1\t\t\t\t(SDIO_LOCAL_OFFSET + 0x0080)\n+/* HCI Request Power Mode 2 */\n+#define REG_SDIO_HRPWM2\t\t\t\t(SDIO_LOCAL_OFFSET + 0x0082)\n+/* HCI Power Save Clock */\n+#define REG_SDIO_HPS_CLKR\t\t\t(SDIO_LOCAL_OFFSET + 0x0084)\n+/* SDIO HCI Suspend Control */\n+#define REG_SDIO_HSUS_CTRL\t\t\t(SDIO_LOCAL_OFFSET + 0x0086)\n+/* SDIO Host Extension Interrupt Mask Always */\n+#define REG_SDIO_HIMR_ON\t\t\t(SDIO_LOCAL_OFFSET + 0x0090)\n+/* SDIO Host Extension Interrupt Status Always */\n+#define REG_SDIO_HISR_ON\t\t\t(SDIO_LOCAL_OFFSET + 0x0091)\n+\n+#define REG_SDIO_INDIRECT_REG_CFG\t\t(SDIO_LOCAL_OFFSET + 0x0040)\n+#define REG_SDIO_INDIRECT_REG_DATA\t\t(SDIO_LOCAL_OFFSET + 0x0044)\n+\n+/* Sdio Address for SDIO Local Reg, TRX FIFO, MAC Reg */\n+#define REG_SDIO_CMD_ADDR_MSK\t\t\tGENMASK(16, 13)\n+#define REG_SDIO_CMD_ADDR_SDIO_REG\t\t0\n+#define REG_SDIO_CMD_ADDR_MAC_REG\t\t8\n+#define REG_SDIO_CMD_ADDR_TXFF_HIGH\t\t4\n+#define REG_SDIO_CMD_ADDR_TXFF_LOW\t\t6\n+#define REG_SDIO_CMD_ADDR_TXFF_NORMAL\t\t5\n+#define REG_SDIO_CMD_ADDR_TXFF_EXTRA\t\t7\n+#define REG_SDIO_CMD_ADDR_RXFF\t\t\t7\n+\n+#define RTW_SDIO_BLOCK_SIZE\t\t\t512\n+#define RTW_SDIO_ADDR_RX_RX0FF_GEN(_id)\t\t(0x0e000 | ((_id) & 0x3))\n+\n+#define RTW_SDIO_DATA_PTR_ALIGN\t\t\t8\n+\n+struct sdio_func;\n+struct sdio_device_id;\n+\n+struct rtw_sdio_tx_data {\n+\tu8 sn;\n+};\n+\n+struct rtw_sdio_work_data {\n+\tstruct work_struct work;\n+\tstruct rtw_dev *rtwdev;\n+};\n+\n+struct rtw_sdio {\n+\tstruct sdio_func *sdio_func;\n+\n+\tu32 irq_mask;\n+\tu8 rx_addr;\n+\tbool sdio3_bus_mode;\n+\tbool is_powered_on;\n+\n+\tvoid *irq_thread;\n+\n+\tstruct workqueue_struct *txwq;\n+\n+\tstruct sk_buff_head tx_queue[RTK_MAX_TX_QUEUE_NUM];\n+\tstruct rtw_sdio_work_data *tx_handler_data;\n+};\n+\n+extern const struct dev_pm_ops rtw_sdio_pm_ops;\n+\n+int rtw_sdio_probe(struct sdio_func *sdio_func,\n+\t\t   const struct sdio_device_id *id);\n+void rtw_sdio_remove(struct sdio_func *sdio_func);\n+void rtw_sdio_shutdown(struct device *dev);\n+\n+static inline bool rtw_sdio_is_sdio30_supported(struct rtw_dev *rtwdev)\n+{\n+\tstruct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;\n+\n+\treturn rtwsdio->sdio3_bus_mode;\n+}\n+\n+#endif\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 094A2C4332F\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:32:38 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S232775AbiL0Xcf (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:32:35 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:58534 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232656AbiL0Xbd (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:31:33 -0500\nReceived: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B53F5E089;\n        Tue, 27 Dec 2022 15:30:50 -0800 (PST)\nReceived: by mail-ej1-x62e.google.com with SMTP id t17so34962909eju.1;\n        Tue, 27 Dec 2022 15:30:50 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=8GWyz5jQ6a8YBmKbthsrt/fWSXYydYplp8Hp3+tK5/w=;\n        b=lcCjFGVE8jmprid5xwPUJt/k8T5XVelgRoWY/4Sb/g9E6vwPhIpcx3hYj0YrMV8E2w\n         qwHDsqvcSWFhe3kmVzqlJEwNAm9Fa+IPr6RGKFdpezTPgPn+Q/mTb7iyTWcunYNKxOai\n         5gcXdoIys+5k1lYY1iq77SD51W47gy52SeBndRnPBNzN4vkgIKu+D5MW4MFjeqTTQdl1\n         td1iDbeDr/Ib7EZoR+IGQ4Q0msQC5EnHMkm7Dt4sZV8n+xs6y8QHS2OYV4SUeoNiJEQk\n         acYkBeu43EwJQ37ReDLjNC5IvILgTY70vUnJg+LaOCATfhwydU/+pJLQwNYD6rtV/NeA\n         UxBQ==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=8GWyz5jQ6a8YBmKbthsrt/fWSXYydYplp8Hp3+tK5/w=;\n        b=tBKo6yaHrLL44CdgGIjzH1JiiN9e0xz4ckAnNYimvHAo3r+McSIpsUobCvmRW7Qjis\n         MigzeLFW29X4mbN3ZSyeK68El9DG33FWn3blvRjYEadI8UJO69HxNj0j2NAP4a3aXTVU\n         Cqh79NVqf2aL74HDfOFtnaruD7cOVifJWgpYI1q0ylHM0ljDPLCQ/LtPcnss7VRYjSYg\n         uw8Akv1nF0j/XWM1mm3dxp1IWXG361ye5TerRqTjRBXoTR5srSqyebvxo5QveP+DjJSj\n         1AHbL/EuBCEE2ma/cEJxZE8LrzayfS1U66eXnJxFiwgEoXLO83v9wgxGrjTmSQ35Aeu5\n         qtFw==\nX-Gm-Message-State: AFqh2kqgznQyZMaVecbqM7YWrWRtKz/l2krQ3YBS2CappCwYlNBV4hIW\n        OcxapkhiWHWwvQ+JgS+7B80hlQvNHQI=\nX-Google-Smtp-Source: AMrXdXug7dD2x+hUREVGCOcXthn322kJQQUzoJL5jtSwDeisAdmc2xP+5VqEg0o4uKCfHh/iHiex/w==\nX-Received: by 2002:a17:906:12c7:b0:7c1:639:6b42 with SMTP id l7-20020a17090612c700b007c106396b42mr24917114ejb.62.1672183848843;\n        Tue, 27 Dec 2022 15:30:48 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.47\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:48 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 14/19] rtw88: main: Add the rpwm_addr and cpwm_addr for SDIO based chipsets\nDate:   Wed, 28 Dec 2022 00:30:15 +0100\nMessage-Id: <20221227233020.284266-15-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nInitialize the rpwm_addr and cpwm_addr for power-saving support on SDIO\nbased chipsets.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/main.c | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c\nindex 888427cf3bdf..9435cb43d1dc 100644\n--- a/drivers/net/wireless/realtek/rtw88/main.c\n+++ b/drivers/net/wireless/realtek/rtw88/main.c\n@@ -18,6 +18,7 @@\n #include \"debug.h\"\n #include \"bf.h\"\n #include \"sar.h\"\n+#include \"sdio.h\"\n \n bool rtw_disable_lps_deep_mode;\n EXPORT_SYMBOL(rtw_disable_lps_deep_mode);\n@@ -1785,6 +1786,10 @@ static int rtw_chip_parameter_setup(struct rtw_dev *rtwdev)\n \t\trtwdev->hci.rpwm_addr = 0x03d9;\n \t\trtwdev->hci.cpwm_addr = 0x03da;\n \t\tbreak;\n+\tcase RTW_HCI_TYPE_SDIO:\n+\t\trtwdev->hci.rpwm_addr = REG_SDIO_HRPWM1;\n+\t\trtwdev->hci.cpwm_addr = REG_SDIO_HCPWM1_V2;\n+\t\tbreak;\n \tcase RTW_HCI_TYPE_USB:\n \t\trtwdev->hci.rpwm_addr = 0xfe58;\n \t\trtwdev->hci.cpwm_addr = 0xfe57;\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 4477AC46467\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:33:05 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S232809AbiL0XdB (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:33:01 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:59070 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S231468AbiL0XcC (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:32:02 -0500\nReceived: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 821D2E09F;\n        Tue, 27 Dec 2022 15:30:51 -0800 (PST)\nReceived: by mail-ed1-x52c.google.com with SMTP id l29so13818638edj.7;\n        Tue, 27 Dec 2022 15:30:51 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=McF1AOS6QwVXZqqI+7NbwxhtVPi8mPQbEHxTHJxarjk=;\n        b=FVm188ZTXuV2jmAwc9cBA5aHf7MS1964Wf+mL4JXLleaV3hEMyfyub4njJRtDt2GAW\n         sm69wDymK8e9f4v+CFzRyxLjZhRwBvZlzMmLzgPNH8C/ze8FwseBKbuRU3EeHLxgxazf\n         T6dgtkR7AUrMbjO4C6lEocpFOi3OBKIoBL/3Br6uhbCIpFPkYKx7m6mDipaPrr9+hD6E\n         10WvwO7HdK4FJPPAIQEgxKRoOQcGvLTK1kurODLlH7IdsI2vLSQ+/Rxc6o+WIYUKGUpX\n         ISX1QwJmt7kSqymq2sC4fH74R/UAuPKUV0IvglBEW1MFbVQfdz+1E1eCgLv+1a8BB8EH\n         hbHA==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=McF1AOS6QwVXZqqI+7NbwxhtVPi8mPQbEHxTHJxarjk=;\n        b=PvkfwLpzJu0eAmCWe906wBGlqlNTLSHFaOLBBGlDujw6yZ2jAuLzIpJaIZki6Pkkv+\n         iVyTZRLJx6oLwPsFKB1btgza0SqqYq9gSNYgRrVCdPI+sMnwxc6NsRnCTRPqBRIUiYrU\n         d1LgkXjRCghRdpDhsfPnKGHQovB+/Y+Jgjf5P9bdlLo+hTUkhaPKbotsdK9d4rud1YjF\n         q0bFfNHI5AITOHFI99yxK9Jiy8a0RFj128XTtiDkCo29FGWkdkzFl1EJxwi4yfBhvN7A\n         qrG/lYLBPOmKB/1mkrhVAk4uMCSdLKlY6UNLMLT+JUC5ecBs0ezhFzGTw0e9bbhO7+bj\n         csPw==\nX-Gm-Message-State: AFqh2kq6yZEtlIAYy+vnbzVJcE8v+ltU3PWCpKyxKN2tt3BOrWoEEKcQ\n        XYriQcU/xBBD+wFoBYJBpaa8bTFu9A0=\nX-Google-Smtp-Source: AMrXdXt418wFHFd2OaJxi+aMmLUL2V901glOQf0Al75txCCmR4Br+zSfiZKNF2o0LDfOOiKtsLMx7A==\nX-Received: by 2002:a05:6402:220e:b0:483:a6d8:7ad with SMTP id cq14-20020a056402220e00b00483a6d807admr9248193edb.24.1672183849761;\n        Tue, 27 Dec 2022 15:30:49 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.48\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:49 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 15/19] rtw88: main: Reserve 8 bytes of extra TX headroom for SDIO based cards\nDate:   Wed, 28 Dec 2022 00:30:16 +0100\nMessage-Id: <20221227233020.284266-16-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nFor SDIO host controllers with DMA support the TX buffer physical memory\naddress need to be aligned at an 8-byte boundary. Reserve 8 bytes of\nextra TX headroom so we can align the data without re-allocating the\ntransmit buffer.\n\nWhile here, also remove the TODO comment regarding extra headroom for\nUSB and SDIO. For SDIO the extra headroom is now handled and for USB it\nwas not needed so far.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/main.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c\nindex 9435cb43d1dc..bcdf1f8c8450 100644\n--- a/drivers/net/wireless/realtek/rtw88/main.c\n+++ b/drivers/net/wireless/realtek/rtw88/main.c\n@@ -2163,9 +2163,11 @@ int rtw_register_hw(struct rtw_dev *rtwdev, struct ieee80211_hw *hw)\n \tint max_tx_headroom = 0;\n \tint ret;\n \n-\t/* TODO: USB & SDIO may need extra room? */\n \tmax_tx_headroom = rtwdev->chip->tx_pkt_desc_sz;\n \n+\tif (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_SDIO)\n+\t\tmax_tx_headroom += RTW_SDIO_DATA_PTR_ALIGN;\n+\n \thw->extra_tx_headroom = max_tx_headroom;\n \thw->queues = IEEE80211_NUM_ACS;\n \thw->txq_data_size = sizeof(struct rtw_txq);\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 25937C4332F\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:33:09 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S232822AbiL0XdE (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:33:04 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:58242 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232616AbiL0XcD (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:32:03 -0500\nReceived: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDC5CE0AF;\n        Tue, 27 Dec 2022 15:30:52 -0800 (PST)\nReceived: by mail-ej1-x62f.google.com with SMTP id gh17so35004617ejb.6;\n        Tue, 27 Dec 2022 15:30:52 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=gsQ0bP6BbS+zASV2taW+Oh7StcznrMy09XYCXA0KW+c=;\n        b=NvGtg2ABeuuiTlqb5FE0HvyVQ0jFplGTmISwJyB2VnsbuhiblM6W0RIICSKs7m74Cx\n         SYl0hzKURLDfTg0yekw3VCxY8TbWw4E3KhfTgHeIBGORJzTbqgPe6aMSgMRAa/2EB0M3\n         jT4LJL3dINLOJeSQAWa+TBiJI9YrBJASmHxD3pkbFPFVzNQ6NgUM9MI6uO3pX0TOFnG0\n         T7QukZMuX4NL+HZxfJgqfeuC+1pGWiUqY/QP3s3hBeWlYIiqm6ttWad9ndPIL51AMuYl\n         WxTVj5njQ4NFWyeuqwS1ZZvUpqk5CcTWuGkvTPCGkBQVHJH7bVh6yU0e9O34i9C/BOK8\n         CVYA==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=gsQ0bP6BbS+zASV2taW+Oh7StcznrMy09XYCXA0KW+c=;\n        b=0KbfEtg8SyxKDU3Q/3MDYViYHMEGdHXmShvE3KwZi9anuc6Je5k5T26o9vs52hkmgN\n         iIh3EYs23WBzGu1NodYdak+HVFzdHJbmfPctm9bszMI3kOLPrl4L5qXFuOPWFxlMuLkq\n         eBebU8IanMufT3hZbFODt9oJQQeJDdKK5Ce0D9eUe8r3K1t39Ti9loHGsRXo9T+QEhWT\n         10CUfNYqNTyHKyMu6wYIt2iNbEN3vmN6suKC9P5d+YqI8Znz2DWiLcCCyPv5CR8S2ubn\n         gWs4r9jGVXlnoEeYGBfsxRJ+u2GghcbibDtzbHnBkBNHjh9IThCywKnjZyZouMcuZOAJ\n         rUqA==\nX-Gm-Message-State: AFqh2kpBL/KfX3PPwNo1M6w1DnoZ/aqA5XRLneEORjMXwqAP5LD7YwC/\n        rr5RHr+OcLCqCJxub3cw7NpNkPBHFK8=\nX-Google-Smtp-Source: AMrXdXsMcWgwvN1YMuKb2k+2XZqBjjIy7sgzVZekfewiRxr8Kydi1JdIAinH342GnFDQZYHMPn/ntg==\nX-Received: by 2002:a17:907:93c5:b0:7c0:f118:624b with SMTP id cp5-20020a17090793c500b007c0f118624bmr17580205ejc.44.1672183850737;\n        Tue, 27 Dec 2022 15:30:50 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.49\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:50 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 16/19] rtw88: ps: Increase LEAVE_LPS_TRY_CNT for SDIO based chipsets\nDate:   Wed, 28 Dec 2022 00:30:17 +0100\nMessage-Id: <20221227233020.284266-17-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\n\nIncrease LEAVE_LPS_TRY_CNT to give SDIO based chipsets more time to\nenter or leave deep sleep mode. SDIO communication is often slower than\nPCIe transfers so extra time is needed.\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/ps.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/ps.h b/drivers/net/wireless/realtek/rtw88/ps.h\nindex c194386f6db5..b79bef32b169 100644\n--- a/drivers/net/wireless/realtek/rtw88/ps.h\n+++ b/drivers/net/wireless/realtek/rtw88/ps.h\n@@ -12,7 +12,7 @@\n #define POWER_TX_WAKE\t\tBIT(1)\n #define POWER_MODE_LCLK\t\tBIT(0)\n \n-#define LEAVE_LPS_TRY_CNT\t5\n+#define LEAVE_LPS_TRY_CNT\t10\n #define LEAVE_LPS_TIMEOUT\tmsecs_to_jiffies(100)\n \n int rtw_enter_ips(struct rtw_dev *rtwdev);\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 765A5C4708D\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:33:15 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S232840AbiL0XdL (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:33:11 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:59170 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232621AbiL0XcI (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:32:08 -0500\nReceived: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04BB8E0BB;\n        Tue, 27 Dec 2022 15:30:53 -0800 (PST)\nReceived: by mail-ej1-x630.google.com with SMTP id tz12so34949170ejc.9;\n        Tue, 27 Dec 2022 15:30:53 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=rjqRO1hM2WmR8bA3fNj6YB7tA/88HOJsev0FI6+d5o4=;\n        b=E5TP2oHD4qYQBRZ3fSmijhSgxo7LL4r39JXIVaSU46brUJtEIqhXAstiIc6OFIPzj0\n         TcKm2PjQM3b87w2YqT8KAWmSLjrQ6S0gPKC9u6WOFwoPcLWPlrDFu9EzZR+81dA1MfE3\n         Fq4bzgdheiOW3o91ebfYV/NTHoMcX5Pu1ldl8w+SJqIFzhXa50OZzeIB79STcHBEqDjv\n         KRUyp4trCgjAEOyXVRhfkDDXn+Ks1AxKJrMK2QsoWBdQWQnCe7doaGiGH9GyGyoeTkOO\n         CEV4quxrQE8FDF1UQF+eRZp26lV07Y5/QnNx7y6lQivJOkKLrwmHW7YmJeETQTnugMc+\n         xYJg==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=rjqRO1hM2WmR8bA3fNj6YB7tA/88HOJsev0FI6+d5o4=;\n        b=PAjOirfryuzxDkGHpzcvrNm+jY2MxgHihDO2SeIhR3RhSKS9VQyELZWsk+99RTcA59\n         2Cmr99gvyL5B2b9attLObyMZp94b2Zv+3C1x09lAMdl6SqI8evax1n6gC+Zx70RglebA\n         GpwsX4wHi1VpiyraP+ozrq/eaEMWNXJCWt5DgueE/ugGQFygPsqSDlV+U5AVEassmrSW\n         /ElASeffnvAYQ4ueOp7/nzfPsO/EZoopea2PmXapk+Y0vS7UoqYvY9RkQxil9AA036+O\n         nWTXHrtTQ2PytpTRlE3sUH8rgftrMgYg1mRvo5hEGTXpP2Pw9uE/qhelXy2NeerCJe7o\n         rbOg==\nX-Gm-Message-State: AFqh2kobiCLr5ll8b7aiOy8GoC27iI08S31tiBLL0143DyZL9o5FpB9H\n        HS3jbGW+hKzj8ojuH7Jsel6xDWuf6fo=\nX-Google-Smtp-Source: AMrXdXsH0QZPD9s61Gke/d76O1N2kd/8pnWaqz1O+hj7ZO9+3bBQmojwGolERxfXNgb0f9/JAGbQ5w==\nX-Received: by 2002:a17:907:6d0c:b0:7c1:652:d109 with SMTP id sa12-20020a1709076d0c00b007c10652d109mr22218951ejc.35.1672183851755;\n        Tue, 27 Dec 2022 15:30:51 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.50\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:51 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 17/19] rtw88: Add support for the SDIO based RTL8822BS chipset\nDate:   Wed, 28 Dec 2022 00:30:18 +0100\nMessage-Id: <20221227233020.284266-18-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\n\nWire up RTL8822BS chipset support using the new rtw88 SDIO HCI code as\nwell as the existing RTL8822B chipset code.\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/Kconfig    | 11 ++++++\n drivers/net/wireless/realtek/rtw88/Makefile   |  3 ++\n .../net/wireless/realtek/rtw88/rtw8822bs.c    | 34 +++++++++++++++++++\n 3 files changed, 48 insertions(+)\n create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822bs.c\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/Kconfig b/drivers/net/wireless/realtek/rtw88/Kconfig\nindex cdf9cb478ee2..0cfc68dcc416 100644\n--- a/drivers/net/wireless/realtek/rtw88/Kconfig\n+++ b/drivers/net/wireless/realtek/rtw88/Kconfig\n@@ -45,6 +45,17 @@ config RTW88_8822BE\n \n \t  802.11ac PCIe wireless network adapter\n \n+config RTW88_8822BS\n+\ttristate \"Realtek 8822BS SDIO wireless network adapter\"\n+\tdepends on MMC\n+\tselect RTW88_CORE\n+\tselect RTW88_SDIO\n+\tselect RTW88_8822B\n+\thelp\n+\t  Select this option will enable support for 8822BS chipset\n+\n+\t  802.11ac SDIO wireless network adapter\n+\n config RTW88_8822BU\n \ttristate \"Realtek 8822BU USB wireless network adapter\"\n \tdepends on USB\ndiff --git a/drivers/net/wireless/realtek/rtw88/Makefile b/drivers/net/wireless/realtek/rtw88/Makefile\nindex 892cad60ba31..2b8f4dd9707f 100644\n--- a/drivers/net/wireless/realtek/rtw88/Makefile\n+++ b/drivers/net/wireless/realtek/rtw88/Makefile\n@@ -26,6 +26,9 @@ rtw88_8822b-objs\t\t:= rtw8822b.o rtw8822b_table.o\n obj-$(CONFIG_RTW88_8822BE)\t+= rtw88_8822be.o\n rtw88_8822be-objs\t\t:= rtw8822be.o\n \n+obj-$(CONFIG_RTW88_8822BS)\t+= rtw88_8822bs.o\n+rtw88_8822bs-objs\t\t:= rtw8822bs.o\n+\n obj-$(CONFIG_RTW88_8822BU)\t+= rtw88_8822bu.o\n rtw88_8822bu-objs\t\t:= rtw8822bu.o\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8822bs.c b/drivers/net/wireless/realtek/rtw88/rtw8822bs.c\nnew file mode 100644\nindex 000000000000..4c74ad2d2e5e\n--- /dev/null\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8822bs.c\n@@ -0,0 +1,34 @@\n+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause\n+// Copyright(c) Jernej Skrabec <jernej.skrabec@gmail.com>\n+\n+#include <linux/mmc/sdio_func.h>\n+#include <linux/mmc/sdio_ids.h>\n+#include <linux/module.h>\n+#include \"sdio.h\"\n+#include \"rtw8822b.h\"\n+\n+static const struct sdio_device_id rtw_8822bs_id_table[] =  {\n+\t{\n+\t\tSDIO_DEVICE(SDIO_VENDOR_ID_REALTEK,\n+\t\t\t    SDIO_DEVICE_ID_REALTEK_RTW8822BS),\n+\t\t.driver_data = (kernel_ulong_t)&rtw8822b_hw_spec,\n+\t},\n+\t{}\n+};\n+MODULE_DEVICE_TABLE(sdio, rtw_8822bs_id_table);\n+\n+static struct sdio_driver rtw_8822bs_driver = {\n+\t.name = \"rtw_8822bs\",\n+\t.probe = rtw_sdio_probe,\n+\t.remove = rtw_sdio_remove,\n+\t.id_table = rtw_8822bs_id_table,\n+\t.drv = {\n+\t\t.pm = &rtw_sdio_pm_ops,\n+\t\t.shutdown = rtw_sdio_shutdown,\n+\t}\n+};\n+module_sdio_driver(rtw_8822bs_driver);\n+\n+MODULE_AUTHOR(\"Jernej Skrabec <jernej.skrabec@gmail.com>\");\n+MODULE_DESCRIPTION(\"Realtek 802.11ac wireless 8822bs driver\");\n+MODULE_LICENSE(\"Dual BSD/GPL\");\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 4A3ADC4708D\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:33:41 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S232850AbiL0Xdi (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:33:38 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:58488 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232720AbiL0Xc1 (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:32:27 -0500\nReceived: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61B85E0D7;\n        Tue, 27 Dec 2022 15:30:54 -0800 (PST)\nReceived: by mail-ed1-x52a.google.com with SMTP id m21so20871685edc.3;\n        Tue, 27 Dec 2022 15:30:54 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=TkWht2yLW1tGoXrbVkq+ldlAYVXsEoXS4p1SnmxgLa8=;\n        b=ZiriEed9I3WRaJMRtKe86e/jk6AAyzctAFRQypbcsjHumMGY5Hw2LAvRKPVWY6t8U8\n         lcYIU3JCxmtH3P9ejpISD/yiKKdCKrMGzm7MgvZNvACyQ/IOXCDCr8iHlEJIVGoFv++p\n         yghQsza97xnHpd5Z/fC7ZMMko1/+rKe6GAnib/LZIj3Zc5p0/YYkVQYVg+XyYbT03p4c\n         v0Rg6X7keFfBqc97wAOxp9RsN/OcUQ3XjTH6waKcWHIZYXba46BSyDyZTsIeFzzbJcZ0\n         Ua9l18g66CKIKG3Qds/fxEDgPqYBdlEK3UpO7nZb5degjTpr/n4dx3sJXbkTFQeJ5fC2\n         U/8w==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=TkWht2yLW1tGoXrbVkq+ldlAYVXsEoXS4p1SnmxgLa8=;\n        b=hDhASs7jtxIud9UPJgxJxpnwLiPiFw/DXFGUQ1LngGjzDxUkgb4jFiT2pirAVPe5RL\n         nNbSGsgVxuT9Q9dsFz/T6SPodmtD2O5hyAHNRx1E2heeWr8yj+iHI7AICLAOTq6jmoxC\n         hWmvH2q1V1neDAsZPNPqpBtcUh+RlRUP/UTSgYD/inPAC8qWC0Ds9kyi2a0Rx/3ezhAf\n         SVsJC9BCWfPwoghCpIGRtaFfoO678tU8oiuhbCF/vkb1oyw/FyX7FNU/4Bhd93PgkY/0\n         tcw40CM+ZSGd3EQVlie4ZNHuYppywKPgNqd4HRzavzD1vKn4BEy6Z8vVIfVKJ2tRm01C\n         DjeA==\nX-Gm-Message-State: AFqh2kqhiXgqvjv4BWUGitGBWDHc6O2+O+TzXEj7risWnAAR+i4HcZwm\n        S6uGjqz7FRqckWeiyQcC7N2QsBaZNyo=\nX-Google-Smtp-Source: AMrXdXtqMomD1AYMVjv53V+sPRjBXDm52IoCAQVKs6DsvUau/rII4ajhWxNdNNJZTvB+9FONKtVr4A==\nX-Received: by 2002:a05:6402:12d4:b0:461:6219:4b16 with SMTP id k20-20020a05640212d400b0046162194b16mr19942317edx.33.1672183852522;\n        Tue, 27 Dec 2022 15:30:52 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.51\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:52 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 18/19] rtw88: Add support for the SDIO based RTL8822CS chipset\nDate:   Wed, 28 Dec 2022 00:30:19 +0100\nMessage-Id: <20221227233020.284266-19-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nWire up RTL8822CS chipset support using the new rtw88 SDIO HCI code as\nwell as the existing RTL8822C chipset code.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/Kconfig    | 11 ++++++\n drivers/net/wireless/realtek/rtw88/Makefile   |  3 ++\n .../net/wireless/realtek/rtw88/rtw8822cs.c    | 34 +++++++++++++++++++\n 3 files changed, 48 insertions(+)\n create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822cs.c\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/Kconfig b/drivers/net/wireless/realtek/rtw88/Kconfig\nindex 0cfc68dcc416..6b65da81127f 100644\n--- a/drivers/net/wireless/realtek/rtw88/Kconfig\n+++ b/drivers/net/wireless/realtek/rtw88/Kconfig\n@@ -78,6 +78,17 @@ config RTW88_8822CE\n \n \t  802.11ac PCIe wireless network adapter\n \n+config RTW88_8822CS\n+\ttristate \"Realtek 8822CS SDIO wireless network adapter\"\n+\tdepends on MMC\n+\tselect RTW88_CORE\n+\tselect RTW88_SDIO\n+\tselect RTW88_8822C\n+\thelp\n+\t  Select this option will enable support for 8822CS chipset\n+\n+\t  802.11ac SDIO wireless network adapter\n+\n config RTW88_8822CU\n \ttristate \"Realtek 8822CU USB wireless network adapter\"\n \tdepends on USB\ndiff --git a/drivers/net/wireless/realtek/rtw88/Makefile b/drivers/net/wireless/realtek/rtw88/Makefile\nindex 2b8f4dd9707f..6105c2745bda 100644\n--- a/drivers/net/wireless/realtek/rtw88/Makefile\n+++ b/drivers/net/wireless/realtek/rtw88/Makefile\n@@ -38,6 +38,9 @@ rtw88_8822c-objs\t\t:= rtw8822c.o rtw8822c_table.o\n obj-$(CONFIG_RTW88_8822CE)\t+= rtw88_8822ce.o\n rtw88_8822ce-objs\t\t:= rtw8822ce.o\n \n+obj-$(CONFIG_RTW88_8822CS)\t+= rtw88_8822cs.o\n+rtw88_8822cs-objs\t\t:= rtw8822cs.o\n+\n obj-$(CONFIG_RTW88_8822CU)\t+= rtw88_8822cu.o\n rtw88_8822cu-objs\t\t:= rtw8822cu.o\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8822cs.c b/drivers/net/wireless/realtek/rtw88/rtw8822cs.c\nnew file mode 100644\nindex 000000000000..3d7279d70aa9\n--- /dev/null\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8822cs.c\n@@ -0,0 +1,34 @@\n+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause\n+// Copyright(c) Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n+\n+#include <linux/mmc/sdio_func.h>\n+#include <linux/mmc/sdio_ids.h>\n+#include <linux/module.h>\n+#include \"sdio.h\"\n+#include \"rtw8822c.h\"\n+\n+static const struct sdio_device_id rtw_8822cs_id_table[] =  {\n+\t{\n+\t\tSDIO_DEVICE(SDIO_VENDOR_ID_REALTEK,\n+\t\t\t    SDIO_DEVICE_ID_REALTEK_RTW8822CS),\n+\t\t.driver_data = (kernel_ulong_t)&rtw8822c_hw_spec,\n+\t},\n+\t{}\n+};\n+MODULE_DEVICE_TABLE(sdio, rtw_8822cs_id_table);\n+\n+static struct sdio_driver rtw_8822cs_driver = {\n+\t.name = \"rtw_8822cs\",\n+\t.probe = rtw_sdio_probe,\n+\t.remove = rtw_sdio_remove,\n+\t.id_table = rtw_8822cs_id_table,\n+\t.drv = {\n+\t\t.pm = &rtw_sdio_pm_ops,\n+\t\t.shutdown = rtw_sdio_shutdown,\n+\t}\n+};\n+module_sdio_driver(rtw_8822cs_driver);\n+\n+MODULE_AUTHOR(\"Martin Blumenstingl <martin.blumenstingl@googlemail.com>\");\n+MODULE_DESCRIPTION(\"Realtek 802.11ac wireless 8822cs driver\");\n+MODULE_LICENSE(\"Dual BSD/GPL\");\n-- \n2.39.0\n\n\nFrom mboxrd@z Thu Jan  1 00:00:00 1970\nReturn-Path: <linux-wireless-owner@vger.kernel.org>\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\taws-us-west-2-korg-lkml-1.web.codeaurora.org\nReceived: from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 724D4C46467\n\tfor <linux-wireless@archiver.kernel.org>; Tue, 27 Dec 2022 23:33:44 +0000 (UTC)\nReceived: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S232871AbiL0Xdm (ORCPT\n        <rfc822;linux-wireless@archiver.kernel.org>);\n        Tue, 27 Dec 2022 18:33:42 -0500\nReceived: from lindbergh.monkeyblade.net ([23.128.96.19]:57786 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232738AbiL0Xc3 (ORCPT\n        <rfc822;linux-wireless@vger.kernel.org>);\n        Tue, 27 Dec 2022 18:32:29 -0500\nReceived: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9750EE10;\n        Tue, 27 Dec 2022 15:30:55 -0800 (PST)\nReceived: by mail-ej1-x631.google.com with SMTP id vm8so28079904ejc.2;\n        Tue, 27 Dec 2022 15:30:55 -0800 (PST)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlemail.com; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=5AaBWOz6R05ieMR55ZX/qfxc7kxYQIr83caCYQIdZus=;\n        b=OT5WMy9MXt3DOYfq3J7NDT2QccCBOtwhk3EFywa2zk7PnToDkIVzcaKsO9l69DtElG\n         +mkgSwIDU8YdwUMOge9xCu3thxgF3daUp1u9dKkNC4bCyl7nP1I6bMh+Dw4mYTN6g7t2\n         f9+311qoArRgwYOnmzh+4zOzH/x1SGjP/qrHylxHZ5S/+X/XElb56sc6kSvxKnKMc/L9\n         NfbQS5DRXbbHLpxLewXny1HpO3Xpt3bqvGd3gtqRirbJ9SLGIdL0nF3Azvo8wmXIHkif\n         t9O1b7qnNLMLKu0cw43wgXhbiV72PVsC0IHD9L2jpE1SfPNiHeF1+k0UGRImNoGbFu/T\n         J5ug==\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=5AaBWOz6R05ieMR55ZX/qfxc7kxYQIr83caCYQIdZus=;\n        b=tC94sjVPyPLBDEbDrJuj18IasmHZvvjJq9ZhdOop5YTqWuUu+loPcHj+g2NSUQNVwj\n         Lxw1S/13LrW5zhYZHTXq8iJnW6qIJmFePFlyh0+t+N9ghvVefkA0v3Rp0Aw0R4lvl0+D\n         aP0Io8A4MvZkDJJDBMcU1GWPZD+zKZbsdpdjKnqtr0joIHVvqutIxjNaQvNDSMZKYHYz\n         C+JFyxnHhNuE4BuPe/bjoRmh8mtpdYqm9PhspRkN7qMVa98rgc7fJgvyXQiXCCQTV+Ei\n         iwr+IBP4BRF8TsitWPtxQVPZTEogwmjrPBhvan2jl03UZ08NuTE7Qpt9NtpN5pfZoIeZ\n         AxMg==\nX-Gm-Message-State: AFqh2krOdmXtpx4JJmMEPG48l9aoWY1sDOsm4zqszFKiDNXByhcj+Inw\n        zXr12xKktxisyzocHVdLoJXuNuwrxTo=\nX-Google-Smtp-Source: AMrXdXvwz3GwTcCXjYIjOMdJ1PkM7hwikq8jAcu58QKAK9t2aunLIrzVkZObcJP4vQa1kLd9N3Nsyw==\nX-Received: by 2002:a17:907:b9d5:b0:7c1:f6c:dd4e with SMTP id xa21-20020a170907b9d500b007c10f6cdd4emr19583149ejc.40.1672183853344;\n        Tue, 27 Dec 2022 15:30:53 -0800 (PST)\nReceived: from localhost.localdomain (dynamic-2a01-0c23-c4cf-d900-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c4cf:d900::e63])\n        by smtp.googlemail.com with ESMTPSA id r7-20020aa7c147000000b0046cbcc86bdesm6489978edp.7.2022.12.27.15.30.52\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 27 Dec 2022 15:30:53 -0800 (PST)\nFrom:   Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nTo:     linux-wireless@vger.kernel.org\nCc:     Yan-Hsuan Chuang <tony0620emma@gmail.com>,\n        Kalle Valo <kvalo@kernel.org>,\n        Ulf Hansson <ulf.hansson@linaro.org>,\n        linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n        linux-mmc@vger.kernel.org, Chris Morgan <macroalpha82@gmail.com>,\n        Nitin Gupta <nitin.gupta981@gmail.com>,\n        Neo Jou <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,\n        Jernej Skrabec <jernej.skrabec@gmail.com>,\n        Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nSubject: [RFC PATCH v1 19/19] rtw88: Add support for the SDIO based RTL8821CS chipset\nDate:   Wed, 28 Dec 2022 00:30:20 +0100\nMessage-Id: <20221227233020.284266-20-martin.blumenstingl@googlemail.com>\nX-Mailer: git-send-email 2.39.0\nIn-Reply-To: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nReferences: <20221227233020.284266-1-martin.blumenstingl@googlemail.com>\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nPrecedence: bulk\nList-ID: <linux-wireless.vger.kernel.org>\nX-Mailing-List: linux-wireless@vger.kernel.org\n\nWire up RTL8821CS chipset support using the new rtw88 SDIO HCI code as\nwell as the existing RTL8821C chipset code.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/net/wireless/realtek/rtw88/Kconfig    | 11 ++++++\n drivers/net/wireless/realtek/rtw88/Makefile   |  3 ++\n .../net/wireless/realtek/rtw88/rtw8821cs.c    | 34 +++++++++++++++++++\n 3 files changed, 48 insertions(+)\n create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8821cs.c\n\ndiff --git a/drivers/net/wireless/realtek/rtw88/Kconfig b/drivers/net/wireless/realtek/rtw88/Kconfig\nindex 6b65da81127f..29eb2f8e0eb7 100644\n--- a/drivers/net/wireless/realtek/rtw88/Kconfig\n+++ b/drivers/net/wireless/realtek/rtw88/Kconfig\n@@ -133,6 +133,17 @@ config RTW88_8821CE\n \n \t  802.11ac PCIe wireless network adapter\n \n+config RTW88_8821CS\n+\ttristate \"Realtek 8821CS SDIO wireless network adapter\"\n+\tdepends on MMC\n+\tselect RTW88_CORE\n+\tselect RTW88_SDIO\n+\tselect RTW88_8821C\n+\thelp\n+\t  Select this option will enable support for 8821CS chipset\n+\n+\t  802.11ac SDIO wireless network adapter\n+\n config RTW88_8821CU\n \ttristate \"Realtek 8821CU USB wireless network adapter\"\n \tdepends on USB\ndiff --git a/drivers/net/wireless/realtek/rtw88/Makefile b/drivers/net/wireless/realtek/rtw88/Makefile\nindex 6105c2745bda..82979b30ae8d 100644\n--- a/drivers/net/wireless/realtek/rtw88/Makefile\n+++ b/drivers/net/wireless/realtek/rtw88/Makefile\n@@ -59,6 +59,9 @@ rtw88_8821c-objs\t\t:= rtw8821c.o rtw8821c_table.o\n obj-$(CONFIG_RTW88_8821CE)\t+= rtw88_8821ce.o\n rtw88_8821ce-objs\t\t:= rtw8821ce.o\n \n+obj-$(CONFIG_RTW88_8821CS)\t+= rtw88_8821cs.o\n+rtw88_8821cs-objs\t\t:= rtw8821cs.o\n+\n obj-$(CONFIG_RTW88_8821CU)\t+= rtw88_8821cu.o\n rtw88_8821cu-objs\t\t:= rtw8821cu.o\n \ndiff --git a/drivers/net/wireless/realtek/rtw88/rtw8821cs.c b/drivers/net/wireless/realtek/rtw88/rtw8821cs.c\nnew file mode 100644\nindex 000000000000..61f82b38cda4\n--- /dev/null\n+++ b/drivers/net/wireless/realtek/rtw88/rtw8821cs.c\n@@ -0,0 +1,34 @@\n+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause\n+// Copyright(c) Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n+\n+#include <linux/mmc/sdio_func.h>\n+#include <linux/mmc/sdio_ids.h>\n+#include <linux/module.h>\n+#include \"sdio.h\"\n+#include \"rtw8821c.h\"\n+\n+static const struct sdio_device_id rtw_8821cs_id_table[] =  {\n+\t{\n+\t\tSDIO_DEVICE(SDIO_VENDOR_ID_REALTEK,\n+\t\t\t    SDIO_DEVICE_ID_REALTEK_RTW8821CS),\n+\t\t.driver_data = (kernel_ulong_t)&rtw8821c_hw_spec,\n+\t},\n+\t{}\n+};\n+MODULE_DEVICE_TABLE(sdio, rtw_8821cs_id_table);\n+\n+static struct sdio_driver rtw_8821cs_driver = {\n+\t.name = \"rtw_8821cs\",\n+\t.probe = rtw_sdio_probe,\n+\t.remove = rtw_sdio_remove,\n+\t.id_table = rtw_8821cs_id_table,\n+\t.drv = {\n+\t\t.pm = &rtw_sdio_pm_ops,\n+\t\t.shutdown = rtw_sdio_shutdown,\n+\t}\n+};\n+module_sdio_driver(rtw_8821cs_driver);\n+\n+MODULE_AUTHOR(\"Martin Blumenstingl <martin.blumenstingl@googlemail.com>\");\n+MODULE_DESCRIPTION(\"Realtek 802.11ac wireless 8821cs driver\");\n+MODULE_LICENSE(\"Dual BSD/GPL\");\n-- \n2.39.0\n\n\n"
  },
  {
    "path": "packages/linux/patches/default/linux-150-dev_input_xpad_add_8bitdo_pro_2_wired_controller_support.patch",
    "content": "From git@z Thu Jan  1 00:00:00 1970\nSubject: [PATCH] Input: xpad - add 8BitDo Pro 2 Wired Controller support\nFrom: John Butler <radon86dev@gmail.com>\nDate: Tue, 24 Jan 2023 00:52:06 +0000\nMessage-Id: <20230124005206.80706-1-radon86dev@gmail.com>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=\"utf-8\"\nContent-Transfer-Encoding: 7bit\n\nAdd VID and PID to the xpad_device table to allow driver\nto use the 8BitDo Pro 2 Wired Controller, which is\nXTYPE_XBOX360 compatible by default.\n\nSigned-off-by: John Butler <radon86dev@gmail.com>\nCc: linux-input@vger.kernel.org\nReviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>\n---\n drivers/input/joystick/xpad.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c\nindex 2959d80f7fdb..f642ec8e92dd 100644\n--- a/drivers/input/joystick/xpad.c\n+++ b/drivers/input/joystick/xpad.c\n@@ -359,6 +359,7 @@ static const struct xpad_device {\n \t{ 0x24c6, 0xfafe, \"Rock Candy Gamepad for Xbox 360\", 0, XTYPE_XBOX360 },\n \t{ 0x2563, 0x058d, \"OneXPlayer Gamepad\", 0, XTYPE_XBOX360 },\n \t{ 0x2dc8, 0x2000, \"8BitDo Pro 2 Wired Controller fox Xbox\", 0, XTYPE_XBOXONE },\n+\t{ 0x2dc8, 0x3106, \"8BitDo Pro 2 Wired Controller\", 0, XTYPE_XBOX360 },\n \t{ 0x31e3, 0x1100, \"Wooting One\", 0, XTYPE_XBOX360 },\n \t{ 0x31e3, 0x1200, \"Wooting Two\", 0, XTYPE_XBOX360 },\n \t{ 0x31e3, 0x1210, \"Wooting Lekker\", 0, XTYPE_XBOX360 },\n@@ -492,6 +493,7 @@ static const struct usb_device_id xpad_table[] = {\n \tXPAD_XBOXONE_VENDOR(0x24c6),\t\t/* PowerA Controllers */\n \tXPAD_XBOX360_VENDOR(0x2563),\t\t/* OneXPlayer Gamepad */\n \tXPAD_XBOX360_VENDOR(0x260d),\t\t/* Dareu H101 */\n+\tXPAD_XBOX360_VENDOR(0x2dc8),            /* 8BitDo Pro 2 Wired Controller */\n \tXPAD_XBOXONE_VENDOR(0x2dc8),\t\t/* 8BitDo Pro 2 Wired Controller for Xbox */\n \tXPAD_XBOXONE_VENDOR(0x2e24),\t\t/* Hyperkin Duke X-Box One pad */\n \tXPAD_XBOX360_VENDOR(0x2f24),\t\t/* GameSir Controllers */\n-- \n2.39.1\n\n"
  },
  {
    "path": "packages/linux/patches/default/linux-999-no-lzma-in-x86-perf-build.patch",
    "content": "diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config\nindex 0294bfb6c5f8..153036bbed7e 100644\n--- a/tools/perf/Makefile.config\n+++ b/tools/perf/Makefile.config\n@@ -35,7 +35,7 @@ ifeq ($(SRCARCH),x86)\n   ifeq (${IS_64_BIT}, 1)\n     CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT -DHAVE_SYSCALL_TABLE -I$(OUTPUT)arch/x86/include/generated\n     ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S\n-    LIBUNWIND_LIBS = -lunwind-x86_64 -lunwind -llzma\n+    LIBUNWIND_LIBS = -lunwind-x86_64 -lunwind\n     $(call detected,CONFIG_X86_64)\n   else\n     LIBUNWIND_LIBS = -lunwind-x86 -llzma -lunwind\n"
  },
  {
    "path": "packages/linux/patches/default/linux-999.02-0001-pm-disable-async-suspend-resume-by-default.patch",
    "content": "From c314d9af9d774c052bea324e1a140ccdba0ca070 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Tue, 8 Apr 2014 14:02:53 +0300\nSubject: [PATCH] pm: disable async suspend/resume by default\n\n---\n kernel/power/main.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/kernel/power/main.c b/kernel/power/main.c\nindex 1d1bf63..361db93 100644\n--- a/kernel/power/main.c\n+++ b/kernel/power/main.c\n@@ -46,7 +46,7 @@ int pm_notifier_call_chain(unsigned long val)\n }\n \n /* If set, devices may be suspended and resumed asynchronously. */\n-int pm_async_enabled = 1;\n+int pm_async_enabled = 0;\n \n static ssize_t pm_async_show(struct kobject *kobj, struct kobj_attribute *attr,\n \t\t\t     char *buf)\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/linux/patches/raspberrypi/linux-051-ouya_controller_support.patch",
    "content": "commit 5a596921a4636e62843a59b7eab7b87b70a6d296\nAuthor: Lukas Rusak <lorusak@gmail.com>\nDate:   Sun May 6 22:03:11 2018 -0700\n\n    HID: add ouya HID driver\n    \n    This driver is a simple implementation to get the controller working and mapped properly.\n    This driver does not include functionality for the touchpad (yet). The original driver\n    was taken from from the ouya linux tree and has been simplified. It seems there may have\n    been other versions of the controller present that had a broken report descriptor. I have\n    removed that for now.\n\ndiff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig\nindex 60252fd796f6..6be2c454e72e 100644\n--- a/drivers/hid/Kconfig\n+++ b/drivers/hid/Kconfig\n@@ -659,6 +659,12 @@ config HID_ORTEK\n \t   - Ortek WKB-2000\n \t   - Skycable wireless presenter\n \n+config HID_OUYA\n+\ttristate \"OUYA Game Controller\"\n+\tdepends on USB_HID\n+\thelp\n+\t  Support for OUYA Game Controller.\n+\n config HID_PANTHERLORD\n \ttristate \"Pantherlord/GreenAsia game controller\"\n \tdepends on HID\ndiff --git a/drivers/hid/Makefile b/drivers/hid/Makefile\nindex 17a8bd97da9d..4425890934e4 100644\n--- a/drivers/hid/Makefile\n+++ b/drivers/hid/Makefile\n@@ -71,6 +71,7 @@ obj-$(CONFIG_HID_MULTITOUCH)\t+= hid-multitouch.o\n obj-$(CONFIG_HID_NTI)\t\t\t+= hid-nti.o\n obj-$(CONFIG_HID_NTRIG)\t\t+= hid-ntrig.o\n obj-$(CONFIG_HID_ORTEK)\t\t+= hid-ortek.o\n+obj-$(CONFIG_HID_OUYA)\t\t+= hid-ouya.o\n obj-$(CONFIG_HID_PRODIKEYS)\t+= hid-prodikeys.o\n obj-$(CONFIG_HID_PANTHERLORD)\t+= hid-pl.o\n obj-$(CONFIG_HID_PENMOUNT)\t+= hid-penmount.o\ndiff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h\nindex 0b5cc910f62e..0528efb825fa 100644\n--- a/drivers/hid/hid-ids.h\n+++ b/drivers/hid/hid-ids.h\n@@ -859,6 +859,9 @@\n #define USB_DEVICE_ID_ORTEK_WKB2000\t0x2000\n #define USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S\t0x8003\n \n+#define USB_VENDOR_ID_OUYA 0x2836\n+#define USB_DEVICE_ID_OUYA_CONTROLLER 0x0001\n+\n #define USB_VENDOR_ID_PLANTRONICS\t0x047f\n \n #define USB_VENDOR_ID_PANASONIC\t\t0x04da\ndiff --git a/drivers/hid/hid-ouya.c b/drivers/hid/hid-ouya.c\nnew file mode 100644\nindex 000000000000..4344a47b40af\n--- /dev/null\n+++ b/drivers/hid/hid-ouya.c\n@@ -0,0 +1,131 @@\n+/*\n+ *  HID driver for OUYA Game Controller(s)\n+ *\n+ *  Copyright (c) 2013 OUYA\n+ *  Copyright (c) 2013 Gregorios Leach <optikflux@gmail.com>\n+ *  Copyright (c) 2018 Lukas Rusak <lorusak@gmail.com>\n+ */\n+\n+#include <linux/device.h>\n+#include <linux/hid.h>\n+#include <linux/input.h>\n+#include <linux/module.h>\n+\n+#include \"hid-ids.h\"\n+\n+static const unsigned int ouya_absmap[] = {\n+\t[0x30] = ABS_X,\t\t/* left stick X */\n+\t[0x31] = ABS_Y,\t\t/* left stick Y */\n+\t[0x32] = ABS_Z,\t\t/* L2 */\n+\t[0x33] = ABS_RX,\t/* right stick X */\n+\t[0x34] = ABS_RY,\t/* right stick Y */\n+\t[0x35] = ABS_RZ,\t/* R2 */\n+};\n+\n+static const unsigned int ouya_keymap[] = {\n+\t[0x1] = BTN_SOUTH,\t/* O */\n+\t[0x2] = BTN_WEST,\t/* U */\n+\t[0x3] = BTN_NORTH,\t/* Y */\n+\t[0x4] = BTN_EAST,\t/* A */\n+\t[0x5] = BTN_TL,\t\t/* L1 */\n+\t[0x6] = BTN_TR,\t\t/* R1 */\n+\t[0x7] = BTN_THUMBL,\t/* L3 */\n+\t[0x8] = BTN_THUMBR,\t/* R3 */\n+\t[0x9] = BTN_DPAD_UP,\t/* Up */\n+\t[0xa] = BTN_DPAD_DOWN,\t/* Down */\n+\t[0xb] = BTN_DPAD_LEFT,\t/* Left */\n+\t[0xc] = BTN_DPAD_RIGHT, /* Right */\n+\t[0xd] = BTN_TL2,\t/* L2 */\n+\t[0xe] = BTN_TR2,\t/* R2 */\n+\t[0xf] = BTN_MODE,\t/* Power */\n+};\n+\n+static int ouya_input_mapping(struct hid_device *hdev, struct hid_input *hi,\n+\t\t\t       struct hid_field *field, struct hid_usage *usage,\n+\t\t\t       unsigned long **bit, int *max)\n+{\n+\tif ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) {\n+\t\tunsigned int key = usage->hid & HID_USAGE;\n+\n+\t\tif (key >= ARRAY_SIZE(ouya_keymap))\n+\t\t\treturn -1;\n+\n+\t\tkey = ouya_keymap[key];\n+\t\thid_map_usage_clear(hi, usage, bit, max, EV_KEY, key);\n+\n+\t\treturn 1;\n+\n+\t} else if ((usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK) {\n+\t\tunsigned int abs = usage->hid & HID_USAGE;\n+\n+\t\tif (abs >= ARRAY_SIZE(ouya_absmap))\n+\t\t\treturn -1;\n+\n+\t\tabs = ouya_absmap[abs];\n+\t\thid_map_usage_clear(hi, usage, bit, max, EV_ABS, abs);\n+\n+\t\treturn 1;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int ouya_probe(struct hid_device *hdev, const struct hid_device_id *id)\n+{\n+\tint ret;\n+\n+\tret = hid_parse(hdev);\n+\tif (ret) {\n+\t\thid_err(hdev, \"parse failed\\n\");\n+\t\tgoto err_free;\n+\t}\n+\n+\tret = hid_hw_start(hdev, HID_CONNECT_DEFAULT | HID_CONNECT_HIDDEV_FORCE);\n+\tif (ret) {\n+\t\thid_err(hdev, \"hw start failed\\n\");\n+\t\tgoto err_free;\n+\t}\n+\n+\treturn 0;\n+\n+err_free:\n+\treturn ret;\n+}\n+\n+static void ouya_remove(struct hid_device *hdev)\n+{\n+\thid_hw_stop(hdev);\n+\tkfree(hid_get_drvdata(hdev));\n+}\n+\n+static const struct hid_device_id ouya_devices[] = {\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },\n+\t{ }\n+};\n+MODULE_DEVICE_TABLE(hid, ouya_devices);\n+\n+static struct hid_driver ouya_driver = {\n+\t.name = \"ouya\",\n+\t.id_table = ouya_devices,\n+\t.input_mapping = ouya_input_mapping,\n+\t.probe = ouya_probe,\n+\t.remove = ouya_remove,\n+};\n+\n+static int __init ouya_init(void)\n+{\n+\treturn hid_register_driver(&ouya_driver);\n+}\n+\n+static void __exit ouya_exit(void)\n+{\n+\thid_unregister_driver(&ouya_driver);\n+}\n+\n+module_init(ouya_init);\n+module_exit(ouya_exit);\n+\n+MODULE_LICENSE(\"GPL\");\n+MODULE_AUTHOR(\"Lukas Rusak <lorusak@gmail.com>\");\n+MODULE_AUTHOR(\"Gregorios Leach <optikflux@gmail.com>\");\n+MODULE_DESCRIPTION(\"Ouya Controller Driver\");\ndiff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c\nindex 587e2681a53f..b5adc13e0df1 100644\n--- a/drivers/hid/hid-quirks.c\n+++ b/drivers/hid/hid-quirks.c\n@@ -538,6 +538,9 @@ static const struct hid_device_id hid_have_special_driver[] = {\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },\n #endif\n+#if IS_ENABLED(CONFIG_HID_OUYA)\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },\n+#endif\n #if IS_ENABLED(CONFIG_HID_PANTHERLORD)\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },\n"
  },
  {
    "path": "packages/linux/patches/raspberrypi/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch",
    "content": "From 7051422474e4c4e302ede3d07ffd8ef2682e07a2 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Tue, 22 Apr 2014 16:05:14 +0300\nSubject: [PATCH] [RFC] hid/sony: add autorepeat for PS3 remotes\n\nadapted to 4.6\n\nBetreff: [RFC] hid/sony: add autorepeat for PS3 remotes\nVon: David Dillow <dave@thedillows.org>\nDatum: 28.06.2013 04:28\nAn: linux-input@vger.kernel.org\nKopie (CC): Stephan Raue <stephan@openelec.tv>\n\nSome applications using the PS3 remote would like to have autorepeat\nfrom the device. Use the input subsystem's software emulation to provide\nthis capability, and enable those that don't need it to turn it off.\n---\nI'm not sure this is the correct approach, or if it is even appropriate\nfor a remote to do autorepeat. However, the media/rc subsystem does do\nit by default, and it's been requested by users, so there is at least\nsome demand.\n\nThis compiled against the hid-sony driver with the PS3 remote changes\nmerged, but I have done no testing of it. If the approach seems\nreasonable, I'll try to test it when the MythTV is idle.\n\nSigned-off-by: Matt DeVillier <matt.devillier@gmail.com>\n---\n drivers/hid/hid-sony.c | 21 +++++++++++++++++++++\n 1 file changed, 21 insertions(+)\n\ndiff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c\nindex 310436a..84f7f41 100644\n--- a/drivers/hid/hid-sony.c\n+++ b/drivers/hid/hid-sony.c\n@@ -1120,6 +1120,25 @@ static int ps3remote_mapping(struct hid_device *hdev, struct hid_input *hi,\n \treturn 1;\n }\n \n+static int ps3remote_setup_repeat(struct hid_device *hdev)\n+{\n+\tstruct hid_input *hidinput = list_first_entry(&hdev->inputs,\n+\t\t\t\t\t\t struct hid_input, list);\n+\tstruct input_dev *input = hidinput->input;\n+\n+\t/*\n+\t * Set up autorepeat defaults per the remote control subsystem;\n+\t * this must be done after hid_hw_start(), as having these non-zero\n+\t * at the time of input_register_device() tells the input system that\n+\t * the hardware does the autorepeat, and the PS3 remote does not.\n+\t*/\n+\tset_bit(EV_REP, input->evbit);\n+\tinput->rep[REP_DELAY]  = 500;\n+\tinput->rep[REP_PERIOD] = 125;\n+\n+\treturn 0;\n+}\n+\n static u8 *sony_report_fixup(struct hid_device *hdev, u8 *rdesc,\n \t\tunsigned int *rsize)\n {\n@@ -2372,6 +2391,8 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)\n \t\tsony_init_output_report(sc, dualshock4_send_output_report);\n \t} else if (sc->quirks & MOTION_CONTROLLER) {\n \t\tsony_init_output_report(sc, motion_send_output_report);\n+\t} else if (sc->quirks & PS3REMOTE) {\n+\t\tret = ps3remote_setup_repeat(hdev);\n \t} else {\n \t\tret = 0;\n \t}\n-- \n2.5.0\n"
  },
  {
    "path": "packages/linux/sysctl.d/network.conf",
    "content": "net.ipv4.tcp_no_metrics_save=1\n\n# generate/use temporary IPv6 addresses\nnet.ipv6.conf.all.use_tempaddr = 2\nnet.ipv6.conf.default.use_tempaddr = 2\n"
  },
  {
    "path": "packages/linux/sysctl.d/qdisc.conf",
    "content": "net.core.default_qdisc = fq_codel\n"
  },
  {
    "path": "packages/linux/udev.d/30-disable-wakeup.rules",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nACTION!=\"add|change\", GOTO=\"end\"\n\nDRIVER==\"ehci-pci|xhci_hcd\", RUN+=\"/usr/bin/sh -c 'echo disabled > /sys$devpath/power/wakeup'\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "packages/linux/udev.d/40-modeswitch.rules",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nACTION!=\"add|change\", GOTO=\"end_modeswitch\"\nKERNEL!=\"sr[0-9]*\", GOTO=\"end_modeswitch\"\nSUBSYSTEM!=\"block\", GOTO=\"end_modeswitch\"\n\n# Atheros Wireless / Netgear WNDA3200\nATTRS{idVendor}==\"0cf3\", ATTRS{idProduct}==\"20ff\", RUN+=\"/usr/bin/eject '/dev/%k'\"\n\n# Realtek RTL8821CU chipset 802.11ac NIC\n#   initial cdrom mode 0bda:1a2b, wlan mode 0bda:c811\n# Odroid WiFi Module 5B\n#   initial cdrom mode 0bda:1a2b, wlan mode 0bda:c820\nATTRS{idVendor}==\"0bda\", ATTRS{idProduct}==\"1a2b\", RUN+=\"/usr/bin/eject '/dev/%k'\"\n\nLABEL=\"end_modeswitch\"\n"
  },
  {
    "path": "packages/linux-driver-addons/dvb/crazycat/changelog.txt",
    "content": "100\n- Initial add-on\n"
  },
  {
    "path": "packages/linux-driver-addons/dvb/crazycat/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"crazycat\"\nPKG_VERSION=\"10.0-cc\"\nPKG_SHA256=\"66c298f178cac3bd5c2182cd42122c603bd9ae6e3abadc2ccc8be75112bd196e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/crazycat69/media_build\"\nPKG_URL=\"https://github.com/LibreELEC/media_build/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_UNPACK=\"media_tree_cc\"\nPKG_SECTION=\"driver.dvb\"\nPKG_LONGDESC=\"DVB driver for TBS cards with CrazyCats additions\"\n\nPKG_IS_ADDON=\"embedded\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_ADDON_IS_STANDALONE=\"yes\"\nPKG_ADDON_NAME=\"DVB drivers for TBS\"\nPKG_ADDON_TYPE=\"xbmc.service\"\nPKG_ADDON_VERSION=\"${ADDON_VERSION}.${PKG_REV}\"\n\nif [ \"${DEVICE}\" = \"Amlogic-ng\" ]; then\n  PKG_PATCH_DIRS=\"amlogic-4.9\"\n  PKG_DEPENDS_TARGET=\"${PKG_DEPENDS_TARGET} media_tree_aml\"\n  PKG_NEED_UNPACK=\"${PKG_NEED_UNPACK} $(get_pkg_directory media_tree_aml)\"\nfi\n\nif [ \"${DEVICE}\" = \"Amlogic-no\" ]; then\n  PKG_PATCH_DIRS=\"amlogic-5.15\"\n  PKG_DEPENDS_TARGET=\"${PKG_DEPENDS_TARGET} media_tree_aml\"\n  PKG_NEED_UNPACK=\"${PKG_NEED_UNPACK} $(get_pkg_directory media_tree_aml)\"\nfi\n\npre_make_target() {\n  export KERNEL_VER=$(get_module_dir)\n  export LDFLAGS=\"\"\n}\n\nmake_target() {\n  cp -RP $(get_build_dir media_tree_cc)/* ${PKG_BUILD}/linux\n  if [ \"${PROJECT}\" = \"Amlogic-ce\" ]; then\n    cp -Lr $(get_build_dir media_tree_aml)/* ${PKG_BUILD}/linux\n    echo \"obj-y += video_dev/\" >> \"${PKG_BUILD}/linux/drivers/media/platform/meson/Makefile\"\n    echo \"obj-y += dvb/\" >> \"${PKG_BUILD}/linux/drivers/media/platform/meson/Makefile\"\n    echo 'source \"drivers/media/platform/meson/dvb/Kconfig\"' >>  \"${PKG_BUILD}/linux/drivers/media/platform/Kconfig\"\n    sed -e 's/ && RC_CORE//g' -i ${PKG_BUILD}/linux/drivers/media/usb/dvb-usb/Kconfig\n  fi\n\n  # make config all\n  kernel_make VER=${KERNEL_VER} SRCDIR=$(kernel_path) allyesconfig\n\n  # hack to workaround media_build bug\n  if [ \"${PROJECT}\" = Rockchip ]; then\n    sed -e 's/CONFIG_DVB_CXD2820R=m/# CONFIG_DVB_CXD2820R is not set/g' -i v4l/.config\n    sed -e 's/CONFIG_DVB_LGDT3306A=m/# CONFIG_DVB_LGDT3306A is not set/g' -i v4l/.config\n  fi\n\n  # add menuconfig to edit .config\n  kernel_make VER=${KERNEL_VER} SRCDIR=$(kernel_path)\n}\n\nmakeinstall_target() {\n  install_driver_addon_files \"${PKG_BUILD}/v4l/\"\n}\n"
  },
  {
    "path": "packages/linux-driver-addons/dvb/crazycat/patches/disable-pci/crazycat-03-disable-partly-pci.patch",
    "content": "--- a/v4l/scripts/make_kconfig.pl\n+++ b/v4l/scripts/make_kconfig.pl\n@@ -626,6 +626,8 @@ ($$)\n close OUT;\n \n # These options should default to off\n+disable_config('VIDEO_SAA7146');\n+disable_config('VIDEO_SAA7146_VV');\n disable_config('DVB_AV7110_FIRMWARE');\n disable_config('DVB_CINERGYT2_TUNING');\n disable_config('VIDEO_HELPER_CHIPS_AUTO');\n"
  },
  {
    "path": "packages/linux-driver-addons/dvb/crazycat/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n"
  },
  {
    "path": "packages/linux-driver-addons/dvb/depends/media_tree/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"media_tree\"\nPKG_VERSION=\"2021-04-08-4f4e6644cd87\"\nPKG_SHA256=\"894530c842092646631a1595c7dff04e7a0ec55f4c7f246b8f89aa56f41d486e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://git.linuxtv.org/media_tree.git\"\nPKG_URL=\"http://linuxtv.org/downloads/drivers/linux-media-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"Source of Linux Kernel media_tree subsystem to build with media_build.\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}/\n  tar -xf ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.bz2 -C ${PKG_BUILD}/\n}\n\npost_unpack() {\n  # hack/workaround for borked upstream kernel/media_build\n  # without removing atomisp there a lot additional includes that\n  # slowdown build process after modpost from 3min to 6min\n  # even if atomisp is disabled via kernel.conf\n  rm -rf ${PKG_BUILD}/drivers/staging/media/atomisp\n  sed -i 's|^.*drivers/staging/media/atomisp.*$||' \\\n    ${PKG_BUILD}/drivers/staging/media/Kconfig\n}\n"
  },
  {
    "path": "packages/linux-driver-addons/dvb/depends/media_tree_cc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"media_tree_cc\"\nPKG_VERSION=\"2021-02-16\"\nPKG_SHA256=\"a4bc981015d48fda009f5588c001dbce6f67e11055efc7e58d3abceef95188fd\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/crazycat69/linux_media\"\nPKG_URL=\"${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"Source of Linux Kernel media_tree subsystem to build with media_build.\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}/\n  tar -xf ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.bz2 -C ${PKG_BUILD}/\n}\n\npost_unpack() {\n  # hack/workaround for borked upstream kernel/media_build\n  # without removing atomisp there a lot additional includes that\n  # slowdown build process after modpost from 3min to 6min\n  # even if atomisp is disabled via kernel.conf\n  rm -rf ${PKG_BUILD}/drivers/staging/media/atomisp\n  sed -i 's|^.*drivers/staging/media/atomisp.*$||' \\\n    ${PKG_BUILD}/drivers/staging/media/Kconfig\n}\n"
  },
  {
    "path": "packages/linux-driver-addons/dvb/digital_devices/changelog.txt",
    "content": "100\n- Initial add-on\n"
  },
  {
    "path": "packages/linux-driver-addons/dvb/digital_devices/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"digital_devices\"\nPKG_VERSION=\"7d8a151127848288b7582ff772145849b35ad98f\"\nPKG_SHA256=\"b727f8b44f8df9c7732048f18dd5dda9269ce72aa7d3e96aeef6023f835f2acb\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/DigitalDevices/dddvb/\"\nPKG_URL=\"https://github.com/DigitalDevices/dddvb/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_BUILD_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_SECTION=\"driver.dvb\"\nPKG_LONGDESC=\"DVB driver for Digital Devices cards\"\n\nPKG_IS_ADDON=\"embedded\"\nPKG_ADDON_IS_STANDALONE=\"yes\"\nPKG_ADDON_NAME=\"DVB drivers for DigitalDevices\"\nPKG_ADDON_TYPE=\"xbmc.service\"\nPKG_ADDON_VERSION=\"${ADDON_VERSION}.${PKG_REV}\"\n\nmake_target() {\n  KDIR=$(kernel_path) make\n}\n\nmakeinstall_target() {\n  install_driver_addon_files \"${PKG_BUILD}/ddbridge ${PKG_BUILD}/dvb-core ${PKG_BUILD}/frontends\"\n}\n"
  },
  {
    "path": "packages/linux-driver-addons/dvb/digital_devices/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n"
  },
  {
    "path": "packages/linux-driver-addons/dvb/dvb-latest/changelog.txt",
    "content": "100\n- Initial add-on\n"
  },
  {
    "path": "packages/linux-driver-addons/dvb/dvb-latest/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dvb-latest\"\nPKG_VERSION=\"10.0-latest\"\nPKG_SHA256=\"50ed45ec6eeac0c8d537f8de3e7e82ef1f37b2f91552cdd99fbda05e5646f351\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://git.linuxtv.org/media_build.git\"\nPKG_URL=\"https://github.com/LibreELEC/media_build/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_UNPACK=\"media_tree\"\nPKG_SECTION=\"driver.dvb\"\nPKG_LONGDESC=\"DVB drivers from the latest kernel (media_build)\"\n\nPKG_IS_ADDON=\"embedded\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_ADDON_IS_STANDALONE=\"yes\"\nPKG_ADDON_NAME=\"DVB drivers from the latest kernel\"\nPKG_ADDON_TYPE=\"xbmc.service\"\nPKG_ADDON_VERSION=\"${ADDON_VERSION}.${PKG_REV}\"\n\nif [ \"${PROJECT}\" = \"Amlogic-ce\" ]; then\n  PKG_PATCH_DIRS=\"amlogic-common\"\n  case \"${LINUX}\" in\n    amlogic-3.14)\n      PKG_PATCH_DIRS+=\" amlogic-3.14\"\n      ;;\n    amlogic-4.9)\n      PKG_PATCH_DIRS+=\" amlogic-4.9\"\n      ;;\n  esac\n  PKG_DEPENDS_TARGET=\"${PKG_DEPENDS_TARGET} media_tree_aml\"\n  PKG_NEED_UNPACK=\"${PKG_NEED_UNPACK} $(get_pkg_directory media_tree_aml)\"\nfi\n\npre_make_target() {\n  export KERNEL_VER=$(get_module_dir)\n  export LDFLAGS=\"\"\n}\n\nmake_target() {\n  cp -RP $(get_build_dir media_tree)/* ${PKG_BUILD}/linux\n\n  if [ \"${PROJECT}\" = \"Amlogic-ce\" ]; then\n    cp -Lr $(get_build_dir media_tree_aml)/* ${PKG_BUILD}/linux\n\n    # compile modules\n    echo \"obj-y += video_dev/\" >> \"${PKG_BUILD}/linux/drivers/media/platform/meson/Makefile\"\n    echo \"obj-y += dvb/\" >> \"${PKG_BUILD}/linux/drivers/media/platform/meson/Makefile\"\n    echo 'source \"drivers/media/platform/meson/dvb/Kconfig\"' >>  \"${PKG_BUILD}/linux/drivers/media/platform/Kconfig\"\n    sed -e 's/ && RC_CORE//g' -i ${PKG_BUILD}/linux/drivers/media/usb/dvb-usb/Kconfig\n  fi\n\n  # make config all\n  kernel_make VER=${KERNEL_VER} SRCDIR=$(kernel_path) allyesconfig\n\n  kernel_make VER=${KERNEL_VER} SRCDIR=$(kernel_path)\n}\n\nmakeinstall_target() {\n  install_driver_addon_files \"${PKG_BUILD}/v4l/\"\n}\n"
  },
  {
    "path": "packages/linux-driver-addons/dvb/dvb-latest/patches/disable-pci/dvb-latest-03-disable-partly-pci.patch",
    "content": "--- a/v4l/scripts/make_kconfig.pl\n+++ b/v4l/scripts/make_kconfig.pl\n@@ -626,6 +626,8 @@ ($$)\n close OUT;\n \n # These options should default to off\n+disable_config('VIDEO_SAA7146');\n+disable_config('VIDEO_SAA7146_VV');\n disable_config('DVB_AV7110_FIRMWARE');\n disable_config('DVB_CINERGYT2_TUNING');\n disable_config('VIDEO_HELPER_CHIPS_AUTO');\n"
  },
  {
    "path": "packages/linux-driver-addons/dvb/dvb-latest/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n"
  },
  {
    "path": "packages/linux-drivers/RTL8192DU/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"RTL8192DU\"\nPKG_VERSION=\"5e03c430b3a132ae461a8b27e17fac72680db3e2\"\nPKG_SHA256=\"ae7282c60b9a327b64524ff885e535b169db0b32446cd9a0404694ad0dcbc59e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/lwfinger/rtl8192du\"\nPKG_URL=\"https://github.com/lwfinger/rtl8192du/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"Realtek RTL8192DU Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make V=1 \\\n       ARCH=${TARGET_KERNEL_ARCH} \\\n       KSRC=$(kernel_path) \\\n       CROSS_COMPILE=${TARGET_KERNEL_PREFIX} \\\n       CONFIG_POWER_SAVING=n\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n    cp *.ko ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n}\n"
  },
  {
    "path": "packages/linux-drivers/RTL8192DU/patches/RTL8192DU-0001-remove_overlapping_pids.patch",
    "content": "diff -Naur RTL8192DU-085e206/os_dep/usb_intf.c RTL8192DU-085e206.patch/os_dep/usb_intf.c\n--- RTL8192DU-085e206/os_dep/usb_intf.c\t2014-03-25 15:48:57.000000000 +0100\n+++ RTL8192DU-085e206.patch/os_dep/usb_intf.c\t2014-04-11 09:23:12.097223906 +0200\n@@ -137,7 +137,7 @@\n \t{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8194)},/* 8192DU-VS */ \\\n \t{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8111)},/* Realtek 5G dongle for WiFi Display */ \\\n \t{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0193)},/* 8192DE-VAU */ \\\n-\t{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8171)},/* 8192DU-VC */ \\\n+/*\t{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8171)}, 8192DU-VC overlaps with in-kernel rtl8192se */ \\\n \t/*=== Customer ID ===*/ \\\n \t/****** 8192DU-VC ********/ \\\n \t{USB_DEVICE(0x2019, 0xAB2C)},/* PCI - Abocm */ \\\n"
  },
  {
    "path": "packages/linux-drivers/RTL8192DU/patches/aarch64/RTL8192DU-0101-PR63.patch",
    "content": "From fb85a57a5cd6241cc8c066c5efc5b43781b0e42d Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Wed, 13 Jun 2018 06:43:10 +0100\nSubject: [PATCH] aarch64/4.4.y: implicit declaration of function\n 'csum_ipv6_magic'\n\n---\n core/rtw_br_ext.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c\nindex da9c5e5..19af0fe 100644\n--- a/core/rtw_br_ext.c\n+++ b/core/rtw_br_ext.c\n@@ -51,6 +51,7 @@\n #include <linux/icmpv6.h>\n #include <net/ndisc.h>\n #include <net/checksum.h>\n+#include <net/ip6_checksum.h>\n #endif\n #endif\n \n-- \n2.14.1\n\n"
  },
  {
    "path": "packages/linux-drivers/RTL8812AU/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"RTL8812AU\"\nPKG_VERSION=\"eee82ac1401e211a58a42cd89ab788b4f55040af\"\nPKG_SHA256=\"d45d1aec81f293e64dc3e45f4350cf51d628ee08d6a28a9a5eca7d1647c7656f\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/aircrack-ng/rtl8812au\"\nPKG_URL=\"https://github.com/aircrack-ng/rtl8812au/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"Realtek RTL8812AU Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\nexport KCFLAGS+=\" -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-address -Wno-stringop-overread\"\n  make V=1 \\\n       ARCH=${TARGET_KERNEL_ARCH} \\\n       KSRC=$(kernel_path) \\\n       CROSS_COMPILE=${TARGET_KERNEL_PREFIX} \\\n       CONFIG_POWER_SAVING=n\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n    cp *.ko ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n}\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n# Downloadlocation:\n# http://www.broadcom.com/support/802.11/linux_sta.php\n\nPKG_NAME=\"bcm_sta\"\nPKG_VERSION=\"6.30.223.271\"\nPKG_SHA256=\"959bcd1e965d294304a4e290cb8e47b7c74b9763094eff4d0b8e6cfb68a6895b\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"http://www.broadcom.com/\"\nPKG_URL=\"${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_LONGDESC=\"Broadcom's BCM4311-, BCM4312-, BCM4313-, BCM4321-, BCM4322-, BCM43224-, and BCM43225-based WLAN driver.\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\nmake_target() {\n  cd x86-64\n    KBUILD_NOPEDANTIC=1 kernel_make V=1 CC=${CC} -C $(kernel_path) M=$(pwd) BINARCH=${TARGET_KERNEL_ARCH}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/bcm_sta\n    cp *.ko ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n}\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0001-change-eth-to-wlan.patch",
    "content": "From c51168b8481e84743b50d3d5cba18a4a0a188448 Mon Sep 17 00:00:00 2001\nFrom: Alberto Milone <alberto.milone@canonical.com>\nDate: Fri, 22 Nov 2013 10:07:33 +0100\nSubject: [PATCH 1/1] Change the network interface name from eth to wlan\n\nThanks to Shuduo Sang for the patch.\n---\n src/wl/sys/wl_linux.c |    2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/x86-64/src/wl/sys/wl_linux.c b/x86-64/src/wl/sys/wl_linux.c\nindex 3ead3c3..b662ff7 100644\n--- a/x86-64/src/wl/sys/wl_linux.c\n+++ b/x86-64/src/wl/sys/wl_linux.c\n@@ -235,7 +235,7 @@ module_param(nompc, int, 0);\n #define to_str(s) #s\n #define quote_str(s) to_str(s)\n \n-#define BRCM_WLAN_IFNAME eth%d\n+#define BRCM_WLAN_IFNAME wlan%d\n \n static char intf_name[IFNAMSIZ] = quote_str(BRCM_WLAN_IFNAME);\n \n-- \n1.7.9.5\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0002-user_ioctl.patch",
    "content": "--- a/x86-64/src/wl/sys/wl_linux.c\n+++ b/x86-64/src/wl/sys/wl_linux.c\n@@ -1659,11 +1659,7 @@\n \t}\n \n \tWL_LOCK(wl);\n-\tif (!capable(CAP_NET_ADMIN)) {\n-\t\tbcmerror = BCME_EPERM;\n-\t} else {\n-\t\tbcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);\n-\t}\n+\tbcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);\n \tWL_UNLOCK(wl);\n \n done1:\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0003-remove-date-time-macros.patch",
    "content": "--- a/x86-64/src/wl/sys/wl_linux.c\n+++ b/x86-64/src/wl/sys/wl_linux.c\n@@ -724,7 +724,7 @@ wl_attach(uint16 vendor, uint16 device,\n \t\tWL_ALL_PASSIVE_ENAB(wl) ?  \", Passive Mode\" : \"\", EPI_VERSION_STR);\n \n #ifdef BCMDBG\n-\tprintf(\" (Compiled in \" SRCBASE \" at \" __TIME__ \" on \" __DATE__ \")\");\n+\tprintf(\" (Compiled in \" SRCBASE \")\");\n #endif \n \tprintf(\"\\n\");\n \n@@ -2049,8 +2049,7 @@ wl_osl_pcie_rc(struct wl_info *wl, uint\n void\n wl_dump_ver(wl_info_t *wl, struct bcmstrbuf *b)\n {\n-\tbcm_bprintf(b, \"wl%d: %s %s version %s\\n\", wl->pub->unit,\n-\t\t__DATE__, __TIME__, EPI_VERSION_STR);\n+\tbcm_bprintf(b, \"wl%d: version %s\\n\", wl->pub->unit, EPI_VERSION_STR);\n }\n \n #if defined(BCMDBG)\n\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0004-null-pointer-crash.patch",
    "content": "--- a/x86-64/src/wl/sys/wl_linux.c\n+++ b/x86-64/src/wl/sys/wl_linux.c\n@@ -2160,8 +2160,8 @@ wl_start(struct sk_buff *skb, struct net\n \twlif = WL_DEV_IF(dev);\n \twl = WL_INFO(dev);\n \n+\tskb->prev = NULL;\n \tif (WL_ALL_PASSIVE_ENAB(wl) || (WL_RTR() && WL_CONFIG_SMP())) {\n-\t\tskb->prev = NULL;\n \n \t\tTXQ_LOCK(wl);\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0005-rdtscl.patch",
    "content": "--- a/x86-64/src/shared/linux_osl.c\t2015-09-19 01:47:15.000000000 +0300\n+++ b/x86-64/src/shared/linux_osl.c\t2015-11-21 15:20:30.585902518 +0200\n@@ -932,7 +932,11 @@\n \tuint cycles;\n \n #if defined(__i386__)\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)\n+\tcycles = (u32)rdtsc();\n+#else\n \trdtscl(cycles);\n+#endif\n #else\n \tcycles = 0;\n #endif\n\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0006-kernel-4.7.patch",
    "content": "diff -Naur a/x86-32/src/wl/sys/wl_cfg80211_hybrid.c b/x86-32/src/wl/sys/wl_cfg80211_hybrid.c\n--- a/x86-32/src/wl/sys/wl_cfg80211_hybrid.c\t2016-06-23 14:26:16.911221749 +0100\n+++ b/x86-32/src/wl/sys/wl_cfg80211_hybrid.c\t2016-06-23 14:26:49.071406220 +0100\n@@ -236,7 +236,7 @@\n #endif\t\t\t\t\n \n #define CHAN2G(_channel, _freq, _flags) {\t\t\t\\\n-\t.band\t\t\t= IEEE80211_BAND_2GHZ,\t\t\\\n+\t.band\t\t\t= NL80211_BAND_2GHZ,\t\t\\\n \t.center_freq\t\t= (_freq),\t\t\t\\\n \t.hw_value\t\t= (_channel),\t\t\t\\\n \t.flags\t\t\t= (_flags),\t\t\t\\\n@@ -245,7 +245,7 @@\n }\n \n #define CHAN5G(_channel, _flags) {\t\t\t\t\\\n-\t.band\t\t\t= IEEE80211_BAND_5GHZ,\t\t\\\n+\t.band\t\t\t= NL80211_BAND_5GHZ,\t\t\\\n \t.center_freq\t\t= 5000 + (5 * (_channel)),\t\\\n \t.hw_value\t\t= (_channel),\t\t\t\\\n \t.flags\t\t\t= (_flags),\t\t\t\\\n@@ -379,7 +379,7 @@\n };\n \n static struct ieee80211_supported_band __wl_band_2ghz = {\n-\t.band = IEEE80211_BAND_2GHZ,\n+\t.band = NL80211_BAND_2GHZ,\n \t.channels = __wl_2ghz_channels,\n \t.n_channels = ARRAY_SIZE(__wl_2ghz_channels),\n \t.bitrates = wl_g_rates,\n@@ -387,7 +387,7 @@\n };\n \n static struct ieee80211_supported_band __wl_band_5ghz_a = {\n-\t.band = IEEE80211_BAND_5GHZ,\n+\t.band = NL80211_BAND_5GHZ,\n \t.channels = __wl_5ghz_a_channels,\n \t.n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),\n \t.bitrates = wl_a_rates,\n@@ -395,7 +395,7 @@\n };\n \n static struct ieee80211_supported_band __wl_band_5ghz_n = {\n-\t.band = IEEE80211_BAND_5GHZ,\n+\t.band = NL80211_BAND_5GHZ,\n \t.channels = __wl_5ghz_n_channels,\n \t.n_channels = ARRAY_SIZE(__wl_5ghz_n_channels),\n \t.bitrates = wl_a_rates,\n@@ -1876,8 +1876,8 @@\n \twdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;\n #endif\n \twdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC);\n-\twdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;\n-\twdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a; \n+\twdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz;\n+\twdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a; \n \twdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;\n \twdev->wiphy->cipher_suites = __wl_cipher_suites;\n \twdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);\n@@ -2000,7 +2000,7 @@\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)\n \tfreq = ieee80211_channel_to_frequency(notif_bss_info->channel,\n \t\t(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ?\n-\t\tIEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);\n+\t\tNL80211_BAND_2GHZ : NL80211_BAND_5GHZ);\n #else\n \tfreq = ieee80211_channel_to_frequency(notif_bss_info->channel);\n #endif\n@@ -2116,7 +2116,7 @@\n \t\t\t\treturn err;\n \t\t\t}\n \t\t\tchan = wf_chspec_ctlchan(chanspec);\n-\t\t\tband = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;\n+\t\t\tband = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;\n \t\t\tfreq = ieee80211_channel_to_frequency(chan, band);\n \t\t\tchannel = ieee80211_get_channel(wiphy, freq);\n \t\t\tcfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);\n@@ -2250,10 +2250,10 @@\n \t\tjoin_params->params.chanspec_list[0] =\n \t\t    ieee80211_frequency_to_channel(chan->center_freq);\n \n-\t\tif (chan->band == IEEE80211_BAND_2GHZ) {\n+\t\tif (chan->band == NL80211_BAND_2GHZ) {\n \t\t\tchanspec |= WL_CHANSPEC_BAND_2G;\n \t\t}\n-\t\telse if (chan->band == IEEE80211_BAND_5GHZ) {\n+\t\telse if (chan->band == NL80211_BAND_5GHZ) {\n \t\t\tchanspec |= WL_CHANSPEC_BAND_5G;\n \t\t}\n \t\telse {\n@@ -2885,7 +2885,7 @@\n \n \tif (phy == 'n' || phy == 'a' || phy == 'v') {\n \t\twiphy = wl_to_wiphy(wl);\n-\t\twiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n;\n+\t\twiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n;\n \t}\n \n \treturn err;\ndiff -Naur a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\n--- a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\t2016-06-23 14:26:22.639254590 +0100\n+++ b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\t2016-06-23 14:27:01.507477603 +0100\n@@ -236,7 +236,7 @@\n #endif\t\t\t\t\n \n #define CHAN2G(_channel, _freq, _flags) {\t\t\t\\\n-\t.band\t\t\t= IEEE80211_BAND_2GHZ,\t\t\\\n+\t.band\t\t\t= NL80211_BAND_2GHZ,\t\t\\\n \t.center_freq\t\t= (_freq),\t\t\t\\\n \t.hw_value\t\t= (_channel),\t\t\t\\\n \t.flags\t\t\t= (_flags),\t\t\t\\\n@@ -245,7 +245,7 @@\n }\n \n #define CHAN5G(_channel, _flags) {\t\t\t\t\\\n-\t.band\t\t\t= IEEE80211_BAND_5GHZ,\t\t\\\n+\t.band\t\t\t= NL80211_BAND_5GHZ,\t\t\\\n \t.center_freq\t\t= 5000 + (5 * (_channel)),\t\\\n \t.hw_value\t\t= (_channel),\t\t\t\\\n \t.flags\t\t\t= (_flags),\t\t\t\\\n@@ -379,7 +379,7 @@\n };\n \n static struct ieee80211_supported_band __wl_band_2ghz = {\n-\t.band = IEEE80211_BAND_2GHZ,\n+\t.band = NL80211_BAND_2GHZ,\n \t.channels = __wl_2ghz_channels,\n \t.n_channels = ARRAY_SIZE(__wl_2ghz_channels),\n \t.bitrates = wl_g_rates,\n@@ -387,7 +387,7 @@\n };\n \n static struct ieee80211_supported_band __wl_band_5ghz_a = {\n-\t.band = IEEE80211_BAND_5GHZ,\n+\t.band = NL80211_BAND_5GHZ,\n \t.channels = __wl_5ghz_a_channels,\n \t.n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),\n \t.bitrates = wl_a_rates,\n@@ -395,7 +395,7 @@\n };\n \n static struct ieee80211_supported_band __wl_band_5ghz_n = {\n-\t.band = IEEE80211_BAND_5GHZ,\n+\t.band = NL80211_BAND_5GHZ,\n \t.channels = __wl_5ghz_n_channels,\n \t.n_channels = ARRAY_SIZE(__wl_5ghz_n_channels),\n \t.bitrates = wl_a_rates,\n@@ -1876,8 +1876,8 @@\n \twdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;\n #endif\n \twdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC);\n-\twdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;\n-\twdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a; \n+\twdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz;\n+\twdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a; \n \twdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;\n \twdev->wiphy->cipher_suites = __wl_cipher_suites;\n \twdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);\n@@ -2000,7 +2000,7 @@\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)\n \tfreq = ieee80211_channel_to_frequency(notif_bss_info->channel,\n \t\t(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ?\n-\t\tIEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);\n+\t\tNL80211_BAND_2GHZ : NL80211_BAND_5GHZ);\n #else\n \tfreq = ieee80211_channel_to_frequency(notif_bss_info->channel);\n #endif\n@@ -2116,7 +2116,7 @@\n \t\t\t\treturn err;\n \t\t\t}\n \t\t\tchan = wf_chspec_ctlchan(chanspec);\n-\t\t\tband = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;\n+\t\t\tband = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;\n \t\t\tfreq = ieee80211_channel_to_frequency(chan, band);\n \t\t\tchannel = ieee80211_get_channel(wiphy, freq);\n \t\t\tcfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);\n@@ -2250,10 +2250,10 @@\n \t\tjoin_params->params.chanspec_list[0] =\n \t\t    ieee80211_frequency_to_channel(chan->center_freq);\n \n-\t\tif (chan->band == IEEE80211_BAND_2GHZ) {\n+\t\tif (chan->band == NL80211_BAND_2GHZ) {\n \t\t\tchanspec |= WL_CHANSPEC_BAND_2G;\n \t\t}\n-\t\telse if (chan->band == IEEE80211_BAND_5GHZ) {\n+\t\telse if (chan->band == NL80211_BAND_5GHZ) {\n \t\t\tchanspec |= WL_CHANSPEC_BAND_5G;\n \t\t}\n \t\telse {\n@@ -2885,7 +2885,7 @@\n \n \tif (phy == 'n' || phy == 'a' || phy == 'v') {\n \t\twiphy = wl_to_wiphy(wl);\n-\t\twiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n;\n+\t\twiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n;\n \t}\n \n \treturn err;\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0007-kernel-4.8.patch",
    "content": "diff -Naur a/x86-32/src/wl/sys/wl_cfg80211_hybrid.c b/x86-32/src/wl/sys/wl_cfg80211_hybrid.c\n--- a/x86-32/src/wl/sys/wl_cfg80211_hybrid.c\t2016-09-11 01:59:36.987804240 +0100\n+++ b/x86-32/src/wl/sys/wl_cfg80211_hybrid.c\t2016-09-11 02:02:44.876069294 +0100\n@@ -2387,7 +2387,14 @@\n \n \tif (wl->scan_request) {\n \t\tWL_DBG((\"%s: Aborting scan\\n\", __FUNCTION__));\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)\n+\t\tstruct cfg80211_scan_info info = {\n+\t\t\t.aborted = true\n+\t\t};\n+\t\tcfg80211_scan_done(wl->scan_request, &info);     \n+#else\n \t\tcfg80211_scan_done(wl->scan_request, true);     \n+#endif\n \t\twl->scan_request = NULL;\n \t}\n \n@@ -2488,7 +2495,14 @@\n \n scan_done_out:\n \tif (wl->scan_request) {\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)\n+\t\tstruct cfg80211_scan_info info = {\n+\t\t\t.aborted = false\n+\t\t};\n+\t\tcfg80211_scan_done(wl->scan_request, &info);\n+#else\n \t\tcfg80211_scan_done(wl->scan_request, false);\n+#endif\n \t\twl->scan_request = NULL;\n \t}\n \trtnl_unlock();\n@@ -2913,7 +2927,14 @@\n \ts32 err = 0;\n \n \tif (wl->scan_request) {\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)\n+\t\tstruct cfg80211_scan_info info = {\n+\t\t\t.aborted = true\n+\t\t};\n+\t\tcfg80211_scan_done(wl->scan_request, &info);\t\n+#else\n \t\tcfg80211_scan_done(wl->scan_request, true);\t\n+#endif\n \t\twl->scan_request = NULL;\n \t}\n \ndiff -Naur a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\n--- a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\t2016-09-11 01:59:50.796117742 +0100\n+++ b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\t2016-09-11 02:04:12.290053058 +0100\n@@ -2387,7 +2387,14 @@\n \n \tif (wl->scan_request) {\n \t\tWL_DBG((\"%s: Aborting scan\\n\", __FUNCTION__));\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)\n+\t\tstruct cfg80211_scan_info info = {\n+\t\t\t.aborted = true\n+\t\t};\n+\t\tcfg80211_scan_done(wl->scan_request, &info);     \n+#else\n \t\tcfg80211_scan_done(wl->scan_request, true);     \n+#endif\n \t\twl->scan_request = NULL;\n \t}\n \n@@ -2488,7 +2495,14 @@\n \n scan_done_out:\n \tif (wl->scan_request) {\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)\n+\t\tstruct cfg80211_scan_info info = {\n+\t\t\t.aborted = false\n+\t\t};\n+\t\tcfg80211_scan_done(wl->scan_request, &info);\n+#else\n \t\tcfg80211_scan_done(wl->scan_request, false);\n+#endif\n \t\twl->scan_request = NULL;\n \t}\n \trtnl_unlock();\n@@ -2913,7 +2927,14 @@\n \ts32 err = 0;\n \n \tif (wl->scan_request) {\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)\n+\t\tstruct cfg80211_scan_info info = {\n+\t\t\t.aborted = true\n+\t\t};\n+\t\tcfg80211_scan_done(wl->scan_request, &info);\t\n+#else\n \t\tcfg80211_scan_done(wl->scan_request, true);\t\n+#endif\n \t\twl->scan_request = NULL;\n \t}\n \n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0008-kernel-4.11.patch",
    "content": "From 7e8dddb7a545bc5ba74336ef2aafed1c0b4ceee1 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Mon, 13 Mar 2017 20:48:44 +0000\nSubject: [PATCH 1/2] bcm_sta: Fix build for API changes in kernel 4.11\n\n---\n x86-64/src/wl/sys/wl_cfg80211_hybrid.c | 4 ++++\n x86-64/src/wl/sys/wl_linux.c           | 4 ++++\n 2 files changed, 8 insertions(+)\n\ndiff --git a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\nindex 7b606e0..76ef208 100644\n--- a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\n+++ b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\n@@ -26,6 +26,10 @@\n #include <linuxver.h>\n #include <osl.h>\n \n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)\n+#include <linux/sched/signal.h>\n+#endif\n+\n #include <linux/kernel.h>\n #include <linux/kthread.h>\n #include <linux/netdevice.h>\ndiff --git a/x86-64/src/wl/sys/wl_linux.c b/x86-64/src/wl/sys/wl_linux.c\nindex 0d05100..dca7c71 100644\n--- a/x86-64/src/wl/sys/wl_linux.c\n+++ b/x86-64/src/wl/sys/wl_linux.c\n@@ -26,6 +26,10 @@\n #include <typedefs.h>\n #include <linuxver.h>\n #include <osl.h>\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)\n+#include <linux/sched/signal.h>\n+#endif\n+\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)\n #include <linux/module.h>\n #endif\n-- \n2.7.4\n\n\nFrom 1d066a57a682af0ac42b8d1c65bf7bd1984a54ca Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Mon, 13 Mar 2017 20:49:01 +0000\nSubject: [PATCH 2/2] bcm_sta: Remove usage of net_device last_rx member\n\n---\n x86-64/src/wl/sys/wl_linux.c | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/x86-64/src/wl/sys/wl_linux.c b/x86-64/src/wl/sys/wl_linux.c\nindex dca7c71..f3be019 100644\n--- a/x86-64/src/wl/sys/wl_linux.c\n+++ b/x86-64/src/wl/sys/wl_linux.c\n@@ -2919,7 +2919,6 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)\n \tif (skb == NULL) return;\n \n \tskb->dev = wl->monitor_dev;\n-\tskb->dev->last_rx = jiffies;\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)\n \tskb_reset_mac_header(skb);\n #else\n-- \n2.7.4\n\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0009-kernel-4.12.patch",
    "content": "From 268500240a551436c5003f5843ff4d090bf3e202 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Thu, 18 May 2017 12:52:55 +0100\nSubject: [PATCH] Fix build with kernel 4.12-rc1\n\n---\n x86-64/src/wl/sys/wl_cfg80211_hybrid.c | 25 +++++++++++++++++++++++++\n 1 file changed, 25 insertions(+)\n\ndiff --git a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\nindex 7b606e0..cedf95c 100644\n--- a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\n+++ b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\n@@ -49,8 +49,13 @@ u32 wl_dbg_level = WL_DBG_ERR | WL_DBG_INFO;\n u32 wl_dbg_level = WL_DBG_ERR;\n #endif\n \n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)\n+static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,\n+           enum nl80211_iftype type, struct vif_params *params);\n+#else\n static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,\n            enum nl80211_iftype type, u32 *flags, struct vif_params *params);\n+#endif\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)\n static s32\n wl_cfg80211_scan(struct wiphy *wiphy,\n@@ -461,10 +466,16 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)\n \treturn err;\n }\n \n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)\n+static s32\n+wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,\n+                         enum nl80211_iftype type, struct vif_params *params)\n+#else\n static s32\n wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,\n                          enum nl80211_iftype type, u32 *flags,\n    struct vif_params *params)\n+#endif\n {\n \tstruct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);\n \tstruct wireless_dev *wdev;\n@@ -2364,6 +2375,19 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,\n \tmemcpy(wl->profile->bssid, &e->addr, ETHER_ADDR_LEN);\n \tmemcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);\n \twl_update_bss_info(wl);\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)\n+\t{\n+\t\tstruct cfg80211_roam_info roam_info = {\n+\t\t\t.channel = &wl->conf->channel,\n+\t\t\t.bssid = (u8 *)&wl->bssid,\n+\t\t\t.req_ie = conn_info->req_ie,\n+\t\t\t.req_ie_len = conn_info->req_ie_len,\n+\t\t\t.resp_ie = conn_info->resp_ie,\n+\t\t\t.resp_ie_len = conn_info->resp_ie_len,\n+\t\t};\n+\t\tcfg80211_roamed(ndev, &roam_info, GFP_KERNEL);\n+\t}\n+#else\n \tcfg80211_roamed(ndev,\n #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)\n \t\t\t&wl->conf->channel,\t \n@@ -2371,6 +2395,7 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,\n \t\t\t(u8 *)&wl->bssid,\n \t\t\tconn_info->req_ie, conn_info->req_ie_len,\n \t\t\tconn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);\n+#endif\n \tWL_DBG((\"Report roaming result\\n\"));\n \n \tset_bit(WL_STATUS_CONNECTED, &wl->status);\n-- \n2.7.4\n\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0010-kernel-4.15.patch",
    "content": "From a893fac9b9e883f39a545e8ce87926cecc26ba12 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Sun, 10 Jun 2018 19:13:17 +0100\nSubject: [PATCH] add 4.15.y support\n\nCredit: https://github.com/UnitedRPMs/broadcom-wl-dkms/blob/5147b5f1867273e2762f777fd724b6523c3ab8dd/008-linux415.patch\n---\n x86-64/src/wl/sys/wl_linux.c | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)\n\ndiff --git a/x86-64/src/wl/sys/wl_linux.c b/x86-64/src/wl/sys/wl_linux.c\nindex f7149da..89a3831 100644\n--- a/x86-64/src/wl/sys/wl_linux.c\n+++ b/x86-64/src/wl/sys/wl_linux.c\n@@ -97,7 +97,11 @@ struct iw_statistics *wl_get_wireless_stats(struct net_device *dev);\n \n #include <wlc_wowl.h>\n \n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)\n+static void wl_timer(struct timer_list *tl);\n+#else\n static void wl_timer(ulong data);\n+#endif\n static void _wl_timer(wl_timer_t *t);\n static struct net_device *wl_alloc_linux_if(wl_if_t *wlif);\n \n@@ -2296,10 +2300,17 @@ wl_timer_task(wl_task_t *task)\n \tatomic_dec(&t->wl->callbacks);\n }\n \n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)\n+static void\n+wl_timer(struct timer_list *tl)\n+{\n+\twl_timer_t *t = (wl_timer_t *)tl;\n+#else\n static void\n wl_timer(ulong data)\n {\n \twl_timer_t *t = (wl_timer_t *)data;\n+#endif\n \n \tif (!WL_ALL_PASSIVE_ENAB(t->wl))\n \t\t_wl_timer(t);\n@@ -2351,9 +2362,13 @@ wl_init_timer(wl_info_t *wl, void (*fn)(void *arg), void *arg, const char *tname\n \n \tbzero(t, sizeof(wl_timer_t));\n \n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)\n+\ttimer_setup(&t->timer, wl_timer, 0);\n+#else\n \tinit_timer(&t->timer);\n \tt->timer.data = (ulong) t;\n \tt->timer.function = wl_timer;\n+#endif\n \tt->wl = wl;\n \tt->fn = fn;\n \tt->arg = arg;\n-- \n2.14.1\n\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0011-fix-kernel-warnings.patch",
    "content": "From 6bc816ae3ef424bc52b2736aeb1eb08ab09f38a9 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Sun, 10 Jun 2018 19:32:39 +0100\nSubject: [PATCH] fix kernel warnings\n\nCredit: https://github.com/UnitedRPMs/broadcom-wl-dkms/blob/master/wl-kmod-008_fix_kernel_warnings.patch\n---\n x86-64/src/wl/sys/wl_cfg80211_hybrid.c | 88 +++++++++++++++++++++++-----------\n 1 file changed, 60 insertions(+), 28 deletions(-)\n\ndiff --git a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\nindex 2e8625d..4da9b38 100644\n--- a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\n+++ b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\n@@ -1983,7 +1983,7 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info\n \n \tif (dtoh32(bi->length) > WL_BSS_INFO_MAX) {\n \t\tWL_DBG((\"Beacon is larger than buffer. Discarding\\n\"));\n-\t\treturn err;\n+\t\treturn -E2BIG;\n \t}\n \tnotif_bss_info = kzalloc(sizeof(*notif_bss_info) + sizeof(*mgmt) - sizeof(u8) +\n \t                         WL_BSS_INFO_MAX, GFP_KERNEL);\n@@ -2007,9 +2007,15 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info\n \tbeacon_proberesp->capab_info = cpu_to_le16(bi->capability);\n \twl_rst_ie(wl);\n \n-\twl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length);\n-\twl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX -\n-\t         offsetof(struct wl_cfg80211_bss_info, frame_buf));\n+\terr = wl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length);\n+\tif (err)\n+\t\tgoto inform_single_bss_out;\n+\n+\terr = wl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX -\n+\t               offsetof(struct wl_cfg80211_bss_info, frame_buf));\n+\tif (err)\n+\t\tgoto inform_single_bss_out;\n+\n \tnotif_bss_info->frame_len = offsetof(struct ieee80211_mgmt, u.beacon.variable) +\n \t                            wl_get_ielen(wl);\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)\n@@ -2021,14 +2027,14 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info\n #endif\n \tif (freq == 0) {\n \t\tWL_ERR((\"Invalid channel, fail to chcnage channel to freq\\n\"));\n-\t\tkfree(notif_bss_info);\n-\t\treturn -EINVAL;\n+\t\terr = -EINVAL;\n+\t\tgoto inform_single_bss_out;\n \t}\n \tchannel = ieee80211_get_channel(wiphy, freq);\n \tif (unlikely(!channel)) {\n \t\tWL_ERR((\"ieee80211_get_channel error\\n\"));\n-\t\tkfree(notif_bss_info);\n-\t\treturn -EINVAL;\n+\t\terr = -EINVAL;\n+\t\tgoto inform_single_bss_out;\n \t}\n \n \tWL_DBG((\"SSID : \\\"%s\\\", rssi %d, channel %d, capability : 0x04%x, bssid %pM\\n\",\n@@ -2036,28 +2042,35 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info\n \t\tmgmt->u.beacon.capab_info, &bi->BSSID));\n \n \tsignal = notif_bss_info->rssi * 100;\n-\tcbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt,\n-\t    le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL);\n-\tif (unlikely(!cbss)) {\n-\t\tWL_ERR((\"cfg80211_inform_bss_frame error\\n\"));\n-\t\tkfree(notif_bss_info);\n-\t\treturn -EINVAL;\n+\tif (!wl->scan_request) {\n+\t\tcbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt,\n+\t\t    le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL);\n+\t\tif (unlikely(!cbss)) {\n+\t\t\tWL_ERR((\"cfg80211_inform_bss_frame error\\n\"));\n+\t\t\terr = -ENOMEM;\n+\t\t\tgoto inform_single_bss_out;\n+\t\t}\n \t}\n-\n-\tnotify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);\n-\tnotify_ielen = le32_to_cpu(bi->ie_length);\n+\telse {\n+\t\tnotify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);\n+\t\tnotify_ielen = le32_to_cpu(bi->ie_length);\n #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)\n-\tcbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),\n-\t\t0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,\n-\t\t(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);\n+\t\tcbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),\n+\t\t\t0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,\n+\t\t\t(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);\n #else\n-\tcbss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, (const u8 *)(bi->BSSID.octet),\n-\t\t0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,\n-\t\t(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);\n+\t\tcbss = cfg80211_inform_bss(wiphy, channel,\n+\t\t    wl->active_scan ? CFG80211_BSS_FTYPE_PRESP : CFG80211_BSS_FTYPE_BEACON,\n+\t\t    (const u8 *)(bi->BSSID.octet),\n+\t\t    0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,\n+\t\t    (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);\n #endif\n-\n-\tif (unlikely(!cbss))\n-\t\treturn -ENOMEM;\n+\t\tif (unlikely(!cbss)) {\n+\t\t\tWL_ERR((\"cfg80211_inform_bss error\\n\"));\n+\t\t\terr = -ENOMEM;\n+\t\t\tgoto inform_single_bss_out;\n+\t\t}\n+\t}\n \n #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)\n \tcfg80211_put_bss(wiphy, cbss);\n@@ -2065,6 +2078,7 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info\n \tcfg80211_put_bss(cbss);\n #endif\n \n+inform_single_bss_out:\n \tkfree(notif_bss_info);\n \n \treturn err;\n@@ -2331,6 +2345,9 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl)\n \t\tif (err)\n \t\t\tgoto update_bss_info_out;\n \n+\t\tbss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,\n+\t\t      ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);\n+\n \t\tie = ((u8 *)bi) + bi->ie_offset;\n \t\tie_len = bi->ie_length;\n \t} else {\n@@ -2343,12 +2360,20 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl)\n \t\tie_len = bss->len_information_elements;\n #endif\n \t\twl->conf->channel = *bss->channel;\n+\t}\n+\n+\tif (bss) {\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)\n \t\tcfg80211_put_bss(wiphy, bss);\n #else\n \t\tcfg80211_put_bss(bss);\n #endif\n \t}\n+\telse {\n+\t\tWL_DBG((\"Could not update BSS\\n\"));\n+\t\terr = -EINVAL;\n+\t\tgoto update_bss_info_out;\n+\t}\n \n \ttim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);\n \tif (tim) {\n@@ -2375,10 +2400,17 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,\n \tstruct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);\n \ts32 err = 0;\n \n-\twl_get_assoc_ies(wl);\n+\terr = wl_get_assoc_ies(wl);\n+\tif (err)\n+\t\treturn err;\n+\n \tmemcpy(wl->profile->bssid, &e->addr, ETHER_ADDR_LEN);\n \tmemcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);\n-\twl_update_bss_info(wl);\n+\n+\terr = wl_update_bss_info(wl);\n+\tif (err)\n+\t\treturn err;\n+\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)\n \t{\n \t\tstruct cfg80211_roam_info roam_info = {\n-- \n2.14.1\n\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0012-kernel-4.14.patch",
    "content": "From d1dfd471bfc5bb4e9513e8a26ecb11de934dc27e Mon Sep 17 00:00:00 2001\nFrom: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>\nDate: Fri, 15 Dec 2017 17:09:04 +0000\nSubject: [PATCH 25/26] add support for Linux 4.14\n\nSigned-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>\n---\n src/shared/linux_osl.c | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c\nindex 6157d1832767..318874541d89 100644\n--- a/x86-64/src/shared/linux_osl.c\n+++ b/x86-64/src/shared/linux_osl.c\n@@ -1076,7 +1076,11 @@ osl_os_get_image_block(char *buf, int len, void *image)\n \tif (!image)\n \t\treturn 0;\n \n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)\n+\trdlen = kernel_read(fp, buf, len, &fp->f_pos);\n+#else\n \trdlen = kernel_read(fp, fp->f_pos, buf, len);\n+#endif\n \tif (rdlen > 0)\n \t\tfp->f_pos += rdlen;\n \n-- \n2.14.1\n\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0200-kernel-5.1-rc1-fix.patch",
    "content": "From aa1fc45ace58d802d038857b6fed8af9d771fbcc Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Mon, 18 Mar 2019 16:29:45 +0000\nSubject: [PATCH] get rid of legacy 'get_ds()' function\n\nhttps://github.com/torvalds/linux/commit/736706bee3298208343a76096370e4f6a5c55915\n---\n x86-32/src/wl/sys/wl_cfg80211_hybrid.c | 2 +-\n x86-32/src/wl/sys/wl_iw.c              | 2 +-\n x86-64/src/wl/sys/wl_cfg80211_hybrid.c | 2 +-\n x86-64/src/wl/sys/wl_iw.c              | 2 +-\n 4 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/x86-32/src/wl/sys/wl_cfg80211_hybrid.c b/x86-32/src/wl/sys/wl_cfg80211_hybrid.c\nindex 7b606e0..51c81bc 100644\n--- a/x86-32/src/wl/sys/wl_cfg80211_hybrid.c\n+++ b/x86-32/src/wl/sys/wl_cfg80211_hybrid.c\n@@ -450,7 +450,7 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)\n \tifr.ifr_data = (caddr_t)&ioc;\n \n \tfs = get_fs();\n-\tset_fs(get_ds());\n+\tset_fs(KERNEL_DS);\n #if defined(WL_USE_NETDEV_OPS)\n \terr = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);\n #else\ndiff --git a/x86-32/src/wl/sys/wl_iw.c b/x86-32/src/wl/sys/wl_iw.c\nindex c4c610b..9c3c74e 100644\n--- a/x86-32/src/wl/sys/wl_iw.c\n+++ b/x86-32/src/wl/sys/wl_iw.c\n@@ -117,7 +117,7 @@ dev_wlc_ioctl(\n \tifr.ifr_data = (caddr_t) &ioc;\n \n \tfs = get_fs();\n-\tset_fs(get_ds());\n+\tset_fs(KERNEL_DS);\n #if defined(WL_USE_NETDEV_OPS)\n \tret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);\n #else\ndiff --git a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\nindex 7b606e0..51c81bc 100644\n--- a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\n+++ b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\n@@ -450,7 +450,7 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)\n \tifr.ifr_data = (caddr_t)&ioc;\n \n \tfs = get_fs();\n-\tset_fs(get_ds());\n+\tset_fs(KERNEL_DS);\n #if defined(WL_USE_NETDEV_OPS)\n \terr = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);\n #else\ndiff --git a/x86-64/src/wl/sys/wl_iw.c b/x86-64/src/wl/sys/wl_iw.c\nindex c4c610b..9c3c74e 100644\n--- a/x86-64/src/wl/sys/wl_iw.c\n+++ b/x86-64/src/wl/sys/wl_iw.c\n@@ -117,7 +117,7 @@ dev_wlc_ioctl(\n \tifr.ifr_data = (caddr_t) &ioc;\n \n \tfs = get_fs();\n-\tset_fs(get_ds());\n+\tset_fs(KERNEL_DS);\n #if defined(WL_USE_NETDEV_OPS)\n \tret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);\n #else\n-- \n2.14.1\n\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0300-kernel-5.6-rc1-fix.patch",
    "content": "From 5224fb9bcb82733be5f7d4e41134578f48399a9b Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Mon, 10 Feb 2020 11:34:46 +0000\nSubject: [PATCH 1/2] proc_create_data: fix 5.6-rc1\n d56c0d45f0e27f814e87a1676b6bdccccbc252e9\n\n---\n x86-64/src/wl/sys/wl_linux.c | 18 +++++++++++++-----\n 1 file changed, 13 insertions(+), 5 deletions(-)\n\ndiff --git a/x86-64/src/wl/sys/wl_linux.c b/x86-64/src/wl/sys/wl_linux.c\nindex 0d05100..cbca645 100644\n--- a/x86-64/src/wl/sys/wl_linux.c\n+++ b/x86-64/src/wl/sys/wl_linux.c\n@@ -3334,7 +3334,12 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t\n \treturn length;\n }\n \n-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)\n+static const struct proc_ops wl_pops = {\n+\t.proc_read\t= wl_proc_read,\n+\t.proc_write\t= wl_proc_write,\n+};\n+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)\n static const struct file_operations wl_fops = {\n \t.owner\t= THIS_MODULE,\n \t.read\t= wl_proc_read,\n@@ -3347,12 +3352,15 @@ wl_reg_proc_entry(wl_info_t *wl)\n {\n \tchar tmp[32];\n \tsprintf(tmp, \"%s%d\", HYBRID_PROC, wl->pub->unit);\n-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)\n-\tif ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {\n-\t\tWL_ERROR((\"%s: create_proc_entry %s failed\\n\", __FUNCTION__, tmp));\n-#else\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)\n+\tif ((wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_pops, wl)) == NULL) {\n+\t\tWL_ERROR((\"%s: proc_create_data %s failed\\n\", __FUNCTION__, tmp));\n+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)\n \tif ((wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_fops, wl)) == NULL) {\n \t\tWL_ERROR((\"%s: proc_create_data %s failed\\n\", __FUNCTION__, tmp));\n+#else\n+\tif ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {\n+\t\tWL_ERROR((\"%s: create_proc_entry %s failed\\n\", __FUNCTION__, tmp));\n #endif\n \t\tASSERT(0);\n \t\treturn -1;\n-- \n2.20.1\n\n\nFrom 8d32f5792ec56b0088d5b5e3b21d4cbc97389728 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Mon, 10 Feb 2020 11:46:35 +0000\nSubject: [PATCH 2/2] ioremap_nocache: fix 5.6-rc1\n 6a1000bd27035bba17ede9dc915166276a811edb\n\n---\n x86-64/src/shared/linux_osl.c | 2 +-\n x86-64/src/wl/sys/wl_linux.c  | 4 ++--\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/x86-64/src/shared/linux_osl.c b/x86-64/src/shared/linux_osl.c\nindex 6157d18..8237ec7 100644\n--- a/x86-64/src/shared/linux_osl.c\n+++ b/x86-64/src/shared/linux_osl.c\n@@ -942,7 +942,7 @@ osl_getcycles(void)\n void *\n osl_reg_map(uint32 pa, uint size)\n {\n-\treturn (ioremap_nocache((unsigned long)pa, (unsigned long)size));\n+\treturn (ioremap((unsigned long)pa, (unsigned long)size));\n }\n \n void\ndiff --git a/x86-64/src/wl/sys/wl_linux.c b/x86-64/src/wl/sys/wl_linux.c\nindex cbca645..4bb0162 100644\n--- a/x86-64/src/wl/sys/wl_linux.c\n+++ b/x86-64/src/wl/sys/wl_linux.c\n@@ -582,7 +582,7 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,\n \t}\n \twl->bcm_bustype = bustype;\n \n-\tif ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {\n+\tif ((wl->regsva = ioremap(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {\n \t\tWL_ERROR((\"wl%d: ioremap() failed\\n\", unit));\n \t\tgoto fail;\n \t}\n@@ -772,7 +772,7 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \tif ((val & 0x0000ff00) != 0)\n \t\tpci_write_config_dword(pdev, 0x40, val & 0xffff00ff);\n \t\tbar1_size = pci_resource_len(pdev, 2);\n-\t\tbar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),\n+\t\tbar1_addr = (uchar *)ioremap(pci_resource_start(pdev, 2),\n \t\t\tbar1_size);\n \twl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,\n \t\tpdev->irq, bar1_addr, bar1_size);\n-- \n2.20.1\n\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0400-kernel-5.9-fix.patch",
    "content": "--- a/x86-64/src/wl/sys/wl_linux.c\t2020-10-12 21:19:15.256305165 +0000\n+++ b/x86-64/src/wl/sys/wl_linux.c\t2020-10-12 21:20:38.687530895 +0000\n@@ -1643,7 +1643,7 @@\n \t\tgoto done2;\n \t}\n \n-\tif (segment_eq(get_fs(), KERNEL_DS))\n+\tif (get_fs().seg == KERNEL_DS.seg)\n \t\tbuf = ioc.buf;\n \n \telse if (ioc.buf) {\n\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0500-kernel-5.10-fix.patch",
    "content": "From: Joan Bruguera <joanbrugueram@gmail.com>\nDate: Sun, 13 Sep 2020 07:33:32 +0200\nSubject: Get rid of get_fs/set_fs calls in Broadcom WL driver.\nOrigin: https://gist.github.com/joanbm/5c640ac074d27fd1d82c74a5b67a1290\n\nFixes linux-next where get_fs/set_fs is already removed for some architectures.\n\nNB: Some checks in wlc_ioctl_internal are likely superfluous,\n    but I'm not familiar enough with the driver to remove them with confidence.\n\nSee also: https://lwn.net/Articles/722267/\n          https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/x86/include/asm/uaccess.h?h=next-20200911&id=47058bb54b57962b3958a936ddbc59355e4c5504\n          https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/include/linux/uaccess.h?h=next-20200911&id=5e6e9852d6f76e01b2e6803c74258afa5b432bc5\n\nSigned-off-by: Joan Bruguera <joanbrugueram@gmail.com>\n---\n x86-64/src/wl/sys/wl_cfg80211_hybrid.c | 29 ++-----------------------\n x86-64/src/wl/sys/wl_iw.c              | 25 ++--------------------\n x86-64/src/wl/sys/wl_linux.c           | 40 ++++++++++++++++++++++++++++++-----\n x86-64/src/wl/sys/wl_linux.h           |  2 ++\n x86-64/src/wl/sys/wlc_pub.h            |  1 +\n 5 files changed, 42 insertions(+), 55 deletions(-)\n\ndiff --git a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\nindex 8e01841..111ec5a 100644\n--- a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\n+++ b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\n@@ -41,6 +41,7 @@\n #include <wlioctl.h>\n #include <proto/802.11.h>\n #include <wl_cfg80211_hybrid.h>\n+#include <wl_linux.h>\n \n #define EVENT_TYPE(e) dtoh32((e)->event_type)\n #define EVENT_FLAGS(e) dtoh16((e)->flags)\n@@ -445,30 +445,8 @@\n static s32\n wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)\n {\n-\tstruct ifreq ifr;\n-\tstruct wl_ioctl ioc;\n-\tmm_segment_t fs;\n-\ts32 err = 0;\n-\n \tBUG_ON(len < sizeof(int));\n-\n-\tmemset(&ioc, 0, sizeof(ioc));\n-\tioc.cmd = cmd;\n-\tioc.buf = arg;\n-\tioc.len = len;\n-\tstrcpy(ifr.ifr_name, dev->name);\n-\tifr.ifr_data = (caddr_t)&ioc;\n-\n-\tfs = get_fs();\n-\tset_fs(KERNEL_DS);\n-#if defined(WL_USE_NETDEV_OPS)\n-\terr = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);\n-#else\n-\terr = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);\n-#endif\n-\tset_fs(fs);\n-\n-\treturn err;\n+\treturn wlc_ioctl_internal(dev, cmd, arg, len);\n }\n \n #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)\ndiff --git a/x86-64/src/wl/sys/wl_iw.c b/x86-64/src/wl/sys/wl_iw.c\nindex c4c610b..e346b15 100644\n--- a/x86-64/src/wl/sys/wl_iw.c\n+++ b/x86-64/src/wl/sys/wl_iw.c\n@@ -37,6 +37,7 @@ typedef const struct si_pub\tsi_t;\n \n #include <wl_dbg.h>\n #include <wl_iw.h>\n+#include <wl_linux.h>\n \n extern bool wl_iw_conn_status_str(uint32 event_type, uint32 status,\n \tuint32 reason, char* stringBuf, uint buflen);\n@@ -104,29 +104,7 @@\n \tint len\n )\n {\n-\tstruct ifreq ifr;\n-\twl_ioctl_t ioc;\n-\tmm_segment_t fs;\n-\tint ret;\n-\n-\tmemset(&ioc, 0, sizeof(ioc));\n-\tioc.cmd = cmd;\n-\tioc.buf = arg;\n-\tioc.len = len;\n-\n-\tstrcpy(ifr.ifr_name, dev->name);\n-\tifr.ifr_data = (caddr_t) &ioc;\n-\n-\tfs = get_fs();\n-\tset_fs(KERNEL_DS);\n-#if defined(WL_USE_NETDEV_OPS)\n-\tret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);\n-#else\n-\tret = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);\n-#endif\n-\tset_fs(fs);\n-\n-\treturn ret;\n+\treturn wlc_ioctl_internal(dev, cmd, arg, len);\n }\n \n static int\ndiff --git a/x86-64/src/wl/sys/wl_linux.c b/x86-64/src/wl/sys/wl_linux.c\nindex 66069d4..cc01d2b 100644\n--- a/x86-64/src/wl/sys/wl_linux.c\n+++ b/x86-64/src/wl/sys/wl_linux.c\n@@ -1651,10 +1651,7 @@\n \t\tgoto done2;\n \t}\n \n-\tif (get_fs().seg == KERNEL_DS.seg)\n-\t\tbuf = ioc.buf;\n-\n-\telse if (ioc.buf) {\n+\tif (ioc.buf) {\n \t\tif (!(buf = (void *) MALLOC(wl->osh, MAX(ioc.len, WLC_IOCTL_MAXLEN)))) {\n \t\t\tbcmerror = BCME_NORESOURCE;\n \t\t\tgoto done2;\n@@ -1681,7 +1678,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)\n \tWL_UNLOCK(wl);\n \n done1:\n-\tif (ioc.buf && (ioc.buf != buf)) {\n+\tif (ioc.buf) {\n \t\tif (copy_to_user(ioc.buf, buf, ioc.len))\n \t\t\tbcmerror = BCME_BADADDR;\n \t\tMFREE(wl->osh, buf, MAX(ioc.len, WLC_IOCTL_MAXLEN));\n@@ -1694,6 +1691,39 @@ done2:\n \treturn (OSL_ERROR(bcmerror));\n }\n \n+int\n+wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len)\n+{\n+\twl_info_t *wl;\n+\twl_if_t *wlif;\n+\tint bcmerror;\n+\n+\tif (!dev)\n+\t\treturn -ENETDOWN;\n+\n+\twl = WL_INFO(dev);\n+\twlif = WL_DEV_IF(dev);\n+\tif (wlif == NULL || wl == NULL || wl->dev == NULL)\n+\t\treturn -ENETDOWN;\n+\n+\tbcmerror = 0;\n+\n+\tWL_TRACE((\"wl%d: wlc_ioctl_internal: cmd 0x%x\\n\", wl->pub->unit, cmd));\n+\n+\tWL_LOCK(wl);\n+\tif (!capable(CAP_NET_ADMIN)) {\n+\t\tbcmerror = BCME_EPERM;\n+\t} else {\n+\t\tbcmerror = wlc_ioctl(wl->wlc, cmd, buf, len, wlif->wlcif);\n+\t}\n+\tWL_UNLOCK(wl);\n+\n+\tASSERT(VALID_BCMERROR(bcmerror));\n+\tif (bcmerror != 0)\n+\t\twl->pub->bcmerror = bcmerror;\n+\treturn (OSL_ERROR(bcmerror));\n+}\n+\n static struct net_device_stats*\n wl_get_stats(struct net_device *dev)\n {\ndiff --git a/x86-64/src/wl/sys/wl_linux.h b/x86-64/src/wl/sys/wl_linux.h\nindex 5b1048e..c8c1f41 100644\n--- a/x86-64/src/wl/sys/wl_linux.h\n+++ b/x86-64/src/wl/sys/wl_linux.h\n@@ -22,6 +22,7 @@\n #define _wl_linux_h_\n \n #include <wlc_types.h>\n+#include <wlc_pub.h>\n \n typedef struct wl_timer {\n \tstruct timer_list \ttimer;\n@@ -187,6 +188,7 @@ extern irqreturn_t wl_isr(int irq, void *dev_id, struct pt_regs *ptregs);\n extern int __devinit wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent);\n extern void wl_free(wl_info_t *wl);\n extern int  wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);\n+extern int wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len);\n extern struct net_device * wl_netdev_get(wl_info_t *wl);\n \n #endif \ndiff --git a/x86-64/src/wl/sys/wlc_pub.h b/x86-64/src/wl/sys/wlc_pub.h\nindex 53a98b8..2b5a029 100644\n--- a/x86-64/src/wl/sys/wlc_pub.h\n+++ b/x86-64/src/wl/sys/wlc_pub.h\n@@ -24,6 +24,7 @@\n \n #include <wlc_types.h>\n #include <wlc_utils.h>\n+#include <siutils.h>\n #include \"proto/802.11.h\"\n #include \"proto/bcmevent.h\"\n \n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0600-kernel-5.17-fix.patch",
    "content": "From 31b7849092c43805c7fbaf7518b99874aa1b310c Mon Sep 17 00:00:00 2001\nFrom: Joan Bruguera <joanbrugueram@gmail.com>\nDate: Wed, 12 Jan 2022 20:49:20 +0100\nSubject: [PATCH] Tentative fix for broadcom-wl 6.30.223.271 driver for Linux 5.17-rc1\n\nSet netdev->dev_addr through dev_addr_mod + PDE_DATA fix\n\nSince Linux 5.17 netdev->dev_addr is const and must be changed through\ndev_addr_mod, otherwise a warning is logged in dmesg and bad things may happen.\n\nNB: The #if is not wrong, dev_addr_mod is defined since Linux 5.15-rc1\n\nPlus a trivial fix for PDE_DATA.\n\nApplies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-28 on Arch Linux.\n\nSee also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adeef3e32146a8d2a73c399dc6f5d76a449131b1\n          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=359745d78351c6f5442435f81549f0207ece28aa\n---\n src/wl/sys/wl_linux.c | 16 +++++++++++++---\n 1 file changed, 13 insertions(+), 3 deletions(-)\n\ndiff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c\nindex e491df7..e4614fb 100644\n--- a/x86-64/src/wl/sys/wl_linux.c\n+++ b/x86-64/src/wl/sys/wl_linux.c\n@@ -93,6 +93,10 @@ struct iw_statistics *wl_get_wireless_stats(struct net_device *dev);\n \n #include <wlc_wowl.h>\n \n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))\n+#define PDE_DATA pde_data\n+#endif\n+\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)\n static void wl_timer(struct timer_list *tl);\n #else\n@@ -490,6 +494,12 @@ wl_if_setup(struct net_device *dev)\n #endif\n }\n \n+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)\n+static inline void eth_hw_addr_set(struct net_device *dev, const void *addr) {\n+\tmemcpy(dev->dev_addr, addr, ETHER_ADDR_LEN);\n+}\n+#endif\n+\n static wl_info_t *\n wl_attach(uint16 vendor, uint16 device, ulong regs,\n \tuint bustype, void *btparam, uint irq, uchar* bar1_addr, uint32 bar1_size)\n@@ -634,7 +644,7 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,\n \t\t\tWL_ERROR((\"wl%d: Error setting MAC ADDRESS\\n\", unit));\n \t}\n #endif \n-\tbcopy(&wl->pub->cur_etheraddr, dev->dev_addr, ETHER_ADDR_LEN);\n+\teth_hw_addr_set(dev, wl->pub->cur_etheraddr.octet);\n \n \tonline_cpus = 1;\n \n@@ -1835,7 +1845,7 @@ wl_set_mac_address(struct net_device *dev, void *addr)\n \n \tWL_LOCK(wl);\n \n-\tbcopy(sa->sa_data, dev->dev_addr, ETHER_ADDR_LEN);\n+\teth_hw_addr_set(dev, sa->sa_data);\n \terr = wlc_iovar_op(wl->wlc, \"cur_etheraddr\", NULL, 0, sa->sa_data, ETHER_ADDR_LEN,\n \t\tIOV_SET, (WL_DEV_IF(dev))->wlcif);\n \tWL_UNLOCK(wl);\n@@ -3010,7 +3020,7 @@ _wl_add_monitor_if(wl_task_t *task)\n \telse\n \t\tdev->type = ARPHRD_IEEE80211_RADIOTAP;\n \n-\tbcopy(wl->dev->dev_addr, dev->dev_addr, ETHER_ADDR_LEN);\n+\teth_hw_addr_set(dev, wl->dev->dev_addr);\n \n #if defined(WL_USE_NETDEV_OPS)\n \tdev->netdev_ops = &wl_netdev_monitor_ops;\n-- \n2.35.1\n\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0600-kernel-5.18-fix.patch",
    "content": "diff -Nur a/x86-64/src/shared/linux_osl.c b/x86-64/src/shared/linux_osl.c\n--- a/x86-64/src/shared/linux_osl.c\t2022-04-24 11:17:29.148114284 +0000\n+++ b/x86-64/src/shared/linux_osl.c\t2022-04-24 11:38:38.493710528 +0000\n@@ -600,7 +600,11 @@\n \tif (va)\n \t\t*pap = (ulong)__virt_to_phys(va);\n #else\n+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)\n \tva = pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap);\n+#else\n+\tva = dma_alloc_coherent(&((struct pci_dev *)osh->pdev)->dev, size, (dma_addr_t*)pap, GFP_ATOMIC);\n+#endif\n #endif\n \treturn va;\n }\n@@ -613,7 +617,11 @@\n #ifdef __ARM_ARCH_7A__\n \tkfree(va);\n #else\n+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)\n \tpci_free_consistent(osh->pdev, size, va, (dma_addr_t)pa);\n+#else\n+\tdma_free_coherent(&((struct pci_dev *)osh->pdev)->dev, size, va, (dma_addr_t)pa);\n+#endif\n #endif\n }\n \n@@ -623,7 +631,11 @@\n \tint dir;\n \n \tASSERT((osh && (osh->magic == OS_HANDLE_MAGIC)));\n+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)\n \tdir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE;\n+#else\n+\tdir = (direction == DMA_TX)? DMA_TO_DEVICE: DMA_FROM_DEVICE;\n+#endif\n \n #if defined(__ARM_ARCH_7A__) && defined(BCMDMASGLISTOSL)\n \tif (dmah != NULL) {\n@@ -656,7 +668,12 @@\n \t}\n #endif \n \n+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)\n \treturn (pci_map_single(osh->pdev, va, size, dir));\n+#else\n+\treturn (dma_map_single(&((struct pci_dev *)osh->pdev)->dev, va, size, dir));\n+#endif \n+\treturn 0;\n }\n \n void BCMFASTPATH\n@@ -665,8 +681,13 @@\n \tint dir;\n \n \tASSERT((osh && (osh->magic == OS_HANDLE_MAGIC)));\n+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)\n \tdir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE;\n \tpci_unmap_single(osh->pdev, (uint32)pa, size, dir);\n+#else\n+\tdir = (direction == DMA_TX)? DMA_TO_DEVICE: DMA_FROM_DEVICE;\n+\tdma_unmap_single(&((struct pci_dev *)osh->pdev)->dev, (uint32)pa, size, dir);\n+#endif\n }\n \n #if defined(BCMDBG_ASSERT)\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0600-kernel-6.0-fix.patch",
    "content": "diff -Nur a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\n--- a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\t2022-08-15 14:06:51.943852581 +0000\n+++ b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\t2022-08-15 14:24:49.917982457 +0000\n@@ -2393,8 +2393,13 @@\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)\n \t{\n \t\tstruct cfg80211_roam_info roam_info = {\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)\n+\t\t\t.links[0].channel = &wl->conf->channel,\n+\t\t\t.links[0].bssid = (u8 *)&wl->bssid,\n+#else\n \t\t\t.channel = &wl->conf->channel,\n \t\t\t.bssid = (u8 *)&wl->bssid,\n+#endif\n \t\t\t.req_ie = conn_info->req_ie,\n \t\t\t.req_ie_len = conn_info->req_ie_len,\n \t\t\t.resp_ie = conn_info->resp_ie,\n"
  },
  {
    "path": "packages/linux-drivers/bcm_sta/patches/bcm_sta-0600-kernel-6.1-fix.patch",
    "content": "--- a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\t2022-10-17 10:58:21.106425299 +0000\n+++ b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c\t2022-10-18 10:26:53.683025167 +0000\n@@ -108,17 +108,30 @@\n \n #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)\n static s32 wl_cfg80211_config_default_key(struct wiphy *wiphy,\n-           struct net_device *dev, u8 key_idx, bool unicast, bool multicast);\n+           struct net_device *dev,\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+           int link_id,\n+#endif\n+           u8 key_idx, bool unicast, bool multicast);\n #else\n static s32 wl_cfg80211_config_default_key(struct wiphy *wiphy,\n            struct net_device *dev, u8 key_idx);\n #endif\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)\n static s32 wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+           int link_id,\n+#endif\n            u8 key_idx, bool pairwise, const u8 *mac_addr, struct key_params *params);\n static s32 wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+           int link_id,\n+#endif\n            u8 key_idx, bool pairwise, const u8 *mac_addr);\n static s32 wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev,\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+           int link_id,\n+#endif\n            u8 key_idx, bool pairwise, const u8 *mac_addr,\n            void *cookie, void (*callback) (void *cookie, struct key_params *params));\n #else\n@@ -1169,7 +1182,11 @@\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)\n static s32\n wl_cfg80211_config_default_key(struct wiphy *wiphy,\n-\tstruct net_device *dev, u8 key_idx, bool unicast, bool multicast)\n+\tstruct net_device *dev,\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+\tint link_id,\n+#endif\n+\tu8 key_idx, bool unicast, bool multicast)\n #else\n static s32\n wl_cfg80211_config_default_key(struct wiphy *wiphy,\n@@ -1194,6 +1211,9 @@\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)\n static s32\n wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+                    int link_id,\n+#endif\n                     u8 key_idx, bool pairwise, const u8 *mac_addr, struct key_params *params)\n #else\n static s32\n@@ -1315,6 +1335,9 @@\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)\n static s32\n wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+                    int link_id,\n+#endif\n                     u8 key_idx, bool pairwise, const u8 *mac_addr)\n #else\n static s32\n@@ -1358,6 +1381,9 @@\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)\n static s32\n wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev,\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+                    int link_id,\n+#endif\n                     u8 key_idx, bool pairwise, const u8 *mac_addr, void *cookie,\n                     void (*callback) (void *cookie, struct key_params * params))\n #else\n"
  },
  {
    "path": "packages/linux-drivers/mali-bifrost/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mali-bifrost\"\nPKG_VERSION=\"af7c8d8bcdedd792a8d101d3a11876bb8bcbe3da\" # BX301A01B-SW-99002-r16p0-01rel0\nPKG_SHA256=\"712ba83f28bf687e2147f0f586678421b0d2cb5620423e93e7b7c9ddf35c1da5\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://developer.arm.com/products/software/mali-drivers/bifrost-kernel\"\nPKG_URL=\"https://github.com/LibreELEC/mali-bifrost/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"mali-bifrost: the Linux kernel driver for ARM Mali Bifrost GPUs\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\ncase ${PROJECT} in\n  Amlogic)\n    PKG_MALI_PLATFORM_CONFIG=\"config.meson-g12a\"\n    ;;\nesac\n\nmake_target() {\n  kernel_make KDIR=$(kernel_path) -C ${PKG_BUILD} \\\n       CONFIG_NAME=${PKG_MALI_PLATFORM_CONFIG}\n}\n\nmakeinstall_target() {\n  DRIVER_DIR=${PKG_BUILD}/driver/product/kernel/drivers/gpu/arm/midgard/\n\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n    cp ${DRIVER_DIR}/mali_kbase.ko ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}/\n}\n"
  },
  {
    "path": "packages/linux-drivers/mali-midgard/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mali-midgard\"\nPKG_VERSION=\"2c2accf67356463ee661627b8705429256011dcb\" # TX011-SW-99002-r28p0-01rel0\nPKG_SHA256=\"506ec1e388f491f53a9acf8ca2077bd135a6d31f688ed7139ed0cd77f5c44d72\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://developer.arm.com/products/software/mali-drivers/\"\nPKG_URL=\"https://github.com/LibreELEC/mali-midgard/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"mali-midgard: Linux drivers for Mali Midgard GPUs\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\ncase ${PROJECT} in\n  Allwinner)\n    PKG_CONFIGS=\"CONFIG_MALI_PLATFORM_NAME=sunxi\"\n    ;;\n  Amlogic)\n    PKG_CONFIGS=\"CONFIG_MALI_PLATFORM_NAME=meson\"\n    ;;\n  Rockchip)\n    PKG_CONFIGS=\"CONFIG_MALI_PLATFORM_NAME=rk\"\n    ;;\nesac\n\npost_patch() {\n  # rename kernel module to not clash with mali-bifrost\n  find ${PKG_BUILD} -name Kbuild -exec sed -i 's/mali_kbase.o/mali_midgard.o/g; s/mali_kbase-/mali_midgard-/g' {} \\;\n}\n\nmake_target() {\n  kernel_make -C $(kernel_path) M=${PKG_BUILD}/driver/product/kernel/drivers/gpu/arm/midgard \\\n    EXTRA_CFLAGS=\"${PKG_EXTRA_CFLAGS}\" \\\n    CONFIG_MALI_MIDGARD=m ${PKG_CONFIGS}\n}\n\nmakeinstall_target() {\n  kernel_make -C $(kernel_path) M=${PKG_BUILD}/driver/product/kernel/drivers/gpu/arm/midgard \\\n    INSTALL_MOD_PATH=${INSTALL}/$(get_kernel_overlay_dir) INSTALL_MOD_STRIP=1 DEPMOD=: \\\n    modules_install\n}\n"
  },
  {
    "path": "packages/linux-drivers/mali-utgard/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mali-utgard\"\nPKG_VERSION=\"e8419af528f62a7e44c966b6853b59a2e78c47bf\"\nPKG_SHA256=\"18e034cf2b131fa54c5579534ee09e5a054906051130e5e425d6d49f8d8f9eca\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://developer.arm.com/products/software/mali-drivers/utgard-kernel\"\nPKG_URL=\"https://github.com/LibreELEC/mali-utgard/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"mali-utgard: Linux drivers for Mali Utgard GPUs\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\ncase ${PROJECT} in\n  Allwinner)\n    PKG_MALI_PLATFORM=\"sunxi\"\n    ;;\n  Amlogic)\n    PKG_MALI_PLATFORM=\"meson\"\n    ;;\n  Rockchip)\n    PKG_MALI_PLATFORM=\"rk\"\n    PKG_EXTRA_CFLAGS=\"-DCONFIG_MALI_DT\"\n    PKG_CONFIGS=\"CONFIG_MALI_DT=y\"\n    ;;\nesac\n\nmake_target() {\n  kernel_make -C $(kernel_path) M=${PKG_BUILD}/driver/src/devicedrv/mali \\\n    MALI_PLATFORM_FILES=platform/${PKG_MALI_PLATFORM}/${PKG_MALI_PLATFORM}.c GIT_REV=\"\" \\\n    EXTRA_CFLAGS=\"-DMALI_FAKE_PLATFORM_DEVICE=1 -DCONFIG_MALI_DMA_BUF_MAP_ON_ATTACH -DCONFIG_MALI400=1 -DCONFIG_MALI450=1 -DCONFIG_MALI470=1 ${PKG_EXTRA_CFLAGS}\" \\\n    CONFIG_MALI400=m CONFIG_MALI450=y CONFIG_MALI470=y CONFIG_MALI_DMA_BUF_MAP_ON_ATTACH=y ${PKG_CONFIGS}\n}\n\nmakeinstall_target() {\n  kernel_make -C $(kernel_path) M=${PKG_BUILD}/driver/src/devicedrv/mali/ \\\n    INSTALL_MOD_PATH=${INSTALL}/$(get_kernel_overlay_dir) INSTALL_MOD_STRIP=1 DEPMOD=: \\\n    modules_install\n}\n"
  },
  {
    "path": "packages/linux-firmware/brcmfmac_sdio-firmware/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"brcmfmac_sdio-firmware\"\nPKG_VERSION=\"c70355f9ec6d015b91a5c3199aa08b433e2f7caf\"\nPKG_SHA256=\"1a17f203d77590a1492e8fb156091caafcdec1c66b3df9152f42414892fa6471\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/LibreELEC/brcmfmac_sdio-firmware\"\nPKG_URL=\"https://github.com/LibreELEC/brcmfmac_sdio-firmware/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"Broadcom SDIO firmware used with LibreELEC\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_makeinstall_target() {\n  FW_TARGET_DIR=${INSTALL}/$(get_full_firmware_dir)\n\n  if find_file_path firmwares/${PKG_NAME}.dat; then\n    FW_LISTS=\"${FOUND_PATH}\"\n  else\n    FW_LISTS=\"${PKG_DIR}/firmwares/any.dat ${PKG_DIR}/firmwares/${TARGET_ARCH}.dat\"\n  fi\n\n  for fwlist in ${FW_LISTS}; do\n    [ -f ${fwlist} ] || continue\n    while read -r fwline; do\n      [ -z \"${fwline}\" ] && continue\n      [[ ${fwline} =~ ^#.* ]] && continue\n      [[ ${fwline} =~ ^[[:space:]] ]] && continue\n\n      for fwfile in $(cd ${PKG_BUILD} && eval \"find ${fwline}\"); do\n        [ -d ${PKG_BUILD}/${fwfile} ] && continue\n        if [ -f ${PKG_BUILD}/${fwfile} ]; then\n          mkdir -p $(dirname ${FW_TARGET_DIR}/brcm/${fwfile})\n            cp -Lv ${PKG_BUILD}/${fwfile} ${FW_TARGET_DIR}/brcm/${fwfile}\n        else\n          echo \"ERROR: Firmware file ${fwfile} does not exist - aborting\"\n          exit 1\n        fi\n      done\n    done < ${fwlist}\n  done\n\n  mkdir -p ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/brcmfmac-firmware-setup ${INSTALL}/usr/bin\n}\n\npost_install() {\n  enable_service brcmfmac-firmware.service\n}\n"
  },
  {
    "path": "packages/linux-firmware/brcmfmac_sdio-firmware/scripts/brcmfmac-firmware-setup",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nDTNAME=$(/usr/bin/dtname)\n\nif [ \"$DTNAME\" = \"khadas,vim\" -o \\\n  \"$DTNAME\" = \"xunlong,orangepi-win\" -o \\\n  \"$DTNAME\" = \"sinovoip,bpi-m2-ultra\" -o \\\n  \"$DTNAME\" = \"sinovoip,bpi-m2-zero\" ]; then\n  ln -sf /usr/lib/kernel-overlays/base/lib/firmware/brcm/BCM43430A1.vim /usr/lib/firmware/brcm/BCM43430A1.hcd\nelse\n  ln -sf /usr/lib/kernel-overlays/base/lib/firmware/brcm/BCM43430A1.def /usr/lib/firmware/brcm/BCM43430A1.hcd\nfi\n"
  },
  {
    "path": "packages/linux-firmware/brcmfmac_sdio-firmware/system.d/brcmfmac-firmware.service",
    "content": "[Unit]\nDescription=Broadcom SDIO Firmware Symlink Service\nBefore=kodi.service\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/bin/sh -c \"/usr/bin/brcmfmac-firmware-setup\"\n\n[Install]\nWantedBy=local-fs.target\n"
  },
  {
    "path": "packages/linux-firmware/brcmfmac_sdio-firmware-imx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"brcmfmac_sdio-firmware-imx\"\nPKG_VERSION=\"0.1\"\nPKG_SHA256=\"4c8ed8ae39ecd05d7e3aeebc98cf230912cdcc887fa78d5112f981b6f9358b6e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/LibreELEC/LibreELEC.tv\"\nPKG_URL=\"${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Firmware for brcm bluetooth chips used in some Freescale iMX based devices.\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp -av brcm_patchram_plus ${INSTALL}/usr/bin/\n\n  mkdir -p ${INSTALL}/$(get_kernel_overlay_dir)/lib/firmware/\n    cp -av firmware/brcm ${INSTALL}/$(get_kernel_overlay_dir)/lib/firmware/\n}\n"
  },
  {
    "path": "packages/linux-firmware/brcmfmac_sdio-firmware-imx/system.d/brcmfmac_sdio-firmware@.service",
    "content": "[Unit]\nDescription=Broadcom sdio firmware update for %I\nConditionPathExists=/dev/ttymxc3\n\n[Service]\nType=simple\nRemainAfterExit=yes\nExecStart=/usr/bin/brcm_patchram_plus --patchram /lib/firmware/brcm/%I.hcd --baudrate 3000000 --use_baudrate_for_download /dev/ttymxc3 --enable_hci --no2bytes --tosleep=50000\n"
  },
  {
    "path": "packages/linux-firmware/brcmfmac_sdio-firmware-imx/udev.d/80-brcmfmac_sdio.rules",
    "content": "################################################################################\n# udev rules file for loading brcmfmac_sdio-firmware\n################################################################################\n\nACTION!=\"add\", GOTO=\"end\"\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x02d0\", ATTRS{device}==\"0x4329\", GOTO=\"begin\"\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x02d0\", ATTRS{device}==\"0x4330\", GOTO=\"begin\"\nGOTO=\"end\"\nLABEL=\"begin\"\n### Broadcom bcm4330 bluetooth device\nATTRS{vendor}==\"0x02d0\", ATTRS{device}==\"0x4330\", \\\n  ENV{brcm_device}=\"bcm4330\"\n### Broadcom bcm4329 bluetooth device\nATTRS{vendor}==\"0x02d0\", ATTRS{device}==\"0x4329\", \\\n  ENV{brcm_device}=\"bcm4329\"\n\nENV{brcm_device}==\"bcm43*\", ACTION==\"add\", \\\n  TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"brcmfmac_sdio-firmware@$env{brcm_device}.service\"\nLABEL=\"end\"\n"
  },
  {
    "path": "packages/linux-firmware/brcmfmac_sdio-firmware-rpi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"brcmfmac_sdio-firmware-rpi\"\nPKG_VERSION=\"a25c7c3d04db0363409dfd17f265bab66f0eae5a\"\nPKG_SHA256=\"1caa1be79a3050f02f7c4950caa8007220fcc486ebc181a54ae6e4b07af34795\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/LibreELEC/LibreELEC.tv\"\nPKG_URL=\"https://github.com/LibreELEC/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Firmware for brcm bluetooth chips used on RaspberryPi devices.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  DESTDIR=${INSTALL}/$(get_kernel_overlay_dir) ./install\n}\n"
  },
  {
    "path": "packages/linux-firmware/dvb-firmware/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dvb-firmware\"\nPKG_VERSION=\"a68fb22f4e7c1489751df2a65d0d690a449083b0\"\nPKG_SHA256=\"a64dd4c200aa00142dc27796d1509b7ca25bd44c5b7aebe780ca293f97402706\"\nPKG_LICENSE=\"Free-to-use\"\nPKG_SITE=\"https://github.com/LibreELEC/dvb-firmware\"\nPKG_URL=\"https://github.com/LibreELEC/dvb-firmware/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"dvb-firmware: firmwares for various DVB drivers\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  PKG_FW_DIR=\"${INSTALL}/$(get_kernel_overlay_dir)/lib/firmware\"\n  mkdir -p \"${PKG_FW_DIR}\"\n    cp -a \"${PKG_BUILD}/firmware/\"* \"${PKG_FW_DIR}\"\n}\n"
  },
  {
    "path": "packages/linux-firmware/firmware-dragonboard/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"firmware-dragonboard\"\nPKG_VERSION=\"1.4.0\"\nPKG_SHA256=\"822d2f8506d9657dbce6aa2bfce81ccbf97dcfc40831b70703b14b3f296fa4c0\"\nPKG_ARCH=\"aarch64 arm\"\nPKG_LICENSE=\"proprietary\"\nPKG_SITE=\"https://developer.qualcomm.com/\"\nPKG_URL=\"https://developer.qualcomm.com/download/db410c/firmware-410c-${PKG_VERSION}.bin\"\nPKG_DEPENDS_TARGET=\"toolchain dosfstools:host\"\nPKG_LONGDESC=\"Additional firmware for Dragonboard 410c\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n    cd ${PKG_BUILD}\n    sh ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.bin --auto-accept\n}\n\nmake_target() {\n  :\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_firmware_dir)/qcom/venus-1.8/\n    cp -a linux-board-support-package-v${PKG_VERSION%.0}/proprietary-linux/* ${INSTALL}/$(get_full_firmware_dir)\n    cp -a linux-board-support-package-v${PKG_VERSION%.0}/proprietary-linux/venus* ${INSTALL}/$(get_full_firmware_dir)/qcom/venus-1.8/\n    rm ${INSTALL}/$(get_full_firmware_dir)/firmware.tar\n\n    MTOOLS_SKIP_CHECK=1 mcopy -n -i linux-board-support-package-v${PKG_VERSION%.0}/bootloaders-linux/NON-HLOS.bin \\\n                                    ::image/modem.* \\\n                                    ::image/mba.mbn \\\n                                    ::image/wcnss.* \\\n                                    ${INSTALL}/$(get_full_firmware_dir)\n}\n"
  },
  {
    "path": "packages/linux-firmware/firmware-imx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"firmware-imx\"\nPKG_VERSION=\"8.17\"\nPKG_SHA256=\"1ee3c49ad8749867487f09d6e4472536fb809b667c1bb3c56511175b8974e3c6\"\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"other\"\nPKG_SITE=\"http://www.freescale.com\"\nPKG_URL=\"https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/${PKG_NAME}-${PKG_VERSION}.bin\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"firmware-imx: Freescale IMX firmware such as for the VPU\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n  cd $(dirname ${PKG_BUILD})\n  sh ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.bin --auto-accept\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_firmware_dir)/imx/sdma\n    cp -P firmware/sdma/sdma-imx6q.bin ${INSTALL}/$(get_full_firmware_dir)/imx/sdma\n    cp -P firmware/sdma/sdma-imx7d.bin ${INSTALL}/$(get_full_firmware_dir)/imx/sdma\n\n  mkdir -p ${INSTALL}/$(get_full_firmware_dir)/vpu\n    cp -P firmware/vpu/vpu_fw_imx6d.bin ${INSTALL}/$(get_full_firmware_dir)/vpu\n    cp -P firmware/vpu/vpu_fw_imx6q.bin ${INSTALL}/$(get_full_firmware_dir)/vpu\n    cp -P firmware/vpu/vpu_fw_imx8_dec.bin ${INSTALL}/$(get_full_firmware_dir)/vpu\n}\n"
  },
  {
    "path": "packages/linux-firmware/intel-ucode/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"intel-ucode\"\nPKG_VERSION=\"20230613\"\nPKG_SHA256=\"894d822d2347222a2595d4fc47d358e01d35a54780123100c317dfc31b1b0cc9\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"other\"\nPKG_SITE=\"https://downloadcenter.intel.com/search?keyword=linux+microcode\"\nPKG_URL=\"https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/archive/microcode-${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"intel-ucode: Intel CPU microcodes\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/linux-firmware/intel-ucode/sources/intel-microcode2ucode.c",
    "content": "/*\n * Convert Intel microcode.dat into a single binary microcode.bin file\n *\n * Based on code by Kay Sievers <kay.sievers@vrfy.org>\n * Changed to create a single file by Thomas Bächler <thomas@archlinux.org>\n */\n\n\n#ifndef _GNU_SOURCE\n# define _GNU_SOURCE 1\n#endif\n\n#include <stdio.h>\n#include <unistd.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n#include <limits.h>\n#include <stdbool.h>\n#include <inttypes.h>\n#include <fcntl.h>\n#include <errno.h>\n#include <sys/stat.h>\n\nstruct microcode_header_intel {\n\tunsigned int hdrver;\n\tunsigned int rev;\n\tunsigned int date;\n\tunsigned int sig;\n\tunsigned int cksum;\n\tunsigned int ldrver;\n\tunsigned int pf;\n\tunsigned int datasize;\n\tunsigned int totalsize;\n\tunsigned int reserved[3];\n};\n\nunion mcbuf {\n\tstruct microcode_header_intel hdr;\n\tunsigned int i[0];\n\tchar c[0];\n};\n\nint main(int argc, char *argv[])\n{\n\tconst char *filename = \"/lib/firmware/microcode.dat\";\n\tFILE *f;\n\tchar line[LINE_MAX];\n\tchar buf[4000000];\n\tunion mcbuf *mc;\n\tsize_t bufsize, count, start;\n\tint rc = EXIT_SUCCESS;\n\n\tif (argv[1] != NULL)\n\t\tfilename = argv[1];\n\n\tcount = 0;\n\tmc = (union mcbuf *) buf;\n\tf = fopen(filename, \"re\");\n\tif (f == NULL) {\n\t\tprintf(\"open %s: %m\\n\", filename);\n\t\trc = EXIT_FAILURE;\n\t\tgoto out;\n\t}\n\n\twhile (fgets(line, sizeof(line), f) != NULL) {\n\t\tif (sscanf(line, \"%x, %x, %x, %x\",\n\t\t    &mc->i[count],\n\t\t    &mc->i[count + 1],\n\t\t    &mc->i[count + 2],\n\t\t    &mc->i[count + 3]) != 4)\n\t\t\tcontinue;\n\t\tcount += 4;\n\t}\n\tfclose(f);\n\n\tbufsize = count * sizeof(int);\n\tprintf(\"%s: %lu(%luk) bytes, %zu integers\\n\",\n\t       filename,\n\t       bufsize,\n\t       bufsize / 1024,\n\t       count);\n\n\tif (bufsize < sizeof(struct microcode_header_intel))\n\t\tgoto out;\n\n\tf = fopen(\"microcode.bin\", \"we\");\n\tif (f == NULL) {\n\t\tprintf(\"open microcode.bin: %m\\n\");\n\t\trc = EXIT_FAILURE;\n\t\tgoto out;\n\t}\n\n\tstart = 0;\n\tfor (;;) {\n\t\tsize_t size;\n\t\tunsigned int family, model, stepping;\n\t\tunsigned int year, month, day;\n\n\t\tmc = (union mcbuf *) &buf[start];\n\n\t\tif (mc->hdr.totalsize)\n\t\t\tsize = mc->hdr.totalsize;\n\t\telse\n\t\t\tsize = 2000 + sizeof(struct microcode_header_intel);\n\n\t\tif (mc->hdr.ldrver != 1 || mc->hdr.hdrver != 1) {\n\t\t\tprintf(\"unknown version/format:\\n\");\n\t\t\trc = EXIT_FAILURE;\n\t\t\tbreak;\n\t\t}\n\n\t\t/*\n\t\t *  0- 3 stepping\n\t\t *  4- 7 model\n\t\t *  8-11 family\n\t\t * 12-13 type\n\t\t * 16-19 extended model\n\t\t * 20-27 extended family\n\t\t */\n\t\tfamily = (mc->hdr.sig >> 8) & 0xf;\n\t\tif (family == 0xf)\n\t\t\tfamily += (mc->hdr.sig >> 20) & 0xff;\n\t\tmodel = (mc->hdr.sig >> 4) & 0x0f;\n\t\tif (family == 0x06)\n\t\t\tmodel += ((mc->hdr.sig >> 16) & 0x0f) << 4;\n\t\tstepping = mc->hdr.sig & 0x0f;\n\n\t\tyear = mc->hdr.date & 0xffff;\n\t\tmonth = mc->hdr.date >> 24;\n\t\tday = (mc->hdr.date >> 16) & 0xff;\n\n\t\tprintf(\"\\n\");\n\t\tprintf(\"signature: 0x%02x\\n\", mc->hdr.sig);\n\t\tprintf(\"flags:     0x%02x\\n\", mc->hdr.pf);\n\t\tprintf(\"revision:  0x%02x\\n\", mc->hdr.rev);\n\t\tprintf(\"date:      %04x-%02x-%02x\\n\", year, month, day);\n\t\tprintf(\"size:      %zu\\n\", size);\n\n\t\tif (fwrite(mc, size, 1, f) != 1) {\n\t\t\tprintf(\"write microcode.bin: %m\\n\");\n\t\t\trc = EXIT_FAILURE;\n\t\t\tgoto out;\n\t\t}\n\n\t\tstart += size;\n\t\tif (start >= bufsize)\n\t\t\tbreak;\n\t}\n\tfclose(f);\n\tprintf(\"\\n\");\nout:\n\treturn rc;\n}\n"
  },
  {
    "path": "packages/linux-firmware/iwlwifi-firmware/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"iwlwifi-firmware\"\nPKG_VERSION=\"2eb6baa08b3a3c9bf3f9f12ec6d9b94eca1d36e7\"\nPKG_SHA256=\"2641d8587536f646e28468dad6cda962fbdee9c45571075546135c4ca8776162\"\nPKG_LICENSE=\"Free-to-use\"\nPKG_SITE=\"https://github.com/LibreELEC/iwlwifi-firmware\"\nPKG_URL=\"https://github.com/LibreELEC/iwlwifi-firmware/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"iwlwifi-firmware: firmwares for various Intel WLAN drivers\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  DESTDIR=${INSTALL}/$(get_kernel_overlay_dir) ./install\n}\n"
  },
  {
    "path": "packages/linux-firmware/kernel-firmware/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"kernel-firmware\"\nPKG_VERSION=\"20250708\"\nPKG_SHA256=\"6f3efee7f600c201f9b2d675889a4ccdb8cfe56e0d283641796ed10e64c72047\"\nPKG_LICENSE=\"other\"\nPKG_SITE=\"https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/\"\nPKG_URL=\"https://cdn.kernel.org/pub/linux/kernel/firmware/linux-firmware-${PKG_VERSION}.tar.xz\"\nPKG_NEED_UNPACK=\"${PROJECT_DIR}/${PROJECT}/packages/${PKG_NAME} ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/packages/${PKG_NAME}\"\nPKG_LONGDESC=\"kernel-firmware: kernel related firmware\"\nPKG_TOOLCHAIN=\"manual\"\n\nconfigure_package() {\n  PKG_FW_SOURCE=${PKG_BUILD}/.copied-firmware\n}\n\npost_patch() {\n  (\n    cd ${PKG_BUILD}\n\n    # Do not run check_whence.py against the copied firmware\n    echo '#!/usr/bin/python3' > check_whence.py\n\n    mkdir -p \"${PKG_FW_SOURCE}\"\n      ./copy-firmware.sh --verbose \"${PKG_FW_SOURCE}\"\n\n    # copy extra firmware files (or overwrite upstream ones)\n    if [ -d ${PKG_DIR}/extra-firmware ]; then\n      cp -r ${PKG_DIR}/extra-firmware/* \"${PKG_FW_SOURCE}\"\n    fi\n  )\n}\n\n# Install additional miscellaneous drivers\nmakeinstall_target() {\n  FW_TARGET_DIR=${INSTALL}/$(get_full_firmware_dir)\n\n  if find_file_path config/kernel-firmware.dat; then\n    FW_LISTS=\"${FOUND_PATH}\"\n  else\n    FW_LISTS=\"${PKG_DIR}/firmwares/any.dat ${PKG_DIR}/firmwares/${TARGET_ARCH}.dat\"\n  fi\n\n  FW_LISTS+=\" ${PROJECT_DIR}/${PROJECT}/config/kernel-firmware-any.dat ${PROJECT_DIR}/${PROJECT}/config/kernel-firmware-${TARGET_ARCH}.dat\"\n\n  FW_LISTS+=\" ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/config/kernel-firmware-any.dat ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/config/kernel-firmware-${TARGET_ARCH}.dat\"\n\n  for fwlist in ${FW_LISTS}; do\n    [ -f \"${fwlist}\" ] || continue\n\n    while read -r fwline; do\n      [ -z \"${fwline}\" ] && continue\n      [[ ${fwline} =~ ^#.* ]] && continue\n      [[ ${fwline} =~ ^[[:space:]] ]] && continue\n\n      eval \"(cd ${PKG_FW_SOURCE} && find \"${fwline}\" >/dev/null)\" || die \"ERROR: Firmware pattern does not exist: ${fwline}\"\n\n      while read -r fwfile; do\n        [ -d \"${PKG_FW_SOURCE}/${fwfile}\" ] && continue\n\n        if [ -f \"${PKG_FW_SOURCE}/${fwfile}\" ]; then\n          mkdir -p \"$(dirname \"${FW_TARGET_DIR}/${fwfile}\")\"\n            cp -Lv \"${PKG_FW_SOURCE}/${fwfile}\" \"${FW_TARGET_DIR}/${fwfile}\"\n        else\n          echo \"ERROR: Firmware file ${fwfile} does not exist - aborting\"\n          exit 1\n        fi\n      done <<<\"$(cd ${PKG_FW_SOURCE} && eval \"find \"${fwline}\"\")\"\n    done <\"${fwlist}\"\n  done\n\n  PKG_KERNEL_CFG_FILE=$(kernel_config_path) || die\n\n  # The following files are RPi specific and installed by brcmfmac_sdio-firmware-rpi instead.\n  # They are also not required at all if the kernel is not suitably configured.\n  if listcontains \"${FIRMWARE}\" \"brcmfmac_sdio-firmware-rpi\" ||\n     ! grep -q \"^CONFIG_BRCMFMAC_SDIO=y\" ${PKG_KERNEL_CFG_FILE}; then\n    rm -fr ${FW_TARGET_DIR}/brcm/brcmfmac43430*-sdio.*\n    rm -fr ${FW_TARGET_DIR}/brcm/brcmfmac43455*-sdio.*\n  fi\n\n  # brcm pcie firmware is only needed by x86_64\n  [ \"${TARGET_ARCH}\" != \"x86_64\" ] && rm -fr ${FW_TARGET_DIR}/brcm/*-pcie.*\n\n  # Cleanup - which may be project or device specific\n  find_file_path scripts/cleanup.sh && ${FOUND_PATH} ${FW_TARGET_DIR} || true\n}\n"
  },
  {
    "path": "packages/linux-firmware/misc-firmware/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"misc-firmware\"\nPKG_VERSION=\"868fb584096c17ddcbc85e472e71f9b8d27da91f\"\nPKG_SHA256=\"862a5a62b9794d7c6753ac0f7ae03fd34ee2564199afd61c42dc8f69d4c5b876\"\nPKG_LICENSE=\"Free-to-use\"\nPKG_SITE=\"https://github.com/LibreELEC/misc-firmware\"\nPKG_URL=\"https://github.com/LibreELEC/misc-firmware/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kernel-firmware\"\nPKG_LONGDESC=\"misc-firmware: firmwares for various drivers\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  DESTDIR=${INSTALL}/$(get_kernel_overlay_dir) ./install\n}\n"
  },
  {
    "path": "packages/linux-firmware/rtl8723bs_bt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rtl8723bs_bt\"\nPKG_VERSION=\"09eb91f52a639ec5e4c5c4c98dc2afede046cf20\"\nPKG_SHA256=\"4bb8483c4a14a9e0dfc4a6ddca18486caab5f361be2441b91e9e2a399ca9f33e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/lwfinger/rtl8723bs_bt\"\nPKG_URL=\"https://github.com/lwfinger/rtl8723bs_bt/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"rtl8723bs_bt Linux firmware\"\n"
  },
  {
    "path": "packages/linux-firmware/rtl8723bs_bt/patches/rtl8723bs_bt-001-Makefile.patch",
    "content": "diff --git a/Makefile b/Makefile\nindex 52506b9..fd196f3 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1,12 +1,15 @@\n rtk_hciattach:hciattach.c hciattach_rtk.o  \n-\tcc -o rtk_hciattach hciattach.c hciattach_rtk.o  \n+\t$(CC) $(CFLAGS) $(LDFLAGS) -o rtk_hciattach hciattach.c hciattach_rtk.o  \n \n hciattach_rtk.o:hciattach_rtk.c\n-\tcc -c hciattach_rtk.c\n+\t$(CC) $(CFLAGS) $(LDFLAGS) -c hciattach_rtk.c\n \n-clean:\n-\trm -f *.o  rtk_hciattach\n+all:\n+\trtk_hciattach\n \n install:\n-\tmkdir -p /lib/firmware/rtl_bt\n-\tcp -p rtlbt_* /lib/firmware/rtl_bt/.\n+\tmkdir -p $(DESTDIR)/usr/bin\n+\tcp -P rtk_hciattach $(DESTDIR)/usr/bin\n+\n+clean:\n+\trm -f *.o rtk_hciattach\n"
  },
  {
    "path": "packages/linux-firmware/rtl8723bs_bt/patches/rtl8723bs_bt-002-firmware_path.patch",
    "content": "--- a/hciattach_rtk.c\t2016-07-18 00:47:52.000000000 +0100\n+++ b/hciattach_rtk.c\t2017-12-15 04:27:39.481299996 +0000\n@@ -1419,7 +1419,7 @@\n \tint ret = 0;\n \tstruct stat st;\n \n-\tret = sprintf(firmware_file_name, FIRMWARE_DIRECTORY\"rtlbt_fw\");\n+\tret = sprintf(firmware_file_name, FIRMWARE_DIRECTORY\"rtl8723b_fw\");\n \n \treturn firmware_file_name;\n }\n@@ -1504,7 +1504,7 @@\n \tint ret = 0;\n \tint i = 0;\n \n-\tret = sprintf(bt_config_file_name, BT_CONFIG_DIRECTORY\"rtlbt_config\"); \n+\tret = sprintf(bt_config_file_name, BT_CONFIG_DIRECTORY\"rtl8723b_config\");\n \tif (stat(bt_config_file_name, &st) < 0) {\n \t\tRS_ERR(\"can't access bt config file:%s, errno:%d\\n\", bt_config_file_name, errno);\n \t\treturn -1;\n"
  },
  {
    "path": "packages/linux-firmware/rtl8723bs_bt/system.d/rtl8723bs_bt-firmware.service",
    "content": "[Unit]\nDescription=Realtek sdio firmware update\n\n[Service]\nType=simple\nRemainAfterExit=yes\nEnvironmentFile=/usr/share/bttty.conf\nExecStart=/usr/bin/rtk_hciattach -n -s 115200 ${BTTTY} rtk_h5 2000000\n"
  },
  {
    "path": "packages/linux-firmware/rtl8723bs_bt/udev.d/80-rtl8723_bt.rules",
    "content": "################################################################################\n# udev rules file for loading rtl8723bs_bt-firmware\n################################################################################\n\nACTION!=\"add\", GOTO=\"end\"\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x024c\", ATTRS{device}==\"0xb723\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"rtl8723bs_bt-firmware.service\"\nGOTO=\"end\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "packages/linux-firmware/wlan-firmware/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"wlan-firmware\"\nPKG_VERSION=\"c0ad2587a8037ca430fd887602bd739d769fdbc5\"\nPKG_SHA256=\"cd019a209f1dd0c76caa9cf382231e86ef07e4448ff3c81b3d1d76b6bde6ca67\"\nPKG_LICENSE=\"Free-to-use\"\nPKG_SITE=\"https://github.com/LibreELEC/wlan-firmware\"\nPKG_URL=\"https://github.com/LibreELEC/wlan-firmware/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"wlan-firmware: firmwares for various WLAN drivers\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  DESTDIR=${INSTALL}/$(get_kernel_overlay_dir) ./install\n}\n"
  },
  {
    "path": "packages/mediacenter/JsonSchemaBuilder/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"JsonSchemaBuilder\"\nPKG_VERSION=\"0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kodi.tv\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_UNPACK=\"${MEDIACENTER}\"\nPKG_LONGDESC=\"kodi-platform:\"\n\nPKG_CMAKE_SCRIPT=\"$(get_build_dir ${MEDIACENTER})/tools/depends/native/JsonSchemaBuilder/CMakeLists.txt\"\n\nPKG_CMAKE_OPTS_HOST=\"-Wno-dev\"\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp JsonSchemaBuilder ${TOOLCHAIN}/bin\n}\n"
  },
  {
    "path": "packages/mediacenter/LibreELEC-settings/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"LibreELEC-settings\"\nPKG_VERSION=\"b920d5d83a8a7445d121d2f920169444111bf93c\"\nPKG_SHA256=\"d8147068b6172250d98d41fafd7d6dbaa286074932b537214bf0dab95fe9e99a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"https://github.com/LibreELEC/service.libreelec.settings/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 connman dbussy\"\nPKG_LONGDESC=\"LibreELEC-settings: is a settings dialog for LibreELEC\"\n\nPKG_MAKE_OPTS_TARGET=\"ADDON_VERSION=${OS_VERSION} \\\n                      DISTRONAME=${DISTRONAME} \\\n                      ROOT_PASSWORD=${ROOT_PASSWORD}\"\n\nif [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n  PKG_DEPENDS_TARGET+=\" setxkbmap\"\nelse\n  PKG_DEPENDS_TARGET+=\" bkeymaps\"\nfi\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libreelec\n    cp ${PKG_DIR}/scripts/* ${INSTALL}/usr/lib/libreelec\n    sed -e \"s/@DISTRONAME@/${DISTRONAME}/g\" \\\n      -i ${INSTALL}/usr/lib/libreelec/backup-restore\n    sed -e \"s/@DISTRONAME@/${DISTRONAME}/g\" \\\n      -i ${INSTALL}/usr/lib/libreelec/factory-reset\n\n  ADDON_INSTALL_DIR=${INSTALL}/usr/share/kodi/addons/service.libreelec.settings\n  python_compile ${ADDON_INSTALL_DIR}/resources/lib/\n}\n\npost_install() {\n  enable_service backup-restore.service\n  enable_service factory-reset.service\n}\n"
  },
  {
    "path": "packages/mediacenter/LibreELEC-settings/scripts/backup-restore",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\n. /usr/lib/libreelec/functions\n\nhidecursor\n\nBACKUP_EXTENSION_LIST=\".tar .tar.gz .tar.bz2 .tar.xz\"\nfor EXTENSION in $BACKUP_EXTENSION_LIST; do\n  BACKUP_FILE=$(find /storage/.restore/ -name \"*${EXTENSION}\" -print -quit 2>/dev/null)\n  [ -n \"${BACKUP_FILE}\" ] && break\ndone\n\n\nif [ -f \"${BACKUP_FILE}\" ]; then\n  echo -e \"RESTORE IN PROGRESS\\n\"\n  echo -e \"Please do not reboot or turn off your @DISTRONAME@ device!\\n\"\n\n  StartProgress spinner \"Checking backup file... \"\n    tar tf \"${BACKUP_FILE}\" &>/dev/null\n\n  if [ $? -eq 0 ]; then\n    StopProgress \"OK\"\n\n    echo -e \"\\nThis may take some time to complete, please be patient.\\n\"\n\n    StartProgress spinner \"Restoring... \"\n      rm -rf /storage/.kodi \\\n             /storage/.cache \\\n             /storage/.config &>/dev/null\n      tar xf \"${BACKUP_FILE}\" -C / &>/dev/null\n      rm -f \"${BACKUP_FILE}\" &>/dev/null\n      sync\n      StopProgress \"done!\"\n\n    echo\n    StartProgress countdown \"Rebooting in 5s... \" 5 \"NOW\"\n  else\n    StopProgress \"FAILED\"\n\n    echo -e \"\\nBackup file is not valid, or corrupt.\\n\"\n\n    StartProgress spinner \"Removing file to allow normal restart... \"\n      rm -f \"${BACKUP_FILE}\" &>/dev/null\n      sync\n      StopProgress \"done\"\n\n    echo\n    StartProgress countdown \"Rebooting in 30s... \" 30 \"NOW\"\n  fi\nfi\n\nreboot -f\n"
  },
  {
    "path": "packages/mediacenter/LibreELEC-settings/scripts/factory-reset",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\n. /usr/lib/libreelec/functions\n\nhidecursor\n\nlabel=\"\"\ntarget=\"\"\nuuid=\"\"\n\nget_target() {\n  for arg in $(cat /proc/cmdline); do\n    case $arg in\n      disk=*)\n        disk=\"${arg#*=}\"\n        case $disk in\n          LABEL=*)\n            label=\"${disk#*=}\"\n            target=\"$(blkid -L ${label})\"\n            ;;\n          UUID=*)\n            uuid=\"${disk#*=}\"\n            target=\"$(blkid -U ${uuid})\"\n            ;;\n          /*)\n            target=\"$disk\"\n            ;;\n        esac\n        ;;\n    esac\n  done\n}\n\nshow_reset_msg() {\n  echo -e \"RESET IN PROGRESS\\n\"\n  echo -e \"Please do not reboot or turn off your @DISTRONAME@ device!\\n\"\n}\n\nif [ -f /storage/.cache/reset_hard ]; then\n  # hard reset\n  rm -f /storage/.cache/reset_hard\n  get_target\n  if [ -n \"${target}\" ]; then\n    show_reset_msg\n\n    StartProgress spinner \"Performing hard reset... \"\n    if [ -b \"${target}\" -a $(blkid -o value -s TYPE \"${target}\") = \"ext4\" ]; then\n      umount /storage/\n      mke2fs -t ext4 -m 0 \"${target}\" &>/dev/null\n      if [ -n \"${label}\" ]; then\n        tune2fs -U random -L \"${label}\" \"${target}\" &>/dev/null\n      fi\n      if [ -n \"${uuid}\" ]; then\n        tune2fs -U \"${uuid}\" \"${target}\" &>/dev/null\n      fi\n    else\n      find /storage/ -mindepth 1 -delete\n    fi\n    StopProgress \"done!\"\n\n    echo\n    StartProgress countdown \"Rebooting in 5s... \" 5 \"NOW\"\n  fi\nelif [ -f /storage/.cache/reset_soft ]; then\n  # soft reset\n  rm -f /storage/.cache/reset_soft\n  get_target\n  if [ -n \"${target}\" ]; then\n    show_reset_msg\n\n    StartProgress spinner \"Performing soft reset... \"\n      find /storage/.cache/ /storage/.config/ /storage/.kodi/ -mindepth 1 -delete\n    StopProgress \"done!\"\n\n    echo\n    StartProgress countdown \"Rebooting in 5s... \" 5 \"NOW\"\n  fi\nfi\n\nsync\nreboot -f\n"
  },
  {
    "path": "packages/mediacenter/LibreELEC-settings/system.d/backup-restore.service",
    "content": "[Unit]\nDescription=Restoring Backup\nDefaultDependencies=no\n\n[Service]\nType=idle\nExecStart=/usr/lib/libreelec/backup-restore\nStandardInput=tty-force\nStandardOutput=inherit\nStandardError=inherit\n"
  },
  {
    "path": "packages/mediacenter/LibreELEC-settings/system.d/backup-restore.target",
    "content": "[Unit]\nDescription=Restoring Backup target\nRequires=backup-restore.service\nAfter=backup-restore.service\nAllowIsolate=yes\n"
  },
  {
    "path": "packages/mediacenter/LibreELEC-settings/system.d/factory-reset.service",
    "content": "[Unit]\nDescription=Factory reset\nDefaultDependencies=no\n\n[Service]\nType=idle\nExecStart=/usr/lib/libreelec/factory-reset\nStandardInput=tty-force\nStandardOutput=inherit\nStandardError=inherit\n"
  },
  {
    "path": "packages/mediacenter/LibreELEC-settings/system.d/factory-reset.target",
    "content": "[Unit]\nDescription=Factory reset target\nRequires=factory-reset.service\nAfter=factory-reset.service\nAllowIsolate=yes\n"
  },
  {
    "path": "packages/mediacenter/TexturePacker/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"TexturePacker\"\nPKG_VERSION=\"0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kodi.tv\"\nPKG_DEPENDS_HOST=\"lzo:host libpng:host libjpeg-turbo:host giflib:host\"\nPKG_DEPENDS_UNPACK=\"${MEDIACENTER}\"\nPKG_LONGDESC=\"kodi-platform:\"\n\nPKG_CMAKE_SCRIPT=\"$(get_build_dir ${MEDIACENTER})/tools/depends/native/TexturePacker/CMakeLists.txt\"\n\nPKG_CMAKE_OPTS_HOST=\"-Wno-dev\"\n\npre_configure_host() {\n  export CXXFLAGS=\"${CXXFLAGS} -std=c++11 -DTARGET_POSIX -DTARGET_LINUX -D_LINUX -I$(get_build_dir ${MEDIACENTER})/xbmc/platform/linux\"\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp TexturePacker ${TOOLCHAIN}/bin\n}\n"
  },
  {
    "path": "packages/mediacenter/kodi/config/70-libinput-ignore-power-button.rules",
    "content": "# Ignore power button input devices in libinput so logind can handle them\nACTION==\"remove\", GOTO=\"end\"\nSUBSYSTEM!=\"input\", GOTO=\"end\"\nKERNEL!=\"event*\", GOTO=\"end\"\n\nIMPORT{parent}=\"KEY\"\n\n# match devices that only generate KEY_POWER (code 116) events\nENV{KEY}==\"10000000000000 0\", ENV{LIBINPUT_IGNORE_DEVICE}=\"1\"\n\n# 32bit systems report the bitmap in 32bit chunks\nENV{KEY}==\"100000 0 0 0\", ENV{LIBINPUT_IGNORE_DEVICE}=\"1\"\n\nLABEL=\"end\"\n\n"
  },
  {
    "path": "packages/mediacenter/kodi/config/advancedsettings.xml",
    "content": "<advancedsettings version=\"1.0\">\n  <cputempcommand>/usr/bin/cputemp</cputempcommand>\n  <gputempcommand>/usr/bin/gputemp</gputempcommand>\n\n  <showexitbutton>false</showexitbutton>\n  <remotedelay>1</remotedelay>\n</advancedsettings>\n"
  },
  {
    "path": "packages/mediacenter/kodi/config/appliance-gbm-generic.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n  <section id=\"player\">\n    <category id=\"input\">\n      <group id=\"4\">\n        <setting id=\"input.libinputkeyboardlayout\">\n          <visible>true</visible>\n        </setting>\n      </group>\n    </category>\n  </section>\n</settings>\n"
  },
  {
    "path": "packages/mediacenter/kodi/config/appliance-gbm.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n  <section id=\"player\">\n    <category id=\"videoplayer\">\n      <group id=\"3\">\n        <setting id=\"videoplayer.useprimedecoder\">\n          <default>true</default>\n        </setting>\n        <setting id=\"videoplayer.useprimedecoderforhw\">\n          <visible>true</visible>\n        </setting>\n        <setting id=\"videoplayer.useprimerenderer\">\n          <default>0</default>\n        </setting>\n      </group>\n    </category>\n    <category id=\"input\">\n      <group id=\"4\">\n        <setting id=\"input.libinputkeyboardlayout\">\n          <visible>true</visible>\n        </setting>\n      </group>\n    </category>\n  </section>\n</settings>\n"
  },
  {
    "path": "packages/mediacenter/kodi/config/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n\n  <section id=\"games\">\n    <category id=\"gamesgeneral\">\n      <group id=\"1\">\n        <setting id=\"gamesgeneral.enablerewind\">\n          <default>false</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n  <section id=\"system\">\n    <category id=\"display\">\n      <group id=\"1\">\n        <setting id=\"videoscreen.screen\">\n          <visible>false</visible>\n        </setting>\n      </group>\n      <group id=\"3\">\n        <setting id=\"videoscreen.noofbuffers\">\n          <default>2</default>\n        </setting>\n      </group>\n    </category>\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.volumesteps\">\n          <default>20</default>\n        </setting>\n      </group>\n    </category>\n    <category id=\"logging\">\n      <group id=\"1\">\n        <setting id=\"debug.screenshotpath\">\n          <default>/storage/screenshots/</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n  <section id=\"services\">\n    <category id=\"airplay\">\n      <group id=\"1\">\n        <setting id=\"services.airplay\">\n          <default>true</default>\n        </setting>\n      </group>\n    </category>\n\n    <category id=\"smb\">\n      <group id=\"2\">\n        <setting id=\"smb.maxprotocol\">\n          <default>0</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n  <section id=\"pvr\">\n    <category id=\"epg\">\n      <group id=\"2\">\n        <setting id=\"epg.preventupdateswhileplayingtv\">\n          <default>true</default>\n        </setting>\n        <setting id=\"epg.ignoredbforclient\">\n          <default>true</default>\n        </setting>\n      </group>\n    </category>\n\n    <category id=\"pvrplayback\">\n      <group id=\"1\">\n        <setting id=\"pvrplayback.signalquality\">\n          <default>false</default>\n        </setting>\n      </group>\n    </category>\n\n    <category id=\"pvrpowermanagement\">\n      <group id=\"1\">\n        <setting id=\"pvrpowermanagement.setwakeupcmd\">\n          <default>/usr/bin/setwakeup.sh</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n</settings>\n"
  },
  {
    "path": "packages/mediacenter/kodi/config/guisettings.xml",
    "content": "<settings version=\"2\">\n  <general>\n    <settinglevel>2</settinglevel>\n  </general>\n</settings>\n"
  },
  {
    "path": "packages/mediacenter/kodi/config/kodi.conf.in",
    "content": "KODI_AE_SINK=@KODI_AE_SINK@\nHOME=/storage\nKODI_TEMP=/storage/.kodi/temp\nKODI_HOME=/usr/share/kodi/\n"
  },
  {
    "path": "packages/mediacenter/kodi/config/network_wait",
    "content": "WAIT_NETWORK=\"true\"\nWAIT_NETWORK_TIME=\"10\"\nWAIT_NETWORK_DEFAULT=\"true\"\n"
  },
  {
    "path": "packages/mediacenter/kodi/config/repository.libreelec.tv/addon.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"repository.libreelec.tv\"\n\t\tname=\"LibreELEC Add-ons\"\n\t\tversion=\"@ADDON_VERSION@\"\n\t\tprovider-name=\"Team LibreELEC\">\n\t<extension point=\"xbmc.addon.repository\"\n\t\tname=\"LibreELEC Add-ons\">\n\t\t<dir>\n\t\t\t<info>@ADDON_URL@/addons.xml.gz</info>\n\t\t\t<checksum verify=\"sha256\">@ADDON_URL@/addons.xml.gz.sha256</checksum>\n\t\t\t<datadir zip=\"true\">@ADDON_URL@</datadir>\n\t\t\t<hashes>false</hashes>\n\t\t</dir>\n\t</extension>\n\t<extension point=\"xbmc.addon.metadata\">\n\t\t<summary>LibreELEC Add-ons</summary>\n\t\t<description>The LibreELEC add-on repository contains Kodi PVR Clients and Servers, Screensavers, Visualisations, and more. Add-ons in this repository are maintained and supported by LibreELEC staff and YOU the community. If you find a broken or non-working add-on please report it via the forums, or help by submitting fixes via GitHub.</description>\n\t\t<platform>all</platform>\n\t</extension>\n</addon>\n"
  },
  {
    "path": "packages/mediacenter/kodi/config/sources.xml",
    "content": "<sources>\n  <video>\n      <default pathversion=\"1\"></default>\n      <source>\n          <name>Videos</name>\n          <path pathversion=\"1\">/storage/videos/</path>\n          <allowsharing>true</allowsharing>\n      </source>\n      <source>\n          <name>TV Shows</name>\n          <path pathversion=\"1\">/storage/tvshows/</path>\n          <allowsharing>true</allowsharing>\n      </source>\n  </video>\n  <music>\n      <default pathversion=\"1\"></default>\n      <source>\n          <name>Music</name>\n          <path pathversion=\"1\">/storage/music/</path>\n          <allowsharing>true</allowsharing>\n      </source>\n  </music>\n  <pictures>\n      <default pathversion=\"1\"></default>\n      <source>\n          <name>Pictures</name>\n          <path pathversion=\"1\">/storage/pictures/</path>\n          <allowsharing>true</allowsharing>\n      </source>\n  </pictures>\n</sources>\n"
  },
  {
    "path": "packages/mediacenter/kodi/debug.d/kodi.conf",
    "content": "KODI_DEBUG=\"--debug\"\n"
  },
  {
    "path": "packages/mediacenter/kodi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"kodi\"\nPKG_VERSION=\"20.3-Nexus\"\nPKG_SHA256=\"1dbf1d9f4d5eeeb6aa2593813703343a8a377e88a00c68226354e4d67467f64d\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kodi.tv\"\nPKG_URL=\"https://github.com/xbmc/xbmc/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain JsonSchemaBuilder:host TexturePacker:host Python3 zlib systemd lzo pcre swig:host libass curl fontconfig fribidi tinyxml libjpeg-turbo freetype libcdio taglib libxml2 libxslt rapidjson sqlite ffmpeg crossguid libdvdnav libfmt lirc libfstrcmp flatbuffers:host flatbuffers libudfread spdlog\"\nPKG_DEPENDS_HOST=\"toolchain\"\nPKG_LONGDESC=\"A free and open source cross-platform media player.\"\nPKG_BUILD_FLAGS=\"+speed\"\n\nconfigure_package() {\n  # Single threaded LTO is very slow so rely on Kodi for parallel LTO support\n  if [ \"${LTO_SUPPORT}\" = \"yes\" ] && ! build_with_debug; then\n    PKG_KODI_USE_LTO=\"-DUSE_LTO=${CONCURRENCY_MAKE_LEVEL}\"\n  fi\n\n  # Set linker options\n  case $(get_target_linker) in\n    gold)\n      PKG_KODI_LINKER=\"-DENABLE_GOLD=ON \\\n                       -DENABLE_MOLD=OFF\"\n      ;;\n    mold)\n      PKG_KODI_LINKER=\"-DENABLE_GOLD=OFF \\\n                       -DENABLE_MOLD=ON \\\n                       -DMOLD_EXECUTABLE=${TOOLCHAIN}/${TARGET_NAME}/bin/mold\"\n      ;;\n    *)\n      PKG_KODI_LINKER=\"-DENABLE_GOLD=OFF \\\n                       -DENABLE_MOLD=OFF\"\n      ;;\n  esac\n\n  get_graphicdrivers\n\n  if [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n    PKG_DEPENDS_TARGET+=\" pciutils\"\n  fi\n\n  PKG_DEPENDS_TARGET+=\" dbus\"\n\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_DEPENDS_TARGET+=\" libX11 libXext libdrm libXrandr\"\n    KODI_PLATFORM=\"-DCORE_PLATFORM_NAME=x11 \\\n                   -DAPP_RENDER_SYSTEM=gl\"\n  elif [ \"${DISPLAYSERVER}\" = \"wl\" ]; then\n    PKG_DEPENDS_TARGET+=\" wayland waylandpp\"\n    PKG_PATCH_DIRS+=\" wayland\"\n    CFLAGS+=\" -DEGL_NO_X11\"\n    CXXFLAGS+=\" -DEGL_NO_X11\"\n    KODI_PLATFORM=\"-DCORE_PLATFORM_NAME=wayland \\\n                   -DAPP_RENDER_SYSTEM=gles \\\n                   -DWAYLANDPP_SCANNER=${TOOLCHAIN}/bin/wayland-scanner++ \\\n                   -DWAYLANDPP_PROTOCOLS_DIR=${SYSROOT_PREFIX}/usr/share/waylandpp/protocols\"\n  fi\n\n  if [ ! \"${OPENGL}\" = \"no\" ]; then\n    PKG_DEPENDS_TARGET+=\" ${OPENGL} glu\"\n  fi\n\n  if [ \"${OPENGLES_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\n  fi\n\n  if [ \"${KODI_ALSA_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" alsa-lib\"\n    KODI_ALSA=\"-DENABLE_ALSA=ON\"\n  else\n    KODI_ALSA=\"-DENABLE_ALSA=OFF\"\n fi\n\n  if [ \"${KODI_PULSEAUDIO_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" pulseaudio\"\n    KODI_PULSEAUDIO=\"-DENABLE_PULSEAUDIO=ON\"\n  else\n    KODI_PULSEAUDIO=\"-DENABLE_PULSEAUDIO=OFF\"\n  fi\n\n  if [ \"${ESPEAK_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" espeak-ng\"\n  fi\n\n  if [ \"${KODI_PIPEWIRE_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" pipewire\"\n    KODI_PIPEWIRE=\"-DENABLE_PIPEWIRE=ON\"\n\n    if [ \"${KODI_PULSEAUDIO_SUPPORT}\" = \"yes\" -o \"${KODI_ALSA_SUPPORT}\" = \"yes\" ]; then\n      die \"KODI_PULSEAUDIO_SUPPORT and KODI_ALSA_SUPPORT cannot be used with KODI_PIPEWIRE_SUPPORT\"\n    fi\n  else\n    KODI_PIPEWIRE=\"-DENABLE_PIPEWIRE=OFF\"\n  fi\n\n  if [ \"${CEC_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libcec\"\n    KODI_CEC=\"-DENABLE_CEC=ON\"\n  else\n    KODI_CEC=\"-DENABLE_CEC=OFF\"\n  fi\n\n  if [ \"${CEC_FRAMEWORK_SUPPORT}\" = \"yes\" ]; then\n    PKG_PATCH_DIRS+=\" cec-framework\"\n  fi\n\n  if [ \"${KODI_OPTICAL_SUPPORT}\" = yes ]; then\n    KODI_OPTICAL=\"-DENABLE_OPTICAL=ON\"\n  else\n    KODI_OPTICAL=\"-DENABLE_OPTICAL=OFF\"\n  fi\n\n  if [ \"${KODI_DVDCSS_SUPPORT}\" = yes ]; then\n    KODI_DVDCSS=\"-DENABLE_DVDCSS=ON \\\n                 -DLIBDVDCSS_URL=${SOURCES}/libdvdcss/libdvdcss-$(get_pkg_version libdvdcss).tar.gz\"\n  else\n    KODI_DVDCSS=\"-DENABLE_DVDCSS=OFF\"\n  fi\n\n  if [ \"${KODI_BLURAY_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libbluray\"\n    KODI_BLURAY=\"-DENABLE_BLURAY=ON\"\n  else\n    KODI_BLURAY=\"-DENABLE_BLURAY=OFF\"\n  fi\n\n  if [ \"${AVAHI_DAEMON}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" avahi nss-mdns\"\n    KODI_AVAHI=\"-DENABLE_AVAHI=ON\"\n  else\n    KODI_AVAHI=\"-DENABLE_AVAHI=OFF\"\n  fi\n\n  case \"${KODI_MYSQL_SUPPORT}\" in\n    mysql)   PKG_DEPENDS_TARGET=\"${PKG_DEPENDS_TARGET} mysql\"\n             KODI_MYSQL=\"-DENABLE_MYSQLCLIENT=ON -DENABLE_MARIADBCLIENT=OFF\"\n             ;;\n    mariadb) PKG_DEPENDS_TARGET=\"${PKG_DEPENDS_TARGET} mariadb-connector-c\"\n             KODI_MYSQL=\"-DENABLE_MARIADBCLIENT=ON -DENABLE_MYSQLCLIENT=OFF\"\n             ;;\n    *)       KODI_MYSQL=\"-DENABLE_MYSQLCLIENT=OFF -DENABLE_MARIADBCLIENT=OFF\"\n  esac\n\n  if [ \"${KODI_AIRPLAY_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libplist\"\n    KODI_AIRPLAY=\"-DENABLE_PLIST=ON\"\n  else\n    KODI_AIRPLAY=\"-DENABLE_PLIST=OFF\"\n  fi\n\n  if [ \"${KODI_AIRTUNES_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libshairplay\"\n    KODI_AIRTUNES=\"-DENABLE_AIRTUNES=ON\"\n  else\n    KODI_AIRTUNES=\"-DENABLE_AIRTUNES=OFF\"\n  fi\n\n  if [ \"${KODI_NFS_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libnfs\"\n    KODI_NFS=\"-DENABLE_NFS=ON\"\n  else\n    KODI_NFS=\"-DENABLE_NFS=OFF\"\n  fi\n\n  if [ \"${KODI_SAMBA_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" samba\"\n    KODI_SAMBA=\"-DENABLE_SMBCLIENT=ON\"\n  else\n    KODI_SAMBA=\"-DENABLE_SMBCLIENT=OFF\"\n  fi\n\n  if [ \"${KODI_WEBSERVER_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libmicrohttpd\"\n  fi\n\n  if [ \"${KODI_UPNP_SUPPORT}\" = yes ]; then\n    KODI_UPNP=\"-DENABLE_UPNP=ON\"\n  else\n    KODI_UPNP=\"-DENABLE_UPNP=OFF\"\n  fi\n\n  if [ \"${TARGET_ARCH}\" = \"aarch64\" -o \"${TARGET_ARCH}\" = \"arm\" ]; then\n    if target_has_feature neon; then\n      KODI_NEON=\"-DENABLE_NEON=ON\"\n    else\n      KODI_NEON=\"-DENABLE_NEON=OFF\"\n    fi\n  else\n    KODI_NEON=\"\"\n  fi\n\n  if [ \"${VDPAU_SUPPORT}\" = \"yes\" -a \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_DEPENDS_TARGET+=\" libvdpau\"\n    KODI_VDPAU=\"-DENABLE_VDPAU=ON\"\n  else\n    KODI_VDPAU=\"-DENABLE_VDPAU=OFF\"\n  fi\n\n  if [ \"${VAAPI_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libva\"\n    KODI_VAAPI=\"-DENABLE_VAAPI=ON\"\n  else\n    KODI_VAAPI=\"-DENABLE_VAAPI=OFF\"\n  fi\n\n  if [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n    KODI_ARCH=\"-DWITH_CPU=${TARGET_ARCH}\"\n  else\n    KODI_ARCH=\"-DWITH_ARCH=${TARGET_ARCH}\"\n  fi\n\n  if [ ! \"${KODIPLAYER_DRIVER}\" = \"default\" -a \"${DISPLAYSERVER}\" = \"no\" ]; then\n    PKG_DEPENDS_TARGET+=\" ${KODIPLAYER_DRIVER} libinput libxkbcommon\"\n    if [ \"${OPENGLES_SUPPORT}\" = yes -a \"${KODIPLAYER_DRIVER}\" = \"${OPENGLES}\" ]; then\n      KODI_PLATFORM=\"-DCORE_PLATFORM_NAME=gbm -DAPP_RENDER_SYSTEM=gles\"\n      CFLAGS+=\" -DEGL_NO_X11\"\n      CXXFLAGS+=\" -DEGL_NO_X11\"\n      if [ \"${PROJECT}\" = \"Generic\" ]; then\n        PKG_APPLIANCE_XML=\"${PKG_DIR}/config/appliance-gbm-generic.xml\"\n      else\n        PKG_APPLIANCE_XML=\"${PKG_DIR}/config/appliance-gbm.xml\"\n      fi\n    fi\n  fi\n\n  if [ \"${PROJECT}\" = \"Allwinner\" -o \"${PROJECT}\" = \"Rockchip\" -o \"${PROJECT}\" = \"RPi\" ]; then\n    PKG_PATCH_DIRS+=\" drmprime-filter\"\n  fi\n\n  KODI_LIBDVD=\"${KODI_DVDCSS} \\\n               -DLIBDVDNAV_URL=${SOURCES}/libdvdnav/libdvdnav-$(get_pkg_version libdvdnav).tar.gz \\\n               -DLIBDVDREAD_URL=${SOURCES}/libdvdread/libdvdread-$(get_pkg_version libdvdread).tar.gz\"\n\n  PKG_CMAKE_OPTS_TARGET=\"-DNATIVEPREFIX=${TOOLCHAIN} \\\n                         -DWITH_TEXTUREPACKER=${TOOLCHAIN}/bin/TexturePacker \\\n                         -DWITH_JSONSCHEMABUILDER=${TOOLCHAIN}/bin/JsonSchemaBuilder \\\n                         -DDEPENDS_PATH=${PKG_BUILD}/depends \\\n                         -DSWIG_EXECUTABLE=${TOOLCHAIN}/bin/swig \\\n                         -DPYTHON_EXECUTABLE=${TOOLCHAIN}/bin/${PKG_PYTHON_VERSION} \\\n                         -DPYTHON_INCLUDE_DIRS=${SYSROOT_PREFIX}/usr/include/${PKG_PYTHON_VERSION} \\\n                         -DGIT_VERSION=${PKG_VERSION} \\\n                         -DFFMPEG_PATH=${SYSROOT_PREFIX}/usr \\\n                         -DENABLE_INTERNAL_FFMPEG=OFF \\\n                         -DENABLE_INTERNAL_CROSSGUID=OFF \\\n                         -DENABLE_INTERNAL_UDFREAD=OFF \\\n                         -DENABLE_INTERNAL_SPDLOG=OFF \\\n                         -DENABLE_INTERNAL_RapidJSON=OFF \\\n                         -DENABLE_UDEV=ON \\\n                         -DENABLE_DBUS=ON \\\n                         -DENABLE_XSLT=ON \\\n                         -DENABLE_CCACHE=OFF \\\n                         -DENABLE_LIRCCLIENT=ON \\\n                         -DENABLE_EVENTCLIENTS=ON \\\n                         -DENABLE_DEBUGFISSION=OFF \\\n                         -DENABLE_APP_AUTONAME=OFF \\\n                         -DENABLE_TESTING=OFF \\\n                         -DENABLE_INTERNAL_FLATBUFFERS=OFF \\\n                         -DENABLE_LCMS2=OFF \\\n                         -DADDONS_CONFIGURE_AT_STARTUP=OFF \\\n                         ${PKG_KODI_USE_LTO} \\\n                         ${PKG_KODI_LINKER} \\\n                         ${KODI_ARCH} \\\n                         ${KODI_NEON} \\\n                         ${KODI_VDPAU} \\\n                         ${KODI_VAAPI} \\\n                         ${KODI_CEC} \\\n                         ${KODI_PLATFORM} \\\n                         ${KODI_SAMBA} \\\n                         ${KODI_NFS} \\\n                         ${KODI_LIBDVD} \\\n                         ${KODI_AVAHI} \\\n                         ${KODI_UPNP} \\\n                         ${KODI_MYSQL} \\\n                         ${KODI_AIRPLAY} \\\n                         ${KODI_AIRTUNES} \\\n                         ${KODI_OPTICAL} \\\n                         ${KODI_BLURAY} \\\n                         ${KODI_ALSA} \\\n                         ${KODI_PULSEAUDIO} \\\n                         ${KODI_PIPEWIRE}\"\n}\n\nconfigure_host() {\n  setup_toolchain target:cmake\n  cmake ${CMAKE_GENERATOR_NINJA} \\\n        -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CONF} \\\n        -DCMAKE_INSTALL_PREFIX=/usr \\\n        -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \\\n        -DHEADERS_ONLY=ON \\\n        ${KODI_ARCH} \\\n        ${KODI_NEON} \\\n        ${KODI_PLATFORM} ..\n}\n\nmake_host() {\n  :\n}\n\nmakeinstall_host() {\n  DESTDIR=${SYSROOT_PREFIX} cmake -DCMAKE_INSTALL_COMPONENT=\"kodi-addon-dev\" -P cmake_install.cmake\n\n  # more binaddons cross compile badness meh\n  sed -e \"s:INCLUDE_DIR /usr/include/kodi:INCLUDE_DIR ${SYSROOT_PREFIX}/usr/include/kodi:g\" \\\n      -e \"s:CMAKE_MODULE_PATH /usr/lib/kodi /usr/share/kodi/cmake:CMAKE_MODULE_PATH ${SYSROOT_PREFIX}/usr/share/kodi/cmake:g\" \\\n      -i ${SYSROOT_PREFIX}/usr/lib/kodi/cmake/KodiConfig.cmake\n}\n\npre_configure_target() {\n  export LIBS=\"${LIBS} -lncurses\"\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/.noinstall\n    mv ${INSTALL}/usr/share/kodi/addons/skin.estouchy \\\n       ${INSTALL}/usr/share/kodi/addons/skin.estuary \\\n       ${INSTALL}/usr/share/kodi/addons/service.xbmc.versioncheck \\\n       ${INSTALL}/.noinstall\n\n  rm -rf ${INSTALL}/usr/bin/kodi\n  rm -rf ${INSTALL}/usr/bin/kodi-standalone\n  rm -rf ${INSTALL}/usr/bin/xbmc\n  rm -rf ${INSTALL}/usr/bin/xbmc-standalone\n  rm -rf ${INSTALL}/usr/share/kodi/cmake\n  rm -rf ${INSTALL}/usr/share/applications\n  rm -rf ${INSTALL}/usr/share/icons\n  rm -rf ${INSTALL}/usr/share/pixmaps\n  rm -rf ${INSTALL}/usr/share/xsessions\n\n  mkdir -p ${INSTALL}/usr/lib/kodi\n    cp ${PKG_DIR}/scripts/kodi-config ${INSTALL}/usr/lib/kodi\n    cp ${PKG_DIR}/scripts/kodi-safe-mode ${INSTALL}/usr/lib/kodi\n    cp ${PKG_DIR}/scripts/kodi.sh ${INSTALL}/usr/lib/kodi\n\n  if [ \"${PROJECT}\" = \"Amlogic-ce\" ]; then\n    cp ${PKG_DIR}/scripts/aml-wait-for-dispcap.sh ${INSTALL}/usr/lib/kodi\n  fi\n\n    # Configure safe mode triggers - default 5 restarts within 900 seconds/15 minutes\n    sed -e \"s|@KODI_MAX_RESTARTS@|${KODI_MAX_RESTARTS:-5}|g\" \\\n        -e \"s|@KODI_MAX_SECONDS@|${KODI_MAX_SECONDS:-900}|g\" \\\n        -i ${INSTALL}/usr/lib/kodi/kodi.sh\n\n    if [ \"${KODI_PIPEWIRE_SUPPORT}\" = \"yes\" ]; then\n      KODI_AE_SINK=\"PIPEWIRE\"\n    elif [ \"${KODI_PULSEAUDIO_SUPPORT}\" = \"yes\" -a \"${KODI_ALSA_SUPPORT}\" = \"yes\" ]; then\n      KODI_AE_SINK=\"ALSA+PULSE\"\n    elif [ \"${KODI_PULSEAUDIO_SUPPORT}\" = \"yes\" -a \"${KODI_ALSA_SUPPORT}\" != \"yes\" ]; then\n      KODI_AE_SINK=\"PULSE\"\n    elif [ \"${KODI_PULSEAUDIO_SUPPORT}\" != \"yes\" -a \"${KODI_ALSA_SUPPORT}\" = \"yes\" ]; then\n      KODI_AE_SINK=\"ALSA\"\n    fi\n\n    # adjust audio output device to what was built\n    sed \"s/@KODI_AE_SINK@/${KODI_AE_SINK}/\" ${PKG_DIR}/config/kodi.conf.in > ${INSTALL}/usr/lib/kodi/kodi.conf\n\n    # set default display environment\n    if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n      echo \"DISPLAY=:0.0\" >> ${INSTALL}/usr/lib/kodi/kodi.conf\n    elif [ \"${DISPLAYSERVER}\" = \"wl\" ]; then\n      echo \"WAYLAND_DISPLAY=wayland-1\" >> ${INSTALL}/usr/lib/kodi/kodi.conf\n    fi\n\n    # nvidia: Enable USLEEP to reduce CPU load while rendering\n    if listcontains \"${GRAPHIC_DRIVERS}\" \"nvidia\" || listcontains \"${GRAPHIC_DRIVERS}\" \"nvidia-legacy\"; then\n      echo \"__GL_YIELD=USLEEP\" >> ${INSTALL}/usr/lib/kodi/kodi.conf\n    fi\n\n  mkdir -p ${INSTALL}/usr/sbin\n    cp ${PKG_DIR}/scripts/service-addon-wrapper ${INSTALL}/usr/sbin\n\n  mkdir -p ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/kodi-remote ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/setwakeup.sh ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/pastekodi ${INSTALL}/usr/bin\n    ln -sf /usr/bin/pastekodi ${INSTALL}/usr/bin/pastecrash\n\n  mkdir -p ${INSTALL}/usr/share/kodi/addons\n    cp -R ${PKG_DIR}/config/repository.libreelec.tv ${INSTALL}/usr/share/kodi/addons\n    sed -e \"s|@ADDON_URL@|${ADDON_URL}|g\" -i ${INSTALL}/usr/share/kodi/addons/repository.libreelec.tv/addon.xml\n    sed -e \"s|@ADDON_VERSION@|${ADDON_VERSION}|g\" -i ${INSTALL}/usr/share/kodi/addons/repository.libreelec.tv/addon.xml\n\n  mkdir -p ${INSTALL}/usr/share/kodi/config\n\n  ln -sf /run/libreelec/cacert.pem ${INSTALL}/usr/share/kodi/system/certs/cacert.pem\n\n  mkdir -p ${INSTALL}/usr/share/kodi/system/settings\n\n  ${PKG_DIR}/scripts/xml_merge.py ${PKG_DIR}/config/guisettings.xml \\\n                                ${PROJECT_DIR}/${PROJECT}/kodi/guisettings.xml \\\n                                ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/kodi/guisettings.xml \\\n                                > ${INSTALL}/usr/share/kodi/config/guisettings.xml\n\n  ${PKG_DIR}/scripts/xml_merge.py ${PKG_DIR}/config/sources.xml \\\n                                ${PROJECT_DIR}/${PROJECT}/kodi/sources.xml \\\n                                ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/kodi/sources.xml \\\n                                > ${INSTALL}/usr/share/kodi/config/sources.xml\n\n  ${PKG_DIR}/scripts/xml_merge.py ${PKG_DIR}/config/advancedsettings.xml \\\n                                ${PROJECT_DIR}/${PROJECT}/kodi/advancedsettings.xml \\\n                                ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/kodi/advancedsettings.xml \\\n                                > ${INSTALL}/usr/share/kodi/system/advancedsettings.xml\n\n  ${PKG_DIR}/scripts/xml_merge.py ${PKG_DIR}/config/appliance.xml \\\n                                ${PKG_APPLIANCE_XML} \\\n                                ${PROJECT_DIR}/${PROJECT}/kodi/appliance.xml \\\n                                ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/kodi/appliance.xml \\\n                                > ${INSTALL}/usr/share/kodi/system/settings/appliance.xml\n\n  mkdir -p ${INSTALL}/usr/cache/libreelec\n    cp ${PKG_DIR}/config/network_wait ${INSTALL}/usr/cache/libreelec\n\n  # GBM: install udev rule to ignore the power button in libinput/kodi so logind can handle it\n  if [ \"${DISPLAYSERVER}\" = \"no\" ]; then\n    mkdir -p ${INSTALL}/usr/lib/udev/rules.d/\n    cp ${PKG_DIR}/config/70-libinput-ignore-power-button.rules ${INSTALL}/usr/lib/udev/rules.d/\n  fi\n\n  # update addon manifest\n  ADDON_MANIFEST=${INSTALL}/usr/share/kodi/system/addon-manifest.xml\n  xmlstarlet ed -L -d \"/addons/addon[text()='service.xbmc.versioncheck']\" ${ADDON_MANIFEST}\n  xmlstarlet ed -L -d \"/addons/addon[text()='skin.estouchy']\" ${ADDON_MANIFEST}\n  xmlstarlet ed -L --subnode \"/addons\" -t elem -n \"addon\" -v \"repository.libreelec.tv\" ${ADDON_MANIFEST}\n  if [ -n \"${DISTRO_PKG_SETTINGS}\" ]; then\n    xmlstarlet ed -L --subnode \"/addons\" -t elem -n \"addon\" -v \"${DISTRO_PKG_SETTINGS_ID}\" ${ADDON_MANIFEST}\n  fi\n\n  if [ \"${DRIVER_ADDONS_SUPPORT}\" = \"yes\" ]; then\n    xmlstarlet ed -L --subnode \"/addons\" -t elem -n \"addon\" -v \"script.program.driverselect\" ${ADDON_MANIFEST}\n  fi\n\n  # more binaddons cross compile badness meh\n  sed -e \"s:INCLUDE_DIR /usr/include/kodi:INCLUDE_DIR ${SYSROOT_PREFIX}/usr/include/kodi:g\" \\\n      -e \"s:CMAKE_MODULE_PATH /usr/lib/kodi /usr/share/kodi/cmake:CMAKE_MODULE_PATH ${SYSROOT_PREFIX}/usr/share/kodi/cmake:g\" \\\n      -i ${SYSROOT_PREFIX}/usr/lib/kodi/cmake/KodiConfig.cmake\n\n  if [ \"${KODI_EXTRA_FONTS}\" = yes ]; then\n    mkdir -p ${INSTALL}/usr/share/kodi/media/Fonts\n      cp ${PKG_DIR}/fonts/*.ttf ${INSTALL}/usr/share/kodi/media/Fonts\n  fi\n\n  # Compile kodi Python site-packages to .pyc bytecode, and remove .py source code\n  python_compile ${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}/site-packages/kodi\n\n  debug_strip ${INSTALL}/usr/lib/kodi/kodi.bin\n}\n\npost_install() {\n  enable_service kodi.target\n  enable_service kodi-autostart.service\n  enable_service kodi-cleanlogs.service\n  enable_service kodi-halt.service\n  enable_service kodi-poweroff.service\n  enable_service kodi-reboot.service\n  enable_service kodi-waitonnetwork.service\n  enable_service kodi.service\n  enable_service kodi-lirc-suspend.service\n}\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/README.patches",
    "content": "100.* - LibreELEC specific patches that wont go upstream\n995.* - LibreELEC specific patches that should be send upstream\n999.* - patches backported from upstream\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/cec-framework/kodi-100.17-tinker-s-cec-disable-polling.patch",
    "content": "--- a/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp\n+++ b/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp\n@@ -45,6 +45,10 @@ bool CPeripheralBusCEC::PerformDeviceSca\n       case ADAPTERTYPE_P8_DAUGHTERBOARD:\n         result.m_mappedBusType = PERIPHERAL_BUS_USB;\n         break;\n+      case ADAPTERTYPE_LINUX:\n+        /** the Linux adapter cannot be removed, no need to rescan */\n+        m_bNeedsPolling = false;\n+        break;\n       default:\n         break;\n     }\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/drmprime-filter/0001-WIP-DVDVideoCodecDRMPRIME-add-support-for-filters.patch",
    "content": "From 24d09f0f92e3afc975f211591c147032f663ed01 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sun, 20 Oct 2019 17:10:07 +0000\nSubject: [PATCH 1/7] WIP: DVDVideoCodecDRMPRIME: add support for filters\n\n---\n .../DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 62 +++++++++++++++++--\n .../DVDCodecs/Video/DVDVideoCodecDRMPRIME.h   | 10 +++\n 2 files changed, 66 insertions(+), 6 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\nindex 80ca60290c..40cde1ba6e 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n@@ -27,6 +27,8 @@\n extern \"C\"\n {\n #include <libavcodec/avcodec.h>\n+#include <libavfilter/buffersink.h>\n+#include <libavfilter/buffersrc.h>\n #include <libavutil/error.h>\n #include <libavutil/imgutils.h>\n #include <libavutil/opt.h>\n@@ -559,12 +561,30 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)\n   pVideoPicture->dts = DVD_NOPTS_VALUE;\n }\n \n-CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideoPicture)\n+CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()\n {\n-  if (m_codecControlFlags & DVD_CODEC_CTRL_DRAIN)\n-    Drain();\n+  if (!m_pFilterIn)\n+    return VC_PICTURE;\n+\n+  int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame);\n+  if (ret < 0)\n+  {\n+    char err[AV_ERROR_MAX_STRING_SIZE] = {};\n+    av_strerror(ret, err, AV_ERROR_MAX_STRING_SIZE);\n+    CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::{} - buffersrc add frame failed: {} ({})\",\n+              __FUNCTION__, err, ret);\n+    return VC_ERROR;\n+  }\n \n-  int ret = avcodec_receive_frame(m_pCodecContext, m_pFrame);\n+  return ProcessFilterOut();\n+}\n+\n+CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterOut()\n+{\n+  if (!m_pFilterOut)\n+    return VC_EOF;\n+\n+  int ret = av_buffersink_get_frame(m_pFilterOut, m_pFrame);\n   if (ret == AVERROR(EAGAIN))\n     return VC_BUFFER;\n   else if (ret == AVERROR_EOF)\n@@ -581,11 +601,41 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo\n   {\n     char err[AV_ERROR_MAX_STRING_SIZE] = {};\n     av_strerror(ret, err, AV_ERROR_MAX_STRING_SIZE);\n-    CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::{} - receive frame failed: {} ({})\", __FUNCTION__,\n-              err, ret);\n+    CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::{} - buffersink get frame failed: {} ({})\",\n+              __FUNCTION__, err, ret);\n     return VC_ERROR;\n   }\n \n+  return VC_PICTURE;\n+}\n+\n+CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideoPicture)\n+{\n+  if (m_codecControlFlags & DVD_CODEC_CTRL_DRAIN)\n+    Drain();\n+\n+  auto result = ProcessFilterOut();\n+  if (result != VC_PICTURE)\n+  {\n+    int ret = avcodec_receive_frame(m_pCodecContext, m_pFrame);\n+    if (ret == AVERROR(EAGAIN))\n+      return VC_BUFFER;\n+    else if (ret == AVERROR_EOF)\n+      return VC_EOF;\n+    else if (ret)\n+    {\n+      char err[AV_ERROR_MAX_STRING_SIZE] = {};\n+      av_strerror(ret, err, AV_ERROR_MAX_STRING_SIZE);\n+      CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::{} - receive frame failed: {} ({})\",\n+                __FUNCTION__, err, ret);\n+      return VC_ERROR;\n+    }\n+\n+    result = ProcessFilterIn();\n+    if (result != VC_PICTURE)\n+      return result;\n+  }\n+\n   SetPictureParams(pVideoPicture);\n \n   if (pVideoPicture->videoBuffer)\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h\nindex db49d165e7..b5cacf1a3c 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h\n@@ -14,6 +14,11 @@\n \n #include <memory>\n \n+extern \"C\"\n+{\n+#include <libavfilter/avfilter.h>\n+}\n+\n class CDVDVideoCodecDRMPRIME : public CDVDVideoCodec\n {\n public:\n@@ -35,6 +40,8 @@ protected:\n   void Drain();\n   void SetPictureParams(VideoPicture* pVideoPicture);\n   void UpdateProcessInfo(struct AVCodecContext* avctx, const enum AVPixelFormat fmt);\n+  CDVDVideoCodec::VCReturn ProcessFilterIn();\n+  CDVDVideoCodec::VCReturn ProcessFilterOut();\n   static enum AVPixelFormat GetFormat(struct AVCodecContext* avctx, const enum AVPixelFormat* fmt);\n   static int GetBuffer(struct AVCodecContext* avctx, AVFrame* frame, int flags);\n \n@@ -44,5 +51,8 @@ protected:\n   double m_DAR = 1.0;\n   AVCodecContext* m_pCodecContext = nullptr;\n   AVFrame* m_pFrame = nullptr;\n+  AVFilterGraph* m_pFilterGraph = nullptr;\n+  AVFilterContext* m_pFilterIn = nullptr;\n+  AVFilterContext* m_pFilterOut = nullptr;\n   std::shared_ptr<IVideoBufferPool> m_videoBufferPool;\n };\n-- \n2.39.2\n\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/drmprime-filter/0002-WIP-DRMPRIME-deinterlace-filter.patch",
    "content": "From da88bb2f1dfbb6745406fab1bbece5b71df39b91 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Thu, 26 Dec 2019 11:01:51 +0100\nSubject: [PATCH 2/7] WIP: DRMPRIME deinterlace filter\n\n---\n .../DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 379 +++++++++++++++---\n .../DVDCodecs/Video/DVDVideoCodecDRMPRIME.h   |   9 +-\n 2 files changed, 328 insertions(+), 60 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\nindex 40cde1ba6e..1843e72e55 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n@@ -19,6 +19,7 @@\n #include \"threads/SingleLock.h\"\n #include \"utils/CPUInfo.h\"\n #include \"utils/log.h\"\n+#include \"utils/StringUtils.h\"\n \n #if defined(HAVE_GBM)\n #include \"windowing/gbm/WinSystemGbm.h\"\n@@ -79,12 +80,15 @@ CDVDVideoCodecDRMPRIME::CDVDVideoCodecDRMPRIME(CProcessInfo& processInfo)\n   : CDVDVideoCodec(processInfo)\n {\n   m_pFrame = av_frame_alloc();\n+  m_pFilterFrame = av_frame_alloc();\n   m_videoBufferPool = std::make_shared<CVideoBufferPoolDRMPRIMEFFmpeg>();\n }\n \n CDVDVideoCodecDRMPRIME::~CDVDVideoCodecDRMPRIME()\n {\n   av_frame_free(&m_pFrame);\n+  av_frame_free(&m_pFilterFrame);\n+  FilterClose();\n   avcodec_free_context(&m_pCodecContext);\n }\n \n@@ -341,8 +345,19 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio\n   }\n \n   UpdateProcessInfo(m_pCodecContext, m_pCodecContext->pix_fmt);\n-  m_processInfo.SetVideoDeintMethod(\"none\");\n+  m_processInfo.SetVideoInterlaced(false);\n   m_processInfo.SetVideoDAR(hints.aspect);\n+  m_processInfo.SetVideoDeintMethod(\"none\");\n+\n+  FilterTest();\n+\n+  if (!m_deintFilterName.empty())\n+  {\n+    std::list<EINTERLACEMETHOD> methods;\n+    methods.push_back(EINTERLACEMETHOD::VS_INTERLACEMETHOD_DEINTERLACE);\n+    m_processInfo.UpdateDeinterlacingMethods(methods);\n+    m_processInfo.SetDeinterlacingMethodDefault(EINTERLACEMETHOD::VS_INTERLACEMETHOD_DEINTERLACE);\n+  }\n \n   return true;\n }\n@@ -418,6 +433,8 @@ void CDVDVideoCodecDRMPRIME::Reset()\n     return;\n \n   Drain();\n+  m_filters.clear();\n+  FilterClose();\n \n   do\n   {\n@@ -465,7 +482,7 @@ void CDVDVideoCodecDRMPRIME::Drain()\n   av_packet_free(&avpkt);\n }\n \n-void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)\n+bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)\n {\n   pVideoPicture->iWidth = m_pFrame->width;\n   pVideoPicture->iHeight = m_pFrame->height;\n@@ -559,13 +576,238 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)\n                            ? DVD_NOPTS_VALUE\n                            : static_cast<double>(pts) * DVD_TIME_BASE / AV_TIME_BASE;\n   pVideoPicture->dts = DVD_NOPTS_VALUE;\n+\n+  if (pVideoPicture->videoBuffer)\n+  {\n+    pVideoPicture->videoBuffer->Release();\n+    pVideoPicture->videoBuffer = nullptr;\n+  }\n+\n+  if (IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format)))\n+  {\n+    CVideoBufferDRMPRIMEFFmpeg* buffer =\n+        dynamic_cast<CVideoBufferDRMPRIMEFFmpeg*>(m_videoBufferPool->Get());\n+    buffer->SetPictureParams(*pVideoPicture);\n+    buffer->SetRef(m_pFrame);\n+    pVideoPicture->videoBuffer = buffer;\n+  }\n+  else if (m_pFrame->opaque)\n+  {\n+    CVideoBufferDMA* buffer = static_cast<CVideoBufferDMA*>(m_pFrame->opaque);\n+    buffer->SetPictureParams(*pVideoPicture);\n+    buffer->Acquire();\n+    buffer->SyncEnd();\n+    buffer->SetDimensions(m_pFrame->width, m_pFrame->height);\n+\n+    pVideoPicture->videoBuffer = buffer;\n+    av_frame_unref(m_pFrame);\n+  }\n+\n+  if (!pVideoPicture->videoBuffer)\n+  {\n+    CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::{} - videoBuffer:nullptr format:{}\", __FUNCTION__,\n+              av_get_pix_fmt_name(static_cast<AVPixelFormat>(m_pFrame->format)));\n+    av_frame_unref(m_pFrame);\n+    return false;\n+  }\n+\n+  return true;\n }\n \n-CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()\n+void CDVDVideoCodecDRMPRIME::FilterTest()\n+{\n+  const AVFilter* filter;\n+  void* opaque{};\n+\n+  m_deintFilterName.clear();\n+\n+  while ((filter = av_filter_iterate(&opaque)) != nullptr)\n+  {\n+    std::string name(filter->name);\n+\n+    if (name.find(\"deinterlace\") != std::string::npos)\n+    {\n+      if (FilterOpen(name, true))\n+      {\n+        m_deintFilterName = name;\n+\n+        CLog::Log(LOGDEBUG, \"CDVDVideoCodecDRMPRIME::{} - found deinterlacing filter {}\",\n+                  __FUNCTION__, name);\n+\n+        return;\n+      }\n+    }\n+  }\n+\n+  CLog::Log(LOGDEBUG, \"CDVDVideoCodecDRMPRIME::{} - no deinterlacing filter found\",\n+            __FUNCTION__);\n+}\n+\n+bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n+{\n+  int result;\n+\n+  if (m_pFilterGraph)\n+    FilterClose();\n+\n+  if (filters.empty())\n+    return true;\n+\n+  if (!(m_pFilterGraph = avfilter_graph_alloc()))\n+  {\n+    CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - unable to alloc filter graph\");\n+    return false;\n+  }\n+\n+  const AVFilter* srcFilter = avfilter_get_by_name(\"buffer\");\n+  const AVFilter* outFilter = avfilter_get_by_name(\"buffersink\");\n+  enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_DRM_PRIME, AV_PIX_FMT_NONE };\n+\n+  std::string args = StringUtils::Format(\"video_size={}x{}:pix_fmt={}:time_base={}/{}:\"\n+                                         \"pixel_aspect={}/{}\",\n+                                         m_pCodecContext->width,\n+                                         m_pCodecContext->height,\n+                                         m_pCodecContext->pix_fmt,\n+                                         m_pCodecContext->time_base.num ?\n+                                           m_pCodecContext->time_base.num : 1,\n+                                         m_pCodecContext->time_base.num ?\n+                                           m_pCodecContext->time_base.den : 1,\n+                                         m_pCodecContext->sample_aspect_ratio.num != 0 ?\n+                                           m_pCodecContext->sample_aspect_ratio.num : 1,\n+                                         m_pCodecContext->sample_aspect_ratio.num != 0 ?\n+                                           m_pCodecContext->sample_aspect_ratio.den : 1);\n+\n+  result = avfilter_graph_create_filter(&m_pFilterIn, srcFilter, \"src\",\n+                                        args.c_str(), NULL, m_pFilterGraph);\n+  if (result < 0)\n+  {\n+    char err[AV_ERROR_MAX_STRING_SIZE] = {};\n+    av_strerror(result, err, AV_ERROR_MAX_STRING_SIZE);\n+    CLog::Log(LOGERROR,\n+              \"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: src: {} ({})\",\n+              err, result);\n+    return false;\n+  }\n+\n+  AVBufferSrcParameters *par = av_buffersrc_parameters_alloc();\n+  if (!par)\n+  {\n+    CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - unable to alloc buffersrc\");\n+    return false;\n+  }\n+\n+  memset(par, 0, sizeof(*par));\n+  par->format = AV_PIX_FMT_NONE;\n+  par->hw_frames_ctx = m_pCodecContext->hw_device_ctx;\n+\n+  result = av_buffersrc_parameters_set(m_pFilterIn, par);\n+  if (result < 0)\n+  {\n+    char err[AV_ERROR_MAX_STRING_SIZE] = {};\n+    av_strerror(result, err, AV_ERROR_MAX_STRING_SIZE);\n+    CLog::Log(LOGERROR,\n+              \"CDVDVideoCodecDRMPRIME::FilterOpen - av_buffersrc_parameters_set:  {} ({})\",\n+              err, result);\n+    return false;\n+  }\n+  av_freep(&par);\n+\n+  result = avfilter_graph_create_filter(&m_pFilterOut, outFilter, \"out\",\n+                                        NULL, NULL, m_pFilterGraph);\n+  if (result < 0)\n+  {\n+    char err[AV_ERROR_MAX_STRING_SIZE] = {};\n+    av_strerror(result, err, AV_ERROR_MAX_STRING_SIZE);\n+    CLog::Log(LOGERROR,\n+              \"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: out: {} ({})\",\n+              err, result);\n+    return false;\n+  }\n+\n+  result = av_opt_set_int_list(m_pFilterOut, \"pix_fmts\", &pix_fmts[0],\n+                               AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN);\n+  if (result < 0)\n+  {\n+    CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - failed settings pix formats\");\n+    return false;\n+  }\n+\n+  AVFilterInOut* outputs = avfilter_inout_alloc();\n+  AVFilterInOut* inputs  = avfilter_inout_alloc();\n+\n+  outputs->name = av_strdup(\"in\");\n+  outputs->filter_ctx = m_pFilterIn;\n+  outputs->pad_idx = 0;\n+  outputs->next = nullptr;\n+\n+  inputs->name = av_strdup(\"out\");\n+  inputs->filter_ctx = m_pFilterOut;\n+  inputs->pad_idx = 0;\n+  inputs->next = nullptr;\n+\n+  result = avfilter_graph_parse_ptr(m_pFilterGraph, filters.c_str(), &inputs, &outputs, NULL);\n+  avfilter_inout_free(&outputs);\n+  avfilter_inout_free(&inputs);\n+\n+  if (result < 0)\n+  {\n+    CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_parse\");\n+    return false;\n+  }\n+\n+  if ((result = avfilter_graph_config(m_pFilterGraph,  nullptr)) < 0)\n+  {\n+    char err[AV_ERROR_MAX_STRING_SIZE] = {};\n+    av_strerror(result, err, AV_ERROR_MAX_STRING_SIZE);\n+    CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_config:  {} ({})\",\n+              err, result);\n+    return false;\n+  }\n+\n+  if (test)\n+  {\n+    FilterClose();\n+    return true;\n+  }\n+\n+  if (filters.find(\"deinterlace\") != std::string::npos)\n+  {\n+    m_processInfo.SetVideoDeintMethod(filters);\n+  }\n+  else\n+  {\n+    m_processInfo.SetVideoDeintMethod(\"none\");\n+  }\n+\n+  if (CServiceBroker::GetLogging().CanLogComponent(LOGVIDEO))\n+  {\n+    char* graphDump = avfilter_graph_dump(m_pFilterGraph, nullptr);\n+    if (graphDump)\n+    {\n+      CLog::Log(LOGDEBUG, \"CDVDVideoCodecDRMPRIME::FilterOpen - Final filter graph:\\n{}\",\n+                graphDump);\n+      av_freep(&graphDump);\n+    }\n+  }\n+\n+  return true;\n+}\n+\n+void CDVDVideoCodecDRMPRIME::FilterClose()\n {\n-  if (!m_pFilterIn)\n-    return VC_PICTURE;\n+  if (m_pFilterGraph)\n+  {\n+    CLog::Log(LOGDEBUG, LOGVIDEO, \"CDVDVideoCodecDRMPRIME::FilterClose - Freeing filter graph\");\n+    avfilter_graph_free(&m_pFilterGraph);\n+\n+    // Disposed by above code\n+    m_pFilterIn = nullptr;\n+    m_pFilterOut = nullptr;\n+  }\n+}\n \n+CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()\n+{\n   int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame);\n   if (ret < 0)\n   {\n@@ -581,21 +823,14 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()\n \n CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterOut()\n {\n-  if (!m_pFilterOut)\n-    return VC_EOF;\n-\n-  int ret = av_buffersink_get_frame(m_pFilterOut, m_pFrame);\n+  int ret = av_buffersink_get_frame(m_pFilterOut, m_pFilterFrame);\n   if (ret == AVERROR(EAGAIN))\n     return VC_BUFFER;\n   else if (ret == AVERROR_EOF)\n   {\n-    if (m_codecControlFlags & DVD_CODEC_CTRL_DRAIN)\n-    {\n-      CLog::Log(LOGDEBUG, \"CDVDVideoCodecDRMPRIME::{} - flush buffers\", __FUNCTION__);\n-      avcodec_flush_buffers(m_pCodecContext);\n-      SetCodecControl(m_codecControlFlags & ~DVD_CODEC_CTRL_DRAIN);\n-    }\n-    return VC_EOF;\n+    ret = av_buffersink_get_frame(m_pFilterOut, m_pFilterFrame);\n+    if (ret < 0)\n+      return VC_BUFFER;\n   }\n   else if (ret)\n   {\n@@ -606,71 +841,97 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterOut()\n     return VC_ERROR;\n   }\n \n+  av_frame_unref(m_pFrame);\n+  av_frame_move_ref(m_pFrame, m_pFilterFrame);\n+\n   return VC_PICTURE;\n }\n \n+std::string CDVDVideoCodecDRMPRIME::GetFilterChain(bool interlaced)\n+{\n+  // ask codec to do deinterlacing if possible\n+  EINTERLACEMETHOD mInt = m_processInfo.GetVideoSettings().m_InterlaceMethod;\n+  std::string filterChain;\n+\n+  if (!m_processInfo.Supports(mInt))\n+    mInt = m_processInfo.GetFallbackDeintMethod();\n+\n+  if (mInt != VS_INTERLACEMETHOD_NONE && interlaced && !m_deintFilterName.empty())\n+    filterChain += m_deintFilterName;\n+\n+  return filterChain;\n+}\n+\n CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideoPicture)\n {\n   if (m_codecControlFlags & DVD_CODEC_CTRL_DRAIN)\n     Drain();\n \n-  auto result = ProcessFilterOut();\n-  if (result != VC_PICTURE)\n+  if (m_pFilterGraph)\n   {\n-    int ret = avcodec_receive_frame(m_pCodecContext, m_pFrame);\n-    if (ret == AVERROR(EAGAIN))\n-      return VC_BUFFER;\n-    else if (ret == AVERROR_EOF)\n-      return VC_EOF;\n-    else if (ret)\n+    auto ret = ProcessFilterOut();\n+    if (ret == VC_PICTURE)\n     {\n-      char err[AV_ERROR_MAX_STRING_SIZE] = {};\n-      av_strerror(ret, err, AV_ERROR_MAX_STRING_SIZE);\n-      CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::{} - receive frame failed: {} ({})\",\n-                __FUNCTION__, err, ret);\n-      return VC_ERROR;\n+      if (!SetPictureParams(pVideoPicture))\n+        return VC_ERROR;\n+      return VC_PICTURE;\n+    }\n+    else if (ret != VC_BUFFER)\n+    {\n+      return ret;\n     }\n-\n-    result = ProcessFilterIn();\n-    if (result != VC_PICTURE)\n-      return result;\n   }\n \n-  SetPictureParams(pVideoPicture);\n-\n-  if (pVideoPicture->videoBuffer)\n+  int ret = avcodec_receive_frame(m_pCodecContext, m_pFrame);\n+  if (ret == AVERROR(EAGAIN))\n+    return VC_BUFFER;\n+  else if (ret == AVERROR_EOF)\n+    return VC_EOF;\n+  else if (ret)\n   {\n-    pVideoPicture->videoBuffer->Release();\n-    pVideoPicture->videoBuffer = nullptr;\n+    char err[AV_ERROR_MAX_STRING_SIZE] = {};\n+    av_strerror(ret, err, AV_ERROR_MAX_STRING_SIZE);\n+    CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::{} - receive frame failed: {} ({})\",\n+              __FUNCTION__, err, ret);\n+    return VC_ERROR;\n   }\n \n-  if (IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format)))\n+  if (!m_processInfo.GetVideoInterlaced() && m_pFrame->interlaced_frame)\n+    m_processInfo.SetVideoInterlaced(true);\n+\n+  std::string filterChain = GetFilterChain(m_pFrame->interlaced_frame);\n+  if (!filterChain.empty())\n   {\n-    CVideoBufferDRMPRIMEFFmpeg* buffer =\n-        dynamic_cast<CVideoBufferDRMPRIMEFFmpeg*>(m_videoBufferPool->Get());\n-    buffer->SetPictureParams(*pVideoPicture);\n-    buffer->SetRef(m_pFrame);\n-    pVideoPicture->videoBuffer = buffer;\n+    bool reopenFilter = false;\n+    if (m_filters != filterChain)\n+      reopenFilter = true;\n+\n+    if (m_pFilterGraph &&\n+        (m_pFilterIn->outputs[0]->w != m_pCodecContext->width ||\n+         m_pFilterIn->outputs[0]->h != m_pCodecContext->height))\n+      reopenFilter = true;\n+\n+    if (reopenFilter)\n+    {\n+      m_filters = filterChain;\n+      if (!FilterOpen(filterChain, false))\n+        FilterClose();\n+    }\n+\n+    if (m_pFilterGraph)\n+    {\n+      if (ProcessFilterIn() != VC_PICTURE)\n+        return VC_NONE;\n+    }\n   }\n-  else if (m_pFrame->opaque)\n+  else\n   {\n-    CVideoBufferDMA* buffer = static_cast<CVideoBufferDMA*>(m_pFrame->opaque);\n-    buffer->SetPictureParams(*pVideoPicture);\n-    buffer->Acquire();\n-    buffer->SyncEnd();\n-    buffer->SetDimensions(m_pFrame->width, m_pFrame->height);\n-\n-    pVideoPicture->videoBuffer = buffer;\n-    av_frame_unref(m_pFrame);\n+    m_filters.clear();\n+    FilterClose();\n   }\n \n-  if (!pVideoPicture->videoBuffer)\n-  {\n-    CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::{} - videoBuffer:nullptr format:{}\", __FUNCTION__,\n-              av_get_pix_fmt_name(static_cast<AVPixelFormat>(m_pFrame->format)));\n-    av_frame_unref(m_pFrame);\n+  if (!SetPictureParams(pVideoPicture))\n     return VC_ERROR;\n-  }\n \n   return VC_PICTURE;\n }\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h\nindex b5cacf1a3c..fab3431d40 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h\n@@ -38,19 +38,26 @@ public:\n \n protected:\n   void Drain();\n-  void SetPictureParams(VideoPicture* pVideoPicture);\n+  bool SetPictureParams(VideoPicture* pVideoPicture);\n   void UpdateProcessInfo(struct AVCodecContext* avctx, const enum AVPixelFormat fmt);\n   CDVDVideoCodec::VCReturn ProcessFilterIn();\n   CDVDVideoCodec::VCReturn ProcessFilterOut();\n   static enum AVPixelFormat GetFormat(struct AVCodecContext* avctx, const enum AVPixelFormat* fmt);\n   static int GetBuffer(struct AVCodecContext* avctx, AVFrame* frame, int flags);\n+  bool FilterOpen(const std::string& filters, bool test);\n+  void FilterClose();\n+  void FilterTest();\n+  std::string GetFilterChain(bool interlaced);\n \n   std::string m_name;\n+  std::string m_deintFilterName;\n+  std::string m_filters;\n   int m_codecControlFlags = 0;\n   CDVDStreamInfo m_hints;\n   double m_DAR = 1.0;\n   AVCodecContext* m_pCodecContext = nullptr;\n   AVFrame* m_pFrame = nullptr;\n+  AVFrame* m_pFilterFrame = nullptr;\n   AVFilterGraph* m_pFilterGraph = nullptr;\n   AVFilterContext* m_pFilterIn = nullptr;\n   AVFilterContext* m_pFilterOut = nullptr;\n-- \n2.39.2\n\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/drmprime-filter/0003-DVDVideoCodecDRMPRIME-Avoid-exception-with-AV_PIX_FM.patch",
    "content": "From cb187a5456d0e992b4875ad965a6b628726c557f Mon Sep 17 00:00:00 2001\nFrom: popcornmix <popcornmix@gmail.com>\nDate: Fri, 27 Aug 2021 20:29:50 +0100\nSubject: [PATCH 3/7] DVDVideoCodecDRMPRIME: Avoid exception with\n AV_PIX_FMT_NONE\n\n---\n .../cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\nindex 1843e72e55..709311e75f 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n@@ -606,7 +606,7 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)\n   if (!pVideoPicture->videoBuffer)\n   {\n     CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::{} - videoBuffer:nullptr format:{}\", __FUNCTION__,\n-              av_get_pix_fmt_name(static_cast<AVPixelFormat>(m_pFrame->format)));\n+              m_pFrame->format == AV_PIX_FMT_NONE ? \"AV_PIX_FMT_NONE\" : av_get_pix_fmt_name(static_cast<AVPixelFormat>(m_pFrame->format)));\n     av_frame_unref(m_pFrame);\n     return false;\n   }\n-- \n2.39.2\n\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/drmprime-filter/0004-DVDVideoCodecDRMPRIME-Leave-deinterlace-filter-activ.patch",
    "content": "From 7b98c8968c7dd3b5a56f76695515cb59654f8691 Mon Sep 17 00:00:00 2001\nFrom: popcornmix <popcornmix@gmail.com>\nDate: Fri, 17 Sep 2021 15:23:16 +0100\nSubject: [PATCH 4/7] DVDVideoCodecDRMPRIME: Leave deinterlace filter active on\n a progressive frame\n\nInterlaced content often has strange mixtures of interlace and progressive frames (e.g. IIPPPPIIPPPP)\nand currently we can be creating and destroying the deinterlace filter graph almost every frame.\n\nIf it's been created, then leave it active until end of file. The frames marked as progressive should\nbe just copied by deinterlace filter\n---\n .../VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp     | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\nindex 709311e75f..6ba0804904 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n@@ -856,6 +856,10 @@ std::string CDVDVideoCodecDRMPRIME::GetFilterChain(bool interlaced)\n   if (!m_processInfo.Supports(mInt))\n     mInt = m_processInfo.GetFallbackDeintMethod();\n \n+  // avoid disabling deinterlace graph for occasional progressive frames - they will be copied by deinterlace\n+  if (!m_filters.empty())\n+    interlaced = true;\n+\n   if (mInt != VS_INTERLACEMETHOD_NONE && interlaced && !m_deintFilterName.empty())\n     filterChain += m_deintFilterName;\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/drmprime-filter/0005-SetVideoInterlaced-Set-and-unset-deinterlace-method-.patch",
    "content": "From c17af60a355973986d9ea5b6baefb96577299b9f Mon Sep 17 00:00:00 2001\nFrom: Dom Cobley <popcornmix@gmail.com>\nDate: Tue, 30 Nov 2021 16:05:06 +0000\nSubject: [PATCH 5/7] SetVideoInterlaced: Set and unset deinterlace method name\n reported\n\n---\n .../DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp          | 10 ++--------\n 1 file changed, 2 insertions(+), 8 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\nindex 6ba0804904..9139233bc4 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n@@ -770,14 +770,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n     return true;\n   }\n \n-  if (filters.find(\"deinterlace\") != std::string::npos)\n-  {\n-    m_processInfo.SetVideoDeintMethod(filters);\n-  }\n-  else\n-  {\n-    m_processInfo.SetVideoDeintMethod(\"none\");\n-  }\n+  m_processInfo.SetVideoDeintMethod(filters);\n \n   if (CServiceBroker::GetLogging().CanLogComponent(LOGVIDEO))\n   {\n@@ -795,6 +788,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n \n void CDVDVideoCodecDRMPRIME::FilterClose()\n {\n+  m_processInfo.SetVideoDeintMethod(\"none\");\n   if (m_pFilterGraph)\n   {\n     CLog::Log(LOGDEBUG, LOGVIDEO, \"CDVDVideoCodecDRMPRIME::FilterClose - Freeing filter graph\");\n-- \n2.39.2\n\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/drmprime-filter/0006-DVDVideoCodecDRMPRIME-Close-deinterlace-filter-on-er.patch",
    "content": "From 37ee879ee3bdcf8320fe135acc6cae0a8cbdb991 Mon Sep 17 00:00:00 2001\nFrom: Dom Cobley <popcornmix@gmail.com>\nDate: Wed, 24 Nov 2021 20:21:28 +0000\nSubject: [PATCH 6/7] DVDVideoCodecDRMPRIME: Close deinterlace filter on error\n\nOtherwise we crash later with an invalid m_pFilterGraph pointer\n---\n .../VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp  | 7 +++++++\n 1 file changed, 7 insertions(+)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\nindex 9139233bc4..0b44d90f13 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n@@ -686,6 +686,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n     CLog::Log(LOGERROR,\n               \"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: src: {} ({})\",\n               err, result);\n+    FilterClose();\n     return false;\n   }\n \n@@ -693,6 +694,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n   if (!par)\n   {\n     CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - unable to alloc buffersrc\");\n+    FilterClose();\n     return false;\n   }\n \n@@ -708,6 +710,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n     CLog::Log(LOGERROR,\n               \"CDVDVideoCodecDRMPRIME::FilterOpen - av_buffersrc_parameters_set:  {} ({})\",\n               err, result);\n+    FilterClose();\n     return false;\n   }\n   av_freep(&par);\n@@ -721,6 +724,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n     CLog::Log(LOGERROR,\n               \"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: out: {} ({})\",\n               err, result);\n+    FilterClose();\n     return false;\n   }\n \n@@ -729,6 +733,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n   if (result < 0)\n   {\n     CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - failed settings pix formats\");\n+    FilterClose();\n     return false;\n   }\n \n@@ -752,6 +757,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n   if (result < 0)\n   {\n     CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_parse\");\n+    FilterClose();\n     return false;\n   }\n \n@@ -761,6 +767,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n     av_strerror(result, err, AV_ERROR_MAX_STRING_SIZE);\n     CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_config:  {} ({})\",\n               err, result);\n+    FilterClose();\n     return false;\n   }\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/drmprime-filter/0007-DVDVideoCodecDRMPRIME-Fix-missing-flush-after-eof.patch",
    "content": "From 9996a0027ee8b0149b639fdc1bb7b524a8176bc0 Mon Sep 17 00:00:00 2001\nFrom: Dom Cobley <popcornmix@gmail.com>\nDate: Mon, 15 May 2023 12:50:16 +0100\nSubject: [PATCH 7/7] DVDVideoCodecDRMPRIME: Fix missing flush after eof\n\n---\n .../VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 8 ++++++++\n 1 file changed, 8 insertions(+)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\nindex 0b44d90f13..a472a06792 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n@@ -891,7 +891,15 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo\n   if (ret == AVERROR(EAGAIN))\n     return VC_BUFFER;\n   else if (ret == AVERROR_EOF)\n+  {\n+    if (m_codecControlFlags & DVD_CODEC_CTRL_DRAIN)\n+    {\n+      CLog::Log(LOGDEBUG, \"CDVDVideoCodecDRMPRIME::{} - flush buffers\", __FUNCTION__);\n+      avcodec_flush_buffers(m_pCodecContext);\n+      SetCodecControl(m_codecControlFlags & ~DVD_CODEC_CTRL_DRAIN);\n+    }\n     return VC_EOF;\n+  }\n   else if (ret)\n   {\n     char err[AV_ERROR_MAX_STRING_SIZE] = {};\n-- \n2.39.2\n\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.02-add-libreelec.tv-RSS-news.patch",
    "content": "--- a/userdata/RssFeeds.xml\n+++ b/userdata/RssFeeds.xml\n@@ -3,6 +3,7 @@\n   <!-- RSS feeds. To have multiple feeds, just add a feed to the set. You can also have multiple sets. \t!-->\n   <!-- To use different sets in your skin, each must be called from skin with a unique id.             \t!-->\n   <set id=\"1\">\n+    <feed updateinterval=\"30\">https://libreelec.tv/feed</feed>\n     <feed updateinterval=\"30\">http://feeds.kodi.tv/xbmc</feed>\n     <feed updateinterval=\"30\">http://feeds.kodi.tv/latest_xbmc_addons</feed>\n     <feed updateinterval=\"30\">http://feeds.kodi.tv/updated_xbmc_addons</feed>\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.03-disable-online-check.patch",
    "content": "Subject: disable online check\n\n---\n--- a/xbmc/GUIInfoManager.cpp\n+++ b/xbmc/GUIInfoManager.cpp\n@@ -1921,7 +1921,6 @@ const infomap system_labels[] = {\n     {\"currentcontrol\", SYSTEM_CURRENT_CONTROL},\n     {\"currentcontrolid\", SYSTEM_CURRENT_CONTROL_ID},\n     {\"dvdlabel\", SYSTEM_DVD_LABEL},\n-    {\"internetstate\", SYSTEM_INTERNET_STATE},\n     {\"osversioninfo\", SYSTEM_OS_VERSION_INFO},\n     {\"kernelversion\", SYSTEM_OS_VERSION_INFO}, // old, not correct name\n     {\"uptime\", SYSTEM_UPTIME},\n--- a/xbmc/utils/SystemInfo.cpp\n+++ b/xbmc/utils/SystemInfo.cpp\n@@ -275,7 +275,6 @@ bool CSysInfoJob::DoWork()\n {\n   m_info.systemUptime      = GetSystemUpTime(false);\n   m_info.systemTotalUptime = GetSystemUpTime(true);\n-  m_info.internetState     = GetInternetState();\n   m_info.videoEncoder      = GetVideoEncoder();\n   m_info.cpuFrequency =\n       StringUtils::Format(\"{:4.0f} MHz\", CServiceBroker::GetCPUInfo()->GetCPUFrequency());\n@@ -1021,9 +1020,7 @@ int CSysInfo::GetXbmcBitness(void)\n \n bool CSysInfo::HasInternet()\n {\n-  if (m_info.internetState != CSysData::UNKNOWN)\n-    return m_info.internetState == CSysData::CONNECTED;\n-  return (m_info.internetState = CSysInfoJob::GetInternetState()) == CSysData::CONNECTED;\n+  return m_info.internetState == CSysData::UNKNOWN;\n }\n \n std::string CSysInfo::GetHddSpaceInfo(int drive, bool shortText)\n--- a/xbmc/windows/GUIWindowSystemInfo.cpp\n+++ b/xbmc/windows/GUIWindowSystemInfo.cpp\n@@ -126,7 +126,6 @@ void CGUIWindowSystemInfo::FrameMove()\n     SetControlLabel(i++, \"{}: {}\", 13160, NETWORK_GATEWAY_ADDRESS);\n     SetControlLabel(i++, \"{}: {}\", 13161, NETWORK_DNS1_ADDRESS);\n     SetControlLabel(i++, \"{}: {}\", 20307, NETWORK_DNS2_ADDRESS);\n-    SetControlLabel(i++, \"{} {}\", 13295, SYSTEM_INTERNET_STATE);\n   }\n \n   else if (m_section == CONTROL_BT_VIDEO)\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.04-use-udevil-to-umount.patch",
    "content": "From 385ee507b4188f14c8e2c9bc903d547331a7b710 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Thu, 5 Apr 2018 11:42:13 +0100\nSubject: [PATCH] use udevil to mount\n\n---\n xbmc/platform/linux/storage/UDevProvider.cpp | 2 +-\n xbmc/platform/posix/PosixMountProvider.cpp   | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\n--- a/xbmc/platform/linux/storage/UDevProvider.cpp\n+++ b/xbmc/platform/linux/storage/UDevProvider.cpp\n@@ -202,7 +202,7 @@ bool CUDevProvider::Eject(const std::str\n {\n   // just go ahead and try to umount the disk\n   // if it does umount, life is good, if not, no loss.\n-  std::string cmd = \"umount \\\"\" + mountpath + \"\\\"\";\n+  std::string cmd = \"udevil umount \\\"\" + mountpath + \"\\\"\";\n   int status = system(cmd.c_str());\n \n   if (status == 0)\n--- a/xbmc/platform/posix/PosixMountProvider.cpp\n+++ b/xbmc/platform/posix/PosixMountProvider.cpp\n@@ -124,7 +124,7 @@ bool CPosixMountProvider::Eject(const st\n #if !defined(TARGET_DARWIN_EMBEDDED)\n   // just go ahead and try to umount the disk\n   // if it does umount, life is good, if not, no loss.\n-  std::string cmd = \"umount \\\"\" + mountpath + \"\\\"\";\n+  std::string cmd = \"udevil umount \\\"\" + mountpath + \"\\\"\";\n   int status = system(cmd.c_str());\n \n   if (status == 0)\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.05-make-binary-addons-executable.patch",
    "content": "From 7336d7da9e863be6fac9b5cab5ffe441e658f15f Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Wed, 5 Jul 2017 15:46:51 +0100\nSubject: [PATCH] make binary addons executable\n\nadd executable mode to all files in addon's bin folder\n\ncredits to vpeter4 for the patch\n---\n xbmc/addons/Addon.cpp | 26 ++++++++++++++++++++++++++\n 1 file changed, 26 insertions(+)\n\n--- a/xbmc/addons/Addon.cpp\n+++ b/xbmc/addons/Addon.cpp\n@@ -29,6 +29,10 @@\n #include <utility>\n #include <vector>\n \n+#include <iostream>\n+#include <dirent.h>\n+#include <sys/stat.h>\n+\n #ifdef HAS_PYTHON\n #include \"interfaces/python/XBPython.h\"\n #endif\n@@ -663,6 +667,28 @@ void OnPreInstall(const AddonPtr& addon)\n \n void OnPostInstall(const AddonPtr& addon, bool update, bool modal)\n {\n+  // OE: make binary addons executable, creddits to vpeter4\n+  std::string addonDirPath;\n+  std::string chmodFilePath;\n+  DIR *addonsDir;\n+  struct dirent *fileDirent;\n+  struct stat fileStat;\n+  int statRet;\n+\n+  addonDirPath = \"/storage/.kodi/addons/\" + addon->ID() + \"/bin/\";\n+  if ((addonsDir = opendir(addonDirPath.c_str())) != NULL)\n+  {\n+    while ((fileDirent = readdir(addonsDir)) != NULL)\n+    {\n+      chmodFilePath = addonDirPath + fileDirent->d_name;\n+      statRet = stat(chmodFilePath.c_str(), &fileStat);\n+      if (statRet == 0 && (fileStat.st_mode & S_IFMT) != S_IFDIR)\n+        chmod(chmodFilePath.c_str(), fileStat.st_mode | S_IXUSR | S_IXGRP | S_IXOTH);\n+    }\n+    closedir(addonsDir);\n+  }\n+  // OE\n+\n   addon->OnPostInstall(update, modal);\n }\n \n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.07-disable-minimize.patch",
    "content": "From c32d80cbfd5eb6ae9b5a36b3e9a8ec6e9d825837 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Sat, 18 Apr 2015 14:59:29 +0300\nSubject: [PATCH] disable minimize\n\n---\n xbmc/application/Application.cpp | 1 -\n 1 file changed, 1 deletion(-)\n\n--- a/xbmc/application/Application.cpp\n+++ b/xbmc/application/Application.cpp\n@@ -1609,7 +1609,6 @@ void CApplication::OnApplicationMessage(\n     break;\n \n   case TMSG_MINIMIZE:\n-    CServiceBroker::GetWinSystem()->Minimize();\n     break;\n \n   case TMSG_EXECUTE_OS:\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.08-setup-timezone.patch",
    "content": "From 7afdfe63354967ea5123cb2b1746c3ae552d0977 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Mon, 18 Aug 2014 17:46:54 +0300\nSubject: [PATCH] setup timezone\n\non TZ country setting change, store the value in format\nTIMEZONE=Xx/Yyy to /storage/.cache/timezone to be used with\ntz-data.service\n---\n xbmc/platform/posix/PosixTimezone.cpp | 12 ++++++++++++\n 1 file changed, 12 insertions(+)\n\n--- a/xbmc/platform/posix/PosixTimezone.cpp\n+++ b/xbmc/platform/posix/PosixTimezone.cpp\n@@ -25,6 +25,8 @@\n \n #include <algorithm>\n \n+#include <fstream>\n+\n CPosixTimezone::CPosixTimezone()\n {\n    char* line = NULL;\n@@ -142,6 +144,16 @@ void CPosixTimezone::OnSettingChanged(co\n   const std::string &settingId = setting->GetId();\n   if (settingId == CSettings::SETTING_LOCALE_TIMEZONE)\n   {\n+    std::ofstream out(\"/storage/.cache/timezone\");\n+    if (out)\n+    {\n+      const std::string tz = std::string(\"TIMEZONE=\") + (std::static_pointer_cast<const CSettingString>(setting)->GetValue().c_str());\n+      out << tz << std::endl;\n+      out.flush();\n+      out.close();\n+      system(\"systemctl restart tz-data.service\");\n+    }\n+\n     SetTimezone(std::static_pointer_cast<const CSettingString>(setting)->GetValue());\n \n     CDateTime::ResetTimezoneBias();\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.09-use-a-wrapper-to-setup-service-addons.patch",
    "content": "From 069f73ce808caaf57057304e261afc1b76b37ea3 Mon Sep 17 00:00:00 2001\nFrom: Matthias Reichl <hias@horus.com>\nDate: Thu, 20 Oct 2022 19:24:59 +0200\nSubject: [PATCH] Use a wrapper to setup service addons\n\n---\n xbmc/addons/Addon.cpp        | 35 +++++++++++++++++++++++++++++++++++\n xbmc/addons/Addon.h          |  9 +++++++++\n xbmc/addons/AddonManager.cpp |  3 +++\n 3 files changed, 47 insertions(+)\n\n--- a/xbmc/addons/Addon.cpp\n+++ b/xbmc/addons/Addon.cpp\n@@ -658,6 +658,37 @@ CAddonVersion CAddon::GetDependencyVersi\n   return m_addonInfo->DependencyVersion(dependencyID);\n }\n \n+void LEAddonHook(const AddonPtr& addon, const LE_ADDON_CONTEXT context) {\n+\n+  if (addon->Type() == AddonType::SERVICE) {\n+    std::string contextStr;\n+    char cmd[255];\n+\n+    switch (context) {\n+    case LE_ADDON_ENABLED:\n+      contextStr = \"enable\";\n+      break;\n+    case LE_ADDON_DISABLED:\n+      contextStr = \"disable\";\n+      break;\n+    case LE_ADDON_POST_INSTALL:\n+      contextStr = \"post-install\";\n+      break;\n+    case LE_ADDON_PRE_UNINSTALL:\n+      contextStr = \"pre-uninstall\";\n+      break;\n+    default:\n+      contextStr = StringUtils::Format(\"unknown(%d)\", context);\n+      break;\n+    }\n+\n+    snprintf(cmd, sizeof(cmd), \"/usr/sbin/service-addon-wrapper %s %s %s\",\n+      contextStr.c_str(), addon->ID().c_str(), addon->Path().c_str());\n+\n+    system(cmd);\n+  }\n+}\n+\n void OnPreInstall(const AddonPtr& addon)\n {\n   //Fallback to the pre-install callback in the addon.\n@@ -687,6 +718,8 @@ void OnPostInstall(const AddonPtr& addon\n     }\n     closedir(addonsDir);\n   }\n+\n+  LEAddonHook(addon, LE_ADDON_POST_INSTALL);\n   // OE\n \n   addon->OnPostInstall(update, modal);\n@@ -694,6 +727,8 @@ void OnPostInstall(const AddonPtr& addon\n \n void OnPreUnInstall(const AddonPtr& addon)\n {\n+  LEAddonHook(addon, LE_ADDON_PRE_UNINSTALL);\n+\n   addon->OnPreUnInstall();\n }\n \n--- a/xbmc/addons/Addon.h\n+++ b/xbmc/addons/Addon.h\n@@ -31,6 +31,15 @@ void OnPostInstall(const AddonPtr& addon\n void OnPreUnInstall(const AddonPtr& addon);\n void OnPostUnInstall(const AddonPtr& addon);\n \n+typedef enum {\n+  LE_ADDON_ENABLED,\n+  LE_ADDON_DISABLED,\n+  LE_ADDON_POST_INSTALL,\n+  LE_ADDON_PRE_UNINSTALL,\n+} LE_ADDON_CONTEXT;\n+\n+void LEAddonHook(const AddonPtr& addon, const LE_ADDON_CONTEXT context);\n+\n class CAddon : public IAddon\n {\n public:\n--- a/xbmc/addons/AddonManager.cpp\n+++ b/xbmc/addons/AddonManager.cpp\n@@ -12,6 +12,7 @@\n #include \"FileItem.h\"\n #include \"LangInfo.h\"\n #include \"ServiceBroker.h\"\n+#include \"addons/Addon.h\"\n #include \"addons/AddonBuilder.h\"\n #include \"addons/AddonDatabase.h\"\n #include \"addons/AddonEvents.h\"\n@@ -863,6 +864,7 @@ bool CAddonMgr::DisableAddon(const std::\n   AddonPtr addon;\n   if (GetAddon(id, addon, AddonType::UNKNOWN, OnlyEnabled::CHOICE_NO) && addon != nullptr)\n   {\n+    ADDON::LEAddonHook(addon, ADDON::LE_ADDON_DISABLED);\n     auto eventLog = CServiceBroker::GetEventLog();\n     if (eventLog)\n       eventLog->Add(EventPtr(new CAddonManagementEvent(addon, 24141)));\n@@ -914,6 +916,7 @@ bool CAddonMgr::EnableSingle(const std::\n   if (!m_database->EnableAddon(id))\n     return false;\n   m_disabled.erase(id);\n+  ADDON::LEAddonHook(addon, ADDON::LE_ADDON_ENABLED);\n \n   // If enabling a repo add-on without an origin, set its origin to its own id\n   if (addon->HasType(AddonType::REPOSITORY) && addon->Origin().empty())\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.10-handle-SIGTERM.patch",
    "content": "From de3a1d59836496b786ce31e9f2ce77c0c9db545b Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Sun, 3 Apr 2022 11:31:07 +0200\nSubject: [PATCH] handle SIGTERM\n\n0. CApplication::Stop cant be trusted. (deadlocks crashes and boo)\n\nso, when shutdown/reboot is requested:\n\n1. save an exit code (for CEC...)\n2. call CPowerManager::{Reboot,PowerDown}\n3. ... then systemd sends TERM and waits xx seconds before sending KILL\n4. CApplication::Stop has xx seconds to save guisettings.xml and boo\n5. CEC thread has xx seconds to switch off after it received OnQuit\n6. addons / pvrmanager / cec / everything else.. are free to deadlock / crash now, we dont care\n7. KILL\n---\n xbmc/application/Application.cpp              | 24 ++++++++++++++-----\n xbmc/application/Application.h                |  2 ++\n .../powermanagement/LogindUPowerSyscall.cpp   |  2 --\n 3 files changed, 20 insertions(+), 8 deletions(-)\n\n--- a/xbmc/application/Application.cpp\n+++ b/xbmc/application/Application.cpp\n@@ -1481,12 +1481,12 @@ void CApplication::OnApplicationMessage(\n   switch (msg)\n   {\n   case TMSG_POWERDOWN:\n-    if (Stop(EXITCODE_POWERDOWN))\n+    if (SetExitCode(EXITCODE_POWERDOWN))\n       CServiceBroker::GetPowerManager().Powerdown();\n     break;\n \n   case TMSG_QUIT:\n-    Stop(EXITCODE_QUIT);\n+    SetExitCode(EXITCODE_QUIT);\n     break;\n \n   case TMSG_SHUTDOWN:\n@@ -1507,12 +1507,13 @@ void CApplication::OnApplicationMessage(\n \n   case TMSG_RESTART:\n   case TMSG_RESET:\n-    if (Stop(EXITCODE_REBOOT))\n+    if (SetExitCode(EXITCODE_REBOOT))\n       CServiceBroker::GetPowerManager().Reboot();\n     break;\n \n   case TMSG_RESTARTAPP:\n #if defined(TARGET_WINDOWS) || defined(TARGET_LINUX)\n+    SetExitCode(EXITCODE_RESTARTAPP);\n     Stop(EXITCODE_RESTARTAPP);\n #endif\n     break;\n@@ -2094,7 +2095,7 @@ bool CApplication::Stop(int exitCode)\n     m_frameMoveGuard.unlock();\n \n     CVariant vExitCode(CVariant::VariantTypeObject);\n-    vExitCode[\"exitcode\"] = exitCode;\n+    vExitCode[\"exitcode\"] = m_ExitCode;\n     CServiceBroker::GetAnnouncementManager()->Announce(ANNOUNCEMENT::System, \"OnQuit\", vExitCode);\n \n     // Abort any active screensaver\n@@ -2126,7 +2127,6 @@ bool CApplication::Stop(int exitCode)\n     // Needs cleaning up\n     CServiceBroker::GetAppMessenger()->Stop();\n     m_AppFocused = false;\n-    m_ExitCode = exitCode;\n     CLog::Log(LOGINFO, \"Stopping all\");\n \n     // cancel any jobs from the jobmanager\n@@ -2669,6 +2669,18 @@ void CApplication::StopPlaying()\n   }\n }\n \n+bool CApplication::SetExitCode(int exitCode)\n+{\n+  if (!m_ExitCodeSet)\n+  {\n+    CLog::Log(LOGINFO, \"Saving exitCode {}\", exitCode);\n+    // save it for CEC\n+    m_ExitCode = exitCode;\n+    m_ExitCodeSet = true;\n+  }\n+  return true;\n+}\n+\n bool CApplication::OnMessage(CGUIMessage& message)\n {\n   switch (message.GetMessage())\n@@ -3189,7 +3201,7 @@ void CApplication::ProcessSlow()\n   if (CPlatformPosix::TestQuitFlag())\n   {\n     CLog::Log(LOGINFO, \"Quitting due to POSIX signal\");\n-    CServiceBroker::GetAppMessenger()->PostMsg(TMSG_QUIT);\n+    CServiceBroker::GetAppMessenger()->PostMsg(TMSG_RESTARTAPP);\n   }\n #endif\n \n--- a/xbmc/application/Application.h\n+++ b/xbmc/application/Application.h\n@@ -113,6 +113,7 @@ public:\n   bool CreateGUI();\n   bool InitWindow(RESOLUTION res = RES_INVALID);\n \n+  bool SetExitCode(int exitCode);\n   bool Stop(int exitCode);\n   const std::string& CurrentFile();\n   CFileItem& CurrentFileItem();\n@@ -251,6 +252,7 @@ private:\n   unsigned int m_ProcessedExternalCalls = 0;      /*!< counts calls which are processed during one \"door open\" cycle in FrameMove */\n   unsigned int m_ProcessedExternalDecay = 0;      /*!< counts to close door after a few frames of no python activity */\n   int m_ExitCode{EXITCODE_QUIT};\n+  bool m_ExitCodeSet = false;\n };\n \n XBMC_GLOBAL_REF(CApplication,g_application);\n--- a/xbmc/platform/linux/powermanagement/LogindUPowerSyscall.cpp\n+++ b/xbmc/platform/linux/powermanagement/LogindUPowerSyscall.cpp\n@@ -79,8 +79,6 @@ CLogindUPowerSyscall::~CLogindUPowerSysc\n \n bool CLogindUPowerSyscall::Powerdown()\n {\n-  // delay shutdown so that the app can close properly\n-  InhibitDelayLockShutdown();\n   return LogindSetPowerState(\"PowerOff\");\n }\n \n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.13-udevprovider-filter-out-OE-specific-mounts.patch",
    "content": "From ba4c814c7ff26ff821ea362632fd6bb47bf93066 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Thu, 5 Apr 2018 11:42:48 +0100\nSubject: [PATCH] udevprovider: filter out OE specific mounts\n\n---\n xbmc/platform/linux/storage/UDevProvider.cpp | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)\n\n--- a/xbmc/platform/linux/storage/UDevProvider.cpp\n+++ b/xbmc/platform/linux/storage/UDevProvider.cpp\n@@ -147,6 +147,20 @@ void CUDevProvider::GetDisks(VECSOURCES&\n       continue;\n     }\n \n+    // LE: filter out Libreelec specific mounts\n+    if (strstr(mountpoint, \"/flash\"))\n+    {\n+      udev_device_unref(device);\n+      continue;\n+    }\n+\n+    if (strstr(mountpoint, \"/storage\"))\n+    {\n+      udev_device_unref(device);\n+      continue;\n+    }\n+    // OE\n+\n     // look for devices on the usb bus, or mounted on */media/ (sdcards), or optical devices\n     const char *bus = udev_device_get_property_value(device, \"ID_BUS\");\n     const char *optical = udev_device_get_property_value(device, \"ID_CDROM\"); // matches also DVD, Blu-ray\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.15-rename-default-pulse-device.patch",
    "content": "From cd60daafb0c6b1e1de94dbc944bb247a8f810b50 Mon Sep 17 00:00:00 2001\nFrom: fritsch <peter.fruehberger@gmail.com>\nDate: Fri, 29 Jan 2016 16:32:06 +0100\nSubject: [PATCH] [PATCH] change pulseaudio default device name to Bluetooth\n Audio\n\n---\n xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\n--- a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp\n+++ b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp\n@@ -491,7 +491,7 @@ static void SinkInfoRequestCallback(pa_c\n     CAEDeviceInfo defaultDevice;\n     defaultDevice.m_deviceName = std::string(\"Default\");\n     defaultDevice.m_displayName = std::string(\"Default\");\n-    defaultDevice.m_displayNameExtra = std::string(\"Default Output Device (PULSEAUDIO)\");\n+    defaultDevice.m_displayNameExtra = std::string(\"Bluetooth Audio (PULSEAUDIO)\");\n     defaultDevice.m_dataFormats.insert(defaultDevice.m_dataFormats.end(),\n                                        defaultDataFormats.begin(), defaultDataFormats.end());\n     defaultDevice.m_channels = CAEChannelInfo(AE_CH_LAYOUT_2_0);\n@@ -499,6 +499,8 @@ static void SinkInfoRequestCallback(pa_c\n     defaultDevice.m_deviceType = AE_DEVTYPE_PCM;\n     defaultDevice.m_wantsIECPassthrough = true;\n     sinkStruct->list->push_back(defaultDevice);\n+    // LE only wants the default device - so we are done here\n+    return;\n   }\n   if (i && i->name)\n   {\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.16-remove-sysinfo-battery.patch",
    "content": "--- a/xbmc/windows/GUIWindowSystemInfo.cpp\n+++ b/xbmc/windows/GUIWindowSystemInfo.cpp\n@@ -100,7 +100,6 @@ void CGUIWindowSystemInfo::FrameMove()\n     SetControlLabel(i++, \"{} {}\", 13283, SYSTEM_OS_VERSION_INFO);\n     SetControlLabel(i++, \"{}: {}\", 12390, SYSTEM_UPTIME);\n     SetControlLabel(i++, \"{}: {}\", 12394, SYSTEM_TOTALUPTIME);\n-    SetControlLabel(i++, \"{}: {}\", 12395, SYSTEM_BATTERY_LEVEL);\n   }\n \n   else if (m_section == CONTROL_BT_STORAGE)\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.25-hack-fix-texture-packer-cmake-source-dir.patch",
    "content": "--- a/tools/depends/native/TexturePacker/CMakeLists.txt\n+++ b/tools/depends/native/TexturePacker/CMakeLists.txt\n@@ -1,3 +1,5 @@\n+set(CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR}/../../../..)\n+\n list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)\n \n if(APPLE)\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.26-disable-internal-texturepacker.patch",
    "content": "--- a/cmake/modules/buildtools/FindTexturePacker.cmake\n+++ b/cmake/modules/buildtools/FindTexturePacker.cmake\n@@ -52,15 +52,6 @@ if(NOT TARGET TexturePacker::TexturePack\n       endif()\n     endif()\n \n-    # Ship TexturePacker only on Linux and FreeBSD\n-    if(CMAKE_SYSTEM_NAME STREQUAL \"FreeBSD\" OR CMAKE_SYSTEM_NAME STREQUAL \"Linux\")\n-      # But skip shipping it if build architecture can be executed on host\n-      # and TEXTUREPACKER_EXECUTABLE is found\n-      if(NOT (HOST_CAN_EXECUTE_TARGET AND TEXTUREPACKER_EXECUTABLE))\n-        set(INTERNAL_TEXTUREPACKER_INSTALLABLE TRUE CACHE BOOL \"\" FORCE)\n-      endif()\n-    endif()\n-\n     # Use it during build if build architecture can be executed on host\n     # and TEXTUREPACKER_EXECUTABLE is not found\n     if(HOST_CAN_EXECUTE_TARGET AND NOT TEXTUREPACKER_EXECUTABLE)\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.30-addons-refresh-etc-environment.patch",
    "content": "From 76575164088a259d73c66dacb7df585b6a6e577a Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Tue, 17 Dec 2019 15:51:23 +0000\nSubject: [PATCH] refresh /etc/environment on install and uninstall\n\n---\n xbmc/addons/Addon.cpp | 6 ++++++\n 1 file changed, 6 insertions(+)\n\n--- a/xbmc/addons/Addon.cpp\n+++ b/xbmc/addons/Addon.cpp\n@@ -723,6 +723,9 @@ void OnPostInstall(const AddonPtr& addon\n   // OE\n \n   addon->OnPostInstall(update, modal);\n+ \n+  if (addon->Type() == AddonType::SERVICE || addon->Type() == AddonType::SCRIPT)\n+    system(\"/usr/bin/environment-setup\");\n }\n \n void OnPreUnInstall(const AddonPtr& addon)\n@@ -735,6 +738,9 @@ void OnPreUnInstall(const AddonPtr& addo\n void OnPostUnInstall(const AddonPtr& addon)\n {\n   addon->OnPostUnInstall();\n+\n+  if (addon->Type() == AddonType::SERVICE || addon->Type() == AddonType::SCRIPT)\n+    system(\"/usr/bin/environment-setup\");\n }\n \n } // namespace ADDON\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.32.add-le-repository-to-officials.patch",
    "content": "--- a/version.txt\n+++ b/version.txt\n@@ -10 +10 @@\n-ADDON_REPOS repository.xbmc.org|https://mirrors.kodi.tv\n+ADDON_REPOS repository.xbmc.org|https://mirrors.kodi.tv,repository.libreelec.tv|https://addons.libreelec.tv\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-100.40-estuary-settings-icon.patch",
    "content": "From 2adc7ac23db3b8c7dca857456477df886b7dbeaa Mon Sep 17 00:00:00 2001\nFrom: chewitt <christianshewitt@gmail.com>\nDate: Sat, 19 Sep 2020 16:25:19 +0000\nSubject: [PATCH] skin.estuary: make event log conditional and move LE settings\n\nMove the LE settings icon from the fourth row to the top replacing\nthe event log viewer when service.libreelec.settings exists, so we\nkeep the 3x3 grid layout.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n addons/skin.estuary/xml/Settings.xml | 13 +++++++------\n 1 file changed, 7 insertions(+), 6 deletions(-)\n\n--- a/addons/skin.estuary/xml/Settings.xml\n+++ b/addons/skin.estuary/xml/Settings.xml\n@@ -55,9 +55,16 @@\n \t\t\t\t\t\t<icon>icons/settings/sysinfo.png</icon>\n \t\t\t\t\t</item>\n \t\t\t\t\t<item>\n+\t\t\t\t\t\t<label>LibreELEC</label>\n+\t\t\t\t\t\t<onclick>RunAddon(service.libreelec.settings)</onclick>\n+\t\t\t\t\t\t<icon>icons/settings/libreelec.png</icon>\n+\t\t\t\t\t\t<visible>System.AddonIsEnabled(service.libreelec.settings)</visible>\n+\t\t\t\t\t</item>\n+\t\t\t\t\t<item>\n \t\t\t\t\t\t<label>$LOCALIZE[31067]</label>\n \t\t\t\t\t\t<onclick>ActivateWindow(eventlog)</onclick>\n \t\t\t\t\t\t<icon>icons/settings/eventlog.png</icon>\n+\t\t\t\t\t\t<visible>!System.HasAddon(service.libreelec.settings)</visible>\n \t\t\t\t\t</item>\n \t\t\t\t</content>\n \t\t\t</control>\n@@ -111,12 +118,6 @@\n \t\t\t\t\t\t<onclick>ActivateWindow(SystemSettings)</onclick>\n \t\t\t\t\t\t<icon>icons/settings/system.png</icon>\n \t\t\t\t\t</item>\n-\t\t\t\t\t<item>\n-\t\t\t\t\t\t<label>LibreELEC</label>\n-\t\t\t\t\t\t<onclick>RunAddon(service.libreelec.settings)</onclick>\n-\t\t\t\t\t\t<icon>icons/settings/libreelec.png</icon>\n-\t\t\t\t\t\t<visible>System.AddonIsEnabled(service.libreelec.settings)</visible>\n-\t\t\t\t\t</item>\n \t\t\t\t</content>\n \t\t\t</control>\n \t\t</control>\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-995.10-devinputmappings.patch",
    "content": "--- a/system/Lircmap.xml\n+++ b/system/Lircmap.xml\n@@ -548,50 +548,85 @@\n \t\t<up>KEY_UP</up>\n \t\t<down>KEY_DOWN</down>\n \t\t<select>KEY_OK</select>\n-\t\t<enter>KEY_ENTER</enter>\n+\t\t<select>KEY_ENTER</select>\n+\t\t<select>KEY_KPENTER</select>\n+\t\t<select>KEY_SELECT</select>\n \t\t<clear>KEY_DELETE</clear>\n+\t\t<clear>KEY_ESC</clear>\n \t\t<start>KEY_MEDIA</start>\n+\t\t<start>KEY_HOME</start>\n \t\t<back>KEY_EXIT</back>\n+\t\t<back>KEY_BACK</back>\n+\t\t<back>KEY_BACKSPACE</back>\n+\t\t<back>KEY_ESC</back>\n+\t\t<back>KEY_E</back>\n \t\t<record>KEY_RECORD</record>\n \t\t<play>KEY_PLAY</play>\n+\t\t<play>KEY_PLAYPAUSE</play>\n \t\t<pause>KEY_PAUSE</pause>\n \t\t<stop>KEY_STOP</stop>\n+\t\t<stop>KEY_STOPCD</stop>\n \t\t<forward>KEY_FASTFORWARD</forward>\n+\t\t<forward>KEY_FORWARD</forward>\n \t\t<reverse>KEY_REWIND</reverse>\n \t\t<volumeplus>KEY_VOLUMEUP</volumeplus>\n \t\t<volumeminus>KEY_VOLUMEDOWN</volumeminus>\n \t\t<pageplus>KEY_CHANNELUP</pageplus>\n+\t\t<pageplus>KEY_PAGEUP</pageplus>\n \t\t<pageminus>KEY_CHANNELDOWN</pageminus>\n+\t\t<pageminus>KEY_PAGEDOWN</pageminus>\n \t\t<skipplus>KEY_NEXT</skipplus>\n+\t\t<skipplus>KEY_NEXTSONG</skipplus>\n \t\t<skipminus>KEY_PREVIOUS</skipminus>\n+\t\t<skipminus>KEY_PREVIOUSSONG</skipminus>\n \t\t<guide>KEY_EPG</guide>\n \t\t<title>KEY_TITLE</title>\n+\t\t<title>KEY_TV2</title>\n+\t\t<title>KEY_CONTEXT_MENU</title>\n \t\t<subtitle>KEY_SUBTITLE</subtitle>\n \t\t<language>KEY_LANGUAGE</language>\n \t\t<info>KEY_INFO</info>\n+\t\t<info>KEY_PROPS</info>\n \t\t<display>KEY_ZOOM</display>\n+\t\t<display>KEY_ANGLE</display>\n \t\t<mute>KEY_MUTE</mute>\n \t\t<power>KEY_POWER</power>\n+\t\t<power>KEY_SLEEP</power>\n+\t\t<power>KEY_WAKEUP</power>\n \t\t<eject>KEY_EJECTCD</eject>\n \t\t<eject>KEY_EJECTCLOSECD</eject>\n \t\t<menu>KEY_DVD</menu>\n \t\t<menu>KEY_MENU</menu>\n \t\t<myvideo>KEY_VIDEO</myvideo>\n \t\t<mymusic>KEY_AUDIO</mymusic>\n+\t\t<mymusic>KEY_MP3</mymusic>\n \t\t<mypictures>KEY_CAMERA</mypictures>\n+\t\t<mypictures>KEY_IMAGES</mypictures>\n \t\t<livetv>KEY_TUNER</livetv>\n \t\t<mytv>KEY_TV</mytv>\n+\t\t<mytv>KEY_PVR</mytv>\n \t\t<teletext>KEY_TEXT</teletext>\n+\t\t<one>KEY_1</one>\n \t\t<one>KEY_NUMERIC_1</one>\n+\t\t<two>KEY_2</two>\n \t\t<two>KEY_NUMERIC_2</two>\n+\t\t<three>KEY_3</three>\n \t\t<three>KEY_NUMERIC_3</three>\n+\t\t<four>KEY_4</four>\n \t\t<four>KEY_NUMERIC_4</four>\n+\t\t<five>KEY_5</five>\n \t\t<five>KEY_NUMERIC_5</five>\n+\t\t<six>KEY_6</six>\n \t\t<six>KEY_NUMERIC_6</six>\n+\t\t<seven>KEY_7</seven>\n \t\t<seven>KEY_NUMERIC_7</seven>\n+\t\t<eight>KEY_8</eight>\n \t\t<eight>KEY_NUMERIC_8</eight>\n+\t\t<nine>KEY_9</nine>\n \t\t<nine>KEY_NUMERIC_9</nine>\n+\t\t<zero>KEY_0</zero>\n \t\t<zero>KEY_NUMERIC_0</zero>\n+\t\t<star>KEY_KPASTERISK</star>\n \t\t<star>KEY_NUMERIC_STAR</star>\n \t\t<hash>KEY_NUMERIC_POUND</hash>\n \t\t<red>KEY_RED</red>\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-995.21-keymaps-change-remote-poweroff-action-to-show-shutdo.patch",
    "content": "From 5604be6a6701e0bd68cb36fadb05cecba57f7887 Mon Sep 17 00:00:00 2001\nFrom: Matthias Reichl <hias@horus.com>\nDate: Fri, 22 Sep 2023 23:41:51 +0200\nSubject: [PATCH] keymaps: change remote poweroff action to show shutdown menu\n\nSigned-off-by: Matthias Reichl <hias@horus.com>\n---\n system/keymaps/remote.xml | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\n--- a/system/keymaps/remote.xml\n+++ b/system/keymaps/remote.xml\n@@ -50,7 +50,7 @@\n       <volumeplus>VolumeUp</volumeplus>\n       <volumeminus>VolumeDown</volumeminus>\n       <mute>Mute</mute>\n-      <power>ShutDown()</power>\n+      <power>ActivateWindow(ShutdownMenu)</power>\n       <myvideo>ActivateWindow(Videos)</myvideo>\n       <mymusic>ActivateWindow(Music)</mymusic>\n       <mypictures>ActivateWindow(Pictures)</mypictures>\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-999.15-disable-using-tv-menu-language-by-default.patch",
    "content": "--- a/system/peripherals.xml\n+++ b/system/peripherals.xml\n@@ -18,7 +18,7 @@\n     <setting key=\"cec_wake_screensaver\" type=\"bool\" value=\"1\" label=\"36010\" order=\"7\" />\n     <setting key=\"standby_pc_on_tv_standby\" type=\"enum\" value=\"13011\" label=\"36029\" order=\"8\" lvalues=\"36028|13005|13011|13010|13009|36044|36045\" />\n     <setting key=\"standby_tv_on_pc_standby\" type=\"bool\" value=\"1\" label=\"36026\" order=\"9\" />\n-    <setting key=\"use_tv_menu_language\" type=\"bool\" value=\"1\" label=\"36018\" order=\"10\" />\n+    <setting key=\"use_tv_menu_language\" type=\"bool\" value=\"0\" label=\"36018\" order=\"10\" />\n     <setting key=\"pause_playback_on_deactivate\" type=\"bool\" value=\"1\" label=\"36033\" configurable=\"0\" />\n     <setting key=\"pause_or_stop_playback_on_deactivate\" type=\"enum\" value=\"231\" label=\"36033\" order=\"11\" lvalues=\"231|36044|36045\" />\n     <setting key=\"connected_device\" type=\"enum\" label=\"36019\" value=\"36037\" lvalues=\"36037|36038\" order=\"12\" />\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/kodi-999.20-headers-only.patch",
    "content": "--- a/CMakeLists.txt\n+++ b/CMakeLists.txt\n@@ -47,6 +47,7 @@ include(CMakeDependentOption)\n include(cmake/scripts/common/DependencyOptions.cmake)\n \n # general\n+option(HEADERS_ONLY       \"Skip building\" OFF)\n option(VERBOSE            \"Enable verbose output?\" OFF)\n option(ENABLE_CLANGTIDY   \"Enable clang-tidy support?\" OFF)\n option(ENABLE_CPPCHECK    \"Enable cppcheck support?\" OFF)\n@@ -107,6 +108,7 @@ endif()\n \n core_find_git_rev(APP_SCMID FULL)\n \n+if(NOT HEADERS_ONLY)\n # Dynamically loaded libraries built with the project\n add_custom_target(${APP_NAME_LC}-libraries)\n set(LIBRARY_FILES \"\" CACHE STRING \"\" FORCE)\n@@ -478,6 +480,7 @@ endif()\n if(FFMPEG_CREATE_SHARED_LIBRARY)\n   set(CMAKE_CXX_CREATE_SHARED_LIBRARY \"${FFMPEG_CREATE_SHARED_LIBRARY}\")\n endif()\n+endif()\n \n # Platform specific additional extra targets\n if(EXISTS ${CMAKE_SOURCE_DIR}/cmake/scripts/${CORE_SYSTEM_NAME}/ExtraTargets.cmake)\n--- a/cmake/scripts/linux/Install.cmake\n+++ b/cmake/scripts/linux/Install.cmake\n@@ -51,6 +51,7 @@ configure_file(${CMAKE_SOURCE_DIR}/tools\n configure_file(${CMAKE_SOURCE_DIR}/tools/Linux/kodi.metainfo.xml.in\n                ${CORE_BUILD_DIR}/${APP_PACKAGE}.metainfo.xml @ONLY)\n \n+if(NOT HEADERS_ONLY)\n # Install app\n install(TARGETS ${APP_NAME_LC}\n         DESTINATION ${libdir}/${APP_NAME_LC}\n@@ -160,6 +161,7 @@ if(INTERNAL_TEXTUREPACKER_INSTALLABLE)\n           RENAME \"${APP_NAME_LC}-TexturePacker\"\n           COMPONENT kodi-tools-texturepacker)\n endif()\n+endif()\n \n # Install kodi-addon-dev headers\n include(${CMAKE_SOURCE_DIR}/xbmc/addons/AddonBindings.cmake)\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/wayland/kodi-995.01-fix-missing-wayland-scanner-pkg-config.patch",
    "content": "From b91a76aea33b60be19d3b66f9a49438887576ce6 Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Sat, 13 Nov 2021 08:23:54 -0800\nSubject: [PATCH] cmake: allow providing WAYLANDPP_SCANNER in a cross compile\n\n---\n cmake/modules/FindWaylandpp.cmake | 2 ++\n 1 file changed, 2 insertions(+)\n\n--- a/cmake/modules/FindWaylandpp.cmake\n+++ b/cmake/modules/FindWaylandpp.cmake\n@@ -22,6 +22,8 @@ pkg_check_modules(PC_WAYLANDPP_SCANNER w\n \n if(PC_WAYLANDPP_SCANNER_FOUND)\n   pkg_get_variable(PC_WAYLANDPP_SCANNER wayland-scanner++ wayland_scannerpp)\n+elseif(WAYLANDPP_SCANNER)\n+  message(STATUS \"wayland-scanner++ already set to: ${WAYLANDPP_SCANNER}\")\n else()\n   message(SEND_ERROR \"wayland-scanner++ not found via pkg-config\")\n endif()\n"
  },
  {
    "path": "packages/mediacenter/kodi/patches/wayland/kodi-999.16-PR20632-base-m_bFullScreenRoot-setting-on-res-infos-bFullScreen.patch",
    "content": "From 81a2fb65100b88c31bb0168acc0c3b7bab09475a Mon Sep 17 00:00:00 2001\nFrom: Dominique Martinet <asmadeus@codewreck.org>\nDate: Sun, 5 Dec 2021 23:46:25 +0900\nSubject: [PATCH] windowing: base m_bFullScreenRoot setting on res info's\n bFullScreen\n\non wayland, the compositor can ignore fullscreen requests, so even if\napplication's InitWindow created a window with res >= DESKTOP we have\nno guarantee that the actual window created is actually fullscreen.\n\nCreateNewWindow will fill GetResolutionInfo(res) so we can check that\nfor bFullScreen and use this information... in theory.\n\nwayland was inconditionally setting it to the requested fullscreen\nstate, so also make sure it's set based on the real state by keeping\nm_bFullScreen up to date and using that instead.\n\nFixes: #20629\n---\n xbmc/windowing/GraphicContext.cpp           | 2 +-\n xbmc/windowing/wayland/WinSystemWayland.cpp | 5 +++--\n 2 files changed, 4 insertions(+), 3 deletions(-)\n\n--- a/xbmc/windowing/GraphicContext.cpp\n+++ b/xbmc/windowing/GraphicContext.cpp\n@@ -410,7 +410,7 @@ void CGraphicContext::SetVideoResolution\n     return;\n   }\n \n-  if (res >= RES_DESKTOP)\n+  if (CDisplaySettings::GetInstance().GetResolutionInfo(res).bFullScreen)\n   {\n     CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_fullScreen = true;\n     m_bFullScreenRoot = true;\n--- a/xbmc/windowing/wayland/WinSystemWayland.cpp\n+++ b/xbmc/windowing/wayland/WinSystemWayland.cpp\n@@ -343,7 +343,7 @@ bool CWinSystemWayland::CreateNewWindow(\n \n   // Update resolution with real size as it could have changed due to configure()\n   UpdateDesktopResolution(res, res.strOutput, m_bufferSize.Width(), m_bufferSize.Height(), res.fRefreshRate, 0);\n-  res.bFullScreen = fullScreen;\n+  res.bFullScreen = m_bFullScreen;\n \n   // Now start processing events\n   //\n@@ -787,7 +787,7 @@ void CWinSystemWayland::OnConfigure(std:\n     CLog::LogF(LOGDEBUG, \"Initial configure serial {}: size {}x{} state {}\", serial, size.Width(),\n                size.Height(), IShellSurface::StateToString(state));\n     m_shellSurfaceState = state;\n-    if (!size.IsZero())\n+    if (!size.IsZero() || state.test(IShellSurface::STATE_FULLSCREEN))\n     {\n       UpdateSizeVariables(size, m_scale, m_shellSurfaceState, true);\n     }\n@@ -1015,6 +1015,7 @@ CWinSystemWayland::SizeUpdateInformation\n   m_surfaceSize = sizes.surfaceSize;\n   m_bufferSize = sizes.bufferSize;\n   m_configuredSize = sizes.configuredSize;\n+  m_bFullScreen = state.test(IShellSurface::STATE_FULLSCREEN);\n \n   SizeUpdateInformation changes{m_surfaceSize != oldSurfaceSize, m_bufferSize != oldBufferSize, m_configuredSize != oldConfiguredSize, m_scale != oldBufferScale};\n \n"
  },
  {
    "path": "packages/mediacenter/kodi/profile.d/00-addons.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n# addons profile.d/*.profile\nfor config in /storage/.kodi/addons/*/profile.d/*.profile; do\n  if [ -f \"$config\" ] ; then\n    . $config\n  fi\ndone\n\noe_setup_addon() {\n  if [ ! -z $1 ] ; then\n    DEF=\"/storage/.kodi/addons/$1/settings-default.xml\"\n    CUR=\"/storage/.kodi/userdata/addon_data/$1/settings.xml\"\n\n    # export some useful variables\n    ADDON_DIR=\"$HOME/.kodi/addons/$1\"\n    ADDON_HOME=\"$HOME/.kodi/userdata/addon_data/$1\"\n    ADDON_LOG_FILE=\"$ADDON_HOME/service.log\"\n\n    [ ! -d $ADDON_HOME ] && mkdir -p $ADDON_HOME\n\n    # copy defaults\n    if [ -f \"$DEF\" -a ! -f \"$CUR\" ] ; then\n      cp \"$DEF\" \"$CUR\"\n    fi\n\n    # parse config\n    for xml_file in \"$DEF\" \"$CUR\"; do\n      if [ -f \"$xml_file\" ]; then\n        XML_SETTINGS_VER=\"$(xmlstarlet sel -t -m settings -v @version $xml_file)\"\n        if [ \"$XML_SETTINGS_VER\" = \"2\" ]; then\n          eval $(xmlstarlet sel -t -m settings/setting -v @id -o \"=\" -v . -n \"$xml_file\" | sed -e \"s/'/'\\\\\\\\''/g; s/=/='/; s/$/'/\")\n        else\n          eval $(xmlstarlet sel -t -m settings -m setting -v @id -o \"=\" -v @value -n \"$xml_file\" | sed -e \"s/'/'\\\\\\\\''/g; s/=/='/; s/$/'/\")\n        fi\n      fi\n    done\n  fi\n}\n"
  },
  {
    "path": "packages/mediacenter/kodi/profile.d/99-kodi.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n# PATH\nfor addon in /storage/.kodi/addons/*/bin /usr/lib/kodi/addons/*/bin; do\n  [ -d \"$addon\" ] && PATH=\"$PATH:$addon\"\ndone\nexport PATH\n\n# LD_LIBRARY_PATH\nfor addon in /storage/.kodi/addons/*/lib /usr/lib/kodi/addons/*/lib; do\n  [ -d \"$addon\" ] && LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH:$addon\"\ndone\nexport LD_LIBRARY_PATH\n"
  },
  {
    "path": "packages/mediacenter/kodi/scripts/kodi-config",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nKODI_ROOT=$HOME/.kodi\n\nBOOT_STATE=\"$(cat $HOME/.config/boot.status 2>/dev/null)\"\n\n# May not exist if testing a clean /storage/.kodi without rebooting\nmkdir -p $KODI_ROOT/userdata\n\n# hack: make addon-bins executable\n# done in kodi on addon install. but just in case..\nchmod +x $KODI_ROOT/addons/*/bin/* 2>/dev/null\n\n# setup Kodi sources\nif [ ! -f $KODI_ROOT/userdata/sources.xml ]; then\n  if [ -f /usr/share/kodi/config/sources.xml ]; then\n    cp /usr/share/kodi/config/sources.xml $KODI_ROOT/userdata\n  fi\nfi\n\n# common setup guisettings\nif [ ! -f $KODI_ROOT/userdata/guisettings.xml ] ; then\n  if [ -f /usr/share/kodi/config/guisettings.xml ]; then\n    cp /usr/share/kodi/config/guisettings.xml $KODI_ROOT/userdata\n  fi\n  if [ \"$BOOT_STATE\" = \"SAFE\" ]; then\n    [ ! -f $KODI_ROOT/userdata/guisettings.xml ] && echo '<settings version=\"2\"></settings>' > $KODI_ROOT/userdata/guisettings.xml\n    xmlstarlet ed --omit-decl --inplace -s settings -t elem -n setting -v \"maroon\" -i settings/setting -t attr -n id -v lookandfeel.skincolors $KODI_ROOT/userdata/guisettings.xml\n  fi\nfi\n\nKODI_ARGS=\"\"\n\necho \"KODI_ARGS=\\\"$KODI_ARGS\\\"\" > /run/libreelec/kodi.conf\n\nif [ \"$(uname -m)\" = \"x86_64\" ]; then\n  echo \"MALLOC_MMAP_THRESHOLD_=524288\" >> /run/libreelec/kodi.conf\nelse #arm\n  echo \"MALLOC_MMAP_THRESHOLD_=8192\" >> /run/libreelec/kodi.conf\nfi\n\nif [ -f /storage/.config/kodi.conf ] ; then\n  cat /storage/.config/kodi.conf >>/run/libreelec/kodi.conf\nfi\n"
  },
  {
    "path": "packages/mediacenter/kodi/scripts/kodi-remote",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\necho \"Supported keys:\n← ↑ ↓ →         Left | Up | Down | Right\nContext Menu    c\nPlayer Debug    d\nFullscreen      f\nInfo            i\nCodec Info      o\nPause           p\nScreenshot      s\nSkin Debug      t\nStop            x\nMute            m\nVolume Down     -\nVolume Up       +\nBack            Backspace\nSelect          Enter\nQuit Remote     q or ctrl+c\n\"\n\ncom() {\n  kodi-send --action=\"$1\" > /dev/null 2>&1\n  echo -ne \"\\r$1\\e[K\";\n}\n\nwhile true; do\n  read -r -sn1 k\n  case \"$k\" in\n    A) com \"Up\";;\n    B) com \"Down\";;\n    C) com \"Right\";;\n    D) com \"Left\";;\n    c) com \"ContextMenu\";;\n    d) com \"PlayerDebug\";;\n    f) com \"FullScreen\";;\n    i) com \"Info\";;\n    m) com \"Mute\";;\n    o) com \"CodecInfo\";;\n    p) com \"Pause\";;\n    s) com \"TakeScreenshot\";;\n    t) com \"Skin.ToggleDebug\";;\n    x) com \"Stop\";;\n    -) com \"VolumeDown\";;\n    +) com \"VolumeUp\";;\n    $'\\177') com \"Back\";;\n    \"\") com \"Select\";;\n    q) exit\n  esac\ndone\n"
  },
  {
    "path": "packages/mediacenter/kodi/scripts/kodi-safe-mode",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nKODI_ROOT=$HOME/.kodi\n\nKODI_ROOT_FAILED=$KODI_ROOT.FAILED\nBOOT_STATUS=$HOME/.config/boot.status\n\nprocess_boot_status()\n{\n  BOOT_STATE=\"$(cat $BOOT_STATUS 2>/dev/null)\"\n\n  if [ \"${BOOT_STATE}\" = \"SAFE\" ]; then\n    if [ ! -d $KODI_ROOT_FAILED ]; then\n      # entering safe mode - rename failed .kodi, and restart with clean .kodi\n      mv $KODI_ROOT $KODI_ROOT_FAILED\n      reboot\n    else\n      # exiting safe mode - restore failed .kodi\n      rm -fr $KODI_ROOT\n      mv $KODI_ROOT_FAILED $KODI_ROOT\n      echo \"OK\" > $BOOT_STATUS\n    fi\n  else\n    echo \"OK\" > $BOOT_STATUS\n  fi\n\n  return 0\n}\n\nprocess_boot_status\n\nexit 0\n"
  },
  {
    "path": "packages/mediacenter/kodi/scripts/kodi.sh",
    "content": "#!/bin/sh\n#      Copyright (C) 2008-2013 Team XBMC\n#      http://xbmc.org\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n\n. /etc/profile\n\ntrap cleanup TERM\n\nKODI_ROOT=$HOME/.kodi\n\nSAVED_ARGS=\"$@\"\nCRASHLOG_DIR=$KODI_ROOT/temp\n\nBOOT_STATUS=$HOME/.config/boot.status\nNOSAFE_MODE=$HOME/.config/safemode.disable\nCRASH_HIST=/run/libreelec/crashes.dat\nKODI_MAX_RESTARTS=@KODI_MAX_RESTARTS@\nKODI_MAX_SECONDS=@KODI_MAX_SECONDS@\n\ncleanup() {\n  # make systemd happy by not exiting immediately but\n  # wait for kodi to exit\n  while killall -0 kodi.bin &>/dev/null; do\n    sleep 0.5\n  done\n}\n\ncommand_exists()\n{\n  command -v $1 &>/dev/null\n}\n\nsingle_stacktrace()\n{\n  # core filename is \"core.*kodi.bin.*\"\n  find \"$1\" -name 'core.*kodi.bin.*' | while read core; do\n    echo \"=====>  Core file: \"$core\"\" >> $FILE\n    echo \"        =========================================\" >> $FILE\n    if [ -f /storage/.config/debug.enhanced ]; then\n      gdb /usr/lib/kodi/kodi.bin --core=\"$core\" --batch -ex \"thread apply all bt full\" -ex \"info registers\" -ex \"set print asm-demangle on\" -ex \"disassemble\" 2>/dev/null >> $FILE\n    else\n      gdb /usr/lib/kodi/kodi.bin --core=\"$core\" --batch -ex \"thread apply all bt\" 2>/dev/null >> $FILE\n    fi\n    rm -f \"$core\"\n  done\n}\n\ndetect_crash_loop()\n{\n  # use monotonic time (in case date/time changes after booting)\n  NOW_TIME=$(awk '/^now/ {print int($3 / 1000000000)}' /proc/timer_list)\n  echo \"$NOW_TIME\" >> $CRASH_HIST\n\n  NUM_RESTARTS=$(wc -l $CRASH_HIST | cut -d' ' -f1)\n  FIRST_RESTART_TIME=$(tail -n $KODI_MAX_RESTARTS $CRASH_HIST | head -n 1)\n\n  # kodi restart loop detected? fail this kodi install\n  if [ $NUM_RESTARTS -ge $KODI_MAX_RESTARTS -a $KODI_MAX_SECONDS -ge $((NOW_TIME - FIRST_RESTART_TIME)) ]; then\n    return 0\n  else\n    return 1\n  fi\n}\n\nactivate_safe_mode()\n{\n  [ -f $NOSAFE_MODE ] && return 0\n\n  BOOT_STATE=\"$(cat $BOOT_STATUS 2>/dev/null)\"\n\n  if [ \"${BOOT_STATE:-OK}\" = \"OK\" ]; then\n    # generate logfiles zip for the failed kodi\n    /usr/bin/createlog\n    lastlog=$(ls -1 /storage/logfiles/*.zip | tail -n 1)\n    mv $lastlog /storage/logfiles/log-$(date -u +%Y-%m-%d-%H.%M.%S)-FAILED.zip\n\n    echo \"SAFE\" > $BOOT_STATUS\n  fi\n\n  return 0\n}\n\nprint_crash_report()\n{\n  mkdir -p $CRASHLOG_DIR\n\n  DATE=`date +%Y%m%d%H%M%S`\n  FILE=\"$CRASHLOG_DIR/.kodi_crashlog.log\"\n  echo \"############## kodi CRASH LOG ###############\" > $FILE\n  echo >> $FILE\n  echo \"################ SYSTEM INFO ################\" >> $FILE\n  echo -n \" Date: \" >> $FILE\n  date >> $FILE\n  echo \" kodi Options: $SAVED_ARGS\" >> $FILE\n  echo -n \" Arch: \" >> $FILE\n  uname -m >> $FILE\n  echo -n \" Kernel: \" >> $FILE\n  uname -rvs >> $FILE\n  echo -n \" Release: \" >> $FILE\n  . /etc/os-release\n  echo $NAME $VERSION >> $FILE\n  echo \"############## END SYSTEM INFO ##############\" >> $FILE\n  echo >> $FILE\n  echo \"############### STACK TRACE #################\" >> $FILE\n  if command_exists gdb; then\n    single_stacktrace /storage/.cache/cores\n  else\n    echo \"gdb not installed, can't get stack trace.\" >> $FILE\n  fi\n  echo \"############# END STACK TRACE ###############\" >> $FILE\n  echo >> $FILE\n  echo \"################# LOG FILE ##################\" >> $FILE\n  echo >> $FILE\n  cat $KODI_ROOT/temp/kodi.log >> $FILE\n  echo >> $FILE\n  echo \"############### END LOG FILE ################\" >> $FILE\n  echo >> $FILE\n  echo \"############ END kodi CRASH LOG #############\" >> $FILE\n  OFILE=\"$FILE\"\n  FILE=\"$CRASHLOG_DIR/kodi_crashlog_$DATE.log\"\n  mv \"$OFILE\" \"$FILE\"\n  ln -sf \"$(basename $FILE)\" \"$CRASHLOG_DIR/kodi_crash.log\"\n  echo \"Crash report available at $FILE\"\n}\n\nif command_exists gdb; then\n  ulimit -c unlimited\nfi\n\n# clean up any stale cores. just in case\nfind /storage/.cache/cores -type f -delete\n\n# clean zero-byte database files that prevent migration/startup\nfor file in $KODI_ROOT/userdata/Database/*.db; do\n  if [ -e \"$file\" ]; then\n    [ -s $file ] || rm -f $file\n  fi\ndone\n\n/usr/lib/kodi/kodi.bin $SAVED_ARGS\nRET=$?\n\nif [ $(( ($RET >= 131 && $RET <= 136) || $RET == 139 )) = \"1\" ] ; then\n  # Crashed with core dump\n  print_crash_report\n\n  # Cleanup. Keep only youngest 10 reports but current in any case\n  rm -f $(ls -1t $CRASHLOG_DIR/kodi_crashlog_*.log | grep -v \"$FILE\" | tail -n +10)\n\n  # Enable safe mode if a crash loop is detected\n  detect_crash_loop && activate_safe_mode\nfi\n\n# Filter Kodi powerdown/restartapp/reboot codes to satisfy systemd\n[ \"$RET\" -ge 64 -a \"$RET\" -le 66 ] && RET=0\n\nexit $RET\n"
  },
  {
    "path": "packages/mediacenter/kodi/scripts/pastekodi",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\ncat_data() {\n  echo \"========== ${1} ==========\"\n  cat\n}\n\ncat_file() {\n  if [ -f \"${1}\" ]; then\n    cat \"${1}\" | cat_data \"${2:-${1}}\"\n  fi\n}\n\nls_dir() {\n  if [ -d \"${1}\" ]; then\n    ls -lA \"${1}\" | cat_data \"${1}\"\n  fi\n}\n\nls_dir_recursive() {\n  if [ -d \"${1}\" ]; then\n    ls -lAR \"${1}\" | cat_data \"${1}\"\n  fi\n}\n\nusage() {\n  [ -n \"${1}\" ] && echo \"Unknown argument: ${1}\"\n  cat <<EOF\nUsage: $0 [-c] [-h]\n\n  -c   send output to stdout not via /usr/bin/pastebinit\n  -h   this help message\nEOF\n  exit 1\n}\n\nOUTPUT=\"/usr/bin/pastebinit\"\n\nwhile getopts \":hc\" opt; do\n  case ${opt} in\n    c) OUTPUT=\"cat\";;\n    ?) usage \"${OPTARG}\";;\n    h) usage;;\n  esac\ndone\n\nsource /etc/os-release\nSYSTEM_ARCH=\"${LIBREELEC_ARCH#*.}\"\n\n# If running in SAFE mode, send FAILED logs\nif [ \"$(cat \"/storage/.config/boot.status\" 2>/dev/null)\" = \"SAFE\" ]; then\n  KODI_ROOT=\"/storage/.kodi.FAILED/temp\"\nelse\n  KODI_ROOT=\"/storage/.kodi/temp\"\nfi\n\nif [ \"$(basename $0)\" = \"pastekodi\" ]; then\n  LOG_TYPE=\"System\"\n  LOG_FILE=\"${KODI_ROOT}/kodi.log\"\nelse\n  LOG_TYPE=\"Crash\"\n  LOG_FILE=\"${KODI_ROOT}/kodi_crash.log\"\nfi\n\n(\n  echo \"${LOG_TYPE} log output for: $(lsb_release)\"\n\n  if [ \"${SYSTEM_ARCH}\" = \"x86_64\" ]; then\n    if [ -d \"/sys/firmware/efi\" ]; then\n      echo \"Firmware Boot Mode: EFI\"\n    else\n      echo \"Firmware Boot Mode: BIOS\"\n    fi\n  fi\n  if [ \"${LIBREELEC_PROJECT}\" = \"RPi\" ]; then\n    echo \"RPi Hardware Revision: $(vcgencmd otp_dump | grep 30: | cut -d: -f2)\"\n    echo \"RPi $(vcgencmd get_throttled)\"\n  fi\n\n  cat_file \"${LOG_FILE}\"\n\n  journalctl -a -b -0 -o short-precise | cat_data \"journalctl -a -b -0\"\n\n  kmsprint | cat_data \"kmsprint\"\n\n  if [ \"${LIBREELEC_PROJECT}\" = \"RPi\" ]; then\n    vcgencmd bootloader_version | cat_data \"Bootloader version\"\n  fi\n\n  cat_file \"/flash/config.txt\" # RPi\n  cat_file \"/flash/distroconfig.txt\" # RPi\n  cat_file \"/flash/cmdline.txt\" # RPi\n\n  cat_file \"/flash/syslinux.cfg\" # x86 BIOS\n  cat_file \"/flash/EFI/BOOT/syslinux.cfg\" # x86 EFI\n  cat_file \"/flash/extlinux.conf\" # x86 legacy\n\n  cat_file \"/flash/extlinux/extlinux.conf\" # u-boot\n\n  cat_file \"${KODI_ROOT}/.smb/smb.conf\"\n  cat_file \"${KODI_ROOT}/.smb/user.conf\"\n  cat_file \"/run/samba/smb.conf\"\n\n  ls_dir /storage/.config\n  ls_dir_recursive /storage/.config/system.d\n  ls_dir /storage/.config/udev.rules.d\n\n  pem_sys=\"$(sha256sum /etc/ssl/cacert.pem.system | cut -d' ' -f1)\"\n  pem_run=\"$(sha256sum /run/libreelec/cacert.pem | cut -d' ' -f1)\"\n  if [ \"${pem_sys}\" = \"${pem_run}\" ]; then\n    cat_data \"/run/libreelec/cacert.pem is default\" </dev/null\n  else\n    cat_file /run/libreelec/cacert.pem \"/run/libreelec/cacert.pem (modified)\"\n  fi\n\n  if [ \"${PROJECT}\" = \"Amlogic-ce\" ]; then\n    ce-debug -l | cat_data \"ce-debug -l\"\n  fi\n\n) | ${OUTPUT} 2>/dev/null\n"
  },
  {
    "path": "packages/mediacenter/kodi/scripts/service-addon-wrapper",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nif [ $# -ne 3 ] ; then\n  echo \"$0 usage: context addon-id addon-path\"\n  exit 1\nfi\n\nCONTEXT=\"$1\"\nADDON_ID=\"$2\"\nADDON_PATH=\"$3\"\n\nif [ ! -d /storage/.config/system.d ] ; then\n  mkdir -p /storage/.config/system.d\nfi\n\nSERVICE_FILE=\"${ADDON_PATH}/system.d/${ADDON_ID}.service\"\n\nif [ -f \"${SERVICE_FILE}\" ] ; then\n  case \"${CONTEXT}\" in\n    enable)\n      systemctl enable \"${SERVICE_FILE}\"\n      chmod +x \"${ADDON_PATH}/bin\"/*\n      systemctl start \"${ADDON_ID}.service\"\n      ;;\n    disable | pre-uninstall)\n      systemctl stop \"${ADDON_ID}.service\"\n      systemctl disable \"${ADDON_ID}.service\"\n      ;;\n    post-install)\n      # post-install is triggered on update as well,\n      # make sure to stop and re-install service\n      systemctl stop \"${ADDON_ID}.service\"\n      systemctl disable \"${ADDON_ID}.service\"\n      systemctl enable \"${SERVICE_FILE}\"\n      chmod +x \"${ADDON_PATH}/bin\"/*\n      systemctl start \"${ADDON_ID}.service\"\n      ;;\n    restart)\n      systemctl restart \"${ADDON_ID}.service\"\n      ;;\n    reload)\n      systemctl reload \"${ADDON_ID}.service\"\n      ;;\n    *)\n      echo \"$0: unknown service context $CONTEXT\"\n      exit 1\n      ;;\n  esac\nfi\n\nif [ ! -d /storage/.cache/kernel-overlays ] ; then\n  mkdir -p /storage/.cache/kernel-overlays\nfi\n\n# kernel-overlay addons built into the image have their\n# files installed in the default /usr/lib/kernel-overlays\n# location, not inside the kodi addon dir\n\ncase \"${ADDON_PATH}\" in\n  /usr/share/kodi/addons/*)\n    OVERLAY_PATH=\"/usr/lib/kernel-overlays/${ADDON_ID}\"\n    ;;\n  *)\n    OVERLAY_PATH=\"${ADDON_PATH}/kernel-overlay\"\n    ;;\nesac\n\ncreate_overlay_conf() {\n  rm -f \"${OVERLAY_CONF}\"\n  echo \"${OVERLAY_PATH}\" > \"${OVERLAY_CONF}\"\n}\n\nif [ -d \"${OVERLAY_PATH}\" ] ; then\n  OVERLAY_CONF=\"/storage/.cache/kernel-overlays/50-${ADDON_ID}.conf\"\n\n  case \"${CONTEXT}\" in\n    enable | post-install )\n      create_overlay_conf\n      ;;\n    disable | pre-uninstall )\n      rm -f \"${OVERLAY_CONF}\"\n      ;;\n    update )\n      if [ -e \"${OVERLAY_CONF}\" ] ; then\n        create_overlay_conf\n      fi\n      ;;\n    *)\n      echo \"$0: unknown overlay context $CONTEXT\"\n      exit 1\n      ;;\n  esac\n\nfi\n"
  },
  {
    "path": "packages/mediacenter/kodi/scripts/setwakeup.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nif [ -f /sys/class/rtc/rtc0/wakealarm ]; then\n  logger -t setwakeup.sh \"### Setting system wakeup time ###\"\n  echo 0 > /sys/class/rtc/rtc0/wakealarm\n  echo $1 > /sys/class/rtc/rtc0/wakealarm\n  logger -t setwakeup.sh \"### $(cat /proc/driver/rtc) ###\"\nfi\n"
  },
  {
    "path": "packages/mediacenter/kodi/scripts/xml_merge.py",
    "content": "#!/usr/bin/env python3\n\n# taken from http://stackoverflow.com/a/14879370 with minor modifications\n\nfrom __future__ import print_function\nimport os\nimport sys\nimport xml.dom.minidom\nfrom xml.etree import ElementTree as et\n\ndef printerr(*args, **kwargs):\n    print(*args, file=sys.stderr, **kwargs)\n\nclass hashabledict(dict):\n    def __hash__(self):\n        return hash(tuple(sorted(self.items())))\n\nclass XMLCombiner(object):\n    def __init__(self, filenames):\n        if len(filenames) == 0:\n            raise Exception('No filenames!')\n\n        try:\n            self.roots = []\n            for f in filenames:\n              self.roots.append(et.parse(f).getroot())\n        except xml.etree.ElementTree.ParseError:\n            printerr(\"ERROR: Unable to parse XML file %s\" % f)\n            raise\n\n    def prettyPrint(self, etree_xml):\n        minidom = xml.dom.minidom.parseString(et.tostring(etree_xml))\n        return \"\\n\".join([line for line in minidom.toprettyxml(indent=\"  \", encoding=\"utf-8\").decode('utf-8').split('\\n') if line.strip() != \"\"])\n\n    def combine(self):\n        for r in self.roots[1:]:\n            self.combine_element(self.roots[0], r)\n        return self.prettyPrint(self.roots[0])\n\n    def combine_element(self, one, other):\n        mapping = {(el.tag, hashabledict(el.attrib)): el for el in one}\n        for el in other:\n            if len(el) == 0:\n                try:\n                    mapping[(el.tag, hashabledict(el.attrib))].text = el.text\n                except KeyError:\n                    mapping[(el.tag, hashabledict(el.attrib))] = el\n                    one.append(el)\n            else:\n                try:\n                    self.combine_element(mapping[(el.tag, hashabledict(el.attrib))], el)\n                except KeyError:\n                    mapping[(el.tag, hashabledict(el.attrib))] = el\n                    one.append(el)\n\nif __name__ == '__main__':\n    xmlfiles = [file for file in sys.argv[1:] if os.path.exists(file)]\n\n    r = XMLCombiner(xmlfiles).combine()\n\n    print(r)\n"
  },
  {
    "path": "packages/mediacenter/kodi/sleep.d/openelec-sleep.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\nrun_scripts()\n{\n    list_scripts $1\n    for script in $SCRIPTS ; do\n        progress \"running sleep script $script ($1)...\"\n        sh /usr/lib/systemd/system-sleep.serial/$script $1\n    done\n}\n\nlist_scripts()\n{\n    case $1 in\n        pre)\n            SCRIPTS=$(ls /usr/lib/systemd/system-sleep.serial/ | sort)\n        ;;\n        post)\n            SCRIPTS=$(ls /usr/lib/systemd/system-sleep.serial/ | sort -r)\n        ;;\n    esac\n}\n\nrun_scripts $1\n\nexit 0\n"
  },
  {
    "path": "packages/mediacenter/kodi/sleep.d.serial/10-addon-sleep.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\n# see https://wiki.archlinux.org/index.php/Power_Management#Hooks_in_.2Fusr.2Flib.2Fsystemd.2Fsystem-sleep\n\nfor script in $HOME/.kodi/addons/*/sleep.d/*.power; do\n  if [ -f $script ]; then\n    progress \"running addon sleep script $script ($@)...\"\n    sh $script $@\n  fi\ndone\n\nexit 0"
  },
  {
    "path": "packages/mediacenter/kodi/sleep.d.serial/20-custom-sleep.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\n# see https://wiki.archlinux.org/index.php/Power_Management#Hooks_in_.2Fusr.2Flib.2Fsystemd.2Fsystem-sleep\n\nfor script in $HOME/.config/sleep.d/*.power; do\n  if [ -f $script ]; then\n    progress \"running custom sleep script $script ($@)...\"\n    sh $script $@\n  fi\ndone\n\nexit 0"
  },
  {
    "path": "packages/mediacenter/kodi/system.d/kodi-autostart.service",
    "content": "[Unit]\nDescription=Kodi user autostart script\nBefore=kodi.service\nAfter=network-online.target graphical.target\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStart=-/bin/sh -c \". /etc/profile; test -f /storage/.config/autostart.sh && exec /bin/sh /storage/.config/autostart.sh\"\nExecStop=-/bin/sh -c \". /etc/profile; test -f /storage/.config/autostop.sh && exec /bin/sh /storage/.config/autostop.sh\"\nRemainAfterExit=yes\nTimeoutStopSec=5min\n\n[Install]\nWantedBy=kodi.service\n"
  },
  {
    "path": "packages/mediacenter/kodi/system.d/kodi-cleanlogs.service",
    "content": "[Unit]\nDescription=Kodi clean debug logs\nConditionKernelCommandLine=!debugging\nConditionPathExists=!/storage/.cache/debug.libreelec\nBefore=kodi.service\n\n[Service]\nType=oneshot\nExecStart=-/bin/sh -c 'rm -rf /storage/.kodi/userdata/addon_data/*/*.log /storage/.kodi/userdata/addon_data/*/log/*'\nRemainAfterExit=yes\n\n[Install]\nWantedBy=kodi.service\n"
  },
  {
    "path": "packages/mediacenter/kodi/system.d/kodi-halt.service",
    "content": "[Unit]\nDescription=Kodi halt script\nAfter=kodi.service\nBefore=systemd-halt.service\nDefaultDependencies=no\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStart=-/bin/sh -c \". /etc/profile; exec /bin/sh /storage/.config/shutdown.sh halt\"\nRemainAfterExit=yes\n\n[Install]\nWantedBy=halt.target\n"
  },
  {
    "path": "packages/mediacenter/kodi/system.d/kodi-lirc-suspend.service",
    "content": "[Unit]\nDescription=LIRC sleep hook\nBefore=sleep.target\nStopWhenUnneeded=yes\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=-/usr/bin/kodi-send --host=127.0.0.1 -a \"LIRC.Stop\"\nExecStop=-/usr/bin/kodi-send --host=127.0.0.1 -a \"LIRC.Start\"\n\n[Install]\nWantedBy=sleep.target\n"
  },
  {
    "path": "packages/mediacenter/kodi/system.d/kodi-poweroff.service",
    "content": "[Unit]\nDescription=Kodi poweroff script\nAfter=kodi.service\nBefore=systemd-poweroff.service\nDefaultDependencies=no\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStart=-/bin/sh -c \". /etc/profile; exec /bin/sh /storage/.config/shutdown.sh poweroff\"\nRemainAfterExit=yes\n\n[Install]\nWantedBy=poweroff.target\n"
  },
  {
    "path": "packages/mediacenter/kodi/system.d/kodi-reboot.service",
    "content": "[Unit]\nDescription=Kodi reboot script\nAfter=kodi.service\nBefore=systemd-reboot.service\nDefaultDependencies=no\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStart=-/bin/sh -c \". /etc/profile; exec /bin/sh /storage/.config/shutdown.sh reboot\"\nRemainAfterExit=yes\n\n[Install]\nWantedBy=reboot.target\n"
  },
  {
    "path": "packages/mediacenter/kodi/system.d/kodi-waitonnetwork.service",
    "content": "[Unit]\nDescription=Wait on network\nAfter=connman.service\nBefore=network-online.target\nDefaultDependencies=no\nConflicts=shutdown.target\nConditionFileNotEmpty=/storage/.cache/libreelec/network_wait\nConditionPathExists=!/dev/.kernel_ipconfig\nConditionPathExists=/storage/.kodi/userdata/addon_data/service.libreelec.settings/oe_settings.xml\n\n[Service]\nType=oneshot\nEnvironmentFile=/storage/.cache/libreelec/network_wait\nExecStart=/usr/bin/wait-time-sync --timeout ${WAIT_NETWORK_TIME}\nStandardOutput=tty\nRemainAfterExit=yes\nSuccessExitStatus=1\n\n[Install]\nWantedBy=network-online.target\n"
  },
  {
    "path": "packages/mediacenter/kodi/system.d/kodi.service",
    "content": "[Unit]\nDescription=Kodi Media Center\nAfter=network-online.target graphical.target\nRequires=graphical.target\nWants=network-online.target\n\n[Service]\nEnvironmentFile=/usr/lib/kodi/kodi.conf\nEnvironmentFile=-/run/libreelec/kodi.conf\nEnvironmentFile=-/run/libreelec/debug/kodi.conf\nExecStartPre=-/usr/lib/kodi/kodi-config\nExecStart=/usr/lib/kodi/kodi.sh --standalone -fs $KODI_ARGS $KODI_DEBUG\nExecStop=/bin/kill -TERM $MAINPID\nExecStopPost=-/usr/lib/kodi/kodi-safe-mode\nTimeoutStopSec=30\nRestart=always\nRestartSec=2\nStartLimitInterval=0\nLimitNOFILE=16384\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/mediacenter/kodi/system.d/kodi.target",
    "content": "[Unit]\nDescription=Kodi Mediacenter Interface\nRequires=multi-user.target graphical.target network-online.target\nAfter=network-online.target graphical.target\nWants=network-online.target\nConflicts=rescue.target\nAllowIsolate=yes\n\n[Install]\nAlias=default.target\n"
  },
  {
    "path": "packages/mediacenter/kodi/tmpfiles.d/kodi-userdirs.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nd    /storage/music              0755 root root - -\nd    /storage/pictures           0755 root root - -\nd    /storage/tvshows            0755 root root - -\nd    /storage/videos             0755 root root - -\nd    /storage/screenshots        0755 root root - -\n"
  },
  {
    "path": "packages/mediacenter/kodi/tmpfiles.d/kodi.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nd    /run/kodi     0755 root root - -\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.2sf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.2sf\"\nPKG_VERSION=\"20.2.1-Nexus\"\nPKG_SHA256=\"247ad2d9e1df00304882b40d80bc8fd70a4efd2bf2613163c24177d36649247c\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.2sf\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.2sf/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform zlib\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.2sf\"\nPKG_LONGDESC=\"audiodecoder.2sf\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.asap/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.asap\"\nPKG_VERSION=\"20.3.0-Nexus\"\nPKG_SHA256=\"9f54285866766b80d0d0c5210561678579d396591ab16cf70c83c4968bfbc8ba\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.asap\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.asap/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.asap\"\nPKG_LONGDESC=\"audiodecoder.asap\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.dumb/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.dumb\"\nPKG_VERSION=\"20.2.1-Nexus\"\nPKG_SHA256=\"d2ef04e80645f0bd1c9d31c9633d2a27d1757198fbcd2d43d00c84889e6ae585\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.dumb\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.dumb/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.dumb\"\nPKG_LONGDESC=\"audiodecoder.dumb\"\nPKG_BUILD_FLAGS=\"pic\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.fluidsynth/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.fluidsynth\"\nPKG_VERSION=\"20.2.1-Nexus\"\nPKG_SHA256=\"dd8ca6386a3beed360c1d2f989cd81553baf81652007fdfd478a28b44b68db10\"\nPKG_REV=\"6\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.fluidsynth\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.fluidsynth/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform fluidsynth\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.fluidsynth\"\nPKG_LONGDESC=\"audiodecoder.fluidsynth\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.gme/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.gme\"\nPKG_VERSION=\"20.2.1-Nexus\"\nPKG_SHA256=\"5aaec959e92f4af2684aa0439576d7f576f28a0a43f50439a6f38d0738792bdc\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.gme\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.gme/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.gme\"\nPKG_LONGDESC=\"audiodecoder.gme\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.gsf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.gsf\"\nPKG_VERSION=\"20.2.1-Nexus\"\nPKG_SHA256=\"b09dcb379bdc536117a956b10b37cf50c8afaa65337993c44a6847d382d7e2a5\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.gsf\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.gsf/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.gsf\"\nPKG_LONGDESC=\"audiodecoder.gsf\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.modplug/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.modplug\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"619ba20ea19dd9aea15e7d30aa12a146b412c7fcd9e709528f6758e82a3d85e7\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.modplug\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.modplug/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libmodplug\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.modplug\"\nPKG_LONGDESC=\"audiodecoder.modplug\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.ncsf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.ncsf\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"31b25846a9b8213306456eb6f8ab8fdaeede5cad35627e77aff2c422f370b211\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.ncsf\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.ncsf/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.ncsf\"\nPKG_LONGDESC=\"audiodecoder.ncsf\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.ncsf/patches/audiodecoder.ncsf-0001-fix-build-with-gcc5.patch",
    "content": "diff -Naur audiodecoder.ncsf-6cbec60.orig/lib/SSEQPlayer/convert.h audiodecoder.ncsf-6cbec60/lib/SSEQPlayer/convert.h\n--- audiodecoder.ncsf-6cbec60.orig/lib/SSEQPlayer/convert.h\t2015-05-09 09:55:22.000000000 -0700\n+++ audiodecoder.ncsf-6cbec60/lib/SSEQPlayer/convert.h\t2015-10-23 00:23:22.442374128 -0700\n@@ -11,12 +11,7 @@\n #include <sstream>\n #include <typeinfo>\n #include <locale>\n-#if (defined(__GNUC__) || defined(__clang__)) && !defined(_LIBCPP_VERSION)\n-# include \"wstring_convert.h\"\n-# include \"codecvt.h\"\n-#else\n-# include <codecvt>\n-#endif\n+#include <codecvt>\n #include <vector>\n #include <cmath>\n \n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.ncsf/patches/audiodecoder.ncsf-0002-fix-build-with-gcc-10.patch",
    "content": "From 2df5d26162b580a21489dd3e3157a9984c4c20e3 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Mon, 22 Jun 2020 19:06:04 +0200\nSubject: [PATCH] fix build with gcc 10\n\n---\n lib/SSEQPlayer/common.h | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/lib/SSEQPlayer/common.h b/lib/SSEQPlayer/common.h\nindex 747000615dea..a447785668d0 100644\n--- a/lib/SSEQPlayer/common.h\n+++ b/lib/SSEQPlayer/common.h\n@@ -14,6 +14,7 @@\n #include <vector>\n #include <cstring>\n #include <cstdint>\n+#include <stdexcept>\n \n /*\n  * Pseudo-file data structure\n-- \n2.27.0\n\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.nosefart/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.nosefart\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"2f7a92bfaddcd5aa63e2ea7348ae9eeefd07dee2aba46840ce5376677e2abc19\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.nosefart\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.nosefart/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.nosefart\"\nPKG_LONGDESC=\"audiodecoder.nosefart\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.openmpt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.openmpt\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"388fb4c9fcb5bd9edc978e3db5f54fa531c7f397393f3e421757e4e0de2d9c54\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.openmpt\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.openmpt/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libopenmpt\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.openmpt\"\nPKG_LONGDESC=\"audiodecoder.openmpt\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.organya/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.organya\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"df5db2c94161c7c578d672a8cc36bdbde6c345142c9bb5212759ad0dc30fd59d\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.organya\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.organya/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.organya\"\nPKG_LONGDESC=\"audiodecoder.organya\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.qsf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.qsf\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"3116bb31b3fe53b85675ba664a7a8d5885e157940a4bcf57b96050844b11a377\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.qsf\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.qsf/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.qsf\"\nPKG_LONGDESC=\"audiodecoder.qsf\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.sacd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.sacd\"\nPKG_VERSION=\"20.3.0-Nexus\"\nPKG_SHA256=\"6d54f6cf81e13aadcec1b43689551feba6e9426453a758d955e96348ba996277\"\nPKG_REV=\"3\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.sacd\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.sacd/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform wavpack\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.sacd\"\nPKG_LONGDESC=\"audiodecoder.sacd\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.sidplay/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.sidplay\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"ab1f89237c91bc7157557f42dadcff50a7191eb7285ee668543defce9f1efcf2\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.sidplay\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.sidplay/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform sidplay-libs\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.sidplay\"\nPKG_LONGDESC=\"audiodecoder.sidplay\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DSIDPLAY2_LIBRARIES=${SYSROOT_PREFIX}/usr/lib\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.snesapu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.snesapu\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"f216a7d25c864986618118236c575687ab62d129a16cb1f73c15860948d9ac92\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.snesapu\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.snesapu/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.snesapu\"\nPKG_LONGDESC=\"audiodecoder.snesapu\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.ssf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.ssf\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"c2d5fbba35d2d73ed5891567d507f77bc64fa447dfcb4474f5d58594e9a07b2d\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.ssf\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.ssf/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.ssf\"\nPKG_LONGDESC=\"audiodecoder.ssf\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.stsound/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.stsound\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"a8138fb075a480c59d7041a9408eca6e52dc88f188daed519cd9e684b430f333\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.stsound\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.stsound/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.stsound\"\nPKG_LONGDESC=\"audiodecoder.stsound\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.timidity/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.timidity\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"ef1b384090df3c2c78d00ed33de1d989ce802702b0a9aa13575946409a5cd0f1\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.timidity\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.timidity/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.timidity\"\nPKG_LONGDESC=\"audiodecoder.timidity\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n\npre_configure_target() {\n  CFLAGS+=\" -fcommon\"\n}\n\naddon() {\n  install_binary_addon ${PKG_ADDON_ID}\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/lib/timidity/libtimidity_*.so ${ADDON_BUILD}/${PKG_ADDON_ID}/\n}\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.upse/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.upse\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"d9f75e5cbab3ba5fc391cb40e0585bf22fad0eebfaf002d1d58bc896b6f2a5d6\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.upse\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.upse/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.upse\"\nPKG_LONGDESC=\"audiodecoder.upse\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.usf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.usf\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"3ce9ef8823c773d894fd0018455ea5000e9b5a64f3cd8d66ddb4cf8f6c9ea836\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.usf\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.usf/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.usf\"\nPKG_LONGDESC=\"audiodecoder.usf\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\nPKG_ADDON_PROJECTS=\"any !RPi1 !Slice\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.vgmstream/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.vgmstream\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"72367d7196f8049ef1fae426d32d3de1eac56bd4cb5a8fc38a6ba0c3da1b23d8\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.vgmstream\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.vgmstream/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.vgmstream\"\nPKG_LONGDESC=\"audiodecoder.vgmstream\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audiodecoder.wsr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audiodecoder.wsr\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"e8f8e06b61fbf612d59d689c38a6acade485aabae2382f3fbbedb0ce0c00048d\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audiodecoder.wsr\"\nPKG_URL=\"https://github.com/xbmc/audiodecoder.wsr/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audiodecoder.wsr\"\nPKG_LONGDESC=\"audiodecoder.wsr\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.audiodecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audioencoder.flac/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audioencoder.flac\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"71daf8c35bbf644591600fef93412cd068a6bf6173d2258dc243ee04c8e5b091\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audioencoder.flac\"\nPKG_URL=\"https://github.com/xbmc/audioencoder.flac/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform flac\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audioencoder.flac: A audioencoder addon for Kodi\"\nPKG_LONGDESC=\"audioencoder.flac is a audioencoder addon for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.audioencoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audioencoder.lame/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audioencoder.lame\"\nPKG_VERSION=\"20.3.0-Nexus\"\nPKG_SHA256=\"90f36ee0b4972669ed2876eae2502e58d86287aacdbf4bb25180aca01385e1c1\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audioencoder.lame\"\nPKG_URL=\"https://github.com/xbmc/audioencoder.lame/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform lame\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audioencoder.lame: A audioencoder addon for Kodi\"\nPKG_LONGDESC=\"audioencoder.lame is a audioencoder addon for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.audioencoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/audioencoder.vorbis/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"audioencoder.vorbis\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"359e972ddcc498727620ff224a82f970fa2ae22b71ea6ab30b96898dffe6f1f9\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/audioencoder.vorbis\"\nPKG_URL=\"https://github.com/xbmc/audioencoder.vorbis/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libogg libvorbis\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"audioencoder.vorbis: A audioencoder addon for Kodi\"\nPKG_LONGDESC=\"audioencoder.vorbis is a audioencoder addon for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.audioencoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro\"\nPKG_VERSION=\"20.2.6-Nexus\"\nPKG_SHA256=\"32b24c0d67046e41d703c70a432ba8209163bafc8ca88afc8181be4d6693efb4\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain tinyxml kodi-platform libretro-common rcheevos\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro is a thin wrapper for libretro\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.2048/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.2048\"\nPKG_VERSION=\"1.0.0.133-Nexus\"\nPKG_SHA256=\"64263ff32d22ea0301b26137ce59b1e6e82026b4a6d130dc3fd9699624d36011\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.2048\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.2048/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-2048\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.2048: 2048 for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.atari800/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.atari800\"\nPKG_VERSION=\"3.1.0.23-Nexus\"\nPKG_SHA256=\"4839836a4bf8a461d9554ad4920c0e45e89a384149abc6e82d847f74208f28cc\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.atari800\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.atari800/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-atari800\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.atari800: atari800 for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.beetle-bsnes/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.beetle-bsnes\"\nPKG_VERSION=\"0.9.26.23-Nexus\"\nPKG_SHA256=\"8f7830c484f5da5726fae1210c5cfe03ac1493c99a27cb9086f5b019052c688d\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.beetle-bsnes\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.beetle-bsnes/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-beetle-bsnes\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.beetle-bsnes: Beetle bSNES for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.beetle-gba/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.beetle-gba\"\nPKG_VERSION=\"0.9.36.23-Nexus\"\nPKG_SHA256=\"f16c4faf9e52c75a20239854d76b678b1b6ab1dad354b34043941e4b0f08bb39\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.beetle-gba\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.beetle-gba/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-beetle-gba\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.beetle-gba: Beetle GBA for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.beetle-lynx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.beetle-lynx\"\nPKG_VERSION=\"1.24.0.43-Nexus\"\nPKG_SHA256=\"63528c7ed0dabf79dc7e67228472d16da589ed49a9ab947966c1fee76c2936cb\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.beetle-lynx\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.beetle-lynx/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-beetle-lynx\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.beetle-lynx: Beetle lynx for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.beetle-ngp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.beetle-ngp\"\nPKG_VERSION=\"1.29.0.31-Nexus\"\nPKG_SHA256=\"df4b9a35adec5fb918f281502409e21b94d95761f11a68e4535ddb679589df4a\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.beetle-ngp\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.beetle-ngp/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-beetle-ngp\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.beetle-ngp: Beetle ngp for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.beetle-pce-fast/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.beetle-pce-fast\"\nPKG_VERSION=\"1.31.0.35-Nexus\"\nPKG_SHA256=\"a79f80f1fafecfc2ddefc43fe145d672280bae1bfe2564b78076b691bc51a93c\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.beetle-pce-fast\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.beetle-pce-fast/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-beetle-pce-fast\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.beetle-pce-fast: Beetle PCE Fast for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.beetle-pcfx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.beetle-pcfx\"\nPKG_VERSION=\"0.9.36.30-Nexus\"\nPKG_SHA256=\"dea4718dafd6675c2b5f72c562d943d1bc762529b67dc241fcc7bc014eab31bc\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.beetle-pcfx\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.beetle-pcfx/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-beetle-pcfx\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.beetle-pcfx: Beetle pcfx for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.beetle-psx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.beetle-psx\"\nPKG_VERSION=\"0.9.44.44-Nexus\"\nPKG_SHA256=\"b0353183fbc07f8b0997d9f8a61756a3fc784d1899208fed620adc33f796c6d2\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.beetle-psx\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.beetle-psx/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-beetle-psx\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.beetle-psx: Beetle PSX for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.beetle-supergrafx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.beetle-supergrafx\"\nPKG_VERSION=\"1.29.0.31-Nexus\"\nPKG_SHA256=\"cb593971040983aa6b65cf556b84242dd9e97f311ad2243604e0d3b30342a36a\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.beetle-supergrafx\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.beetle-supergrafx/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-beetle-supergrafx\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.beetle-supergrafx: Beetle supergrafx for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.beetle-vb/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.beetle-vb\"\nPKG_VERSION=\"1.31.0.29-Nexus\"\nPKG_SHA256=\"f5d4382d3d15c45a78bbd983c35012ea2852d74683a4c2ddc3fd42b21f17647b\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.beetle-vb\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.beetle-vb/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-beetle-vb\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.beetle-vb: Beetle vb for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.beetle-wswan/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.beetle-wswan\"\nPKG_VERSION=\"0.9.35.34-Nexus\"\nPKG_SHA256=\"69587cfdb710278502bb67c6c5d411edccf8f7179006899dc5393698ced540cd\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.beetle-wswan\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.beetle-wswan/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-beetle-wswan\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.beetle-wswan: Beetle wswan for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.bluemsx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.bluemsx\"\nPKG_VERSION=\"0.0.1.31-Nexus\"\nPKG_SHA256=\"3988666b5cbff65de5a26c5ba789d22d38fb26f056e0cf7cf54735d3810fe0cc\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.bluemsx\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.bluemsx/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-bluemsx\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.bluemsx: BlueMSX for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.bnes/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.bnes\"\nPKG_VERSION=\"0.83.0.22-Nexus\"\nPKG_SHA256=\"aa3db4f2f3d72beccf2aae7bb69099b824b69e2e8918f8cad2e5832015820207\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.bnes\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.bnes/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-bnes\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.bnes: bNES for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.bsnes-mercury-accuracy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.bsnes-mercury-accuracy\"\nPKG_VERSION=\"0.94.0.24-Nexus\"\nPKG_SHA256=\"c779acbc3563c1a7c403deee5f4f4c758fd3b4c25580e564ac139f247222ec86\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.bsnes-mercury-accuracy\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.bsnes-mercury-accuracy/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-bsnes-mercury-accuracy\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.bsnes-mercury-accuracy: bSNES Mercury for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.bsnes-mercury-balanced/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.bsnes-mercury-balanced\"\nPKG_VERSION=\"0.94.0.26-Nexus\"\nPKG_SHA256=\"27ce040f731fdfaa3a2f2e69a6762819f22bedc341a08956207ccc6e42db71eb\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.bsnes-mercury-balanced\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.bsnes-mercury-balanced/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-bsnes-mercury-balanced\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.bsnes-mercury-balanced: bSNES Mercury for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.bsnes-mercury-performance/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.bsnes-mercury-performance\"\nPKG_VERSION=\"0.94.0.26-Nexus\"\nPKG_SHA256=\"afa740018ac8cc1038b64cd7c9b4c812bb6de1f6b8af7fa8a08353adf5b1c984\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.bsnes-mercury-performance\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.bsnes-mercury-performance/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-bsnes-mercury-performance\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.bsnes-mercury-performance: bSNES Mercury for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.cap32/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.cap32\"\nPKG_VERSION=\"4.5.3.31-Nexus\"\nPKG_SHA256=\"895999eb17a923c75c48c110c9317ab39b6655883c0fd9033c831dce56dbaeb5\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.cap32\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.cap32/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-cap32\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.cap32: cap32 for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.dinothawr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.dinothawr\"\nPKG_VERSION=\"1.0.0.31-Nexus\"\nPKG_SHA256=\"f01ca34beb23c7739d48c1d0b259282061457b10c7ec55e7717f6fee693af311\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.dinothawr\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.dinothawr/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-dinothawr\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.dinothawr: dinothawr for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.dosbox/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.dosbox\"\nPKG_VERSION=\"0.74.0.21-Nexus\"\nPKG_SHA256=\"1e5dc4b1b2024c63eb80d0742fe460eae6702e8b5b669fd4253d97ebcae70a0d\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.dosbox\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.dosbox/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-dosbox\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.dosbox: DOSBox for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.dosbox-pure/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.dosbox-pure\"\nPKG_VERSION=\"0.9.7.21-Nexus\"\nPKG_SHA256=\"a02ec6cf85dccd70d159d4a56dbeb11604c4d6fe38239556d4684942235c6a78\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.dosbox-pure\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.dosbox-pure/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-dosbox-pure\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.dosbox-pure: DOSBox-Pure for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.fbneo/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.fbneo\"\nPKG_VERSION=\"1.0.0.63-Nexus\"\nPKG_SHA256=\"2304697dd784b6908574340500325552ee40c4ab4fc1241716ac79bee6b481cb\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.fbneo\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.fbneo/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-fbneo\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.fbneo: FinalBurn Neo GameClient for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.fceumm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.fceumm\"\nPKG_VERSION=\"0.0.1.45-Nexus\"\nPKG_SHA256=\"a61aec49a41b9ce9a6bb9f39b738afeb34eb8450f10725d829006947d5968790\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.fceumm\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.fceumm/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-fceumm\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.fceumm: FCEUmm emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.fmsx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.fmsx\"\nPKG_VERSION=\"6.0.0.33-Nexus\"\nPKG_SHA256=\"964d2761d0bfe9baccfba7a678f03a9dc83bbfecb5f6d0dbc2db7dca8afb0e62\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.fmsx\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.fmsx/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-fmsx\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.fmsx: fmsx for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.fsuae/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.fsuae\"\nPKG_VERSION=\"0.0.1.3-Matrix\"\nPKG_SHA256=\"24421d10b45ab85bc6f1ff08e1322551111b239939ff8358b90027c336619200\"\nPKG_REV=\"2\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.fsuae\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.fsuae/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-fsuae\"\nPKG_LONGDESC=\"game.libretro.fsuae: fsuae emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.fuse/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.fuse\"\nPKG_VERSION=\"1.6.0.31-Nexus\"\nPKG_SHA256=\"181dc924f7de6e38c5c8a1cc88942a9986147d1bdf96a3b95a620d20407c00ed\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.fuse\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.fuse/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-fuse\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.fuse: fuse for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.gambatte/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.gambatte\"\nPKG_VERSION=\"0.5.0.37-Nexus\"\nPKG_SHA256=\"8ca704c015eeb09de69c144dac5eb2b7ad9d548d4933d712c2b52aec514e428c\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.gambatte\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.gambatte/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-gambatte\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.gambatte: Gambatte emulator for Kodi\"\nPKG_IS_ADDON=\"yes\"\n\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.genplus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.genplus\"\nPKG_VERSION=\"1.7.4.42-Nexus\"\nPKG_SHA256=\"def4e7a226131bc9633485a0e3b5396ab8e13b5c802a9d00a51a3d1cf0fec4af\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.genplus\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.genplus/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-genplus\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.genplus: Genesis Plus GX emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.gw/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.gw\"\nPKG_VERSION=\"1.6.3.25-Nexus\"\nPKG_SHA256=\"4fb269094660a5f6bb43be8e81c9568f4093e4c9002e8437402a0e73e80ff653\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.gw\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.gw/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-gw\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.gw: gw for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.handy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.handy\"\nPKG_VERSION=\"0.97.0.32-Nexus\"\nPKG_SHA256=\"b7cb32e82013838ac0f01bbf1402082135028748272d0cf3c9c0404a01b01047\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.handy\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.handy/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-handy\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.handy: handy for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.hatari/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.hatari\"\nPKG_VERSION=\"1.8.0.31-Nexus\"\nPKG_SHA256=\"3be7578c10caab15b47e6dacb47f6dcf8ab35e2224048376c730f5c456f92584\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.hatari\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.hatari/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-hatari\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.hatari: hatari for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.mame2000/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.mame2000\"\nPKG_VERSION=\"0.37.0.28-Nexus\"\nPKG_SHA256=\"03b7318f66dffffa51430ff3891b7176fb1f60ea14b3697f090ffc51eb026945\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.mame2000\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.mame2000/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-mame2000\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.mame2000: MAME 2000 emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.mame2003/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.mame2003\"\nPKG_VERSION=\"0.78.0.50-Nexus\"\nPKG_SHA256=\"03a6d03a7af9ab2fde80c6a64bba7bd10164ad424f1210670982677535609ceb\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.mame2003\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.mame2003/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-mame2003\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.mame2003: MAME 2003 emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.mame2003_plus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.mame2003_plus\"\nPKG_VERSION=\"0.0.1.71-Nexus\"\nPKG_SHA256=\"5647a1b61a56b96446be92d7cfe665acfdef212f90696f9af7861d95cd9cf49b\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.mame2003_plus\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.mame2003_plus/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-mame2003_plus\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.mame2003_plus: MAME 2003 Plus emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.mame2010/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.mame2010\"\nPKG_VERSION=\"0.139.0.21-Nexus\"\nPKG_SHA256=\"fa9d9b36c50f1a760db683be986b96df57fee1ab6d232f8cfae8a2c7d9585b80\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.mame2010\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.mame2010/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-mame2010\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.mame2010: MAME emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.mame2015/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.mame2015\"\nPKG_VERSION=\"0.160.0.20-Nexus\"\nPKG_SHA256=\"9aa78c4e19acdc10d51658e11fd9d1adfa5ff77a5d3827a3c558f3eddb5d0c20\"\nPKG_ARCH=\"arm x86_64\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.mame2015\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.mame2015/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-mame2015\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.mame2015: MAME emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.mame2016/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.mame2016\"\nPKG_VERSION=\"0.174.0.18-Nexus\"\nPKG_SHA256=\"175ebe62956f5820c7992915e78b5a2dfd744002c09c2a3f308cd628ac914c83\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.mame2016\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.mame2016/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-mame2016\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.mame2016: MAME2016 emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\nPKG_ADDON_PROJECTS=\"AMLG12 Generic RK3399\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.mesen/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.mesen\"\nPKG_VERSION=\"0.9.9.26-Nexus\"\nPKG_SHA256=\"b7b36e5364e50d92c9bb9ea90b825a463f217701e16e11b5e16d625a0abef82c\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.mesen\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.mesen/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-mesen\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.mesen: mesen for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.meteor/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.meteor\"\nPKG_VERSION=\"1.4.0.19-Nexus\"\nPKG_SHA256=\"fd3ef5d378e1177b1fda3d92ee74523413c5d248125fbcf1e2f4b7a7cf861f77\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.meteor\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.meteor/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-meteor\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.meteor: Meteor GBA emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.mgba/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.mgba\"\nPKG_VERSION=\"0.11.0.40-Nexus\"\nPKG_SHA256=\"3f6f5b0c7e537b777dbabcd23076db97cc6c968398d407ac2d16459bba21ffc3\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.mgba\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.mgba/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-mgba\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.mgba: mGBA emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.mrboom/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.mrboom\"\nPKG_VERSION=\"5.2.0.146-Nexus\"\nPKG_SHA256=\"346491ca2266f952383edfbe31cfb901dca1f25920ca63a5e910c06bce4de641\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.mrboom\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.mrboom/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-mrboom\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.mrboom: mrboom for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.nestopia/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.nestopia\"\nPKG_VERSION=\"1.52.0.34-Nexus\"\nPKG_SHA256=\"9ae12a7f2f0043c80f426272161743b230acf6f051f344d08123b34e193409b1\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.nestopia\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.nestopia/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-nestopia\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.nestopia: Nestopia emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.nx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.nx\"\nPKG_VERSION=\"1.0.0.33-Nexus\"\nPKG_SHA256=\"2f71c6f162b6e8d197e8a17f6d0d7ba9eb9c093e3ff47913955b3594a672b180\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.nx\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.nx/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-nx\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.nx: nx for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.o2em/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.o2em\"\nPKG_VERSION=\"1.18.0.36-Nexus\"\nPKG_SHA256=\"c2fa67b2d504512bf6177091957c69a7b52fc848721ee1941301ab19b6d435b6\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.o2em\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.o2em/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-o2em\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.o2em: o2em for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.opera/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.opera\"\nPKG_VERSION=\"1.0.0.33-Nexus\"\nPKG_SHA256=\"915c9b8a969ac980880c38b4c2b23d3742221175de377130d1f995089d6292d8\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.opera\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.opera/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-opera\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.opera: Port of 4DO/libfreedo for Kodi.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.pcsx-rearmed/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.pcsx-rearmed\"\nPKG_VERSION=\"23.0.0.45-Nexus\"\nPKG_SHA256=\"1e55d9486aeb51568594bec841b3c3fcb5c29bcd21a4b2dbb813b3460a878133\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.pcsx-rearmed\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.pcsx-rearmed/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-pcsx-rearmed\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.pcsx-rearmed: PCSX Rearmed for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.picodrive/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.picodrive\"\nPKG_VERSION=\"1.98.0.26-Matrix\"\nPKG_SHA256=\"d427d69ac7814613643d42a6e5d9790ce937479785abd45d980d5dedf1e9856f\"\nPKG_REV=\"2\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.picodrive\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.picodrive/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-picodrive\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.picodrive: picodrive for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.pokemini/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.pokemini\"\nPKG_VERSION=\"0.60.0.33-Nexus\"\nPKG_SHA256=\"8312b1df299c8477be119a4035201ec3e9aefc96364e242e2a619233312e0af6\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.pokemini\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.pokemini/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-pokemini\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.pokemini: PokeMini emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.prboom/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.prboom\"\nPKG_VERSION=\"2.5.0.37-Nexus\"\nPKG_SHA256=\"ecd235f78184319f39843a1e1ac63dc3de2bb23d07663b00dfe78636cda54deb\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.prboom\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.prboom/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-prboom\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.prboom: prboom for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.prosystem/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.prosystem\"\nPKG_VERSION=\"1.3.0.34-Nexus\"\nPKG_SHA256=\"8f3e544e802fed37f5dc4e9a67ec0f64f870f05442c32a9055d453297e2c6b09\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.prosystem\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.prosystem/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-prosystem\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.prosystem: Prosystem for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.quicknes/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.quicknes\"\nPKG_VERSION=\"1.0.0.35-Nexus\"\nPKG_SHA256=\"c1de5817baf6bb4365922db4c3ac9cf651d42cdaf50ecdab6ae3d83bb75fcd87\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.quicknes\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.quicknes/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-quicknes\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.quicknes: QuickNES emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.sameboy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.sameboy\"\nPKG_VERSION=\"0.15.4.33-Nexus\"\nPKG_SHA256=\"664694fe34c59f5f4384633ec61d194ca659ccd9f37a493e520c4ce7a18fc132\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.sameboy\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.sameboy/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-sameboy\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.sameboy: SameBoy emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.scummvm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.scummvm\"\nPKG_VERSION=\"2.6.1.31-Nexus\"\nPKG_SHA256=\"4157b119c1a7aead19511fc75e23d2f70553b9cf82208812b225637c98f07eab\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.scummvm\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.scummvm/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-scummvm\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.scummvm: scummvm for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n\npre_configure_target() {\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-Wl,--as-needed||\")\n}\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.snes9x/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.snes9x\"\nPKG_VERSION=\"1.61.0.38-Nexus\"\nPKG_SHA256=\"40b29c0ace0131712f2580901b59812b6679b6fdba0943f567c7c99e9773d64a\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.snes9x\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.snes9x/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-snes9x\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.snes9x: snes9x for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.snes9x2002/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.snes9x2002\"\nPKG_VERSION=\"7.2.0.34-Nexus\"\nPKG_SHA256=\"f153feb2c326b60dba91af87fd0ac0a1ac31d563e12fe98c4fe942f07ed1e89b\"\nPKG_REV=\"1\"\n# neon optimizations make it only useful for arm\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.snes9x2002\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.snes9x2002/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-snes9x2002\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.snes9x2002: snes9x2002 for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.snes9x2010/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.snes9x2010\"\nPKG_VERSION=\"1.52.4.35-Nexus\"\nPKG_SHA256=\"afb6004edbf9ee2a4deebf6c453f732aaf918b2d8aa8fcb255ed3c4d54574fe1\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.snes9x2010\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.snes9x2010/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-snes9x2010\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.snes9x2010: snes9x2010 for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.stella/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.stella\"\nPKG_VERSION=\"3.9.3.38-Nexus\"\nPKG_SHA256=\"0918e2294b9f904fc4b34ed9d53a02bc58c18a023782f8c90c17145b221b4a97\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.stella\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.stella/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-stella\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.stella: Stella emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.tgbdual/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.tgbdual\"\nPKG_VERSION=\"0.8.3.28-Nexus\"\nPKG_SHA256=\"7e6eb3f14c7929c51e0ae326615a0a99ba47eee22c85351dee0a3c189ed670e9\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.tgbdual\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.tgbdual/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-tgbdual\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.tgbdual: tgbdual for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.tyrquake/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.tyrquake\"\nPKG_VERSION=\"0.62.0.35-Nexus\"\nPKG_SHA256=\"9b6a0fbdf4e59e4479be179c0dc915a805b06c14b0006da9d15879811b4afc9e\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.tyrquake\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.tyrquake/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-tyrquake\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.tyrquake: tyrquake for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.uae/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.uae\"\nPKG_VERSION=\"4.9.1.49-Nexus\"\nPKG_SHA256=\"531af6e134c2dac0487ad7eb956cb7fa833cdb52684b383b64587e3a292336ac\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.uae\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.uae/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-uae\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.uae: uae emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.uae4arm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.uae4arm\"\nPKG_VERSION=\"0.3.0.3-Nexus\"\nPKG_SHA256=\"466059ef58adbf49e9c15fd42872e9167cec97245d42df5b54f4aec7d2f13ec0\"\nPKG_REV=\"1\"\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.uae4arm\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.uae4arm/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-uae4arm\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.uae4arm: uae4arm emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.vba-next/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.vba-next\"\nPKG_VERSION=\"1.0.2.27-Nexus\"\nPKG_SHA256=\"6e8f6746b6ecd245895fcf34875b101939c60378a3f7ac4c78ac9a60443c6416\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.vba-next\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.vba-next/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-vba-next\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.vba-next: VBA-Next emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.vbam/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.vbam\"\nPKG_VERSION=\"2.1.3.30-Nexus\"\nPKG_SHA256=\"c10536a5658bfbd3b94bc4a2c85c28a40f053decea5f13fbdf5e9b97df710402\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.vbam\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.vbam/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-vbam\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.vbam: VBA-M emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.vecx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.vecx\"\nPKG_VERSION=\"1.2.0.33-Nexus\"\nPKG_SHA256=\"13f552b61d83062f45cee980ab0bc1a8362db3066b0421ba04eb7b507f5b2652\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.vecx\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.vecx/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-vecx\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.vecx: vecx for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.vice/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.vice\"\nPKG_VERSION=\"3.5.0.37-Nexus\"\nPKG_SHA256=\"4580ae6066d351e65752c506175a16bf8603db614a754a456a995637fbf70d37\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.vice\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.vice/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-vice\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.vice: vice emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.virtualjaguar/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.virtualjaguar\"\nPKG_VERSION=\"2.1.0.33-Nexus\"\nPKG_SHA256=\"04386e8ab5a30831545658670054295b117670dceeea771d9fa0fa82f6064908\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.virtualjaguar\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.virtualjaguar/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-virtualjaguar\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.virtualjaguar: VirtualJaguar for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/game.libretro.yabause/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"game.libretro.yabause\"\nPKG_VERSION=\"0.9.15.43-Nexus\"\nPKG_SHA256=\"c485c7ff558e16260c558aac6f6a074ba95fd51b7af34b4e52f09752c96f90a8\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/game.libretro.yabause\"\nPKG_URL=\"https://github.com/kodi-game/game.libretro.yabause/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libretro-yabause\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"game.libretro.yabause: Yabause emulator for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.gameclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/imagedecoder.heif/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"imagedecoder.heif\"\nPKG_VERSION=\"20.1.0-Nexus\"\nPKG_SHA256=\"17f50aada11528c02db2ff3871a355c89709ab7e2a5e6b5e33957b790cf207ff\"\nPKG_REV=\"6\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/imagedecoder.heif\"\nPKG_URL=\"https://github.com/xbmc/imagedecoder.heif/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libheif tinyxml2\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"imagedecoder.heif\"\nPKG_LONGDESC=\"imagedecoder.heif\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.imagedecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/imagedecoder.mpo/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"imagedecoder.mpo\"\nPKG_VERSION=\"20.1.0-Nexus\"\nPKG_SHA256=\"a6f38f95e5e844f75365ae083ca0a78c012bb4dc670770b3dd5d99160a64187f\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/imagedecoder.mpo\"\nPKG_URL=\"https://github.com/xbmc/imagedecoder.mpo/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libjpeg-turbo tinyxml2\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"imagedecoder.mpo\"\nPKG_LONGDESC=\"imagedecoder.mpo\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.imagedecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/imagedecoder.raw/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"imagedecoder.raw\"\nPKG_VERSION=\"20.1.0-Nexus\"\nPKG_SHA256=\"6235c0be431bbb814b3e464753af9ad17febf6001f77cbf030e6c6e1cdc41a04\"\nPKG_REV=\"6\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/imagedecoder.raw\"\nPKG_URL=\"https://github.com/xbmc/imagedecoder.raw/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libraw\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"imagedecoder.raw\"\nPKG_LONGDESC=\"imagedecoder.raw\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.imagedecoder\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/inputstream.adaptive/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"inputstream.adaptive\"\nPKG_VERSION=\"20.3.16-Nexus\"\nPKG_SHA256=\"4651c022395f92906be40e8c923c9f90c3e9190d9dafee9e229ca1846605c5c5\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/inputstream.adaptive\"\nPKG_URL=\"https://github.com/xbmc/inputstream.adaptive/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform bento4 expat\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"inputstream.adaptive\"\nPKG_LONGDESC=\"inputstream.adaptive\"\n\nPKG_IS_ADDON=\"yes\"\n\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ] || [ \"${TARGET_ARCH}\" = \"arm\" ]; then\n  PKG_DEPENDS_TARGET+=\" nss\"\nfi\n\naddon() {\n  install_binary_addon ${PKG_ADDON_ID}\n\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}\n  cp -P ${PKG_BUILD}/.${TARGET_NAME}/wvdecrypter/libssd_wv.so ${ADDON_BUILD}/${PKG_ADDON_ID}\n}\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/inputstream.ffmpegdirect/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"inputstream.ffmpegdirect\"\nPKG_VERSION=\"20.5.0-Nexus\"\nPKG_SHA256=\"a849b6b4d5ce740ec3552d244acc4c7a4d64792358428f5154236052473d5734\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL2+\"\nPKG_SITE=\"https://github.com/xbmc/inputstream.ffmpegdirect\"\nPKG_URL=\"https://github.com/xbmc/inputstream.ffmpegdirect/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform bzip2 ffmpeg gmp libpng libxml2 xz zlib zvbi\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"inputstream.ffmpegdirect\"\nPKG_LONGDESC=\"InputStream Client for streams that can be opened by FFmpeg's libavformat such as plain TS, HLS and DASH (without DRM) streams.\"\n\nPKG_IS_ADDON=\"yes\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/inputstream.rtmp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"inputstream.rtmp\"\nPKG_VERSION=\"20.3.0-Nexus\"\nPKG_SHA256=\"6a6129dca822e1447c0945ddf9cc6dbff1203dab313395d27efb4669a0ef3370\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/inputstream.rtmp\"\nPKG_URL=\"https://github.com/xbmc/inputstream.rtmp/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform rtmpdump\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"inputstream.rtmp\"\nPKG_LONGDESC=\"inputstream.rtmp\"\n\nPKG_IS_ADDON=\"yes\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/peripheral.joystick/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"peripheral.joystick\"\nPKG_VERSION=\"20.1.14-Nexus\"\nPKG_SHA256=\"8c3dde851e45549d13ca3fcead9c27c440dfe070d68fb473ae71c522bc54753a\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/peripheral.joystick\"\nPKG_URL=\"https://github.com/xbmc/peripheral.joystick/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform p8-platform systemd\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"peripheral.joystick: Joystick support in Kodi\"\nPKG_LONGDESC=\"peripheral.joystick provides joystick support and button mapping\"\nPKG_BUILD_FLAGS=\"+lto\"\n\nPKG_IS_ADDON=\"embedded\"\nPKG_ADDON_TYPE=\"kodi.peripheral\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/peripheral.xarcade/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"peripheral.xarcade\"\nPKG_VERSION=\"20.1.3-Nexus\"\nPKG_SHA256=\"e6be386ebba44e214b91784ba6e1560020daac82024c18bea7be4719340b12bd\"\nPKG_REV=\"3\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-game/peripheral.xarcade\"\nPKG_URL=\"https://github.com/kodi-game/peripheral.xarcade/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"X-Arcade Tankstick support for Kodi\"\nPKG_LONGDESC=\"X-Arcade Tankstick support for Kodi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.peripheral\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.argustv/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.argustv\"\nPKG_VERSION=\"20.5.0-Nexus\"\nPKG_SHA256=\"c4b18a0abf4ba0a797509d79c4291c4e69589a6482c6ec85f5d9bdae63ea3f35\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.argustv\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.argustv/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform jsoncpp\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.argustv\"\nPKG_LONGDESC=\"pvr.argustv\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n\npre_configure_target() {\n  CXXFLAGS+=\" -Wno-narrowing\"\n}\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.demo/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.demo\"\nPKG_VERSION=\"20.5.0-Nexus\"\nPKG_SHA256=\"8f4d8f06e7dbeefdf6148abb06347c4d92b9edd4a818c7efd1e204a65a9556d2\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.demo\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.demo/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform tinyxml2\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.demo\"\nPKG_LONGDESC=\"pvr.demo\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.dvblink/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.dvblink\"\nPKG_VERSION=\"20.3.0-Nexus\"\nPKG_SHA256=\"71a9fa64bdf7d784afc28f8b686fcdc00d9fea536c2aad1464e76e3b7648ed41\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.dvblink\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.dvblink/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform tinyxml2\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.dvblink\"\nPKG_LONGDESC=\"pvr.dvblink\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.dvbviewer/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.dvbviewer\"\nPKG_VERSION=\"20.4.0-Nexus\"\nPKG_SHA256=\"dc79db0486c7ef75b4b23c4dfe94115cb12e1903c3700ef4eef04fc517fcd039\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.dvbviewer\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.dvbviewer/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.dvbviewer\"\nPKG_LONGDESC=\"pvr.dvbviewer\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.filmon/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.filmon\"\nPKG_VERSION=\"20.3.0-Nexus\"\nPKG_SHA256=\"dfd2a7b64d2b647ba3f7bfba05676a593c3284e2298becfed68b82e441a69b33\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.filmon\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.filmon/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform jsoncpp\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.filmon\"\nPKG_LONGDESC=\"pvr.filmon\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.freebox/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.freebox\"\nPKG_VERSION=\"20.3.2-Nexus\"\nPKG_SHA256=\"8d84012d055874e703627e90351cf9889e883d72db05c4bcacf6d8fef0ba4c80\"\nPKG_REV=\"3\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/aassif/pvr.freebox\"\nPKG_URL=\"https://github.com/aassif/pvr.freebox/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform nlohmann-json openssl zlib\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.freebox\"\nPKG_LONGDESC=\"pvr.freebox\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.hdhomerun/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.hdhomerun\"\nPKG_VERSION=\"20.4.0-Nexus\"\nPKG_SHA256=\"3872265e00fc748ba327aaa91beece747936f55d16356051cdd04b0b70a353c0\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.hdhomerun\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.hdhomerun/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform jsoncpp libhdhomerun\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.hdhomerun\"\nPKG_LONGDESC=\"pvr.hdhomerun\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.hts/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.hts\"\nPKG_VERSION=\"20.7.0-Nexus\"\nPKG_SHA256=\"15d68d928e0794fb42fd0f3483403fb0290c5c94aa3d3b648a8a2f8e8316dfff\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.hts\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.hts/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.hts\"\nPKG_LONGDESC=\"pvr.hts\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.hts/patches/pvr.hts-0001-set-speed.patch",
    "content": "From 9a7501d5fa1daf702597c1f3c5dc506f72ade17e Mon Sep 17 00:00:00 2001\nFrom: afl1 <afl2001@gmail.com>\nDate: Sun, 24 Jun 2018 23:45:37 +0200\nSubject: [PATCH] pvr.hts: allow only positive speed to fix timeshift rewind\n\n---\n src/tvheadend/Subscription.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/src/tvheadend/Subscription.cpp b/src/tvheadend/Subscription.cpp\nindex e6d898c..d6dfc59 100644\n--- a/src/tvheadend/Subscription.cpp\n+++ b/src/tvheadend/Subscription.cpp\n@@ -179,7 +179,7 @@ bool Subscription::SendSeek(std::unique_lock<std::recursive_mutex>& lock, double\n   htsmsg_add_u32(m, \"subscriptionId\", GetId());\n   htsmsg_add_s64(m, \"time\", static_cast<int64_t>(time * 1000LL));\n   htsmsg_add_u32(m, \"absolute\", 1);\n-  Logger::Log(LogLevel::LEVEL_DEBUG, \"demux send seek %d\", time);\n+  Logger::Log(LogLevel::LEVEL_DEBUG, \"demux send seek %0.3f\", time / 1000.0);\n \n   /* Send and Wait */\n   m = m_conn.SendAndWait(lock, \"subscriptionSeek\", m);\n@@ -196,7 +196,7 @@ void Subscription::SendSpeed(std::unique_lock<std::recursive_mutex>& lock,\n {\n   /* We don't want to change the speed when restarting a subscription */\n   if (!restart)\n-    SetSpeed(speed);\n+    SetSpeed(std::abs(speed));\n \n   /* Build message */\n   htsmsg_t* m = htsmsg_create_map();\n-- \n2.30.0\n\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.iptvsimple/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.iptvsimple\"\nPKG_VERSION=\"20.13.0-Nexus\"\nPKG_SHA256=\"9edf800d7d5e755c92e9e8f6d3771a74cf3fec23b3aaec5b8535f1a579941a5b\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.iptvsimple\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.iptvsimple/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform pugixml zlib xz\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.iptvsimple\"\nPKG_LONGDESC=\"pvr.iptvsimple\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.mediaportal.tvserver/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.mediaportal.tvserver\"\nPKG_VERSION=\"20.3.0-Nexus\"\nPKG_SHA256=\"a61efdadb56c65e081f8b2e99f2d5b32b3c932ca1954243548710be57c8b70b8\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.mediaportal.tvserver\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.mediaportal.tvserver/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.mediaportal.tvserver\"\nPKG_LONGDESC=\"pvr.mediaportal.tvserver\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n\npre_configure_target() {\n  CXXFLAGS+=\" -Wno-narrowing -DXLOCALE_NOT_USED\"\n}\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.mythtv/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.mythtv\"\nPKG_VERSION=\"20.5.10-Nexus\"\nPKG_SHA256=\"eb21e185d1333a8696565138bc58df3d37970c9a3615193396e9f296a56a24c4\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/janbar/pvr.mythtv\"\nPKG_URL=\"https://github.com/janbar/pvr.mythtv/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform zlib\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.mythtv\"\nPKG_LONGDESC=\"pvr.mythtv\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.nextpvr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.nextpvr\"\nPKG_VERSION=\"20.4.3-Nexus\"\nPKG_SHA256=\"752dff532a277797f3fefc1ced7fea6efb8d92982d9040c4080c1e6dbab203a0\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.nextpvr\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.nextpvr/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform tinyxml2\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.nextpvr\"\nPKG_LONGDESC=\"pvr.nextpvr\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n\npre_configure_target() {\n  CXXFLAGS+=\" -Wno-narrowing\"\n}\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.njoy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.njoy\"\nPKG_VERSION=\"20.3.0-Nexus\"\nPKG_SHA256=\"0e8dc8ddce7830878c816da0836bdf5558c0dd388c48019012735a518eeefb04\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.njoy\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.njoy/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.njoy\"\nPKG_LONGDESC=\"pvr.njoy\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.octonet/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.octonet\"\nPKG_VERSION=\"20.3.0-Nexus\"\nPKG_SHA256=\"cc83ada3b3d1dbf3d42fa41f2b221c640cdc9fd505a1c76e7b479f99fe1ec8c5\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/DigitalDevices/pvr.octonet\"\nPKG_URL=\"https://github.com/DigitalDevices/pvr.octonet/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform jsoncpp\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"A pvr plugin for DigitalDevices Octonet Sat>IP servers\"\nPKG_LONGDESC=\"A pvr plugin for DigitalDevices Octonet Sat>IP servers\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.pctv/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.pctv\"\nPKG_VERSION=\"20.4.0-Nexus\"\nPKG_SHA256=\"c99d3ef085c4900e0c03e5e37047dc136efced78ed245d07bc286468a31e8a65\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.pctv\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.pctv/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform jsoncpp\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.pctv\"\nPKG_LONGDESC=\"pvr.pctv\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.plutotv/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.plutotv\"\nPKG_VERSION=\"20.3.1a-Nexus\"\nPKG_SHA256=\"11505556200029a48a293e97f94e0469a5f78580d0e56d5d0a1da05d61f0f5b5\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.plutotv\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.plutotv/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform rapidjson\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.plutotv\"\nPKG_LONGDESC=\"pvr.plutotv\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.sledovanitv.cz/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.sledovanitv.cz\"\nPKG_VERSION=\"20.7.0-Nexus\"\nPKG_SHA256=\"de582551019b6659909d1ba7dd623070d7290c4c8f90d30282e2ec4c39b9b0be\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/palinek/pvr.sledovanitv.cz\"\nPKG_URL=\"https://github.com/palinek/pvr.sledovanitv.cz/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform jsoncpp\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.sledovanitv.cz\"\nPKG_LONGDESC=\"pvr.sledovanitv.cz\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.stalker/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.stalker\"\nPKG_VERSION=\"20.3.1-Nexus\"\nPKG_SHA256=\"8fdd4ab4cf28d7255550b4c351a397b7ce8eb1aa1f12e93bce7d61a951fbd6f3\"\nPKG_REV=\"4\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.stalker\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.stalker/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform jsoncpp tinyxml\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.stalker\"\nPKG_LONGDESC=\"pvr.stalker\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.teleboy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.teleboy\"\nPKG_VERSION=\"20.3.4-Nexus\"\nPKG_SHA256=\"199730d6023a39a9227b29b3ac100c06fc40fbb6c0adf65c3a35ea6449ffc5ba\"\nPKG_REV=\"3\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/rbuehlma/pvr.teleboy\"\nPKG_URL=\"https://github.com/rbuehlma/pvr.teleboy/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform rapidjson\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.teleboy\"\nPKG_LONGDESC=\"pvr.teleboy\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.vbox/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.vbox\"\nPKG_VERSION=\"20.4.2-Nexus\"\nPKG_SHA256=\"04c50eba71426f062339491e7567545ec8c910b17c7055b28285eab14f26ca6f\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.vbox\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.vbox/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform tinyxml2\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.vbox\"\nPKG_LONGDESC=\"pvr.vbox\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.vdr.vnsi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.vdr.vnsi\"\nPKG_VERSION=\"20.4.1-Nexus\"\nPKG_SHA256=\"f26e2a9f1e9d83c5b44a8875b1f9cd37a0dbe59faf08002f083a4db95c9f84e0\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.vdr.vnsi\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.vdr.vnsi/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.vdr.vnsi\"\nPKG_LONGDESC=\"pvr.vdr.vnsi\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n\nif [ \"${OPENGLES_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\nfi\n\nif [ \"${OPENGL_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGL}\"\nfi\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.vuplus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.vuplus\"\nPKG_VERSION=\"20.5.1-Nexus\"\nPKG_SHA256=\"467363d7015d426f05fac3f514222d7ec03aa4b61a0935fd7f00e95e9c443514\"\nPKG_REV=\"2\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.vuplus\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.vuplus/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform nlohmann-json\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.vuplus\"\nPKG_LONGDESC=\"pvr.vuplus\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.waipu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.waipu\"\nPKG_VERSION=\"20.11.0-Nexus\"\nPKG_SHA256=\"f43a7ac762b2c8bb7c2a66dc7d2a577fad92119bb4418867ce22369b96b18f8c\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/flubshi/pvr.waipu\"\nPKG_URL=\"https://github.com/flubshi/pvr.waipu/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform rapidjson\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.waipu\"\nPKG_LONGDESC=\"pvr.waipu\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.wmc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.wmc\"\nPKG_VERSION=\"20.3.0-Nexus\"\nPKG_SHA256=\"f045d871789ef3d36e1a7c7361ea35be4e14a395e75446519e937be70d2433b4\"\nPKG_REV=\"5\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/kodi-pvr/pvr.wmc\"\nPKG_URL=\"https://github.com/kodi-pvr/pvr.wmc/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.wmc\"\nPKG_LONGDESC=\"pvr.wmc\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/pvr.zattoo/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pvr.zattoo\"\nPKG_VERSION=\"20.3.14-Nexus\"\nPKG_SHA256=\"b6f5205caede6aaf57c1eab8206c5a5b3aaa6b5d8bda862d983ca53150cdf14a\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/rbuehlma/pvr.zattoo\"\nPKG_URL=\"https://github.com/rbuehlma/pvr.zattoo/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform rapidjson sqlite tinyxml2\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"pvr.zattoo\"\nPKG_LONGDESC=\"pvr.zattoo\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.pvrclient\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/screensaver.asteroids/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"screensaver.asteroids\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"492d826efa7a252ce62a1bebf075fe9b0c0cf452929f4cd6f228003f6e445b82\"\nPKG_REV=\"3\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/screensaver.asteroids\"\nPKG_URL=\"https://github.com/xbmc/screensaver.asteroids/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform glm\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"screensaver.asteroids\"\nPKG_LONGDESC=\"screensaver.asteroids\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.ui.screensaver\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/screensaver.asterwave/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"screensaver.asterwave\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"2c07219218fad17ef285577ff8309f7b6503302e52048d12ee20459dbcedf89c\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/screensaver.asterwave\"\nPKG_URL=\"https://github.com/xbmc/screensaver.asterwave/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform glm\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"screensaver.asterwave\"\nPKG_LONGDESC=\"screensaver.asterwave\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.ui.screensaver\"\n\nif [ \"${OPENGL}\" = \"no\" ]; then\n  exit 0\nfi\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/screensaver.biogenesis/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"screensaver.biogenesis\"\nPKG_VERSION=\"20.1.0-Nexus\"\nPKG_SHA256=\"dfc291fbafe16444f3a5a5f886ba562b5d7b16ed77f4302017fbbe5f5ef9a82d\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/screensaver.biogenesis\"\nPKG_URL=\"https://github.com/xbmc/screensaver.biogenesis/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"screensaver.biogenesis\"\nPKG_LONGDESC=\"screensaver.biogenesis\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.ui.screensaver\"\n\nif [ \"${OPENGL}\" = \"no\" ]; then\n  exit 0\nfi\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/screensaver.greynetic/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"screensaver.greynetic\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"e060f69a7c403a5d7bb59058dc38e8c6a6ea1aa7bc9b82f8ffa7c5e94ede0866\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/screensaver.greynetic\"\nPKG_URL=\"https://github.com/xbmc/screensaver.greynetic/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform glm\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"screensaver.greynetic\"\nPKG_LONGDESC=\"screensaver.greynetic\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.ui.screensaver\"\n\nif [ \"${OPENGL}\" = \"no\" ]; then\n  exit 0\nfi\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/screensaver.matrixtrails/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"screensaver.matrixtrails\"\nPKG_VERSION=\"20.1.0-Nexus\"\nPKG_SHA256=\"929af1a5a08399449497a13c2eb9761b4770b41445a13ee61d78b82677978ea5\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/screensaver.matrixtrails\"\nPKG_URL=\"https://github.com/xbmc/screensaver.matrixtrails/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"screensaver.matrixtrails\"\nPKG_LONGDESC=\"screensaver.matrixtrails\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.ui.screensaver\"\n\nif [ \"${OPENGL}\" = \"no\" ]; then\n  exit 0\nfi\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/screensaver.pingpong/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"screensaver.pingpong\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"72b3c9be5b65afe7fbc6d496eb7700786d88811bfafcd131a3219a646d30805d\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/screensaver.pingpong\"\nPKG_URL=\"https://github.com/xbmc/screensaver.pingpong/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform glm\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"screensaver.pingpong\"\nPKG_LONGDESC=\"screensaver.pingpong\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.ui.screensaver\"\n\nif [ \"${OPENGL}\" = \"no\" ]; then\n  exit 0\nfi\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/screensaver.pyro/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"screensaver.pyro\"\nPKG_VERSION=\"20.1.0-Nexus\"\nPKG_SHA256=\"ec981d070cccdfaa9116244e80a63d86c37f67dccd11aacfcc66dcfcbb608ce1\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/screensaver.pyro\"\nPKG_URL=\"https://github.com/xbmc/screensaver.pyro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"screensaver.pyro\"\nPKG_LONGDESC=\"screensaver.pyro\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.ui.screensaver\"\n\nif [ \"${OPENGL}\" = \"no\" ]; then\n  exit 0\nfi\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/screensaver.shadertoy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"screensaver.shadertoy\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"91500d2c4eb97390d77fbaf5700ee472c41afa30cb76c6ecbe7e2683a14795fc\"\nPKG_REV=\"2\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/screensaver.shadertoy\"\nPKG_URL=\"https://github.com/xbmc/screensaver.shadertoy/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform glm\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"screensaver.shadertoy\"\nPKG_LONGDESC=\"screensaver.shadertoy\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.ui.screensaver\"\n\nif [ ! \"${OPENGL}\" = \"no\" ]; then\n# for OpenGL (GLX) support\n  PKG_DEPENDS_TARGET+=\" ${OPENGL} glew\"\nfi\n\nif [ \"${OPENGLES_SUPPORT}\" = yes ]; then\n# for OpenGL-ES support\n  PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\nfi\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/screensaver.stars/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"screensaver.stars\"\nPKG_VERSION=\"20.1.0-Nexus\"\nPKG_SHA256=\"5ea0d19c3ef94e9603a0e06c78ae01cd6f9227da7b505eaa7d4527ca6018ea03\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/screensaver.stars\"\nPKG_URL=\"https://github.com/xbmc/screensaver.stars/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"screensaver.stars\"\nPKG_LONGDESC=\"screensaver.stars\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.ui.screensaver\"\n\nif [ \"${OPENGL}\" = \"no\" ]; then\n  exit 0\nfi\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/vfs.libarchive/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vfs.libarchive\"\nPKG_VERSION=\"20.3.0-Nexus\"\nPKG_SHA256=\"06be9bfcda3e676e0757ea9602351d67f2bf0aa9aa9e408b14d947772a615e4f\"\nPKG_REV=\"3\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/vfs.libarchive\"\nPKG_URL=\"https://github.com/xbmc/vfs.libarchive/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform bzip2 libarchive lz4 lzo xz zlib\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"vfs.libarchive\"\nPKG_LONGDESC=\"vfs.libarchive\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.vfs\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/vfs.sftp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vfs.sftp\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"66f139d3d06c06d03ceccdcee12b79d3886bd0ea7aec662341736f1c9bdd63e2\"\nPKG_REV=\"3\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/xbmc/vfs.sftp\"\nPKG_URL=\"https://github.com/xbmc/vfs.sftp/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libssh\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"vfs.sftp\"\nPKG_LONGDESC=\"vfs.sftp\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"kodi.vfs\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/visualization.fishbmc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"visualization.fishbmc\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"168788d7cd292edf9c13c0e0e0148f19b2ecd35edd8f65f24240dff99f01677a\"\nPKG_REV=\"6\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/visualization.fishbmc\"\nPKG_URL=\"https://github.com/xbmc/visualization.fishbmc/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform glm\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"visualization.fishbmc\"\nPKG_LONGDESC=\"visualization.fishbmc\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.player.musicviz\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/visualization.goom/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"visualization.goom\"\nPKG_VERSION=\"20.1.1-Nexus\"\nPKG_SHA256=\"75102a8c3f066a889493b77fbe26070be78c6dff8e7d44ebda89295ddb2da3b0\"\nPKG_REV=\"4\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/visualization.goom\"\nPKG_URL=\"https://github.com/xbmc/visualization.goom/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform glm\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"visualization.goom\"\nPKG_LONGDESC=\"visualization.goom\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.player.musicviz\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/visualization.matrix/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"visualization.matrix\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"f0b76edf45df7161d8525fa2ba623dee64ca66d515342e942100dc46c8220553\"\nPKG_REV=\"4\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/visualization.matrix\"\nPKG_URL=\"https://github.com/xbmc/visualization.matrix/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform glm\"\nPKG_SECTION=\"\"\nPKG_LONGDESC=\"visualization.matrix\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.player.musicviz\"\n\nif [ ! \"${OPENGL}\" = \"no\" ]; then\n  # for OpenGL (GLX) support\n  PKG_DEPENDS_TARGET+=\" ${OPENGL} glew\"\nfi\n\nif [ \"${OPENGLES_SUPPORT}\" = yes ]; then\n  # for OpenGL-ES support\n  PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\nfi\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/visualization.pictureit/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"visualization.pictureit\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"9d211b5611db09c0e27707c2200d3d0cfa5d18d2fd7705509f7dcd6601ac1985\"\nPKG_REV=\"6\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kodi.tv\"\nPKG_URL=\"https://github.com/linuxwhatelse/visualization.pictureit/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform glm\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"visualization.pictureit\"\nPKG_LONGDESC=\"visualization.pictureit\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.player.musicviz\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/visualization.projectm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"visualization.projectm\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"42599b0093ebc6730c3190ce28036a87042814af830441f3cb28ef11676277ae\"\nPKG_REV=\"1\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/visualization.projectm\"\nPKG_URL=\"https://github.com/xbmc/visualization.projectm/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform libprojectM\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"visualization.projectm\"\nPKG_LONGDESC=\"visualization.projectm\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.player.musicviz\"\n\nif [ \"${OPENGL}\" = \"no\" ]; then\n  exit 0\nfi\n\npre_configure_target() {\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-Wl,--as-needed||\")\n}\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/visualization.shadertoy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"visualization.shadertoy\"\nPKG_VERSION=\"20.3.0-Nexus\"\nPKG_SHA256=\"2f97a34f74ee3e3e1d9fe8cfd37796564f8f88eb4c07d60b27ff635d64a5a724\"\nPKG_REV=\"4\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/visualization.shadertoy\"\nPKG_URL=\"https://github.com/xbmc/visualization.shadertoy/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform glm\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"visualization.shadertoy\"\nPKG_LONGDESC=\"visualization.shadertoy\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.player.musicviz\"\n\nif [ ! \"${OPENGL}\" = \"no\" ]; then\n# for OpenGL (GLX) support\n  PKG_DEPENDS_TARGET+=\" ${OPENGL} glew\"\nfi\n\nif [ \"${OPENGLES_SUPPORT}\" = yes ]; then\n# for OpenGL-ES support\n  PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\nfi\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/visualization.spectrum/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"visualization.spectrum\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"1c405ea9b6f43ba5f24df13ebce12cb428369279336deb97790917aa675c809f\"\nPKG_REV=\"4\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/visualization.spectrum\"\nPKG_URL=\"https://github.com/xbmc/visualization.spectrum/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform glm\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"visualization.spectrum\"\nPKG_LONGDESC=\"visualization.spectrum\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.player.musicviz\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/visualization.starburst/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"visualization.starburst\"\nPKG_VERSION=\"20.2.0-Nexus\"\nPKG_SHA256=\"0d63b38ba8d5b3bac542546b1ecfb7d722b79652da485d75b22086e26ef4f825\"\nPKG_REV=\"4\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/visualization.starburst\"\nPKG_URL=\"https://github.com/xbmc/visualization.starburst/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform glm\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"visualization.starburst\"\nPKG_LONGDESC=\"visualization.starburst\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.player.musicviz\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-binary-addons/visualization.waveform/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"visualization.waveform\"\nPKG_VERSION=\"20.2.1-Nexus\"\nPKG_SHA256=\"865e72a5f2ed8fd53469518280cbe26f9516467d091009fe5e012ea0d85d5edd\"\nPKG_REV=\"4\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/visualization.waveform\"\nPKG_URL=\"https://github.com/xbmc/visualization.waveform/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain kodi-platform glm\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"visualization.waveform\"\nPKG_LONGDESC=\"visualization.waveform\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.player.musicviz\"\n"
  },
  {
    "path": "packages/mediacenter/kodi-platform/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"kodi-platform\"\nPKG_VERSION=\"809c5e9d711e378561440a896fcb7dbcd009eb3d\"\nPKG_SHA256=\"159165ae641da5eb273885ce53b8a4b84e62a595c4974f9d12c1b5d1428ef25c\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kodi.tv\"\nPKG_URL=\"https://github.com/xbmc/kodi-platform/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain tinyxml ${MEDIACENTER}:host p8-platform\"\nPKG_LONGDESC=\"kodi-platform:\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DCMAKE_INSTALL_LIBDIR:STRING=lib \\\n                       -DCMAKE_INSTALL_LIBDIR_NOARCH:STRING=lib \\\n                       -DCMAKE_INSTALL_PREFIX_TOOLCHAIN=${SYSROOT_PREFIX}/usr \\\n                       -DBUILD_SHARED_LIBS=0\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/lib/kodiplatform\n}\n"
  },
  {
    "path": "packages/mediacenter/kodi-platform/patches/kodi-platform-01_crosscompile-badness.patch",
    "content": "diff --git a/CMakeLists.txt b/CMakeLists.txt\nindex 2765341..1bd4fc2 100644\n--- a/CMakeLists.txt\n+++ b/CMakeLists.txt\n@@ -22,7 +22,7 @@\n   set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -fPIC\")\n endif()\n \n-set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} \"${CMAKE_INSTALL_PREFIX}/include/kodi\")\n+set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR})\n IF(WIN32)\n   LIST(APPEND kodiplatform_INCLUDE_DIRS \"${CMAKE_INSTALL_PREFIX}/include/kodi/windows\")\n ENDIF(WIN32)\ndiff --git a/kodiplatform-config.cmake.in b/kodiplatform-config.cmake.in\nindex 3fc5273..60bdf1b 100644\n--- a/kodiplatform-config.cmake.in\n+++ b/kodiplatform-config.cmake.in\n@@ -10,16 +10,16 @@\n #\n # propagate these properties from one build system to the other\n set (kodiplatform_VERSION \"@kodiplatform_VERSION_MAJOR@.@kodiplatform_VERSION_MINOR@\")\n-set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include)\n+set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX_TOOLCHAIN@/include/kodi)\n set (kodiplatform_LIBRARY_DIRS \"@CMAKE_LIBRARY_OUTPUT_DIRECTORY@\")\n set (kodiplatform_LINKER_FLAGS \"@kodiplatform_LINKER_FLAGS@\")\n set (kodiplatform_CONFIG_VARS \"@kodiplatform_CONFIG_VARS@\")\n \n # libraries come from the build tree where this file was generated\n if(WIN32)\n-  set (kodiplatform_LIBRARY \"@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/kodiplatform.lib\")\n+  set (kodiplatform_LIBRARY \"@CMAKE_INSTALL_PREFIX_TOOLCHAIN@/@CMAKE_INSTALL_LIBDIR@/kodiplatform.lib\")\n else(WIN32)\n-  set (kodiplatform_LIBRARY \"-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lkodiplatform\")\n+  set (kodiplatform_LIBRARY \"-L@CMAKE_INSTALL_PREFIX_TOOLCHAIN@/@CMAKE_INSTALL_LIBDIR@ -lkodiplatform\")\n endif(WIN32)\n set (kodiplatform_LIBRARIES ${kodiplatform_LIBRARY} \"@kodiplatform_LIBRARIES@\")\n mark_as_advanced (kodiplatform_LIBRARY)\n"
  },
  {
    "path": "packages/mediacenter/kodi-theme-Estuary/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"kodi-theme-Estuary\"\nPKG_VERSION=\"1.0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kodi.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"kodi\"\nPKG_DEPENDS_UNPACK=\"kodi\"\nPKG_LONGDESC=\"Kodi Mediacenter default theme.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/kodi/addons/\n    cp -a $(get_install_dir kodi)/.noinstall/skin.estuary ${INSTALL}/usr/share/kodi/addons/\n}\n"
  },
  {
    "path": "packages/mediacenter/p8-platform/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"p8-platform\"\nPKG_VERSION=\"cee64e9dc0b69e8d286dc170a78effaabfa09c44\"\nPKG_SHA256=\"8d2c3c2e2951a3f202aadd774ce52e2096468a6470ef4c926dbb13bb564ea378\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kodi.tv\"\nPKG_URL=\"https://github.com/xbmc/platform/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Platform support library used by libCEC and binary add-ons for Kodi\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DCMAKE_INSTALL_LIBDIR:STRING=lib \\\n                       -DCMAKE_INSTALL_LIBDIR_NOARCH:STRING=lib \\\n                       -DCMAKE_INSTALL_PREFIX_TOOLCHAIN=${SYSROOT_PREFIX}/usr \\\n                       -DBUILD_SHARED_LIBS=0\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr\n}\n"
  },
  {
    "path": "packages/mediacenter/p8-platform/patches/p8-platform-01-revert-cc-badness.patch",
    "content": "From f91594676d1f75530addd87363ccbc6510efb84e Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Fri, 8 May 2015 11:19:42 +0300\nSubject: [PATCH] revert cc badness\n\nthis reverts upstream commit 68f8418\n---\n CMakeLists.txt |    6 ------\n 1 file changed, 6 deletions(-)\n\ndiff -Naur a/CMakeLists.txt b/CMakeLists.txt\n--- a/CMakeLists.txt\t2016-01-05 23:58:40.000000000 +0100\n+++ b/CMakeLists.txt\t2016-01-06 01:26:52.004076744 +0100\n@@ -22,12 +22,6 @@\n                    src/windows/os-threads.cpp)\n endif()\n \n-set(p8-platform_INCLUDE_DIRS \"${CMAKE_INSTALL_PREFIX}/include/p8-platform\")\n-IF(WIN32)\n-  LIST(APPEND p8-platform_INCLUDE_DIRS \"${CMAKE_INSTALL_PREFIX}/include/p8-platform/windows\")\n-ENDIF(WIN32)\n-set(p8-platform_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})\n-\n if(NOT ${CORE_SYSTEM_NAME} STREQUAL \"\")\n   if(${CORE_SYSTEM_NAME} STREQUAL \"osx\" OR ${CORE_SYSTEM_NAME} STREQUAL \"ios\")\n     list(APPEND p8-platform_LIBRARIES \"-framework CoreVideo -framework IOKit\")\n-- \n1.7.10.4\n"
  },
  {
    "path": "packages/mediacenter/p8-platform/patches/p8-platform-02-cmake_install_prefix_toolchain.patch",
    "content": "diff --git a/p8-platform-config.cmake.in b/p8-platform-config.cmake.in\nindex 47f30f1..df7ed21 100644\n--- a/p8-platform-config.cmake.in\n+++ b/p8-platform-config.cmake.in\n@@ -10,7 +10,7 @@\n #\n # propagate these properties from one build system to the other\n set (p8-platform_VERSION \"@p8-platform_VERSION_MAJOR@.@p8-platform_VERSION_MINOR@\")\n-set (p8-platform_INCLUDE_DIRS @p8-platform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include)\n+set (p8-platform_INCLUDE_DIRS @p8-platform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX_TOOLCHAIN@/include/p8-platform)\n set (p8-platform_LIBRARY_DIRS \"@CMAKE_LIBRARY_OUTPUT_DIRECTORY@\")\n set (p8-platform_LINKER_FLAGS \"@p8-platform_LINKER_FLAGS@\")\n set (p8-platform_CONFIG_VARS \"@p8-platform_CONFIG_VARS@\")\n@@ -19,7 +19,7 @@ set (p8-platform_CONFIG_VARS \"@p8-platform_CONFIG_VARS@\")\n if(WIN32)\n   set (p8-platform_LIBRARY \"@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/p8-platform.lib\")\n else(WIN32)\n-  set (p8-platform_LIBRARY \"-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lp8-platform\")\n+  set (p8-platform_LIBRARY \"-L@CMAKE_INSTALL_PREFIX_TOOLCHAIN@/@CMAKE_INSTALL_LIBDIR@ -lp8-platform\")\n endif(WIN32)\n set (p8-platform_LIBRARIES ${p8-platform_LIBRARY} \"@p8-platform_LIBRARIES@\")\n mark_as_advanced (p8-platform_LIBRARY)\ndiff --git a/p8-platform.pc.in b/p8-platform.pc.in\nindex f97a2d4..58cd057 100644\n--- a/p8-platform.pc.in\n+++ b/p8-platform.pc.in\n@@ -7,4 +7,4 @@ Name: @p8-platform_NAME@\n Description: @p8-platform_DESCRIPTION@ @p8-platform_VERSION_MAJOR@.@p8-platform_VERSION_MINOR@\n Version: @p8-platform_VERSION_MAJOR@.@p8-platform_VERSION_MINOR@.@p8-platform_VERSION_PATCH@\n Libs: -L${libdir} -lp8-platform\n-Cflags: -I${includedir}\n+Cflags: -I${includedir}/p8-platform\n"
  },
  {
    "path": "packages/multimedia/SDL2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"SDL2\"\nPKG_VERSION=\"2.32.10\"\n#PKG_SHA256=\"332cb37d0be20cb9541739c61f79bae5a477427d79ae85e352089afdaf6666e4\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.libsdl.org/\"\nPKG_URL=\"https://www.libsdl.org/release/SDL2-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib systemd dbus ${OPENGLES} pulseaudio\"\nPKG_LONGDESC=\"Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware.\"\nPKG_DEPENDS_HOST=\"toolchain:host distutilscross:host\"\nPKG_CMAKE_OPTS_HOST=\"-DSDL_MALI=OFF -DSDL_KMSDRM=OFF -DSDL_X11=OFF\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DSDL_STATIC=OFF \\\n                       -DSDL_LIBC=ON \\\n                       -DSDL_GCC_ATOMICS=ON \\\n                       -DSDL_ALTIVEC=OFF \\\n                       -DSDL_OSS=OFF \\\n                       -DSDL_ALSA=ON \\\n                       -DSDL_ALSA_SHARED=ON \\\n                       -DSDL_JACK=OFF \\\n                       -DSDL_JACK_SHARED=OFF \\\n                       -DSDL_ESD=OFF \\\n                       -DSDL_ESD_SHARED=OFF \\\n                       -DSDL_ARTS=OFF \\\n                       -DSDL_ARTS_SHARED=OFF \\\n                       -DSDL_NAS=OFF \\\n                       -DSDL_NAS_SHARED=OFF \\\n                       -DSDL_LIBSAMPLERATE=OFF \\\n                       -DSDL_LIBSAMPLERATE_SHARED=OFF \\\n                       -DSDL_SNDIO=OFF \\\n                       -DSDL_DISKAUDIO=OFF \\\n                       -DSDL_DUMMYAUDIO=OFF \\\n                       -DSDL_DUMMYVIDEO=OFF \\\n                       -DSDL_WAYLAND=OFF \\\n                       -DSDL_WAYLAND_QT_TOUCH=ON \\\n                       -DSDL_WAYLAND_SHARED=OFF \\\n                       -DSDL_COCOA=OFF \\\n                       -DSDL_DIRECTFB=OFF \\\n                       -DSDL_VIVANTE=OFF \\\n                       -DSDL_DIRECTFB_SHARED=OFF \\\n                       -DSDL_FUSIONSOUND=OFF \\\n                       -DSDL_FUSIONSOUND_SHARED=OFF \\\n                       -DSDL_PTHREADS=ON \\\n                       -DSDL_PTHREADS_SEM=ON \\\n                       -DSDL_DIRECTX=OFF \\\n                       -DSDL_CLOCK_GETTIME=OFF \\\n                       -DSDL_RPATH=OFF \\\n                       -DSDL_RENDER_D3D=OFF \\\n                       -DSDL_X11=OFF \\\n                       -DSDL_OPENGLES=ON \\\n                       -DSDL_VULKAN=OFF \\\n                       -DSDL_PULSEAUDIO=ON \\\n                       -DSDL_HIDAPI_JOYSTICK=OFF\"\n\ncase \"${DEVICE}\" in\n  'Amlogic-ng'|'Amlogic-no'|'Amlogic-old')  # We should've used PROJECT=Amlogic-ce logically, but using these two device names here saves a comparasion (only device needs to be compared)\n    PKG_PATCH_DIRS=\"Amlogic\"\n    PKG_CMAKE_OPTS_TARGET+=\" -DSDL_MALI=ON -DSDL_KMSDRM=OFF\"\n  ;;\n  'OdroidGoAdvance'|'GameForce'|'RK356x'|'OdroidM1')\n    PKG_PATCH_DIRS=\"Rockchip\"\n    PKG_CMAKE_OPTS_TARGET+=\" -DSDL_KMSDRM=ON\"\n    PKG_DEPENDS_TARGET+=\" libdrm mali-bifrost\"\n    if [ \"${DEVICE}\" = \"OdroidGoAdvance\" ]; then\n      PKG_PATCH_DIRS+=\" OdroidGoAdvance\"\n      PKG_DEPENDS_TARGET+=\" librga\"\n      # This is evil, but we save multiple comparasions\n      pre_make_host() {\n        sed -i \"s| -lrga||g\" ${PKG_BUILD}/CMakeLists.txt\n      }\n      pre_make_target() {\n        if ! `grep -rnw \"${PKG_BUILD}/CMakeLists.txt\" -e '-lrga'`; then\n          sed -i \"s|--no-undefined|--no-undefined -lrga|\" ${PKG_BUILD}/CMakeLists.txt\n        fi\n      }\n    fi\n  ;;\nesac\n\n\npost_makeinstall_target() {\n  sed -e \"s:\\(['=LI]\\)/usr:\\\\1${SYSROOT_PREFIX}/usr:g\" -i ${SYSROOT_PREFIX}/usr/bin/sdl2-config\n  safe_remove ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/multimedia/SDL2/patches/Amlogic/0001-mali-fbdev-add-driver.patch",
    "content": "diff --git a/CMakeLists.txt b/CMakeLists.txt\nindex 7e135490a..79aff66c1 100644\n--- a/CMakeLists.txt\n+++ b/CMakeLists.txt\n@@ -474,6 +474,7 @@ set_option(SDL_WASAPI              \"Use the Windows WASAPI audio driver\" ${WINDO\n set_option(SDL_RENDER_D3D          \"Enable the Direct3D render driver\" ${WINDOWS})\n set_option(SDL_RENDER_METAL        \"Enable the Metal render driver\" ${APPLE})\n set_option(SDL_VIVANTE             \"Use Vivante EGL video driver\" ${UNIX_SYS})\n+set_option(SDL_MALI                \"Use Mali EGL video driver\" ${UNIX_SYS})\n dep_option(SDL_VULKAN              \"Enable Vulkan support\" ON \"ANDROID OR APPLE OR LINUX OR WINDOWS\" OFF)\n set_option(SDL_METAL               \"Enable Metal support\" ${APPLE})\n set_option(SDL_KMSDRM              \"Use KMS DRM video driver\" ${UNIX_SYS})\n@@ -1501,6 +1502,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)\n     CheckOpenGLES()\n     CheckWayland()\n     CheckVivante()\n+    CheckMali()\n     # FIXME: implement CheckVulkan()\n     if(SDL_VULKAN)\n       set(SDL_VIDEO_VULKAN 1)\ndiff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake\nindex a23b2ef07..d3f714b7c 100644\n--- a/cmake/sdlchecks.cmake\n+++ b/cmake/sdlchecks.cmake\n@@ -841,6 +841,28 @@ macro(CheckVivante)\n   endif()\n endmacro()\n \n+# Requires:\n+# - n/a\n+macro(CheckMali)\n+  if(SDL_MALI)\n+    check_c_source_compiles(\"\n+        #define LINUX\n+        #define EGL_API_FB\n+        #include <EGL/egl.h>\n+        int main(int argc, char** argv) {}\" HAVE_VIDEO_MALI_EGL_FB)\n+    if(HAVE_VIDEO_MALI_EGL_FB)\n+      set(HAVE_MALI TRUE)\n+      set(HAVE_SDL_VIDEO TRUE)\n+      set(SDL_VIDEO_DRIVER_MALI 1)\n+\n+      file(GLOB MALI_SOURCES ${SDL2_SOURCE_DIR}/src/video/mali-fbdev/*.c)\n+      list(APPEND SOURCE_FILES  ${MALI_SOURCES})\n+      list(APPEND SDL_CFLAGS -DLINUX -DEGL_API_FB)\n+      list(APPEND EXTRA_LIBS EGL)\n+    endif()\n+  endif()\n+endmacro()\n+\n # Requires:\n # - nada\n macro(CheckGLX)\ndiff --git a/configure b/configure\nindex 6d39b056a..d771cbaaf 100755\n--- a/configure\n+++ b/configure\n@@ -922,6 +922,7 @@ enable_video_x11_xrandr\n enable_video_x11_scrnsaver\n enable_video_x11_xshape\n enable_video_vivante\n+enable_video_mali\n enable_video_cocoa\n enable_video_metal\n enable_render_metal\n@@ -1737,6 +1738,7 @@ Optional Features:\n   --enable-video-x11-xshape\n                           enable X11 XShape support [default=yes]\n   --enable-video-vivante  use Vivante EGL video driver [default=yes]\n+  --enable-video-mali     use Mali EGL video driver [default=yes]\n   --enable-video-cocoa    use Cocoa video driver [default=yes]\n   --enable-video-metal    include Metal support [default=yes]\n   --enable-render-metal   enable the Metal render driver [default=yes]\n@@ -25296,6 +25298,47 @@ printf \"%s\\n\" \"#define SDL_VIDEO_DRIVER_VIVANTE_VDK 1\" >>confdefs.h\n     fi\n }\n \n+CheckMaliVideo()\n+{\n+    # Check whether --enable-video-mali was given.\n+if test \"${enable_video_mali+set}\" = set; then :\n+  enableval=$enable_video_mali;\n+else\n+  enable_video_mali=yes\n+fi\n+    if test x$enable_video = xyes -a x$enable_video_mali = xyes; then\n+        { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for Mali FB API\" >&5\n+$as_echo_n \"checking for Mali FB API... \" >&6; }\n+        have_mali_egl=no\n+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n+/* end confdefs.h.  */\n+          #define LINUX\n+          #define EGL_API_FB\n+          #include <EGL/egl.h>\n+int\n+main ()\n+{\n+  ;\n+  return 0;\n+}\n+_ACEOF\n+if ac_fn_c_try_compile \"$LINENO\"; then :\n+        have_mali_egl=yes\n+fi\n+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n+        { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $have_mali_egl\" >&5\n+$as_echo \"$have_mali_egl\" >&6; }\n+        if test x$have_mali_egl = xyes; then\n+$as_echo \"#define SDL_VIDEO_DRIVER_MALI 1\" >>confdefs.h\n+            EXTRA_CFLAGS=\"$EXTRA_CFLAGS -DLINUX -DEGL_API_FB\"\n+            SOURCES=\"$SOURCES $srcdir/src/video/mali-fbdev/*.c\"\n+            SUMMARY_video=\"${SUMMARY_video} mali\"\n+            have_video=yes\n+        fi\n+    fi\n+}\n+\n+\n CheckHaikuVideo()\n {\n     if test x$enable_video = xyes; then\n@@ -28596,6 +28639,7 @@ printf \"%s\\n\" \"#define SDL_VIDEO_DRIVER_ANDROID 1\" >>confdefs.h\n         CheckLinuxVersion\n         CheckRPATH\n         CheckVivanteVideo\n+        CheckMaliVideo\n \n         # Set up files for the misc library\n         if test x$enable_misc = xyes; then\ndiff --git a/configure.ac b/configure.ac\nindex 7be3b5c3f..7584f79e5 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -2267,6 +2267,37 @@ CheckVivanteVideo()\n     fi\n }\n \n+\n+dnl Set up the Mali video driver if enabled\n+CheckMaliVideo()\n+{\n+    AC_ARG_ENABLE(video-mali,\n+AC_HELP_STRING([--enable-video-mali], [use Mali EGL video driver [[default=yes]]]),\n+                  , enable_video_mali=yes)\n+    if test x$enable_video = xyes -a x$enable_video_mali = xyes; then\n+        AC_MSG_CHECKING(for Mali FB API)\n+        have_mali_egl=no\n+        AC_TRY_COMPILE([\n+          #define LINUX\n+          #define EGL_API_FB\n+          #include <EGL/egl.h>\n+        ],[\n+        ],[\n+        have_mali_egl=yes\n+        ])\n+        AC_MSG_RESULT($have_mali_egl)\n+\n+        if test x$have_mali_egl = xyes; then\n+            AC_DEFINE(SDL_VIDEO_DRIVER_MALI, 1, [ ])\n+            EXTRA_CFLAGS=\"$EXTRA_CFLAGS -DLINUX -DEGL_API_FB\"\n+            SOURCES=\"$SOURCES $srcdir/src/video/mali-fbdev/*.c\"\n+            SUMMARY_video=\"${SUMMARY_video} mali\"\n+            have_video=yes\n+        fi\n+    fi\n+}\n+\n+\n dnl Set up the Haiku video driver if enabled\n CheckHaikuVideo()\n {\n@@ -3843,6 +3874,7 @@ case \"$host\" in\n         CheckLinuxVersion\n         CheckRPATH\n         CheckVivanteVideo\n+        CheckMaliVideo\n \n         # Set up files for the misc library\n         if test x$enable_misc = xyes; then\ndiff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake\nindex ffcafd895..740fd15f1 100644\n--- a/include/SDL_config.h.cmake\n+++ b/include/SDL_config.h.cmake\n@@ -418,6 +418,7 @@\n #cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@\n #cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@\n #cmakedefine SDL_VIDEO_DRIVER_VIVANTE_VDK @SDL_VIDEO_DRIVER_VIVANTE_VDK@\n+#cmakedefine SDL_VIDEO_DRIVER_MALI @SDL_VIDEO_DRIVER_MALI@\n #cmakedefine SDL_VIDEO_DRIVER_OS2 @SDL_VIDEO_DRIVER_OS2@\n #cmakedefine SDL_VIDEO_DRIVER_QNX @SDL_VIDEO_DRIVER_QNX@\n #cmakedefine SDL_VIDEO_DRIVER_RISCOS @SDL_VIDEO_DRIVER_RISCOS@\ndiff --git a/include/SDL_config.h.in b/include/SDL_config.h.in\nindex f5dd166ff..29e9c1b25 100644\n--- a/include/SDL_config.h.in\n+++ b/include/SDL_config.h.in\n@@ -411,6 +411,7 @@\n #undef SDL_VIDEO_DRIVER_NACL\n #undef SDL_VIDEO_DRIVER_VIVANTE\n #undef SDL_VIDEO_DRIVER_VIVANTE_VDK\n+#undef SDL_VIDEO_DRIVER_MALI\n #undef SDL_VIDEO_DRIVER_OS2\n #undef SDL_VIDEO_DRIVER_QNX\n #undef SDL_VIDEO_DRIVER_RISCOS\ndiff --git a/src/video/SDL_egl.c b/src/video/SDL_egl.c\nindex a89c0e812..22b4abf48 100644\n--- a/src/video/SDL_egl.c\n+++ b/src/video/SDL_egl.c\n@@ -66,8 +66,8 @@\n #define DEFAULT_OGL_ES_PVR (vc4 ? \"libGLES_CM.so.1\" : \"libbrcmGLESv2.so\")\n #define DEFAULT_OGL_ES     (vc4 ? \"libGLESv1_CM.so.1\" : \"libbrcmGLESv2.so\")\n \n-#elif defined(SDL_VIDEO_DRIVER_ANDROID) || defined(SDL_VIDEO_DRIVER_VIVANTE)\n-/* Android */\n+#elif defined(SDL_VIDEO_DRIVER_ANDROID) || defined(SDL_VIDEO_DRIVER_VIVANTE) || defined(SDL_VIDEO_DRIVER_MALI)\n+/* Android, Vivante, and Mali fb */\n #define DEFAULT_EGL        \"libEGL.so\"\n #define DEFAULT_OGL_ES2    \"libGLESv2.so\"\n #define DEFAULT_OGL_ES_PVR \"libGLES_CM.so\"\ndiff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h\nindex 344efec48..966c3df24 100644\n--- a/src/video/SDL_sysvideo.h\n+++ b/src/video/SDL_sysvideo.h\n@@ -478,6 +478,7 @@ extern VideoBootStrap DUMMY_evdev_bootstrap;\n extern VideoBootStrap Wayland_bootstrap;\n extern VideoBootStrap NACL_bootstrap;\n extern VideoBootStrap VIVANTE_bootstrap;\n+extern VideoBootStrap MALI_bootstrap;\n extern VideoBootStrap Emscripten_bootstrap;\n extern VideoBootStrap QNX_bootstrap;\n extern VideoBootStrap OFFSCREEN_bootstrap;\ndiff --git a/src/video/SDL_video.c b/src/video/SDL_video.c\nindex 04a1fdf65..c3382ca5c 100644\n--- a/src/video/SDL_video.c\n+++ b/src/video/SDL_video.c\n@@ -78,6 +78,9 @@ static VideoBootStrap *bootstrap[] = {\n #ifdef SDL_VIDEO_DRIVER_VIVANTE\n     &VIVANTE_bootstrap,\n #endif\n+#ifdef SDL_VIDEO_DRIVER_MALI\n+    &MALI_bootstrap,\n+#endif\n #ifdef SDL_VIDEO_DRIVER_DIRECTFB\n     &DirectFB_bootstrap,\n #endif\ndiff --git a/src/video/mali-fbdev/SDL_maliopengles.c b/src/video/mali-fbdev/SDL_maliopengles.c\nnew file mode 100644\nindex 000000000..1d59cd6fe\n--- /dev/null\n+++ b/src/video/mali-fbdev/SDL_maliopengles.c\n@@ -0,0 +1,41 @@\n+/*\n+Simple DirectMedia Layer\n+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>\n+\n+  This software is provided 'as-is', without any express or implied\n+  warranty.  In no event will the authors be held liable for any damages\n+  arising from the use of this software.\n+\n+  Permission is granted to anyone to use this software for any purpose,\n+  including commercial applications, and to alter it and redistribute it\n+  freely, subject to the following restrictions:\n+\n+  1. The origin of this software must not be misrepresented; you must not\n+     claim that you wrote the original software. If you use this software\n+     in a product, an acknowledgment in the product documentation would be\n+     appreciated but is not required.\n+  2. Altered source versions must be plainly marked as such, and must not be\n+     misrepresented as being the original software.\n+  3. This notice may not be removed or altered from any source distribution.\n+*/\n+#include \"../../SDL_internal.h\"\n+\n+#if SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL\n+\n+#include \"SDL_maliopengles.h\"\n+#include \"SDL_malivideo.h\"\n+\n+/* EGL implementation of SDL OpenGL support */\n+\n+int MALI_GLES_LoadLibrary(_THIS, const char *path)\n+{\n+    return SDL_EGL_LoadLibrary(_this, path, EGL_DEFAULT_DISPLAY, 0);\n+}\n+\n+SDL_EGL_CreateContext_impl(MALI)\n+SDL_EGL_SwapWindow_impl(MALI)\n+SDL_EGL_MakeCurrent_impl(MALI)\n+\n+#endif /* SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL */\n+\n+/* vi: set ts=4 sw=4 expandtab: */\ndiff --git a/src/video/mali-fbdev/SDL_maliopengles.h b/src/video/mali-fbdev/SDL_maliopengles.h\nnew file mode 100644\nindex 000000000..52ccad25f\n--- /dev/null\n+++ b/src/video/mali-fbdev/SDL_maliopengles.h\n@@ -0,0 +1,48 @@\n+/*\n+Simple DirectMedia Layer\n+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>\n+\n+  This software is provided 'as-is', without any express or implied\n+  warranty.  In no event will the authors be held liable for any damages\n+  arising from the use of this software.\n+\n+  Permission is granted to anyone to use this software for any purpose,\n+  including commercial applications, and to alter it and redistribute it\n+  freely, subject to the following restrictions:\n+\n+  1. The origin of this software must not be misrepresented; you must not\n+     claim that you wrote the original software. If you use this software\n+     in a product, an acknowledgment in the product documentation would be\n+     appreciated but is not required.\n+  2. Altered source versions must be plainly marked as such, and must not be\n+     misrepresented as being the original software.\n+  3. This notice may not be removed or altered from any source distribution.\n+*/\n+#include \"../../SDL_internal.h\"\n+\n+#ifndef _SDL_maliopengles_h\n+#define _SDL_maliopengles_h\n+\n+#if defined(SDL_VIDEO_DRIVER_MALI) && defined(SDL_VIDEO_OPENGL_EGL)\n+\n+#include \"../SDL_sysvideo.h\"\n+#include \"../SDL_egl_c.h\"\n+\n+/* OpenGLES functions */\n+#define MALI_GLES_GetAttribute SDL_EGL_GetAttribute\n+#define MALI_GLES_GetProcAddress SDL_EGL_GetProcAddress\n+#define MALI_GLES_UnloadLibrary SDL_EGL_UnloadLibrary\n+#define MALI_GLES_SetSwapInterval SDL_EGL_SetSwapInterval\n+#define MALI_GLES_GetSwapInterval SDL_EGL_GetSwapInterval\n+#define MALI_GLES_DeleteContext SDL_EGL_DeleteContext\n+\n+extern int MALI_GLES_LoadLibrary(_THIS, const char *path);\n+extern SDL_GLContext MALI_GLES_CreateContext(_THIS, SDL_Window * window);\n+extern int MALI_GLES_SwapWindow(_THIS, SDL_Window * window);\n+extern int MALI_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);\n+\n+#endif /* SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL */\n+\n+#endif /* _SDL_maliopengles_h */\n+\n+/* vi: set ts=4 sw=4 expandtab: */\n\\ No newline at end of file\ndiff --git a/src/video/mali-fbdev/SDL_malivideo.c b/src/video/mali-fbdev/SDL_malivideo.c\nnew file mode 100644\nindex 000000000..107c6d2f1\n--- /dev/null\n+++ b/src/video/mali-fbdev/SDL_malivideo.c\n@@ -0,0 +1,300 @@\n+/*\n+  Simple DirectMedia Layer\n+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>\n+\n+  This software is provided 'as-is', without any express or implied\n+  warranty.  In no event will the authors be held liable for any damages\n+  arising from the use of this software.\n+\n+  Permission is granted to anyone to use this software for any purpose,\n+  including commercial applications, and to alter it and redistribute it\n+  freely, subject to the following restrictions:\n+\n+  1. The origin of this software must not be misrepresented; you must not\n+     claim that you wrote the original software. If you use this software\n+     in a product, an acknowledgment in the product documentation would be\n+     appreciated but is not required.\n+  2. Altered source versions must be plainly marked as such, and must not be\n+     misrepresented as being the original software.\n+  3. This notice may not be removed or altered from any source distribution.\n+*/\n+#include \"../../SDL_internal.h\"\n+\n+#if SDL_VIDEO_DRIVER_MALI\n+\n+/* SDL internals */\n+#include \"../SDL_sysvideo.h\"\n+#include \"SDL_version.h\"\n+#include \"SDL_syswm.h\"\n+#include \"SDL_loadso.h\"\n+#include \"SDL_events.h\"\n+#include \"../../events/SDL_events_c.h\"\n+\n+#ifdef SDL_INPUT_LINUXEV\n+#include \"../../core/linux/SDL_evdev.h\"\n+#endif\n+\n+#include \"SDL_malivideo.h\"\n+#include \"SDL_maliopengles.h\"\n+\n+static void MALI_Destroy(SDL_VideoDevice *device)\n+{\n+    if (device->driverdata != NULL) {\n+        SDL_free(device->driverdata);\n+        device->driverdata = NULL;\n+    }\n+}\n+\n+static SDL_VideoDevice *MALI_Create()\n+{\n+    SDL_VideoDevice *device;\n+\n+    /* Initialize SDL_VideoDevice structure */\n+    device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));\n+    if (device == NULL) {\n+        SDL_OutOfMemory();\n+        return NULL;\n+    }\n+\n+    device->driverdata = NULL;\n+\n+    /* Setup amount of available displays and current display */\n+    device->num_displays = 0;\n+\n+    /* Set device free function */\n+    device->free = MALI_Destroy;\n+\n+    /* Setup all functions which we can handle */\n+    device->VideoInit = MALI_VideoInit;\n+    device->VideoQuit = MALI_VideoQuit;\n+    device->GetDisplayModes = MALI_GetDisplayModes;\n+    device->SetDisplayMode = MALI_SetDisplayMode;\n+    device->CreateSDLWindow = MALI_CreateWindow;\n+    device->SetWindowTitle = MALI_SetWindowTitle;\n+    device->SetWindowPosition = MALI_SetWindowPosition;\n+    device->SetWindowSize = MALI_SetWindowSize;\n+    device->ShowWindow = MALI_ShowWindow;\n+    device->HideWindow = MALI_HideWindow;\n+    device->DestroyWindow = MALI_DestroyWindow;\n+    device->GetWindowWMInfo = MALI_GetWindowWMInfo;\n+\n+    device->GL_LoadLibrary = MALI_GLES_LoadLibrary;\n+    device->GL_GetProcAddress = MALI_GLES_GetProcAddress;\n+    device->GL_UnloadLibrary = MALI_GLES_UnloadLibrary;\n+    device->GL_CreateContext = MALI_GLES_CreateContext;\n+    device->GL_MakeCurrent = MALI_GLES_MakeCurrent;\n+    device->GL_SetSwapInterval = MALI_GLES_SetSwapInterval;\n+    device->GL_GetSwapInterval = MALI_GLES_GetSwapInterval;\n+    device->GL_SwapWindow = MALI_GLES_SwapWindow;\n+    device->GL_DeleteContext = MALI_GLES_DeleteContext;\n+\n+    device->PumpEvents = MALI_PumpEvents;\n+\n+    return device;\n+}\n+\n+VideoBootStrap MALI_bootstrap = {\n+    \"mali\",\n+    \"Mali EGL Video Driver\",\n+    MALI_Create,\n+    NULL /* no ShowMessageBox implementation */\n+};\n+\n+/*****************************************************************************/\n+/* SDL Video and Display initialization/handling functions                   */\n+/*****************************************************************************/\n+\n+int MALI_VideoInit(_THIS)\n+{\n+    SDL_VideoDisplay display;\n+    SDL_DisplayMode current_mode;\n+    SDL_DisplayData *data;\n+    int fd;\n+    struct fb_var_screeninfo vinfo;\n+\n+    data = (SDL_DisplayData *) SDL_calloc(1, sizeof(SDL_DisplayData));\n+    if (data == NULL) {\n+        return SDL_OutOfMemory();\n+    }\n+\n+\n+    fd = open(\"/dev/fb0\", O_RDWR, 0);\n+    if (fd < 0) {\n+        return SDL_SetError(\"mali-fbdev: Could not open framebuffer device\");\n+    }\n+\n+    if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) < 0) {\n+        MALI_VideoQuit(_this);\n+        return SDL_SetError(\"mali-fbdev: Could not get framebuffer information\");\n+    }\n+\n+    vinfo.yres_virtual = vinfo.yres * 2;\n+//    vinfo.activate = FB_ACTIVATE_NOW;\n+    if (ioctl(fd, FBIOPUT_VSCREENINFO, vinfo) == -1) {\n+\tprintf(\"*** ERROR SETTING VSCREEN\\n\");\n+//        MALI_VideoQuit(_this);\n+//        return SDL_SetError(\"mali-fbdev: Could not get framebuffer information\");\n+    }\n+    close(fd);\n+    data->native_display.width = vinfo.xres;\n+    data->native_display.height = vinfo.yres;\n+\n+    SDL_zero(current_mode);\n+    current_mode.w = vinfo.xres;\n+    current_mode.h = vinfo.yres;\n+    /* FIXME: Is there a way to tell the actual refresh rate? */\n+    current_mode.refresh_rate = 60;\n+    /* 32 bpp for default */\n+    //current_mode.format = SDL_PIXELFORMAT_ABGR8888;\n+    current_mode.format = SDL_PIXELFORMAT_RGBX8888;\n+\n+    current_mode.driverdata = NULL;\n+\n+    SDL_zero(display);\n+    display.desktop_mode = current_mode;\n+    display.current_mode = current_mode;\n+    display.driverdata = data;\n+\n+    SDL_AddVideoDisplay(&display, SDL_FALSE);\n+\n+#ifdef SDL_INPUT_LINUXEV\n+    if (SDL_EVDEV_Init() < 0) {\n+        return -1;\n+    }\n+#endif\n+\n+    return 0;\n+}\n+\n+void MALI_VideoQuit(_THIS)\n+{\n+    int fd = open(\"/dev/tty\", O_RDWR);\n+    ioctl(fd, VT_ACTIVATE, 5);\n+    ioctl(fd, VT_ACTIVATE, 1);\n+    close(fd);\n+    system(\"setterm -cursor on\");\n+\n+#ifdef SDL_INPUT_LINUXEV\n+    SDL_EVDEV_Quit();\n+#endif\n+\n+}\n+\n+void MALI_GetDisplayModes(_THIS, SDL_VideoDisplay * display)\n+{\n+    /* Only one display mode available, the current one */\n+    SDL_AddDisplayMode(display, &display->current_mode);\n+}\n+\n+int MALI_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)\n+{\n+    return 0;\n+}\n+\n+int MALI_CreateWindow(_THIS, SDL_Window * window)\n+{\n+    SDL_WindowData *windowdata;\n+    SDL_DisplayData *displaydata;\n+\n+    displaydata = SDL_GetDisplayDriverData(0);\n+\n+    /* Allocate window internal data */\n+    windowdata = (SDL_WindowData *) SDL_calloc(1, sizeof(SDL_WindowData));\n+    if (windowdata == NULL) {\n+        return SDL_OutOfMemory();\n+    }\n+\n+    /* Windows have one size for now */\n+    window->w = displaydata->native_display.width;\n+    window->h = displaydata->native_display.height;\n+\n+    /* OpenGL ES is the law here */\n+    window->flags |= SDL_WINDOW_OPENGL;\n+\n+    if (!_this->egl_data) {\n+        if (SDL_GL_LoadLibrary(NULL) < 0) {\n+            return -1;\n+        }\n+    }\n+    windowdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) &displaydata->native_display);\n+\n+    if (windowdata->egl_surface == EGL_NO_SURFACE) {\n+        MALI_VideoQuit(_this);\n+        return SDL_SetError(\"mali-fbdev: Can't create EGL window surface\");\n+    }\n+\n+    /* Setup driver data for this window */\n+    window->driverdata = windowdata;\n+\n+    /* One window, it always has focus */\n+    SDL_SetMouseFocus(window);\n+    SDL_SetKeyboardFocus(window);\n+\n+    /* Window has been successfully created */\n+    return 0;\n+}\n+\n+void MALI_DestroyWindow(_THIS, SDL_Window * window)\n+{\n+    SDL_WindowData *data;\n+\n+    data = window->driverdata;\n+    if (data) {\n+        if (data->egl_surface != EGL_NO_SURFACE) {\n+            SDL_EGL_DestroySurface(_this, data->egl_surface);\n+            data->egl_surface = EGL_NO_SURFACE;\n+        }\n+        SDL_free(data);\n+    }\n+    window->driverdata = NULL;\n+}\n+\n+void MALI_SetWindowTitle(_THIS, SDL_Window * window)\n+{\n+}\n+\n+void MALI_SetWindowPosition(_THIS, SDL_Window * window)\n+{\n+}\n+\n+void MALI_SetWindowSize(_THIS, SDL_Window * window)\n+{\n+}\n+\n+void MALI_ShowWindow(_THIS, SDL_Window * window)\n+{\n+}\n+\n+void MALI_HideWindow(_THIS, SDL_Window * window)\n+{\n+}\n+\n+/*****************************************************************************/\n+/* SDL Window Manager function                                               */\n+/*****************************************************************************/\n+SDL_bool MALI_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)\n+{\n+    if (info->version.major <= SDL_MAJOR_VERSION) {\n+        return SDL_TRUE;\n+    } else {\n+        SDL_SetError(\"application not compiled with SDL %d.%d\\n\",\n+            SDL_MAJOR_VERSION, SDL_MINOR_VERSION);\n+    }\n+\n+    /* Failed to get window manager information */\n+    return SDL_FALSE;\n+}\n+\n+/*****************************************************************************/\n+/* SDL event functions                                                       */\n+/*****************************************************************************/\n+void MALI_PumpEvents(_THIS)\n+{\n+#ifdef SDL_INPUT_LINUXEV\n+    SDL_EVDEV_Poll();\n+#endif\n+}\n+\n+#endif /* SDL_VIDEO_DRIVER_MALI */\n+\n+/* vi: set ts=4 sw=4 expandtab: */\ndiff --git a/src/video/mali-fbdev/SDL_malivideo.h b/src/video/mali-fbdev/SDL_malivideo.h\nnew file mode 100644\nindex 000000000..162eb9da9\n--- /dev/null\n+++ b/src/video/mali-fbdev/SDL_malivideo.h\n@@ -0,0 +1,82 @@\n+/*\n+  Simple DirectMedia Layer\n+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>\n+\n+  This software is provided 'as-is', without any express or implied\n+  warranty.  In no event will the authors be held liable for any damages\n+  arising from the use of this software.\n+\n+  Permission is granted to anyone to use this software for any purpose,\n+  including commercial applications, and to alter it and redistribute it\n+  freely, subject to the following restrictions:\n+\n+  1. The origin of this software must not be misrepresented; you must not\n+     claim that you wrote the original software. If you use this software\n+     in a product, an acknowledgment in the product documentation would be\n+     appreciated but is not required.\n+  2. Altered source versions must be plainly marked as such, and must not be\n+     misrepresented as being the original software.\n+  3. This notice may not be removed or altered from any source distribution.\n+*/\n+\n+#ifndef _SDL_malivideo_h\n+#define _SDL_malivideo_h\n+\n+#include \"../../SDL_internal.h\"\n+#include \"../SDL_sysvideo.h\"\n+\n+#include \"SDL_egl.h\"\n+\n+#include <EGL/egl.h>\n+#include <linux/vt.h>\n+#include <linux/fb.h>\n+#include <sys/types.h>\n+#include <sys/stat.h>\n+#include <sys/ioctl.h>\n+#include <fcntl.h>\n+#include <unistd.h>\n+#include <stdlib.h>\n+\n+// Shadow the definition of fbdev_window\n+struct shadow_fbdev_window {\n+    unsigned short width;\n+    unsigned short height;\n+};\n+\n+typedef struct SDL_DisplayData\n+{\n+    struct shadow_fbdev_window native_display;\n+} SDL_DisplayData;\n+\n+typedef struct SDL_WindowData\n+{\n+    EGLSurface egl_surface;\n+} SDL_WindowData;\n+\n+/****************************************************************************/\n+/* SDL_VideoDevice functions declaration                                    */\n+/****************************************************************************/\n+\n+/* Display and window functions */\n+int MALI_VideoInit(_THIS);\n+void MALI_VideoQuit(_THIS);\n+void MALI_GetDisplayModes(_THIS, SDL_VideoDisplay *display);\n+int MALI_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode);\n+int MALI_CreateWindow(_THIS, SDL_Window *window);\n+void MALI_SetWindowTitle(_THIS, SDL_Window *window);\n+void MALI_SetWindowPosition(_THIS, SDL_Window *window);\n+void MALI_SetWindowSize(_THIS, SDL_Window *window);\n+void MALI_ShowWindow(_THIS, SDL_Window *window);\n+void MALI_HideWindow(_THIS, SDL_Window *window);\n+void MALI_DestroyWindow(_THIS, SDL_Window *window);\n+\n+/* Window manager function */\n+SDL_bool MALI_GetWindowWMInfo(_THIS, SDL_Window *window,\n+                             struct SDL_SysWMinfo *info);\n+\n+/* Event functions */\n+void MALI_PumpEvents(_THIS);\n+\n+#endif /* _SDL_malivideo_h */\n+\n+/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "packages/multimedia/SDL2/patches/OdroidGoAdvance/0005-SDL2-2.28.1.odroidgoa-support.patch",
    "content": "diff --git a/CMakeLists.txt b/CMakeLists.txt \nindex 26fe83205..32a339b05 100644\n--- a/CMakeLists.txt\n+++ b/CMakeLists.txt\n@@ -672,7 +672,7 @@\n     check_c_compiler_flag(\"\" HAVE_NO_UNDEFINED)\n     set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})\n     if(HAVE_NO_UNDEFINED AND NOT (USE_CLANG AND WINDOWS))\n-      list(APPEND EXTRA_LDFLAGS_BUILD \"-Wl,--no-undefined\")\n+      list(APPEND EXTRA_LDFLAGS_BUILD \"-Wl,--no-undefined -lrga\")\n     endif()\n   endif()\n\ndiff --git a/Makefile.in b/Makefile.in\nindex 65ccc55..bf4e3aa 100644\n--- a/Makefile.in\n+++ b/Makefile.in\n@@ -22,7 +22,7 @@ CC      = @CC@\n INCLUDE = @INCLUDE@\n CFLAGS  = @BUILD_CFLAGS@\n EXTRA_CFLAGS = @EXTRA_CFLAGS@\n-LDFLAGS = @BUILD_LDFLAGS@\n+LDFLAGS = @BUILD_LDFLAGS@ -lrga\n EXTRA_LDFLAGS = @EXTRA_LDFLAGS@\n LIBTOOL = @LIBTOOL@\n INSTALL = @INSTALL@\ndiff --git a/src/video/kmsdrm/SDL_kmsdrmopengles.c b/src/video/kmsdrm/SDL_kmsdrmopengles.c\nindex 017372c..cff1b25 100644\n--- a/src/video/kmsdrm/SDL_kmsdrmopengles.c\n+++ b/src/video/kmsdrm/SDL_kmsdrmopengles.c\n@@ -30,10 +30,14 @@\n #include \"SDL_kmsdrmopengles.h\"\n #include \"SDL_kmsdrmdyn.h\"\n #include <errno.h>\n+#include<stdbool.h>\n \n #ifndef EGL_PLATFORM_GBM_MESA\n #define EGL_PLATFORM_GBM_MESA 0x31D7\n #endif\n+\n+extern rga_info_t src_info;\n+extern rga_info_t dst_info;\n \n /* EGL implementation of SDL OpenGL support */\n \n@@ -93,6 +97,7 @@\n     SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata);\n     KMSDRM_FBInfo *fb_info;\n     int ret = 0;\n+    struct gbm_bo* rga_buffer = NULL;\n \n     /* Always wait for the previous issued flip before issuing a new one,\n        even if you do async flips. */\n@@ -143,7 +148,29 @@\n     }\n \n     /* Get an actual usable fb for the next front buffer. */\n-    fb_info = KMSDRM_FBFromBO(_this, windata->next_bo);\n+    //fb_info = KMSDRM_FBFromBO(_this, windata->next_bo);\n+\n+    if (src_info.fd) {\n+            close(src_info.fd);\n+        }\n+        src_info.fd = KMSDRM_gbm_bo_get_fd(windata->next_bo);\n+        dst_info.fd = viddata->rga_buffer_prime_fds[viddata->rga_buffer_index];\n+        if (c_RkRgaBlit(&src_info, &dst_info, NULL) < 0) {\n+            SDL_LogError(SDL_LOG_CATEGORY_VIDEO,\n+                            \"Failed to rga blit\\n\");\n+        }\n+\n+        rga_buffer = viddata->rga_buffers[viddata->rga_buffer_index];\n+        fb_info = KMSDRM_FBFromBO(_this, rga_buffer);\n+\n+        if (!fb_info) {\n+         SDL_LogError(SDL_LOG_CATEGORY_VIDEO, \"Could not get a framebuffer\");\n+         return 0;\n+        }\n+\n+        viddata->rga_buffer_index = (viddata->rga_buffer_index + 1) % RGA_BUFFERS_MAX;\n+    \n+    \n     if (!fb_info) {\n         SDL_LogError(SDL_LOG_CATEGORY_VIDEO, \"Could not get a framebuffer\");\n         return 0;\n\ndiff --git a/src/video/kmsdrm/SDL_kmsdrmsym.h b/src/video/kmsdrm/SDL_kmsdrmsym.h\nindex 6956232..6d8b3fd 100644\n--- a/src/video/kmsdrm/SDL_kmsdrmsym.h\n+++ b/src/video/kmsdrm/SDL_kmsdrmsym.h\n@@ -133,6 +133,8 @@\n SDL_KMSDRM_SYM(struct gbm_bo *,gbm_surface_lock_front_buffer,(struct gbm_surface *surf))\n SDL_KMSDRM_SYM(void,gbm_surface_release_buffer,(struct gbm_surface *surf, struct gbm_bo *bo))\n \n+SDL_KMSDRM_SYM(int,gbm_bo_get_fd,(struct gbm_bo *bo))\n+\n SDL_KMSDRM_SYM_OPT(uint64_t,gbm_bo_get_modifier,(struct gbm_bo *bo))\n SDL_KMSDRM_SYM_OPT(int,gbm_bo_get_plane_count,(struct gbm_bo *bo))\n SDL_KMSDRM_SYM_OPT(uint32_t,gbm_bo_get_offset,(struct gbm_bo *bo, int plane))\n\ndiff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c\nindex f7e7648..144f8f9 100644\n--- a/src/video/kmsdrm/SDL_kmsdrmvideo.c\n+++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c\n@@ -44,6 +44,7 @@\n #include \"SDL_kmsdrmopengles.h\"\n #include \"SDL_kmsdrmmouse.h\"\n #include \"SDL_kmsdrmdyn.h\"\n+#include <sys/ioctl.h>\n #include \"SDL_kmsdrmvulkan.h\"\n #include <sys/stat.h>\n #include <sys/param.h>\n@@ -51,6 +52,7 @@\n #include <dirent.h>\n #include <poll.h>\n #include <errno.h>\n+#include<stdbool.h>\n\n #ifdef __OpenBSD__\n static SDL_bool openbsd69orgreater = SDL_FALSE;\n@@ -70,6 +72,9 @@\n #ifndef EGL_PLATFORM_GBM_MESA\n #define EGL_PLATFORM_GBM_MESA 0x31D7\n #endif\n+\n+rga_info_t src_info = {0};\n+rga_info_t dst_info = {0};\n\n static int\n check_modestting(int devindex)\n@@ -330,5 +335,45 @@\n     SDL_free(fb_info);\n }\n\n+static void\n+KMSDRM_InitRotateBuffer(_THIS, int frameWidth, int frameHeight)\n+{\n+    int l_frameHeight;\n+    SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata);\n+\n+    // initialize 2D raster graphic acceleration unit (RGA)\n+    c_RkRgaInit();\n+\n+    l_frameHeight = frameHeight;\n+    if(l_frameHeight % 32 != 0) {\n+    l_frameHeight = (frameHeight + 32) & (~31);\n+    }\n+\n+    // create buffers for RGA with adjusted stride\n+    for (int i = 0; i < RGA_BUFFERS_MAX; ++i)\n+    {\n+        viddata->rga_buffers[i] = KMSDRM_gbm_bo_create(viddata->gbm_dev,\n+            frameWidth, l_frameHeight,\n+            GBM_FORMAT_XRGB8888, GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING);\n+        assert(viddata->rga_buffers[i]);\n+\n+        viddata->rga_buffer_prime_fds[i] = KMSDRM_gbm_bo_get_fd(viddata->rga_buffers[i]);\n+    }\n+    viddata->rga_buffer_index = 0;\n+\n+    // setup rotation\n+    src_info.fd = -1;\n+    src_info.mmuFlag = 1;\n+    src_info.rotation = HAL_TRANSFORM_ROT_270;\n+\n+    // swap width and height and adjust stride here because our source buffer is 480x854\n+    rga_set_rect(&src_info.rect, 0, 0, frameHeight, frameWidth, l_frameHeight, frameWidth, RK_FORMAT_BGRA_8888);\n+\n+    dst_info.fd = -1;\n+    dst_info.mmuFlag = 1;\n+\n+    rga_set_rect(&dst_info.rect, 0, 0, frameWidth, frameHeight, frameWidth, frameHeight, RK_FORMAT_BGRA_8888);\n+}\n+\n KMSDRM_FBInfo *KMSDRM_FBFromBO(_THIS, struct gbm_bo *bo)\n {\n@@ -687,8 +732,8 @@\n     modedata->mode_index = mode_index;\n\n     display.driverdata = dispdata;\n-    display.desktop_mode.w = dispdata->mode.hdisplay;\n-    display.desktop_mode.h = dispdata->mode.vdisplay;\n+    display.desktop_mode.w = dispdata->mode.vdisplay;\n+    display.desktop_mode.h = dispdata->mode.hdisplay;\n     display.desktop_mode.refresh_rate = dispdata->mode.vrefresh;\n     display.desktop_mode.format = SDL_PIXELFORMAT_ARGB8888;\n     display.desktop_mode.driverdata = modedata;\n@@ -964,7 +1009,8 @@\n        or SetWindowFullscreen, send a fake event for now since the actual\n        recreation is deferred */\n     KMSDRM_GetModeToSet(window, &mode);\n-    SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, mode.hdisplay, mode.vdisplay);\n+    SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, mode.vdisplay, mode.hdisplay);\n+\n }\n\n /* This determines the size of the fb, which comes from the GBM surface\n@@ -1000,13 +1046,13 @@\n        mode that's set in sync with what SDL_video.c thinks is set */\n     KMSDRM_GetModeToSet(window, &dispdata->mode);\n\n-    display->current_mode.w = dispdata->mode.hdisplay;\n-    display->current_mode.h = dispdata->mode.vdisplay;\n+    display->current_mode.w = dispdata->mode.vdisplay;\n+    display->current_mode.h = dispdata->mode.hdisplay;\n     display->current_mode.refresh_rate = dispdata->mode.vrefresh;\n     display->current_mode.format = SDL_PIXELFORMAT_ARGB8888;\n\n     windata->gs = KMSDRM_gbm_surface_create(viddata->gbm_dev,\n-                                            dispdata->mode.hdisplay, dispdata->mode.vdisplay,\n+                                            dispdata->mode.vdisplay, dispdata->mode.hdisplay,\n                                             surface_fmt, surface_flags);\n\n     if (!windata->gs) {\n@@ -1030,7 +1076,7 @@\n     ret = SDL_EGL_MakeCurrent(_this, windata->egl_surface, egl_context);\n\n     SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED,\n-                        dispdata->mode.hdisplay, dispdata->mode.vdisplay);\n+                        dispdata->mode.vdisplay, dispdata->mode.hdisplay);\n\n     windata->egl_surface_dirty = SDL_FALSE;\n\n@@ -1116,8 +1162,8 @@\n             modedata->mode_index = i;\n         }\n\n-        mode.w = conn->modes[i].hdisplay;\n-        mode.h = conn->modes[i].vdisplay;\n+        mode.w = conn->modes[i].vdisplay;\n+        mode.h = conn->modes[i].hdisplay;\n         mode.refresh_rate = conn->modes[i].vrefresh;\n         mode.format = SDL_PIXELFORMAT_ARGB8888;\n         mode.driverdata = modedata;\n@@ -1229,6 +1275,13 @@\n     /*********************************************************************/\n     SDL_free(window->driverdata);\n     window->driverdata = NULL;\n+        for (int i = 0; i < RGA_BUFFERS_MAX; ++i) {\n+            close(viddata->rga_buffer_prime_fds[i]);\n+        }\n+        if (src_info.fd) {\n+            close(src_info.fd);\n+        }\n+        c_RkRgaDeInit();\n }\n\n /**********************************************************************/\n@@ -1248,6 +1301,7 @@\n     NativeDisplayType egl_display;\n     drmModeModeInfo *mode;\n     int ret = 0;\n+    SDL_DisplayData *data;\n\n     /* Allocate window internal data */\n     windata = (SDL_WindowData *)SDL_calloc(1, sizeof(SDL_WindowData));\n@@ -1356,6 +1410,9 @@\n     SDL_SetMouseFocus(window);\n     SDL_SetKeyboardFocus(window);\n\n+        data = (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata;\n+        KMSDRM_InitRotateBuffer(_this, data->mode.hdisplay, data->mode.vdisplay);\n+\n     /* Tell the app that the window has moved to top-left. */\n     SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, 0, 0);\n\n\ndiff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.h b/src/video/kmsdrm/SDL_kmsdrmvideo.h\nindex 566fc85..10519e9 100644\n--- a/src/video/kmsdrm/SDL_kmsdrmvideo.h\n+++ b/src/video/kmsdrm/SDL_kmsdrmvideo.h\n@@ -32,6 +32,10 @@\n #include <xf86drmMode.h>\n #include <gbm.h>\n #include <EGL/egl.h>\n+#include <rga/RgaApi.h>\n+#include <assert.h>\n+\n+#define RGA_BUFFERS_MAX (3)\n\n typedef struct SDL_VideoData\n {\n@@ -53,6 +57,10 @@ typedef struct SDL_VideoData\n        open 1 FD and create 1 gbm device. */\n     SDL_bool gbm_init;\n\n+    struct gbm_bo* rga_buffers[RGA_BUFFERS_MAX];\n+    int rga_buffer_prime_fds[RGA_BUFFERS_MAX];\n+    int rga_buffer_index;\n+\n } SDL_VideoData;\n"
  },
  {
    "path": "packages/multimedia/SDL2/patches/OdroidGoAdvance/0006-KMSDRM-Also-rotate-the-cursor.patch",
    "content": "From e3faf45fbcf6d274243d5dd1edbd59cfdfa7636a Mon Sep 17 00:00:00 2001\nFrom: Johnny on Flame <johnnyonflame@hotmail.com>\nDate: Tue, 15 Feb 2022 02:17:17 -0300\nSubject: [PATCH] KMSDRM: Also rotate the cursor.\n\n---\n src/video/kmsdrm/SDL_kmsdrmmouse.c | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/src/video/kmsdrm/SDL_kmsdrmmouse.c b/src/video/kmsdrm/SDL_kmsdrmmouse.c\nindex b22fc8e..c9d7700 100644\n--- a/src/video/kmsdrm/SDL_kmsdrmmouse.c\n+++ b/src/video/kmsdrm/SDL_kmsdrmmouse.c\n@@ -156,6 +156,7 @@\n     uint8_t *src_row;\n\n     int i;\n+    int j;\n     int ret;\n\n     if (!curdata || !dispdata->cursor_bo) {\n@@ -176,8 +177,10 @@\n\n     /* Copy from the cursor buffer to a buffer that we can dump to the GBM BO. */\n     for (i = 0; i < curdata->h; i++) {\n-        src_row = &((uint8_t *)curdata->buffer)[i * curdata->w * 4];\n-        SDL_memcpy(ready_buffer + (i * bo_stride), src_row, (size_t)4 * curdata->w);\n+        for (j = 0; j < curdata->w; j++) {\n+            src_row = ((uint32_t*)curdata->buffer)[i * curdata->w + j];\n+            SDL_memcpy(ready_buffer + ((curdata->w - j + 1) * bo_stride) + i, &src_row, 4);\n+        }\n     }\n\n     /* Dump the cursor buffer to our GBM BO. */\n@@ -216,10 +216,10 @@ KMSDRM_DumpCursorToBO(SDL_VideoDisplay *display, SDL_Cursor *cursor)\n     bo_handle = KMSDRM_gbm_bo_get_handle(dispdata->cursor_bo).u32;\n     if (curdata->hot_x == 0 && curdata->hot_y == 0) {\n         ret = KMSDRM_drmModeSetCursor(viddata->drm_fd, dispdata->crtc->crtc_id,\n-                                      bo_handle, dispdata->cursor_w, dispdata->cursor_h);\n+                                      bo_handle, dispdata->cursor_h, dispdata->cursor_w);\n     } else {\n         ret = KMSDRM_drmModeSetCursor2(viddata->drm_fd, dispdata->crtc->crtc_id,\n-                                       bo_handle, dispdata->cursor_w, dispdata->cursor_h, curdata->hot_x, curdata->hot_y);\n+                                       bo_handle, dispdata->cursor_h, dispdata->cursor_w, curdata->hot_y, (curdata->w - curdata->hot_x + 1));\n     }\n\n     if (ret) {\n@@ -417,9 +417,9 @@ KMSDRM_WarpMouseGlobal(int x, int y)\n     SDL_Mouse *mouse = SDL_GetMouse();\n\n     if (mouse && mouse->cur_cursor && mouse->focus) {\n-\n         SDL_Window *window = mouse->focus;\n         SDL_DisplayData *dispdata = (SDL_DisplayData *)SDL_GetDisplayForWindow(window)->driverdata;\n+        KMSDRM_CursorData *curdata = mouse->cur_cursor->driverdata;\n\n         /* Update internal mouse position. */\n         SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 0, x, y);\n@@ -428,7 +428,7 @@ KMSDRM_WarpMouseGlobal(int x, int y)\n         if (dispdata->cursor_bo) {\n             int ret = 0;\n\n-            ret = KMSDRM_drmModeMoveCursor(dispdata->cursor_bo_drm_fd, dispdata->crtc->crtc_id, x, y);\n+            ret = KMSDRM_drmModeMoveCursor(dispdata->cursor_bo_drm_fd, dispdata->crtc->crtc_id, y, dispdata->mode.vdisplay + curdata->w - x);\n\n             if (ret) {\n                 SDL_SetError(\"drmModeMoveCursor() failed.\");\n@@ -484,16 +484,16 @@ KMSDRM_MoveCursor(SDL_Cursor * cursor)\n     /* We must NOT call SDL_SendMouseMotion() here or we will enter recursivity!\n        That's why we move the cursor graphic ONLY. */\n     if (mouse && mouse->cur_cursor && mouse->focus) {\n-\n         SDL_Window *window = mouse->focus;\n         SDL_DisplayData *dispdata = (SDL_DisplayData *)SDL_GetDisplayForWindow(window)->driverdata;\n+        KMSDRM_CursorData *curdata = mouse->cur_cursor->driverdata;\n\n         if (!dispdata->cursor_bo) {\n             SDL_SetError(\"Cursor not initialized properly.\");\n             return;\n         }\n\n-        ret = KMSDRM_drmModeMoveCursor(dispdata->cursor_bo_drm_fd, dispdata->crtc->crtc_id, mouse->x, mouse->y);\n+        ret = KMSDRM_drmModeMoveCursor(dispdata->cursor_bo_drm_fd, dispdata->crtc->crtc_id, mouse->y, dispdata->mode.vdisplay - curdata->w - mouse->x);\n\n         if (ret) {\n             SDL_SetError(\"drmModeMoveCursor() failed.\");\n--\n2.30.2\n"
  },
  {
    "path": "packages/multimedia/SDL2/patches/Rockchip/0001-kmsdrm-Workaround-missing-gbm_bo_get_offset-and-SDL_.patch",
    "content": "diff --git a/src/video/SDL_egl.c b/src/video/SDL_egl.c\nindex 87d693e8d..891d588c4 100644\n--- a/src/video/SDL_egl.c\n+++ b/src/video/SDL_egl.c\n@@ -1032,7 +1032,7 @@ SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface)\n         return NULL;\n     }\n \n-    _this->egl_data->egl_swapinterval = 0;\n+    _this->egl_data->egl_swapinterval = 1;\n \n     if (SDL_EGL_MakeCurrent(_this, egl_surface, egl_context) < 0) {\n         /* Save the SDL error set by SDL_EGL_MakeCurrent */\n--- a/src/video/kmsdrm/SDL_kmsdrmopengles.c\n+++ b/src/video/kmsdrm/SDL_kmsdrmopengles.c\n@@ -41,11 +41,17 @@\n {\n     /* if SDL was _also_ built with the Raspberry Pi driver (so we're\n        definitely a Pi device), default to GLES2. */\n-#ifdef SDL_VIDEO_DRIVER_RPI\n-    *mask = SDL_GL_CONTEXT_PROFILE_ES;\n-    *major = 2;\n-    *minor = 0;\n+    /* JohnnyonFlame: We want to use GLESv2 as a default for compatibility\n+       with SDL 2.0.10 builds, but offer the ability to use the OpenGL defaults\n+       if ever needed. */\n+#ifndef SDL_VIDEO_DRIVER_RPI\n+    if (!SDL_getenv(\"SDL_DEFAULT_CONTEXT_PROFILE\"))\n #endif\n+    {\n+        *mask = SDL_GL_CONTEXT_PROFILE_ES;\n+        *major = 2;\n+        *minor = 0;\n+    }\n }\n \n int KMSDRM_GLES_LoadLibrary(_THIS, const char *path)\n@@ -73,6 +79,7 @@\n     int KMSDRM_GLES_SetSwapInterval(_THIS, int interval)\n {\n \n+  interval = 1;\n     if (!_this->egl_data) {\n         return SDL_SetError(\"EGL not initialized\");\n     }\n"
  },
  {
    "path": "packages/multimedia/aom/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"aom\"\nPKG_VERSION=\"3.5.0\"\nPKG_SHA256=\"d37dbee372e2430a7efde813984ae6d78bdf1fc4080ebe32457c9115408b0738\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://www.webmproject.org\"\nPKG_URL=\"https://storage.googleapis.com/aom-releases/libaom-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"AV1 Codec Library\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DENABLE_CCACHE=1 \\\n                       -DENABLE_DOCS=0 \\\n                       -DENABLE_EXAMPLES=0 \\\n                       -DENABLE_TESTS=0 \\\n                       -DENABLE_TOOLS=0\"\n\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  PKG_DEPENDS_TARGET+=\" nasm:host\"\nelif ! target_has_feature neon; then\n  PKG_CMAKE_OPTS_TARGET+=\" -DENABLE_NEON=0 -DENABLE_NEON_ASM=0\"\nfi\n"
  },
  {
    "path": "packages/multimedia/bento4/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"bento4\"\nPKG_VERSION=\"1.6.0-639-7-Omega\"\nPKG_SHA256=\"4464cd47b597e6dedbfc231bb6eb097c45cfe5ee0051082460d9ac53e9d74dc3\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.bento4.com\"\nPKG_URL=\"https://github.com/xbmc/Bento4/archive/refs/tags/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_DEPENDS_UNPACK=\"inputstream.adaptive\"\nPKG_LONGDESC=\"C++ class library and tools designed to read and write ISO-MP4 files\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_APPS=OFF\"\n"
  },
  {
    "path": "packages/multimedia/dav1d/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dav1d\"\nPKG_VERSION=\"1.0.0\"\nPKG_SHA256=\"4a4eb6cecbc8c26916ef58886d478243de8bcc46710b369c04d6891b0155ac0f\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://www.jbkempf.com/blog/post/2018/Introducing-dav1d\"\nPKG_URL=\"https://code.videolan.org/videolan/dav1d/-/archive/${PKG_VERSION}/dav1d-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"dav1d is an AV1 decoder :)\"\n\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  PKG_DEPENDS_TARGET+=\" nasm:host\"\nfi\n\nPKG_MESON_OPTS_TARGET=\"-Denable_docs=false \\\n                       -Denable_examples=false \\\n                       -Denable_tests=false \\\n                       -Denable_tools=false \\\n                       -Dtestdata_tests=false\"\n"
  },
  {
    "path": "packages/multimedia/ffmpeg/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ffmpeg\"\nPKG_VERSION=\"4.4.1\"\nPKG_SHA256=\"eadbad9e9ab30b25f5520fbfde99fae4a92a1ae3c0257a8d68569a4651e30e02\"\nPKG_LICENSE=\"GPL-3.0-only\"\nPKG_SITE=\"https://ffmpeg.org\"\nPKG_URL=\"http://ffmpeg.org/releases/ffmpeg-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib bzip2 openssl speex SDL2 lame x264 libtheora\"\nPKG_LONGDESC=\"FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video.\"\nPKG_PATCH_DIRS=\"kodi libreelec\"\n\ncase \"${PROJECT}\" in\n  Amlogic)\n    PKG_VERSION=\"f9638b6331277e53ecd9276db5fe6dcd91d44c57\"\n    PKG_FFMPEG_BRANCH=\"dev/4.4/rpi_import_1\"\n    PKG_SHA256=\"3b42cbffd15d95d59e402475fcdb1aaac9ae6a8404a521b95d1fe79c6b2baad4\"\n    PKG_URL=\"https://github.com/jc-kynesim/rpi-ffmpeg/archive/${PKG_VERSION}.tar.gz\"\n    PKG_PATCH_DIRS=\"libreelec dav1d\"\n    ;;\n  RPi)\n    PKG_FFMPEG_RPI=\"--disable-mmal --disable-rpi --enable-sand\"\n    PKG_PATCH_DIRS+=\" rpi\"\n    ;;\n  *)\n    PKG_PATCH_DIRS+=\" v4l2-request v4l2-drmprime\"\n    ;;\nesac\n\ncase \"${DEVICE}\" in\n  Amlogic-ne|Amlogic-no|Amlogic-ng-dv)\n    PKG_PATCH_DIRS+=\" dv\"\n    ;;\nesac\n\npost_unpack() {\n  # Fix FFmpeg version\n  if [ \"${PROJECT}\" = \"Amlogic\" ]; then\n    echo \"${PKG_FFMPEG_BRANCH}-${PKG_VERSION:0:7}\" > ${PKG_BUILD}/VERSION\n  else\n    echo \"${PKG_VERSION}\" > ${PKG_BUILD}/RELEASE\n  fi\n}\n\n# Dependencies\nget_graphicdrivers\n\nPKG_FFMPEG_HWACCEL=\"--enable-hwaccels\"\n\nif [ \"${V4L2_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" libdrm\"\n  PKG_NEED_UNPACK+=\" $(get_pkg_directory libdrm)\"\n  PKG_FFMPEG_V4L2=\"--enable-v4l2_m2m --enable-libdrm\"\n\n  if [ \"${PROJECT}\" = \"Allwinner\" -o \"${PROJECT}\" = \"Rockchip\" -o \"${DEVICE}\" = \"iMX8\" ]; then\n    PKG_V4L2_REQUEST=\"yes\"\n  elif [ \"${PROJECT}\" = \"RPi\" ] && [ \"${DEVICE}\" = \"RPi4\" -o \"${DEVICE}\" = \"RPi5\" ]; then\n    PKG_V4L2_REQUEST=\"yes\"\n    PKG_FFMPEG_HWACCEL=\"--disable-hwaccel=h264_v4l2request \\\n                        --disable-hwaccel=mpeg2_v4l2request \\\n                        --disable-hwaccel=vp8_v4l2request \\\n                        --disable-hwaccel=vp9_v4l2request\"\n  else\n    PKG_V4L2_REQUEST=\"no\"\n  fi\n\n  if [ \"${PKG_V4L2_REQUEST}\" = \"yes\" ]; then\n    PKG_DEPENDS_TARGET+=\" systemd\"\n    PKG_NEED_UNPACK+=\" $(get_pkg_directory systemd)\"\n    PKG_FFMPEG_V4L2+=\" --enable-libudev --enable-v4l2-request\"\n  else\n    PKG_FFMPEG_V4L2+=\" --disable-libudev --disable-v4l2-request\"\n  fi\nelse\n  PKG_FFMPEG_V4L2=\"--disable-v4l2_m2m --disable-libudev --disable-v4l2-request\"\nfi\n\nif [ \"${VAAPI_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" libva\"\n  PKG_NEED_UNPACK+=\" $(get_pkg_directory libva)\"\n  PKG_FFMPEG_VAAPI=\"--enable-vaapi\"\nelse\n  PKG_FFMPEG_VAAPI=\"--disable-vaapi\"\nfi\n\nif [ \"${DISPLAYSERVER}\" != \"x11\" ] && [ ${PROJECT} != \"Amlogic-ce\" ]; then\n  PKG_DEPENDS_TARGET+=\" libdrm\"\n  PKG_NEED_UNPACK+=\" $(get_pkg_directory libdrm)\"\n  PKG_FFMPEG_VAAPI=\" --enable-libdrm\"\nfi\n\nif [ \"${VDPAU_SUPPORT}\" = \"yes\" -a \"${DISPLAYSERVER}\" = \"x11\" ]; then\n  PKG_DEPENDS_TARGET+=\" libvdpau\"\n  PKG_NEED_UNPACK+=\" $(get_pkg_directory libvdpau)\"\n  PKG_FFMPEG_VDPAU=\"--enable-vdpau\"\nelse\n  PKG_FFMPEG_VDPAU=\"--disable-vdpau\"\nfi\n\nif build_with_debug; then\n  PKG_FFMPEG_DEBUG=\"--enable-debug --disable-stripping\"\nelse\n  PKG_FFMPEG_DEBUG=\"--disable-debug --enable-stripping\"\nfi\n\nif target_has_feature neon; then\n  PKG_FFMPEG_FPU=\"--enable-neon\"\nelse\n  PKG_FFMPEG_FPU=\"--disable-neon\"\nfi\n\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  PKG_DEPENDS_TARGET+=\" nasm:host\"\nfi\n\nif target_has_feature \"(neon|sse)\"; then\n  PKG_DEPENDS_TARGET+=\" dav1d\"\n  PKG_NEED_UNPACK+=\" $(get_pkg_directory dav1d)\"\n  PKG_FFMPEG_AV1=\"--enable-libdav1d\"\nelse\n  PKG_FFMPEG_AV1=\"--disable-libdav1d\"\nfi\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n}\n\nif [ \"${FFMPEG_TESTING}\" = \"yes\" ]; then\n  PKG_FFMPEG_TESTING=\"--enable-encoder=wrapped_avframe --enable-muxer=null\"\n  if [ \"${PROJECT}\" = \"RPi\" ]; then\n    PKG_FFMPEG_TESTING+=\" --enable-vout-drm --enable-outdev=vout_drm\"\n  fi\nelse\n  PKG_FFMPEG_TESTING=\"--enable-ffplay\" #\"--disable-programs\"\nfi\n\nconfigure_target() {\n\nif [ ${DISTRO} == \"EmuELEC\" ]; then\nsed -i \"s|int hide_banner = 0|int hide_banner = 1|\" ${PKG_BUILD}/fftools/cmdutils.c\nsed -i \"s|SDL2_CONFIG=\\\"\\${cross_prefix}sdl2-config\\\"|SDL2_CONFIG=\\\"${SYSROOT_PREFIX}/usr/bin/sdl2-config\\\"|\" ${PKG_BUILD}/configure\nfi\n\n  ./configure --prefix=\"/usr\" \\\n              --cpu=\"${TARGET_CPU}\" \\\n              --arch=\"${TARGET_ARCH}\" \\\n              --enable-cross-compile \\\n              --cross-prefix=\"${TARGET_PREFIX}\" \\\n              --sysroot=\"${SYSROOT_PREFIX}\" \\\n              --sysinclude=\"${SYSROOT_PREFIX}/usr/include\" \\\n              --target-os=\"linux\" \\\n              --nm=\"${NM}\" \\\n              --ar=\"${AR}\" \\\n              --as=\"${CC}\" \\\n              --cc=\"${CC}\" \\\n              --ld=\"${CC}\" \\\n              --host-cc=\"${HOST_CC}\" \\\n              --host-cflags=\"${HOST_CFLAGS}\" \\\n              --host-ldflags=\"${HOST_LDFLAGS}\" \\\n              --extra-cflags=\"${CFLAGS}\" \\\n              --extra-ldflags=\"${LDFLAGS}\" \\\n              --extra-libs=\"${PKG_FFMPEG_LIBS}\" \\\n              --disable-static \\\n              --enable-shared \\\n              --enable-gpl \\\n              --enable-version3 \\\n              --enable-logging \\\n              --disable-doc \\\n              ${PKG_FFMPEG_DEBUG} \\\n              --enable-pic \\\n              --pkg-config=\"${TOOLCHAIN}/bin/pkg-config\" \\\n              --enable-optimizations \\\n              --disable-extra-warnings \\\n              --enable-avdevice \\\n              --enable-avcodec \\\n              --enable-avformat \\\n              --enable-swscale \\\n              --enable-postproc \\\n              --enable-avfilter \\\n              --enable-pthreads \\\n              --enable-network \\\n              --disable-gnutls --enable-openssl \\\n              --disable-gray \\\n              --enable-swscale-alpha \\\n              --disable-small \\\n              --enable-dct \\\n              --enable-fft \\\n              --enable-mdct \\\n              --enable-rdft \\\n              --disable-crystalhd \\\n              ${PKG_FFMPEG_V4L2} \\\n              ${PKG_FFMPEG_VAAPI} \\\n              ${PKG_FFMPEG_VDPAU} \\\n              ${PKG_FFMPEG_RPI} \\\n              --enable-runtime-cpudetect \\\n              --disable-hardcoded-tables \\\n              --enable-encoder=ac3 \\\n              --enable-encoder=libmp3lame \\\n              --enable-encoder=libtheora \\\n              --enable-encoder=aac \\\n              --enable-encoder=wmav2 \\\n              --enable-encoder=mjpeg \\\n              --enable-encoder=png \\\n              --enable-encoder=mpeg4 \\\n              --enable-encoder=libx264 \\\n              ${PKG_FFMPEG_HWACCEL} \\\n              --enable-muxer=spdif \\\n              --enable-muxer=adts \\\n              --enable-muxer=asf \\\n              --enable-muxer=ipod \\\n              --enable-muxer=mpegts \\\n              --enable-demuxers \\\n              --enable-parsers \\\n              --enable-bsfs \\\n              --enable-protocol=http \\\n              --enable-filters \\\n              --disable-avisynth \\\n              --enable-bzlib \\\n              --disable-lzma \\\n              --disable-alsa \\\n              --disable-frei0r \\\n              --disable-libopencore-amrnb \\\n              --disable-libopencore-amrwb \\\n              --disable-libopencv \\\n              --disable-libdc1394 \\\n              --disable-libfreetype \\\n              --disable-libgsm \\\n              --enable-libmp3lame \\\n              --disable-libopenjpeg \\\n              --disable-librtmp \\\n              ${PKG_FFMPEG_AV1} \\\n              --enable-libspeex \\\n              --enable-libtheora \\\n              --disable-libvo-amrwbenc \\\n              --disable-libvorbis \\\n              --disable-libvpx \\\n              --enable-libx264 \\\n              --disable-libxavs \\\n              --disable-libxvid \\\n              --enable-zlib \\\n              --enable-asm \\\n              --disable-altivec \\\n              ${PKG_FFMPEG_FPU} \\\n              --disable-symver \\\n              ${PKG_FFMPEG_TESTING}\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/share/ffmpeg/examples\n}\n"
  },
  {
    "path": "packages/multimedia/ffmpeg/patches/dav1d/ffmpeg-support-dav1d-1-0-0.patch",
    "content": "From 7ee17ec7e46afef0e0af20af196292ec75f50b62 Mon Sep 17 00:00:00 2001\nFrom: James Almer <jamrial@gmail.com>\nDate: Sat, 26 Jun 2021 17:24:15 -0300\nSubject: [PATCH] avcodec/libdav1d: don't repeatedly parse the same sequence\n header\n\nLook at the event flag that signals a new sequence header was found\nin the bitstream on supported libdav1d versions for this purpose.\n\nSigned-off-by: James Almer <jamrial@gmail.com>\n---\n libavcodec/libdav1d.c | 10 ++++++++++\n 1 file changed, 10 insertions(+)\n\ndiff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c\nindex 6370ae1fbf02..c39df418d515 100644\n--- a/libavcodec/libdav1d.c\n+++ b/libavcodec/libdav1d.c\n@@ -33,6 +33,9 @@\n #include \"decode.h\"\n #include \"internal.h\"\n \n+#define FF_DAV1D_VERSION_AT_LEAST(x,y) \\\n+    (DAV1D_API_VERSION_MAJOR > (x) || DAV1D_API_VERSION_MAJOR == (x) && DAV1D_API_VERSION_MINOR >= (y))\n+\n typedef struct Libdav1dContext {\n     AVClass *class;\n     Dav1dContext *c;\n\n\nFrom d873b5fffc8292242549c4c026023e370e15c05b Mon Sep 17 00:00:00 2001\nFrom: James Almer <jamrial@gmail.com>\nDate: Mon, 20 Sep 2021 22:30:35 -0300\nSubject: [PATCH] avcodec/libdav1d: pass auto threads value to libdav1d\n\nlibdav1d 1.0.0 will be the first version supporting Dav1dSettings.n_threads == 0.\n\nSigned-off-by: James Almer <jamrial@gmail.com>\n---\n libavcodec/libdav1d.c | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c\nindex 4711337f39a7..e4fdaf722907 100644\n--- a/libavcodec/libdav1d.c\n+++ b/libavcodec/libdav1d.c\n@@ -207,7 +207,11 @@ static av_cold int libdav1d_init(AVCodecContext *c)\n {\n     Libdav1dContext *dav1d = c->priv_data;\n     Dav1dSettings s;\n+#if FF_DAV1D_VERSION_AT_LEAST(6,0)\n+    int threads = c->thread_count;\n+#else\n     int threads = (c->thread_count ? c->thread_count : av_cpu_count()) * 3 / 2;\n+#endif\n     int res;\n \n     av_log(c, AV_LOG_INFO, \"libdav1d %s\\n\", dav1d_version());\n\n\nFrom e204846ec16c1ab34c7f3a681734cf5190433018 Mon Sep 17 00:00:00 2001\nFrom: James Almer <jamrial@gmail.com>\nDate: Fri, 3 Sep 2021 13:50:32 -0300\nSubject: [PATCH] avcodec/libdav1d: fix compilation after recent libdav1d API\n changes\n\nThey were done in preparation for an upcoming 1.0 release.\nKeep supporting previous releases for the time being.\n\nReviewed-by: BBB\nSigned-off-by: James Almer <jamrial@gmail.com>\n---\n libavcodec/libdav1d.c | 21 +++++++++++++++++++--\n 1 file changed, 19 insertions(+), 2 deletions(-)\n\ndiff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c\nindex 51e0980f6edb..4711337f39a7 100644\n--- a/libavcodec/libdav1d.c\n+++ b/libavcodec/libdav1d.c\n@@ -228,6 +228,15 @@ static av_cold int libdav1d_init(AVCodecContext *c)\n     if (dav1d->operating_point >= 0)\n         s.operating_point = dav1d->operating_point;\n \n+#if FF_DAV1D_VERSION_AT_LEAST(6,0)\n+    if (dav1d->frame_threads || dav1d->tile_threads)\n+        s.n_threads = FFMAX(dav1d->frame_threads, dav1d->tile_threads);\n+    else\n+        s.n_threads = FFMIN(threads, DAV1D_MAX_THREADS);\n+    s.max_frame_delay = (c->flags & AV_CODEC_FLAG_LOW_DELAY) ? 1 : s.n_threads;\n+    av_log(c, AV_LOG_DEBUG, \"Using %d threads, %d max_frame_delay\\n\",\n+           s.n_threads, s.max_frame_delay);\n+#else\n     s.n_tile_threads = dav1d->tile_threads\n                      ? dav1d->tile_threads\n                      : FFMIN(floor(sqrt(threads)), DAV1D_MAX_TILE_THREADS);\n@@ -236,6 +245,7 @@ static av_cold int libdav1d_init(AVCodecContext *c)\n                       : FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS);\n     av_log(c, AV_LOG_DEBUG, \"Using %d frame threads, %d tile threads\\n\",\n            s.n_frame_threads, s.n_tile_threads);\n+#endif\n \n     res = libdav1d_parse_extradata(c);\n     if (res < 0)\n@@ -519,11 +529,18 @@ static av_cold int libdav1d_close(AVCodecContext *c)\n     return 0;\n }\n \n+#ifndef DAV1D_MAX_FRAME_THREADS\n+#define DAV1D_MAX_FRAME_THREADS DAV1D_MAX_THREADS\n+#endif\n+#ifndef DAV1D_MAX_TILE_THREADS\n+#define DAV1D_MAX_TILE_THREADS DAV1D_MAX_THREADS\n+#endif\n+\n #define OFFSET(x) offsetof(Libdav1dContext, x)\n #define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM\n static const AVOption libdav1d_options[] = {\n-    { \"tilethreads\", \"Tile threads\", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD },\n-    { \"framethreads\", \"Frame threads\", OFFSET(frame_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD },\n+    { \"tilethreads\", \"Tile threads\", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD | AV_OPT_FLAG_DEPRECATED },\n+    { \"framethreads\", \"Frame threads\", OFFSET(frame_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD | AV_OPT_FLAG_DEPRECATED },\n     { \"filmgrain\", \"Apply Film Grain\", OFFSET(apply_grain), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD | AV_OPT_FLAG_DEPRECATED },\n     { \"oppoint\",  \"Select an operating point of the scalable bitstream\", OFFSET(operating_point), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 31, VD },\n     { \"alllayers\", \"Output all spatial layers\", OFFSET(all_layers), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VD },\n"
  },
  {
    "path": "packages/multimedia/ffmpeg/patches/dv/ffmpeg-001-avformat-dovi_isom-Implement-Dolby-Vision-configurat.patch",
    "content": "From c0ce2d9ab67c2677160fc8f562ba646f84acf88f Mon Sep 17 00:00:00 2001\nFrom: quietvoid <tcchlisop0@gmail.com>\nDate: Sat, 1 Jan 2022 17:51:49 +0100\nSubject: [PATCH 1/2] avformat/dovi_isom: Implement Dolby Vision configuration\n parsing/writing\n\nBoth parse/write implementations are based on mov/movenc.\n\nThis only adds support for the \"Dolby Vision configuration box\".\nOther configuration boxes, such as\n\"Dolby Vision enhancement layer configuration box\" are not supported.\n\nThe new functions will be used to implement parsing/writing the DOVI config\nfor Matroska, as well as to refactor both mov/movenc to use dovi_isom functions.\n\nSigned-off-by: quietvoid <tcChlisop0@gmail.com>\nSigned-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>\n---\n libavformat/dovi_isom.c | 118 ++++++++++++++++++++++++++++++++++++++++\n libavformat/dovi_isom.h |  35 ++++++++++++\n 2 files changed, 153 insertions(+)\n create mode 100644 libavformat/dovi_isom.c\n create mode 100644 libavformat/dovi_isom.h\n\ndiff --git a/libavformat/dovi_isom.c b/libavformat/dovi_isom.c\nnew file mode 100644\nindex 0000000000..76681b9451\n--- /dev/null\n+++ b/libavformat/dovi_isom.c\n@@ -0,0 +1,118 @@\n+/*\n+ * DOVI ISO Media common code\n+ *\n+ * Copyright (c) 2020 Vacing Fang <vacingfang@tencent.com>\n+ * Copyright (c) 2021 quietvoid\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"libavutil/dovi_meta.h\"\n+\n+#include \"libavcodec/put_bits.h\"\n+\n+#include \"avformat.h\"\n+#include \"dovi_isom.h\"\n+\n+int ff_isom_parse_dvcc_dvvc(AVFormatContext *s, AVStream *st, const uint8_t *buf_ptr, uint64_t size)\n+{\n+    uint32_t buf;\n+    AVDOVIDecoderConfigurationRecord *dovi;\n+    size_t dovi_size;\n+    int ret;\n+\n+    if (size > (1 << 30) || size < 4)\n+        return AVERROR_INVALIDDATA;\n+\n+    dovi = av_dovi_alloc(&dovi_size);\n+    if (!dovi)\n+        return AVERROR(ENOMEM);\n+\n+    dovi->dv_version_major = *buf_ptr++;    // 8 bits\n+    dovi->dv_version_minor = *buf_ptr++;    // 8 bits\n+\n+    buf = *buf_ptr++ << 8;\n+    buf |= *buf_ptr++;\n+\n+    dovi->dv_profile        = (buf >> 9) & 0x7f;    // 7 bits\n+    dovi->dv_level          = (buf >> 3) & 0x3f;    // 6 bits\n+    dovi->rpu_present_flag  = (buf >> 2) & 0x01;    // 1 bit\n+    dovi->el_present_flag   = (buf >> 1) & 0x01;    // 1 bit\n+    dovi->bl_present_flag   =  buf       & 0x01;    // 1 bit\n+\n+    // Has enough remaining data\n+    if (size >= 5) {\n+        dovi->dv_bl_signal_compatibility_id = ((*buf_ptr++) >> 4) & 0x0f; // 4 bits\n+    } else {\n+        // 0 stands for None\n+        // Dolby Vision V1.2.93 profiles and levels\n+        dovi->dv_bl_signal_compatibility_id = 0;\n+    }\n+\n+    ret = av_stream_add_side_data(st, AV_PKT_DATA_DOVI_CONF,\n+                                  (uint8_t *)dovi, dovi_size);\n+    if (ret < 0) {\n+        av_free(dovi);\n+        return ret;\n+    }\n+\n+    av_log(s, AV_LOG_TRACE, \"DOVI in dvcC/dvvC/dvwC box, version: %d.%d, profile: %d, level: %d, \"\n+           \"rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d\\n\",\n+           dovi->dv_version_major, dovi->dv_version_minor,\n+           dovi->dv_profile, dovi->dv_level,\n+           dovi->rpu_present_flag,\n+           dovi->el_present_flag,\n+           dovi->bl_present_flag,\n+           dovi->dv_bl_signal_compatibility_id);\n+\n+    return 0;\n+}\n+\n+void ff_isom_put_dvcc_dvvc(AVFormatContext *s, uint8_t out[ISOM_DVCC_DVVC_SIZE],\n+                           AVDOVIDecoderConfigurationRecord *dovi)\n+{\n+    PutBitContext pb;\n+\n+    init_put_bits(&pb, out, ISOM_DVCC_DVVC_SIZE);\n+\n+    put_bits(&pb, 8, dovi->dv_version_major);\n+    put_bits(&pb, 8, dovi->dv_version_minor);\n+    put_bits(&pb, 7, dovi->dv_profile & 0x7f);\n+    put_bits(&pb, 6, dovi->dv_level & 0x3f);\n+    put_bits(&pb, 1, !!dovi->rpu_present_flag);\n+    put_bits(&pb, 1, !!dovi->el_present_flag);\n+    put_bits(&pb, 1, !!dovi->bl_present_flag);\n+    put_bits(&pb, 4, dovi->dv_bl_signal_compatibility_id & 0x0f);\n+\n+    put_bits(&pb, 28, 0); /* reserved */\n+    put_bits32(&pb, 0); /* reserved */\n+    put_bits32(&pb, 0); /* reserved */\n+    put_bits32(&pb, 0); /* reserved */\n+    put_bits32(&pb, 0); /* reserved */\n+\n+    flush_put_bits(&pb);\n+\n+    av_log(s, AV_LOG_DEBUG, \"DOVI in %s box, version: %d.%d, profile: %d, level: %d, \"\n+           \"rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d\\n\",\n+           dovi->dv_profile > 10 ? \"dvwC\" : (dovi->dv_profile > 7 ? \"dvvC\" : \"dvcC\"),\n+           dovi->dv_version_major, dovi->dv_version_minor,\n+           dovi->dv_profile, dovi->dv_level,\n+           dovi->rpu_present_flag,\n+           dovi->el_present_flag,\n+           dovi->bl_present_flag,\n+           dovi->dv_bl_signal_compatibility_id);\n+}\ndiff --git a/libavformat/dovi_isom.h b/libavformat/dovi_isom.h\nnew file mode 100644\nindex 0000000000..1526164319\n--- /dev/null\n+++ b/libavformat/dovi_isom.h\n@@ -0,0 +1,35 @@\n+/*\n+ * DOVI ISO Media common code\n+ * Copyright (c) 2021 quietvoid\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#ifndef AVFORMAT_DOVI_ISOM_H\n+#define AVFORMAT_DOVI_ISOM_H\n+\n+#include \"libavutil/dovi_meta.h\"\n+\n+#include \"avformat.h\"\n+\n+#define ISOM_DVCC_DVVC_SIZE 24\n+\n+int ff_isom_parse_dvcc_dvvc(AVFormatContext *s, AVStream *st, const uint8_t *buf_ptr, uint64_t size);\n+void ff_isom_put_dvcc_dvvc(AVFormatContext *s, uint8_t out[ISOM_DVCC_DVVC_SIZE],\n+                           AVDOVIDecoderConfigurationRecord *dovi);\n+\n+#endif /* AVFORMAT_DOVI_ISOM_H */\n-- \n2.40.1\n\n"
  },
  {
    "path": "packages/multimedia/ffmpeg/patches/dv/ffmpeg-002-avformat-matroska-dec-enc-Parse-BlockAdditionMapping.patch",
    "content": "From 700f0c683013310d35d15db5c41fb17cd52138f7 Mon Sep 17 00:00:00 2001\nFrom: quietvoid <tcchlisop0@gmail.com>\nDate: Sat, 1 Jan 2022 17:51:50 +0100\nSubject: [PATCH 2/2] avformat/matroska{dec, enc}: Parse BlockAdditionMapping\n elements\n\nAdds handling of dvcC/dvvC block addition mappings.\n\nThe parsing creates AVDOVIDecoderConfigurationRecord side data.\nThe configuration block is written when muxing into Matroska,\nif DOVI side data is present for the track.\n\nMost of the Matroska element parsing is based on Plex's FFmpeg source code.\n\nSigned-off-by: quietvoid <tcChlisop0@gmail.com>\nSigned-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>\n---\n libavformat/Makefile      |  4 +--\n libavformat/matroska.h    |  9 ++++++\n libavformat/matroskadec.c | 58 +++++++++++++++++++++++++++++++++++++--\n libavformat/matroskaenc.c | 37 +++++++++++++++++++++++++\n 4 files changed, 104 insertions(+), 4 deletions(-)\n\ndiff --git a/libavformat/Makefile b/libavformat/Makefile\nindex 0f340f74a0..e48f44766b 100644\n--- a/libavformat/Makefile\n+++ b/libavformat/Makefile\n@@ -309,11 +309,11 @@ OBJS-$(CONFIG_M4V_MUXER)                 += rawenc.o\n OBJS-$(CONFIG_MATROSKA_DEMUXER)          += matroskadec.o matroska.o  \\\n                                             flac_picture.o isom_tags.o rmsipr.o \\\n                                             oggparsevorbis.o vorbiscomment.o \\\n-                                            qtpalette.o replaygain.o\n+                                            qtpalette.o replaygain.o dovi_isom.o\n OBJS-$(CONFIG_MATROSKA_MUXER)            += matroskaenc.o matroska.o \\\n                                             av1.o avc.o hevc.o isom_tags.o \\\n                                             flacenc_header.o avlanguage.o \\\n-                                            vorbiscomment.o wv.o\n+                                            vorbiscomment.o wv.o dovi_isom.o\n OBJS-$(CONFIG_MCA_DEMUXER)               += mca.o\n OBJS-$(CONFIG_MCC_DEMUXER)               += mccdec.o subtitles.o\n OBJS-$(CONFIG_MD5_MUXER)                 += hashenc.o\ndiff --git a/libavformat/matroska.h b/libavformat/matroska.h\nindex 30cbe18a8b..01fdf5ae57 100644\n--- a/libavformat/matroska.h\n+++ b/libavformat/matroska.h\n@@ -111,6 +111,7 @@\n #define MATROSKA_ID_TRACKCONTENTENCODING 0x6240\n #define MATROSKA_ID_TRACKTIMECODESCALE 0x23314F\n #define MATROSKA_ID_TRACKMAXBLKADDID 0x55EE\n+#define MATROSKA_ID_TRACKBLKADDMAPPING 0x41E4\n \n /* IDs in the trackvideo master */\n #define MATROSKA_ID_VIDEOFRAMERATE 0x2383E3\n@@ -189,6 +190,12 @@\n #define MATROSKA_ID_ENCODINGSIGKEYID 0x47E4\n #define MATROSKA_ID_ENCODINGSIGNATURE 0x47E3\n \n+/* IDs in the block addition mapping master */\n+#define MATROSKA_ID_BLKADDIDVALUE 0x41F0\n+#define MATROSKA_ID_BLKADDIDNAME 0x41A4\n+#define MATROSKA_ID_BLKADDIDTYPE 0x41E7\n+#define MATROSKA_ID_BLKADDIDEXTRADATA 0x41ED\n+\n /* ID in the cues master */\n #define MATROSKA_ID_POINTENTRY 0xBB\n \n@@ -385,4 +392,6 @@ extern const char * const ff_matroska_video_stereo_plane[MATROSKA_VIDEO_STEREO_P\n \n int ff_mkv_stereo3d_conv(AVStream *st, MatroskaVideoStereoModeType stereo_mode);\n \n+#define DVCC_DVVC_BLOCK_TYPE_NAME \"Dolby Vision configuration\"\n+\n #endif /* AVFORMAT_MATROSKA_H */\ndiff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c\nindex fb1849f9c3..8a0c82cbeb 100644\n--- a/libavformat/matroskadec.c\n+++ b/libavformat/matroskadec.c\n@@ -52,6 +52,7 @@\n \n #include \"avformat.h\"\n #include \"avio_internal.h\"\n+#include \"dovi_isom.h\"\n #include \"internal.h\"\n #include \"isom.h\"\n #include \"matroska.h\"\n@@ -238,6 +239,13 @@ typedef struct MatroskaTrackOperation {\n     EbmlList combine_planes;\n } MatroskaTrackOperation;\n \n+typedef struct MatroskaBlockAdditionMapping {\n+    uint64_t value;\n+    char *name;\n+    uint64_t type;\n+    EbmlBin extradata;\n+} MatroskaBlockAdditionMapping;\n+\n typedef struct MatroskaTrack {\n     uint64_t num;\n     uint64_t uid;\n@@ -268,6 +276,7 @@ typedef struct MatroskaTrack {\n     int ms_compat;\n     int needs_decoding;\n     uint64_t max_block_additional_id;\n+    EbmlList block_addition_mappings;\n \n     uint32_t palette[AVPALETTE_COUNT];\n     int has_palette;\n@@ -416,8 +425,8 @@ typedef struct MatroskaDemuxContext {\n // incomplete type (6.7.2 in C90, 6.9.2 in C99).\n // Removing the sizes breaks MSVC.\n static EbmlSyntax ebml_syntax[3], matroska_segment[9], matroska_track_video_color[15], matroska_track_video[19],\n-                  matroska_track[32], matroska_track_encoding[6], matroska_track_encodings[2],\n-                  matroska_track_combine_planes[2], matroska_track_operation[2], matroska_tracks[2],\n+                  matroska_track[33], matroska_track_encoding[6], matroska_track_encodings[2],\n+                  matroska_track_combine_planes[2], matroska_track_operation[2], matroska_block_addition_mapping[5], matroska_tracks[2],\n                   matroska_attachments[2], matroska_chapter_entry[9], matroska_chapter[6], matroska_chapters[2],\n                   matroska_index_entry[3], matroska_index[2], matroska_tag[3], matroska_tags[2], matroska_seekhead[2],\n                   matroska_blockadditions[2], matroska_blockgroup[8], matroska_cluster_parsing[8];\n@@ -567,6 +576,14 @@ static EbmlSyntax matroska_track_operation[] = {\n     CHILD_OF(matroska_track)\n };\n \n+static EbmlSyntax matroska_block_addition_mapping[] = {\n+    { MATROSKA_ID_BLKADDIDVALUE,      EBML_UINT, 0, 0, offsetof(MatroskaBlockAdditionMapping, value) },\n+    { MATROSKA_ID_BLKADDIDNAME,       EBML_STR,  0, 0, offsetof(MatroskaBlockAdditionMapping, name) },\n+    { MATROSKA_ID_BLKADDIDTYPE,       EBML_UINT, 0, 0, offsetof(MatroskaBlockAdditionMapping, type) },\n+    { MATROSKA_ID_BLKADDIDEXTRADATA,  EBML_BIN,  0, 0, offsetof(MatroskaBlockAdditionMapping, extradata) },\n+    CHILD_OF(matroska_track)\n+};\n+\n static EbmlSyntax matroska_track[] = {\n     { MATROSKA_ID_TRACKNUMBER,           EBML_UINT,  0, 0, offsetof(MatroskaTrack, num) },\n     { MATROSKA_ID_TRACKNAME,             EBML_UTF8,  0, 0, offsetof(MatroskaTrack, name) },\n@@ -590,6 +607,7 @@ static EbmlSyntax matroska_track[] = {\n     { MATROSKA_ID_TRACKOPERATION,        EBML_NEST,  0, 0, offsetof(MatroskaTrack, operation),    { .n = matroska_track_operation } },\n     { MATROSKA_ID_TRACKCONTENTENCODINGS, EBML_NEST,  0, 0, 0,                                     { .n = matroska_track_encodings } },\n     { MATROSKA_ID_TRACKMAXBLKADDID,      EBML_UINT,  0, 0, offsetof(MatroskaTrack, max_block_additional_id), { .u = 0 } },\n+    { MATROSKA_ID_TRACKBLKADDMAPPING,    EBML_NEST,  0, sizeof(MatroskaBlockAdditionMapping), offsetof(MatroskaTrack, block_addition_mappings), { .n = matroska_block_addition_mapping } },\n     { MATROSKA_ID_SEEKPREROLL,           EBML_UINT,  0, 0, offsetof(MatroskaTrack, seek_preroll), { .u = 0 } },\n     { MATROSKA_ID_TRACKFLAGENABLED,      EBML_NONE },\n     { MATROSKA_ID_TRACKFLAGLACING,       EBML_NONE },\n@@ -2310,6 +2328,38 @@ static int mkv_parse_video_projection(AVStream *st, const MatroskaTrack *track,\n     return 0;\n }\n \n+static int mkv_parse_dvcc_dvvc(AVFormatContext *s, AVStream *st, const MatroskaTrack *track,\n+                               EbmlBin *bin)\n+{\n+    return ff_isom_parse_dvcc_dvvc(s, st, bin->data, bin->size);\n+}\n+\n+static int mkv_parse_block_addition_mappings(AVFormatContext *s, AVStream *st, const MatroskaTrack *track)\n+{\n+    const EbmlList *mappings_list = &track->block_addition_mappings;\n+    MatroskaBlockAdditionMapping *mappings = mappings_list->elem;\n+    int ret;\n+\n+    for (int i = 0; i < mappings_list->nb_elem; i++) {\n+        MatroskaBlockAdditionMapping *mapping = &mappings[i];\n+\n+        switch (mapping->type) {\n+        case MKBETAG('d','v','c','C'):\n+        case MKBETAG('d','v','v','C'):\n+            if ((ret = mkv_parse_dvcc_dvvc(s, st, track, &mapping->extradata)) < 0)\n+                return ret;\n+\n+            break;\n+        default:\n+            av_log(s, AV_LOG_DEBUG,\n+                   \"Unknown block additional mapping type 0x%\"PRIx64\", value %\"PRIu64\", name \\\"%s\\\"\\n\",\n+                   mapping->type, mapping->value, mapping->name ? mapping->name : \"\");\n+        }\n+    }\n+\n+    return 0;\n+}\n+\n static int get_qt_codec(MatroskaTrack *track, uint32_t *fourcc, enum AVCodecID *codec_id)\n {\n     const AVCodecTag *codec_tags;\n@@ -2898,6 +2948,10 @@ static int matroska_parse_tracks(AVFormatContext *s)\n             if (track->flag_textdescriptions)\n                 st->disposition |= AV_DISPOSITION_DESCRIPTIONS;\n         }\n+\n+        ret = mkv_parse_block_addition_mappings(s, st, track);\n+        if (ret < 0)\n+            return ret;\n     }\n \n     return 0;\ndiff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c\nindex b4284a8778..eb3d7207d0 100644\n--- a/libavformat/matroskaenc.c\n+++ b/libavformat/matroskaenc.c\n@@ -27,6 +27,7 @@\n #include \"avformat.h\"\n #include \"avio_internal.h\"\n #include \"avlanguage.h\"\n+#include \"dovi_isom.h\"\n #include \"flacenc.h\"\n #include \"internal.h\"\n #include \"isom.h\"\n@@ -1112,6 +1113,37 @@ static int mkv_write_stereo_mode(AVFormatContext *s, AVIOContext *pb,\n     return 0;\n }\n \n+static void mkv_write_dovi(AVFormatContext *s, AVIOContext *pb, AVStream *st)\n+{\n+    AVDOVIDecoderConfigurationRecord *dovi = (AVDOVIDecoderConfigurationRecord *)\n+                                             av_stream_get_side_data(st, AV_PKT_DATA_DOVI_CONF, NULL);\n+\n+    if (dovi && dovi->dv_profile <= 10) {\n+        ebml_master mapping;\n+        uint8_t buf[ISOM_DVCC_DVVC_SIZE];\n+        uint32_t type;\n+\n+        uint64_t expected_size = (2 + 1 + (sizeof(DVCC_DVVC_BLOCK_TYPE_NAME) - 1))\n+                                + (2 + 1 + 4) + (2 + 1 + ISOM_DVCC_DVVC_SIZE);\n+\n+        if (dovi->dv_profile > 7) {\n+            type = MKBETAG('d', 'v', 'v', 'C');\n+        } else {\n+            type = MKBETAG('d', 'v', 'c', 'C');\n+        }\n+\n+        ff_isom_put_dvcc_dvvc(s, buf, dovi);\n+\n+        mapping = start_ebml_master(pb, MATROSKA_ID_TRACKBLKADDMAPPING, expected_size);\n+\n+        put_ebml_string(pb, MATROSKA_ID_BLKADDIDNAME, DVCC_DVVC_BLOCK_TYPE_NAME);\n+        put_ebml_uint(pb, MATROSKA_ID_BLKADDIDTYPE, type);\n+        put_ebml_binary(pb, MATROSKA_ID_BLKADDIDEXTRADATA, buf, sizeof(buf));\n+\n+        end_ebml_master(pb, mapping);\n+    }\n+}\n+\n static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,\n                            AVStream *st, mkv_track *track, AVIOContext *pb,\n                            int is_default)\n@@ -1311,6 +1343,11 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,\n         mkv_write_video_projection(s, pb, st);\n \n         end_ebml_master(pb, subinfo);\n+\n+        if (mkv->mode != MODE_WEBM) {\n+            mkv_write_dovi(s, pb, st);\n+        }\n+\n         break;\n \n     case AVMEDIA_TYPE_AUDIO:\n-- \n2.40.1\n\n"
  },
  {
    "path": "packages/multimedia/ffmpeg/patches/ffmpeg-force_sdl2.patch",
    "content": "--- a/configure\n+++ b/configure\n@@ -6579,15 +6579,13 @@\n \n if enabled sdl2; then\n     SDL2_CONFIG=\"${cross_prefix}sdl2-config\"\n-    test_pkg_config sdl2 \"sdl2 >= 2.0.1 sdl2 < 2.1.0\" SDL_events.h SDL_PollEvent\n-    if disabled sdl2 && \"${SDL2_CONFIG}\" --version > /dev/null 2>&1; then\n+    test_pkg_config sdl2 \"sdl2 >= 2.0.1\" SDL_events.h SDL_PollEvent\n         sdl2_cflags=$(\"${SDL2_CONFIG}\" --cflags)\n         sdl2_extralibs=$(\"${SDL2_CONFIG}\" --libs)\n         test_cpp_condition SDL.h \"(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001\" $sdl2_cflags &&\n         test_cpp_condition SDL.h \"(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100\" $sdl2_cflags &&\n         check_func_headers SDL_events.h SDL_PollEvent $sdl2_extralibs $sdl2_cflags &&\n             enable sdl2\n-    fi\n     if test $target_os = \"mingw32\"; then\n         sdl2_extralibs=$(filter_out '-mwindows' $sdl2_extralibs)\n     fi\n"
  },
  {
    "path": "packages/multimedia/ffmpeg/patches/ffmpeg-openssl3.patch",
    "content": "From 1d23e125b6f76e74b754560c3b6931507cacddce Mon Sep 17 00:00:00 2001\nFrom: Timo Rothenpieler <timo@rothenpieler.org>\nDate: Tue, 7 Sep 2021 19:35:31 +0200\nSubject: [PATCH] configure: account for openssl3 license change\n\n---\n configure | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/configure b/configure\nindex c87a010387..ed7345b2c1 100755\n--- a/configure\n+++ b/configure\n@@ -1765,7 +1765,6 @@ EXTERNAL_LIBRARY_GPL_LIST=\"\n EXTERNAL_LIBRARY_NONFREE_LIST=\"\n     decklink\n     libfdk_aac\n-    openssl\n     libtls\n \"\n \n@@ -1857,6 +1856,7 @@ EXTERNAL_LIBRARY_LIST=\"\n     mediacodec\n     openal\n     opengl\n+    openssl\n     pocketsphinx\n     vapoursynth\n \"\n@@ -6572,7 +6572,10 @@ enabled omx_rpi           && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoR\n                                die \"ERROR: OpenMAX IL headers from raspberrypi/firmware not found\"; } &&\n                              enable omx\n enabled omx               && require_headers OMX_Core.h\n-enabled openssl           && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||\n+enabled openssl           && { { check_pkg_config openssl \"openssl >= 3.0.0\" openssl/ssl.h OPENSSL_init_ssl &&\n+                                 { enabled gplv3 || ! enabled gpl || enabled nonfree || die \"ERROR: OpenSSL >=3.0.0 requires --enable-version3\"; }; } ||\n+                               { enabled gpl && ! enabled nonfree && die \"ERROR: OpenSSL <3.0.0 is incompatible with the gpl\"; } ||\n+                               check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||\n                                check_pkg_config openssl openssl openssl/ssl.h SSL_library_init ||\n                                check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||\n                                check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||\n-- \n2.34.1\n\n"
  },
  {
    "path": "packages/multimedia/ffmpeg/patches/kodi/ffmpeg-001-kodi.patch",
    "content": "From 5180cdc317139414eedcb49627d240519435b104 Mon Sep 17 00:00:00 2001\nFrom: marc <mhocking@ubuntu-desktop.(none)>\nDate: Mon, 18 Feb 2013 17:18:18 +0000\nSubject: [PATCH 01/15] dxva-h264: Fix an AMD driver issue with playback of\n streams that don't start with an I-Frame\n\n---\n libavcodec/dxva2_h264.c | 8 ++++++++\n libavcodec/h264_slice.c | 1 +\n libavcodec/h264dec.c    | 1 +\n libavcodec/h264dec.h    | 2 ++\n 4 files changed, 12 insertions(+)\n\ndiff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c\nindex 5b23b28f12..c0a8d80f3b 100644\n--- a/libavcodec/dxva2_h264.c\n+++ b/libavcodec/dxva2_h264.c\n@@ -504,6 +504,14 @@ static int dxva2_h264_end_frame(AVCodecContext *avctx)\n \n     if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)\n         return -1;\n+\n+    // Wait for an I-frame before start decoding. Workaround for ATI UVD and UVD+ GPUs\n+    if (!h->got_first_iframe) {\n+        if (!(ctx_pic->pp.wBitFields & (1 << 15)))\n+            return -1;\n+        h->got_first_iframe = 1;\n+    }\n+\n     ret = ff_dxva2_common_end_frame(avctx, h->cur_pic_ptr->f,\n                                     &ctx_pic->pp, sizeof(ctx_pic->pp),\n                                     &ctx_pic->qm, sizeof(ctx_pic->qm),\ndiff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c\nindex 7c69016338..0b415ada6f 100644\n--- a/libavcodec/h264_slice.c\n+++ b/libavcodec/h264_slice.c\n@@ -942,6 +942,7 @@ static int h264_slice_header_init(H264Context *h)\n \n     h->first_field           = 0;\n     h->prev_interlaced_frame = 1;\n+    h->got_first_iframe = 0;\n \n     init_scan_tables(h);\n     ret = ff_h264_alloc_tables(h);\ndiff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c\nindex 485f47d36e..1705046e29 100644\n--- a/libavcodec/h264dec.c\n+++ b/libavcodec/h264dec.c\n@@ -442,6 +442,7 @@ void ff_h264_flush_change(H264Context *h)\n \n     h->next_outputed_poc = INT_MIN;\n     h->prev_interlaced_frame = 1;\n+    h->got_first_iframe = 0;\n     idr(h);\n \n     h->poc.prev_frame_num = -1;\ndiff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h\nindex b3677cdbb9..b7b19ba4f1 100644\n--- a/libavcodec/h264dec.h\n+++ b/libavcodec/h264dec.h\n@@ -540,6 +540,8 @@ typedef struct H264Context {\n      * slices) anymore */\n     int setup_finished;\n \n+    int got_first_iframe;\n+\n     int cur_chroma_format_idc;\n     int cur_bit_depth_luma;\n     int16_t slice_row[MAX_SLICES]; ///< to detect when MAX_SLICES is too low\n\nFrom 02731d93b4c725f13bf3b3217b48db3be18e0bce Mon Sep 17 00:00:00 2001\nFrom: Rechi <Rechi@users.noreply.github.com>\nDate: Tue, 21 Nov 2017 08:16:53 +0100\nSubject: [PATCH 02/15] use Kodi as extra version\n\n---\n Makefile | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex 7e9d8b08c3..882a3cb31b 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -130,7 +130,7 @@ GIT_LOG     = $(SRC_PATH)/.git/logs/HEAD\n .version: M=@\n \n libavutil/ffversion.h .version:\n-\t$(M)$(VERSION_SH) $(SRC_PATH) libavutil/ffversion.h $(EXTRA_VERSION)\n+\t$(M)$(VERSION_SH) $(SRC_PATH) libavutil/ffversion.h Kodi\n \t$(Q)touch .version\n \n # force version.sh to run whenever version might have changed\n\nFrom 1ec811b6f330f60ec7a522cc60e98bd8ae30c766 Mon Sep 17 00:00:00 2001\nFrom: Rechi <Rechi@users.noreply.github.com>\nDate: Tue, 21 Nov 2017 08:16:53 +0100\nSubject: [PATCH 03/15] common.mak: never ignore an error if strip doesn't\n succeed\n\n---\n ffbuild/common.mak | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/ffbuild/common.mak b/ffbuild/common.mak\nindex 164a43932d..2ab5dd0dfd 100644\n--- a/ffbuild/common.mak\n+++ b/ffbuild/common.mak\n@@ -87,7 +87,7 @@ COMPILE_MSA = $(call COMPILE,CC,MSAFLAGS)\n \n %.o: %.asm\n \t$(COMPILE_X86ASM)\n-\t-$(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@)\n+\t$(if $(STRIP), $(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@))\n \n %.o: %.rc\n \t$(WINDRES) $(IFLAGS) $(foreach ARG,$(CC_DEPFLAGS),--preprocessor-arg \"$(ARG)\") -o $@ $<\n\nFrom 29b9dec3de00f69339e6a5fed79b2d8ce2b3c105 Mon Sep 17 00:00:00 2001\nFrom: wsnipex <wsnipex@a1.net>\nDate: Tue, 21 Nov 2017 08:16:53 +0100\nSubject: [PATCH 04/15] only check for a git rev if the src tree is in a git\n repo\n\nfixes the version string when building from the kodi depends src tree\n---\n ffbuild/version.sh | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/ffbuild/version.sh b/ffbuild/version.sh\nindex edc4dd33c5..239a138ca7 100755\n--- a/ffbuild/version.sh\n+++ b/ffbuild/version.sh\n@@ -2,6 +2,7 @@\n \n # Usage: version.sh <ffmpeg-root-dir> <output-version.h> <extra-version>\n \n+if [ -d $1/.git ]; then  # only check for a git rev, if the src tree is in a git repo\n # check for git short hash\n if ! test \"$revision\"; then\n     if (cd \"$1\" && grep git RELEASE 2> /dev/null >/dev/null) ; then\n@@ -27,6 +28,7 @@ if [ -z \"$revision\" ]; then\n       git_hash=\"${srcdir##*-}\";;\n   esac\n fi\n+fi\n \n # no revision number found\n test \"$revision\" || revision=$(cd \"$1\" && cat RELEASE 2> /dev/null)\n\nFrom d2e9030c8a0d55426e13d1007e163c48f2533819 Mon Sep 17 00:00:00 2001\nFrom: Anton Fedchin <afedchin at ruswizards.com>\nDate: Fri, 11 Jan 2019 10:47:43 +0100\nSubject: [PATCH 05/15] after 153b36f there is a possibility to crash when\n trying to get index of a surface which points to nirvana.\n\nit may occurs when a stream starts with non i-frame.\n---\n libavcodec/dxva2.c | 10 ++++++----\n 1 file changed, 6 insertions(+), 4 deletions(-)\n\ndiff --git a/libavcodec/dxva2.c b/libavcodec/dxva2.c\nindex b57ea21941..542bc2f18d 100644\n--- a/libavcodec/dxva2.c\n+++ b/libavcodec/dxva2.c\n@@ -777,16 +777,18 @@ unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx,\n #if CONFIG_D3D11VA\n     if (avctx->pix_fmt == AV_PIX_FMT_D3D11)\n         return (intptr_t)frame->data[1];\n-    if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD) {\n+    if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD && surface) {\n         D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC viewDesc;\n         ID3D11VideoDecoderOutputView_GetDesc((ID3D11VideoDecoderOutputView*) surface, &viewDesc);\n         return viewDesc.Texture2D.ArraySlice;\n     }\n #endif\n #if CONFIG_DXVA2\n-    for (i = 0; i < DXVA_CONTEXT_COUNT(avctx, ctx); i++) {\n-        if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD && ctx->dxva2.surface[i] == surface)\n-            return i;\n+    if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD) {\n+        for (i = 0; i < DXVA_CONTEXT_COUNT(avctx, ctx); i++) {\n+            if (ctx->dxva2.surface[i] == surface)\n+                return i;\n+        }\n     }\n #endif\n \n\nFrom 916223c0a47091272c9d0b6035f187310908ff37 Mon Sep 17 00:00:00 2001\nFrom: Rainer Hochecker <fernetmenta@online.de>\nDate: Sat, 26 Jan 2019 19:48:35 +0100\nSubject: [PATCH 06/15] avcodec/vaapi_h264: skip decode if pic has no slices\n\nThis fixes / workarounds https://bugs.freedesktop.org/show_bug.cgi?id=105368.\nIt was hit frequently when watching h264 channels received via DVB-X.\nCorresponding kodi bug: https://github.com/xbmc/xbmc/issues/15704\n---\n libavcodec/vaapi_h264.c | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c\nindex 9332aa6f31..d4494beebf 100644\n--- a/libavcodec/vaapi_h264.c\n+++ b/libavcodec/vaapi_h264.c\n@@ -314,6 +314,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx)\n     H264SliceContext *sl = &h->slice_ctx[0];\n     int ret;\n \n+    if (pic->nb_slices == 0) {\n+        ret = AVERROR_INVALIDDATA;\n+        goto finish;\n+    }\n+\n     ret = ff_vaapi_decode_issue(avctx, pic);\n     if (ret < 0)\n         goto finish;\n\nFrom b211c09d17ef86d7b38d1bfe9814a01e9040bf03 Mon Sep 17 00:00:00 2001\nFrom: Fei Wang <fei.w.wang@intel.com>\nDate: Tue, 12 Oct 2021 16:23:56 +0800\nSubject: [PATCH 07/15] cbs_av1: fix incorrect data type\n\nSince order_hint_bits_minus_1 range is 0~7, cur_frame_hint can be\nmost 128. And similar return value for cbs_av1_get_relative_dist.\nSo if plus them and use int8_t for the result may lose its precision.\n\nSigned-off-by: Fei Wang <fei.w.wang@intel.com>\n(cherry picked from commit e7ff5722b1abae4284e79da707e71ff82b409699)\n(cherry picked from commit 8aab15a91d6e8ca726580e969ff71828ad63baaa)\n---\n libavcodec/cbs_av1_syntax_template.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c\nindex 6fe6e9a4f3..d98d3d42de 100644\n--- a/libavcodec/cbs_av1_syntax_template.c\n+++ b/libavcodec/cbs_av1_syntax_template.c\n@@ -355,7 +355,7 @@ static int FUNC(set_frame_refs)(CodedBitstreamContext *ctx, RWContext *rw,\n         AV1_REF_FRAME_ALTREF2, AV1_REF_FRAME_ALTREF\n     };\n     int8_t ref_frame_idx[AV1_REFS_PER_FRAME], used_frame[AV1_NUM_REF_FRAMES];\n-    int8_t shifted_order_hints[AV1_NUM_REF_FRAMES];\n+    int16_t shifted_order_hints[AV1_NUM_REF_FRAMES];\n     int cur_frame_hint, latest_order_hint, earliest_order_hint, ref;\n     int i, j;\n \n\nFrom 2db5def80f1913a00410d6f16ae3730de567c3b8 Mon Sep 17 00:00:00 2001\nFrom: Fei Wang <fei.w.wang@intel.com>\nDate: Tue, 12 Oct 2021 16:23:57 +0800\nSubject: [PATCH 08/15] avcodec/av1: extend some definitions in spec section 3\n\nSigned-off-by: Fei Wang <fei.w.wang@intel.com>\n(cherry picked from commit 75de7fe26218cb37fff9d5afa7b5b2b8bee4a9a8)\n(cherry picked from commit 2f459697445df67cc61c9a6c2930fdf3f830e629)\n---\n libavcodec/av1.h | 7 +++++++\n 1 file changed, 7 insertions(+)\n\ndiff --git a/libavcodec/av1.h b/libavcodec/av1.h\nindex 0f99ae4829..951a18ecb2 100644\n--- a/libavcodec/av1.h\n+++ b/libavcodec/av1.h\n@@ -114,6 +114,13 @@ enum {\n     AV1_WARP_MODEL_TRANSLATION = 1,\n     AV1_WARP_MODEL_ROTZOOM     = 2,\n     AV1_WARP_MODEL_AFFINE      = 3,\n+    AV1_WARP_PARAM_REDUCE_BITS = 6,\n+\n+    AV1_DIV_LUT_BITS      = 8,\n+    AV1_DIV_LUT_PREC_BITS = 14,\n+    AV1_DIV_LUT_NUM       = 257,\n+\n+    AV1_MAX_LOOP_FILTER = 63,\n };\n \n \n\nFrom ddc3058a3e7b7c44a3911fb356f932853565b3d0 Mon Sep 17 00:00:00 2001\nFrom: Fei Wang <fei.w.wang@intel.com>\nDate: Tue, 12 Oct 2021 16:23:58 +0800\nSubject: [PATCH 09/15] avcodec/av1dec: support setup shear process\n\nDefined in spec 7.11.3.6/7.11.3.7.\n\nSigned-off-by: Fei Wang <fei.w.wang@intel.com>\n(cherry picked from commit de7475b111679120b3b089fe543224f50882287c)\n(cherry picked from commit 481d3930d90d52587ad76d277cbd2f9cb3109079)\n---\n libavcodec/av1dec.c | 98 +++++++++++++++++++++++++++++++++++++++++++++\n libavcodec/av1dec.h |  1 +\n 2 files changed, 99 insertions(+)\n\ndiff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c\nindex a75d6744d3..a3301f454f 100644\n--- a/libavcodec/av1dec.c\n+++ b/libavcodec/av1dec.c\n@@ -28,6 +28,34 @@\n #include \"internal.h\"\n #include \"profiles.h\"\n \n+/**< same with Div_Lut defined in spec 7.11.3.7 */\n+static const uint16_t div_lut[AV1_DIV_LUT_NUM] = {\n+  16384, 16320, 16257, 16194, 16132, 16070, 16009, 15948, 15888, 15828, 15768,\n+  15709, 15650, 15592, 15534, 15477, 15420, 15364, 15308, 15252, 15197, 15142,\n+  15087, 15033, 14980, 14926, 14873, 14821, 14769, 14717, 14665, 14614, 14564,\n+  14513, 14463, 14413, 14364, 14315, 14266, 14218, 14170, 14122, 14075, 14028,\n+  13981, 13935, 13888, 13843, 13797, 13752, 13707, 13662, 13618, 13574, 13530,\n+  13487, 13443, 13400, 13358, 13315, 13273, 13231, 13190, 13148, 13107, 13066,\n+  13026, 12985, 12945, 12906, 12866, 12827, 12788, 12749, 12710, 12672, 12633,\n+  12596, 12558, 12520, 12483, 12446, 12409, 12373, 12336, 12300, 12264, 12228,\n+  12193, 12157, 12122, 12087, 12053, 12018, 11984, 11950, 11916, 11882, 11848,\n+  11815, 11782, 11749, 11716, 11683, 11651, 11619, 11586, 11555, 11523, 11491,\n+  11460, 11429, 11398, 11367, 11336, 11305, 11275, 11245, 11215, 11185, 11155,\n+  11125, 11096, 11067, 11038, 11009, 10980, 10951, 10923, 10894, 10866, 10838,\n+  10810, 10782, 10755, 10727, 10700, 10673, 10645, 10618, 10592, 10565, 10538,\n+  10512, 10486, 10460, 10434, 10408, 10382, 10356, 10331, 10305, 10280, 10255,\n+  10230, 10205, 10180, 10156, 10131, 10107, 10082, 10058, 10034, 10010, 9986,\n+  9963,  9939,  9916,  9892,  9869,  9846,  9823,  9800,  9777,  9754,  9732,\n+  9709,  9687,  9664,  9642,  9620,  9598,  9576,  9554,  9533,  9511,  9489,\n+  9468,  9447,  9425,  9404,  9383,  9362,  9341,  9321,  9300,  9279,  9259,\n+  9239,  9218,  9198,  9178,  9158,  9138,  9118,  9098,  9079,  9059,  9039,\n+  9020,  9001,  8981,  8962,  8943,  8924,  8905,  8886,  8867,  8849,  8830,\n+  8812,  8793,  8775,  8756,  8738,  8720,  8702,  8684,  8666,  8648,  8630,\n+  8613,  8595,  8577,  8560,  8542,  8525,  8508,  8490,  8473,  8456,  8439,\n+  8422,  8405,  8389,  8372,  8355,  8339,  8322,  8306,  8289,  8273,  8257,\n+  8240,  8224,  8208,  8192\n+};\n+\n static uint32_t inverse_recenter(int r, uint32_t v)\n {\n     if (v > 2 * r)\n@@ -97,6 +125,70 @@ static void read_global_param(AV1DecContext *s, int type, int ref, int idx)\n                                        -mx, mx + 1, r) << prec_diff) + round;\n }\n \n+static uint64_t round_two(uint64_t x, uint16_t n)\n+{\n+    if (n == 0)\n+        return x;\n+    return ((x + ((uint64_t)1 << (n - 1))) >> n);\n+}\n+\n+static int64_t round_two_signed(int64_t x, uint16_t n)\n+{\n+    return ((x<0) ? -((int64_t)round_two(-x, n)) : (int64_t)round_two(x, n));\n+}\n+\n+/**\n+ * Resolve divisor process.\n+ * see spec 7.11.3.7\n+ */\n+static int16_t resolve_divisor(uint32_t d, uint16_t *shift)\n+{\n+    int32_t e, f;\n+\n+    *shift = av_log2(d);\n+    e = d - (1 << (*shift));\n+    if (*shift > AV1_DIV_LUT_BITS)\n+        f = round_two(e, *shift - AV1_DIV_LUT_BITS);\n+    else\n+        f = e << (AV1_DIV_LUT_BITS - (*shift));\n+\n+    *shift += AV1_DIV_LUT_PREC_BITS;\n+\n+    return div_lut[f];\n+}\n+\n+/**\n+ * check if global motion params is valid.\n+ * see spec 7.11.3.6\n+ */\n+static uint8_t get_shear_params_valid(AV1DecContext *s, int idx)\n+{\n+    int16_t alpha, beta, gamma, delta, divf, divs;\n+    int64_t v, w;\n+    int32_t *param = &s->cur_frame.gm_params[idx][0];\n+    if (param[2] < 0)\n+        return 0;\n+\n+    alpha = av_clip_int16(param[2] - (1 << AV1_WARPEDMODEL_PREC_BITS));\n+    beta  = av_clip_int16(param[3]);\n+    divf  = resolve_divisor(abs(param[2]), &divs);\n+    v     = (int64_t)param[4] * (1 << AV1_WARPEDMODEL_PREC_BITS);\n+    w     = (int64_t)param[3] * param[4];\n+    gamma = av_clip_int16((int)round_two_signed((v * divf), divs));\n+    delta = av_clip_int16(param[5] - (int)round_two_signed((w * divf), divs) - (1 << AV1_WARPEDMODEL_PREC_BITS));\n+\n+    alpha = round_two_signed(alpha, AV1_WARP_PARAM_REDUCE_BITS) << AV1_WARP_PARAM_REDUCE_BITS;\n+    beta  = round_two_signed(beta,  AV1_WARP_PARAM_REDUCE_BITS) << AV1_WARP_PARAM_REDUCE_BITS;\n+    gamma = round_two_signed(gamma, AV1_WARP_PARAM_REDUCE_BITS) << AV1_WARP_PARAM_REDUCE_BITS;\n+    delta = round_two_signed(delta, AV1_WARP_PARAM_REDUCE_BITS) << AV1_WARP_PARAM_REDUCE_BITS;\n+\n+    if ((4 * abs(alpha) + 7 * abs(beta)) >= (1 << AV1_WARPEDMODEL_PREC_BITS) ||\n+        (4 * abs(gamma) + 4 * abs(delta)) >= (1 << AV1_WARPEDMODEL_PREC_BITS))\n+        return 0;\n+\n+    return 1;\n+}\n+\n /**\n * update gm type/params, since cbs already implemented part of this funcation,\n * so we don't need to full implement spec.\n@@ -144,6 +236,9 @@ static void global_motion_params(AV1DecContext *s)\n             read_global_param(s, type, ref, 0);\n             read_global_param(s, type, ref, 1);\n         }\n+        if (type <= AV1_WARP_MODEL_AFFINE) {\n+            s->cur_frame.gm_invalid[ref] = !get_shear_params_valid(s, ref);\n+        }\n     }\n }\n \n@@ -509,6 +604,9 @@ static int av1_frame_ref(AVCodecContext *avctx, AV1Frame *dst, const AV1Frame *s\n \n     dst->spatial_id = src->spatial_id;\n     dst->temporal_id = src->temporal_id;\n+    memcpy(dst->gm_invalid,\n+           src->gm_invalid,\n+           AV1_NUM_REF_FRAMES * sizeof(uint8_t));\n     memcpy(dst->gm_type,\n            src->gm_type,\n            AV1_NUM_REF_FRAMES * sizeof(uint8_t));\ndiff --git a/libavcodec/av1dec.h b/libavcodec/av1dec.h\nindex 248a68750f..4e140588b9 100644\n--- a/libavcodec/av1dec.h\n+++ b/libavcodec/av1dec.h\n@@ -42,6 +42,7 @@ typedef struct AV1Frame {\n     int temporal_id;\n     int spatial_id;\n \n+    uint8_t gm_invalid[AV1_NUM_REF_FRAMES];\n     uint8_t gm_type[AV1_NUM_REF_FRAMES];\n     int32_t gm_params[AV1_NUM_REF_FRAMES][6];\n \n\nFrom ad58733c84c131216e04ceb39d0dff64bfac5a2c Mon Sep 17 00:00:00 2001\nFrom: Fei Wang <fei.w.wang@intel.com>\nDate: Tue, 12 Oct 2021 16:23:59 +0800\nSubject: [PATCH 10/15] avcodec/av1_vaapi: add gm params valid check\n\nSigned-off-by: Fei Wang <fei.w.wang@intel.com>\n(cherry picked from commit 0d0ea70e7bdd85def85d526480d728740a371744)\n(cherry picked from commit 8b9a48b7aa3c14103f975035bb18601b13ed1707)\n---\n libavcodec/vaapi_av1.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c\nindex 16b7e35747..f577447be4 100644\n--- a/libavcodec/vaapi_av1.c\n+++ b/libavcodec/vaapi_av1.c\n@@ -213,7 +213,8 @@ static int vaapi_av1_start_frame(AVCodecContext *avctx,\n             frame_header->height_in_sbs_minus_1[i];\n     }\n     for (int i = AV1_REF_FRAME_LAST; i <= AV1_REF_FRAME_ALTREF; i++) {\n-        pic_param.wm[i - 1].wmtype = s->cur_frame.gm_type[i];\n+        pic_param.wm[i - 1].invalid = s->cur_frame.gm_invalid[i];\n+        pic_param.wm[i - 1].wmtype  = s->cur_frame.gm_type[i];\n         for (int j = 0; j < 6; j++)\n             pic_param.wm[i - 1].wmmat[j] = s->cur_frame.gm_params[i][j];\n     }\n\nFrom fd1acddbee3686c97c2c38cc4befea38794eb44d Mon Sep 17 00:00:00 2001\nFrom: Tong Wu <tong1.wu@intel.com>\nDate: Tue, 12 Oct 2021 16:24:00 +0800\nSubject: [PATCH 11/15] avcodec/dxva2_av1: fix global motion params\n\nDefined in spec 5.9.24/5.9.25. Since function void\nglobal_motion_params(AV1DecContext *s) already updates\ngm type/params, the wminvalid parameter only need to get\nthe value from cur_frame.gm_invalid.\n\nSigned-off-by: Tong Wu <tong1.wu@intel.com>\n(cherry picked from commit 4e7a7d75e3c21a6af03c4cd52ffc50270664e58a)\n(cherry picked from commit 03f5a57b9364d7ce789589594450fdf714a23e70)\n---\n libavcodec/dxva2_av1.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/libavcodec/dxva2_av1.c b/libavcodec/dxva2_av1.c\nindex c30b57799c..8a912bf6c1 100644\n--- a/libavcodec/dxva2_av1.c\n+++ b/libavcodec/dxva2_av1.c\n@@ -139,7 +139,7 @@ static int fill_picture_parameters(const AVCodecContext *avctx, AVDXVAContext *c\n         pp->frame_refs[i].Index  = ref_frame->buf[0] ? ref_idx : 0xFF;\n \n         /* Global Motion */\n-        pp->frame_refs[i].wminvalid = (h->cur_frame.gm_type[AV1_REF_FRAME_LAST + i] == AV1_WARP_MODEL_IDENTITY);\n+        pp->frame_refs[i].wminvalid = h->cur_frame.gm_invalid[AV1_REF_FRAME_LAST + i];\n         pp->frame_refs[i].wmtype    = h->cur_frame.gm_type[AV1_REF_FRAME_LAST + i];\n         for (j = 0; j < 6; ++j) {\n              pp->frame_refs[i].wmmat[j] = h->cur_frame.gm_params[AV1_REF_FRAME_LAST + i][j];\n\nFrom 06181d3fd98d040ad2e1cb297896b3ba9235a9b4 Mon Sep 17 00:00:00 2001\nFrom: Fei Wang <fei.w.wang@intel.com>\nDate: Tue, 12 Oct 2021 16:24:01 +0800\nSubject: [PATCH 12/15] avcodec/vaapi: increase av1 decode pool size\n\nFor film grain clip, vaapi_av1 decoder will cache additional 8\nsurfaces that will be used to store frames which apply film grain.\nSo increase the pool size by plus 8 to avoid leak of surface.\n\nSigned-off-by: Fei Wang <fei.w.wang@intel.com>\n(cherry picked from commit 53403158cc19b9e5baeff6af9317f14d1a20d0cb)\n(cherry picked from commit 5774a0524c0851293a36acf3f3586e7c39a64b4a)\n---\n libavcodec/vaapi_decode.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c\nindex 57a0eb4e6e..032e8531f2 100644\n--- a/libavcodec/vaapi_decode.c\n+++ b/libavcodec/vaapi_decode.c\n@@ -577,10 +577,10 @@ static int vaapi_decode_make_config(AVCodecContext *avctx,\n         switch (avctx->codec_id) {\n         case AV_CODEC_ID_H264:\n         case AV_CODEC_ID_HEVC:\n+        case AV_CODEC_ID_AV1:\n             frames->initial_pool_size += 16;\n             break;\n         case AV_CODEC_ID_VP9:\n-        case AV_CODEC_ID_AV1:\n             frames->initial_pool_size += 8;\n             break;\n         case AV_CODEC_ID_VP8:\n\nFrom 1d82fef4ddc4e5512219c8c0e2e93fe351d1f65a Mon Sep 17 00:00:00 2001\nFrom: Fei Wang <fei.w.wang@intel.com>\nDate: Tue, 12 Oct 2021 16:24:02 +0800\nSubject: [PATCH 13/15] avcodec/av1_vaapi: setting 2 output surface for film\n grain\n\nVAAPI needs 2 output surface for film grain frame. One used for\nreference and the other used for applying film grain and pushing\nto downstream.\n\nSigned-off-by: Fei Wang <fei.w.wang@intel.com>\n(cherry picked from commit 7871144cf801bc8b9e3b00319dd7c3c3d91dd3fa)\n(cherry picked from commit 5962698d25f148d6b89dc4e526fffc5db2295f1e)\n---\n libavcodec/vaapi_av1.c | 115 ++++++++++++++++++++++++++++++++++++++---\n 1 file changed, 108 insertions(+), 7 deletions(-)\n\ndiff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c\nindex f577447be4..26476c7738 100644\n--- a/libavcodec/vaapi_av1.c\n+++ b/libavcodec/vaapi_av1.c\n@@ -21,8 +21,28 @@\n #include \"libavutil/pixdesc.h\"\n #include \"hwconfig.h\"\n #include \"vaapi_decode.h\"\n+#include \"internal.h\"\n #include \"av1dec.h\"\n \n+typedef struct VAAPIAV1FrameRef {\n+    ThreadFrame frame;\n+    int valid;\n+} VAAPIAV1FrameRef;\n+\n+typedef struct VAAPIAV1DecContext {\n+    VAAPIDecodeContext base;\n+\n+    /**\n+     * For film grain case, VAAPI generate 2 output for each frame,\n+     * current_frame will not apply film grain, and will be used for\n+     * references for next frames. Maintain the reference list without\n+     * applying film grain here. And current_display_picture will be\n+     * used to apply film grain and push to downstream.\n+    */\n+    VAAPIAV1FrameRef ref_tab[AV1_NUM_REF_FRAMES];\n+    ThreadFrame tmp_frame;\n+} VAAPIAV1DecContext;\n+\n static VASurfaceID vaapi_av1_surface_id(AV1Frame *vf)\n {\n     if (vf)\n@@ -49,6 +69,48 @@ static int8_t vaapi_av1_get_bit_depth_idx(AVCodecContext *avctx)\n     return bit_depth == 8 ? 0 : bit_depth == 10 ? 1 : 2;\n }\n \n+static int vaapi_av1_decode_init(AVCodecContext *avctx)\n+{\n+    VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data;\n+\n+    ctx->tmp_frame.f = av_frame_alloc();\n+    if (!ctx->tmp_frame.f) {\n+        av_log(avctx, AV_LOG_ERROR,\n+               \"Failed to allocate frame.\\n\");\n+        return AVERROR(ENOMEM);\n+    }\n+\n+    for (int i = 0; i < FF_ARRAY_ELEMS(ctx->ref_tab); i++) {\n+        ctx->ref_tab[i].frame.f = av_frame_alloc();\n+        if (!ctx->ref_tab[i].frame.f) {\n+            av_log(avctx, AV_LOG_ERROR,\n+                   \"Failed to allocate reference table frame %d.\\n\", i);\n+            return AVERROR(ENOMEM);\n+        }\n+        ctx->ref_tab[i].valid = 0;\n+    }\n+\n+    return ff_vaapi_decode_init(avctx);\n+}\n+\n+static int vaapi_av1_decode_uninit(AVCodecContext *avctx)\n+{\n+    VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data;\n+\n+    if (ctx->tmp_frame.f->buf[0])\n+        ff_thread_release_buffer(avctx, &ctx->tmp_frame);\n+    av_frame_free(&ctx->tmp_frame.f);\n+\n+    for (int i = 0; i < FF_ARRAY_ELEMS(ctx->ref_tab); i++) {\n+        if (ctx->ref_tab[i].frame.f->buf[0])\n+            ff_thread_release_buffer(avctx, &ctx->ref_tab[i].frame);\n+        av_frame_free(&ctx->ref_tab[i].frame.f);\n+    }\n+\n+    return ff_vaapi_decode_uninit(avctx);\n+}\n+\n+\n static int vaapi_av1_start_frame(AVCodecContext *avctx,\n                                  av_unused const uint8_t *buffer,\n                                  av_unused uint32_t size)\n@@ -58,18 +120,28 @@ static int vaapi_av1_start_frame(AVCodecContext *avctx,\n     const AV1RawFrameHeader *frame_header = s->raw_frame_header;\n     const AV1RawFilmGrainParams *film_grain = &s->cur_frame.film_grain;\n     VAAPIDecodePicture *pic = s->cur_frame.hwaccel_picture_private;\n+    VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data;\n     VADecPictureParameterBufferAV1 pic_param;\n     int8_t bit_depth_idx;\n     int err = 0;\n     int apply_grain = !(avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) && film_grain->apply_grain;\n     uint8_t remap_lr_type[4] = {AV1_RESTORE_NONE, AV1_RESTORE_SWITCHABLE, AV1_RESTORE_WIENER, AV1_RESTORE_SGRPROJ};\n \n-    pic->output_surface = vaapi_av1_surface_id(&s->cur_frame);\n-\n     bit_depth_idx = vaapi_av1_get_bit_depth_idx(avctx);\n     if (bit_depth_idx < 0)\n         goto fail;\n \n+    if (apply_grain) {\n+        if (ctx->tmp_frame.f->buf[0])\n+            ff_thread_release_buffer(avctx, &ctx->tmp_frame);\n+        err = ff_thread_get_buffer(avctx, &ctx->tmp_frame, AV_GET_BUFFER_FLAG_REF);\n+        if (err < 0)\n+            goto fail;\n+        pic->output_surface = ff_vaapi_get_surface_id(ctx->tmp_frame.f);\n+    } else {\n+        pic->output_surface = vaapi_av1_surface_id(&s->cur_frame);\n+    }\n+\n     memset(&pic_param, 0, sizeof(VADecPictureParameterBufferAV1));\n     pic_param = (VADecPictureParameterBufferAV1) {\n         .profile                 = seq->seq_profile,\n@@ -77,6 +149,7 @@ static int vaapi_av1_start_frame(AVCodecContext *avctx,\n         .bit_depth_idx           = bit_depth_idx,\n         .current_frame           = pic->output_surface,\n         .current_display_picture = pic->output_surface,\n+        .current_display_picture = vaapi_av1_surface_id(&s->cur_frame),\n         .frame_width_minus1      = frame_header->frame_width_minus_1,\n         .frame_height_minus1     = frame_header->frame_height_minus_1,\n         .primary_ref_frame       = frame_header->primary_ref_frame,\n@@ -185,7 +258,9 @@ static int vaapi_av1_start_frame(AVCodecContext *avctx,\n         if (pic_param.pic_info_fields.bits.frame_type == AV1_FRAME_KEY)\n             pic_param.ref_frame_map[i] = VA_INVALID_ID;\n         else\n-            pic_param.ref_frame_map[i] = vaapi_av1_surface_id(&s->ref[i]);\n+            pic_param.ref_frame_map[i] = ctx->ref_tab[i].valid ?\n+                                         ff_vaapi_get_surface_id(ctx->ref_tab[i].frame.f) :\n+                                         vaapi_av1_surface_id(&s->ref[i]);\n     }\n     for (int i = 0; i < AV1_REFS_PER_FRAME; i++) {\n         pic_param.ref_frame_idx[i] = frame_header->ref_frame_idx[i];\n@@ -264,8 +339,34 @@ fail:\n static int vaapi_av1_end_frame(AVCodecContext *avctx)\n {\n     const AV1DecContext *s = avctx->priv_data;\n+    const AV1RawFrameHeader *header = s->raw_frame_header;\n+    const AV1RawFilmGrainParams *film_grain = &s->cur_frame.film_grain;\n     VAAPIDecodePicture *pic = s->cur_frame.hwaccel_picture_private;\n-    return ff_vaapi_decode_issue(avctx, pic);\n+    VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data;\n+\n+    int apply_grain = !(avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) && film_grain->apply_grain;\n+    int ret;\n+    ret = ff_vaapi_decode_issue(avctx, pic);\n+    if (ret < 0)\n+        return ret;\n+\n+    for (int i = 0; i < AV1_NUM_REF_FRAMES; i++) {\n+        if (header->refresh_frame_flags & (1 << i)) {\n+            if (ctx->ref_tab[i].frame.f->buf[0])\n+                ff_thread_release_buffer(avctx, &ctx->ref_tab[i].frame);\n+\n+            if (apply_grain) {\n+                ret = ff_thread_ref_frame(&ctx->ref_tab[i].frame, &ctx->tmp_frame);\n+                if (ret < 0)\n+                    return ret;\n+                ctx->ref_tab[i].valid = 1;\n+            } else {\n+                ctx->ref_tab[i].valid = 0;\n+            }\n+        }\n+    }\n+\n+    return 0;\n }\n \n static int vaapi_av1_decode_slice(AVCodecContext *avctx,\n@@ -312,9 +413,9 @@ const AVHWAccel ff_av1_vaapi_hwaccel = {\n     .end_frame            = vaapi_av1_end_frame,\n     .decode_slice         = vaapi_av1_decode_slice,\n     .frame_priv_data_size = sizeof(VAAPIDecodePicture),\n-    .init                 = ff_vaapi_decode_init,\n-    .uninit               = ff_vaapi_decode_uninit,\n+    .init                 = vaapi_av1_decode_init,\n+    .uninit               = vaapi_av1_decode_uninit,\n     .frame_params         = ff_vaapi_common_frame_params,\n-    .priv_data_size       = sizeof(VAAPIDecodeContext),\n+    .priv_data_size       = sizeof(VAAPIAV1DecContext),\n     .caps_internal        = HWACCEL_CAP_ASYNC_SAFE,\n };\n\nFrom be18092cec1867b5e30525e023f49c5e7547931b Mon Sep 17 00:00:00 2001\nFrom: Fei Wang <fei.w.wang@intel.com>\nDate: Tue, 12 Oct 2021 16:24:03 +0800\nSubject: [PATCH 14/15] avcodec/av1_vaapi: enable segmentation features\n\nSigned-off-by: Fei Wang <fei.w.wang@intel.com>\n(cherry picked from commit dc94f2eaaf0ae623d7dc02e1273c829015c025a3)\n(cherry picked from commit 582fb329a483774f0345cbfebc3a12f0ad8f5bba)\n---\n libavcodec/vaapi_av1.c | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)\n\ndiff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c\nindex 26476c7738..c57d1b898a 100644\n--- a/libavcodec/vaapi_av1.c\n+++ b/libavcodec/vaapi_av1.c\n@@ -126,6 +126,9 @@ static int vaapi_av1_start_frame(AVCodecContext *avctx,\n     int err = 0;\n     int apply_grain = !(avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) && film_grain->apply_grain;\n     uint8_t remap_lr_type[4] = {AV1_RESTORE_NONE, AV1_RESTORE_SWITCHABLE, AV1_RESTORE_WIENER, AV1_RESTORE_SGRPROJ};\n+    uint8_t segmentation_feature_signed[AV1_SEG_LVL_MAX] = {1, 1, 1, 1, 1, 0, 0, 0};\n+    uint8_t segmentation_feature_max[AV1_SEG_LVL_MAX] = {255, AV1_MAX_LOOP_FILTER,\n+        AV1_MAX_LOOP_FILTER, AV1_MAX_LOOP_FILTER, AV1_MAX_LOOP_FILTER, 7 , 0 , 0 };\n \n     bit_depth_idx = vaapi_av1_get_bit_depth_idx(avctx);\n     if (bit_depth_idx < 0)\n@@ -293,6 +296,17 @@ static int vaapi_av1_start_frame(AVCodecContext *avctx,\n         for (int j = 0; j < 6; j++)\n             pic_param.wm[i - 1].wmmat[j] = s->cur_frame.gm_params[i][j];\n     }\n+    for (int i = 0; i < AV1_MAX_SEGMENTS; i++) {\n+        for (int j = 0; j < AV1_SEG_LVL_MAX; j++) {\n+            pic_param.seg_info.feature_mask[i] |= (frame_header->feature_enabled[i][j] << j);\n+            if (segmentation_feature_signed[j])\n+                pic_param.seg_info.feature_data[i][j] = av_clip(frame_header->feature_value[i][j],\n+                    -segmentation_feature_max[j], segmentation_feature_max[j]);\n+            else\n+                pic_param.seg_info.feature_data[i][j] = av_clip(frame_header->feature_value[i][j],\n+                    0, segmentation_feature_max[j]);\n+        }\n+    }\n     if (apply_grain) {\n         for (int i = 0; i < film_grain->num_y_points; i++) {\n             pic_param.film_grain_info.point_y_value[i] =\n\nFrom 293e067b0c0f592628ee0de71769ed2e9c3d07f2 Mon Sep 17 00:00:00 2001\nFrom: Fei Wang <fei.w.wang@intel.com>\nDate: Tue, 12 Oct 2021 16:24:04 +0800\nSubject: [PATCH 15/15] avcodec/av1_vaapi: improve decode quality\n\n- quantizer delta and matrix level specific.\n- support loop filter delta.\n- support use superres.\n\nSigned-off-by: Fei Wang <fei.w.wang@intel.com>\n(cherry picked from commit 84c73102d933c9b7f64f504196c91edddad99618)\n(cherry picked from commit 2c887141b8318b7d4b198461bbb8d94ac662a96c)\n---\n libavcodec/vaapi_av1.c | 68 +++++++++++++++++++++++++-----------------\n 1 file changed, 41 insertions(+), 27 deletions(-)\n\ndiff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c\nindex c57d1b898a..5985493b8d 100644\n--- a/libavcodec/vaapi_av1.c\n+++ b/libavcodec/vaapi_av1.c\n@@ -147,27 +147,35 @@ static int vaapi_av1_start_frame(AVCodecContext *avctx,\n \n     memset(&pic_param, 0, sizeof(VADecPictureParameterBufferAV1));\n     pic_param = (VADecPictureParameterBufferAV1) {\n-        .profile                 = seq->seq_profile,\n-        .order_hint_bits_minus_1 = seq->order_hint_bits_minus_1,\n-        .bit_depth_idx           = bit_depth_idx,\n-        .current_frame           = pic->output_surface,\n-        .current_display_picture = pic->output_surface,\n-        .current_display_picture = vaapi_av1_surface_id(&s->cur_frame),\n-        .frame_width_minus1      = frame_header->frame_width_minus_1,\n-        .frame_height_minus1     = frame_header->frame_height_minus_1,\n-        .primary_ref_frame       = frame_header->primary_ref_frame,\n-        .order_hint              = frame_header->order_hint,\n-        .tile_cols               = frame_header->tile_cols,\n-        .tile_rows               = frame_header->tile_rows,\n-        .context_update_tile_id  = frame_header->context_update_tile_id,\n-        .interp_filter           = frame_header->interpolation_filter,\n-        .filter_level[0]         = frame_header->loop_filter_level[0],\n-        .filter_level[1]         = frame_header->loop_filter_level[1],\n-        .filter_level_u          = frame_header->loop_filter_level[2],\n-        .filter_level_v          = frame_header->loop_filter_level[3],\n-        .base_qindex             = frame_header->base_q_idx,\n-        .cdef_damping_minus_3    = frame_header->cdef_damping_minus_3,\n-        .cdef_bits               = frame_header->cdef_bits,\n+        .profile                    = seq->seq_profile,\n+        .order_hint_bits_minus_1    = seq->order_hint_bits_minus_1,\n+        .bit_depth_idx              = bit_depth_idx,\n+        .matrix_coefficients        = seq->color_config.matrix_coefficients,\n+        .current_frame              = pic->output_surface,\n+        .current_display_picture    = vaapi_av1_surface_id(&s->cur_frame),\n+        .frame_width_minus1         = frame_header->frame_width_minus_1,\n+        .frame_height_minus1        = frame_header->frame_height_minus_1,\n+        .primary_ref_frame          = frame_header->primary_ref_frame,\n+        .order_hint                 = frame_header->order_hint,\n+        .tile_cols                  = frame_header->tile_cols,\n+        .tile_rows                  = frame_header->tile_rows,\n+        .context_update_tile_id     = frame_header->context_update_tile_id,\n+        .superres_scale_denominator = frame_header->use_superres ?\n+                                        frame_header->coded_denom + AV1_SUPERRES_DENOM_MIN :\n+                                        AV1_SUPERRES_NUM,\n+        .interp_filter              = frame_header->interpolation_filter,\n+        .filter_level[0]            = frame_header->loop_filter_level[0],\n+        .filter_level[1]            = frame_header->loop_filter_level[1],\n+        .filter_level_u             = frame_header->loop_filter_level[2],\n+        .filter_level_v             = frame_header->loop_filter_level[3],\n+        .base_qindex                = frame_header->base_q_idx,\n+        .y_dc_delta_q               = frame_header->delta_q_y_dc,\n+        .u_dc_delta_q               = frame_header->delta_q_u_dc,\n+        .u_ac_delta_q               = frame_header->delta_q_u_ac,\n+        .v_dc_delta_q               = frame_header->delta_q_v_dc,\n+        .v_ac_delta_q               = frame_header->delta_q_v_ac,\n+        .cdef_damping_minus_3       = frame_header->cdef_damping_minus_3,\n+        .cdef_bits                  = frame_header->cdef_bits,\n         .seq_info_fields.fields = {\n             .still_picture              = seq->still_picture,\n             .use_128x128_superblock     = seq->use_128x128_superblock,\n@@ -238,12 +246,15 @@ static int vaapi_av1_start_frame(AVCodecContext *avctx,\n             .mode_ref_delta_update  = frame_header->loop_filter_delta_update,\n         },\n         .mode_control_fields.bits = {\n-            .delta_q_present_flag = frame_header->delta_q_present,\n-            .log2_delta_q_res     = frame_header->delta_q_res,\n-            .tx_mode              = frame_header->tx_mode,\n-            .reference_select     = frame_header->reference_select,\n-            .reduced_tx_set_used  = frame_header->reduced_tx_set,\n-            .skip_mode_present    = frame_header->skip_mode_present,\n+            .delta_q_present_flag  = frame_header->delta_q_present,\n+            .log2_delta_q_res      = frame_header->delta_q_res,\n+            .delta_lf_present_flag = frame_header->delta_lf_present,\n+            .log2_delta_lf_res     = frame_header->delta_lf_res,\n+            .delta_lf_multi        = frame_header->delta_lf_multi,\n+            .tx_mode               = frame_header->tx_mode,\n+            .reference_select      = frame_header->reference_select,\n+            .reduced_tx_set_used   = frame_header->reduced_tx_set,\n+            .skip_mode_present     = frame_header->skip_mode_present,\n         },\n         .loop_restoration_fields.bits = {\n             .yframe_restoration_type  = remap_lr_type[frame_header->lr_type[0]],\n@@ -254,6 +265,9 @@ static int vaapi_av1_start_frame(AVCodecContext *avctx,\n         },\n         .qmatrix_fields.bits = {\n             .using_qmatrix = frame_header->using_qmatrix,\n+            .qm_y          = frame_header->qm_y,\n+            .qm_u          = frame_header->qm_u,\n+            .qm_v          = frame_header->qm_v,\n         }\n     };\n \n"
  },
  {
    "path": "packages/multimedia/ffmpeg/patches/libreelec/ffmpeg-001-libreelec.patch",
    "content": "From 8f7c8a0f9e28641880d72996b9452e0a9da1288c Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Wed, 10 Apr 2019 13:39:21 -0700\nSubject: [PATCH 1/2] libavcodec/libdav1d: add libdav1d_get_format method to\n call ff_get_format\n\nThis will allow applications to properly init the decoder in\ncases where a hardware decoder is tried first and and software\ndecoder is tried after by calling the get_format callback.\n\nEven though there is no hardware pixel formats available\nwe still need to return the software pixel format.\n\nTested with Kodi by checking if multithreaded software\ndecoding is properly activated.\n---\n libavcodec/libdav1d.c | 11 +++++++++++\n 1 file changed, 11 insertions(+)\n\ndiff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c\nindex 3c2a68b7e0..68996426cc 100644\n--- a/libavcodec/libdav1d.c\n+++ b/libavcodec/libdav1d.c\n@@ -58,6 +58,16 @@ static const enum AVPixelFormat pix_fmt_rgb[3] = {\n     AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12,\n };\n \n+static enum AVPixelFormat libdav1d_get_format(AVCodecContext *avctx, const Dav1dPicture *p)\n+{\n+   enum AVPixelFormat pix_fmts[2], *fmt = pix_fmts;\n+\n+   *fmt++ = pix_fmt[p->p.layout][p->seq_hdr->hbd];\n+   *fmt = AV_PIX_FMT_NONE;\n+\n+   return ff_get_format(avctx, pix_fmts);\n+}\n+\n static void libdav1d_log_callback(void *opaque, const char *fmt, va_list vl)\n {\n     AVCodecContext *c = opaque;\n@@ -264,6 +274,7 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)\n     c->profile = p->seq_hdr->profile;\n     c->level = ((p->seq_hdr->operating_points[0].major_level - 2) << 2)\n                | p->seq_hdr->operating_points[0].minor_level;\n+    frame->format = c->pix_fmt = libdav1d_get_format(c, p);\n     frame->width = p->p.w;\n     frame->height = p->p.h;\n     if (c->width != p->p.w || c->height != p->p.h) {\n\nFrom 635cf67be3d37159c96e75f00399b3e232372251 Mon Sep 17 00:00:00 2001\nFrom: chewitt <github@chrishewitt.net>\nDate: Sun, 11 Aug 2019 07:08:19 +0000\nSubject: [PATCH 2/2] add long-term yuv2rgb logging patch\n\n---\n libswscale/yuv2rgb.c | 4 ----\n 1 file changed, 4 deletions(-)\n\ndiff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c\nindex 6a3956e8e2..d6f9aea166 100644\n--- a/libswscale/yuv2rgb.c\n+++ b/libswscale/yuv2rgb.c\n@@ -688,10 +688,6 @@ SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c)\n     if (t)\n         return t;\n \n-    av_log(c, AV_LOG_WARNING,\n-           \"No accelerated colorspace conversion found from %s to %s.\\n\",\n-           av_get_pix_fmt_name(c->srcFormat), av_get_pix_fmt_name(c->dstFormat));\n-\n     switch (c->dstFormat) {\n     case AV_PIX_FMT_BGR48BE:\n     case AV_PIX_FMT_BGR48LE:\n"
  },
  {
    "path": "packages/multimedia/ffmpeg/patches/rpi/ffmpeg-001-rpi.patch",
    "content": "diff --git a/configure b/configure\nindex 4ba72bf84b..f2fc33e89b 100755\n--- a/configure\n+++ b/configure\n@@ -207,6 +207,7 @@ External library support:\n   --disable-bzlib          disable bzlib [autodetect]\n   --disable-coreimage      disable Apple CoreImage framework [autodetect]\n   --enable-chromaprint     enable audio fingerprinting with chromaprint [no]\n+  --disable-epoxy          disable epoxy [autodetect]\n   --enable-frei0r          enable frei0r video filtering [no]\n   --enable-gcrypt          enable gcrypt, needed for rtmp(t)e support\n                            if openssl, librtmp or gmp is not used [no]\n@@ -279,6 +280,7 @@ External library support:\n                            if openssl, gnutls or mbedtls is not used [no]\n   --enable-libtwolame      enable MP2 encoding via libtwolame [no]\n   --enable-libuavs3d       enable AVS3 decoding via libuavs3d [no]\n+  --disable-libudev        disable libudev [autodetect]\n   --enable-libv4l2         enable libv4l2/v4l-utils [no]\n   --enable-libvidstab      enable video stabilization using vid.stab [no]\n   --enable-libvmaf         enable vmaf filter via libvmaf [no]\n@@ -340,12 +342,17 @@ External library support:\n   --enable-libmfx          enable Intel MediaSDK (AKA Quick Sync Video) code via libmfx [no]\n   --enable-libnpp          enable Nvidia Performance Primitives-based code [no]\n   --enable-mmal            enable Broadcom Multi-Media Abstraction Layer (Raspberry Pi) via MMAL [no]\n+  --enable-rpi             enable other rpi specific stuff [no]\n+  --enable-sand            enable sand video formats [rpi]\n+  --enable-vout-drm        enable the vout_drm module - for internal testing only [no]\n+  --enable-vout-egl        enable the vout_egl module - for internal testing only [no]\n   --disable-nvdec          disable Nvidia video decoding acceleration (via hwaccel) [autodetect]\n   --disable-nvenc          disable Nvidia video encoding code [autodetect]\n   --enable-omx             enable OpenMAX IL code [no]\n   --enable-omx-rpi         enable OpenMAX IL code for Raspberry Pi [no]\n   --enable-rkmpp           enable Rockchip Media Process Platform code [no]\n   --disable-v4l2-m2m       disable V4L2 mem2mem code [autodetect]\n+  --enable-v4l2-request    enable V4L2 request API code [no]\n   --disable-vaapi          disable Video Acceleration API (mainly Unix/Intel) code [autodetect]\n   --disable-vdpau          disable Nvidia Video Decode and Presentation API for Unix code [autodetect]\n   --disable-videotoolbox   disable VideoToolbox code [autodetect]\n@@ -1703,7 +1710,9 @@ EXTERNAL_AUTODETECT_LIBRARY_LIST=\"\n     avfoundation\n     bzlib\n     coreimage\n+    epoxy\n     iconv\n+    libudev\n     libxcb\n     libxcb_shm\n     libxcb_shape\n@@ -1868,7 +1877,10 @@ HWACCEL_LIBRARY_LIST=\"\n     mmal\n     omx\n     opencl\n+    v4l2_request\n     vulkan\n+    rpi4_8\n+    rpi4_10\n \"\n \n DOCUMENT_LIST=\"\n@@ -1884,12 +1896,17 @@ FEATURE_LIST=\"\n     gray\n     hardcoded_tables\n     omx_rpi\n+    rpi\n     runtime_cpudetect\n     safe_bitstream_reader\n+    sand\n     shared\n     small\n     static\n     swscale_alpha\n+    vout_drm\n+    vout_egl\n+    v4l2_req_hevc_vx\n \"\n \n # this list should be kept in linking order\n@@ -1930,6 +1947,7 @@ SUBSYSTEM_LIST=\"\n     pixelutils\n     network\n     rdft\n+    rpi\n \"\n \n # COMPONENT_LIST needs to come last to ensure correct dependency checking\n@@ -2416,9 +2434,11 @@ CONFIG_EXTRA=\"\n     rangecoder\n     riffdec\n     riffenc\n+    rpi\n     rtpdec\n     rtpenc_chain\n     rv34dsp\n+    sand\n     scene_sad\n     sinewin\n     snappy\n@@ -2750,6 +2770,8 @@ hap_decoder_select=\"snappy texturedsp\"\n hap_encoder_deps=\"libsnappy\"\n hap_encoder_select=\"texturedspenc\"\n hevc_decoder_select=\"atsc_a53 bswapdsp cabac golomb hevcparse videodsp\"\n+hevc_rpi_decoder_deps=\"rpi\"\n+hevc_rpi_decoder_select=\"hevc_decoder sand\"\n huffyuv_decoder_select=\"bswapdsp huffyuvdsp llviddsp\"\n huffyuv_encoder_select=\"bswapdsp huffman huffyuvencdsp llvidencdsp\"\n hymt_decoder_select=\"huffyuv_decoder\"\n@@ -2920,6 +2942,7 @@ d3d11va_deps=\"dxva_h ID3D11VideoDecoder ID3D11VideoContext\"\n dxva2_deps=\"dxva2api_h DXVA2_ConfigPictureDecode ole32 user32\"\n ffnvcodec_deps_any=\"libdl LoadLibrary\"\n nvdec_deps=\"ffnvcodec\"\n+v4l2_request_deps=\"linux_videodev2_h linux_media_h v4l2_timeval_to_ns libdrm libudev\"\n vaapi_x11_deps=\"xlib\"\n videotoolbox_hwaccel_deps=\"videotoolbox pthreads\"\n videotoolbox_hwaccel_extralibs=\"-framework QuartzCore\"\n@@ -2961,6 +2984,12 @@ hevc_dxva2_hwaccel_deps=\"dxva2 DXVA_PicParams_HEVC\"\n hevc_dxva2_hwaccel_select=\"hevc_decoder\"\n hevc_nvdec_hwaccel_deps=\"nvdec\"\n hevc_nvdec_hwaccel_select=\"hevc_decoder\"\n+hevc_v4l2request_hwaccel_deps=\"v4l2_request\"\n+hevc_v4l2request_hwaccel_select=\"hevc_decoder\"\n+hevc_rpi4_10_hwaccel_deps=\"rpi\"\n+hevc_rpi4_10_hwaccel_select=\"hevc_decoder\"\n+hevc_rpi4_8_hwaccel_deps=\"rpi\"\n+hevc_rpi4_8_hwaccel_select=\"hevc_decoder\"\n hevc_vaapi_hwaccel_deps=\"vaapi VAPictureParameterBufferHEVC\"\n hevc_vaapi_hwaccel_select=\"hevc_decoder\"\n hevc_vdpau_hwaccel_deps=\"vdpau VdpPictureInfoHEVC\"\n@@ -3438,8 +3467,13 @@ sndio_indev_deps=\"sndio\"\n sndio_outdev_deps=\"sndio\"\n v4l2_indev_deps_any=\"linux_videodev2_h sys_videoio_h\"\n v4l2_indev_suggest=\"libv4l2\"\n+v4l2_outdev_deps=\"libdrm\"\n v4l2_outdev_deps_any=\"linux_videodev2_h sys_videoio_h\"\n v4l2_outdev_suggest=\"libv4l2\"\n+vout_drm_outdev_deps=\"libdrm\"\n+vout_egl_outdev_deps=\"xlib epoxy\"\n+vout_rpi_outdev_deps=\"rpi\"\n+vout_rpi_outdev_select=\"sand\"\n vfwcap_indev_deps=\"vfw32 vfwcap_defines\"\n xcbgrab_indev_deps=\"libxcb\"\n xcbgrab_indev_suggest=\"libxcb_shm libxcb_shape libxcb_xfixes\"\n@@ -3658,6 +3692,7 @@ tonemap_vaapi_filter_deps=\"vaapi VAProcFilterParameterBufferHDRToneMapping\"\n tonemap_opencl_filter_deps=\"opencl const_nan\"\n transpose_opencl_filter_deps=\"opencl\"\n transpose_vaapi_filter_deps=\"vaapi VAProcPipelineCaps_rotation_flags\"\n+unsand_filter_select=\"sand\"\n unsharp_opencl_filter_deps=\"opencl\"\n uspp_filter_deps=\"gpl avcodec\"\n vaguedenoiser_filter_deps=\"gpl\"\n@@ -6155,6 +6190,12 @@ check_func_headers glob.h glob\n enabled xlib &&\n     check_lib xlib \"X11/Xlib.h X11/extensions/Xvlib.h\" XvGetPortAttribute -lXv -lX11 -lXext\n \n+enabled libudev &&\n+    check_pkg_config libudev libudev libudev.h udev_new\n+\n+enabled epoxy &&\n+    check_pkg_config epoxy epoxy epoxy/egl.h epoxy_egl_version\n+\n check_headers direct.h\n check_headers dirent.h\n check_headers dxgidebug.h\n@@ -6492,11 +6533,12 @@ enabled mbedtls           && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt\n                                check_lib mbedtls mbedtls/ssl.h mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto ||\n                                die \"ERROR: mbedTLS not found\"; }\n enabled mediacodec        && { enabled jni || die \"ERROR: mediacodec requires --enable-jni\"; }\n-enabled mmal              && { check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||\n+( enabled rpi ||\n+  enabled mmal )          && { check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||\n                                { ! enabled cross_compile &&\n                                  add_cflags -isystem/opt/vc/include/ -isystem/opt/vc/include/interface/vmcs_host/linux -isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline &&\n                                  add_ldflags -L/opt/vc/lib/ &&\n-                                 check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host; } ||\n+                                 check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host -lvcos -lvcsm -lvchostif -lvchiq_arm; } ||\n                                die \"ERROR: mmal not found\" &&\n                                check_func_headers interface/mmal/mmal.h \"MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS\"; }\n enabled openal            && { { for al_extralibs in \"${OPENAL_LIBS}\" \"-lopenal\" \"-lOpenAL32\"; do\n@@ -6537,8 +6579,16 @@ enabled rkmpp             && { require_pkg_config rkmpp rockchip_mpp  rockchip/r\n                                { enabled libdrm ||\n                                  die \"ERROR: rkmpp requires --enable-libdrm\"; }\n                              }\n+enabled v4l2_request      && { enabled libdrm ||\n+                               die \"ERROR: v4l2-request requires --enable-libdrm\"; } &&\n+                             { enabled libudev ||\n+                               die \"ERROR: v4l2-request requires libudev\"; }\n enabled vapoursynth       && require_pkg_config vapoursynth \"vapoursynth-script >= 42\" VSScript.h vsscript_init\n \n+enabled vout_drm && { enabled libdrm || die \"ERROR: vout_drm requires --enable-libdrm\"; }\n+\n+enabled vout_egl && { enabled epoxy || die \"ERROR: vout_egl requires epoxy\"; } &&\n+                    { enabled xlib  || die \"ERROR: vout_egl requires xlib\"; }\n \n if enabled gcrypt; then\n     GCRYPT_CONFIG=\"${cross_prefix}libgcrypt-config\"\n@@ -6618,6 +6668,10 @@ if enabled v4l2_m2m; then\n     check_cc vp9_v4l2_m2m linux/videodev2.h \"int i = V4L2_PIX_FMT_VP9;\"\n fi\n \n+check_func_headers \"linux/media.h linux/videodev2.h\" v4l2_timeval_to_ns\n+check_cc hevc_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_HEVC_SLICE;\"\n+disable v4l2_req_hevc_vx\n+\n check_headers sys/videoio.h\n test_code cc sys/videoio.h \"struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;\" && enable_sanitized struct_v4l2_frmivalenum_discrete\n \n@@ -7105,6 +7159,9 @@ check_deps $CONFIG_LIST       \\\n enabled threads && ! enabled pthreads && ! enabled atomics_native && die \"non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86\"\n enabled avresample && warn \"Building with deprecated library libavresample\"\n \n+# Sub-feature of hevc_v4l2request_hwaccel - can only be set once deps are done\n+enabled hevc_v4l2request_hwaccel && disabled hevc_v4l2_request && enable v4l2_req_hevc_vx\n+\n case $target_os in\n haiku)\n     disable memalign\ndiff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c\nindex dec012a299..8aa13007f9 100644\n--- a/fftools/ffmpeg.c\n+++ b/fftools/ffmpeg.c\n@@ -2189,8 +2189,8 @@ static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame)\n                        ifilter->channel_layout != frame->channel_layout;\n         break;\n     case AVMEDIA_TYPE_VIDEO:\n-        need_reinit |= ifilter->width  != frame->width ||\n-                       ifilter->height != frame->height;\n+        need_reinit |= ifilter->width  != av_frame_cropped_width(frame) ||\n+                       ifilter->height != av_frame_cropped_height(frame);\n         break;\n     }\n \n@@ -2201,6 +2201,9 @@ static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame)\n         (ifilter->hw_frames_ctx && ifilter->hw_frames_ctx->data != frame->hw_frames_ctx->data))\n         need_reinit = 1;\n \n+    if (no_cvt_hw && fg->graph)\n+        need_reinit = 0;\n+\n     if (need_reinit) {\n         ret = ifilter_parameters_from_frame(ifilter, frame);\n         if (ret < 0)\n@@ -2469,8 +2472,7 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_\n         decoded_frame->top_field_first = ist->top_field_first;\n \n     ist->frames_decoded++;\n-\n-    if (ist->hwaccel_retrieve_data && decoded_frame->format == ist->hwaccel_pix_fmt) {\n+    if (!no_cvt_hw && ist->hwaccel_retrieve_data && decoded_frame->format == ist->hwaccel_pix_fmt) {\n         err = ist->hwaccel_retrieve_data(ist->dec_ctx, decoded_frame);\n         if (err < 0)\n             goto fail;\n@@ -2674,7 +2676,12 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo\n         case AVMEDIA_TYPE_VIDEO:\n             ret = decode_video    (ist, repeating ? NULL : avpkt, &got_output, &duration_pts, !pkt,\n                                    &decode_failed);\n-            if (!repeating || !pkt || got_output) {\n+            // Pi: Do not inc dts if no_cvt_hw set\n+            // V4L2 H264 decode has long latency and sometimes spits out a long\n+            // stream of output without input. In this case incrementing DTS is wrong.\n+            // There may be cases where the condition as written is correct so only\n+            // \"fix\" in the cases which cause problems\n+            if (!repeating || !pkt || (got_output && !no_cvt_hw)) {\n                 if (pkt && pkt->duration) {\n                     duration_dts = av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q);\n                 } else if(ist->dec_ctx->framerate.num != 0 && ist->dec_ctx->framerate.den != 0) {\n@@ -2898,6 +2905,16 @@ static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat\n         } else {\n             const HWAccel *hwaccel = NULL;\n             int i;\n+\n+            if (no_cvt_hw) {\n+                config = avcodec_get_hw_config(s->codec, 0);\n+                if (config->methods == AV_CODEC_HW_CONFIG_METHOD_INTERNAL) {\n+                    av_log(s, AV_LOG_DEBUG, \"no_cvt_hw so accepting pix_fmt %d with codec internal hwaccel\\n\", *p);\n+                    ist->hwaccel_pix_fmt = *p;\n+                    break;\n+                }\n+            }\n+\n             for (i = 0; hwaccels[i].name; i++) {\n                 if (hwaccels[i].pix_fmt == *p) {\n                     hwaccel = &hwaccels[i];\n@@ -2993,6 +3010,15 @@ static int init_input_stream(int ist_index, char *error, int error_len)\n             return ret;\n         }\n \n+#if CONFIG_HEVC_RPI_DECODER\n+        ret = -1;\n+        if (strcmp(codec->name, \"hevc_rpi\") == 0 &&\n+            (ret = avcodec_open2(ist->dec_ctx, codec, &ist->decoder_opts)) < 0) {\n+            ist->dec = codec = avcodec_find_decoder_by_name(\"hevc\");\n+            av_log(NULL, AV_LOG_INFO, \"Failed to open hevc_rpi - trying hevc\\n\");\n+        }\n+        if (ret < 0)\n+#endif\n         if ((ret = avcodec_open2(ist->dec_ctx, codec, &ist->decoder_opts)) < 0) {\n             if (ret == AVERROR_EXPERIMENTAL)\n                 abort_codec_experimental(codec, 0);\ndiff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h\nindex 606f2afe0c..448cd2e009 100644\n--- a/fftools/ffmpeg.h\n+++ b/fftools/ffmpeg.h\n@@ -61,6 +61,7 @@ enum HWAccelID {\n     HWACCEL_GENERIC,\n     HWACCEL_VIDEOTOOLBOX,\n     HWACCEL_QSV,\n+    HWACCEL_RPI,\n };\n \n typedef struct HWAccel {\n@@ -611,6 +612,7 @@ extern int video_sync_method;\n extern float frame_drop_threshold;\n extern int do_benchmark;\n extern int do_benchmark_all;\n+extern int no_cvt_hw;\n extern int do_deinterlace;\n extern int do_hex_dump;\n extern int do_pkt_dump;\ndiff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c\nindex 4ab769c07b..5cdc3a7b6c 100644\n--- a/fftools/ffmpeg_filter.c\n+++ b/fftools/ffmpeg_filter.c\n@@ -1160,8 +1160,8 @@ int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame)\n \n     ifilter->format = frame->format;\n \n-    ifilter->width               = frame->width;\n-    ifilter->height              = frame->height;\n+    ifilter->width               = av_frame_cropped_width(frame);\n+    ifilter->height              = av_frame_cropped_height(frame);\n     ifilter->sample_aspect_ratio = frame->sample_aspect_ratio;\n \n     ifilter->sample_rate         = frame->sample_rate;\ndiff --git a/fftools/ffmpeg_hw.c b/fftools/ffmpeg_hw.c\nindex fc4a5d31d6..cc69dce40e 100644\n--- a/fftools/ffmpeg_hw.c\n+++ b/fftools/ffmpeg_hw.c\n@@ -75,6 +75,8 @@ static char *hw_device_default_name(enum AVHWDeviceType type)\n     char *name;\n     size_t index_pos;\n     int index, index_limit = 1000;\n+    if (!type_name)\n+        return NULL;\n     index_pos = strlen(type_name);\n     name = av_malloc(index_pos + 4);\n     if (!name)\ndiff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c\nindex 807e783422..456d4f349b 100644\n--- a/fftools/ffmpeg_opt.c\n+++ b/fftools/ffmpeg_opt.c\n@@ -133,12 +133,22 @@ static const char *const opt_name_enc_time_bases[]            = {\"enc_time_base\"\n     }\\\n }\n \n+#if CONFIG_RPI\n+static int rpi_init(AVCodecContext *avctx) {\n+    return 0;\n+}\n+#endif\n+\n const HWAccel hwaccels[] = {\n #if CONFIG_VIDEOTOOLBOX\n     { \"videotoolbox\", videotoolbox_init, HWACCEL_VIDEOTOOLBOX, AV_PIX_FMT_VIDEOTOOLBOX },\n #endif\n #if CONFIG_LIBMFX\n     { \"qsv\",   qsv_init,   HWACCEL_QSV,   AV_PIX_FMT_QSV },\n+#endif\n+#if CONFIG_RPI\n+    {  \"rpi\", rpi_init, HWACCEL_RPI, AV_PIX_FMT_RPI4_8 },\n+    {  \"rpi\", rpi_init, HWACCEL_RPI, AV_PIX_FMT_RPI4_10 },\n #endif\n     { 0 },\n };\n@@ -158,6 +168,7 @@ float frame_drop_threshold = 0;\n int do_deinterlace    = 0;\n int do_benchmark      = 0;\n int do_benchmark_all  = 0;\n+int no_cvt_hw         = 0;\n int do_hex_dump       = 0;\n int do_pkt_dump       = 0;\n int copy_ts           = 0;\n@@ -3499,6 +3510,8 @@ const OptionDef options[] = {\n         \"add timings for benchmarking\" },\n     { \"benchmark_all\",  OPT_BOOL | OPT_EXPERT,                       { &do_benchmark_all },\n       \"add timings for each task\" },\n+    { \"no_cvt_hw\",      OPT_BOOL | OPT_EXPERT,                       { &no_cvt_hw },\n+      \"do not auto-convert hw frames to sw\" },\n     { \"progress\",       HAS_ARG | OPT_EXPERT,                        { .func_arg = opt_progress },\n       \"write program-readable progress information\", \"url\" },\n     { \"stdin\",          OPT_BOOL | OPT_EXPERT,                       { &stdin_interaction },\ndiff --git a/libavcodec/Makefile b/libavcodec/Makefile\nindex 33a280cf69..e93c842047 100644\n--- a/libavcodec/Makefile\n+++ b/libavcodec/Makefile\n@@ -19,6 +19,7 @@ HEADERS = ac3_parser.h                                                  \\\n           mediacodec.h                                                  \\\n           packet.h                                                      \\\n           qsv.h                                                         \\\n+          rpi_zc.h                                                      \\\n           vaapi.h                                                       \\\n           vdpau.h                                                       \\\n           version.h                                                     \\\n@@ -140,6 +141,7 @@ OBJS-$(CONFIG_QSVDEC)                  += qsvdec.o\n OBJS-$(CONFIG_QSVENC)                  += qsvenc.o\n OBJS-$(CONFIG_RANGECODER)              += rangecoder.o\n OBJS-$(CONFIG_RDFT)                    += rdft.o\n+OBJS-$(CONFIG_RPI)                     += rpi_qpu.o rpi_mailbox.o rpi_zc.o\n OBJS-$(CONFIG_RV34DSP)                 += rv34dsp.o\n OBJS-$(CONFIG_SHARED)                  += log2_tab.o reverse.o\n OBJS-$(CONFIG_SINEWIN)                 += sinewin.o\n@@ -154,7 +156,10 @@ OBJS-$(CONFIG_VIDEODSP)                += videodsp.o\n OBJS-$(CONFIG_VP3DSP)                  += vp3dsp.o\n OBJS-$(CONFIG_VP56DSP)                 += vp56dsp.o\n OBJS-$(CONFIG_VP8DSP)                  += vp8dsp.o\n-OBJS-$(CONFIG_V4L2_M2M)                += v4l2_m2m.o v4l2_context.o v4l2_buffers.o v4l2_fmt.o\n+OBJS-$(CONFIG_V4L2_M2M)                += v4l2_m2m.o v4l2_context.o v4l2_buffers.o v4l2_fmt.o\\\n+                                          weak_link.o v4l2_req_dmabufs.o\n+OBJS-$(CONFIG_V4L2_REQUEST)            += v4l2_req_media.o v4l2_req_pollqueue.o v4l2_req_dmabufs.o\\\n+\t\t\t\t\t  v4l2_req_devscan.o weak_link.o\n OBJS-$(CONFIG_WMA_FREQS)               += wma_freqs.o\n OBJS-$(CONFIG_WMV2DSP)                 += wmv2dsp.o\n \n@@ -403,6 +408,14 @@ OBJS-$(CONFIG_HEVC_QSV_DECODER)        += qsvdec.o\n OBJS-$(CONFIG_HEVC_QSV_ENCODER)        += qsvenc_hevc.o hevc_ps_enc.o       \\\n                                           hevc_data.o\n OBJS-$(CONFIG_HEVC_RKMPP_DECODER)      += rkmppdec.o\n+OBJS-$(CONFIG_RPI)                     += rpi_mem.o \\\n+                                          rpi_mailbox.o rpi_zc.o\n+OBJS-$(CONFIG_HEVC_RPI_DECODER)        += rpi_hevcdec.o rpi_hevc_mvs.o \\\n+                                          rpi_hevc_cabac.o rpi_hevc_refs.o rpi_hevcpred.o    \\\n+                                          rpi_hevcdsp.o rpi_hevc_filter.o rpi_hevc_data.o    \\\n+                                          rpi_hevc_shader.o rpi_hevc_shader_template.o       \\\n+                                          rpi_hevc_parse.o h2645_parse.o rpi_hevc_ps.o \\\n+                                          rpi_hevc_sei.o rpi_hevc_data.o rpi_qpu.o rpi_mem.o\n OBJS-$(CONFIG_HEVC_VAAPI_ENCODER)      += vaapi_encode_h265.o h265_profile_level.o\n OBJS-$(CONFIG_HEVC_V4L2M2M_DECODER)    += v4l2_m2m_dec.o\n OBJS-$(CONFIG_HEVC_V4L2M2M_ENCODER)    += v4l2_m2m_enc.o\n@@ -941,6 +954,10 @@ OBJS-$(CONFIG_HEVC_D3D11VA_HWACCEL)       += dxva2_hevc.o\n OBJS-$(CONFIG_HEVC_DXVA2_HWACCEL)         += dxva2_hevc.o\n OBJS-$(CONFIG_HEVC_NVDEC_HWACCEL)         += nvdec_hevc.o\n OBJS-$(CONFIG_HEVC_QSV_HWACCEL)           += qsvdec.o\n+OBJS-$(CONFIG_HEVC_RPI4_8_HWACCEL)        += rpivid_hevc.o\n+OBJS-$(CONFIG_HEVC_RPI4_10_HWACCEL)       += rpivid_hevc.o\n+OBJS-$(CONFIG_HEVC_V4L2REQUEST_HWACCEL)   += v4l2_request_hevc.o v4l2_req_decode_q.o v4l2_req_hevc_v4.o\n+OBJS-$(CONFIG_V4L2_REQ_HEVC_VX)           += v4l2_req_hevc_v1.o v4l2_req_hevc_v2.o v4l2_req_hevc_v3.o\n OBJS-$(CONFIG_HEVC_VAAPI_HWACCEL)         += vaapi_hevc.o h265_profile_level.o\n OBJS-$(CONFIG_HEVC_VDPAU_HWACCEL)         += vdpau_hevc.o h265_profile_level.o\n OBJS-$(CONFIG_MJPEG_NVDEC_HWACCEL)        += nvdec_mjpeg.o\n@@ -1297,3 +1314,31 @@ $(SUBDIR)pcm.o: $(SUBDIR)pcm_tables.h\n $(SUBDIR)qdm2.o: $(SUBDIR)qdm2_tables.h\n $(SUBDIR)sinewin.o: $(SUBDIR)sinewin_tables.h\n endif\n+\n+ifdef CONFIG_HEVC_RPI_DECODER\n+QASM_PY := ../local/bin/qasm.py\n+VASMVIDCORE := ../local/bin/vasmvidcore_std\n+\n+ifneq (\"$(wildcard $(QASM_PY))\",\"\")\n+$(SUBDIR)rpi_hevc_shader.c: $(SUBDIR)rpi_hevc_shader.qasm\n+\t$(QASM_PY) -mc_c:rpi_hevc_shader,rpi_hevc_shader,ff_hevc_rpi_shader $< > $@\n+\n+$(SUBDIR)rpi_hevc_shader.h: $(SUBDIR)rpi_hevc_shader.qasm\n+\t$(QASM_PY) -mc_h:rpi_hevc_shader,rpi_hevc_shader,ff_hevc_rpi_shader $< > $@\n+endif\n+\n+ifneq (\"$(wildcard $(VASMVIDCORE))\",\"\")\n+$(SUBDIR)rpi_hevc_transform8.bin: $(SUBDIR)rpi_hevc_transform.s\n+\t$(VASMVIDCORE) -Fbin -DBIT_DEPTH=8 $< -o $@\n+$(SUBDIR)rpi_hevc_transform10.bin: $(SUBDIR)rpi_hevc_transform.s\n+\t$(VASMVIDCORE) -Fbin -DBIT_DEPTH=10 $< -o $@\n+\n+$(SUBDIR)rpi_hevc_transform8.h: $(SUBDIR)rpi_hevc_transform8.bin\n+\tpython pi-util/make_array.py $<\n+$(SUBDIR)rpi_hevc_transform10.h: $(SUBDIR)rpi_hevc_transform10.bin\n+\tpython pi-util/make_array.py $<\n+endif\n+\n+$(SUBDIR)rpi_qpu.o: $(SUBDIR)rpi_hevc_transform8.h $(SUBDIR)rpi_hevc_transform10.h\n+$(SUBDIR)rpi_hevcdec.o $(SUBDIR)rpi_shader_template.o $(SUBDIR)rpi_qpu.o: $(SUBDIR)rpi_hevc_shader.h\n+endif\ndiff --git a/libavcodec/aarch64/Makefile b/libavcodec/aarch64/Makefile\nindex 954461f81d..c8935f205e 100644\n--- a/libavcodec/aarch64/Makefile\n+++ b/libavcodec/aarch64/Makefile\n@@ -44,10 +44,12 @@ NEON-OBJS-$(CONFIG_H264PRED)            += aarch64/h264pred_neon.o\n NEON-OBJS-$(CONFIG_H264QPEL)            += aarch64/h264qpel_neon.o             \\\n                                            aarch64/hpeldsp_neon.o\n NEON-OBJS-$(CONFIG_HPELDSP)             += aarch64/hpeldsp_neon.o\n-NEON-OBJS-$(CONFIG_IDCTDSP)             += aarch64/simple_idct_neon.o\n+NEON-OBJS-$(CONFIG_IDCTDSP)             += aarch64/idctdsp_neon.o              \\\n+                                           aarch64/simple_idct_neon.o\n NEON-OBJS-$(CONFIG_MDCT)                += aarch64/mdct_neon.o\n NEON-OBJS-$(CONFIG_MPEGAUDIODSP)        += aarch64/mpegaudiodsp_neon.o\n NEON-OBJS-$(CONFIG_PIXBLOCKDSP)         += aarch64/pixblockdsp_neon.o\n+NEON-OBJS-$(CONFIG_VC1DSP)              += aarch64/vc1dsp_neon.o\n NEON-OBJS-$(CONFIG_VP8DSP)              += aarch64/vp8dsp_neon.o\n \n # decoders/encoders\ndiff --git a/libavcodec/aarch64/idctdsp_init_aarch64.c b/libavcodec/aarch64/idctdsp_init_aarch64.c\nindex 742a3372e3..eec21aa5a2 100644\n--- a/libavcodec/aarch64/idctdsp_init_aarch64.c\n+++ b/libavcodec/aarch64/idctdsp_init_aarch64.c\n@@ -27,19 +27,29 @@\n #include \"libavcodec/idctdsp.h\"\n #include \"idct.h\"\n \n+void ff_put_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t);\n+void ff_put_signed_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t);\n+void ff_add_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t);\n+\n av_cold void ff_idctdsp_init_aarch64(IDCTDSPContext *c, AVCodecContext *avctx,\n                                      unsigned high_bit_depth)\n {\n     int cpu_flags = av_get_cpu_flags();\n \n-    if (have_neon(cpu_flags) && !avctx->lowres && !high_bit_depth) {\n-        if (avctx->idct_algo == FF_IDCT_AUTO ||\n-            avctx->idct_algo == FF_IDCT_SIMPLEAUTO ||\n-            avctx->idct_algo == FF_IDCT_SIMPLENEON) {\n-            c->idct_put  = ff_simple_idct_put_neon;\n-            c->idct_add  = ff_simple_idct_add_neon;\n-            c->idct      = ff_simple_idct_neon;\n-            c->perm_type = FF_IDCT_PERM_PARTTRANS;\n+    if (have_neon(cpu_flags)) {\n+        if (!avctx->lowres && !high_bit_depth) {\n+            if (avctx->idct_algo == FF_IDCT_AUTO ||\n+                avctx->idct_algo == FF_IDCT_SIMPLEAUTO ||\n+                avctx->idct_algo == FF_IDCT_SIMPLENEON) {\n+                c->idct_put  = ff_simple_idct_put_neon;\n+                c->idct_add  = ff_simple_idct_add_neon;\n+                c->idct      = ff_simple_idct_neon;\n+                c->perm_type = FF_IDCT_PERM_PARTTRANS;\n+            }\n         }\n+\n+        c->add_pixels_clamped        = ff_add_pixels_clamped_neon;\n+        c->put_pixels_clamped        = ff_put_pixels_clamped_neon;\n+        c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_neon;\n     }\n }\ndiff --git a/libavcodec/aarch64/idctdsp_neon.S b/libavcodec/aarch64/idctdsp_neon.S\nnew file mode 100644\nindex 0000000000..7f47611206\n--- /dev/null\n+++ b/libavcodec/aarch64/idctdsp_neon.S\n@@ -0,0 +1,130 @@\n+/*\n+ * IDCT AArch64 NEON optimisations\n+ *\n+ * Copyright (c) 2022 Ben Avison <bavison@riscosopen.org>\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"libavutil/aarch64/asm.S\"\n+\n+// Clamp 16-bit signed block coefficients to unsigned 8-bit\n+// On entry:\n+//   x0 -> array of 64x 16-bit coefficients\n+//   x1 -> 8-bit results\n+//   x2 = row stride for results, bytes\n+function ff_put_pixels_clamped_neon, export=1\n+        ld1             {v0.16b, v1.16b, v2.16b, v3.16b}, [x0], #64\n+        ld1             {v4.16b, v5.16b, v6.16b, v7.16b}, [x0]\n+        sqxtun          v0.8b, v0.8h\n+        sqxtun          v1.8b, v1.8h\n+        sqxtun          v2.8b, v2.8h\n+        sqxtun          v3.8b, v3.8h\n+        sqxtun          v4.8b, v4.8h\n+        st1             {v0.8b}, [x1], x2\n+        sqxtun          v0.8b, v5.8h\n+        st1             {v1.8b}, [x1], x2\n+        sqxtun          v1.8b, v6.8h\n+        st1             {v2.8b}, [x1], x2\n+        sqxtun          v2.8b, v7.8h\n+        st1             {v3.8b}, [x1], x2\n+        st1             {v4.8b}, [x1], x2\n+        st1             {v0.8b}, [x1], x2\n+        st1             {v1.8b}, [x1], x2\n+        st1             {v2.8b}, [x1]\n+        ret\n+endfunc\n+\n+// Clamp 16-bit signed block coefficients to signed 8-bit (biased by 128)\n+// On entry:\n+//   x0 -> array of 64x 16-bit coefficients\n+//   x1 -> 8-bit results\n+//   x2 = row stride for results, bytes\n+function ff_put_signed_pixels_clamped_neon, export=1\n+        ld1             {v0.16b, v1.16b, v2.16b, v3.16b}, [x0], #64\n+        movi            v4.8b, #128\n+        ld1             {v16.16b, v17.16b, v18.16b, v19.16b}, [x0]\n+        sqxtn           v0.8b, v0.8h\n+        sqxtn           v1.8b, v1.8h\n+        sqxtn           v2.8b, v2.8h\n+        sqxtn           v3.8b, v3.8h\n+        sqxtn           v5.8b, v16.8h\n+        add             v0.8b, v0.8b, v4.8b\n+        sqxtn           v6.8b, v17.8h\n+        add             v1.8b, v1.8b, v4.8b\n+        sqxtn           v7.8b, v18.8h\n+        add             v2.8b, v2.8b, v4.8b\n+        sqxtn           v16.8b, v19.8h\n+        add             v3.8b, v3.8b, v4.8b\n+        st1             {v0.8b}, [x1], x2\n+        add             v0.8b, v5.8b, v4.8b\n+        st1             {v1.8b}, [x1], x2\n+        add             v1.8b, v6.8b, v4.8b\n+        st1             {v2.8b}, [x1], x2\n+        add             v2.8b, v7.8b, v4.8b\n+        st1             {v3.8b}, [x1], x2\n+        add             v3.8b, v16.8b, v4.8b\n+        st1             {v0.8b}, [x1], x2\n+        st1             {v1.8b}, [x1], x2\n+        st1             {v2.8b}, [x1], x2\n+        st1             {v3.8b}, [x1]\n+        ret\n+endfunc\n+\n+// Add 16-bit signed block coefficients to unsigned 8-bit\n+// On entry:\n+//   x0 -> array of 64x 16-bit coefficients\n+//   x1 -> 8-bit input and results\n+//   x2 = row stride for 8-bit input and results, bytes\n+function ff_add_pixels_clamped_neon, export=1\n+        ld1             {v0.16b, v1.16b, v2.16b, v3.16b}, [x0], #64\n+        mov             x3, x1\n+        ld1             {v4.8b}, [x1], x2\n+        ld1             {v5.8b}, [x1], x2\n+        ld1             {v6.8b}, [x1], x2\n+        ld1             {v7.8b}, [x1], x2\n+        ld1             {v16.16b, v17.16b, v18.16b, v19.16b}, [x0]\n+        uaddw           v0.8h, v0.8h, v4.8b\n+        uaddw           v1.8h, v1.8h, v5.8b\n+        uaddw           v2.8h, v2.8h, v6.8b\n+        ld1             {v4.8b}, [x1], x2\n+        uaddw           v3.8h, v3.8h, v7.8b\n+        ld1             {v5.8b}, [x1], x2\n+        sqxtun          v0.8b, v0.8h\n+        ld1             {v6.8b}, [x1], x2\n+        sqxtun          v1.8b, v1.8h\n+        ld1             {v7.8b}, [x1]\n+        sqxtun          v2.8b, v2.8h\n+        sqxtun          v3.8b, v3.8h\n+        uaddw           v4.8h, v16.8h, v4.8b\n+        st1             {v0.8b}, [x3], x2\n+        uaddw           v0.8h, v17.8h, v5.8b\n+        st1             {v1.8b}, [x3], x2\n+        uaddw           v1.8h, v18.8h, v6.8b\n+        st1             {v2.8b}, [x3], x2\n+        uaddw           v2.8h, v19.8h, v7.8b\n+        sqxtun          v4.8b, v4.8h\n+        sqxtun          v0.8b, v0.8h\n+        st1             {v3.8b}, [x3], x2\n+        sqxtun          v1.8b, v1.8h\n+        sqxtun          v2.8b, v2.8h\n+        st1             {v4.8b}, [x3], x2\n+        st1             {v0.8b}, [x3], x2\n+        st1             {v1.8b}, [x3], x2\n+        st1             {v2.8b}, [x3]\n+        ret\n+endfunc\ndiff --git a/libavcodec/aarch64/vc1dsp_init_aarch64.c b/libavcodec/aarch64/vc1dsp_init_aarch64.c\nindex 13dfd74940..a7976fd596 100644\n--- a/libavcodec/aarch64/vc1dsp_init_aarch64.c\n+++ b/libavcodec/aarch64/vc1dsp_init_aarch64.c\n@@ -21,10 +21,28 @@\n #include \"libavutil/attributes.h\"\n #include \"libavutil/cpu.h\"\n #include \"libavutil/aarch64/cpu.h\"\n+#include \"libavutil/intreadwrite.h\"\n #include \"libavcodec/vc1dsp.h\"\n \n #include \"config.h\"\n \n+void ff_vc1_inv_trans_8x8_neon(int16_t *block);\n+void ff_vc1_inv_trans_8x4_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);\n+void ff_vc1_inv_trans_4x8_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);\n+void ff_vc1_inv_trans_4x4_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);\n+\n+void ff_vc1_inv_trans_8x8_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);\n+void ff_vc1_inv_trans_8x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);\n+void ff_vc1_inv_trans_4x8_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);\n+void ff_vc1_inv_trans_4x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);\n+\n+void ff_vc1_v_loop_filter4_neon(uint8_t *src, ptrdiff_t stride, int pq);\n+void ff_vc1_h_loop_filter4_neon(uint8_t *src, ptrdiff_t stride, int pq);\n+void ff_vc1_v_loop_filter8_neon(uint8_t *src, ptrdiff_t stride, int pq);\n+void ff_vc1_h_loop_filter8_neon(uint8_t *src, ptrdiff_t stride, int pq);\n+void ff_vc1_v_loop_filter16_neon(uint8_t *src, ptrdiff_t stride, int pq);\n+void ff_vc1_h_loop_filter16_neon(uint8_t *src, ptrdiff_t stride, int pq);\n+\n void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,\n                                 int h, int x, int y);\n void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,\n@@ -34,14 +52,90 @@ void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,\n void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,\n                                 int h, int x, int y);\n \n+int ff_vc1_unescape_buffer_helper_neon(const uint8_t *src, int size, uint8_t *dst);\n+\n+static int vc1_unescape_buffer_neon(const uint8_t *src, int size, uint8_t *dst)\n+{\n+    /* Dealing with starting and stopping, and removing escape bytes, are\n+     * comparatively less time-sensitive, so are more clearly expressed using\n+     * a C wrapper around the assembly inner loop. Note that we assume a\n+     * little-endian machine that supports unaligned loads. */\n+    int dsize = 0;\n+    while (size >= 4)\n+    {\n+        int found = 0;\n+        while (!found && (((uintptr_t) dst) & 7) && size >= 4)\n+        {\n+            found = (AV_RL32(src) &~ 0x03000000) == 0x00030000;\n+            if (!found)\n+            {\n+                *dst++ = *src++;\n+                --size;\n+                ++dsize;\n+            }\n+        }\n+        if (!found)\n+        {\n+            int skip = size - ff_vc1_unescape_buffer_helper_neon(src, size, dst);\n+            dst += skip;\n+            src += skip;\n+            size -= skip;\n+            dsize += skip;\n+            while (!found && size >= 4)\n+            {\n+                found = (AV_RL32(src) &~ 0x03000000) == 0x00030000;\n+                if (!found)\n+                {\n+                    *dst++ = *src++;\n+                    --size;\n+                    ++dsize;\n+                }\n+            }\n+        }\n+        if (found)\n+        {\n+            *dst++ = *src++;\n+            *dst++ = *src++;\n+            ++src;\n+            size -= 3;\n+            dsize += 2;\n+        }\n+    }\n+    while (size > 0)\n+    {\n+        *dst++ = *src++;\n+        --size;\n+        ++dsize;\n+    }\n+    return dsize;\n+}\n+\n av_cold void ff_vc1dsp_init_aarch64(VC1DSPContext *dsp)\n {\n     int cpu_flags = av_get_cpu_flags();\n \n     if (have_neon(cpu_flags)) {\n+        dsp->vc1_inv_trans_8x8 = ff_vc1_inv_trans_8x8_neon;\n+        dsp->vc1_inv_trans_8x4 = ff_vc1_inv_trans_8x4_neon;\n+        dsp->vc1_inv_trans_4x8 = ff_vc1_inv_trans_4x8_neon;\n+        dsp->vc1_inv_trans_4x4 = ff_vc1_inv_trans_4x4_neon;\n+        dsp->vc1_inv_trans_8x8_dc = ff_vc1_inv_trans_8x8_dc_neon;\n+        dsp->vc1_inv_trans_8x4_dc = ff_vc1_inv_trans_8x4_dc_neon;\n+        dsp->vc1_inv_trans_4x8_dc = ff_vc1_inv_trans_4x8_dc_neon;\n+        dsp->vc1_inv_trans_4x4_dc = ff_vc1_inv_trans_4x4_dc_neon;\n+\n+        dsp->vc1_v_loop_filter4  = ff_vc1_v_loop_filter4_neon;\n+        dsp->vc1_h_loop_filter4  = ff_vc1_h_loop_filter4_neon;\n+        dsp->vc1_v_loop_filter8  = ff_vc1_v_loop_filter8_neon;\n+        dsp->vc1_h_loop_filter8  = ff_vc1_h_loop_filter8_neon;\n+        dsp->vc1_v_loop_filter16 = ff_vc1_v_loop_filter16_neon;\n+        dsp->vc1_h_loop_filter16 = ff_vc1_h_loop_filter16_neon;\n+\n         dsp->put_no_rnd_vc1_chroma_pixels_tab[0] = ff_put_vc1_chroma_mc8_neon;\n         dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_neon;\n         dsp->put_no_rnd_vc1_chroma_pixels_tab[1] = ff_put_vc1_chroma_mc4_neon;\n         dsp->avg_no_rnd_vc1_chroma_pixels_tab[1] = ff_avg_vc1_chroma_mc4_neon;\n+\n+        dsp->vc1_unescape_buffer = vc1_unescape_buffer_neon;\n     }\n }\ndiff --git a/libavcodec/aarch64/vc1dsp_neon.S b/libavcodec/aarch64/vc1dsp_neon.S\nnew file mode 100644\nindex 0000000000..9a96c2523c\n--- /dev/null\n+++ b/libavcodec/aarch64/vc1dsp_neon.S\n@@ -0,0 +1,1546 @@\n+/*\n+ * VC1 AArch64 NEON optimisations\n+ *\n+ * Copyright (c) 2022 Ben Avison <bavison@riscosopen.org>\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"libavutil/aarch64/asm.S\"\n+\n+// VC-1 8x8 inverse transform\n+// On entry:\n+//   x0 -> array of 16-bit inverse transform coefficients, in column-major order\n+// On exit:\n+//   array at x0 updated to hold transformed block; also now held in row-major order\n+function ff_vc1_inv_trans_8x8_neon, export=1\n+        ld1             {v1.16b, v2.16b}, [x0], #32\n+        ld1             {v3.16b, v4.16b}, [x0], #32\n+        ld1             {v5.16b, v6.16b}, [x0], #32\n+        shl             v1.8h, v1.8h, #2        //         8/2 * src[0]\n+        sub             x1, x0, #3*32\n+        ld1             {v16.16b, v17.16b}, [x0]\n+        shl             v7.8h, v2.8h, #4        //          16 * src[8]\n+        shl             v18.8h, v2.8h, #2       //           4 * src[8]\n+        shl             v19.8h, v4.8h, #4       //                        16 * src[24]\n+        ldr             d0, .Lcoeffs_it8\n+        shl             v5.8h, v5.8h, #2        //                                      8/2 * src[32]\n+        shl             v20.8h, v6.8h, #4       //                                       16 * src[40]\n+        shl             v21.8h, v6.8h, #2       //                                        4 * src[40]\n+        shl             v22.8h, v17.8h, #4      //                                                      16 * src[56]\n+        ssra            v20.8h, v19.8h, #2      //                         4 * src[24] + 16 * src[40]\n+        mul             v23.8h, v3.8h, v0.h[0]  //                       6/2 * src[16]\n+        sub             v19.8h, v19.8h, v21.8h  //                        16 * src[24] -  4 * src[40]\n+        ssra            v7.8h, v22.8h, #2       //          16 * src[8]                               +  4 * src[56]\n+        sub             v18.8h, v22.8h, v18.8h  //        -  4 * src[8]                               + 16 * src[56]\n+        shl             v3.8h, v3.8h, #3        //                      16/2 * src[16]\n+        mls             v20.8h, v2.8h, v0.h[2]  //        - 15 * src[8] +  4 * src[24] + 16 * src[40]\n+        ssra            v1.8h, v1.8h, #1        //        12/2 * src[0]\n+        ssra            v5.8h, v5.8h, #1        //                                     12/2 * src[32]\n+        mla             v7.8h, v4.8h, v0.h[2]   //          16 * src[8] + 15 * src[24]                +  4 * src[56]\n+        shl             v21.8h, v16.8h, #3      //                                                    16/2 * src[48]\n+        mls             v19.8h, v2.8h, v0.h[1]  //        -  9 * src[8] + 16 * src[24] -  4 * src[40]\n+        sub             v2.8h, v23.8h, v21.8h   // t4/2 =                6/2 * src[16]              - 16/2 * src[48]\n+        mla             v18.8h, v4.8h, v0.h[1]  //        -  4 * src[8] +  9 * src[24]                + 16 * src[56]\n+        add             v4.8h, v1.8h, v5.8h     // t1/2 = 12/2 * src[0]              + 12/2 * src[32]\n+        sub             v1.8h, v1.8h, v5.8h     // t2/2 = 12/2 * src[0]              - 12/2 * src[32]\n+        mla             v3.8h, v16.8h, v0.h[0]  // t3/2 =               16/2 * src[16]              +  6/2 * src[48]\n+        mla             v7.8h, v6.8h, v0.h[1]   //  t1  =   16 * src[8] + 15 * src[24] +  9 * src[40] +  4 * src[56]\n+        add             v5.8h, v1.8h, v2.8h     // t6/2 = t2/2 + t4/2\n+        sub             v16.8h, v1.8h, v2.8h    // t7/2 = t2/2 - t4/2\n+        mla             v20.8h, v17.8h, v0.h[1] // -t2  = - 15 * src[8] +  4 * src[24] + 16 * src[40] +  9 * src[56]\n+        add             v21.8h, v1.8h, v2.8h    // t6/2 = t2/2 + t4/2\n+        add             v22.8h, v4.8h, v3.8h    // t5/2 = t1/2 + t3/2\n+        mls             v19.8h, v17.8h, v0.h[2] // -t3  = -  9 * src[8] + 16 * src[24] -  4 * src[40] - 15 * src[56]\n+        sub             v17.8h, v4.8h, v3.8h    // t8/2 = t1/2 - t3/2\n+        add             v23.8h, v4.8h, v3.8h    // t5/2 = t1/2 + t3/2\n+        mls             v18.8h, v6.8h, v0.h[2]  // -t4  = -  4 * src[8] +  9 * src[24] - 15 * src[40] + 16 * src[56]\n+        sub             v1.8h, v1.8h, v2.8h     // t7/2 = t2/2 - t4/2\n+        sub             v2.8h, v4.8h, v3.8h     // t8/2 = t1/2 - t3/2\n+        neg             v3.8h, v7.8h            // -t1\n+        neg             v4.8h, v20.8h           // +t2\n+        neg             v6.8h, v19.8h           // +t3\n+        ssra            v22.8h, v7.8h, #1       // (t5 + t1) >> 1\n+        ssra            v1.8h, v19.8h, #1       // (t7 - t3) >> 1\n+        neg             v7.8h, v18.8h           // +t4\n+        ssra            v5.8h, v4.8h, #1        // (t6 + t2) >> 1\n+        ssra            v16.8h, v6.8h, #1       // (t7 + t3) >> 1\n+        ssra            v2.8h, v18.8h, #1       // (t8 - t4) >> 1\n+        ssra            v17.8h, v7.8h, #1       // (t8 + t4) >> 1\n+        ssra            v21.8h, v20.8h, #1      // (t6 - t2) >> 1\n+        ssra            v23.8h, v3.8h, #1       // (t5 - t1) >> 1\n+        srshr           v3.8h, v22.8h, #2       // (t5 + t1 + 4) >> 3\n+        srshr           v4.8h, v5.8h, #2        // (t6 + t2 + 4) >> 3\n+        srshr           v5.8h, v16.8h, #2       // (t7 + t3 + 4) >> 3\n+        srshr           v6.8h, v17.8h, #2       // (t8 + t4 + 4) >> 3\n+        srshr           v2.8h, v2.8h, #2        // (t8 - t4 + 4) >> 3\n+        srshr           v1.8h, v1.8h, #2        // (t7 - t3 + 4) >> 3\n+        srshr           v7.8h, v21.8h, #2       // (t6 - t2 + 4) >> 3\n+        srshr           v16.8h, v23.8h, #2      // (t5 - t1 + 4) >> 3\n+        trn2            v17.8h, v3.8h, v4.8h\n+        trn2            v18.8h, v5.8h, v6.8h\n+        trn2            v19.8h, v2.8h, v1.8h\n+        trn2            v20.8h, v7.8h, v16.8h\n+        trn1            v21.4s, v17.4s, v18.4s\n+        trn2            v17.4s, v17.4s, v18.4s\n+        trn1            v18.4s, v19.4s, v20.4s\n+        trn2            v19.4s, v19.4s, v20.4s\n+        trn1            v3.8h, v3.8h, v4.8h\n+        trn2            v4.2d, v21.2d, v18.2d\n+        trn1            v20.2d, v17.2d, v19.2d\n+        trn1            v5.8h, v5.8h, v6.8h\n+        trn1            v1.8h, v2.8h, v1.8h\n+        trn1            v2.8h, v7.8h, v16.8h\n+        trn1            v6.2d, v21.2d, v18.2d\n+        trn2            v7.2d, v17.2d, v19.2d\n+        shl             v16.8h, v20.8h, #4      //                        16 * src[24]\n+        shl             v17.8h, v4.8h, #4       //                                       16 * src[40]\n+        trn1            v18.4s, v3.4s, v5.4s\n+        trn1            v19.4s, v1.4s, v2.4s\n+        shl             v21.8h, v7.8h, #4       //                                                      16 * src[56]\n+        shl             v22.8h, v6.8h, #2       //           4 * src[8]\n+        shl             v23.8h, v4.8h, #2       //                                        4 * src[40]\n+        trn2            v3.4s, v3.4s, v5.4s\n+        trn2            v1.4s, v1.4s, v2.4s\n+        shl             v2.8h, v6.8h, #4        //          16 * src[8]\n+        sub             v5.8h, v16.8h, v23.8h   //                        16 * src[24] -  4 * src[40]\n+        ssra            v17.8h, v16.8h, #2      //                         4 * src[24] + 16 * src[40]\n+        sub             v16.8h, v21.8h, v22.8h  //        -  4 * src[8]                               + 16 * src[56]\n+        trn1            v22.2d, v18.2d, v19.2d\n+        trn2            v18.2d, v18.2d, v19.2d\n+        trn1            v19.2d, v3.2d, v1.2d\n+        ssra            v2.8h, v21.8h, #2       //          16 * src[8]                               +  4 * src[56]\n+        mls             v17.8h, v6.8h, v0.h[2]  //        - 15 * src[8] +  4 * src[24] + 16 * src[40]\n+        shl             v21.8h, v22.8h, #2      //         8/2 * src[0]\n+        shl             v18.8h, v18.8h, #2      //                                      8/2 * src[32]\n+        mls             v5.8h, v6.8h, v0.h[1]   //        -  9 * src[8] + 16 * src[24] -  4 * src[40]\n+        shl             v6.8h, v19.8h, #3       //                      16/2 * src[16]\n+        trn2            v1.2d, v3.2d, v1.2d\n+        mla             v16.8h, v20.8h, v0.h[1] //        -  4 * src[8] +  9 * src[24]                + 16 * src[56]\n+        ssra            v21.8h, v21.8h, #1      //        12/2 * src[0]\n+        ssra            v18.8h, v18.8h, #1      //                                     12/2 * src[32]\n+        mul             v3.8h, v19.8h, v0.h[0]  //                       6/2 * src[16]\n+        shl             v19.8h, v1.8h, #3       //                                                    16/2 * src[48]\n+        mla             v2.8h, v20.8h, v0.h[2]  //          16 * src[8] + 15 * src[24]                +  4 * src[56]\n+        add             v20.8h, v21.8h, v18.8h  // t1/2 = 12/2 * src[0]              + 12/2 * src[32]\n+        mla             v6.8h, v1.8h, v0.h[0]   // t3/2 =               16/2 * src[16]              +  6/2 * src[48]\n+        sub             v1.8h, v21.8h, v18.8h   // t2/2 = 12/2 * src[0]              - 12/2 * src[32]\n+        sub             v3.8h, v3.8h, v19.8h    // t4/2 =                6/2 * src[16]              - 16/2 * src[48]\n+        mla             v17.8h, v7.8h, v0.h[1]  // -t2  = - 15 * src[8] +  4 * src[24] + 16 * src[40] +  9 * src[56]\n+        mls             v5.8h, v7.8h, v0.h[2]   // -t3  = -  9 * src[8] + 16 * src[24] -  4 * src[40] - 15 * src[56]\n+        add             v7.8h, v1.8h, v3.8h     // t6/2 = t2/2 + t4/2\n+        add             v18.8h, v20.8h, v6.8h   // t5/2 = t1/2 + t3/2\n+        mls             v16.8h, v4.8h, v0.h[2]  // -t4  = -  4 * src[8] +  9 * src[24] - 15 * src[40] + 16 * src[56]\n+        sub             v19.8h, v1.8h, v3.8h    // t7/2 = t2/2 - t4/2\n+        neg             v21.8h, v17.8h          // +t2\n+        mla             v2.8h, v4.8h, v0.h[1]   //  t1  =   16 * src[8] + 15 * src[24] +  9 * src[40] +  4 * src[56]\n+        sub             v0.8h, v20.8h, v6.8h    // t8/2 = t1/2 - t3/2\n+        neg             v4.8h, v5.8h            // +t3\n+        sub             v22.8h, v1.8h, v3.8h    // t7/2 = t2/2 - t4/2\n+        sub             v23.8h, v20.8h, v6.8h   // t8/2 = t1/2 - t3/2\n+        neg             v24.8h, v16.8h          // +t4\n+        add             v6.8h, v20.8h, v6.8h    // t5/2 = t1/2 + t3/2\n+        add             v1.8h, v1.8h, v3.8h     // t6/2 = t2/2 + t4/2\n+        ssra            v7.8h, v21.8h, #1       // (t6 + t2) >> 1\n+        neg             v3.8h, v2.8h            // -t1\n+        ssra            v18.8h, v2.8h, #1       // (t5 + t1) >> 1\n+        ssra            v19.8h, v4.8h, #1       // (t7 + t3) >> 1\n+        ssra            v0.8h, v24.8h, #1       // (t8 + t4) >> 1\n+        srsra           v23.8h, v16.8h, #1      // (t8 - t4 + 1) >> 1\n+        srsra           v22.8h, v5.8h, #1       // (t7 - t3 + 1) >> 1\n+        srsra           v1.8h, v17.8h, #1       // (t6 - t2 + 1) >> 1\n+        srsra           v6.8h, v3.8h, #1        // (t5 - t1 + 1) >> 1\n+        srshr           v2.8h, v18.8h, #6       // (t5 + t1 + 64) >> 7\n+        srshr           v3.8h, v7.8h, #6        // (t6 + t2 + 64) >> 7\n+        srshr           v4.8h, v19.8h, #6       // (t7 + t3 + 64) >> 7\n+        srshr           v5.8h, v0.8h, #6        // (t8 + t4 + 64) >> 7\n+        srshr           v16.8h, v23.8h, #6      // (t8 - t4 + 65) >> 7\n+        srshr           v17.8h, v22.8h, #6      // (t7 - t3 + 65) >> 7\n+        st1             {v2.16b, v3.16b}, [x1], #32\n+        srshr           v0.8h, v1.8h, #6        // (t6 - t2 + 65) >> 7\n+        srshr           v1.8h, v6.8h, #6        // (t5 - t1 + 65) >> 7\n+        st1             {v4.16b, v5.16b}, [x1], #32\n+        st1             {v16.16b, v17.16b}, [x1], #32\n+        st1             {v0.16b, v1.16b}, [x1]\n+        ret\n+endfunc\n+\n+// VC-1 8x4 inverse transform\n+// On entry:\n+//   x0 -> array of 8-bit samples, in row-major order\n+//   x1 = row stride for 8-bit sample array\n+//   x2 -> array of 16-bit inverse transform coefficients, in row-major order\n+// On exit:\n+//   array at x0 updated by saturated addition of (narrowed) transformed block\n+function ff_vc1_inv_trans_8x4_neon, export=1\n+        ld1             {v1.8b, v2.8b, v3.8b, v4.8b}, [x2], #32\n+        mov             x3, x0\n+        ld1             {v16.8b, v17.8b, v18.8b, v19.8b}, [x2]\n+        ldr             q0, .Lcoeffs_it8        // includes 4-point coefficients in upper half of vector\n+        ld1             {v5.8b}, [x0], x1\n+        trn2            v6.4h, v1.4h, v3.4h\n+        trn2            v7.4h, v2.4h, v4.4h\n+        trn1            v1.4h, v1.4h, v3.4h\n+        trn1            v2.4h, v2.4h, v4.4h\n+        trn2            v3.4h, v16.4h, v18.4h\n+        trn2            v4.4h, v17.4h, v19.4h\n+        trn1            v16.4h, v16.4h, v18.4h\n+        trn1            v17.4h, v17.4h, v19.4h\n+        ld1             {v18.8b}, [x0], x1\n+        trn1            v19.2s, v6.2s, v3.2s\n+        trn2            v3.2s, v6.2s, v3.2s\n+        trn1            v6.2s, v7.2s, v4.2s\n+        trn2            v4.2s, v7.2s, v4.2s\n+        trn1            v7.2s, v1.2s, v16.2s\n+        trn1            v20.2s, v2.2s, v17.2s\n+        shl             v21.4h, v19.4h, #4      //          16 * src[1]\n+        trn2            v1.2s, v1.2s, v16.2s\n+        shl             v16.4h, v3.4h, #4       //                        16 * src[3]\n+        trn2            v2.2s, v2.2s, v17.2s\n+        shl             v17.4h, v6.4h, #4       //                                      16 * src[5]\n+        ld1             {v22.8b}, [x0], x1\n+        shl             v23.4h, v4.4h, #4       //                                                    16 * src[7]\n+        mul             v24.4h, v1.4h, v0.h[0]  //                       6/2 * src[2]\n+        ld1             {v25.8b}, [x0]\n+        shl             v26.4h, v19.4h, #2      //           4 * src[1]\n+        shl             v27.4h, v6.4h, #2       //                                       4 * src[5]\n+        ssra            v21.4h, v23.4h, #2      //          16 * src[1]                             +  4 * src[7]\n+        ssra            v17.4h, v16.4h, #2      //                         4 * src[3] + 16 * src[5]\n+        sub             v23.4h, v23.4h, v26.4h  //        -  4 * src[1]                             + 16 * src[7]\n+        sub             v16.4h, v16.4h, v27.4h  //                        16 * src[3] -  4 * src[5]\n+        shl             v7.4h, v7.4h, #2        //         8/2 * src[0]\n+        shl             v20.4h, v20.4h, #2      //                                     8/2 * src[4]\n+        mla             v21.4h, v3.4h, v0.h[2]  //          16 * src[1] + 15 * src[3]               +  4 * src[7]\n+        shl             v1.4h, v1.4h, #3        //                      16/2 * src[2]\n+        mls             v17.4h, v19.4h, v0.h[2] //        - 15 * src[1] +  4 * src[3] + 16 * src[5]\n+        ssra            v7.4h, v7.4h, #1        //        12/2 * src[0]\n+        mls             v16.4h, v19.4h, v0.h[1] //        -  9 * src[1] + 16 * src[3] -  4 * src[5]\n+        ssra            v20.4h, v20.4h, #1      //                                    12/2 * src[4]\n+        mla             v23.4h, v3.4h, v0.h[1]  //        -  4 * src[1] +  9 * src[3]               + 16 * src[7]\n+        shl             v3.4h, v2.4h, #3        //                                                  16/2 * src[6]\n+        mla             v1.4h, v2.4h, v0.h[0]   // t3/2 =               16/2 * src[2]             +  6/2 * src[6]\n+        mla             v21.4h, v6.4h, v0.h[1]  //  t1  =   16 * src[1] + 15 * src[3] +  9 * src[5] +  4 * src[7]\n+        mla             v17.4h, v4.4h, v0.h[1]  // -t2  = - 15 * src[1] +  4 * src[3] + 16 * src[5] +  9 * src[7]\n+        sub             v2.4h, v24.4h, v3.4h    // t4/2 =                6/2 * src[2]             - 16/2 * src[6]\n+        mls             v16.4h, v4.4h, v0.h[2]  // -t3  = -  9 * src[1] + 16 * src[3] -  4 * src[5] - 15 * src[7]\n+        add             v3.4h, v7.4h, v20.4h    // t1/2 = 12/2 * src[0]             + 12/2 * src[4]\n+        mls             v23.4h, v6.4h, v0.h[2]  // -t4  = -  4 * src[1] +  9 * src[3] - 15 * src[5] + 16 * src[7]\n+        sub             v4.4h, v7.4h, v20.4h    // t2/2 = 12/2 * src[0]             - 12/2 * src[4]\n+        neg             v6.4h, v21.4h           // -t1\n+        add             v7.4h, v3.4h, v1.4h     // t5/2 = t1/2 + t3/2\n+        sub             v19.4h, v3.4h, v1.4h    // t8/2 = t1/2 - t3/2\n+        add             v20.4h, v4.4h, v2.4h    // t6/2 = t2/2 + t4/2\n+        sub             v24.4h, v4.4h, v2.4h    // t7/2 = t2/2 - t4/2\n+        add             v26.4h, v3.4h, v1.4h    // t5/2 = t1/2 + t3/2\n+        add             v27.4h, v4.4h, v2.4h    // t6/2 = t2/2 + t4/2\n+        sub             v2.4h, v4.4h, v2.4h     // t7/2 = t2/2 - t4/2\n+        sub             v1.4h, v3.4h, v1.4h     // t8/2 = t1/2 - t3/2\n+        neg             v3.4h, v17.4h           // +t2\n+        neg             v4.4h, v16.4h           // +t3\n+        neg             v28.4h, v23.4h          // +t4\n+        ssra            v7.4h, v21.4h, #1       // (t5 + t1) >> 1\n+        ssra            v1.4h, v23.4h, #1       // (t8 - t4) >> 1\n+        ssra            v20.4h, v3.4h, #1       // (t6 + t2) >> 1\n+        ssra            v24.4h, v4.4h, #1       // (t7 + t3) >> 1\n+        ssra            v19.4h, v28.4h, #1      // (t8 + t4) >> 1\n+        ssra            v2.4h, v16.4h, #1       // (t7 - t3) >> 1\n+        ssra            v27.4h, v17.4h, #1      // (t6 - t2) >> 1\n+        ssra            v26.4h, v6.4h, #1       // (t5 - t1) >> 1\n+        trn1            v1.2d, v7.2d, v1.2d\n+        trn1            v2.2d, v20.2d, v2.2d\n+        trn1            v3.2d, v24.2d, v27.2d\n+        trn1            v4.2d, v19.2d, v26.2d\n+        srshr           v1.8h, v1.8h, #2        // (t5 + t1 + 4) >> 3, (t8 - t4 + 4) >> 3\n+        srshr           v2.8h, v2.8h, #2        // (t6 + t2 + 4) >> 3, (t7 - t3 + 4) >> 3\n+        srshr           v3.8h, v3.8h, #2        // (t7 + t3 + 4) >> 3, (t6 - t2 + 4) >> 3\n+        srshr           v4.8h, v4.8h, #2        // (t8 + t4 + 4) >> 3, (t5 - t1 + 4) >> 3\n+        trn2            v6.8h, v1.8h, v2.8h\n+        trn1            v1.8h, v1.8h, v2.8h\n+        trn2            v2.8h, v3.8h, v4.8h\n+        trn1            v3.8h, v3.8h, v4.8h\n+        trn2            v4.4s, v6.4s, v2.4s\n+        trn1            v7.4s, v1.4s, v3.4s\n+        trn2            v1.4s, v1.4s, v3.4s\n+        mul             v3.8h, v4.8h, v0.h[5]   //                                                           22/2 * src[24]\n+        trn1            v2.4s, v6.4s, v2.4s\n+        mul             v4.8h, v4.8h, v0.h[4]   //                                                           10/2 * src[24]\n+        mul             v6.8h, v7.8h, v0.h[6]   //            17 * src[0]\n+        mul             v1.8h, v1.8h, v0.h[6]   //                                            17 * src[16]\n+        mls             v3.8h, v2.8h, v0.h[4]   //  t4/2 =                - 10/2 * src[8]                  + 22/2 * src[24]\n+        mla             v4.8h, v2.8h, v0.h[5]   //  t3/2 =                  22/2 * src[8]                  + 10/2 * src[24]\n+        add             v0.8h, v6.8h, v1.8h     //   t1  =    17 * src[0]                 +   17 * src[16]\n+        sub             v1.8h, v6.8h, v1.8h     //   t2  =    17 * src[0]                 -   17 * src[16]\n+        neg             v2.8h, v3.8h            // -t4/2\n+        neg             v6.8h, v4.8h            // -t3/2\n+        ssra            v4.8h, v0.8h, #1        // (t1 + t3) >> 1\n+        ssra            v2.8h, v1.8h, #1        // (t2 - t4) >> 1\n+        ssra            v3.8h, v1.8h, #1        // (t2 + t4) >> 1\n+        ssra            v6.8h, v0.8h, #1        // (t1 - t3) >> 1\n+        srshr           v0.8h, v4.8h, #6        // (t1 + t3 + 64) >> 7\n+        srshr           v1.8h, v2.8h, #6        // (t2 - t4 + 64) >> 7\n+        srshr           v2.8h, v3.8h, #6        // (t2 + t4 + 64) >> 7\n+        srshr           v3.8h, v6.8h, #6        // (t1 - t3 + 64) >> 7\n+        uaddw           v0.8h, v0.8h, v5.8b\n+        uaddw           v1.8h, v1.8h, v18.8b\n+        uaddw           v2.8h, v2.8h, v22.8b\n+        uaddw           v3.8h, v3.8h, v25.8b\n+        sqxtun          v0.8b, v0.8h\n+        sqxtun          v1.8b, v1.8h\n+        sqxtun          v2.8b, v2.8h\n+        sqxtun          v3.8b, v3.8h\n+        st1             {v0.8b}, [x3], x1\n+        st1             {v1.8b}, [x3], x1\n+        st1             {v2.8b}, [x3], x1\n+        st1             {v3.8b}, [x3]\n+        ret\n+endfunc\n+\n+// VC-1 4x8 inverse transform\n+// On entry:\n+//   x0 -> array of 8-bit samples, in row-major order\n+//   x1 = row stride for 8-bit sample array\n+//   x2 -> array of 16-bit inverse transform coefficients, in row-major order (row stride is 8 coefficients)\n+// On exit:\n+//   array at x0 updated by saturated addition of (narrowed) transformed block\n+function ff_vc1_inv_trans_4x8_neon, export=1\n+        mov             x3, #16\n+        ldr             q0, .Lcoeffs_it8        // includes 4-point coefficients in upper half of vector\n+        mov             x4, x0\n+        ld1             {v1.d}[0], [x2], x3     // 00 01 02 03\n+        ld1             {v2.d}[0], [x2], x3     // 10 11 12 13\n+        ld1             {v3.d}[0], [x2], x3     // 20 21 22 23\n+        ld1             {v4.d}[0], [x2], x3     // 30 31 32 33\n+        ld1             {v1.d}[1], [x2], x3     // 40 41 42 43\n+        ld1             {v2.d}[1], [x2], x3     // 50 51 52 53\n+        ld1             {v3.d}[1], [x2], x3     // 60 61 62 63\n+        ld1             {v4.d}[1], [x2]         // 70 71 72 73\n+        ld1             {v5.s}[0], [x0], x1\n+        ld1             {v6.s}[0], [x0], x1\n+        ld1             {v7.s}[0], [x0], x1\n+        trn2            v16.8h, v1.8h, v2.8h    // 01 11 03 13 41 51 43 53\n+        trn1            v1.8h, v1.8h, v2.8h     // 00 10 02 12 40 50 42 52\n+        trn2            v2.8h, v3.8h, v4.8h     // 21 31 23 33 61 71 63 73\n+        trn1            v3.8h, v3.8h, v4.8h     // 20 30 22 32 60 70 62 72\n+        ld1             {v4.s}[0], [x0], x1\n+        trn2            v17.4s, v16.4s, v2.4s   // 03 13 23 33 43 53 63 73\n+        trn1            v18.4s, v1.4s, v3.4s    // 00 10 20 30 40 50 60 70\n+        trn1            v2.4s, v16.4s, v2.4s    // 01 11 21 31 41 51 61 71\n+        mul             v16.8h, v17.8h, v0.h[4] //                                                          10/2 * src[3]\n+        ld1             {v5.s}[1], [x0], x1\n+        mul             v17.8h, v17.8h, v0.h[5] //                                                          22/2 * src[3]\n+        ld1             {v6.s}[1], [x0], x1\n+        trn2            v1.4s, v1.4s, v3.4s     // 02 12 22 32 42 52 62 72\n+        mul             v3.8h, v18.8h, v0.h[6]  //            17 * src[0]\n+        ld1             {v7.s}[1], [x0], x1\n+        mul             v1.8h, v1.8h, v0.h[6]   //                                            17 * src[2]\n+        ld1             {v4.s}[1], [x0]\n+        mla             v16.8h, v2.8h, v0.h[5]  //  t3/2 =                  22/2 * src[1]                 + 10/2 * src[3]\n+        mls             v17.8h, v2.8h, v0.h[4]  //  t4/2 =                - 10/2 * src[1]                 + 22/2 * src[3]\n+        add             v2.8h, v3.8h, v1.8h     //   t1  =    17 * src[0]                 +   17 * src[2]\n+        sub             v1.8h, v3.8h, v1.8h     //   t2  =    17 * src[0]                 -   17 * src[2]\n+        neg             v3.8h, v16.8h           // -t3/2\n+        ssra            v16.8h, v2.8h, #1       // (t1 + t3) >> 1\n+        neg             v18.8h, v17.8h          // -t4/2\n+        ssra            v17.8h, v1.8h, #1       // (t2 + t4) >> 1\n+        ssra            v3.8h, v2.8h, #1        // (t1 - t3) >> 1\n+        ssra            v18.8h, v1.8h, #1       // (t2 - t4) >> 1\n+        srshr           v1.8h, v16.8h, #2       // (t1 + t3 + 64) >> 3\n+        srshr           v2.8h, v17.8h, #2       // (t2 + t4 + 64) >> 3\n+        srshr           v3.8h, v3.8h, #2        // (t1 - t3 + 64) >> 3\n+        srshr           v16.8h, v18.8h, #2      // (t2 - t4 + 64) >> 3\n+        trn2            v17.8h, v2.8h, v3.8h    // 12 13 32 33 52 53 72 73\n+        trn2            v18.8h, v1.8h, v16.8h   // 10 11 30 31 50 51 70 71\n+        trn1            v1.8h, v1.8h, v16.8h    // 00 01 20 21 40 41 60 61\n+        trn1            v2.8h, v2.8h, v3.8h     // 02 03 22 23 42 43 62 63\n+        trn1            v3.4s, v18.4s, v17.4s   // 10 11 12 13 50 51 52 53\n+        trn2            v16.4s, v18.4s, v17.4s  // 30 31 32 33 70 71 72 73\n+        trn1            v17.4s, v1.4s, v2.4s    // 00 01 02 03 40 41 42 43\n+        mov             d18, v3.d[1]            // 50 51 52 53\n+        shl             v19.4h, v3.4h, #4       //          16 * src[8]\n+        mov             d20, v16.d[1]           // 70 71 72 73\n+        shl             v21.4h, v16.4h, #4      //                        16 * src[24]\n+        mov             d22, v17.d[1]           // 40 41 42 43\n+        shl             v23.4h, v3.4h, #2       //           4 * src[8]\n+        shl             v24.4h, v18.4h, #4      //                                       16 * src[40]\n+        shl             v25.4h, v20.4h, #4      //                                                      16 * src[56]\n+        shl             v26.4h, v18.4h, #2      //                                        4 * src[40]\n+        trn2            v1.4s, v1.4s, v2.4s     // 20 21 22 23 60 61 62 63\n+        ssra            v24.4h, v21.4h, #2      //                         4 * src[24] + 16 * src[40]\n+        sub             v2.4h, v25.4h, v23.4h   //        -  4 * src[8]                               + 16 * src[56]\n+        shl             v17.4h, v17.4h, #2      //         8/2 * src[0]\n+        sub             v21.4h, v21.4h, v26.4h  //                        16 * src[24] -  4 * src[40]\n+        shl             v22.4h, v22.4h, #2      //                                      8/2 * src[32]\n+        mov             d23, v1.d[1]            // 60 61 62 63\n+        ssra            v19.4h, v25.4h, #2      //          16 * src[8]                               +  4 * src[56]\n+        mul             v25.4h, v1.4h, v0.h[0]  //                       6/2 * src[16]\n+        shl             v1.4h, v1.4h, #3        //                      16/2 * src[16]\n+        mls             v24.4h, v3.4h, v0.h[2]  //        - 15 * src[8] +  4 * src[24] + 16 * src[40]\n+        ssra            v17.4h, v17.4h, #1      //        12/2 * src[0]\n+        mls             v21.4h, v3.4h, v0.h[1]  //        -  9 * src[8] + 16 * src[24] -  4 * src[40]\n+        ssra            v22.4h, v22.4h, #1      //                                     12/2 * src[32]\n+        mla             v2.4h, v16.4h, v0.h[1]  //        -  4 * src[8] +  9 * src[24]                + 16 * src[56]\n+        shl             v3.4h, v23.4h, #3       //                                                    16/2 * src[48]\n+        mla             v19.4h, v16.4h, v0.h[2] //          16 * src[8] + 15 * src[24]                +  4 * src[56]\n+        mla             v1.4h, v23.4h, v0.h[0]  // t3/2 =               16/2 * src[16]              +  6/2 * src[48]\n+        mla             v24.4h, v20.4h, v0.h[1] // -t2  = - 15 * src[8] +  4 * src[24] + 16 * src[40] +  9 * src[56]\n+        add             v16.4h, v17.4h, v22.4h  // t1/2 = 12/2 * src[0]              + 12/2 * src[32]\n+        sub             v3.4h, v25.4h, v3.4h    // t4/2 =                6/2 * src[16]              - 16/2 * src[48]\n+        sub             v17.4h, v17.4h, v22.4h  // t2/2 = 12/2 * src[0]              - 12/2 * src[32]\n+        mls             v21.4h, v20.4h, v0.h[2] // -t3  = -  9 * src[8] + 16 * src[24] -  4 * src[40] - 15 * src[56]\n+        mla             v19.4h, v18.4h, v0.h[1] //  t1  =   16 * src[8] + 15 * src[24] +  9 * src[40] +  4 * src[56]\n+        add             v20.4h, v16.4h, v1.4h   // t5/2 = t1/2 + t3/2\n+        mls             v2.4h, v18.4h, v0.h[2]  // -t4  = -  4 * src[8] +  9 * src[24] - 15 * src[40] + 16 * src[56]\n+        sub             v0.4h, v16.4h, v1.4h    // t8/2 = t1/2 - t3/2\n+        add             v18.4h, v17.4h, v3.4h   // t6/2 = t2/2 + t4/2\n+        sub             v22.4h, v17.4h, v3.4h   // t7/2 = t2/2 - t4/2\n+        neg             v23.4h, v24.4h          // +t2\n+        sub             v25.4h, v17.4h, v3.4h   // t7/2 = t2/2 - t4/2\n+        add             v3.4h, v17.4h, v3.4h    // t6/2 = t2/2 + t4/2\n+        neg             v17.4h, v21.4h          // +t3\n+        sub             v26.4h, v16.4h, v1.4h   // t8/2 = t1/2 - t3/2\n+        add             v1.4h, v16.4h, v1.4h    // t5/2 = t1/2 + t3/2\n+        neg             v16.4h, v19.4h          // -t1\n+        neg             v27.4h, v2.4h           // +t4\n+        ssra            v20.4h, v19.4h, #1      // (t5 + t1) >> 1\n+        srsra           v0.4h, v2.4h, #1        // (t8 - t4 + 1) >> 1\n+        ssra            v18.4h, v23.4h, #1      // (t6 + t2) >> 1\n+        srsra           v22.4h, v21.4h, #1      // (t7 - t3 + 1) >> 1\n+        ssra            v25.4h, v17.4h, #1      // (t7 + t3) >> 1\n+        srsra           v3.4h, v24.4h, #1       // (t6 - t2 + 1) >> 1\n+        ssra            v26.4h, v27.4h, #1      // (t8 + t4) >> 1\n+        srsra           v1.4h, v16.4h, #1       // (t5 - t1 + 1) >> 1\n+        trn1            v0.2d, v20.2d, v0.2d\n+        trn1            v2.2d, v18.2d, v22.2d\n+        trn1            v3.2d, v25.2d, v3.2d\n+        trn1            v1.2d, v26.2d, v1.2d\n+        srshr           v0.8h, v0.8h, #6        // (t5 + t1 + 64) >> 7, (t8 - t4 + 65) >> 7\n+        srshr           v2.8h, v2.8h, #6        // (t6 + t2 + 64) >> 7, (t7 - t3 + 65) >> 7\n+        srshr           v3.8h, v3.8h, #6        // (t7 + t3 + 64) >> 7, (t6 - t2 + 65) >> 7\n+        srshr           v1.8h, v1.8h, #6        // (t8 + t4 + 64) >> 7, (t5 - t1 + 65) >> 7\n+        uaddw           v0.8h, v0.8h, v5.8b\n+        uaddw           v2.8h, v2.8h, v6.8b\n+        uaddw           v3.8h, v3.8h, v7.8b\n+        uaddw           v1.8h, v1.8h, v4.8b\n+        sqxtun          v0.8b, v0.8h\n+        sqxtun          v2.8b, v2.8h\n+        sqxtun          v3.8b, v3.8h\n+        sqxtun          v1.8b, v1.8h\n+        st1             {v0.s}[0], [x4], x1\n+        st1             {v2.s}[0], [x4], x1\n+        st1             {v3.s}[0], [x4], x1\n+        st1             {v1.s}[0], [x4], x1\n+        st1             {v0.s}[1], [x4], x1\n+        st1             {v2.s}[1], [x4], x1\n+        st1             {v3.s}[1], [x4], x1\n+        st1             {v1.s}[1], [x4]\n+        ret\n+endfunc\n+\n+// VC-1 4x4 inverse transform\n+// On entry:\n+//   x0 -> array of 8-bit samples, in row-major order\n+//   x1 = row stride for 8-bit sample array\n+//   x2 -> array of 16-bit inverse transform coefficients, in row-major order (row stride is 8 coefficients)\n+// On exit:\n+//   array at x0 updated by saturated addition of (narrowed) transformed block\n+function ff_vc1_inv_trans_4x4_neon, export=1\n+        mov             x3, #16\n+        ldr             d0, .Lcoeffs_it4\n+        mov             x4, x0\n+        ld1             {v1.d}[0], [x2], x3     // 00 01 02 03\n+        ld1             {v2.d}[0], [x2], x3     // 10 11 12 13\n+        ld1             {v3.d}[0], [x2], x3     // 20 21 22 23\n+        ld1             {v4.d}[0], [x2]         // 30 31 32 33\n+        ld1             {v5.s}[0], [x0], x1\n+        ld1             {v5.s}[1], [x0], x1\n+        ld1             {v6.s}[0], [x0], x1\n+        trn2            v7.4h, v1.4h, v2.4h     // 01 11 03 13\n+        trn1            v1.4h, v1.4h, v2.4h     // 00 10 02 12\n+        ld1             {v6.s}[1], [x0]\n+        trn2            v2.4h, v3.4h, v4.4h     // 21 31 23 33\n+        trn1            v3.4h, v3.4h, v4.4h     // 20 30 22 32\n+        trn2            v4.2s, v7.2s, v2.2s     // 03 13 23 33\n+        trn1            v16.2s, v1.2s, v3.2s    // 00 10 20 30\n+        trn1            v2.2s, v7.2s, v2.2s     // 01 11 21 31\n+        trn2            v1.2s, v1.2s, v3.2s     // 02 12 22 32\n+        mul             v3.4h, v4.4h, v0.h[0]   //                                                          10/2 * src[3]\n+        mul             v4.4h, v4.4h, v0.h[1]   //                                                          22/2 * src[3]\n+        mul             v7.4h, v16.4h, v0.h[2]  //            17 * src[0]\n+        mul             v1.4h, v1.4h, v0.h[2]   //                                            17 * src[2]\n+        mla             v3.4h, v2.4h, v0.h[1]   //  t3/2 =                  22/2 * src[1]                 + 10/2 * src[3]\n+        mls             v4.4h, v2.4h, v0.h[0]   //  t4/2 =                - 10/2 * src[1]                 + 22/2 * src[3]\n+        add             v2.4h, v7.4h, v1.4h     //   t1  =    17 * src[0]                 +   17 * src[2]\n+        sub             v1.4h, v7.4h, v1.4h     //   t2  =    17 * src[0]                 -   17 * src[2]\n+        neg             v7.4h, v3.4h            // -t3/2\n+        neg             v16.4h, v4.4h           // -t4/2\n+        ssra            v3.4h, v2.4h, #1        // (t1 + t3) >> 1\n+        ssra            v4.4h, v1.4h, #1        // (t2 + t4) >> 1\n+        ssra            v16.4h, v1.4h, #1       // (t2 - t4) >> 1\n+        ssra            v7.4h, v2.4h, #1        // (t1 - t3) >> 1\n+        srshr           v1.4h, v3.4h, #2        // (t1 + t3 + 64) >> 3\n+        srshr           v2.4h, v4.4h, #2        // (t2 + t4 + 64) >> 3\n+        srshr           v3.4h, v16.4h, #2       // (t2 - t4 + 64) >> 3\n+        srshr           v4.4h, v7.4h, #2        // (t1 - t3 + 64) >> 3\n+        trn2            v7.4h, v1.4h, v3.4h     // 10 11 30 31\n+        trn1            v1.4h, v1.4h, v3.4h     // 00 01 20 21\n+        trn2            v3.4h, v2.4h, v4.4h     // 12 13 32 33\n+        trn1            v2.4h, v2.4h, v4.4h     // 02 03 22 23\n+        trn2            v4.2s, v7.2s, v3.2s     // 30 31 32 33\n+        trn1            v16.2s, v1.2s, v2.2s    // 00 01 02 03\n+        trn1            v3.2s, v7.2s, v3.2s     // 10 11 12 13\n+        trn2            v1.2s, v1.2s, v2.2s     // 20 21 22 23\n+        mul             v2.4h, v4.4h, v0.h[1]   //                                                           22/2 * src[24]\n+        mul             v4.4h, v4.4h, v0.h[0]   //                                                           10/2 * src[24]\n+        mul             v7.4h, v16.4h, v0.h[2]  //            17 * src[0]\n+        mul             v1.4h, v1.4h, v0.h[2]   //                                            17 * src[16]\n+        mls             v2.4h, v3.4h, v0.h[0]   //  t4/2 =                - 10/2 * src[8]                  + 22/2 * src[24]\n+        mla             v4.4h, v3.4h, v0.h[1]   //  t3/2 =                  22/2 * src[8]                  + 10/2 * src[24]\n+        add             v0.4h, v7.4h, v1.4h     //   t1  =    17 * src[0]                 +   17 * src[16]\n+        sub             v1.4h, v7.4h, v1.4h     //   t2  =    17 * src[0]                 -   17 * src[16]\n+        neg             v3.4h, v2.4h            // -t4/2\n+        neg             v7.4h, v4.4h            // -t3/2\n+        ssra            v4.4h, v0.4h, #1        // (t1 + t3) >> 1\n+        ssra            v3.4h, v1.4h, #1        // (t2 - t4) >> 1\n+        ssra            v2.4h, v1.4h, #1        // (t2 + t4) >> 1\n+        ssra            v7.4h, v0.4h, #1        // (t1 - t3) >> 1\n+        trn1            v0.2d, v4.2d, v3.2d\n+        trn1            v1.2d, v2.2d, v7.2d\n+        srshr           v0.8h, v0.8h, #6        // (t1 + t3 + 64) >> 7, (t2 - t4 + 64) >> 7\n+        srshr           v1.8h, v1.8h, #6        // (t2 + t4 + 64) >> 7, (t1 - t3 + 64) >> 7\n+        uaddw           v0.8h, v0.8h, v5.8b\n+        uaddw           v1.8h, v1.8h, v6.8b\n+        sqxtun          v0.8b, v0.8h\n+        sqxtun          v1.8b, v1.8h\n+        st1             {v0.s}[0], [x4], x1\n+        st1             {v0.s}[1], [x4], x1\n+        st1             {v1.s}[0], [x4], x1\n+        st1             {v1.s}[1], [x4]\n+        ret\n+endfunc\n+\n+// VC-1 8x8 inverse transform, DC case\n+// On entry:\n+//   x0 -> array of 8-bit samples, in row-major order\n+//   x1 = row stride for 8-bit sample array\n+//   x2 -> 16-bit inverse transform DC coefficient\n+// On exit:\n+//   array at x0 updated by saturated addition of (narrowed) transformed block\n+function ff_vc1_inv_trans_8x8_dc_neon, export=1\n+        ldrsh           w2, [x2]\n+        mov             x3, x0\n+        ld1             {v0.8b}, [x0], x1\n+        ld1             {v1.8b}, [x0], x1\n+        ld1             {v2.8b}, [x0], x1\n+        add             w2, w2, w2, lsl #1\n+        ld1             {v3.8b}, [x0], x1\n+        ld1             {v4.8b}, [x0], x1\n+        add             w2, w2, #1\n+        ld1             {v5.8b}, [x0], x1\n+        asr             w2, w2, #1\n+        ld1             {v6.8b}, [x0], x1\n+        add             w2, w2, w2, lsl #1\n+        ld1             {v7.8b}, [x0]\n+        add             w0, w2, #16\n+        asr             w0, w0, #5\n+        dup             v16.8h, w0\n+        uaddw           v0.8h, v16.8h, v0.8b\n+        uaddw           v1.8h, v16.8h, v1.8b\n+        uaddw           v2.8h, v16.8h, v2.8b\n+        uaddw           v3.8h, v16.8h, v3.8b\n+        uaddw           v4.8h, v16.8h, v4.8b\n+        uaddw           v5.8h, v16.8h, v5.8b\n+        sqxtun          v0.8b, v0.8h\n+        uaddw           v6.8h, v16.8h, v6.8b\n+        sqxtun          v1.8b, v1.8h\n+        uaddw           v7.8h, v16.8h, v7.8b\n+        sqxtun          v2.8b, v2.8h\n+        sqxtun          v3.8b, v3.8h\n+        sqxtun          v4.8b, v4.8h\n+        st1             {v0.8b}, [x3], x1\n+        sqxtun          v0.8b, v5.8h\n+        st1             {v1.8b}, [x3], x1\n+        sqxtun          v1.8b, v6.8h\n+        st1             {v2.8b}, [x3], x1\n+        sqxtun          v2.8b, v7.8h\n+        st1             {v3.8b}, [x3], x1\n+        st1             {v4.8b}, [x3], x1\n+        st1             {v0.8b}, [x3], x1\n+        st1             {v1.8b}, [x3], x1\n+        st1             {v2.8b}, [x3]\n+        ret\n+endfunc\n+\n+// VC-1 8x4 inverse transform, DC case\n+// On entry:\n+//   x0 -> array of 8-bit samples, in row-major order\n+//   x1 = row stride for 8-bit sample array\n+//   x2 -> 16-bit inverse transform DC coefficient\n+// On exit:\n+//   array at x0 updated by saturated addition of (narrowed) transformed block\n+function ff_vc1_inv_trans_8x4_dc_neon, export=1\n+        ldrsh           w2, [x2]\n+        mov             x3, x0\n+        ld1             {v0.8b}, [x0], x1\n+        ld1             {v1.8b}, [x0], x1\n+        ld1             {v2.8b}, [x0], x1\n+        add             w2, w2, w2, lsl #1\n+        ld1             {v3.8b}, [x0]\n+        add             w0, w2, #1\n+        asr             w0, w0, #1\n+        add             w0, w0, w0, lsl #4\n+        add             w0, w0, #64\n+        asr             w0, w0, #7\n+        dup             v4.8h, w0\n+        uaddw           v0.8h, v4.8h, v0.8b\n+        uaddw           v1.8h, v4.8h, v1.8b\n+        uaddw           v2.8h, v4.8h, v2.8b\n+        uaddw           v3.8h, v4.8h, v3.8b\n+        sqxtun          v0.8b, v0.8h\n+        sqxtun          v1.8b, v1.8h\n+        sqxtun          v2.8b, v2.8h\n+        sqxtun          v3.8b, v3.8h\n+        st1             {v0.8b}, [x3], x1\n+        st1             {v1.8b}, [x3], x1\n+        st1             {v2.8b}, [x3], x1\n+        st1             {v3.8b}, [x3]\n+        ret\n+endfunc\n+\n+// VC-1 4x8 inverse transform, DC case\n+// On entry:\n+//   x0 -> array of 8-bit samples, in row-major order\n+//   x1 = row stride for 8-bit sample array\n+//   x2 -> 16-bit inverse transform DC coefficient\n+// On exit:\n+//   array at x0 updated by saturated addition of (narrowed) transformed block\n+function ff_vc1_inv_trans_4x8_dc_neon, export=1\n+        ldrsh           w2, [x2]\n+        mov             x3, x0\n+        ld1             {v0.s}[0], [x0], x1\n+        ld1             {v1.s}[0], [x0], x1\n+        ld1             {v2.s}[0], [x0], x1\n+        add             w2, w2, w2, lsl #4\n+        ld1             {v3.s}[0], [x0], x1\n+        add             w2, w2, #4\n+        asr             w2, w2, #3\n+        add             w2, w2, w2, lsl #1\n+        ld1             {v0.s}[1], [x0], x1\n+        add             w2, w2, #16\n+        asr             w2, w2, #5\n+        dup             v4.8h, w2\n+        ld1             {v1.s}[1], [x0], x1\n+        ld1             {v2.s}[1], [x0], x1\n+        ld1             {v3.s}[1], [x0]\n+        uaddw           v0.8h, v4.8h, v0.8b\n+        uaddw           v1.8h, v4.8h, v1.8b\n+        uaddw           v2.8h, v4.8h, v2.8b\n+        uaddw           v3.8h, v4.8h, v3.8b\n+        sqxtun          v0.8b, v0.8h\n+        sqxtun          v1.8b, v1.8h\n+        sqxtun          v2.8b, v2.8h\n+        sqxtun          v3.8b, v3.8h\n+        st1             {v0.s}[0], [x3], x1\n+        st1             {v1.s}[0], [x3], x1\n+        st1             {v2.s}[0], [x3], x1\n+        st1             {v3.s}[0], [x3], x1\n+        st1             {v0.s}[1], [x3], x1\n+        st1             {v1.s}[1], [x3], x1\n+        st1             {v2.s}[1], [x3], x1\n+        st1             {v3.s}[1], [x3]\n+        ret\n+endfunc\n+\n+// VC-1 4x4 inverse transform, DC case\n+// On entry:\n+//   x0 -> array of 8-bit samples, in row-major order\n+//   x1 = row stride for 8-bit sample array\n+//   x2 -> 16-bit inverse transform DC coefficient\n+// On exit:\n+//   array at x0 updated by saturated addition of (narrowed) transformed block\n+function ff_vc1_inv_trans_4x4_dc_neon, export=1\n+        ldrsh           w2, [x2]\n+        mov             x3, x0\n+        ld1             {v0.s}[0], [x0], x1\n+        ld1             {v1.s}[0], [x0], x1\n+        ld1             {v0.s}[1], [x0], x1\n+        add             w2, w2, w2, lsl #4\n+        ld1             {v1.s}[1], [x0]\n+        add             w0, w2, #4\n+        asr             w0, w0, #3\n+        add             w0, w0, w0, lsl #4\n+        add             w0, w0, #64\n+        asr             w0, w0, #7\n+        dup             v2.8h, w0\n+        uaddw           v0.8h, v2.8h, v0.8b\n+        uaddw           v1.8h, v2.8h, v1.8b\n+        sqxtun          v0.8b, v0.8h\n+        sqxtun          v1.8b, v1.8h\n+        st1             {v0.s}[0], [x3], x1\n+        st1             {v1.s}[0], [x3], x1\n+        st1             {v0.s}[1], [x3], x1\n+        st1             {v1.s}[1], [x3]\n+        ret\n+endfunc\n+\n+.align  5\n+.Lcoeffs_it8:\n+.quad   0x000F00090003\n+.Lcoeffs_it4:\n+.quad   0x0011000B0005\n+.Lcoeffs:\n+.quad   0x00050002\n+\n+// VC-1 in-loop deblocking filter for 4 pixel pairs at boundary of vertically-neighbouring blocks\n+// On entry:\n+//   x0 -> top-left pel of lower block\n+//   x1 = row stride, bytes\n+//   w2 = PQUANT bitstream parameter\n+function ff_vc1_v_loop_filter4_neon, export=1\n+        sub             x3, x0, w1, sxtw #2\n+        ldr             d0, .Lcoeffs\n+        ld1             {v1.s}[0], [x0], x1     // P5\n+        ld1             {v2.s}[0], [x3], x1     // P1\n+        ld1             {v3.s}[0], [x3], x1     // P2\n+        ld1             {v4.s}[0], [x0], x1     // P6\n+        ld1             {v5.s}[0], [x3], x1     // P3\n+        ld1             {v6.s}[0], [x0], x1     // P7\n+        ld1             {v7.s}[0], [x3]         // P4\n+        ld1             {v16.s}[0], [x0]        // P8\n+        ushll           v17.8h, v1.8b, #1       // 2*P5\n+        dup             v18.8h, w2              // pq\n+        ushll           v2.8h, v2.8b, #1        // 2*P1\n+        uxtl            v3.8h, v3.8b            // P2\n+        uxtl            v4.8h, v4.8b            // P6\n+        uxtl            v19.8h, v5.8b           // P3\n+        mls             v2.4h, v3.4h, v0.h[1]   // 2*P1-5*P2\n+        uxtl            v3.8h, v6.8b            // P7\n+        mls             v17.4h, v4.4h, v0.h[1]  // 2*P5-5*P6\n+        ushll           v5.8h, v5.8b, #1        // 2*P3\n+        uxtl            v6.8h, v7.8b            // P4\n+        mla             v17.4h, v3.4h, v0.h[1]  // 2*P5-5*P6+5*P7\n+        uxtl            v3.8h, v16.8b           // P8\n+        mla             v2.4h, v19.4h, v0.h[1]  // 2*P1-5*P2+5*P3\n+        uxtl            v1.8h, v1.8b            // P5\n+        mls             v5.4h, v6.4h, v0.h[1]   // 2*P3-5*P4\n+        mls             v17.4h, v3.4h, v0.h[0]  // 2*P5-5*P6+5*P7-2*P8\n+        sub             v3.4h, v6.4h, v1.4h     // P4-P5\n+        mls             v2.4h, v6.4h, v0.h[0]   // 2*P1-5*P2+5*P3-2*P4\n+        mla             v5.4h, v1.4h, v0.h[1]   // 2*P3-5*P4+5*P5\n+        mls             v5.4h, v4.4h, v0.h[0]   // 2*P3-5*P4+5*P5-2*P6\n+        abs             v4.4h, v3.4h\n+        srshr           v7.4h, v17.4h, #3\n+        srshr           v2.4h, v2.4h, #3\n+        sshr            v4.4h, v4.4h, #1        // clip\n+        srshr           v5.4h, v5.4h, #3\n+        abs             v7.4h, v7.4h            // a2\n+        sshr            v3.4h, v3.4h, #8        // clip_sign\n+        abs             v2.4h, v2.4h            // a1\n+        cmeq            v16.4h, v4.4h, #0       // test clip == 0\n+        abs             v17.4h, v5.4h           // a0\n+        sshr            v5.4h, v5.4h, #8        // a0_sign\n+        cmhs            v19.4h, v2.4h, v7.4h    // test a1 >= a2\n+        cmhs            v18.4h, v17.4h, v18.4h  // test a0 >= pq\n+        sub             v3.4h, v3.4h, v5.4h     // clip_sign - a0_sign\n+        bsl             v19.8b, v7.8b, v2.8b    // a3\n+        orr             v2.8b, v16.8b, v18.8b   // test clip == 0 || a0 >= pq\n+        uqsub           v5.4h, v17.4h, v19.4h   // a0 >= a3 ? a0-a3 : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        cmhs            v7.4h, v19.4h, v17.4h   // test a3 >= a0\n+        mul             v0.4h, v5.4h, v0.h[1]   // a0 >= a3 ? 5*(a0-a3) : 0\n+        orr             v5.8b, v2.8b, v7.8b     // test clip == 0 || a0 >= pq || a3 >= a0\n+        mov             w0, v5.s[1]             // move to gp reg\n+        ushr            v0.4h, v0.4h, #3        // a0 >= a3 ? (5*(a0-a3))>>3 : 0\n+        cmhs            v5.4h, v0.4h, v4.4h\n+        tbnz            w0, #0, 1f              // none of the 4 pixel pairs should be updated if this one is not filtered\n+        bsl             v5.8b, v4.8b, v0.8b     // FFMIN(d, clip)\n+        bic             v0.8b, v5.8b, v2.8b     // set each d to zero if it should not be filtered because clip == 0 || a0 >= pq (a3 > a0 case already zeroed by saturating sub)\n+        mls             v6.4h, v0.4h, v3.4h     // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4\n+        mla             v1.4h, v0.4h, v3.4h     // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5\n+        sqxtun          v0.8b, v6.8h\n+        sqxtun          v1.8b, v1.8h\n+        st1             {v0.s}[0], [x3], x1\n+        st1             {v1.s}[0], [x3]\n+1:      ret\n+endfunc\n+\n+// VC-1 in-loop deblocking filter for 4 pixel pairs at boundary of horizontally-neighbouring blocks\n+// On entry:\n+//   x0 -> top-left pel of right block\n+//   x1 = row stride, bytes\n+//   w2 = PQUANT bitstream parameter\n+function ff_vc1_h_loop_filter4_neon, export=1\n+        sub             x3, x0, #4              // where to start reading\n+        ldr             d0, .Lcoeffs\n+        ld1             {v1.8b}, [x3], x1\n+        sub             x0, x0, #1              // where to start writing\n+        ld1             {v2.8b}, [x3], x1\n+        ld1             {v3.8b}, [x3], x1\n+        ld1             {v4.8b}, [x3]\n+        dup             v5.8h, w2               // pq\n+        trn1            v6.8b, v1.8b, v2.8b\n+        trn2            v1.8b, v1.8b, v2.8b\n+        trn1            v2.8b, v3.8b, v4.8b\n+        trn2            v3.8b, v3.8b, v4.8b\n+        trn1            v4.4h, v6.4h, v2.4h     // P1, P5\n+        trn1            v7.4h, v1.4h, v3.4h     // P2, P6\n+        trn2            v2.4h, v6.4h, v2.4h     // P3, P7\n+        trn2            v1.4h, v1.4h, v3.4h     // P4, P8\n+        ushll           v3.8h, v4.8b, #1        // 2*P1, 2*P5\n+        uxtl            v6.8h, v7.8b            // P2, P6\n+        uxtl            v7.8h, v2.8b            // P3, P7\n+        uxtl            v1.8h, v1.8b            // P4, P8\n+        mls             v3.8h, v6.8h, v0.h[1]   // 2*P1-5*P2, 2*P5-5*P6\n+        ushll           v2.8h, v2.8b, #1        // 2*P3, 2*P7\n+        uxtl            v4.8h, v4.8b            // P1, P5\n+        mla             v3.8h, v7.8h, v0.h[1]   // 2*P1-5*P2+5*P3, 2*P5-5*P6+5*P7\n+        mov             d6, v6.d[1]             // P6\n+        mls             v3.8h, v1.8h, v0.h[0]   // 2*P1-5*P2+5*P3-2*P4, 2*P5-5*P6+5*P7-2*P8\n+        mov             d4, v4.d[1]             // P5\n+        mls             v2.4h, v1.4h, v0.h[1]   // 2*P3-5*P4\n+        mla             v2.4h, v4.4h, v0.h[1]   // 2*P3-5*P4+5*P5\n+        sub             v7.4h, v1.4h, v4.4h     // P4-P5\n+        mls             v2.4h, v6.4h, v0.h[0]   // 2*P3-5*P4+5*P5-2*P6\n+        srshr           v3.8h, v3.8h, #3\n+        abs             v6.4h, v7.4h\n+        sshr            v7.4h, v7.4h, #8        // clip_sign\n+        srshr           v2.4h, v2.4h, #3\n+        abs             v3.8h, v3.8h            // a1, a2\n+        sshr            v6.4h, v6.4h, #1        // clip\n+        mov             d16, v3.d[1]            // a2\n+        abs             v17.4h, v2.4h           // a0\n+        cmeq            v18.4h, v6.4h, #0       // test clip == 0\n+        sshr            v2.4h, v2.4h, #8        // a0_sign\n+        cmhs            v19.4h, v3.4h, v16.4h   // test a1 >= a2\n+        cmhs            v5.4h, v17.4h, v5.4h    // test a0 >= pq\n+        sub             v2.4h, v7.4h, v2.4h     // clip_sign - a0_sign\n+        bsl             v19.8b, v16.8b, v3.8b   // a3\n+        orr             v3.8b, v18.8b, v5.8b    // test clip == 0 || a0 >= pq\n+        uqsub           v5.4h, v17.4h, v19.4h   // a0 >= a3 ? a0-a3 : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        cmhs            v7.4h, v19.4h, v17.4h   // test a3 >= a0\n+        mul             v0.4h, v5.4h, v0.h[1]   // a0 >= a3 ? 5*(a0-a3) : 0\n+        orr             v5.8b, v3.8b, v7.8b     // test clip == 0 || a0 >= pq || a3 >= a0\n+        mov             w2, v5.s[1]             // move to gp reg\n+        ushr            v0.4h, v0.4h, #3        // a0 >= a3 ? (5*(a0-a3))>>3 : 0\n+        cmhs            v5.4h, v0.4h, v6.4h\n+        tbnz            w2, #0, 1f              // none of the 4 pixel pairs should be updated if this one is not filtered\n+        bsl             v5.8b, v6.8b, v0.8b     // FFMIN(d, clip)\n+        bic             v0.8b, v5.8b, v3.8b     // set each d to zero if it should not be filtered because clip == 0 || a0 >= pq (a3 > a0 case already zeroed by saturating sub)\n+        mla             v4.4h, v0.4h, v2.4h     // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5\n+        mls             v1.4h, v0.4h, v2.4h     // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4\n+        sqxtun          v3.8b, v4.8h\n+        sqxtun          v2.8b, v1.8h\n+        st2             {v2.b, v3.b}[0], [x0], x1\n+        st2             {v2.b, v3.b}[1], [x0], x1\n+        st2             {v2.b, v3.b}[2], [x0], x1\n+        st2             {v2.b, v3.b}[3], [x0]\n+1:      ret\n+endfunc\n+\n+// VC-1 in-loop deblocking filter for 8 pixel pairs at boundary of vertically-neighbouring blocks\n+// On entry:\n+//   x0 -> top-left pel of lower block\n+//   x1 = row stride, bytes\n+//   w2 = PQUANT bitstream parameter\n+function ff_vc1_v_loop_filter8_neon, export=1\n+        sub             x3, x0, w1, sxtw #2\n+        ldr             d0, .Lcoeffs\n+        ld1             {v1.8b}, [x0], x1       // P5\n+        movi            v2.2d, #0x0000ffff00000000\n+        ld1             {v3.8b}, [x3], x1       // P1\n+        ld1             {v4.8b}, [x3], x1       // P2\n+        ld1             {v5.8b}, [x0], x1       // P6\n+        ld1             {v6.8b}, [x3], x1       // P3\n+        ld1             {v7.8b}, [x0], x1       // P7\n+        ushll           v16.8h, v1.8b, #1       // 2*P5\n+        ushll           v3.8h, v3.8b, #1        // 2*P1\n+        ld1             {v17.8b}, [x3]          // P4\n+        uxtl            v4.8h, v4.8b            // P2\n+        ld1             {v18.8b}, [x0]          // P8\n+        uxtl            v5.8h, v5.8b            // P6\n+        dup             v19.8h, w2              // pq\n+        uxtl            v20.8h, v6.8b           // P3\n+        mls             v3.8h, v4.8h, v0.h[1]   // 2*P1-5*P2\n+        uxtl            v4.8h, v7.8b            // P7\n+        ushll           v6.8h, v6.8b, #1        // 2*P3\n+        mls             v16.8h, v5.8h, v0.h[1]  // 2*P5-5*P6\n+        uxtl            v7.8h, v17.8b           // P4\n+        uxtl            v17.8h, v18.8b          // P8\n+        mla             v16.8h, v4.8h, v0.h[1]  // 2*P5-5*P6+5*P7\n+        uxtl            v1.8h, v1.8b            // P5\n+        mla             v3.8h, v20.8h, v0.h[1]  // 2*P1-5*P2+5*P3\n+        sub             v4.8h, v7.8h, v1.8h     // P4-P5\n+        mls             v6.8h, v7.8h, v0.h[1]   // 2*P3-5*P4\n+        mls             v16.8h, v17.8h, v0.h[0] // 2*P5-5*P6+5*P7-2*P8\n+        abs             v17.8h, v4.8h\n+        sshr            v4.8h, v4.8h, #8        // clip_sign\n+        mls             v3.8h, v7.8h, v0.h[0]   // 2*P1-5*P2+5*P3-2*P4\n+        sshr            v17.8h, v17.8h, #1      // clip\n+        mla             v6.8h, v1.8h, v0.h[1]   // 2*P3-5*P4+5*P5\n+        srshr           v16.8h, v16.8h, #3\n+        mls             v6.8h, v5.8h, v0.h[0]   // 2*P3-5*P4+5*P5-2*P6\n+        cmeq            v5.8h, v17.8h, #0       // test clip == 0\n+        srshr           v3.8h, v3.8h, #3\n+        abs             v16.8h, v16.8h          // a2\n+        abs             v3.8h, v3.8h            // a1\n+        srshr           v6.8h, v6.8h, #3\n+        cmhs            v18.8h, v3.8h, v16.8h   // test a1 >= a2\n+        abs             v20.8h, v6.8h           // a0\n+        sshr            v6.8h, v6.8h, #8        // a0_sign\n+        bsl             v18.16b, v16.16b, v3.16b // a3\n+        cmhs            v3.8h, v20.8h, v19.8h   // test a0 >= pq\n+        sub             v4.8h, v4.8h, v6.8h     // clip_sign - a0_sign\n+        uqsub           v6.8h, v20.8h, v18.8h   // a0 >= a3 ? a0-a3 : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        cmhs            v16.8h, v18.8h, v20.8h  // test a3 >= a0\n+        orr             v3.16b, v5.16b, v3.16b  // test clip == 0 || a0 >= pq\n+        mul             v0.8h, v6.8h, v0.h[1]   // a0 >= a3 ? 5*(a0-a3) : 0\n+        orr             v5.16b, v3.16b, v16.16b // test clip == 0 || a0 >= pq || a3 >= a0\n+        cmtst           v2.2d, v5.2d, v2.2d     // if 2nd of each group of is not filtered, then none of the others in the group should be either\n+        mov             w0, v5.s[1]             // move to gp reg\n+        ushr            v0.8h, v0.8h, #3        // a0 >= a3 ? (5*(a0-a3))>>3 : 0\n+        mov             w2, v5.s[3]\n+        orr             v2.16b, v3.16b, v2.16b\n+        cmhs            v3.8h, v0.8h, v17.8h\n+        and             w0, w0, w2\n+        bsl             v3.16b, v17.16b, v0.16b // FFMIN(d, clip)\n+        tbnz            w0, #0, 1f              // none of the 8 pixel pairs should be updated in this case\n+        bic             v0.16b, v3.16b, v2.16b  // set each d to zero if it should not be filtered\n+        mls             v7.8h, v0.8h, v4.8h     // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4\n+        mla             v1.8h, v0.8h, v4.8h     // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5\n+        sqxtun          v0.8b, v7.8h\n+        sqxtun          v1.8b, v1.8h\n+        st1             {v0.8b}, [x3], x1\n+        st1             {v1.8b}, [x3]\n+1:      ret\n+endfunc\n+\n+// VC-1 in-loop deblocking filter for 8 pixel pairs at boundary of horizontally-neighbouring blocks\n+// On entry:\n+//   x0 -> top-left pel of right block\n+//   x1 = row stride, bytes\n+//   w2 = PQUANT bitstream parameter\n+function ff_vc1_h_loop_filter8_neon, export=1\n+        sub             x3, x0, #4              // where to start reading\n+        ldr             d0, .Lcoeffs\n+        ld1             {v1.8b}, [x3], x1       // P1[0], P2[0]...\n+        sub             x0, x0, #1              // where to start writing\n+        ld1             {v2.8b}, [x3], x1\n+        add             x4, x0, x1, lsl #2\n+        ld1             {v3.8b}, [x3], x1\n+        ld1             {v4.8b}, [x3], x1\n+        ld1             {v5.8b}, [x3], x1\n+        ld1             {v6.8b}, [x3], x1\n+        ld1             {v7.8b}, [x3], x1\n+        trn1            v16.8b, v1.8b, v2.8b    // P1[0], P1[1], P3[0]...\n+        ld1             {v17.8b}, [x3]\n+        trn2            v1.8b, v1.8b, v2.8b     // P2[0], P2[1], P4[0]...\n+        trn1            v2.8b, v3.8b, v4.8b     // P1[2], P1[3], P3[2]...\n+        trn2            v3.8b, v3.8b, v4.8b     // P2[2], P2[3], P4[2]...\n+        dup             v4.8h, w2               // pq\n+        trn1            v18.8b, v5.8b, v6.8b    // P1[4], P1[5], P3[4]...\n+        trn2            v5.8b, v5.8b, v6.8b     // P2[4], P2[5], P4[4]...\n+        trn1            v6.4h, v16.4h, v2.4h    // P1[0], P1[1], P1[2], P1[3], P5[0]...\n+        trn1            v19.4h, v1.4h, v3.4h    // P2[0], P2[1], P2[2], P2[3], P6[0]...\n+        trn1            v20.8b, v7.8b, v17.8b   // P1[6], P1[7], P3[6]...\n+        trn2            v7.8b, v7.8b, v17.8b    // P2[6], P2[7], P4[6]...\n+        trn2            v2.4h, v16.4h, v2.4h    // P3[0], P3[1], P3[2], P3[3], P7[0]...\n+        trn2            v1.4h, v1.4h, v3.4h     // P4[0], P4[1], P4[2], P4[3], P8[0]...\n+        trn1            v3.4h, v18.4h, v20.4h   // P1[4], P1[5], P1[6], P1[7], P5[4]...\n+        trn1            v16.4h, v5.4h, v7.4h    // P2[4], P2[5], P2[6], P2[7], P6[4]...\n+        trn2            v17.4h, v18.4h, v20.4h  // P3[4], P3[5], P3[6], P3[7], P7[4]...\n+        trn2            v5.4h, v5.4h, v7.4h     // P4[4], P4[5], P4[6], P4[7], P8[4]...\n+        trn1            v7.2s, v6.2s, v3.2s     // P1\n+        trn1            v18.2s, v19.2s, v16.2s  // P2\n+        trn2            v3.2s, v6.2s, v3.2s     // P5\n+        trn2            v6.2s, v19.2s, v16.2s   // P6\n+        trn1            v16.2s, v2.2s, v17.2s   // P3\n+        trn2            v2.2s, v2.2s, v17.2s    // P7\n+        ushll           v7.8h, v7.8b, #1        // 2*P1\n+        trn1            v17.2s, v1.2s, v5.2s    // P4\n+        ushll           v19.8h, v3.8b, #1       // 2*P5\n+        trn2            v1.2s, v1.2s, v5.2s     // P8\n+        uxtl            v5.8h, v18.8b           // P2\n+        uxtl            v6.8h, v6.8b            // P6\n+        uxtl            v18.8h, v16.8b          // P3\n+        mls             v7.8h, v5.8h, v0.h[1]   // 2*P1-5*P2\n+        uxtl            v2.8h, v2.8b            // P7\n+        ushll           v5.8h, v16.8b, #1       // 2*P3\n+        mls             v19.8h, v6.8h, v0.h[1]  // 2*P5-5*P6\n+        uxtl            v16.8h, v17.8b          // P4\n+        uxtl            v1.8h, v1.8b            // P8\n+        mla             v19.8h, v2.8h, v0.h[1]  // 2*P5-5*P6+5*P7\n+        uxtl            v2.8h, v3.8b            // P5\n+        mla             v7.8h, v18.8h, v0.h[1]  // 2*P1-5*P2+5*P3\n+        sub             v3.8h, v16.8h, v2.8h    // P4-P5\n+        mls             v5.8h, v16.8h, v0.h[1]  // 2*P3-5*P4\n+        mls             v19.8h, v1.8h, v0.h[0]  // 2*P5-5*P6+5*P7-2*P8\n+        abs             v1.8h, v3.8h\n+        sshr            v3.8h, v3.8h, #8        // clip_sign\n+        mls             v7.8h, v16.8h, v0.h[0]  // 2*P1-5*P2+5*P3-2*P4\n+        sshr            v1.8h, v1.8h, #1        // clip\n+        mla             v5.8h, v2.8h, v0.h[1]   // 2*P3-5*P4+5*P5\n+        srshr           v17.8h, v19.8h, #3\n+        mls             v5.8h, v6.8h, v0.h[0]   // 2*P3-5*P4+5*P5-2*P6\n+        cmeq            v6.8h, v1.8h, #0        // test clip == 0\n+        srshr           v7.8h, v7.8h, #3\n+        abs             v17.8h, v17.8h          // a2\n+        abs             v7.8h, v7.8h            // a1\n+        srshr           v5.8h, v5.8h, #3\n+        cmhs            v18.8h, v7.8h, v17.8h   // test a1 >= a2\n+        abs             v19.8h, v5.8h           // a0\n+        sshr            v5.8h, v5.8h, #8        // a0_sign\n+        bsl             v18.16b, v17.16b, v7.16b // a3\n+        cmhs            v4.8h, v19.8h, v4.8h    // test a0 >= pq\n+        sub             v3.8h, v3.8h, v5.8h     // clip_sign - a0_sign\n+        uqsub           v5.8h, v19.8h, v18.8h   // a0 >= a3 ? a0-a3 : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        cmhs            v7.8h, v18.8h, v19.8h   // test a3 >= a0\n+        orr             v4.16b, v6.16b, v4.16b  // test clip == 0 || a0 >= pq\n+        mul             v0.8h, v5.8h, v0.h[1]   // a0 >= a3 ? 5*(a0-a3) : 0\n+        orr             v5.16b, v4.16b, v7.16b  // test clip == 0 || a0 >= pq || a3 >= a0\n+        mov             w2, v5.s[1]             // move to gp reg\n+        ushr            v0.8h, v0.8h, #3        // a0 >= a3 ? (5*(a0-a3))>>3 : 0\n+        mov             w3, v5.s[3]\n+        cmhs            v5.8h, v0.8h, v1.8h\n+        and             w5, w2, w3\n+        bsl             v5.16b, v1.16b, v0.16b  // FFMIN(d, clip)\n+        tbnz            w5, #0, 2f              // none of the 8 pixel pairs should be updated in this case\n+        bic             v0.16b, v5.16b, v4.16b  // set each d to zero if it should not be filtered because clip == 0 || a0 >= pq (a3 > a0 case already zeroed by saturating sub)\n+        mla             v2.8h, v0.8h, v3.8h     // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5\n+        mls             v16.8h, v0.8h, v3.8h    // invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4\n+        sqxtun          v1.8b, v2.8h\n+        sqxtun          v0.8b, v16.8h\n+        tbnz            w2, #0, 1f              // none of the first 4 pixel pairs should be updated if so\n+        st2             {v0.b, v1.b}[0], [x0], x1\n+        st2             {v0.b, v1.b}[1], [x0], x1\n+        st2             {v0.b, v1.b}[2], [x0], x1\n+        st2             {v0.b, v1.b}[3], [x0]\n+1:      tbnz            w3, #0, 2f              // none of the second 4 pixel pairs should be updated if so\n+        st2             {v0.b, v1.b}[4], [x4], x1\n+        st2             {v0.b, v1.b}[5], [x4], x1\n+        st2             {v0.b, v1.b}[6], [x4], x1\n+        st2             {v0.b, v1.b}[7], [x4]\n+2:      ret\n+endfunc\n+\n+// VC-1 in-loop deblocking filter for 16 pixel pairs at boundary of vertically-neighbouring blocks\n+// On entry:\n+//   x0 -> top-left pel of lower block\n+//   x1 = row stride, bytes\n+//   w2 = PQUANT bitstream parameter\n+function ff_vc1_v_loop_filter16_neon, export=1\n+        sub             x3, x0, w1, sxtw #2\n+        ldr             d0, .Lcoeffs\n+        ld1             {v1.16b}, [x0], x1      // P5\n+        movi            v2.2d, #0x0000ffff00000000\n+        ld1             {v3.16b}, [x3], x1      // P1\n+        ld1             {v4.16b}, [x3], x1      // P2\n+        ld1             {v5.16b}, [x0], x1      // P6\n+        ld1             {v6.16b}, [x3], x1      // P3\n+        ld1             {v7.16b}, [x0], x1      // P7\n+        ushll           v16.8h, v1.8b, #1       // 2*P5[0..7]\n+        ushll           v17.8h, v3.8b, #1       // 2*P1[0..7]\n+        ld1             {v18.16b}, [x3]         // P4\n+        uxtl            v19.8h, v4.8b           // P2[0..7]\n+        ld1             {v20.16b}, [x0]         // P8\n+        uxtl            v21.8h, v5.8b           // P6[0..7]\n+        dup             v22.8h, w2              // pq\n+        ushll2          v3.8h, v3.16b, #1       // 2*P1[8..15]\n+        mls             v17.8h, v19.8h, v0.h[1] // 2*P1[0..7]-5*P2[0..7]\n+        ushll2          v19.8h, v1.16b, #1      // 2*P5[8..15]\n+        uxtl2           v4.8h, v4.16b           // P2[8..15]\n+        mls             v16.8h, v21.8h, v0.h[1] // 2*P5[0..7]-5*P6[0..7]\n+        uxtl2           v5.8h, v5.16b           // P6[8..15]\n+        uxtl            v23.8h, v6.8b           // P3[0..7]\n+        uxtl            v24.8h, v7.8b           // P7[0..7]\n+        mls             v3.8h, v4.8h, v0.h[1]   // 2*P1[8..15]-5*P2[8..15]\n+        ushll           v4.8h, v6.8b, #1        // 2*P3[0..7]\n+        uxtl            v25.8h, v18.8b          // P4[0..7]\n+        mls             v19.8h, v5.8h, v0.h[1]  // 2*P5[8..15]-5*P6[8..15]\n+        uxtl2           v26.8h, v6.16b          // P3[8..15]\n+        mla             v17.8h, v23.8h, v0.h[1] // 2*P1[0..7]-5*P2[0..7]+5*P3[0..7]\n+        uxtl2           v7.8h, v7.16b           // P7[8..15]\n+        ushll2          v6.8h, v6.16b, #1       // 2*P3[8..15]\n+        mla             v16.8h, v24.8h, v0.h[1] // 2*P5[0..7]-5*P6[0..7]+5*P7[0..7]\n+        uxtl2           v18.8h, v18.16b         // P4[8..15]\n+        uxtl            v23.8h, v20.8b          // P8[0..7]\n+        mls             v4.8h, v25.8h, v0.h[1]  // 2*P3[0..7]-5*P4[0..7]\n+        uxtl            v24.8h, v1.8b           // P5[0..7]\n+        uxtl2           v20.8h, v20.16b         // P8[8..15]\n+        mla             v3.8h, v26.8h, v0.h[1]  // 2*P1[8..15]-5*P2[8..15]+5*P3[8..15]\n+        uxtl2           v1.8h, v1.16b           // P5[8..15]\n+        sub             v26.8h, v25.8h, v24.8h  // P4[0..7]-P5[0..7]\n+        mla             v19.8h, v7.8h, v0.h[1]  // 2*P5[8..15]-5*P6[8..15]+5*P7[8..15]\n+        sub             v7.8h, v18.8h, v1.8h    // P4[8..15]-P5[8..15]\n+        mls             v6.8h, v18.8h, v0.h[1]  // 2*P3[8..15]-5*P4[8..15]\n+        abs             v27.8h, v26.8h\n+        sshr            v26.8h, v26.8h, #8      // clip_sign[0..7]\n+        mls             v17.8h, v25.8h, v0.h[0] // 2*P1[0..7]-5*P2[0..7]+5*P3[0..7]-2*P4[0..7]\n+        abs             v28.8h, v7.8h\n+        sshr            v27.8h, v27.8h, #1      // clip[0..7]\n+        mls             v16.8h, v23.8h, v0.h[0] // 2*P5[0..7]-5*P6[0..7]+5*P7[0..7]-2*P8[0..7]\n+        sshr            v7.8h, v7.8h, #8        // clip_sign[8..15]\n+        sshr            v23.8h, v28.8h, #1      // clip[8..15]\n+        mla             v4.8h, v24.8h, v0.h[1]  // 2*P3[0..7]-5*P4[0..7]+5*P5[0..7]\n+        cmeq            v28.8h, v27.8h, #0      // test clip[0..7] == 0\n+        srshr           v17.8h, v17.8h, #3\n+        mls             v3.8h, v18.8h, v0.h[0]  // 2*P1[8..15]-5*P2[8..15]+5*P3[8..15]-2*P4[8..15]\n+        cmeq            v29.8h, v23.8h, #0      // test clip[8..15] == 0\n+        srshr           v16.8h, v16.8h, #3\n+        mls             v19.8h, v20.8h, v0.h[0] // 2*P5[8..15]-5*P6[8..15]+5*P7[8..15]-2*P8[8..15]\n+        abs             v17.8h, v17.8h          // a1[0..7]\n+        mla             v6.8h, v1.8h, v0.h[1]   // 2*P3[8..15]-5*P4[8..15]+5*P5[8..15]\n+        srshr           v3.8h, v3.8h, #3\n+        mls             v4.8h, v21.8h, v0.h[0]  // 2*P3[0..7]-5*P4[0..7]+5*P5[0..7]-2*P6[0..7]\n+        abs             v16.8h, v16.8h          // a2[0..7]\n+        srshr           v19.8h, v19.8h, #3\n+        mls             v6.8h, v5.8h, v0.h[0]   // 2*P3[8..15]-5*P4[8..15]+5*P5[8..15]-2*P6[8..15]\n+        cmhs            v5.8h, v17.8h, v16.8h   // test a1[0..7] >= a2[0..7]\n+        abs             v3.8h, v3.8h            // a1[8..15]\n+        srshr           v4.8h, v4.8h, #3\n+        abs             v19.8h, v19.8h          // a2[8..15]\n+        bsl             v5.16b, v16.16b, v17.16b // a3[0..7]\n+        srshr           v6.8h, v6.8h, #3\n+        cmhs            v16.8h, v3.8h, v19.8h   // test a1[8..15] >= a2[8.15]\n+        abs             v17.8h, v4.8h           // a0[0..7]\n+        sshr            v4.8h, v4.8h, #8        // a0_sign[0..7]\n+        bsl             v16.16b, v19.16b, v3.16b // a3[8..15]\n+        uqsub           v3.8h, v17.8h, v5.8h    // a0[0..7] >= a3[0..7] ? a0[0..7]-a3[0..7] : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        abs             v19.8h, v6.8h           // a0[8..15]\n+        cmhs            v20.8h, v17.8h, v22.8h  // test a0[0..7] >= pq\n+        cmhs            v5.8h, v5.8h, v17.8h    // test a3[0..7] >= a0[0..7]\n+        sub             v4.8h, v26.8h, v4.8h    // clip_sign[0..7] - a0_sign[0..7]\n+        sshr            v6.8h, v6.8h, #8        // a0_sign[8..15]\n+        mul             v3.8h, v3.8h, v0.h[1]   // a0[0..7] >= a3[0..7] ? 5*(a0[0..7]-a3[0..7]) : 0\n+        uqsub           v17.8h, v19.8h, v16.8h  // a0[8..15] >= a3[8..15] ? a0[8..15]-a3[8..15] : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        orr             v20.16b, v28.16b, v20.16b // test clip[0..7] == 0 || a0[0..7] >= pq\n+        cmhs            v21.8h, v19.8h, v22.8h  // test a0[8..15] >= pq\n+        cmhs            v16.8h, v16.8h, v19.8h  // test a3[8..15] >= a0[8..15]\n+        mul             v0.8h, v17.8h, v0.h[1]  // a0[8..15] >= a3[8..15] ? 5*(a0[8..15]-a3[8..15]) : 0\n+        sub             v6.8h, v7.8h, v6.8h     // clip_sign[8..15] - a0_sign[8..15]\n+        orr             v5.16b, v20.16b, v5.16b // test clip[0..7] == 0 || a0[0..7] >= pq || a3[0..7] >= a0[0..7]\n+        ushr            v3.8h, v3.8h, #3        // a0[0..7] >= a3[0..7] ? (5*(a0[0..7]-a3[0..7]))>>3 : 0\n+        orr             v7.16b, v29.16b, v21.16b // test clip[8..15] == 0 || a0[8..15] >= pq\n+        cmtst           v17.2d, v5.2d, v2.2d    // if 2nd of each group of is not filtered, then none of the others in the group should be either\n+        mov             w0, v5.s[1]             // move to gp reg\n+        cmhs            v19.8h, v3.8h, v27.8h\n+        ushr            v0.8h, v0.8h, #3        // a0[8..15] >= a3[8..15] ? (5*(a0[8..15]-a3[8..15]))>>3 : 0\n+        mov             w2, v5.s[3]\n+        orr             v5.16b, v7.16b, v16.16b // test clip[8..15] == 0 || a0[8..15] >= pq || a3[8..15] >= a0[8..15]\n+        orr             v16.16b, v20.16b, v17.16b\n+        bsl             v19.16b, v27.16b, v3.16b // FFMIN(d[0..7], clip[0..7])\n+        cmtst           v2.2d, v5.2d, v2.2d\n+        cmhs            v3.8h, v0.8h, v23.8h\n+        mov             w4, v5.s[1]\n+        mov             w5, v5.s[3]\n+        and             w0, w0, w2\n+        bic             v5.16b, v19.16b, v16.16b // set each d[0..7] to zero if it should not be filtered because clip[0..7] == 0 || a0[0..7] >= pq (a3 > a0 case already zeroed by saturating sub)\n+        orr             v2.16b, v7.16b, v2.16b\n+        bsl             v3.16b, v23.16b, v0.16b // FFMIN(d[8..15], clip[8..15])\n+        mls             v25.8h, v5.8h, v4.8h    // invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P4[0..7]\n+        and             w2, w4, w5\n+        bic             v0.16b, v3.16b, v2.16b  // set each d[8..15] to zero if it should not be filtered because clip[8..15] == 0 || a0[8..15] >= pq (a3 > a0 case already zeroed by saturating sub)\n+        mla             v24.8h, v5.8h, v4.8h    // invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P5[0..7]\n+        and             w0, w0, w2\n+        mls             v18.8h, v0.8h, v6.8h    // invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P4[8..15]\n+        sqxtun          v2.8b, v25.8h\n+        tbnz            w0, #0, 1f              // none of the 16 pixel pairs should be updated in this case\n+        mla             v1.8h, v0.8h, v6.8h     // invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P5[8..15]\n+        sqxtun          v0.8b, v24.8h\n+        sqxtun2         v2.16b, v18.8h\n+        sqxtun2         v0.16b, v1.8h\n+        st1             {v2.16b}, [x3], x1\n+        st1             {v0.16b}, [x3]\n+1:      ret\n+endfunc\n+\n+// VC-1 in-loop deblocking filter for 16 pixel pairs at boundary of horizontally-neighbouring blocks\n+// On entry:\n+//   x0 -> top-left pel of right block\n+//   x1 = row stride, bytes\n+//   w2 = PQUANT bitstream parameter\n+function ff_vc1_h_loop_filter16_neon, export=1\n+        sub             x3, x0, #4              // where to start reading\n+        ldr             d0, .Lcoeffs\n+        ld1             {v1.8b}, [x3], x1       // P1[0], P2[0]...\n+        sub             x0, x0, #1              // where to start writing\n+        ld1             {v2.8b}, [x3], x1\n+        add             x4, x0, x1, lsl #3\n+        ld1             {v3.8b}, [x3], x1\n+        add             x5, x0, x1, lsl #2\n+        ld1             {v4.8b}, [x3], x1\n+        add             x6, x4, x1, lsl #2\n+        ld1             {v5.8b}, [x3], x1\n+        ld1             {v6.8b}, [x3], x1\n+        ld1             {v7.8b}, [x3], x1\n+        trn1            v16.8b, v1.8b, v2.8b    // P1[0], P1[1], P3[0]...\n+        ld1             {v17.8b}, [x3], x1\n+        trn2            v1.8b, v1.8b, v2.8b     // P2[0], P2[1], P4[0]...\n+        ld1             {v2.8b}, [x3], x1\n+        trn1            v18.8b, v3.8b, v4.8b    // P1[2], P1[3], P3[2]...\n+        ld1             {v19.8b}, [x3], x1\n+        trn2            v3.8b, v3.8b, v4.8b     // P2[2], P2[3], P4[2]...\n+        ld1             {v4.8b}, [x3], x1\n+        trn1            v20.8b, v5.8b, v6.8b    // P1[4], P1[5], P3[4]...\n+        ld1             {v21.8b}, [x3], x1\n+        trn2            v5.8b, v5.8b, v6.8b     // P2[4], P2[5], P4[4]...\n+        ld1             {v6.8b}, [x3], x1\n+        trn1            v22.8b, v7.8b, v17.8b   // P1[6], P1[7], P3[6]...\n+        ld1             {v23.8b}, [x3], x1\n+        trn2            v7.8b, v7.8b, v17.8b    // P2[6], P2[7], P4[6]...\n+        ld1             {v17.8b}, [x3], x1\n+        trn1            v24.8b, v2.8b, v19.8b   // P1[8], P1[9], P3[8]...\n+        ld1             {v25.8b}, [x3]\n+        trn2            v2.8b, v2.8b, v19.8b    // P2[8], P2[9], P4[8]...\n+        trn1            v19.4h, v16.4h, v18.4h  // P1[0], P1[1], P1[2], P1[3], P5[0]...\n+        trn1            v26.8b, v4.8b, v21.8b   // P1[10], P1[11], P3[10]...\n+        trn2            v4.8b, v4.8b, v21.8b    // P2[10], P2[11], P4[10]...\n+        trn1            v21.4h, v1.4h, v3.4h    // P2[0], P2[1], P2[2], P2[3], P6[0]...\n+        trn1            v27.4h, v20.4h, v22.4h  // P1[4], P1[5], P1[6], P1[7], P5[4]...\n+        trn1            v28.8b, v6.8b, v23.8b   // P1[12], P1[13], P3[12]...\n+        trn2            v6.8b, v6.8b, v23.8b    // P2[12], P2[13], P4[12]...\n+        trn1            v23.4h, v5.4h, v7.4h    // P2[4], P2[5], P2[6], P2[7], P6[4]...\n+        trn1            v29.4h, v24.4h, v26.4h  // P1[8], P1[9], P1[10], P1[11], P5[8]...\n+        trn1            v30.8b, v17.8b, v25.8b  // P1[14], P1[15], P3[14]...\n+        trn2            v17.8b, v17.8b, v25.8b  // P2[14], P2[15], P4[14]...\n+        trn1            v25.4h, v2.4h, v4.4h    // P2[8], P2[9], P2[10], P2[11], P6[8]...\n+        trn1            v31.2s, v19.2s, v27.2s  // P1[0..7]\n+        trn2            v19.2s, v19.2s, v27.2s  // P5[0..7]\n+        trn1            v27.2s, v21.2s, v23.2s  // P2[0..7]\n+        trn2            v21.2s, v21.2s, v23.2s  // P6[0..7]\n+        trn1            v23.4h, v28.4h, v30.4h  // P1[12], P1[13], P1[14], P1[15], P5[12]...\n+        trn2            v16.4h, v16.4h, v18.4h  // P3[0], P3[1], P3[2], P3[3], P7[0]...\n+        trn1            v18.4h, v6.4h, v17.4h   // P2[12], P2[13], P2[14], P2[15], P6[12]...\n+        trn2            v20.4h, v20.4h, v22.4h  // P3[4], P3[5], P3[6], P3[7], P7[4]...\n+        trn2            v22.4h, v24.4h, v26.4h  // P3[8], P3[9], P3[10], P3[11], P7[8]...\n+        trn1            v24.2s, v29.2s, v23.2s  // P1[8..15]\n+        trn2            v23.2s, v29.2s, v23.2s  // P5[8..15]\n+        trn1            v26.2s, v25.2s, v18.2s  // P2[8..15]\n+        trn2            v18.2s, v25.2s, v18.2s  // P6[8..15]\n+        trn2            v25.4h, v28.4h, v30.4h  // P3[12], P3[13], P3[14], P3[15], P7[12]...\n+        trn2            v1.4h, v1.4h, v3.4h     // P4[0], P4[1], P4[2], P4[3], P8[0]...\n+        trn2            v3.4h, v5.4h, v7.4h     // P4[4], P4[5], P4[6], P4[7], P8[4]...\n+        trn2            v2.4h, v2.4h, v4.4h     // P4[8], P4[9], P4[10], P4[11], P8[8]...\n+        trn2            v4.4h, v6.4h, v17.4h    // P4[12], P4[13], P4[14], P4[15], P8[12]...\n+        ushll           v5.8h, v31.8b, #1       // 2*P1[0..7]\n+        ushll           v6.8h, v19.8b, #1       // 2*P5[0..7]\n+        trn1            v7.2s, v16.2s, v20.2s   // P3[0..7]\n+        uxtl            v17.8h, v27.8b          // P2[0..7]\n+        trn2            v16.2s, v16.2s, v20.2s  // P7[0..7]\n+        uxtl            v20.8h, v21.8b          // P6[0..7]\n+        trn1            v21.2s, v22.2s, v25.2s  // P3[8..15]\n+        ushll           v24.8h, v24.8b, #1      // 2*P1[8..15]\n+        trn2            v22.2s, v22.2s, v25.2s  // P7[8..15]\n+        ushll           v25.8h, v23.8b, #1      // 2*P5[8..15]\n+        trn1            v27.2s, v1.2s, v3.2s    // P4[0..7]\n+        uxtl            v26.8h, v26.8b          // P2[8..15]\n+        mls             v5.8h, v17.8h, v0.h[1]  // 2*P1[0..7]-5*P2[0..7]\n+        uxtl            v17.8h, v18.8b          // P6[8..15]\n+        mls             v6.8h, v20.8h, v0.h[1]  // 2*P5[0..7]-5*P6[0..7]\n+        trn1            v18.2s, v2.2s, v4.2s    // P4[8..15]\n+        uxtl            v28.8h, v7.8b           // P3[0..7]\n+        mls             v24.8h, v26.8h, v0.h[1] // 2*P1[8..15]-5*P2[8..15]\n+        uxtl            v16.8h, v16.8b          // P7[0..7]\n+        uxtl            v26.8h, v21.8b          // P3[8..15]\n+        mls             v25.8h, v17.8h, v0.h[1] // 2*P5[8..15]-5*P6[8..15]\n+        uxtl            v22.8h, v22.8b          // P7[8..15]\n+        ushll           v7.8h, v7.8b, #1        // 2*P3[0..7]\n+        uxtl            v27.8h, v27.8b          // P4[0..7]\n+        trn2            v1.2s, v1.2s, v3.2s     // P8[0..7]\n+        ushll           v3.8h, v21.8b, #1       // 2*P3[8..15]\n+        trn2            v2.2s, v2.2s, v4.2s     // P8[8..15]\n+        uxtl            v4.8h, v18.8b           // P4[8..15]\n+        mla             v5.8h, v28.8h, v0.h[1]  // 2*P1[0..7]-5*P2[0..7]+5*P3[0..7]\n+        uxtl            v1.8h, v1.8b            // P8[0..7]\n+        mla             v6.8h, v16.8h, v0.h[1]  // 2*P5[0..7]-5*P6[0..7]+5*P7[0..7]\n+        uxtl            v2.8h, v2.8b            // P8[8..15]\n+        uxtl            v16.8h, v19.8b          // P5[0..7]\n+        mla             v24.8h, v26.8h, v0.h[1] // 2*P1[8..15]-5*P2[8..15]+5*P3[8..15]\n+        uxtl            v18.8h, v23.8b          // P5[8..15]\n+        dup             v19.8h, w2              // pq\n+        mla             v25.8h, v22.8h, v0.h[1] // 2*P5[8..15]-5*P6[8..15]+5*P7[8..15]\n+        sub             v21.8h, v27.8h, v16.8h  // P4[0..7]-P5[0..7]\n+        sub             v22.8h, v4.8h, v18.8h   // P4[8..15]-P5[8..15]\n+        mls             v7.8h, v27.8h, v0.h[1]  // 2*P3[0..7]-5*P4[0..7]\n+        abs             v23.8h, v21.8h\n+        mls             v3.8h, v4.8h, v0.h[1]   // 2*P3[8..15]-5*P4[8..15]\n+        abs             v26.8h, v22.8h\n+        sshr            v21.8h, v21.8h, #8      // clip_sign[0..7]\n+        mls             v5.8h, v27.8h, v0.h[0]  // 2*P1[0..7]-5*P2[0..7]+5*P3[0..7]-2*P4[0..7]\n+        sshr            v23.8h, v23.8h, #1      // clip[0..7]\n+        sshr            v26.8h, v26.8h, #1      // clip[8..15]\n+        mls             v6.8h, v1.8h, v0.h[0]   // 2*P5[0..7]-5*P6[0..7]+5*P7[0..7]-2*P8[0..7]\n+        sshr            v1.8h, v22.8h, #8       // clip_sign[8..15]\n+        cmeq            v22.8h, v23.8h, #0      // test clip[0..7] == 0\n+        mls             v24.8h, v4.8h, v0.h[0]  // 2*P1[8..15]-5*P2[8..15]+5*P3[8..15]-2*P4[8..15]\n+        cmeq            v28.8h, v26.8h, #0      // test clip[8..15] == 0\n+        srshr           v5.8h, v5.8h, #3\n+        mls             v25.8h, v2.8h, v0.h[0]  // 2*P5[8..15]-5*P6[8..15]+5*P7[8..15]-2*P8[8..15]\n+        srshr           v2.8h, v6.8h, #3\n+        mla             v7.8h, v16.8h, v0.h[1]  // 2*P3[0..7]-5*P4[0..7]+5*P5[0..7]\n+        srshr           v6.8h, v24.8h, #3\n+        mla             v3.8h, v18.8h, v0.h[1]  // 2*P3[8..15]-5*P4[8..15]+5*P5[8..15]\n+        abs             v5.8h, v5.8h            // a1[0..7]\n+        srshr           v24.8h, v25.8h, #3\n+        mls             v3.8h, v17.8h, v0.h[0]  // 2*P3[8..15]-5*P4[8..15]+5*P5[8..15]-2*P6[8..15]\n+        abs             v2.8h, v2.8h            // a2[0..7]\n+        abs             v6.8h, v6.8h            // a1[8..15]\n+        mls             v7.8h, v20.8h, v0.h[0]  // 2*P3[0..7]-5*P4[0..7]+5*P5[0..7]-2*P6[0..7]\n+        abs             v17.8h, v24.8h          // a2[8..15]\n+        cmhs            v20.8h, v5.8h, v2.8h    // test a1[0..7] >= a2[0..7]\n+        srshr           v3.8h, v3.8h, #3\n+        cmhs            v24.8h, v6.8h, v17.8h   // test a1[8..15] >= a2[8.15]\n+        srshr           v7.8h, v7.8h, #3\n+        bsl             v20.16b, v2.16b, v5.16b // a3[0..7]\n+        abs             v2.8h, v3.8h            // a0[8..15]\n+        sshr            v3.8h, v3.8h, #8        // a0_sign[8..15]\n+        bsl             v24.16b, v17.16b, v6.16b // a3[8..15]\n+        abs             v5.8h, v7.8h            // a0[0..7]\n+        sshr            v6.8h, v7.8h, #8        // a0_sign[0..7]\n+        cmhs            v7.8h, v2.8h, v19.8h    // test a0[8..15] >= pq\n+        sub             v1.8h, v1.8h, v3.8h     // clip_sign[8..15] - a0_sign[8..15]\n+        uqsub           v3.8h, v2.8h, v24.8h    // a0[8..15] >= a3[8..15] ? a0[8..15]-a3[8..15] : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        cmhs            v2.8h, v24.8h, v2.8h    // test a3[8..15] >= a0[8..15]\n+        uqsub           v17.8h, v5.8h, v20.8h   // a0[0..7] >= a3[0..7] ? a0[0..7]-a3[0..7] : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        cmhs            v19.8h, v5.8h, v19.8h   // test a0[0..7] >= pq\n+        orr             v7.16b, v28.16b, v7.16b // test clip[8..15] == 0 || a0[8..15] >= pq\n+        sub             v6.8h, v21.8h, v6.8h    // clip_sign[0..7] - a0_sign[0..7]\n+        mul             v3.8h, v3.8h, v0.h[1]   // a0[8..15] >= a3[8..15] ? 5*(a0[8..15]-a3[8..15]) : 0\n+        cmhs            v5.8h, v20.8h, v5.8h    // test a3[0..7] >= a0[0..7]\n+        orr             v19.16b, v22.16b, v19.16b // test clip[0..7] == 0 || a0[0..7] >= pq\n+        mul             v0.8h, v17.8h, v0.h[1]  // a0[0..7] >= a3[0..7] ? 5*(a0[0..7]-a3[0..7]) : 0\n+        orr             v2.16b, v7.16b, v2.16b  // test clip[8..15] == 0 || a0[8..15] >= pq || a3[8..15] >= a0[8..15]\n+        orr             v5.16b, v19.16b, v5.16b // test clip[0..7] == 0 || a0[0..7] >= pq || a3[0..7] >= a0[0..7]\n+        ushr            v3.8h, v3.8h, #3        // a0[8..15] >= a3[8..15] ? (5*(a0[8..15]-a3[8..15]))>>3 : 0\n+        mov             w7, v2.s[1]\n+        mov             w8, v2.s[3]\n+        ushr            v0.8h, v0.8h, #3        // a0[0..7] >= a3[0..7] ? (5*(a0[0..7]-a3[0..7]))>>3 : 0\n+        mov             w2, v5.s[1]             // move to gp reg\n+        cmhs            v2.8h, v3.8h, v26.8h\n+        mov             w3, v5.s[3]\n+        cmhs            v5.8h, v0.8h, v23.8h\n+        bsl             v2.16b, v26.16b, v3.16b // FFMIN(d[8..15], clip[8..15])\n+        and             w9, w7, w8\n+        bsl             v5.16b, v23.16b, v0.16b // FFMIN(d[0..7], clip[0..7])\n+        and             w10, w2, w3\n+        bic             v0.16b, v2.16b, v7.16b  // set each d[8..15] to zero if it should not be filtered because clip[8..15] == 0 || a0[8..15] >= pq (a3 > a0 case already zeroed by saturating sub)\n+        and             w9, w10, w9\n+        bic             v2.16b, v5.16b, v19.16b // set each d[0..7] to zero if it should not be filtered because clip[0..7] == 0 || a0[0..7] >= pq (a3 > a0 case already zeroed by saturating sub)\n+        mls             v4.8h, v0.8h, v1.8h     // invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P4\n+        tbnz            w9, #0, 4f              // none of the 16 pixel pairs should be updated in this case\n+        mls             v27.8h, v2.8h, v6.8h    // invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P4\n+        mla             v16.8h, v2.8h, v6.8h    // invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P5\n+        sqxtun          v2.8b, v4.8h\n+        mla             v18.8h, v0.8h, v1.8h    // invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P5\n+        sqxtun          v0.8b, v27.8h\n+        sqxtun          v1.8b, v16.8h\n+        sqxtun          v3.8b, v18.8h\n+        tbnz            w2, #0, 1f\n+        st2             {v0.b, v1.b}[0], [x0], x1\n+        st2             {v0.b, v1.b}[1], [x0], x1\n+        st2             {v0.b, v1.b}[2], [x0], x1\n+        st2             {v0.b, v1.b}[3], [x0]\n+1:      tbnz            w3, #0, 2f\n+        st2             {v0.b, v1.b}[4], [x5], x1\n+        st2             {v0.b, v1.b}[5], [x5], x1\n+        st2             {v0.b, v1.b}[6], [x5], x1\n+        st2             {v0.b, v1.b}[7], [x5]\n+2:      tbnz            w7, #0, 3f\n+        st2             {v2.b, v3.b}[0], [x4], x1\n+        st2             {v2.b, v3.b}[1], [x4], x1\n+        st2             {v2.b, v3.b}[2], [x4], x1\n+        st2             {v2.b, v3.b}[3], [x4]\n+3:      tbnz            w8, #0, 4f\n+        st2             {v2.b, v3.b}[4], [x6], x1\n+        st2             {v2.b, v3.b}[5], [x6], x1\n+        st2             {v2.b, v3.b}[6], [x6], x1\n+        st2             {v2.b, v3.b}[7], [x6]\n+4:      ret\n+endfunc\n+\n+// Copy at most the specified number of bytes from source to destination buffer,\n+// stopping at a multiple of 32 bytes, none of which are the start of an escape sequence\n+// On entry:\n+//   x0 -> source buffer\n+//   w1 = max number of bytes to copy\n+//   x2 -> destination buffer, optimally 8-byte aligned\n+// On exit:\n+//   w0 = number of bytes not copied\n+function ff_vc1_unescape_buffer_helper_neon, export=1\n+        // Offset by 80 to screen out cases that are too short for us to handle,\n+        // and also make it easy to test for loop termination, or to determine\n+        // whether we need an odd number of half-iterations of the loop.\n+        subs            w1, w1, #80\n+        b.mi            90f\n+\n+        // Set up useful constants\n+        movi            v20.4s, #3, lsl #24\n+        movi            v21.4s, #3, lsl #16\n+\n+        tst             w1, #32\n+        b.ne            1f\n+\n+          ld1             {v0.16b, v1.16b, v2.16b}, [x0], #48\n+          ext             v25.16b, v0.16b, v1.16b, #1\n+          ext             v26.16b, v0.16b, v1.16b, #2\n+          ext             v27.16b, v0.16b, v1.16b, #3\n+          ext             v29.16b, v1.16b, v2.16b, #1\n+          ext             v30.16b, v1.16b, v2.16b, #2\n+          ext             v31.16b, v1.16b, v2.16b, #3\n+          bic             v24.16b, v0.16b, v20.16b\n+          bic             v25.16b, v25.16b, v20.16b\n+          bic             v26.16b, v26.16b, v20.16b\n+          bic             v27.16b, v27.16b, v20.16b\n+          bic             v28.16b, v1.16b, v20.16b\n+          bic             v29.16b, v29.16b, v20.16b\n+          bic             v30.16b, v30.16b, v20.16b\n+          bic             v31.16b, v31.16b, v20.16b\n+          eor             v24.16b, v24.16b, v21.16b\n+          eor             v25.16b, v25.16b, v21.16b\n+          eor             v26.16b, v26.16b, v21.16b\n+          eor             v27.16b, v27.16b, v21.16b\n+          eor             v28.16b, v28.16b, v21.16b\n+          eor             v29.16b, v29.16b, v21.16b\n+          eor             v30.16b, v30.16b, v21.16b\n+          eor             v31.16b, v31.16b, v21.16b\n+          cmeq            v24.4s, v24.4s, #0\n+          cmeq            v25.4s, v25.4s, #0\n+          cmeq            v26.4s, v26.4s, #0\n+          cmeq            v27.4s, v27.4s, #0\n+          add             w1, w1, #32\n+          b               3f\n+\n+1:      ld1             {v3.16b, v4.16b, v5.16b}, [x0], #48\n+        ext             v25.16b, v3.16b, v4.16b, #1\n+        ext             v26.16b, v3.16b, v4.16b, #2\n+        ext             v27.16b, v3.16b, v4.16b, #3\n+        ext             v29.16b, v4.16b, v5.16b, #1\n+        ext             v30.16b, v4.16b, v5.16b, #2\n+        ext             v31.16b, v4.16b, v5.16b, #3\n+        bic             v24.16b, v3.16b, v20.16b\n+        bic             v25.16b, v25.16b, v20.16b\n+        bic             v26.16b, v26.16b, v20.16b\n+        bic             v27.16b, v27.16b, v20.16b\n+        bic             v28.16b, v4.16b, v20.16b\n+        bic             v29.16b, v29.16b, v20.16b\n+        bic             v30.16b, v30.16b, v20.16b\n+        bic             v31.16b, v31.16b, v20.16b\n+        eor             v24.16b, v24.16b, v21.16b\n+        eor             v25.16b, v25.16b, v21.16b\n+        eor             v26.16b, v26.16b, v21.16b\n+        eor             v27.16b, v27.16b, v21.16b\n+        eor             v28.16b, v28.16b, v21.16b\n+        eor             v29.16b, v29.16b, v21.16b\n+        eor             v30.16b, v30.16b, v21.16b\n+        eor             v31.16b, v31.16b, v21.16b\n+        cmeq            v24.4s, v24.4s, #0\n+        cmeq            v25.4s, v25.4s, #0\n+        cmeq            v26.4s, v26.4s, #0\n+        cmeq            v27.4s, v27.4s, #0\n+        // Drop through...\n+2:        mov             v0.16b, v5.16b\n+          ld1             {v1.16b, v2.16b}, [x0], #32\n+        cmeq            v28.4s, v28.4s, #0\n+        cmeq            v29.4s, v29.4s, #0\n+        cmeq            v30.4s, v30.4s, #0\n+        cmeq            v31.4s, v31.4s, #0\n+        orr             v24.16b, v24.16b, v25.16b\n+        orr             v26.16b, v26.16b, v27.16b\n+        orr             v28.16b, v28.16b, v29.16b\n+        orr             v30.16b, v30.16b, v31.16b\n+          ext             v25.16b, v0.16b, v1.16b, #1\n+        orr             v22.16b, v24.16b, v26.16b\n+          ext             v26.16b, v0.16b, v1.16b, #2\n+          ext             v27.16b, v0.16b, v1.16b, #3\n+          ext             v29.16b, v1.16b, v2.16b, #1\n+        orr             v23.16b, v28.16b, v30.16b\n+          ext             v30.16b, v1.16b, v2.16b, #2\n+          ext             v31.16b, v1.16b, v2.16b, #3\n+          bic             v24.16b, v0.16b, v20.16b\n+          bic             v25.16b, v25.16b, v20.16b\n+          bic             v26.16b, v26.16b, v20.16b\n+        orr             v22.16b, v22.16b, v23.16b\n+          bic             v27.16b, v27.16b, v20.16b\n+          bic             v28.16b, v1.16b, v20.16b\n+          bic             v29.16b, v29.16b, v20.16b\n+          bic             v30.16b, v30.16b, v20.16b\n+          bic             v31.16b, v31.16b, v20.16b\n+        addv            s22, v22.4s\n+          eor             v24.16b, v24.16b, v21.16b\n+          eor             v25.16b, v25.16b, v21.16b\n+          eor             v26.16b, v26.16b, v21.16b\n+          eor             v27.16b, v27.16b, v21.16b\n+          eor             v28.16b, v28.16b, v21.16b\n+        mov             w3, v22.s[0]\n+          eor             v29.16b, v29.16b, v21.16b\n+          eor             v30.16b, v30.16b, v21.16b\n+          eor             v31.16b, v31.16b, v21.16b\n+          cmeq            v24.4s, v24.4s, #0\n+          cmeq            v25.4s, v25.4s, #0\n+          cmeq            v26.4s, v26.4s, #0\n+          cmeq            v27.4s, v27.4s, #0\n+        cbnz            w3, 90f\n+        st1             {v3.16b, v4.16b}, [x2], #32\n+3:          mov             v3.16b, v2.16b\n+            ld1             {v4.16b, v5.16b}, [x0], #32\n+          cmeq            v28.4s, v28.4s, #0\n+          cmeq            v29.4s, v29.4s, #0\n+          cmeq            v30.4s, v30.4s, #0\n+          cmeq            v31.4s, v31.4s, #0\n+          orr             v24.16b, v24.16b, v25.16b\n+          orr             v26.16b, v26.16b, v27.16b\n+          orr             v28.16b, v28.16b, v29.16b\n+          orr             v30.16b, v30.16b, v31.16b\n+            ext             v25.16b, v3.16b, v4.16b, #1\n+          orr             v22.16b, v24.16b, v26.16b\n+            ext             v26.16b, v3.16b, v4.16b, #2\n+            ext             v27.16b, v3.16b, v4.16b, #3\n+            ext             v29.16b, v4.16b, v5.16b, #1\n+          orr             v23.16b, v28.16b, v30.16b\n+            ext             v30.16b, v4.16b, v5.16b, #2\n+            ext             v31.16b, v4.16b, v5.16b, #3\n+            bic             v24.16b, v3.16b, v20.16b\n+            bic             v25.16b, v25.16b, v20.16b\n+            bic             v26.16b, v26.16b, v20.16b\n+          orr             v22.16b, v22.16b, v23.16b\n+            bic             v27.16b, v27.16b, v20.16b\n+            bic             v28.16b, v4.16b, v20.16b\n+            bic             v29.16b, v29.16b, v20.16b\n+            bic             v30.16b, v30.16b, v20.16b\n+            bic             v31.16b, v31.16b, v20.16b\n+          addv            s22, v22.4s\n+            eor             v24.16b, v24.16b, v21.16b\n+            eor             v25.16b, v25.16b, v21.16b\n+            eor             v26.16b, v26.16b, v21.16b\n+            eor             v27.16b, v27.16b, v21.16b\n+            eor             v28.16b, v28.16b, v21.16b\n+          mov             w3, v22.s[0]\n+            eor             v29.16b, v29.16b, v21.16b\n+            eor             v30.16b, v30.16b, v21.16b\n+            eor             v31.16b, v31.16b, v21.16b\n+            cmeq            v24.4s, v24.4s, #0\n+            cmeq            v25.4s, v25.4s, #0\n+            cmeq            v26.4s, v26.4s, #0\n+            cmeq            v27.4s, v27.4s, #0\n+          cbnz            w3, 91f\n+          st1             {v0.16b, v1.16b}, [x2], #32\n+        subs            w1, w1, #64\n+        b.pl            2b\n+\n+90:     add             w0, w1, #80\n+        ret\n+\n+91:     sub             w1, w1, #32\n+        b               90b\n+endfunc\ndiff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c\nindex 2e9a3581de..d9571b437f 100644\n--- a/libavcodec/allcodecs.c\n+++ b/libavcodec/allcodecs.c\n@@ -153,6 +153,7 @@ extern AVCodec ff_hap_decoder;\n extern AVCodec ff_hevc_decoder;\n extern AVCodec ff_hevc_qsv_decoder;\n extern AVCodec ff_hevc_rkmpp_decoder;\n+extern AVCodec ff_hevc_rpi_decoder;\n extern AVCodec ff_hevc_v4l2m2m_decoder;\n extern AVCodec ff_hnm4_video_decoder;\n extern AVCodec ff_hq_hqa_decoder;\n@@ -917,6 +918,41 @@ static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id)\n     }\n }\n \n+static int codec_supports_format(const AVCodec * const p, const enum AVPixelFormat fmt)\n+{\n+    const enum AVPixelFormat *pf = p->pix_fmts;\n+\n+    // Assume good if we lack info\n+    if (pf == NULL)\n+        return 1;\n+    if (fmt == AV_PIX_FMT_NONE)\n+        return 0;\n+\n+    for (; *pf != AV_PIX_FMT_NONE; ++pf) {\n+        if (*pf == fmt)\n+            return 1;\n+    }\n+    return 0;\n+}\n+\n+AVCodec *avcodec_find_decoder_by_id_and_fmt(enum AVCodecID id, enum AVPixelFormat fmt)\n+{\n+    const AVCodec *p, *experimental = NULL;\n+    void *i = 0;\n+\n+    id= remap_deprecated_codec_id(id);\n+    while ((p = av_codec_iterate(&i))) {\n+        if (av_codec_is_decoder(p) && p->id == id && codec_supports_format(p, fmt)) {\n+            if (p->capabilities & AV_CODEC_CAP_EXPERIMENTAL && !experimental) {\n+                experimental = p;\n+            } else\n+                return (AVCodec *)p;\n+        }\n+        p = p->next;\n+    }\n+    return (AVCodec *)experimental;\n+}\n+\n static AVCodec *find_codec(enum AVCodecID id, int (*x)(const AVCodec *))\n {\n     const AVCodec *p, *experimental = NULL;\ndiff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile\nindex c4ab93aeeb..cd926f7b33 100644\n--- a/libavcodec/arm/Makefile\n+++ b/libavcodec/arm/Makefile\n@@ -39,6 +39,8 @@ OBJS-$(CONFIG_AAC_DECODER)             += arm/aacpsdsp_init_arm.o       \\\n                                           arm/sbrdsp_init_arm.o\n OBJS-$(CONFIG_DCA_DECODER)             += arm/synth_filter_init_arm.o\n OBJS-$(CONFIG_HEVC_DECODER)            += arm/hevcdsp_init_arm.o\n+OBJS-$(CONFIG_HEVC_RPI_DECODER)        += arm/rpi_hevcdsp_init_arm.o    \\\n+                                          arm/rpi_hevcpred_init_arm.o\n OBJS-$(CONFIG_MLP_DECODER)             += arm/mlpdsp_init_arm.o\n OBJS-$(CONFIG_RV40_DECODER)            += arm/rv40dsp_init_arm.o\n OBJS-$(CONFIG_SBC_ENCODER)             += arm/sbcdsp_init_arm.o\n@@ -137,10 +139,24 @@ NEON-OBJS-$(CONFIG_AAC_DECODER)        += arm/aacpsdsp_neon.o           \\\n NEON-OBJS-$(CONFIG_LLAUDDSP)           += arm/lossless_audiodsp_neon.o\n NEON-OBJS-$(CONFIG_DCA_DECODER)        += arm/synth_filter_neon.o\n NEON-OBJS-$(CONFIG_HEVC_DECODER)       += arm/hevcdsp_init_neon.o       \\\n+                                          arm/hevcdsp_idct_neon.o    \\\n                                           arm/hevcdsp_deblock_neon.o    \\\n                                           arm/hevcdsp_idct_neon.o       \\\n                                           arm/hevcdsp_qpel_neon.o       \\\n                                           arm/hevcdsp_sao_neon.o\n+NEON-OBJS-$(CONFIG_HEVC_RPI_DECODER)   += arm/rpi_hevcdsp_init_neon.o    \\\n+                                          arm/rpi_hevc_misc_neon.o       \\\n+                                          arm/rpi_hevcdsp_deblock_neon.o \\\n+                                          arm/rpi_hevcdsp_idct_neon.o    \\\n+                                          arm/rpi_hevcdsp_res8_neon.o    \\\n+                                          arm/rpi_hevcdsp_res16_neon.o   \\\n+                                          arm/rpi_hevcdsp_sao_neon.o     \\\n+                                          arm/rpi_hevcpred_init_neon.o   \\\n+                                          arm/rpi_hevcpred_intra_angular_neon.o \\\n+                                          arm/rpi_hevcpred_intra_dc_neon.o \\\n+                                          arm/rpi_hevcpred_intra_filter_neon.o \\\n+                                          arm/rpi_hevcpred_intra_hv_neon.o \\\n+                                          arm/rpi_hevcpred_intra_planar_neon.o\n NEON-OBJS-$(CONFIG_RV30_DECODER)       += arm/rv34dsp_neon.o\n NEON-OBJS-$(CONFIG_RV40_DECODER)       += arm/rv34dsp_neon.o            \\\n                                           arm/rv40dsp_neon.o\ndiff --git a/libavcodec/arm/cabac.h b/libavcodec/arm/cabac.h\nindex fdbf86b45e..4755f20e2e 100644\n--- a/libavcodec/arm/cabac.h\n+++ b/libavcodec/arm/cabac.h\n@@ -26,83 +26,209 @@\n #include \"libavutil/internal.h\"\n #include \"libavcodec/cabac.h\"\n \n+\n #define get_cabac_inline get_cabac_inline_arm\n static av_always_inline int get_cabac_inline_arm(CABACContext *c,\n-                                                 uint8_t *const state)\n+                                                 uint8_t *state)\n {\n-    int bit;\n-    void *reg_b, *reg_c, *tmp;\n+    const uint8_t *mlps_tables = ff_h264_cabac_tables + H264_MLPS_STATE_OFFSET + 128;\n+    int bit, ptr, low, tmp1, tmp2;\n+    __asm__ volatile (\n+        \"ldr     %[bit], [%[c], %[range_off]]             \\n\\t\"\n+        \"ldrb    %[ptr], [%[state]]                       \\n\\t\"\n+        \"sub     %[tmp1], %[mlps_tables], %[lps_off]      \\n\\t\"\n+        \"and     %[tmp2], %[bit], #0xc0                   \\n\\t\"\n+        \"add     %[tmp1], %[tmp1], %[ptr]                 \\n\\t\"\n+        \"ldr     %[low], [%[c], %[low_off]]               \\n\\t\"\n+        \"ldrb    %[tmp2], [%[tmp1], %[tmp2], lsl #1]      \\n\\t\"\n+        \"sub     %[bit], %[bit], %[tmp2]                  \\n\\t\"\n+        \"mov     %[tmp1], %[bit]                          \\n\\t\"\n+        \"cmp     %[low], %[bit], lsl #17                  \\n\\t\"\n+        \"itt     ge                                       \\n\\t\"\n+        \"movge   %[tmp1], %[tmp2]                         \\n\\t\"\n+        \"mvnge   %[ptr], %[ptr]                           \\n\\t\"\n+        \"clz     %[tmp2], %[tmp1]                         \\n\\t\"\n+        \"it      ge                                       \\n\\t\"\n+        \"subge   %[low], %[low], %[bit], lsl #17          \\n\\t\"\n+        \"sub     %[tmp2], %[tmp2], #23                    \\n\\t\"\n+        \"and     %[bit], %[ptr], #1                       \\n\\t\"\n+        \"ldrb    %[mlps_tables], [%[mlps_tables], %[ptr]] \\n\\t\"\n+        \"lsl     %[low], %[low], %[tmp2]                  \\n\\t\"\n+        \"lsls    %[ptr], %[low], #16                      \\n\\t\"\n+        \"bne     1f                                       \\n\\t\"\n+        \"ldr     %[ptr], [%[c], %[ptr_off]]               \\n\\t\"\n+        \"lsl     %[tmp2], %[tmp1], %[tmp2]                \\n\\t\"\n+#if UNCHECKED_BITSTREAM_READER\n+        \"strb    %[mlps_tables], [%[state]]               \\n\\t\"\n+        \"rbit    %[state], %[low]                         \\n\\t\"\n+        \"ldrh    %[tmp1], [%[ptr]], #2                    \\n\\t\"\n+#else\n+        \"ldr     %[tmp1], [%[c], %[end_off]]              \\n\\t\"\n+        \"strb    %[mlps_tables], [%[state]]               \\n\\t\"\n+        \"rbit    %[state], %[low]                         \\n\\t\"\n+        \"cmp     %[tmp1], %[ptr]                          \\n\\t\"\n+#if CONFIG_THUMB\n+        \"it      cs                                       \\n\\t\"\n+        \"ldrhcs  %[tmp1], [%[ptr]], #2                    \\n\\t\"\n+#else\n+        \"ldrcsh  %[tmp1], [%[ptr]], #2                    \\n\\t\"\n+#endif\n+#endif\n+        \"clz     %[state], %[state]                       \\n\\t\"\n+        \"movw    %[mlps_tables], #0xffff                  \\n\\t\"\n+        \"sub     %[state], %[state], #16                  \\n\\t\"\n+        \"str     %[tmp2], [%[c], %[range_off]]            \\n\\t\"\n+        \"rev     %[tmp1], %[tmp1]                         \\n\\t\"\n+        \"str     %[ptr], [%[c], %[ptr_off]]               \\n\\t\"\n+        \"lsr     %[tmp1], %[tmp1], #15                    \\n\\t\"\n+        \"sub     %[tmp1], %[tmp1], %[mlps_tables]         \\n\\t\"\n+#if CONFIG_THUMB\n+        \"lsl     %[tmp1], %[tmp1], %[state]               \\n\\t\"\n+        \"add     %[low], %[low], %[tmp1]                  \\n\\t\"\n+#else\n+        \"add     %[low], %[low], %[tmp1], lsl %[state]    \\n\\t\"\n+#endif\n+        \"str     %[low], [%[c], %[low_off]]               \\n\\t\"\n+        \"b       2f                                       \\n\\t\"\n+        \"1:                                               \\n\\t\"\n+        \"strb    %[mlps_tables], [%[state]]               \\n\\t\"\n+        \"lsl     %[tmp1], %[tmp1], %[tmp2]                \\n\\t\"\n+        \"str     %[low], [%[c], %[low_off]]               \\n\\t\"\n+        \"str     %[tmp1], [%[c], %[range_off]]            \\n\\t\"\n+        \"2:                                               \\n\\t\"\n+    :  // Outputs\n+             [state]\"+r\"(state),\n+       [mlps_tables]\"+r\"(mlps_tables),\n+               [bit]\"=&r\"(bit),\n+               [ptr]\"=&r\"(ptr),\n+               [low]\"=&r\"(low),\n+              [tmp1]\"=&r\"(tmp1),\n+              [tmp2]\"=&r\"(tmp2)\n+    :  // Inputs\n+               [c]\"r\"(c),\n+         [low_off]\"J\"(offsetof(CABACContext, low)),\n+       [range_off]\"J\"(offsetof(CABACContext, range)),\n+         [ptr_off]\"J\"(offsetof(CABACContext, bytestream)),\n+         [end_off]\"J\"(offsetof(CABACContext, bytestream_end)),\n+         [lps_off]\"I\"((H264_MLPS_STATE_OFFSET + 128) - H264_LPS_RANGE_OFFSET)\n+    :  // Clobbers\n+       \"cc\", \"memory\"\n+    );\n+    return bit;\n+}\n \n-    __asm__ volatile(\n-        \"ldrb       %[bit]        , [%[state]]                  \\n\\t\"\n-        \"add        %[r_b]        , %[tables]   , %[lps_off]    \\n\\t\"\n-        \"mov        %[tmp]        , %[range]                    \\n\\t\"\n-        \"and        %[range]      , %[range]    , #0xC0         \\n\\t\"\n-        \"add        %[r_b]        , %[r_b]      , %[bit]        \\n\\t\"\n-        \"ldrb       %[range]      , [%[r_b], %[range], lsl #1]  \\n\\t\"\n-        \"add        %[r_b]        , %[tables]   , %[norm_off]   \\n\\t\"\n-        \"sub        %[r_c]        , %[tmp]      , %[range]      \\n\\t\"\n-        \"lsl        %[tmp]        , %[r_c]      , #17           \\n\\t\"\n-        \"cmp        %[tmp]        , %[low]                      \\n\\t\"\n-        \"it         gt                                          \\n\\t\"\n-        \"movgt      %[range]      , %[r_c]                      \\n\\t\"\n-        \"itt        cc                                          \\n\\t\"\n-        \"mvncc      %[bit]        , %[bit]                      \\n\\t\"\n-        \"subcc      %[low]        , %[low]      , %[tmp]        \\n\\t\"\n-        \"add        %[r_c]        , %[tables]   , %[mlps_off]   \\n\\t\"\n-        \"ldrb       %[tmp]        , [%[r_b], %[range]]          \\n\\t\"\n-        \"ldrb       %[r_b]        , [%[r_c], %[bit]]            \\n\\t\"\n-        \"lsl        %[low]        , %[low]      , %[tmp]        \\n\\t\"\n-        \"lsl        %[range]      , %[range]    , %[tmp]        \\n\\t\"\n-        \"uxth       %[r_c]        , %[low]                      \\n\\t\"\n-        \"strb       %[r_b]        , [%[state]]                  \\n\\t\"\n-        \"tst        %[r_c]        , %[r_c]                      \\n\\t\"\n-        \"bne        2f                                          \\n\\t\"\n-        \"ldr        %[r_c]        , [%[c], %[byte]]             \\n\\t\"\n+#define get_cabac_bypass get_cabac_bypass_arm\n+static inline int get_cabac_bypass_arm(CABACContext * const c)\n+{\n+    uint32_t low = c->low, range, ptr, tmp;\n+    int rv;\n+    __asm volatile (\n+        \"ldr        %[range] , [%[c], %[range_off]] \\n\\t\"\n+        \"mov        %[rv]    , #0                   \\n\\t\"\n+        \"ldr        %[ptr]   , [%[c], %[ptr_off]]   \\n\\t\"\n+        \"lsl        %[low]   , #1                   \\n\\t\"\n+#if !UNCHECKED_BITSTREAM_READER\n+        \"ldr        %[tmp]   , [%[c], %[end_off]]   \\n\\t\"\n+#endif\n+        \"cmp        %[low]   , %[range], lsl #17    \\n\\t\"\n+        \"itt         cs                              \\n\\t\"\n+        \"subcs      %[low]   , %[low], %[range], lsl #17 \\n\\t\"\n+        \"movcs      %[rv]    , #1                   \\n\\t\"\n #if UNCHECKED_BITSTREAM_READER\n-        \"ldrh       %[tmp]        , [%[r_c]]                    \\n\\t\"\n-        \"add        %[r_c]        , %[r_c]      , #2            \\n\\t\"\n-        \"str        %[r_c]        , [%[c], %[byte]]             \\n\\t\"\n+        \"ldrh       %[tmp]   , [%[ptr]], #2         \\n\\t\"\n+#else\n+        \"cmp        %[tmp]   , %[ptr]               \\n\\t\"\n+#if CONFIG_THUMB\n+        \"it         cs                              \\n\\t\"\n+        \"ldrhcs     %[tmp]   , [%[ptr]], #2         \\n\\t\"\n #else\n-        \"ldr        %[r_b]        , [%[c], %[end]]              \\n\\t\"\n-        \"ldrh       %[tmp]        , [%[r_c]]                    \\n\\t\"\n-        \"cmp        %[r_c]        , %[r_b]                      \\n\\t\"\n-        \"itt        lt                                          \\n\\t\"\n-        \"addlt      %[r_c]        , %[r_c]      , #2            \\n\\t\"\n-        \"strlt      %[r_c]        , [%[c], %[byte]]             \\n\\t\"\n+        \"ldrcsh     %[tmp]   , [%[ptr]], #2         \\n\\t\"\n+#endif\n #endif\n-        \"sub        %[r_c]        , %[low]      , #1            \\n\\t\"\n-        \"add        %[r_b]        , %[tables]   , %[norm_off]   \\n\\t\"\n-        \"eor        %[r_c]        , %[low]      , %[r_c]        \\n\\t\"\n-        \"rev        %[tmp]        , %[tmp]                      \\n\\t\"\n-        \"lsr        %[r_c]        , %[r_c]      , #15           \\n\\t\"\n-        \"lsr        %[tmp]        , %[tmp]      , #15           \\n\\t\"\n-        \"ldrb       %[r_c]        , [%[r_b], %[r_c]]            \\n\\t\"\n-        \"movw       %[r_b]        , #0xFFFF                     \\n\\t\"\n-        \"sub        %[tmp]        , %[tmp]      , %[r_b]        \\n\\t\"\n-        \"rsb        %[r_c]        , %[r_c]      , #7            \\n\\t\"\n-        \"lsl        %[tmp]        , %[tmp]      , %[r_c]        \\n\\t\"\n-        \"add        %[low]        , %[low]      , %[tmp]        \\n\\t\"\n-        \"2:                                                     \\n\\t\"\n-        :    [bit]\"=&r\"(bit),\n-             [low]\"+&r\"(c->low),\n-           [range]\"+&r\"(c->range),\n-             [r_b]\"=&r\"(reg_b),\n-             [r_c]\"=&r\"(reg_c),\n-             [tmp]\"=&r\"(tmp)\n-        :        [c]\"r\"(c),\n-             [state]\"r\"(state),\n-            [tables]\"r\"(ff_h264_cabac_tables),\n-              [byte]\"M\"(offsetof(CABACContext, bytestream)),\n-               [end]\"M\"(offsetof(CABACContext, bytestream_end)),\n-          [norm_off]\"I\"(H264_NORM_SHIFT_OFFSET),\n-           [lps_off]\"I\"(H264_LPS_RANGE_OFFSET),\n-          [mlps_off]\"I\"(H264_MLPS_STATE_OFFSET + 128)\n-        : \"memory\", \"cc\"\n-        );\n+        \"lsls       %[range] , %[low], #16          \\n\\t\"\n+        \"bne        1f                              \\n\\t\"\n \n-    return bit & 1;\n+        \"str        %[ptr]   , [%[c], %[ptr_off]]   \\n\\t\"\n+        \"rev        %[tmp]   , %[tmp]               \\n\\t\"\n+        \"add        %[low]   , %[low], %[tmp], lsr #15 \\n\\t\"\n+        \"movw       %[tmp]   , 0xFFFF               \\n\\t\"\n+        \"sub        %[low]   , %[tmp]               \\n\\t\"\n+        \"1:                                         \\n\\t\"\n+        \"str        %[low]   , [%[c], %[low_off]]   \\n\\t\"\n+        : // Outputs\n+               [rv]\"=&r\"(rv),\n+              [low]\"+r\"(low),\n+            [range]\"=&r\"(range),\n+              [ptr]\"=&r\"(ptr),\n+              [tmp]\"=&r\"(tmp)\n+        : // Inputs\n+                    [c]\"r\"(c),\n+              [low_off]\"J\"(offsetof(CABACContext, low)),\n+            [range_off]\"J\"(offsetof(CABACContext, range)),\n+              [ptr_off]\"J\"(offsetof(CABACContext, bytestream)),\n+              [end_off]\"J\"(offsetof(CABACContext, bytestream_end))\n+        : // Clobbers\n+            \"memory\", \"cc\"\n+    );\n+    return rv;\n }\n+\n+\n+#define get_cabac_bypass_sign get_cabac_bypass_sign_arm\n+static inline int get_cabac_bypass_sign_arm(CABACContext * const c, int rv)\n+{\n+    uint32_t low = c->low, range, ptr, tmp;\n+    __asm volatile (\n+        \"ldr        %[range] , [%[c], %[range_off]] \\n\\t\"\n+        \"ldr        %[ptr]   , [%[c], %[ptr_off]]   \\n\\t\"\n+        \"lsl        %[low]   , #1                   \\n\\t\"\n+#if !UNCHECKED_BITSTREAM_READER\n+        \"ldr        %[tmp]   , [%[c], %[end_off]]   \\n\\t\"\n+#endif\n+        \"cmp        %[low]   , %[range], lsl #17    \\n\\t\"\n+        \"it         cs                              \\n\\t\"\n+        \"subcs      %[low]   , %[low], %[range], lsl #17 \\n\\t\"\n+        \"it         cc                              \\n\\t\"\n+        \"rsbcc      %[rv]    , %[rv], #0            \\n\\t\"\n+#if UNCHECKED_BITSTREAM_READER\n+        \"ldrh       %[tmp]   , [%[ptr]], #2         \\n\\t\"\n+#else\n+        \"cmp        %[tmp]   , %[ptr]               \\n\\t\"\n+#if CONFIG_THUMB\n+        \"it         cs                              \\n\\t\"\n+        \"ldrhcs     %[tmp]   , [%[ptr]], #2         \\n\\t\"\n+#else\n+        \"ldrcsh     %[tmp]   , [%[ptr]], #2         \\n\\t\"\n+#endif\n+#endif\n+        \"lsls       %[range] , %[low], #16          \\n\\t\"\n+        \"bne        1f                              \\n\\t\"\n+\n+        \"str        %[ptr]   , [%[c], %[ptr_off]]   \\n\\t\"\n+        \"rev        %[tmp]   , %[tmp]               \\n\\t\"\n+        \"add        %[low]   , %[low], %[tmp], lsr #15 \\n\\t\"\n+        \"movw       %[tmp]   , 0xFFFF               \\n\\t\"\n+        \"sub        %[low]   , %[tmp]               \\n\\t\"\n+        \"1:                                         \\n\\t\"\n+        \"str        %[low]   , [%[c], %[low_off]]   \\n\\t\"\n+        : // Outputs\n+               [rv]\"+r\"(rv),\n+              [low]\"+r\"(low),\n+            [range]\"=&r\"(range),\n+              [ptr]\"=&r\"(ptr),\n+              [tmp]\"=&r\"(tmp)\n+        : // Inputs\n+                    [c]\"r\"(c),\n+              [low_off]\"J\"(offsetof(CABACContext, low)),\n+            [range_off]\"J\"(offsetof(CABACContext, range)),\n+              [ptr_off]\"J\"(offsetof(CABACContext, bytestream)),\n+              [end_off]\"J\"(offsetof(CABACContext, bytestream_end))\n+        : // Clobbers\n+            \"memory\", \"cc\"\n+    );\n+    return rv;\n+}\n+\n #endif /* HAVE_ARMV6T2_INLINE */\n \n #endif /* AVCODEC_ARM_CABAC_H */\ndiff --git a/libavcodec/arm/rpi_hevc_cabac.h b/libavcodec/arm/rpi_hevc_cabac.h\nnew file mode 100644\nindex 0000000000..c88dec6eff\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevc_cabac.h\n@@ -0,0 +1,607 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * Copyright (C) 2018 John Cox, Ben Avison for Raspberry Pi (Trading)\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#ifndef AVCODEC_ARM_HEVC_CABAC_H\n+#define AVCODEC_ARM_HEVC_CABAC_H\n+\n+#include \"config.h\"\n+#if HAVE_ARMV6T2_INLINE\n+\n+#define hevc_mem_bits32 hevc_mem_bits32_arm\n+static inline uint32_t hevc_mem_bits32_arm(const void * p, const unsigned int bits)\n+{\n+    unsigned int n;\n+    __asm__ (\n+        \"rev        %[n], %[x]                     \\n\\t\"\n+        : [n]\"=r\"(n)\n+        : [x]\"r\"(*(const uint32_t *)((const uint8_t *)p + (bits >> 3)))\n+        :\n+        );\n+    return n << (bits & 7);\n+}\n+\n+\n+// ---------------------------------------------------------------------------\n+//\n+// Helper fns - little bits of code where ARM has an instraction that the\n+// compiler doesn't know about / use\n+\n+#define trans_scale_sat trans_scale_sat_arm\n+static inline int trans_scale_sat_arm(const int level, const unsigned int scale, const unsigned int scale_m, const unsigned int shift)\n+{\n+    int rv;\n+    int t = ((level * (int)(scale * scale_m)) >> shift) + 1;\n+\n+    __asm__ (\n+    \"ssat %[rv], #16, %[t], ASR #1 \\n\\t\"\n+    : [rv]\"=r\"(rv)\n+    : [t]\"r\"(t)\n+    :\n+    );\n+    return rv;\n+}\n+\n+#define update_rice update_rice_arm\n+static inline void update_rice_arm(uint8_t * const stat_coeff,\n+    const unsigned int last_coeff_abs_level_remaining,\n+    const unsigned int c_rice_param)\n+{\n+    int t = last_coeff_abs_level_remaining << 1;\n+    __asm__ (\n+    \"lsrs  %[t], %[t], %[shift]             \\n\\t\"\n+\n+    \"it    eq                               \\n\\t\"\n+    \"subeq %[stat], %[stat], #1             \\n\\t\"\n+    \"cmp   %[t], #6                         \\n\\t\"\n+    \"adc   %[stat], %[stat], #0             \\n\\t\"\n+    \"usat  %[stat], #8, %[stat]             \\n\\t\"\n+    : [stat]\"+r\"(*stat_coeff),\n+         [t]\"+r\"(t)\n+    :  [shift]\"r\"(c_rice_param)\n+    : \"cc\"\n+    );\n+}\n+\n+// ---------------------------------------------------------------------------\n+//\n+// CABAC get loops\n+//\n+// Where the loop is simple enough we can normally do 10-30% better than the\n+// compiler\n+\n+// Get the residual greater than 1 bits\n+\n+#define get_cabac_greater1_bits get_cabac_greater1_bits_arm\n+static inline unsigned int get_cabac_greater1_bits_arm(CABACContext * const c, const unsigned int n,\n+    uint8_t * const state0)\n+{\n+    unsigned int i, reg_b, st, tmp, bit, rv;\n+     __asm__ (\n+         \"mov        %[i]          , #0                          \\n\\t\"\n+         \"mov        %[rv]         , #0                          \\n\\t\"\n+         \"1:                                                     \\n\\t\"\n+         \"add        %[i]          , %[i]        , #1            \\n\\t\"\n+         \"cmp        %[rv]         , #0                          \\n\\t\"\n+         \"ite        eq                                          \\n\\t\"\n+         \"usateq     %[st]         , #2          , %[i]          \\n\\t\"\n+         \"movne      %[st]         , #0                          \\n\\t\"\n+         \"sub        %[r_b]        , %[mlps_tables], %[lps_off]  \\n\\t\"\n+         \"and        %[tmp]        , %[range]    , #0xC0         \\n\\t\"\n+\n+         \"ldrb       %[bit]        , [%[state0], %[st]]          \\n\\t\"\n+         \"add        %[r_b]        , %[r_b]      , %[bit]        \\n\\t\"\n+         \"ldrb       %[tmp]        , [%[r_b], %[tmp], lsl #1]    \\n\\t\"\n+         \"sub        %[range]      , %[range]    , %[tmp]        \\n\\t\"\n+\n+         \"cmp        %[low]        , %[range], lsl #17           \\n\\t\"\n+         \"ittt       ge                                          \\n\\t\"\n+         \"subge      %[low]        , %[low]      , %[range], lsl #17 \\n\\t\"\n+         \"movge      %[range]      , %[tmp]                      \\n\\t\"\n+         \"mvnge      %[bit]        , %[bit]                      \\n\\t\"\n+\n+         \"clz        %[tmp]        , %[range]                    \\n\\t\"\n+         \"sub        %[tmp]        , #23                         \\n\\t\"\n+         \"ldrb       %[r_b]        , [%[mlps_tables], %[bit]]    \\n\\t\"\n+         \"and        %[bit]        , %[bit]      , #1            \\n\\t\"\n+         \"strb       %[r_b]        , [%[state0], %[st]]          \\n\\t\"\n+         \"lsl        %[low]        , %[low]      , %[tmp]        \\n\\t\"\n+         \"orr        %[rv]         , %[bit]      , %[rv], lsl #1 \\n\\t\"\n+         \"lsl        %[range]      , %[range]    , %[tmp]        \\n\\t\"\n+\n+// There is a small speed gain from combining both conditions, using a single\n+// branch and then working out what that meant later\n+         \"lsls       %[tmp]        , %[low]      , #16           \\n\\t\"\n+         \"it         ne                                          \\n\\t\"\n+         \"cmpne      %[n]          , %[i]                        \\n\\t\"\n+         \"bne        1b                                          \\n\\t\"\n+\n+// If reload is not required then we must have run out of flags to decode\n+         \"tst        %[tmp]        , %[tmp]                      \\n\\t\"\n+         \"bne        2f                                          \\n\\t\"\n+\n+// Do reload\n+         \"ldrh       %[tmp]        , [%[bptr]]   , #2            \\n\\t\"\n+         \"rbit       %[bit]        , %[low]                      \\n\\t\"\n+         \"movw       %[r_b]        , #0xFFFF                     \\n\\t\"\n+         \"clz        %[bit]        , %[bit]                      \\n\\t\"\n+         \"rev        %[tmp]        , %[tmp]                      \\n\\t\"\n+         \"sub        %[bit]        , %[bit]      , #16           \\n\\t\"\n+         \"cmp        %[n]          , %[i]                        \\n\\t\"\n+         \"rsb        %[tmp]        , %[r_b]      , %[tmp], lsr #15 \\n\\t\"\n+\n+#if CONFIG_THUMB\n+         \"lsl        %[tmp]        , %[tmp]      , %[bit]        \\n\\t\"\n+         \"add        %[low]        , %[low]      , %[tmp]        \\n\\t\"\n+#else\n+         \"add        %[low]        , %[low]      , %[tmp], lsl %[bit] \\n\\t\"\n+#endif\n+\n+         \"bne        1b                                          \\n\\t\"\n+         \"2:                                                     \\n\\t\"\n+         :    [bit]\"=&r\"(bit),\n+              [low]\"+r\"(c->low),\n+            [range]\"+r\"(c->range),\n+              [r_b]\"=&r\"(reg_b),\n+             [bptr]\"+r\"(c->bytestream),\n+                [i]\"=&r\"(i),\n+              [tmp]\"=&r\"(tmp),\n+               [st]\"=&r\"(st),\n+               [rv]\"=&r\"(rv)\n+          :  [state0]\"r\"(state0),\n+                  [n]\"r\"(n),\n+        [mlps_tables]\"r\"(ff_h264_cabac_tables + H264_MLPS_STATE_OFFSET + 128),\n+            [lps_off]\"I\"((H264_MLPS_STATE_OFFSET + 128) - H264_LPS_RANGE_OFFSET)\n+         : \"memory\", \"cc\"\n+    );\n+    return rv;\n+}\n+\n+\n+// n must be > 0 on entry\n+#define get_cabac_sig_coeff_flag_idxs get_cabac_sig_coeff_flag_idxs_arm\n+static inline uint8_t * get_cabac_sig_coeff_flag_idxs_arm(CABACContext * const c, uint8_t * const state0,\n+    unsigned int n,\n+    const uint8_t * ctx_map,\n+    uint8_t * p)\n+{\n+    unsigned int reg_b, tmp, st, bit;\n+     __asm__ (\n+// Get bin from map\n+#if CONFIG_THUMB\n+         \"add        %[ctx_map]    , %[n]                        \\n\\t\"\n+         \"ldrb       %[st]         , [%[ctx_map]]                \\n\\t\"\n+#else\n+         \"ldrb       %[st]         , [%[ctx_map], %[n]]!         \\n\\t\"\n+#endif\n+         \"1:                                                     \\n\\t\"\n+\n+// Load state & ranges\n+         \"ldrb       %[bit]        , [%[state0], %[st]]          \\n\\t\"\n+         \"and        %[tmp]        , %[range]    , #0xC0         \\n\\t\"\n+         \"sub        %[r_b]        , %[mlps_tables], %[lps_off]  \\n\\t\"\n+         \"add        %[r_b]        , %[r_b]      , %[tmp], lsl #1 \\n\\t\"\n+         \"ldrb       %[tmp]        , [%[r_b], %[bit]]            \\n\\t\"\n+         \"sub        %[range]      , %[range]    , %[tmp]        \\n\\t\"\n+\n+         \"cmp        %[low]        , %[range], lsl #17           \\n\\t\"\n+         \"ittt       ge                                          \\n\\t\"\n+         \"mvnge      %[bit]        , %[bit]                      \\n\\t\"\n+         \"subge      %[low]        , %[low]      , %[range], lsl #17 \\n\\t\"\n+         \"movge      %[range]      , %[tmp]                      \\n\\t\"\n+\n+// Renorm\n+         \"clz        %[tmp]        , %[range]                    \\n\\t\"\n+         \"ldrb       %[r_b]        , [%[mlps_tables], %[bit]]    \\n\\t\"\n+         \"sub        %[tmp]        , #23                         \\n\\t\"\n+         \"strb       %[r_b]        , [%[state0], %[st]]          \\n\\t\"\n+         \"tst        %[bit]        , #1                          \\n\\t\"\n+         \"ldrb       %[st]         , [%[ctx_map], #-1]!          \\n\\t\"\n+         \"lsl        %[low]        , %[low]      , %[tmp]        \\n\\t\"\n+// GCC asm seems to need strbne written differently for thumb and arm\n+#if CONFIG_THUMB\n+         \"it         ne                                          \\n\\t\"\n+         \"strbne     %[n]          , [%[idx]]    , #1            \\n\\t\"\n+#else\n+         \"strneb     %[n]          , [%[idx]]    , #1            \\n\\t\"\n+#endif\n+\n+// There is a small speed gain from combining both conditions, using a single\n+// branch and then working out what that meant later\n+         \"subs       %[n]          , %[n]        , #1            \\n\\t\"\n+         \"lsl        %[range]      , %[range]    , %[tmp]        \\n\\t\"\n+#if CONFIG_THUMB\n+         \"itt        ne                                          \\n\\t\"\n+         \"lslsne     %[tmp]        , %[low]      , #16           \\n\\t\"\n+#else\n+         \"lslnes     %[tmp]        , %[low]      , #16           \\n\\t\"\n+#endif\n+         \"bne        1b                                          \\n\\t\"\n+\n+// If we have bits left then n must be 0 so give up now\n+         \"lsls       %[tmp]        , %[low]      , #16           \\n\\t\"\n+         \"bne        2f                                          \\n\\t\"\n+\n+// Do reload\n+         \"ldrh       %[tmp]        , [%[bptr]]   , #2            \\n\\t\"\n+         \"rbit       %[bit]        , %[low]                      \\n\\t\"\n+         \"movw       %[r_b]        , #0xFFFF                     \\n\\t\"\n+         \"clz        %[bit]        , %[bit]                      \\n\\t\"\n+         \"cmp        %[n]          , #0                          \\n\\t\"\n+         \"rev        %[tmp]        , %[tmp]                      \\n\\t\"\n+         \"sub        %[bit]        , %[bit]      , #16           \\n\\t\"\n+         \"rsb        %[tmp]        , %[r_b]      , %[tmp], lsr #15 \\n\\t\"\n+\n+#if CONFIG_THUMB\n+         \"lsl        %[tmp]        , %[tmp]      , %[bit]        \\n\\t\"\n+         \"add        %[low]        , %[low]      , %[tmp]        \\n\\t\"\n+#else\n+         \"add        %[low]        , %[low]      , %[tmp], lsl %[bit] \\n\\t\"\n+#endif\n+\n+// Check to see if we still have more to do\n+         \"bne        1b                                          \\n\\t\"\n+         \"2:                                                     \\n\\t\"\n+         :    [bit]\"=&r\"(bit),\n+              [low]\"+r\"(c->low),\n+            [range]\"+r\"(c->range),\n+              [r_b]\"=&r\"(reg_b),\n+             [bptr]\"+r\"(c->bytestream),\n+              [idx]\"+r\"(p),\n+                [n]\"+r\"(n),\n+              [tmp]\"=&r\"(tmp),\n+               [st]\"=&r\"(st),\n+          [ctx_map]\"+r\"(ctx_map)\n+          :  [state0]\"r\"(state0),\n+        [mlps_tables]\"r\"(ff_h264_cabac_tables + H264_MLPS_STATE_OFFSET + 128),\n+            [lps_off]\"I\"((H264_MLPS_STATE_OFFSET + 128) - H264_LPS_RANGE_OFFSET)\n+         : \"memory\", \"cc\"\n+    );\n+\n+    return p;\n+}\n+\n+// ---------------------------------------------------------------------------\n+//\n+// CABAC_BY22 functions\n+\n+\n+#define get_cabac_by22_start get_cabac_by22_start_arm\n+static inline void get_cabac_by22_start_arm(CABACContext * const c)\n+{\n+    const uint8_t *ptr = c->bytestream;\n+    register uint32_t low __asm__(\"r1\"), range __asm__(\"r2\");\n+    uint32_t m, range8, bits;\n+#if !USE_BY22_DIV\n+    uintptr_t inv;\n+#endif\n+\n+    av_assert2(offsetof (CABACContext, low) == 0);\n+    av_assert2(offsetof (CABACContext, range) == 4);\n+    av_assert2(offsetof (CABACContext, by22.range) == offsetof (CABACContext, by22.bits) + 2);\n+    __asm__ volatile (\n+        \"ldmia   %[c], {%[low], %[range]}                         \\n\\t\"\n+        : // Outputs\n+               [low]\"=r\"(low),\n+             [range]\"=r\"(range)\n+        : // Inputs\n+                 [c]\"r\"(c)\n+        : // Clobbers\n+    );\n+#if !USE_BY22_DIV\n+    inv = (uintptr_t)cabac_by22_inv_range;\n+#endif\n+    __asm__ volatile (\n+        \"ldr     %[m], [%[ptr]], #-(\"AV_STRINGIFY(CABAC_BITS)\"/8) \\n\\t\"\n+#if !USE_BY22_DIV\n+        \"uxtb    %[range8], %[range]                              \\n\\t\"\n+#endif\n+        \"rbit    %[bits], %[low]                                  \\n\\t\"\n+        \"lsl     %[low], %[low], #22 - \"AV_STRINGIFY(CABAC_BITS)\" \\n\\t\"\n+        \"clz     %[bits], %[bits]                                 \\n\\t\"\n+        \"str     %[ptr], [%[c], %[ptr_off]]                       \\n\\t\"\n+        \"rev     %[m], %[m]                                       \\n\\t\"\n+        \"rsb     %[ptr], %[bits], #9 + \"AV_STRINGIFY(CABAC_BITS)\" \\n\\t\"\n+        \"eor     %[m], %[m], #0x80000000                          \\n\\t\"\n+#if !USE_BY22_DIV\n+        \"ldr     %[inv], [%[inv], %[range8], lsl #2]              \\n\\t\"\n+        \"pkhbt   %[range], %[bits], %[range], lsl #16             \\n\\t\"\n+        \"str     %[range], [%[c], %[bits_off]]                    \\n\\t\"\n+#else\n+        \"strh    %[bits], [%[c], %[bits_off]]                     \\n\\t\"\n+#endif\n+#if CONFIG_THUMB\n+        \"lsr     %[m], %[ptr]                                     \\n\\t\"\n+        \"eor     %[range], %[low], %[m]                           \\n\\t\"\n+#else\n+        \"eor     %[range], %[low], %[m], lsr %[ptr]               \\n\\t\"\n+#endif\n+        : // Outputs\n+               [ptr]\"+&r\"(ptr),\n+               [low]\"+&r\"(low),\n+             [range]\"+&r\"(range),\n+#if !USE_BY22_DIV\n+               [inv]\"+&r\"(inv),\n+#endif\n+                 [m]\"=&r\"(m),\n+            [range8]\"=&r\"(range8),\n+              [bits]\"=&r\"(bits)\n+        : // Inputs\n+                   [c]\"r\"(c),\n+            [bits_off]\"J\"(offsetof (CABACContext, by22.bits)),\n+             [ptr_off]\"J\"(offsetof (CABACContext, bytestream))\n+        : // Clobbers\n+            \"memory\"\n+    );\n+    c->low = range;\n+#if !USE_BY22_DIV\n+    c->range = inv;\n+#endif\n+}\n+\n+#define get_cabac_by22_peek get_cabac_by22_peek_arm\n+static inline uint32_t get_cabac_by22_peek_arm(const CABACContext *const c)\n+{\n+    uint32_t rv = c->low &~ 1, tmp;\n+    __asm__ (\n+        \"cmp      %[inv] , #0                    \\n\\t\"\n+        \"it       ne                             \\n\\t\"\n+        \"umullne  %[tmp] , %[rv] , %[inv], %[rv] \\n\\t\"\n+        :  // Outputs\n+             [rv]\"+r\"(rv),\n+             [tmp]\"=r\"(tmp)\n+        :  // Inputs\n+             [inv]\"r\"(c->range)\n+        :  // Clobbers\n+                \"cc\"\n+    );\n+    return rv << 1;\n+}\n+\n+#define get_cabac_by22_flush get_cabac_by22_flush_arm\n+static inline void get_cabac_by22_flush_arm(CABACContext *const c, const unsigned int n, uint32_t val)\n+{\n+    uint32_t bits, ptr, tmp1, tmp2;\n+    __asm__ volatile (\n+        \"ldrh    %[bits], [%[cc], %[bits_off]]     \\n\\t\"\n+        \"ldr     %[ptr], [%[cc], %[ptr_off]]       \\n\\t\"\n+        \"rsb     %[tmp1], %[n], #32                \\n\\t\"\n+        \"add     %[bits], %[bits], %[n]            \\n\\t\"\n+        \"ldrh    %[tmp2], [%[cc], %[range_off]]    \\n\\t\"\n+        \"lsr     %[tmp1], %[val], %[tmp1]          \\n\\t\"\n+        \"ldr     %[val], [%[cc], %[low_off]]       \\n\\t\"\n+#if CONFIG_THUMB\n+        \"add     %[ptr], %[ptr], %[bits], lsr #3   \\n\\t\"\n+        \"ldr     %[ptr], [%[ptr]]                  \\n\\t\"\n+#else\n+        \"ldr     %[ptr], [%[ptr], %[bits], lsr #3] \\n\\t\"\n+#endif\n+        \"mul     %[tmp1], %[tmp2], %[tmp1]         \\n\\t\"\n+        \"and     %[tmp2], %[bits], #7              \\n\\t\"\n+        \"strh    %[bits], [%[cc], %[bits_off]]     \\n\\t\"\n+        \"rev     %[ptr], %[ptr]                    \\n\\t\"\n+        \"lsl     %[tmp1], %[tmp1], #23             \\n\\t\"\n+#if CONFIG_THUMB\n+        \"lsl     %[val], %[n]                      \\n\\t\"\n+        \"sub     %[val], %[tmp1]                   \\n\\t\"\n+#else\n+        \"rsb     %[val], %[tmp1], %[val], lsl %[n] \\n\\t\"\n+#endif\n+        \"lsl     %[ptr], %[ptr], %[tmp2]           \\n\\t\"\n+        \"orr     %[val], %[val], %[ptr], lsr #9    \\n\\t\"\n+        \"str     %[val], [%[cc], %[low_off]]       \\n\\t\"\n+        :  // Outputs\n+            [val]\"+r\"(val),\n+           [bits]\"=&r\"(bits),\n+            [ptr]\"=&r\"(ptr),\n+           [tmp1]\"=&r\"(tmp1),\n+           [tmp2]\"=&r\"(tmp2)\n+        :  // Inputs\n+                  [cc]\"r\"(c),\n+                   [n]\"r\"(n),\n+            [bits_off]\"J\"(offsetof(CABACContext, by22.bits)),\n+             [ptr_off]\"J\"(offsetof(CABACContext, bytestream)),\n+           [range_off]\"J\"(offsetof(CABACContext, by22.range)),\n+             [low_off]\"J\"(offsetof(CABACContext, low))\n+        :  // Clobbers\n+           \"memory\"\n+    );\n+}\n+\n+#define coeff_abs_level_remaining_decode_bypass coeff_abs_level_remaining_decode_bypass_arm\n+static inline int coeff_abs_level_remaining_decode_bypass_arm(CABACContext *const c, unsigned int rice_param)\n+{\n+    uint32_t last_coeff_abs_level_remaining;\n+    uint32_t prefix, n1, range, n2, ptr, tmp1, tmp2;\n+    __asm__ volatile (\n+        \"ldr     %[remain], [%[cc], %[low_off]]               \\n\\t\"\n+        \"ldr     %[prefix], [%[cc], %[range_off]]             \\n\\t\"\n+        \"bic     %[remain], %[remain], #1                     \\n\\t\"\n+        \"ldrh    %[tmp2], [%[cc], %[by22_bits_off]]           \\n\\t\"\n+        \"ldr     %[ptr], [%[cc], %[ptr_off]]                  \\n\\t\"\n+        \"cmp     %[prefix], #0                                \\n\\t\"\n+        \"it      ne                                           \\n\\t\"\n+        \"umullne %[prefix], %[remain], %[prefix], %[remain]   \\n\\t\"\n+        \"ldrh    %[range], [%[cc], %[by22_range_off]]         \\n\\t\"\n+        \"lsl     %[remain], %[remain], #1                     \\n\\t\"\n+        \"mvn     %[prefix], %[remain]                         \\n\\t\"\n+        \"clz     %[prefix], %[prefix]                         \\n\\t\"\n+        \"rsbs    %[n1], %[prefix], #2                         \\n\\t\"\n+        \"bcc     1f                                           \\n\\t\"\n+        \"adc     %[n1], %[rice], %[prefix]                    \\n\\t\"\n+        \"add     %[tmp2], %[tmp2], %[n1]                      \\n\\t\"\n+        \"rsb     %[n2], %[n1], #32                            \\n\\t\"\n+        \"and     %[tmp1], %[tmp2], #7                         \\n\\t\"\n+        \"strh    %[tmp2], [%[cc], %[by22_bits_off]]           \\n\\t\"\n+        \"lsr     %[tmp2], %[tmp2], #3                         \\n\\t\"\n+        \"lsr     %[n2], %[remain], %[n2]                      \\n\\t\"\n+        \"mul     %[n2], %[range], %[n2]                       \\n\\t\"\n+        \"ldr     %[range], [%[cc], %[low_off]]                \\n\\t\"\n+        \"ldr     %[ptr], [%[ptr], %[tmp2]]                    \\n\\t\"\n+        \"rsb     %[tmp2], %[rice], #31                        \\n\\t\"\n+        \"lsl     %[remain], %[remain], %[prefix]              \\n\\t\"\n+        \"lsl     %[n2], %[n2], #23                            \\n\\t\"\n+#if CONFIG_THUMB\n+        \"lsl     %[range], %[n1]                              \\n\\t\"\n+        \"sub     %[range], %[n2]                              \\n\\t\"\n+#else\n+        \"rsb     %[range], %[n2], %[range], lsl %[n1]         \\n\\t\"\n+#endif\n+        \"rev     %[ptr], %[ptr]                               \\n\\t\"\n+        \"lsl     %[n2], %[prefix], %[rice]                    \\n\\t\"\n+#if CONFIG_THUMB\n+        \"lsr     %[remain], %[tmp2]                           \\n\\t\"\n+        \"add     %[remain], %[n2]                             \\n\\t\"\n+#else\n+        \"add     %[remain], %[n2], %[remain], lsr %[tmp2]     \\n\\t\"\n+#endif\n+        \"b       3f                                           \\n\\t\"\n+        \"1:                                                   \\n\\t\"\n+        \"add     %[n2], %[rice], %[prefix], lsl #1            \\n\\t\"\n+        \"cmp     %[n2], %[peek_bits_plus_2]                   \\n\\t\"\n+        \"bhi     2f                                           \\n\\t\"\n+        \"sub     %[n1], %[n2], #2                             \\n\\t\"\n+        \"add     %[tmp2], %[tmp2], %[n1]                      \\n\\t\"\n+        \"rsb     %[n2], %[n1], #32                            \\n\\t\"\n+        \"strh    %[tmp2], [%[cc], %[by22_bits_off]]           \\n\\t\"\n+        \"lsr     %[tmp1], %[tmp2], #3                         \\n\\t\"\n+        \"lsr     %[n2], %[remain], %[n2]                      \\n\\t\"\n+        \"mul     %[n2], %[range], %[n2]                       \\n\\t\"\n+        \"rsb     %[range], %[rice], #34                       \\n\\t\"\n+        \"ldr     %[ptr], [%[ptr], %[tmp1]]                    \\n\\t\"\n+        \"and     %[tmp1], %[tmp2], #7                         \\n\\t\"\n+        \"lsl     %[remain], %[remain], %[prefix]              \\n\\t\"\n+        \"ldr     %[tmp2], [%[cc], %[low_off]]                 \\n\\t\"\n+        \"rsb     %[prefix], %[prefix], %[range]               \\n\\t\"\n+        \"orr     %[remain], %[remain], #0x80000000            \\n\\t\"\n+        \"rev     %[ptr], %[ptr]                               \\n\\t\"\n+        \"lsl     %[n2], %[n2], #23                            \\n\\t\"\n+        \"mov     %[range], #2                                 \\n\\t\"\n+#if CONFIG_THUMB\n+        \"lsl     %[tmp2], %[n1]                               \\n\\t\"\n+        \"sub     %[tmp2], %[n2]                               \\n\\t\"\n+#else\n+        \"rsb     %[tmp2], %[n2], %[tmp2], lsl %[n1]           \\n\\t\"\n+#endif\n+        \"lsl     %[ptr], %[ptr], %[tmp1]                      \\n\\t\"\n+        \"lsl     %[rice], %[range], %[rice]                   \\n\\t\"\n+        \"orr     %[range], %[tmp2], %[ptr], lsr #9            \\n\\t\"\n+#if CONFIG_THUMB\n+        \"lsr     %[remain], %[prefix]                         \\n\\t\"\n+        \"add     %[remain], %[rice]                           \\n\\t\"\n+#else\n+        \"add     %[remain], %[rice], %[remain], lsr %[prefix] \\n\\t\"\n+#endif\n+        \"b       4f                                           \\n\\t\"\n+        \"2:                                                   \\n\\t\"\n+        \"add     %[n1], %[tmp2], %[prefix]                    \\n\\t\"\n+#if CONFIG_THUMB\n+        \"add     %[tmp2], %[ptr], %[n1], lsr #3               \\n\\t\"\n+        \"ldr     %[tmp2], [%[tmp2]]                           \\n\\t\"\n+#else\n+        \"ldr     %[tmp2], [%[ptr], %[n1], lsr #3]             \\n\\t\"\n+#endif\n+        \"rsb     %[tmp1], %[prefix], #32                      \\n\\t\"\n+        \"push    {%[rice]}                                    \\n\\t\"\n+        \"and     %[rice], %[n1], #7                           \\n\\t\"\n+        \"lsr     %[tmp1], %[remain], %[tmp1]                  \\n\\t\"\n+        \"ldr     %[ptr], [%[cc], %[low_off]]                  \\n\\t\"\n+        \"mul     %[remain], %[range], %[tmp1]                 \\n\\t\"\n+        \"rev     %[tmp2], %[tmp2]                             \\n\\t\"\n+        \"rsb     %[n2], %[prefix], %[n2]                      \\n\\t\"\n+        \"ldr     %[tmp1], [%[cc], %[range_off]]               \\n\\t\"\n+        \"lsl     %[rice], %[tmp2], %[rice]                    \\n\\t\"\n+        \"sub     %[tmp2], %[n2], #2                           \\n\\t\"\n+        \"lsl     %[remain], %[remain], #23                    \\n\\t\"\n+#if CONFIG_THUMB\n+        \"lsl     %[ptr], %[prefix]                            \\n\\t\"\n+        \"rsb     %[remain], %[ptr]                            \\n\\t\"\n+#else\n+        \"rsb     %[remain], %[remain], %[ptr], lsl %[prefix]  \\n\\t\"\n+#endif\n+        \"orr     %[remain], %[remain], %[rice], lsr #9        \\n\\t\"\n+        \"add     %[prefix], %[n1], %[tmp2]                    \\n\\t\"\n+        \"bic     %[n1], %[remain], #1                         \\n\\t\"\n+        \"ldr     %[ptr], [%[cc], %[ptr_off]]                  \\n\\t\"\n+        \"cmp     %[tmp1], #0                                  \\n\\t\"\n+        \"rsb     %[rice], %[tmp2], #32                        \\n\\t\"\n+        \"it      ne                                           \\n\\t\"\n+        \"umullne %[tmp1], %[n1], %[tmp1], %[n1]               \\n\\t\"\n+        \"and     %[tmp1], %[prefix], #7                       \\n\\t\"\n+#if CONFIG_THUMB\n+        \"add     %[ptr], %[ptr], %[prefix], lsr #3            \\n\\t\"\n+        \"ldr     %[ptr], [%[ptr]]                             \\n\\t\"\n+#else\n+        \"ldr     %[ptr], [%[ptr], %[prefix], lsr #3]          \\n\\t\"\n+#endif\n+        \"lsl     %[n1], %[n1], #1                             \\n\\t\"\n+        \"lsr     %[rice], %[n1], %[rice]                      \\n\\t\"\n+        \"rsb     %[n2], %[n2], #34                            \\n\\t\"\n+        \"mul     %[range], %[range], %[rice]                  \\n\\t\"\n+        \"pop     {%[rice]}                                    \\n\\t\"\n+        \"rev     %[ptr], %[ptr]                               \\n\\t\"\n+        \"orr     %[n1], %[n1], #0x80000000                    \\n\\t\"\n+        \"strh    %[prefix], [%[cc], %[by22_bits_off]]         \\n\\t\"\n+        \"mov     %[prefix], #2                                \\n\\t\"\n+        \"lsl     %[range], %[range], #23                      \\n\\t\"\n+#if CONFIG_THUMB\n+        \"lsl     %[remain], %[tmp2]                           \\n\\t\"\n+        \"rsb     %[range], %[remain]                          \\n\\t\"\n+#else\n+        \"rsb     %[range], %[range], %[remain], lsl %[tmp2]   \\n\\t\"\n+#endif\n+        \"lsl     %[remain], %[prefix], %[rice]                \\n\\t\"\n+#if CONFIG_THUMB\n+        \"lsr     %[n1], %[n2]                                 \\n\\t\"\n+        \"add     %[remain], %[n1]                             \\n\\t\"\n+#else\n+        \"add     %[remain], %[remain], %[n1], lsr %[n2]       \\n\\t\"\n+#endif\n+        \"3:                                                   \\n\\t\"\n+        \"lsl     %[ptr], %[ptr], %[tmp1]                      \\n\\t\"\n+        \"orr     %[range], %[range], %[ptr], lsr #9           \\n\\t\"\n+        \"4:                                                   \\n\\t\"\n+        \"str     %[range], [%[cc], %[low_off]]                \\n\\t\"\n+        :  // Outputs\n+            [remain]\"=&r\"(last_coeff_abs_level_remaining),\n+              [rice]\"+r\"(rice_param),\n+            [prefix]\"=&r\"(prefix),\n+                [n1]\"=&r\"(n1),\n+             [range]\"=&r\"(range),\n+                [n2]\"=&r\"(n2),\n+               [ptr]\"=&r\"(ptr),\n+              [tmp1]\"=&r\"(tmp1),\n+              [tmp2]\"=&r\"(tmp2)\n+        :  // Inputs\n+                          [cc]\"r\"(c),\n+            [peek_bits_plus_2]\"I\"(CABAC_BY22_PEEK_BITS + 2),\n+                     [low_off]\"J\"(offsetof(CABACContext, low)),\n+                   [range_off]\"J\"(offsetof(CABACContext, range)),\n+               [by22_bits_off]\"J\"(offsetof(CABACContext, by22.bits)),\n+              [by22_range_off]\"J\"(offsetof(CABACContext, by22.range)),\n+                     [ptr_off]\"J\"(offsetof(CABACContext, bytestream))\n+        :  // Clobbers\n+           \"cc\", \"memory\"\n+    );\n+    return last_coeff_abs_level_remaining;\n+}\n+\n+#endif /* HAVE_ARMV6T2_INLINE */\n+\n+#endif /* AVCODEC_ARM_HEVC_CABAC_H */\ndiff --git a/libavcodec/arm/rpi_hevc_idct_fn_neon.S b/libavcodec/arm/rpi_hevc_idct_fn_neon.S\nnew file mode 100644\nindex 0000000000..978b7b6947\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevc_idct_fn_neon.S\n@@ -0,0 +1,183 @@\n+/*\n+ * ARM NEON optimised IDCT functions for HEVC decoding\n+ * Copyright (c) 2014 Seppo Tomperi <seppo.tomperi@vtt.fi>\n+ * Copyright (C) 2018 John Cox, ben Avison for Raspberry Pi (Trading)\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+@ Included multiple times from hevc_idct_neon.S\n+@ Macros defined there\n+\n+#define DC_SHIFT  (15 - BIT_DEPTH)\n+#define DC_ADD    (1 | (1 << (14 - BIT_DEPTH)))\n+#define TRN_SHIFT (20 - BIT_DEPTH)\n+\n+function JOIN(ff_hevc_rpi_idct_4x4_dc_neon_, BIT_DEPTH), export=1\n+        ldrsh       r1, [r0]\n+        add         r1, #DC_ADD\n+        asr         r1, #DC_SHIFT\n+        vdup.16     q0, r1\n+        vdup.16     q1, r1\n+        vst1.16     {q0, q1}, [r0]\n+        bx lr\n+endfunc\n+\n+function JOIN(ff_hevc_rpi_idct_8x8_dc_neon_, BIT_DEPTH), export=1\n+        ldrsh       r1, [r0]\n+        add         r2, r0, #32\n+        mov         r3, #64\n+        add         r1, #DC_ADD\n+        asr         r1, #DC_SHIFT\n+        vdup.16     q8, r1\n+        vdup.16     q9, r1\n+        vst1.16     {q8, q9}, [r0], r3\n+        vst1.16     {q8, q9}, [r2], r3\n+        vst1.16     {q8, q9}, [r0]\n+        vst1.16     {q8, q9}, [r2]\n+        bx lr\n+endfunc\n+\n+function JOIN(ff_hevc_rpi_idct_16x16_dc_neon_, BIT_DEPTH), export=1\n+        ldrsh       r1, [r0]\n+        add         r2, r0, #32\n+        mov         r3, #64\n+        add         r1, #DC_ADD\n+        mov         ip, #16*16\n+        asr         r1, #DC_SHIFT\n+        vdup.16     q8, r1\n+        vdup.16     q9, r1\n+1:      vst1.16     {q8, q9}, [r0], r3\n+        subs        ip, ip, #32\n+        vst1.16     {q8, q9}, [r2], r3\n+        bhi         1b\n+        bx lr\n+endfunc\n+\n+function JOIN(ff_hevc_rpi_idct_32x32_dc_neon_, BIT_DEPTH), export=1\n+        ldrsh       r1, [r0]\n+        add         r2, r0, #32\n+        mov         r3, #64\n+        add         r1, #DC_ADD\n+        mov         ip, #32*32\n+        asr         r1, #DC_SHIFT\n+        vdup.16     q8, r1\n+        vdup.16     q9, r1\n+1:      vst1.16     {q8, q9}, [r0], r3\n+        subs        ip, ip, #32\n+        vst1.16     {q8, q9}, [r2], r3\n+        bhi         1b\n+        bx lr\n+endfunc\n+\n+\n+function JOIN(ff_hevc_rpi_transform_4x4_neon_, BIT_DEPTH), export=1\n+        vldr.i32    s0, =0x00240053 // 36 and 83\n+        vld1.16     {q14, q15}, [r0 :256]  // coeffs\n+\n+        tr4_shift   #7\n+\n+        vzip.16     d28, d29\n+        vzip.16     d30, d31\n+        vzip.32     q14, q15\n+\n+        tr4_shift   #TRN_SHIFT\n+\n+        vst4.16     {q14, q15}, [r0 :256]\n+        bx lr\n+\n+        .ltorg\n+endfunc\n+\n+\n+\n+function JOIN(ff_hevc_rpi_transform_luma_4x4_neon_, BIT_DEPTH), export=1\n+        vmov.i32    d0, #0x4a  // 74\n+        vld1.16     {q14, q15}, [r0 :256]  // coeffs\n+        vmov.i32    d1, #0x1d  // 29\n+        vmov.i32    d2, #0x37  // 55\n+\n+        tr4_luma_shift #7\n+\n+        vzip.16     d28, d29\n+        vzip.16     d30, d31\n+        vzip.32     q14, q15\n+\n+        tr4_luma_shift #TRN_SHIFT\n+\n+        vst4.16     {q14, q15}, [r0 :256]\n+        bx lr\n+endfunc\n+\n+function JOIN(ff_hevc_rpi_transform_8x8_neon_, BIT_DEPTH), export=1\n+        add      r2, r0, #16\n+        adr      r3, tr4f\n+        vpush    {d8-d15}\n+        vld1.16  {d0, d1}, [r3]\n+        mov      r3, #32\n+\n+        tr8_vert  d16, d17, d18, d19, d24, d25, d26, d27, q8,  q9,  \\\n+            \"sub      r0, r0, #128-8\",                              \\\n+            \"sub      r2, r2, #128-8\",                              \\\n+            \"cmp      r1, #4\"\n+        ble      2f\n+\n+        tr8_vert  d20, d21, d22, d23, d28, d29, d30, d31, q10, q11, \\\n+            \"sub      r0, r0, #128+8\",                              \\\n+            \"sub      r2, r2, #128+8+16-32\",                        \\\n+            \"mov      r3, #64\"\n+\n+        vzip.16  d16, d17\n+        vzip.16  d18, d19\n+\n+        vzip.16  d20, d21\n+        vzip.16  d22, d23\n+        vzip.16  d28, d29\n+        vzip.16  d30, d31\n+        vzip.32  q10, q11\n+        vzip.32  q14, q15\n+1:\n+        vzip.16  d24, d25\n+        vzip.16  d26, d27\n+        vzip.32  q8, q9\n+        vzip.32  q12, q13\n+\n+        tr8_horiz d16, d17, d18, d19, d20, d21, d22, d23, q8,  q9,  TRN_SHIFT\n+        tr8_horiz d24, d25, d26, d27, d28, d29, d30, d31, q12, q13, TRN_SHIFT\n+\n+        vpop     {d8-d15}\n+        bx       lr\n+\n+2:      vmov.i64 q10, #0\n+        sub      r0, r0, #8\n+        vmov.i64 q11, #0\n+        sub      r2, r2, #8+16-32\n+        vmov.i64 q14, #0\n+        mov      r3, #64\n+        vmov.i64 q15, #0\n+\n+        vzip.16  d16, d17\n+        vzip.16  d18, d19\n+\n+        b        1b\n+\n+endfunc\n+\n+#undef DC_SHIFT\n+#undef DC_ADD\n+#undef TRN_SHIFT\n+\ndiff --git a/libavcodec/arm/rpi_hevc_misc_neon.S b/libavcodec/arm/rpi_hevc_misc_neon.S\nnew file mode 100644\nindex 0000000000..161bb0d7c9\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevc_misc_neon.S\n@@ -0,0 +1,267 @@\n+/*\n+Copyright (c) 2017 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Written by John Cox, Ben Avison\n+*/\n+\n+#include \"libavutil/arm/asm.S\"\n+#include \"neon.S\"\n+\n+@ rpi_zap_coeff_vals_neon(\n+@   uint16_t * buf,          [r0]\n+@   unsigned int log_n_m2)   [r1]\n+\n+function rpi_zap_coeff_vals_neon, export=1\n+        mov      ip, #1\n+        vmov.i64 q0, #0\n+        teq      r1, #0\n+        vmov.i64 q1, #0\n+        beq      2f\n+\n+        lsl      ip, r1    @ 2, 4 or 8\n+        add      r2, r0, #32\n+        lsl      ip, r1    @ 4, 16 or 64 = number of 32-byte blocks to zero\n+        mov      r3, #64\n+1:      vst1.8   {q0,q1}, [r0:256], r3\n+        subs     ip, #2\n+        vst1.8   {q0,q1}, [r2:256], r3\n+        bne      1b\n+        bx       lr\n+\n+2:      vst1.8   {q0,q1}, [r0:256]\n+        bx       lr\n+endfunc\n+\n+@ PIC jump tables are more expensive than absolute for A32 code\n+.set jent_pic, CONFIG_PIC || CONFIG_THUMB\n+\n+@ Jump table entry - if in neon mode the bottom bit must be set\n+@ ? There is probably a real asm instruction to do this but I haven't found it\n+.macro jent lab\n+.if jent_pic\n+T       .short ((0 + \\lab) - (0 + 98b)) / 2\n+A       .short (0 + \\lab) - (4 + 98b)\n+.else\n+T       .word   1 + \\lab\n+A       .word   \\lab\n+.endif\n+.endm\n+\n+.set expected_next, 0\n+\n+.macro cpy_compound val, p1, p2, drop_thru=0\n+.if \\p1 + \\p2 != \\val\n+.error \"Bad addition!  \\p1 + \\p2 != \\val\"\n+.endif\n+.if expected_next != 0 && expected_next != \\val\n+.error \"Drop thru failure\"\n+.endif\n+\\val\\():\n+        push       {r0-r3}\n+        bl          100\\p1\\()b\n+        pop        {r0-r3}\n+        add         r0, #\\p1\n+        add         r2, #\\p1\n+.if \\drop_thru == 0\n+        b           \\p2\\()b\n+.set expected_next, 0\n+.else\n+.set expected_next, \\p2\n+.endif\n+.endm\n+\n+@ ff_hevc_cpy_blks8x4_neon(\n+@   dst         [r0]\n+@   dst_stride  [r1]\n+@   src         [r2]\n+@   src_stride  [r3]\n+@   width       [sp, #0] (bytes)\n+@   height)     [sp, #4]\n+@\n+@ Power of 2 widths are directly coded, all others are done in stripes\n+@ We expect the vast majority of calls to be power of 2\n+@\n+@ Currently has min width of 8, but we could make that 4 without issue\n+@ Min height is 4\n+\n+function ff_hevc_rpi_cpy_blks8x4_neon, export=1\n+        ldr         r12, [sp, #0]\n+        push       {r11, lr}\n+.if jent_pic\n+A       adr         lr,  98f - 2\n+.else\n+A       adr         lr,  98f - 4\n+.endif\n+        lsr         r12, #3\n+        ldr         r11, [sp, #(8 + 4)]\n+.if jent_pic\n+A       lsl         r12, #1\n+A       ldrsh       lr,  [lr,  r12]\n+A       add         pc,  lr\n+T       tbh         [pc, r12, lsl #1]\n+.else\n+        @ A32 only, Thumb is always PIC\n+        ldr         pc,  [lr,  r12, lsl #2]\n+.endif\n+\n+98:\n+T       .short      0 @ unused\n+        jent        8f\n+        jent        16f\n+        jent        24f\n+        jent        32f\n+        jent        40f\n+        jent        48f\n+        jent        56f\n+        jent        64f\n+        jent        72f\n+        jent        80f\n+        jent        88f\n+        jent        96f\n+        jent        104f\n+        jent        112f\n+        jent        120f\n+        jent        128f\n+\n+1008:\n+        push       {r11, lr}\n+8:\n+        add         lr,  r2,  r3\n+        lsl         r3,  #1\n+        add         r12, r0,  r1\n+        lsl         r1,  #1\n+1:\n+        vld1.32    {d0 }, [r2],  r3\n+        vld1.32    {d1 }, [lr],  r3\n+        vld1.32    {d2 }, [r2],  r3\n+        vld1.32    {d3 }, [lr],  r3\n+        subs        r11,  #4\n+        vst1.32    {d0 }, [r0],  r1\n+        vst1.32    {d1 }, [r12], r1\n+        vst1.32    {d2 }, [r0],  r1\n+        vst1.32    {d3 }, [r12], r1\n+        bgt         1b\n+        pop        {r11, pc}\n+\n+10016:\n+        push       {r11, lr}\n+16:\n+        add         lr,  r2,  r3\n+        lsl         r3,  #1\n+        add         r12, r0,  r1\n+        lsl         r1,  #1\n+1:\n+        vld1.32    {q0 }, [r2],  r3\n+        vld1.32    {q1 }, [lr],  r3\n+        vld1.32    {q2 }, [r2],  r3\n+        vld1.32    {q3 }, [lr],  r3\n+        subs        r11, #4\n+        vst1.32    {q0 }, [r0],  r1\n+        vst1.32    {q1 }, [r12], r1\n+        vst1.32    {q2 }, [r0],  r1\n+        vst1.32    {q3 }, [r12], r1\n+        bgt         1b\n+        pop        {r11, pc}\n+\n+10032:\n+        push       {r11, lr}\n+32:\n+        add         lr,  r2,  r3\n+        lsl         r3,  #1\n+        add         r12, r0,  r1\n+        lsl         r1,  #1\n+1:\n+        vld1.32    {q8,  q9 }, [r2],  r3\n+        vld1.32    {q10, q11}, [lr],  r3\n+        vld1.32    {q12, q13}, [r2],  r3\n+        vld1.32    {q14, q15}, [lr],  r3\n+        subs        r11, #4\n+        vst1.32    {q8,  q9 }, [r0],  r1\n+        vst1.32    {q10, q11}, [r12], r1\n+        vst1.32    {q12, q13}, [r0],  r1\n+        vst1.32    {q14, q15}, [r12], r1\n+        bgt         1b\n+        pop        {r11, pc}\n+\n+10064:\n+        push       {r11, lr}\n+64:\n+        add         lr,  r2,  #32\n+        add         r12, r0,  #32\n+1:\n+        vld1.32    {q8,  q9 }, [r2],  r3\n+        vld1.32    {q10, q11}, [lr],  r3\n+        vld1.32    {q12, q13}, [r2],  r3\n+        vld1.32    {q14, q15}, [lr],  r3\n+        subs        r11, #2\n+        vst1.32    {q8,  q9 }, [r0],  r1\n+        vst1.32    {q10, q11}, [r12], r1\n+        vst1.32    {q12, q13}, [r0],  r1\n+        vst1.32    {q14, q15}, [r12], r1\n+        bgt         1b\n+        pop        {r11, pc}\n+\n+128:\n+        push       {r4, r5}\n+        @ We could do this with fewer registers if we jump around but I\n+        @ have a primative urge to load sequentially\n+        mov         r4,  #64\n+        add         lr,  r2,  #32\n+        add         r12, r0,  #32\n+        sub         r3,  r4\n+        sub         r1,  r4\n+1:\n+        vld1.32    {q8,  q9 }, [r2],  r4\n+        vld1.32    {q10, q11}, [lr],  r4\n+        vld1.32    {q12, q13}, [r2],  r3\n+        vld1.32    {q14, q15}, [lr],  r3\n+        subs        r11, #1\n+        vst1.32    {q8,  q9 }, [r0],  r4\n+        vst1.32    {q10, q11}, [r12], r4\n+        vst1.32    {q12, q13}, [r0],  r1\n+        vst1.32    {q14, q15}, [r12], r1\n+        bgt         1b\n+        pop        {r4, r5, r11, pc}\n+\n+@ Use drop_thru where we can\n+cpy_compound 104, 64, 40, 1\n+cpy_compound 40, 32, 8\n+\n+cpy_compound 112, 64, 48, 1\n+cpy_compound 48, 32, 16\n+\n+cpy_compound 120, 64, 56, 1\n+cpy_compound 56, 32, 24, 1\n+cpy_compound 24, 16, 8\n+\n+cpy_compound 72, 64, 8\n+cpy_compound 80, 64, 16\n+cpy_compound 88, 64, 24\n+cpy_compound 96, 64, 32\n+\n+\n+endfunc\n+\ndiff --git a/libavcodec/arm/rpi_hevc_misc_neon.h b/libavcodec/arm/rpi_hevc_misc_neon.h\nnew file mode 100644\nindex 0000000000..9d21f6a882\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevc_misc_neon.h\n@@ -0,0 +1,438 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#ifndef AVCODEC_ARM_RPI_HEVC_MISC_H\n+#define AVCODEC_ARM_RPI_HEVC_MISC_H\n+\n+#include \"config.h\"\n+#if HAVE_NEON_INLINE && !CONFIG_THUMB\n+\n+static av_noinline void ff_hevc_rpi_copy_vert_v2h_neon(uint8_t *dst, const uint8_t *src,\n+                                                       int pixel_shift, int height,\n+                                                       ptrdiff_t stride_src)\n+{\n+    const uint8_t *src2 = src + stride_src;\n+    stride_src <<= 1;\n+    switch (pixel_shift)\n+    {\n+        case 2:\n+            __asm__ volatile (\n+                \"vld1.32     {d0[0]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.32     {d0[1]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vld1.32     {d1[0]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"subs        %[height], #4                     \\n\\t\"\n+                \"vld1.32     {d1[1]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"beq         2f                                \\n\\t\"\n+                \"1:                                            \\n\\t\"\n+                \"vld1.32     {d2[0]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.32     {d2[1]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vld1.32     {d3[0]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.32     {d3[1]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"subs        %[height], #4                     \\n\\t\"\n+                \"vst1.32     {q0}, [%[dst]]!                   \\n\\t\"\n+                \"beq         3f                                \\n\\t\"\n+                \"vld1.32     {d0[0]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.32     {d0[1]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vld1.32     {d1[0]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.32     {d1[1]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"subs        %[height], #4                     \\n\\t\"\n+                \"vst1.32     {q1}, [%[dst]]!                   \\n\\t\"\n+                \"bne         1b                                \\n\\t\"\n+                \"2:                                            \\n\\t\"\n+                \"vst1.32     {q0}, [%[dst]]                    \\n\\t\"\n+                \"b           4f                                \\n\\t\"\n+                \"3:                                            \\n\\t\"\n+                \"vst1.32     {q1}, [%[dst]]                    \\n\\t\"\n+                \"4:                                            \\n\\t\"\n+                :  // Outputs\n+                           [src]\"+r\"(src),\n+                          [src2]\"+r\"(src2),\n+                           [dst]\"+r\"(dst),\n+                        [height]\"+r\"(height)\n+                :  // Inputs\n+                    [stride_src]\"r\"(stride_src)\n+                :  // Clobbers\n+                    \"cc\", \"memory\"\n+            );\n+            break;\n+        case 1:\n+            __asm__ volatile (\n+                \"vld1.16     {d0[0]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.16     {d1[0]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vld1.16     {d0[1]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"subs        %[height], #4                     \\n\\t\"\n+                \"vld1.16     {d1[1]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"beq         2f                                \\n\\t\"\n+                \"1:                                            \\n\\t\"\n+                \"vld1.16     {d2[0]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.16     {d3[0]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vld1.16     {d2[1]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.16     {d3[1]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vzip.16     d0, d1                            \\n\\t\"\n+                \"subs        %[height], #4                     \\n\\t\"\n+                \"vst1.16     {d0}, [%[dst]]!                   \\n\\t\"\n+                \"beq         3f                                \\n\\t\"\n+                \"vld1.16     {d0[0]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.16     {d1[0]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vld1.16     {d0[1]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.16     {d1[1]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vzip.16     d2, d3                            \\n\\t\"\n+                \"subs        %[height], #4                     \\n\\t\"\n+                \"vst1.16     {d2}, [%[dst]]!                   \\n\\t\"\n+                \"bne         1b                                \\n\\t\"\n+                \"2:                                            \\n\\t\"\n+                \"vzip.16     d0, d1                            \\n\\t\"\n+                \"vst1.16     {d0}, [%[dst]]                    \\n\\t\"\n+                \"b           4f                                \\n\\t\"\n+                \"3:                                            \\n\\t\"\n+                \"vzip.16     d2, d3                            \\n\\t\"\n+                \"vst1.16     {d2}, [%[dst]]                    \\n\\t\"\n+                \"4:                                            \\n\\t\"\n+                :  // Outputs\n+                           [src]\"+r\"(src),\n+                          [src2]\"+r\"(src2),\n+                           [dst]\"+r\"(dst),\n+                        [height]\"+r\"(height)\n+                :  // Inputs\n+                    [stride_src]\"r\"(stride_src)\n+                :  // Clobbers\n+                    \"cc\", \"memory\"\n+            );\n+            break;\n+        default:\n+            __asm__ volatile (\n+                \"vld1.8      {d0[0]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.8      {d1[0]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vld1.8      {d0[1]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.8      {d1[1]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vld1.8      {d0[2]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.8      {d1[2]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vld1.8      {d0[3]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"subs        %[height], #8                     \\n\\t\"\n+                \"vld1.8      {d1[3]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"beq         2f                                \\n\\t\"\n+                \"1:                                            \\n\\t\"\n+                \"vld1.8      {d2[0]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.8      {d3[0]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vld1.8      {d2[1]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.8      {d3[1]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vld1.8      {d2[2]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.8      {d3[2]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vld1.8      {d2[3]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.8      {d3[3]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vzip.8      d0, d1                            \\n\\t\"\n+                \"subs        %[height], #8                     \\n\\t\"\n+                \"vst1.8      {d0}, [%[dst]]!                   \\n\\t\"\n+                \"beq         3f                                \\n\\t\"\n+                \"vld1.8      {d0[0]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.8      {d1[0]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vld1.8      {d0[1]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.8      {d1[1]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vld1.8      {d0[2]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.8      {d1[2]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vld1.8      {d0[3]}, [%[src]], %[stride_src]  \\n\\t\"\n+                \"vld1.8      {d1[3]}, [%[src2]], %[stride_src] \\n\\t\"\n+                \"vzip.8      d2, d3                            \\n\\t\"\n+                \"subs        %[height], #8                     \\n\\t\"\n+                \"vst1.8      {d2}, [%[dst]]!                   \\n\\t\"\n+                \"bne         1b                                \\n\\t\"\n+                \"2:                                            \\n\\t\"\n+                \"vzip.8      d0, d1                            \\n\\t\"\n+                \"vst1.8      {d0}, [%[dst]]                    \\n\\t\"\n+                \"b           4f                                \\n\\t\"\n+                \"3:                                            \\n\\t\"\n+                \"vzip.8      d2, d3                            \\n\\t\"\n+                \"vst1.8      {d2}, [%[dst]]                    \\n\\t\"\n+                \"4:                                            \\n\\t\"\n+                :  // Outputs\n+                           [src]\"+r\"(src),\n+                          [src2]\"+r\"(src2),\n+                           [dst]\"+r\"(dst),\n+                        [height]\"+r\"(height)\n+                :  // Inputs\n+                    [stride_src]\"r\"(stride_src)\n+                :  // Clobbers\n+                    \"cc\", \"memory\"\n+            );\n+            break;\n+    }\n+}\n+\n+static av_noinline void ff_hevc_rpi_copy_vert_h2v_neon(uint8_t *dst, const uint8_t *src,\n+                                                       int pixel_shift, int height,\n+                                                      ptrdiff_t stride_dst)\n+{\n+    uint8_t *dst2 = dst + stride_dst;\n+    stride_dst <<= 1;\n+    switch (pixel_shift)\n+    {\n+        case 2:\n+            __asm__ volatile (\n+                \"subs        %[height], #4                     \\n\\t\"\n+                \"vld1.32     {q0}, [%[src]]!                   \\n\\t\"\n+                \"beq         2f                                \\n\\t\"\n+                \"1:                                            \\n\\t\"\n+                \"vld1.32     {q1}, [%[src]]!                   \\n\\t\"\n+                \"vst1.32     {d0[0]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.32     {d0[1]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.32     {d1[0]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"subs        %[height], #4                     \\n\\t\"\n+                \"vst1.32     {d1[1]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"beq         3f                                \\n\\t\"\n+                \"vld1.32     {q0}, [%[src]]!                   \\n\\t\"\n+                \"vst1.32     {d2[0]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.32     {d2[1]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.32     {d3[0]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"subs        %[height], #4                     \\n\\t\"\n+                \"vst1.32     {d3[1]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"bne         1b                                \\n\\t\"\n+                \"2:                                            \\n\\t\"\n+                \"vst1.32     {d0[0]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.32     {d0[1]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.32     {d1[0]}, [%[dst]]                 \\n\\t\"\n+                \"vst1.32     {d1[1]}, [%[dst2]]                \\n\\t\"\n+                \"b           4f                                \\n\\t\"\n+                \"3:                                            \\n\\t\"\n+                \"vst1.32     {d2[0]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.32     {d2[1]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.32     {d3[0]}, [%[dst]]                 \\n\\t\"\n+                \"vst1.32     {d3[1]}, [%[dst2]]                \\n\\t\"\n+                \"4:                                            \\n\\t\"\n+                :  // Outputs\n+                           [dst]\"+r\"(dst),\n+                          [dst2]\"+r\"(dst2),\n+                           [src]\"+r\"(src),\n+                        [height]\"+r\"(height)\n+                :  // Inputs\n+                    [stride_dst]\"r\"(stride_dst)\n+                :  // Clobbers\n+                    \"cc\", \"memory\"\n+            );\n+            break;\n+        case 1:\n+            __asm__ volatile (\n+                \"subs        %[height], #4                     \\n\\t\"\n+                \"vld1.16     {d0}, [%[src]]!                   \\n\\t\"\n+                \"beq         2f                                \\n\\t\"\n+                \"1:                                            \\n\\t\"\n+                \"vld1.16     {d2}, [%[src]]!                   \\n\\t\"\n+                \"vst1.16     {d0[0]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.16     {d0[1]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.16     {d0[2]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"subs        %[height], #4                     \\n\\t\"\n+                \"vst1.16     {d0[3]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"beq         3f                                \\n\\t\"\n+                \"vld1.16     {d0}, [%[src]]!                   \\n\\t\"\n+                \"vst1.16     {d2[0]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.16     {d2[1]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.16     {d2[2]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"subs        %[height], #4                     \\n\\t\"\n+                \"vst1.16     {d2[3]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"bne         1b                                \\n\\t\"\n+                \"2:                                            \\n\\t\"\n+                \"vst1.16     {d0[0]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.16     {d0[1]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.16     {d0[2]}, [%[dst]]                 \\n\\t\"\n+                \"vst1.16     {d0[3]}, [%[dst2]]                \\n\\t\"\n+                \"b           4f                                \\n\\t\"\n+                \"3:                                            \\n\\t\"\n+                \"vst1.16     {d2[0]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.16     {d2[1]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.16     {d2[2]}, [%[dst]]                 \\n\\t\"\n+                \"vst1.16     {d2[3]}, [%[dst2]]                \\n\\t\"\n+                \"4:                                            \\n\\t\"\n+                :  // Outputs\n+                           [dst]\"+r\"(dst),\n+                          [dst2]\"+r\"(dst2),\n+                           [src]\"+r\"(src),\n+                        [height]\"+r\"(height)\n+                :  // Inputs\n+                    [stride_dst]\"r\"(stride_dst)\n+                :  // Clobbers\n+                    \"cc\", \"memory\"\n+            );\n+            break;\n+        default:\n+            __asm__ volatile (\n+                \"subs        %[height], #8                     \\n\\t\"\n+                \"vld1.8      {d0}, [%[src]]!                   \\n\\t\"\n+                \"beq         2f                                \\n\\t\"\n+                \"1:                                            \\n\\t\"\n+                \"vld1.8      {d2}, [%[src]]!                   \\n\\t\"\n+                \"vst1.8      {d0[0]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.8      {d0[1]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.8      {d0[2]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.8      {d0[3]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.8      {d0[4]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.8      {d0[5]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.8      {d0[6]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"subs        %[height], #8                     \\n\\t\"\n+                \"vst1.8      {d0[7]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"beq         3f                                \\n\\t\"\n+                \"vld1.8      {d0}, [%[src]]!                   \\n\\t\"\n+                \"vst1.8      {d2[0]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.8      {d2[1]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.8      {d2[2]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.8      {d2[3]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.8      {d2[4]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.8      {d2[5]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.8      {d2[6]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"subs        %[height], #8                     \\n\\t\"\n+                \"vst1.8      {d2[7]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"bne         1b                                \\n\\t\"\n+                \"2:                                            \\n\\t\"\n+                \"vst1.8      {d0[0]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.8      {d0[1]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.8      {d0[2]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.8      {d0[3]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.8      {d0[4]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.8      {d0[5]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.8      {d0[6]}, [%[dst]]                 \\n\\t\"\n+                \"vst1.8      {d0[7]}, [%[dst2]]                \\n\\t\"\n+                \"b           4f                                \\n\\t\"\n+                \"3:                                            \\n\\t\"\n+                \"vst1.8      {d2[0]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.8      {d2[1]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.8      {d2[2]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.8      {d2[3]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.8      {d2[4]}, [%[dst]], %[stride_dst]  \\n\\t\"\n+                \"vst1.8      {d2[5]}, [%[dst2]], %[stride_dst] \\n\\t\"\n+                \"vst1.8      {d2[6]}, [%[dst]]                 \\n\\t\"\n+                \"vst1.8      {d2[7]}, [%[dst2]]                \\n\\t\"\n+                \"4:                                            \\n\\t\"\n+                :  // Outputs\n+                           [dst]\"+r\"(dst),\n+                          [dst2]\"+r\"(dst2),\n+                           [src]\"+r\"(src),\n+                        [height]\"+r\"(height)\n+                :  // Inputs\n+                    [stride_dst]\"r\"(stride_dst)\n+                :  // Clobbers\n+                    \"cc\", \"memory\"\n+            );\n+            break;\n+    }\n+}\n+\n+static av_noinline void ff_hevc_rpi_copy_vert_v2v_neon(uint8_t *dst, const uint8_t *src,\n+                                                       int pixel_shift, int height,\n+                                                       ptrdiff_t stride_dst, ptrdiff_t stride_src)\n+{\n+    int x, y;\n+    switch (pixel_shift)\n+    {\n+        case 2:\n+            __asm__ volatile (\n+                \"ldr         %[x], [%[src]], %[stride_src] \\n\\t\"\n+                \"ldr         %[y], [%[src]], %[stride_src] \\n\\t\"\n+                \"str         %[x], [%[dst]], %[stride_dst] \\n\\t\"\n+                \"sub         %[height], #2                 \\n\\t\"\n+                \"1:                                        \\n\\t\"\n+                \"ldr         %[x], [%[src]], %[stride_src] \\n\\t\"\n+                \"str         %[y], [%[dst]], %[stride_dst] \\n\\t\"\n+                \"ldr         %[y], [%[src]], %[stride_src] \\n\\t\"\n+                \"subs        %[height], #2                 \\n\\t\"\n+                \"str         %[x], [%[dst]], %[stride_dst] \\n\\t\"\n+                \"bne         1b                            \\n\\t\"\n+                \"str         %[y], [%[dst]]                \\n\\t\"\n+                :  // Outputs\n+                             [x]\"=&r\"(x),\n+                             [y]\"=&r\"(y),\n+                           [src]\"+r\"(src),\n+                           [dst]\"+r\"(dst),\n+                        [height]\"+r\"(height)\n+                :  // Inputs\n+                    [stride_src]\"r\"(stride_src),\n+                    [stride_dst]\"r\"(stride_dst)\n+                :  // Clobbers\n+                    \"cc\", \"memory\"\n+            );\n+            break;\n+        case 1:\n+            __asm__ volatile (\n+                \"ldrh        %[x], [%[src]], %[stride_src] \\n\\t\"\n+                \"ldrh        %[y], [%[src]], %[stride_src] \\n\\t\"\n+                \"strh        %[x], [%[dst]], %[stride_dst] \\n\\t\"\n+                \"sub         %[height], #2                 \\n\\t\"\n+                \"1:                                        \\n\\t\"\n+                \"ldrh        %[x], [%[src]], %[stride_src] \\n\\t\"\n+                \"strh        %[y], [%[dst]], %[stride_dst] \\n\\t\"\n+                \"ldrh        %[y], [%[src]], %[stride_src] \\n\\t\"\n+                \"subs        %[height], #2                 \\n\\t\"\n+                \"strh        %[x], [%[dst]], %[stride_dst] \\n\\t\"\n+                \"bne         1b                            \\n\\t\"\n+                \"strh        %[y], [%[dst]]                \\n\\t\"\n+                :  // Outputs\n+                             [x]\"=&r\"(x),\n+                             [y]\"=&r\"(y),\n+                           [src]\"+r\"(src),\n+                           [dst]\"+r\"(dst),\n+                        [height]\"+r\"(height)\n+                :  // Inputs\n+                    [stride_src]\"r\"(stride_src),\n+                    [stride_dst]\"r\"(stride_dst)\n+                :  // Clobbers\n+                    \"cc\", \"memory\"\n+            );\n+            break;\n+        default:\n+            __asm__ volatile (\n+                \"ldrb        %[x], [%[src]], %[stride_src] \\n\\t\"\n+                \"ldrb        %[y], [%[src]], %[stride_src] \\n\\t\"\n+                \"strb        %[x], [%[dst]], %[stride_dst] \\n\\t\"\n+                \"sub         %[height], #2                 \\n\\t\"\n+                \"1:                                        \\n\\t\"\n+                \"ldrb        %[x], [%[src]], %[stride_src] \\n\\t\"\n+                \"strb        %[y], [%[dst]], %[stride_dst] \\n\\t\"\n+                \"ldrb        %[y], [%[src]], %[stride_src] \\n\\t\"\n+                \"subs        %[height], #2                 \\n\\t\"\n+                \"strb        %[x], [%[dst]], %[stride_dst] \\n\\t\"\n+                \"bne         1b                            \\n\\t\"\n+                \"strb        %[y], [%[dst]]                \\n\\t\"\n+                :  // Outputs\n+                             [x]\"=&r\"(x),\n+                             [y]\"=&r\"(y),\n+                           [src]\"+r\"(src),\n+                           [dst]\"+r\"(dst),\n+                        [height]\"+r\"(height)\n+                :  // Inputs\n+                    [stride_src]\"r\"(stride_src),\n+                    [stride_dst]\"r\"(stride_dst)\n+                :  // Clobbers\n+                    \"cc\", \"memory\"\n+            );\n+            break;\n+    }\n+}\n+\n+#define ff_hevc_rpi_copy_vert ff_hevc_rpi_copy_vert_neon\n+static inline void ff_hevc_rpi_copy_vert_neon(uint8_t *dst, const uint8_t *src,\n+                                              int pixel_shift, int height,\n+                                              ptrdiff_t stride_dst, ptrdiff_t stride_src)\n+{\n+    if (stride_dst == 1 << pixel_shift)\n+        ff_hevc_rpi_copy_vert_v2h_neon(dst, src, pixel_shift, height, stride_src);\n+    else if (stride_src == 1 << pixel_shift)\n+        ff_hevc_rpi_copy_vert_h2v_neon(dst, src, pixel_shift, height, stride_dst);\n+    else\n+        ff_hevc_rpi_copy_vert_v2v_neon(dst, src, pixel_shift, height, stride_dst, stride_src);\n+}\n+\n+#endif /* HAVE_NEON_INLINE */\n+\n+#endif /* AVCODEC_ARM_RPI_HEVC_MISC_H */\ndiff --git a/libavcodec/arm/rpi_hevc_mv_arm.h b/libavcodec/arm/rpi_hevc_mv_arm.h\nnew file mode 100644\nindex 0000000000..325c26a49b\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevc_mv_arm.h\n@@ -0,0 +1,93 @@\n+/*\n+Copyright (c) 2017 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Written by John Cox, Ben Avison\n+*/\n+\n+#ifndef AVCODEC_ARM_RPI_HEVC_MV_H\n+#define AVCODEC_ARM_RPI_HEVC_MV_H\n+\n+#if HAVE_ARMV6T2_INLINE\n+static inline MvXY mvxy_add_arm(const MvXY a, const MvXY b)\n+{\n+    MvXY r;\n+    __asm__ (\n+        \"sadd16    %[r], %[a], %[b]        \\n\\t\"\n+        : [r]\"=r\"(r)\n+        : [a]\"r\"(a),\n+          [b]\"r\"(b)\n+        :\n+        );\n+    return r;\n+}\n+#define mvxy_add mvxy_add_arm\n+#endif\n+\n+#if HAVE_ARMV6T2_INLINE\n+#if (defined(__ARM_ARCH_EXT_IDIV__) || defined (__ARM_FEATURE_IDIV))\n+static inline int32_t mv_scale_xy_arm(int32_t xy, int td, int tb)\n+{\n+    int t;\n+    __asm__ (\n+    \"ssat   %[td], #8,    %[td]          \\n\\t\"\n+    \"ssat   %[tb], #8,    %[tb]          \\n\\t\"\n+    \"eor    %[t],  %[td], %[td], asr #31 \\n\\t\"\n+    \"adds   %[t],  %[t],  %[td], lsr #31 \\n\\t\"\n+    \"asr    %[t],  #1                    \\n\\t\"\n+    \"add    %[t],  #0x4000               \\n\\t\"\n+    \"it ne                               \\n\\t\"\n+    \"sdivne %[t],  %[t],  %[td]          \\n\\t\"\n+    \"mov    %[td], #32                   \\n\\t\"\n+    \"smlabb %[td], %[t],  %[tb], %[td]   \\n\\t\"\n+    \"ssat   %[td], #13,   %[td], asr #6  \\n\\t\"\n+    \"mov    %[tb], #127                  \\n\\t\"\n+    \"smlatb %[t],  %[xy], %[td], %[tb]   \\n\\t\"\n+    \"smlabb %[tb], %[xy], %[td], %[tb]   \\n\\t\"\n+// This takes the sign of x & y for rounding at the \"wrong\" point\n+// (i.e. after adding 127) but for the range of values (-1,-127)\n+// where it does the wrong thing you get the right answer (0) anyway\n+    \"add    %[t],  %[t],  %[t],  lsr #31 \\n\\t\"\n+    \"add    %[xy], %[tb], %[tb], lsr #31 \\n\\t\"\n+    \"ssat   %[t],  #16,   %[t],  asr #8  \\n\\t\"\n+    \"ssat   %[xy], #16,   %[xy], asr #8  \\n\\t\"\n+    \"pkhbt  %[xy], %[xy], %[t],  lsl #16 \\n\\t\"\n+    :\n+         [t]\"=&r\"(t),\n+        [xy]\"+r\"(xy),\n+        [td]\"+r\"(td),\n+        [tb]\"+r\"(tb)\n+    :\n+    :\n+        \"cc\"\n+    );\n+    return xy;\n+}\n+#define mv_scale_xy mv_scale_xy_arm\n+#endif\n+#endif\n+\n+#endif // AVCODEC_ARM_RPI_HEVC_MV_H\n+\ndiff --git a/libavcodec/arm/rpi_hevcdsp_arm.h b/libavcodec/arm/rpi_hevcdsp_arm.h\nnew file mode 100644\nindex 0000000000..62b9326532\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcdsp_arm.h\n@@ -0,0 +1,26 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#ifndef AVCODEC_ARM_HEVCDSP_ARM_H\n+#define AVCODEC_ARM_HEVCDSP_ARM_H\n+\n+#include \"libavcodec/rpi_hevcdsp.h\"\n+\n+void ff_hevcdsp_rpi_init_neon(HEVCDSPContext *c, const int bit_depth);\n+\n+#endif /* AVCODEC_ARM_HEVCDSP_ARM_H */\ndiff --git a/libavcodec/arm/rpi_hevcdsp_deblock_neon.S b/libavcodec/arm/rpi_hevcdsp_deblock_neon.S\nnew file mode 100644\nindex 0000000000..88a3b4e5e7\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcdsp_deblock_neon.S\n@@ -0,0 +1,1634 @@\n+/*\n+ * Copyright (c) 2014 Seppo Tomperi <seppo.tomperi@vtt.fi>\n+ * Copyright (C) 2018 John Cox, Ben Avison for Raspberry Pi (Trading)\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1\n+ */\n+\n+\n+#include \"libavutil/arm/asm.S\"\n+#include \"neon.S\"\n+\n+.macro hevc_loop_filter_uv_body1 P1a, P0a, Q0a, Q1a, I1, I2, I3, I4, I5, I6, I7, I8\n+        vsubl.u8  q0, \\Q0a, \\P0a\n+        vsubl.u8  q1, \\P1a, \\Q1a\n+        vdup.16   d4, r2\n+        \\I1\n+        vshl.i16  q0, #2\n+        \\I2\n+        vadd.i16  q0, q1\n+        \\I3\n+        vmovl.u8  q2, d4\n+        \\I4\n+        vneg.s16  q1, q2\n+        \\I5\n+        vrshr.s16 q0, #3\n+        \\I6\n+        \\I7\n+        \\I8\n+        vmin.s16  q0, q2\n+        vmovl.u8  q2, \\Q0a\n+        vmax.s16  q0, q1\n+        vaddw.u8  q1, q0, \\P0a\n+        vsub.i16  q0, q2, q0\n+        vqmovun.s16 \\P0a, q1\n+        vqmovun.s16 \\Q0a, q0\n+.endm\n+\n+\n+.macro hevc_loop_filter_uv_body2 P1a, P1b, P0a, P0b, Q0a, Q0b, Q1a, Q1b, I1, I2, I3, I4, I5, I6, I7\n+        vsubl.u8  q0, \\Q0a, \\P0a  @ q0a - p0a\n+        lsr       r12, r2, #16\n+        vsubl.u8  q1, \\Q0b, \\P0b  @ q0b - p0b\n+        vsubl.u8  q2, \\P1a, \\Q1a  @ p1a - q1a\n+        vsubl.u8  q3, \\P1b, \\Q1b  @ p1b - q1b\n+        vshl.i16  q0, #2          @ (q0a - p0a) * 4\n+        vshl.i16  q1, #2          @ (q0b - p0b) * 4\n+        vadd.i16  q0, q2          @ ((q0a - p0a) * 4) + p1a - q1a\n+        vadd.i16  q1, q3          @ ((q0b - p0b) * 4) + p1b - q1b\n+        vdup.16   d4, r2          @ tc0a, tc0b\n+        vdup.16   d6, r12         @ tc1a, tc1b\n+        vrshr.s16 q0, #3          @ (((q0a - p0a) * 4) + p1a - q1a + 4) >> 3\n+        \\I1\n+        vrshr.s16 q1, #3          @ (((q0b - p0b) * 4) + p1b - q1b + 4) >> 3\n+        \\I2\n+        vmovl.u8  q2, d4          @ tc0a, tc0b\n+        \\I3\n+        vmovl.u8  q3, d6          @ tc1a, tc1b\n+        \\I4\n+        vmin.s16  q0, q2\n+        \\I5\n+        vneg.s16  q2, q2          @ -tc0a, -tc0b\n+        \\I6\n+        vmin.s16  q1, q3\n+        \\I7\n+        vneg.s16  q3, q3          @ -tc1a, -tc1b\n+        vmax.s16  q0, q2          @ delta0a\n+        vmovl.u8  q2, \\Q0a\n+        vmax.s16  q1, q3          @ delta0b\n+        vaddw.u8  q3, q0, \\P0a    @ p0a + delta0a\n+        vsub.i16  q0, q2, q0      @ q0a - delta0a\n+        vmovl.u8  q2, \\Q0b\n+        vsub.i16  q2, q1          @ q0b - delta0b\n+        vaddw.u8  q1, \\P0b        @ p0b + delta0b\n+        vqmovun.s16 \\Q0a, q0\n+        vqmovun.s16 \\P0a, q3\n+        vqmovun.s16 \\Q0b, q2\n+        vqmovun.s16 \\P0b, q1\n+.endm\n+\n+\n+@ Preserves r12\n+@ Clobbers r2\n+@ P0a et al all contain UVUVUVUV\n+@ r2 (tc4) contains\n+@   [0..7]   tc U a\n+@   [8..15]  tc V a\n+\n+.macro hevc_loop_filter_uv_body1_16 P1a, P0a, Q0a, Q1a, bit_depth, I1, I2, I3, I4, I5, I6, I7, I8\n+        vsub.i16  q0, \\Q0a, \\P0a\n+        vsub.i16  q1, \\P1a, \\Q1a\n+        vdup.16   d4, r2\n+        \\I1\n+        vshl.i16  q0, #2\n+        \\I2\n+        vadd.i16  q0, q1\n+        \\I3\n+        vshll.u8  q2, d4, #\\bit_depth - 8\n+        \\I4\n+        vneg.s16  q1, q2\n+        \\I5\n+        vrshr.s16 q0, #3\n+        \\I6\n+        \\I7\n+        \\I8\n+        vmin.s16  q0, q2\n+        vmov.i16  q2, #0\n+        vmax.s16  q0, q1\n+        vadd.i16  \\P0a, q0\n+        vsub.i16  \\Q0a, q0\n+        vmov.i16  q1, #(1 << \\bit_depth) - 1\n+        vmax.s16  \\P0a, q2\n+        vmax.s16  \\Q0a, q2\n+        vmin.s16  \\P0a, q1\n+        vmin.s16  \\Q0a, q1\n+.endm\n+\n+@ Clobbers r2, r12\n+@ P0a et al all contain UVUVUVUV\n+@ r2 (tc4) contains\n+@   [0..7]   tc U a\n+@   [8..15]  tc V a\n+@  [16..23]  tc U b\n+@  [24..31]  tc V b\n+\n+.macro hevc_loop_filter_uv_body2_16 P1a, P1b, P0a, P0b, Q0a, Q0b, Q1a, Q1b, bit_depth, I1, I2, I3, I4, I5, I6, I7\n+        vsub.i16  q0, \\Q0a, \\P0a  @ q0a - p0a\n+        lsr       r12, r2, #16\n+        vsub.i16  q1, \\Q0b, \\P0b  @ q0b - p0b\n+        vsub.i16  q2, \\P1a, \\Q1a  @ p1a - q1a\n+        vsub.i16  q3, \\P1b, \\Q1b  @ p1b - q1b\n+        vshl.i16  q0, #2          @ (q0a - p0a) * 4\n+        vshl.i16  q1, #2          @ (q0b - p0b) * 4\n+        vadd.i16  q0, q2          @ ((q0a - p0a) * 4) + p1a - q1a\n+        vadd.i16  q1, q3          @ ((q0b - p0b) * 4) + p1b - q1b\n+        vdup.16   d4, r2          @ tc0a, tc0b\n+        vdup.16   d6, r12         @ tc1a, tc1b\n+        vrshr.s16 q0, #3          @ (((q0a - p0a) * 4) + p1a - q1a + 4) >> 3\n+        \\I1\n+        vrshr.s16 q1, #3          @ (((q0b - p0b) * 4) + p1b - q1b + 4) >> 3\n+        \\I2\n+        vshll.u8  q2, d4, #\\bit_depth - 8 @ tc0a, tc0b\n+        \\I3\n+        vshll.u8  q3, d6, #\\bit_depth - 8 @ tc1a, tc1b\n+        \\I4\n+        vmin.s16  q0, q2\n+        \\I5\n+        vneg.s16  q2, q2          @ -tc0a, -tc0b\n+        \\I6\n+        vmin.s16  q1, q3\n+        \\I7\n+        vneg.s16  q3, q3          @ -tc1a, -tc1b\n+        vmax.s16  q0, q2          @ delta0a\n+        vadd.i16  \\P0a, q0        @ p0a + delta0a\n+        vsub.i16  \\Q0a, q0        @ q0a - delta0a\n+        vmax.s16  q1, q3          @ delta0b\n+        vadd.i16  \\P0b, q1        @ p0b + delta0b\n+        vsub.i16  \\Q0b, q1        @ q0b - delta0b\n+        vmov.i16  q2, #0\n+        vmov.i16  q3, #(1 << \\bit_depth) - 1\n+        vmax.s16  \\P0a, q2\n+        vmax.s16  \\Q0a, q2\n+        vmax.s16  \\P0b, q2\n+        vmax.s16  \\Q0b, q2\n+        vmin.s16  \\P0a, q3\n+        vmin.s16  \\Q0a, q3\n+        vmin.s16  \\P0b, q3\n+        vmin.s16  \\Q0b, q3\n+.endm\n+\n+\n+\n+@   uint8_t *_no_p,     [sp+0]\n+@   uint8_t *_no_q)     [sp+4]\n+\n+.macro hevc_loop_filter_luma_start\n+        ldr     r12, [r3]\n+        ldr      r3, [r3, #4]\n+        orrs     r3, r12, r3, lsl #16\n+        it       eq\n+        bxeq     lr\n+        push     {r4-r10,lr}            @ 32 bytes\n+        ldrd     r4, r5, [sp, #32]      @ &_no_p\n+        ldrb     r4, [r4]\n+        ldrb     r5, [r5]\n+        movs     r10, r4\n+        it ne\n+        movne    r10, #1\n+        cmp      r5, #0\n+        it ne\n+        orrne    r10, #2\n+.endm\n+\n+@ Input:\n+@  r2          beta    (raw: needs shift for bitdepth > 8)\n+@  r3[ 0:15]   tc[0]   (raw: needs shift for bitdepth > 8)\n+@  r3[16:31]   tc[1]   (raw: needs shift for bitdepth > 8)\n+@\n+@ Input & output\n+@  8-bit: d16-d23      (Q3,Q2,Q1,Q0,P0,P1,P2,P3)\n+@ 16-bit:  q8-q15\n+@\n+@  r1         -r1\n+@  r10        b1->C, b0->N  (r10 junk)\n+@\n+@ Junks:\n+@  r5, r6, r7, r8, r9\n+\n+.macro m_filter_luma bit_depth, Q11, Q15\n+.if \\bit_depth == 8\n+        vmovl.u8    q14, d22      @ q2,7 q2,6 ... q2,0 = TQ2' ... Q2' TQ2 ... Q2\n+        vmovl.u8    q13, d21      @ q1,7 q1,6 ... q1,0 = TQ1' ... Q1' TQ1 ... Q1\n+        vmovl.u8    q12, d20      @ q0,7 q0,6 ... q0,0 = TQ0' ... Q0' TQ0 ... Q0\n+        vmovl.u8    \\Q11, d19     @ p0,7 p0,6 ... p0,0 = TP0' ... P0' TP0 ... P0\n+        vmovl.u8    q10, d18      @ p1,7 p1,6 ... p1,0 = TP1' ... P1' TP1 ... P1\n+        vmovl.u8    q9, d17       @ p2,7 p2,6 ... p2,0 = TP2' ... P2' TP2 ... P2\n+.endif\n+        vadd.i16    q0, q9, \\Q11  @ P2 + P0\n+.if \\bit_depth > 8\n+        lsl         r3, r3, #(\\bit_depth - 8)\n+.endif\n+        vadd.i16    q1, q14, q12  @ Q2 + Q0\n+.if \\bit_depth > 8\n+        lsl         r2, r2, #(\\bit_depth - 8)\n+.endif\n+        vsub.i16    q0, q10       @ P2 - P1 + P0\n+        lsr         r5, r3, #16\n+        vsub.i16    q1, q13       @ Q2 - Q1 + Q0\n+.if \\bit_depth == 8\n+        vmovl.u8    q8, d16       @ p3,7 p3,6 ... p3,0 = TP3' ... P3' TP3 ... P3\n+        vmovl.u8    \\Q15, d23     @ q3,7 q3,6 ... q3,0 = TQ3' ... Q3' TQ3 ... Q3\n+.endif\n+        vabd.s16    q0, q10       @ dp0 = abs(P2 - 2 * P1 + P0)\n+        vabd.s16    q1, q13       @ dq0 = abs(Q2 - 2 * Q1 + Q0)\n+        vmov.i64    q2, #0xffffffff0000\n+        vbic        q0, q2        @ only dp0(') and dp3(')\n+        vbic        q1, q2        @ only dq0(') and dq3(')\n+        vsra.u64    q0, #16\n+        vsra.u64    q1, #16\n+        vdup.16     q3, r2        @ beta\n+        vdup.16     d14, r3       @ tC[0]\n+        vdup.16     d15, r5       @ tC[1]\n+        vabd.s16    q4, q8, \\Q11  @ abs(TP3'-TP0' ... P3'-P0' TP3-TP0 ... P3-P0)\n+        vmovn.i32   d0, q0        @ dp3' dp0' dp3 dp0\n+        vmovn.i32   d1, q1        @ dq3' dq0' dq3 dq0\n+        vadd.i16    d5, d0, d1    @ d3'=dp3'+dq3' d0'=dp0'+dq0' d3=dp3+dq3 d0=dp0+dq0\n+        vabd.s16    q5, \\Q11, q12 @ abs(TP0'-TQ0' ... P0'-Q0' TP0-TQ0 ... P0-Q0)\n+        vaba.s16    q4, \\Q15, q12 @ +abs(TQ3'-TQ0' ... Q3'-Q0' TQ3-TQ0 ... Q3-Q0)\n+        vpadd.i16   d2, d5, d5    @ dontcare dontcare d0'+d3' d0+d3\n+        vshl.s16    q6, q7, #2    @ tC[] * 4\n+        vrhadd.s16  q6, q7        @ tc25 = (tc[] * 5 + 1) >> 1\n+        vcgt.s16    d2, d6, d2    @ if (d0 + d3 < beta)\n+        vmov        r7, s4        @ (d2) r7 = mask of blocks to apply filtering (16b/block)\n+        vshr.s16    q1, q3, #3    @ beta_3 = beta >> 3\n+        cmp         r7, #0\n+        beq         .Lbypasswrite\n+\n+        vcgt.s16    q5, q6, q5    @ if < tc25\n+        vcgt.s16    q4, q1, q4    @ if (abs({T}P[0-3]{'}-{T}P[0-3]{'})+abs({T}Q[0-3]{'}-{T}Q[0-3]{'}) < beta_3)\n+        vand        q4, q5\n+        vbic        d8, d4\n+        vbic        d9, d4\n+        vshr.s16    q3, #2        @ beta_2 = beta >> 2\n+        vsra.u64    q4, #16\n+        vshl.s16    d5, #1        @ d3'<<1 d0'<<1 d3<<1 d0<<1\n+        vshl.i16    q7, #1        @ tc2 = tC[] << 1\n+        vcgt.s16    d6, d5        @ if (d3'<<1 < beta_2) etc\n+        vmovn.i32   d8, q4        @ beta_3 && tc25 tests, prime block in ms half\n+        vand        d6, d8        @ && beta_2 tests, prime in ms half\n+        vpadd.i16   d0, d1        @ dq0'+dq3' dq0+dq3 dp0'+dp3' dp0+dp3\n+        vneg.s16    q6, q7        @ -tc2\n+        vmovn.i32   d8, q3\n+        vshrn.i32   d6, q3, #16\n+        vand        d6, d8\n+        vmov        r5, r6, d0    @ r5 = dp0'+dp3' dp0+dp3  r6 = dq0'+dq3' dq0+dq3\n+        vmov        r8, s12       @ (d6) r8 = mask of strong filtering blocks (16b/block)\n+        vadd.i16    q0, \\Q11, q12 @ p0 + q0\n+        ands        r9, r7, r8\n+        beq         1f\n+\n+        vadd.i16    q2, q0, q10   @ p1 + p0 + q0\n+        vadd.i16    q3, q0, q13   @ p0 + q0 + q1\n+        lsr         r3, r9, #16\n+        vadd.i16    q1, q2, q9    @ p2 + p1 + p0 + q0 (new P1 before clipping)\n+        vadd.i16    q4, q3, q14   @ p0 + q0 + q1 + q2 (new Q1 before clipping)\n+        vadd.i16    q0, q8, q9    @ p3 + p2\n+        vadd.i16    q5, \\Q15, q14 @ q2 + q3\n+        vadd.i16    q2, q1        @ p2 + 2 * p1 + 2 * p0 + 2 * q0\n+        vadd.i16    q3, q4        @ 2 * p0 + 2 * q0 + 2 * q1 + q2\n+        vshl.i16    q0, #1        @ 2 * p3 + 2 * p2\n+        vshl.i16    q5, #1        @ 2 * q2 + 2 * q3\n+        vadd.i16    q0, q1        @ 2 * p3 + 3 * p2 + p1 + p0 + q0 (new P2 before clipping)\n+        vadd.i16    q5, q4        @ p0 + q0 + q1 + 3 * q2 + 2 * q3 (new Q2 before clipping)\n+        vadd.i16    q2, q13       @ p2 + 2 * p1 + 2 * p0 + 2 * q0 + q1 (new P0 before clipping)\n+        vadd.i16    q3, q10       @ p1 + 2 * p0 + 2 * q0 + 2 * q1 + q2 (new Q0 before clipping)\n+        vrshr.s16   q0, #3        @ scale, with rounding\n+        vrshr.s16   q5, #3\n+        vrshr.s16   q1, #2\n+        vrshr.s16   q4, #2\n+        vrshr.s16   q2, #3\n+        vrshr.s16   q3, #3\n+        vsub.i16    q0, q9        @ find difference\n+        vsub.i16    q5, q14\n+        vsub.i16    q1, q10\n+        vsub.i16    q4, q13\n+        vsub.i16    q2, \\Q11\n+        vsub.i16    q3, q12\n+        vmax.s16    q0, q6        @ clip difference to -tc2 .. tc2\n+        vmax.s16    q5, q6\n+        vmax.s16    q1, q6\n+        vmax.s16    q4, q6\n+        vmax.s16    q2, q6\n+        vmax.s16    q3, q6\n+        vdup.16     d12, r9       @ expand mask, reuse q6 due to register pressure\n+        vdup.16     d13, r3\n+        vmin.s16    q0, q7\n+        vmin.s16    q5, q7\n+        vmin.s16    q1, q7\n+        vmin.s16    q4, q7\n+        vmin.s16    q2, q7\n+        vmin.s16    q3, q7\n+        vadd.i16    q0, q9        @ apply difference\n+        vadd.i16    q5, q14\n+        vadd.i16    q1, q10\n+        vadd.i16    q4, q13\n+        vadd.i16    q2, \\Q11\n+        vadd.i16    q3, q12\n+        vbit        q9, q0, q6    @ apply filtered values according to mask\n+        vbit        q14, q5, q6\n+        vbit        q10, q1, q6\n+        vbit        q13, q4, q6\n+        vbit        \\Q11, q2, q6\n+        vbit        q12, q3, q6\n+        vneg.s16    q6, q7        @ restore -tc2\n+\n+1:\n+        bics        r9, r7, r8\n+        beq         2f\n+\n+        vsub.i16    q0, q12, \\Q11 @ q0 - p0\n+        vsub.i16    q1, q13, q10  @ q1 - p1\n+        lsr         r3, r9, #16\n+        vshl.i16    q2, q0, #3\n+        lsr         r7, r5, #16\n+        vadd.i16    q3, q0, q2    @ 9 * (q0 - p0)\n+        lsr         r8, r6, #16\n+        vshl.i16    q2, q1, #1\n+        vadd.i16    q4, q1, q2    @ 3 * (q1 - p1)\n+        vshr.s16    q6, #1        @ -tc = -tc2 >> 1\n+        vsub.i16    q5, q3, q4\n+        vrhadd.s16  q1, q9, \\Q11  @ (p2 + p0 + 1) >> 1\n+        vrhadd.s16  q3, q14, q12  @ (q2 + q0 + 1) >> 1\n+        vrshr.s16   q5, #4        @ delta0 = (9 * (q0 - p0) - 3 * (q1 - p1) + 8) >> 4\n+        vsub.i16    q1, q10       @ ((p2 + p0 + 1) >> 1) - p1\n+        vsub.i16    q3, q13       @ ((q2 + q0 + 1) >> 1) - q1\n+        vmax.s16    q6, q5        @\n+        vshr.s16    q4, q7, #1    @ tc = tc2 >> 1\n+        vdup.16     q0, r2        @ beta\n+        vmin.s16    q6, q4        @ delta0 clamped to [-tc, tc]\n+        vshr.s16    q4, #1        @ tc_2 = tc >> 1\n+        vhadd.s16   q1, q6        @ (((p2 + p0 + 1) >> 1) - p1 + delta0) >> 1\n+        vhsub.s16   q3, q6        @ (((q2 + q0 + 1) >> 1) - q1 - delta0) >> 1\n+        vshr.s16    q2, q0, #1    @ beta >> 1\n+        vadd.i16    q2, q0        @ beta + (beta >> 1)\n+        vneg.s16    q0, q4        @ -tc_2\n+        vabs.s16    q5, q5        @ abs(original delta0)\n+        vshr.s16    q2, #3        @ (beta + (beta >> 1)) >> 3\n+        vmax.s16    q1, q0\n+        vmax.s16    q3, q0\n+        vshl.s16    q0, q7, #2    @ 8 * tc\n+        vadd.i16    q7, q0        @ 10 * tc\n+        vdup.16     d0, r9\n+        vdup.16     d1, r3        @ q0 = mask of blocks to apply filtering\n+        vmin.s16    q1, q4        @ deltap1 = av_clip((((p2 + p0 + 1) >> 1) - p1 + delta0) >> 1, -tc_2, tc_2)\n+        vmin.s16    q3, q4        @ deltaq1 = av_clip((((q2 + q0 + 1) >> 1) - q1 + delta0) >> 1, -tc_2, tc_2)\n+        vdup.16     d8, r5        @ dp0 + dp3\n+        vdup.16     d9, r7        @ dp0' + dp3'\n+        vcgt.s16    q7, q5        @ if ((10 * tc) > abs(delta0))\n+        vdup.16     d10, r6       @ dq0 + dq3\n+        vdup.16     d11, r8       @ dq0' + dq3'\n+        vand        q7, q0        @ AND block and line masks\n+        vcgt.s16    q4, q2, q4    @ if (((beta + (beta >> 1)) >> 3) > dp0 + dp3), i.e. if (nd_p > 1)\n+        vadd.i16    q0, q1, q10   @ p1 + deltap1\n+        vcgt.s16    q5, q2, q5    @ if (((beta + (beta >> 1)) >> 3) > dq0 + dq3), i.e. if (nd_q > 1)\n+        vadd.i16    q3, q3, q13   @ q1 + deltaq1\n+        vadd.i16    q1, \\Q11, q6  @ p0 + delta0\n+        vsub.i16    q2, q12, q6   @ q0 - delta0\n+        vand        q4, q7        @ AND nd_p test with block/line masks\n+        vand        q5, q7        @ AND nd_q test with block/line masks\n+        vbit        q10, q0, q4\n+        vbit        \\Q11, q1, q7\n+        vbit        q12, q2, q7\n+        vbit        q13, q3, q5\n+\n+2:\n+.if \\bit_depth == 8\n+        vmovn.i16 d16, q8\n+        vmovn.i16 d23, \\Q15\n+        neg       r1, r1\n+        vqmovun.s16 d17, q9\n+        vqmovun.s16 d18, q10\n+        vqmovun.s16 d19, \\Q11\n+        lsls      r10, #31\n+        vqmovun.s16 d20, q12\n+        vqmovun.s16 d21, q13\n+        vqmovun.s16 d22, q14\n+.else\n+        vmov.i16  q0, #0\n+        vmov.i16  q1, #(1 << \\bit_depth - 1)\n+        @ q8 & q15 should be unaltered and so don't require clipping\n+        neg       r1, r1\n+        vmax.s16  q9,  q0\n+        vmax.s16  q10, q0\n+        vmax.s16  q11, q0\n+        vmax.s16  q12, q0\n+        vmax.s16  q13, q0\n+        vmax.s16  q14, q0\n+        lsls      r10, #31\n+        vmin.s16  q9,  q1\n+        vmin.s16  q10, q1\n+        vmin.s16  q11, q1\n+        vmin.s16  q12, q1\n+        vmin.s16  q13, q1\n+        vmin.s16  q14, q1\n+.endif\n+        bx        lr\n+.endm\n+\n+function hevc_loop_filter_luma_body\n+        m_filter_luma 8, q15, q11\n+endfunc\n+\n+@ void ff_hevc_rpi_v_loop_filter_luma_neon_8(\n+@   uint8_t *_pix,      [r0]\n+@   ptrdiff_t _stride,  [r1]\n+@   int _beta,          [r2]\n+@   int *_tc,           [r3]\n+@   uint8_t *_no_p,     [sp+0]\n+@   uint8_t *_no_q)     [sp+4]\n+\n+function ff_hevc_rpi_v_loop_filter_luma_neon_8, export=1\n+        hevc_loop_filter_luma_start\n+\n+        sub      r4, r0, #4\n+        b        .Lv_loop_luma_common\n+endfunc\n+\n+@ void ff_hevc_rpi_v_loop_filter2_luma_neon(\n+@   uint8_t * pix_r,    [r0]\n+@   ptrdiff_t _stride,  [r1]\n+@   int _beta,          [r2]\n+@   int tc2,            [r3]\n+@   int no_f,           [sp+0]\n+@   uint8_t * pix_l)    [sp+4]\n+\n+function ff_hevc_rpi_v_loop_filter_luma2_neon_8, export=1\n+        cmp      r3, #0\n+        it       eq\n+        bxeq     lr\n+        push     {r4-r10,lr}            @ 32 bytes\n+        ldr      r4, [sp, #36]\n+        ldr      r10, [sp, #32]\n+\n+.Lv_loop_luma_common:\n+        vpush    {d8-d15}\n+\n+        @ It's slightly faster to do unlaned loads and transpose in the\n+        @ 8-bit case, even though it needs more instructions, because\n+        @ VLD4.8 is a really slow way to read from memory.\n+        vld1.32 {d16[0]}, [r4:32], r1\n+        vld1.32 {d20[0]}, [r0:32], r1\n+        vld1.32 {d16[1]}, [r4:32], r1\n+        vld1.32 {d20[1]}, [r0:32], r1\n+        vld1.32 {d17[0]}, [r4:32], r1\n+        vld1.32 {d21[0]}, [r0:32], r1\n+        vld1.32 {d17[1]}, [r4:32], r1\n+        vld1.32 {d21[1]}, [r0:32], r1\n+        vld1.32 {d18[0]}, [r4:32], r1\n+        vld1.32 {d22[0]}, [r0:32], r1\n+        vld1.32 {d18[1]}, [r4:32], r1\n+        vld1.32 {d22[1]}, [r0:32], r1\n+        vld1.32 {d19[0]}, [r4:32], r1\n+        vld1.32 {d23[0]}, [r0:32], r1\n+        vld1.32 {d19[1]}, [r4:32]\n+        vld1.32 {d23[1]}, [r0:32]\n+        vuzp.16 q8, q9\n+        vuzp.16 q10, q11\n+        vuzp.8  q8, q9\n+        vuzp.8  q10, q11\n+        vswp    d17, d18\n+        vswp    d21, d22\n+\n+        bl hevc_loop_filter_luma_body\n+\n+        add     r6, r4, r1\n+        add     r2, r0, r1\n+        lsl     r1, #1\n+\n+        vpop     {d8-d15}\n+\n+        @ no_p[1]\n+        bmi     1f\n+        vst4.8  {d16[7],d17[7],d18[7],d19[7]}, [r4:32], r1\n+        vst4.8  {d16[6],d17[6],d18[6],d19[6]}, [r6:32], r1\n+        vst4.8  {d16[5],d17[5],d18[5],d19[5]}, [r4:32], r1\n+        vst4.8  {d16[4],d17[4],d18[4],d19[4]}, [r6:32], r1\n+\n+        vst4.8  {d16[3],d17[3],d18[3],d19[3]}, [r4:32], r1\n+        vst4.8  {d16[2],d17[2],d18[2],d19[2]}, [r6:32], r1\n+        vst4.8  {d16[1],d17[1],d18[1],d19[1]}, [r4:32], r1\n+        vst4.8  {d16[0],d17[0],d18[0],d19[0]}, [r6:32]\n+1:\n+        @ no_q[1]\n+        bcs     1f\n+        vst4.8  {d20[7],d21[7],d22[7],d23[7]}, [r0:32], r1\n+        vst4.8  {d20[6],d21[6],d22[6],d23[6]}, [r2:32], r1\n+        vst4.8  {d20[5],d21[5],d22[5],d23[5]}, [r0:32], r1\n+        vst4.8  {d20[4],d21[4],d22[4],d23[4]}, [r2:32], r1\n+\n+        vst4.8  {d20[3],d21[3],d22[3],d23[3]}, [r0:32], r1\n+        vst4.8  {d20[2],d21[2],d22[2],d23[2]}, [r2:32], r1\n+        vst4.8  {d20[1],d21[1],d22[1],d23[1]}, [r0:32], r1\n+        vst4.8  {d20[0],d21[0],d22[0],d23[0]}, [r2:32]\n+1:\n+        pop      {r4-r10,pc}\n+\n+.Lbypasswrite:\n+        vpop     {d8-d15}\n+        pop      {r4-r10,pc}\n+endfunc\n+\n+.macro m_filter_v_luma_16 bit_depth\n+        vpush    {d8-d15}\n+\n+        @ Uses slightly fewer instructions to do laned loads than unlaned\n+        @ and transpose.  This also means that we can use the same code for\n+        @ both split & unsplit deblock\n+        vld4.16  {d16[0], d18[0], d20[0], d22[0]}, [r4], r1\n+        vld4.16  {d24[0], d26[0], d28[0], d30[0]}, [r0], r1\n+\n+        vld4.16  {d16[1], d18[1], d20[1], d22[1]}, [r4], r1\n+        vld4.16  {d24[1], d26[1], d28[1], d30[1]}, [r0], r1\n+\n+        vld4.16  {d16[2], d18[2], d20[2], d22[2]}, [r4], r1\n+        vld4.16  {d24[2], d26[2], d28[2], d30[2]}, [r0], r1\n+\n+        vld4.16  {d16[3], d18[3], d20[3], d22[3]}, [r4], r1\n+        vld4.16  {d24[3], d26[3], d28[3], d30[3]}, [r0], r1\n+\n+        vld4.16  {d17[0], d19[0], d21[0], d23[0]}, [r4], r1\n+        vld4.16  {d25[0], d27[0], d29[0], d31[0]}, [r0], r1\n+\n+        vld4.16  {d17[1], d19[1], d21[1], d23[1]}, [r4], r1\n+        vld4.16  {d25[1], d27[1], d29[1], d31[1]}, [r0], r1\n+\n+        vld4.16  {d17[2], d19[2], d21[2], d23[2]}, [r4], r1\n+        vld4.16  {d25[2], d27[2], d29[2], d31[2]}, [r0], r1\n+\n+        vld4.16  {d17[3], d19[3], d21[3], d23[3]}, [r4]\n+        vld4.16  {d25[3], d27[3], d29[3], d31[3]}, [r0]\n+\n+        bl hevc_loop_filter_luma_body_\\bit_depth\n+\n+        add      r6, r4, r1\n+        add      r2, r0, r1\n+        lsl      r1, #1\n+\n+        vpop     {d8-d15}\n+\n+        @ p[1]\n+        bmi      1f\n+        vst4.16  {d17[3], d19[3], d21[3], d23[3]}, [r4], r1\n+        vst4.16  {d17[2], d19[2], d21[2], d23[2]}, [r6], r1\n+        vst4.16  {d17[1], d19[1], d21[1], d23[1]}, [r4], r1\n+        vst4.16  {d17[0], d19[0], d21[0], d23[0]}, [r6], r1\n+        vst4.16  {d16[3], d18[3], d20[3], d22[3]}, [r4], r1\n+        vst4.16  {d16[2], d18[2], d20[2], d22[2]}, [r6], r1\n+        vst4.16  {d16[1], d18[1], d20[1], d22[1]}, [r4], r1\n+        vst4.16  {d16[0], d18[0], d20[0], d22[0]}, [r6]\n+1:\n+        @ q[1]\n+        bcs      1f\n+        vst4.16  {d25[3], d27[3], d29[3], d31[3]}, [r0], r1\n+        vst4.16  {d25[2], d27[2], d29[2], d31[2]}, [r2], r1\n+        vst4.16  {d25[1], d27[1], d29[1], d31[1]}, [r0], r1\n+        vst4.16  {d25[0], d27[0], d29[0], d31[0]}, [r2], r1\n+        vst4.16  {d24[3], d26[3], d28[3], d30[3]}, [r0], r1\n+        vst4.16  {d24[2], d26[2], d28[2], d30[2]}, [r2], r1\n+        vst4.16  {d24[1], d26[1], d28[1], d30[1]}, [r0], r1\n+        vst4.16  {d24[0], d26[0], d28[0], d30[0]}, [r2]\n+1:\n+        pop      {r4-r10,pc}\n+.endm\n+\n+\n+\n+\n+@ void (*hevc_h_loop_filter_luma)(uint8_t *pix,     [r0]\n+@                                 ptrdiff_t stride, [r1]\n+@                                 int beta,         [r2]\n+@                                 int32_t *tc,      [r3]\n+@                                 uint8_t *no_p,    sp[0]\n+@                                 uint8_t *no_q);   sp[4]\n+@\n+@ Src should always be on 8 byte boundry & all in the same slice\n+\n+function ff_hevc_rpi_h_loop_filter_luma_neon_8, export=1\n+        hevc_loop_filter_luma_start\n+        b        .Lh_loop_filter_luma_common_8\n+endfunc\n+\n+function ff_hevc_rpi_h_loop_filter_luma2_neon_8, export=1\n+        cmp      r3, #0\n+        it       eq\n+        bxeq     lr\n+        push     {r4-r10,lr}            @ 32 bytes\n+        ldr      r10, [sp, #32]\n+\n+.Lh_loop_filter_luma_common_8:\n+        sub      r4, r0, r1, lsl #2\n+        add      r0, r4, r1\n+        lsl      r1, #1\n+        vpush    {d8-d15}\n+\n+        vld1.8  {d16}, [r4], r1\n+        vld1.8  {d17}, [r0], r1\n+        vld1.8  {d18}, [r4], r1\n+        vld1.8  {d19}, [r0], r1\n+        vld1.8  {d20}, [r4], r1\n+        vld1.8  {d21}, [r0], r1\n+        vld1.8  {d22}, [r4]\n+        vld1.8  {d23}, [r0]\n+\n+        bl hevc_loop_filter_luma_body\n+\n+        add      r0, r0, r1, lsl #1\n+        add      r2, r4, r1, lsl #1\n+        add      r6, r4, r1, asr #1\n+        vpop     {d8-d15}\n+\n+        @ P2-P0\n+        bcs      1f\n+        vst1.8   {d22}, [r4], r1\n+        vst1.8   {d21}, [r6]\n+        vst1.8   {d20}, [r4]\n+1:\n+        @ Q0-Q2\n+        bmi      1f\n+        vst1.8   {d19}, [r0], r1\n+        vst1.8   {d18}, [r2]\n+        vst1.8   {d17}, [r0]\n+1:\n+        pop      {r4-r10,pc}\n+endfunc\n+\n+\n+.macro m_filter_h_luma_16 bit_depth\n+        sub      r4, r0, r1, lsl #2\n+        add      r0, r4, r1\n+        lsl      r1, #1\n+        vpush    {d8-d15}\n+\n+        vld1.16 { q8}, [r4], r1\n+        vld1.16 { q9}, [r0], r1\n+        vld1.16 {q10}, [r4], r1\n+        vld1.16 {q11}, [r0], r1\n+        vld1.16 {q12}, [r4], r1\n+        vld1.16 {q13}, [r0], r1\n+        vld1.16 {q14}, [r4]\n+        vld1.16 {q15}, [r0]\n+\n+        bl hevc_loop_filter_luma_body_\\bit_depth\n+\n+        add      r0, r0, r1, lsl #1\n+        add      r2, r4, r1, lsl #1\n+        add      r6, r4, r1, asr #1\n+        vpop     {d8-d15}\n+\n+        @ P2-P0\n+        bcs      1f\n+        vst1.16  {q14}, [r4], r1\n+        vst1.16  {q13}, [r6]\n+        vst1.16  {q12}, [r4]\n+1:\n+        bmi      1f\n+        vst1.16  {q11}, [r0], r1\n+        vst1.16  {q10}, [r2]\n+        vst1.16  { q9}, [r0]\n+1:\n+        pop      {r4-r10,pc}\n+.endm\n+\n+\n+@ void ff_hevc_rpi_h_loop_filter_uv_neon(uint8_t * src_r,        // r0\n+@                                     unsigned int stride,   // r1\n+@                                     uint32_t tc4,          // r2\n+@                                     unsigned int no_f);    // r3\n+@\n+@ no_f\n+@ 0  tl P0\n+@ 1  tr P1\n+@ 2  bl Q0\n+@ 3  br Q1\n+@\n+@ Probably not worth having the P/Qa only special case in this direction\n+@ Given layout we won't save any memory reads or avoid any cache dirtying\n+@ We would save a bit of computation but I expect the partials to be less\n+@ common in the H direction than V due to how we arrange deblock.\n+\n+function ff_hevc_rpi_h_loop_filter_uv_neon_8, export=1\n+        sub      r12, r0, r1\n+        cmp      r2, #0\n+        it eq\n+        bxeq     lr\n+        vld1.8   {d26,d27}, [r0]\n+        lsl      r1, #1\n+        sub      r0, r1\n+        vld1.8   {d18,d19}, [r12], r1\n+        vld1.8   {d16,d17}, [r0], r1\n+        vld1.8   {d28,d29}, [r12]\n+\n+        hevc_loop_filter_uv_body2 d16, d17, d18, d19, d26, d27, d28, d29, \\\n+        \"sub      r12, r0, r1, asr #1\"\n+\n+        lsls     r3, #29                @ b2 -> N, b3 -> C\n+        it pl\n+        vstrpl   d26, [r0, #0]\n+        it cc\n+        vstrcc   d27, [r0, #8]\n+        lsls     r3, #2                 @ b0 -> N, b1 -> C\n+        it pl\n+        vstrpl   d18, [r12, #0]\n+        it cc\n+        vstrcc   d19, [r12, #8]\n+        bx       lr\n+\n+endfunc\n+\n+\n+@ void ff_hevc_rpi_h_loop_filter_uv_neon_10(uint8_t * src_r,     // r0\n+@                                     unsigned int stride,   // r1\n+@                                     uint32_t tc4,          // r2\n+@                                     unsigned int no_f);    // r3\n+@\n+@ no-F = b0:no_p[0], b1:no_p[1], b2:no_q[0], b3:no_q[1]\n+@\n+@ Macro here actual function near bottom\n+\n+.macro m_filter_h_uv_16 bit_depth\n+        sub      r12, r0, r1\n+        cmp      r2, #0\n+        it eq\n+        bxeq     lr\n+        vld1.16  {q12, q13}, [r0]\n+        lsl      r1, #1\n+        sub      r0, r1\n+        vld1.16  {q10, q11}, [r12], r1\n+        vld1.16  {q8,  q9 }, [r0], r1\n+        vld1.16  {q14, q15}, [r12]\n+\n+        hevc_loop_filter_uv_body2_16  q8, q9, q10, q11, q12, q13, q14, q15, \\bit_depth, \\\n+        \"sub      r12, r0, r1, asr #1\", \\\n+        \"cmp      r3, #0\"\n+\n+        bne      1f\n+        vst1.16  {q10, q11}, [r12]\n+        vst1.16  {q12, q13}, [r0]\n+        bx       lr\n+\n+        @ At least one no_f bit is set\n+        @ Which means we need to break this apart in an ugly fashion\n+1:\n+        lsls     r3, #29                @ b2 -> N, b3 -> C\n+        itt pl\n+        vstrpl   d24, [r0, #0]\n+        vstrpl   d25, [r0, #8]\n+        itt cc\n+        vstrcc   d26, [r0, #16]\n+        vstrcc   d27, [r0, #24]\n+        lsls     r3, #2                 @ b0 -> N, b1 -> C\n+        itt pl\n+        vstrpl   d20, [r12, #0]\n+        vstrpl   d21, [r12, #8]\n+        itt cc\n+        vstrcc   d22, [r12, #16]\n+        vstrcc   d23, [r12, #24]\n+        bx       lr\n+.endm\n+\n+\n+@ void ff_hevc_rpi_v_loop_filter_uv2_neon(uint8_t * src_r,       // r0\n+@                                     unsigned int stride,   // r1\n+@                                     uint32_t tc4,          // r2\n+@                                     uint8_t * src_l,       // r3\n+@                                     unsigned int no_f);   // sp[0]\n+@\n+@ no_f:\n+@ 0  tl P0\n+@ 1  tr Q0\n+@ 2  bl P1\n+@ 3  br Q1\n+\n+function ff_hevc_rpi_v_loop_filter_uv2_neon_8, export=1\n+        cmp      r2, #0\n+        it eq\n+        bxeq     lr\n+        push     {lr}\n+        vld2.16  {d16[0], d18[0]}, [r3], r1\n+        vld2.16  {d20[0], d22[0]}, [r0], r1\n+\n+        cmp      r2, #0x10000\n+        vld2.16  {d16[1], d18[1]}, [r3], r1\n+        vld2.16  {d20[1], d22[1]}, [r0], r1\n+\n+        vld2.16  {d16[2], d18[2]}, [r3], r1\n+        vld2.16  {d20[2], d22[2]}, [r0], r1\n+\n+        vld2.16  {d16[3], d18[3]}, [r3], r1\n+        vld2.16  {d20[3], d22[3]}, [r0], r1\n+        blo      10f\n+\n+        vld2.16  {d17[0], d19[0]}, [r3], r1\n+        vld2.16  {d21[0], d23[0]}, [r0], r1\n+\n+        sub      ip, r0, r3\n+        vld2.16  {d17[1], d19[1]}, [r3], r1\n+        vld2.16  {d21[1], d23[1]}, [r0], r1\n+\n+        cmp      ip, #4\n+        vld2.16  {d17[2], d19[2]}, [r3], r1\n+        vld2.16  {d21[2], d23[2]}, [r0], r1\n+\n+        vld2.16  {d17[3], d19[3]}, [r3]\n+        vld2.16  {d21[3], d23[3]}, [r0]\n+\n+        hevc_loop_filter_uv_body2 d16, d17, d18, d19, d20, d21, d22, d23 \\\n+        \"ldr      lr, [sp, #4]\", \\\n+        \"neg      r1, r1\",       \\\n+        \"it eq; cmpeq lr, #0\",   \\\n+        \"add      r3, #2\",       \\\n+        \"add      ip, r3, r1\",   \\\n+        \"add      r2, r0, r1\",   \\\n+        \"lsl      r1, #1\"\n+\n+        bne      1f\n+\n+@ Much/most of the time r0 == r3 + 4 and no_f == 0\n+@ so it is worth having this special case\n+        vst2.16   {d19[3], d21[3]}, [r3], r1    @ P0b, Q0b\n+        vst2.16   {d19[2], d21[2]}, [ip], r1\n+        vst2.16   {d19[1], d21[1]}, [r3], r1\n+        vst2.16   {d19[0], d21[0]}, [ip], r1\n+        vst2.16   {d18[3], d20[3]}, [r3], r1    @ P0a, Q0a\n+        vst2.16   {d18[2], d20[2]}, [ip], r1\n+        vst2.16   {d18[1], d20[1]}, [r3]\n+        vst2.16   {d18[0], d20[0]}, [ip]\n+        pop       {pc}\n+\n+@ Either split or partial\n+1:\n+        lsls     lr, #29               @ b3 (Q0b) -> C, b2 (P0b) -> N & b31, b1 (Q0a) -> b30, b0 (P0a) -> b29\n+        ittt cs\n+        addcs    r0, r0, r1, lsl #1\n+        addcs    r2, r2, r1, lsl #1\n+        bcs      1f\n+        @ Q0b\n+        vst1.16  {d21[3]}, [r0], r1\n+        vst1.16  {d21[2]}, [r2], r1\n+        vst1.16  {d21[1]}, [r0], r1\n+        vst1.16  {d21[0]}, [r2], r1\n+1:\n+        ittt mi\n+        addmi    r3, r3, r1, lsl #1\n+        addmi    ip, ip, r1, lsl #1\n+        bmi      1f\n+        @ P0b\n+        vst1.16  {d19[3]}, [r3], r1\n+        vst1.16  {d19[2]}, [ip], r1\n+        vst1.16  {d19[1]}, [r3], r1\n+        vst1.16  {d19[0]}, [ip], r1\n+1:\n+        lsls     lr, #2                @ b30 (Q0a) -> C, b29 (P0a) -> N & b31\n+        bcs      1f\n+        @ Q0a\n+        vst1.16  {d20[3]}, [r0], r1\n+        vst1.16  {d20[2]}, [r2], r1\n+        vst1.16  {d20[1]}, [r0]\n+        vst1.16  {d20[0]}, [r2]\n+1:\n+        it       mi\n+        popmi    {pc}\n+        @ P0a\n+        vst1.16  {d18[3]}, [r3], r1\n+        vst1.16  {d18[2]}, [ip], r1\n+        vst1.16  {d18[1]}, [r3]\n+        vst1.16  {d18[0]}, [ip]\n+        pop      {pc}\n+\n+@ Single lump (rather than double)\n+10:\n+        @ As we have post inced r0/r3 in the load the easiest thing to do is\n+        @ to subtract and write forwards, rather than backwards (as above)\n+        @ b0 (P0a) -> N, b1 (Q0a) -> C\n+\n+        hevc_loop_filter_uv_body1 d16, d18, d20, d22 \\\n+        \"ldr      lr, [sp, #4]\",       \\\n+        \"add      r3, #2\",             \\\n+        \"sub      r0, r0, r1, lsl #2\", \\\n+        \"sub      r3, r3, r1, lsl #2\", \\\n+        \"lsls     lr, #31\",            \\\n+        \"add      r2, r0, r1\",         \\\n+        \"add      ip, r3, r1\",         \\\n+        \"lsl      r1, #1\"\n+\n+        bcs      3f\n+        @ Q0a\n+        vst1.16  {d20[0]}, [r0], r1\n+        vst1.16  {d20[1]}, [r2], r1\n+        vst1.16  {d20[2]}, [r0]\n+        vst1.16  {d20[3]}, [r2]\n+3:\n+        it       mi\n+        popmi    {pc}\n+        @ P0a\n+        vst1.16  {d18[0]}, [r3], r1\n+        vst1.16  {d18[1]}, [ip], r1\n+        vst1.16  {d18[2]}, [r3]\n+        vst1.16  {d18[3]}, [ip]\n+        pop      {pc}\n+\n+endfunc\n+\n+\n+@ void ff_hevc_rpi_v_loop_filter_uv2_neon(uint8_t * src_r,       // r0\n+@                                     unsigned int stride,   // r1\n+@                                     uint32_t tc4,          // r2\n+@                                     uint8_t * src_l,       // r3\n+@                                     unsigned int no_f);   // sp[0]\n+@\n+\n+@ no_f\n+@ 0  tl P0a\n+@ 1  tr Q0a\n+@ 2  bl P0b\n+@ 3  br Q0b\n+\n+@ P1: q8,  q12\n+@ P0: q9,  q13\n+@ Q0: q10, q14\n+@ Q1: q11, q15\n+\n+.macro m_filter_v_uv2_16 bit_depth\n+        cmp      r2, #0\n+        it eq\n+        bxeq     lr\n+        push     {lr}\n+        vld2.32  {d16[0], d18[0]}, [r3], r1\n+        vld2.32  {d20[0], d22[0]}, [r0], r1\n+\n+        cmp      r2, #0x10000\n+        vld2.32  {d16[1], d18[1]}, [r3], r1\n+        vld2.32  {d20[1], d22[1]}, [r0], r1\n+\n+        vld2.32  {d17[0], d19[0]}, [r3], r1\n+        vld2.32  {d21[0], d23[0]}, [r0], r1\n+\n+        vld2.32  {d17[1], d19[1]}, [r3], r1\n+        vld2.32  {d21[1], d23[1]}, [r0], r1\n+        blo      10f\n+\n+        vld2.32  {d24[0], d26[0]}, [r3], r1\n+        vld2.32  {d28[0], d30[0]}, [r0], r1\n+\n+        sub      ip, r0, r3\n+        vld2.32  {d24[1], d26[1]}, [r3], r1\n+        vld2.32  {d28[1], d30[1]}, [r0], r1\n+\n+        cmp      ip, #8\n+        vld2.32  {d25[0], d27[0]}, [r3], r1\n+        vld2.32  {d29[0], d31[0]}, [r0], r1\n+\n+        vld2.32  {d25[1], d27[1]}, [r3]\n+        vld2.32  {d29[1], d31[1]}, [r0]\n+\n+        hevc_loop_filter_uv_body2_16  q8, q12, q9, q13, q10, q14, q11, q15, \\bit_depth, \\\n+        \"ldr      lr, [sp, #4]\", \\\n+        \"neg      r1, r1\",       \\\n+        \"it eq; cmpeq lr, #0\",   \\\n+        \"add      r3, #4\",       \\\n+        \"add      ip, r3, r1\",   \\\n+        \"add      r2, r0, r1\",   \\\n+        \"lsl      r1, #1\"\n+\n+        bne      1f\n+\n+@ Much/most of the time r0 == r3 + 8 and no_f == 0\n+@ so it is worth having this special case\n+        vst2.32   {d27[1], d29[1]}, [r3], r1    @ P0b, Q0b\n+        vst2.32   {d27[0], d29[0]}, [ip], r1\n+        vst2.32   {d26[1], d28[1]}, [r3], r1\n+        vst2.32   {d26[0], d28[0]}, [ip], r1\n+        vst2.32   {d19[1], d21[1]}, [r3], r1    @ P0a, Q0a\n+        vst2.32   {d19[0], d21[0]}, [ip], r1\n+        vst2.32   {d18[1], d20[1]}, [r3]\n+        vst2.32   {d18[0], d20[0]}, [ip]\n+        pop       {pc}\n+\n+@ Either split or partial\n+1:\n+        lsls     lr, #29               @ b3 (Q0b) -> C, b2 (P0b) -> N & b31, b1 (Q0a) -> b30, b0 (P0a) -> b29\n+        ittt cs\n+        addcs    r0, r0, r1, lsl #1\n+        addcs    r2, r2, r1, lsl #1\n+        bcs      1f\n+        @ Q0b\n+        vst1.32  {d29[1]}, [r0], r1\n+        vst1.32  {d29[0]}, [r2], r1\n+        vst1.32  {d28[1]}, [r0], r1\n+        vst1.32  {d28[0]}, [r2], r1\n+1:\n+        ittt mi\n+        addmi    r3, r3, r1, lsl #1\n+        addmi    ip, ip, r1, lsl #1\n+        bmi      1f\n+        @ P0b\n+        vst1.32  {d27[1]}, [r3], r1\n+        vst1.32  {d27[0]}, [ip], r1\n+        vst1.32  {d26[1]}, [r3], r1\n+        vst1.32  {d26[0]}, [ip], r1\n+1:\n+        lsls     lr, #2                @ b30 (Q0a) -> C, b29 (P0a) -> N & b31\n+        bcs      1f\n+        @ Q0a\n+        vst1.32  {d21[1]}, [r0], r1\n+        vst1.32  {d21[0]}, [r2], r1\n+        vst1.32  {d20[1]}, [r0]\n+        vst1.32  {d20[0]}, [r2]\n+1:\n+        it       mi\n+        popmi    {pc}\n+        @ P0a\n+        vst1.32  {d19[1]}, [r3], r1\n+        vst1.32  {d19[0]}, [ip], r1\n+        vst1.32  {d18[1]}, [r3]\n+        vst1.32  {d18[0]}, [ip]\n+        pop      {pc}\n+\n+@ Single lump (rather than double)\n+10:\n+        @ As we have post inced r0/r3 in the load the easiest thing to do is\n+        @ to subtract and write forwards, rather than backwards (as above)\n+        @ b0 (P0a) -> N, b1 (Q0a) -> C\n+\n+        hevc_loop_filter_uv_body1_16  q8, q9, q10, q11, \\bit_depth, \\\n+        \"ldr      lr, [sp, #4]\",       \\\n+        \"add      r3, #4\",             \\\n+        \"sub      r0, r0, r1, lsl #2\", \\\n+        \"sub      r3, r3, r1, lsl #2\", \\\n+        \"lsls     lr, #31\",            \\\n+        \"add      r2, r0, r1\",         \\\n+        \"add      ip, r3, r1\",         \\\n+        \"lsl      r1, #1\"\n+\n+        bcs      3f\n+        @ Q0a\n+        vst1.32  {d20[0]}, [r0], r1\n+        vst1.32  {d20[1]}, [r2], r1\n+        vst1.32  {d21[0]}, [r0]\n+        vst1.32  {d21[1]}, [r2]\n+3:\n+        it       mi\n+        popmi    {pc}\n+        @ P0a\n+        vst1.32  {d18[0]}, [r3], r1\n+        vst1.32  {d18[1]}, [ip], r1\n+        vst1.32  {d19[0]}, [r3]\n+        vst1.32  {d19[1]}, [ip]\n+        pop      {pc}\n+.endm\n+\n+\n+@ The NEON version is faster under ideal circumstances (i.e. everything in L1)\n+@ But in real world testing it is ~20% slower, presumably due to code size\n+\n+#if 0 // NEON version\n+\n+/* uint32_t ff_hevc_rpi_deblocking_boundary_strengths_neon(int pus, int dup, const HEVCRpiMvField *curr, const HEVCRpiMvField *neigh,\n+ *                                            const int *curr_rpl0, const int *curr_rpl1, const int *neigh_rpl0, const int *neigh_rpl1,\n+ *                                            int in_inc0, int in_inc1)\n+ */\n+function ff_hevc_rpi_deblocking_boundary_strengths_neon, export=1\n+        mov         ip, sp\n+        push        {a1-a3,v1-v8,lr}\n+        ldm         ip, {v1-v6}\n+        cmp         a1, #2\n+        bls         2f\n+        vpush       {d8-d13}\n+        sub         v5, v5, #10\n+        sub         v6, v6, #10\n+1:\n+        vld2.32     {d0[0], d2[0]}, [a3]!\n+        vld2.32     {d4[0], d6[0]}, [a4]!\n+          vmov.u8     q12, #0\n+        ldrb        a2, [a3], #1\n+        ldrb        ip, [a4], #1\n+        ldrb        v8, [a3], #1\n+        ldrb        lr, [a4], #1\n+        add         a2, v1, a2, lsl #2\n+        vld1.8      {d24[0]}, [a3], v5\n+        add         ip, v3, ip, lsl #2\n+        vld1.8      {d25[0]}, [a4], v6\n+        add         v8, v2, v8, lsl #2\n+        vld1.32     {d16[0]}, [a2]\n+        add         lr, v4, lr, lsl #2\n+        vld1.32     {d20[0]}, [ip]\n+        vld1.32     {d18[0]}, [v8]\n+        vld1.32     {d22[0]}, [lr]\n+\n+        vld2.32     {d0[1], d2[1]}, [a3]!\n+        vld2.32     {d4[1], d6[1]}, [a4]!\n+        ldrb        a2, [a3], #1\n+          vmov.u16    d12, #1\n+        ldrb        ip, [a4], #1\n+          vmov.u16    d13, #2\n+        ldrb        v8, [a3], #1\n+          vmov.u16    d27, #4\n+        ldrb        lr, [a4], #1\n+        add         a2, v1, a2, lsl #2\n+        vld1.8      {d24[2]}, [a3], v5\n+        add         ip, v3, ip, lsl #2\n+        vld1.8      {d25[2]}, [a4], v6\n+        add         v8, v2, v8, lsl #2\n+        vld1.32     {d16[1]}, [a2]\n+        add         lr, v4, lr, lsl #2\n+        vld1.32     {d20[1]}, [ip]\n+        vld1.32     {d18[1]}, [v8]\n+        vld1.32     {d22[1]}, [lr]\n+\n+        vld2.32     {d1[0], d3[0]}, [a3]!\n+        vld2.32     {d5[0], d7[0]}, [a4]!\n+        ldrb        a2, [a3], #1\n+        ldrb        ip, [a4], #1\n+        ldrb        lr, [a4], #1\n+        ldrb        v8, [a3], #1\n+        add         a2, v1, a2, lsl #2\n+        vld1.8      {d24[4]}, [a3], v5\n+        add         ip, v3, ip, lsl #2\n+        vld1.8      {d25[4]}, [a4], v6\n+        add         v8, v2, v8, lsl #2\n+        vld1.32     {d17[0]}, [a2]\n+        add         lr, v4, lr, lsl #2\n+        vld1.32     {d21[0]}, [ip]\n+        vld1.32     {d19[0]}, [v8]\n+        vld1.32     {d23[0]}, [lr]\n+\n+        vld2.32     {d1[1], d3[1]}, [a3]!\n+        vld2.32     {d5[1], d7[1]}, [a4]!\n+        ldrb        a2, [a3], #1\n+        ldrb        ip, [a4], #1\n+        ldrb        v8, [a3], #1\n+        ldrb        lr, [a4], #1\n+        add         a2, v1, a2, lsl #2\n+        vld1.8      {d24[6]}, [a3], v5\n+        add         ip, v3, ip, lsl #2\n+        vld1.8      {d25[6]}, [a4], v6\n+        add         v8, v2, v8, lsl #2\n+        vld1.32     {d17[1]}, [a2]\n+        add         lr, v4, lr, lsl #2\n+        vld1.32     {d21[1]}, [ip]\n+        vld1.32     {d19[1]}, [v8]\n+        vld1.32     {d23[1]}, [lr]\n+\n+        @ So now we have:\n+        @ q0.32[i]  = curr[i].mv[0]\n+        @ q1.32[i]  = curr[i].mv[1]\n+        @ q2.32[i]  = neigh[i].mv[0]\n+        @ q3.32[i]  = neigh[i].mv[1]\n+        @ q8.32[i]  = curr_rpl0[curr[i].ref_idx[0]]\n+        @ q9.32[i]  = curr_rpl1[curr[i].ref_idx[1]]\n+        @ q10.32[i] = neigh_rpl0[neigh[i].ref_idx[0]]\n+        @ q11.32[i] = neigh_rpl1[neigh[i].ref_idx[1]]\n+        @ d24.16[i] = curr[i].pred_flag\n+        @ d25.16[i] = neigh[i].pred_flag\n+\n+        vtst.16     d28, d24, d12\n+        vtst.16     d29, d24, d13\n+        vadd.i16    d8, d24, d12\n+        vadd.i16    d9, d25, d12\n+        vtst.16     d30, d25, d12\n+        vtst.16     d31, d25, d13\n+        veor        d26, d8, d9\n+          ldr         lr, [sp, 6*8 + 1*4]\n+        vmovl.s16   q4, d28\n+        vmovl.s16   q5, d29\n+          teq         lr, #1\n+        vmovl.s16   q14, d30\n+          it ne\n+          lslne       v1, lr, #1\n+        vmovl.s16   q15, d31\n+          it ne\n+          rsbne       v2, v1, #32\n+        vbif        q0, q1, q4\n+        vbif        q2, q3, q14\n+        vbif        q1, q0, q5\n+        vbif        q3, q2, q15\n+        vabd.s16    q12, q0, q2\n+        vabd.s16    q2, q1\n+        vabd.s16    q0, q3\n+        vabd.s16    q1, q3\n+        vbif        q8, q9, q4\n+        vbif        q10, q11, q14\n+        vbif        q9, q8, q5\n+        vbif        q11, q10, q15\n+        vclt.u16    d6, d24, d27\n+        vclt.u16    d8, d2, d27\n+        vclt.u16    d7, d25, d27\n+        vclt.u16    d9, d3, d27\n+        vclt.u16    d2, d0, d27\n+        vclt.u16    d0, d4, d27\n+        vclt.u16    d3, d1, d27\n+        vclt.u16    d1, d5, d27\n+        vceq.i32    q12, q10, q8\n+        vceq.i32    q10, q9\n+        vceq.i32    q8, q11\n+        vceq.i32    q9, q11\n+        vshrn.i32   d6, q3, #8\n+        vshrn.i32   d7, q4, #8\n+        vshrn.i32   d8, q1, #8\n+        vshrn.i32   d9, q0, #8\n+        vmovn.i32   d4, q12\n+        vmovn.i32   d2, q10\n+        vmovn.i32   d3, q8\n+        vmovn.i32   d5, q9\n+        vand        q2, q3\n+        vrev16.8    q3, q3\n+        vand        q2, q3\n+        vand        q1, q4\n+        vrev16.8    q4, q4\n+        vand        q1, q4\n+        vand        d4, d5\n+        vand        d2, d3\n+        vbic        d0, d12, d4\n+        vshr.u16    d26, #2\n+        vbic        d0, d2\n+        vmov.i16    d1, #0x5555\n+        vorr        d0, d26\n+          bne         10f\n+\n+        @ Merge results into result word, no duplicates\n+        vmov        a2, s0\n+        vmov        v8, s1\n+        vmov.u16    ip, d0[1]\n+        vmov.u16    lr, d0[3]\n+        lsl         a2, #30\n+        lsl         v8, #30\n+        lsl         ip, #30\n+        lsl         lr, #30\n+        orr         a2, ip, a2, lsr #2\n+        orr         v8, lr, v8, lsr #2\n+        orr         a2, v8, a2, lsr #4\n+        subs        a1, #4\n+        orr         v7, a2, v7, lsr #8\n+        bhi         1b\n+\n+        mov         a1, #32\n+        ldr         a3, [sp, #6*8]\n+        vpop        {d8-d13}\n+        sub         a1, a1, a3, lsl #1\n+        mov         a1, v7, lsr a1\n+        pop         {a2-a4,v1-v8,pc}\n+10:\n+        @ Merge results into result word, with duplicates\n+        vmul.i16    d0, d1\n+        vmov        a2, s0\n+        vmov        v8, s1\n+        vmov.u16    ip, d0[1]\n+        vmov.u16    lr, d0[3]\n+        lsl         a2, v2\n+        subs        a1, #4\n+        lsl         v8, v2\n+        lsl         ip, v2\n+        lsl         lr, v2\n+        ldr         v2, [sp, #6*8 + 12*4 + 1*4]\n+T       lsr         a2, v1\n+T       orr         a2, ip, a2\n+A       orr         a2, ip, a2, lsr v1\n+        lsl         ip, v1, #1\n+T       lsr         v8, v1\n+T       orr         v8, lr, v8\n+A       orr         v8, lr, v8, lsr v1\n+        lsl         lr, v1, #2\n+T       lsr         a2, ip\n+T       orr         a2, v8, a2\n+A       orr         a2, v8, a2, lsr ip\n+        ldr         v1, [sp, #6*8 + 12*4]\n+T       lsr         v7, lr\n+T       orr         v7, a2, v7\n+A       orr         v7, a2, v7, lsr lr\n+        bhi         1b\n+\n+        mov         a1, #32\n+        ldrd        a3, a4, [sp, #6*8]\n+        vpop        {d8-d13}\n+        mls         a1, a3, a4, a1\n+        mls         a1, a3, a4, a1\n+        mov         a1, v7, lsr a1\n+        pop         {a2-a4,v1-v8,pc}\n+\n+\n+2:\n+        sub         v5, v5, #10\n+        sub         v6, v6, #10\n+        vmov.u8     d16, #0\n+        blo         3f\n+        vld2.32     {d0[0], d1[0]}, [a3]!\n+        vld2.32     {d2[0], d3[0]}, [a4]!\n+        ldrb        a2, [a3], #1\n+        ldrb        ip, [a4], #1\n+        ldrb        lr, [a4], #1\n+        ldrb        v8, [a3], #1\n+        add         a2, v1, a2, lsl #2\n+        vld1.8      {d16[0]}, [a3], v5\n+        add         ip, v3, ip, lsl #2\n+        vld1.8      {d16[4]}, [a4], v6\n+        add         v8, v2, v8, lsl #2\n+        vld1.32     {d4[0]}, [a2]\n+        add         lr, v4, lr, lsl #2\n+        vld1.32     {d5[0]}, [ip]\n+        vld1.32     {d6[0]}, [v8]\n+        vld1.32     {d7[0]}, [lr]\n+\n+3:\n+        vld2.32     {d0[1], d1[1]}, [a3]!\n+        vld2.32     {d2[1], d3[1]}, [a4]!\n+        ldrb        a2, [a3], #1\n+          vmov.u16    d17, #1\n+        ldrb        ip, [a4], #1\n+          vmov.u16    d18, #2\n+        ldrb        v8, [a3], #1\n+          vmov.u16    d19, #4\n+        ldrb        lr, [a4], #1\n+        add         a2, v1, a2, lsl #2\n+        vld1.8      {d16[2]}, [a3], v5\n+        add         ip, v3, ip, lsl #2\n+        vld1.8      {d16[6]}, [a4], v6\n+        add         v8, v2, v8, lsl #2\n+        vld1.32     {d4[1]}, [a2]\n+        add         lr, v4, lr, lsl #2\n+        vld1.32     {d5[1]}, [ip]\n+        vld1.32     {d6[1]}, [v8]\n+        vld1.32     {d7[1]}, [lr]\n+\n+        @ So now we have:\n+        @ d0.32[i]  = curr[i].mv[0]\n+        @ d1.32[i]  = curr[i].mv[1]\n+        @ d2.32[i]  = neigh[i].mv[0]\n+        @ d3.32[i]  = neigh[i].mv[1]\n+        @ d4.32[i] = curr_rpl0[curr[i].ref_idx[0]]\n+        @ d5.32[i] = neigh_rpl0[neigh[i].ref_idx[0]]\n+        @ d6.32[i] = curr_rpl1[curr[i].ref_idx[1]]\n+        @ d7.32[i] = neigh_rpl1[neigh[i].ref_idx[1]]\n+        @ d16.16[i] = curr[i].pred_flag\n+        @ d16.16[2+i] = neigh[i].pred_flag\n+\n+        vtst.16     d20, d16, d17\n+        vtst.16     d22, d16, d18\n+        vadd.i16    d30, d16, d17\n+        vswp        d2, d3\n+        ldr         lr, [sp, #1*4]\n+        vmovl.s16   q10, d20\n+          teq         lr, #1\n+        vmovl.s16   q11, d22\n+          it ne\n+          lslne       v1, lr, #1\n+        vbif        d0, d1, d20\n+        vbif        d4, d6, d20\n+        vbif        d3, d2, d21\n+        vbif        d5, d7, d21\n+        vbif        d1, d0, d22\n+        vbif        d6, d4, d22\n+        vbif        d2, d3, d23\n+        vbif        d7, d5, d23\n+        vshr.u16    d30, #2\n+        vabd.s16    d24, d0, d3\n+        vabd.s16    d25, d1, d2\n+        vabd.s16    q0, q0, q1\n+        vceq.i32    d2, d4, d5\n+        vceq.i32    d20, d5, d6\n+        vceq.i32    d21, d4, d7\n+        vceq.i32    d3, d6, d7\n+        vclt.u16    d6, d24, d19\n+        vclt.u16    d7, d25, d19\n+        vclt.u16    d22, d1, d19\n+        vclt.u16    d23, d0, d19\n+        vshrn.i32   d6, q3, #8\n+        vmovn.i32   d2, q1\n+        vshrn.i32   d7, q11, #8\n+        vmovn.i32   d3, q10\n+        vand        q0, q3, q1\n+          it ne\n+          rsbne       v2, v1, #32\n+        vrev16.8    q3, q3\n+        vand        q0, q3\n+        vsra.u64    d30, #32\n+        vshr.u64    q1, q0, #32\n+        vand        q0, q1\n+        vbic        d0, d17, d0\n+        vand        d30, d30, d17\n+        vbic        d0, d1\n+        vmov.i16    d1, #0x5555\n+        vorr        d0, d30\n+          bne         10f\n+\n+        @ Construct result word, no duplicates\n+        cmp         a1, #2\n+        vmov.u16    a1, d0[1]\n+        vmov.u16    a2, d0[0]\n+        it eq\n+        orreq       a1, a2, a1, lsl #2\n+        pop         {a2-a4,v1-v8,pc}\n+10:\n+        @ Construct result word, with duplicates\n+        cmp         a1, #2\n+        vmul.i16    d0, d1\n+        vmov        a2, s0\n+        vmov.u16    a1, d0[1]\n+        lsl         a2, #16\n+        pkhbt       a1, a1, a1, lsl #16\n+        lsr         a2, v2\n+        lsr         a1, v2\n+T       itt eq\n+T       lsleq       a1, v1\n+T       orreq       a1, a2, a1\n+A       orreq       a1, a2, a1, lsl v1\n+        pop         {a2-a4,v1-v8,pc}\n+endfunc\n+\n+\n+\n+#else // non-NEON version\n+\n+\n+/* uint32_t ff_hevc_rpi_deblocking_boundary_strengths_neon(int pus, int dup, const HEVCRpiMvField *curr, const HEVCRpiMvField *neigh,\n+ *                                            const int *curr_rpl0, const int *curr_rpl1, const int *neigh_rpl0, const int *neigh_rpl1,\n+ *                                            int in_inc0, in_inc1)\n+ */\n+function ff_hevc_rpi_deblocking_boundary_strengths_neon, export=1\n+        add         ip, sp, #4*4\n+        push        {a2-a4,v1-v8,lr}\n+        mov         v6, #32\n+1:      ldmdb       ip, {v1-v4}\n+        ldrsb       v5, [a3, #8]    @ curr->ref_idx\n+        ldrsb       v8, [a3, #9]\n+        ldrsb       ip, [a4, #8]    @ neigh->ref_idx\n+        ldrsb       lr, [a4, #9]\n+        ldr         v1, [v1, v5, lsl #2]\n+        ldrb        v5, [a3, #10]   @ curr->pred_flag\n+        ldr         v2, [v2, v8, lsl #2]\n+        ldrb        v8, [a4, #10]   @ neigh->pred_flag\n+        ldr         v3, [v3, ip, lsl #2]\n+        ldr         v4, [v4, lr, lsl #2]\n+        teq         v5, #3\n+        beq         20f\n+        teq         v8, #3\n+        beq         90f\n+\n+        tst         v5, #1\n+        itee        ne\n+        ldrne       v5, [a3, #0]    @ curr->mv[0]\n+        moveq       v1, v2\n+        ldreq       v5, [a3, #4]    @ curr->mv[1]\n+        tst         v8, #1\n+        itee        ne\n+        ldrne       v8, [a4, #0]    @ neigh->mv[0]\n+        moveq       v3, v4\n+        ldreq       v8, [a4, #4]    @ neigh->mv[1]\n+        teq         v1, v3\n+        bne         10f\n+        ldr         lr, =0xFFFCFFFC\n+        ssub16      ip, v8, v5\n+        ssub16      v5, v5, v8\n+        sel         v5, v5, ip\n+        ands        v5, v5, lr\n+        @ drop through\n+10:     it          ne\n+        movne       v5, #1<<30\n+11:\n+        sub         v6, v6, #2\n+T       mov         v7, v7, lsr #2\n+        subs        a2, a2, #1\n+A       orr         v7, v5, v7, lsr #2\n+T       orr         v7, v5, v7\n+        bhi         11b\n+\n+        ldrd        v3, v4, [sp, #16*4]\n+        ldr         a2, [sp]\n+        add         ip, sp, #16*4\n+        subs        a1, a1, #1\n+        add         a3, a3, v3\n+        add         a4, a4, v4\n+        bhi         1b\n+        mov         a1, v7, lsr v6\n+        pop         {a2-a4,v1-v8,pc}\n+\n+20:     teq         v8, #3\n+        bne         10b\n+\n+        teq         v1, v3\n+        it          eq\n+        teqeq       v2, v4\n+        bne         40f\n+        teq         v1, v2\n+        bne         30f\n+\n+        ldrd        v1, v2, [a3]    @ curr->mv\n+        ldrd        v3, v4, [a4]    @ neigh->mv\n+        ldr         lr, =0xFFFCFFFC\n+        ssub16      ip, v3, v1\n+        ssub16      v5, v1, v3\n+        sel         v5, v5, ip\n+        ands        v5, v5, lr\n+        bne         25f\n+        ssub16      ip, v4, v2\n+        ssub16      v5, v2, v4\n+        sel         v5, v5, ip\n+        ands        v5, v5, lr\n+        beq         11b\n+        @ drop through\n+25:     ssub16      ip, v4, v1\n+        ssub16      v5, v1, v4\n+        sel         v5, v5, ip\n+        ands        v5, v5, lr\n+        bne         10b\n+        ssub16      ip, v3, v2\n+        ssub16      v5, v2, v3\n+        sel         v5, v5, ip\n+        ands        v5, v5, lr\n+        b           10b\n+\n+30:     ldrd        v1, v2, [a3]    @ curr->mv\n+        ldrd        v3, v4, [a4]    @ neigh->mv\n+        ldr         lr, =0xFFFCFFFC\n+        ssub16      ip, v3, v1\n+        ssub16      v5, v1, v3\n+        sel         v5, v5, ip\n+        ands        v5, v5, lr\n+        bne         10b\n+        ssub16      ip, v4, v2\n+        ssub16      v5, v2, v4\n+        sel         v5, v5, ip\n+        ands        v5, v5, lr\n+        b           10b\n+\n+40:     teq         v1, v4\n+        ite         eq\n+        teqeq       v2, v3\n+        bne         10b\n+\n+        ldrd        v1, v2, [a3]    @ curr->mv\n+        ldrd        v3, v4, [a4]    @ neigh->mv\n+        ldr         lr, =0xFFFCFFFC\n+        b           25b\n+\n+90:\n+        mov         v5, #1<<30\n+        b           11b\n+endfunc\n+\n+\n+#endif\n+\n+\n+@ =============================================================================\n+@\n+@ 10 bit\n+\n+function hevc_loop_filter_luma_body_10\n+        m_filter_luma 10, q11, q15\n+endfunc\n+\n+function ff_hevc_rpi_h_loop_filter_luma_neon_10, export=1\n+        hevc_loop_filter_luma_start\n+        b        .Lh_loop_luma_common_10\n+endfunc\n+\n+function ff_hevc_rpi_h_loop_filter_luma2_neon_10, export=1\n+        cmp      r3, #0\n+        it       eq\n+        bxeq     lr\n+        push     {r4-r10,lr}            @ 32 bytes\n+        ldr      r10, [sp, #32]\n+.Lh_loop_luma_common_10:\n+        m_filter_h_luma_16 10\n+endfunc\n+\n+function ff_hevc_rpi_v_loop_filter_luma_neon_10, export=1\n+        hevc_loop_filter_luma_start\n+        sub      r4, r0, #8\n+        b        .Lv_loop_luma_common_10\n+endfunc\n+\n+function ff_hevc_rpi_v_loop_filter_luma2_neon_10, export=1\n+        cmp      r3, #0\n+        it       eq\n+        bxeq     lr\n+        push     {r4-r10,lr}            @ 32 bytes\n+        ldr      r4, [sp, #36]\n+        ldr      r10, [sp, #32]\n+\n+.Lv_loop_luma_common_10:\n+        m_filter_v_luma_16 10\n+endfunc\n+\n+function ff_hevc_rpi_h_loop_filter_uv_neon_10, export=1\n+        m_filter_h_uv_16 10\n+endfunc\n+\n+function ff_hevc_rpi_v_loop_filter_uv2_neon_10, export=1\n+        m_filter_v_uv2_16 10\n+endfunc\n+\ndiff --git a/libavcodec/arm/rpi_hevcdsp_idct_neon.S b/libavcodec/arm/rpi_hevcdsp_idct_neon.S\nnew file mode 100644\nindex 0000000000..7ed5c7dc52\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcdsp_idct_neon.S\n@@ -0,0 +1,184 @@\n+/*\n+ * Copyright (c) 2014 Seppo Tomperi <seppo.tomperi@vtt.fi>\n+ * Copyright (C) 2018 John Cox, Ben Avison for Raspberry Pi (Trading)\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"libavutil/arm/asm.S\"\n+#include \"neon.S\"\n+\n+/* uses registers q8 - q13 for temp values */\n+.macro tr4_luma_shift shift\n+        vaddl.s16   q8, d28, d30    // c0 = src0 + src2\n+        vaddl.s16   q9, d30, d31    // c1 = src2 + src3\n+        vsubl.s16   q10, d28, d31   // c2 = src0 - src3\n+        vaddl.s16   q11, d28, d31   // src0 + src3\n+\n+        vmul.i32    q12, q8, d1[0]  // 29 * c0\n+        vmul.i32    q13, q10, d2[0] // 55 * c2\n+        vmul.i32    q8, q8, d2[0]   // 55 * c0\n+        vmull.s16   q14, d29, d0[0] // c3 = 74 * src1\n+\n+        vsubw.s16   q11, q11, d30   // src0 - src2 + src3\n+        vmla.i32    q12, q9, d2[0]  // 29 * c0 + 55 * c1\n+        vmls.i32    q13, q9, d1[0]  // 55 * c2 - 29 * c1\n+        vmla.i32    q8, q10, d1[0]  // 55 * c0 + 29 * c2\n+\n+        vmul.i32    q11, q11, d0[0] // dst2 = 74 * (src0 - src2 + src3)\n+        vadd.i32    q12, q12, q14   // dst0 = 29 * c0 + 55 * c1 + c3\n+        vadd.i32    q13, q13, q14   // dst1 = 55 * c2 - 29 * c1 + c3\n+        vsub.i32    q8, q8, q14     // dst3 = 55 * c0 + 29 * c2 - c3\n+\n+        vqrshrn.s32 d28, q12, \\shift\n+        vqrshrn.s32 d29, q13, \\shift\n+        vqrshrn.s32 d30, q11, \\shift\n+        vqrshrn.s32 d31, q8, \\shift\n+.endm\n+\n+/* uses registers q8 - q11 for temp values */\n+.macro tr4_shift shift\n+        vmull.s16   q9, d29, d0[0]   // 83 * src1\n+        vmull.s16   q8, d29, d0[1]   // 36 * src1\n+        vshll.s16   q14, d28, #6     // 64 * src0\n+        vshll.s16   q10, d30, #6     // 64 * src2\n+        vmlal.s16   q9, d31, d0[1]   // 83 * src1 + 36 * src3  o0\n+        vmlsl.s16   q8, d31, d0[0]   // 36 * src1 - 83 * src3  o1\n+        vadd.s32    q11, q14, q10    // 64 * (src0 + src2)     e0\n+        vsub.s32    q10, q14, q10    // 64 * (src0 - src2)     e1\n+        vadd.s32    q14, q11, q9     // e0 + o0\n+        vadd.s32    q15, q10, q8     // e1 + o1\n+        vsub.s32    q8, q10, q8      // e1 - o1\n+        vsub.s32    q9, q11, q9      // e0 - o0\n+\n+        vqrshrn.s32 d28, q14, \\shift\n+        vqrshrn.s32 d29, q15, \\shift\n+        vqrshrn.s32 d30, q8, \\shift\n+        vqrshrn.s32 d31, q9, \\shift\n+.endm\n+\n+.macro tr8_process d0, d1, d2, d3, d4, d5, d6, d7,                         \\\n+                   tmp0, /* Q reg which doesn't alias with d4, d6 or d7 */ \\\n+                   tmp1, /* Q reg which doesn't alias with d7 or d0     */ \\\n+                   shift, I1, I2, I3\n+\n+        vmull.s16  q4, \\d1, d1[1]        // 89 * src1\n+        \\I1\n+        vmull.s16  q5, \\d1, d1[0]        // 75 * src1\n+        \\I2\n+        vmull.s16  q6, \\d1, d1[3]        // 50 * src1\n+        \\I3\n+        vmull.s16  q7, \\d1, d1[2]        // 18 * src1\n+        vmlal.s16  q4, \\d3, d1[0]        // 75 * src3\n+        vmlsl.s16  q5, \\d3, d1[2]        //-18 * src3\n+        vmlsl.s16  q6, \\d3, d1[1]        //-89 * src3\n+        vmlsl.s16  q7, \\d3, d1[3]        //-50 * src3\n+\n+          // tr4\n+          vmull.s16  q1, \\d2, d0[0]      // 83 * src(1*2)\n+          vmull.s16  q2, \\d2, d0[1]      // 36 * src(1*2)\n+\n+        vmlal.s16  q4, \\d5, d1[3]        // 50 * src5\n+        vmlsl.s16  q5, \\d5, d1[1]        //-89 * src5\n+        vmlal.s16  q6, \\d5, d1[2]        // 18 * src5\n+        vmlal.s16  q7, \\d5, d1[0]        // 75 * src5\n+\n+          vshll.s16  q3, \\d0, #6         // 64 * src(0*2)\n+          vshll.s16  \\tmp0, \\d4, #6      // 64 * src(2*2)\n+          vmlal.s16  q1, \\d6, d0[1]      // 83 * src(1*2) + 36 * src(3*2)  o0\n+          vmlsl.s16  q2, \\d6, d0[0]      // 36 * src(1*2) - 83 * src(3*2)  o1\n+          vadd.i32   \\tmp1, q3, \\tmp0    // 64 * (src(0*2) + src(2*2))     e0\n+          vsub.i32   \\tmp0, q3, \\tmp0    // 64 * (src(0*2) - src(2*2))     e1\n+\n+        vmlal.s16  q4, \\d7, d1[2]        // 18 * src7\n+        vmlsl.s16  q5, \\d7, d1[3]        //-50 * src7\n+        vmlal.s16  q6, \\d7, d1[0]        // 75 * src7\n+        vmlsl.s16  q7, \\d7, d1[1]        //-89 * src7\n+\n+          vsub.i32   q3, \\tmp1, q1       // e0 - o0\n+          vadd.i32   \\tmp1, \\tmp1, q1    // e0 + o0\n+          vadd.i32   q1, \\tmp0, q2       // e1 + o1\n+          vsub.i32   q2, \\tmp0, q2       // e1 - o1\n+\n+        vadd.i32   \\tmp0, \\tmp1, q4      // e_8[0] + o_8[0], dst[0]\n+        vsub.i32   q4, \\tmp1, q4         // e_8[0] - o_8[0], dst[7]\n+        vsub.i32   \\tmp1, q3, q7         // e_8[3] - o_8[3], dst[4]\n+        vadd.i32   q7, q3, q7            // e_8[3] + o_8[3], dst[3]\n+        vadd.i32   q3, q1, q5            // e_8[1] + o_8[1], dst[1]\n+        vsub.i32   q5, q1, q5            // e_8[1] - o_8[1], dst[6]\n+        vsub.i32   q1, q2, q6            // e_8[2] - o_8[2], dst[5]\n+        vadd.i32   q6, q2, q6            // e_8[2] + o_8[2], dst[2]\n+        vqrshrn.s32   \\d0, \\tmp0, #\\shift\n+        vqrshrn.s32   \\d4, \\tmp1, #\\shift\n+        vqrshrn.s32   \\d1, q3, #\\shift\n+        vqrshrn.s32   \\d5, q1, #\\shift\n+        vqrshrn.s32   \\d2, q6, #\\shift\n+        vqrshrn.s32   \\d6, q5, #\\shift\n+        vqrshrn.s32   \\d3, q7, #\\shift\n+        vqrshrn.s32   \\d7, q4, #\\shift\n+.endm\n+\n+.macro tr8_vert d0, d1, d2, d3, d4, d5, d6, d7, q01, q23, I1, I2, I3\n+        vld1.16     {\\d0}, [r0 :64], r3\n+        vld1.16     {\\d1}, [r2 :64], r3\n+        vld1.16     {\\d2}, [r0 :64], r3\n+        vld1.16     {\\d3}, [r2 :64], r3\n+        vld1.16     {\\d4}, [r0 :64], r3\n+        vld1.16     {\\d5}, [r2 :64], r3\n+        vld1.16     {\\d6}, [r0 :64], r3\n+        vld1.16     {\\d7}, [r2 :64], r3\n+\n+        tr8_process \\\n+            \\d0, \\d1, \\d2, \\d3, \\d4, \\d5, \\d6, \\d7, \\\n+            \\q01, \\q23, 7, \"\\I1\", \"\\I2\", \"\\I3\"\n+.endm\n+\n+.macro tr8_horiz d0, d1, d2, d3, d4, d5, d6, d7, q01, q23, shift\n+        tr8_process \\\n+            \\d0, \\d1, \\d2, \\d3, \\d4, \\d5, \\d6, \\d7, \\\n+            \\q01, \\q23, \\shift\n+\n+        vzip.16    \\d0, \\d4\n+        vzip.16    \\d1, \\d5\n+        vzip.16    \\d2, \\d6\n+        vzip.16    \\d3, \\d7\n+        vst4.16    {\\d0-\\d3}, [r0 :128], r3\n+        vst4.16    {\\d4-\\d7}, [r2 :128], r3\n+.endm\n+\n+#define BIT_DEPTH 8\n+#include \"rpi_hevc_idct_fn_neon.S\"\n+\n+.text\n+\n+.align 4\n+tr4f:\n+.word 0x00240053  // 36 and d1[0] = 83\n+.word 0x00000000\n+tr8f:\n+.word 0x0059004b  // 89, d0[0] = 75\n+.word 0x00320012  // 50, d0[2] = 18\n+tr16:\n+.word 0x005a0057  // 90, d2[0] = 87\n+.word 0x00500046  // 80, d2[2] = 70\n+.word 0x0039002b  // 57, d2[0] = 43\n+.word 0x00190009  // 25, d2[2] = 9\n+\n+#undef BIT_DEPTH\n+#define BIT_DEPTH 10\n+#include \"rpi_hevc_idct_fn_neon.S\"\n+\ndiff --git a/libavcodec/arm/rpi_hevcdsp_init_arm.c b/libavcodec/arm/rpi_hevcdsp_init_arm.c\nnew file mode 100644\nindex 0000000000..109fa98c29\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcdsp_init_arm.c\n@@ -0,0 +1,32 @@\n+/*\n+ * Copyright (c) 2014 Seppo Tomperi <seppo.tomperi@vtt.fi>\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"libavutil/attributes.h\"\n+#include \"libavutil/arm/cpu.h\"\n+#include \"libavcodec/rpi_hevcdsp.h\"\n+#include \"rpi_hevcdsp_arm.h\"\n+\n+av_cold void ff_hevcdsp_rpi_init_arm(HEVCDSPContext *c, const int bit_depth)\n+{\n+    int cpu_flags = av_get_cpu_flags();\n+\n+    if (have_neon(cpu_flags))\n+        ff_hevcdsp_rpi_init_neon(c, bit_depth);\n+}\ndiff --git a/libavcodec/arm/rpi_hevcdsp_init_neon.c b/libavcodec/arm/rpi_hevcdsp_init_neon.c\nnew file mode 100644\nindex 0000000000..9294ab8010\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcdsp_init_neon.c\n@@ -0,0 +1,467 @@\n+/*\n+ * Copyright (c) 2014 Seppo Tomperi <seppo.tomperi@vtt.fi>\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"config.h\"\n+#include \"libavutil/attributes.h\"\n+#include \"libavutil/arm/cpu.h\"\n+#include \"libavcodec/rpi_hevcdsp.h\"\n+#include \"rpi_hevcdsp_arm.h\"\n+#include \"libavcodec/avcodec.h\"\n+#include \"libavcodec/bit_depth_template.c\"\n+\n+// NEON inter pred fns for qpel & epel (non-sand) exist in the git repo but\n+// have been removed from head as we never use them.\n+\n+void ff_hevc_rpi_v_loop_filter_luma_neon_8(uint8_t *_pix, ptrdiff_t _stride, int _beta, int *_tc, uint8_t *_no_p, uint8_t *_no_q);\n+void ff_hevc_rpi_h_loop_filter_luma_neon_8(uint8_t *_pix, ptrdiff_t _stride, int _beta, int *_tc, uint8_t *_no_p, uint8_t *_no_q);\n+\n+void ff_hevc_rpi_v_loop_filter_luma_neon_10(uint8_t *_pix, ptrdiff_t _stride, int _beta, int *_tc, uint8_t *_no_p, uint8_t *_no_q);\n+void ff_hevc_rpi_h_loop_filter_luma_neon_10(uint8_t *_pix, ptrdiff_t _stride, int _beta, int *_tc, uint8_t *_no_p, uint8_t *_no_q);\n+\n+void ff_hevc_rpi_h_loop_filter_luma2_neon_8(uint8_t * _pix_r,\n+                             unsigned int _stride, unsigned int beta, unsigned int tc2, unsigned int no_f);\n+void ff_hevc_rpi_v_loop_filter_luma2_neon_8(uint8_t * _pix_r,\n+                             unsigned int _stride, unsigned int beta, unsigned int tc2, unsigned int no_f,\n+                             uint8_t * _pix_l);\n+void ff_hevc_rpi_h_loop_filter_uv_neon_8(uint8_t * src, unsigned int stride, uint32_t tc4,\n+                             unsigned int no_f);\n+void ff_hevc_rpi_v_loop_filter_uv2_neon_8(uint8_t * src_r, unsigned int stride, uint32_t tc4,\n+                             uint8_t * src_l,\n+                             unsigned int no_f);\n+\n+void ff_hevc_rpi_h_loop_filter_luma2_neon_10(uint8_t * _pix_r,\n+                             unsigned int _stride, unsigned int beta, unsigned int tc2, unsigned int no_f);\n+void ff_hevc_rpi_v_loop_filter_luma2_neon_10(uint8_t * _pix_r,\n+                             unsigned int _stride, unsigned int beta, unsigned int tc2, unsigned int no_f,\n+                             uint8_t * _pix_l);\n+void ff_hevc_rpi_h_loop_filter_uv_neon_10(uint8_t * src, unsigned int stride, uint32_t tc4,\n+                             unsigned int no_f);\n+void ff_hevc_rpi_v_loop_filter_uv2_neon_10(uint8_t * src_r, unsigned int stride, uint32_t tc4,\n+                             uint8_t * src_l,\n+                             unsigned int no_f);\n+\n+void ff_hevc_rpi_transform_4x4_neon_8(int16_t *coeffs, int col_limit);\n+void ff_hevc_rpi_transform_8x8_neon_8(int16_t *coeffs, int col_limit);\n+void ff_hevc_rpi_idct_4x4_dc_neon_8(int16_t *coeffs);\n+void ff_hevc_rpi_idct_8x8_dc_neon_8(int16_t *coeffs);\n+void ff_hevc_rpi_idct_16x16_dc_neon_8(int16_t *coeffs);\n+void ff_hevc_rpi_idct_32x32_dc_neon_8(int16_t *coeffs);\n+void ff_hevc_rpi_transform_luma_4x4_neon_8(int16_t *coeffs);\n+\n+void ff_hevc_rpi_transform_4x4_neon_10(int16_t *coeffs, int col_limit);\n+void ff_hevc_rpi_transform_8x8_neon_10(int16_t *coeffs, int col_limit);\n+void ff_hevc_rpi_idct_4x4_dc_neon_10(int16_t *coeffs);\n+void ff_hevc_rpi_idct_8x8_dc_neon_10(int16_t *coeffs);\n+void ff_hevc_rpi_idct_16x16_dc_neon_10(int16_t *coeffs);\n+void ff_hevc_rpi_idct_32x32_dc_neon_10(int16_t *coeffs);\n+void ff_hevc_rpi_transform_luma_4x4_neon_10(int16_t *coeffs);\n+\n+void ff_hevc_rpi_add_residual_4x4_neon_8(uint8_t *_dst, int16_t *coeffs,\n+                                     ptrdiff_t stride);\n+void ff_hevc_rpi_add_residual_8x8_neon_8(uint8_t *_dst, int16_t *coeffs,\n+                                     ptrdiff_t stride);\n+void ff_hevc_rpi_add_residual_16x16_neon_8(uint8_t *_dst, int16_t *coeffs,\n+                                       ptrdiff_t stride);\n+void ff_hevc_rpi_add_residual_32x32_neon_8(uint8_t *_dst, int16_t *coeffs,\n+                                       ptrdiff_t stride);\n+\n+void ff_hevc_rpi_add_residual_4x4_dc_neon_8(uint8_t *_dst, ptrdiff_t stride, int dc);\n+void ff_hevc_rpi_add_residual_8x8_dc_neon_8(uint8_t *_dst, ptrdiff_t stride, int dc);\n+void ff_hevc_rpi_add_residual_16x16_dc_neon_8(uint8_t *_dst, ptrdiff_t stride, int dc);\n+void ff_hevc_rpi_add_residual_32x32_dc_neon_8(uint8_t *_dst, ptrdiff_t stride, int dc);\n+\n+\n+void ff_hevc_rpi_add_residual_4x4_neon_10(uint8_t *_dst, int16_t *coeffs,\n+                                     ptrdiff_t stride);\n+void ff_hevc_rpi_add_residual_8x8_neon_10(uint8_t *_dst, int16_t *coeffs,\n+                                     ptrdiff_t stride);\n+void ff_hevc_rpi_add_residual_16x16_neon_10(uint8_t *_dst, int16_t *coeffs,\n+                                       ptrdiff_t stride);\n+void ff_hevc_rpi_add_residual_32x32_neon_10(uint8_t *_dst, int16_t *coeffs,\n+                                       ptrdiff_t stride);\n+\n+void ff_hevc_rpi_add_residual_4x4_dc_neon_10(uint8_t *_dst, ptrdiff_t stride, int dc);\n+void ff_hevc_rpi_add_residual_8x8_dc_neon_10(uint8_t *_dst, ptrdiff_t stride, int dc);\n+void ff_hevc_rpi_add_residual_16x16_dc_neon_10(uint8_t *_dst, ptrdiff_t stride, int dc);\n+void ff_hevc_rpi_add_residual_32x32_dc_neon_10(uint8_t *_dst, ptrdiff_t stride, int dc);\n+\n+\n+void ff_hevc_rpi_add_residual_4x4_u_neon_8(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride, int dc_v);\n+void ff_hevc_rpi_add_residual_8x8_u_neon_8(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride, int dc_v);\n+void ff_hevc_rpi_add_residual_16x16_u_neon_8(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride, int dc_v);\n+void ff_hevc_rpi_add_residual_4x4_v_neon_8(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride, int dc_u);\n+void ff_hevc_rpi_add_residual_8x8_v_neon_8(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride, int dc_u);\n+void ff_hevc_rpi_add_residual_16x16_v_neon_8(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride, int dc_u);\n+void ff_hevc_rpi_add_residual_4x4_c_neon_8(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride);\n+void ff_hevc_rpi_add_residual_8x8_c_neon_8(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride);\n+void ff_hevc_rpi_add_residual_16x16_c_neon_8(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride);\n+void ff_hevc_rpi_add_residual_4x4_dc_c_neon_8(uint8_t *_dst, ptrdiff_t stride, int32_t dc);\n+void ff_hevc_rpi_add_residual_8x8_dc_c_neon_8(uint8_t *_dst, ptrdiff_t stride, int32_t dc);\n+void ff_hevc_rpi_add_residual_16x16_dc_c_neon_8(uint8_t *_dst, ptrdiff_t stride, int32_t dc);\n+\n+\n+void ff_hevc_rpi_add_residual_4x4_u_neon_10(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride, int dc_v);\n+void ff_hevc_rpi_add_residual_8x8_u_neon_10(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride, int dc_v);\n+void ff_hevc_rpi_add_residual_16x16_u_neon_10(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride, int dc_v);\n+void ff_hevc_rpi_add_residual_4x4_v_neon_10(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride, int dc_u);\n+void ff_hevc_rpi_add_residual_8x8_v_neon_10(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride, int dc_u);\n+void ff_hevc_rpi_add_residual_16x16_v_neon_10(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride, int dc_u);\n+void ff_hevc_rpi_add_residual_4x4_c_neon_10(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride);\n+void ff_hevc_rpi_add_residual_8x8_c_neon_10(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride);\n+void ff_hevc_rpi_add_residual_16x16_c_neon_10(uint8_t *_dst, const int16_t * residual,\n+                                       ptrdiff_t stride);\n+void ff_hevc_rpi_add_residual_4x4_dc_c_neon_10(uint8_t *_dst, ptrdiff_t stride, int32_t dc);\n+void ff_hevc_rpi_add_residual_8x8_dc_c_neon_10(uint8_t *_dst, ptrdiff_t stride, int32_t dc);\n+void ff_hevc_rpi_add_residual_16x16_dc_c_neon_10(uint8_t *_dst, ptrdiff_t stride, int32_t dc);\n+\n+void ff_hevc_rpi_sao_edge_8_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height);\n+void ff_hevc_rpi_sao_edge_16_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height);\n+void ff_hevc_rpi_sao_edge_32_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height);\n+void ff_hevc_rpi_sao_edge_64_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height);\n+\n+void ff_hevc_rpi_sao_edge_8_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height);\n+void ff_hevc_rpi_sao_edge_16_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height);\n+void ff_hevc_rpi_sao_edge_32_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height);\n+void ff_hevc_rpi_sao_edge_64_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height);\n+\n+void ff_hevc_rpi_sao_edge_c_8_neon_8(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst,\n+                                  const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v,\n+                                  int eo, int width, int height);\n+void ff_hevc_rpi_sao_edge_c_16_neon_8(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst,\n+                                  const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v,\n+                                  int eo, int width, int height);\n+void ff_hevc_rpi_sao_edge_c_32_neon_8(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst,\n+                                  const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v,\n+                                  int eo, int width, int height);\n+\n+void ff_hevc_rpi_sao_edge_c_8_neon_10(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst,\n+                                  const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v,\n+                                  int eo, int width, int height);\n+void ff_hevc_rpi_sao_edge_c_16_neon_10(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst,\n+                                  const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v,\n+                                  int eo, int width, int height);\n+void ff_hevc_rpi_sao_edge_c_32_neon_10(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst,\n+                                  const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v,\n+                                  int eo, int width, int height);\n+\n+void ff_hevc_rpi_sao_band_c_8_neon_8(uint8_t *_dst, const uint8_t *_src,\n+                                  ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                  const int16_t *sao_offset_val_u, int sao_left_class_u,\n+                                  const int16_t *sao_offset_val_v, int sao_left_class_v,\n+                                  int width, int height);\n+void ff_hevc_rpi_sao_band_c_16_neon_8(uint8_t *_dst, const uint8_t *_src,\n+                                  ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                  const int16_t *sao_offset_val_u, int sao_left_class_u,\n+                                  const int16_t *sao_offset_val_v, int sao_left_class_v,\n+                                  int width, int height);\n+void ff_hevc_rpi_sao_band_c_32_neon_8(uint8_t *_dst, const uint8_t *_src,\n+                                  ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                  const int16_t *sao_offset_val_u, int sao_left_class_u,\n+                                  const int16_t *sao_offset_val_v, int sao_left_class_v,\n+                                  int width, int height);\n+\n+void ff_hevc_rpi_sao_band_c_8_neon_10(uint8_t *_dst, const uint8_t *_src,\n+                                  ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                  const int16_t *sao_offset_val_u, int sao_left_class_u,\n+                                  const int16_t *sao_offset_val_v, int sao_left_class_v,\n+                                  int width, int height);\n+void ff_hevc_rpi_sao_band_c_16_neon_10(uint8_t *_dst, const uint8_t *_src,\n+                                  ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                  const int16_t *sao_offset_val_u, int sao_left_class_u,\n+                                  const int16_t *sao_offset_val_v, int sao_left_class_v,\n+                                  int width, int height);\n+void ff_hevc_rpi_sao_band_c_32_neon_10(uint8_t *_dst, const uint8_t *_src,\n+                                  ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                  const int16_t *sao_offset_val_u, int sao_left_class_u,\n+                                  const int16_t *sao_offset_val_v, int sao_left_class_v,\n+                                  int width, int height);\n+\n+void ff_hevc_rpi_sao_band_8_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                int16_t *sao_offset_val, int sao_left_class, int width, int height);\n+void ff_hevc_rpi_sao_band_16_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                int16_t *sao_offset_val, int sao_left_class, int width, int height);\n+void ff_hevc_rpi_sao_band_32_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                int16_t *sao_offset_val, int sao_left_class, int width, int height);\n+void ff_hevc_rpi_sao_band_64_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                int16_t *sao_offset_val, int sao_left_class, int width, int height);\n+\n+void ff_hevc_rpi_sao_band_8_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                int16_t *sao_offset_val, int sao_left_class, int width, int height);\n+void ff_hevc_rpi_sao_band_16_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                int16_t *sao_offset_val, int sao_left_class, int width, int height);\n+void ff_hevc_rpi_sao_band_32_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                int16_t *sao_offset_val, int sao_left_class, int width, int height);\n+void ff_hevc_rpi_sao_band_64_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                int16_t *sao_offset_val, int sao_left_class, int width, int height);\n+\n+\n+uint32_t ff_hevc_rpi_deblocking_boundary_strengths_neon(int pus, int dup, const struct HEVCRpiMvField *curr, const struct HEVCRpiMvField *neigh,\n+                                                const int *curr_rpl0, const int *curr_rpl1, const int *neigh_rpl0, const int *neigh_rpl1,\n+                                                int in_inc0, int in_inc1);\n+void ff_hevc_rpi_cpy_blks8x4_neon(uint8_t *dst, unsigned int stride_dst, const uint8_t *src, unsigned stride_src, unsigned int width, unsigned int height);\n+\n+\n+static void ff_hevc_rpi_sao_edge_48_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height)\n+{\n+    ff_hevc_rpi_sao_edge_32_neon_8(_dst, _src, stride_dst, _sao_offset_val, eo, 32, height);\n+    ff_hevc_rpi_sao_edge_16_neon_8(_dst + 32, _src + 32, stride_dst, _sao_offset_val, eo, 16, height);\n+}\n+static void ff_hevc_rpi_sao_edge_48_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height)\n+{\n+    ff_hevc_rpi_sao_edge_32_neon_10(_dst, _src, stride_dst, _sao_offset_val, eo, 32, height);\n+    ff_hevc_rpi_sao_edge_16_neon_10(_dst + 64, _src + 64, stride_dst, _sao_offset_val, eo, 16, height);\n+}\n+\n+static void ff_hevc_rpi_sao_band_48_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                int16_t *sao_offset_val, int sao_left_class, int width, int height)\n+{\n+    ff_hevc_rpi_sao_band_32_neon_8(_dst, _src, stride_dst, stride_src, sao_offset_val, sao_left_class, 32, height);\n+    ff_hevc_rpi_sao_band_16_neon_8(_dst + 32, _src + 32, stride_dst, stride_src, sao_offset_val, sao_left_class, 16, height);\n+}\n+static void ff_hevc_rpi_sao_band_48_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                int16_t *sao_offset_val, int sao_left_class, int width, int height)\n+{\n+    ff_hevc_rpi_sao_band_32_neon_10(_dst, _src, stride_dst, stride_src, sao_offset_val, sao_left_class, 32, height);\n+    ff_hevc_rpi_sao_band_16_neon_10(_dst + 64, _src + 64, stride_dst, stride_src, sao_offset_val, sao_left_class, 16, height);\n+}\n+\n+#if SAO_FILTER_N == 6\n+static void ff_hevc_rpi_sao_edge_24_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height)\n+{\n+    ff_hevc_rpi_sao_edge_16_neon_8(_dst, _src, stride_dst, _sao_offset_val, eo, 16, height);\n+    ff_hevc_rpi_sao_edge_8_neon_8(_dst + 16, _src + 16, stride_dst, _sao_offset_val, eo, 8, height);\n+}\n+static void ff_hevc_rpi_sao_edge_24_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *_sao_offset_val, int eo, int width, int height)\n+{\n+    ff_hevc_rpi_sao_edge_16_neon_10(_dst, _src, stride_dst, _sao_offset_val, eo, 16, height);\n+    ff_hevc_rpi_sao_edge_8_neon_10(_dst + 32, _src + 32, stride_dst, _sao_offset_val, eo, 8, height);\n+}\n+\n+static void ff_hevc_rpi_sao_band_24_neon_8(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                int16_t *sao_offset_val, int sao_left_class, int width, int height)\n+{\n+    ff_hevc_rpi_sao_band_16_neon_8(_dst, _src, stride_dst, stride_src, sao_offset_val, sao_left_class, 16, height);\n+    ff_hevc_rpi_sao_band_8_neon_8(_dst + 16, _src + 16, stride_dst, stride_src, sao_offset_val, sao_left_class, 8, height);\n+}\n+static void ff_hevc_rpi_sao_band_24_neon_10(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                int16_t *sao_offset_val, int sao_left_class, int width, int height)\n+{\n+    ff_hevc_rpi_sao_band_16_neon_10(_dst, _src, stride_dst, stride_src, sao_offset_val, sao_left_class, 16, height);\n+    ff_hevc_rpi_sao_band_8_neon_10(_dst + 32, _src + 32, stride_dst, stride_src, sao_offset_val, sao_left_class, 8, height);\n+}\n+\n+static void ff_hevc_rpi_sao_edge_c_24_neon_8(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst,\n+                                  const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v,\n+                                  int eo, int width, int height)\n+{\n+    ff_hevc_rpi_sao_edge_c_16_neon_8(_dst, _src, stride_dst, _sao_offset_val_u, _sao_offset_val_v, eo, 16, height);\n+    ff_hevc_rpi_sao_edge_c_8_neon_8(_dst + 32, _src + 32, stride_dst, _sao_offset_val_u, _sao_offset_val_v, eo, 8, height);\n+}\n+static void ff_hevc_rpi_sao_edge_c_24_neon_10(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst,\n+                                  const int16_t *_sao_offset_val_u, const int16_t *_sao_offset_val_v,\n+                                  int eo, int width, int height)\n+{\n+    ff_hevc_rpi_sao_edge_c_16_neon_10(_dst, _src, stride_dst, _sao_offset_val_u, _sao_offset_val_v, eo, 16, height);\n+    ff_hevc_rpi_sao_edge_c_8_neon_10(_dst + 64, _src + 64, stride_dst, _sao_offset_val_u, _sao_offset_val_v, eo, 8, height);\n+}\n+\n+static void ff_hevc_rpi_sao_band_c_24_neon_8(uint8_t *_dst, const uint8_t *_src,\n+                                  ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                  const int16_t *sao_offset_val_u, int sao_left_class_u,\n+                                  const int16_t *sao_offset_val_v, int sao_left_class_v,\n+                                  int width, int height)\n+{\n+    ff_hevc_rpi_sao_band_c_16_neon_8(_dst, _src, stride_dst, stride_src,\n+                                sao_offset_val_u, sao_left_class_u, sao_offset_val_v, sao_left_class_v, 16, height);\n+    ff_hevc_rpi_sao_band_c_8_neon_8(_dst + 32, _src + 32, stride_dst, stride_src,\n+                                sao_offset_val_u, sao_left_class_u, sao_offset_val_v, sao_left_class_v, 8, height);\n+}\n+static void ff_hevc_rpi_sao_band_c_24_neon_10(uint8_t *_dst, const uint8_t *_src,\n+                                  ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                  const int16_t *sao_offset_val_u, int sao_left_class_u,\n+                                  const int16_t *sao_offset_val_v, int sao_left_class_v,\n+                                  int width, int height)\n+{\n+    ff_hevc_rpi_sao_band_c_16_neon_10(_dst, _src, stride_dst, stride_src,\n+                                sao_offset_val_u, sao_left_class_u, sao_offset_val_v, sao_left_class_v, 16, height);\n+    ff_hevc_rpi_sao_band_c_8_neon_10(_dst + 64, _src + 64, stride_dst, stride_src,\n+                                sao_offset_val_u, sao_left_class_u, sao_offset_val_v, sao_left_class_v, 8, height);\n+}\n+#endif\n+\n+\n+\n+#if RPI_HEVC_SAO_BUF_STRIDE != 160\n+#error SAO edge src stride not 160 - value used in .S\n+#endif\n+\n+av_cold void ff_hevcdsp_rpi_init_neon(HEVCDSPContext *c, const int bit_depth)\n+{\n+    if (bit_depth == 8) {\n+        c->hevc_v_loop_filter_luma     = ff_hevc_rpi_v_loop_filter_luma_neon_8;\n+        c->hevc_v_loop_filter_luma_c   = ff_hevc_rpi_v_loop_filter_luma_neon_8;\n+        c->hevc_h_loop_filter_luma     = ff_hevc_rpi_h_loop_filter_luma_neon_8;\n+        c->hevc_h_loop_filter_luma_c   = ff_hevc_rpi_h_loop_filter_luma_neon_8;\n+        c->hevc_h_loop_filter_luma2    = ff_hevc_rpi_h_loop_filter_luma2_neon_8;\n+        c->hevc_v_loop_filter_luma2    = ff_hevc_rpi_v_loop_filter_luma2_neon_8;\n+        c->hevc_h_loop_filter_uv       = ff_hevc_rpi_h_loop_filter_uv_neon_8;\n+        c->hevc_v_loop_filter_uv2      = ff_hevc_rpi_v_loop_filter_uv2_neon_8;\n+        c->idct[0]                     = ff_hevc_rpi_transform_4x4_neon_8;\n+        c->idct[1]                     = ff_hevc_rpi_transform_8x8_neon_8;\n+        c->idct_dc[0]                  = ff_hevc_rpi_idct_4x4_dc_neon_8;\n+        c->idct_dc[1]                  = ff_hevc_rpi_idct_8x8_dc_neon_8;\n+        c->idct_dc[2]                  = ff_hevc_rpi_idct_16x16_dc_neon_8;\n+        c->idct_dc[3]                  = ff_hevc_rpi_idct_32x32_dc_neon_8;\n+        c->add_residual[0]             = ff_hevc_rpi_add_residual_4x4_neon_8;\n+        c->add_residual[1]             = ff_hevc_rpi_add_residual_8x8_neon_8;\n+        c->add_residual[2]             = ff_hevc_rpi_add_residual_16x16_neon_8;\n+        c->add_residual[3]             = ff_hevc_rpi_add_residual_32x32_neon_8;\n+        c->add_residual_dc[0]          = ff_hevc_rpi_add_residual_4x4_dc_neon_8;\n+        c->add_residual_dc[1]          = ff_hevc_rpi_add_residual_8x8_dc_neon_8;\n+        c->add_residual_dc[2]          = ff_hevc_rpi_add_residual_16x16_dc_neon_8;\n+        c->add_residual_dc[3]          = ff_hevc_rpi_add_residual_32x32_dc_neon_8;\n+        c->add_residual_u[0]           = ff_hevc_rpi_add_residual_4x4_u_neon_8;\n+        c->add_residual_u[1]           = ff_hevc_rpi_add_residual_8x8_u_neon_8;\n+        c->add_residual_u[2]           = ff_hevc_rpi_add_residual_16x16_u_neon_8;\n+        c->add_residual_v[0]           = ff_hevc_rpi_add_residual_4x4_v_neon_8;\n+        c->add_residual_v[1]           = ff_hevc_rpi_add_residual_8x8_v_neon_8;\n+        c->add_residual_v[2]           = ff_hevc_rpi_add_residual_16x16_v_neon_8;\n+        c->add_residual_c[0]           = ff_hevc_rpi_add_residual_4x4_c_neon_8;\n+        c->add_residual_c[1]           = ff_hevc_rpi_add_residual_8x8_c_neon_8;\n+        c->add_residual_c[2]           = ff_hevc_rpi_add_residual_16x16_c_neon_8;\n+        c->add_residual_dc_c[0]        = ff_hevc_rpi_add_residual_4x4_dc_c_neon_8;\n+        c->add_residual_dc_c[1]        = ff_hevc_rpi_add_residual_8x8_dc_c_neon_8;\n+        c->add_residual_dc_c[2]        = ff_hevc_rpi_add_residual_16x16_dc_c_neon_8;\n+        c->transform_4x4_luma          = ff_hevc_rpi_transform_luma_4x4_neon_8;\n+        c->sao_band_filter[0]          = ff_hevc_rpi_sao_band_8_neon_8;\n+        c->sao_band_filter[1]          = ff_hevc_rpi_sao_band_16_neon_8;\n+        c->sao_band_filter[2]          = ff_hevc_rpi_sao_band_32_neon_8;\n+        c->sao_band_filter[3]          = ff_hevc_rpi_sao_band_48_neon_8;\n+        c->sao_band_filter[4]          = ff_hevc_rpi_sao_band_64_neon_8;\n+        c->sao_edge_filter[0]          = ff_hevc_rpi_sao_edge_8_neon_8;\n+        c->sao_edge_filter[1]          = ff_hevc_rpi_sao_edge_16_neon_8;\n+        c->sao_edge_filter[2]          = ff_hevc_rpi_sao_edge_32_neon_8;\n+        c->sao_edge_filter[3]          = ff_hevc_rpi_sao_edge_48_neon_8;\n+        c->sao_edge_filter[4]          = ff_hevc_rpi_sao_edge_64_neon_8;\n+#if SAO_FILTER_N == 6\n+        c->sao_band_filter[5]          = ff_hevc_rpi_sao_band_24_neon_8;\n+        c->sao_edge_filter[5]          = ff_hevc_rpi_sao_edge_24_neon_8;\n+#endif\n+        c->sao_band_filter_c[0]        = ff_hevc_rpi_sao_band_c_8_neon_8;\n+        c->sao_band_filter_c[1]        = ff_hevc_rpi_sao_band_c_16_neon_8;\n+        c->sao_band_filter_c[2]        = ff_hevc_rpi_sao_band_c_32_neon_8;\n+\n+        c->sao_edge_filter_c[0]        = ff_hevc_rpi_sao_edge_c_8_neon_8;\n+        c->sao_edge_filter_c[1]        = ff_hevc_rpi_sao_edge_c_16_neon_8;\n+        c->sao_edge_filter_c[2]        = ff_hevc_rpi_sao_edge_c_32_neon_8;\n+\n+#if SAO_FILTER_N == 6\n+        c->sao_band_filter_c[5]        = ff_hevc_rpi_sao_band_c_24_neon_8;\n+        c->sao_edge_filter_c[5]        = ff_hevc_rpi_sao_edge_c_24_neon_8;\n+#endif\n+    }\n+    else if (bit_depth == 10) {\n+        c->hevc_v_loop_filter_luma     = ff_hevc_rpi_v_loop_filter_luma_neon_10;\n+        c->hevc_v_loop_filter_luma_c   = ff_hevc_rpi_v_loop_filter_luma_neon_10;\n+        c->hevc_h_loop_filter_luma     = ff_hevc_rpi_h_loop_filter_luma_neon_10;\n+        c->hevc_h_loop_filter_luma_c   = ff_hevc_rpi_h_loop_filter_luma_neon_10;\n+        c->hevc_h_loop_filter_luma2    = ff_hevc_rpi_h_loop_filter_luma2_neon_10;\n+        c->hevc_v_loop_filter_luma2    = ff_hevc_rpi_v_loop_filter_luma2_neon_10;\n+        c->hevc_h_loop_filter_uv       = ff_hevc_rpi_h_loop_filter_uv_neon_10;\n+        c->hevc_v_loop_filter_uv2      = ff_hevc_rpi_v_loop_filter_uv2_neon_10;\n+        c->idct[0]                     = ff_hevc_rpi_transform_4x4_neon_10;\n+        c->idct[1]                     = ff_hevc_rpi_transform_8x8_neon_10;\n+        c->idct_dc[0]                  = ff_hevc_rpi_idct_4x4_dc_neon_10;\n+        c->idct_dc[1]                  = ff_hevc_rpi_idct_8x8_dc_neon_10;\n+        c->idct_dc[2]                  = ff_hevc_rpi_idct_16x16_dc_neon_10;\n+        c->idct_dc[3]                  = ff_hevc_rpi_idct_32x32_dc_neon_10;\n+        c->add_residual[0]             = ff_hevc_rpi_add_residual_4x4_neon_10;\n+        c->add_residual[1]             = ff_hevc_rpi_add_residual_8x8_neon_10;\n+        c->add_residual[2]             = ff_hevc_rpi_add_residual_16x16_neon_10;\n+        c->add_residual[3]             = ff_hevc_rpi_add_residual_32x32_neon_10;\n+        c->add_residual_dc[0]          = ff_hevc_rpi_add_residual_4x4_dc_neon_10;\n+        c->add_residual_dc[1]          = ff_hevc_rpi_add_residual_8x8_dc_neon_10;\n+        c->add_residual_dc[2]          = ff_hevc_rpi_add_residual_16x16_dc_neon_10;\n+        c->add_residual_dc[3]          = ff_hevc_rpi_add_residual_32x32_dc_neon_10;\n+        c->add_residual_u[0]           = ff_hevc_rpi_add_residual_4x4_u_neon_10;\n+        c->add_residual_u[1]           = ff_hevc_rpi_add_residual_8x8_u_neon_10;\n+        c->add_residual_u[2]           = ff_hevc_rpi_add_residual_16x16_u_neon_10;\n+        c->add_residual_v[0]           = ff_hevc_rpi_add_residual_4x4_v_neon_10;\n+        c->add_residual_v[1]           = ff_hevc_rpi_add_residual_8x8_v_neon_10;\n+        c->add_residual_v[2]           = ff_hevc_rpi_add_residual_16x16_v_neon_10;\n+        c->add_residual_c[0]           = ff_hevc_rpi_add_residual_4x4_c_neon_10;\n+        c->add_residual_c[1]           = ff_hevc_rpi_add_residual_8x8_c_neon_10;\n+        c->add_residual_c[2]           = ff_hevc_rpi_add_residual_16x16_c_neon_10;\n+        c->add_residual_dc_c[0]        = ff_hevc_rpi_add_residual_4x4_dc_c_neon_10;\n+        c->add_residual_dc_c[1]        = ff_hevc_rpi_add_residual_8x8_dc_c_neon_10;\n+        c->add_residual_dc_c[2]        = ff_hevc_rpi_add_residual_16x16_dc_c_neon_10;\n+        c->transform_4x4_luma          = ff_hevc_rpi_transform_luma_4x4_neon_10;\n+        c->sao_band_filter[0]          = ff_hevc_rpi_sao_band_8_neon_10;\n+        c->sao_band_filter[1]          = ff_hevc_rpi_sao_band_16_neon_10;\n+        c->sao_band_filter[2]          = ff_hevc_rpi_sao_band_32_neon_10;\n+        c->sao_band_filter[3]          = ff_hevc_rpi_sao_band_48_neon_10;\n+        c->sao_band_filter[4]          = ff_hevc_rpi_sao_band_64_neon_10;\n+\n+        c->sao_edge_filter[0]          = ff_hevc_rpi_sao_edge_8_neon_10;\n+        c->sao_edge_filter[1]          = ff_hevc_rpi_sao_edge_16_neon_10;\n+        c->sao_edge_filter[2]          = ff_hevc_rpi_sao_edge_32_neon_10;\n+        c->sao_edge_filter[3]          = ff_hevc_rpi_sao_edge_48_neon_10;\n+        c->sao_edge_filter[4]          = ff_hevc_rpi_sao_edge_64_neon_10;\n+#if SAO_FILTER_N == 6\n+        c->sao_band_filter[5]          = ff_hevc_rpi_sao_band_24_neon_10;\n+        c->sao_edge_filter[5]          = ff_hevc_rpi_sao_edge_24_neon_10;\n+#endif\n+        c->sao_band_filter_c[0]        = ff_hevc_rpi_sao_band_c_8_neon_10;\n+        c->sao_band_filter_c[1]        = ff_hevc_rpi_sao_band_c_16_neon_10;\n+        c->sao_band_filter_c[2]        = ff_hevc_rpi_sao_band_c_32_neon_10;\n+\n+        c->sao_edge_filter_c[0]        = ff_hevc_rpi_sao_edge_c_8_neon_10;\n+        c->sao_edge_filter_c[1]        = ff_hevc_rpi_sao_edge_c_16_neon_10;\n+        c->sao_edge_filter_c[2]        = ff_hevc_rpi_sao_edge_c_32_neon_10;\n+\n+#if SAO_FILTER_N == 6\n+        c->sao_band_filter_c[5]        = ff_hevc_rpi_sao_band_c_24_neon_10;\n+        c->sao_edge_filter_c[5]        = ff_hevc_rpi_sao_edge_c_24_neon_10;\n+#endif\n+    }\n+\n+    assert(offsetof(HEVCRpiMvField, mv) == 0);\n+    assert(offsetof(HEVCRpiMvField, ref_idx) == 8);\n+    assert(offsetof(HEVCRpiMvField, pred_flag) == 10);\n+    c->hevc_deblocking_boundary_strengths = ff_hevc_rpi_deblocking_boundary_strengths_neon;\n+    c->cpy_blk = ff_hevc_rpi_cpy_blks8x4_neon;\n+}\ndiff --git a/libavcodec/arm/rpi_hevcdsp_res16_neon.S b/libavcodec/arm/rpi_hevcdsp_res16_neon.S\nnew file mode 100644\nindex 0000000000..93876d14c0\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcdsp_res16_neon.S\n@@ -0,0 +1,620 @@\n+/*\n+Copyright (c) 2017 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox, Ben Avison\n+*/\n+\n+#include \"libavutil/arm/asm.S\"\n+#include \"neon.S\"\n+\n+ .arch_extension mp @ enable PLDW\n+\n+#define BIT_DEPTH 10\n+\n+.macro clip16_4 Q0, Q1, Q2, Q3, Q_MIN, Q_MAX\n+        vmax.s16  \\Q0, \\Q_MIN\n+        vmax.s16  \\Q1, \\Q_MIN\n+        vmax.s16  \\Q2, \\Q_MIN\n+        vmax.s16  \\Q3, \\Q_MIN\n+        vmin.s16  \\Q0, \\Q_MAX\n+        vmin.s16  \\Q1, \\Q_MAX\n+        vmin.s16  \\Q2, \\Q_MAX\n+        vmin.s16  \\Q3, \\Q_MAX\n+.endm\n+\n+@ add_residual4x4(\n+@  uint16_t *_dst,    [r0]\n+@  int16_t *res,      [r1]\n+@  ptrdiff_t stride)  [r2]\n+\n+function JOIN(ff_hevc_rpi_add_residual_4x4_neon_, BIT_DEPTH), export=1\n+        add         ip, r0, r2\n+        vld1.16     {q10, q11}, [r1]\n+        lsl         r2, #1\n+        vld1.16     {d0}, [r0 :64], r2\n+        vld1.16     {d1}, [ip :64], r2\n+        vld1.16     {d2}, [r0 :64]\n+        vld1.16     {d3}, [ip :64]\n+        sub         r0, r2\n+        vqadd.s16   q0,  q10\n+        sub         ip, r2\n+        vqadd.s16   q1,  q11\n+        vmov.i16    q8,  #0\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+        vmax.s16    q0,  q0,  q8\n+        vmax.s16    q1,  q1,  q8\n+        vmin.s16    q0,  q0,  q9\n+        vmin.s16    q1,  q1,  q9\n+        vst1.16     {d0}, [r0 :64], r2\n+        vst1.16     {d1}, [ip :64], r2\n+        vst1.16     {d2}, [r0 :64]\n+        vst1.16     {d3}, [ip :64]\n+        bx          lr\n+\n+endfunc\n+\n+@ add_residual4x4_dc(\n+@  uint16_t *_dst,    [r0]\n+@  ptrdiff_t stride,  [r1]\n+@  int dc)            [r2]\n+\n+function JOIN(ff_hevc_rpi_add_residual_4x4_dc_neon_, BIT_DEPTH), export=1\n+        add         ip, r0, r1\n+        vdup.16     q15, r2\n+        lsl         r1, #1\n+        vld1.16     {d0}, [r0 :64], r1\n+        vld1.16     {d1}, [ip :64], r1\n+        vld1.16     {d2}, [r0 :64]\n+        vld1.16     {d3}, [ip :64]\n+        sub         r0, r1\n+        vqadd.s16   q0,  q15\n+        sub         ip, r1\n+        vqadd.s16   q1,  q15\n+        vmov.i16    q8,  #0\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+        vmax.s16    q0,  q0,  q8\n+        vmax.s16    q1,  q1,  q8\n+        vmin.s16    q0,  q0,  q9\n+        vmin.s16    q1,  q1,  q9\n+        vst1.16     {d0}, [r0 :64], r1\n+        vst1.16     {d1}, [ip :64], r1\n+        vst1.16     {d2}, [r0 :64]\n+        vst1.16     {d3}, [ip :64]\n+        bx          lr\n+\n+endfunc\n+\n+\n+@ add_residual8x8(\n+@  uint16_t *_dst,    [r0]\n+@  int16_t *res,      [r1]\n+@  ptrdiff_t stride)  [r2]\n+\n+function JOIN(ff_hevc_rpi_add_residual_8x8_neon_, BIT_DEPTH), export=1\n+        mov         r3, #8\n+        vmov.i64    q8,  #0\n+        add         ip, r0, r2\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+        lsl         r2, #1\n+1:\n+        vldm        r1!, {q10-q13}\n+        vld1.16     {q0}, [r0 :128], r2\n+        vld1.16     {q1}, [ip :128], r2\n+        vld1.16     {q2}, [r0 :128]\n+        vld1.16     {q3}, [ip :128]\n+        sub         r0, r2\n+        vqadd.s16   q0,  q10\n+        sub         ip, r2\n+        vqadd.s16   q1,  q11\n+        subs        r3, #4\n+        vqadd.s16   q2,  q12\n+        vqadd.s16   q3,  q13\n+        clip16_4    q0, q1, q2, q3, q8, q9\n+        vst1.16     {q0}, [r0 :128], r2\n+        vst1.16     {q1}, [ip :128], r2\n+        vst1.16     {q2}, [r0 :128], r2\n+        vst1.16     {q3}, [ip :128], r2\n+        bne         1b\n+        bx          lr\n+\n+endfunc\n+\n+@ add_residual4x4_dc_c(\n+@  uint16_t *_dst,    [r0]\n+@  ptrdiff_t stride,  [r1]\n+@  int dc_uv)         [r2]\n+\n+function JOIN(ff_hevc_rpi_add_residual_4x4_dc_c_neon_, BIT_DEPTH), export=1\n+        mov         r3, #4\n+        vdup.32     q15, r2\n+        b           9f\n+endfunc\n+\n+@ add_residual8x8_dc(\n+@  uint16_t *_dst,    [r0]\n+@  ptrdiff_t stride,  [r1]\n+@  int dc)            [r2]\n+\n+function JOIN(ff_hevc_rpi_add_residual_8x8_dc_neon_, BIT_DEPTH), export=1\n+        vdup.16     q15, r2\n+        mov         r3, #8\n+9:\n+        vmov.i16    q8,  #0\n+        add         ip, r0, r1\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+        lsl         r1, #1\n+1:\n+        vld1.16     {q0}, [r0 :128], r1\n+        vld1.16     {q1}, [ip :128], r1\n+        vld1.16     {q2}, [r0 :128]\n+        vld1.16     {q3}, [ip :128]\n+        sub         r0, r1\n+        vqadd.s16   q0,  q15\n+        sub         ip, r1\n+        vqadd.s16   q1,  q15\n+        subs        r3, #4\n+        vqadd.s16   q2,  q15\n+        vqadd.s16   q3,  q15\n+        clip16_4    q0, q1, q2, q3, q8, q9\n+        vst1.16     {q0}, [r0 :128], r1\n+        vst1.16     {q1}, [ip :128], r1\n+        vst1.16     {q2}, [r0 :128], r1\n+        vst1.16     {q3}, [ip :128], r1\n+        bne         1b\n+        bx          lr\n+\n+endfunc\n+\n+@ add_residual16x16(\n+@  uint16_t *_dst,    [r0]\n+@  int16_t *res,      [r1]\n+@  ptrdiff_t stride)  [r2]\n+\n+function JOIN(ff_hevc_rpi_add_residual_16x16_neon_, BIT_DEPTH), export=1\n+        add         ip, r0, r2\n+        vmov.i16    q8,  #0\n+        lsl         r2, #1\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+        mov         r3, #16\n+1:\n+        vldm        r1!, {q10-q13}\n+        @ For RPI Sand we could guarantee :256 but not for general\n+        @ non-RPI allocation. :128 is as good as we can claim\n+        vld1.16     {q0, q1}, [r0 :128]\n+        subs        r3, #2\n+        vld1.16     {q2, q3}, [ip :128]\n+        vqadd.s16   q0,  q10\n+        vqadd.s16   q1,  q11\n+        vqadd.s16   q2,  q12\n+        vqadd.s16   q3,  q13\n+        clip16_4    q0, q1, q2, q3, q8, q9\n+        vst1.16     {q0, q1}, [r0 :128], r2\n+        vst1.16     {q2, q3}, [ip :128], r2\n+        bne         1b\n+        bx          lr\n+endfunc\n+\n+@ add_residual8x8_dc_c(\n+@  uint16_t *_dst,    [r0]\n+@  ptrdiff_t stride,  [r1]\n+@  int dc_uv)         [r2]\n+\n+function JOIN(ff_hevc_rpi_add_residual_8x8_dc_c_neon_, BIT_DEPTH), export=1\n+        mov         r3, #8\n+        vdup.32     q15, r2\n+        b           9f\n+endfunc\n+\n+@ add_residual16x16_dc(\n+@  uint16_t *_dst,    [r0]\n+@  ptrdiff_t stride,  [r1]\n+@  int dc)            [r2]\n+\n+function JOIN(ff_hevc_rpi_add_residual_16x16_dc_neon_, BIT_DEPTH), export=1\n+        vdup.i16    q15, r2\n+        mov         r3, #16\n+9:\n+        vmov.i16    q8,  #0\n+        add         ip, r0, r1\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+        lsl         r1, #1\n+1:\n+        @ For RPI Sand we could guarantee :256 but not for general\n+        @ non-RPI allocation. :128 is as good as we can claim\n+        vld1.16     {q0, q1}, [r0 :128]\n+        subs        r3, #2\n+        vqadd.s16   q0,  q15\n+        vqadd.s16   q1,  q15\n+        vld1.16     {q2, q3}, [ip :128]\n+        vqadd.s16   q2,  q15\n+        vqadd.s16   q3,  q15\n+        clip16_4    q0, q1, q2, q3, q8, q9\n+        vst1.16     {q0, q1}, [r0 :128], r1\n+        vst1.16     {q2, q3}, [ip :128], r1\n+        bne         1b\n+        bx          lr\n+\n+endfunc\n+\n+\n+@ add_residual32x32(\n+@  uint16_t *_dst,    [r0]\n+@  int16_t *res,      [r1]\n+@  ptrdiff_t stride)  [r2]\n+\n+function JOIN(ff_hevc_rpi_add_residual_32x32_neon_, BIT_DEPTH), export=1\n+        push        {lr}\n+        mov         r3, #32\n+        vmov.i16    q8,  #0\n+        add         lr, r0, r2\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+        add         ip, r0, #32\n+1:\n+        vldm        r1!, {q10-q13}\n+        vldm        r0,  {q0-q3}\n+        vqadd.s16   q0,  q10\n+          pldw        [lr]\n+        vqadd.s16   q1,  q11\n+          add         lr, r2\n+        vqadd.s16   q2,  q12\n+        subs        r3, #1\n+        vqadd.s16   q3,  q13\n+        clip16_4    q0, q1, q2, q3, q8, q9\n+        vst1.16     {q0-q1}, [r0], r2\n+        vst1.16     {q2-q3}, [ip], r2\n+        bne         1b\n+        pop         {pc}\n+\n+endfunc\n+\n+@ add_residual16x16_dc_c(\n+@  uint16_t *_dst,    [r0]\n+@  ptrdiff_t stride,  [r1]\n+@  int dc_uv)         [r2]\n+\n+function JOIN(ff_hevc_rpi_add_residual_16x16_dc_c_neon_, BIT_DEPTH), export=1\n+        mov         r3, #16\n+        vdup.32     q15, r2\n+        b           9f\n+endfunc\n+\n+@ add_residual32x32_dc(\n+@  uint16_t *_dst,    [r0]\n+@  ptrdiff_t stride,  [r1]\n+@  int dc)            [r2]\n+\n+function JOIN(ff_hevc_rpi_add_residual_32x32_dc_neon_, BIT_DEPTH), export=1\n+        vdup.16     q15, r2\n+        mov         r3, #32\n+9:\n+        vmov.i16    q8,  #0\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+        add         ip, r0, #32\n+1:\n+        vldm        r0,  {q0-q3}\n+        vqadd.s16   q0,  q15\n+        subs        r3, #1\n+        vqadd.s16   q1,  q15\n+        vqadd.s16   q2,  q15\n+        vqadd.s16   q3,  q15\n+        clip16_4    q0, q1, q2, q3, q8, q9\n+        vst1.16     {q0-q1}, [r0], r1\n+        vst1.16     {q2-q3}, [ip], r1\n+        bne         1b\n+        bx          lr\n+\n+endfunc\n+\n+@ ============================================================================\n+@ U add\n+\n+@ add_residual4x4_u(\n+@   uint16_t *_dst,       [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride,     [r2]\n+@   int dc)               [r3]\n+\n+function JOIN(ff_hevc_rpi_add_residual_4x4_u_neon_, BIT_DEPTH), export=1\n+        vdup.16     q15, r3\n+        add         ip, r0, r2\n+        vld1.16     {q10, q11}, [r1 :256]\n+        lsl         r2, #1\n+        vld2.16     {d0, d2}, [r0 :128], r2\n+        vld2.16     {d1, d3}, [ip :128], r2\n+        vld2.16     {d4, d6}, [r0 :128]\n+        vld2.16     {d5, d7}, [ip :128]\n+        sub         r0, r2\n+        vmov.i16    q8,  #0\n+        sub         ip, r2\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+\n+        vqadd.s16   q0,  q10\n+        vqadd.s16   q1,  q15\n+        vqadd.s16   q2,  q11\n+        vqadd.s16   q3,  q15\n+        clip16_4    q0, q1, q2, q3, q8, q9\n+\n+        vst2.16     {d0, d2}, [r0 :128], r2\n+        vst2.16     {d1, d3}, [ip :128], r2\n+        vst2.16     {d4, d6}, [r0 :128]\n+        vst2.16     {d5, d7}, [ip :128]\n+        bx          lr\n+endfunc\n+\n+@ add_residual8x8_u(\n+@   uint16_t *_dst,       [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride,     [r2]\n+@   int dc)               [r3]\n+\n+function JOIN(ff_hevc_rpi_add_residual_8x8_u_neon_, BIT_DEPTH), export=1\n+        vdup.16     q15, r3\n+        mov         r3, #8\n+        vmov.i16    q8,  #0\n+        add         ip, r0, r2\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+        lsl         r2, #1\n+1:\n+        vld2.16     {q0, q1}, [r0 :256]\n+        subs        r3, #2\n+        vld2.16     {q2, q3}, [ip :256]\n+        vld1.16     {q10, q11}, [r1 :256]!\n+        vqadd.s16   q0,  q10\n+        vqadd.s16   q1,  q15\n+        vqadd.s16   q2,  q11\n+        vqadd.s16   q3,  q15\n+        clip16_4    q0, q1, q2, q3, q8, q9\n+        vst2.16     {q0, q1}, [r0 :256], r2\n+        vst2.16     {q2, q3}, [ip :256], r2\n+        bne         1b\n+        bx          lr\n+endfunc\n+\n+@ add_residual16x16_u(\n+@   uint16_t *_dst,       [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride,     [r2]\n+@   int dc)               [r3]\n+\n+function JOIN(ff_hevc_rpi_add_residual_16x16_u_neon_, BIT_DEPTH), export=1\n+        push        {lr}\n+        vdup.16     q15, r3\n+        mov         r3, #16\n+        vmov.i16    q8,  #0\n+        add         lr, r0, r2\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+        add         ip, r0, #32\n+1:\n+        vld2.16     {q0, q1}, [r0 :256]\n+        vld2.16     {q2, q3}, [ip :256]\n+        vld1.16     {q10, q11}, [r1 :256]!\n+        vqadd.s16   q0,  q10\n+          pldw        [lr]\n+        vqadd.s16   q1,  q15\n+          add         lr, r2\n+        vqadd.s16   q2,  q11\n+        subs        r3, #1\n+        vqadd.s16   q3,  q15\n+        clip16_4    q0, q1, q2, q3, q8, q9\n+        vst2.16     {q0, q1}, [r0 :256], r2\n+        vst2.16     {q2, q3}, [ip :256], r2\n+        bne         1b\n+        pop         {pc}\n+endfunc\n+\n+@ ============================================================================\n+@ V add\n+\n+@ add_residual4x4_v(\n+@   uint16_t *_dst,       [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride,     [r2]\n+@   int dc)               [r3]\n+\n+function JOIN(ff_hevc_rpi_add_residual_4x4_v_neon_, BIT_DEPTH), export=1\n+        vdup.16     q15, r3\n+        add         ip, r0, r2\n+        vld1.16     {q10, q11}, [r1 :256]\n+        lsl         r2, #1\n+        vld2.16     {d0, d2}, [r0 :128], r2\n+        vld2.16     {d1, d3}, [ip :128], r2\n+        vld2.16     {d4, d6}, [r0 :128]\n+        vld2.16     {d5, d7}, [ip :128]\n+        sub         r0, r2\n+        vmov.i16    q8,  #0\n+        sub         ip, r2\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+\n+        vqadd.s16   q0,  q15\n+        vqadd.s16   q1,  q10\n+        vqadd.s16   q2,  q15\n+        vqadd.s16   q3,  q11\n+        clip16_4    q0, q1, q2, q3, q8, q9\n+\n+        vst2.16     {d0, d2}, [r0 :128], r2\n+        vst2.16     {d1, d3}, [ip :128], r2\n+        vst2.16     {d4, d6}, [r0 :128]\n+        vst2.16     {d5, d7}, [ip :128]\n+        bx          lr\n+endfunc\n+\n+@ add_residual8x8_v(\n+@   uint16_t *_dst,       [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride,     [r2]\n+@   int dc)               [r3]\n+\n+function JOIN(ff_hevc_rpi_add_residual_8x8_v_neon_, BIT_DEPTH), export=1\n+        vdup.16     q15, r3\n+        mov         r3, #8\n+        vmov.i16    q8,  #0\n+        add         ip, r0, r2\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+        lsl         r2, #1\n+1:\n+        vld2.16     {q0, q1}, [r0 :256]\n+        subs        r3, #2\n+        vld2.16     {q2, q3}, [ip :256]\n+        vld1.16     {q10, q11}, [r1 :256]!\n+        vqadd.s16   q0,  q15\n+        vqadd.s16   q1,  q10\n+        vqadd.s16   q2,  q15\n+        vqadd.s16   q3,  q11\n+        clip16_4    q0, q1, q2, q3, q8, q9\n+        vst2.16     {q0, q1}, [r0 :256], r2\n+        vst2.16     {q2, q3}, [ip :256], r2\n+        bne         1b\n+        bx          lr\n+endfunc\n+\n+@ add_residual16x16_v(\n+@   uint16_t *_dst,       [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride,     [r2]\n+@   int dc)               [r3]\n+\n+function JOIN(ff_hevc_rpi_add_residual_16x16_v_neon_, BIT_DEPTH), export=1\n+        push        {lr}\n+        vdup.16     q15, r3\n+        mov         r3, #16\n+        vmov.i16    q8,  #0\n+        add         lr, r0, r2\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+        add         ip, r0, #32\n+1:\n+        vld2.16     {q0, q1}, [r0 :256]\n+        vld2.16     {q2, q3}, [ip :256]\n+        vld1.16     {q10, q11}, [r1 :256]!\n+        vqadd.s16   q0,  q15\n+          pldw        [lr]\n+        vqadd.s16   q1,  q10\n+          add         lr, r2\n+        vqadd.s16   q2,  q15\n+        subs        r3, #1\n+        vqadd.s16   q3,  q11\n+        clip16_4    q0, q1, q2, q3, q8, q9\n+        vst2.16     {q0, q1}, [r0 :256], r2\n+        vst2.16     {q2, q3}, [ip :256], r2\n+        bne         1b\n+        pop         {pc}\n+endfunc\n+\n+@ ============================================================================\n+@ U & V add\n+\n+@ add_residual4x4_c(\n+@   uint16_t *_dst,       [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride)     [r2]\n+\n+function JOIN(ff_hevc_rpi_add_residual_4x4_c_neon_, BIT_DEPTH), export=1\n+        vmov.i16    q8,  #0\n+        add         ip, r0, r2\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+        lsl         r2, #1\n+        vldm        r1, {q10-q13}\n+        vld2.16     {d0, d2}, [r0 :128], r2\n+        vld2.16     {d1, d3}, [ip :128], r2\n+        vld2.16     {d4, d6}, [r0 :128]\n+        vld2.16     {d5, d7}, [ip :128]\n+\n+        sub         r0, r2\n+        vqadd.s16   q0,  q10\n+        sub         ip, r2\n+        vqadd.s16   q1,  q12\n+        vqadd.s16   q2,  q11\n+        vqadd.s16   q3,  q13\n+        clip16_4    q0, q1, q2, q3, q8, q9\n+\n+        vst2.16     {d0, d2}, [r0 :128], r2\n+        vst2.16     {d1, d3}, [ip :128], r2\n+        vst2.16     {d4, d6}, [r0 :128]\n+        vst2.16     {d5, d7}, [ip :128]\n+        bx          lr\n+endfunc\n+\n+@ add_residual8x8_c(\n+@   uint16_t *_dst,       [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride)     [r2]\n+\n+function JOIN(ff_hevc_rpi_add_residual_8x8_c_neon_, BIT_DEPTH), export=1\n+        push        {lr}\n+        add         ip, r0, r2\n+        lsl         r2, #1\n+        vmov.i16    q8,  #0\n+        add         r3, r1, #(8*8*2)  @ Offset to V\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+        mov         lr, #8\n+1:\n+        vld1.16     {q10, q11}, [r1 :256]!\n+        subs        lr, #2\n+        vld2.16     {q0, q1}, [r0 :256]\n+        vld2.16     {q2, q3}, [ip :256]\n+        vld1.16     {q12, q13}, [r3 :256]!\n+        vqadd.s16   q0,  q10\n+        vqadd.s16   q1,  q12\n+        vqadd.s16   q2,  q11\n+        vqadd.s16   q3,  q13\n+        clip16_4    q0, q1, q2, q3, q8, q9\n+        vst2.16     {q0, q1}, [r0 :256], r2\n+        vst2.16     {q2, q3}, [ip :256], r2\n+        bne         1b\n+        pop         {pc}\n+endfunc\n+\n+@ add_residual16x16_c(\n+@   uint16_t *_dst,       [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride)     [r2]\n+\n+function JOIN(ff_hevc_rpi_add_residual_16x16_c_neon_, BIT_DEPTH), export=1\n+        push        {r4, lr}\n+        vmov.i16    q8,  #0\n+        add         r3,  r1, #(16*16*2)  @ Offset to V\n+        vmov.i16    q9,  #(1 << BIT_DEPTH) - 1\n+        add         ip, r0, #32\n+        add         r4, r0, r2\n+        mov         lr, #16\n+1:\n+        vld2.16     {q0, q1}, [r0 :256]\n+        vld2.16     {q2, q3}, [ip :256]\n+        vld1.16     {q10, q11}, [r1 :256]!\n+        vld1.16     {q12, q13}, [r3 :256]!\n+        vqadd.s16   q0,  q10\n+          pldw        [r4]\n+        vqadd.s16   q1,  q12\n+          add         r4, r2\n+        vqadd.s16   q2,  q11\n+        subs        lr, #1\n+        vqadd.s16   q3,  q13\n+        clip16_4    q0, q1, q2, q3, q8, q9\n+        vst2.16     {q0, q1}, [r0 :256], r2\n+        vst2.16     {q2, q3}, [ip :256], r2\n+        bne         1b\n+        pop         {r4,pc}\n+endfunc\n+\ndiff --git a/libavcodec/arm/rpi_hevcdsp_res8_neon.S b/libavcodec/arm/rpi_hevcdsp_res8_neon.S\nnew file mode 100644\nindex 0000000000..d9a1d7d98c\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcdsp_res8_neon.S\n@@ -0,0 +1,741 @@\n+/*\n+Copyright (c) 2017 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox, Ben Avison\n+*/\n+\n+#include \"libavutil/arm/asm.S\"\n+#include \"neon.S\"\n+\n+ .arch_extension mp @ enable PLDW\n+\n+@ General notes:\n+@\n+@ Residual is generally only guaranteed to be clipped to 16 bits.\n+@ This means that we do need to do vmovl, vqadd, vqmovun\n+@ rather than vaddw, vqmovun (if we were clipped to 15 then we could get away\n+@ with this).\n+@\n+@ There is an exception for the DC case because its transform is guaranteed\n+@ to be small enough that overflow cannot occur during the first add.\n+\n+@ ============================================================================\n+@ Y add\n+\n+function ff_hevc_rpi_add_residual_4x4_neon_8, export=1\n+        add         ip, r0, r2\n+        vld1.16     {q0, q1}, [r1]\n+        lsl         r2, #1\n+        vld1.32     d4[0], [r0], r2\n+        rsb         r3, r2, #0\n+        vld1.32     d4[1], [ip], r2\n+        vld1.32     d5[0], [r0], r3\n+        vld1.32     d5[1], [ip], r3\n+        vmovl.u8    q8, d4\n+        vmovl.u8    q9, d5\n+        vqadd.s16   q0, q8\n+        vqadd.s16   q1, q9\n+        vqmovun.s16 d0, q0\n+        vqmovun.s16 d1, q1\n+        vst1.32     d0[0], [r0], r2\n+        vst1.32     d0[1], [ip], r2\n+        vst1.32     d1[0], [r0]\n+        vst1.32     d1[1], [ip]\n+        bx          lr\n+endfunc\n+\n+function ff_hevc_rpi_add_residual_8x8_neon_8, export=1\n+        push        {r4, lr}\n+        vld1.16     {q0, q1}, [r1]!\n+        add         ip, r0, r2\n+        vld1.8      {d6}, [r0]\n+        add         r4, r0, r2, lsl #1\n+        vld1.8      {d7}, [ip]\n+        add         lr, ip, r2, lsl #1\n+        lsl         r2, #1\n+        mov         r3, #8-2\n+        vmovl.u8    q2, d6\n+        vmovl.u8    q3, d7\n+        vqadd.s16   q2, q0\n+        vqadd.s16   q3, q1\n+1:\n+          vld1.16     {q0, q1}, [r1]!\n+        subs        r3, #2\n+        vqmovun.s16 d4, q2\n+        vqmovun.s16 d5, q3\n+          vld1.8      {d6}, [r4], r2\n+          vld1.8      {d7}, [lr], r2\n+        vst1.8      {d4}, [r0], r2\n+        vst1.8      {d5}, [ip], r2\n+          vmovl.u8    q2, d6\n+            pldw        [r4]\n+          vmovl.u8    q3, d7\n+          vqadd.s16   q2, q0\n+          vqadd.s16   q3, q1\n+        bne         1b\n+\n+          vqmovun.s16 d4, q2\n+          vqmovun.s16 d5, q3\n+          vst1.8      {d4}, [r0]\n+          vst1.8      {d5}, [ip]\n+          pop         {r4, pc}\n+endfunc\n+\n+function ff_hevc_rpi_add_residual_16x16_neon_8, export=1\n+        vld1.16     {q0, q1}, [r1]!\n+        add         ip, r0, r2\n+        vld1.8      {q3}, [r0]\n+        mov         r3, #16-1\n+        vmovl.u8    q2, d6\n+        vmovl.u8    q3, d7\n+        vqadd.s16   q2, q0\n+        vqadd.s16   q3, q1\n+1:\n+          vld1.16     {q0, q1}, [r1]!\n+        subs        r3, #1\n+        vqmovun.s16 d4, q2\n+        vqmovun.s16 d5, q3\n+          vld1.8      {q3}, [ip], r2\n+        vst1.8      {q2}, [r0], r2\n+          vmovl.u8    q2, d6\n+            pldw        [ip]\n+          vmovl.u8    q3, d7\n+          vqadd.s16   q2, q0\n+          vqadd.s16   q3, q1\n+        bne         1b\n+\n+          vqmovun.s16 d4, q2\n+          vqmovun.s16 d5, q3\n+          vst1.8      {q2}, [r0]\n+          bx          lr\n+endfunc\n+\n+function ff_hevc_rpi_add_residual_32x32_neon_8, export=1\n+        vldm        r1!, {q0-q3}\n+        vld1.8      {q8, q9}, [r0]\n+        add         ip, r0, r2\n+        vmovl.u8    q10, d16\n+        mov         r3, #32-1\n+        vmovl.u8    q11, d17\n+        vmovl.u8    q12, d18\n+        vmovl.u8    q13, d19\n+        vqadd.s16   q10, q0\n+        vqadd.s16   q11, q1\n+        vqadd.s16   q12, q2\n+        vqadd.s16   q13, q3\n+1:\n+          vldm        r1!, {q0-q3}\n+        vqmovun.s16 d20, q10\n+        vqmovun.s16 d21, q11\n+        vqmovun.s16 d22, q12\n+        vqmovun.s16 d23, q13\n+          vld1.8      {q8, q9}, [ip], r2\n+        subs        r3, #1\n+        vst1.8      {q10, q11}, [r0], r2\n+          vmovl.u8    q10, d16\n+            pldw        [ip]\n+          vmovl.u8    q11, d17\n+          vmovl.u8    q12, d18\n+          vmovl.u8    q13, d19\n+          vqadd.s16   q10, q0\n+          vqadd.s16   q11, q1\n+          vqadd.s16   q12, q2\n+          vqadd.s16   q13, q3\n+        bne     1b\n+\n+          vqmovun.s16 d20, q10\n+          vqmovun.s16 d21, q11\n+          vqmovun.s16 d22, q12\n+          vqmovun.s16 d23, q13\n+          vst1.8      {q10, q11}, [r0]\n+          bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_add_residual_4x4_dc_neon_8(\n+@   uint8_t * dst,              // [r0]\n+@   unsigned int stride,        // [r1]\n+@   int dc)                     // [r2]\n+\n+function ff_hevc_rpi_add_residual_4x4_dc_neon_8, export=1\n+        add         ip, r0, r1\n+        vdup.16     q15, r2\n+        lsl         r1, #1\n+        vld1.32     d4[0], [r0], r1\n+        rsb         r3, r1, #0\n+        vld1.32     d4[1], [ip], r1\n+        vld1.32     d5[0], [r0], r3\n+        vld1.32     d5[1], [ip], r3\n+        vaddw.u8    q0, q15, d4\n+        vaddw.u8    q1, q15, d5\n+        vqmovun.s16 d0, q0\n+        vqmovun.s16 d1, q1\n+        vst1.32     d0[0], [r0], r1\n+        vst1.32     d0[1], [ip], r1\n+        vst1.32     d1[0], [r0]\n+        vst1.32     d1[1], [ip]\n+        bx          lr\n+endfunc\n+\n+@ ============================================================================\n+@ DC Y or C add\n+\n+@ ff_hevc_rpi_add_residual_4x4_dc_c_neon_8(\n+@   uint8_t * dst,              // [r0]\n+@   unsigned int stride,        // [r1]\n+@   int dc)                     // [r2]\n+\n+function ff_hevc_rpi_add_residual_4x4_dc_c_neon_8, export=1\n+        mov         r3,  #4-2\n+        vdup.32     q15, r2\n+        b           1f\n+endfunc\n+\n+@ ff_hevc_rpi_add_residual_8x8_dc_neon_8(\n+@   uint8_t * dst,              // [r0]\n+@   unsigned int stride,        // [r1]\n+@   int dc)                     // [r2]\n+\n+function ff_hevc_rpi_add_residual_8x8_dc_neon_8, export=1\n+        vdup.16     q15, r2\n+        mov         r3, #8-2\n+1:      vld1.8      d16, [r0]\n+        add         ip, r0, r1\n+        push        {r4, lr}\n+        vld1.8      d17, [ip]\n+        add         r4, r0, r1, lsl #1\n+        vaddw.u8    q0, q15, d16\n+        lsl         r1, #1\n+        vaddw.u8    q1, q15, d17\n+        add         lr, ip, r1\n+1:\n+          vld1.8      {d16}, [r4], r1\n+          vld1.8      {d17}, [lr], r1\n+        subs        r3, #2\n+        vqmovun.s16 d4, q0\n+        vqmovun.s16 d5, q1\n+          vaddw.u8    q0, q15, d16\n+          vaddw.u8    q1, q15, d17\n+        vst1.8      {d4}, [r0], r1\n+        vst1.8      {d5}, [ip], r1\n+        bne         1b\n+\n+          vqmovun.s16 d4, q0\n+          vqmovun.s16 d5, q1\n+          vst1.8      {d4}, [r0]\n+          vst1.8      {d5}, [ip]\n+          pop         {r4, pc}\n+endfunc\n+\n+\n+@ ff_hevc_rpi_add_residual_8x8_dc_c_neon_8(\n+@   uint8_t * dst,              // [r0]\n+@   unsigned int stride,        // [r1]\n+@   int dc)                     // [r2]\n+\n+function ff_hevc_rpi_add_residual_8x8_dc_c_neon_8, export=1\n+        mov         r3,  #8-1\n+        vdup.32     q15, r2\n+        b           1f\n+endfunc\n+\n+@ ff_hevc_rpi_add_residual_16x16_dc_neon_8(\n+@   uint8_t * dst,              // [r0]\n+@   unsigned int stride,        // [r1]\n+@   int dc)                     // [r2]\n+\n+function ff_hevc_rpi_add_residual_16x16_dc_neon_8, export=1\n+        vdup.16     q15, r2\n+        mov         r3,  #16-1\n+1:      vld1.8      {q8}, [r0]\n+        add         ip, r0, r1\n+        vaddw.u8    q0, q15, d16\n+        vaddw.u8    q1, q15, d17\n+1:\n+          vld1.8      {q8}, [ip], r1\n+        subs        r3, #1\n+        vqmovun.s16 d4, q0\n+        vqmovun.s16 d5, q1\n+          vaddw.u8    q0, q15, d16\n+          vaddw.u8    q1, q15, d17\n+        vst1.8      {q2}, [r0], r1\n+        bne         1b\n+\n+          vqmovun.s16 d4, q0\n+          vqmovun.s16 d5, q1\n+          vst1.8      {q2}, [r0]\n+          bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_add_residual_16x16_dc_c_neon_8(\n+@   uint8_t * dst,              // [r0]\n+@   unsigned int stride,        // [r1]\n+@   int dc)                     // [r2]\n+\n+function ff_hevc_rpi_add_residual_16x16_dc_c_neon_8, export=1\n+        mov         r3,  #16-1\n+        vdup.32     q15, r2\n+        b           1f\n+endfunc\n+\n+@ ff_hevc_rpi_add_residual_32x32_dc_neon_8(\n+@   uint8_t * dst,              // [r0]\n+@   unsigned int stride,        // [r1]\n+@   int dc)                     // [r2]\n+\n+function ff_hevc_rpi_add_residual_32x32_dc_neon_8, export=1\n+        vdup.16     q15, r2\n+        mov         r3, #32-1\n+1:      vld1.8      {q8, q9}, [r0]\n+        add         ip, r0, r1\n+        vaddw.u8    q0, q15, d16\n+        vaddw.u8    q1, q15, d17\n+        vaddw.u8    q2, q15, d18\n+        vaddw.u8    q3, q15, d19\n+1:\n+        vqmovun.s16 d20, q0\n+        vqmovun.s16 d21, q1\n+        vqmovun.s16 d22, q2\n+        vqmovun.s16 d23, q3\n+          vld1.8      {q8, q9}, [ip], r1\n+        subs        r3, #1\n+          vaddw.u8    q0, q15, d16\n+          vaddw.u8    q1, q15, d17\n+          vaddw.u8    q2, q15, d18\n+          vaddw.u8    q3, q15, d19\n+        vst1.8      {q10, q11}, [r0], r1\n+        bne     1b\n+\n+          vqmovun.s16 d20, q0\n+          vqmovun.s16 d21, q1\n+          vqmovun.s16 d22, q2\n+          vqmovun.s16 d23, q3\n+          vst1.8      {q10, q11}, [r0]\n+          bx          lr\n+endfunc\n+\n+@ ============================================================================\n+@ U add\n+\n+@ add_residual4x4_c(\n+@   uint8_t *_dst,        [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride,     [r2]\n+@   int dc_v)             [r3]\n+\n+function ff_hevc_rpi_add_residual_4x4_u_neon_8, export=1\n+        add         ip, r0, r2\n+        vld1.16     {q0, q1}, [r1]\n+        lsl         r2, #1\n+        vld1.8      {d16}, [r0 :64], r2\n+        vld1.8      {d17}, [ip :64], r2\n+        vld1.8      {d18}, [r0 :64]\n+        sub         r0, r2\n+        vld1.8      {d19}, [ip :64]\n+        sub         ip, r2\n+        vdup.16     q2, r3\n+        vdup.16     q3, r3\n+        vmovl.u8    q10, d16\n+        vmovl.u8    q11, d17\n+        vmovl.u8    q12, d18\n+        vmovl.u8    q13, d19\n+        vzip.16     q0, q2\n+        vzip.16     q1, q3\n+        vqadd.s16   q0,  q10\n+        vqadd.s16   q2,  q11\n+        vqadd.s16   q1,  q12\n+        vqadd.s16   q3,  q13\n+        vqmovun.s16 d0,  q0\n+        vqmovun.s16 d1,  q2\n+        vqmovun.s16 d2,  q1\n+        vqmovun.s16 d3,  q3\n+        vst1.8      {d0}, [r0 :64], r2\n+        vst1.8      {d1}, [ip :64], r2\n+        vst1.8      {d2}, [r0 :64]\n+        vst1.8      {d3}, [ip :64]\n+        bx          lr\n+endfunc\n+\n+@ add_residual8x8_c(\n+@   uint8_t *_dst,        [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride)     [r2]\n+@   int dc_v)             [r3]\n+\n+function ff_hevc_rpi_add_residual_8x8_u_neon_8, export=1\n+        vdup.16     q15, r3\n+        add         ip, r0, r2\n+        push        {r4, lr}\n+        vld2.8      {d16, d17}, [r0 :128]\n+        lsl         r2, #1\n+        vld2.8      {d18, d19}, [ip :128]\n+        mov         r3, #8-2\n+        vld1.16     {q0, q1}, [r1 :256]!\n+        add         r4, r0, r2\n+        vmovl.u8    q10, d16\n+        add         lr, ip, r2\n+        vmovl.u8    q11, d18\n+        vqadd.s16   q0,  q10\n+        vaddw.u8    q2,  q15, d17\n+        vqadd.s16   q1,  q11\n+        vaddw.u8    q3,  q15, d19\n+1:\n+        vqmovun.s16 d20,  q0\n+        vqmovun.s16 d21,  q2\n+          vld2.8      {d16, d17}, [r4 :128], r2\n+        subs        r3, #2\n+        vqmovun.s16 d22,  q1\n+        vqmovun.s16 d23,  q3\n+        vst2.8      {d20, d21}, [r0 :128], r2\n+          vld2.8      {d18, d19}, [lr :128], r2\n+        vst2.8      {d22, d23}, [ip :128], r2\n+          vld1.16     {q0, q1}, [r1 :256]!\n+          vmovl.u8    q10, d16\n+          vmovl.u8    q11, d18\n+          vqadd.s16   q0,  q10\n+          vaddw.u8    q2,  q15, d17\n+          vqadd.s16   q1,  q11\n+          vaddw.u8    q3,  q15, d19\n+        bne         1b\n+\n+          vqmovun.s16 d20,  q0\n+          vqmovun.s16 d21,  q2\n+          vqmovun.s16 d22,  q1\n+          vqmovun.s16 d23,  q3\n+          vst2.8      {d20, d21}, [r0 :128]\n+          vst2.8      {d22, d23}, [ip :128]\n+          pop         {r4, pc}\n+endfunc\n+\n+@ add_residual16x16_u(\n+@   uint8_t *_dst,        [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride)     [r2]\n+@   int dc_v)             [r3]\n+\n+function ff_hevc_rpi_add_residual_16x16_u_neon_8, export=1\n+        vdup.16     q15, r3\n+        add         ip, r0, r2\n+        vld2.8      {q8, q9}, [r0 :256]\n+        mov         r3, #16-1\n+        vld1.16     {q0, q1}, [r1 :256]!\n+        vmovl.u8    q11, d16\n+        vmovl.u8    q12, d17\n+        vqadd.s16   q0,  q11\n+        vaddw.u8    q11, q15, d18\n+        vqadd.s16   q1,  q12\n+        vaddw.u8    q12, q15, d19\n+1:\n+          vld2.8      {q8, q9}, [ip :256], r2\n+        subs        r3, #1\n+        vqmovun.s16 d20, q0\n+        vqmovun.s16 d22, q11\n+        vqmovun.s16 d21, q1\n+        vqmovun.s16 d23, q12\n+          vld1.16     {q0, q1}, [r1 :256]!\n+        vst2.8      {q10, q11}, [r0 :256], r2\n+          vmovl.u8    q11, d16\n+            pldw        [ip]\n+          vmovl.u8    q12, d17\n+          vqadd.s16   q0,  q11\n+          vaddw.u8    q11, q15, d18\n+          vqadd.s16   q1,  q12\n+          vaddw.u8    q12, q15, d19\n+        bne         1b\n+\n+          vqmovun.s16 d20, q0\n+          vqmovun.s16 d22, q11\n+          vqmovun.s16 d21, q1\n+          vqmovun.s16 d23, q12\n+          vst2.8      {q10, q11}, [r0 :256]\n+          bx          lr\n+endfunc\n+\n+@ ============================================================================\n+@ V add\n+\n+@ add_residual4x4_v(\n+@   uint8_t *_dst,        [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride)     [r2]\n+\n+function ff_hevc_rpi_add_residual_4x4_v_neon_8, export=1\n+        add         ip, r0, r2\n+        vld1.16     {q2, q3}, [r1]\n+        lsl         r2, #1\n+        vld1.8      {d16}, [r0 :64], r2\n+        vld1.8      {d17}, [ip :64], r2\n+        vld1.8      {d18}, [r0 :64]\n+        sub         r0, r2\n+        vld1.8      {d19}, [ip :64]\n+        sub         ip, r2\n+        vdup.16     q0, r3\n+        vdup.16     q1, r3\n+        vmovl.u8    q10, d16\n+        vmovl.u8    q11, d17\n+        vmovl.u8    q12, d18\n+        vmovl.u8    q13, d19\n+        vzip.16     q0, q2\n+        vzip.16     q1, q3\n+        vqadd.s16   q0,  q10\n+        vqadd.s16   q2,  q11\n+        vqadd.s16   q1,  q12\n+        vqadd.s16   q3,  q13\n+        vqmovun.s16 d0,  q0\n+        vqmovun.s16 d1,  q2\n+        vqmovun.s16 d2,  q1\n+        vqmovun.s16 d3,  q3\n+        vst1.8      {d0}, [r0 :64], r2\n+        vst1.8      {d1}, [ip :64], r2\n+        vst1.8      {d2}, [r0 :64]\n+        vst1.8      {d3}, [ip :64]\n+        bx          lr\n+endfunc\n+\n+@ add_residual8x8_v(\n+@   uint8_t *_dst,        [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride)     [r2]\n+\n+function ff_hevc_rpi_add_residual_8x8_v_neon_8, export=1\n+        vdup.16     q15, r3\n+        add         ip, r0, r2\n+        push        {r4, lr}\n+        vld2.8      {d16, d17}, [r0 :128]\n+        lsl         r2, #1\n+        vld2.8      {d18, d19}, [ip :128]\n+        mov         r3, #8-2\n+        vld1.16     {q0, q1}, [r1 :256]!\n+        add         r4, r0, r2\n+        vmovl.u8    q10, d17\n+        add         lr, ip, r2\n+        vmovl.u8    q11, d19\n+        vqadd.s16   q0,  q10\n+        vaddw.u8    q2,  q15, d16\n+        vqadd.s16   q1,  q11\n+        vaddw.u8    q3,  q15, d18\n+1:\n+        vqmovun.s16 d20,  q2\n+        vqmovun.s16 d21,  q0\n+          vld2.8      {d16, d17}, [r4 :128], r2\n+        subs        r3, #2\n+        vqmovun.s16 d22,  q3\n+        vqmovun.s16 d23,  q1\n+        vst2.8      {d20, d21}, [r0 :128], r2\n+          vld2.8      {d18, d19}, [lr :128], r2\n+        vst2.8      {d22, d23}, [ip :128], r2\n+          vld1.16     {q0, q1}, [r1 :256]!\n+          vmovl.u8    q10, d17\n+          vmovl.u8    q11, d19\n+          vqadd.s16   q0,  q10\n+          vaddw.u8    q2,  q15, d16\n+          vqadd.s16   q1,  q11\n+          vaddw.u8    q3,  q15, d18\n+        bne         1b\n+\n+          vqmovun.s16 d20,  q2\n+          vqmovun.s16 d21,  q0\n+          vqmovun.s16 d22,  q3\n+          vqmovun.s16 d23,  q1\n+          vst2.8      {d20, d21}, [r0 :128]\n+          vst2.8      {d22, d23}, [ip :128]\n+          pop         {r4, pc}\n+endfunc\n+\n+@ add_residual16x16_v(\n+@   uint8_t *_dst,        [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride)     [r2]\n+\n+function ff_hevc_rpi_add_residual_16x16_v_neon_8, export=1\n+        vdup.16     q15, r3\n+        add         ip, r0, r2\n+        vld2.8      {q8, q9}, [r0 :256]\n+        mov         r3, #16-1\n+        vld1.16     {q0, q1}, [r1 :256]!\n+        vmovl.u8    q11, d18\n+        vmovl.u8    q12, d19\n+        vqadd.s16   q0,  q11\n+        vaddw.u8    q11, q15, d16\n+        vqadd.s16   q1,  q12\n+        vaddw.u8    q12, q15, d17\n+1:\n+          vld2.8      {q8, q9}, [ip :256], r2\n+        subs        r3, #1\n+        vqmovun.s16 d20, q11\n+        vqmovun.s16 d22, q0\n+        vqmovun.s16 d21, q12\n+        vqmovun.s16 d23, q1\n+          vld1.16     {q0, q1}, [r1 :256]!\n+        vst2.8      {q10, q11}, [r0 :256], r2\n+          vmovl.u8    q11, d18\n+            pldw        [ip]\n+          vmovl.u8    q12, d19\n+          vqadd.s16   q0,  q11\n+          vaddw.u8    q11, q15, d16\n+          vqadd.s16   q1,  q12\n+          vaddw.u8    q12, q15, d17\n+        bne         1b\n+\n+          vqmovun.s16 d20, q11\n+          vqmovun.s16 d22, q0\n+          vqmovun.s16 d21, q12\n+          vqmovun.s16 d23, q1\n+          vst2.8      {q10, q11}, [r0 :256]\n+          bx          lr\n+endfunc\n+\n+@ ============================================================================\n+@ U & V add\n+\n+@ add_residual4x4_c(\n+@   uint8_t *_dst,        [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride)     [r2]\n+\n+function ff_hevc_rpi_add_residual_4x4_c_neon_8, export=1\n+        add         ip, r0, r2\n+        vld1.16     {q0, q1}, [r1]!       @ all of U\n+        lsl         r2, #1\n+        vld1.8      {d16}, [r0 :64], r2\n+        rsb         r3, r2, #0\n+        vld1.8      {d17}, [ip :64], r2\n+        vld1.16     {q2, q3}, [r1]        @ all of V\n+        vld1.8      {d18}, [r0 :64], r3\n+        vld1.8      {d19}, [ip :64], r3\n+        vmovl.u8    q10, d16\n+        vmovl.u8    q11, d17\n+        vmovl.u8    q12, d18\n+        vmovl.u8    q13, d19\n+        vzip.16     q0, q2\n+        vzip.16     q1, q3\n+        vqadd.s16   q0,  q10\n+        vqadd.s16   q2,  q11\n+        vqadd.s16   q1,  q12\n+        vqadd.s16   q3,  q13\n+        vqmovun.s16 d0,  q0\n+        vqmovun.s16 d1,  q2\n+        vqmovun.s16 d2,  q1\n+        vqmovun.s16 d3,  q3\n+        vst1.8      {d0}, [r0 :64], r2\n+        vst1.8      {d1}, [ip :64], r2\n+        vst1.8      {d2}, [r0 :64]\n+        vst1.8      {d3}, [ip :64]\n+        bx          lr\n+endfunc\n+\n+@ add_residual8x8_c(\n+@   uint8_t *_dst,        [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride)     [r2]\n+\n+function ff_hevc_rpi_add_residual_8x8_c_neon_8, export=1\n+        vld2.8      {d16, d17}, [r0 :128]\n+        add         r3, r1, #(8*8*2)  @ Offset to V\n+        vld1.16     {q0}, [r1 :128]!\n+        add         ip, r0, r2\n+        vld1.16     {q1}, [r3 :128]!\n+        vmovl.u8    q10, d16\n+        push        {lr}\n+        vmovl.u8    q8,  d17\n+        mov         lr, #8-1\n+        vqadd.s16   q10, q0\n+        vqadd.s16   q1,  q8\n+1:\n+          vld2.8      {d16, d17}, [ip :128], r2\n+        subs        lr, #1\n+          vld1.16     {q0}, [r1 :128]!\n+        vqmovun.s16 d20, q10\n+        vqmovun.s16 d21, q1\n+          vld1.16     {q1}, [r3 :128]!\n+        vst2.8      {d20, d21}, [r0 :128], r2\n+          vmovl.u8    q10, d16\n+            pldw        [ip]\n+          vmovl.u8    q8,  d17\n+          vqadd.s16   q10, q0\n+          vqadd.s16   q1,  q8\n+        bne         1b\n+\n+          vqmovun.s16 d20, q10\n+          vqmovun.s16 d21, q1\n+          vst2.8      {d20, d21}, [r0 :128]\n+          pop         {pc}\n+endfunc\n+\n+@ add_residual16x16_c(\n+@   uint8_t *_dst,        [r0]\n+@   const int16_t *res,   [r1]\n+@   ptrdiff_t stride)     [r2]\n+\n+function ff_hevc_rpi_add_residual_16x16_c_neon_8, export=1\n+        vld2.8      {q8, q9}, [r0 :256]\n+        add         r3, r1, #(16*16*2)  @ Offset to V\n+        vld1.16     {q0, q1}, [r1 :256]!\n+        add         ip, r0, r2\n+        vld1.16     {q2, q3}, [r3 :256]!\n+        vmovl.u8    q10, d16\n+        push        {lr}\n+        vmovl.u8    q8,  d17\n+        mov         lr, #16-1\n+        vmovl.u8    q11, d18\n+        vmovl.u8    q9,  d19\n+        vqadd.s16   q0,  q10\n+        vqadd.s16   q1,  q8\n+        vqadd.s16   q2,  q11\n+        vqadd.s16   q3,  q9\n+1:\n+          vld2.8      {q8, q9}, [ip :256], r2\n+        subs        lr, #1\n+        vqmovun.s16 d20, q0\n+        vqmovun.s16 d22, q2\n+        vqmovun.s16 d21, q1\n+        vqmovun.s16 d23, q3\n+          vld1.16     {q0, q1}, [r1 :256]!\n+        vst2.8      {d20-d23}, [r0 :256], r2\n+          vld1.16     {q2, q3}, [r3 :256]!\n+          vmovl.u8    q10, d16\n+            pldw        [ip]\n+          vmovl.u8    q8,  d17\n+          vmovl.u8    q11, d18\n+          vmovl.u8    q9,  d19\n+          vqadd.s16   q0,  q10\n+          vqadd.s16   q1,  q8\n+          vqadd.s16   q2,  q11\n+          vqadd.s16   q3,  q9\n+        bne         1b\n+\n+          vqmovun.s16 d20, q0\n+          vqmovun.s16 d22, q2\n+          vqmovun.s16 d21, q1\n+          vqmovun.s16 d23, q3\n+          vst2.8      {d20-d23}, [r0 :256]\n+          pop         {pc}\n+endfunc\n+\n+@ 32x32 chroma never occurs so NIF\n+\n+@ ============================================================================\ndiff --git a/libavcodec/arm/rpi_hevcdsp_sao_neon.S b/libavcodec/arm/rpi_hevcdsp_sao_neon.S\nnew file mode 100644\nindex 0000000000..b56e0f9644\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcdsp_sao_neon.S\n@@ -0,0 +1,2245 @@\n+/*\n+ * Copyright (c) 2014 - 2015 Seppo Tomperi <seppo.tomperi@vtt.fi>\n+ *               2017 John Cox <jc@kynesim.co.uk> (for Raspberry Pi)\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"libavutil/arm/asm.S\"\n+#include \"neon.S\"\n+\n+.set EDGE_SRC_STRIDE, 160\n+\n+@ PIC jump tables are fractionally more expensive than absolute in our code\n+.set jent_pic, CONFIG_PIC\n+\n+\n+.macro sao_band_64b_8 XLAT0, XLAT1, Q_K128, I1, I2, I3, I4\n+        vshr.u8   q12, q8, #3\n+        \\I1\n+        vadd.i8   q8, \\Q_K128\n+        \\I2\n+        vshr.u8   q13, q9, #3\n+        \\I3\n+        vadd.i8   q9, \\Q_K128\n+        \\I4\n+        vtbl.8    d24, \\XLAT0, d24\n+        vtbl.8    d25, \\XLAT0, d25\n+        vtbl.8    d26, \\XLAT1, d26\n+        vtbl.8    d27, \\XLAT1, d27\n+\n+        vqadd.s8  q8, q12\n+        vshr.u8   q12, q10, #3\n+        vadd.i8   q10, \\Q_K128\n+        vqadd.s8  q9, q13\n+        vshr.u8   q13, q11, #3\n+        vadd.i8   q11, \\Q_K128\n+\n+        vtbl.8    d24, \\XLAT0, d24\n+        vtbl.8    d25, \\XLAT0, d25\n+        vtbl.8    d26, \\XLAT1, d26\n+        vtbl.8    d27, \\XLAT1, d27\n+        vqadd.s8  q10, q12\n+        vsub.i8   q8, \\Q_K128\n+        vqadd.s8  q11, q13\n+        vsub.i8   q9, \\Q_K128\n+        vsub.i8   q10, \\Q_K128\n+        vsub.i8   q11, \\Q_K128\n+.endm\n+\n+.macro sao_band_16b_8 XLAT0, XLAT1, Q_K128, L1, L2, L3, L4, L5, S1, S2, S3, S4\n+        \\L1\n+        \\L2\n+        \\L3\n+        \\L4\n+        \\L5\n+        vadd.i8   q12, q8, \\Q_K128\n+        vshr.u8   q8, #3\n+        vtbl.8    d16, \\XLAT0, d16\n+        vtbl.8    d17, \\XLAT1, d17\n+        vqadd.s8  q12, q8\n+        bmi       2f\n+1:        \\L1\n+          \\L2\n+          \\L3\n+          \\L4\n+          \\L5\n+        vsub.i8   q13, q12, \\Q_K128\n+          vadd.i8   q12, q8, \\Q_K128\n+          vshr.u8   q8, #3\n+        \\S1\n+        \\S2\n+        \\S3\n+        \\S4\n+          vtbl.8    d16, \\XLAT0, d16\n+          vtbl.8    d17, \\XLAT1, d17\n+          vqadd.s8  q12, q8\n+          bpl       1b\n+2:        vsub.i8   q13, q12, \\Q_K128\n+          \\S1\n+          \\S2\n+          \\S3\n+          \\S4\n+.endm\n+\n+\n+.macro clip16_4 Q0, Q1, Q2, Q3, Q_MIN, Q_MAX\n+        vmax.s16  \\Q0, \\Q_MIN\n+        vmax.s16  \\Q1, \\Q_MIN\n+        vmax.s16  \\Q2, \\Q_MIN\n+        vmax.s16  \\Q3, \\Q_MIN\n+        vmin.s16  \\Q0, \\Q_MAX\n+        vmin.s16  \\Q1, \\Q_MAX\n+        vmin.s16  \\Q2, \\Q_MAX\n+        vmin.s16  \\Q3, \\Q_MAX\n+.endm\n+\n+@ Clobbers q12, q13\n+.macro sao_band_64b_16  Q0, Q1, Q2, Q3, XLAT0, XLAT1, Q_MIN, Q_MAX, bit_depth, I1, I2\n+        vshrn.i16 d24, \\Q0, #(\\bit_depth - 5)\n+        vshrn.i16 d25, \\Q1, #(\\bit_depth - 5)\n+        vshrn.i16 d26, \\Q2, #(\\bit_depth - 5)\n+        \\I1\n+        vtbl.8    d24, \\XLAT0, d24\n+        vshrn.i16 d27, \\Q3, #(\\bit_depth - 5)\n+        vtbl.8    d25, \\XLAT1, d25\n+        \\I2\n+        vtbl.8    d26, \\XLAT0, d26\n+        vtbl.8    d27, \\XLAT1, d27\n+        vaddw.s8  \\Q0, d24\n+        vaddw.s8  \\Q1, d25\n+        vaddw.s8  \\Q2, d26\n+        vaddw.s8  \\Q3, d27\n+        clip16_4   \\Q0, \\Q1, \\Q2, \\Q3, \\Q_MIN, \\Q_MAX\n+.endm\n+\n+@ Clobbers q10, q11, q12\n+.macro sao_band_32b_16 Q0, Q1, XLAT0, XLAT1, Q_MIN, Q_MAX, bit_depth, L1, L2, L3, L4, L5, S1, S2, S3, S4\n+        \\L1\n+        \\L2\n+        \\L3\n+        \\L4\n+        \\L5\n+        vshrn.i16 d24, \\Q0, #\\bit_depth - 5\n+        vshrn.i16 d25, \\Q1, #\\bit_depth - 5\n+        vtbl.8    d24, \\XLAT0, d24\n+        vtbl.8    d25, \\XLAT1, d25\n+        vaddw.s8  q10, \\Q0, d24\n+        vaddw.s8  q11, \\Q1, d25\n+        bmi       2f\n+1:        \\L1\n+          \\L2\n+          \\L3\n+          \\L4\n+          \\L5\n+        vmax.s16  q10, \\Q_MIN\n+        vmax.s16  q11, \\Q_MIN\n+          vshrn.i16 d24, \\Q0, #\\bit_depth - 5\n+          vshrn.i16 d25, \\Q1, #\\bit_depth - 5\n+        vmin.s16  q10, \\Q_MAX\n+        vmin.s16  q11, \\Q_MAX\n+        \\S1\n+        \\S2\n+        \\S3\n+        \\S4\n+          vtbl.8    d24, \\XLAT0, d24\n+          vtbl.8    d25, \\XLAT1, d25\n+          vaddw.s8  q10, \\Q0, d24\n+          vaddw.s8  q11, \\Q1, d25\n+          bpl       1b\n+2:        vmax.s16  q10, \\Q_MIN\n+          vmax.s16  q11, \\Q_MIN\n+          vmin.s16  q10, \\Q_MAX\n+          vmin.s16  q11, \\Q_MAX\n+          \\S1\n+          \\S2\n+          \\S3\n+          \\S4\n+.endm\n+\n+\n+@ Standard coding rules for sao_offset_abs limit it to 0-31 (Table 9-38)\n+@ so we are quite safe stuffing it into a byte array\n+@ There may be a subsequent shl by log2_sao_offset_scale_luma/chroma\n+@ (7.4.3.3.2 && 7-70) but we should still be safe to at least 12 bits of\n+@ precision\n+\n+@ This, somewhat nasty, bit of code builds the {d0-d3} translation\n+@ array via the stack\n+@ Given that sao_left_class > 28 can cause wrap we can't just poke\n+@ all 4 bytes in at once\n+@\n+@ It also loads other common regs\n+\n+@ Beware that the offset read here overrreads by 6 bytes so source must be sized appropriately\n+function band_load_y\n+        ldr       ip, [sp, #16]         @ &sao_offset_val[0]\n+        ldr       r4, [sp, #20]         @ sao_left_class\n+        vmov.i64  d4, #0\n+        vmov.i64  q0, #0\n+        pld       [r1]\n+        vld2.8    {q8}, [ip]\n+        sub       ip, sp, #8*5\n+        vmov.i64  q1, #0\n+        add       r4, ip, r4\n+        vpush     {d0-d4}               @ Put zero array on stack\n+        vshr.u64  d16, d16, #8          @ 1st interesting val is [1]\n+        ldr       ip, [ip, #8*5 + 28]   @ height\n+        vst1.32   {d16[0]}, [r4]\n+        add       r4, r1, r3\n+        vpop      {d0-d4}               @ Pop modified array\n+        sub       ip, ip, #1\n+        vorr      d0, d0, d4\n+        bx        lr\n+endfunc\n+\n+@ Beware that offset reads here overrread by 6 bytes so source must be sized appropriately\n+function band_load_c\n+        ldr       ip, [sp, #16]         @ &sao_offset_val1[0]\n+        ldr       r4, [sp, #20]         @ sao_left_class1\n+        vmov.i64  d24, #0\n+        vmov.i64  q10, #0\n+        pld       [r1]\n+        vld2.8    {q8}, [ip]\n+        sub       ip, sp, #8*5\n+        vmov.i64  q11, #0\n+        add       r4, ip, r4\n+        ldr       ip, [sp, #24]         @ &sao_offset_val2[0]\n+        vpush     {d20-d24}             @ Put zero array on stack\n+        vld2.8    {q9}, [ip]\n+        vshr.u64  d16, d16, #8          @ 1st interesting val is [1]\n+        ldr       ip, [sp, #8*5 + 28]   @ sao_left_class2\n+        vst1.32   {d16[0]}, [r4]\n+        add       ip, sp, ip\n+        vshr.u64  d18, d18, #8          @ 1st interesting val is [1]\n+        vldmia    sp, {d0-d3}           @ Load modified array\n+        vldr      d16, [sp, #8*4]\n+        add       r4, r1, r3\n+        vstmia    sp, {d20-d24}         @ Put zero array on stack (again)\n+        vst1.32   {d18[0]}, [ip]\n+        vorr      d0, d0, d16\n+        vldmia    sp, {d4-d7}           @ Load modified array\n+        vldr      d18, [sp, #8*4]\n+        ldr       ip, [sp, #8*5 + 36]   @ height\n+        add       sp, sp, #8*5\n+        vorr      d4, d4, d18\n+        sub       ip, ip, #1\n+        bx        lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_sao_band_64_neon_8 (\n+@   uint8_t *_dst,              [r0]\n+@   uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,       [r2]\n+@   ptrdiff_t stride_src,       [r3]\n+@   int16_t *sao_offset_val,    [sp, #0]\n+@   int sao_left_class,         [sp, #4]\n+@   int width,                  [sp, #8]\n+@   int height)                 [sp, #12]\n+\n+function ff_hevc_rpi_sao_band_64_neon_8, export=1\n+        push      {r4-r6, lr}\n+        vmov.u8   q15, #128\n+        bl        band_load_y\n+\n+1:      vldmia    r1, {q8-q11}\n+        sao_band_64b_8 {d0-d3}, {d0-d3}, q15, \\\n+            \"pld       [r4]\",                 \\\n+            \"subs      ip, #1\",               \\\n+            \"it ne; addne r4, r3\",            \\\n+            \"add       r1, r3\"\n+        vstmia    r0, {q8-q11}\n+        add       r0, r2\n+        bpl       1b\n+\n+        pop       {r4-r6, pc}\n+endfunc\n+\n+@ ff_hevc_rpi_sao_band_32_neon_8 (\n+@   uint8_t *_dst,              [r0]\n+@   uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,       [r2]\n+@   ptrdiff_t stride_src,       [r3]\n+@   int16_t *sao_offset_val,    [sp, #0]\n+@   int sao_left_class,         [sp, #4]\n+@   int width,                  [sp, #8]\n+@   int height)                 [sp, #12]\n+\n+function ff_hevc_rpi_sao_band_32_neon_8, export=1\n+        push      {r4-r6, lr}\n+        add       r5, r0, r2\n+        add       r6, r1, r3\n+        lsl       r2, #1\n+        lsl       r3, #1\n+        vmov.u8   q15, #128\n+        bl        band_load_y\n+\n+1:      vld1.8    { q8, q9 }, [r1, :128], r3\n+        subs      ip, #2\n+        vld1.8    {q10, q11}, [r6, :128], r3\n+\n+        sao_band_64b_8 {d0-d3}, {d0-d3}, q15\n+\n+        vst1.8    { q8, q9 }, [r0, :128], r2\n+        vst1.8    {q10, q11}, [r5, :128], r2\n+        bpl       1b\n+\n+        pop       {r4-r6, pc}\n+endfunc\n+\n+@ ff_hevc_rpi_sao_band_16_neon_8 (\n+@   uint8_t *_dst,              [r0]\n+@   uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,       [r2]\n+@   ptrdiff_t stride_src,       [r3]\n+@   int16_t *sao_offset_val,    [sp, #0]\n+@   int sao_left_class,         [sp, #4]\n+@   int width,                  [sp, #8]\n+@   int height)                 [sp, #12]\n+\n+function ff_hevc_rpi_sao_band_16_neon_8, export=1\n+        push      {r4-r6, lr}\n+        add       r5, r0, r2\n+        add       r6, r1, r3\n+        lsl       r2, #1\n+        lsl       r3, #1\n+        vmov.u8   q15, #128\n+        bl        band_load_y\n+\n+1:      vld1.8    { q8}, [r1, :128], r3\n+        subs      ip, #4\n+        vld1.8    { q9}, [r6, :128], r3\n+        vld1.8    {q10}, [r1, :128], r3\n+        vld1.8    {q11}, [r6, :128], r3\n+\n+        sao_band_64b_8 {d0-d3}, {d0-d3}, q15\n+\n+        vst1.8    { q8}, [r0, :128], r2\n+        vst1.8    { q9}, [r5, :128], r2\n+        vst1.8    {q10}, [r0, :128], r2\n+        vst1.8    {q11}, [r5, :128], r2\n+        bpl       1b\n+\n+        pop       {r4-r6, pc}\n+endfunc\n+\n+@ ff_hevc_rpi_sao_band_8_neon_8 (\n+@   uint8_t *_dst,              [r0]\n+@   uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,       [r2]\n+@   ptrdiff_t stride_src,       [r3]\n+@   int16_t *sao_offset_val,    [sp, #0]\n+@   int sao_left_class,         [sp, #4]\n+@   int width,                  [sp, #8]\n+@   int height)                 [sp, #12]\n+\n+function ff_hevc_rpi_sao_band_8_neon_8, export=1\n+        ldr       ip, [sp, #8]          @ width\n+        push      {r4-r6, lr}\n+        vmov.u8   q15, #128\n+        cmp       ip, #8\n+        bl        band_load_y\n+        add       r5, r0, r2\n+        add       r6, r1, r3\n+        lsl       r2, #1\n+        lsl       r3, #1\n+        blt       4f\n+\n+        sao_band_16b_8 {d0-d3}, {d0-d3}, q15, \\\n+            \"vld1.8    {d16}, [r1, :64], r3\", \\\n+            \"subs      ip, #2\",               \\\n+            \"vld1.8    {d17}, [r6, :64], r3\", \\\n+            \"\",                               \\\n+            \"\",                               \\\n+            \"vst1.8 {d26}, [r0, :64], r2\",    \\\n+            \"vst1.8 {d27}, [r5, :64], r2\"\n+        pop       {r4-r6, pc}\n+4:\n+        sao_band_16b_8 {d0-d3}, {d0-d3}, q15,    \\\n+            \"vld1.32   {d16[0]}, [r1, :32], r3\", \\\n+            \"subs      ip, #4\",                  \\\n+            \"vld1.32   {d16[1]}, [r6, :32], r3\", \\\n+            \"vld1.32   {d17[0]}, [r1, :32], r3\", \\\n+            \"vld1.32   {d17[1]}, [r6, :32], r3\", \\\n+            \"vst1.32   {d26[0]}, [r0, :32], r2\", \\\n+            \"vst1.32   {d26[1]}, [r5, :32], r2\", \\\n+            \"vst1.32   {d27[0]}, [r0, :32], r2\", \\\n+            \"vst1.32   {d27[1]}, [r5, :32], r2\"\n+        pop       {r4-r6, pc}\n+endfunc\n+\n+@ ff_hevc_rpi_sao_band_c_32_neon_8(\n+@   uint8_t * dst          [r0]\n+@   uint8_t * src          [r1]\n+@   uint32_t dst_stride    [r2]\n+@   uint32_t src_stride    [r3]\n+@   const int16_t * table1 sp[0]\n+@   uint32_t offset1       sp[4]\n+@   const int16_t * table2 sp[8]\n+@   uint32_t offset2       sp[12]\n+@   int width              sp[16]\n+@   int height             sp[20]\n+\n+function ff_hevc_rpi_sao_band_c_32_neon_8, export=1\n+        push      {r4-r6, lr}\n+        add       r5, r0, #32\n+        add       r6, r1, #32\n+        vmov.u8   q15, #128\n+        bl        band_load_c\n+\n+1:      vld2.8    { q8, q9 }, [r1, :128], r3\n+        subs      ip, #1\n+        vld2.8    {q10, q11}, [r6, :128], r3\n+\n+        sao_band_64b_8 {d0-d3}, {d4-d7}, q15, \\\n+            \"pld       [r4]\",                 \\\n+            \"it ne; addne r4, r3\"\n+\n+        vst2.8    { q8, q9 }, [r0, :128], r2\n+        vst2.8    {q10, q11}, [r5, :128], r2\n+        bpl       1b\n+\n+        pop     {r4-r6, pc}\n+endfunc\n+\n+@ ff_hevc_rpi_sao_band_c_16_neon_8(\n+@   uint8_t * dst          [r0]\n+@   uint8_t * src          [r1]\n+@   uint32_t dst_stride    [r2]\n+@   uint32_t src_stride    [r3]\n+@   const int16_t * table1 sp[0]\n+@   uint32_t offset1       sp[4]\n+@   const int16_t * table2 sp[8]\n+@   uint32_t offset2       sp[12]\n+@   int width              sp[16]\n+@   int height             sp[20]\n+\n+function ff_hevc_rpi_sao_band_c_16_neon_8, export=1\n+        push      {r4-r6, lr}\n+        add       r5, r0, r2\n+        add       r6, r1, r3\n+        lsl       r2, #1\n+        lsl       r3, #1\n+        vmov.u8   q15, #128\n+        bl        band_load_c\n+\n+1:      vld2.8    { q8, q9 }, [r1, :128], r3\n+        subs      ip, #2\n+        vld2.8    {q10, q11}, [r6, :128], r3\n+\n+        sao_band_64b_8 {d0-d3}, {d4-d7}, q15\n+\n+        vst2.8    { q8, q9 }, [r0, :128], r2\n+        vst2.8    {q10, q11}, [r5, :128], r2\n+        bpl       1b\n+\n+        pop     {r4-r6, pc}\n+endfunc\n+\n+@ ff_hevc_rpi_sao_band_c_8_neon_8(\n+@   uint8_t * dst          [r0]\n+@   uint8_t * src          [r1]\n+@   uint32_t dst_stride    [r2]\n+@   uint32_t src_stride    [r3]\n+@   const int16_t * table1 sp[0]\n+@   uint32_t offset1       sp[4]\n+@   const int16_t * table2 sp[8]\n+@   uint32_t offset2       sp[12]\n+@   int width              sp[16]\n+@   int height             sp[20]\n+\n+function ff_hevc_rpi_sao_band_c_8_neon_8, export=1\n+        ldr       ip, [sp, #16]         @ width\n+        push      {r4-r6, lr}\n+        vmov.u8   q15, #128\n+        cmp       ip, #8\n+        bl        band_load_c\n+        blt       4f\n+\n+        sao_band_16b_8 {d0-d3}, {d4-d7}, q15,      \\\n+            \"vld2.8    {d16-d17}, [r1, :128], r3\", \\\n+            \"subs      ip, #1\",                    \\\n+            \"\",                                    \\\n+            \"\",                                    \\\n+            \"\",                                    \\\n+            \"vst2.8    {d26-d27}, [r0, :128], r2\"\n+        pop       {r4-r6, pc}\n+4:\n+        add       r5, r0, r2\n+        add       r6, r1, r3\n+        lsl       r2, #1\n+        lsl       r3, #1\n+        sao_band_16b_8 {d0-d3}, {d4-d7}, q15, \\\n+            \"vld1.8    {d16}, [r1, :64], r3\", \\\n+            \"subs      ip, #2\",               \\\n+            \"vld1.8    {d17}, [r6, :64], r3\", \\\n+            \"vuzp.8    d16, d17\",             \\\n+            \"\",                               \\\n+            \"vzip.8    d26, d27\",             \\\n+            \"vst1.8    {d26}, [r0, :64], r2\", \\\n+            \"vst1.8    {d27}, [r5, :64], r2\"\n+        pop       {r4-r6, pc}\n+endfunc\n+\n+\n+@ ff_hevc_rpi_sao_band_64_neon_10 (\n+@   uint8_t *_dst,              [r0]\n+@   uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,       [r2]\n+@   ptrdiff_t stride_src,       [r3]\n+@   int16_t *sao_offset_val,    [sp, #0]\n+@   int sao_left_class,         [sp, #4]\n+@   int width,                  [sp, #8]\n+@   int height)                 [sp, #12]\n+\n+.macro band_64_16 bit_depth\n+        push      {r4-r6, lr}\n+        vmov.i64  q2, #0\n+        vmov.i16  q3, #(1 << \\bit_depth) - 1\n+        bl        band_load_y\n+        vpush     {q4-q7}\n+\n+1:      vldm      r1, {q4-q11}\n+        sao_band_64b_16 q4,  q5,  q6,  q7, {d0-d3}, {d0-d3}, q2, q3, \\bit_depth, \\\n+            \"subs      ip, #1\",                                                  \\\n+            \"add       r1, r3\"\n+        sao_band_64b_16 q8,  q9, q10, q11, {d0-d3}, {d0-d3}, q2, q3, \\bit_depth\n+        vstm      r0, {q4-q11}\n+        add       r0, r2\n+        bpl       1b\n+\n+        vpop      {q4-q7}\n+        pop       {r4-r6, pc}\n+.endm\n+\n+function ff_hevc_rpi_sao_band_64_neon_10, export=1\n+        band_64_16 10\n+endfunc\n+\n+@ ff_hevc_rpi_sao_band_32_neon_10 (\n+@   uint8_t *_dst,              [r0]\n+@   uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,       [r2]\n+@   ptrdiff_t stride_src,       [r3]\n+@   int16_t *sao_offset_val,    [sp, #0]\n+@   int sao_left_class,         [sp, #4]\n+@   int width,                  [sp, #8]\n+@   int height)                 [sp, #12]\n+\n+.macro band_32_16 bit_depth\n+        push      {r4-r6, lr}\n+        vmov.i64  q2, #0\n+        vmov.i16  q3, #(1 << \\bit_depth) - 1\n+        bl        band_load_y\n+\n+1:      vldm      r1, {q8-q11}\n+        sao_band_64b_16 q8,  q9,  q10, q11, {d0-d3}, {d0-d3}, q2, q3, \\bit_depth, \\\n+            \"subs      ip, #1\",                                                   \\\n+            \"add       r1, r3\"\n+        vstm      r0, {q8-q11}\n+        add       r0, r2\n+        bpl       1b\n+\n+        pop       {r4-r6, pc}\n+.endm\n+\n+function ff_hevc_rpi_sao_band_32_neon_10, export=1\n+        band_32_16 10\n+endfunc\n+\n+@ ff_hevc_rpi_sao_band_16_neon_10 (\n+@   uint8_t *_dst,              [r0]\n+@   uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,       [r2]\n+@   ptrdiff_t stride_src,       [r3]\n+@   int16_t *sao_offset_val,    [sp, #0]\n+@   int sao_left_class,         [sp, #4]\n+@   int width,                  [sp, #8]\n+@   int height)                 [sp, #12]\n+\n+.macro band_16_16 bit_depth\n+        push      {r4-r6, lr}\n+        add       r5, r0, r2\n+        add       r6, r1, r3\n+        lsl       r2, #1\n+        lsl       r3, #1\n+        vmov.i64  q14, #0\n+        vmov.i16  q15, #(1 << \\bit_depth) - 1\n+        bl        band_load_y\n+\n+1:      vld1.16   { q8, q9 }, [r1, :128], r3\n+        subs      r12, #2\n+        vld1.16   {q10, q11}, [r6, :128], r3\n+        sao_band_64b_16 q8,  q9,  q10, q11, {d0-d3}, {d0-d3}, q14, q15, \\bit_depth\n+        vst1.16   { q8, q9 }, [r0, :128], r2\n+        vst1.16   {q10, q11}, [r5, :128], r2\n+        bpl       1b\n+\n+        pop       {r4-r6, pc}\n+.endm\n+\n+function ff_hevc_rpi_sao_band_16_neon_10, export=1\n+        band_16_16 10\n+endfunc\n+\n+@ ff_hevc_rpi_sao_band_8_neon_10 (\n+@   uint8_t *_dst,              [r0]\n+@   uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,       [r2]\n+@   ptrdiff_t stride_src,       [r3]\n+@   int16_t *sao_offset_val,    [sp, #0]\n+@   int sao_left_class,         [sp, #4]\n+@   int width,                  [sp, #8]\n+@   int height)                 [sp, #12]\n+\n+.macro band_8_16 bit_depth\n+        ldr       ip, [sp, #8]          @ width\n+        push      {r4-r6, lr}\n+        vmov.i64  q14, #0\n+        cmp       ip, #8\n+        vmov.i16  q15, #(1 << \\bit_depth) - 1\n+        bl        band_load_y\n+        add       r5, r0, r2\n+        add       r6, r1, r3\n+        lsl       r2, #1\n+        lsl       r3, #1\n+        blt       4f\n+\n+        sao_band_32b_16 q8, q9, {d0-d3}, {d0-d3}, q14, q15, \\bit_depth, \\\n+            \"vld1.16   {q8}, [r1, :128], r3\",                           \\\n+            \"subs      ip, #2\",                                         \\\n+            \"vld1.16   {q9}, [r6, :128], r3\",                           \\\n+            \"\",                                                         \\\n+            \"\",                                                         \\\n+            \"vst1.16   {q10}, [r0, :128], r2\",                          \\\n+            \"vst1.16   {q11}, [r5, :128], r2\"\n+        pop       {r4-r6, pc}\n+4:\n+        sao_band_32b_16 q8, q9, {d0-d3}, {d0-d3}, q14, q15, \\bit_depth, \\\n+            \"vld1.16   {d16}, [r1, :64], r3\",                           \\\n+            \"subs      ip, #4\",                                         \\\n+            \"vld1.16   {d17}, [r6, :64], r3\",                           \\\n+            \"vld1.16   {d18}, [r1, :64], r3\",                           \\\n+            \"vld1.16   {d19}, [r6, :64], r3\",                           \\\n+            \"vst1.16   {d20}, [r0, :64], r2\",                           \\\n+            \"vst1.16   {d21}, [r5, :64], r2\",                           \\\n+            \"vst1.16   {d22}, [r0, :64], r2\",                           \\\n+            \"vst1.16   {d23}, [r5, :64], r2\"\n+        pop       {r4-r6, pc}\n+.endm\n+\n+function ff_hevc_rpi_sao_band_8_neon_10, export=1\n+        band_8_16 10\n+endfunc\n+\n+\n+@ ff_hevc_rpi_sao_band_c_32_neon_10(\n+@   uint8_t * dst          [r0]\n+@   uint8_t * src          [r1]\n+@   uint32_t dst_stride    [r2]\n+@   uint32_t src_stride    [r3]\n+@   const int16_t * table1 sp[0]\n+@   uint32_t offset1       sp[4]\n+@   const int16_t * table2 sp[8]\n+@   uint32_t offset2       sp[12]\n+@   int width              sp[16]\n+@   int height             sp[20]\n+\n+.macro band_c_32_16 bit_depth\n+        push      {r4-r6, lr}\n+        add       r5, r0, #32\n+        add       r6, r1, #32\n+        sub       r2, #64\n+        sub       r3, #64\n+        vmov.i64  q14, #0\n+        vmov.i16  q15, #(1 << \\bit_depth) - 1\n+        bl        band_load_c\n+        mov       lr, #64\n+        vpush     {q4-q7}\n+\n+1:      vld2.16   { q4, q5 }, [r1, :128], lr\n+        subs      ip, #1\n+        vld2.16   { q6, q7 }, [r6, :128], lr\n+        vld2.16   { q8, q9 }, [r1, :128], r3\n+        vld2.16   {q10, q11}, [r6, :128], r3\n+\n+        sao_band_64b_16 q4,  q5,  q6,  q7, {d0-d3}, {d4-d7}, q14, q15, \\bit_depth, \\\n+            \"pld       [r4]\",                                                      \\\n+            \"it ne; addne r4, r3\"\n+        sao_band_64b_16 q8,  q9, q10, q11, {d0-d3}, {d4-d7}, q14, q15, \\bit_depth\n+\n+        vst2.16   { q4, q5 }, [r0, :128], lr\n+        vst2.16   { q6, q7 }, [r5, :128], lr\n+        vst2.16   { q8, q9 }, [r0, :128], r2\n+        vst2.16   {q10, q11}, [r5, :128], r2\n+\n+        bpl       1b\n+\n+        vpop      {q4-q7}\n+        pop       {r4-r6, pc}\n+.endm\n+\n+function ff_hevc_rpi_sao_band_c_32_neon_10, export=1\n+        band_c_32_16 10\n+endfunc\n+\n+\n+@ ff_hevc_rpi_sao_band_c_16_neon_10(\n+@   uint8_t * dst          [r0]\n+@   uint8_t * src          [r1]\n+@   uint32_t dst_stride    [r2]\n+@   uint32_t src_stride    [r3]\n+@   const int16_t * table1 sp[0]\n+@   uint32_t offset1       sp[4]\n+@   const int16_t * table2 sp[8]\n+@   uint32_t offset2       sp[12]\n+@   int width              sp[16]\n+@   int height             sp[20]\n+\n+.macro band_c_16_16 bit_depth\n+        push      {r4-r6, lr}\n+        add       r5, r0, #32\n+        add       r6, r1, #32\n+        vmov.i64  q14, #0\n+        vmov.i16  q15, #(1 << \\bit_depth) - 1\n+        bl        band_load_c\n+\n+1:      vld2.16   { q8, q9 }, [r1, :128], r3\n+        subs      ip, #1\n+        vld2.16   {q10, q11}, [r6, :128], r3\n+\n+        sao_band_64b_16 q4,  q5,  q6,  q7, {d0-d3}, {d4-d7}, q14, q15, \\bit_depth\n+        sao_band_64b_16 q8,  q9, q10, q11, {d0-d3}, {d4-d7}, q14, q15, \\bit_depth\n+\n+        vst2.16   { q8, q9 }, [r0, :128], r2\n+        vst2.16   {q10, q11}, [r5, :128], r2\n+\n+        bpl       1b\n+        pop       {r4-r6, pc}\n+.endm\n+\n+function ff_hevc_rpi_sao_band_c_16_neon_10, export=1\n+        band_c_16_16 10\n+endfunc\n+\n+\n+@ ff_hevc_rpi_sao_band_c_8_neon_10(\n+@   uint8_t * dst          [r0]\n+@   uint8_t * src          [r1]\n+@   uint32_t dst_stride    [r2]\n+@   uint32_t src_stride    [r3]\n+@   const int16_t * table1 sp[0]\n+@   uint32_t offset1       sp[4]\n+@   const int16_t * table2 sp[8]\n+@   uint32_t offset2       sp[12]\n+@   int width              sp[16]\n+@   int height             sp[20]\n+\n+.macro band_c_8_16 bit_depth\n+        ldr       ip, [sp, #16]         @ width\n+        push      {r4-r6, lr}\n+        vmov.i64  q14, #0\n+        cmp       ip, #8\n+        vmov.i16  q15, #(1 << \\bit_depth) - 1\n+        bl        band_load_c\n+        blt       4f\n+\n+        sao_band_32b_16 q8, q9, {d0-d3}, {d4-d7}, q14, q15, \\bit_depth, \\\n+            \"vld2.16   {q8,q9}, [r1, :128], r3\",                        \\\n+            \"subs      ip, #1\",                                         \\\n+            \"\",                                                         \\\n+            \"\",                                                         \\\n+            \"\",                                                         \\\n+            \"vst2.16   {q10,q11}, [r0, :128], r2\"\n+        pop       {r4-r6, pc}\n+4:\n+        add       r5, r0, r2\n+        add       r6, r1, r3\n+        lsl       r2, #1\n+        lsl       r3, #1\n+        sao_band_32b_16 q8, q9, {d0-d3}, {d4-d7}, q14, q15, \\bit_depth, \\\n+            \"vld2.16   {d16,d18}, [r1, :128], r3\",                      \\\n+            \"subs      ip, #2\",                                         \\\n+            \"vld2.16   {d17,d19}, [r6, :128], r3\",                      \\\n+            \"\",                                                         \\\n+            \"\",                                                         \\\n+            \"vst2.16   {d20,d22}, [r0, :128], r2\",                      \\\n+            \"vst2.16   {d21,d23}, [r5, :128], r2\"\n+        pop       {r4-r6, pc}\n+.endm\n+\n+function ff_hevc_rpi_sao_band_c_8_neon_10, export=1\n+        band_c_8_16 10\n+endfunc\n+\n+\n+@ =============================================================================\n+@ SAO EDGE\n+\n+@ r0    destination address\n+@ r2    stride to post-increment r0 with\n+@ [r5]  translate values\n+@\n+@ a <- c <- b\n+@ a in q0 - q3\n+@ c in q4 - q7\n+@ b in q8 - q11\n+@\n+@ q12-15 used as temp\n+@\n+@ Can be used for both Y & C as we unzip/zip the deltas and\n+@ transform \"u/v\" separately via d26/d27.  For Y d26=d27\n+\n+function edge_64b_body_8\n+\n+        vcgt.u8 q12,  q4,  q0   @ c > a -> -1 , otherwise 0\n+        vcgt.u8 q13,  q5,  q1\n+        vcgt.u8 q14,  q6,  q2\n+        vcgt.u8 q15,  q7,  q3\n+\n+        vcgt.u8  q0,  q4        @ a > c -> -1 , otherwise 0\n+        vcgt.u8  q1,  q5\n+        vcgt.u8  q2,  q6\n+        vcgt.u8  q3,  q7\n+\n+        vsub.s8  q0,  q12       @ a = sign(c-a)\n+        vsub.s8  q1,  q13\n+        vsub.s8  q2,  q14\n+        vsub.s8  q3,  q15\n+\n+        vcgt.u8  q12, q4,  q8   @ c > b -> -1 , otherwise 0\n+        vcgt.u8  q13, q5,  q9\n+        vcgt.u8  q14, q6,  q10\n+        vcgt.u8  q15, q7,  q11\n+\n+        vsub.s8  q0,  q12\n+        vsub.s8  q1,  q13\n+        vsub.s8  q2,  q14\n+        vsub.s8  q3,  q15\n+\n+        vcgt.u8  q12, q8,  q4   @ c < b -> -1 , otherwise 0\n+        vcgt.u8  q13, q9,  q5\n+        vcgt.u8  q14, q10, q6\n+        vcgt.u8  q15, q11, q7\n+\n+        vadd.s8  q0,  q12       @ a = sign(c-a) + sign(c-b)\n+        vadd.s8  q1,  q13\n+        vmov.u8  q12, #2\n+        vadd.s8  q2,  q14\n+        vadd.s8  q3,  q15\n+\n+        vadd.s8  q0,  q12\n+        vadd.s8  q1,  q12\n+\n+        vld1.8   {d26, d27}, [r5]\n+\n+        vadd.s8  q2,  q12\n+        vuzp.8   q0,  q1\n+        vmov.u8  q15, #128\n+        vadd.s8  q3,  q12       @ a = 2 + sign(c-a) + sign(c-b)\n+\n+        vtbl.8   d0,  {d26}, d0\n+        vadd.s8  q12, q4, q15   @ Add -128 so we can use saturating signed add\n+\n+        vtbl.8   d1,  {d26}, d1\n+        vadd.s8  q14, q5, q15\n+\n+        vtbl.8   d2,  {d27}, d2\n+        vuzp.8   q2,  q3\n+\n+        vtbl.8   d3,  {d27}, d3\n+\n+        vtbl.8   d4,  {d26}, d4\n+        vzip.8   q0,  q1\n+\n+        vtbl.8   d5,  {d26}, d5\n+        vqadd.s8 q0,  q12\n+        vqadd.s8 q1,  q14\n+        vadd.s8  q12, q6, q15   @ Add -128 so we can use saturating signed add\n+\n+        vtbl.8   d6,  {d27}, d6\n+        vtbl.8   d7,  {d27}, d7\n+        vadd.s8  q14, q7, q15   @ Add -128 so we can use saturating signed add\n+        vzip.8   q2,  q3\n+\n+        vsub.s8  q0,  q15\n+        vqadd.s8 q2,  q12\n+        vqadd.s8 q3,  q14\n+        vsub.s8  q1,  q15\n+        vsub.s8  q2,  q15\n+        vsub.s8  q3,  q15\n+\n+        bx      lr\n+endfunc\n+\n+@ r0    destination address\n+@ r2    stride to post-increment r0 with\n+@ r4    upper clip value\n+@ [r5]  translate values\n+@\n+@ a <- c <- b\n+@ a in q0 - q3\n+@ c in q4 - q7\n+@ b in q8 - q11\n+@\n+@ q12-15 used as temp\n+@\n+@ Can be used for both Y & C as we unzip/zip the deltas and\n+@ transform \"u/v\" separately via d26/d27.  For Y d26=d27\n+\n+function edge_64b_body_16\n+\n+        vcgt.u16 q12, q4, q0  // c > a -> -1 , otherwise 0\n+        vcgt.u16 q13, q5, q1\n+        vcgt.u16 q14, q6, q2\n+        vcgt.u16 q15, q7, q3\n+\n+        vcgt.u16 q0, q0, q4  // a > c -> -1 , otherwise 0\n+        vcgt.u16 q1, q1, q5\n+        vcgt.u16 q2, q2, q6\n+        vcgt.u16 q3, q3, q7\n+\n+        vsub.s16 q0, q0, q12 // a = sign(c-a)\n+        vsub.s16 q1, q1, q13\n+        vsub.s16 q2, q2, q14\n+        vsub.s16 q3, q3, q15\n+\n+        vcgt.u16 q12, q4, q8  // c > b -> -1 , otherwise 0\n+        vcgt.u16 q13, q5, q9\n+        vcgt.u16 q14, q6, q10\n+        vcgt.u16 q15, q7, q11\n+\n+        vsub.s16 q0, q0, q12\n+        vsub.s16 q1, q1, q13\n+        vsub.s16 q2, q2, q14\n+        vsub.s16 q3, q3, q15\n+\n+        vcgt.u16 q12, q8, q4  // c < b -> -1 , otherwise 0\n+        vcgt.u16 q13, q9, q5\n+        vcgt.u16 q14, q10, q6\n+        vcgt.u16 q15, q11, q7\n+\n+        vadd.s16 q0, q0, q12  // a = sign(c-a) + sign(c-b)\n+        vadd.s16 q1, q1, q13\n+        vadd.s16 q2, q2, q14\n+        vadd.s16 q3, q3, q15\n+\n+        vmov.u8  q12, #2\n+\n+        vmovn.s16 d0, q0\n+        vmovn.s16 d1, q1\n+        vmovn.s16 d2, q2\n+        vmovn.s16 d3, q3\n+\n+        vldr     d26, [r5]\n+\n+        vuzp.8   q0, q1\n+\n+        vldr     d27, [r5, #8]\n+\n+        vadd.s8  q0, q0, q12\n+        vadd.s8  q1, q1, q12\n+\n+        vmov.i64 q12, #0\n+\n+        vtbl.8   d0, {d26}, d0\n+        vtbl.8   d1, {d26}, d1\n+        vtbl.8   d2, {d27}, d2\n+        vtbl.8   d3, {d27}, d3\n+\n+        vdup.i16 q13, r4\n+\n+        vzip.8   q0, q1\n+\n+        @ Avoid overwrite whilst widening\n+        vaddw.s8 q2, q6, d2\n+        vaddw.s8 q3, q7, d3\n+        vaddw.s8 q1, q5, d1\n+        vaddw.s8 q0, q4, d0\n+\n+        @ now clip\n+        clip16_4 q2, q3, q1, q0, q12, q13\n+\n+        bx       lr\n+endfunc\n+\n+\n+@ a <- c <- b\n+@ a in q0\n+@ c in q1\n+@ b in q2\n+@ Temp q3, q9, q10\n+@\n+@ d16, d17 (q8) xlat U, V\n+@ q14.u8 #2\n+@ q15.u8 #128\n+\n+function edge_16b_body_8\n+        vcgt.u8  q9,  q0,  q1   @ a > c -> -1 , otherwise 0\n+        vadd.u8  q9,  q14, q9\n+        vcgt.u8  q0,  q1,  q0   @ c > a -> -1 , otherwise 0\n+        vsub.u8  q9,  q9,  q0\n+        vcgt.u8  q0,  q2,  q1   @ c < b -> -1 , otherwise 0\n+        vadd.u8  q9,  q9,  q0\n+        vcgt.u8  q0,  q1,  q2   @ c > b -> -1 , otherwise 0\n+        vsub.u8  q0,  q9,  q0\n+\n+        vadd.s8  q3,  q1, q15   @ Add -128 so we can use saturating signed add\n+\n+        vuzp.8   d0,  d1\n+\n+        vtbl.8   d0,  {d16}, d0\n+        vtbl.8   d1,  {d17}, d1\n+\n+        vzip.8   d0,  d1\n+        vqadd.s8 q0,  q3\n+        vsub.s8  q0,  q15\n+\n+        bx      lr\n+endfunc\n+\n+@ a <- c <- b\n+@ a in q0\n+@ c in q1\n+@ b in q2\n+@ Temp q3\n+@\n+@ q12, #0\n+@ d16, d17 xlat U, V\n+@ q14.u8 #2\n+@ q15.u16 max\n+function edge_16b_body_16\n+        vcgt.u16 q9, q0, q1     @ a > c -> -1 , otherwise 0\n+        vadd.u16 q9, q14, q9\n+        vcgt.u16 q0, q1, q0     @ c > a -> -1 , otherwise 0\n+        vsub.u16 q9, q9, q0\n+        vcgt.u16 q0, q2, q1     @ c < b -> -1 , otherwise 0\n+        vadd.u16 q9, q9, q0\n+        vcgt.u16 q0, q1, q2     @ c > b -> -1 , otherwise 0\n+        vsub.u16 q0, q9, q0\n+\n+        vmovn.s16 d0, q0\n+        @ d1 will have random contents that we transform but\n+        @ that doesn't matter as we then discard them\n+        vuzp.8   d0, d1\n+\n+        vtbl.8   d0, {d16}, d0\n+        vtbl.8   d1, {d17}, d1\n+\n+        vzip.8   d0, d1\n+\n+        vaddw.s8 q0, q1, d0\n+\n+        @ now clip\n+        vmax.s16 q0, q12\n+        vmin.s16 q0, q15\n+        bx       lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_sao_edge_[c_]xx_neon(\n+@   uint8_t *_dst,                    [r0]\n+@   const uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,             [r2]\n+@   const int16_t *_sao_offset_val_u, [r3]\n+@   const int16_t *_sao_offset_val_v, [sp, #0]   // Chroma only\n+@   int eo,                           [sp, #sp_base + 0]\n+@   int width,                        [sp, #sp_base + 4]\n+@   int height)                       [sp, #sp_base + 8]\n+\n+@ Jumps via jump_tab with\n+@   uint8_t *_dst,                    [r0]\n+@   const uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,             [r2]\n+@   EDGE_SRC_STRIDE                   [r3]\n+@   (1 << \\bit_depth) - 1             [r4]\n+@   * xlat_table                      [r5]  // setup_64b only\n+@   int height                        [r12]\n+@\n+@   0                                 [q12] // > 8 bit\n+@   2                                 [q14]\n+@   128                               [q15] // = 8 bit\n+@   r4                                [q15] // > 8 bit\n+\n+.macro  edge_xxb_init, bit_depth, is_chroma, jump_tab, setup_64b = 0, setup_16b = 0, check_w4 = 0, do2 = 0, xjump = 0\n+\n+@ Build translate registers\n+@ As translate values can only be 0-4 we don't care about junk in the rest\n+@ of the register\n+.if \\is_chroma\n+        ldr      ip, [sp, #0]\n+        push     {r4-r6, lr}    @ 16 bytes\n+        vld1.8   {d16[2]}, [r3]\n+        add      r3, r3, #2\n+        vld1.8   {d17[2]}, [ip]\n+        add      ip, ip, #2\n+        vld1.8   {d16[0]}, [r3]\n+        add      r3, r3, #2\n+        vld1.8   {d17[0]}, [ip]\n+        add      ip, ip, #2\n+        vld1.8   {d16[1]}, [r3]\n+        add      r3, r3, #2\n+        vld1.8   {d17[1]}, [ip]\n+        add      ip, ip, #2\n+        vld1.8   {d16[3]}, [r3]\n+        add      r3, r3, #2\n+        vld1.8   {d17[3]}, [ip]\n+        add      ip, ip, #2\n+        vld1.8   {d16[4]}, [r3]\n+        vld1.8   {d17[4]}, [ip]\n+        movw     r3, EDGE_SRC_STRIDE\n+.set sp_base, 20\n+.else\n+        add      ip, r3, #4\n+        vld1.8   {d16[1]}, [r3]\n+        add      r3, r3, #2\n+        vld1.8   {d17[0]}, [ip]\n+        add      ip, ip, #2\n+        vld1.8   {d16[0]}, [r3]\n+        add      r3, r3, #6\n+        vld1.8   {d17[1]}, [ip]\n+        vld1.8   {d16[2]}, [r3]\n+        movw     r3, EDGE_SRC_STRIDE\n+        push     {r4-r6, lr}    @ 16 bytes\n+        vzip.8   d16, d17\n+        vmov     d17, d16\n+.set sp_base, 16\n+.endif\n+\n+@ If setup_64b we need the xlat table on the stack\n+.if \\setup_64b\n+        sub      r5, sp, #16\n+.endif\n+\n+@ Get jump address\n+@ We have a special case for width 4 as the calling code doesn't detect it\n+@ If we may have w4 then we add a 2nd jump table after the 1st\n+.if \\check_w4\n+        ldr      r12, [sp, #sp_base + 4]        @ width\n+        adr      r6, \\jump_tab\n+        ldr      lr, [sp, #sp_base + 0]        @ e0\n+        cmp      r12, #8\n+        it lt\n+        addlt    r6, #16\n+.else\n+        ldr      lr, [sp, #sp_base + 0]        @ e0\n+        adr      r6, \\jump_tab\n+.endif\n+\n+        ldr      r12, [sp, #sp_base + 8]        @ height\n+\n+.if \\bit_depth > 8\n+        movw     r4, (1 << \\bit_depth) - 1\n+.endif\n+.if \\setup_16b\n+.if \\bit_depth > 8\n+        vmov.i64 q12, #0\n+        vdup.16  q15, r4\n+        vmov.u16 q14, #2\n+.else\n+        vmov.u8  q15, #128\n+        vmov.u8  q14, #2\n+.endif\n+.endif\n+\n+@ If setup_64b we need q4-q7 saved.\n+.if \\setup_64b\n+        vpush    {q4-q8}        @ 80 bytes, q8 pushed first\n+.set sp_base, sp_base + 80\n+.endif\n+\n+        ldr      r6, [r6, lr, lsl #2]\n+\n+@ For 16 bit width 64 (or chroma 32) we need to do this in 2 passes\n+.if \\do2\n+        push     {r0, r1, r6, r12}\n+.if jent_pic\n+        bl       98f\n+.else\n+        blx      r6\n+.endif\n+        pop      {r0, r1, r6, r12}\n+\n+        add      r0, #64\n+        add      r1, #64\n+.endif\n+\n+.if jent_pic\n+        bl       98f\n+.else\n+        blx      r6\n+.endif\n+\n+@ Tidy up & return\n+.if \\setup_64b\n+        vpop     {q4-q8}        @ spurious but harmless load of q8\n+.endif\n+        pop      {r4-r6, pc}\n+\n+.if jent_pic && !\\xjump\n+@ Magic label - used as 98b in jent macro\n+98:\n+        add      pc, r6\n+.endif\n+.endm\n+\n+\n+.macro  edge_16b_init, bit_depth, is_chroma, check_w4, jump_tab\n+        edge_xxb_init \\bit_depth, \\is_chroma, \\jump_tab, check_w4=\\check_w4, setup_16b=1\n+.endm\n+\n+.macro  edge_64b_init, bit_depth, is_chroma, do2, jump_tab, xjump=0\n+        edge_xxb_init \\bit_depth, \\is_chroma, \\jump_tab, do2=\\do2, setup_64b=1, xjump=\\xjump\n+.endm\n+\n+\n+.macro  edge_64b_e0, body_fn, pb\n+        sub      r1, #8\n+        mov      r6, lr\n+1:      vldm     r1, {d7-d16}\n+        // load a\n+        vext.8   q0,  q3,  q4, #(16 - \\pb)\n+        add      r1, r3\n+        vext.8   q1,  q4,  q5, #(16 - \\pb)\n+        subs     r12, #1\n+        vext.8   q2,  q5,  q6, #(16 - \\pb)\n+        vext.8   q3,  q6,  q7, #(16 - \\pb)\n+        pld      [r1]\n+        // load b\n+        vext.8   q11, q7,  q8, #\\pb     @ Avoid overwrite\n+        pld      [r1, #64]\n+        vext.8   q8,  q4,  q5, #\\pb\n+        vext.8   q9,  q5,  q6, #\\pb\n+        vext.8   q10, q6,  q7, #\\pb\n+        bl       \\body_fn\n+        vstm     r0, {q0-q3}\n+        add      r0, r0, r2\n+        bgt      1b\n+        bx       r6\n+.endm\n+\n+.macro  edge_32bx2_e0, body_fn, pb\n+        add      r6, r1, r3\n+        push     {r7,lr}\n+        sub      r1, #8\n+        add      r7, r0, r2\n+        lsl      r2, #1\n+1:      vldmia   r1, {d7-d12}\n+        // load a\n+        vext.8   q0, q3, q4, #16 - \\pb\n+        add      r1, r1, r3, lsl #1\n+        vext.8   q1, q4, q5, #16 - \\pb\n+        subs     r12, #2\n+        // load b\n+        vext.8   q8, q4, q5, #\\pb\n+        vext.8   q9, q5, q6, #\\pb\n+        vldr     d25, [r6, #-8]\n+        vldmia   r6, {d12-d15}\n+        vldr     d26, [r6, #32]\n+        // load a\n+        vext.8   q2, q12, q6, #16 - \\pb\n+        add      r6, r6, r3, lsl #1\n+        vext.8   q3, q6, q7, #16 - \\pb\n+        // load b\n+        vext.8   q10, q6, q7, #\\pb\n+        vext.8   q11, q7, q13, #\\pb\n+        bl       \\body_fn\n+        vst1.8   {q0-q1}, [r0, :256], r2\n+        vst1.8   {q2-q3}, [r7, :256], r2\n+        bgt      1b\n+        pop      {r7,pc}\n+.endm\n+\n+.macro  edge_16b_e0, body_fn, pb\n+        sub      r1, #8\n+        mov      r6, lr\n+1:      vldmia   r1, {d1-d4}\n+        add      r1, r3\n+        subs     r12, #1\n+        vext.8   q0, q0, q1, #16 - \\pb\n+        vext.8   q2, q1, q2, #\\pb\n+\n+        bl       \\body_fn\n+        vst1.8   {q0}, [r0, :128], r2\n+        bgt      1b\n+        bx       r6\n+.endm\n+\n+.macro  edge_8bx2_e0, body_fn, pb\n+        add      r6, r1, r3\n+        push     {r7,lr}\n+        sub      r1, #8\n+        add      r7, r0, r2\n+        lsl      r2, #1\n+1:      vldmia   r1, {d1-d2}\n+        vldmia   r6, {d3-d4}\n+        vldr     d6, [r1, #16]\n+        subs     r12, #2\n+        vldr     d7, [r6, #-8]\n+        add      r1, r1, r3, lsl #1\n+        vext.8   d0, d1, d2, #8 - \\pb\n+        add      r6, r6, r3, lsl #1\n+        vext.8   d5, d3, d4, #\\pb\n+        vext.8   d4, d2, d6, #\\pb\n+        vext.8   d1, d7, d3, #8 - \\pb\n+\n+        bl       \\body_fn\n+        vst1.8   {d0}, [r0, :64], r2\n+        vst1.8   {d1}, [r7, :64], r2\n+        bgt      1b\n+        pop      {r7,pc}\n+.endm\n+\n+.macro  edge_4bx4_e0, body_fn, pb\n+        add      r6, r1, r3\n+        push     {r7,lr}\n+        add      r7, r0, r2\n+        lsl      r2, #1\n+\n+        tst      r1, #4\n+        bne      2f\n+1:      // r1 (and assumed r6) are 64-bit aligned\n+        vldr     d2, [r1]\n+        vldr     d0, [r1, #-8]\n+        add      r1, r1, r3, lsl #1\n+        vldr     d20, [r6]\n+        subs     r12, #4\n+        vldr     d18, [r6, #-8]\n+        add      r6, r6, r3, lsl #1\n+        vldr     d3, [r1]\n+        vshr.u64 d4, d2, #\\pb * 8\n+        vldr     d1, [r1, #-8]\n+        add      r1, r1, r3, lsl #1\n+        vldr     d21, [r6]\n+        vext.8   d0, d0, d2, #8 - \\pb\n+        vldr     d19, [r6,#-8]\n+        add      r6, r6, r3, lsl #1\n+        vshr.u64 d22, d20, #\\pb * 8\n+        vext.8   d18, d18, d20, #8 - \\pb\n+        vshr.u64 d5, d3, #\\pb * 8\n+        vext.8   d1, d1, d3, #8 - \\pb\n+        vshr.u64 d23, d21, #\\pb * 8\n+        vext.8   d19, d19, d21, #8 - \\pb\n+        vsli.64  q1, q10, #32\n+        vsli.64  q2, q11, #32\n+        vsli.64  q0, q9, #32\n+\n+        bl       \\body_fn\n+        vst1.32  {d0[0]}, [r0, :32], r2\n+        vst1.32  {d0[1]}, [r7, :32], r2\n+        vst1.32  {d1[0]}, [r0, :32], r2\n+        vst1.32  {d1[1]}, [r7, :32], r2\n+        bgt      1b\n+        pop      {r7,pc}\n+\n+2:      // r1 (and assumed r6) are 32-bit but not 64-bit aligned\n+        vldr     d20, [r1, #-4]\n+        vldr     d22, [r1, #4]\n+        add      r1, r1, r3, lsl #1\n+        vldr     d2, [r6, #-4]\n+        subs     r12, #4\n+        vldr     d4, [r6, #4]\n+        add      r6, r6, r3, lsl #1\n+        vldr     d21, [r1, #-4]\n+        vshl.i64 d18, d20, #\\pb * 8\n+        vldr     d23, [r1, #4]\n+        add      r1, r1, r3, lsl #1\n+        vldr     d3, [r6, #-4]\n+        vext.8   d22, d20, d22, #\\pb\n+        vldr     d5, [r6, #4]\n+        add      r6, r6, r3, lsl #1\n+        vshl.i64 d0, d2, #\\pb * 8\n+        vext.8   d4, d2, d4, #\\pb\n+        vshl.i64 d19, d21, #\\pb * 8\n+        vext.8   d23, d21, d23, #\\pb\n+        vshl.i64 d1, d3, #\\pb * 8\n+        vext.8   d5, d3, d5, #\\pb\n+        vsri.64  q1, q10, #32\n+        vsri.64  q0, q9, #32\n+        vsri.64  q2, q11, #32\n+\n+        bl       \\body_fn\n+        vst1.32  {d0[0]}, [r0, :32], r2\n+        vst1.32  {d0[1]}, [r7, :32], r2\n+        vst1.32  {d1[0]}, [r0, :32], r2\n+        vst1.32  {d1[1]}, [r7, :32], r2\n+        bgt      2b\n+        pop      {r7,pc}\n+.endm\n+\n+\n+.macro  edge_64b_e1, body_fn\n+        sub      r1, r3\n+        push     {lr}\n+        add      r6, r1, #32\n+        // load a\n+        vld1.8   {q0-q1}, [r1, :256], r3\n+        vld1.8   {q2-q3}, [r6, :256], r3\n+        // load c\n+        vld1.8   {q4-q5}, [r1, :256], r3\n+        vld1.8   {q6-q7}, [r6, :256], r3\n+1:      // load b\n+        vld1.8   {q8-q9}, [r1, :256], r3\n+        subs     r12, #1\n+        vld1.8   {q10-q11}, [r6, :256], r3\n+        bl       \\body_fn\n+        vstm     r0, {q0-q3}\n+        // copy c to a\n+        vmov.64  q0, q4\n+        pld      [r1, r3]\n+        vmov.64  q1, q5\n+        it       le\n+        pople    {lr}\n+        vmov.64  q2, q6\n+        it       le\n+        bxle     lr\n+        vmov.64  q3, q7\n+        add      r0, r0, r2\n+        // copy b to c\n+        vmov.64  q4, q8\n+        vmov.64  q5, q9\n+        vmov.64  q6, q10\n+        vmov.64  q7, q11\n+        b        1b\n+.endm\n+\n+.macro  edge_32bx2_e1, body_fn\n+        sub      r6, r1, r3\n+        vld1.8   {q2-q3}, [r1, :256], r3\n+        vld1.8   {q0-q1}, [r6, :256]\n+        mov      r6, lr\n+\n+1:      @ Given the data duplication here we could obviously do better than\n+        @ using the generic body_fn but it almost certainly isn't worth it\n+        vld1.8   {q8-q9}, [r1, :256], r3\n+        subs     r12, #2\n+        vmov     q4, q2\n+        vmov     q5, q3\n+        vld1.8   {q10-q11}, [r1, :256], r3\n+        vmov     q6, q8\n+        vmov     q7, q9\n+\n+        bl       \\body_fn\n+\n+        vst1.8   {q0-q1}, [r0, :256], r2\n+        // copy b to a\n+        vmov     q0, q8\n+        vmov     q1, q9\n+        vst1.8   {q2-q3}, [r0, :256], r2\n+        vmov     q2, q10\n+        it       le\n+        bxle     r6\n+        vmov     q3, q11\n+        b        1b\n+.endm\n+\n+.macro  edge_16b_e1, body_fn\n+        sub      r6, r1, r3\n+        // load c\n+        vld1.8   {q1}, [r1, :128], r3\n+        // load a\n+        vld1.8   {q0}, [r6, :128]\n+        mov      r6, lr\n+1:      // load b\n+        vld1.8   {q2}, [r1, :128], r3\n+        bl       \\body_fn\n+        vst1.8   {q0}, [r0, :128], r2\n+        subs     r12, #1\n+        // copy c to a\n+        vmov.64  q0, q1\n+        it       le\n+        bxle     r6\n+        // copy b to c\n+        vmov.64  q1, q2\n+        b        1b\n+.endm\n+\n+.macro  edge_8bx2_e1, body_fn\n+        sub      r6, r1, r3\n+        lsl      r3, #1\n+        push     {r7, lr}\n+        vld1.8   {d1}, [r1, :64], r3\n+        vld1.8   {d0}, [r6, :64], r3\n+        add      r7, r0, r2\n+        lsl      r2, #1\n+1:      @ Given the data duplication here we could obviously do better than\n+        @ using the generic body_fn but it almost certainly isn't worth it\n+        vld1.8   {d4}, [r6, :64], r3\n+        vmov     d2, d1\n+        vld1.8   {d5}, [r1, :64], r3\n+        subs     r12, #2\n+        vmov     d3, d4\n+\n+        bl       \\body_fn\n+\n+        vst1.8   {d0}, [r0, :64], r2\n+        vst1.8   {d1}, [r7, :64], r2\n+\n+        // copy b to a\n+        vmov     q0, q2\n+        bgt      1b\n+        pop      {r7, pc}\n+.endm\n+\n+.macro  edge_4bx4_e1, body_fn\n+        sub      r6, r1, r3\n+        lsl      r3, #1\n+        push     {r7, lr}\n+        vld1.32  {d0[1]}, [r1, :32], r3\n+        add      r7, r0, r2\n+        vld1.32  {d0[0]}, [r6, :32], r3\n+        lsl      r2, #1\n+        vld1.32  {d4[1]}, [r1, :32], r3\n+        vld1.32  {d4[0]}, [r6, :32], r3\n+        vld1.32  {d5[1]}, [r1, :32], r3\n+        vld1.32  {d5[0]}, [r6, :32], r3\n+        vmov     d1, d4\n+        vext.32  d2, d0, d4, #1\n+        subs     r12, #4\n+        vmov     d22, d5\n+        vext.32  d3, d4, d5, #1\n+        b        2f\n+\n+1:      vst1.32  {d0[0]}, [r0, :32], r2\n+        vext.32  d2, d22, d4, #1\n+        vst1.32  {d0[1]}, [r7, :32], r2\n+        vmov     d0, d22\n+        vst1.32  {d1[0]}, [r0, :32], r2\n+        vext.32  d3, d4, d5, #1\n+        vst1.32  {d1[1]}, [r7, :32], r2\n+        vmov     d1, d4\n+        vmov     d22, d5\n+2:      @ Given the data duplication here we could probably do better than\n+        @ using the generic body_fn but it almost certainly isn't worth it\n+        bl       \\body_fn\n+        ble      3f\n+        vld1.32  {d4[0]}, [r6, :32], r3\n+        subs     r12, #4\n+        vld1.32  {d4[1]}, [r1, :32], r3\n+        vld1.32  {d5[0]}, [r6, :32], r3\n+        vld1.32  {d5[1]}, [r1, :32], r3\n+        b        1b\n+\n+3:      vst1.32  {d0[0]}, [r0, :32], r2\n+        vst1.32  {d0[1]}, [r7, :32], r2\n+        vst1.32  {d1[0]}, [r0, :32]\n+        vst1.32  {d1[1]}, [r7, :32]\n+        pop      {r7, pc}\n+.endm\n+\n+.macro  edge_64b_e2, body_fn, pb\n+        push     {lr}\n+        sub      r6, r1, r3\n+        // load c and a\n+        vld1.8   {q4-q5}, [r1, :128]\n+        vldr     d25, [r6, #-8]\n+        vldmia   r6, {d16-d23}\n+        vext.8   q0, q12, q8, #16 - \\pb\n+        add      r6, r1, #32\n+        vext.8   q1, q8, q9, #16 - \\pb\n+        add      r1, r1, r3\n+        vext.8   q2, q9, q10, #16 - \\pb\n+        vld1.8   {q6-q7}, [r6, :128]\n+        sub      r6, r1, r3\n+        vext.8   q3, q10, q11, #16 - \\pb\n+\n+1:      // load b\n+        vldmia   r1, {d16-d24}\n+        vext.8   q8, q8, q9, #\\pb\n+        pld      [r1, r3]\n+        vext.8   q9, q9, q10, #\\pb\n+        subs     r12, #1\n+        vext.8   q10, q10, q11, #\\pb\n+        vext.8   q11, q11, q12, #\\pb\n+        bl       \\body_fn\n+        // next a is mostly available in c\n+        vldr     d25, [r6, #-8]\n+        vstmia   r0, {q0-q3}\n+        vext.8   q3, q6, q7, #16 - \\pb\n+        it       le\n+        pople    {lr}\n+        vext.8   q2, q5, q6, #16 - \\pb\n+        it       le\n+        bxle     lr\n+        vext.8   q1, q4, q5, #16 - \\pb\n+        add      r6, r6, r3\n+        vext.8   q0, q12, q4, #16 - \\pb\n+        add      r0, r0, r2\n+        // next c is mostly available in b\n+        vldr     d8, [r1]\n+        vext.8   d9, d16, d17, #8 - \\pb\n+        vext.8   q5, q8, q9, #16 - \\pb\n+        add      r1, r1, r3\n+        vext.8   q6, q9, q10, #16 - \\pb\n+        pld      [r6, #-8]\n+        vext.8   q7, q10, q11, #16 - \\pb\n+        b        1b\n+.endm\n+\n+.macro  edge_32bx2_e2, body_fn, pb\n+        sub      r6, r1, r3\n+        push     {r7, lr}\n+        add      r7, r0, r2\n+        lsl      r2, #1\n+        // load a and first 32b of c\n+        vld1.8   {q4-q5}, [r1, :256]\n+        vldr     d25, [r6, #-8]\n+        vld1.8   {q13-q14}, [r6, :256]\n+        vldr     d31, [r1, #-8]\n+        add      r6, r6, r3, lsl #1\n+        vext.8   q0, q12, q13, #16 - \\pb\n+        add      r1, r1, r3, lsl #1\n+        vext.8   q1, q13, q14, #16 - \\pb\n+        vext.8   q2, q15, q4, #16 - \\pb\n+        vext.8   q3, q4, q5, #16 - \\pb\n+1:\n+        // load second 32b of c and second 32b of b\n+        vldmia   r6, {d12-d16}\n+        vldmia   r1, {d20-d24}\n+        // first 32b of b is mostly available in second 32b of c\n+        vext.8   q9, q7, q8, #\\pb\n+        subs     r12, #2\n+        vext.8   q8, q6, q7, #\\pb\n+        vext.8   q10, q10, q11, #\\pb\n+        vext.8   q11, q11, q12, #\\pb\n+\n+        bl       \\body_fn\n+\n+        vst1.8   {q0-q1}, [r0, :256], r2\n+        vst1.8   {q2-q3}, [r7, :256], r2\n+        ble      2f\n+\n+        vldr     d25, [r6, #-8]\n+        add      r6, r6, r3, lsl #1\n+        vldr     d8, [r1]\n+        vext.8   d9, d20, d21, #8 - \\pb\n+        vldr     d31, [r1, #-8]\n+        add      r1, r1, r3, lsl #1\n+        // first 32b of a is mostly available in second 32b of c\n+        vext.8   q1, q6, q7, #16 - \\pb\n+        vext.8   q0, q12, q6, #16 - \\pb\n+        // first 32b of c is mostly available in second 32b of b\n+        vext.8   q5, q10, q11, #16 - \\pb\n+        // second 32b of a is mostly available in first 32b of c\n+        vext.8   q2, q15, q4, #16 - \\pb\n+        vext.8   q3, q4, q5, #16 - \\pb\n+        b        1b\n+\n+2:      pop      {r7, pc}\n+.endm\n+\n+.macro  edge_16b_e2, body_fn, pb\n+        push     {lr}\n+        sub      r6, r1, r3\n+        vld1.8   {q1}, [r1, :128], r3\n+        vldr     d19, [r6, #-8]\n+        vld1.8   {q10}, [r6, :128], r3\n+\n+1:      vldmia   r1, {d4-d6}\n+        vext.8   q0, q9, q10, #16 - \\pb\n+        subs     r12, #1\n+        vext.8   q2, q2, q3, #\\pb\n+        bl       \\body_fn\n+        vst1.8   {q0}, [r0, :128], r2\n+        ble      2f\n+        vmov     q10, q1\n+        vldr     d2, [r1]\n+        add      r1, r1, r3\n+        vldr     d19, [r6, #-8]\n+        add      r6, r6, r3\n+        vext.8   d3, d4, d5, #8 - \\pb\n+        b        1b\n+\n+2:      pop      {pc}\n+.endm\n+\n+.macro  edge_8bx2_e2, body_fn, pb\n+        sub      r6, r1, r3\n+        push     {r7, lr}\n+        add      r7, r0, r2\n+        lsl      r2, #1\n+        vldr     d18, [r6, #-8]\n+        vldr     d19, [r6]\n+        add      r6, r6, r3, lsl #1\n+        vldr     d20, [r1, #-8]\n+        vldr     d2, [r1]\n+        add      r1, r1, r3, lsl #1\n+        vldmia   r6, {d3-d4}\n+        vld1.8   {d21-d22}, [r1, :128]\n+\n+1:      vext.8   d0, d18, d19, #8 - \\pb\n+        vext.8   d4, d3, d4, #\\pb\n+        vext.8   d1, d20, d2, #8 - \\pb\n+        subs     r12, #2\n+        vext.8   d5, d21, d22, #\\pb\n+\n+        bl       \\body_fn\n+\n+        vst1.8   {d0}, [r0, :64], r2\n+        vst1.8   {d1}, [r7, :64], r2\n+        ble      2f\n+\n+        vldr     d18, [r6, #-8]\n+        add      r6, r6, r3, lsl #1\n+        vldr     d20, [r1, #-8]\n+        vmov     d19, d3\n+        vldr     d2, [r1]\n+        add      r1, r1, r3, lsl #1\n+        vldmia   r6, {d3-d4}\n+        vld1.8   {d21-d22}, [r1, :128]\n+        b        1b\n+\n+2:      pop      {r7, pc}\n+.endm\n+\n+.macro  edge_4bx4_e2, body_fn, pb\n+        sub      r6, r1, r3\n+        push     {r7-r9, lr}\n+        add      r8, r1, r3\n+        sub      r6, r6, #\\pb\n+        add      r8, r8, #\\pb\n+        add      r7, r0, r2\n+        lsl      r2, #1\n+\n+1:      vld1.32  {d0[0]}, [r6], r3\n+        subs     r12, #4\n+        vld1.32  {d2[0]}, [r1], r3\n+        vld1.32  {d4[0]}, [r8], r3\n+        vld1.32  {d0[1]}, [r6], r3\n+        vld1.32  {d2[1]}, [r1], r3\n+        vld1.32  {d4[1]}, [r8], r3\n+        vld1.32  {d1[0]}, [r6], r3\n+        vld1.32  {d3[0]}, [r1], r3\n+        vld1.32  {d5[0]}, [r8], r3\n+        vld1.32  {d1[1]}, [r6], r3\n+        vld1.32  {d3[1]}, [r1], r3\n+        vld1.32  {d5[1]}, [r8], r3\n+\n+        bl       \\body_fn\n+\n+        vst1.32  {d0[0]}, [r0, :32], r2\n+        vst1.32  {d0[1]}, [r7, :32], r2\n+        vst1.32  {d1[0]}, [r0, :32], r2\n+        vst1.32  {d1[1]}, [r7, :32], r2\n+        bgt      1b\n+\n+        pop      {r7-r9,pc}\n+.endm\n+\n+.macro  edge_64b_e3, body_fn, pb\n+        push     {lr}\n+        sub      r6, r1, r3\n+        // load c and a\n+        vld1.8   {q4-q5}, [r1, :128]\n+        vldmia   r6, {d16-d24}\n+        vext.8   q0, q8, q9, #\\pb\n+        add      r6, r1, #32\n+        vext.8   q1, q9, q10, #\\pb\n+        add      r1, r1, r3\n+        vext.8   q2, q10, q11, #\\pb\n+        vld1.8   {q6-q7}, [r6, :128]\n+        sub      r6, r1, r3\n+        vext.8   q3, q11, q12, #\\pb\n+\n+1:      // load b\n+        vldr     d17, [r1, #-8]\n+        vldmia   r1, {d18-d25}\n+        vext.8   q8, q8, q9, #16 - \\pb\n+        pld      [r1, r3]\n+        vext.8   q9, q9, q10, #16 - \\pb\n+        subs     r12, #1\n+        vext.8   q10, q10, q11, #16 - \\pb\n+        vext.8   q11, q11, q12, #16 - \\pb\n+        bl       \\body_fn\n+        // next a is mostly available in c\n+        vldr     d24, [r6, #64]\n+        vstmia   r0, {q0-q3}\n+        vext.8   q0, q4, q5, #\\pb\n+        it       le\n+        pople    {lr}\n+        vext.8   q1, q5, q6, #\\pb\n+        it       le\n+        bxle     lr\n+        vext.8   q2, q6, q7, #\\pb\n+        add      r6, r6, r3\n+        vext.8   q3, q7, q12, #\\pb\n+        add      r0, r0, r2\n+        // next c is mostly available in b\n+        vext.8   d14, d22, d23, #\\pb\n+        vldr     d15, [r1, #56]\n+        vext.8   q4, q8, q9, #\\pb\n+        add      r1, r1, r3\n+        vext.8   q5, q9, q10, #\\pb\n+        vext.8   q6, q10, q11, #\\pb\n+        b        1b\n+.endm\n+\n+.macro  edge_32bx2_e3, body_fn, pb\n+        sub      r6, r1, r3\n+        push     {r7, lr}\n+        add      r7, r0, r2\n+        lsl      r2, #1\n+        // load a and first 32b of c\n+        vldmia   r1, {d8-d12}\n+        vldmia   r6, {d24-d28}\n+        vext.8   q2, q4, q5, #\\pb\n+        add      r6, r6, r3, lsl #1\n+        vext.8   q3, q5, q6, #\\pb\n+        add      r1, r1, r3, lsl #1\n+        vext.8   q0, q12, q13, #\\pb\n+        vext.8   q1, q13, q14, #\\pb\n+1:\n+        // load second 32b of c and second 32b of b\n+        vldr     d25, [r6, #-8]\n+        subs     r12, #2\n+        vldmia   r6, {d12-d15}\n+        vldr     d27, [r1, #-8]\n+        vldmia   r1, {d20-d23}\n+        // first 32b of b is mostly available in second 32b of c\n+        vext.8   q8, q12, q6, #16 - \\pb\n+        vext.8   q9, q6, q7, #16 - \\pb\n+        vext.8   q11, q10, q11, #16 - \\pb\n+        vext.8   q10, q13, q10, #16 - \\pb\n+\n+        bl       \\body_fn\n+\n+        vst1.8   {q0-q1}, [r0, :256], r2\n+        vst1.8   {q2-q3}, [r7, :256], r2\n+        ble      2f\n+\n+        vldr     d24, [r6, #32]\n+        add      r6, r6, r3, lsl #1\n+        vldr     d11, [r1, #24]\n+        vext.8   d10, d22, d23, #\\pb\n+        vldr     d30, [r1, #32]\n+        add      r1, r1, r3, lsl #1\n+        // first 32b of a is mostly available in second 32b of c\n+        vext.8   q0, q6, q7, #\\pb\n+        vext.8   q1, q7, q12, #\\pb\n+        // first 32b of c is mostly available in second 32b of b\n+        vext.8   q4, q10, q11, #\\pb\n+        // second 32b of a is mostly available in first 32b of c\n+        vext.8   q3, q5, q15, #\\pb\n+        vext.8   q2, q4, q5, #\\pb\n+        b        1b\n+\n+2:      pop      {r7, pc}\n+.endm\n+\n+.macro  edge_16b_e3, body_fn, pb\n+        push     {lr}\n+        sub      r6, r1, r3\n+        vld1.8   {q1}, [r1, :128], r3\n+        vldmia   r6, {d18-d20}\n+        add      r6, r6, r3\n+\n+1:      vldr     d5, [r1, #-8]\n+        vld1.8   {q3}, [r1, :128]\n+        subs     r12, #1\n+        vext.8   q0, q9, q10, #\\pb\n+        vext.8   q2, q2, q3, #16 - \\pb\n+        bl       \\body_fn\n+        vst1.8   {q0}, [r0, :128], r2\n+        ble      2f\n+        vmov     q9, q1\n+        vldr     d3, [r1, #8]\n+        add      r1, r1, r3\n+        vldr     d20, [r6, #16]\n+        add      r6, r6, r3\n+        vext.8   d2, d4, d5, #\\pb\n+        b        1b\n+\n+2:      pop      {pc}\n+.endm\n+\n+.macro  edge_8bx2_e3, body_fn, pb\n+        sub      r6, r1, r3\n+        push     {r7, lr}\n+        add      r7, r0, r2\n+        lsl      r2, #1\n+        vld1.8   {d18-d19}, [r6]\n+        add      r6, r6, r3, lsl #1\n+        vldr     d20, [r1, #8]\n+        vldr     d2, [r1]\n+        add      r1, r1, r3, lsl #1\n+        vldr     d4, [r6, #-8]\n+        vldr     d3, [r6]\n+        vldr     d21, [r1, #-8]\n+        vldr     d22, [r1]\n+\n+1:      vext.8   d0, d18, d19, #\\pb\n+        vext.8   d4, d4, d3, #8 - \\pb\n+        vext.8   d1, d2, d20, #\\pb\n+        subs     r12, #2\n+        vext.8   d5, d21, d22, #8 - \\pb\n+\n+        bl       \\body_fn\n+\n+        vst1.8   {d0}, [r0, :64], r2\n+        vst1.8   {d1}, [r7, :64], r2\n+        ble      2f\n+\n+        vldr     d19, [r6, #8]\n+        add      r6, r6, r3, lsl #1\n+        vldr     d20, [r1, #8]\n+        vmov     d18, d3\n+        vldr     d2, [r1]\n+        add      r1, r1, r3, lsl #1\n+        vldr     d4, [r6, #-8]\n+        vldr     d3, [r6]\n+        vldr     d21, [r1, #-8]\n+        vldr     d22, [r1]\n+        b        1b\n+\n+2:      pop      {r7, pc}\n+.endm\n+\n+.macro  edge_4bx4_e3, body_fn, pb\n+        @ e3 is the same as e2 but with the X offset reversed\n+        edge_4bx4_e2 \\body_fn, (-\\pb)\n+.endm\n+\n+@ Jump table entry - if in neon mode the bottom bit must be set\n+@ ? There is probably a real asm instruction to do this but I haven't found it\n+.macro jent lab\n+.if jent_pic\n+@ Could use .short here but due to A32 not supporting ldrh [lsl#1] it is\n+@ simpler and clearer in the code to stick with .word\n+T       .word  (0 + \\lab) - (4 + 98b)\n+A       .word  (0 + \\lab) - (8 + 98b)\n+.else\n+T       .word   1 + \\lab\n+A       .word   \\lab\n+.endif\n+.endm\n+\n+.macro edge_64b_bodies, body_fn, pb\n+        jent    0f\n+        jent    10f\n+        jent    20f\n+        jent    30f\n+\n+0:      edge_64b_e0     \\body_fn, \\pb\n+10:     edge_64b_e1     \\body_fn\n+20:     edge_64b_e2     \\body_fn, \\pb\n+30:     edge_64b_e3     \\body_fn, \\pb\n+.endm\n+\n+.macro edge_32bx2_bodies, body_fn, pb\n+        jent    0f\n+        jent    10f\n+        jent    20f\n+        jent    30f\n+\n+0:      edge_32bx2_e0   \\body_fn, \\pb\n+10:     edge_32bx2_e1   \\body_fn\n+20:     edge_32bx2_e2   \\body_fn, \\pb\n+30:     edge_32bx2_e3   \\body_fn, \\pb\n+.endm\n+\n+.macro edge_16b_bodies, body_fn, pb\n+        jent    0f\n+        jent    10f\n+        jent    20f\n+        jent    30f\n+\n+0:      edge_16b_e0     \\body_fn, \\pb\n+10:     edge_16b_e1     \\body_fn\n+20:     edge_16b_e2     \\body_fn, \\pb\n+30:     edge_16b_e3     \\body_fn, \\pb\n+.endm\n+\n+.macro edge_32bx2_16b_bodies, body_fn_64b, body_fn_16b, pb\n+        jent    0f\n+        jent    10f\n+        jent    20f\n+        jent    30f\n+        jent    5f\n+        jent    15f\n+        jent    25f\n+        jent    35f\n+\n+0:      edge_32bx2_e0   \\body_fn_64b, \\pb\n+10:     edge_32bx2_e1   \\body_fn_64b\n+20:     edge_32bx2_e2   \\body_fn_64b, \\pb\n+30:     edge_32bx2_e3   \\body_fn_64b, \\pb\n+5:      edge_16b_e0     \\body_fn_16b, \\pb\n+15:     edge_16b_e1     \\body_fn_16b\n+25:     edge_16b_e2     \\body_fn_16b, \\pb\n+35:     edge_16b_e3     \\body_fn_16b, \\pb\n+.endm\n+\n+.macro edge_16b_8bx2_bodies, body_fn, pb\n+        jent    0f\n+        jent    10f\n+        jent    20f\n+        jent    30f\n+        jent    5f\n+        jent    15f\n+        jent    25f\n+        jent    35f\n+\n+0:      edge_16b_e0     \\body_fn, \\pb\n+10:     edge_16b_e1     \\body_fn\n+20:     edge_16b_e2     \\body_fn, \\pb\n+30:     edge_16b_e3     \\body_fn, \\pb\n+5:      edge_8bx2_e0    \\body_fn, \\pb\n+15:     edge_8bx2_e1    \\body_fn\n+25:     edge_8bx2_e2    \\body_fn, \\pb\n+35:     edge_8bx2_e3    \\body_fn, \\pb\n+.endm\n+\n+.macro edge_8bx2_4bx4_bodies, body_fn, pb\n+        jent    0f\n+        jent    10f\n+        jent    20f\n+        jent    30f\n+        jent    5f\n+        jent    15f\n+        jent    25f\n+        jent    35f\n+\n+0:      edge_8bx2_e0    \\body_fn, \\pb\n+10:     edge_8bx2_e1    \\body_fn\n+20:     edge_8bx2_e2    \\body_fn, \\pb\n+30:     edge_8bx2_e3    \\body_fn, \\pb\n+5:      edge_4bx4_e0    \\body_fn, \\pb\n+15:     edge_4bx4_e1    \\body_fn\n+25:     edge_4bx4_e2    \\body_fn, \\pb\n+35:     edge_4bx4_e3    \\body_fn, \\pb\n+.endm\n+\n+@ void ff_hevc_rpi_sao_edge_8_neon_8(\n+@   uint8_t *_dst,            [r0]\n+@   uint8_t *_src,            [r1]\n+@   int  stride_dst,          [r2]\n+@   int16_t *_sao_offset_val, [r3]\n+@   int eo,                   [sp, #0]\n+@   int width,                [sp, #4]\n+@   int height)               [sp, #8]\n+\n+function ff_hevc_rpi_sao_edge_8_neon_8, export=1\n+        edge_16b_init   8, 0, 1, 99f\n+99:\n+        edge_8bx2_4bx4_bodies edge_16b_body_8, 1\n+endfunc\n+\n+@ void ff_hevc_rpi_sao_edge_16_neon_8(\n+@   uint8_t *_dst,            [r0]\n+@   uint8_t *_src,            [r1]\n+@   int  stride_dst,          [r2]\n+@   int16_t *_sao_offset_val, [r3]\n+@   int eo,                   [sp, #0]\n+@   int width,                [sp, #4]\n+@   int height)               [sp, #8]\n+\n+function ff_hevc_rpi_sao_edge_16_neon_8, export=1\n+        edge_16b_init   8, 0, 0, 99f\n+99:\n+        edge_16b_bodies edge_16b_body_8, 1\n+endfunc\n+\n+@ void ff_hevc_rpi_sao_edge_32_neon_8(\n+@   uint8_t *_dst,            [r0]\n+@   uint8_t *_src,            [r1]\n+@   int  stride_dst,          [r2]\n+@   int16_t *_sao_offset_val, [r3]\n+@   int eo,                   [sp, #0]\n+@   int width,                [sp, #4]\n+@   int height)               [sp, #8]\n+\n+function ff_hevc_rpi_sao_edge_32_neon_8, export=1\n+        edge_64b_init   8, 0, 0, 99f\n+99:\n+        edge_32bx2_bodies edge_64b_body_8, 1\n+endfunc\n+\n+@ void ff_hevc_rpi_sao_edge_64_neon_8(\n+@   uint8_t *_dst,            [r0]\n+@   uint8_t *_src,            [r1]\n+@   int  stride_dst,          [r2]\n+@   int16_t *_sao_offset_val, [r3]\n+@   int eo,                   [sp, #0]\n+@   int width,                [sp, #4]\n+@   int height)               [sp, #8]\n+\n+function ff_hevc_rpi_sao_edge_64_neon_8, export=1\n+        edge_64b_init   8, 0, 0, 99f\n+99:\n+        edge_64b_bodies edge_64b_body_8, 1\n+endfunc\n+\n+@ ff_hevc_rpi_sao_edge_c_8_neon_8(\n+@   uint8_t *_dst,                    [r0]\n+@   const uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,             [r2]\n+@   const int16_t *_sao_offset_val_u, [r3]\n+@   const int16_t *_sao_offset_val_v, [sp, #0]\n+@   int eo,                           [sp, #4]\n+@   int width,                        [sp, #8]\n+@   int height)                       [sp, #12]\n+\n+function ff_hevc_rpi_sao_edge_c_8_neon_8, export=1\n+        edge_16b_init   8, 1, 1, 99f\n+99:\n+        edge_16b_8bx2_bodies edge_16b_body_8, 2\n+endfunc\n+\n+@ ff_hevc_rpi_sao_edge_c_16_neon_8(\n+@   uint8_t *_dst,                    [r0]\n+@   const uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,             [r2]\n+@   const int16_t *_sao_offset_val_u, [r3]\n+@   const int16_t *_sao_offset_val_v, [sp, #0]\n+@   int eo,                           [sp, #4]\n+@   int width,                        [sp, #8]\n+@   int height)                       [sp, #12]\n+\n+function ff_hevc_rpi_sao_edge_c_16_neon_8, export=1\n+        edge_64b_init   8, 1, 0, 99f\n+99:\n+        edge_32bx2_bodies edge_64b_body_8, 2\n+endfunc\n+\n+@ ff_hevc_rpi_sao_edge_c_32_neon_8(\n+@   uint8_t *_dst,                    [r0]\n+@   const uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,             [r2]\n+@   const int16_t *_sao_offset_val_u, [r3]\n+@   const int16_t *_sao_offset_val_v, [sp, #0]\n+@   int eo,                           [sp, #4]\n+@   int width,                        [sp, #8]\n+@   int height)                       [sp, #12]\n+\n+function ff_hevc_rpi_sao_edge_c_32_neon_8, export=1\n+        edge_64b_init   8, 1, 0, 99f\n+99:\n+        edge_64b_bodies edge_64b_body_8, 2\n+endfunc\n+\n+@ void ff_hevc_rpi_sao_edge_8_neon_10(\n+@   uint8_t *_dst,            [r0]\n+@   uint8_t *_src,            [r1]\n+@   int  stride_dst,          [r2]\n+@   int16_t *_sao_offset_val, [r3]\n+@   int eo,                   [sp, #0]\n+@   int width,                [sp, #4]\n+@   int height)               [sp, #8]\n+\n+function ff_hevc_rpi_sao_edge_8_neon_10, export=1\n+        edge_16b_init   10, 0, 1, 99f\n+99:\n+        edge_16b_8bx2_bodies edge_16b_body_16, 2\n+endfunc\n+\n+@ void ff_hevc_rpi_sao_edge_16_neon_10(\n+@   uint8_t *_dst,            [r0]\n+@   uint8_t *_src,            [r1]\n+@   int  stride_dst,          [r2]\n+@   int16_t *_sao_offset_val, [r3]\n+@   int eo,                   [sp, #0]\n+@   int width,                [sp, #4]\n+@   int height)               [sp, #8]\n+\n+function ff_hevc_rpi_sao_edge_16_neon_10, export=1\n+        edge_64b_init   10, 0, 0, 99f\n+99:\n+        edge_32bx2_bodies edge_64b_body_16, 2\n+endfunc\n+\n+@ void ff_hevc_rpi_sao_edge_64_neon_10(\n+@   uint8_t *_dst,            [r0]\n+@   uint8_t *_src,            [r1]\n+@   int  stride_dst,          [r2]\n+@   int16_t *_sao_offset_val, [r3]\n+@   int eo,                   [sp, #0]\n+@   int width,                [sp, #4]\n+@   int height)               [sp, #8]\n+\n+@ We simply split the 32 case into 2 vertical stripes\n+@ and call the fns for w32\n+@\n+@ Calling code will always have src != dst so we don't have to worry\n+@ about edge effects\n+\n+function ff_hevc_rpi_sao_edge_64_neon_10, export=1\n+        edge_64b_init   10, 0, 1, 99f, xjump=1\n+endfunc\n+\n+@ void ff_hevc_rpi_sao_edge_32_neon_10(\n+@   uint8_t *_dst,            [r0]\n+@   uint8_t *_src,            [r1]\n+@   int  stride_dst,          [r2]\n+@   int16_t *_sao_offset_val, [r3]\n+@   int eo,                   [sp, #0]\n+@   int width,                [sp, #4]\n+@   int height)               [sp, #8]\n+\n+function ff_hevc_rpi_sao_edge_32_neon_10, export=1\n+        edge_64b_init   10, 0, 0, 99f\n+99:\n+        edge_64b_bodies edge_64b_body_16, 2\n+endfunc\n+\n+@ ff_hevc_rpi_sao_edge_c_8_neon_10(\n+@   uint8_t *_dst,                    [r0]\n+@   const uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,             [r2]\n+@   const int16_t *_sao_offset_val_u, [r3]\n+@   const int16_t *_sao_offset_val_v, [sp, #0]\n+@   int eo,                           [sp, #4]\n+@   int width,                        [sp, #8]\n+@   int height)                       [sp, #12]\n+\n+function ff_hevc_rpi_sao_edge_c_8_neon_10, export=1\n+        edge_xxb_init   10, 1, 99f, check_w4=1, setup_16b=1, setup_64b=1\n+99:\n+        edge_32bx2_16b_bodies edge_64b_body_16, edge_16b_body_16, 4\n+endfunc\n+\n+@ ff_hevc_rpi_sao_edge_c_32_neon_10(\n+@   uint8_t *_dst,                    [r0]\n+@   const uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,             [r2]\n+@   const int16_t *_sao_offset_val_u, [r3]\n+@   const int16_t *_sao_offset_val_v, [sp, #0]\n+@   int eo,                           [sp, #4]\n+@   int width,                        [sp, #8]\n+@   int height)                       [sp, #12]\n+\n+function ff_hevc_rpi_sao_edge_c_32_neon_10, export=1\n+        edge_64b_init   10, 1, 1, 99f, xjump=1\n+endfunc\n+\n+\n+@ ff_hevc_rpi_sao_edge_c_16_neon_10(\n+@   uint8_t *_dst,                    [r0]\n+@   const uint8_t *_src,              [r1]\n+@   ptrdiff_t stride_dst,             [r2]\n+@   const int16_t *_sao_offset_val_u, [r3]\n+@   const int16_t *_sao_offset_val_v, [sp, #0]\n+@   int eo,                           [sp, #4]\n+@   int width,                        [sp, #8]\n+@   int height)                       [sp, #12]\n+\n+function ff_hevc_rpi_sao_edge_c_16_neon_10, export=1\n+        edge_64b_init   10, 1, 0, 99f\n+99:\n+        edge_64b_bodies edge_64b_body_16, 4\n+endfunc\n+\ndiff --git a/libavcodec/arm/rpi_hevcpred_arm.h b/libavcodec/arm/rpi_hevcpred_arm.h\nnew file mode 100644\nindex 0000000000..36a23a5bf9\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcpred_arm.h\n@@ -0,0 +1,28 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#ifndef AVCODEC_ARM_HEVCPRED_ARM_H\n+#define AVCODEC_ARM_HEVCPRED_ARM_H\n+\n+#include \"libavcodec/rpi_hevcpred.h\"\n+\n+void ff_hevc_rpi_pred_init_arm(HEVCRpiPredContext * const c, const int bit_depth);\n+void ff_hevc_rpi_pred_init_neon(HEVCRpiPredContext * const c, const int bit_depth);\n+\n+#endif /* AVCODEC_ARM_HEVCPRED_ARM_H */\n+\ndiff --git a/libavcodec/arm/rpi_hevcpred_init_arm.c b/libavcodec/arm/rpi_hevcpred_init_arm.c\nnew file mode 100644\nindex 0000000000..80724d4cf3\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcpred_init_arm.c\n@@ -0,0 +1,35 @@\n+/*\n+ * Copyright (c) 2018 John Cox (for Raspberry Pi)\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"libavutil/attributes.h\"\n+#include \"libavutil/cpu.h\"\n+#include \"libavutil/arm/cpu.h\"\n+\n+#include \"libavcodec/rpi_hevcpred.h\"\n+#include \"rpi_hevcpred_arm.h\"\n+\n+av_cold void ff_hevc_rpi_pred_init_arm(HEVCRpiPredContext * const c, const int bit_depth)\n+{\n+    int cpu_flags = av_get_cpu_flags();\n+\n+    if (have_neon(cpu_flags))\n+        ff_hevc_rpi_pred_init_neon(c, bit_depth);\n+}\n+\ndiff --git a/libavcodec/arm/rpi_hevcpred_init_neon.c b/libavcodec/arm/rpi_hevcpred_init_neon.c\nnew file mode 100644\nindex 0000000000..21e7700174\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcpred_init_neon.c\n@@ -0,0 +1,210 @@\n+/*\n+ * Copyright (c) 2018 John Cox (for Raspberry Pi)\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"rpi_hevcpred_arm.h\"\n+\n+intra_filter_fn_t ff_hevc_rpi_intra_filter_4_neon_8;\n+intra_filter_fn_t ff_hevc_rpi_intra_filter_8_neon_8;\n+intra_filter_fn_t ff_hevc_rpi_intra_filter_4_neon_16;\n+intra_filter_fn_t ff_hevc_rpi_intra_filter_8_neon_16;\n+intra_filter_fn_t ff_hevc_rpi_intra_filter_16_neon_16;\n+intra_filter_fn_t ff_hevc_rpi_intra_filter_4_neon_32;\n+intra_filter_fn_t ff_hevc_rpi_intra_filter_8_neon_32;\n+intra_filter_fn_t ff_hevc_rpi_intra_filter_16_neon_32;\n+\n+void ff_hevc_rpi_pred_angular_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_angular_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_angular_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_angular_32_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_angular_c_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_angular_c_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_angular_c_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_angular_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_angular_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_angular_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_angular_32_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_angular_c_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_angular_c_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_angular_c_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+\n+void ff_hevc_rpi_pred_vertical_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_vertical_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_vertical_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_vertical_32_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_vertical_c_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_vertical_c_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_vertical_c_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_vertical_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_vertical_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_vertical_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_vertical_32_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_vertical_c_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_vertical_c_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_vertical_c_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+\n+void ff_hevc_rpi_pred_horizontal_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_horizontal_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_horizontal_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_horizontal_32_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_horizontal_c_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_horizontal_c_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_horizontal_c_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_horizontal_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_horizontal_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_horizontal_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_horizontal_32_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_horizontal_c_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_horizontal_c_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+void ff_hevc_rpi_pred_horizontal_c_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int mode);\n+\n+void ff_hevc_rpi_pred_planar_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_planar_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_planar_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_planar_32_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_planar_c_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_planar_c_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_planar_c_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_planar_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_planar_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_planar_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_planar_32_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_planar_c_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_planar_c_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_planar_c_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+\n+void ff_hevc_rpi_pred_dc_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_dc_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_dc_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_dc_32_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_dc_c_4_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_dc_c_8_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_dc_c_16_neon_8(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_dc_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_dc_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_dc_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_dc_32_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_dc_c_4_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_dc_c_8_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+void ff_hevc_rpi_pred_dc_c_16_neon_10(uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride);\n+\n+void ff_hevc_rpi_pred_init_neon(HEVCRpiPredContext * const c, const int bit_depth)\n+{\n+    switch (bit_depth)\n+    {\n+    case 8:\n+        c->intra_filter[0] = ff_hevc_rpi_intra_filter_4_neon_8;\n+        c->intra_filter[1] = ff_hevc_rpi_intra_filter_8_neon_8;\n+        c->intra_filter_c[0] = ff_hevc_rpi_intra_filter_4_neon_16;  // Equivalent to c_4_neon_8\n+        c->intra_filter_c[1] = ff_hevc_rpi_intra_filter_8_neon_16;\n+        c->intra_filter_c[2] = ff_hevc_rpi_intra_filter_16_neon_16;\n+\n+        c->pred_angular[0] = ff_hevc_rpi_pred_angular_4_neon_8;\n+        c->pred_angular[1] = ff_hevc_rpi_pred_angular_8_neon_8;\n+        c->pred_angular[2] = ff_hevc_rpi_pred_angular_16_neon_8;\n+        c->pred_angular[3] = ff_hevc_rpi_pred_angular_32_neon_8;\n+        c->pred_angular_c[0] = ff_hevc_rpi_pred_angular_c_4_neon_8;\n+        c->pred_angular_c[1] = ff_hevc_rpi_pred_angular_c_8_neon_8;\n+        c->pred_angular_c[2] = ff_hevc_rpi_pred_angular_c_16_neon_8;\n+\n+        c->pred_horizontal[0] = ff_hevc_rpi_pred_horizontal_4_neon_8;\n+        c->pred_horizontal[1] = ff_hevc_rpi_pred_horizontal_8_neon_8;\n+        c->pred_horizontal[2] = ff_hevc_rpi_pred_horizontal_16_neon_8;\n+        c->pred_horizontal[3] = ff_hevc_rpi_pred_horizontal_32_neon_8;\n+        c->pred_horizontal_c[0] = ff_hevc_rpi_pred_horizontal_c_4_neon_8;\n+        c->pred_horizontal_c[1] = ff_hevc_rpi_pred_horizontal_c_8_neon_8;\n+        c->pred_horizontal_c[2] = ff_hevc_rpi_pred_horizontal_c_16_neon_8;\n+\n+        c->pred_vertical[0] = ff_hevc_rpi_pred_vertical_4_neon_8;\n+        c->pred_vertical[1] = ff_hevc_rpi_pred_vertical_8_neon_8;\n+        c->pred_vertical[2] = ff_hevc_rpi_pred_vertical_16_neon_8;\n+        c->pred_vertical[3] = ff_hevc_rpi_pred_vertical_32_neon_8;\n+        c->pred_vertical_c[0] = ff_hevc_rpi_pred_vertical_c_4_neon_8;\n+        c->pred_vertical_c[1] = ff_hevc_rpi_pred_vertical_c_8_neon_8;\n+        c->pred_vertical_c[2] = ff_hevc_rpi_pred_vertical_c_16_neon_8;\n+\n+        c->pred_planar[0] = ff_hevc_rpi_pred_planar_4_neon_8;\n+        c->pred_planar[1] = ff_hevc_rpi_pred_planar_8_neon_8;\n+        c->pred_planar[2] = ff_hevc_rpi_pred_planar_16_neon_8;\n+        c->pred_planar[3] = ff_hevc_rpi_pred_planar_32_neon_8;\n+        c->pred_planar_c[0] = ff_hevc_rpi_pred_planar_c_4_neon_8;\n+        c->pred_planar_c[1] = ff_hevc_rpi_pred_planar_c_8_neon_8;\n+        c->pred_planar_c[2] = ff_hevc_rpi_pred_planar_c_16_neon_8;\n+\n+        c->pred_dc[0]   = ff_hevc_rpi_pred_dc_4_neon_8;\n+        c->pred_dc[1]   = ff_hevc_rpi_pred_dc_8_neon_8;\n+        c->pred_dc[2]   = ff_hevc_rpi_pred_dc_16_neon_8;\n+        c->pred_dc[3]   = ff_hevc_rpi_pred_dc_32_neon_8;\n+        c->pred_dc_c[0] = ff_hevc_rpi_pred_dc_c_4_neon_8;\n+        c->pred_dc_c[1] = ff_hevc_rpi_pred_dc_c_8_neon_8;\n+        c->pred_dc_c[2] = ff_hevc_rpi_pred_dc_c_16_neon_8;\n+        break;\n+    case 10:\n+        c->intra_filter[0] = ff_hevc_rpi_intra_filter_4_neon_16;\n+        c->intra_filter[1] = ff_hevc_rpi_intra_filter_8_neon_16;\n+        c->intra_filter[2] = ff_hevc_rpi_intra_filter_16_neon_16;\n+        c->intra_filter_c[0] = ff_hevc_rpi_intra_filter_4_neon_32;\n+        c->intra_filter_c[1] = ff_hevc_rpi_intra_filter_8_neon_32;\n+        c->intra_filter_c[2] = ff_hevc_rpi_intra_filter_16_neon_32;\n+\n+        c->pred_angular[0] = ff_hevc_rpi_pred_angular_4_neon_10;\n+        c->pred_angular[1] = ff_hevc_rpi_pred_angular_8_neon_10;\n+        c->pred_angular[2] = ff_hevc_rpi_pred_angular_16_neon_10;\n+        c->pred_angular[3] = ff_hevc_rpi_pred_angular_32_neon_10;\n+        c->pred_angular_c[0] = ff_hevc_rpi_pred_angular_c_4_neon_10;\n+        c->pred_angular_c[1] = ff_hevc_rpi_pred_angular_c_8_neon_10;\n+        c->pred_angular_c[2] = ff_hevc_rpi_pred_angular_c_16_neon_10;\n+\n+        c->pred_horizontal[0] = ff_hevc_rpi_pred_horizontal_4_neon_10;\n+        c->pred_horizontal[1] = ff_hevc_rpi_pred_horizontal_8_neon_10;\n+        c->pred_horizontal[2] = ff_hevc_rpi_pred_horizontal_16_neon_10;\n+        c->pred_horizontal[3] = ff_hevc_rpi_pred_horizontal_32_neon_10;\n+        c->pred_horizontal_c[0] = ff_hevc_rpi_pred_horizontal_c_4_neon_10;\n+        c->pred_horizontal_c[1] = ff_hevc_rpi_pred_horizontal_c_8_neon_10;\n+        c->pred_horizontal_c[2] = ff_hevc_rpi_pred_horizontal_c_16_neon_10;\n+\n+        c->pred_vertical[0] = ff_hevc_rpi_pred_vertical_4_neon_10;\n+        c->pred_vertical[1] = ff_hevc_rpi_pred_vertical_8_neon_10;\n+        c->pred_vertical[2] = ff_hevc_rpi_pred_vertical_16_neon_10;\n+        c->pred_vertical[3] = ff_hevc_rpi_pred_vertical_32_neon_10;\n+        c->pred_vertical_c[0] = ff_hevc_rpi_pred_vertical_c_4_neon_10;\n+        c->pred_vertical_c[1] = ff_hevc_rpi_pred_vertical_c_8_neon_10;\n+        c->pred_vertical_c[2] = ff_hevc_rpi_pred_vertical_c_16_neon_10;\n+\n+        c->pred_planar[0] = ff_hevc_rpi_pred_planar_4_neon_10;\n+        c->pred_planar[1] = ff_hevc_rpi_pred_planar_8_neon_10;\n+        c->pred_planar[2] = ff_hevc_rpi_pred_planar_16_neon_10;\n+        c->pred_planar[3] = ff_hevc_rpi_pred_planar_32_neon_10;\n+        c->pred_planar_c[0] = ff_hevc_rpi_pred_planar_c_4_neon_10;\n+        c->pred_planar_c[1] = ff_hevc_rpi_pred_planar_c_8_neon_10;\n+        c->pred_planar_c[2] = ff_hevc_rpi_pred_planar_c_16_neon_10;\n+\n+        c->pred_dc[0]   = ff_hevc_rpi_pred_dc_4_neon_10;\n+        c->pred_dc[1]   = ff_hevc_rpi_pred_dc_8_neon_10;\n+        c->pred_dc[2]   = ff_hevc_rpi_pred_dc_16_neon_10;\n+        c->pred_dc[3]   = ff_hevc_rpi_pred_dc_32_neon_10;\n+        c->pred_dc_c[0] = ff_hevc_rpi_pred_dc_c_4_neon_10;\n+        c->pred_dc_c[1] = ff_hevc_rpi_pred_dc_c_8_neon_10;\n+        c->pred_dc_c[2] = ff_hevc_rpi_pred_dc_c_16_neon_10;\n+        break;\n+    default:\n+        break;\n+    }\n+}\n+\ndiff --git a/libavcodec/arm/rpi_hevcpred_intra_angular_neon.S b/libavcodec/arm/rpi_hevcpred_intra_angular_neon.S\nnew file mode 100644\nindex 0000000000..fa8f67cf03\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcpred_intra_angular_neon.S\n@@ -0,0 +1,2984 @@\n+/*\n+Copyright (c) 2017 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox, Ben Avison\n+*/\n+\n+/*\n+ * General angular pred\n+ *\n+ * Horizontal (10) & Vertical (26) cases have their own file\n+ * and are not dealt with properly here (luma filtering is missing)\n+ *\n+ * The inv_angle calculations are annoying - if it wasn't for the +128\n+ * rounding step then the result would simply be the loop counter :-(\n+ */\n+\n+\n+#include \"libavutil/arm/asm.S\"\n+#include \"neon.S\"\n+\n+.text\n+\n+@ Horizontal Patch functions\n+@ These need a transpose before store so exist as smaller patches\n+@ Patches can be called repeatedly without any intermediate setup\n+@ to generate a horizontal block\n+@\n+@ It is almost certainly the case that larger patch fns can be built\n+@ and they would be a little faster, but we would still need the small\n+@ fns and code size (or at least instruction cache size) is an issue\n+@ given how much code we already have here\n+\n+@ Generate 8x8 luma 8 patch\n+@\n+@ r3   Out stride\n+@ r4   Angle add\n+@ r7   Inv angle (_up only)\n+@\n+@ In/Out (updated)\n+@ r0   Out pointer - on exit point to start of next patch horizontally (i.e. r0 + patch width)\n+@ r2   Left ptr - updated\n+@ r10  Inv angle accumulator (_up only)\n+@ r12  32 - angle frac (_down) or angle frac (_up)\n+@ d0   Older reference samples\n+@ d1=r8+r9  Newer reference samples\n+@ d2   32 - angle frac\n+@ d3   Angle frac\n+@ q2   Partially computed next result (_up only)\n+@\n+@ Temps\n+@ r5   Loop counter\n+@ r6\n+@ r7   (_down only)\n+@ r11  (_up only)\n+@ q2, q8-q11\n+\n+patch_h_down_8x8_8:\n+        ldrd        r8, r9, [r2]        @ Left\n+        rsb         r12, r6, #32\n+        vmov        d0, r8, r9\n+        vdup.8      d3, r6\n+        lsr         r8, #8\n+        vdup.8      d2, r12\n+        orr         r8, r8, r9, lsl #24\n+        ldr         r9, [r2, #5]!\n+        vmov        d1, r8, r9\n+        // drop through...\n+patch_h_down_8x8_8_continue:\n+        mov         r5, #8\n+1:\n+          subs        r12, r4\n+        vmull.u8    q2, d0, d2\n+          it          mi\n+          addmi       r12, #32\n+        vmlal.u8    q2, d1, d3\n+          rsb         r6, r12, #32\n+        vext.8      q8, q8, q9, #8\n+          itt         mi\n+          lsrmi       r7, r8, #8\n+          vmovmi      d0, r8, r9\n+          vdup.8      d2, r12\n+        vext.8      q9, q9, q10, #8\n+          it          mi\n+          orrmi       r8, r7, r9, lsl #24\n+        vext.8      q10, q10, q11, #8\n+          it          mi\n+          ldrmi       r9, [r2, #1]!\n+        vmov        d22, d23\n+        vrshrn.u16  d23, q2, #5\n+          it          mi\n+          vmovmi      d1, r8, r9\n+        subs        r5, #1\n+          vdup.8      d3, r6\n+        bne         1b\n+        // drop through...\n+store_tran_8x8_8:\n+        vzip.8      d16, d17\n+        add         r6, r0, r3\n+        vzip.8      d18, d19\n+        lsl         r3, #1\n+        vzip.8      d20, d21\n+        add         r5, r0, r3\n+        vzip.8      d22, d23\n+        vzip.16     q8, q9\n+        vzip.16     q10, q11\n+        vzip.32     q8, q10\n+        vzip.32     q9, q11\n+        vst1.8      {d16}, [r0]!\n+        vst1.8      {d17}, [r6], r3\n+        vst1.8      {d20}, [r5], r3\n+        vst1.8      {d21}, [r6], r3\n+        vst1.8      {d18}, [r5], r3\n+        vst1.8      {d19}, [r6], r3\n+        vst1.8      {d22}, [r5]\n+        asr         r3, #1\n+        vst1.8      {d23}, [r6]\n+\n+        bx          lr\n+\n+patch_h_up_8x8_8:\n+        ldrd        r8, r9, [r2]\n+        rsb         r6, r4, #32\n+        vmov        d0, r8, r9\n+        vdup.8      d3, r4\n+        lsr         r11, r8, #24\n+        vdup.8      d2, r6\n+        ldr         r8, [r2, #-1]!\n+        orr         r9, r11, r9, lsl #8\n+        vmov        d1, r8, r9\n+        mov         r12, r4\n+        vmull.u8    q2, d0, d2\n+        vmlal.u8    q2, d1, d3\n+patch_h_up_8x8_8_continue:\n+        mov         r5, #8\n+1:\n+          add         r12, r4\n+          mov         r11, #0\n+          cmp         r12, #33\n+          it          cs\n+          addcs       r10, r7\n+        vext.8      q8, q8, q9, #8\n+          itt         cs\n+          subcs       r12, #32\n+          tstcs       r10, #1<<31\n+          rsb         r6, r12, #32\n+          it          eq\n+          asreq       r11, r10, #8\n+          it          cs\n+          vmovcs      d0, r8, r9\n+          vdup.8      d2, r6\n+          it          cs\n+          lsrcs       r6, r8, #24\n+        vext.8      q9, q9, q10, #8\n+          itt         cs\n+          orrcs       r9, r6, r9, lsl #8\n+          ldrbcs      r11, [r1, r11]\n+          vdup.8      d3, r12\n+        vext.8      q10, q10, q11, #8\n+          it          hi\n+          ldrbhi      r11, [r2, #-1]!\n+        vmov        d22, d23\n+        vrshrn.u16  d23, q2, #5\n+          itt         cs\n+          orrcs       r8, r11, r8, lsl #8\n+          vmovcs      d1, r8, r9\n+          vmull.u8    q2, d0, d2\n+        subs        r5, #1\n+          vmlal.u8    q2, d1, d3\n+        bne         1b\n+\n+        b           store_tran_8x8_8\n+\n+\n+.macro ADRT reg, val\n+@ adr in T32 has enough range but not in A32\n+A       adrl        \\reg, \\val\n+T       adr         \\reg, \\val\n+.endm\n+\n+@ ff_hevc_rpi_pred_angular_4_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride        [r3]\n+@       unsigned int mode       [sp, #0]  2..34\n+\n+function ff_hevc_rpi_pred_angular_4_neon_8, export=1\n+        ldr         r12, [sp]\n+        push        {r4-r8, lr}\n+        ADRT        r4, angle_2 - 2\n+        ADRT        r7, inv_angle - 11*2\n+        add         r7, r7, r12, lsl #1\n+        ldrsb       r6, [r4, r12]\n+        cmp         r12, #26\n+        ldrsb       r4, [r4, r12]\n+        bge         26f\n+        cmp         r12, #18\n+        bge         18f\n+        cmp         r12, #10\n+        bge         10f\n+\n+@ Down of Horizontal - works down left\n+        ldr         lr, [r2], #1        @ Top\n+        rsb         r12, r6, #32\n+        vmov        s0, lr\n+        vdup.8      d3, r6\n+        ldr         lr, [r2], #1\n+        vdup.8      d2, r12\n+        vmov        s2, lr\n+          subs        r12, r4\n+        vmull.u8    q2, d0, d2\n+          it          mi\n+          addmi       r12, #32\n+        vmlal.u8    q2, d1, d3\n+          rsb         r6, r12, #32\n+          itt         mi\n+          vmovmi      s0, lr\n+          ldrmi       lr, [r2], #1\n+          vdup.8      d2, r12\n+          it          mi\n+          vmovmi      s2, lr\n+          vdup.8      d3, r6\n+        mov         r5, #2\n+1:\n+        vrshrn.u16  d20, q2, #5\n+            subs        r12, r4\n+          vmull.u8    q2, d0, d2\n+            it          mi\n+            addmi       r12, #32\n+          vmlal.u8    q2, d1, d3\n+            rsb         r6, r12, #32\n+        vext.64     q8, q8, q9, #1\n+            it          mi\n+            vmovmi      s0, lr\n+        vext.64     q9, q9, q10, #1\n+            it          mi\n+            ldrmi       lr, [r2], #1\n+            vdup.8      d2, r12\n+            it          mi\n+            vmovmi      s2, lr\n+        subs        r5, #1\n+            vdup.8      d3, r6\n+        bne         1b\n+\n+          vrshrn.u16  d20, q2, #5\n+            vmull.u8    q2, d0, d2\n+        add         r12, r0,  r3\n+            vmlal.u8    q2, d1, d3\n+        lsl         r3,  #1\n+          vext.64     q8, q8, q9, #1\n+          vext.64     q9, q9, q10, #1\n+            vrshrn.u16  d20, q2, #5\n+\n+98:\n+        vst4.8      {d17[0], d18[0], d19[0], d20[0]}, [r0], r3\n+        vst4.8      {d17[1], d18[1], d19[1], d20[1]}, [r12], r3\n+        vst4.8      {d17[2], d18[2], d19[2], d20[2]}, [r0]\n+        vst4.8      {d17[3], d18[3], d19[3], d20[3]}, [r12]\n+        pop        {r4-r8, pc}\n+\n+@ Up of Horizontal - works down up\n+10:\n+        ldrh        r7, [r7]\n+        rsb         r12, r6, #32\n+        ldr         lr, [r2]            @ Left\n+        ldrb        r2, [r2, #-1]       @ Top-left\n+        vmov        s0, lr\n+        vdup.8      d2, r12\n+        vdup.8      d3, r6\n+        orr         lr, r2, lr, lsl #8\n+        vmov        s2, lr\n+        sub         r8, r7, #128\n+        mov         r5, #3\n+2:\n+        vmull.u8    q2, d0, d2\n+          subs        r12, r4\n+        vmlal.u8    q2, d1, d3\n+T         it          mi\n+          addmi       r12, #32\n+T         asr         r6, r8, #8\n+T         it          mi\n+T         ldrbmi      r2, [r1, r6]\n+A         ldrbmi      r2, [r1, r8, asr #8]\n+          rsb         r6, r12, #32\n+          vdup.8      d2, r12\n+          ittt        mi\n+          vmovmi      s0, lr\n+          orrmi       lr, r2, lr, lsl #8\n+          vmovmi      s2, lr\n+        vrshrn.u16  d20, q2, #5\n+          vdup.8      d3, r6\n+          it          mi\n+          addmi       r8, r7\n+        subs        r5, #1\n+        vext.64     q8, q8, q9, #1\n+        vext.64     q9, q9, q10, #1\n+        bne         2b\n+\n+          vmull.u8    q2, d0, d2\n+        add         r12, r0,  r3\n+          vmlal.u8    q2, d1, d3\n+        lsl         r3,  #1\n+          vrshrn.u16  d20, q2, #5\n+        b           98b\n+\n+@ Left of vertical - works down left\n+18:\n+        ldrh        r7, [r7]\n+        rsb         r12, r6, #32\n+        ldr         lr, [r1]            @ Top\n+        ldrb        r1, [r2, #-1]       @ Top-left\n+        vmov        s0, lr\n+        vdup.8      d2, r12\n+        vdup.8      d3, r6\n+        orr         lr, r1, lr, lsl #8\n+        vmov        s2, lr\n+        sub         r8, r7, #128\n+        mov         r5, #3\n+2:\n+        vmull.u8    q2, d0, d2\n+          subs        r12, r4\n+        vmlal.u8    q2, d1, d3\n+T         it          mi\n+          addmi       r12, #32\n+T         asr         r6, r8, #8\n+T         it          mi\n+T         ldrbmi      r1, [r2, r6]\n+A         ldrbmi      r1, [r2, r8, asr #8]\n+          rsb         r6, r12, #32\n+          vdup.8      d2, r12\n+          ittt        mi\n+          vmovmi      s0, lr\n+          orrmi       lr, r1, lr, lsl #8\n+          vmovmi      s2, lr\n+        vrshrn.u16  d4, q2, #5\n+          vdup.8      d3, r6\n+          it          mi\n+          addmi       r8, r7\n+        subs        r5, #1\n+        vst1.32     {d4[0]}, [r0], r3\n+        bne         2b\n+\n+          vmull.u8    q2, d0, d2\n+          vmlal.u8    q2, d1, d3\n+          vrshrn.u16  d4, q2, #5\n+          vst1.32     {d4[0]}, [r0]\n+\n+        pop         {r4-r8, pc}\n+\n+@ Right of vertical - works along top - left unused\n+26:\n+        ldr         lr, [r1], #1        @ Top\n+        rsb         r12, r6, #32\n+        vmov        s0, lr\n+        vdup.8      d3, r6\n+        ldr         lr, [r1], #1\n+        vdup.8      d2, r12\n+        vmov        s2, lr\n+          subs        r12, r4\n+        vmull.u8    q2, d0, d2\n+          it          mi\n+          addmi       r12, #32\n+        vmlal.u8    q2, d1, d3\n+          rsb         r6, r12, #32\n+          itt         mi\n+          vmovmi      s0, lr\n+          ldrmi       lr, [r1], #1\n+          vdup.8      d2, r12\n+          it          mi\n+          vmovmi      s2, lr\n+          vdup.8      d3, r6\n+        mov         r5, #2\n+1:\n+        vrshrn.u16  d6, q2, #5\n+            subs        r12, r4\n+          vmull.u8    q2, d0, d2\n+            it          mi\n+            addmi       r12, #32\n+          vmlal.u8    q2, d1, d3\n+            rsb         r6, r12, #32\n+        vst1.32     {d6[0]}, [r0], r3\n+            itt         mi\n+            vmovmi      s0, lr\n+            ldrmi       lr, [r1], #1\n+            vdup.8      d2, r12\n+            it          mi\n+            vmovmi      s2, lr\n+        subs        r5, #1\n+            vdup.8      d3, r6\n+        bne         1b\n+\n+          vrshrn.u16  d6, q2, #5\n+            vmull.u8    q2, d0, d2\n+            vmlal.u8    q2, d1, d3\n+          vst1.32     {d6[0]}, [r0], r3\n+            vrshrn.u16  d6, q2, #5\n+            vst1.32     {d6[0]}, [r0]\n+\n+        pop         {r4-r8, pc}\n+\n+endfunc\n+\n+\n+\n+@ ff_hevc_rpi_pred_angular_8_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride        [r3]\n+@       unsigned int mode       [sp, #0]  2..34\n+\n+function ff_hevc_rpi_pred_angular_8_neon_8, export=1\n+        ldr         r12, [sp]\n+        push        {r4-r11, lr}\n+        ADRT        r4, angle_2 - 2\n+        ADRT        r7, inv_angle - 11*2\n+        add         r7, r7, r12, lsl #1\n+        ldrsb       r6, [r4, r12]\n+        cmp         r12, #26\n+        ldrsb       r4, [r4, r12]\n+        bge         26f\n+        cmp         r12, #18\n+        bge         18f\n+        cmp         r12, #10\n+        bge         10f\n+\n+@ Down of Horizontal - works down left\n+        bl          patch_h_down_8x8_8\n+        pop         {r4-r11, pc}\n+\n+@ Up of Horizontal - works down up\n+10:\n+        ldrh        r7, [r7]\n+        mov         r10, #-128\n+        bl          patch_h_up_8x8_8\n+        pop         {r4-r11, pc}\n+\n+@ Left of vertical - works down left\n+18:\n+        ldrd        r8, r9, [r1]        @ Top\n+        rsb         r12, r6, #32\n+        ldrb        lr, [r2, #-1]       @ Top-left\n+        ldrh        r7, [r7]\n+        vmov        d0, r8, r9\n+        lsl         r9, r9, #8\n+        vdup.8      d2, r12\n+        orr         r9, r9, r8, lsr #24\n+        orr         r8, lr, r8, lsl #8\n+        vmov        d1, r8, r9\n+        sub         r1, r7, #128\n+        mov         r5, #7\n+1:\n+        vdup.8      d3, r6\n+        vmull.u8    q2, d0, d2\n+          subs        r12, r12, r4\n+        vmlal.u8    q2, d1, d3\n+          ittt        mi\n+          addmi       lr, r2, r1, asr #8\n+          addmi       r12, r12, #32\n+          vmovmi      d0, r8, r9\n+          rsb         r6, r12, #32\n+          itt         mi\n+          lslmi       r9, r9, #8\n+          ldrbmi      lr, [lr]\n+          vdup.8      d2, r12\n+        vrshrn.u16  d4, q2, #5\n+          itttt       mi\n+          orrmi       r9, r9, r8, lsr #24\n+          orrmi       r8, lr, r8, lsl #8\n+          vmovmi      d1, r8, r9\n+          addmi       r1, r1, r7\n+        subs        r5, r5, #1\n+        vst1.8      {d4}, [r0], r3\n+        bne         1b\n+\n+          vdup.8      d3, r6\n+          vmull.u8    q2, d0, d2\n+          vmlal.u8    q2, d1, d3\n+          vrshrn.u16  d4, q2, #5\n+          vst1.8      {d4}, [r0]\n+\n+        pop         {r4-r11, pc}\n+\n+@ Right of vertical - works along top - left unused\n+26:\n+        ldrd        r8, r9, [r1]        @ Top\n+        rsb         r12, r6, #32\n+        vmov        d0, r8, r9\n+        vdup.8      d3, r6\n+        mov         r5, #7\n+        lsr         r8, #8\n+        vdup.8      d2, r12\n+        orr         r8, r8, r9, lsl #24\n+        ldr         r9, [r1, #5]!\n+        vmov        d1, r8, r9\n+1:\n+        vmull.u8    q2, d0, d2\n+          subs        r12, r4\n+        vmlal.u8    q2, d1, d3\n+          it          mi\n+          addmi       r12, #32\n+          rsb         r6, r12, #32\n+          itt         mi\n+          vmovmi      d0, r8, r9\n+          lsrmi       r8, #8\n+          vdup.8      d2, r12\n+          itt         mi\n+          orrmi       r8, r8, r9, lsl #24\n+          ldrmi       r9, [r1, #1]!\n+        vrshrn.u16  d6, q2, #5\n+          it          mi\n+          vmovmi      d1, r8, r9\n+          vdup.8      d3, r6\n+        subs        r5, #1\n+        vst1.8      {d6}, [r0], r3\n+        bne         1b\n+\n+          vmull.u8    q2, d0, d2\n+          vmlal.u8    q2, d1, d3\n+          vrshrn.u16  d6, q2, #5\n+          vst1.8      {d6}, [r0]\n+\n+        pop         {r4-r11, pc}\n+\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_angular_16_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride        [r3]\n+@       unsigned int mode       [sp, #0]  2..34\n+\n+function ff_hevc_rpi_pred_angular_16_neon_8, export=1\n+        ldr         r12, [sp]\n+        push        {r4-r11, lr}\n+        ADRT        r4, angle_2 - 2\n+        ADRT        r7, inv_angle - 11*2\n+        add         r7, r7, r12, lsl #1\n+        ldrsb       r6, [r4, r12]\n+        cmp         r12, #26\n+        ldrsb       r4, [r4, r12]\n+        bge         26f\n+        cmp         r12, #18\n+        bge         18f\n+        cmp         r12, #10\n+        bge         10f\n+\n+@ Down of Horizontal - works down left\n+        mov         r1,  r2             @ save r2 - r1 unused by patch_down\n+\n+        bl          patch_h_down_8x8_8\n+        bl          patch_h_down_8x8_8_continue\n+\n+        add         r2, r1, #8          @ restore r2, but 8 rows further down left\n+        sub         r0, #16\n+        mov         r6, r4\n+        add         r0, r0, r3, lsl #3\n+\n+        bl          patch_h_down_8x8_8\n+        bl          patch_h_down_8x8_8_continue\n+\n+        pop         {r4-r11, pc}\n+\n+@ Up of Horizontal - works down up\n+10:\n+        ldrh        r7, [r7]\n+        mov         r10, #-128\n+\n+        push        {r2}\n+        bl          patch_h_up_8x8_8\n+        bl          patch_h_up_8x8_8_continue\n+        pop         {r2}\n+\n+        sub         r0, #16\n+        mov         r10, #-128\n+        add         r2, #8\n+        add         r0, r0, r3, lsl #3\n+        sub         r10, r10, r7, lsl #3\n+\n+        bl          patch_h_up_8x8_8\n+        bl          patch_h_up_8x8_8_continue\n+\n+        pop         {r4-r11, pc}\n+\n+@ Left of vertical - works down left\n+18:\n+        vld1.8      {q9}, [r1]\n+        sub         r1, r2, #1\n+        rsb         r12, r6, #32\n+        ldrh        r7, [r7]\n+        vdup.8      d6, r6\n+        vext.8      q8, q9, q9, #15\n+        sub         r8, r7, #128\n+        vld1.8      {d16[0]}, [r1]\n+        vdup.8      d7, r12\n+        mov         r5, #15\n+1:\n+        vmull.u8    q0, d18, d7\n+        subs        r12, r4\n+        vmlal.u8    q0, d16, d6\n+        it          cc\n+        addcc       r12, #32\n+        vmull.u8    q1, d19, d7\n+        it          cc\n+        addcc       r1, r2, r8, asr #8\n+        vmlal.u8    q1, d17, d6\n+        rsb         r6, r12, #32\n+        vext.8      q10, q8, q8, #15\n+        sub         r5, #1\n+        vld1.8      {d20[0]}, [r1]\n+        it          cc\n+        addcc       r8, r7\n+        vmov        q11, q8\n+        teq         r5, #0\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vdup.8      d6, r6\n+        vdup.8      d7, r12\n+        vst1.8      {q0}, [r0], r3\n+        bhi         1b\n+        beq         4f\n+2:\n+        vmull.u8    q0, d22, d7\n+        subs        r12, r4\n+        vmlal.u8    q0, d20, d6\n+        it          cc\n+        addcc       r12, #32\n+        vmull.u8    q1, d23, d7\n+        it          cc\n+        addcc       r1, r2, r8, asr #8\n+        vmlal.u8    q1, d21, d6\n+        rsb         r6, r12, #32\n+        vext.8      q8, q10, q10, #15\n+        sub         r5, #1\n+        vld1.8      {d16[0]}, [r1]\n+        it          cc\n+        addcc       r8, r7\n+        vmov        q9, q10\n+        teq         r5, #0\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vdup.8      d6, r6\n+        vdup.8      d7, r12\n+        vst1.8      {q0}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+        bcc         5f\n+3:\n+        vmull.u8    q0, d22, d7\n+        vmlal.u8    q0, d20, d6\n+        vmull.u8    q1, d23, d7\n+        vmlal.u8    q1, d21, d6\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vst1.8      {q0}, [r0]\n+\n+        pop         {r4-r11, pc}\n+4:\n+        bcc         3b\n+5:\n+        vmull.u8    q0, d18, d7\n+        vmlal.u8    q0, d16, d6\n+        vmull.u8    q1, d19, d7\n+        vmlal.u8    q1, d17, d6\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vst1.8      {q0}, [r0]\n+\n+        pop         {r4-r11, pc}\n+\n+@ Right of vertical - works along top - left unused\n+26:\n+        vld1.8      {q9}, [r1]!\n+        rsb         r12, r6, #32\n+        vdup.8      d6, r6\n+        vdup.8      d7, r12\n+        vext.8      q8, q9, q9, #1\n+        vld1.8      {d17[7]}, [r1]!\n+        mov         r5, #15\n+1:\n+        vmull.u8    q0, d16, d6\n+        subs        r12, r4\n+        vmlal.u8    q0, d18, d7\n+        it          cc\n+        addcc       r12, #32\n+        vmull.u8    q1, d17, d6\n+        rsb         r6, r12, #32\n+        vmlal.u8    q1, d19, d7\n+        sub         r5, #1\n+        vext.8      q10, q8, q8, #1\n+        teq         r5, #0\n+        vld1.8      {d21[7]}, [r1]\n+        it          cc\n+        addcc       r1, #1\n+        vmov        q11, q8\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vdup.8      d6, r6\n+        vdup.8      d7, r12\n+        vst1.8      {q0}, [r0], r3\n+        bhi         1b\n+        beq         4f\n+2:\n+        vmull.u8    q0, d20, d6\n+        subs        r12, r4\n+        vmlal.u8    q0, d22, d7\n+        it          cc\n+        addcc       r12, #32\n+        vmull.u8    q1, d21, d6\n+        rsb         r6, r12, #32\n+        vmlal.u8    q1, d23, d7\n+        sub         r5, #1\n+        vext.8      q8, q10, q10, #1\n+        teq         r5, #0\n+        vld1.8      {d17[7]}, [r1]\n+        it          cc\n+        addcc       r1, #1\n+        vmov        q9, q10\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vdup.8      d6, r6\n+        vdup.8      d7, r12\n+        vst1.8      {q0}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+        bcc         5f\n+3:\n+        vmull.u8    q0, d20, d6\n+        vmlal.u8    q0, d22, d7\n+        vmull.u8    q1, d21, d6\n+        vmlal.u8    q1, d23, d7\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vst1.8      {q0}, [r0]\n+\n+        pop         {r4-r11, pc}\n+4:\n+        bcc         3b\n+5:\n+        vmull.u8    q0, d16, d6\n+        vmlal.u8    q0, d18, d7\n+        vmull.u8    q1, d17, d6\n+        vmlal.u8    q1, d19, d7\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vst1.8      {q0}, [r0]\n+\n+        pop         {r4-r11, pc}\n+\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_angular_32_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride        [r3]\n+@       unsigned int mode       [sp, #0]  2..34\n+\n+function ff_hevc_rpi_pred_angular_32_neon_8, export=1\n+        ldr         r12, [sp]\n+        push        {r4-r11, lr}\n+        ADRT        r4, angle_2 - 2\n+        ADRT        r7, inv_angle - 11*2\n+        add         r7, r7, r12, lsl #1\n+        ldrsb       r6, [r4, r12]\n+        cmp         r12, #26\n+        ldrsb       r4, [r4, r12]\n+        bge         26f\n+        cmp         r12, #18\n+        bge         18f\n+        cmp         r12, #10\n+        bge         10f\n+\n+@ Down of Horizontal - works down left\n+        mov         r10, #4\n+        mov         r1, r2\n+1:\n+        bl          patch_h_down_8x8_8\n+        bl          patch_h_down_8x8_8_continue\n+        bl          patch_h_down_8x8_8_continue\n+        bl          patch_h_down_8x8_8_continue\n+\n+        add         r2, r1, #8          @ restore r2, but 8 rows further down left\n+        add         r1, r1, #8\n+        mov         r6, r4\n+        sub         r0, #32\n+        subs        r10, #1\n+        add         r0, r0, r3, lsl #3\n+        bne         1b\n+\n+        pop        {r4-r11, pc}\n+\n+@ Up of Horizontal - works down up\n+10:\n+        ldrh        r7, [r7]\n+        mov         r10, #-128\n+        vmov.i8     d6, #1<<2\n+1:\n+        push        {r2,r10}\n+        bl          patch_h_up_8x8_8\n+        bl          patch_h_up_8x8_8_continue\n+        bl          patch_h_up_8x8_8_continue\n+        bl          patch_h_up_8x8_8_continue\n+        pop         {r2,r10}\n+\n+        vmov        r8, s12\n+        sub         r0, #32\n+        add         r2, #8\n+        add         r0, r0, r3, lsl #3\n+        sub         r10, r10, r7, lsl #3\n+        vshr.u8     d6, #1\n+        teq         r8, #0\n+        bne         1b\n+\n+        pop        {r4-r11, pc}\n+\n+@ Left of vertical - works down left\n+18:\n+        vld1.8      {q0-q1}, [r1]\n+        sub         r9, r2, #1\n+        rsb         r12, r6, #32\n+        ldrh        r7, [r7]\n+        mov         r8, #-128\n+        vdup.8      d18, r6\n+        vdup.8      d19, r12\n+        mov         r5, #32\n+1:\n+        vld1.8      {d17[7]}, [r9]\n+        add         r8, r7\n+        vmov        q2, q0\n+        vmov        q3, q1\n+        add         r9, r2, r8, asr #8\n+        vext.8      q1, q0, q1, #15\n+        vext.8      q0, q8, q0, #15\n+2:\n+        vmull.u8    q10, d4, d19\n+        subs        r12, r4\n+        vmlal.u8    q10, d0, d18\n+        it          cc\n+        addcc       r12, #32\n+        vmull.u8    q11, d5, d19\n+        rsb         r6, r12, #32\n+        vmlal.u8    q11, d1, d18\n+        sub         r5, #1\n+        vmull.u8    q12, d6, d19\n+        teq         r5, #0\n+        vmlal.u8    q12, d2, d18\n+        vmull.u8    q13, d7, d19\n+        vmlal.u8    q13, d3, d18\n+        vdup.8      d18, r6\n+        vdup.8      d19, r12\n+        vrshrn.u16  d20, q10, #5\n+        vrshrn.u16  d21, q11, #5\n+        vrshrn.u16  d22, q12, #5\n+        vrshrn.u16  d23, q13, #5\n+        vst1.8      {q10-q11}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+\n+        pop         {r4-r11, pc}\n+\n+@ Right of vertical - works along top - left unused\n+26:\n+        add         r5, r1, #32\n+        vld1.8      {q0-q1}, [r1]!\n+        rsb         r12, r6, #32\n+        vld1.8      {d16[0]}, [r5]\n+        mov         r5, #32\n+        vdup.8      d18, r6\n+        vdup.8      d19, r12\n+1:\n+        vmov        q2, q0\n+        add         r1, #1\n+        vmov        q3, q1\n+        vext.8      q0, q0, q1, #1\n+        vext.8      q1, q1, q8, #1\n+2:\n+        vmull.u8    q10, d0, d18\n+        subs        r12, r4\n+        vmlal.u8    q10, d4, d19\n+        it          cc\n+        addcc       r12, #32\n+        vmull.u8    q11, d1, d18\n+        rsb         r6, r12, #32\n+        vmlal.u8    q11, d5, d19\n+        sub         r5, #1\n+        vmull.u8    q12, d2, d18\n+        teq         r5, #0\n+        vmlal.u8    q12, d6, d19\n+        vmull.u8    q13, d3, d18\n+        vmlal.u8    q13, d7, d19\n+        vld1.8      {d16[0]}, [r1]\n+        vdup.8      d18, r6\n+        vdup.8      d19, r12\n+        vrshrn.u16  d20, q10, #5\n+        vrshrn.u16  d21, q11, #5\n+        vrshrn.u16  d22, q12, #5\n+        vrshrn.u16  d23, q13, #5\n+        vst1.8      {q10-q11}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+\n+        pop         {r4-r11, pc}\n+\n+endfunc\n+\n+\n+@ Chroma 8 bit 4x4 patch fns\n+        .text\n+\n+patch_h_down_c_4x4_8:\n+        ldrd        r8, r9, [r2]        @ Left\n+        rsb         r12, r6, #32\n+        vmov        d0, r8, r9\n+        vdup.8      d3, r6\n+        lsr         r8, #16\n+        vdup.8      d2, r12\n+        orr         r8, r8, r9, lsl #16\n+        ldr         r9, [r2, #6]!\n+        vmov        d1, r8, r9\n+        // drop through...\n+patch_h_down_c_4x4_8_continue:\n+        mov         r5, #4\n+1:\n+          subs        r12, r4\n+        vmull.u8    q2, d0, d2\n+          it          mi\n+          addmi       r12, #32\n+        vmlal.u8    q2, d1, d3\n+          rsb         r6, r12, #32\n+        vext.8      q8, q8, q9, #8\n+          it          mi\n+          lsrmi       r7, r8, #16\n+        vmov        d18, d19\n+          it          mi\n+          vmovmi      d0, r8, r9\n+          vdup.8      d2, r12\n+          it          mi\n+          orrmi       r8, r7, r9, lsl #16\n+        vrshrn.u16  d19, q2, #5\n+          itt         mi\n+          ldrmi       r9, [r2, #2]!\n+          vmovmi      d1, r8, r9\n+        subs        r5, #1\n+          vdup.8      d3, r6\n+        bne         1b\n+        // drop through...\n+store_tran_c_4x4_8:\n+        vzip.16     d16, d17\n+        add         r6, r0, r3\n+        vzip.16     d18, d19\n+        lsl         r3, #1\n+        vzip.32     q8, q9\n+        add         r5, r0, r3\n+        vst1.16     {d16}, [r0]!\n+        vst1.16     {d17}, [r6], r3\n+        vst1.16     {d18}, [r5]\n+        asr         r3, #1\n+        vst1.16     {d19}, [r6]\n+\n+        bx          lr\n+\n+patch_h_up_c_4x4_8:\n+        ldrd        r8, r9, [r2]\n+        rsb         r6, r4, #32\n+        vmov        d0, r8, r9\n+        vdup.8      d3, r4\n+        lsr         r11, r8, #16\n+        vdup.8      d2, r6\n+        ldr         r8, [r2, #-2]!\n+        orr         r9, r11, r9, lsl #16\n+        vmov        d1, r8, r9\n+        mov         r12, r4\n+        vmull.u8    q2, d0, d2\n+        vmlal.u8    q2, d1, d3\n+patch_h_up_c_4x4_8_continue:\n+        mov         r5, #4\n+1:\n+          add         r12, r4\n+          cmp         r12, #33\n+          it          cs\n+          addcs       r10, r7\n+          mov         r11, #0\n+          itt         cs\n+          subcs       r12, #32\n+          tstcs       r10, #1<<31\n+          rsb         r6, r12, #32\n+          it          eq\n+          asreq       r11, r10, #7\n+          it          cs\n+          vmovcs      d0, r8, r9\n+          it          eq\n+          biceq       r11, #1\n+          vdup.8      d2, r6\n+          it          cs\n+          lsrcs       r6, r8, #16\n+          vdup.8      d3, r12\n+        vext.8      q8, q8, q9, #8\n+          itt         cs\n+          orrcs       r9, r6, r9, lsl #16\n+          ldrhcs      r11, [r1, r11]\n+        vmov        d18, d19\n+          it          hi\n+          ldrhhi      r11, [r2, #-2]!\n+        vrshrn.u16  d19, q2, #5\n+          itt         cs\n+          orrcs       r8, r11, r8, lsl #16\n+          vmovcs      d1, r8, r9\n+          vmull.u8    q2, d0, d2\n+        subs        r5, #1\n+          vmlal.u8    q2, d1, d3\n+        bne         1b\n+\n+        b           store_tran_c_4x4_8\n+\n+\n+@ ff_hevc_rpi_pred_angular_c_4_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride        [r3]\n+@       unsigned int mode       [sp, #0]  2..34\n+\n+function ff_hevc_rpi_pred_angular_c_4_neon_8, export=1\n+        ldr         r12, [sp]\n+        push        {r4-r11, lr}\n+        ADRT        r4, angle_2 - 2\n+        ADRT        r7, inv_angle - 11*2\n+        add         r7, r7, r12, lsl #1\n+        lsl         r3, #1\n+        ldrsb       r6, [r4, r12]\n+        cmp         r12, #26\n+        ldrsb       r4, [r4, r12]\n+        bge         26f\n+        cmp         r12, #18\n+        bge         18f\n+        cmp         r12, #10\n+        bge         10f\n+\n+@ Down of Horizontal - works down left\n+        bl          patch_h_down_c_4x4_8\n+        pop         {r4-r11, pc}\n+\n+@ Up of Horizontal - works down up\n+10:\n+        ldrh        r7, [r7]\n+        mov         r10, #-128\n+        bl          patch_h_up_c_4x4_8\n+        pop         {r4-r11, pc}\n+\n+@ Left of vertical - works down left\n+18:\n+        ldrd        r8, r9, [r1]        @ Top\n+        rsb         r12, r6, #32\n+        ldrh        lr, [r2, #-2]       @ Top-left\n+        ldrh        r7, [r7]\n+        vmov        d0, r8, r9\n+        lsl         r9, r9, #16\n+        vdup.8      d2, r12\n+        orr         r9, r9, r8, lsr #16\n+        orr         r8, lr, r8, lsl #16\n+        vmov        d1, r8, r9\n+        sub         r1, r7, #128\n+        mov         r5, #3\n+1:\n+        vdup.8      d3, r6\n+        vmull.u8    q2, d0, d2\n+          subs        r12, r12, r4\n+        vmlal.u8    q2, d1, d3\n+          itttt       mi\n+          addmi       lr, r2, r1, asr #7\n+          bicmi       lr, #1\n+          addmi       r12, r12, #32\n+          vmovmi      d0, r8, r9\n+          rsb         r6, r12, #32\n+          itt         mi\n+          lslmi       r9, r9, #16\n+          ldrhmi      lr, [lr]\n+          vdup.8      d2, r12\n+        vrshrn.u16  d4, q2, #5\n+          itttt       mi\n+          orrmi       r9, r9, r8, lsr #16\n+          orrmi       r8, lr, r8, lsl #16\n+          vmovmi      d1, r8, r9\n+          addmi       r1, r1, r7\n+        subs        r5, r5, #1\n+        vst1.16     {d4}, [r0], r3\n+        bne         1b\n+\n+          vdup.8      d3, r6\n+          vmull.u8    q2, d0, d2\n+          vmlal.u8    q2, d1, d3\n+          vrshrn.u16  d4, q2, #5\n+          vst1.16     {d4}, [r0]\n+\n+        pop         {r4-r11, pc}\n+\n+@ Right of vertical - works along top - left unused\n+26:\n+        ldrd        r8, r9, [r1]        @ Top\n+        rsb         r12, r6, #32\n+        vmov        d0, r8, r9\n+        vdup.8      d3, r6\n+        mov         r5, #3\n+        lsr         r8, #16\n+        vdup.8      d2, r12\n+        orr         r8, r8, r9, lsl #16\n+        ldr         r9, [r1, #6]!\n+        vmov        d1, r8, r9\n+1:\n+        vmull.u8    q2, d0, d2\n+          subs        r12, r4\n+        vmlal.u8    q2, d1, d3\n+          it          mi\n+          addmi       r12, #32\n+          rsb         r6, r12, #32\n+          itt         mi\n+          vmovmi      d0, r8, r9\n+          lsrmi       r8, #16\n+          vdup.8      d2, r12\n+          itt         mi\n+          orrmi       r8, r8, r9, lsl #16\n+          ldrmi       r9, [r1, #2]!\n+        vrshrn.u16  d6, q2, #5\n+          it          mi\n+          vmovmi      d1, r8, r9\n+          vdup.8      d3, r6\n+        subs        r5, #1\n+        vst1.16     {d6}, [r0], r3\n+        bne         1b\n+\n+          vmull.u8    q2, d0, d2\n+          vmlal.u8    q2, d1, d3\n+          vrshrn.u16  d6, q2, #5\n+          vst1.16     {d6}, [r0]\n+\n+        pop         {r4-r11, pc}\n+\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_angular_c_8_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride        [r3]\n+@       unsigned int mode       [sp, #0]  2..34\n+\n+function ff_hevc_rpi_pred_angular_c_8_neon_8, export=1\n+        ldr         r12, [sp]\n+        push        {r4-r11, lr}\n+        ADRT        r4, angle_2 - 2\n+        ADRT        r7, inv_angle - 11*2\n+        add         r7, r7, r12, lsl #1\n+        lsl         r3, #1\n+        ldrsb       r6, [r4, r12]\n+        cmp         r12, #26\n+        ldrsb       r4, [r4, r12]\n+        bge         26f\n+        cmp         r12, #18\n+        bge         18f\n+        cmp         r12, #10\n+        bge         10f\n+\n+@ Down of Horizontal - works down left\n+        mov         r1,  r2             @ save r2 - r1 unused by patch_down\n+\n+        bl          patch_h_down_c_4x4_8\n+        bl          patch_h_down_c_4x4_8_continue\n+\n+        add         r2, r1, #4*2        @ restore r2, but 4 rows further down left\n+        sub         r0, #16\n+        mov         r6, r4\n+        add         r0, r0, r3, lsl #2\n+\n+        bl          patch_h_down_c_4x4_8\n+        bl          patch_h_down_c_4x4_8_continue\n+\n+        pop         {r4-r11, pc}\n+\n+@ Up of Horizontal - works down up\n+10:\n+        ldrh        r7, [r7]\n+        mov         r10, #-128\n+\n+        push        {r2}\n+        bl          patch_h_up_c_4x4_8\n+        bl          patch_h_up_c_4x4_8_continue\n+        pop         {r2}\n+\n+        sub         r0, #16\n+        mov         r10, #-128\n+        add         r2, #8\n+        add         r0, r0, r3, lsl #2\n+        sub         r10, r10, r7, lsl #2\n+\n+        bl          patch_h_up_c_4x4_8\n+        bl          patch_h_up_c_4x4_8_continue\n+\n+        pop         {r4-r11, pc}\n+\n+@ Left of vertical - works down left\n+18:\n+        vld1.8      {q9}, [r1]\n+        sub         r1, r2, #2\n+        rsb         r12, r6, #32\n+        ldrh        r7, [r7]\n+        vdup.8      d6, r6\n+        vext.8      q8, q9, q9, #14\n+        sub         r8, r7, #128\n+        vld1.16     {d16[0]}, [r1]\n+        vdup.8      d7, r12\n+        mov         r5, #7\n+1:\n+        subs        r12, r4\n+        vmull.u8    q0, d18, d7\n+        it          cc\n+        asrcc       r1, r8, #8\n+        vmlal.u8    q0, d16, d6\n+        it          cc\n+        addcc       r12, #32\n+        vmull.u8    q1, d19, d7\n+        it          cc\n+        addcc       r1, r2, r1, lsl #1\n+        vmlal.u8    q1, d17, d6\n+        rsb         r6, r12, #32\n+        vext.8      q10, q8, q8, #14\n+        sub         r5, #1\n+        vld1.16     {d20[0]}, [r1]\n+        it          cc\n+        addcc       r8, r7\n+        vmov        q11, q8\n+        teq         r5, #0\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vdup.8      d6, r6\n+        vdup.8      d7, r12\n+        vst1.8      {q0}, [r0], r3\n+        bhi         1b\n+        beq         4f\n+2:\n+        subs        r12, r4\n+        vmull.u8    q0, d22, d7\n+        it          cc\n+        asrcc       r1, r8, #8\n+        vmlal.u8    q0, d20, d6\n+        it          cc\n+        addcc       r12, #32\n+        vmull.u8    q1, d23, d7\n+        it          cc\n+        addcc       r1, r2, r1, lsl #1\n+        vmlal.u8    q1, d21, d6\n+        rsb         r6, r12, #32\n+        vext.8      q8, q10, q10, #14\n+        sub         r5, #1\n+        vld1.16     {d16[0]}, [r1]\n+        it          cc\n+        addcc       r8, r7\n+        vmov        q9, q10\n+        teq         r5, #0\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vdup.8      d6, r6\n+        vdup.8      d7, r12\n+        vst1.8      {q0}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+        bcc         5f\n+3:\n+        vmull.u8    q0, d22, d7\n+        vmlal.u8    q0, d20, d6\n+        vmull.u8    q1, d23, d7\n+        vmlal.u8    q1, d21, d6\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vst1.8      {q0}, [r0]\n+\n+        pop         {r4-r11, pc}\n+4:\n+        bcc         3b\n+5:\n+        vmull.u8    q0, d18, d7\n+        vmlal.u8    q0, d16, d6\n+        vmull.u8    q1, d19, d7\n+        vmlal.u8    q1, d17, d6\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vst1.8      {q0}, [r0]\n+\n+        pop         {r4-r11, pc}\n+\n+@ Right of vertical - works along top - left unused\n+26:\n+        vld1.8      {q9}, [r1]!\n+        rsb         r12, r6, #32\n+        vdup.8      d6, r6\n+        vdup.8      d7, r12\n+        vext.8      q8, q9, q9, #2\n+        vld1.16     {d17[3]}, [r1]!\n+        mov         r5, #7\n+1:\n+        vmull.u8    q0, d16, d6\n+        subs        r12, r4\n+        vmlal.u8    q0, d18, d7\n+        it          cc\n+        addcc       r12, #32\n+        vmull.u8    q1, d17, d6\n+        rsb         r6, r12, #32\n+        vmlal.u8    q1, d19, d7\n+        sub         r5, #1\n+        vext.8      q10, q8, q8, #2\n+        teq         r5, #0\n+        vld1.16     {d21[3]}, [r1]\n+        it          cc\n+        addcc       r1, #2\n+        vmov        q11, q8\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vdup.8      d6, r6\n+        vdup.8      d7, r12\n+        vst1.8      {q0}, [r0], r3\n+        bhi         1b\n+        beq         4f\n+2:\n+        vmull.u8    q0, d20, d6\n+        subs        r12, r4\n+        vmlal.u8    q0, d22, d7\n+        it          cc\n+        addcc       r12, #32\n+        vmull.u8    q1, d21, d6\n+        rsb         r6, r12, #32\n+        vmlal.u8    q1, d23, d7\n+        sub         r5, #1\n+        vext.8      q8, q10, q10, #2\n+        teq         r5, #0\n+        vld1.16     {d17[3]}, [r1]\n+        it          cc\n+        addcc       r1, #2\n+        vmov        q9, q10\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vdup.8      d6, r6\n+        vdup.8      d7, r12\n+        vst1.8      {q0}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+        bcc         5f\n+3:\n+        vmull.u8    q0, d20, d6\n+        vmlal.u8    q0, d22, d7\n+        vmull.u8    q1, d21, d6\n+        vmlal.u8    q1, d23, d7\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vst1.8      {q0}, [r0]\n+\n+        pop         {r4-r11, pc}\n+4:\n+        bcc         3b\n+5:\n+        vmull.u8    q0, d16, d6\n+        vmlal.u8    q0, d18, d7\n+        vmull.u8    q1, d17, d6\n+        vmlal.u8    q1, d19, d7\n+        vrshrn.u16  d0, q0, #5\n+        vrshrn.u16  d1, q1, #5\n+        vst1.8      {q0}, [r0]\n+\n+        pop         {r4-r11, pc}\n+\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_angular_c_16_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride        [r3]\n+@       unsigned int mode       [sp, #0]  2..34\n+\n+function ff_hevc_rpi_pred_angular_c_16_neon_8, export=1\n+        ldr         r12, [sp]\n+        push        {r4-r11, lr}\n+        ADRT        r4, angle_2 - 2\n+        ADRT        r7, inv_angle - 11*2\n+        add         r7, r7, r12, lsl #1\n+        lsl         r3, #1\n+        ldrsb       r6, [r4, r12]\n+        cmp         r12, #26\n+        ldrsb       r4, [r4, r12]\n+        bge         26f\n+        cmp         r12, #18\n+        bge         18f\n+        cmp         r12, #10\n+        bge         10f\n+\n+@ Down of Horizontal - works down left\n+        mov         r10, #4\n+        mov         r1, r2\n+1:\n+        bl          patch_h_down_c_4x4_8\n+        bl          patch_h_down_c_4x4_8_continue\n+        bl          patch_h_down_c_4x4_8_continue\n+        bl          patch_h_down_c_4x4_8_continue\n+\n+        add         r2, r1, #4*2         @ restore r2, but 4 rows further down left\n+        add         r1, r1, #4*2\n+        mov         r6, r4\n+        sub         r0, #32\n+        subs        r10, #1\n+        add         r0, r0, r3, lsl #2\n+        bne         1b\n+\n+        pop         {r4-r11, pc}\n+\n+@ Up of Horizontal - works down up\n+10:\n+        ldrh        r7, [r7]\n+        mov         r10, #-128\n+        vmov.i8     d6, #1<<2\n+1:\n+        push        {r2, r10}\n+        bl          patch_h_up_c_4x4_8\n+        bl          patch_h_up_c_4x4_8_continue\n+        bl          patch_h_up_c_4x4_8_continue\n+        bl          patch_h_up_c_4x4_8_continue\n+        pop         {r2, r10}\n+\n+        vmov        r8, s12\n+        sub         r0, #32\n+        add         r2, #8\n+        add         r0, r0, r3, lsl #2\n+        sub         r10, r10, r7, lsl #2\n+        vshr.u8     d6, #1\n+        teq         r8, #0\n+        bne         1b\n+\n+        pop         {r4-r11, pc}\n+\n+@ Left of vertical - works down left\n+18:\n+        vld1.8      {q0-q1}, [r1]\n+        sub         r9, r2, #2\n+        rsb         r12, r6, #32\n+        ldrh        r7, [r7]\n+        mov         r8, #-128\n+        vdup.8      d18, r6\n+        vdup.8      d19, r12\n+        mov         r5, #16\n+1:\n+        vld1.16     {d17[3]}, [r9]\n+        add         r8, r7\n+        vmov        q2, q0\n+        vmov        q3, q1\n+        asr         r9, r8, #8\n+        vext.8      q1, q0, q1, #14\n+        add         r9, r2, r9, lsl #1\n+        vext.8      q0, q8, q0, #14\n+2:\n+        vmull.u8    q10, d4, d19\n+        subs        r12, r4\n+        vmlal.u8    q10, d0, d18\n+        it          cc\n+        addcc       r12, #32\n+        vmull.u8    q11, d5, d19\n+        rsb         r6, r12, #32\n+        vmlal.u8    q11, d1, d18\n+        sub         r5, #1\n+        vmull.u8    q12, d6, d19\n+        teq         r5, #0\n+        vmlal.u8    q12, d2, d18\n+        vmull.u8    q13, d7, d19\n+        vmlal.u8    q13, d3, d18\n+        vdup.8      d18, r6\n+        vdup.8      d19, r12\n+        vrshrn.u16  d20, q10, #5\n+        vrshrn.u16  d21, q11, #5\n+        vrshrn.u16  d22, q12, #5\n+        vrshrn.u16  d23, q13, #5\n+        vst1.8      {q10-q11}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+\n+        pop         {r4-r11, pc}\n+\n+@ Right of vertical - works along top - left unused\n+26:\n+        add         r5, r1, #32\n+        vld1.8      {q0-q1}, [r1]!\n+        rsb         r12, r6, #32\n+        vld1.16     {d16[0]}, [r5]\n+        mov         r5, #16\n+        vdup.8      d18, r6\n+        vdup.8      d19, r12\n+1:\n+        vmov        q2, q0\n+        add         r1, #2\n+        vmov        q3, q1\n+        vext.8      q0, q0, q1, #2\n+        vext.8      q1, q1, q8, #2\n+2:\n+        vmull.u8    q10, d0, d18\n+        subs        r12, r4\n+        vmlal.u8    q10, d4, d19\n+        it          cc\n+        addcc       r12, #32\n+        vmull.u8    q11, d1, d18\n+        rsb         r6, r12, #32\n+        vmlal.u8    q11, d5, d19\n+        sub         r5, #1\n+        vmull.u8    q12, d2, d18\n+        teq         r5, #0\n+        vmlal.u8    q12, d6, d19\n+        vmull.u8    q13, d3, d18\n+        vmlal.u8    q13, d7, d19\n+        vld1.16     {d16[0]}, [r1]\n+        vdup.8      d18, r6\n+        vdup.8      d19, r12\n+        vrshrn.u16  d20, q10, #5\n+        vrshrn.u16  d21, q11, #5\n+        vrshrn.u16  d22, q12, #5\n+        vrshrn.u16  d23, q13, #5\n+        vst1.8      {q10-q11}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+\n+        pop         {r4-r11, pc}\n+\n+endfunc\n+\n+@------------------------------------------------------------------------------\n+@ Data\n+\n+        .text\n+        .balign  64\n+angle_2:\n+        .byte    32\n+        .byte    26,  21,  17,  13,   9,   5,   2,   0\n+        @ Sign inverted from standards table\n+        .byte     2,   5,   9,  13,  17,  21,  26,  32\n+        .byte    26,  21,  17,  13,   9,   5,   2,   0\n+        @ Standard sign\n+        .byte     2,   5,   9,  13,  17,  21,  26,  32\n+\n+        .balign   2\n+\n+        @ Sign inverted from standards table\n+inv_angle:\n+        .short   4096, 1638,  910,  630,  482,  390,  315\n+        .short    256\n+        .short    315,  390,  482,  630,  910, 1638, 4096\n+\n+@------------------------------------------------------------------------------\n+@\n+@ 10 bit fns\n+@ Should work for 9 & 11 bit as there is no actual bit-depth specific code\n+@ but runs out of register width for 12+ bit\n+\n+        .text\n+        .balign 64\n+\n+patch_h_down_4x4_10:\n+        ldrd        r8, r9, [r2]        @ Left\n+        rsb         r12, r6, #32\n+        vmov        d0, r8, r9\n+        vdup.16     d3, r6\n+        lsr         r8, #16\n+        vdup.16     d2, r12\n+        orr         r8, r8, r9, lsl #16\n+        ldr         r9, [r2, #6]!\n+        vmov        d1, r8, r9\n+        // drop through...\n+patch_h_down_4x4_10_continue:\n+        mov         r5, #4\n+1:\n+          subs        r12, r4\n+        vmul.u16    d4, d0, d2\n+          it          mi\n+          addmi       r12, #32\n+        vmla.u16    d4, d1, d3\n+          rsb         r6, r12, #32\n+        vext.16     q8, q8, q9, #4\n+          it          mi\n+          lsrmi       r7, r8, #16\n+        vmov        d18, d19\n+          it          mi\n+          vmovmi      d0, r8, r9\n+          vdup.16     d2, r12\n+          it          mi\n+          orrmi       r8, r7, r9, lsl #16\n+        vrshr.u16   d19, d4, #5\n+          itt         mi\n+          ldrmi       r9, [r2, #2]!\n+          vmovmi      d1, r8, r9\n+        subs        r5, #1\n+          vdup.16     d3, r6\n+        bne         1b\n+        // drop through...\n+store_tran_4x4_10:\n+        vzip.16     d16, d17\n+        add         r6, r0, r3\n+        vzip.16     d18, d19\n+        lsl         r3, #1\n+        vzip.32     q8, q9\n+        add         r5, r0, r3\n+        vst1.16     {d16}, [r0]!\n+        vst1.16     {d17}, [r6], r3\n+        vst1.16     {d18}, [r5]\n+        asr         r3, #1\n+        vst1.16     {d19}, [r6]\n+\n+        bx          lr\n+\n+patch_h_up_4x4_10:\n+        ldrd        r8, r9, [r2]\n+        rsb         r6, r4, #32\n+        vmov        d0, r8, r9\n+        vdup.16     d3, r4\n+        lsr         r11, r8, #16\n+        vdup.16     d2, r6\n+        ldr         r8, [r2, #-2]!\n+        orr         r9, r11, r9, lsl #16\n+        vmov        d1, r8, r9\n+        mov         r12, r4\n+        vmul.u16    d4, d0, d2\n+        vmla.u16    d4, d1, d3\n+patch_h_up_4x4_10_continue:\n+        mov         r5, #4\n+1:\n+          add         r12, r4\n+          cmp         r12, #33\n+          it          cs\n+          addcs       r10, r7\n+          mov         r11, #0\n+          itt         cs\n+          subcs       r12, #32\n+          tstcs       r10, #1<<31\n+          rsb         r6, r12, #32\n+          it          eq\n+          asreq       r11, r10, #7\n+          it          cs\n+          vmovcs      d0, r8, r9\n+          it          eq\n+          biceq       r11, #1\n+          vdup.16     d2, r6\n+          it          cs\n+          lsrcs       r6, r8, #16\n+          vdup.16     d3, r12\n+        vext.16     q8, q8, q9, #4\n+          itt         cs\n+          orrcs       r9, r6, r9, lsl #16\n+          ldrhcs      r11, [r1, r11]\n+        vmov        d18, d19\n+          it          hi\n+          ldrhhi      r11, [r2, #-2]!\n+        vrshr.u16   d19, d4, #5\n+          itt         cs\n+          orrcs       r8, r11, r8, lsl #16\n+          vmovcs      d1, r8, r9\n+          vmul.u16    d4, d0, d2\n+        subs        r5, #1\n+          vmla.u16    d4, d1, d3\n+        bne         1b\n+\n+        b           store_tran_4x4_10\n+\n+\n+@ ff_hevc_rpi_pred_angular_4_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride        [r3]\n+@       unsigned int mode       [sp, #0]  2..34\n+\n+function ff_hevc_rpi_pred_angular_4_neon_10, export=1\n+        ldr         r12, [sp]\n+        push        {r4-r11, lr}\n+        ADRT        r4, angle_2 - 2\n+        ADRT        r7, inv_angle - 11*2\n+        add         r7, r7, r12, lsl #1\n+        lsl         r3, #1\n+        ldrsb       r6, [r4, r12]\n+        cmp         r12, #26\n+        ldrsb       r4, [r4, r12]\n+        bge         26f\n+        cmp         r12, #18\n+        bge         18f\n+        cmp         r12, #10\n+        bge         10f\n+\n+@ Down of Horizontal - works down left\n+        bl          patch_h_down_4x4_10\n+        pop         {r4-r11, pc}\n+\n+@ Up of Horizontal - works down up\n+10:\n+        ldrh        r7, [r7]\n+        mov         r10, #-128\n+        bl          patch_h_up_4x4_10\n+        pop         {r4-r11, pc}\n+\n+@ Left of vertical - works down left\n+18:\n+        ldrd        r8, r9, [r1]        @ Top\n+        rsb         r12, r6, #32\n+        ldrh        lr, [r2, #-2]       @ Top-left\n+        ldrh        r7, [r7]\n+        vmov        d0, r8, r9\n+        lsl         r9, r9, #16\n+        vdup.16     d2, r12\n+        orr         r9, r9, r8, lsr #16\n+        orr         r8, lr, r8, lsl #16\n+        vmov        d1, r8, r9\n+        sub         r1, r7, #128\n+        mov         r5, #3\n+1:\n+        sel         lr, lr, lr          @ force pipeline 0 on Cortex-A53\n+        vdup.16     d3, r6\n+        vmul.u16    d4, d0, d2\n+          subs        r12, r12, r4\n+        vmla.u16    d4, d1, d3\n+          itttt       mi\n+          addmi       lr, r2, r1, asr #7\n+          bicmi       lr, #1\n+          addmi       r12, r12, #32\n+          vmovmi      d0, r8, r9\n+          rsb         r6, r12, #32\n+          itt         mi\n+          lslmi       r9, r9, #16\n+          ldrhmi      lr, [lr]\n+          vdup.16     d2, r12\n+        vrshr.u16   d4, d4, #5\n+          itttt       mi\n+          orrmi       r9, r9, r8, lsr #16\n+          orrmi       r8, lr, r8, lsl #16\n+          vmovmi      d1, r8, r9\n+          addmi       r1, r1, r7\n+        subs        r5, r5, #1\n+        vst1.16     {d4}, [r0], r3\n+        bne         1b\n+\n+          vdup.16     d3, r6\n+          nop                           @ force next insn into pipeline 0 to enable\n+          vmul.u16    d4, d0, d2        @ vmla to execute back-to-back on Cortex-A53\n+          vmla.u16    d4, d1, d3\n+          vrshr.u16   d4, d4, #5\n+          vst1.16     {d4}, [r0]\n+\n+        pop         {r4-r11, pc}\n+\n+@ Right of vertical - works along top - left unused\n+26:\n+        ldrd        r8, r9, [r1]        @ Top\n+        rsb         r12, r6, #32\n+        vmov        d0, r8, r9\n+        vdup.16     d3, r6\n+        lsr         r8, #16\n+        vdup.16     d2, r12\n+        orr         r8, r8, r9, lsl #16\n+        ldr         r9, [r1, #6]!\n+        vmov        d1, r8, r9\n+        mov         r5, #3\n+1:\n+        vmul.u16    d4, d0, d2\n+          subs        r12, r4\n+        vmla.u16    d4, d1, d3\n+          it          mi\n+          addmi       r12, #32\n+          rsb         r6, r12, #32\n+          itt         mi\n+          vmovmi      d0, r8, r9\n+          lsrmi       r8, #16\n+          vdup.16     d2, r12\n+          itt         mi\n+          orrmi       r8, r8, r9, lsl #16\n+          ldrmi       r9, [r1, #2]!\n+        vrshr.u16   d4, d4, #5\n+          it          mi\n+          vmovmi      d1, r8, r9\n+          vdup.16     d3, r6\n+        subs        r5, #1\n+        vst1.16     {d4}, [r0], r3\n+        bne         1b\n+\n+          vmul.u16    d4, d0, d2\n+          vmla.u16    d4, d1, d3\n+          vrshr.u16   d4, d4, #5\n+          vst1.16     {d4}, [r0]\n+\n+        pop         {r4-r11, pc}\n+\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_angular_8_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride        [r3]\n+@       unsigned int mode       [sp, #0]  2..34\n+\n+function ff_hevc_rpi_pred_angular_8_neon_10, export=1\n+        ldr         r12, [sp]\n+        push        {r4-r11, lr}\n+        ADRT        r4, angle_2 - 2\n+        ADRT        r7, inv_angle - 11*2\n+        add         r7, r7, r12, lsl #1\n+        lsl         r3, #1\n+        ldrsb       r6, [r4, r12]\n+        cmp         r12, #26\n+        ldrsb       r4, [r4, r12]\n+        bge         26f\n+        cmp         r12, #18\n+        bge         18f\n+        cmp         r12, #10\n+        bge         10f\n+\n+@ Down of Horizontal - works down left\n+        mov         r1,  r2             @ save r2 - r1 unused by patch_down\n+\n+        bl          patch_h_down_4x4_10\n+        bl          patch_h_down_4x4_10_continue\n+\n+        add         r2, r1, #4*2        @ restore r2, but 4 rows further down left\n+        sub         r0, #16\n+        mov         r6, r4\n+        add         r0, r0, r3, lsl #2\n+\n+        bl          patch_h_down_4x4_10\n+        bl          patch_h_down_4x4_10_continue\n+\n+        pop         {r4-r11, pc}\n+\n+@ Up of Horizontal - works down up\n+10:\n+        ldrh        r7, [r7]\n+        mov         r10, #-128\n+\n+        push        {r2}\n+        bl          patch_h_up_4x4_10\n+        bl          patch_h_up_4x4_10_continue\n+        pop         {r2}\n+\n+        sub         r0, #16\n+        mov         r10, #-128\n+        add         r2, #8\n+        add         r0, r0, r3, lsl #2\n+        sub         r10, r10, r7, lsl #2\n+\n+        bl          patch_h_up_4x4_10\n+        bl          patch_h_up_4x4_10_continue\n+\n+        pop         {r4-r11, pc}\n+\n+@ Left of vertical - works down left\n+18:\n+        vld1.16     {q9}, [r1]\n+        sub         r1, r2, #2\n+        rsb         r12, r6, #32\n+        ldrh        r7, [r7]\n+        vdup.16     q2, r6\n+        vext.16     q8, q9, q9, #7\n+        sub         r8, r7, #128\n+        vld1.16     {d16[0]}, [r1]\n+        vdup.16     q3, r12\n+        mov         r5, #7\n+1:\n+        vmul.u16    q0, q9, q3\n+        subs        r12, r4\n+        vmla.u16    q0, q8, q2\n+        ittt        cc\n+        asrcc       r1, r8, #8\n+        addcc       r12, #32\n+        addcc       r1, r2, r1, lsl #1\n+        vext.16     q10, q8, q8, #7\n+        rsb         r6, r12, #32\n+        vmov        q11, q8\n+        sub         r5, #1\n+        vrshr.u16   q0, q0, #5\n+        it          cc\n+        addcc       r8, r7\n+        vld1.16     {d20[0]}, [r1]\n+        teq         r5, #0\n+        vdup.16     q2, r6\n+        vdup.16     q3, r12\n+        vst1.16     {q0}, [r0], r3\n+        bhi         1b\n+        beq         4f\n+2:\n+        vmul.u16    q0, q11, q3\n+        subs        r12, r4\n+        vmla.u16    q0, q10, q2\n+        ittt        cc\n+        asrcc       r1, r8, #8\n+        addcc       r12, #32\n+        addcc       r1, r2, r1, lsl #1\n+        vext.16     q8, q10, q10, #7\n+        rsb         r6, r12, #32\n+        vmov        q9, q10\n+        sub         r5, #1\n+        vrshr.u16   q0, q0, #5\n+        it          cc\n+        addcc       r8, r7\n+        vld1.16     {d16[0]}, [r1]\n+        teq         r5, #0\n+        vdup.16     q2, r6\n+        vdup.16     q3, r12\n+        vst1.16     {q0}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+        bcc         5f\n+3:\n+        vmul.u16    q0, q11, q3\n+        vmla.u16    q0, q10, q2\n+        vrshr.u16   q0, q0, #5\n+        vst1.16     {q0}, [r0]\n+\n+        pop         {r4-r11, pc}\n+4:\n+        bcc         3b\n+5:\n+        vmul.u16    q0, q9, q3\n+        vmla.u16    q0, q8, q2\n+        vrshr.u16   q0, q0, #5\n+        vst1.16     {q0}, [r0]\n+\n+        pop         {r4-r11, pc}\n+\n+@ Right of vertical - works along top - left unused\n+26:\n+        vld1.16     {q9}, [r1]!\n+        rsb         r12, r6, #32\n+        vdup.16     q2, r6\n+        vdup.16     q3, r12\n+        vext.16     q8, q9, q9, #1\n+        vld1.16     {d17[3]}, [r1]!\n+        mov         r5, #7\n+1:\n+        vmul.u16    q0, q8, q2\n+        subs        r12, r4\n+        vmla.u16    q0, q9, q3\n+        it          cc\n+        addcc       r12, #32\n+        vext.16     q10, q8, q8, #1\n+        rsb         r6, r12, #32\n+        vld1.16     {d21[3]}, [r1]\n+        sub         r5, #1\n+        vmov        q11, q8\n+        teq         r5, #0\n+        vrshr.u16   q0, q0, #5\n+        it          cc\n+        addcc       r1, #2\n+        vdup.16     q2, r6\n+        vdup.16     q3, r12\n+        vst1.16     {q0}, [r0], r3\n+        bhi         1b\n+        beq         4f\n+2:\n+        vmul.u16    q0, q10, q2\n+        subs        r12, r4\n+        vmla.u16    q0, q11, q3\n+        it          cc\n+        addcc       r12, #32\n+        vext.16     q8, q10, q10, #1\n+        rsb         r6, r12, #32\n+        vld1.16     {d17[3]}, [r1]\n+        sub         r5, #1\n+        vmov        q9, q10\n+        teq         r5, #0\n+        vrshr.u16   q0, q0, #5\n+        it          cc\n+        addcc       r1, #2\n+        vdup.16     q2, r6\n+        vdup.16     q3, r12\n+        vst1.16     {q0}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+        bcc         5f\n+3:\n+        vmul.u16    q0, q10, q2\n+        vmla.u16    q0, q11, q3\n+        vrshr.u16   q0, q0, #5\n+        vst1.16     {q0}, [r0]\n+\n+        pop         {r4-r11, pc}\n+4:\n+        bcc         3b\n+5:\n+        vmul.u16    q0, q8, q2\n+        vmla.u16    q0, q9, q3\n+        vrshr.u16   q0, q0, #5\n+        vst1.16     {q0}, [r0]\n+\n+        pop         {r4-r11, pc}\n+\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_angular_16_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride        [r3]\n+@       unsigned int mode       [sp, #0]  2..34\n+\n+function ff_hevc_rpi_pred_angular_16_neon_10, export=1\n+        ldr         r12, [sp]\n+        push        {r4-r11, lr}\n+        ADRT        r4, angle_2 - 2\n+        ADRT        r7, inv_angle - 11*2\n+        add         r7, r7, r12, lsl #1\n+        lsl         r3, #1\n+        ldrsb       r6, [r4, r12]\n+        cmp         r12, #26\n+        ldrsb       r4, [r4, r12]\n+        bge         26f\n+        cmp         r12, #18\n+        bge         18f\n+        cmp         r12, #10\n+        bge         10f\n+\n+@ Down of Horizontal - works down left\n+        mov         r10, #4\n+        mov         r1, r2\n+1:\n+        bl          patch_h_down_4x4_10\n+        bl          patch_h_down_4x4_10_continue\n+        bl          patch_h_down_4x4_10_continue\n+        bl          patch_h_down_4x4_10_continue\n+\n+        add         r2, r1, #4*2         @ restore r2, but 4 rows further down left\n+        add         r1, r1, #4*2\n+        mov         r6, r4\n+        sub         r0, #32\n+        subs        r10, #1\n+        add         r0, r0, r3, lsl #2\n+        bne         1b\n+\n+        pop         {r4-r11, pc}\n+\n+@ Up of Horizontal - works down up\n+10:\n+        ldrh        r7, [r7]\n+        mov         r10, #-128\n+        vmov.i8     d6, #1<<2\n+1:\n+        push        {r2, r10}\n+        bl          patch_h_up_4x4_10\n+        bl          patch_h_up_4x4_10_continue\n+        bl          patch_h_up_4x4_10_continue\n+        bl          patch_h_up_4x4_10_continue\n+        pop         {r2, r10}\n+\n+        vmov        r8, s12\n+        sub         r0, #32\n+        add         r2, #8\n+        add         r0, r0, r3, lsl #2\n+        sub         r10, r10, r7, lsl #2\n+        vshr.u8     d6, #1\n+        teq         r8, #0\n+        bne         1b\n+\n+        pop         {r4-r11, pc}\n+\n+@ Left of vertical - works down left\n+18:\n+        vld1.16     {q0-q1}, [r1]\n+        sub         r9, r2, #2\n+        rsb         r12, r6, #32\n+        ldrh        r7, [r7]\n+        mov         r8, #-128\n+        vdup.16     q9, r6\n+        vdup.16     q10, r12\n+        mov         r5, #16\n+1:\n+        vld1.16     {d17[3]}, [r9]\n+        add         r8, r7\n+        vmov        q2, q0\n+        vmov        q3, q1\n+        asr         r9, r8, #8\n+        vext.16     q1, q0, q1, #7\n+        add         r9, r2, r9, lsl #1\n+        vext.16     q0, q8, q0, #7\n+2:\n+        vmul.u16    q11, q2, q10\n+        subs        r12, r4\n+        vmla.u16    q11, q0, q9\n+        it          cc\n+        addcc       r12, #32\n+        vmul.u16    q12, q3, q10\n+        rsb         r6, r12, #32\n+        vmla.u16    q12, q1, q9\n+        sub         r5, #1\n+        teq         r5, #0\n+        vdup.16     q9, r6\n+        vdup.16     q10, r12\n+        vrshr.u16   q11, q11, #5\n+        vrshr.u16   q12, q12, #5\n+        vst1.16     {q11-q12}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+\n+        pop         {r4-r11, pc}\n+\n+@ Right of vertical - works along top - left unused\n+26:\n+        add         r5, r1, #32\n+        vld1.16     {q0-q1}, [r1]!\n+        rsb         r12, r6, #32\n+        vld1.16     {d16[0]}, [r5]\n+        mov         r5, #16\n+        vdup.16     q9, r6\n+        vdup.16     q10, r12\n+1:\n+        vmov        q2, q0\n+        add         r1, #2\n+        vmov        q3, q1\n+        vext.16     q0, q0, q1, #1\n+        vext.16     q1, q1, q8, #1\n+2:\n+        vmul.u16    q11, q0, q9\n+        subs        r12, r4\n+        vmla.u16    q11, q2, q10\n+        it          cc\n+        addcc       r12, #32\n+        vmul.u16    q12, q1, q9\n+        rsb         r6, r12, #32\n+        vmla.u16    q12, q3, q10\n+        sub         r5, #1\n+        vld1.16     {d16[0]}, [r1]\n+        teq         r5, #0\n+        vdup.16     q9, r6\n+        vdup.16     q10, r12\n+        vrshr.u16   q11, q11, #5\n+        vrshr.u16   q12, q12, #5\n+        vst1.16     {q11-q12}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+\n+        pop         {r4-r11, pc}\n+\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_angular_32_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride        [r3]\n+@       unsigned int mode       [sp, #0]  2..34\n+\n+function ff_hevc_rpi_pred_angular_32_neon_10, export=1\n+        ldr         r12, [sp]\n+        push        {r4-r11, lr}\n+        ADRT        r4, angle_2 - 2\n+        ADRT        r7, inv_angle - 11*2\n+        add         r7, r7, r12, lsl #1\n+        lsl         r3, #1\n+        vpush       {d8}\n+        ldrsb       r6, [r4, r12]\n+        cmp         r12, #26\n+        ldrsb       r4, [r4, r12]\n+        bge         26f\n+        cmp         r12, #18\n+        bge         18f\n+        cmp         r12, #10\n+        bge         10f\n+\n+@ Down of Horizontal - works down left\n+        add         sp, #8\n+        mov         r10, #8\n+        mov         r1, r2\n+1:\n+        bl          patch_h_down_4x4_10\n+        bl          patch_h_down_4x4_10_continue\n+        bl          patch_h_down_4x4_10_continue\n+        bl          patch_h_down_4x4_10_continue\n+        bl          patch_h_down_4x4_10_continue\n+        bl          patch_h_down_4x4_10_continue\n+        bl          patch_h_down_4x4_10_continue\n+        bl          patch_h_down_4x4_10_continue\n+\n+        add         r2, r1, #4*2         @ restore r2, but 4 rows further down left\n+        add         r1, r1, #4*2\n+        mov         r6, r4\n+        sub         r0, #64\n+        subs        r10, #1\n+        add         r0, r0, r3, lsl #2\n+        bne         1b\n+\n+        pop         {r4-r11, pc}\n+\n+@ Up of Horizontal - works down up\n+10:\n+        add         sp, #8\n+        ldrh        r7, [r7]\n+        mov         r10, #-128\n+        vmov.i8     d6, #1<<6\n+1:\n+        push        {r2, r10}\n+        bl          patch_h_up_4x4_10\n+        bl          patch_h_up_4x4_10_continue\n+        bl          patch_h_up_4x4_10_continue\n+        bl          patch_h_up_4x4_10_continue\n+        bl          patch_h_up_4x4_10_continue\n+        bl          patch_h_up_4x4_10_continue\n+        bl          patch_h_up_4x4_10_continue\n+        bl          patch_h_up_4x4_10_continue\n+        pop         {r2, r10}\n+\n+        vmov        r8, s12\n+        sub         r0, #64\n+        add         r2, #8\n+        add         r0, r0, r3, lsl #2\n+        sub         r10, r10, r7, lsl #2\n+        vshr.u8     d6, #1\n+        teq         r8, #0\n+        bne         1b\n+\n+        pop         {r4-r11, pc}\n+\n+@ Left of vertical - works down left\n+18:\n+        add         r5, r1, #32\n+        vld1.16     {q1-q2}, [r1]\n+        rsb         r12, r6, r6, lsl #16\n+        vld1.16     {q3-q4}, [r5]\n+        sub         r9, r2, #2\n+        rsb         r4, r12, #0\n+        rsb         r12, r12, #32 << 16\n+        ldrh        r7, [r7]\n+        mov         r8, #-128\n+        vmov        d0, d9\n+        vmov        s2, r12\n+        add         r10, r0, #32\n+        mov         r5, #32\n+1:\n+        vld1.16     {d1[3]}, [r9]\n+        add         r8, r7\n+        vmov        q11, q4\n+        vmov        q10, q3\n+        asr         r9, r8, #8\n+        vmov        q9, q2\n+        add         r9, r2, r9, lsl #1\n+        vmov        q8, q1\n+        vext.16     q4, q3, q4, #7\n+        vext.16     q3, q2, q3, #7\n+        vext.16     q2, q1, q2, #7\n+        vext.16     q1, q0, q1, #7\n+2:\n+        vmul.u16    q12, q8, d1[1]\n+        adds        r12, r4\n+        vmla.u16    q12, q1, d1[0]\n+        it          cc\n+        addcc       r12, #32 << 16\n+        vmul.u16    q13, q9, d1[1]\n+        it          cc\n+        subcc       r12, #32\n+        vmla.u16    q13, q2, d1[0]\n+        sub         r5, #1\n+        vmul.u16    q14, q10, d1[1]\n+        teq         r5, #0\n+        vmla.u16    q14, q3, d1[0]\n+        vmul.u16    q15, q11, d1[1]\n+        vmla.u16    q15, q4, d1[0]\n+        vmov        s2, r12\n+        vrshr.u16   q12, q12, #5\n+        vrshr.u16   q13, q13, #5\n+        vrshr.u16   q14, q14, #5\n+        vrshr.u16   q15, q15, #5\n+        vst1.16     {q12-q13}, [r0], r3\n+        vst1.16     {q14-q15}, [r10], r3\n+        bhi         2b\n+        bne         1b\n+\n+        vpop        {d8}\n+        vmov        d9, d0\n+        pop         {r4-r11, pc}\n+\n+@ Right of vertical - works along top - left unused\n+26:\n+        add         r5, r1, #32\n+        vld1.16     {q1-q2}, [r1]\n+        rsb         r12, r6, r6, lsl #16\n+        vld1.16     {q3-q4}, [r5]\n+        add         r1, r1, #64\n+        rsb         r4, r12, #0\n+        rsb         r12, r12, #32 << 16\n+        vmov        d1, d9\n+        vmov        s1, r12\n+        add         r10, r0, #32\n+        mov         r5, #32\n+1:\n+        vld1.16     {d0[0]}, [r1]!\n+        vmov        q8, q1\n+        vmov        q9, q2\n+        vmov        q10, q3\n+        vmov        q11, q4\n+        vext.16     q1, q1, q2, #1\n+        vext.16     q2, q2, q3, #1\n+        vext.16     q3, q3, q4, #1\n+        vext.16     q4, q4, q0, #1\n+2:\n+        vmul.u16    q12, q1, d0[2]\n+        adds        r12, r4\n+        vmla.u16    q12, q8, d0[3]\n+        it          cc\n+        addcc       r12, #32 << 16\n+        vmul.u16    q13, q2, d0[2]\n+        it          cc\n+        subcc       r12, #32\n+        vmla.u16    q13, q9, d0[3]\n+        sub         r5, #1\n+        vmul.u16    q14, q3, d0[2]\n+        teq         r5, #0\n+        vmla.u16    q14, q10, d0[3]\n+        vmul.u16    q15, q4, d0[2]\n+        vmla.u16    q15, q11, d0[3]\n+        vmov        s1, r12\n+        vrshr.u16   q12, q12, #5\n+        vrshr.u16   q13, q13, #5\n+        vrshr.u16   q14, q14, #5\n+        vrshr.u16   q15, q15, #5\n+        vst1.16     {q12-q13}, [r0], r3\n+        vst1.16     {q14-q15}, [r10], r3\n+        bhi         2b\n+        bne         1b\n+\n+        vpop        {d8}\n+        vmov        d9, d1\n+        pop         {r4-r11, pc}\n+\n+endfunc\n+\n+\n+\n+@ Generate 4x4 chroma patch\n+@\n+@ In (const)\n+@ r1   Up ptr (_up only)\n+@ r3   Out stride\n+@ r4   Angle add\n+@ r7   Inv angle (_up only)\n+@\n+@ In/Out (updated)\n+@ r0   Out pointer - on exit point to start of next patch horizontally (i.e. r0 + patch width)\n+@ r2   Left ptr - updated\n+@ r6   Angle frac (init to r4 + 32)\n+@ r8   Inv angle accumulator\n+@ q2   Cur Line - load before 1st call for down - set by _up\n+@ q8   Cur Line - load before 1st call for up   - set by _down\n+@\n+@ Temps\n+@ r5   Loop counter\n+@ r12\n+@ d0, q1, q12-q15\n+\n+patch_h_down_c_4x4_10:\n+        vld1.16     {q12}, [r2]!\n+        rsb         r12, r6, #32\n+        vdup.16     q2, r6\n+        vdup.16     q3, r12\n+        mov         r5, #4\n+1:\n+        vmov        q13, q12\n+        vext.16     q12, q12, q12, #2\n+        vld1.32     {d25[1]}, [r2]!\n+patch_h_down_c_4x4_10_continue:\n+2:\n+        vmov        q8, q9\n+        subs        r12, r4\n+        vmul.u16    q0, q13, q3\n+        it          cc\n+        addcc       r12, #32\n+        vmla.u16    q0, q12, q2\n+        rsb         r6, r12, #32\n+        vmov        q9, q10\n+        sub         r5, #1\n+        vmov        q10, q11\n+        teq         r5, #0\n+        vdup.16     q2, r6\n+        vdup.16     q3, r12\n+        vrshr.u16   q11, q0, #5\n+        bhi         2b\n+        bne         1b\n+\n+        bcs         3f\n+        vmov        q13, q12\n+        vext.16     q12, q12, q12, #2\n+        vld1.32     {d25[1]}, [r2]!\n+3:\n+\n+store_tran_c_4x4_10:\n+T       add         r6, r0, r3\n+        vzip.32     q8, q10\n+A       add         r6, r0, r3\n+T       lsl         r3, #1\n+        vzip.32     q9, q11\n+A       add         r5, r0, r3, lsl #1\n+T       add         r5, r0, r3\n+        vst2.32     {d16,d18}, [r0]!\n+A       lsl         r3, #1\n+        vst2.32     {d17,d19}, [r6], r3\n+        asr         r3, #1\n+        vst2.32     {d20,d22}, [r5]\n+        mov         r5, #4\n+        vst2.32     {d21,d23}, [r6]\n+        bx          lr\n+\n+patch_h_up_c_4x4_10:\n+        vld1.16     {q1}, [r2]\n+        rsb         r12, r6, #32\n+        vdup.16     q2, r6\n+        vdup.16     q3, r12\n+        mov         r5, #4\n+1:\n+        adds        r8, r7\n+        vmov        q12, q1\n+        it          mi\n+        ldrmi       r6, [r2, #-4]!\n+        vext.16     q1, q1, q1, #6\n+        itt         pl\n+        asrpl       r6, r8, #8\n+        ldrpl       r6, [r1, r6, lsl #2]\n+        vmov        s4, r6\n+patch_h_up_c_4x4_10_continue:\n+2:\n+        vmov        q8, q9\n+        subs        r12, r4\n+        vmul.u16    q0, q12, q3\n+        it          cc\n+        addcc       r12, #32\n+        vmla.u16    q0, q1, q2\n+        rsb         r6, r12, #32\n+        vmov        q9, q10\n+        sub         r5, #1\n+        vmov        q10, q11\n+        teq         r5, #0\n+        vdup.16     q2, r6\n+        vdup.16     q3, r12\n+        vrshr.u16   q11, q0, #5\n+        bhi         2b\n+        bne         1b\n+\n+        bcs         store_tran_c_4x4_10\n+        adds        r8, r7\n+        vmov        q12, q1\n+        it          mi\n+        ldrmi       r6, [r2, #-4]!\n+        vext.16     q1, q1, q1, #6\n+        itt         pl\n+        asrpl       r6, r8, #8\n+        ldrpl       r6, [r1, r6, lsl #2]\n+        vmov        s4, r6\n+        b           store_tran_c_4x4_10\n+\n+\n+@ ff_hevc_rpi_pred_angular_c_4_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride        [r3]\n+@       unsigned int mode       [sp, #0]  2..34\n+\n+function ff_hevc_rpi_pred_angular_c_4_neon_10, export=1\n+        ldr         r12, [sp]\n+        push        {r4-r8, lr}\n+        ADRT        r4, angle_2 - 2\n+        ADRT        r7, inv_angle - 11*2\n+        add         r7, r7, r12, lsl #1\n+        lsl         r3, #2\n+        ldrsb       r6, [r4, r12]\n+        cmp         r12, #26\n+        ldrsb       r4, [r4, r12]\n+        bge         26f\n+        cmp         r12, #18\n+        bge         18f\n+        cmp         r12, #10\n+        bge         10f\n+\n+@ Down of Horizontal - works down left\n+        bl          patch_h_down_c_4x4_10\n+        pop         {r4-r8, pc}\n+\n+@ Up of Horizontal - works down up\n+10:\n+        ldrh        r7, [r7]\n+        mov         r8, #-128\n+        sub         r8, r7\n+        bl          patch_h_up_c_4x4_10\n+        pop         {r4-r8, pc}\n+\n+@ Left of vertical - works down left\n+18:\n+        vld1.16     {q9}, [r1]\n+        sub         r1, r2, #4\n+        rsb         r12, r6, #32\n+        ldrh        r7, [r7]\n+        vdup.16     q2, r6\n+        vext.16     q8, q9, q9, #6\n+        sub         r8, r7, #128\n+        vld1.32     {d16[0]}, [r1]\n+        vdup.16     q3, r12\n+        mov         r5, #3\n+1:\n+        vmul.u16    q0, q9, q3\n+        subs        r12, r4\n+        vmla.u16    q0, q8, q2\n+        ittt        cc\n+        asrcc       r1, r8, #8\n+        addcc       r12, #32\n+        addcc       r1, r2, r1, lsl #2\n+        vext.16     q10, q8, q8, #6\n+        rsb         r6, r12, #32\n+        vmov        q11, q8\n+        sub         r5, #1\n+        vrshr.u16   q0, q0, #5\n+        it          cc\n+        addcc       r8, r7\n+        vld1.32     {d20[0]}, [r1]\n+        teq         r5, #0\n+        vdup.16     q2, r6\n+        vdup.16     q3, r12\n+        vst1.16     {q0}, [r0], r3\n+        bhi         1b\n+        beq         4f\n+2:\n+        vmul.u16    q0, q11, q3\n+        subs        r12, r4\n+        vmla.u16    q0, q10, q2\n+        ittt        cc\n+        asrcc       r1, r8, #8\n+        addcc       r12, #32\n+        addcc       r1, r2, r1, lsl #2\n+        vext.16     q8, q10, q10, #6\n+        rsb         r6, r12, #32\n+        vmov        q9, q10\n+        sub         r5, #1\n+        vrshr.u16   q0, q0, #5\n+        it          cc\n+        addcc       r8, r7\n+        vld1.32     {d16[0]}, [r1]\n+        teq         r5, #0\n+        vdup.16     q2, r6\n+        vdup.16     q3, r12\n+        vst1.16     {q0}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+        bcc         5f\n+3:\n+        vmul.u16    q0, q11, q3\n+        vmla.u16    q0, q10, q2\n+        vrshr.u16   q0, q0, #5\n+        vst1.16     {q0}, [r0]\n+\n+        pop         {r4-r8, pc}\n+4:\n+        bcc         3b\n+5:\n+        vmul.u16    q0, q9, q3\n+        vmla.u16    q0, q8, q2\n+        vrshr.u16   q0, q0, #5\n+        vst1.16     {q0}, [r0]\n+\n+        pop         {r4-r8, pc}\n+\n+@ Right of vertical - works along top - left unused\n+26:\n+        vld1.16     {q9}, [r1]!\n+        rsb         r12, r6, #32\n+        vdup.16     q2, r6\n+        vdup.16     q3, r12\n+        vext.16     q8, q9, q9, #2\n+        vld1.32     {d17[1]}, [r1]!\n+        mov         r5, #3\n+1:\n+        vmul.u16    q0, q8, q2\n+        subs        r12, r4\n+        vmla.u16    q0, q9, q3\n+        it          cc\n+        addcc       r12, #32\n+        vext.16     q10, q8, q8, #2\n+        rsb         r6, r12, #32\n+        vld1.32     {d21[1]}, [r1]\n+        sub         r5, #1\n+        vmov        q11, q8\n+        teq         r5, #0\n+        vrshr.u16   q0, q0, #5\n+        it          cc\n+        addcc       r1, #4\n+        vdup.16     q2, r6\n+        vdup.16     q3, r12\n+        vst1.16     {q0}, [r0], r3\n+        bhi         1b\n+        beq         4f\n+2:\n+        vmul.u16    q0, q10, q2\n+        subs        r12, r4\n+        vmla.u16    q0, q11, q3\n+        it          cc\n+        addcc       r12, #32\n+        vext.16     q8, q10, q10, #2\n+        rsb         r6, r12, #32\n+        vld1.32     {d17[1]}, [r1]\n+        sub         r5, #1\n+        vmov        q9, q10\n+        teq         r5, #0\n+        vrshr.u16   q0, q0, #5\n+        it          cc\n+        addcc       r1, #4\n+        vdup.16     q2, r6\n+        vdup.16     q3, r12\n+        vst1.16     {q0}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+        bcc         5f\n+3:\n+        vmul.u16    q0, q10, q2\n+        vmla.u16    q0, q11, q3\n+        vrshr.u16   q0, q0, #5\n+        vst1.16     {q0}, [r0]\n+\n+        pop         {r4-r8, pc}\n+4:\n+        bcc         3b\n+5:\n+        vmul.u16    q0, q8, q2\n+        vmla.u16    q0, q9, q3\n+        vrshr.u16   q0, q0, #5\n+        vst1.16     {q0}, [r0]\n+\n+        pop         {r4-r8, pc}\n+\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_angular_c_8_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride        [r3]\n+@       unsigned int mode       [sp, #0]  2..34\n+\n+function ff_hevc_rpi_pred_angular_c_8_neon_10, export=1\n+        ldr         r12, [sp]\n+        push        {r4-r8, lr}\n+        ADRT        r4, angle_2 - 2\n+        ADRT        r7, inv_angle - 11*2\n+        add         r7, r7, r12, lsl #1\n+        lsl         r3, #2\n+        ldrsb       r6, [r4, r12]\n+        cmp         r12, #26\n+        ldrsb       r4, [r4, r12]\n+        bge         26f\n+        cmp         r12, #18\n+        bge         18f\n+        cmp         r12, #10\n+        bge         10f\n+\n+@ Down of Horizontal - works down left\n+        mov         r1,  r2             @ save r2 - r1 unused by patch_down\n+\n+        bl          patch_h_down_c_4x4_10\n+        bl          patch_h_down_c_4x4_10_continue\n+\n+        add         r2, r1, #4*4        @ restore r2, but 4 rows further down left\n+        sub         r0, #32\n+        mov         r6, r4\n+        add         r0, r0, r3, lsl #2\n+\n+        bl          patch_h_down_c_4x4_10\n+        bl          patch_h_down_c_4x4_10_continue\n+\n+        pop         {r4-r8, pc}\n+\n+@ Up of Horizontal - works down up\n+10:\n+        ldrh        r7, [r7]\n+        mov         r8, #-128\n+        sub         r8, r7\n+\n+        push        {r2, r8}\n+        bl          patch_h_up_c_4x4_10\n+        bl          patch_h_up_c_4x4_10_continue\n+        pop         {r2, r8}\n+\n+        sub         r0, #32\n+        mov         r6, r4\n+        add         r2, #16\n+        sub         r8, r8, r7, lsl #2\n+        add         r0, r0, r3, lsl #2\n+\n+        bl          patch_h_up_c_4x4_10\n+        bl          patch_h_up_c_4x4_10_continue\n+\n+        pop         {r4-r8, pc}\n+\n+@ Left of vertical - works down left\n+18:\n+        vld1.16     {q0-q1}, [r1]\n+        sub         r9, r2, #4\n+        rsb         r12, r6, #32\n+        ldrh        r7, [r7]\n+        mov         r8, #-128\n+        vdup.16     q9, r6\n+        vdup.16     q10, r12\n+        mov         r5, #8\n+1:\n+        vld1.32     {d17[1]}, [r9]\n+        add         r8, r7\n+        vmov        q2, q0\n+        vmov        q3, q1\n+        asr         r9, r8, #8\n+        vext.16     q1, q0, q1, #6\n+        add         r9, r2, r9, lsl #2\n+        vext.16     q0, q8, q0, #6\n+2:\n+        vmul.u16    q11, q2, q10\n+        subs        r12, r4\n+        vmla.u16    q11, q0, q9\n+        it          cc\n+        addcc       r12, #32\n+        vmul.u16    q12, q3, q10\n+        rsb         r6, r12, #32\n+        vmla.u16    q12, q1, q9\n+        sub         r5, #1\n+        teq         r5, #0\n+        vdup.16     q9, r6\n+        vdup.16     q10, r12\n+        vrshr.u16   q11, q11, #5\n+        vrshr.u16   q12, q12, #5\n+        vst1.16     {q11-q12}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+\n+        pop         {r4-r8, pc}\n+\n+@ Right of vertical - works along top - left unused\n+26:\n+        add         r5, r1, #32\n+        vld1.16     {q0-q1}, [r1]!\n+        rsb         r12, r6, #32\n+        vld1.32     {d16[0]}, [r5]\n+        mov         r5, #8\n+        vdup.16     q9, r6\n+        vdup.16     q10, r12\n+1:\n+        vmov        q2, q0\n+        add         r1, #4\n+        vmov        q3, q1\n+        vext.16     q0, q0, q1, #2\n+        vext.16     q1, q1, q8, #2\n+2:\n+        vmul.u16    q11, q0, q9\n+        subs        r12, r4\n+        vmla.u16    q11, q2, q10\n+        it          cc\n+        addcc       r12, #32\n+        vmul.u16    q12, q1, q9\n+        rsb         r6, r12, #32\n+        vmla.u16    q12, q3, q10\n+        sub         r5, #1\n+        vld1.32     {d16[0]}, [r1]\n+        teq         r5, #0\n+        vdup.16     q9, r6\n+        vdup.16     q10, r12\n+        vrshr.u16   q11, q11, #5\n+        vrshr.u16   q12, q12, #5\n+        vst1.16     {q11-q12}, [r0], r3\n+        bhi         2b\n+        bne         1b\n+\n+        pop         {r4-r8, pc}\n+\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_angular_c_16_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride        [r3]\n+@       unsigned int mode       [sp, #0]  2..34\n+\n+function ff_hevc_rpi_pred_angular_c_16_neon_10, export=1\n+        ldr         r12, [sp]\n+        push        {r4-r10, lr}\n+        ADRT        r4, angle_2 - 2\n+        ADRT        r7, inv_angle - 11*2\n+        add         r7, r7, r12, lsl #1\n+        lsl         r3, #2\n+        vpush       {d8}\n+        ldrsb       r6, [r4, r12]\n+        cmp         r12, #26\n+        ldrsb       r4, [r4, r12]\n+        bge         26f\n+        cmp         r12, #18\n+        bge         18f\n+        cmp         r12, #10\n+        bge         10f\n+\n+@ Down of Horizontal - works down left\n+        add         sp, #8\n+        mov         r10, #4\n+        mov         r1, r2\n+1:\n+        bl          patch_h_down_c_4x4_10\n+        bl          patch_h_down_c_4x4_10_continue\n+        bl          patch_h_down_c_4x4_10_continue\n+        bl          patch_h_down_c_4x4_10_continue\n+\n+        add         r2, r1, #4*4         @ restore r2, but 4 rows further down left\n+        add         r1, r1, #4*4\n+        mov         r6, r4\n+        sub         r0, #64\n+        subs        r10, #1\n+        add         r0, r0, r3, lsl #2\n+        bne         1b\n+\n+        pop         {r4-r10, pc}\n+\n+@ Up of Horizontal - works down up\n+10:\n+        add         sp, #8\n+        mov         r10, #4\n+        ldrh        r7, [r7]\n+        mov         r8, #-128\n+        sub         r8, r7\n+2:\n+        push        {r2, r8}\n+        bl          patch_h_up_c_4x4_10\n+        bl          patch_h_up_c_4x4_10_continue\n+        bl          patch_h_up_c_4x4_10_continue\n+        bl          patch_h_up_c_4x4_10_continue\n+        pop         {r2, r8}\n+\n+        sub         r0, #64\n+        mov         r6, r4\n+        add         r2, #16\n+        sub         r8, r8, r7, lsl #2\n+        add         r0, r0, r3, lsl #2\n+        subs        r10, #1\n+        bne         2b\n+\n+        pop         {r4-r10, pc}\n+\n+@ Left of vertical - works down left\n+18:\n+        add         r5, r1, #32\n+        vld1.16     {q1-q2}, [r1]\n+        rsb         r12, r6, r6, lsl #16\n+        vld1.16     {q3-q4}, [r5]\n+        sub         r9, r2, #4\n+        rsb         r4, r12, #0\n+        rsb         r12, r12, #32 << 16\n+        ldrh        r7, [r7]\n+        mov         r8, #-128\n+        vmov        d0, d9\n+        vmov        s2, r12\n+        add         r10, r0, #32\n+        mov         r5, #16\n+1:\n+        vld1.32     {d1[1]}, [r9]\n+        add         r8, r7\n+        vmov        q11, q4\n+        vmov        q10, q3\n+        asr         r9, r8, #8\n+        vmov        q9, q2\n+        add         r9, r2, r9, lsl #2\n+        vmov        q8, q1\n+        vext.16     q4, q3, q4, #6\n+        vext.16     q3, q2, q3, #6\n+        vext.16     q2, q1, q2, #6\n+        vext.16     q1, q0, q1, #6\n+2:\n+        vmul.u16    q12, q8, d1[1]\n+        adds        r12, r4\n+        vmla.u16    q12, q1, d1[0]\n+        it          cc\n+        addcc       r12, #32 << 16\n+        vmul.u16    q13, q9, d1[1]\n+        it          cc\n+        subcc       r12, #32\n+        vmla.u16    q13, q2, d1[0]\n+        sub         r5, #1\n+        vmul.u16    q14, q10, d1[1]\n+        teq         r5, #0\n+        vmla.u16    q14, q3, d1[0]\n+        vmul.u16    q15, q11, d1[1]\n+        vmla.u16    q15, q4, d1[0]\n+        vmov        s2, r12\n+        vrshr.u16   q12, q12, #5\n+        vrshr.u16   q13, q13, #5\n+        vrshr.u16   q14, q14, #5\n+        vrshr.u16   q15, q15, #5\n+        vst1.16     {q12-q13}, [r0], r3\n+        vst1.16     {q14-q15}, [r10], r3\n+        bhi         2b\n+        bne         1b\n+\n+        vpop        {d8}\n+        vmov        d9, d0\n+        pop         {r4-r10, pc}\n+\n+@ Right of vertical - works along top - left unused\n+26:\n+        add         r5, r1, #32\n+        vld1.16     {q1-q2}, [r1]\n+        rsb         r12, r6, r6, lsl #16\n+        vld1.16     {q3-q4}, [r5]\n+        add         r1, r1, #64\n+        rsb         r4, r12, #0\n+        rsb         r12, r12, #32 << 16\n+        vmov        d1, d9\n+        vmov        s1, r12\n+        add         r10, r0, #32\n+        mov         r5, #16\n+1:\n+        vld1.32     {d0[0]}, [r1]!\n+        vmov        q8, q1\n+        vmov        q9, q2\n+        vmov        q10, q3\n+        vmov        q11, q4\n+        vext.16     q1, q1, q2, #2\n+        vext.16     q2, q2, q3, #2\n+        vext.16     q3, q3, q4, #2\n+        vext.16     q4, q4, q0, #2\n+2:\n+        vmul.u16    q12, q1, d0[2]\n+        adds        r12, r4\n+        vmla.u16    q12, q8, d0[3]\n+        it          cc\n+        addcc       r12, #32 << 16\n+        vmul.u16    q13, q2, d0[2]\n+        it          cc\n+        subcc       r12, #32\n+        vmla.u16    q13, q9, d0[3]\n+        sub         r5, #1\n+        vmul.u16    q14, q3, d0[2]\n+        teq         r5, #0\n+        vmla.u16    q14, q10, d0[3]\n+        vmul.u16    q15, q4, d0[2]\n+        vmla.u16    q15, q11, d0[3]\n+        vmov        s1, r12\n+        vrshr.u16   q12, q12, #5\n+        vrshr.u16   q13, q13, #5\n+        vrshr.u16   q14, q14, #5\n+        vrshr.u16   q15, q15, #5\n+        vst1.16     {q12-q13}, [r0], r3\n+        vst1.16     {q14-q15}, [r10], r3\n+        bhi         2b\n+        bne         1b\n+\n+        vpop        {d8}\n+        vmov        d9, d1\n+        pop         {r4-r10, pc}\n+\n+endfunc\ndiff --git a/libavcodec/arm/rpi_hevcpred_intra_dc_neon.S b/libavcodec/arm/rpi_hevcpred_intra_dc_neon.S\nnew file mode 100644\nindex 0000000000..df8c1c25b9\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcpred_intra_dc_neon.S\n@@ -0,0 +1,705 @@\n+/*\n+Copyright (c) 2018 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox, Ben Avison\n+*/\n+\n+\n+#include \"libavutil/arm/asm.S\"\n+#include \"neon.S\"\n+\n+\n+@ ff_hevc_rpi_pred_dc_4_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_dc_4_neon_8, export=1\n+\n+        @ Average the els of top & left\n+        ldr         r2, [r2]\n+        vld1.32     {d0[0]}, [r1]\n+        mov         r1, #2\n+        vmov        s1, r2\n+        vmov        s2, r2\n+        vmov.i16    q2, #3\n+        add         r2, r0, r3\n+        vaddl.u8    q1, d0, d1    @ d2[0] = top[0] + left[0]\n+        lsl         r3, #1\n+        vmovl.u8    q0, d0\n+        vmov.i64    d7, #0xffff\n+        vmov.16     d4[0], r1     @ 2, 3, 3, 3...\n+        vpadd.i16   d6, d2, d2    @ 2 (top & bottom of vector the same)\n+        vbit        d0, d2, d7    @ q0 = top[0]+left[0], top[1..3], left[0..3]\n+\n+        @ top line gets some smoothing\n+        @ (top[i] + 3*dc + 2) >> 2\n+        @ as does left\n+        @ top_line[0] is extra special\n+        @ (top[0] + left[0] + 2*dc + 2) >> 2\n+\n+        vmov.i64    d7, #0xff\n+        vpadd.i16   d6, d6        @ 1 (all the same)\n+        vrshr.u16   d6, #3\n+        vmla.i16    q0, q2, d6[0]\n+        vdup.8      d6, d6[0]\n+        vrshrn.i16  d0, q0, #2\n+\n+        @ Store top line\n+        vst1.32     {d0[0]}, [r0], r3\n+\n+        @ Store the rest\n+        vshr.u64    d1, d0, #5*8\n+        vshr.u64    d2, d0, #6*8\n+        vshr.u64    d3, d0, #7*8\n+        vbif        d1, d6, d7\n+        vbif        d2, d6, d7\n+        vst1.32     {d1[0]}, [r2], r3\n+        vbif        d3, d6, d7\n+        vst1.32     {d2[0]}, [r0]\n+        vst1.32     {d3[0]}, [r2]\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_dc_c_4_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_dc_c_4_neon_8, export=1\n+\n+        @ Average the els of top & left\n+        vld1.8      {d0}, [r1]\n+        vld1.8      {d1}, [r2]\n+A       add         r2, r0, r3, lsl #1\n+A       lsl         r3, #2\n+T       lsl         r3, #1\n+T       add         r2, r0, r3\n+T       lsl         r3, #1\n+        vaddl.u8    q0, d0, d1\n+        vadd.i16    d0, d1       @ d0 has 2 val pairs\n+        vpadd.i32   d2, d0, d0   @ This adds U & V separately\n+        vpadd.i32   d3, d0, d0\n+        vrshrn.u16  d0, q1, #3\n+\n+        @ Store\n+        vst1.8      {d0}, [r0], r3\n+        vst1.8      {d0}, [r2], r3\n+        vst1.8      {d0}, [r0]\n+        vst1.8      {d0}, [r2]\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_dc_8_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_dc_8_neon_8, export=1\n+\n+        @ Average the els of top & left\n+        vld1.8      {d0}, [r1]\n+        mov         r1, #2\n+        vld1.8      {d16}, [r2]\n+        vmov.i16    q2, #3\n+        vmov.i64    d7, #0xffff\n+        vaddl.u8    q1, d0, d16   @ d2[0] = top[0] + left[0]\n+        vmovl.u8    q0, d0\n+        vadd.i16    d6, d2, d3    @ d6 has 4 vals\n+        vmov.16     d4[0], r1     @ 2, 3, 3, 3...\n+        vbit        d0, d2, d7    @ q0 = top[0]+left[0], top[1..7]\n+\n+        @ top line gets some smoothing\n+        @ (top[i] + 3*dc + 2) >> 2\n+        @ as does left\n+        @ top_line[0] is extra special\n+        @ (top[0] + left[0] + 2*dc + 2) >> 2\n+\n+        vmov.i64    d7, #0xff\n+        vmovl.u8    q1, d16\n+        vpadd.i16   d6, d6        @ 2 (top & bottom of vector the same)\n+        vpadd.i16   d6, d6        @ 1 (all the same)\n+        vrshr.u16   d6, #4\n+        vmla.i16    q1, q2, d6[0]\n+        vmla.i16    q0, q2, d6[0]\n+        vdup.8      d6, d6[0]\n+        vrshrn.i16  d2, q1, #2\n+        vrshrn.i16  d0, q0, #2\n+\n+        @ Store top line\n+        vst1.8      {d0}, [r0], r3\n+\n+        @ Store the rest\n+        vshr.u64    d2, #8\n+        vbit        d6, d2, d7\n+        vshr.u64    d2, #8\n+        vst1.8      {d6}, [r0], r3\n+        mov         r1, #6\n+1:\n+        vbit        d6, d2, d7\n+        vshr.u64    d2, #8\n+        vst1.8      {d6}, [r0], r3\n+        subs        r1, #2\n+        vbit        d6, d2, d7\n+        vshr.u64    d2, #8\n+        vst1.8      {d6}, [r0], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_dc_c_8_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_dc_c_8_neon_8, export=1\n+\n+        @ Average the els of top & left\n+        vld1.8      {q0}, [r1]\n+        mov         r1, #8\n+        vld1.8      {q1}, [r2]\n+T       lsl         r3, #1\n+        vaddl.u8    q0, d0, d1\n+A       add         r2, r0, r3, lsl #1\n+A       lsl         r3, #2\n+T       add         r2, r0, r3\n+T       lsl         r3, #1\n+        vaddl.u8    q1, d2, d3\n+        vadd.i16    q1, q0\n+        vadd.i16    d3, d2        @ d3 has 2 val pairs\n+        vpadd.i32   d2, d3, d3    @ This add U & V separately\n+        vpadd.i32   d3, d3, d3\n+        vrshrn.u16  d0, q1, #4\n+        vrshrn.u16  d1, q1, #4\n+\n+        @ Store\n+1:\n+        vst1.8      {q0}, [r0], r3\n+        subs        r1, #4\n+        vst1.8      {q0}, [r2], r3\n+        vst1.8      {q0}, [r0], r3\n+        vst1.8      {q0}, [r2], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_dc_16_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_dc_16_neon_8, export=1\n+\n+        @ Average the els of top & left\n+        vld1.8      {q8}, [r1]\n+        mov         r1, #2\n+        vld1.8      {q9}, [r2]\n+        vaddl.u8    q10, d16, d17\n+        vaddl.u8    q11, d16, d18\n+        vaddl.u8    q0, d18, d19\n+        vmov.i16    q1, #3\n+        vadd.i16    q10, q0\n+        vmovl.u8    q0, d18\n+        vadd.i16    d20, d21\n+        vmov.i16    d2[0], r1     @ 2, 3, 3, 3...\n+\n+        @ top line gets some smoothing\n+        @ (top[i] + 3*dc + 2) >> 2\n+        @ as does left\n+        @ top_line[0] is extra special\n+        @ (top[0] + left[0] + 2*dc + 2) >> 2\n+\n+        vmovl.u8    q2, d16\n+        vmovl.u8    q9, d19\n+        vpadd.i16   d20, d20      @ 2 (top & bottom of vector the same)\n+        vmov.i64    d7, #0xffff\n+        vmovl.u8    q8, d17\n+        vbit        d4, d22, d7   @ q2 = top[0]+left[0], top[1..7]\n+        vmov.i64    d7, #0xff\n+        vpadd.i16   d20, d20      @ 1 (all the same)\n+        vrshr.u16   d21, d20, #5\n+        vrshr.u16   d20, d20, #5\n+        vmla.i16    q0, q10, d2[1]\n+        vmla.i16    q9, q10, d2[1]\n+        vmla.i16    q2, q10, q1\n+        vmla.i16    q8, q10, d2[1]\n+        vdup.8      q1, d20[0]\n+        vrshrn.i16  d0, q0, #2\n+        vrshrn.i16  d1, q9, #2\n+        vrshrn.i16  d4, q2, #2\n+        vrshrn.i16  d5, q8, #2\n+        vext.8      q0, q0, q0, #1\n+\n+        @ Store top line\n+        vst1.8      {q2}, [r0], r3\n+\n+        @ Store the rest\n+        mov         r1, #15\n+1:\n+        vbit        d2, d0, d7\n+        vext.8      q0, q0, q0, #1\n+        subs        r1, #1\n+        vst1.8      {q1}, [r0], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_dc_c_16_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_dc_c_16_neon_8, export=1\n+\n+        @ Average the els of top & left\n+        vld1.8      {q0-q1}, [r1]\n+        mov         r1, #16\n+        vld1.8      {q2-q3}, [r2]\n+T       lsl         r3, #1\n+        vaddl.u8    q0, d0, d1\n+A       add         r2, r0, r3, lsl #1\n+T       add         r2, r0, r3\n+        vaddl.u8    q1, d2, d3\n+A       lsl         r3, #2\n+T       lsl         r3, #1\n+        vaddl.u8    q2, d4, d5\n+        vaddl.u8    q3, d6, d7\n+        vadd.i16    q0, q1\n+        vadd.i16    q2, q3\n+        vadd.i16    q0, q2\n+        vadd.i16    d0, d1        @ d0 has 2 val pairs\n+        vpadd.i32   d4, d0, d0    @ This adds U & V separately\n+        vpadd.i32   d5, d0, d0\n+        vrshrn.u16  d0, q2, #5\n+        vrshrn.u16  d1, q2, #5\n+        vrshrn.u16  d2, q2, #5\n+        vrshrn.u16  d3, q2, #5\n+\n+        @ Store\n+1:\n+        vst1.8      {q0-q1}, [r0], r3\n+        subs        r1, #2\n+        vst1.8      {q0-q1}, [r2], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_dc_32_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_dc_32_neon_8, export=1\n+\n+        @ Average the els of top & left\n+        vld1.8      {q0-q1}, [r1]\n+        mov         r1, #32\n+        vld1.8      {q2-q3}, [r2]\n+        add         r2, r0, r3\n+        vaddl.u8    q0, d0, d1\n+        lsl         r3, #1\n+        vaddl.u8    q1, d2, d3\n+        vaddl.u8    q2, d4, d5\n+        vaddl.u8    q3, d6, d7\n+        vadd.i16    q0, q1\n+        vadd.i16    q2, q3\n+        vadd.i16    q0, q2\n+        vadd.i16    d0, d1        @ d0 has 4 vals\n+        vpadd.i16   d0, d0        @ 2 (top & bottom the same)\n+        vpadd.i16   d4, d0, d0    @ 1 (all the same)\n+        vpadd.i16   d5, d0, d0\n+        vrshrn.u16  d0, q2, #6\n+        vrshrn.u16  d1, q2, #6\n+        vrshrn.u16  d2, q2, #6\n+        vrshrn.u16  d3, q2, #6\n+\n+        @ Store\n+1:\n+        vst1.8      {q0-q1}, [r0], r3\n+        subs        r1, #2\n+        vst1.8      {q0-q1}, [r2], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ -----------------------------------------------------------------------------\n+@\n+@ 10 Bit versions\n+@\n+@ There is no actual bit depth dependency in this code except that our\n+@ intermediate results will overflow the 16 bits they are stored in\n+@ All there functions are good to 10 bits - with the worst case being\n+@ in dc_32 where we use all 16 bits.\n+\n+\n+@ ff_hevc_rpi_pred_dc_4_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_dc_4_neon_10, export=1\n+\n+        @ Average the els of top & left\n+        vld1.16     {d0}, [r1]\n+        mov         r1, #2\n+        vld1.16     {d1}, [r2]\n+T       lsl         r3, #1\n+        vmov.i16    q2, #3\n+A       add         r2, r0, r3, lsl #1\n+T       add         r2, r0, r3\n+        vadd.u16    d2, d0, d1    @ d2[0] = top[0] + left[0]\n+A       lsl         r3, #2\n+T       lsl         r3, #1\n+        vmov.16     d4[0], r1     @ 2, 3, 3, 3...\n+        vmov.i64    d7, #0xffff\n+        vbit        d0, d2, d7    @ q0 = top[0]+left[0], top[1..3], left[0..3]\n+\n+        @ top line gets some smoothing\n+        @ (top[i] + 3*dc + 2) >> 2\n+        @ as does left\n+        @ top_line[0] is extra special\n+        @ (top[0] + left[0] + 2*dc + 2) >> 2\n+\n+        vpadd.i16   d6, d2, d2    @ 2 (top & bottom of vector the same)\n+        vpadd.i16   d6, d6        @ 1 (all the same)\n+        vrshr.u16   d6, #3\n+        vmla.i16    q0, q2, d6[0]\n+        vrshr.u16   q0, #2\n+\n+        @ Store top line\n+        vst1.16     {d0}, [r0], r3\n+\n+        @ Store the rest\n+        vshr.u64    d3, d1, #1*16\n+        vshr.u64    d4, d1, #2*16\n+        vshr.u64    d5, d1, #3*16\n+        vbif        d3, d6, d7\n+        vbif        d4, d6, d7\n+        vst1.16     {d3}, [r2], r3\n+        vbif        d5, d6, d7\n+        vst1.16     {d4}, [r0]\n+        vst1.16     {d5}, [r2]\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_dc_c_4_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]  (In pels - needs * 4)\n+\n+function ff_hevc_rpi_pred_dc_c_4_neon_10, export=1\n+\n+        @ Average the els of top & left\n+        vld1.8      {q0}, [r1]\n+        vld1.8      {q1}, [r2]\n+A       add         r2, r0, r3, lsl #2\n+A       lsl         r3, #3\n+T       lsl         r3, #2\n+T       add         r2, r0, r3\n+T       lsl         r3, #1\n+        vadd.i16    q0, q1\n+        vadd.i16    d0, d1       @ d0 has 2 val pairs\n+        vpadd.i32   d2, d0, d0   @ This adds U & V separately\n+        vpadd.i32   d3, d0, d0\n+        vrshr.u16   q0, q1, #3\n+\n+        vst1.16     {q0}, [r0], r3\n+        vst1.16     {q0}, [r2], r3\n+        vst1.16     {q0}, [r0]\n+        vst1.16     {q0}, [r2]\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_dc_8_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_dc_8_neon_10, export=1\n+\n+        @ Average the els of top & left\n+        vld1.16     {q0}, [r1]\n+        mov         r1, #2\n+        vld1.16     {q8}, [r2]\n+T       lsl         r3, #1\n+        vmov.i16    q2, #3\n+A       add         r2, r0, r3, lsl #1\n+T       add         r2, r0, r3\n+        vadd.i16    q1, q0, q8    @ q1[0] = top[0] + left[0]\n+A       lsl         r3, #2\n+T       lsl         r3, #1\n+        vmov.i64    d7, #0xffff\n+        vmov.16     d4[0], r1     @ 2, 3, 3, 3...\n+        vadd.i16    d6, d2, d3    @ d6 has 4 vals\n+        vbit        d0, d2, d7    @ q0 = top[0]+left[0], top[1..7]\n+\n+        @ top line gets some smoothing\n+        @ (top[i] + 3*dc + 2) >> 2\n+        @ as does left\n+        @ top_line[0] is extra special\n+        @ (top[0] + left[0] + 2*dc + 2) >> 2\n+\n+        vpadd.i16   d6, d6        @ 2 (top & bottom of vector the same)\n+        vpadd.i16   d6, d6        @ 1 (all the same)\n+        vrshr.u16   d6, #4\n+        vmla.i16    q8, q2, d6[0]\n+        vmla.i16    q0, q2, d6[0]\n+        vdup.16     q2, d6[0]\n+        vdup.16     q9, d6[0]\n+        vrshr.u16   q8, q8, #2\n+        vrshr.u16   q0, q0, #2\n+        vext.16     q1, q8, q8, #1\n+\n+        @ Store top line\n+        vst1.16     {q0}, [r0], r3\n+\n+        @ Store the rest\n+        vbit        d18, d2, d7\n+        vst1.16     {q9}, [r2], r3\n+        mov         r1, #6\n+1:\n+        vext.16     q8, q8, q8, #2\n+        subs        r1, #2\n+        vext.16     q1, q1, q1, #2\n+        vbit        d4, d16, d7\n+        vst1.16     {q2}, [r0], r3\n+        vbit        d18, d2, d7\n+        vst1.16     {q9}, [r2], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_dc_c_8_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]  (In pels - needs * 4)\n+\n+function ff_hevc_rpi_pred_dc_c_8_neon_10, export=1\n+\n+        @ Average the els of top & left\n+        vld1.16     {q0-q1}, [r1]\n+        mov         r1, #8\n+        vld1.16     {q2-q3}, [r2]\n+T       lsl         r3, #2\n+        vadd.i16    q1, q0\n+A       add         r2, r0, r3, lsl #2\n+A       lsl         r3, #3\n+T       add         r2, r0, r3\n+T       lsl         r3, #1\n+        vadd.i16    q2, q3\n+        vadd.i16    q1, q2\n+        vadd.i16    d3, d2        @ d3 has 2 val pairs\n+        vpadd.i32   d2, d3, d3    @ This add U & V separately\n+        vpadd.i32   d3, d3, d3\n+        vrshr.u16   q0, q1, #4\n+        vrshr.u16   q1, q1, #4\n+\n+        @ Store\n+1:\n+        vst1.8      {q0-q1}, [r0], r3\n+        subs        r1, #2\n+        vst1.8      {q0-q1}, [r2], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_dc_16_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_dc_16_neon_10, export=1\n+\n+        @ Average the els of top & left\n+        vld1.16     {q8-q9}, [r1]\n+        mov         r1, #2\n+        vld1.16     {q10-q11}, [r2]\n+        lsl         r3, #1        @ stride given in pels\n+        vadd.i16    q0, q8, q9\n+        vadd.i16    q1, q10, q11\n+        vmov.i16    q3, #3\n+        vadd.i16    q1, q0\n+        vadd.i16    d0, d16, d20\n+        vmov.i64    d31, #0xffff\n+        vadd.i16    d3, d2\n+        vmov.16     d6[0], r1     @ 2, 3, 3, 3...\n+\n+        @ top line gets some smoothing\n+        @ (top[i] + 3*dc + 2) >> 2\n+        @ as does left\n+        @ topline[0] is extra special\n+        @ (top[0] + left[0] + 2*dc + 2) >> 2\n+\n+        vbit        d16, d0, d31  @ q8 = top[0]+left[0], top[1..7]\n+        vpadd.i16   d3, d3        @ 2 (top & bottom of vector the same)\n+        vpadd.i16   d3, d3        @ 1 (all the same)\n+        vrshr.u16   d2, d3, #5\n+        vrshr.u16   d3, d3, #5\n+        vmov        q0, q1\n+        vmla.i16    q10, q1, d6[1]\n+        vmla.i16    q11, q1, d6[1]\n+        vmla.i16    q8, q1, q3\n+        vmla.i16    q9, q1, d6[1]\n+        vrshr.u16   q2, q10, #2\n+        vrshr.u16   q3, q11, #2\n+        vrshr.u16   q8, #2\n+        vrshr.u16   q9, #2\n+        vext.16     q2, q2, q2, #1\n+        mov         r1, #7<<29\n+\n+        @ Store top line\n+        vst1.16     {q8-q9}, [r0], r3\n+\n+        @ Store the rest\n+1:\n+        vbit        d0, d4, d31\n+        vext.16     q2, q2, q2, #1\n+        subs        r1, #1<<29\n+        vst1.16     {q0-q1}, [r0], r3\n+        bne         1b\n+1:\n+        vbit        d0, d6, d31\n+        vext.16     q3, q3, q3, #1\n+        subs        r1, #1<<29\n+        vst1.16     {q0-q1}, [r0], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_dc_c_16_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]  (In pels - needs * 4)\n+\n+function ff_hevc_rpi_pred_dc_c_16_neon_10, export=1\n+\n+        @ Average the els of top & left\n+        vldm        r1, {q0-q3}\n+        vldm        r2, {q8-q11}\n+        vadd.i16    q0, q1\n+        mov         r1, #16\n+        vadd.i16    q2, q3\n+        add         r2, r0, #32\n+        vadd.i16    q8, q9\n+        lsl         r3, #2\n+        vadd.i16    q10, q11\n+        vadd.u16    q0, q2\n+        vadd.u16    q8, q10\n+        vadd.i16    q0, q8\n+        vadd.i16    d0, d1        @ d0 has 2 val pairs\n+        vpadd.i32   d4, d0, d0    @ This adds U & V separately\n+        vpadd.i32   d5, d0, d0\n+        vrshr.u16   q0, q2, #5\n+        vrshr.u16   q1, q2, #5\n+\n+        @ Store\n+1:\n+        vst1.16     {q0-q1}, [r0], r3\n+        subs        r1, #1\n+        vst1.16     {q0-q1}, [r2], r3\n+        bne         1b\n+\n+        bx           lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_dc_32_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]  (In pels)\n+\n+function ff_hevc_rpi_pred_dc_32_neon_10, export=1\n+\n+        @ Average the els of top & left\n+        @ With 10 bits we are (just) safe from overflow in i16\n+        vldm        r1, {q0-q3}\n+        vldm        r2, {q8-q11}\n+        vadd.i16    q0, q1\n+        mov         r1, #32\n+        vadd.i16    q2, q3\n+        add         r2, r0, #32\n+        vadd.i16    q8, q9\n+        lsl         r3, #1\n+        vadd.i16    q10, q11\n+        vadd.u16    q0, q2\n+        vadd.u16    q8, q10\n+        vadd.i16    q0, q8\n+        vadd.i16    d0, d1        @ d0 has 4 vals\n+        vpadd.i16   d0, d0        @ 2 (top & bottom the same)\n+        vpadd.i16   d4, d0, d0    @ 1 (all the same)\n+        vpadd.i16   d5, d0, d0\n+        vrshr.u16   q0, q2, #6\n+        vrshr.u16   q1, q2, #6\n+\n+        @ Store\n+1:\n+        vst1.16     {q0-q1}, [r0], r3\n+        subs        r1, #1\n+        vst1.16     {q0-q1}, [r2], r3\n+        bne         1b\n+\n+        bx           lr\n+endfunc\n+\n+\ndiff --git a/libavcodec/arm/rpi_hevcpred_intra_filter_neon.S b/libavcodec/arm/rpi_hevcpred_intra_filter_neon.S\nnew file mode 100644\nindex 0000000000..f6969d3591\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcpred_intra_filter_neon.S\n@@ -0,0 +1,881 @@\n+/*\n+Copyright (c) 2018 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox, Ben Avison\n+*/\n+\n+#include \"libavutil/arm/asm.S\"\n+#include \"neon.S\"\n+\n+@ All functions have the call\n+@\n+@ int ff_hevc_rpi_intra_filter_N_neon_PW(\n+@    pixel * const left,                   [r0]\n+@    pixel * const top,                    [r1]\n+@    const unsigned int req,               [r2]\n+@    const unsigned int avail,             [r3]\n+@    const pixel * const src_l,            [sp, #0]\n+@    const pixel * const src_u,            [sp, #4]\n+@    const pixel * const src_ur,           [sp, #8]\n+@    const unsigned int stride,            [sp, #12] (pels)\n+@    const unsigned int top_right_size,    [sp, #16]\n+@    const unsigned int down_left_size)    [sp, #20]\n+@\n+@ Assumptions:\n+@ (that wouldn't apply to all frame layoouts but do apply to sand, so beware\n+@  if reuseing this code)\n+@\n+@ Min ctb size is 8 so we don't need to worry about tr_size or dl_size for\n+@ N==4, but do for chroma N>=8.  As we share Y/C fns that means we can ignore\n+@ N==8,PW=8 (chroma always PW>8) but have to cope for larger\n+@\n+@ We always have at least 64 pixel H frame width rounding - this lets us\n+@ load UR widthout having to worry about exactly how many pixels are actually\n+@ within the frame.  As partial loads will only occur very occasionally this\n+@ should be a win in nearly all cases.\n+@\n+@ 16 bit fns can be used as 8 bit chroma fns as chroma never filters\n+@ so we do no maths on the contents\n+@\n+@ No filtering in 32bit fns as they are chroma only\n+\n+\n+.equ    AVAIL_UR, 1\n+.equ    AVAIL_U,  2\n+.equ    AVAIL_UL, 4\n+.equ    AVAIL_L,  8\n+.equ    AVAIL_DL, 16\n+\n+.equ    FILTER_LIGHT, 0x40\n+.equ    FILTER_STRONG, 0x80\n+\n+.equ    AVAIL_S_UR_N_U_C, 32 - 1\n+.equ    AVAIL_S_U_N_UL_C, 32 - 2\n+.equ    AVAIL_S_UL_N_L_C, 32 - 3\n+.equ    AVAIL_S_L_N_DL_C, 32 - 4\n+\n+.equ    AVAIL_S_U_DL_CPSR, 31 - 4  @ Shift for u..dl to go into flags via cpsr\n+\n+@ On entry\n+@  r2   req\n+@  r3   avail\n+@ [sp, #sp_offset...]  args\n+@\n+@ On Exit:\n+@\n+@ Extend values:\n+@  d_l  scalar contains value for L & DL\n+@       if DL avail then this is is DL[0] so we don't need to load that\n+@  d_ul scalar containing value for UL\n+@  d_u  scalar containing value for U\n+@  d_ur scalar containing value for UR\n+@ If DL avail then d_l == b_dl elif L avail then d_l == a_l else...\n+@ This means that L-light-filter works even if nreq DL (we never filter\n+@ req-DL without req-L, but we do filter req-L without req-DL)\n+@ If UR avail then d_ur == a_ur so U-filter good too\n+@\n+@ Data load pointers (only load if req & avail):\n+@  r4   DL + stride\n+@  r10  L\n+@  r6   U\n+@  r5   UR\n+@\n+@ Others:\n+@  r2   req\n+@  r7   req & avail\n+@  r3   L + stride\n+@  r8   DL + stride * 2\n+@  r9   stride * 2\n+@  cs   Load U\n+@  mi   Load UR\n+@\n+@ Clobbered:\n+@  r12\n+\n+.macro  load_pointers pw_s, log2_s, sp_offset, d_type, d_l, d_ul, d_u, d_ur\n+\n+.equ    src_l\\@,   \\sp_offset + 0\n+.equ    src_u\\@,   \\sp_offset + 4\n+.equ    src_ur\\@,  \\sp_offset + 8\n+.equ    stride\\@,  \\sp_offset + 12\n+.equ    pw\\@,      (1 << \\pw_s)                 @ pel width in bytes\n+.equ    b_size\\@,  (1 << (\\pw_s + \\log2_s))     @ size in bytes\n+\n+@ r9    stride\n+@                       r7 = ab_ul, r6 = a_u, r5 = a_ur\n+@ r4 = b_dl, r10 = b_l,             r8 = b_u\n+\n+        ldr        r5,  [sp, #src_ur\\@]\n+        lsl        r12, r3,  #AVAIL_S_U_DL_CPSR\n+        ldr        r10, [sp, #src_l\\@]\n+        ldr        r9,  [sp, #stride\\@]\n+        ldr        r6,  [sp, #src_u\\@]\n+\n+        @ This is quite a slow instruction but it replaces\n+        @ a decent number of tests that yield a max of 2 flags/op\n+        @ It is annoying we can't branch on Q!\n+        @ If L navail (ne) then DL must be navail (pl)\n+        msr        APSR_nzcvq, r12      @ n=dl, z=l, c=ul, v=u, q=ur\n+\n+        mov        r4,  r5\n+        sub        r7,  r10, r9\n+        it vs\n+        movvs      r4,  r6\n+        add        r8,  r6,  #b_size\\@ - pw\\@\n+        it cs\n+        movcs      r4,  r7\n+        ite ne\n+        movne      r10, r4\n+        addeq      r4,  r7,  r9,  lsl #\\log2_s\n+        it cc\n+        movcc      r7,  r10\n+        it mi\n+        addmi      r4,  r10, r9,  lsl #\\log2_s\n+        vld1.\\d_type {\\d_ul}, [r7]\n+        itt vc\n+        movvc      r8,  r7\n+        movvc      r6,  r7\n+        vld1.\\d_type {\\d_l }, [r4], r9\n+        tst        r3,  #AVAIL_UR\n+        vld1.\\d_type {\\d_u }, [r6]\n+        it eq\n+        moveq      r5,  r8\n+        and        r7,  r2,  r3\n+        add        r8,  r4,  r9\n+        vld1.\\d_type {\\d_ur}, [r5]\n+        lsls       r12, r7,  #AVAIL_S_UR_N_U_C\n+        add        r3,  r10, r9\n+        lsl        r9,  #1\n+.endm\n+\n+\n+\n+@ int ff_hevc_rpi_intra_filter_4_neon_8(\n+@    pixel * const left,                   [r0]\n+@    pixel * const top,                    [r1]\n+@    const unsigned int req,               [r2]\n+@    const unsigned int avail,             [r3]\n+@    const pixel * const src_l,            [sp, #0]\n+@    const pixel * const src_u,            [sp, #4]\n+@    const pixel * const src_ur,           [sp, #8]\n+@    const unsigned int stride,            [sp, #12] (pels)\n+@    const unsigned int top_right_size,    [sp, #16]\n+@    const unsigned int down_left_size)    [sp, #20]\n+\n+.set    sp_base, 8*4\n+.set    pw_s,    0\n+.set    pw,      (1 << pw_s)\n+.set    log2_s,  2\n+\n+function ff_hevc_rpi_intra_filter_4_neon_8, export=1\n+        push       {r4-r10, lr}\n+        load_pointers pw_s, log2_s, sp_base, 8, d0[], d31[7], d1[], d2[]\n+\n+        it cs\n+        vldrcs     s2,  [r6]\n+        ite pl\n+        vmovpl     s3,  s4\n+        vldrmi     s3,  [r5]\n+\n+        lsls       r7,  #AVAIL_S_L_N_DL_C\n+        add        r12, r0,  #-pw\n+        bpl        1f\n+\n+        vld1.8    {d0[0]}, [r10], r9\n+        vld1.8    {d0[1]}, [r3],  r9\n+        vld1.8    {d0[2]}, [r10]\n+        vld1.8    {d0[3]}, [r3]\n+1:\n+        bcc        1f\n+        vld1.8    {d0[5]}, [r4],  r9\n+        vld1.8    {d0[6]}, [r8]\n+        vld1.8    {d0[7]}, [r4]\n+1:\n+        vstr       d1,  [r1]            @ Up\n+        vst1.8    {d31[7]}, [r12]\n+        vstr       d0,  [r0]            @ Left\n+        pop       {r4-r10, pc}\n+endfunc\n+\n+\n+@ int ff_hevc_rpi_intra_filter_4_neon_16(\n+@    pixel * const left,                   [r0]\n+@    pixel * const top,                    [r1]\n+@    const unsigned int req,               [r2]\n+@    const unsigned int avail,             [r3]\n+@    const pixel * const src_l,            [sp, #0]\n+@    const pixel * const src_u,            [sp, #4]\n+@    const pixel * const src_ur,           [sp, #8]\n+@    const unsigned int stride,            [sp, #12] (pels)\n+@    const unsigned int top_right_size,    [sp, #16]\n+@    const unsigned int down_left_size)    [sp, #20]\n+\n+.set    sp_base, 8*4\n+.set    pw_s,    1\n+.set    pw,      (1 << pw_s)\n+.set    log2_s,  2\n+\n+function ff_hevc_rpi_intra_filter_4_neon_16, export=1\n+        push       {r4-r10, lr}\n+        load_pointers pw_s, log2_s, sp_base, 16, \"d0[],d1[]\", d31[3], d2[], d3[]\n+\n+        it cs\n+        vldrcs     d2,  [r6]\n+        it mi\n+        vldrmi     d3,  [r5]\n+        lsls       r7,  #AVAIL_S_L_N_DL_C\n+        add        r12, r0, #-pw\n+        bpl        1f\n+        vld1.16   {d0[0]}, [r10], r9\n+        vld1.16   {d0[1]}, [r3],  r9\n+        vld1.16   {d0[2]}, [r10]\n+        vld1.16   {d0[3]}, [r3]\n+1:\n+        bcc        1f\n+        vld1.16   {d1[1]}, [r4],  r9\n+        vld1.16   {d1[2]}, [r8]\n+        vld1.16   {d1[3]}, [r4]\n+1:\n+        vst1.16   {q1}, [r1]           @ Up\n+        vst1.16   {d31[3]}, [r12]\n+        vst1.16   {q0}, [r0]           @ Left\n+        pop       {r4-r10, pc}\n+endfunc\n+\n+\n+@ int ff_hevc_rpi_intra_filter_8_neon_8(\n+@    pixel * const left,                   [r0]\n+@    pixel * const top,                    [r1]\n+@    const unsigned int req,               [r2]\n+@    const unsigned int avail,             [r3]\n+@    const pixel * const src_l,            [sp, #0]\n+@    const pixel * const src_u,            [sp, #4]\n+@    const pixel * const src_ur,           [sp, #8]\n+@    const unsigned int stride,            [sp, #12] (pels)\n+@    const unsigned int top_right_size,    [sp, #16]\n+@    const unsigned int down_left_size)    [sp, #20]\n+\n+.set    sp_base, 8*4\n+.set    pw_s,    0\n+.set    pw,      (1 << pw_s)\n+.set    log2_s,  3\n+\n+function ff_hevc_rpi_intra_filter_8_neon_8, export=1\n+        push      {r4-r10, lr}\n+        load_pointers pw_s, log2_s, sp_base, 8, \"d0[],d1[]\", d31[7], d4[], d5[]\n+\n+        it cs\n+        vldrcs     d4,  [r6]\n+        it mi\n+        vldrmi     d5,  [r5]\n+\n+        lsls       r7,  #AVAIL_S_L_N_DL_C\n+        bpl        1f\n+        vld1.8    {d0[0]}, [r10], r9\n+        vld1.8    {d0[1]}, [r3],  r9\n+        vld1.8    {d0[2]}, [r10], r9\n+        vld1.8    {d0[3]}, [r3],  r9\n+        vld1.8    {d0[4]}, [r10], r9\n+        vld1.8    {d0[5]}, [r3],  r9\n+        vld1.8    {d0[6]}, [r10]\n+        vld1.8    {d0[7]}, [r3]\n+1:\n+        bcc        1f\n+        vld1.8    {d1[1]}, [r4],  r9\n+        vld1.8    {d1[2]}, [r8],  r9\n+        vld1.8    {d1[3]}, [r4],  r9\n+        vld1.8    {d1[4]}, [r8],  r9\n+        vld1.8    {d1[5]}, [r4],  r9\n+        vld1.8    {d1[6]}, [r8]\n+        vld1.8    {d1[7]}, [r4]\n+1:\n+        tst        r2,  #FILTER_LIGHT\n+        add        r12, r0,  #-pw\n+        beq        10f\n+\n+        @ Luma light filter\n+        vext.8     q8,  q15, q2,  #15\n+        vext.8     q12, q15, q0,  #15\n+        vaddl.u8   q9,  d17, d5\n+        vaddl.u8   q8,  d16, d4\n+        vaddl.u8   q13, d25, d1\n+        vaddl.u8   q12, d24, d0\n+        vmov.u8    r3,  d5[7]           @ Save final pel\n+        vmov.u8    r2,  d1[7]           @ Save final pel\n+\n+        vext.16    q2,  q8,  q9,  #1\n+        vext.16    q3,  q9,  q9,  #1\n+        vext.16    q0,  q12, q13, #1\n+        vext.16    q1,  q13, q13, #1\n+        vadd.u16   d30, d16, d24        @ d30[0] = l[0] + 2ul + u[0]\n+        vadd.u16   q2,  q8\n+        vadd.u16   q3,  q9\n+        vadd.u16   q0,  q12\n+        vadd.u16   q1,  q13\n+\n+        vrshrn.u16 d4,  q2,  #2\n+        vrshrn.u16 d5,  q3,  #2\n+        vrshrn.u16 d0,  q0,  #2\n+        vrshrn.u16 d1,  q1,  #2\n+        vrshr.u16  d30, #2\n+        vmov.u8    d5[7], r3            @ Restore final pel\n+        vmov.u8    d1[7], r2            @ Restore final pel\n+        vdup.u8    d31, d30[0]          @ d31[3] = d30[0]\n+\n+10:\n+        vst1.8    {q2 }, [r1]           @ Up\n+        vst1.8    {d31[7]}, [r12]       @ Up-left\n+        vst1.8    {q0 }, [r0]           @ Left\n+        pop       {r4-r10, pc}\n+endfunc\n+\n+\n+@ int ff_hevc_rpi_intra_filter_8_neon_16(\n+@    pixel * const left,                   [r0]\n+@    pixel * const top,                    [r1]\n+@    const unsigned int req,               [r2]\n+@    const unsigned int avail,             [r3]\n+@    const pixel * const src_l,            [sp, #0]\n+@    const pixel * const src_u,            [sp, #4]\n+@    const pixel * const src_ur,           [sp, #8]\n+@    const unsigned int stride,            [sp, #12] (pels)\n+@    const unsigned int top_right_size,    [sp, #16]\n+@    const unsigned int down_left_size)    [sp, #20]\n+\n+.set    sp_base, 8*4\n+.set    ur_size, sp_base + 16\n+.set    dl_size, sp_base + 20\n+.set    pw_s,    1\n+.set    pw,      (1 << pw_s)\n+.set    log2_s,  3\n+.set    p_size,  (1 << log2_s)          @ size in pels\n+\n+function ff_hevc_rpi_intra_filter_8_neon_16, export=1\n+        push      {r4-r10, lr}\n+        load_pointers pw_s, log2_s, sp_base, 16, \"d0[],d1[]\", d31[3], \"d4[],d5[]\", \"d6[],d7[]\"\n+\n+        it cs\n+        vldmcs     r6,  {d4, d5}\n+        ldr        r12, [sp, #ur_size]\n+        bpl        1f\n+        cmp        r12, #4\n+        vldm       r5,  {d6, d7}\n+        bgt        1f\n+        vdup.16    d7,  d6[3]\n+1:\n+        lsls       r12, r7,  #AVAIL_S_L_N_DL_C\n+        vdup.16    q1,  d0[0]\n+        bpl        1f\n+        vld1.16   {d0[0]}, [r10], r9\n+        vld1.16   {d0[1]}, [r3],  r9\n+        vld1.16   {d0[2]}, [r10], r9\n+        vld1.16   {d0[3]}, [r3],  r9\n+        vld1.16   {d1[0]}, [r10], r9\n+        vld1.16   {d1[1]}, [r3],  r9\n+        vld1.16   {d1[2]}, [r10]\n+        vld1.16   {d1[3]}, [r3]\n+1:\n+        bcc        1f\n+        ldr        r12, [sp, #dl_size]\n+        vld1.16   {d2[1]}, [r4],  r9\n+        cmp        r12, #p_size\n+        vld1.16   {d2[2]}, [r8],  r9\n+        vld1.16   {d2[3]}, [r4],  r9\n+        blt        2f\n+        vld1.16   {d3[0]}, [r8],  r9\n+        vld1.16   {d3[1]}, [r4],  r9\n+        vld1.16   {d3[2]}, [r8]\n+        vld1.16   {d3[3]}, [r4]\n+        b          1f\n+2:\n+        vdup.16    d3,  d2[3]\n+1:\n+        tst        r2,  #FILTER_LIGHT\n+        add        r12, r0,  #-pw\n+        beq        10f\n+\n+        @ Luma light filter\n+        vext.16    q9,  q2,  q3,  #7\n+        vext.16    q8,  q15, q2,  #7\n+        vext.16    q13, q0,  q1,  #7\n+        vext.16    q12, q15, q0,  #7\n+        vadd.u16   q9,  q3\n+        vadd.u16   q8,  q2\n+        vadd.u16   q13, q1\n+        vadd.u16   q12, q0\n+        vmov.u16   r3,  d7[3]           @ Save final pel\n+        vmov.u16   r2,  d3[3]           @ Save final pel\n+\n+        vext.16    q2,  q8,  q9,  #1\n+        vext.16    q3,  q9,  q9,  #1\n+        vext.16    q0,  q12, q13, #1\n+        vext.16    q1,  q13, q13, #1\n+        vadd.u16   d30, d16, d24        @ d30[0] = l[0] + 2ul + u[0]\n+        vadd.u16   q2,  q8\n+        vadd.u16   q3,  q9\n+        vadd.u16   q0,  q12\n+        vadd.u16   q1,  q13\n+\n+        vrshr.u16  q2,  #2\n+        vrshr.u16  q3,  #2\n+        vrshr.u16  q0,  #2\n+        vrshr.u16  q1,  #2\n+        vrshr.u16  d30, #2\n+        vmov.u16   d7[3], r3            @ Restore final pel\n+        vmov.u16   d3[3], r2            @ Restore final pel\n+        vdup.u16   d31, d30[0]          @ d31[3] = d30[0]\n+\n+10:\n+        vst1.16   {q2,  q3}, [r1]       @ Up\n+        vst1.16   {d31[3]}, [r12]       @ Up-left\n+        vst1.16   {q0,  q1}, [r0]       @ Left\n+        pop       {r4-r10, pc}\n+endfunc\n+\n+@ int ff_hevc_rpi_intra_filter_16_neon_16(\n+@    pixel * const left,                   [r0]\n+@    pixel * const top,                    [r1]\n+@    const unsigned int req,               [r2]\n+@    const unsigned int avail,             [r3]\n+@    const pixel * const src_l,            [sp, #0]\n+@    const pixel * const src_u,            [sp, #4]\n+@    const pixel * const src_ur,           [sp, #8]\n+@    const unsigned int stride,            [sp, #12] (pels)\n+@    const unsigned int top_right_size,    [sp, #16]\n+@    const unsigned int down_left_size)    [sp, #20]\n+\n+.set    sp_base, 8*4\n+.set    ur_size, sp_base + 16\n+.set    dl_size, sp_base + 20\n+.set    pw_s,    1\n+.set    pw,      (1 << pw_s)\n+.set    log2_s,  4\n+.set    p_size,  (1 << log2_s)          @ size in pels\n+\n+function ff_hevc_rpi_intra_filter_16_neon_16, export=1\n+        push      {r4-r10, lr}\n+        load_pointers pw_s, log2_s, sp_base, 16, \"d0[],d1[]\", d31[3], \"d16[],d17[]\", \"d20[],d21[]\"\n+\n+        vdup.16    q9,  d16[0]\n+        vdup.16    q11, d20[0]\n+\n+        it cs\n+        vldmcs     r6,  {d16-d19}\n+        ldr        r12, [sp, #ur_size]\n+        bpl        1f\n+        cmp        r12, #12\n+        @ Given chroma frame layout, if UR exists then it is always legit to\n+        @ load all of it even if most of it is outside the frame.\n+        vldm       r5,  {d20-d23}\n+        bgt        1f\n+        bge        4f\n+        cmp        r12,  #8\n+        bge        3f\n+        vdup.16    d21, d20[3]\n+3:      vdup.16    d22, d21[3]\n+4:      vdup.16    d23, d22[3]\n+\n+1:\n+        lsls       r7,  #AVAIL_S_L_N_DL_C\n+        ldr        r12, [sp, #dl_size]\n+        vdup.16    q1,  d0[0]\n+        vdup.16    q2,  d0[0]\n+        vdup.16    q3,  d0[0]\n+        bpl        1f\n+        vld1.16   {d0[0]}, [r10], r9\n+        vld1.16   {d0[1]}, [r3],  r9\n+        vld1.16   {d0[2]}, [r10], r9\n+        vld1.16   {d0[3]}, [r3],  r9\n+        vld1.16   {d1[0]}, [r10], r9\n+        vld1.16   {d1[1]}, [r3],  r9\n+        vld1.16   {d1[2]}, [r10], r9\n+        vld1.16   {d1[3]}, [r3],  r9\n+        vld1.16   {d2[0]}, [r10], r9\n+        vld1.16   {d2[1]}, [r3],  r9\n+        vld1.16   {d2[2]}, [r10], r9\n+        vld1.16   {d2[3]}, [r3],  r9\n+        vld1.16   {d3[0]}, [r10], r9\n+        vld1.16   {d3[1]}, [r3],  r9\n+        vld1.16   {d3[2]}, [r10]\n+        vld1.16   {d3[3]}, [r3]\n+1:\n+        bcc        1f\n+        vld1.16   {d4[1]}, [r4],  r9\n+        cmp        r12, #4\n+        vld1.16   {d4[2]}, [r8],  r9\n+        vld1.16   {d4[3]}, [r4],  r9\n+        ble        2f\n+        vld1.16   {d5[0]}, [r8],  r9\n+        vld1.16   {d5[1]}, [r4],  r9\n+        cmp        r12, #12\n+        vld1.16   {d5[2]}, [r8],  r9\n+        vld1.16   {d5[3]}, [r4],  r9\n+        blt        3f\n+        vld1.16   {d6[0]}, [r8],  r9\n+        vld1.16   {d6[1]}, [r4],  r9\n+        vld1.16   {d6[2]}, [r8],  r9\n+        vld1.16   {d6[3]}, [r4],  r9\n+        ble        4f\n+        vld1.16   {d7[0]}, [r8],  r9\n+        vld1.16   {d7[1]}, [r4],  r9\n+        vld1.16   {d7[2]}, [r8]\n+        vld1.16   {d7[3]}, [r4]\n+        b          1f\n+2:      vdup.16    d5,  d4[3]\n+3:      vdup.16    d6,  d5[3]\n+4:      vdup.16    d7,  d6[3]\n+1:\n+        tst        r2,  #FILTER_LIGHT\n+        add        r12, r0,  #-pw\n+        beq        10f\n+\n+        vpush     {q5}\n+        @ Luma light filter\n+        @ Left\n+        vext.16    q5,  q2,  q3,  #7\n+        vext.16    q14, q1,  q2,  #7\n+        vext.16    q13, q0,  q1,  #7\n+        vext.16    q12, q15, q0,  #7\n+\n+        vadd.u16   q5,  q3\n+        vadd.u16   q14, q2\n+        vadd.u16   q13, q1\n+        vadd.u16   q12, q0\n+        vmov.u16   r2,  d7[3]           @ Save final pel\n+\n+        vext.16    q0,  q12, q13, #1\n+        vext.16    q1,  q13, q14, #1\n+        vext.16    q2,  q14, q5,  #1\n+        vext.16    q3,  q5,  q5,  #1\n+\n+        vmov       d30, d24             @ d30[0] = l[0] + ul\n+        vadd.u16   q0,  q12\n+        vadd.u16   q1,  q13\n+        vadd.u16   q2,  q14\n+        vadd.u16   q3,  q5\n+\n+        vrshr.u16  q0,  #2\n+        vrshr.u16  q1,  #2\n+        vrshr.u16  q2,  #2\n+        vrshr.u16  q3,  #2\n+\n+        @ Up\n+        vext.16    q5,  q10, q11, #7\n+        vext.16    q14, q9,  q10, #7\n+        vext.16    q13, q8,  q9,  #7\n+        vext.16    q12, q15, q8,  #7\n+\n+        vadd.u16   q5,  q11\n+        vadd.u16   q14, q10\n+        vadd.u16   q13, q9\n+        vadd.u16   q12, q8\n+        vmov.u16   r3,  d23[3]          @ Save final pel\n+\n+        vext.16    q8,  q12, q13, #1\n+        vext.16    q9,  q13, q14, #1\n+        vext.16    q10, q14, q5,  #1\n+        vext.16    q11, q5,  q5,  #1\n+\n+        vadd.u16   d30, d24             @ d30[0] = l[0] + 2ul + u[0]\n+        vadd.u16   q8,  q12\n+        vadd.u16   q9,  q13\n+        vadd.u16   q10, q14\n+        vadd.u16   q11, q5\n+\n+        vrshr.u16  q8,  #2\n+        vrshr.u16  q9,  #2\n+        vrshr.u16  q10, #2\n+        vrshr.u16  q11, #2\n+\n+        @ Misc\n+        vrshr.u16  d30, #2\n+        vmov.u16   d7[3], r2            @ Restore final pel\n+        vmov.u16   d23[3], r3           @ Restore final pel\n+        vdup.u16   d31, d30[0]          @ d31[3] = d30[0]\n+        vpop      {q5}\n+\n+10:\n+        vstm       r1, {d16-d23}        @ Up\n+        vst1.16   {d31[3]}, [r12]       @ Up-left\n+        vstm       r0, { d0-d7 }        @ Left\n+        pop       {r4-r10, pc}\n+endfunc\n+\n+@ int ff_hevc_rpi_intra_filter_4_neon_32(\n+@    pixel * const left,                   [r0]\n+@    pixel * const top,                    [r1]\n+@    const unsigned int req,               [r2]\n+@    const unsigned int avail,             [r3]\n+@    const pixel * const src_l,            [sp, #0]\n+@    const pixel * const src_u,            [sp, #4]\n+@    const pixel * const src_ur,           [sp, #8]\n+@    const unsigned int stride,            [sp, #12] (pels)\n+@    const unsigned int top_right_size,    [sp, #16]\n+@    const unsigned int down_left_size)    [sp, #20]\n+\n+.set    sp_base, 8*4\n+.set    pw_s,    2\n+.set    pw,      (1 << pw_s)\n+.set    log2_s,  2\n+\n+function ff_hevc_rpi_intra_filter_4_neon_32, export=1\n+        push       {r4-r10, lr}\n+        load_pointers pw_s, log2_s, sp_base, 32, \"d0[],d1[]\", d31[1], \"d4[],d5[]\", \"d6[],d7[]\"\n+\n+        it cs\n+        vldmcs     r6,  {d4, d5}\n+        it mi\n+        vldmmi     r5,  {d6, d7}\n+        lsls       r7,  #AVAIL_S_L_N_DL_C\n+        vdup.32    q1,  d0[0]\n+        add        r12, r0,  #-pw\n+        bpl        1f\n+        vld1.32   {d0[0]}, [r10], r9\n+        vld1.32   {d0[1]}, [r3],  r9\n+        vld1.32   {d1[0]}, [r10]\n+        vld1.32   {d1[1]}, [r3]\n+1:\n+        bcc        1f\n+        vld1.32   {d2[1]}, [r4],  r9\n+        vld1.32   {d3[0]}, [r8]\n+        vld1.32   {d3[1]}, [r4]\n+1:\n+        vst1.32    {q2,  q3 }, [r1]     @ Up\n+        vst1.32    {d31[1]}, [r12]\n+        vst1.32    {q0,  q1 }, [r0]     @ Left\n+        pop        {r4-r10, pc}\n+endfunc\n+\n+\n+@ int ff_hevc_rpi_intra_filter_8_neon_32(\n+@    pixel * const left,                   [r0]\n+@    pixel * const top,                    [r1]\n+@    const unsigned int req,               [r2]\n+@    const unsigned int avail,             [r3]\n+@    const pixel * const src_l,            [sp, #0]\n+@    const pixel * const src_u,            [sp, #4]\n+@    const pixel * const src_ur,           [sp, #8]\n+@    const unsigned int stride,            [sp, #12] (pels)\n+@    const unsigned int top_right_size,    [sp, #16]\n+@    const unsigned int down_left_size)    [sp, #20]\n+\n+.set    sp_base, 8*4\n+.set    ur_size, sp_base + 16\n+.set    dl_size, sp_base + 20\n+.set    pw_s,    2\n+.set    pw,      (1 << pw_s)\n+.set    log2_s,  3\n+.set    p_size,  (1 << log2_s)          @ size in pels\n+\n+function ff_hevc_rpi_intra_filter_8_neon_32, export=1\n+        push       {r4-r10, lr}\n+        load_pointers pw_s, log2_s, sp_base, 32, \"d0[],d1[]\", d31[1], \"d16[],d17[]\", \"d20[],d21[]\"\n+\n+        vdup.32    q9,  d16[0]\n+        vdup.32    q11, d20[0]\n+\n+        it cs\n+        vldmcs     r6,  {q8,  q9 }\n+        ldr        r12, [sp, #ur_size]\n+        bpl        1f\n+        cmp        r12, #p_size\n+        vldm       r5,  {q10, q11}\n+        bge        1f\n+        vdup.32    q11, d21[1]\n+1:\n+        lsls       r7,  #AVAIL_S_L_N_DL_C\n+        vdup.32    q1,  d0[0]\n+        vdup.32    q2,  d0[0]\n+        vdup.32    q3,  d0[0]\n+        bpl        1f\n+        vld1.32   {d0[0]}, [r10], r9\n+        vld1.32   {d0[1]}, [r3],  r9\n+        vld1.32   {d1[0]}, [r10], r9\n+        vld1.32   {d1[1]}, [r3],  r9\n+        vld1.32   {d2[0]}, [r10], r9\n+        vld1.32   {d2[1]}, [r3],  r9\n+        vld1.32   {d3[0]}, [r10]\n+        vld1.32   {d3[1]}, [r3]\n+1:\n+        bcc        1f\n+        ldr        r12, [sp, #dl_size]\n+        vld1.32   {d4[1]}, [r4],  r9\n+        cmp        r12, #p_size\n+        vld1.32   {d5[0]}, [r8],  r9\n+        vld1.32   {d5[1]}, [r4],  r9\n+        blt        2f\n+        vld1.32   {d6[0]}, [r8],  r9\n+        vld1.32   {d6[1]}, [r4],  r9\n+        vld1.32   {d7[0]}, [r8]\n+        vld1.32   {d7[1]}, [r4]\n+        b          1f\n+2:\n+        vdup.32    q3,  d5[1]\n+1:\n+        add        r12, r0,  #-pw\n+        vstm       r1,  { q8-q11}       @ Up\n+        vst1.32   {d31[1]}, [r12]\n+        vstm       r0,  { q0-q3 }       @ Left\n+        pop       {r4-r10, pc}\n+endfunc\n+\n+\n+@ int ff_hevc_rpi_intra_filter_16_neon_32(\n+@    pixel * const left,                   [r0]\n+@    pixel * const top,                    [r1]\n+@    const unsigned int req,               [r2]\n+@    const unsigned int avail,             [r3]\n+@    const pixel * const src_l,            [sp, #0]\n+@    const pixel * const src_u,            [sp, #4]\n+@    const pixel * const src_ur,           [sp, #8]\n+@    const unsigned int stride,            [sp, #12] (pels)\n+@    const unsigned int top_right_size,    [sp, #16]\n+@    const unsigned int down_left_size)    [sp, #20]\n+\n+.set    sp_base, 8*4\n+.set    ur_size, sp_base + 16\n+.set    dl_size, sp_base + 20\n+.set    pw_s,    2\n+.set    pw,      (1 << pw_s)\n+.set    log2_s,  4\n+.set    p_size,  (1 << log2_s)          @ size in pels\n+\n+function ff_hevc_rpi_intra_filter_16_neon_32, export=1\n+        push       {r4-r10, lr}\n+        load_pointers pw_s, log2_s, sp_base, 32, d30[0], d30[1], d31[0], d31[1]\n+\n+        @ Once we get this big we have run out of neon regs to store\n+        @ everything at once so do in pieces\n+\n+        @ Up (have)\n+        it cs\n+        vldmcs     r6,  { q0-q3 }\n+        ldr        r12, [sp, #ur_size]\n+        it mi\n+        vldmmi     r5,  { q8-q11}\n+        it cs\n+        vstmcs     r1,  { q0-q3 }\n+        bpl        1f\n+        cmp        r12, #12\n+        add        lr,  r1,  #(pw << log2_s)\n+        bgt        2f\n+        cmp        r12, #8\n+        bge        3f\n+        vdup.16    q9,  d17[1]\n+4:      vdup.16    d10, d19[1]\n+3:      vdup.16    q11, d21[1]\n+2:      vstm       lr, { q8-q11}\n+1:\n+\n+        @ Left (have)\n+        add        lr,  r0,  #-pw\n+        lsls       r12, r7,  #AVAIL_S_L_N_DL_C\n+        vst1.32   {d30[1]}, [lr]        @ UL\n+        bpl        1f\n+        vld1.32   { d0[0]}, [r10], r9\n+        vld1.32   { d0[1]}, [r3],  r9\n+        vld1.32   { d1[0]}, [r10], r9\n+        vld1.32   { d1[1]}, [r3],  r9\n+        vld1.32   { d2[0]}, [r10], r9\n+        vld1.32   { d2[1]}, [r3],  r9\n+        vld1.32   { d3[0]}, [r10], r9\n+        vld1.32   { d3[1]}, [r3],  r9\n+        vld1.32   { d4[0]}, [r10], r9\n+        vld1.32   { d4[1]}, [r3],  r9\n+        vld1.32   { d5[0]}, [r10], r9\n+        vld1.32   { d5[1]}, [r3],  r9\n+        vld1.32   { d6[0]}, [r10], r9\n+        vld1.32   { d6[1]}, [r3],  r9\n+        vld1.32   { d7[0]}, [r10]\n+        vld1.32   { d7[1]}, [r3]\n+        vstm       r0,  { q0-q3 }\n+1:\n+        bcc        1f\n+        ldr        r12, [sp, #dl_size]\n+        vdup.32    d16, d30[0]          @ d16[0] = d30[0]\n+        add        lr,  r0,  #(pw << log2_s)\n+        vld1.32   {d16[1]}, [r4],  r9\n+        cmp        r12, #4\n+        vld1.32   {d17[0]}, [r8],  r9\n+        vld1.32   {d17[1]}, [r4],  r9\n+        ble        2f\n+        vld1.32   {d18[0]}, [r8],  r9\n+        vld1.32   {d18[1]}, [r4],  r9\n+        cmp        r12, #12\n+        vld1.32   {d19[0]}, [r8],  r9\n+        vld1.32   {d19[1]}, [r4],  r9\n+        blt        3f\n+        vld1.32   {d20[0]}, [r8],  r9\n+        vld1.32   {d20[1]}, [r4],  r9\n+        vld1.32   {d21[0]}, [r8],  r9\n+        vld1.32   {d21[1]}, [r4],  r9\n+        ble        4f\n+        vld1.32   {d22[0]}, [r8],  r9\n+        vld1.32   {d22[1]}, [r4],  r9\n+        vld1.32   {d23[0]}, [r8]\n+        vld1.32   {d23[1]}, [r4]\n+        b          5f\n+2:      vdup.32    q9,  d17[1]\n+3:      vdup.32    q10, d19[1]\n+4:      vdup.32    q11, d21[1]\n+5:      vstm       lr,  { q8-q11}\n+1:\n+        eors       r7,  r2\n+        beq        99f\n+\n+        lsls       r12, r7,  #AVAIL_S_UR_N_U_C\n+        vdup.32    q0,  d31[0]\n+        vdup.32    q1,  d31[0]\n+        vdup.32    q2,  d31[0]\n+        vdup.32    q3,  d31[0]\n+        add        lr,  r1,  #(pw << log2_s)\n+        vdup.32    q8,  d31[1]\n+        vdup.32    q9,  d31[1]\n+        vdup.32    q10, d31[1]\n+        vdup.32    q11, d31[1]\n+        it cs\n+        vstmcs     r1,  { q0-q3 }\n+        it mi\n+        vstmmi     lr,  { q8-q11}\n+\n+        lsls       r7,  #AVAIL_S_L_N_DL_C\n+        vdup.32    q0,  d30[0]\n+        vdup.32    q1,  d30[0]\n+        vdup.32    q2,  d30[0]\n+        vdup.32    q3,  d30[0]\n+        add        lr,  r0,  #(pw << log2_s)\n+        it mi\n+        vstmmi     r0, { q0-q3 }\n+        it cs\n+        vstmcs     lr, { q0-q3 }\n+\n+99:\n+        pop       {r4-r10, pc}\n+endfunc\n+\n+\n+\n+\ndiff --git a/libavcodec/arm/rpi_hevcpred_intra_hv_neon.S b/libavcodec/arm/rpi_hevcpred_intra_hv_neon.S\nnew file mode 100644\nindex 0000000000..56819ae439\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcpred_intra_hv_neon.S\n@@ -0,0 +1,920 @@\n+/*\n+Copyright (c) 2018 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox, Ben Avison\n+*/\n+\n+/*\n+ * Horizontal & Vertical special cases of angular intra pred\n+ *\n+ * Split out because:\n+ *  Vertical, at least, is relatively common\n+ *  Much simpler code than the general angular case\n+ *  Luma with size < 32 has extra filtering that doesn't happen anywhere else\n+ *\n+ * *** Currently luma filtering is mandatory where it occurs, but there are\n+ *     cases where it should be turned off (rdpcm & an extension sps flag).\n+ *     These don't occur in the standard conformance suite for Main Profile\n+ */\n+\n+#include \"libavutil/arm/asm.S\"\n+#include \"neon.S\"\n+\n+@ ff_hevc_rpi_pred_vertical_4_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_vertical_4_neon_8, export=1\n+        ldrb        ip, [r2, #-1]       @ Top-left\n+        vld1.32     {d0[0]}, [r2 :32]   @ Left\n+        add         r2, r0, r3\n+        vld1.8      {d1[]}, [r1]\n+        lsl         r3, #1\n+        vdup.8      d4, ip\n+        vmov.i8     d2, #128\n+        vhsub.u8    d4, d0, d4\n+        veor        d1, d2\n+        vld1.32     {d0[0]}, [r1 :32]   @ Top\n+        vqadd.s8    d1, d4\n+        vmov.i64    d3, #0xff\n+        vmov        d4, d0\n+        veor        d5, d1, d2\n+        veor        d1, d1, d2\n+        vbit        d0, d1, d3\n+        vshr.u64    d5, #8\n+        vst1.32     {d0[0]}, [r0], r3\n+        vshr.u64    d1, #16\n+        vbit        d4, d5, d3\n+        vshr.u64    d5, #16\n+        vst1.32     {d4[0]}, [r2], r3\n+        vbit        d0, d1, d3\n+        vst1.32     {d0[0]}, [r0]\n+        vbit        d4, d5, d3\n+        vst1.32     {d4[0]}, [r2]\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_vertical_8_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_vertical_8_neon_8, export=1\n+        ldrb        ip, [r2, #-1]       @ Top-left\n+        vld1.8      {d0}, [r2 :64]      @ Left\n+        vmov.i8     d1, #128\n+        vld1.8      {d2[]}, [r1]\n+        vld1.8      {d3}, [r1 :64]      @ Top\n+        vdup.8      d4, ip\n+        vhsub.u8    d4, d0, d4\n+        veor        d2, d1\n+        vmov.i64    d0, #0xff\n+        mov         r1, #8\n+        vqadd.s8    d2, d4, d2\n+        veor        d1, d2, d1\n+1:\n+        vbit        d3, d1, d0\n+        vshr.u64    d1, #8\n+        vst1.8      {d3}, [r0 :64], r3\n+        subs        r1, #2\n+        vbit        d3, d1, d0\n+        vshr.u64    d1, #8\n+        vst1.8      {d3}, [r0 :64], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_vertical_16_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_vertical_16_neon_8, export=1\n+        ldrb        ip, [r2, #-1]       @ Top-left\n+        vld1.8      {q0}, [r2 :128]     @ Left\n+        vdup.8      q1, ip\n+        vld1.8      {d4[],d5[]}, [r1]\n+        vhsub.u8    q0, q1\n+        vmov.i8     q1, #128\n+        veor        q2, q1\n+        vmov.i64    d16, #0xff\n+        vqadd.s8    q0, q2\n+        vld1.8      {q3}, [r1 :128]     @ Top\n+        mov         r1, #16\n+        veor        q0, q1\n+        vmov        q1, q3\n+        vext.8      q2, q0, q0, #1\n+1:\n+        vbit        d2, d0, d16\n+        vbit        d6, d4, d16\n+        vext.8      q0, q0, q0, #2\n+        subs        r1, #2\n+        vst1.8      {q1}, [r0 :128], r3\n+        vext.8      q2, q2, q2, #2\n+        vst1.8      {q3}, [r0 :128], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_vert_32_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_vertical_32_neon_8, export=1\n+        vld1.8     {q0,  q1 }, [r1  :128]    @ Up\n+        add         r2,  r0,  r3\n+        lsl         r3,  #1\n+        mov         r1,  #16\n+1:\n+        vst1.8     {q0,  q1 }, [r0  :128], r3\n+        subs        r1,  #1\n+        vst1.8     {q0,  q1 }, [r2  :128], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_vertical_c_4_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_vertical_c_4_neon_8, export=1\n+        vld1.16    {d0 }, [r1  :64]    @ Up\n+        add         r2,  r0,  r3,  lsl #1\n+        lsl         r3,  #2\n+\n+        vst1.16    {d0 }, [r0  :64], r3\n+        vst1.16    {d0 }, [r2  :64], r3\n+        vst1.16    {d0 }, [r0  :64]\n+        vst1.16    {d0 }, [r2  :64]\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_vertical_c_8_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_vertical_c_8_neon_8, export=1\n+        vld1.16    {q0 }, [r1  :128]    @ Up\n+        add         r2,  r0,  r3,  lsl #1\n+        lsl         r3,  #2\n+        mov         r1,  #4\n+1:\n+        vst1.16    {q0 }, [r0  :128], r3\n+        subs        r1,  #2\n+        vst1.16    {q0 }, [r2  :128], r3\n+        vst1.16    {q0 }, [r0  :128], r3\n+        vst1.16    {q0 }, [r2  :128], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_vertical_c_16_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_vertical_c_16_neon_8, export=1\n+        vld1.16    {q0,  q1 }, [r1  :128]    @ Up\n+        add         r2,  r0,  r3,  lsl #1\n+        lsl         r3,  #2\n+        mov         r1,  #8\n+1:\n+        vst1.16    {q0,  q1 }, [r0  :128], r3\n+        subs        r1,  #1\n+        vst1.16    {q0,  q1 }, [r2  :128], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_horizontalal_4_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+@ ? Might be faster as simple arm\n+\n+function ff_hevc_rpi_pred_horizontal_4_neon_8, export=1\n+        ldrb        ip, [r2, #-1]       @ Top-left\n+        vld1.32     {d0[0]}, [r1 :32]   @ Top\n+        add         r1, r2, #3\n+        vld1.8      {d1[]}, [r2]!\n+        vdup.8      d2, ip\n+        vmov.i8     d3, #128\n+        vhsub.u8    d0, d2\n+        veor        d1, d3\n+        vld1.8      {d2[]}, [r2]!\n+        add         ip, r0, r3\n+        vqadd.s8    d0, d0, d1\n+        lsl         r3, #1\n+        vld1.8      {d1[]}, [r2]\n+        vld1.8      {d4[]}, [r1]\n+        veor        d0, d3\n+        vst1.32     {d0[0]}, [r0 :32], r3\n+        vst1.32     {d2[0]}, [ip :32], r3\n+        vst1.32     {d1[0]}, [r0 :32]\n+        vst1.32     {d4[0]}, [ip :32]\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_horizontal_8_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_horizontal_8_neon_8, export=1\n+        ldrb        ip, [r2, #-1]       @ Top-left\n+        vld1.8      {d0}, [r1 :64]      @ Top\n+        vmov.i8     d1, #128\n+        vld1.8      {d2[]}, [r2]!\n+        mov         r1, #8-2\n+        vdup.8      d3, ip\n+        vhsub.u8    d0, d3\n+        veor        d2, d1\n+        vqadd.s8    d0, d2\n+          vld1.8      {d2[]}, [r2]!\n+        veor        d0, d1\n+        vst1.8      {d0}, [r0], r3\n+1:\n+            vld1.8      {d0[]}, [r2]!\n+        subs        r1, #2\n+          vst1.8      {d2}, [r0 :64], r3\n+              vld1.8      {d2[]}, [r2]!\n+            vst1.8      {d0}, [r0 :64], r3\n+        bne         1b\n+\n+              vst1.8      {d2}, [r0 :64]\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_horizontal_16_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_horizontal_16_neon_8, export=1\n+        ldrb        ip, [r2, #-1]       @ Top-left\n+        vld1.8      {q0}, [r1 :64]      @ Top\n+        mov         r1, #16-2\n+        vld1.8      {d4[],d5[]}, [r2]!\n+        vdup.8      q3, ip\n+        vhsub.u8    q0, q3\n+        vmov.i8     q1, #128\n+        veor        q2, q1\n+        vqadd.s8    q0, q2\n+          vld1.8      {d4[],d5[]}, [r2]!\n+        veor        q0, q1\n+        vst1.8      {q0}, [r0], r3\n+1:\n+            vld1.8      {d0[],d1[]}, [r2]!\n+        subs        r1, #2\n+          vst1.8      {q2}, [r0 :64], r3\n+              vld1.8      {d4[],d5[]}, [r2]!\n+            vst1.8      {q0}, [r0 :64], r3\n+        bne         1b\n+\n+              vst1.8      {q2}, [r0 :64]\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_horizontal_32_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_horizontal_32_neon_8, export=1\n+        vld1.8      {d0[],d1[]}, [r2]!\n+        add         ip, r0, #16\n+        mov         r1, #32-2\n+          vld1.8      {d2[],d3[]}, [r2]!\n+        vst1.8      {q0}, [r0 :128], r3\n+        vst1.8      {q0}, [ip :128], r3\n+1:\n+            vld1.8      {d0[],d1[]}, [r2]!\n+        subs        r1, #2\n+          vst1.8      {q1}, [r0 :128], r3\n+          vst1.8      {q1}, [ip :128], r3\n+              vld1.8      {d2[],d3[]}, [r2]!\n+            vst1.8      {q0}, [r0 :128], r3\n+            vst1.8      {q0}, [ip :128], r3\n+        bne         1b\n+\n+              vst1.8      {q1}, [r0 :128]\n+              vst1.8      {q1}, [ip :128]\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_horizontal_c_4_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_horizontal_c_4_neon_8, export=1\n+        add         r1, r2, #2\n+        vld1.16     {d0[]}, [r2]\n+        add         r2, #4\n+        vld1.16     {d1[]}, [r1]\n+        add         r1, #4\n+        vld1.16     {d2[]}, [r2]\n+A       add         r2, r0, r3, lsl #1\n+T       lsl         r3, #1\n+T       add         r2, r0, r3\n+        vld1.16     {d3[]}, [r1]\n+A       lsl         r3, #2\n+T       lsl         r3, #1\n+        vst1.16     {d0}, [r0 :64], r3\n+        vst1.16     {d1}, [r2 :64], r3\n+        vst1.16     {d2}, [r0 :64]\n+        vst1.16     {d3}, [r2 :64]\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_horizontal_c_8_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_horizontal_c_8_neon_8, export=1\n+        vld1.16     {d0[],d1[]}, [r2]!\n+        lsl         r3, #1\n+          vld1.16     {d2[],d3[]}, [r2]!\n+        mov         r1, #8-2\n+        vst1.16     {q0}, [r0 :64], r3\n+1:\n+            vld1.16     {d0[],d1[]}, [r2]!\n+        subs        r1, #2\n+          vst1.16     {q1}, [r0 :64], r3\n+              vld1.16     {d2[],d3[]}, [r2]!\n+            vst1.16     {q0}, [r0 :64], r3\n+        bne         1b\n+\n+              vst1.16     {q1}, [r0 :64]\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_horizontal_c_16_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_horizontal_c_16_neon_8, export=1\n+        vld1.16     {d0[],d1[]}, [r2]!\n+        lsl         r3, #1\n+        add         ip, r0, #16\n+        mov         r1, #16-2\n+          vld1.16     {d2[],d3[]}, [r2]!\n+        vst1.16     {q0}, [r0 :128], r3\n+        vst1.16     {q0}, [ip :128], r3\n+1:\n+            vld1.16     {d0[],d1[]}, [r2]!\n+        subs        r1, #2\n+          vst1.16     {q1}, [r0 :128], r3\n+          vst1.16     {q1}, [ip :128], r3\n+              vld1.16     {d2[],d3[]}, [r2]!\n+            vst1.16     {q0}, [r0 :128], r3\n+            vst1.16     {q0}, [ip :128], r3\n+        bne         1b\n+\n+              vst1.16     {q1}, [r0 :128]\n+              vst1.16     {q1}, [ip :128]\n+        bx          lr\n+endfunc\n+\n+\n+@------------------------------------------------------------------------------\n+@\n+@ 10 Bit\n+@ Has clipping constants so 10-bit only but could easily be macroed up to\n+@ 14-bit before we run out of bits\n+\n+\n+@ ff_hevc_rpi_pred_vertical_4_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_vertical_4_neon_10, export=1\n+        ldrh        ip, [r2, #-2]       @ Top-left\n+        vld1.16     {d0}, [r2 :64]      @ Left\n+        vmov.i16    d2, #0\n+        vld1.16     {d1[]}, [r1]\n+T       lsl         r3, #1\n+        vdup.16     d4, ip\n+        vmov.i16    d3, #0x3ff\n+        vld1.16     {d5}, [r1 :64]      @ Top\n+        vhsub.u16   d4, d0, d4\n+        vmov.i64    d0, #0xffff\n+A       add         r2, r0, r3, lsl #1\n+T       add         r2, r0, r3\n+        vadd.i16    d1, d1, d4\n+        vmov        d6, d5\n+        vmax.s16    d1, d1, d2\n+        vmin.s16    d2, d1, d3\n+        vmin.s16    d1, d1, d3\n+        vbit        d5, d1, d0\n+A       lsl         r3, #2\n+T       lsl         r3, #1\n+        vshr.u64    d2, #16\n+        vshr.u64    d1, #32\n+        vbit        d6, d2, d0\n+        vst1.16     {d5}, [r0], r3\n+        vshr.u64    d2, #32\n+        vst1.16     {d6}, [r2], r3\n+        vbit        d5, d1, d0\n+        vst1.16     {d5}, [r0]\n+        vbit        d6, d2, d0\n+        vst1.16     {d6}, [r2]\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_vertical_8_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_vertical_8_neon_10, export=1\n+        ldrh        ip, [r2, #-2]       @ Top-left\n+        vld1.16     {q0}, [r2 :128]     @ Left\n+        lsl         r3, #1\n+        vdup.16     q1, ip\n+        vld1.16     {d4[],d5[]}, [r1]\n+        vhsub.u16   q0, q0, q1\n+        vmov.i16    q1, #0\n+        vadd.i16    q0, q2\n+        vmov.i16    q2, #0x3ff\n+        vld1.16     {q3}, [r1 :128]     @ Top\n+        mov         r1, #8\n+        vmax.s16    q0, q1\n+        vmov        q1, q3\n+        vmin.s16    q0, q2\n+        vmov.i64    d16, #0xffff\n+        vext.16     q2, q0, q0, #1\n+1:\n+        vbit        d2, d0, d16\n+        vbit        d6, d4, d16\n+        vext.16     q0, q0, q0, #2\n+        subs        r1, #2\n+        vst1.16     {q1}, [r0 :128], r3\n+        vext.16     q2, q2, q2, #2\n+        vst1.16     {q3}, [r0 :128], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_vertical_16_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_vertical_16_neon_10, export=1\n+        ldrh        ip, [r2, #-2]       @ Top-left\n+        vld1.16     {q0-q1}, [r2 :128]  @ Left\n+T       lsl         r3, #1\n+        vdup.16     q2, ip\n+A       add         r2, r0, r3, lsl #1\n+T       add         r2, r0, r3\n+        vld1.16     {d6[],d7[]}, [r1]\n+A       lsl         r3, #2\n+T       lsl         r3, #1\n+        vhsub.u16   q0, q2\n+        vhsub.u16   q1, q2\n+        vadd.i16    q0, q3\n+        vadd.i16    q1, q3\n+        vmov.i16    q2, #0\n+        vld1.16     {q8-q9}, [r1 :128]  @ Top\n+        mov         r1, #0\n+        vmov.i16    q3, #0x3ff\n+        vmax.s16    q0, q2\n+        vmax.s16    q1, q2\n+        vmin.s16    q0, q3\n+        vmin.s16    q1, q3\n+        vmov        q10, q8\n+        vmov        q11, q9\n+        vext.16     q2, q0, q1, #1\n+        vext.16     q3, q1, q1, #1\n+        vmov.i64    d24, #0xffff\n+1:\n+        vbit        d16, d0, d24\n+        vbit        d20, d4, d24\n+        vext.16     q0, q0, q0, #2\n+        subs        r1, #1<<30\n+        vst1.16     {q8-q9}, [r0 :128], r3\n+        vext.16     q2, q2, q2, #2\n+        vst1.16     {q10-q11}, [r2 :128], r3\n+        bne         1b\n+1:\n+        vbit        d16, d2, d24\n+        vbit        d20, d6, d24\n+        vext.16     q1, q1, q1, #2\n+        subs        r1, #1<<30\n+        vst1.16     {q8-q9}, [r0 :128], r3\n+        vext.16     q3, q3, q3, #2\n+        vst1.16     {q10-q11}, [r2 :128], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_vertical_32_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_vertical_32_neon_10, export=1\n+        vldm        r1, { q0-q3 }    @ Up\n+        lsl         r3, #1\n+        mov         r1, #32\n+        add         r2, r0, #32\n+1:\n+        vst1.16     {q0-q1}, [r0 :128], r3\n+        subs        r1, #1\n+        vst1.16     {q2-q3}, [r2 :128], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_vertical_c_4_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_vertical_c_4_neon_10, export=1\n+        vld1.16    {q0 }, [r1  :128]    @ Up\n+        add         r2,  r0,  r3,  lsl #2\n+        lsl         r3,  #3\n+\n+        vst1.16    {q0 }, [r0  :128], r3\n+        vst1.16    {q0 }, [r2  :128], r3\n+        vst1.16    {q0 }, [r0  :128]\n+        vst1.16    {q0 }, [r2  :128]\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_vertical_c_8_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_vertical_c_8_neon_10, export=1\n+        vld1.16    {q0,  q1 }, [r1  :128]    @ Up\n+        add         r2,  r0,  r3,  lsl #2\n+        lsl         r3,  #3\n+        mov         r1,  #4\n+1:\n+        vst1.16    {q0,  q1 }, [r0  :128], r3\n+        subs        r1,  #1\n+        vst1.16    {q0,  q1 }, [r2  :128], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_vertical_c_16_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_vertical_c_16_neon_10, export=1\n+        vldm        r1, { q0-q3 }    @ Up\n+        lsl         r3, #2\n+        mov         r1, #16\n+        add         r2, r0, #32\n+1:\n+        vst1.16     {q0-q1}, [r0 :128], r3\n+        subs        r1, #1\n+        vst1.16     {q2-q3}, [r2 :128], r3\n+        bne         1b\n+\n+        bx          lr\n+endfunc\n+\n+@ ff_hevc_rpi_pred_horizontal_4_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_horizontal_4_neon_10, export=1\n+        ldrh        ip, [r2, #-2]       @ Top-left\n+        vld1.16     {d0}, [r1 :64]      @ Top\n+        vmov.i16    d1, #0\n+        vld1.16     {d2[]}, [r2]!\n+T       lsl         r3, #1\n+        vdup.16     d3, ip\n+        vmov.i16    d4, #0x3ff\n+        vhsub.u16   d0, d3\n+A       add         ip, r0, r3, lsl #1\n+T       add         ip, r0, r3\n+        vld1.16     {d3[]}, [r2]!\n+A       lsl         r3, #2\n+T       lsl         r3, #1\n+        vadd.i16    d0, d2\n+        vld1.16     {d2[]}, [r2]!\n+        vmax.s16    d0, d1\n+        vld1.16     {d1[]}, [r2]\n+        vmin.s16    d0, d4\n+        vst1.16     {d0}, [r0 :64], r3\n+        vst1.16     {d3}, [ip :64], r3\n+        vst1.16     {d2}, [r0 :64]\n+        vst1.16     {d1}, [ip :64]\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_horizontal_8_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_horizontal_8_neon_10, export=1\n+        ldrh        ip, [r2, #-2]       @ Top-left\n+        vld1.16     {q0}, [r1 :128]     @ Top\n+        lsl         r3, #1\n+        vdup.16     q1, ip\n+        mov         r1, #8-2\n+        vhsub.u16   q0, q1\n+        vld1.16     {d2[],d3[]}, [r2]!\n+        vmov.i16    q2, #0\n+        vadd.i16    q0, q1\n+        vmov.i16    q1, #0x3ff\n+        vmax.s16    q0, q2\n+          vld1.16     {d4[],d5[]}, [r2]!\n+        vmin.s16    q0, q1\n+        vst1.16     {q0}, [r0 :128], r3\n+1:\n+            vld1.16     {d0[],d1[]}, [r2]!\n+        subs        r1, #2\n+          vst1.16     {q2}, [r0 :128], r3\n+              vld1.16     {d4[],d5[]}, [r2]!\n+            vst1.16     {q0}, [r0 :128], r3\n+        bne         1b\n+\n+              vst1.16     {q2}, [r0 :128]\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_horizontalal_16_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_horizontal_16_neon_10, export=1\n+        ldrh        ip, [r2, #-2]       @ Top-left\n+        vld1.16     {q0-q1}, [r1 :128]  @ Top\n+        lsl         r3, #1\n+        vdup.16     q2, ip\n+        add         ip, r0, r3\n+        vhsub.u16   q0, q2\n+        add         ip, #16\n+        vhsub.u16   q1, q2\n+        mov         r1, #16-2\n+        vld1.16     {d4[],d5[]}, [r2]!\n+        vmov.i16    q3, #0\n+        vadd.u16    q0, q2\n+        vadd.i16    q1, q2\n+        vmov.i16    q2, #0x3ff\n+        vmax.s16    q0, q3\n+        vmax.s16    q1, q3\n+          vld1.16     {d6[],d7[]}, [r2]!\n+        vmin.s16    q0, q2\n+        vmin.s16    q1, q2\n+        vst1.16     {q0-q1}, [r0 :128], r3\n+1:\n+            vld1.16     {d0[],d1[]}, [r2]!\n+        subs        r1, #2\n+          vst1.16     {q3}, [r0 :128], r3\n+          vst1.16     {q3}, [ip :128], r3\n+              vld1.16     {d6[],d7[]}, [r2]!\n+            vst1.16     {q0}, [r0 :128], r3\n+            vst1.16     {q0}, [ip :128], r3\n+        bne         1b\n+\n+              vst1.16     {q3}, [r0 :128]\n+              vst1.16     {q3}, [ip :128]\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_horizontal_32_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_horizontal_32_neon_10, export=1\n+        vld1.16     {d0[],d1[]}, [r2]!\n+        add         ip, r0, #16\n+        push        {lr}\n+        mov         lr, #32\n+          vld1.16     {d2[],d3[]}, [r2]!\n+        lsl         r3, #1\n+        vst1.16     {q0}, [r0 :128], lr\n+        sub         r3, #32\n+        vst1.16     {q0}, [ip :128], lr\n+        mov         r1, #32-2\n+        vst1.16     {q0}, [r0 :128], r3\n+        vst1.16     {q0}, [ip :128], r3\n+1:\n+            vld1.16     {d0[],d1[]}, [r2]!\n+        subs        r1, #2\n+          vst1.16     {q1}, [r0 :128], lr\n+          vst1.16     {q1}, [ip :128], lr\n+          vst1.16     {q1}, [r0 :128], r3\n+          vst1.16     {q1}, [ip :128], r3\n+              vld1.16     {d2[],d3[]}, [r2]!\n+            vst1.16     {q0}, [r0 :128], lr\n+            vst1.16     {q0}, [ip :128], lr\n+            vst1.16     {q0}, [r0 :128], r3\n+            vst1.16     {q0}, [ip :128], r3\n+        bne         1b\n+\n+              vst1.16     {q1}, [r0 :128], lr\n+              vst1.16     {q1}, [ip :128], lr\n+              vst1.16     {q1}, [r0 :128]\n+              vst1.16     {q1}, [ip :128]\n+        pop         {pc}\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_horizontal_c_4_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_horizontal_c_4_neon_10, export=1\n+        add         r1, r2, #4\n+        vld1.32     {d0[],d1[]}, [r2]\n+        add         r2, #8\n+        vld1.32     {d2[],d3[]}, [r1]\n+        add         r1, #8\n+        vld1.32     {d4[],d5[]}, [r2]\n+A       add         r2, r0, r3, lsl #2\n+T       lsl         r3, #2\n+T       add         r2, r0, r3\n+        vld1.32     {d6[],d7[]}, [r1]\n+A       lsl         r3, #3\n+T       lsl         r3, #1\n+        vst1.32     {q0}, [r0 :128], r3\n+        vst1.32     {q1}, [r2 :128], r3\n+        vst1.32     {q2}, [r0 :128]\n+        vst1.32     {q3}, [r2 :128]\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_horizontal_c_8_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_horizontal_c_8_neon_10, export=1\n+        vld1.32     {d0[],d1[]}, [r2]!\n+        lsl         r3, #2\n+        add         ip, r0, #16\n+        mov         r1, #8-2\n+          vld1.32     {d2[],d3[]}, [r2]!\n+        vst1.32     {q0}, [r0 :128], r3\n+        vst1.32     {q0}, [ip :128], r3\n+1:\n+            vld1.32     {d0[],d1[]}, [r2]!\n+        subs        r1, #2\n+          vst1.32     {q1}, [r0 :128], r3\n+          vst1.32     {q1}, [ip :128], r3\n+              vld1.32     {d2[],d3[]}, [r2]!\n+            vst1.32     {q0}, [r0 :128], r3\n+            vst1.32     {q0}, [ip :128], r3\n+        bne         1b\n+\n+              vst1.32     {q1}, [r0 :128]\n+              vst1.32     {q1}, [ip :128]\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_horizontal_c_16_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_horizontal_c_16_neon_10, export=1\n+        vld1.32     {d0[],d1[]}, [r2]!\n+        add         ip, r0, #16\n+        push        {lr}\n+        mov         lr, #32\n+          vld1.32     {d2[],d3[]}, [r2]!\n+        lsl         r3, #2\n+        vst1.32     {q0}, [r0 :128], lr\n+        sub         r3, #32\n+        vst1.32     {q0}, [ip :128], lr\n+        mov         r1, #16-2\n+        vst1.32     {q0}, [r0 :128], r3\n+        vst1.32     {q0}, [ip :128], r3\n+1:\n+            vld1.32     {d0[],d1[]}, [r2]!\n+        subs        r1, #2\n+          vst1.32     {q1}, [r0 :128], lr\n+          vst1.32     {q1}, [ip :128], lr\n+          vst1.32     {q1}, [r0 :128], r3\n+          vst1.32     {q1}, [ip :128], r3\n+              vld1.32     {d2[],d3[]}, [r2]!\n+            vst1.32     {q0}, [r0 :128], lr\n+            vst1.32     {q0}, [ip :128], lr\n+            vst1.32     {q0}, [r0 :128], r3\n+            vst1.32     {q0}, [ip :128], r3\n+        bne         1b\n+\n+              vst1.32     {q1}, [r0 :128], lr\n+              vst1.32     {q1}, [ip :128], lr\n+              vst1.32     {q1}, [r0 :128]\n+              vst1.32     {q1}, [ip :128]\n+        pop         {pc}\n+endfunc\n+\n+\n+\ndiff --git a/libavcodec/arm/rpi_hevcpred_intra_planar_neon.S b/libavcodec/arm/rpi_hevcpred_intra_planar_neon.S\nnew file mode 100644\nindex 0000000000..af8c4c03f0\n--- /dev/null\n+++ b/libavcodec/arm/rpi_hevcpred_intra_planar_neon.S\n@@ -0,0 +1,1043 @@\n+/*\n+Copyright (c) 2018 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox, Ben Avison\n+*/\n+\n+#include \"libavutil/arm/asm.S\"\n+#include \"neon.S\"\n+\n+@ Planar intra pred (8.4.4.2.4)\n+@\n+@ predSamples[ x ][ y ] =\n+@ ( ( nTbS - 1 - x ) * p[ -1 ][ y ] +\n+@   ( x + 1 ) * p[ nTbS ][ -1 ] +\n+@   ( nTbS - 1 - y ) * p[ x ][ -1 ] +\n+@   ( y + 1 ) * p[ -1 ][ nTbS ] + nTbS ) >> ( Log2( nTbS ) + 1 )\n+\n+@ All 10-bit functions would work with 9\n+\n+\n+@ ff_hevc_rpi_pred_planar_8_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_planar_4_neon_8, export=1\n+\n+        vld1.8      {d0}, [r1]          @ Top\n+        adr         ip, nb_3_0_1_4\n+        vld1.8      {d1}, [r2]          @ Left\n+        vmov.i64    d2, #0xffffffff\n+        vldr        d3, [ip, #8]        @ {1,2,3,4,1,2,3,4}\n+        add         r1, r0, r3\n+        vdup.32     d4, d0[0]           @ {t0,t1,t2,t3,t0,t1,t2,t3}\n+        vdup.8      d0, d0[4]           @ {t4,t4,t4,t4,t4,t4,t4,t4}\n+        vdup.8      d5, d1[4]           @ {l4,l4,l4,l4,l4,l4,l4,l4}\n+        vdup.8      d6, d1[0]           @ {l0,l0,l0,l0,l0,l0,l0,l0}\n+        vshll.u8    q8, d4, #2\n+        lsl         r3, #1\n+        vsubl.u8    q2, d5, d4\n+        vmlal.u8    q8, d0, d3\n+        vld1.8      {d0}, [ip]          @ {3,2,1,0,3,2,1,0}\n+        vdup.8      d7, d1[1]           @ {l1,l1,l1,l1,l1,l1,l1,l1}\n+        vshl.s16    q9, q2, #1\n+        vbif        d6, d7, d2          @ {l0,l0,l0,l0,l1,l1,l1,l1}\n+        vadd.i16    d16, d4\n+        vdup.8      d7, d1[2]           @ {l2,l2,l2,l2,l2,l2,l2,l2}\n+        vadd.i16    d17, d18\n+        vdup.8      d1, d1[3]           @ {l3,l3,l3,l3,l3,l3,l3,l3}\n+        vadd.i16    q2, q8, q9\n+        vmlal.u8    q8, d0, d6\n+        vbif        d7, d1, d2          @ {l2,l2,l2,l2,l3,l3,l3,l3}\n+        vmlal.u8    q2, d0, d7\n+        vrshrn.i16  d0, q8, #3\n+        vst1.32     d0[0], [r0 :32], r3\n+        vst1.32     d0[1], [r1 :32], r3\n+        vrshrn.i16  d0, q2, #3\n+        vst1.32     d0[0], [r0 :32]\n+        vst1.32     d0[1], [r1 :32]\n+\n+        bx          lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_planar_4_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_planar_4_neon_10, export=1\n+        @ Load from bytes & expand later - at the very least this uses less\n+        @ memory than having a short table\n+        vld1.16     {q0}, [r1 :64]      @ Top\n+        adr         ip, nbh_3_0_1_4\n+        vldr        d2, [r2, #8]        @ Left (lower)\n+        vldr        d3, [ip, #8]        @ {1,2,3,4}\n+T       lsl         r3, #1\n+        vshl.s16    d4, d0, #2\n+        vdup.16     d1, d1[0]           @ {t4,t4,t4,t4}\n+        vldr        d5, [r2]            @ Left (upper)\n+        vdup.16     d2, d2[0]           @ {l4,l4,l4,l4}\n+        vldr        d6, [ip]            @ {3,2,1,0}\n+        vmla.i16    d4, d3, d1          @ Acc set up\n+        vsub.i16    d0, d2, d0          @ Add set up\n+        vmov        d7, d6\n+        vdup.16     d2, d5[0]\n+        vdup.16     d3, d5[1]\n+        vdup.16     d16, d5[2]\n+        vadd.i16    d18, d0, d4\n+        vshl.s16    d0, #1              @ x2\n+        vadd.i16    d19, d0, d4\n+        vdup.16     d17, d5[3]\n+        vadd.i16    d4, d0, d18\n+A       add         r1, r0, r3, lsl #1\n+T       add         r1, r0, r3\n+        vadd.i16    d5, d0, d19\n+A       lsl         r3, #2\n+T       lsl         r3, #1\n+        vmla.i16    q9, q1, q3\n+        vmla.i16    q2, q8, q3\n+        vrshr.u16   q0, q9, #3\n+        vst1.16     {d0}, [r0], r3\n+        vrshr.u16   d2, d4, #3\n+        vst1.16     {d1}, [r1], r3\n+        vrshr.u16   d3, d5, #3\n+        vst1.16     {d2}, [r0]\n+        vst1.16     {d3}, [r1]\n+\n+        bx         lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_planar_8_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_planar_8_neon_8, export=1\n+\n+        vld1.8      {q0}, [r1]          @ Top\n+        adr         ip, nb_7_0_1_8\n+        vldr        d2, [r2, #8]        @ Left (lower)\n+        mov         r1, #8\n+        vldr        d3, [ip, #8]        @ {1,2,3,4,5,6,7,8}\n+        vshll.u8    q2, d0, #3\n+        vdup.8      d1, d1[0]           @ {t8,t8,t8,t8,t8,t8,t8,t8}\n+        vdup.8      d2, d2[0]           @ {l8,l8,l8,l8,l8,l8,l8,l8}\n+        vldr        d6, [r2]            @ Left (upper)\n+        vmlal.u8    q2, d3, d1\n+        vsubl.u8    q0, d2, d0\n+        vldr        d7, [ip]            @ {7,6,5,4,3,2,1,0}\n+\n+@ u8   7..0    [1]  d7\n+@ u8  left[y]  [1]  d6\n+@ u16 acc      [2]  q2 (even rows) or q8 (odd rows) = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially\n+@ u16 add      [2]  q0 = p[-1][nTbs] - p[x][-1]\n+\n+        vdup.8      d2, d6[0]\n+        vadd.i16    q2, q0\n+        vdup.8      d3, d6[1]\n+        vadd.i16    q8, q2, q0\n+1:\n+        vmlal.u8    q2, d7, d2\n+        subs        r1, #2\n+        vadd.i16    q9, q8, q0\n+        vmlal.u8    q8, d7, d3\n+        vdup.8      d2, d6[2]\n+        vdup.8      d3, d6[3]\n+        vrshrn.i16  d20, q2, #4\n+        vshr.u64    d6, #16\n+        vmov        q2, q9\n+        vst1.8      {d20}, [r0], r3\n+        vrshrn.i16  d20, q8, #4\n+        vadd.i16    q8, q2, q0\n+        vst1.8      {d20}, [r0], r3\n+        bne         1b\n+\n+        bx          lr\n+\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_planar_8_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_planar_8_neon_10, export=1\n+\n+        adr         ip, nb_7_0_1_8\n+        vld1.16     {q0}, [r1 :128]!    @ Top (left)\n+        lsl         r3, #1\n+        vld1.16     {q1}, [ip :128]     @ {7,6,5,4,3,2,1,0,1,2,3,4,5,6,7,8}\n+        add         ip, r2, #16\n+        vld1.16     {d4[],d5[]}, [r1]   @ Top (right)\n+        mov         r1, #8-2\n+        vshl.s16    q3, q0, #3\n+        vmovl.u8    q8, d3              @ {1,2,3,4,5,6,7,8}\n+        vld1.16     {d18[],d19[]}, [ip] @ Left (lower)\n+        vmla.i16    q3, q8, q2          @ Acc set up\n+        vsub.i16    q0, q9, q0          @ Add set up\n+        vmovl.u8    q1, d2              @ {7,6,5,4,3,2,1,0}\n+        vadd.i16    q2, q3, q0\n+\n+@ u16  7..0        [1]  q1\n+@ u32 left[y]      [1]  [r2]\n+@ u16 acc          [1]  q3 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially\n+@ u16 add          [1]  q0 = p[-1][nTbs] - p[x][-1]\n+\n+        vld1.16     {d6[],d7[]}, [r2]!\n+        vadd.i16    q8, q2, q0\n+        vld1.16     {d18[],d19[]}, [r2]!\n+        vmla.i16    q2, q1, q3\n+        vadd.i16    q3, q8, q0\n+        vmla.i16    q8, q1, q9\n+1:\n+        vrshr.u16   q9, q2, #4\n+        subs        r1, #2\n+        vmov        q2, q3\n+        vrshr.u16   q10, q8, #4\n+          vld1.16     {d6[],d7[]}, [r2]!\n+        vst1.16     {q9}, [r0 :128], r3\n+          vadd.i16    q8, q2, q0\n+          vld1.16     {d18[],d19[]}, [r2]!\n+          vmla.i16    q2, q1, q3\n+          vadd.i16    q3, q8, q0\n+          vmla.i16    q8, q1, q9\n+        vst1.16     {q10}, [r0 :128], r3\n+        bne         1b\n+\n+        vrshr.u16   q9, q2, #4\n+        add         r3, r0\n+        vrshr.u16   q10, q8, #4\n+        vst1.16     {q9}, [r0 :128]\n+        vst1.16     {q10}, [r3 :128]\n+\n+        bx         lr\n+endfunc\n+\n+\n+@------------------------------------------------------------------------------\n+@\n+@ Data - has to be in two lumps to ensure we can always reach using adr\n+\n+        .balign 64\n+\n+nb_31_0_1_32:\n+        .byte   31, 30, 29, 28, 27, 26, 25, 24\n+        .byte   23, 22, 21, 20, 19, 18, 17, 16\n+nb_15_0_1_16:\n+        .byte   15, 14, 13, 12, 11, 10,  9,  8\n+        .byte    7,  6,  5,  4,  3,  2,  1,  0\n+        .byte    1,  2,  3,  4,  5,  6,  7,  8\n+        .byte    9, 10, 11, 12, 13, 14, 15, 16\n+        .byte   17, 18, 19, 20, 21, 22, 23, 24\n+        .byte   25, 26, 27, 28, 29, 30, 31, 32\n+\n+        @ should be back on a 64-byte boundary here\n+\n+        @ These could be extracted from the above array, but separate out\n+        @ out for better (16 byte) alignment\n+nb_3_0_1_4:\n+        .byte    3,  2,  1,  0,  3,  2,  1,  0\n+        .byte    1,  2,  3,  4,  1,  2,  3,  4\n+nb_7_0_1_8:\n+        .byte    7,  6,  5,  4,  3,  2,  1,  0\n+        .byte    1,  2,  3,  4,  5,  6,  7,  8\n+nbh_3_0_1_4:\n+        .short   3,  2,  1,  0,  1,  2,  3,  4\n+\n+@------------------------------------------------------------------------------\n+\n+\n+@ ff_hevc_rpi_pred_planar_16_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_planar_16_neon_8, export=1\n+\n+        adr         ip, nb_15_0_1_16 + 16\n+        vld1.8      {q0}, [r1 :128]!    @ Top (left)\n+        add         r2, #16\n+        vld1.8      {q1}, [ip: 128]     @ {1,2,3...16}\n+        vld1.8      {d4[]}, [r1]        @ Top (right)\n+        sub         ip, #16\n+        vshll.u8    q3, d0, #4\n+        mov         r1, #16\n+        vshll.u8    q8, d1, #4\n+        vld1.8      {d5[]}, [r2]        @ Left (lower)\n+        sub         r2, #16\n+        vmlal.u8    q3, d2, d4\n+        vmlal.u8    q8, d3, d4          @ Acc set up\n+        vsubl.u8    q1, d5, d0\n+        vsubl.u8    q0, d5, d1          @ Add set up\n+        vld1.8      {q2}, [ip :128]     @ {15,14,13...0}\n+\n+@ u8  15..0    [1]  q2\n+@ u8  left[y]  [1]  [r2]\n+@ u16 acc      [2]  q3,q8 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially\n+@ u16 add      [2]  q1,q0 = p[-1][nTbs] - p[x][-1]\n+\n+        vadd.i16    q3, q1\n+        vadd.i16    q8, q0\n+1:\n+        vadd.i16    q10, q3, q1\n+        subs        r1, #2\n+        vld1.8      {d18[]}, [r2]!\n+        vadd.i16    q11, q8, q0\n+        vld1.8      {d19[]}, [r2]!\n+        vmlal.u8    q3, d4, d18\n+        vmlal.u8    q8, d5, d18\n+        vadd.i16    q12, q10, q1\n+        vmlal.u8    q10, d4, d19\n+        vadd.i16    q13, q11, q0\n+        vmlal.u8    q11, d5, d19\n+        vrshrn.u16  d18, q3, #5\n+        vrshrn.u16  d19, q8, #5\n+        vmov        q3, q12\n+        vst1.8      {q9}, [r0 :128], r3\n+        vrshrn.u16  d18, q10, #5\n+        vrshrn.u16  d19, q11, #5\n+        vmov        q8, q13\n+        vst1.8      {q9}, [r0 :128], r3\n+        bne         1b\n+\n+        bx          lr\n+\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_planar_16_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_planar_16_neon_10, export=1\n+\n+        @ Load from bytes & expand later - at the very least this uses less\n+        @ memory than having a short table\n+        adr         ip, nb_15_0_1_16 + 16\n+        vld1.16     {q0-q1}, [r1 :128]! @ Top (left)\n+        add         r2, #32\n+        vld1.8      {q2}, [ip :128]     @ {1,2,3...16}\n+        lsl         r3, #1\n+        vld1.16     {d6[],d7[]}, [r1]   @ Top (right)\n+        sub         ip, #16\n+        vmovl.u8    q8, d4\n+        mov         r1, #16\n+        vshl.i16    q9, q0, #4\n+        vmovl.u8    q2, d5\n+        vshl.i16    q10, q1, #4\n+        vld1.16     {d22[],d23[]}, [r2] @ Left (lower)\n+        sub         r2, #32\n+        vld1.8      {q12}, [ip]         @ {15,14,13...0}\n+        vmla.i16    q9, q8, q3\n+        vmla.i16    q10, q2, q3         @ Acc set up\n+        vsub.i16    q0, q11, q0\n+        vsub.i16    q1, q11, q1         @ Add set up\n+        vadd.i16    q2, q9, q0\n+        vadd.i16    q3, q10, q1\n+        vmovl.u8    q8, d24\n+        vmovl.u8    q9, d25\n+\n+@ u16  15..0       [2]  q8,q9\n+@ u32 left[y]      [2]  [r2]\n+@ u16 acc          [2]  q2,q3 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially\n+@ u16 add          [2]  q0,q1 = p[-1][nTbs] - p[x][-1]\n+\n+1:\n+        vadd.i16    q10, q2, q0\n+        subs        r1, #2\n+        vld1.16     {d24[],d25[]}, [r2]!\n+        vadd.i16    q11, q3, q1\n+        vld1.16     {d28[],d29[]}, [r2]!\n+        vmla.i16    q2, q8, q12\n+        vmla.i16    q3, q9, q12\n+        vadd.i16    q12, q10, q0\n+        vmla.i16    q10, q8, q14\n+        vadd.i16    q13, q11, q1\n+        vmla.i16    q11, q9, q14\n+        vrshr.u16   q14, q2, #5\n+        vrshr.u16   q15, q3, #5\n+        vmov        q2, q12\n+        vst1.16     {q14-q15}, [r0 :128], r3\n+        vrshr.u16   q14, q10, #5\n+        vrshr.u16   q15, q11, #5\n+        vmov        q3, q13\n+        vst1.16     {q14-q15}, [r0 :128], r3\n+        bne         1b\n+\n+        bx         lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_planar_32_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_planar_32_neon_8, export=1\n+\n+        vld1.8      {q0-q1}, [r1 :128]! @ Top (left)\n+        adr         ip, nb_31_0_1_32 + 32\n+        vpush       {d8-d12}\n+        vld1.8      {q2-q3}, [ip :128]  @ {1,2,3...32}\n+        add         r2, #32\n+        vld1.8      {d8[]}, [r1]        @ Top (right)\n+        sub         ip, #32\n+        vshll.u8    q8, d0, #5\n+        mov         r1, #32\n+        vld1.8      {d9[]}, [r2]        @ Left (lower)\n+        sub         r2, #32\n+        vshll.u8    q9, d1, #5\n+        vshll.u8    q10, d2, #5\n+        vshll.u8    q11, d3, #5\n+        vmlal.u8    q8, d4, d8\n+        vsubl.u8    q12, d9, d0\n+        vmlal.u8    q9, d5, d8\n+        vsubl.u8    q13, d9, d1\n+        vmlal.u8    q10, d6, d8\n+        vsubl.u8    q14, d9, d2\n+        vmlal.u8    q11, d7, d8         @ Acc set up\n+        vsubl.u8    q15, d9, d3         @ Add set up\n+        vadd.i16    q8, q12\n+        vadd.i16    q9, q13\n+        vadd.i16    q10, q14\n+        vadd.i16    q11, q15\n+        vld1.8      {q4-q5}, [ip :128]  @ {31,30,29...0}\n+\n+@ u8  31..0    [2]  q4,q5\n+@ u8  left[y]  [2]  [r2]\n+@ u16 acc      [4]  q8-q11  = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially\n+@ u16 add      [4]  q12-q15 = p[-1][nTbs] - p[x][-1]\n+\n+        vld1.8      {d12[]}, [r2]!\n+        vadd.i16    q0, q8, q12\n+        b           2f\n+1:\n+          vld1.8      {d12[]}, [r2]!\n+        vrshrn.u16  d3, q1, #6\n+        vrshrn.u16  d2, q0, #6\n+          vadd.i16    q0, q8, q12\n+        vrshrn.u16  d4, q2, #6\n+        vrshrn.u16  d5, q3, #6\n+        vst1.8      {q1-q2}, [r0 :128], r3\n+2:        vadd.i16    q1, q9, q13\n+          subs        r1, #2\n+          vadd.i16    q2, q10, q14\n+          vadd.i16    q3, q11, q15\n+          vmlal.u8    q8, d8, d12\n+          vmlal.u8    q9, d9, d12\n+          vmlal.u8    q10, d10, d12\n+          vmlal.u8    q11, d11, d12\n+            vld1.8      {d12[]}, [r2]!\n+          vrshrn.u16  d19, q9, #6\n+          vrshrn.u16  d18, q8, #6\n+            vadd.i16    q8, q0, q12\n+          vrshrn.u16  d20, q10, #6\n+          vrshrn.u16  d21, q11, #6\n+          vst1.8      {q9-q10}, [r0 :128], r3\n+            vadd.i16    q9, q1, q13\n+            vadd.i16    q10, q2, q14\n+            vadd.i16    q11, q3, q15\n+            vmlal.u8    q0, d8, d12\n+            vmlal.u8    q1, d9, d12\n+            vmlal.u8    q2, d10, d12\n+            vmlal.u8    q3, d11, d12\n+\n+        bne         1b\n+\n+        vpop        {d8-d12}\n+\n+        vrshrn.u16  d3, q1, #6\n+        vrshrn.u16  d2, q0, #6\n+        vrshrn.u16  d4, q2, #6\n+        vrshrn.u16  d5, q3, #6\n+        vst1.8      {q1-q2}, [r0 :128]\n+\n+        bx          lr\n+\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_planar_32_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_planar_32_neon_10, export=1\n+\n+        @ Load from bytes & expand later - at the very least this uses less\n+        @ memory than having a short table\n+        vld1.16     {q0-q1}, [r1 :128]!  @ Top (left)\n+        adr         ip, nb_31_0_1_32 + 32\n+        vpush       {q4-q7}\n+        vld1.16     {q2-q3}, [r1 :128]!  @ Top (centre)\n+        add         r2, #64\n+        vld1.8      {q14-q15}, [ip :128] @ {1,2,3...32}\n+T       lsl         r3, #1\n+        vld1.16     {d8[],d9[]}, [r1]    @ Top (right)\n+        sub         ip, #32\n+        vmovl.u8    q12, d28\n+        mov         r1, #32\n+        vmovl.u8    q13, d29\n+        vld1.8      {q6-q7}, [ip :128]   @ {31,30,29...0}\n+        vmovl.u8    q14, d30\n+        vmovl.u8    q15, d31\n+        vld1.16     {d10[],d11[]}, [r2]  @ Left (lower)\n+        sub         r2, #64\n+        vshl.i16    q8, q0, #5\n+        vshl.i16    q9, q1, #5\n+        vshl.i16    q10, q2, #5\n+        vshl.i16    q11, q3, #5\n+        vmla.i16    q8, q12, q4\n+        vsub.i16    q0, q5, q0\n+        vmla.i16    q9, q13, q4\n+        vsub.i16    q1, q5, q1\n+        vmla.i16    q10, q14, q4\n+        vmov.u16    ip, d0[0]\n+        vsub.i16    q2, q5, q2\n+        vmla.i16    q11, q15, q4         @ Acc set up\n+        vsub.i16    q3, q5, q3           @ Add set up\n+        vadd.i16    q8, q0\n+        vadd.i16    q9, q1\n+        vadd.i16    q10, q2\n+        vadd.i16    q11, q3\n+        vmovl.u8    q4, d12\n+        vmovl.u8    q5, d13\n+        vmovl.u8    q6, d14\n+        vmovl.u8    q7, d15\n+\n+@ u16 31..0    [4]  q4-q7\n+@ u16 left[y]  [4]  [r2]\n+@ u16 acc      [4]  q8-q11 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially\n+@ u16 add      [4]  q0-q3  = p[-1][nTbs] - p[x][-1]\n+\n+        vadd.i16    q12, q8, q0\n+A       sub         r0, r0, r3, lsl #1\n+T       sub         r0, r3\n+1:\n+        vld1.16     {d0[0]}, [r2]!\n+A       add         r0, r0, r3, lsl #1\n+T       add         r0, r3\n+        vadd.i16    q13, q9, q1\n+        subs        r1, #2\n+        vadd.i16    q14, q10, q2\n+        vadd.i16    q15, q11, q3\n+        vmla.i16    q8, q4, d0[0]\n+        vmla.i16    q9, q5, d0[0]\n+        vmla.i16    q10, q6, d0[0]\n+        vmla.i16    q11, q7, d0[0]\n+        vmov.16     d0[0], ip\n+        vrshr.u16   q8, #6\n+        vrshr.u16   q9, #6\n+        vrshr.u16   q10, #6\n+        vrshr.u16   q11, #6\n+        vstm        r0, {q8-q11}\n+        vadd.i16    q8, q12, q0\n+A       add         r0, r0, r3, lsl #1\n+T       add         r0, r3\n+        vld1.16     {d0[0]}, [r2]!\n+        vadd.i16    q9, q13, q1\n+        vadd.i16    q10, q14, q2\n+        vadd.i16    q11, q15, q3\n+        vmla.i16    q12, q4, d0[0]\n+        vmla.i16    q13, q5, d0[0]\n+        vmla.i16    q14, q6, d0[0]\n+        vmla.i16    q15, q7, d0[0]\n+        vmov.16     d0[0], ip\n+        vrshr.u16   q12, #6\n+        vrshr.u16   q13, #6\n+        vrshr.u16   q14, #6\n+        vrshr.u16   q15, #6\n+        vstm        r0, {q12-q15}\n+        vadd.i16    q12, q8, q0\n+        bne         1b\n+\n+        vpop        {q4-q7}\n+        bx          lr\n+\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_planar_c_4_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_planar_c_4_neon_8, export=1\n+\n+        vld1.8      {q0}, [r1]          @ Top\n+        adr         ip, nbx2_3_0_1_4\n+        vldr        d2, [r2, #8]        @ Left (lower)\n+        mov         r1, #4\n+        vldr        d3, [ip, #8]        @ {1,1,2,2,3,3,4,4}\n+        lsl         r3, #1\n+        vshll.u8    q2, d0, #2\n+        vdup.16     d1, d1[0]           @ {t4,t4,t4,t4,t4,t4,t4,t4}\n+        vdup.16     d2, d2[0]           @ {l4,l4,l4,l4,l4,l4,l4,l4}\n+        vldr        d6, [r2]            @ Left (upper)\n+        vmlal.u8    q2, d3, d1\n+        vsubl.u8    q0, d2, d0\n+        vldr        d7, [ip]            @ {3,3,2,2,1,1,0,0}\n+\n+@ u8   3..0    [1]  d7\n+@ u8  left[y]  [1]  d6\n+@ u16 acc      [2]  q2 (even rows) or q8 (odd rows) = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially\n+@ u16 add      [2]  q0 = p[-1][nTbs] - p[x][-1]\n+\n+        vdup.16     d2, d6[0]\n+        vadd.i16    q2, q0\n+        vdup.16     d3, d6[1]\n+        vadd.i16    q8, q2, q0\n+1:\n+        vmlal.u8    q2, d7, d2\n+        subs        r1, #2\n+        vadd.i16    q9, q8, q0\n+        vmlal.u8    q8, d7, d3\n+        vdup.16     d2, d6[2]\n+        vdup.16     d3, d6[3]\n+        vrshrn.i16  d20, q2, #3\n+        vmov        q2, q9\n+        vst1.8      {d20}, [r0], r3\n+        vrshrn.i16  d20, q8, #3\n+        vadd.i16    q8, q2, q0\n+        vst1.8      {d20}, [r0], r3\n+        bne         1b\n+\n+        bx          lr\n+\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_planar_c_4_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_planar_c_4_neon_10, export=1\n+\n+        adr         ip, nbx2_3_0_1_4\n+        vld1.16     {q0}, [r1 :128]!    @ Top (left)\n+        lsl         r3, #2\n+        vld1.16     {q1}, [ip :128]     @ {3,3,2,2,1,1,0,0,1,1,2,2,3,3,4,4}\n+        add         ip, r2, #16\n+        vld1.32     {d4[],d5[]}, [r1]   @ Top (right)\n+        vshl.s16    q3, q0, #2\n+        vmovl.u8    q8, d3              @ {1,1,2,2,3,3,4,4}\n+        vld1.32     {d18[],d19[]}, [ip] @ Left (lower)\n+        vmla.i16    q3, q8, q2          @ Acc set up\n+        vsub.i16    q0, q9, q0          @ Add set up\n+        vmovl.u8    q1, d2              @ {3,3,2,2,1,1,0,0}\n+        vadd.i16    q2, q3, q0\n+\n+@ u16  3..0        [1]  q1\n+@ u32 left[y]      [1]  [r2]\n+@ u16 acc          [1]  q3 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially\n+@ u16 add          [1]  q0 = p[-1][nTbs] - p[x][-1]\n+\n+        vld1.32     {d6[],d7[]}, [r2]!\n+        vadd.i16    q8, q2, q0\n+        vld1.32     {d18[],d19[]}, [r2]!\n+        vmla.i16    q2, q1, q3\n+        vadd.i16    q3, q8, q0\n+        vmla.i16    q8, q1, q9\n+\n+        vrshr.u16   q9, q2, #3\n+        vmov        q2, q3\n+        vrshr.u16   q10, q8, #3\n+          vld1.32     {d6[],d7[]}, [r2]!\n+        vst1.16     {q9}, [r0 :128], r3\n+          vadd.i16    q8, q2, q0\n+          vld1.32     {d18[],d19[]}, [r2]!\n+          vmla.i16    q2, q1, q3\n+          vadd.i16    q3, q8, q0\n+          vmla.i16    q8, q1, q9\n+        vst1.16     {q10}, [r0 :128], r3\n+\n+          vrshr.u16   q9, q2, #3\n+          add         r3, r0\n+          vrshr.u16   q10, q8, #3\n+          vst1.16     {q9}, [r0 :128]\n+          vst1.16     {q10}, [r3 :128]\n+\n+          bx         lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_planar_c_8_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_planar_c_8_neon_8, export=1\n+\n+        adr         ip, nbx2_7_0_1_8 + 16\n+        vld1.8      {q0}, [r1 :128]!    @ Top (left)\n+        add         r2, #16\n+        vld1.8      {q1}, [ip: 128]     @ {1,1,2,2,3,3...8,8}\n+        lsl         r3, #1\n+        vld1.16     {d4[]}, [r1]        @ Top (right)\n+        sub         ip, #16\n+        vshll.u8    q3, d0, #3\n+        mov         r1, #8\n+        vshll.u8    q8, d1, #3\n+        vld1.16     {d5[]}, [r2]        @ Left (lower)\n+        sub         r2, #16\n+        vmlal.u8    q3, d2, d4\n+        vmlal.u8    q8, d3, d4          @ Acc set up\n+        vsubl.u8    q1, d5, d0\n+        vsubl.u8    q0, d5, d1          @ Add set up\n+        vld1.8      {q2}, [ip :128]     @ {7,7,6,6,5,5...0,0}\n+\n+@ u8  7..0     [1]  q2\n+@ u8  left[y]  [1]  [r2]\n+@ u16 acc      [2]  q3,q8 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially\n+@ u16 add      [2]  q1,q0 = p[-1][nTbs] - p[x][-1]\n+\n+        vadd.i16    q3, q1\n+        vadd.i16    q8, q0\n+1:\n+        vadd.i16    q10, q3, q1\n+        subs        r1, #2\n+        vld1.16     {d18[]}, [r2]!\n+        vadd.i16    q11, q8, q0\n+        vld1.16     {d19[]}, [r2]!\n+        vmlal.u8    q3, d4, d18\n+        vmlal.u8    q8, d5, d18\n+        vadd.i16    q12, q10, q1\n+        vmlal.u8    q10, d4, d19\n+        vadd.i16    q13, q11, q0\n+        vmlal.u8    q11, d5, d19\n+        vrshrn.u16  d18, q3, #4\n+        vrshrn.u16  d19, q8, #4\n+        vmov        q3, q12\n+        vst1.8      {q9}, [r0 :128], r3\n+        vrshrn.u16  d18, q10, #4\n+        vrshrn.u16  d19, q11, #4\n+        vmov        q8, q13\n+        vst1.8      {q9}, [r0 :128], r3\n+        bne         1b\n+\n+        bx          lr\n+\n+endfunc\n+\n+\n+@------------------------------------------------------------------------------\n+@\n+@ Data - has to be in two lumps to ensure we can always reach using adr\n+\n+        .balign 64\n+\n+nbx2_15_0_1_16:\n+        .byte   15, 15, 14, 14, 13, 13, 12, 12\n+        .byte   11, 11, 10, 10,  9,  9,  8,  8\n+nbx2_7_0_1_8:\n+        .byte    7,  7,  6,  6,  5,  5,  4,  4\n+        .byte    3,  3,  2,  2,  1,  1,  0,  0\n+        .byte    1,  1,  2,  2,  3,  3,  4,  4\n+        .byte    5,  5,  6,  6,  7,  7,  8,  8\n+        .byte    9,  9, 10, 10, 11, 11, 12, 12\n+        .byte   13, 13, 14, 14, 15, 15, 16, 16\n+\n+        @ should be back on a 64-byte boundary here\n+\n+nbx2_3_0_1_4:\n+        .byte    3,  3,  2,  2,  1,  1,  0,  0\n+        .byte    1,  1,  2,  2,  3,  3,  4,  4\n+\n+@------------------------------------------------------------------------------\n+\n+\n+@ ff_hevc_rpi_pred_planar_c_8_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_planar_c_8_neon_10, export=1\n+\n+        @ Load from bytes & expand later - at the very least this uses less\n+        @ memory than having a short table\n+        adr         ip, nbx2_7_0_1_8 + 16\n+        vld1.16     {q0-q1}, [r1 :128]! @ Top (left)\n+        add         r2, #32\n+        vld1.8      {q2}, [ip :128]     @ {1,1,2,2,3,3...8,8}\n+        lsl         r3, #2\n+        vld1.32     {d6[],d7[]}, [r1]   @ Top (right)\n+        sub         ip, #16\n+        vmovl.u8    q8, d4\n+        mov         r1, #8\n+        vshl.i16    q9, q0, #3\n+        vmovl.u8    q2, d5\n+        vshl.i16    q10, q1, #3\n+        vld1.32     {d22[],d23[]}, [r2] @ Left (lower)\n+        sub         r2, #32\n+        vld1.8      {q12}, [ip]         @ {7,7,6,6,5,5...0,0}\n+        vmla.i16    q9, q8, q3\n+        vmla.i16    q10, q2, q3         @ Acc set up\n+        vsub.i16    q0, q11, q0\n+        vsub.i16    q1, q11, q1         @ Add set up\n+        vadd.i16    q2, q9, q0\n+        vadd.i16    q3, q10, q1\n+        vmovl.u8    q8, d24\n+        vmovl.u8    q9, d25\n+\n+@ u16  7..0        [2]  q8,q9\n+@ u32 left[y]      [2]  [r2]\n+@ u16 acc          [2]  q2,q3 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially\n+@ u16 add          [2]  q0,q1 = p[-1][nTbs] - p[x][-1]\n+\n+1:\n+        vadd.i16    q10, q2, q0\n+        subs        r1, #2\n+        vld1.32     {d24[],d25[]}, [r2]!\n+        vadd.i16    q11, q3, q1\n+        vld1.32     {d28[],d29[]}, [r2]!\n+        vmla.i16    q2, q8, q12\n+        vmla.i16    q3, q9, q12\n+        vadd.i16    q12, q10, q0\n+        vmla.i16    q10, q8, q14\n+        vadd.i16    q13, q11, q1\n+        vmla.i16    q11, q9, q14\n+        vrshr.u16   q14, q2, #4\n+        vrshr.u16   q15, q3, #4\n+        vmov        q2, q12\n+        vst1.16     {q14-q15}, [r0 :128], r3\n+        vrshr.u16   q14, q10, #4\n+        vrshr.u16   q15, q11, #4\n+        vmov        q3, q13\n+        vst1.16     {q14-q15}, [r0 :128], r3\n+        bne         1b\n+\n+        bx         lr\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_planar_c_16_neon_8\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_planar_c_16_neon_8, export=1\n+\n+        vld1.8      {q0-q1}, [r1 :128]! @ Top (left)\n+        adr         ip, nbx2_15_0_1_16 + 32\n+        vpush       {d8-d12}\n+        vld1.8      {q2-q3}, [ip :128]  @ {1,1,2,2,3,3...16,16}\n+        add         r2, #32\n+        vld1.16     {d8[]}, [r1]        @ Top (right)\n+        sub         ip, #32\n+        vshll.u8    q8, d0, #4\n+        mov         r1, #16\n+        vld1.16     {d9[]}, [r2]        @ Left (lower)\n+        sub         r2, #32\n+        vshll.u8    q9, d1, #4\n+        lsl         r3, #1\n+        vshll.u8    q10, d2, #4\n+        vshll.u8    q11, d3, #4\n+        vmlal.u8    q8, d4, d8\n+        vsubl.u8    q12, d9, d0\n+        vmlal.u8    q9, d5, d8\n+        vsubl.u8    q13, d9, d1\n+        vmlal.u8    q10, d6, d8\n+        vsubl.u8    q14, d9, d2\n+        vmlal.u8    q11, d7, d8         @ Acc set up\n+        vsubl.u8    q15, d9, d3         @ Add set up\n+        vadd.i16    q8, q12\n+        vadd.i16    q9, q13\n+        vadd.i16    q10, q14\n+        vadd.i16    q11, q15\n+        vld1.8      {q4-q5}, [ip :128]  @ {15,15,14,14,13,13...0,0}\n+\n+@ u8  15..0    [2]  q4,q5\n+@ u8  left[y]  [2]  [r2]\n+@ u16 acc      [4]  q8-q11  = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially\n+@ u16 add      [4]  q12-q15 = p[-1][nTbs] - p[x][-1]\n+\n+        vld1.16     {d12[]}, [r2]!\n+        vadd.i16    q0, q8, q12\n+        b           2f\n+1:\n+          vld1.16     {d12[]}, [r2]!\n+        vrshrn.u16  d3, q1, #5\n+        vrshrn.u16  d2, q0, #5\n+          vadd.i16    q0, q8, q12\n+        vrshrn.u16  d4, q2, #5\n+        vrshrn.u16  d5, q3, #5\n+        vst1.8      {q1-q2}, [r0 :128], r3\n+2:        vadd.i16    q1, q9, q13\n+          subs        r1, #2\n+          vadd.i16    q2, q10, q14\n+          vadd.i16    q3, q11, q15\n+          vmlal.u8    q8, d8, d12\n+          vmlal.u8    q9, d9, d12\n+          vmlal.u8    q10, d10, d12\n+          vmlal.u8    q11, d11, d12\n+            vld1.16     {d12[]}, [r2]!\n+          vrshrn.u16  d19, q9, #5\n+          vrshrn.u16  d18, q8, #5\n+            vadd.i16    q8, q0, q12\n+          vrshrn.u16  d20, q10, #5\n+          vrshrn.u16  d21, q11, #5\n+          vst1.8      {q9-q10}, [r0 :128], r3\n+            vadd.i16    q9, q1, q13\n+            vadd.i16    q10, q2, q14\n+            vadd.i16    q11, q3, q15\n+            vmlal.u8    q0, d8, d12\n+            vmlal.u8    q1, d9, d12\n+            vmlal.u8    q2, d10, d12\n+            vmlal.u8    q3, d11, d12\n+\n+        bne         1b\n+\n+        vpop        {d8-d12}\n+\n+        vrshrn.u16  d3, q1, #5\n+        vrshrn.u16  d2, q0, #5\n+        vrshrn.u16  d4, q2, #5\n+        vrshrn.u16  d5, q3, #5\n+        vst1.8      {q1-q2}, [r0 :128]\n+\n+        bx          lr\n+\n+endfunc\n+\n+\n+@ ff_hevc_rpi_pred_planar_c_16_neon_10\n+@       uint8_t *_src,          [r0]\n+@       const uint8_t *_top,    [r1]\n+@       const uint8_t *_left,   [r2]\n+@       ptrdiff_t stride)       [r3]\n+\n+function ff_hevc_rpi_pred_planar_c_16_neon_10, export=1\n+\n+        @ Load from bytes & expand later - at the very least this uses less\n+        @ memory than having a short table\n+        vld1.16     {q0-q1}, [r1 :128]!  @ Top (left)\n+        adr         ip, nbx2_15_0_1_16 + 32\n+        vpush       {q4-q7}\n+        vld1.16     {q2-q3}, [r1 :128]!  @ Top (centre)\n+        add         r2, #64\n+        vld1.8      {q14-q15}, [ip :128] @ {1,1,2,2,3,3...16,16}\n+T       lsl         r3, #2\n+        vld1.32     {d8[],d9[]}, [r1]    @ Top (right)\n+        sub         ip, #32\n+        vmovl.u8    q12, d28\n+        mov         r1, #16\n+        vmovl.u8    q13, d29\n+        vld1.8      {q6-q7}, [ip :128]   @ {15,15,14,14,13,13...0,0}\n+        vmovl.u8    q14, d30\n+        vmovl.u8    q15, d31\n+        vld1.32     {d10[],d11[]}, [r2]  @ Left (lower)\n+        sub         r2, #64\n+        vshl.i16    q8, q0, #4\n+        vshl.i16    q9, q1, #4\n+        vshl.i16    q10, q2, #4\n+        vshl.i16    q11, q3, #4\n+        vmla.i16    q8, q12, q4\n+        vsub.i16    q0, q5, q0\n+        vmla.i16    q9, q13, q4\n+        vpush       {q0}\n+        vsub.i16    q1, q5, q1\n+        vmla.i16    q10, q14, q4\n+        vsub.i16    q2, q5, q2\n+        vmla.i16    q11, q15, q4         @ Acc set up\n+        vsub.i16    q3, q5, q3           @ Add set up\n+        vadd.i16    q8, q0\n+        vadd.i16    q9, q1\n+        vadd.i16    q10, q2\n+        vadd.i16    q11, q3\n+        vmovl.u8    q4, d12\n+        vmovl.u8    q5, d13\n+        vmovl.u8    q6, d14\n+        vmovl.u8    q7, d15\n+\n+@ u16 31..0    [4]  q4-q7\n+@ u16 left[y]  [4]  [r2]\n+@ u16 acc      [4]  q8-q11 = (x+1)*p[nTbS][-1] + 32*p[x][-1] initially\n+@ u16 add      [4]  q0-q3  = p[-1][nTbs] - p[x][-1]\n+\n+        vadd.i16    q12, q8, q0\n+A       sub         r0, r0, r3, lsl #2\n+T       sub         r0, r3\n+1:\n+        vld1.32     {d0[],d1[]}, [r2]!\n+A       add         r0, r0, r3, lsl #2\n+T       add         r0, r3\n+        vadd.i16    q13, q9, q1\n+        subs        r1, #2\n+        vadd.i16    q14, q10, q2\n+        vadd.i16    q15, q11, q3\n+        vmla.i16    q8, q4, q0\n+        vmla.i16    q9, q5, q0\n+        vmla.i16    q10, q6, q0\n+        vmla.i16    q11, q7, q0\n+        vld1.16     {q0}, [sp]\n+        vrshr.u16   q8, #5\n+        vrshr.u16   q9, #5\n+        vrshr.u16   q10, #5\n+        vrshr.u16   q11, #5\n+        vstm        r0, {q8-q11}\n+        vadd.i16    q8, q12, q0\n+A       add         r0, r0, r3, lsl #2\n+T       add         r0, r3\n+        vld1.32     {d0[],d1[]}, [r2]!\n+        vadd.i16    q9, q13, q1\n+        vadd.i16    q10, q14, q2\n+        vadd.i16    q11, q15, q3\n+        vmla.i16    q12, q4, q0\n+        vmla.i16    q13, q5, q0\n+        vmla.i16    q14, q6, q0\n+        vmla.i16    q15, q7, q0\n+        vld1.16     {q0}, [sp]\n+        vrshr.u16   q12, #5\n+        vrshr.u16   q13, #5\n+        vrshr.u16   q14, #5\n+        vrshr.u16   q15, #5\n+        vstm        r0, {q12-q15}\n+        vadd.i16    q12, q8, q0\n+        bne         1b\n+\n+        vpop        {q3-q7}\n+        bx          lr\n+\n+endfunc\ndiff --git a/libavcodec/arm/vc1dsp_init_neon.c b/libavcodec/arm/vc1dsp_init_neon.c\nindex 2cca784f5a..48cb816b70 100644\n--- a/libavcodec/arm/vc1dsp_init_neon.c\n+++ b/libavcodec/arm/vc1dsp_init_neon.c\n@@ -19,6 +19,7 @@\n #include <stdint.h>\n \n #include \"libavutil/attributes.h\"\n+#include \"libavutil/intreadwrite.h\"\n #include \"libavcodec/vc1dsp.h\"\n #include \"vc1dsp.h\"\n \n@@ -32,6 +33,13 @@ void ff_vc1_inv_trans_4x8_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *bloc\n void ff_vc1_inv_trans_8x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);\n void ff_vc1_inv_trans_4x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);\n \n+void ff_vc1_v_loop_filter4_neon(uint8_t *src, int stride, int pq);\n+void ff_vc1_h_loop_filter4_neon(uint8_t *src, int stride, int pq);\n+void ff_vc1_v_loop_filter8_neon(uint8_t *src, int stride, int pq);\n+void ff_vc1_h_loop_filter8_neon(uint8_t *src, int stride, int pq);\n+void ff_vc1_v_loop_filter16_neon(uint8_t *src, int stride, int pq);\n+void ff_vc1_h_loop_filter16_neon(uint8_t *src, int stride, int pq);\n+\n void ff_put_pixels8x8_neon(uint8_t *block, const uint8_t *pixels,\n                            ptrdiff_t line_size, int rnd);\n \n@@ -77,6 +85,64 @@ void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,\n void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,\n                                 int h, int x, int y);\n \n+int ff_vc1_unescape_buffer_helper_neon(const uint8_t *src, int size, uint8_t *dst);\n+\n+static int vc1_unescape_buffer_neon(const uint8_t *src, int size, uint8_t *dst)\n+{\n+    /* Dealing with starting and stopping, and removing escape bytes, are\n+     * comparatively less time-sensitive, so are more clearly expressed using\n+     * a C wrapper around the assembly inner loop. Note that we assume a\n+     * little-endian machine that supports unaligned loads. */\n+    int dsize = 0;\n+    while (size >= 4)\n+    {\n+        int found = 0;\n+        while (!found && (((uintptr_t) dst) & 7) && size >= 4)\n+        {\n+            found = (AV_RL32(src) &~ 0x03000000) == 0x00030000;\n+            if (!found)\n+            {\n+                *dst++ = *src++;\n+                --size;\n+                ++dsize;\n+            }\n+        }\n+        if (!found)\n+        {\n+            int skip = size - ff_vc1_unescape_buffer_helper_neon(src, size, dst);\n+            dst += skip;\n+            src += skip;\n+            size -= skip;\n+            dsize += skip;\n+            while (!found && size >= 4)\n+            {\n+                found = (AV_RL32(src) &~ 0x03000000) == 0x00030000;\n+                if (!found)\n+                {\n+                    *dst++ = *src++;\n+                    --size;\n+                    ++dsize;\n+                }\n+            }\n+        }\n+        if (found)\n+        {\n+            *dst++ = *src++;\n+            *dst++ = *src++;\n+            ++src;\n+            size -= 3;\n+            dsize += 2;\n+        }\n+    }\n+    while (size > 0)\n+    {\n+        *dst++ = *src++;\n+        --size;\n+        ++dsize;\n+    }\n+    return dsize;\n+}\n+\n #define FN_ASSIGN(X, Y) \\\n     dsp->put_vc1_mspel_pixels_tab[0][X+4*Y] = ff_put_vc1_mspel_mc##X##Y##_16_neon; \\\n     dsp->put_vc1_mspel_pixels_tab[1][X+4*Y] = ff_put_vc1_mspel_mc##X##Y##_neon\n@@ -92,6 +158,13 @@ av_cold void ff_vc1dsp_init_neon(VC1DSPContext *dsp)\n     dsp->vc1_inv_trans_8x4_dc = ff_vc1_inv_trans_8x4_dc_neon;\n     dsp->vc1_inv_trans_4x4_dc = ff_vc1_inv_trans_4x4_dc_neon;\n \n+    dsp->vc1_v_loop_filter4  = ff_vc1_v_loop_filter4_neon;\n+    dsp->vc1_h_loop_filter4  = ff_vc1_h_loop_filter4_neon;\n+    dsp->vc1_v_loop_filter8  = ff_vc1_v_loop_filter8_neon;\n+    dsp->vc1_h_loop_filter8  = ff_vc1_h_loop_filter8_neon;\n+    dsp->vc1_v_loop_filter16 = ff_vc1_v_loop_filter16_neon;\n+    dsp->vc1_h_loop_filter16 = ff_vc1_h_loop_filter16_neon;\n+\n     dsp->put_vc1_mspel_pixels_tab[1][ 0] = ff_put_pixels8x8_neon;\n     FN_ASSIGN(1, 0);\n     FN_ASSIGN(2, 0);\n@@ -116,4 +189,6 @@ av_cold void ff_vc1dsp_init_neon(VC1DSPContext *dsp)\n     dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_neon;\n     dsp->put_no_rnd_vc1_chroma_pixels_tab[1] = ff_put_vc1_chroma_mc4_neon;\n     dsp->avg_no_rnd_vc1_chroma_pixels_tab[1] = ff_avg_vc1_chroma_mc4_neon;\n+\n+    dsp->vc1_unescape_buffer = vc1_unescape_buffer_neon;\n }\ndiff --git a/libavcodec/arm/vc1dsp_neon.S b/libavcodec/arm/vc1dsp_neon.S\nindex 93f043bf08..96014fbebc 100644\n--- a/libavcodec/arm/vc1dsp_neon.S\n+++ b/libavcodec/arm/vc1dsp_neon.S\n@@ -1161,3 +1161,764 @@ function ff_vc1_inv_trans_4x4_dc_neon, export=1\n         vst1.32         {d1[1]},  [r0,:32]\n         bx              lr\n endfunc\n+\n+@ VC-1 in-loop deblocking filter for 4 pixel pairs at boundary of vertically-neighbouring blocks\n+@ On entry:\n+@   r0 -> top-left pel of lower block\n+@   r1 = row stride, bytes\n+@   r2 = PQUANT bitstream parameter\n+function ff_vc1_v_loop_filter4_neon, export=1\n+        sub             r3, r0, r1, lsl #2\n+        vldr            d0, .Lcoeffs\n+        vld1.32         {d1[0]}, [r0], r1       @ P5\n+        vld1.32         {d2[0]}, [r3], r1       @ P1\n+        vld1.32         {d3[0]}, [r3], r1       @ P2\n+        vld1.32         {d4[0]}, [r0], r1       @ P6\n+        vld1.32         {d5[0]}, [r3], r1       @ P3\n+        vld1.32         {d6[0]}, [r0], r1       @ P7\n+        vld1.32         {d7[0]}, [r3]           @ P4\n+        vld1.32         {d16[0]}, [r0]          @ P8\n+        vshll.u8        q9, d1, #1              @ 2*P5\n+        vdup.16         d17, r2                 @ pq\n+        vshll.u8        q10, d2, #1             @ 2*P1\n+        vmovl.u8        q11, d3                 @ P2\n+        vmovl.u8        q1, d4                  @ P6\n+        vmovl.u8        q12, d5                 @ P3\n+        vmls.i16        d20, d22, d0[1]         @ 2*P1-5*P2\n+        vmovl.u8        q11, d6                 @ P7\n+        vmls.i16        d18, d2, d0[1]          @ 2*P5-5*P6\n+        vshll.u8        q2, d5, #1              @ 2*P3\n+        vmovl.u8        q3, d7                  @ P4\n+        vmla.i16        d18, d22, d0[1]         @ 2*P5-5*P6+5*P7\n+        vmovl.u8        q11, d16                @ P8\n+        vmla.u16        d20, d24, d0[1]         @ 2*P1-5*P2+5*P3\n+        vmovl.u8        q12, d1                 @ P5\n+        vmls.u16        d4, d6, d0[1]           @ 2*P3-5*P4\n+        vmls.u16        d18, d22, d0[0]         @ 2*P5-5*P6+5*P7-2*P8\n+        vsub.i16        d1, d6, d24             @ P4-P5\n+        vmls.i16        d20, d6, d0[0]          @ 2*P1-5*P2+5*P3-2*P4\n+        vmla.i16        d4, d24, d0[1]          @ 2*P3-5*P4+5*P5\n+        vmls.i16        d4, d2, d0[0]           @ 2*P3-5*P4+5*P5-2*P6\n+        vabs.s16        d2, d1\n+        vrshr.s16       d3, d18, #3\n+        vrshr.s16       d5, d20, #3\n+        vshr.s16        d2, d2, #1              @ clip\n+        vrshr.s16       d4, d4, #3\n+        vabs.s16        d3, d3                  @ a2\n+        vshr.s16        d1, d1, #8              @ clip_sign\n+        vabs.s16        d5, d5                  @ a1\n+        vceq.i16        d7, d2, #0              @ test clip == 0\n+        vabs.s16        d16, d4                 @ a0\n+        vshr.s16        d4, d4, #8              @ a0_sign\n+        vcge.s16        d18, d5, d3             @ test a1 >= a2\n+        vcge.s16        d17, d16, d17           @ test a0 >= pq\n+        vbsl            d18, d3, d5             @ a3\n+        vsub.i16        d1, d1, d4              @ clip_sign - a0_sign\n+        vorr            d3, d7, d17             @ test clip == 0 || a0 >= pq\n+        vqsub.u16       d4, d16, d18            @ a0 >= a3 ? a0-a3 : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        vcge.s16        d5, d18, d16            @ test a3 >= a0\n+        vmul.i16        d0, d4, d0[1]           @ a0 >= a3 ? 5*(a0-a3) : 0\n+        vorr            d4, d3, d5              @ test clip == 0 || a0 >= pq || a3 >= a0\n+        vmov.32         r0, d4[1]               @ move to gp reg\n+        vshr.u16        d0, d0, #3              @ a0 >= a3 ? (5*(a0-a3))>>3 : 0\n+        vcge.s16        d4, d0, d2\n+        tst             r0, #1\n+        bne             1f                      @ none of the 4 pixel pairs should be updated if this one is not filtered\n+        vbsl            d4, d2, d0              @ FFMIN(d, clip)\n+        vbic            d0, d4, d3              @ set each d to zero if it should not be filtered because clip == 0 || a0 >= pq (a3 > a0 case already zeroed by saturating sub)\n+        vmls.i16        d6, d0, d1              @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4\n+        vmla.i16        d24, d0, d1             @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5\n+        vqmovun.s16     d0, q3\n+        vqmovun.s16     d1, q12\n+        vst1.32         {d0[0]}, [r3], r1\n+        vst1.32         {d1[0]}, [r3]\n+1:      bx              lr\n+endfunc\n+\n+@ VC-1 in-loop deblocking filter for 4 pixel pairs at boundary of horizontally-neighbouring blocks\n+@ On entry:\n+@   r0 -> top-left pel of right block\n+@   r1 = row stride, bytes\n+@   r2 = PQUANT bitstream parameter\n+function ff_vc1_h_loop_filter4_neon, export=1\n+        sub             r3, r0, #4              @ where to start reading\n+        vldr            d0, .Lcoeffs\n+        vld1.32         {d2}, [r3], r1\n+        sub             r0, r0, #1              @ where to start writing\n+        vld1.32         {d4}, [r3], r1\n+        vld1.32         {d3}, [r3], r1\n+        vld1.32         {d5}, [r3]\n+        vdup.16         d1, r2                  @ pq\n+        vtrn.8          q1, q2\n+        vtrn.16         d2, d3                  @ P1, P5, P3, P7\n+        vtrn.16         d4, d5                  @ P2, P6, P4, P8\n+        vshll.u8        q3, d2, #1              @ 2*P1, 2*P5\n+        vmovl.u8        q8, d4                  @ P2, P6\n+        vmovl.u8        q9, d3                  @ P3, P7\n+        vmovl.u8        q2, d5                  @ P4, P8\n+        vmls.i16        q3, q8, d0[1]           @ 2*P1-5*P2, 2*P5-5*P6\n+        vshll.u8        q10, d3, #1             @ 2*P3, 2*P7\n+        vmovl.u8        q1, d2                  @ P1, P5\n+        vmla.i16        q3, q9, d0[1]           @ 2*P1-5*P2+5*P3, 2*P5-5*P6+5*P7\n+        vmls.i16        q3, q2, d0[0]           @ 2*P1-5*P2+5*P3-2*P4, 2*P5-5*P6+5*P7-2*P8\n+        vmov            d2, d3                  @ needs to be in an even-numbered vector for when we come to narrow it later\n+        vmls.i16        d20, d4, d0[1]          @ 2*P3-5*P4\n+        vmla.i16        d20, d3, d0[1]          @ 2*P3-5*P4+5*P5\n+        vsub.i16        d3, d4, d2              @ P4-P5\n+        vmls.i16        d20, d17, d0[0]         @ 2*P3-5*P4+5*P5-2*P6\n+        vrshr.s16       q3, q3, #3\n+        vabs.s16        d5, d3\n+        vshr.s16        d3, d3, #8              @ clip_sign\n+        vrshr.s16       d16, d20, #3\n+        vabs.s16        q3, q3                  @ a1, a2\n+        vshr.s16        d5, d5, #1              @ clip\n+        vabs.s16        d17, d16                @ a0\n+        vceq.i16        d18, d5, #0             @ test clip == 0\n+        vshr.s16        d16, d16, #8            @ a0_sign\n+        vcge.s16        d19, d6, d7             @ test a1 >= a2\n+        vcge.s16        d1, d17, d1             @ test a0 >= pq\n+        vsub.i16        d16, d3, d16            @ clip_sign - a0_sign\n+        vbsl            d19, d7, d6             @ a3\n+        vorr            d1, d18, d1             @ test clip == 0 || a0 >= pq\n+        vqsub.u16       d3, d17, d19            @ a0 >= a3 ? a0-a3 : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        vcge.s16        d6, d19, d17            @ test a3 >= a0    @\n+        vmul.i16        d0, d3, d0[1]           @ a0 >= a3 ? 5*(a0-a3) : 0\n+        vorr            d3, d1, d6              @ test clip == 0 || a0 >= pq || a3 >= a0\n+        vmov.32         r2, d3[1]               @ move to gp reg\n+        vshr.u16        d0, d0, #3              @ a0 >= a3 ? (5*(a0-a3))>>3 : 0\n+        vcge.s16        d3, d0, d5\n+        tst             r2, #1\n+        bne             1f                      @ none of the 4 pixel pairs should be updated if this one is not filtered\n+        vbsl            d3, d5, d0              @ FFMIN(d, clip)\n+        vbic            d0, d3, d1              @ set each d to zero if it should not be filtered because clip == 0 || a0 >= pq (a3 > a0 case already zeroed by saturating sub)\n+        vmla.i16        d2, d0, d16             @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5\n+        vmls.i16        d4, d0, d16             @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4\n+        vqmovun.s16     d1, q1\n+        vqmovun.s16     d0, q2\n+        vst2.8          {d0[0], d1[0]}, [r0], r1\n+        vst2.8          {d0[1], d1[1]}, [r0], r1\n+        vst2.8          {d0[2], d1[2]}, [r0], r1\n+        vst2.8          {d0[3], d1[3]}, [r0]\n+1:      bx              lr\n+endfunc\n+\n+@ VC-1 in-loop deblocking filter for 8 pixel pairs at boundary of vertically-neighbouring blocks\n+@ On entry:\n+@   r0 -> top-left pel of lower block\n+@   r1 = row stride, bytes\n+@   r2 = PQUANT bitstream parameter\n+function ff_vc1_v_loop_filter8_neon, export=1\n+        sub             r3, r0, r1, lsl #2\n+        vldr            d0, .Lcoeffs\n+        vld1.32         {d1}, [r0 :64], r1      @ P5\n+        vld1.32         {d2}, [r3 :64], r1      @ P1\n+        vld1.32         {d3}, [r3 :64], r1      @ P2\n+        vld1.32         {d4}, [r0 :64], r1      @ P6\n+        vld1.32         {d5}, [r3 :64], r1      @ P3\n+        vld1.32         {d6}, [r0 :64], r1      @ P7\n+        vshll.u8        q8, d1, #1              @ 2*P5\n+        vshll.u8        q9, d2, #1              @ 2*P1\n+        vld1.32         {d7}, [r3 :64]          @ P4\n+        vmovl.u8        q1, d3                  @ P2\n+        vld1.32         {d20}, [r0 :64]         @ P8\n+        vmovl.u8        q11, d4                 @ P6\n+        vdup.16         q12, r2                 @ pq\n+        vmovl.u8        q13, d5                 @ P3\n+        vmls.i16        q9, q1, d0[1]           @ 2*P1-5*P2\n+        vmovl.u8        q1, d6                  @ P7\n+        vshll.u8        q2, d5, #1              @ 2*P3\n+        vmls.i16        q8, q11, d0[1]          @ 2*P5-5*P6\n+        vmovl.u8        q3, d7                  @ P4\n+        vmovl.u8        q10, d20                @ P8\n+        vmla.i16        q8, q1, d0[1]           @ 2*P5-5*P6+5*P7\n+        vmovl.u8        q1, d1                  @ P5\n+        vmla.i16        q9, q13, d0[1]          @ 2*P1-5*P2+5*P3\n+        vsub.i16        q13, q3, q1             @ P4-P5\n+        vmls.i16        q2, q3, d0[1]           @ 2*P3-5*P4\n+        vmls.i16        q8, q10, d0[0]          @ 2*P5-5*P6+5*P7-2*P8\n+        vabs.s16        q10, q13\n+        vshr.s16        q13, q13, #8            @ clip_sign\n+        vmls.i16        q9, q3, d0[0]           @ 2*P1-5*P2+5*P3-2*P4\n+        vshr.s16        q10, q10, #1            @ clip\n+        vmla.i16        q2, q1, d0[1]           @ 2*P3-5*P4+5*P5\n+        vrshr.s16       q8, q8, #3\n+        vmls.i16        q2, q11, d0[0]          @ 2*P3-5*P4+5*P5-2*P6\n+        vceq.i16        q11, q10, #0            @ test clip == 0\n+        vrshr.s16       q9, q9, #3\n+        vabs.s16        q8, q8                  @ a2\n+        vabs.s16        q9, q9                  @ a1\n+        vrshr.s16       q2, q2, #3\n+        vcge.s16        q14, q9, q8             @ test a1 >= a2\n+        vabs.s16        q15, q2                 @ a0\n+        vshr.s16        q2, q2, #8              @ a0_sign\n+        vbsl            q14, q8, q9             @ a3\n+        vcge.s16        q8, q15, q12            @ test a0 >= pq\n+        vsub.i16        q2, q13, q2             @ clip_sign - a0_sign\n+        vqsub.u16       q9, q15, q14            @ a0 >= a3 ? a0-a3 : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        vcge.s16        q12, q14, q15           @ test a3 >= a0\n+        vorr            q8, q11, q8             @ test clip == 0 || a0 >= pq\n+        vmul.i16        q0, q9, d0[1]           @ a0 >= a3 ? 5*(a0-a3) : 0\n+        vorr            q9, q8, q12             @ test clip == 0 || a0 >= pq || a3 >= a0\n+        vshl.i64        q11, q9, #16\n+        vmov.32         r0, d18[1]              @ move to gp reg\n+        vshr.u16        q0, q0, #3              @ a0 >= a3 ? (5*(a0-a3))>>3 : 0\n+        vmov.32         r2, d19[1]\n+        vshr.s64        q9, q11, #48\n+        vcge.s16        q11, q0, q10\n+        vorr            q8, q8, q9\n+        and             r0, r0, r2\n+        vbsl            q11, q10, q0            @ FFMIN(d, clip)\n+        tst             r0, #1\n+        bne             1f                      @ none of the 8 pixel pairs should be updated in this case\n+        vbic            q0, q11, q8             @ set each d to zero if it should not be filtered\n+        vmls.i16        q3, q0, q2              @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4\n+        vmla.i16        q1, q0, q2              @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5\n+        vqmovun.s16     d0, q3\n+        vqmovun.s16     d1, q1\n+        vst1.32         {d0}, [r3 :64], r1\n+        vst1.32         {d1}, [r3 :64]\n+1:      bx              lr\n+endfunc\n+\n+.align  5\n+.Lcoeffs:\n+.quad   0x00050002\n+\n+@ VC-1 in-loop deblocking filter for 8 pixel pairs at boundary of horizontally-neighbouring blocks\n+@ On entry:\n+@   r0 -> top-left pel of right block\n+@   r1 = row stride, bytes\n+@   r2 = PQUANT bitstream parameter\n+function ff_vc1_h_loop_filter8_neon, export=1\n+        push            {lr}\n+        sub             r3, r0, #4              @ where to start reading\n+        vldr            d0, .Lcoeffs\n+        vld1.32         {d2}, [r3], r1          @ P1[0], P2[0]...\n+        sub             r0, r0, #1              @ where to start writing\n+        vld1.32         {d4}, [r3], r1\n+        add             r12, r0, r1, lsl #2\n+        vld1.32         {d3}, [r3], r1\n+        vld1.32         {d5}, [r3], r1\n+        vld1.32         {d6}, [r3], r1\n+        vld1.32         {d16}, [r3], r1\n+        vld1.32         {d7}, [r3], r1\n+        vld1.32         {d17}, [r3]\n+        vtrn.8          q1, q2                  @ P1[0], P1[1], P3[0]... P1[2], P1[3], P3[2]... P2[0], P2[1], P4[0]... P2[2], P2[3], P4[2]...\n+        vdup.16         q9, r2                  @ pq\n+        vtrn.16         d2, d3                  @ P1[0], P1[1], P1[2], P1[3], P5[0]... P3[0], P3[1], P3[2], P3[3], P7[0]...\n+        vtrn.16         d4, d5                  @ P2[0], P2[1], P2[2], P2[3], P6[0]... P4[0], P4[1], P4[2], P4[3], P8[0]...\n+        vtrn.8          q3, q8                  @ P1[4], P1[5], P3[4]... P1[6], P1[7], P3[6]... P2[4], P2[5], P4[4]... P2[6], P2[7], P4[6]...\n+        vtrn.16         d6, d7                  @ P1[4], P1[5], P1[6], P1[7], P5[4]... P3[4], P3[5], P3[5], P3[7], P7[4]...\n+        vtrn.16         d16, d17                @ P2[4], P2[5], P2[6], P2[7], P6[4]... P4[4], P4[5], P4[6], P4[7], P8[4]...\n+        vtrn.32         d2, d6                  @ P1, P5\n+        vtrn.32         d4, d16                 @ P2, P6\n+        vtrn.32         d3, d7                  @ P3, P7\n+        vtrn.32         d5, d17                 @ P4, P8\n+        vshll.u8        q10, d2, #1             @ 2*P1\n+        vshll.u8        q11, d6, #1             @ 2*P5\n+        vmovl.u8        q12, d4                 @ P2\n+        vmovl.u8        q13, d16                @ P6\n+        vmovl.u8        q14, d3                 @ P3\n+        vmls.i16        q10, q12, d0[1]         @ 2*P1-5*P2\n+        vmovl.u8        q12, d7                 @ P7\n+        vshll.u8        q1, d3, #1              @ 2*P3\n+        vmls.i16        q11, q13, d0[1]         @ 2*P5-5*P6\n+        vmovl.u8        q2, d5                  @ P4\n+        vmovl.u8        q8, d17                 @ P8\n+        vmla.i16        q11, q12, d0[1]         @ 2*P5-5*P6+5*P7\n+        vmovl.u8        q3, d6                  @ P5\n+        vmla.i16        q10, q14, d0[1]         @ 2*P1-5*P2+5*P3\n+        vsub.i16        q12, q2, q3             @ P4-P5\n+        vmls.i16        q1, q2, d0[1]           @ 2*P3-5*P4\n+        vmls.i16        q11, q8, d0[0]          @ 2*P5-5*P6+5*P7-2*P8\n+        vabs.s16        q8, q12\n+        vshr.s16        q12, q12, #8            @ clip_sign\n+        vmls.i16        q10, q2, d0[0]          @ 2*P1-5*P2+5*P3-2*P4\n+        vshr.s16        q8, q8, #1              @ clip\n+        vmla.i16        q1, q3, d0[1]           @ 2*P3-5*P4+5*P5\n+        vrshr.s16       q11, q11, #3\n+        vmls.i16        q1, q13, d0[0]          @ 2*P3-5*P4+5*P5-2*P6\n+        vceq.i16        q13, q8, #0             @ test clip == 0\n+        vrshr.s16       q10, q10, #3\n+        vabs.s16        q11, q11                @ a2\n+        vabs.s16        q10, q10                @ a1\n+        vrshr.s16       q1, q1, #3\n+        vcge.s16        q14, q10, q11           @ test a1 >= a2\n+        vabs.s16        q15, q1                 @ a0\n+        vshr.s16        q1, q1, #8              @ a0_sign\n+        vbsl            q14, q11, q10           @ a3\n+        vcge.s16        q9, q15, q9             @ test a0 >= pq\n+        vsub.i16        q1, q12, q1             @ clip_sign - a0_sign\n+        vqsub.u16       q10, q15, q14           @ a0 >= a3 ? a0-a3 : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        vcge.s16        q11, q14, q15           @ test a3 >= a0\n+        vorr            q9, q13, q9             @ test clip == 0 || a0 >= pq\n+        vmul.i16        q0, q10, d0[1]          @ a0 >= a3 ? 5*(a0-a3) : 0\n+        vorr            q10, q9, q11            @ test clip == 0 || a0 >= pq || a3 >= a0\n+        vmov.32         r2, d20[1]              @ move to gp reg\n+        vshr.u16        q0, q0, #3              @ a0 >= a3 ? (5*(a0-a3))>>3 : 0\n+        vmov.32         r3, d21[1]\n+        vcge.s16        q10, q0, q8\n+        and             r14, r2, r3\n+        vbsl            q10, q8, q0             @ FFMIN(d, clip)\n+        tst             r14, #1\n+        bne             2f                      @ none of the 8 pixel pairs should be updated in this case\n+        vbic            q0, q10, q9             @ set each d to zero if it should not be filtered because clip == 0 || a0 >= pq (a3 > a0 case already zeroed by saturating sub)\n+        vmla.i16        q3, q0, q1              @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P5\n+        vmls.i16        q2, q0, q1              @ invert d depending on clip_sign & a0_sign, or zero it if they match, and accumulate into P4\n+        vqmovun.s16     d1, q3\n+        vqmovun.s16     d0, q2\n+        tst             r2, #1\n+        bne             1f                      @ none of the first 4 pixel pairs should be updated if so\n+        vst2.8          {d0[0], d1[0]}, [r0], r1\n+        vst2.8          {d0[1], d1[1]}, [r0], r1\n+        vst2.8          {d0[2], d1[2]}, [r0], r1\n+        vst2.8          {d0[3], d1[3]}, [r0]\n+1:      tst             r3, #1\n+        bne             2f                      @ none of the second 4 pixel pairs should be updated if so\n+        vst2.8          {d0[4], d1[4]}, [r12], r1\n+        vst2.8          {d0[5], d1[5]}, [r12], r1\n+        vst2.8          {d0[6], d1[6]}, [r12], r1\n+        vst2.8          {d0[7], d1[7]}, [r12]\n+2:      pop             {pc}\n+endfunc\n+\n+@ VC-1 in-loop deblocking filter for 16 pixel pairs at boundary of vertically-neighbouring blocks\n+@ On entry:\n+@   r0 -> top-left pel of lower block\n+@   r1 = row stride, bytes\n+@   r2 = PQUANT bitstream parameter\n+function ff_vc1_v_loop_filter16_neon, export=1\n+        vpush           {d8-d15}\n+        sub             r3, r0, r1, lsl #2\n+        vldr            d0, .Lcoeffs\n+        vld1.64         {q1}, [r0 :128], r1     @ P5\n+        vld1.64         {q2}, [r3 :128], r1     @ P1\n+        vld1.64         {q3}, [r3 :128], r1     @ P2\n+        vld1.64         {q4}, [r0 :128], r1     @ P6\n+        vld1.64         {q5}, [r3 :128], r1     @ P3\n+        vld1.64         {q6}, [r0 :128], r1     @ P7\n+        vshll.u8        q7, d2, #1              @ 2*P5[0..7]\n+        vshll.u8        q8, d4, #1              @ 2*P1[0..7]\n+        vld1.64         {q9}, [r3 :128]         @ P4\n+        vmovl.u8        q10, d6                 @ P2[0..7]\n+        vld1.64         {q11}, [r0 :128]        @ P8\n+        vmovl.u8        q12, d8                 @ P6[0..7]\n+        vdup.16         q13, r2                 @ pq\n+        vshll.u8        q2, d5, #1              @ 2*P1[8..15]\n+        vmls.i16        q8, q10, d0[1]          @ 2*P1[0..7]-5*P2[0..7]\n+        vshll.u8        q10, d3, #1             @ 2*P5[8..15]\n+        vmovl.u8        q3, d7                  @ P2[8..15]\n+        vmls.i16        q7, q12, d0[1]          @ 2*P5[0..7]-5*P6[0..7]\n+        vmovl.u8        q4, d9                  @ P6[8..15]\n+        vmovl.u8        q14, d10                @ P3[0..7]\n+        vmovl.u8        q15, d12                @ P7[0..7]\n+        vmls.i16        q2, q3, d0[1]           @ 2*P1[8..15]-5*P2[8..15]\n+        vshll.u8        q3, d10, #1             @ 2*P3[0..7]\n+        vmls.i16        q10, q4, d0[1]          @ 2*P5[8..15]-5*P6[8..15]\n+        vmovl.u8        q6, d13                 @ P7[8..15]\n+        vmla.i16        q8, q14, d0[1]          @ 2*P1[0..7]-5*P2[0..7]+5*P3[0..7]\n+        vmovl.u8        q14, d18                @ P4[0..7]\n+        vmovl.u8        q9, d19                 @ P4[8..15]\n+        vmla.i16        q7, q15, d0[1]          @ 2*P5[0..7]-5*P6[0..7]+5*P7[0..7]\n+        vmovl.u8        q15, d11                @ P3[8..15]\n+        vshll.u8        q5, d11, #1             @ 2*P3[8..15]\n+        vmls.i16        q3, q14, d0[1]          @ 2*P3[0..7]-5*P4[0..7]\n+        vmla.i16        q2, q15, d0[1]          @ 2*P1[8..15]-5*P2[8..15]+5*P3[8..15]\n+        vmovl.u8        q15, d22                @ P8[0..7]\n+        vmovl.u8        q11, d23                @ P8[8..15]\n+        vmla.i16        q10, q6, d0[1]          @ 2*P5[8..15]-5*P6[8..15]+5*P7[8..15]\n+        vmovl.u8        q6, d2                  @ P5[0..7]\n+        vmovl.u8        q1, d3                  @ P5[8..15]\n+        vmls.i16        q5, q9, d0[1]           @ 2*P3[8..15]-5*P4[8..15]\n+        vmls.i16        q8, q14, d0[0]          @ 2*P1[0..7]-5*P2[0..7]+5*P3[0..7]-2*P4[0..7]\n+        vmls.i16        q7, q15, d0[0]          @ 2*P5[0..7]-5*P6[0..7]+5*P7[0..7]-2*P8[0..7]\n+        vsub.i16        q15, q14, q6            @ P4[0..7]-P5[0..7]\n+        vmla.i16        q3, q6, d0[1]           @ 2*P3[0..7]-5*P4[0..7]+5*P5[0..7]\n+        vrshr.s16       q8, q8, #3\n+        vmls.i16        q2, q9, d0[0]           @ 2*P1[8..15]-5*P2[8..15]+5*P3[8..15]-2*P4[8..15]\n+        vrshr.s16       q7, q7, #3\n+        vmls.i16        q10, q11, d0[0]         @ 2*P5[8..15]-5*P6[8..15]+5*P7[8..15]-2*P8[8..15]\n+        vabs.s16        q11, q15\n+        vabs.s16        q8, q8                  @ a1[0..7]\n+        vmla.i16        q5, q1, d0[1]           @ 2*P3[8..15]-5*P4[8..15]+5*P5[8..15]\n+        vshr.s16        q15, q15, #8            @ clip_sign[0..7]\n+        vrshr.s16       q2, q2, #3\n+        vmls.i16        q3, q12, d0[0]          @ 2*P3[0..7]-5*P4[0..7]+5*P5[0..7]-2*P6[0..7]\n+        vabs.s16        q7, q7                  @ a2[0..7]\n+        vrshr.s16       q10, q10, #3\n+        vsub.i16        q12, q9, q1             @ P4[8..15]-P5[8..15]\n+        vshr.s16        q11, q11, #1            @ clip[0..7]\n+        vmls.i16        q5, q4, d0[0]           @ 2*P3[8..15]-5*P4[8..15]+5*P5[8..15]-2*P6[8..15]\n+        vcge.s16        q4, q8, q7              @ test a1[0..7] >= a2[0..7]\n+        vabs.s16        q2, q2                  @ a1[8..15]\n+        vrshr.s16       q3, q3, #3\n+        vabs.s16        q10, q10                @ a2[8..15]\n+        vbsl            q4, q7, q8              @ a3[0..7]\n+        vabs.s16        q7, q12\n+        vshr.s16        q8, q12, #8             @ clip_sign[8..15]\n+        vrshr.s16       q5, q5, #3\n+        vcge.s16        q12, q2, q10            @ test a1[8..15] >= a2[8.15]\n+        vshr.s16        q7, q7, #1              @ clip[8..15]\n+        vbsl            q12, q10, q2            @ a3[8..15]\n+        vabs.s16        q2, q3                  @ a0[0..7]\n+        vceq.i16        q10, q11, #0            @ test clip[0..7] == 0\n+        vshr.s16        q3, q3, #8              @ a0_sign[0..7]\n+        vsub.i16        q3, q15, q3             @ clip_sign[0..7] - a0_sign[0..7]\n+        vcge.s16        q15, q2, q13            @ test a0[0..7] >= pq\n+        vorr            q10, q10, q15           @ test clip[0..7] == 0 || a0[0..7] >= pq\n+        vqsub.u16       q15, q2, q4             @ a0[0..7] >= a3[0..7] ? a0[0..7]-a3[0..7] : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        vcge.s16        q2, q4, q2              @ test a3[0..7] >= a0[0..7]\n+        vabs.s16        q4, q5                  @ a0[8..15]\n+        vshr.s16        q5, q5, #8              @ a0_sign[8..15]\n+        vmul.i16        q15, q15, d0[1]         @ a0[0..7] >= a3[0..7] ? 5*(a0[0..7]-a3[0..7]) : 0\n+        vcge.s16        q13, q4, q13            @ test a0[8..15] >= pq\n+        vorr            q2, q10, q2             @ test clip[0..7] == 0 || a0[0..7] >= pq || a3[0..7] >= a0[0..7]\n+        vsub.i16        q5, q8, q5              @ clip_sign[8..15] - a0_sign[8..15]\n+        vceq.i16        q8, q7, #0              @ test clip[8..15] == 0\n+        vshr.u16        q15, q15, #3            @ a0[0..7] >= a3[0..7] ? (5*(a0[0..7]-a3[0..7]))>>3 : 0\n+        vmov.32         r0, d4[1]               @ move to gp reg\n+        vorr            q8, q8, q13             @ test clip[8..15] == 0 || a0[8..15] >= pq\n+        vqsub.u16       q13, q4, q12            @ a0[8..15] >= a3[8..15] ? a0[8..15]-a3[8..15] : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        vmov.32         r2, d5[1]\n+        vcge.s16        q4, q12, q4             @ test a3[8..15] >= a0[8..15]\n+        vshl.i64        q2, q2, #16\n+        vcge.s16        q12, q15, q11\n+        vmul.i16        q0, q13, d0[1]          @ a0[8..15] >= a3[8..15] ? 5*(a0[8..15]-a3[8..15]) : 0\n+        vorr            q4, q8, q4              @ test clip[8..15] == 0 || a0[8..15] >= pq || a3[8..15] >= a0[8..15]\n+        vshr.s64        q2, q2, #48\n+        and             r0, r0, r2\n+        vbsl            q12, q11, q15           @ FFMIN(d[0..7], clip[0..7])\n+        vshl.i64        q11, q4, #16\n+        vmov.32         r2, d8[1]\n+        vshr.u16        q0, q0, #3              @ a0[8..15] >= a3[8..15] ? (5*(a0[8..15]-a3[8..15]))>>3 : 0\n+        vorr            q2, q10, q2\n+        vmov.32         r12, d9[1]\n+        vshr.s64        q4, q11, #48\n+        vcge.s16        q10, q0, q7\n+        vbic            q2, q12, q2             @ set each d[0..7] to zero if it should not be filtered because clip[0..7] == 0 || a0[0..7] >= pq (a3 > a0 case already zeroed by saturating sub)\n+        vorr            q4, q8, q4\n+        and             r2, r2, r12\n+        vbsl            q10, q7, q0             @ FFMIN(d[8..15], clip[8..15])\n+        vmls.i16        q14, q2, q3             @ invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P4[0..7]\n+        and             r0, r0, r2\n+        vbic            q0, q10, q4             @ set each d[8..15] to zero if it should not be filtered because clip[8..15] == 0 || a0[8..15] >= pq (a3 > a0 case already zeroed by saturating sub)\n+        tst             r0, #1\n+        bne             1f                      @ none of the 16 pixel pairs should be updated in this case\n+        vmla.i16        q6, q2, q3              @ invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P5[0..7]\n+        vmls.i16        q9, q0, q5              @ invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P4[8..15]\n+        vqmovun.s16     d4, q14\n+        vmla.i16        q1, q0, q5              @ invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P5[8..15]\n+        vqmovun.s16     d0, q6\n+        vqmovun.s16     d5, q9\n+        vqmovun.s16     d1, q1\n+        vst1.64         {q2}, [r3 :128], r1\n+        vst1.64         {q0}, [r3 :128]\n+1:      vpop            {d8-d15}\n+        bx              lr\n+endfunc\n+\n+@ VC-1 in-loop deblocking filter for 16 pixel pairs at boundary of horizontally-neighbouring blocks\n+@ On entry:\n+@   r0 -> top-left pel of right block\n+@   r1 = row stride, bytes\n+@   r2 = PQUANT bitstream parameter\n+function ff_vc1_h_loop_filter16_neon, export=1\n+        push            {r4-r6,lr}\n+        vpush           {d8-d15}\n+        sub             r3, r0, #4              @ where to start reading\n+        vldr            d0, .Lcoeffs\n+        vld1.32         {d2}, [r3], r1          @ P1[0], P2[0]...\n+        sub             r0, r0, #1              @ where to start writing\n+        vld1.32         {d3}, [r3], r1\n+        add             r4, r0, r1, lsl #2\n+        vld1.32         {d10}, [r3], r1\n+        vld1.32         {d11}, [r3], r1\n+        vld1.32         {d16}, [r3], r1\n+        vld1.32         {d4}, [r3], r1\n+        vld1.32         {d8}, [r3], r1\n+        vtrn.8          d2, d3                  @ P1[0], P1[1], P3[0]... P2[0], P2[1], P4[0]...\n+        vld1.32         {d14}, [r3], r1\n+        vld1.32         {d5}, [r3], r1\n+        vtrn.8          d10, d11                @ P1[2], P1[3], P3[2]... P2[2], P2[3], P4[2]...\n+        vld1.32         {d6}, [r3], r1\n+        vld1.32         {d12}, [r3], r1\n+        vtrn.8          d16, d4                 @ P1[4], P1[5], P3[4]... P2[4], P2[5], P4[4]...\n+        vld1.32         {d13}, [r3], r1\n+        vtrn.16         d2, d10                 @ P1[0], P1[1], P1[2], P1[3], P5[0]... P3[0], P3[1], P3[2], P3[3], P7[0]...\n+        vld1.32         {d1}, [r3], r1\n+        vtrn.8          d8, d14                 @ P1[6], P1[7], P3[6]... P2[6], P2[7], P4[6]...\n+        vld1.32         {d7}, [r3], r1\n+        vtrn.16         d3, d11                 @ P2[0], P2[1], P2[2], P2[3], P6[0]... P4[0], P4[1], P4[2], P4[3], P8[0]...\n+        vld1.32         {d9}, [r3], r1\n+        vtrn.8          d5, d6                  @ P1[8], P1[9], P3[8]... P2[8], P2[9], P4[8]...\n+        vld1.32         {d15}, [r3]\n+        vtrn.16         d16, d8                 @ P1[4], P1[5], P1[6], P1[7], P5[4]... P3[4], P3[5], P3[6], P3[7], P7[4]...\n+        vtrn.16         d4, d14                 @ P2[4], P2[5], P2[6], P2[7], P6[4]... P4[4], P4[5], P4[6], P4[7], P8[4]...\n+        vtrn.8          d12, d13                @ P1[10], P1[11], P3[10]... P2[10], P2[11], P4[10]...\n+        vdup.16         q9, r2                  @ pq\n+        vtrn.8          d1, d7                  @ P1[12], P1[13], P3[12]... P2[12], P2[13], P4[12]...\n+        vtrn.32         d2, d16                 @ P1[0..7], P5[0..7]\n+        vtrn.16         d5, d12                 @ P1[8], P1[7], P1[10], P1[11], P5[8]... P3[8], P3[9], P3[10], P3[11], P7[8]...\n+        vtrn.16         d6, d13                 @ P2[8], P2[7], P2[10], P2[11], P6[8]... P4[8], P4[9], P4[10], P4[11], P8[8]...\n+        vtrn.8          d9, d15                 @ P1[14], P1[15], P3[14]... P2[14], P2[15], P4[14]...\n+        vtrn.32         d3, d4                  @ P2[0..7], P6[0..7]\n+        vshll.u8        q10, d2, #1             @ 2*P1[0..7]\n+        vtrn.32         d10, d8                 @ P3[0..7], P7[0..7]\n+        vshll.u8        q11, d16, #1            @ 2*P5[0..7]\n+        vtrn.32         d11, d14                @ P4[0..7], P8[0..7]\n+        vtrn.16         d1, d9                  @ P1[12], P1[13], P1[14], P1[15], P5[12]... P3[12], P3[13], P3[14], P3[15], P7[12]...\n+        vtrn.16         d7, d15                 @ P2[12], P2[13], P2[14], P2[15], P6[12]... P4[12], P4[13], P4[14], P4[15], P8[12]...\n+        vmovl.u8        q1, d3                  @ P2[0..7]\n+        vmovl.u8        q12, d4                 @ P6[0..7]\n+        vtrn.32         d5, d1                  @ P1[8..15], P5[8..15]\n+        vtrn.32         d6, d7                  @ P2[8..15], P6[8..15]\n+        vtrn.32         d12, d9                 @ P3[8..15], P7[8..15]\n+        vtrn.32         d13, d15                @ P4[8..15], P8[8..15]\n+        vmls.i16        q10, q1, d0[1]          @ 2*P1[0..7]-5*P2[0..7]\n+        vmovl.u8        q1, d10                 @ P3[0..7]\n+        vshll.u8        q2, d5, #1              @ 2*P1[8..15]\n+        vshll.u8        q13, d1, #1             @ 2*P5[8..15]\n+        vmls.i16        q11, q12, d0[1]         @ 2*P5[0..7]-5*P6[0..7]\n+        vmovl.u8        q14, d6                 @ P2[8..15]\n+        vmovl.u8        q3, d7                  @ P6[8..15]\n+        vmovl.u8        q15, d8                 @ P7[0..7]\n+        vmla.i16        q10, q1, d0[1]          @ 2*P1[0..7]-5*P2[0..7]+5*P3[0..7]\n+        vmovl.u8        q1, d12                 @ P3[8..15]\n+        vmls.i16        q2, q14, d0[1]          @ 2*P1[8..15]-5*P2[8..15]\n+        vmovl.u8        q4, d9                  @ P7[8..15]\n+        vshll.u8        q14, d10, #1            @ 2*P3[0..7]\n+        vmls.i16        q13, q3, d0[1]          @ 2*P5[8..15]-5*P6[8..15]\n+        vmovl.u8        q5, d11                 @ P4[0..7]\n+        vmla.i16        q11, q15, d0[1]         @ 2*P5[0..7]-5*P6[0..7]+5*P7[0..7]\n+        vshll.u8        q15, d12, #1            @ 2*P3[8..15]\n+        vmovl.u8        q6, d13                 @ P4[8..15]\n+        vmla.i16        q2, q1, d0[1]           @ 2*P1[8..15]-5*P2[8..15]+5*P3[8..15]\n+        vmovl.u8        q1, d14                 @ P8[0..7]\n+        vmovl.u8        q7, d15                 @ P8[8..15]\n+        vmla.i16        q13, q4, d0[1]          @ 2*P5[8..15]-5*P6[8..15]+5*P7[8..15]\n+        vmovl.u8        q4, d16                 @ P5[0..7]\n+        vmovl.u8        q8, d1                  @ P5[8..15]\n+        vmls.i16        q14, q5, d0[1]          @ 2*P3[0..7]-5*P4[0..7]\n+        vmls.i16        q15, q6, d0[1]          @ 2*P3[8..15]-5*P4[8..15]\n+        vmls.i16        q10, q5, d0[0]          @ 2*P1[0..7]-5*P2[0..7]+5*P3[0..7]-2*P4[0..7]\n+        vmls.i16        q11, q1, d0[0]          @ 2*P5[0..7]-5*P6[0..7]+5*P7[0..7]-2*P8[0..7]\n+        vsub.i16        q1, q5, q4              @ P4[0..7]-P5[0..7]\n+        vmls.i16        q2, q6, d0[0]           @ 2*P1[8..15]-5*P2[8..15]+5*P3[8..15]-2*P4[8..15]\n+        vrshr.s16       q10, q10, #3\n+        vmls.i16        q13, q7, d0[0]          @ 2*P5[8..15]-5*P6[8..15]+5*P7[8..15]-2*P8[8..15]\n+        vsub.i16        q7, q6, q8              @ P4[8..15]-P5[8..15]\n+        vrshr.s16       q11, q11, #3\n+        vmla.s16        q14, q4, d0[1]          @ 2*P3[0..7]-5*P4[0..7]+5*P5[0..7]\n+        vrshr.s16       q2, q2, #3\n+        vmla.i16        q15, q8, d0[1]          @ 2*P3[8..15]-5*P4[8..15]+5*P5[8..15]\n+        vabs.s16        q10, q10                @ a1[0..7]\n+        vrshr.s16       q13, q13, #3\n+        vmls.i16        q15, q3, d0[0]          @ 2*P3[8..15]-5*P4[8..15]+5*P5[8..15]-2*P6[8..15]\n+        vabs.s16        q3, q11                 @ a2[0..7]\n+        vabs.s16        q2, q2                  @ a1[8..15]\n+        vmls.i16        q14, q12, d0[0]         @ 2*P3[0..7]-5*P4[0..7]+5*P5[0..7]-2*P6[0..7]\n+        vabs.s16        q11, q1\n+        vabs.s16        q12, q13                @ a2[8..15]\n+        vcge.s16        q13, q10, q3            @ test a1[0..7] >= a2[0..7]\n+        vshr.s16        q1, q1, #8              @ clip_sign[0..7]\n+        vrshr.s16       q15, q15, #3\n+        vshr.s16        q11, q11, #1            @ clip[0..7]\n+        vrshr.s16       q14, q14, #3\n+        vbsl            q13, q3, q10            @ a3[0..7]\n+        vcge.s16        q3, q2, q12             @ test a1[8..15] >= a2[8.15]\n+        vabs.s16        q10, q15                @ a0[8..15]\n+        vshr.s16        q15, q15, #8            @ a0_sign[8..15]\n+        vbsl            q3, q12, q2             @ a3[8..15]\n+        vabs.s16        q2, q14                 @ a0[0..7]\n+        vabs.s16        q12, q7\n+        vshr.s16        q7, q7, #8              @ clip_sign[8..15]\n+        vshr.s16        q14, q14, #8            @ a0_sign[0..7]\n+        vshr.s16        q12, q12, #1            @ clip[8..15]\n+        vsub.i16        q7, q7, q15             @ clip_sign[8..15] - a0_sign[8..15]\n+        vqsub.u16       q15, q10, q3            @ a0[8..15] >= a3[8..15] ? a0[8..15]-a3[8..15] : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        vcge.s16        q3, q3, q10             @ test a3[8..15] >= a0[8..15]\n+        vcge.s16        q10, q10, q9            @ test a0[8..15] >= pq\n+        vcge.s16        q9, q2, q9              @ test a0[0..7] >= pq\n+        vsub.i16        q1, q1, q14             @ clip_sign[0..7] - a0_sign[0..7]\n+        vqsub.u16       q14, q2, q13            @ a0[0..7] >= a3[0..7] ? a0[0..7]-a3[0..7] : 0  (a0 > a3 in all cases where filtering is enabled, so makes more sense to subtract this way round than the opposite and then taking the abs)\n+        vcge.s16        q2, q13, q2             @ test a3[0..7] >= a0[0..7]\n+        vmul.i16        q13, q15, d0[1]         @ a0[8..15] >= a3[8..15] ? 5*(a0[8..15]-a3[8..15]) : 0\n+        vceq.i16        q15, q11, #0            @ test clip[0..7] == 0\n+        vmul.i16        q0, q14, d0[1]          @ a0[0..7] >= a3[0..7] ? 5*(a0[0..7]-a3[0..7]) : 0\n+        vorr            q9, q15, q9             @ test clip[0..7] == 0 || a0[0..7] >= pq\n+        vceq.i16        q14, q12, #0            @ test clip[8..15] == 0\n+        vshr.u16        q13, q13, #3            @ a0[8..15] >= a3[8..15] ? (5*(a0[8..15]-a3[8..15]))>>3 : 0\n+        vorr            q2, q9, q2              @ test clip[0..7] == 0 || a0[0..7] >= pq || a3[0..7] >= a0[0..7]\n+        vshr.u16        q0, q0, #3              @ a0[0..7] >= a3[0..7] ? (5*(a0[0..7]-a3[0..7]))>>3 : 0\n+        vorr            q10, q14, q10           @ test clip[8..15] == 0 || a0[8..15] >= pq\n+        vcge.s16        q14, q13, q12\n+        vmov.32         r2, d4[1]               @ move to gp reg\n+        vorr            q3, q10, q3             @ test clip[8..15] == 0 || a0[8..15] >= pq || a3[8..15] >= a0[8..15]\n+        vmov.32         r3, d5[1]\n+        vcge.s16        q2, q0, q11\n+        vbsl            q14, q12, q13           @ FFMIN(d[8..15], clip[8..15])\n+        vbsl            q2, q11, q0             @ FFMIN(d[0..7], clip[0..7])\n+        vmov.32         r5, d6[1]\n+        vbic            q0, q14, q10            @ set each d[8..15] to zero if it should not be filtered because clip[8..15] == 0 || a0[8..15] >= pq (a3 > a0 case already zeroed by saturating sub)\n+        vmov.32         r6, d7[1]\n+        and             r12, r2, r3\n+        vbic            q2, q2, q9              @ set each d[0..7] to zero if it should not be filtered because clip[0..7] == 0 || a0[0..7] >= pq (a3 > a0 case already zeroed by saturating sub)\n+        vmls.i16        q6, q0, q7              @ invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P4\n+        vmls.i16        q5, q2, q1              @ invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P4\n+        and             r14, r5, r6\n+        vmla.i16        q4, q2, q1              @ invert d[0..7] depending on clip_sign[0..7] & a0_sign[0..7], or zero it if they match, and accumulate into P5\n+        and             r12, r12, r14\n+        vqmovun.s16     d4, q6\n+        vmla.i16        q8, q0, q7              @ invert d[8..15] depending on clip_sign[8..15] & a0_sign[8..15], or zero it if they match, and accumulate into P5\n+        tst             r12, #1\n+        bne             4f                      @ none of the 16 pixel pairs should be updated in this case\n+        vqmovun.s16     d2, q5\n+        vqmovun.s16     d3, q4\n+        vqmovun.s16     d5, q8\n+        tst             r2, #1\n+        bne             1f\n+        vst2.8          {d2[0], d3[0]}, [r0], r1\n+        vst2.8          {d2[1], d3[1]}, [r0], r1\n+        vst2.8          {d2[2], d3[2]}, [r0], r1\n+        vst2.8          {d2[3], d3[3]}, [r0]\n+1:      add             r0, r4, r1, lsl #2\n+        tst             r3, #1\n+        bne             2f\n+        vst2.8          {d2[4], d3[4]}, [r4], r1\n+        vst2.8          {d2[5], d3[5]}, [r4], r1\n+        vst2.8          {d2[6], d3[6]}, [r4], r1\n+        vst2.8          {d2[7], d3[7]}, [r4]\n+2:      add             r4, r0, r1, lsl #2\n+        tst             r5, #1\n+        bne             3f\n+        vst2.8          {d4[0], d5[0]}, [r0], r1\n+        vst2.8          {d4[1], d5[1]}, [r0], r1\n+        vst2.8          {d4[2], d5[2]}, [r0], r1\n+        vst2.8          {d4[3], d5[3]}, [r0]\n+3:      tst             r6, #1\n+        bne             4f\n+        vst2.8          {d4[4], d5[4]}, [r4], r1\n+        vst2.8          {d4[5], d5[5]}, [r4], r1\n+        vst2.8          {d4[6], d5[6]}, [r4], r1\n+        vst2.8          {d4[7], d5[7]}, [r4]\n+4:      vpop            {d8-d15}\n+        pop             {r4-r6,pc}\n+endfunc\n+\n+@ Copy at most the specified number of bytes from source to destination buffer,\n+@ stopping at a multiple of 16 bytes, none of which are the start of an escape sequence\n+@ On entry:\n+@   r0 -> source buffer\n+@   r1 = max number of bytes to copy\n+@   r2 -> destination buffer, optimally 8-byte aligned\n+@ On exit:\n+@   r0 = number of bytes not copied\n+function ff_vc1_unescape_buffer_helper_neon, export=1\n+        @ Offset by 48 to screen out cases that are too short for us to handle,\n+        @ and also make it easy to test for loop termination, or to determine\n+        @ whether we need an odd number of half-iterations of the loop.\n+        subs    r1, r1, #48\n+        bmi     90f\n+\n+        @ Set up useful constants\n+        vmov.i32        q0, #0x3000000\n+        vmov.i32        q1, #0x30000\n+\n+        tst             r1, #16\n+        bne             1f\n+\n+          vld1.8          {q8, q9}, [r0]!\n+          vbic            q12, q8, q0\n+          vext.8          q13, q8, q9, #1\n+          vext.8          q14, q8, q9, #2\n+          vext.8          q15, q8, q9, #3\n+          veor            q12, q12, q1\n+          vbic            q13, q13, q0\n+          vbic            q14, q14, q0\n+          vbic            q15, q15, q0\n+          vceq.i32        q12, q12, #0\n+          veor            q13, q13, q1\n+          veor            q14, q14, q1\n+          veor            q15, q15, q1\n+          vceq.i32        q13, q13, #0\n+          vceq.i32        q14, q14, #0\n+          vceq.i32        q15, q15, #0\n+          add             r1, r1, #16\n+          b               3f\n+\n+1:      vld1.8          {q10, q11}, [r0]!\n+        vbic            q12, q10, q0\n+        vext.8          q13, q10, q11, #1\n+        vext.8          q14, q10, q11, #2\n+        vext.8          q15, q10, q11, #3\n+        veor            q12, q12, q1\n+        vbic            q13, q13, q0\n+        vbic            q14, q14, q0\n+        vbic            q15, q15, q0\n+        vceq.i32        q12, q12, #0\n+        veor            q13, q13, q1\n+        veor            q14, q14, q1\n+        veor            q15, q15, q1\n+        vceq.i32        q13, q13, #0\n+        vceq.i32        q14, q14, #0\n+        vceq.i32        q15, q15, #0\n+        @ Drop through...\n+2:        vmov            q8, q11\n+          vld1.8          {q9}, [r0]!\n+        vorr            q13, q12, q13\n+        vorr            q15, q14, q15\n+          vbic            q12, q8, q0\n+        vorr            q3, q13, q15\n+          vext.8          q13, q8, q9, #1\n+          vext.8          q14, q8, q9, #2\n+          vext.8          q15, q8, q9, #3\n+          veor            q12, q12, q1\n+        vorr            d6, d6, d7\n+          vbic            q13, q13, q0\n+          vbic            q14, q14, q0\n+          vbic            q15, q15, q0\n+          vceq.i32        q12, q12, #0\n+        vmov            r3, r12, d6\n+          veor            q13, q13, q1\n+          veor            q14, q14, q1\n+          veor            q15, q15, q1\n+          vceq.i32        q13, q13, #0\n+          vceq.i32        q14, q14, #0\n+          vceq.i32        q15, q15, #0\n+        orrs            r3, r3, r12\n+        bne             90f\n+        vst1.64         {q10}, [r2]!\n+3:          vmov            q10, q9\n+            vld1.8          {q11}, [r0]!\n+          vorr            q13, q12, q13\n+          vorr            q15, q14, q15\n+            vbic            q12, q10, q0\n+          vorr            q3, q13, q15\n+            vext.8          q13, q10, q11, #1\n+            vext.8          q14, q10, q11, #2\n+            vext.8          q15, q10, q11, #3\n+            veor            q12, q12, q1\n+          vorr            d6, d6, d7\n+            vbic            q13, q13, q0\n+            vbic            q14, q14, q0\n+            vbic            q15, q15, q0\n+            vceq.i32        q12, q12, #0\n+          vmov            r3, r12, d6\n+            veor            q13, q13, q1\n+            veor            q14, q14, q1\n+            veor            q15, q15, q1\n+            vceq.i32        q13, q13, #0\n+            vceq.i32        q14, q14, #0\n+            vceq.i32        q15, q15, #0\n+          orrs            r3, r3, r12\n+          bne             91f\n+          vst1.64         {q8}, [r2]!\n+        subs            r1, r1, #32\n+        bpl             2b\n+\n+90:     add             r0, r1, #48\n+        bx              lr\n+\n+91:     sub             r1, r1, #16\n+        b               90b\n+endfunc\ndiff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h\nindex 8a71c04230..53644506e5 100644\n--- a/libavcodec/avcodec.h\n+++ b/libavcodec/avcodec.h\n@@ -2595,6 +2595,17 @@ typedef struct AVHWAccel {\n      * that avctx->hwaccel_priv_data is invalid.\n      */\n     int (*frame_params)(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx);\n+\n+    /**\n+     * Called if parsing fails\n+     *\n+     * An error has occured, end_frame will not be called\n+     * start_frame & decode_slice may or may not have been called\n+     * Optional\n+     *\n+     * @param avctx the codec context\n+     */\n+    void (*abort_frame)(AVCodecContext *avctx);\n } AVHWAccel;\n \n /**\ndiff --git a/libavcodec/cabac.h b/libavcodec/cabac.h\nindex 38d06b2842..bbf5d70560 100644\n--- a/libavcodec/cabac.h\n+++ b/libavcodec/cabac.h\n@@ -44,6 +44,10 @@ typedef struct CABACContext{\n     const uint8_t *bytestream_start;\n     const uint8_t *bytestream;\n     const uint8_t *bytestream_end;\n+    struct {\n+        uint16_t bits;\n+        uint16_t range;\n+    } by22;\n }CABACContext;\n \n int ff_init_cabac_decoder(CABACContext *c, const uint8_t *buf, int buf_size);\ndiff --git a/libavcodec/codec.h b/libavcodec/codec.h\nindex 50a22f6e3c..5acf572ef4 100644\n--- a/libavcodec/codec.h\n+++ b/libavcodec/codec.h\n@@ -367,6 +367,17 @@ const AVCodec *av_codec_iterate(void **opaque);\n  */\n AVCodec *avcodec_find_decoder(enum AVCodecID id);\n \n+/**\n+ * Find a registered decoder with a matching codec ID and pix_fmt.\n+ * A decoder will pix_fmt set to NULL will match any fmt.\n+ * A fmt of AV_PIX_FMT_NONE will only match a decoder will px_fmt NULL.\n+ *\n+ * @param id AVCodecID of the requested decoder\n+ * @param fmt AVPixelForma that msut be supported by decoder\n+ * @return A decoder if one was found, NULL otherwise.\n+ */\n+AVCodec *avcodec_find_decoder_by_id_and_fmt(enum AVCodecID id, enum AVPixelFormat fmt);\n+\n /**\n  * Find a registered decoder with the specified name.\n  *\ndiff --git a/libavcodec/hevc-ctrls-v1.h b/libavcodec/hevc-ctrls-v1.h\nnew file mode 100644\nindex 0000000000..72cbba0953\n--- /dev/null\n+++ b/libavcodec/hevc-ctrls-v1.h\n@@ -0,0 +1,229 @@\n+/* SPDX-License-Identifier: GPL-2.0 */\n+/*\n+ * These are the HEVC state controls for use with stateless HEVC\n+ * codec drivers.\n+ *\n+ * It turns out that these structs are not stable yet and will undergo\n+ * more changes. So keep them private until they are stable and ready to\n+ * become part of the official public API.\n+ */\n+\n+#ifndef _HEVC_CTRLS_H_\n+#define _HEVC_CTRLS_H_\n+\n+#include <linux/videodev2.h>\n+\n+/* The pixel format isn't stable at the moment and will likely be renamed. */\n+#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */\n+\n+#define V4L2_CID_MPEG_VIDEO_HEVC_SPS\t\t(V4L2_CID_MPEG_BASE + 1008)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_PPS\t\t(V4L2_CID_MPEG_BASE + 1009)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS\t(V4L2_CID_MPEG_BASE + 1010)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_SCALING_MATRIX\t(V4L2_CID_MPEG_BASE + 1011)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE\t(V4L2_CID_MPEG_BASE + 1015)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_START_CODE\t(V4L2_CID_MPEG_BASE + 1016)\n+\n+/* enum v4l2_ctrl_type type values */\n+#define V4L2_CTRL_TYPE_HEVC_SPS 0x0120\n+#define V4L2_CTRL_TYPE_HEVC_PPS 0x0121\n+#define V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS 0x0122\n+#define V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX 0x0123\n+\n+enum v4l2_mpeg_video_hevc_decode_mode {\n+\tV4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED,\n+\tV4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED,\n+};\n+\n+enum v4l2_mpeg_video_hevc_start_code {\n+\tV4L2_MPEG_VIDEO_HEVC_START_CODE_NONE,\n+\tV4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B,\n+};\n+\n+#define V4L2_HEVC_SLICE_TYPE_B\t0\n+#define V4L2_HEVC_SLICE_TYPE_P\t1\n+#define V4L2_HEVC_SLICE_TYPE_I\t2\n+\n+#define V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE\t\t(1ULL << 0)\n+#define V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED\t\t\t(1ULL << 1)\n+#define V4L2_HEVC_SPS_FLAG_AMP_ENABLED\t\t\t\t(1ULL << 2)\n+#define V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET\t\t(1ULL << 3)\n+#define V4L2_HEVC_SPS_FLAG_PCM_ENABLED\t\t\t\t(1ULL << 4)\n+#define V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED\t\t(1ULL << 5)\n+#define V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT\t\t(1ULL << 6)\n+#define V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED\t\t(1ULL << 7)\n+#define V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED\t(1ULL << 8)\n+\n+/* The controls are not stable at the moment and will likely be reworked. */\n+struct v4l2_ctrl_hevc_sps {\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: Sequence parameter set */\n+\t__u16\tpic_width_in_luma_samples;\n+\t__u16\tpic_height_in_luma_samples;\n+\t__u8\tbit_depth_luma_minus8;\n+\t__u8\tbit_depth_chroma_minus8;\n+\t__u8\tlog2_max_pic_order_cnt_lsb_minus4;\n+\t__u8\tsps_max_dec_pic_buffering_minus1;\n+\t__u8\tsps_max_num_reorder_pics;\n+\t__u8\tsps_max_latency_increase_plus1;\n+\t__u8\tlog2_min_luma_coding_block_size_minus3;\n+\t__u8\tlog2_diff_max_min_luma_coding_block_size;\n+\t__u8\tlog2_min_luma_transform_block_size_minus2;\n+\t__u8\tlog2_diff_max_min_luma_transform_block_size;\n+\t__u8\tmax_transform_hierarchy_depth_inter;\n+\t__u8\tmax_transform_hierarchy_depth_intra;\n+\t__u8\tpcm_sample_bit_depth_luma_minus1;\n+\t__u8\tpcm_sample_bit_depth_chroma_minus1;\n+\t__u8\tlog2_min_pcm_luma_coding_block_size_minus3;\n+\t__u8\tlog2_diff_max_min_pcm_luma_coding_block_size;\n+\t__u8\tnum_short_term_ref_pic_sets;\n+\t__u8\tnum_long_term_ref_pics_sps;\n+\t__u8\tchroma_format_idc;\n+\t__u8\tsps_max_sub_layers_minus1;\n+\n+\t__u64\tflags;\n+};\n+\n+#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT\t\t(1ULL << 0)\n+#define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT\t\t\t(1ULL << 1)\n+#define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED\t\t(1ULL << 2)\n+#define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT\t\t\t(1ULL << 3)\n+#define V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED\t\t(1ULL << 4)\n+#define V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED\t\t(1ULL << 5)\n+#define V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED\t\t\t(1ULL << 6)\n+#define V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT\t(1ULL << 7)\n+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED\t\t\t(1ULL << 8)\n+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED\t\t\t(1ULL << 9)\n+#define V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED\t\t(1ULL << 10)\n+#define V4L2_HEVC_PPS_FLAG_TILES_ENABLED\t\t\t(1ULL << 11)\n+#define V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED\t\t(1ULL << 12)\n+#define V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED\t(1ULL << 13)\n+#define V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 14)\n+#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED\t(1ULL << 15)\n+#define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER\t(1ULL << 16)\n+#define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT\t\t(1ULL << 17)\n+#define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18)\n+\n+struct v4l2_ctrl_hevc_pps {\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */\n+\t__u8\tnum_extra_slice_header_bits;\n+\t__s8\tinit_qp_minus26;\n+\t__u8\tdiff_cu_qp_delta_depth;\n+\t__s8\tpps_cb_qp_offset;\n+\t__s8\tpps_cr_qp_offset;\n+\t__u8\tnum_tile_columns_minus1;\n+\t__u8\tnum_tile_rows_minus1;\n+\t__u8\tcolumn_width_minus1[20];\n+\t__u8\trow_height_minus1[22];\n+\t__s8\tpps_beta_offset_div2;\n+\t__s8\tpps_tc_offset_div2;\n+\t__u8\tlog2_parallel_merge_level_minus2;\n+\n+\t__u8\tpadding[4];\n+\t__u64\tflags;\n+};\n+\n+#define V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE\t0x01\n+#define V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER\t0x02\n+#define V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR\t\t0x03\n+\n+#define V4L2_HEVC_DPB_ENTRIES_NUM_MAX\t\t16\n+\n+struct v4l2_hevc_dpb_entry {\n+\t__u64\ttimestamp;\n+\t__u8\trps;\n+\t__u8\tfield_pic;\n+\t__u16\tpic_order_cnt[2];\n+\t__u8\tpadding[2];\n+};\n+\n+struct v4l2_hevc_pred_weight_table {\n+\t__s8\tdelta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tluma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tdelta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\t__s8\tchroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\n+\t__s8\tdelta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tluma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tdelta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\t__s8\tchroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\n+\t__u8\tpadding[6];\n+\n+\t__u8\tluma_log2_weight_denom;\n+\t__s8\tdelta_chroma_log2_weight_denom;\n+};\n+\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA\t\t(1ULL << 0)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA\t\t(1ULL << 1)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED\t(1ULL << 2)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO\t\t\t(1ULL << 3)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT\t\t\t(1ULL << 4)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0\t\t(1ULL << 5)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV\t\t(1ULL << 6)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT\t\t(1ULL << 9)\n+\n+struct v4l2_ctrl_hevc_slice_params {\n+\t__u32\tbit_size;\n+\t__u32\tdata_bit_offset;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+\t__u32\tslice_segment_addr;\n+\t__u32\tnum_entry_point_offsets;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */\n+\t__u8\tnal_unit_type;\n+\t__u8\tnuh_temporal_id_plus1;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+\t__u8\tslice_type;\n+\t__u8\tcolour_plane_id;\n+\t__u16\tslice_pic_order_cnt;\n+\t__u8\tnum_ref_idx_l0_active_minus1;\n+\t__u8\tnum_ref_idx_l1_active_minus1;\n+\t__u8\tcollocated_ref_idx;\n+\t__u8\tfive_minus_max_num_merge_cand;\n+\t__s8\tslice_qp_delta;\n+\t__s8\tslice_cb_qp_offset;\n+\t__s8\tslice_cr_qp_offset;\n+\t__s8\tslice_act_y_qp_offset;\n+\t__s8\tslice_act_cb_qp_offset;\n+\t__s8\tslice_act_cr_qp_offset;\n+\t__s8\tslice_beta_offset_div2;\n+\t__s8\tslice_tc_offset_div2;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */\n+\t__u8\tpic_struct;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+\t__u8\tnum_active_dpb_entries;\n+\t__u8\tref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u8\tref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\n+\t__u8\tnum_rps_poc_st_curr_before;\n+\t__u8\tnum_rps_poc_st_curr_after;\n+\t__u8\tnum_rps_poc_lt_curr;\n+\n+\t__u8\tpadding;\n+\n+\t__u32\tentry_point_offset_minus1[256];\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+\tstruct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */\n+\tstruct v4l2_hevc_pred_weight_table pred_weight_table;\n+\n+\t__u64\tflags;\n+};\n+\n+struct v4l2_ctrl_hevc_scaling_matrix {\n+\t__u8\tscaling_list_4x4[6][16];\n+\t__u8\tscaling_list_8x8[6][64];\n+\t__u8\tscaling_list_16x16[6][64];\n+\t__u8\tscaling_list_32x32[2][64];\n+\t__u8\tscaling_list_dc_coef_16x16[6];\n+\t__u8\tscaling_list_dc_coef_32x32[2];\n+};\n+\n+#endif\ndiff --git a/libavcodec/hevc-ctrls-v2.h b/libavcodec/hevc-ctrls-v2.h\nnew file mode 100644\nindex 0000000000..7cbbbf055f\n--- /dev/null\n+++ b/libavcodec/hevc-ctrls-v2.h\n@@ -0,0 +1,257 @@\n+/* SPDX-License-Identifier: GPL-2.0 */\n+/*\n+ * These are the HEVC state controls for use with stateless HEVC\n+ * codec drivers.\n+ *\n+ * It turns out that these structs are not stable yet and will undergo\n+ * more changes. So keep them private until they are stable and ready to\n+ * become part of the official public API.\n+ */\n+\n+#ifndef _HEVC_CTRLS_H_\n+#define _HEVC_CTRLS_H_\n+\n+#include <linux/videodev2.h>\n+\n+/* The pixel format isn't stable at the moment and will likely be renamed. */\n+#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */\n+\n+#define V4L2_CID_MPEG_VIDEO_HEVC_SPS\t\t(V4L2_CID_CODEC_BASE + 1008)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_PPS\t\t(V4L2_CID_CODEC_BASE + 1009)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS\t(V4L2_CID_CODEC_BASE + 1010)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_SCALING_MATRIX\t(V4L2_CID_CODEC_BASE + 1011)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_DECODE_PARAMS\t(V4L2_CID_CODEC_BASE + 1012)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE\t(V4L2_CID_CODEC_BASE + 1015)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_START_CODE\t(V4L2_CID_CODEC_BASE + 1016)\n+\n+/* enum v4l2_ctrl_type type values */\n+#define V4L2_CTRL_TYPE_HEVC_SPS 0x0120\n+#define V4L2_CTRL_TYPE_HEVC_PPS 0x0121\n+#define V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS 0x0122\n+#define V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX 0x0123\n+#define V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS 0x0124\n+\n+enum v4l2_mpeg_video_hevc_decode_mode {\n+\tV4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED,\n+\tV4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED,\n+};\n+\n+enum v4l2_mpeg_video_hevc_start_code {\n+\tV4L2_MPEG_VIDEO_HEVC_START_CODE_NONE,\n+\tV4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B,\n+};\n+\n+#define V4L2_HEVC_SLICE_TYPE_B\t0\n+#define V4L2_HEVC_SLICE_TYPE_P\t1\n+#define V4L2_HEVC_SLICE_TYPE_I\t2\n+\n+#define V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE\t\t(1ULL << 0)\n+#define V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED\t\t\t(1ULL << 1)\n+#define V4L2_HEVC_SPS_FLAG_AMP_ENABLED\t\t\t\t(1ULL << 2)\n+#define V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET\t\t(1ULL << 3)\n+#define V4L2_HEVC_SPS_FLAG_PCM_ENABLED\t\t\t\t(1ULL << 4)\n+#define V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED\t\t(1ULL << 5)\n+#define V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT\t\t(1ULL << 6)\n+#define V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED\t\t(1ULL << 7)\n+#define V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED\t(1ULL << 8)\n+\n+/* The controls are not stable at the moment and will likely be reworked. */\n+struct v4l2_ctrl_hevc_sps {\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: Sequence parameter set */\n+\t__u16\tpic_width_in_luma_samples;\n+\t__u16\tpic_height_in_luma_samples;\n+\t__u8\tbit_depth_luma_minus8;\n+\t__u8\tbit_depth_chroma_minus8;\n+\t__u8\tlog2_max_pic_order_cnt_lsb_minus4;\n+\t__u8\tsps_max_dec_pic_buffering_minus1;\n+\t__u8\tsps_max_num_reorder_pics;\n+\t__u8\tsps_max_latency_increase_plus1;\n+\t__u8\tlog2_min_luma_coding_block_size_minus3;\n+\t__u8\tlog2_diff_max_min_luma_coding_block_size;\n+\t__u8\tlog2_min_luma_transform_block_size_minus2;\n+\t__u8\tlog2_diff_max_min_luma_transform_block_size;\n+\t__u8\tmax_transform_hierarchy_depth_inter;\n+\t__u8\tmax_transform_hierarchy_depth_intra;\n+\t__u8\tpcm_sample_bit_depth_luma_minus1;\n+\t__u8\tpcm_sample_bit_depth_chroma_minus1;\n+\t__u8\tlog2_min_pcm_luma_coding_block_size_minus3;\n+\t__u8\tlog2_diff_max_min_pcm_luma_coding_block_size;\n+\t__u8\tnum_short_term_ref_pic_sets;\n+\t__u8\tnum_long_term_ref_pics_sps;\n+\t__u8\tchroma_format_idc;\n+\t__u8\tsps_max_sub_layers_minus1;\n+\n+\t__u64\tflags;\n+};\n+\n+#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED\t(1ULL << 0)\n+#define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT\t\t\t(1ULL << 1)\n+#define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED\t\t(1ULL << 2)\n+#define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT\t\t\t(1ULL << 3)\n+#define V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED\t\t(1ULL << 4)\n+#define V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED\t\t(1ULL << 5)\n+#define V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED\t\t\t(1ULL << 6)\n+#define V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT\t(1ULL << 7)\n+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED\t\t\t(1ULL << 8)\n+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED\t\t\t(1ULL << 9)\n+#define V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED\t\t(1ULL << 10)\n+#define V4L2_HEVC_PPS_FLAG_TILES_ENABLED\t\t\t(1ULL << 11)\n+#define V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED\t\t(1ULL << 12)\n+#define V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED\t(1ULL << 13)\n+#define V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 14)\n+#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED\t(1ULL << 15)\n+#define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER\t(1ULL << 16)\n+#define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT\t\t(1ULL << 17)\n+#define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18)\n+#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT\t(1ULL << 19)\n+#define V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING\t\t\t(1ULL << 20)\n+\n+struct v4l2_ctrl_hevc_pps {\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */\n+\t__u8\tnum_extra_slice_header_bits;\n+\t__u8\tnum_ref_idx_l0_default_active_minus1;\n+\t__u8\tnum_ref_idx_l1_default_active_minus1;\n+\t__s8\tinit_qp_minus26;\n+\t__u8\tdiff_cu_qp_delta_depth;\n+\t__s8\tpps_cb_qp_offset;\n+\t__s8\tpps_cr_qp_offset;\n+\t__u8\tnum_tile_columns_minus1;\n+\t__u8\tnum_tile_rows_minus1;\n+\t__u8\tcolumn_width_minus1[20];\n+\t__u8\trow_height_minus1[22];\n+\t__s8\tpps_beta_offset_div2;\n+\t__s8\tpps_tc_offset_div2;\n+\t__u8\tlog2_parallel_merge_level_minus2;\n+\n+\t__u8\tpadding[4];\n+\t__u64\tflags;\n+};\n+\n+#define V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE\t0x01\n+#define V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER\t0x02\n+#define V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR\t\t0x03\n+\n+#define V4L2_HEVC_DPB_ENTRIES_NUM_MAX\t\t16\n+\n+struct v4l2_hevc_dpb_entry {\n+\t__u64\ttimestamp;\n+\t__u8\trps;\n+\t__u8\tfield_pic;\n+\t__u16\tpic_order_cnt[2];\n+\t__u8\tpadding[2];\n+};\n+\n+struct v4l2_hevc_pred_weight_table {\n+\t__s8\tdelta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tluma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tdelta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\t__s8\tchroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\n+\t__s8\tdelta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tluma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tdelta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\t__s8\tchroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\n+\t__u8\tpadding[6];\n+\n+\t__u8\tluma_log2_weight_denom;\n+\t__s8\tdelta_chroma_log2_weight_denom;\n+};\n+\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA\t\t(1ULL << 0)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA\t\t(1ULL << 1)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED\t(1ULL << 2)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO\t\t\t(1ULL << 3)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT\t\t\t(1ULL << 4)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0\t\t(1ULL << 5)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV\t\t(1ULL << 6)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT\t(1ULL << 9)\n+\n+struct v4l2_ctrl_hevc_slice_params {\n+\t__u32\tbit_size;\n+\t__u32\tdata_bit_offset;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+\t__u32\tslice_segment_addr;\n+\t__u32\tnum_entry_point_offsets;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */\n+\t__u8\tnal_unit_type;\n+\t__u8\tnuh_temporal_id_plus1;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+\t__u8\tslice_type;\n+\t__u8\tcolour_plane_id;\n+\t__u16\tslice_pic_order_cnt;\n+\t__u8\tnum_ref_idx_l0_active_minus1;\n+\t__u8\tnum_ref_idx_l1_active_minus1;\n+\t__u8\tcollocated_ref_idx;\n+\t__u8\tfive_minus_max_num_merge_cand;\n+\t__s8\tslice_qp_delta;\n+\t__s8\tslice_cb_qp_offset;\n+\t__s8\tslice_cr_qp_offset;\n+\t__s8\tslice_act_y_qp_offset;\n+\t__s8\tslice_act_cb_qp_offset;\n+\t__s8\tslice_act_cr_qp_offset;\n+\t__s8\tslice_beta_offset_div2;\n+\t__s8\tslice_tc_offset_div2;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */\n+\t__u8\tpic_struct;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+\t__u8\tref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u8\tref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\n+\t__u8\tpadding[5];\n+\n+\t__u32\tentry_point_offset_minus1[256];\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */\n+\tstruct v4l2_hevc_pred_weight_table pred_weight_table;\n+\n+\t__u64\tflags;\n+};\n+\n+#define V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC\t\t0x1\n+#define V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC\t\t0x2\n+#define V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR  0x4\n+\n+struct v4l2_ctrl_hevc_decode_params {\n+\t__s32\tpic_order_cnt_val;\n+\t__u8\tnum_active_dpb_entries;\n+\tstruct\tv4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u8\tnum_poc_st_curr_before;\n+\t__u8\tnum_poc_st_curr_after;\n+\t__u8\tnum_poc_lt_curr;\n+\t__u8\tpoc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u8\tpoc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u8\tpoc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u64\tflags;\n+};\n+\n+/*  MPEG-class control IDs specific to the Hantro driver as defined by V4L2 */\n+#define V4L2_CID_CODEC_HANTRO_BASE\t\t\t\t(V4L2_CTRL_CLASS_CODEC | 0x1200)\n+/*\n+ * V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP -\n+ * the number of data (in bits) to skip in the\n+ * slice segment header.\n+ * If non-IDR, the bits to be skipped go from syntax element \"pic_output_flag\"\n+ * to before syntax element \"slice_temporal_mvp_enabled_flag\".\n+ * If IDR, the skipped bits are just \"pic_output_flag\"\n+ * (separate_colour_plane_flag is not supported).\n+ */\n+#define V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP\t(V4L2_CID_CODEC_HANTRO_BASE + 0)\n+\n+struct v4l2_ctrl_hevc_scaling_matrix {\n+\t__u8\tscaling_list_4x4[6][16];\n+\t__u8\tscaling_list_8x8[6][64];\n+\t__u8\tscaling_list_16x16[6][64];\n+\t__u8\tscaling_list_32x32[2][64];\n+\t__u8\tscaling_list_dc_coef_16x16[6];\n+\t__u8\tscaling_list_dc_coef_32x32[2];\n+};\n+\n+#endif\ndiff --git a/libavcodec/hevc-ctrls-v3.h b/libavcodec/hevc-ctrls-v3.h\nnew file mode 100644\nindex 0000000000..4e35bd583d\n--- /dev/null\n+++ b/libavcodec/hevc-ctrls-v3.h\n@@ -0,0 +1,255 @@\n+/* SPDX-License-Identifier: GPL-2.0 */\n+/*\n+ * These are the HEVC state controls for use with stateless HEVC\n+ * codec drivers.\n+ *\n+ * It turns out that these structs are not stable yet and will undergo\n+ * more changes. So keep them private until they are stable and ready to\n+ * become part of the official public API.\n+ */\n+\n+#ifndef _HEVC_CTRLS_H_\n+#define _HEVC_CTRLS_H_\n+\n+#include <linux/videodev2.h>\n+\n+/* The pixel format isn't stable at the moment and will likely be renamed. */\n+#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */\n+\n+#define V4L2_CID_MPEG_VIDEO_HEVC_SPS\t\t(V4L2_CID_CODEC_BASE + 1008)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_PPS\t\t(V4L2_CID_CODEC_BASE + 1009)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS\t(V4L2_CID_CODEC_BASE + 1010)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_SCALING_MATRIX\t(V4L2_CID_CODEC_BASE + 1011)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_DECODE_PARAMS\t(V4L2_CID_CODEC_BASE + 1012)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE\t(V4L2_CID_CODEC_BASE + 1015)\n+#define V4L2_CID_MPEG_VIDEO_HEVC_START_CODE\t(V4L2_CID_CODEC_BASE + 1016)\n+\n+/* enum v4l2_ctrl_type type values */\n+#define V4L2_CTRL_TYPE_HEVC_SPS 0x0120\n+#define V4L2_CTRL_TYPE_HEVC_PPS 0x0121\n+#define V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS 0x0122\n+#define V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX 0x0123\n+#define V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS 0x0124\n+\n+enum v4l2_mpeg_video_hevc_decode_mode {\n+\tV4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED,\n+\tV4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED,\n+};\n+\n+enum v4l2_mpeg_video_hevc_start_code {\n+\tV4L2_MPEG_VIDEO_HEVC_START_CODE_NONE,\n+\tV4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B,\n+};\n+\n+#define V4L2_HEVC_SLICE_TYPE_B\t0\n+#define V4L2_HEVC_SLICE_TYPE_P\t1\n+#define V4L2_HEVC_SLICE_TYPE_I\t2\n+\n+#define V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE\t\t(1ULL << 0)\n+#define V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED\t\t\t(1ULL << 1)\n+#define V4L2_HEVC_SPS_FLAG_AMP_ENABLED\t\t\t\t(1ULL << 2)\n+#define V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET\t\t(1ULL << 3)\n+#define V4L2_HEVC_SPS_FLAG_PCM_ENABLED\t\t\t\t(1ULL << 4)\n+#define V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED\t\t(1ULL << 5)\n+#define V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT\t\t(1ULL << 6)\n+#define V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED\t\t(1ULL << 7)\n+#define V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED\t(1ULL << 8)\n+\n+/* The controls are not stable at the moment and will likely be reworked. */\n+struct v4l2_ctrl_hevc_sps {\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: Sequence parameter set */\n+\t__u16\tpic_width_in_luma_samples;\n+\t__u16\tpic_height_in_luma_samples;\n+\t__u8\tbit_depth_luma_minus8;\n+\t__u8\tbit_depth_chroma_minus8;\n+\t__u8\tlog2_max_pic_order_cnt_lsb_minus4;\n+\t__u8\tsps_max_dec_pic_buffering_minus1;\n+\t__u8\tsps_max_num_reorder_pics;\n+\t__u8\tsps_max_latency_increase_plus1;\n+\t__u8\tlog2_min_luma_coding_block_size_minus3;\n+\t__u8\tlog2_diff_max_min_luma_coding_block_size;\n+\t__u8\tlog2_min_luma_transform_block_size_minus2;\n+\t__u8\tlog2_diff_max_min_luma_transform_block_size;\n+\t__u8\tmax_transform_hierarchy_depth_inter;\n+\t__u8\tmax_transform_hierarchy_depth_intra;\n+\t__u8\tpcm_sample_bit_depth_luma_minus1;\n+\t__u8\tpcm_sample_bit_depth_chroma_minus1;\n+\t__u8\tlog2_min_pcm_luma_coding_block_size_minus3;\n+\t__u8\tlog2_diff_max_min_pcm_luma_coding_block_size;\n+\t__u8\tnum_short_term_ref_pic_sets;\n+\t__u8\tnum_long_term_ref_pics_sps;\n+\t__u8\tchroma_format_idc;\n+\t__u8\tsps_max_sub_layers_minus1;\n+\n+\t__u64\tflags;\n+};\n+\n+#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED\t(1ULL << 0)\n+#define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT\t\t\t(1ULL << 1)\n+#define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED\t\t(1ULL << 2)\n+#define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT\t\t\t(1ULL << 3)\n+#define V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED\t\t(1ULL << 4)\n+#define V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED\t\t(1ULL << 5)\n+#define V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED\t\t\t(1ULL << 6)\n+#define V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT\t(1ULL << 7)\n+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED\t\t\t(1ULL << 8)\n+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED\t\t\t(1ULL << 9)\n+#define V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED\t\t(1ULL << 10)\n+#define V4L2_HEVC_PPS_FLAG_TILES_ENABLED\t\t\t(1ULL << 11)\n+#define V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED\t\t(1ULL << 12)\n+#define V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED\t(1ULL << 13)\n+#define V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 14)\n+#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED\t(1ULL << 15)\n+#define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER\t(1ULL << 16)\n+#define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT\t\t(1ULL << 17)\n+#define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18)\n+#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT\t(1ULL << 19)\n+#define V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING\t\t\t(1ULL << 20)\n+\n+struct v4l2_ctrl_hevc_pps {\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */\n+\t__u8\tnum_extra_slice_header_bits;\n+\t__u8\tnum_ref_idx_l0_default_active_minus1;\n+\t__u8\tnum_ref_idx_l1_default_active_minus1;\n+\t__s8\tinit_qp_minus26;\n+\t__u8\tdiff_cu_qp_delta_depth;\n+\t__s8\tpps_cb_qp_offset;\n+\t__s8\tpps_cr_qp_offset;\n+\t__u8\tnum_tile_columns_minus1;\n+\t__u8\tnum_tile_rows_minus1;\n+\t__u8\tcolumn_width_minus1[20];\n+\t__u8\trow_height_minus1[22];\n+\t__s8\tpps_beta_offset_div2;\n+\t__s8\tpps_tc_offset_div2;\n+\t__u8\tlog2_parallel_merge_level_minus2;\n+\n+\t__u8\tpadding[4];\n+\t__u64\tflags;\n+};\n+\n+#define V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE\t0x01\n+\n+#define V4L2_HEVC_DPB_ENTRIES_NUM_MAX\t\t16\n+\n+struct v4l2_hevc_dpb_entry {\n+\t__u64\ttimestamp;\n+\t__u8\tflags;\n+\t__u8\tfield_pic;\n+\t__u16\tpic_order_cnt[2];\n+\t__u8\tpadding[2];\n+};\n+\n+struct v4l2_hevc_pred_weight_table {\n+\t__s8\tdelta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tluma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tdelta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\t__s8\tchroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\n+\t__s8\tdelta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tluma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tdelta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\t__s8\tchroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\n+\t__u8\tpadding[6];\n+\n+\t__u8\tluma_log2_weight_denom;\n+\t__s8\tdelta_chroma_log2_weight_denom;\n+};\n+\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA\t\t(1ULL << 0)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA\t\t(1ULL << 1)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED\t(1ULL << 2)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO\t\t\t(1ULL << 3)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT\t\t\t(1ULL << 4)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0\t\t(1ULL << 5)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV\t\t(1ULL << 6)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT\t(1ULL << 9)\n+\n+struct v4l2_ctrl_hevc_slice_params {\n+\t__u32\tbit_size;\n+\t__u32\tdata_bit_offset;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+\t__u32\tslice_segment_addr;\n+\t__u32\tnum_entry_point_offsets;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */\n+\t__u8\tnal_unit_type;\n+\t__u8\tnuh_temporal_id_plus1;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+\t__u8\tslice_type;\n+\t__u8\tcolour_plane_id;\n+\t__u16\tslice_pic_order_cnt;\n+\t__u8\tnum_ref_idx_l0_active_minus1;\n+\t__u8\tnum_ref_idx_l1_active_minus1;\n+\t__u8\tcollocated_ref_idx;\n+\t__u8\tfive_minus_max_num_merge_cand;\n+\t__s8\tslice_qp_delta;\n+\t__s8\tslice_cb_qp_offset;\n+\t__s8\tslice_cr_qp_offset;\n+\t__s8\tslice_act_y_qp_offset;\n+\t__s8\tslice_act_cb_qp_offset;\n+\t__s8\tslice_act_cr_qp_offset;\n+\t__s8\tslice_beta_offset_div2;\n+\t__s8\tslice_tc_offset_div2;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */\n+\t__u8\tpic_struct;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+\t__u8\tref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u8\tref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\n+\t__u8\tpadding[5];\n+\n+\t__u32\tentry_point_offset_minus1[256];\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */\n+\tstruct v4l2_hevc_pred_weight_table pred_weight_table;\n+\n+\t__u64\tflags;\n+};\n+\n+#define V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC\t\t0x1\n+#define V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC\t\t0x2\n+#define V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR  0x4\n+\n+struct v4l2_ctrl_hevc_decode_params {\n+\t__s32\tpic_order_cnt_val;\n+\t__u8\tnum_active_dpb_entries;\n+\tstruct\tv4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u8\tnum_poc_st_curr_before;\n+\t__u8\tnum_poc_st_curr_after;\n+\t__u8\tnum_poc_lt_curr;\n+\t__u8\tpoc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u8\tpoc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u8\tpoc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u64\tflags;\n+};\n+\n+struct v4l2_ctrl_hevc_scaling_matrix {\n+\t__u8\tscaling_list_4x4[6][16];\n+\t__u8\tscaling_list_8x8[6][64];\n+\t__u8\tscaling_list_16x16[6][64];\n+\t__u8\tscaling_list_32x32[2][64];\n+\t__u8\tscaling_list_dc_coef_16x16[6];\n+\t__u8\tscaling_list_dc_coef_32x32[2];\n+};\n+\n+/*  MPEG-class control IDs specific to the Hantro driver as defined by V4L2 */\n+#define V4L2_CID_CODEC_HANTRO_BASE\t\t\t\t(V4L2_CTRL_CLASS_CODEC | 0x1200)\n+/*\n+ * V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP -\n+ * the number of data (in bits) to skip in the\n+ * slice segment header.\n+ * If non-IDR, the bits to be skipped go from syntax element \"pic_output_flag\"\n+ * to before syntax element \"slice_temporal_mvp_enabled_flag\".\n+ * If IDR, the skipped bits are just \"pic_output_flag\"\n+ * (separate_colour_plane_flag is not supported).\n+ */\n+#define V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP\t(V4L2_CID_CODEC_HANTRO_BASE + 0)\n+\n+#endif\ndiff --git a/libavcodec/hevc-ctrls-v4.h b/libavcodec/hevc-ctrls-v4.h\nnew file mode 100644\nindex 0000000000..c02fdbe5a8\n--- /dev/null\n+++ b/libavcodec/hevc-ctrls-v4.h\n@@ -0,0 +1,524 @@\n+/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */\n+/*\n+ *  Video for Linux Two controls header file\n+ *\n+ *  Copyright (C) 1999-2012 the contributors\n+ *\n+ *  This program is free software; you can redistribute it and/or modify\n+ *  it under the terms of the GNU General Public License as published by\n+ *  the Free Software Foundation; either version 2 of the License, or\n+ *  (at your option) any later version.\n+ *\n+ *  This program is distributed in the hope that it will be useful,\n+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ *  GNU General Public License for more details.\n+ *\n+ *  Alternatively you can redistribute this file under the terms of the\n+ *  BSD license as stated below:\n+ *\n+ *  Redistribution and use in source and binary forms, with or without\n+ *  modification, are permitted provided that the following conditions\n+ *  are met:\n+ *  1. Redistributions of source code must retain the above copyright\n+ *     notice, this list of conditions and the following disclaimer.\n+ *  2. Redistributions in binary form must reproduce the above copyright\n+ *     notice, this list of conditions and the following disclaimer in\n+ *     the documentation and/or other materials provided with the\n+ *     distribution.\n+ *  3. The names of its contributors may not be used to endorse or promote\n+ *     products derived from this software without specific prior written\n+ *     permission.\n+ *\n+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *  \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\n+ *  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n+ *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n+ *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+ *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ *\n+ *  The contents of this header was split off from videodev2.h. All control\n+ *  definitions should be added to this header, which is included by\n+ *  videodev2.h.\n+ */\n+\n+#ifndef AVCODEC_HEVC_CTRLS_V4_H\n+#define AVCODEC_HEVC_CTRLS_V4_H\n+\n+#include <linux/const.h>\n+#include <linux/types.h>\n+\n+#ifndef V4L2_CTRL_CLASS_CODEC_STATELESS\n+#define V4L2_CTRL_CLASS_CODEC_STATELESS 0x00a40000\t/* Stateless codecs controls */\n+#endif\n+#ifndef V4L2_CID_CODEC_STATELESS_BASE\n+#define V4L2_CID_CODEC_STATELESS_BASE\t\t(V4L2_CTRL_CLASS_CODEC_STATELESS | 0x900)\n+#endif\n+\n+#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */\n+\n+#define V4L2_CID_STATELESS_HEVC_SPS\t\t(V4L2_CID_CODEC_STATELESS_BASE + 400)\n+#define V4L2_CID_STATELESS_HEVC_PPS\t\t(V4L2_CID_CODEC_STATELESS_BASE + 401)\n+#define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS\t(V4L2_CID_CODEC_STATELESS_BASE + 402)\n+#define V4L2_CID_STATELESS_HEVC_SCALING_MATRIX\t(V4L2_CID_CODEC_STATELESS_BASE + 403)\n+#define V4L2_CID_STATELESS_HEVC_DECODE_PARAMS\t(V4L2_CID_CODEC_STATELESS_BASE + 404)\n+#define V4L2_CID_STATELESS_HEVC_DECODE_MODE\t(V4L2_CID_CODEC_STATELESS_BASE + 405)\n+#define V4L2_CID_STATELESS_HEVC_START_CODE\t(V4L2_CID_CODEC_STATELESS_BASE + 406)\n+#define V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (V4L2_CID_CODEC_STATELESS_BASE + 407)\n+\n+enum v4l2_stateless_hevc_decode_mode {\n+\tV4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED,\n+\tV4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED,\n+};\n+\n+enum v4l2_stateless_hevc_start_code {\n+\tV4L2_STATELESS_HEVC_START_CODE_NONE,\n+\tV4L2_STATELESS_HEVC_START_CODE_ANNEX_B,\n+};\n+\n+#define V4L2_HEVC_SLICE_TYPE_B\t0\n+#define V4L2_HEVC_SLICE_TYPE_P\t1\n+#define V4L2_HEVC_SLICE_TYPE_I\t2\n+\n+#define V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE\t\t(1ULL << 0)\n+#define V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED\t\t\t(1ULL << 1)\n+#define V4L2_HEVC_SPS_FLAG_AMP_ENABLED\t\t\t\t(1ULL << 2)\n+#define V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET\t\t(1ULL << 3)\n+#define V4L2_HEVC_SPS_FLAG_PCM_ENABLED\t\t\t\t(1ULL << 4)\n+#define V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED\t\t(1ULL << 5)\n+#define V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT\t\t(1ULL << 6)\n+#define V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED\t\t(1ULL << 7)\n+#define V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED\t(1ULL << 8)\n+\n+/**\n+ * struct v4l2_ctrl_hevc_sps - ITU-T Rec. H.265: Sequence parameter set\n+ *\n+ * @video_parameter_set_id: specifies the value of the\n+ *\t\t\tvps_video_parameter_set_id of the active VPS\n+ * @seq_parameter_set_id: provides an identifier for the SPS for\n+ *\t\t\t  reference by other syntax elements\n+ * @pic_width_in_luma_samples:\tspecifies the width of each decoded picture\n+ *\t\t\t\tin units of luma samples\n+ * @pic_height_in_luma_samples: specifies the height of each decoded picture\n+ *\t\t\t\tin units of luma samples\n+ * @bit_depth_luma_minus8: this value plus 8specifies the bit depth of the\n+ *                         samples of the luma array\n+ * @bit_depth_chroma_minus8: this value plus 8 specifies the bit depth of the\n+ *                           samples of the chroma arrays\n+ * @log2_max_pic_order_cnt_lsb_minus4: this value plus 4 specifies the value of\n+ *                                     the variable MaxPicOrderCntLsb\n+ * @sps_max_dec_pic_buffering_minus1: this value plus 1 specifies the maximum\n+ *                                    required size of the decoded picture\n+ *                                    buffer for the codec video sequence\n+ * @sps_max_num_reorder_pics: indicates the maximum allowed number of pictures\n+ * @sps_max_latency_increase_plus1: not equal to 0 is used to compute the\n+ *\t\t\t\t    value of SpsMaxLatencyPictures array\n+ * @log2_min_luma_coding_block_size_minus3: plus 3 specifies the minimum\n+ *\t\t\t\t\t    luma coding block size\n+ * @log2_diff_max_min_luma_coding_block_size: specifies the difference between\n+ *\t\t\t\t\t      the maximum and minimum luma\n+ *\t\t\t\t\t      coding block size\n+ * @log2_min_luma_transform_block_size_minus2: plus 2 specifies the minimum luma\n+ *\t\t\t\t\t       transform block size\n+ * @log2_diff_max_min_luma_transform_block_size: specifies the difference between\n+ *\t\t\t\t\t\t the maximum and minimum luma\n+ *\t\t\t\t\t\t transform block size\n+ * @max_transform_hierarchy_depth_inter: specifies the maximum hierarchy\n+ *\t\t\t\t\t depth for transform units of\n+ *\t\t\t\t\t coding units coded in inter\n+ *\t\t\t\t\t prediction mode\n+ * @max_transform_hierarchy_depth_intra: specifies the maximum hierarchy\n+ *\t\t\t\t\t depth for transform units of\n+ *\t\t\t\t\t coding units coded in intra\n+ *\t\t\t\t\t prediction mode\n+ * @pcm_sample_bit_depth_luma_minus1: this value plus 1 specifies the number of\n+ *                                    bits used to represent each of PCM sample\n+ *                                    values of the luma component\n+ * @pcm_sample_bit_depth_chroma_minus1: this value plus 1 specifies the number\n+ *                                      of bits used to represent each of PCM\n+ *                                      sample values of the chroma components\n+ * @log2_min_pcm_luma_coding_block_size_minus3: this value plus 3 specifies the\n+ *                                              minimum size of coding blocks\n+ * @log2_diff_max_min_pcm_luma_coding_block_size: specifies the difference between\n+ *\t\t\t\t\t\t  the maximum and minimum size of\n+ *\t\t\t\t\t\t  coding blocks\n+ * @num_short_term_ref_pic_sets: specifies the number of st_ref_pic_set()\n+ *\t\t\t\t syntax structures included in the SPS\n+ * @num_long_term_ref_pics_sps: specifies the number of candidate long-term\n+ *\t\t\t\treference pictures that are specified in the SPS\n+ * @chroma_format_idc: specifies the chroma sampling\n+ * @sps_max_sub_layers_minus1: this value plus 1 specifies the maximum number\n+ *                             of temporal sub-layers\n+ * @reserved: padding field. Should be zeroed by applications.\n+ * @flags: see V4L2_HEVC_SPS_FLAG_{}\n+ */\n+struct v4l2_ctrl_hevc_sps {\n+\t__u8\tvideo_parameter_set_id;\n+\t__u8\tseq_parameter_set_id;\n+\t__u16\tpic_width_in_luma_samples;\n+\t__u16\tpic_height_in_luma_samples;\n+\t__u8\tbit_depth_luma_minus8;\n+\t__u8\tbit_depth_chroma_minus8;\n+\t__u8\tlog2_max_pic_order_cnt_lsb_minus4;\n+\t__u8\tsps_max_dec_pic_buffering_minus1;\n+\t__u8\tsps_max_num_reorder_pics;\n+\t__u8\tsps_max_latency_increase_plus1;\n+\t__u8\tlog2_min_luma_coding_block_size_minus3;\n+\t__u8\tlog2_diff_max_min_luma_coding_block_size;\n+\t__u8\tlog2_min_luma_transform_block_size_minus2;\n+\t__u8\tlog2_diff_max_min_luma_transform_block_size;\n+\t__u8\tmax_transform_hierarchy_depth_inter;\n+\t__u8\tmax_transform_hierarchy_depth_intra;\n+\t__u8\tpcm_sample_bit_depth_luma_minus1;\n+\t__u8\tpcm_sample_bit_depth_chroma_minus1;\n+\t__u8\tlog2_min_pcm_luma_coding_block_size_minus3;\n+\t__u8\tlog2_diff_max_min_pcm_luma_coding_block_size;\n+\t__u8\tnum_short_term_ref_pic_sets;\n+\t__u8\tnum_long_term_ref_pics_sps;\n+\t__u8\tchroma_format_idc;\n+\t__u8\tsps_max_sub_layers_minus1;\n+\n+\t__u8\treserved[6];\n+\t__u64\tflags;\n+};\n+\n+#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED\t(1ULL << 0)\n+#define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT\t\t\t(1ULL << 1)\n+#define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED\t\t(1ULL << 2)\n+#define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT\t\t\t(1ULL << 3)\n+#define V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED\t\t(1ULL << 4)\n+#define V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED\t\t(1ULL << 5)\n+#define V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED\t\t\t(1ULL << 6)\n+#define V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT\t(1ULL << 7)\n+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED\t\t\t(1ULL << 8)\n+#define V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED\t\t\t(1ULL << 9)\n+#define V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED\t\t(1ULL << 10)\n+#define V4L2_HEVC_PPS_FLAG_TILES_ENABLED\t\t\t(1ULL << 11)\n+#define V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED\t\t(1ULL << 12)\n+#define V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED\t(1ULL << 13)\n+#define V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 14)\n+#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED\t(1ULL << 15)\n+#define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER\t(1ULL << 16)\n+#define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT\t\t(1ULL << 17)\n+#define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18)\n+#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT\t(1ULL << 19)\n+#define V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING\t\t\t(1ULL << 20)\n+\n+/**\n+ * struct v4l2_ctrl_hevc_pps - ITU-T Rec. H.265: Picture parameter set\n+ *\n+ * @pic_parameter_set_id: identifies the PPS for reference by other\n+ *\t\t\t  syntax elements\n+ * @num_extra_slice_header_bits: specifies the number of extra slice header\n+ *\t\t\t\t bits that are present in the slice header RBSP\n+ *\t\t\t\t for coded pictures referring to the PPS.\n+ * @num_ref_idx_l0_default_active_minus1: this value plus 1 specifies the\n+ *                                        inferred value of num_ref_idx_l0_active_minus1\n+ * @num_ref_idx_l1_default_active_minus1: this value plus 1 specifies the\n+ *                                        inferred value of num_ref_idx_l1_active_minus1\n+ * @init_qp_minus26: this value plus 26 specifies the initial value of SliceQp Y for\n+ *\t\t     each slice referring to the PPS\n+ * @diff_cu_qp_delta_depth: specifies the difference between the luma coding\n+ *\t\t\t    tree block size and the minimum luma coding block\n+ *\t\t\t    size of coding units that convey cu_qp_delta_abs\n+ *\t\t\t    and cu_qp_delta_sign_flag\n+ * @pps_cb_qp_offset: specify the offsets to the luma quantization parameter Cb\n+ * @pps_cr_qp_offset: specify the offsets to the luma quantization parameter Cr\n+ * @num_tile_columns_minus1: this value plus 1 specifies the number of tile columns\n+ *\t\t\t     partitioning the picture\n+ * @num_tile_rows_minus1: this value plus 1 specifies the number of tile rows partitioning\n+ *\t\t\t  the picture\n+ * @column_width_minus1: this value plus 1 specifies the width of the each tile column in\n+ *\t\t\t units of coding tree blocks\n+ * @row_height_minus1: this value plus 1 specifies the height of the each tile row in\n+ *\t\t       units of coding tree blocks\n+ * @pps_beta_offset_div2: specify the default deblocking parameter offsets for\n+ *\t\t\t  beta divided by 2\n+ * @pps_tc_offset_div2: specify the default deblocking parameter offsets for tC\n+ *\t\t\tdivided by 2\n+ * @log2_parallel_merge_level_minus2: this value plus 2 specifies the value of\n+ *                                    the variable Log2ParMrgLevel\n+ * @reserved: padding field. Should be zeroed by applications.\n+ * @flags: see V4L2_HEVC_PPS_FLAG_{}\n+ */\n+struct v4l2_ctrl_hevc_pps {\n+\t__u8\tpic_parameter_set_id;\n+\t__u8\tnum_extra_slice_header_bits;\n+\t__u8\tnum_ref_idx_l0_default_active_minus1;\n+\t__u8\tnum_ref_idx_l1_default_active_minus1;\n+\t__s8\tinit_qp_minus26;\n+\t__u8\tdiff_cu_qp_delta_depth;\n+\t__s8\tpps_cb_qp_offset;\n+\t__s8\tpps_cr_qp_offset;\n+\t__u8\tnum_tile_columns_minus1;\n+\t__u8\tnum_tile_rows_minus1;\n+\t__u8\tcolumn_width_minus1[20];\n+\t__u8\trow_height_minus1[22];\n+\t__s8\tpps_beta_offset_div2;\n+\t__s8\tpps_tc_offset_div2;\n+\t__u8\tlog2_parallel_merge_level_minus2;\n+\t__u8\treserved;\n+\t__u64\tflags;\n+};\n+\n+#define V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE\t0x01\n+\n+#define V4L2_HEVC_SEI_PIC_STRUCT_FRAME\t\t\t\t0\n+#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD\t\t\t1\n+#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD\t\t\t2\n+#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM\t\t\t3\n+#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP\t\t\t4\n+#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP\t\t\t5\n+#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM\t\t6\n+#define V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING\t\t\t7\n+#define V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING\t\t\t8\n+#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM\t9\n+#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP\t10\n+#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM\t\t11\n+#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP\t\t12\n+\n+#define V4L2_HEVC_DPB_ENTRIES_NUM_MAX\t\t16\n+\n+/**\n+ * struct v4l2_hevc_dpb_entry - HEVC decoded picture buffer entry\n+ *\n+ * @timestamp: timestamp of the V4L2 capture buffer to use as reference.\n+ * @flags: long term flag for the reference frame\n+ * @field_pic: whether the reference is a field picture or a frame.\n+ * @reserved: padding field. Should be zeroed by applications.\n+ * @pic_order_cnt_val: the picture order count of the current picture.\n+ */\n+struct v4l2_hevc_dpb_entry {\n+\t__u64\ttimestamp;\n+\t__u8\tflags;\n+\t__u8\tfield_pic;\n+\t__u16\treserved;\n+\t__s32\tpic_order_cnt_val;\n+};\n+\n+/**\n+ * struct v4l2_hevc_pred_weight_table - HEVC weighted prediction parameters\n+ *\n+ * @delta_luma_weight_l0: the difference of the weighting factor applied\n+ *\t\t\t  to the luma prediction value for list 0\n+ * @luma_offset_l0: the additive offset applied to the luma prediction value\n+ *\t\t    for list 0\n+ * @delta_chroma_weight_l0: the difference of the weighting factor applied\n+ *\t\t\t    to the chroma prediction values for list 0\n+ * @chroma_offset_l0: the difference of the additive offset applied to\n+ *\t\t      the chroma prediction values for list 0\n+ * @delta_luma_weight_l1: the difference of the weighting factor applied\n+ *\t\t\t  to the luma prediction value for list 1\n+ * @luma_offset_l1: the additive offset applied to the luma prediction value\n+ *\t\t    for list 1\n+ * @delta_chroma_weight_l1: the difference of the weighting factor applied\n+ *\t\t\t    to the chroma prediction values for list 1\n+ * @chroma_offset_l1: the difference of the additive offset applied to\n+ *\t\t      the chroma prediction values for list 1\n+ * @luma_log2_weight_denom: the base 2 logarithm of the denominator for\n+ *\t\t\t    all luma weighting factors\n+ * @delta_chroma_log2_weight_denom: the difference of the base 2 logarithm\n+ *\t\t\t\t    of the denominator for all chroma\n+ *\t\t\t\t    weighting factors\n+ */\n+struct v4l2_hevc_pred_weight_table {\n+\t__s8\tdelta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tluma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tdelta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\t__s8\tchroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\n+\t__s8\tdelta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tluma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__s8\tdelta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\t__s8\tchroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2];\n+\n+\t__u8\tluma_log2_weight_denom;\n+\t__s8\tdelta_chroma_log2_weight_denom;\n+};\n+\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA\t\t(1ULL << 0)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA\t\t(1ULL << 1)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED\t(1ULL << 2)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO\t\t\t(1ULL << 3)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT\t\t\t(1ULL << 4)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0\t\t(1ULL << 5)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV\t\t(1ULL << 6)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8)\n+#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT\t(1ULL << 9)\n+\n+/**\n+ * struct v4l2_ctrl_hevc_slice_params - HEVC slice parameters\n+ *\n+ * This control is a dynamically sized 1-dimensional array,\n+ * V4L2_CTRL_FLAG_DYNAMIC_ARRAY flag must be set when using it.\n+ *\n+ * @bit_size: size (in bits) of the current slice data\n+ * @data_byte_offset: offset (in bytes) to the video data in the current slice data\n+ * @num_entry_point_offsets: specifies the number of entry point offset syntax\n+ *\t\t\t     elements in the slice header.\n+ * @nal_unit_type: specifies the coding type of the slice (B, P or I)\n+ * @nuh_temporal_id_plus1: minus 1 specifies a temporal identifier for the NAL unit\n+ * @slice_type: see V4L2_HEVC_SLICE_TYPE_{}\n+ * @colour_plane_id: specifies the colour plane associated with the current slice\n+ * @slice_pic_order_cnt: specifies the picture order count\n+ * @num_ref_idx_l0_active_minus1: this value plus 1 specifies the maximum\n+ *                                reference index for reference picture list 0\n+ *                                that may be used to decode the slice\n+ * @num_ref_idx_l1_active_minus1: this value plus 1 specifies the maximum\n+ *                                reference index for reference picture list 1\n+ *                                that may be used to decode the slice\n+ * @collocated_ref_idx: specifies the reference index of the collocated picture used\n+ *\t\t\tfor temporal motion vector prediction\n+ * @five_minus_max_num_merge_cand: specifies the maximum number of merging\n+ *\t\t\t\t   motion vector prediction candidates supported in\n+ *\t\t\t\t   the slice subtracted from 5\n+ * @slice_qp_delta: specifies the initial value of QpY to be used for the coding\n+ *\t\t    blocks in the slice\n+ * @slice_cb_qp_offset: specifies a difference to be added to the value of pps_cb_qp_offset\n+ * @slice_cr_qp_offset: specifies a difference to be added to the value of pps_cr_qp_offset\n+ * @slice_act_y_qp_offset: screen content extension parameters\n+ * @slice_act_cb_qp_offset: screen content extension parameters\n+ * @slice_act_cr_qp_offset: screen content extension parameters\n+ * @slice_beta_offset_div2: specify the deblocking parameter offsets for beta divided by 2\n+ * @slice_tc_offset_div2: specify the deblocking parameter offsets for tC divided by 2\n+ * @pic_struct: indicates whether a picture should be displayed as a frame or as one or\n+ *\t\tmore fields\n+ * @reserved0: padding field. Should be zeroed by applications.\n+ * @slice_segment_addr: specifies the address of the first coding tree block in\n+ *\t\t\tthe slice segment\n+ * @ref_idx_l0: the list of L0 reference elements as indices in the DPB\n+ * @ref_idx_l1: the list of L1 reference elements as indices in the DPB\n+ * @short_term_ref_pic_set_size: specifies the size of short-term reference\n+ *\t\t\t\t pictures set included in the SPS\n+ * @long_term_ref_pic_set_size: specifies the size of long-term reference\n+ *\t\t\t\tpictures set include in the SPS\n+ * @pred_weight_table: the prediction weight coefficients for inter-picture\n+ *\t\t       prediction\n+ * @reserved1: padding field. Should be zeroed by applications.\n+ * @flags: see V4L2_HEVC_SLICE_PARAMS_FLAG_{}\n+ */\n+struct v4l2_ctrl_hevc_slice_params {\n+\t__u32\tbit_size;\n+\t__u32\tdata_byte_offset;\n+\t__u32\tnum_entry_point_offsets;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */\n+\t__u8\tnal_unit_type;\n+\t__u8\tnuh_temporal_id_plus1;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+\t__u8\tslice_type;\n+\t__u8\tcolour_plane_id;\n+\t__s32\tslice_pic_order_cnt;\n+\t__u8\tnum_ref_idx_l0_active_minus1;\n+\t__u8\tnum_ref_idx_l1_active_minus1;\n+\t__u8\tcollocated_ref_idx;\n+\t__u8\tfive_minus_max_num_merge_cand;\n+\t__s8\tslice_qp_delta;\n+\t__s8\tslice_cb_qp_offset;\n+\t__s8\tslice_cr_qp_offset;\n+\t__s8\tslice_act_y_qp_offset;\n+\t__s8\tslice_act_cb_qp_offset;\n+\t__s8\tslice_act_cr_qp_offset;\n+\t__s8\tslice_beta_offset_div2;\n+\t__s8\tslice_tc_offset_div2;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */\n+\t__u8\tpic_struct;\n+\n+\t__u8\treserved0[3];\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+\t__u32\tslice_segment_addr;\n+\t__u8\tref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u8\tref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u16\tshort_term_ref_pic_set_size;\n+\t__u16\tlong_term_ref_pic_set_size;\n+\n+\t/* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */\n+\tstruct v4l2_hevc_pred_weight_table pred_weight_table;\n+\n+\t__u8\treserved1[2];\n+\t__u64\tflags;\n+};\n+\n+#define V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC\t\t0x1\n+#define V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC\t\t0x2\n+#define V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR  0x4\n+\n+/**\n+ * struct v4l2_ctrl_hevc_decode_params - HEVC decode parameters\n+ *\n+ * @pic_order_cnt_val: picture order count\n+ * @short_term_ref_pic_set_size: specifies the size of short-term reference\n+ *\t\t\t\t pictures set included in the SPS of the first slice\n+ * @long_term_ref_pic_set_size: specifies the size of long-term reference\n+ *\t\t\t\tpictures set include in the SPS of the first slice\n+ * @num_active_dpb_entries: the number of entries in dpb\n+ * @num_poc_st_curr_before: the number of reference pictures in the short-term\n+ *\t\t\t    set that come before the current frame\n+ * @num_poc_st_curr_after: the number of reference pictures in the short-term\n+ *\t\t\t   set that come after the current frame\n+ * @num_poc_lt_curr: the number of reference pictures in the long-term set\n+ * @poc_st_curr_before: provides the index of the short term before references\n+ *\t\t\tin DPB array\n+ * @poc_st_curr_after: provides the index of the short term after references\n+ *\t\t       in DPB array\n+ * @poc_lt_curr: provides the index of the long term references in DPB array\n+ * @reserved: padding field. Should be zeroed by applications.\n+ * @dpb: the decoded picture buffer, for meta-data about reference frames\n+ * @flags: see V4L2_HEVC_DECODE_PARAM_FLAG_{}\n+ */\n+struct v4l2_ctrl_hevc_decode_params {\n+\t__s32\tpic_order_cnt_val;\n+\t__u16\tshort_term_ref_pic_set_size;\n+\t__u16\tlong_term_ref_pic_set_size;\n+\t__u8\tnum_active_dpb_entries;\n+\t__u8\tnum_poc_st_curr_before;\n+\t__u8\tnum_poc_st_curr_after;\n+\t__u8\tnum_poc_lt_curr;\n+\t__u8\tpoc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u8\tpoc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u8\tpoc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u8\treserved[4];\n+\tstruct\tv4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];\n+\t__u64\tflags;\n+};\n+\n+/**\n+ * struct v4l2_ctrl_hevc_scaling_matrix - HEVC scaling lists parameters\n+ *\n+ * @scaling_list_4x4: scaling list is used for the scaling process for\n+ *\t\t      transform coefficients. The values on each scaling\n+ *\t\t      list are expected in raster scan order\n+ * @scaling_list_8x8: scaling list is used for the scaling process for\n+ *\t\t      transform coefficients. The values on each scaling\n+ *\t\t      list are expected in raster scan order\n+ * @scaling_list_16x16:\tscaling list is used for the scaling process for\n+ *\t\t\ttransform coefficients. The values on each scaling\n+ *\t\t\tlist are expected in raster scan order\n+ * @scaling_list_32x32:\tscaling list is used for the scaling process for\n+ *\t\t\ttransform coefficients. The values on each scaling\n+ *\t\t\tlist are expected in raster scan order\n+ * @scaling_list_dc_coef_16x16:\tscaling list is used for the scaling process\n+ *\t\t\t\tfor transform coefficients. The values on each\n+ *\t\t\t\tscaling list are expected in raster scan order.\n+ * @scaling_list_dc_coef_32x32:\tscaling list is used for the scaling process\n+ *\t\t\t\tfor transform coefficients. The values on each\n+ *\t\t\t\tscaling list are expected in raster scan order.\n+ */\n+struct v4l2_ctrl_hevc_scaling_matrix {\n+\t__u8\tscaling_list_4x4[6][16];\n+\t__u8\tscaling_list_8x8[6][64];\n+\t__u8\tscaling_list_16x16[6][64];\n+\t__u8\tscaling_list_32x32[2][64];\n+\t__u8\tscaling_list_dc_coef_16x16[6];\n+\t__u8\tscaling_list_dc_coef_32x32[2];\n+};\n+\n+#endif\ndiff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c\nindex 463d352055..7feff43c28 100644\n--- a/libavcodec/hevc_parser.c\n+++ b/libavcodec/hevc_parser.c\n@@ -98,6 +98,19 @@ static int hevc_parse_slice_header(AVCodecParserContext *s, H2645NAL *nal,\n     avctx->profile  = ps->sps->ptl.general_ptl.profile_idc;\n     avctx->level    = ps->sps->ptl.general_ptl.level_idc;\n \n+    if (ps->sps->chroma_format_idc == 1) {\n+        avctx->chroma_sample_location = ps->sps->vui.chroma_loc_info_present_flag ?\n+            ps->sps->vui.chroma_sample_loc_type_top_field + 1 :\n+            AVCHROMA_LOC_LEFT;\n+    }\n+    else if (ps->sps->chroma_format_idc == 2 ||\n+             ps->sps->chroma_format_idc == 3) {\n+        avctx->chroma_sample_location = AVCHROMA_LOC_TOPLEFT;;\n+    }\n+    else {\n+        avctx->chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED;\n+    }\n+\n     if (ps->vps->vps_timing_info_present_flag) {\n         num = ps->vps->vps_num_units_in_tick;\n         den = ps->vps->vps_time_scale;\ndiff --git a/libavcodec/hevc_refs.c b/libavcodec/hevc_refs.c\nindex 4f6d985ae6..eefae71275 100644\n--- a/libavcodec/hevc_refs.c\n+++ b/libavcodec/hevc_refs.c\n@@ -96,18 +96,22 @@ static HEVCFrame *alloc_frame(HEVCContext *s)\n         if (!frame->rpl_buf)\n             goto fail;\n \n-        frame->tab_mvf_buf = av_buffer_pool_get(s->tab_mvf_pool);\n-        if (!frame->tab_mvf_buf)\n-            goto fail;\n-        frame->tab_mvf = (MvField *)frame->tab_mvf_buf->data;\n+        if (s->tab_mvf_pool) {\n+            frame->tab_mvf_buf = av_buffer_pool_get(s->tab_mvf_pool);\n+            if (!frame->tab_mvf_buf)\n+                goto fail;\n+            frame->tab_mvf = (MvField *)frame->tab_mvf_buf->data;\n+        }\n \n-        frame->rpl_tab_buf = av_buffer_pool_get(s->rpl_tab_pool);\n-        if (!frame->rpl_tab_buf)\n-            goto fail;\n-        frame->rpl_tab   = (RefPicListTab **)frame->rpl_tab_buf->data;\n-        frame->ctb_count = s->ps.sps->ctb_width * s->ps.sps->ctb_height;\n-        for (j = 0; j < frame->ctb_count; j++)\n-            frame->rpl_tab[j] = (RefPicListTab *)frame->rpl_buf->data;\n+        if (s->rpl_tab_pool) {\n+            frame->rpl_tab_buf = av_buffer_pool_get(s->rpl_tab_pool);\n+            if (!frame->rpl_tab_buf)\n+                goto fail;\n+            frame->rpl_tab   = (RefPicListTab **)frame->rpl_tab_buf->data;\n+            frame->ctb_count = s->ps.sps->ctb_width * s->ps.sps->ctb_height;\n+            for (j = 0; j < frame->ctb_count; j++)\n+                frame->rpl_tab[j] = (RefPicListTab *)frame->rpl_buf->data;\n+        }\n \n         frame->frame->top_field_first  = s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD;\n         frame->frame->interlaced_frame = (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) || (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_BOTTOM_FIELD);\n@@ -276,14 +280,17 @@ static int init_slice_rpl(HEVCContext *s)\n     int ctb_count    = frame->ctb_count;\n     int ctb_addr_ts  = s->ps.pps->ctb_addr_rs_to_ts[s->sh.slice_segment_addr];\n     int i;\n+    RefPicListTab * const tab = (RefPicListTab *)frame->rpl_buf->data + s->slice_idx;\n \n     if (s->slice_idx >= frame->rpl_buf->size / sizeof(RefPicListTab))\n         return AVERROR_INVALIDDATA;\n \n-    for (i = ctb_addr_ts; i < ctb_count; i++)\n-        frame->rpl_tab[i] = (RefPicListTab *)frame->rpl_buf->data + s->slice_idx;\n+    if (frame->rpl_tab) {\n+        for (i = ctb_addr_ts; i < ctb_count; i++)\n+            frame->rpl_tab[i] = tab;\n+    }\n \n-    frame->refPicList = (RefPicList *)frame->rpl_tab[ctb_addr_ts];\n+    frame->refPicList = tab->refPicList;\n \n     return 0;\n }\ndiff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c\nindex 2231aed259..7b05b41441 100644\n--- a/libavcodec/hevcdec.c\n+++ b/libavcodec/hevcdec.c\n@@ -333,6 +333,19 @@ static void export_stream_params(HEVCContext *s, const HEVCSPS *sps)\n \n     ff_set_sar(avctx, sps->vui.sar);\n \n+    if (sps->chroma_format_idc == 1) {\n+        avctx->chroma_sample_location = sps->vui.chroma_loc_info_present_flag ?\n+            sps->vui.chroma_sample_loc_type_top_field + 1 :\n+            AVCHROMA_LOC_LEFT;\n+    }\n+    else if (sps->chroma_format_idc == 2 ||\n+             sps->chroma_format_idc == 3) {\n+        avctx->chroma_sample_location = AVCHROMA_LOC_TOPLEFT;;\n+    }\n+    else {\n+        avctx->chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED;\n+    }\n+\n     if (sps->vui.video_signal_type_present_flag)\n         avctx->color_range = sps->vui.video_full_range_flag ? AVCOL_RANGE_JPEG\n                                                             : AVCOL_RANGE_MPEG;\n@@ -392,14 +405,20 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)\n #define HWACCEL_MAX (CONFIG_HEVC_DXVA2_HWACCEL + \\\n                      CONFIG_HEVC_D3D11VA_HWACCEL * 2 + \\\n                      CONFIG_HEVC_NVDEC_HWACCEL + \\\n+                     CONFIG_HEVC_V4L2REQUEST_HWACCEL + \\\n                      CONFIG_HEVC_VAAPI_HWACCEL + \\\n                      CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL + \\\n+                     CONFIG_HEVC_RPI4_8_HWACCEL + \\\n+                     CONFIG_HEVC_RPI4_10_HWACCEL + \\\n                      CONFIG_HEVC_VDPAU_HWACCEL)\n     enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts;\n \n     switch (sps->pix_fmt) {\n     case AV_PIX_FMT_YUV420P:\n     case AV_PIX_FMT_YUVJ420P:\n+#if CONFIG_HEVC_RPI4_8_HWACCEL\n+        *fmt++ = AV_PIX_FMT_RPI4_8;\n+#endif\n #if CONFIG_HEVC_DXVA2_HWACCEL\n         *fmt++ = AV_PIX_FMT_DXVA2_VLD;\n #endif\n@@ -418,9 +437,15 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)\n #endif\n #if CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL\n         *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX;\n+#endif\n+#if CONFIG_HEVC_V4L2REQUEST_HWACCEL\n+        *fmt++ = AV_PIX_FMT_DRM_PRIME;\n #endif\n         break;\n     case AV_PIX_FMT_YUV420P10:\n+#if CONFIG_HEVC_RPI4_10_HWACCEL\n+        *fmt++ = AV_PIX_FMT_RPI4_10;\n+#endif\n #if CONFIG_HEVC_DXVA2_HWACCEL\n         *fmt++ = AV_PIX_FMT_DXVA2_VLD;\n #endif\n@@ -439,6 +464,9 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)\n #endif\n #if CONFIG_HEVC_NVDEC_HWACCEL\n         *fmt++ = AV_PIX_FMT_CUDA;\n+#endif\n+#if CONFIG_HEVC_V4L2REQUEST_HWACCEL\n+        *fmt++ = AV_PIX_FMT_DRM_PRIME;\n #endif\n         break;\n     case AV_PIX_FMT_YUV444P:\n@@ -485,6 +513,16 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps,\n     if (!sps)\n         return 0;\n \n+    // If hwaccel then we don't need all the s/w decode helper arrays\n+    if (s->avctx->hwaccel) {\n+        export_stream_params(s, sps);\n+\n+        s->avctx->pix_fmt = pix_fmt;\n+        s->ps.sps = sps;\n+        s->ps.vps = (HEVCVPS*) s->ps.vps_list[s->ps.sps->vps_id]->data;\n+        return 0;\n+    }\n+\n     ret = pic_arrays_init(s, sps);\n     if (ret < 0)\n         goto fail;\n@@ -2901,11 +2939,13 @@ static int hevc_frame_start(HEVCContext *s)\n                            ((s->ps.sps->height >> s->ps.sps->log2_min_cb_size) + 1);\n     int ret;\n \n-    memset(s->horizontal_bs, 0, s->bs_width * s->bs_height);\n-    memset(s->vertical_bs,   0, s->bs_width * s->bs_height);\n-    memset(s->cbf_luma,      0, s->ps.sps->min_tb_width * s->ps.sps->min_tb_height);\n-    memset(s->is_pcm,        0, (s->ps.sps->min_pu_width + 1) * (s->ps.sps->min_pu_height + 1));\n-    memset(s->tab_slice_address, -1, pic_size_in_ctb * sizeof(*s->tab_slice_address));\n+    if (s->horizontal_bs) {\n+        memset(s->horizontal_bs, 0, s->bs_width * s->bs_height);\n+        memset(s->vertical_bs,   0, s->bs_width * s->bs_height);\n+        memset(s->cbf_luma,      0, s->ps.sps->min_tb_width * s->ps.sps->min_tb_height);\n+        memset(s->is_pcm,        0, (s->ps.sps->min_pu_width + 1) * (s->ps.sps->min_pu_height + 1));\n+        memset(s->tab_slice_address, -1, pic_size_in_ctb * sizeof(*s->tab_slice_address));\n+    }\n \n     s->is_decoded        = 0;\n     s->first_nal_type    = s->nal_unit_type;\n@@ -3327,7 +3367,14 @@ static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output,\n     s->ref = NULL;\n     ret    = decode_nal_units(s, avpkt->data, avpkt->size);\n     if (ret < 0)\n+    {\n+        // Ensure that hwaccel knows this frame is over\n+        if (s->avctx->hwaccel && s->avctx->hwaccel->abort_frame) {\n+            s->avctx->hwaccel->abort_frame(s->avctx);\n+        }\n+\n         return ret;\n+    }\n \n     if (avctx->hwaccel) {\n         if (s->ref && (ret = avctx->hwaccel->end_frame(avctx)) < 0) {\n@@ -3370,15 +3417,19 @@ static int hevc_ref_frame(HEVCContext *s, HEVCFrame *dst, HEVCFrame *src)\n     if (ret < 0)\n         return ret;\n \n-    dst->tab_mvf_buf = av_buffer_ref(src->tab_mvf_buf);\n-    if (!dst->tab_mvf_buf)\n-        goto fail;\n-    dst->tab_mvf = src->tab_mvf;\n+    if (src->tab_mvf_buf) {\n+        dst->tab_mvf_buf = av_buffer_ref(src->tab_mvf_buf);\n+        if (!dst->tab_mvf_buf)\n+            goto fail;\n+        dst->tab_mvf = src->tab_mvf;\n+    }\n \n-    dst->rpl_tab_buf = av_buffer_ref(src->rpl_tab_buf);\n-    if (!dst->rpl_tab_buf)\n-        goto fail;\n-    dst->rpl_tab = src->rpl_tab;\n+    if (src->rpl_tab_buf) {\n+        dst->rpl_tab_buf = av_buffer_ref(src->rpl_tab_buf);\n+        if (!dst->rpl_tab_buf)\n+            goto fail;\n+        dst->rpl_tab = src->rpl_tab;\n+    }\n \n     dst->rpl_buf = av_buffer_ref(src->rpl_buf);\n     if (!dst->rpl_buf)\n@@ -3697,6 +3748,15 @@ AVCodec ff_hevc_decoder = {\n #if CONFIG_HEVC_NVDEC_HWACCEL\n                                HWACCEL_NVDEC(hevc),\n #endif\n+#if CONFIG_HEVC_RPI4_8_HWACCEL\n+                               HWACCEL_RPI4_8(hevc),\n+#endif\n+#if CONFIG_HEVC_RPI4_10_HWACCEL\n+                               HWACCEL_RPI4_10(hevc),\n+#endif\n+#if CONFIG_HEVC_V4L2REQUEST_HWACCEL\n+                               HWACCEL_V4L2REQUEST(hevc),\n+#endif\n #if CONFIG_HEVC_VAAPI_HWACCEL\n                                HWACCEL_VAAPI(hevc),\n #endif\ndiff --git a/libavcodec/hwaccels.h b/libavcodec/hwaccels.h\nindex 8e54cf73f9..2277aadf75 100644\n--- a/libavcodec/hwaccels.h\n+++ b/libavcodec/hwaccels.h\n@@ -39,6 +39,9 @@ extern const AVHWAccel ff_hevc_d3d11va_hwaccel;\n extern const AVHWAccel ff_hevc_d3d11va2_hwaccel;\n extern const AVHWAccel ff_hevc_dxva2_hwaccel;\n extern const AVHWAccel ff_hevc_nvdec_hwaccel;\n+extern const AVHWAccel ff_hevc_rpi4_8_hwaccel;\n+extern const AVHWAccel ff_hevc_rpi4_10_hwaccel;\n+extern const AVHWAccel ff_hevc_v4l2request_hwaccel;\n extern const AVHWAccel ff_hevc_vaapi_hwaccel;\n extern const AVHWAccel ff_hevc_vdpau_hwaccel;\n extern const AVHWAccel ff_hevc_videotoolbox_hwaccel;\ndiff --git a/libavcodec/hwconfig.h b/libavcodec/hwconfig.h\nindex f421dc909f..f93283b893 100644\n--- a/libavcodec/hwconfig.h\n+++ b/libavcodec/hwconfig.h\n@@ -24,6 +24,7 @@\n \n \n #define HWACCEL_CAP_ASYNC_SAFE      (1 << 0)\n+#define HWACCEL_CAP_MT_SAFE         (1 << 1)\n \n \n typedef struct AVCodecHWConfigInternal {\n@@ -70,6 +71,12 @@ typedef struct AVCodecHWConfigInternal {\n     HW_CONFIG_HWACCEL(1, 1, 0, D3D11,        D3D11VA,      ff_ ## codec ## _d3d11va2_hwaccel)\n #define HWACCEL_NVDEC(codec) \\\n     HW_CONFIG_HWACCEL(1, 1, 0, CUDA,         CUDA,         ff_ ## codec ## _nvdec_hwaccel)\n+#define HWACCEL_RPI4_8(codec) \\\n+    HW_CONFIG_HWACCEL(0, 0, 1, RPI4_8,       NONE,         ff_ ## codec ## _rpi4_8_hwaccel)\n+#define HWACCEL_RPI4_10(codec) \\\n+    HW_CONFIG_HWACCEL(0, 0, 1, RPI4_10,      NONE,         ff_ ## codec ## _rpi4_10_hwaccel)\n+#define HWACCEL_V4L2REQUEST(codec) \\\n+    HW_CONFIG_HWACCEL(1, 0, 0, DRM_PRIME,    DRM,          ff_ ## codec ## _v4l2request_hwaccel)\n #define HWACCEL_VAAPI(codec) \\\n     HW_CONFIG_HWACCEL(1, 1, 1, VAAPI,        VAAPI,        ff_ ## codec ## _vaapi_hwaccel)\n #define HWACCEL_VDPAU(codec) \\\ndiff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c\nindex cb15ac072a..f6261db962 100644\n--- a/libavcodec/mmaldec.c\n+++ b/libavcodec/mmaldec.c\n@@ -24,6 +24,9 @@\n  * MMAL Video Decoder\n  */\n \n+#pragma GCC diagnostic push\n+// Many many redundant decls in the header files\n+#pragma GCC diagnostic ignored \"-Wredundant-decls\"\n #include <bcm_host.h>\n #include <interface/mmal/mmal.h>\n #include <interface/mmal/mmal_parameters_video.h>\n@@ -31,6 +34,7 @@\n #include <interface/mmal/util/mmal_util_params.h>\n #include <interface/mmal/util/mmal_default_components.h>\n #include <interface/mmal/vc/mmal_vc_api.h>\n+#pragma GCC diagnostic pop\n #include <stdatomic.h>\n \n #include \"avcodec.h\"\ndiff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c\nindex 9176027f15..0b0ff03c18 100644\n--- a/libavcodec/pthread_frame.c\n+++ b/libavcodec/pthread_frame.c\n@@ -209,7 +209,8 @@ FF_ENABLE_DEPRECATION_WARNINGS\n \n         /* if the previous thread uses hwaccel then we take the lock to ensure\n          * the threads don't run concurrently */\n-        if (avctx->hwaccel) {\n+        if (avctx->hwaccel &&\n+            !(avctx->hwaccel->caps_internal & HWACCEL_CAP_MT_SAFE)) {\n             pthread_mutex_lock(&p->parent->hwaccel_mutex);\n             p->hwaccel_serializing = 1;\n         }\n@@ -636,7 +637,9 @@ void ff_thread_finish_setup(AVCodecContext *avctx) {\n \n     if (!(avctx->active_thread_type&FF_THREAD_FRAME)) return;\n \n-    if (avctx->hwaccel && !p->hwaccel_serializing) {\n+    if (avctx->hwaccel &&\n+        !(avctx->hwaccel->caps_internal & HWACCEL_CAP_MT_SAFE) &&\n+        !p->hwaccel_serializing) {\n         pthread_mutex_lock(&p->parent->hwaccel_mutex);\n         p->hwaccel_serializing = 1;\n     }\ndiff --git a/libavcodec/raw.c b/libavcodec/raw.c\nindex 079d5c5d10..0781f28615 100644\n--- a/libavcodec/raw.c\n+++ b/libavcodec/raw.c\n@@ -294,6 +294,12 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = {\n     { AV_PIX_FMT_RGB565LE,MKTAG( 3 ,  0 ,  0 ,  0 ) }, /* flipped RGB565LE */\n     { AV_PIX_FMT_YUV444P, MKTAG('Y', 'V', '2', '4') }, /* YUV444P, swapped UV */\n \n+    /* RPI (Might as well define for everything) */\n+    { AV_PIX_FMT_SAND128,     MKTAG('S', 'A', 'N', 'D') },\n+    { AV_PIX_FMT_RPI4_8,      MKTAG('S', 'A', 'N', 'D') },\n+    { AV_PIX_FMT_SAND64_10,   MKTAG('S', 'N', 'D', 'A') },\n+    { AV_PIX_FMT_RPI4_10,     MKTAG('S', 'N', 'D', 'B') },\n+\n     { AV_PIX_FMT_NONE, 0 },\n };\n \ndiff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c\nindex d181b74570..b943dd0379 100644\n--- a/libavcodec/rawenc.c\n+++ b/libavcodec/rawenc.c\n@@ -24,6 +24,7 @@\n  * Raw Video Encoder\n  */\n \n+#include \"config.h\"\n #include \"avcodec.h\"\n #include \"raw.h\"\n #include \"internal.h\"\n@@ -31,6 +32,10 @@\n #include \"libavutil/intreadwrite.h\"\n #include \"libavutil/imgutils.h\"\n #include \"libavutil/internal.h\"\n+#include \"libavutil/avassert.h\"\n+#if CONFIG_SAND\n+#include \"libavutil/rpi_sand_fns.h\"\n+#endif\n \n static av_cold int raw_encode_init(AVCodecContext *avctx)\n {\n@@ -49,22 +54,114 @@ FF_ENABLE_DEPRECATION_WARNINGS\n     return 0;\n }\n \n+#if CONFIG_SAND\n+static int raw_sand8_as_yuv420(AVCodecContext *avctx, AVPacket *pkt,\n+                      const AVFrame *frame)\n+{\n+    const int width = av_frame_cropped_width(frame);\n+    const int height = av_frame_cropped_height(frame);\n+    const int x0 = frame->crop_left;\n+    const int y0 = frame->crop_top;\n+    const int size = width * height * 3 / 2;\n+    uint8_t * dst;\n+    int ret;\n+\n+    if ((ret = ff_alloc_packet2(avctx, pkt, size, size)) < 0)\n+        return ret;\n+\n+    dst = pkt->data;\n+\n+    av_rpi_sand_to_planar_y8(dst, width, frame->data[0], frame->linesize[0], frame->linesize[3], x0, y0, width, height);\n+    dst += width * height;\n+    av_rpi_sand_to_planar_c8(dst, width / 2, dst + width * height / 4, width / 2,\n+                          frame->data[1], frame->linesize[1], av_rpi_sand_frame_stride2(frame), x0 / 2, y0 / 2, width / 2, height / 2);\n+    return 0;\n+}\n+\n+static int raw_sand16_as_yuv420(AVCodecContext *avctx, AVPacket *pkt,\n+                      const AVFrame *frame)\n+{\n+    const int width = av_frame_cropped_width(frame);\n+    const int height = av_frame_cropped_height(frame);\n+    const int x0 = frame->crop_left;\n+    const int y0 = frame->crop_top;\n+    const int size = width * height * 3;\n+    uint8_t * dst;\n+    int ret;\n+\n+    if ((ret = ff_alloc_packet2(avctx, pkt, size, size)) < 0)\n+        return ret;\n+\n+    dst = pkt->data;\n+\n+    av_rpi_sand_to_planar_y16(dst, width * 2, frame->data[0], frame->linesize[0], frame->linesize[3], x0 * 2, y0, width * 2, height);\n+    dst += width * height * 2;\n+    av_rpi_sand_to_planar_c16(dst, width, dst + width * height / 2, width,\n+                          frame->data[1], frame->linesize[1], av_rpi_sand_frame_stride2(frame), x0, y0 / 2, width, height / 2);\n+    return 0;\n+}\n+\n+static int raw_sand30_as_yuv420(AVCodecContext *avctx, AVPacket *pkt,\n+                      const AVFrame *frame)\n+{\n+    const int width = av_frame_cropped_width(frame);\n+    const int height = av_frame_cropped_height(frame);\n+    const int x0 = frame->crop_left;\n+    const int y0 = frame->crop_top;\n+    const int size = width * height * 3;\n+    uint8_t * dst;\n+    int ret;\n+\n+    if ((ret = ff_alloc_packet2(avctx, pkt, size, size)) < 0)\n+        return ret;\n+\n+    dst = pkt->data;\n+\n+    av_rpi_sand30_to_planar_y16(dst, width * 2, frame->data[0], frame->linesize[0], frame->linesize[3], x0, y0, width, height);\n+    dst += width * height * 2;\n+    av_rpi_sand30_to_planar_c16(dst, width, dst + width * height / 2, width,\n+                          frame->data[1], frame->linesize[1], av_rpi_sand_frame_stride2(frame), x0/2, y0 / 2, width/2, height / 2);\n+    return 0;\n+}\n+#endif\n+\n+\n static int raw_encode(AVCodecContext *avctx, AVPacket *pkt,\n-                      const AVFrame *frame, int *got_packet)\n+                      const AVFrame *src_frame, int *got_packet)\n {\n-    int ret = av_image_get_buffer_size(frame->format,\n-                                       frame->width, frame->height, 1);\n+    int ret;\n+    AVFrame * frame = NULL;\n \n-    if (ret < 0)\n+#if CONFIG_SAND\n+    if (av_rpi_is_sand_frame(src_frame)) {\n+        ret = av_rpi_is_sand8_frame(src_frame) ? raw_sand8_as_yuv420(avctx, pkt, src_frame) :\n+            av_rpi_is_sand16_frame(src_frame) ? raw_sand16_as_yuv420(avctx, pkt, src_frame) :\n+            av_rpi_is_sand30_frame(src_frame) ? raw_sand30_as_yuv420(avctx, pkt, src_frame) : -1;\n+        *got_packet = (ret == 0);\n         return ret;\n+    }\n+#endif\n+\n+    if ((frame = av_frame_clone(src_frame)) == NULL) {\n+        ret = AVERROR(ENOMEM);\n+        goto fail;\n+    }\n+\n+    if ((ret = av_frame_apply_cropping(frame, AV_FRAME_CROP_UNALIGNED)) < 0)\n+        goto fail;\n+\n+    ret = av_image_get_buffer_size(frame->format,\n+                                       frame->width, frame->height, 1);\n+    if (ret < 0)\n+        goto fail;\n \n     if ((ret = ff_alloc_packet2(avctx, pkt, ret, ret)) < 0)\n-        return ret;\n+        goto fail;\n     if ((ret = av_image_copy_to_buffer(pkt->data, pkt->size,\n                                        (const uint8_t **)frame->data, frame->linesize,\n                                        frame->format,\n                                        frame->width, frame->height, 1)) < 0)\n-        return ret;\n+        goto fail;\n \n     if(avctx->codec_tag == AV_RL32(\"yuv2\") && ret > 0 &&\n        frame->format   == AV_PIX_FMT_YUYV422) {\n@@ -81,8 +178,14 @@ static int raw_encode(AVCodecContext *avctx, AVPacket *pkt,\n         }\n     }\n     pkt->flags |= AV_PKT_FLAG_KEY;\n+    av_frame_free(&frame);\n     *got_packet = 1;\n     return 0;\n+\n+fail:\n+    av_frame_free(&frame);\n+    *got_packet = 0;\n+    return ret;\n }\n \n AVCodec ff_rawvideo_encoder = {\ndiff --git a/libavcodec/rpi_hevc_cabac.c b/libavcodec/rpi_hevc_cabac.c\nnew file mode 100644\nindex 0000000000..58c094c5f8\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_cabac.c\n@@ -0,0 +1,2257 @@\n+/*\n+ * HEVC CABAC decoding\n+ *\n+ * Copyright (C) 2012 - 2013 Guillaume Martres\n+ * Copyright (C) 2012 - 2013 Gildas Cocherel\n+ * Copyright (C) 2012 - 2013 Gildas Cocherel\n+ * Copyright (C) 2018 John Cox, Ben Avison, Peter de Rivaz for Raspberry Pi (Trading)\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#define UNCHECKED_BITSTREAM_READER 1\n+\n+#include \"libavutil/attributes.h\"\n+#include \"libavutil/common.h\"\n+\n+#include \"cabac_functions.h\"\n+#include \"rpi_hevc_data.h\"\n+#include \"hevc.h\"\n+#include \"rpi_hevcdec.h\"\n+#include \"rpi_hevc_cabac_fns.h\"\n+\n+#include \"libavutil/rpi_sand_fns.h\"\n+\n+// BY22 is probably faster than simple bypass if the processor has\n+// either a fast 32-bit divide or a fast 32x32->64[63:32] instruction\n+// x86 has fast int divide\n+// Arm doesn't have divide or general fast 64 bit, but does have the multiply\n+// * Beware: ARCH_xxx isn't set if configure --disable-asm is used\n+#define USE_BY22 (HAVE_FAST_64BIT || ARCH_ARM || ARCH_X86)\n+// Use native divide if we have a fast one - otherwise use mpy 1/x\n+// x86 has a fast integer divide - arm doesn't - unsure about other\n+// architectures\n+#define USE_BY22_DIV  ARCH_X86\n+\n+// Special case blocks with a single significant ceoff\n+// Decreases the complexity of the code for a common case but increases the\n+// code size.\n+#define USE_N_END_1 1\n+\n+#if !USE_BY22_DIV\n+// * 1/x @ 32 bits gets us 22 bits of accuracy\n+#define CABAC_BY22_PEEK_BITS  22\n+#else\n+// A real 32-bit divide gets us another bit\n+// If we have a 64 bit int & a unit time divider then we should get a lot\n+// of bits (55)  but that is untested and it is unclear if it would give\n+// us a large advantage\n+#define CABAC_BY22_PEEK_BITS  23\n+#endif\n+\n+#define CABAC_MAX_BIN 31\n+\n+\n+#if USE_BY22 && !USE_BY22_DIV\n+#define I(x) (uint32_t)((0x10000000000ULL / (uint64_t)(x)) + 1ULL)\n+\n+static const uint32_t cabac_by22_inv_range[256] = {\n+                                                    0,      I(257), I(258), I(259),\n+    I(260), I(261), I(262), I(263), I(264), I(265), I(266), I(267), I(268), I(269),\n+    I(270), I(271), I(272), I(273), I(274), I(275), I(276), I(277), I(278), I(279),\n+    I(280), I(281), I(282), I(283), I(284), I(285), I(286), I(287), I(288), I(289),\n+    I(290), I(291), I(292), I(293), I(294), I(295), I(296), I(297), I(298), I(299),\n+    I(300), I(301), I(302), I(303), I(304), I(305), I(306), I(307), I(308), I(309),\n+    I(310), I(311), I(312), I(313), I(314), I(315), I(316), I(317), I(318), I(319),\n+    I(320), I(321), I(322), I(323), I(324), I(325), I(326), I(327), I(328), I(329),\n+    I(330), I(331), I(332), I(333), I(334), I(335), I(336), I(337), I(338), I(339),\n+    I(340), I(341), I(342), I(343), I(344), I(345), I(346), I(347), I(348), I(349),\n+    I(350), I(351), I(352), I(353), I(354), I(355), I(356), I(357), I(358), I(359),\n+    I(360), I(361), I(362), I(363), I(364), I(365), I(366), I(367), I(368), I(369),\n+    I(370), I(371), I(372), I(373), I(374), I(375), I(376), I(377), I(378), I(379),\n+    I(380), I(381), I(382), I(383), I(384), I(385), I(386), I(387), I(388), I(389),\n+    I(390), I(391), I(392), I(393), I(394), I(395), I(396), I(397), I(398), I(399),\n+    I(400), I(401), I(402), I(403), I(404), I(405), I(406), I(407), I(408), I(409),\n+    I(410), I(411), I(412), I(413), I(414), I(415), I(416), I(417), I(418), I(419),\n+    I(420), I(421), I(422), I(423), I(424), I(425), I(426), I(427), I(428), I(429),\n+    I(430), I(431), I(432), I(433), I(434), I(435), I(436), I(437), I(438), I(439),\n+    I(440), I(441), I(442), I(443), I(444), I(445), I(446), I(447), I(448), I(449),\n+    I(450), I(451), I(452), I(453), I(454), I(455), I(456), I(457), I(458), I(459),\n+    I(460), I(461), I(462), I(463), I(464), I(465), I(466), I(467), I(468), I(469),\n+    I(470), I(471), I(472), I(473), I(474), I(475), I(476), I(477), I(478), I(479),\n+    I(480), I(481), I(482), I(483), I(484), I(485), I(486), I(487), I(488), I(489),\n+    I(490), I(491), I(492), I(493), I(494), I(495), I(496), I(497), I(498), I(499),\n+    I(500), I(501), I(502), I(503), I(504), I(505), I(506), I(507), I(508), I(509),\n+    I(510), I(511)\n+};\n+#undef I\n+#endif  // USE_BY22\n+\n+#if ARCH_ARM\n+#include \"arm/rpi_hevc_cabac.h\"\n+#endif\n+\n+/**\n+ * number of bin by SyntaxElement.\n+ */\n+static const int8_t num_bins_in_se[] = {\n+     1, // sao_merge_flag\n+     1, // sao_type_idx\n+     0, // sao_eo_class\n+     0, // sao_band_position\n+     0, // sao_offset_abs\n+     0, // sao_offset_sign\n+     0, // end_of_slice_flag\n+     3, // split_coding_unit_flag\n+     1, // cu_transquant_bypass_flag\n+     3, // skip_flag\n+     3, // cu_qp_delta\n+     1, // pred_mode\n+     4, // part_mode\n+     0, // pcm_flag\n+     1, // prev_intra_luma_pred_mode\n+     0, // mpm_idx\n+     0, // rem_intra_luma_pred_mode\n+     2, // intra_chroma_pred_mode\n+     1, // merge_flag\n+     1, // merge_idx\n+     5, // inter_pred_idc\n+     2, // ref_idx_l0\n+     2, // ref_idx_l1\n+     2, // abs_mvd_greater0_flag\n+     2, // abs_mvd_greater1_flag\n+     0, // abs_mvd_minus2\n+     0, // mvd_sign_flag\n+     1, // mvp_lx_flag\n+     1, // no_residual_data_flag\n+     3, // split_transform_flag\n+     2, // cbf_luma\n+     4, // cbf_cb, cbf_cr\n+     2, // transform_skip_flag[][]\n+     2, // explicit_rdpcm_flag[][]\n+     2, // explicit_rdpcm_dir_flag[][]\n+    18, // last_significant_coeff_x_prefix\n+    18, // last_significant_coeff_y_prefix\n+     0, // last_significant_coeff_x_suffix\n+     0, // last_significant_coeff_y_suffix\n+     4, // significant_coeff_group_flag\n+    44, // significant_coeff_flag\n+    24, // coeff_abs_level_greater1_flag\n+     6, // coeff_abs_level_greater2_flag\n+     0, // coeff_abs_level_remaining\n+     0, // coeff_sign_flag\n+     8, // log2_res_scale_abs\n+     2, // res_scale_sign_flag\n+     1, // cu_chroma_qp_offset_flag\n+     1, // cu_chroma_qp_offset_idx\n+};\n+\n+/**\n+ * Offset to ctxIdx 0 in init_values and states, indexed by SyntaxElement.\n+ */\n+static const int elem_offset[sizeof(num_bins_in_se)] = {\n+    0, // sao_merge_flag\n+    1, // sao_type_idx\n+    2, // sao_eo_class\n+    2, // sao_band_position\n+    2, // sao_offset_abs\n+    2, // sao_offset_sign\n+    2, // end_of_slice_flag\n+    2, // split_coding_unit_flag\n+    5, // cu_transquant_bypass_flag\n+    6, // skip_flag\n+    9, // cu_qp_delta\n+    12, // pred_mode\n+    13, // part_mode\n+    17, // pcm_flag\n+    17, // prev_intra_luma_pred_mode\n+    18, // mpm_idx\n+    18, // rem_intra_luma_pred_mode\n+    18, // intra_chroma_pred_mode\n+    20, // merge_flag\n+    21, // merge_idx\n+    22, // inter_pred_idc\n+    27, // ref_idx_l0\n+    29, // ref_idx_l1\n+    31, // abs_mvd_greater0_flag\n+    33, // abs_mvd_greater1_flag\n+    35, // abs_mvd_minus2\n+    35, // mvd_sign_flag\n+    35, // mvp_lx_flag\n+    36, // no_residual_data_flag\n+    37, // split_transform_flag\n+    40, // cbf_luma\n+    42, // cbf_cb, cbf_cr\n+    46, // transform_skip_flag[][]\n+    48, // explicit_rdpcm_flag[][]\n+    50, // explicit_rdpcm_dir_flag[][]\n+    52, // last_significant_coeff_x_prefix\n+    70, // last_significant_coeff_y_prefix\n+    88, // last_significant_coeff_x_suffix\n+    88, // last_significant_coeff_y_suffix\n+    88, // significant_coeff_group_flag\n+    92, // significant_coeff_flag\n+    136, // coeff_abs_level_greater1_flag\n+    160, // coeff_abs_level_greater2_flag\n+    166, // coeff_abs_level_remaining\n+    166, // coeff_sign_flag\n+    166, // log2_res_scale_abs\n+    174, // res_scale_sign_flag\n+    176, // cu_chroma_qp_offset_flag\n+    177, // cu_chroma_qp_offset_idx\n+};\n+\n+#define CNU 154\n+/**\n+ * Indexed by init_type\n+ */\n+static const uint8_t init_values[3][HEVC_CONTEXTS] = {\n+    { // sao_merge_flag\n+      153,\n+      // sao_type_idx\n+      200,\n+      // split_coding_unit_flag\n+      139, 141, 157,\n+      // cu_transquant_bypass_flag\n+      154,\n+      // skip_flag\n+      CNU, CNU, CNU,\n+      // cu_qp_delta\n+      154, 154, 154,\n+      // pred_mode\n+      CNU,\n+      // part_mode\n+      184, CNU, CNU, CNU,\n+      // prev_intra_luma_pred_mode\n+      184,\n+      // intra_chroma_pred_mode\n+      63, 139,\n+      // merge_flag\n+      CNU,\n+      // merge_idx\n+      CNU,\n+      // inter_pred_idc\n+      CNU, CNU, CNU, CNU, CNU,\n+      // ref_idx_l0\n+      CNU, CNU,\n+      // ref_idx_l1\n+      CNU, CNU,\n+      // abs_mvd_greater1_flag\n+      CNU, CNU,\n+      // abs_mvd_greater1_flag\n+      CNU, CNU,\n+      // mvp_lx_flag\n+      CNU,\n+      // no_residual_data_flag\n+      CNU,\n+      // split_transform_flag\n+      153, 138, 138,\n+      // cbf_luma\n+      111, 141,\n+      // cbf_cb, cbf_cr\n+      94, 138, 182, 154,\n+      // transform_skip_flag\n+      139, 139,\n+      // explicit_rdpcm_flag\n+      139, 139,\n+      // explicit_rdpcm_dir_flag\n+      139, 139,\n+      // last_significant_coeff_x_prefix\n+      110, 110, 124, 125, 140, 153, 125, 127, 140, 109, 111, 143, 127, 111,\n+       79, 108, 123,  63,\n+      // last_significant_coeff_y_prefix\n+      110, 110, 124, 125, 140, 153, 125, 127, 140, 109, 111, 143, 127, 111,\n+       79, 108, 123,  63,\n+      // significant_coeff_group_flag\n+      91, 171, 134, 141,\n+      // significant_coeff_flag\n+      111, 111, 125, 110, 110,  94, 124, 108, 124, 107, 125, 141, 179, 153,\n+      125, 107, 125, 141, 179, 153, 125, 107, 125, 141, 179, 153, 125, 140,\n+      139, 182, 182, 152, 136, 152, 136, 153, 136, 139, 111, 136, 139, 111,\n+      141, 111,\n+      // coeff_abs_level_greater1_flag\n+      140,  92, 137, 138, 140, 152, 138, 139, 153,  74, 149,  92, 139, 107,\n+      122, 152, 140, 179, 166, 182, 140, 227, 122, 197,\n+      // coeff_abs_level_greater2_flag\n+      138, 153, 136, 167, 152, 152,\n+      // log2_res_scale_abs\n+      154, 154, 154, 154, 154, 154, 154, 154,\n+      // res_scale_sign_flag\n+      154, 154,\n+      // cu_chroma_qp_offset_flag\n+      154,\n+      // cu_chroma_qp_offset_idx\n+      154,\n+    },\n+    { // sao_merge_flag\n+      153,\n+      // sao_type_idx\n+      185,\n+      // split_coding_unit_flag\n+      107, 139, 126,\n+      // cu_transquant_bypass_flag\n+      154,\n+      // skip_flag\n+      197, 185, 201,\n+      // cu_qp_delta\n+      154, 154, 154,\n+      // pred_mode\n+      149,\n+      // part_mode\n+      154, 139, 154, 154,\n+      // prev_intra_luma_pred_mode\n+      154,\n+      // intra_chroma_pred_mode\n+      152, 139,\n+      // merge_flag\n+      110,\n+      // merge_idx\n+      122,\n+      // inter_pred_idc\n+      95, 79, 63, 31, 31,\n+      // ref_idx_l0\n+      153, 153,\n+      // ref_idx_l1\n+      153, 153,\n+      // abs_mvd_greater1_flag\n+      140, 198,\n+      // abs_mvd_greater1_flag\n+      140, 198,\n+      // mvp_lx_flag\n+      168,\n+      // no_residual_data_flag\n+      79,\n+      // split_transform_flag\n+      124, 138, 94,\n+      // cbf_luma\n+      153, 111,\n+      // cbf_cb, cbf_cr\n+      149, 107, 167, 154,\n+      // transform_skip_flag\n+      139, 139,\n+      // explicit_rdpcm_flag\n+      139, 139,\n+      // explicit_rdpcm_dir_flag\n+      139, 139,\n+      // last_significant_coeff_x_prefix\n+      125, 110,  94, 110,  95,  79, 125, 111, 110,  78, 110, 111, 111,  95,\n+       94, 108, 123, 108,\n+      // last_significant_coeff_y_prefix\n+      125, 110,  94, 110,  95,  79, 125, 111, 110,  78, 110, 111, 111,  95,\n+       94, 108, 123, 108,\n+      // significant_coeff_group_flag\n+      121, 140, 61, 154,\n+      // significant_coeff_flag\n+      155, 154, 139, 153, 139, 123, 123,  63, 153, 166, 183, 140, 136, 153,\n+      154, 166, 183, 140, 136, 153, 154, 166, 183, 140, 136, 153, 154, 170,\n+      153, 123, 123, 107, 121, 107, 121, 167, 151, 183, 140, 151, 183, 140,\n+      140, 140,\n+      // coeff_abs_level_greater1_flag\n+      154, 196, 196, 167, 154, 152, 167, 182, 182, 134, 149, 136, 153, 121,\n+      136, 137, 169, 194, 166, 167, 154, 167, 137, 182,\n+      // coeff_abs_level_greater2_flag\n+      107, 167, 91, 122, 107, 167,\n+      // log2_res_scale_abs\n+      154, 154, 154, 154, 154, 154, 154, 154,\n+      // res_scale_sign_flag\n+      154, 154,\n+      // cu_chroma_qp_offset_flag\n+      154,\n+      // cu_chroma_qp_offset_idx\n+      154,\n+    },\n+    { // sao_merge_flag\n+      153,\n+      // sao_type_idx\n+      160,\n+      // split_coding_unit_flag\n+      107, 139, 126,\n+      // cu_transquant_bypass_flag\n+      154,\n+      // skip_flag\n+      197, 185, 201,\n+      // cu_qp_delta\n+      154, 154, 154,\n+      // pred_mode\n+      134,\n+      // part_mode\n+      154, 139, 154, 154,\n+      // prev_intra_luma_pred_mode\n+      183,\n+      // intra_chroma_pred_mode\n+      152, 139,\n+      // merge_flag\n+      154,\n+      // merge_idx\n+      137,\n+      // inter_pred_idc\n+      95, 79, 63, 31, 31,\n+      // ref_idx_l0\n+      153, 153,\n+      // ref_idx_l1\n+      153, 153,\n+      // abs_mvd_greater1_flag\n+      169, 198,\n+      // abs_mvd_greater1_flag\n+      169, 198,\n+      // mvp_lx_flag\n+      168,\n+      // no_residual_data_flag\n+      79,\n+      // split_transform_flag\n+      224, 167, 122,\n+      // cbf_luma\n+      153, 111,\n+      // cbf_cb, cbf_cr\n+      149, 92, 167, 154,\n+      // transform_skip_flag\n+      139, 139,\n+      // explicit_rdpcm_flag\n+      139, 139,\n+      // explicit_rdpcm_dir_flag\n+      139, 139,\n+      // last_significant_coeff_x_prefix\n+      125, 110, 124, 110,  95,  94, 125, 111, 111,  79, 125, 126, 111, 111,\n+       79, 108, 123,  93,\n+      // last_significant_coeff_y_prefix\n+      125, 110, 124, 110,  95,  94, 125, 111, 111,  79, 125, 126, 111, 111,\n+       79, 108, 123,  93,\n+      // significant_coeff_group_flag\n+      121, 140, 61, 154,\n+      // significant_coeff_flag\n+      170, 154, 139, 153, 139, 123, 123,  63, 124, 166, 183, 140, 136, 153,\n+      154, 166, 183, 140, 136, 153, 154, 166, 183, 140, 136, 153, 154, 170,\n+      153, 138, 138, 122, 121, 122, 121, 167, 151, 183, 140, 151, 183, 140,\n+      140, 140,\n+      // coeff_abs_level_greater1_flag\n+      154, 196, 167, 167, 154, 152, 167, 182, 182, 134, 149, 136, 153, 121,\n+      136, 122, 169, 208, 166, 167, 154, 152, 167, 182,\n+      // coeff_abs_level_greater2_flag\n+      107, 167, 91, 107, 107, 167,\n+      // log2_res_scale_abs\n+      154, 154, 154, 154, 154, 154, 154, 154,\n+      // res_scale_sign_flag\n+      154, 154,\n+      // cu_chroma_qp_offset_flag\n+      154,\n+      // cu_chroma_qp_offset_idx\n+      154,\n+    },\n+};\n+\n+static const uint8_t scan_1x1[1] = {\n+    0,\n+};\n+\n+static const uint8_t horiz_scan2x2_x[4] = {\n+    0, 1, 0, 1,\n+};\n+\n+static const uint8_t horiz_scan2x2_y[4] = {\n+    0, 0, 1, 1\n+};\n+\n+static const uint8_t horiz_scan4x4_x[16] = {\n+    0, 1, 2, 3,\n+    0, 1, 2, 3,\n+    0, 1, 2, 3,\n+    0, 1, 2, 3,\n+};\n+\n+static const uint8_t horiz_scan4x4_y[16] = {\n+    0, 0, 0, 0,\n+    1, 1, 1, 1,\n+    2, 2, 2, 2,\n+    3, 3, 3, 3,\n+};\n+\n+static const uint8_t horiz_scan8x8_inv[8][8] = {\n+    {  0,  1,  2,  3, 16, 17, 18, 19, },\n+    {  4,  5,  6,  7, 20, 21, 22, 23, },\n+    {  8,  9, 10, 11, 24, 25, 26, 27, },\n+    { 12, 13, 14, 15, 28, 29, 30, 31, },\n+    { 32, 33, 34, 35, 48, 49, 50, 51, },\n+    { 36, 37, 38, 39, 52, 53, 54, 55, },\n+    { 40, 41, 42, 43, 56, 57, 58, 59, },\n+    { 44, 45, 46, 47, 60, 61, 62, 63, },\n+};\n+\n+static const uint8_t diag_scan2x2_x[4] = {\n+    0, 0, 1, 1,\n+};\n+\n+static const uint8_t diag_scan2x2_y[4] = {\n+    0, 1, 0, 1,\n+};\n+\n+static const uint8_t diag_scan2x2_inv[2][2] = {\n+    { 0, 2, },\n+    { 1, 3, },\n+};\n+\n+static const uint8_t diag_scan4x4_inv[4][4] = {\n+    { 0,  2,  5,  9, },\n+    { 1,  4,  8, 12, },\n+    { 3,  7, 11, 14, },\n+    { 6, 10, 13, 15, },\n+};\n+\n+static const uint8_t diag_scan8x8_inv[8][8] = {\n+    {  0,  2,  5,  9, 14, 20, 27, 35, },\n+    {  1,  4,  8, 13, 19, 26, 34, 42, },\n+    {  3,  7, 12, 18, 25, 33, 41, 48, },\n+    {  6, 11, 17, 24, 32, 40, 47, 53, },\n+    { 10, 16, 23, 31, 39, 46, 52, 57, },\n+    { 15, 22, 30, 38, 45, 51, 56, 60, },\n+    { 21, 29, 37, 44, 50, 55, 59, 62, },\n+    { 28, 36, 43, 49, 54, 58, 61, 63, },\n+};\n+\n+\n+typedef struct\n+{\n+    uint16_t coeff;\n+    uint16_t scale;\n+} xy_off_t;\n+\n+#define XYT_C(x,y,t) ((x) + ((y) << (t)))\n+#define SCALE_TRAFO(t) ((t) > 3 ? 3 : (t))\n+#define SCALE_SHR(t) ((t) - SCALE_TRAFO(t))\n+#define XYT_S(x,y,t) (((x) >> SCALE_SHR(t)) + (((y) >> SCALE_SHR(t)) << SCALE_TRAFO(t)))\n+\n+#define XYT(x,y,t) {XYT_C(x,y,t), XYT_S(x,y,t)}\n+\n+#define OFF_DIAG(t) {\\\n+    XYT(0,0,t), XYT(0,1,t), XYT(1,0,t), XYT(0,2,t),\\\n+    XYT(1,1,t), XYT(2,0,t), XYT(0,3,t), XYT(1,2,t),\\\n+    XYT(2,1,t), XYT(3,0,t), XYT(1,3,t), XYT(2,2,t),\\\n+    XYT(3,1,t), XYT(2,3,t), XYT(3,2,t), XYT(3,3,t)\\\n+}\n+\n+#define OFF_HORIZ(t) {\\\n+    XYT(0,0,t), XYT(1,0,t), XYT(2,0,t), XYT(3,0,t),\\\n+    XYT(0,1,t), XYT(1,1,t), XYT(2,1,t), XYT(3,1,t),\\\n+    XYT(0,2,t), XYT(1,2,t), XYT(2,2,t), XYT(3,2,t),\\\n+    XYT(0,3,t), XYT(1,3,t), XYT(2,3,t), XYT(3,3,t)\\\n+}\n+\n+#define OFF_VERT(t) {\\\n+    XYT(0,0,t), XYT(0,1,t), XYT(0,2,t), XYT(0,3,t),\\\n+    XYT(1,0,t), XYT(1,1,t), XYT(1,2,t), XYT(1,3,t),\\\n+    XYT(2,0,t), XYT(2,1,t), XYT(2,2,t), XYT(2,3,t),\\\n+    XYT(3,0,t), XYT(3,1,t), XYT(3,2,t), XYT(3,3,t)\\\n+}\n+\n+static const xy_off_t off_xys[3][4][16] =\n+{\n+    {OFF_DIAG(2), OFF_DIAG(3), OFF_DIAG(4), OFF_DIAG(5)},\n+    {OFF_HORIZ(2), OFF_HORIZ(3), OFF_HORIZ(4), OFF_HORIZ(5)},\n+    {OFF_VERT(2), OFF_VERT(3), OFF_VERT(4), OFF_VERT(5)}\n+};\n+\n+\n+// Helper fns\n+#ifndef hevc_mem_bits32\n+static av_always_inline uint32_t hevc_mem_bits32(const void * buf, const unsigned int offset)\n+{\n+    return AV_RB32((const uint8_t *)buf + (offset >> 3)) << (offset & 7);\n+}\n+#endif\n+\n+#if AV_GCC_VERSION_AT_LEAST(3,4) && !defined(hevc_clz32)\n+#define hevc_clz32 hevc_clz32_builtin\n+static av_always_inline unsigned int hevc_clz32_builtin(const uint32_t x)\n+{\n+    // __builtin_clz says it works on ints - so adjust if int is >32 bits long\n+    return __builtin_clz(x) - (sizeof(int) * 8 - 32);\n+}\n+#endif\n+\n+// It is unlikely that we will ever need this but include for completeness\n+#ifndef hevc_clz32\n+static inline unsigned int hevc_clz32(unsigned int x)\n+{\n+    unsigned int n = 1;\n+    if ((x & 0xffff0000) == 0) {\n+        n += 16;\n+        x <<= 16;\n+    }\n+    if ((x & 0xff000000) == 0) {\n+        n += 8;\n+        x <<= 8;\n+    }\n+    if ((x & 0xf0000000) == 0) {\n+        n += 4;\n+        x <<= 4;\n+    }\n+    if ((x & 0xc0000000) == 0) {\n+        n += 2;\n+        x <<= 2;\n+    }\n+    return n - ((x >> 31) & 1);\n+}\n+#endif\n+\n+static inline int cabac_overflow(const CABACContext * const cc)\n+{\n+    av_assert0(cc->bytestream >= cc->bytestream_start);\n+    return cc->bytestream >= cc->bytestream_end + 4;\n+}\n+\n+int ff_hevc_rpi_cabac_overflow(const HEVCRpiLocalContext * const lc)\n+{\n+    return cabac_overflow(&lc->cc);\n+}\n+\n+#if !USE_BY22\n+// If no by22 then _by22 functions will revert to normal and so _peek/_flush\n+// will no longer be called but the setup calls will still exist and we want\n+// to null them out\n+#define bypass_start(s)\n+#define bypass_finish(s)\n+#else\n+// Use BY22 for residual bypass block\n+\n+#define bypass_start(cc) get_cabac_by22_start(cc)\n+#define bypass_finish(cc) get_cabac_by22_finish(cc)\n+\n+// BY22 notes that bypass is simply a divide into the bitstream and so we\n+// can peek out large quantities of bits at once and treat the result as if\n+// it was VLC.  In many cases this will lead to O(1) processing rather than\n+// O(n) though the setup and teardown is sufficiently expensive that it is\n+// only worth using if we expect to be dealing with more than a few bits\n+// The definition of \"a few bits\" will vary from platform to platform but\n+// tests on ARM show that it probably isn't worth it for a single coded\n+// residual, but is for >1 - it also seems likely that if there are\n+// more residuals then they are likely to be bigger and this will make the\n+// O(1) nature of the code more worthwhile.\n+\n+\n+// Bypass block start\n+// Must be called before _by22_peek is used as it sets the CABAC environment\n+// into the correct state.  _by22_finish must be called to return to 'normal'\n+// (i.e. non-bypass) cabac decoding\n+#ifndef get_cabac_by22_start\n+static inline void get_cabac_by22_start(CABACContext * const c)\n+{\n+    const unsigned int bits = __builtin_ctz(c->low);\n+    const uint32_t m = hevc_mem_bits32(c->bytestream, 0);\n+    uint32_t x = (c->low << (22 - CABAC_BITS)) ^ ((m ^ 0x80000000U) >> (9 + CABAC_BITS - bits));\n+#if !USE_BY22_DIV\n+    const uint32_t inv = cabac_by22_inv_range[c->range & 0xff];\n+#endif\n+\n+    c->bytestream -= (CABAC_BITS / 8);\n+    c->by22.bits = bits;\n+#if !USE_BY22_DIV\n+    c->by22.range = c->range;\n+    c->range = inv;\n+#endif\n+    c->low = x;\n+}\n+#endif\n+\n+// Bypass block finish\n+// Must be called at the end of the bypass block to return to normal operation\n+static inline void get_cabac_by22_finish(CABACContext * const c)\n+{\n+    unsigned int used = c->by22.bits;\n+    unsigned int bytes_used = (used / CABAC_BITS) * (CABAC_BITS / 8);\n+    unsigned int bits_used = used & (CABAC_BITS == 16 ? 15 : 7);\n+\n+    c->bytestream += bytes_used + (CABAC_BITS / 8);\n+    c->low = (((uint32_t)c->low >> (22 - CABAC_BITS + bits_used)) | 1) << bits_used;\n+#if !USE_BY22_DIV\n+    c->range = c->by22.range;\n+#endif\n+}\n+\n+// Peek bypass bits\n+// _by22_start must be called before _by22_peek is called and _by22_flush\n+// must be called afterwards to flush any used bits\n+// The actual number of valid bits returned is\n+// min(<coded bypass block length>, CABAC_BY22_PEEK_BITS). CABAC_BY22_PEEK_BITS\n+// will be at least 22 which should be long enough for any prefix or suffix\n+// though probably not long enough for the worst case combination\n+#ifndef get_cabac_by22_peek\n+static inline uint32_t get_cabac_by22_peek(const CABACContext * const c)\n+{\n+#if USE_BY22_DIV\n+    return ((unsigned int)c->low / (unsigned int)c->range) << 9;\n+#else\n+    uint32_t x = c->low & ~1U;\n+    const uint32_t inv = c->range;\n+\n+    if (inv != 0)\n+        x = (uint32_t)(((uint64_t)x * (uint64_t)inv) >> 32);\n+\n+    return x << 1;\n+#endif\n+}\n+#endif\n+\n+// Flush bypass bits peeked by _by22_peek\n+// Flush n bypass bits. n must be >= 1 to guarantee correct operation\n+// val is an unmodified copy of whatever _by22_peek returned\n+#ifndef get_cabac_by22_flush\n+static inline void get_cabac_by22_flush(CABACContext * c, const unsigned int n, const uint32_t val)\n+{\n+    // Subtract the bits used & reshift up to the top of the word\n+#if USE_BY22_DIV\n+    const uint32_t low = (((unsigned int)c->low << n) - (((val >> (32 - n)) * (unsigned int)c->range) << 23));\n+#else\n+    const uint32_t low = (((uint32_t)c->low << n) - (((val >> (32 - n)) * c->by22.range) << 23));\n+#endif\n+\n+    // and refill lower bits\n+    // We will probably OR over some existing bits but that doesn't matter\n+    c->by22.bits += n;\n+    c->low = low | (hevc_mem_bits32(c->bytestream, c->by22.bits) >> 9);\n+}\n+#endif\n+\n+#endif  // USE_BY22\n+\n+\n+void ff_hevc_rpi_save_states(HEVCRpiContext *s, const HEVCRpiLocalContext * const lc)\n+{\n+    memcpy(s->cabac_save->rice, lc->stat_coeff, 4);\n+    memcpy(s->cabac_save->state, lc->cabac_state, HEVC_CONTEXTS);\n+}\n+\n+static void load_states(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc)\n+{\n+    memcpy(lc->stat_coeff, s->cabac_save->rice, 4);\n+    memcpy(lc->cabac_state, s->cabac_save->state, HEVC_CONTEXTS);\n+}\n+\n+int ff_hevc_rpi_cabac_init_decoder(HEVCRpiLocalContext * const lc)\n+{\n+    GetBitContext * const gb = &lc->gb;\n+    skip_bits(gb, 1);\n+    align_get_bits(gb);\n+    return ff_init_cabac_decoder(&lc->cc,\n+                          gb->buffer + get_bits_count(gb) / 8,\n+                          (get_bits_left(gb) + 7) / 8);\n+}\n+\n+static void cabac_init_state(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc)\n+{\n+    int init_type = 2 - s->sh.slice_type;\n+    int i;\n+\n+    if (s->sh.cabac_init_flag && s->sh.slice_type != HEVC_SLICE_I)\n+        init_type ^= 3;\n+\n+    for (i = 0; i < HEVC_CONTEXTS; i++) {\n+        int init_value = init_values[init_type][i];\n+        int m = (init_value >> 4) * 5 - 45;\n+        int n = ((init_value & 15) << 3) - 16;\n+        int pre = 2 * (((m * av_clip(s->sh.slice_qp, 0, 51)) >> 4) + n) - 127;\n+\n+        pre ^= pre >> 31;\n+        if (pre > 124)\n+            pre = 124 + (pre & 1);\n+        lc->cabac_state[i] = pre;\n+    }\n+\n+    for (i = 0; i < 4; i++)\n+        lc->stat_coeff[i] = 0;\n+}\n+\n+void ff_hevc_rpi_cabac_init(const HEVCRpiContext * const s, HEVCRpiLocalContext *const lc, const unsigned int ctb_flags)\n+{\n+    if (lc->cabac_init_req == 1 || (ctb_flags & CTB_TS_FLAGS_CIREQ) != 0)\n+    {\n+        lc->qPy_pred = s->sh.slice_qp;\n+        cabac_init_state(s, lc);\n+    }\n+    else if ((ctb_flags & CTB_TS_FLAGS_CLOAD) != 0)\n+    {\n+        lc->qPy_pred = s->sh.slice_qp;\n+        load_states(s, lc);\n+    }\n+    lc->cabac_init_req = 0;\n+}\n+\n+#define GET_CABAC_LC(ctx) get_cabac(&lc->cc, lc->cabac_state + (ctx))\n+\n+int ff_hevc_rpi_get_cabac(CABACContext * const c, uint8_t * const state)\n+{\n+    return get_cabac_inline(c, state);\n+}\n+\n+int ff_hevc_rpi_get_cabac_terminate(CABACContext * const c)\n+{\n+    return get_cabac_terminate(c);\n+}\n+\n+int ff_hevc_rpi_sao_type_idx_decode(HEVCRpiLocalContext * const lc)\n+{\n+    if (!GET_CABAC_LC(elem_offset[SAO_TYPE_IDX]))\n+        return 0;\n+\n+    if (!get_cabac_bypass(&lc->cc))\n+        return SAO_BAND;\n+    return SAO_EDGE;\n+}\n+\n+int ff_hevc_rpi_sao_band_position_decode(HEVCRpiLocalContext * const lc)\n+{\n+    int i;\n+    int value = get_cabac_bypass(&lc->cc);\n+\n+    for (i = 0; i < 4; i++)\n+        value = (value << 1) | get_cabac_bypass(&lc->cc);\n+    return value;\n+}\n+\n+int ff_hevc_rpi_sao_offset_abs_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc)\n+{\n+    int i = 0;\n+    int length = (1 << (FFMIN(s->ps.sps->bit_depth, 10) - 5)) - 1;\n+\n+    while (i < length && get_cabac_bypass(&lc->cc))\n+        i++;\n+    return i;\n+}\n+\n+int ff_hevc_rpi_sao_offset_sign_decode(HEVCRpiLocalContext * const lc)\n+{\n+    return get_cabac_bypass(&lc->cc);\n+}\n+\n+int ff_hevc_rpi_sao_eo_class_decode(HEVCRpiLocalContext * const lc)\n+{\n+    int ret = get_cabac_bypass(&lc->cc) << 1;\n+    ret    |= get_cabac_bypass(&lc->cc);\n+    return ret;\n+}\n+\n+int ff_hevc_rpi_cu_qp_delta(HEVCRpiLocalContext * const lc)\n+{\n+    int val = 1;\n+\n+    if (get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_CU_QP_DELTA) == 0)\n+        return 0;\n+\n+    while (val < 5 &&\n+           get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_CU_QP_DELTA + 1) != 0)\n+        val++;\n+\n+    if (val >= 5) {\n+        unsigned int k = 0;\n+        while (k < CABAC_MAX_BIN && get_cabac_bypass(&lc->cc)) {\n+            val += 1 << k;\n+            k++;\n+        }\n+//        if (k == CABAC_MAX_BIN)\n+//            av_log(s->avctx, AV_LOG_ERROR, \"CABAC_MAX_BIN : %d\\n\", k);\n+\n+        while (k--)\n+            val += get_cabac_bypass(&lc->cc) << k;\n+    }\n+    return get_cabac_bypass(&lc->cc) ? -val : val;\n+}\n+\n+int ff_hevc_rpi_cu_chroma_qp_offset_idx(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc)\n+{\n+    int c_max= FFMAX(5, s->ps.pps->chroma_qp_offset_list_len_minus1);\n+    int i = 0;\n+\n+    while (i < c_max && GET_CABAC_LC(elem_offset[CU_CHROMA_QP_OFFSET_IDX]))\n+        i++;\n+\n+    return i;\n+}\n+\n+int ff_hevc_rpi_part_mode_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, const int log2_cb_size)\n+{\n+    if (GET_CABAC_LC(elem_offset[PART_MODE])) // 1\n+        return PART_2Nx2N;\n+    if (log2_cb_size == s->ps.sps->log2_min_cb_size) {\n+        if (lc->cu.pred_mode == MODE_INTRA) // 0\n+            return PART_NxN;\n+        if (GET_CABAC_LC(elem_offset[PART_MODE] + 1)) // 01\n+            return PART_2NxN;\n+        if (log2_cb_size == 3) // 00\n+            return PART_Nx2N;\n+        if (GET_CABAC_LC(elem_offset[PART_MODE] + 2)) // 001\n+            return PART_Nx2N;\n+        return PART_NxN; // 000\n+    }\n+\n+    if (!s->ps.sps->amp_enabled_flag) {\n+        if (GET_CABAC_LC(elem_offset[PART_MODE] + 1)) // 01\n+            return PART_2NxN;\n+        return PART_Nx2N;\n+    }\n+\n+    if (GET_CABAC_LC(elem_offset[PART_MODE] + 1)) { // 01X, 01XX\n+        if (GET_CABAC_LC(elem_offset[PART_MODE] + 3)) // 011\n+            return PART_2NxN;\n+        if (get_cabac_bypass(&lc->cc)) // 0101\n+            return PART_2NxnD;\n+        return PART_2NxnU; // 0100\n+    }\n+\n+    if (GET_CABAC_LC(elem_offset[PART_MODE] + 3)) // 001\n+        return PART_Nx2N;\n+    if (get_cabac_bypass(&lc->cc)) // 0001\n+        return PART_nRx2N;\n+    return PART_nLx2N;  // 0000\n+}\n+\n+int ff_hevc_rpi_mpm_idx_decode(HEVCRpiLocalContext * const lc)\n+{\n+    int i = 0;\n+    while (i < 2 && get_cabac_bypass(&lc->cc))\n+        i++;\n+    return i;\n+}\n+\n+int ff_hevc_rpi_rem_intra_luma_pred_mode_decode(HEVCRpiLocalContext * const lc)\n+{\n+    int i;\n+    int value = get_cabac_bypass(&lc->cc);\n+\n+    for (i = 0; i < 4; i++)\n+        value = (value << 1) | get_cabac_bypass(&lc->cc);\n+    return value;\n+}\n+\n+int ff_hevc_rpi_intra_chroma_pred_mode_decode(HEVCRpiLocalContext * const lc)\n+{\n+    int ret;\n+    if (!GET_CABAC_LC(elem_offset[INTRA_CHROMA_PRED_MODE]))\n+        return 4;\n+\n+    ret  = get_cabac_bypass(&lc->cc) << 1;\n+    ret |= get_cabac_bypass(&lc->cc);\n+    return ret;\n+}\n+\n+int ff_hevc_rpi_merge_idx_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc)\n+{\n+    int i = GET_CABAC_LC(elem_offset[MERGE_IDX]);\n+\n+    if (i != 0) {\n+        while (i < s->sh.max_num_merge_cand-1 && get_cabac_bypass(&lc->cc))\n+            i++;\n+    }\n+    return i;\n+}\n+\n+int ff_hevc_rpi_inter_pred_idc_decode(HEVCRpiLocalContext * const lc, int nPbW, int nPbH)\n+{\n+    if (nPbW + nPbH == 12)\n+        return GET_CABAC_LC(elem_offset[INTER_PRED_IDC] + 4);\n+    if (GET_CABAC_LC(elem_offset[INTER_PRED_IDC] + lc->ct_depth))\n+        return PRED_BI;\n+\n+    return GET_CABAC_LC(elem_offset[INTER_PRED_IDC] + 4);\n+}\n+\n+int ff_hevc_rpi_ref_idx_lx_decode(HEVCRpiLocalContext * const lc, const int num_ref_idx_lx)\n+{\n+    int i = 0;\n+    int max = num_ref_idx_lx - 1;\n+    int max_ctx = FFMIN(max, 2);\n+\n+    while (i < max_ctx && GET_CABAC_LC(elem_offset[REF_IDX_L0] + i))\n+        i++;\n+    if (i == 2) {\n+        while (i < max && get_cabac_bypass(&lc->cc))\n+            i++;\n+    }\n+\n+    return i;\n+}\n+\n+static av_always_inline int abs_mvd_greater0_flag_decode(HEVCRpiLocalContext * const lc)\n+{\n+    return GET_CABAC_LC(elem_offset[ABS_MVD_GREATER0_FLAG]);\n+}\n+\n+static av_always_inline int abs_mvd_greater1_flag_decode(HEVCRpiLocalContext * const lc)\n+{\n+    return GET_CABAC_LC(elem_offset[ABS_MVD_GREATER1_FLAG] + 1);\n+}\n+\n+#if !USE_BY22\n+static av_always_inline int mvd_decode(HEVCRpiLocalContext * const lc)\n+{\n+    int ret = 2;\n+    int k = 1;\n+\n+    while (k < CABAC_MAX_BIN && get_cabac_bypass(&lc->cc)) {\n+        ret += 1U << k;\n+        k++;\n+    }\n+    if (k == CABAC_MAX_BIN) {\n+        av_log(NULL, AV_LOG_ERROR, \"CABAC_MAX_BIN : %d\\n\", k);\n+        return 0;\n+    }\n+\n+    while (k--)\n+        ret += get_cabac_bypass(&lc->cc) << k;\n+    return get_cabac_bypass_sign(&lc->cc, -ret);\n+}\n+#endif\n+\n+static av_always_inline int mvd_sign_flag_decode(HEVCRpiLocalContext * const lc)\n+{\n+    return get_cabac_bypass_sign(&lc->cc, -1);\n+}\n+\n+static int hevc_transform_skip_flag_decode(HEVCRpiLocalContext * const lc, int c_idx_nz)\n+{\n+    return GET_CABAC_LC(elem_offset[TRANSFORM_SKIP_FLAG] + c_idx_nz);\n+}\n+\n+static int explicit_rdpcm_flag_decode(HEVCRpiLocalContext * const lc, int c_idx_nz)\n+{\n+    return GET_CABAC_LC(elem_offset[EXPLICIT_RDPCM_FLAG] + c_idx_nz);\n+}\n+\n+static int explicit_rdpcm_dir_flag_decode(HEVCRpiLocalContext * const lc, int c_idx_nz)\n+{\n+    return GET_CABAC_LC(elem_offset[EXPLICIT_RDPCM_DIR_FLAG] + c_idx_nz);\n+}\n+\n+\n+int ff_hevc_rpi_log2_res_scale_abs(HEVCRpiLocalContext * const lc, const int idx) {\n+    int i =0;\n+\n+    while (i < 4 && GET_CABAC_LC(elem_offset[LOG2_RES_SCALE_ABS] + 4 * idx + i))\n+        i++;\n+\n+    return i;\n+}\n+\n+static av_always_inline void last_significant_coeff_xy_prefix_decode(HEVCRpiLocalContext * const lc, int c_idx_nz,\n+                                                   int log2_size, int *last_scx_prefix, int *last_scy_prefix)\n+{\n+    int i = 0;\n+    int max = (log2_size << 1) - 1;\n+    int ctx_offset, ctx_shift;\n+\n+    if (!c_idx_nz) {\n+        ctx_offset = 3 * (log2_size - 2)  + ((log2_size - 1) >> 2);\n+        ctx_shift = (log2_size + 1) >> 2;\n+    } else {\n+        ctx_offset = 15;\n+        ctx_shift = log2_size - 2;\n+    }\n+    while (i < max &&\n+           GET_CABAC_LC(elem_offset[LAST_SIGNIFICANT_COEFF_X_PREFIX] + (i >> ctx_shift) + ctx_offset))\n+        i++;\n+    *last_scx_prefix = i;\n+\n+    i = 0;\n+    while (i < max &&\n+           GET_CABAC_LC(elem_offset[LAST_SIGNIFICANT_COEFF_Y_PREFIX] + (i >> ctx_shift) + ctx_offset))\n+        i++;\n+    *last_scy_prefix = i;\n+}\n+\n+static av_always_inline int last_significant_coeff_suffix_decode(HEVCRpiLocalContext * const lc,\n+                                                 int last_significant_coeff_prefix)\n+{\n+    int i;\n+    int length = (last_significant_coeff_prefix >> 1) - 1;\n+    int value = get_cabac_bypass(&lc->cc);\n+\n+    for (i = 1; i < length; i++)\n+        value = (value << 1) | get_cabac_bypass(&lc->cc);\n+    return value;\n+}\n+\n+static av_always_inline int significant_coeff_group_flag_decode(HEVCRpiLocalContext * const lc, int c_idx_nz, int ctx_cg)\n+{\n+    int inc;\n+\n+    inc = (ctx_cg != 0) + (c_idx_nz << 1);\n+\n+    return GET_CABAC_LC(elem_offset[SIGNIFICANT_COEFF_GROUP_FLAG] + inc);\n+}\n+\n+static av_always_inline int significant_coeff_flag_decode_0(HEVCRpiLocalContext * const lc, int offset)\n+{\n+    return GET_CABAC_LC(elem_offset[SIGNIFICANT_COEFF_FLAG] + offset);\n+}\n+\n+#if !USE_BY22\n+#define coeff_abs_level_remaining_decode_bypass(s,r) coeff_abs_level_remaining_decode(s, r)\n+#endif\n+\n+\n+#ifndef coeff_abs_level_remaining_decode_bypass\n+static int coeff_abs_level_remaining_decode_bypass(CABACContext * const c, const unsigned int rice_param)\n+{\n+    uint32_t y;\n+    unsigned int prefix;\n+    unsigned int last_coeff_abs_level_remaining;\n+    unsigned int n;\n+\n+    y = get_cabac_by22_peek(c);\n+    prefix = hevc_clz32(~y);\n+    // y << prefix will always have top bit 0\n+\n+    if (prefix < 3) {\n+        const unsigned int suffix = (y << prefix) >> (31 - rice_param);\n+        last_coeff_abs_level_remaining = (prefix << rice_param) + suffix;\n+        n = prefix + 1 + rice_param;\n+    }\n+    else if (prefix * 2 + rice_param <= CABAC_BY22_PEEK_BITS + 2)\n+    {\n+        const uint32_t suffix = ((y << prefix) | 0x80000000) >> (34 - (prefix + rice_param));\n+\n+        last_coeff_abs_level_remaining = (2 << rice_param) + suffix;\n+        n = prefix * 2 + rice_param - 2;\n+    }\n+    else {\n+        unsigned int suffix;\n+\n+        get_cabac_by22_flush(c, prefix, y);\n+        y = get_cabac_by22_peek(c);\n+\n+        suffix = (y | 0x80000000) >> (34 - (prefix + rice_param));\n+        last_coeff_abs_level_remaining = (2 << rice_param) + suffix;\n+        n = prefix + rice_param - 2;\n+    }\n+\n+    get_cabac_by22_flush(c, n, y);\n+\n+    return last_coeff_abs_level_remaining;\n+}\n+#endif\n+\n+static int coeff_abs_level_remaining_decode(CABACContext * const c, int rc_rice_param)\n+{\n+    int prefix = 0;\n+    int suffix = 0;\n+    int last_coeff_abs_level_remaining;\n+    int i;\n+\n+    while (prefix < CABAC_MAX_BIN && get_cabac_bypass(c))\n+        prefix++;\n+    if (prefix == CABAC_MAX_BIN) {\n+//        av_log(s->avctx, AV_LOG_ERROR, \"CABAC_MAX_BIN : %d\\n\", prefix);\n+        return 0;\n+    }\n+\n+    if (prefix < 3) {\n+        for (i = 0; i < rc_rice_param; i++)\n+            suffix = (suffix << 1) | get_cabac_bypass(c);\n+        last_coeff_abs_level_remaining = (prefix << rc_rice_param) + suffix;\n+    } else {\n+        int prefix_minus3 = prefix - 3;\n+        for (i = 0; i < prefix_minus3 + rc_rice_param; i++)\n+            suffix = (suffix << 1) | get_cabac_bypass(c);\n+        last_coeff_abs_level_remaining = (((1 << prefix_minus3) + 3 - 1)\n+                                              << rc_rice_param) + suffix;\n+    }\n+\n+    return last_coeff_abs_level_remaining;\n+}\n+\n+#if !USE_BY22\n+#define coeff_sign_flag_decode_bypass coeff_sign_flag_decode\n+static inline uint32_t coeff_sign_flag_decode(CABACContext * const c, const unsigned int nb)\n+{\n+    unsigned int i;\n+    uint32_t ret = 0;\n+\n+    for (i = 0; i < nb; i++)\n+        ret = (ret << 1) | get_cabac_bypass(c);\n+\n+    return ret << (32 - nb);\n+}\n+#endif\n+\n+#ifndef coeff_sign_flag_decode_bypass\n+static inline uint32_t coeff_sign_flag_decode_bypass(CABACContext * const c, const unsigned int nb)\n+{\n+    uint32_t y;\n+    y = get_cabac_by22_peek(c);\n+    get_cabac_by22_flush(c, nb, y);\n+    return y & ~(0xffffffffU >> nb);\n+}\n+#endif\n+\n+\n+#ifndef get_cabac_greater1_bits\n+static inline unsigned int get_cabac_greater1_bits(CABACContext * const c, const unsigned int n,\n+    uint8_t * const state0)\n+{\n+    unsigned int i;\n+    unsigned int rv = 0;\n+    for (i = 0; i != n; ++i) {\n+        const unsigned int idx = rv != 0 ? 0 : i < 3 ? i + 1 : 3;\n+        const unsigned int b = get_cabac(c, state0 + idx);\n+        rv = (rv << 1) | b;\n+    }\n+    return rv;\n+}\n+#endif\n+\n+\n+// N.B. levels returned are the values assuming coeff_abs_level_remaining\n+// is uncoded, so 1 must be added if it is coded.  sum_abs also reflects\n+// this version of events.\n+static inline uint32_t get_greaterx_bits(HEVCRpiLocalContext * const lc, const unsigned int n_end, int * const levels,\n+    int * const pprev_subset_coded, int * const psum,\n+    const unsigned int idx0_gt1, const unsigned int idx_gt2)\n+{\n+    CABACContext * const c = &lc->cc;\n+    uint8_t * const state0 = lc->cabac_state + idx0_gt1;\n+    uint8_t * const state_gt2 = lc->cabac_state + idx_gt2;\n+    unsigned int rv;\n+    unsigned int i;\n+    const unsigned int n = FFMIN(n_end, 8);\n+\n+    // Really this is i != n but the simple unconditional loop is cheaper\n+    // and faster\n+    for (i = 0; i != 8; ++i)\n+        levels[i] = 1;\n+\n+    rv = get_cabac_greater1_bits(c, n, state0);\n+\n+    *pprev_subset_coded = 0;\n+    *psum = n;\n+\n+    rv <<= (32 - n);\n+    if (rv != 0)\n+    {\n+        *pprev_subset_coded = 1;\n+        *psum = n + 1;\n+        i = hevc_clz32(rv);\n+        levels[i] = 2;\n+        if (get_cabac(c, state_gt2) == 0)\n+        {\n+            // Unset first coded bit\n+            rv &= ~(0x80000000U >> i);\n+        }\n+    }\n+\n+    if (n_end > 8) {\n+        const unsigned int g8 = n_end - 8;\n+        rv |= ((1 << g8) - 1) << (24 - g8);\n+        for (i = 0; i != g8; ++i) {\n+            levels[i + 8] = 0;\n+        }\n+    }\n+\n+    return rv;\n+}\n+\n+// extended_precision_processing_flag must be false given we are\n+// putting the result into a 16-bit array\n+// So trans_coeff_level must fit in 16 bits too (7.4.9.1 definition of coeff_abs_level_remaining)\n+// scale_m is uint8_t\n+//\n+// scale is [40 - 72] << [0..12] based on qp- worst case is (45 << 12)\n+//   or it can be 2 (if we have transquant_bypass)\n+// shift is set to one less than we really want but would normally be\n+//   s->ps.sps->bit_depth (max 16, min 8) + log2_trafo_size (max 5, min 2?) - 5 = max 16 min 5?\n+// however the scale shift is substracted from shift to a min 0 so scale_m worst = 45 << 6\n+// This can still theoretically lead to overflow but the coding would have to be very odd (& inefficient)\n+// to achieve it\n+\n+#ifndef trans_scale_sat\n+static inline int trans_scale_sat(const int level, const unsigned int scale, const unsigned int scale_m, const unsigned int shift)\n+{\n+    return av_clip_int16((((level * (int)(scale * scale_m)) >> shift) + 1) >> 1);\n+}\n+#endif\n+\n+\n+#ifndef update_rice\n+static inline void update_rice(uint8_t * const stat_coeff,\n+    const unsigned int last_coeff_abs_level_remaining,\n+    const unsigned int c_rice_param)\n+{\n+    const unsigned int x = (last_coeff_abs_level_remaining << 1) >> c_rice_param;\n+    if (x >= 6)\n+        (*stat_coeff)++;\n+    else if (x == 0 && *stat_coeff > 0)\n+        (*stat_coeff)--;\n+}\n+#endif\n+\n+\n+// n must be > 0 on entry\n+#ifndef get_cabac_sig_coeff_flag_idxs\n+static inline uint8_t * get_cabac_sig_coeff_flag_idxs(CABACContext * const c, uint8_t * const state0,\n+    unsigned int n,\n+    const uint8_t const * ctx_map,\n+    uint8_t * p)\n+{\n+    do {\n+        if (get_cabac(c, state0 + ctx_map[n]))\n+            *p++ = n;\n+    } while (--n != 0);\n+    return p;\n+}\n+#endif\n+\n+\n+static int get_sig_coeff_flag_idxs(CABACContext * const c, uint8_t * const state0,\n+    unsigned int n,\n+    const uint8_t * ctx_map,  // const ptr here but not in asm\n+    uint8_t * const flag_idx)\n+{\n+    int rv;\n+\n+    rv = get_cabac_sig_coeff_flag_idxs(c, state0, n, ctx_map, flag_idx) - flag_idx;\n+\n+    return rv;\n+}\n+\n+#define H4x4(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) {\\\n+     x0,  x1,  x2,  x3,\\\n+     x4,  x5,  x6,  x7,\\\n+     x8,  x9, x10, x11,\\\n+    x12, x13, x14, x15}\n+\n+#define V4x4(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) {\\\n+     x0,  x4,  x8, x12,\\\n+     x1,  x5,  x9, x13,\\\n+     x2,  x6, x10, x14,\\\n+     x3,  x7, x11, x15}\n+\n+#define D4x4(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) {\\\n+     x0,  x4,  x1,  x8,\\\n+     x5,  x2, x12,  x9,\\\n+     x6,  x3, x13, x10,\\\n+     x7, x14, x11, x15}\n+\n+\n+static inline int next_subset(HEVCRpiLocalContext * const lc, int i, const int c_idx_nz,\n+    uint8_t * const significant_coeff_group_flag,\n+    const uint8_t * const scan_x_cg, const uint8_t * const scan_y_cg,\n+    int * const pPrev_sig)\n+{\n+    while (--i >= 0) {\n+        uint8_t * const gf_y = scan_y_cg[i] + significant_coeff_group_flag;\n+        const unsigned int x_cg = scan_x_cg[i];\n+\n+        // For the flag decode we only care about Z/NZ but\n+        // we use the full Right * 2 + Down when calculating\n+        // significant coeff flags so we obtain it here.\n+        //\n+        // The group flag array is one longer than it needs to\n+        // be so we don't need to check for y_cg limits\n+        const unsigned int prev_sig = ((gf_y[0] >> x_cg) & 2) | ((gf_y[1] >> x_cg) & 1);\n+\n+        if (i == 0 ||\n+            significant_coeff_group_flag_decode(lc, c_idx_nz, prev_sig))\n+        {\n+            gf_y[0] |= (1 << x_cg);\n+            *pPrev_sig = prev_sig;\n+            break;\n+        }\n+    }\n+\n+    return i;\n+}\n+\n+static void rpi_add_residual(const HEVCRpiContext *const s, HEVCRpiJob * const jb,\n+    const unsigned int log2_trafo_size, const unsigned int c_idx,\n+    const unsigned int x0, const unsigned int y0, const int16_t * const coeffs)\n+{\n+    const AVFrame * const frame = s->frame;\n+    const unsigned int stride = frame_stride1(s->frame, c_idx);\n+    const unsigned int x = x0 >> ctx_hshift(s, c_idx);\n+    const unsigned int y = y0 >> ctx_vshift(s, c_idx);\n+    const int is_sliced = 1;  // av_rpi_is_sand_frame(frame);\n+    uint8_t * const dst = !is_sliced ?\n+            s->frame->data[c_idx] + y * stride + (x << s->ps.sps->pixel_shift) :\n+        c_idx == 0 ?\n+            av_rpi_sand_frame_pos_y(frame, x, y) :\n+            av_rpi_sand_frame_pos_c(frame, x, y);\n+\n+    const unsigned int i = jb->intra.n;\n+    HEVCPredCmd *const pc = jb->intra.cmds + i - 1;\n+\n+    if (i != 0 && c_idx == 2 && pc->type == RPI_PRED_ADD_RESIDUAL_U &&\n+        pc->ta.dst == dst)\n+    {\n+        av_assert1(pc->size == log2_trafo_size &&\n+                   pc->c_idx == 1 &&\n+                   pc->ta.stride == stride);\n+\n+        pc->type = RPI_PRED_ADD_RESIDUAL_C;\n+    }\n+    else if (i != 0 && c_idx == 2 && pc->type == RPI_PRED_ADD_DC_U &&\n+        pc->dc.dst == dst)\n+    {\n+        const int16_t dc = (int16_t)pc->dc.dc;  // Discard top bits\n+        av_assert1(pc->size == log2_trafo_size &&\n+                   pc->c_idx == 1 &&\n+                   pc->dc.stride == stride);\n+\n+        // Rewrite as add residual - must rewrite all fields as different union member\n+        pc->type = RPI_PRED_ADD_RESIDUAL_V;\n+        pc->ta.buf = coeffs;\n+        pc->ta.dst = dst;\n+        pc->ta.stride = stride;\n+        pc->ta.dc = dc;\n+    }\n+    else\n+    {\n+        HEVCPredCmd * const cmd = pc + 1;\n+        jb->intra.n = i + 1;\n+\n+        cmd->type = RPI_PRED_ADD_RESIDUAL + (is_sliced ? c_idx : 0);\n+        cmd->size = log2_trafo_size;\n+        cmd->ta.buf = coeffs;\n+        cmd->ta.dst = dst;\n+        cmd->ta.stride = stride;\n+        cmd->ta.dc = 0;\n+    }\n+}\n+\n+\n+static void rpi_add_dc(const HEVCRpiContext * const s, HEVCRpiJob * const jb,\n+    const unsigned int log2_trafo_size, const unsigned int c_idx,\n+    const unsigned int x0, const unsigned int y0, const int16_t * const coeffs)\n+{\n+    const AVFrame * const frame = s->frame;\n+    const unsigned int stride = frame_stride1(s->frame, c_idx);\n+    const unsigned int x = x0 >> ctx_hshift(s, c_idx);\n+    const unsigned int y = y0 >> ctx_vshift(s, c_idx);\n+    const int is_sliced = 1;\n+    uint8_t * const dst = !is_sliced ?\n+            s->frame->data[c_idx] + y * stride + (x << s->ps.sps->pixel_shift) :\n+        c_idx == 0 ?\n+            av_rpi_sand_frame_pos_y(frame, x, y) :\n+            av_rpi_sand_frame_pos_c(frame, x, y);\n+\n+    const unsigned int shift = FFMAX(14 - s->ps.sps->bit_depth, 0);\n+    const int coeff = (coeffs[0] + (1 | (1 << shift))) >> (shift + 1);\n+\n+    const unsigned int i = jb->intra.n;\n+    HEVCPredCmd *const pc = jb->intra.cmds + i - 1;\n+\n+    if (i != 0 && c_idx == 2 && pc->type == RPI_PRED_ADD_RESIDUAL_U &&\n+        pc->ta.dst == dst)\n+    {\n+        av_assert1(pc->size == log2_trafo_size &&\n+                   pc->c_idx == 1 &&\n+                   pc->ta.stride == stride);\n+\n+        pc->ta.dc = (int16_t)coeff;\n+    }\n+    else if (i != 0 && c_idx == 2 && pc->type == RPI_PRED_ADD_DC_U &&\n+        pc->dc.dst == dst)\n+    {\n+        av_assert1(pc->size == log2_trafo_size &&\n+                   pc->c_idx == 1 &&\n+                   pc->dc.stride == stride &&\n+                   (pc->dc.dc & ~0xffff) == 0);\n+\n+        pc->dc.dc |= (coeff << 16);\n+    }\n+    else\n+    {\n+        HEVCPredCmd * const cmd = pc + 1;\n+        jb->intra.n = i + 1;\n+\n+        cmd->type = RPI_PRED_ADD_DC + c_idx;\n+        cmd->size = log2_trafo_size;\n+        cmd->dc.dst = dst;\n+        cmd->dc.stride = stride;\n+        cmd->dc.dc = c_idx == 0 ? coeff : c_idx == 2 ? coeff << 16 : coeff & 0xffff;\n+    }\n+}\n+\n+\n+void ff_hevc_rpi_hls_residual_coding(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+                                const int x0, const int y0,\n+                                const int log2_trafo_size, const enum ScanType scan_idx,\n+                                const int c_idx)\n+{\n+    int trans_skip_or_bypass = lc->cu.cu_transquant_bypass_flag;\n+\n+    int last_significant_coeff_x, last_significant_coeff_y;\n+    int num_coeff = 0;\n+    int prev_subset_coded = 0;\n+\n+    int num_last_subset;\n+    int x_cg_last_sig, y_cg_last_sig;\n+\n+    const uint8_t *scan_x_cg, *scan_y_cg;\n+    const xy_off_t * const scan_xy_off = off_xys[scan_idx][log2_trafo_size - 2];\n+\n+    int use_vpu;\n+#if RPI_COMPRESS_COEFFS                                \n+    int num_nonzero = 0;\n+    int use_compress = 0;\n+    int *coeffs32;\n+#endif\n+    int use_dc = 0;\n+    int16_t *coeffs;\n+    uint8_t significant_coeff_group_flag[9] = {0};  // Allow 1 final byte that is always zero\n+    int explicit_rdpcm_flag = 0;\n+    int explicit_rdpcm_dir_flag;\n+\n+    int i;\n+    int shift,scale;\n+    const uint8_t *scale_matrix = NULL;\n+    uint8_t dc_scale;\n+    const int c_idx_nz = (c_idx != 0);\n+    const int pred_mode_intra = c_idx_nz ? lc->tu.intra_pred_mode_c : lc->tu.intra_pred_mode;\n+    int prev_sig = 0;\n+    int may_hide_sign;\n+\n+    int16_t dummy_coeffs[16];\n+\n+    // Derive QP for dequant\n+    if (!lc->cu.cu_transquant_bypass_flag) {\n+        may_hide_sign = s->ps.pps->sign_data_hiding_flag;\n+\n+        if (s->ps.pps->transform_skip_enabled_flag &&\n+            log2_trafo_size <= s->ps.pps->log2_max_transform_skip_block_size) {\n+            int transform_skip_flag = hevc_transform_skip_flag_decode(lc, c_idx_nz);\n+            if (transform_skip_flag) {\n+                trans_skip_or_bypass = 1;\n+                if (lc->cu.pred_mode ==  MODE_INTRA  &&\n+                    s->ps.sps->implicit_rdpcm_enabled_flag &&\n+                    (pred_mode_intra == 10 || pred_mode_intra == 26)) {\n+                    may_hide_sign = 0;\n+                }\n+            }\n+        }\n+\n+        {\n+            static const uint8_t level_scale[8] = {\n+                40, 45, 51, 57, 64, 72, 0, 0  // Pad to 8\n+            };\n+            const int qp6 = (int8_t)lc->tu.qp_divmod6[c_idx][lc->qp_y];\n+\n+            // Shift is set to one less than will actually occur as the scale\n+            // and saturate step adds 1 and then shifts right again\n+            scale = level_scale[qp6 & 7];\n+//            shift = s->ps.sps->bit_depth + log2_trafo_size - (int)(qp6 >> 3);\n+            shift = log2_trafo_size - (qp6 >> 3);\n+\n+            if (shift < 0) {\n+                scale <<= -shift;\n+                shift = 0;\n+            }\n+        }\n+\n+        if (s->ps.sps->scaling_list_enable_flag && !(trans_skip_or_bypass && log2_trafo_size > 2)) {\n+            const ScalingList * const sl = s->ps.pps->scaling_list_data_present_flag ?\n+                &s->ps.pps->scaling_list : &s->ps.sps->scaling_list;\n+            const unsigned int matrix_id =\n+                lc->cu.pred_mode != MODE_INTRA ? 3 + c_idx : c_idx;\n+\n+            scale_matrix = sl->sl[log2_trafo_size - 2][matrix_id];\n+            dc_scale = scale_matrix[0];\n+            if (log2_trafo_size >= 4)\n+                dc_scale = sl->sl_dc[log2_trafo_size - 4][matrix_id];\n+        }\n+        else\n+        {\n+            static const uint8_t sixteen_scale[64] = {\n+                16, 16, 16, 16, 16, 16, 16, 16,\n+                16, 16, 16, 16, 16, 16, 16, 16,\n+                16, 16, 16, 16, 16, 16, 16, 16,\n+                16, 16, 16, 16, 16, 16, 16, 16,\n+                16, 16, 16, 16, 16, 16, 16, 16,\n+                16, 16, 16, 16, 16, 16, 16, 16,\n+                16, 16, 16, 16, 16, 16, 16, 16,\n+                16, 16, 16, 16, 16, 16, 16, 16\n+            };\n+            scale_matrix = sixteen_scale;\n+            dc_scale = 16;\n+        }\n+    } else {\n+        static const uint8_t unit_scale[64] = {\n+            1, 1, 1, 1, 1, 1, 1, 1,\n+            1, 1, 1, 1, 1, 1, 1, 1,\n+            1, 1, 1, 1, 1, 1, 1, 1,\n+            1, 1, 1, 1, 1, 1, 1, 1,\n+            1, 1, 1, 1, 1, 1, 1, 1,\n+            1, 1, 1, 1, 1, 1, 1, 1,\n+            1, 1, 1, 1, 1, 1, 1, 1,\n+            1, 1, 1, 1, 1, 1, 1, 1,\n+        };\n+        scale_matrix = unit_scale;\n+        shift        = 0;\n+        scale        = 2;  // We will shift right to kill this\n+        dc_scale     = 1;\n+\n+        may_hide_sign = 0;\n+    }\n+\n+\n+\n+\n+    if (lc->cu.pred_mode == MODE_INTER && s->ps.sps->explicit_rdpcm_enabled_flag &&\n+        trans_skip_or_bypass) {\n+        explicit_rdpcm_flag = explicit_rdpcm_flag_decode(lc, c_idx_nz);\n+        if (explicit_rdpcm_flag) {\n+            may_hide_sign = 0;\n+            explicit_rdpcm_dir_flag = explicit_rdpcm_dir_flag_decode(lc, c_idx_nz);\n+        }\n+    }\n+\n+    last_significant_coeff_xy_prefix_decode(lc, c_idx_nz, log2_trafo_size,\n+                                           &last_significant_coeff_x, &last_significant_coeff_y);\n+\n+    if (last_significant_coeff_x > 3) {\n+        int suffix = last_significant_coeff_suffix_decode(lc, last_significant_coeff_x);\n+        last_significant_coeff_x = (1 << ((last_significant_coeff_x >> 1) - 1)) *\n+        (2 + (last_significant_coeff_x & 1)) +\n+        suffix;\n+    }\n+\n+    if (last_significant_coeff_y > 3) {\n+        int suffix = last_significant_coeff_suffix_decode(lc, last_significant_coeff_y);\n+        last_significant_coeff_y = (1 << ((last_significant_coeff_y >> 1) - 1)) *\n+        (2 + (last_significant_coeff_y & 1)) +\n+        suffix;\n+    }\n+\n+    if (scan_idx == SCAN_VERT)\n+        FFSWAP(int, last_significant_coeff_x, last_significant_coeff_y);\n+\n+    x_cg_last_sig = last_significant_coeff_x >> 2;\n+    y_cg_last_sig = last_significant_coeff_y >> 2;\n+\n+    switch (scan_idx) {\n+    case SCAN_DIAG: {\n+        int last_x_c = last_significant_coeff_x & 3;\n+        int last_y_c = last_significant_coeff_y & 3;\n+\n+        num_coeff = diag_scan4x4_inv[last_y_c][last_x_c];\n+\n+        switch (log2_trafo_size) {\n+        case 2:\n+            scan_x_cg = scan_1x1;\n+            scan_y_cg = scan_1x1;\n+            break;\n+        case 3:\n+            num_coeff += diag_scan2x2_inv[y_cg_last_sig][x_cg_last_sig] << 4;\n+            scan_x_cg = diag_scan2x2_x;\n+            scan_y_cg = diag_scan2x2_y;\n+            break;\n+        case 4:\n+            num_coeff += diag_scan4x4_inv[y_cg_last_sig][x_cg_last_sig] << 4;\n+            scan_x_cg = ff_hevc_rpi_diag_scan4x4_x;\n+            scan_y_cg = ff_hevc_rpi_diag_scan4x4_y;\n+            break;\n+        case 5:\n+        default:\n+            num_coeff += diag_scan8x8_inv[y_cg_last_sig][x_cg_last_sig] << 4;\n+            scan_x_cg = ff_hevc_rpi_diag_scan8x8_x;\n+            scan_y_cg = ff_hevc_rpi_diag_scan8x8_y;\n+            break;\n+        }\n+        break;\n+    }\n+    case SCAN_HORIZ:\n+        scan_x_cg = horiz_scan2x2_x;\n+        scan_y_cg = horiz_scan2x2_y;\n+        num_coeff = horiz_scan8x8_inv[last_significant_coeff_y][last_significant_coeff_x];\n+        break;\n+    default: //SCAN_VERT\n+        scan_x_cg = horiz_scan2x2_y;\n+        scan_y_cg = horiz_scan2x2_x;\n+        num_coeff = horiz_scan8x8_inv[last_significant_coeff_x][last_significant_coeff_y];\n+        break;\n+    }\n+    num_coeff++;\n+    num_last_subset = (num_coeff - 1) >> 4;\n+\n+    significant_coeff_group_flag[y_cg_last_sig] = 1 << x_cg_last_sig; // 1st subset always significant\n+\n+    {\n+        const unsigned int ccount = 1 << (log2_trafo_size * 2);\n+        const int special = trans_skip_or_bypass /* || lc->tu.cross_pf */;  // These need special processing\n+        use_vpu = 0;\n+        use_dc = (num_coeff == 1) && !special &&\n+            !(lc->cu.pred_mode == MODE_INTRA && c_idx == 0 && log2_trafo_size == 2);\n+\n+        if (use_dc) {\n+            // Just need a little empty space\n+            coeffs = dummy_coeffs;\n+            // No need to clear\n+        }\n+        else\n+        {\n+            use_vpu = !special && log2_trafo_size >= 4;\n+#if RPI_COMPRESS_COEFFS\n+            use_compress = use_vpu && lc->jb0->coeffs.s[log2_trafo_size - 2].packed;\n+#endif\n+            coeffs = rpi_alloc_coeff_buf(lc->jb0, !use_vpu ? 0 : log2_trafo_size - 2, ccount);\n+#if RPI_COMPRESS_COEFFS\n+            coeffs32 = (int*)coeffs;\n+            if (!use_compress)\n+#endif\n+#if HAVE_NEON\n+            rpi_zap_coeff_vals_neon(coeffs, log2_trafo_size - 2);\n+#else\n+            memset(coeffs, 0, ccount * sizeof(int16_t));\n+#endif\n+        }\n+    }\n+\n+    i = num_last_subset;\n+    do {\n+        int implicit_non_zero_coeff = 0;\n+        int n_end;\n+\n+        uint8_t significant_coeff_flag_idx[16];\n+        unsigned int nb_significant_coeff_flag = 0;\n+\n+        if (i == num_last_subset) {\n+            // First time through\n+            int last_scan_pos = num_coeff - (i << 4) - 1;\n+            n_end = last_scan_pos - 1;\n+            significant_coeff_flag_idx[0] = last_scan_pos;\n+            nb_significant_coeff_flag = 1;\n+        } else {\n+            n_end = 15;\n+            implicit_non_zero_coeff = (i != 0);\n+        }\n+\n+        if (n_end >= 0) {\n+            static const uint8_t ctx_idx_maps_ts2[3][16] = {\n+                D4x4(0, 1, 4, 5, 2, 3, 4, 5, 6, 6, 8, 8, 7, 7, 8, 8), // log2_trafo_size == 2\n+                H4x4(0, 1, 4, 5, 2, 3, 4, 5, 6, 6, 8, 8, 7, 7, 8, 8), // log2_trafo_size == 2\n+                V4x4(0, 1, 4, 5, 2, 3, 4, 5, 6, 6, 8, 8, 7, 7, 8, 8)  // log2_trafo_size == 2\n+            };\n+            // N.B. prev_sig = Right * 2 + Down\n+            static const uint8_t ctx_idx_maps[3][4][16] = {\n+                {\n+                    D4x4(1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0), // prev_sig == 0\n+                    D4x4(2, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0), // prev_sig == 1\n+                    D4x4(2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), // prev_sig == 2\n+                    D4x4(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2)  // prev_sig == 3, default\n+                },\n+                {\n+                    H4x4(1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0), // prev_sig == 0\n+                    H4x4(2, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0), // prev_sig == 1\n+                    H4x4(2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), // prev_sig == 2\n+                    H4x4(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2)  // prev_sig == 3, default\n+                },\n+                {\n+                    V4x4(1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0), // prev_sig == 0\n+                    V4x4(2, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0), // prev_sig == 1\n+                    V4x4(2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), // prev_sig == 2\n+                    V4x4(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2)  // prev_sig == 3, default\n+                }\n+            };\n+            const uint8_t *ctx_idx_map_p;\n+            int scf_offset = 0;\n+\n+            if (s->ps.sps->transform_skip_context_enabled_flag && trans_skip_or_bypass) {\n+                ctx_idx_map_p = ctx_idx_maps[0][3];\n+                scf_offset = 40 + c_idx_nz;\n+            } else {\n+                if (c_idx_nz != 0)\n+                    scf_offset = 27;\n+\n+                if (log2_trafo_size == 2) {\n+                    ctx_idx_map_p = ctx_idx_maps_ts2[scan_idx];\n+                } else {\n+                    ctx_idx_map_p = ctx_idx_maps[scan_idx][prev_sig];\n+                    if (!c_idx_nz) {\n+                        if (i != 0)\n+                            scf_offset += 3;\n+\n+                        if (log2_trafo_size == 3) {\n+                            scf_offset += (scan_idx == SCAN_DIAG) ? 9 : 15;\n+                        } else {\n+                            scf_offset += 21;\n+                        }\n+                    } else {\n+                        if (log2_trafo_size == 3)\n+                            scf_offset += 9;\n+                        else\n+                            scf_offset += 12;\n+                    }\n+                }\n+            }\n+\n+            if (n_end > 0) {\n+                int cnt = get_sig_coeff_flag_idxs(&lc->cc,\n+                    lc->cabac_state + elem_offset[SIGNIFICANT_COEFF_FLAG] + scf_offset,\n+                    n_end, ctx_idx_map_p,\n+                    significant_coeff_flag_idx + nb_significant_coeff_flag);\n+\n+                nb_significant_coeff_flag += cnt;\n+                if (cnt != 0) {\n+                    implicit_non_zero_coeff = 0;\n+                }\n+            }\n+\n+            if (implicit_non_zero_coeff == 0) {\n+                if (s->ps.sps->transform_skip_context_enabled_flag && trans_skip_or_bypass) {\n+                    scf_offset = 42 + c_idx_nz;\n+                } else {\n+                    if (i == 0) {\n+                        scf_offset = c_idx_nz ? 27 : 0;\n+                    } else {\n+                        scf_offset = 2 + scf_offset;\n+                    }\n+                }\n+                if (significant_coeff_flag_decode_0(lc, scf_offset) == 1) {\n+                    significant_coeff_flag_idx[nb_significant_coeff_flag] = 0;\n+                    nb_significant_coeff_flag++;\n+                }\n+            } else {\n+                significant_coeff_flag_idx[nb_significant_coeff_flag] = 0;\n+                nb_significant_coeff_flag++;\n+            }\n+        }\n+#if RPI_COMPRESS_COEFFS\n+        if (use_compress && (nb_significant_coeff_flag + num_nonzero + 1 >= (1<<(2*log2_trafo_size-1)))) { // Overflow when half-full!\n+          int16_t temp[32*32];\n+          const unsigned int ccount = 1 << (log2_trafo_size * 2);\n+          lc->jb0->coeffs.s[log2_trafo_size - 2].packed = 0;\n+          lc->jb0->coeffs.s[log2_trafo_size - 2].packed_n = lc->jb0->coeffs.s[log2_trafo_size - 2].n - ccount; // Don't want to unpack the last buffer\n+          memcpy(temp, coeffs, sizeof(int)*num_nonzero);\n+          coeffs32 = (int *)temp;\n+          memset(coeffs, 0, ccount * sizeof(int16_t));\n+          num_nonzero--;\n+          while (num_nonzero >= 0) {\n+            const unsigned int res = coeffs32[num_nonzero];\n+            const unsigned int offset = res & 0xffff;\n+            coeffs[ offset ] = res >> 16;\n+            num_nonzero--;\n+          }\n+          use_compress = 0;\n+        }\n+#endif            \n+\n+        if (nb_significant_coeff_flag != 0) {\n+            const unsigned int gt1_idx_delta = (c_idx_nz << 2) |\n+                ((i != 0 && !c_idx_nz) ? 2 : 0) |\n+                prev_subset_coded;\n+            const unsigned int idx0_gt1 = elem_offset[COEFF_ABS_LEVEL_GREATER1_FLAG] +\n+                (gt1_idx_delta << 2);\n+            const unsigned int idx_gt2 = elem_offset[COEFF_ABS_LEVEL_GREATER2_FLAG] +\n+                gt1_idx_delta;\n+\n+            const unsigned int x_cg = scan_x_cg[i];\n+            const unsigned int y_cg = scan_y_cg[i];\n+            int16_t * const blk_coeffs = coeffs +\n+                ((x_cg + (y_cg << log2_trafo_size)) << 2);\n+            // This calculation is 'wrong' for log2_traffo_size == 2\n+            // but that doesn't matter as in this case x_cg & y_cg\n+            // are always 0 so result is correct (0) anyway\n+            const uint8_t * const blk_scale = scale_matrix +\n+                (((x_cg + (y_cg << 3)) << (5 - log2_trafo_size)));\n+\n+            // * The following code block doesn't deal with these flags:\n+            //   (nor did the one it replaces)\n+            //\n+            // cabac_bypass_alignment_enabled_flag\n+            //    This should be easy but I can't find a test case\n+            // extended_precision_processing_flag\n+            //    This can extend the required precision past 16bits\n+            //    so is probably tricky - also no example found yet\n+\n+#if USE_N_END_1\n+            if (nb_significant_coeff_flag == 1) {\n+                // There is a small gain to be had from special casing the single\n+                // transform coefficient case.  The reduction in complexity\n+                // makes up for the code duplicatioon.\n+\n+                int trans_coeff_level = 1;\n+                int coeff_sign_flag;\n+                int coded_val = 0;\n+\n+                // initialize first elem of coeff_bas_level_greater1_flag\n+                prev_subset_coded = 0;\n+\n+                if (get_cabac(&lc->cc, lc->cabac_state + idx0_gt1 + 1)) {\n+                    trans_coeff_level = 2;\n+                    prev_subset_coded = 1;\n+                    coded_val = get_cabac(&lc->cc, lc->cabac_state + idx_gt2);\n+                }\n+\n+                // Probably not worth the overhead of starting by22 for just one value\n+                coeff_sign_flag = get_cabac_bypass(&lc->cc);\n+\n+                if (coded_val)\n+                {\n+                    if (!s->ps.sps->persistent_rice_adaptation_enabled_flag) {\n+                        trans_coeff_level = 3 + coeff_abs_level_remaining_decode(&lc->cc, 0);\n+                    } else {\n+                        uint8_t * const stat_coeff =\n+                            lc->stat_coeff + trans_skip_or_bypass + 2 - ((c_idx_nz) << 1);\n+                        const unsigned int c_rice_param = *stat_coeff >> 2;\n+                        const int last_coeff_abs_level_remaining = coeff_abs_level_remaining_decode(&lc->cc, c_rice_param);\n+\n+                        trans_coeff_level = 3 + last_coeff_abs_level_remaining;\n+                        update_rice(stat_coeff, last_coeff_abs_level_remaining, c_rice_param);\n+                    }\n+                }\n+\n+                {\n+                    const xy_off_t * const xy_off = scan_xy_off + significant_coeff_flag_idx[0];\n+                    const int k = (int32_t)(coeff_sign_flag << 31) >> 31;\n+                    const unsigned int scale_m = blk_scale[xy_off->scale];\n+                    const int res = trans_scale_sat(\n+                        (trans_coeff_level ^ k) - k,  // Apply sign\n+                        scale,\n+                        i == 0 && xy_off->coeff == 0 ? dc_scale : scale_m,\n+                        shift);\n+#if RPI_COMPRESS_COEFFS                                \n+                      if (use_compress)\n+                        coeffs32[num_nonzero++] = (res<<16) + (&blk_coeffs[xy_off->coeff] - coeffs);\n+                      else\n+#endif\n+                      blk_coeffs[xy_off->coeff] = res;\n+                }\n+            }\n+            else\n+#endif\n+            {\n+                int sign_hidden = may_hide_sign;\n+                int levels[16]; // Should be able to get away with int16_t but that fails some tests\n+                uint32_t coeff_sign_flags;\n+                uint32_t coded_vals = 0;\n+                // Sum(abs(level[]))\n+                // In fact we only need the bottom bit and in some future\n+                // version that may be all we calculate\n+                unsigned int sum_abs;\n+\n+                coded_vals = get_greaterx_bits(lc, nb_significant_coeff_flag, levels,\n+                    &prev_subset_coded, &sum_abs, idx0_gt1, idx_gt2);\n+\n+                if (significant_coeff_flag_idx[0] - significant_coeff_flag_idx[nb_significant_coeff_flag - 1] <= 3)\n+                    sign_hidden = 0;\n+\n+                // -- Start bypass block\n+\n+                bypass_start(&lc->cc);\n+\n+                coeff_sign_flags = coeff_sign_flag_decode_bypass(&lc->cc, nb_significant_coeff_flag - sign_hidden);\n+\n+                if (coded_vals != 0)\n+                {\n+                    const int rice_adaptation_enabled = s->ps.sps->persistent_rice_adaptation_enabled_flag;\n+                    uint8_t * stat_coeff = !rice_adaptation_enabled ? NULL :\n+                        lc->stat_coeff + trans_skip_or_bypass + 2 - ((c_idx_nz) << 1);\n+                    int c_rice_param = !rice_adaptation_enabled ? 0 : *stat_coeff >> 2;\n+                    int * level = levels - 1;\n+\n+                    do {\n+                        {\n+                            const unsigned int z = hevc_clz32(coded_vals) + 1;\n+                            level += z;\n+                            coded_vals <<= z;\n+                        }\n+\n+                        {\n+                            const int last_coeff_abs_level_remaining = coeff_abs_level_remaining_decode_bypass(&lc->cc, c_rice_param);\n+                            const int trans_coeff_level = *level + last_coeff_abs_level_remaining + 1;\n+\n+                            sum_abs += last_coeff_abs_level_remaining + 1;\n+                            *level = trans_coeff_level;\n+\n+                            if (stat_coeff != NULL)\n+                                update_rice(stat_coeff, last_coeff_abs_level_remaining, c_rice_param);\n+                            stat_coeff = NULL;\n+\n+                            if (trans_coeff_level > (3 << c_rice_param) &&\n+                                (c_rice_param < 4 || rice_adaptation_enabled))\n+                                ++c_rice_param;\n+                        }\n+                    } while (coded_vals != 0);\n+                }\n+\n+                // sign_hidden = 0 or 1 so we can combine the tests\n+                if ((sign_hidden & sum_abs) != 0) {\n+                    levels[nb_significant_coeff_flag - 1] = -levels[nb_significant_coeff_flag - 1];\n+                }\n+\n+                bypass_finish(&lc->cc);\n+\n+                // -- Finish bypass block\n+\n+                // Scale loop\n+                {\n+                    int m = nb_significant_coeff_flag - 1;\n+\n+                    // Deal with DC component (if any) first\n+                    if (i == 0 && significant_coeff_flag_idx[m] == 0)\n+                    {\n+                        const int k = (int32_t)(coeff_sign_flags << m) >> 31;\n+                        const int res = trans_scale_sat(\n+                            (levels[m] ^ k) - k, scale, dc_scale, shift);\n+#if RPI_COMPRESS_COEFFS\n+                        if (use_compress)\n+                        {\n+                            coeffs32[num_nonzero++] = (res<<16) + (blk_coeffs - coeffs);\n+                        }\n+                        else\n+#endif\n+                        {\n+                            blk_coeffs[0] = res;\n+                        }\n+                        --m;\n+                    }\n+\n+#if !USE_N_END_1\n+                    // If N_END_1 set then m was at least 1 initially\n+                    if (m >= 0)\n+#endif\n+                    {\n+                        do {\n+                            const xy_off_t * const xy_off = scan_xy_off +\n+                                significant_coeff_flag_idx[m];\n+                            const int k = (int32_t)(coeff_sign_flags << m) >> 31;\n+                            const int res = trans_scale_sat(\n+                                (levels[m] ^ k) - k,\n+                                scale,\n+                                blk_scale[xy_off->scale],\n+                                shift);\n+#if RPI_COMPRESS_COEFFS\n+                            if (use_compress) {\n+                              coeffs32[num_nonzero++] = (res<<16) + (&blk_coeffs[xy_off->coeff] - coeffs);\n+                            } else\n+#endif\n+                              blk_coeffs[xy_off->coeff] = res;\n+                        } while (--m >= 0);\n+                    }\n+                }\n+\n+            }\n+        }\n+    } while ((i = next_subset(lc, i, c_idx_nz,\n+                              significant_coeff_group_flag, scan_x_cg, scan_y_cg, &prev_sig)) >= 0 &&\n+             !cabac_overflow(&lc->cc));\n+\n+    if (lc->cu.cu_transquant_bypass_flag) {\n+        if (explicit_rdpcm_flag || (s->ps.sps->implicit_rdpcm_enabled_flag &&\n+                                    (pred_mode_intra == 10 || pred_mode_intra == 26))) {\n+            int mode = s->ps.sps->implicit_rdpcm_enabled_flag ? (pred_mode_intra == 26) : explicit_rdpcm_dir_flag;\n+\n+            s->hevcdsp.transform_rdpcm(coeffs, log2_trafo_size, mode);\n+        }\n+    } else {\n+        if (trans_skip_or_bypass) { // Must be trans_skip as we've already dealt with bypass\n+            int rot = s->ps.sps->transform_skip_rotation_enabled_flag &&\n+                      log2_trafo_size == 2 &&\n+                      lc->cu.pred_mode == MODE_INTRA;\n+            if (rot) {\n+                for (i = 0; i < 8; i++)\n+                    FFSWAP(int16_t, coeffs[i], coeffs[16 - i - 1]);\n+            }\n+\n+            s->hevcdsp.dequant(coeffs, log2_trafo_size);\n+\n+            if (explicit_rdpcm_flag || (s->ps.sps->implicit_rdpcm_enabled_flag &&\n+                                        lc->cu.pred_mode == MODE_INTRA &&\n+                                        (pred_mode_intra == 10 || pred_mode_intra == 26))) {\n+                int mode = explicit_rdpcm_flag ? explicit_rdpcm_dir_flag : (pred_mode_intra == 26);\n+\n+                s->hevcdsp.transform_rdpcm(coeffs, log2_trafo_size, mode);\n+            }\n+        } else if (lc->cu.pred_mode == MODE_INTRA && c_idx == 0 && log2_trafo_size == 2) {\n+            s->hevcdsp.transform_4x4_luma(coeffs);\n+        }\n+        else if (!use_vpu)\n+        {\n+            int max_xy = FFMAX(last_significant_coeff_x, last_significant_coeff_y);\n+            if (max_xy == 0)\n+            {\n+                if (use_dc)\n+                    rpi_add_dc(s, lc->jb0, log2_trafo_size, c_idx, x0, y0, coeffs);\n+                else\n+                    s->hevcdsp.idct_dc[log2_trafo_size - 2](coeffs);\n+            }\n+            else {\n+                int col_limit = last_significant_coeff_x + last_significant_coeff_y + 4;\n+                if (max_xy < 4)\n+                    col_limit = FFMIN(4, col_limit);\n+                else if (max_xy < 8)\n+                    col_limit = FFMIN(8, col_limit);\n+                else if (max_xy < 12)\n+                    col_limit = FFMIN(24, col_limit);\n+                s->hevcdsp.idct[log2_trafo_size - 2](coeffs, col_limit);\n+            }\n+        }\n+    }\n+\n+#if 0\n+    // Mildly rotted - we support no mode where cross is valid\n+    if (lc->tu.cross_pf) {\n+        int16_t * const coeffs_y = (int16_t*)lc->edge_emu_buffer;\n+        const int ccount = 1 << (log2_trafo_size * 2);\n+\n+        for (i = 0; i < ccount; i++) {\n+            coeffs[i] = coeffs[i] + ((lc->tu.res_scale_val * coeffs_y[i]) >> 3);\n+        }\n+    }\n+#endif\n+\n+    if (!use_dc) {\n+#if RPI_COMPRESS_COEFFS                                \n+        if (use_compress) {\n+          coeffs32[num_nonzero] = 0;\n+        }\n+#endif      \n+        rpi_add_residual(s, lc->jb0, log2_trafo_size, c_idx, x0, y0, coeffs);\n+    }\n+}\n+\n+#if !USE_BY22\n+// Stores results to lc\n+MvXY ff_hevc_rpi_hls_mvd_coding(HEVCRpiLocalContext * const lc)\n+{\n+    int x = abs_mvd_greater0_flag_decode(lc);\n+    int y = abs_mvd_greater0_flag_decode(lc);\n+\n+    if (x)\n+        x += abs_mvd_greater1_flag_decode(lc);\n+    if (y)\n+        y += abs_mvd_greater1_flag_decode(lc);\n+\n+    switch (x) {\n+    case 2: x = mvd_decode(lc);           break;\n+    case 1: x = mvd_sign_flag_decode(lc); break;\n+    case 0: x = 0;                       break;\n+    }\n+\n+    switch (y) {\n+    case 2: y = mvd_decode(lc);           break;\n+    case 1: y = mvd_sign_flag_decode(lc); break;\n+    case 0: y = 0;                       break;\n+    }\n+    return MV_XY(x,y);\n+}\n+#else\n+MvXY ff_hevc_rpi_hls_mvd_coding(HEVCRpiLocalContext * const lc)\n+{\n+    int x = abs_mvd_greater0_flag_decode(lc);\n+    int y = abs_mvd_greater0_flag_decode(lc);\n+\n+    if ((x | y) == 0)\n+        return 0;\n+\n+    if (x != 0)\n+        x += abs_mvd_greater1_flag_decode(lc);\n+    if (y != 0)\n+        y += abs_mvd_greater1_flag_decode(lc);\n+\n+    if ((x | y) == 1)\n+    {\n+        // Not worth starting BY22\n+        if (x != 0)\n+            x = mvd_sign_flag_decode(lc);\n+        if (y != 0)\n+            y = mvd_sign_flag_decode(lc);\n+    }\n+    else\n+    {\n+        CABACContext * const cc = &lc->cc;\n+        uint32_t val;\n+        uint32_t b;\n+        unsigned int n = 0;\n+\n+        bypass_start(cc);\n+        b = val = get_cabac_by22_peek(cc);\n+\n+        if (x == 1) {\n+            x = ((int32_t)b >> 31) | 1;\n+            n = 1;\n+            b <<= 1;\n+        }\n+        else if (x == 2) {\n+            // EG1 so we have (leading one bits + 1) of suffix\n+            // This makes prefix & suffix lengths the same\n+            const unsigned int k = hevc_clz32(~b) + 1;\n+            int s;\n+\n+            av_assert2(k <= 15);\n+\n+            b <<= k;\n+            n = 2 * k + 1; // Includes suffix & sign\n+\n+            // We need to have k*2 + 2 (prefix, suffix, sign, y-sign) bits peeked\n+            // if we are going to do this without a flush\n+            if (k > CABAC_BY22_PEEK_BITS / 2 - 1)\n+            {\n+                // Need too many bits - flush\n+                // n = k\n+                get_cabac_by22_flush(cc, k, val);\n+                b = val = get_cabac_by22_peek(cc);\n+                n = k + 1;\n+            }\n+\n+            x = (b >> (32 - k)) + (1 << k);\n+            b <<= k;\n+            s = (int32_t)b >> 31;\n+            x = (x ^ s) - s;\n+            b <<= 1;\n+\n+            // Max abs value of an mv is 2^15 - 1 (i.e. a prefix len of 15 bits)\n+            if (y > 1 && n > CABAC_BY22_PEEK_BITS - 15)\n+            {\n+                get_cabac_by22_flush(cc, n, val);\n+                b = val = get_cabac_by22_peek(cc);\n+                n = 0;\n+            }\n+        }\n+\n+        if (y == 1) {\n+            y = ((int32_t)b >> 31) | 1;\n+            ++n;\n+            // don't care about b anymore\n+        }\n+        else if (y == 2) {\n+            const unsigned int k = hevc_clz32(~b) + 1;\n+            int s;\n+\n+            av_assert2(k <= 15);\n+\n+            // We need to have k*2 + 1 (prefix, suffix, sign) bits peeked\n+            // if we are going to do this without a flush\n+            b <<= k;\n+            n += 2 * k + 1;\n+\n+            if (n > CABAC_BY22_PEEK_BITS)\n+            {\n+                // Need too many bits - flush\n+                get_cabac_by22_flush(cc, n - (k + 1), val);\n+                b = val = get_cabac_by22_peek(cc);\n+                n = k + 1;\n+            }\n+\n+            y = (b >> (32 - k)) + (1 << k);\n+            s = (int32_t)(b << k) >> 31;\n+            y = (y ^ s) - s;\n+            // don't care about b anymore\n+        }\n+\n+        get_cabac_by22_flush(cc, n, val);\n+        bypass_finish(cc);\n+    }\n+\n+    return MV_XY(x, y);\n+}\n+#endif\ndiff --git a/libavcodec/rpi_hevc_cabac_fns.h b/libavcodec/rpi_hevc_cabac_fns.h\nnew file mode 100644\nindex 0000000000..ca191f00d9\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_cabac_fns.h\n@@ -0,0 +1,217 @@\n+/*\n+ * HEVC CABAC decoding\n+ *\n+ * Copyright (C) 2012 - 2013 Guillaume Martres\n+ * Copyright (C) 2012 - 2013 Gildas Cocherel\n+ * Copyright (C) 2012 - 2013 Gildas Cocherel\n+ * Copyright (C) 2018 John Cox\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+\n+#ifndef AVCODEC_RPI_HEVC_CABAC_FNS_H\n+#define AVCODEC_RPI_HEVC_CABAC_FNS_H\n+\n+#include \"config.h\"\n+#include \"rpi_hevcdec.h\"\n+\n+void ff_hevc_rpi_save_states(HEVCRpiContext *s, const HEVCRpiLocalContext * const lc);\n+int ff_hevc_rpi_cabac_init_decoder(HEVCRpiLocalContext * const lc);\n+void ff_hevc_rpi_cabac_init(const HEVCRpiContext * const s, HEVCRpiLocalContext *const lc, const unsigned int ctb_flags);\n+int ff_hevc_rpi_sao_type_idx_decode(HEVCRpiLocalContext * const lc);\n+int ff_hevc_rpi_sao_band_position_decode(HEVCRpiLocalContext * const lc);\n+int ff_hevc_rpi_sao_offset_abs_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc);\n+int ff_hevc_rpi_sao_offset_sign_decode(HEVCRpiLocalContext * const lc);\n+int ff_hevc_rpi_sao_eo_class_decode(HEVCRpiLocalContext * const lc);\n+int ff_hevc_rpi_part_mode_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, const int log2_cb_size);\n+int ff_hevc_rpi_mpm_idx_decode(HEVCRpiLocalContext * const lc);\n+int ff_hevc_rpi_rem_intra_luma_pred_mode_decode(HEVCRpiLocalContext * const lc);\n+int ff_hevc_rpi_intra_chroma_pred_mode_decode(HEVCRpiLocalContext * const lc);\n+int ff_hevc_rpi_merge_idx_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc);\n+int ff_hevc_rpi_inter_pred_idc_decode(HEVCRpiLocalContext * const lc, int nPbW, int nPbH);\n+int ff_hevc_rpi_ref_idx_lx_decode(HEVCRpiLocalContext * const lc, const int num_ref_idx_lx);\n+int ff_hevc_rpi_log2_res_scale_abs(HEVCRpiLocalContext * const lc, const int idx);\n+\n+//int ff_hevc_rpi_cu_qp_delta_sign_flag(HEVCRpiLocalContext * const lc);\n+int ff_hevc_rpi_cu_qp_delta(HEVCRpiLocalContext * const lc);\n+int ff_hevc_rpi_cu_chroma_qp_offset_idx(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc);\n+void ff_hevc_rpi_hls_residual_coding(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+                                const int x0, const int y0,\n+                                const int log2_trafo_size, const enum ScanType scan_idx,\n+                                const int c_idx);\n+\n+MvXY ff_hevc_rpi_hls_mvd_coding(HEVCRpiLocalContext * const lc);\n+int ff_hevc_rpi_cabac_overflow(const HEVCRpiLocalContext * const lc);\n+\n+#define HEVC_BIN_SAO_MERGE_FLAG                         0\n+#define HEVC_BIN_SAO_TYPE_IDX                           1\n+#define HEVC_BIN_SAO_EO_CLASS                           2\n+#define HEVC_BIN_SAO_BAND_POSITION                      2\n+#define HEVC_BIN_SAO_OFFSET_ABS                         2\n+#define HEVC_BIN_SAO_OFFSET_SIGN                        2\n+#define HEVC_BIN_END_OF_SLICE_FLAG                      2\n+#define HEVC_BIN_SPLIT_CODING_UNIT_FLAG                 2\n+#define HEVC_BIN_CU_TRANSQUANT_BYPASS_FLAG              5\n+#define HEVC_BIN_SKIP_FLAG                              6\n+#define HEVC_BIN_CU_QP_DELTA                            9\n+#define HEVC_BIN_PRED_MODE                              12\n+#define HEVC_BIN_PART_MODE                              13\n+#define HEVC_BIN_PCM_FLAG                               17\n+#define HEVC_BIN_PREV_INTRA_LUMA_PRED_MODE              17\n+#define HEVC_BIN_MPM_IDX                                18\n+#define HEVC_BIN_REM_INTRA_LUMA_PRED_MODE               18\n+#define HEVC_BIN_INTRA_CHROMA_PRED_MODE                 18\n+#define HEVC_BIN_MERGE_FLAG                             20\n+#define HEVC_BIN_MERGE_IDX                              21\n+#define HEVC_BIN_INTER_PRED_IDC                         22\n+#define HEVC_BIN_REF_IDX_L0                             27\n+#define HEVC_BIN_REF_IDX_L1                             29\n+#define HEVC_BIN_ABS_MVD_GREATER0_FLAG                  31\n+#define HEVC_BIN_ABS_MVD_GREATER1_FLAG                  33\n+#define HEVC_BIN_ABS_MVD_MINUS2                         35\n+#define HEVC_BIN_MVD_SIGN_FLAG                          35\n+#define HEVC_BIN_MVP_LX_FLAG                            35\n+#define HEVC_BIN_NO_RESIDUAL_DATA_FLAG                  36\n+#define HEVC_BIN_SPLIT_TRANSFORM_FLAG                   37\n+#define HEVC_BIN_CBF_LUMA                               40\n+#define HEVC_BIN_CBF_CB_CR                              42\n+#define HEVC_BIN_TRANSFORM_SKIP_FLAG                    46\n+#define HEVC_BIN_EXPLICIT_RDPCM_FLAG                    48\n+#define HEVC_BIN_EXPLICIT_RDPCM_DIR_FLAG                50\n+#define HEVC_BIN_LAST_SIGNIFICANT_COEFF_X_PREFIX        52\n+#define HEVC_BIN_LAST_SIGNIFICANT_COEFF_Y_PREFIX        70\n+#define HEVC_BIN_LAST_SIGNIFICANT_COEFF_X_SUFFIX        88\n+#define HEVC_BIN_LAST_SIGNIFICANT_COEFF_Y_SUFFIX        88\n+#define HEVC_BIN_SIGNIFICANT_COEFF_GROUP_FLAG           88\n+#define HEVC_BIN_SIGNIFICANT_COEFF_FLAG                 92\n+#define HEVC_BIN_COEFF_ABS_LEVEL_GREATER1_FLAG          136\n+#define HEVC_BIN_COEFF_ABS_LEVEL_GREATER2_FLAG          160\n+#define HEVC_BIN_COEFF_ABS_LEVEL_REMAINING              166\n+#define HEVC_BIN_COEFF_SIGN_FLAG                        166\n+#define HEVC_BIN_LOG2_RES_SCALE_ABS                     166\n+#define HEVC_BIN_RES_SCALE_SIGN_FLAG                    174\n+#define HEVC_BIN_CU_CHROMA_QP_OFFSET_FLAG               176\n+#define HEVC_BIN_CU_CHROMA_QP_OFFSET_IDX                177\n+\n+\n+int ff_hevc_rpi_get_cabac(CABACContext * const c, uint8_t * const state);\n+int ff_hevc_rpi_get_cabac_terminate(CABACContext * const c);\n+\n+static inline const uint8_t* ff_hevc_rpi_cabac_skip_bytes(CABACContext * const c, int n) {\n+    const uint8_t *ptr = c->bytestream;\n+\n+    if (c->low & 0x1)\n+        ptr--;\n+#if CABAC_BITS == 16\n+    if (c->low & 0x1FF)\n+        ptr--;\n+#endif\n+    if ((int) (c->bytestream_end - ptr) < n)\n+        return NULL;\n+    if (ff_init_cabac_decoder(c, ptr + n, c->bytestream_end - ptr - n) < 0)\n+        return NULL;\n+\n+    return ptr;\n+}\n+\n+static inline int ff_hevc_rpi_sao_merge_flag_decode(HEVCRpiLocalContext * const lc)\n+{\n+    return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_SAO_MERGE_FLAG);\n+}\n+\n+static inline int ff_hevc_rpi_cu_transquant_bypass_flag_decode(HEVCRpiLocalContext * const lc)\n+{\n+    return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_CU_TRANSQUANT_BYPASS_FLAG);\n+}\n+\n+static inline int ff_hevc_rpi_cu_chroma_qp_offset_flag(HEVCRpiLocalContext * const lc)\n+{\n+    return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_CU_CHROMA_QP_OFFSET_FLAG);\n+}\n+\n+static inline int ff_hevc_rpi_split_coding_unit_flag_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+                                                            const unsigned int ct_depth,\n+                                                            const unsigned int x0, const unsigned int y0)\n+{\n+    return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_SPLIT_CODING_UNIT_FLAG +\n+                                 ((s->cabac_stash_left[y0 >> 3] >> 1) > ct_depth) +\n+                                 ((s->cabac_stash_up[x0 >> 3] >> 1) > ct_depth));\n+}\n+\n+static inline int ff_hevc_rpi_skip_flag_decode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+                             const int x0, const int y0, const int x_cb, const int y_cb)\n+{\n+    return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_SKIP_FLAG +\n+                                 (s->cabac_stash_left[y0 >> 3] & 1) +\n+                                 (s->cabac_stash_up[x0 >> 3] & 1));\n+}\n+\n+static inline int ff_hevc_rpi_pred_mode_decode(HEVCRpiLocalContext * const lc)\n+{\n+    return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_PRED_MODE);\n+}\n+\n+static inline int ff_hevc_rpi_pcm_flag_decode(HEVCRpiLocalContext * const lc)\n+{\n+    return ff_hevc_rpi_get_cabac_terminate(&lc->cc);\n+}\n+\n+static inline int ff_hevc_rpi_prev_intra_luma_pred_flag_decode(HEVCRpiLocalContext * const lc)\n+{\n+    return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_PREV_INTRA_LUMA_PRED_MODE);\n+}\n+\n+static inline int ff_hevc_rpi_merge_flag_decode(HEVCRpiLocalContext * const lc)\n+{\n+    return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_MERGE_FLAG);\n+}\n+\n+static inline int ff_hevc_rpi_mvp_lx_flag_decode(HEVCRpiLocalContext * const lc)\n+{\n+    return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_MVP_LX_FLAG);\n+}\n+\n+static inline int ff_hevc_rpi_no_residual_syntax_flag_decode(HEVCRpiLocalContext * const lc)\n+{\n+    return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_NO_RESIDUAL_DATA_FLAG);\n+}\n+\n+static inline int ff_hevc_rpi_cbf_cb_cr_decode(HEVCRpiLocalContext * const lc, const int trafo_depth)\n+{\n+    return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_CBF_CB_CR + trafo_depth);\n+}\n+\n+static inline int ff_hevc_rpi_cbf_luma_decode(HEVCRpiLocalContext * const lc, const int trafo_depth)\n+{\n+    return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_CBF_LUMA + !trafo_depth);\n+}\n+\n+static inline int ff_hevc_rpi_split_transform_flag_decode(HEVCRpiLocalContext * const lc, const int log2_trafo_size)\n+{\n+    return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_SPLIT_TRANSFORM_FLAG + 5 - log2_trafo_size);\n+}\n+\n+static inline int ff_hevc_rpi_res_scale_sign_flag(HEVCRpiLocalContext *const lc, const int idx)\n+{\n+    return ff_hevc_rpi_get_cabac(&lc->cc, lc->cabac_state + HEVC_BIN_RES_SCALE_SIGN_FLAG + idx);\n+}\n+\n+\n+\n+#endif\n+\ndiff --git a/libavcodec/rpi_hevc_data.c b/libavcodec/rpi_hevc_data.c\nnew file mode 100644\nindex 0000000000..341bb77d9d\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_data.c\n@@ -0,0 +1,75 @@\n+/*\n+ * HEVC shared tables\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include <stdint.h>\n+\n+#include \"rpi_hevc_data.h\"\n+\n+const uint8_t ff_hevc_rpi_diag_scan4x4_x[16] = {\n+    0, 0, 1, 0,\n+    1, 2, 0, 1,\n+    2, 3, 1, 2,\n+    3, 2, 3, 3,\n+};\n+\n+const uint8_t ff_hevc_rpi_diag_scan4x4_y[16] = {\n+    0, 1, 0, 2,\n+    1, 0, 3, 2,\n+    1, 0, 3, 2,\n+    1, 3, 2, 3,\n+};\n+\n+const uint8_t ff_hevc_rpi_diag_scan8x8_x[64] = {\n+    0, 0, 1, 0,\n+    1, 2, 0, 1,\n+    2, 3, 0, 1,\n+    2, 3, 4, 0,\n+    1, 2, 3, 4,\n+    5, 0, 1, 2,\n+    3, 4, 5, 6,\n+    0, 1, 2, 3,\n+    4, 5, 6, 7,\n+    1, 2, 3, 4,\n+    5, 6, 7, 2,\n+    3, 4, 5, 6,\n+    7, 3, 4, 5,\n+    6, 7, 4, 5,\n+    6, 7, 5, 6,\n+    7, 6, 7, 7,\n+};\n+\n+const uint8_t ff_hevc_rpi_diag_scan8x8_y[64] = {\n+    0, 1, 0, 2,\n+    1, 0, 3, 2,\n+    1, 0, 4, 3,\n+    2, 1, 0, 5,\n+    4, 3, 2, 1,\n+    0, 6, 5, 4,\n+    3, 2, 1, 0,\n+    7, 6, 5, 4,\n+    3, 2, 1, 0,\n+    7, 6, 5, 4,\n+    3, 2, 1, 7,\n+    6, 5, 4, 3,\n+    2, 7, 6, 5,\n+    4, 3, 7, 6,\n+    5, 4, 7, 6,\n+    5, 7, 6, 7,\n+};\ndiff --git a/libavcodec/rpi_hevc_data.h b/libavcodec/rpi_hevc_data.h\nnew file mode 100644\nindex 0000000000..0aee673d8b\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_data.h\n@@ -0,0 +1,31 @@\n+/*\n+ * HEVC shared data tables\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#ifndef AVCODEC_RPI_HEVC_DATA_H\n+#define AVCODEC_RPI_HEVC_DATA_H\n+\n+#include <stdint.h>\n+\n+extern const uint8_t ff_hevc_rpi_diag_scan4x4_x[16];\n+extern const uint8_t ff_hevc_rpi_diag_scan4x4_y[16];\n+extern const uint8_t ff_hevc_rpi_diag_scan8x8_x[64];\n+extern const uint8_t ff_hevc_rpi_diag_scan8x8_y[64];\n+\n+#endif /* AVCODEC_RPI_HEVC_DATA_H */\ndiff --git a/libavcodec/rpi_hevc_filter.c b/libavcodec/rpi_hevc_filter.c\nnew file mode 100644\nindex 0000000000..5125d1eb6b\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_filter.c\n@@ -0,0 +1,1210 @@\n+/*\n+ * HEVC video decoder\n+ *\n+ * Originally by:\n+ * Copyright (C) 2012 - 2013 Guillaume Martres\n+ * Copyright (C) 2013 Seppo Tomperi\n+ * Copyright (C) 2013 Wassim Hamidouche\n+ *\n+ * Substantially rewritten:\n+ * Copyright (C) 2018 John Cox, Ben Avison for Raspberry Pi (Trading)\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+//#define DISABLE_SAO\n+//#define DISABLE_DEBLOCK\n+//#define DISABLE_STRENGTHS\n+// define DISABLE_DEBLOCK_NONREF for a 6% speed boost (by skipping deblocking on unimportant frames)\n+//#define DISABLE_DEBLOCK_NONREF\n+\n+#include \"libavutil/common.h\"\n+#include \"libavutil/internal.h\"\n+\n+#include \"rpi_hevcdec.h\"\n+\n+#include \"bit_depth_template.c\"\n+\n+#include \"rpi_qpu.h\"\n+#include \"rpi_zc.h\"\n+#include \"libavutil/rpi_sand_fns.h\"\n+\n+#define LUMA 0\n+#define CB 1\n+#define CR 2\n+\n+// tcoffset: -12,12; qp: 0,51; (bs-1)*2: 0,2\n+// so -12,75 overall\n+static const uint8_t tctablex[] = {\n+    0, 0, 0, 0, 0, 0, 0,  0,  0,  0,  0,  0,  // -ve quant padding\n+    0, 0, 0, 0, 0, 0, 0,  0,  0,  0,  0,  0,\n+    0, 0, 0, 0, 0, 0, 0,  0,  0,  0,  0,  0,\n+    0, 0, 0, 0, 0, 0, 0,  0,  0,  0,  0,  0,\n+\n+    0, 0, 0, 0, 0, 0, 0,  0,  0,  0,  0,  0,                          // -12..-1\n+    0, 0, 0, 0, 0, 0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 0, 0, 1, // QP  0...18\n+    1, 1, 1, 1, 1, 1, 1,  1,  2,  2,  2,  2,  3,  3,  3,  3, 4, 4, 4, // QP 19...37\n+    5, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14, 16, 18, 20, 22, 24,          // QP 38...53\n+    24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24                    // 54..75\n+};\n+#define tctable (tctablex + 12 + 6*8)\n+\n+static const uint8_t betatablex[] = {\n+    0, 0, 0, 0, 0, 0, 0,  0,  0,  0,  0,  0,  // -ve quant padding\n+    0, 0, 0, 0, 0, 0, 0,  0,  0,  0,  0,  0,\n+    0, 0, 0, 0, 0, 0, 0,  0,  0,  0,  0,  0,\n+    0, 0, 0, 0, 0, 0, 0,  0,  0,  0,  0,  0,\n+\n+    0, 0, 0, 0, 0, 0, 0,  0,  0,  0,  0,  0,                          // -12..-1\n+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  7,  8, // QP 0...18\n+     9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, // QP 19...37\n+    38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64,                      // QP 38...51\n+    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64                    // 52..73\n+};\n+#define betatable (betatablex + 12 + 6*8)\n+\n+static inline int chroma_tc(const HEVCRpiContext * const s, const int qp_y,\n+                            const int c_idx, const int tc_offset)\n+{\n+    return tctable[(int)s->ps.pps->qp_dblk_x[c_idx][qp_y] + tc_offset + 2];\n+}\n+\n+static inline int get_qPy_pred(const HEVCRpiContext * const s, const HEVCRpiLocalContext * const lc,\n+                               const unsigned int xBase, const unsigned int yBase)\n+{\n+    const unsigned int ctb_size_mask        = (1 << s->ps.sps->log2_ctb_size) - 1;\n+    const unsigned int MinCuQpDeltaSizeMask = ~0U << s->ps.pps->log2_min_cu_qp_delta_size;\n+    const unsigned int xQgBase              = xBase & MinCuQpDeltaSizeMask;\n+    const unsigned int yQgBase              = yBase & MinCuQpDeltaSizeMask;\n+    const unsigned int min_cb_width         = s->ps.sps->min_cb_width;\n+    const unsigned int x_cb                 = xQgBase >> s->ps.sps->log2_min_cb_size;\n+    const unsigned int y_cb                 = yQgBase >> s->ps.sps->log2_min_cb_size;\n+    const int qPy_pred = lc->qPy_pred;\n+\n+    return (((xQgBase & ctb_size_mask) == 0 ? qPy_pred :\n+             s->qp_y_tab[(x_cb - 1) + y_cb * min_cb_width]) +\n+            ((yQgBase & ctb_size_mask) == 0 ? qPy_pred :\n+             s->qp_y_tab[x_cb + (y_cb - 1) * min_cb_width]) + 1) >> 1;\n+}\n+\n+// * Only called from bitstream decode in foreground\n+//   so should be safe\n+void ff_hevc_rpi_set_qPy(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, int xBase, int yBase)\n+{\n+    const int qp_y = get_qPy_pred(s, lc, xBase, yBase);\n+\n+    if (lc->tu.cu_qp_delta != 0) {\n+        // ?? I suspect that the -bd_offset here leads to us adding it elsewhere\n+        int off = s->ps.sps->qp_bd_offset;\n+        lc->qp_y = FFUMOD(qp_y + lc->tu.cu_qp_delta + 52 + 2 * off,\n+                                 52 + off) - off;\n+    } else\n+        lc->qp_y = qp_y;\n+}\n+\n+static inline unsigned int pixel_shift(const HEVCRpiContext * const s, const unsigned int c_idx)\n+{\n+    return c_idx != 0 ? 1 + s->ps.sps->pixel_shift : s->ps.sps->pixel_shift;\n+}\n+\n+// \"DSP\" these?\n+static void copy_pixel(uint8_t *dst, const uint8_t *src, int pixel_shift)\n+{\n+    switch (pixel_shift)\n+    {\n+        case 2:\n+            *(uint32_t *)dst = *(uint32_t *)src;\n+            break;\n+        case 1:\n+            *(uint16_t *)dst = *(uint16_t *)src;\n+            break;\n+        default:\n+            *dst = *src;\n+            break;\n+    }\n+}\n+\n+static void copy_CTB_to_hv(const HEVCRpiContext * const s, const uint8_t * const src,\n+                           ptrdiff_t stride_src, int x, int y, int width, int height,\n+                           int c_idx, int x_ctb, int y_ctb)\n+{\n+    const unsigned int sh = pixel_shift(s, c_idx);\n+    const unsigned int w = s->ps.sps->width >> ctx_hshift(s, c_idx);\n+    const unsigned int h = s->ps.sps->height >> ctx_vshift(s, c_idx);\n+\n+    /* copy horizontal edges */\n+    memcpy(s->sao_pixel_buffer_h[c_idx] + (((2 * y_ctb) * w + x) << sh),\n+        src, width << sh);\n+    memcpy(s->sao_pixel_buffer_h[c_idx] + (((2 * y_ctb + 1) * w + x) << sh),\n+        src + stride_src * (height - 1), width << sh);\n+\n+    /* copy vertical edges */\n+    ff_hevc_rpi_copy_vert(s->sao_pixel_buffer_v[c_idx] + (((2 * x_ctb) * h + y) << sh), src, sh, height, 1 << sh, stride_src);\n+\n+    ff_hevc_rpi_copy_vert(s->sao_pixel_buffer_v[c_idx] + (((2 * x_ctb + 1) * h + y) << sh), src + ((width - 1) << sh), sh, height, 1 << sh, stride_src);\n+}\n+\n+// N.B. Src & dst are swapped as this is a restore!\n+// x0 & y0 are in luma coords\n+// Width & height are in Y/C pels as appropriate\n+// * Clear scope for optimsation here but not used enough to be worth it\n+static void restore_tqb_pixels(const HEVCRpiContext * const s,\n+                               uint8_t *src1, const uint8_t *dst1,\n+                               const ptrdiff_t stride_src, const ptrdiff_t stride_dst,\n+                               const unsigned int x0, const unsigned int y0,\n+                               const unsigned int width, const int height,\n+                               const int c_idx)\n+{\n+    if (s->ps.pps->transquant_bypass_enable_flag ||\n+        s->ps.sps->pcm.loop_filter_disable_flag)\n+    {\n+        const uint8_t *pcm = s->is_pcm + (x0 >> 6) + (y0 >> 3) * s->ps.sps->pcm_width;\n+        int blks_y = height >> (c_idx == 0 ? 3 : 2);\n+        const unsigned int bwidth = 8 << s->ps.sps->pixel_shift;  // Y & C have the same width in sand\n+        const unsigned int bheight = (c_idx == 0) ? 8 : 4;\n+        const unsigned int sh = ((x0 >> 3) & 7);\n+        const unsigned int mask = (1 << (width >> (c_idx == 0 ? 3 : 2))) - 1;\n+\n+        do {\n+            unsigned int m = (*pcm >> sh) & mask;\n+            uint8_t * bd = src1;\n+            const uint8_t * bs = dst1;\n+            while (m != 0) {\n+                if ((m & 1) != 0) {\n+                    s->hevcdsp.cpy_blk(bd, stride_src, bs, stride_dst, bwidth, bheight);\n+                }\n+                m >>= 1;\n+                bs += bwidth;\n+                bd += bwidth;\n+            }\n+            src1 += stride_src * bheight;\n+            dst1 += stride_dst * bheight;\n+            pcm += s->ps.sps->pcm_width;\n+        } while (--blks_y > 0);\n+    }\n+}\n+\n+#define CTB(tab, x, y) ((tab)[(y) * s->ps.sps->ctb_width + (x)])\n+\n+static void sao_filter_CTB(const HEVCRpiContext * const s, const int x, const int y)\n+{\n+#if SAO_FILTER_N == 5\n+    static const uint8_t sao_tab[8] = { 0 /* 8 */, 1 /* 16 */, 2 /* 24 */, 2 /* 32 */, 3, 3 /* 48 */, 4, 4 /* 64 */};\n+#elif SAO_FILTER_N == 6\n+    static const uint8_t sao_tab[8] = { 0 /* 8 */, 1 /* 16 */, 5 /* 24 */, 2 /* 32 */, 3, 3 /* 48 */, 4, 4 /* 64 */};\n+#else\n+#error Confused by size of sao fn array\n+#endif\n+    int c_idx;\n+    int edges[4];  // 0 left 1 top 2 right 3 bottom\n+    int x_ctb                = x >> s->ps.sps->log2_ctb_size;\n+    int y_ctb                = y >> s->ps.sps->log2_ctb_size;\n+    int ctb_addr_rs          = y_ctb * s->ps.sps->ctb_width + x_ctb;\n+    int ctb_addr_ts          = s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs];\n+    RpiSAOParams *sao           = &CTB(s->sao, x_ctb, y_ctb);\n+    // flags indicating unfilterable edges\n+    uint8_t vert_edge[]      = { 0, 0 };\n+    uint8_t horiz_edge[]     = { 0, 0 };\n+    uint8_t diag_edge[]      = { 0, 0, 0, 0 };\n+    uint8_t lfase            = CTB(s->filter_slice_edges, x_ctb, y_ctb);\n+    uint8_t no_tile_filter   = s->ps.pps->tiles_enabled_flag &&\n+                               !s->ps.pps->loop_filter_across_tiles_enabled_flag;\n+    uint8_t restore          = no_tile_filter || !lfase;\n+    uint8_t left_tile_edge   = 0;\n+    uint8_t right_tile_edge  = 0;\n+    uint8_t up_tile_edge     = 0;\n+    uint8_t bottom_tile_edge = 0;\n+    const int sliced = 1;\n+    const int plane_count = sliced ? 2 : (ctx_cfmt(s) != 0 ? 3 : 1);\n+\n+    edges[0]   = x_ctb == 0;\n+    edges[1]   = y_ctb == 0;\n+    edges[2]   = x_ctb == s->ps.sps->ctb_width  - 1;\n+    edges[3]   = y_ctb == s->ps.sps->ctb_height - 1;\n+\n+#ifdef DISABLE_SAO\n+    return;\n+#endif\n+\n+    if (restore) {\n+        if (!edges[0]) {\n+            left_tile_edge  = no_tile_filter && s->ps.pps->tile_id[ctb_addr_ts] != s->ps.pps->tile_id[s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs-1]];\n+            vert_edge[0]    = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb - 1, y_ctb)) || left_tile_edge;\n+        }\n+        if (!edges[2]) {\n+            right_tile_edge = no_tile_filter && s->ps.pps->tile_id[ctb_addr_ts] != s->ps.pps->tile_id[s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs+1]];\n+            vert_edge[1]    = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb + 1, y_ctb)) || right_tile_edge;\n+        }\n+        if (!edges[1]) {\n+            up_tile_edge     = no_tile_filter && s->ps.pps->tile_id[ctb_addr_ts] != s->ps.pps->tile_id[s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs - s->ps.sps->ctb_width]];\n+            horiz_edge[0]    = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb, y_ctb - 1)) || up_tile_edge;\n+        }\n+        if (!edges[3]) {\n+            bottom_tile_edge = no_tile_filter && s->ps.pps->tile_id[ctb_addr_ts] != s->ps.pps->tile_id[s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs + s->ps.sps->ctb_width]];\n+            horiz_edge[1]    = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb, y_ctb + 1)) || bottom_tile_edge;\n+        }\n+        if (!edges[0] && !edges[1]) {\n+            diag_edge[0] = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb - 1, y_ctb - 1)) || left_tile_edge || up_tile_edge;\n+        }\n+        if (!edges[1] && !edges[2]) {\n+            diag_edge[1] = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb + 1, y_ctb - 1)) || right_tile_edge || up_tile_edge;\n+        }\n+        if (!edges[2] && !edges[3]) {\n+            diag_edge[2] = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb + 1, y_ctb + 1)) || right_tile_edge || bottom_tile_edge;\n+        }\n+        if (!edges[0] && !edges[3]) {\n+            diag_edge[3] = (!lfase && CTB(s->tab_slice_address, x_ctb, y_ctb) != CTB(s->tab_slice_address, x_ctb - 1, y_ctb + 1)) || left_tile_edge || bottom_tile_edge;\n+        }\n+    }\n+\n+    for (c_idx = 0; c_idx < plane_count; c_idx++) {\n+        const unsigned int vshift = ctx_vshift(s, c_idx);\n+        const unsigned int hshift = ctx_hshift(s, c_idx);\n+        const int x0 = x >> hshift;\n+        const int y0 = y >> vshift;\n+        const ptrdiff_t stride_src = frame_stride1(s->frame, c_idx);\n+        const int ctb_size_h = (1 << (s->ps.sps->log2_ctb_size)) >> hshift;\n+        const int ctb_size_v = (1 << (s->ps.sps->log2_ctb_size)) >> vshift;\n+        const int width    = FFMIN(ctb_size_h, (s->ps.sps->width  >> hshift) - x0);\n+        const int height = FFMIN(ctb_size_v, (s->ps.sps->height >> vshift) - y0);\n+        int tab      = sao_tab[(FFALIGN(width, 8) >> 3) - 1];\n+        ptrdiff_t stride_dst;\n+        uint8_t *dst;\n+\n+        const unsigned int sh = s->ps.sps->pixel_shift + (sliced && c_idx != 0);\n+        const int wants_lr = sao->type_idx[c_idx] == SAO_EDGE && sao->eo_class[c_idx] != 1 /* Vertical */;\n+        uint8_t * const src = !sliced ?\n+                &s->frame->data[c_idx][y0 * stride_src + (x0 << sh)] :\n+            c_idx == 0 ?\n+                av_rpi_sand_frame_pos_y(s->frame, x0, y0) :\n+                av_rpi_sand_frame_pos_c(s->frame, x0, y0);\n+        const uint8_t * const src_l = edges[0] || !wants_lr ? NULL :\n+            !sliced ? src - (1 << sh) :\n+            c_idx == 0 ?\n+                av_rpi_sand_frame_pos_y(s->frame, x0 - 1, y0) :\n+                av_rpi_sand_frame_pos_c(s->frame, x0 - 1, y0);\n+        const uint8_t * const src_r = edges[2] || !wants_lr ? NULL :\n+            !sliced ? src + (width << sh) :\n+            c_idx == 0 ?\n+                av_rpi_sand_frame_pos_y(s->frame, x0 + width, y0) :\n+                av_rpi_sand_frame_pos_c(s->frame, x0 + width, y0);\n+\n+        if (sliced && c_idx > 1) {\n+            break;\n+        }\n+\n+//        if (c_idx == 1)\n+//            printf(\"%d: %dx%d %d,%d: lr=%d\\n\", c_idx, width, height, x0, y0, wants_lr);\n+\n+        switch (sao->type_idx[c_idx]) {\n+        case SAO_BAND:\n+            copy_CTB_to_hv(s, src, stride_src, x0, y0, width, height, c_idx,\n+                           x_ctb, y_ctb);\n+            if (s->ps.pps->transquant_bypass_enable_flag ||\n+                s->ps.sps->pcm.loop_filter_disable_flag)\n+            {\n+                // Can't use the edge buffer here as it may be in use by the foreground\n+                DECLARE_ALIGNED(64, uint8_t, dstbuf)\n+                    [2*MAX_PB_SIZE*MAX_PB_SIZE];\n+                dst = dstbuf;\n+                stride_dst = 2*MAX_PB_SIZE;\n+                s->hevcdsp.cpy_blk(dst, stride_dst, src, stride_src, width << sh, height);\n+                if (sliced && c_idx != 0)\n+                {\n+                    s->hevcdsp.sao_band_filter_c[tab](src, dst, stride_src, stride_dst,\n+                                                    sao->offset_val[1], sao->band_position[1],\n+                                                    sao->offset_val[2], sao->band_position[2],\n+                                                    width, height);\n+                }\n+                else\n+                {\n+                    s->hevcdsp.sao_band_filter[tab](src, dst, stride_src, stride_dst,\n+                                                    sao->offset_val[c_idx], sao->band_position[c_idx],\n+                                                    width, height);\n+                }\n+                restore_tqb_pixels(s, src, dst, stride_src, stride_dst,\n+                                   x, y, width, height, c_idx);\n+            } else {\n+                if (sliced && c_idx != 0)\n+                {\n+                    s->hevcdsp.sao_band_filter_c[tab](src, src, stride_src, stride_src,\n+                                                    sao->offset_val[1], sao->band_position[1],\n+                                                    sao->offset_val[2], sao->band_position[2],\n+                                                    width, height);\n+                }\n+                else\n+                {\n+                    s->hevcdsp.sao_band_filter[tab](src, src, stride_src, stride_src,\n+                                                    sao->offset_val[c_idx], sao->band_position[c_idx],\n+                                                    width, height);\n+                }\n+            }\n+            sao->type_idx[c_idx] = SAO_APPLIED;\n+            break;\n+        case SAO_EDGE:\n+        {\n+            const int w = s->ps.sps->width >> hshift;\n+            const int h = s->ps.sps->height >> vshift;\n+            int top_edge = edges[1];\n+            int bottom_edge = edges[3];\n+            // Can't use the edge buffer here as it may be in use by the foreground\n+            DECLARE_ALIGNED(64, uint8_t, dstbuf)\n+                [RPI_HEVC_SAO_BUF_STRIDE * (MAX_PB_SIZE + 2) + 64];\n+\n+            stride_dst = RPI_HEVC_SAO_BUF_STRIDE;\n+            dst = dstbuf + stride_dst + 32;\n+\n+            if (!top_edge) {\n+                uint8_t *dst1;\n+                int src_idx;\n+                const uint8_t * const src_spb = s->sao_pixel_buffer_h[c_idx] + (((2 * y_ctb - 1) * w + x0) << sh);\n+\n+                dst1 = dst - stride_dst;\n+\n+                if (src_l != NULL) {\n+                    src_idx = (CTB(s->sao, x_ctb-1, y_ctb-1).type_idx[c_idx] ==\n+                               SAO_APPLIED);\n+                    copy_pixel(dst1 - (1 << sh), src_idx ? src_spb - (1 << sh) : src_l - stride_src, sh);\n+                }\n+\n+                src_idx = (CTB(s->sao, x_ctb, y_ctb-1).type_idx[c_idx] ==\n+                           SAO_APPLIED);\n+                memcpy(dst1, src_idx ? src_spb : src - stride_src, width << sh);\n+\n+                if (src_r != NULL) {\n+                    src_idx = (CTB(s->sao, x_ctb+1, y_ctb-1).type_idx[c_idx] ==\n+                               SAO_APPLIED);\n+                    copy_pixel(dst1 + (width << sh), src_idx ? src_spb + (width << sh) : src_r - stride_src, sh);\n+                }\n+            }\n+            if (!bottom_edge) {\n+                uint8_t * const dst1 = dst + height * stride_dst;\n+                int src_idx;\n+                const uint8_t * const src_spb = s->sao_pixel_buffer_h[c_idx] + (((2 * y_ctb + 2) * w + x0) << sh);\n+                const unsigned int hoff = height * stride_src;\n+\n+                if (src_l != NULL) {\n+                    src_idx = (CTB(s->sao, x_ctb-1, y_ctb+1).type_idx[c_idx] ==\n+                               SAO_APPLIED);\n+                    copy_pixel(dst1 - (1 << sh), src_idx ? src_spb - (1 << sh) : src_l + hoff, sh);\n+                }\n+\n+                src_idx = (CTB(s->sao, x_ctb, y_ctb+1).type_idx[c_idx] ==\n+                           SAO_APPLIED);\n+                memcpy(dst1, src_idx ? src_spb : src + hoff, width << sh);\n+\n+                if (src_r != NULL) {\n+                    src_idx = (CTB(s->sao, x_ctb+1, y_ctb+1).type_idx[c_idx] ==\n+                               SAO_APPLIED);\n+                    copy_pixel(dst1 + (width << sh), src_idx ? src_spb + (width << sh) : src_r + hoff, sh);\n+                }\n+            }\n+            if (src_l != NULL) {\n+                if (CTB(s->sao, x_ctb-1, y_ctb).type_idx[c_idx] == SAO_APPLIED) {\n+                    ff_hevc_rpi_copy_vert(dst - (1 << sh),\n+                              s->sao_pixel_buffer_v[c_idx] + (((2 * x_ctb - 1) * h + y0) << sh),\n+                              sh, height, stride_dst, 1 << sh);\n+                } else {\n+                    ff_hevc_rpi_copy_vert(dst - (1 << sh),\n+                              src_l,\n+                              sh, height, stride_dst, stride_src);\n+                }\n+            }\n+            if (src_r != NULL) {\n+                if (CTB(s->sao, x_ctb+1, y_ctb).type_idx[c_idx] == SAO_APPLIED) {\n+                    ff_hevc_rpi_copy_vert(dst + (width << sh),\n+                              s->sao_pixel_buffer_v[c_idx] + (((2 * x_ctb + 2) * h + y0) << sh),\n+                              sh, height, stride_dst, 1 << sh);\n+                } else {\n+                    ff_hevc_rpi_copy_vert(dst + (width << sh),\n+                              src_r,\n+                              sh, height, stride_dst, stride_src);\n+                }\n+            }\n+\n+            s->hevcdsp.cpy_blk(dst, stride_dst, src, stride_src, width << sh, height);\n+\n+            copy_CTB_to_hv(s, src, stride_src, x0, y0, width, height, c_idx,\n+                           x_ctb, y_ctb);\n+            if (sliced && c_idx != 0)\n+            {\n+                // Class always the same for both U & V (which is just as well :-))\n+                s->hevcdsp.sao_edge_filter_c[tab](src, dst, stride_src,\n+                                                sao->offset_val[1], sao->offset_val[2], sao->eo_class[1],\n+                                                width, height);\n+                s->hevcdsp.sao_edge_restore_c[restore](src, dst,\n+                                                    stride_src, stride_dst,\n+                                                    sao,\n+                                                    edges, width,\n+                                                    height, c_idx,\n+                                                    vert_edge,\n+                                                    horiz_edge,\n+                                                    diag_edge);\n+            }\n+            else\n+            {\n+                s->hevcdsp.sao_edge_filter[tab](src, dst, stride_src, sao->offset_val[c_idx],\n+                                                sao->eo_class[c_idx], width, height);\n+                s->hevcdsp.sao_edge_restore[restore](src, dst,\n+                                                    stride_src, stride_dst,\n+                                                    sao,\n+                                                    edges, width,\n+                                                    height, c_idx,\n+                                                    vert_edge,\n+                                                    horiz_edge,\n+                                                    diag_edge);\n+            }\n+            restore_tqb_pixels(s, src, dst, stride_src, stride_dst,\n+                               x, y, width, height, c_idx);\n+            sao->type_idx[c_idx] = SAO_APPLIED;\n+            break;\n+        }\n+        }\n+    }\n+\n+#if RPI_ZC_SAND_8_IN_10_BUF\n+    if (s->frame->format == AV_PIX_FMT_SAND64_10 && s->frame->buf[RPI_ZC_SAND_8_IN_10_BUF] != NULL &&\n+        (((x + (1 << (s->ps.sps->log2_ctb_size))) & 255) == 0 || edges[2]))\n+    {\n+        const unsigned int stride1 = frame_stride1(s->frame, 1);\n+        const unsigned int stride2 = av_rpi_sand_frame_stride2(s->frame);\n+        const unsigned int xoff = (x >> 8) * stride2 * stride1;\n+        const unsigned int ctb_size = (1 << s->ps.sps->log2_ctb_size);\n+        const uint8_t * const sy = s->frame->data[0] + xoff * 4 + y * stride1;\n+        uint8_t * const dy = s->frame->buf[4]->data + xoff * 2 + y * stride1;\n+        const uint8_t * const sc = s->frame->data[1] + xoff * 4 + (y >> 1) * stride1;\n+        uint8_t * const dc = s->frame->buf[4]->data + (s->frame->data[1] - s->frame->data[0]) + xoff * 2 + (y >> 1) * stride1;\n+        const unsigned int wy = !edges[2] ? 256 : s->ps.sps->width - (x & ~255);\n+        const unsigned int hy = !edges[3] ? ctb_size : s->ps.sps->height - y;\n+\n+//        printf(\"dy=%p/%p, stride1=%d, stride2=%d, sy=%p/%p, wy=%d, hy=%d, x=%d, y=%d, cs=%d\\n\", dy, dc, stride1, stride2, sy, sc, wy, hy, x, y, ctb_size);\n+        av_rpi_sand16_to_sand8(dy, stride1, stride2, sy, stride1, stride2, wy, hy, 3);\n+        av_rpi_sand16_to_sand8(dc, stride1, stride2, sc, stride1, stride2, wy, hy >> 1, 3);\n+    }\n+#endif\n+}\n+\n+// When bits are delivered to deblock we want them\n+//#define TL 1\n+//#define TR 2\n+//#define BL 4\n+//#define BR 8\n+\n+// pcm4 returns them as b0 = tl, b1 = tr, b16 = bl, b17 = br\n+// so we need to rearrange before passing on\n+\n+static inline uint32_t pcm4(const HEVCRpiContext * const s, const unsigned int x, const unsigned int y)\n+{\n+    const uint8_t * const pcm = s->is_pcm + (x >> 6) + (y >> 3) * s->ps.sps->pcm_width;\n+    return (pcm[0] |\n+        (pcm[1] << 8) |\n+        (pcm[s->ps.sps->pcm_width] << 16) |\n+        (pcm[s->ps.sps->pcm_width + 1] << 24)) >> ((x >> 3) & 7);\n+}\n+\n+static inline uint32_t pcm2(const HEVCRpiContext * const s, const unsigned int x, const unsigned int y)\n+{\n+    const uint8_t * const pcm = s->is_pcm + (x >> 6) + (y >> 3) * s->ps.sps->pcm_width;\n+    return (pcm[0] | (pcm[1] << 8)) >> ((x >> 3) & 7);\n+}\n+\n+// We cast away const here as we want this to work for both get and set\n+static inline uint32_t * bs_ptr32(const uint8_t * bs, const unsigned int stride2, const unsigned int x, const unsigned int y)\n+{\n+    return (uint32_t *)(bs +\n+#if (~3U & (HEVC_RPI_BS_STRIDE1_PEL_MASK >> HEVC_RPI_BS_PELS_PER_BYTE_SHIFT)) != 0\n+#warning Unexpected masks\n+        // As it happens we end up with stride1 = sizeof(uint32_t) so this expr vanishes\n+        ((x >> HEVC_RPI_BS_PELS_PER_BYTE_SHIFT) &\n+            (~3 & (HEVC_RPI_BS_STRIDE1_PEL_MASK >> HEVC_RPI_BS_PELS_PER_BYTE_SHIFT))) +\n+#elif HEVC_RPI_BS_STRIDE1_BYTES < 4\n+#error Stride1 < return size\n+#endif\n+        ((y >> HEVC_RPI_BS_Y_SHR) << HEVC_RPI_BS_STRIDE1_BYTE_SHIFT) +\n+        (x >> HEVC_RPI_BS_STRIDE1_PEL_SHIFT) * stride2);\n+}\n+\n+static inline uint8_t * bs_ptr8(const uint8_t * bs, const unsigned int stride2, const unsigned int x, const unsigned int y)\n+{\n+    return (uint8_t *)(bs +\n+        ((x >> HEVC_RPI_BS_PELS_PER_BYTE_SHIFT) &\n+            (HEVC_RPI_BS_STRIDE1_PEL_MASK >> HEVC_RPI_BS_PELS_PER_BYTE_SHIFT)) +\n+        ((y >> HEVC_RPI_BS_Y_SHR) << HEVC_RPI_BS_STRIDE1_BYTE_SHIFT) +\n+        (x >> HEVC_RPI_BS_STRIDE1_PEL_SHIFT) * stride2);\n+}\n+\n+\n+// Get block strength\n+// Given how we call we will always get within the 32bit boundries\n+static inline uint32_t bs_get32(const uint8_t * bs, unsigned int stride2,\n+                                unsigned int xl, unsigned int xr, const unsigned int y)\n+{\n+    if (xr <= xl) {\n+        return 0;\n+    }\n+    else\n+    {\n+#if HAVE_ARMV6T2_INLINE\n+#if (~3U & (HEVC_RPI_BS_STRIDE1_PEL_MASK >> HEVC_RPI_BS_PELS_PER_BYTE_SHIFT)) != 0\n+#error This case not yet handled in bs_get32\n+#elif HEVC_RPI_BS_STRIDE1_BYTES < 4\n+#error Stride1 < return size\n+#endif\n+        uint32_t tmp;\n+        __asm__ (\n+            \"lsr         %[tmp], %[xl], %[xl_shift]                  \\n\\t\"\n+            \"rsb         %[xr], %[xl], %[xr]                         \\n\\t\"\n+            \"mla         %[stride2], %[stride2], %[tmp], %[bs]       \\n\\t\"\n+            \"add         %[xr], %[xr], #7                            \\n\\t\"\n+            \"lsr         %[bs], %[y], %[y_shift1]                    \\n\\t\"\n+            \"bic         %[xr], %[xr], #7                            \\n\\t\"\n+            \"ubfx        %[xl], %[xl], #1, #5                        \\n\\t\"\n+            \"lsr         %[xr], %[xr], #1                            \\n\\t\"\n+            \"cmp         %[xr], #32                                  \\n\\t\"\n+            \"mvn         %[tmp], #0                                  \\n\\t\"\n+            \"ldr         %[bs], [%[stride2], %[bs], lsl %[y_shift2]] \\n\\t\"\n+            \"lsl         %[tmp], %[tmp], %[xr]                       \\n\\t\"\n+            \"lsr         %[xl], %[bs], %[xl]                         \\n\\t\"\n+            \"it ne                                                   \\n\\t\"\n+            \"bicne       %[bs], %[xl], %[tmp]                        \\n\\t\"\n+            :  // Outputs\n+                      [bs]\"+r\"(bs),\n+                 [stride2]\"+r\"(stride2),\n+                      [xl]\"+r\"(xl),\n+                      [xr]\"+r\"(xr),\n+                     [tmp]\"=&r\"(tmp)\n+            :  // Inputs\n+                       [y]\"r\"(y),\n+                [xl_shift]\"M\"(HEVC_RPI_BS_STRIDE1_PEL_SHIFT),\n+                [y_shift1]\"M\"(HEVC_RPI_BS_Y_SHR),\n+                [y_shift2]\"M\"(HEVC_RPI_BS_STRIDE1_BYTE_SHIFT)\n+            :  // Clobbers\n+                \"cc\"\n+        );\n+        return (uint32_t) bs;\n+#else\n+        const uint32_t a = *bs_ptr32(bs, stride2, xl, y);\n+        const unsigned int n = ((xr - xl + 7) & ~7) >> 1;\n+\n+        return n == 32 ? a :\n+            (a >> ((xl >> 1) & 31)) & ~(~0U << n);\n+#endif\n+    }\n+}\n+\n+static inline uint32_t hbs_get32(const HEVCRpiContext * const s, const unsigned int xl, const unsigned int xr, const unsigned int y)\n+{\n+    av_assert2(((xl ^ (xr - 1)) >> s->ps.sps->log2_ctb_size) == 0);\n+    return bs_get32(s->bs_horizontal, s->bs_stride2, xl, xr, y);\n+}\n+\n+static inline uint32_t vbs_get32(const HEVCRpiContext * const s, const unsigned int xl, const unsigned int xr, const unsigned int y)\n+{\n+    av_assert2(((xl ^ (xr - 1)) >> s->ps.sps->log2_ctb_size) == 0);\n+    return bs_get32(s->bs_vertical, s->bs_stride2, xl, xr, y);\n+}\n+\n+\n+static void deblock_y_blk(const HEVCRpiContext * const s, const RpiBlk bounds, const int end_x, const int end_y)\n+{\n+    const unsigned int log2_ctb_size = s->ps.sps->log2_ctb_size;\n+    const unsigned int log2_min_cb_size  = s->ps.sps->log2_min_cb_size;\n+    const unsigned int ctb_size = (1 << log2_ctb_size);\n+    const unsigned int cb_r = bounds.x + bounds.w - (end_x ? 0 :  1);\n+    const unsigned int ctb_n = (bounds.x + bounds.y * s->ps.sps->ctb_width) >> log2_ctb_size;\n+    const DBParams * cb_dbp = s->deblock + ctb_n;\n+    const unsigned int b_b = bounds.y + bounds.h - (end_y ? 0 : 8);\n+\n+    unsigned int cb_x;\n+\n+    // Do in CTB-shaped blocks\n+    for (cb_x = bounds.x; cb_x < cb_r; cb_x += ctb_size, ++cb_dbp)\n+    {\n+        const unsigned int bv_r = FFMIN(cb_x + ctb_size, cb_r);\n+        const unsigned int bv_l = FFMAX(cb_x, 8);\n+        const unsigned int bh_r = cb_x + ctb_size >= cb_r ? cb_r - 8 : cb_x + ctb_size - 9;\n+        const unsigned int bh_l = bv_l - 8;\n+        unsigned int y;\n+\n+        // Main body\n+        for (y = (bounds.y == 0 ? 0 : bounds.y - 8); y < b_b; y += 8)\n+        {\n+            uint32_t vbs = vbs_get32(s, bv_l, bv_r, y);\n+\n+            const DBParams * const dbp = y < bounds.y ? cb_dbp - s->ps.sps->ctb_width : cb_dbp;\n+            const int8_t * const qta = s->qp_y_tab + ((y - 1) >> log2_min_cb_size) * s->ps.sps->min_cb_width;\n+            const int8_t * const qtb = s->qp_y_tab + (y >> log2_min_cb_size) * s->ps.sps->min_cb_width;\n+\n+            if (vbs != 0)\n+            {\n+                const uint8_t * const tcv = tctable + dbp->tc_offset;\n+                const uint8_t * const betav = betatable + dbp->beta_offset;\n+                unsigned int pcmfa = pcm2(s, bv_l - 1, y);\n+                unsigned int x;\n+\n+                for (x = bv_l; vbs != 0; x += 8, vbs >>= 4, pcmfa >>= 1)\n+                {\n+                    if ((vbs & 0xf) != 0 && (pcmfa & 3) != 3)\n+                    {\n+                        const int qp = (qtb[(x - 1) >> log2_min_cb_size] + qtb[x >> log2_min_cb_size] + 1) >> 1;\n+                        s->hevcdsp.hevc_v_loop_filter_luma2(av_rpi_sand_frame_pos_y(s->frame, x, y),\n+                                                         frame_stride1(s->frame, LUMA),\n+                                                         betav[qp],\n+                                                         ((vbs & 3) == 0 ? 0 : tcv[qp + (int)(vbs & 2)]) |\n+                                                          (((vbs & 0xc) == 0 ? 0 : tcv[qp + (int)((vbs >> 2) & 2)]) << 16),\n+                                                         pcmfa & 3,\n+                                                         av_rpi_sand_frame_pos_y(s->frame, x - 4, y));\n+                    }\n+                }\n+            }\n+\n+            if (y != 0)\n+            {\n+                uint32_t hbs;\n+\n+                // H left - mostly separated out so we only need a uint32_t hbs\n+                if ((hbs = hbs_get32(s, bh_l, cb_x, y)) != 0)\n+                {\n+                    const unsigned int x = bh_l;\n+                    const unsigned int pcmfa = pcm4(s, bh_l, y - 1);\n+                    const int qp = (qta[x >> log2_min_cb_size] + qtb[x >> log2_min_cb_size] + 1) >> 1;\n+                    const DBParams * const dbph = dbp - 1;\n+                    const uint8_t * const tc = tctable + dbph->tc_offset + qp;\n+\n+                    av_assert2(cb_x - bh_l == 8);\n+\n+                    s->hevcdsp.hevc_h_loop_filter_luma2(av_rpi_sand_frame_pos_y(s->frame, x, y),\n+                                                         frame_stride1(s->frame, LUMA),\n+                                                         betatable[qp + dbph->beta_offset],\n+                                                         ((hbs & 3) == 0 ? 0 : tc[hbs & 2]) |\n+                                                            (((hbs & 0xc) == 0 ? 0 : tc[(hbs >> 2) & 2]) << 16),\n+                                                         (pcmfa & 1) | ((pcmfa & 0x10000) >> 15));\n+                }\n+\n+                // H\n+                if ((hbs = hbs_get32(s, cb_x, bh_r + 1, y)) != 0)  // Will give (x <= bh_r) in for loop\n+                {\n+                    unsigned int x;\n+                    unsigned int pcmfa = pcm4(s, cb_x, y - 1);\n+\n+                    for (x = cb_x; hbs != 0; x += 8, hbs >>= 4, pcmfa >>= 1)\n+                    {\n+                        if ((hbs & 0xf) != 0 && (~pcmfa & 0x10001) != 0)\n+                        {\n+                            const int qp = (qta[x >> log2_min_cb_size] + qtb[x >> log2_min_cb_size] + 1) >> 1;\n+                            const uint8_t * const tc = tctable + dbp->tc_offset + qp;\n+                            s->hevcdsp.hevc_h_loop_filter_luma2(av_rpi_sand_frame_pos_y(s->frame, x, y),\n+                                                                frame_stride1(s->frame, LUMA),\n+                                                                betatable[qp + dbp->beta_offset],\n+                                                                ((hbs & 3) == 0 ? 0 : tc[hbs & 2]) |\n+                                                                   (((hbs & 0xc) == 0 ? 0 : tc[(hbs >> 2) & 2]) << 16),\n+                                                                (pcmfa & 1) | ((pcmfa & 0x10000) >> 15));\n+                        }\n+                    }\n+                }\n+            }\n+\n+        }\n+    }\n+}\n+\n+static av_always_inline int q2h(const HEVCRpiContext * const s, const unsigned int x, const unsigned int y)\n+{\n+    const unsigned int log2_min_cb_size  = s->ps.sps->log2_min_cb_size;\n+    const int8_t * const qt = s->qp_y_tab + (y >> log2_min_cb_size) * s->ps.sps->min_cb_width;\n+    return (qt[(x - 1) >> log2_min_cb_size] + qt[x >> log2_min_cb_size] + 1) >> 1;\n+}\n+\n+static void deblock_uv_blk(const HEVCRpiContext * const s, const RpiBlk bounds, const int end_x, const int end_y)\n+{\n+    const unsigned int log2_ctb_size = s->ps.sps->log2_ctb_size;\n+    const unsigned int log2_min_cb_size  = s->ps.sps->log2_min_cb_size;\n+    const unsigned int ctb_size = (1 << log2_ctb_size);\n+    const unsigned int cb_r = bounds.x + bounds.w - (end_x ? 0 :  8);\n+    const unsigned int ctb_n = (bounds.x + bounds.y * s->ps.sps->ctb_width) >> log2_ctb_size;\n+    const DBParams * dbp = s->deblock + ctb_n;\n+    const unsigned int b_b = bounds.y + bounds.h - (end_y ? 0 : 8);\n+    const uint8_t * const tcq_u = s->ps.pps->qp_dblk_x[1];\n+    const uint8_t * const tcq_v = s->ps.pps->qp_dblk_x[2];\n+\n+    unsigned int cb_x;\n+\n+    av_assert1((bounds.x & (ctb_size - 1)) == 0);\n+    av_assert1((bounds.y & (ctb_size - 1)) == 0);\n+    av_assert1(bounds.h <= ctb_size);\n+\n+    // Do in CTB-shaped blocks\n+    for (cb_x = bounds.x; cb_x < cb_r; cb_x += ctb_size, ++dbp) {\n+        const unsigned int bv_r = FFMIN(cb_x + ctb_size, cb_r);\n+        const unsigned int bv_l = FFMAX(cb_x, 16);\n+        unsigned int y;\n+\n+        // V above\n+        if (bounds.y != 0) {\n+            // Deblock V up 8\n+            // CTB above current\n+            // Top-half only (tc4 & ~0xffff == 0) is special cased in asm\n+            const unsigned int y = bounds.y - 8;\n+            uint32_t vbs = vbs_get32(s, bv_l, bv_r, y) & 0x02020202U;\n+\n+            if (vbs != 0)\n+            {\n+                unsigned int pcmfa = pcm2(s, bv_l - 1, y);\n+                const uint8_t * const tc = tctable + 2 + (dbp - s->ps.sps->ctb_width)->tc_offset;\n+                unsigned int x;\n+\n+                for (x = bv_l; vbs != 0; x += 16, vbs >>= 8, pcmfa >>= 2)\n+                {\n+                    if ((vbs & 2) != 0 && (~pcmfa & 3) != 0)\n+                    {\n+                        const int qp0 = q2h(s, x, y);\n+                        s->hevcdsp.hevc_v_loop_filter_uv2(av_rpi_sand_frame_pos_c(s->frame, x >> 1, y >> 1),\n+                                                       frame_stride1(s->frame, 1),\n+                                                       tc[tcq_u[qp0]] | (tc[tcq_v[qp0]] << 8),\n+                                                       av_rpi_sand_frame_pos_c(s->frame, (x >> 1) - 2, y >> 1),\n+                                                       pcmfa & 3);\n+                    }\n+                }\n+            }\n+        }\n+\n+        for (y = bounds.y; y < b_b; y += 16)\n+        {\n+            uint32_t vbs = (vbs_get32(s, bv_l, bv_r, y) & 0x02020202U) |\n+                (y + 16 > b_b ? 0 : (vbs_get32(s, bv_l, bv_r, y + 8) & 0x02020202U) << 4);\n+\n+            // V\n+            if (vbs != 0)\n+            {\n+                unsigned int x;\n+                unsigned int pcmfa =\n+                    (y + 16 > b_b ?\n+                        pcm2(s, bv_l - 1, y) | 0xffff0000 :\n+                        pcm4(s, bv_l - 1, y));\n+                const uint8_t * const tc = tctable + 2 + dbp->tc_offset;\n+\n+                for (x = bv_l; vbs != 0; x += 16, vbs >>= 8, pcmfa >>= 2)\n+                {\n+                    if ((vbs & 0xff) != 0 && (~pcmfa & 0x30003) != 0)\n+                    {\n+                        const int qp0 = q2h(s, x, y);\n+                        const int qp1 = q2h(s, x, y + 8);\n+                        s->hevcdsp.hevc_v_loop_filter_uv2(av_rpi_sand_frame_pos_c(s->frame, x >> 1, y >> 1),\n+                            frame_stride1(s->frame, 1),\n+                            ((vbs & 2) == 0 ? 0 : (tc[tcq_u[qp0]] << 0) | (tc[tcq_v[qp0]] << 8)) |\n+                                ((vbs & 0x20) == 0 ? 0 : (tc[tcq_u[qp1]] << 16) | (tc[tcq_v[qp1]] << 24)),\n+                            av_rpi_sand_frame_pos_c(s->frame, (x >> 1) - 2, y >> 1),\n+                            (pcmfa & 3) | ((pcmfa >> 14) & 0xc));\n+                    }\n+                }\n+            }\n+\n+            // H\n+            if (y != 0)\n+            {\n+                uint32_t hbs;\n+                const unsigned int bh_l = bv_l - 16;\n+                const unsigned int bh_r = cb_x + ctb_size >= cb_r ? cb_r : cb_x + ctb_size - 16;\n+                const int8_t * const qta = s->qp_y_tab + ((y - 1) >> log2_min_cb_size) * s->ps.sps->min_cb_width;\n+                const int8_t * const qtb = s->qp_y_tab + (y >> log2_min_cb_size) * s->ps.sps->min_cb_width;\n+\n+                // H left - mostly separated out so we only need a uint32_t hbs\n+                // Stub is width 8 to the left of bounds, but width 16 internally\n+                if ((hbs = hbs_get32(s, bh_l, cb_x, y) & 0x22U) != 0)\n+                {\n+                    unsigned int pcmfa = pcm4(s, bh_l, y - 1);\n+\n+                    // Chop off bits we don't want...\n+                    if (bh_l < bounds.x) {\n+                        pcmfa |= 0x10001; // TL|BL pre rearrangement\n+                        hbs &= ~3;  // Make BS 0\n+                    }\n+\n+                    // Double check we still want this\n+                    if (hbs != 0 && (~pcmfa & 0x30003) != 0)\n+                    {\n+                        const unsigned int x = bh_l;\n+                        const int qp0 = (qta[x >> log2_min_cb_size] + qtb[x >> log2_min_cb_size] + 1) >> 1;\n+                        const int qp1 = (qta[(x + 8) >> log2_min_cb_size] + qtb[(x + 8) >> log2_min_cb_size] + 1) >> 1;\n+                        const uint8_t * const tc = tctable + 2 + (dbp - 1)->tc_offset;\n+\n+                        s->hevcdsp.hevc_h_loop_filter_uv(av_rpi_sand_frame_pos_c(s->frame, x >> 1, y >> 1),\n+                            frame_stride1(s->frame, 1),\n+                            ((hbs & 2) == 0 ? 0 : (tc[tcq_u[qp0]] << 0) | (tc[tcq_v[qp0]] << 8)) |\n+                                ((hbs & 0x20) == 0 ? 0 : (tc[tcq_u[qp1]] << 16) | (tc[tcq_v[qp1]] << 24)),\n+                            (pcmfa & 3) | ((pcmfa >> 14) & 0xc));\n+                    }\n+                }\n+\n+                // H main\n+                if ((hbs = (hbs_get32(s, cb_x, bh_r, y) & 0x22222222U)) != 0)\n+                {\n+                    unsigned int x;\n+                    unsigned int pcmfa = pcm4(s, cb_x, y - 1);  // Might like to mask out far right writes but probably not worth it\n+\n+                    for (x = cb_x; hbs != 0; x += 16, hbs >>= 8, pcmfa >>= 2)\n+                    {\n+                        if ((hbs & 0xff) != 0 && (~pcmfa & 0x30003) != 0)\n+                        {\n+                            const int qp0 = (qta[x >> log2_min_cb_size] + qtb[x >> log2_min_cb_size] + 1) >> 1;\n+                            const int qp1 = (qta[(x + 8) >> log2_min_cb_size] + qtb[(x + 8) >> log2_min_cb_size] + 1) >> 1;\n+                            const uint8_t * const tc = tctable + 2 + dbp->tc_offset;\n+\n+                            s->hevcdsp.hevc_h_loop_filter_uv(av_rpi_sand_frame_pos_c(s->frame, x >> 1, y >> 1),\n+                                frame_stride1(s->frame, 1),\n+                                ((hbs & 2) == 0 ? 0 : (tc[tcq_u[qp0]] << 0) | (tc[tcq_v[qp0]] << 8)) |\n+                                    ((hbs & 0x20) == 0 ? 0 : (tc[tcq_u[qp1]] << 16) | (tc[tcq_v[qp1]] << 24)),\n+                                (pcmfa & 3) | ((pcmfa >> 14) & 0xc));\n+                        }\n+                    }\n+                }\n+            }\n+        }\n+    }\n+}\n+\n+static inline unsigned int off_boundary(const unsigned int x, const unsigned int log2_n)\n+{\n+    return x & ~(~0U << log2_n);\n+}\n+\n+static inline void hbs_set(const HEVCRpiContext * const s, const unsigned int x, const unsigned int y, const uint32_t mask, uint32_t bsf)\n+{\n+    av_assert2((y & 7) == 0);\n+\n+    // This doesn't have the same simultainious update issues that bsf_stash\n+    // does (other threads will have a different y) so we can do it the easy way\n+    if ((bsf &= mask) != 0)\n+        *bs_ptr32(s->bs_horizontal, s->bs_stride2, x, y) |= bsf << ((x >> 1) & 31);\n+}\n+\n+\n+static void vbs_set(const HEVCRpiContext * const s, const unsigned int x, const unsigned int y, const uint32_t mask, uint32_t bsf)\n+{\n+    // We arrange this in a slightly odd fashion but it lines up with\n+    // how we are going to use it in the actual deblock code & it is easier\n+    // to do the contortions here than there\n+    //\n+    // Arrange (LE) {x0y0, x0y4, x8y0, x8,y4}, {x16y0, x16y4, x24y0, x24y4},...\n+\n+    av_assert2((x & 7) == 0);\n+\n+    if ((bsf &= mask) != 0)\n+    {\n+        uint8_t *p = bs_ptr8(s->bs_vertical, s->bs_stride2, x, y);\n+        const unsigned int sh = ((x & 8) | (y & 4)) >> 1;\n+\n+        if (mask <= 0xf)\n+        {\n+            *p |= (bsf << sh);\n+        }\n+        else\n+        {\n+            do {\n+                *p |= (bsf & 0xf) << sh;\n+                p += HEVC_RPI_BS_STRIDE1_BYTES;\n+            } while ((bsf >>= 4) != 0);\n+        }\n+    }\n+}\n+\n+static inline uint32_t bsf_mv(const HEVCRpiContext * const s,\n+                              const unsigned int rep, const unsigned int dup,\n+                              const unsigned int mvf_stride0,\n+                              const unsigned int mvf_stride1,\n+                              const RefPicList * const rpl_p, const RefPicList * const rpl_q,\n+                              const HEVCRpiMvField * const mvf_p, const HEVCRpiMvField * const mvf_q)\n+{\n+    return s->hevcdsp.hevc_deblocking_boundary_strengths(rep, dup,\n+            mvf_p, mvf_q,\n+            rpl_p[0].list, rpl_p[1].list, rpl_q[0].list, rpl_q[1].list,\n+            sizeof(HEVCRpiMvField) * mvf_stride0, sizeof(HEVCRpiMvField) * mvf_stride1);\n+}\n+\n+\n+void ff_hevc_rpi_deblocking_boundary_strengths(const HEVCRpiContext * const s,\n+                                               const HEVCRpiLocalContext * const lc,\n+                                               const unsigned int x0, const unsigned int y0,\n+                                               const unsigned int log2_trafo_size,\n+                                               const int is_coded_block)\n+{\n+    const HEVCRpiMvField * const mvf_curr      = mvf_stash_ptr(s, lc, x0, y0);\n+    const unsigned int log2_min_pu_size = LOG2_MIN_PU_SIZE;\n+    const RefPicList * const rpl        = s->refPicList;\n+    // Rep count for bsf_mv when running with min_pu chuncks\n+    const unsigned int log2_rep_min_pu  = log2_trafo_size <= log2_min_pu_size ? 0 : log2_trafo_size - log2_min_pu_size;\n+    const unsigned int boundary_flags   = s->sh.no_dblk_boundary_flags & lc->boundary_flags;\n+    const unsigned int trafo_size       = (1U << log2_trafo_size);\n+    const uint32_t bsf_mask             = log2_trafo_size > 5 ? ~0U : (1U << (trafo_size >> 1)) - 1;\n+    const uint32_t bsf_cbf              = (bsf_mask & 0x55555555);\n+\n+    // Do we cover a pred split line?\n+    const int has_x_split = x0 < lc->cu.x_split && x0 + trafo_size > lc->cu.x_split;\n+    const int has_y_split = y0 < lc->cu.y_split && y0 + trafo_size > lc->cu.y_split;\n+\n+    uint32_t bsf_h;\n+    uint32_t bsf_v;\n+\n+#ifdef DISABLE_STRENGTHS\n+    return;\n+#endif\n+\n+    // We are always on a size boundary\n+    av_assert2((x0 & (trafo_size - 1)) == 0);\n+    av_assert2((y0 & (trafo_size - 1)) == 0);\n+    // log2_trafo_size not really a transform size; we can have to deal\n+    // with size 2^6 blocks\n+    av_assert2(log2_trafo_size >= 2 && log2_trafo_size <= 6);\n+\n+    // Retrieve and update coded (b0), intra (b1) bs flags\n+    //\n+    // Store on min width (rather than uint32_t) to avoid possible issues\n+    // with another thread on another core running wpp using the same\n+    // memory (min CTB = 16 pels = 4 bsf els = 8 bits)\n+    //\n+    // In bsf BS=2 is represented by 3 as it is much easier to test & set\n+    // and the actual deblock code tests for 0 and b1 set/not-set so 2 and\n+    // 3 will work the same\n+    {\n+        // Given where we are called from is_cbf_luma & is_intra will be constant over the block\n+        const uint32_t bsf0 =  (lc->cu.pred_mode == MODE_INTRA) ? bsf_mask : is_coded_block ? bsf_cbf : 0;\n+        uint8_t *const p = s->bsf_stash_up + (x0 >> 4);\n+        uint8_t *const q = s->bsf_stash_left + (y0 >> 4);\n+\n+        switch (log2_trafo_size)\n+        {\n+            case 2:\n+            case 3:\n+            {\n+                const unsigned int sh_h = (x0 >> 1) & 7;\n+                const unsigned int sh_v = (y0 >> 1) & 7;\n+                bsf_h = *p;\n+                bsf_v = *q;\n+                *p = (bsf_h & ~(bsf_mask << sh_h)) | (bsf0 << sh_h);\n+                *q = (bsf_v & ~(bsf_mask << sh_v)) | (bsf0 << sh_v);\n+                bsf_h >>= sh_h;\n+                bsf_v >>= sh_v;\n+                break;\n+            }\n+            case 4:\n+                bsf_h = *p;\n+                bsf_v = *q;\n+                *p = bsf0;\n+                *q = bsf0;\n+                break;\n+            case 5:\n+                bsf_h = *(uint16_t *)p;\n+                bsf_v = *(uint16_t *)q;\n+                *(uint16_t *)p = bsf0;\n+                *(uint16_t *)q = bsf0;\n+                break;\n+            case 6:\n+            default:\n+                bsf_h = *(uint32_t *)p;\n+                bsf_v = *(uint32_t *)q;\n+                *(uint32_t *)p = bsf0;\n+                *(uint32_t *)q = bsf0;\n+                break;\n+        }\n+\n+        bsf_h |= bsf0;\n+        bsf_v |= bsf0;\n+    }\n+\n+    // Do Horizontal\n+    if ((y0 & 7) == 0)\n+    {\n+        // Boundary upper\n+        if (y0 != 0 &&\n+            (off_boundary(y0, s->ps.sps->log2_ctb_size) ||\n+             (boundary_flags & (BOUNDARY_UPPER_SLICE | BOUNDARY_UPPER_TILE)) == 0))\n+        {\n+            // Look at MVs (BS=1) if we don't already has a full set of bs bits\n+            if ((~bsf_h & bsf_cbf) != 0 && (y0 == lc->cu.y || y0 == lc->cu.y_split))\n+            {\n+                // If we aren't on the top boundary we must be in the middle\n+                // and in that case we know where mvf can change\n+                const unsigned int log2_rep = (y0 == lc->cu.y) ? log2_rep_min_pu : has_x_split ? 1 : 0;\n+                const RefPicList *const rpl_top = !off_boundary(y0, s->ps.sps->log2_ctb_size) ?\n+                      s->rpl_up[x0 >> s->ps.sps->log2_ctb_size] :\n+                      rpl;\n+\n+                bsf_h |= bsf_mv(s, 1 << log2_rep, trafo_size >> (2 + log2_rep),\n+                    trafo_size >> (log2_min_pu_size + log2_rep),\n+                    trafo_size >> (log2_min_pu_size + log2_rep),\n+                    rpl, rpl_top,\n+                    mvf_curr, mvf_ptr(s, lc, x0, y0, x0, y0 - 1));\n+            }\n+\n+            // Finally put the results into bs\n+            hbs_set(s, x0, y0, bsf_mask, bsf_h);\n+        }\n+\n+        // Max of 1 pu internal split - ignore if not on 8pel boundary\n+        if (has_y_split && !off_boundary(lc->cu.y_split, 3))\n+        {\n+            const HEVCRpiMvField * const mvf = mvf_stash_ptr(s, lc, x0, lc->cu.y_split);\n+            // If we have the x split as well then it must be in the middle\n+            const unsigned int log2_rep = has_x_split ? 1 : 0;\n+\n+            hbs_set(s, x0, lc->cu.y_split, bsf_mask,\n+                bsf_mv(s, 1 << log2_rep, trafo_size >> (2 + log2_rep),\n+                   trafo_size >> (log2_min_pu_size + log2_rep),\n+                   trafo_size >> (log2_min_pu_size + log2_rep),\n+                   rpl, rpl,\n+                   mvf, mvf - MVF_STASH_WIDTH_PU));\n+        }\n+    }\n+\n+    // And again for vertical - same logic as horizontal just in the other direction\n+    if ((x0 & 7) == 0)\n+    {\n+        // Boundary left\n+        if (x0 != 0 &&\n+            (off_boundary(x0, s->ps.sps->log2_ctb_size) ||\n+             (boundary_flags & (BOUNDARY_LEFT_SLICE | BOUNDARY_LEFT_TILE)) == 0))\n+        {\n+            if ((~bsf_v & bsf_cbf) != 0 && (x0 == lc->cu.x || x0 == lc->cu.x_split))\n+            {\n+                const unsigned int log2_rep = (x0 == lc->cu.x) ? log2_rep_min_pu : has_y_split ? 1 : 0;\n+                const RefPicList *const rpl_left = !off_boundary(x0, s->ps.sps->log2_ctb_size) ?\n+                    s->rpl_left[y0 >> s->ps.sps->log2_ctb_size] :\n+                    rpl;\n+\n+                bsf_v |= bsf_mv(s, 1 << log2_rep, trafo_size >> (2 + log2_rep),\n+                    (MVF_STASH_WIDTH_PU << log2_trafo_size) >> (log2_min_pu_size + log2_rep),\n+                    (mvf_left_stride(s, x0, x0 - 1) << log2_trafo_size) >> (log2_min_pu_size + log2_rep),\n+                    rpl, rpl_left,\n+                    mvf_curr, mvf_ptr(s, lc, x0, y0, x0 - 1, y0));\n+            }\n+\n+            vbs_set(s, x0, y0, bsf_mask, bsf_v);\n+        }\n+\n+        if (has_x_split && !off_boundary(lc->cu.x_split, 3))\n+        {\n+            const HEVCRpiMvField *const mvf = mvf_stash_ptr(s, lc, lc->cu.x_split, y0);\n+            const unsigned int log2_rep = has_y_split ? 1 : 0;\n+\n+            vbs_set(s, lc->cu.x_split, y0, bsf_mask,\n+                bsf_mv(s, 1 << log2_rep, trafo_size >> (2 + log2_rep),\n+                   (MVF_STASH_WIDTH_PU << log2_trafo_size) >> (log2_min_pu_size + log2_rep),\n+                   (MVF_STASH_WIDTH_PU << log2_trafo_size) >> (log2_min_pu_size + log2_rep),\n+                   rpl, rpl,\n+                   mvf, mvf - 1));\n+        }\n+    }\n+}\n+\n+#undef LUMA\n+#undef CB\n+#undef CR\n+\n+static inline unsigned int ussub(const unsigned int a, const unsigned int b)\n+{\n+    return a < b ? 0 : a - b;\n+}\n+\n+static inline int cache_boundry(const AVFrame * const frame, const unsigned int x)\n+{\n+    return ((x >> av_rpi_sand_frame_xshl(frame)) & ~63) == 0;\n+}\n+\n+int ff_hevc_rpi_hls_filter_blk(const HEVCRpiContext * const s, const RpiBlk bounds, const int eot)\n+{\n+    const int ctb_size = (1 << s->ps.sps->log2_ctb_size);\n+    int x, y;\n+\n+    const unsigned int br = bounds.x + bounds.w;\n+    const unsigned int bb = bounds.y + bounds.h;\n+\n+    const int x_end = (br >= s->ps.sps->width);\n+    const int y_end = (bb >= s->ps.sps->height);\n+\n+    // Deblock may not touch the edges of the bound as they are still needed\n+    // for Intra pred\n+    //\n+    // Deblock is disabled with a per-slice flag\n+    // Given that bounds may cover multiple slices & we dblock outside bounds\n+    // anyway we can't avoid deblock using that flag - about the only thing we\n+    // could do is have a \"no deblock seen yet\" flag but it doesn't really\n+    // seem worth the effort\n+\n+    deblock_y_blk(s, bounds, x_end, y_end);\n+    deblock_uv_blk(s, bounds, x_end, y_end);\n+\n+    // SAO needs\n+    // (a) CTB alignment\n+    // (b) Valid pixels all the way around the CTB in particular it needs the DR pixel\n+    {\n+        const unsigned int xo = bounds.x - ((bounds.x - 16) & ~(ctb_size - 1));\n+        const unsigned int yo = bounds.y - ((bounds.y - 16) & ~(ctb_size - 1));\n+        const unsigned int yt = ussub(bounds.y, yo);\n+        const unsigned int yb = y_end ? bb : ussub(bb, yo);\n+        const unsigned int xl = ussub(bounds.x, xo);\n+        const unsigned int xr = x_end ? br : ussub(br, xo);\n+\n+        if (s->ps.sps->sao_enabled)\n+        {\n+            for (y = yt; y < yb; y += ctb_size) {\n+                for (x = xl; x < xr; x += ctb_size) {\n+                    sao_filter_CTB(s, x, y);\n+                }\n+            }\n+        }\n+\n+        // Cache invalidate\n+        y = 0;\n+        if (xr != 0 && yb != 0)\n+        {\n+            const unsigned int llen =\n+                (av_rpi_sand_frame_stride1(s->frame) >> av_rpi_sand_frame_xshl(s->frame));\n+            const unsigned int mask = ~(llen - 1);\n+            const unsigned int il = (xl == 0) ? 0 : (xl - 1) & mask;\n+            const unsigned int ir = x_end || !cache_boundry(s->frame, br) ? br : (xr - 1) & mask;\n+            const unsigned int it = ussub(yt, 1);\n+            const unsigned int ib = y_end ? bb : yb - 1;\n+\n+            if (il < ir) {\n+                rpi_cache_buf_t cbuf;\n+                rpi_cache_flush_env_t * const rfe = rpi_cache_flush_init(&cbuf);\n+                rpi_cache_flush_add_frame_block(rfe, s->frame, RPI_CACHE_FLUSH_MODE_WB_INVALIDATE,\n+                  il, it, ir - il, ib - it,\n+                  ctx_vshift(s, 1), 1, 1);\n+\n+                // If we have to commit the right hand tile boundry due to\n+                // cache boundry considerations then at EoTile we must commit\n+                // that boundry to bottom of tile (bounds)\n+                if (ib != bb && ir == br && eot) {\n+                    rpi_cache_flush_add_frame_block(rfe, s->frame, RPI_CACHE_FLUSH_MODE_WB_INVALIDATE,\n+                      br - 1, ib, 1, bb - ib,\n+                      ctx_vshift(s, 1), 1, 1);\n+                }\n+\n+                rpi_cache_flush_finish(rfe);\n+\n+                if (x_end)\n+                    y = y_end ? INT_MAX : ib;\n+\n+//                printf(\"Flush: %4d,%4d -> %4d,%4d: signal: %d\\n\", il, it, ir, ib, y - 1);\n+            }\n+        }\n+    }\n+\n+    return y;\n+}\n+\ndiff --git a/libavcodec/rpi_hevc_mv.h b/libavcodec/rpi_hevc_mv.h\nnew file mode 100644\nindex 0000000000..6b36f5e737\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_mv.h\n@@ -0,0 +1,71 @@\n+#ifndef AVCODEC_RPI_HEVC_MV_H\n+#define AVCODEC_RPI_HEVC_MV_H\n+\n+#include \"config.h\"\n+\n+typedef int32_t MvXY;\n+\n+typedef struct HEVCRpiMvField {\n+    MvXY xy[2];\n+    int8_t ref_idx[2];\n+    int8_t pred_flag;\n+    int8_t dummy; // To 12 bytes\n+} HEVCRpiMvField;\n+\n+\n+#define MV_X(xy) (((xy) << 16) >> 16)\n+#define MV_Y(xy) ((xy) >> 16)\n+#define MV_XY(x, y) ((x & 0xffff) | ((y) << 16))\n+\n+#if ARCH_ARM\n+#include \"arm/rpi_hevc_mv_arm.h\"\n+#endif\n+\n+#ifndef mvxy_add\n+static inline MvXY mvxy_add(const MvXY a, const MvXY b)\n+{\n+    return MV_XY(MV_X(a) + MV_X(b), MV_Y(a) + MV_Y(b));\n+}\n+#endif\n+\n+\n+#ifndef mv_scale_xy\n+static inline MvXY mv_scale_xy(const MvXY const src, int td, int tb)\n+{\n+    int tx, scale_factor;\n+\n+    td = td == 0 ? 1 : av_clip_int8(td);\n+    tb = av_clip_int8(tb);\n+    tx = (0x4000 + (abs(td) >> 1)) / td;\n+    scale_factor = av_clip_intp2((tb * tx + 32) >> 6, 12);\n+    return MV_XY(\n+        av_clip_int16((scale_factor * MV_X(src) + 127 +\n+                           (scale_factor * MV_X(src) < 0)) >> 8),\n+        av_clip_int16((scale_factor * MV_Y(src) + 127 +\n+                           (scale_factor * MV_Y(src) < 0)) >> 8));\n+}\n+#endif\n+\n+// 8.3.1 states that the bitstream may not contain poc diffs that do not\n+// fit in 16 bits, so given that we don't care about the high bits we only\n+// store the low 16 + LT & Inter flags\n+\n+#define COL_POC_INTRA   0\n+#define COL_POC_INTER   (1 << 16)\n+#define COL_POC_LT      (1 << 17)\n+#define COL_POC_DIFF(x,y) ((int16_t)((x) - (y)))\n+#define COL_POC_MAKE_INTER(lt,poc) (COL_POC_INTER | ((lt) ? COL_POC_LT : 0) | ((poc) & 0xffff))\n+#define COL_POC_IS_LT(x) (((x) & COL_POC_LT) != 0)\n+\n+typedef struct ColMv_s {\n+    int32_t poc;\n+    int32_t xy;\n+} ColMv;\n+\n+typedef struct ColMvField_s {\n+    ColMv L[2];\n+} ColMvField;\n+\n+\n+\n+#endif // AVCODEC_RPI_HEVC_MV_H\ndiff --git a/libavcodec/rpi_hevc_mvs.c b/libavcodec/rpi_hevc_mvs.c\nnew file mode 100644\nindex 0000000000..27a9f69525\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_mvs.c\n@@ -0,0 +1,487 @@\n+/*\n+ * HEVC video decoder\n+ *\n+ * Copyright (C) 2012 - 2013 Guillaume Martres\n+ * Copyright (C) 2013 Anand Meher Kotra\n+ * Copyright (C) 2018 John Cox for Raspberry Pi (Trading)\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"hevc.h\"\n+#include \"rpi_hevcdec.h\"\n+\n+static av_always_inline int\n+is_eq_mer(const unsigned int plevel,\n+    const unsigned int xN, const unsigned int yN,\n+    const unsigned int xP, const unsigned int yP)\n+{\n+    return (((xN ^ xP) | (yN ^ yP)) >> plevel) == 0;\n+}\n+\n+// check if the mv's and refidx are the same between A and B\n+static av_always_inline int compare_mv_ref_idx(const HEVCRpiMvField * const a, const HEVCRpiMvField * const b)\n+{\n+    return a->pred_flag == b->pred_flag &&\n+        ((a->pred_flag & PF_L0) == 0 || (a->ref_idx[0] == b->ref_idx[0] && a->xy[0] == b->xy[0])) &&\n+        ((a->pred_flag & PF_L1) == 0 || (a->ref_idx[1] == b->ref_idx[1] && a->xy[1] == b->xy[1]));\n+    return 0;\n+}\n+\n+/*\n+ * 8.5.3.1.7  temporal luma motion vector prediction\n+ */\n+static int temporal_luma_motion_vector(const HEVCRpiContext * const s,\n+                                       const HEVCRpiLocalContext * const lc, const int x0, const int y0,\n+                                       const int nPbW, const int nPbH, const int refIdxLx,\n+                                       MvXY * const mvLXCol, const int X)\n+{\n+    int x, y;\n+    const ColMv * cmv = NULL;\n+\n+    HEVCRpiFrame * const col_ref = s->ref->collocated_ref;\n+    const RefPicList * const refPicList = s->refPicList + X;\n+    const int cur_lt = refPicList->isLongTerm[refIdxLx];\n+\n+    *mvLXCol = 0;\n+    // Unlikely but we might have a col_ref IDR frame!\n+    if (col_ref->col_mvf == NULL)\n+        return 0;\n+\n+    ff_hevc_rpi_progress_wait_mv(s, lc->jb0, col_ref, y0 + nPbH);\n+\n+    //bottom right collocated motion vector\n+    x = x0 + nPbW;\n+    y = y0 + nPbH;\n+\n+    if ((y0 >> s->ps.sps->log2_ctb_size) == (y >> s->ps.sps->log2_ctb_size) &&\n+        y < s->ps.sps->height &&\n+        x < s->ps.sps->width)\n+    {\n+        const ColMvField * const col = col_ref->col_mvf + (x >> 4) +\n+            (y >> 4) * s->col_mvf_stride;\n+\n+        if (col->L[0].poc != COL_POC_INTRA &&\n+            (col->L[1].poc == COL_POC_INTRA ||\n+             (s->no_backward_pred_flag ? s->sh.collocated_list == L1 : X == 0)))\n+        {\n+            cmv = col->L + 0;\n+        }\n+        else if (col->L[1].poc != COL_POC_INTRA)\n+        {\n+            cmv = col->L + 1;\n+        }\n+    }\n+\n+    // derive center collocated motion vector\n+    if (cmv == NULL || COL_POC_IS_LT(cmv->poc) != cur_lt)\n+    {\n+        cmv = NULL;\n+        x                  = x0 + (nPbW >> 1);\n+        y                  = y0 + (nPbH >> 1);\n+\n+        {\n+            const ColMvField * const col = col_ref->col_mvf + (x >> 4) +\n+              (y >> 4) * s->col_mvf_stride;\n+\n+            if (col->L[0].poc != COL_POC_INTRA &&\n+              (col->L[1].poc == COL_POC_INTRA ||\n+               (s->no_backward_pred_flag ? s->sh.collocated_list == L1 : X == 0)))\n+            {\n+              cmv = col->L + 0;\n+            }\n+            else if (col->L[1].poc != COL_POC_INTRA)\n+            {\n+              cmv = col->L + 1;\n+            }\n+        }\n+    }\n+\n+    if (cmv == NULL || cur_lt != COL_POC_IS_LT(cmv->poc))\n+        return 0;\n+\n+    {\n+        const int col_poc  = col_ref->poc;\n+        const int ref_poc  = refPicList->list[refIdxLx];\n+\n+        *mvLXCol = (cur_lt ||\n+                        cmv->poc == col_poc ||\n+                        COL_POC_DIFF(col_poc, cmv->poc) == s->poc - ref_poc) ?\n+                    cmv->xy :\n+                    mv_scale_xy(cmv->xy, COL_POC_DIFF(col_poc, cmv->poc), s->poc - ref_poc);\n+    }\n+\n+    return cmv != NULL;\n+}\n+\n+static inline int mvf_eq(const HEVCRpiMvField * const a, const HEVCRpiMvField * const b)\n+{\n+    return b != NULL && compare_mv_ref_idx(a, b);\n+}\n+\n+\n+\n+/*\n+ * 8.5.3.1.2  Derivation process for spatial merging candidates\n+ */\n+static inline const HEVCRpiMvField *\n+derive_spatial_merge_candidates(\n+    const HEVCRpiContext * const s,\n+    const HEVCRpiLocalContext * const lc,\n+    const unsigned int x0, const unsigned int y0,\n+    const unsigned int nPbW, const unsigned int nPbH,\n+    const unsigned int avail,\n+    const unsigned int part_idx,\n+    const unsigned int merge_idx,\n+    HEVCRpiMvField * const mvf_t)\n+{\n+    const unsigned int parts_a1 = (1 << PART_Nx2N) | (1 << PART_nLx2N) | (1 << PART_nRx2N);\n+    const unsigned int parts_b1 = (1 << PART_2NxN) | (1<< PART_2NxnU) | (1 << PART_2NxnD);\n+\n+    const HEVCRpiMvField * mvf_a1 = mvf_ptr(s, lc, x0, y0, x0 - 1, y0 + nPbH - 1);\n+    const HEVCRpiMvField * mvf_a0 = mvf_a1 + mvf_left_stride(s, x0, x0 - 1);\n+    const HEVCRpiMvField * mvf_b1 = mvf_ptr(s, lc, x0, y0, x0 + nPbW - 1, y0 - 1);\n+    const HEVCRpiMvField * mvf_b0 = mvf_b1 + 1;\n+    const unsigned int plevel = s->ps.pps->log2_parallel_merge_level;\n+    const unsigned int part_mode = lc->cu.part_mode;\n+\n+    const HEVCRpiMvField * perm[4];\n+    unsigned int nb_merge_cand = 0;\n+\n+    // singleMCLFlag => part_idx == 0 so no need to test for it\n+    if ((avail & AVAIL_L) == 0 ||\n+        (part_idx == 1 &&\n+            ((parts_a1 >> part_mode) & 1) != 0 ||\n+                is_eq_mer(plevel, x0 - 1, y0 + nPbH - 1, x0, y0)) ||\n+        mvf_a1->pred_flag == PF_INTRA)\n+    {\n+        mvf_a1 = NULL;\n+    }\n+    else\n+    {\n+        if (merge_idx == nb_merge_cand)\n+            return mvf_a1;\n+        perm[nb_merge_cand++] = mvf_a1;\n+    }\n+\n+    if ((avail & AVAIL_U) == 0 ||\n+            (part_idx == 1 &&\n+               ((parts_b1 >> part_mode) & 1) != 0 ||\n+                   is_eq_mer(plevel, x0 + nPbW - 1, y0 - 1, x0, y0)) ||\n+            mvf_b1->pred_flag == PF_INTRA)\n+    {\n+        mvf_b1 = NULL;\n+    }\n+    else if (!mvf_eq(mvf_b1, mvf_a1))\n+    {\n+        if (merge_idx == nb_merge_cand)\n+            return mvf_b1;\n+        perm[nb_merge_cand++] = mvf_b1;\n+    }\n+\n+    // above right spatial merge candidate\n+    // Never need mvf_b0 again so don't bother zeroing if navail\n+    if ((avail & AVAIL_UR) != 0 &&\n+        !is_eq_mer(plevel, x0 + nPbW, y0 - 1, x0, y0) &&\n+        mvf_b0->pred_flag != PF_INTRA &&\n+        !mvf_eq(mvf_b0, mvf_b1))\n+    {\n+        if (merge_idx == nb_merge_cand)\n+            return mvf_b0;\n+        perm[nb_merge_cand++] = mvf_b0;\n+    }\n+\n+    // left bottom spatial merge candidate\n+    // Never need mvf_a0 again so don't bother zeroing if navail\n+    if ((avail & AVAIL_DL) != 0 &&\n+        !is_eq_mer(plevel, x0 - 1, y0 + nPbH, x0, y0) &&\n+        mvf_a0->pred_flag != PF_INTRA &&\n+        !mvf_eq(mvf_a0, mvf_a1))\n+    {\n+        if (merge_idx == nb_merge_cand)\n+            return mvf_a0;\n+        perm[nb_merge_cand++] = mvf_a0;\n+    }\n+\n+    // above left spatial merge candidate\n+    if (nb_merge_cand != 4 &&\n+        (avail & AVAIL_UL) != 0 &&\n+        !is_eq_mer(plevel, x0 - 1, y0 - 1, x0, y0))\n+    {\n+        const HEVCRpiMvField * mvf_b2 = mvf_ptr(s, lc, x0, y0, x0 - 1, y0 - 1);  // UL\n+\n+        if (mvf_b2->pred_flag != PF_INTRA &&\n+            !mvf_eq(mvf_b2, mvf_a1) &&\n+            !mvf_eq(mvf_b2, mvf_b1))\n+        {\n+            if (merge_idx == nb_merge_cand)\n+                return mvf_b2;\n+            perm[nb_merge_cand++] = mvf_b2;\n+        }\n+    }\n+\n+    // temporal motion vector candidate\n+    if (s->sh.slice_temporal_mvp_enabled_flag)\n+    {\n+        static const HEVCRpiMvField mvf_z = {{0}};\n+\n+        *mvf_t = mvf_z;\n+\n+        if (temporal_luma_motion_vector(s, lc, x0, y0, nPbW, nPbH,\n+                                        0, mvf_t->xy + 0, 0))\n+            mvf_t->pred_flag = PF_L0;\n+\n+        if (s->sh.slice_type == HEVC_SLICE_B &&\n+                temporal_luma_motion_vector(s, lc, x0, y0, nPbW, nPbH,\n+                                            0, mvf_t->xy + 1, 1))\n+            mvf_t->pred_flag |= PF_L1;\n+\n+        if (mvf_t->pred_flag != 0)\n+        {\n+            if (merge_idx == nb_merge_cand)\n+                return mvf_t;\n+            perm[nb_merge_cand++] = mvf_t;\n+        }\n+    }\n+\n+    // combined bi-predictive merge candidates  (applies for B slices)\n+    if (s->sh.slice_type == HEVC_SLICE_B && nb_merge_cand > 1)\n+    {\n+        unsigned int comb_idx = 0;\n+        const unsigned int cand_count = nb_merge_cand * (nb_merge_cand - 1);\n+        const RefPicList * const refPicList = s->refPicList;\n+\n+        for (comb_idx = 0; comb_idx < cand_count; comb_idx++)\n+        {\n+            static const uint8_t l0_l1_cand_idx[12][2] = {\n+                { 0, 1, },\n+                { 1, 0, },\n+                { 0, 2, },\n+                { 2, 0, },\n+                { 1, 2, },\n+                { 2, 1, },\n+                { 0, 3, },\n+                { 3, 0, },\n+                { 1, 3, },\n+                { 3, 1, },\n+                { 2, 3, },\n+                { 3, 2, },\n+            };\n+\n+            const unsigned int l0_cand_idx = l0_l1_cand_idx[comb_idx][0];\n+            const unsigned int l1_cand_idx = l0_l1_cand_idx[comb_idx][1];\n+            const HEVCRpiMvField * const mvf_c0 = perm[l0_cand_idx];\n+            const HEVCRpiMvField * const mvf_c1 = perm[l1_cand_idx];\n+\n+            if ((mvf_c0->pred_flag & PF_L0) != 0 &&\n+                (mvf_c1->pred_flag & PF_L1) != 0 &&\n+                (refPicList[0].list[mvf_c0->ref_idx[0]] != refPicList[1].list[mvf_c1->ref_idx[1]] ||\n+                 mvf_c0->xy[0] != mvf_c1->xy[1]))\n+            {\n+                if (merge_idx == nb_merge_cand++)\n+                {\n+                    // Need to be a bit careful as we will construct mvf_t and we\n+                    // may already be using that as one of our condidates\n+                    // so build & copy rather than build in place\n+                    const HEVCRpiMvField mvf_m = {\n+                        .xy = {\n+                            mvf_c0->xy[0],\n+                            mvf_c1->xy[1]},\n+                        .ref_idx = {\n+                            mvf_c0->ref_idx[0],\n+                            mvf_c1->ref_idx[1]},\n+                        .pred_flag = PF_BI\n+                    };\n+                    *mvf_t = mvf_m;\n+                    return mvf_t;\n+                }\n+            }\n+        }\n+    }\n+\n+    // \"append\" Zero motion vector candidates\n+    {\n+        const unsigned int nb_refs = (s->sh.slice_type == HEVC_SLICE_B) ?\n+                            FFMIN(s->sh.nb_refs[0], s->sh.nb_refs[1]) : s->sh.nb_refs[0];\n+        const unsigned int zero_idx = merge_idx - nb_merge_cand;\n+\n+        const HEVCRpiMvField mvf_m = {\n+            .xy = {0, 0},\n+            .ref_idx = {\n+                zero_idx < nb_refs ? zero_idx : 0,\n+                (s->sh.slice_type == HEVC_SLICE_B && zero_idx < nb_refs) ? zero_idx : 0},\n+            .pred_flag = (s->sh.slice_type == HEVC_SLICE_B) ? PF_BI : PF_L0\n+        };\n+\n+        *mvf_t = mvf_m;\n+        return mvf_t;\n+    }\n+}\n+\n+\n+// 8.5.3.1.1 Derivation process of luma Mvs for merge mode\n+void ff_hevc_rpi_luma_mv_merge_mode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, int x0, int y0, int nPbW,\n+                                int nPbH, int log2_cb_size, int part_idx,\n+                                int merge_idx, HEVCRpiMvField * const mv)\n+{\n+    const HEVCRpiMvField * mvf_m = (s->ps.pps->log2_parallel_merge_level > 2 && log2_cb_size == 3) ?\n+        derive_spatial_merge_candidates(s, lc, lc->cu.x, lc->cu.y, 8, 8,\n+                                        ff_hevc_rpi_tb_avail_flags(s, lc, lc->cu.x, lc->cu.y, 8, 8),\n+                                        0, merge_idx, mv) :\n+        derive_spatial_merge_candidates(s, lc, x0, y0, nPbW, nPbH,\n+                                        ff_hevc_rpi_tb_avail_flags(s, lc, x0, y0, nPbW, nPbH),\n+                                        part_idx, merge_idx, mv);\n+\n+    if (mvf_m != mv)\n+        *mv = *mvf_m;\n+\n+    if (mv->pred_flag == PF_BI && (nPbW + nPbH) == 12)\n+        mv->pred_flag = PF_L0;\n+}\n+\n+\n+static av_always_inline const MvXY *\n+mvf_same_poc(const RefPicList * const rpl, const unsigned int pfi0, const unsigned int pfi1, const int poc0, const HEVCRpiMvField * const mvf)\n+{\n+    if (mvf != NULL)\n+    {\n+        if (((mvf->pred_flag >> pfi0) & 1) != 0 && rpl[pfi0].list[mvf->ref_idx[pfi0]] == poc0)\n+            return mvf->xy + pfi0;\n+        if (((mvf->pred_flag >> pfi1) & 1) != 0 && rpl[pfi1].list[mvf->ref_idx[pfi1]] == poc0)\n+            return mvf->xy + pfi1;\n+    }\n+    return NULL;\n+}\n+\n+static av_always_inline const MvXY *\n+mvf_other_poc(const RefPicList * const rpl, const unsigned int pfi0, const unsigned int pfi1,\n+              const int islt0, const int poc0, const int poc_cur,\n+              MvXY * const mv_t, const HEVCRpiMvField * const mvf)\n+{\n+    if (mvf != NULL)\n+    {\n+        if (((mvf->pred_flag >> pfi0) & 1) != 0 && rpl[pfi0].isLongTerm[mvf->ref_idx[pfi0]] == islt0)\n+        {\n+            const int poc1 = rpl[pfi0].list[mvf->ref_idx[pfi0]];\n+            if (islt0 || poc1 == poc0) {\n+                return mvf->xy + pfi0;\n+            }\n+            *mv_t = mv_scale_xy(mvf->xy[pfi0], poc_cur - poc1, poc_cur - poc0);\n+            return mv_t;\n+        }\n+        if (((mvf->pred_flag >> pfi1) & 1) != 0 && rpl[pfi1].isLongTerm[mvf->ref_idx[pfi1]] == islt0)\n+        {\n+            const int poc1 = rpl[pfi1].list[mvf->ref_idx[pfi1]];\n+            if (islt0 || poc1 == poc0) {\n+                return mvf->xy + pfi1;\n+            }\n+            *mv_t = mv_scale_xy(mvf->xy[pfi1], poc_cur - poc1, poc_cur - poc0);\n+            return mv_t;\n+        }\n+    }\n+    return NULL;\n+}\n+\n+void ff_hevc_rpi_luma_mv_mvp_mode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+    const unsigned int x0, const unsigned int y0,\n+    const unsigned int nPbW, const unsigned int nPbH,\n+    const unsigned int avail,\n+    HEVCRpiMvField * const mv,\n+    const unsigned int mvp_lx_flag, const unsigned int LX)\n+{\n+    const unsigned int pfi0 = LX;\n+    const unsigned int pfi1 = LX == 0 ? 1 : 0;\n+    const RefPicList * const rpl = s->refPicList;\n+    const int poc0 = rpl[LX].list[mv->ref_idx[LX]];\n+    const int poc_cur = s->poc;\n+    const int islt0 = rpl[LX].isLongTerm[mv->ref_idx[LX]];\n+\n+    const HEVCRpiMvField * mvf_a1 = mvf_ptr(s, lc, x0, y0, x0 - 1, y0 + nPbH - 1);\n+    const HEVCRpiMvField * mvf_a0 = mvf_a1 + mvf_left_stride(s, x0, x0 - 1);\n+    const HEVCRpiMvField * mvf_b2 = mvf_ptr(s, lc, x0, y0, x0 - 1, y0 - 1);  // UL\n+    const HEVCRpiMvField * mvf_b1 = mvf_ptr(s, lc, x0, y0, x0 + nPbW - 1, y0 - 1);\n+    const HEVCRpiMvField * mvf_b0 = mvf_b1 + 1;\n+    const MvXY * mva = NULL;\n+    const MvXY * mvb;\n+    MvXY * const mv_rv = mv->xy + LX;\n+    MvXY mvt_a, mvt_b;\n+\n+    *mv_rv = 0;\n+\n+    if ((avail & AVAIL_DL) == 0 || mvf_a0->pred_flag == PF_INTRA)\n+        mvf_a0 = NULL;\n+    else if ((mva = mvf_same_poc(rpl, pfi0, pfi1, poc0, mvf_a0)) != NULL && mvp_lx_flag == 0)\n+        goto use_mva;\n+\n+    if ((avail & AVAIL_L) == 0 || mvf_a1->pred_flag == PF_INTRA)\n+        mvf_a1 = NULL;\n+\n+    if (mva == NULL &&\n+        (mva = mvf_same_poc(rpl, pfi0, pfi1, poc0, mvf_a1)) == NULL &&\n+        (mva = mvf_other_poc(rpl, pfi0, pfi1, islt0, poc0, poc_cur, &mvt_a, mvf_a0)) == NULL)\n+        mva = mvf_other_poc(rpl, pfi0, pfi1, islt0, poc0, poc_cur, &mvt_a, mvf_a1);\n+\n+    if (mvp_lx_flag == 0 && mva != NULL)\n+        goto use_mva;\n+\n+    if ((avail & AVAIL_UR) == 0 || mvf_b0->pred_flag == PF_INTRA)\n+        mvf_b0 = NULL;\n+    if ((avail & AVAIL_U) == 0 || mvf_b1->pred_flag == PF_INTRA)\n+        mvf_b1 = NULL;\n+    if ((avail & AVAIL_UL) == 0 || mvf_b2->pred_flag == PF_INTRA)\n+        mvf_b2 = NULL;\n+\n+    if ((mvb = mvf_same_poc(rpl, pfi0, pfi1, poc0, mvf_b0)) == NULL &&\n+        (mvb = mvf_same_poc(rpl, pfi0, pfi1, poc0, mvf_b1)) == NULL)\n+        mvb = mvf_same_poc(rpl, pfi0, pfi1, poc0, mvf_b2);\n+\n+    if (mvf_a0 == NULL && mvf_a1 == NULL) {\n+        mva = mvb;\n+        if (mvp_lx_flag == 0 && mva != NULL)\n+            goto use_mva;\n+\n+        if ((mvb = mvf_other_poc(rpl, pfi0, pfi1, islt0, poc0, poc_cur, &mvt_b, mvf_b0)) == NULL &&\n+            (mvb = mvf_other_poc(rpl, pfi0, pfi1, islt0, poc0, poc_cur, &mvt_b, mvf_b1)) == NULL)\n+            mvb = mvf_other_poc(rpl, pfi0, pfi1, islt0, poc0, poc_cur, &mvt_b, mvf_b2);\n+    }\n+\n+    if (mva == NULL) {\n+        mva = mvb;\n+        mvb = NULL;\n+    }\n+\n+    if (mvb != NULL && *mva == *mvb)  // If A == B then ignore B\n+        mvb = NULL;\n+\n+    if (mvp_lx_flag == 0 && mva != NULL) {\n+        goto use_mva;\n+    }\n+    else if (mvp_lx_flag != 0 && mvb != NULL) {\n+        *mv_rv = *mvb;\n+    }\n+    else if (s->sh.slice_temporal_mvp_enabled_flag && ((mvp_lx_flag == 0 && mva == NULL) || (mvp_lx_flag != 0 && mva != NULL))) {\n+        temporal_luma_motion_vector(s, lc, x0, y0, nPbW,\n+                                    nPbH, mv->ref_idx[LX],\n+                                    mv_rv, LX);\n+    }\n+    return;\n+\n+use_mva:\n+    *mv_rv = *mva;\n+    return;\n+}\n+\ndiff --git a/libavcodec/rpi_hevc_parse.c b/libavcodec/rpi_hevc_parse.c\nnew file mode 100644\nindex 0000000000..e58a59ce5e\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_parse.c\n@@ -0,0 +1,143 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"bytestream.h\"\n+#include \"h2645_parse.h\"\n+#include \"hevc.h\"\n+#include \"rpi_hevc_parse.h\"\n+\n+static int hevc_decode_nal_units(const uint8_t *buf, int buf_size, HEVCRpiParamSets *ps,\n+                                 HEVCSEIContext *sei, int is_nalff, int nal_length_size,\n+                                 int err_recognition, int apply_defdispwin, void *logctx)\n+{\n+    int i;\n+    int ret = 0;\n+    H2645Packet pkt = { 0 };\n+\n+    ret = ff_h2645_packet_split(&pkt, buf, buf_size, logctx, is_nalff,\n+                                nal_length_size, AV_CODEC_ID_HEVC, 1, 0);\n+    if (ret < 0) {\n+        goto done;\n+    }\n+\n+    for (i = 0; i < pkt.nb_nals; i++) {\n+        H2645NAL *nal = &pkt.nals[i];\n+\n+        /* ignore everything except parameter sets and VCL NALUs */\n+        switch (nal->type) {\n+        case HEVC_NAL_VPS:\n+            ret = ff_hevc_rpi_decode_nal_vps(&nal->gb, logctx, ps);\n+            if (ret < 0)\n+                goto done;\n+            break;\n+        case HEVC_NAL_SPS:\n+            ret = ff_hevc_rpi_decode_nal_sps(&nal->gb, logctx, ps, apply_defdispwin);\n+            if (ret < 0)\n+                goto done;\n+            break;\n+        case HEVC_NAL_PPS:\n+            ret = ff_hevc_rpi_decode_nal_pps(&nal->gb, logctx, ps);\n+            if (ret < 0)\n+                goto done;\n+            break;\n+        case HEVC_NAL_SEI_PREFIX:\n+        case HEVC_NAL_SEI_SUFFIX:\n+            ret = ff_hevc_rpi_decode_nal_sei(&nal->gb, logctx, sei, ps, nal->type);\n+            if (ret < 0)\n+                goto done;\n+            break;\n+        default:\n+            av_log(logctx, AV_LOG_VERBOSE, \"Ignoring NAL type %d in extradata\\n\", nal->type);\n+            break;\n+        }\n+    }\n+\n+done:\n+    ff_h2645_packet_uninit(&pkt);\n+    if (err_recognition & AV_EF_EXPLODE)\n+        return ret;\n+\n+    return 0;\n+}\n+\n+int ff_hevc_rpi_decode_extradata(const uint8_t *data, int size, HEVCRpiParamSets *ps,\n+                             HEVCSEIContext *sei, int *is_nalff, int *nal_length_size,\n+                             int err_recognition, int apply_defdispwin, void *logctx)\n+{\n+    int ret = 0;\n+    GetByteContext gb;\n+\n+    bytestream2_init(&gb, data, size);\n+\n+    if (size > 3 && (data[0] || data[1] || data[2] > 1)) {\n+        /* It seems the extradata is encoded as hvcC format.\n+         * Temporarily, we support configurationVersion==0 until 14496-15 3rd\n+         * is finalized. When finalized, configurationVersion will be 1 and we\n+         * can recognize hvcC by checking if avctx->extradata[0]==1 or not. */\n+        int i, j, num_arrays, nal_len_size;\n+\n+        *is_nalff = 1;\n+\n+        bytestream2_skip(&gb, 21);\n+        nal_len_size = (bytestream2_get_byte(&gb) & 3) + 1;\n+        num_arrays   = bytestream2_get_byte(&gb);\n+\n+        /* nal units in the hvcC always have length coded with 2 bytes,\n+         * so put a fake nal_length_size = 2 while parsing them */\n+        *nal_length_size = 2;\n+\n+        /* Decode nal units from hvcC. */\n+        for (i = 0; i < num_arrays; i++) {\n+            int type = bytestream2_get_byte(&gb) & 0x3f;\n+            int cnt  = bytestream2_get_be16(&gb);\n+\n+            for (j = 0; j < cnt; j++) {\n+                // +2 for the nal size field\n+                int nalsize = bytestream2_peek_be16(&gb) + 2;\n+                if (bytestream2_get_bytes_left(&gb) < nalsize) {\n+                    av_log(logctx, AV_LOG_ERROR,\n+                           \"Invalid NAL unit size in extradata.\\n\");\n+                    return AVERROR_INVALIDDATA;\n+                }\n+\n+                ret = hevc_decode_nal_units(gb.buffer, nalsize, ps, sei, *is_nalff,\n+                                            *nal_length_size, err_recognition, apply_defdispwin,\n+                                            logctx);\n+                if (ret < 0) {\n+                    av_log(logctx, AV_LOG_ERROR,\n+                           \"Decoding nal unit %d %d from hvcC failed\\n\",\n+                           type, i);\n+                    return ret;\n+                }\n+                bytestream2_skip(&gb, nalsize);\n+            }\n+        }\n+\n+        /* Now store right nal length size, that will be used to parse\n+         * all other nals */\n+        *nal_length_size = nal_len_size;\n+    } else {\n+        *is_nalff = 0;\n+        ret = hevc_decode_nal_units(data, size, ps, sei, *is_nalff, *nal_length_size,\n+                                    err_recognition, apply_defdispwin, logctx);\n+        if (ret < 0)\n+            return ret;\n+    }\n+\n+    return ret;\n+}\ndiff --git a/libavcodec/rpi_hevc_parse.h b/libavcodec/rpi_hevc_parse.h\nnew file mode 100644\nindex 0000000000..4b4d032a16\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_parse.h\n@@ -0,0 +1,36 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+/**\n+ * @file\n+ * H.265 parser code\n+ */\n+\n+#ifndef AVCODEC_RPI_HEVC_PARSE_H\n+#define AVCODEC_RPI_HEVC_PARSE_H\n+\n+#include <stdint.h>\n+\n+#include \"rpi_hevc_ps.h\"\n+#include \"rpi_hevc_sei.h\"\n+\n+int ff_hevc_rpi_decode_extradata(const uint8_t *data, int size, HEVCRpiParamSets *ps,\n+                             HEVCSEIContext *sei, int *is_nalff, int *nal_length_size,\n+                             int err_recognition, int apply_defdispwin, void *logctx);\n+\n+#endif /* AVCODEC_RPI_HEVC_PARSE_H */\ndiff --git a/libavcodec/rpi_hevc_ps.c b/libavcodec/rpi_hevc_ps.c\nnew file mode 100644\nindex 0000000000..f4e31f7d1d\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_ps.c\n@@ -0,0 +1,1938 @@\n+/*\n+ * HEVC Parameter Set decoding\n+ *\n+ * Copyright (C) 2012 - 2103 Guillaume Martres\n+ * Copyright (C) 2012 - 2103 Mickael Raulet\n+ * Copyright (C) 2012 - 2013 Gildas Cocherel\n+ * Copyright (C) 2013 Vittorio Giovara\n+ * Copyright (C) 2018 John Cox for Raspberry Pi (Trading)\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"libavutil/imgutils.h\"\n+#include \"golomb.h\"\n+#include \"rpi_hevc_data.h\"\n+#include \"rpi_hevc_ps.h\"\n+#include \"rpi_hevcdec.h\"\n+\n+static const uint8_t default_scaling_list_intra[] = {\n+    16, 16, 16, 16, 17, 18, 21, 24,\n+    16, 16, 16, 16, 17, 19, 22, 25,\n+    16, 16, 17, 18, 20, 22, 25, 29,\n+    16, 16, 18, 21, 24, 27, 31, 36,\n+    17, 17, 20, 24, 30, 35, 41, 47,\n+    18, 19, 22, 27, 35, 44, 54, 65,\n+    21, 22, 25, 31, 41, 54, 70, 88,\n+    24, 25, 29, 36, 47, 65, 88, 115\n+};\n+\n+static const uint8_t default_scaling_list_inter[] = {\n+    16, 16, 16, 16, 17, 18, 20, 24,\n+    16, 16, 16, 17, 18, 20, 24, 25,\n+    16, 16, 17, 18, 20, 24, 25, 28,\n+    16, 17, 18, 20, 24, 25, 28, 33,\n+    17, 18, 20, 24, 25, 28, 33, 41,\n+    18, 20, 24, 25, 28, 33, 41, 54,\n+    20, 24, 25, 28, 33, 41, 54, 71,\n+    24, 25, 28, 33, 41, 54, 71, 91\n+};\n+\n+static const AVRational vui_sar[] = {\n+    {  0,   1 },\n+    {  1,   1 },\n+    { 12,  11 },\n+    { 10,  11 },\n+    { 16,  11 },\n+    { 40,  33 },\n+    { 24,  11 },\n+    { 20,  11 },\n+    { 32,  11 },\n+    { 80,  33 },\n+    { 18,  11 },\n+    { 15,  11 },\n+    { 64,  33 },\n+    { 160, 99 },\n+    {  4,   3 },\n+    {  3,   2 },\n+    {  2,   1 },\n+};\n+\n+\n+// pps_cb_qp_offset: -12,+12\n+// slice_cb_qp_offset: -12,+12 also\n+//   \"The value of pps_cb_qp_offset + slice_cb_qp_offset shall be in the range of -12 to +12, inclusive.\"\n+// cr_qp_offset_list[n]: -12,+12\n+// So worst case total offset: -24,+24\n+\n+#define T(n) ((((48+(n))/6-10)<<3) | (48+(n))%6)\n+#define C(B,n) T(B*6+(n) < 0 ? -B*6 : (n) > 51 ? 51 : (n))\n+#define M(B,n) C(B,(-n))\n+\n+// Sizeof the QP_START_BLOCK\n+#define QP_OFFSET_0 (8*6 + 12*2)\n+#define QP_START(B) \\\n+    M(B,48), M(B,48), M(B,48), M(B,48), M(B,48), M(B,48),\\\n+    M(B,48), M(B,48), M(B,48), M(B,48), M(B,48), M(B,48),\\\n+    M(B,48), M(B,48), M(B,48), M(B,48), M(B,48), M(B,48),\\\n+    M(B,48), M(B,48), M(B,48), M(B,48), M(B,48), M(B,48),\\\n+\\\n+    M(B,48), M(B,47), M(B,46), M(B,45), M(B,44), M(B,43),\\\n+    M(B,42), M(B,41), M(B,40), M(B,39), M(B,38), M(B,37),\\\n+    M(B,36), M(B,35), M(B,34), M(B,33), M(B,32), M(B,31),\\\n+    M(B,30), M(B,29), M(B,28), M(B,27), M(B,26), M(B,25),\\\n+    M(B,24), M(B,23), M(B,22), M(B,21), M(B,20), M(B,19),\\\n+    M(B,18), M(B,17), M(B,16), M(B,15), M(B,14), M(B,13),\\\n+    M(B,12), M(B,11), M(B,10), M(B, 9), M(B, 8), M(B, 7),\\\n+    M(B, 6), M(B, 5), M(B, 4), M(B, 3), M(B, 2), M(B, 1)\n+#define QP_END(B) \\\n+    C(B,51), C(B,51), C(B,51), C(B,51), C(B,51), C(B,51),\\\n+    C(B,51), C(B,51), C(B,51), C(B,51), C(B,51), C(B,51),\\\n+    C(B,51), C(B,51), C(B,51), C(B,51), C(B,51), C(B,51)\n+\n+#define T1(B)\\\n+{\\\n+    QP_START(B),\\\n+    C(B, 0), C(B, 1), C(B, 2), C(B, 3), C(B, 4), C(B, 5), C(B, 6), C(B, 7), C(B, 8), C(B, 9),\\\n+    C(B,10), C(B,11), C(B,12), C(B,13), C(B,14), C(B,15), C(B,16), C(B,17), C(B,18), C(B,19),\\\n+    C(B,20), C(B,21), C(B,22), C(B,23), C(B,24), C(B,25), C(B,26), C(B,27), C(B,28), C(B,29),\\\n+    C(B,29), C(B,30), C(B,31), C(B,32), C(B,33), C(B,33), C(B,34), C(B,34), C(B,35), C(B,35),\\\n+    C(B,36), C(B,36), C(B,37), C(B,37), C(B,38), C(B,39), C(B,40), C(B,41), C(B,42), C(B,43),\\\n+    C(B,44), C(B,45),\\\n+    C(B,46), C(B,47), C(B,48), C(B,49), C(B,50), C(B,51),\\\n+    QP_END(B)\\\n+}\n+#define T0(B)\\\n+{\\\n+    QP_START(B),\\\n+    C(B, 0), C(B, 1), C(B, 2), C(B, 3), C(B, 4), C(B, 5), C(B, 6), C(B, 7), C(B, 8), C(B, 9),\\\n+    C(B,10), C(B,11), C(B,12), C(B,13), C(B,14), C(B,15), C(B,16), C(B,17), C(B,18), C(B,19),\\\n+    C(B,20), C(B,21), C(B,22), C(B,23), C(B,24), C(B,25), C(B,26), C(B,27), C(B,28), C(B,29),\\\n+    C(B,30), C(B,31), C(B,32), C(B,33), C(B,34), C(B,35), C(B,36), C(B,37), C(B,38), C(B,39),\\\n+    C(B,40), C(B,41), C(B,42), C(B,43), C(B,44), C(B,45), C(B,46), C(B,47), C(B,48), C(B,49),\\\n+    C(B,50), C(B,51),\\\n+    C(B,51), C(B,51), C(B,51), C(B,51), C(B,51), C(B,51),\\\n+    QP_END(B)\\\n+}\n+\n+#define QP_TABLE_SIZE (QP_OFFSET_0 + 52 + 12*2)\n+\n+static const int8_t qp_c_bd_0[8][QP_TABLE_SIZE] = {T0(0),T0(1),T0(2),T0(3),T0(4),T0(5),T0(6),T0(7)};\n+static const int8_t qp_c_bd_1[8][QP_TABLE_SIZE] = {T1(0),T1(1),T1(2),T1(3),T1(4),T1(5),T1(6),T1(7)};\n+\n+#undef T\n+#undef C\n+#undef QP_END\n+\n+#define C(B,n) ((n)<0?0:(n)>51?51:(n))\n+// We do need a lot of -ve padding to cope with high bit depths that give -ve qps\n+#define QP_DBLK_OFFSET_0 QP_OFFSET_0\n+#define QP_END(B)\\\n+ 51, 51, 51, 51, 51, 51\n+\n+// These don't need all the padding we have here (12 top/bottom would be enough)\n+static const uint8_t qp_c_dblk_0[] = T0(0);\n+static const uint8_t qp_c_dblk_1[] = T1(0);\n+\n+#undef T\n+#undef M\n+#undef C\n+#undef QP_END\n+#undef QP_START\n+\n+\n+static void remove_pps(HEVCRpiParamSets * const s, const int id)\n+{\n+    if (s->pps_list[id] && s->pps == (const HEVCRpiPPS*)s->pps_list[id]->data)\n+        s->pps = NULL;\n+    av_buffer_unref(&s->pps_list[id]);\n+}\n+\n+static void remove_sps(HEVCRpiParamSets * const s, const int id)\n+{\n+    int i;\n+    if (s->sps_list[id]) {\n+        if (s->sps == (const HEVCRpiSPS*)s->sps_list[id]->data)\n+            s->sps = NULL;\n+\n+        /* drop all PPS that depend on this SPS */\n+        for (i = 0; i < FF_ARRAY_ELEMS(s->pps_list); i++)\n+            if (s->pps_list[i] && ((HEVCRpiPPS*)s->pps_list[i]->data)->sps_id == id)\n+                remove_pps(s, i);\n+\n+        av_assert0(!(s->sps_list[id] && s->sps == (HEVCRpiSPS*)s->sps_list[id]->data));\n+    }\n+    av_buffer_unref(&s->sps_list[id]);\n+}\n+\n+static void remove_vps(HEVCRpiParamSets * const s, const int id)\n+{\n+    int i;\n+    if (s->vps_list[id]) {\n+        if (s->vps == (const HEVCRpiVPS*)s->vps_list[id]->data)\n+            s->vps = NULL;\n+\n+        for (i = 0; i < FF_ARRAY_ELEMS(s->sps_list); i++)\n+            if (s->sps_list[i] && ((HEVCRpiSPS*)s->sps_list[i]->data)->vps_id == id)\n+                remove_sps(s, i);\n+    }\n+    av_buffer_unref(&s->vps_list[id]);\n+}\n+\n+int ff_hevc_rpi_decode_short_term_rps(GetBitContext * const gb, AVCodecContext * const avctx,\n+                                  ShortTermRPS * const rps, const HEVCRpiSPS * const sps, const int is_slice_header)\n+{\n+    uint8_t rps_predict = 0;\n+    int delta_poc;\n+    int k0 = 0;\n+    int k1 = 0;\n+    int k  = 0;\n+    int i;\n+\n+    if (rps != sps->st_rps && sps->nb_st_rps)\n+        rps_predict = get_bits1(gb);\n+\n+    if (rps_predict) {\n+        const ShortTermRPS *rps_ridx;\n+        int delta_rps;\n+        unsigned abs_delta_rps;\n+        uint8_t use_delta_flag = 0;\n+        uint8_t delta_rps_sign;\n+\n+        if (is_slice_header) {\n+            unsigned int delta_idx = get_ue_golomb_long(gb) + 1;\n+            if (delta_idx > sps->nb_st_rps) {\n+                av_log(avctx, AV_LOG_ERROR,\n+                       \"Invalid value of delta_idx in slice header RPS: %d > %d.\\n\",\n+                       delta_idx, sps->nb_st_rps);\n+                return AVERROR_INVALIDDATA;\n+            }\n+            rps_ridx = &sps->st_rps[sps->nb_st_rps - delta_idx];\n+            rps->rps_idx_num_delta_pocs = rps_ridx->num_delta_pocs;\n+        } else\n+            rps_ridx = &sps->st_rps[rps - sps->st_rps - 1];\n+\n+        delta_rps_sign = get_bits1(gb);\n+        abs_delta_rps  = get_ue_golomb_long(gb) + 1;\n+        if (abs_delta_rps < 1 || abs_delta_rps > 32768) {\n+            av_log(avctx, AV_LOG_ERROR,\n+                   \"Invalid value of abs_delta_rps: %d\\n\",\n+                   abs_delta_rps);\n+            return AVERROR_INVALIDDATA;\n+        }\n+        delta_rps      = (1 - (delta_rps_sign << 1)) * abs_delta_rps;\n+        for (i = 0; i <= rps_ridx->num_delta_pocs; i++) {\n+            int used = rps->used[k] = get_bits1(gb);\n+\n+            if (!used)\n+                use_delta_flag = get_bits1(gb);\n+\n+            if (used || use_delta_flag) {\n+                if (i < rps_ridx->num_delta_pocs)\n+                    delta_poc = delta_rps + rps_ridx->delta_poc[i];\n+                else\n+                    delta_poc = delta_rps;\n+                rps->delta_poc[k] = delta_poc;\n+                if (delta_poc < 0)\n+                    k0++;\n+                else\n+                    k1++;\n+                k++;\n+            }\n+        }\n+\n+        if (k >= FF_ARRAY_ELEMS(rps->used)) {\n+            av_log(avctx, AV_LOG_ERROR,\n+                   \"Invalid num_delta_pocs: %d\\n\", k);\n+            return AVERROR_INVALIDDATA;\n+        }\n+\n+        rps->num_delta_pocs    = k;\n+        rps->num_negative_pics = k0;\n+        // sort in increasing order (smallest first)\n+        if (rps->num_delta_pocs != 0) {\n+            int used, tmp;\n+            for (i = 1; i < rps->num_delta_pocs; i++) {\n+                delta_poc = rps->delta_poc[i];\n+                used      = rps->used[i];\n+                for (k = i - 1; k >= 0; k--) {\n+                    tmp = rps->delta_poc[k];\n+                    if (delta_poc < tmp) {\n+                        rps->delta_poc[k + 1] = tmp;\n+                        rps->used[k + 1]      = rps->used[k];\n+                        rps->delta_poc[k]     = delta_poc;\n+                        rps->used[k]          = used;\n+                    }\n+                }\n+            }\n+        }\n+        if ((rps->num_negative_pics >> 1) != 0) {\n+            int used;\n+            k = rps->num_negative_pics - 1;\n+            // flip the negative values to largest first\n+            for (i = 0; i < rps->num_negative_pics >> 1; i++) {\n+                delta_poc         = rps->delta_poc[i];\n+                used              = rps->used[i];\n+                rps->delta_poc[i] = rps->delta_poc[k];\n+                rps->used[i]      = rps->used[k];\n+                rps->delta_poc[k] = delta_poc;\n+                rps->used[k]      = used;\n+                k--;\n+            }\n+        }\n+    } else {\n+        unsigned int prev, nb_positive_pics;\n+        rps->num_negative_pics = get_ue_golomb_long(gb);\n+        nb_positive_pics       = get_ue_golomb_long(gb);\n+\n+        if (rps->num_negative_pics >= HEVC_MAX_REFS ||\n+            nb_positive_pics >= HEVC_MAX_REFS) {\n+            av_log(avctx, AV_LOG_ERROR, \"Too many refs in a short term RPS.\\n\");\n+            return AVERROR_INVALIDDATA;\n+        }\n+\n+        rps->num_delta_pocs = rps->num_negative_pics + nb_positive_pics;\n+        if (rps->num_delta_pocs) {\n+            prev = 0;\n+            for (i = 0; i < rps->num_negative_pics; i++) {\n+                delta_poc = get_ue_golomb_long(gb) + 1;\n+                if (delta_poc < 1 || delta_poc > 32768) {\n+                    av_log(avctx, AV_LOG_ERROR,\n+                        \"Invalid value of delta_poc: %d\\n\",\n+                        delta_poc);\n+                    return AVERROR_INVALIDDATA;\n+                }\n+                prev -= delta_poc;\n+                rps->delta_poc[i] = prev;\n+                rps->used[i]      = get_bits1(gb);\n+            }\n+            prev = 0;\n+            for (i = 0; i < nb_positive_pics; i++) {\n+                delta_poc = get_ue_golomb_long(gb) + 1;\n+                if (delta_poc < 1 || delta_poc > 32768) {\n+                    av_log(avctx, AV_LOG_ERROR,\n+                        \"Invalid value of delta_poc: %d\\n\",\n+                        delta_poc);\n+                    return AVERROR_INVALIDDATA;\n+                }\n+                prev += delta_poc;\n+                rps->delta_poc[rps->num_negative_pics + i] = prev;\n+                rps->used[rps->num_negative_pics + i]      = get_bits1(gb);\n+            }\n+        }\n+    }\n+    return 0;\n+}\n+\n+\n+static int decode_profile_tier_level(GetBitContext * const gb, AVCodecContext * const avctx,\n+                                      PTLCommon * const ptl)\n+{\n+    int i;\n+\n+    if (get_bits_left(gb) < 2+1+5 + 32 + 4 + 16 + 16 + 12)\n+        return -1;\n+\n+    ptl->profile_space = get_bits(gb, 2);\n+    ptl->tier_flag     = get_bits1(gb);\n+    ptl->profile_idc   = get_bits(gb, 5);\n+    if (ptl->profile_idc == FF_PROFILE_HEVC_MAIN)\n+        av_log(avctx, AV_LOG_DEBUG, \"Main profile bitstream\\n\");\n+    else if (ptl->profile_idc == FF_PROFILE_HEVC_MAIN_10)\n+        av_log(avctx, AV_LOG_DEBUG, \"Main 10 profile bitstream\\n\");\n+    else if (ptl->profile_idc == FF_PROFILE_HEVC_MAIN_STILL_PICTURE)\n+        av_log(avctx, AV_LOG_DEBUG, \"Main Still Picture profile bitstream\\n\");\n+    else if (ptl->profile_idc == FF_PROFILE_HEVC_REXT)\n+        av_log(avctx, AV_LOG_DEBUG, \"Range Extension profile bitstream\\n\");\n+    else\n+        av_log(avctx, AV_LOG_WARNING, \"Unknown HEVC profile: %d\\n\", ptl->profile_idc);\n+\n+    for (i = 0; i < 32; i++) {\n+        ptl->profile_compatibility_flag[i] = get_bits1(gb);\n+\n+        if (ptl->profile_idc == 0 && i > 0 && ptl->profile_compatibility_flag[i])\n+            ptl->profile_idc = i;\n+    }\n+    ptl->progressive_source_flag    = get_bits1(gb);\n+    ptl->interlaced_source_flag     = get_bits1(gb);\n+    ptl->non_packed_constraint_flag = get_bits1(gb);\n+    ptl->frame_only_constraint_flag = get_bits1(gb);\n+\n+    skip_bits(gb, 16); // XXX_reserved_zero_44bits[0..15]\n+    skip_bits(gb, 16); // XXX_reserved_zero_44bits[16..31]\n+    skip_bits(gb, 12); // XXX_reserved_zero_44bits[32..43]\n+\n+    return 0;\n+}\n+\n+static int parse_ptl(GetBitContext * const gb, AVCodecContext * const avctx,\n+                      PTL * const ptl, const int max_num_sub_layers)\n+{\n+    int i;\n+    if (decode_profile_tier_level(gb, avctx, &ptl->general_ptl) < 0 ||\n+        get_bits_left(gb) < 8 + (8*2 * (max_num_sub_layers - 1 > 0))) {\n+        av_log(avctx, AV_LOG_ERROR, \"PTL information too short\\n\");\n+        return -1;\n+    }\n+\n+    ptl->general_ptl.level_idc = get_bits(gb, 8);\n+\n+    for (i = 0; i < max_num_sub_layers - 1; i++) {\n+        ptl->sub_layer_profile_present_flag[i] = get_bits1(gb);\n+        ptl->sub_layer_level_present_flag[i]   = get_bits1(gb);\n+    }\n+\n+    if (max_num_sub_layers - 1> 0)\n+        for (i = max_num_sub_layers - 1; i < 8; i++)\n+            skip_bits(gb, 2); // reserved_zero_2bits[i]\n+    for (i = 0; i < max_num_sub_layers - 1; i++) {\n+        if (ptl->sub_layer_profile_present_flag[i] &&\n+            decode_profile_tier_level(gb, avctx, &ptl->sub_layer_ptl[i]) < 0) {\n+            av_log(avctx, AV_LOG_ERROR,\n+                   \"PTL information for sublayer %i too short\\n\", i);\n+            return -1;\n+        }\n+        if (ptl->sub_layer_level_present_flag[i]) {\n+            if (get_bits_left(gb) < 8) {\n+                av_log(avctx, AV_LOG_ERROR,\n+                       \"Not enough data for sublayer %i level_idc\\n\", i);\n+                return -1;\n+            } else\n+                ptl->sub_layer_ptl[i].level_idc = get_bits(gb, 8);\n+        }\n+    }\n+\n+    return 0;\n+}\n+\n+static void decode_sublayer_hrd(GetBitContext * const gb, const unsigned int nb_cpb,\n+                                const int subpic_params_present)\n+{\n+    int i;\n+\n+    for (i = 0; i < nb_cpb; i++) {\n+        get_ue_golomb_long(gb); // bit_rate_value_minus1\n+        get_ue_golomb_long(gb); // cpb_size_value_minus1\n+\n+        if (subpic_params_present) {\n+            get_ue_golomb_long(gb); // cpb_size_du_value_minus1\n+            get_ue_golomb_long(gb); // bit_rate_du_value_minus1\n+        }\n+        skip_bits1(gb); // cbr_flag\n+    }\n+}\n+\n+static int decode_hrd(GetBitContext * const gb, const int common_inf_present,\n+                      const int max_sublayers)\n+{\n+    int nal_params_present = 0, vcl_params_present = 0;\n+    int subpic_params_present = 0;\n+    int i;\n+\n+    if (common_inf_present) {\n+        nal_params_present = get_bits1(gb);\n+        vcl_params_present = get_bits1(gb);\n+\n+        if (nal_params_present || vcl_params_present) {\n+            subpic_params_present = get_bits1(gb);\n+\n+            if (subpic_params_present) {\n+                skip_bits(gb, 8); // tick_divisor_minus2\n+                skip_bits(gb, 5); // du_cpb_removal_delay_increment_length_minus1\n+                skip_bits(gb, 1); // sub_pic_cpb_params_in_pic_timing_sei_flag\n+                skip_bits(gb, 5); // dpb_output_delay_du_length_minus1\n+            }\n+\n+            skip_bits(gb, 4); // bit_rate_scale\n+            skip_bits(gb, 4); // cpb_size_scale\n+\n+            if (subpic_params_present)\n+                skip_bits(gb, 4);  // cpb_size_du_scale\n+\n+            skip_bits(gb, 5); // initial_cpb_removal_delay_length_minus1\n+            skip_bits(gb, 5); // au_cpb_removal_delay_length_minus1\n+            skip_bits(gb, 5); // dpb_output_delay_length_minus1\n+        }\n+    }\n+\n+    for (i = 0; i < max_sublayers; i++) {\n+        int low_delay = 0;\n+        unsigned int nb_cpb = 1;\n+        int fixed_rate = get_bits1(gb);\n+\n+        if (!fixed_rate)\n+            fixed_rate = get_bits1(gb);\n+\n+        if (fixed_rate)\n+            get_ue_golomb_long(gb);  // elemental_duration_in_tc_minus1\n+        else\n+            low_delay = get_bits1(gb);\n+\n+        if (!low_delay) {\n+            nb_cpb = get_ue_golomb_long(gb) + 1;\n+            if (nb_cpb < 1 || nb_cpb > 32) {\n+                av_log(NULL, AV_LOG_ERROR, \"nb_cpb %d invalid\\n\", nb_cpb);\n+                return AVERROR_INVALIDDATA;\n+            }\n+        }\n+\n+        if (nal_params_present)\n+            decode_sublayer_hrd(gb, nb_cpb, subpic_params_present);\n+        if (vcl_params_present)\n+            decode_sublayer_hrd(gb, nb_cpb, subpic_params_present);\n+    }\n+    return 0;\n+}\n+\n+int ff_hevc_rpi_decode_nal_vps(GetBitContext * const gb, AVCodecContext * const avctx,\n+                           HEVCRpiParamSets * const ps)\n+{\n+    int i,j;\n+    int vps_id = 0;\n+    ptrdiff_t nal_size;\n+    HEVCRpiVPS *vps;\n+    AVBufferRef *vps_buf = av_buffer_allocz(sizeof(*vps));\n+\n+    if (!vps_buf)\n+        return AVERROR(ENOMEM);\n+    vps = (HEVCRpiVPS*)vps_buf->data;\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"Decoding VPS\\n\");\n+\n+    nal_size = gb->buffer_end - gb->buffer;\n+    if (nal_size > sizeof(vps->data)) {\n+        av_log(avctx, AV_LOG_WARNING, \"Truncating likely oversized VPS \"\n+               \"(%\"PTRDIFF_SPECIFIER\" > %\"SIZE_SPECIFIER\")\\n\",\n+               nal_size, sizeof(vps->data));\n+        vps->data_size = sizeof(vps->data);\n+    } else {\n+        vps->data_size = nal_size;\n+    }\n+    memcpy(vps->data, gb->buffer, vps->data_size);\n+\n+    vps_id = get_bits(gb, 4);\n+    if (vps_id >= HEVC_MAX_VPS_COUNT) {\n+        av_log(avctx, AV_LOG_ERROR, \"VPS id out of range: %d\\n\", vps_id);\n+        goto err;\n+    }\n+\n+    if (get_bits(gb, 2) != 3) { // vps_reserved_three_2bits\n+        av_log(avctx, AV_LOG_ERROR, \"vps_reserved_three_2bits is not three\\n\");\n+        goto err;\n+    }\n+\n+    vps->vps_max_layers               = get_bits(gb, 6) + 1;\n+    vps->vps_max_sub_layers           = get_bits(gb, 3) + 1;\n+    vps->vps_temporal_id_nesting_flag = get_bits1(gb);\n+\n+    if (get_bits(gb, 16) != 0xffff) { // vps_reserved_ffff_16bits\n+        av_log(avctx, AV_LOG_ERROR, \"vps_reserved_ffff_16bits is not 0xffff\\n\");\n+        goto err;\n+    }\n+\n+    if (vps->vps_max_sub_layers > HEVC_MAX_SUB_LAYERS) {\n+        av_log(avctx, AV_LOG_ERROR, \"vps_max_sub_layers out of range: %d\\n\",\n+               vps->vps_max_sub_layers);\n+        goto err;\n+    }\n+\n+    if (parse_ptl(gb, avctx, &vps->ptl, vps->vps_max_sub_layers) < 0)\n+        goto err;\n+\n+    vps->vps_sub_layer_ordering_info_present_flag = get_bits1(gb);\n+\n+    i = vps->vps_sub_layer_ordering_info_present_flag ? 0 : vps->vps_max_sub_layers - 1;\n+    for (; i < vps->vps_max_sub_layers; i++) {\n+        vps->vps_max_dec_pic_buffering[i] = get_ue_golomb_long(gb) + 1;\n+        vps->vps_num_reorder_pics[i]      = get_ue_golomb_long(gb);\n+        vps->vps_max_latency_increase[i]  = get_ue_golomb_long(gb) - 1;\n+\n+        if (vps->vps_max_dec_pic_buffering[i] > HEVC_MAX_DPB_SIZE || !vps->vps_max_dec_pic_buffering[i]) {\n+            av_log(avctx, AV_LOG_ERROR, \"vps_max_dec_pic_buffering_minus1 out of range: %d\\n\",\n+                   vps->vps_max_dec_pic_buffering[i] - 1);\n+            goto err;\n+        }\n+        if (vps->vps_num_reorder_pics[i] > vps->vps_max_dec_pic_buffering[i] - 1) {\n+            av_log(avctx, AV_LOG_WARNING, \"vps_max_num_reorder_pics out of range: %d\\n\",\n+                   vps->vps_num_reorder_pics[i]);\n+            if (avctx->err_recognition & AV_EF_EXPLODE)\n+                goto err;\n+        }\n+    }\n+\n+    vps->vps_max_layer_id   = get_bits(gb, 6);\n+    vps->vps_num_layer_sets = get_ue_golomb_long(gb) + 1;\n+    if (vps->vps_num_layer_sets < 1 || vps->vps_num_layer_sets > 1024 ||\n+        (vps->vps_num_layer_sets - 1LL) * (vps->vps_max_layer_id + 1LL) > get_bits_left(gb)) {\n+        av_log(avctx, AV_LOG_ERROR, \"too many layer_id_included_flags\\n\");\n+        goto err;\n+    }\n+\n+    for (i = 1; i < vps->vps_num_layer_sets; i++)\n+        for (j = 0; j <= vps->vps_max_layer_id; j++)\n+            skip_bits(gb, 1);  // layer_id_included_flag[i][j]\n+\n+    vps->vps_timing_info_present_flag = get_bits1(gb);\n+    if (vps->vps_timing_info_present_flag) {\n+        vps->vps_num_units_in_tick               = get_bits_long(gb, 32);\n+        vps->vps_time_scale                      = get_bits_long(gb, 32);\n+        vps->vps_poc_proportional_to_timing_flag = get_bits1(gb);\n+        if (vps->vps_poc_proportional_to_timing_flag)\n+            vps->vps_num_ticks_poc_diff_one = get_ue_golomb_long(gb) + 1;\n+        vps->vps_num_hrd_parameters = get_ue_golomb_long(gb);\n+        if (vps->vps_num_hrd_parameters > (unsigned)vps->vps_num_layer_sets) {\n+            av_log(avctx, AV_LOG_ERROR,\n+                   \"vps_num_hrd_parameters %d is invalid\\n\", vps->vps_num_hrd_parameters);\n+            goto err;\n+        }\n+        for (i = 0; i < vps->vps_num_hrd_parameters; i++) {\n+            int common_inf_present = 1;\n+\n+            get_ue_golomb_long(gb); // hrd_layer_set_idx\n+            if (i)\n+                common_inf_present = get_bits1(gb);\n+            decode_hrd(gb, common_inf_present, vps->vps_max_sub_layers);\n+        }\n+    }\n+    get_bits1(gb); /* vps_extension_flag */\n+\n+    if (get_bits_left(gb) < 0) {\n+        av_log(avctx, AV_LOG_ERROR,\n+               \"Overread VPS by %d bits\\n\", -get_bits_left(gb));\n+        if (ps->vps_list[vps_id])\n+            goto err;\n+    }\n+\n+    if (ps->vps_list[vps_id] &&\n+        !memcmp(ps->vps_list[vps_id]->data, vps_buf->data, vps_buf->size)) {\n+        av_buffer_unref(&vps_buf);\n+    } else {\n+        remove_vps(ps, vps_id);\n+        ps->vps_list[vps_id] = vps_buf;\n+    }\n+\n+    return 0;\n+\n+err:\n+    av_buffer_unref(&vps_buf);\n+    return AVERROR_INVALIDDATA;\n+}\n+\n+static void decode_vui(GetBitContext * const gb, AVCodecContext * const avctx,\n+                       const int apply_defdispwin, HEVCRpiSPS * const sps)\n+{\n+    VUI backup_vui, * const vui = &sps->vui;\n+    GetBitContext backup;\n+    int sar_present, alt = 0;\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"Decoding VUI\\n\");\n+\n+    sar_present = get_bits1(gb);\n+    if (sar_present) {\n+        uint8_t sar_idx = get_bits(gb, 8);\n+        if (sar_idx < FF_ARRAY_ELEMS(vui_sar))\n+            vui->sar = vui_sar[sar_idx];\n+        else if (sar_idx == 255) {\n+            vui->sar.num = get_bits(gb, 16);\n+            vui->sar.den = get_bits(gb, 16);\n+        } else\n+            av_log(avctx, AV_LOG_WARNING,\n+                   \"Unknown SAR index: %u.\\n\", sar_idx);\n+    }\n+\n+    vui->overscan_info_present_flag = get_bits1(gb);\n+    if (vui->overscan_info_present_flag)\n+        vui->overscan_appropriate_flag = get_bits1(gb);\n+\n+    vui->video_signal_type_present_flag = get_bits1(gb);\n+    if (vui->video_signal_type_present_flag) {\n+        vui->video_format                    = get_bits(gb, 3);\n+        vui->video_full_range_flag           = get_bits1(gb);\n+        vui->colour_description_present_flag = get_bits1(gb);\n+        if (vui->video_full_range_flag && sps->pix_fmt == AV_PIX_FMT_YUV420P)\n+            sps->pix_fmt = AV_PIX_FMT_YUVJ420P;\n+        if (vui->colour_description_present_flag) {\n+            vui->colour_primaries        = get_bits(gb, 8);\n+            vui->transfer_characteristic = get_bits(gb, 8);\n+            vui->matrix_coeffs           = get_bits(gb, 8);\n+\n+            // Set invalid values to \"unspecified\"\n+            if (!av_color_primaries_name(vui->colour_primaries))\n+                vui->colour_primaries = AVCOL_PRI_UNSPECIFIED;\n+            if (!av_color_transfer_name(vui->transfer_characteristic))\n+                vui->transfer_characteristic = AVCOL_TRC_UNSPECIFIED;\n+            if (!av_color_space_name(vui->matrix_coeffs))\n+                vui->matrix_coeffs = AVCOL_SPC_UNSPECIFIED;\n+            if (vui->matrix_coeffs == AVCOL_SPC_RGB) {\n+                switch (sps->pix_fmt) {\n+                case AV_PIX_FMT_YUV444P:\n+                    sps->pix_fmt = AV_PIX_FMT_GBRP;\n+                    break;\n+                case AV_PIX_FMT_YUV444P10:\n+                    sps->pix_fmt = AV_PIX_FMT_GBRP10;\n+                    break;\n+                case AV_PIX_FMT_YUV444P12:\n+                    sps->pix_fmt = AV_PIX_FMT_GBRP12;\n+                    break;\n+                }\n+            }\n+        }\n+    }\n+\n+    vui->chroma_loc_info_present_flag = get_bits1(gb);\n+    if (vui->chroma_loc_info_present_flag) {\n+        vui->chroma_sample_loc_type_top_field    = get_ue_golomb_long(gb);\n+        vui->chroma_sample_loc_type_bottom_field = get_ue_golomb_long(gb);\n+    }\n+\n+    vui->neutra_chroma_indication_flag = get_bits1(gb);\n+    vui->field_seq_flag                = get_bits1(gb);\n+    vui->frame_field_info_present_flag = get_bits1(gb);\n+\n+    // Backup context in case an alternate header is detected\n+    memcpy(&backup, gb, sizeof(backup));\n+    memcpy(&backup_vui, vui, sizeof(backup_vui));\n+    if (get_bits_left(gb) >= 68 && show_bits_long(gb, 21) == 0x100000) {\n+        vui->default_display_window_flag = 0;\n+        av_log(avctx, AV_LOG_WARNING, \"Invalid default display window\\n\");\n+    } else\n+        vui->default_display_window_flag = get_bits1(gb);\n+\n+    if (vui->default_display_window_flag) {\n+        int vert_mult  = 1 + (sps->chroma_format_idc < 2);\n+        int horiz_mult = 1 + (sps->chroma_format_idc < 3);\n+        vui->def_disp_win.left_offset   = get_ue_golomb_long(gb) * horiz_mult;\n+        vui->def_disp_win.right_offset  = get_ue_golomb_long(gb) * horiz_mult;\n+        vui->def_disp_win.top_offset    = get_ue_golomb_long(gb) *  vert_mult;\n+        vui->def_disp_win.bottom_offset = get_ue_golomb_long(gb) *  vert_mult;\n+\n+        if (apply_defdispwin &&\n+            avctx->flags2 & AV_CODEC_FLAG2_IGNORE_CROP) {\n+            av_log(avctx, AV_LOG_DEBUG,\n+                   \"discarding vui default display window, \"\n+                   \"original values are l:%u r:%u t:%u b:%u\\n\",\n+                   vui->def_disp_win.left_offset,\n+                   vui->def_disp_win.right_offset,\n+                   vui->def_disp_win.top_offset,\n+                   vui->def_disp_win.bottom_offset);\n+\n+            vui->def_disp_win.left_offset   =\n+            vui->def_disp_win.right_offset  =\n+            vui->def_disp_win.top_offset    =\n+            vui->def_disp_win.bottom_offset = 0;\n+        }\n+    }\n+\n+timing_info:\n+    vui->vui_timing_info_present_flag = get_bits1(gb);\n+\n+    if (vui->vui_timing_info_present_flag) {\n+        if( get_bits_left(gb) < 66 && !alt) {\n+            // The alternate syntax seem to have timing info located\n+            // at where def_disp_win is normally located\n+            av_log(avctx, AV_LOG_WARNING,\n+                   \"Strange VUI timing information, retrying...\\n\");\n+            memcpy(vui, &backup_vui, sizeof(backup_vui));\n+            memcpy(gb, &backup, sizeof(backup));\n+            alt = 1;\n+            goto timing_info;\n+        }\n+        vui->vui_num_units_in_tick               = get_bits_long(gb, 32);\n+        vui->vui_time_scale                      = get_bits_long(gb, 32);\n+        if (alt) {\n+            av_log(avctx, AV_LOG_INFO, \"Retry got %\"PRIu32\"/%\"PRIu32\" fps\\n\",\n+                   vui->vui_time_scale, vui->vui_num_units_in_tick);\n+        }\n+        vui->vui_poc_proportional_to_timing_flag = get_bits1(gb);\n+        if (vui->vui_poc_proportional_to_timing_flag)\n+            vui->vui_num_ticks_poc_diff_one_minus1 = get_ue_golomb_long(gb);\n+        vui->vui_hrd_parameters_present_flag = get_bits1(gb);\n+        if (vui->vui_hrd_parameters_present_flag)\n+            decode_hrd(gb, 1, sps->max_sub_layers);\n+    }\n+\n+    vui->bitstream_restriction_flag = get_bits1(gb);\n+    if (vui->bitstream_restriction_flag) {\n+        if (get_bits_left(gb) < 8 && !alt) {\n+            av_log(avctx, AV_LOG_WARNING,\n+                   \"Strange VUI bitstream restriction information, retrying\"\n+                   \" from timing information...\\n\");\n+            memcpy(vui, &backup_vui, sizeof(backup_vui));\n+            memcpy(gb, &backup, sizeof(backup));\n+            alt = 1;\n+            goto timing_info;\n+        }\n+        vui->tiles_fixed_structure_flag              = get_bits1(gb);\n+        vui->motion_vectors_over_pic_boundaries_flag = get_bits1(gb);\n+        vui->restricted_ref_pic_lists_flag           = get_bits1(gb);\n+        vui->min_spatial_segmentation_idc            = get_ue_golomb_long(gb);\n+        vui->max_bytes_per_pic_denom                 = get_ue_golomb_long(gb);\n+        vui->max_bits_per_min_cu_denom               = get_ue_golomb_long(gb);\n+        vui->log2_max_mv_length_horizontal           = get_ue_golomb_long(gb);\n+        vui->log2_max_mv_length_vertical             = get_ue_golomb_long(gb);\n+    }\n+\n+    if (get_bits_left(gb) < 1 && !alt) {\n+        // XXX: Alternate syntax when sps_range_extension_flag != 0?\n+        av_log(avctx, AV_LOG_WARNING,\n+               \"Overread in VUI, retrying from timing information...\\n\");\n+        memcpy(vui, &backup_vui, sizeof(backup_vui));\n+        memcpy(gb, &backup, sizeof(backup));\n+        alt = 1;\n+        goto timing_info;\n+    }\n+}\n+\n+static void set_default_scaling_list_data(ScalingList * const sl)\n+{\n+    int matrixId;\n+\n+    for (matrixId = 0; matrixId < 6; matrixId++) {\n+        // 4x4 default is 16\n+        memset(sl->sl[0][matrixId], 16, 16);\n+        sl->sl_dc[0][matrixId] = 16; // default for 16x16\n+        sl->sl_dc[1][matrixId] = 16; // default for 32x32\n+    }\n+\n+    memcpy(sl->sl[1][0], default_scaling_list_intra, 64);\n+    memcpy(sl->sl[1][1], default_scaling_list_intra, 64);\n+    memcpy(sl->sl[1][2], default_scaling_list_intra, 64);\n+\n+    memcpy(sl->sl[1][3], default_scaling_list_inter, 64);\n+    memcpy(sl->sl[1][4], default_scaling_list_inter, 64);\n+    memcpy(sl->sl[1][5], default_scaling_list_inter, 64);\n+\n+    memcpy(sl->sl[2][0], default_scaling_list_intra, 64);\n+    memcpy(sl->sl[2][1], default_scaling_list_intra, 64);\n+    memcpy(sl->sl[2][2], default_scaling_list_intra, 64);\n+\n+    memcpy(sl->sl[2][3], default_scaling_list_inter, 64);\n+    memcpy(sl->sl[2][4], default_scaling_list_inter, 64);\n+    memcpy(sl->sl[2][5], default_scaling_list_inter, 64);\n+\n+    memcpy(sl->sl[3][0], default_scaling_list_intra, 64);\n+    memcpy(sl->sl[3][1], default_scaling_list_intra, 64);\n+    memcpy(sl->sl[3][2], default_scaling_list_intra, 64);\n+\n+    memcpy(sl->sl[3][3], default_scaling_list_inter, 64);\n+    memcpy(sl->sl[3][4], default_scaling_list_inter, 64);\n+    memcpy(sl->sl[3][5], default_scaling_list_inter, 64);\n+}\n+\n+static int scaling_list_data(GetBitContext * const gb, AVCodecContext * const avctx, ScalingList * const sl,\n+                             const HEVCRpiSPS * const sps)\n+{\n+    uint8_t scaling_list_pred_mode_flag;\n+    int32_t scaling_list_dc_coef[2][6];\n+    int size_id, matrix_id, pos;\n+    int i;\n+\n+    for (size_id = 0; size_id < 4; size_id++)\n+        for (matrix_id = 0; matrix_id < 6; matrix_id += ((size_id == 3) ? 3 : 1)) {\n+            scaling_list_pred_mode_flag = get_bits1(gb);\n+            if (!scaling_list_pred_mode_flag) {\n+                unsigned int delta = get_ue_golomb_long(gb);\n+                /* Only need to handle non-zero delta. Zero means default,\n+                 * which should already be in the arrays. */\n+                if (delta) {\n+                    // Copy from previous array.\n+                    delta *= (size_id == 3) ? 3 : 1;\n+                    if (matrix_id < delta) {\n+                        av_log(avctx, AV_LOG_ERROR,\n+                               \"Invalid delta in scaling list data: %d.\\n\", delta);\n+                        return AVERROR_INVALIDDATA;\n+                    }\n+\n+                    memcpy(sl->sl[size_id][matrix_id],\n+                           sl->sl[size_id][matrix_id - delta],\n+                           size_id > 0 ? 64 : 16);\n+                    if (size_id > 1)\n+                        sl->sl_dc[size_id - 2][matrix_id] = sl->sl_dc[size_id - 2][matrix_id - delta];\n+                }\n+            } else {\n+                int next_coef, coef_num;\n+                int32_t scaling_list_delta_coef;\n+\n+                next_coef = 8;\n+                coef_num  = FFMIN(64, 1 << (4 + (size_id << 1)));\n+                if (size_id > 1) {\n+                    scaling_list_dc_coef[size_id - 2][matrix_id] = get_se_golomb(gb) + 8;\n+                    next_coef = scaling_list_dc_coef[size_id - 2][matrix_id];\n+                    sl->sl_dc[size_id - 2][matrix_id] = next_coef;\n+                }\n+                for (i = 0; i < coef_num; i++) {\n+                    if (size_id == 0)\n+                        pos = 4 * ff_hevc_rpi_diag_scan4x4_y[i] +\n+                                  ff_hevc_rpi_diag_scan4x4_x[i];\n+                    else\n+                        pos = 8 * ff_hevc_rpi_diag_scan8x8_y[i] +\n+                                  ff_hevc_rpi_diag_scan8x8_x[i];\n+\n+                    scaling_list_delta_coef = get_se_golomb(gb);\n+                    next_coef = (next_coef + 256U + scaling_list_delta_coef) % 256;\n+                    sl->sl[size_id][matrix_id][pos] = next_coef;\n+                }\n+            }\n+        }\n+\n+    if (sps->chroma_format_idc == 3) {\n+        for (i = 0; i < 64; i++) {\n+            sl->sl[3][1][i] = sl->sl[2][1][i];\n+            sl->sl[3][2][i] = sl->sl[2][2][i];\n+            sl->sl[3][4][i] = sl->sl[2][4][i];\n+            sl->sl[3][5][i] = sl->sl[2][5][i];\n+        }\n+        sl->sl_dc[1][1] = sl->sl_dc[0][1];\n+        sl->sl_dc[1][2] = sl->sl_dc[0][2];\n+        sl->sl_dc[1][4] = sl->sl_dc[0][4];\n+        sl->sl_dc[1][5] = sl->sl_dc[0][5];\n+    }\n+\n+\n+    return 0;\n+}\n+\n+static int map_pixel_format(HEVCRpiSPS * const sps)\n+{\n+    const int cfmt = sps->chroma_format_idc;\n+\n+    sps->pix_fmt = AV_PIX_FMT_NONE;\n+    switch (sps->bit_depth) {\n+    case 8:\n+        if (cfmt == 1)\n+            sps->pix_fmt = AV_PIX_FMT_SAND128;\n+        break;\n+    case 10:\n+        if (cfmt == 1)\n+            sps->pix_fmt = AV_PIX_FMT_SAND64_10;\n+        break;\n+    default:\n+        break;\n+    }\n+\n+    sps->hshift[0] = sps->vshift[0] = 0;\n+    sps->hshift[2] = sps->hshift[1] = cfmt > 2 ? 0 : 1; // 1 unless 4:4:4\n+    sps->vshift[2] = sps->vshift[1] = cfmt > 1 ? 0 : 1; // 1 unless 4:4:4 or 4:2:2\n+\n+    sps->pixel_shift = sps->bit_depth > 8 ? 1 : 0;\n+\n+    return 0;\n+}\n+\n+static int ff_hevc_rpi_parse_sps(HEVCRpiSPS * const sps, GetBitContext * const gb, unsigned int * const sps_id,\n+                      const int apply_defdispwin, AVBufferRef * const * const vps_list, AVCodecContext * const avctx)\n+{\n+    HEVCRpiWindow *ow;\n+    int ret = 0;\n+    int log2_diff_max_min_transform_block_size;\n+    int bit_depth_chroma, start, vui_present, sublayer_ordering_info;\n+    int i;\n+\n+    // Coded parameters\n+\n+    sps->vps_id = get_bits(gb, 4);\n+    if (sps->vps_id >= HEVC_MAX_VPS_COUNT) {\n+        av_log(avctx, AV_LOG_ERROR, \"VPS id out of range: %d\\n\", sps->vps_id);\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    if (vps_list && !vps_list[sps->vps_id]) {\n+        av_log(avctx, AV_LOG_ERROR, \"VPS %d does not exist\\n\",\n+               sps->vps_id);\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    sps->max_sub_layers = get_bits(gb, 3) + 1;\n+    if (sps->max_sub_layers > HEVC_MAX_SUB_LAYERS) {\n+        av_log(avctx, AV_LOG_ERROR, \"sps_max_sub_layers out of range: %d\\n\",\n+               sps->max_sub_layers);\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    sps->temporal_id_nesting_flag = get_bits(gb, 1);\n+\n+    if ((ret = parse_ptl(gb, avctx, &sps->ptl, sps->max_sub_layers)) < 0)\n+        return ret;\n+\n+    *sps_id = get_ue_golomb_long(gb);\n+    if (*sps_id >= HEVC_MAX_SPS_COUNT) {\n+        av_log(avctx, AV_LOG_ERROR, \"SPS id out of range: %d\\n\", *sps_id);\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    sps->chroma_format_idc = get_ue_golomb_long(gb);\n+    if (sps->chroma_format_idc > 3U) {\n+        av_log(avctx, AV_LOG_ERROR, \"chroma_format_idc %d is invalid\\n\", sps->chroma_format_idc);\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    if (sps->chroma_format_idc == 3)\n+        sps->separate_colour_plane_flag = get_bits1(gb);\n+\n+    if (sps->separate_colour_plane_flag)\n+        sps->chroma_format_idc = 0;\n+\n+    sps->width  = get_ue_golomb_long(gb);\n+    sps->height = get_ue_golomb_long(gb);\n+    if ((ret = av_image_check_size(sps->width,\n+                                   sps->height, 0, avctx)) < 0)\n+        return ret;\n+\n+    if (get_bits1(gb)) { // pic_conformance_flag\n+        int vert_mult  = 1 + (sps->chroma_format_idc < 2);\n+        int horiz_mult = 1 + (sps->chroma_format_idc < 3);\n+        sps->pic_conf_win.left_offset   = get_ue_golomb_long(gb) * horiz_mult;\n+        sps->pic_conf_win.right_offset  = get_ue_golomb_long(gb) * horiz_mult;\n+        sps->pic_conf_win.top_offset    = get_ue_golomb_long(gb) *  vert_mult;\n+        sps->pic_conf_win.bottom_offset = get_ue_golomb_long(gb) *  vert_mult;\n+\n+        if (avctx->flags2 & AV_CODEC_FLAG2_IGNORE_CROP) {\n+            av_log(avctx, AV_LOG_DEBUG,\n+                   \"discarding sps conformance window, \"\n+                   \"original values are l:%u r:%u t:%u b:%u\\n\",\n+                   sps->pic_conf_win.left_offset,\n+                   sps->pic_conf_win.right_offset,\n+                   sps->pic_conf_win.top_offset,\n+                   sps->pic_conf_win.bottom_offset);\n+\n+            sps->pic_conf_win.left_offset   =\n+            sps->pic_conf_win.right_offset  =\n+            sps->pic_conf_win.top_offset    =\n+            sps->pic_conf_win.bottom_offset = 0;\n+        }\n+        sps->output_window = sps->pic_conf_win;\n+    }\n+\n+    sps->bit_depth   = get_ue_golomb_long(gb) + 8;\n+    bit_depth_chroma = get_ue_golomb_long(gb) + 8;\n+    if (sps->chroma_format_idc && bit_depth_chroma != sps->bit_depth) {\n+        av_log(avctx, AV_LOG_ERROR,\n+               \"Luma bit depth (%d) is different from chroma bit depth (%d), \"\n+               \"this is unsupported.\\n\",\n+               sps->bit_depth, bit_depth_chroma);\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    ret = map_pixel_format(sps);\n+    if (ret < 0)\n+        return ret;\n+\n+    sps->log2_max_poc_lsb = get_ue_golomb_long(gb) + 4;\n+    if (sps->log2_max_poc_lsb > 16) {\n+        av_log(avctx, AV_LOG_ERROR, \"log2_max_pic_order_cnt_lsb_minus4 out range: %d\\n\",\n+               sps->log2_max_poc_lsb - 4);\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    sublayer_ordering_info = get_bits1(gb);\n+    start = sublayer_ordering_info ? 0 : sps->max_sub_layers - 1;\n+    for (i = start; i < sps->max_sub_layers; i++) {\n+        sps->temporal_layer[i].max_dec_pic_buffering = get_ue_golomb_long(gb) + 1;\n+        sps->temporal_layer[i].num_reorder_pics      = get_ue_golomb_long(gb);\n+        sps->temporal_layer[i].max_latency_increase  = get_ue_golomb_long(gb) - 1;\n+        if (sps->temporal_layer[i].max_dec_pic_buffering > (unsigned)HEVC_MAX_DPB_SIZE) {\n+            av_log(avctx, AV_LOG_ERROR, \"sps_max_dec_pic_buffering_minus1 out of range: %d\\n\",\n+                   sps->temporal_layer[i].max_dec_pic_buffering - 1U);\n+            return AVERROR_INVALIDDATA;\n+        }\n+        if (sps->temporal_layer[i].num_reorder_pics > sps->temporal_layer[i].max_dec_pic_buffering - 1) {\n+            av_log(avctx, AV_LOG_WARNING, \"sps_max_num_reorder_pics out of range: %d\\n\",\n+                   sps->temporal_layer[i].num_reorder_pics);\n+            if (avctx->err_recognition & AV_EF_EXPLODE ||\n+                sps->temporal_layer[i].num_reorder_pics > HEVC_MAX_DPB_SIZE - 1) {\n+                return AVERROR_INVALIDDATA;\n+            }\n+            sps->temporal_layer[i].max_dec_pic_buffering = sps->temporal_layer[i].num_reorder_pics + 1;\n+        }\n+    }\n+\n+    if (!sublayer_ordering_info) {\n+        for (i = 0; i < start; i++) {\n+            sps->temporal_layer[i].max_dec_pic_buffering = sps->temporal_layer[start].max_dec_pic_buffering;\n+            sps->temporal_layer[i].num_reorder_pics      = sps->temporal_layer[start].num_reorder_pics;\n+            sps->temporal_layer[i].max_latency_increase  = sps->temporal_layer[start].max_latency_increase;\n+        }\n+    }\n+\n+    sps->log2_min_cb_size                    = get_ue_golomb_long(gb) + 3;\n+    sps->log2_diff_max_min_coding_block_size = get_ue_golomb_long(gb);\n+    sps->log2_min_tb_size                    = get_ue_golomb_long(gb) + 2;\n+    log2_diff_max_min_transform_block_size   = get_ue_golomb_long(gb);\n+    sps->log2_max_trafo_size                 = log2_diff_max_min_transform_block_size +\n+                                               sps->log2_min_tb_size;\n+\n+    if (sps->log2_min_cb_size < 3 || sps->log2_min_cb_size > 30) {\n+        av_log(avctx, AV_LOG_ERROR, \"Invalid value %d for log2_min_cb_size\", sps->log2_min_cb_size);\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    if (sps->log2_diff_max_min_coding_block_size > 30) {\n+        av_log(avctx, AV_LOG_ERROR, \"Invalid value %d for log2_diff_max_min_coding_block_size\", sps->log2_diff_max_min_coding_block_size);\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    if (sps->log2_min_tb_size >= sps->log2_min_cb_size || sps->log2_min_tb_size < 2) {\n+        av_log(avctx, AV_LOG_ERROR, \"Invalid value for log2_min_tb_size\");\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    if (log2_diff_max_min_transform_block_size < 0 || log2_diff_max_min_transform_block_size > 30) {\n+        av_log(avctx, AV_LOG_ERROR, \"Invalid value %d for log2_diff_max_min_transform_block_size\", log2_diff_max_min_transform_block_size);\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    {\n+        const unsigned int CtbLog2SizeY = sps->log2_min_cb_size + sps->log2_diff_max_min_coding_block_size;\n+        // Not a bitstream limitation, but all profiles\n+        if (CtbLog2SizeY < 4 || CtbLog2SizeY > HEVC_MAX_LOG2_CTB_SIZE) {\n+            av_log(avctx, AV_LOG_ERROR, \"Invalid value %d for CtbLog2SizeY\", CtbLog2SizeY);\n+            return AVERROR_INVALIDDATA;\n+        }\n+\n+        if (sps->log2_max_trafo_size > FFMIN(5, CtbLog2SizeY)) {\n+            av_log(avctx, AV_LOG_ERROR, \"Invalid value %d for MaxTbLog2SizeY\", sps->log2_max_trafo_size);\n+            return AVERROR_INVALIDDATA;\n+        }\n+\n+        // Inferred parameters\n+        sps->log2_ctb_size = CtbLog2SizeY;\n+//        sps->log2_min_pu_size = sps->log2_min_cb_size - 1;\n+    }\n+\n+    sps->max_transform_hierarchy_depth_inter = get_ue_golomb_long(gb);\n+    sps->max_transform_hierarchy_depth_intra = get_ue_golomb_long(gb);\n+\n+    sps->scaling_list_enable_flag = get_bits1(gb);\n+    if (sps->scaling_list_enable_flag) {\n+        set_default_scaling_list_data(&sps->scaling_list);\n+\n+        if (get_bits1(gb)) {\n+            ret = scaling_list_data(gb, avctx, &sps->scaling_list, sps);\n+            if (ret < 0)\n+                return ret;\n+        }\n+    }\n+\n+    sps->amp_enabled_flag = get_bits1(gb);\n+    sps->sao_enabled      = get_bits1(gb);\n+\n+    // Set pcm defaults (0) so we don't have to test _enabled when we\n+    // want to use them\n+    memset(&sps->pcm, 0, sizeof(sps->pcm));\n+\n+    if (get_bits1(gb))  // pcm_enabled_flag\n+    {\n+        const unsigned int limit_max_pcm = FFMIN(5,\n+            sps->log2_min_cb_size + sps->log2_diff_max_min_coding_block_size);\n+        sps->pcm.bit_depth   = get_bits(gb, 4) + 1;\n+        sps->pcm.bit_depth_chroma = get_bits(gb, 4) + 1;\n+        sps->pcm.log2_min_pcm_cb_size = get_ue_golomb_long(gb) + 3;\n+        sps->pcm.log2_max_pcm_cb_size = sps->pcm.log2_min_pcm_cb_size +\n+                                        get_ue_golomb_long(gb);\n+        if (FFMAX(sps->pcm.bit_depth, sps->pcm.bit_depth_chroma) > sps->bit_depth) {\n+            av_log(avctx, AV_LOG_ERROR,\n+                   \"PCM bit depth (%d, %d) is greater than normal bit depth (%d)\\n\",\n+                   sps->pcm.bit_depth, sps->pcm.bit_depth_chroma, sps->bit_depth);\n+            return AVERROR_INVALIDDATA;\n+        }\n+        if (sps->pcm.log2_min_pcm_cb_size < sps->log2_min_cb_size ||\n+            sps->pcm.log2_max_pcm_cb_size > limit_max_pcm) {\n+            av_log(avctx, AV_LOG_ERROR, \"Bad PCM CB min/max size (%d->%d)\",\n+                   sps->pcm.log2_min_pcm_cb_size, sps->pcm.log2_max_pcm_cb_size);\n+            return AVERROR_INVALIDDATA;\n+        }\n+\n+        sps->pcm.loop_filter_disable_flag = get_bits1(gb);\n+    }\n+\n+    // Could be based on min_pcm_cb_size but much easier logic if we just stick\n+    // with 8 (and costs us little)\n+    sps->pcm_width = (sps->width + 63) >> 6;  // 8 for min size, 8 bits per byte - round up\n+    sps->pcm_height = (sps->height + 7) >> 3;\n+\n+    sps->nb_st_rps = get_ue_golomb_long(gb);\n+    if (sps->nb_st_rps > HEVC_MAX_SHORT_TERM_REF_PIC_SETS) {\n+        av_log(avctx, AV_LOG_ERROR, \"Too many short term RPS: %d.\\n\",\n+               sps->nb_st_rps);\n+        return AVERROR_INVALIDDATA;\n+    }\n+    for (i = 0; i < sps->nb_st_rps; i++) {\n+        if ((ret = ff_hevc_rpi_decode_short_term_rps(gb, avctx, &sps->st_rps[i],\n+                                                 sps, 0)) < 0)\n+            return ret;\n+    }\n+\n+    sps->long_term_ref_pics_present_flag = get_bits1(gb);\n+    if (sps->long_term_ref_pics_present_flag) {\n+        sps->num_long_term_ref_pics_sps = get_ue_golomb_long(gb);\n+        if (sps->num_long_term_ref_pics_sps > HEVC_MAX_LONG_TERM_REF_PICS) {\n+            av_log(avctx, AV_LOG_ERROR, \"num_long_term_ref_pics_sps %d is out of range.\\n\",\n+                   sps->num_long_term_ref_pics_sps);\n+            return AVERROR_INVALIDDATA;\n+        }\n+        for (i = 0; i < sps->num_long_term_ref_pics_sps; i++) {\n+            sps->lt_ref_pic_poc_lsb_sps[i]       = get_bits(gb, sps->log2_max_poc_lsb);\n+            sps->used_by_curr_pic_lt_sps_flag[i] = get_bits1(gb);\n+        }\n+    }\n+\n+    sps->sps_temporal_mvp_enabled_flag          = get_bits1(gb);\n+    sps->intra_filters_disable = get_bits1(gb) ? 0 : FILTER_STRONG; // sps->sps_strong_intra_smoothing_enable_flag\n+    sps->vui.sar = (AVRational){0, 1};\n+    vui_present = get_bits1(gb);\n+    if (vui_present)\n+        decode_vui(gb, avctx, apply_defdispwin, sps);\n+\n+    if (get_bits1(gb)) { // sps_extension_flag\n+        int sps_extension_flag[1];\n+        for (i = 0; i < 1; i++)\n+            sps_extension_flag[i] = get_bits1(gb);\n+        skip_bits(gb, 7); //sps_extension_7bits = get_bits(gb, 7);\n+        if (sps_extension_flag[0]) {\n+            int extended_precision_processing_flag;\n+            int cabac_bypass_alignment_enabled_flag;\n+\n+            sps->transform_skip_rotation_enabled_flag = get_bits1(gb);\n+            sps->transform_skip_context_enabled_flag  = get_bits1(gb);\n+            sps->implicit_rdpcm_enabled_flag = get_bits1(gb);\n+\n+            sps->explicit_rdpcm_enabled_flag = get_bits1(gb);\n+\n+            extended_precision_processing_flag = get_bits1(gb);\n+            if (extended_precision_processing_flag)\n+                av_log(avctx, AV_LOG_WARNING,\n+                   \"extended_precision_processing_flag not yet implemented\\n\");\n+\n+            if (get_bits1(gb))          // sps->intra_smoothing_disabled_flag\n+                sps->intra_filters_disable |= FILTER_EITHER;\n+            sps->high_precision_offsets_enabled_flag = get_bits1(gb);\n+            sps->persistent_rice_adaptation_enabled_flag = get_bits1(gb);\n+\n+            cabac_bypass_alignment_enabled_flag  = get_bits1(gb);\n+            if (cabac_bypass_alignment_enabled_flag)\n+                av_log(avctx, AV_LOG_WARNING,\n+                   \"cabac_bypass_alignment_enabled_flag not yet implemented\\n\");\n+        }\n+    }\n+    if (apply_defdispwin) {\n+        sps->output_window.left_offset   += sps->vui.def_disp_win.left_offset;\n+        sps->output_window.right_offset  += sps->vui.def_disp_win.right_offset;\n+        sps->output_window.top_offset    += sps->vui.def_disp_win.top_offset;\n+        sps->output_window.bottom_offset += sps->vui.def_disp_win.bottom_offset;\n+    }\n+\n+    ow = &sps->output_window;\n+    if (ow->left_offset >= INT_MAX - ow->right_offset     ||\n+        ow->top_offset  >= INT_MAX - ow->bottom_offset    ||\n+        ow->left_offset + ow->right_offset  >= sps->width ||\n+        ow->top_offset  + ow->bottom_offset >= sps->height) {\n+        av_log(avctx, AV_LOG_WARNING, \"Invalid cropping offsets: %u/%u/%u/%u\\n\",\n+               ow->left_offset, ow->right_offset, ow->top_offset, ow->bottom_offset);\n+        if (avctx->err_recognition & AV_EF_EXPLODE) {\n+            return AVERROR_INVALIDDATA;\n+        }\n+        av_log(avctx, AV_LOG_WARNING,\n+               \"Displaying the whole video surface.\\n\");\n+        memset(ow, 0, sizeof(*ow));\n+        memset(&sps->pic_conf_win, 0, sizeof(sps->pic_conf_win));\n+    }\n+\n+    // Inferred parameters\n+\n+    sps->ctb_width  = (sps->width  + (1 << sps->log2_ctb_size) - 1) >> sps->log2_ctb_size;\n+    sps->ctb_height = (sps->height + (1 << sps->log2_ctb_size) - 1) >> sps->log2_ctb_size;\n+    sps->ctb_size   = sps->ctb_width * sps->ctb_height;\n+\n+    sps->min_cb_width  = sps->width  >> sps->log2_min_cb_size;\n+    sps->min_cb_height = sps->height >> sps->log2_min_cb_size;\n+    sps->min_tb_width  = sps->width  >> sps->log2_min_tb_size;\n+    sps->min_tb_height = sps->height >> sps->log2_min_tb_size;\n+    sps->min_pu_width  = sps->width  >> LOG2_MIN_PU_SIZE;\n+    sps->min_pu_height = sps->height >> LOG2_MIN_PU_SIZE;\n+    sps->tb_mask       = (1 << (sps->log2_ctb_size - sps->log2_min_tb_size)) - 1;\n+\n+    sps->qp_bd_offset = 6 * (sps->bit_depth - 8);\n+    sps->wp_offset_half_range = (1U << (sps->high_precision_offsets_enabled_flag ? sps->bit_depth - 1 : 7));\n+\n+    if (av_mod_uintp2(sps->width, sps->log2_min_cb_size) ||\n+        av_mod_uintp2(sps->height, sps->log2_min_cb_size)) {\n+        av_log(avctx, AV_LOG_ERROR, \"Invalid coded frame dimensions.\\n\");\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    if (sps->max_transform_hierarchy_depth_inter > sps->log2_ctb_size - sps->log2_min_tb_size) {\n+        av_log(avctx, AV_LOG_ERROR, \"max_transform_hierarchy_depth_inter out of range: %d\\n\",\n+               sps->max_transform_hierarchy_depth_inter);\n+        return AVERROR_INVALIDDATA;\n+    }\n+    if (sps->max_transform_hierarchy_depth_intra > sps->log2_ctb_size - sps->log2_min_tb_size) {\n+        av_log(avctx, AV_LOG_ERROR, \"max_transform_hierarchy_depth_intra out of range: %d\\n\",\n+               sps->max_transform_hierarchy_depth_intra);\n+        return AVERROR_INVALIDDATA;\n+    }\n+    if (sps->log2_max_trafo_size > FFMIN(sps->log2_ctb_size, 5)) {\n+        av_log(avctx, AV_LOG_ERROR,\n+               \"max transform block size out of range: %d\\n\",\n+               sps->log2_max_trafo_size);\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    if (get_bits_left(gb) < 0) {\n+        av_log(avctx, AV_LOG_ERROR,\n+               \"Overread SPS by %d bits\\n\", -get_bits_left(gb));\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    return 0;\n+}\n+\n+int ff_hevc_rpi_decode_nal_sps(GetBitContext *gb, AVCodecContext *avctx,\n+                           HEVCRpiParamSets *ps, int apply_defdispwin)\n+{\n+    HEVCRpiSPS *sps;\n+    AVBufferRef *sps_buf = av_buffer_allocz(sizeof(*sps));\n+    unsigned int sps_id;\n+    int ret;\n+    ptrdiff_t nal_size;\n+\n+    if (!sps_buf)\n+        return AVERROR(ENOMEM);\n+    sps = (HEVCRpiSPS*)sps_buf->data;\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"Decoding SPS\\n\");\n+\n+    nal_size = gb->buffer_end - gb->buffer;\n+    if (nal_size > sizeof(sps->data)) {\n+        av_log(avctx, AV_LOG_WARNING, \"Truncating likely oversized SPS \"\n+               \"(%\"PTRDIFF_SPECIFIER\" > %\"SIZE_SPECIFIER\")\\n\",\n+               nal_size, sizeof(sps->data));\n+        sps->data_size = sizeof(sps->data);\n+    } else {\n+        sps->data_size = nal_size;\n+    }\n+    memcpy(sps->data, gb->buffer, sps->data_size);\n+\n+    ret = ff_hevc_rpi_parse_sps(sps, gb, &sps_id,\n+                            apply_defdispwin,\n+                            ps->vps_list, avctx);\n+    if (ret < 0) {\n+        av_buffer_unref(&sps_buf);\n+        return ret;\n+    }\n+\n+    if (avctx->debug & FF_DEBUG_BITSTREAM) {\n+        av_log(avctx, AV_LOG_DEBUG,\n+               \"Parsed SPS: id %d; coded wxh: %dx%d; \"\n+               \"cropped wxh: %dx%d; pix_fmt: %s.\\n\",\n+               sps_id, sps->width, sps->height,\n+               sps->width - (sps->output_window.left_offset + sps->output_window.right_offset),\n+               sps->height - (sps->output_window.top_offset + sps->output_window.bottom_offset),\n+               av_get_pix_fmt_name(sps->pix_fmt));\n+    }\n+\n+    /* check if this is a repeat of an already parsed SPS, then keep the\n+     * original one.\n+     * otherwise drop all PPSes that depend on it */\n+    if (ps->sps_list[sps_id] &&\n+        !memcmp(ps->sps_list[sps_id]->data, sps_buf->data, sps_buf->size)) {\n+        av_buffer_unref(&sps_buf);\n+    } else {\n+        remove_sps(ps, sps_id);\n+        ps->sps_list[sps_id] = sps_buf;\n+    }\n+\n+    return 0;\n+}\n+\n+static void hevc_pps_free(void *opaque, uint8_t *data)\n+{\n+    HEVCRpiPPS *pps = (HEVCRpiPPS*)data;\n+\n+    av_freep(&pps->column_width);\n+    av_freep(&pps->row_height);\n+    av_freep(&pps->col_bd);\n+    av_freep(&pps->row_bd);\n+    av_freep(&pps->col_idxX);\n+    av_freep(&pps->ctb_addr_rs_to_ts);\n+    av_freep(&pps->ctb_addr_ts_to_rs);\n+    av_freep(&pps->tile_pos_ts);\n+    av_freep(&pps->tile_size);\n+    av_freep(&pps->tile_id);\n+    av_freep(&pps->ctb_ts_flags);\n+\n+    av_freep(&pps);\n+}\n+\n+static int get_offset_list(GetBitContext * const gb, AVCodecContext * const avctx, unsigned int n_minus_1, int8_t * offsets)\n+{\n+    do\n+    {\n+        const int offset = get_se_golomb_long(gb);\n+        if (offset < -12 || offset > 12) {\n+            av_log(avctx, AV_LOG_ERROR, \"qp_offset_list[]: %d out of range\\n\", offset);\n+            return AVERROR_INVALIDDATA;\n+        }\n+        *offsets++ = offset;\n+    } while (n_minus_1-- != 0);\n+    return 0;\n+}\n+\n+static int pps_range_extensions(GetBitContext * const gb, AVCodecContext * const avctx,\n+                                HEVCRpiPPS * const pps, const HEVCRpiSPS * const sps)\n+{\n+    if (pps->transform_skip_enabled_flag) {\n+        pps->log2_max_transform_skip_block_size = get_ue_golomb_long(gb) + 2;\n+    }\n+    pps->cross_component_prediction_enabled_flag = get_bits1(gb);\n+    if (pps->cross_component_prediction_enabled_flag &&\n+        (sps->chroma_format_idc != 3 || sps->separate_colour_plane_flag))\n+    {\n+        av_log(avctx, AV_LOG_ERROR, \"cross_component_prediction_enabled but chroma_format_idc != 3\\n\");\n+        return AVERROR_INVALIDDATA;\n+    }\n+    pps->chroma_qp_offset_list_enabled_flag = get_bits1(gb);\n+    if (pps->chroma_qp_offset_list_enabled_flag) {\n+        int err;\n+\n+        pps->diff_cu_chroma_qp_offset_depth = get_ue_golomb_long(gb);\n+        pps->chroma_qp_offset_list_len_minus1 = get_ue_golomb_long(gb);\n+        if (pps->chroma_qp_offset_list_len_minus1 > 5) {\n+            av_log(avctx, AV_LOG_ERROR,\n+                   \"chroma_qp_offset_list_len_minus1 shall be in the range [0, 5].\\n\");\n+            return AVERROR_INVALIDDATA;\n+        }\n+        av_log(avctx, AV_LOG_WARNING, \"cb_qp_offset_list not tested yet.\\n\");\n+\n+        if ((err = get_offset_list(gb, avctx, pps->chroma_qp_offset_list_len_minus1, pps->cb_qp_offset_list)) != 0 ||\n+            (err = get_offset_list(gb, avctx, pps->chroma_qp_offset_list_len_minus1, pps->cr_qp_offset_list)) != 0)\n+            return err;\n+    }\n+\n+    {\n+        const unsigned int max_offset = sps->bit_depth > 10 ? sps->bit_depth - 10 : 0;\n+\n+        pps->log2_sao_offset_scale_luma = get_ue_golomb_long(gb);\n+        if (pps->log2_sao_offset_scale_luma > max_offset) {\n+            av_log(avctx, AV_LOG_ERROR, \"log2_sao_offset_scale_luma invalid\");\n+            return AVERROR_INVALIDDATA;\n+        }\n+        pps->log2_sao_offset_scale_chroma = get_ue_golomb_long(gb);\n+        if (pps->log2_sao_offset_scale_chroma > max_offset) {\n+            av_log(avctx, AV_LOG_ERROR, \"log2_sao_offset_scale_chroma invalid\");\n+            return AVERROR_INVALIDDATA;\n+        }\n+    }\n+\n+    return(0);\n+}\n+\n+static inline int setup_pps(AVCodecContext * const avctx,\n+                            HEVCRpiPPS * const pps, const HEVCRpiSPS * const sps)\n+{\n+    int pic_area_in_ctbs;\n+    int i, j, x, y, ctb_addr_rs, tile_id;\n+\n+    // Inferred parameters\n+\n+    // qp_y -> qp_u/qp_v tables\n+    // The tables have at least -24,+24 overrun after adding offset here\n+    // which should allow for clipless offseting\n+\n+    pps->qp_dblk_x[0] = qp_c_dblk_0 + QP_DBLK_OFFSET_0;  // No offset for luma, but may be useful for general code\n+    pps->qp_bd_x[0] = qp_c_bd_0[sps->bit_depth - 8] + QP_OFFSET_0;\n+\n+    if (sps->chroma_format_idc == 1) {\n+        pps->qp_dblk_x[1] = qp_c_dblk_1 + pps->cb_qp_offset + QP_DBLK_OFFSET_0;\n+        pps->qp_bd_x[1] = qp_c_bd_1[sps->bit_depth - 8] + pps->cb_qp_offset + QP_OFFSET_0;\n+        pps->qp_dblk_x[2] = qp_c_dblk_1 + pps->cr_qp_offset + QP_DBLK_OFFSET_0;\n+        pps->qp_bd_x[2] = qp_c_bd_1[sps->bit_depth - 8] + pps->cr_qp_offset + QP_OFFSET_0;\n+    }\n+    else\n+    {\n+        pps->qp_dblk_x[1] = qp_c_dblk_0 + pps->cb_qp_offset + QP_DBLK_OFFSET_0;\n+        pps->qp_bd_x[1] = qp_c_bd_0[sps->bit_depth - 8] + pps->cb_qp_offset + QP_OFFSET_0;\n+        pps->qp_dblk_x[2] = qp_c_dblk_0 + pps->cr_qp_offset + QP_DBLK_OFFSET_0;\n+        pps->qp_bd_x[2] = qp_c_bd_0[sps->bit_depth - 8] + pps->cr_qp_offset + QP_OFFSET_0;\n+    }\n+\n+    pps->col_bd   = av_malloc_array(pps->num_tile_columns + 1, sizeof(*pps->col_bd));\n+    pps->row_bd   = av_malloc_array(pps->num_tile_rows + 1,    sizeof(*pps->row_bd));\n+    pps->col_idxX = av_malloc_array(sps->ctb_width,    sizeof(*pps->col_idxX));\n+    if (!pps->col_bd || !pps->row_bd || !pps->col_idxX)\n+        return AVERROR(ENOMEM);\n+\n+    if (pps->uniform_spacing_flag) {\n+        if (!pps->column_width) {\n+            pps->column_width = av_malloc_array(pps->num_tile_columns, sizeof(*pps->column_width));\n+            pps->row_height   = av_malloc_array(pps->num_tile_rows,    sizeof(*pps->row_height));\n+        }\n+        if (!pps->column_width || !pps->row_height)\n+            return AVERROR(ENOMEM);\n+\n+        for (i = 0; i < pps->num_tile_columns; i++) {\n+            pps->column_width[i] = ((i + 1) * sps->ctb_width) / pps->num_tile_columns -\n+                                   (i * sps->ctb_width) / pps->num_tile_columns;\n+        }\n+\n+        for (i = 0; i < pps->num_tile_rows; i++) {\n+            pps->row_height[i] = ((i + 1) * sps->ctb_height) / pps->num_tile_rows -\n+                                 (i * sps->ctb_height) / pps->num_tile_rows;\n+        }\n+    }\n+\n+    {\n+        const unsigned int td_mask = 63 >> (sps->log2_ctb_size + sps->pixel_shift);\n+        pps->col_bd[0] = 0;\n+        pps->tile_wpp_inter_disable = 0;\n+        for (i = 0; i < pps->num_tile_columns; i++)\n+        {\n+            pps->col_bd[i + 1] = pps->col_bd[i] + pps->column_width[i];\n+\n+            // Avoid trying tile parallel if the columns don't fall on cache boundries\n+            // (this causes too much pain syncing flushes with the QPU)\n+            // Ignore the final (RHS of pic) tile boundry\n+            if ((pps->col_bd[i] & td_mask) != 0) {\n+                pps->tile_wpp_inter_disable = 1;\n+            }\n+        }\n+\n+        // If we can start the next row before finishing the first line of\n+        // this one then we must wait at the end of the tile\n+        // * if this happens a lot then there are better but more complicated\n+        //   conditions that we could apply\n+        if (pps->tile_wpp_inter_disable) {\n+            for (i = 0; i < pps->num_tile_rows; i++)\n+            {\n+                if (pps->row_height[i] <= RPI_MAX_JOBS) {\n+                    pps->tile_wpp_inter_disable = 2;\n+                    break;\n+                }\n+            }\n+        }\n+    }\n+\n+    pps->row_bd[0] = 0;\n+    for (i = 0; i < pps->num_tile_rows; i++)\n+        pps->row_bd[i + 1] = pps->row_bd[i] + pps->row_height[i];\n+\n+    for (i = 0, j = 0; i < sps->ctb_width; i++) {\n+        if (i >= pps->col_bd[j + 1])\n+            j++;\n+        pps->col_idxX[i] = j;\n+    }\n+\n+    /**\n+     * 6.5\n+     */\n+    pic_area_in_ctbs     = sps->ctb_size;\n+\n+    pps->ctb_addr_rs_to_ts = av_malloc_array(pic_area_in_ctbs,    sizeof(*pps->ctb_addr_rs_to_ts));\n+    pps->ctb_addr_ts_to_rs = av_malloc_array(pic_area_in_ctbs,    sizeof(*pps->ctb_addr_ts_to_rs));\n+    pps->tile_id           = av_malloc_array(pic_area_in_ctbs,    sizeof(*pps->tile_id));\n+    pps->tile_size         = av_malloc_array(pps->num_tile_columns * pps->num_tile_rows, sizeof(*pps->tile_size));\n+    pps->tile_pos_ts       = av_malloc_array(pps->num_tile_columns * pps->num_tile_rows, sizeof(*pps->tile_pos_ts));\n+    pps->ctb_ts_flags      = av_malloc_array(pic_area_in_ctbs,    sizeof(*pps->ctb_ts_flags));\n+    if (!pps->ctb_addr_rs_to_ts || !pps->ctb_addr_ts_to_rs ||\n+        !pps->tile_id || pps->tile_pos_ts == NULL || pps->tile_size == NULL) {\n+        return AVERROR(ENOMEM);\n+    }\n+\n+    memset(pps->ctb_ts_flags, 0, pic_area_in_ctbs * sizeof(*pps->ctb_ts_flags));\n+\n+    for (ctb_addr_rs = 0; ctb_addr_rs < pic_area_in_ctbs; ctb_addr_rs++) {\n+        int tb_x   = ctb_addr_rs % sps->ctb_width;\n+        int tb_y   = ctb_addr_rs / sps->ctb_width;\n+        int tile_x = 0;\n+        int tile_y = 0;\n+        int val    = 0;\n+\n+        for (i = 0; i < pps->num_tile_columns; i++) {\n+            if (tb_x < pps->col_bd[i + 1]) {\n+                tile_x = i;\n+                break;\n+            }\n+        }\n+\n+        for (i = 0; i < pps->num_tile_rows; i++) {\n+            if (tb_y < pps->row_bd[i + 1]) {\n+                tile_y = i;\n+                break;\n+            }\n+        }\n+\n+        for (i = 0; i < tile_x; i++)\n+            val += pps->row_height[tile_y] * pps->column_width[i];\n+        for (i = 0; i < tile_y; i++)\n+            val += sps->ctb_width * pps->row_height[i];\n+\n+        val += (tb_y - pps->row_bd[tile_y]) * pps->column_width[tile_x] +\n+               tb_x - pps->col_bd[tile_x];\n+\n+        pps->ctb_addr_rs_to_ts[ctb_addr_rs] = val;\n+        pps->ctb_addr_ts_to_rs[val]         = ctb_addr_rs;\n+    }\n+\n+    {\n+        uint8_t * pflags = pps->ctb_ts_flags;\n+        uint16_t * ptid = pps->tile_id;\n+\n+        for (j = 0, tile_id = 0; j < pps->num_tile_rows; j++)\n+        {\n+            for (i = 0; i < pps->num_tile_columns; i++, tile_id++)\n+            {\n+                const unsigned int tile_w = pps->column_width[i];\n+\n+                pflags[0] |= CTB_TS_FLAGS_CIREQ;\n+\n+                for (x = 0; x != tile_w; ++x) {\n+                    pflags[x] |= CTB_TS_FLAGS_TOT;\n+                }\n+\n+                for (y = pps->row_bd[j]; y < pps->row_bd[j + 1]; y++)\n+                {\n+                    pflags[0] |= CTB_TS_FLAGS_SOTL;\n+\n+                    if (pps->entropy_coding_sync_enabled_flag)\n+                    {\n+                        if (pps->column_width[i] != 1)\n+                            pflags[1] |= CTB_TS_FLAGS_CSAVE;\n+                        else\n+                            pflags[0] |= CTB_TS_FLAGS_CIREQ;\n+\n+                        if ((pflags[0] & CTB_TS_FLAGS_CIREQ) == 0)\n+                            pflags[0] |= CTB_TS_FLAGS_CLOAD;\n+                    }\n+\n+                    for (x = 0; x != tile_w; ++x)\n+                        *ptid++ = tile_id;\n+\n+                    pflags += tile_w;\n+                    pflags[-1] |= CTB_TS_FLAGS_EOTL;\n+                    if (i + 1 == pps->num_tile_columns)\n+                        pflags[-1] |= CTB_TS_FLAGS_EOL;\n+                }\n+\n+                pflags[-1] |= CTB_TS_FLAGS_EOT;\n+            }\n+        }\n+    }\n+\n+    {\n+        unsigned int ts = 0;\n+        for (j = 0; j < pps->num_tile_rows; j++)\n+            for (i = 0; i < pps->num_tile_columns; i++)\n+            {\n+                const unsigned int size = pps->column_width[i] * pps->row_height[j];\n+                pps->tile_size[j * pps->num_tile_columns + i] = size;\n+                pps->tile_pos_ts[j * pps->num_tile_columns + i] = ts;\n+                ts += size;\n+            }\n+    }\n+\n+    return 0;\n+}\n+\n+int ff_hevc_rpi_decode_nal_pps(GetBitContext * const gb, AVCodecContext * const avctx,\n+                           HEVCRpiParamSets * const ps)\n+{\n+    const HEVCRpiSPS *sps = NULL;\n+    int i, ret = 0;\n+    unsigned int pps_id = 0;\n+    ptrdiff_t nal_size;\n+    unsigned log2_parallel_merge_level_minus2;\n+\n+    AVBufferRef *pps_buf;\n+    HEVCRpiPPS *pps = av_mallocz(sizeof(*pps));\n+\n+    if (!pps)\n+        return AVERROR(ENOMEM);\n+\n+    pps_buf = av_buffer_create((uint8_t *)pps, sizeof(*pps),\n+                               hevc_pps_free, NULL, 0);\n+    if (!pps_buf) {\n+        av_freep(&pps);\n+        return AVERROR(ENOMEM);\n+    }\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"Decoding PPS\\n\");\n+\n+    nal_size = gb->buffer_end - gb->buffer;\n+    if (nal_size > sizeof(pps->data)) {\n+        av_log(avctx, AV_LOG_WARNING, \"Truncating likely oversized PPS \"\n+               \"(%\"PTRDIFF_SPECIFIER\" > %\"SIZE_SPECIFIER\")\\n\",\n+               nal_size, sizeof(pps->data));\n+        pps->data_size = sizeof(pps->data);\n+    } else {\n+        pps->data_size = nal_size;\n+    }\n+    memcpy(pps->data, gb->buffer, pps->data_size);\n+\n+    // Default values\n+    pps->loop_filter_across_tiles_enabled_flag = 1;\n+    pps->num_tile_columns                      = 1;\n+    pps->num_tile_rows                         = 1;\n+    pps->uniform_spacing_flag                  = 1;\n+    pps->disable_dbf                           = 0;\n+    pps->beta_offset                           = 0;\n+    pps->tc_offset                             = 0;\n+    pps->log2_max_transform_skip_block_size    = 2;\n+\n+    // Coded parameters\n+    pps_id = get_ue_golomb_long(gb);\n+    if (pps_id >= HEVC_MAX_PPS_COUNT) {\n+        av_log(avctx, AV_LOG_ERROR, \"PPS id out of range: %d\\n\", pps_id);\n+        ret = AVERROR_INVALIDDATA;\n+        goto err;\n+    }\n+    pps->sps_id = get_ue_golomb_long(gb);\n+    if (pps->sps_id >= HEVC_MAX_SPS_COUNT) {\n+        av_log(avctx, AV_LOG_ERROR, \"SPS id out of range: %d\\n\", pps->sps_id);\n+        ret = AVERROR_INVALIDDATA;\n+        goto err;\n+    }\n+    if (!ps->sps_list[pps->sps_id]) {\n+        av_log(avctx, AV_LOG_ERROR, \"SPS %u does not exist.\\n\", pps->sps_id);\n+        ret = AVERROR_INVALIDDATA;\n+        goto err;\n+    }\n+    sps = (HEVCRpiSPS *)ps->sps_list[pps->sps_id]->data;\n+\n+    pps->dependent_slice_segments_enabled_flag = get_bits1(gb);\n+    pps->output_flag_present_flag              = get_bits1(gb);\n+    pps->num_extra_slice_header_bits           = get_bits(gb, 3);\n+\n+    pps->sign_data_hiding_flag = get_bits1(gb);\n+\n+    pps->cabac_init_present_flag = get_bits1(gb);\n+\n+    pps->num_ref_idx_l0_default_active = get_ue_golomb_long(gb) + 1;\n+    if (pps->num_ref_idx_l0_default_active < 1 || pps->num_ref_idx_l0_default_active > 15) {\n+        av_log(avctx, AV_LOG_ERROR, \"pps->num_ref_idx_l0_default_active invalid\\n\");\n+        ret = AVERROR_INVALIDDATA;\n+        goto err;\n+    }\n+    pps->num_ref_idx_l1_default_active = get_ue_golomb_long(gb) + 1;\n+    if (pps->num_ref_idx_l1_default_active < 1 || pps->num_ref_idx_l1_default_active > 15) {\n+        av_log(avctx, AV_LOG_ERROR, \"pps->num_ref_idx_l1_default_active invalid\\n\");\n+        ret = AVERROR_INVALIDDATA;\n+        goto err;\n+    }\n+\n+    pps->pic_init_qp_minus26 = get_se_golomb(gb);\n+    if (pps->pic_init_qp_minus26 > 25 || pps->pic_init_qp_minus26 < -(26 + sps->qp_bd_offset)) {\n+        av_log(avctx, AV_LOG_ERROR,\n+               \"init_qp_minus26 %d is outside the valid range \"\n+               \"[%d, %d].\\n\",\n+               pps->pic_init_qp_minus26,\n+               -(26 + sps->qp_bd_offset), 25);\n+        ret = AVERROR_INVALIDDATA;\n+        goto err;\n+    }\n+\n+    pps->constrained_intra_pred_flag = get_bits1(gb);\n+    pps->transform_skip_enabled_flag = get_bits1(gb);\n+\n+    pps->cu_qp_delta_enabled_flag = get_bits1(gb);\n+    pps->log2_min_cu_qp_delta_size = sps->log2_ctb_size;\n+    if (pps->cu_qp_delta_enabled_flag)\n+    {\n+        const unsigned int diff_cu_qp_delta_depth = get_ue_golomb_long(gb);\n+\n+        if (diff_cu_qp_delta_depth > sps->log2_diff_max_min_coding_block_size) {\n+            av_log(avctx, AV_LOG_ERROR, \"diff_cu_qp_delta_depth %d is invalid\\n\",\n+                   diff_cu_qp_delta_depth);\n+            ret = AVERROR_INVALIDDATA;\n+            goto err;\n+        }\n+\n+        pps->log2_min_cu_qp_delta_size = sps->log2_ctb_size - diff_cu_qp_delta_depth;\n+    }\n+\n+    pps->cb_qp_offset = get_se_golomb(gb);\n+    if (pps->cb_qp_offset < -12 || pps->cb_qp_offset > 12) {\n+        av_log(avctx, AV_LOG_ERROR, \"pps_cb_qp_offset out of range: %d\\n\",\n+               pps->cb_qp_offset);\n+        ret = AVERROR_INVALIDDATA;\n+        goto err;\n+    }\n+    pps->cr_qp_offset = get_se_golomb(gb);\n+    if (pps->cr_qp_offset < -12 || pps->cr_qp_offset > 12) {\n+        av_log(avctx, AV_LOG_ERROR, \"pps_cr_qp_offset out of range: %d\\n\",\n+               pps->cr_qp_offset);\n+        ret = AVERROR_INVALIDDATA;\n+        goto err;\n+    }\n+    pps->pic_slice_level_chroma_qp_offsets_present_flag = get_bits1(gb);\n+\n+    pps->weighted_pred_flag   = get_bits1(gb);\n+    pps->weighted_bipred_flag = get_bits1(gb);\n+\n+    pps->transquant_bypass_enable_flag    = get_bits1(gb);\n+    pps->tiles_enabled_flag               = get_bits1(gb);\n+    pps->entropy_coding_sync_enabled_flag = get_bits1(gb);\n+\n+    if (pps->tiles_enabled_flag) {\n+        pps->num_tile_columns = get_ue_golomb_long(gb) + 1;\n+        pps->num_tile_rows    = get_ue_golomb_long(gb) + 1;\n+        if (pps->num_tile_columns <= 0 ||\n+            pps->num_tile_columns >= sps->width) {\n+            av_log(avctx, AV_LOG_ERROR, \"num_tile_columns_minus1 out of range: %d\\n\",\n+                   pps->num_tile_columns - 1);\n+            ret = AVERROR_INVALIDDATA;\n+            goto err;\n+        }\n+        if (pps->num_tile_rows <= 0 ||\n+            pps->num_tile_rows >= sps->height) {\n+            av_log(avctx, AV_LOG_ERROR, \"num_tile_rows_minus1 out of range: %d\\n\",\n+                   pps->num_tile_rows - 1);\n+            ret = AVERROR_INVALIDDATA;\n+            goto err;\n+        }\n+\n+        pps->column_width = av_malloc_array(pps->num_tile_columns, sizeof(*pps->column_width));\n+        pps->row_height   = av_malloc_array(pps->num_tile_rows,    sizeof(*pps->row_height));\n+        if (!pps->column_width || !pps->row_height) {\n+            ret = AVERROR(ENOMEM);\n+            goto err;\n+        }\n+\n+        pps->uniform_spacing_flag = get_bits1(gb);\n+        if (!pps->uniform_spacing_flag) {\n+            uint64_t sum = 0;\n+            for (i = 0; i < pps->num_tile_columns - 1; i++) {\n+                pps->column_width[i] = get_ue_golomb_long(gb) + 1;\n+                sum                 += pps->column_width[i];\n+            }\n+            if (sum >= sps->ctb_width) {\n+                av_log(avctx, AV_LOG_ERROR, \"Invalid tile widths.\\n\");\n+                ret = AVERROR_INVALIDDATA;\n+                goto err;\n+            }\n+            pps->column_width[pps->num_tile_columns - 1] = sps->ctb_width - sum;\n+\n+            sum = 0;\n+            for (i = 0; i < pps->num_tile_rows - 1; i++) {\n+                pps->row_height[i] = get_ue_golomb_long(gb) + 1;\n+                sum               += pps->row_height[i];\n+            }\n+            if (sum >= sps->ctb_height) {\n+                av_log(avctx, AV_LOG_ERROR, \"Invalid tile heights.\\n\");\n+                ret = AVERROR_INVALIDDATA;\n+                goto err;\n+            }\n+            pps->row_height[pps->num_tile_rows - 1] = sps->ctb_height - sum;\n+        }\n+        pps->loop_filter_across_tiles_enabled_flag = get_bits1(gb);\n+    }\n+\n+    pps->seq_loop_filter_across_slices_enabled_flag = get_bits1(gb);\n+\n+    pps->deblocking_filter_control_present_flag = get_bits1(gb);\n+    if (pps->deblocking_filter_control_present_flag) {\n+        pps->deblocking_filter_override_enabled_flag = get_bits1(gb);\n+        pps->disable_dbf                             = get_bits1(gb);\n+        if (!pps->disable_dbf) {\n+            int beta_offset_div2 = get_se_golomb(gb);\n+            int tc_offset_div2   = get_se_golomb(gb) ;\n+            if (beta_offset_div2 < -6 || beta_offset_div2 > 6) {\n+                av_log(avctx, AV_LOG_ERROR, \"pps_beta_offset_div2 out of range: %d\\n\",\n+                       beta_offset_div2);\n+                ret = AVERROR_INVALIDDATA;\n+                goto err;\n+            }\n+            if (tc_offset_div2 < -6 || tc_offset_div2 > 6) {\n+                av_log(avctx, AV_LOG_ERROR, \"pps_tc_offset_div2 out of range: %d\\n\",\n+                       tc_offset_div2);\n+                ret = AVERROR_INVALIDDATA;\n+                goto err;\n+            }\n+            pps->beta_offset = 2 * beta_offset_div2;\n+            pps->tc_offset   = 2 *   tc_offset_div2;\n+        }\n+    }\n+\n+    pps->scaling_list_data_present_flag = get_bits1(gb);\n+    if (pps->scaling_list_data_present_flag) {\n+        set_default_scaling_list_data(&pps->scaling_list);\n+        ret = scaling_list_data(gb, avctx, &pps->scaling_list, sps);\n+        if (ret < 0)\n+            goto err;\n+    }\n+    pps->lists_modification_present_flag = get_bits1(gb);\n+    log2_parallel_merge_level_minus2     = get_ue_golomb_long(gb);\n+    if (log2_parallel_merge_level_minus2 > sps->log2_ctb_size) {\n+        av_log(avctx, AV_LOG_ERROR, \"log2_parallel_merge_level_minus2 out of range: %d\\n\",\n+               log2_parallel_merge_level_minus2);\n+        ret = AVERROR_INVALIDDATA;\n+        goto err;\n+    }\n+    pps->log2_parallel_merge_level       = log2_parallel_merge_level_minus2 + 2;\n+\n+    pps->slice_header_extension_present_flag = get_bits1(gb);\n+\n+    if (get_bits1(gb)) { // pps_extension_present_flag\n+        int pps_range_extensions_flag = get_bits1(gb);\n+        skip_bits(gb, 7); // pps_extension_7bits\n+        if (sps->ptl.general_ptl.profile_idc == FF_PROFILE_HEVC_REXT && pps_range_extensions_flag) {\n+            if ((ret = pps_range_extensions(gb, avctx, pps, sps)) < 0)\n+                goto err;\n+        }\n+    }\n+\n+    ret = setup_pps(avctx, pps, sps);\n+    if (ret < 0)\n+        goto err;\n+\n+    if (get_bits_left(gb) < 0) {\n+        av_log(avctx, AV_LOG_ERROR,\n+               \"Overread PPS by %d bits\\n\", -get_bits_left(gb));\n+        ret = AVERROR_INVALIDDATA;\n+        goto err;\n+    }\n+\n+    remove_pps(ps, pps_id);\n+    ps->pps_list[pps_id] = pps_buf;\n+\n+    return 0;\n+\n+err:\n+    av_buffer_unref(&pps_buf);\n+    return ret;\n+}\n+\n+int ff_hevc_rpi_compute_poc(const HEVCRpiSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type)\n+{\n+    int max_poc_lsb  = 1 << sps->log2_max_poc_lsb;\n+    int prev_poc_lsb = pocTid0 % max_poc_lsb;\n+    int prev_poc_msb = pocTid0 - prev_poc_lsb;\n+    int poc_msb;\n+\n+    if (poc_lsb < prev_poc_lsb && prev_poc_lsb - poc_lsb >= max_poc_lsb / 2)\n+        poc_msb = prev_poc_msb + max_poc_lsb;\n+    else if (poc_lsb > prev_poc_lsb && poc_lsb - prev_poc_lsb > max_poc_lsb / 2)\n+        poc_msb = prev_poc_msb - max_poc_lsb;\n+    else\n+        poc_msb = prev_poc_msb;\n+\n+    // For BLA picture types, POCmsb is set to 0.\n+    if (nal_unit_type == HEVC_NAL_BLA_W_LP   ||\n+        nal_unit_type == HEVC_NAL_BLA_W_RADL ||\n+        nal_unit_type == HEVC_NAL_BLA_N_LP)\n+        poc_msb = 0;\n+\n+    return poc_msb + poc_lsb;\n+}\ndiff --git a/libavcodec/rpi_hevc_ps.h b/libavcodec/rpi_hevc_ps.h\nnew file mode 100644\nindex 0000000000..c725ebb9ca\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_ps.h\n@@ -0,0 +1,449 @@\n+/*\n+ * HEVC parameter set parsing\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#ifndef AVCODEC_RPI_HEVC_PS_H\n+#define AVCODEC_RPI_HEVC_PS_H\n+\n+#include <stdint.h>\n+\n+#include \"libavutil/buffer.h\"\n+#include \"libavutil/pixfmt.h\"\n+#include \"libavutil/rational.h\"\n+\n+#include \"avcodec.h\"\n+#include \"get_bits.h\"\n+#include \"hevc.h\"\n+\n+typedef struct ShortTermRPS {\n+    unsigned int num_negative_pics;\n+    int num_delta_pocs;\n+    int rps_idx_num_delta_pocs;\n+    int32_t delta_poc[32];\n+    uint8_t used[32];\n+} ShortTermRPS;\n+\n+typedef struct LongTermRPS {\n+    int     poc[32];\n+    uint8_t used[32];\n+    uint8_t nb_refs;\n+} LongTermRPS;\n+\n+typedef struct RpiSliceHeader {\n+    unsigned int pps_id;\n+\n+    ///< address (in raster order) of the first block in the current slice segment\n+    unsigned int   slice_segment_addr;\n+    ///< address (in raster order) of the first block in the current slice\n+    unsigned int   slice_addr;\n+\n+    enum HEVCSliceType slice_type;\n+\n+    int pic_order_cnt_lsb;\n+\n+    uint8_t first_slice_in_pic_flag;\n+    uint8_t dependent_slice_segment_flag;\n+    uint8_t pic_output_flag;\n+    uint8_t colour_plane_id;\n+\n+    ///< RPS coded in the slice header itself is stored here\n+    int short_term_ref_pic_set_sps_flag;\n+    int short_term_ref_pic_set_size;\n+    ShortTermRPS slice_rps;\n+    const ShortTermRPS *short_term_rps;\n+    int long_term_ref_pic_set_size;\n+    LongTermRPS long_term_rps;\n+    unsigned int list_entry_lx[2][32];\n+\n+    uint8_t rpl_modification_flag[2];\n+    uint8_t no_output_of_prior_pics_flag;\n+    uint8_t slice_temporal_mvp_enabled_flag;\n+\n+    unsigned int nb_refs[2];\n+\n+    uint8_t slice_sample_adaptive_offset_flag[3];\n+    uint8_t mvd_l1_zero_flag;\n+\n+    uint8_t cabac_init_flag;\n+    uint8_t disable_deblocking_filter_flag; ///< slice_header_disable_deblocking_filter_flag\n+    uint8_t slice_loop_filter_across_slices_enabled_flag;\n+    uint8_t collocated_list;\n+\n+    uint8_t no_dblk_boundary_flags;\n+\n+    unsigned int collocated_ref_idx;\n+\n+    int slice_qp_delta;\n+    int slice_cb_qp_offset;  // -12, +12\n+    int slice_cr_qp_offset;  // -12, +12\n+\n+    uint8_t cu_chroma_qp_offset_enabled_flag;\n+\n+    int beta_offset;    ///< beta_offset_div2 * 2\n+    int tc_offset;      ///< tc_offset_div2 * 2\n+\n+    unsigned int max_num_merge_cand; ///< 5 - 5_minus_max_num_merge_cand\n+\n+    unsigned *entry_point_offset;\n+    int * offset;\n+    int * size;\n+    int num_entry_point_offsets;\n+    int offsets_allocated;\n+\n+    uint8_t offload_wpp;\n+    uint8_t offload_tiles;\n+\n+    int8_t slice_qp;\n+\n+    uint8_t luma_log2_weight_denom;\n+    uint8_t chroma_log2_weight_denom;\n+\n+    int16_t luma_weight_l0[16];     // -128, +255\n+    int16_t luma_offset_l0[16];\n+    int16_t chroma_weight_l0[16][2];\n+    int16_t chroma_offset_l0[16][2];\n+\n+    int16_t luma_weight_l1[16];\n+    int16_t luma_offset_l1[16];\n+    int16_t chroma_weight_l1[16][2];\n+    int16_t chroma_offset_l1[16][2];\n+\n+} RpiSliceHeader;\n+\n+typedef struct HEVCRpiWindow {\n+    uint16_t left_offset;\n+    uint16_t right_offset;\n+    uint16_t top_offset;\n+    uint16_t bottom_offset;\n+} HEVCRpiWindow;\n+\n+typedef struct VUI {\n+    AVRational sar;\n+\n+    int overscan_info_present_flag;\n+    int overscan_appropriate_flag;\n+\n+    int video_signal_type_present_flag;\n+    int video_format;\n+    int video_full_range_flag;\n+    int colour_description_present_flag;\n+    uint8_t colour_primaries;\n+    uint8_t transfer_characteristic;\n+    uint8_t matrix_coeffs;\n+\n+    int chroma_loc_info_present_flag;\n+    int chroma_sample_loc_type_top_field;\n+    int chroma_sample_loc_type_bottom_field;\n+    int neutra_chroma_indication_flag;\n+\n+    int field_seq_flag;\n+    int frame_field_info_present_flag;\n+\n+    int default_display_window_flag;\n+    HEVCRpiWindow def_disp_win;\n+\n+    int vui_timing_info_present_flag;\n+    uint32_t vui_num_units_in_tick;\n+    uint32_t vui_time_scale;\n+    int vui_poc_proportional_to_timing_flag;\n+    int vui_num_ticks_poc_diff_one_minus1;\n+    int vui_hrd_parameters_present_flag;\n+\n+    int bitstream_restriction_flag;\n+    int tiles_fixed_structure_flag;\n+    int motion_vectors_over_pic_boundaries_flag;\n+    int restricted_ref_pic_lists_flag;\n+    int min_spatial_segmentation_idc;\n+    int max_bytes_per_pic_denom;\n+    int max_bits_per_min_cu_denom;\n+    int log2_max_mv_length_horizontal;\n+    int log2_max_mv_length_vertical;\n+} VUI;\n+\n+typedef struct PTLCommon {\n+    uint8_t profile_space;\n+    uint8_t tier_flag;\n+    uint8_t profile_idc;\n+    uint8_t profile_compatibility_flag[32];\n+    uint8_t level_idc;\n+    uint8_t progressive_source_flag;\n+    uint8_t interlaced_source_flag;\n+    uint8_t non_packed_constraint_flag;\n+    uint8_t frame_only_constraint_flag;\n+} PTLCommon;\n+\n+typedef struct PTL {\n+    PTLCommon general_ptl;\n+    PTLCommon sub_layer_ptl[HEVC_MAX_SUB_LAYERS];\n+\n+    uint8_t sub_layer_profile_present_flag[HEVC_MAX_SUB_LAYERS];\n+    uint8_t sub_layer_level_present_flag[HEVC_MAX_SUB_LAYERS];\n+} PTL;\n+\n+typedef struct HEVCRpiVPS {\n+    uint8_t vps_temporal_id_nesting_flag;\n+    int vps_max_layers;\n+    int vps_max_sub_layers; ///< vps_max_temporal_layers_minus1 + 1\n+\n+    PTL ptl;\n+    int vps_sub_layer_ordering_info_present_flag;\n+    unsigned int vps_max_dec_pic_buffering[HEVC_MAX_SUB_LAYERS];\n+    unsigned int vps_num_reorder_pics[HEVC_MAX_SUB_LAYERS];\n+    unsigned int vps_max_latency_increase[HEVC_MAX_SUB_LAYERS];\n+    int vps_max_layer_id;\n+    int vps_num_layer_sets; ///< vps_num_layer_sets_minus1 + 1\n+    uint8_t vps_timing_info_present_flag;\n+    uint32_t vps_num_units_in_tick;\n+    uint32_t vps_time_scale;\n+    uint8_t vps_poc_proportional_to_timing_flag;\n+    int vps_num_ticks_poc_diff_one; ///< vps_num_ticks_poc_diff_one_minus1 + 1\n+    int vps_num_hrd_parameters;\n+\n+    uint8_t data[4096];\n+    int data_size;\n+} HEVCRpiVPS;\n+\n+typedef struct ScalingList {\n+    /* This is a little wasteful, since sizeID 0 only needs 8 coeffs,\n+     * and size ID 3 only has 2 arrays, not 6. */\n+    uint8_t sl[4][6][64];\n+    uint8_t sl_dc[2][6];\n+} ScalingList;\n+\n+typedef struct HEVCRpiSPS {\n+    unsigned vps_id;\n+    uint8_t chroma_format_idc;\n+    uint8_t separate_colour_plane_flag;\n+\n+    HEVCRpiWindow output_window;\n+\n+    HEVCRpiWindow pic_conf_win;\n+\n+    uint16_t wp_offset_half_range;  // WpOffsetHalfRange\n+\n+    uint8_t bit_depth;\n+\n+//    int bit_depth_chroma;  // We only support lum_bit_depth = chroma_bit_depth\n+    uint8_t pixel_shift;\n+    enum AVPixelFormat pix_fmt;\n+\n+    unsigned int log2_max_poc_lsb;\n+\n+    int max_sub_layers;\n+    struct {\n+        int max_dec_pic_buffering;\n+        int num_reorder_pics;\n+        int max_latency_increase;\n+    } temporal_layer[HEVC_MAX_SUB_LAYERS];\n+    uint8_t temporal_id_nesting_flag;\n+\n+    uint8_t scaling_list_enable_flag;\n+    ScalingList scaling_list;\n+\n+    unsigned int nb_st_rps;\n+    ShortTermRPS st_rps[HEVC_MAX_SHORT_TERM_REF_PIC_SETS];\n+\n+    uint8_t amp_enabled_flag;\n+    uint8_t sao_enabled;\n+\n+    uint8_t long_term_ref_pics_present_flag;\n+    uint16_t lt_ref_pic_poc_lsb_sps[HEVC_MAX_LONG_TERM_REF_PICS];\n+    uint8_t used_by_curr_pic_lt_sps_flag[HEVC_MAX_LONG_TERM_REF_PICS];\n+    uint8_t num_long_term_ref_pics_sps;\n+\n+    struct {\n+        uint8_t bit_depth;\n+        uint8_t bit_depth_chroma;\n+        uint8_t log2_min_pcm_cb_size;\n+        uint8_t log2_max_pcm_cb_size;\n+        uint8_t loop_filter_disable_flag;\n+    } pcm;\n+    char sps_temporal_mvp_enabled_flag;\n+//    char sps_strong_intra_smoothing_enable_flag;  -> intra_filtes_disable\n+\n+    uint8_t log2_min_cb_size;  // 3..6\n+    uint8_t log2_diff_max_min_coding_block_size;\n+    uint8_t log2_min_tb_size;  // 2..5\n+    uint8_t log2_max_trafo_size;\n+    uint8_t log2_ctb_size;     // 4..6\n+//    unsigned int log2_min_pu_size;  // 2..5 (min_cb_size - 1)\n+#define LOG2_MIN_PU_SIZE 2\n+#define LOG2_MIN_CU_SIZE 3\n+\n+    uint8_t max_transform_hierarchy_depth_inter;\n+    uint8_t max_transform_hierarchy_depth_intra;\n+\n+    char transform_skip_rotation_enabled_flag;\n+    char transform_skip_context_enabled_flag;\n+    char implicit_rdpcm_enabled_flag;\n+    char explicit_rdpcm_enabled_flag;\n+//    char intra_smoothing_disabled_flag;  -> intra_filtes_disable\n+    char high_precision_offsets_enabled_flag;\n+    char persistent_rice_adaptation_enabled_flag;\n+\n+    uint8_t intra_filters_disable;\n+\n+    ///< coded frame dimension in various units\n+    int width;\n+    int height;\n+    int ctb_width;\n+    int ctb_height;\n+    int ctb_size;   // Pic size in CTBs not size of a CTB\n+    int min_cb_width;\n+    int min_cb_height;\n+    int min_tb_width;\n+    int min_tb_height;\n+    int min_pu_width;\n+    int min_pu_height;\n+    int pcm_width;\n+    int pcm_height;\n+    int tb_mask;\n+\n+    int hshift[3];\n+    int vshift[3];\n+\n+    int qp_bd_offset;\n+\n+    uint8_t data[4096];\n+    int data_size;\n+\n+    VUI vui;\n+    PTL ptl;\n+} HEVCRpiSPS;\n+\n+#define CTB_TS_FLAGS_SOTL       (1U << 0)       // X start of tile line\n+#define CTB_TS_FLAGS_EOTL       (1U << 1)       // Last CTB of a tile line\n+#define CTB_TS_FLAGS_EOL        (1U << 2)       // Last CTB of a complete line\n+#define CTB_TS_FLAGS_EOT        (1U << 3)       // Last CTB of a tile\n+#define CTB_TS_FLAGS_CSAVE      (1U << 4)\n+#define CTB_TS_FLAGS_CIREQ      (1U << 5)       // Cabac init request\n+#define CTB_TS_FLAGS_TOT        (1U << 6)       // CTB on top row of a tile\n+#define CTB_TS_FLAGS_CLOAD      (1U << 7)\n+\n+typedef struct HEVCRpiPPS {\n+    unsigned int sps_id; ///< seq_parameter_set_id\n+\n+    uint8_t sign_data_hiding_flag;\n+\n+    uint8_t cabac_init_present_flag;\n+\n+    int num_ref_idx_l0_default_active; ///< num_ref_idx_l0_default_active_minus1 + 1\n+    int num_ref_idx_l1_default_active; ///< num_ref_idx_l1_default_active_minus1 + 1\n+    int pic_init_qp_minus26;\n+\n+    uint8_t constrained_intra_pred_flag;\n+    uint8_t transform_skip_enabled_flag;\n+\n+    uint8_t cu_qp_delta_enabled_flag;\n+    uint8_t log2_min_cu_qp_delta_size;\n+    int cb_qp_offset;   // -12..12\n+    int cr_qp_offset;   // -12..12\n+    const uint8_t * qp_dblk_x[3];\n+    const int8_t * qp_bd_x[3];\n+\n+    uint8_t pic_slice_level_chroma_qp_offsets_present_flag;\n+    uint8_t weighted_pred_flag;\n+    uint8_t weighted_bipred_flag;\n+    uint8_t output_flag_present_flag;\n+    uint8_t transquant_bypass_enable_flag;\n+\n+    uint8_t dependent_slice_segments_enabled_flag;\n+    uint8_t tiles_enabled_flag;\n+    uint8_t entropy_coding_sync_enabled_flag;\n+\n+    uint8_t tile_wpp_inter_disable;\n+    int num_tile_columns;   ///< num_tile_columns_minus1 + 1\n+    int num_tile_rows;      ///< num_tile_rows_minus1 + 1\n+    uint8_t uniform_spacing_flag;\n+    uint8_t loop_filter_across_tiles_enabled_flag;\n+\n+    uint8_t seq_loop_filter_across_slices_enabled_flag;\n+\n+    uint8_t deblocking_filter_control_present_flag;\n+    uint8_t deblocking_filter_override_enabled_flag;\n+    uint8_t disable_dbf;\n+    int beta_offset;    ///< beta_offset_div2 * 2\n+    int tc_offset;      ///< tc_offset_div2 * 2\n+\n+    uint8_t scaling_list_data_present_flag;\n+    ScalingList scaling_list;\n+\n+    uint8_t lists_modification_present_flag;\n+    int log2_parallel_merge_level; ///< log2_parallel_merge_level_minus2 + 2\n+    int num_extra_slice_header_bits;\n+    uint8_t slice_header_extension_present_flag;\n+    uint8_t log2_max_transform_skip_block_size;\n+    uint8_t cross_component_prediction_enabled_flag;\n+    uint8_t chroma_qp_offset_list_enabled_flag;\n+    uint8_t diff_cu_chroma_qp_offset_depth;\n+    uint8_t chroma_qp_offset_list_len_minus1;\n+    int8_t  cb_qp_offset_list[6];\n+    int8_t  cr_qp_offset_list[6];\n+    uint8_t log2_sao_offset_scale_luma;\n+    uint8_t log2_sao_offset_scale_chroma;\n+\n+    // Inferred parameters\n+    uint16_t *column_width;  ///< ColumnWidth\n+    uint16_t *row_height;    ///< RowHeight\n+    uint16_t *col_bd;        ///< ColBd\n+    uint16_t *row_bd;        ///< RowBd\n+    uint16_t *col_idxX;\n+\n+    // We can limit these to uint16_t given our other size limits\n+    uint16_t *ctb_addr_rs_to_ts; ///< CtbAddrRSToTS\n+    uint16_t *ctb_addr_ts_to_rs; ///< CtbAddrTSToRS\n+    uint16_t *tile_id;           ///< TileId\n+    uint16_t *tile_pos_ts;       ///< TilePosRS\n+    uint16_t *tile_size;         ///< TileSize\n+    uint8_t * ctb_ts_flags;\n+\n+    uint8_t data[4096];\n+    int data_size;\n+} HEVCRpiPPS;\n+\n+typedef struct HEVCRpiParamSets {\n+    /* currently active parameter sets */\n+    const HEVCRpiVPS *vps;\n+    const HEVCRpiSPS *sps;\n+    const HEVCRpiPPS *pps;\n+\n+    AVBufferRef *vps_list[HEVC_MAX_VPS_COUNT];\n+    AVBufferRef *sps_list[HEVC_MAX_SPS_COUNT];\n+    AVBufferRef *pps_list[HEVC_MAX_PPS_COUNT];\n+} HEVCRpiParamSets;\n+\n+int ff_hevc_rpi_decode_nal_vps(GetBitContext *gb, AVCodecContext *avctx,\n+                           HEVCRpiParamSets *ps);\n+int ff_hevc_rpi_decode_nal_sps(GetBitContext *gb, AVCodecContext *avctx,\n+                           HEVCRpiParamSets *ps, int apply_defdispwin);\n+int ff_hevc_rpi_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx,\n+                           HEVCRpiParamSets *ps);\n+\n+int ff_hevc_rpi_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx,\n+                                  ShortTermRPS *rps, const HEVCRpiSPS *sps, int is_slice_header);\n+\n+int ff_hevc_rpi_encode_nal_vps(HEVCRpiVPS *vps, unsigned int id,\n+                           uint8_t *buf, int buf_size);\n+\n+/**\n+ * Compute POC of the current frame and return it.\n+ */\n+int ff_hevc_rpi_compute_poc(const HEVCRpiSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type);\n+\n+#endif /* AVCODEC_RPI_HEVC_PS_H */\ndiff --git a/libavcodec/rpi_hevc_refs.c b/libavcodec/rpi_hevc_refs.c\nnew file mode 100644\nindex 0000000000..8cc5796cf0\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_refs.c\n@@ -0,0 +1,485 @@\n+/*\n+ * HEVC video decoder\n+ *\n+ * Copyright (C) 2012 - 2013 Guillaume Martres\n+ * Copyright (C) 2012 - 2013 Gildas Cocherel\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"libavutil/avassert.h\"\n+#include \"libavutil/pixdesc.h\"\n+#include \"libavutil/rpi_sand_fns.h\"\n+#include \"internal.h\"\n+#include \"thread.h\"\n+#include \"hevc.h\"\n+#include \"rpi_hevcdec.h\"\n+\n+void ff_hevc_rpi_unref_frame(HEVCRpiContext *s, HEVCRpiFrame *frame, int flags)\n+{\n+    /* frame->frame can be NULL if context init failed */\n+    if (!frame->frame || !frame->frame->buf[0])\n+        return;\n+\n+    frame->flags &= ~flags;\n+    if (!frame->flags) {\n+        ff_thread_release_buffer(s->avctx, &frame->tf);\n+\n+        av_buffer_unref(&frame->col_mvf_buf);  // OK if already NULL\n+        frame->col_mvf = NULL;\n+\n+        frame->collocated_ref = NULL;\n+    }\n+}\n+\n+void ff_hevc_rpi_clear_refs(HEVCRpiContext *s)\n+{\n+    int i;\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++)\n+        ff_hevc_rpi_unref_frame(s, &s->DPB[i],\n+                            HEVC_FRAME_FLAG_SHORT_REF |\n+                            HEVC_FRAME_FLAG_LONG_REF);\n+}\n+\n+void ff_hevc_rpi_flush_dpb(HEVCRpiContext *s)\n+{\n+    int i;\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++)\n+        ff_hevc_rpi_unref_frame(s, &s->DPB[i], ~0);\n+}\n+\n+static HEVCRpiFrame *alloc_frame(HEVCRpiContext * const s)\n+{\n+    int i, ret;\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {\n+        HEVCRpiFrame * const frame = &s->DPB[i];\n+        if (frame->frame->buf[0])\n+            continue;\n+\n+        ret = ff_thread_get_buffer(s->avctx, &frame->tf,\n+                                   AV_GET_BUFFER_FLAG_REF);\n+        if (ret < 0)\n+            return NULL;\n+\n+        frame->col_mvf = NULL;\n+        frame->col_mvf_buf = NULL;\n+        if (s->used_for_ref && !s->is_irap)\n+        {\n+            frame->col_mvf_buf = av_buffer_pool_get(s->col_mvf_pool);\n+            if (!frame->col_mvf_buf)\n+                goto fail;\n+            frame->col_mvf = (ColMvField *)frame->col_mvf_buf->data;\n+        }\n+\n+        frame->frame->top_field_first  = s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD;\n+        frame->frame->interlaced_frame = (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) || (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_BOTTOM_FIELD);\n+\n+        return frame;\n+\n+fail:\n+        ff_hevc_rpi_unref_frame(s, frame, ~0);\n+        return NULL;\n+    }\n+    av_log(s->avctx, AV_LOG_ERROR, \"Error allocating frame, DPB full.\\n\");\n+    return NULL;\n+}\n+\n+int ff_hevc_rpi_set_new_ref(HEVCRpiContext *s, AVFrame **frame, int poc)\n+{\n+    HEVCRpiFrame *ref;\n+    int i;\n+\n+    /* check that this POC doesn't already exist */\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {\n+        HEVCRpiFrame *frame = &s->DPB[i];\n+\n+        if (frame->frame->buf[0] && frame->sequence == s->seq_decode &&\n+            frame->poc == poc) {\n+            av_log(s->avctx, AV_LOG_ERROR, \"Duplicate POC in a sequence: %d.\\n\",\n+                   poc);\n+            return AVERROR_INVALIDDATA;\n+        }\n+    }\n+\n+    ref = alloc_frame(s);\n+    if (!ref)\n+        return AVERROR(ENOMEM);\n+\n+    *frame = ref->frame;\n+    s->ref = ref;\n+\n+    if (s->sh.pic_output_flag)\n+        ref->flags = HEVC_FRAME_FLAG_OUTPUT | HEVC_FRAME_FLAG_SHORT_REF;\n+    else\n+        ref->flags = HEVC_FRAME_FLAG_SHORT_REF;\n+\n+    ref->poc      = poc;\n+    ref->sequence = s->seq_decode;\n+    ref->frame->crop_left   = s->ps.sps->output_window.left_offset;\n+    ref->frame->crop_right  = s->ps.sps->output_window.right_offset;\n+    ref->frame->crop_top    = s->ps.sps->output_window.top_offset;\n+    ref->frame->crop_bottom = s->ps.sps->output_window.bottom_offset;\n+\n+    return 0;\n+}\n+\n+int ff_hevc_rpi_output_frame(HEVCRpiContext *s, AVFrame *out, int flush)\n+{\n+    do {\n+        int nb_output = 0;\n+        int min_poc   = INT_MAX;\n+        int i, min_idx, ret;\n+\n+        if (s->sh.no_output_of_prior_pics_flag == 1 && s->no_rasl_output_flag == 1) {\n+            for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {\n+                HEVCRpiFrame *frame = &s->DPB[i];\n+                if (!(frame->flags & HEVC_FRAME_FLAG_BUMPING) && frame->poc != s->poc &&\n+                        frame->sequence == s->seq_output) {\n+                    ff_hevc_rpi_unref_frame(s, frame, HEVC_FRAME_FLAG_OUTPUT);\n+                }\n+            }\n+        }\n+\n+        for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {\n+            HEVCRpiFrame *frame = &s->DPB[i];\n+            if ((frame->flags & HEVC_FRAME_FLAG_OUTPUT) &&\n+                frame->sequence == s->seq_output) {\n+                nb_output++;\n+                if (frame->poc < min_poc || nb_output == 1) {\n+                    min_poc = frame->poc;\n+                    min_idx = i;\n+                }\n+            }\n+        }\n+\n+        /* wait for more frames before output */\n+        if (!flush && s->seq_output == s->seq_decode && s->ps.sps &&\n+            nb_output <= s->ps.sps->temporal_layer[s->ps.sps->max_sub_layers - 1].num_reorder_pics)\n+            return 0;\n+\n+        if (nb_output) {\n+            HEVCRpiFrame *frame = &s->DPB[min_idx];\n+            if (frame->frame->format == AV_PIX_FMT_VIDEOTOOLBOX && frame->frame->buf[0]->size == 1)\n+                return 0;\n+\n+            ret = av_frame_ref(out, frame->frame);\n+            if (frame->flags & HEVC_FRAME_FLAG_BUMPING)\n+                ff_hevc_rpi_unref_frame(s, frame, HEVC_FRAME_FLAG_OUTPUT | HEVC_FRAME_FLAG_BUMPING);\n+            else\n+                ff_hevc_rpi_unref_frame(s, frame, HEVC_FRAME_FLAG_OUTPUT);\n+            if (ret < 0)\n+                return ret;\n+            av_log(s->avctx, AV_LOG_DEBUG,\n+                   \"Output frame with POC %d.\\n\", frame->poc);\n+            return 1;\n+        }\n+\n+        if (s->seq_output != s->seq_decode)\n+            s->seq_output = (s->seq_output + 1) & 0xff;\n+        else\n+            break;\n+    } while (1);\n+\n+    return 0;\n+}\n+\n+void ff_hevc_rpi_bump_frame(HEVCRpiContext *s)\n+{\n+    int dpb = 0;\n+    int min_poc = INT_MAX;\n+    int i;\n+\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {\n+        HEVCRpiFrame *frame = &s->DPB[i];\n+        if ((frame->flags) &&\n+            frame->sequence == s->seq_output &&\n+            frame->poc != s->poc) {\n+            dpb++;\n+        }\n+    }\n+\n+    if (s->ps.sps && dpb >= s->ps.sps->temporal_layer[s->ps.sps->max_sub_layers - 1].max_dec_pic_buffering) {\n+        for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {\n+            HEVCRpiFrame *frame = &s->DPB[i];\n+            if ((frame->flags) &&\n+                frame->sequence == s->seq_output &&\n+                frame->poc != s->poc) {\n+                if (frame->flags == HEVC_FRAME_FLAG_OUTPUT && frame->poc < min_poc) {\n+                    min_poc = frame->poc;\n+                }\n+            }\n+        }\n+\n+        for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {\n+            HEVCRpiFrame *frame = &s->DPB[i];\n+            if (frame->flags & HEVC_FRAME_FLAG_OUTPUT &&\n+                frame->sequence == s->seq_output &&\n+                frame->poc <= min_poc) {\n+                frame->flags |= HEVC_FRAME_FLAG_BUMPING;\n+            }\n+        }\n+\n+        dpb--;\n+    }\n+}\n+\n+static int init_slice_rpl(HEVCRpiContext *s)\n+{\n+    if (s->slice_idx >= s->rpl_tab_size)\n+        return AVERROR_INVALIDDATA;\n+\n+    s->refPicList = s->rpl_tab[s->slice_idx].refPicList + 0;\n+    return 0;\n+}\n+\n+int ff_hevc_rpi_slice_rpl(HEVCRpiContext *s)\n+{\n+    RpiSliceHeader *sh = &s->sh;\n+\n+    uint8_t nb_list = sh->slice_type == HEVC_SLICE_B ? 2 : 1;\n+    uint8_t list_idx;\n+    int i, j, ret;\n+\n+    ret = init_slice_rpl(s);\n+    if (ret < 0)\n+        return ret;\n+\n+    if (!(s->rps[ST_CURR_BEF].nb_refs + s->rps[ST_CURR_AFT].nb_refs +\n+          s->rps[LT_CURR].nb_refs)) {\n+        av_log(s->avctx, AV_LOG_ERROR, \"Zero refs in the frame RPS.\\n\");\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    for (list_idx = 0; list_idx < nb_list; list_idx++) {\n+        RefPicList  rpl_tmp = { { 0 } };\n+        RefPicList *rpl     = &s->refPicList[list_idx];\n+\n+        /* The order of the elements is\n+         * ST_CURR_BEF - ST_CURR_AFT - LT_CURR for the L0 and\n+         * ST_CURR_AFT - ST_CURR_BEF - LT_CURR for the L1 */\n+        int cand_lists[3] = { list_idx ? ST_CURR_AFT : ST_CURR_BEF,\n+                              list_idx ? ST_CURR_BEF : ST_CURR_AFT,\n+                              LT_CURR };\n+\n+        /* concatenate the candidate lists for the current frame */\n+        while (rpl_tmp.nb_refs < sh->nb_refs[list_idx]) {\n+            for (i = 0; i < FF_ARRAY_ELEMS(cand_lists); i++) {\n+                RefPicList *rps = &s->rps[cand_lists[i]];\n+                for (j = 0; j < rps->nb_refs && rpl_tmp.nb_refs < HEVC_MAX_REFS; j++) {\n+                    rpl_tmp.list[rpl_tmp.nb_refs]       = rps->list[j];\n+                    rpl_tmp.ref[rpl_tmp.nb_refs]        = rps->ref[j];\n+                    rpl_tmp.isLongTerm[rpl_tmp.nb_refs] = i == 2;\n+                    rpl_tmp.nb_refs++;\n+                }\n+            }\n+        }\n+\n+        /* reorder the references if necessary */\n+        if (sh->rpl_modification_flag[list_idx]) {\n+            for (i = 0; i < sh->nb_refs[list_idx]; i++) {\n+                int idx = sh->list_entry_lx[list_idx][i];\n+\n+                if (idx >= rpl_tmp.nb_refs) {\n+                    av_log(s->avctx, AV_LOG_ERROR, \"Invalid reference index.\\n\");\n+                    return AVERROR_INVALIDDATA;\n+                }\n+\n+                rpl->list[i]       = rpl_tmp.list[idx];\n+                rpl->ref[i]        = rpl_tmp.ref[idx];\n+                rpl->isLongTerm[i] = rpl_tmp.isLongTerm[idx];\n+                rpl->nb_refs++;\n+            }\n+        } else {\n+            memcpy(rpl, &rpl_tmp, sizeof(*rpl));\n+            rpl->nb_refs = FFMIN(rpl->nb_refs, sh->nb_refs[list_idx]);\n+        }\n+\n+        if (sh->collocated_list == list_idx &&\n+            sh->collocated_ref_idx < rpl->nb_refs)\n+            s->ref->collocated_ref = rpl->ref[sh->collocated_ref_idx];\n+    }\n+\n+    return 0;\n+}\n+\n+static HEVCRpiFrame *find_ref_idx(HEVCRpiContext *s, int poc)\n+{\n+    int i;\n+    int LtMask = (1 << s->ps.sps->log2_max_poc_lsb) - 1;\n+\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {\n+        HEVCRpiFrame *ref = &s->DPB[i];\n+        if (ref->frame->buf[0] && (ref->sequence == s->seq_decode)) {\n+            if ((ref->poc & LtMask) == poc)\n+                return ref;\n+        }\n+    }\n+\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {\n+        HEVCRpiFrame *ref = &s->DPB[i];\n+        if (ref->frame->buf[0] && ref->sequence == s->seq_decode) {\n+            if (ref->poc == poc || (ref->poc & LtMask) == poc)\n+                return ref;\n+        }\n+    }\n+\n+    if (s->nal_unit_type != HEVC_NAL_CRA_NUT && !IS_BLA(s))\n+        av_log(s->avctx, AV_LOG_ERROR,\n+               \"Could not find ref with POC %d\\n\", poc);\n+    return NULL;\n+}\n+\n+static void mark_ref(HEVCRpiFrame *frame, int flag)\n+{\n+    frame->flags &= ~(HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF);\n+    frame->flags |= flag;\n+}\n+\n+static HEVCRpiFrame *generate_missing_ref(HEVCRpiContext *s, int poc)\n+{\n+    HEVCRpiFrame *frame;\n+    int i, x, y;\n+\n+    frame = alloc_frame(s);\n+    if (!frame)\n+        return NULL;\n+\n+    if (!s->ps.sps->pixel_shift) {\n+        for (i = 0; frame->frame->buf[i]; i++)\n+            memset(frame->frame->buf[i]->data, 1 << (s->ps.sps->bit_depth - 1),\n+                   frame->frame->buf[i]->size);\n+    } else {\n+        for (i = 0; frame->frame->data[i]; i++)\n+            for (y = 0; y < (s->ps.sps->height >> s->ps.sps->vshift[i]); y++)\n+                for (x = 0; x < (s->ps.sps->width >> s->ps.sps->hshift[i]); x++) {\n+                    AV_WN16(frame->frame->data[i] + y * frame_stride1(frame->frame, 1) + 2 * x,\n+                            1 << (s->ps.sps->bit_depth - 1));\n+                }\n+    }\n+\n+    frame->poc      = poc;\n+    frame->sequence = s->seq_decode;\n+    frame->flags    = 0;\n+\n+    ff_hevc_rpi_progress_set_all_done(frame);\n+\n+    return frame;\n+}\n+\n+/* add a reference with the given poc to the list and mark it as used in DPB */\n+static int add_candidate_ref(HEVCRpiContext *s, RefPicList *list,\n+                             int poc, int ref_flag)\n+{\n+    HEVCRpiFrame *ref = find_ref_idx(s, poc);\n+\n+    if (ref == s->ref || list->nb_refs >= HEVC_MAX_REFS)\n+        return AVERROR_INVALIDDATA;\n+\n+    if (!ref) {\n+        ref = generate_missing_ref(s, poc);\n+        if (!ref)\n+            return AVERROR(ENOMEM);\n+    }\n+\n+    list->list[list->nb_refs] = ref->poc;\n+    list->ref[list->nb_refs]  = ref;\n+    list->nb_refs++;\n+\n+    mark_ref(ref, ref_flag);\n+    return 0;\n+}\n+\n+int ff_hevc_rpi_frame_rps(HEVCRpiContext *s)\n+{\n+    const ShortTermRPS *short_rps = s->sh.short_term_rps;\n+    const LongTermRPS  *long_rps  = &s->sh.long_term_rps;\n+    RefPicList               *rps = s->rps;\n+    int i, ret = 0;\n+\n+    if (!short_rps) {\n+        rps[0].nb_refs = rps[1].nb_refs = 0;\n+        return 0;\n+    }\n+\n+    /* clear the reference flags on all frames except the current one */\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {\n+        HEVCRpiFrame *frame = &s->DPB[i];\n+\n+        if (frame == s->ref)\n+            continue;\n+\n+        mark_ref(frame, 0);\n+    }\n+\n+    for (i = 0; i < NB_RPS_TYPE; i++)\n+        rps[i].nb_refs = 0;\n+\n+    /* add the short refs */\n+    for (i = 0; i < short_rps->num_delta_pocs; i++) {\n+        int poc = s->poc + short_rps->delta_poc[i];\n+        int list;\n+\n+        if (!short_rps->used[i])\n+            list = ST_FOLL;\n+        else if (i < short_rps->num_negative_pics)\n+            list = ST_CURR_BEF;\n+        else\n+            list = ST_CURR_AFT;\n+\n+        ret = add_candidate_ref(s, &rps[list], poc, HEVC_FRAME_FLAG_SHORT_REF);\n+        if (ret < 0)\n+            goto fail;\n+    }\n+\n+    /* add the long refs */\n+    for (i = 0; i < long_rps->nb_refs; i++) {\n+        int poc  = long_rps->poc[i];\n+        int list = long_rps->used[i] ? LT_CURR : LT_FOLL;\n+\n+        ret = add_candidate_ref(s, &rps[list], poc, HEVC_FRAME_FLAG_LONG_REF);\n+        if (ret < 0)\n+            goto fail;\n+    }\n+\n+fail:\n+    /* release any frames that are now unused */\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++)\n+        ff_hevc_rpi_unref_frame(s, &s->DPB[i], 0);\n+\n+    return ret;\n+}\n+\n+int ff_hevc_rpi_frame_nb_refs(HEVCRpiContext *s)\n+{\n+    int ret = 0;\n+    int i;\n+    const ShortTermRPS *rps = s->sh.short_term_rps;\n+    LongTermRPS *long_rps   = &s->sh.long_term_rps;\n+\n+    if (rps) {\n+        for (i = 0; i < rps->num_negative_pics; i++)\n+            ret += !!rps->used[i];\n+        for (; i < rps->num_delta_pocs; i++)\n+            ret += !!rps->used[i];\n+    }\n+\n+    if (long_rps) {\n+        for (i = 0; i < long_rps->nb_refs; i++)\n+            ret += !!long_rps->used[i];\n+    }\n+    return ret;\n+}\ndiff --git a/libavcodec/rpi_hevc_sei.c b/libavcodec/rpi_hevc_sei.c\nnew file mode 100644\nindex 0000000000..cd8149d58e\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_sei.c\n@@ -0,0 +1,368 @@\n+/*\n+ * HEVC Supplementary Enhancement Information messages\n+ *\n+ * Copyright (C) 2012 - 2013 Guillaume Martres\n+ * Copyright (C) 2012 - 2013 Gildas Cocherel\n+ * Copyright (C) 2013 Vittorio Giovara\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"golomb.h\"\n+#include \"rpi_hevc_ps.h\"\n+#include \"rpi_hevc_sei.h\"\n+\n+static int decode_nal_sei_decoded_picture_hash(HEVCSEIPictureHash *s, GetBitContext *gb)\n+{\n+    int cIdx, i;\n+    uint8_t hash_type;\n+    //uint16_t picture_crc;\n+    //uint32_t picture_checksum;\n+    hash_type = get_bits(gb, 8);\n+\n+    for (cIdx = 0; cIdx < 3/*((s->sps->chroma_format_idc == 0) ? 1 : 3)*/; cIdx++) {\n+        if (hash_type == 0) {\n+            s->is_md5 = 1;\n+            for (i = 0; i < 16; i++)\n+                s->md5[cIdx][i] = get_bits(gb, 8);\n+        } else if (hash_type == 1) {\n+            // picture_crc = get_bits(gb, 16);\n+            skip_bits(gb, 16);\n+        } else if (hash_type == 2) {\n+            // picture_checksum = get_bits_long(gb, 32);\n+            skip_bits(gb, 32);\n+        }\n+    }\n+    return 0;\n+}\n+\n+static int decode_nal_sei_mastering_display_info(HEVCSEIMasteringDisplay *s, GetBitContext *gb)\n+{\n+    int i;\n+    // Mastering primaries\n+    for (i = 0; i < 3; i++) {\n+        s->display_primaries[i][0] = get_bits(gb, 16);\n+        s->display_primaries[i][1] = get_bits(gb, 16);\n+    }\n+    // White point (x, y)\n+    s->white_point[0] = get_bits(gb, 16);\n+    s->white_point[1] = get_bits(gb, 16);\n+\n+    // Max and min luminance of mastering display\n+    s->max_luminance = get_bits_long(gb, 32);\n+    s->min_luminance = get_bits_long(gb, 32);\n+\n+    // As this SEI message comes before the first frame that references it,\n+    // initialize the flag to 2 and decrement on IRAP access unit so it\n+    // persists for the coded video sequence (e.g., between two IRAPs)\n+    s->present = 2;\n+    return 0;\n+}\n+\n+static int decode_nal_sei_content_light_info(HEVCSEIContentLight *s, GetBitContext *gb)\n+{\n+    // Max and average light levels\n+    s->max_content_light_level     = get_bits_long(gb, 16);\n+    s->max_pic_average_light_level = get_bits_long(gb, 16);\n+    // As this SEI message comes before the first frame that references it,\n+    // initialize the flag to 2 and decrement on IRAP access unit so it\n+    // persists for the coded video sequence (e.g., between two IRAPs)\n+    s->present = 2;\n+    return  0;\n+}\n+\n+static int decode_nal_sei_frame_packing_arrangement(HEVCSEIFramePacking *s, GetBitContext *gb)\n+{\n+    get_ue_golomb_long(gb);             // frame_packing_arrangement_id\n+    s->present = !get_bits1(gb);\n+\n+    if (s->present) {\n+        s->arrangement_type               = get_bits(gb, 7);\n+        s->quincunx_subsampling           = get_bits1(gb);\n+        s->content_interpretation_type    = get_bits(gb, 6);\n+\n+        // spatial_flipping_flag, frame0_flipped_flag, field_views_flag\n+        skip_bits(gb, 3);\n+        s->current_frame_is_frame0_flag = get_bits1(gb);\n+        // frame0_self_contained_flag, frame1_self_contained_flag\n+        skip_bits(gb, 2);\n+\n+        if (!s->quincunx_subsampling && s->arrangement_type != 5)\n+            skip_bits(gb, 16);  // frame[01]_grid_position_[xy]\n+        skip_bits(gb, 8);       // frame_packing_arrangement_reserved_byte\n+        skip_bits1(gb);         // frame_packing_arrangement_persistence_flag\n+    }\n+    skip_bits1(gb);             // upsampled_aspect_ratio_flag\n+    return 0;\n+}\n+\n+static int decode_nal_sei_display_orientation(HEVCSEIDisplayOrientation *s, GetBitContext *gb)\n+{\n+    s->present = !get_bits1(gb);\n+\n+    if (s->present) {\n+        s->hflip = get_bits1(gb);     // hor_flip\n+        s->vflip = get_bits1(gb);     // ver_flip\n+\n+        s->anticlockwise_rotation = get_bits(gb, 16);\n+        skip_bits1(gb);     // display_orientation_persistence_flag\n+    }\n+\n+    return 0;\n+}\n+\n+static int decode_nal_sei_pic_timing(HEVCSEIContext *s, GetBitContext *gb, const HEVCRpiParamSets *ps,\n+                                     void *logctx, int size)\n+{\n+    HEVCSEIPictureTiming *h = &s->picture_timing;\n+    HEVCRpiSPS *sps;\n+\n+    if (!ps->sps_list[s->active_seq_parameter_set_id])\n+        return(AVERROR(ENOMEM));\n+    sps = (HEVCRpiSPS*)ps->sps_list[s->active_seq_parameter_set_id]->data;\n+\n+    if (sps->vui.frame_field_info_present_flag) {\n+        int pic_struct = get_bits(gb, 4);\n+        h->picture_struct = AV_PICTURE_STRUCTURE_UNKNOWN;\n+        if (pic_struct == 2 || pic_struct == 10 || pic_struct == 12) {\n+            av_log(logctx, AV_LOG_DEBUG, \"BOTTOM Field\\n\");\n+            h->picture_struct = AV_PICTURE_STRUCTURE_BOTTOM_FIELD;\n+        } else if (pic_struct == 1 || pic_struct == 9 || pic_struct == 11) {\n+            av_log(logctx, AV_LOG_DEBUG, \"TOP Field\\n\");\n+            h->picture_struct = AV_PICTURE_STRUCTURE_TOP_FIELD;\n+        }\n+        get_bits(gb, 2);                   // source_scan_type\n+        get_bits(gb, 1);                   // duplicate_flag\n+        skip_bits1(gb);\n+        size--;\n+    }\n+    skip_bits_long(gb, 8 * size);\n+\n+    return 0;\n+}\n+\n+static int decode_registered_user_data_closed_caption(HEVCSEIA53Caption *s, GetBitContext *gb,\n+                                                      int size)\n+{\n+    int flag;\n+    int user_data_type_code;\n+    int cc_count;\n+\n+    if (size < 3)\n+       return AVERROR(EINVAL);\n+\n+    user_data_type_code = get_bits(gb, 8);\n+    if (user_data_type_code == 0x3) {\n+        skip_bits(gb, 1); // reserved\n+\n+        flag = get_bits(gb, 1); // process_cc_data_flag\n+        if (flag) {\n+            skip_bits(gb, 1);\n+            cc_count = get_bits(gb, 5);\n+            skip_bits(gb, 8); // reserved\n+            size -= 2;\n+\n+            if (cc_count && size >= cc_count * 3) {\n+                const uint64_t new_size = (s->a53_caption_size + cc_count\n+                                           * UINT64_C(3));\n+                int i, ret;\n+\n+                if (new_size > INT_MAX)\n+                    return AVERROR(EINVAL);\n+\n+                /* Allow merging of the cc data from two fields. */\n+                ret = av_reallocp(&s->a53_caption, new_size);\n+                if (ret < 0)\n+                    return ret;\n+\n+                for (i = 0; i < cc_count; i++) {\n+                    s->a53_caption[s->a53_caption_size++] = get_bits(gb, 8);\n+                    s->a53_caption[s->a53_caption_size++] = get_bits(gb, 8);\n+                    s->a53_caption[s->a53_caption_size++] = get_bits(gb, 8);\n+                }\n+                skip_bits(gb, 8); // marker_bits\n+            }\n+        }\n+    } else {\n+        int i;\n+        for (i = 0; i < size - 1; i++)\n+            skip_bits(gb, 8);\n+    }\n+\n+    return 0;\n+}\n+\n+static int decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEIContext *s, GetBitContext *gb,\n+                                                         int size)\n+{\n+    uint32_t country_code;\n+    uint32_t user_identifier;\n+\n+    if (size < 7)\n+        return AVERROR(EINVAL);\n+    size -= 7;\n+\n+    country_code = get_bits(gb, 8);\n+    if (country_code == 0xFF) {\n+        skip_bits(gb, 8);\n+        size--;\n+    }\n+\n+    skip_bits(gb, 8);\n+    skip_bits(gb, 8);\n+\n+    user_identifier = get_bits_long(gb, 32);\n+\n+    switch (user_identifier) {\n+        case MKBETAG('G', 'A', '9', '4'):\n+            return decode_registered_user_data_closed_caption(&s->a53_caption, gb, size);\n+        default:\n+            skip_bits_long(gb, size * 8);\n+            break;\n+    }\n+    return 0;\n+}\n+\n+static int decode_nal_sei_active_parameter_sets(HEVCSEIContext *s, GetBitContext *gb, void *logctx)\n+{\n+    int num_sps_ids_minus1;\n+    int i;\n+    unsigned active_seq_parameter_set_id;\n+\n+    get_bits(gb, 4); // active_video_parameter_set_id\n+    get_bits(gb, 1); // self_contained_cvs_flag\n+    get_bits(gb, 1); // num_sps_ids_minus1\n+    num_sps_ids_minus1 = get_ue_golomb_long(gb); // num_sps_ids_minus1\n+\n+    if (num_sps_ids_minus1 < 0 || num_sps_ids_minus1 > 15) {\n+        av_log(logctx, AV_LOG_ERROR, \"num_sps_ids_minus1 %d invalid\\n\", num_sps_ids_minus1);\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    active_seq_parameter_set_id = get_ue_golomb_long(gb);\n+    if (active_seq_parameter_set_id >= HEVC_MAX_SPS_COUNT) {\n+        av_log(logctx, AV_LOG_ERROR, \"active_parameter_set_id %d invalid\\n\", active_seq_parameter_set_id);\n+        return AVERROR_INVALIDDATA;\n+    }\n+    s->active_seq_parameter_set_id = active_seq_parameter_set_id;\n+\n+    for (i = 1; i <= num_sps_ids_minus1; i++)\n+        get_ue_golomb_long(gb); // active_seq_parameter_set_id[i]\n+\n+    return 0;\n+}\n+\n+static int decode_nal_sei_alternative_transfer(HEVCSEIAlternativeTransfer *s, GetBitContext *gb)\n+{\n+    s->present = 1;\n+    s->preferred_transfer_characteristics = get_bits(gb, 8);\n+    return 0;\n+}\n+\n+static int decode_nal_sei_prefix(GetBitContext *gb, void *logctx, HEVCSEIContext *s, const HEVCRpiParamSets *ps,\n+                                 int type, int size)\n+{\n+    switch (type) {\n+    case 256:  // Mismatched value from HM 8.1\n+        return decode_nal_sei_decoded_picture_hash(&s->picture_hash, gb);\n+    case HEVC_SEI_TYPE_FRAME_PACKING:\n+        return decode_nal_sei_frame_packing_arrangement(&s->frame_packing, gb);\n+    case HEVC_SEI_TYPE_DISPLAY_ORIENTATION:\n+        return decode_nal_sei_display_orientation(&s->display_orientation, gb);\n+    case HEVC_SEI_TYPE_PICTURE_TIMING:\n+        return decode_nal_sei_pic_timing(s, gb, ps, logctx, size);\n+    case HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO:\n+        return decode_nal_sei_mastering_display_info(&s->mastering_display, gb);\n+    case HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO:\n+        return decode_nal_sei_content_light_info(&s->content_light, gb);\n+    case HEVC_SEI_TYPE_ACTIVE_PARAMETER_SETS:\n+        return decode_nal_sei_active_parameter_sets(s, gb, logctx);\n+    case HEVC_SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35:\n+        return decode_nal_sei_user_data_registered_itu_t_t35(s, gb, size);\n+    case HEVC_SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS:\n+        return decode_nal_sei_alternative_transfer(&s->alternative_transfer, gb);\n+    default:\n+        av_log(logctx, AV_LOG_DEBUG, \"Skipped PREFIX SEI %d\\n\", type);\n+        skip_bits_long(gb, 8 * size);\n+        return 0;\n+    }\n+}\n+\n+static int decode_nal_sei_suffix(GetBitContext *gb, void *logctx, HEVCSEIContext *s,\n+                                 int type, int size)\n+{\n+    switch (type) {\n+    case HEVC_SEI_TYPE_DECODED_PICTURE_HASH:\n+        return decode_nal_sei_decoded_picture_hash(&s->picture_hash, gb);\n+    default:\n+        av_log(logctx, AV_LOG_DEBUG, \"Skipped SUFFIX SEI %d\\n\", type);\n+        skip_bits_long(gb, 8 * size);\n+        return 0;\n+    }\n+}\n+\n+static int decode_nal_sei_message(GetBitContext * const gb, void * const logctx, HEVCSEIContext * const s,\n+                                  const HEVCRpiParamSets * const ps, const int nal_unit_type)\n+{\n+    int payload_type = 0;\n+    int payload_size = 0;\n+    int byte = 0xFF;\n+    av_log(logctx, AV_LOG_DEBUG, \"Decoding SEI\\n\");\n+\n+    while (byte == 0xFF) {\n+       if (get_bits_left(gb) < 16 || payload_type > INT_MAX - 255)\n+           return AVERROR_INVALIDDATA;\n+        byte          = get_bits(gb, 8);\n+        payload_type += byte;\n+    }\n+    byte = 0xFF;\n+    while (byte == 0xFF) {\n+        if (get_bits_left(gb) < 8 + 8LL*payload_size)\n+            return AVERROR_INVALIDDATA;\n+         byte          = get_bits(gb, 8);\n+        payload_size += byte;\n+    }\n+    if (nal_unit_type == HEVC_NAL_SEI_PREFIX) {\n+        return decode_nal_sei_prefix(gb, logctx, s, ps, payload_type, payload_size);\n+    } else { /* nal_unit_type == NAL_SEI_SUFFIX */\n+        return decode_nal_sei_suffix(gb, logctx, s, payload_type, payload_size);\n+    }\n+}\n+\n+static int more_rbsp_data(GetBitContext *gb)\n+{\n+    return get_bits_left(gb) > 0 && show_bits(gb, 8) != 0x80;\n+}\n+\n+int ff_hevc_rpi_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEIContext *s,\n+                           const HEVCRpiParamSets *ps, int type)\n+{\n+    int ret;\n+\n+    do {\n+        ret = decode_nal_sei_message(gb, logctx, s, ps, type);\n+        if (ret < 0)\n+            return ret;\n+    } while (more_rbsp_data(gb));\n+    return 1;\n+}\n+\n+void ff_hevc_rpi_reset_sei(HEVCSEIContext *s)\n+{\n+    s->a53_caption.a53_caption_size = 0;\n+    av_freep(&s->a53_caption.a53_caption);\n+}\ndiff --git a/libavcodec/rpi_hevc_sei.h b/libavcodec/rpi_hevc_sei.h\nnew file mode 100644\nindex 0000000000..d4ac348df9\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_sei.h\n@@ -0,0 +1,135 @@\n+/*\n+ * HEVC Supplementary Enhancement Information messages\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#ifndef AVCODEC_RPI_HEVC_SEI_H\n+#define AVCODEC_RPI_HEVC_SEI_H\n+\n+#include <stdint.h>\n+\n+#include \"libavutil/md5.h\"\n+\n+#include \"get_bits.h\"\n+\n+/**\n+ * SEI message types\n+ */\n+typedef enum {\n+    HEVC_SEI_TYPE_BUFFERING_PERIOD                     = 0,\n+    HEVC_SEI_TYPE_PICTURE_TIMING                       = 1,\n+    HEVC_SEI_TYPE_PAN_SCAN_RECT                        = 2,\n+    HEVC_SEI_TYPE_FILLER_PAYLOAD                       = 3,\n+    HEVC_SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35       = 4,\n+    HEVC_SEI_TYPE_USER_DATA_UNREGISTERED               = 5,\n+    HEVC_SEI_TYPE_RECOVERY_POINT                       = 6,\n+    HEVC_SEI_TYPE_SCENE_INFO                           = 9,\n+    HEVC_SEI_TYPE_FULL_FRAME_SNAPSHOT                  = 15,\n+    HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_START = 16,\n+    HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_END   = 17,\n+    HEVC_SEI_TYPE_FILM_GRAIN_CHARACTERISTICS           = 19,\n+    HEVC_SEI_TYPE_POST_FILTER_HINT                     = 22,\n+    HEVC_SEI_TYPE_TONE_MAPPING_INFO                    = 23,\n+    HEVC_SEI_TYPE_FRAME_PACKING                        = 45,\n+    HEVC_SEI_TYPE_DISPLAY_ORIENTATION                  = 47,\n+    HEVC_SEI_TYPE_SOP_DESCRIPTION                      = 128,\n+    HEVC_SEI_TYPE_ACTIVE_PARAMETER_SETS                = 129,\n+    HEVC_SEI_TYPE_DECODING_UNIT_INFO                   = 130,\n+    HEVC_SEI_TYPE_TEMPORAL_LEVEL0_INDEX                = 131,\n+    HEVC_SEI_TYPE_DECODED_PICTURE_HASH                 = 132,\n+    HEVC_SEI_TYPE_SCALABLE_NESTING                     = 133,\n+    HEVC_SEI_TYPE_REGION_REFRESH_INFO                  = 134,\n+    HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO               = 137,\n+    HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO             = 144,\n+    HEVC_SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147,\n+} HEVC_SEI_Type;\n+\n+typedef struct HEVCSEIPictureHash {\n+    uint8_t       md5[3][16];\n+    uint8_t is_md5;\n+} HEVCSEIPictureHash;\n+\n+typedef struct HEVCSEIFramePacking {\n+    int present;\n+    int arrangement_type;\n+    int content_interpretation_type;\n+    int quincunx_subsampling;\n+    int current_frame_is_frame0_flag;\n+} HEVCSEIFramePacking;\n+\n+typedef struct HEVCSEIDisplayOrientation {\n+    int present;\n+    int anticlockwise_rotation;\n+    int hflip, vflip;\n+} HEVCSEIDisplayOrientation;\n+\n+typedef struct HEVCSEIPictureTiming {\n+    int picture_struct;\n+} HEVCSEIPictureTiming;\n+\n+typedef struct HEVCSEIA53Caption {\n+    int a53_caption_size;\n+    uint8_t *a53_caption;\n+} HEVCSEIA53Caption;\n+\n+typedef struct HEVCSEIMasteringDisplay {\n+    int present;\n+    uint16_t display_primaries[3][2];\n+    uint16_t white_point[2];\n+    uint32_t max_luminance;\n+    uint32_t min_luminance;\n+} HEVCSEIMasteringDisplay;\n+\n+typedef struct HEVCSEIContentLight {\n+    int present;\n+    uint16_t max_content_light_level;\n+    uint16_t max_pic_average_light_level;\n+} HEVCSEIContentLight;\n+\n+typedef struct HEVCSEIAlternativeTransfer {\n+    int present;\n+    int preferred_transfer_characteristics;\n+} HEVCSEIAlternativeTransfer;\n+\n+typedef struct HEVCSEIContext {\n+    HEVCSEIPictureHash picture_hash;\n+    HEVCSEIFramePacking frame_packing;\n+    HEVCSEIDisplayOrientation display_orientation;\n+    HEVCSEIPictureTiming picture_timing;\n+    HEVCSEIA53Caption a53_caption;\n+    HEVCSEIMasteringDisplay mastering_display;\n+    HEVCSEIContentLight content_light;\n+    int active_seq_parameter_set_id;\n+    HEVCSEIAlternativeTransfer alternative_transfer;\n+} HEVCSEIContext;\n+\n+struct HEVCRpiParamSets;\n+\n+int ff_hevc_rpi_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEIContext *s,\n+                           const struct HEVCRpiParamSets *ps, int type);\n+\n+/**\n+ * Reset SEI values that are stored on the Context.\n+ * e.g. Caption data that was extracted during NAL\n+ * parsing.\n+ *\n+ * @param s HEVCRpiContext.\n+ */\n+void ff_hevc_rpi_reset_sei(HEVCSEIContext *s);\n+\n+#endif /* AVCODEC_RPI_HEVC_SEI_H */\ndiff --git a/libavcodec/rpi_hevc_shader.c b/libavcodec/rpi_hevc_shader.c\nnew file mode 100644\nindex 0000000000..23b49a99ae\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_shader.c\n@@ -0,0 +1,1537 @@\n+#include \"rpi_hevc_shader.h\"\n+\n+#ifdef _MSC_VER\n+   #include <stdint.h>\n+   /* cast through uintptr_t to avoid warnings */\n+   #define POINTER_TO_UINT(X) ((unsigned int)(uintptr_t)(X))\n+#else\n+   #define POINTER_TO_UINT(X) ((unsigned int)(X))\n+#endif\n+\n+#ifdef __cplusplus\n+extern \"C\" { /* the types are probably wrong... */\n+#endif\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#ifdef _MSC_VER\n+__declspec(align(8))\n+#elif defined(__GNUC__)\n+__attribute__((aligned(8)))\n+#endif\n+unsigned int ff_hevc_rpi_shader[] = {\n+// ::mc_setup_c_q0\n+// ::mc_start\n+/* [0x00000000] */ 0x0000000c, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_setup_c_qn\n+/* [0x00000008] */ 0x95801ff6, 0xd0025900, // mov tmurs, 1                  ; mov ra0, unif\n+/* [0x00000010] */ 0xaaaaff00, 0xe6020827, // mov r0, [0,2,0,2,0,2,0,2,1,3,1,3,1,3,1,3]\n+/* [0x00000018] */ 0x9181e1f6, 0xd00250d8, // shl rb_ef, r0, i_shift30      ; mov ra_base, unif\n+/* [0x00000020] */ 0x0d801dc0, 0xd0020827, // sub r0, unif, 1\n+/* [0x00000028] */ 0x119c11c0, 0xd00216a7, // shl rb_max_x, r0, v_x_shift\n+/* [0x00000030] */ 0x0d801dc0, 0xd00217a7, // sub rb_max_y, unif, 1\n+/* [0x00000038] */ 0xff800100, 0xe0020527, // mov ra_kff800100, 0xff800100\n+/* [0x00000040] */ 0x000000ff, 0xe0021627, // mov rb_pmask, v_pmask\n+/* [0x00000048] */ 0x001000ff, 0xe00205e7, // mov ra_blk_height_pmax, ((1 << v_bit_depth) - 1) | (v_blk_height << 16)\n+/* [0x00000050] */ 0x00004000, 0xe00217e7, // mov rb_fir_off_h, (FIR_OFFSET << (v_bit_depth - 8))\n+/* [0x00000058] */ 0x4000000e, 0xe0020667, // mov ra_fir_off_val_wt_den_p7, (FIR_OFFSET << 16) | (DENOM + 15 - v_bit_depth)\n+/* [0x00000060] */ 0x95803ff6, 0x10024754, // mov ra_ef, rb_ef              ; mov rb_xpitch, unif\n+/* [0x00000068] */ 0x15827d80, 0x10021427, // mov rb_pitch, unif\n+/* [0x00000070] */ 0xc0000000, 0xe0020867, // mov r1, vdw_setup_1(0)\n+/* [0x00000078] */ 0x0c9d03c0, 0x10021667, // add rb_dma1_base, r1, rb_pitch\n+/* [0x00000080] */ 0x14981f80, 0xd0020827, // and r0, 1, elem_num\n+/* [0x00000088] */ 0x409c5007, 0xd00049e0, // nop                           ; mul24 r0, r0, 5\n+/* [0x00000090] */ 0x0c9a7180, 0x100210a7, // add rb_elem_x, r0, elem_num\n+/* [0x00000098] */ 0x11001dc0, 0xd4020827, // shl r0, ra0.16b, v_x_shift\n+/* [0x000000a0] */ 0x0c9c21c0, 0x10020827, // add r0, r0, rb_elem_x\n+/* [0x000000a8] */ 0x930001f6, 0xd2225811, // max r0, r0, 0                 ; mov ra_y, ra0.16a\n+/* [0x000000b0] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x\n+/* [0x000000b8] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3\n+/* [0x000000c0] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4\n+/* [0x000000c8] */ 0x0d510dc0, 0x18020867, // sub r1, ra_k0, rb_pitch\n+/* [0x000000d0] */ 0x149e7040, 0x10020867, // and r1, r0, r1\n+/* [0x000000d8] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x000000e0] */ 0x8c827076, 0x10025800, // add r0, r0, r1                ; mov ra0, unif\n+/* [0x000000e8] */ 0x0c627c00, 0x10020627, // add ra_base, ra_base, r0\n+/* [0x000000f0] */ 0x159e6fc0, 0x100208a7, // mov r2, qpu_num\n+/* [0x000000f8] */ 0x0f9c25c0, 0xd0020867, // asr r1, r2, 2\n+/* [0x00000100] */ 0x119c63c0, 0xd0020867, // shl r1, r1, 6\n+/* [0x00000108] */ 0x149c35c0, 0xd0020827, // and r0, r2, 3\n+/* [0x00000110] */ 0x159e7040, 0x10020827, // or  r0, r0, r1\n+/* [0x00000118] */ 0x00004800, 0xe0020867, // mov r1, vpm_setup(0, 4, h8p(0, 0))\n+/* [0x00000120] */ 0x0c9e7040, 0x10021727, // add r_vpm, r0, r1\n+/* [0x00000128] */ 0x80004004, 0xe0020867, // mov r1, vdw_setup_0(0, 0, dma_h8p(0,0,0))\n+/* [0x00000130] */ 0x119c51c0, 0xd0020827, // shl r0, r0, 5\n+/* [0x00000138] */ 0x0c9e7040, 0x100216e7, // add r_dma, r0, r1\n+/* [0x00000140] */ 0x11001dc0, 0xd4020827, // shl r0, ra0.16b, v_x_shift\n+/* [0x00000148] */ 0x8c0021f6, 0x12125811, // add r0, r0, rb_elem_x         ; mov ra_y2, ra0.16a\n+/* [0x00000150] */ 0x938001f6, 0xd002480f, // max r0, r0, 0                 ; mov rb_base2, unif\n+/* [0x00000158] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x\n+/* [0x00000160] */ 0x119c31c0, 0xd0021067, // shl rb_xshift2_next, r0, 3\n+/* [0x00000168] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4\n+/* [0x00000170] */ 0x0d510dc0, 0x18020867, // sub r1, ra_k0, rb_pitch\n+/* [0x00000178] */ 0x949c307f, 0xd0024863, // and r1, r0, r1                ; mov r3, PREREAD\n+/* [0x00000180] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00000188] */ 0x8c467076, 0x12024822, // add r0, r0, r1                ; mov r2, ra_y2\n+/* [0x00000190] */ 0x8c44fe36, 0x140253e0, // add rb_base2, rb_base2, r0    ; mov r0, ra_y\n+// :1\n+/* [0x00000198] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1\n+/* [0x000001a0] */ 0x139c01c0, 0xd0020867, // max r1, r0, 0\n+/* [0x000001a8] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y\n+/* [0x000001b0] */ 0x4c51018f, 0x1a024821, // add r0, r0, ra_k1             ; mul24 r1, r1, rb_pitch\n+/* [0x000001b8] */ 0x8c627c40, 0x10225e11, // add t0s, ra_base, r1          ; mov ra_y, r0\n+/* [0x000001c0] */ 0x139c05c0, 0xd0020867, // max r1, r2, 0\n+/* [0x000001c8] */ 0xffffffb0, 0xf03809e7, // brr.anynz -, r:1b\n+/* [0x000001d0] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y\n+/* [0x000001d8] */ 0x4c51058f, 0x1a0248a1, // add r2, r2, ra_k1             ; mul24 r1, r1, rb_pitch\n+/* [0x000001e0] */ 0x8c9cfe52, 0x10125f11, // add t1s, rb_base2, r1         ; mov ra_y2, r2\n+/* [0x000001e8] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x000001f0] */ 0x00000000, 0xe0024104, // mov ra4, 0                    ; mov rb4, 0\n+/* [0x000001f8] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00000200] */ 0x00000000, 0xe0024145, // mov ra5, 0                    ; mov rb5, 0\n+/* [0x00000208] */ 0x00000000, 0xe0024186, // mov ra6, 0                    ; mov rb6, 0\n+/* [0x00000210] */ 0x00000000, 0xe00241c7, // mov ra7, 0                    ; mov rb7, 0\n+// ::mc_filter_c_p\n+/* [0x00000218] */ 0x9581cff6, 0x10025c42, // mov vw_setup, rb_vpm_init     ; mov ra2, unif\n+/* [0x00000220] */ 0x8c803ff6, 0x100269e3, // add.setf -, rb_ef, rb_ef      ; mov r3, unif\n+/* [0x00000228] */ 0xf1081dc0, 0xd4024825, // shl r0, ra2.16b, v_x_shift    ; v8subs r5rep, r0, r0\n+/* [0x00000230] */ 0x8c8021f6, 0x10025810, // add r0, r0, rb_elem_x         ; mov ra_width_height, unif\n+/* [0x00000238] */ 0x8d810bf6, 0x10025840, // sub r1, r5, rb_pitch          ; mov ra0, unif\n+/* [0x00000240] */ 0x93567176, 0x14024800, // max r0, r0, r5                ; mov vrx_xshift, vrx_xshift_next\n+/* [0x00000248] */ 0x9209a1f6, 0x12225813, // min r0, r0, rb_max_x          ; mov vra_y_next, ra2.16a\n+/* [0x00000250] */ 0x119c31c0, 0xd0220567, // shl vrx_xshift_next, r0, 3\n+/* [0x00000258] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4\n+/* [0x00000260] */ 0x54402077, 0xd4024862, // and r1, r0, r1                ; mul24 r2, ra_width, v_x_mul\n+/* [0x00000268] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00000270] */ 0x8c827076, 0x10025803, // add r0, r0, r1                ; mov ra3, unif\n+/* [0x00000278] */ 0x8c427636, 0x120246a1, // add vrx_base_next, r3, r0     ; mov r1, ra_height\n+/* [0x00000280] */ 0x8d819eb6, 0x10025756, // sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif\n+/* [0x00000288] */ 0x8c5dc3ce, 0xdc025461, // add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height\n+/* [0x00000290] */ 0x8c81f3f6, 0xd0039496, // add rb_lcount, r1, (3-4)      ; mov.ifc ra_wt_off_mul_l0, unif\n+/* [0x00000298] */ 0x918073f6, 0xd002581c, // shl r0, r1, v_dma_h_shift     ; mov ra_dest, unif\n+/* [0x000002a0] */ 0x8c6670b6, 0x14024822, // add r0, r0, r2                ; mov r2, ra_fir_off_val\n+/* [0x000002a8] */ 0x910d01f6, 0xdc02480a, // shl r0, r0, v_dma_wh_shift    ; mov rb10, ra3.8c\n+/* [0x000002b0] */ 0x8c59b1f6, 0x140246e1, // add ra_dma0, r0, rb_dma0_base ; mov r1, ra_wt_off_l0\n+/* [0x000002b8] */ 0x5158c3d6, 0xd2024860, // shl r1, r1, i_wt_den_p5       ; mul24 r0, r2, ra_wt_mul_l0\n+/* [0x000002c0] */ 0x8d667236, 0x14025320, // sub rb_wt_off, r1, r0         ; mov r0, ra_kmul_add\n+/* [0x000002c8] */ 0x8c59cc3f, 0xd21245a5, // add ra_wt_mul_l0, ra_wt_mul_l0, r0 ; mov r5rep, -4\n+/* [0x000002d0] */ 0x950e0dbf, 0x1e0252de, // mov rb11, ra3.8d              ; mov ra_link, unif\n+// :1\n+/* [0x000002d8] */ 0x8d151bf6, 0xa00269c4, // sub.setf -, r5, rb_i_tmu      ; mov rb4, ra5                  ; ldtmu0\n+/* [0x000002e0] */ 0x8e4c09f6, 0x140288a3, // shr r2, r4, vrx_xshift        ; mov.ifz  r3, vra_y_next\n+/* [0x000002e8] */ 0x8e4485f6, 0xd402c863, // shr r1, r2, v_v_shift         ; mov.ifnz r3, vra_y\n+/* [0x000002f0] */ 0x8c683ff6, 0x1002b9d8, // add.setf -, rb_ef, rb_ef      ; mov.ifz  vra_base, vrx_base_next\n+/* [0x000002f8] */ 0x8c531789, 0xda224460, // add vra_y, r3, ra_k1          ; mov      r0, r1 << 15\n+/* [0x00000300] */ 0x9353f792, 0xd803c8e1, // max r3, r3, ra_k0             ; mov.ifnc r1, r2 << 1\n+/* [0x00000308] */ 0x929de7d2, 0x1003c8e0, // min r3, r3, rb_max_y          ; mov.ifnc r0, r2\n+/* [0x00000310] */ 0x545d039f, 0x12024863, // and r1, r1, ra_pmax           ; mul24 r3, r3, rb_pitch\n+/* [0x00000318] */ 0x8c618cc7, 0x10024e20, // add vr_txs, vra_base, r3      ; v8min r0, r0, rb_pmask\n+/* [0x00000320] */ 0x4c001bf0, 0xd8025963, // add r5rep, r5, 1              ; mul24      r3, ra0.8a,       r0\n+/* [0x00000328] */ 0x4d01fef1, 0x1e0248a3, // sub r2, rb_fir_off_h, r3      ; mul24      r3, ra0.8d,       r1\n+/* [0x00000330] */ 0x4d03e4f0, 0xda0248a3, // sub r2, r2, r3                ; mul24      r3, ra0.8b << 2,  r0 << 2  @ \"mul_used\", 0\n+/* [0x00000338] */ 0x40034031, 0xda0109e3, // nop                           ; mul24.ifn  r3, ra0.8b << 12, r1 << 12 @ \"mul_used\", 0\n+/* [0x00000340] */ 0x4c03c4f0, 0xdc0248a3, // add r2, r2, r3                ; mul24      r3, ra0.8c << 4,  r0 << 4  @ \"mul_used\", 0\n+/* [0x00000348] */ 0x4c032b71, 0xdc0329e3, // add.setf -, r5, r5            ; mul24.ifn  r3, ra0.8c << 14, r1 << 14 @ \"mul_used\", 0\n+/* [0x00000350] */ 0xffffff68, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00000358] */ 0x4c1ca4f7, 0x100248a0, // add r2, r2, r3                ; mul24 r0, ra7, rb10\n+/* [0x00000360] */ 0x550c6ffe, 0x1a024161, // mov ra5, rb6                  ; mul24 r1, rb6, ra3.8b\n+/* [0x00000368] */ 0x8f1c05f6, 0xd00241c6, // asr ra7, r2, v_bit_depth - 8  ; mov rb6, ra7\n+/* [0x00000370] */ 0x4c0c423e, 0x18024860, // add r1, r1, r0                ; mul24 r0, rb4, ra3.8a\n+/* [0x00000378] */ 0x4d1cb237, 0x10024860, // sub r1, r1, r0                ; mul24 r0, ra7, rb11\n+/* [0x00000380] */ 0x0d9e7200, 0x10020867, // sub r1, r1, r0\n+/* [0x00000388] */ 0x8f5c63f6, 0xdc024863, // asr r1, r1, 6                 ; mov r3, ra_blk_height\n+/* [0x00000390] */ 0x4d592bce, 0x120269e0, // sub.setf -, r5, rb_lcount     ; mul24 r0, r1, ra_wt_mul_l0\n+/* [0x00000398] */ 0x4c64c1ce, 0x14024821, // add r0, r0, rb_wt_off         ; mul24 r1, r1, ra_kmul_add\n+/* [0x000003a0] */ 0xed427073, 0x12024860, // sub r1, r0, r1                ; v8subs r0, ra_height, r3\n+/* [0x000003a8] */ 0xffffff10, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x000003b0] */ 0x0f9cd3c0, 0xd0020867, // asr r1, r1, i_wt_den_p6\n+/* [0x000003b8] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax           ; mov -, vw_wait\n+/* [0x000003c0] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch\n+/* [0x000003c8] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0        ; mov vw_setup, ra_dma0\n+/* [0x000003d0] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link\n+/* [0x000003d8] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3                ; mov vw_setup, rb_dma1\n+/* [0x000003e0] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3                ; mov vw_addr, ra_dest\n+/* [0x000003e8] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23\n+/* [0x000003f0] */ 0xfffffec8, 0xf0f809e7, // brr -, r:1b\n+/* [0x000003f8] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0\n+/* [0x00000400] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1\n+/* [0x00000408] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init\n+// ::mc_filter_c_p_l1\n+/* [0x00000410] */ 0x9581cff6, 0x10025c42, // mov vw_setup, rb_vpm_init     ; mov ra2, unif\n+/* [0x00000418] */ 0x8c803ff6, 0x100269e3, // add.setf -, rb_ef, rb_ef      ; mov r3, unif\n+/* [0x00000420] */ 0xf1081dc0, 0xd4024825, // shl r0, ra2.16b, v_x_shift    ; v8subs r5rep, r0, r0\n+/* [0x00000428] */ 0x8c8021f6, 0x10025810, // add r0, r0, rb_elem_x         ; mov ra_width_height, unif\n+/* [0x00000430] */ 0x8d810bf6, 0x10025840, // sub r1, r5, rb_pitch          ; mov ra0, unif\n+/* [0x00000438] */ 0x939c117f, 0x10125815, // max r0, r0, r5                ; mov vrx_xshift, vrx_xshift_next\n+/* [0x00000440] */ 0x9209a1f6, 0x12125813, // min r0, r0, rb_max_x          ; mov vra_y_next, ra2.16a\n+/* [0x00000448] */ 0x119c31c0, 0xd0021067, // shl vrx_xshift_next, r0, 3\n+/* [0x00000450] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4\n+/* [0x00000458] */ 0x54402077, 0xd4024862, // and r1, r0, r1                ; mul24 r2, ra_width, v_x_mul\n+/* [0x00000460] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00000468] */ 0x8c827076, 0x10025803, // add r0, r0, r1                ; mov ra3, unif\n+/* [0x00000470] */ 0x8c427636, 0x120254e1, // add vrx_base_next, r3, r0     ; mov r1, ra_height\n+/* [0x00000478] */ 0x8d819eb6, 0x10025756, // sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif\n+/* [0x00000480] */ 0x8c5dc3ce, 0xdc025461, // add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height\n+/* [0x00000488] */ 0x8c81f3f6, 0xd0039496, // add rb_lcount, r1, (3-4)      ; mov.ifc ra_wt_off_mul_l0, unif\n+/* [0x00000490] */ 0x918073f6, 0xd002581c, // shl r0, r1, v_dma_h_shift     ; mov ra_dest, unif\n+/* [0x00000498] */ 0x8c6670b6, 0x14024822, // add r0, r0, r2                ; mov r2, ra_fir_off_val\n+/* [0x000004a0] */ 0x910d01f6, 0xdc02480a, // shl r0, r0, v_dma_wh_shift    ; mov rb10, ra3.8c\n+/* [0x000004a8] */ 0x8c59b1f6, 0x140246e1, // add ra_dma0, r0, rb_dma0_base ; mov r1, ra_wt_off_l0\n+/* [0x000004b0] */ 0x5158c3d6, 0xd2024860, // shl r1, r1, i_wt_den_p5       ; mul24 r0, r2, ra_wt_mul_l0\n+/* [0x000004b8] */ 0x8d667236, 0x14025320, // sub rb_wt_off, r1, r0         ; mov r0, ra_kmul_add\n+/* [0x000004c0] */ 0x8c59cc3f, 0xd21245a5, // add ra_wt_mul_l0, ra_wt_mul_l0, r0 ; mov r5rep, -4\n+/* [0x000004c8] */ 0x950e0dbf, 0x1e0252de, // mov rb11, ra3.8d              ; mov ra_link, unif\n+// :1\n+/* [0x000004d0] */ 0x8d151bf6, 0xb00269c4, // sub.setf -, r5, rb_i_tmu      ; mov rb4, ra5                  ; ldtmu1\n+/* [0x000004d8] */ 0x8e5539bf, 0x1202888f, // shr r2, r4, vrx_xshift        ; mov.ifz  vra_base, vrx_base_next\n+/* [0x000004e0] */ 0x8e4485f6, 0xd202c863, // shr r1, r2, v_v_shift         ; mov.ifnz r3, vra_y\n+/* [0x000004e8] */ 0x8c4c3ff6, 0x1202a9e3, // add.setf -, rb_ef, rb_ef      ; mov.ifz  r3, vra_y_next\n+/* [0x000004f0] */ 0x8c531789, 0xda124460, // add vra_y, r3, ra_k1          ; mov      r0, r1 << 15\n+/* [0x000004f8] */ 0x9353f792, 0xd803c8e1, // max r3, r3, ra_k0             ; mov.ifnc r1, r2 << 1\n+/* [0x00000500] */ 0x929de7d2, 0x1003c8e0, // min r3, r3, rb_max_y          ; mov.ifnc r0, r2\n+/* [0x00000508] */ 0x545d039f, 0x12024863, // and r1, r1, ra_pmax           ; mul24 r3, r3, rb_pitch\n+/* [0x00000510] */ 0x8c5cfec6, 0x12024f20, // add vr_txs, vra_base, r3      ; v8min r0, r0, ra_pmax\n+/* [0x00000518] */ 0x4c001bf0, 0xd8025963, // add r5rep, r5, 1              ; mul24      r3, ra0.8a,       r0\n+/* [0x00000520] */ 0x4d01fef1, 0x1e0248a3, // sub r2, rb_fir_off_h, r3      ; mul24      r3, ra0.8d,       r1\n+/* [0x00000528] */ 0x4d03e4f0, 0xda0248a3, // sub r2, r2, r3                ; mul24      r3, ra0.8b << 2,  r0 << 2  @ \"mul_used\", 0\n+/* [0x00000530] */ 0x40034031, 0xda0109e3, // nop                           ; mul24.ifn  r3, ra0.8b << 12, r1 << 12 @ \"mul_used\", 0\n+/* [0x00000538] */ 0x4c03c4f0, 0xdc0248a3, // add r2, r2, r3                ; mul24      r3, ra0.8c << 4,  r0 << 4  @ \"mul_used\", 0\n+/* [0x00000540] */ 0x4c032b71, 0xdc0329e3, // add.setf -, r5, r5            ; mul24.ifn  r3, ra0.8c << 14, r1 << 14 @ \"mul_used\", 0\n+/* [0x00000548] */ 0xffffff68, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00000550] */ 0x4c1ca4f7, 0x100248a0, // add r2, r2, r3                ; mul24 r0, ra7, rb10\n+/* [0x00000558] */ 0x550c6ffe, 0x1a024161, // mov ra5, rb6                  ; mul24 r1, rb6, ra3.8b\n+/* [0x00000560] */ 0x8f1c05f6, 0xd00241c6, // asr ra7, r2, v_bit_depth - 8  ; mov rb6, ra7\n+/* [0x00000568] */ 0x4c0c423e, 0x18024860, // add r1, r1, r0                ; mul24 r0, rb4, ra3.8a\n+/* [0x00000570] */ 0x4d1cb237, 0x10024860, // sub r1, r1, r0                ; mul24 r0, ra7, rb11\n+/* [0x00000578] */ 0x0d9e7200, 0x10020867, // sub r1, r1, r0\n+/* [0x00000580] */ 0x8f5c63f6, 0xdc024863, // asr r1, r1, 6                 ; mov r3, ra_blk_height\n+/* [0x00000588] */ 0x4d592bce, 0x120269e0, // sub.setf -, r5, rb_lcount     ; mul24 r0, r1, ra_wt_mul_l0\n+/* [0x00000590] */ 0x4c64c1ce, 0x14024821, // add r0, r0, rb_wt_off         ; mul24 r1, r1, ra_kmul_add\n+/* [0x00000598] */ 0xed427073, 0x12024860, // sub r1, r0, r1                ; v8subs r0, ra_height, r3\n+/* [0x000005a0] */ 0xffffff10, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x000005a8] */ 0x0f9cd3c0, 0xd0020867, // asr r1, r1, i_wt_den_p6\n+/* [0x000005b0] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax           ; mov -, vw_wait\n+/* [0x000005b8] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch\n+/* [0x000005c0] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0        ; mov vw_setup, ra_dma0\n+/* [0x000005c8] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link\n+/* [0x000005d0] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3                ; mov vw_setup, rb_dma1\n+/* [0x000005d8] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3                ; mov vw_addr, ra_dest\n+/* [0x000005e0] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23\n+/* [0x000005e8] */ 0xfffffec8, 0xf0f809e7, // brr -, r:1b\n+/* [0x000005f0] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0\n+/* [0x000005f8] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1\n+/* [0x00000600] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init\n+// ::mc_filter_c_b\n+/* [0x00000608] */ 0x9581cff6, 0x10025c42, // mov vw_setup, rb_vpm_init     ; mov ra2, unif\n+/* [0x00000610] */ 0x8c803ff6, 0x100269e3, // add.setf -, rb_ef, rb_ef      ; mov r3, unif\n+/* [0x00000618] */ 0xf1081dc9, 0xd4024825, // shl r0, ra2.16b, v_x_shift    ; v8subs r5rep, r1, r1\n+/* [0x00000620] */ 0x8c0821f6, 0x12225813, // add r0, r0, rb_elem_x         ; mov ra_y_next, ra2.16a\n+/* [0x00000628] */ 0x8d810bf6, 0x10025850, // sub r1, r5, rb_pitch          ; mov ra_width_height, unif\n+/* [0x00000630] */ 0x93567176, 0x14125815, // max r0, r0, r5                ; mov ra_xshift, ra_xshift_next\n+/* [0x00000638] */ 0x9281a1f6, 0x10025800, // min r0, r0, rb_max_x          ; mov ra0, unif\n+/* [0x00000640] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3\n+/* [0x00000648] */ 0x9481c1f6, 0xd0025802, // and r0, r0, -4                ; mov ra2, unif\n+/* [0x00000650] */ 0x54402077, 0xd4024862, // and r1, r0, r1                ; mul24 r2, ra_width, v_x_mul\n+/* [0x00000658] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00000660] */ 0x8c427076, 0x12024821, // add r0, r0, r1                ; mov r1, ra_height\n+/* [0x00000668] */ 0x8c9c163f, 0x10024680, // add ra_base_next, r3, r0      ; mov rb_xshift2, rb_xshift2_next\n+/* [0x00000670] */ 0x8d819eb6, 0x10025756, // sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif\n+/* [0x00000678] */ 0x8c5dc3ce, 0xdc025461, // add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height\n+/* [0x00000680] */ 0x8c59f3f6, 0xd4139496, // add rb_lcount, r1, (3-4)      ; mov.ifc ra_wt_mul_l0, ra_wt_off_l0\n+/* [0x00000688] */ 0x918073f6, 0xd0025803, // shl r0, r1, v_dma_h_shift     ; mov ra3, unif\n+/* [0x00000690] */ 0x8c8270b6, 0x10024823, // add r0, r0, r2                ; mov r3, unif\n+/* [0x00000698] */ 0x910d01f6, 0xd2125813, // shl r0, r0, v_dma_wh_shift    ; mov ra_y2_next, ra3.16a\n+/* [0x000006a0] */ 0x8c0db1f6, 0x140246e0, // add ra_dma0, r0, rb_dma0_base ; mov r0, ra3.16b\n+/* [0x000006a8] */ 0x918011f6, 0xd0025801, // shl r0, r0, v_x_shift         ; mov ra1, unif\n+/* [0x000006b0] */ 0x8c8021f6, 0x10025803, // add r0, r0, rb_elem_x         ; mov ra3, unif\n+/* [0x000006b8] */ 0x8d810bf6, 0x10025852, // sub r1, r5, rb_pitch          ; mov ra_wt_off_mul_l1, unif\n+/* [0x000006c0] */ 0x939de17f, 0x10025809, // max r0, r0, r5                ; mov ra9, rb_max_y\n+/* [0x000006c8] */ 0x9265a1f6, 0x14024822, // min r0, r0, rb_max_x          ; mov r2, ra_kmul_add\n+/* [0x000006d0] */ 0x119c31c0, 0xd0021067, // shl rb_xshift2_next, r0, 3\n+/* [0x000006d8] */ 0x9481c1f6, 0xd0039812, // and r0, r0, -4                ; mov.ifc ra_wt_off_mul_l1, unif\n+/* [0x000006e0] */ 0x949dc07f, 0xd0024865, // and r1, r0, r1                ; mov r5rep, -4\n+/* [0x000006e8] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x000006f0] */ 0x8c827076, 0x1002581c, // add r0, r0, r1                ; mov ra_dest, unif\n+/* [0x000006f8] */ 0x8c667636, 0x140254e0, // add rb_base2_next, r3, r0     ; mov r0, ra_fir_off_val\n+/* [0x00000700] */ 0x4c5a7c86, 0x121245a1, // add ra_wt_mul_l0, ra_wt_mul_l0, r2 ; mul24 r1, r0, ra_wt_mul_l0\n+/* [0x00000708] */ 0x4c4a7c86, 0x121244a0, // add ra_wt_mul_l1, ra_wt_mul_l1, r2 ; mul24 r0, r0, ra_wt_mul_l1\n+/* [0x00000710] */ 0x8c4a7076, 0x14024821, // add r0, r0, r1                ; mov r1, ra_wt_off_l1\n+/* [0x00000718] */ 0x910cd3f6, 0xde02484b, // shl r1, r1, i_wt_den_p6       ; mov rb11, ra3.8d\n+/* [0x00000720] */ 0x8d827236, 0x1002531e, // sub rb_wt_off, r1, r0         ; mov ra_link, unif\n+/* [0x00000728] */ 0x95080ff6, 0x1e024287, // mov ra10, rb_xshift2          ; mov rb7,  ra2.8d\n+// :1\n+/* [0x00000730] */ 0x0d9d1bc0, 0xa00229e7, // sub.setf -, r5, rb_i_tmu      ; nop                           ; ldtmu0\n+/* [0x00000738] */ 0x8e5539bf, 0x1202888f, // shr r2, r4, ra_xshift         ; mov.ifz rb_base2, rb_base2_next\n+/* [0x00000740] */ 0x8e4c85f6, 0xd0029851, // shr r1, r2, v_v_shift         ; mov.ifz ra_y_y2, ra_y_y2_next\n+/* [0x00000748] */ 0x8c683ff6, 0x1002b9d8, // add.setf -, rb_ef, rb_ef      ; mov.ifz ra_base, ra_base_next\n+/* [0x00000750] */ 0x8c441fb6, 0xd4224463, // add ra_y, 1, ra_y             ; mov r3, ra_y\n+/* [0x00000758] */ 0x93531789, 0xd80248e0, // max r3, r3, ra_k0             ; mov      r0, r1 << 15\n+/* [0x00000760] */ 0x9227f792, 0xd003c8e1, // min r3, r3, ra9               ; mov.ifnc r1, r2 << 1\n+/* [0x00000768] */ 0x559d049f, 0x100e4823, // mov.ifnc r0, r2               ; mul24 r3, r3, rb_pitch\n+/* [0x00000770] */ 0x8c618cc7, 0x10024e20, // add t0s, ra_base, r3          ; v8min r0, r0, rb_pmask\n+/* [0x00000778] */ 0x540183f0, 0x18024862, // and r1, r1, rb_pmask          ; mul24      r2, ra0.8a,       r0\n+/* [0x00000780] */ 0x4d01feb1, 0x1e0248a3, // sub r2, rb_fir_off_h, r2      ; mul24      r3, ra0.8d,       r1\n+/* [0x00000788] */ 0x4d03e4f0, 0xda0248a3, // sub r2, r2, r3                ; mul24      r3, ra0.8b << 2,  r0 << 2  @ \"mul_used\", 0\n+/* [0x00000790] */ 0x40034031, 0xda0109e3, // nop                           ; mul24.ifn  r3, ra0.8b << 12, r1 << 12 @ \"mul_used\", 0\n+/* [0x00000798] */ 0x4c03c4f0, 0xdc0248a3, // add r2, r2, r3                ; mul24      r3, ra0.8c << 4,  r0 << 4  @ \"mul_used\", 0\n+/* [0x000007a0] */ 0x40032031, 0xdc0109e3, // nop                           ; mul24.ifn  r3, ra0.8c << 14, r1 << 14 @ \"mul_used\", 0\n+/* [0x000007a8] */ 0x4c0854fe, 0xb8025804, // add r0, r2, r3                ; mul24 ra4, rb5, ra2.8a        ; ldtmu1\n+/* [0x000007b0] */ 0x8e2869bf, 0x10024885, // shr r2, r4, ra10              ; mov rb5, rb6\n+/* [0x000007b8] */ 0x8e4485f6, 0xd2024863, // shr r1, r2, v_v_shift         ; mov r3, ra_y2\n+/* [0x000007c0] */ 0x8e1c01f6, 0xd00241c6, // shr ra7, r0, v_bit_depth - 8  ; mov rb6, ra7\n+/* [0x000007c8] */ 0x8c531789, 0xda124460, // add ra_y2, r3, ra_k1          ; mov      r0, r1 << 15\n+/* [0x000007d0] */ 0x9353f792, 0xd803c8e1, // max r3, r3, ra_k0             ; mov.ifnc r1, r2 << 1\n+/* [0x000007d8] */ 0x925de7ce, 0x120248e1, // min r3, r3, rb_max_y          ; v8min r1, r1, ra_pmax\n+/* [0x000007e0] */ 0x559d049f, 0x100e4823, // mov.ifnc r0, r2               ; mul24 r3, r3, rb_pitch\n+/* [0x000007e8] */ 0x8c5cfec6, 0x12024f20, // add t1s, rb_base2, r3         ; v8min r0, r0, ra_pmax\n+/* [0x000007f0] */ 0x4c041bf0, 0xd8025962, // add r5rep, r5, 1              ; mul24      r2, ra1.8a,       r0\n+/* [0x000007f8] */ 0x4d05feb1, 0x1e0248a3, // sub r2, rb_fir_off_h, r2      ; mul24      r3, ra1.8d,       r1\n+/* [0x00000800] */ 0x4d07e4f0, 0xda0248a3, // sub r2, r2, r3                ; mul24      r3, ra1.8b << 2,  r0 << 2  @ \"mul_used\", 0\n+/* [0x00000808] */ 0x40074031, 0xda0109e3, // nop                           ; mul24.ifn  r3, ra1.8b << 12, r1 << 12 @ \"mul_used\", 0\n+/* [0x00000810] */ 0x4c07c6b0, 0xdc0248a3, // add r2, r3, r2                ; mul24      r3, ra1.8c << 4,  r0 << 4  @ \"mul_used\", 0\n+/* [0x00000818] */ 0x4c072b71, 0xdc0329e3, // add.setf -, r5, r5            ; mul24.ifn  r3, ra1.8c << 14, r1 << 14 @ \"mul_used\", 0\n+/* [0x00000820] */ 0xfffffef0, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00000828] */ 0x4c0c94fe, 0x180248a0, // add r2, r2, r3                ; mul24 r0, rb9,  ra3.8a\n+/* [0x00000830] */ 0x550caffe, 0x1a025261, // mov rb9, rb10                 ; mul24 r1, rb10, ra3.8b\n+/* [0x00000838] */ 0x8e2c05f6, 0xd00242ca, // shr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11\n+/* [0x00000840] */ 0x4d08523e, 0x1a0248a1, // sub r2, r1, r0                ; mul24 r1, rb5,  ra2.8b\n+/* [0x00000848] */ 0x8d112bf6, 0x100269e0, // sub.setf -, r5, rb_lcount     ; mov r0, ra4\n+/* [0x00000850] */ 0x4d08623e, 0x1c024860, // sub r1, r1, r0                ; mul24 r0, rb6,  ra2.8c\n+/* [0x00000858] */ 0x4c1c7237, 0x10024860, // add r1, r1, r0                ; mul24 r0, ra7,  rb7\n+/* [0x00000860] */ 0x4d0ca23e, 0x1c024860, // sub r1, r1, r0                ; mul24 r0, rb10, ra3.8c\n+/* [0x00000868] */ 0x4c2cb437, 0x100248a0, // add r2, r2, r0                ; mul24 r0, ra11, rb11\n+/* [0x00000870] */ 0x0d9e7400, 0x100208a7, // sub r2, r2, r0\n+/* [0x00000878] */ 0x0e9c63c0, 0xd0020867, // shr r1, r1, 6\n+/* [0x00000880] */ 0x4e5865ce, 0xd20248a0, // shr r2, r2, 6                 ; mul24 r0, r1, ra_wt_mul_l0\n+/* [0x00000888] */ 0x4c4a7456, 0x120248a1, // add r2, r2, r1                ; mul24 r1, r2, ra_wt_mul_l1\n+/* [0x00000890] */ 0x4c667216, 0x14024862, // add r1, r1, r0                ; mul24 r2, r2, ra_kmul_add\n+/* [0x00000898] */ 0x8d5e72b6, 0x1c024863, // sub r1, r1, r2                ; mov r3, ra_blk_height\n+/* [0x000008a0] */ 0xec40c3f3, 0x12024860, // add r1, r1, rb_wt_off         ; v8subs r0, ra_height, r3\n+/* [0x000008a8] */ 0xfffffe68, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x000008b0] */ 0x0f667380, 0x18020867, // asr r1, r1, ra_wt_den_p7\n+/* [0x000008b8] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax           ; mov -, vw_wait\n+/* [0x000008c0] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch\n+/* [0x000008c8] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0        ; mov vw_setup, ra_dma0\n+/* [0x000008d0] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link\n+/* [0x000008d8] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3                ; mov vw_setup, rb_dma1\n+/* [0x000008e0] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3                ; mov vw_addr, ra_dest\n+/* [0x000008e8] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23\n+/* [0x000008f0] */ 0xfffffe20, 0xf0f809e7, // brr -, r:1b\n+/* [0x000008f8] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0\n+/* [0x00000900] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1\n+/* [0x00000908] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init\n+// ::mc_sync_q0\n+/* [0x00000910] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00000918] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00000920] */ 0x00000010, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000928] */ 0x00000010, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000930] */ 0x00000010, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000938] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00000940] */ 0x0000001c, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000948] */ 0x00000001, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00000950] */ 0x0000000d, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync_q1\n+/* [0x00000958] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00000960] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00000968] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00000970] */ 0x00000000, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00000978] */ 0x00000011, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000980] */ 0x00000002, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync_q2\n+/* [0x00000988] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00000990] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00000998] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x000009a0] */ 0x00000000, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x000009a8] */ 0x00000012, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x000009b0] */ 0x00000003, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync_q3\n+/* [0x000009b8] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x000009c0] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x000009c8] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x000009d0] */ 0x00000000, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x000009d8] */ 0x00000013, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x000009e0] */ 0x009e7000, 0x100009e7, // nop\n+// ::mc_sync_q4\n+/* [0x000009e8] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x000009f0] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x000009f8] */ 0x00000014, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000a00] */ 0x00000014, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000a08] */ 0x00000014, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000a10] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00000a18] */ 0x0000001d, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000a20] */ 0x00000005, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00000a28] */ 0x0000000e, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync_q5\n+/* [0x00000a30] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00000a38] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00000a40] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00000a48] */ 0x00000004, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00000a50] */ 0x00000015, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000a58] */ 0x00000006, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync_q6\n+/* [0x00000a60] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00000a68] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00000a70] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00000a78] */ 0x00000004, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00000a80] */ 0x00000016, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000a88] */ 0x00000007, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync_q7\n+/* [0x00000a90] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00000a98] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00000aa0] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00000aa8] */ 0x00000004, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00000ab0] */ 0x00000017, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000ab8] */ 0x009e7000, 0x100009e7, // nop\n+// ::mc_sync_q8\n+/* [0x00000ac0] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00000ac8] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00000ad0] */ 0x00000018, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000ad8] */ 0x00000018, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000ae0] */ 0x00000018, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000ae8] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00000af0] */ 0x0000001e, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000af8] */ 0x00000009, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00000b00] */ 0x0000000c, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync_q9\n+/* [0x00000b08] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00000b10] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00000b18] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00000b20] */ 0x00000008, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00000b28] */ 0x00000019, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000b30] */ 0x0000000a, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync_q10\n+/* [0x00000b38] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00000b40] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00000b48] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00000b50] */ 0x00000008, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00000b58] */ 0x0000001a, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000b60] */ 0x0000000b, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync_q11\n+/* [0x00000b68] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00000b70] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00000b78] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00000b80] */ 0x00000008, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00000b88] */ 0x0000001b, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000b90] */ 0x009e7000, 0x100009e7, // nop\n+// ::mc_exit_c_qn\n+// ::mc_exit_y_qn\n+/* [0x00000b98] */ 0x00000002, 0xe00228e7, // mov.setf r3, PREREAD - 1\n+// :1\n+/* [0x00000ba0] */ 0xffffffe0, 0xf03809e7, // brr.anynz -, r:1b\n+/* [0x00000ba8] */ 0x009e7000, 0xa00009e7, // nop                   ; nop           ; ldtmu0\n+/* [0x00000bb0] */ 0x009e7000, 0xb00009e7, // nop                   ; nop           ; ldtmu1\n+/* [0x00000bb8] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1\n+/* [0x00000bc0] */ 0x159f2fc0, 0x100009e7, // mov  -, vw_wait\n+/* [0x00000bc8] */ 0x009e7000, 0x300009e7, // nop                   ; nop           ; thrend\n+/* [0x00000bd0] */ 0x009e7000, 0x100009e7, // nop\n+/* [0x00000bd8] */ 0x009e7000, 0x100009e7, // nop\n+// ::mc_exit_c_q0\n+// ::mc_exit_y_q0\n+/* [0x00000be0] */ 0x00000002, 0xe00228e7, // mov.setf r3, PREREAD - 1\n+// :1\n+/* [0x00000be8] */ 0xffffffe0, 0xf03809e7, // brr.anynz -, r:1b\n+/* [0x00000bf0] */ 0x009e7000, 0xa00009e7, // nop                   ; nop           ; ldtmu0\n+/* [0x00000bf8] */ 0x009e7000, 0xb00009e7, // nop                   ; nop           ; ldtmu1\n+/* [0x00000c00] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1\n+/* [0x00000c08] */ 0x159f2fc0, 0x100009e7, // mov  -, vw_wait\n+/* [0x00000c10] */ 0x0000001c, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00000c18] */ 0x009e7000, 0x300009e7, // nop                   ; nop           ; thrend\n+/* [0x00000c20] */ 0x00000001, 0xe00209a7, // mov interrupt, 1\n+/* [0x00000c28] */ 0x009e7000, 0x100009e7, // nop\n+// ::mc_setup_y_q0\n+/* [0x00000c30] */ 0x0000000c, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_setup_y_qn\n+/* [0x00000c38] */ 0x95801ff6, 0xd0025900, // mov tmurs, 1                  ; mov ra0, unif\n+/* [0x00000c40] */ 0x15827d80, 0x10020267, // mov ra9, unif\n+/* [0x00000c48] */ 0x15827d80, 0x10020067, // mov ra1, unif\n+/* [0x00000c50] */ 0xaaaaff00, 0xe6020827, // mov r0, [0,2,0,2,0,2,0,2,1,3,1,3,1,3,1,3]\n+/* [0x00000c58] */ 0x9181e1f6, 0xd00250cb, // shl rb_ef, r0, i_shift30      ; mov ra11, unif\n+/* [0x00000c60] */ 0xff800100, 0xe0020527, // mov ra_kff800100, 0xff800100\n+/* [0x00000c68] */ 0x000000ff, 0xe0021627, // mov rb_pmask, v_pmask\n+/* [0x00000c70] */ 0x001000ff, 0xe00205e7, // mov ra_blk_height_pmax, ((1 << v_bit_depth) - 1) | (v_blk_height << 16)\n+/* [0x00000c78] */ 0x00004000, 0xe00217e7, // mov rb_fir_off_h, (FIR_OFFSET << (v_bit_depth - 8))\n+/* [0x00000c80] */ 0x4000000e, 0xe0020667, // mov ra_fir_off_val_wt_den_p7, (FIR_OFFSET << 16) | (DENOM + 15 - v_bit_depth)\n+/* [0x00000c88] */ 0x050b0a00, 0xe0021567, // mov rb_y_coeffs_2, 0x050b0a00\n+/* [0x00000c90] */ 0x11283a40, 0xe00215a7, // mov rb_y_coeffs_3, 0x11283a40\n+/* [0x00000c98] */ 0x0a0b0500, 0xe00215e7, // mov rb_y_coeffs_5, 0x0a0b0500\n+/* [0x00000ca0] */ 0x15827d80, 0x100200e7, // mov ra3, unif\n+/* [0x00000ca8] */ 0x95803ff6, 0x10024754, // mov ra_ef, rb_ef              ; mov rb_xpitch, unif\n+/* [0x00000cb0] */ 0x0d0c1dc0, 0xd40216a7, // sub rb_max_x, ra3.16b, 1\n+/* [0x00000cb8] */ 0x0d0c1dc0, 0xd20217a7, // sub rb_max_y, ra3.16a, 1\n+/* [0x00000cc0] */ 0x959a0dbf, 0x100248d0, // mov r3, elem_num              ; mov rb_pitch, unif\n+/* [0x00000cc8] */ 0xc0000000, 0xe0020867, // mov r1, vdw_setup_1(0)\n+/* [0x00000cd0] */ 0x159d03c0, 0x10021667, // or  rb_dma1_base, r1, rb_pitch\n+/* [0x00000cd8] */ 0x0c027cc0, 0x14020827, // add r0, ra0.16b, r3\n+/* [0x00000ce0] */ 0x139c01c0, 0xd0020827, // max r0, r0, 0\n+/* [0x00000ce8] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x\n+/* [0x00000cf0] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3\n+/* [0x00000cf8] */ 0xf49dc1d2, 0xd0024822, // and r0, r0, -4                ; v8subs r2, r2, r2\n+/* [0x00000d00] */ 0x0d9d05c0, 0x100208a7, // sub r2, r2, rb_pitch\n+/* [0x00000d08] */ 0x149e7080, 0x10020867, // and r1, r0, r2\n+/* [0x00000d10] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00000d18] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1\n+/* [0x00000d20] */ 0x0c267c00, 0x10020627, // add ra_base, ra9, r0\n+/* [0x00000d28] */ 0x0c067cc0, 0x14020827, // add r0, ra1.16b, r3\n+/* [0x00000d30] */ 0x139c01c0, 0xd0020827, // max r0, r0, 0\n+/* [0x00000d38] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x\n+/* [0x00000d40] */ 0x119c31c0, 0xd0021067, // shl rb_xshift2_next, r0, 3\n+/* [0x00000d48] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4\n+/* [0x00000d50] */ 0x149e7080, 0x10020867, // and r1, r0, r2\n+/* [0x00000d58] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00000d60] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1\n+/* [0x00000d68] */ 0x0c2e7c00, 0x100213e7, // add rb_base2, ra11, r0\n+/* [0x00000d70] */ 0x80027036, 0x120049e0, // nop                           ; mov r0, ra0.16a\n+/* [0x00000d78] */ 0x95043ff6, 0xd20248e2, // mov r3, PREREAD               ; mov r2, ra1.16a\n+// :1\n+/* [0x00000d80] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1\n+/* [0x00000d88] */ 0x139c01c0, 0xd0020867, // max r1, r0, 0\n+/* [0x00000d90] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y\n+/* [0x00000d98] */ 0x4c51018f, 0x1a024821, // add r0, r0, ra_k1             ; mul24 r1, r1, rb_pitch\n+/* [0x00000da0] */ 0x8c627c40, 0x10225e11, // add t0s, ra_base, r1          ; mov ra_y, r0\n+/* [0x00000da8] */ 0x139c05c0, 0xd0020867, // max r1, r2, 0\n+/* [0x00000db0] */ 0xffffffb0, 0xf03809e7, // brr.anynz -, r:1b\n+/* [0x00000db8] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y\n+/* [0x00000dc0] */ 0x4c51058f, 0x1a0248a1, // add r2, r2, ra_k1             ; mul24 r1, r1, rb_pitch\n+/* [0x00000dc8] */ 0x8c9cfe52, 0x10125f11, // add t1s, rb_base2, r1         ; mov ra_y2, r2\n+/* [0x00000dd0] */ 0x159e6fc0, 0x100208a7, // mov r2, qpu_num\n+/* [0x00000dd8] */ 0x0f9c25c0, 0xd0020867, // asr r1, r2, 2\n+/* [0x00000de0] */ 0x119c63c0, 0xd0020867, // shl r1, r1, 6\n+/* [0x00000de8] */ 0x149c35c0, 0xd0020827, // and r0, r2, 3\n+/* [0x00000df0] */ 0x159e7040, 0x10020827, // or  r0, r0, r1\n+/* [0x00000df8] */ 0x00004800, 0xe0020867, // mov r1, vpm_setup(0, 4, h8p(0, 0))\n+/* [0x00000e00] */ 0x0c9e7040, 0x10021727, // add r_vpm, r0, r1\n+/* [0x00000e08] */ 0x80004004, 0xe0020867, // mov r1, vdw_setup_0(0, 0, dma_h8p(0,0,0))\n+/* [0x00000e10] */ 0x119c51c0, 0xd0020827, // shl r0, r0, 5\n+/* [0x00000e18] */ 0x0c9e7040, 0x100216e7, // add r_dma, r0, r1\n+/* [0x00000e20] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00000e28] */ 0x00000000, 0xe0024208, // mov ra8,  0                   ; mov rb8,  0\n+/* [0x00000e30] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00000e38] */ 0x00000000, 0xe0024249, // mov ra9,  0                   ; mov rb9,  0\n+/* [0x00000e40] */ 0x00000000, 0xe002428a, // mov ra10, 0                   ; mov rb10, 0\n+/* [0x00000e48] */ 0x00000000, 0xe00242cb, // mov ra11, 0                   ; mov rb11, 0\n+// :per_block_setup_8\n+/* [0x00000e50] */ 0x93567176, 0x14125815, // max r0, r0, r5                ; mov ra_xshift, ra_xshift_next\n+/* [0x00000e58] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x\n+/* [0x00000e60] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3\n+/* [0x00000e68] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4\n+/* [0x00000e70] */ 0x8d810bf6, 0x1002589a, // sub r2, r5, rb_pitch          ; mov ra_base_next, unif\n+/* [0x00000e78] */ 0x940270b6, 0x12225853, // and r1, r0, r2                ; mov ra_y_next, ra0.16a\n+/* [0x00000e80] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00000e88] */ 0x8c827076, 0x10025801, // add r0, r0, r1                ; mov ra1, unif\n+/* [0x00000e90] */ 0x0c6a7c00, 0x100206a7, // add ra_base_next, ra_base_next, r0\n+/* [0x00000e98] */ 0x0c067cc0, 0x14020827, // add r0, ra1.16b, r3\n+/* [0x00000ea0] */ 0x93067176, 0x12125813, // max r0, r0, r5                ; mov ra_y2_next, ra1.16a\n+/* [0x00000ea8] */ 0x9281a1f6, 0x10024813, // min r0, r0, rb_max_x          ; mov rb_base2_next, unif\n+/* [0x00000eb0] */ 0x119c31c0, 0xd0021067, // shl rb_xshift2_next, r0, 3\n+/* [0x00000eb8] */ 0x9481c1f6, 0xd0025810, // and r0, r0, -4                ; mov ra_width_height, unif\n+/* [0x00000ec0] */ 0x949dc0bf, 0x10024871, // and r1, r0, r2                ; mov vw_setup, rb_vpm_init\n+/* [0x00000ec8] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00000ed0] */ 0x4c401077, 0xd4024821, // add r0, r0, r1                ; mul24 r1, ra_width, v_x_mul\n+/* [0x00000ed8] */ 0x0c9d3e00, 0x100214e7, // add rb_base2_next, rb_base2_next, r0\n+/* [0x00000ee0] */ 0x8d419e76, 0x12025760, // sub rb_dma1, rb_dma1_base, r1 ; mov r0, ra_height\n+/* [0x00000ee8] */ 0x8c5dc1c6, 0xdc025460, // add rb_i_tmu, r0, (7-8) - PREREAD ; v8min r0, r0, ra_blk_height\n+/* [0x00000ef0] */ 0x0c9df1c0, 0xd00214a7, // add rb_lcount, r0, (7-8)\n+/* [0x00000ef8] */ 0x916471f6, 0xd4024823, // shl r0, r0, v_dma_h_shift     ; mov r3, ra_kmul_add\n+/* [0x00000f00] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1\n+/* [0x00000f08] */ 0x916501f6, 0xd4024822, // shl r0, r0, v_dma_wh_shift    ; mov r2, ra_fir_off_val\n+/* [0x00000f10] */ 0x8c81b1f6, 0x100246e0, // add ra_dma0, r0, rb_dma0_base ; mov r0, unif\n+/* [0x00000f18] */ 0x918101f6, 0xd00a5816, // shl.ifnn r0, r0, i_shift16    ; mov ra_wt_off_mul_l0, unif\n+/* [0x00000f20] */ 0x915031f6, 0xde024205, // shl ra8, r0, 3                ; mov rb5, ra_k255\n+/* [0x00000f28] */ 0x01040400, 0xe0020867, // mov r1, 0x01040400\n+/* [0x00000f30] */ 0x10227380, 0x1e5200a7, // ror ra2.8b, r1, ra8.8d\n+/* [0x00000f38] */ 0x10227380, 0x1c520027, // ror ra0.8b, r1, ra8.8c\n+/* [0x00000f40] */ 0x10215f80, 0x1e6200a7, // ror ra2.8c, rb_y_coeffs_2, ra8.8d\n+/* [0x00000f48] */ 0x10215f80, 0x1c620027, // ror ra0.8c, rb_y_coeffs_2, ra8.8c\n+/* [0x00000f50] */ 0x00010100, 0xe0020867, // mov r1,0x00010100\n+/* [0x00000f58] */ 0x902203bf, 0x1e025812, // ror r0, r1, ra8.8d            ; mov ra_wt_off_mul_l1, unif\n+/* [0x00000f60] */ 0x90205387, 0x1c424004, // ror ra0.8a, r1, ra8.8c        ; v8min rb4, r0, rb5\n+/* [0x00000f68] */ 0x914883f6, 0xd0031856, // shl r1, r1, 8                 ; mov.ifn ra_wt_off_mul_l0, ra_wt_off_mul_l1\n+/* [0x00000f70] */ 0x902203bf, 0x1e02581c, // ror r0, r1, ra8.8d            ; mov ra_dest, unif\n+/* [0x00000f78] */ 0x90205387, 0x1c72404b, // ror ra1.8d, r1, ra8.8c        ; v8min rb11, r0, rb5\n+/* [0x00000f80] */ 0x10216f80, 0x1e7200a7, // ror ra2.8d, rb_y_coeffs_3, ra8.8d\n+/* [0x00000f88] */ 0x10216f80, 0x1c720027, // ror ra0.8d, rb_y_coeffs_3, ra8.8c\n+/* [0x00000f90] */ 0x10217f80, 0x1e5200e7, // ror ra3.8b, rb_y_coeffs_5, ra8.8d\n+/* [0x00000f98] */ 0x10217f80, 0x1c520067, // ror ra1.8b, rb_y_coeffs_5, ra8.8c\n+/* [0x00000fa0] */ 0x04040100, 0xe0020867, // mov r1,0x04040100\n+/* [0x00000fa8] */ 0x10227380, 0x1e6200e7, // ror ra3.8c, r1, ra8.8d\n+/* [0x00000fb0] */ 0x902183bf, 0xdc624065, // ror ra1.8c, r1, ra8.8c        ; mov r5rep, -8\n+/* [0x00000fb8] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00000fc0] */ 0x3a281100, 0xe0020867, // mov r1,0x3a281100\n+/* [0x00000fc8] */ 0x902203bf, 0x1e02581e, // ror r0, r1, ra8.8d            ; mov ra_link, unif\n+/* [0x00000fd0] */ 0x90205387, 0x1c424048, // ror ra1.8a, r1, ra8.8c        ; v8min rb8, r0, rb5\n+// ::mc_filter_y_pxx\n+/* [0x00000fd8] */ 0xfffffe58, 0xf0f807a7, // brr ra_link, r:per_block_setup_8\n+/* [0x00000fe0] */ 0x959a0ff6, 0x10024023, // mov ra0, unif                 ; mov r3, elem_num\n+/* [0x00000fe8] */ 0xec9c3fd2, 0x100269e5, // add.setf -, rb_ef, rb_ef      ; v8subs r5rep, r2, r2\n+/* [0x00000ff0] */ 0x8c001cff, 0x14024800, // add r0, ra0.16b, r3           ; mov rb_xshift2, rb_xshift2_next\n+/* [0x00000ff8] */ 0x1158cdc0, 0xd4020867, // shl r1, ra_wt_off_l0, i_wt_den_p5\n+/* [0x00001000] */ 0x4c5a7cd6, 0x121245a0, // add ra_wt_mul_l0, ra_wt_mul_l0, r3 ; mul24 r0, r2, ra_wt_mul_l0\n+/* [0x00001008] */ 0x8d9c423f, 0x1042531d, // sub rb_wt_off, r1, r0         ; mov ra_ef.8a, rb4\n+// :1\n+/* [0x00001010] */ 0x4c745dbe, 0x100279c4, // add.setf -, ra_ef, ra_ef      ; mul24 ra4, rb5, ra_ef\n+/* [0x00001018] */ 0x93440dff, 0xd40248a1, // max r2, ra_y, 0               ; mov r1, 0\n+/* [0x00001020] */ 0x9251e5f6, 0x1a0248a3, // min r2, r2, rb_max_y          ; mov r3, ra_k1\n+/* [0x00001028] */ 0x4c450cd7, 0xa4224462, // add ra_y, ra_y, r3            ; mul24 r2, r2, rb_pitch        ; ldtmu0\n+/* [0x00001030] */ 0x8c606cbf, 0x10024e05, // add t0s, ra_base, r2          ; mov rb5,  rb6\n+/* [0x00001038] */ 0x8e5479bf, 0x12024806, // shr r0, r4, ra_xshift         ; mov rb6,  rb7\n+/* [0x00001040] */ 0x93458c47, 0xb20248a0, // max r2, ra_y2, r1             ; v8min r0, r0, rb_pmask        ; ldtmu1\n+/* [0x00001048] */ 0x8e2009f6, 0x10024847, // shr r1, r4, rb_xshift2        ; mov rb7, ra8\n+/* [0x00001050] */ 0x925de5ce, 0x120248a1, // min r2, r2, rb_max_y          ; v8min r1, r1, ra_pmax\n+/* [0x00001058] */ 0x4c450cd7, 0x12124462, // add ra_y2, ra_y2, r3          ; mul24 r2, r2, rb_pitch\n+/* [0x00001060] */ 0x8c24feb6, 0x10025f08, // add t1s, rb_base2, r2         ; mov ra8,  ra9\n+/* [0x00001068] */ 0x4c038af1, 0xd8025962, // add r5rep, r5, r3     ; mul24      r2, ra0.8a << 8,  r1 << 8  @ \"mul_used\", 0\n+/* [0x00001070] */ 0x5501fff0, 0x180348e2, // mov r3, rb_fir_off_h  ; mul24.ifnn r2, ra0.8a,       r0\n+/* [0x00001078] */ 0x4d03f6b0, 0xda0248a3, // sub r2, r3, r2        ; mul24      r3, ra0.8b << 1,  r0 << 1  @ \"mul_used\", 0\n+/* [0x00001080] */ 0x40037031, 0xda0109e3, // nop                   ; mul24.ifn  r3, ra0.8b << 9,  r1 << 9  @ \"mul_used\", 0\n+/* [0x00001088] */ 0x4c03e4f0, 0xdc0248a3, // add r2, r2, r3        ; mul24      r3, ra0.8c << 2,  r0 << 2  @ \"mul_used\", 0\n+/* [0x00001090] */ 0x40036031, 0xdc0109e3, // nop                   ; mul24.ifn  r3, ra0.8c << 10, r1 << 10 @ \"mul_used\", 0\n+/* [0x00001098] */ 0x4d03d4f0, 0xde0248a3, // sub r2, r2, r3        ; mul24      r3, ra0.8d << 3,  r0 << 3  @ \"mul_used\", 0\n+/* [0x000010a0] */ 0x40035031, 0xde0109e3, // nop                   ; mul24.ifn  r3, ra0.8d << 11, r1 << 11 @ \"mul_used\", 0\n+/* [0x000010a8] */ 0x4c07c4f0, 0xd80248a3, // add r2, r2, r3        ; mul24      r3, ra1.8a << 4,  r0 << 4  @ \"mul_used\", 0\n+/* [0x000010b0] */ 0x40074031, 0xd80109e3, // nop                   ; mul24.ifn  r3, ra1.8a << 12, r1 << 12 @ \"mul_used\", 0\n+/* [0x000010b8] */ 0x4c07b4f0, 0xda0248a3, // add r2, r2, r3        ; mul24      r3, ra1.8b << 5,  r0 << 5  @ \"mul_used\", 0\n+/* [0x000010c0] */ 0x40073031, 0xda0109e3, // nop                   ; mul24.ifn  r3, ra1.8b << 13, r1 << 13 @ \"mul_used\", 0\n+/* [0x000010c8] */ 0x4d07a4f0, 0xdc0248a3, // sub r2, r2, r3        ; mul24      r3, ra1.8c << 6,  r0 << 6  @ \"mul_used\", 0\n+/* [0x000010d0] */ 0x40072031, 0xdc0109e3, // nop                   ; mul24.ifn  r3, ra1.8c << 14, r1 << 14 @ \"mul_used\", 0\n+/* [0x000010d8] */ 0x4c0794f0, 0xde0248a3, // add r2, r2, r3        ; mul24      r3, ra1.8d << 7,  r0 << 7  @ \"mul_used\", 0\n+/* [0x000010e0] */ 0x4c071b71, 0xde0329e3, // add.setf -, r5, r5    ; mul24.ifn  r3, ra1.8d << 15, r1 << 15 @ \"mul_used\", 0\n+/* [0x000010e8] */ 0xffffff08, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x000010f0] */ 0x4d0854fe, 0x1a0248a1, // sub r2, r2, r3                ; mul24 r1, rb5,  ra2.8b\n+/* [0x000010f8] */ 0x550caffe, 0x1a024260, // mov ra9,  rb10                ; mul24 r0, rb10, ra3.8b\n+/* [0x00001100] */ 0x8f2c05f6, 0xd00242ca, // asr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11\n+/* [0x00001108] */ 0x4d08623e, 0x1c024860, // sub r1, r1, r0                ; mul24 r0, rb6,  ra2.8c\n+/* [0x00001110] */ 0x4d08723e, 0x1e024860, // sub r1, r1, r0                ; mul24 r0, rb7,  ra2.8d\n+/* [0x00001118] */ 0x4c208237, 0x10024860, // add r1, r1, r0                ; mul24 r0, ra8,  rb8\n+/* [0x00001120] */ 0x4c0ca23e, 0x1c024860, // add r1, r1, r0                ; mul24 r0, rb10, ra3.8c\n+/* [0x00001128] */ 0x4c2cb237, 0x10024860, // add r1, r1, r0                ; mul24 r0, ra11, rb11\n+/* [0x00001130] */ 0x8d5d1bf6, 0x1c0269e3, // sub.setf -, r5, rb_i_tmu      ; mov r3, ra_blk_height\n+/* [0x00001138] */ 0x8d1133bf, 0x1002884f, // sub r1, r1, ra4               ; mov.ifz rb_base2, rb_base2_next\n+/* [0x00001140] */ 0x8d6a7236, 0x10029858, // sub r1, r1, r0                ; mov.ifz ra_base, ra_base_next\n+/* [0x00001148] */ 0x8f4c63f6, 0xd0029851, // asr r1, r1, 6                 ; mov.ifz ra_y_y2, ra_y_y2_next\n+/* [0x00001150] */ 0x4d592bce, 0x120269e0, // sub.setf -, r5, rb_lcount     ; mul24 r0, r1, ra_wt_mul_l0\n+/* [0x00001158] */ 0x4c64c1ce, 0x14024821, // add r0, r0, rb_wt_off         ; mul24 r1, r1, ra_kmul_add\n+/* [0x00001160] */ 0xed427073, 0x12024860, // sub r1, r0, r1                ; v8subs r0, ra_height, r3\n+/* [0x00001168] */ 0xfffffe88, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00001170] */ 0x0f9cd3c0, 0xd0020867, // asr r1, r1, i_wt_den_p6\n+/* [0x00001178] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax           ; mov -, vw_wait\n+/* [0x00001180] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch\n+/* [0x00001188] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0        ; mov vw_setup, ra_dma0\n+/* [0x00001190] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link\n+/* [0x00001198] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3                ; mov vw_setup, rb_dma1\n+/* [0x000011a0] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3                ; mov vw_addr, ra_dest\n+/* [0x000011a8] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23\n+/* [0x000011b0] */ 0xfffffe40, 0xf0f809e7, // brr -, r:1b\n+/* [0x000011b8] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0\n+/* [0x000011c0] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1\n+/* [0x000011c8] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init\n+// ::mc_filter_y_bxx\n+/* [0x000011d0] */ 0xfffffc60, 0xf0f807a7, // brr ra_link, r:per_block_setup_8\n+/* [0x000011d8] */ 0x959a0ff6, 0x10024023, // mov ra0, unif                 ; mov r3, elem_num\n+/* [0x000011e0] */ 0xec9c3fd2, 0x100269e5, // add.setf -, rb_ef, rb_ef      ; v8subs r5rep, r2, r2\n+/* [0x000011e8] */ 0x8c001cff, 0x14024800, // add r0, ra0.16b, r3           ; mov rb_xshift2, rb_xshift2_next\n+/* [0x000011f0] */ 0x1158ddc0, 0xd4020867, // shl r1, ra_wt_off_l0, i_wt_den_p6\n+/* [0x000011f8] */ 0x4c5a7cd6, 0x121245a0, // add ra_wt_mul_l0, ra_wt_mul_l0, r3 ; mul24 r0, r2, ra_wt_mul_l0\n+/* [0x00001200] */ 0x4d4a7216, 0x12024860, // sub r1, r1, r0                ; mul24 r0, r2, ra_wt_mul_l1\n+/* [0x00001208] */ 0x8d9c423f, 0x1042531d, // sub rb_wt_off, r1, r0         ; mov ra_ef.8a, rb4\n+// :1\n+/* [0x00001210] */ 0x4c745dbe, 0x100279c4, // add.setf -, ra_ef, ra_ef      ; mul24 ra4, rb5, ra_ef\n+/* [0x00001218] */ 0x93440dff, 0xd40248a1, // max r2, ra_y, 0               ; mov r1, 0\n+/* [0x00001220] */ 0x9251e5f6, 0x1a0248a3, // min r2, r2, rb_max_y          ; mov r3, ra_k1\n+/* [0x00001228] */ 0x4c450cd7, 0xa4224462, // add ra_y, ra_y, r3            ; mul24 r2, r2, rb_pitch        ; ldtmu0\n+/* [0x00001230] */ 0x8c606cbf, 0x10024e05, // add t0s, ra_base, r2          ; mov rb5,  rb6\n+/* [0x00001238] */ 0x8e5479bf, 0x12024806, // shr r0, r4, ra_xshift         ; mov rb6,  rb7\n+/* [0x00001240] */ 0x93458c47, 0xb20248a0, // max r2, ra_y2, r1             ; v8min r0, r0, rb_pmask        ; ldtmu1\n+/* [0x00001248] */ 0x8e2009f6, 0x10024847, // shr r1, r4, rb_xshift2        ; mov rb7, ra8\n+/* [0x00001250] */ 0x925de5ce, 0x120248a1, // min r2, r2, rb_max_y          ; v8min r1, r1, ra_pmax\n+/* [0x00001258] */ 0x4c450cd7, 0x12124462, // add ra_y2, ra_y2, r3          ; mul24 r2, r2, rb_pitch\n+/* [0x00001260] */ 0x8c24feb6, 0x10025f08, // add t1s, rb_base2, r2         ; mov ra8,  ra9\n+/* [0x00001268] */ 0x4c038af1, 0xd8025962, // add r5rep, r5, r3     ; mul24      r2, ra0.8a << 8,  r1 << 8  @ \"mul_used\", 0\n+/* [0x00001270] */ 0x5501fff0, 0x180348e2, // mov r3, rb_fir_off_h  ; mul24.ifnn r2, ra0.8a,       r0\n+/* [0x00001278] */ 0x4d03f6b0, 0xda0248a3, // sub r2, r3, r2        ; mul24      r3, ra0.8b << 1,  r0 << 1  @ \"mul_used\", 0\n+/* [0x00001280] */ 0x40037031, 0xda0109e3, // nop                   ; mul24.ifn  r3, ra0.8b << 9,  r1 << 9  @ \"mul_used\", 0\n+/* [0x00001288] */ 0x4c03e4f0, 0xdc0248a3, // add r2, r2, r3        ; mul24      r3, ra0.8c << 2,  r0 << 2  @ \"mul_used\", 0\n+/* [0x00001290] */ 0x40036031, 0xdc0109e3, // nop                   ; mul24.ifn  r3, ra0.8c << 10, r1 << 10 @ \"mul_used\", 0\n+/* [0x00001298] */ 0x4d03d4f0, 0xde0248a3, // sub r2, r2, r3        ; mul24      r3, ra0.8d << 3,  r0 << 3  @ \"mul_used\", 0\n+/* [0x000012a0] */ 0x40035031, 0xde0109e3, // nop                   ; mul24.ifn  r3, ra0.8d << 11, r1 << 11 @ \"mul_used\", 0\n+/* [0x000012a8] */ 0x4c07c4f0, 0xd80248a3, // add r2, r2, r3        ; mul24      r3, ra1.8a << 4,  r0 << 4  @ \"mul_used\", 0\n+/* [0x000012b0] */ 0x40074031, 0xd80109e3, // nop                   ; mul24.ifn  r3, ra1.8a << 12, r1 << 12 @ \"mul_used\", 0\n+/* [0x000012b8] */ 0x4c07b4f0, 0xda0248a3, // add r2, r2, r3        ; mul24      r3, ra1.8b << 5,  r0 << 5  @ \"mul_used\", 0\n+/* [0x000012c0] */ 0x40073031, 0xda0109e3, // nop                   ; mul24.ifn  r3, ra1.8b << 13, r1 << 13 @ \"mul_used\", 0\n+/* [0x000012c8] */ 0x4d07a4f0, 0xdc0248a3, // sub r2, r2, r3        ; mul24      r3, ra1.8c << 6,  r0 << 6  @ \"mul_used\", 0\n+/* [0x000012d0] */ 0x40072031, 0xdc0109e3, // nop                   ; mul24.ifn  r3, ra1.8c << 14, r1 << 14 @ \"mul_used\", 0\n+/* [0x000012d8] */ 0x4c0794f0, 0xde0248a3, // add r2, r2, r3        ; mul24      r3, ra1.8d << 7,  r0 << 7  @ \"mul_used\", 0\n+/* [0x000012e0] */ 0x4c071b71, 0xde0329e3, // add.setf -, r5, r5    ; mul24.ifn  r3, ra1.8d << 15, r1 << 15 @ \"mul_used\", 0\n+/* [0x000012e8] */ 0xffffff08, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x000012f0] */ 0x4d0854fe, 0x1a0248a1, // sub r2, r2, r3                ; mul24 r1, rb5,  ra2.8b\n+/* [0x000012f8] */ 0x550caffe, 0x1a024260, // mov ra9,  rb10                ; mul24 r0, rb10, ra3.8b\n+/* [0x00001300] */ 0x8f2c05f6, 0xd00242ca, // asr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11\n+/* [0x00001308] */ 0x4d08623e, 0x1c024860, // sub r1, r1, r0                ; mul24 r0, rb6,  ra2.8c\n+/* [0x00001310] */ 0x4d08723e, 0x1e024860, // sub r1, r1, r0                ; mul24 r0, rb7,  ra2.8d\n+/* [0x00001318] */ 0x4c208237, 0x10024860, // add r1, r1, r0                ; mul24 r0, ra8,  rb8\n+/* [0x00001320] */ 0x4c0ca23e, 0x1c024860, // add r1, r1, r0                ; mul24 r0, rb10, ra3.8c\n+/* [0x00001328] */ 0x4c2cb237, 0x10024860, // add r1, r1, r0                ; mul24 r0, ra11, rb11\n+/* [0x00001330] */ 0x0d127380, 0x10020867, // sub r1, r1, ra4\n+/* [0x00001338] */ 0x8d9cc23f, 0x10024862, // sub r1, r1, r0                ; mov r2, rb_wt_off\n+/* [0x00001340] */ 0x0f9c63c0, 0xd0020867, // asr r1, r1, 6\n+/* [0x00001348] */ 0x4d591bce, 0x120269e0, // sub.setf -, r5, rb_i_tmu      ; mul24 r0, r1, ra_wt_mul_l0\n+/* [0x00001350] */ 0x55653fce, 0x140453e1, // mov.ifz rb_base2, rb_base2_next ; mul24 r1, r1, ra_kmul_add\n+/* [0x00001358] */ 0x8d4e7076, 0x10029851, // sub r1, r0, r1                ; mov.ifz ra_y_y2, ra_y_y2_next\n+/* [0x00001360] */ 0x8d692bf6, 0x1002b9d8, // sub.setf -, r5, rb_lcount     ; mov.ifz ra_base, ra_base_next\n+/* [0x00001368] */ 0x8c9f8289, 0xd0024860, // add r1, r1, r2                ; mov r0, r1 << 8\n+/* [0x00001370] */ 0x8c5e7236, 0x1c024863, // add r1, r1, r0                ; mov r3, ra_blk_height\n+/* [0x00001378] */ 0xfffffe78, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00001380] */ 0x4f65039f, 0x18024862, // asr r1, r1, ra_wt_den_p7      ; mul24 r2, r3, rb_pitch\n+/* [0x00001388] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax           ; mov -, vw_wait\n+/* [0x00001390] */ 0xf34003f3, 0xd2024c20, // max vpm, r1, 0                ; v8subs r0, ra_height, r3\n+/* [0x00001398] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0        ; mov vw_setup, ra_dma0\n+/* [0x000013a0] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link\n+/* [0x000013a8] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3                ; mov vw_setup, rb_dma1\n+/* [0x000013b0] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3                ; mov vw_addr, ra_dest\n+/* [0x000013b8] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23\n+/* [0x000013c0] */ 0xfffffe30, 0xf0f809e7, // brr -, r:1b\n+/* [0x000013c8] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0\n+/* [0x000013d0] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1\n+/* [0x000013d8] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init\n+// ::mc_filter_y_p00\n+/* [0x000013e0] */ 0x959a0ff6, 0x10024020, // mov ra0, unif                 ; mov r0, elem_num\n+/* [0x000013e8] */ 0xf5567dad, 0x14124565, // mov ra_xshift, ra_xshift_next ; v8subs r5rep, r5, r5\n+/* [0x000013f0] */ 0x8c020c3f, 0x1402581a, // add r0, ra0.16b, r0           ; mov ra_base_next, unif\n+/* [0x000013f8] */ 0x93027176, 0x12225813, // max r0, r0, r5                ; mov ra_y_next, ra0.16a\n+/* [0x00001400] */ 0x9281a1f6, 0x10025810, // min r0, r0, rb_max_x          ; mov ra_width_height, unif\n+/* [0x00001408] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3\n+/* [0x00001410] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4\n+/* [0x00001418] */ 0x8d810bf6, 0x10025896, // sub r2, r5, rb_pitch          ; mov ra_wt_off_mul_l0, unif\n+/* [0x00001420] */ 0x149e7080, 0x10020867, // and r1, r0, r2\n+/* [0x00001428] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00001430] */ 0x8c827076, 0x1002581c, // add r0, r0, r1                ; mov ra_dest, unif\n+/* [0x00001438] */ 0x8c69cc3f, 0x100246b1, // add ra_base_next, ra_base_next, r0 ; mov vw_setup, rb_vpm_init\n+/* [0x00001440] */ 0x11400dc0, 0xd4020867, // shl r1, ra_width, v_x_shift\n+/* [0x00001448] */ 0x8d419e76, 0x12025760, // sub rb_dma1, rb_dma1_base, r1 ; mov r0, ra_height\n+/* [0x00001450] */ 0x8d5c31c6, 0xdc025460, // sub rb_i_tmu, r0, PREREAD     ; v8min r0, r0, ra_blk_height\n+/* [0x00001458] */ 0x919c71c0, 0xd0024812, // shl r0, r0, v_dma_h_shift     ; mov rb_lcount, r0\n+/* [0x00001460] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1\n+/* [0x00001468] */ 0x1158edc0, 0xd4021327, // shl rb_wt_off, ra_wt_off_l0, DENOM + 7\n+/* [0x00001470] */ 0x918101f6, 0xd002581e, // shl r0, r0, v_dma_wh_shift    ; mov ra_link, unif\n+/* [0x00001478] */ 0x0c9db1c0, 0x100206e7, // add ra_dma0, r0, rb_dma0_base\n+// :1\n+/* [0x00001480] */ 0xcd511bee, 0x1a0269e5, // sub.setf -, r5, rb_i_tmu      ; v8adds r5rep, r5, ra_k1\n+/* [0x00001488] */ 0x804e7036, 0xa42099d1, // nop                           ; mov.ifz ra_y, ra_y_next       ; ldtmu0\n+/* [0x00001490] */ 0x8e5509bf, 0x12024823, // shr r0, r4, ra_xshift         ; mov r3, rb_pitch\n+/* [0x00001498] */ 0x13440dc0, 0xd40208a7, // max r2, ra_y, 0\n+/* [0x000014a0] */ 0x9269e5f6, 0x10029898, // min r2, r2, rb_max_y          ; mov.ifz ra_base, ra_base_next\n+/* [0x000014a8] */ 0x4c441dd3, 0xd4224462, // add ra_y, ra_y, 1             ; mul24 r2, r2, r3\n+/* [0x000014b0] */ 0x8c618c87, 0x10024e20, // add t0s, ra_base, r2          ; v8min r0, r0, rb_pmask\n+/* [0x000014b8] */ 0x4d592bc6, 0x120269e1, // sub.setf -, r5, rb_lcount     ; mul24 r1, r0, ra_wt_mul_l0\n+/* [0x000014c0] */ 0x915c83f6, 0xdc024863, // shl r1, r1, 8                 ; mov r3, ra_blk_height\n+/* [0x000014c8] */ 0xec40c3f3, 0x12024860, // add r1, r1, rb_wt_off         ; v8subs r0, ra_height, r3\n+/* [0x000014d0] */ 0xffffff90, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x000014d8] */ 0x0f9cf3c0, 0xd0020867, // asr r1, r1, DENOM + 8\n+/* [0x000014e0] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax           ; mov -, vw_wait\n+/* [0x000014e8] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch\n+/* [0x000014f0] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0\n+/* [0x000014f8] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link\n+/* [0x00001500] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3        ; mov vw_setup, rb_dma1\n+/* [0x00001508] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3        ; mov vw_addr, ra_dest\n+/* [0x00001510] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23\n+/* [0x00001518] */ 0xffffff48, 0xf0f809e7, // brr -, r:1b\n+/* [0x00001520] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0\n+/* [0x00001528] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1\n+/* [0x00001530] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init\n+// ::mc_filter_y_b00\n+/* [0x00001538] */ 0xfffff8f8, 0xf0f807a7, // brr ra_link, r:per_block_setup_8\n+/* [0x00001540] */ 0x959a0ff6, 0x10024023, // mov ra0, unif                 ; mov r3, elem_num\n+/* [0x00001548] */ 0xec9c3fd2, 0x100269e5, // add.setf -, rb_ef, rb_ef      ; v8subs r5rep, r2, r2\n+/* [0x00001550] */ 0x8c001cff, 0x14024800, // add r0, ra0.16b, r3           ; mov rb_xshift2, rb_xshift2_next\n+/* [0x00001558] */ 0x00000001, 0xe00208a7, // mov r2, 1\n+/* [0x00001560] */ 0x8c591eb6, 0x10025461, // add rb_i_tmu, rb_i_tmu, r2    ; mov r1, ra_wt_off_mul_l0\n+/* [0x00001568] */ 0xf158fded, 0xd4025325, // shl rb_wt_off, ra_wt_off_l0, DENOM + 8 ; v8subs r5quad, r5, r5\n+/* [0x00001570] */ 0x809f8009, 0xd000d9d6, // nop                           ; mov.ifnz ra_wt_off_mul_l0, r1 << 8\n+// :1\n+/* [0x00001578] */ 0x0d9d1bc0, 0xb00229e7, // sub.setf -, r5, rb_i_tmu      ; nop                           ; ldtmu1\n+/* [0x00001580] */ 0x8e4c09f6, 0xa0029851, // shr r1, r4, rb_xshift2        ; mov.ifz ra_y_y2, ra_y_y2_next ; ldtmu0\n+/* [0x00001588] */ 0x8e5509bf, 0x12024823, // shr r0, r4, ra_xshift         ; mov r3, rb_pitch\n+/* [0x00001590] */ 0x13440dc0, 0xd40208a7, // max r2, ra_y, 0\n+/* [0x00001598] */ 0x9269e5f6, 0x10029898, // min r2, r2, rb_max_y          ; mov.ifz ra_base, ra_base_next\n+/* [0x000015a0] */ 0x4c441dd3, 0xd4224462, // add ra_y, ra_y, 1             ; mul24 r2, r2, r3\n+/* [0x000015a8] */ 0x8c613cbf, 0x10028e0f, // add t0s, ra_base, r2          ; mov.ifz rb_base2, rb_base2_next\n+/* [0x000015b0] */ 0x13440dc0, 0xd20208a7, // max r2, ra_y2, 0\n+/* [0x000015b8] */ 0x129de5c0, 0x100208a7, // min r2, r2, rb_max_y\n+/* [0x000015c0] */ 0x4c441dd3, 0xd2124462, // add ra_y2, ra_y2, 1           ; mul24 r2, r2, r3\n+/* [0x000015c8] */ 0x8c5cfe86, 0x12024f20, // add t1s, rb_base2, r2         ; v8min r0, r0, ra_pmax\n+/* [0x000015d0] */ 0x545983c6, 0x12024860, // and r1, r1, rb_pmask          ; mul24 r0, r0, ra_wt_mul_l0\n+/* [0x000015d8] */ 0x4d492bce, 0x120269e1, // sub.setf -, r5, rb_lcount     ; mul24 r1, r1, ra_wt_mul_l1\n+/* [0x000015e0] */ 0xcc52706e, 0x1a024865, // add r1, r0, r1                ; v8adds r5rep, r5, ra_k1\n+/* [0x000015e8] */ 0x915c83f6, 0xdc024863, // shl r1, r1, 8                 ; mov r3, ra_blk_height\n+/* [0x000015f0] */ 0xec40c3f3, 0x12024860, // add r1, r1, rb_wt_off         ; v8subs r0, ra_height, r3\n+/* [0x000015f8] */ 0xffffff60, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00001600] */ 0x0f9d03c0, 0xd0020867, // asr r1, r1, (DENOM + 9) - 32\n+/* [0x00001608] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax           ; mov -, vw_wait\n+/* [0x00001610] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch\n+/* [0x00001618] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0        ; mov vw_setup, ra_dma0\n+/* [0x00001620] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link\n+/* [0x00001628] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3                ; mov vw_setup, rb_dma1\n+/* [0x00001630] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3                ; mov vw_addr, ra_dest\n+/* [0x00001638] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23\n+/* [0x00001640] */ 0xffffff18, 0xf0f809e7, // brr -, r:1b\n+/* [0x00001648] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0\n+/* [0x00001650] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1\n+/* [0x00001658] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init\n+// ::mc_setup_c10_q0\n+/* [0x00001660] */ 0x0000000c, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_setup_c10_qn\n+/* [0x00001668] */ 0x95801ff6, 0xd0025900, // mov tmurs, 1                  ; mov ra0, unif\n+/* [0x00001670] */ 0xaaaaff00, 0xe6020827, // mov r0, [0,2,0,2,0,2,0,2,1,3,1,3,1,3,1,3]\n+/* [0x00001678] */ 0x9181e1f6, 0xd00250d8, // shl rb_ef, r0, i_shift30      ; mov ra_base, unif\n+/* [0x00001680] */ 0x0d801dc0, 0xd0020827, // sub r0, unif, 1\n+/* [0x00001688] */ 0x119c21c0, 0xd00216a7, // shl rb_max_x, r0, v_x_shift\n+/* [0x00001690] */ 0x0d801dc0, 0xd00217a7, // sub rb_max_y, unif, 1\n+/* [0x00001698] */ 0xff800100, 0xe0020527, // mov ra_kff800100, 0xff800100\n+/* [0x000016a0] */ 0x0000ffff, 0xe0021627, // mov rb_pmask, v_pmask\n+/* [0x000016a8] */ 0x000803ff, 0xe00205e7, // mov ra_blk_height_pmax, ((1 << v_bit_depth) - 1) | (v_blk_height << 16)\n+/* [0x000016b0] */ 0x00010000, 0xe00217e7, // mov rb_fir_off_h, (FIR_OFFSET << (v_bit_depth - 8))\n+/* [0x000016b8] */ 0x4000000c, 0xe0020667, // mov ra_fir_off_val_wt_den_p7, (FIR_OFFSET << 16) | (DENOM + 15 - v_bit_depth)\n+/* [0x000016c0] */ 0x95803ff6, 0x10024754, // mov ra_ef, rb_ef              ; mov rb_xpitch, unif\n+/* [0x000016c8] */ 0x15827d80, 0x10021427, // mov rb_pitch, unif\n+/* [0x000016d0] */ 0xc0000000, 0xe0020867, // mov r1, vdw_setup_1(0)\n+/* [0x000016d8] */ 0x0c9d03c0, 0x10021667, // add rb_dma1_base, r1, rb_pitch\n+/* [0x000016e0] */ 0x14981f80, 0xd0020827, // and r0, 1, elem_num\n+/* [0x000016e8] */ 0x409c5007, 0xd00049e0, // nop                           ; mul24 r0, r0, 5\n+/* [0x000016f0] */ 0x0c9a7180, 0x10020827, // add r0, r0, elem_num\n+/* [0x000016f8] */ 0x0c9e7000, 0x100210a7, // add rb_elem_x, r0, r0\n+/* [0x00001700] */ 0x11002dc0, 0xd4020827, // shl r0, ra0.16b, v_x_shift\n+/* [0x00001708] */ 0x0c9c21c0, 0x10020827, // add r0, r0, rb_elem_x\n+/* [0x00001710] */ 0x930001f6, 0xd2225811, // max r0, r0, 0                 ; mov ra_y, ra0.16a\n+/* [0x00001718] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x\n+/* [0x00001720] */ 0x00000000, 0xe0224541, // mov ra_xshift_next, 0         ; mov rb_xshift2_next, 0\n+/* [0x00001728] */ 0x0d510dc0, 0x18020867, // sub r1, ra_k0, rb_pitch\n+/* [0x00001730] */ 0x149e7040, 0x10020867, // and r1, r0, r1\n+/* [0x00001738] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00001740] */ 0x8c827076, 0x10025800, // add r0, r0, r1                ; mov ra0, unif\n+/* [0x00001748] */ 0x0c627c00, 0x10020627, // add ra_base, ra_base, r0\n+/* [0x00001750] */ 0x159e6fc0, 0x100208a7, // mov r2, qpu_num\n+/* [0x00001758] */ 0x0f9c15c0, 0xd0020867, // asr r1, r2, 1\n+/* [0x00001760] */ 0x119c43c0, 0xd0020867, // shl r1, r1, 4\n+/* [0x00001768] */ 0x149c15c0, 0xd0020827, // and r0, r2, 1\n+/* [0x00001770] */ 0x159e7040, 0x10020827, // or  r0, r0, r1\n+/* [0x00001778] */ 0x00002900, 0xe0020867, // mov r1, vpm_setup(0, 2, h16p(0, 0))\n+/* [0x00001780] */ 0x0c9e7040, 0x10021727, // add r_vpm, r0, r1\n+/* [0x00001788] */ 0x80004002, 0xe0020867, // mov r1, vdw_setup_0(0, 0, dma_h16p(0,0,0))\n+/* [0x00001790] */ 0x119c61c0, 0xd0020827, // shl r0, r0, 6\n+/* [0x00001798] */ 0x0c9e7040, 0x100216e7, // add r_dma, r0, r1\n+/* [0x000017a0] */ 0x11002dc0, 0xd4020827, // shl r0, ra0.16b, v_x_shift\n+/* [0x000017a8] */ 0x8c0021f6, 0x12125811, // add r0, r0, rb_elem_x         ; mov ra_y2, ra0.16a\n+/* [0x000017b0] */ 0x938001f6, 0xd002480f, // max r0, r0, 0                 ; mov rb_base2, unif\n+/* [0x000017b8] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x\n+/* [0x000017c0] */ 0x0d510dc0, 0x18020867, // sub r1, ra_k0, rb_pitch\n+/* [0x000017c8] */ 0x949c307f, 0xd0024863, // and r1, r0, r1                ; mov r3, PREREAD\n+/* [0x000017d0] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x000017d8] */ 0x8c467076, 0x12024822, // add r0, r0, r1                ; mov r2, ra_y2\n+/* [0x000017e0] */ 0x8c44fe36, 0x140253e0, // add rb_base2, rb_base2, r0    ; mov r0, ra_y\n+// :1\n+/* [0x000017e8] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1\n+/* [0x000017f0] */ 0x139c01c0, 0xd0020867, // max r1, r0, 0\n+/* [0x000017f8] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y\n+/* [0x00001800] */ 0x4c51018f, 0x1a024821, // add r0, r0, ra_k1             ; mul24 r1, r1, rb_pitch\n+/* [0x00001808] */ 0x8c627c40, 0x10225e11, // add t0s, ra_base, r1          ; mov ra_y, r0\n+/* [0x00001810] */ 0x139c05c0, 0xd0020867, // max r1, r2, 0\n+/* [0x00001818] */ 0xffffffb0, 0xf03809e7, // brr.anynz -, r:1b\n+/* [0x00001820] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y\n+/* [0x00001828] */ 0x4c51058f, 0x1a0248a1, // add r2, r2, ra_k1             ; mul24 r1, r1, rb_pitch\n+/* [0x00001830] */ 0x8c9cfe52, 0x10125f11, // add t1s, rb_base2, r1         ; mov ra_y2, r2\n+/* [0x00001838] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00001840] */ 0x00000000, 0xe0024104, // mov ra4, 0                    ; mov rb4, 0\n+/* [0x00001848] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00001850] */ 0x00000000, 0xe0024145, // mov ra5, 0                    ; mov rb5, 0\n+/* [0x00001858] */ 0x00000000, 0xe0024186, // mov ra6, 0                    ; mov rb6, 0\n+/* [0x00001860] */ 0x00000000, 0xe00241c7, // mov ra7, 0                    ; mov rb7, 0\n+// ::mc_filter_c10_p\n+/* [0x00001868] */ 0x9581cff6, 0x10025c42, // mov vw_setup, rb_vpm_init     ; mov ra2, unif\n+/* [0x00001870] */ 0x8c803ff6, 0x100269e3, // add.setf -, rb_ef, rb_ef      ; mov r3, unif\n+/* [0x00001878] */ 0xf1082dc0, 0xd4024825, // shl r0, ra2.16b, v_x_shift    ; v8subs r5rep, r0, r0\n+/* [0x00001880] */ 0x8c8021f6, 0x10025810, // add r0, r0, rb_elem_x         ; mov ra_width_height, unif\n+/* [0x00001888] */ 0x8d810bf6, 0x10025840, // sub r1, r5, rb_pitch          ; mov ra0, unif\n+/* [0x00001890] */ 0x93567176, 0x14024800, // max r0, r0, r5                ; mov vrx_xshift, vrx_xshift_next\n+/* [0x00001898] */ 0x9209a1f6, 0x12225813, // min r0, r0, rb_max_x          ; mov vra_y_next, ra2.16a\n+/* [0x000018a0] */ 0x54404077, 0xd4024862, // and r1, r0, r1                ; mul24 r2, ra_width, v_x_mul\n+/* [0x000018a8] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x000018b0] */ 0x8c827076, 0x10025803, // add r0, r0, r1                ; mov ra3, unif\n+/* [0x000018b8] */ 0x8c427636, 0x120246a1, // add vrx_base_next, r3, r0     ; mov r1, ra_height\n+/* [0x000018c0] */ 0x8d819eb6, 0x10025756, // sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif\n+/* [0x000018c8] */ 0x8c5dc3ce, 0xdc025461, // add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height\n+/* [0x000018d0] */ 0x8c81f3f6, 0xd0039496, // add rb_lcount, r1, (3-4)      ; mov.ifc ra_wt_off_mul_l0, unif\n+/* [0x000018d8] */ 0x918083f6, 0xd002581c, // shl r0, r1, v_dma_h_shift     ; mov ra_dest, unif\n+/* [0x000018e0] */ 0x8c6670b6, 0x14024822, // add r0, r0, r2                ; mov r2, ra_fir_off_val\n+/* [0x000018e8] */ 0x910cf1f6, 0xdc02480a, // shl r0, r0, v_dma_wh_shift    ; mov rb10, ra3.8c\n+/* [0x000018f0] */ 0x8c59b1f6, 0x140246e1, // add ra_dma0, r0, rb_dma0_base ; mov r1, ra_wt_off_l0\n+/* [0x000018f8] */ 0x5158a3d6, 0xd2024860, // shl r1, r1, i_wt_den_p5       ; mul24 r0, r2, ra_wt_mul_l0\n+/* [0x00001900] */ 0x8d667236, 0x14025320, // sub rb_wt_off, r1, r0         ; mov r0, ra_kmul_add\n+/* [0x00001908] */ 0x8c59cc3f, 0xd21245a5, // add ra_wt_mul_l0, ra_wt_mul_l0, r0 ; mov r5rep, -4\n+/* [0x00001910] */ 0x950e0dbf, 0x1e0252de, // mov rb11, ra3.8d              ; mov ra_link, unif\n+// :1\n+/* [0x00001918] */ 0x8d151bf6, 0xa00269c4, // sub.setf -, r5, rb_i_tmu      ; mov rb4, ra5                  ; ldtmu0\n+/* [0x00001920] */ 0x8e4c09f6, 0x140288a3, // shr r2, r4, vrx_xshift        ; mov.ifz  r3, vra_y_next\n+/* [0x00001928] */ 0x8e4505f6, 0xd402c863, // shr r1, r2, v_v_shift         ; mov.ifnz r3, vra_y\n+/* [0x00001930] */ 0x8c683ff6, 0x1002b9d8, // add.setf -, rb_ef, rb_ef      ; mov.ifz  vra_base, vrx_base_next\n+/* [0x00001938] */ 0x8c531789, 0xda224460, // add vra_y, r3, ra_k1          ; mov      r0, r1 << 15\n+/* [0x00001940] */ 0x9353f792, 0xd803c8e1, // max r3, r3, ra_k0             ; mov.ifnc r1, r2 << 1\n+/* [0x00001948] */ 0x929de7d2, 0x1003c8e0, // min r3, r3, rb_max_y          ; mov.ifnc r0, r2\n+/* [0x00001950] */ 0x545d039f, 0x12024863, // and r1, r1, ra_pmax           ; mul24 r3, r3, rb_pitch\n+/* [0x00001958] */ 0x8c618cc7, 0x10024e20, // add vr_txs, vra_base, r3      ; v8min r0, r0, rb_pmask\n+/* [0x00001960] */ 0x4c001bf0, 0xd8025963, // add r5rep, r5, 1              ; mul24      r3, ra0.8a,       r0\n+/* [0x00001968] */ 0x4d01fef1, 0x1e0248a3, // sub r2, rb_fir_off_h, r3      ; mul24      r3, ra0.8d,       r1\n+/* [0x00001970] */ 0x4d03e4f0, 0xda0248a3, // sub r2, r2, r3                ; mul24      r3, ra0.8b << 2,  r0 << 2  @ \"mul_used\", 0\n+/* [0x00001978] */ 0x40034031, 0xda0109e3, // nop                           ; mul24.ifn  r3, ra0.8b << 12, r1 << 12 @ \"mul_used\", 0\n+/* [0x00001980] */ 0x4c03c4f0, 0xdc0248a3, // add r2, r2, r3                ; mul24      r3, ra0.8c << 4,  r0 << 4  @ \"mul_used\", 0\n+/* [0x00001988] */ 0x4c032b71, 0xdc0329e3, // add.setf -, r5, r5            ; mul24.ifn  r3, ra0.8c << 14, r1 << 14 @ \"mul_used\", 0\n+/* [0x00001990] */ 0xffffff68, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00001998] */ 0x4c1ca4f7, 0x100248a0, // add r2, r2, r3                ; mul24 r0, ra7, rb10\n+/* [0x000019a0] */ 0x550c6ffe, 0x1a024161, // mov ra5, rb6                  ; mul24 r1, rb6, ra3.8b\n+/* [0x000019a8] */ 0x8f1c25f6, 0xd00241c6, // asr ra7, r2, v_bit_depth - 8  ; mov rb6, ra7\n+/* [0x000019b0] */ 0x4c0c423e, 0x18024860, // add r1, r1, r0                ; mul24 r0, rb4, ra3.8a\n+/* [0x000019b8] */ 0x4d1cb237, 0x10024860, // sub r1, r1, r0                ; mul24 r0, ra7, rb11\n+/* [0x000019c0] */ 0x0d9e7200, 0x10020867, // sub r1, r1, r0\n+/* [0x000019c8] */ 0x8f5c63f6, 0xdc024863, // asr r1, r1, 6                 ; mov r3, ra_blk_height\n+/* [0x000019d0] */ 0x4d592bce, 0x120269e0, // sub.setf -, r5, rb_lcount     ; mul24 r0, r1, ra_wt_mul_l0\n+/* [0x000019d8] */ 0x4c64c1ce, 0x14024821, // add r0, r0, rb_wt_off         ; mul24 r1, r1, ra_kmul_add\n+/* [0x000019e0] */ 0xed427073, 0x12024860, // sub r1, r0, r1                ; v8subs r0, ra_height, r3\n+/* [0x000019e8] */ 0xffffff10, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x000019f0] */ 0x0f9cb3c0, 0xd0020867, // asr r1, r1, i_wt_den_p6\n+/* [0x000019f8] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax           ; mov -, vw_wait\n+/* [0x00001a00] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch\n+/* [0x00001a08] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0        ; mov vw_setup, ra_dma0\n+/* [0x00001a10] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link\n+/* [0x00001a18] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3                ; mov vw_setup, rb_dma1\n+/* [0x00001a20] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3                ; mov vw_addr, ra_dest\n+/* [0x00001a28] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23\n+/* [0x00001a30] */ 0xfffffec8, 0xf0f809e7, // brr -, r:1b\n+/* [0x00001a38] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0\n+/* [0x00001a40] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1\n+/* [0x00001a48] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init\n+// ::mc_filter_c10_p_l1\n+/* [0x00001a50] */ 0x9581cff6, 0x10025c42, // mov vw_setup, rb_vpm_init     ; mov ra2, unif\n+/* [0x00001a58] */ 0x8c803ff6, 0x100269e3, // add.setf -, rb_ef, rb_ef      ; mov r3, unif\n+/* [0x00001a60] */ 0xf1082dc0, 0xd4024825, // shl r0, ra2.16b, v_x_shift    ; v8subs r5rep, r0, r0\n+/* [0x00001a68] */ 0x8c8021f6, 0x10025810, // add r0, r0, rb_elem_x         ; mov ra_width_height, unif\n+/* [0x00001a70] */ 0x8d810bf6, 0x10025840, // sub r1, r5, rb_pitch          ; mov ra0, unif\n+/* [0x00001a78] */ 0x939c117f, 0x10125815, // max r0, r0, r5                ; mov vrx_xshift, vrx_xshift_next\n+/* [0x00001a80] */ 0x9209a1f6, 0x12125813, // min r0, r0, rb_max_x          ; mov vra_y_next, ra2.16a\n+/* [0x00001a88] */ 0x54404077, 0xd4024862, // and r1, r0, r1                ; mul24 r2, ra_width, v_x_mul\n+/* [0x00001a90] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00001a98] */ 0x8c827076, 0x10025803, // add r0, r0, r1                ; mov ra3, unif\n+/* [0x00001aa0] */ 0x8c427636, 0x120254e1, // add vrx_base_next, r3, r0     ; mov r1, ra_height\n+/* [0x00001aa8] */ 0x8d819eb6, 0x10025756, // sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif\n+/* [0x00001ab0] */ 0x8c5dc3ce, 0xdc025461, // add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height\n+/* [0x00001ab8] */ 0x8c81f3f6, 0xd0039496, // add rb_lcount, r1, (3-4)      ; mov.ifc ra_wt_off_mul_l0, unif\n+/* [0x00001ac0] */ 0x918083f6, 0xd002581c, // shl r0, r1, v_dma_h_shift     ; mov ra_dest, unif\n+/* [0x00001ac8] */ 0x8c6670b6, 0x14024822, // add r0, r0, r2                ; mov r2, ra_fir_off_val\n+/* [0x00001ad0] */ 0x910cf1f6, 0xdc02480a, // shl r0, r0, v_dma_wh_shift    ; mov rb10, ra3.8c\n+/* [0x00001ad8] */ 0x8c59b1f6, 0x140246e1, // add ra_dma0, r0, rb_dma0_base ; mov r1, ra_wt_off_l0\n+/* [0x00001ae0] */ 0x5158a3d6, 0xd2024860, // shl r1, r1, i_wt_den_p5       ; mul24 r0, r2, ra_wt_mul_l0\n+/* [0x00001ae8] */ 0x8d667236, 0x14025320, // sub rb_wt_off, r1, r0         ; mov r0, ra_kmul_add\n+/* [0x00001af0] */ 0x8c59cc3f, 0xd21245a5, // add ra_wt_mul_l0, ra_wt_mul_l0, r0 ; mov r5rep, -4\n+/* [0x00001af8] */ 0x950e0dbf, 0x1e0252de, // mov rb11, ra3.8d              ; mov ra_link, unif\n+// :1\n+/* [0x00001b00] */ 0x8d151bf6, 0xb00269c4, // sub.setf -, r5, rb_i_tmu      ; mov rb4, ra5                  ; ldtmu1\n+/* [0x00001b08] */ 0x8e5539bf, 0x1202888f, // shr r2, r4, vrx_xshift        ; mov.ifz  vra_base, vrx_base_next\n+/* [0x00001b10] */ 0x8e4505f6, 0xd202c863, // shr r1, r2, v_v_shift         ; mov.ifnz r3, vra_y\n+/* [0x00001b18] */ 0x8c4c3ff6, 0x1202a9e3, // add.setf -, rb_ef, rb_ef      ; mov.ifz  r3, vra_y_next\n+/* [0x00001b20] */ 0x8c531789, 0xda124460, // add vra_y, r3, ra_k1          ; mov      r0, r1 << 15\n+/* [0x00001b28] */ 0x9353f792, 0xd803c8e1, // max r3, r3, ra_k0             ; mov.ifnc r1, r2 << 1\n+/* [0x00001b30] */ 0x929de7d2, 0x1003c8e0, // min r3, r3, rb_max_y          ; mov.ifnc r0, r2\n+/* [0x00001b38] */ 0x545d039f, 0x12024863, // and r1, r1, ra_pmax           ; mul24 r3, r3, rb_pitch\n+/* [0x00001b40] */ 0x8c5cfec6, 0x12024f20, // add vr_txs, vra_base, r3      ; v8min r0, r0, ra_pmax\n+/* [0x00001b48] */ 0x4c001bf0, 0xd8025963, // add r5rep, r5, 1              ; mul24      r3, ra0.8a,       r0\n+/* [0x00001b50] */ 0x4d01fef1, 0x1e0248a3, // sub r2, rb_fir_off_h, r3      ; mul24      r3, ra0.8d,       r1\n+/* [0x00001b58] */ 0x4d03e4f0, 0xda0248a3, // sub r2, r2, r3                ; mul24      r3, ra0.8b << 2,  r0 << 2  @ \"mul_used\", 0\n+/* [0x00001b60] */ 0x40034031, 0xda0109e3, // nop                           ; mul24.ifn  r3, ra0.8b << 12, r1 << 12 @ \"mul_used\", 0\n+/* [0x00001b68] */ 0x4c03c4f0, 0xdc0248a3, // add r2, r2, r3                ; mul24      r3, ra0.8c << 4,  r0 << 4  @ \"mul_used\", 0\n+/* [0x00001b70] */ 0x4c032b71, 0xdc0329e3, // add.setf -, r5, r5            ; mul24.ifn  r3, ra0.8c << 14, r1 << 14 @ \"mul_used\", 0\n+/* [0x00001b78] */ 0xffffff68, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00001b80] */ 0x4c1ca4f7, 0x100248a0, // add r2, r2, r3                ; mul24 r0, ra7, rb10\n+/* [0x00001b88] */ 0x550c6ffe, 0x1a024161, // mov ra5, rb6                  ; mul24 r1, rb6, ra3.8b\n+/* [0x00001b90] */ 0x8f1c25f6, 0xd00241c6, // asr ra7, r2, v_bit_depth - 8  ; mov rb6, ra7\n+/* [0x00001b98] */ 0x4c0c423e, 0x18024860, // add r1, r1, r0                ; mul24 r0, rb4, ra3.8a\n+/* [0x00001ba0] */ 0x4d1cb237, 0x10024860, // sub r1, r1, r0                ; mul24 r0, ra7, rb11\n+/* [0x00001ba8] */ 0x0d9e7200, 0x10020867, // sub r1, r1, r0\n+/* [0x00001bb0] */ 0x8f5c63f6, 0xdc024863, // asr r1, r1, 6                 ; mov r3, ra_blk_height\n+/* [0x00001bb8] */ 0x4d592bce, 0x120269e0, // sub.setf -, r5, rb_lcount     ; mul24 r0, r1, ra_wt_mul_l0\n+/* [0x00001bc0] */ 0x4c64c1ce, 0x14024821, // add r0, r0, rb_wt_off         ; mul24 r1, r1, ra_kmul_add\n+/* [0x00001bc8] */ 0xed427073, 0x12024860, // sub r1, r0, r1                ; v8subs r0, ra_height, r3\n+/* [0x00001bd0] */ 0xffffff10, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00001bd8] */ 0x0f9cb3c0, 0xd0020867, // asr r1, r1, i_wt_den_p6\n+/* [0x00001be0] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax           ; mov -, vw_wait\n+/* [0x00001be8] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch\n+/* [0x00001bf0] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0        ; mov vw_setup, ra_dma0\n+/* [0x00001bf8] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link\n+/* [0x00001c00] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3                ; mov vw_setup, rb_dma1\n+/* [0x00001c08] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3                ; mov vw_addr, ra_dest\n+/* [0x00001c10] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23\n+/* [0x00001c18] */ 0xfffffec8, 0xf0f809e7, // brr -, r:1b\n+/* [0x00001c20] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0\n+/* [0x00001c28] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1\n+/* [0x00001c30] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init\n+// ::mc_filter_c10_b\n+/* [0x00001c38] */ 0x9581cff6, 0x10025c42, // mov vw_setup, rb_vpm_init     ; mov ra2, unif\n+/* [0x00001c40] */ 0x8c803ff6, 0x100269e3, // add.setf -, rb_ef, rb_ef      ; mov r3, unif\n+/* [0x00001c48] */ 0xf1082dc9, 0xd4024825, // shl r0, ra2.16b, v_x_shift    ; v8subs r5rep, r1, r1\n+/* [0x00001c50] */ 0x8c0821f6, 0x12225813, // add r0, r0, rb_elem_x         ; mov ra_y_next, ra2.16a\n+/* [0x00001c58] */ 0x8d810bf6, 0x10025850, // sub r1, r5, rb_pitch          ; mov ra_width_height, unif\n+/* [0x00001c60] */ 0x93567176, 0x14125815, // max r0, r0, r5                ; mov ra_xshift, ra_xshift_next\n+/* [0x00001c68] */ 0x9281a1f6, 0x10025800, // min r0, r0, rb_max_x          ; mov ra0, unif\n+/* [0x00001c70] */ 0x9481c1f6, 0xd0025802, // and r0, r0, -4                ; mov ra2, unif\n+/* [0x00001c78] */ 0x54404077, 0xd4024862, // and r1, r0, r1                ; mul24 r2, ra_width, v_x_mul\n+/* [0x00001c80] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00001c88] */ 0x8c427076, 0x12024821, // add r0, r0, r1                ; mov r1, ra_height\n+/* [0x00001c90] */ 0x8c9c163f, 0x10024680, // add ra_base_next, r3, r0      ; mov rb_xshift2, rb_xshift2_next\n+/* [0x00001c98] */ 0x8d819eb6, 0x10025756, // sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif\n+/* [0x00001ca0] */ 0x8c5dc3ce, 0xdc025461, // add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height\n+/* [0x00001ca8] */ 0x8c59f3f6, 0xd4139496, // add rb_lcount, r1, (3-4)      ; mov.ifc ra_wt_mul_l0, ra_wt_off_l0\n+/* [0x00001cb0] */ 0x918083f6, 0xd0025803, // shl r0, r1, v_dma_h_shift     ; mov ra3, unif\n+/* [0x00001cb8] */ 0x8c8270b6, 0x10024823, // add r0, r0, r2                ; mov r3, unif\n+/* [0x00001cc0] */ 0x910cf1f6, 0xd2125813, // shl r0, r0, v_dma_wh_shift    ; mov ra_y2_next, ra3.16a\n+/* [0x00001cc8] */ 0x8c0db1f6, 0x140246e0, // add ra_dma0, r0, rb_dma0_base ; mov r0, ra3.16b\n+/* [0x00001cd0] */ 0x918021f6, 0xd0025801, // shl r0, r0, v_x_shift         ; mov ra1, unif\n+/* [0x00001cd8] */ 0x8c8021f6, 0x10025803, // add r0, r0, rb_elem_x         ; mov ra3, unif\n+/* [0x00001ce0] */ 0x8d810bf6, 0x10025852, // sub r1, r5, rb_pitch          ; mov ra_wt_off_mul_l1, unif\n+/* [0x00001ce8] */ 0x939de17f, 0x10025809, // max r0, r0, r5                ; mov ra9, rb_max_y\n+/* [0x00001cf0] */ 0x9265a1f6, 0x14024822, // min r0, r0, rb_max_x          ; mov r2, ra_kmul_add\n+/* [0x00001cf8] */ 0x9481c1f6, 0xd0039812, // and r0, r0, -4                ; mov.ifc ra_wt_off_mul_l1, unif\n+/* [0x00001d00] */ 0x949dc07f, 0xd0024865, // and r1, r0, r1                ; mov r5rep, -4\n+/* [0x00001d08] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00001d10] */ 0x8c827076, 0x1002581c, // add r0, r0, r1                ; mov ra_dest, unif\n+/* [0x00001d18] */ 0x8c667636, 0x140254e0, // add rb_base2_next, r3, r0     ; mov r0, ra_fir_off_val\n+/* [0x00001d20] */ 0x4c5a7c86, 0x121245a1, // add ra_wt_mul_l0, ra_wt_mul_l0, r2 ; mul24 r1, r0, ra_wt_mul_l0\n+/* [0x00001d28] */ 0x4c4a7c86, 0x121244a0, // add ra_wt_mul_l1, ra_wt_mul_l1, r2 ; mul24 r0, r0, ra_wt_mul_l1\n+/* [0x00001d30] */ 0x8c4a7076, 0x14024821, // add r0, r0, r1                ; mov r1, ra_wt_off_l1\n+/* [0x00001d38] */ 0x910cb3f6, 0xde02484b, // shl r1, r1, i_wt_den_p6       ; mov rb11, ra3.8d\n+/* [0x00001d40] */ 0x8d827236, 0x1002531e, // sub rb_wt_off, r1, r0         ; mov ra_link, unif\n+/* [0x00001d48] */ 0x95080ff6, 0x1e024287, // mov ra10, rb_xshift2          ; mov rb7,  ra2.8d\n+// :1\n+/* [0x00001d50] */ 0x0d9d1bc0, 0xa00229e7, // sub.setf -, r5, rb_i_tmu      ; nop                           ; ldtmu0\n+/* [0x00001d58] */ 0x8e5539bf, 0x1202888f, // shr r2, r4, ra_xshift         ; mov.ifz rb_base2, rb_base2_next\n+/* [0x00001d60] */ 0x8e4d05f6, 0xd0029851, // shr r1, r2, v_v_shift         ; mov.ifz ra_y_y2, ra_y_y2_next\n+/* [0x00001d68] */ 0x8c683ff6, 0x1002b9d8, // add.setf -, rb_ef, rb_ef      ; mov.ifz ra_base, ra_base_next\n+/* [0x00001d70] */ 0x8c441fb6, 0xd4224463, // add ra_y, 1, ra_y             ; mov r3, ra_y\n+/* [0x00001d78] */ 0x93531789, 0xd80248e0, // max r3, r3, ra_k0             ; mov      r0, r1 << 15\n+/* [0x00001d80] */ 0x9227f792, 0xd003c8e1, // min r3, r3, ra9               ; mov.ifnc r1, r2 << 1\n+/* [0x00001d88] */ 0x559d049f, 0x100e4823, // mov.ifnc r0, r2               ; mul24 r3, r3, rb_pitch\n+/* [0x00001d90] */ 0x8c618cc7, 0x10024e20, // add t0s, ra_base, r3          ; v8min r0, r0, rb_pmask\n+/* [0x00001d98] */ 0x540183f0, 0x18024862, // and r1, r1, rb_pmask          ; mul24      r2, ra0.8a,       r0\n+/* [0x00001da0] */ 0x4d01feb1, 0x1e0248a3, // sub r2, rb_fir_off_h, r2      ; mul24      r3, ra0.8d,       r1\n+/* [0x00001da8] */ 0x4d03e4f0, 0xda0248a3, // sub r2, r2, r3                ; mul24      r3, ra0.8b << 2,  r0 << 2  @ \"mul_used\", 0\n+/* [0x00001db0] */ 0x40034031, 0xda0109e3, // nop                           ; mul24.ifn  r3, ra0.8b << 12, r1 << 12 @ \"mul_used\", 0\n+/* [0x00001db8] */ 0x4c03c4f0, 0xdc0248a3, // add r2, r2, r3                ; mul24      r3, ra0.8c << 4,  r0 << 4  @ \"mul_used\", 0\n+/* [0x00001dc0] */ 0x40032031, 0xdc0109e3, // nop                           ; mul24.ifn  r3, ra0.8c << 14, r1 << 14 @ \"mul_used\", 0\n+/* [0x00001dc8] */ 0x4c0854fe, 0xb8025804, // add r0, r2, r3                ; mul24 ra4, rb5, ra2.8a        ; ldtmu1\n+/* [0x00001dd0] */ 0x8e2869bf, 0x10024885, // shr r2, r4, ra10              ; mov rb5, rb6\n+/* [0x00001dd8] */ 0x8e4505f6, 0xd2024863, // shr r1, r2, v_v_shift         ; mov r3, ra_y2\n+/* [0x00001de0] */ 0x8e1c21f6, 0xd00241c6, // shr ra7, r0, v_bit_depth - 8  ; mov rb6, ra7\n+/* [0x00001de8] */ 0x8c531789, 0xda124460, // add ra_y2, r3, ra_k1          ; mov      r0, r1 << 15\n+/* [0x00001df0] */ 0x9353f792, 0xd803c8e1, // max r3, r3, ra_k0             ; mov.ifnc r1, r2 << 1\n+/* [0x00001df8] */ 0x925de7ce, 0x120248e1, // min r3, r3, rb_max_y          ; v8min r1, r1, ra_pmax\n+/* [0x00001e00] */ 0x559d049f, 0x100e4823, // mov.ifnc r0, r2               ; mul24 r3, r3, rb_pitch\n+/* [0x00001e08] */ 0x8c5cfec6, 0x12024f20, // add t1s, rb_base2, r3         ; v8min r0, r0, ra_pmax\n+/* [0x00001e10] */ 0x4c041bf0, 0xd8025962, // add r5rep, r5, 1              ; mul24      r2, ra1.8a,       r0\n+/* [0x00001e18] */ 0x4d05feb1, 0x1e0248a3, // sub r2, rb_fir_off_h, r2      ; mul24      r3, ra1.8d,       r1\n+/* [0x00001e20] */ 0x4d07e4f0, 0xda0248a3, // sub r2, r2, r3                ; mul24      r3, ra1.8b << 2,  r0 << 2  @ \"mul_used\", 0\n+/* [0x00001e28] */ 0x40074031, 0xda0109e3, // nop                           ; mul24.ifn  r3, ra1.8b << 12, r1 << 12 @ \"mul_used\", 0\n+/* [0x00001e30] */ 0x4c07c6b0, 0xdc0248a3, // add r2, r3, r2                ; mul24      r3, ra1.8c << 4,  r0 << 4  @ \"mul_used\", 0\n+/* [0x00001e38] */ 0x4c072b71, 0xdc0329e3, // add.setf -, r5, r5            ; mul24.ifn  r3, ra1.8c << 14, r1 << 14 @ \"mul_used\", 0\n+/* [0x00001e40] */ 0xfffffef0, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00001e48] */ 0x4c0c94fe, 0x180248a0, // add r2, r2, r3                ; mul24 r0, rb9,  ra3.8a\n+/* [0x00001e50] */ 0x550caffe, 0x1a025261, // mov rb9, rb10                 ; mul24 r1, rb10, ra3.8b\n+/* [0x00001e58] */ 0x8e2c25f6, 0xd00242ca, // shr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11\n+/* [0x00001e60] */ 0x4d08523e, 0x1a0248a1, // sub r2, r1, r0                ; mul24 r1, rb5,  ra2.8b\n+/* [0x00001e68] */ 0x8d112bf6, 0x100269e0, // sub.setf -, r5, rb_lcount     ; mov r0, ra4\n+/* [0x00001e70] */ 0x4d08623e, 0x1c024860, // sub r1, r1, r0                ; mul24 r0, rb6,  ra2.8c\n+/* [0x00001e78] */ 0x4c1c7237, 0x10024860, // add r1, r1, r0                ; mul24 r0, ra7,  rb7\n+/* [0x00001e80] */ 0x4d0ca23e, 0x1c024860, // sub r1, r1, r0                ; mul24 r0, rb10, ra3.8c\n+/* [0x00001e88] */ 0x4c2cb437, 0x100248a0, // add r2, r2, r0                ; mul24 r0, ra11, rb11\n+/* [0x00001e90] */ 0x0d9e7400, 0x100208a7, // sub r2, r2, r0\n+/* [0x00001e98] */ 0x0e9c63c0, 0xd0020867, // shr r1, r1, 6\n+/* [0x00001ea0] */ 0x4e5865ce, 0xd20248a0, // shr r2, r2, 6                 ; mul24 r0, r1, ra_wt_mul_l0\n+/* [0x00001ea8] */ 0x4c4a7456, 0x120248a1, // add r2, r2, r1                ; mul24 r1, r2, ra_wt_mul_l1\n+/* [0x00001eb0] */ 0x4c667216, 0x14024862, // add r1, r1, r0                ; mul24 r2, r2, ra_kmul_add\n+/* [0x00001eb8] */ 0x8d5e72b6, 0x1c024863, // sub r1, r1, r2                ; mov r3, ra_blk_height\n+/* [0x00001ec0] */ 0xec40c3f3, 0x12024860, // add r1, r1, rb_wt_off         ; v8subs r0, ra_height, r3\n+/* [0x00001ec8] */ 0xfffffe68, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00001ed0] */ 0x0f667380, 0x18020867, // asr r1, r1, ra_wt_den_p7\n+/* [0x00001ed8] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax           ; mov -, vw_wait\n+/* [0x00001ee0] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch\n+/* [0x00001ee8] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0        ; mov vw_setup, ra_dma0\n+/* [0x00001ef0] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link\n+/* [0x00001ef8] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3                ; mov vw_setup, rb_dma1\n+/* [0x00001f00] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3                ; mov vw_addr, ra_dest\n+/* [0x00001f08] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23\n+/* [0x00001f10] */ 0xfffffe20, 0xf0f809e7, // brr -, r:1b\n+/* [0x00001f18] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0\n+/* [0x00001f20] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1\n+/* [0x00001f28] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init\n+// ::mc_sync10_q0\n+/* [0x00001f30] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00001f38] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00001f40] */ 0x00000010, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00001f48] */ 0x00000010, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00001f50] */ 0x00000010, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00001f58] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00001f60] */ 0x0000001c, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00001f68] */ 0x00000001, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00001f70] */ 0x0000000d, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync10_q1\n+/* [0x00001f78] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00001f80] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00001f88] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00001f90] */ 0x00000000, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00001f98] */ 0x00000011, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00001fa0] */ 0x00000002, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync10_q2\n+/* [0x00001fa8] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00001fb0] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00001fb8] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00001fc0] */ 0x00000000, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00001fc8] */ 0x00000012, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00001fd0] */ 0x00000003, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync10_q3\n+/* [0x00001fd8] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00001fe0] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00001fe8] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00001ff0] */ 0x00000000, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00001ff8] */ 0x00000013, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00002000] */ 0x009e7000, 0x100009e7, // nop\n+// ::mc_sync10_q4\n+/* [0x00002008] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00002010] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00002018] */ 0x00000014, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00002020] */ 0x00000014, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00002028] */ 0x00000014, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00002030] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00002038] */ 0x0000001d, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00002040] */ 0x00000005, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00002048] */ 0x0000000e, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync10_q5\n+/* [0x00002050] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00002058] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00002060] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00002068] */ 0x00000004, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00002070] */ 0x00000015, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00002078] */ 0x00000006, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync10_q6\n+/* [0x00002080] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00002088] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00002090] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00002098] */ 0x00000004, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x000020a0] */ 0x00000016, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x000020a8] */ 0x00000007, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync10_q7\n+/* [0x000020b0] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x000020b8] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x000020c0] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x000020c8] */ 0x00000004, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x000020d0] */ 0x00000017, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x000020d8] */ 0x009e7000, 0x100009e7, // nop\n+// ::mc_sync10_q8\n+/* [0x000020e0] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x000020e8] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x000020f0] */ 0x00000018, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x000020f8] */ 0x00000018, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00002100] */ 0x00000018, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00002108] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00002110] */ 0x0000001e, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00002118] */ 0x00000009, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00002120] */ 0x0000000c, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync10_q9\n+/* [0x00002128] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00002130] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00002138] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00002140] */ 0x00000008, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00002148] */ 0x00000019, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00002150] */ 0x0000000a, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync10_q10\n+/* [0x00002158] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00002160] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00002168] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00002170] */ 0x00000008, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x00002178] */ 0x0000001a, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x00002180] */ 0x0000000b, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_sync10_q11\n+/* [0x00002188] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00002190] */ 0x159f2fc0, 0x100009e7, // mov -, vw_wait\n+/* [0x00002198] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x000021a0] */ 0x00000008, 0xe80009e7, // mov  dst, srel(i)\n+/* [0x000021a8] */ 0x0000001b, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x000021b0] */ 0x009e7000, 0x100009e7, // nop\n+// ::mc_exit_c10_q0\n+// ::mc_exit_y10_q0\n+/* [0x000021b8] */ 0x00000002, 0xe00228e7, // mov.setf r3, PREREAD - 1\n+// :1\n+/* [0x000021c0] */ 0xffffffe0, 0xf03809e7, // brr.anynz -, r:1b\n+/* [0x000021c8] */ 0x009e7000, 0xa00009e7, // nop                   ; nop           ; ldtmu0\n+/* [0x000021d0] */ 0x009e7000, 0xb00009e7, // nop                   ; nop           ; ldtmu1\n+/* [0x000021d8] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1\n+/* [0x000021e0] */ 0x159f2fc0, 0x100009e7, // mov  -, vw_wait\n+/* [0x000021e8] */ 0x0000001c, 0xe80009e7, // mov  dst, sacq(i)\n+/* [0x000021f0] */ 0x009e7000, 0x300009e7, // nop                   ; nop           ; thrend\n+/* [0x000021f8] */ 0x00000001, 0xe00209a7, // mov interrupt, 1\n+/* [0x00002200] */ 0x009e7000, 0x100009e7, // nop\n+// ::mc_exit_c10_qn\n+// ::mc_exit_y10_qn\n+/* [0x00002208] */ 0x00000002, 0xe00228e7, // mov.setf r3, PREREAD - 1\n+// :1\n+/* [0x00002210] */ 0xffffffe0, 0xf03809e7, // brr.anynz -, r:1b\n+/* [0x00002218] */ 0x009e7000, 0xa00009e7, // nop                   ; nop           ; ldtmu0\n+/* [0x00002220] */ 0x009e7000, 0xb00009e7, // nop                   ; nop           ; ldtmu1\n+/* [0x00002228] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1\n+/* [0x00002230] */ 0x159f2fc0, 0x100009e7, // mov  -, vw_wait\n+/* [0x00002238] */ 0x009e7000, 0x300009e7, // nop                   ; nop           ; thrend\n+/* [0x00002240] */ 0x009e7000, 0x100009e7, // nop\n+/* [0x00002248] */ 0x009e7000, 0x100009e7, // nop\n+// ::mc_setup_y10_q0\n+/* [0x00002250] */ 0x0000000c, 0xe80009e7, // mov  dst, srel(i)\n+// ::mc_setup_y10_qn\n+/* [0x00002258] */ 0x95801ff6, 0xd0025900, // mov tmurs, 1                  ; mov ra0, unif\n+/* [0x00002260] */ 0x15827d80, 0x10020267, // mov ra9, unif\n+/* [0x00002268] */ 0x15827d80, 0x10020067, // mov ra1, unif\n+/* [0x00002270] */ 0xaaaaff00, 0xe6020827, // mov r0, [0,2,0,2,0,2,0,2,1,3,1,3,1,3,1,3]\n+/* [0x00002278] */ 0x9181e1f6, 0xd00250cb, // shl rb_ef, r0, i_shift30      ; mov ra11, unif\n+/* [0x00002280] */ 0xff800100, 0xe0020527, // mov ra_kff800100, 0xff800100\n+/* [0x00002288] */ 0x0000ffff, 0xe0021627, // mov rb_pmask, v_pmask\n+/* [0x00002290] */ 0x000803ff, 0xe00205e7, // mov ra_blk_height_pmax, ((1 << v_bit_depth) - 1) | (v_blk_height << 16)\n+/* [0x00002298] */ 0x00010000, 0xe00217e7, // mov rb_fir_off_h, (FIR_OFFSET << (v_bit_depth - 8))\n+/* [0x000022a0] */ 0x4000000c, 0xe0020667, // mov ra_fir_off_val_wt_den_p7, (FIR_OFFSET << 16) | (DENOM + 15 - v_bit_depth)\n+/* [0x000022a8] */ 0x050b0a00, 0xe0021567, // mov rb_y_coeffs_2, 0x050b0a00\n+/* [0x000022b0] */ 0x11283a40, 0xe00215a7, // mov rb_y_coeffs_3, 0x11283a40\n+/* [0x000022b8] */ 0x0a0b0500, 0xe00215e7, // mov rb_y_coeffs_5, 0x0a0b0500\n+/* [0x000022c0] */ 0x15827d80, 0x100200e7, // mov ra3, unif\n+/* [0x000022c8] */ 0x95803ff6, 0x10024754, // mov ra_ef, rb_ef              ; mov rb_xpitch, unif\n+/* [0x000022d0] */ 0x0d0c1dc0, 0xd4020827, // sub r0, ra3.16b, 1\n+/* [0x000022d8] */ 0x119c11c0, 0xd00216a7, // shl rb_max_x, r0, v_x_shift\n+/* [0x000022e0] */ 0x0d0c1dc0, 0xd20217a7, // sub rb_max_y, ra3.16a, 1\n+/* [0x000022e8] */ 0x959a0dbf, 0x100248d0, // mov r3, elem_num              ; mov rb_pitch, unif\n+/* [0x000022f0] */ 0xc0000000, 0xe0020867, // mov r1, vdw_setup_1(0)\n+/* [0x000022f8] */ 0x159d03c0, 0x10021667, // or  rb_dma1_base, r1, rb_pitch\n+/* [0x00002300] */ 0x0c027cc0, 0x14020827, // add r0, ra0.16b, r3\n+/* [0x00002308] */ 0x119c11c0, 0xd0020827, // shl r0, r0, v_x_shift\n+/* [0x00002310] */ 0x139c01c0, 0xd0020827, // max r0, r0, 0\n+/* [0x00002318] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x\n+/* [0x00002320] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3\n+/* [0x00002328] */ 0xf49dc1d2, 0xd0024822, // and r0, r0, -4                ; v8subs r2, r2, r2\n+/* [0x00002330] */ 0x0d9d05c0, 0x100208a7, // sub r2, r2, rb_pitch\n+/* [0x00002338] */ 0x149e7080, 0x10020867, // and r1, r0, r2\n+/* [0x00002340] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00002348] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1\n+/* [0x00002350] */ 0x0c267c00, 0x10020627, // add ra_base, ra9, r0\n+/* [0x00002358] */ 0x0c067cc0, 0x14020827, // add r0, ra1.16b, r3\n+/* [0x00002360] */ 0x119c11c0, 0xd0020827, // shl r0, r0, v_x_shift\n+/* [0x00002368] */ 0x139c01c0, 0xd0020827, // max r0, r0, 0\n+/* [0x00002370] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x\n+/* [0x00002378] */ 0x119c31c0, 0xd0021067, // shl rb_xshift2_next, r0, 3\n+/* [0x00002380] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4\n+/* [0x00002388] */ 0x149e7080, 0x10020867, // and r1, r0, r2\n+/* [0x00002390] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00002398] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1\n+/* [0x000023a0] */ 0x0c2e7c00, 0x100213e7, // add rb_base2, ra11, r0\n+/* [0x000023a8] */ 0x80027036, 0x120049e0, // nop                           ; mov r0, ra0.16a\n+/* [0x000023b0] */ 0x95043ff6, 0xd20248e2, // mov r3, PREREAD               ; mov r2, ra1.16a\n+// :1\n+/* [0x000023b8] */ 0x0d9c17c0, 0xd00228e7, // sub.setf r3, r3, 1\n+/* [0x000023c0] */ 0x139c01c0, 0xd0020867, // max r1, r0, 0\n+/* [0x000023c8] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y\n+/* [0x000023d0] */ 0x4c51018f, 0x1a024821, // add r0, r0, ra_k1             ; mul24 r1, r1, rb_pitch\n+/* [0x000023d8] */ 0x8c627c40, 0x10225e11, // add t0s, ra_base, r1          ; mov ra_y, r0\n+/* [0x000023e0] */ 0x139c05c0, 0xd0020867, // max r1, r2, 0\n+/* [0x000023e8] */ 0xffffffb0, 0xf03809e7, // brr.anynz -, r:1b\n+/* [0x000023f0] */ 0x129de3c0, 0x10020867, // min r1, r1, rb_max_y\n+/* [0x000023f8] */ 0x4c51058f, 0x1a0248a1, // add r2, r2, ra_k1             ; mul24 r1, r1, rb_pitch\n+/* [0x00002400] */ 0x8c9cfe52, 0x10125f11, // add t1s, rb_base2, r1         ; mov ra_y2, r2\n+/* [0x00002408] */ 0x159e6fc0, 0x100208a7, // mov r2, qpu_num\n+/* [0x00002410] */ 0x0f9c15c0, 0xd0020867, // asr r1, r2, 1\n+/* [0x00002418] */ 0x119c43c0, 0xd0020867, // shl r1, r1, 4\n+/* [0x00002420] */ 0x149c15c0, 0xd0020827, // and r0, r2, 1\n+/* [0x00002428] */ 0x159e7040, 0x10020827, // or  r0, r0, r1\n+/* [0x00002430] */ 0x00002900, 0xe0020867, // mov r1, vpm_setup(0, 2, h16p(0, 0))\n+/* [0x00002438] */ 0x0c9e7040, 0x10021727, // add r_vpm, r0, r1\n+/* [0x00002440] */ 0x80004002, 0xe0020867, // mov r1, vdw_setup_0(0, 0, dma_h16p(0,0,0))\n+/* [0x00002448] */ 0x119c61c0, 0xd0020827, // shl r0, r0, 6\n+/* [0x00002450] */ 0x0c9e7040, 0x100216e7, // add r_dma, r0, r1\n+/* [0x00002458] */ 0x15827d80, 0x100207a7, // mov ra_link, unif\n+/* [0x00002460] */ 0x00000000, 0xe0024208, // mov ra8,  0                   ; mov rb8,  0\n+/* [0x00002468] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00002470] */ 0x00000000, 0xe0024249, // mov ra9,  0                   ; mov rb9,  0\n+/* [0x00002478] */ 0x00000000, 0xe002428a, // mov ra10, 0                   ; mov rb10, 0\n+/* [0x00002480] */ 0x00000000, 0xe00242cb, // mov ra11, 0                   ; mov rb11, 0\n+// :per_block_setup_10\n+/* [0x00002488] */ 0x119c11c0, 0xd0020827, // shl r0, r0, v_x_shift\n+/* [0x00002490] */ 0x93567176, 0x14125815, // max r0, r0, r5                ; mov ra_xshift, ra_xshift_next\n+/* [0x00002498] */ 0x129da1c0, 0x10020827, // min r0, r0, rb_max_x\n+/* [0x000024a0] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3\n+/* [0x000024a8] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4\n+/* [0x000024b0] */ 0x8d810bf6, 0x1002589a, // sub r2, r5, rb_pitch          ; mov ra_base_next, unif\n+/* [0x000024b8] */ 0x940270b6, 0x12225853, // and r1, r0, r2                ; mov ra_y_next, ra0.16a\n+/* [0x000024c0] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x000024c8] */ 0x8c827076, 0x10025801, // add r0, r0, r1                ; mov ra1, unif\n+/* [0x000024d0] */ 0x0c6a7c00, 0x100206a7, // add ra_base_next, ra_base_next, r0\n+/* [0x000024d8] */ 0x0c067cc0, 0x14020827, // add r0, ra1.16b, r3\n+/* [0x000024e0] */ 0x119c11c0, 0xd0020827, // shl r0, r0, v_x_shift\n+/* [0x000024e8] */ 0x93067176, 0x12125813, // max r0, r0, r5                ; mov ra_y2_next, ra1.16a\n+/* [0x000024f0] */ 0x9281a1f6, 0x10024813, // min r0, r0, rb_max_x          ; mov rb_base2_next, unif\n+/* [0x000024f8] */ 0x119c31c0, 0xd0021067, // shl rb_xshift2_next, r0, 3\n+/* [0x00002500] */ 0x9481c1f6, 0xd0025810, // and r0, r0, -4                ; mov ra_width_height, unif\n+/* [0x00002508] */ 0x949dc0bf, 0x10024871, // and r1, r0, r2                ; mov vw_setup, rb_vpm_init\n+/* [0x00002510] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00002518] */ 0x4c402077, 0xd4024821, // add r0, r0, r1                ; mul24 r1, ra_width, v_x_mul\n+/* [0x00002520] */ 0x0c9d3e00, 0x100214e7, // add rb_base2_next, rb_base2_next, r0\n+/* [0x00002528] */ 0x8d419e76, 0x12025760, // sub rb_dma1, rb_dma1_base, r1 ; mov r0, ra_height\n+/* [0x00002530] */ 0x8c5dc1c6, 0xdc025460, // add rb_i_tmu, r0, (7-8) - PREREAD ; v8min r0, r0, ra_blk_height\n+/* [0x00002538] */ 0x0c9df1c0, 0xd00214a7, // add rb_lcount, r0, (7-8)\n+/* [0x00002540] */ 0x916481f6, 0xd4024823, // shl r0, r0, v_dma_h_shift     ; mov r3, ra_kmul_add\n+/* [0x00002548] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1\n+/* [0x00002550] */ 0x9164f1f6, 0xd4024822, // shl r0, r0, v_dma_wh_shift    ; mov r2, ra_fir_off_val\n+/* [0x00002558] */ 0x8c81b1f6, 0x100246e0, // add ra_dma0, r0, rb_dma0_base ; mov r0, unif\n+/* [0x00002560] */ 0x918101f6, 0xd00a5816, // shl.ifnn r0, r0, i_shift16    ; mov ra_wt_off_mul_l0, unif\n+/* [0x00002568] */ 0x915031f6, 0xde024205, // shl ra8, r0, 3                ; mov rb5, ra_k255\n+/* [0x00002570] */ 0x01040400, 0xe0020867, // mov r1, 0x01040400\n+/* [0x00002578] */ 0x10227380, 0x1e5200a7, // ror ra2.8b, r1, ra8.8d\n+/* [0x00002580] */ 0x10227380, 0x1c520027, // ror ra0.8b, r1, ra8.8c\n+/* [0x00002588] */ 0x10215f80, 0x1e6200a7, // ror ra2.8c, rb_y_coeffs_2, ra8.8d\n+/* [0x00002590] */ 0x10215f80, 0x1c620027, // ror ra0.8c, rb_y_coeffs_2, ra8.8c\n+/* [0x00002598] */ 0x00010100, 0xe0020867, // mov r1,0x00010100\n+/* [0x000025a0] */ 0x902203bf, 0x1e025812, // ror r0, r1, ra8.8d            ; mov ra_wt_off_mul_l1, unif\n+/* [0x000025a8] */ 0x90205387, 0x1c424004, // ror ra0.8a, r1, ra8.8c        ; v8min rb4, r0, rb5\n+/* [0x000025b0] */ 0x914883f6, 0xd0031856, // shl r1, r1, 8                 ; mov.ifn ra_wt_off_mul_l0, ra_wt_off_mul_l1\n+/* [0x000025b8] */ 0x902203bf, 0x1e02581c, // ror r0, r1, ra8.8d            ; mov ra_dest, unif\n+/* [0x000025c0] */ 0x90205387, 0x1c72404b, // ror ra1.8d, r1, ra8.8c        ; v8min rb11, r0, rb5\n+/* [0x000025c8] */ 0x10216f80, 0x1e7200a7, // ror ra2.8d, rb_y_coeffs_3, ra8.8d\n+/* [0x000025d0] */ 0x10216f80, 0x1c720027, // ror ra0.8d, rb_y_coeffs_3, ra8.8c\n+/* [0x000025d8] */ 0x10217f80, 0x1e5200e7, // ror ra3.8b, rb_y_coeffs_5, ra8.8d\n+/* [0x000025e0] */ 0x10217f80, 0x1c520067, // ror ra1.8b, rb_y_coeffs_5, ra8.8c\n+/* [0x000025e8] */ 0x04040100, 0xe0020867, // mov r1,0x04040100\n+/* [0x000025f0] */ 0x10227380, 0x1e6200e7, // ror ra3.8c, r1, ra8.8d\n+/* [0x000025f8] */ 0x902183bf, 0xdc624065, // ror ra1.8c, r1, ra8.8c        ; mov r5rep, -8\n+/* [0x00002600] */ 0x00000000, 0xf0f7c9e7, // bra -, ra_link\n+/* [0x00002608] */ 0x3a281100, 0xe0020867, // mov r1,0x3a281100\n+/* [0x00002610] */ 0x902203bf, 0x1e02581e, // ror r0, r1, ra8.8d            ; mov ra_link, unif\n+/* [0x00002618] */ 0x90205387, 0x1c424048, // ror ra1.8a, r1, ra8.8c        ; v8min rb8, r0, rb5\n+// ::mc_filter_y10_pxx\n+/* [0x00002620] */ 0xfffffe48, 0xf0f807a7, // brr ra_link, r:per_block_setup_10\n+/* [0x00002628] */ 0x959a0ff6, 0x10024023, // mov ra0, unif                 ; mov r3, elem_num\n+/* [0x00002630] */ 0xec9c3fd2, 0x100269e5, // add.setf -, rb_ef, rb_ef      ; v8subs r5rep, r2, r2\n+/* [0x00002638] */ 0x8c001cff, 0x14024800, // add r0, ra0.16b, r3           ; mov rb_xshift2, rb_xshift2_next\n+/* [0x00002640] */ 0x1158adc0, 0xd4020867, // shl r1, ra_wt_off_l0, i_wt_den_p5\n+/* [0x00002648] */ 0x4c5a7cd6, 0x121245a0, // add ra_wt_mul_l0, ra_wt_mul_l0, r3 ; mul24 r0, r2, ra_wt_mul_l0\n+/* [0x00002650] */ 0x8d9c423f, 0x1042531d, // sub rb_wt_off, r1, r0         ; mov ra_ef.8a, rb4\n+// :1\n+/* [0x00002658] */ 0x4c745dbe, 0x100279c4, // add.setf -, ra_ef, ra_ef      ; mul24 ra4, rb5, ra_ef\n+/* [0x00002660] */ 0x93440dff, 0xd40248a1, // max r2, ra_y, 0               ; mov r1, 0\n+/* [0x00002668] */ 0x9251e5f6, 0x1a0248a3, // min r2, r2, rb_max_y          ; mov r3, ra_k1\n+/* [0x00002670] */ 0x4c450cd7, 0xa4224462, // add ra_y, ra_y, r3            ; mul24 r2, r2, rb_pitch        ; ldtmu0\n+/* [0x00002678] */ 0x8c606cbf, 0x10024e05, // add t0s, ra_base, r2          ; mov rb5,  rb6\n+/* [0x00002680] */ 0x8e5479bf, 0x12024806, // shr r0, r4, ra_xshift         ; mov rb6,  rb7\n+/* [0x00002688] */ 0x93458c47, 0xb20248a0, // max r2, ra_y2, r1             ; v8min r0, r0, rb_pmask        ; ldtmu1\n+/* [0x00002690] */ 0x8e2009f6, 0x10024847, // shr r1, r4, rb_xshift2        ; mov rb7, ra8\n+/* [0x00002698] */ 0x925de5ce, 0x120248a1, // min r2, r2, rb_max_y          ; v8min r1, r1, ra_pmax\n+/* [0x000026a0] */ 0x4c450cd7, 0x12124462, // add ra_y2, ra_y2, r3          ; mul24 r2, r2, rb_pitch\n+/* [0x000026a8] */ 0x8c24feb6, 0x10025f08, // add t1s, rb_base2, r2         ; mov ra8,  ra9\n+/* [0x000026b0] */ 0x4c038af1, 0xd8025962, // add r5rep, r5, r3     ; mul24      r2, ra0.8a << 8,  r1 << 8  @ \"mul_used\", 0\n+/* [0x000026b8] */ 0x5501fff0, 0x180348e2, // mov r3, rb_fir_off_h  ; mul24.ifnn r2, ra0.8a,       r0\n+/* [0x000026c0] */ 0x4d03f6b0, 0xda0248a3, // sub r2, r3, r2        ; mul24      r3, ra0.8b << 1,  r0 << 1  @ \"mul_used\", 0\n+/* [0x000026c8] */ 0x40037031, 0xda0109e3, // nop                   ; mul24.ifn  r3, ra0.8b << 9,  r1 << 9  @ \"mul_used\", 0\n+/* [0x000026d0] */ 0x4c03e4f0, 0xdc0248a3, // add r2, r2, r3        ; mul24      r3, ra0.8c << 2,  r0 << 2  @ \"mul_used\", 0\n+/* [0x000026d8] */ 0x40036031, 0xdc0109e3, // nop                   ; mul24.ifn  r3, ra0.8c << 10, r1 << 10 @ \"mul_used\", 0\n+/* [0x000026e0] */ 0x4d03d4f0, 0xde0248a3, // sub r2, r2, r3        ; mul24      r3, ra0.8d << 3,  r0 << 3  @ \"mul_used\", 0\n+/* [0x000026e8] */ 0x40035031, 0xde0109e3, // nop                   ; mul24.ifn  r3, ra0.8d << 11, r1 << 11 @ \"mul_used\", 0\n+/* [0x000026f0] */ 0x4c07c4f0, 0xd80248a3, // add r2, r2, r3        ; mul24      r3, ra1.8a << 4,  r0 << 4  @ \"mul_used\", 0\n+/* [0x000026f8] */ 0x40074031, 0xd80109e3, // nop                   ; mul24.ifn  r3, ra1.8a << 12, r1 << 12 @ \"mul_used\", 0\n+/* [0x00002700] */ 0x4c07b4f0, 0xda0248a3, // add r2, r2, r3        ; mul24      r3, ra1.8b << 5,  r0 << 5  @ \"mul_used\", 0\n+/* [0x00002708] */ 0x40073031, 0xda0109e3, // nop                   ; mul24.ifn  r3, ra1.8b << 13, r1 << 13 @ \"mul_used\", 0\n+/* [0x00002710] */ 0x4d07a4f0, 0xdc0248a3, // sub r2, r2, r3        ; mul24      r3, ra1.8c << 6,  r0 << 6  @ \"mul_used\", 0\n+/* [0x00002718] */ 0x40072031, 0xdc0109e3, // nop                   ; mul24.ifn  r3, ra1.8c << 14, r1 << 14 @ \"mul_used\", 0\n+/* [0x00002720] */ 0x4c0794f0, 0xde0248a3, // add r2, r2, r3        ; mul24      r3, ra1.8d << 7,  r0 << 7  @ \"mul_used\", 0\n+/* [0x00002728] */ 0x4c071b71, 0xde0329e3, // add.setf -, r5, r5    ; mul24.ifn  r3, ra1.8d << 15, r1 << 15 @ \"mul_used\", 0\n+/* [0x00002730] */ 0xffffff08, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00002738] */ 0x4d0854fe, 0x1a0248a1, // sub r2, r2, r3                ; mul24 r1, rb5,  ra2.8b\n+/* [0x00002740] */ 0x550caffe, 0x1a024260, // mov ra9,  rb10                ; mul24 r0, rb10, ra3.8b\n+/* [0x00002748] */ 0x8f2c25f6, 0xd00242ca, // asr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11\n+/* [0x00002750] */ 0x4d08623e, 0x1c024860, // sub r1, r1, r0                ; mul24 r0, rb6,  ra2.8c\n+/* [0x00002758] */ 0x4d08723e, 0x1e024860, // sub r1, r1, r0                ; mul24 r0, rb7,  ra2.8d\n+/* [0x00002760] */ 0x4c208237, 0x10024860, // add r1, r1, r0                ; mul24 r0, ra8,  rb8\n+/* [0x00002768] */ 0x4c0ca23e, 0x1c024860, // add r1, r1, r0                ; mul24 r0, rb10, ra3.8c\n+/* [0x00002770] */ 0x4c2cb237, 0x10024860, // add r1, r1, r0                ; mul24 r0, ra11, rb11\n+/* [0x00002778] */ 0x8d5d1bf6, 0x1c0269e3, // sub.setf -, r5, rb_i_tmu      ; mov r3, ra_blk_height\n+/* [0x00002780] */ 0x8d1133bf, 0x1002884f, // sub r1, r1, ra4               ; mov.ifz rb_base2, rb_base2_next\n+/* [0x00002788] */ 0x8d6a7236, 0x10029858, // sub r1, r1, r0                ; mov.ifz ra_base, ra_base_next\n+/* [0x00002790] */ 0x8f4c63f6, 0xd0029851, // asr r1, r1, 6                 ; mov.ifz ra_y_y2, ra_y_y2_next\n+/* [0x00002798] */ 0x4d592bce, 0x120269e0, // sub.setf -, r5, rb_lcount     ; mul24 r0, r1, ra_wt_mul_l0\n+/* [0x000027a0] */ 0x4c64c1ce, 0x14024821, // add r0, r0, rb_wt_off         ; mul24 r1, r1, ra_kmul_add\n+/* [0x000027a8] */ 0xed427073, 0x12024860, // sub r1, r0, r1                ; v8subs r0, ra_height, r3\n+/* [0x000027b0] */ 0xfffffe88, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x000027b8] */ 0x0f9cb3c0, 0xd0020867, // asr r1, r1, i_wt_den_p6\n+/* [0x000027c0] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax           ; mov -, vw_wait\n+/* [0x000027c8] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch\n+/* [0x000027d0] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0        ; mov vw_setup, ra_dma0\n+/* [0x000027d8] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link\n+/* [0x000027e0] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3                ; mov vw_setup, rb_dma1\n+/* [0x000027e8] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3                ; mov vw_addr, ra_dest\n+/* [0x000027f0] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23\n+/* [0x000027f8] */ 0xfffffe40, 0xf0f809e7, // brr -, r:1b\n+/* [0x00002800] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0\n+/* [0x00002808] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1\n+/* [0x00002810] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init\n+// ::mc_filter_y10_p00\n+/* [0x00002818] */ 0x959a0ff6, 0x10024020, // mov ra0, unif                 ; mov r0, elem_num\n+/* [0x00002820] */ 0xf5567dad, 0x14124565, // mov ra_xshift, ra_xshift_next ; v8subs r5rep, r5, r5\n+/* [0x00002828] */ 0x8c020c3f, 0x1402581a, // add r0, ra0.16b, r0           ; mov ra_base_next, unif\n+/* [0x00002830] */ 0x119c11c0, 0xd0020827, // shl r0, r0, v_x_shift\n+/* [0x00002838] */ 0x93027176, 0x12225813, // max r0, r0, r5                ; mov ra_y_next, ra0.16a\n+/* [0x00002840] */ 0x9281a1f6, 0x10025810, // min r0, r0, rb_max_x          ; mov ra_width_height, unif\n+/* [0x00002848] */ 0x119c31c0, 0xd0220567, // shl ra_xshift_next, r0, 3\n+/* [0x00002850] */ 0x149dc1c0, 0xd0020827, // and r0, r0, -4\n+/* [0x00002858] */ 0x8d810bf6, 0x10025896, // sub r2, r5, rb_pitch          ; mov ra_wt_off_mul_l0, unif\n+/* [0x00002860] */ 0x149e7080, 0x10020867, // and r1, r0, r2\n+/* [0x00002868] */ 0x569d404f, 0x10024821, // xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+/* [0x00002870] */ 0x8c827076, 0x1002581c, // add r0, r0, r1                ; mov ra_dest, unif\n+/* [0x00002878] */ 0x8c69cc3f, 0x100246b1, // add ra_base_next, ra_base_next, r0 ; mov vw_setup, rb_vpm_init\n+/* [0x00002880] */ 0x11401dc0, 0xd4020867, // shl r1, ra_width, v_x_shift\n+/* [0x00002888] */ 0x8d419e76, 0x12025760, // sub rb_dma1, rb_dma1_base, r1 ; mov r0, ra_height\n+/* [0x00002890] */ 0x8d5c31c6, 0xdc025460, // sub rb_i_tmu, r0, PREREAD     ; v8min r0, r0, ra_blk_height\n+/* [0x00002898] */ 0x919c81c0, 0xd0024812, // shl r0, r0, v_dma_h_shift     ; mov rb_lcount, r0\n+/* [0x000028a0] */ 0x0c9e7040, 0x10020827, // add r0, r0, r1\n+/* [0x000028a8] */ 0x1158edc0, 0xd4021327, // shl rb_wt_off, ra_wt_off_l0, DENOM + 7\n+/* [0x000028b0] */ 0x9180f1f6, 0xd002581e, // shl r0, r0, v_dma_wh_shift    ; mov ra_link, unif\n+/* [0x000028b8] */ 0x0c9db1c0, 0x100206e7, // add ra_dma0, r0, rb_dma0_base\n+// :1\n+/* [0x000028c0] */ 0xcd511bee, 0x1a0269e5, // sub.setf -, r5, rb_i_tmu      ; v8adds r5rep, r5, ra_k1\n+/* [0x000028c8] */ 0x804e7036, 0xa42099d1, // nop                           ; mov.ifz ra_y, ra_y_next       ; ldtmu0\n+/* [0x000028d0] */ 0x8e5509bf, 0x12024823, // shr r0, r4, ra_xshift         ; mov r3, rb_pitch\n+/* [0x000028d8] */ 0x13440dc0, 0xd40208a7, // max r2, ra_y, 0\n+/* [0x000028e0] */ 0x9269e5f6, 0x10029898, // min r2, r2, rb_max_y          ; mov.ifz ra_base, ra_base_next\n+/* [0x000028e8] */ 0x4c441dd3, 0xd4224462, // add ra_y, ra_y, 1             ; mul24 r2, r2, r3\n+/* [0x000028f0] */ 0x8c618c87, 0x10024e20, // add t0s, ra_base, r2          ; v8min r0, r0, rb_pmask\n+/* [0x000028f8] */ 0x4d592bc6, 0x120269e1, // sub.setf -, r5, rb_lcount     ; mul24 r1, r0, ra_wt_mul_l0\n+/* [0x00002900] */ 0x915c83f6, 0xdc024863, // shl r1, r1, 8                 ; mov r3, ra_blk_height\n+/* [0x00002908] */ 0xec40c3f3, 0x12024860, // add r1, r1, rb_wt_off         ; v8subs r0, ra_height, r3\n+/* [0x00002910] */ 0xffffff90, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00002918] */ 0x0f9cf3c0, 0xd0020867, // asr r1, r1, DENOM + 8\n+/* [0x00002920] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax           ; mov -, vw_wait\n+/* [0x00002928] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch\n+/* [0x00002930] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0 ; mov vw_setup, ra_dma0\n+/* [0x00002938] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link\n+/* [0x00002940] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3        ; mov vw_setup, rb_dma1\n+/* [0x00002948] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3        ; mov vw_addr, ra_dest\n+/* [0x00002950] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23\n+/* [0x00002958] */ 0xffffff48, 0xf0f809e7, // brr -, r:1b\n+/* [0x00002960] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0\n+/* [0x00002968] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1\n+/* [0x00002970] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init\n+// ::mc_filter_y10_bxx\n+/* [0x00002978] */ 0xfffffaf0, 0xf0f807a7, // brr ra_link, r:per_block_setup_10\n+/* [0x00002980] */ 0x959a0ff6, 0x10024023, // mov ra0, unif                 ; mov r3, elem_num\n+/* [0x00002988] */ 0xec9c3fd2, 0x100269e5, // add.setf -, rb_ef, rb_ef      ; v8subs r5rep, r2, r2\n+/* [0x00002990] */ 0x8c001cff, 0x14024800, // add r0, ra0.16b, r3           ; mov rb_xshift2, rb_xshift2_next\n+/* [0x00002998] */ 0x1158bdc0, 0xd4020867, // shl r1, ra_wt_off_l0, i_wt_den_p6\n+/* [0x000029a0] */ 0x4c5a7cd6, 0x121245a0, // add ra_wt_mul_l0, ra_wt_mul_l0, r3 ; mul24 r0, r2, ra_wt_mul_l0\n+/* [0x000029a8] */ 0x4d4a7216, 0x12024860, // sub r1, r1, r0                ; mul24 r0, r2, ra_wt_mul_l1\n+/* [0x000029b0] */ 0x8d9c423f, 0x1042531d, // sub rb_wt_off, r1, r0         ; mov ra_ef.8a, rb4\n+// :1\n+/* [0x000029b8] */ 0x4c745dbe, 0x100279c4, // add.setf -, ra_ef, ra_ef      ; mul24 ra4, rb5, ra_ef\n+/* [0x000029c0] */ 0x93440dff, 0xd40248a1, // max r2, ra_y, 0               ; mov r1, 0\n+/* [0x000029c8] */ 0x9251e5f6, 0x1a0248a3, // min r2, r2, rb_max_y          ; mov r3, ra_k1\n+/* [0x000029d0] */ 0x4c450cd7, 0xa4224462, // add ra_y, ra_y, r3            ; mul24 r2, r2, rb_pitch        ; ldtmu0\n+/* [0x000029d8] */ 0x8c606cbf, 0x10024e05, // add t0s, ra_base, r2          ; mov rb5,  rb6\n+/* [0x000029e0] */ 0x8e5479bf, 0x12024806, // shr r0, r4, ra_xshift         ; mov rb6,  rb7\n+/* [0x000029e8] */ 0x93458c47, 0xb20248a0, // max r2, ra_y2, r1             ; v8min r0, r0, rb_pmask        ; ldtmu1\n+/* [0x000029f0] */ 0x8e2009f6, 0x10024847, // shr r1, r4, rb_xshift2        ; mov rb7, ra8\n+/* [0x000029f8] */ 0x925de5ce, 0x120248a1, // min r2, r2, rb_max_y          ; v8min r1, r1, ra_pmax\n+/* [0x00002a00] */ 0x4c450cd7, 0x12124462, // add ra_y2, ra_y2, r3          ; mul24 r2, r2, rb_pitch\n+/* [0x00002a08] */ 0x8c24feb6, 0x10025f08, // add t1s, rb_base2, r2         ; mov ra8,  ra9\n+/* [0x00002a10] */ 0x4c038af1, 0xd8025962, // add r5rep, r5, r3     ; mul24      r2, ra0.8a << 8,  r1 << 8  @ \"mul_used\", 0\n+/* [0x00002a18] */ 0x5501fff0, 0x180348e2, // mov r3, rb_fir_off_h  ; mul24.ifnn r2, ra0.8a,       r0\n+/* [0x00002a20] */ 0x4d03f6b0, 0xda0248a3, // sub r2, r3, r2        ; mul24      r3, ra0.8b << 1,  r0 << 1  @ \"mul_used\", 0\n+/* [0x00002a28] */ 0x40037031, 0xda0109e3, // nop                   ; mul24.ifn  r3, ra0.8b << 9,  r1 << 9  @ \"mul_used\", 0\n+/* [0x00002a30] */ 0x4c03e4f0, 0xdc0248a3, // add r2, r2, r3        ; mul24      r3, ra0.8c << 2,  r0 << 2  @ \"mul_used\", 0\n+/* [0x00002a38] */ 0x40036031, 0xdc0109e3, // nop                   ; mul24.ifn  r3, ra0.8c << 10, r1 << 10 @ \"mul_used\", 0\n+/* [0x00002a40] */ 0x4d03d4f0, 0xde0248a3, // sub r2, r2, r3        ; mul24      r3, ra0.8d << 3,  r0 << 3  @ \"mul_used\", 0\n+/* [0x00002a48] */ 0x40035031, 0xde0109e3, // nop                   ; mul24.ifn  r3, ra0.8d << 11, r1 << 11 @ \"mul_used\", 0\n+/* [0x00002a50] */ 0x4c07c4f0, 0xd80248a3, // add r2, r2, r3        ; mul24      r3, ra1.8a << 4,  r0 << 4  @ \"mul_used\", 0\n+/* [0x00002a58] */ 0x40074031, 0xd80109e3, // nop                   ; mul24.ifn  r3, ra1.8a << 12, r1 << 12 @ \"mul_used\", 0\n+/* [0x00002a60] */ 0x4c07b4f0, 0xda0248a3, // add r2, r2, r3        ; mul24      r3, ra1.8b << 5,  r0 << 5  @ \"mul_used\", 0\n+/* [0x00002a68] */ 0x40073031, 0xda0109e3, // nop                   ; mul24.ifn  r3, ra1.8b << 13, r1 << 13 @ \"mul_used\", 0\n+/* [0x00002a70] */ 0x4d07a4f0, 0xdc0248a3, // sub r2, r2, r3        ; mul24      r3, ra1.8c << 6,  r0 << 6  @ \"mul_used\", 0\n+/* [0x00002a78] */ 0x40072031, 0xdc0109e3, // nop                   ; mul24.ifn  r3, ra1.8c << 14, r1 << 14 @ \"mul_used\", 0\n+/* [0x00002a80] */ 0x4c0794f0, 0xde0248a3, // add r2, r2, r3        ; mul24      r3, ra1.8d << 7,  r0 << 7  @ \"mul_used\", 0\n+/* [0x00002a88] */ 0x4c071b71, 0xde0329e3, // add.setf -, r5, r5    ; mul24.ifn  r3, ra1.8d << 15, r1 << 15 @ \"mul_used\", 0\n+/* [0x00002a90] */ 0xffffff08, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00002a98] */ 0x4d0854fe, 0x1a0248a1, // sub r2, r2, r3                ; mul24 r1, rb5,  ra2.8b\n+/* [0x00002aa0] */ 0x550caffe, 0x1a024260, // mov ra9,  rb10                ; mul24 r0, rb10, ra3.8b\n+/* [0x00002aa8] */ 0x8f2c25f6, 0xd00242ca, // asr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11\n+/* [0x00002ab0] */ 0x4d08623e, 0x1c024860, // sub r1, r1, r0                ; mul24 r0, rb6,  ra2.8c\n+/* [0x00002ab8] */ 0x4d08723e, 0x1e024860, // sub r1, r1, r0                ; mul24 r0, rb7,  ra2.8d\n+/* [0x00002ac0] */ 0x4c208237, 0x10024860, // add r1, r1, r0                ; mul24 r0, ra8,  rb8\n+/* [0x00002ac8] */ 0x4c0ca23e, 0x1c024860, // add r1, r1, r0                ; mul24 r0, rb10, ra3.8c\n+/* [0x00002ad0] */ 0x4c2cb237, 0x10024860, // add r1, r1, r0                ; mul24 r0, ra11, rb11\n+/* [0x00002ad8] */ 0x0d127380, 0x10020867, // sub r1, r1, ra4\n+/* [0x00002ae0] */ 0x8d9cc23f, 0x10024862, // sub r1, r1, r0                ; mov r2, rb_wt_off\n+/* [0x00002ae8] */ 0x0f9c63c0, 0xd0020867, // asr r1, r1, 6\n+/* [0x00002af0] */ 0x4d591bce, 0x120269e0, // sub.setf -, r5, rb_i_tmu      ; mul24 r0, r1, ra_wt_mul_l0\n+/* [0x00002af8] */ 0x55653fce, 0x140453e1, // mov.ifz rb_base2, rb_base2_next ; mul24 r1, r1, ra_kmul_add\n+/* [0x00002b00] */ 0x8d4e7076, 0x10029851, // sub r1, r0, r1                ; mov.ifz ra_y_y2, ra_y_y2_next\n+/* [0x00002b08] */ 0x8d692bf6, 0x1002b9d8, // sub.setf -, r5, rb_lcount     ; mov.ifz ra_base, ra_base_next\n+/* [0x00002b10] */ 0x8c9f8289, 0xd0024860, // add r1, r1, r2                ; mov r0, r1 << 8\n+/* [0x00002b18] */ 0x8c5e7236, 0x1c024863, // add r1, r1, r0                ; mov r3, ra_blk_height\n+/* [0x00002b20] */ 0xfffffe78, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00002b28] */ 0x4f65039f, 0x18024862, // asr r1, r1, ra_wt_den_p7      ; mul24 r2, r3, rb_pitch\n+/* [0x00002b30] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax           ; mov -, vw_wait\n+/* [0x00002b38] */ 0xf34003f3, 0xd2024c20, // max vpm, r1, 0                ; v8subs r0, ra_height, r3\n+/* [0x00002b40] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0        ; mov vw_setup, ra_dma0\n+/* [0x00002b48] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link\n+/* [0x00002b50] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3                ; mov vw_setup, rb_dma1\n+/* [0x00002b58] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3                ; mov vw_addr, ra_dest\n+/* [0x00002b60] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23\n+/* [0x00002b68] */ 0xfffffe30, 0xf0f809e7, // brr -, r:1b\n+/* [0x00002b70] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0\n+/* [0x00002b78] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1\n+/* [0x00002b80] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init\n+// ::mc_filter_y10_b00\n+/* [0x00002b88] */ 0xfffff8e0, 0xf0f807a7, // brr ra_link, r:per_block_setup_10\n+/* [0x00002b90] */ 0x959a0ff6, 0x10024023, // mov ra0, unif                 ; mov r3, elem_num\n+/* [0x00002b98] */ 0xec9c3fd2, 0x100269e5, // add.setf -, rb_ef, rb_ef      ; v8subs r5rep, r2, r2\n+/* [0x00002ba0] */ 0x8c001cff, 0x14024800, // add r0, ra0.16b, r3           ; mov rb_xshift2, rb_xshift2_next\n+/* [0x00002ba8] */ 0x00000001, 0xe00208a7, // mov r2, 1\n+/* [0x00002bb0] */ 0x8c591eb6, 0x10025461, // add rb_i_tmu, rb_i_tmu, r2    ; mov r1, ra_wt_off_mul_l0\n+/* [0x00002bb8] */ 0xf158fded, 0xd4025325, // shl rb_wt_off, ra_wt_off_l0, DENOM + 8 ; v8subs r5quad, r5, r5\n+/* [0x00002bc0] */ 0x809f8009, 0xd000d9d6, // nop                           ; mov.ifnz ra_wt_off_mul_l0, r1 << 8\n+// :1\n+/* [0x00002bc8] */ 0x0d9d1bc0, 0xb00229e7, // sub.setf -, r5, rb_i_tmu      ; nop                           ; ldtmu1\n+/* [0x00002bd0] */ 0x8e4c09f6, 0xa0029851, // shr r1, r4, rb_xshift2        ; mov.ifz ra_y_y2, ra_y_y2_next ; ldtmu0\n+/* [0x00002bd8] */ 0x8e5509bf, 0x12024823, // shr r0, r4, ra_xshift         ; mov r3, rb_pitch\n+/* [0x00002be0] */ 0x13440dc0, 0xd40208a7, // max r2, ra_y, 0\n+/* [0x00002be8] */ 0x9269e5f6, 0x10029898, // min r2, r2, rb_max_y          ; mov.ifz ra_base, ra_base_next\n+/* [0x00002bf0] */ 0x4c441dd3, 0xd4224462, // add ra_y, ra_y, 1             ; mul24 r2, r2, r3\n+/* [0x00002bf8] */ 0x8c613cbf, 0x10028e0f, // add t0s, ra_base, r2          ; mov.ifz rb_base2, rb_base2_next\n+/* [0x00002c00] */ 0x13440dc0, 0xd20208a7, // max r2, ra_y2, 0\n+/* [0x00002c08] */ 0x129de5c0, 0x100208a7, // min r2, r2, rb_max_y\n+/* [0x00002c10] */ 0x4c441dd3, 0xd2124462, // add ra_y2, ra_y2, 1           ; mul24 r2, r2, r3\n+/* [0x00002c18] */ 0x8c5cfe86, 0x12024f20, // add t1s, rb_base2, r2         ; v8min r0, r0, ra_pmax\n+/* [0x00002c20] */ 0x545983c6, 0x12024860, // and r1, r1, rb_pmask          ; mul24 r0, r0, ra_wt_mul_l0\n+/* [0x00002c28] */ 0x4d492bce, 0x120269e1, // sub.setf -, r5, rb_lcount     ; mul24 r1, r1, ra_wt_mul_l1\n+/* [0x00002c30] */ 0xcc52706e, 0x1a024865, // add r1, r0, r1                ; v8adds r5rep, r5, ra_k1\n+/* [0x00002c38] */ 0x915c83f6, 0xdc024863, // shl r1, r1, 8                 ; mov r3, ra_blk_height\n+/* [0x00002c40] */ 0xec40c3f3, 0x12024860, // add r1, r1, rb_wt_off         ; v8subs r0, ra_height, r3\n+/* [0x00002c48] */ 0xffffff60, 0xf06809e7, // brr.anyn -, r:1b\n+/* [0x00002c50] */ 0x0f9d03c0, 0xd0020867, // asr r1, r1, (DENOM + 9) - 32\n+/* [0x00002c58] */ 0x925f23bf, 0x12020867, // min r1, r1, ra_pmax           ; mov -, vw_wait\n+/* [0x00002c60] */ 0x5351039f, 0x18024c22, // max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch\n+/* [0x00002c68] */ 0x956e7036, 0x10126431, // mov.setf ra_height, r0        ; mov vw_setup, ra_dma0\n+/* [0x00002c70] */ 0x00000000, 0xf027c9e7, // bra.anyz -, ra_link\n+/* [0x00002c78] */ 0x929dd0ff, 0x10024831, // min r0, r0, r3                ; mov vw_setup, rb_dma1\n+/* [0x00002c80] */ 0x8d7270f6, 0x10024872, // sub r1, r0, r3                ; mov vw_addr, ra_dest\n+/* [0x00002c88] */ 0x119d73c0, 0xd0020867, // shl r1, r1, i_shift23\n+/* [0x00002c90] */ 0xffffff18, 0xf0f809e7, // brr -, r:1b\n+/* [0x00002c98] */ 0x0c9d2e00, 0x100214a7, // add rb_lcount, rb_lcount, r0\n+/* [0x00002ca0] */ 0x0c6e7c40, 0x100206e7, // add ra_dma0, ra_dma0, r1\n+/* [0x00002ca8] */ 0x8c71ccbf, 0x10024731, // add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init\n+// ::mc_end\n+};\n+#ifdef __HIGHC__\n+#pragma Align_to(8, ff_hevc_rpi_shader)\n+#endif\ndiff --git a/libavcodec/rpi_hevc_shader.h b/libavcodec/rpi_hevc_shader.h\nnew file mode 100644\nindex 0000000000..79651c9b6c\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_shader.h\n@@ -0,0 +1,63 @@\n+#ifndef rpi_hevc_shader_H\n+#define rpi_hevc_shader_H\n+\n+extern unsigned int ff_hevc_rpi_shader[];\n+\n+#define mc_setup_c_q0 (ff_hevc_rpi_shader + 0)\n+#define mc_start (ff_hevc_rpi_shader + 0)\n+#define mc_setup_c_qn (ff_hevc_rpi_shader + 2)\n+#define mc_filter_c_p (ff_hevc_rpi_shader + 134)\n+#define mc_filter_c_p_l1 (ff_hevc_rpi_shader + 260)\n+#define mc_filter_c_b (ff_hevc_rpi_shader + 386)\n+#define mc_sync_q0 (ff_hevc_rpi_shader + 580)\n+#define mc_sync_q1 (ff_hevc_rpi_shader + 598)\n+#define mc_sync_q2 (ff_hevc_rpi_shader + 610)\n+#define mc_sync_q3 (ff_hevc_rpi_shader + 622)\n+#define mc_sync_q4 (ff_hevc_rpi_shader + 634)\n+#define mc_sync_q5 (ff_hevc_rpi_shader + 652)\n+#define mc_sync_q6 (ff_hevc_rpi_shader + 664)\n+#define mc_sync_q7 (ff_hevc_rpi_shader + 676)\n+#define mc_sync_q8 (ff_hevc_rpi_shader + 688)\n+#define mc_sync_q9 (ff_hevc_rpi_shader + 706)\n+#define mc_sync_q10 (ff_hevc_rpi_shader + 718)\n+#define mc_sync_q11 (ff_hevc_rpi_shader + 730)\n+#define mc_exit_c_qn (ff_hevc_rpi_shader + 742)\n+#define mc_exit_y_qn (ff_hevc_rpi_shader + 742)\n+#define mc_exit_c_q0 (ff_hevc_rpi_shader + 760)\n+#define mc_exit_y_q0 (ff_hevc_rpi_shader + 760)\n+#define mc_setup_y_q0 (ff_hevc_rpi_shader + 780)\n+#define mc_setup_y_qn (ff_hevc_rpi_shader + 782)\n+#define mc_filter_y_pxx (ff_hevc_rpi_shader + 1014)\n+#define mc_filter_y_bxx (ff_hevc_rpi_shader + 1140)\n+#define mc_filter_y_p00 (ff_hevc_rpi_shader + 1272)\n+#define mc_filter_y_b00 (ff_hevc_rpi_shader + 1358)\n+#define mc_setup_c10_q0 (ff_hevc_rpi_shader + 1432)\n+#define mc_setup_c10_qn (ff_hevc_rpi_shader + 1434)\n+#define mc_filter_c10_p (ff_hevc_rpi_shader + 1562)\n+#define mc_filter_c10_p_l1 (ff_hevc_rpi_shader + 1684)\n+#define mc_filter_c10_b (ff_hevc_rpi_shader + 1806)\n+#define mc_sync10_q0 (ff_hevc_rpi_shader + 1996)\n+#define mc_sync10_q1 (ff_hevc_rpi_shader + 2014)\n+#define mc_sync10_q2 (ff_hevc_rpi_shader + 2026)\n+#define mc_sync10_q3 (ff_hevc_rpi_shader + 2038)\n+#define mc_sync10_q4 (ff_hevc_rpi_shader + 2050)\n+#define mc_sync10_q5 (ff_hevc_rpi_shader + 2068)\n+#define mc_sync10_q6 (ff_hevc_rpi_shader + 2080)\n+#define mc_sync10_q7 (ff_hevc_rpi_shader + 2092)\n+#define mc_sync10_q8 (ff_hevc_rpi_shader + 2104)\n+#define mc_sync10_q9 (ff_hevc_rpi_shader + 2122)\n+#define mc_sync10_q10 (ff_hevc_rpi_shader + 2134)\n+#define mc_sync10_q11 (ff_hevc_rpi_shader + 2146)\n+#define mc_exit_c10_q0 (ff_hevc_rpi_shader + 2158)\n+#define mc_exit_y10_q0 (ff_hevc_rpi_shader + 2158)\n+#define mc_exit_c10_qn (ff_hevc_rpi_shader + 2178)\n+#define mc_exit_y10_qn (ff_hevc_rpi_shader + 2178)\n+#define mc_setup_y10_q0 (ff_hevc_rpi_shader + 2196)\n+#define mc_setup_y10_qn (ff_hevc_rpi_shader + 2198)\n+#define mc_filter_y10_pxx (ff_hevc_rpi_shader + 2440)\n+#define mc_filter_y10_p00 (ff_hevc_rpi_shader + 2566)\n+#define mc_filter_y10_bxx (ff_hevc_rpi_shader + 2654)\n+#define mc_filter_y10_b00 (ff_hevc_rpi_shader + 2786)\n+#define mc_end (ff_hevc_rpi_shader + 2860)\n+\n+#endif\ndiff --git a/libavcodec/rpi_hevc_shader.qasm b/libavcodec/rpi_hevc_shader.qasm\nnew file mode 100644\nindex 0000000000..af5b59e181\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_shader.qasm\n@@ -0,0 +1,1850 @@\n+# Copyright (c) 2017 Raspberry Pi (Trading) Ltd.\n+# All rights reserved.\n+#\n+# Redistribution and use in source and binary forms, with or without\n+# modification, are permitted provided that the following conditions are met:\n+#     * Redistributions of source code must retain the above copyright\n+#       notice, this list of conditions and the following disclaimer.\n+#     * Redistributions in binary form must reproduce the above copyright\n+#       notice, this list of conditions and the following disclaimer in the\n+#       documentation and/or other materials provided with the distribution.\n+#     * Neither the name of the copyright holder nor the\n+#       names of its contributors may be used to endorse or promote products\n+#       derived from this software without specific prior written permission.\n+#\n+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+#\n+# Written by Peter de Rivaz, John Cox\n+\n+\n+\n+# Inter pred asm\n+#\n+# Logic here should be good to 14 bits without modification\n+# but only 8 & 10 are currently instantiated & tested\n+# 15 & 16 bits have different shift1, shift2 calc & I also suspect overflow\n+# in _p00 & _b00\n+\n+# The @ \"mul_used\", 0 annotations that occur by various mul blocks suppress\n+# the warning that we are using rotation & ra/rb registers. r0..3 can be\n+# rotated through all 16 elems ra regs can only be rotated through their\n+# local 4.  As it happens this is what is wanted here as we do not want the\n+# constants from the other half of the calc.\n+\n+# Number limits in P/B calculation\n+#\n+# In order to avoid issues with mul24 being an unsigned 24->32 bit multiplier\n+# we offset our intermediates s.t. they always end up +ve before the next\n+# multiply (may be -ve whilst summing but that doesn't matter).\n+#\n+# Range calc for up to 14 bits (Y-B pred):\n+#\n+# denom: [0, 7]\n+# bmax = (1 << bits) - 1\n+# off: [-(1 << (bits-1)), (1 << (bits-1)) - 1]\n+#\n+# wt_mul: [-128, 255]\n+# wt_off = off * 2 + 1: [-bmax, bmax]\n+#\n+# pel: [0, bmax]\n+# H-filter: [(-22*pel + 88*pel) >> (bits-8) + 0x4000] = [0x2a00, 0x97ff]\n+# V-filter: [(-22*hf + 88*hf) >> 6] = [0x580, 0xc28e]\n+# mul_t = (V_L0 + V_l1) * (wt_mul + 128): [0, 0x24624e6]\n+# mul_t - (V_l0 + V_l1)* 128: [-0xc28e00, 0x18396e4]\n+# adj_wt_off = (wt_off << ((denom + 6) - (bits - 8))) - 0x4000 * (wt_mul * 2):\n+#  [wt_off << (21 - bits)] - [wt_mul << 15] = [-0x1fffff, 0x1fffff] - [-0x400000, 0x7f8000]\n+#\n+# This all looks good and is mostly bit depth independant - and as we manage\n+# to do unsigned multiplies everywhere (now) this should be good for any bit\n+# depth up to 14 (we could probably do 16 - but that requires a few tweaks\n+# to the shifts we don't currently have logic for)\n+\n+# PREREAD is the number of requests that we have sitting in the TMU request\n+# queue.\n+#\n+# There are 8 slots availible in the TMU request Q for tm0s requests, but\n+# only 4 output FIFO entries and overflow is bad (corruption or crash)\n+# (If threaded then only 2 out FIFO entries, but we aren't.)\n+# In s/w we are effectively limited to the min vertical read which is >= 4\n+# so output FIFO is the limit.\n+#\n+# As the test for read-next is is the main part of the Luma loop (rather than\n+# the preload FIFO part) we are limited to min_luma_height - 1\n+# Min_luma_height is 4 so we can only have a preload of 3\n+# Beware that min_chroma_height (and_width) is 2 so we can't do the same trick\n+# in chroma without abandoning preload pretty much entirely (which would be bad)\n+#\n+# Timing tests vs preload of 4 suggests this doesn't hurt us much\n+# Could have preread 4 for Chroma but when tested it didn't help\n+\n+.set PREREAD,                      3\n+\n+# Offset added (effectively) at the exit of the H FIR filter\n+# This is enough to force the result +ve\n+# Is good if it is a power of 2 as that allows for >> without loss\n+#\n+# Worst case for a single Y FIR is *-22 so we need an offset of 256*22\n+# But we need twice offset to survive both H & V = 256*22*2 = 0x2c00\n+# Round up to next power of 2\n+\n+.set FIR_OFFSET,                   0x4000\n+\n+# Block heights - 8 & 16 are the only numbers we currently support\n+\n+.set C_BLK_HEIGHT_8,               16\n+.set C_BLK_HEIGHT_16,              8\n+.set Y_BLK_HEIGHT_8,               16\n+.set Y_BLK_HEIGHT_16,              8\n+\n+# QPU counts - depend on block size\n+# If we have a 2-byte format & block_size > 8 then can only afford\n+# 8 QPUs\n+# These numbers must match the numbers in ff_hevc_rpi_shader_cmd.h\n+\n+.set N_QPU_8,                      12\n+.set N_QPU_16,                     12\n+\n+# Value to add to the weight multiplier to convert it into an unsigned value\n+# Should be power of two for convienience\n+\n+.set LOG2_MUL_ADD,                 14\n+.set MUL_ADD,                      (1 << LOG2_MUL_ADD)\n+\n+# Fixed denom (max that it can be set to)\n+.set DENOM,                        7\n+\n+# register allocation\n+#\n+\n+# ra0-3\n+# Used as temp and may be loop filter coeffs (split into .8s)\n+# or temp in loop. Check usage on an individual basis.\n+\n+# ra4-11\n+# V FIFO / temp / free\n+\n+# -- free --                       ra12\n+\n+# -- free --                       ra13\n+\n+# -- free --                       ra14\n+\n+# -- free --                       ra15\n+\n+# uniform: width:height\n+.set ra_width_height,              ra16\n+.set ra_width,                     ra16.16b\n+.set ra_height,                    ra16.16a\n+\n+# y:y2 same layout as y_y2_next so we can update both together\n+.set ra_y_y2,                      ra17\n+.set ra_y2,                        ra17.16a\n+.set ra_y,                         ra17.16b\n+\n+# uniform: L1 weight (U on left, V on right)\n+# Only used in Y B\n+.set ra_wt_off_mul_l1,             ra18\n+.set ra_wt_off_l1,                 ra18.16b\n+.set ra_wt_mul_l1,                 ra18.16a\n+\n+# y_next:y2_next same layout as y_y2 so we can update both together\n+.set ra_y_y2_next,                 ra19\n+.set ra_y_next,                    ra19.16b\n+.set ra_y2_next,                   ra19.16a\n+\n+# Setup: consts - subdivide a single register\n+.set ra_kff800100,                 ra20\n+.set ra_k256,                      ra20.16a\n+.set ra_k0,                        ra20.8a\n+.set ra_k1,                        ra20.8b\n+.set ra_k128,                      ra20.8c\n+.set ra_k255,                      ra20.8d\n+\n+# Loop: xshifts\n+.set ra_xshift,                    ra21.16a\n+.set ra_xshift_next,               ra21.16b\n+\n+# Loop var: L0 weight (U on left, V on right)\n+# _off_ is not used in loop as we want to modify it before use\n+.set ra_wt_off_mul_l0,             ra22\n+.set ra_wt_mul_l0,                 ra22.16a\n+.set ra_wt_off_l0,                 ra22.16b\n+\n+# Max pel value (for 8 bit we can get away with sat ops but not 9+)\n+# * Could merge with rb_pmask. For 10 bit Logically pmask needs 0xff in the\n+#   2nd byte   but as the source should never be > 3 there 0x3ff should do\n+.set ra_blk_height_pmax,           ra23\n+.set ra_pmax,                      ra23.16a\n+.set ra_blk_height,                ra23.8c\n+# --free --                        ra23.8d\n+\n+# Loop:  src frame base (L0)\n+.set ra_base,                      ra24\n+\n+# Misc  offsets\n+.set ra_fir_off_val_wt_den_p7,     ra25\n+.set ra_wt_den_p7,                 ra25.8a\n+# -- free --                       ra25.8b\n+.set ra_fir_off_val,               ra25.16b\n+\n+# As it happens these constants are the same\n+.if FIR_OFFSET == MUL_ADD\n+# Weight multiplier unsigned add\n+.set ra_kmul_add,                  ra_fir_off_val\n+.else\n+.error \"FIR_OFFSET != MUL_ADD: Need new register & init\"\n+.endif\n+\n+# Loop: next src frame base (L0)\n+.set ra_base_next,                 ra26\n+\n+# Loop: height<<23 + width<<16 + vdw_setup_0\n+.set ra_dma0,                      ra27\n+\n+# Loop: destination address\n+.set ra_dest,                      ra28\n+\n+# Setup: Dup of rb_ef\n+# Lo bits are used as Y coeff 0 as that lefts us combine test & coeff mul\n+# (top bits are ignored by mul24)\n+.set ra_ef,                        ra29\n+\n+# Use an even numbered register as a link register to avoid corrupting flags\n+.set ra_link,                      ra30\n+\n+# -- free --                       ra31\n+\n+.set rb_xshift2,                   rb0\n+.set rb_xshift2_next,              rb1\n+\n+# C:  (elem & 1) == 0 ? elem * 2 : (elem + 4) * 2\n+.set rb_elem_x,                    rb2\n+\n+# El Flags\n+# After adding to self we to have el even/odd on nc/c and lo/hi on nn/n\n+# Duped into ra_ef as sometimes that is easier to use\n+.set rb_ef,                        rb3\n+\n+# rb4-11\n+# Loop: V filter FIFO or V filter coeff\n+\n+# Loop var: offset to add before shift (round + weighting offsets)\n+# Exact value varies by loop\n+.set rb_wt_off,                    rb12\n+\n+# -- free --                       rb13\n+\n+# -- free --                       rb14\n+\n+# Loop: src frame base (L1)\n+.set rb_base2,                     rb15\n+\n+# Line pitch (128 for sand128)\n+.set rb_pitch,                     rb16\n+\n+# Loop count - 2 (set up TMU for next xfer)\n+.set rb_i_tmu,                     rb17\n+\n+# Loop count for min(height, 16)\n+# Y will reset & loop again if height > 16\n+.set rb_lcount,                    rb18\n+\n+# frame_base2_next\n+.set rb_base2_next,                rb19\n+\n+# Setup: Height of Y+C in sand, (x&mask)*xpitch will give\n+# offset to the slice\n+.set rb_xpitch,                    rb20\n+\n+# These 3 consts each save 1 instruction in Y loop setup\n+# so whilst they are worthwhile they should be the 1st to die if we need\n+# another b reg\n+.set rb_y_coeffs_2,                rb21                         # 0x050b0a00\n+.set rb_y_coeffs_3,                rb22                         # 0x11283a40\n+.set rb_y_coeffs_5,                rb23                         # 0x0a0b0500\n+\n+# Setup: 0xff (8-bit) / 0xffff (9+ bit)\n+.set rb_pmask,                     rb24\n+\n+# vdw_setup_1(dst_pitch)\n+.set rb_dma1_base,                 rb25\n+\n+# Setup: pic width - 1\n+# In bytes so 8 bit luma is (width - 1)*1, 16 bit chroma is (width -1)*4 etc.\n+.set rb_max_x,                     rb26\n+\n+# vdw_setup_0 (depends on QPU number)\n+.set rb_dma0_base,                 rb27\n+\n+# Setup: vw_setup value to reset VPM write pointer\n+.set rb_vpm_init,                  rb28\n+\n+# Loop: vdw_setup_1(dst_pitch-width) = stride\n+.set rb_dma1,                      rb29\n+\n+# Setup: pic_height - 1\n+.set rb_max_y,                     rb30\n+\n+# Setup: FIR H offset\n+.set rb_fir_off_h,                 rb31\n+\n+\n+# With shifts only the bottom 5 bits are considered so -16=16, -15=17 etc.\n+.set i_shift16,                    -16\n+.set i_shift21,                    -11\n+.set i_shift23,                     -9\n+.set i_shift30,                     -2\n+\n+# Much of the setup code is common between Y & C\n+# Macros that express this - obviously these can't be overlapped\n+# so are probably unsuitable for loop code\n+\n+.macro m_calc_dma_regs, v_bit_depth, v_blk_height, r_vpm, r_dma\n+  mov r2, qpu_num\n+.if v_bit_depth <= 8\n+  # 8 bit version\n+  asr r1, r2, 2\n+  shl r1, r1, 6\n+  and r0, r2, 3\n+  or  r0, r0, r1\n+\n+  mov r1, vpm_setup(0, 4, h8p(0, 0))   # 4 is stride - stride acts on ADDR which is Y[5:0],B[1:0] for 8 bit\n+  add r_vpm, r0, r1  # VPM 8bit storage\n+\n+  mov r1, vdw_setup_0(0, 0, dma_h8p(0,0,0)) # height,width added later\n+  shl r0, r0, 5\n+\n+.else\n+  # 16 bit version\n+  # Limited to 8 QPUs if blk height > 8\n+  asr r1, r2, 1\n+.if v_blk_height <= 8\n+  shl r1, r1, 4\n+.else\n+  shl r1, r1, 5\n+.endif\n+  and r0, r2, 1\n+  or  r0, r0, r1\n+\n+  mov r1, vpm_setup(0, 2, h16p(0, 0))   # 2 is stride - stride acts on ADDR\n+  add r_vpm, r0, r1\n+\n+  # X = H * 8 so the YH from VPMVCD_WR_SETUP[ADDR] drops into\n+  # XY VPMVCD_WR_SETUP[VPMBASE] if shifted left 3 (+ 3 for pos of field in reg)\n+  mov r1, vdw_setup_0(0, 0, dma_h16p(0,0,0))    # height,width added later\n+  shl r0, r0, 6\n+.endif\n+  add r_dma, r0, r1  # DMA out\n+.endm\n+\n+\n+.macro m_setup_q0\n+  srel -, 12\n+.endm\n+\n+# Code start label\n+::mc_start\n+\n+################################################################################\n+# mc_setup_c\n+#\n+# typedef struct qpu_mc_pred_c_s_s {\n+#     int16_t y;\n+#     int16_t x;\n+#     uint32_t base;\n+#     uint32_t pic_cw;            // C Width (== Y width / 2)\n+#     uint32_t pic_ch;            // C Height (== Y Height / 2)\n+#     uint32_t stride2;\n+#     uint32_t stride1;\n+#     uint32_t wdenom;\n+#     int16_t y2;\n+#     int16_t x2;\n+#     uint32_t base2;\n+#     uint32_t next_fn;\n+# } qpu_mc_pred_c_s_t;\n+\n+.macro m_setup_c, v_bit_depth\n+\n+# Cannot use mul24 on x as x might be -ve, so must use shift\n+.if v_bit_depth <= 8\n+.set v_x_shift,         1\n+.set v_pmask,           0xff\n+.set v_blk_height,      C_BLK_HEIGHT_8\n+.else\n+.set v_x_shift,         2\n+.set v_pmask,           0xffff\n+.set v_blk_height,      C_BLK_HEIGHT_16\n+.endif\n+\n+  mov tmurs, 1                  ; mov ra0, unif                 # No TMU swap ; x_y\n+\n+  mov r0, [0,2,0,2,0,2,0,2,1,3,1,3,1,3,1,3]\n+  shl rb_ef, r0, i_shift30      ; mov ra_base, unif             # ; ref_c_base\n+\n+# Read image dimensions\n+  sub r0, unif, 1                                               # pic c width\n+  shl rb_max_x, r0, v_x_shift                                   # rb_max_x in bytes\n+  sub rb_max_y, unif, 1                                         # pic c height\n+\n+# load constants\n+  mov ra_kff800100, 0xff800100\n+  mov rb_pmask, v_pmask\n+  mov ra_blk_height_pmax, ((1 << v_bit_depth) - 1) | (v_blk_height << 16)\n+  mov rb_fir_off_h, (FIR_OFFSET << (v_bit_depth - 8))\n+  mov ra_fir_off_val_wt_den_p7, (FIR_OFFSET << 16) | (DENOM + 15 - v_bit_depth)\n+\n+# get source pitch\n+  mov ra_ef, rb_ef              ; mov rb_xpitch, unif           # ; stride2\n+  mov rb_pitch, unif                                            # stride1\n+  mov r1, vdw_setup_1(0)                                        # [rb_pitch delay] Merged with dst_stride shortly\n+  add rb_dma1_base, r1, rb_pitch                                # vdw_setup_1\n+\n+  and r0, 1, elem_num\n+  nop                           ; mul24 r0, r0, 5\n+.if v_bit_depth <= 8\n+  add rb_elem_x, r0, elem_num\n+.else\n+  add r0, r0, elem_num\n+  add rb_elem_x, r0, r0\n+.endif\n+\n+# Compute base address for first and second access\n+# ra_base ends up with t0s base\n+# ra_base2 ends up with t1s base\n+\n+  shl r0, ra0.16b, v_x_shift                                    # [rb_elem_x delay]\n+  add r0, r0, rb_elem_x                                         # Add elem no to x to get X for this slice\n+  max r0, r0, 0                 ; mov ra_y, ra0.16a             # ; stash Y\n+  min r0, r0, rb_max_x\n+\n+# Get shift\n+# Shift will always calculate as 0 for 9+ bit\n+# Ideally we can optimize the shift out of the code in these cases but for now\n+# it is tidier to leave it in\n+.if v_bit_depth <= 8\n+  shl ra_xshift_next, r0, 3\n+.else\n+  mov ra_xshift_next, 0         ; mov rb_xshift2_next, 0\n+.endif\n+\n+# In a single 32 bit word we get 1 or 2 UV pairs so mask bottom bits of xs if we need to\n+\n+.if v_bit_depth <= 8\n+  and r0, r0, -4\n+.endif\n+  sub r1, ra_k0, rb_pitch\n+  and r1, r0, r1\n+  xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+  add r0, r0, r1                ; mov ra0, unif                 # ; next_x2_y2\n+  add ra_base, ra_base, r0\n+\n+# Compute part of VPM to use for DMA output\n+# * We only get 8 QPUs if 16 bit - maybe reduce height and auto-loop?\n+  m_calc_dma_regs v_bit_depth, v_blk_height, rb_vpm_init, rb_dma0_base\n+\n+# And again for L1, but only worrying about frame2 stuff\n+\n+# Compute base address for first and second access\n+# ra_base ends up with t0s base\n+# rb_base2 ends up with t1s base\n+\n+  shl r0, ra0.16b, v_x_shift\n+  add r0, r0, rb_elem_x         ; mov ra_y2, ra0.16a            # Add QPU slice offset\n+  max r0, r0, 0                 ; mov rb_base2, unif            # ref_c_base2\n+  min r0, r0, rb_max_x\n+\n+# Get shift (already zero if 9+ bit so ignore)\n+.if v_bit_depth <= 8\n+  shl rb_xshift2_next, r0, 3\n+.endif\n+\n+# In a single 32 bit word we get 2 UV pairs so mask bottom bit of xs\n+\n+.if v_bit_depth <= 8\n+  and r0, r0, -4\n+.endif\n+  sub r1, ra_k0, rb_pitch\n+  and r1, r0, r1                ; mov r3, PREREAD\n+  xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+  add r0, r0, r1                ; mov r2, ra_y2\n+  add rb_base2, rb_base2, r0    ; mov r0, ra_y\n+\n+# Do preloads\n+# r0 = ra_y, r2 = ra_y2, r3 = PREREAD\n+\n+:1\n+  sub.setf r3, r3, 1\n+  max r1, r0, 0\n+  min r1, r1, rb_max_y\n+  add r0, r0, ra_k1             ; mul24 r1, r1, rb_pitch\n+  add t0s, ra_base, r1          ; mov ra_y, r0\n+\n+  max r1, r2, 0\n+  brr.anynz -, r:1b\n+  min r1, r1, rb_max_y\n+  add r2, r2, ra_k1             ; mul24 r1, r1, rb_pitch\n+  add t1s, rb_base2, r1         ; mov ra_y2, r2\n+# >>> .anynz 1b\n+\n+  mov ra_link, unif                                             # link\n+# touch registers to keep simulator happy (and fills in delay slots)\n+  mov ra4, 0                    ; mov rb4, 0\n+  bra -, ra_link\n+  mov ra5, 0                    ; mov rb5, 0\n+  mov ra6, 0                    ; mov rb6, 0\n+  mov ra7, 0                    ; mov rb7, 0\n+# >>> ra_link\n+.endm\n+\n+::mc_setup_c_q0\n+  m_setup_q0\n+::mc_setup_c_qn\n+  m_setup_c 8\n+\n+################################################################################\n+#\n+# mc_filter_c_p\n+#\n+# typedef struct qpu_mc_pred_c_p_s {\n+#     int16_t y;\n+#     int16_t x;\n+#     uint32_t base;\n+#     uint16_t h;\n+#     uint16_t w;\n+#     uint32_t coeffs_x;\n+#     uint32_t coeffs_y;\n+#     uint32_t wo_u;\n+#     uint32_t wo_v;\n+#     uint32_t dst_addr_c;\n+#     uint32_t next_fn;\n+# } qpu_mc_pred_c_p_t;\n+\n+.macro m_filter_c_p, v_tmu, v_bit_depth\n+\n+.if v_bit_depth <= 8\n+.set v_x_shift,         1\n+.set v_x_mul,           2\n+.set v_v_shift,         8\n+# Shifts to get width & height in the right place in rb_dma0\n+.set v_dma_h_shift,     7\n+.set v_dma_wh_shift,    i_shift16\n+.else\n+.set v_x_shift,         2\n+.set v_x_mul,           4\n+.set v_v_shift,         i_shift16\n+# Shifts to get width & height in the right place in rb_dma0\n+.set v_dma_h_shift,     8\n+.set v_dma_wh_shift,    15\n+.endif\n+\n+.if v_tmu == 0\n+.set vrx_xshift,        rb_xshift2              # b side more convienient\n+.set vrx_xshift_next,   ra_xshift_next\n+.set vra_y_next,        ra_y_next\n+.set vrx_base_next,     ra_base_next\n+.set vra_y,             ra_y\n+.set vra_base,          ra_base\n+.set vr_txs,            t0s\n+.else\n+.set vrx_xshift,        ra_xshift               # a side more convienient\n+.set vrx_xshift_next,   rb_xshift2_next\n+.set vra_y_next,        ra_y2_next\n+.set vrx_base_next,     rb_base2_next\n+.set vra_y,             ra_y2\n+.set vra_base,          rb_base2\n+.set vr_txs,            t1s\n+.endif\n+\n+# denom shift values\n+.set i_wt_den_p5,                  (DENOM + 13 - v_bit_depth)\n+.set i_wt_den_p6,                  (DENOM + 14 - v_bit_depth)\n+\n+# per-channel shifts were calculated on the *previous* invocation\n+# get base addresses and per-channel shifts for *next* invocation\n+  mov vw_setup, rb_vpm_init     ; mov ra2, unif                 # ; x_y\n+\n+  add.setf -, rb_ef, rb_ef      ; mov r3, unif                  # [ra2 delay] ; base\n+\n+  shl r0, ra2.16b, v_x_shift    ; v8subs r5rep, r0, r0          # r5 = 0\n+  add r0, r0, rb_elem_x         ; mov ra_width_height, unif     # r1=pitch2 mask ; width_height\n+  sub r1, r5, rb_pitch          ; mov ra0, unif                 # ; H filter coeffs\n+  max r0, r0, r5                ; mov vrx_xshift, vrx_xshift_next\n+  min r0, r0, rb_max_x          ; mov vra_y_next, ra2.16a\n+\n+.if v_bit_depth <= 8\n+  shl vrx_xshift_next, r0, 3\n+  and r0, r0, -4\n+.endif\n+  and r1, r0, r1                ; mul24 r2, ra_width, v_x_mul   # r2=w*2 (we are working in pel pairs)  ** x*2 already calced!\n+  xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+  add r0, r0, r1                ; mov ra3, unif                 # ; V filter coeffs\n+  add vrx_base_next, r3, r0     ; mov r1, ra_height\n+\n+# set up VPM write\n+  sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif    # Compute vdw_setup1(dst_pitch-width) ; U offset/weight\n+  add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height\n+  add rb_lcount, r1, (3-4)      ; mov.ifc ra_wt_off_mul_l0, unif # ; V offset/weight\n+\n+# Misc final setup...\n+\n+  shl r0, r1, v_dma_h_shift     ; mov ra_dest, unif             # ; dst_addr\n+  add r0, r0, r2                ; mov r2, ra_fir_off_val        # Combine width and height of destination area (r0=h<<8, r2=w*2)\n+  shl r0, r0, v_dma_wh_shift    ; mov rb10, ra3.8c              # Shift into bits 16 upwards of the vdw_setup0 register\n+  add ra_dma0, r0, rb_dma0_base ; mov r1, ra_wt_off_l0          # ; r1=weight\n+  shl r1, r1, i_wt_den_p5       ; mul24 r0, r2, ra_wt_mul_l0\n+  sub rb_wt_off, r1, r0         ; mov r0, ra_kmul_add\n+  add ra_wt_mul_l0, ra_wt_mul_l0, r0 ; mov r5rep, -4            # ; loop counter (V FIFO fill = 4)\n+  mov rb11, ra3.8d              ; mov ra_link, unif             # ; Link\n+\n+# r5           = -4                     (loop counter)\n+# ra_wt_mul_l0 = weight L0 + 128        (now unsigned)\n+# rb_wt_off    = (offset * 2 + 1) << (wt_den + 5)\n+# rb31         = FIR value offset\n+\n+# FIFO: rb4, ra5, rb6, ra7\n+# Coeffs in ra3.8a, ra3.8b, rb10, rb11\n+\n+# We want (r0r1)\n+# U0U3 : V0V3 : U1U4 : V1V4 : U2U5 : V2U5 : ...\n+# We fetch (after shift)\n+#  C0  :  C3  :  C1  :  C4  :  C2  :  C5  : ...\n+\n+:1\n+# retrieve texture results and pick out bytes\n+# then submit two more texture requests\n+\n+.if v_tmu == 0\n+  sub.setf -, r5, rb_i_tmu      ; mov rb4, ra5                  ; ldtmu0\n+  shr r2, r4, vrx_xshift        ; mov.ifz  r3, vra_y_next\n+  shr r1, r2, v_v_shift         ; mov.ifnz r3, vra_y\n+  add.setf -, rb_ef, rb_ef      ; mov.ifz  vra_base, vrx_base_next\n+.else\n+  sub.setf -, r5, rb_i_tmu      ; mov rb4, ra5                  ; ldtmu1\n+  shr r2, r4, vrx_xshift        ; mov.ifz  vra_base, vrx_base_next\n+  shr r1, r2, v_v_shift         ; mov.ifnz r3, vra_y\n+  add.setf -, rb_ef, rb_ef      ; mov.ifz  r3, vra_y_next       # [r1 << delay]\n+.endif\n+\n+  add vra_y, r3, ra_k1          ; mov      r0, r1 << 15\n+  max r3, r3, ra_k0             ; mov.ifnc r1, r2 << 1\n+  min r3, r3, rb_max_y          ; mov.ifnc r0, r2\n+\n+  and r1, r1, ra_pmax           ; mul24 r3, r3, rb_pitch\n+.if v_tmu == 0\n+  add vr_txs, vra_base, r3      ; v8min r0, r0, rb_pmask        # ; mask bytes\n+.else\n+  add vr_txs, vra_base, r3      ; v8min r0, r0, ra_pmax         # ; mask bytes\n+.endif\n+\n+# apply horizontal filter\n+# The filter coeffs for the two halves of this are the same (unlike in the\n+# Y case) so it doesn't matter which ra0 we get them from\n+# Also as the two halves are locked together we don't need to separate the 1st\n+# r0 mul or the last r1 mul as they are valid for all QPUs\n+\n+  add r5rep, r5, 1              ; mul24      r3, ra0.8a,       r0\n+  sub r2, rb_fir_off_h, r3      ; mul24      r3, ra0.8d,       r1\n+  sub r2, r2, r3                ; mul24      r3, ra0.8b << 2,  r0 << 2  @ \"mul_used\", 0\n+  nop                           ; mul24.ifn  r3, ra0.8b << 12, r1 << 12 @ \"mul_used\", 0\n+  add r2, r2, r3                ; mul24      r3, ra0.8c << 4,  r0 << 4  @ \"mul_used\", 0\n+  add.setf -, r5, r5            ; mul24.ifn  r3, ra0.8c << 14, r1 << 14 @ \"mul_used\", 0\n+\n+# V filter = - r4 * a + r5 * b + r6 * c - r7 * d (post FIFO shift)\n+# We would like to save the r5->r4 shift but we need a delay slot\n+# for both r7 & r6 which we can't find anything to put in if we have\n+# already multiplied r4 & r5!\n+  brr.anyn -, r:1b\n+  add r2, r2, r3                ; mul24 r0, ra7, rb10           # r6 post\n+  mov ra5, rb6                  ; mul24 r1, rb6, ra3.8b         # r5 post\n+  asr ra7, r2, v_bit_depth - 8  ; mov rb6, ra7\n+# >>> .anyn 1b\n+\n+  add r1, r1, r0                ; mul24 r0, rb4, ra3.8a         # [ra7 delay]\n+  sub r1, r1, r0                ; mul24 r0, ra7, rb11\n+  sub r1, r1, r0\n+\n+  asr r1, r1, 6                 ; mov r3, ra_blk_height         # ; NxtLoop\n+  sub.setf -, r5, rb_lcount     ; mul24 r0, r1, ra_wt_mul_l0\n+  add r0, r0, rb_wt_off         ; mul24 r1, r1, ra_kmul_add\n+  sub r1, r0, r1                ; v8subs r0, ra_height, r3      # ; NxtLoop\n+  brr.anyn -, r:1b\n+  asr r1, r1, i_wt_den_p6\n+  min r1, r1, ra_pmax           ; mov -, vw_wait\n+  max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch        # ; NxtLoop\n+# >>> .anyn 1b\n+\n+# r0 = remaining height (min 0)\n+# r2 = r3 * rb_pitch\n+# r3 = block_height\n+\n+# If looping again then we consumed 16 height last loop\n+# rb_dma1 (stride) remains constant\n+# rb_i_tmu remains const (based on total height)\n+# recalc ra_dma0, rb_lcount based on new segment height\n+\n+  mov.setf ra_height, r0        ; mov vw_setup, ra_dma0         # VDW setup 0\n+\n+# DMA out\n+  bra.anyz -, ra_link\n+  min r0, r0, r3                ; mov vw_setup, rb_dma1         # Stride\n+  sub r1, r0, r3                ; mov vw_addr, ra_dest          # start the VDW\n+  shl r1, r1, i_shift23\n+# >>> .anyz ra_link\n+\n+# Here r1 = cur_blk_height - 16 so it will be 0 or -ve\n+# We add to dma0 to reduce the number of output lines in the final block\n+  brr -, r:1b\n+  add rb_lcount, rb_lcount, r0\n+  add ra_dma0, ra_dma0, r1\n+  add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init     # ; Reset our VDM write pointer\n+# >>> 1b\n+.endm\n+\n+::mc_filter_c_p\n+  m_filter_c_p 0, 8\n+\n+::mc_filter_c_p_l1\n+  m_filter_c_p 1, 8\n+\n+################################################################################\n+#\n+# mc_filter_c_b\n+#\n+# typedef struct qpu_mc_pred_c_b_s {\n+#     int16_t y;\n+#     int16_t x;\n+#     uint32_t base;\n+#     uint16_t h;\n+#     uint16_t w;\n+#     uint32_t coeffs_x1;\n+#     uint32_t coeffs_y1;\n+#     int16_t weight_u1;\n+#     int16_t weight_v1;\n+#     int16_t y2;\n+#     int16_t x2;\n+#     uint32_t base2;\n+#     uint32_t coeffs_x2;\n+#     uint32_t coeffs_y2;\n+#     uint32_t wo_u2;\n+#     uint32_t wo_v2;\n+#     uint32_t dst_addr_c;\n+#     uint32_t next_fn;\n+# } qpu_mc_pred_c_b_t;\n+\n+.macro m_filter_c_b, v_bit_depth\n+\n+.if v_bit_depth <= 8\n+.set v_x_shift,         1\n+.set v_v_shift,         8\n+# Shifts to get width & height in the right place in ra_dma0\n+.set v_dma_h_shift,     7\n+.set v_dma_wh_shift,    i_shift16\n+.else\n+.set v_x_shift,         2\n+.set v_v_shift,         i_shift16\n+# Shifts to get width & height in the right place in ra_dma0\n+.set v_dma_h_shift,     8\n+.set v_dma_wh_shift,    15\n+.endif\n+.set v_x_mul,           (1 << v_x_shift)\n+\n+# denom shift values\n+.set i_wt_den_p5,                  (DENOM + 13 - v_bit_depth)\n+.set i_wt_den_p6,                  (DENOM + 14 - v_bit_depth)\n+\n+# per-channel shifts were calculated on the *previous* invocation\n+\n+# get base addresses and per-channel shifts for *next* invocation\n+  mov vw_setup, rb_vpm_init     ; mov ra2, unif                 # ; x_y\n+\n+  add.setf -, rb_ef, rb_ef      ; mov r3, unif                  # [ra2 delay] ; r3=base\n+\n+  shl r0, ra2.16b, v_x_shift    ; v8subs r5rep, r1, r1          # x ; r5=0\n+  add r0, r0, rb_elem_x         ; mov ra_y_next, ra2.16a\n+  sub r1, r5, rb_pitch          ; mov ra_width_height, unif     # r1=pitch2 mask ; width_height\n+  max r0, r0, r5                ; mov ra_xshift, ra_xshift_next\n+  min r0, r0, rb_max_x          ; mov ra0, unif                 # ; L0 H filter coeffs\n+\n+.if v_bit_depth <= 8\n+  shl ra_xshift_next, r0, 3\n+.endif\n+\n+  and r0, r0, -4                ; mov ra2, unif                 # ; L0 V filter coeffs\n+  and r1, r0, r1                ; mul24 r2, ra_width, v_x_mul   # r2=x*2 (we are working in pel pairs)\n+  xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+  add r0, r0, r1                ; mov r1, ra_height             # Add stripe offsets ; r1=height\n+  add ra_base_next, r3, r0      ; mov rb_xshift2, rb_xshift2_next # ; xshift2 used because B\n+\n+# set up VPM write\n+\n+  sub rb_dma1, rb_dma1_base, r2 ; mov ra_wt_off_mul_l0, unif    # Compute vdw_setup1(dst_pitch-width) ; U weight\n+  add rb_i_tmu, r1, (3-4) - PREREAD ; v8min r1, r1, ra_blk_height\n+  add rb_lcount, r1, (3-4)      ; mov.ifc ra_wt_mul_l0, ra_wt_off_l0 # ; V weight\n+\n+  shl r0, r1, v_dma_h_shift     ; mov ra3, unif                 # ; x2_y2\n+  add r0, r0, r2                ; mov r3, unif                  # [ra3 delay] ; base\n+  shl r0, r0, v_dma_wh_shift    ; mov ra_y2_next, ra3.16a       # Shift into bits 16 upwards of the vdw_setup0 register\n+  add ra_dma0, r0, rb_dma0_base ; mov r0, ra3.16b               # r0=x\n+\n+# L1 - uniform layout could possibly be optimized\n+\n+  shl r0, r0, v_x_shift         ; mov ra1, unif                 # r0=x<<shift ; L1 H filter coeffs\n+  add r0, r0, rb_elem_x         ; mov ra3, unif                 # ; L1 V filter coeffs\n+  sub r1, r5, rb_pitch          ; mov ra_wt_off_mul_l1, unif    # [ra3 delay] r1=pitch2 mask ; U offset/weight\n+  max r0, r0, r5                ; mov ra9, rb_max_y\n+  min r0, r0, rb_max_x          ; mov r2, ra_kmul_add\n+\n+.if v_bit_depth <= 8\n+  shl rb_xshift2_next, r0, 3\n+.endif\n+\n+  and r0, r0, -4                ; mov.ifc ra_wt_off_mul_l1, unif # ; V offset/weight\n+  and r1, r0, r1                ; mov r5rep, -4\n+  xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+  add r0, r0, r1                ; mov ra_dest, unif             #  Add stripe offsets ; dst_addr\n+  add rb_base2_next, r3, r0     ; mov r0, ra_fir_off_val\n+\n+  add ra_wt_mul_l0, ra_wt_mul_l0, r2 ; mul24 r1, r0, ra_wt_mul_l0\n+  add ra_wt_mul_l1, ra_wt_mul_l1, r2 ; mul24 r0, r0, ra_wt_mul_l1\n+  add r0, r0, r1                ; mov r1, ra_wt_off_l1          # ; L0 off unset\n+  shl r1, r1, i_wt_den_p6       ; mov rb11, ra3.8d\n+  sub rb_wt_off, r1, r0         ; mov ra_link, unif             # ; link\n+\n+  mov ra10, rb_xshift2          ; mov rb7,  ra2.8d\n+\n+# r5        loop counter (-4)\n+# ra0       H coeffs L0\n+# ra1       H coeffs L1\n+# ra2       V coeffs L0\n+# ra3       V coeffs L1\n+# ra9       rb_max_y alias\n+# ra10      rb_xshift2 alias\n+\n+:1\n+# retrieve texture results and pick out bytes\n+# then submit two more texture requests\n+  sub.setf -, r5, rb_i_tmu      ; nop                           ; ldtmu0\n+  shr r2, r4, ra_xshift         ; mov.ifz rb_base2, rb_base2_next\n+  shr r1, r2, v_v_shift         ; mov.ifz ra_y_y2, ra_y_y2_next\n+  add.setf -, rb_ef, rb_ef      ; mov.ifz ra_base, ra_base_next # [ra_y delay]\n+  add ra_y, 1, ra_y             ; mov r3, ra_y\n+\n+  max r3, r3, ra_k0             ; mov      r0, r1 << 15\n+  min r3, r3, ra9               ; mov.ifnc r1, r2 << 1\n+\n+  mov.ifnc r0, r2               ; mul24 r3, r3, rb_pitch\n+  add t0s, ra_base, r3          ; v8min r0, r0, rb_pmask        # ; masks bytes\n+\n+# L0 H-filter (-ra4*, +rb5, +rb6, -ra7)\n+\n+  and r1, r1, rb_pmask          ; mul24      r2, ra0.8a,       r0\n+  sub r2, rb_fir_off_h, r2      ; mul24      r3, ra0.8d,       r1\n+  sub r2, r2, r3                ; mul24      r3, ra0.8b << 2,  r0 << 2  @ \"mul_used\", 0\n+  nop                           ; mul24.ifn  r3, ra0.8b << 12, r1 << 12 @ \"mul_used\", 0\n+  add r2, r2, r3                ; mul24      r3, ra0.8c << 4,  r0 << 4  @ \"mul_used\", 0\n+  nop                           ; mul24.ifn  r3, ra0.8c << 14, r1 << 14 @ \"mul_used\", 0\n+\n+  add r0, r2, r3                ; mul24 ra4, rb5, ra2.8a        ; ldtmu1\n+\n+  shr r2, r4, ra10              ; mov rb5, rb6\n+  shr r1, r2, v_v_shift         ; mov r3, ra_y2\n+  shr ra7, r0, v_bit_depth - 8  ; mov rb6, ra7                  # [r1 << delay]\n+\n+  add ra_y2, r3, ra_k1          ; mov      r0, r1 << 15\n+  max r3, r3, ra_k0             ; mov.ifnc r1, r2 << 1\n+  min r3, r3, rb_max_y          ; v8min r1, r1, ra_pmax\n+\n+  mov.ifnc r0, r2               ; mul24 r3, r3, rb_pitch\n+  add t1s, rb_base2, r3         ; v8min r0, r0, ra_pmax         # ; masks bytes\n+\n+# L1 H-filter (-r0*, +rb9, +rb10, -ra11)\n+\n+  add r5rep, r5, 1              ; mul24      r2, ra1.8a,       r0\n+  sub r2, rb_fir_off_h, r2      ; mul24      r3, ra1.8d,       r1\n+  sub r2, r2, r3                ; mul24      r3, ra1.8b << 2,  r0 << 2  @ \"mul_used\", 0\n+  nop                           ; mul24.ifn  r3, ra1.8b << 12, r1 << 12 @ \"mul_used\", 0\n+  add r2, r3, r2                ; mul24      r3, ra1.8c << 4,  r0 << 4  @ \"mul_used\", 0\n+  add.setf -, r5, r5            ; mul24.ifn  r3, ra1.8c << 14, r1 << 14 @ \"mul_used\", 0\n+\n+  brr.anyn -, r:1b\n+  add r2, r2, r3                ; mul24 r0, rb9,  ra3.8a\n+  mov rb9, rb10                 ; mul24 r1, rb10, ra3.8b\n+  shr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11\n+# >>> .anyn 1b\n+\n+  sub r2, r1, r0                ; mul24 r1, rb5,  ra2.8b        # L1 ; L0\n+  sub.setf -, r5, rb_lcount     ; mov r0, ra4\n+  sub r1, r1, r0                ; mul24 r0, rb6,  ra2.8c\n+  add r1, r1, r0                ; mul24 r0, ra7,  rb7\n+\n+  sub r1, r1, r0                ; mul24 r0, rb10, ra3.8c        # L1\n+  add r2, r2, r0                ; mul24 r0, ra11, rb11          # L1\n+  sub r2, r2, r0\n+\n+  shr r1, r1, 6\n+  shr r2, r2, 6                 ; mul24 r0, r1, ra_wt_mul_l0\n+  add r2, r2, r1                ; mul24 r1, r2, ra_wt_mul_l1\n+  add r1, r1, r0                ; mul24 r2, r2, ra_kmul_add\n+  sub r1, r1, r2                ; mov r3, ra_blk_height         # ; NxtLoop\n+  add r1, r1, rb_wt_off         ; v8subs r0, ra_height, r3      # ; NxtLoop\n+\n+  brr.anyn -, r:1b\n+  asr r1, r1, ra_wt_den_p7\n+  min r1, r1, ra_pmax           ; mov -, vw_wait\n+  max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch        # ; NxtLoop\n+# >>> .anyn 1b\n+\n+# r0 = remaining height (min 0)\n+# r2 = r3 * rb_pitch\n+# r3 = block_height\n+\n+# If looping again then we consumed 16 height last loop\n+# rb_dma1 (stride) remains constant\n+# rb_i_tmu remains const (based on total height)\n+# recalc ra_dma0, rb_lcount based on new segment height\n+\n+  mov.setf ra_height, r0        ; mov vw_setup, ra_dma0         # ; VDW setup 0\n+\n+# DMA out\n+  bra.anyz -, ra_link\n+  min r0, r0, r3                ; mov vw_setup, rb_dma1         # ; Stride\n+  sub r1, r0, r3                ; mov vw_addr, ra_dest          # ; start the VDW\n+  shl r1, r1, i_shift23\n+# >>> .anyz ra_link\n+\n+# Here r1 = cur_blk_height - 16 so it will be 0 or -ve\n+# We add to dma0 to reduce the number of output lines in the final block\n+  brr -, r:1b\n+  add rb_lcount, rb_lcount, r0\n+  add ra_dma0, ra_dma0, r1\n+  add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init     # ; Reset our VDM write pointer\n+# >>> 1b\n+.endm\n+\n+::mc_filter_c_b\n+  m_filter_c_b 8\n+\n+################################################################################\n+# Exit code used by both Luma & Chroma so place between them to avoid I-cache\n+# conflicts\n+\n+.macro m_exit_drain\n+.if PREREAD == 2\n+# Special case 2 as loop is wasteful\n+  nop                   ; nop           ; ldtmu0\n+  nop                   ; nop           ; ldtmu1\n+  nop                   ; nop           ; ldtmu0\n+  mov -, vw_wait        ; nop           ; ldtmu1\n+.else\n+  mov.setf r3, PREREAD - 1\n+:1\n+  brr.anynz -, r:1b\n+  nop                   ; nop           ; ldtmu0\n+  nop                   ; nop           ; ldtmu1\n+  sub.setf r3, r3, 1\n+ # >>>\n+  mov  -, vw_wait\n+.endif\n+.endm\n+\n+# This sync layout groups QPUs 0-3, 4-7, 8-11 (i.e. 1 group per TMU pair)\n+# All qpus start at the beginning and after that (group - 1) must have finished\n+# before (group) can start\n+#\n+# Requires setup code for QPU 0 to srel sem 12 (m_setup_q0) to start the chain\n+# Exit code will sacq sem 12 so everything is @ 0 on exit (this is important -\n+# lockup otherwise)\n+#\n+# There is some, currently ill defined, potential lockup if we have the VDM active\n+# whilst doing sem stuff so we wait first. ?? QPU stall from sem stalls VDM pipe too ??\n+#\n+# The code stalled when I had many waiters on a single sem so we have a\n+# \"ripple\" of srels to restart.  Unsure why, may have been bug, but this works\n+# and we currently have both the memory & sems to support it.\n+.macro m_sync_q, n_qpu, n_quads\n+# Do not generate code for qpu >= quads * 4 -  fns should never be called\n+.if n_qpu < n_quads * 4\n+  mov ra_link, unif     # Can only branch to an a reg (not r0)\n+  mov -, vw_wait        # [ra_link delay]\n+\n+.set n_sem_sync, n_qpu - (n_qpu % 4)\n+.set n_sem_in, n_qpu\n+.set n_sem_out, n_qpu + 1\n+\n+.if n_qpu % 4 == 0\n+\n+.set n_sem_quad_in,  12 + n_qpu / 4\n+.set n_sem_quad_out, 12 + (((n_qpu / 4) + 1) % n_quads)\n+\n+  sacq -, n_sem_sync\n+  sacq -, n_sem_sync\n+  sacq -, n_sem_sync\n+  bra -, ra_link\n+  sacq -, n_sem_quad_in\n+  srel -, n_sem_out\n+  srel -, n_sem_quad_out\n+\n+.else\n+  bra -, ra_link\n+  srel -, n_sem_sync\n+  sacq -, n_sem_in\n+.if n_sem_out % 4 != 0\n+  srel -, n_sem_out\n+.else\n+  nop\n+.endif\n+.endif\n+.endif\n+.endm\n+\n+.set v_quads8, N_QPU_8 / 4\n+\n+::mc_sync_q0\n+  m_sync_q 0, v_quads8\n+::mc_sync_q1\n+  m_sync_q 1, v_quads8\n+::mc_sync_q2\n+  m_sync_q 2, v_quads8\n+::mc_sync_q3\n+  m_sync_q 3, v_quads8\n+::mc_sync_q4\n+  m_sync_q 4, v_quads8\n+::mc_sync_q5\n+  m_sync_q 5, v_quads8\n+::mc_sync_q6\n+  m_sync_q 6, v_quads8\n+::mc_sync_q7\n+  m_sync_q 7, v_quads8\n+::mc_sync_q8\n+  m_sync_q 8, v_quads8\n+::mc_sync_q9\n+  m_sync_q 9, v_quads8\n+::mc_sync_q10\n+  m_sync_q 10, v_quads8\n+::mc_sync_q11\n+  m_sync_q 11, v_quads8\n+\n+# mc_exit()\n+# Chroma & Luma the same now\n+\n+.macro m_exit_qn\n+  m_exit_drain\n+  nop                   ; nop           ; thrend\n+  nop\n+  nop\n+# >>> thrend <<<\n+.endm\n+\n+::mc_exit_c_qn\n+::mc_exit_y_qn\n+  m_exit_qn\n+\n+\n+\n+# mc_interrupt_exit12()\n+\n+.macro m_exit_q0\n+  m_exit_drain\n+  sacq -, 12\n+  nop                   ; nop           ; thrend\n+  mov interrupt, 1\n+  nop\n+# >>> thrend <<<\n+.endm\n+\n+::mc_exit_c_q0\n+::mc_exit_y_q0\n+  m_exit_q0\n+\n+# LUMA CODE\n+\n+# The idea is to form B predictions by doing 8 pixels from ref0 in parallel with 8 pixels from ref1.\n+# For P frames we make the second x,y coordinates offset by +8\n+\n+\n+################################################################################\n+# mc_setup\n+#\n+# typedef struct qpu_mc_pred_y_s_s {\n+#    qpu_mc_src_t next_src1;\n+#    qpu_mc_src_t next_src2;\n+#    uint16_t pic_h;\n+#    uint16_t pic_w;\n+#    uint32_t stride2;\n+#    uint32_t stride1;\n+#    uint32_t wdenom;\n+#    uint32_t next_fn;\n+# } qpu_mc_pred_y_s_t;\n+\n+.macro m_setup_y, v_bit_depth\n+\n+# Cannot use mul24 on x as x might be -ve, so must use shift\n+.if v_bit_depth <= 8\n+.set v_x_shift,         0\n+.set v_pmask,           0xff\n+.set v_blk_height,      Y_BLK_HEIGHT_8\n+.else\n+.set v_x_shift,         1\n+.set v_pmask,           0xffff\n+.set v_blk_height,      Y_BLK_HEIGHT_16\n+.endif\n+\n+\n+  # Need to save these because we need to know the frame dimensions before computing texture coordinates\n+  mov tmurs, 1                  ; mov ra0, unif                 # No TMU swap ; x_y\n+  mov ra9, unif                                                 # ref_y_base\n+  mov ra1, unif                                                 # x2_y2\n+\n+\n+# load constants\n+  mov r0, [0,2,0,2,0,2,0,2,1,3,1,3,1,3,1,3]\n+  shl rb_ef, r0, i_shift30      ; mov ra11, unif                # ; ref_y2_base\n+\n+  mov ra_kff800100, 0xff800100\n+  mov rb_pmask, v_pmask\n+  mov ra_blk_height_pmax, ((1 << v_bit_depth) - 1) | (v_blk_height << 16)\n+  mov rb_fir_off_h, (FIR_OFFSET << (v_bit_depth - 8))\n+  mov ra_fir_off_val_wt_den_p7, (FIR_OFFSET << 16) | (DENOM + 15 - v_bit_depth)\n+  mov rb_y_coeffs_2, 0x050b0a00\n+  mov rb_y_coeffs_3, 0x11283a40\n+  mov rb_y_coeffs_5, 0x0a0b0500\n+\n+# Compute part of VPM to use\n+\n+# Read image dimensions\n+  mov ra3, unif                                                 # width_height\n+  mov ra_ef, rb_ef              ; mov rb_xpitch, unif           # [ra3 delay] ; stride2\n+.if v_x_shift == 0\n+  sub rb_max_x, ra3.16b, 1\n+.else\n+  sub r0, ra3.16b, 1\n+  shl rb_max_x, r0, v_x_shift\n+.endif\n+  sub rb_max_y, ra3.16a, 1\n+  mov r3, elem_num              ; mov rb_pitch, unif            # stride1\n+\n+# get destination pitch\n+  mov r1, vdw_setup_1(0)                                        # [rb_pitch delay]\n+  or  rb_dma1_base, r1, rb_pitch\n+\n+# Compute base address for first and second access\n+  add r0, ra0.16b, r3                                           # Load x + elem_num\n+.if v_x_shift != 0\n+  shl r0, r0, v_x_shift\n+.endif\n+  max r0, r0, 0\n+  min r0, r0, rb_max_x\n+  shl ra_xshift_next, r0, 3                                     # Compute shifts\n+\n+# X is byte offset - we can only load words - mask\n+\n+  and r0, r0, -4                ; v8subs r2, r2, r2\n+  sub r2, r2, rb_pitch\n+  and r1, r0, r2\n+  xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+  add r0, r0, r1                                                # Add stripe offsets\n+  add ra_base, ra9, r0\n+\n+  # r3 still contains elem_num\n+  add r0, ra1.16b, r3                                           # Load x\n+.if v_x_shift != 0\n+  shl r0, r0, v_x_shift\n+.endif\n+  max r0, r0, 0\n+  min r0, r0, rb_max_x\n+  shl rb_xshift2_next, r0, 3                                    # Compute shifts\n+\n+  # r2 still contains mask\n+  and r0, r0, -4\n+  and r1, r0, r2\n+  xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+  add r0, r0, r1                                                # Add stripe offsets\n+  add rb_base2, ra11, r0\n+\n+# Do preloads\n+  nop                           ; mov r0, ra0.16a               # ; r0 = y\n+  mov r3, PREREAD               ; mov r2, ra1.16a               # ; r2 = y2\n+\n+:1\n+  sub.setf r3, r3, 1\n+  max r1, r0, 0\n+  min r1, r1, rb_max_y\n+  add r0, r0, ra_k1             ; mul24 r1, r1, rb_pitch\n+  add t0s, ra_base, r1          ; mov ra_y, r0\n+\n+  max r1, r2, 0\n+  brr.anynz -, r:1b\n+  min r1, r1, rb_max_y\n+  add r2, r2, ra_k1             ; mul24 r1, r1, rb_pitch\n+  add t1s, rb_base2, r1         ; mov ra_y2, r2\n+# >>> .anynz 1b\n+\n+  m_calc_dma_regs v_bit_depth, v_blk_height, rb_vpm_init, rb_dma0_base\n+\n+  mov ra_link, unif                                             # Next fn\n+\n+# touch vertical context to keep simulator happy\n+  mov ra8,  0                   ; mov rb8,  0                   # [ra_link delay]\n+  bra -, ra_link\n+  mov ra9,  0                   ; mov rb9,  0\n+  mov ra10, 0                   ; mov rb10, 0\n+  mov ra11, 0                   ; mov rb11, 0\n+# >>> ra_link\n+.endm\n+\n+::mc_setup_y_q0\n+  m_setup_q0\n+::mc_setup_y_qn\n+  m_setup_y 8\n+\n+################################################################################\n+#\n+# Start of per-block setup code\n+# P and B blocks share the same setup code to save on Icache space\n+\n+# get base addresses and per-channel shifts for *next* invocation\n+# per-channel shifts were calculated on the *previous* invocation\n+\n+# 1st 3 instructions of per_block-setup in branch delay\n+#\n+# typedef struct qpu_mc_pred_y_p_s {\n+#    qpu_mc_src_t next_src1;\n+#    qpu_mc_src_t next_src2;\n+#    uint16_t h;\n+#    uint16_t w;\n+#    uint32_t mymx21;\n+#    uint32_t wo1;\n+#    uint32_t wo2;\n+#    uint32_t dst_addr;\n+#    uint32_t next_fn;\n+# } qpu_mc_pred_y_p_t;\n+#\n+\n+.macro m_luma_setup, v_bit_depth\n+# Hack - QASM may well have have label pasting but I have no idea how...\n+.if v_bit_depth == 8\n+  brr ra_link, r:per_block_setup_8\n+.elif v_bit_depth == 10\n+  brr ra_link, r:per_block_setup_10\n+.endif\n+  mov ra0, unif                 ; mov r3, elem_num              # y_x ; elem_num has implicit unpack??\n+  add.setf -, rb_ef, rb_ef      ; v8subs r5rep, r2, r2          # [ra0 delay] ; r5 = 0\n+  add r0, ra0.16b, r3           ; mov rb_xshift2, rb_xshift2_next\n+.endm\n+\n+.macro m_per_block_setup, v_bit_depth\n+\n+.if v_bit_depth <= 8\n+.set v_x_shift,         0\n+.set v_x_mul,           1\n+# Shifts to get width & height in the right place in ra_dma0\n+.set v_dma_h_shift,     7\n+.set v_dma_wh_shift,    i_shift16\n+.else\n+.set v_x_shift,         1\n+.set v_x_mul,           2\n+# Shifts to get width & height in the right place in ra_dma0\n+.set v_dma_h_shift,     8\n+.set v_dma_wh_shift,    15\n+.endif\n+\n+.if v_x_shift != 0\n+  shl r0, r0, v_x_shift\n+.endif\n+  max r0, r0, r5                ; mov ra_xshift, ra_xshift_next\n+  min r0, r0, rb_max_x\n+\n+  shl ra_xshift_next, r0, 3                                     # Compute shifts\n+  and r0, r0, -4\n+  sub r2, r5, rb_pitch          ; mov ra_base_next, unif        # ; src1.base\n+  and r1, r0, r2                ; mov ra_y_next, ra0.16a\n+  xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+  add r0, r0, r1                ; mov ra1, unif                 # Add stripe offsets ; src2.x_y\n+  add ra_base_next, ra_base_next, r0                            # [ra1 delay]\n+\n+  add r0, ra1.16b, r3                                           # Load x2\n+.if v_x_shift != 0\n+  shl r0, r0, v_x_shift\n+.endif\n+  max r0, r0, r5                ; mov ra_y2_next, ra1.16a\n+  min r0, r0, rb_max_x          ; mov rb_base2_next, unif       # ; src2.base\n+  shl rb_xshift2_next, r0, 3                                    # Compute shifts\n+  and r0, r0, -4                ; mov ra_width_height, unif     # ; width_height\n+  and r1, r0, r2                ; mov vw_setup, rb_vpm_init     # ; set up VPM write\n+  xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+  add r0, r0, r1                ; mul24 r1, ra_width, v_x_mul   # Add stripe offsets ; r1 = x in bytes\n+  add rb_base2_next, rb_base2_next, r0\n+\n+# get width,height of block (unif load above), r1 = width * pel_size\n+  sub rb_dma1, rb_dma1_base, r1 ; mov r0, ra_height             # Compute vdw_setup1(dst_pitch-width)\n+  add rb_i_tmu, r0, (7-8) - PREREAD ; v8min r0, r0, ra_blk_height\n+  add rb_lcount, r0, (7-8)\n+  shl r0, r0, v_dma_h_shift     ; mov r3, ra_kmul_add           # ; r3 return val\n+  add r0, r0, r1                                                # Combine width and height of destination area\n+  shl r0, r0, v_dma_wh_shift    ; mov r2, ra_fir_off_val        # Shift into bits 16 upwards of the vdw_setup0 register ; r2 return val\n+  add ra_dma0, r0, rb_dma0_base ; mov r0, unif                  # ; Packed filter offsets\n+\n+# get filter coefficients and discard unused B frame values\n+  shl.ifnn r0, r0, i_shift16    ; mov ra_wt_off_mul_l0, unif    #  Pick half to use ; L0 offset/weight\n+  shl ra8, r0, 3                ; mov rb5, ra_k255\n+\n+# Coeffs are all abs values here as that means mul24 works (no sign extend from .8)\n+\n+# 2nd half coeffs same as first if we can swap 8<->24 in the rotate val\n+# but I can't see a way of doing that that is cheap enough to be worth it\n+\n+# Picked out in a slightly random order to space out uniform loads\n+\n+  # 1\n+  mov r1, 0x01040400            # [ra8 delay]\n+  ror ra2.8b, r1, ra8.8d\n+  ror ra0.8b, r1, ra8.8c\n+  # 2\n+  ror ra2.8c, rb_y_coeffs_2, ra8.8d\n+  ror ra0.8c, rb_y_coeffs_2, ra8.8c\n+  # 0\n+  mov r1,0x00010100             # -ve  [ra8 delay]\n+  ror r0, r1, ra8.8d            ; mov ra_wt_off_mul_l1, unif    # ; L1 Wt/Offset\n+  ror ra0.8a, r1, ra8.8c        ; v8min rb4, r0, rb5\n+  # 7\n+  shl r1, r1, 8                 ; mov.ifn ra_wt_off_mul_l0, ra_wt_off_mul_l1 # r1 = 0x01010000\n+  ror r0, r1, ra8.8d            ; mov ra_dest, unif             # ; Destination address\n+  ror ra1.8d, r1, ra8.8c        ; v8min rb11, r0, rb5\n+  # 3\n+  ror ra2.8d, rb_y_coeffs_3, ra8.8d\n+  ror ra0.8d, rb_y_coeffs_3, ra8.8c\n+  # 5\n+  ror ra3.8b, rb_y_coeffs_5, ra8.8d\n+  ror ra1.8b, rb_y_coeffs_5, ra8.8c\n+  # 6\n+  mov r1,0x04040100\n+  ror ra3.8c, r1, ra8.8d\n+  ror ra1.8c, r1, ra8.8c        ; mov r5rep, -8                 # ; r5 return val\n+\n+  bra -, ra_link\n+  # 4\n+  mov r1,0x3a281100\n+  ror r0, r1, ra8.8d            ; mov ra_link, unif             # ; link - load after we've used its previous val\n+  ror ra1.8a, r1, ra8.8c        ; v8min rb8, r0, rb5\n+# >>> branch ra_link\n+\n+# r5 = -8\n+# r2 = fir_off_val\n+# r3 = 128\n+.endm\n+\n+:per_block_setup_8\n+  m_per_block_setup 8\n+\n+\n+\n+################################################################################\n+#\n+# mc_filter_y_pxx\n+#\n+# Setup (& therefore uniform struct) shared with _bxx\n+# Struct in m_luma_setup\n+#\n+# We can have 2 separate P reqs here as long as they mate to generate a\n+# rectangular output block (i.e. h0 = h1, w0 = 8)\n+#\n+# At this point we have already issued PREREAD pairs of texture requests for the current block\n+\n+.macro m_filter_y_pxx, v_bit_depth\n+\n+# denom shift values\n+.set i_wt_den_p5,                  (DENOM + 13 - v_bit_depth)\n+.set i_wt_den_p6,                  (DENOM + 14 - v_bit_depth)\n+\n+  m_luma_setup v_bit_depth\n+\n+  shl r1, ra_wt_off_l0, i_wt_den_p5\n+  add ra_wt_mul_l0, ra_wt_mul_l0, r3 ; mul24 r0, r2, ra_wt_mul_l0 # r2 = 0x4000 so mul24 safe even with -ve wt_mul\n+  sub rb_wt_off, r1, r0         ; mov ra_ef.8a, rb4\n+\n+# retrieve texture results and pick out bytes\n+# then submit two more texture requests\n+\n+# This loop is identical to the B loop from here --->\n+:1\n+  add.setf -, ra_ef, ra_ef      ; mul24 ra4, rb5, ra_ef\n+\n+  max r2, ra_y, 0               ; mov r1, 0\n+  min r2, r2, rb_max_y          ; mov r3, ra_k1\n+  add ra_y, ra_y, r3            ; mul24 r2, r2, rb_pitch        ; ldtmu0\n+  add t0s, ra_base, r2          ; mov rb5,  rb6\n+  shr r0, r4, ra_xshift         ; mov rb6,  rb7\n+\n+  max r2, ra_y2, r1             ; v8min r0, r0, rb_pmask        ; ldtmu1 # ; masks out all but wanted bytes\n+  shr r1, r4, rb_xshift2        ; mov rb7, ra8\n+  min r2, r2, rb_max_y          ; v8min r1, r1, ra_pmax\n+  add ra_y2, ra_y2, r3          ; mul24 r2, r2, rb_pitch\n+  add t1s, rb_base2, r2         ; mov ra8,  ra9\n+\n+# apply horizontal filter\n+  add r5rep, r5, r3     ; mul24      r2, ra0.8a << 8,  r1 << 8  @ \"mul_used\", 0\n+  mov r3, rb_fir_off_h  ; mul24.ifnn r2, ra0.8a,       r0\n+  sub r2, r3, r2        ; mul24      r3, ra0.8b << 1,  r0 << 1  @ \"mul_used\", 0\n+  nop                   ; mul24.ifn  r3, ra0.8b << 9,  r1 << 9  @ \"mul_used\", 0\n+  add r2, r2, r3        ; mul24      r3, ra0.8c << 2,  r0 << 2  @ \"mul_used\", 0\n+  nop                   ; mul24.ifn  r3, ra0.8c << 10, r1 << 10 @ \"mul_used\", 0\n+  sub r2, r2, r3        ; mul24      r3, ra0.8d << 3,  r0 << 3  @ \"mul_used\", 0\n+  nop                   ; mul24.ifn  r3, ra0.8d << 11, r1 << 11 @ \"mul_used\", 0\n+  add r2, r2, r3        ; mul24      r3, ra1.8a << 4,  r0 << 4  @ \"mul_used\", 0\n+  nop                   ; mul24.ifn  r3, ra1.8a << 12, r1 << 12 @ \"mul_used\", 0\n+  add r2, r2, r3        ; mul24      r3, ra1.8b << 5,  r0 << 5  @ \"mul_used\", 0\n+  nop                   ; mul24.ifn  r3, ra1.8b << 13, r1 << 13 @ \"mul_used\", 0\n+  sub r2, r2, r3        ; mul24      r3, ra1.8c << 6,  r0 << 6  @ \"mul_used\", 0\n+  nop                   ; mul24.ifn  r3, ra1.8c << 14, r1 << 14 @ \"mul_used\", 0\n+  add r2, r2, r3        ; mul24      r3, ra1.8d << 7,  r0 << 7  @ \"mul_used\", 0\n+  add.setf -, r5, r5    ; mul24.ifn  r3, ra1.8d << 15, r1 << 15 @ \"mul_used\", 0\n+\n+  brr.anyn -, r:1b\n+  sub r2, r2, r3                ; mul24 r1, rb5,  ra2.8b\n+  mov ra9,  rb10                ; mul24 r0, rb10, ra3.8b\n+  asr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11\n+  # >>> .anyn 1b (r5 + r5)\n+\n+  # apply vertical filter and write to VPM\n+  # - r4* + r5 - r6 + r7 + r8 - r9 + r10 - r11\n+\n+  sub r1, r1, r0                ; mul24 r0, rb6,  ra2.8c\n+  sub r1, r1, r0                ; mul24 r0, rb7,  ra2.8d\n+  add r1, r1, r0                ; mul24 r0, ra8,  rb8\n+  add r1, r1, r0                ; mul24 r0, rb10, ra3.8c\n+  add r1, r1, r0                ; mul24 r0, ra11, rb11\n+# <--- to here\n+  sub.setf -, r5, rb_i_tmu      ; mov r3, ra_blk_height                 # ; NxtLoop: r3 = block height\n+  sub r1, r1, ra4               ; mov.ifz rb_base2, rb_base2_next\n+  sub r1, r1, r0                ; mov.ifz ra_base, ra_base_next\n+\n+  asr r1, r1, 6                 ; mov.ifz ra_y_y2, ra_y_y2_next\n+  sub.setf -, r5, rb_lcount     ; mul24 r0, r1, ra_wt_mul_l0\n+  add r0, r0, rb_wt_off         ; mul24 r1, r1, ra_kmul_add\n+  sub r1, r0, r1                ; v8subs r0, ra_height, r3              # ; NxtLoop: r0 = remaining height (0 saturate)\n+\n+  brr.anyn -, r:1b\n+  asr r1, r1, i_wt_den_p6\n+  min r1, r1, ra_pmax           ; mov -, vw_wait\n+  max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch                # ; NxtLoop\n+# >>> branch.anyn 1b (r5 - rb_lcount)\n+\n+# r0 = remaining height (min 0)\n+# r2 = r3 * rb_pitch\n+# r3 = block_height\n+\n+# If looping again then we consumed 16 height last loop\n+# rb_dma1 (stride) remains constant\n+# rb_i_tmu remains const (based on total height)\n+# recalc ra_dma0, rb_lcount based on new segment height\n+\n+  mov.setf ra_height, r0        ; mov vw_setup, ra_dma0 # VDW setup 0\n+\n+# DMA out\n+  bra.anyz -, ra_link\n+  min r0, r0, r3                ; mov vw_setup, rb_dma1 # Stride\n+  sub r1, r0, r3                ; mov vw_addr, ra_dest  # start the VDW\n+  shl r1, r1, i_shift23\n+# >>> .anyz ra_link\n+\n+# Here r1 = cur_blk_height - 16 so it will be 0 or -ve\n+# We add to dma0 to reduce the number of output lines in the final block\n+  brr -, r:1b\n+  add rb_lcount, rb_lcount, r0\n+  add ra_dma0, ra_dma0, r1\n+  add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init     # ; Reset our VDM write pointer\n+# >>> 1b\n+.endm\n+\n+::mc_filter_y_pxx\n+  m_filter_y_pxx 8\n+\n+\n+################################################################################\n+\n+# mc_filter_b(y_x, base, y2_x2, base2, width_height, my2_mx2_my_mx, offsetweight0, this_dst, next_kernel)\n+#\n+# Setup (& therefore uniform struct) shared with _pxx\n+# Struct in m_luma_setup\n+#\n+# l0 calc in els 0-7, L1 in 8-15\n+# Only els 0-7 write data that is stored back to ram (els 8-15 may write tosh)\n+#\n+# At this point we have already issued PREREAD pairs of texture requests for the current block\n+\n+.macro m_filter_y_bxx, v_bit_depth\n+\n+# denom shift values\n+.set i_wt_den_p5,                  (DENOM + 13 - v_bit_depth)\n+.set i_wt_den_p6,                  (DENOM + 14 - v_bit_depth)\n+\n+  m_luma_setup v_bit_depth\n+\n+  shl r1, ra_wt_off_l0, i_wt_den_p6\n+  add ra_wt_mul_l0, ra_wt_mul_l0, r3 ; mul24 r0, r2, ra_wt_mul_l0\n+  sub r1, r1, r0                ; mul24 r0, r2, ra_wt_mul_l1\n+  sub rb_wt_off, r1, r0         ; mov ra_ef.8a, rb4\n+\n+# This loop is identical to the P loop from here --->\n+:1\n+  add.setf -, ra_ef, ra_ef      ; mul24 ra4, rb5, ra_ef\n+\n+  max r2, ra_y, 0               ; mov r1, 0\n+  min r2, r2, rb_max_y          ; mov r3, ra_k1\n+  add ra_y, ra_y, r3            ; mul24 r2, r2, rb_pitch        ; ldtmu0\n+  add t0s, ra_base, r2          ; mov rb5,  rb6\n+  shr r0, r4, ra_xshift         ; mov rb6,  rb7\n+\n+  max r2, ra_y2, r1             ; v8min r0, r0, rb_pmask        ; ldtmu1 # ; masks out all but wanted bytes\n+  shr r1, r4, rb_xshift2        ; mov rb7, ra8\n+  min r2, r2, rb_max_y          ; v8min r1, r1, ra_pmax\n+  add ra_y2, ra_y2, r3          ; mul24 r2, r2, rb_pitch\n+  add t1s, rb_base2, r2         ; mov ra8,  ra9\n+\n+# apply horizontal filter\n+  add r5rep, r5, r3     ; mul24      r2, ra0.8a << 8,  r1 << 8  @ \"mul_used\", 0\n+  mov r3, rb_fir_off_h  ; mul24.ifnn r2, ra0.8a,       r0\n+  sub r2, r3, r2        ; mul24      r3, ra0.8b << 1,  r0 << 1  @ \"mul_used\", 0\n+  nop                   ; mul24.ifn  r3, ra0.8b << 9,  r1 << 9  @ \"mul_used\", 0\n+  add r2, r2, r3        ; mul24      r3, ra0.8c << 2,  r0 << 2  @ \"mul_used\", 0\n+  nop                   ; mul24.ifn  r3, ra0.8c << 10, r1 << 10 @ \"mul_used\", 0\n+  sub r2, r2, r3        ; mul24      r3, ra0.8d << 3,  r0 << 3  @ \"mul_used\", 0\n+  nop                   ; mul24.ifn  r3, ra0.8d << 11, r1 << 11 @ \"mul_used\", 0\n+  add r2, r2, r3        ; mul24      r3, ra1.8a << 4,  r0 << 4  @ \"mul_used\", 0\n+  nop                   ; mul24.ifn  r3, ra1.8a << 12, r1 << 12 @ \"mul_used\", 0\n+  add r2, r2, r3        ; mul24      r3, ra1.8b << 5,  r0 << 5  @ \"mul_used\", 0\n+  nop                   ; mul24.ifn  r3, ra1.8b << 13, r1 << 13 @ \"mul_used\", 0\n+  sub r2, r2, r3        ; mul24      r3, ra1.8c << 6,  r0 << 6  @ \"mul_used\", 0\n+  nop                   ; mul24.ifn  r3, ra1.8c << 14, r1 << 14 @ \"mul_used\", 0\n+  add r2, r2, r3        ; mul24      r3, ra1.8d << 7,  r0 << 7  @ \"mul_used\", 0\n+  add.setf -, r5, r5    ; mul24.ifn  r3, ra1.8d << 15, r1 << 15 @ \"mul_used\", 0\n+\n+  brr.anyn -, r:1b\n+  sub r2, r2, r3                ; mul24 r1, rb5,  ra2.8b\n+  mov ra9,  rb10                ; mul24 r0, rb10, ra3.8b\n+  asr ra11, r2, v_bit_depth - 8 ; mov rb10, ra11\n+  # >>> .anyn 1b (r5 + r5)\n+\n+  # apply vertical filter and write to VPM\n+  # - r4* + r5 - r6 + r7 + r8 - r9 + r10 - r11\n+\n+  sub r1, r1, r0                ; mul24 r0, rb6,  ra2.8c\n+  sub r1, r1, r0                ; mul24 r0, rb7,  ra2.8d\n+  add r1, r1, r0                ; mul24 r0, ra8,  rb8\n+  add r1, r1, r0                ; mul24 r0, rb10, ra3.8c\n+  add r1, r1, r0                ; mul24 r0, ra11, rb11\n+# <--- to here\n+  sub r1, r1, ra4\n+  sub r1, r1, r0                ; mov r2, rb_wt_off\n+\n+  asr r1, r1, 6\n+  sub.setf -, r5, rb_i_tmu      ; mul24 r0, r1, ra_wt_mul_l0\n+  mov.ifz rb_base2, rb_base2_next ; mul24 r1, r1, ra_kmul_add\n+  sub r1, r0, r1                ; mov.ifz ra_y_y2, ra_y_y2_next\n+  sub.setf -, r5, rb_lcount     ; mov.ifz ra_base, ra_base_next\n+  add r1, r1, r2                ; mov r0, r1 << 8\n+  add r1, r1, r0                ; mov r3, ra_blk_height         # ; NxtLoop: r3 = block height\n+\n+  brr.anyn -, r:1b\n+  asr r1, r1, ra_wt_den_p7      ; mul24 r2, r3, rb_pitch        # ; NxtLoop\n+  min r1, r1, ra_pmax           ; mov -, vw_wait\n+  max vpm, r1, 0                ; v8subs r0, ra_height, r3      # ; NxtLoop: r0 = remaining height (0 saturate)\n+# >>> branch.anyn 1b (r5 - rb_lcount)\n+\n+# r0 = remaining height (min 0)\n+# r2 = r3 * rb_pitch\n+# r3 = block_height\n+\n+# If looping again then we consumed block_height last loop\n+# rb_dma1 (stride) remains constant\n+# rb_i_tmu remains const (based on total height)\n+# recalc ra_dma0, rb_lcount based on new segment height\n+\n+  mov.setf ra_height, r0        ; mov vw_setup, ra_dma0         # VDW setup 0\n+\n+# DMA out\n+  bra.anyz -, ra_link\n+  min r0, r0, r3                ; mov vw_setup, rb_dma1         # Stride\n+  sub r1, r0, r3                ; mov vw_addr, ra_dest          # start the VDW\n+  shl r1, r1, i_shift23\n+# >>> .anyz ra_link (ra_height - remaining height)\n+\n+# Here r1 = cur_blk_height - blk_height so it will be 0 or -ve\n+# We add to dma0 to reduce the number of output lines in the final block\n+  brr -, r:1b\n+  add rb_lcount, rb_lcount, r0\n+  add ra_dma0, ra_dma0, r1\n+  add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init     # ; Reset our VDM write pointer\n+# >>> 1b\n+.endm\n+\n+::mc_filter_y_bxx\n+  m_filter_y_bxx 8\n+\n+################################################################################\n+#\n+# typedef struct qpu_mc_pred_y_p00_s {\n+#    qpu_mc_src_t next_src1;\n+#    uint16_t h;\n+#    uint16_t w;\n+#    uint32_t wo1;\n+#    uint32_t dst_addr;\n+#    uint32_t next_fn;\n+# } qpu_mc_pred_y_p00_t;\n+\n+.macro m_filter_y_p00, v_bit_depth\n+\n+.if v_bit_depth <= 8\n+.set v_x_shift,         0\n+.set v_x_mul,           1\n+# Shifts to get width & height in the right place in ra_dma0\n+.set v_dma_h_shift,     7\n+.set v_dma_wh_shift,    i_shift16\n+.else\n+.set v_x_shift,         1\n+.set v_x_mul,           2\n+# Shifts to get width & height in the right place in ra_dma0\n+.set v_dma_h_shift,     8\n+.set v_dma_wh_shift,    15\n+.endif\n+\n+  mov ra0, unif                 ; mov r0, elem_num              # y_x\n+  mov ra_xshift, ra_xshift_next ; v8subs r5rep, r5, r5          # [ra0 delay] ; r5 = 0\n+  add r0, ra0.16b, r0           ; mov ra_base_next, unif        # ; src1.base\n+.if v_x_shift != 0\n+  shl r0, r0, v_x_shift\n+.endif\n+\n+  max r0, r0, r5                ; mov ra_y_next, ra0.16a        # ; width_height\n+  min r0, r0, rb_max_x          ; mov ra_width_height, unif\n+\n+  shl ra_xshift_next, r0, 3                                     # Compute shifts\n+  and r0, r0, -4\n+  sub r2, r5, rb_pitch          ; mov ra_wt_off_mul_l0, unif    # ; weight_offset\n+  and r1, r0, r2\n+  xor r0, r0, r1                ; mul24 r1, r1, rb_xpitch\n+  add r0, r0, r1                ; mov ra_dest, unif             # Add stripe offsets ; dest addr\n+  add ra_base_next, ra_base_next, r0 ; mov vw_setup, rb_vpm_init  # [ra_width delay] ; set up VPM write\n+\n+# get width,height of block (unif load above)\n+# Compute vdw_setup1(dst_pitch-width)\n+  shl r1, ra_width, v_x_shift\n+  sub rb_dma1, rb_dma1_base, r1 ; mov r0, ra_height\n+  sub rb_i_tmu, r0, PREREAD     ; v8min r0, r0, ra_blk_height\n+  shl r0, r0, v_dma_h_shift     ; mov rb_lcount, r0\n+  add r0, r0, r1                                                # Combine width and height of destination area\n+  shl rb_wt_off, ra_wt_off_l0, DENOM + 7\n+  shl r0, r0, v_dma_wh_shift    ; mov ra_link, unif             # Shift into bits 16 upwards of the vdw_setup0 register ; link\n+  add ra_dma0, r0, rb_dma0_base\n+\n+:1\n+  sub.setf -, r5, rb_i_tmu      ; v8adds r5rep, r5, ra_k1\n+  nop                           ; mov.ifz ra_y, ra_y_next       ; ldtmu0\n+  shr r0, r4, ra_xshift         ; mov r3, rb_pitch\n+\n+  max r2, ra_y, 0  # y\n+  min r2, r2, rb_max_y          ; mov.ifz ra_base, ra_base_next\n+  add ra_y, ra_y, 1             ; mul24 r2, r2, r3\n+  add t0s, ra_base, r2          ; v8min r0, r0, rb_pmask\n+\n+  sub.setf -, r5, rb_lcount     ; mul24 r1, r0, ra_wt_mul_l0\n+  shl r1, r1, 8                 ; mov r3, ra_blk_height\n+  add r1, r1, rb_wt_off         ; v8subs r0, ra_height, r3\n+\n+  brr.anyn -, r:1b\n+  asr r1, r1, DENOM + 8\n+  min r1, r1, ra_pmax           ; mov -, vw_wait\n+  max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch\n+# >>> branch.anyn 1b\n+\n+# r0 = remaining height (min 0)\n+# r2 = r3 * rb_pitch\n+# r3 = block_height\n+\n+# If looping again then we consumed 16 height last loop\n+# rb_dma1 (stride) remains constant\n+# rb_i_tmu remains const (based on total height)\n+# recalc ra_dma0, rb_lcount based on new segment height\n+\n+  mov.setf ra_height, r0 ; mov vw_setup, ra_dma0 # VDW setup 0\n+\n+# DMA out\n+  bra.anyz -, ra_link\n+  min r0, r0, r3        ; mov vw_setup, rb_dma1 # Stride\n+  sub r1, r0, r3        ; mov vw_addr, ra_dest  # start the VDW\n+  shl r1, r1, i_shift23\n+# >>> .anyz ra_link\n+\n+# Here r1 = cur_blk_height - 16 so it will be 0 or -ve\n+# We add to dma0 to reduce the number of output lines in the final block\n+  brr -, r:1b\n+  add rb_lcount, rb_lcount, r0\n+  add ra_dma0, ra_dma0, r1\n+  add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init     # ; Reset our VDM write pointer\n+# >>> 1b\n+.endm\n+\n+::mc_filter_y_p00\n+  m_filter_y_p00 8\n+\n+################################################################################\n+\n+.macro m_filter_y_b00, v_bit_depth\n+# luma setup does a fair bit more than we need calculating filter coeffs\n+# that we will never use but it saves I-cache to use it (also simple!)\n+  m_luma_setup v_bit_depth\n+\n+# Fix up vals that were expecting a filter (somewhat icky)\n+  mov r2, 1\n+  add rb_i_tmu, rb_i_tmu, r2    ; mov r1, ra_wt_off_mul_l0      # Need in rX rather than raX for <<8 to do what we want\n+  shl rb_wt_off, ra_wt_off_l0, DENOM + 8 ; v8subs r5quad, r5, r5 # [r1 << delay] ; r5quad OK for zero\n+  nop                           ; mov.ifnz ra_wt_off_mul_l0, r1 << 8\n+\n+:1\n+  sub.setf -, r5, rb_i_tmu      ; nop                           ; ldtmu1\n+  shr r1, r4, rb_xshift2        ; mov.ifz ra_y_y2, ra_y_y2_next ; ldtmu0\n+  shr r0, r4, ra_xshift         ; mov r3, rb_pitch\n+\n+  max r2, ra_y, 0  # y\n+  min r2, r2, rb_max_y          ; mov.ifz ra_base, ra_base_next\n+  add ra_y, ra_y, 1             ; mul24 r2, r2, r3\n+  add t0s, ra_base, r2          ; mov.ifz rb_base2, rb_base2_next\n+\n+  max r2, ra_y2, 0\n+  min r2, r2, rb_max_y\n+  add ra_y2, ra_y2, 1           ; mul24 r2, r2, r3\n+  add t1s, rb_base2, r2         ; v8min r0, r0, ra_pmax         # v8subs masks out all but bottom byte\n+  and r1, r1, rb_pmask          ; mul24 r0, r0, ra_wt_mul_l0\n+\n+  sub.setf -, r5, rb_lcount     ; mul24 r1, r1, ra_wt_mul_l1\n+  add r1, r0, r1                ; v8adds r5rep, r5, ra_k1\n+\n+  shl r1, r1, 8                 ; mov r3, ra_blk_height\n+  add r1, r1, rb_wt_off         ; v8subs r0, ra_height, r3\n+\n+  brr.anyn -, r:1b\n+  asr r1, r1, (DENOM + 9) - 32                                  # -32 to get valid shift immediate\n+  min r1, r1, ra_pmax           ; mov -, vw_wait\n+  max vpm, r1, ra_k0            ; mul24 r2, r3, rb_pitch\n+# >>> branch.anyn 1b\n+\n+# r0 = remaining height (min 0)\n+# r2 = r3 * rb_pitch\n+# r3 = block_height\n+\n+# If looping again then we consumed 16 height last loop\n+# rb_dma1 (stride) remains constant\n+# rb_i_tmu remains const (based on total height)\n+# recalc ra_dma0, rb_lcount based on new segment height\n+\n+  mov.setf ra_height, r0        ; mov vw_setup, ra_dma0         # ; VDW setup 0\n+\n+# DMA out\n+  bra.anyz -, ra_link\n+  min r0, r0, r3                ; mov vw_setup, rb_dma1         # ; Stride\n+  sub r1, r0, r3                ; mov vw_addr, ra_dest          # ; start the VDW\n+  shl r1, r1, i_shift23\n+# >>> .anyz ra_link\n+\n+# Here r1 = cur_blk_height - 16 so it will be 0 or -ve\n+# We add to dma0 to reduce the number of output lines in the final block\n+  brr -, r:1b\n+  add rb_lcount, rb_lcount, r0\n+  add ra_dma0, ra_dma0, r1\n+  add ra_dest, ra_dest, r2      ; mov vw_setup, rb_vpm_init     # ; Reset our VDM write pointer\n+# >>> 1b\n+.endm\n+\n+::mc_filter_y_b00\n+  m_filter_y_b00 8\n+\n+################################################################################\n+################################################################################\n+# 10 BIT\n+\n+::mc_setup_c10_q0\n+  m_setup_q0\n+::mc_setup_c10_qn\n+  m_setup_c 10\n+\n+::mc_filter_c10_p\n+  m_filter_c_p 0, 10\n+\n+::mc_filter_c10_p_l1\n+  m_filter_c_p 1, 10\n+\n+\n+::mc_filter_c10_b\n+  m_filter_c_b 10\n+\n+# Even if these fns are the same as for other bit depths we want our own copy\n+# to keep the code we are using in a single lump to avoid (direct map) cache\n+# thrashing\n+.set v_quads10, N_QPU_16 / 4\n+\n+::mc_sync10_q0\n+  m_sync_q 0, v_quads10\n+::mc_sync10_q1\n+  m_sync_q 1, v_quads10\n+::mc_sync10_q2\n+  m_sync_q 2, v_quads10\n+::mc_sync10_q3\n+  m_sync_q 3, v_quads10\n+::mc_sync10_q4\n+  m_sync_q 4, v_quads10\n+::mc_sync10_q5\n+  m_sync_q 5, v_quads10\n+::mc_sync10_q6\n+  m_sync_q 6, v_quads10\n+::mc_sync10_q7\n+  m_sync_q 7, v_quads10\n+::mc_sync10_q8\n+  m_sync_q 8, v_quads10\n+::mc_sync10_q9\n+  m_sync_q 9, v_quads10\n+::mc_sync10_q10\n+  m_sync_q 10, v_quads10\n+::mc_sync10_q11\n+  m_sync_q 11, v_quads10\n+\n+::mc_exit_y10_q0\n+::mc_exit_c10_q0\n+  m_exit_q0\n+\n+::mc_exit_y10_qn\n+::mc_exit_c10_qn\n+  m_exit_qn\n+\n+::mc_setup_y10_q0\n+  m_setup_q0\n+::mc_setup_y10_qn\n+  m_setup_y 10\n+\n+:per_block_setup_10\n+  m_per_block_setup 10\n+\n+::mc_filter_y10_pxx\n+  m_filter_y_pxx 10\n+\n+::mc_filter_y10_p00\n+  m_filter_y_p00 10\n+\n+::mc_filter_y10_bxx\n+  m_filter_y_bxx 10\n+\n+::mc_filter_y10_b00\n+  m_filter_y_b00 10\n+\n+\n+\n+::mc_end\n+# Do not add code here because mc_end must appear after all other code.\ndiff --git a/libavcodec/rpi_hevc_shader_cmd.h b/libavcodec/rpi_hevc_shader_cmd.h\nnew file mode 100644\nindex 0000000000..89711d776b\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_shader_cmd.h\n@@ -0,0 +1,165 @@\n+/*\n+Copyright (c) 2017 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+*/\n+\n+#ifndef RPI_SHADER_CMD_H\n+#define RPI_SHADER_CMD_H\n+\n+#pragma pack(push, 4)\n+\n+#if RPI_QPU_EMU_C && RPI_QPU_EMU_Y\n+// If mixed then we are just confused and get a lot of warnings....\n+typedef const uint8_t * qpu_mc_src_addr_t;\n+typedef uint8_t * qpu_mc_dst_addr_t;\n+#else\n+typedef uint32_t qpu_mc_src_addr_t;\n+typedef uint32_t qpu_mc_dst_addr_t;\n+#endif\n+\n+typedef struct qpu_mc_src_s\n+{\n+    int16_t y;\n+    int16_t x;\n+    qpu_mc_src_addr_t base;\n+} qpu_mc_src_t;\n+\n+\n+typedef struct qpu_mc_pred_c_p_s {\n+    qpu_mc_src_t next_src;\n+    uint16_t h;\n+    uint16_t w;\n+    uint32_t coeffs_x;\n+    uint32_t coeffs_y;\n+    uint32_t wo_u;\n+    uint32_t wo_v;\n+    qpu_mc_dst_addr_t dst_addr_c;\n+    uint32_t next_fn;\n+} qpu_mc_pred_c_p_t;\n+\n+typedef struct qpu_mc_pred_c_b_s {\n+    qpu_mc_src_t next_src1;\n+    uint16_t h;\n+    uint16_t w;\n+    uint32_t coeffs_x1;\n+    uint32_t coeffs_y1;\n+    int16_t weight_u1;\n+    int16_t weight_v1;\n+    qpu_mc_src_t next_src2;\n+    uint32_t coeffs_x2;\n+    uint32_t coeffs_y2;\n+    uint32_t wo_u2;\n+    uint32_t wo_v2;\n+    qpu_mc_dst_addr_t dst_addr_c;\n+    uint32_t next_fn;\n+} qpu_mc_pred_c_b_t;\n+\n+typedef struct qpu_mc_pred_c_s_s {\n+    qpu_mc_src_t next_src1;\n+    uint32_t pic_cw;            // C Width (== Y width / 2)\n+    uint32_t pic_ch;            // C Height (== Y Height / 2)\n+    uint32_t stride2;\n+    uint32_t stride1;\n+    qpu_mc_src_t next_src2;\n+    uint32_t next_fn;\n+} qpu_mc_pred_c_s_t;\n+\n+typedef struct qpu_mc_pred_c_s {\n+    union {\n+        qpu_mc_pred_c_p_t p;\n+        qpu_mc_pred_c_b_t b;\n+        qpu_mc_pred_c_s_t s;\n+    };\n+} qpu_mc_pred_c_t;\n+\n+\n+typedef struct qpu_mc_pred_y_p_s {\n+    qpu_mc_src_t next_src1;\n+    qpu_mc_src_t next_src2;\n+    uint16_t h;\n+    uint16_t w;\n+    uint32_t mymx21;\n+    uint32_t wo1;\n+    uint32_t wo2;\n+    qpu_mc_dst_addr_t dst_addr;\n+    uint32_t next_fn;\n+} qpu_mc_pred_y_p_t;\n+\n+typedef struct qpu_mc_pred_y_p00_s {\n+    qpu_mc_src_t next_src1;\n+    uint16_t h;\n+    uint16_t w;\n+    uint32_t wo1;\n+    qpu_mc_dst_addr_t dst_addr;\n+    uint32_t next_fn;\n+} qpu_mc_pred_y_p00_t;\n+\n+typedef struct qpu_mc_pred_y_s_s {\n+    qpu_mc_src_t next_src1;\n+    qpu_mc_src_t next_src2;\n+    uint16_t pic_h;\n+    uint16_t pic_w;\n+    uint32_t stride2;\n+    uint32_t stride1;\n+    uint32_t next_fn;\n+} qpu_mc_pred_y_s_t;\n+\n+typedef struct qpu_mc_pred_sync_s {\n+    uint32_t next_fn;\n+} qpu_mc_pred_sync_t;\n+\n+// Only a useful structure in that it allows us to return something other than a void *\n+typedef struct qpu_mc_pred_y_s {\n+    union {\n+        qpu_mc_pred_y_p_t p;\n+        qpu_mc_pred_y_p00_t p00;\n+        qpu_mc_pred_y_s_t s;\n+    };\n+} qpu_mc_pred_y_t;\n+\n+typedef union qpu_mc_pred_cmd_u {\n+    qpu_mc_pred_y_t y;\n+    qpu_mc_pred_c_t c;\n+    qpu_mc_pred_sync_t sync;\n+} qpu_mc_pred_cmd_t;\n+\n+static void inline qpu_mc_link_set(qpu_mc_pred_cmd_t * const cmd, const uint32_t fn)\n+{\n+    // Link is last el of previous cmd\n+    ((uint32_t *)cmd)[-1] = fn;\n+}\n+\n+#define QPU_MC_PRED_N_Y8        12\n+#define QPU_MC_PRED_N_C8        12\n+\n+#define QPU_MC_PRED_N_Y10       12\n+#define QPU_MC_PRED_N_C10       12\n+\n+#define QPU_MC_DENOM            7\n+\n+#pragma pack(pop)\n+\n+#endif\n+\ndiff --git a/libavcodec/rpi_hevc_shader_template.c b/libavcodec/rpi_hevc_shader_template.c\nnew file mode 100644\nindex 0000000000..77d8366eb8\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_shader_template.c\n@@ -0,0 +1,88 @@\n+/*\n+Copyright (c) 2017 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+*/\n+\n+#include \"hevc.h\"\n+#include \"rpi_hevcdec.h\"\n+#include \"libavutil/rpi_sand_fns.h\"\n+#include \"rpi_hevc_shader_cmd.h\"\n+#include \"rpi_hevc_shader_template.h\"\n+\n+typedef struct shader_track_s\n+{\n+    const union qpu_mc_pred_cmd_u *qpu_mc_curr;\n+    const struct qpu_mc_src_s *last_l0;\n+    const struct qpu_mc_src_s *last_l1;\n+    uint32_t width;  // pic_width * PW\n+    uint32_t height;\n+    uint32_t stride2;\n+    uint32_t stride1;\n+} shader_track_t;\n+\n+static int wtoidx(const unsigned int w)\n+{\n+    static const uint8_t pel_weight[65] = { [2] = 0, [4] = 1, [6] = 2, [8] = 3, [12] = 4, [16] = 5, [24] = 6, [32] = 7, [48] = 8, [64] = 9 };\n+    return pel_weight[w];\n+}\n+\n+static const int fctom(uint32_t x)\n+{\n+    int rv;\n+    // As it happens we can take the 2nd filter term & divide it by 8\n+    // (dropping fractions) to get the fractional move\n+    rv = 8 - ((x >> 11) & 0xf);\n+    av_assert2(rv >= 0 && rv <= 7);\n+    return rv;\n+}\n+\n+static inline int32_t ext(int32_t x, unsigned int shl, unsigned int shr)\n+{\n+    return (x << shl) >> shr;\n+}\n+\n+static inline int woff_p(HEVCRpiContext *const s, int32_t x)\n+{\n+    return ext(x, 0, 17 + s->ps.sps->bit_depth - 8);\n+}\n+\n+static inline int woff_b(HEVCRpiContext *const s, int32_t x)\n+{\n+    return ext(x - 0x10000, 0, 16 + s->ps.sps->bit_depth - 8);\n+}\n+\n+static inline int wweight(int32_t x)\n+{\n+    return ext(x, 16, 16);\n+}\n+\n+\n+#define PW 1\n+#include \"rpi_hevc_shader_template_fn.h\"\n+\n+#undef PW\n+#define PW 2\n+#include \"rpi_hevc_shader_template_fn.h\"\n+\ndiff --git a/libavcodec/rpi_hevc_shader_template.h b/libavcodec/rpi_hevc_shader_template.h\nnew file mode 100644\nindex 0000000000..0fc5a45e9f\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_shader_template.h\n@@ -0,0 +1,49 @@\n+/*\n+Copyright (c) 2017 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+*/\n+\n+#ifndef LIBAVCODEC_RPI_SHADER_TEMPLATE_H\n+#define LIBAVCODEC_RPI_SHADER_TEMPLATE_H\n+\n+struct HEVCRpiContext;\n+struct HEVCRpiInterPredEnv;\n+\n+void ff_hevc_rpi_shader_c8(struct HEVCRpiContext *const s,\n+                  const struct HEVCRpiInterPredEnv *const ipe_y,\n+                  const struct HEVCRpiInterPredEnv *const ipe_c);\n+\n+void ff_hevc_rpi_shader_c16(struct HEVCRpiContext *const s,\n+                  const struct HEVCRpiInterPredEnv *const ipe_y,\n+                  const struct HEVCRpiInterPredEnv *const ipe_c);\n+\n+void rpi_sand_dump8(const char * const name,\n+                    const uint8_t * const base, const int stride1, const int stride2, int x, int y, int w, int h, const int is_c);\n+\n+void rpi_sand_dump16(const char * const name,\n+                     const uint8_t * const base, const int stride1, const int stride2, int x, int y, int w, int h, const int is_c);\n+\n+#endif\n+\ndiff --git a/libavcodec/rpi_hevc_shader_template_fn.h b/libavcodec/rpi_hevc_shader_template_fn.h\nnew file mode 100644\nindex 0000000000..10c163a4b9\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_shader_template_fn.h\n@@ -0,0 +1,502 @@\n+/*\n+Copyright (c) 2017 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+*/\n+\n+#define STRCAT(x,y) x##y\n+\n+#if PW == 1\n+#define pixel uint8_t\n+#define FUNC(f) STRCAT(f, 8)\n+#elif PW == 2\n+#define pixel uint16_t\n+#define FUNC(f) STRCAT(f, 16)\n+#else\n+#error Unexpected PW\n+#endif\n+\n+#define PATCH_STRIDE (16 * PW)\n+\n+static void FUNC(dup_lr)(uint8_t * dst, const uint8_t * src, unsigned int w, unsigned int h, unsigned int stride)\n+{\n+    for (unsigned int i = 0; i != h; ++i, dst += stride, src += stride) {\n+        const pixel s = *(const pixel *)src;\n+        pixel * d = (pixel *)dst;\n+        for (unsigned int j = 0; j < w; j += PW) {\n+            *d++ = s;\n+        }\n+    }\n+}\n+\n+static void FUNC(dup_tb)(uint8_t * dst, const uint8_t * src, unsigned int w, unsigned int h, unsigned int stride)\n+{\n+    for (unsigned int i = 0; i != h; ++i, dst += stride) {\n+        memcpy(dst, src, w);\n+    }\n+}\n+\n+static void FUNC(get_patch_y)(const shader_track_t * const st,\n+                         uint8_t * dst, const unsigned int dst_stride,\n+                         const qpu_mc_src_t *src,\n+                         unsigned int _w, unsigned int _h)\n+{\n+    int x = src->x * PW;\n+    int y = src->y;\n+    int w = _w * PW;\n+    int h = _h;\n+    int dl = 0;\n+    int dr = 0;\n+    int dt = 0;\n+    int db = 0;\n+\n+    if (x < 0) {\n+        if (-x >= w)\n+            x = PW - w;\n+        dl = -x;\n+        w += x;\n+        x = 0;\n+    }\n+    if (x + w > st->width) {\n+        if (x >= st->width)\n+            x = st->width - PW;\n+        dr = (x + w) - st->width;\n+        w = st->width - x;\n+    }\n+\n+    // Y\n+    if (y < 0) {\n+        if (-y >= h)\n+            y = 1 - h;\n+        dt = -y;\n+        h += y;\n+        y = 0;\n+    }\n+    if (y + h > st->height) {\n+        if (y >= st->height)\n+            y = st->height - 1;\n+        db = (y + h) - st->height;\n+        h = st->height - y;\n+    }\n+\n+    dst += dl + dt * dst_stride;\n+    FUNC(av_rpi_sand_to_planar_y)(dst, dst_stride, (const uint8_t *)src->base, st->stride1, st->stride2, x, y, w, h);\n+\n+    // Edge dup\n+    if (dl != 0)\n+        FUNC(dup_lr)(dst - dl, dst, dl, h, dst_stride);\n+    if (dr != 0)\n+        FUNC(dup_lr)(dst + w, dst + w - PW, dr, h, dst_stride);\n+    w += dl + dr;\n+    dst -= dl;\n+\n+    if (dt != 0)\n+        FUNC(dup_tb)(dst - dt * dst_stride, dst, w, dt, dst_stride);\n+    if (db != 0)\n+        FUNC(dup_tb)(dst + h * dst_stride, dst + (h - 1) * dst_stride, w, db, dst_stride);\n+}\n+\n+\n+\n+static void FUNC(get_patch_c)(const shader_track_t * const st,\n+                         uint8_t * dst_u, uint8_t * dst_v, const unsigned int dst_stride,\n+                         const qpu_mc_src_t *src,\n+                         unsigned int _w, unsigned int _h)\n+{\n+    int x = src->x * PW;\n+    int y = src->y;\n+    int w = _w * PW;\n+    int h = _h;\n+    int dl = 0;\n+    int dr = 0;\n+    int dt = 0;\n+    int db = 0;\n+    const int width = st->width;\n+    const int height = st->height;\n+\n+    if (x < 0) {\n+        if (-x >= w)\n+            x = PW - w;\n+        dl = -x;\n+        w += x;\n+        x = 0;\n+    }\n+    if (x + w > width) {\n+        if (x >= width)\n+            x = width - PW;\n+        dr = (x + w) - width;\n+        w = width - x;\n+    }\n+\n+    // Y\n+    if (y < 0) {\n+        if (-y >= h)\n+            y = 1 - h;\n+        dt = -y;\n+        h += y;\n+        y = 0;\n+    }\n+    if (y + h > height) {\n+        if (y >= height)\n+            y = height - 1;\n+        db = (y + h) - height;\n+        h = height - y;\n+    }\n+\n+    dst_u += dl + dt * dst_stride;\n+    dst_v += dl + dt * dst_stride;\n+    FUNC(av_rpi_sand_to_planar_c)(dst_u, dst_stride, dst_v, dst_stride, (const uint8_t *)src->base, st->stride1, st->stride2, x, y, w, h);\n+\n+    // Edge dup\n+    if (dl != 0)\n+    {\n+        FUNC(dup_lr)(dst_u - dl, dst_u, dl, h, dst_stride);\n+        FUNC(dup_lr)(dst_v - dl, dst_v, dl, h, dst_stride);\n+    }\n+    if (dr != 0)\n+    {\n+        FUNC(dup_lr)(dst_u + w, dst_u + w - PW, dr, h, dst_stride);\n+        FUNC(dup_lr)(dst_v + w, dst_v + w - PW, dr, h, dst_stride);\n+    }\n+    w += dl + dr;\n+    dst_u -= dl;\n+    dst_v -= dl;\n+\n+    if (dt != 0)\n+    {\n+        FUNC(dup_tb)(dst_u - dt * dst_stride, dst_u, w, dt, dst_stride);\n+        FUNC(dup_tb)(dst_v - dt * dst_stride, dst_v, w, dt, dst_stride);\n+    }\n+    if (db != 0)\n+    {\n+        FUNC(dup_tb)(dst_u + h * dst_stride, dst_u + (h - 1) * dst_stride, w, db, dst_stride);\n+        FUNC(dup_tb)(dst_v + h * dst_stride, dst_v + (h - 1) * dst_stride, w, db, dst_stride);\n+    }\n+}\n+\n+// w, y, w, h in pixels\n+// stride1, stride2 in bytes\n+void FUNC(rpi_sand_dump)(const char * const name,\n+                         const uint8_t * const base, const int stride1, const int stride2, int x, int y, int w, int h, const int is_c)\n+{\n+    const int mask = stride2 == 0 ? ~0 : stride1 - 1;\n+\n+    printf(\"%s (%d,%d) %dx%d\\n\", name, x, y, w, h);\n+\n+    if (is_c) {\n+        x *= 2;\n+        w *= 2;\n+    }\n+\n+    for (int i = y; i != y + h; ++i) {\n+        for (int j = x; j != x + w; ++j) {\n+            const uint8_t * p = base + ((j*PW) & mask) + i * stride1 + ((j*PW) & ~mask) * stride2;\n+            char sep = is_c && (j & 1) == 0 ? ':' : ' ';\n+#if PW == 1\n+            if (j < 0 || i < 0)\n+                printf(\"..%c\", sep);\n+            else\n+                printf(\"%02x%c\", *(const pixel*)p, sep);\n+#else\n+            if (j < 0 || i < 0)\n+                printf(\"...%c\", sep);\n+            else\n+                printf(\"%03x%c\", *(const pixel*)p, sep);\n+#endif\n+        }\n+        printf(\"\\n\");\n+    }\n+}\n+\n+\n+void FUNC(ff_hevc_rpi_shader_c)(HEVCRpiContext *const s,\n+                  const HEVCRpiInterPredEnv *const ipe_y,\n+                  const HEVCRpiInterPredEnv *const ipe_c)\n+{\n+    for (int c_idx = 0; c_idx < 2; ++c_idx)\n+    {\n+        const HEVCRpiInterPredEnv *const ipe = c_idx == 0 ? ipe_y : ipe_c;\n+        shader_track_t tracka[QPU_N_MAX] = {{NULL}};\n+        unsigned int exit_n = 0;\n+\n+        if (ipe == NULL || !ipe->used) {\n+            continue;\n+        }\n+\n+        do {\n+            for (unsigned int i = 0; i != ipe->n; ++i) {\n+                const HEVCRpiInterPredQ * const q = ipe->q + i;\n+                shader_track_t * const st = tracka + i;\n+                const qpu_mc_pred_cmd_t * cmd = st->qpu_mc_curr == NULL ? q->qpu_mc_base : st->qpu_mc_curr;\n+\n+                for (;;) {\n+                    const uint32_t link = (cmd == q->qpu_mc_base) ? q->code_setup : ((uint32_t *)cmd)[-1];\n+\n+                    if (link == q->code_setup) {\n+                        if (c_idx == 0) {\n+                            // Luma\n+                            const qpu_mc_pred_y_s_t *const c = &cmd->y.s;\n+\n+                            st->height = c->pic_h;\n+                            st->width = c->pic_w * PW;\n+                            st->stride1 = c->stride1;\n+                            st->stride2 = c->stride2;\n+                            st->last_l0 = &c->next_src1;\n+                            st->last_l1 = &c->next_src2;\n+                            cmd = (const qpu_mc_pred_cmd_t *)(c + 1);\n+                        }\n+                        else {\n+                            // Chroma\n+                            const qpu_mc_pred_c_s_t *const c = &cmd->c.s;\n+\n+                            st->height = c->pic_ch;\n+                            st->width = c->pic_cw * PW;\n+                            st->stride1 = c->stride1;\n+                            st->stride2 = c->stride2;\n+                            st->last_l0 = &c->next_src1;\n+                            st->last_l1 = &c->next_src2;\n+                            cmd = (const qpu_mc_pred_cmd_t *)(c + 1);\n+                        }\n+                    }\n+                    else if (link == s->qpu.y_pxx) {\n+                        const qpu_mc_pred_y_p_t *const c = &cmd->y.p;\n+                        const int w1 = FFMIN(c->w, 8);\n+                        const int w2 = c->w - w1;\n+\n+                        uint8_t patch_y1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8)\n+                        uint8_t patch_y2[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8)\n+\n+                        FUNC(get_patch_y)(st,\n+                                    patch_y1, PATCH_STRIDE,\n+                                    st->last_l0,\n+                                    16, c->h + 7);\n+                        if (w2 > 0) {\n+                            FUNC(get_patch_y)(st,\n+                                        patch_y2, PATCH_STRIDE,\n+                                        st->last_l1,\n+                                        16, c->h + 7);\n+                        }\n+\n+                        // wo[offset] = offset*2+1\n+                        s->hevcdsp.put_hevc_qpel_uni_w[wtoidx(w1)][(c->mymx21 & 0xff00) != 0][(c->mymx21 & 0xff) != 0](\n+                            (uint8_t *)c->dst_addr, st->stride1, patch_y1 + 3 * (PATCH_STRIDE + PW), PATCH_STRIDE,\n+                            c->h, QPU_MC_DENOM, wweight(c->wo1), woff_p(s, c->wo1), (c->mymx21 & 0xff), ((c->mymx21 >> 8) & 0xff), w1);\n+                        if (w2 > 0) {\n+                            s->hevcdsp.put_hevc_qpel_uni_w[wtoidx(w2)][(c->mymx21 & 0xff000000) != 0][(c->mymx21 & 0xff0000) != 0](\n+                                (uint8_t *)c->dst_addr + 8 * PW, st->stride1, patch_y2 + 3 * (PATCH_STRIDE + PW), PATCH_STRIDE,\n+                                c->h, QPU_MC_DENOM, wweight(c->wo2), woff_p(s, c->wo2), ((c->mymx21 >> 16) & 0xff), ((c->mymx21 >> 24) & 0xff), w2);\n+                        }\n+                        st->last_l0 = &c->next_src1;\n+                        st->last_l1 = &c->next_src2;\n+                        cmd = (const qpu_mc_pred_cmd_t *)(c + 1);\n+                    }\n+                    else if (link == s->qpu.y_bxx) {\n+                        const qpu_mc_pred_y_p_t *const c = &cmd->y.p;\n+\n+                        uint8_t patch_y1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8)\n+                        uint8_t patch_y2[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8)\n+                        int16_t patch_y3[MAX_PB_SIZE * MAX_PB_SIZE];\n+\n+                        FUNC(get_patch_y)(st,\n+                                    patch_y1, PATCH_STRIDE,\n+                                    st->last_l0,\n+                                    16, c->h + 7);\n+                        FUNC(get_patch_y)(st,\n+                                    patch_y2, PATCH_STRIDE,\n+                                    st->last_l1,\n+                                    16, c->h + 7);\n+\n+                        s->hevcdsp.put_hevc_qpel[wtoidx(c->w)][(c->mymx21 & 0xff00) != 0][(c->mymx21 & 0xff) != 0](\n+                           patch_y3, patch_y1+ 3 * (PATCH_STRIDE + PW), PATCH_STRIDE,\n+                           c->h, (c->mymx21 & 0xff), ((c->mymx21 >> 8) & 0xff), c->w);\n+\n+                        s->hevcdsp.put_hevc_qpel_bi_w[wtoidx(c->w)][(c->mymx21 & 0xff000000) != 0][(c->mymx21 & 0xff0000) != 0](\n+                            (uint8_t *)c->dst_addr, st->stride1, patch_y2 + 3 * (PATCH_STRIDE + PW), PATCH_STRIDE, patch_y3,\n+                            c->h, QPU_MC_DENOM, wweight(c->wo1), wweight(c->wo2),\n+                            0, woff_b(s, c->wo2), ((c->mymx21 >> 16) & 0xff), ((c->mymx21 >> 24) & 0xff), c->w);\n+                        st->last_l0 = &c->next_src1;\n+                        st->last_l1 = &c->next_src2;\n+                        cmd = (const qpu_mc_pred_cmd_t *)(c + 1);\n+                    }\n+                    else if (link == s->qpu.y_p00) {\n+                        const qpu_mc_pred_y_p00_t *const c = &cmd->y.p00;\n+\n+                        uint8_t patch_y1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8)\n+\n+                        FUNC(get_patch_y)(st,\n+                                    patch_y1, PATCH_STRIDE,\n+                                    st->last_l0,\n+                                    16, c->h + 7);\n+\n+                        // wo[offset] = offset*2+1\n+                        s->hevcdsp.put_hevc_qpel_uni_w[wtoidx(c->w)][0][0](\n+                            (uint8_t *)c->dst_addr, st->stride1, patch_y1, PATCH_STRIDE,\n+                            c->h, QPU_MC_DENOM, wweight(c->wo1), woff_p(s, c->wo1), 0, 0, c->w);\n+\n+                        st->last_l0 = &c->next_src1;\n+                        cmd = (const qpu_mc_pred_cmd_t *)(c + 1);\n+                    }\n+                    else if (link == s->qpu.y_b00) {\n+                        const qpu_mc_pred_y_p_t *const c = &cmd->y.p;\n+\n+                        uint8_t patch_y1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8)\n+                        uint8_t patch_y2[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8)\n+                        int16_t patch_y3[MAX_PB_SIZE * MAX_PB_SIZE];\n+\n+                        av_assert0(c->w <= 16 && c->h <= 64);\n+\n+                        FUNC(get_patch_y)(st,\n+                                    patch_y1, PATCH_STRIDE,\n+                                    st->last_l0,\n+                                    16, c->h);\n+                        FUNC(get_patch_y)(st,\n+                                    patch_y2, PATCH_STRIDE,\n+                                    st->last_l1,\n+                                    16, c->h);\n+\n+                        s->hevcdsp.put_hevc_qpel[wtoidx(c->w)][0][0](\n+                           patch_y3, patch_y1, PATCH_STRIDE,\n+                           c->h, 0, 0, c->w);\n+\n+                        s->hevcdsp.put_hevc_qpel_bi_w[wtoidx(c->w)][0][0](\n+                            (uint8_t *)c->dst_addr, st->stride1, patch_y2, PATCH_STRIDE, patch_y3,\n+                            c->h, QPU_MC_DENOM, wweight(c->wo1), wweight(c->wo2),\n+                            0, woff_b(s, c->wo2), 0, 0, c->w);\n+                        st->last_l0 = &c->next_src1;\n+                        st->last_l1 = &c->next_src2;\n+                        cmd = (const qpu_mc_pred_cmd_t *)(c + 1);\n+                    }\n+                    else if (link == s->qpu.c_pxx) {\n+                        const qpu_mc_pred_c_p_t *const c = &cmd->c.p;\n+                        const int mx = fctom(c->coeffs_x);\n+                        const int my = fctom(c->coeffs_y);\n+\n+                        uint8_t patch_u1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8)\n+                        uint8_t patch_v1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8)\n+                        uint8_t patch_u3[8 * 16 * PW];\n+                        uint8_t patch_v3[8 * 16 * PW];\n+\n+                        FUNC(get_patch_c)(st, patch_u1, patch_v1, PATCH_STRIDE, st->last_l0, 8+3, c->h + 3);\n+\n+                        s->hevcdsp.put_hevc_epel_uni_w[wtoidx(c->w)][my != 0][mx != 0](\n+                            patch_u3, 8 * PW, patch_u1 + PATCH_STRIDE + PW, PATCH_STRIDE,\n+                            c->h, QPU_MC_DENOM, wweight(c->wo_u), woff_p(s, c->wo_u), mx, my, c->w);\n+                        s->hevcdsp.put_hevc_epel_uni_w[wtoidx(c->w)][my != 0][mx != 0](\n+                            patch_v3, 8 * PW, patch_v1 + PATCH_STRIDE + PW, PATCH_STRIDE,\n+                            c->h, QPU_MC_DENOM, wweight(c->wo_v), woff_p(s, c->wo_v), mx, my, c->w);\n+\n+                        FUNC(av_rpi_planar_to_sand_c)((uint8_t *)c->dst_addr_c, st->stride1, st->stride2, patch_u3, 8 * PW, patch_v3, 8 * PW, 0, 0, c->w * PW, c->h);\n+\n+                        st->last_l0 = &c->next_src;\n+                        cmd = (const qpu_mc_pred_cmd_t *)(c + 1);\n+                    }\n+                    else if (link == s->qpu.c_pxx_l1) {\n+                        const qpu_mc_pred_c_p_t *const c = &cmd->c.p;\n+                        const int mx = fctom(c->coeffs_x);\n+                        const int my = fctom(c->coeffs_y);\n+\n+                        uint8_t patch_u1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8)\n+                        uint8_t patch_v1[PATCH_STRIDE * 72]; // (Max width + 8) * (max height + 8)\n+                        uint8_t patch_u3[8 * 16 * PW];\n+                        uint8_t patch_v3[8 * 16 * PW];\n+\n+                        FUNC(get_patch_c)(st, patch_u1, patch_v1, PATCH_STRIDE, st->last_l1, 8+3, c->h + 3);\n+\n+                        s->hevcdsp.put_hevc_epel_uni_w[wtoidx(c->w)][my != 0][mx != 0](\n+                            patch_u3, 8 * PW, patch_u1 + PATCH_STRIDE + PW, PATCH_STRIDE,\n+                            c->h, QPU_MC_DENOM, wweight(c->wo_u), woff_p(s, c->wo_u), mx, my, c->w);\n+                        s->hevcdsp.put_hevc_epel_uni_w[wtoidx(c->w)][my != 0][mx != 0](\n+                            patch_v3, 8 * PW, patch_v1 + PATCH_STRIDE + PW, PATCH_STRIDE,\n+                            c->h, QPU_MC_DENOM, wweight(c->wo_v), woff_p(s, c->wo_v), mx, my, c->w);\n+\n+                        FUNC(av_rpi_planar_to_sand_c)((uint8_t *)c->dst_addr_c, st->stride1, st->stride2, patch_u3, 8 * PW, patch_v3, 8 * PW, 0, 0, c->w * PW, c->h);\n+\n+                        st->last_l1 = &c->next_src;\n+                        cmd = (const qpu_mc_pred_cmd_t *)(c + 1);\n+                    }\n+                    else if (link == s->qpu.c_bxx) {\n+                        const qpu_mc_pred_c_b_t *const c = &cmd->c.b;\n+                        const int mx1 = fctom(c->coeffs_x1);\n+                        const int my1 = fctom(c->coeffs_y1);\n+                        const int mx2 = fctom(c->coeffs_x2);\n+                        const int my2 = fctom(c->coeffs_y2);\n+\n+                        uint8_t patch_u1[PATCH_STRIDE * 72];\n+                        uint8_t patch_v1[PATCH_STRIDE * 72];\n+                        uint8_t patch_u2[PATCH_STRIDE * 72];\n+                        uint8_t patch_v2[PATCH_STRIDE * 72];\n+                        uint8_t patch_u3[8 * 16 * PW];\n+                        uint8_t patch_v3[8 * 16 * PW];\n+                        uint16_t patch_u4[MAX_PB_SIZE * MAX_PB_SIZE];\n+                        uint16_t patch_v4[MAX_PB_SIZE * MAX_PB_SIZE];\n+\n+                        FUNC(get_patch_c)(st, patch_u1, patch_v1, PATCH_STRIDE, st->last_l0, 8+3, c->h + 3);\n+                        FUNC(get_patch_c)(st, patch_u2, patch_v2, PATCH_STRIDE, st->last_l1, 8+3, c->h + 3);\n+\n+                        s->hevcdsp.put_hevc_epel[wtoidx(c->w)][my1 != 0][mx1 != 0](\n+                           patch_u4, patch_u1 + PATCH_STRIDE + PW, PATCH_STRIDE,\n+                           c->h, mx1, my1, c->w);\n+                        s->hevcdsp.put_hevc_epel[wtoidx(c->w)][my1 != 0][mx1 != 0](\n+                           patch_v4, patch_v1 + PATCH_STRIDE + PW, PATCH_STRIDE,\n+                           c->h, mx1, my1, c->w);\n+\n+                        s->hevcdsp.put_hevc_epel_bi_w[wtoidx(c->w)][my2 != 0][mx2 != 0](\n+                            patch_u3, 8 * PW, patch_u2 + PATCH_STRIDE + PW, PATCH_STRIDE, patch_u4,\n+                            c->h, QPU_MC_DENOM, c->weight_u1, wweight(c->wo_u2),\n+                            0, woff_b(s, c->wo_u2), mx2, my2, c->w);\n+                        s->hevcdsp.put_hevc_epel_bi_w[wtoidx(c->w)][my2 != 0][mx2 != 0](\n+                            patch_v3, 8 * PW, patch_v2 + PATCH_STRIDE + PW, PATCH_STRIDE, patch_v4,\n+                            c->h, QPU_MC_DENOM, c->weight_v1, wweight(c->wo_v2),\n+                            0, woff_b(s, c->wo_v2), mx2, my2, c->w);\n+\n+                        FUNC(av_rpi_planar_to_sand_c)((uint8_t *)c->dst_addr_c, st->stride1, st->stride2, patch_u3, 8 * PW, patch_v3, 8 * PW, 0, 0, c->w * PW, c->h);\n+\n+                        st->last_l0 = &c->next_src1;\n+                        st->last_l1 = &c->next_src2;\n+                        cmd = (const qpu_mc_pred_cmd_t *)(c + 1);\n+                    }\n+                    else if (link == q->code_sync) {\n+                        cmd = (const qpu_mc_pred_cmd_t *)((uint32_t *)cmd + 1);\n+                        break;\n+                    }\n+                    else if (link == q->code_exit) {\n+                        // We expect exit to occur without other sync\n+                        av_assert0(i == exit_n);\n+                        ++exit_n;\n+                        break;\n+                    }\n+                    else {\n+                        av_assert0(0);\n+                    }\n+                }\n+\n+                st->qpu_mc_curr = cmd;\n+            }\n+        } while (exit_n == 0);\n+    }\n+}\n+\n+#undef FUNC\n+#undef pixel\n+\ndiff --git a/libavcodec/rpi_hevc_transform.s b/libavcodec/rpi_hevc_transform.s\nnew file mode 100644\nindex 0000000000..3caef20137\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_transform.s\n@@ -0,0 +1,444 @@\n+# ******************************************************************************\n+# Argon Design Ltd.\n+# (c) Copyright 2015 Argon Design Ltd. All rights reserved.\n+#\n+# Module : HEVC\n+# Author : Peter de Rivaz\n+# ******************************************************************************\n+\n+# USE_STACK = 1 means temporary data stored on the stack (requires build with larger stack)\n+# USE_STACK = 0 means temporary data stored in fixed per-VPU data buffers (requires modifications to vasm to handle instruction encoding for PC relative instructions)\n+.set USE_STACK, 0\n+\n+# Lines that fail to assemble start with #:\n+# The script insert_magic_opcodes.sh inserts the machine code directly for these.\n+# HEVC VPU Transform\n+#\n+# Transform matrix can be thought of as\n+#   output row vector = input row vector * transMatrix2\n+#\n+# The even rows of the matrix are symmetric\n+# The odd rows of the matrix are antisymmetric\n+#\n+# So only need to compute the first half of the results, then can compute the remainder with a butterfly\n+#\n+# EXAMPLE\n+#   (a b c d) (1 2  2  1)\n+#             (3 4 -4 -3)\n+#             (5 6  6  5)\n+#             (7 8 -8 -7)\n+#\n+#  x=(a c)(1 2) = 1a+5c 2a+6c\n+#         (5 6)\n+#\n+#  y=(b d)(3 4) = 3b+7d 4b+8d\n+#         (7 8)\n+#\n+#  u=x+y = 1a+5c+3b+7d 2a+4b+6c+8d\n+#  v=x-y = 1a+5c-3b-7d 2a+6c-4b-8d\n+#\n+#  Final results are (u , v[::-1])\n+#\n+#\n+#  For 32x1 input, load even rows into HX(0++,0), odd rows into HX(16++,0)\n+#  Apply the even matrix first and stop before rounding\n+#  Then apply the odd matrix in a full manner:\n+#\n+#   First step is to compute partial products with the first input (16 cycles)\n+#   1a 3b 5c 7d   16x1 input coefficients produce 16x16 output\n+#   2a 4b 6c 8d\n+#   2a -4b 6c -8d\n+#   1a -3b 5c -7d\n+#\n+#   Second step is to sum partial products into final position (8 cycles)\n+#   1a+3b+5c+7d\n+#   2a+4b+6c+8d\n+#   2a-4b+6c-8d\n+#   1a-3b+5c-7d\n+#\n+#   Then can apply butterfly to combine even results and odd results + rounding to produce 16 rows of output at a time (need to save in transposed format)\n+#\n+#   For 16x16 no butterfly is required and can store final results in original location  (Could do 2 16x16s in parallel to make use of the trick - saves on the adds)\n+#\n+#   For 8x8 we could compute two in parallel.\n+#\n+#\n+\n+# Columns are transformed first\n+#\n+# Store top left half of transMatrix2 in\n+# Store bottom left half of transMatrix2 in HX(32,32)\n+#\n+# For 16x16\n+# HX(0:15,0) contains input data before transform\n+# HY(0:15,0) contains 32bit output data after transform\n+# HX(32,0) contains even rows of left half of transMatrix2\n+# HX(32,32) contains odd rows of left half of transMatrix2\n+# HY(48,0) contains partial products ready for summing\n+#\n+\n+\n+# hevc_trans_16x16(short *transMatrix2, short *coeffs, int num) # TODO add size so we can branch to correct implementation (or perhaps have coeffs32 and num32 as secondary inputs!)\n+# transMatrix2: address of the constant matrix (must be at 32 byte aligned address in Videocore memory)\n+# coeffs: address of the transform coefficients (must be at 32 byte aligned address in Videocore memory)\n+# num: number of 16x16 transforms to be done\n+# coeffs32\n+# num32: number of 32x32 transforms\n+# command 0 for transform, 1 for memclear16(int16_t *dst,num16)\n+#\n+\n+.equ TRANS_SHIFT, 20 - BIT_DEPTH\n+.equ TRANS_RND2, 1 << (TRANS_SHIFT - 1)\n+.equ TRANS_ASL2, 16 - TRANS_SHIFT\n+\n+\n+hevc_trans_16x16:\n+  push r6-r15, lr # TODO cut down number of used registers\n+  mov r14,r3 # coeffs32\n+  mov r15,r4 # num32\n+  mov r3, 16*2 # Stride of transMatrix2 in bytes\n+  vldh HX(32++,0),(r0 += r3) REP 16 # This is the 16x16 matrix, a transform is equivalent to multiplying input row vector * matrix\n+\n+  add r0, 16*16*2 # For 32x32 transforms we also need this matrix\n+  vldh HX(32++,32),(r0 += r3) REP 16 # This is the odd 16x16 matrix\n+\n+  # Now use r0 to describe which matrix we are working on.\n+  # Allows us to prefetch the next block of coefficients for efficiency.\n+  mov r0,0 # This describes the location where we read our coefficients from\n+  mov r3,16*2 # Stride of coefficients in bytes (TODO remove)\n+  mov r7,16*16*2 # Total block size\n+  mov r8,64*16 # Value used to swap from current to next VRF location\n+  mov r4,64 # Constant used for rounding first pass\n+  mov r5,TRANS_RND2 # Constant used for rounding second pass\n+\n+  sub sp,sp,64+16*16*2 # Move on stack pointer in case interrupt occurs and uses stack\n+\n+  add r11,sp,64 # Space for 32 bytes before, and rounding\n+  lsr r11,5\n+  lsl r11,5 # Make sure r11 is rounded to multiple of 2**5==32\n+\n+  lsr r10, r2, 16 # Number of compressed blocks stored in top short\n+  extu r2,16\n+  # At start of block r0,r1 point to the current block (that has already been loaded)\n+  # r0 VRF location of current block\n+  # r1 address of current block\n+  # r2 number of 16*16 transforms to do\n+  # r3 Stride of coefficients (==32)\n+  # r4 TRANS_RND1 (64)\n+  # r5 TRANS_RND2\n+  # r6 temporary used inside col_trans16\n+  # r7 16*16*2 total bytes in block\n+  # r8 64*16 VRF switch locations\n+  # r9 temporary in unpack_coeff for index\n+  # r10 number of 16x16 transforms using compression\n+  # r11 unpacked data buffer (16*16 shorts) (preceded by 16 shorts of packed data buffer)\n+  # r12 temporary counter in unpack_coeff\n+  # r13\n+  # r14 Save information for 32 bit transform (coeffs location)\n+  # r15 Save information for 32 bit transform (number of transforms)\n+  cmp r2,0\n+  beq done16x16s\n+block_loop:\n+  # With compressed coefficients, we don't use prefetch as we don't want to issue unnecessary memory requests\n+  cmp r10,0\n+  mov r6, r1\n+  beq not_compressed\n+  sub r10, 1\n+  bl unpack16x16\n+not_compressed:\n+  #mov r6,r1 # DEBUG without compress\n+  vldh HX(0++,0)+r0,(r6 += r3) REP 16\n+  #eor r0,r8\n+  #add r1,r7\n+  # Prefetch the next block\n+  #bl unpack16x16\n+  #vldh HX(0++,0)+r0,(r6 += r3) REP 16\n+  #vmov HX(0++,0)+r0,0 REP 16  # DEBUG\n+  #eor r0,r8\n+  #sub r1,r7\n+\n+  # Transform the current block\n+  bl col_trans_16\n+  vadd HY(0++,0)+r0,HY(0++,0)+r0,r4 REP 16   # Now add on rounding, shift down by 7, and saturate\n+  #vsasls HY(0++,0)+r0,HY(0++,0)+r0,9 REP 16 # 9+7=16 so this ends up with the output saturated and in the top half of the word.\n+  vasl HY(0++,0)+r0,HY(0++,0)+r0,9 REP 16    # This should be saturating, but the instruction above does not assemble?\n+  vmov VX(0,0++)+r0, HX(0++,32)+r0 REP 16    # For simplicity transpose this back to the original position\n+\n+  bl col_trans_16\n+  vadd HY(0++,0)+r0,HY(0++,0)+r0,r5 REP 16   # Now add on rounding, shift down by 7, and saturate\n+  #vsasls HY(0++,0)+r0,HY(0++,0)+r0,4 REP 16 # 4+12=16 so this ends up with the output saturated and in the top half of the word.\n+  vasl HY(0++,0)+r0,HY(0++,0)+r0,TRANS_ASL2 REP 16    # This should be saturating, but the instruction above does not assemble?  (Probably because it ends with ls which is interpreted as a condition flag)\n+\n+  # Save results - note there has been a transposition during the processing so we save columns\n+  vsth VX(0,32++)+r0, (r1 += r3) REP 16\n+\n+  # Move onto next block\n+  eor r0,r8\n+  add r1,r7\n+\n+  addcmpbgt r2,-1,0,block_loop\n+done16x16s:\n+\n+  add sp,sp,64+16*16*2 # Move on stack pointer in case interrupt occurs and uses stack\n+  # Now go and do any 32x32 transforms\n+  b hevc_trans_32x32\n+\n+  pop r6-r15, pc\n+# This returns a value in r6 that says where to load the data from.\n+# We load data 16 shorts at a time from memory (uncached), and store to stack space to allow us to process it.\n+unpack16x16:\n+# Clear out destination\n+  vmov HX(0,0)+r0,0\n+  mov r6, r11\n+  vsth HX(0,0)+r0,(r6 += r3) REP 16\n+  mov r5, r1 # Moving pointer to input coefficients\n+unpack_outer_loop:\n+  # Loop until we find the end\n+  vldh HX(0,0)+r0,(r5)  # TODO would prefetch help here while unpacking previous?\n+  sub r6,r11,32\n+  #add r6,pc,packed_data-$ # Packed data\n+  vsth HX(0,0)+r0,(r6)  # Store into packed data\n+  mov r12,0\n+unpack_loop:\n+  ld r4,(r6)\n+  add r6,r6,4\n+  lsr r9,r4,16 # r9 is destination value\n+  cmp r4,0 # {value,index}\n+  extu r4,8\n+  beq done_unpack\n+  sth r9,(r11, r4)\n+  addcmpblt r12,1,8,unpack_loop\n+#  # Read next 16\n+  add r5,32\n+  b unpack_outer_loop\n+done_unpack:\n+#  # Set new load location\n+  mov r6, r11\n+  #add r6,pc,unpacked_data-$\n+#  # Restore constants\n+  mov r4,64\n+  mov r5,TRANS_RND2\n+#  pop r6-r15, pc\n+  b lr\n+\n+# r1,r2,r3 r7,r8 should be preserved\n+# HX(0++,0)+r0 is the block to be transformed\n+# HX(32++,0)+r6 is the 16x16 matrix of transform coefficients\n+# Use HY(48,0) for intermediate results\n+# r0 can be used, but should be returned to its original value at the end\n+col_trans_16:\n+  add r6,r0,16 # Final value for this loop\n+col_trans_16_loop:\n+  # First compute partial products for a single column\n+  vmul32s HY(48++,0), VX(0,0)+r0, VX(32,0++) REP 16\n+  # Then sum up the results and place back\n+  vadd VY(0,0)+r0, VY(48,0++), VY(48,8++) REP 8 CLRA SACC\n+  addcmpblt r0,1,r6,col_trans_16_loop\n+  sub r0,16  # put r0 back to its original value\n+  b lr\n+\n+col_trans_odd_16:\n+  add r6,r0,16 # Final value for this loop\n+col_trans_odd_16_loop:\n+  # First compute partial products for a single column\n+  vmul32s HY(48++,0), VX(0,0)+r0, VX(32,32++) REP 16\n+  # Then sum up the results and place back\n+  vadd VY(0,0)+r0, VY(48,0++), VY(48,8++) REP 8 CLRA SACC\n+  addcmpblt r0,1,r6,col_trans_odd_16_loop\n+  sub r0,16  # put r0 back to its original value\n+  b lr\n+\n+# r1/r10 input pointer\n+# r0,r4,r5,r6 free\n+# r8/r9 output storage\n+#\n+# Store packed coefficients at r9-32\n+# Store unpacked at r9+32*32 (because transform works on even/odd rows on input, but writes all rows)\n+unpack32x32:\n+# Clear out destination\n+  vmov HX(0,0),0\n+  add r0, r9, 32*32*2 # Unpacked buffer\n+  mov r4, 32\n+  vsth HX(0,0),(r0 += r4) REP 64\n+unpack_outer_loop32:\n+  # Loop until we find the end\n+  vldh HX(0,0),(r1)  # TODO would prefetch help here while unpacking previous?\n+  sub r6,r9,32\n+  #add r6,pc,packed_data-$ # Packed data\n+  vsth HX(0,0),(r6)  # Store into packed data\n+  mov r8,0\n+unpack_loop32:\n+  ld r4,(r6)\n+  add r6,r6,4\n+  lsr r5,r4,16 # r5 is destination value\n+  cmp r4,0 # {value,index}\n+  extu r4,10\n+  beq done_unpack\n+  sth r5,(r0, r4)\n+  addcmpblt r8,1,8,unpack_loop32\n+#  # Read next 16\n+  add r1,32\n+  b unpack_outer_loop32\n+done_unpack32:\n+  b lr\n+# hevc_trans_32x32(short *transMatrix2, short *coeffs, int num)\n+# transMatrix2: address of the constant matrix (must be at 32 byte aligned address in Videocore memory) Even followed by odd\n+# coeffs: address of the transform coefficients (must be at 32 byte aligned address in Videocore memory)\n+# num: number of 16x16 transforms to be done in low 16, number of packed in high 16\n+#\n+# Note that the 32x32 transforms are stored in reverse order, this means that the unpacked ones appear first!\n+hevc_trans_32x32:\n+  mov r1,r14 # coeffs\n+  mov r2,r15 # num\n+  lsr r15,r15,16 # Number that are packed\n+  extu r2,16 # Total number\n+\n+  # Fetch odd transform matrix\n+  #mov r3, 16*2 # Stride of transMatrix2 in bytes (and of coefficients)\n+  #vldh HX(32++,0),(r0 += r3) REP 16 # This is the even 16x16 matrix\n+  #add r0, 16*16*2\n+  #vldh HX(32++,32),(r0 += r3) REP 16 # This is the odd 16x16 matrix\n+\n+  mov r3, 32*2*2 # Stride used to fetch alternate rows of our input coefficient buffer\n+  mov r7, 16*16*2 # Total block size\n+\n+.if USE_STACK\n+  # Stack base allocation\n+  sub sp,sp,32*32*4+64 # Allocate some space on the stack for us to store 32*32 shorts as temporary results (needs to be aligned) and another 32*32 for unpacking\n+  # set r8 to 32byte aligned stack pointer with 32 bytes of space before it\n+  add r8,sp,63\n+  lsr r8,5\n+  lsl r8,5\n+.else\n+#:version r8\n+  .half 0x00e8 #AUTOINSERTED\n+  btst r8,16\n+#:add r8,pc,intermediate_results-$\n+  .half 0xbfe8\n+  .half intermediate_results-($-2)\n+  beq on_vpu1\n+  add r8,r8,32*32*2*2+16*2 # Move to secondary storage\n+on_vpu1:\n+.endif\n+  mov r9,r8  # Backup of the temporary storage\n+  mov r10,r1 # Backup of the coefficient buffer\n+\n+  cmp r2,0\n+  beq done32x32s\n+block_loop32:\n+\n+  # Transform the first 16 columns\n+  mov r1,r10  # Input Coefficient buffer\n+  mov r8,r9   # Output temporary storage\n+  # Unpacked are first, so need to only do unpacking when r2(=num left) <= r15 (=num packed)\n+  cmp r2,r15\n+  bgt not_compressed_32\n+  bl unpack32x32\n+  add r1,r9,32*32*2   # Uncompressed into temporary storage\n+  mov r8,r9           # Transform into here\n+not_compressed_32:\n+  # COLUMN TRANSFORM\n+  mov r4, 64 # Constant used for rounding first pass\n+  mov r5, 9 # left shift used for rounding first pass\n+\n+  bl trans32\n+  # Transform the second 16 columns\n+  add r8,32*16*2\n+  add r1,32\n+  bl trans32\n+\n+  # ROW TRANSFORM\n+  mov r4, TRANS_RND2 # Constant used for rounding second pass\n+  mov r5, TRANS_ASL2 # left shift used for rounding second pass\n+\n+  mov r1,r9  # Input temporary storage\n+  mov r8,r10   # Output Coefficient buffer\n+  bl trans32\n+  # Transform the second 16 columns\n+  add r8,32*16*2\n+  add r1,32\n+  bl trans32\n+\n+  add r10, 32*32*2 # move onto next block of coefficients\n+  addcmpbgt r2,-1,0,block_loop32\n+done32x32s:\n+\n+.if USE_STACK\n+  add sp,sp,32*32*4+64# Restore stack\n+.endif\n+\n+  pop r6-r15, pc\n+\n+trans32:\n+  push lr\n+  # We can no longer afford the VRF space to do prefetching when doing 32x32\n+  # Fetch the even rows\n+  vldh HX(0++,0),(r1 += r3) REP 16\n+  # Fetch the odd rows\n+  vldh HX(16++,0),64(r1 += r3) REP 16 # First odd row is 32 shorts ahead of r1\n+\n+  # Transform the even rows using even matrix\n+  mov r0, 0 # Even rows\n+  bl col_trans_16\n+\n+  # Now transform the odd rows using odd matrix\n+  mov r0, 64*16 # Odd rows\n+  bl col_trans_odd_16\n+\n+  # Now apply butterfly to compute the first 16 results\n+  vadd HY(48++,0),HY(0++,0),HY(16++,0) REP 16\n+  vadd HY(48++,0),HY(48++,0),r4 REP 16   # add on rounding,\n+  vasl HY(48++,0),HY(48++,0),r5 REP 16    # shift down by 7, and saturate\n+  # 16bit results now in HX(48,32)\n+  mov r0,r8\n+  mov r6,32*2\n+  vsth VX(48,32++),(r0+=r6) REP 16\n+\n+  # Now apply butterfly to compute the second 16 results (in reverse order)\n+  vsub HY(63,0),HY(0 ,0),HY(16,0)\n+  vsub HY(62,0),HY(1 ,0),HY(17,0)\n+  vsub HY(61,0),HY(2 ,0),HY(18,0)\n+  vsub HY(60,0),HY(3 ,0),HY(19,0)\n+  vsub HY(59,0),HY(4 ,0),HY(20,0)\n+  vsub HY(58,0),HY(5 ,0),HY(21,0)\n+  vsub HY(57,0),HY(6 ,0),HY(22,0)\n+  vsub HY(56,0),HY(7 ,0),HY(23,0)\n+  vsub HY(55,0),HY(8 ,0),HY(24,0)\n+  vsub HY(54,0),HY(9 ,0),HY(25,0)\n+  vsub HY(53,0),HY(10,0),HY(26,0)\n+  vsub HY(52,0),HY(11,0),HY(27,0)\n+  vsub HY(51,0),HY(12,0),HY(28,0)\n+  vsub HY(50,0),HY(13,0),HY(29,0)\n+  vsub HY(49,0),HY(14,0),HY(30,0)\n+  vsub HY(48,0),HY(15,0),HY(31,0)\n+  vadd HY(48++,0),HY(48++,0),r4 REP 16   # add on rounding,\n+  vasl HY(48++,0),HY(48++,0),r5 REP 16    # shift down by 7, and saturate\n+  add r0,r8,32\n+  vsth VX(48,32++),(r0+=r6) REP 16\n+  pop pc\n+\n+.if USE_STACK == 0\n+  .balign 32\n+\n+# .space directives generate 0's in the bin so avoid unnecessary padding by\n+# just setting to appropriate value\n+.equ intermediate_results, $+16*2\n+\n+# Layout goes:\n+#\n+#packed_buffer:\n+#  .space 16*2\n+#intermediate_results:\n+#  .space 32*32*2\n+#unpacked_buffer:\n+#  .space 32*32*2\n+#\n+#packed_buffer2:\n+#  .space 16*2\n+#intermediate_results2:\n+#  .space 32*32*2\n+#unpacked_buffer2:\n+#  .space 32*32*2\n+.endif\n+\n+\ndiff --git a/libavcodec/rpi_hevc_transform10.h b/libavcodec/rpi_hevc_transform10.h\nnew file mode 100644\nindex 0000000000..1c364492d0\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_transform10.h\n@@ -0,0 +1,94 @@\n+static const unsigned char rpi_hevc_transform10 [] = {\n+0xa9,  0x03,  0x3e,  0x40,  0x4f,  0x40,  0x03,  0xb0,   // 0000\n+0x20,  0x00,  0x0c,  0xf8,  0x38,  0x88,  0x80,  0x03,   // 0008\n+0xc0,  0xf8,  0x00,  0x00,  0x40,  0xb0,  0x00,  0x02,   // 0010\n+0x0c,  0xf8,  0x38,  0xa8,  0x80,  0x03,  0xc0,  0xf8,   // 0018\n+0x00,  0x00,  0x00,  0x60,  0x03,  0xb0,  0x20,  0x00,   // 0020\n+0x07,  0xb0,  0x00,  0x02,  0x08,  0xb0,  0x00,  0x04,   // 0028\n+0x04,  0xb0,  0x40,  0x00,  0x05,  0xb0,  0x00,  0x02,   // 0030\n+0x59,  0xb0,  0xc0,  0xfd,  0x0b,  0x12,  0x5b,  0x7a,   // 0038\n+0x5b,  0x7c,  0x4a,  0xc3,  0x50,  0x17,  0x02,  0x6f,   // 0040\n+0x02,  0x6a,  0x32,  0x18,  0x0a,  0x6a,  0x16,  0x40,   // 0048\n+0x04,  0x18,  0x1a,  0x66,  0x80,  0x90,  0x32,  0x00,   // 0050\n+0x0c,  0xf8,  0x38,  0x80,  0x80,  0x03,  0xc0,  0x08,   // 0058\n+0x18,  0x00,  0x80,  0x90,  0x51,  0x00,  0x04,  0xff,   // 0060\n+0x30,  0xc0,  0x80,  0x03,  0x20,  0x08,  0x10,  0x00,   // 0068\n+0x4c,  0xfe,  0x30,  0xc0,  0x09,  0x04,  0x20,  0x08,   // 0070\n+0x00,  0x00,  0x04,  0xfc,  0x38,  0x90,  0x80,  0x02,   // 0078\n+0xc0,  0x0b,  0x02,  0x00,  0x80,  0x90,  0x40,  0x00,   // 0080\n+0x04,  0xff,  0x30,  0xc0,  0x80,  0x03,  0x20,  0x08,   // 0088\n+0x14,  0x00,  0x4c,  0xfe,  0x30,  0xc0,  0x06,  0x04,   // 0090\n+0x20,  0x08,  0x00,  0x00,  0x8c,  0xf8,  0x2c,  0xe0,   // 0098\n+0x80,  0x03,  0x20,  0x30,  0x04,  0x00,  0x80,  0x45,   // 00a0\n+0x71,  0x42,  0xf2,  0x8c,  0xd1,  0xc0,  0x59,  0xb0,   // 00a8\n+0x40,  0x02,  0x00,  0x9e,  0x6d,  0x00,  0x29,  0x03,   // 00b0\n+0x00,  0xf4,  0x38,  0x80,  0x00,  0x0c,  0xb6,  0x40,   // 00b8\n+0x8c,  0xf8,  0x20,  0xe0,  0x80,  0x03,  0x00,  0x30,   // 00c0\n+0x18,  0x00,  0x15,  0x40,  0x08,  0xf0,  0x38,  0x80,   // 00c8\n+0x85,  0x0b,  0x66,  0xb5,  0xe0,  0xff,  0x88,  0xf0,   // 00d0\n+0x24,  0xe0,  0x86,  0x03,  0x0c,  0x60,  0x64,  0x08,   // 00d8\n+0x46,  0x62,  0x49,  0xc3,  0x50,  0x27,  0x04,  0x6a,   // 00e0\n+0x84,  0x6e,  0x07,  0x18,  0x69,  0xa0,  0x04,  0x5f,   // 00e8\n+0x1c,  0x8b,  0xf7,  0xc8,  0x45,  0x76,  0x6b,  0x1f,   // 00f0\n+0xb6,  0x40,  0x04,  0xb0,  0x40,  0x00,  0x05,  0xb0,   // 00f8\n+0x00,  0x02,  0x5a,  0x00,  0x06,  0xb4,  0x10,  0x00,   // 0100\n+0xa4,  0xff,  0x24,  0xcc,  0x60,  0x02,  0x00,  0xf8,   // 0108\n+0x3e,  0x00,  0x03,  0xff,  0x37,  0xd0,  0x78,  0x03,   // 0110\n+0xe0,  0x03,  0xbe,  0x0b,  0x10,  0x8b,  0xf6,  0x5b,   // 0118\n+0x00,  0x67,  0x5a,  0x00,  0x06,  0xb4,  0x10,  0x00,   // 0120\n+0xa4,  0xff,  0x24,  0xcc,  0xe0,  0x02,  0x00,  0xf8,   // 0128\n+0x3e,  0x00,  0x03,  0xff,  0x37,  0xd0,  0x78,  0x03,   // 0130\n+0xe0,  0x03,  0xbe,  0x0b,  0x10,  0x8b,  0xf6,  0x5b,   // 0138\n+0x00,  0x67,  0x5a,  0x00,  0x00,  0xf4,  0x38,  0x80,   // 0140\n+0x00,  0x04,  0x20,  0xb5,  0x00,  0x08,  0x04,  0xb0,   // 0148\n+0x20,  0x00,  0x8e,  0xf8,  0x20,  0xe0,  0x80,  0x03,   // 0150\n+0xc0,  0x43,  0x00,  0x00,  0x08,  0xf0,  0x38,  0x80,   // 0158\n+0x81,  0x03,  0x26,  0xb5,  0xe0,  0xff,  0x88,  0xf0,   // 0160\n+0x20,  0xe0,  0x86,  0x03,  0x08,  0x60,  0x64,  0x08,   // 0168\n+0x46,  0x62,  0x45,  0xc3,  0x50,  0x27,  0x04,  0x6a,   // 0170\n+0xa4,  0x6e,  0x7f,  0x90,  0xbf,  0xff,  0x65,  0xa0,   // 0178\n+0x04,  0x07,  0x18,  0x8b,  0xf6,  0xc8,  0x41,  0x76,   // 0180\n+0x6a,  0x1f,  0x5a,  0x00,  0xe1,  0x40,  0xf2,  0x40,   // 0188\n+0x0f,  0x7b,  0x02,  0x6f,  0x03,  0xb0,  0x80,  0x00,   // 0190\n+0x07,  0xb0,  0x00,  0x02,  0xe8,  0x00,  0x08,  0x6d,   // 0198\n+0xe8,  0xbf,  0x60,  0x01,  0x03,  0x18,  0x48,  0xb0,   // 01a0\n+0x20,  0x10,  0x89,  0x40,  0x1a,  0x40,  0x02,  0x6a,   // 01a8\n+0x24,  0x18,  0xa1,  0x40,  0x98,  0x40,  0xf2,  0x4a,   // 01b0\n+0x06,  0x1e,  0xff,  0x9f,  0xc5,  0xff,  0x21,  0xb5,   // 01b8\n+0x00,  0x08,  0x98,  0x40,  0x04,  0xb0,  0x40,  0x00,   // 01c0\n+0x95,  0x60,  0x80,  0x90,  0x18,  0x00,  0x48,  0xb0,   // 01c8\n+0x00,  0x04,  0x41,  0x76,  0x80,  0x90,  0x13,  0x00,   // 01d0\n+0x04,  0xb0,  0x00,  0x02,  0x65,  0x60,  0x91,  0x40,   // 01d8\n+0xa8,  0x40,  0x80,  0x90,  0x0c,  0x00,  0x48,  0xb0,   // 01e0\n+0x00,  0x04,  0x41,  0x76,  0x80,  0x90,  0x07,  0x00,   // 01e8\n+0x4a,  0xb0,  0x00,  0x08,  0xf2,  0x8c,  0xdf,  0xc0,   // 01f0\n+0x29,  0x03,  0xef,  0x03,  0x0c,  0xf8,  0x38,  0x80,   // 01f8\n+0x80,  0x03,  0xc0,  0xf8,  0x04,  0x00,  0x0c,  0xf8,   // 0200\n+0x38,  0x84,  0xc0,  0x03,  0xc0,  0xf8,  0x04,  0x00,   // 0208\n+0x00,  0x60,  0xff,  0x9f,  0x79,  0xff,  0x00,  0xb0,   // 0210\n+0x00,  0x04,  0xff,  0x9f,  0x85,  0xff,  0x04,  0xff,   // 0218\n+0x30,  0xcc,  0x10,  0x03,  0xe0,  0xfb,  0x3e,  0x00,   // 0220\n+0x04,  0xff,  0x33,  0xcc,  0x80,  0x03,  0xe0,  0xfb,   // 0228\n+0x10,  0x00,  0x4c,  0xfe,  0x33,  0xcc,  0x80,  0x03,   // 0230\n+0xe0,  0xfb,  0x14,  0x00,  0x80,  0x40,  0x06,  0xb0,   // 0238\n+0x40,  0x00,  0x8c,  0xf8,  0x2f,  0xe0,  0x80,  0x03,   // 0240\n+0xe0,  0x63,  0x00,  0x00,  0x20,  0xf7,  0xf0,  0xcf,   // 0248\n+0x10,  0x03,  0x20,  0xf7,  0xb0,  0xcf,  0x11,  0x13,   // 0250\n+0x20,  0xf7,  0x70,  0xcf,  0x12,  0x23,  0x20,  0xf7,   // 0258\n+0x30,  0xcf,  0x13,  0x33,  0x20,  0xf7,  0xf0,  0xce,   // 0260\n+0x14,  0x43,  0x20,  0xf7,  0xb0,  0xce,  0x15,  0x53,   // 0268\n+0x20,  0xf7,  0x70,  0xce,  0x16,  0x63,  0x20,  0xf7,   // 0270\n+0x30,  0xce,  0x17,  0x73,  0x20,  0xf7,  0xf0,  0xcd,   // 0278\n+0x18,  0x83,  0x20,  0xf7,  0xb0,  0xcd,  0x19,  0x93,   // 0280\n+0x20,  0xf7,  0x70,  0xcd,  0x1a,  0xa3,  0x20,  0xf7,   // 0288\n+0x30,  0xcd,  0x1b,  0xb3,  0x20,  0xf7,  0xf0,  0xcc,   // 0290\n+0x1c,  0xc3,  0x20,  0xf7,  0xb0,  0xcc,  0x1d,  0xd3,   // 0298\n+0x20,  0xf7,  0x70,  0xcc,  0x1e,  0xe3,  0x20,  0xf7,   // 02a0\n+0x30,  0xcc,  0x1f,  0xf3,  0x04,  0xff,  0x33,  0xcc,   // 02a8\n+0x80,  0x03,  0xe0,  0xfb,  0x10,  0x00,  0x4c,  0xfe,   // 02b0\n+0x33,  0xcc,  0x80,  0x03,  0xe0,  0xfb,  0x14,  0x00,   // 02b8\n+0x00,  0xb5,  0x20,  0x00,  0x8c,  0xf8,  0x2f,  0xe0,   // 02c0\n+0x80,  0x03,  0xe0,  0x63,  0x00,  0x00,  0x6f,  0x03,   // 02c8\n+0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,   // 02d0\n+0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,   // 02d8\n+};\ndiff --git a/libavcodec/rpi_hevc_transform8.h b/libavcodec/rpi_hevc_transform8.h\nnew file mode 100644\nindex 0000000000..1128a2c054\n--- /dev/null\n+++ b/libavcodec/rpi_hevc_transform8.h\n@@ -0,0 +1,94 @@\n+static const unsigned char rpi_hevc_transform8 [] = {\n+0xa9,  0x03,  0x3e,  0x40,  0x4f,  0x40,  0x03,  0xb0,   // 0000\n+0x20,  0x00,  0x0c,  0xf8,  0x38,  0x88,  0x80,  0x03,   // 0008\n+0xc0,  0xf8,  0x00,  0x00,  0x40,  0xb0,  0x00,  0x02,   // 0010\n+0x0c,  0xf8,  0x38,  0xa8,  0x80,  0x03,  0xc0,  0xf8,   // 0018\n+0x00,  0x00,  0x00,  0x60,  0x03,  0xb0,  0x20,  0x00,   // 0020\n+0x07,  0xb0,  0x00,  0x02,  0x08,  0xb0,  0x00,  0x04,   // 0028\n+0x04,  0xb0,  0x40,  0x00,  0x05,  0xb0,  0x00,  0x08,   // 0030\n+0x59,  0xb0,  0xc0,  0xfd,  0x0b,  0x12,  0x5b,  0x7a,   // 0038\n+0x5b,  0x7c,  0x4a,  0xc3,  0x50,  0x17,  0x02,  0x6f,   // 0040\n+0x02,  0x6a,  0x32,  0x18,  0x0a,  0x6a,  0x16,  0x40,   // 0048\n+0x04,  0x18,  0x1a,  0x66,  0x80,  0x90,  0x32,  0x00,   // 0050\n+0x0c,  0xf8,  0x38,  0x80,  0x80,  0x03,  0xc0,  0x08,   // 0058\n+0x18,  0x00,  0x80,  0x90,  0x51,  0x00,  0x04,  0xff,   // 0060\n+0x30,  0xc0,  0x80,  0x03,  0x20,  0x08,  0x10,  0x00,   // 0068\n+0x4c,  0xfe,  0x30,  0xc0,  0x09,  0x04,  0x20,  0x08,   // 0070\n+0x00,  0x00,  0x04,  0xfc,  0x38,  0x90,  0x80,  0x02,   // 0078\n+0xc0,  0x0b,  0x02,  0x00,  0x80,  0x90,  0x40,  0x00,   // 0080\n+0x04,  0xff,  0x30,  0xc0,  0x80,  0x03,  0x20,  0x08,   // 0088\n+0x14,  0x00,  0x4c,  0xfe,  0x30,  0xc0,  0x04,  0x04,   // 0090\n+0x20,  0x08,  0x00,  0x00,  0x8c,  0xf8,  0x2c,  0xe0,   // 0098\n+0x80,  0x03,  0x20,  0x30,  0x04,  0x00,  0x80,  0x45,   // 00a0\n+0x71,  0x42,  0xf2,  0x8c,  0xd1,  0xc0,  0x59,  0xb0,   // 00a8\n+0x40,  0x02,  0x00,  0x9e,  0x6d,  0x00,  0x29,  0x03,   // 00b0\n+0x00,  0xf4,  0x38,  0x80,  0x00,  0x0c,  0xb6,  0x40,   // 00b8\n+0x8c,  0xf8,  0x20,  0xe0,  0x80,  0x03,  0x00,  0x30,   // 00c0\n+0x18,  0x00,  0x15,  0x40,  0x08,  0xf0,  0x38,  0x80,   // 00c8\n+0x85,  0x0b,  0x66,  0xb5,  0xe0,  0xff,  0x88,  0xf0,   // 00d0\n+0x24,  0xe0,  0x86,  0x03,  0x0c,  0x60,  0x64,  0x08,   // 00d8\n+0x46,  0x62,  0x49,  0xc3,  0x50,  0x27,  0x04,  0x6a,   // 00e0\n+0x84,  0x6e,  0x07,  0x18,  0x69,  0xa0,  0x04,  0x5f,   // 00e8\n+0x1c,  0x8b,  0xf7,  0xc8,  0x45,  0x76,  0x6b,  0x1f,   // 00f0\n+0xb6,  0x40,  0x04,  0xb0,  0x40,  0x00,  0x05,  0xb0,   // 00f8\n+0x00,  0x08,  0x5a,  0x00,  0x06,  0xb4,  0x10,  0x00,   // 0100\n+0xa4,  0xff,  0x24,  0xcc,  0x60,  0x02,  0x00,  0xf8,   // 0108\n+0x3e,  0x00,  0x03,  0xff,  0x37,  0xd0,  0x78,  0x03,   // 0110\n+0xe0,  0x03,  0xbe,  0x0b,  0x10,  0x8b,  0xf6,  0x5b,   // 0118\n+0x00,  0x67,  0x5a,  0x00,  0x06,  0xb4,  0x10,  0x00,   // 0120\n+0xa4,  0xff,  0x24,  0xcc,  0xe0,  0x02,  0x00,  0xf8,   // 0128\n+0x3e,  0x00,  0x03,  0xff,  0x37,  0xd0,  0x78,  0x03,   // 0130\n+0xe0,  0x03,  0xbe,  0x0b,  0x10,  0x8b,  0xf6,  0x5b,   // 0138\n+0x00,  0x67,  0x5a,  0x00,  0x00,  0xf4,  0x38,  0x80,   // 0140\n+0x00,  0x04,  0x20,  0xb5,  0x00,  0x08,  0x04,  0xb0,   // 0148\n+0x20,  0x00,  0x8e,  0xf8,  0x20,  0xe0,  0x80,  0x03,   // 0150\n+0xc0,  0x43,  0x00,  0x00,  0x08,  0xf0,  0x38,  0x80,   // 0158\n+0x81,  0x03,  0x26,  0xb5,  0xe0,  0xff,  0x88,  0xf0,   // 0160\n+0x20,  0xe0,  0x86,  0x03,  0x08,  0x60,  0x64,  0x08,   // 0168\n+0x46,  0x62,  0x45,  0xc3,  0x50,  0x27,  0x04,  0x6a,   // 0170\n+0xa4,  0x6e,  0x7f,  0x90,  0xbf,  0xff,  0x65,  0xa0,   // 0178\n+0x04,  0x07,  0x18,  0x8b,  0xf6,  0xc8,  0x41,  0x76,   // 0180\n+0x6a,  0x1f,  0x5a,  0x00,  0xe1,  0x40,  0xf2,  0x40,   // 0188\n+0x0f,  0x7b,  0x02,  0x6f,  0x03,  0xb0,  0x80,  0x00,   // 0190\n+0x07,  0xb0,  0x00,  0x02,  0xe8,  0x00,  0x08,  0x6d,   // 0198\n+0xe8,  0xbf,  0x60,  0x01,  0x03,  0x18,  0x48,  0xb0,   // 01a0\n+0x20,  0x10,  0x89,  0x40,  0x1a,  0x40,  0x02,  0x6a,   // 01a8\n+0x24,  0x18,  0xa1,  0x40,  0x98,  0x40,  0xf2,  0x4a,   // 01b0\n+0x06,  0x1e,  0xff,  0x9f,  0xc5,  0xff,  0x21,  0xb5,   // 01b8\n+0x00,  0x08,  0x98,  0x40,  0x04,  0xb0,  0x40,  0x00,   // 01c0\n+0x95,  0x60,  0x80,  0x90,  0x18,  0x00,  0x48,  0xb0,   // 01c8\n+0x00,  0x04,  0x41,  0x76,  0x80,  0x90,  0x13,  0x00,   // 01d0\n+0x04,  0xb0,  0x00,  0x08,  0x45,  0x60,  0x91,  0x40,   // 01d8\n+0xa8,  0x40,  0x80,  0x90,  0x0c,  0x00,  0x48,  0xb0,   // 01e0\n+0x00,  0x04,  0x41,  0x76,  0x80,  0x90,  0x07,  0x00,   // 01e8\n+0x4a,  0xb0,  0x00,  0x08,  0xf2,  0x8c,  0xdf,  0xc0,   // 01f0\n+0x29,  0x03,  0xef,  0x03,  0x0c,  0xf8,  0x38,  0x80,   // 01f8\n+0x80,  0x03,  0xc0,  0xf8,  0x04,  0x00,  0x0c,  0xf8,   // 0200\n+0x38,  0x84,  0xc0,  0x03,  0xc0,  0xf8,  0x04,  0x00,   // 0208\n+0x00,  0x60,  0xff,  0x9f,  0x79,  0xff,  0x00,  0xb0,   // 0210\n+0x00,  0x04,  0xff,  0x9f,  0x85,  0xff,  0x04,  0xff,   // 0218\n+0x30,  0xcc,  0x10,  0x03,  0xe0,  0xfb,  0x3e,  0x00,   // 0220\n+0x04,  0xff,  0x33,  0xcc,  0x80,  0x03,  0xe0,  0xfb,   // 0228\n+0x10,  0x00,  0x4c,  0xfe,  0x33,  0xcc,  0x80,  0x03,   // 0230\n+0xe0,  0xfb,  0x14,  0x00,  0x80,  0x40,  0x06,  0xb0,   // 0238\n+0x40,  0x00,  0x8c,  0xf8,  0x2f,  0xe0,  0x80,  0x03,   // 0240\n+0xe0,  0x63,  0x00,  0x00,  0x20,  0xf7,  0xf0,  0xcf,   // 0248\n+0x10,  0x03,  0x20,  0xf7,  0xb0,  0xcf,  0x11,  0x13,   // 0250\n+0x20,  0xf7,  0x70,  0xcf,  0x12,  0x23,  0x20,  0xf7,   // 0258\n+0x30,  0xcf,  0x13,  0x33,  0x20,  0xf7,  0xf0,  0xce,   // 0260\n+0x14,  0x43,  0x20,  0xf7,  0xb0,  0xce,  0x15,  0x53,   // 0268\n+0x20,  0xf7,  0x70,  0xce,  0x16,  0x63,  0x20,  0xf7,   // 0270\n+0x30,  0xce,  0x17,  0x73,  0x20,  0xf7,  0xf0,  0xcd,   // 0278\n+0x18,  0x83,  0x20,  0xf7,  0xb0,  0xcd,  0x19,  0x93,   // 0280\n+0x20,  0xf7,  0x70,  0xcd,  0x1a,  0xa3,  0x20,  0xf7,   // 0288\n+0x30,  0xcd,  0x1b,  0xb3,  0x20,  0xf7,  0xf0,  0xcc,   // 0290\n+0x1c,  0xc3,  0x20,  0xf7,  0xb0,  0xcc,  0x1d,  0xd3,   // 0298\n+0x20,  0xf7,  0x70,  0xcc,  0x1e,  0xe3,  0x20,  0xf7,   // 02a0\n+0x30,  0xcc,  0x1f,  0xf3,  0x04,  0xff,  0x33,  0xcc,   // 02a8\n+0x80,  0x03,  0xe0,  0xfb,  0x10,  0x00,  0x4c,  0xfe,   // 02b0\n+0x33,  0xcc,  0x80,  0x03,  0xe0,  0xfb,  0x14,  0x00,   // 02b8\n+0x00,  0xb5,  0x20,  0x00,  0x8c,  0xf8,  0x2f,  0xe0,   // 02c0\n+0x80,  0x03,  0xe0,  0x63,  0x00,  0x00,  0x6f,  0x03,   // 02c8\n+0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,   // 02d0\n+0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,   // 02d8\n+};\ndiff --git a/libavcodec/rpi_hevcdec.c b/libavcodec/rpi_hevcdec.c\nnew file mode 100644\nindex 0000000000..e651e5c565\n--- /dev/null\n+++ b/libavcodec/rpi_hevcdec.c\n@@ -0,0 +1,6134 @@\n+/*\n+ * HEVC video Decoder\n+ *\n+ * Copyright (C) 2012 - 2013 Guillaume Martres\n+ * Copyright (C) 2012 - 2013 Mickael Raulet\n+ * Copyright (C) 2012 - 2013 Gildas Cocherel\n+ * Copyright (C) 2012 - 2013 Wassim Hamidouche\n+ * Copyright (C) 2018 John Cox, Ben Avison, Peter de Rivaz for Raspberry Pi (Trading)\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"libavutil/attributes.h\"\n+#include \"libavutil/common.h\"\n+#include \"libavutil/display.h\"\n+#include \"libavutil/internal.h\"\n+#include \"libavutil/mastering_display_metadata.h\"\n+#include \"libavutil/md5.h\"\n+#include \"libavutil/opt.h\"\n+#include \"libavutil/pixdesc.h\"\n+#include \"libavutil/stereo3d.h\"\n+\n+#include \"decode.h\"\n+#include \"bswapdsp.h\"\n+#include \"bytestream.h\"\n+#include \"golomb.h\"\n+#include \"hevc.h\"\n+#include \"rpi_hevc_data.h\"\n+#include \"rpi_hevc_parse.h\"\n+#include \"rpi_hevcdec.h\"\n+#include \"rpi_hevc_cabac_fns.h\"\n+#include \"profiles.h\"\n+#include \"hwconfig.h\"\n+\n+#include \"rpi_zc_frames.h\"\n+#include \"rpi_qpu.h\"\n+#include \"rpi_hevc_shader.h\"\n+#include \"rpi_hevc_shader_cmd.h\"\n+#include \"rpi_hevc_shader_template.h\"\n+#include \"rpi_zc.h\"\n+#include \"libavutil/rpi_sand_fns.h\"\n+\n+#include \"pthread.h\"\n+#include <stdatomic.h>\n+\n+#define DEBUG_DECODE_N 0   // 0 = do all, n = frames idr onwards\n+\n+#define PACK2(hi,lo) (((hi) << 16) | ((lo) & 0xffff))\n+\n+#ifndef av_mod_uintp2\n+static av_always_inline av_const unsigned av_mod_uintp2_c(unsigned a, unsigned p)\n+{\n+    return a & ((1 << p) - 1);\n+}\n+#   define av_mod_uintp2   av_mod_uintp2_c\n+#endif\n+\n+const uint8_t ff_hevc_rpi_pel_weight[65] = { [2] = 0, [4] = 1, [6] = 2, [8] = 3, [12] = 4, [16] = 5, [24] = 6, [32] = 7, [48] = 8, [64] = 9 };\n+static void rpi_begin(const HEVCRpiContext * const s, HEVCRpiJob * const jb, const unsigned int ctu_ts_first);\n+\n+#define MC_DUMMY_X (-32)\n+#define MC_DUMMY_Y (-32)\n+\n+// UV & Y both have min 4x4 pred (no 2x2 chroma)\n+// Allow for even spread +1 for setup, +1 for rounding\n+// As we have load sharing this can (in theory) be exceeded so we have to\n+// check after each CTU, but it is a good base size\n+\n+// Worst case (all 4x4) commands per CTU\n+#define QPU_Y_CMD_PER_CTU_MAX (16 * 16)\n+#define QPU_C_CMD_PER_CTU_MAX (8 * 8)\n+\n+#define QPU_MAX_CTU_PER_LINE ((HEVC_RPI_MAX_WIDTH + 63) / 64)\n+\n+#define QPU_GRPS (QPU_N_MAX / QPU_N_GRP)\n+#define QPU_CTU_PER_GRP ((QPU_MAX_CTU_PER_LINE + QPU_GRPS - 1) / QPU_GRPS)\n+\n+#define QPU_Y_CMD_SLACK_PER_Q (QPU_Y_CMD_PER_CTU_MAX / 2)\n+#define QPU_C_CMD_SLACK_PER_Q (QPU_C_CMD_PER_CTU_MAX / 2)\n+\n+// Total cmds to allocate - allow for slack & setup\n+#define QPU_Y_COMMANDS (QPU_CTU_PER_GRP * QPU_GRPS * QPU_Y_CMD_PER_CTU_MAX + (1 + QPU_Y_CMD_SLACK_PER_Q) * QPU_N_MAX)\n+#define QPU_C_COMMANDS (QPU_CTU_PER_GRP * QPU_GRPS * QPU_C_CMD_PER_CTU_MAX + (1 + QPU_C_CMD_SLACK_PER_Q) * QPU_N_MAX)\n+\n+#define QPU_Y_SYNCS (QPU_N_MAX * (16 + 2))\n+#define QPU_C_SYNCS (QPU_N_MAX * (8 + 2))\n+\n+// The QPU code for UV blocks only works up to a block width of 8\n+#define RPI_CHROMA_BLOCK_WIDTH 8\n+\n+#define ENCODE_COEFFS(c0, c1, c2, c3) (((c0) & 0xff) | ((c1) & 0xff) << 8 | ((c2) & 0xff) << 16 | ((c3) & 0xff) << 24)\n+\n+\n+// Actual filter goes -ve, +ve, +ve, -ve using these values\n+static const uint32_t rpi_filter_coefs[8] = {\n+        ENCODE_COEFFS(  0,  64,   0,  0),\n+        ENCODE_COEFFS(  2,  58,  10,  2),\n+        ENCODE_COEFFS(  4,  54,  16,  2),\n+        ENCODE_COEFFS(  6,  46,  28,  4),\n+        ENCODE_COEFFS(  4,  36,  36,  4),\n+        ENCODE_COEFFS(  4,  28,  46,  6),\n+        ENCODE_COEFFS(  2,  16,  54,  4),\n+        ENCODE_COEFFS(  2,  10,  58,  2)\n+};\n+\n+// Function arrays by QPU\n+\n+static const int * const inter_pred_setup_c_qpu[12] = {\n+    mc_setup_c_q0, mc_setup_c_qn, mc_setup_c_qn, mc_setup_c_qn,\n+    mc_setup_c_qn, mc_setup_c_qn, mc_setup_c_qn, mc_setup_c_qn,\n+    mc_setup_c_qn, mc_setup_c_qn, mc_setup_c_qn, mc_setup_c_qn\n+};\n+\n+static const int * const inter_pred_setup_c10_qpu[12] = {\n+    mc_setup_c10_q0, mc_setup_c10_qn, mc_setup_c10_qn, mc_setup_c10_qn,\n+    mc_setup_c10_qn, mc_setup_c10_qn, mc_setup_c10_qn, mc_setup_c10_qn,\n+    mc_setup_c10_qn, mc_setup_c10_qn, mc_setup_c10_qn, mc_setup_c10_qn\n+};\n+\n+static const int * const inter_pred_setup_y_qpu[12] = {\n+    mc_setup_y_q0, mc_setup_y_qn, mc_setup_y_qn, mc_setup_y_qn,\n+    mc_setup_y_qn, mc_setup_y_qn, mc_setup_y_qn, mc_setup_y_qn,\n+    mc_setup_y_qn, mc_setup_y_qn, mc_setup_y_qn, mc_setup_y_qn\n+};\n+\n+static const int * const inter_pred_setup_y10_qpu[12] = {\n+    mc_setup_y10_q0, mc_setup_y10_qn, mc_setup_y10_qn, mc_setup_y10_qn,\n+    mc_setup_y10_qn, mc_setup_y10_qn, mc_setup_y10_qn, mc_setup_y10_qn,\n+    mc_setup_y10_qn, mc_setup_y10_qn, mc_setup_y10_qn, mc_setup_y10_qn\n+};\n+\n+static const int * const inter_pred_sync_qpu[12] = {\n+    mc_sync_q0, mc_sync_q1, mc_sync_q2, mc_sync_q3,\n+    mc_sync_q4, mc_sync_q5, mc_sync_q6, mc_sync_q7,\n+    mc_sync_q8, mc_sync_q9, mc_sync_q10, mc_sync_q11\n+};\n+\n+static const int * const inter_pred_sync10_qpu[12] = {\n+    mc_sync10_q0, mc_sync10_q1, mc_sync10_q2, mc_sync10_q3,\n+    mc_sync10_q4, mc_sync10_q5, mc_sync10_q6, mc_sync10_q7,\n+    mc_sync10_q8, mc_sync10_q9, mc_sync10_q10, mc_sync10_q11\n+};\n+\n+static const int * const inter_pred_exit_c_qpu[12] = {\n+    mc_exit_c_q0, mc_exit_c_qn, mc_exit_c_qn, mc_exit_c_qn,\n+    mc_exit_c_qn, mc_exit_c_qn, mc_exit_c_qn, mc_exit_c_qn,\n+    mc_exit_c_qn, mc_exit_c_qn, mc_exit_c_qn, mc_exit_c_qn\n+};\n+\n+static const int * const inter_pred_exit_c10_qpu[12] = {\n+    mc_exit_c10_q0, mc_exit_c10_qn, mc_exit_c10_qn, mc_exit_c10_qn,\n+    mc_exit_c10_qn, mc_exit_c10_qn, mc_exit_c10_qn, mc_exit_c10_qn,\n+    mc_exit_c10_qn, mc_exit_c10_qn, mc_exit_c10_qn, mc_exit_c10_qn\n+};\n+\n+static const int * const inter_pred_exit_y_qpu[12] = {\n+    mc_exit_y_q0, mc_exit_y_qn, mc_exit_y_qn, mc_exit_y_qn,\n+    mc_exit_y_qn, mc_exit_y_qn, mc_exit_y_qn, mc_exit_y_qn,\n+    mc_exit_y_qn, mc_exit_y_qn, mc_exit_y_qn, mc_exit_y_qn\n+};\n+\n+static const int * const inter_pred_exit_y10_qpu[12] = {\n+    mc_exit_y10_q0, mc_exit_y10_qn, mc_exit_y10_qn, mc_exit_y10_qn,\n+    mc_exit_y10_qn, mc_exit_y10_qn, mc_exit_y10_qn, mc_exit_y10_qn,\n+    mc_exit_y10_qn, mc_exit_y10_qn, mc_exit_y10_qn, mc_exit_y10_qn\n+};\n+\n+typedef struct ipe_chan_info_s\n+{\n+    const uint8_t bit_depth;\n+    const uint8_t n;\n+    const int * const * setup_fns;\n+    const int * const * sync_fns;\n+    const int * const * exit_fns;\n+} ipe_chan_info_t;\n+\n+typedef struct ipe_init_info_s\n+{\n+    ipe_chan_info_t luma;\n+    ipe_chan_info_t chroma;\n+} ipe_init_info_t;\n+\n+static void set_bytes(uint8_t * b, const unsigned int stride, const int ln, unsigned int a)\n+{\n+    switch (ln)\n+    {\n+        default:  // normally 0\n+            *b = a;\n+            break;\n+        case 1:\n+            a |= a << 8;\n+            *(uint16_t *)b = a;\n+            b += stride;\n+            *(uint16_t *)b = a;\n+            break;\n+        case 2:\n+            a |= a << 8;\n+            a |= a << 16;\n+            *(uint32_t *)b = a;\n+            b += stride;\n+            *(uint32_t *)b = a;\n+            b += stride;\n+            *(uint32_t *)b = a;\n+            b += stride;\n+            *(uint32_t *)b = a;\n+            break;\n+        case 3:\n+        {\n+            unsigned int i;\n+            uint64_t d;\n+            a |= a << 8;\n+            a |= a << 16;\n+            d = ((uint64_t)a << 32) | a;\n+            for (i = 0; i != 8; ++i, b += stride)\n+                *(uint64_t *)b = d;\n+            break;\n+        }\n+        case 4:\n+        {\n+            unsigned int i;\n+            uint64_t d;\n+            a |= a << 8;\n+            a |= a << 16;\n+            d = ((uint64_t)a << 32) | a;\n+            for (i = 0; i != 16; ++i, b += stride)\n+            {\n+                *(uint64_t *)b = d;\n+                *(uint64_t *)(b + 8) = d;\n+            }\n+            break;\n+        }\n+    }\n+}\n+\n+// We expect this to be called with ln = (log2_cb_size - 3) so range =  -1..3\n+// (4 not required)\n+static void set_stash2(uint8_t * b_u, uint8_t * b_l, const int ln, unsigned int a)\n+{\n+    switch (ln)\n+    {\n+        default:  // 0 or -1\n+            *b_u = a;\n+            *b_l = a;\n+            break;\n+        case 1:\n+            a |= a << 8;\n+            *(uint16_t *)b_u = a;\n+            *(uint16_t *)b_l = a;\n+            break;\n+        case 2:\n+            a |= a << 8;\n+            a |= a << 16;\n+            *(uint32_t *)b_u = a;\n+            *(uint32_t *)b_l = a;\n+            break;\n+        case 3:\n+            a |= a << 8;\n+            a |= a << 16;\n+            *(uint32_t *)b_u = a;\n+            *(uint32_t *)(b_u + 4) = a;\n+            *(uint32_t *)b_l = a;\n+            *(uint32_t *)(b_l + 4) = a;\n+            break;\n+        case 4:\n+            a |= a << 8;\n+            a |= a << 16;\n+            *(uint32_t *)b_u = a;\n+            *(uint32_t *)(b_u + 4) = a;\n+            *(uint32_t *)(b_u + 8) = a;\n+            *(uint32_t *)(b_u + 12) = a;\n+            *(uint32_t *)b_l = a;\n+            *(uint32_t *)(b_l + 4) = a;\n+            *(uint32_t *)(b_l + 8) = a;\n+            *(uint32_t *)(b_l + 12) = a;\n+            break;\n+    }\n+}\n+\n+static void zap_cabac_stash(uint8_t * b, const int ln)\n+{\n+    switch (ln)\n+    {\n+        default:  // 0\n+            *b = 0;\n+            break;\n+        case 1:\n+            *(uint16_t *)b = 0;\n+            break;\n+        case 2:\n+            *(uint32_t *)b = 0;\n+            break;\n+        case 3:\n+            *(uint32_t *)b = 0;\n+            *(uint32_t *)(b + 4) = 0;\n+            break;\n+    }\n+}\n+\n+\n+\n+// Set a small square block of bits in a bitmap\n+// Bits must be aligned on their size boundry (which will be true of all split CBs)\n+static void set_bits(uint8_t * f, const unsigned int x, const unsigned int stride, const unsigned int ln)\n+{\n+    unsigned int n;\n+    const unsigned int sh = (x & 7);\n+\n+    f += (x >> 3);\n+\n+    av_assert2(ln <= 3);\n+    av_assert2((x & ((1 << ln) - 1)) == 0);\n+\n+    switch (ln)\n+    {\n+        default:  // 1\n+            f[0] |= 1 << sh;\n+            break;\n+        case 1:  // 3 * 2\n+            n = 3 << sh;\n+            f[0] |= n;\n+            f[stride] |= n;\n+            break;\n+        case 2:  // 0xf * 4\n+            n = 0xf << sh;\n+            f[0] |= n;\n+            f[stride] |= n;\n+            f[stride * 2] |= n;\n+            f[stride * 3] |= n;\n+            break;\n+        case 3:  // 0xff * 8\n+            for (n = 0; n != 8; ++n, f += stride)\n+                *f = 0xff;\n+            break;\n+    }\n+}\n+\n+static const ipe_init_info_t ipe_init_infos[9] = {  // Alloc for bit depths of 8-16\n+   {  // 8\n+      .luma =   {8, QPU_MC_PRED_N_Y8, inter_pred_setup_y_qpu, inter_pred_sync_qpu, inter_pred_exit_y_qpu},\n+      .chroma = {8, QPU_MC_PRED_N_C8, inter_pred_setup_c_qpu, inter_pred_sync_qpu, inter_pred_exit_c_qpu}\n+   },\n+   {  // 9\n+      .luma =   {0},\n+      .chroma = {0}\n+   },\n+   {  // 10\n+      .luma =   {10, QPU_MC_PRED_N_Y10, inter_pred_setup_y10_qpu, inter_pred_sync10_qpu, inter_pred_exit_y10_qpu},\n+      .chroma = {10, QPU_MC_PRED_N_C10, inter_pred_setup_c10_qpu, inter_pred_sync10_qpu, inter_pred_exit_c10_qpu}\n+   }\n+\n+};\n+\n+static void set_ipe_from_ici(HEVCRpiInterPredEnv * const ipe, const ipe_chan_info_t * const ici)\n+{\n+    const unsigned int n = ici->n;\n+    const unsigned int q1_size = (ipe->gptr.numbytes / n) & ~3;  // Round down to word\n+\n+    ipe->n = n;\n+    ipe->max_fill = q1_size - ipe->min_gap;\n+    for(unsigned int i = 0; i < n; i++) {\n+        HEVCRpiInterPredQ * const q = ipe->q + i;\n+        q->qpu_mc_curr = q->qpu_mc_base =\n+            (qpu_mc_pred_cmd_t *)(ipe->gptr.arm + i * q1_size);\n+        q->code_setup = qpu_fn(ici->setup_fns[i]);\n+        q->code_sync = qpu_fn(ici->sync_fns[i]);\n+        q->code_exit = qpu_fn(ici->exit_fns[i]);\n+    }\n+}\n+\n+static void rpi_hevc_qpu_set_fns(HEVCRpiContext * const s, const unsigned int bit_depth)\n+{\n+    av_assert0(bit_depth >= 8 && bit_depth <= 16);\n+\n+    rpi_hevc_qpu_init_fn(&s->qpu, bit_depth);\n+}\n+\n+// Unsigned Trivial MOD\n+static inline unsigned int utmod(const unsigned int x, const unsigned int n)\n+{\n+    return x >= n ? x - n : x;\n+}\n+\n+// returns pq->job_n++\n+static inline unsigned int pass_queue_inc_job_n(HEVCRpiPassQueue * const pq)\n+{\n+    unsigned int const x2 = pq->job_n;\n+    pq->job_n = utmod(x2 + 1, RPI_MAX_JOBS);\n+    return x2;\n+}\n+\n+static void pass_queue_init(HEVCRpiPassQueue * const pq, HEVCRpiContext * const s, HEVCRpiWorkerFn * const worker, sem_t * const psem_out, const int n)\n+{\n+    pq->terminate = 0;\n+    pq->job_n = 0;\n+    pq->context = s;\n+    pq->worker = worker;\n+    pq->psem_out = psem_out;\n+    pq->pass_n = n;\n+    pq->started = 0;\n+    sem_init(&pq->sem_in, 0, 0);\n+}\n+\n+static void pass_queue_kill(HEVCRpiPassQueue * const pq)\n+{\n+    sem_destroy(&pq->sem_in);\n+}\n+\n+static inline void rpi_sem_wait(sem_t * const sem)\n+{\n+    while (sem_wait(sem) != 0) {\n+        av_assert0(errno == EINTR);\n+    }\n+}\n+\n+static void pass_queue_submit_job(HEVCRpiPassQueue * const pq)\n+{\n+    sem_post(&pq->sem_in);\n+}\n+\n+static inline void pass_queue_do_all(HEVCRpiContext * const s, HEVCRpiJob * const jb)\n+{\n+    // Do the various passes - common with the worker code\n+    for (unsigned int i = 0; i != RPI_PASSES; ++i) {\n+        s->passq[i].worker(s, jb);\n+    }\n+}\n+\n+\n+#if 0\n+static void dump_jbc(const HEVCRpiJobCtl *const jbc, const char * const func)\n+{\n+    int x;\n+    sem_getvalue((sem_t *)&jbc->sem_out, &x);\n+    printf(\"%s: jbc: in=%d, out=%d, sum=%d\\n\", func, jbc->offload_in, jbc->offload_out, x);\n+}\n+#endif\n+\n+\n+static HEVCRpiJob * job_alloc(HEVCRpiJobCtl * const jbc, HEVCRpiLocalContext * const lc)\n+{\n+    HEVCRpiJob * jb;\n+    HEVCRpiJobGlobal * const jbg = jbc->jbg;\n+\n+    pthread_mutex_lock(&jbg->lock);\n+    // Check local 1st\n+    if ((jb = jbc->jb1) != NULL)\n+    {\n+        // Only 1 - very easy :-)\n+        jbc->jb1 = NULL;\n+    }\n+    else\n+    {\n+        // Now look for global free chain\n+        if ((jb = jbg->free1) != NULL)\n+        {\n+            // Found one - unlink it\n+            jbg->free1 = jb->next;\n+            jb->next = NULL;\n+        }\n+        else\n+        {\n+            // Out of places to look - wait for one to become free - add to Qs\n+\n+            // Global\n+            // If \"good\" lc then add after the last \"good\" el in the chain\n+            // otherwise add to the tail\n+            if (jbg->wait_tail == NULL || jbg->wait_tail->last_progress_good || !lc->last_progress_good)\n+            {\n+                // Add to end as we had to wait last time or wait Q empty\n+                if ((lc->jw_prev = jbg->wait_tail) == NULL)\n+                    jbg->wait_head = lc;\n+                else\n+                    lc->jw_prev->jw_next = lc;\n+                lc->jw_next = NULL;\n+                jbg->wait_tail = lc;\n+            }\n+            else\n+            {\n+                // This is a \"good\" lc that we need to poke into the middle\n+                // of the Q\n+                // We know that the Q isn't empty and there is at least one\n+                // !last_progess_good el in it from the previous test\n+\n+                HEVCRpiLocalContext * const p = jbg->wait_good; // Insert after\n+\n+                if (p == NULL)\n+                {\n+                    // No current good els - add to head\n+                    lc->jw_next = jbg->wait_head;\n+                    jbg->wait_head = lc;\n+                }\n+                else\n+                {\n+                    lc->jw_next = p->jw_next;\n+                    p->jw_next = lc;\n+                }\n+\n+                lc->jw_next->jw_prev = lc;\n+                lc->jw_prev = p;\n+            }\n+\n+            // If \"good\" then we are now the last good waiting el\n+            if (lc->last_progress_good)\n+                jbg->wait_good = lc;\n+\n+            // Local\n+            if ((lc->ljw_prev = jbc->lcw_tail) == NULL)\n+                jbc->lcw_head = lc;\n+            else\n+                lc->ljw_prev->ljw_next = lc;\n+            lc->ljw_next = NULL;\n+            jbc->lcw_tail = lc;\n+        }\n+    }\n+\n+    pthread_mutex_unlock(&jbg->lock);\n+\n+    if (jb == NULL)  // Need to wait\n+    {\n+        rpi_sem_wait(&lc->jw_sem);\n+        jb = lc->jw_job;  // Set by free code\n+    }\n+\n+    return jb;\n+}\n+\n+\n+static void job_free(HEVCRpiJobCtl * const jbc0, HEVCRpiJob * const jb)\n+{\n+    HEVCRpiJobGlobal * const jbg = jbc0->jbg;  // This jbc only used to find jbg so we can get the lock\n+    HEVCRpiJobCtl * jbc = jb->jbc_local;\n+    HEVCRpiLocalContext * lc = NULL;\n+\n+    pthread_mutex_lock(&jbg->lock);\n+\n+    if (jbc != NULL)\n+    {\n+        av_assert1(jbc->jb1 == NULL);\n+\n+        // Release to Local if nothing waiting there\n+        if ((lc = jbc->lcw_head) == NULL)\n+            jbc->jb1 = jb;\n+    }\n+    else\n+    {\n+        // Release to global if nothing waiting there\n+        if ((lc = jbg->wait_head) == NULL)\n+        {\n+            jb->next = jbg->free1;\n+            jbg->free1 = jb;\n+        }\n+        else\n+        {\n+            // ? seems somehow mildy ugly...\n+            jbc = lc->context->jbc;\n+        }\n+    }\n+\n+    if (lc != NULL)\n+    {\n+        // Something was waiting\n+\n+        // Unlink\n+        // Global\n+        if (lc->jw_next == NULL)\n+            jbg->wait_tail = lc->jw_prev;\n+        else\n+            lc->jw_next->jw_prev = lc->jw_prev;\n+\n+        if (lc->jw_prev == NULL)\n+            jbg->wait_head = lc->jw_next;\n+        else\n+            lc->jw_prev->jw_next = lc->jw_next;\n+\n+        // Local\n+        if (lc->ljw_next == NULL)\n+            jbc->lcw_tail = lc->ljw_prev;\n+        else\n+            lc->ljw_next->ljw_prev = lc->ljw_prev;\n+\n+        if (lc->ljw_prev == NULL)\n+            jbc->lcw_head = lc->ljw_next;\n+        else\n+            lc->ljw_prev->ljw_next = lc->ljw_next;\n+\n+        // Update good if required\n+        if (jbg->wait_good == lc)\n+            jbg->wait_good = lc->jw_prev;\n+\n+        // Prod\n+        lc->jw_job = jb;\n+        sem_post(&lc->jw_sem);\n+    }\n+\n+    pthread_mutex_unlock(&jbg->lock);\n+}\n+\n+static void job_lc_kill(HEVCRpiLocalContext * const lc)\n+{\n+    sem_destroy(&lc->jw_sem);\n+}\n+\n+static void job_lc_init(HEVCRpiLocalContext * const lc)\n+{\n+    lc->jw_next = NULL;\n+    lc->jw_prev = NULL;\n+    lc->ljw_next = NULL;\n+    lc->ljw_prev = NULL;\n+    lc->jw_job = NULL;\n+    sem_init(&lc->jw_sem,  0, 0);\n+}\n+\n+// Returns:\n+//  0 if we have waited for MV or expect to wait for recon\n+//  1 if we haven't waited for MV & do not need to wait for recon\n+static int progress_good(const HEVCRpiContext *const s, const HEVCRpiJob * const jb)\n+{\n+    if (jb->waited) // reset by rpi_begin\n+        return 0;\n+    for (unsigned int i = 0; i != FF_ARRAY_ELEMS(jb->progress_req); ++i)\n+    {\n+        if (jb->progress_req[i] >= 0 && s->DPB[i].tf.progress != NULL &&\n+                ((volatile int *)(s->DPB[i].tf.progress->data))[0] < jb->progress_req[i])\n+            return 0;\n+    }\n+    return 1;\n+}\n+\n+// Submit job if it is full (indicated by having ctu_ts_last set >= 0)\n+static inline void worker_submit_job(HEVCRpiContext *const s, HEVCRpiLocalContext * const lc)\n+{\n+    HEVCRpiJobCtl *const jbc = s->jbc;\n+    HEVCRpiJob * const jb = lc->jb0;\n+\n+    av_assert1(jb != NULL);\n+\n+    if (jb->ctu_ts_last < 0) {\n+        return;\n+    }\n+\n+    lc->last_progress_good = progress_good(s, jb);\n+    jb->waited = !lc->last_progress_good;\n+    lc->jb0 = NULL;\n+\n+    if (s->offload_recon)\n+    {\n+        pthread_mutex_lock(&jbc->in_lock);\n+        jbc->offloadq[jbc->offload_in] = jb;\n+        jbc->offload_in = utmod(jbc->offload_in + 1, RPI_MAX_JOBS);\n+        pthread_mutex_unlock(&jbc->in_lock);\n+\n+        pass_queue_submit_job(s->passq + 0);  // Consumes job eventually\n+    }\n+    else\n+    {\n+        pass_queue_do_all(s, jb);  // Consumes job before return\n+    }\n+}\n+\n+\n+// Call worker_pass0_ready to wait until the s->pass0_job slot becomes\n+// available to receive the next job.\n+//\n+// Now safe against multiple callers - needed for tiles\n+// \"normal\" and WPP will only call here one at a time\n+static inline void worker_pass0_ready(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc)\n+{\n+    HEVCRpiJobCtl * const jbc = s->jbc;\n+\n+    // It is legit for us to already have a job allocated - do nothing in this case\n+    if (lc->jb0 != NULL)\n+        return;\n+\n+    if (s->offload_recon)\n+        rpi_sem_wait(&jbc->sem_out);  // This sem will stop this frame grabbing too much\n+\n+    lc->jb0 = job_alloc(jbc, lc);\n+\n+    rpi_begin(s, lc->jb0, lc->ts);\n+}\n+\n+// Free up a job without submission\n+static void worker_free(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc)\n+{\n+    HEVCRpiJobCtl * const jbc = s->jbc;\n+    HEVCRpiJob * const jb = lc->jb0;\n+\n+    if (jb == NULL) {\n+        return;\n+    }\n+\n+    lc->jb0 = NULL;\n+\n+    job_free(jbc, jb);\n+\n+    // If offload then poke sem_out too\n+    if (s->offload_recon) {\n+        sem_post(&jbc->sem_out);\n+    }\n+}\n+\n+\n+// Call this to wait for all jobs to have completed at the end of a frame\n+// Slightly icky as there is no clean way to wait for a sem to count up\n+// Not reentrant - call on main thread only\n+static void worker_wait(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc)\n+{\n+    HEVCRpiJobCtl * const jbc = s->jbc;\n+    int i = 0;\n+\n+    // We shouldn't reach here with an unsubmitted job\n+    av_assert1(lc->jb0 == NULL);\n+\n+    // If no offload then there can't be anything to wait for\n+    if (!s->offload_recon) {\n+        return;\n+    }\n+\n+    if (sem_getvalue(&jbc->sem_out, &i) == 0 && i < RPI_MAX_JOBS)\n+    {\n+        for (i = 0; i != RPI_MAX_JOBS; ++i) {\n+            rpi_sem_wait(&jbc->sem_out);\n+        }\n+        for (i = 0; i != RPI_MAX_JOBS; ++i) {\n+            sem_post(&jbc->sem_out);\n+        }\n+    }\n+}\n+\n+static void * pass_worker(void *arg)\n+{\n+    HEVCRpiPassQueue *const pq = (HEVCRpiPassQueue *)arg;\n+    HEVCRpiContext *const s = pq->context;\n+\n+    for (;;)\n+    {\n+        rpi_sem_wait(&pq->sem_in);\n+\n+        if (pq->terminate)\n+            break;\n+\n+        pq->worker(s, s->jbc->offloadq[pass_queue_inc_job_n(pq)]);\n+        // * should really set jb->passes_done here\n+\n+        sem_post(pq->psem_out);\n+    }\n+    return NULL;\n+}\n+\n+static void pass_queues_start_all(HEVCRpiContext *const s)\n+{\n+    unsigned int i;\n+    HEVCRpiPassQueue * const pqs = s->passq;\n+\n+    for (i = 0; i != RPI_PASSES; ++i)\n+    {\n+        av_assert0(pthread_create(&pqs[i].thread, NULL, pass_worker, pqs + i) == 0);\n+        pqs[i].started = 1;\n+    }\n+}\n+\n+static void pass_queues_term_all(HEVCRpiContext *const s)\n+{\n+    unsigned int i;\n+    HEVCRpiPassQueue * const pqs = s->passq;\n+\n+    for (i = 0; i != RPI_PASSES; ++i)\n+        pqs[i].terminate = 1;\n+    for (i = 0; i != RPI_PASSES; ++i)\n+    {\n+        if (pqs[i].started)\n+            sem_post(&pqs[i].sem_in);\n+    }\n+    for (i = 0; i != RPI_PASSES; ++i)\n+    {\n+        if (pqs[i].started) {\n+            pthread_join(pqs[i].thread, NULL);\n+            pqs[i].started = 0;\n+        }\n+    }\n+}\n+\n+static void pass_queues_kill_all(HEVCRpiContext *const s)\n+{\n+    unsigned int i;\n+    HEVCRpiPassQueue * const pqs = s->passq;\n+\n+    for (i = 0; i != RPI_PASSES; ++i)\n+        pass_queue_kill(pqs + i);\n+}\n+\n+\n+static void worker_pic_free_one(HEVCRpiJob * const jb)\n+{\n+    // Free coeff stuff - allocation not the same for all buffers\n+    HEVCRpiCoeffsEnv * const cf = &jb->coeffs;\n+\n+    if (cf->s[0].buf != NULL)\n+        av_freep(&cf->mptr);\n+    if (cf->s[2].buf != NULL)\n+        gpu_free(&cf->gptr);\n+    memset(cf, 0, sizeof(*cf));\n+}\n+\n+static int worker_pic_alloc_one(HEVCRpiJob * const jb, const unsigned int coeff_count)\n+{\n+    HEVCRpiCoeffsEnv * const cf = &jb->coeffs;\n+\n+    if (gpu_malloc_cached((coeff_count + 32*32) * sizeof(cf->s[2].buf[0]), &cf->gptr) != 0)\n+        goto fail;\n+    cf->s[2].buf = (int16_t *)cf->gptr.arm;\n+    cf->s[3].buf = cf->s[2].buf + coeff_count;\n+\n+    // Must be 64 byte aligned for our zero zapping code so over-allocate &\n+    // round\n+    if ((cf->mptr = av_malloc(coeff_count * sizeof(cf->s[0].buf[0]) + 63)) == NULL)\n+        goto fail;\n+    cf->s[0].buf = (void *)(((intptr_t)cf->mptr + 63) & ~63);\n+    return 0;\n+\n+fail:\n+    av_log(NULL, AV_LOG_ERROR, \"%s: Allocation failed\\n\", __func__);\n+    worker_pic_free_one(jb);\n+    return -1;\n+}\n+\n+static void worker_pic_reset(HEVCRpiCoeffsEnv * const cf)\n+{\n+    unsigned int i;\n+    for (i = 0; i != 4; ++i) {\n+        cf->s[i].n = 0;\n+#if RPI_COMPRESS_COEFFS        \n+        cf->s[i].packed = 1;\n+        cf->s[i].packed_n = 0;\n+#endif\n+    }\n+}\n+\n+int16_t * rpi_alloc_coeff_buf(HEVCRpiJob * const jb, const int buf_no, const int n)\n+{\n+    HEVCRpiCoeffEnv *const cfe = jb->coeffs.s + buf_no;\n+    int16_t * const coeffs = (buf_no != 3) ? cfe->buf + cfe->n : cfe->buf - (cfe->n + n);\n+    cfe->n += n;\n+    return coeffs;\n+}\n+\n+void ff_hevc_rpi_progress_wait_field(const HEVCRpiContext * const s, HEVCRpiJob * const jb,\n+                                     const HEVCRpiFrame * const ref, const int val, const int field)\n+{\n+    if (ref->tf.progress != NULL && ((int *)ref->tf.progress->data)[field] < val) {\n+        HEVCRpiContext *const fs = ref->tf.owner[field]->priv_data;\n+        HEVCRpiFrameProgressState * const pstate = fs->progress_states + field;\n+        sem_t * sem = NULL;\n+\n+        av_assert0(pthread_mutex_lock(&pstate->lock) == 0);\n+        if (((volatile int *)ref->tf.progress->data)[field] < val) {\n+            HEVCRpiFrameProgressWait * const pwait = &jb->progress_wait;\n+\n+            av_assert1(pwait->req == -1 && pwait->next == NULL);\n+            jb->waited = 1;  // Remember that we had to wait for later scheduling\n+\n+            pwait->req = val;\n+            pwait->next = NULL;\n+            if (pstate->first == NULL)\n+                pstate->first = pwait;\n+            else\n+                pstate->last->next = pwait;\n+            pstate->last = pwait;\n+            sem = &pwait->sem;\n+        }\n+        pthread_mutex_unlock(&pstate->lock);\n+\n+        if (sem != NULL) {\n+            rpi_sem_wait(sem);\n+        }\n+    }\n+}\n+\n+void ff_hevc_rpi_progress_signal_field(HEVCRpiContext * const s, const int val, const int field)\n+{\n+    HEVCRpiFrameProgressState *const pstate = s->progress_states + field;\n+\n+    ((int *)s->ref->tf.progress->data)[field] = val;\n+\n+    av_assert0(pthread_mutex_lock(&pstate->lock) == 0);\n+    {\n+        HEVCRpiFrameProgressWait ** ppwait = &pstate->first;\n+        HEVCRpiFrameProgressWait * pwait;\n+\n+        while ((pwait = *ppwait) != NULL) {\n+            if (pwait->req > val)\n+            {\n+                ppwait = &pwait->next;\n+                pstate->last = pwait;\n+            }\n+            else\n+            {\n+                *ppwait = pwait->next;\n+                pwait->req = -1;\n+                pwait->next = NULL;\n+                sem_post(&pwait->sem);\n+            }\n+        }\n+    }\n+    pthread_mutex_unlock(&pstate->lock);\n+}\n+\n+static void ff_hevc_rpi_progress_init_state(HEVCRpiFrameProgressState * const pstate)\n+{\n+    pstate->first = NULL;\n+    pstate->last = NULL;\n+    pthread_mutex_init(&pstate->lock, NULL);\n+}\n+\n+static void ff_hevc_rpi_progress_init_wait(HEVCRpiFrameProgressWait * const pwait)\n+{\n+    pwait->req = -1;\n+    pwait->next = NULL;\n+    sem_init(&pwait->sem, 0, 0);\n+}\n+\n+static void ff_hevc_rpi_progress_kill_state(HEVCRpiFrameProgressState * const pstate)\n+{\n+    av_assert1(pstate->first == NULL);\n+    pthread_mutex_destroy(&pstate->lock);\n+}\n+\n+static void ff_hevc_rpi_progress_kill_wait(HEVCRpiFrameProgressWait * const pwait)\n+{\n+    sem_destroy(&pwait->sem);\n+}\n+\n+\n+/**\n+ * NOTE: Each function hls_foo correspond to the function foo in the\n+ * specification (HLS stands for High Level Syntax).\n+ */\n+\n+/**\n+ * Section 5.7\n+ */\n+\n+// Realloc the entry point arrays\n+static int alloc_entry_points(RpiSliceHeader * const sh, const int n)\n+{\n+    if (sh->entry_point_offset == NULL || n > sh->offsets_allocated || n == 0)\n+    {\n+        // Round up alloc to multiple of 32\n+        int a = (n + 31) & ~31;\n+\n+        // We don't care about the previous contents so probably fastest to simply discard\n+        av_freep(&sh->entry_point_offset);\n+        av_freep(&sh->offset);\n+        av_freep(&sh->size);\n+\n+        if (a != 0)\n+        {\n+            sh->entry_point_offset = av_malloc_array(a, sizeof(unsigned));\n+            sh->offset = av_malloc_array(a, sizeof(int));\n+            sh->size = av_malloc_array(a, sizeof(int));\n+\n+            if (!sh->entry_point_offset || !sh->offset || !sh->size) {\n+                sh->num_entry_point_offsets = 0;\n+                sh->offsets_allocated = 0;\n+                return AVERROR(ENOMEM);\n+            }\n+        }\n+\n+        sh->offsets_allocated = a;\n+    }\n+\n+    return 0;\n+}\n+\n+/* free everything allocated  by pic_arrays_init() */\n+static void pic_arrays_free(HEVCRpiContext *s)\n+{\n+    av_freep(&s->sao);\n+    av_freep(&s->deblock);\n+\n+    av_freep(&s->cabac_stash_up);\n+    s->cabac_stash_left = NULL;  // freed with _up\n+\n+    av_freep(&s->mvf_up);\n+    av_freep(&s->mvf_left);\n+\n+    av_freep(&s->is_pcm);\n+    av_freep(&s->is_intra_store);\n+    s->is_intra = NULL;\n+    av_freep(&s->rpl_tab);\n+    s->rpl_tab_size = 0;\n+\n+    av_freep(&s->qp_y_tab);\n+    av_freep(&s->tab_slice_address);\n+    av_freep(&s->filter_slice_edges);\n+\n+    av_freep(&s->bs_horizontal);\n+    s->bs_vertical = NULL;  // freed with H\n+    av_freep(&s->bsf_stash_left);\n+    av_freep(&s->bsf_stash_up);\n+\n+    av_freep(&s->rpl_up);\n+    av_freep(&s->rpl_left);\n+\n+    alloc_entry_points(&s->sh, 0);\n+\n+    av_buffer_pool_uninit(&s->col_mvf_pool);\n+}\n+\n+/* allocate arrays that depend on frame dimensions */\n+static int pic_arrays_init(HEVCRpiContext * const s, const HEVCRpiSPS * const sps)\n+{\n+    const unsigned int log2_min_cb_size = sps->log2_min_cb_size;\n+    const unsigned int width            = sps->width;\n+    const unsigned int height           = sps->height;\n+    const unsigned int pic_size_in_cb   = ((width  >> log2_min_cb_size) + 1) *\n+                           ((height >> log2_min_cb_size) + 1);\n+    const unsigned int ctb_count        = sps->ctb_size;\n+\n+    {\n+        unsigned int w = ((width + HEVC_RPI_BS_STRIDE1_PEL_MASK) & ~HEVC_RPI_BS_STRIDE1_PEL_MASK);\n+        unsigned int h = ((height + 15) & ~15);\n+\n+        s->bs_stride2 = h >> HEVC_RPI_BS_COL_BYTES_SHR; // Column size\n+        s->bs_size = s->bs_stride2 * (w >> HEVC_RPI_BS_STRIDE1_PEL_SHIFT); // col size * cols\n+    }\n+\n+    s->sao           = av_mallocz(ctb_count * sizeof(*s->sao) + 8); // Our sao code overreads this array slightly\n+    s->deblock       = av_mallocz_array(ctb_count, sizeof(*s->deblock));\n+    if (!s->sao || !s->deblock)\n+        goto fail;\n+\n+    s->cabac_stash_up  = av_malloc((((width + 63) & ~63) >> 3) + (((height + 63) & ~63) >> 3));\n+    s->cabac_stash_left = s->cabac_stash_up + (((width + 63) & ~63) >> 3);\n+    if (s->cabac_stash_up == NULL)\n+        goto fail;\n+\n+    // Round width up to max ctb size\n+    s->mvf_up = av_malloc((((width + 63) & ~63) >> LOG2_MIN_PU_SIZE) * sizeof(*s->mvf_up));\n+    // * Only needed if we have H tiles\n+    s->mvf_left = av_malloc((((height + 63) & ~63) >> LOG2_MIN_PU_SIZE) * sizeof(*s->mvf_up));\n+\n+    // We can overread by 1 line & one byte in deblock so alloc & zero\n+    // We don't need to zero the extra @ start of frame as it will never be\n+    // written\n+    s->is_pcm   = av_mallocz(sps->pcm_width * (sps->pcm_height + 1) + 1);\n+    s->is_intra_store = av_mallocz(sps->pcm_width * (sps->pcm_height + 1) + 1);\n+    if (s->is_pcm == NULL || s->is_intra_store == NULL)\n+        goto fail;\n+\n+    s->filter_slice_edges = av_mallocz(ctb_count);\n+    s->tab_slice_address  = av_malloc_array(ctb_count,\n+                                      sizeof(*s->tab_slice_address));\n+    s->qp_y_tab           = av_malloc_array(pic_size_in_cb,\n+                                      sizeof(*s->qp_y_tab));\n+    if (!s->qp_y_tab || !s->filter_slice_edges || !s->tab_slice_address)\n+        goto fail;\n+\n+    s->bs_horizontal = av_mallocz(s->bs_size * 2);\n+    s->bs_vertical   = s->bs_horizontal + s->bs_size;\n+    if (s->bs_horizontal == NULL)\n+        goto fail;\n+\n+    s->rpl_up = av_mallocz(sps->ctb_width * sizeof(*s->rpl_up));\n+    s->rpl_left = av_mallocz(sps->ctb_height * sizeof(*s->rpl_left));\n+    if (s->rpl_left == NULL || s->rpl_up == NULL)\n+        goto fail;\n+\n+    if ((s->bsf_stash_left = av_mallocz(((height + 63) & ~63) >> 4)) == NULL ||\n+        (s->bsf_stash_up   = av_mallocz(((width + 63) & ~63) >> 4)) == NULL)\n+        goto fail;\n+\n+    s->col_mvf_stride = (width + 15) >> 4;\n+    s->col_mvf_pool = av_buffer_pool_init(((height + 15) >> 4) * s->col_mvf_stride * sizeof(ColMvField),\n+                                          av_buffer_allocz);\n+    if (s->col_mvf_pool == NULL)\n+        goto fail;\n+\n+    return 0;\n+\n+fail:\n+    pic_arrays_free(s);\n+    return AVERROR(ENOMEM);\n+}\n+\n+static void default_pred_weight_table(HEVCRpiContext * const s)\n+{\n+  unsigned int i;\n+  const unsigned int wt = 1 << QPU_MC_DENOM;\n+  s->sh.luma_log2_weight_denom = 0;\n+  s->sh.chroma_log2_weight_denom = 0;\n+  for (i = 0; i < s->sh.nb_refs[L0]; i++) {\n+      s->sh.luma_weight_l0[i] = wt;\n+      s->sh.luma_offset_l0[i] = 0;\n+      s->sh.chroma_weight_l0[i][0] = wt;\n+      s->sh.chroma_weight_l0[i][1] = wt;\n+      s->sh.chroma_offset_l0[i][0] = 0;\n+      s->sh.chroma_offset_l0[i][1] = 0;\n+  }\n+  for (i = 0; i < s->sh.nb_refs[L1]; i++) {\n+      s->sh.luma_weight_l1[i] = wt;\n+      s->sh.luma_offset_l1[i] = 0;\n+      s->sh.chroma_weight_l1[i][0] = wt;\n+      s->sh.chroma_weight_l1[i][1] = wt;\n+      s->sh.chroma_offset_l1[i][0] = 0;\n+      s->sh.chroma_offset_l1[i][1] = 0;\n+  }\n+}\n+\n+static int get_weights(HEVCRpiContext * const s, GetBitContext * const gb,\n+                       const unsigned int refs,\n+                       int16_t * luma_weight,   int16_t * luma_offset,\n+                       int16_t * chroma_weight, int16_t * chroma_offset)\n+{\n+    unsigned int luma_flags;\n+    unsigned int chroma_flags;\n+    unsigned int i;\n+    const unsigned int wp_offset_bd_shift = s->ps.sps->high_precision_offsets_enabled_flag ? 0 : (s->ps.sps->bit_depth - 8);\n+    const int wp_offset_half_range = s->ps.sps->wp_offset_half_range;\n+    const unsigned int luma_weight_base    = 1 << QPU_MC_DENOM;\n+    const unsigned int chroma_weight_base  = 1 << QPU_MC_DENOM;\n+    const unsigned int luma_weight_shift   = (QPU_MC_DENOM - s->sh.luma_log2_weight_denom);\n+    const unsigned int chroma_weight_shift = (QPU_MC_DENOM - s->sh.chroma_log2_weight_denom);\n+\n+    if (refs == 0)\n+        return 0;\n+\n+    luma_flags = get_bits(gb, refs);\n+    chroma_flags = ctx_cfmt(s) == 0 ? 0 : get_bits(gb, refs);\n+    i = 1 << (refs - 1);\n+\n+    do\n+    {\n+        if ((luma_flags & i) != 0)\n+        {\n+            const int delta_weight = get_se_golomb(gb);\n+            const int offset = get_se_golomb(gb);\n+            if (delta_weight < -128 || delta_weight > 127 ||\n+                offset < -wp_offset_half_range || offset >= wp_offset_half_range)\n+            {\n+                return AVERROR_INVALIDDATA;\n+            }\n+            *luma_weight++ = luma_weight_base + (delta_weight << luma_weight_shift);\n+            *luma_offset++ = offset << wp_offset_bd_shift;\n+        }\n+        else\n+        {\n+            *luma_weight++ = luma_weight_base;\n+            *luma_offset++ = 0;\n+        }\n+\n+        if ((chroma_flags & i) != 0)\n+        {\n+            unsigned int j;\n+            for (j = 0; j != 2; ++j)\n+            {\n+                const int delta_weight = get_se_golomb(gb);\n+                const int delta_offset = get_se_golomb(gb);\n+\n+                if (delta_weight < -128 || delta_weight > 127 ||\n+                    delta_offset < -4 * wp_offset_half_range || delta_offset >= 4 * wp_offset_half_range)\n+                {\n+                    return AVERROR_INVALIDDATA;\n+                }\n+\n+                *chroma_weight++ = chroma_weight_base + (delta_weight << chroma_weight_shift);\n+                *chroma_offset++ = av_clip(\n+                    wp_offset_half_range + delta_offset -\n+                        ((wp_offset_half_range * ((1 << s->sh.chroma_log2_weight_denom) + delta_weight)) >> s->sh.chroma_log2_weight_denom),\n+                    -wp_offset_half_range, wp_offset_half_range - 1) << wp_offset_bd_shift;\n+            }\n+        }\n+        else\n+        {\n+            *chroma_weight++ = chroma_weight_base;\n+            *chroma_weight++ = chroma_weight_base;\n+            *chroma_offset++ = 0;\n+            *chroma_offset++ = 0;\n+        }\n+    } while ((i >>= 1) != 0);\n+\n+    return 0;\n+}\n+\n+static int pred_weight_table(HEVCRpiContext *s, GetBitContext *gb)\n+{\n+    int err;\n+    const unsigned int luma_log2_weight_denom = get_ue_golomb_long(gb);\n+    const unsigned int chroma_log2_weight_denom = (ctx_cfmt(s) == 0) ? 0 : luma_log2_weight_denom + get_se_golomb(gb);\n+\n+    if (luma_log2_weight_denom > 7 ||\n+        chroma_log2_weight_denom > 7)\n+    {\n+        av_log(s->avctx, AV_LOG_ERROR, \"Invalid prediction weight denom: luma=%d, chroma=%d\\n\",\n+               luma_log2_weight_denom, chroma_log2_weight_denom);\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    s->sh.luma_log2_weight_denom = luma_log2_weight_denom;\n+    s->sh.chroma_log2_weight_denom = chroma_log2_weight_denom;\n+\n+    if ((err = get_weights(s, gb, s->sh.nb_refs[L0],\n+                s->sh.luma_weight_l0,      s->sh.luma_offset_l0,\n+                s->sh.chroma_weight_l0[0], s->sh.chroma_offset_l0[0])) != 0 ||\n+        (err = get_weights(s, gb, s->sh.nb_refs[L1],\n+                s->sh.luma_weight_l1,      s->sh.luma_offset_l1,\n+                s->sh.chroma_weight_l1[0], s->sh.chroma_offset_l1[0])) != 0)\n+    {\n+        av_log(s->avctx, AV_LOG_ERROR, \"Invalid prediction weight or offset\\n\");\n+        return err;\n+    }\n+\n+    return 0;\n+}\n+\n+static int decode_lt_rps(HEVCRpiContext *s, LongTermRPS *rps, GetBitContext *gb)\n+{\n+    const HEVCRpiSPS *sps = s->ps.sps;\n+    int max_poc_lsb    = 1 << sps->log2_max_poc_lsb;\n+    int prev_delta_msb = 0;\n+    unsigned int nb_sps = 0, nb_sh;\n+    int i;\n+\n+    rps->nb_refs = 0;\n+    if (!sps->long_term_ref_pics_present_flag)\n+        return 0;\n+\n+    if (sps->num_long_term_ref_pics_sps > 0)\n+        nb_sps = get_ue_golomb_long(gb);\n+    nb_sh = get_ue_golomb_long(gb);\n+\n+    if (nb_sps > sps->num_long_term_ref_pics_sps)\n+        return AVERROR_INVALIDDATA;\n+    if (nb_sh + (uint64_t)nb_sps > FF_ARRAY_ELEMS(rps->poc))\n+        return AVERROR_INVALIDDATA;\n+\n+    rps->nb_refs = nb_sh + nb_sps;\n+\n+    for (i = 0; i < rps->nb_refs; i++) {\n+        uint8_t delta_poc_msb_present;\n+\n+        if (i < nb_sps) {\n+            uint8_t lt_idx_sps = 0;\n+\n+            if (sps->num_long_term_ref_pics_sps > 1)\n+                lt_idx_sps = get_bits(gb, av_ceil_log2(sps->num_long_term_ref_pics_sps));\n+\n+            rps->poc[i]  = sps->lt_ref_pic_poc_lsb_sps[lt_idx_sps];\n+            rps->used[i] = sps->used_by_curr_pic_lt_sps_flag[lt_idx_sps];\n+        } else {\n+            rps->poc[i]  = get_bits(gb, sps->log2_max_poc_lsb);\n+            rps->used[i] = get_bits1(gb);\n+        }\n+\n+        delta_poc_msb_present = get_bits1(gb);\n+        if (delta_poc_msb_present) {\n+            int64_t delta = get_ue_golomb_long(gb);\n+            int64_t poc;\n+\n+            if (i && i != nb_sps)\n+                delta += prev_delta_msb;\n+\n+            poc = rps->poc[i] + s->poc - delta * max_poc_lsb - s->sh.pic_order_cnt_lsb;\n+            if (poc != (int32_t)poc)\n+                return AVERROR_INVALIDDATA;\n+            rps->poc[i] = poc;\n+            prev_delta_msb = delta;\n+        }\n+    }\n+\n+    return 0;\n+}\n+\n+static void export_stream_params(AVCodecContext *avctx, const HEVCRpiParamSets *ps,\n+                                 const HEVCRpiSPS *sps)\n+{\n+    const HEVCRpiVPS *vps = (const HEVCRpiVPS*)ps->vps_list[sps->vps_id]->data;\n+    const HEVCRpiWindow *ow = &sps->output_window;\n+    unsigned int num = 0, den = 0;\n+\n+    avctx->pix_fmt             = sps->pix_fmt;\n+    avctx->coded_width         = sps->width;\n+    avctx->coded_height        = sps->height;\n+    avctx->width               = sps->width  - ow->left_offset - ow->right_offset;\n+    avctx->height              = sps->height - ow->top_offset  - ow->bottom_offset;\n+    avctx->has_b_frames        = sps->temporal_layer[sps->max_sub_layers - 1].num_reorder_pics;\n+    avctx->profile             = sps->ptl.general_ptl.profile_idc;\n+    avctx->level               = sps->ptl.general_ptl.level_idc;\n+\n+    ff_set_sar(avctx, sps->vui.sar);\n+\n+    if (sps->vui.video_signal_type_present_flag)\n+        avctx->color_range = sps->vui.video_full_range_flag ? AVCOL_RANGE_JPEG\n+                                                            : AVCOL_RANGE_MPEG;\n+    else\n+        avctx->color_range = AVCOL_RANGE_MPEG;\n+\n+    if (sps->vui.colour_description_present_flag) {\n+        avctx->color_primaries = sps->vui.colour_primaries;\n+        avctx->color_trc       = sps->vui.transfer_characteristic;\n+        avctx->colorspace      = sps->vui.matrix_coeffs;\n+    } else {\n+        avctx->color_primaries = AVCOL_PRI_UNSPECIFIED;\n+        avctx->color_trc       = AVCOL_TRC_UNSPECIFIED;\n+        avctx->colorspace      = AVCOL_SPC_UNSPECIFIED;\n+    }\n+\n+    if (vps->vps_timing_info_present_flag) {\n+        num = vps->vps_num_units_in_tick;\n+        den = vps->vps_time_scale;\n+    } else if (sps->vui.vui_timing_info_present_flag) {\n+        num = sps->vui.vui_num_units_in_tick;\n+        den = sps->vui.vui_time_scale;\n+    }\n+\n+    if (num != 0 && den != 0)\n+        av_reduce(&avctx->framerate.den, &avctx->framerate.num,\n+                  num, den, 1 << 30);\n+}\n+\n+static enum AVPixelFormat get_format(HEVCRpiContext *s, const HEVCRpiSPS *sps)\n+{\n+    enum AVPixelFormat pix_fmts[4], *fmt = pix_fmts;\n+\n+    // Admit to no h/w formats\n+\n+    *fmt++ = sps->pix_fmt;\n+    *fmt = AV_PIX_FMT_NONE;\n+\n+    return pix_fmts[0] == AV_PIX_FMT_NONE ? AV_PIX_FMT_NONE: ff_thread_get_format(s->avctx, pix_fmts);\n+}\n+\n+static int is_sps_supported(const HEVCRpiSPS * const sps)\n+{\n+    return av_rpi_is_sand_format(sps->pix_fmt) &&\n+           sps->width <= HEVC_RPI_MAX_WIDTH &&\n+           sps->height <= HEVC_RPI_MAX_HEIGHT;\n+}\n+\n+static int set_sps(HEVCRpiContext * const s, const HEVCRpiSPS * const sps,\n+                   const enum AVPixelFormat pix_fmt)\n+{\n+    int ret;\n+\n+    pic_arrays_free(s);\n+    s->ps.sps = NULL;\n+    s->ps.vps = NULL;\n+\n+    if (sps == NULL)\n+        return 0;\n+\n+    if (!is_sps_supported(sps))\n+        return AVERROR_DECODER_NOT_FOUND;\n+\n+    ret = pic_arrays_init(s, sps);\n+    if (ret < 0)\n+        goto fail;\n+\n+    export_stream_params(s->avctx, &s->ps, sps);\n+\n+    s->avctx->pix_fmt = pix_fmt;\n+\n+    ff_hevc_rpi_pred_init(&s->hpc,     sps->bit_depth);\n+    ff_hevc_rpi_dsp_init (&s->hevcdsp, sps->bit_depth);\n+\n+    // * We don't support cross_component_prediction_enabled_flag but as that\n+    //   must be 0 unless we have 4:4:4 there is no point testing for it as we\n+    //   only deal with sand which is never 4:4:4\n+    //   [support wouldn't be hard]\n+\n+    rpi_hevc_qpu_set_fns(s, sps->bit_depth);\n+\n+    av_freep(&s->sao_pixel_buffer_h[0]);\n+    av_freep(&s->sao_pixel_buffer_v[0]);\n+\n+    if (sps->sao_enabled)\n+    {\n+        const unsigned int c_count = (ctx_cfmt(s) != 0) ? 3 : 1;\n+        unsigned int c_idx;\n+        size_t vsize[3] = {0};\n+        size_t hsize[3] = {0};\n+\n+        for(c_idx = 0; c_idx < c_count; c_idx++) {\n+            int w = sps->width >> ctx_hshift(s, c_idx);\n+            int h = sps->height >> ctx_vshift(s, c_idx);\n+            // ctb height & width are a min of 8 so this must a multiple of 16\n+            // so no point rounding up!\n+            hsize[c_idx] = (w * 2 * sps->ctb_height) << sps->pixel_shift;\n+            vsize[c_idx] = (h * 2 * sps->ctb_width) << sps->pixel_shift;\n+        }\n+\n+        // Allocate as a single lump so we can extend h[1] & v[1] into h[2] & v[2]\n+        // when we have plaited chroma\n+        s->sao_pixel_buffer_h[0] = av_malloc(hsize[0] + hsize[1] + hsize[2]);\n+        s->sao_pixel_buffer_v[0] = av_malloc(vsize[0] + vsize[1] + vsize[2]);\n+        s->sao_pixel_buffer_h[1] = s->sao_pixel_buffer_h[0] + hsize[0];\n+        s->sao_pixel_buffer_h[2] = s->sao_pixel_buffer_h[1] + hsize[1];\n+        s->sao_pixel_buffer_v[1] = s->sao_pixel_buffer_v[0] + vsize[0];\n+        s->sao_pixel_buffer_v[2] = s->sao_pixel_buffer_v[1] + vsize[1];\n+    }\n+\n+    s->ps.sps = sps;\n+    s->ps.vps = (HEVCRpiVPS*) s->ps.vps_list[s->ps.sps->vps_id]->data;\n+\n+    return 0;\n+\n+fail:\n+    pic_arrays_free(s);\n+    s->ps.sps = NULL;\n+    return ret;\n+}\n+\n+static inline int qp_offset_valid(const int qp_offset)\n+{\n+    return qp_offset >= -12 && qp_offset <= 12;\n+}\n+\n+static int hls_slice_header(HEVCRpiContext * const s)\n+{\n+    GetBitContext * const gb = &s->HEVClc->gb;\n+    RpiSliceHeader * const sh   = &s->sh;\n+    int i, ret;\n+\n+    // Coded parameters\n+    sh->first_slice_in_pic_flag = get_bits1(gb);\n+    if ((IS_IDR(s) || IS_BLA(s)) && sh->first_slice_in_pic_flag) {\n+        s->seq_decode = (s->seq_decode + 1) & 0xff;\n+        s->max_ra     = INT_MAX;\n+        if (IS_IDR(s))\n+            ff_hevc_rpi_clear_refs(s);\n+    }\n+    sh->no_output_of_prior_pics_flag = 0;\n+    if (IS_IRAP(s))\n+        sh->no_output_of_prior_pics_flag = get_bits1(gb);\n+\n+    sh->pps_id = get_ue_golomb_long(gb);\n+    if (sh->pps_id >= HEVC_MAX_PPS_COUNT || !s->ps.pps_list[sh->pps_id]) {\n+        av_log(s->avctx, AV_LOG_ERROR, \"PPS id out of range: %d\\n\", sh->pps_id);\n+        return AVERROR_INVALIDDATA;\n+    }\n+    if (!sh->first_slice_in_pic_flag &&\n+        s->ps.pps != (HEVCRpiPPS*)s->ps.pps_list[sh->pps_id]->data) {\n+        av_log(s->avctx, AV_LOG_ERROR, \"PPS changed between slices.\\n\");\n+        return AVERROR_INVALIDDATA;\n+    }\n+    s->ps.pps = (HEVCRpiPPS*)s->ps.pps_list[sh->pps_id]->data;\n+    if (s->nal_unit_type == HEVC_NAL_CRA_NUT && s->last_eos == 1)\n+        sh->no_output_of_prior_pics_flag = 1;\n+\n+    if (s->ps.sps != (HEVCRpiSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data) {\n+        const HEVCRpiSPS *sps = (HEVCRpiSPS*)s->ps.sps_list[s->ps.pps->sps_id]->data;\n+        const HEVCRpiSPS *last_sps = s->ps.sps;\n+        enum AVPixelFormat pix_fmt;\n+\n+        if (last_sps && IS_IRAP(s) && s->nal_unit_type != HEVC_NAL_CRA_NUT) {\n+            if (sps->width != last_sps->width || sps->height != last_sps->height ||\n+                sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering !=\n+                last_sps->temporal_layer[last_sps->max_sub_layers - 1].max_dec_pic_buffering)\n+                sh->no_output_of_prior_pics_flag = 0;\n+        }\n+        ff_hevc_rpi_clear_refs(s);\n+\n+        ret = set_sps(s, sps, sps->pix_fmt);\n+        if (ret < 0)\n+            return ret;\n+\n+        pix_fmt = get_format(s, sps);\n+        if (pix_fmt < 0)\n+            return pix_fmt;\n+\n+//        ret = set_sps(s, sps, pix_fmt);\n+//        if (ret < 0)\n+//            return ret;\n+\n+        s->avctx->pix_fmt = pix_fmt;\n+\n+        s->seq_decode = (s->seq_decode + 1) & 0xff;\n+        s->max_ra     = INT_MAX;\n+    }\n+\n+    sh->dependent_slice_segment_flag = 0;\n+    if (!sh->first_slice_in_pic_flag) {\n+        int slice_address_length;\n+\n+        if (s->ps.pps->dependent_slice_segments_enabled_flag)\n+            sh->dependent_slice_segment_flag = get_bits1(gb);\n+\n+        slice_address_length = av_ceil_log2(s->ps.sps->ctb_size);\n+        sh->slice_segment_addr = get_bitsz(gb, slice_address_length);\n+        if (sh->slice_segment_addr >= s->ps.sps->ctb_size) {\n+            av_log(s->avctx, AV_LOG_ERROR,\n+                   \"Invalid slice segment address: %u.\\n\",\n+                   sh->slice_segment_addr);\n+            return AVERROR_INVALIDDATA;\n+        }\n+\n+        if (!sh->dependent_slice_segment_flag) {\n+            sh->slice_addr = sh->slice_segment_addr;\n+            s->slice_idx++;\n+        }\n+    } else {\n+        sh->slice_segment_addr = sh->slice_addr = 0;\n+        s->slice_idx           = 0;\n+        s->slice_initialized   = 0;\n+    }\n+\n+    if (!sh->dependent_slice_segment_flag) {\n+        s->slice_initialized = 0;\n+\n+        for (i = 0; i < s->ps.pps->num_extra_slice_header_bits; i++)\n+            skip_bits(gb, 1);  // slice_reserved_undetermined_flag[]\n+\n+        sh->slice_type = get_ue_golomb_long(gb);\n+        if (!(sh->slice_type == HEVC_SLICE_I ||\n+              sh->slice_type == HEVC_SLICE_P ||\n+              sh->slice_type == HEVC_SLICE_B)) {\n+            av_log(s->avctx, AV_LOG_ERROR, \"Unknown slice type: %d.\\n\",\n+                   sh->slice_type);\n+            return AVERROR_INVALIDDATA;\n+        }\n+        if (IS_IRAP(s) && sh->slice_type != HEVC_SLICE_I) {\n+            av_log(s->avctx, AV_LOG_ERROR, \"Inter slices in an IRAP frame.\\n\");\n+            return AVERROR_INVALIDDATA;\n+        }\n+\n+        // when flag is not present, picture is inferred to be output\n+        sh->pic_output_flag = 1;\n+        if (s->ps.pps->output_flag_present_flag)\n+            sh->pic_output_flag = get_bits1(gb);\n+\n+        if (s->ps.sps->separate_colour_plane_flag)\n+            sh->colour_plane_id = get_bits(gb, 2);\n+\n+        if (!IS_IDR(s)) {\n+            int poc, pos;\n+\n+            sh->pic_order_cnt_lsb = get_bits(gb, s->ps.sps->log2_max_poc_lsb);\n+            poc = ff_hevc_rpi_compute_poc(s->ps.sps, s->pocTid0, sh->pic_order_cnt_lsb, s->nal_unit_type);\n+            if (!sh->first_slice_in_pic_flag && poc != s->poc) {\n+                av_log(s->avctx, AV_LOG_WARNING,\n+                       \"Ignoring POC change between slices: %d -> %d\\n\", s->poc, poc);\n+                if (s->avctx->err_recognition & AV_EF_EXPLODE)\n+                    return AVERROR_INVALIDDATA;\n+                poc = s->poc;\n+            }\n+            s->poc = poc;\n+\n+            sh->short_term_ref_pic_set_sps_flag = get_bits1(gb);\n+            pos = get_bits_left(gb);\n+            if (!sh->short_term_ref_pic_set_sps_flag) {\n+                ret = ff_hevc_rpi_decode_short_term_rps(gb, s->avctx, &sh->slice_rps, s->ps.sps, 1);\n+                if (ret < 0)\n+                    return ret;\n+\n+                sh->short_term_rps = &sh->slice_rps;\n+            } else {\n+                int numbits, rps_idx;\n+\n+                if (!s->ps.sps->nb_st_rps) {\n+                    av_log(s->avctx, AV_LOG_ERROR, \"No ref lists in the SPS.\\n\");\n+                    return AVERROR_INVALIDDATA;\n+                }\n+\n+                numbits = av_ceil_log2(s->ps.sps->nb_st_rps);\n+                rps_idx = numbits > 0 ? get_bits(gb, numbits) : 0;\n+                sh->short_term_rps = &s->ps.sps->st_rps[rps_idx];\n+            }\n+            sh->short_term_ref_pic_set_size = pos - get_bits_left(gb);\n+\n+            pos = get_bits_left(gb);\n+            ret = decode_lt_rps(s, &sh->long_term_rps, gb);\n+            if (ret < 0) {\n+                av_log(s->avctx, AV_LOG_WARNING, \"Invalid long term RPS.\\n\");\n+                if (s->avctx->err_recognition & AV_EF_EXPLODE)\n+                    return AVERROR_INVALIDDATA;\n+            }\n+            sh->long_term_ref_pic_set_size = pos - get_bits_left(gb);\n+\n+            if (s->ps.sps->sps_temporal_mvp_enabled_flag)\n+                sh->slice_temporal_mvp_enabled_flag = get_bits1(gb);\n+            else\n+                sh->slice_temporal_mvp_enabled_flag = 0;\n+        } else {\n+            s->sh.short_term_rps = NULL;\n+            s->poc               = 0;\n+        }\n+\n+        /* 8.3.1 */\n+        if (sh->first_slice_in_pic_flag && s->temporal_id == 0 &&\n+            s->nal_unit_type != HEVC_NAL_TRAIL_N &&\n+            s->nal_unit_type != HEVC_NAL_TSA_N   &&\n+            s->nal_unit_type != HEVC_NAL_STSA_N  &&\n+            s->nal_unit_type != HEVC_NAL_RADL_N  &&\n+            s->nal_unit_type != HEVC_NAL_RADL_R  &&\n+            s->nal_unit_type != HEVC_NAL_RASL_N  &&\n+            s->nal_unit_type != HEVC_NAL_RASL_R)\n+            s->pocTid0 = s->poc;\n+\n+        if (s->ps.sps->sao_enabled) {\n+            sh->slice_sample_adaptive_offset_flag[0] = get_bits1(gb);\n+            if (ctx_cfmt(s) != 0) {\n+                sh->slice_sample_adaptive_offset_flag[1] =\n+                sh->slice_sample_adaptive_offset_flag[2] = get_bits1(gb);\n+            }\n+        } else {\n+            sh->slice_sample_adaptive_offset_flag[0] = 0;\n+            sh->slice_sample_adaptive_offset_flag[1] = 0;\n+            sh->slice_sample_adaptive_offset_flag[2] = 0;\n+        }\n+\n+        sh->nb_refs[L0] = sh->nb_refs[L1] = 0;\n+        if (sh->slice_type == HEVC_SLICE_P || sh->slice_type == HEVC_SLICE_B) {\n+            int nb_refs;\n+\n+            sh->nb_refs[L0] = s->ps.pps->num_ref_idx_l0_default_active;\n+            if (sh->slice_type == HEVC_SLICE_B)\n+                sh->nb_refs[L1] = s->ps.pps->num_ref_idx_l1_default_active;\n+\n+            if (get_bits1(gb)) { // num_ref_idx_active_override_flag\n+                sh->nb_refs[L0] = get_ue_golomb_long(gb) + 1;\n+                if (sh->slice_type == HEVC_SLICE_B)\n+                    sh->nb_refs[L1] = get_ue_golomb_long(gb) + 1;\n+            }\n+            if (sh->nb_refs[L0] > HEVC_MAX_REFS || sh->nb_refs[L1] > HEVC_MAX_REFS) {\n+                av_log(s->avctx, AV_LOG_ERROR, \"Too many refs: %d/%d.\\n\",\n+                       sh->nb_refs[L0], sh->nb_refs[L1]);\n+                return AVERROR_INVALIDDATA;\n+            }\n+\n+            sh->rpl_modification_flag[0] = 0;\n+            sh->rpl_modification_flag[1] = 0;\n+            nb_refs = ff_hevc_rpi_frame_nb_refs(s);\n+            if (!nb_refs) {\n+                av_log(s->avctx, AV_LOG_ERROR, \"Zero refs for a frame with P or B slices.\\n\");\n+                return AVERROR_INVALIDDATA;\n+            }\n+\n+            if (s->ps.pps->lists_modification_present_flag && nb_refs > 1) {\n+                sh->rpl_modification_flag[0] = get_bits1(gb);\n+                if (sh->rpl_modification_flag[0]) {\n+                    for (i = 0; i < sh->nb_refs[L0]; i++)\n+                        sh->list_entry_lx[0][i] = get_bits(gb, av_ceil_log2(nb_refs));\n+                }\n+\n+                if (sh->slice_type == HEVC_SLICE_B) {\n+                    sh->rpl_modification_flag[1] = get_bits1(gb);\n+                    if (sh->rpl_modification_flag[1] == 1)\n+                        for (i = 0; i < sh->nb_refs[L1]; i++)\n+                            sh->list_entry_lx[1][i] = get_bits(gb, av_ceil_log2(nb_refs));\n+                }\n+            }\n+\n+            if (sh->slice_type == HEVC_SLICE_B)\n+                sh->mvd_l1_zero_flag = get_bits1(gb);\n+\n+            if (s->ps.pps->cabac_init_present_flag)\n+                sh->cabac_init_flag = get_bits1(gb);\n+            else\n+                sh->cabac_init_flag = 0;\n+\n+            sh->collocated_ref_idx = 0;\n+            if (sh->slice_temporal_mvp_enabled_flag) {\n+                sh->collocated_list = L0;\n+                if (sh->slice_type == HEVC_SLICE_B)\n+                    sh->collocated_list = !get_bits1(gb);\n+\n+                if (sh->nb_refs[sh->collocated_list] > 1) {\n+                    sh->collocated_ref_idx = get_ue_golomb_long(gb);\n+                    if (sh->collocated_ref_idx >= sh->nb_refs[sh->collocated_list]) {\n+                        av_log(s->avctx, AV_LOG_ERROR,\n+                               \"Invalid collocated_ref_idx: %d.\\n\",\n+                               sh->collocated_ref_idx);\n+                        return AVERROR_INVALIDDATA;\n+                    }\n+                }\n+            }\n+\n+            if ((s->ps.pps->weighted_pred_flag   && sh->slice_type == HEVC_SLICE_P) ||\n+                (s->ps.pps->weighted_bipred_flag && sh->slice_type == HEVC_SLICE_B))\n+            {\n+                if ((ret = pred_weight_table(s, gb)) != 0)\n+                    return ret;\n+            }\n+            else\n+            {\n+                // Give us unit weights\n+                default_pred_weight_table(s);\n+            }\n+\n+            sh->max_num_merge_cand = 5 - get_ue_golomb_long(gb);\n+            if (sh->max_num_merge_cand < 1 || sh->max_num_merge_cand > 5) {\n+                av_log(s->avctx, AV_LOG_ERROR,\n+                       \"Invalid number of merging MVP candidates: %d.\\n\",\n+                       sh->max_num_merge_cand);\n+                return AVERROR_INVALIDDATA;\n+            }\n+        }\n+\n+        sh->slice_qp_delta = get_se_golomb(gb);\n+\n+        if (s->ps.pps->pic_slice_level_chroma_qp_offsets_present_flag) {\n+            sh->slice_cb_qp_offset = get_se_golomb(gb);\n+            sh->slice_cr_qp_offset = get_se_golomb(gb);\n+            if (!qp_offset_valid(sh->slice_cb_qp_offset) ||\n+                !qp_offset_valid(s->ps.pps->cb_qp_offset + sh->slice_cb_qp_offset) ||\n+                !qp_offset_valid(sh->slice_cr_qp_offset) ||\n+                !qp_offset_valid(s->ps.pps->cr_qp_offset + sh->slice_cr_qp_offset))\n+            {\n+                av_log(s->avctx, AV_LOG_ERROR, \"Bad chroma offset (pps:%d/%d; slice=%d/%d\\n\",\n+                       sh->slice_cr_qp_offset, sh->slice_cr_qp_offset,\n+                       s->ps.pps->cb_qp_offset, s->ps.pps->cr_qp_offset);\n+                return AVERROR_INVALIDDATA;\n+            }\n+        } else\n+        {\n+            sh->slice_cb_qp_offset = 0;\n+            sh->slice_cr_qp_offset = 0;\n+        }\n+\n+        if (s->ps.pps->chroma_qp_offset_list_enabled_flag)\n+            sh->cu_chroma_qp_offset_enabled_flag = get_bits1(gb);\n+        else\n+            sh->cu_chroma_qp_offset_enabled_flag = 0;\n+\n+        if (s->ps.pps->deblocking_filter_control_present_flag) {\n+            int deblocking_filter_override_flag = 0;\n+\n+            if (s->ps.pps->deblocking_filter_override_enabled_flag)\n+                deblocking_filter_override_flag = get_bits1(gb);\n+\n+            if (deblocking_filter_override_flag) {\n+                sh->disable_deblocking_filter_flag = get_bits1(gb);\n+                if (!sh->disable_deblocking_filter_flag) {\n+                    int beta_offset_div2 = get_se_golomb(gb);\n+                    int tc_offset_div2   = get_se_golomb(gb) ;\n+                    if (beta_offset_div2 < -6 || beta_offset_div2 > 6 ||\n+                        tc_offset_div2   < -6 || tc_offset_div2   > 6) {\n+                        av_log(s->avctx, AV_LOG_ERROR,\n+                            \"Invalid deblock filter offsets: %d, %d\\n\",\n+                            beta_offset_div2, tc_offset_div2);\n+                        return AVERROR_INVALIDDATA;\n+                    }\n+                    sh->beta_offset = beta_offset_div2 * 2;\n+                    sh->tc_offset   =   tc_offset_div2 * 2;\n+                }\n+            } else {\n+                sh->disable_deblocking_filter_flag = s->ps.pps->disable_dbf;\n+                sh->beta_offset                    = s->ps.pps->beta_offset;\n+                sh->tc_offset                      = s->ps.pps->tc_offset;\n+            }\n+        } else {\n+            sh->disable_deblocking_filter_flag = 0;\n+            sh->beta_offset                    = 0;\n+            sh->tc_offset                      = 0;\n+        }\n+\n+        if (s->ps.pps->seq_loop_filter_across_slices_enabled_flag &&\n+            (sh->slice_sample_adaptive_offset_flag[0] ||\n+             sh->slice_sample_adaptive_offset_flag[1] ||\n+             !sh->disable_deblocking_filter_flag)) {\n+            sh->slice_loop_filter_across_slices_enabled_flag = get_bits1(gb);\n+        } else {\n+            sh->slice_loop_filter_across_slices_enabled_flag = s->ps.pps->seq_loop_filter_across_slices_enabled_flag;\n+        }\n+        sh->no_dblk_boundary_flags =\n+            (sh->slice_loop_filter_across_slices_enabled_flag ? 0 :\n+                BOUNDARY_UPPER_SLICE | BOUNDARY_LEFT_SLICE) |\n+            (s->ps.pps->loop_filter_across_tiles_enabled_flag ? 0 :\n+                BOUNDARY_UPPER_TILE | BOUNDARY_LEFT_TILE);\n+\n+\n+    } else if (!s->slice_initialized) {\n+        av_log(s->avctx, AV_LOG_ERROR, \"Independent slice segment missing.\\n\");\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    sh->num_entry_point_offsets = 0;\n+    sh->offload_wpp = 0;\n+    sh->offload_tiles = 0;\n+\n+    if (s->ps.pps->tiles_enabled_flag || s->ps.pps->entropy_coding_sync_enabled_flag) {\n+        unsigned num_entry_point_offsets = get_ue_golomb_long(gb);\n+        // It would be possible to bound this tighter but this here is simpler\n+        if (num_entry_point_offsets > get_bits_left(gb)) {\n+            av_log(s->avctx, AV_LOG_ERROR, \"num_entry_point_offsets %d is invalid\\n\", num_entry_point_offsets);\n+            return AVERROR_INVALIDDATA;\n+        }\n+\n+        sh->num_entry_point_offsets = num_entry_point_offsets;\n+        if (sh->num_entry_point_offsets > 0) {\n+            int offset_len = get_ue_golomb_long(gb) + 1;\n+\n+            if (offset_len < 1 || offset_len > 32) {\n+                sh->num_entry_point_offsets = 0;\n+                av_log(s->avctx, AV_LOG_ERROR, \"offset_len %d is invalid\\n\", offset_len);\n+                return AVERROR_INVALIDDATA;\n+            }\n+\n+            if ((ret = alloc_entry_points(sh, sh->num_entry_point_offsets)) < 0)\n+            {\n+                av_log(s->avctx, AV_LOG_ERROR, \"Failed to allocate memory\\n\");\n+                return ret;\n+            }\n+\n+            for (i = 0; i < sh->num_entry_point_offsets; i++) {\n+                uint32_t val_minus1 = get_bits_long(gb, offset_len);\n+                if (val_minus1 > (1 << 28))\n+                {\n+                    // We can declare offsets of > 2^28 bad without loss of generality\n+                    // Will check actual bounds wrt NAL later, but this keeps\n+                    // the values within bounds we can deal with easily\n+                    av_log(s->avctx, AV_LOG_ERROR, \"entry_point_offset_minus1 %d invalid\\n\", val_minus1);\n+                    return AVERROR_INVALIDDATA;\n+                }\n+                sh->entry_point_offset[i] = val_minus1 + 1; // +1 to get the size\n+            }\n+\n+            // Do we want to offload this\n+            if (s->threads_type != 0)\n+            {\n+                sh->offload_tiles = (!s->ps.pps->tile_wpp_inter_disable || sh->slice_type == HEVC_SLICE_I) &&\n+                    s->ps.pps->num_tile_columns > 1;\n+                // * We only cope with WPP in a single column\n+                //   Probably want to deal with that case as tiles rather than WPP anyway\n+                // ?? Not actually sure that the main code deals with WPP + multi-col correctly\n+                sh->offload_wpp = s->ps.pps->entropy_coding_sync_enabled_flag &&\n+                    s->ps.pps->num_tile_columns == 1;\n+            }\n+        }\n+    }\n+\n+    if (s->ps.pps->slice_header_extension_present_flag) {\n+        unsigned int length = get_ue_golomb_long(gb);\n+        if (length*8LL > get_bits_left(gb)) {\n+            av_log(s->avctx, AV_LOG_ERROR, \"too many slice_header_extension_data_bytes\\n\");\n+            return AVERROR_INVALIDDATA;\n+        }\n+        for (i = 0; i < length; i++)\n+            skip_bits(gb, 8);  // slice_header_extension_data_byte\n+    }\n+\n+    // Inferred parameters\n+    sh->slice_qp = 26U + s->ps.pps->pic_init_qp_minus26 + sh->slice_qp_delta;\n+    if (sh->slice_qp > 51 ||\n+        sh->slice_qp < -s->ps.sps->qp_bd_offset) {\n+        av_log(s->avctx, AV_LOG_ERROR,\n+               \"The slice_qp %d is outside the valid range \"\n+               \"[%d, 51].\\n\",\n+               sh->slice_qp,\n+               -s->ps.sps->qp_bd_offset);\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    if (get_bits_left(gb) < 0) {\n+        av_log(s->avctx, AV_LOG_ERROR,\n+               \"Overread slice header by %d bits\\n\", -get_bits_left(gb));\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    s->slice_initialized = 1;\n+    return 0;\n+}\n+\n+static void hls_sao_param(const HEVCRpiContext *s, HEVCRpiLocalContext * const lc, const int rx, const int ry)\n+{\n+    RpiSAOParams * const sao = s->sao + rx + ry * s->ps.sps->ctb_width;\n+    int c_idx, i;\n+\n+    if (s->sh.slice_sample_adaptive_offset_flag[0] ||\n+        s->sh.slice_sample_adaptive_offset_flag[1]) {\n+        if ((lc->ctb_avail & AVAIL_L) != 0)\n+        {\n+            const int sao_merge_left_flag = ff_hevc_rpi_sao_merge_flag_decode(lc);\n+            if (sao_merge_left_flag) {\n+                *sao = sao[-1];\n+                return;\n+            }\n+        }\n+        if ((lc->ctb_avail & AVAIL_U) != 0)\n+        {\n+            const int sao_merge_up_flag = ff_hevc_rpi_sao_merge_flag_decode(lc);\n+            if (sao_merge_up_flag) {\n+                *sao = sao[-(int)s->ps.sps->ctb_width];\n+                return;\n+            }\n+        }\n+    }\n+\n+    for (c_idx = 0; c_idx < (ctx_cfmt(s) != 0 ? 3 : 1); c_idx++) {\n+        const unsigned int log2_sao_offset_scale = c_idx == 0 ? s->ps.pps->log2_sao_offset_scale_luma :\n+                                                 s->ps.pps->log2_sao_offset_scale_chroma;\n+        int offset_abs[4];\n+        char offset_sign[4] = {0};\n+\n+        if (!s->sh.slice_sample_adaptive_offset_flag[c_idx]) {\n+            sao->type_idx[c_idx] = SAO_NOT_APPLIED;\n+            continue;\n+        }\n+\n+        if (c_idx == 2) {\n+            sao->type_idx[2] = sao->type_idx[1];\n+            sao->eo_class[2] = sao->eo_class[1];\n+        } else {\n+            sao->type_idx[c_idx] = ff_hevc_rpi_sao_type_idx_decode(lc);\n+        }\n+\n+        // ** Could use BY22 here quite plausibly - this is all bypass stuff\n+        //    though only per CTB so not very timing critical\n+\n+        if (sao->type_idx[c_idx] == SAO_NOT_APPLIED)\n+            continue;\n+\n+        for (i = 0; i < 4; i++)\n+            offset_abs[i] = ff_hevc_rpi_sao_offset_abs_decode(s, lc);\n+\n+        if (sao->type_idx[c_idx] == SAO_BAND) {\n+            for (i = 0; i < 4; i++) {\n+                if (offset_abs[i] != 0)\n+                    offset_sign[i] = ff_hevc_rpi_sao_offset_sign_decode(lc);\n+            }\n+            sao->band_position[c_idx] = ff_hevc_rpi_sao_band_position_decode(lc);\n+        } else if (c_idx != 2) {\n+            sao->eo_class[c_idx] = ff_hevc_rpi_sao_eo_class_decode(lc);\n+        }\n+\n+        // Inferred parameters\n+        sao->offset_val[c_idx][0] = 0;\n+        for (i = 0; i < 4; i++) {\n+            sao->offset_val[c_idx][i + 1] = offset_abs[i] << log2_sao_offset_scale;\n+            if (sao->type_idx[c_idx] == SAO_EDGE) {\n+                if (i > 1)\n+                    sao->offset_val[c_idx][i + 1] = -sao->offset_val[c_idx][i + 1];\n+            } else if (offset_sign[i]) {\n+                sao->offset_val[c_idx][i + 1] = -sao->offset_val[c_idx][i + 1];\n+            }\n+        }\n+    }\n+}\n+\n+#if 0\n+static int hls_cross_component_pred(HEVCRpiLocalContext * const lc, const int idx) {\n+    int log2_res_scale_abs_plus1 = ff_hevc_rpi_log2_res_scale_abs(lc, idx);  // 0..4\n+\n+    if (log2_res_scale_abs_plus1 !=  0) {\n+        int res_scale_sign_flag = ff_hevc_rpi_res_scale_sign_flag(lc, idx);\n+        lc->tu.res_scale_val = (1 << (log2_res_scale_abs_plus1 - 1)) *\n+                               (1 - 2 * res_scale_sign_flag);\n+    } else {\n+        lc->tu.res_scale_val = 0;\n+    }\n+\n+\n+    return 0;\n+}\n+#endif\n+\n+static inline HEVCPredCmd * rpi_new_intra_cmd(HEVCRpiJob * const jb)\n+{\n+    return jb->intra.cmds + jb->intra.n++;\n+}\n+\n+#define A0(x, y, U, L, UL, UR, DL) \\\n+    [(x)+(y)*16] = (((U) ? AVAIL_U : 0) | ((L) ? AVAIL_L : 0) | ((UL) ? AVAIL_UL : 0) | ((UR) ? AVAIL_UR : 0) | ((DL) ? AVAIL_DL : 0))\n+\n+#define A1(x, y, U, L, UL, UR, DL) \\\n+    A0((x) + 0, (y) + 0, (U),  (L),  (UL), (U),  (L) ),  A0((x) + 1, (y) + 0, (U),   1,   (U),  (UR),  0  ),\\\n+    A0((x) + 0, (y) + 1,  1,   (L),  (L),   1,   (DL)),  A0((x) + 1, (y) + 1,  1,    1,    1,    0,    0  )\n+\n+#define A2(x, y, U, L, UL, UR, DL) \\\n+    A1((x) + 0, (y) + 0, (U),  (L),  (UL), (U),  (L) ),  A1((x) + 2, (y) + 0, (U),   1,   (U),  (UR),  0  ),\\\n+    A1((x) + 0, (y) + 2,  1,   (L),  (L),   1,   (DL)),  A1((x) + 2, (y) + 2,  1,    1,    1,    0,    0  )\n+\n+#define A3(x, y, U, L, UL, UR, DL) \\\n+    A2((x) + 0, (y) + 0, (U),  (L),  (UL), (U),  (L) ),  A2((x) + 4, (y) + 0, (U),   1,   (U),  (UR),  0  ),\\\n+    A2((x) + 0, (y) + 4,  1,   (L),  (L),   1,   (DL)),  A2((x) + 4, (y) + 4,  1,    1,    1,    0,    0  )\n+\n+#define A4(x, y, U, L, UL, UR, DL) \\\n+    A3((x) + 0, (y) + 0, (U),  (L),  (UL), (U),  (L) ),  A3((x) + 8, (y) + 0, (U),   1,   (U),  (UR),  0  ),\\\n+    A3((x) + 0, (y) + 8,  1,   (L),  (L),   1,   (DL)),  A3((x) + 8, (y) + 8,  1,    1,    1,    0,    0  )\n+\n+static const uint8_t tb_flags[16 * 16] = {A4(0, 0, 0, 0, 0, 0, 0)};\n+\n+unsigned int ff_hevc_rpi_tb_avail_flags(\n+    const HEVCRpiContext * const s, const HEVCRpiLocalContext * const lc,\n+    const unsigned int x, const unsigned int y, const unsigned int w, const unsigned int h)\n+{\n+    const unsigned int ctb_mask = ~0U << s->ps.sps->log2_ctb_size;\n+    const unsigned int tb_x = x & ~ctb_mask;\n+    const unsigned int tb_y = y & ~ctb_mask;\n+    const unsigned int ctb_avail = lc->ctb_avail;\n+\n+    const uint8_t * const tb_f = tb_flags + (tb_x >> 2) + (tb_y >> 2) * 16;\n+\n+    unsigned int f = (ctb_avail | tb_f[0]) & (AVAIL_L | AVAIL_U | AVAIL_UL);\n+\n+    // This deals with both the U & L edges\n+    if ((tb_x | tb_y) != 0 && (~f & (AVAIL_L | AVAIL_U)) == 0)\n+        f |= AVAIL_UL;\n+\n+    if (x + w < lc->end_of_ctb_x)\n+        f |= (tb_y == 0 ? ctb_avail >> (AVAIL_S_U - AVAIL_S_UR) : tb_f[(w - 1) >> 2]) & AVAIL_UR;\n+    else if (tb_y == 0)\n+        f |= (ctb_avail & AVAIL_UR);\n+#if AVAIL_S_U - AVAIL_S_UR < 0\n+#error Shift problem\n+#endif\n+\n+    // Never any D if Y beyond eoctb\n+    if (y + h < lc->end_of_ctb_y)\n+        f |= (tb_x == 0 ? ctb_avail << (AVAIL_S_DL - AVAIL_S_L) : tb_f[((h - 1) >> 2) * 16]) & AVAIL_DL;\n+#if AVAIL_S_DL - AVAIL_S_L < 0\n+#error Shift problem\n+#endif\n+\n+//    printf(\"(%#x, %#x): %dx%d ca=%02x, ful=%02x, ftr=%02x, fdl=%02x, eox=%#x, eoy=%#x\\n\", x, y, w, h,\n+//           lc->ctb_avail, tb_f[0], tb_f[(w - 1) >> 2], tb_f[((h - 1) >> 2) * 16],\n+//           lc->end_of_ctb_x, lc->end_of_ctb_y);\n+\n+    return f;\n+}\n+\n+#undef A0\n+#undef A1\n+#undef A2\n+#undef A3\n+#undef A4\n+\n+static void do_intra_pred(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, int log2_trafo_size, int x0, int y0, int c_idx,\n+                          unsigned int avail)\n+{\n+    // If rpi_enabled then sand - U & V done on U call\n+    if (c_idx <= 1)\n+    {\n+        HEVCPredCmd *const cmd = rpi_new_intra_cmd(lc->jb0);\n+        cmd->type = RPI_PRED_INTRA + c_idx;\n+        cmd->size = log2_trafo_size;\n+        cmd->avail = avail;\n+        cmd->i_pred.x = x0;\n+        cmd->i_pred.y = y0;\n+        cmd->i_pred.mode = c_idx ? lc->tu.intra_pred_mode_c :  lc->tu.intra_pred_mode;\n+\n+//        printf(\"(%#x, %#x) c_idx=%d, s=%d, a=%#x\\n\", x0, y0, c_idx, 1 << log2_trafo_size, avail);\n+    }\n+}\n+\n+#define CBF_CB0_S 0\n+#define CBF_CB1_S 1 // CB1 must be CB0 + 1\n+#define CBF_CR0_S 2\n+#define CBF_CR1_S 3\n+\n+#define CBF_CB0 (1 << CBF_CB0_S)\n+#define CBF_CR0 (1 << CBF_CR0_S)\n+#define CBF_CB1 (1 << CBF_CB1_S)\n+#define CBF_CR1 (1 << CBF_CR1_S)\n+\n+// * Only good for chroma_idx == 1\n+static int hls_transform_unit(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+                              const unsigned int x0, const unsigned int y0,\n+                              const unsigned int log2_cb_size, const unsigned int log2_trafo_size,\n+                              const unsigned int blk_idx, const int cbf_luma,\n+                              const unsigned int cbf_chroma)\n+{\n+    const unsigned int log2_trafo_size_c = FFMAX(2, log2_trafo_size - 1);\n+    const unsigned int x0_c = x0 & ~7;\n+    const unsigned int y0_c = y0 & ~7;\n+\n+    enum ScanType scan_idx   = SCAN_DIAG;\n+    enum ScanType scan_idx_c = SCAN_DIAG;\n+\n+    if (lc->cu.pred_mode == MODE_INTRA)\n+    {\n+        const unsigned int trafo_size = 1 << log2_trafo_size;\n+        const unsigned int avail = ff_hevc_rpi_tb_avail_flags(s, lc, x0, y0, trafo_size, trafo_size);\n+\n+        do_intra_pred(s, lc, log2_trafo_size, x0, y0, 0, avail);\n+\n+        if (log2_trafo_size > 2)\n+            do_intra_pred(s, lc, log2_trafo_size_c, x0_c, y0_c, 1, avail);\n+        else if (blk_idx == 3)\n+            do_intra_pred(s, lc, log2_trafo_size_c, x0_c, y0_c, 1,\n+                          ff_hevc_rpi_tb_avail_flags(s, lc, x0_c, y0_c, 8, 8));\n+\n+        if (log2_trafo_size < 4) {\n+            if (lc->tu.intra_pred_mode >= 6 &&\n+                lc->tu.intra_pred_mode <= 14) {\n+                scan_idx = SCAN_VERT;\n+            } else if (lc->tu.intra_pred_mode >= 22 &&\n+                       lc->tu.intra_pred_mode <= 30) {\n+                scan_idx = SCAN_HORIZ;\n+            }\n+\n+            if (lc->tu.intra_pred_mode_c >=  6 &&\n+                lc->tu.intra_pred_mode_c <= 14) {\n+                scan_idx_c = SCAN_VERT;\n+            } else if (lc->tu.intra_pred_mode_c >= 22 &&\n+                       lc->tu.intra_pred_mode_c <= 30) {\n+                scan_idx_c = SCAN_HORIZ;\n+            }\n+        }\n+    }\n+\n+    if (!cbf_luma && cbf_chroma == 0)\n+        return 0;\n+\n+    if (lc->tu.is_cu_qp_delta_wanted)\n+    {\n+        const int qp_delta = ff_hevc_rpi_cu_qp_delta(lc);\n+        const unsigned int cb_mask = ~0U << log2_cb_size;\n+\n+        if (qp_delta < -(26 + (s->ps.sps->qp_bd_offset >> 1)) ||\n+            qp_delta >  (25 + (s->ps.sps->qp_bd_offset >> 1)))\n+        {\n+            av_log(s->avctx, AV_LOG_ERROR,\n+                   \"The cu_qp_delta %d is outside the valid range \"\n+                   \"[%d, %d].\\n\",\n+                   qp_delta,\n+                   -(26 + (s->ps.sps->qp_bd_offset >> 1)),\n+                    (25 + (s->ps.sps->qp_bd_offset >> 1)));\n+            return AVERROR_INVALIDDATA;\n+        }\n+\n+        lc->tu.is_cu_qp_delta_wanted = 0;\n+        lc->tu.cu_qp_delta = qp_delta;\n+        ff_hevc_rpi_set_qPy(s, lc, x0 & cb_mask, y0 & cb_mask);\n+    }\n+\n+    // * Not main profile & untested due to no conform streams\n+    if (lc->tu.cu_chroma_qp_offset_wanted && cbf_chroma &&\n+        !lc->cu.cu_transquant_bypass_flag) {\n+        int cu_chroma_qp_offset_flag = ff_hevc_rpi_cu_chroma_qp_offset_flag(lc);\n+        if (cu_chroma_qp_offset_flag) {\n+            int cu_chroma_qp_offset_idx  = 0;\n+            if (s->ps.pps->chroma_qp_offset_list_len_minus1 > 0) {\n+                cu_chroma_qp_offset_idx = ff_hevc_rpi_cu_chroma_qp_offset_idx(s, lc);\n+            }\n+            lc->tu.qp_divmod6[1] += s->ps.pps->cb_qp_offset_list[cu_chroma_qp_offset_idx];\n+            lc->tu.qp_divmod6[2] += s->ps.pps->cr_qp_offset_list[cu_chroma_qp_offset_idx];\n+        }\n+        lc->tu.cu_chroma_qp_offset_wanted = 0;\n+    }\n+\n+    if (cbf_luma)\n+        ff_hevc_rpi_hls_residual_coding(s, lc, x0, y0, log2_trafo_size, scan_idx, 0);\n+\n+    if (log2_trafo_size > 2 || blk_idx == 3)\n+    {\n+        if ((cbf_chroma & CBF_CB0) != 0)\n+            ff_hevc_rpi_hls_residual_coding(s, lc, x0_c, y0_c,\n+                                        log2_trafo_size_c, scan_idx_c, 1);\n+        if ((cbf_chroma & CBF_CR0) != 0)\n+            ff_hevc_rpi_hls_residual_coding(s, lc, x0_c, y0_c,\n+                                        log2_trafo_size_c, scan_idx_c, 2);\n+    }\n+\n+    return 0;\n+}\n+\n+static inline void set_deblocking_bypass(const HEVCRpiContext * const s, const int x0, const int y0, const int log2_cb_size)\n+{\n+    set_bits(s->is_pcm + (y0 >> 3) * s->ps.sps->pcm_width, x0 >> 3, s->ps.sps->pcm_width, log2_cb_size - 3);\n+}\n+\n+\n+static int hls_transform_tree(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+                              const unsigned int x0, const unsigned int y0,\n+                              const unsigned int log2_trafo_size,\n+                              const unsigned int trafo_depth, const unsigned int blk_idx,\n+                              const unsigned int cbf_c0)\n+{\n+    // When trafo_size == 2 hls_transform_unit uses c0 so put in c1\n+    unsigned int cbf_c1 = cbf_c0;\n+    int split_transform_flag;\n+    int ret;\n+\n+    if (lc->cu.intra_split_flag) {\n+        if (trafo_depth == 1) {\n+            lc->tu.intra_pred_mode   = lc->pu.intra_pred_mode[blk_idx];\n+            if (ctx_cfmt(s) == 3) {\n+                lc->tu.intra_pred_mode_c = lc->pu.intra_pred_mode_c[blk_idx];\n+                lc->tu.chroma_mode_c     = lc->pu.chroma_mode_c[blk_idx];\n+            } else {\n+                lc->tu.intra_pred_mode_c = lc->pu.intra_pred_mode_c[0];\n+                lc->tu.chroma_mode_c     = lc->pu.chroma_mode_c[0];\n+            }\n+        }\n+    } else {\n+        lc->tu.intra_pred_mode   = lc->pu.intra_pred_mode[0];\n+        lc->tu.intra_pred_mode_c = lc->pu.intra_pred_mode_c[0];\n+        lc->tu.chroma_mode_c     = lc->pu.chroma_mode_c[0];\n+    }\n+\n+    if (log2_trafo_size <= s->ps.sps->log2_max_trafo_size &&\n+        log2_trafo_size >  s->ps.sps->log2_min_tb_size    &&\n+        trafo_depth     < lc->cu.max_trafo_depth       &&\n+        !(lc->cu.intra_split_flag && trafo_depth == 0))\n+    {\n+        split_transform_flag = ff_hevc_rpi_split_transform_flag_decode(lc, log2_trafo_size);\n+    } else {\n+        int inter_split = s->ps.sps->max_transform_hierarchy_depth_inter == 0 &&\n+                          lc->cu.pred_mode == MODE_INTER &&\n+                          lc->cu.part_mode != PART_2Nx2N &&\n+                          trafo_depth == 0;\n+\n+        split_transform_flag = log2_trafo_size > s->ps.sps->log2_max_trafo_size ||\n+                               (lc->cu.intra_split_flag && trafo_depth == 0) ||\n+                               inter_split;\n+    }\n+\n+    if (log2_trafo_size > 2 || ctx_cfmt(s) == 3)\n+    {\n+        const int wants_c1 = ctx_cfmt(s) == 2 && (!split_transform_flag || log2_trafo_size == 3);\n+        cbf_c1 = 0;\n+\n+        if ((cbf_c0 & CBF_CB0) != 0)\n+        {\n+            cbf_c1 = ff_hevc_rpi_cbf_cb_cr_decode(lc, trafo_depth) << CBF_CB0_S;\n+            if (wants_c1)\n+                cbf_c1 |= ff_hevc_rpi_cbf_cb_cr_decode(lc, trafo_depth) << CBF_CB1_S;\n+        }\n+\n+        if ((cbf_c0 & CBF_CR0) != 0)\n+        {\n+            cbf_c1 |= ff_hevc_rpi_cbf_cb_cr_decode(lc, trafo_depth) << CBF_CR0_S;\n+            if (wants_c1)\n+                cbf_c1 |= ff_hevc_rpi_cbf_cb_cr_decode(lc, trafo_depth) << CBF_CR1_S;\n+        }\n+    }\n+\n+    if (split_transform_flag) {\n+        const int trafo_size_split = 1 << (log2_trafo_size - 1);\n+        const int x1 = x0 + trafo_size_split;\n+        const int y1 = y0 + trafo_size_split;\n+\n+#define SUBDIVIDE(x, y, idx)                                                    \\\n+do {                                                                            \\\n+    ret = hls_transform_tree(s, lc, x, y,                                       \\\n+                             log2_trafo_size - 1, trafo_depth + 1, idx,         \\\n+                             cbf_c1);                                           \\\n+    if (ret < 0)                                                                \\\n+        return ret;                                                             \\\n+} while (0)\n+\n+        SUBDIVIDE(x0, y0, 0);\n+        SUBDIVIDE(x1, y0, 1);\n+        SUBDIVIDE(x0, y1, 2);\n+        SUBDIVIDE(x1, y1, 3);\n+\n+#undef SUBDIVIDE\n+    } else {\n+        // If trafo_size == 2 then we should have cbf_c == 0 here but as we can't have\n+        // trafo_size == 2 with depth == 0 the issue is moot\n+        const int cbf_luma = ((lc->cu.pred_mode != MODE_INTRA && trafo_depth == 0 && cbf_c1 == 0) ||\n+            ff_hevc_rpi_cbf_luma_decode(lc, trafo_depth));\n+\n+        ret = hls_transform_unit(s, lc, x0, y0,\n+                                 log2_trafo_size + trafo_depth, log2_trafo_size,\n+                                 blk_idx, cbf_luma, cbf_c1);\n+        if (ret < 0)\n+            return ret;\n+\n+        if (!s->sh.disable_deblocking_filter_flag) {\n+            ff_hevc_rpi_deblocking_boundary_strengths(s, lc, x0, y0, log2_trafo_size, cbf_luma);\n+        }\n+    }\n+    return 0;\n+}\n+\n+\n+static int pcm_extract(const HEVCRpiContext * const s, const uint8_t * pcm, const int length, const int x0, const int y0, const int cb_size)\n+{\n+    GetBitContext gb;\n+    int ret;\n+\n+    ret = init_get_bits(&gb, pcm, length);\n+    if (ret < 0)\n+        return ret;\n+\n+    s->hevcdsp.put_pcm(av_rpi_sand_frame_pos_y(s->frame, x0, y0),\n+                       frame_stride1(s->frame, 0),\n+                       cb_size, cb_size, &gb, s->ps.sps->pcm.bit_depth);\n+\n+    s->hevcdsp.put_pcm_c(av_rpi_sand_frame_pos_c(s->frame, x0 >> ctx_hshift(s, 1), y0 >> ctx_vshift(s, 1)),\n+                       s->frame->linesize[1],\n+                       cb_size >> ctx_hshift(s, 1),\n+                       cb_size >> ctx_vshift(s, 1),\n+                       &gb, s->ps.sps->pcm.bit_depth_chroma);\n+\n+    return 0;\n+}\n+\n+\n+// x * 2^(y*2)\n+static inline unsigned int xyexp2(const unsigned int x, const unsigned int y)\n+{\n+    return x << (y * 2);\n+}\n+\n+static int hls_pcm_sample(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, const int x0, const int y0, unsigned int log2_cb_size)\n+{\n+    // Length in bits\n+    const unsigned int length = xyexp2(s->ps.sps->pcm.bit_depth, log2_cb_size) +\n+        xyexp2(s->ps.sps->pcm.bit_depth_chroma, log2_cb_size - ctx_vshift(s, 1)) +\n+        xyexp2(s->ps.sps->pcm.bit_depth_chroma, log2_cb_size - ctx_vshift(s, 2));\n+\n+    const uint8_t * const pcm = ff_hevc_rpi_cabac_skip_bytes(&lc->cc, (length + 7) >> 3);\n+\n+    if (!s->sh.disable_deblocking_filter_flag)\n+        ff_hevc_rpi_deblocking_boundary_strengths(s, lc, x0, y0, log2_cb_size, 0);\n+\n+    // Copy coeffs\n+    {\n+        const int blen = (length + 7) >> 3;\n+        // Round allocated bytes up to nearest 32 to avoid alignment confusion\n+        // Allocation is in int16_t s\n+        // As we are only using 1 byte per sample and the coeff buffer allows 2 per\n+        // sample this rounding doesn't affect the total size we need to allocate for\n+        // the coeff buffer\n+        int16_t * const coeffs = rpi_alloc_coeff_buf(lc->jb0, 0, ((blen + 31) & ~31) >> 1);\n+        memcpy(coeffs, pcm, blen);\n+\n+        // Our coeff stash assumes that any partially allocated 64byte lump\n+        // is zeroed so make that true.\n+        {\n+            uint8_t * const eopcm = (uint8_t *)coeffs + blen;\n+            if ((-(intptr_t)eopcm & 63) != 0)\n+                memset(eopcm, 0, -(intptr_t)eopcm & 63);\n+        }\n+\n+        // Add command\n+        {\n+            HEVCPredCmd *const cmd = rpi_new_intra_cmd(lc->jb0);\n+            cmd->type = RPI_PRED_I_PCM;\n+            cmd->size = log2_cb_size;\n+            cmd->i_pcm.src = coeffs;\n+            cmd->i_pcm.x = x0;\n+            cmd->i_pcm.y = y0;\n+            cmd->i_pcm.src_len = length;\n+        }\n+        return 0;\n+    }\n+}\n+\n+\n+static void hevc_await_progress(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, const HEVCRpiFrame * const ref,\n+                                const MvXY xy, const int y0, const int height)\n+{\n+    if (s->threads_type != 0) {\n+        const int y = FFMAX(0, (MV_Y(xy) >> 2) + y0 + height + 9);\n+\n+        // Progress has to be attached to current job as the actual wait\n+        // is in worker_core which can't use lc\n+        int16_t *const pr = lc->jb0->progress_req + ref->dpb_no;\n+        if (*pr < y) {\n+            *pr = y;\n+        }\n+    }\n+}\n+\n+static void hevc_luma_mv_mvp_mode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+                                  const int x0, const int y0, const int nPbW,\n+                                  const int nPbH,\n+                                  HEVCRpiMvField * const mv)\n+{\n+    enum InterPredIdc inter_pred_idc = PRED_L0;\n+    int mvp_flag;\n+    const unsigned int avail = ff_hevc_rpi_tb_avail_flags(s, lc, x0, y0, nPbW, nPbH);\n+\n+    mv->pred_flag = 0;\n+    if (s->sh.slice_type == HEVC_SLICE_B)\n+        inter_pred_idc = ff_hevc_rpi_inter_pred_idc_decode(lc, nPbW, nPbH);\n+\n+    if (inter_pred_idc != PRED_L1) {\n+        MvXY mvd;\n+\n+        if (s->sh.nb_refs[L0])\n+            mv->ref_idx[0]= ff_hevc_rpi_ref_idx_lx_decode(lc, s->sh.nb_refs[L0]);\n+\n+        mv->pred_flag = PF_L0;\n+        mvd = ff_hevc_rpi_hls_mvd_coding(lc);\n+        mvp_flag = ff_hevc_rpi_mvp_lx_flag_decode(lc);\n+        ff_hevc_rpi_luma_mv_mvp_mode(s, lc, x0, y0, nPbW, nPbH, avail,\n+                                 mv, mvp_flag, 0);\n+        mv->xy[0] = mvxy_add(mv->xy[0], mvd);\n+    }\n+\n+    if (inter_pred_idc != PRED_L0) {\n+        MvXY mvd = 0;\n+\n+        if (s->sh.nb_refs[L1])\n+            mv->ref_idx[1] = ff_hevc_rpi_ref_idx_lx_decode(lc, s->sh.nb_refs[L1]);\n+\n+        if (s->sh.mvd_l1_zero_flag != 1 || inter_pred_idc != PRED_BI)\n+            mvd = ff_hevc_rpi_hls_mvd_coding(lc);\n+\n+        mv->pred_flag += PF_L1;\n+        mvp_flag = ff_hevc_rpi_mvp_lx_flag_decode(lc);\n+        ff_hevc_rpi_luma_mv_mvp_mode(s, lc, x0, y0, nPbW, nPbH, avail,\n+                                 mv, mvp_flag, 1);\n+        mv->xy[1] = mvxy_add(mv->xy[1], mvd);\n+    }\n+}\n+\n+\n+static HEVCRpiInterPredQ *\n+rpi_nxt_pred(HEVCRpiInterPredEnv * const ipe, const unsigned int load_val, const uint32_t fn)\n+{\n+    HEVCRpiInterPredQ * yp = NULL;\n+    HEVCRpiInterPredQ * ypt = ipe->q + ipe->curr;\n+    const unsigned int max_fill = ipe->max_fill;\n+    unsigned int load = UINT_MAX;\n+\n+    for (unsigned int i = 0; i != ipe->n_grp; ++i, ++ypt) {\n+        // We will always have enough room between the Qs but if we are\n+        // running critically low due to poor scheduling then use fill size\n+        // rather than load to determine QPU.  This has obvious dire\n+        // performance implications but (a) it is better than crashing\n+        // and (b) it should (almost) never happen\n+        const unsigned int tfill = (char *)ypt->qpu_mc_curr - (char *)ypt->qpu_mc_base;\n+        const unsigned int tload = tfill > max_fill ? tfill + 0x1000000 : ypt->load;\n+\n+        if (tload < load)\n+        {\n+            yp = ypt;\n+            load = tload;\n+        }\n+    }\n+\n+    yp->load += load_val;\n+    ipe->used_grp = 1;\n+    qpu_mc_link_set(yp->qpu_mc_curr, fn);\n+\n+    return yp;\n+}\n+\n+\n+static void rpi_inter_pred_sync(HEVCRpiInterPredEnv * const ipe)\n+{\n+    for (unsigned int i = 0; i != ipe->n; ++i) {\n+        HEVCRpiInterPredQ * const q = ipe->q + i;\n+        const unsigned int qfill = (char *)q->qpu_mc_curr - (char *)q->qpu_mc_base;\n+\n+        qpu_mc_link_set(q->qpu_mc_curr, q->code_sync);\n+        q->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(&q->qpu_mc_curr->sync + 1);\n+        q->load = (qfill >> 7); // Have a mild preference for emptier Qs to balance memory usage\n+    }\n+}\n+\n+// Returns 0 on success\n+// We no longer check for Q fullness as wew have emergncy code in ctu alloc\n+// * However it might be an idea to have some means of spotting that we've used it\n+static int rpi_inter_pred_next_ctu(HEVCRpiInterPredEnv * const ipe)\n+{\n+    if (!ipe->used_grp)\n+        return 0;\n+\n+    if ((ipe->curr += ipe->n_grp) >= ipe->n)\n+    {\n+        ipe->curr = 0;\n+        rpi_inter_pred_sync(ipe);\n+    }\n+    ipe->used = 1;\n+    ipe->used_grp = 0;\n+\n+    return 0;\n+}\n+\n+static void rpi_inter_pred_reset(HEVCRpiInterPredEnv * const ipe)\n+{\n+    unsigned int i;\n+\n+    ipe->curr = 0;\n+    ipe->used = 0;\n+    ipe->used_grp = 0;\n+    for (i = 0; i != ipe->n; ++i) {\n+        HEVCRpiInterPredQ * const q = ipe->q + i;\n+        q->qpu_mc_curr = q->qpu_mc_base;\n+        q->load = 0;\n+        q->last_l0 = NULL;\n+        q->last_l1 = NULL;\n+    }\n+}\n+\n+static int rpi_inter_pred_alloc(HEVCRpiInterPredEnv * const ipe,\n+                                 const unsigned int n_max, const unsigned int n_grp,\n+                                 const unsigned int total_size, const unsigned int min_gap)\n+{\n+    int rv;\n+\n+    memset(ipe, 0, sizeof(*ipe));\n+    if ((ipe->q = av_mallocz(n_max * sizeof(*ipe->q))) == NULL)\n+        return AVERROR(ENOMEM);\n+\n+    ipe->n_grp = n_grp;\n+    ipe->min_gap = min_gap;\n+\n+    if ((rv = gpu_malloc_cached(total_size, &ipe->gptr)) != 0)\n+        av_freep(&ipe->q);\n+    return rv;\n+}\n+\n+\n+#if RPI_QPU_EMU_Y\n+#define get_mc_address_y(f) ((f)->data[0])\n+#else\n+#define get_mc_address_y(f) get_vc_address_y(f)\n+#endif\n+#if RPI_QPU_EMU_C\n+#define get_mc_address_u(f) ((f)->data[1])\n+#else\n+#define get_mc_address_u(f) get_vc_address_u(f)\n+#endif\n+\n+static inline uint32_t pack_wo_p(const int off, const int mul)\n+{\n+    return PACK2(off * 2 + 1, mul);\n+}\n+\n+static inline uint32_t pack_wo_b(const int off0, const int off1, const int mul)\n+{\n+    return PACK2(off0 + off1 + 1, mul);\n+}\n+\n+\n+static void\n+rpi_pred_y(const HEVCRpiContext *const s, HEVCRpiJob * const jb,\n+           const int x0, const int y0,\n+           const int nPbW, const int nPbH,\n+           const MvXY mv_xy,\n+           const int weight_mul,\n+           const int weight_offset,\n+           AVFrame *const src_frame)\n+{\n+    const unsigned int y_off = av_rpi_sand_frame_off_y(s->frame, x0, y0);\n+    const unsigned int mx          = MV_X(mv_xy) & 3;\n+    const unsigned int my          = MV_Y(mv_xy) & 3;\n+    const unsigned int my_mx       = (my << 8) | mx;\n+    const uint32_t     my2_mx2_my_mx = (my_mx << 16) | my_mx;\n+    const qpu_mc_src_addr_t src_vc_address_y = get_mc_address_y(src_frame);\n+    qpu_mc_dst_addr_t dst_addr = get_mc_address_y(s->frame) + y_off;\n+    const uint32_t wo = pack_wo_p(weight_offset, weight_mul);\n+    HEVCRpiInterPredEnv * const ipe = &jb->luma_ip;\n+    const unsigned int xshl = av_rpi_sand_frame_xshl(s->frame);\n+\n+    if (my_mx == 0)\n+    {\n+        const int x1 = x0 + (MV_X(mv_xy) >> 2);\n+        const int y1 = y0 + (MV_Y(mv_xy) >> 2);\n+        const int bh = nPbH;\n+\n+        for (int start_x = 0; start_x < nPbW; start_x += 16)\n+        {\n+            const int bw = FFMIN(nPbW - start_x, 16);\n+            HEVCRpiInterPredQ *const yp = rpi_nxt_pred(ipe, bh, s->qpu.y_p00);\n+            qpu_mc_src_t *const src1 = yp->last_l0;\n+            qpu_mc_pred_y_p00_t *const cmd_y = &yp->qpu_mc_curr->y.p00;\n+\n+#if RPI_TSTATS\n+            {\n+                HEVCRpiStats *const ts = (HEVCRpiStats *)&s->tstats;\n+                ++ts->y_pred1_x0y0;\n+\n+                if (nPbW > 8)\n+                    ++ts->y_pred1_wgt8;\n+                else\n+                    ++ts->y_pred1_wle8;\n+\n+                if (nPbH > 16)\n+                    ++ts->y_pred1_hgt16;\n+                else\n+                    ++ts->y_pred1_hle16;\n+            }\n+#endif\n+\n+            src1->x = x1 + start_x;\n+            src1->y = y1;\n+            src1->base = src_vc_address_y;\n+            cmd_y->w = bw;\n+            cmd_y->h = bh;\n+            cmd_y->wo1 = wo;\n+            cmd_y->dst_addr =  dst_addr + (start_x << xshl);\n+            yp->last_l0 = &cmd_y->next_src1;\n+            yp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(cmd_y + 1);\n+        }\n+    }\n+    else\n+    {\n+        const int x1_m3 = x0 + (MV_X(mv_xy) >> 2) - 3;\n+        const int y1_m3 = y0 + (MV_Y(mv_xy) >> 2) - 3;\n+        const unsigned int bh = nPbH;\n+        int start_x = 0;\n+\n+#if 1\n+        // As Y-pred operates on two independant 8-wide src blocks we can merge\n+        // this pred with the previous one if it the previous one is 8 pel wide,\n+        // the same height as the current block, immediately to the left of our\n+        // current dest block and mono-pred.\n+\n+        qpu_mc_pred_y_p_t *const last_y8_p = jb->last_y8_p;\n+        if (last_y8_p != NULL && last_y8_p->h == bh && last_y8_p->dst_addr + (8 << xshl) == dst_addr)\n+        {\n+            const int bw = FFMIN(nPbW, 8);\n+            qpu_mc_src_t *const last_y8_src2 = jb->last_y8_l1;\n+\n+            last_y8_src2->x = x1_m3;\n+            last_y8_src2->y = y1_m3;\n+            last_y8_src2->base = src_vc_address_y;\n+            last_y8_p->w += bw;\n+            last_y8_p->mymx21 = PACK2(my2_mx2_my_mx, last_y8_p->mymx21);\n+            last_y8_p->wo2 = wo;\n+\n+            jb->last_y8_p = NULL;\n+            jb->last_y8_l1 = NULL;\n+            start_x = bw;\n+#if RPI_TSTATS\n+            ++((HEVCRpiStats *)&s->tstats)->y_pred1_y8_merge;\n+#endif\n+        }\n+#endif\n+\n+        for (; start_x < nPbW; start_x += 16)\n+        {\n+            const int bw = FFMIN(nPbW - start_x, 16);\n+            HEVCRpiInterPredQ *const yp = rpi_nxt_pred(ipe, bh + 7, s->qpu.y_pxx);\n+            qpu_mc_src_t *const src1 = yp->last_l0;\n+            qpu_mc_src_t *const src2 = yp->last_l1;\n+            qpu_mc_pred_y_p_t *const cmd_y = &yp->qpu_mc_curr->y.p;\n+#if RPI_TSTATS\n+            {\n+                HEVCRpiStats *const ts = (HEVCRpiStats *)&s->tstats;\n+                if (mx == 0 && my == 0)\n+                    ++ts->y_pred1_x0y0;\n+                else if (mx == 0)\n+                    ++ts->y_pred1_x0;\n+                else if (my == 0)\n+                    ++ts->y_pred1_y0;\n+                else\n+                    ++ts->y_pred1_xy;\n+\n+                if (nPbW > 8)\n+                    ++ts->y_pred1_wgt8;\n+                else\n+                    ++ts->y_pred1_wle8;\n+\n+                if (nPbH > 16)\n+                    ++ts->y_pred1_hgt16;\n+                else\n+                    ++ts->y_pred1_hle16;\n+            }\n+#endif\n+            src1->x = x1_m3 + start_x;\n+            src1->y = y1_m3;\n+            src1->base = src_vc_address_y;\n+            if (bw <= 8)\n+            {\n+                src2->x = MC_DUMMY_X;\n+                src2->y = MC_DUMMY_Y;\n+#if RPI_QPU_EMU_Y\n+                src2->base = s->qpu_dummy_frame_emu;\n+#else\n+                src2->base = s->qpu_dummy_frame_qpu;\n+#endif\n+            }\n+            else\n+            {\n+                src2->x = x1_m3 + start_x + 8;\n+                src2->y = y1_m3;\n+                src2->base = src_vc_address_y;\n+            }\n+            cmd_y->w = bw;\n+            cmd_y->h = bh;\n+            cmd_y->mymx21 = my2_mx2_my_mx;\n+            cmd_y->wo1 = wo;\n+            cmd_y->wo2 = wo;\n+            cmd_y->dst_addr =  dst_addr + (start_x << xshl);\n+            yp->last_l0 = &cmd_y->next_src1;\n+            yp->last_l1 = &cmd_y->next_src2;\n+            yp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(cmd_y + 1);\n+\n+            if (bw == 8) {\n+                jb->last_y8_l1 = src2;\n+                jb->last_y8_p = cmd_y;\n+            }\n+        }\n+    }\n+}\n+\n+static void\n+rpi_pred_y_b(const HEVCRpiContext * const s, HEVCRpiJob * const jb,\n+           const int x0, const int y0,\n+           const int nPbW, const int nPbH,\n+           const struct HEVCRpiMvField *const mv_field,\n+           const AVFrame *const src_frame,\n+           const AVFrame *const src_frame2)\n+{\n+    const unsigned int y_off = av_rpi_sand_frame_off_y(s->frame, x0, y0);\n+    const MvXY mv  = mv_field->xy[0];\n+    const MvXY mv2 = mv_field->xy[1];\n+\n+    const unsigned int mx          = MV_X(mv) & 3;\n+    const unsigned int my          = MV_Y(mv) & 3;\n+    const unsigned int my_mx = (my<<8) | mx;\n+    const unsigned int mx2          = MV_X(mv2) & 3;\n+    const unsigned int my2          = MV_Y(mv2) & 3;\n+    const unsigned int my2_mx2 = (my2<<8) | mx2;\n+    const uint32_t     my2_mx2_my_mx = (my2_mx2 << 16) | my_mx;\n+    const unsigned int ref_idx0 = mv_field->ref_idx[0];\n+    const unsigned int ref_idx1 = mv_field->ref_idx[1];\n+    const uint32_t wo1 = pack_wo_b(s->sh.luma_offset_l0[ref_idx0], s->sh.luma_offset_l1[ref_idx1], s->sh.luma_weight_l0[ref_idx0]);\n+    const uint32_t wo2 = pack_wo_b(s->sh.luma_offset_l0[ref_idx0], s->sh.luma_offset_l1[ref_idx1], s->sh.luma_weight_l1[ref_idx1]);\n+\n+    const unsigned int xshl = av_rpi_sand_frame_xshl(s->frame);\n+    qpu_mc_dst_addr_t dst = get_mc_address_y(s->frame) + y_off;\n+    const qpu_mc_src_addr_t src1_base = get_mc_address_y(src_frame);\n+    const qpu_mc_src_addr_t src2_base = get_mc_address_y(src_frame2);\n+    HEVCRpiInterPredEnv * const ipe = &jb->luma_ip;\n+\n+    if (my2_mx2_my_mx == 0)\n+    {\n+        const int x1 = x0 + (MV_X(mv) >> 2);\n+        const int y1 = y0 + (MV_Y(mv) >> 2);\n+        const int x2 = x0 + (MV_X(mv2) >> 2);\n+        const int y2 = y0 + (MV_Y(mv2) >> 2);\n+        const int bh = nPbH;\n+\n+        // Can do chunks a full 16 wide if we don't want the H filter\n+        for (int start_x=0; start_x < nPbW; start_x += 16)\n+        {\n+            HEVCRpiInterPredQ *const yp = rpi_nxt_pred(ipe, bh, s->qpu.y_b00);\n+            qpu_mc_src_t *const src1 = yp->last_l0;\n+            qpu_mc_src_t *const src2 = yp->last_l1;\n+            qpu_mc_pred_y_p_t *const cmd_y = &yp->qpu_mc_curr->y.p;\n+#if RPI_TSTATS\n+            {\n+                HEVCRpiStats *const ts = (HEVCRpiStats *)&s->tstats;\n+                ++ts->y_pred2_x0y0;\n+\n+                if (nPbH > 16)\n+                    ++ts->y_pred2_hgt16;\n+                else\n+                    ++ts->y_pred2_hle16;\n+            }\n+#endif\n+            src1->x = x1 + start_x;\n+            src1->y = y1;\n+            src1->base = src1_base;\n+            src2->x = x2 + start_x;\n+            src2->y = y2;\n+            src2->base = src2_base;\n+            cmd_y->w = FFMIN(nPbW - start_x, 16);\n+            cmd_y->h = bh;\n+            cmd_y->mymx21 = 0;\n+            cmd_y->wo1 = wo1;\n+            cmd_y->wo2 = wo2;\n+            cmd_y->dst_addr =  dst + (start_x << xshl);\n+            yp->last_l0 = &cmd_y->next_src1;\n+            yp->last_l1 = &cmd_y->next_src2;\n+            yp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(cmd_y + 1);\n+        }\n+    }\n+    else\n+    {\n+        // Filter requires a run-up of 3\n+        const int x1 = x0 + (MV_X(mv) >> 2) - 3;\n+        const int y1 = y0 + (MV_Y(mv) >> 2) - 3;\n+        const int x2 = x0 + (MV_X(mv2) >> 2) - 3;\n+        const int y2 = y0 + (MV_Y(mv2) >> 2) - 3;\n+        const int bh = nPbH;\n+\n+        for (int start_x=0; start_x < nPbW; start_x += 8)\n+        { // B blocks work 8 at a time\n+            // B weights aren't doubled as the QPU code does the same\n+            // amount of work as it does for P\n+            HEVCRpiInterPredQ *const yp = rpi_nxt_pred(ipe, bh + 7, s->qpu.y_bxx);\n+            qpu_mc_src_t *const src1 = yp->last_l0;\n+            qpu_mc_src_t *const src2 = yp->last_l1;\n+            qpu_mc_pred_y_p_t *const cmd_y = &yp->qpu_mc_curr->y.p;\n+#if RPI_TSTATS\n+            {\n+                HEVCRpiStats *const ts = (HEVCRpiStats *)&s->tstats;\n+                const unsigned int mmx = mx | mx2;\n+                const unsigned int mmy = my | my2;\n+                if (mmx == 0 && mmy == 0)\n+                    ++ts->y_pred2_x0y0;\n+                else if (mmx == 0)\n+                    ++ts->y_pred2_x0;\n+                else if (mmy == 0)\n+                    ++ts->y_pred2_y0;\n+                else\n+                    ++ts->y_pred2_xy;\n+\n+                if (nPbH > 16)\n+                    ++ts->y_pred2_hgt16;\n+                else\n+                    ++ts->y_pred2_hle16;\n+            }\n+#endif\n+            src1->x = x1 + start_x;\n+            src1->y = y1;\n+            src1->base = src1_base;\n+            src2->x = x2 + start_x;\n+            src2->y = y2;\n+            src2->base = src2_base;\n+            cmd_y->w = FFMIN(nPbW - start_x, 8);\n+            cmd_y->h = bh;\n+            cmd_y->mymx21 = my2_mx2_my_mx;\n+            cmd_y->wo1 = wo1;\n+            cmd_y->wo2 = wo2;\n+            cmd_y->dst_addr =  dst + (start_x << xshl);\n+            yp->last_l0 = &cmd_y->next_src1;\n+            yp->last_l1 = &cmd_y->next_src2;\n+            yp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(cmd_y + 1);\n+        }\n+    }\n+}\n+\n+// h/v shifts fixed at one as that is all the qasm copes with\n+static void\n+rpi_pred_c(const HEVCRpiContext * const s, HEVCRpiJob * const jb,\n+  const unsigned int lx, const int x0_c, const int y0_c,\n+  const int nPbW_c, const int nPbH_c,\n+  const MvXY mv,\n+  const int16_t * const c_weights,\n+  const int16_t * const c_offsets,\n+  AVFrame * const src_frame)\n+{\n+    const unsigned int c_off = av_rpi_sand_frame_off_c(s->frame, x0_c, y0_c);\n+    const int hshift = 1; // = s->ps.sps->hshift[1];\n+    const int vshift = 1; // = s->ps.sps->vshift[1];\n+\n+    const int x1_c = x0_c + (MV_X(mv) >> (2 + hshift)) - 1;\n+    const int y1_c = y0_c + (MV_Y(mv) >> (2 + hshift)) - 1;\n+    const qpu_mc_src_addr_t src_base_u = get_mc_address_u(src_frame);\n+    const uint32_t x_coeffs = rpi_filter_coefs[av_mod_uintp2(MV_X(mv), 2 + hshift) << (1 - hshift)];\n+    const uint32_t y_coeffs = rpi_filter_coefs[av_mod_uintp2(MV_Y(mv), 2 + vshift) << (1 - vshift)];\n+    const uint32_t wo_u = pack_wo_p(c_offsets[0], c_weights[0]);\n+    const uint32_t wo_v = pack_wo_p(c_offsets[1], c_weights[1]);\n+    qpu_mc_dst_addr_t dst_base_u = get_mc_address_u(s->frame) + c_off;\n+    HEVCRpiInterPredEnv * const ipe = &jb->chroma_ip;\n+    const unsigned int xshl = av_rpi_sand_frame_xshl(s->frame) + 1;\n+    const unsigned int bh = nPbH_c;\n+    const uint32_t qfn = lx == 0 ? s->qpu.c_pxx : s->qpu.c_pxx_l1;\n+\n+    for(int start_x=0; start_x < nPbW_c; start_x+=RPI_CHROMA_BLOCK_WIDTH)\n+    {\n+        HEVCRpiInterPredQ * const cp = rpi_nxt_pred(ipe, bh + 3, qfn);\n+        qpu_mc_pred_c_p_t * const cmd_c = &cp->qpu_mc_curr->c.p;\n+        qpu_mc_src_t ** const plast_lx = (lx == 0) ? &cp->last_l0 : &cp->last_l1;\n+        qpu_mc_src_t * const last_lx = *plast_lx;\n+        const int bw = FFMIN(nPbW_c-start_x, RPI_CHROMA_BLOCK_WIDTH);\n+\n+        last_lx->x = x1_c + start_x;\n+        last_lx->y = y1_c;\n+        last_lx->base = src_base_u;\n+        cmd_c->h = bh;\n+        cmd_c->w = bw;\n+        cmd_c->coeffs_x = x_coeffs;\n+        cmd_c->coeffs_y = y_coeffs;\n+        cmd_c->wo_u = wo_u;\n+        cmd_c->wo_v = wo_v;\n+        cmd_c->dst_addr_c = dst_base_u + (start_x << xshl);\n+        *plast_lx = &cmd_c->next_src;\n+        cp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(cmd_c + 1);\n+    }\n+    return;\n+}\n+\n+// h/v shifts fixed at one as that is all the qasm copes with\n+static void\n+rpi_pred_c_b(const HEVCRpiContext * const s, HEVCRpiJob * const jb,\n+  const int x0_c, const int y0_c,\n+  const int nPbW_c, const int nPbH_c,\n+  const struct HEVCRpiMvField * const mv_field,\n+  const int16_t * const c_weights,\n+  const int16_t * const c_offsets,\n+  const int16_t * const c_weights2,\n+  const int16_t * const c_offsets2,\n+  AVFrame * const src_frame,\n+  AVFrame * const src_frame2)\n+{\n+    const unsigned int c_off = av_rpi_sand_frame_off_c(s->frame, x0_c, y0_c);\n+    const int hshift = 1; // s->ps.sps->hshift[1];\n+    const int vshift = 1; // s->ps.sps->vshift[1];\n+    const MvXY mv = mv_field->xy[0];\n+    const MvXY mv2 = mv_field->xy[1];\n+\n+    const unsigned int mx = av_mod_uintp2(MV_X(mv), 2 + hshift);\n+    const unsigned int my = av_mod_uintp2(MV_Y(mv), 2 + vshift);\n+    const uint32_t coefs0_x = rpi_filter_coefs[mx << (1 - hshift)];\n+    const uint32_t coefs0_y = rpi_filter_coefs[my << (1 - vshift)]; // Fractional part of motion vector\n+    const int x1_c = x0_c + (MV_X(mv) >> (2 + hshift)) - 1;\n+    const int y1_c = y0_c + (MV_Y(mv) >> (2 + hshift)) - 1;\n+\n+    const unsigned int mx2 = av_mod_uintp2(MV_X(mv2), 2 + hshift);\n+    const unsigned int my2 = av_mod_uintp2(MV_Y(mv2), 2 + vshift);\n+    const uint32_t coefs1_x = rpi_filter_coefs[mx2 << (1 - hshift)];\n+    const uint32_t coefs1_y = rpi_filter_coefs[my2 << (1 - vshift)]; // Fractional part of motion vector\n+\n+    const int x2_c = x0_c + (MV_X(mv2) >> (2 + hshift)) - 1;\n+    const int y2_c = y0_c + (MV_Y(mv2) >> (2 + hshift)) - 1;\n+\n+    const uint32_t wo_u2 = pack_wo_b(c_offsets[0], c_offsets2[0], c_weights2[0]);\n+    const uint32_t wo_v2 = pack_wo_b(c_offsets[1], c_offsets2[1], c_weights2[1]);\n+\n+    const qpu_mc_dst_addr_t dst_base_u = get_mc_address_u(s->frame) + c_off;\n+    const qpu_mc_src_addr_t src1_base = get_mc_address_u(src_frame);\n+    const qpu_mc_src_addr_t src2_base = get_mc_address_u(src_frame2);\n+    HEVCRpiInterPredEnv * const ipe = &jb->chroma_ip;\n+    const unsigned int xshl = av_rpi_sand_frame_xshl(s->frame) + 1;\n+    const unsigned int bh = nPbH_c;\n+\n+    for (int start_x=0; start_x < nPbW_c; start_x += RPI_CHROMA_BLOCK_WIDTH)\n+    {\n+        const unsigned int bw = FFMIN(nPbW_c-start_x, RPI_CHROMA_BLOCK_WIDTH);\n+\n+        HEVCRpiInterPredQ * const cp = rpi_nxt_pred(ipe, bh * 2 + 3, s->qpu.c_bxx);\n+        qpu_mc_pred_c_b_t * const u = &cp->qpu_mc_curr->c.b;\n+        qpu_mc_src_t * const src_l0 = cp->last_l0;\n+        qpu_mc_src_t * const src_l1 = cp->last_l1;\n+\n+        src_l0->x = x1_c + start_x;\n+        src_l0->y = y1_c;\n+        src_l0->base = src1_base;\n+        src_l1->x = x2_c + start_x;\n+        src_l1->y = y2_c;\n+        src_l1->base = src2_base;\n+\n+        u[0].h = bh;\n+        u[0].w = bw;\n+        u[0].coeffs_x1 = coefs0_x;\n+        u[0].coeffs_y1 = coefs0_y;\n+        u[0].weight_u1 = c_weights[0]; // Weight L0 U\n+        u[0].weight_v1 = c_weights[1]; // Weight L0 V\n+        u[0].coeffs_x2 = coefs1_x;\n+        u[0].coeffs_y2 = coefs1_y;\n+        u[0].wo_u2 = wo_u2;\n+        u[0].wo_v2 = wo_v2;\n+        u[0].dst_addr_c = dst_base_u + (start_x << xshl);\n+\n+        cp->last_l0 = &u[0].next_src1;\n+        cp->last_l1 = &u[0].next_src2;\n+        cp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(u + 1);\n+    }\n+}\n+\n+\n+static inline void\n+col_stash(const HEVCRpiContext * const s,\n+          const unsigned int x0, const unsigned int y0, const unsigned int w0, const unsigned int h0,\n+          const HEVCRpiMvField * const mvf)\n+{\n+    ColMvField * const col_mvf = s->ref->col_mvf;\n+    const unsigned int x = (x0 + 15) >> 4;\n+    const unsigned int y = (y0 + 15) >> 4;\n+    const unsigned int w = ((x0 + 15 + w0) >> 4) - x;\n+    const unsigned int h = ((y0 + 15 + h0) >> 4) - y;\n+\n+    if (col_mvf != NULL && w != 0 && h != 0)\n+    {\n+        // Only record MV from the top left of the 16x16 block\n+\n+        const RefPicList * const rpl = s->refPicList;\n+        const ColMvField cmv = {\n+            .L = {\n+                {\n+                    .poc = (mvf->pred_flag & PF_L0) == 0 ?\n+                            COL_POC_INTRA :\n+                            COL_POC_MAKE_INTER(rpl[0].isLongTerm[mvf->ref_idx[0]], rpl[0].list[mvf->ref_idx[0]]),\n+                    .xy = mvf->xy[0]\n+                },\n+                {\n+                    .poc = (mvf->pred_flag & PF_L1) == 0 ?\n+                            COL_POC_INTRA :\n+                            COL_POC_MAKE_INTER(rpl[1].isLongTerm[mvf->ref_idx[1]], rpl[1].list[mvf->ref_idx[1]]),\n+                    .xy = mvf->xy[1]\n+                }\n+            }\n+        };\n+\n+        ColMvField * p = col_mvf + y * s->col_mvf_stride + x;\n+        const unsigned int stride = s->col_mvf_stride - w;\n+        unsigned int j = h;\n+\n+        do\n+        {\n+            unsigned int k = w;\n+            do\n+            {\n+                *p++ = cmv;\n+            } while (--k != 0);\n+            p += stride;\n+        } while (--j != 0);\n+    }\n+}\n+\n+static void hls_prediction_unit(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+                                const unsigned int x0, const unsigned int y0,\n+                                const unsigned int nPbW, const unsigned int nPbH,\n+                                const unsigned int log2_cb_size, const unsigned int partIdx, const unsigned int idx)\n+{\n+    HEVCRpiJob * const jb = lc->jb0;\n+\n+    struct HEVCRpiMvField current_mv = {{0}};\n+    const RefPicList  *const refPicList = s->refPicList;\n+    const HEVCRpiFrame *ref0 = NULL, *ref1 = NULL;\n+\n+    if (lc->cu.pred_mode != MODE_SKIP)\n+        lc->pu.merge_flag = ff_hevc_rpi_merge_flag_decode(lc);\n+\n+    if (lc->cu.pred_mode == MODE_SKIP || lc->pu.merge_flag) {\n+        const unsigned int merge_idx = s->sh.max_num_merge_cand <= 1 ? 0 :\n+            ff_hevc_rpi_merge_idx_decode(s, lc);\n+\n+        ff_hevc_rpi_luma_mv_merge_mode(s, lc, x0, y0, nPbW, nPbH, log2_cb_size,\n+                                   partIdx, merge_idx, &current_mv);\n+    } else {\n+        hevc_luma_mv_mvp_mode(s, lc, x0, y0, nPbW, nPbH, &current_mv);\n+    }\n+\n+    {\n+        HEVCRpiMvField * p = mvf_stash_ptr(s, lc, x0, y0);\n+        unsigned int i, j;\n+\n+        for (j = 0; j < nPbH >> LOG2_MIN_PU_SIZE; j++)\n+        {\n+            for (i = 0; i < nPbW >> LOG2_MIN_PU_SIZE; i++)\n+                p[i] = current_mv;\n+            p += MVF_STASH_WIDTH_PU;\n+        }\n+    }\n+\n+    col_stash(s, x0, y0, nPbW, nPbH, &current_mv);\n+\n+    if (current_mv.pred_flag & PF_L0) {\n+        ref0 = refPicList[0].ref[current_mv.ref_idx[0]];\n+        if (!ref0)\n+            return;\n+        hevc_await_progress(s, lc, ref0, current_mv.xy[0], y0, nPbH);\n+    }\n+    if (current_mv.pred_flag & PF_L1) {\n+        ref1 = refPicList[1].ref[current_mv.ref_idx[1]];\n+        if (!ref1)\n+            return;\n+        hevc_await_progress(s, lc, ref1, current_mv.xy[1], y0, nPbH);\n+    }\n+\n+    if (current_mv.pred_flag == PF_L0) {\n+        const int x0_c = x0 >> ctx_hshift(s, 1);\n+        const int y0_c = y0 >> ctx_vshift(s, 1);\n+        const int nPbW_c = nPbW >> ctx_hshift(s, 1);\n+        const int nPbH_c = nPbH >> ctx_vshift(s, 1);\n+\n+        rpi_pred_y(s, jb, x0, y0, nPbW, nPbH, current_mv.xy[0],\n+          s->sh.luma_weight_l0[current_mv.ref_idx[0]], s->sh.luma_offset_l0[current_mv.ref_idx[0]],\n+          ref0->frame);\n+\n+        if (ctx_cfmt(s) != 0) {\n+            rpi_pred_c(s, jb, 0, x0_c, y0_c, nPbW_c, nPbH_c, current_mv.xy[0],\n+              s->sh.chroma_weight_l0[current_mv.ref_idx[0]], s->sh.chroma_offset_l0[current_mv.ref_idx[0]],\n+              ref0->frame);\n+            return;\n+        }\n+    } else if (current_mv.pred_flag == PF_L1) {\n+        const int x0_c = x0 >> ctx_hshift(s, 1);\n+        const int y0_c = y0 >> ctx_vshift(s, 1);\n+        const int nPbW_c = nPbW >> ctx_hshift(s, 1);\n+        const int nPbH_c = nPbH >> ctx_vshift(s, 1);\n+\n+        rpi_pred_y(s, jb, x0, y0, nPbW, nPbH, current_mv.xy[1],\n+          s->sh.luma_weight_l1[current_mv.ref_idx[1]], s->sh.luma_offset_l1[current_mv.ref_idx[1]],\n+          ref1->frame);\n+\n+        if (ctx_cfmt(s) != 0) {\n+            rpi_pred_c(s, jb, 1, x0_c, y0_c, nPbW_c, nPbH_c, current_mv.xy[1],\n+              s->sh.chroma_weight_l1[current_mv.ref_idx[1]], s->sh.chroma_offset_l1[current_mv.ref_idx[1]],\n+              ref1->frame);\n+            return;\n+        }\n+    } else if (current_mv.pred_flag == PF_BI) {\n+        const int x0_c = x0 >> ctx_hshift(s, 1);\n+        const int y0_c = y0 >> ctx_vshift(s, 1);\n+        const int nPbW_c = nPbW >> ctx_hshift(s, 1);\n+        const int nPbH_c = nPbH >> ctx_vshift(s, 1);\n+\n+        rpi_pred_y_b(s, jb, x0, y0, nPbW, nPbH, &current_mv, ref0->frame, ref1->frame);\n+\n+        if (ctx_cfmt(s) != 0) {\n+          rpi_pred_c_b(s, jb, x0_c, y0_c, nPbW_c, nPbH_c,\n+                       &current_mv,\n+                       s->sh.chroma_weight_l0[current_mv.ref_idx[0]],\n+                       s->sh.chroma_offset_l0[current_mv.ref_idx[0]],\n+                       s->sh.chroma_weight_l1[current_mv.ref_idx[1]],\n+                       s->sh.chroma_offset_l1[current_mv.ref_idx[1]],\n+                       ref0->frame,\n+                       ref1->frame);\n+            return;\n+        }\n+    }\n+}\n+\n+static void set_ipm(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+                    const unsigned int x0, const unsigned int y0,\n+                    const unsigned int log2_cb_size,\n+                    const unsigned int ipm)\n+{\n+    const unsigned int x_pu = x0 >> LOG2_MIN_PU_SIZE;\n+    const unsigned int y_pu = y0 >> LOG2_MIN_PU_SIZE;\n+\n+    {\n+        const unsigned int ctb_mask = ~(~0U << (s->ps.sps->log2_ctb_size - LOG2_MIN_PU_SIZE));\n+        set_stash2(lc->ipm_left + (y_pu & ctb_mask), lc->ipm_up + (x_pu & ctb_mask), log2_cb_size - LOG2_MIN_PU_SIZE, ipm);\n+    }\n+\n+    // If IRAP then everything is Intra & we avoid ever looking at these\n+    // stashes so don't bother setting them\n+    if (!s->is_irap && lc->cu.pred_mode == MODE_INTRA)\n+    {\n+        if (s->is_intra != NULL)\n+        {\n+            set_bits(s->is_intra + (y0 >> LOG2_MIN_CU_SIZE) * s->ps.sps->pcm_width, x0 >> LOG2_MIN_CU_SIZE, s->ps.sps->pcm_width, log2_cb_size - LOG2_MIN_CU_SIZE);\n+        }\n+\n+        {\n+            HEVCRpiMvField * p = mvf_stash_ptr(s, lc, x0, y0);\n+            const unsigned int size_in_pus = (1 << log2_cb_size) >> LOG2_MIN_PU_SIZE; // min_pu <= log2_cb so >= 1\n+            unsigned int n = size_in_pus;\n+\n+            do\n+            {\n+                memset(p, 0, size_in_pus * sizeof(*p));\n+                p += MVF_STASH_WIDTH_PU;\n+            } while (--n != 0);\n+        }\n+\n+\n+        if (s->ref->col_mvf != NULL && ((x0 | y0) & 0xf) == 0)\n+        {\n+            // Only record top left stuff\n+            // Blocks should always be alinged on size boundries\n+            // so cannot have overflow from a small block\n+\n+            ColMvField * p = s->ref->col_mvf + (y0 >> 4) * s->col_mvf_stride + (x0 >> 4);\n+            const unsigned int size_in_col = log2_cb_size < 4 ? 1 : (1 << (log2_cb_size - 4));\n+            const unsigned int stride = s->col_mvf_stride - size_in_col;\n+            unsigned int j = size_in_col;\n+\n+            do\n+            {\n+                unsigned int k = size_in_col;\n+                do\n+                {\n+                    p->L[0].poc = COL_POC_INTRA;\n+                    p->L[0].xy = 0;\n+                    p->L[1].poc = COL_POC_INTRA;\n+                    p->L[1].xy = 0;\n+                    ++p;\n+                } while (--k != 0);\n+                p += stride;\n+            } while (--j != 0);\n+        }\n+    }\n+}\n+\n+static inline void intra_prediction_unit_default_value(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+                                                const unsigned int x0, const unsigned int y0,\n+                                                const unsigned int log2_cb_size)\n+{\n+    set_ipm(s, lc, x0, y0, log2_cb_size, INTRA_DC);\n+}\n+\n+\n+/**\n+ * 8.4.1\n+ */\n+static int luma_intra_pred_mode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+                                int x0, int y0, int log2_pu_size,\n+                                int prev_intra_luma_pred_flag,\n+                                const unsigned int idx)\n+{\n+    const unsigned int ctb_mask = ~(~0U << s->ps.sps->log2_ctb_size);\n+    const unsigned int xb_pu = (x0 & ctb_mask) >> LOG2_MIN_PU_SIZE;\n+    const unsigned int yb_pu = (y0 & ctb_mask) >> LOG2_MIN_PU_SIZE;\n+\n+    // Up does not cross boundries so as we always scan 1 slice-tile-line in an\n+    // lc we can just keep 1 CTB lR stashes\n+    // Left is reset to DC @ Start of Line/Tile/Slice in fill_job\n+    const unsigned int cand_up   = yb_pu == 0 ? INTRA_DC : lc->ipm_up[xb_pu];\n+    const unsigned int cand_left = lc->ipm_left[yb_pu];\n+\n+    unsigned int intra_pred_mode;\n+    unsigned int a, b, c;\n+\n+    if (cand_left == cand_up) {\n+        if (cand_left < 2) {\n+            a = INTRA_PLANAR;\n+            b = INTRA_DC;\n+            c = INTRA_ANGULAR_26;\n+        } else {\n+            a = cand_left;\n+            b = 2 + ((cand_left - 2 - 1 + 32) & 31);\n+            c = 2 + ((cand_left - 2 + 1) & 31);\n+        }\n+    } else {\n+        a = cand_left;\n+        b = cand_up;\n+        c = (cand_left != INTRA_PLANAR && cand_up != INTRA_PLANAR) ?\n+                INTRA_PLANAR :\n+            (cand_left != INTRA_DC && cand_up != INTRA_DC) ?\n+                INTRA_DC :\n+                INTRA_ANGULAR_26;\n+    }\n+\n+    if (prev_intra_luma_pred_flag) {\n+        intra_pred_mode = idx == 0 ? a : idx == 1 ? b : c;\n+    } else {\n+        // Sort lowest 1st\n+        if (a > b)\n+            FFSWAP(int, a, b);\n+        if (a > c)\n+            FFSWAP(int, a, c);\n+        if (b > c)\n+            FFSWAP(int, b, c);\n+\n+        intra_pred_mode = idx;\n+        if (intra_pred_mode >= a)\n+            intra_pred_mode++;\n+        if (intra_pred_mode >= b)\n+            intra_pred_mode++;\n+        if (intra_pred_mode >= c)\n+            intra_pred_mode++;\n+    }\n+\n+    /* write the intra prediction units into the mv array */\n+    set_ipm(s, lc, x0, y0, log2_pu_size, intra_pred_mode);\n+    return intra_pred_mode;\n+}\n+\n+static const uint8_t tab_mode_idx[] = {\n+     0,  1,  2,  2,  2,  2,  3,  5,  7,  8, 10, 12, 13, 15, 17, 18, 19, 20,\n+    21, 22, 23, 23, 24, 24, 25, 25, 26, 27, 27, 28, 28, 29, 29, 30, 31};\n+\n+static void intra_prediction_unit(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+                                  const unsigned int x0, const unsigned int y0,\n+                                  const unsigned int log2_cb_size)\n+{\n+    static const uint8_t intra_chroma_table[4] = { 0, 26, 10, 1 };\n+    uint8_t prev_intra_luma_pred_flag[4];\n+    int split   = lc->cu.part_mode == PART_NxN;\n+    const unsigned int split_size = (1 << (log2_cb_size - 1));\n+    int chroma_mode;\n+    const unsigned int n = split ? 4 : 1;\n+    unsigned int i;\n+\n+    for (i = 0; i != n; i++)\n+        prev_intra_luma_pred_flag[i] = ff_hevc_rpi_prev_intra_luma_pred_flag_decode(lc);\n+\n+    for (i = 0; i < n; i++) {\n+        // depending on mode idx is mpm or luma_pred_mode\n+        const unsigned int idx = prev_intra_luma_pred_flag[i] ?\n+            ff_hevc_rpi_mpm_idx_decode(lc) :\n+            ff_hevc_rpi_rem_intra_luma_pred_mode_decode(lc);\n+\n+        lc->pu.intra_pred_mode[i] =\n+            luma_intra_pred_mode(s, lc,\n+                                 x0 + ((i & 1) == 0 ? 0 : split_size),\n+                                 y0 + ((i & 2) == 0 ? 0 : split_size),\n+                                 log2_cb_size - split,\n+                                 prev_intra_luma_pred_flag[i], idx);\n+    }\n+\n+    if (ctx_cfmt(s) == 3) {\n+        for (i = 0; i < n; i++) {\n+            lc->pu.chroma_mode_c[i] = chroma_mode = ff_hevc_rpi_intra_chroma_pred_mode_decode(lc);\n+            if (chroma_mode != 4) {\n+                if (lc->pu.intra_pred_mode[i] == intra_chroma_table[chroma_mode])\n+                    lc->pu.intra_pred_mode_c[i] = 34;\n+                else\n+                    lc->pu.intra_pred_mode_c[i] = intra_chroma_table[chroma_mode];\n+            } else {\n+                lc->pu.intra_pred_mode_c[i] = lc->pu.intra_pred_mode[i];\n+            }\n+        }\n+    } else if (ctx_cfmt(s) == 2) {\n+        int mode_idx;\n+        lc->pu.chroma_mode_c[0] = chroma_mode = ff_hevc_rpi_intra_chroma_pred_mode_decode(lc);\n+        if (chroma_mode != 4) {\n+            if (lc->pu.intra_pred_mode[0] == intra_chroma_table[chroma_mode])\n+                mode_idx = 34;\n+            else\n+                mode_idx = intra_chroma_table[chroma_mode];\n+        } else {\n+            mode_idx = lc->pu.intra_pred_mode[0];\n+        }\n+        lc->pu.intra_pred_mode_c[0] = tab_mode_idx[mode_idx];\n+    } else if (ctx_cfmt(s) != 0) {\n+        chroma_mode = ff_hevc_rpi_intra_chroma_pred_mode_decode(lc);\n+        if (chroma_mode != 4) {\n+            if (lc->pu.intra_pred_mode[0] == intra_chroma_table[chroma_mode])\n+                lc->pu.intra_pred_mode_c[0] = 34;\n+            else\n+                lc->pu.intra_pred_mode_c[0] = intra_chroma_table[chroma_mode];\n+        } else {\n+            lc->pu.intra_pred_mode_c[0] = lc->pu.intra_pred_mode[0];\n+        }\n+    }\n+}\n+\n+static int hls_coding_unit(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+                           const unsigned int x0, const unsigned int y0, const unsigned int log2_cb_size)\n+{\n+    const unsigned int cb_size          = 1 << log2_cb_size;\n+    const unsigned int log2_min_cb_size = s->ps.sps->log2_min_cb_size;\n+    const unsigned int min_cb_width     = s->ps.sps->min_cb_width;\n+    const unsigned int x_cb             = x0 >> log2_min_cb_size;\n+    const unsigned int y_cb             = y0 >> log2_min_cb_size;\n+    const unsigned int idx              = log2_cb_size - 2;\n+    const unsigned int qp_block_mask    = (1 << s->ps.pps->log2_min_cu_qp_delta_size) - 1;\n+    int skip_flag = 0;\n+\n+    lc->cu.x                = x0;\n+    lc->cu.y                = y0;\n+    lc->cu.x_split          = x0;\n+    lc->cu.y_split          = y0;\n+\n+    lc->cu.pred_mode        = MODE_INTRA;\n+    lc->cu.part_mode        = PART_2Nx2N;\n+    lc->cu.intra_split_flag = 0;\n+    lc->cu.cu_transquant_bypass_flag = 0;\n+    lc->pu.intra_pred_mode[0] = 1;\n+    lc->pu.intra_pred_mode[1] = 1;\n+    lc->pu.intra_pred_mode[2] = 1;\n+    lc->pu.intra_pred_mode[3] = 1;\n+\n+    if (s->ps.pps->transquant_bypass_enable_flag) {\n+        lc->cu.cu_transquant_bypass_flag = ff_hevc_rpi_cu_transquant_bypass_flag_decode(lc);\n+        if (lc->cu.cu_transquant_bypass_flag)\n+            set_deblocking_bypass(s, x0, y0, log2_cb_size);\n+    }\n+\n+    if (s->sh.slice_type != HEVC_SLICE_I) {\n+        lc->cu.pred_mode = MODE_INTER;\n+        skip_flag = ff_hevc_rpi_skip_flag_decode(s, lc, x0, y0, x_cb, y_cb);\n+    }\n+\n+    if (skip_flag) {\n+        lc->cu.pred_mode = MODE_SKIP;\n+\n+        hls_prediction_unit(s, lc, x0, y0, cb_size, cb_size, log2_cb_size, 0, idx);\n+        intra_prediction_unit_default_value(s, lc, x0, y0, log2_cb_size);\n+\n+        if (!s->sh.disable_deblocking_filter_flag)\n+            ff_hevc_rpi_deblocking_boundary_strengths(s, lc, x0, y0, log2_cb_size, 0);\n+    } else {\n+        int pcm_flag = 0;\n+\n+        if (s->sh.slice_type != HEVC_SLICE_I)\n+            lc->cu.pred_mode = ff_hevc_rpi_pred_mode_decode(lc);\n+        if (lc->cu.pred_mode != MODE_INTRA ||\n+            log2_cb_size == s->ps.sps->log2_min_cb_size) {\n+            lc->cu.part_mode        = ff_hevc_rpi_part_mode_decode(s, lc, log2_cb_size);\n+            lc->cu.intra_split_flag = lc->cu.part_mode == PART_NxN &&\n+                                      lc->cu.pred_mode == MODE_INTRA;\n+        }\n+\n+        if (lc->cu.pred_mode == MODE_INTRA) {\n+            if (lc->cu.part_mode == PART_2Nx2N &&\n+                log2_cb_size <= s->ps.sps->pcm.log2_max_pcm_cb_size &&  // 0 if not enabled\n+                log2_cb_size >= s->ps.sps->pcm.log2_min_pcm_cb_size &&\n+                ff_hevc_rpi_pcm_flag_decode(lc) != 0)\n+            {\n+                int ret;\n+                pcm_flag = 1;\n+                intra_prediction_unit_default_value(s, lc, x0, y0, log2_cb_size);\n+                if ((ret = hls_pcm_sample(s, lc, x0, y0, log2_cb_size)) < 0)\n+                    return ret;\n+\n+                if (s->ps.sps->pcm.loop_filter_disable_flag)\n+                    set_deblocking_bypass(s, x0, y0, log2_cb_size);\n+            } else {\n+                intra_prediction_unit(s, lc, x0, y0, log2_cb_size);\n+            }\n+        } else {\n+            intra_prediction_unit_default_value(s, lc, x0, y0, log2_cb_size);\n+            switch (lc->cu.part_mode) {\n+            case PART_2Nx2N:\n+                hls_prediction_unit(s, lc, x0, y0, cb_size, cb_size, log2_cb_size, 0, idx);\n+                break;\n+            case PART_2NxN:\n+                hls_prediction_unit(s, lc, x0, y0,               cb_size, cb_size / 2, log2_cb_size, 0, idx);\n+                lc->cu.y_split = y0 + cb_size / 2;\n+                hls_prediction_unit(s, lc, x0, y0 + cb_size / 2, cb_size, cb_size / 2, log2_cb_size, 1, idx);\n+                break;\n+            case PART_Nx2N:\n+                hls_prediction_unit(s, lc, x0,               y0, cb_size / 2, cb_size, log2_cb_size, 0, idx - 1);\n+                lc->cu.x_split = x0 + cb_size / 2;\n+                hls_prediction_unit(s, lc, x0 + cb_size / 2, y0, cb_size / 2, cb_size, log2_cb_size, 1, idx - 1);\n+                break;\n+            case PART_2NxnU:\n+                hls_prediction_unit(s, lc, x0, y0,               cb_size, cb_size     / 4, log2_cb_size, 0, idx);\n+                lc->cu.y_split = y0 + cb_size / 4;\n+                hls_prediction_unit(s, lc, x0, y0 + cb_size / 4, cb_size, cb_size / 4 * 3, log2_cb_size, 1, idx);\n+                break;\n+            case PART_2NxnD:\n+                hls_prediction_unit(s, lc, x0, y0,                   cb_size, cb_size / 4 * 3, log2_cb_size, 0, idx);\n+                lc->cu.y_split = y0 + cb_size / 4 * 3;\n+                hls_prediction_unit(s, lc, x0, y0 + cb_size / 4 * 3, cb_size, cb_size     / 4, log2_cb_size, 1, idx);\n+                break;\n+            case PART_nLx2N:\n+                hls_prediction_unit(s, lc, x0,               y0, cb_size     / 4, cb_size, log2_cb_size, 0, idx - 2);\n+                lc->cu.x_split = x0 + cb_size / 4;\n+                hls_prediction_unit(s, lc, x0 + cb_size / 4, y0, cb_size * 3 / 4, cb_size, log2_cb_size, 1, idx - 2);\n+                break;\n+            case PART_nRx2N:\n+                hls_prediction_unit(s, lc, x0,                   y0, cb_size / 4 * 3, cb_size, log2_cb_size, 0, idx - 2);\n+                lc->cu.x_split = x0 + cb_size / 4 * 3;\n+                hls_prediction_unit(s, lc, x0 + cb_size / 4 * 3, y0, cb_size     / 4, cb_size, log2_cb_size, 1, idx - 2);\n+                break;\n+            case PART_NxN:\n+                hls_prediction_unit(s, lc, x0,               y0,               cb_size / 2, cb_size / 2, log2_cb_size, 0, idx - 1);\n+                lc->cu.x_split = x0 + cb_size / 2;\n+                hls_prediction_unit(s, lc, x0 + cb_size / 2, y0,               cb_size / 2, cb_size / 2, log2_cb_size, 1, idx - 1);\n+                lc->cu.y_split = y0 + cb_size / 2;\n+                hls_prediction_unit(s, lc, x0,               y0 + cb_size / 2, cb_size / 2, cb_size / 2, log2_cb_size, 2, idx - 1);\n+                hls_prediction_unit(s, lc, x0 + cb_size / 2, y0 + cb_size / 2, cb_size / 2, cb_size / 2, log2_cb_size, 3, idx - 1);\n+                break;\n+            }\n+        }\n+\n+        if (!pcm_flag) {\n+            int rqt_root_cbf = 1;\n+\n+            if (lc->cu.pred_mode != MODE_INTRA &&\n+                !(lc->cu.part_mode == PART_2Nx2N && lc->pu.merge_flag)) {\n+                rqt_root_cbf = ff_hevc_rpi_no_residual_syntax_flag_decode(lc);\n+            }\n+            if (rqt_root_cbf) {\n+                const unsigned int cbf_c = ctx_cfmt(s) == 0 ? 0 : (CBF_CR0 | CBF_CB0);\n+                int ret;\n+\n+                lc->cu.max_trafo_depth = lc->cu.pred_mode == MODE_INTRA ?\n+                                         s->ps.sps->max_transform_hierarchy_depth_intra + lc->cu.intra_split_flag :\n+                                         s->ps.sps->max_transform_hierarchy_depth_inter;\n+                // transform_tree does deblock_boundary_strengths\n+                ret = hls_transform_tree(s, lc, x0, y0,\n+                                         log2_cb_size, 0, 0, cbf_c);\n+                if (ret < 0)\n+                    return ret;\n+            } else {\n+                if (!s->sh.disable_deblocking_filter_flag)\n+                    ff_hevc_rpi_deblocking_boundary_strengths(s, lc, x0, y0, log2_cb_size, 0);\n+            }\n+        }\n+    }\n+\n+    // If the delta is still wanted then we haven't read the delta & therefore need to set qp here\n+    if (lc->tu.is_cu_qp_delta_wanted)\n+        ff_hevc_rpi_set_qPy(s, lc, x0, y0);\n+\n+    if(((x0 + (1<<log2_cb_size)) & qp_block_mask) == 0 &&\n+       ((y0 + (1<<log2_cb_size)) & qp_block_mask) == 0) {\n+        lc->qPy_pred = lc->qp_y;\n+    }\n+\n+    set_bytes(s->qp_y_tab + y_cb * min_cb_width + x_cb, min_cb_width, log2_cb_size - log2_min_cb_size, lc->qp_y & 0xff);\n+\n+    set_stash2(s->cabac_stash_up + (x0 >> 3), s->cabac_stash_left + (y0 >> 3), log2_cb_size - 3, (lc->ct_depth << 1) | skip_flag);\n+\n+    return 0;\n+}\n+\n+// Returns:\n+//  < 0  Error\n+//  0    More data wanted\n+//  1    EoSlice / EoPicture\n+static int hls_coding_quadtree(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, const int x0, const int y0,\n+                               const int log2_cb_size, const unsigned int cb_depth)\n+{\n+    const int cb_size    = 1 << log2_cb_size;\n+    int ret;\n+    int split_cu;\n+\n+    lc->ct_depth = cb_depth;\n+    split_cu = (log2_cb_size > s->ps.sps->log2_min_cb_size);\n+    if (x0 + cb_size <= s->ps.sps->width  &&\n+        y0 + cb_size <= s->ps.sps->height &&\n+        split_cu)\n+    {\n+        split_cu = ff_hevc_rpi_split_coding_unit_flag_decode(s, lc, cb_depth, x0, y0);\n+    }\n+\n+    // Qp delta (and offset) need to remain wanted if cb_size < min until\n+    // a coded block is found so we still initial state at depth 0 (outside\n+    // this fn) and only reset here\n+    if (s->ps.pps->cu_qp_delta_enabled_flag &&\n+        log2_cb_size >= s->ps.pps->log2_min_cu_qp_delta_size)\n+    {\n+        lc->tu.is_cu_qp_delta_wanted = 1;\n+        lc->tu.cu_qp_delta          = 0;\n+    }\n+    if (s->sh.cu_chroma_qp_offset_enabled_flag &&\n+        log2_cb_size >= s->ps.pps->log2_min_cu_qp_delta_size)\n+    {\n+        lc->tu.cu_chroma_qp_offset_wanted = 1;\n+    }\n+\n+    lc->tu.qp_divmod6[0] = s->ps.pps->qp_bd_x[0];\n+    lc->tu.qp_divmod6[1] = s->ps.pps->qp_bd_x[1] + s->sh.slice_cb_qp_offset;\n+    lc->tu.qp_divmod6[2] = s->ps.pps->qp_bd_x[2] + s->sh.slice_cr_qp_offset;\n+\n+    if (split_cu) {\n+        int qp_block_mask = (1 << s->ps.pps->log2_min_cu_qp_delta_size) - 1;\n+        const int cb_size_split = cb_size >> 1;\n+        const int x1 = x0 + cb_size_split;\n+        const int y1 = y0 + cb_size_split;\n+\n+        int more_data = 0;\n+\n+        more_data = hls_coding_quadtree(s, lc, x0, y0, log2_cb_size - 1, cb_depth + 1);\n+        if (more_data < 0)\n+            return more_data;\n+\n+        if (more_data && x1 < s->ps.sps->width) {\n+            more_data = hls_coding_quadtree(s, lc, x1, y0, log2_cb_size - 1, cb_depth + 1);\n+            if (more_data < 0)\n+                return more_data;\n+        }\n+        if (more_data && y1 < s->ps.sps->height) {\n+            more_data = hls_coding_quadtree(s, lc, x0, y1, log2_cb_size - 1, cb_depth + 1);\n+            if (more_data < 0)\n+                return more_data;\n+        }\n+        if (more_data && x1 < s->ps.sps->width &&\n+            y1 < s->ps.sps->height) {\n+            more_data = hls_coding_quadtree(s, lc, x1, y1, log2_cb_size - 1, cb_depth + 1);\n+            if (more_data < 0)\n+                return more_data;\n+        }\n+\n+        if(((x0 + (1<<log2_cb_size)) & qp_block_mask) == 0 &&\n+            ((y0 + (1<<log2_cb_size)) & qp_block_mask) == 0)\n+            lc->qPy_pred = lc->qp_y;\n+\n+        if (more_data)\n+            return ((x1 + cb_size_split) < s->ps.sps->width ||\n+                    (y1 + cb_size_split) < s->ps.sps->height);\n+        else\n+            return 0;\n+    } else {\n+        ret = hls_coding_unit(s, lc, x0, y0, log2_cb_size);\n+        if (ret < 0)\n+            return ret;\n+        if ((!((x0 + cb_size) %\n+               (1 << (s->ps.sps->log2_ctb_size))) ||\n+             (x0 + cb_size >= s->ps.sps->width)) &&\n+            (!((y0 + cb_size) %\n+               (1 << (s->ps.sps->log2_ctb_size))) ||\n+             (y0 + cb_size >= s->ps.sps->height))) {\n+            int end_of_slice_flag = ff_hevc_rpi_get_cabac_terminate(&lc->cc);\n+            return !end_of_slice_flag;\n+        } else {\n+            return 1;\n+        }\n+    }\n+\n+    return 0;  // NEVER\n+}\n+\n+static void hls_decode_neighbour(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+                                 const int x_ctb, const int y_ctb, const int ctb_addr_ts)\n+{\n+    const unsigned int ctb_size          = 1 << s->ps.sps->log2_ctb_size;\n+    const unsigned int ctb_addr_rs       = s->ps.pps->ctb_addr_ts_to_rs[ctb_addr_ts];\n+    const unsigned int ctb_addr_rs_in_slice = ctb_addr_rs - s->sh.slice_addr;  // slice_addr = RS addr of start of slice\n+    const unsigned int ctb_flags = s->ps.pps->ctb_ts_flags[ctb_addr_ts];\n+    const unsigned int line_w = s->ps.sps->ctb_width;\n+\n+    s->tab_slice_address[ctb_addr_rs] = s->sh.slice_addr;\n+\n+    lc->end_of_ctb_x = FFMIN(x_ctb + ctb_size, s->ps.sps->width);\n+    lc->end_of_ctb_y = FFMIN(y_ctb + ctb_size, s->ps.sps->height);\n+\n+    lc->boundary_flags = 0;\n+\n+    if ((ctb_flags & CTB_TS_FLAGS_SOTL) != 0)\n+        lc->boundary_flags |= BOUNDARY_LEFT_TILE;\n+    if (x_ctb > 0 && s->tab_slice_address[ctb_addr_rs] != s->tab_slice_address[ctb_addr_rs - 1])\n+        lc->boundary_flags |= BOUNDARY_LEFT_SLICE;\n+    if ((ctb_flags & CTB_TS_FLAGS_TOT) != 0)\n+        lc->boundary_flags |= BOUNDARY_UPPER_TILE;\n+    if (y_ctb > 0 && s->tab_slice_address[ctb_addr_rs] != s->tab_slice_address[ctb_addr_rs - line_w])\n+        lc->boundary_flags |= BOUNDARY_UPPER_SLICE;\n+\n+    // Use line width rather than tile width for addr_in_slice test as\n+    // addr_in_slice is in raster units\n+\n+    lc->ctb_avail =\n+        ((lc->boundary_flags & (BOUNDARY_LEFT_SLICE | BOUNDARY_LEFT_TILE)) == 0 ? AVAIL_L : 0) |\n+        ((lc->boundary_flags & (BOUNDARY_UPPER_SLICE | BOUNDARY_UPPER_TILE)) == 0 ? AVAIL_U : 0) |\n+        ((lc->boundary_flags & (BOUNDARY_LEFT_TILE | BOUNDARY_UPPER_TILE)) == 0 &&\n+            (ctb_addr_rs_in_slice > line_w) ? AVAIL_UL : 0) |\n+        ((ctb_flags & (CTB_TS_FLAGS_EOTL | CTB_TS_FLAGS_TOT)) == 0 &&\n+            (ctb_addr_rs_in_slice + 1 >= line_w) ? AVAIL_UR : 0);\n+    // Down-left never avail at CTB level\n+}\n+\n+\n+static void rpi_execute_dblk_cmds(const HEVCRpiContext * const s, HEVCRpiJob * const jb)\n+{\n+    int y = ff_hevc_rpi_hls_filter_blk(s, jb->bounds,\n+        (s->ps.pps->ctb_ts_flags[jb->ctu_ts_last] & CTB_TS_FLAGS_EOT) != 0);\n+\n+    // Signal\n+    if (y > 0) {\n+        // Cast away const as progress is held in s, but this really shouldn't confuse anything\n+        ff_hevc_rpi_progress_signal_recon((HEVCRpiContext *)s, y - 1);\n+    }\n+\n+    // Job done now\n+    // ? Move outside this fn\n+    job_free(s->jbc, jb);\n+}\n+\n+// I-pred, transform_and_add for all blocks types done here\n+// All ARM\n+static void rpi_execute_pred_cmds(const HEVCRpiContext * const s, HEVCRpiJob * const jb)\n+{\n+    unsigned int i;\n+    HEVCRpiIntraPredEnv * const iap = &jb->intra;\n+    const HEVCPredCmd *cmd = iap->cmds;\n+\n+#if !RPI_WORKER_WAIT_PASS_0\n+    rpi_sem_wait(&jb->sem);\n+    rpi_cache_flush_execute(jb->rfe);  // Invalidate data set up in pass1\n+#endif\n+\n+    for (i = iap->n; i > 0; i--, cmd++)\n+    {\n+        switch (cmd->type)\n+        {\n+            case RPI_PRED_INTRA:\n+                s->hpc.intra_pred(s, cmd->i_pred.mode, cmd->i_pred.x, cmd->i_pred.y, cmd->avail, cmd->size);\n+                break;\n+            case RPI_PRED_INTRA_C:\n+                s->hpc.intra_pred_c(s, cmd->i_pred.mode, cmd->i_pred.x, cmd->i_pred.y, cmd->avail, cmd->size);\n+                break;\n+            case RPI_PRED_ADD_RESIDUAL:\n+                s->hevcdsp.add_residual[cmd->size - 2](cmd->ta.dst, (int16_t *)cmd->ta.buf, cmd->ta.stride);\n+                break;\n+            case RPI_PRED_ADD_DC:\n+                s->hevcdsp.add_residual_dc[cmd->size - 2](cmd->dc.dst, cmd->dc.stride, cmd->dc.dc);\n+                break;\n+            case RPI_PRED_ADD_RESIDUAL_U:\n+                s->hevcdsp.add_residual_u[cmd->size - 2](cmd->ta.dst, (int16_t *)cmd->ta.buf, cmd->ta.stride, cmd->ta.dc);\n+                break;\n+            case RPI_PRED_ADD_RESIDUAL_V:\n+                s->hevcdsp.add_residual_v[cmd->size - 2](cmd->ta.dst, (int16_t *)cmd->ta.buf, cmd->ta.stride, cmd->ta.dc);\n+                break;\n+            case RPI_PRED_ADD_RESIDUAL_C:\n+                s->hevcdsp.add_residual_c[cmd->size - 2](cmd->ta.dst, (int16_t *)cmd->ta.buf, cmd->ta.stride);\n+                break;\n+            case RPI_PRED_ADD_DC_U:\n+            case RPI_PRED_ADD_DC_V:\n+                s->hevcdsp.add_residual_dc_c[cmd->size - 2](cmd->dc.dst, cmd->dc.stride, cmd->dc.dc);\n+                break;\n+\n+            case RPI_PRED_I_PCM:\n+                pcm_extract(s, cmd->i_pcm.src, cmd->i_pcm.src_len, cmd->i_pcm.x, cmd->i_pcm.y, 1 << cmd->size);\n+                break;\n+\n+            default:\n+                av_log(s->avctx, AV_LOG_PANIC, \"Bad command %d in worker pred Q\\n\", cmd->type);\n+                abort();\n+        }\n+    }\n+\n+    // Mark done\n+    iap->n = 0;\n+}\n+\n+\n+// Set initial uniform job values & zero ctu_count\n+static void rpi_begin(const HEVCRpiContext * const s, HEVCRpiJob * const jb, const unsigned int ctu_ts_first)\n+{\n+    unsigned int i;\n+    HEVCRpiInterPredEnv *const cipe = &jb->chroma_ip;\n+    HEVCRpiInterPredEnv *const yipe = &jb->luma_ip;\n+    const HEVCRpiSPS * const sps = s->ps.sps;\n+\n+    const uint16_t pic_width_y   = sps->width;\n+    const uint16_t pic_height_y  = sps->height;\n+\n+    const uint16_t pic_width_c   = sps->width >> ctx_hshift(s, 1);\n+    const uint16_t pic_height_c  = sps->height >> ctx_vshift(s, 1);\n+\n+    // We expect the pointer to change if we use another sps\n+    if (sps != jb->sps)\n+    {\n+        worker_pic_free_one(jb);\n+\n+        set_ipe_from_ici(cipe, &ipe_init_infos[s->ps.sps->bit_depth - 8].chroma);\n+        set_ipe_from_ici(yipe, &ipe_init_infos[s->ps.sps->bit_depth - 8].luma);\n+\n+        {\n+            const int coefs_per_luma = HEVC_MAX_CTB_SIZE * HEVC_RPI_MAX_WIDTH;\n+            const int coefs_per_chroma = (coefs_per_luma * 2) >> (ctx_vshift(s, 1) + ctx_hshift(s, 1));\n+            worker_pic_alloc_one(jb, coefs_per_luma + coefs_per_chroma);\n+        }\n+\n+        jb->sps = sps;\n+    }\n+\n+    jb->waited = 0;\n+    jb->ctu_ts_first = ctu_ts_first;\n+    jb->ctu_ts_last = -1;\n+\n+    rpi_inter_pred_reset(cipe);\n+    for (i = 0; i < cipe->n; i++) {\n+        HEVCRpiInterPredQ * const cp = cipe->q + i;\n+        qpu_mc_pred_c_s_t * const u = &cp->qpu_mc_base->c.s;\n+\n+        u->next_src1.x = 0;\n+        u->next_src1.y = 0;\n+        u->next_src1.base = 0;\n+        u->pic_cw = pic_width_c;\n+        u->pic_ch = pic_height_c;\n+        u->stride2 = av_rpi_sand_frame_stride2(s->frame);\n+        u->stride1 = av_rpi_sand_frame_stride1(s->frame);\n+        cp->last_l0 = &u->next_src1;\n+\n+        u->next_fn = 0;\n+        u->next_src2.x = 0;\n+        u->next_src2.y = 0;\n+        u->next_src2.base = 0;\n+        cp->last_l1 = &u->next_src2;\n+\n+        cp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(u + 1);\n+    }\n+\n+    rpi_inter_pred_reset(yipe);\n+    for (i = 0; i < yipe->n; i++) {\n+        HEVCRpiInterPredQ * const yp = yipe->q + i;\n+        qpu_mc_pred_y_s_t * const y = &yp->qpu_mc_base->y.s;\n+\n+        y->next_src1.x = 0;\n+        y->next_src1.y = 0;\n+        y->next_src1.base = 0;\n+        y->next_src2.x = 0;\n+        y->next_src2.y = 0;\n+        y->next_src2.base = 0;\n+        y->pic_h = pic_height_y;\n+        y->pic_w = pic_width_y;\n+        y->stride2 = av_rpi_sand_frame_stride2(s->frame);\n+        y->stride1 = av_rpi_sand_frame_stride1(s->frame);\n+        y->next_fn = 0;\n+        yp->last_l0 = &y->next_src1;\n+        yp->last_l1 = &y->next_src2;\n+\n+        yp->qpu_mc_curr = (qpu_mc_pred_cmd_t *)(y + 1);\n+    }\n+\n+    jb->last_y8_p = NULL;\n+    jb->last_y8_l1 = NULL;\n+\n+    for (i = 0; i != FF_ARRAY_ELEMS(jb->progress_req); ++i) {\n+        jb->progress_req[i] = -1;\n+    }\n+\n+    worker_pic_reset(&jb->coeffs);\n+}\n+\n+\n+#if !RPI_QPU_EMU_Y || !RPI_QPU_EMU_C\n+static unsigned int mc_terminate_add_qpu(const HEVCRpiContext * const s,\n+                                     const vpu_qpu_job_h vqj,\n+                                     rpi_cache_flush_env_t * const rfe,\n+                                     HEVCRpiInterPredEnv * const ipe)\n+{\n+    unsigned int i;\n+    uint32_t mail[QPU_N_MAX][QPU_MAIL_EL_VALS];\n+    unsigned int max_block = 0;\n+\n+    if (!ipe->used) {\n+        return 0;\n+    }\n+\n+    if (ipe->curr != 0) {\n+        rpi_inter_pred_sync(ipe);\n+    }\n+\n+    // Add final commands to Q\n+    for(i = 0; i != ipe->n; ++i) {\n+        HEVCRpiInterPredQ * const yp = ipe->q + i;\n+        qpu_mc_src_t *const p0 = yp->last_l0;\n+        qpu_mc_src_t *const p1 = yp->last_l1;\n+        const unsigned int block_size = (char *)yp->qpu_mc_curr - (char *)yp->qpu_mc_base;\n+\n+        if (block_size > max_block)\n+            max_block = block_size;\n+\n+        qpu_mc_link_set(yp->qpu_mc_curr, yp->code_exit);\n+\n+        // Need to set the srcs for L0 & L1 to something that can be (pointlessly) prefetched\n+        p0->x = MC_DUMMY_X;\n+        p0->y = MC_DUMMY_Y;\n+        p0->base = s->qpu_dummy_frame_qpu;\n+        p1->x = MC_DUMMY_X;\n+        p1->y = MC_DUMMY_Y;\n+        p1->base = s->qpu_dummy_frame_qpu;\n+\n+        yp->last_l0 = NULL;\n+        yp->last_l1 = NULL;\n+\n+        // Add to mailbox list\n+        mail[i][0] = ipe->gptr.vc + ((uint8_t *)yp->qpu_mc_base - ipe->gptr.arm);\n+        mail[i][1] = yp->code_setup;\n+    }\n+\n+    // We don't need invalidate here as the uniforms aren't changed by the QPU\n+    // and leaving them in ARM cache avoids (pointless) pre-reads when writing\n+    // new values which seems to give us a small performance advantage\n+    //\n+    // In most cases we will not have a completely packed set of uniforms and as\n+    // we have a 2d invalidate we writeback all uniform Qs to the depth of the\n+    // fullest\n+    rpi_cache_flush_add_gm_blocks(rfe, &ipe->gptr, RPI_CACHE_FLUSH_MODE_WRITEBACK,\n+                                  (uint8_t *)ipe->q[0].qpu_mc_base - ipe->gptr.arm, max_block,\n+                                  ipe->n, ipe->max_fill + ipe->min_gap);\n+    vpu_qpu_job_add_qpu(vqj, ipe->n, (uint32_t *)mail);\n+\n+    return 1;\n+}\n+#endif\n+\n+#if RPI_QPU_EMU_Y || RPI_QPU_EMU_C\n+static unsigned int mc_terminate_add_emu(const HEVCRpiContext * const s,\n+                                     const vpu_qpu_job_h vqj,\n+                                     rpi_cache_flush_env_t * const rfe,\n+                                     HEVCRpiInterPredEnv * const ipe)\n+{\n+    unsigned int i;\n+    if (!ipe->used) {\n+        return 0;\n+    }\n+\n+    if (ipe->curr != 0) {\n+        rpi_inter_pred_sync(ipe);\n+    }\n+\n+    // Add final commands to Q\n+    for(i = 0; i != ipe->n; ++i) {\n+        HEVCRpiInterPredQ * const yp = ipe->q + i;\n+        qpu_mc_src_t *const p0 = yp->last_l0;\n+        qpu_mc_src_t *const p1 = yp->last_l1;\n+\n+        yp->qpu_mc_curr->data[-1] = yp->code_exit;\n+\n+        // Need to set the srcs for L0 & L1 to something that can be (pointlessly) prefetched\n+        p0->x = MC_DUMMY_X;\n+        p0->y = MC_DUMMY_Y;\n+        p0->base = s->qpu_dummy_frame_emu;\n+        p1->x = MC_DUMMY_X;\n+        p1->y = MC_DUMMY_Y;\n+        p1->base = s->qpu_dummy_frame_emu;\n+\n+        yp->last_l0 = NULL;\n+        yp->last_l1 = NULL;\n+    }\n+\n+    return 1;\n+}\n+#endif\n+\n+\n+#if RPI_QPU_EMU_Y\n+#define mc_terminate_add_y mc_terminate_add_emu\n+#else\n+#define mc_terminate_add_y mc_terminate_add_qpu\n+#endif\n+#if RPI_QPU_EMU_C\n+#define mc_terminate_add_c mc_terminate_add_emu\n+#else\n+#define mc_terminate_add_c mc_terminate_add_qpu\n+#endif\n+\n+\n+static void flush_frame(HEVCRpiContext *s,AVFrame *frame)\n+{\n+    rpi_cache_buf_t cbuf;\n+    rpi_cache_flush_env_t * rfe = rpi_cache_flush_init(&cbuf);\n+    rpi_cache_flush_add_frame(rfe, frame, RPI_CACHE_FLUSH_MODE_WB_INVALIDATE);\n+    rpi_cache_flush_finish(rfe);\n+}\n+\n+static void job_gen_bounds(const HEVCRpiContext * const s, HEVCRpiJob * const jb)\n+{\n+    const unsigned int rs0 = s->ps.pps->ctb_addr_ts_to_rs[jb->ctu_ts_first];\n+    const unsigned int rs1 = s->ps.pps->ctb_addr_ts_to_rs[jb->ctu_ts_last];\n+    const unsigned int ctb_width = s->ps.sps->ctb_width;\n+    RpiBlk *const bounds = &jb->bounds;\n+    av_assert1(jb->ctu_ts_first <= jb->ctu_ts_last);\n+    bounds->x = (rs0 % ctb_width) << s->ps.sps->log2_ctb_size;\n+    bounds->y = (rs0 / ctb_width) << s->ps.sps->log2_ctb_size;\n+    bounds->w = ((rs1 - rs0) % ctb_width + 1) << s->ps.sps->log2_ctb_size;\n+    bounds->h = ((rs1 - rs0) / ctb_width + 1) << s->ps.sps->log2_ctb_size;\n+\n+    bounds->w = FFMIN(bounds->w, s->ps.sps->width - bounds->x);\n+    bounds->h = FFMIN(bounds->h, s->ps.sps->height - bounds->y);\n+}\n+\n+#if RPI_PASSES == 2\n+static void worker_core2(HEVCRpiContext * const s, HEVCRpiJob * const jb)\n+{\n+    // Perform intra prediction and residual reconstruction\n+    rpi_execute_pred_cmds(s, jb);\n+\n+    // Perform deblocking for CTBs in this row\n+    rpi_execute_dblk_cmds(s, jb);\n+}\n+#endif\n+\n+// Core execution tasks\n+static void worker_core(const HEVCRpiContext * const s, HEVCRpiJob * const jb)\n+{\n+    int pred_y, pred_c;\n+    vpu_qpu_job_env_t qvbuf;\n+    const vpu_qpu_job_h vqj = vpu_qpu_job_init(&qvbuf);\n+#if RPI_WORKER_WAIT_PASS_0\n+    int do_wait;\n+#endif\n+\n+    {\n+        const HEVCRpiCoeffsEnv * const cf = &jb->coeffs;\n+        if (cf->s[3].n + cf->s[2].n != 0)\n+        {\n+            const unsigned int csize = sizeof(cf->s[3].buf[0]);\n+            const unsigned int offset32 = ((cf->s[3].buf - cf->s[2].buf) - cf->s[3].n) * csize;\n+            unsigned int n16 = (cf->s[2].n >> 8);\n+            unsigned int n32 = (cf->s[3].n >> 10);\n+#if RPI_COMPRESS_COEFFS\n+            if (cf->s[2].packed) {\n+                n16 = n16 | (n16<<16);\n+            } else {\n+                const unsigned int npack16 = (cf->s[2].packed_n>>8);\n+                n16 = n16 | (npack16<<16);\n+            }\n+            if (cf->s[3].packed) {\n+                n32 = n32 | (n32<<16);\n+            } else {\n+                const unsigned int npack32 = (cf->s[3].packed_n>>10);\n+                n32 = n32 | (npack32<<16);\n+            }\n+#endif\n+            vpu_qpu_job_add_vpu(vqj,\n+                vpu_get_fn(s->ps.sps->bit_depth),\n+                vpu_get_constants(),\n+                cf->gptr.vc,\n+                n16,\n+                cf->gptr.vc + offset32,\n+                n32,\n+                0);\n+\n+            rpi_cache_flush_add_gm_range(jb->rfe, &cf->gptr, RPI_CACHE_FLUSH_MODE_WB_INVALIDATE, 0, cf->s[2].n * csize);\n+            rpi_cache_flush_add_gm_range(jb->rfe, &cf->gptr, RPI_CACHE_FLUSH_MODE_WB_INVALIDATE, offset32, cf->s[3].n * csize);\n+        }\n+    }\n+\n+    pred_c = mc_terminate_add_c(s, vqj, jb->rfe, &jb->chroma_ip);\n+\n+// We could take a sync here and try to locally overlap QPU processing with ARM\n+// but testing showed a slightly negative benefit with noticable extra complexity\n+\n+    pred_y = mc_terminate_add_y(s, vqj, jb->rfe, &jb->luma_ip);\n+\n+    // Returns 0 if nothing to do, 1 if sync added\n+#if RPI_WORKER_WAIT_PASS_0\n+    do_wait = vpu_qpu_job_add_sync_sem(vqj, &jb->sem);\n+#else\n+    if (vpu_qpu_job_add_sync_sem(vqj, &jb->sem) == 0)\n+        sem_post(&jb->sem);\n+#endif\n+\n+    rpi_cache_flush_execute(jb->rfe);\n+\n+    // Await progress as required\n+    // jb->waited will only be clear if we have already tested the progress values\n+    // (in worker_submit_job) and found we don't have to wait\n+    if (jb->waited)\n+    {\n+        unsigned int i;\n+        for (i = 0; i != FF_ARRAY_ELEMS(jb->progress_req); ++i) {\n+            if (jb->progress_req[i] >= 0) {\n+                ff_hevc_rpi_progress_wait_recon(s, jb, s->DPB + i, jb->progress_req[i]);\n+            }\n+        }\n+    }\n+\n+    vpu_qpu_job_finish(vqj);\n+\n+    // We always work on a rectangular block\n+    if (pred_y || pred_c)\n+    {\n+        rpi_cache_flush_add_frame_block(jb->rfe, s->frame, RPI_CACHE_FLUSH_MODE_INVALIDATE,\n+                                        jb->bounds.x, jb->bounds.y, jb->bounds.w, jb->bounds.h,\n+                                        ctx_vshift(s, 1), pred_y, pred_c);\n+    }\n+\n+    // If we have emulated VPU ops - do it here\n+#if RPI_QPU_EMU_Y || RPI_QPU_EMU_C\n+    if (av_rpi_is_sand8_frame(s->frame))\n+    {\n+#if RPI_QPU_EMU_Y && RPI_QPU_EMU_C\n+        ff_hevc_rpi_shader_c8(s, &jb->luma_ip, &jb->chroma_ip);\n+#elif RPI_QPU_EMU_Y\n+        ff_hevc_rpi_shader_c8(s, &jb->luma_ip, NULL);\n+#else\n+        ff_hevc_rpi_shader_c8(s, NULL, &jb->chroma_ip);\n+#endif\n+    }\n+    else\n+    {\n+#if RPI_QPU_EMU_Y && RPI_QPU_EMU_C\n+        ff_hevc_rpi_shader_c16(s, &jb->luma_ip, &jb->chroma_ip);\n+#elif RPI_QPU_EMU_Y\n+        ff_hevc_rpi_shader_c16(s, &jb->luma_ip, NULL);\n+#else\n+        ff_hevc_rpi_shader_c16(s, NULL, &jb->chroma_ip);\n+#endif\n+    }\n+#endif\n+\n+#if RPI_WORKER_WAIT_PASS_0\n+    if (do_wait)\n+        rpi_sem_wait(&jb->sem);\n+    rpi_cache_flush_execute(jb->rfe);\n+#endif\n+}\n+\n+\n+static void rpi_free_inter_pred(HEVCRpiInterPredEnv * const ipe)\n+{\n+    av_freep(&ipe->q);\n+    gpu_free(&ipe->gptr);\n+}\n+\n+static HEVCRpiJob * job_new(void)\n+{\n+    HEVCRpiJob * const jb = av_mallocz(sizeof(HEVCRpiJob));\n+\n+    if (jb == NULL)\n+        return NULL;\n+\n+    sem_init(&jb->sem, 0, 0);\n+    jb->rfe = rpi_cache_flush_init(&jb->flush_buf);\n+    ff_hevc_rpi_progress_init_wait(&jb->progress_wait);\n+\n+    jb->intra.n = 0;\n+    if ((jb->intra.cmds = av_mallocz(sizeof(HEVCPredCmd) * RPI_MAX_PRED_CMDS)) == NULL)\n+        goto fail1;\n+\n+    // * Sizeof the union structure might be overkill but at the moment it\n+    //   is correct (it certainly isn't going to be too small)\n+    // Set max fill to slack/2 from the end of the Q\n+    // If we exceed this in any Q then we will schedule by size (which should\n+    // mean that we never use that Q again part from syncs)\n+    // * Given how agressive the overflow resonse is we could maybe put the\n+    //   threshold even nearer the end, but I don't expect us to ever hit\n+    //   it on any real stream anyway.\n+\n+    if (rpi_inter_pred_alloc(&jb->chroma_ip,\n+                         QPU_N_MAX, QPU_N_GRP,\n+                         QPU_C_COMMANDS * sizeof(qpu_mc_pred_c_t) + QPU_C_SYNCS * sizeof(uint32_t),\n+                         QPU_C_CMD_SLACK_PER_Q * sizeof(qpu_mc_pred_c_t) / 2) != 0)\n+        goto fail2;\n+    if (rpi_inter_pred_alloc(&jb->luma_ip,\n+                         QPU_N_MAX,  QPU_N_GRP,\n+                         QPU_Y_COMMANDS * sizeof(qpu_mc_pred_y_t) + QPU_Y_SYNCS * sizeof(uint32_t),\n+                         QPU_Y_CMD_SLACK_PER_Q * sizeof(qpu_mc_pred_y_t) / 2) != 0)\n+        goto fail3;\n+\n+    return jb;\n+\n+fail3:\n+    rpi_free_inter_pred(&jb->luma_ip);\n+fail2:\n+    av_freep(&jb->intra.cmds);\n+fail1:\n+    ff_hevc_rpi_progress_kill_wait(&jb->progress_wait);\n+    rpi_cache_flush_finish(jb->rfe);\n+    sem_destroy(&jb->sem);\n+    return NULL;\n+}\n+\n+static void job_delete(HEVCRpiJob * const jb)\n+{\n+    worker_pic_free_one(jb);\n+    ff_hevc_rpi_progress_kill_wait(&jb->progress_wait);\n+    rpi_free_inter_pred(&jb->chroma_ip);\n+    rpi_free_inter_pred(&jb->luma_ip);\n+    av_freep(&jb->intra.cmds);\n+    rpi_cache_flush_finish(jb->rfe);  // Not really needed - should do nothing\n+    sem_destroy(&jb->sem);\n+    av_free(jb);\n+}\n+\n+static void jbg_delete(HEVCRpiJobGlobal * const jbg)\n+{\n+    HEVCRpiJob * jb;\n+\n+    if (jbg == NULL)\n+        return;\n+\n+    jb = jbg->free1;\n+    while (jb != NULL)\n+    {\n+        HEVCRpiJob * const jb2 = jb;\n+        jb = jb2->next;\n+        job_delete(jb2);\n+    }\n+\n+    pthread_mutex_destroy(&jbg->lock);\n+    av_free(jbg);\n+}\n+\n+static HEVCRpiJobGlobal * jbg_new(unsigned int job_count)\n+{\n+    HEVCRpiJobGlobal * const jbg = av_mallocz(sizeof(HEVCRpiJobGlobal));\n+    if (jbg == NULL)\n+        return NULL;\n+\n+    pthread_mutex_init(&jbg->lock, NULL);\n+\n+    while (job_count-- != 0)\n+    {\n+        HEVCRpiJob * const jb = job_new();\n+        if (jb == NULL)\n+            goto fail;\n+\n+        jb->next = jbg->free1;\n+        jbg->free1 = jb;\n+    }\n+\n+    return jbg;\n+\n+fail:\n+    jbg_delete(jbg);\n+    return NULL;\n+}\n+\n+static void rpi_job_ctl_delete(HEVCRpiJobCtl * const jbc)\n+{\n+    HEVCRpiJobGlobal * jbg;\n+\n+    if (jbc == NULL)\n+        return;\n+\n+    jbg = jbc->jbg;\n+\n+    if (jbc->jb1 != NULL)\n+        job_delete(jbc->jb1);\n+\n+    pthread_mutex_destroy(&jbc->in_lock);\n+    sem_destroy(&jbc->sem_out);\n+    av_free(jbc);\n+\n+    // Deref the global job context\n+    if (jbg != NULL && atomic_fetch_add(&jbg->ref_count, -1) == 1)\n+        jbg_delete(jbg);\n+}\n+\n+static HEVCRpiJobCtl * rpi_job_ctl_new(HEVCRpiJobGlobal *const jbg)\n+{\n+    HEVCRpiJobCtl * const jbc = av_mallocz(sizeof(HEVCRpiJobCtl));\n+\n+    if (jbc == NULL)\n+        return NULL;\n+\n+    jbc->jbg = jbg;\n+    atomic_fetch_add(&jbg->ref_count, 1);\n+\n+    sem_init(&jbc->sem_out, 0, RPI_MAX_JOBS);\n+    pthread_mutex_init(&jbc->in_lock, NULL);\n+\n+    if ((jbc->jb1 = job_new()) == NULL)\n+        goto fail;\n+    jbc->jb1->jbc_local = jbc;\n+\n+    return jbc;\n+\n+fail:\n+    rpi_job_ctl_delete(jbc);\n+    return NULL;\n+}\n+\n+\n+\n+static av_cold void hevc_init_worker(HEVCRpiContext * const s)\n+{\n+#if RPI_PASSES == 2\n+    pass_queue_init(s->passq + 1, s, worker_core2, &s->jbc->sem_out, 1);\n+#elif RPI_PASSES == 3\n+    pass_queue_init(s->passq + 2, s, rpi_execute_dblk_cmds, &s->jbc->sem_out, 2);\n+    pass_queue_init(s->passq + 1, s, rpi_execute_pred_cmds, &s->passq[2].sem_in, 1);\n+#else\n+#error Passes confused\n+#endif\n+    pass_queue_init(s->passq + 0, s, worker_core, &s->passq[1].sem_in, 0);\n+\n+    pass_queues_start_all(s);\n+}\n+\n+static av_cold void hevc_exit_worker(HEVCRpiContext *s)\n+{\n+    pass_queues_term_all(s);\n+\n+    pass_queues_kill_all(s);\n+\n+    rpi_job_ctl_delete(s->jbc);\n+    s->jbc = NULL;\n+}\n+\n+\n+static int slice_start(const HEVCRpiContext * const s, HEVCRpiLocalContext *const lc)\n+{\n+    const int ctb_addr_ts = s->ps.pps->ctb_addr_rs_to_ts[s->sh.slice_segment_addr];\n+    const int tiles = s->ps.pps->num_tile_rows * s->ps.pps->num_tile_columns;\n+    const unsigned int tile_id = s->ps.pps->tile_id[ctb_addr_ts];\n+\n+    // Check for obvious disasters\n+    if (ctb_addr_ts == 0 && s->sh.dependent_slice_segment_flag) {\n+        av_log(s->avctx, AV_LOG_ERROR, \"Impossible initial tile.\\n\");\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    // If dependant then ctb_addr_ts != 0 from previous check\n+    if (s->sh.dependent_slice_segment_flag) {\n+        int prev_rs = s->ps.pps->ctb_addr_ts_to_rs[ctb_addr_ts - 1];\n+        if (s->tab_slice_address[prev_rs] != s->sh.slice_addr) {\n+            av_log(s->avctx, AV_LOG_ERROR, \"Previous slice segment missing\\n\");\n+            return AVERROR_INVALIDDATA;\n+        }\n+    }\n+\n+    if (!s->ps.pps->entropy_coding_sync_enabled_flag &&\n+        tile_id + s->sh.num_entry_point_offsets >= tiles)\n+    {\n+        av_log(s->avctx, AV_LOG_ERROR, \"Entry points exceed tiles\\n\");\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    // Tiled stuff must start at start of tile if it has multiple entry points\n+    if (!s->ps.pps->entropy_coding_sync_enabled_flag &&\n+        s->sh.num_entry_point_offsets != 0 &&\n+        ctb_addr_ts != s->ps.pps->tile_pos_ts[tile_id])\n+    {\n+        av_log(s->avctx, AV_LOG_ERROR, \"Multiple tiles in slice; slice start != tile start\\n\");\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    ff_hevc_rpi_cabac_init_decoder(lc);\n+\n+    // Setup any required decode vars\n+    lc->cabac_init_req = !s->sh.dependent_slice_segment_flag;\n+\n+//    printf(\"SS: req=%d, sol=%d, sot=%d\\n\", lc->cabac_init_req, sol, sot);\n+    lc->qp_y = s->sh.slice_qp;\n+\n+    // General setup\n+    lc->bt_line_no = 0;\n+    lc->ts = ctb_addr_ts;\n+    return 0;\n+}\n+\n+static int gen_entry_points(HEVCRpiContext * const s, const H2645NAL * const nal)\n+{\n+    const GetBitContext * const gb = &s->HEVClc->gb;\n+    RpiSliceHeader * const sh = &s->sh;\n+    int i, j;\n+\n+    const unsigned int length = nal->size;\n+    unsigned int offset = ((gb->index) >> 3) + 1;  // We have a bit & align still to come = +1 byte\n+    unsigned int cmpt;\n+    unsigned int startheader;\n+\n+    if (sh->num_entry_point_offsets == 0) {\n+        s->data = NULL;\n+        return 0;\n+    }\n+\n+    // offset in slice header includes emulation prevention bytes.\n+    // Unfortunately those have been removed by the time we get here so we\n+    // have to compensate.  The nal layer keeps a track of where they were.\n+    for (j = 0, cmpt = 0, startheader = offset + sh->entry_point_offset[0]; j < nal->skipped_bytes; j++) {\n+        if (nal->skipped_bytes_pos[j] >= offset && nal->skipped_bytes_pos[j] < startheader) {\n+            startheader--;\n+            cmpt++;\n+        }\n+    }\n+\n+    for (i = 1; i < sh->num_entry_point_offsets; i++) {\n+        offset += (sh->entry_point_offset[i - 1] - cmpt);\n+        for (j = 0, cmpt = 0, startheader = offset + sh->entry_point_offset[i]; j < nal->skipped_bytes; j++) {\n+            if (nal->skipped_bytes_pos[j] >= offset && nal->skipped_bytes_pos[j] < startheader) {\n+                startheader--;\n+                cmpt++;\n+            }\n+        }\n+        if (sh->entry_point_offset[i] <= cmpt) {\n+            av_log(s->avctx, AV_LOG_ERROR, \"entry point offset <= skipped bytes\\n\");\n+            return AVERROR_INVALIDDATA;\n+        }\n+        sh->size[i - 1] = sh->entry_point_offset[i] - cmpt;\n+        sh->offset[i - 1] = offset;\n+    }\n+\n+    offset += sh->entry_point_offset[sh->num_entry_point_offsets - 1] - cmpt;\n+    if (length < offset) {\n+        av_log(s->avctx, AV_LOG_ERROR, \"entry_point_offset table is corrupted\\n\");\n+        return AVERROR_INVALIDDATA;\n+    }\n+    sh->size[sh->num_entry_point_offsets - 1] = length - offset;\n+    sh->offset[sh->num_entry_point_offsets - 1] = offset;\n+\n+    // Remember data start pointer as we won't have nal later\n+    s->data = nal->data;\n+    return 0;\n+}\n+\n+\n+// Return\n+// < 0   Error\n+// 0     OK\n+//\n+// jb->ctu_ts_last < 0       Job still filling\n+// jb->ctu_ts_last >= 0      Job ready\n+\n+static int fill_job(HEVCRpiContext * const s, HEVCRpiLocalContext *const lc, unsigned int max_blocks)\n+{\n+    const unsigned int log2_ctb_size = s->ps.sps->log2_ctb_size;\n+    const unsigned int ctb_size = (1 << log2_ctb_size);\n+    HEVCRpiJob * const jb = lc->jb0;\n+    int more_data = 1;\n+    unsigned int ctb_addr_ts = lc->ts;\n+    unsigned int ctb_addr_rs = s->ps.pps->ctb_addr_ts_to_rs[ctb_addr_ts];\n+    unsigned int x_ctb = (ctb_addr_rs % s->ps.sps->ctb_width) << log2_ctb_size;\n+    const unsigned int y_ctb = (ctb_addr_rs / s->ps.sps->ctb_width) << log2_ctb_size;\n+\n+    lc->unit_done = 0;\n+\n+    while (more_data && ctb_addr_ts < s->ps.sps->ctb_size)\n+    {\n+        int q_full;\n+        const unsigned int ctb_flags = s->ps.pps->ctb_ts_flags[ctb_addr_ts];\n+\n+        hls_decode_neighbour(s, lc, x_ctb, y_ctb, ctb_addr_ts);\n+\n+        ff_hevc_rpi_cabac_init(s, lc, ctb_flags);\n+\n+        hls_sao_param(s, lc, x_ctb >> log2_ctb_size, y_ctb >> log2_ctb_size);\n+\n+        s->deblock[ctb_addr_rs].beta_offset = s->sh.beta_offset;\n+        s->deblock[ctb_addr_rs].tc_offset   = s->sh.tc_offset;\n+        s->filter_slice_edges[ctb_addr_rs]  = s->sh.slice_loop_filter_across_slices_enabled_flag;\n+\n+        // Zap stashes if navail\n+        if ((lc->ctb_avail & AVAIL_U) == 0)\n+            zap_cabac_stash(s->cabac_stash_up + (x_ctb >> 3), log2_ctb_size - 3);\n+        if ((lc->ctb_avail & AVAIL_L) == 0)\n+        {\n+            memset(lc->ipm_left, INTRA_DC, IPM_TAB_SIZE);\n+            zap_cabac_stash(s->cabac_stash_left + (y_ctb >> 3), log2_ctb_size - 3);\n+        }\n+#if MVF_STASH_WIDTH > 64\n+        // Restore left mvf stash at start of tile if not at start of line\n+        if ((ctb_flags & CTB_TS_FLAGS_SOTL) != 0 && x_ctb != 0 && !s->is_irap)\n+        {\n+            unsigned int i;\n+            HEVCRpiMvField * dst = mvf_stash_ptr(s, lc, x_ctb - 1, 0);\n+            const HEVCRpiMvField * src = s->mvf_left + (y_ctb >> LOG2_MIN_PU_SIZE);\n+            for (i = 0; i != ctb_size >> LOG2_MIN_PU_SIZE; ++i)\n+            {\n+                *dst = *src++;\n+                dst += MVF_STASH_WIDTH_PU;\n+            }\n+        }\n+#endif\n+\n+        // Set initial tu states\n+        lc->tu.cu_qp_delta = 0;\n+        lc->tu.is_cu_qp_delta_wanted = 0;\n+        lc->tu.cu_chroma_qp_offset_wanted = 0;\n+\n+        // Decode\n+        more_data = hls_coding_quadtree(s, lc, x_ctb, y_ctb, log2_ctb_size, 0);\n+\n+        if (ff_hevc_rpi_cabac_overflow(lc))\n+        {\n+            av_log(s->avctx, AV_LOG_ERROR, \"Quadtree bitstream overread\\n \");\n+            more_data = AVERROR_INVALIDDATA;\n+        }\n+\n+        if (more_data < 0) {\n+            s->tab_slice_address[ctb_addr_rs] = TAB_SLICE_ADDR_BROKEN;  // Mark slice as broken\n+            return more_data;\n+        }\n+\n+        if (more_data && ((ctb_flags & CTB_TS_FLAGS_EOT) != 0 ||\n+             (s->ps.pps->entropy_coding_sync_enabled_flag && (ctb_flags & CTB_TS_FLAGS_EOTL) != 0)))\n+        {\n+            if (ff_hevc_rpi_get_cabac_terminate(&lc->cc) < 0 ||\n+                ff_hevc_rpi_cabac_skip_bytes(&lc->cc, 0) == NULL)\n+            {\n+                av_log(s->avctx, AV_LOG_ERROR, \"Error reading terminate el\\n \");\n+                return -1;\n+            }\n+        }\n+\n+        // --- Post CTB processing\n+\n+        // Stash rpl top/left for deblock that needs to remember such things cross-slice\n+        s->rpl_up[x_ctb >> log2_ctb_size] = s->refPicList;\n+        s->rpl_left[y_ctb >> log2_ctb_size] = s->refPicList;\n+\n+        if (!s->is_irap)\n+        {\n+            // Copy MVF up to up-left & stash to up\n+            {\n+                const HEVCRpiMvField * src = mvf_stash_ptr(s, lc, x_ctb, ctb_size - 1);\n+                HEVCRpiMvField * dst = s->mvf_up + (x_ctb >> LOG2_MIN_PU_SIZE);\n+\n+    //            printf(\"Stash: %d,%d, ctb_size=%d, %p->%p\\n\", x_ctb, y_ctb, ctb_size, src, dst);\n+\n+                lc->mvf_ul[0] = dst[(ctb_size - 1) >> LOG2_MIN_PU_SIZE];\n+                memcpy(dst, src, (sizeof(*src)*ctb_size) >> LOG2_MIN_PU_SIZE);\n+            }\n+            // Stash sideways if end of tile line but not end of line (no point)\n+            // ** Could/should do this @ end of fn\n+#if MVF_STASH_WIDTH > 64\n+            if ((ctb_flags & (CTB_TS_FLAGS_EOTL | CTB_TS_FLAGS_EOL)) == CTB_TS_FLAGS_EOTL)\n+#endif\n+            {\n+                unsigned int i;\n+                const HEVCRpiMvField * src = mvf_stash_ptr(s, lc, x_ctb + ctb_size - 1, 0);\n+                HEVCRpiMvField * dst = s->mvf_left + (y_ctb >> LOG2_MIN_PU_SIZE);\n+                for (i = 0; i != ctb_size >> LOG2_MIN_PU_SIZE; ++i)\n+                {\n+                    *dst++ = *src;\n+                    src += MVF_STASH_WIDTH_PU;\n+                }\n+            }\n+        }\n+\n+        if ((ctb_flags & CTB_TS_FLAGS_CSAVE) != 0)\n+            ff_hevc_rpi_save_states(s, lc);\n+\n+        // Report progress so we can use our MVs in other frames\n+        if ((ctb_flags & CTB_TS_FLAGS_EOL) != 0)\n+            ff_hevc_rpi_progress_signal_mv(s, y_ctb + ctb_size - 1);\n+\n+        // End of line || End of tile line || End of tile\n+        // (EoL covers end of frame for our purposes here)\n+        q_full = ((ctb_flags & CTB_TS_FLAGS_EOTL) != 0);\n+\n+        // Allocate QPU chunks on fixed size 64 pel boundries rather than\n+        // whatever ctb_size is today.\n+        // * We might quite like to continue to 64 pel vertical too but that\n+        //   currently confuses WPP\n+        if (((x_ctb + ctb_size) & 63) == 0 || q_full)\n+        {\n+            int overflow = 0;\n+            if (rpi_inter_pred_next_ctu(&jb->luma_ip) != 0)\n+                overflow = 1;\n+            if (rpi_inter_pred_next_ctu(&jb->chroma_ip) != 0)\n+                overflow = 1;\n+            if (overflow)\n+            {\n+                // * This is very annoying (and slow) to cope with in WPP so\n+                //   we treat it as an error there (no known stream triggers this\n+                //   with the current buffer sizes).  Non-wpp should cope fine.\n+                av_log(s->avctx, AV_LOG_WARNING,  \"%s: Q full before EoL\\n\", __func__);\n+                q_full = 1;\n+            }\n+        }\n+\n+        // Inc TS to next.\n+        ctb_addr_ts++;\n+        ctb_addr_rs++;\n+        x_ctb += ctb_size;\n+\n+        if (q_full)\n+        {\n+            // Do job\n+            // Prep for submission\n+            jb->ctu_ts_last = ctb_addr_ts - 1;  // Was pre-inced\n+            job_gen_bounds(s, jb);\n+            break;\n+        }\n+\n+        // If max_blocks started as 0 then this will never be true\n+        if (--max_blocks == 0)\n+            break;\n+    }\n+\n+    lc->unit_done = (more_data <= 0);\n+    lc->ts = ctb_addr_ts;\n+    return 0;\n+}\n+\n+static void bt_lc_init(HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, const unsigned int n)\n+{\n+    lc->context = s;\n+    lc->jb0 = NULL;\n+    lc->lc_n = n;\n+    lc->bt_terminate = 0;\n+    lc->bt_psem_out = NULL;\n+    sem_init(&lc->bt_sem_in, 0, 0);\n+}\n+\n+#define TRACE_WPP 0\n+#if RPI_EXTRA_BIT_THREADS > 0\n+static inline unsigned int line_ts_width(const HEVCRpiContext * const s, unsigned int ts)\n+{\n+    unsigned int rs = s->ps.pps->ctb_addr_ts_to_rs[ts];\n+    return s->ps.pps->column_width[s->ps.pps->col_idxX[rs % s->ps.sps->ctb_width]];\n+}\n+\n+// Move local context parameters from an aux bit thread back to the main\n+// thread at the end of a slice as processing is going to continue there.\n+static void movlc(HEVCRpiLocalContext *const dst_lc, HEVCRpiLocalContext *const src_lc, const int is_dep)\n+{\n+    if (src_lc == dst_lc) {\n+        return;\n+    }\n+\n+    // Move the job\n+    // We will still have an active job if the final line terminates early\n+    // Dest should always be null by now\n+    av_assert1(dst_lc->jb0 == NULL);\n+    dst_lc->jb0 = src_lc->jb0;\n+    src_lc->jb0 = NULL;\n+\n+    // Always need to store where we are in the bitstream\n+    dst_lc->ts = src_lc->ts;\n+    dst_lc->gb = src_lc->gb;\n+    // Cabac init request will be built at start of next slice\n+\n+    // Need to store context if we might have a dependent seg\n+    if (is_dep)\n+    {\n+        dst_lc->qPy_pred = src_lc->qPy_pred;\n+        memcpy(dst_lc->ipm_left, src_lc->ipm_left, sizeof(src_lc->ipm_left));\n+        memcpy(dst_lc->cabac_state, src_lc->cabac_state, sizeof(src_lc->cabac_state));\n+        memcpy(dst_lc->stat_coeff, src_lc->stat_coeff, sizeof(src_lc->stat_coeff));\n+    }\n+}\n+\n+static inline int wait_bt_sem_in(HEVCRpiLocalContext * const lc)\n+{\n+    rpi_sem_wait(&lc->bt_sem_in);\n+    return lc->bt_terminate;\n+}\n+\n+// Do one WPP line\n+// Will not work correctly over horizontal tile boundries - vertical should be OK\n+static int rpi_run_one_line(HEVCRpiContext *const s, HEVCRpiLocalContext * const lc, const int is_first)\n+{\n+    const int is_tile = lc->bt_is_tile;\n+    const unsigned int tile_id = s->ps.pps->tile_id[lc->ts];\n+    const unsigned int line = lc->bt_line_no;\n+    const unsigned int line_inc = lc->bt_line_inc;\n+    const int is_last = (line >= lc->bt_last_line);\n+\n+    const unsigned int ts_eol = lc->ts + (is_tile ? s->ps.pps->tile_size[tile_id] : lc->bt_line_width);\n+    const unsigned int ts_next =\n+        line + line_inc > (unsigned int)s->sh.num_entry_point_offsets ?\n+            INT_MAX :\n+        is_tile ?\n+            s->ps.pps->tile_pos_ts[tile_id + line_inc] :\n+            lc->ts + lc->bt_line_width * line_inc;\n+    // Tile wants line, WPP a few CTUs (must be >= 2 for cabac context to work)\n+    const unsigned int partial_size = is_tile ? line_ts_width(s, lc->ts) : 2;\n+    unsigned int ts_prev;\n+    int loop_n = 0;\n+    int err = 0;\n+\n+    av_assert1(line <= s->sh.num_entry_point_offsets);\n+\n+#if TRACE_WPP\n+    printf(\"%s[%d]: Start %s: tile=%d, line=%d/%d/%d, ts=%d/%d/%d, width=%d, jb=%p\\n\", __func__,\n+           lc->lc_n,  is_tile ? \"Tile\" : \"WPP\", tile_id,\n+           line, lc->bt_last_line, s->sh.num_entry_point_offsets,\n+           lc->ts, ts_eol, ts_next, partial_size, lc->jb0);\n+#endif\n+    if (line != 0)\n+    {\n+        const uint8_t * const data = s->data + s->sh.offset[line - 1];\n+        const unsigned int len = s->sh.size[line - 1];\n+        if ((err = init_get_bits8(&lc->gb, data, len)) < 0)\n+            return err;\n+\n+        ff_init_cabac_decoder(&lc->cc, data, len);\n+    }\n+\n+    // We should never be processing a dependent slice here so reset is good\n+    // ?? These probably shouldn't be needed (as they should be set by later\n+    //    logic) but do seem to be required\n+    lc->qp_y = s->sh.slice_qp;\n+\n+    do\n+    {\n+        if (!is_last && loop_n > 1) {\n+#if TRACE_WPP\n+            printf(\"%s[%d]: %sPoke %p\\n\", __func__, lc->lc_n, err == 0 ? \"\" : \"ERR: \", lc->bt_psem_out);\n+#endif\n+            sem_post(lc->bt_psem_out);\n+        }\n+        // The wait for loop_n == 0 has been done in bit_thread\n+        if (!is_first && loop_n != 0)\n+        {\n+#if TRACE_WPP\n+            printf(\"%s[%d]: %sWait %p\\n\", __func__, lc->lc_n, err == 0 ? \"\" : \"ERR: \", &lc->bt_sem_in);\n+#endif\n+            if (wait_bt_sem_in(lc) != 0)\n+                return AVERROR_EXIT;\n+        }\n+\n+#if TRACE_WPP\n+        {\n+            int n;\n+            sem_getvalue(&lc->bt_sem_in, &n);\n+            printf(\"%s[%d]: ts=%d, sem=%d %p\\n\", __func__, lc->lc_n, lc->ts, n, &lc->bt_sem_in);\n+        }\n+#endif\n+\n+        ts_prev = lc->ts;\n+\n+        // If we have had an error - do no further decode but do continue\n+        // moving signals around so the other threads continue to operate\n+        // correctly (or at least as correctly as they can with this line missing)\n+        //\n+        // Errors in WPP/Tile are less fatal than normal as we have a good idea\n+        // of how to restart on the next line so there is no need to give up totally\n+        if (err != 0)\n+        {\n+            lc->unit_done = 0;\n+            lc->ts += partial_size;\n+        }\n+        else\n+        {\n+            worker_pass0_ready(s, lc);\n+\n+            if ((err = fill_job(s, lc, partial_size)) < 0 ||\n+                (lc->ts < ts_eol && !is_last && (lc->ts != ts_prev + partial_size || lc->unit_done)))\n+            {\n+                if (err == 0) {\n+                    av_log(s->avctx, AV_LOG_ERROR, \"Unexpected end of tile/wpp section\\n\");\n+                    err = AVERROR_INVALIDDATA;\n+                }\n+                worker_free(s, lc);\n+                lc->ts = ts_prev + partial_size;  // Pretend we did all that\n+                lc->unit_done = 0;\n+            }\n+            else if (is_tile)\n+            {\n+                worker_submit_job(s, lc);\n+            }\n+        }\n+\n+        ++loop_n;\n+    } while (lc->ts < ts_eol && !lc->unit_done);\n+\n+    // If we are on the last line & we didn't get a whole line we must wait for\n+    // and sink the sem_posts from the line above / tile to the left.\n+    while ((ts_prev += partial_size) < ts_eol)\n+    {\n+#if TRACE_WPP\n+        printf(\"%s[%d]: EOL Wait: ts=%d %p\\n\", __func__, lc->lc_n, ts_prev, &lc->bt_sem_in);\n+#endif\n+        if (wait_bt_sem_in(lc) != 0)\n+            return AVERROR_EXIT;\n+    }\n+\n+    lc->bt_line_no += line_inc;\n+\n+    if (!is_tile && err == 0)\n+        worker_submit_job(s, lc);\n+\n+    if (!is_last) {\n+        lc->ts = ts_next;\n+\n+#if TRACE_WPP\n+        printf(\"%s[%d]: Poke post submit %p\\n\", __func__, lc->lc_n, lc->bt_psem_out);\n+#endif\n+        sem_post(lc->bt_psem_out);\n+        if (loop_n > 1) {\n+#if TRACE_WPP\n+            printf(\"%s[%d]: Poke post submit2 %p\\n\", __func__, lc->lc_n, lc->bt_psem_out);\n+#endif\n+            sem_post(lc->bt_psem_out);\n+        }\n+    }\n+    else\n+    {\n+        movlc(s->HEVClcList[0], lc, s->ps.pps->dependent_slice_segments_enabled_flag);  // * & not EoT\n+#if MVF_STASH_WIDTH > 64\n+        // Horrid calculations to work out what we want but luckily this should almost never execute\n+        // **** Move to movlc\n+        if (!s->is_irap)\n+        {\n+            const unsigned int ctb_flags = s->ps.pps->ctb_ts_flags[lc->ts];\n+            if ((ctb_flags & CTB_TS_FLAGS_EOTL) == 0) // If EOTL then we have already stashed mvf\n+            {\n+                const unsigned int x_ctb = ((s->ps.pps->ctb_addr_ts_to_rs[lc->ts] % s->ps.sps->ctb_width) << s->ps.sps->log2_ctb_size) - 1;\n+                unsigned int i;\n+                const HEVCRpiMvField *s_mvf = lc->mvf_stash + ((x_ctb >> LOG2_MIN_PU_SIZE) & (MVF_STASH_WIDTH_PU - 1));\n+                HEVCRpiMvField *d_mvf = s->HEVClcList[0]->mvf_stash + ((x_ctb >> LOG2_MIN_PU_SIZE) & (MVF_STASH_WIDTH_PU - 1));\n+\n+                for (i = 0; i != MVF_STASH_HEIGHT_PU; ++i)\n+                {\n+                    *d_mvf = *s_mvf;\n+                    d_mvf += MVF_STASH_WIDTH_PU;\n+                    s_mvf += MVF_STASH_WIDTH_PU;\n+                }\n+\n+            }\n+        }\n+#endif\n+        // When all done poke the thread 0 sem_in one final time\n+#if TRACE_WPP\n+        printf(\"%s[%d]: Poke final %p\\n\", __func__, lc->lc_n, &s->HEVClcList[0]->bt_sem_in);\n+#endif\n+        sem_post(&s->HEVClcList[0]->bt_sem_in);\n+    }\n+\n+#if TRACE_WPP\n+    printf(\"%s[%d]: End. dep=%d\\n\", __func__, lc->lc_n, s->ps.pps->dependent_slice_segments_enabled_flag);\n+#endif\n+    return err;\n+}\n+\n+static void wpp_setup_lcs(HEVCRpiContext * const s)\n+{\n+    unsigned int ts = s->ps.pps->ctb_addr_rs_to_ts[s->sh.slice_segment_addr];\n+    const unsigned int line_width = line_ts_width(s, ts);\n+\n+    for (int i = 0; i <= s->sh.num_entry_point_offsets && i < RPI_BIT_THREADS; ++i)\n+    {\n+        HEVCRpiLocalContext * const lc = s->HEVClcList[i];\n+        lc->ts = ts;\n+        lc->bt_is_tile = 0;\n+        lc->bt_line_no = i;\n+        lc->bt_line_width = line_width;\n+        lc->bt_last_line = s->sh.num_entry_point_offsets;\n+        lc->bt_line_inc = RPI_BIT_THREADS;\n+        ts += line_width;\n+    }\n+}\n+\n+\n+// Can only process tile single row at once\n+static void tile_one_row_setup_lcs(HEVCRpiContext * const s, unsigned int slice_row)\n+{\n+    const HEVCRpiPPS * const pps = s->ps.pps;\n+    const unsigned int ts0 = pps->ctb_addr_rs_to_ts[s->sh.slice_segment_addr];\n+    const unsigned int tile0 = pps->tile_id[ts0];\n+    const unsigned int col0 = tile0 % pps->num_tile_columns;\n+\n+    const unsigned int col = (slice_row == 0) ? col0 : 0;\n+    unsigned int line = slice_row * pps->num_tile_columns - col0 + col;\n+    const unsigned int last_line = FFMIN(\n+        line + pps->num_tile_columns - 1 - col, s->sh.num_entry_point_offsets);\n+\n+    const unsigned int par =\n+        FFMIN(RPI_BIT_THREADS, last_line + 1 - line);\n+#if TRACE_WPP\n+    printf(\"ts0=%d, ents=%d, row=%d, tiles=%dx%d, col=%d, par=%d, line=%d/%d\\n\", ts0, s->sh.num_entry_point_offsets, slice_row,\n+           pps->num_tile_columns, pps->num_tile_rows, col, par, line, last_line);\n+#endif\n+    for (unsigned int i = 0; i != par; ++i, ++line)\n+    {\n+        HEVCRpiLocalContext * const lc = s->HEVClcList[i];\n+        const unsigned int tile = tile0 + line;\n+\n+        lc->ts = pps->tile_pos_ts[tile];\n+        lc->bt_line_no = line;\n+        lc->bt_is_tile = 1;\n+        lc->bt_line_width = line_ts_width(s, lc->ts);\n+        lc->bt_last_line = last_line;\n+        lc->bt_line_inc = par;\n+    }\n+}\n+\n+\n+static void * bit_thread(void * v)\n+{\n+    HEVCRpiLocalContext * const lc = v;\n+    HEVCRpiContext *const s = lc->context;\n+\n+    while (wait_bt_sem_in(lc) == 0)\n+    {\n+        int err;\n+\n+        if ((err = rpi_run_one_line(s, lc, 0)) < 0) {  // Never first tile/wpp\n+            if (lc->bt_terminate) {\n+                av_log(s->avctx, AV_LOG_ERROR, \"%s: Unexpected termination\\n\", __func__);\n+                break;\n+            }\n+            av_log(s->avctx, AV_LOG_WARNING, \"%s: Decode failure: %d\\n\", __func__, err);\n+        }\n+    }\n+\n+    return NULL;\n+}\n+\n+static int bit_threads_start(HEVCRpiContext * const s)\n+{\n+    if (s->bt_started)\n+        return 0;\n+\n+    for (int i = 1; i < RPI_BIT_THREADS; ++i)\n+    {\n+        // lc[0] belongs to the main thread - this sets up lc[1..RPI_BIT_THREADS]\n+        if (s->HEVClcList[i] == NULL) {\n+            if ((s->HEVClcList[i] = av_mallocz(sizeof(*s->HEVClcList[0]))) == NULL)\n+                return -1;\n+        }\n+\n+        bt_lc_init(s, s->HEVClcList[i], i);\n+        job_lc_init(s->HEVClcList[i]);\n+    }\n+\n+    // Link the sems in a circle\n+    for (int i = 0; i < RPI_BIT_THREADS - 1; ++i)\n+        s->HEVClcList[i]->bt_psem_out = &s->HEVClcList[i + 1]->bt_sem_in;\n+    s->HEVClcList[RPI_BIT_THREADS - 1]->bt_psem_out = &s->HEVClcList[0]->bt_sem_in;\n+\n+    // Init all lc before starting any threads\n+    for (int i = 0; i < RPI_EXTRA_BIT_THREADS; ++i)\n+    {\n+        if (pthread_create(s->bit_threads + i, NULL, bit_thread, s->HEVClcList[i + 1]) < 0)\n+            return -1;\n+    }\n+\n+    s->bt_started = 1;\n+    return 0;\n+}\n+\n+static int bit_threads_kill(HEVCRpiContext * const s)\n+{\n+    if (!s->bt_started)\n+        return 0;\n+    s->bt_started = 0;\n+\n+    for (int i = 0; i < RPI_EXTRA_BIT_THREADS; ++i)\n+    {\n+        HEVCRpiLocalContext *const lc = s->HEVClcList[i + 1];\n+        if (lc == NULL)\n+            break;\n+\n+        lc->bt_terminate = 1;\n+        sem_post(&lc->bt_sem_in);\n+        pthread_join(s->bit_threads[i], NULL);\n+\n+        sem_destroy(&lc->bt_sem_in);\n+        job_lc_kill(lc);\n+    }\n+    return 0;\n+}\n+#endif\n+\n+\n+// If we are at EoT and the row is shorter than the number of jobs\n+// we can Q we have to wait for it finish otherwise we risk cache/QPU\n+// disasters\n+static inline int tile_needs_wait(const HEVCRpiContext * const s, const int n)\n+{\n+    return\n+        s->ps.pps->tile_wpp_inter_disable >= 2 &&\n+        s->sh.slice_type != HEVC_SLICE_I &&\n+        n >= 0 &&\n+        (s->ps.pps->ctb_ts_flags[n] & (CTB_TS_FLAGS_EOT | CTB_TS_FLAGS_EOL)) == CTB_TS_FLAGS_EOT;\n+}\n+\n+static int rpi_decode_entry(AVCodecContext *avctxt, void *isFilterThread)\n+{\n+    HEVCRpiContext * const s  = avctxt->priv_data;\n+    HEVCRpiLocalContext * const lc = s->HEVClc;\n+    int err;\n+\n+    // Start of slice\n+    if ((err = slice_start(s, lc)) != 0)\n+        return err;\n+\n+#if RPI_EXTRA_BIT_THREADS > 0\n+\n+    if (s->sh.offload_tiles)\n+    {\n+        unsigned int slice_row = 0;\n+\n+#if TRACE_WPP\n+        printf(\"%s: Do Tiles\\n\", __func__);\n+#endif\n+        // Generate & start extra bit threads if they aren't already running\n+        bit_threads_start(s);\n+\n+        do\n+        {\n+            // Reset lc lines etc.\n+            tile_one_row_setup_lcs(s, slice_row);\n+\n+#if TRACE_WPP\n+            printf(\"%s: Row %d: Do 1st: line=%d/%d/%d\\n\",\n+                   __func__, slice_row, lc->bt_line_no, lc->bt_last_line, s->sh.num_entry_point_offsets);\n+#endif\n+\n+            rpi_run_one_line(s, lc, 1);  // Kicks off the other threads\n+#if TRACE_WPP\n+            printf(\"%s: Row %d: Done 1st: line=%d/%d/%d\\n\",\n+                   __func__, slice_row, lc->bt_line_no, lc->bt_last_line, s->sh.num_entry_point_offsets);\n+#endif\n+\n+            while (lc->bt_line_no <= lc->bt_last_line) {\n+                rpi_sem_wait(&lc->bt_sem_in);\n+                rpi_run_one_line(s, lc, 0);\n+            }\n+#if TRACE_WPP\n+            printf(\"%s: Done body\\n\", __func__);\n+#endif\n+\n+            // Wait for everything else to finish\n+            rpi_sem_wait(&lc->bt_sem_in);\n+\n+            ++slice_row;\n+        } while (lc->bt_last_line < s->sh.num_entry_point_offsets);\n+\n+\n+#if TRACE_WPP\n+        printf(\"%s: Done wait: ts=%d\\n\", __func__, lc->ts);\n+#endif\n+    }\n+    else if (s->sh.offload_wpp)\n+    {\n+#if TRACE_WPP\n+        printf(\"%s: Do WPP\\n\", __func__);\n+#endif\n+        // Generate & start extra bit threads if they aren't already running\n+        bit_threads_start(s);\n+\n+        // Reset lc lines etc.\n+        wpp_setup_lcs(s);\n+\n+        rpi_run_one_line(s, lc, 1);  // Kicks off the other threads\n+#if TRACE_WPP\n+        printf(\"%s: Done 1st\\n\", __func__);\n+#endif\n+\n+        while (lc->bt_line_no <= s->sh.num_entry_point_offsets) {\n+            rpi_sem_wait(&lc->bt_sem_in);\n+            rpi_run_one_line(s, lc, 0);\n+        }\n+#if TRACE_WPP\n+        printf(\"%s: Done body\\n\", __func__);\n+#endif\n+\n+        // Wait for everything else to finish\n+        rpi_sem_wait(&lc->bt_sem_in);\n+\n+#if TRACE_WPP\n+        printf(\"%s: Done wait: ts=%d\\n\", __func__, lc->ts);\n+#endif\n+    }\n+    else\n+#endif\n+    {\n+#if TRACE_WPP\n+        printf(\"%s: Single start: ts=%d\\n\", __func__, lc->ts);\n+#endif\n+        // Single bit thread\n+        do {\n+            // Make sure we have space to prepare the next job\n+            worker_pass0_ready(s, lc);\n+\n+            if ((err = fill_job(s, lc, 0)) < 0)\n+                goto fail;\n+\n+            worker_submit_job(s, lc);\n+\n+            if (tile_needs_wait(s, lc->ts - 1))\n+                worker_wait(s, lc);\n+\n+        } while (!lc->unit_done);\n+\n+#if TRACE_WPP\n+        printf(\"%s: Single end: ts=%d\\n\", __func__, lc->ts);\n+#endif\n+    }\n+\n+    // If we have reached the end of the frame or\n+    // then wait for the worker to finish all its jobs\n+    if (lc->ts >= s->ps.sps->ctb_size)\n+        worker_wait(s, lc);\n+\n+#if RPI_TSTATS\n+    {\n+        HEVCRpiStats *const ts = &s->tstats;\n+\n+        printf(\"=== P: xy00:%5d/%5d/%5d/%5d h16gl:%5d/%5d w8gl:%5d/%5d y8m:%d\\n    B: xy00:%5d/%5d/%5d/%5d h16gl:%5d/%5d\\n\",\n+               ts->y_pred1_xy, ts->y_pred1_x0, ts->y_pred1_y0, ts->y_pred1_x0y0,\n+               ts->y_pred1_hgt16, ts->y_pred1_hle16, ts->y_pred1_wgt8, ts->y_pred1_wle8, ts->y_pred1_y8_merge,\n+               ts->y_pred2_xy, ts->y_pred2_x0, ts->y_pred2_y0, ts->y_pred2_x0y0,\n+               ts->y_pred2_hgt16, ts->y_pred2_hle16);\n+        memset(ts, 0, sizeof(*ts));\n+    }\n+#endif\n+\n+    return lc->ts;\n+\n+fail:\n+    // Cleanup\n+    av_log(s->avctx, AV_LOG_ERROR, \"%s failed: err=%d\\n\", __func__, err);\n+    // Free our job & wait for temination\n+    worker_free(s, lc);\n+    worker_wait(s, lc);\n+    return err;\n+}\n+\n+\n+static void set_no_backward_pred(HEVCRpiContext * const s)\n+{\n+    int i, j;\n+    const RefPicList *const refPicList = s->refPicList;\n+\n+    s->no_backward_pred_flag = 0;\n+    if (s->sh.slice_type != HEVC_SLICE_B || !s->sh.slice_temporal_mvp_enabled_flag)\n+        return;\n+\n+    for (j = 0; j < 2; j++) {\n+        for (i = 0; i < refPicList[j].nb_refs; i++) {\n+            if (refPicList[j].list[i] > s->poc) {\n+                s->no_backward_pred_flag = 1;\n+                return;\n+            }\n+        }\n+    }\n+}\n+\n+static int hls_slice_data(HEVCRpiContext * const s, const H2645NAL * const nal)\n+{\n+    int err;\n+    if ((err = gen_entry_points(s, nal)) < 0)\n+        return err;\n+\n+    set_no_backward_pred(s);\n+\n+    return rpi_decode_entry(s->avctx, NULL);\n+}\n+\n+static int set_side_data(HEVCRpiContext *s)\n+{\n+    AVFrame *out = s->ref->frame;\n+\n+    if (s->sei.frame_packing.present &&\n+        s->sei.frame_packing.arrangement_type >= 3 &&\n+        s->sei.frame_packing.arrangement_type <= 5 &&\n+        s->sei.frame_packing.content_interpretation_type > 0 &&\n+        s->sei.frame_packing.content_interpretation_type < 3) {\n+        AVStereo3D *stereo = av_stereo3d_create_side_data(out);\n+        if (!stereo)\n+            return AVERROR(ENOMEM);\n+\n+        switch (s->sei.frame_packing.arrangement_type) {\n+        case 3:\n+            if (s->sei.frame_packing.quincunx_subsampling)\n+                stereo->type = AV_STEREO3D_SIDEBYSIDE_QUINCUNX;\n+            else\n+                stereo->type = AV_STEREO3D_SIDEBYSIDE;\n+            break;\n+        case 4:\n+            stereo->type = AV_STEREO3D_TOPBOTTOM;\n+            break;\n+        case 5:\n+            stereo->type = AV_STEREO3D_FRAMESEQUENCE;\n+            break;\n+        }\n+\n+        if (s->sei.frame_packing.content_interpretation_type == 2)\n+            stereo->flags = AV_STEREO3D_FLAG_INVERT;\n+\n+        if (s->sei.frame_packing.arrangement_type == 5) {\n+            if (s->sei.frame_packing.current_frame_is_frame0_flag)\n+                stereo->view = AV_STEREO3D_VIEW_LEFT;\n+            else\n+                stereo->view = AV_STEREO3D_VIEW_RIGHT;\n+        }\n+    }\n+\n+    if (s->sei.display_orientation.present &&\n+        (s->sei.display_orientation.anticlockwise_rotation ||\n+         s->sei.display_orientation.hflip || s->sei.display_orientation.vflip)) {\n+        double angle = s->sei.display_orientation.anticlockwise_rotation * 360 / (double) (1 << 16);\n+        AVFrameSideData *rotation = av_frame_new_side_data(out,\n+                                                           AV_FRAME_DATA_DISPLAYMATRIX,\n+                                                           sizeof(int32_t) * 9);\n+        if (!rotation)\n+            return AVERROR(ENOMEM);\n+\n+        av_display_rotation_set((int32_t *)rotation->data, angle);\n+        av_display_matrix_flip((int32_t *)rotation->data,\n+                               s->sei.display_orientation.hflip,\n+                               s->sei.display_orientation.vflip);\n+    }\n+\n+    // Decrement the mastering display flag when IRAP frame has no_rasl_output_flag=1\n+    // so the side data persists for the entire coded video sequence.\n+    if (s->sei.mastering_display.present > 0 &&\n+        IS_IRAP(s) && s->no_rasl_output_flag) {\n+        s->sei.mastering_display.present--;\n+    }\n+    if (s->sei.mastering_display.present) {\n+        // HEVC uses a g,b,r ordering, which we convert to a more natural r,g,b\n+        const int mapping[3] = {2, 0, 1};\n+        const int chroma_den = 50000;\n+        const int luma_den = 10000;\n+        int i;\n+        AVMasteringDisplayMetadata *metadata =\n+            av_mastering_display_metadata_create_side_data(out);\n+        if (!metadata)\n+            return AVERROR(ENOMEM);\n+\n+        for (i = 0; i < 3; i++) {\n+            const int j = mapping[i];\n+            metadata->display_primaries[i][0].num = s->sei.mastering_display.display_primaries[j][0];\n+            metadata->display_primaries[i][0].den = chroma_den;\n+            metadata->display_primaries[i][1].num = s->sei.mastering_display.display_primaries[j][1];\n+            metadata->display_primaries[i][1].den = chroma_den;\n+        }\n+        metadata->white_point[0].num = s->sei.mastering_display.white_point[0];\n+        metadata->white_point[0].den = chroma_den;\n+        metadata->white_point[1].num = s->sei.mastering_display.white_point[1];\n+        metadata->white_point[1].den = chroma_den;\n+\n+        metadata->max_luminance.num = s->sei.mastering_display.max_luminance;\n+        metadata->max_luminance.den = luma_den;\n+        metadata->min_luminance.num = s->sei.mastering_display.min_luminance;\n+        metadata->min_luminance.den = luma_den;\n+        metadata->has_luminance = 1;\n+        metadata->has_primaries = 1;\n+\n+        av_log(s->avctx, AV_LOG_DEBUG, \"Mastering Display Metadata:\\n\");\n+        av_log(s->avctx, AV_LOG_DEBUG,\n+               \"r(%5.4f,%5.4f) g(%5.4f,%5.4f) b(%5.4f %5.4f) wp(%5.4f, %5.4f)\\n\",\n+               av_q2d(metadata->display_primaries[0][0]),\n+               av_q2d(metadata->display_primaries[0][1]),\n+               av_q2d(metadata->display_primaries[1][0]),\n+               av_q2d(metadata->display_primaries[1][1]),\n+               av_q2d(metadata->display_primaries[2][0]),\n+               av_q2d(metadata->display_primaries[2][1]),\n+               av_q2d(metadata->white_point[0]), av_q2d(metadata->white_point[1]));\n+        av_log(s->avctx, AV_LOG_DEBUG,\n+               \"min_luminance=%f, max_luminance=%f\\n\",\n+               av_q2d(metadata->min_luminance), av_q2d(metadata->max_luminance));\n+    }\n+    // Decrement the mastering display flag when IRAP frame has no_rasl_output_flag=1\n+    // so the side data persists for the entire coded video sequence.\n+    if (s->sei.content_light.present > 0 &&\n+        IS_IRAP(s) && s->no_rasl_output_flag) {\n+        s->sei.content_light.present--;\n+    }\n+    if (s->sei.content_light.present) {\n+        AVContentLightMetadata *metadata =\n+            av_content_light_metadata_create_side_data(out);\n+        if (!metadata)\n+            return AVERROR(ENOMEM);\n+        metadata->MaxCLL  = s->sei.content_light.max_content_light_level;\n+        metadata->MaxFALL = s->sei.content_light.max_pic_average_light_level;\n+\n+        av_log(s->avctx, AV_LOG_DEBUG, \"Content Light Level Metadata:\\n\");\n+        av_log(s->avctx, AV_LOG_DEBUG, \"MaxCLL=%d, MaxFALL=%d\\n\",\n+               metadata->MaxCLL, metadata->MaxFALL);\n+    }\n+\n+    if (s->sei.a53_caption.a53_caption) {\n+        AVFrameSideData* sd = av_frame_new_side_data(out,\n+                                                     AV_FRAME_DATA_A53_CC,\n+                                                     s->sei.a53_caption.a53_caption_size);\n+        if (sd)\n+            memcpy(sd->data, s->sei.a53_caption.a53_caption, s->sei.a53_caption.a53_caption_size);\n+        av_freep(&s->sei.a53_caption.a53_caption);\n+        s->sei.a53_caption.a53_caption_size = 0;\n+        s->avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS;\n+    }\n+\n+    if (s->sei.alternative_transfer.present &&\n+        av_color_transfer_name(s->sei.alternative_transfer.preferred_transfer_characteristics) &&\n+        s->sei.alternative_transfer.preferred_transfer_characteristics != AVCOL_TRC_UNSPECIFIED) {\n+        s->avctx->color_trc = out->color_trc = s->sei.alternative_transfer.preferred_transfer_characteristics;\n+    }\n+\n+    return 0;\n+}\n+\n+static int hevc_frame_start(HEVCRpiContext * const s)\n+{\n+    int ret;\n+\n+    memset(s->bs_horizontal, 0, s->bs_size * 2);  // Does V too\n+    memset(s->is_pcm,        0, s->ps.sps->pcm_width * s->ps.sps->pcm_height);\n+    memset(s->tab_slice_address, -1, s->ps.sps->ctb_size * sizeof(*s->tab_slice_address));\n+\n+    // Only need to remember intra for CIP\n+    if (!s->ps.pps->constrained_intra_pred_flag || s->is_irap)\n+        s->is_intra = NULL;\n+    else\n+    {\n+        s->is_intra = s->is_intra_store;\n+        memset(s->is_intra, 0, s->ps.sps->pcm_width * s->ps.sps->pcm_height);\n+    }\n+\n+    s->is_decoded        = 0;\n+    s->first_nal_type    = s->nal_unit_type;\n+\n+    s->no_rasl_output_flag = IS_IDR(s) || IS_BLA(s) || (s->nal_unit_type == HEVC_NAL_CRA_NUT && s->last_eos);\n+\n+    if (s->pkt.nb_nals > s->rpl_tab_size)\n+    {\n+        // In most cases it will be faster to free & realloc as that doesn't\n+        // require (an unwanted) copy\n+        av_freep(&s->rpl_tab);\n+        s->rpl_tab_size = 0;\n+        if ((s->rpl_tab = av_malloc(s->pkt.nb_nals * sizeof(*s->rpl_tab))) == NULL)\n+            goto fail;\n+        s->rpl_tab_size = s->pkt.nb_nals;\n+    }\n+    memset(s->rpl_tab, 0, s->pkt.nb_nals * sizeof(*s->rpl_tab));\n+\n+    ret = ff_hevc_rpi_set_new_ref(s, &s->frame, s->poc);\n+    if (ret < 0)\n+        goto fail;\n+\n+    // Resize rpl_tab to max that we might want\n+    ret = ff_hevc_rpi_frame_rps(s);\n+    if (ret < 0) {\n+        av_log(s->avctx, AV_LOG_ERROR, \"Error constructing the frame RPS.\\n\");\n+        goto fail;\n+    }\n+\n+    s->ref->frame->key_frame = IS_IRAP(s);\n+\n+    ret = set_side_data(s);\n+    if (ret < 0)\n+        goto fail;\n+\n+    s->frame->pict_type = 3 - s->sh.slice_type;\n+\n+    if (!IS_IRAP(s))\n+        ff_hevc_rpi_bump_frame(s);\n+\n+    av_frame_unref(s->output_frame);\n+    ret = ff_hevc_rpi_output_frame(s, s->output_frame, 0);\n+    if (ret < 0)\n+        goto fail;\n+\n+    ff_thread_finish_setup(s->avctx);\n+\n+    return 0;\n+\n+fail:\n+    if (s->ref)\n+        ff_hevc_rpi_unref_frame(s, s->ref, ~0);\n+    s->ref = NULL;\n+    return ret;\n+}\n+\n+static inline int is_non_ref_unit_type(const unsigned int nal_unit_type)\n+{\n+    // From Table 7-1\n+    return (nal_unit_type & ~0xe) == 0;  // True for 0, 2, 4, 6, 8, 10, 12, 14\n+}\n+\n+static int decode_nal_unit(HEVCRpiContext *s, const H2645NAL *nal)\n+{\n+    GetBitContext * const gb    = &s->HEVClc->gb;\n+    int ctb_addr_ts, ret;\n+\n+    *gb              = nal->gb;\n+    s->nal_unit_type = nal->type;\n+    s->temporal_id   = nal->temporal_id;\n+\n+    switch (s->nal_unit_type) {\n+    case HEVC_NAL_VPS:\n+        ret = ff_hevc_rpi_decode_nal_vps(gb, s->avctx, &s->ps);\n+        if (ret < 0)\n+            goto fail;\n+        break;\n+    case HEVC_NAL_SPS:\n+        ret = ff_hevc_rpi_decode_nal_sps(gb, s->avctx, &s->ps,\n+                                     s->apply_defdispwin);\n+        if (ret < 0)\n+            goto fail;\n+        break;\n+    case HEVC_NAL_PPS:\n+        ret = ff_hevc_rpi_decode_nal_pps(gb, s->avctx, &s->ps);\n+        if (ret < 0)\n+            goto fail;\n+        break;\n+    case HEVC_NAL_SEI_PREFIX:\n+    case HEVC_NAL_SEI_SUFFIX:\n+        ret = ff_hevc_rpi_decode_nal_sei(gb, s->avctx, &s->sei, &s->ps, s->nal_unit_type);\n+        if (ret < 0)\n+            goto fail;\n+        break;\n+    case HEVC_NAL_TRAIL_R:\n+    case HEVC_NAL_TRAIL_N:\n+    case HEVC_NAL_TSA_N:\n+    case HEVC_NAL_TSA_R:\n+    case HEVC_NAL_STSA_N:\n+    case HEVC_NAL_STSA_R:\n+    case HEVC_NAL_BLA_W_LP:\n+    case HEVC_NAL_BLA_W_RADL:\n+    case HEVC_NAL_BLA_N_LP:\n+    case HEVC_NAL_IDR_W_RADL:\n+    case HEVC_NAL_IDR_N_LP:\n+    case HEVC_NAL_CRA_NUT:\n+    case HEVC_NAL_RADL_N:\n+    case HEVC_NAL_RADL_R:\n+    case HEVC_NAL_RASL_N:\n+    case HEVC_NAL_RASL_R:\n+        ret = hls_slice_header(s);\n+        if (ret < 0)\n+            return ret;\n+\n+        // The definition of _N unit types is \"non-reference for other frames\n+        // with the same temporal_id\" so they may/will be ref frames for pics\n+        // with a higher temporal_id.\n+        s->used_for_ref = s->ps.sps->max_sub_layers > s->temporal_id + 1 ||\n+            !is_non_ref_unit_type(s->nal_unit_type);\n+        s->offload_recon = s->threads_type != 0 && s->used_for_ref;\n+        s->is_irap = IS_IRAP(s);\n+\n+#if DEBUG_DECODE_N\n+        {\n+            static int z = 0;\n+            if (IS_IDR(s)) {\n+                z = 1;\n+            }\n+            if (z != 0 && z++ > DEBUG_DECODE_N) {\n+                s->is_decoded = 0;\n+                break;\n+            }\n+        }\n+#endif\n+        if (\n+            (s->avctx->skip_frame >= AVDISCARD_NONREF && !s->used_for_ref) ||\n+            (s->avctx->skip_frame >= AVDISCARD_BIDIR && s->sh.slice_type == HEVC_SLICE_B) ||\n+            (s->avctx->skip_frame >= AVDISCARD_NONINTRA && s->sh.slice_type != HEVC_SLICE_I) ||\n+            (s->avctx->skip_frame >= AVDISCARD_NONKEY && !IS_IRAP(s)))\n+        {\n+            s->is_decoded = 0;\n+            break;\n+        }\n+\n+        if (s->sh.first_slice_in_pic_flag) {\n+            if (s->max_ra == INT_MAX) {\n+                if (s->nal_unit_type == HEVC_NAL_CRA_NUT || IS_BLA(s)) {\n+                    s->max_ra = s->poc;\n+                } else {\n+                    if (IS_IDR(s))\n+                        s->max_ra = INT_MIN;\n+                }\n+            }\n+\n+            if ((s->nal_unit_type == HEVC_NAL_RASL_R || s->nal_unit_type == HEVC_NAL_RASL_N) &&\n+                s->poc <= s->max_ra) {\n+                s->is_decoded = 0;\n+                break;\n+            } else {\n+                if (s->nal_unit_type == HEVC_NAL_RASL_R && s->poc > s->max_ra)\n+                    s->max_ra = INT_MIN;\n+            }\n+\n+            ret = hevc_frame_start(s);\n+            if (ret < 0)\n+                return ret;\n+        } else if (!s->ref) {\n+            av_log(s->avctx, AV_LOG_ERROR, \"First slice in a frame missing.\\n\");\n+            goto fail;\n+        }\n+\n+        if (s->nal_unit_type != s->first_nal_type) {\n+            av_log(s->avctx, AV_LOG_ERROR,\n+                   \"Non-matching NAL types of the VCL NALUs: %d %d\\n\",\n+                   s->first_nal_type, s->nal_unit_type);\n+            return AVERROR_INVALIDDATA;\n+        }\n+\n+        if (!s->sh.dependent_slice_segment_flag &&\n+            s->sh.slice_type != HEVC_SLICE_I) {\n+            ret = ff_hevc_rpi_slice_rpl(s);\n+            if (ret < 0) {\n+                av_log(s->avctx, AV_LOG_WARNING,\n+                       \"Error constructing the reference lists for the current slice.\\n\");\n+                goto fail;\n+            }\n+        }\n+\n+        ctb_addr_ts = hls_slice_data(s, nal);\n+        if (ctb_addr_ts >= s->ps.sps->ctb_size) {\n+            s->is_decoded = 1;\n+        }\n+\n+        if (ctb_addr_ts < 0) {\n+            ret = ctb_addr_ts;\n+            goto fail;\n+        }\n+        break;\n+    case HEVC_NAL_EOS_NUT:\n+    case HEVC_NAL_EOB_NUT:\n+        s->seq_decode = (s->seq_decode + 1) & 0xff;\n+        s->max_ra     = INT_MAX;\n+        break;\n+    case HEVC_NAL_AUD:\n+    case HEVC_NAL_FD_NUT:\n+        break;\n+    default:\n+        av_log(s->avctx, AV_LOG_INFO,\n+               \"Skipping NAL unit %d\\n\", s->nal_unit_type);\n+    }\n+\n+    return 0;\n+fail:\n+    if (s->avctx->err_recognition & AV_EF_EXPLODE)\n+        return ret;\n+    return 0;\n+}\n+\n+static int decode_nal_units(HEVCRpiContext *s, const uint8_t *buf, int length)\n+{\n+    int i, ret = 0;\n+    int eos_at_start = 1;\n+\n+    s->ref = NULL;\n+    s->last_eos = s->eos;\n+    s->eos = 0;\n+\n+    /* split the input packet into NAL units, so we know the upper bound on the\n+     * number of slices in the frame */\n+    ret = ff_h2645_packet_split(&s->pkt, buf, length, s->avctx, s->is_nalff,\n+                                s->nal_length_size, s->avctx->codec_id, 0, 0);\n+    if (ret < 0) {\n+        av_log(s->avctx, AV_LOG_ERROR,\n+               \"Error splitting the input into NAL units.\\n\");\n+        return ret;\n+    }\n+\n+    for (i = 0; i < s->pkt.nb_nals; i++) {\n+        if (s->pkt.nals[i].type == HEVC_NAL_EOB_NUT ||\n+            s->pkt.nals[i].type == HEVC_NAL_EOS_NUT) {\n+            if (eos_at_start) {\n+                s->last_eos = 1;\n+            } else {\n+                s->eos = 1;\n+            }\n+        } else {\n+            eos_at_start = 0;\n+        }\n+    }\n+\n+    /* decode the NAL units */\n+    for (i = 0; i < s->pkt.nb_nals; i++) {\n+        ret = decode_nal_unit(s, &s->pkt.nals[i]);\n+        if (ret < 0) {\n+            av_log(s->avctx, AV_LOG_WARNING,\n+                   \"Error parsing NAL unit #%d.\\n\", i);\n+            goto fail;\n+        }\n+    }\n+\n+fail:  // Also success path\n+    if (s->ref != NULL) {\n+        if (s->used_for_ref && s->threads_type != 0) {\n+            ff_hevc_rpi_progress_signal_all_done(s);\n+        }\n+        else {\n+            // Flush frame to real memory as we expect to be able to pass\n+            // it straight on to mmal\n+            flush_frame(s, s->frame);\n+        }\n+    }\n+    return ret;\n+}\n+\n+static void print_md5(void *log_ctx, int level, uint8_t md5[16])\n+{\n+    int i;\n+    for (i = 0; i < 16; i++)\n+        av_log(log_ctx, level, \"%02\"PRIx8, md5[i]);\n+}\n+\n+static int verify_md5(HEVCRpiContext *s, AVFrame *frame)\n+{\n+    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);\n+    int pixel_shift;\n+    int i, j;\n+\n+    if (!desc)\n+        return AVERROR(EINVAL);\n+\n+    pixel_shift = desc->comp[0].depth > 8;\n+\n+    av_log(s->avctx, AV_LOG_DEBUG, \"Verifying checksum for frame with POC %d: \",\n+           s->poc);\n+\n+    /* the checksums are LE, so we have to byteswap for >8bpp formats\n+     * on BE arches */\n+#if HAVE_BIGENDIAN\n+    if (pixel_shift && !s->checksum_buf) {\n+        av_fast_malloc(&s->checksum_buf, &s->checksum_buf_size,\n+                       FFMAX3(frame->linesize[0], frame->linesize[1],\n+                              frame->linesize[2]));\n+        if (!s->checksum_buf)\n+            return AVERROR(ENOMEM);\n+    }\n+#endif\n+\n+    for (i = 0; frame->data[i]; i++) {\n+        int width  = s->avctx->coded_width;\n+        int height = s->avctx->coded_height;\n+        int w = (i == 1 || i == 2) ? (width  >> desc->log2_chroma_w) : width;\n+        int h = (i == 1 || i == 2) ? (height >> desc->log2_chroma_h) : height;\n+        uint8_t md5[16];\n+\n+        av_md5_init(s->md5_ctx);\n+        for (j = 0; j < h; j++) {\n+            const uint8_t *src = frame->data[i] + j * frame_stride1(frame, 1);\n+#if HAVE_BIGENDIAN\n+            if (pixel_shift) {\n+                s->bdsp.bswap16_buf((uint16_t *) s->checksum_buf,\n+                                    (const uint16_t *) src, w);\n+                src = s->checksum_buf;\n+            }\n+#endif\n+            av_md5_update(s->md5_ctx, src, w << pixel_shift);\n+        }\n+        av_md5_final(s->md5_ctx, md5);\n+\n+        if (!memcmp(md5, s->sei.picture_hash.md5[i], 16)) {\n+            av_log   (s->avctx, AV_LOG_DEBUG, \"plane %d - correct \", i);\n+            print_md5(s->avctx, AV_LOG_DEBUG, md5);\n+            av_log   (s->avctx, AV_LOG_DEBUG, \"; \");\n+        } else {\n+            av_log   (s->avctx, AV_LOG_ERROR, \"mismatching checksum of plane %d - \", i);\n+            print_md5(s->avctx, AV_LOG_ERROR, md5);\n+            av_log   (s->avctx, AV_LOG_ERROR, \" != \");\n+            print_md5(s->avctx, AV_LOG_ERROR, s->sei.picture_hash.md5[i]);\n+            av_log   (s->avctx, AV_LOG_ERROR, \"\\n\");\n+            return AVERROR_INVALIDDATA;\n+        }\n+    }\n+\n+    av_log(s->avctx, AV_LOG_DEBUG, \"\\n\");\n+\n+    return 0;\n+}\n+\n+static int all_sps_supported(const HEVCRpiContext * const s)\n+{\n+    for (unsigned int i = 0; i < FF_ARRAY_ELEMS(s->ps.sps_list); i++) {\n+        if (s->ps.sps_list[i] != NULL)\n+        {\n+            const HEVCRpiSPS * const sps = (const HEVCRpiSPS*)s->ps.sps_list[i]->data;\n+            if (!is_sps_supported(sps))\n+                return 0;\n+        }\n+    }\n+    return 1;\n+}\n+\n+static int hevc_rpi_decode_extradata(HEVCRpiContext *s, uint8_t *buf, int length, int first)\n+{\n+    int ret, i;\n+\n+    ret = ff_hevc_rpi_decode_extradata(buf, length, &s->ps, &s->sei, &s->is_nalff,\n+                                   &s->nal_length_size, s->avctx->err_recognition,\n+                                   s->apply_defdispwin, s->avctx);\n+    if (ret < 0)\n+        return ret;\n+\n+    /* export stream parameters from the first SPS */\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->ps.sps_list); i++) {\n+        if (first && s->ps.sps_list[i]) {\n+            const HEVCRpiSPS *sps = (const HEVCRpiSPS*)s->ps.sps_list[i]->data;\n+            export_stream_params(s->avctx, &s->ps, sps);\n+            break;\n+        }\n+    }\n+\n+    return 0;\n+}\n+\n+static int hevc_rpi_decode_frame(AVCodecContext *avctx, void *data, int *got_output,\n+                             AVPacket *avpkt)\n+{\n+    int ret;\n+    int new_extradata_size;\n+    uint8_t *new_extradata;\n+    HEVCRpiContext *s = avctx->priv_data;\n+\n+    if (!avpkt->size) {\n+        ret = ff_hevc_rpi_output_frame(s, data, 1);\n+        if (ret < 0)\n+            return ret;\n+\n+        *got_output = ret;\n+        return 0;\n+    }\n+\n+    new_extradata = av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA,\n+                                            &new_extradata_size);\n+    if (new_extradata && new_extradata_size > 0) {\n+        ret = hevc_rpi_decode_extradata(s, new_extradata, new_extradata_size, 0);\n+        if (ret < 0)\n+            return ret;\n+    }\n+\n+    s->ref = NULL;\n+    ret    = decode_nal_units(s, avpkt->data, avpkt->size);\n+    if (ret < 0)\n+        return ret;\n+\n+    /* verify the SEI checksum */\n+    if (avctx->err_recognition & AV_EF_CRCCHECK && s->is_decoded &&\n+        s->sei.picture_hash.is_md5) {\n+        ret = verify_md5(s, s->ref->frame);\n+        if (ret < 0 && avctx->err_recognition & AV_EF_EXPLODE) {\n+            ff_hevc_rpi_unref_frame(s, s->ref, ~0);\n+            return ret;\n+        }\n+    }\n+    s->sei.picture_hash.is_md5 = 0;\n+\n+    if (s->is_decoded) {\n+        av_log(avctx, AV_LOG_DEBUG, \"Decoded frame with POC %d.\\n\", s->poc);\n+        s->is_decoded = 0;\n+    }\n+\n+    if (s->output_frame->buf[0]) {\n+        av_frame_move_ref(data, s->output_frame);\n+        *got_output = 1;\n+    }\n+\n+    return avpkt->size;\n+}\n+\n+static int hevc_ref_frame(HEVCRpiContext *s, HEVCRpiFrame *dst, HEVCRpiFrame *src)\n+{\n+    int ret;\n+\n+    ret = ff_thread_ref_frame(&dst->tf, &src->tf);\n+    if (ret < 0)\n+        return ret;\n+\n+    if (src->col_mvf_buf != NULL)\n+    {\n+        dst->col_mvf_buf = av_buffer_ref(src->col_mvf_buf);\n+        if (!dst->col_mvf_buf)\n+            goto fail;\n+    }\n+    dst->col_mvf = src->col_mvf;\n+\n+    dst->poc        = src->poc;\n+    dst->flags      = src->flags;\n+    dst->sequence   = src->sequence;\n+    return 0;\n+\n+fail:\n+    ff_hevc_rpi_unref_frame(s, dst, ~0);\n+    return AVERROR(ENOMEM);\n+}\n+\n+\n+static av_cold int hevc_decode_free(AVCodecContext *avctx)\n+{\n+    HEVCRpiContext * const s = avctx->priv_data;\n+    int i;\n+\n+    pic_arrays_free(s);\n+\n+    av_freep(&s->md5_ctx);\n+\n+    av_freep(&s->cabac_save);\n+\n+#if RPI_EXTRA_BIT_THREADS\n+    bit_threads_kill(s);\n+#endif\n+\n+    hevc_exit_worker(s);\n+    for (i = 0; i != 2; ++i) {\n+        ff_hevc_rpi_progress_kill_state(s->progress_states + i);\n+    }\n+    job_lc_kill(s->HEVClc);\n+\n+    av_freep(&s->sao_pixel_buffer_h[0]);  // [1] & [2] allocated with [0]\n+    av_freep(&s->sao_pixel_buffer_v[0]);\n+    av_frame_free(&s->output_frame);\n+\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {\n+        ff_hevc_rpi_unref_frame(s, &s->DPB[i], ~0);\n+        av_frame_free(&s->DPB[i].frame);\n+    }\n+\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->ps.vps_list); i++)\n+        av_buffer_unref(&s->ps.vps_list[i]);\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->ps.sps_list); i++)\n+        av_buffer_unref(&s->ps.sps_list[i]);\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->ps.pps_list); i++)\n+        av_buffer_unref(&s->ps.pps_list[i]);\n+    s->ps.sps = NULL;\n+    s->ps.pps = NULL;\n+    s->ps.vps = NULL;\n+\n+    // Free separately from sLists as used that way by RPI WPP\n+    for (i = 0; i < MAX_NB_THREADS && s->HEVClcList[i] != NULL; ++i) {\n+        av_freep(s->HEVClcList + i);\n+    }\n+    s->HEVClc = NULL;  // Allocated as part of HEVClcList\n+\n+    ff_h2645_packet_uninit(&s->pkt);\n+\n+    if (s->qpu_init_ok)\n+        vpu_qpu_term();\n+    s->qpu_init_ok = 0;\n+\n+    return 0;\n+}\n+\n+\n+static av_cold int hevc_init_context(AVCodecContext *avctx)\n+{\n+    HEVCRpiContext *s = avctx->priv_data;\n+    int i;\n+\n+    s->avctx = avctx;\n+\n+    s->HEVClc = av_mallocz(sizeof(HEVCRpiLocalContext));\n+    if (!s->HEVClc)\n+        goto fail;\n+    s->HEVClcList[0] = s->HEVClc;\n+\n+    if (vpu_qpu_init() != 0)\n+        goto fail;\n+    s->qpu_init_ok = 1;\n+\n+#if RPI_QPU_EMU_Y || RPI_QPU_EMU_C\n+    {\n+        static const uint32_t dframe[1] = {0x80808080};\n+        s->qpu_dummy_frame_emu = (const uint8_t *)dframe;\n+    }\n+#endif\n+#if !RPI_QPU_EMU_Y || !RPI_QPU_EMU_C\n+    s->qpu_dummy_frame_qpu = qpu_dummy();\n+#endif\n+\n+    bt_lc_init(s, s->HEVClc, 0);\n+    job_lc_init(s->HEVClc);\n+\n+    for (i = 0; i != 2; ++i) {\n+        ff_hevc_rpi_progress_init_state(s->progress_states + i);\n+    }\n+\n+    if ((s->cabac_save = av_malloc(sizeof(*s->cabac_save))) == NULL)\n+        goto fail;\n+\n+     if ((s->output_frame = av_frame_alloc()) == NULL)\n+        goto fail;\n+\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {\n+        s->DPB[i].frame = av_frame_alloc();\n+        if (!s->DPB[i].frame)\n+            goto fail;\n+        s->DPB[i].tf.f = s->DPB[i].frame;\n+        s->DPB[i].dpb_no = i;\n+    }\n+\n+    s->max_ra = INT_MAX;\n+\n+    if ((s->md5_ctx = av_md5_alloc()) == NULL)\n+        goto fail;\n+\n+    s->context_initialized = 1;\n+    s->eos = 0;\n+\n+    ff_hevc_rpi_reset_sei(&s->sei);\n+\n+    return 0;\n+\n+fail:\n+    av_log(s->avctx, AV_LOG_ERROR, \"%s: Failed\\n\", __func__);\n+    hevc_decode_free(avctx);\n+    return AVERROR(ENOMEM);\n+}\n+\n+#if HAVE_THREADS\n+static int hevc_update_thread_context(AVCodecContext *dst,\n+                                      const AVCodecContext *src)\n+{\n+    HEVCRpiContext *s  = dst->priv_data;\n+    HEVCRpiContext *s0 = src->priv_data;\n+    int i, ret;\n+\n+    av_assert0(s->context_initialized);\n+\n+    // dst == src can happen according to the comments and in that case\n+    // there is nothing to do here\n+    if (dst == src)\n+        return 0;\n+\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) {\n+        ff_hevc_rpi_unref_frame(s, &s->DPB[i], ~0);\n+        if (s0->DPB[i].frame->buf[0]) {\n+            ret = hevc_ref_frame(s, &s->DPB[i], &s0->DPB[i]);\n+            if (ret < 0)\n+                return ret;\n+        }\n+    }\n+\n+    if (s->ps.sps != s0->ps.sps)\n+        s->ps.sps = NULL;\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->ps.vps_list); i++) {\n+        av_buffer_unref(&s->ps.vps_list[i]);\n+        if (s0->ps.vps_list[i]) {\n+            s->ps.vps_list[i] = av_buffer_ref(s0->ps.vps_list[i]);\n+            if (!s->ps.vps_list[i])\n+                return AVERROR(ENOMEM);\n+        }\n+    }\n+\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->ps.sps_list); i++) {\n+        av_buffer_unref(&s->ps.sps_list[i]);\n+        if (s0->ps.sps_list[i]) {\n+            s->ps.sps_list[i] = av_buffer_ref(s0->ps.sps_list[i]);\n+            if (!s->ps.sps_list[i])\n+                return AVERROR(ENOMEM);\n+        }\n+    }\n+\n+    for (i = 0; i < FF_ARRAY_ELEMS(s->ps.pps_list); i++) {\n+        av_buffer_unref(&s->ps.pps_list[i]);\n+        if (s0->ps.pps_list[i]) {\n+            s->ps.pps_list[i] = av_buffer_ref(s0->ps.pps_list[i]);\n+            if (!s->ps.pps_list[i])\n+                return AVERROR(ENOMEM);\n+        }\n+    }\n+\n+    if (s->ps.sps != s0->ps.sps)\n+        if ((ret = set_sps(s, s0->ps.sps, src->pix_fmt)) < 0)\n+            return ret;\n+\n+    s->seq_decode = s0->seq_decode;\n+    s->seq_output = s0->seq_output;\n+    s->pocTid0    = s0->pocTid0;\n+    s->max_ra     = s0->max_ra;\n+    s->eos        = s0->eos;\n+    s->no_rasl_output_flag = s0->no_rasl_output_flag;\n+\n+    s->is_nalff        = s0->is_nalff;\n+    s->nal_length_size = s0->nal_length_size;\n+\n+    s->threads_type        = s0->threads_type;\n+\n+    if (s0->eos) {\n+        s->seq_decode = (s->seq_decode + 1) & 0xff;\n+        s->max_ra = INT_MAX;\n+    }\n+\n+    s->sei.frame_packing        = s0->sei.frame_packing;\n+    s->sei.display_orientation  = s0->sei.display_orientation;\n+    s->sei.mastering_display    = s0->sei.mastering_display;\n+    s->sei.content_light        = s0->sei.content_light;\n+    s->sei.alternative_transfer = s0->sei.alternative_transfer;\n+\n+    // * We do this here as it allows us to easily locate our parents\n+    //   global job pool, but there really should be a less nasty way\n+    if (s->jbc == NULL)\n+    {\n+        av_assert0((s->jbc = rpi_job_ctl_new(s0->jbc->jbg)) != NULL);\n+        hevc_init_worker(s);\n+    }\n+\n+    return 0;\n+}\n+#endif\n+\n+#include <sys/stat.h>\n+static int qpu_ok(void)\n+{\n+    static int is_pi3 = -1;\n+    if (is_pi3 == -1)\n+    {\n+        struct stat sb;\n+        is_pi3 = (stat(\"/dev/rpivid-intcmem\", &sb) != 0);\n+    }\n+    return is_pi3;\n+}\n+\n+static av_cold int hevc_decode_init(AVCodecContext *avctx)\n+{\n+    HEVCRpiContext *s = avctx->priv_data;\n+    int ret;\n+\n+    if (!qpu_ok())\n+        return AVERROR_DECODER_NOT_FOUND;\n+\n+    if ((ret = hevc_init_context(avctx)) < 0)\n+        return ret;\n+\n+    // If we are a child context then stop now\n+    // Everything after this point is either 1st decode setup or global alloc\n+    // that must not be repeated\n+    // Global info will be copied into children in update_thread_context (we\n+    // can't do it here as we have no way of finding the parent context)\n+    if (avctx->internal->is_copy)\n+        return 0;\n+\n+    // Job allocation requires VCSM alloc to work so ensure that we have it\n+    // initialised by this point\n+    {\n+        HEVCRpiJobGlobal * const jbg = jbg_new(FFMAX(avctx->thread_count * 3, 5));\n+        if (jbg == NULL) {\n+            av_log(s->avctx, AV_LOG_ERROR, \"%s: Job global init failed\\n\", __func__);\n+            ret = AVERROR(ENOMEM);\n+            goto fail;\n+        }\n+\n+        if ((s->jbc = rpi_job_ctl_new(jbg)) == NULL) {\n+            av_log(s->avctx, AV_LOG_ERROR, \"%s: Job ctl init failed\\n\", __func__);\n+            ret = AVERROR(ENOMEM);\n+            goto fail;\n+        }\n+    }\n+\n+    hevc_init_worker(s);\n+\n+    s->eos = 1;\n+\n+    if (avctx->extradata_size > 0 && avctx->extradata) {\n+        if ((ret = hevc_rpi_decode_extradata(s, avctx->extradata, avctx->extradata_size, 1)) < 0)\n+            goto fail;\n+\n+        if (!all_sps_supported(s)) {\n+            ret = AVERROR_DECODER_NOT_FOUND;\n+            goto fail;\n+        }\n+    }\n+\n+    if((avctx->active_thread_type & FF_THREAD_FRAME) && avctx->thread_count > 1)\n+        s->threads_type = FF_THREAD_FRAME;\n+    else\n+        s->threads_type = 0;\n+\n+    return 0;\n+\n+fail:\n+    hevc_decode_free(avctx);\n+    return ret;\n+}\n+\n+static void hevc_decode_flush(AVCodecContext *avctx)\n+{\n+    HEVCRpiContext *s = avctx->priv_data;\n+    ff_hevc_rpi_flush_dpb(s);\n+    s->max_ra = INT_MAX;\n+    s->eos = 1;\n+}\n+\n+typedef struct  hwaccel_rpi3_qpu_env_s {\n+    const AVClass *av_class;\n+    AVZcEnvPtr zc;\n+} hwaccel_rpi3_qpu_env_t;\n+\n+static int hwaccel_alloc_frame(AVCodecContext *s, AVFrame *frame)\n+{\n+    hwaccel_rpi3_qpu_env_t * const r3 = s->internal->hwaccel_priv_data;\n+    int rv;\n+\n+    if (av_rpi_zc_in_use(s))\n+    {\n+        rv = s->get_buffer2(s, frame, 0);\n+    }\n+    else\n+    {\n+        rv = av_rpi_zc_get_buffer(r3->zc, frame);\n+        if (rv == 0)\n+            rv = av_rpi_zc_resolve_frame(frame, ZC_RESOLVE_ALLOC_VALID);  // actually do the alloc\n+    }\n+\n+    if (rv == 0 &&\n+        (rv = ff_attach_decode_data(frame)) < 0)\n+    {\n+        av_frame_unref(frame);\n+    }\n+\n+    return rv;\n+}\n+\n+static int hwaccel_rpi3_qpu_free(AVCodecContext *avctx)\n+{\n+    hwaccel_rpi3_qpu_env_t * const r3 = avctx->internal->hwaccel_priv_data;\n+    av_rpi_zc_int_env_freep(&r3->zc);\n+    return 0;\n+}\n+\n+static int hwaccel_rpi3_qpu_init(AVCodecContext *avctx)\n+{\n+    hwaccel_rpi3_qpu_env_t * const r3 = avctx->internal->hwaccel_priv_data;\n+\n+    if ((r3->zc = av_rpi_zc_int_env_alloc(avctx)) == NULL)\n+        goto fail;\n+\n+    return 0;\n+\n+fail:\n+    av_log(avctx, AV_LOG_ERROR, \"Rpi3 QPU init failed\\n\");\n+    hwaccel_rpi3_qpu_free(avctx);\n+    return AVERROR(ENOMEM);\n+}\n+\n+\n+#define OFFSET(x) offsetof(HEVCRpiContext, x)\n+#define PAR (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)\n+\n+\n+static const AVOption options[] = {\n+    { \"apply_defdispwin\", \"Apply default display window from VUI\", OFFSET(apply_defdispwin),\n+        AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, PAR },\n+    { \"strict-displaywin\", \"stricly apply default display window size\", OFFSET(apply_defdispwin),\n+        AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, PAR },\n+    { NULL },\n+};\n+\n+static const AVClass hevc_rpi_decoder_class = {\n+    .class_name = \"HEVC RPI decoder\",\n+    .item_name  = av_default_item_name,\n+    .option     = options,\n+    .version    = LIBAVUTIL_VERSION_INT,\n+};\n+\n+static const enum AVPixelFormat hevc_rpi_pix_fmts[] = {\n+    AV_PIX_FMT_SAND128,\n+    AV_PIX_FMT_SAND64_10,\n+    AV_PIX_FMT_NONE\n+};\n+\n+\n+static const AVHWAccel hwaccel_rpi3_qpu = {\n+    .name           = \"Pi3 QPU Hwaccel\",\n+    .alloc_frame    = hwaccel_alloc_frame,\n+    .init           = hwaccel_rpi3_qpu_init,\n+    .uninit         = hwaccel_rpi3_qpu_free,\n+    .priv_data_size = sizeof(hwaccel_rpi3_qpu_env_t),\n+    .caps_internal  = HWACCEL_CAP_ASYNC_SAFE | HWACCEL_CAP_MT_SAFE,\n+};\n+\n+static const AVCodecHWConfigInternal hevc_rpi_hw_config_sand128 =\n+{\n+    .public = {\n+        .pix_fmt = AV_PIX_FMT_SAND128,\n+        .methods = AV_CODEC_HW_CONFIG_METHOD_AD_HOC,\n+        .device_type = AV_HWDEVICE_TYPE_NONE,\n+    },\n+    .hwaccel = &hwaccel_rpi3_qpu\n+};\n+static const AVCodecHWConfigInternal hevc_rpi_hw_config_sand64_10 =\n+{\n+    .public = {\n+        .pix_fmt = AV_PIX_FMT_SAND64_10,\n+        .methods = AV_CODEC_HW_CONFIG_METHOD_AD_HOC,\n+        .device_type = AV_HWDEVICE_TYPE_NONE,\n+    },\n+    .hwaccel = &hwaccel_rpi3_qpu\n+};\n+\n+\n+static const AVCodecHWConfigInternal *hevc_rpi_hw_configs[] = {\n+    &hevc_rpi_hw_config_sand128,\n+    &hevc_rpi_hw_config_sand64_10,\n+    NULL\n+};\n+\n+\n+AVCodec ff_hevc_rpi_decoder = {\n+    .name                  = \"hevc_rpi\",\n+    .long_name             = NULL_IF_CONFIG_SMALL(\"HEVC (rpi)\"),\n+    .type                  = AVMEDIA_TYPE_VIDEO,\n+    .id                    = AV_CODEC_ID_HEVC,\n+    .priv_data_size        = sizeof(HEVCRpiContext),\n+    .priv_class            = &hevc_rpi_decoder_class,\n+    .init                  = hevc_decode_init,\n+    .close                 = hevc_decode_free,\n+    .decode                = hevc_rpi_decode_frame,\n+    .flush                 = hevc_decode_flush,\n+    .update_thread_context = ONLY_IF_THREADS_ENABLED(hevc_update_thread_context),\n+    .capabilities          = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |\n+                             AV_CODEC_CAP_HARDWARE |\n+                             AV_CODEC_CAP_AVOID_PROBING |\n+#if 0\n+    // Debugging is often easier without threads getting in the way\n+                            0,\n+#warning H265 threading turned off\n+#else\n+    // We only have decent optimisation for frame - so only admit to that\n+                             AV_CODEC_CAP_FRAME_THREADS,\n+#endif\n+    .caps_internal         = FF_CODEC_CAP_INIT_THREADSAFE |\n+                             FF_CODEC_CAP_EXPORTS_CROPPING |\n+                             FF_CODEC_CAP_ALLOCATE_PROGRESS,\n+    .pix_fmts              = hevc_rpi_pix_fmts,\n+    .profiles              = NULL_IF_CONFIG_SMALL(ff_hevc_profiles),\n+    .hw_configs            = hevc_rpi_hw_configs,\n+//    .wrapper_name          = \"hevc_rpi\",\n+};\n+\ndiff --git a/libavcodec/rpi_hevcdec.h b/libavcodec/rpi_hevcdec.h\nnew file mode 100644\nindex 0000000000..1f94d18673\n--- /dev/null\n+++ b/libavcodec/rpi_hevcdec.h\n@@ -0,0 +1,1091 @@\n+/*\n+ * HEVC video decoder\n+ *\n+ * Copyright (C) 2012 - 2013 Guillaume Martres\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#ifndef AVCODEC_RPI_HEVCDEC_H\n+#define AVCODEC_RPI_HEVCDEC_H\n+\n+#include \"config.h\"\n+\n+#include <stdatomic.h>\n+\n+#include \"libavutil/buffer.h\"\n+\n+#include \"avcodec.h\"\n+#include \"bswapdsp.h\"\n+#include \"cabac.h\"\n+#include \"get_bits.h\"\n+#include \"rpi_hevcpred.h\"\n+#include \"h2645_parse.h\"\n+#include \"hevc.h\"\n+#include \"rpi_hevc_mv.h\"\n+#include \"rpi_hevc_ps.h\"\n+#include \"rpi_hevc_sei.h\"\n+#include \"rpi_hevcdsp.h\"\n+#include \"internal.h\"\n+#include \"thread.h\"\n+#include \"videodsp.h\"\n+\n+#if ARCH_ARM\n+#include \"arm/rpi_hevc_misc_neon.h\"\n+#endif\n+\n+#define MAX_NB_THREADS 16\n+#define SHIFT_CTB_WPP 2\n+\n+//TODO: check if this is really the maximum\n+#define MAX_TRANSFORM_DEPTH 5\n+\n+#define MAX_TB_SIZE 32\n+#define MAX_QP 51\n+#define DEFAULT_INTRA_TC_OFFSET 2\n+\n+#define HEVC_CONTEXTS 199\n+\n+#define MRG_MAX_NUM_CANDS     5\n+\n+#define HEVC_MAX_CTB_SIZE (1 << HEVC_MAX_LOG2_CTB_SIZE)  // 64\n+\n+// Size of DPB array\n+#define HEVC_DPB_ELS            32\n+\n+#define L0 0\n+#define L1 1\n+\n+#define EPEL_EXTRA_BEFORE 1\n+#define EPEL_EXTRA_AFTER  2\n+#define EPEL_EXTRA        3\n+#define QPEL_EXTRA_BEFORE 3\n+#define QPEL_EXTRA_AFTER  4\n+#define QPEL_EXTRA        7\n+\n+#define EDGE_EMU_BUFFER_STRIDE 80\n+\n+#include <semaphore.h>\n+#include \"rpi_qpu.h\"\n+\n+// Max jobs per frame thread. Actual usage will be limited by the size\n+// of the global job pool\n+// ?? Limits\n+#define RPI_MAX_JOBS            8\n+\n+// This is the number of _extra_ bit threads - we will have\n+// RPI_EXTRA_BIT_THREADS+1 threads actually doing the processing\n+//\n+// 0 is legitimate and will disable our WPP processing\n+//#define RPI_EXTRA_BIT_THREADS 0\n+#define RPI_EXTRA_BIT_THREADS   2\n+\n+// Number of separate threads/passes in worker\n+// 2 and 3 are the currently valid numbers\n+// At the moment 3 seems fractionally faster\n+//#define RPI_PASSES              2\n+#define RPI_PASSES              3\n+\n+// Print out various usage stats\n+#define RPI_TSTATS              0\n+\n+// Define RPI_COMPRESS_COEFFS to 1 to send coefficients in compressed form\n+#define RPI_COMPRESS_COEFFS     1\n+\n+// Wait for VPU/QPU to finish in worker pass 0\n+// If 0 then the wait is in pass 1\n+//\n+// One might expect the better place to wait would be in pass 1 however\n+// testing shows that pass 0 produces overall faster decode.\n+// Interestingly it is QPU/VPU limited streams that seem to suffer\n+// from pass 1 waits, CPU limited ones tend to show a very mild gain.\n+// This define exists so it is easy to test this.\n+#define RPI_WORKER_WAIT_PASS_0  1\n+\n+// Use ARM emulation of QPU pred\n+// These are for debug only as the emulation makes only limited\n+// effort to be fast\n+#define RPI_QPU_EMU_Y           0\n+#define RPI_QPU_EMU_C           0\n+\n+// Max width & height we are prepared to consider\n+// Sand frame shape calc becomes confused with large frames\n+// Some buffer alloc also depends on this\n+#define HEVC_RPI_MAX_WIDTH      2048\n+#define HEVC_RPI_MAX_HEIGHT     1088\n+\n+\n+// Min CTB size is 16\n+#define HEVC_RPI_MAX_CTBS ((HEVC_RPI_MAX_WIDTH + 15) / 16) * ((HEVC_RPI_MAX_HEIGHT + 15) / 16)\n+\n+/**\n+ * Value of the luma sample at position (x, y) in the 2D array tab.\n+ */\n+#define SAMPLE(tab, x, y) ((tab)[(y) * s->sps->width + (x)])\n+#define SAMPLE_CTB(tab, x, y) ((tab)[(y) * min_cb_width + (x)])\n+\n+#define IS_IDR(s) ((s)->nal_unit_type == HEVC_NAL_IDR_W_RADL || (s)->nal_unit_type == HEVC_NAL_IDR_N_LP)\n+#define IS_BLA(s) ((s)->nal_unit_type == HEVC_NAL_BLA_W_RADL || (s)->nal_unit_type == HEVC_NAL_BLA_W_LP || \\\n+                   (s)->nal_unit_type == HEVC_NAL_BLA_N_LP)\n+#define IS_IRAP(s) ((s)->nal_unit_type >= 16 && (s)->nal_unit_type <= 23)\n+\n+enum RPSType {\n+    ST_CURR_BEF = 0,\n+    ST_CURR_AFT,\n+    ST_FOLL,\n+    LT_CURR,\n+    LT_FOLL,\n+    NB_RPS_TYPE,\n+};\n+\n+enum SyntaxElement {\n+    SAO_MERGE_FLAG = 0,\n+    SAO_TYPE_IDX,\n+    SAO_EO_CLASS,\n+    SAO_BAND_POSITION,\n+    SAO_OFFSET_ABS,\n+    SAO_OFFSET_SIGN,\n+    END_OF_SLICE_FLAG,\n+    SPLIT_CODING_UNIT_FLAG,\n+    CU_TRANSQUANT_BYPASS_FLAG,\n+    SKIP_FLAG,\n+    CU_QP_DELTA,\n+    PRED_MODE_FLAG,\n+    PART_MODE,\n+    PCM_FLAG,\n+    PREV_INTRA_LUMA_PRED_FLAG,\n+    MPM_IDX,\n+    REM_INTRA_LUMA_PRED_MODE,\n+    INTRA_CHROMA_PRED_MODE,\n+    MERGE_FLAG,\n+    MERGE_IDX,\n+    INTER_PRED_IDC,\n+    REF_IDX_L0,\n+    REF_IDX_L1,\n+    ABS_MVD_GREATER0_FLAG,\n+    ABS_MVD_GREATER1_FLAG,\n+    ABS_MVD_MINUS2,\n+    MVD_SIGN_FLAG,\n+    MVP_LX_FLAG,\n+    NO_RESIDUAL_DATA_FLAG,\n+    SPLIT_TRANSFORM_FLAG,\n+    CBF_LUMA,\n+    CBF_CB_CR,\n+    TRANSFORM_SKIP_FLAG,\n+    EXPLICIT_RDPCM_FLAG,\n+    EXPLICIT_RDPCM_DIR_FLAG,\n+    LAST_SIGNIFICANT_COEFF_X_PREFIX,\n+    LAST_SIGNIFICANT_COEFF_Y_PREFIX,\n+    LAST_SIGNIFICANT_COEFF_X_SUFFIX,\n+    LAST_SIGNIFICANT_COEFF_Y_SUFFIX,\n+    SIGNIFICANT_COEFF_GROUP_FLAG,\n+    SIGNIFICANT_COEFF_FLAG,\n+    COEFF_ABS_LEVEL_GREATER1_FLAG,\n+    COEFF_ABS_LEVEL_GREATER2_FLAG,\n+    COEFF_ABS_LEVEL_REMAINING,\n+    COEFF_SIGN_FLAG,\n+    LOG2_RES_SCALE_ABS,\n+    RES_SCALE_SIGN_FLAG,\n+    CU_CHROMA_QP_OFFSET_FLAG,\n+    CU_CHROMA_QP_OFFSET_IDX,\n+};\n+\n+enum PartMode {\n+    PART_2Nx2N = 0,\n+    PART_2NxN  = 1,\n+    PART_Nx2N  = 2,\n+    PART_NxN   = 3,\n+    PART_2NxnU = 4,\n+    PART_2NxnD = 5,\n+    PART_nLx2N = 6,\n+    PART_nRx2N = 7,\n+};\n+\n+enum PredMode {\n+    MODE_INTER = 0,\n+    MODE_INTRA,\n+    MODE_SKIP,\n+};\n+\n+enum InterPredIdc {\n+    PRED_L0 = 0,\n+    PRED_L1,\n+    PRED_BI,\n+};\n+\n+enum PredFlag {\n+    PF_INTRA = 0,\n+    PF_L0,\n+    PF_L1,\n+    PF_BI,\n+};\n+\n+enum SAOType {\n+    SAO_NOT_APPLIED = 0,\n+    SAO_BAND,\n+    SAO_EDGE,\n+    SAO_APPLIED\n+};\n+\n+enum SAOEOClass {\n+    SAO_EO_HORIZ = 0,\n+    SAO_EO_VERT,\n+    SAO_EO_135D,\n+    SAO_EO_45D,\n+};\n+\n+enum ScanType {\n+    SCAN_DIAG = 0,\n+    SCAN_HORIZ,\n+    SCAN_VERT,\n+};\n+\n+typedef struct RefPicList {\n+    struct HEVCRpiFrame *ref[HEVC_MAX_REFS];\n+    int list[HEVC_MAX_REFS];\n+    uint8_t isLongTerm[HEVC_MAX_REFS];\n+    int nb_refs;\n+} RefPicList;\n+\n+typedef struct RefPicListTab {\n+    RefPicList refPicList[2];\n+} RefPicListTab;\n+\n+typedef struct RpiCodingUnit {\n+    unsigned int x;             // Passed to deblock\n+    unsigned int y;\n+    unsigned int x_split;\n+    unsigned int y_split;\n+\n+    enum PredMode pred_mode;    ///< PredMode\n+    enum PartMode part_mode;    ///< PartMode\n+\n+    // Inferred parameters\n+    uint8_t intra_split_flag;   ///< IntraSplitFlag\n+    uint8_t max_trafo_depth;    ///< MaxTrafoDepth\n+    uint8_t cu_transquant_bypass_flag;\n+} RpiCodingUnit;\n+\n+typedef struct RpiPredictionUnit {\n+    uint8_t intra_pred_mode[4];\n+    uint8_t intra_pred_mode_c[4];\n+    uint8_t chroma_mode_c[4];\n+    uint8_t merge_flag;\n+} RpiPredictionUnit;\n+\n+typedef struct HEVCRpiTransformUnit {\n+    int8_t cu_qp_delta;\n+\n+    // Inferred parameters;\n+    uint8_t intra_pred_mode;\n+    uint8_t intra_pred_mode_c;\n+    uint8_t chroma_mode_c;\n+    uint8_t is_cu_qp_delta_wanted;\n+    uint8_t cu_chroma_qp_offset_wanted;\n+    const int8_t * qp_divmod6[3];\n+} HEVCRpiTransformUnit;\n+\n+typedef struct DBParams {\n+    int8_t beta_offset; // -12 to +12\n+    int8_t tc_offset;   // -12 to +12\n+} DBParams;\n+\n+#define HEVC_FRAME_FLAG_OUTPUT    (1 << 0)\n+#define HEVC_FRAME_FLAG_SHORT_REF (1 << 1)\n+#define HEVC_FRAME_FLAG_LONG_REF  (1 << 2)\n+#define HEVC_FRAME_FLAG_BUMPING   (1 << 3)\n+\n+struct HEVCRpiJob;\n+\n+typedef struct HEVCRpiFrame {\n+    AVFrame *frame;\n+    ThreadFrame tf;\n+    ColMvField *col_mvf;\n+    int poc;\n+    struct HEVCRpiFrame *collocated_ref;\n+\n+    AVBufferRef *col_mvf_buf;\n+\n+    /**\n+     * A sequence counter, so that old frames are output first\n+     * after a POC reset\n+     */\n+    uint16_t sequence;\n+\n+    /**\n+     * A combination of HEVC_FRAME_FLAG_*\n+     */\n+    uint8_t flags;\n+\n+    // Entry no in DPB - can be used as a small unique\n+    // frame identifier (within the current thread)\n+    uint8_t dpb_no;\n+} HEVCRpiFrame;\n+\n+typedef struct HEVCRpiLocalContext {\n+    HEVCRpiTransformUnit tu;\n+\n+    CABACContext cc;\n+\n+    // Vars that allow us to locate everything from just an lc\n+    struct HEVCRpiContext * context;  // ??? make const ???\n+    unsigned int lc_n; // lc list el no\n+\n+    // Job wait links\n+    struct HEVCRpiLocalContext * jw_next;\n+    struct HEVCRpiLocalContext * jw_prev;\n+    struct HEVCRpiLocalContext * ljw_next;\n+    struct HEVCRpiLocalContext * ljw_prev;\n+    struct HEVCRpiJob * volatile jw_job;\n+    sem_t jw_sem;\n+\n+    // ?? Wrap in structure ??\n+    sem_t bt_sem_in;\n+    sem_t * bt_psem_out;\n+    volatile int bt_terminate;\n+    unsigned int ts;\n+    unsigned int bt_last_line;  // Last line in this bit_thread chunk\n+    unsigned int bt_line_no;\n+    unsigned int bt_line_width;\n+    unsigned int bt_line_inc;\n+\n+    struct HEVCRpiJob * jb0;\n+    char unit_done;  // Set once we have dealt with this slice\n+    char bt_is_tile;\n+    char last_progress_good;\n+    char cabac_init_req;\n+\n+    uint8_t cabac_state[HEVC_CONTEXTS];\n+    uint8_t stat_coeff[4];\n+    GetBitContext gb;\n+\n+    uint8_t ct_depth;\n+    int8_t qp_y;\n+    int8_t curr_qp_y;\n+    int8_t qPy_pred;\n+\n+// N.B. Used by asm (neon) - do not change\n+#define AVAIL_S_UR  0\n+#define AVAIL_S_U   1\n+#define AVAIL_S_UL  2\n+#define AVAIL_S_L   3\n+#define AVAIL_S_DL  4\n+\n+#define AVAIL_U     (1 << AVAIL_S_U)\n+#define AVAIL_L     (1 << AVAIL_S_L)\n+#define AVAIL_UL    (1 << AVAIL_S_UL)\n+#define AVAIL_UR    (1 << AVAIL_S_UR)\n+#define AVAIL_DL    (1 << AVAIL_S_DL)\n+\n+// Intra filters - same number space as avail\n+#define FILTER_LIGHT    0x40\n+#define FILTER_STRONG   0x80\n+#define FILTER_EITHER   (FILTER_LIGHT | FILTER_STRONG)\n+\n+    uint8_t ctb_avail;\n+    int     end_of_ctb_x;\n+    int     end_of_ctb_y;\n+\n+    RpiCodingUnit cu;\n+    RpiPredictionUnit pu;\n+\n+#define BOUNDARY_LEFT_SLICE     (1 << 0)\n+#define BOUNDARY_LEFT_TILE      (1 << 1)\n+#define BOUNDARY_UPPER_SLICE    (1 << 2)\n+#define BOUNDARY_UPPER_TILE     (1 << 3)\n+    /* properties of the boundary of the current CTB for the purposes\n+     * of the deblocking filter */\n+    unsigned int boundary_flags;\n+\n+#define IPM_TAB_SIZE (HEVC_MAX_CTB_SIZE >> LOG2_MIN_PU_SIZE)\n+    uint8_t ipm_left[IPM_TAB_SIZE];\n+    uint8_t ipm_up[IPM_TAB_SIZE];\n+\n+//#define MVF_STASH_WIDTH       128\n+#define MVF_STASH_WIDTH       64\n+#define MVF_STASH_HEIGHT      64\n+#define MVF_STASH_WIDTH_PU    (MVF_STASH_WIDTH >> LOG2_MIN_PU_SIZE)\n+#define MVF_STASH_HEIGHT_PU   (MVF_STASH_HEIGHT >> LOG2_MIN_PU_SIZE)\n+    HEVCRpiMvField mvf_ul[1];\n+    HEVCRpiMvField mvf_stash[MVF_STASH_WIDTH_PU * MVF_STASH_HEIGHT_PU];\n+\n+    /* +7 is for subpixel interpolation, *2 for high bit depths */\n+//    DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[(MAX_PB_SIZE + 7) * EDGE_EMU_BUFFER_STRIDE * 2];\n+    /* The extended size between the new edge emu buffer is abused by SAO */\n+//    DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer2)[(MAX_PB_SIZE + 7) * EDGE_EMU_BUFFER_STRIDE * 2];\n+//    DECLARE_ALIGNED(32, int16_t, tmp [MAX_PB_SIZE * MAX_PB_SIZE]);\n+\n+} HEVCRpiLocalContext;\n+\n+// Each block can have an intra prediction and an add_residual command\n+// noof-cmds(2) * max-ctu height(64) / min-transform(4) * planes(3) * MAX_WIDTH\n+\n+// Sand only has 2 planes (Y/C)\n+#define RPI_MAX_PRED_CMDS (2*(HEVC_MAX_CTB_SIZE/4)*2*(HEVC_RPI_MAX_WIDTH/4))\n+\n+// Command for intra prediction and transform_add of predictions to coefficients\n+enum rpi_pred_cmd_e\n+{\n+    RPI_PRED_ADD_RESIDUAL,\n+    RPI_PRED_ADD_RESIDUAL_U, // = RPI_PRED_TRANSFORM_ADD + c_idx\n+    RPI_PRED_ADD_RESIDUAL_V, // = RPI_PRED_TRANSFORM_ADD + c_idx\n+    RPI_PRED_ADD_RESIDUAL_C, // Merged U+V\n+    RPI_PRED_ADD_DC,\n+    RPI_PRED_ADD_DC_U,       // Both U & V are effectively C\n+    RPI_PRED_ADD_DC_V,\n+    RPI_PRED_INTRA,\n+    RPI_PRED_INTRA_C,\n+    RPI_PRED_I_PCM,\n+    RPI_PRED_CMD_MAX\n+};\n+\n+typedef struct HEVCPredCmd {\n+    uint8_t type;\n+    uint8_t size;  // log2 \"size\" used by all variants\n+    uint8_t avail; // i_pred - but left here as they pack well\n+    uint8_t dummy;\n+    union {\n+        struct {  // TRANSFORM_ADD\n+            uint8_t * dst;\n+            const int16_t * buf;\n+            uint16_t stride;  // Should be good enough for all pic fmts we use\n+            int16_t dc;\n+        } ta;\n+        struct {\n+            uint8_t * dst;\n+            uint32_t stride;\n+            int dc;\n+        } dc;\n+        struct {  // INTRA\n+            uint16_t x;\n+            uint16_t y;\n+            enum IntraPredMode mode;\n+        } i_pred;\n+        struct {  // I_PCM\n+            uint16_t x;\n+            uint16_t y;\n+            const void * src;\n+            uint32_t src_len;\n+        } i_pcm;\n+    };\n+} HEVCPredCmd;\n+\n+union qpu_mc_pred_cmd_s;\n+struct qpu_mc_pred_y_p_s;\n+struct qpu_mc_src_s;\n+\n+typedef struct HEVCRpiInterPredQ\n+{\n+    union qpu_mc_pred_cmd_u *qpu_mc_base;\n+    union qpu_mc_pred_cmd_u *qpu_mc_curr;\n+    struct qpu_mc_src_s *last_l0;\n+    struct qpu_mc_src_s *last_l1;\n+    unsigned int load;\n+    uint32_t code_setup;\n+    uint32_t code_sync;\n+    uint32_t code_exit;\n+} HEVCRpiInterPredQ;\n+\n+typedef struct HEVCRpiInterPredEnv\n+{\n+    HEVCRpiInterPredQ * q;\n+    uint8_t n;                  // Number of Qs\n+    uint8_t n_grp;              // Number of Q in a group\n+    uint8_t curr;               // Current Q number (0..n-1)\n+    uint8_t used;               // 0 if nothing in any Q, 1 otherwise\n+    uint8_t used_grp;           // 0 if nothing in any Q in the current group\n+    unsigned int max_fill;\n+    unsigned int min_gap;\n+    GPU_MEM_PTR_T gptr;\n+} HEVCRpiInterPredEnv;\n+\n+typedef struct HEVCRpiIntraPredEnv {\n+    unsigned int n;        // Number of commands\n+    HEVCPredCmd * cmds;\n+} HEVCRpiIntraPredEnv;\n+\n+typedef struct HEVCRpiCoeffEnv {\n+    unsigned int n;\n+#if RPI_COMPRESS_COEFFS\n+    unsigned int packed; // Equal to 1 if coefficients should be being packed\n+    unsigned int packed_n; // Value of n when packed was set equal to 0 (i.e. the amount that is sent compressed).  Only valid if packed==0\n+#endif\n+    int16_t * buf;\n+} HEVCRpiCoeffEnv;\n+\n+typedef struct HEVCRpiCoeffsEnv {\n+    HEVCRpiCoeffEnv s[4];\n+    GPU_MEM_PTR_T gptr;\n+    void * mptr;\n+} HEVCRpiCoeffsEnv;\n+\n+typedef struct HEVCRpiFrameProgressWait {\n+    int req;\n+    struct HEVCRpiFrameProgressWait * next;\n+    sem_t sem;\n+} HEVCRpiFrameProgressWait;\n+\n+typedef struct HEVCRpiFrameProgressState {\n+    struct HEVCRpiFrameProgressWait * first;\n+    struct HEVCRpiFrameProgressWait * last;\n+    pthread_mutex_t lock;\n+} HEVCRpiFrameProgressState;\n+\n+typedef struct RpiBlk\n+{\n+    unsigned int x;\n+    unsigned int y;\n+    unsigned int w;\n+    unsigned int h;\n+} RpiBlk;\n+\n+typedef struct HEVCRpiJob {\n+    struct HEVCRpiJob * next;  // Free chain\n+    struct HEVCRpiJobCtl * jbc_local;\n+    const HEVCRpiSPS * sps;       // sps used to set up this job\n+\n+    int waited;\n+    int ctu_ts_first;\n+    int ctu_ts_last;\n+    RpiBlk bounds;  // Bounding box of job\n+\n+    struct qpu_mc_pred_y_p_s * last_y8_p;\n+    struct qpu_mc_src_s * last_y8_l1;\n+    rpi_cache_flush_env_t * rfe;\n+\n+    HEVCRpiInterPredEnv chroma_ip;\n+    HEVCRpiInterPredEnv luma_ip;\n+    int16_t progress_req[HEVC_DPB_ELS]; // index by dpb_no\n+    HEVCRpiIntraPredEnv intra;\n+    HEVCRpiCoeffsEnv coeffs;\n+    HEVCRpiFrameProgressWait progress_wait;\n+    sem_t sem;\n+    rpi_cache_buf_t flush_buf;\n+} HEVCRpiJob;\n+\n+struct HEVCRpiContext;\n+\n+typedef void HEVCRpiWorkerFn(const struct HEVCRpiContext * const s, HEVCRpiJob * const jb);\n+\n+typedef struct HEVCRpiPassQueue\n+{\n+//    int pending;\n+    volatile int terminate;\n+    sem_t sem_in;\n+    sem_t * psem_out;\n+    unsigned int job_n;\n+    struct HEVCRpiContext * context; // Context pointer as we get to pass a single \"void * this\" to the thread\n+    HEVCRpiWorkerFn * worker;\n+    pthread_t thread;\n+    uint8_t pass_n;  // Pass number - debug\n+    uint8_t started;\n+} HEVCRpiPassQueue;\n+\n+\n+struct HEVCRpiJobGlobal;\n+\n+typedef struct HEVCRpiJobCtl\n+{\n+    sem_t sem_out;\n+\n+    HEVCRpiJob * volatile jb1;  // The job associated with this frame if unallocated - NULL if allocated\n+    struct HEVCRpiJobGlobal * jbg;\n+\n+    HEVCRpiLocalContext * lcw_head;\n+    HEVCRpiLocalContext * lcw_tail;\n+\n+    pthread_mutex_t in_lock;\n+    int offload_in;\n+\n+    HEVCRpiJob *offloadq[RPI_MAX_JOBS];\n+} HEVCRpiJobCtl;\n+\n+\n+typedef struct HEVCRpiJobGlobal\n+{\n+    intptr_t ref_count;\n+    pthread_mutex_t lock;\n+    HEVCRpiJob * free1;                 // Singly linked list of free jobs\n+    HEVCRpiLocalContext * wait_head;       // Double linked list of lcs waiting for a job\n+    HEVCRpiLocalContext * wait_good;  // Last good tail\n+    HEVCRpiLocalContext * wait_tail;\n+\n+} HEVCRpiJobGlobal;\n+\n+#define RPI_BIT_THREADS (RPI_EXTRA_BIT_THREADS + 1)\n+\n+#if RPI_TSTATS\n+typedef struct HEVCRpiStats {\n+    int y_pred1_y8_merge;\n+    int y_pred1_xy;\n+    int y_pred1_x0;\n+    int y_pred1_y0;\n+    int y_pred1_x0y0;\n+    int y_pred1_wle8;\n+    int y_pred1_wgt8;\n+    int y_pred1_hle16;\n+    int y_pred1_hgt16;\n+    int y_pred2_xy;\n+    int y_pred2_x0;\n+    int y_pred2_y0;\n+    int y_pred2_x0y0;\n+    int y_pred2_hle16;\n+    int y_pred2_hgt16;\n+} HEVCRpiStats;\n+#endif\n+\n+typedef struct HEVCRpiCabacState\n+{\n+    uint8_t rice[4];\n+    uint8_t state[HEVC_CONTEXTS];\n+} HEVCRpiCabacState;\n+\n+#define HEVC_RPI_BS_STRIDE1_PEL_SHIFT   6   // 64 pels\n+#define HEVC_RPI_BS_STRIDE1_PELS        (1U << HEVC_RPI_BS_STRIDE1_PEL_SHIFT)\n+#define HEVC_RPI_BS_STRIDE1_PEL_MASK    (HEVC_RPI_BS_STRIDE1_PELS - 1)\n+#define HEVC_RPI_BS_ELS_PER_BYTE_SHIFT  2   // 4 els per byte\n+#define HEVC_RPI_BS_PELS_PER_EL_SHIFT   2   // 4 pels per el\n+#define HEVC_RPI_BS_PELS_PER_BYTE_SHIFT (HEVC_RPI_BS_PELS_PER_EL_SHIFT + HEVC_RPI_BS_ELS_PER_BYTE_SHIFT)\n+#define HEVC_RPI_BS_STRIDE1_BYTE_SHIFT  (HEVC_RPI_BS_STRIDE1_PEL_SHIFT - HEVC_RPI_BS_PELS_PER_BYTE_SHIFT)\n+#define HEVC_RPI_BS_STRIDE1_BYTES       (1U << HEVC_RPI_BS_STRIDE1_BYTE_SHIFT)\n+#define HEVC_RPI_BS_Y_SHR               3   // 8 vertical pels per row\n+#define HEVC_RPI_BS_COL_BYTES_SHR       (HEVC_RPI_BS_Y_SHR - HEVC_RPI_BS_STRIDE1_BYTE_SHIFT)\n+\n+typedef struct HEVCRpiContext {\n+    const AVClass *c;  // needed by private avoptions\n+    AVCodecContext *avctx;\n+\n+    uint8_t             threads_type;\n+    char qpu_init_ok;\n+\n+    /** 1 if the independent slice segment header was successfully parsed */\n+    uint8_t slice_initialized;\n+    char used_for_ref;  // rpi\n+    char is_irap;\n+    char offload_recon;\n+    uint8_t eos;       ///< current packet contains an EOS/EOB NAL\n+    uint8_t last_eos;  ///< last packet contains an EOS/EOB NAL\n+    uint8_t no_backward_pred_flag;\n+    uint8_t is_decoded;\n+    uint8_t no_rasl_output_flag;\n+\n+\n+    /**\n+     * Sequence counters for decoded and output frames, so that old\n+     * frames are output first after a POC reset\n+     */\n+    uint16_t seq_decode;\n+    uint16_t seq_output;\n+\n+    int                 width;\n+    int                 height;\n+\n+    HEVCRpiJobCtl * jbc;\n+    // cabac stash\n+    // b0       skip flag\n+    // b1+      ct_depth\n+    uint8_t * cabac_stash_left;\n+    uint8_t * cabac_stash_up;\n+\n+    // Function pointers\n+#if RPI_QPU_EMU_Y || RPI_QPU_EMU_C\n+    const uint8_t * qpu_dummy_frame_emu;\n+#endif\n+#if !RPI_QPU_EMU_Y || !RPI_QPU_EMU_C\n+    uint32_t qpu_dummy_frame_qpu;  // Not a frame - just a bit of memory\n+#endif\n+    HEVCRpiQpu qpu;\n+\n+    HEVCRpiFrameProgressState progress_states[2];\n+\n+    HEVCRpiCabacState *cabac_save;\n+\n+    AVFrame *frame;\n+    AVFrame *output_frame;\n+    uint8_t *sao_pixel_buffer_h[3];\n+    uint8_t *sao_pixel_buffer_v[3];\n+\n+    unsigned int col_mvf_stride;\n+    AVBufferPool *col_mvf_pool;\n+\n+    RpiSAOParams *sao;\n+    DBParams *deblock;\n+    enum HEVCNALUnitType nal_unit_type;\n+    int temporal_id;  ///< temporal_id_plus1 - 1\n+    HEVCRpiFrame *ref;\n+    int poc;\n+    int pocTid0;\n+    int slice_idx; ///< number of the slice being currently decoded\n+    int max_ra;\n+\n+    int8_t *qp_y_tab;\n+\n+    // Deblocking block strength bitmaps\n+    unsigned int bs_stride2;\n+    unsigned int bs_size;\n+    uint8_t *bs_horizontal;\n+    uint8_t *bs_vertical;\n+    uint8_t *bsf_stash_up;\n+    uint8_t *bsf_stash_left;\n+\n+#if HEVC_RPI_MAX_CTBS >= 0xffff\n+#define TAB_SLICE_ADDR_BROKEN ~(uint32_t)0\n+    uint32_t *tab_slice_address;\n+#else\n+#define TAB_SLICE_ADDR_BROKEN ~(uint16_t)0\n+    uint16_t *tab_slice_address;\n+#endif\n+\n+    // Bitfield 1 bit per 8 pels (min pcm size)\n+    uint8_t *is_pcm;\n+    // Bitfield 1 bit per 8 pels (min cb size)\n+    // Only needed for CIP as CIP processing is async to the main thread\n+    uint8_t *is_intra;\n+\n+    // PU\n+    HEVCRpiMvField *mvf_up;\n+    HEVCRpiMvField *mvf_left;\n+\n+    const RefPicList **rpl_up;\n+    const RefPicList **rpl_left;\n+    RefPicList * refPicList;\n+\n+    // CTB-level flags affecting loop filter operation\n+    uint8_t *filter_slice_edges;\n+\n+    /** used on BE to byteswap the lines for checksumming */\n+    uint8_t *checksum_buf;\n+    int      checksum_buf_size;\n+\n+    const uint8_t *data;\n+\n+    H2645Packet pkt;\n+    // type of the first VCL NAL of the current frame\n+    enum HEVCNALUnitType first_nal_type;\n+\n+    uint8_t context_initialized;\n+    int is_nalff;           ///< this flag is != 0 if bitstream is encapsulated\n+                            ///< as a format defined in 14496-15\n+    int apply_defdispwin;\n+\n+    int nal_length_size;    ///< Number of bytes used for nal length (1, 2 or 4)\n+    int nuh_layer_id;\n+\n+    struct AVMD5 *md5_ctx;\n+\n+    RefPicListTab * rpl_tab;\n+    unsigned int rpl_tab_size;\n+\n+    uint8_t *is_intra_store;\n+\n+    RpiSliceHeader sh;\n+\n+    HEVCRpiParamSets ps;\n+\n+    HEVCRpiLocalContext    *HEVClc;\n+    HEVCRpiLocalContext    *HEVClcList[MAX_NB_THREADS];\n+\n+    HEVCRpiFrame DPB[HEVC_DPB_ELS];\n+\n+    ///< candidate references for the current frame\n+    RefPicList rps[5];\n+\n+    HEVCRpiPredContext hpc;\n+    HEVCDSPContext hevcdsp;\n+\n+    HEVCSEIContext sei;\n+\n+    // Put structures that allocate non-trivial storage at the end\n+    // These are mostly used indirectly so position in the structure doesn't matter\n+    HEVCRpiPassQueue passq[RPI_PASSES];\n+#if RPI_EXTRA_BIT_THREADS > 0\n+    int bt_started;\n+    // This simply contains thread descriptors - task setup is held elsewhere\n+    pthread_t bit_threads[RPI_EXTRA_BIT_THREADS];\n+#endif\n+#if RPI_TSTATS\n+    HEVCRpiStats tstats;\n+#endif\n+} HEVCRpiContext;\n+\n+/**\n+ * Mark all frames in DPB as unused for reference.\n+ */\n+void ff_hevc_rpi_clear_refs(HEVCRpiContext *s);\n+\n+/**\n+ * Drop all frames currently in DPB.\n+ */\n+void ff_hevc_rpi_flush_dpb(HEVCRpiContext *s);\n+\n+/**\n+ * Construct the reference picture sets for the current frame.\n+ */\n+int ff_hevc_rpi_frame_rps(HEVCRpiContext *s);\n+\n+/**\n+ * Construct the reference picture list(s) for the current slice.\n+ */\n+int ff_hevc_rpi_slice_rpl(HEVCRpiContext *s);\n+\n+\n+/**\n+ * Get the number of candidate references for the current frame.\n+ */\n+int ff_hevc_rpi_frame_nb_refs(HEVCRpiContext *s);\n+\n+int ff_hevc_rpi_set_new_ref(HEVCRpiContext *s, AVFrame **frame, int poc);\n+\n+/**\n+ * Find next frame in output order and put a reference to it in frame.\n+ * @return 1 if a frame was output, 0 otherwise\n+ */\n+int ff_hevc_rpi_output_frame(HEVCRpiContext *s, AVFrame *frame, int flush);\n+\n+void ff_hevc_rpi_bump_frame(HEVCRpiContext *s);\n+\n+void ff_hevc_rpi_unref_frame(HEVCRpiContext *s, HEVCRpiFrame *frame, int flags);\n+\n+unsigned int ff_hevc_rpi_tb_avail_flags(\n+    const HEVCRpiContext * const s, const HEVCRpiLocalContext * const lc,\n+    const unsigned int x, const unsigned int y, const unsigned int w, const unsigned int h);\n+\n+void ff_hevc_rpi_luma_mv_merge_mode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, int x0, int y0, int nPbW,\n+                                int nPbH, int log2_cb_size, int part_idx,\n+                                int merge_idx, HEVCRpiMvField * const mv);\n+void ff_hevc_rpi_luma_mv_mvp_mode(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc,\n+    const unsigned int x0, const unsigned int y0,\n+    const unsigned int nPbW, const unsigned int nPbH,\n+    const unsigned int avail,\n+    HEVCRpiMvField * const mv,\n+    const unsigned int mvp_lx_flag, const unsigned int LX);\n+void ff_hevc_rpi_set_qPy(const HEVCRpiContext * const s, HEVCRpiLocalContext * const lc, int xBase, int yBase);\n+void ff_hevc_rpi_deblocking_boundary_strengths(const HEVCRpiContext * const s, const HEVCRpiLocalContext * const lc,\n+                                               const unsigned int x0, const unsigned int y0,\n+                                               const unsigned int log2_trafo_size, const int is_coded_block);\n+int ff_hevc_rpi_hls_filter_blk(const HEVCRpiContext * const s, const RpiBlk bounds, const int eot);\n+\n+extern const uint8_t ff_hevc_rpi_qpel_extra_before[4];\n+extern const uint8_t ff_hevc_rpi_qpel_extra_after[4];\n+extern const uint8_t ff_hevc_rpi_qpel_extra[4];\n+\n+int16_t * rpi_alloc_coeff_buf(HEVCRpiJob * const jb, const int buf_no, const int n);\n+\n+// arm/hevc_misc_neon.S\n+// Neon coeff zap fn\n+#if HAVE_NEON\n+extern void rpi_zap_coeff_vals_neon(int16_t * dst, unsigned int l2ts_m2);\n+#endif\n+\n+void ff_hevc_rpi_progress_wait_field(const HEVCRpiContext * const s, HEVCRpiJob * const jb,\n+                                     const HEVCRpiFrame * const ref, const int val, const int field);\n+\n+void ff_hevc_rpi_progress_signal_field(HEVCRpiContext * const s, const int val, const int field);\n+\n+// All of these expect that s->threads_type == FF_THREAD_FRAME\n+\n+static inline void ff_hevc_rpi_progress_wait_mv(const HEVCRpiContext * const s, HEVCRpiJob * const jb,\n+                                     const HEVCRpiFrame * const ref, const int y)\n+{\n+    if (s->threads_type != 0)\n+        ff_hevc_rpi_progress_wait_field(s, jb, ref, y, 1);\n+}\n+\n+static inline void ff_hevc_rpi_progress_signal_mv(HEVCRpiContext * const s, const int y)\n+{\n+    if (s->used_for_ref && s->threads_type != 0)\n+        ff_hevc_rpi_progress_signal_field(s, y, 1);\n+}\n+\n+static inline void ff_hevc_rpi_progress_wait_recon(const HEVCRpiContext * const s, HEVCRpiJob * const jb,\n+                                     const HEVCRpiFrame * const ref, const int y)\n+{\n+    ff_hevc_rpi_progress_wait_field(s, jb, ref, y, 0);\n+}\n+\n+static inline void ff_hevc_rpi_progress_signal_recon(HEVCRpiContext * const s, const int y)\n+{\n+    if (s->used_for_ref && s->threads_type != 0)\n+    {\n+        ff_hevc_rpi_progress_signal_field(s, y, 0);\n+    }\n+}\n+\n+static inline void ff_hevc_rpi_progress_signal_all_done(HEVCRpiContext * const s)\n+{\n+    ff_hevc_rpi_progress_signal_field(s, INT_MAX, 0);\n+    ff_hevc_rpi_progress_signal_field(s, INT_MAX, 1);\n+}\n+\n+\n+// Set all done - signal nothing (used in missing refs)\n+// Works for both rpi & non-rpi\n+static inline void ff_hevc_rpi_progress_set_all_done(HEVCRpiFrame * const ref)\n+{\n+    if (ref->tf.progress != NULL)\n+    {\n+        int * const p = (int *)ref->tf.progress->data;\n+        p[0] = INT_MAX;\n+        p[1] = INT_MAX;\n+    }\n+}\n+\n+#define HEVC_RPI_420_ONLY 1\n+#define HEVC_RPI_SAND128_ONLY 1\n+\n+static inline unsigned int ctx_hshift(const HEVCRpiContext * const s, const int cidx)\n+{\n+#if HEVC_RPI_420_ONLY\n+    return cidx == 0 ? 0 : 1;\n+#else\n+    return s->ps.sps->hshift[cidx];\n+#endif\n+}\n+\n+static inline unsigned int ctx_vshift(const HEVCRpiContext * const s, const int cidx)\n+{\n+#if HEVC_RPI_420_ONLY\n+    return cidx == 0 ? 0 : 1;\n+#else\n+    return s->ps.sps->vshift[cidx];\n+#endif\n+}\n+\n+static inline int ctx_cfmt(const HEVCRpiContext * const s)\n+{\n+#if HEVC_RPI_420_ONLY\n+    return 1;\n+#else\n+    return s->ps.sps->chroma_format_idc;\n+#endif\n+}\n+\n+static inline int frame_stride1(const AVFrame * const frame, const int c_idx)\n+{\n+#if HEVC_RPI_SAND128_ONLY\n+    return 128;\n+#else\n+    return frame->linesize[c_idx];\n+#endif\n+}\n+\n+#if HEVC_RPI_SAND128_ONLY\n+// Propagate this decision to later zc includes\n+#define RPI_ZC_SAND128_ONLY 1\n+#endif\n+\n+#ifndef ff_hevc_rpi_copy_vert\n+static inline void ff_hevc_rpi_copy_vert(uint8_t *dst, const uint8_t *src,\n+                                         int pixel_shift, int height,\n+                                         ptrdiff_t stride_dst, ptrdiff_t stride_src)\n+{\n+    int i;\n+    switch (pixel_shift)\n+    {\n+        case 2:\n+            for (i = 0; i < height; i++) {\n+                *(uint32_t *)dst = *(uint32_t *)src;\n+                dst += stride_dst;\n+                src += stride_src;\n+            }\n+            break;\n+        case 1:\n+            for (i = 0; i < height; i++) {\n+                *(uint16_t *)dst = *(uint16_t *)src;\n+                dst += stride_dst;\n+                src += stride_src;\n+            }\n+            break;\n+        default:\n+            for (i = 0; i < height; i++) {\n+                *dst = *src;\n+                dst += stride_dst;\n+                src += stride_src;\n+            }\n+            break;\n+    }\n+}\n+#endif\n+\n+\n+#if MVF_STASH_WIDTH == 64\n+static inline HEVCRpiMvField* mvf_stash_ptr(const HEVCRpiContext *const s, const HEVCRpiLocalContext * const lc,\n+                               const unsigned int x, const unsigned int y)\n+{\n+    const unsigned int mask_cs_hi = (~0U << s->ps.sps->log2_ctb_size);\n+    return (HEVCRpiMvField*)(lc->mvf_stash + ((y & ~mask_cs_hi) >> LOG2_MIN_PU_SIZE) * MVF_STASH_WIDTH_PU + ((x & ~mask_cs_hi) >> LOG2_MIN_PU_SIZE));\n+}\n+\n+static inline HEVCRpiMvField* mvf_ptr(const HEVCRpiContext *const s, const HEVCRpiLocalContext * const lc,\n+                               const unsigned int x0, const unsigned int y0,\n+                               const unsigned int x, const unsigned int y)\n+{\n+    const unsigned int mask_cs_hi = (~0U << s->ps.sps->log2_ctb_size);\n+    const unsigned int x0_ctb = x0 & mask_cs_hi;\n+    const unsigned int y0_ctb = y0 & mask_cs_hi;\n+\n+    return (HEVCRpiMvField *)((y < y0_ctb) ?\n+        (x < x0_ctb ? lc->mvf_ul : s->mvf_up + (x >> LOG2_MIN_PU_SIZE)) :\n+        (x < x0_ctb ? s->mvf_left + (y >> LOG2_MIN_PU_SIZE) :\n+            lc->mvf_stash +\n+                ((y & ~mask_cs_hi) >> LOG2_MIN_PU_SIZE) * MVF_STASH_WIDTH_PU +\n+                ((x & ~mask_cs_hi) >> LOG2_MIN_PU_SIZE)));\n+}\n+\n+static inline unsigned int mvf_left_stride(const HEVCRpiContext *const s,\n+                               const unsigned int x0,\n+                               const unsigned int x)\n+{\n+    const unsigned int mask_cs_hi = (~0U << s->ps.sps->log2_ctb_size);\n+    const unsigned int x0_ctb = x0 & mask_cs_hi;\n+    return x < x0_ctb ? 1 : MVF_STASH_WIDTH_PU;\n+}\n+\n+#else\n+static inline HEVCRpiMvField* mvf_stash_ptr(const HEVCRpiContext *const s, const HEVCRpiLocalContext * const lc,\n+                               const unsigned int x, const unsigned int y)\n+{\n+    const unsigned int mask_cs_hi = (~0U << s->ps.sps->log2_ctb_size);\n+    return (HEVCRpiMvField*)(lc->mvf_stash + ((y & ~mask_cs_hi) >> LOG2_MIN_PU_SIZE) * MVF_STASH_WIDTH_PU + ((x >> LOG2_MIN_PU_SIZE) & (MVF_STASH_WIDTH_PU - 1)));\n+}\n+\n+static inline HEVCRpiMvField* mvf_ptr(const HEVCRpiContext *const s, const HEVCRpiLocalContext * const lc,\n+                               const unsigned int x0, const unsigned int y0,\n+                               const unsigned int x, const unsigned int y)\n+{\n+    const unsigned int mask_cs_hi = (~0U << s->ps.sps->log2_ctb_size);\n+\n+    const unsigned int x0_ctb = x0 & mask_cs_hi;\n+    const unsigned int y0_ctb = y0 & mask_cs_hi;\n+\n+    // If not in the same CTB for Y assume up\n+    if (y < y0_ctb) {\n+        // If not in the same CTB for X too assume up-left\n+        return (HEVCRpiMvField *)(x < x0_ctb ? lc->mvf_ul : s->mvf_up + (x >> LOG2_MIN_PU_SIZE));\n+    }\n+    return mvf_stash_ptr(s, lc, x, y);\n+}\n+\n+static inline unsigned int mvf_left_stride(const HEVCRpiContext *const s,\n+                               const unsigned int x0,\n+                               const unsigned int x)\n+{\n+    return MVF_STASH_WIDTH_PU;\n+}\n+#endif\n+\n+#endif /* AVCODEC_RPI_HEVCDEC_H */\ndiff --git a/libavcodec/rpi_hevcdsp.c b/libavcodec/rpi_hevcdsp.c\nnew file mode 100644\nindex 0000000000..87f3cc9d14\n--- /dev/null\n+++ b/libavcodec/rpi_hevcdsp.c\n@@ -0,0 +1,450 @@\n+/*\n+ * HEVC video decoder\n+ *\n+ * Copyright (C) 2012 - 2013 Guillaume Martres\n+ * Copyright (C) 2013 - 2014 Pierre-Edouard Lepere\n+ * Copyright (C) 2018 John Cox, Ben Avison for Raspberry Pi (Trading)\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"rpi_hevcdsp.h\"\n+#include \"rpi_hevc_mv.h\"\n+\n+static const int8_t transform[32][32] = {\n+    { 64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,\n+      64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64 },\n+    { 90,  90,  88,  85,  82,  78,  73,  67,  61,  54,  46,  38,  31,  22,  13,   4,\n+      -4, -13, -22, -31, -38, -46, -54, -61, -67, -73, -78, -82, -85, -88, -90, -90 },\n+    { 90,  87,  80,  70,  57,  43,  25,   9,  -9, -25, -43, -57, -70, -80, -87, -90,\n+     -90, -87, -80, -70, -57, -43, -25,  -9,   9,  25,  43,  57,  70,  80,  87,  90 },\n+    { 90,  82,  67,  46,  22,  -4, -31, -54, -73, -85, -90, -88, -78, -61, -38, -13,\n+      13,  38,  61,  78,  88,  90,  85,  73,  54,  31,   4, -22, -46, -67, -82, -90 },\n+    { 89,  75,  50,  18, -18, -50, -75, -89, -89, -75, -50, -18,  18,  50,  75,  89,\n+      89,  75,  50,  18, -18, -50, -75, -89, -89, -75, -50, -18,  18,  50,  75,  89 },\n+    { 88,  67,  31, -13, -54, -82, -90, -78, -46, -4,   38,  73,  90,  85,  61,  22,\n+     -22, -61, -85, -90, -73, -38,   4,  46,  78,  90,  82,  54,  13, -31, -67, -88 },\n+    { 87,  57,   9, -43, -80, -90, -70, -25,  25,  70,  90,  80,  43,  -9, -57, -87,\n+     -87, -57,  -9,  43,  80,  90,  70,  25, -25, -70, -90, -80, -43,   9,  57,  87 },\n+    { 85,  46, -13, -67, -90, -73, -22,  38,  82,  88,  54,  -4, -61, -90, -78, -31,\n+      31,  78,  90,  61,   4, -54, -88, -82, -38,  22,  73,  90,  67,  13, -46, -85 },\n+    { 83,  36, -36, -83, -83, -36,  36,  83,  83,  36, -36, -83, -83, -36,  36,  83,\n+      83,  36, -36, -83, -83, -36,  36,  83,  83,  36, -36, -83, -83, -36,  36,  83 },\n+    { 82,  22, -54, -90, -61,  13,  78,  85,  31, -46, -90, -67,   4,  73,  88,  38,\n+     -38, -88, -73,  -4,  67,  90,  46, -31, -85, -78, -13,  61,  90,  54, -22, -82 },\n+    { 80,   9, -70, -87, -25,  57,  90,  43, -43, -90, -57,  25,  87,  70,  -9, -80,\n+     -80,  -9,  70,  87,  25, -57, -90, -43,  43,  90,  57, -25, -87, -70,   9,  80 },\n+    { 78,  -4, -82, -73,  13,  85,  67, -22, -88, -61,  31,  90,  54, -38, -90, -46,\n+      46,  90,  38, -54, -90, -31,  61,  88,  22, -67, -85, -13,  73,  82,   4, -78 },\n+    { 75, -18, -89, -50,  50,  89,  18, -75, -75,  18,  89,  50, -50, -89, -18,  75,\n+      75, -18, -89, -50,  50,  89,  18, -75, -75,  18,  89,  50, -50, -89, -18,  75 },\n+    { 73, -31, -90, -22,  78,  67, -38, -90, -13,  82,  61, -46, -88,  -4,  85,  54,\n+     -54, -85,   4,  88,  46, -61, -82,  13,  90,  38, -67, -78,  22,  90,  31, -73 },\n+    { 70, -43, -87,   9,  90,  25, -80, -57,  57,  80, -25, -90,  -9,  87,  43, -70,\n+     -70,  43,  87,  -9, -90, -25,  80,  57, -57, -80,  25,  90,   9, -87, -43,  70 },\n+    { 67, -54, -78,  38,  85, -22, -90,   4,  90,  13, -88, -31,  82,  46, -73, -61,\n+      61,  73, -46, -82,  31,  88, -13, -90,  -4,  90,  22, -85, -38,  78,  54, -67 },\n+    { 64, -64, -64,  64,  64, -64, -64,  64,  64, -64, -64,  64,  64, -64, -64,  64,\n+      64, -64, -64,  64,  64, -64, -64,  64,  64, -64, -64,  64,  64, -64, -64,  64 },\n+    { 61, -73, -46,  82,  31, -88, -13,  90,  -4, -90,  22,  85, -38, -78,  54,  67,\n+     -67, -54,  78,  38, -85, -22,  90,   4, -90,  13,  88, -31, -82,  46,  73, -61 },\n+    { 57, -80, -25,  90,  -9, -87,  43,  70, -70, -43,  87,   9, -90,  25,  80, -57,\n+     -57,  80,  25, -90,   9,  87, -43, -70,  70,  43, -87,  -9,  90, -25, -80,  57 },\n+    { 54, -85,  -4,  88, -46, -61,  82,  13, -90,  38,  67, -78, -22,  90, -31, -73,\n+      73,  31, -90,  22,  78, -67, -38,  90, -13, -82,  61,  46, -88,   4,  85, -54 },\n+    { 50, -89,  18,  75, -75, -18,  89, -50, -50,  89, -18, -75,  75,  18, -89,  50,\n+      50, -89,  18,  75, -75, -18,  89, -50, -50,  89, -18, -75,  75,  18, -89,  50 },\n+    { 46, -90,  38,  54, -90,  31,  61, -88,  22,  67, -85,  13,  73, -82,   4,  78,\n+     -78,  -4,  82, -73, -13,  85, -67, -22,  88, -61, -31,  90, -54, -38,  90, -46 },\n+    { 43, -90,  57,  25, -87,  70,   9, -80,  80,  -9, -70,  87, -25, -57,  90, -43,\n+     -43,  90, -57, -25,  87, -70,  -9,  80, -80,   9,  70, -87,  25,  57, -90,  43 },\n+    { 38, -88,  73,  -4, -67,  90, -46, -31,  85, -78,  13,  61, -90,  54,  22, -82,\n+      82, -22, -54,  90, -61, -13,  78, -85,  31,  46, -90,  67,   4, -73,  88, -38 },\n+    { 36, -83,  83, -36, -36,  83, -83,  36,  36, -83,  83, -36, -36,  83, -83,  36,\n+      36, -83,  83, -36, -36,  83, -83,  36,  36, -83,  83, -36, -36,  83, -83,  36 },\n+    { 31, -78,  90, -61,   4,  54, -88,  82, -38, -22,  73, -90,  67, -13, -46,  85,\n+     -85,  46,  13, -67,  90, -73,  22,  38, -82,  88, -54,  -4,  61, -90,  78, -31 },\n+    { 25, -70,  90, -80,  43,   9, -57,  87, -87,  57,  -9, -43,  80, -90,  70, -25,\n+     -25,  70, -90,  80, -43,  -9,  57, -87,  87, -57,   9,  43, -80,  90, -70,  25 },\n+    { 22, -61,  85, -90,  73, -38,  -4,  46, -78,  90, -82,  54, -13, -31,  67, -88,\n+      88, -67,  31,  13, -54,  82, -90,  78, -46,   4,  38, -73,  90, -85,  61, -22 },\n+    { 18, -50,  75, -89,  89, -75,  50, -18, -18,  50, -75,  89, -89,  75, -50,  18,\n+      18, -50,  75, -89,  89, -75,  50, -18, -18,  50, -75,  89, -89,  75, -50,  18 },\n+    { 13, -38,  61, -78,  88, -90,  85, -73,  54, -31,   4,  22, -46,  67, -82,  90,\n+     -90,  82, -67,  46, -22,  -4,  31, -54,  73, -85,  90, -88,  78, -61,  38, -13 },\n+    {  9, -25,  43, -57,  70, -80,  87, -90,  90, -87,  80, -70,  57, -43,  25, -9,\n+      -9,  25, -43,  57, -70,  80, -87,  90, -90,  87, -80,  70, -57,  43, -25,   9 },\n+    {  4, -13,  22, -31,  38, -46,  54, -61,  67, -73,  78, -82,  85, -88,  90, -90,\n+      90, -90,  88, -85,  82, -78,  73, -67,  61, -54,  46, -38,  31, -22,  13,  -4 },\n+};\n+\n+DECLARE_ALIGNED(16, const int8_t, ff_hevc_rpi_epel_filters[7][4]) = {\n+    { -2, 58, 10, -2},\n+    { -4, 54, 16, -2},\n+    { -6, 46, 28, -4},\n+    { -4, 36, 36, -4},\n+    { -4, 28, 46, -6},\n+    { -2, 16, 54, -4},\n+    { -2, 10, 58, -2},\n+};\n+\n+DECLARE_ALIGNED(16, const int8_t, ff_hevc_rpi_qpel_filters[3][16]) = {\n+    { -1,  4,-10, 58, 17, -5,  1,  0, -1,  4,-10, 58, 17, -5,  1,  0},\n+    { -1,  4,-11, 40, 40,-11,  4, -1, -1,  4,-11, 40, 40,-11,  4, -1},\n+    {  0,  1, -5, 17, 58,-10,  4, -1,  0,  1, -5, 17, 58,-10,  4, -1}\n+};\n+\n+#define BIT_DEPTH 8\n+#include \"rpi_hevcdsp_template.c\"\n+#undef BIT_DEPTH\n+\n+#define BIT_DEPTH 9\n+#include \"rpi_hevcdsp_template.c\"\n+#undef BIT_DEPTH\n+\n+#define BIT_DEPTH 10\n+#include \"rpi_hevcdsp_template.c\"\n+#undef BIT_DEPTH\n+\n+#define BIT_DEPTH 12\n+#include \"rpi_hevcdsp_template.c\"\n+#undef BIT_DEPTH\n+\n+static uint32_t hevc_deblocking_boundary_strengths(int pus, int dup, const HEVCRpiMvField *curr, const HEVCRpiMvField *neigh,\n+                                               const int *curr_rpl0, const int *curr_rpl1, const int *neigh_rpl0, const int *neigh_rpl1,\n+                                               int in_inc0, int in_inc1)\n+{\n+    int shift = 32;\n+    uint32_t bs = 0;\n+    for (; pus > 0; pus--) {\n+        int strength, out;\n+        int curr_refL0 = curr_rpl0[curr->ref_idx[0]];\n+        int curr_refL1 = curr_rpl1[curr->ref_idx[1]];\n+        int nr_idx0 = neigh->ref_idx[0];\n+        int nr_idx1 = neigh->ref_idx[1];\n+        int neigh_refL0 = neigh_rpl0[nr_idx0];\n+        int neigh_refL1 = neigh_rpl1[nr_idx1];\n+\n+        av_assert0(nr_idx0 >= 0 && nr_idx0 <=31);\n+        av_assert0(nr_idx1 >= 0 && nr_idx1 <=31);\n+\n+#if 1 // This more directly matches the original implementation\n+        if (curr->pred_flag == PF_BI &&  neigh->pred_flag == PF_BI) {\n+            // same L0 and L1\n+            if (curr_refL0 == neigh_refL0 &&\n+                curr_refL0 == curr_refL1 &&\n+                neigh_refL0 == neigh_refL1) {\n+                if ((FFABS(MV_X(neigh->xy[0]) - MV_X(curr->xy[0])) >= 4 || FFABS(MV_Y(neigh->xy[0]) - MV_Y(curr->xy[0])) >= 4 ||\n+                     FFABS(MV_X(neigh->xy[1]) - MV_X(curr->xy[1])) >= 4 || FFABS(MV_Y(neigh->xy[1]) - MV_Y(curr->xy[1])) >= 4) &&\n+                    (FFABS(MV_X(neigh->xy[1]) - MV_X(curr->xy[0])) >= 4 || FFABS(MV_Y(neigh->xy[1]) - MV_Y(curr->xy[0])) >= 4 ||\n+                     FFABS(MV_X(neigh->xy[0]) - MV_X(curr->xy[1])) >= 4 || FFABS(MV_Y(neigh->xy[0]) - MV_Y(curr->xy[1])) >= 4))\n+                    strength = 1;\n+                else\n+                    strength = 0;\n+            } else if (neigh_refL0 == curr_refL0 &&\n+                       neigh_refL1 == curr_refL1) {\n+                if (FFABS(MV_X(neigh->xy[0]) - MV_X(curr->xy[0])) >= 4 || FFABS(MV_Y(neigh->xy[0]) - MV_Y(curr->xy[0])) >= 4 ||\n+                    FFABS(MV_X(neigh->xy[1]) - MV_X(curr->xy[1])) >= 4 || FFABS(MV_Y(neigh->xy[1]) - MV_Y(curr->xy[1])) >= 4)\n+                    strength = 1;\n+                else\n+                    strength = 0;\n+            } else if (neigh_refL1 == curr_refL0 &&\n+                       neigh_refL0 == curr_refL1) {\n+                if (FFABS(MV_X(neigh->xy[1]) - MV_X(curr->xy[0])) >= 4 || FFABS(MV_Y(neigh->xy[1]) - MV_Y(curr->xy[0])) >= 4 ||\n+                    FFABS(MV_X(neigh->xy[0]) - MV_X(curr->xy[1])) >= 4 || FFABS(MV_Y(neigh->xy[0]) - MV_Y(curr->xy[1])) >= 4)\n+                    strength = 1;\n+                else\n+                    strength = 0;\n+            } else {\n+                strength = 1;\n+            }\n+        } else if ((curr->pred_flag != PF_BI) && (neigh->pred_flag != PF_BI)){ // 1 MV\n+            MvXY curr_mv0, neigh_mv0;\n+\n+            if (curr->pred_flag & 1) {\n+                curr_mv0   = curr->xy[0];\n+            } else {\n+                curr_mv0   = curr->xy[1];\n+                curr_refL0 = curr_refL1;\n+            }\n+\n+            if (neigh->pred_flag & 1) {\n+                neigh_mv0   = neigh->xy[0];\n+            } else {\n+                neigh_mv0   = neigh->xy[1];\n+                neigh_refL0 = neigh_refL1;\n+            }\n+\n+            if (curr_refL0 == neigh_refL0) {\n+                if (FFABS(MV_X(curr_mv0) - MV_X(neigh_mv0)) >= 4 || FFABS(MV_Y(curr_mv0) - MV_Y(neigh_mv0)) >= 4)\n+                    strength = 1;\n+                else\n+                    strength = 0;\n+            } else\n+                strength = 1;\n+        } else\n+            strength = 1;\n+#else // This has exactly the same effect, but is more suitable for vectorisation\n+        MvXY curr_mv[2];\n+        MvXY neigh_mv[2];\n+        memcpy(curr_mv, curr->xy, sizeof curr_mv);\n+        memcpy(neigh_mv, neigh->xy, sizeof neigh_mv);\n+\n+        if (!(curr->pred_flag & 2)) {\n+            curr_mv[1] = curr_mv[0];\n+            curr_refL1 = curr_refL0;\n+        }\n+        if (!(neigh->pred_flag & 2)) {\n+            neigh_mv[1] = neigh_mv[0];\n+            neigh_refL1 = neigh_refL0;\n+        }\n+        if (!(curr->pred_flag & 1)) {\n+            curr_mv[0] = curr_mv[1];\n+            curr_refL0 = curr_refL1;\n+        }\n+        if (!(neigh->pred_flag & 1)) {\n+            neigh_mv[0] = neigh_mv[1];\n+            neigh_refL0 = neigh_refL1;\n+        }\n+\n+        strength = 1;\n+\n+        strength &= (neigh_refL0 != curr_refL0) | (neigh_refL1 != curr_refL1) |\n+                (FFABS(MV_X(neigh_mv[0]) - MV_X(curr_mv[0])) >= 4) | (FFABS(MV_Y(neigh_mv[0]) - MV_Y(curr_mv[0])) >= 4) |\n+                (FFABS(MV_X(neigh_mv[1]) - MV_X(curr_mv[1])) >= 4) | (FFABS(MV_Y(neigh_mv[1]) - MV_Y(curr_mv[1])) >= 4);\n+\n+        strength &= (neigh_refL1 != curr_refL0) | (neigh_refL0 != curr_refL1) |\n+                (FFABS(MV_X(neigh_mv[1]) - MV_X(curr_mv[0])) >= 4) | (FFABS(MV_Y(neigh_mv[1]) - MV_Y(curr_mv[0])) >= 4) |\n+                (FFABS(MV_X(neigh_mv[0]) - MV_X(curr_mv[1])) >= 4) | (FFABS(MV_Y(neigh_mv[0]) - MV_Y(curr_mv[1])) >= 4);\n+\n+        strength |= (((curr->pred_flag + 1) ^ (neigh->pred_flag + 1)) >> 2);\n+#endif\n+\n+        curr += in_inc0 / sizeof (HEVCRpiMvField);\n+        neigh += in_inc1 / sizeof (HEVCRpiMvField);\n+\n+        for (out = dup; out > 0; out--)\n+        {\n+            bs = (bs >> 2) | (strength << 30);\n+            shift -= 2;\n+        }\n+    }\n+    return bs >> shift;\n+}\n+\n+\n+static void cpy_blk(uint8_t *dst, unsigned int stride_dst, const uint8_t *src, unsigned stride_src, unsigned int width, unsigned int height)\n+{\n+    unsigned int i, j;\n+\n+    if (((intptr_t)dst | (intptr_t)src | stride_dst | stride_src) & 15) {\n+        for (i = 0; i < height; i++) {\n+            for (j = 0; j < width; j+=8)\n+                AV_COPY64U(dst+j, src+j);\n+            dst += stride_dst;\n+            src += stride_src;\n+        }\n+    } else {\n+        for (i = 0; i < height; i++) {\n+            for (j = 0; j < width; j+=16)\n+                AV_COPY128(dst+j, src+j);\n+            dst += stride_dst;\n+            src += stride_src;\n+        }\n+    }\n+}\n+\n+\n+\n+void ff_hevc_rpi_dsp_init(HEVCDSPContext *hevcdsp, int bit_depth)\n+{\n+#undef FUNC\n+#define FUNC(a, depth) a ## _ ## depth\n+\n+#undef PEL_FUNC\n+#define PEL_FUNC(dst1, idx1, idx2, a, depth)                                   \\\n+    for(i = 0 ; i < 10 ; i++)                                                  \\\n+{                                                                              \\\n+    hevcdsp->dst1[i][idx1][idx2] = a ## _ ## depth;                            \\\n+}\n+\n+#undef EPEL_FUNCS\n+#define EPEL_FUNCS(depth)                                                     \\\n+    PEL_FUNC(put_hevc_epel, 0, 0, put_hevc_pel_pixels, depth);                \\\n+    PEL_FUNC(put_hevc_epel, 0, 1, put_hevc_epel_h, depth);                    \\\n+    PEL_FUNC(put_hevc_epel, 1, 0, put_hevc_epel_v, depth);                    \\\n+    PEL_FUNC(put_hevc_epel, 1, 1, put_hevc_epel_hv, depth)\n+\n+#undef EPEL_UNI_FUNCS\n+#define EPEL_UNI_FUNCS(depth)                                                 \\\n+    PEL_FUNC(put_hevc_epel_uni, 0, 0, put_hevc_pel_uni_pixels, depth);        \\\n+    PEL_FUNC(put_hevc_epel_uni, 0, 1, put_hevc_epel_uni_h, depth);            \\\n+    PEL_FUNC(put_hevc_epel_uni, 1, 0, put_hevc_epel_uni_v, depth);            \\\n+    PEL_FUNC(put_hevc_epel_uni, 1, 1, put_hevc_epel_uni_hv, depth);           \\\n+    PEL_FUNC(put_hevc_epel_uni_w, 0, 0, put_hevc_pel_uni_w_pixels, depth);    \\\n+    PEL_FUNC(put_hevc_epel_uni_w, 0, 1, put_hevc_epel_uni_w_h, depth);        \\\n+    PEL_FUNC(put_hevc_epel_uni_w, 1, 0, put_hevc_epel_uni_w_v, depth);        \\\n+    PEL_FUNC(put_hevc_epel_uni_w, 1, 1, put_hevc_epel_uni_w_hv, depth)\n+\n+#undef EPEL_BI_FUNCS\n+#define EPEL_BI_FUNCS(depth)                                                \\\n+    PEL_FUNC(put_hevc_epel_bi, 0, 0, put_hevc_pel_bi_pixels, depth);        \\\n+    PEL_FUNC(put_hevc_epel_bi, 0, 1, put_hevc_epel_bi_h, depth);            \\\n+    PEL_FUNC(put_hevc_epel_bi, 1, 0, put_hevc_epel_bi_v, depth);            \\\n+    PEL_FUNC(put_hevc_epel_bi, 1, 1, put_hevc_epel_bi_hv, depth);           \\\n+    PEL_FUNC(put_hevc_epel_bi_w, 0, 0, put_hevc_pel_bi_w_pixels, depth);    \\\n+    PEL_FUNC(put_hevc_epel_bi_w, 0, 1, put_hevc_epel_bi_w_h, depth);        \\\n+    PEL_FUNC(put_hevc_epel_bi_w, 1, 0, put_hevc_epel_bi_w_v, depth);        \\\n+    PEL_FUNC(put_hevc_epel_bi_w, 1, 1, put_hevc_epel_bi_w_hv, depth)\n+\n+#undef QPEL_FUNCS\n+#define QPEL_FUNCS(depth)                                                     \\\n+    PEL_FUNC(put_hevc_qpel, 0, 0, put_hevc_pel_pixels, depth);                \\\n+    PEL_FUNC(put_hevc_qpel, 0, 1, put_hevc_qpel_h, depth);                    \\\n+    PEL_FUNC(put_hevc_qpel, 1, 0, put_hevc_qpel_v, depth);                    \\\n+    PEL_FUNC(put_hevc_qpel, 1, 1, put_hevc_qpel_hv, depth)\n+\n+#undef QPEL_UNI_FUNCS\n+#define QPEL_UNI_FUNCS(depth)                                                 \\\n+    PEL_FUNC(put_hevc_qpel_uni, 0, 0, put_hevc_pel_uni_pixels, depth);        \\\n+    PEL_FUNC(put_hevc_qpel_uni, 0, 1, put_hevc_qpel_uni_h, depth);            \\\n+    PEL_FUNC(put_hevc_qpel_uni, 1, 0, put_hevc_qpel_uni_v, depth);            \\\n+    PEL_FUNC(put_hevc_qpel_uni, 1, 1, put_hevc_qpel_uni_hv, depth);           \\\n+    PEL_FUNC(put_hevc_qpel_uni_w, 0, 0, put_hevc_pel_uni_w_pixels, depth);    \\\n+    PEL_FUNC(put_hevc_qpel_uni_w, 0, 1, put_hevc_qpel_uni_w_h, depth);        \\\n+    PEL_FUNC(put_hevc_qpel_uni_w, 1, 0, put_hevc_qpel_uni_w_v, depth);        \\\n+    PEL_FUNC(put_hevc_qpel_uni_w, 1, 1, put_hevc_qpel_uni_w_hv, depth)\n+\n+#undef QPEL_BI_FUNCS\n+#define QPEL_BI_FUNCS(depth)                                                  \\\n+    PEL_FUNC(put_hevc_qpel_bi, 0, 0, put_hevc_pel_bi_pixels, depth);          \\\n+    PEL_FUNC(put_hevc_qpel_bi, 0, 1, put_hevc_qpel_bi_h, depth);              \\\n+    PEL_FUNC(put_hevc_qpel_bi, 1, 0, put_hevc_qpel_bi_v, depth);              \\\n+    PEL_FUNC(put_hevc_qpel_bi, 1, 1, put_hevc_qpel_bi_hv, depth);             \\\n+    PEL_FUNC(put_hevc_qpel_bi_w, 0, 0, put_hevc_pel_bi_w_pixels, depth);      \\\n+    PEL_FUNC(put_hevc_qpel_bi_w, 0, 1, put_hevc_qpel_bi_w_h, depth);          \\\n+    PEL_FUNC(put_hevc_qpel_bi_w, 1, 0, put_hevc_qpel_bi_w_v, depth);          \\\n+    PEL_FUNC(put_hevc_qpel_bi_w, 1, 1, put_hevc_qpel_bi_w_hv, depth)\n+\n+#define SLICED_ADD_RESIDUAL(depth)\\\n+    hevcdsp->add_residual_u[0]      = FUNC(add_residual4x4_u, depth);         \\\n+    hevcdsp->add_residual_u[1]      = FUNC(add_residual8x8_u, depth);         \\\n+    hevcdsp->add_residual_u[2]      = FUNC(add_residual16x16_u, depth);       \\\n+    hevcdsp->add_residual_u[3]      = FUNC(add_residual32x32_u, depth);       \\\n+    hevcdsp->add_residual_v[0]      = FUNC(add_residual4x4_v, depth);         \\\n+    hevcdsp->add_residual_v[1]      = FUNC(add_residual8x8_v, depth);         \\\n+    hevcdsp->add_residual_v[2]      = FUNC(add_residual16x16_v, depth);       \\\n+    hevcdsp->add_residual_v[3]      = FUNC(add_residual32x32_v, depth);       \\\n+    hevcdsp->add_residual_c[0]      = FUNC(add_residual4x4_c, depth);         \\\n+    hevcdsp->add_residual_c[1]      = FUNC(add_residual8x8_c, depth);         \\\n+    hevcdsp->add_residual_c[2]      = FUNC(add_residual16x16_c, depth);       \\\n+    hevcdsp->add_residual_c[3]      = FUNC(add_residual32x32_c, depth);       \\\n+    hevcdsp->add_residual_dc_c[0]   = FUNC(add_residual4x4_dc_c, depth);         \\\n+    hevcdsp->add_residual_dc_c[1]   = FUNC(add_residual8x8_dc_c, depth);         \\\n+    hevcdsp->add_residual_dc_c[2]   = FUNC(add_residual16x16_dc_c, depth);       \\\n+    hevcdsp->add_residual_dc_c[3]   = FUNC(add_residual32x32_dc_c, depth);       \\\n+    hevcdsp->put_pcm_c              = FUNC(put_pcm_c, depth)\n+#define SLICED_LOOP_FILTERS(depth)\\\n+    hevcdsp->hevc_h_loop_filter_luma2 = FUNC(hevc_h_loop_filter_luma2, depth); \\\n+    hevcdsp->hevc_v_loop_filter_luma2 = FUNC(hevc_v_loop_filter_luma2, depth); \\\n+    hevcdsp->hevc_h_loop_filter_uv    = FUNC(hevc_h_loop_filter_uv, depth);    \\\n+    hevcdsp->hevc_v_loop_filter_uv2   = FUNC(hevc_v_loop_filter_uv2, depth)\n+#define SLICED_SAO(depth)\\\n+    for (i = 0; i != SAO_FILTER_N; ++i) {                                     \\\n+        hevcdsp->sao_band_filter_c[i] = FUNC(sao_band_filter_c, depth);       \\\n+        hevcdsp->sao_edge_filter_c[i] = FUNC(sao_edge_filter_c, depth);       \\\n+    }                                                                         \\\n+    hevcdsp->sao_edge_restore_c[0] = FUNC(sao_edge_restore_c_0, depth);       \\\n+    hevcdsp->sao_edge_restore_c[1] = FUNC(sao_edge_restore_c_1, depth)\n+\n+#define HEVC_DSP(depth)                                                     \\\n+    hevcdsp->put_pcm                = FUNC(put_pcm, depth);                 \\\n+    hevcdsp->add_residual[0]        = FUNC(add_residual4x4, depth);         \\\n+    hevcdsp->add_residual[1]        = FUNC(add_residual8x8, depth);         \\\n+    hevcdsp->add_residual[2]        = FUNC(add_residual16x16, depth);       \\\n+    hevcdsp->add_residual[3]        = FUNC(add_residual32x32, depth);       \\\n+    hevcdsp->add_residual_dc[0]     = FUNC(add_residual4x4_dc, depth);         \\\n+    hevcdsp->add_residual_dc[1]     = FUNC(add_residual8x8_dc, depth);         \\\n+    hevcdsp->add_residual_dc[2]     = FUNC(add_residual16x16_dc, depth);       \\\n+    hevcdsp->add_residual_dc[3]     = FUNC(add_residual32x32_dc, depth);       \\\n+    SLICED_ADD_RESIDUAL(depth);                                             \\\n+    hevcdsp->dequant                = FUNC(dequant, depth);                 \\\n+    hevcdsp->transform_rdpcm        = FUNC(transform_rdpcm, depth);         \\\n+    hevcdsp->transform_4x4_luma     = FUNC(transform_4x4_luma, depth);      \\\n+    hevcdsp->idct[0]                = FUNC(idct_4x4, depth);                \\\n+    hevcdsp->idct[1]                = FUNC(idct_8x8, depth);                \\\n+    hevcdsp->idct[2]                = FUNC(idct_16x16, depth);              \\\n+    hevcdsp->idct[3]                = FUNC(idct_32x32, depth);              \\\n+                                                                            \\\n+    hevcdsp->idct_dc[0]             = FUNC(idct_4x4_dc, depth);             \\\n+    hevcdsp->idct_dc[1]             = FUNC(idct_8x8_dc, depth);             \\\n+    hevcdsp->idct_dc[2]             = FUNC(idct_16x16_dc, depth);           \\\n+    hevcdsp->idct_dc[3]             = FUNC(idct_32x32_dc, depth);           \\\n+                                                                            \\\n+    for (i = 0; i != SAO_FILTER_N; ++i) {                                   \\\n+        hevcdsp->sao_band_filter[i] = FUNC(sao_band_filter, depth);         \\\n+        hevcdsp->sao_edge_filter[i] = FUNC(sao_edge_filter, depth);         \\\n+    }                                                                       \\\n+    hevcdsp->sao_edge_restore[0] = FUNC(sao_edge_restore_0, depth);            \\\n+    hevcdsp->sao_edge_restore[1] = FUNC(sao_edge_restore_1, depth);            \\\n+    SLICED_SAO(depth);                                                         \\\n+                                                                               \\\n+    QPEL_FUNCS(depth);                                                         \\\n+    QPEL_UNI_FUNCS(depth);                                                     \\\n+    QPEL_BI_FUNCS(depth);                                                      \\\n+    EPEL_FUNCS(depth);                                                         \\\n+    EPEL_UNI_FUNCS(depth);                                                     \\\n+    EPEL_BI_FUNCS(depth);                                                      \\\n+                                                                               \\\n+    SLICED_LOOP_FILTERS(depth);                                                \\\n+    hevcdsp->hevc_h_loop_filter_luma     = FUNC(hevc_h_loop_filter_luma, depth);   \\\n+    hevcdsp->hevc_v_loop_filter_luma     = FUNC(hevc_v_loop_filter_luma, depth);   \\\n+    hevcdsp->hevc_h_loop_filter_chroma   = FUNC(hevc_h_loop_filter_chroma, depth); \\\n+    hevcdsp->hevc_v_loop_filter_chroma   = FUNC(hevc_v_loop_filter_chroma, depth); \\\n+    hevcdsp->hevc_h_loop_filter_luma_c   = FUNC(hevc_h_loop_filter_luma, depth);   \\\n+    hevcdsp->hevc_v_loop_filter_luma_c   = FUNC(hevc_v_loop_filter_luma, depth);   \\\n+    hevcdsp->hevc_h_loop_filter_chroma_c = FUNC(hevc_h_loop_filter_chroma, depth); \\\n+    hevcdsp->hevc_v_loop_filter_chroma_c = FUNC(hevc_v_loop_filter_chroma, depth)\n+int i = 0;\n+\n+    switch (bit_depth) {\n+    case 9:\n+        HEVC_DSP(9);\n+        break;\n+    case 10:\n+        HEVC_DSP(10);\n+        break;\n+    case 12:\n+        HEVC_DSP(12);\n+        break;\n+    default:\n+        HEVC_DSP(8);\n+        break;\n+    }\n+\n+    hevcdsp->hevc_deblocking_boundary_strengths = hevc_deblocking_boundary_strengths;\n+    hevcdsp->cpy_blk = cpy_blk;\n+\n+    if (ARCH_PPC)\n+        ff_hevc_rpi_dsp_init_ppc(hevcdsp, bit_depth);\n+    if (ARCH_X86)\n+        ff_hevc_rpi_dsp_init_x86(hevcdsp, bit_depth);\n+    if (ARCH_ARM)\n+        ff_hevcdsp_rpi_init_arm(hevcdsp, bit_depth);\n+    if (ARCH_MIPS)\n+        ff_hevc_rpi_dsp_init_mips(hevcdsp, bit_depth);\n+}\ndiff --git a/libavcodec/rpi_hevcdsp.h b/libavcodec/rpi_hevcdsp.h\nnew file mode 100644\nindex 0000000000..5a7cdeeb66\n--- /dev/null\n+++ b/libavcodec/rpi_hevcdsp.h\n@@ -0,0 +1,177 @@\n+/*\n+ * HEVC video decoder\n+ *\n+ * Copyright (C) 2012 - 2013 Guillaume Martres\n+ * Copyright (C) 2013 - 2014 Pierre-Edouard Lepere\n+ *\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#ifndef AVCODEC_RPI_HEVCDSP_H\n+#define AVCODEC_RPI_HEVCDSP_H\n+\n+#include \"hevc.h\"\n+#include \"get_bits.h\"\n+\n+struct HEVCRpiMvField;\n+\n+#define MAX_PB_SIZE 64\n+\n+#define RPI_HEVC_SAO_BUF_STRIDE 160\n+\n+\n+typedef struct RpiSAOParams {\n+    uint8_t band_position[3];   ///< sao_band_position (Y,U,V)\n+    uint8_t eo_class[3];        ///< sao_eo_class      (Y,U=V)\n+    uint8_t type_idx[3];        ///< sao_type_idx      (Y,U=V)\n+\n+    int16_t offset_val[3][5];   ///<SaoOffsetVal       (Y,U,V)\n+\n+} RpiSAOParams;\n+\n+\n+// This controls how many sao dsp functions there are\n+// N=5 has width = 8, 16, 32, 48, 64\n+// N=6 adds a function for width=24 (in fn array el 5 so existing code should\n+// still work)\n+#define SAO_FILTER_N 6\n+\n+\n+typedef struct HEVCDSPContext {\n+    void (*put_pcm)(uint8_t *_dst, ptrdiff_t _stride, int width, int height,\n+                    struct GetBitContext *gb, int pcm_bit_depth);\n+\n+    void (*add_residual[4])(uint8_t *dst, int16_t *res, ptrdiff_t stride);\n+    void (*add_residual_dc[4])(uint8_t *dst, ptrdiff_t stride, int dc);\n+    void (*add_residual_u[4])(uint8_t *dst, const int16_t *res, ptrdiff_t stride, int dc_v);\n+    void (*add_residual_v[4])(uint8_t *dst, const int16_t *res, ptrdiff_t stride, int dc_u);\n+\n+    void (*add_residual_c[4])(uint8_t *dst, const int16_t *res, ptrdiff_t stride);\n+    void (*add_residual_dc_c[4])(uint8_t *dst, ptrdiff_t stride, int32_t dc_uv);\n+    void (*put_pcm_c)(uint8_t *_dst, ptrdiff_t _stride, int width, int height,\n+                    struct GetBitContext *gb, int pcm_bit_depth);\n+\n+    void (*dequant)(int16_t *coeffs, int16_t log2_size);\n+\n+    void (*transform_rdpcm)(int16_t *coeffs, int16_t log2_size, int mode);\n+\n+    void (*transform_4x4_luma)(int16_t *coeffs);\n+\n+    void (*idct[4])(int16_t *coeffs, int col_limit);\n+\n+    void (*idct_dc[4])(int16_t *coeffs);\n+\n+    void (*sao_band_filter[SAO_FILTER_N])(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src,\n+                               int16_t *sao_offset_val, int sao_left_class, int width, int height);\n+    void (*sao_band_filter_c[SAO_FILTER_N])(uint8_t *_dst, const uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src,\n+                               const int16_t *sao_offset_val_u, int sao_left_class_u,\n+                               const int16_t *sao_offset_val_v, int sao_left_class_v,\n+                               int width, int height);\n+\n+    /* implicit stride_src parameter has value of 2 * MAX_PB_SIZE + AV_INPUT_BUFFER_PADDING_SIZE */\n+    void (*sao_edge_filter[SAO_FILTER_N])(uint8_t *_dst /* align 16 */, uint8_t *_src /* align 32 */, ptrdiff_t stride_dst,\n+                               int16_t *sao_offset_val, int sao_eo_class, int width, int height);\n+    void (*sao_edge_filter_c[SAO_FILTER_N])(uint8_t *_dst /* align 16 */, const uint8_t *_src /* align 32 */, ptrdiff_t stride_dst,\n+                               const int16_t *sao_offset_val_u, const int16_t *sao_offset_val_v, int sao_eo_class, int width, int height);\n+\n+    void (*sao_edge_restore[2])(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src,\n+                                struct RpiSAOParams *sao, int *borders, int _width, int _height, int c_idx,\n+                                uint8_t *vert_edge, uint8_t *horiz_edge, uint8_t *diag_edge);\n+    void (*sao_edge_restore_c[2])(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src,\n+                                struct RpiSAOParams *sao, int *borders, int _width, int _height, int c_idx,\n+                                uint8_t *vert_edge, uint8_t *horiz_edge, uint8_t *diag_edge);\n+\n+    void (*put_hevc_qpel[10][2][2])(int16_t *dst, uint8_t *src, ptrdiff_t srcstride,\n+                                    int height, intptr_t mx, intptr_t my, int width);\n+    void (*put_hevc_qpel_uni[10][2][2])(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride,\n+                                        int height, intptr_t mx, intptr_t my, int width);\n+    void (*put_hevc_qpel_uni_w[10][2][2])(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                          int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width);\n+\n+    void (*put_hevc_qpel_bi[10][2][2])(uint8_t *dst, ptrdiff_t dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                       int16_t *src2,\n+                                       int height, intptr_t mx, intptr_t my, int width);\n+    void (*put_hevc_qpel_bi_w[10][2][2])(uint8_t *dst, ptrdiff_t dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                         int16_t *src2,\n+                                         int height, int denom, int wx0, int wx1,\n+                                         int ox0, int ox1, intptr_t mx, intptr_t my, int width);\n+    void (*put_hevc_epel[10][2][2])(int16_t *dst, uint8_t *src, ptrdiff_t srcstride,\n+                                    int height, intptr_t mx, intptr_t my, int width);\n+\n+    void (*put_hevc_epel_uni[10][2][2])(uint8_t *dst, ptrdiff_t dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                        int height, intptr_t mx, intptr_t my, int width);\n+    void (*put_hevc_epel_uni_w[10][2][2])(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                          int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width);\n+    void (*put_hevc_epel_bi[10][2][2])(uint8_t *dst, ptrdiff_t dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                       int16_t *src2,\n+                                       int height, intptr_t mx, intptr_t my, int width);\n+    void (*put_hevc_epel_bi_w[10][2][2])(uint8_t *dst, ptrdiff_t dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                         int16_t *src2,\n+                                         int height, int denom, int wx0, int ox0, int wx1,\n+                                         int ox1, intptr_t mx, intptr_t my, int width);\n+\n+    void (*hevc_h_loop_filter_luma)(uint8_t *pix, ptrdiff_t stride,\n+                                    int beta, int32_t *tc,\n+                                    uint8_t *no_p, uint8_t *no_q);\n+    void (*hevc_v_loop_filter_luma)(uint8_t *pix, ptrdiff_t stride,\n+                                    int beta, int32_t *tc,\n+                                    uint8_t *no_p, uint8_t *no_q);\n+    void (*hevc_h_loop_filter_chroma)(uint8_t *pix, ptrdiff_t stride,\n+                                      int32_t *tc, uint8_t *no_p, uint8_t *no_q);\n+    void (*hevc_v_loop_filter_chroma)(uint8_t *pix, ptrdiff_t stride,\n+                                      int32_t *tc, uint8_t *no_p, uint8_t *no_q);\n+    void (*hevc_h_loop_filter_luma_c)(uint8_t *pix, ptrdiff_t stride,\n+                                      int beta, int32_t *tc,\n+                                      uint8_t *no_p, uint8_t *no_q);\n+    void (*hevc_v_loop_filter_luma_c)(uint8_t *pix, ptrdiff_t stride,\n+                                      int beta, int32_t *tc,\n+                                      uint8_t *no_p, uint8_t *no_q);\n+    void (*hevc_h_loop_filter_chroma_c)(uint8_t *pix, ptrdiff_t stride,\n+                                        int32_t *tc, uint8_t *no_p,\n+                                        uint8_t *no_q);\n+    void (*hevc_v_loop_filter_chroma_c)(uint8_t *pix, ptrdiff_t stride,\n+                                        int32_t *tc, uint8_t *no_p,\n+                                        uint8_t *no_q);\n+    void (*hevc_h_loop_filter_luma2)(uint8_t * _pix_r,\n+                                 unsigned int _stride, unsigned int beta, unsigned int tc2, unsigned int no_f);\n+    void (*hevc_v_loop_filter_luma2)(uint8_t * _pix_r,\n+                                 unsigned int _stride, unsigned int beta, unsigned int tc2, unsigned int no_f,\n+                                 uint8_t * _pix_l);\n+    void (*hevc_h_loop_filter_uv)(uint8_t * src, unsigned int stride, uint32_t tc4,\n+                                 unsigned int no_f);\n+    void (*hevc_v_loop_filter_uv2)(uint8_t * src_r, unsigned int stride, uint32_t tc4,\n+                                 uint8_t * src_l,\n+                                 unsigned int no_f);\n+\n+    uint32_t (*hevc_deblocking_boundary_strengths)(int pus, int dup, const struct HEVCRpiMvField *curr, const struct HEVCRpiMvField *neigh,\n+                                               const int *curr_rpl0, const int *curr_rpl1, const int *neigh_rpl0, const int *neigh_rpl1,\n+                                               int in_inc0, int inc_inc1);\n+\n+    void (* cpy_blk)(uint8_t * dst, unsigned int dst_stride, const uint8_t * src, unsigned int src_stride, unsigned int width, unsigned int height);\n+} HEVCDSPContext;\n+\n+void ff_hevc_rpi_dsp_init(HEVCDSPContext *hpc, int bit_depth);\n+\n+extern const int8_t ff_hevc_rpi_epel_filters[7][4];\n+extern const int8_t ff_hevc_rpi_qpel_filters[3][16];\n+\n+void ff_hevc_rpi_dsp_init_ppc(HEVCDSPContext *c, const int bit_depth);\n+void ff_hevc_rpi_dsp_init_x86(HEVCDSPContext *c, const int bit_depth);\n+void ff_hevcdsp_rpi_init_arm(HEVCDSPContext *c, const int bit_depth);\n+void ff_hevc_rpi_dsp_init_mips(HEVCDSPContext *c, const int bit_depth);\n+#endif /* AVCODEC_RPI_HEVCDSP_H */\ndiff --git a/libavcodec/rpi_hevcdsp_template.c b/libavcodec/rpi_hevcdsp_template.c\nnew file mode 100644\nindex 0000000000..dea4e55e4b\n--- /dev/null\n+++ b/libavcodec/rpi_hevcdsp_template.c\n@@ -0,0 +1,2279 @@\n+/*\n+ * HEVC video decoder\n+ *\n+ * Copyright (C) 2012 - 2013 Guillaume Martres\n+ * Copyright (C) 2018 John Cox for Raspberry Pi (Trading)\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"get_bits.h\"\n+#include \"rpi_hevcdec.h\"\n+\n+#include \"bit_depth_template.c\"\n+#include \"rpi_hevcdsp.h\"\n+\n+#include \"rpi_hevc_shader_template.h\"\n+\n+static void FUNC(put_pcm)(uint8_t *_dst, ptrdiff_t stride, int width, int height,\n+                          GetBitContext *gb, int pcm_bit_depth)\n+{\n+    int x, y;\n+    pixel *dst = (pixel *)_dst;\n+\n+    stride /= sizeof(pixel);\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = get_bits(gb, pcm_bit_depth) << (BIT_DEPTH - pcm_bit_depth);\n+        dst += stride;\n+    }\n+}\n+\n+static void FUNC(put_pcm_c)(uint8_t *_dst, ptrdiff_t stride, int width, int height,\n+                          GetBitContext *gb, int pcm_bit_depth)\n+{\n+    int x, y;\n+    pixel *dst = (pixel *)_dst;\n+\n+    stride /= sizeof(pixel);\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x*2] = get_bits(gb, pcm_bit_depth) << (BIT_DEPTH - pcm_bit_depth);\n+        dst += stride;\n+    }\n+\n+    dst = (pixel *)_dst + 1;\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x*2] = get_bits(gb, pcm_bit_depth) << (BIT_DEPTH - pcm_bit_depth);\n+        dst += stride;\n+    }\n+}\n+\n+static av_always_inline void FUNC(add_residual)(uint8_t *_dst, int16_t *res,\n+                                                ptrdiff_t stride, int size)\n+{\n+    int x, y;\n+    pixel *dst = (pixel *)_dst;\n+\n+    stride /= sizeof(pixel);\n+\n+    for (y = 0; y < size; y++) {\n+        for (x = 0; x < size; x++) {\n+            dst[x] = av_clip_pixel(dst[x] + *res);\n+            res++;\n+        }\n+        dst += stride;\n+    }\n+}\n+\n+static av_always_inline void FUNC(add_residual_dc)(uint8_t *_dst, ptrdiff_t stride, const int dc, int size)\n+{\n+    int x, y;\n+    pixel *dst = (pixel *)_dst;\n+\n+    stride /= sizeof(pixel);\n+\n+    for (y = 0; y < size; y++) {\n+        for (x = 0; x < size; x++) {\n+            dst[x] = av_clip_pixel(dst[x] + dc);\n+        }\n+        dst += stride;\n+    }\n+}\n+\n+\n+static av_always_inline void FUNC(add_residual_u)(uint8_t *_dst, const int16_t *res,\n+                                                ptrdiff_t stride, const int dc_v, int size)\n+{\n+    int x, y;\n+    pixel *dst = (pixel *)_dst;\n+\n+    stride /= sizeof(pixel);\n+\n+    for (y = 0; y < size; y++) {\n+        for (x = 0; x < size * 2; x += 2) {\n+            dst[x] = av_clip_pixel(dst[x] + *res);\n+            dst[x + 1] = av_clip_pixel(dst[x + 1] + dc_v);\n+            res++;\n+        }\n+        dst += stride;\n+    }\n+}\n+\n+static av_always_inline void FUNC(add_residual_v)(uint8_t *_dst, const int16_t *res,\n+                                                ptrdiff_t stride, const int dc_u, int size)\n+{\n+    int x, y;\n+    pixel *dst = (pixel *)_dst;\n+\n+    stride /= sizeof(pixel);\n+\n+    for (y = 0; y < size; y++) {\n+        for (x = 0; x < size * 2; x += 2) {\n+            dst[x] = av_clip_pixel(dst[x] + dc_u);\n+            dst[x + 1] = av_clip_pixel(dst[x + 1] + *res);\n+            res++;\n+        }\n+        dst += stride;\n+    }\n+}\n+\n+static av_always_inline void FUNC(add_residual_c)(uint8_t *_dst, const int16_t *res,\n+                                                ptrdiff_t stride, unsigned int size)\n+{\n+    unsigned int x, y;\n+    pixel *dst = (pixel *)_dst;\n+    const int16_t * ru = res;\n+    const int16_t * rv = res + size * size;\n+\n+//    rpi_sand_dump16(\"ARC In Pred\", _dst, stride, 0, 0, 0, size, size, 1);\n+//    rpi_sand_dump16(\"ARC In RU\", ru, size * 2, 0, 0, 0, size, size, 0);\n+//    rpi_sand_dump16(\"ARC In RV\", rv, size * 2, 0, 0, 0, size, size, 0);\n+\n+    stride /= sizeof(pixel);\n+\n+    for (y = 0; y < size; y++) {\n+        for (x = 0; x < size * 2; x += 2) {\n+            dst[x + 0] = av_clip_pixel(dst[x + 0] + *ru++);\n+            dst[x + 1] = av_clip_pixel(dst[x + 1] + *rv++);\n+        }\n+        dst += stride;\n+    }\n+\n+//    rpi_sand_dump16(\"ARC Out\", _dst, stride * 2, 0, 0, 0, size, size, 1);\n+}\n+\n+\n+static av_always_inline void FUNC(add_residual_dc_c)(uint8_t *_dst, ptrdiff_t stride, const int32_t dc, int size)\n+{\n+    int x, y;\n+    pixel *dst = (pixel *)_dst;\n+    const int dc_v = dc >> 16;\n+    const int dc_u = (dc << 16) >> 16;\n+\n+    stride /= sizeof(pixel);\n+\n+    for (y = 0; y < size; y++) {\n+        for (x = 0; x < size * 2; x += 2) {\n+            dst[x] = av_clip_pixel(dst[x] + dc_u);\n+            dst[x + 1] = av_clip_pixel(dst[x + 1] + dc_v);\n+        }\n+        dst += stride;\n+    }\n+}\n+\n+\n+static void FUNC(add_residual4x4)(uint8_t *_dst, int16_t *res,\n+                                  ptrdiff_t stride)\n+{\n+    FUNC(add_residual)(_dst, res, stride, 4);\n+}\n+\n+static void FUNC(add_residual8x8)(uint8_t *_dst, int16_t *res,\n+                                  ptrdiff_t stride)\n+{\n+    FUNC(add_residual)(_dst, res, stride, 8);\n+}\n+\n+static void FUNC(add_residual16x16)(uint8_t *_dst, int16_t *res,\n+                                    ptrdiff_t stride)\n+{\n+    FUNC(add_residual)(_dst, res, stride, 16);\n+}\n+\n+static void FUNC(add_residual32x32)(uint8_t *_dst, int16_t *res,\n+                                    ptrdiff_t stride)\n+{\n+    FUNC(add_residual)(_dst, res, stride, 32);\n+}\n+\n+static void FUNC(add_residual4x4_dc)(uint8_t *_dst, ptrdiff_t stride, int dc)\n+{\n+    FUNC(add_residual_dc)(_dst, stride, dc, 4);\n+}\n+\n+static void FUNC(add_residual8x8_dc)(uint8_t *_dst, ptrdiff_t stride, int dc)\n+{\n+    FUNC(add_residual_dc)(_dst, stride, dc, 8);\n+}\n+\n+static void FUNC(add_residual16x16_dc)(uint8_t *_dst, ptrdiff_t stride, int dc)\n+{\n+    FUNC(add_residual_dc)(_dst, stride, dc, 16);\n+}\n+\n+static void FUNC(add_residual32x32_dc)(uint8_t *_dst, ptrdiff_t stride, int dc)\n+{\n+    FUNC(add_residual_dc)(_dst, stride, dc, 32);\n+}\n+\n+// -- U -- (plaited)\n+\n+static void FUNC(add_residual4x4_u)(uint8_t *_dst, const int16_t * res,\n+                                  ptrdiff_t stride, int dc_u)\n+{\n+    FUNC(add_residual_u)(_dst, res, stride, dc_u, 4);\n+}\n+\n+static void FUNC(add_residual8x8_u)(uint8_t *_dst, const int16_t * res,\n+                                  ptrdiff_t stride, int dc_u)\n+{\n+    FUNC(add_residual_u)(_dst, res, stride, dc_u, 8);\n+}\n+\n+static void FUNC(add_residual16x16_u)(uint8_t *_dst, const int16_t * res,\n+                                    ptrdiff_t stride, int dc_u)\n+{\n+    FUNC(add_residual_u)(_dst, res, stride, dc_u, 16);\n+}\n+\n+static void FUNC(add_residual32x32_u)(uint8_t *_dst, const int16_t * res,\n+                                    ptrdiff_t stride, int dc_u)\n+{\n+    // Should never occur for 420, which is all that sand supports\n+    av_assert0(0);\n+}\n+\n+// -- V -- (plaited)\n+\n+static void FUNC(add_residual4x4_v)(uint8_t *_dst, const int16_t * res,\n+                                  ptrdiff_t stride, int dc_v)\n+{\n+    FUNC(add_residual_v)(_dst, res, stride, dc_v, 4);\n+}\n+\n+static void FUNC(add_residual8x8_v)(uint8_t *_dst, const int16_t * res,\n+                                  ptrdiff_t stride, int dc_v)\n+{\n+    FUNC(add_residual_v)(_dst, res, stride, dc_v, 8);\n+}\n+\n+static void FUNC(add_residual16x16_v)(uint8_t *_dst, const int16_t * res,\n+                                    ptrdiff_t stride, int dc_v)\n+{\n+    FUNC(add_residual_v)(_dst, res, stride, dc_v, 16);\n+}\n+\n+static void FUNC(add_residual32x32_v)(uint8_t *_dst, const int16_t * res,\n+                                    ptrdiff_t stride, int dc_v)\n+{\n+    // Should never occur for 420, which is all that sand supports\n+    av_assert0(0);\n+}\n+\n+// -- C -- (plaited - both U & V)\n+\n+static void FUNC(add_residual4x4_c)(uint8_t *_dst, const int16_t * res,\n+                                  ptrdiff_t stride)\n+{\n+    FUNC(add_residual_c)(_dst, res, stride, 4);\n+}\n+\n+static void FUNC(add_residual8x8_c)(uint8_t *_dst, const int16_t * res,\n+                                  ptrdiff_t stride)\n+{\n+    FUNC(add_residual_c)(_dst, res, stride, 8);\n+}\n+\n+static void FUNC(add_residual16x16_c)(uint8_t *_dst, const int16_t * res,\n+                                    ptrdiff_t stride)\n+{\n+    FUNC(add_residual_c)(_dst, res, stride, 16);\n+}\n+\n+static void FUNC(add_residual32x32_c)(uint8_t *_dst, const int16_t * res,\n+                                    ptrdiff_t stride)\n+{\n+    // Should never occur for 420, which is all that sand supports\n+    av_assert0(0);\n+}\n+\n+static void FUNC(add_residual4x4_dc_c)(uint8_t *_dst, ptrdiff_t stride, int32_t dc)\n+{\n+    FUNC(add_residual_dc_c)(_dst, stride, dc, 4);\n+}\n+\n+static void FUNC(add_residual8x8_dc_c)(uint8_t *_dst, ptrdiff_t stride, int32_t dc)\n+{\n+    FUNC(add_residual_dc_c)(_dst, stride, dc, 8);\n+}\n+\n+static void FUNC(add_residual16x16_dc_c)(uint8_t *_dst, ptrdiff_t stride, int32_t dc)\n+{\n+    FUNC(add_residual_dc_c)(_dst, stride, dc, 16);\n+}\n+\n+static void FUNC(add_residual32x32_dc_c)(uint8_t *_dst, ptrdiff_t stride, int32_t dc)\n+{\n+    // Should never occur for 420, which is all that sand supports\n+    av_assert0(0);\n+}\n+\n+\n+static void FUNC(transform_rdpcm)(int16_t *_coeffs, int16_t log2_size, int mode)\n+{\n+    int16_t *coeffs = (int16_t *) _coeffs;\n+    int x, y;\n+    int size = 1 << log2_size;\n+\n+    if (mode) {\n+        coeffs += size;\n+        for (y = 0; y < size - 1; y++) {\n+            for (x = 0; x < size; x++)\n+                coeffs[x] += coeffs[x - size];\n+            coeffs += size;\n+        }\n+    } else {\n+        for (y = 0; y < size; y++) {\n+            for (x = 1; x < size; x++)\n+                coeffs[x] += coeffs[x - 1];\n+            coeffs += size;\n+        }\n+    }\n+}\n+\n+static void FUNC(dequant)(int16_t *coeffs, int16_t log2_size)\n+{\n+    int shift  = 15 - BIT_DEPTH - log2_size;\n+    int x, y;\n+    int size = 1 << log2_size;\n+\n+    if (shift > 0) {\n+        int offset = 1 << (shift - 1);\n+        for (y = 0; y < size; y++) {\n+            for (x = 0; x < size; x++) {\n+                *coeffs = (*coeffs + offset) >> shift;\n+                coeffs++;\n+            }\n+        }\n+    } else {\n+        for (y = 0; y < size; y++) {\n+            for (x = 0; x < size; x++) {\n+                *coeffs = *coeffs << -shift;\n+                coeffs++;\n+            }\n+        }\n+    }\n+}\n+\n+#define SET(dst, x)   (dst) = (x)\n+#define SCALE(dst, x) (dst) = av_clip_int16(((x) + add) >> shift)\n+\n+#define TR_4x4_LUMA(dst, src, step, assign)                             \\\n+    do {                                                                \\\n+        int c0 = src[0 * step] + src[2 * step];                         \\\n+        int c1 = src[2 * step] + src[3 * step];                         \\\n+        int c2 = src[0 * step] - src[3 * step];                         \\\n+        int c3 = 74 * src[1 * step];                                    \\\n+                                                                        \\\n+        assign(dst[2 * step], 74 * (src[0 * step] -                     \\\n+                                    src[2 * step] +                     \\\n+                                    src[3 * step]));                    \\\n+        assign(dst[0 * step], 29 * c0 + 55 * c1 + c3);                  \\\n+        assign(dst[1 * step], 55 * c2 - 29 * c1 + c3);                  \\\n+        assign(dst[3 * step], 55 * c0 + 29 * c2 - c3);                  \\\n+    } while (0)\n+\n+static void FUNC(transform_4x4_luma)(int16_t *coeffs)\n+{\n+    int i;\n+    int shift    = 7;\n+    int add      = 1 << (shift - 1);\n+    int16_t *src = coeffs;\n+\n+    for (i = 0; i < 4; i++) {\n+        TR_4x4_LUMA(src, src, 4, SCALE);\n+        src++;\n+    }\n+\n+    shift = 20 - BIT_DEPTH;\n+    add   = 1 << (shift - 1);\n+    for (i = 0; i < 4; i++) {\n+        TR_4x4_LUMA(coeffs, coeffs, 1, SCALE);\n+        coeffs += 4;\n+    }\n+}\n+\n+#undef TR_4x4_LUMA\n+\n+#define TR_4(dst, src, dstep, sstep, assign, end)                 \\\n+    do {                                                          \\\n+        const int e0 = 64 * src[0 * sstep] + 64 * src[2 * sstep]; \\\n+        const int e1 = 64 * src[0 * sstep] - 64 * src[2 * sstep]; \\\n+        const int o0 = 83 * src[1 * sstep] + 36 * src[3 * sstep]; \\\n+        const int o1 = 36 * src[1 * sstep] - 83 * src[3 * sstep]; \\\n+                                                                  \\\n+        assign(dst[0 * dstep], e0 + o0);                          \\\n+        assign(dst[1 * dstep], e1 + o1);                          \\\n+        assign(dst[2 * dstep], e1 - o1);                          \\\n+        assign(dst[3 * dstep], e0 - o0);                          \\\n+    } while (0)\n+\n+#define TR_8(dst, src, dstep, sstep, assign, end)                 \\\n+    do {                                                          \\\n+        int i, j;                                                 \\\n+        int e_8[4];                                               \\\n+        int o_8[4] = { 0 };                                       \\\n+        for (i = 0; i < 4; i++)                                   \\\n+            for (j = 1; j < end; j += 2)                          \\\n+                o_8[i] += transform[4 * j][i] * src[j * sstep];   \\\n+        TR_4(e_8, src, 1, 2 * sstep, SET, 4);                     \\\n+                                                                  \\\n+        for (i = 0; i < 4; i++) {                                 \\\n+            assign(dst[i * dstep], e_8[i] + o_8[i]);              \\\n+            assign(dst[(7 - i) * dstep], e_8[i] - o_8[i]);        \\\n+        }                                                         \\\n+    } while (0)\n+\n+#define TR_16(dst, src, dstep, sstep, assign, end)                \\\n+    do {                                                          \\\n+        int i, j;                                                 \\\n+        int e_16[8];                                              \\\n+        int o_16[8] = { 0 };                                      \\\n+        for (i = 0; i < 8; i++)                                   \\\n+            for (j = 1; j < end; j += 2)                          \\\n+                o_16[i] += transform[2 * j][i] * src[j * sstep];  \\\n+        TR_8(e_16, src, 1, 2 * sstep, SET, 8);                    \\\n+                                                                  \\\n+        for (i = 0; i < 8; i++) {                                 \\\n+            assign(dst[i * dstep], e_16[i] + o_16[i]);            \\\n+            assign(dst[(15 - i) * dstep], e_16[i] - o_16[i]);     \\\n+        }                                                         \\\n+    } while (0)\n+\n+#define TR_32(dst, src, dstep, sstep, assign, end)                \\\n+    do {                                                          \\\n+        int i, j;                                                 \\\n+        int e_32[16];                                             \\\n+        int o_32[16] = { 0 };                                     \\\n+        for (i = 0; i < 16; i++)                                  \\\n+            for (j = 1; j < end; j += 2)                          \\\n+                o_32[i] += transform[j][i] * src[j * sstep];      \\\n+        TR_16(e_32, src, 1, 2 * sstep, SET, end / 2);             \\\n+                                                                  \\\n+        for (i = 0; i < 16; i++) {                                \\\n+            assign(dst[i * dstep], e_32[i] + o_32[i]);            \\\n+            assign(dst[(31 - i) * dstep], e_32[i] - o_32[i]);     \\\n+        }                                                         \\\n+    } while (0)\n+\n+#define IDCT_VAR4(H)                                              \\\n+    int limit2 = FFMIN(col_limit + 4, H)\n+#define IDCT_VAR8(H)                                              \\\n+    int limit  = FFMIN(col_limit, H);                             \\\n+    int limit2 = FFMIN(col_limit + 4, H)\n+#define IDCT_VAR16(H)   IDCT_VAR8(H)\n+#define IDCT_VAR32(H)   IDCT_VAR8(H)\n+\n+#define IDCT(H)                                                   \\\n+static void FUNC(idct_ ## H ## x ## H )(int16_t *coeffs,          \\\n+                                        int col_limit)            \\\n+{                                                                 \\\n+    int i;                                                        \\\n+    int      shift = 7;                                           \\\n+    int      add   = 1 << (shift - 1);                            \\\n+    int16_t *src   = coeffs;                                      \\\n+    IDCT_VAR ## H(H);                                             \\\n+                                                                  \\\n+    for (i = 0; i < H; i++) {                                     \\\n+        TR_ ## H(src, src, H, H, SCALE, limit2);                  \\\n+        if (limit2 < H && i%4 == 0 && !!i)                        \\\n+            limit2 -= 4;                                          \\\n+        src++;                                                    \\\n+    }                                                             \\\n+                                                                  \\\n+    shift = 20 - BIT_DEPTH;                                       \\\n+    add   = 1 << (shift - 1);                                     \\\n+    for (i = 0; i < H; i++) {                                     \\\n+        TR_ ## H(coeffs, coeffs, 1, 1, SCALE, limit);             \\\n+        coeffs += H;                                              \\\n+    }                                                             \\\n+}\n+\n+#define IDCT_DC(H)                                                \\\n+static void FUNC(idct_ ## H ## x ## H ## _dc)(int16_t *coeffs)    \\\n+{                                                                 \\\n+    int i, j;                                                     \\\n+    int shift = 14 - BIT_DEPTH;                                   \\\n+    int add   = 1 << (shift - 1);                                 \\\n+    int coeff = (((coeffs[0] + 1) >> 1) + add) >> shift;          \\\n+                                                                  \\\n+    for (j = 0; j < H; j++) {                                     \\\n+        for (i = 0; i < H; i++) {                                 \\\n+            coeffs[i + j * H] = coeff;                            \\\n+        }                                                         \\\n+    }                                                             \\\n+}\n+\n+IDCT( 4)\n+IDCT( 8)\n+IDCT(16)\n+IDCT(32)\n+\n+IDCT_DC( 4)\n+IDCT_DC( 8)\n+IDCT_DC(16)\n+IDCT_DC(32)\n+\n+#undef TR_4\n+#undef TR_8\n+#undef TR_16\n+#undef TR_32\n+\n+#undef SET\n+#undef SCALE\n+\n+static void FUNC(sao_band_filter)(uint8_t *_dst, uint8_t *_src,\n+                                  ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                  int16_t *sao_offset_val, int sao_left_class,\n+                                  int width, int height)\n+{\n+    pixel *dst = (pixel *)_dst;\n+    pixel *src = (pixel *)_src;\n+    int offset_table[32] = { 0 };\n+    int k, y, x;\n+    int shift  = BIT_DEPTH - 5;\n+\n+    stride_dst /= sizeof(pixel);\n+    stride_src /= sizeof(pixel);\n+\n+    for (k = 0; k < 4; k++)\n+        offset_table[(k + sao_left_class) & 31] = sao_offset_val[k + 1];\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(src[x] + offset_table[src[x] >> shift]);\n+        dst += stride_dst;\n+        src += stride_src;\n+    }\n+}\n+\n+#define CMP(a, b) (((a) > (b)) - ((a) < (b)))\n+\n+static void FUNC(sao_edge_filter)(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, int16_t *sao_offset_val,\n+                                  int eo, int width, int height) {\n+\n+    static const uint8_t edge_idx[] = { 1, 2, 0, 3, 4 };\n+    static const int8_t pos[4][2][2] = {\n+        { { -1,  0 }, {  1, 0 } }, // horizontal\n+        { {  0, -1 }, {  0, 1 } }, // vertical\n+        { { -1, -1 }, {  1, 1 } }, // 45 degree\n+        { {  1, -1 }, { -1, 1 } }, // 135 degree\n+    };\n+    pixel *dst = (pixel *)_dst;\n+    pixel *src = (pixel *)_src;\n+    int a_stride, b_stride;\n+    int x, y;\n+    const ptrdiff_t stride_src = RPI_HEVC_SAO_BUF_STRIDE / sizeof(pixel);\n+    stride_dst /= sizeof(pixel);\n+\n+    a_stride = pos[eo][0][0] + pos[eo][0][1] * stride_src;\n+    b_stride = pos[eo][1][0] + pos[eo][1][1] * stride_src;\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++) {\n+            int diff0 = CMP(src[x], src[x + a_stride]);\n+            int diff1 = CMP(src[x], src[x + b_stride]);\n+            int offset_val        = edge_idx[2 + diff0 + diff1];\n+            dst[x] = av_clip_pixel(src[x] + sao_offset_val[offset_val]);\n+        }\n+        src += stride_src;\n+        dst += stride_dst;\n+    }\n+}\n+\n+\n+#if BIT_DEPTH == 10\n+// We need a 32 bit variation for the _c restores so hijack bit depth 10\n+#undef pixel\n+#undef BIT_DEPTH\n+#define pixel uint32_t\n+#define BIT_DEPTH 32\n+// All 16 bit variations are the same\n+#define sao_edge_restore_0_10 sao_edge_restore_0_9\n+#define sao_edge_restore_1_10 sao_edge_restore_1_9\n+#define sao_edge_restore_0_11 sao_edge_restore_0_9\n+#define sao_edge_restore_1_11 sao_edge_restore_1_9\n+#define sao_edge_restore_0_12 sao_edge_restore_0_9\n+#define sao_edge_restore_1_12 sao_edge_restore_1_9\n+#define sao_edge_restore_0_13 sao_edge_restore_0_9\n+#define sao_edge_restore_1_13 sao_edge_restore_1_9\n+#define sao_edge_restore_0_14 sao_edge_restore_0_9\n+#define sao_edge_restore_1_14 sao_edge_restore_1_9\n+#define sao_edge_restore_0_15 sao_edge_restore_0_9\n+#define sao_edge_restore_1_15 sao_edge_restore_1_9\n+#define sao_edge_restore_0_16 sao_edge_restore_0_9\n+#define sao_edge_restore_1_16 sao_edge_restore_1_9\n+#endif\n+#if BIT_DEPTH <= 9 || BIT_DEPTH == 32\n+static void FUNC(sao_edge_restore_0)(uint8_t *_dst, uint8_t *_src,\n+                                    ptrdiff_t stride_dst, ptrdiff_t stride_src, RpiSAOParams *sao,\n+                                    int *borders, int _width, int _height,\n+                                    int c_idx, uint8_t *vert_edge,\n+                                    uint8_t *horiz_edge, uint8_t *diag_edge)\n+{\n+    int x, y;\n+    pixel *dst = (pixel *)_dst;\n+    pixel *src = (pixel *)_src;\n+    int sao_eo_class    = sao->eo_class[c_idx];\n+    int init_x = 0, width = _width, height = _height;\n+\n+    stride_dst /= sizeof(pixel);\n+    stride_src /= sizeof(pixel);\n+\n+    if (sao_eo_class != SAO_EO_VERT) {\n+        if (borders[0]) {\n+            for (y = 0; y < height; y++) {\n+                dst[y * stride_dst] = src[y * stride_src];\n+            }\n+            init_x = 1;\n+        }\n+        if (borders[2]) {\n+            int offset     = width - 1;\n+            for (x = 0; x < height; x++) {\n+                dst[x * stride_dst + offset] = src[x * stride_src + offset];\n+            }\n+            width--;\n+        }\n+    }\n+    if (sao_eo_class != SAO_EO_HORIZ) {\n+        if (borders[1]) {\n+            for (x = init_x; x < width; x++)\n+                dst[x] = src[x];\n+        }\n+        if (borders[3]) {\n+            ptrdiff_t y_stride_dst = stride_dst * (height - 1);\n+            ptrdiff_t y_stride_src = stride_src * (height - 1);\n+            for (x = init_x; x < width; x++)\n+                dst[x + y_stride_dst] = src[x + y_stride_src];\n+            height--;\n+        }\n+    }\n+}\n+\n+static void FUNC(sao_edge_restore_1)(uint8_t *_dst, uint8_t *_src,\n+                                    ptrdiff_t stride_dst, ptrdiff_t stride_src, RpiSAOParams *sao,\n+                                    int *borders, int _width, int _height,\n+                                    int c_idx, uint8_t *vert_edge,\n+                                    uint8_t *horiz_edge, uint8_t *diag_edge)\n+{\n+    int x, y;\n+    pixel *dst = (pixel *)_dst;\n+    pixel *src = (pixel *)_src;\n+    int sao_eo_class    = sao->eo_class[c_idx];\n+    int init_x = 0, init_y = 0, width = _width, height = _height;\n+\n+    stride_dst /= sizeof(pixel);\n+    stride_src /= sizeof(pixel);\n+\n+    if (sao_eo_class != SAO_EO_VERT) {\n+        if (borders[0]) {\n+            for (y = 0; y < height; y++) {\n+                dst[y * stride_dst] = src[y * stride_src];\n+            }\n+            init_x = 1;\n+        }\n+        if (borders[2]) {\n+            int offset     = width - 1;\n+            for (x = 0; x < height; x++) {\n+                dst[x * stride_dst + offset] = src[x * stride_src + offset];\n+            }\n+            width--;\n+        }\n+    }\n+    if (sao_eo_class != SAO_EO_HORIZ) {\n+        if (borders[1]) {\n+            for (x = init_x; x < width; x++)\n+                dst[x] = src[x];\n+            init_y = 1;\n+        }\n+        if (borders[3]) {\n+            ptrdiff_t y_stride_dst = stride_dst * (height - 1);\n+            ptrdiff_t y_stride_src = stride_src * (height - 1);\n+            for (x = init_x; x < width; x++)\n+                dst[x + y_stride_dst] = src[x + y_stride_src];\n+            height--;\n+        }\n+    }\n+\n+    {\n+        int save_upper_left  = !diag_edge[0] && sao_eo_class == SAO_EO_135D && !borders[0] && !borders[1];\n+        int save_upper_right = !diag_edge[1] && sao_eo_class == SAO_EO_45D  && !borders[1] && !borders[2];\n+        int save_lower_right = !diag_edge[2] && sao_eo_class == SAO_EO_135D && !borders[2] && !borders[3];\n+        int save_lower_left  = !diag_edge[3] && sao_eo_class == SAO_EO_45D  && !borders[0] && !borders[3];\n+\n+        // Restore pixels that can't be modified\n+        if(vert_edge[0] && sao_eo_class != SAO_EO_VERT) {\n+            for(y = init_y+save_upper_left; y< height-save_lower_left; y++)\n+                dst[y*stride_dst] = src[y*stride_src];\n+        }\n+        if(vert_edge[1] && sao_eo_class != SAO_EO_VERT) {\n+            for(y = init_y+save_upper_right; y< height-save_lower_right; y++)\n+                dst[y*stride_dst+width-1] = src[y*stride_src+width-1];\n+        }\n+\n+        if(horiz_edge[0] && sao_eo_class != SAO_EO_HORIZ) {\n+            for(x = init_x+save_upper_left; x < width-save_upper_right; x++)\n+                dst[x] = src[x];\n+        }\n+        if(horiz_edge[1] && sao_eo_class != SAO_EO_HORIZ) {\n+            for(x = init_x+save_lower_left; x < width-save_lower_right; x++)\n+                dst[(height-1)*stride_dst+x] = src[(height-1)*stride_src+x];\n+        }\n+        if(diag_edge[0] && sao_eo_class == SAO_EO_135D)\n+            dst[0] = src[0];\n+        if(diag_edge[1] && sao_eo_class == SAO_EO_45D)\n+            dst[width-1] = src[width-1];\n+        if(diag_edge[2] && sao_eo_class == SAO_EO_135D)\n+            dst[stride_dst*(height-1)+width-1] = src[stride_src*(height-1)+width-1];\n+        if(diag_edge[3] && sao_eo_class == SAO_EO_45D)\n+            dst[stride_dst*(height-1)] = src[stride_src*(height-1)];\n+\n+    }\n+}\n+#endif\n+#if BIT_DEPTH == 32\n+#undef BIT_DEPTH\n+#undef pixel\n+#define BIT_DEPTH 10\n+#define pixel uint16_t\n+#endif\n+\n+// --- Plaited chroma versions\n+\n+static void FUNC(sao_band_filter_c)(uint8_t *_dst, const uint8_t *_src,\n+                                  ptrdiff_t stride_dst, ptrdiff_t stride_src,\n+                                  const int16_t *sao_offset_val_u, int sao_left_class_u,\n+                                  const int16_t *sao_offset_val_v, int sao_left_class_v,\n+                                  int width, int height)\n+{\n+    pixel *dst = (pixel *)_dst;\n+    pixel *src = (pixel *)_src;\n+    int offset_table_u[32] = { 0 };\n+    int offset_table_v[32] = { 0 };\n+    int k, y, x;\n+    int shift  = BIT_DEPTH - 5;\n+\n+    stride_dst /= sizeof(pixel);\n+    stride_src /= sizeof(pixel);\n+    width *= 2;\n+\n+    for (k = 0; k < 4; k++)\n+    {\n+        offset_table_u[(k + sao_left_class_u) & 31] = sao_offset_val_u[k + 1];\n+        offset_table_v[(k + sao_left_class_v) & 31] = sao_offset_val_v[k + 1];\n+    }\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x += 2)\n+        {\n+//            printf(\"dst=%p, src=%p, x=%d, shift=%d\\n\", dst, src, x, shift);\n+//            printf(\"offsets=%x,%x\\n\", src[x + 0], src[x + 1]);\n+            // *** & 31 shouldn't be wanted but just now we generate broken input that\n+            // crashes us in 10-bit world\n+            dst[x + 0] = av_clip_pixel(src[x + 0] + offset_table_u[(src[x + 0] >> shift) & 31]);\n+            dst[x + 1] = av_clip_pixel(src[x + 1] + offset_table_v[(src[x + 1] >> shift) & 31]);\n+        }\n+        dst += stride_dst;\n+        src += stride_src;\n+    }\n+}\n+\n+static void FUNC(sao_edge_filter_c)(uint8_t *_dst, const uint8_t *_src, ptrdiff_t stride_dst,\n+                                  const int16_t *sao_offset_val_u, const int16_t *sao_offset_val_v,\n+                                  int eo, int width, int height) {\n+\n+    static const uint8_t edge_idx[] = { 1, 2, 0, 3, 4 };\n+    static const int8_t pos[4][2][2] = {\n+        { { -1,  0 }, {  1, 0 } }, // horizontal\n+        { {  0, -1 }, {  0, 1 } }, // vertical\n+        { { -1, -1 }, {  1, 1 } }, // 45 degree\n+        { {  1, -1 }, { -1, 1 } }, // 135 degree\n+    };\n+    pixel *dst = (pixel *)_dst;\n+    pixel *src = (pixel *)_src;\n+    int a_stride, b_stride;\n+    int x, y;\n+    const ptrdiff_t stride_src = RPI_HEVC_SAO_BUF_STRIDE / sizeof(pixel);\n+\n+    stride_dst /= sizeof(pixel);\n+    width *= 2;\n+\n+    av_assert0(width <= 64);\n+\n+    a_stride = pos[eo][0][0] * 2 + pos[eo][0][1] * stride_src;\n+    b_stride = pos[eo][1][0] * 2 + pos[eo][1][1] * stride_src;\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x += 2) {\n+            int diff0u = CMP(src[x], src[x + a_stride]);\n+            int diff1u = CMP(src[x], src[x + b_stride]);\n+            int offset_valu        = edge_idx[2 + diff0u + diff1u];\n+            int diff0v = CMP(src[x+1], src[x+1 + a_stride]);\n+            int diff1v = CMP(src[x+1], src[x+1 + b_stride]);\n+            int offset_valv        = edge_idx[2 + diff0v + diff1v];\n+            dst[x] = av_clip_pixel(src[x] + sao_offset_val_u[offset_valu]);\n+            dst[x+1] = av_clip_pixel(src[x+1] + sao_offset_val_v[offset_valv]);\n+        }\n+        src += stride_src;\n+        dst += stride_dst;\n+    }\n+}\n+\n+// Do once\n+#if BIT_DEPTH == 8\n+// Any old 2 byte 'normal' restore will work for these\n+#define sao_edge_restore_c_0_8  sao_edge_restore_0_16\n+#define sao_edge_restore_c_1_8  sao_edge_restore_1_16\n+// We need 32 bit for 9 bit+\n+#define sao_edge_restore_c_0_9  sao_edge_restore_0_32\n+#define sao_edge_restore_c_1_9  sao_edge_restore_1_32\n+#define sao_edge_restore_c_0_10 sao_edge_restore_0_32\n+#define sao_edge_restore_c_1_10 sao_edge_restore_1_32\n+#define sao_edge_restore_c_0_11 sao_edge_restore_0_32\n+#define sao_edge_restore_c_1_11 sao_edge_restore_1_32\n+#define sao_edge_restore_c_0_12 sao_edge_restore_0_32\n+#define sao_edge_restore_c_1_12 sao_edge_restore_1_32\n+#define sao_edge_restore_c_0_13 sao_edge_restore_0_32\n+#define sao_edge_restore_c_1_13 sao_edge_restore_1_32\n+#define sao_edge_restore_c_0_14 sao_edge_restore_0_32\n+#define sao_edge_restore_c_1_14 sao_edge_restore_1_32\n+#define sao_edge_restore_c_0_15 sao_edge_restore_0_32\n+#define sao_edge_restore_c_1_15 sao_edge_restore_1_32\n+#define sao_edge_restore_c_0_16 sao_edge_restore_0_32\n+#define sao_edge_restore_c_1_16 sao_edge_restore_1_32\n+#endif\n+\n+#undef CMP\n+\n+////////////////////////////////////////////////////////////////////////////////\n+//\n+////////////////////////////////////////////////////////////////////////////////\n+static void FUNC(put_hevc_pel_pixels)(int16_t *dst,\n+                                      uint8_t *_src, ptrdiff_t _srcstride,\n+                                      int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src          = (pixel *)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = src[x] << (14 - BIT_DEPTH);\n+        src += srcstride;\n+        dst += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_pel_uni_pixels)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                          int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int y;\n+    pixel *src          = (pixel *)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+\n+    for (y = 0; y < height; y++) {\n+        memcpy(dst, src, width * sizeof(pixel));\n+        src += srcstride;\n+        dst += dststride;\n+    }\n+}\n+\n+static void FUNC(put_hevc_pel_bi_pixels)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                         int16_t *src2,\n+                                         int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src          = (pixel *)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+\n+    int shift = 14  + 1 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((src[x] << (14 - BIT_DEPTH)) + src2[x] + offset) >> shift);\n+        src  += srcstride;\n+        dst  += dststride;\n+        src2 += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_pel_uni_w_pixels)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                            int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src          = (pixel *)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    int shift = denom + 14 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    ox     = ox * (1 << (BIT_DEPTH - 8));\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel((((src[x] << (14 - BIT_DEPTH)) * wx + offset) >> shift) + ox);\n+        src += srcstride;\n+        dst += dststride;\n+    }\n+}\n+\n+static void FUNC(put_hevc_pel_bi_w_pixels)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                           int16_t *src2,\n+                                           int height, int denom, int wx0, int wx1,\n+                                           int ox0, int ox1, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src          = (pixel *)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+\n+    int shift = 14  + 1 - BIT_DEPTH;\n+    int log2Wd = denom + shift - 1;\n+\n+    ox0     = ox0 * (1 << (BIT_DEPTH - 8));\n+    ox1     = ox1 * (1 << (BIT_DEPTH - 8));\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++) {\n+            dst[x] = av_clip_pixel(( (src[x] << (14 - BIT_DEPTH)) * wx1 + src2[x] * wx0 + (ox0 + ox1 + 1) * (1 << log2Wd)) >> (log2Wd + 1));\n+        }\n+        src  += srcstride;\n+        dst  += dststride;\n+        src2 += MAX_PB_SIZE;\n+    }\n+}\n+\n+////////////////////////////////////////////////////////////////////////////////\n+//\n+////////////////////////////////////////////////////////////////////////////////\n+#define QPEL_FILTER(src, stride)                                               \\\n+    (filter[0] * src[x - 3 * stride] +                                         \\\n+     filter[1] * src[x - 2 * stride] +                                         \\\n+     filter[2] * src[x -     stride] +                                         \\\n+     filter[3] * src[x             ] +                                         \\\n+     filter[4] * src[x +     stride] +                                         \\\n+     filter[5] * src[x + 2 * stride] +                                         \\\n+     filter[6] * src[x + 3 * stride] +                                         \\\n+     filter[7] * src[x + 4 * stride])\n+\n+static void FUNC(put_hevc_qpel_h)(int16_t *dst,\n+                                  uint8_t *_src, ptrdiff_t _srcstride,\n+                                  int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel        *src       = (pixel*)_src;\n+    ptrdiff_t     srcstride = _srcstride / sizeof(pixel);\n+    const int8_t *filter    = ff_hevc_rpi_qpel_filters[mx - 1];\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8);\n+        src += srcstride;\n+        dst += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_qpel_v)(int16_t *dst,\n+                                  uint8_t *_src, ptrdiff_t _srcstride,\n+                                  int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel        *src       = (pixel*)_src;\n+    ptrdiff_t     srcstride = _srcstride / sizeof(pixel);\n+    const int8_t *filter    = ff_hevc_rpi_qpel_filters[my - 1];\n+    for (y = 0; y < height; y++)  {\n+        for (x = 0; x < width; x++)\n+            dst[x] = QPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8);\n+        src += srcstride;\n+        dst += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_qpel_hv)(int16_t *dst,\n+                                   uint8_t *_src,\n+                                   ptrdiff_t _srcstride,\n+                                   int height, intptr_t mx,\n+                                   intptr_t my, int width)\n+{\n+    int x, y;\n+    const int8_t *filter;\n+    pixel *src = (pixel*)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+    int16_t tmp_array[(MAX_PB_SIZE + QPEL_EXTRA) * MAX_PB_SIZE];\n+    int16_t *tmp = tmp_array;\n+\n+    src   -= QPEL_EXTRA_BEFORE * srcstride;\n+    filter = ff_hevc_rpi_qpel_filters[mx - 1];\n+    for (y = 0; y < height + QPEL_EXTRA; y++) {\n+        for (x = 0; x < width; x++)\n+            tmp[x] = QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8);\n+        src += srcstride;\n+        tmp += MAX_PB_SIZE;\n+    }\n+\n+    tmp    = tmp_array + QPEL_EXTRA_BEFORE * MAX_PB_SIZE;\n+    filter = ff_hevc_rpi_qpel_filters[my - 1];\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = QPEL_FILTER(tmp, MAX_PB_SIZE) >> 6;\n+        tmp += MAX_PB_SIZE;\n+        dst += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_qpel_uni_h)(uint8_t *_dst,  ptrdiff_t _dststride,\n+                                      uint8_t *_src, ptrdiff_t _srcstride,\n+                                      int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel        *src       = (pixel*)_src;\n+    ptrdiff_t     srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    const int8_t *filter    = ff_hevc_rpi_qpel_filters[mx - 1];\n+    int shift = 14 - BIT_DEPTH;\n+\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) + offset) >> shift);\n+        src += srcstride;\n+        dst += dststride;\n+    }\n+}\n+\n+static void FUNC(put_hevc_qpel_bi_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                     int16_t *src2,\n+                                     int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel        *src       = (pixel*)_src;\n+    ptrdiff_t     srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+\n+    const int8_t *filter    = ff_hevc_rpi_qpel_filters[mx - 1];\n+\n+    int shift = 14  + 1 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) + src2[x] + offset) >> shift);\n+        src  += srcstride;\n+        dst  += dststride;\n+        src2 += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_qpel_uni_v)(uint8_t *_dst,  ptrdiff_t _dststride,\n+                                     uint8_t *_src, ptrdiff_t _srcstride,\n+                                     int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel        *src       = (pixel*)_src;\n+    ptrdiff_t     srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    const int8_t *filter    = ff_hevc_rpi_qpel_filters[my - 1];\n+    int shift = 14 - BIT_DEPTH;\n+\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((QPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) + offset) >> shift);\n+        src += srcstride;\n+        dst += dststride;\n+    }\n+}\n+\n+\n+static void FUNC(put_hevc_qpel_bi_v)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                     int16_t *src2,\n+                                     int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel        *src       = (pixel*)_src;\n+    ptrdiff_t     srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+\n+    const int8_t *filter    = ff_hevc_rpi_qpel_filters[my - 1];\n+\n+    int shift = 14 + 1 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((QPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) + src2[x] + offset) >> shift);\n+        src  += srcstride;\n+        dst  += dststride;\n+        src2 += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_qpel_uni_hv)(uint8_t *_dst,  ptrdiff_t _dststride,\n+                                       uint8_t *_src, ptrdiff_t _srcstride,\n+                                       int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    const int8_t *filter;\n+    pixel *src = (pixel*)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    int16_t tmp_array[(MAX_PB_SIZE + QPEL_EXTRA) * MAX_PB_SIZE];\n+    int16_t *tmp = tmp_array;\n+    int shift =  14 - BIT_DEPTH;\n+\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    src   -= QPEL_EXTRA_BEFORE * srcstride;\n+    filter = ff_hevc_rpi_qpel_filters[mx - 1];\n+    for (y = 0; y < height + QPEL_EXTRA; y++) {\n+        for (x = 0; x < width; x++)\n+            tmp[x] = QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8);\n+        src += srcstride;\n+        tmp += MAX_PB_SIZE;\n+    }\n+\n+    tmp    = tmp_array + QPEL_EXTRA_BEFORE * MAX_PB_SIZE;\n+    filter = ff_hevc_rpi_qpel_filters[my - 1];\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((QPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) + offset) >> shift);\n+        tmp += MAX_PB_SIZE;\n+        dst += dststride;\n+    }\n+}\n+\n+static void FUNC(put_hevc_qpel_bi_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                      int16_t *src2,\n+                                      int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    const int8_t *filter;\n+    pixel *src = (pixel*)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    int16_t tmp_array[(MAX_PB_SIZE + QPEL_EXTRA) * MAX_PB_SIZE];\n+    int16_t *tmp = tmp_array;\n+    int shift = 14 + 1 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    src   -= QPEL_EXTRA_BEFORE * srcstride;\n+    filter = ff_hevc_rpi_qpel_filters[mx - 1];\n+    for (y = 0; y < height + QPEL_EXTRA; y++) {\n+        for (x = 0; x < width; x++)\n+            tmp[x] = QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8);\n+        src += srcstride;\n+        tmp += MAX_PB_SIZE;\n+    }\n+\n+    tmp    = tmp_array + QPEL_EXTRA_BEFORE * MAX_PB_SIZE;\n+    filter = ff_hevc_rpi_qpel_filters[my - 1];\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((QPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) + src2[x] + offset) >> shift);\n+        tmp  += MAX_PB_SIZE;\n+        dst  += dststride;\n+        src2 += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_qpel_uni_w_h)(uint8_t *_dst,  ptrdiff_t _dststride,\n+                                        uint8_t *_src, ptrdiff_t _srcstride,\n+                                        int height, int denom, int wx, int ox,\n+                                        intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel        *src       = (pixel*)_src;\n+    ptrdiff_t     srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    const int8_t *filter    = ff_hevc_rpi_qpel_filters[mx - 1];\n+    int shift = denom + 14 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    ox = ox * (1 << (BIT_DEPTH - 8));\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel((((QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) * wx + offset) >> shift) + ox);\n+        src += srcstride;\n+        dst += dststride;\n+    }\n+}\n+\n+static void FUNC(put_hevc_qpel_bi_w_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                       int16_t *src2,\n+                                       int height, int denom, int wx0, int wx1,\n+                                       int ox0, int ox1, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel        *src       = (pixel*)_src;\n+    ptrdiff_t     srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+\n+    const int8_t *filter    = ff_hevc_rpi_qpel_filters[mx - 1];\n+\n+    int shift = 14  + 1 - BIT_DEPTH;\n+    int log2Wd = denom + shift - 1;\n+\n+    ox0     = ox0 * (1 << (BIT_DEPTH - 8));\n+    ox1     = ox1 * (1 << (BIT_DEPTH - 8));\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) * wx1 + src2[x] * wx0 +\n+                                    ((ox0 + ox1 + 1) << log2Wd)) >> (log2Wd + 1));\n+        src  += srcstride;\n+        dst  += dststride;\n+        src2 += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_qpel_uni_w_v)(uint8_t *_dst,  ptrdiff_t _dststride,\n+                                        uint8_t *_src, ptrdiff_t _srcstride,\n+                                        int height, int denom, int wx, int ox,\n+                                        intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel        *src       = (pixel*)_src;\n+    ptrdiff_t     srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    const int8_t *filter    = ff_hevc_rpi_qpel_filters[my - 1];\n+    int shift = denom + 14 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    ox = ox * (1 << (BIT_DEPTH - 8));\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel((((QPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) * wx + offset) >> shift) + ox);\n+        src += srcstride;\n+        dst += dststride;\n+    }\n+}\n+\n+static void FUNC(put_hevc_qpel_bi_w_v)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                       int16_t *src2,\n+                                       int height, int denom, int wx0, int wx1,\n+                                       int ox0, int ox1, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel        *src       = (pixel*)_src;\n+    ptrdiff_t     srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+\n+    const int8_t *filter    = ff_hevc_rpi_qpel_filters[my - 1];\n+\n+    int shift = 14 + 1 - BIT_DEPTH;\n+    int log2Wd = denom + shift - 1;\n+\n+    ox0     = ox0 * (1 << (BIT_DEPTH - 8));\n+    ox1     = ox1 * (1 << (BIT_DEPTH - 8));\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((QPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) * wx1 + src2[x] * wx0 +\n+                                    ((ox0 + ox1 + 1) << log2Wd)) >> (log2Wd + 1));\n+        src  += srcstride;\n+        dst  += dststride;\n+        src2 += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_qpel_uni_w_hv)(uint8_t *_dst,  ptrdiff_t _dststride,\n+                                         uint8_t *_src, ptrdiff_t _srcstride,\n+                                         int height, int denom, int wx, int ox,\n+                                         intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    const int8_t *filter;\n+    pixel *src = (pixel*)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    int16_t tmp_array[(MAX_PB_SIZE + QPEL_EXTRA) * MAX_PB_SIZE];\n+    int16_t *tmp = tmp_array;\n+    int shift = denom + 14 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    src   -= QPEL_EXTRA_BEFORE * srcstride;\n+    filter = ff_hevc_rpi_qpel_filters[mx - 1];\n+    for (y = 0; y < height + QPEL_EXTRA; y++) {\n+        for (x = 0; x < width; x++)\n+            tmp[x] = QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8);\n+        src += srcstride;\n+        tmp += MAX_PB_SIZE;\n+    }\n+\n+    tmp    = tmp_array + QPEL_EXTRA_BEFORE * MAX_PB_SIZE;\n+    filter = ff_hevc_rpi_qpel_filters[my - 1];\n+\n+    ox = ox * (1 << (BIT_DEPTH - 8));\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel((((QPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) * wx + offset) >> shift) + ox);\n+        tmp += MAX_PB_SIZE;\n+        dst += dststride;\n+    }\n+}\n+\n+static void FUNC(put_hevc_qpel_bi_w_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                        int16_t *src2,\n+                                        int height, int denom, int wx0, int wx1,\n+                                        int ox0, int ox1, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    const int8_t *filter;\n+    pixel *src = (pixel*)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    int16_t tmp_array[(MAX_PB_SIZE + QPEL_EXTRA) * MAX_PB_SIZE];\n+    int16_t *tmp = tmp_array;\n+    int shift = 14 + 1 - BIT_DEPTH;\n+    int log2Wd = denom + shift - 1;\n+\n+    src   -= QPEL_EXTRA_BEFORE * srcstride;\n+    filter = ff_hevc_rpi_qpel_filters[mx - 1];\n+    for (y = 0; y < height + QPEL_EXTRA; y++) {\n+        for (x = 0; x < width; x++)\n+            tmp[x] = QPEL_FILTER(src, 1) >> (BIT_DEPTH - 8);\n+        src += srcstride;\n+        tmp += MAX_PB_SIZE;\n+    }\n+\n+    tmp    = tmp_array + QPEL_EXTRA_BEFORE * MAX_PB_SIZE;\n+    filter = ff_hevc_rpi_qpel_filters[my - 1];\n+\n+    ox0     = ox0 * (1 << (BIT_DEPTH - 8));\n+    ox1     = ox1 * (1 << (BIT_DEPTH - 8));\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((QPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) * wx1 + src2[x] * wx0 +\n+                                    ((ox0 + ox1 + 1) << log2Wd)) >> (log2Wd + 1));\n+        tmp  += MAX_PB_SIZE;\n+        dst  += dststride;\n+        src2 += MAX_PB_SIZE;\n+    }\n+}\n+\n+////////////////////////////////////////////////////////////////////////////////\n+//\n+////////////////////////////////////////////////////////////////////////////////\n+#define EPEL_FILTER(src, stride)                                               \\\n+    (filter[0] * src[x - stride] +                                             \\\n+     filter[1] * src[x]          +                                             \\\n+     filter[2] * src[x + stride] +                                             \\\n+     filter[3] * src[x + 2 * stride])\n+\n+static void FUNC(put_hevc_epel_h)(int16_t *dst,\n+                                  uint8_t *_src, ptrdiff_t _srcstride,\n+                                  int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src = (pixel *)_src;\n+    ptrdiff_t srcstride  = _srcstride / sizeof(pixel);\n+    const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1];\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8);\n+        src += srcstride;\n+        dst += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_epel_v)(int16_t *dst,\n+                                  uint8_t *_src, ptrdiff_t _srcstride,\n+                                  int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src = (pixel *)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+    const int8_t *filter = ff_hevc_rpi_epel_filters[my - 1];\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = EPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8);\n+        src += srcstride;\n+        dst += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_epel_hv)(int16_t *dst,\n+                                   uint8_t *_src, ptrdiff_t _srcstride,\n+                                   int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src = (pixel *)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+    const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1];\n+    int16_t tmp_array[(MAX_PB_SIZE + EPEL_EXTRA) * MAX_PB_SIZE];\n+    int16_t *tmp = tmp_array;\n+\n+    src -= EPEL_EXTRA_BEFORE * srcstride;\n+\n+    for (y = 0; y < height + EPEL_EXTRA; y++) {\n+        for (x = 0; x < width; x++)\n+            tmp[x] = EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8);\n+        src += srcstride;\n+        tmp += MAX_PB_SIZE;\n+    }\n+\n+    tmp      = tmp_array + EPEL_EXTRA_BEFORE * MAX_PB_SIZE;\n+    filter = ff_hevc_rpi_epel_filters[my - 1];\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = EPEL_FILTER(tmp, MAX_PB_SIZE) >> 6;\n+        tmp += MAX_PB_SIZE;\n+        dst += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_epel_uni_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                      int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src = (pixel *)_src;\n+    ptrdiff_t srcstride  = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1];\n+    int shift = 14 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) + offset) >> shift);\n+        src += srcstride;\n+        dst += dststride;\n+    }\n+}\n+\n+static void FUNC(put_hevc_epel_bi_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                     int16_t *src2,\n+                                     int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src = (pixel *)_src;\n+    ptrdiff_t srcstride  = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1];\n+    int shift = 14 + 1 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++) {\n+            dst[x] = av_clip_pixel(((EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) + src2[x] + offset) >> shift);\n+        }\n+        dst  += dststride;\n+        src  += srcstride;\n+        src2 += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_epel_uni_v)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                      int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src = (pixel *)_src;\n+    ptrdiff_t srcstride  = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    const int8_t *filter = ff_hevc_rpi_epel_filters[my - 1];\n+    int shift = 14 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((EPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) + offset) >> shift);\n+        src += srcstride;\n+        dst += dststride;\n+    }\n+}\n+\n+static void FUNC(put_hevc_epel_bi_v)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                     int16_t *src2,\n+                                     int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src = (pixel *)_src;\n+    ptrdiff_t srcstride  = _srcstride / sizeof(pixel);\n+    const int8_t *filter = ff_hevc_rpi_epel_filters[my - 1];\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    int shift = 14 + 1 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((EPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) + src2[x] + offset) >> shift);\n+        dst  += dststride;\n+        src  += srcstride;\n+        src2 += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_epel_uni_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                       int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src = (pixel *)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1];\n+    int16_t tmp_array[(MAX_PB_SIZE + EPEL_EXTRA) * MAX_PB_SIZE];\n+    int16_t *tmp = tmp_array;\n+    int shift = 14 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    src -= EPEL_EXTRA_BEFORE * srcstride;\n+\n+    for (y = 0; y < height + EPEL_EXTRA; y++) {\n+        for (x = 0; x < width; x++)\n+            tmp[x] = EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8);\n+        src += srcstride;\n+        tmp += MAX_PB_SIZE;\n+    }\n+\n+    tmp      = tmp_array + EPEL_EXTRA_BEFORE * MAX_PB_SIZE;\n+    filter = ff_hevc_rpi_epel_filters[my - 1];\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((EPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) + offset) >> shift);\n+        tmp += MAX_PB_SIZE;\n+        dst += dststride;\n+    }\n+}\n+\n+static void FUNC(put_hevc_epel_bi_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                      int16_t *src2,\n+                                      int height, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src = (pixel *)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1];\n+    int16_t tmp_array[(MAX_PB_SIZE + EPEL_EXTRA) * MAX_PB_SIZE];\n+    int16_t *tmp = tmp_array;\n+    int shift = 14 + 1 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    src -= EPEL_EXTRA_BEFORE * srcstride;\n+\n+    for (y = 0; y < height + EPEL_EXTRA; y++) {\n+        for (x = 0; x < width; x++)\n+            tmp[x] = EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8);\n+        src += srcstride;\n+        tmp += MAX_PB_SIZE;\n+    }\n+\n+    tmp      = tmp_array + EPEL_EXTRA_BEFORE * MAX_PB_SIZE;\n+    filter = ff_hevc_rpi_epel_filters[my - 1];\n+\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((EPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) + src2[x] + offset) >> shift);\n+        tmp  += MAX_PB_SIZE;\n+        dst  += dststride;\n+        src2 += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_epel_uni_w_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                        int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src = (pixel *)_src;\n+    ptrdiff_t srcstride  = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1];\n+    int shift = denom + 14 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    ox     = ox * (1 << (BIT_DEPTH - 8));\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++) {\n+            dst[x] = av_clip_pixel((((EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) * wx + offset) >> shift) + ox);\n+        }\n+        dst += dststride;\n+        src += srcstride;\n+    }\n+}\n+\n+static void FUNC(put_hevc_epel_bi_w_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                       int16_t *src2,\n+                                       int height, int denom, int wx0, int wx1,\n+                                       int ox0, int ox1, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src = (pixel *)_src;\n+    ptrdiff_t srcstride  = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1];\n+    int shift = 14 + 1 - BIT_DEPTH;\n+    int log2Wd = denom + shift - 1;\n+\n+    ox0     = ox0 * (1 << (BIT_DEPTH - 8));\n+    ox1     = ox1 * (1 << (BIT_DEPTH - 8));\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8)) * wx1 + src2[x] * wx0 +\n+                                    ((ox0 + ox1 + 1) << log2Wd)) >> (log2Wd + 1));\n+        src  += srcstride;\n+        dst  += dststride;\n+        src2 += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_epel_uni_w_v)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                        int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src = (pixel *)_src;\n+    ptrdiff_t srcstride  = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    const int8_t *filter = ff_hevc_rpi_epel_filters[my - 1];\n+    int shift = denom + 14 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    ox     = ox * (1 << (BIT_DEPTH - 8));\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++) {\n+            dst[x] = av_clip_pixel((((EPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) * wx + offset) >> shift) + ox);\n+        }\n+        dst += dststride;\n+        src += srcstride;\n+    }\n+}\n+\n+static void FUNC(put_hevc_epel_bi_w_v)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                       int16_t *src2,\n+                                       int height, int denom, int wx0, int wx1,\n+                                       int ox0, int ox1, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src = (pixel *)_src;\n+    ptrdiff_t srcstride  = _srcstride / sizeof(pixel);\n+    const int8_t *filter = ff_hevc_rpi_epel_filters[my - 1];\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    int shift = 14 + 1 - BIT_DEPTH;\n+    int log2Wd = denom + shift - 1;\n+\n+    ox0     = ox0 * (1 << (BIT_DEPTH - 8));\n+    ox1     = ox1 * (1 << (BIT_DEPTH - 8));\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((EPEL_FILTER(src, srcstride) >> (BIT_DEPTH - 8)) * wx1 + src2[x] * wx0 +\n+                                    ((ox0 + ox1 + 1) << log2Wd)) >> (log2Wd + 1));\n+        src  += srcstride;\n+        dst  += dststride;\n+        src2 += MAX_PB_SIZE;\n+    }\n+}\n+\n+static void FUNC(put_hevc_epel_uni_w_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                         int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src = (pixel *)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1];\n+    int16_t tmp_array[(MAX_PB_SIZE + EPEL_EXTRA) * MAX_PB_SIZE];\n+    int16_t *tmp = tmp_array;\n+    int shift = denom + 14 - BIT_DEPTH;\n+#if BIT_DEPTH < 14\n+    int offset = 1 << (shift - 1);\n+#else\n+    int offset = 0;\n+#endif\n+\n+    src -= EPEL_EXTRA_BEFORE * srcstride;\n+\n+    for (y = 0; y < height + EPEL_EXTRA; y++) {\n+        for (x = 0; x < width; x++)\n+            tmp[x] = EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8);\n+        src += srcstride;\n+        tmp += MAX_PB_SIZE;\n+    }\n+\n+    tmp      = tmp_array + EPEL_EXTRA_BEFORE * MAX_PB_SIZE;\n+    filter = ff_hevc_rpi_epel_filters[my - 1];\n+\n+    ox     = ox * (1 << (BIT_DEPTH - 8));\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel((((EPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) * wx + offset) >> shift) + ox);\n+        tmp += MAX_PB_SIZE;\n+        dst += dststride;\n+    }\n+}\n+\n+static void FUNC(put_hevc_epel_bi_w_hv)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\n+                                        int16_t *src2,\n+                                        int height, int denom, int wx0, int wx1,\n+                                        int ox0, int ox1, intptr_t mx, intptr_t my, int width)\n+{\n+    int x, y;\n+    pixel *src = (pixel *)_src;\n+    ptrdiff_t srcstride = _srcstride / sizeof(pixel);\n+    pixel *dst          = (pixel *)_dst;\n+    ptrdiff_t dststride = _dststride / sizeof(pixel);\n+    const int8_t *filter = ff_hevc_rpi_epel_filters[mx - 1];\n+    int16_t tmp_array[(MAX_PB_SIZE + EPEL_EXTRA) * MAX_PB_SIZE];\n+    int16_t *tmp = tmp_array;\n+    int shift = 14 + 1 - BIT_DEPTH;\n+    int log2Wd = denom + shift - 1;\n+\n+    src -= EPEL_EXTRA_BEFORE * srcstride;\n+\n+    for (y = 0; y < height + EPEL_EXTRA; y++) {\n+        for (x = 0; x < width; x++)\n+            tmp[x] = EPEL_FILTER(src, 1) >> (BIT_DEPTH - 8);\n+        src += srcstride;\n+        tmp += MAX_PB_SIZE;\n+    }\n+\n+    tmp      = tmp_array + EPEL_EXTRA_BEFORE * MAX_PB_SIZE;\n+    filter = ff_hevc_rpi_epel_filters[my - 1];\n+\n+    ox0     = ox0 * (1 << (BIT_DEPTH - 8));\n+    ox1     = ox1 * (1 << (BIT_DEPTH - 8));\n+    for (y = 0; y < height; y++) {\n+        for (x = 0; x < width; x++)\n+            dst[x] = av_clip_pixel(((EPEL_FILTER(tmp, MAX_PB_SIZE) >> 6) * wx1 + src2[x] * wx0 +\n+                                    ((ox0 + ox1 + 1) * (1 << log2Wd))) >> (log2Wd + 1));\n+        tmp  += MAX_PB_SIZE;\n+        dst  += dststride;\n+        src2 += MAX_PB_SIZE;\n+    }\n+}\n+\n+// line zero\n+#define P3 pix[-4 * xstride]\n+#define P2 pix[-3 * xstride]\n+#define P1 pix[-2 * xstride]\n+#define P0 pix[-1 * xstride]\n+#define Q0 pix[0 * xstride]\n+#define Q1 pix[1 * xstride]\n+#define Q2 pix[2 * xstride]\n+#define Q3 pix[3 * xstride]\n+\n+// line three. used only for deblocking decision\n+#define TP3 pix[-4 * xstride + 3 * ystride]\n+#define TP2 pix[-3 * xstride + 3 * ystride]\n+#define TP1 pix[-2 * xstride + 3 * ystride]\n+#define TP0 pix[-1 * xstride + 3 * ystride]\n+#define TQ0 pix[0  * xstride + 3 * ystride]\n+#define TQ1 pix[1  * xstride + 3 * ystride]\n+#define TQ2 pix[2  * xstride + 3 * ystride]\n+#define TQ3 pix[3  * xstride + 3 * ystride]\n+\n+static void FUNC(hevc_loop_filter_luma)(uint8_t *_pix,\n+                                        ptrdiff_t _xstride, ptrdiff_t _ystride,\n+                                        int beta, int *_tc,\n+                                        uint8_t *_no_p, uint8_t *_no_q)\n+{\n+    int d, j;\n+    pixel *pix        = (pixel *)_pix;\n+    ptrdiff_t xstride = _xstride / sizeof(pixel);\n+    ptrdiff_t ystride = _ystride / sizeof(pixel);\n+\n+    beta <<= BIT_DEPTH - 8;\n+\n+    for (j = 0; j < 2; j++) {\n+        const int dp0  = abs(P2  - 2 * P1  + P0);\n+        const int dq0  = abs(Q2  - 2 * Q1  + Q0);\n+        const int dp3  = abs(TP2 - 2 * TP1 + TP0);\n+        const int dq3  = abs(TQ2 - 2 * TQ1 + TQ0);\n+        const int d0   = dp0 + dq0;\n+        const int d3   = dp3 + dq3;\n+        const int tc   = _tc[j]   << (BIT_DEPTH - 8);\n+        const int no_p = _no_p[j];\n+        const int no_q = _no_q[j];\n+\n+        if (d0 + d3 >= beta) {\n+            pix += 4 * ystride;\n+            continue;\n+        } else {\n+            const int beta_3 = beta >> 3;\n+            const int beta_2 = beta >> 2;\n+            const int tc25   = ((tc * 5 + 1) >> 1);\n+\n+            if (abs(P3  -  P0) + abs(Q3  -  Q0) < beta_3 && abs(P0  -  Q0) < tc25 &&\n+                abs(TP3 - TP0) + abs(TQ3 - TQ0) < beta_3 && abs(TP0 - TQ0) < tc25 &&\n+                                      (d0 << 1) < beta_2 &&      (d3 << 1) < beta_2) {\n+                // strong filtering\n+                const int tc2 = tc << 1;\n+                for (d = 0; d < 4; d++) {\n+                    const int p3 = P3;\n+                    const int p2 = P2;\n+                    const int p1 = P1;\n+                    const int p0 = P0;\n+                    const int q0 = Q0;\n+                    const int q1 = Q1;\n+                    const int q2 = Q2;\n+                    const int q3 = Q3;\n+                    if (!no_p) {\n+                        P0 = p0 + av_clip(((p2 + 2 * p1 + 2 * p0 + 2 * q0 + q1 + 4) >> 3) - p0, -tc2, tc2);\n+                        P1 = p1 + av_clip(((p2 + p1 + p0 + q0 + 2) >> 2) - p1, -tc2, tc2);\n+                        P2 = p2 + av_clip(((2 * p3 + 3 * p2 + p1 + p0 + q0 + 4) >> 3) - p2, -tc2, tc2);\n+                    }\n+                    if (!no_q) {\n+                        Q0 = q0 + av_clip(((p1 + 2 * p0 + 2 * q0 + 2 * q1 + q2 + 4) >> 3) - q0, -tc2, tc2);\n+                        Q1 = q1 + av_clip(((p0 + q0 + q1 + q2 + 2) >> 2) - q1, -tc2, tc2);\n+                        Q2 = q2 + av_clip(((2 * q3 + 3 * q2 + q1 + q0 + p0 + 4) >> 3) - q2, -tc2, tc2);\n+                    }\n+                    pix += ystride;\n+                }\n+            } else { // normal filtering\n+                int nd_p = 1;\n+                int nd_q = 1;\n+                const int tc_2 = tc >> 1;\n+                if (dp0 + dp3 < ((beta + (beta >> 1)) >> 3))\n+                    nd_p = 2;\n+                if (dq0 + dq3 < ((beta + (beta >> 1)) >> 3))\n+                    nd_q = 2;\n+\n+                for (d = 0; d < 4; d++) {\n+                    const int p2 = P2;\n+                    const int p1 = P1;\n+                    const int p0 = P0;\n+                    const int q0 = Q0;\n+                    const int q1 = Q1;\n+                    const int q2 = Q2;\n+                    int delta0   = (9 * (q0 - p0) - 3 * (q1 - p1) + 8) >> 4;\n+                    if (abs(delta0) < 10 * tc) {\n+                        delta0 = av_clip(delta0, -tc, tc);\n+                        if (!no_p)\n+                            P0 = av_clip_pixel(p0 + delta0);\n+                        if (!no_q)\n+                            Q0 = av_clip_pixel(q0 - delta0);\n+                        if (!no_p && nd_p > 1) {\n+                            const int deltap1 = av_clip((((p2 + p0 + 1) >> 1) - p1 + delta0) >> 1, -tc_2, tc_2);\n+                            P1 = av_clip_pixel(p1 + deltap1);\n+                        }\n+                        if (!no_q && nd_q > 1) {\n+                            const int deltaq1 = av_clip((((q2 + q0 + 1) >> 1) - q1 - delta0) >> 1, -tc_2, tc_2);\n+                            Q1 = av_clip_pixel(q1 + deltaq1);\n+                        }\n+                    }\n+                    pix += ystride;\n+                }\n+            }\n+        }\n+    }\n+}\n+\n+static void FUNC(hevc_loop_filter_chroma)(uint8_t *_pix, ptrdiff_t _xstride,\n+                                          ptrdiff_t _ystride, int *_tc,\n+                                          uint8_t *_no_p, uint8_t *_no_q)\n+{\n+    int d, j, no_p, no_q;\n+    pixel *pix        = (pixel *)_pix;\n+    ptrdiff_t xstride = _xstride / sizeof(pixel);\n+    ptrdiff_t ystride = _ystride / sizeof(pixel);\n+\n+    for (j = 0; j < 2; j++) {\n+        const int tc = _tc[j] << (BIT_DEPTH - 8);\n+        if (tc <= 0) {\n+            pix += 4 * ystride;\n+            continue;\n+        }\n+        no_p = _no_p[j];\n+        no_q = _no_q[j];\n+\n+        for (d = 0; d < 4; d++) {\n+            int delta0;\n+            const int p1 = P1;\n+            const int p0 = P0;\n+            const int q0 = Q0;\n+            const int q1 = Q1;\n+            delta0 = av_clip((((q0 - p0) * 4) + p1 - q1 + 4) >> 3, -tc, tc);\n+            if (!no_p)\n+                P0 = av_clip_pixel(p0 + delta0);\n+            if (!no_q)\n+                Q0 = av_clip_pixel(q0 - delta0);\n+            pix += ystride;\n+        }\n+    }\n+}\n+\n+static void FUNC(hevc_h_loop_filter_chroma)(uint8_t *pix, ptrdiff_t stride,\n+                                            int32_t *tc, uint8_t *no_p,\n+                                            uint8_t *no_q)\n+{\n+    FUNC(hevc_loop_filter_chroma)(pix, stride, sizeof(pixel), tc, no_p, no_q);\n+}\n+\n+static void FUNC(hevc_v_loop_filter_chroma)(uint8_t *pix, ptrdiff_t stride,\n+                                            int32_t *tc, uint8_t *no_p,\n+                                            uint8_t *no_q)\n+{\n+    FUNC(hevc_loop_filter_chroma)(pix, sizeof(pixel), stride, tc, no_p, no_q);\n+}\n+\n+static void FUNC(hevc_h_loop_filter_luma)(uint8_t *pix, ptrdiff_t stride,\n+                                          int beta, int32_t *tc, uint8_t *no_p,\n+                                          uint8_t *no_q)\n+{\n+    FUNC(hevc_loop_filter_luma)(pix, stride, sizeof(pixel),\n+                                beta, tc, no_p, no_q);\n+}\n+\n+static void FUNC(hevc_v_loop_filter_luma)(uint8_t *pix, ptrdiff_t stride,\n+                                          int beta, int32_t *tc, uint8_t *no_p,\n+                                          uint8_t *no_q)\n+{\n+    FUNC(hevc_loop_filter_luma)(pix, sizeof(pixel), stride,\n+                                beta, tc, no_p, no_q);\n+}\n+\n+#undef P3\n+#undef P2\n+#undef P1\n+#undef P0\n+#undef Q0\n+#undef Q1\n+#undef Q2\n+#undef Q3\n+\n+#undef TP3\n+#undef TP2\n+#undef TP1\n+#undef TP0\n+#undef TQ0\n+#undef TQ1\n+#undef TQ2\n+#undef TQ3\n+\n+// line zero\n+#define P3 pix_l[0 * xstride]\n+#define P2 pix_l[1 * xstride]\n+#define P1 pix_l[2 * xstride]\n+#define P0 pix_l[3 * xstride]\n+#define Q0 pix_r[0 * xstride]\n+#define Q1 pix_r[1 * xstride]\n+#define Q2 pix_r[2 * xstride]\n+#define Q3 pix_r[3 * xstride]\n+\n+// line three. used only for deblocking decision\n+#define TP3 pix_l[0 * xstride + 3 * ystride]\n+#define TP2 pix_l[1 * xstride + 3 * ystride]\n+#define TP1 pix_l[2 * xstride + 3 * ystride]\n+#define TP0 pix_l[3 * xstride + 3 * ystride]\n+#define TQ0 pix_r[0 * xstride + 3 * ystride]\n+#define TQ1 pix_r[1 * xstride + 3 * ystride]\n+#define TQ2 pix_r[2 * xstride + 3 * ystride]\n+#define TQ3 pix_r[3 * xstride + 3 * ystride]\n+\n+// This is identical to hevc_loop_filter_luma except that the P/Q\n+// components are on separate pointers\n+static void FUNC(hevc_v_loop_filter_luma2)(uint8_t * _pix_r,\n+                                 unsigned int _stride, unsigned int beta, unsigned int tc2, unsigned int no_f,\n+                                 uint8_t * _pix_l)\n+{\n+    int d, j;\n+    pixel *pix_l        = (pixel *)_pix_l;\n+    pixel *pix_r        = (pixel *)_pix_r;\n+    const ptrdiff_t xstride = 1;\n+    const ptrdiff_t ystride = _stride / sizeof(pixel);\n+\n+    beta <<= BIT_DEPTH - 8;\n+\n+    for (j = 0; j < 2; j++) {\n+        const int dp0  = abs(P2  - 2 * P1  + P0);\n+        const int dq0  = abs(Q2  - 2 * Q1  + Q0);\n+        const int dp3  = abs(TP2 - 2 * TP1 + TP0);\n+        const int dq3  = abs(TQ2 - 2 * TQ1 + TQ0);\n+        const int d0   = dp0 + dq0;\n+        const int d3   = dp3 + dq3;\n+        const int tc   = ((tc2 >> (j << 4)) & 0xffff) << (BIT_DEPTH - 8);\n+        const int no_p = no_f & 1;\n+        const int no_q = no_f & 2;\n+\n+        if (d0 + d3 >= beta) {\n+            pix_l += 4 * ystride;\n+            pix_r += 4 * ystride;\n+            continue;\n+        } else {\n+            const int beta_3 = beta >> 3;\n+            const int beta_2 = beta >> 2;\n+            const int tc25   = ((tc * 5 + 1) >> 1);\n+\n+            if (abs(P3  -  P0) + abs(Q3  -  Q0) < beta_3 && abs(P0  -  Q0) < tc25 &&\n+                abs(TP3 - TP0) + abs(TQ3 - TQ0) < beta_3 && abs(TP0 - TQ0) < tc25 &&\n+                                      (d0 << 1) < beta_2 &&      (d3 << 1) < beta_2) {\n+                // strong filtering\n+                const int tc2 = tc << 1;\n+                for (d = 0; d < 4; d++) {\n+                    const int p3 = P3;\n+                    const int p2 = P2;\n+                    const int p1 = P1;\n+                    const int p0 = P0;\n+                    const int q0 = Q0;\n+                    const int q1 = Q1;\n+                    const int q2 = Q2;\n+                    const int q3 = Q3;\n+                    if (!no_p) {\n+                        P0 = p0 + av_clip(((p2 + 2 * p1 + 2 * p0 + 2 * q0 + q1 + 4) >> 3) - p0, -tc2, tc2);\n+                        P1 = p1 + av_clip(((p2 + p1 + p0 + q0 + 2) >> 2) - p1, -tc2, tc2);\n+                        P2 = p2 + av_clip(((2 * p3 + 3 * p2 + p1 + p0 + q0 + 4) >> 3) - p2, -tc2, tc2);\n+                    }\n+                    if (!no_q) {\n+                        Q0 = q0 + av_clip(((p1 + 2 * p0 + 2 * q0 + 2 * q1 + q2 + 4) >> 3) - q0, -tc2, tc2);\n+                        Q1 = q1 + av_clip(((p0 + q0 + q1 + q2 + 2) >> 2) - q1, -tc2, tc2);\n+                        Q2 = q2 + av_clip(((2 * q3 + 3 * q2 + q1 + q0 + p0 + 4) >> 3) - q2, -tc2, tc2);\n+                    }\n+                    pix_l += ystride;\n+                    pix_r += ystride;\n+                }\n+            } else { // normal filtering\n+                int nd_p = 1;\n+                int nd_q = 1;\n+                const int tc_2 = tc >> 1;\n+                if (dp0 + dp3 < ((beta + (beta >> 1)) >> 3))\n+                    nd_p = 2;\n+                if (dq0 + dq3 < ((beta + (beta >> 1)) >> 3))\n+                    nd_q = 2;\n+\n+                for (d = 0; d < 4; d++) {\n+                    const int p2 = P2;\n+                    const int p1 = P1;\n+                    const int p0 = P0;\n+                    const int q0 = Q0;\n+                    const int q1 = Q1;\n+                    const int q2 = Q2;\n+                    int delta0   = (9 * (q0 - p0) - 3 * (q1 - p1) + 8) >> 4;\n+                    if (abs(delta0) < 10 * tc) {\n+                        delta0 = av_clip(delta0, -tc, tc);\n+                        if (!no_p)\n+                            P0 = av_clip_pixel(p0 + delta0);\n+                        if (!no_q)\n+                            Q0 = av_clip_pixel(q0 - delta0);\n+                        if (!no_p && nd_p > 1) {\n+                            const int deltap1 = av_clip((((p2 + p0 + 1) >> 1) - p1 + delta0) >> 1, -tc_2, tc_2);\n+                            P1 = av_clip_pixel(p1 + deltap1);\n+                        }\n+                        if (!no_q && nd_q > 1) {\n+                            const int deltaq1 = av_clip((((q2 + q0 + 1) >> 1) - q1 - delta0) >> 1, -tc_2, tc_2);\n+                            Q1 = av_clip_pixel(q1 + deltaq1);\n+                        }\n+                    }\n+                    pix_l += ystride;\n+                    pix_r += ystride;\n+                }\n+            }\n+        }\n+    }\n+}\n+\n+static void FUNC(hevc_h_loop_filter_luma2)(uint8_t * _pix_r,\n+                                 unsigned int _stride, unsigned int beta, unsigned int tc2, unsigned int no_f)\n+{\n+    // Just call the non-2 function having massaged the parameters\n+    int32_t tc[2] = {tc2 & 0xffff, tc2 >> 16};\n+    uint8_t no_p[2] = {no_f & 1, no_f & 1};\n+    uint8_t no_q[2] = {no_f & 2, no_f & 2};\n+    FUNC(hevc_h_loop_filter_luma)(_pix_r, _stride, beta, tc, no_p, no_q);\n+}\n+\n+#undef TP3\n+#undef TP2\n+#undef TP1\n+#undef TP0\n+#undef TQ0\n+#undef TQ1\n+#undef TQ2\n+#undef TQ3\n+\n+#undef P3\n+#undef P2\n+#undef P1\n+#undef P0\n+#undef Q0\n+#undef Q1\n+#undef Q2\n+#undef Q3\n+\n+#define P1 pix_l[0 * xstride]\n+#define P0 pix_l[1 * xstride]\n+#define Q0 pix_r[0 * xstride]\n+#define Q1 pix_r[1 * xstride]\n+\n+static void FUNC(hevc_loop_filter_uv2)(uint8_t *_pix_l, ptrdiff_t _xstride,\n+                                          ptrdiff_t _ystride, const int32_t *_tc,\n+                                          const uint8_t *_no_p, const uint8_t *_no_q, uint8_t *_pix_r)\n+{\n+    int d, j, no_p, no_q;\n+    pixel *pix_l        = (pixel *)_pix_l;\n+    pixel *pix_r        = (pixel *)_pix_r;\n+    ptrdiff_t xstride = _xstride / sizeof(pixel);\n+    ptrdiff_t ystride = _ystride / sizeof(pixel);\n+\n+    for (j = 0; j < 2; j++) {\n+        const int tc = _tc[j] << (BIT_DEPTH - 8);\n+        if (tc <= 0) {\n+            pix_l += 4 * ystride;\n+            pix_r += 4 * ystride;\n+            continue;\n+        }\n+        no_p = _no_p[j];\n+        no_q = _no_q[j];\n+\n+        for (d = 0; d < 4; d++) {\n+            int delta0;\n+            const int p1 = P1;\n+            const int p0 = P0;\n+            const int q0 = Q0;\n+            const int q1 = Q1;\n+            delta0 = av_clip((((q0 - p0) * 4) + p1 - q1 + 4) >> 3, -tc, tc);\n+            if (!no_p)\n+                P0 = av_clip_pixel(p0 + delta0);\n+            if (!no_q)\n+                Q0 = av_clip_pixel(q0 - delta0);\n+            pix_l += ystride;\n+            pix_r += ystride;\n+        }\n+    }\n+}\n+\n+static void FUNC(hevc_h_loop_filter_uv)(uint8_t * pix, unsigned int stride, uint32_t tc4,\n+                                 unsigned int no_f)\n+{\n+    uint8_t no_p[2] = {no_f & 1, no_f & 2};\n+    uint8_t no_q[2] = {no_f & 4, no_f & 8};\n+    int32_t tc[4] = {tc4 & 0xff, (tc4 >> 8) & 0xff, (tc4 >> 16) & 0xff, tc4 >> 24};\n+    FUNC(hevc_loop_filter_chroma)(pix, stride, sizeof(pixel) * 2, tc, no_p, no_q);\n+    FUNC(hevc_loop_filter_chroma)(pix + sizeof(pixel), stride, sizeof(pixel) * 2, tc + 2, no_p, no_q);\n+}\n+\n+static void FUNC(hevc_v_loop_filter_uv2)(uint8_t * src_r, unsigned int stride, uint32_t tc4,\n+                                 uint8_t * src_l,\n+                                 unsigned int no_f)\n+{\n+    uint8_t no_p[2] = {no_f & 1, no_f & 2};\n+    uint8_t no_q[2] = {no_f & 4, no_f & 8};\n+    int32_t tc[4] = {tc4 & 0xff, (tc4 >> 8) & 0xff, (tc4 >> 16) & 0xff, tc4 >> 24};\n+    FUNC(hevc_loop_filter_uv2)(src_l, sizeof(pixel) * 2, stride, tc, no_p, no_q, src_r);\n+    FUNC(hevc_loop_filter_uv2)(src_l + sizeof(pixel), sizeof(pixel) * 2, stride, tc + 2, no_p, no_q, src_r + sizeof(pixel));\n+}\n+\n+#undef P1\n+#undef P0\n+#undef Q0\n+#undef Q1\n+\ndiff --git a/libavcodec/rpi_hevcpred.c b/libavcodec/rpi_hevcpred.c\nnew file mode 100644\nindex 0000000000..0aa8809a4b\n--- /dev/null\n+++ b/libavcodec/rpi_hevcpred.c\n@@ -0,0 +1,161 @@\n+/*\n+ * HEVC video Decoder\n+ *\n+ * Copyright (C) 2012 - 2013 Guillaume Martres\n+ * Copyright (C) 2018 John Cox for Raspberry Pi (Trading)\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"rpi_hevcdec.h\"\n+\n+#include \"rpi_hevcpred.h\"\n+#if (ARCH_ARM)\n+#include \"arm/rpi_hevcpred_arm.h\"\n+#endif\n+\n+#define PRED_C 0\n+#define BIT_DEPTH 8\n+#include \"rpi_hevcpred_template.c\"\n+#undef BIT_DEPTH\n+\n+#define BIT_DEPTH 9\n+#include \"rpi_hevcpred_template.c\"\n+#undef BIT_DEPTH\n+\n+#define BIT_DEPTH 10\n+#include \"rpi_hevcpred_template.c\"\n+#undef BIT_DEPTH\n+\n+#define BIT_DEPTH 12\n+#include \"rpi_hevcpred_template.c\"\n+#undef BIT_DEPTH\n+#undef PRED_C\n+\n+#define PRED_C 1\n+#define BIT_DEPTH 8\n+#include \"rpi_hevcpred_template.c\"\n+#undef BIT_DEPTH\n+\n+#define BIT_DEPTH 9\n+#include \"rpi_hevcpred_template.c\"\n+#undef BIT_DEPTH\n+\n+#define BIT_DEPTH 10\n+#include \"rpi_hevcpred_template.c\"\n+#undef BIT_DEPTH\n+\n+#define BIT_DEPTH 12\n+#include \"rpi_hevcpred_template.c\"\n+#undef BIT_DEPTH\n+#undef PRED_C\n+\n+void ff_hevc_rpi_pred_init(HEVCRpiPredContext *hpc, int bit_depth)\n+{\n+#undef FUNC\n+#define FUNC(a, depth) a ## _ ## depth\n+\n+#undef FUNCC\n+#define FUNCC(a, depth) a ## _ ## depth ## _c\n+\n+#define HEVC_PRED_Y(depth)                                \\\n+    hpc->intra_pred      = FUNC(intra_pred, depth);     \\\n+    hpc->intra_filter[0] = FUNC(intra_filter_2, depth); \\\n+    hpc->intra_filter[1] = FUNC(intra_filter_3, depth); \\\n+    hpc->intra_filter[2] = FUNC(intra_filter_4, depth); \\\n+    hpc->intra_filter[3] = FUNC(intra_filter_5, depth); \\\n+    hpc->pred_planar[0]  = FUNC(pred_planar_0, depth);  \\\n+    hpc->pred_planar[1]  = FUNC(pred_planar_1, depth);  \\\n+    hpc->pred_planar[2]  = FUNC(pred_planar_2, depth);  \\\n+    hpc->pred_planar[3]  = FUNC(pred_planar_3, depth);  \\\n+    hpc->pred_dc[0]      = FUNC(pred_dc_0, depth);      \\\n+    hpc->pred_dc[1]      = FUNC(pred_dc_1, depth);      \\\n+    hpc->pred_dc[2]      = FUNC(pred_dc_2, depth);      \\\n+    hpc->pred_dc[3]      = FUNC(pred_dc_3, depth);      \\\n+    hpc->pred_vertical[0] = FUNC(pred_angular_0, depth); \\\n+    hpc->pred_vertical[1] = FUNC(pred_angular_1, depth); \\\n+    hpc->pred_vertical[2] = FUNC(pred_angular_2, depth); \\\n+    hpc->pred_vertical[3] = FUNC(pred_angular_3, depth); \\\n+    hpc->pred_horizontal[0] = FUNC(pred_angular_0, depth); \\\n+    hpc->pred_horizontal[1] = FUNC(pred_angular_1, depth); \\\n+    hpc->pred_horizontal[2] = FUNC(pred_angular_2, depth); \\\n+    hpc->pred_horizontal[3] = FUNC(pred_angular_3, depth); \\\n+    hpc->pred_angular[0] = FUNC(pred_angular_0, depth); \\\n+    hpc->pred_angular[1] = FUNC(pred_angular_1, depth); \\\n+    hpc->pred_angular[2] = FUNC(pred_angular_2, depth); \\\n+    hpc->pred_angular[3] = FUNC(pred_angular_3, depth); \\\n+    hpc->pred_dc0[0]     = FUNC(pred_dc0_0, depth);     \\\n+    hpc->pred_dc0[1]     = FUNC(pred_dc0_1, depth);     \\\n+    hpc->pred_dc0[2]     = FUNC(pred_dc0_2, depth);     \\\n+    hpc->pred_dc0[3]     = FUNC(pred_dc0_3, depth);\n+\n+#define HEVC_PRED_C(depth)                                \\\n+    hpc->intra_pred_c      = FUNCC(intra_pred, depth);     \\\n+\thpc->intra_filter_c[0] = FUNCC(intra_filter_2, depth); \\\n+\thpc->intra_filter_c[1] = FUNCC(intra_filter_3, depth); \\\n+\thpc->intra_filter_c[2] = FUNCC(intra_filter_4, depth); \\\n+\thpc->intra_filter_c[3] = FUNCC(intra_filter_5, depth); \\\n+    hpc->pred_planar_c[0]  = FUNCC(pred_planar_0, depth);  \\\n+    hpc->pred_planar_c[1]  = FUNCC(pred_planar_1, depth);  \\\n+    hpc->pred_planar_c[2]  = FUNCC(pred_planar_2, depth);  \\\n+    hpc->pred_planar_c[3]  = FUNCC(pred_planar_3, depth);  \\\n+    hpc->pred_dc_c[0]      = FUNCC(pred_dc_0, depth);      \\\n+    hpc->pred_dc_c[1]      = FUNCC(pred_dc_1, depth);      \\\n+    hpc->pred_dc_c[2]      = FUNCC(pred_dc_2, depth);      \\\n+    hpc->pred_dc_c[3]      = FUNCC(pred_dc_3, depth);      \\\n+    hpc->pred_vertical_c[0] = FUNCC(pred_angular_0, depth); \\\n+    hpc->pred_vertical_c[1] = FUNCC(pred_angular_1, depth); \\\n+    hpc->pred_vertical_c[2] = FUNCC(pred_angular_2, depth); \\\n+    hpc->pred_vertical_c[3] = FUNCC(pred_angular_3, depth); \\\n+    hpc->pred_horizontal_c[0] = FUNCC(pred_angular_0, depth); \\\n+    hpc->pred_horizontal_c[1] = FUNCC(pred_angular_1, depth); \\\n+    hpc->pred_horizontal_c[2] = FUNCC(pred_angular_2, depth); \\\n+    hpc->pred_horizontal_c[3] = FUNCC(pred_angular_3, depth); \\\n+    hpc->pred_angular_c[0] = FUNCC(pred_angular_0, depth); \\\n+    hpc->pred_angular_c[1] = FUNCC(pred_angular_1, depth); \\\n+    hpc->pred_angular_c[2] = FUNCC(pred_angular_2, depth); \\\n+    hpc->pred_angular_c[3] = FUNCC(pred_angular_3, depth); \\\n+    hpc->pred_dc0_c[0]     = FUNCC(pred_dc0_0, depth);     \\\n+    hpc->pred_dc0_c[1]     = FUNCC(pred_dc0_1, depth);     \\\n+    hpc->pred_dc0_c[2]     = FUNCC(pred_dc0_2, depth);     \\\n+    hpc->pred_dc0_c[3]     = FUNCC(pred_dc0_3, depth);\n+\n+#define HEVC_PRED(depth) \\\n+    HEVC_PRED_Y(depth); \\\n+    HEVC_PRED_C(depth);\n+\n+    switch (bit_depth) {\n+    case 9:\n+        HEVC_PRED(9);\n+        break;\n+    case 10:\n+        HEVC_PRED(10);\n+        break;\n+    case 12:\n+        HEVC_PRED(12);\n+        break;\n+    default:\n+        HEVC_PRED(8);\n+        break;\n+    }\n+\n+#if (ARCH_ARM)\n+    ff_hevc_rpi_pred_init_arm(hpc, bit_depth);\n+#elif (ARCH_MIPS)\n+    ff_hevc_rpi_pred_init_mips(hpc, bit_depth);\n+#endif\n+}\ndiff --git a/libavcodec/rpi_hevcpred.h b/libavcodec/rpi_hevcpred.h\nnew file mode 100644\nindex 0000000000..9f0edb8798\n--- /dev/null\n+++ b/libavcodec/rpi_hevcpred.h\n@@ -0,0 +1,123 @@\n+/*\n+ * HEVC video Decoder\n+ *\n+ * Copyright (C) 2012 - 2013 Guillaume Martres\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#ifndef AVCODEC_RPI_HEVCPRED_H\n+#define AVCODEC_RPI_HEVCPRED_H\n+\n+#include <stddef.h>\n+#include <stdint.h>\n+#include \"config.h\"\n+\n+struct HEVCRpiContext;\n+struct HEVCRpiLocalContext;\n+\n+enum IntraPredMode {\n+    INTRA_PLANAR = 0,\n+    INTRA_DC,\n+    INTRA_ANGULAR_2,\n+    INTRA_ANGULAR_3,\n+    INTRA_ANGULAR_4,\n+    INTRA_ANGULAR_5,\n+    INTRA_ANGULAR_6,\n+    INTRA_ANGULAR_7,\n+    INTRA_ANGULAR_8,\n+    INTRA_ANGULAR_9,\n+    INTRA_ANGULAR_10,\n+    INTRA_ANGULAR_11,\n+    INTRA_ANGULAR_12,\n+    INTRA_ANGULAR_13,\n+    INTRA_ANGULAR_14,\n+    INTRA_ANGULAR_15,\n+    INTRA_ANGULAR_16,\n+    INTRA_ANGULAR_17,\n+    INTRA_ANGULAR_18,\n+    INTRA_ANGULAR_19,\n+    INTRA_ANGULAR_20,\n+    INTRA_ANGULAR_21,\n+    INTRA_ANGULAR_22,\n+    INTRA_ANGULAR_23,\n+    INTRA_ANGULAR_24,\n+    INTRA_ANGULAR_25,\n+    INTRA_ANGULAR_26,\n+    INTRA_ANGULAR_27,\n+    INTRA_ANGULAR_28,\n+    INTRA_ANGULAR_29,\n+    INTRA_ANGULAR_30,\n+    INTRA_ANGULAR_31,\n+    INTRA_ANGULAR_32,\n+    INTRA_ANGULAR_33,\n+    INTRA_ANGULAR_34,\n+};\n+#define INTRA_ANGULAR_HORIZONTAL INTRA_ANGULAR_10\n+#define INTRA_ANGULAR_VERTICAL   INTRA_ANGULAR_26\n+\n+typedef void intra_filter_fn_t(\n+        uint8_t * const left, uint8_t * const top,\n+        const unsigned int req, const unsigned int avail,\n+        const uint8_t * const src_l, const uint8_t * const src_u, const uint8_t * const src_ur,\n+        const unsigned int stride,\n+        const unsigned int top_right_size, const unsigned int down_left_size);\n+\n+typedef struct HEVCRpiPredContext {\n+    void (*intra_pred)(const struct HEVCRpiContext * const s,\n+                          const enum IntraPredMode mode, const unsigned int x0, const unsigned int y0,\n+                          const unsigned int avail, const unsigned int log2_size);\n+\n+    intra_filter_fn_t *intra_filter[4];\n+    void (*pred_planar[4])(uint8_t *src, const uint8_t *top,\n+                           const uint8_t *left, ptrdiff_t stride);\n+    void (*pred_dc[4])(uint8_t *src, const uint8_t *top, const uint8_t *left,\n+                    ptrdiff_t stride);\n+    void (*pred_angular[4])(uint8_t *src, const uint8_t *top,\n+                            const uint8_t *left, ptrdiff_t stride,\n+                            int mode);\n+    void (*pred_vertical[4])(uint8_t *src, const uint8_t *top,\n+                            const uint8_t *left, ptrdiff_t stride,\n+                            int mode);\n+    void (*pred_horizontal[4])(uint8_t *src, const uint8_t *top,\n+                            const uint8_t *left, ptrdiff_t stride,\n+                            int mode);\n+    void (*pred_dc0[4])(uint8_t *src, ptrdiff_t stride);\n+\n+    void (*intra_pred_c)(const struct HEVCRpiContext * const s,\n+                          const enum IntraPredMode mode, const unsigned int x0, const unsigned int y0,\n+                          const unsigned int avail, const unsigned int log2_size);\n+    intra_filter_fn_t *intra_filter_c[4];\n+    void (*pred_planar_c[4])(uint8_t *src, const uint8_t *top,\n+                           const uint8_t *left, ptrdiff_t stride);\n+    void (*pred_dc_c[4])(uint8_t *src, const uint8_t *top, const uint8_t *left,\n+                    ptrdiff_t stride);\n+    void (*pred_angular_c[4])(uint8_t *src, const uint8_t *top,\n+                            const uint8_t *left, ptrdiff_t stride,\n+                            int mode);\n+    void (*pred_vertical_c[4])(uint8_t *src, const uint8_t *top,\n+                            const uint8_t *left, ptrdiff_t stride,\n+                            int mode);\n+    void (*pred_horizontal_c[4])(uint8_t *src, const uint8_t *top,\n+                            const uint8_t *left, ptrdiff_t stride,\n+                            int mode);\n+    void (*pred_dc0_c[4])(uint8_t *src, ptrdiff_t stride);\n+} HEVCRpiPredContext;\n+\n+void ff_hevc_rpi_pred_init(HEVCRpiPredContext *hpc, int bit_depth);\n+\n+#endif /* AVCODEC_RPI_HEVCPRED_H */\ndiff --git a/libavcodec/rpi_hevcpred_template.c b/libavcodec/rpi_hevcpred_template.c\nnew file mode 100644\nindex 0000000000..f2ebcad332\n--- /dev/null\n+++ b/libavcodec/rpi_hevcpred_template.c\n@@ -0,0 +1,1407 @@\n+/*\n+ * HEVC video decoder\n+ *\n+ * Copyright (C) 2012 - 2013 Guillaume Martres\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"config.h\"\n+#include \"libavutil/pixdesc.h\"\n+#include \"libavutil/rpi_sand_fns.h\"\n+#include \"bit_depth_template.c\"\n+\n+#include \"rpi_hevcdec.h\"\n+#include \"rpi_hevcpred.h\"\n+\n+#define DUMP_PRED 0\n+\n+#define POS(x, y) src[(x) + stride * (y)]\n+\n+// INCLUDED_ONCE defined at EOF\n+#ifndef INCLUDED_ONCE\n+typedef uint8_t (* c8_dst_ptr_t)[2];\n+typedef const uint8_t (* c8_src_ptr_t)[2];\n+typedef uint16_t (* c16_dst_ptr_t)[2];\n+typedef const uint16_t (* c16_src_ptr_t)[2];\n+\n+// *** On ARM make these NEON registers\n+typedef struct pixel4_16 {\n+    uint16_t x[4];\n+} pixel4_16;\n+typedef struct pixel4_32 {\n+    uint32_t x[4];\n+} pixel4_32;\n+static inline pixel4_16 PIXEL_SPLAT_X4_16(const uint16_t x)\n+{\n+    pixel4_16 t = {{x, x, x, x}};\n+    return t;\n+}\n+static inline pixel4_32 PIXEL_SPLAT_X4_32(const uint32_t x)\n+{\n+    pixel4_32 t = {{x, x, x, x}};\n+    return t;\n+}\n+#endif\n+\n+#if PRED_C\n+// For chroma we double pixel size so we copy pairs\n+#undef pixel\n+#undef pixel2\n+#undef pixel4\n+#undef dctcoef\n+#undef INIT_CLIP\n+#undef no_rnd_avg_pixel4\n+#undef rnd_avg_pixel4\n+#undef AV_RN2P\n+#undef AV_RN4P\n+#undef AV_RN4PA\n+#undef AV_WN2P\n+#undef AV_WN4P\n+#undef AV_WN4PA\n+#undef CLIP\n+#undef FUNC\n+#undef FUNCC\n+#undef av_clip_pixel\n+#undef PIXEL_SPLAT_X4\n+\n+#if BIT_DEPTH == 8\n+#define pixel uint16_t\n+#define pixel4 pixel4_16\n+#define PIXEL_SPLAT_X4 PIXEL_SPLAT_X4_16\n+#define cpel uint8_t\n+#define c_src_ptr_t  c8_src_ptr_t\n+#define c_dst_ptr_t  c8_dst_ptr_t\n+#else\n+#define pixel uint32_t\n+#define pixel4 pixel4_32\n+#define PIXEL_SPLAT_X4 PIXEL_SPLAT_X4_32\n+#define cpel uint16_t\n+#define c_src_ptr_t c16_dst_ptr_t\n+#define c_dst_ptr_t c16_dst_ptr_t\n+#endif\n+#define AV_RN4P(p) (*(pixel4*)(p))\n+#define AV_WN4P(p,x) (*(pixel4*)(p) = (x))\n+#define FUNC(a) FUNC2(a, BIT_DEPTH, _c)\n+#endif\n+\n+\n+// Get PW prior to horrid PRED_C trickery\n+#if BIT_DEPTH == 8\n+#define PW 1\n+#else\n+#define PW 2\n+#endif\n+\n+\n+#if DUMP_PRED && !defined(INCLUDED_ONCE)\n+static void dump_pred_uv(const uint8_t * data, const unsigned int stride, const unsigned int size)\n+{\n+    for (unsigned int y = 0; y != size; y++, data += stride * 2) {\n+        for (unsigned int x = 0; x != size; x++) {\n+            printf(\"%4d\", data[x * 2]);\n+        }\n+        printf(\"\\n\");\n+    }\n+    printf(\"\\n\");\n+}\n+#endif\n+\n+#ifndef INCLUDED_ONCE\n+static inline void extend_8(void * ptr, const unsigned int v, unsigned int n)\n+{\n+    if ((n >>= 2) != 0) {\n+        uint32_t v4 = v | (v << 8);\n+        uint32_t * p = (uint32_t *)ptr;\n+        v4 = v4 | (v4 << 16);\n+        do {\n+            *p++ = v4;\n+        } while (--n != 0);\n+    }\n+}\n+\n+static inline void extend_16(void * ptr, const unsigned int v, unsigned int n)\n+{\n+    if ((n >>= 2) != 0) {\n+        uint32_t v2 = v | (v << 16);\n+        uint32_t * p = (uint32_t *)ptr;\n+        do {\n+            *p++ = v2;\n+            *p++ = v2;\n+        } while (--n != 0);\n+    }\n+}\n+\n+static inline void extend_32(void * ptr, const unsigned int v, unsigned int n)\n+{\n+    if ((n >>= 2) != 0) {\n+        uint32_t * p = (uint32_t *)ptr;\n+        do {\n+            *p++ = v;\n+            *p++ = v;\n+            *p++ = v;\n+            *p++ = v;\n+        } while (--n != 0);\n+    }\n+}\n+\n+// Beware that this inverts the avail ordering\n+// For CIP it seems easier this way round\n+static unsigned int cip_avail_l(const uint8_t * is_intra, const int i_stride, const unsigned int i_mask,\n+                                const unsigned int log2_intra_bits, const unsigned int avail, unsigned int size,\n+                              unsigned int s0, unsigned int odd_s)\n+{\n+    const unsigned int n = 1 << log2_intra_bits;\n+    unsigned int fa = 0;\n+    unsigned int i;\n+\n+    size >>= 2;   // Now in 4-pel units\n+    s0 >>= 2;\n+\n+    if ((avail & AVAIL_DL) != 0)\n+        fa |= ((1 << s0) - 1) << (size - s0);\n+    if ((avail & AVAIL_L) != 0)\n+        fa |= ((1 << size) - 1) << size;\n+    if ((avail & AVAIL_UL) != 0)\n+        fa |= 1 << (size << 1);\n+\n+    if (odd_s) {\n+        if ((fa & 1) != 0 && (*is_intra & i_mask) == 0)\n+            fa &= ~1;\n+        is_intra += i_stride;\n+    }\n+\n+    for (i = odd_s; (fa >> i) != 0; i += n, is_intra += i_stride) {\n+        const unsigned int m = ((1 << n) - 1) << i;\n+        if ((fa & m) != 0 && (*is_intra & i_mask) == 0)\n+            fa &= ~m;\n+    }\n+\n+    return fa;\n+}\n+\n+static unsigned int cip_avail_u(const uint8_t * is_intra, unsigned int i_shift,\n+                                const unsigned int log2_intra_bits, const unsigned int avail, unsigned int size,\n+                                unsigned int s1, unsigned int odd_s)\n+{\n+    if ((avail & (AVAIL_U | AVAIL_UR)) == 0)\n+    {\n+        return 0;\n+    }\n+    else\n+    {\n+        const unsigned int n = 1 << log2_intra_bits;\n+        unsigned int fa = 0;\n+        unsigned int i;\n+        unsigned int im = ((is_intra[1] << 8) | (is_intra[0])) >> i_shift;\n+\n+        size >>= 2;   // Now in 4-pel units\n+        s1 >>= 2;\n+\n+        if ((avail & AVAIL_U) != 0)\n+            fa |= ((1 << size) - 1);\n+        if ((avail & AVAIL_UR) != 0)\n+            fa |= ((1 << s1) - 1) << size;\n+\n+        if (odd_s) {\n+            fa &= im | ~1;\n+            im >>= 1;\n+        }\n+\n+        for (i = odd_s; (fa >> i) != 0; i += n, im >>= 1) {\n+            const unsigned int m = ((1 << n) - 1) << i;\n+            if ((im & 1) == 0)\n+                fa &= ~m;\n+        }\n+        return fa;\n+    }\n+}\n+\n+\n+\n+static inline unsigned int rmbd(unsigned int x)\n+{\n+#if 1\n+    return __builtin_ctz(x);\n+#else\n+    unsigned int n = 0;\n+    if ((x & 0xffff) == 0) {\n+        x >>= 16;\n+        n += 16;\n+    }\n+    if ((x & 0xff) == 0) {\n+        x >>= 8;\n+        n += 8;\n+    }\n+    if ((x & 0xf) == 0) {\n+        x >>= 4;\n+        n += 4;\n+    }\n+    if ((x & 0x3) == 0) {\n+        x >>= 2;\n+        n += 2;\n+    }\n+\n+    return (x & 1) == 0 ? n + 1 : n;\n+#endif\n+}\n+#endif\n+\n+\n+static void FUNC(cip_fill)(pixel * const left, pixel * const top,\n+    const unsigned int avail_l, const unsigned int avail_u,\n+    const pixel * const src_l, const pixel * const src_u, const pixel * const src_ur,\n+    const unsigned int stride,\n+    const unsigned int size)\n+{\n+    pixel a;\n+    unsigned int i;\n+\n+    // 1st find DL value\n+    if ((avail_l & 1) == 0) {\n+        if (avail_l != 0)\n+            a = src_l[((int)size * 2 - 1 - (int)rmbd(avail_l)*4) * (int)stride];\n+        else\n+        {\n+            // (avail_l | avail_u) != 0 so this must be good\n+            const unsigned int n = rmbd(avail_u)*4;\n+            a = (n >= size) ? src_ur[n - size] : src_u[n];\n+        }\n+    }\n+\n+    // L\n+    {\n+        pixel * d = left + size * 2 - 1;\n+        const pixel * s = src_l + (size * 2 - 1) * stride;\n+        unsigned int x = avail_l;\n+        for (i = 0; i < size * 2; i += 4, x >>= 1)\n+        {\n+            if ((x & 1) != 0) {\n+                // Avail\n+                *d-- = *s;\n+                s -= stride;\n+                *d-- = *s;\n+                s -= stride;\n+                *d-- = *s;\n+                s -= stride;\n+                *d-- = a = *s;\n+                s -= stride;\n+            }\n+            else\n+            {\n+                *d-- = a;\n+                *d-- = a;\n+                *d-- = a;\n+                *d-- = a;\n+                s -= stride * 4;\n+            }\n+        }\n+        // UL\n+        *d = a = (x & 1) != 0 ? *s : a;\n+    }\n+\n+    // U\n+    {\n+        pixel * d = top;\n+        const pixel * s = src_u;\n+        unsigned int x = avail_u;\n+\n+        for (i = 0; i < size; i += 4, x >>= 1)\n+        {\n+            if ((x & 1) != 0) {\n+                // Avail\n+                *d++ = *s++;\n+                *d++ = *s++;\n+                *d++ = *s++;\n+                *d++ = a = *s++;\n+            }\n+            else\n+            {\n+                *d++ = a;\n+                *d++ = a;\n+                *d++ = a;\n+                *d++ = a;\n+                s += 4;\n+            }\n+        }\n+\n+        // UR\n+        s = src_ur;\n+        for (i = 0; i < size; i += 4, x >>= 1)\n+        {\n+            if ((x & 1) != 0) {\n+                // Avail\n+                *d++ = *s++;\n+                *d++ = *s++;\n+                *d++ = *s++;\n+                *d++ = a = *s++;\n+            }\n+            else\n+            {\n+                *d++ = a;\n+                *d++ = a;\n+                *d++ = a;\n+                *d++ = a;\n+                s += 4;\n+            }\n+        }\n+    }\n+}\n+\n+\n+#if !PRED_C && PW == 1\n+#define EXTEND(ptr, val, len) extend_8(ptr, val, len)\n+#elif (!PRED_C && PW == 2) || (PRED_C && PW == 1)\n+#define EXTEND(ptr, val, len) extend_16(ptr, val, len)\n+#else\n+#define EXTEND(ptr, val, len) extend_32(ptr, val, len)\n+#endif\n+\n+// Reqs:\n+//\n+// Planar:  DL[0], L, ul, U, UR[0]\n+// DC:         dl, L, ul, U, ur\n+// A2-9:       DL, L, ul, u, ur\n+// A10:        dl, L, ul, u, ur\n+// A11-17      dl, L, UL, U, ur\n+// A18-25      dl, L, Ul, U, ur\n+// A26         dl, l, ul, U, ur\n+// A27-34      dl, l, ul, U, UR\n+\n+#ifndef INCLUDED_ONCE\n+\n+intra_filter_fn_t ff_hevc_rpi_intra_filter_8_neon_8;\n+intra_filter_fn_t ff_hevc_rpi_intra_filter_4_neon_16;\n+intra_filter_fn_t ff_hevc_rpi_intra_filter_8_neon_16;\n+\n+static const uint8_t req_avail_c[35] =\n+{\n+    AVAIL_DL | AVAIL_L | 0         |  AVAIL_U | AVAIL_UR,  // Planar (DL[0] & UR[0] only needed)\n+               AVAIL_L | 0         |  AVAIL_U,             // DC\n+    AVAIL_DL | AVAIL_L,                                    // 2\n+    AVAIL_DL | AVAIL_L,                                    // 3\n+    AVAIL_DL | AVAIL_L,                                    // 4\n+    AVAIL_DL | AVAIL_L,                                    // 5\n+    AVAIL_DL | AVAIL_L,                                    // 6\n+    AVAIL_DL | AVAIL_L,                                    // 7\n+    AVAIL_DL | AVAIL_L,                                    // 8\n+    AVAIL_DL | AVAIL_L,                                    // 9\n+               AVAIL_L,                                    // 10 (H)\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 11\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 12\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 13\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 14\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 15\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 16\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 17\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 18\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 19\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 20\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 21\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 22\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 23\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 24\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 25\n+                                    AVAIL_U,               // 26 (V)\n+                                    AVAIL_U | AVAIL_UR,    // 27\n+                                    AVAIL_U | AVAIL_UR,    // 28\n+                                    AVAIL_U | AVAIL_UR,    // 29\n+                                    AVAIL_U | AVAIL_UR,    // 30\n+                                    AVAIL_U | AVAIL_UR,    // 31\n+                                    AVAIL_U | AVAIL_UR,    // 32\n+                                    AVAIL_U | AVAIL_UR,    // 33\n+                                    AVAIL_U | AVAIL_UR     // 34\n+};\n+\n+static const uint8_t req_avail[4][35] = {\n+{\n+    AVAIL_DL | AVAIL_L | 0         |  AVAIL_U | AVAIL_UR,  // Planar (DL[0] & UR[0] only needed)\n+               AVAIL_L | 0         |  AVAIL_U,             // DC\n+    AVAIL_DL | AVAIL_L,                                    // 2\n+    AVAIL_DL | AVAIL_L,                                    // 3\n+    AVAIL_DL | AVAIL_L,                                    // 4\n+    AVAIL_DL | AVAIL_L,                                    // 5\n+    AVAIL_DL | AVAIL_L,                                    // 6\n+    AVAIL_DL | AVAIL_L,                                    // 7\n+    AVAIL_DL | AVAIL_L,                                    // 8\n+    AVAIL_DL | AVAIL_L,                                    // 9\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 10 (H)\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 11\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 12\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 13\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 14\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 15\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 16\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 17\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 18\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 19\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 20\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 21\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 22\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 23\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 24\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 25\n+               AVAIL_L | AVAIL_UL | AVAIL_U,               // 26 (V)\n+                                    AVAIL_U | AVAIL_UR,    // 27\n+                                    AVAIL_U | AVAIL_UR,    // 28\n+                                    AVAIL_U | AVAIL_UR,    // 29\n+                                    AVAIL_U | AVAIL_UR,    // 30\n+                                    AVAIL_U | AVAIL_UR,    // 31\n+                                    AVAIL_U | AVAIL_UR,    // 32\n+                                    AVAIL_U | AVAIL_UR,    // 33\n+                                    AVAIL_U | AVAIL_UR     // 34\n+},\n+{  // 3\n+    AVAIL_DL | AVAIL_L | 0        | AVAIL_U | AVAIL_UR | FILTER_LIGHT,  // Planar (DL[0] & UR[0] only needed)\n+               AVAIL_L | 0        | AVAIL_U,                            // DC\n+    AVAIL_DL | AVAIL_L                                 | FILTER_LIGHT,  // 2\n+    AVAIL_DL | AVAIL_L                                 | 0,             // 3\n+    AVAIL_DL | AVAIL_L                                 | 0,             // 4\n+    AVAIL_DL | AVAIL_L                                 | 0,             // 5\n+    AVAIL_DL | AVAIL_L                                 | 0,             // 6\n+    AVAIL_DL | AVAIL_L                                 | 0,             // 7\n+    AVAIL_DL | AVAIL_L                                 | 0,             // 8\n+    AVAIL_DL | AVAIL_L                                 | 0,             // 9\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 10 (H)\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 11\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 12\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 13\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 14\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 15\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 16\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 17\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_LIGHT,  // 18\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 19\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 20\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 21\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 22\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 23\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 24\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 25\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 26 (V)\n+                                    AVAIL_U | AVAIL_UR | 0,             // 27\n+                                    AVAIL_U | AVAIL_UR | 0,             // 28\n+                                    AVAIL_U | AVAIL_UR | 0,             // 29\n+                                    AVAIL_U | AVAIL_UR | 0,             // 30\n+                                    AVAIL_U | AVAIL_UR | 0,             // 31\n+                                    AVAIL_U | AVAIL_UR | 0,             // 32\n+                                    AVAIL_U | AVAIL_UR | 0,             // 33\n+                                    AVAIL_U | AVAIL_UR | FILTER_LIGHT   // 34\n+},\n+{  // 4\n+    AVAIL_DL | AVAIL_L | 0        | AVAIL_U | AVAIL_UR | FILTER_LIGHT,  // Planar (DL[0] & UR[0] only needed)\n+               AVAIL_L | 0        | AVAIL_U,                            // DC\n+    AVAIL_DL | AVAIL_L                                 | FILTER_LIGHT,  // 2\n+    AVAIL_DL | AVAIL_L                                 | FILTER_LIGHT,  // 3\n+    AVAIL_DL | AVAIL_L                                 | FILTER_LIGHT,  // 4\n+    AVAIL_DL | AVAIL_L                                 | FILTER_LIGHT,  // 5\n+    AVAIL_DL | AVAIL_L                                 | FILTER_LIGHT,  // 6\n+    AVAIL_DL | AVAIL_L                                 | FILTER_LIGHT,  // 7\n+    AVAIL_DL | AVAIL_L                                 | FILTER_LIGHT,  // 8\n+    AVAIL_DL | AVAIL_L                                 | 0,             // 9\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 10 (H)\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 11\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_LIGHT,  // 12\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_LIGHT,  // 13\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_LIGHT,  // 14\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_LIGHT,  // 15\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_LIGHT,  // 16\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_LIGHT,  // 17\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_LIGHT,  // 18\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_LIGHT,  // 19\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_LIGHT,  // 20\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_LIGHT,  // 21\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_LIGHT,  // 22\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_LIGHT,  // 23\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_LIGHT,  // 24\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 25\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | 0,             // 26 (V)\n+                                    AVAIL_U | AVAIL_UR | 0,             // 27\n+                                    AVAIL_U | AVAIL_UR | FILTER_LIGHT,  // 28\n+                                    AVAIL_U | AVAIL_UR | FILTER_LIGHT,  // 29\n+                                    AVAIL_U | AVAIL_UR | FILTER_LIGHT,  // 30\n+                                    AVAIL_U | AVAIL_UR | FILTER_LIGHT,  // 31\n+                                    AVAIL_U | AVAIL_UR | FILTER_LIGHT,  // 32\n+                                    AVAIL_U | AVAIL_UR | FILTER_LIGHT,  // 33\n+                                    AVAIL_U | AVAIL_UR | FILTER_LIGHT   // 34\n+},\n+{  // 5\n+    AVAIL_DL | AVAIL_L | 0        | AVAIL_U | AVAIL_UR | FILTER_EITHER, // Planar (DL[0] & UR[0] only needed)\n+               AVAIL_L | 0        | AVAIL_U,                            // DC\n+    AVAIL_DL | AVAIL_L                                 | FILTER_EITHER, // 2\n+    AVAIL_DL | AVAIL_L                                 | FILTER_EITHER, // 3\n+    AVAIL_DL | AVAIL_L                                 | FILTER_EITHER, // 4\n+    AVAIL_DL | AVAIL_L                                 | FILTER_EITHER, // 5\n+    AVAIL_DL | AVAIL_L                                 | FILTER_EITHER, // 6\n+    AVAIL_DL | AVAIL_L                                 | FILTER_EITHER, // 7\n+    AVAIL_DL | AVAIL_L                                 | FILTER_EITHER, // 8\n+    AVAIL_DL | AVAIL_L                                 | FILTER_EITHER, // 9\n+               AVAIL_L                                 | 0,             // 10 (H)\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_EITHER, // 11\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_EITHER, // 12\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_EITHER, // 13\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_EITHER, // 14\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_EITHER, // 15\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_EITHER, // 16\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_EITHER, // 17\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_EITHER, // 18\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_EITHER, // 19\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_EITHER, // 20\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_EITHER, // 21\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_EITHER, // 22\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_EITHER, // 23\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_EITHER, // 24\n+               AVAIL_L | AVAIL_UL | AVAIL_U            | FILTER_EITHER, // 25\n+                                    AVAIL_U            | 0,             // 26 (V)\n+                                    AVAIL_U | AVAIL_UR | FILTER_EITHER, // 27\n+                                    AVAIL_U | AVAIL_UR | FILTER_EITHER, // 28\n+                                    AVAIL_U | AVAIL_UR | FILTER_EITHER, // 29\n+                                    AVAIL_U | AVAIL_UR | FILTER_EITHER, // 30\n+                                    AVAIL_U | AVAIL_UR | FILTER_EITHER, // 31\n+                                    AVAIL_U | AVAIL_UR | FILTER_EITHER, // 32\n+                                    AVAIL_U | AVAIL_UR | FILTER_EITHER, // 33\n+                                    AVAIL_U | AVAIL_UR | FILTER_EITHER  // 34\n+}\n+};\n+\n+\n+#endif\n+\n+#define filter_light1 FUNC(filter_light1)\n+static inline pixel filter_light1(pixel a, pixel b, pixel c)\n+{\n+    return (a + b*2 + c + 2) >> 2;\n+}\n+\n+#define filter_light FUNC(filter_light)\n+static inline void filter_light(pixel * dst, pixel p1, const pixel * src, const pixel pn, const int sstride, const unsigned int n)\n+{\n+    pixel p0;\n+    pixel p2 = *src;\n+    // Allow for final pel - it is just clearer to to have the call take the actual number of output pels\n+    unsigned int n_minus_1 = n - 1;\n+\n+    do\n+    {\n+        src += sstride;\n+        p0 = p1;\n+        p1 = p2;\n+        p2 = *src;\n+        *dst++ = filter_light1(p0, p1, p2);\n+    } while (--n_minus_1 != 0);\n+    *dst = filter_light1(p1, p2, pn);\n+}\n+\n+#define filter_strong FUNC(filter_strong)\n+static inline void filter_strong(pixel * dst, const unsigned int p0, const unsigned int p1, unsigned int n)\n+{\n+    unsigned int a = 64 * p0 + 32;\n+    const int v = p1 - p0;\n+\n+    do\n+    {\n+        *dst++ = (a += v) >> 6;\n+    } while (--n != 0);\n+}\n+\n+#define intra_filter FUNC(intra_filter)\n+static av_always_inline void intra_filter(\n+    pixel * const left, pixel * const top,\n+    const unsigned int req, const unsigned int avail,\n+    const pixel * const src_l, const pixel * const src_u, const pixel * const src_ur,\n+    const unsigned int stride,\n+    const unsigned int top_right_size, const unsigned int down_left_size,\n+    const unsigned int log2_size)\n+{\n+    const unsigned int strong_threshold = 1 << (BIT_DEPTH - 5);\n+    const unsigned int size = 1 << log2_size;\n+\n+    // a_ is the first pel in a section working round dl -> ur\n+    // b_ is the last\n+    // Beware that top & left work out from UL so usage of a_ & b_ may\n+    // swap between them.  It is a bad naming scheme but I have found no\n+    // better\n+    const pixel * a_dl = src_l + (down_left_size + size - 1) * stride;\n+    const pixel * b_dl = src_l + size * stride;\n+    const pixel * a_l  = src_l + (size - 1) * stride;\n+    const pixel * b_l  = src_l;\n+    const pixel * ab_ul = src_l - stride;\n+    const pixel * a_u = src_u;\n+    const pixel * b_u = src_u + size - 1;\n+    const pixel * a_ur = src_ur;\n+    const pixel * b_ur = src_ur + top_right_size - 1;\n+\n+    const unsigned int want = req & ~avail;\n+    const unsigned int have = req & avail;\n+    unsigned int i;\n+\n+    if ((avail & AVAIL_DL) == 0)\n+    {\n+        a_dl = a_ur;\n+        if ((avail & AVAIL_U) != 0)\n+            a_dl = a_u;\n+        if ((avail & AVAIL_UL) != 0)\n+            a_dl = ab_ul;\n+        if ((avail & AVAIL_L) != 0)\n+            a_dl = a_l;\n+        b_dl = a_dl;\n+    }\n+\n+    if ((avail & AVAIL_L) == 0)\n+    {\n+        a_l = b_dl;\n+        b_l = b_dl;\n+    }\n+    if ((avail & AVAIL_UL) == 0)\n+    {\n+        ab_ul = b_l;\n+    }\n+    if ((avail & AVAIL_U) == 0)\n+    {\n+        a_u = ab_ul;\n+        b_u = ab_ul;\n+    }\n+    if ((avail & AVAIL_UR) == 0)\n+    {\n+        a_ur = b_u;\n+        b_ur = b_u;\n+    }\n+\n+    if ((req & FILTER_LIGHT) == 0 || PRED_C || log2_size == 2)  // PRED_C, log2_size compiler opt hints\n+    {\n+        if ((req & AVAIL_UL) != 0)\n+            left[-1] = *ab_ul;\n+\n+        if ((want & AVAIL_L) != 0)\n+            EXTEND(left, *a_l, size);\n+        if ((want & AVAIL_DL) != 0)\n+            EXTEND(left + size, *a_dl, size);\n+        if ((want & AVAIL_U) != 0)\n+            EXTEND(top, *a_u, size);\n+        if ((want & AVAIL_UR) != 0)\n+            EXTEND(top + size, *a_ur, size);\n+\n+        if ((have & AVAIL_U) != 0)\n+            // Always good - even with sand\n+            memcpy(top, a_u, size * sizeof(pixel));\n+        if ((have & AVAIL_UR) != 0)\n+        {\n+            memcpy(top + size, a_ur, top_right_size * sizeof(pixel));\n+            EXTEND(top + size + top_right_size, *b_ur,\n+                   size - top_right_size);\n+        }\n+        if ((have & AVAIL_L) != 0)\n+        {\n+            for (i = 0; i < size; i++)\n+                left[i] = b_l[stride * i];\n+        }\n+        if ((have & AVAIL_DL) != 0)\n+        {\n+            for (i = 0; i < down_left_size; i++)\n+                left[i + size] = b_dl[stride * i];\n+            EXTEND(left + size + down_left_size, *a_dl,\n+                   size - down_left_size);\n+        }\n+    }\n+    else if ((req & FILTER_STRONG) != 0 && log2_size == 5 && // log2_size compiler opt hint\n+            FFABS((int)(*a_dl - *a_l * 2 + *ab_ul)) < strong_threshold &&\n+            FFABS((int)(*ab_ul - *b_u * 2 + *b_ur)) < strong_threshold)\n+    {\n+        if ((req & (AVAIL_U | AVAIL_UR)) != 0)\n+            filter_strong(top, *ab_ul, *b_ur, size * 2);\n+        left[-1] = *ab_ul;\n+        if ((req & (AVAIL_L | AVAIL_DL)) != 0)\n+            filter_strong(left, *ab_ul, *a_dl, size*2);\n+    }\n+    else\n+    {\n+        // Same code for both have & want for UL\n+        if ((req & AVAIL_UL) != 0)\n+        {\n+            left[-1] = filter_light1(*b_l, *ab_ul, *a_u);\n+        }\n+\n+        if ((want & AVAIL_L) != 0)\n+        {\n+            EXTEND(left, *a_l, size);\n+            left[0] = (*a_l * 3 + *ab_ul + 2) >> 2;\n+        }\n+        if ((want & AVAIL_DL) != 0)\n+        {\n+            // If we want DL then it cannot be avail so a_dl = a_l so no edge rounding\n+            EXTEND(left + size, *a_l, size);\n+        }\n+        if ((want & AVAIL_U) != 0)\n+        {\n+            EXTEND(top, *a_u, size);\n+            top[size - 1] = (*a_u * 3 + *a_ur + 2) >> 2;\n+        }\n+        if ((want & AVAIL_UR) != 0)\n+        {\n+            // If we want UR then it cannot be avail so a_ur = b_u so no edge rounding\n+            EXTEND(top + size, *a_ur, size);\n+        }\n+\n+        if ((have & AVAIL_U) != 0)\n+        {\n+            filter_light(top, *ab_ul, a_u, *a_ur, 1, size);\n+        }\n+        if ((have & AVAIL_UR) != 0) {\n+            filter_light(top + size, *b_u, a_ur, *b_ur, 1, top_right_size);\n+            top[size*2 - 1] = *b_ur;\n+            EXTEND(top + size + top_right_size, *b_ur, size - top_right_size);\n+        }\n+        if ((have & AVAIL_L) != 0)\n+        {\n+            filter_light(left, *ab_ul, b_l, *b_dl, stride, size);\n+        }\n+        if ((have & AVAIL_DL) != 0)\n+        {\n+            filter_light(left + size, *a_l, b_dl, *a_dl, stride, down_left_size);\n+            left[size*2 - 1] = *a_dl;\n+            EXTEND(left + size + down_left_size, *a_dl, size - down_left_size);\n+        }\n+    }\n+}\n+\n+#define INTRA_FILTER(log2_size) \\\n+static void FUNC(intra_filter_ ## log2_size)( \\\n+     uint8_t * const left, uint8_t * const top, \\\n+     const unsigned int req, const unsigned int avail, \\\n+     const uint8_t * const src_l, const uint8_t * const src_u, const uint8_t * const src_ur, \\\n+     const unsigned int stride, \\\n+     const unsigned int top_right_size, const unsigned int down_left_size) \\\n+{ \\\n+    intra_filter((pixel *)left, (pixel *)top, req, avail, \\\n+        (const pixel *)src_l, (const pixel *)src_u, (const pixel *)src_ur, stride / sizeof(pixel), top_right_size, down_left_size, log2_size); \\\n+}\n+\n+INTRA_FILTER(2)\n+INTRA_FILTER(3)\n+INTRA_FILTER(4)\n+INTRA_FILTER(5)\n+\n+#undef intra_filter\n+#undef INTRA_FILTER\n+\n+static void FUNC(intra_pred)(const HEVCRpiContext * const s,\n+                                              const enum IntraPredMode mode, const unsigned int x0, const unsigned int y0, const unsigned int avail,\n+                                              const unsigned int log2_size)\n+{\n+    // c_idx will alaways be 1 for _c versions and 0 for y\n+    const unsigned int c_idx = PRED_C;\n+    const unsigned int hshift = ctx_hshift(s, c_idx);\n+    const unsigned int vshift = ctx_vshift(s, c_idx);\n+    const unsigned int size = (1 << log2_size);\n+    const unsigned int x = x0 >> hshift;\n+    const unsigned int y = y0 >> vshift;\n+\n+    const ptrdiff_t stride = frame_stride1(s->frame, c_idx) / sizeof(pixel);\n+    pixel *const src = c_idx == 0 ?\n+        (pixel *)av_rpi_sand_frame_pos_y(s->frame, x, y) :\n+        (pixel *)av_rpi_sand_frame_pos_c(s->frame, x, y);\n+\n+    // Align so we can do multiple loads in the asm\n+    // Padded to 16 byte boundary so as not to confuse anything\n+    DECLARE_ALIGNED(16, pixel, top[2 * MAX_TB_SIZE]);\n+    DECLARE_ALIGNED(16, pixel, left_array[2 * MAX_TB_SIZE + 16 / sizeof(pixel)]);\n+\n+    pixel  * const left  = left_array  + 16 / sizeof(pixel);\n+    const pixel * top_pred = top;\n+\n+    const pixel * src_l = src - 1;\n+    const pixel * src_u = src - stride;\n+    const pixel * src_ur = src_u + size;\n+#if !PRED_C\n+    const unsigned int req = req_avail[log2_size - 2][mode] & ~s->ps.sps->intra_filters_disable;\n+#else\n+    const unsigned int req = req_avail_c[mode];\n+#endif\n+\n+    // If we have nothing to pred from then fill with grey\n+    // This isn't a common case but dealing with it here means we don't have to\n+    // test for it later\n+    if (avail == 0)\n+    {\n+dc_only:\n+#if !PRED_C\n+        s->hpc.pred_dc0[log2_size - 2]((uint8_t *)src, stride);\n+#else\n+        s->hpc.pred_dc0_c[log2_size - 2]((uint8_t *)src, stride);\n+#endif\n+        return;\n+    }\n+\n+    {\n+        // N.B. stride is in pixels (not bytes) or in the case of chroma pixel-pairs\n+        const AVFrame * const frame = s->frame;\n+        const unsigned int mask = stride - 1; // For chroma pixel=uint16 so stride_c is stride_y / 2\n+        const unsigned int stripe_adj = (av_rpi_sand_frame_stride2(frame) - 1) * stride;\n+        if ((x & mask) == 0)\n+            src_l -= stripe_adj;\n+        if (((x + size) & mask) == 0)\n+            src_ur += stripe_adj;\n+    }\n+\n+    // Can deal with I-slices in 'normal' code even if CIP\n+    // This also means that we don't need to generate (elsewhere) is_intra\n+    // for IRAP frames\n+    if (s->ps.pps->constrained_intra_pred_flag == 1 &&\n+        s->sh.slice_type != HEVC_SLICE_I)\n+    {\n+        // * If we ever actually care about CIP performance then we should\n+        //   special case out size 4 stuff (can be done by 'normal') and\n+        //   have 8-pel avail masks\n+        unsigned int avail_l = cip_avail_l(s->is_intra + ((y + size * 2 - 1) >> (3 - vshift)) * s->ps.sps->pcm_width + ((x - 1) >> (6 - hshift)),\n+                                           -(int)(s->ps.sps->pcm_width),\n+                                           1 << (((x - 1) >> (3 - hshift)) & 7),\n+                                           1 - hshift,\n+                                           avail,\n+                                           size,\n+                                           FFMIN(size, ((s->ps.sps->height - y0) >> vshift) - size),\n+                                           vshift != 0 ? 0 : (y >> 2) & 1);\n+\n+        unsigned int avail_u = cip_avail_u(s->is_intra + ((y - 1) >> (3 - vshift)) * s->ps.sps->pcm_width + (x >> (6 - hshift)),\n+                                           (x >> (3 - hshift)) & 7,\n+                                           1 - hshift,\n+                                           avail,\n+                                           size,\n+                                           FFMIN(size, ((s->ps.sps->width - x0) >> hshift) - size),\n+                                           hshift != 0 ? 0 : (x >> 2) & 1);\n+\n+        // Anything left?\n+        if ((avail_l | avail_u) == 0)\n+            goto dc_only;\n+\n+        FUNC(cip_fill)(left, top, avail_l, avail_u, src_l, src_u, src_ur, stride, size);\n+\n+#if !PRED_C\n+        if ((req & FILTER_LIGHT) != 0)\n+        {\n+            const unsigned threshold = 1 << (BIT_DEPTH - 5);\n+            if ((req & FILTER_STRONG) != 0 &&\n+                (int)(FFABS(left[-1]  + top[63] - 2 * top[31]))  < threshold &&\n+                (int)(FFABS(left[-1] + left[63] - 2 * left[31])) < threshold)\n+            {\n+                filter_strong(top, left[-1], top[63], 64);\n+                filter_strong(left, left[-1], left[63], 64);\n+            } else\n+            {\n+                // LHS writes UL too so copy for top\n+                const pixel p_ul = left[-1];\n+                filter_light(left - 1, top[0], left - 1, left[2*size - 1], 1, 2*size);\n+                filter_light(top, p_ul, top, top[2*size - 1], 1, 2*size - 1);\n+            }\n+        }\n+#endif\n+    }\n+    else\n+    {\n+        const unsigned int ur_size = FFMIN(size, ((s->ps.sps->width - x0) >> hshift) - size);\n+        if ((req & ~((AVAIL_UR | AVAIL_U) & avail)) == 0 &&\n+            ((req & AVAIL_UR) == 0 || src_u + 2*size == src_ur + ur_size))\n+        {\n+            top_pred = src_u;\n+        }\n+        else\n+        {\n+#if !PRED_C\n+            s->hpc.intra_filter[log2_size - 2]\n+#else\n+            s->hpc.intra_filter_c[log2_size - 2]\n+#endif\n+                ((uint8_t *)left, (uint8_t *)top, req, avail,\n+                 (const uint8_t *)src_l, (const uint8_t *)src_u, (const uint8_t *)src_ur, stride * sizeof(pixel),\n+                              ur_size,\n+                              FFMIN(size, ((s->ps.sps->height - y0) >> vshift) - size));\n+        }\n+    }\n+\n+\n+#if !PRED_C\n+    switch (mode) {\n+    case INTRA_PLANAR:\n+        s->hpc.pred_planar[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred,\n+                                          (uint8_t *)left, stride);\n+        break;\n+    case INTRA_DC:\n+        s->hpc.pred_dc[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred,\n+                       (uint8_t *)left, stride);\n+        break;\n+    case INTRA_ANGULAR_HORIZONTAL:\n+        s->hpc.pred_horizontal[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred,\n+                                           (uint8_t *)left, stride,\n+                                           mode);\n+        break;\n+    case INTRA_ANGULAR_VERTICAL:\n+        s->hpc.pred_vertical[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred,\n+                                           (uint8_t *)left, stride,\n+                                           mode);\n+        break;\n+    default:\n+        s->hpc.pred_angular[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred,\n+                                           (uint8_t *)left, stride,\n+                                           mode);\n+        break;\n+    }\n+#else\n+    switch (mode) {\n+    case INTRA_PLANAR:\n+        s->hpc.pred_planar_c[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred,\n+                                          (uint8_t *)left, stride);\n+        break;\n+    case INTRA_DC:\n+        s->hpc.pred_dc_c[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred,\n+                       (uint8_t *)left, stride);\n+        break;\n+    case INTRA_ANGULAR_HORIZONTAL:\n+        s->hpc.pred_horizontal_c[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred,\n+                                           (uint8_t *)left, stride,\n+                                           mode);\n+        break;\n+    case INTRA_ANGULAR_VERTICAL:\n+        s->hpc.pred_vertical_c[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred,\n+                                           (uint8_t *)left, stride,\n+                                           mode);\n+        break;\n+    default:\n+        s->hpc.pred_angular_c[log2_size - 2]((uint8_t *)src, (uint8_t *)top_pred,\n+                                           (uint8_t *)left, stride,\n+                                           mode);\n+        break;\n+    }\n+\n+#if DUMP_PRED\n+    printf(\"U pred @ %d, %d: mode=%d\\n\", x, y, mode);\n+    dump_pred_uv((uint8_t *)src, stride, 1 << log2_size);\n+    printf(\"V pred @ %d, %d: mode=%d\\n\", x, y, mode);\n+    dump_pred_uv((uint8_t *)src + 1, stride, 1 << log2_size);\n+#endif\n+#endif\n+}\n+\n+#if !PRED_C\n+static av_always_inline void FUNC(pred_planar)(uint8_t *_src, const uint8_t *_top,\n+                                  const uint8_t *_left, ptrdiff_t stride,\n+                                  int trafo_size)\n+{\n+    int x, y;\n+    pixel *src        = (pixel *)_src;\n+    const pixel *top  = (const pixel *)_top;\n+    const pixel *left = (const pixel *)_left;\n+    int size = 1 << trafo_size;\n+    for (y = 0; y < size; y++)\n+        for (x = 0; x < size; x++)\n+            POS(x, y) = ((size - 1 - x) * left[y] + (x + 1) * top[size]  +\n+                         (size - 1 - y) * top[x]  + (y + 1) * left[size] + size) >> (trafo_size + 1);\n+}\n+#else\n+static av_always_inline void FUNC(pred_planar)(uint8_t * _src, const uint8_t * _top,\n+                                  const uint8_t * _left, ptrdiff_t stride,\n+                                  int trafo_size)\n+{\n+    int x, y;\n+    int size = 1 << trafo_size;\n+    c_dst_ptr_t src = (c_dst_ptr_t)_src;\n+    const c_src_ptr_t top = (c_src_ptr_t)_top;\n+    const c_src_ptr_t left = (c_src_ptr_t)_left;\n+\n+    for (y = 0; y < size; y++, src += stride)\n+    {\n+        for (x = 0; x < size; x++)\n+        {\n+            src[x][0] = ((size - 1 - x) * left[y][0] + (x + 1) * top[size][0]  +\n+                         (size - 1 - y) * top[x][0]  + (y + 1) * left[size][0] + size) >> (trafo_size + 1);\n+            src[x][1] = ((size - 1 - x) * left[y][1] + (x + 1) * top[size][1]  +\n+                         (size - 1 - y) * top[x][1]  + (y + 1) * left[size][1] + size) >> (trafo_size + 1);\n+        }\n+    }\n+}\n+#endif\n+\n+#define PRED_PLANAR(size)\\\n+static void FUNC(pred_planar_ ## size)(uint8_t *src, const uint8_t *top,        \\\n+                                       const uint8_t *left, ptrdiff_t stride)   \\\n+{                                                                               \\\n+    FUNC(pred_planar)(src, top, left, stride, size + 2);                        \\\n+}\n+\n+PRED_PLANAR(0)\n+PRED_PLANAR(1)\n+PRED_PLANAR(2)\n+PRED_PLANAR(3)\n+\n+#undef PRED_PLANAR\n+\n+#if !PRED_C\n+static void FUNC(pred_dc)(uint8_t *_src, const uint8_t *_top,\n+                          const uint8_t *_left,\n+                          ptrdiff_t stride, int log2_size)\n+{\n+    int i, j, x, y;\n+    int size          = (1 << log2_size);\n+    pixel *src        = (pixel *)_src;\n+    const pixel *top  = (const pixel *)_top;\n+    const pixel *left = (const pixel *)_left;\n+    int dc            = size;\n+    pixel4 a;\n+    for (i = 0; i < size; i++)\n+        dc += left[i] + top[i];\n+\n+    dc >>= log2_size + 1;\n+\n+    a = PIXEL_SPLAT_X4(dc);\n+\n+    for (i = 0; i < size; i++)\n+        for (j = 0; j < size; j+=4)\n+            AV_WN4P(&POS(j, i), a);\n+\n+//    if (c_idx == 0 && size < 32)\n+// As we now have separate fns for y & c - no need to test that\n+    if (size < 32)\n+    {\n+        POS(0, 0) = (left[0] + 2 * dc + top[0] + 2) >> 2;\n+        for (x = 1; x < size; x++)\n+            POS(x, 0) = (top[x] + 3 * dc + 2) >> 2;\n+        for (y = 1; y < size; y++)\n+            POS(0, y) = (left[y] + 3 * dc + 2) >> 2;\n+    }\n+}\n+#else\n+static void FUNC(pred_dc)(uint8_t *_src, const uint8_t *_top,\n+                          const uint8_t *_left,\n+                          ptrdiff_t stride, int log2_size)\n+{\n+    unsigned int i, j;\n+    const unsigned int size = (1 << log2_size);\n+    c_dst_ptr_t src = (c_dst_ptr_t)_src;\n+    const c_src_ptr_t top = (c_src_ptr_t)_top;\n+    const c_src_ptr_t left = (c_src_ptr_t)_left;\n+    unsigned int dc0 = size;\n+    unsigned int dc1 = size;\n+\n+    for (i = 0; i < size; i++)\n+    {\n+        dc0 += left[i][0] + top[i][0];\n+        dc1 += left[i][1] + top[i][1];\n+    }\n+\n+    dc0 >>= log2_size + 1;\n+    dc1 >>= log2_size + 1;\n+\n+    for (i = 0; i < size; i++, src += stride)\n+    {\n+        for (j = 0; j < size; ++j)\n+        {\n+            src[j][0] = dc0;\n+            src[j][1] = dc1;\n+\n+        }\n+    }\n+}\n+#endif\n+\n+#define PRED_DC(size)\\\n+static void FUNC(pred_dc_ ## size)(uint8_t *src, const uint8_t *top,        \\\n+                                       const uint8_t *left, ptrdiff_t stride)   \\\n+{                                                                               \\\n+    FUNC(pred_dc)(src, top, left, stride, size + 2);                        \\\n+}\n+\n+PRED_DC(0)\n+PRED_DC(1)\n+PRED_DC(2)\n+PRED_DC(3)\n+\n+#undef PRED_DC\n+\n+\n+\n+\n+#if !PRED_C\n+static void FUNC(pred_dc0)(uint8_t *_src, ptrdiff_t stride, int log2_size)\n+{\n+    int i, j;\n+    int size          = (1 << log2_size);\n+    pixel *src        = (pixel *)_src;\n+    pixel4 a = PIXEL_SPLAT_X4(1 << (BIT_DEPTH - 1));\n+\n+    for (i = 0; i < size; i++)\n+        for (j = 0; j < size; j+=4)\n+            AV_WN4P(&POS(j, i), a);\n+}\n+#else\n+static void FUNC(pred_dc0)(uint8_t *_src, ptrdiff_t stride, int log2_size)\n+{\n+    unsigned int i, j;\n+    const unsigned int size = (1 << log2_size);\n+    c_dst_ptr_t src = (c_dst_ptr_t)_src;\n+    const pixel a = (1 << (BIT_DEPTH - 1));\n+\n+    for (i = 0; i < size; i++, src += stride)\n+    {\n+        for (j = 0; j < size; ++j)\n+        {\n+            src[j][0] = a;\n+            src[j][1] = a;\n+        }\n+    }\n+}\n+#endif\n+\n+#define PRED_DC0(size)\\\n+static void FUNC(pred_dc0_ ## size)(uint8_t *src, ptrdiff_t stride)   \\\n+{                                                                               \\\n+    FUNC(pred_dc0)(src, stride, size + 2);                        \\\n+}\n+\n+PRED_DC0(0)\n+PRED_DC0(1)\n+PRED_DC0(2)\n+PRED_DC0(3)\n+\n+#undef PRED_DC0\n+\n+\n+\n+\n+#ifndef ANGLE_CONSTS\n+#define ANGLE_CONSTS\n+static const int intra_pred_angle[] = {\n+     32,  26,  21,  17, 13,  9,  5, 2, 0, -2, -5, -9, -13, -17, -21, -26, -32,\n+    -26, -21, -17, -13, -9, -5, -2, 0, 2,  5,  9, 13,  17,  21,  26,  32\n+};\n+static const int inv_angle[] = {\n+    -4096, -1638, -910, -630, -482, -390, -315, -256, -315, -390, -482,\n+    -630, -910, -1638, -4096\n+};\n+#endif\n+\n+#if !PRED_C\n+static av_always_inline void FUNC(pred_angular)(uint8_t *_src,\n+                                                const uint8_t *_top,\n+                                                const uint8_t *_left,\n+                                                ptrdiff_t stride,\n+                                                int mode, int size)\n+{\n+    int x, y;\n+    pixel *src        = (pixel *)_src;\n+    const pixel *top  = (const pixel *)_top;\n+    const pixel *left = (const pixel *)_left;\n+\n+    int angle = intra_pred_angle[mode - 2];\n+    pixel ref_array[3 * MAX_TB_SIZE + 4];\n+    pixel *ref_tmp = ref_array + size;\n+    const pixel *ref;\n+    int last = (size * angle) >> 5;\n+\n+    if (mode >= 18) {\n+        ref = top - 1;\n+\n+        if (angle < 0)\n+        {\n+            memcpy(ref_tmp + 1, top, size * PW);\n+            ref_tmp[0] = left[-1];\n+\n+            for (x = last; x <= -1; x++)\n+                ref_tmp[x] = left[-1 + ((x * inv_angle[mode - 11] + 128) >> 8)];\n+            ref = ref_tmp;\n+        }\n+\n+        for (y = 0; y < size; y++) {\n+            int idx  = ((y + 1) * angle) >> 5;\n+            int fact = ((y + 1) * angle) & 31;\n+            if (fact) {\n+                for (x = 0; x < size; x += 4) {\n+                    POS(x    , y) = ((32 - fact) * ref[x + idx + 1] +\n+                                           fact  * ref[x + idx + 2] + 16) >> 5;\n+                    POS(x + 1, y) = ((32 - fact) * ref[x + 1 + idx + 1] +\n+                                           fact  * ref[x + 1 + idx + 2] + 16) >> 5;\n+                    POS(x + 2, y) = ((32 - fact) * ref[x + 2 + idx + 1] +\n+                                           fact  * ref[x + 2 + idx + 2] + 16) >> 5;\n+                    POS(x + 3, y) = ((32 - fact) * ref[x + 3 + idx + 1] +\n+                                           fact  * ref[x + 3 + idx + 2] + 16) >> 5;\n+                }\n+            } else {\n+                for (x = 0; x < size; x += 4)\n+                    AV_WN4P(&POS(x, y), AV_RN4P(&ref[x + idx + 1]));\n+            }\n+        }\n+        if (mode == 26 && size < 32) {\n+            for (y = 0; y < size; y++)\n+                POS(0, y) = av_clip_pixel(top[0] + ((left[y] - left[-1]) >> 1));\n+        }\n+\n+    } else {\n+        ref = left - 1;\n+        if (angle < 0 && last < -1) {\n+            for (x = 0; x <= size; x += 4)\n+                AV_WN4P(&ref_tmp[x], AV_RN4P(&left[x - 1]));\n+            // Inv angle <= -256 so top offset >= 0\n+            for (x = last; x <= -1; x++)\n+                ref_tmp[x] = top[-1 + ((x * inv_angle[mode - 11] + 128) >> 8)];\n+            ref = ref_tmp;\n+        }\n+\n+        for (x = 0; x < size; x++) {\n+            int idx  = ((x + 1) * angle) >> 5;\n+            int fact = ((x + 1) * angle) & 31;\n+            if (fact) {\n+                for (y = 0; y < size; y++) {\n+                    POS(x, y) = ((32 - fact) * ref[y + idx + 1] +\n+                                       fact  * ref[y + idx + 2] + 16) >> 5;\n+                }\n+            } else {\n+                for (y = 0; y < size; y++)\n+                    POS(x, y) = ref[y + idx + 1];\n+            }\n+        }\n+        if (mode == 10 && size < 32) {\n+            for (x = 0; x < size; x += 4) {\n+                POS(x,     0) = av_clip_pixel(left[0] + ((top[x    ] - left[-1]) >> 1));\n+                POS(x + 1, 0) = av_clip_pixel(left[0] + ((top[x + 1] - left[-1]) >> 1));\n+                POS(x + 2, 0) = av_clip_pixel(left[0] + ((top[x + 2] - left[-1]) >> 1));\n+                POS(x + 3, 0) = av_clip_pixel(left[0] + ((top[x + 3] - left[-1]) >> 1));\n+            }\n+        }\n+    }\n+}\n+#else\n+static av_always_inline void FUNC(pred_angular)(uint8_t *_src,\n+                                                const uint8_t *_top,\n+                                                const uint8_t *_left,\n+                                                ptrdiff_t stride,\n+                                                int mode, int size)\n+{\n+    int x, y;\n+    c_dst_ptr_t src  = (c_dst_ptr_t)_src;\n+    c_src_ptr_t top  = (c_src_ptr_t)_top;\n+    c_src_ptr_t left = (c_src_ptr_t)_left;\n+\n+    const int angle = intra_pred_angle[mode - 2];\n+    cpel ref_array[3 * MAX_TB_SIZE + 4][2];\n+    c_dst_ptr_t ref_tmp = ref_array + size;\n+    c_src_ptr_t ref;\n+    const int last = (size * angle) >> 5;\n+\n+    if (mode >= 18) {\n+        ref = top - 1;\n+        if (angle < 0) {\n+            memcpy(ref_tmp + 1, top, size * 2 * PW);\n+            ref_tmp[0][0] = left[-1][0];\n+            ref_tmp[0][1] = left[-1][1];\n+            for (x = last; x <= -1; x++)\n+            {\n+                ref_tmp[x][0] = left[-1 + ((x * inv_angle[mode - 11] + 128) >> 8)][0];\n+                ref_tmp[x][1] = left[-1 + ((x * inv_angle[mode - 11] + 128) >> 8)][1];\n+            }\n+            ref = (c_src_ptr_t)ref_tmp;\n+        }\n+\n+        for (y = 0; y < size; y++, src += stride) {\n+            const int idx  = ((y + 1) * angle) >> 5;\n+            const int fact = ((y + 1) * angle) & 31;\n+            if (fact) {\n+                for (x = 0; x < size; ++x) {\n+                    src[x][0] = ((32 - fact) * ref[x + idx + 1][0] +\n+                                       fact  * ref[x + idx + 2][0] + 16) >> 5;\n+                    src[x][1] = ((32 - fact) * ref[x + idx + 1][1] +\n+                                       fact  * ref[x + idx + 2][1] + 16) >> 5;\n+                }\n+            } else {\n+                memcpy(src, ref + idx + 1, size * 2 * PW);\n+            }\n+        }\n+    } else {\n+        ref = left - 1;\n+        if (angle < 0 && last < -1) {\n+            memcpy(ref_tmp, left - 1, (size + 1) * 2 * PW);\n+            for (x = last; x <= -1; x++)\n+            {\n+                ref_tmp[x][0] = top[-1 + ((x * inv_angle[mode - 11] + 128) >> 8)][0];\n+                ref_tmp[x][1] = top[-1 + ((x * inv_angle[mode - 11] + 128) >> 8)][1];\n+            }\n+            ref = (c_src_ptr_t)ref_tmp;\n+        }\n+\n+        for (x = 0; x < size; x++, src++) {\n+            const int idx  = ((x + 1) * angle) >> 5;\n+            const int fact = ((x + 1) * angle) & 31;\n+            if (fact) {\n+                for (y = 0; y < size; y++) {\n+                    src[y * stride][0] = ((32 - fact) * ref[y + idx + 1][0] +\n+                                       fact  * ref[y + idx + 2][0] + 16) >> 5;\n+                    src[y * stride][1] = ((32 - fact) * ref[y + idx + 1][1] +\n+                                       fact  * ref[y + idx + 2][1] + 16) >> 5;\n+                }\n+            } else {\n+                for (y = 0; y < size; y++)\n+                {\n+                    src[y * stride][0] = ref[y + idx + 1][0];\n+                    src[y * stride][1] = ref[y + idx + 1][1];\n+                }\n+            }\n+        }\n+    }\n+}\n+#endif\n+\n+static void FUNC(pred_angular_0)(uint8_t *src, const uint8_t *top,\n+                                 const uint8_t *left,\n+                                 ptrdiff_t stride, int mode)\n+{\n+    FUNC(pred_angular)(src, top, left, stride, mode, 1 << 2);\n+}\n+\n+static void FUNC(pred_angular_1)(uint8_t *src, const uint8_t *top,\n+                                 const uint8_t *left,\n+                                 ptrdiff_t stride, int mode)\n+{\n+    FUNC(pred_angular)(src, top, left, stride, mode, 1 << 3);\n+}\n+\n+static void FUNC(pred_angular_2)(uint8_t *src, const uint8_t *top,\n+                                 const uint8_t *left,\n+                                 ptrdiff_t stride, int mode)\n+{\n+    FUNC(pred_angular)(src, top, left, stride, mode, 1 << 4);\n+}\n+\n+static void FUNC(pred_angular_3)(uint8_t *src, const uint8_t *top,\n+                                 const uint8_t *left,\n+                                 ptrdiff_t stride, int mode)\n+{\n+    FUNC(pred_angular)(src, top, left, stride, mode, 1 << 5);\n+}\n+\n+#undef cpel\n+#undef c_src_ptr_t\n+#undef c_dst_ptr_t\n+\n+#undef EXTEND\n+#undef POS\n+#undef PW\n+\n+#undef filter_light1\n+#undef filter_light\n+#undef filter_strong\n+#undef ref_gen\n+\n+#ifndef INCLUDED_ONCE\n+#define INCLUDED_ONCE\n+#endif\n+\ndiff --git a/libavcodec/rpi_mailbox.c b/libavcodec/rpi_mailbox.c\nnew file mode 100644\nindex 0000000000..98a0b104b7\n--- /dev/null\n+++ b/libavcodec/rpi_mailbox.c\n@@ -0,0 +1,155 @@\n+/*\n+Copyright (c) 2012, Broadcom Europe Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+*/\n+\n+#include <stdio.h>\n+#include <string.h>\n+#include <stdlib.h>\n+#include <fcntl.h>\n+#include <unistd.h>\n+#include <assert.h>\n+#include <stdint.h>\n+#include <sys/ioctl.h>\n+\n+#include <linux/ioctl.h>\n+\n+#define MAJOR_NUM 100\n+#define IOCTL_MBOX_PROPERTY _IOWR(MAJOR_NUM, 0, char *)\n+#define DEVICE_FILE_NAME \"/dev/vcio\"\n+\n+#include \"rpi_mailbox.h\"\n+//#include <interface/vctypes/vc_image_structs.h>\n+\n+/*\n+ * use ioctl to send mbox property message\n+ */\n+\n+static int mbox_property(int file_desc, void *buf)\n+{\n+   int ret_val = ioctl(file_desc, IOCTL_MBOX_PROPERTY, buf);\n+\n+   if (ret_val < 0) {\n+      printf(\"ioctl_set_msg failed:%d\\n\", ret_val);\n+   }\n+\n+#ifdef DEBUG\n+   unsigned *p = buf; int i; unsigned size = *(unsigned *)buf;\n+   for (i=0; i<size/4; i++)\n+      printf(\"%04x: 0x%08x\\n\", i*sizeof *p, p[i]);\n+#endif\n+   return ret_val;\n+}\n+\n+#define GET_VCIMAGE_PARAMS 0x30044\n+\n+int mbox_get_image_params(int fd, VC_IMAGE_T * img)\n+{\n+    uint32_t buf[sizeof(*img) / sizeof(uint32_t) + 32];\n+    uint32_t * p = buf;\n+    void * rimg;\n+    int rv;\n+\n+    *p++ = 0; // size\n+    *p++ = 0; // process request\n+    *p++ = GET_VCIMAGE_PARAMS;\n+    *p++ = sizeof(*img);\n+    *p++ = sizeof(*img);\n+    rimg = p;\n+    memcpy(p, img, sizeof(*img));\n+    p += sizeof(*img) / sizeof(*p);\n+    *p++ = 0;  // End tag\n+    buf[0] = (p - buf) * sizeof(*p);\n+\n+    rv = mbox_property(fd, buf);\n+    memcpy(img, rimg, sizeof(*img));\n+\n+    return rv;\n+}\n+\n+\n+#define SET_CLOCK_RATE 0x00038002\n+#define GET_MAX_CLOCK 0x00030004\n+#define CLOCK_HEVC 11\n+\n+static int mbox_property_generic(int fd, unsigned command, unsigned *word0, unsigned *word1)\n+{\n+    uint32_t buf[32];\n+    uint32_t * p = buf;\n+    int rv;\n+\n+    *p++ = 0; // size\n+    *p++ = 0; // process request\n+    *p++ = command;\n+    *p++ = 8;\n+    *p++ = 8;\n+    *p++ = *word0;\n+    *p++ = *word1;\n+    *p++ = 0;  // End tag\n+    buf[0] = (p - buf) * sizeof(*p);\n+\n+    rv = mbox_property(fd, buf);\n+    *word0 = buf[6];\n+    *word1 = buf[7];\n+    return rv;\n+}\n+\n+int mbox_open() {\n+   int file_desc;\n+\n+   // open a char device file used for communicating with kernel mbox driver\n+   file_desc = open(DEVICE_FILE_NAME, 0);\n+   if (file_desc < 0) {\n+      printf(\"Can't open device file: %s\\n\", DEVICE_FILE_NAME);\n+      printf(\"Try creating a device file with: sudo mknod %s c %d 0\\n\", DEVICE_FILE_NAME, MAJOR_NUM);\n+   }\n+   return file_desc;\n+}\n+\n+void mbox_close(int file_desc) {\n+  close(file_desc);\n+}\n+\n+int mbox_request_clock(int fd) {\n+   int rv;\n+   unsigned word0, word1 = 0;\n+   word0 = CLOCK_HEVC;\n+   rv = mbox_property_generic(fd, GET_MAX_CLOCK, &word0, &word1);\n+   if (rv != 0)\n+      return rv;\n+   word1 = word0;\n+   word0 = CLOCK_HEVC;\n+   rv = mbox_property_generic(fd, SET_CLOCK_RATE, &word0, &word1);\n+   return rv;\n+}\n+\n+int mbox_release_clock(int fd) {\n+  int rv;\n+  unsigned word0, word1 = 0;\n+  word0 = CLOCK_HEVC;\n+  word1 = 0;\n+  rv = mbox_property_generic(fd, SET_CLOCK_RATE, &word0, &word1);\n+  return rv;\n+}\ndiff --git a/libavcodec/rpi_mailbox.h b/libavcodec/rpi_mailbox.h\nnew file mode 100644\nindex 0000000000..b2654ef01e\n--- /dev/null\n+++ b/libavcodec/rpi_mailbox.h\n@@ -0,0 +1,58 @@\n+#ifndef RPI_MAILBOX_H\n+#define RPI_MAILBOX_H\n+\n+/* The image structure. */\n+typedef struct vc_image_extra_uv_s {\n+  void *u, *v;\n+  int vpitch;\n+} VC_IMAGE_EXTRA_UV_T;\n+\n+typedef union {\n+    VC_IMAGE_EXTRA_UV_T uv;\n+//  VC_IMAGE_EXTRA_RGBA_T rgba;\n+//  VC_IMAGE_EXTRA_PAL_T pal;\n+//  VC_IMAGE_EXTRA_TF_T tf;\n+//  VC_IMAGE_EXTRA_BAYER_T bayer;\n+//  VC_IMAGE_EXTRA_MSBAYER_T msbayer;\n+//  VC_IMAGE_EXTRA_CODEC_T codec;\n+//  VC_IMAGE_EXTRA_OPENGL_T opengl;\n+} VC_IMAGE_EXTRA_T;\n+\n+\n+typedef struct VC_IMAGE_T {\n+  unsigned short                  type;           /* should restrict to 16 bits */\n+  unsigned short                  info;           /* format-specific info; zero for VC02 behaviour */\n+  unsigned short                  width;          /* width in pixels */\n+  unsigned short                  height;         /* height in pixels */\n+  int                             pitch;          /* pitch of image_data array in bytes */\n+  int                             size;           /* number of bytes available in image_data array */\n+  void                           *image_data;     /* pixel data */\n+  VC_IMAGE_EXTRA_T                extra;          /* extra data like palette pointer */\n+  void                           *metadata;       /* metadata header for the image */\n+  void                           *pool_object;    /* nonNULL if image was allocated from a vc_pool */\n+  int                             mem_handle;     /* the mem handle for relocatable memory storage */\n+  int                             metadata_size;  /* size of metadata of each channel in bytes */\n+  int                             channel_offset; /* offset of consecutive channels in bytes */\n+  uint32_t                        video_timestamp;/* 90000 Hz RTP times domain - derived from audio timestamp */\n+  uint8_t                         num_channels;   /* number of channels (2 for stereo) */\n+  uint8_t                         current_channel;/* the channel this header is currently pointing to */\n+  uint8_t                         linked_multichann_flag;/* Indicate the header has the linked-multichannel structure*/\n+  uint8_t                         is_channel_linked;     /* Track if the above structure is been used to link the header\n+                                                            into a linked-mulitchannel image */\n+  uint8_t                         channel_index;         /* index of the channel this header represents while\n+                                                            it is being linked. */\n+  uint8_t                         _dummy[3];      /* pad struct to 64 bytes */\n+} VC_IMAGE_T;\n+\n+typedef int vc_image_t_size_check[(sizeof(VC_IMAGE_T) == 64) * 2 - 1];\n+\n+\n+extern int mbox_open(void);\n+extern void mbox_close(int file_desc);\n+\n+int mbox_get_image_params(int fd, VC_IMAGE_T * img);\n+\n+int mbox_request_clock(int fd);\n+int mbox_release_clock(int fd);\n+\n+#endif\ndiff --git a/libavcodec/rpi_mem.c b/libavcodec/rpi_mem.c\nnew file mode 100644\nindex 0000000000..812921f665\n--- /dev/null\n+++ b/libavcodec/rpi_mem.c\n@@ -0,0 +1,326 @@\n+/*\n+Copyright (c) 2018 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox\n+*/\n+\n+\n+#include <stdlib.h>\n+#include <string.h>\n+#include <stddef.h>\n+#include <stdint.h>\n+\n+#include \"config.h\"\n+\n+#include \"libavutil/avassert.h\"\n+#include \"libavutil/rpi_sand_fns.h\"\n+\n+#pragma GCC diagnostic push\n+// Many many redundant decls in the header files\n+#pragma GCC diagnostic ignored \"-Wredundant-decls\"\n+#include <bcm_host.h>\n+#include <interface/vctypes/vc_image_types.h>\n+#include <interface/vcsm/user-vcsm.h>\n+#pragma GCC diagnostic pop\n+\n+#include \"rpi_mem.h\"\n+#include \"rpi_zc_frames.h\"\n+\n+\n+#define OPT_PREFER_CMA 0\n+\n+struct rpi_cache_flush_env_s {\n+  struct vcsm_user_clean_invalid2_s v;\n+};\n+\n+\n+// GPU memory alloc fns (internal)\n+\n+static void gpu_free_internal(GPU_MEM_PTR_T * const p)\n+{\n+    if (p->arm != NULL)\n+        vcsm_unlock_ptr(p->arm);\n+    if (p->vcsm_handle != 0)\n+        vcsm_free(p->vcsm_handle);\n+    memset(p, 0, sizeof(*p));  // Ensure we crash hard if we try and use this again\n+}\n+\n+\n+static int gpu_malloc_internal(GPU_MEM_PTR_T * const p,\n+    const int numbytes, const unsigned int cache_type, const char * const name)\n+{\n+    memset(p, 0, sizeof(*p));\n+    p->numbytes = (numbytes + 255) & ~255;  // Round up\n+\n+    if ((p->vcsm_handle = vcsm_malloc_cache(p->numbytes, cache_type | 0x80, (char *)name)) == 0)\n+    {\n+        av_log(NULL, AV_LOG_ERROR, \"Unable to alloc %d bytes from VCSM for %s\\n\", p->numbytes, name);\n+        goto fail;\n+    }\n+    if ((p->vc_handle = vcsm_vc_hdl_from_hdl(p->vcsm_handle)) == 0)\n+    {\n+        av_log(NULL, AV_LOG_ERROR, \"Unable to VC handle from VCSM for %s\\n\", name);\n+        goto fail;\n+    }\n+    if ((p->arm = vcsm_lock(p->vcsm_handle)) == NULL)\n+    {\n+        av_log(NULL, AV_LOG_ERROR, \"Unable to lock handle from VCSM for %s\\n\", name);\n+        goto fail;\n+    }\n+    if ((p->vc = vcsm_vc_addr_from_hdl(p->vcsm_handle)) == 0)\n+    {\n+        av_log(NULL, AV_LOG_ERROR, \"Unable to get VC addr from VCSM for %s\\n\", name);\n+        goto fail;\n+    }\n+\n+    return 0;\n+\n+fail:\n+    gpu_free_internal(p);\n+    return AVERROR(ENOMEM);\n+}\n+\n+// Public gpu fns\n+\n+// Allocate memory on GPU\n+// Fills in structure <p> containing ARM pointer, videocore handle, videocore memory address, numbytes\n+// Returns 0 on success.\n+// This allocates memory that will not be cached in ARM's data cache.\n+// Therefore safe to use without data cache flushing.\n+int gpu_malloc_uncached(int numbytes, GPU_MEM_PTR_T *p)\n+{\n+    return gpu_malloc_internal(p, numbytes, VCSM_CACHE_TYPE_NONE, \"ffmpeg uncached\");\n+}\n+\n+// This allocates data that will be\n+//    Cached in ARM L2\n+//    Uncached in VPU L2\n+int gpu_malloc_cached(int numbytes, GPU_MEM_PTR_T *p)\n+{\n+    return gpu_malloc_internal(p, numbytes, VCSM_CACHE_TYPE_HOST, \"ffmpeg cached\");\n+}\n+\n+void gpu_free(GPU_MEM_PTR_T * const p) {\n+    gpu_free_internal(p);\n+}\n+\n+void rpi_mem_gpu_uninit(void)\n+{\n+    vcsm_exit();\n+    bcm_host_deinit();\n+}\n+\n+int rpi_mem_gpu_init(const unsigned int flags)\n+{\n+    const int wants_cma = bcm_host_is_fkms_active();\n+    int use_cma;\n+\n+    (void)flags;\n+\n+    if (vcsm_init_ex(wants_cma ? 1 : 0, -1) == 0)\n+        use_cma = 1;\n+    else if (vcsm_init_ex(wants_cma ? 0 : 1, -1) == 0)\n+        use_cma = 0;\n+    else\n+        return AVERROR(EINVAL);\n+\n+    bcm_host_init();\n+\n+    return use_cma + 1;\n+}\n+\n+// ----------------------------------------------------------------------------\n+//\n+// Cache flush functions\n+\n+#define CACHE_EL_MAX ((sizeof(rpi_cache_buf_t) - sizeof (struct vcsm_user_clean_invalid2_s)) / sizeof (struct vcsm_user_clean_invalid2_block_s))\n+\n+rpi_cache_flush_env_t * rpi_cache_flush_init(rpi_cache_buf_t * const buf)\n+{\n+  rpi_cache_flush_env_t * const rfe = (rpi_cache_flush_env_t *)buf;\n+  *rfe = (rpi_cache_flush_env_t){.v={.op_count = 0}};\n+  return rfe;\n+}\n+\n+void rpi_cache_flush_abort(rpi_cache_flush_env_t * const rfe)\n+{\n+  // Nothing needed\n+}\n+\n+int rpi_cache_flush_execute(rpi_cache_flush_env_t * const rfe)\n+{\n+    int rc = 0;\n+    if (rfe->v.op_count != 0) {\n+        if (vcsm_clean_invalid2(&rfe->v) != 0)\n+        {\n+          const int err = errno;\n+          av_log(NULL, AV_LOG_ERROR, \"vcsm_clean_invalid2 failed: errno=%d\\n\", err);\n+          rc = AVERROR(err);\n+        }\n+        rfe->v.op_count = 0;\n+    }\n+    return rc;\n+}\n+\n+int rpi_cache_flush_finish(rpi_cache_flush_env_t * const rfe)\n+{\n+  int rc = rpi_cache_flush_execute(rfe);;\n+\n+  return rc;\n+}\n+\n+inline void rpi_cache_flush_add_gm_blocks(rpi_cache_flush_env_t * const rfe, const GPU_MEM_PTR_T * const gm, const unsigned int mode,\n+  const unsigned int offset0, const unsigned int block_size, const unsigned int blocks, const unsigned int block_stride)\n+{\n+  struct vcsm_user_clean_invalid2_block_s * const b = rfe->v.s + rfe->v.op_count++;\n+\n+  av_assert1(rfe->v.op_count <= CACHE_EL_MAX);\n+\n+  b->invalidate_mode = mode;\n+  b->block_count = blocks;\n+  b->start_address = gm->arm + offset0;\n+  b->block_size = block_size;\n+  b->inter_block_stride = block_stride;\n+}\n+\n+void rpi_cache_flush_add_gm_range(rpi_cache_flush_env_t * const rfe, const GPU_MEM_PTR_T * const gm, const unsigned int mode,\n+  const unsigned int offset, const unsigned int size)\n+{\n+  // Deal with empty pointer trivially\n+  if (gm == NULL || size == 0)\n+    return;\n+\n+  av_assert1(offset <= gm->numbytes);\n+  av_assert1(size <= gm->numbytes);\n+  av_assert1(offset + size <= gm->numbytes);\n+\n+  rpi_cache_flush_add_gm_blocks(rfe, gm, mode, offset, size, 1, 0);\n+}\n+\n+void rpi_cache_flush_add_gm_ptr(rpi_cache_flush_env_t * const rfe, const GPU_MEM_PTR_T * const gm, const unsigned int mode)\n+{\n+  rpi_cache_flush_add_gm_blocks(rfe, gm, mode, 0, gm->numbytes, 1, 0);\n+}\n+\n+\n+void rpi_cache_flush_add_frame(rpi_cache_flush_env_t * const rfe, const AVFrame * const frame, const unsigned int mode)\n+{\n+#if !RPI_ONE_BUF\n+#error Fixme! (NIF)\n+#endif\n+  if (gpu_is_buf1(frame)) {\n+    rpi_cache_flush_add_gm_ptr(rfe, gpu_buf1_gmem(frame), mode);\n+  }\n+  else\n+  {\n+    rpi_cache_flush_add_gm_ptr(rfe, gpu_buf3_gmem(frame, 0), mode);\n+    rpi_cache_flush_add_gm_ptr(rfe, gpu_buf3_gmem(frame, 1), mode);\n+    rpi_cache_flush_add_gm_ptr(rfe, gpu_buf3_gmem(frame, 2), mode);\n+  }\n+}\n+\n+// Flush an area of a frame\n+// Width, height, x0, y0 in luma pels\n+void rpi_cache_flush_add_frame_block(rpi_cache_flush_env_t * const rfe, const AVFrame * const frame, const unsigned int mode,\n+  const unsigned int x0, const unsigned int y0, const unsigned int width, const unsigned int height,\n+  const unsigned int uv_shift, const int do_luma, const int do_chroma)\n+{\n+  const unsigned int y_offset = frame->linesize[0] * y0;\n+  const unsigned int y_size = frame->linesize[0] * height;\n+  // Round UV up/down to get everything\n+  const unsigned int uv_rnd = (1U << uv_shift) >> 1;\n+  const unsigned int uv_offset = frame->linesize[1] * (y0 >> uv_shift);\n+  const unsigned int uv_size = frame->linesize[1] * ((y0 + height + uv_rnd) >> uv_shift) - uv_offset;\n+\n+#if 0\n+  // *** frame->height is cropped height so not good\n+  // As all unsigned they will also reject -ve\n+  // Test individually as well as added to reject overflow\n+  av_assert0(start_line <= (unsigned int)frame->height);  // ***** frame height cropped\n+  av_assert0(n <= (unsigned int)frame->height);\n+  av_assert0(start_line + n <= (unsigned int)frame->height);\n+#endif\n+\n+  if (!gpu_is_buf1(frame))\n+  {\n+    if (do_luma) {\n+      rpi_cache_flush_add_gm_range(rfe, gpu_buf3_gmem(frame, 0), mode, y_offset, y_size);\n+    }\n+    if (do_chroma) {\n+      rpi_cache_flush_add_gm_range(rfe, gpu_buf3_gmem(frame, 1), mode, uv_offset, uv_size);\n+      rpi_cache_flush_add_gm_range(rfe, gpu_buf3_gmem(frame, 2), mode, uv_offset, uv_size);\n+    }\n+  }\n+  else if (!av_rpi_is_sand_frame(frame))\n+  {\n+    const GPU_MEM_PTR_T * const gm = gpu_buf1_gmem(frame);\n+    if (do_luma) {\n+      rpi_cache_flush_add_gm_range(rfe, gm, mode, (frame->data[0] - gm->arm) + y_offset, y_size);\n+    }\n+    if (do_chroma) {\n+      rpi_cache_flush_add_gm_range(rfe, gm, mode, (frame->data[1] - gm->arm) + uv_offset, uv_size);\n+      rpi_cache_flush_add_gm_range(rfe, gm, mode, (frame->data[2] - gm->arm) + uv_offset, uv_size);\n+    }\n+  }\n+  else\n+  {\n+    const unsigned int stride1 = av_rpi_sand_frame_stride1(frame);\n+    const unsigned int stride2 = av_rpi_sand_frame_stride2(frame);\n+    const unsigned int xshl = av_rpi_sand_frame_xshl(frame);\n+    const unsigned int xleft = x0 & ~((stride1 >> xshl) - 1);\n+    const unsigned int block_count = (((x0 + width - xleft) << xshl) + stride1 - 1) / stride1;  // Same for Y & C\n+    av_assert1(rfe->v.op_count + do_chroma + do_luma < CACHE_EL_MAX);\n+\n+    if (do_chroma)\n+    {\n+      struct vcsm_user_clean_invalid2_block_s * const b = rfe->v.s + rfe->v.op_count++;\n+      b->invalidate_mode = mode;\n+      b->block_count = block_count;\n+      b->start_address = av_rpi_sand_frame_pos_c(frame, xleft >> 1, y0 >> 1);\n+      b->block_size = uv_size;\n+      b->inter_block_stride = stride1 * stride2;\n+    }\n+    if (do_luma)\n+    {\n+      struct vcsm_user_clean_invalid2_block_s * const b = rfe->v.s + rfe->v.op_count++;\n+      b->invalidate_mode = mode;\n+      b->block_count = block_count;\n+      b->start_address = av_rpi_sand_frame_pos_y(frame, xleft, y0);\n+      b->block_size = y_size;\n+      b->inter_block_stride = stride1 * stride2;\n+    }\n+  }\n+}\n+\n+// Call this to clean and invalidate a region of memory\n+void rpi_cache_flush_one_gm_ptr(const GPU_MEM_PTR_T *const p, const rpi_cache_flush_mode_t mode)\n+{\n+  rpi_cache_buf_t cbuf;\n+  rpi_cache_flush_env_t * rfe = rpi_cache_flush_init(&cbuf);\n+  rpi_cache_flush_add_gm_ptr(rfe, p, mode);\n+  rpi_cache_flush_finish(rfe);\n+}\n+\ndiff --git a/libavcodec/rpi_mem.h b/libavcodec/rpi_mem.h\nnew file mode 100644\nindex 0000000000..a451079806\n--- /dev/null\n+++ b/libavcodec/rpi_mem.h\n@@ -0,0 +1,88 @@\n+/*\n+Copyright (c) 2018 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox, Ben Avison\n+*/\n+\n+#ifndef RPI_MEM_H\n+#define RPI_MEM_H\n+\n+typedef struct gpu_mem_ptr_s {\n+  unsigned char *arm; // Pointer to memory mapped on ARM side\n+  int vc_handle;   // Videocore handle of relocatable memory\n+  int vcsm_handle; // Handle for use by VCSM\n+  int vc;       // Address for use in GPU code\n+  int numbytes; // Size of memory block\n+} GPU_MEM_PTR_T;\n+\n+// General GPU functions\n+\n+#define GPU_INIT_GPU 1\n+#define GPU_INIT_CMA 2\n+\n+extern int gpu_malloc_cached(int numbytes, GPU_MEM_PTR_T *p);\n+extern int gpu_malloc_uncached(int numbytes, GPU_MEM_PTR_T *p);\n+extern void gpu_free(GPU_MEM_PTR_T * const p);\n+int rpi_mem_gpu_init(const unsigned int flags);\n+void rpi_mem_gpu_uninit(void);\n+\n+// Cache flush stuff\n+\n+struct rpi_cache_flush_env_s;\n+typedef struct rpi_cache_flush_env_s rpi_cache_flush_env_t;\n+\n+typedef struct {uint32_t t[33];} rpi_cache_buf_t;\n+\n+rpi_cache_flush_env_t * rpi_cache_flush_init(rpi_cache_buf_t * const buf);\n+// Free env without flushing\n+void rpi_cache_flush_abort(rpi_cache_flush_env_t * const rfe);\n+// Do the accumulated flush & clear but do not free the env\n+int rpi_cache_flush_execute(rpi_cache_flush_env_t * const rfe);\n+// Do the accumulated flush & free the env\n+int rpi_cache_flush_finish(rpi_cache_flush_env_t * const rfe);\n+\n+typedef enum\n+{\n+    RPI_CACHE_FLUSH_MODE_INVALIDATE     = 1,\n+    RPI_CACHE_FLUSH_MODE_WRITEBACK      = 2,\n+    RPI_CACHE_FLUSH_MODE_WB_INVALIDATE  = 3\n+} rpi_cache_flush_mode_t;\n+\n+struct AVFrame;\n+void rpi_cache_flush_add_gm_ptr(rpi_cache_flush_env_t * const rfe, const GPU_MEM_PTR_T * const gm, const rpi_cache_flush_mode_t mode);\n+void rpi_cache_flush_add_gm_range(rpi_cache_flush_env_t * const rfe, const GPU_MEM_PTR_T * const gm, const rpi_cache_flush_mode_t mode,\n+  const unsigned int offset, const unsigned int size);\n+void rpi_cache_flush_add_gm_blocks(rpi_cache_flush_env_t * const rfe, const GPU_MEM_PTR_T * const gm, const unsigned int mode,\n+  const unsigned int offset0, const unsigned int block_size, const unsigned int blocks, const unsigned int block_stride);\n+void rpi_cache_flush_add_frame(rpi_cache_flush_env_t * const rfe, const struct AVFrame * const frame, const rpi_cache_flush_mode_t mode);\n+void rpi_cache_flush_add_frame_block(rpi_cache_flush_env_t * const rfe, const struct AVFrame * const frame, const rpi_cache_flush_mode_t mode,\n+  const unsigned int x0, const unsigned int y0, const unsigned int width, const unsigned int height,\n+  const unsigned int uv_shift, const int do_luma, const int do_chroma);\n+\n+// init, add, finish for one gm ptr\n+void rpi_cache_flush_one_gm_ptr(const GPU_MEM_PTR_T * const p, const rpi_cache_flush_mode_t mode);\n+\n+#endif\ndiff --git a/libavcodec/rpi_qpu.c b/libavcodec/rpi_qpu.c\nnew file mode 100644\nindex 0000000000..cb7b96119e\n--- /dev/null\n+++ b/libavcodec/rpi_qpu.c\n@@ -0,0 +1,776 @@\n+/*\n+Copyright (c) 2018 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox\n+*/\n+\n+\n+#include <stdio.h>\n+#include <stdlib.h>\n+#include <string.h>\n+#include <stddef.h>\n+#include <stdint.h>\n+#include \"libavutil/avassert.h\"\n+\n+#include \"config.h\"\n+\n+#include <pthread.h>\n+#include <time.h>\n+\n+#include <interface/vcsm/user-vcsm.h>\n+\n+#include \"rpi_mailbox.h\"\n+#include \"rpi_mem.h\"\n+#include \"rpi_qpu.h\"\n+#include \"rpi_hevc_shader.h\"\n+#include \"rpi_hevc_transform8.h\"\n+#include \"rpi_hevc_transform10.h\"\n+#include \"libavutil/rpi_sand_fns.h\"\n+\n+// Trace time spent waiting for GPU (VPU/QPU) (1=Yes, 0=No)\n+#define RPI_TRACE_TIME_VPU_QPU_WAIT     0\n+\n+// Add profile flags to all QPU requests - generates output in \"vcdbg log msg\"\n+// Beware this is expensive and will probably throw off all other timing by >10%\n+#define RPI_TRACE_QPU_PROFILE_ALL       0\n+\n+// QPU \"noflush\" flags\n+// a mixture of flushing & profiling\n+\n+#define QPU_FLAGS_NO_FLUSH_VPU          1       // If unset VPU cache will be flushed\n+#define QPU_FLAGS_PROF_CLEAR_AND_ENABLE 2       // Clear & Enable detailed QPU profiling registers\n+#define QPU_FLAGS_PROF_OUTPUT_COUNTS    4       // Print the results\n+#define QPU_FLAGS_OUTPUT_QPU_TIMES      8       // Print QPU times - independant of the profiling\n+#define QPU_FLAGS_NO_FLUSH_QPU          16      // If unset flush QPU caches & TMUs (uniforms always flushed)\n+\n+#define vcos_verify_ge0(x) ((x)>=0)\n+\n+// Size in 32bit words\n+#define QPU_CODE_SIZE 4098\n+#define VPU_CODE_SIZE 16384\n+\n+static const short rpi_transMatrix2even[32][16] = { // Even rows first\n+{64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64,  64},\n+{90,  87,  80,  70,  57,  43,  25,   9,  -9, -25, -43, -57, -70, -80, -87, -90},\n+{89,  75,  50,  18, -18, -50, -75, -89, -89, -75, -50, -18,  18,  50,  75,  89},\n+{87,  57,   9, -43, -80, -90, -70, -25,  25,  70,  90,  80,  43,  -9, -57, -87},\n+{83,  36, -36, -83, -83, -36,  36,  83,  83,  36, -36, -83, -83, -36,  36,  83},\n+{80,   9, -70, -87, -25,  57,  90,  43, -43, -90, -57,  25,  87,  70,  -9, -80},\n+{75, -18, -89, -50,  50,  89,  18, -75, -75,  18,  89,  50, -50, -89, -18,  75},\n+{70, -43, -87,   9,  90,  25, -80, -57,  57,  80, -25, -90,  -9,  87,  43, -70},\n+{64, -64, -64,  64,  64, -64, -64,  64,  64, -64, -64,  64,  64, -64, -64,  64},\n+{57, -80, -25,  90,  -9, -87,  43,  70, -70, -43,  87,   9, -90,  25,  80, -57},\n+{50, -89,  18,  75, -75, -18,  89, -50, -50,  89, -18, -75,  75,  18, -89,  50},\n+{43, -90,  57,  25, -87,  70,   9, -80,  80,  -9, -70,  87, -25, -57,  90, -43},\n+{36, -83,  83, -36, -36,  83, -83,  36,  36, -83,  83, -36, -36,  83, -83,  36},\n+{25, -70,  90, -80,  43,   9, -57,  87, -87,  57,  -9, -43,  80, -90,  70, -25},\n+{18, -50,  75, -89,  89, -75,  50, -18, -18,  50, -75,  89, -89,  75, -50,  18},\n+{ 9, -25,  43, -57,  70, -80,  87, -90,  90, -87,  80, -70,  57, -43,  25,  -9},\n+// Odd rows\n+{90,  90,  88,  85,  82,  78,  73,  67,  61,  54,  46,  38,  31,  22,  13,   4},\n+{90,  82,  67,  46,  22,  -4, -31, -54, -73, -85, -90, -88, -78, -61, -38, -13},\n+{88,  67,  31, -13, -54, -82, -90, -78, -46,  -4,  38,  73,  90,  85,  61,  22},\n+{85,  46, -13, -67, -90, -73, -22,  38,  82,  88,  54,  -4, -61, -90, -78, -31},\n+{82,  22, -54, -90, -61,  13,  78,  85,  31, -46, -90, -67,   4,  73,  88,  38},\n+{78,  -4, -82, -73,  13,  85,  67, -22, -88, -61,  31,  90,  54, -38, -90, -46},\n+{73, -31, -90, -22,  78,  67, -38, -90, -13,  82,  61, -46, -88,  -4,  85,  54},\n+{67, -54, -78,  38,  85, -22, -90,   4,  90,  13, -88, -31,  82,  46, -73, -61},\n+{61, -73, -46,  82,  31, -88, -13,  90,  -4, -90,  22,  85, -38, -78,  54,  67},\n+{54, -85,  -4,  88, -46, -61,  82,  13, -90,  38,  67, -78, -22,  90, -31, -73},\n+{46, -90,  38,  54, -90,  31,  61, -88,  22,  67, -85,  13,  73, -82,   4,  78},\n+{38, -88,  73,  -4, -67,  90, -46, -31,  85, -78,  13,  61, -90,  54,  22, -82},\n+{31, -78,  90, -61,   4,  54, -88,  82, -38, -22,  73, -90,  67, -13, -46,  85},\n+{22, -61,  85, -90,  73, -38,  -4,  46, -78,  90, -82,  54, -13, -31,  67, -88},\n+{13, -38,  61, -78,  88, -90,  85, -73,  54, -31,   4,  22, -46,  67, -82,  90},\n+{ 4, -13,  22, -31,  38, -46,  54, -61,  67, -73,  78, -82,  85, -88,  90, -90}\n+};\n+\n+// Code/constants on GPU\n+struct GPU\n+{\n+//  unsigned int qpu_code[QPU_CODE_SIZE];\n+    unsigned int vpu_code8[VPU_CODE_SIZE];\n+    unsigned int vpu_code10[VPU_CODE_SIZE];\n+    short transMatrix2even[16*16*2];\n+};\n+\n+#define WAIT_COUNT_MAX 16\n+\n+typedef struct trace_time_one_s\n+{\n+    int count;\n+    int64_t start[WAIT_COUNT_MAX];\n+    int64_t total[WAIT_COUNT_MAX];\n+} trace_time_one_t;\n+\n+typedef struct trace_time_wait_s\n+{\n+    unsigned int jcount;\n+    int64_t start0;\n+    int64_t last_update;\n+    trace_time_one_t active;\n+    trace_time_one_t wait;\n+} trace_time_wait_t;\n+\n+typedef struct vq_wait_s\n+{\n+    sem_t sem;\n+    struct vq_wait_s * next;\n+} vq_wait_t;\n+\n+#define VQ_WAIT_POOL_SIZE 16\n+typedef struct vq_wait_pool_s\n+{\n+    vq_wait_t * head;\n+    vq_wait_t pool[VQ_WAIT_POOL_SIZE];\n+} vq_wait_pool_t;\n+\n+static void vq_wait_pool_init(vq_wait_pool_t * const pool);\n+static void vq_wait_pool_deinit(vq_wait_pool_t * const pool);\n+\n+typedef struct gpu_env_s\n+{\n+    int open_count;\n+    int init_count;\n+    int vpu_i_cache_flushed;\n+    GPU_MEM_PTR_T qpu_code_gm_ptr;\n+    GPU_MEM_PTR_T code_gm_ptr;\n+    GPU_MEM_PTR_T dummy_gm_ptr;\n+    vq_wait_pool_t wait_pool;\n+#if RPI_TRACE_TIME_VPU_QPU_WAIT\n+    trace_time_wait_t ttw;\n+#endif\n+} gpu_env_t;\n+\n+// Stop more than one thread trying to allocate memory or use the processing resources at once\n+static pthread_mutex_t gpu_mutex = PTHREAD_MUTEX_INITIALIZER;\n+static gpu_env_t * gpu = NULL;\n+\n+#if RPI_TRACE_TIME_VPU_QPU_WAIT\n+\n+static int64_t ns_time(void)\n+{\n+    struct timespec ts;\n+    clock_gettime(CLOCK_MONOTONIC, &ts);\n+    return (int64_t)ts.tv_sec * (int64_t)1000000000 + ts.tv_nsec;\n+}\n+\n+\n+#define WAIT_TIME_PRINT_PERIOD (int64_t)2000000000\n+\n+#define T_MS(t) ((unsigned int)((t)/(int64_t)1000000) % 1000U)\n+#define T_SEC(t) (unsigned int)((t)/(int64_t)1000000000)\n+#define T_ARG(t) T_SEC(t), T_MS(t)\n+#define T_FMT \"%u.%03u\"\n+\n+static void tto_print(trace_time_one_t * tto, const int64_t now, const int64_t start0, const char * const prefix)\n+{\n+    // Update totals for levels that are still pending\n+    for (int i = 0; i < tto->count; ++i) {\n+        tto->total[i] += now - tto->start[i];\n+        tto->start[i] = now;\n+    }\n+\n+    printf(\"%s: Idle:\" T_FMT \", 1:\" T_FMT \", 2:\" T_FMT \", 3:\" T_FMT \", 4:\" T_FMT \"\\n\",\n+         prefix,\n+         T_ARG(now - start0 - tto->total[0]),\n+         T_ARG(tto->total[0]),\n+         T_ARG(tto->total[1]),\n+         T_ARG(tto->total[2]),\n+         T_ARG(tto->total[3]));\n+}\n+\n+\n+static void tto_start(trace_time_one_t * const tto, const int64_t now)\n+{\n+    av_assert0(tto->count < WAIT_COUNT_MAX);\n+    tto->start[tto->count++] = now;\n+}\n+\n+static void tto_end(trace_time_one_t * const tto, const int64_t now)\n+{\n+    const int n = --tto->count;\n+    av_assert0(n >= 0);\n+    tto->total[n] += now - tto->start[n];\n+}\n+\n+static void ttw_print(trace_time_wait_t * const ttw, const int64_t now)\n+{\n+    printf(\"Jobs:%d, Total time=\" T_FMT \"\\n\", ttw->jcount, T_ARG(now - ttw->start0));\n+    tto_print(&ttw->active, now, ttw->start0, \"Active\");\n+    tto_print(&ttw->wait,   now, ttw->start0, \"  Wait\");\n+}\n+\n+#endif\n+\n+// GPU memory alloc fns (internal)\n+\n+static void gpu_free_internal(GPU_MEM_PTR_T * const p)\n+{\n+    if (p->arm != NULL)\n+        vcsm_unlock_ptr(p->arm);\n+    if (p->vcsm_handle != 0)\n+        vcsm_free(p->vcsm_handle);\n+    memset(p, 0, sizeof(*p));  // Ensure we crash hard if we try and use this again\n+}\n+\n+\n+static int gpu_malloc_internal(GPU_MEM_PTR_T * const p,\n+    const int numbytes, const unsigned int cache_type, const char * const name)\n+{\n+    memset(p, 0, sizeof(*p));\n+    p->numbytes = (numbytes + 255) & ~255;  // Round up\n+\n+    if ((p->vcsm_handle = vcsm_malloc_cache(p->numbytes, cache_type | 0x80, (char *)name)) == 0 ||\n+        (p->vc_handle = vcsm_vc_hdl_from_hdl(p->vcsm_handle)) == 0 ||\n+        (p->arm = vcsm_lock(p->vcsm_handle)) == NULL ||\n+        (p->vc = vcsm_vc_addr_from_hdl(p->vcsm_handle)) == 0)\n+    {\n+        gpu_free_internal(p);\n+        return AVERROR(ENOMEM);\n+    }\n+    return 0;\n+}\n+\n+\n+// GPU init, free, lock, unlock\n+\n+static void gpu_term(void)\n+{\n+    gpu_env_t * const ge = gpu;\n+\n+    // We have to hope that eveything has terminated...\n+    gpu = NULL;\n+\n+    vc_gpuserv_deinit();\n+\n+    gpu_free_internal(&ge->code_gm_ptr);\n+    gpu_free_internal(&ge->qpu_code_gm_ptr);\n+    gpu_free_internal(&ge->dummy_gm_ptr);\n+\n+    vcsm_exit();\n+\n+    vq_wait_pool_deinit(&ge->wait_pool);\n+\n+    free(ge);\n+}\n+\n+\n+// Connect to QPU, returns 0 on success.\n+static int gpu_init(gpu_env_t ** const gpu) {\n+    volatile struct GPU* ptr;\n+    gpu_env_t * const ge = calloc(1, sizeof(gpu_env_t));\n+    int rv;\n+    *gpu = NULL;\n+\n+    if (ge == NULL)\n+        return -1;\n+\n+    vq_wait_pool_init(&ge->wait_pool);\n+\n+    vcsm_init();\n+\n+    // Now copy over the QPU code into GPU memory\n+    if ((rv = gpu_malloc_internal(&ge->qpu_code_gm_ptr, QPU_CODE_SIZE * 4, VCSM_CACHE_TYPE_NONE, \"ffmpeg qpu code\")) != 0)\n+      return rv;\n+\n+    {\n+        int num_bytes = (char *)mc_end - (char *)ff_hevc_rpi_shader;\n+        av_assert0(num_bytes<=QPU_CODE_SIZE*sizeof(unsigned int));\n+        memcpy(ge->qpu_code_gm_ptr.arm, ff_hevc_rpi_shader, num_bytes);\n+        memset(ge->qpu_code_gm_ptr.arm + num_bytes, 0, QPU_CODE_SIZE*4 - num_bytes);\n+    }\n+\n+    // And the VPU code\n+    if ((rv = gpu_malloc_internal(&ge->code_gm_ptr, sizeof(struct GPU), VCSM_CACHE_TYPE_VC, \"ffmpeg vpu code\")) != 0)\n+        return rv;\n+    ptr = (volatile struct GPU*)ge->code_gm_ptr.arm;\n+\n+    // Zero everything so we have zeros between the code bits\n+    memset((void *)ptr, 0, sizeof(*ptr));\n+    {\n+        int num_bytes = sizeof(rpi_hevc_transform8);\n+        av_assert0(num_bytes<=VPU_CODE_SIZE*sizeof(unsigned int));\n+        memcpy((void*)ptr->vpu_code8, rpi_hevc_transform8, num_bytes);\n+    }\n+    {\n+        int num_bytes = sizeof(rpi_hevc_transform10);\n+        av_assert0(num_bytes<=VPU_CODE_SIZE*sizeof(unsigned int));\n+        memcpy((void*)ptr->vpu_code10, rpi_hevc_transform10, num_bytes);\n+    }\n+    // And the transform coefficients\n+    memcpy((void*)ptr->transMatrix2even, rpi_transMatrix2even, sizeof(rpi_transMatrix2even));\n+\n+    // Generate a dummy \"frame\" & fill with 0x80\n+    // * Could reset to 1 <<bit_depth?\n+    if ((rv = gpu_malloc_internal(&ge->dummy_gm_ptr, 0x4000, VCSM_CACHE_TYPE_NONE, \"ffmpeg dummy frame\")) != 0)\n+        return rv;\n+    memset(ge->dummy_gm_ptr.arm, 0x80, 0x4000);\n+\n+    *gpu = ge;\n+    return 0;\n+}\n+\n+\n+\n+static void gpu_unlock(void) {\n+    pthread_mutex_unlock(&gpu_mutex);\n+}\n+\n+// Make sure we have exclusive access to the mailbox, and enable qpu if necessary.\n+static gpu_env_t * gpu_lock(void) {\n+    pthread_mutex_lock(&gpu_mutex);\n+\n+    av_assert1(gpu != NULL);\n+    return gpu;\n+}\n+\n+static gpu_env_t * gpu_lock_ref(void)\n+{\n+    pthread_mutex_lock(&gpu_mutex);\n+\n+    if (gpu == NULL) {\n+        int rv = gpu_init(&gpu);\n+        if (rv != 0) {\n+            gpu_unlock();\n+            return NULL;\n+        }\n+    }\n+\n+    ++gpu->open_count;\n+    return gpu;\n+}\n+\n+static void gpu_unlock_unref(gpu_env_t * const ge)\n+{\n+    if (--ge->open_count == 0)\n+        gpu_term();\n+\n+    gpu_unlock();\n+}\n+\n+static inline gpu_env_t * gpu_ptr(void)\n+{\n+    av_assert1(gpu != NULL);\n+    return gpu;\n+}\n+\n+unsigned int vpu_get_fn(const unsigned int bit_depth) {\n+  uint32_t a = 0;\n+\n+  // Make sure that the gpu is initialized\n+  av_assert1(gpu != NULL);\n+  switch (bit_depth){\n+    case 8:\n+      a = gpu->code_gm_ptr.vc + offsetof(struct GPU, vpu_code8);\n+      break;\n+    case 10:\n+      a = gpu->code_gm_ptr.vc + offsetof(struct GPU, vpu_code10);\n+      break;\n+    default:\n+      av_assert0(0);\n+  }\n+  return a;\n+}\n+\n+unsigned int vpu_get_constants(void) {\n+  av_assert1(gpu != NULL);\n+  return (gpu->code_gm_ptr.vc + offsetof(struct GPU,transMatrix2even));\n+}\n+\n+void gpu_ref(void)\n+{\n+  gpu_lock_ref();\n+  gpu_unlock();\n+}\n+\n+void gpu_unref(void)\n+{\n+  gpu_env_t * const ge = gpu_lock();\n+  gpu_unlock_unref(ge);\n+}\n+\n+// ----------------------------------------------------------------------------\n+\n+\n+// Wait abstractions - mostly so we can easily add profile code\n+static void vq_wait_pool_init(vq_wait_pool_t * const wp)\n+{\n+  unsigned int i;\n+  for (i = 0; i != VQ_WAIT_POOL_SIZE; ++i) {\n+    sem_init(&wp->pool[i].sem, 0, 0);\n+    wp->pool[i].next = wp->pool + i + 1;\n+  }\n+  wp->head = wp->pool + 0;\n+  wp->pool[VQ_WAIT_POOL_SIZE - 1].next = NULL;\n+}\n+\n+static void vq_wait_pool_deinit(vq_wait_pool_t * const wp)\n+{\n+  unsigned int i;\n+  wp->head = NULL;\n+  for (i = 0; i != VQ_WAIT_POOL_SIZE; ++i) {\n+    sem_destroy(&wp->pool[i].sem);\n+    wp->pool[i].next = NULL;\n+  }\n+}\n+\n+\n+// If sem_init actually takes time then maybe we want a pool...\n+static vq_wait_t * vq_wait_new(void)\n+{\n+  gpu_env_t * const ge = gpu_lock_ref();\n+  vq_wait_t * const wait = ge->wait_pool.head;\n+  ge->wait_pool.head = wait->next;\n+  wait->next = NULL;\n+\n+#if RPI_TRACE_TIME_VPU_QPU_WAIT\n+  tto_start(&ge->ttw.active, ns_time());\n+#endif\n+\n+  gpu_unlock();\n+  return wait;\n+}\n+\n+static void vq_wait_delete(vq_wait_t * const wait)\n+{\n+  gpu_env_t * const ge = gpu_lock();\n+  wait->next = ge->wait_pool.head;\n+  ge->wait_pool.head = wait;\n+\n+#if RPI_TRACE_TIME_VPU_QPU_WAIT\n+  {\n+    trace_time_wait_t * const ttw = &ge->ttw;\n+    const int64_t now = ns_time();\n+    ++ttw->jcount;\n+    tto_end(&ttw->wait, now);\n+\n+    if (ttw->start0 == 0)\n+    {\n+      ttw->start0 = ttw->active.start[0];\n+      ttw->last_update = ttw->start0;\n+    }\n+    if (now - ttw->last_update > WAIT_TIME_PRINT_PERIOD)\n+    {\n+      ttw->last_update += WAIT_TIME_PRINT_PERIOD;\n+      ttw_print(ttw, now);\n+    }\n+  }\n+#endif\n+  gpu_unlock_unref(ge);\n+}\n+\n+static void vq_wait_wait(vq_wait_t * const wait)\n+{\n+#if RPI_TRACE_TIME_VPU_QPU_WAIT\n+  {\n+      const int64_t now = ns_time();\n+      gpu_env_t * const ge = gpu_lock();\n+      tto_start(&ge->ttw.wait, now);\n+      gpu_unlock();\n+  }\n+#endif\n+\n+  while (sem_wait(&wait->sem) == -1 && errno == EINTR)\n+    /* loop */;\n+}\n+\n+static void vq_wait_post(vq_wait_t * const wait)\n+{\n+#if RPI_TRACE_TIME_VPU_QPU_WAIT\n+  {\n+    gpu_env_t *const ge = gpu_lock();\n+    tto_end(&ge->ttw.active, ns_time());\n+    gpu_unlock();\n+  }\n+#endif\n+\n+  sem_post(&wait->sem);\n+}\n+\n+\n+\n+// Header comments were wrong for these two\n+#define VPU_QPU_MASK_QPU  1\n+#define VPU_QPU_MASK_VPU  2\n+\n+typedef struct vpu_qpu_job_env_s vpu_qpu_job_env_t;\n+\n+vpu_qpu_job_env_t * vpu_qpu_job_init(vpu_qpu_job_env_t * const buf)\n+{\n+//  vpu_qpu_job_env_t * vqj = calloc(1, sizeof(vpu_qpu_job_env_t));\n+  vpu_qpu_job_env_t * vqj = buf;\n+//  memset(vqj, 0, sizeof(*vqj));\n+  vqj->n = 0;\n+  vqj->mask = 0;\n+  return vqj;\n+}\n+\n+void vpu_qpu_job_delete(vpu_qpu_job_env_t * const vqj)\n+{\n+//  memset(vqj, 0, sizeof(*vqj));\n+//  free(vqj);\n+}\n+\n+static inline struct gpu_job_s * new_job(vpu_qpu_job_env_t * const vqj)\n+{\n+  struct gpu_job_s * const j = vqj->j + vqj->n++;\n+  av_assert1(vqj->n <= VPU_QPU_JOB_MAX);\n+  return j;\n+}\n+\n+void vpu_qpu_job_add_vpu(vpu_qpu_job_env_t * const vqj, const uint32_t vpu_code,\n+  const unsigned r0, const unsigned r1, const unsigned r2, const unsigned r3, const unsigned r4, const unsigned r5)\n+{\n+  if (vpu_code != 0) {\n+    struct gpu_job_s *const j = new_job(vqj);\n+    vqj->mask |= VPU_QPU_MASK_VPU;\n+\n+    j->command = EXECUTE_VPU;\n+    j->callback.func = 0;\n+    j->callback.cookie = NULL;\n+    // The bottom two bits of the execute address contain no-flush flags\n+    // b0 will flush the VPU I-cache if unset so we nearly always want that set\n+    // as we never reload code\n+    j->u.v.q[0] = vpu_code | gpu->vpu_i_cache_flushed;\n+    j->u.v.q[1] = r0;\n+    j->u.v.q[2] = r1;\n+    j->u.v.q[3] = r2;\n+    j->u.v.q[4] = r3;\n+    j->u.v.q[5] = r4;\n+    j->u.v.q[6] = r5;\n+    gpu->vpu_i_cache_flushed = 1;\n+  }\n+}\n+\n+// flags are QPU_FLAGS_xxx\n+void vpu_qpu_job_add_qpu(vpu_qpu_job_env_t * const vqj, const unsigned int n, const uint32_t * const mail)\n+{\n+  if (n != 0) {\n+    struct gpu_job_s *const j = new_job(vqj);\n+    vqj->mask |= VPU_QPU_MASK_QPU;\n+\n+    j->command = EXECUTE_QPU;\n+    j->callback.func = 0;\n+    j->callback.cookie = NULL;\n+\n+    j->u.q.jobs = n;\n+#if RPI_TRACE_QPU_PROFILE_ALL\n+    j->u.q.noflush = QPU_FLAGS_NO_FLUSH_VPU | QPU_FLAGS_PROF_CLEAR_AND_ENABLE | QPU_FLAGS_PROF_OUTPUT_COUNTS;\n+#else\n+    j->u.q.noflush = QPU_FLAGS_NO_FLUSH_VPU;\n+#endif\n+    j->u.q.timeout = 5000;\n+    memcpy(j->u.q.control, mail, n * QPU_MAIL_EL_VALS * sizeof(uint32_t));\n+  }\n+}\n+\n+// Convert callback to sem post\n+static void vpu_qpu_job_callback_wait(void * v)\n+{\n+  vq_wait_post(v);\n+}\n+\n+// Poke a user-supplied sem\n+static void vpu_qpu_job_callback_sem(void * v)\n+{\n+  sem_post((sem_t *)v);\n+}\n+\n+void vpu_qpu_job_add_sync_this(vpu_qpu_job_env_t * const vqj, vpu_qpu_wait_h * const wait_h)\n+{\n+  vq_wait_t * wait;\n+\n+  if (vqj->mask == 0) {\n+    *wait_h = NULL;\n+    return;\n+  }\n+\n+  // We are going to want a sync object\n+  wait = vq_wait_new();\n+\n+  // There are 2 VPU Qs & 1 QPU Q so we can collapse sync\n+  // If we only posted one thing or only QPU jobs\n+  if (vqj->n == 1 || vqj->mask == VPU_QPU_MASK_QPU)\n+  {\n+    struct gpu_job_s * const j = vqj->j + (vqj->n - 1);\n+    av_assert1(j->callback.func == 0);\n+\n+    j->callback.func = vpu_qpu_job_callback_wait;\n+    j->callback.cookie = wait;\n+  }\n+  else\n+  {\n+    struct gpu_job_s *const j = new_job(vqj);\n+\n+    j->command = EXECUTE_SYNC;\n+    j->u.s.mask = vqj->mask;\n+    j->callback.func = vpu_qpu_job_callback_wait;\n+    j->callback.cookie = wait;\n+  }\n+\n+  vqj->mask = 0;\n+  *wait_h = wait;\n+}\n+\n+// Returns 0 if no sync added ('cos Q empty), 1 if sync added\n+int vpu_qpu_job_add_sync_sem(vpu_qpu_job_env_t * const vqj, sem_t * const sem)\n+{\n+  // If nothing on q then just return\n+  if (vqj->mask == 0)\n+    return 0;\n+\n+  // There are 2 VPU Qs & 1 QPU Q so we can collapse sync\n+  // If we only posted one thing or only QPU jobs\n+  if (vqj->n == 1 || vqj->mask == VPU_QPU_MASK_QPU)\n+  {\n+    struct gpu_job_s * const j = vqj->j + (vqj->n - 1);\n+    av_assert1(j->callback.func == 0);\n+\n+    j->callback.func = vpu_qpu_job_callback_sem;\n+    j->callback.cookie = sem;\n+  }\n+  else\n+  {\n+    struct gpu_job_s *const j = new_job(vqj);\n+\n+    j->command = EXECUTE_SYNC;\n+    j->u.s.mask = vqj->mask;\n+    j->callback.func = vpu_qpu_job_callback_sem;\n+    j->callback.cookie = sem;\n+  }\n+\n+  vqj->mask = 0;\n+  return 1;\n+}\n+\n+\n+int vpu_qpu_job_start(vpu_qpu_job_env_t * const vqj)\n+{\n+  if (vqj->n == 0)\n+    return 0;\n+\n+  return vc_gpuserv_execute_code(vqj->n, vqj->j);\n+}\n+\n+// Simple wrapper of start + delete\n+int vpu_qpu_job_finish(vpu_qpu_job_env_t * const vqj)\n+{\n+  int rv;\n+  rv = vpu_qpu_job_start(vqj);\n+  vpu_qpu_job_delete(vqj);\n+  return rv;\n+}\n+\n+void vpu_qpu_wait(vpu_qpu_wait_h * const wait_h)\n+{\n+  if (wait_h != NULL)\n+  {\n+    vq_wait_t * const wait = *wait_h;\n+    if (wait != NULL) {\n+      *wait_h = NULL;\n+      vq_wait_wait(wait);\n+      vq_wait_delete(wait);\n+    }\n+  }\n+}\n+\n+int vpu_qpu_init()\n+{\n+  gpu_env_t * const ge = gpu_lock_ref();\n+  if (ge == NULL)\n+    return -1;\n+\n+  if (ge->init_count++ == 0)\n+  {\n+    vc_gpuserv_init();\n+  }\n+\n+  gpu_unlock();\n+  return 0;\n+}\n+\n+void vpu_qpu_term()\n+{\n+  gpu_env_t * const ge = gpu_lock();\n+\n+  if (--ge->init_count == 0) {\n+    vc_gpuserv_deinit();\n+\n+#if RPI_TRACE_TIME_VPU_QPU_WAIT\n+    ttw_print(&ge->ttw, ns_time());\n+#endif\n+  }\n+\n+  gpu_unlock_unref(ge);\n+}\n+\n+uint32_t qpu_fn(const int * const mc_fn)\n+{\n+  return gpu->qpu_code_gm_ptr.vc + ((const char *)mc_fn - (const char *)ff_hevc_rpi_shader);\n+}\n+\n+uint32_t qpu_dummy(void)\n+{\n+  return gpu->dummy_gm_ptr.vc;\n+}\n+\n+int rpi_hevc_qpu_init_fn(HEVCRpiQpu * const qf, const unsigned int bit_depth)\n+{\n+  // Dummy values we can catch with emulation\n+  qf->y_pxx = ~1U;\n+  qf->y_bxx = ~2U;\n+  qf->y_p00 = ~3U;\n+  qf->y_b00 = ~4U;\n+  qf->c_pxx = ~5U;\n+  qf->c_bxx = ~6U;\n+\n+  switch (bit_depth) {\n+    case 8:\n+      qf->y_pxx = qpu_fn(mc_filter_y_pxx);\n+      qf->y_pxx = qpu_fn(mc_filter_y_pxx);\n+      qf->y_bxx = qpu_fn(mc_filter_y_bxx);\n+      qf->y_p00 = qpu_fn(mc_filter_y_p00);\n+      qf->y_b00 = qpu_fn(mc_filter_y_b00);\n+      qf->c_pxx = qpu_fn(mc_filter_c_p);\n+      qf->c_pxx_l1 = qpu_fn(mc_filter_c_p_l1);\n+      qf->c_bxx = qpu_fn(mc_filter_c_b);\n+      break;\n+    case 10:\n+      qf->c_pxx = qpu_fn(mc_filter_c10_p);\n+      qf->c_pxx_l1 = qpu_fn(mc_filter_c10_p_l1);\n+      qf->c_bxx = qpu_fn(mc_filter_c10_b);\n+      qf->y_pxx = qpu_fn(mc_filter_y10_pxx);\n+      qf->y_bxx = qpu_fn(mc_filter_y10_bxx);\n+      qf->y_p00 = qpu_fn(mc_filter_y10_p00);\n+      qf->y_b00 = qpu_fn(mc_filter_y10_b00);\n+      break;\n+    default:\n+      return -1;\n+  }\n+  return 0;\n+}\n+\ndiff --git a/libavcodec/rpi_qpu.h b/libavcodec/rpi_qpu.h\nnew file mode 100644\nindex 0000000000..8777687021\n--- /dev/null\n+++ b/libavcodec/rpi_qpu.h\n@@ -0,0 +1,103 @@\n+/*\n+Copyright (c) 2018 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox, Ben Avison\n+*/\n+\n+#ifndef RPI_QPU_H\n+#define RPI_QPU_H\n+\n+#include \"rpi_mem.h\"\n+#include \"rpi_zc_frames.h\"\n+\n+#pragma GCC diagnostic push\n+// Many many redundant decls in the header files\n+#pragma GCC diagnostic ignored \"-Wredundant-decls\"\n+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"\n+#include \"interface/vmcs_host/vc_vchi_gpuserv.h\"  // for gpu_job_s\n+#pragma GCC diagnostic pop\n+\n+// QPU specific functions\n+\n+typedef struct HEVCRpiQpu {\n+    uint32_t c_pxx;\n+    uint32_t c_pxx_l1;\n+    uint32_t c_bxx;\n+    uint32_t y_pxx;\n+    uint32_t y_bxx;\n+    uint32_t y_p00;\n+    uint32_t y_b00;\n+} HEVCRpiQpu;\n+\n+int rpi_hevc_qpu_init_fn(HEVCRpiQpu * const qf, const unsigned int bit_depth);\n+\n+uint32_t qpu_fn(const int * const mc_fn);\n+uint32_t qpu_dummy(void);\n+\n+#define QPU_N_GRP    4\n+#define QPU_N_MAX    12\n+\n+#define QPU_MAIL_EL_VALS  2\n+\n+struct vpu_qpu_wait_s;\n+typedef struct vq_wait_s * vpu_qpu_wait_h;\n+\n+// VPU specific functions\n+\n+struct vpu_qpu_job_env_s;\n+typedef struct vpu_qpu_job_env_s * vpu_qpu_job_h;\n+\n+#define VPU_QPU_JOB_MAX 4\n+struct vpu_qpu_job_env_s\n+{\n+  unsigned int n;\n+  unsigned int mask;\n+  struct gpu_job_s j[VPU_QPU_JOB_MAX];\n+};\n+typedef struct vpu_qpu_job_env_s vpu_qpu_job_env_t;\n+\n+vpu_qpu_job_h vpu_qpu_job_init(vpu_qpu_job_env_t * const buf);\n+void vpu_qpu_job_delete(const vpu_qpu_job_h vqj);\n+void vpu_qpu_job_add_vpu(const vpu_qpu_job_h vqj, const uint32_t vpu_code,\n+  const unsigned r0, const unsigned r1, const unsigned r2, const unsigned r3, const unsigned r4, const unsigned r5);\n+void vpu_qpu_job_add_qpu(const vpu_qpu_job_h vqj, const unsigned int n, const uint32_t * const mail);\n+void vpu_qpu_job_add_sync_this(const vpu_qpu_job_h vqj, vpu_qpu_wait_h * const wait_h);\n+int vpu_qpu_job_add_sync_sem(vpu_qpu_job_env_t * const vqj, sem_t * const sem);\n+int vpu_qpu_job_start(const vpu_qpu_job_h vqj);\n+int vpu_qpu_job_finish(const vpu_qpu_job_h vqj);\n+\n+extern unsigned int vpu_get_fn(const unsigned int bit_depth);\n+extern unsigned int vpu_get_constants(void);\n+\n+// Waits for previous post_codee to complete and Will null out *wait_h after use\n+void vpu_qpu_wait(vpu_qpu_wait_h * const wait_h);\n+int vpu_qpu_init(void);\n+void vpu_qpu_term(void);\n+\n+void gpu_ref(void);\n+void gpu_unref(void);\n+\n+#endif\ndiff --git a/libavcodec/rpi_zc.c b/libavcodec/rpi_zc.c\nnew file mode 100644\nindex 0000000000..37be9a0f49\n--- /dev/null\n+++ b/libavcodec/rpi_zc.c\n@@ -0,0 +1,1227 @@\n+#include \"config.h\"\n+\n+#include \"libavcodec/avcodec.h\"\n+#include \"rpi_mem.h\"\n+#include \"rpi_mailbox.h\"\n+#include \"rpi_zc.h\"\n+#include \"libavutil/avassert.h\"\n+#include <pthread.h>\n+\n+#include \"libavutil/buffer_internal.h\"\n+\n+#pragma GCC diagnostic push\n+// Many many redundant decls in the header files\n+#pragma GCC diagnostic ignored \"-Wredundant-decls\"\n+#include <interface/vctypes/vc_image_types.h>\n+#include <interface/vcsm/user-vcsm.h>\n+#pragma GCC diagnostic pop\n+\n+#define TRACE_ALLOC 0\n+#define DEBUG_ALWAYS_KEEP_LOCKED 0\n+\n+struct ZcPoolEnt;\n+\n+typedef struct ZcPool\n+{\n+    size_t numbytes;\n+    struct ZcPoolEnt * head;\n+    pthread_mutex_t lock;\n+} ZcPool;\n+\n+typedef struct ZcPoolEnt\n+{\n+    size_t numbytes;\n+\n+    unsigned int vcsm_handle;\n+    unsigned int vc_handle;\n+    void * map_arm;\n+    unsigned int map_vc;\n+\n+    struct ZcPoolEnt * next;\n+    struct ZcPool * pool;\n+} ZcPoolEnt;\n+\n+typedef struct ZcOldCtxVals\n+{\n+    int thread_safe_callbacks;\n+    int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);\n+    void * opaque;\n+} ZcOldCtxVals;\n+\n+typedef struct AVZcEnv\n+{\n+    unsigned int refcount;\n+    ZcOldCtxVals old;\n+\n+    void * pool_env;\n+    av_rpi_zc_alloc_buf_fn_t * alloc_buf;\n+    av_rpi_zc_free_pool_fn_t * free_pool;\n+\n+    unsigned int pool_size;\n+} ZcEnv;\n+\n+typedef struct ZcUserBufEnv {\n+    void * v;\n+    const av_rpi_zc_buf_fn_tab_t * fn;\n+    size_t numbytes;\n+    int offset;\n+} ZcUserBufEnv;\n+\n+#define ZC_BUF_INVALID  0\n+#define ZC_BUF_VALID    1\n+#define ZC_BUF_NEVER    2\n+\n+typedef struct ZcBufEnv {\n+    GPU_MEM_PTR_T gmem;\n+    AVZcEnvPtr zc;\n+    int is_valid;\n+    AVBufferRef * user;\n+    AVRpiZcFrameGeometry geo;\n+    size_t size_y;\n+    size_t size_c;\n+    size_t size_pic;\n+    ssize_t offset;\n+    pthread_mutex_t lock;\n+    pthread_cond_t cond;\n+} ZcBufEnv;\n+\n+\n+\n+\n+\n+\n+#define ALLOC_PAD       0\n+#define ALLOC_ROUND     0x1000\n+#define STRIDE_ROUND    64\n+#define STRIDE_OR       0\n+\n+#define DEBUG_ZAP0_BUFFERS 0\n+\n+static inline int av_rpi_is_sand_format(const int format)\n+{\n+    return (format >= AV_PIX_FMT_SAND128 && format <= AV_PIX_FMT_SAND64_16) ||\n+        (format == AV_PIX_FMT_RPI4_8 || format == AV_PIX_FMT_RPI4_10);\n+}\n+\n+static inline int av_rpi_is_sand_frame(const AVFrame * const frame)\n+{\n+    return av_rpi_is_sand_format(frame->format);\n+}\n+\n+//----------------------------------------------------------------------------\n+//\n+// Internal pool stuff\n+\n+// Pool entry functions\n+\n+static ZcPoolEnt * zc_pool_ent_alloc(ZcPool * const pool, const size_t req_size)\n+{\n+    ZcPoolEnt * const zp = av_mallocz(sizeof(ZcPoolEnt));\n+\n+    // Round up to 4k & add 4k\n+    const unsigned int alloc_size = (req_size + ALLOC_PAD + ALLOC_ROUND - 1) & ~(ALLOC_ROUND - 1);\n+\n+    if (zp == NULL) {\n+        av_log(NULL, AV_LOG_ERROR, \"av_malloc(ZcPoolEnt) failed\\n\");\n+        goto fail0;\n+    }\n+\n+    // The 0x80 here maps all pages here rather than waiting for lazy mapping\n+    // BEWARE that in GPU land a later unlock/lock pair will put us back into\n+    // lazy mode - which will also break cache invalidate calls.\n+    if ((zp->vcsm_handle = vcsm_malloc_cache(alloc_size, VCSM_CACHE_TYPE_HOST | 0x80, \"ffmpeg_rpi_zc\")) == 0)\n+    {\n+        av_log(NULL, AV_LOG_ERROR, \"av_gpu_malloc_cached(%d) failed\\n\", alloc_size);\n+        goto fail1;\n+    }\n+\n+#if TRACE_ALLOC\n+    printf(\"%s: Alloc %#x bytes @ h=%d\\n\", __func__, alloc_size, zp->vcsm_handle);\n+#endif\n+\n+    zp->numbytes = alloc_size;\n+    zp->pool = pool;\n+    return zp;\n+\n+fail1:\n+    av_free(zp);\n+fail0:\n+    return NULL;\n+}\n+\n+static void zc_pool_ent_free(ZcPoolEnt * const zp)\n+{\n+#if TRACE_ALLOC\n+    printf(\"%s: Free %#x bytes @ h=%d\\n\", __func__, zp->numbytes, zp->vcsm_handle);\n+#endif\n+\n+    if (zp->vcsm_handle != 0)\n+    {\n+        // VC addr & handle need no dealloc\n+        if (zp->map_arm != NULL)\n+            vcsm_unlock_hdl(zp->vcsm_handle);\n+        vcsm_free(zp->vcsm_handle);\n+    }\n+    av_free(zp);\n+}\n+\n+//----------------------------------------------------------------------------\n+//\n+// Pool functions\n+\n+static void zc_pool_free_ent_list(ZcPoolEnt * p)\n+{\n+    while (p != NULL)\n+    {\n+        ZcPoolEnt * const zp = p;\n+        p = p->next;\n+        zc_pool_ent_free(zp);\n+    }\n+}\n+\n+static void zc_pool_flush(ZcPool * const pool)\n+{\n+    ZcPoolEnt * p = pool->head;\n+    pool->head = NULL;\n+    pool->numbytes = ~0U;\n+    zc_pool_free_ent_list(p);\n+}\n+\n+static ZcPoolEnt * zc_pool_get_ent(ZcPool * const pool, const size_t req_bytes)\n+{\n+    ZcPoolEnt * zp = NULL;\n+    ZcPoolEnt * flush_list = NULL;\n+    size_t numbytes;\n+\n+    pthread_mutex_lock(&pool->lock);\n+\n+    numbytes = pool->numbytes;\n+\n+    // If size isn't close then dump the pool\n+    // Close in this context means within 128k\n+    if (req_bytes > numbytes || req_bytes + 0x20000 < numbytes)\n+    {\n+        flush_list = pool->head;\n+        pool->head = NULL;\n+        pool->numbytes = numbytes = req_bytes;\n+    }\n+    else if (pool->head != NULL)\n+    {\n+        zp = pool->head;\n+        pool->head = zp->next;\n+    }\n+\n+    pthread_mutex_unlock(&pool->lock);\n+\n+    zc_pool_free_ent_list(flush_list);\n+\n+    if (zp == NULL)\n+        zp = zc_pool_ent_alloc(pool, numbytes);\n+\n+    return zp;\n+}\n+\n+static void zc_pool_put_ent(ZcPoolEnt * const zp)\n+{\n+    ZcPool * const pool = zp == NULL ? NULL : zp->pool;\n+    if (zp != NULL)\n+    {\n+        pthread_mutex_lock(&pool->lock);\n+#if TRACE_ALLOC\n+        printf(\"%s: Recycle %#x, %#x\\n\", __func__, pool->numbytes, zp->numbytes);\n+#endif\n+\n+        if (pool->numbytes == zp->numbytes)\n+        {\n+            zp->next = pool->head;\n+            pool->head = zp;\n+            pthread_mutex_unlock(&pool->lock);\n+        }\n+        else\n+        {\n+            pthread_mutex_unlock(&pool->lock);\n+            zc_pool_ent_free(zp);\n+        }\n+    }\n+}\n+\n+static ZcPool *\n+zc_pool_new(void)\n+{\n+    ZcPool * const pool = av_mallocz(sizeof(*pool));\n+    if (pool == NULL)\n+        return NULL;\n+\n+    pool->numbytes = -1;\n+    pool->head = NULL;\n+    pthread_mutex_init(&pool->lock, NULL);\n+    return pool;\n+}\n+\n+static void\n+zc_pool_delete(ZcPool * const pool)\n+{\n+    if (pool != NULL)\n+    {\n+        pool->numbytes = -1;\n+        zc_pool_flush(pool);\n+        pthread_mutex_destroy(&pool->lock);\n+        av_free(pool);\n+    }\n+}\n+\n+//============================================================================\n+//\n+// ZC implementation using above pool implementation\n+//\n+// Fn table fns...\n+\n+static void zc_pool_free_v(void * v)\n+{\n+    zc_pool_put_ent(v);\n+}\n+\n+static unsigned int zc_pool_ent_vcsm_handle_v(void * v)\n+{\n+    ZcPoolEnt * zp = v;\n+    return zp->vcsm_handle;\n+}\n+\n+static unsigned int zc_pool_ent_vc_handle_v(void * v)\n+{\n+    ZcPoolEnt * zp = v;\n+    if (zp->vc_handle == 0)\n+    {\n+        if ((zp->vc_handle = vcsm_vc_hdl_from_hdl(zp->vcsm_handle)) == 0)\n+            av_log(NULL, AV_LOG_ERROR, \"%s: Failed to map VCSM handle %d to VC handle\\n\",\n+                   __func__, zp->vcsm_handle);\n+    }\n+    return zp->vc_handle;\n+}\n+\n+static void * zc_pool_ent_map_arm_v(void * v)\n+{\n+    ZcPoolEnt * zp = v;\n+    if (zp->map_arm == NULL)\n+    {\n+        if ((zp->map_arm = vcsm_lock(zp->vcsm_handle)) == NULL)\n+            av_log(NULL, AV_LOG_ERROR, \"%s: Failed to map VCSM handle %d to ARM address\\n\",\n+                   __func__, zp->vcsm_handle);\n+    }\n+    return zp->map_arm;\n+}\n+\n+static unsigned int zc_pool_ent_map_vc_v(void * v)\n+{\n+    ZcPoolEnt * zp = v;\n+    if (zp->map_vc == 0)\n+    {\n+        if ((zp->map_vc = vcsm_vc_addr_from_hdl(zp->vcsm_handle)) == 0)\n+            av_log(NULL, AV_LOG_ERROR, \"%s: Failed to map VCSM handle %d to VC address\\n\",\n+                   __func__, zp->vcsm_handle);\n+    }\n+    return zp->map_vc;\n+}\n+\n+static const av_rpi_zc_buf_fn_tab_t zc_pool_buf_fns = {\n+    .free        = zc_pool_free_v,\n+    .vcsm_handle = zc_pool_ent_vcsm_handle_v,\n+    .vc_handle   = zc_pool_ent_vc_handle_v,\n+    .map_arm     = zc_pool_ent_map_arm_v,\n+    .map_vc      = zc_pool_ent_map_vc_v,\n+};\n+\n+// ZC Env fns\n+\n+// Delete pool\n+// All buffers guaranteed freed by now\n+static void\n+zc_pool_delete_v(void * v)\n+{\n+    zc_pool_delete((ZcPool *)v);\n+    rpi_mem_gpu_uninit();\n+}\n+\n+// Allocate a new ZC buffer\n+static AVBufferRef *\n+zc_pool_buf_alloc(void * v, size_t size, const AVRpiZcFrameGeometry * geo)\n+{\n+    ZcPool * const pool = v;\n+    ZcPoolEnt *const zp = zc_pool_get_ent(pool, size);\n+    AVBufferRef * buf;\n+\n+    (void)geo;  // geo ignored here\n+\n+    if (zp == NULL) {\n+        av_log(NULL, AV_LOG_ERROR, \"zc_pool_alloc(%d) failed\\n\", size);\n+        goto fail0;\n+    }\n+\n+    if ((buf = av_rpi_zc_buf(size, 0, zp, &zc_pool_buf_fns)) == NULL)\n+    {\n+        av_log(NULL, AV_LOG_ERROR, \"av_rpi_zc_buf() failed\\n\");\n+        goto fail2;\n+    }\n+\n+    return buf;\n+\n+fail2:\n+    zc_pool_put_ent(zp);\n+fail0:\n+    return NULL;\n+}\n+\n+// Init wrappers - the public fns\n+\n+AVZcEnvPtr\n+av_rpi_zc_int_env_alloc(void * logctx)\n+{\n+    ZcEnv * zc;\n+    ZcPool * pool_env;\n+\n+    if (rpi_mem_gpu_init(0) < 0)\n+        return NULL;\n+\n+    if ((pool_env = zc_pool_new()) == NULL)\n+        goto fail1;\n+\n+    if ((zc = av_rpi_zc_env_alloc(logctx, pool_env, zc_pool_buf_alloc, zc_pool_delete_v)) == NULL)\n+        goto fail2;\n+\n+    return zc;\n+\n+fail2:\n+    zc_pool_delete(pool_env);\n+fail1:\n+    rpi_mem_gpu_uninit();\n+    return NULL;\n+}\n+\n+void\n+av_rpi_zc_int_env_freep(AVZcEnvPtr * zcp)\n+{\n+    const AVZcEnvPtr zc = *zcp;\n+    *zcp = NULL;\n+    if (zc != NULL)\n+        av_rpi_zc_env_release(zc);\n+}\n+\n+//============================================================================\n+//\n+// Geometry\n+//\n+// This is a separate chunck to the rest\n+\n+// Get mailbox fd - should be in a lock when called\n+// Rely on process close to close it\n+static int mbox_fd(void)\n+{\n+    static int fd = -1;\n+    if (fd != -1)\n+        return fd;\n+    return (fd = mbox_open());\n+}\n+\n+AVRpiZcFrameGeometry av_rpi_zc_frame_geometry(\n+    const int format, const unsigned int video_width, const unsigned int video_height)\n+{\n+    static pthread_mutex_t sand_lock = PTHREAD_MUTEX_INITIALIZER;\n+\n+    AVRpiZcFrameGeometry geo = {\n+        .format       = format,\n+        .video_width  = video_width,\n+        .video_height = video_height\n+    };\n+\n+    switch (format)\n+    {\n+        case AV_PIX_FMT_YUV420P:\n+            geo.stride_y = ((video_width + 32 + STRIDE_ROUND - 1) & ~(STRIDE_ROUND - 1)) | STRIDE_OR;\n+            geo.stride_c = geo.stride_y / 2;\n+            geo.height_y = (video_height + 32 + 31) & ~31;\n+            geo.height_c = geo.height_y / 2;\n+            geo.planes_c = 2;\n+            geo.stripes = 1;\n+            geo.bytes_per_pel = 1;\n+            geo.stripe_is_yc = 1;\n+            break;\n+\n+        case AV_PIX_FMT_YUV420P10:\n+            geo.stride_y = ((video_width * 2 + 64 + STRIDE_ROUND - 1) & ~(STRIDE_ROUND - 1)) | STRIDE_OR;\n+            geo.stride_c = geo.stride_y / 2;\n+            geo.height_y = (video_height + 32 + 31) & ~31;\n+            geo.height_c = geo.height_y / 2;\n+            geo.planes_c = 2;\n+            geo.stripes = 1;\n+            geo.bytes_per_pel = 2;\n+            geo.stripe_is_yc = 1;\n+            break;\n+\n+        case AV_PIX_FMT_SAND128:\n+        case AV_PIX_FMT_RPI4_8:\n+        {\n+            const unsigned int stripe_w = 128;\n+\n+            static VC_IMAGE_T img = {0};\n+\n+            // Given the overhead of calling the mailbox keep a stashed\n+            // copy as we will almost certainly just want the same numbers again\n+            // but that means we need a lock\n+            pthread_mutex_lock(&sand_lock);\n+\n+            if (img.width != video_width || img.height != video_height)\n+            {\n+                VC_IMAGE_T new_img = {\n+                    .type = VC_IMAGE_YUV_UV,\n+                    .width = video_width,\n+                    .height = video_height\n+                };\n+\n+                mbox_get_image_params(mbox_fd(), &new_img);\n+                img = new_img;\n+            }\n+\n+            geo.stride_y = stripe_w;\n+            geo.stride_c = stripe_w;\n+            geo.height_y = ((intptr_t)img.extra.uv.u - (intptr_t)img.image_data) / stripe_w;\n+            geo.height_c = img.pitch / stripe_w - geo.height_y;\n+            geo.stripe_is_yc = 1;\n+            if (geo.height_y * stripe_w > img.pitch)\n+            {\n+                // \"tall\" sand - all C blocks now follow Y\n+                geo.height_y = img.pitch / stripe_w;\n+                geo.height_c = geo.height_y;\n+                geo.stripe_is_yc = 0;\n+            }\n+            geo.planes_c = 1;\n+            geo.stripes = (video_width + stripe_w - 1) / stripe_w;\n+            geo.bytes_per_pel = 1;\n+\n+            pthread_mutex_unlock(&sand_lock);\n+#if 0\n+            printf(\"Req: %dx%d: stride=%d/%d, height=%d/%d, stripes=%d, img.pitch=%d\\n\",\n+                   video_width, video_height,\n+                   geo.stride_y, geo.stride_c,\n+                   geo.height_y, geo.height_c,\n+                   geo.stripes, img.pitch);\n+#endif\n+            av_assert0((int)geo.height_y > 0 && (int)geo.height_c > 0);\n+            av_assert0(geo.height_y >= video_height && geo.height_c >= video_height / 2);\n+            break;\n+        }\n+\n+        case AV_PIX_FMT_RPI4_10:\n+        {\n+            const unsigned int stripe_w = 128;  // bytes\n+\n+            static pthread_mutex_t sand_lock = PTHREAD_MUTEX_INITIALIZER;\n+            static VC_IMAGE_T img = {0};\n+\n+            // Given the overhead of calling the mailbox keep a stashed\n+            // copy as we will almost certainly just want the same numbers again\n+            // but that means we need a lock\n+            pthread_mutex_lock(&sand_lock);\n+\n+            if (img.width != video_width || img.height != video_height)\n+            {\n+                VC_IMAGE_T new_img = {\n+                    .type = VC_IMAGE_YUV10COL,\n+                    .width = video_width,\n+                    .height = video_height\n+                };\n+\n+                mbox_get_image_params(mbox_fd(), &new_img);\n+                img = new_img;\n+            }\n+\n+            geo.stride_y = stripe_w;\n+            geo.stride_c = stripe_w;\n+            geo.height_y = ((intptr_t)img.extra.uv.u - (intptr_t)img.image_data) / stripe_w;\n+            geo.height_c = img.pitch / stripe_w - geo.height_y;\n+            geo.planes_c = 1;\n+            geo.stripes = ((video_width * 4 + 2) / 3 + stripe_w - 1) / stripe_w;\n+            geo.bytes_per_pel = 1;\n+            geo.stripe_is_yc = 1;\n+\n+            pthread_mutex_unlock(&sand_lock);\n+\n+#if 0\n+            printf(\"Req: %dx%d: stride=%d/%d, height=%d/%d, stripes=%d, img.pitch=%d\\n\",\n+                   video_width, video_height,\n+                   geo.stride_y, geo.stride_c,\n+                   geo.height_y, geo.height_c,\n+                   geo.stripes, img.pitch);\n+#endif\n+            av_assert0((int)geo.height_y > 0 && (int)geo.height_c > 0);\n+            av_assert0(geo.height_y >= video_height && geo.height_c >= video_height / 2);\n+            break;\n+        }\n+\n+        case AV_PIX_FMT_SAND64_16:\n+        case AV_PIX_FMT_SAND64_10:\n+        {\n+            const unsigned int stripe_w = 128;  // bytes\n+\n+            static pthread_mutex_t sand_lock = PTHREAD_MUTEX_INITIALIZER;\n+            static VC_IMAGE_T img = {0};\n+\n+            // Given the overhead of calling the mailbox keep a stashed\n+            // copy as we will almost certainly just want the same numbers again\n+            // but that means we need a lock\n+            pthread_mutex_lock(&sand_lock);\n+\n+             if (img.width != video_width || img.height != video_height)\n+            {\n+                VC_IMAGE_T new_img = {\n+                    .type = VC_IMAGE_YUV_UV_16,\n+                    .width = video_width,\n+                    .height = video_height\n+                };\n+\n+                mbox_get_image_params(mbox_fd(), &new_img);\n+                img = new_img;\n+            }\n+\n+            geo.stride_y = stripe_w;\n+            geo.stride_c = stripe_w;\n+            geo.height_y = ((intptr_t)img.extra.uv.u - (intptr_t)img.image_data) / stripe_w;\n+            geo.height_c = img.pitch / stripe_w - geo.height_y;\n+            geo.planes_c = 1;\n+            geo.stripes = (video_width * 2 + stripe_w - 1) / stripe_w;\n+            geo.bytes_per_pel = 2;\n+            geo.stripe_is_yc = 1;\n+\n+            pthread_mutex_unlock(&sand_lock);\n+            break;\n+        }\n+\n+        default:\n+            break;\n+    }\n+    return geo;\n+}\n+\n+//============================================================================\n+//\n+// ZC Env fns\n+//\n+// Frame copy fns\n+\n+static AVBufferRef * zc_copy(const AVZcEnvPtr zc,\n+    const AVFrame * const src)\n+{\n+    AVFrame dest_frame;\n+    AVFrame * const dest = &dest_frame;\n+    unsigned int i;\n+    uint8_t * psrc, * pdest;\n+\n+    dest->format = src->format;\n+    dest->width = src->width;\n+    dest->height = src->height;\n+\n+    if (av_rpi_zc_get_buffer(zc, dest) != 0 ||\n+        av_rpi_zc_resolve_frame(dest, ZC_RESOLVE_ALLOC_VALID) != 0)\n+    {\n+        return NULL;\n+    }\n+\n+    for (i = 0, psrc = src->data[0], pdest = dest->data[0];\n+         i != dest->height;\n+         ++i, psrc += src->linesize[0], pdest += dest->linesize[0])\n+    {\n+        memcpy(pdest, psrc, dest->width);\n+    }\n+    for (i = 0, psrc = src->data[1], pdest = dest->data[1];\n+         i != dest->height / 2;\n+         ++i, psrc += src->linesize[1], pdest += dest->linesize[1])\n+    {\n+        memcpy(pdest, psrc, dest->width / 2);\n+    }\n+    for (i = 0, psrc = src->data[2], pdest = dest->data[2];\n+         i != dest->height / 2;\n+         ++i, psrc += src->linesize[2], pdest += dest->linesize[2])\n+    {\n+        memcpy(pdest, psrc, dest->width / 2);\n+    }\n+\n+    return dest->buf[0];\n+}\n+\n+\n+static AVBufferRef * zc_420p10_to_sand128(const AVZcEnvPtr zc,\n+    const AVFrame * const src)\n+{\n+    assert(0);\n+    return NULL;\n+}\n+\n+\n+static AVBufferRef * zc_sand64_16_to_sand128(const AVZcEnvPtr zc,\n+    const AVFrame * const src, const unsigned int src_bits)\n+{\n+    assert(0);\n+    return NULL;\n+}\n+\n+//----------------------------------------------------------------------------\n+//\n+// Public info extraction calls\n+\n+static void zc_buf_env_free_cb(void * opaque, uint8_t * data);\n+\n+static inline ZcBufEnv * pic_zbe_ptr(AVBufferRef *const buf)\n+{\n+    // Kludge where we check the free fn to check this is really\n+    // one of our buffers - can't think of a better way\n+    return buf == NULL || buf->buffer->free != zc_buf_env_free_cb ? NULL :\n+        av_buffer_get_opaque(buf);\n+}\n+\n+static inline GPU_MEM_PTR_T * pic_gm_ptr(AVBufferRef * const buf)\n+{\n+    // As gmem is the first el NULL should be preserved\n+    return &pic_zbe_ptr(buf)->gmem;\n+}\n+\n+unsigned int av_rpi_zc_vcsm_handle(const AVRpiZcRefPtr fr_ref)\n+{\n+    const GPU_MEM_PTR_T * const p = pic_gm_ptr(fr_ref);\n+    return p == NULL ? 0 : p->vcsm_handle;\n+}\n+\n+int av_rpi_zc_vc_handle(const AVRpiZcRefPtr fr_ref)\n+{\n+    const GPU_MEM_PTR_T * const p = pic_gm_ptr(fr_ref);\n+    return p == NULL ? -1 : p->vc_handle;\n+}\n+\n+int av_rpi_zc_offset(const AVRpiZcRefPtr fr_ref)\n+{\n+    const ZcBufEnv * const zbe = pic_zbe_ptr(fr_ref);\n+    return zbe == NULL ? 0 : zbe->offset;\n+}\n+\n+int av_rpi_zc_length(const AVRpiZcRefPtr fr_ref)\n+{\n+    const ZcBufEnv * const zbe = pic_zbe_ptr(fr_ref);\n+    return zbe == NULL ? 0 : zbe->size_pic;\n+}\n+\n+int av_rpi_zc_numbytes(const AVRpiZcRefPtr fr_ref)\n+{\n+    const GPU_MEM_PTR_T * const p = pic_gm_ptr(fr_ref);\n+    return p == NULL ? 0 : p->numbytes;\n+}\n+\n+const AVRpiZcFrameGeometry * av_rpi_zc_geometry(const AVRpiZcRefPtr fr_ref)\n+{\n+    const ZcBufEnv * const zbe = pic_zbe_ptr(fr_ref);\n+    return zbe == NULL ? NULL : &zbe->geo;\n+}\n+\n+AVRpiZcRefPtr av_rpi_zc_ref(void * const logctx, const AVZcEnvPtr zc,\n+    const AVFrame * const frame, const enum AVPixelFormat expected_format, const int maycopy)\n+{\n+    av_assert0(!maycopy || zc != NULL);\n+\n+    if (frame->format != AV_PIX_FMT_YUV420P &&\n+        frame->format != AV_PIX_FMT_YUV420P10 &&\n+        !av_rpi_is_sand_frame(frame))\n+    {\n+        av_log(logctx, AV_LOG_WARNING, \"%s: *** Format not SAND/YUV420P: %d\\n\", __func__, frame->format);\n+        return NULL;\n+    }\n+\n+    if (frame->buf[1] != NULL || frame->format != expected_format)\n+    {\n+#if RPI_ZC_SAND_8_IN_10_BUF\n+        if (frame->format == AV_PIX_FMT_SAND64_10 && expected_format == AV_PIX_FMT_SAND128 && frame->buf[RPI_ZC_SAND_8_IN_10_BUF] != NULL)\n+        {\n+//            av_log(s, AV_LOG_INFO, \"%s: --- found buf[4]\\n\", __func__);\n+            return av_buffer_ref(frame->buf[RPI_ZC_SAND_8_IN_10_BUF]);\n+        }\n+#endif\n+\n+        if (maycopy)\n+        {\n+            if (frame->buf[1] != NULL)\n+                av_log(logctx, AV_LOG_INFO, \"%s: *** Not a single buf frame: copying\\n\", __func__);\n+            else\n+                av_log(logctx, AV_LOG_INFO, \"%s: *** Unexpected frame format %d: copying to %d\\n\", __func__, frame->format, expected_format);\n+\n+            switch (frame->format)\n+            {\n+                case AV_PIX_FMT_YUV420P10:\n+                    return zc_420p10_to_sand128(zc, frame);\n+\n+                case AV_PIX_FMT_SAND64_10:\n+                    return zc_sand64_16_to_sand128(zc, frame, 10);\n+\n+                default:\n+                    return zc_copy(zc, frame);\n+            }\n+        }\n+        else\n+        {\n+            if (frame->buf[1] != NULL)\n+                av_log(logctx, AV_LOG_WARNING, \"%s: *** Not a single buf frame: buf[1] != NULL\\n\", __func__);\n+            else\n+                av_log(logctx, AV_LOG_INFO, \"%s: *** Unexpected frame format: %d != %d\\n\", __func__, frame->format, expected_format);\n+            return NULL;\n+        }\n+    }\n+\n+    if (pic_gm_ptr(frame->buf[0]) == NULL)\n+    {\n+        if (maycopy)\n+        {\n+            av_log(logctx, AV_LOG_INFO, \"%s: *** Not one of our buffers: copying\\n\", __func__);\n+            return zc_copy(zc, frame);\n+        }\n+        else\n+        {\n+            av_log(logctx, AV_LOG_WARNING, \"%s: *** Not one of our buffers: NULL\\n\", __func__);\n+            return NULL;\n+        }\n+    }\n+\n+    return av_buffer_ref(frame->buf[0]);\n+}\n+\n+void av_rpi_zc_unref(AVRpiZcRefPtr fr_ref)\n+{\n+    if (fr_ref != NULL)\n+    {\n+        av_buffer_unref(&fr_ref);\n+    }\n+}\n+\n+//----------------------------------------------------------------------------\n+\n+// Extract user environment from an AVBufferRef\n+void * av_rpi_zc_buf_v(AVBufferRef * const buf)\n+{\n+    ZcBufEnv * const zbe = pic_zbe_ptr(buf);\n+    if (zbe != NULL && zbe->user != NULL)\n+    {\n+        const ZcUserBufEnv * const zub = (const ZcUserBufEnv *)zbe->user->data;\n+        return zub == NULL ? NULL : zub->v;\n+    }\n+    return NULL;\n+}\n+\n+// AV buffer pre-free callback\n+static void zc_user_buf_free_cb(void * opaque, uint8_t * data)\n+{\n+    if (opaque != NULL)\n+    {\n+        ZcUserBufEnv * const zub = opaque;\n+\n+        if (zub->fn->free)\n+            zub->fn->free(zub->v);\n+\n+        av_free(zub);\n+    }\n+}\n+\n+static void zc_buf_env_free_cb(void * opaque, uint8_t * data)\n+{\n+    if (opaque != NULL)\n+    {\n+        ZcBufEnv * const zbe = opaque;\n+\n+        av_buffer_unref(&zbe->user);\n+\n+        if (zbe->zc != NULL)\n+            av_rpi_zc_env_release(zbe->zc);\n+\n+        pthread_cond_destroy(&zbe->cond);\n+        pthread_mutex_destroy(&zbe->lock);\n+        av_free(zbe);\n+    }\n+}\n+\n+\n+// Wrap the various ZC bits in an AV Buffer and resolve those things we want\n+// resolved now.\n+// Currently we resolve everything, but in future we might not\n+AVBufferRef * av_rpi_zc_buf(size_t numbytes, int addr_offset, void * v, const av_rpi_zc_buf_fn_tab_t * fn_tab)\n+{\n+    AVBufferRef *buf;\n+    ZcUserBufEnv * zub;\n+\n+    if ((zub = av_malloc(sizeof(ZcUserBufEnv))) == NULL)\n+        return NULL;\n+\n+    zub->fn = fn_tab;\n+    zub->v = v;\n+    zub->numbytes = numbytes;\n+    zub->offset = addr_offset;\n+\n+    if ((buf = av_buffer_create((uint8_t*)zub, sizeof(*zub), zc_user_buf_free_cb, zub, 0)) == NULL)\n+    {\n+        av_log(NULL, AV_LOG_ERROR, \"ZC: Failed av_buffer_create\\n\");\n+        av_free(zub);\n+        return NULL;\n+    }\n+\n+    return buf;\n+}\n+\n+int av_rpi_zc_resolve_buffer(AVBufferRef * const buf, const int alloc_mode)\n+{\n+    ZcBufEnv * const zbe = pic_zbe_ptr(buf);\n+\n+    if (zbe == NULL)\n+        return AVERROR(EINVAL);\n+\n+    if (alloc_mode == ZC_RESOLVE_FAIL && !zbe->is_valid)\n+        return AVERROR(EAGAIN);\n+\n+    if (alloc_mode == ZC_RESOLVE_WAIT_VALID && !zbe->is_valid)\n+    {\n+        pthread_mutex_lock(&zbe->lock);\n+        while (!zbe->is_valid)\n+            pthread_cond_wait(&zbe->cond, &zbe->lock);\n+        pthread_mutex_unlock(&zbe->lock);\n+    }\n+\n+    if (zbe->is_valid == ZC_BUF_NEVER)\n+        return AVERROR(EINVAL);\n+\n+    // Do alloc if we need it\n+    if (zbe->user == NULL)\n+    {\n+        ZcEnv * const zc = zbe->zc;\n+        const ZcUserBufEnv * zub;\n+\n+        av_assert0(alloc_mode == ZC_RESOLVE_ALLOC || alloc_mode == ZC_RESOLVE_ALLOC_VALID);\n+\n+        if ((zbe->user = zc->alloc_buf(zc->pool_env, zbe->size_pic, &zbe->geo)) == NULL)\n+        {\n+            av_log(NULL, AV_LOG_ERROR, \"rpi_get_display_buffer: Failed to get buffer from pool\\n\");\n+            goto fail;\n+        }\n+        zub = (const ZcUserBufEnv *)zbe->user->data;\n+\n+        // Track\n+\n+        zbe->offset = zub->offset;\n+        zbe->gmem.numbytes = zub->numbytes;\n+        if ((zbe->gmem.arm =  zub->fn->map_arm(zub->v)) == NULL)\n+        {\n+            av_log(NULL, AV_LOG_ERROR, \"ZC: Failed to lock vcsm_handle %u\\n\", zbe->gmem.vcsm_handle);\n+            goto fail;\n+        }\n+\n+        if ((zbe->gmem.vcsm_handle = zub->fn->vcsm_handle(zub->v)) == 0)\n+        {\n+            av_log(NULL, AV_LOG_ERROR, \"ZC: Failed to get vcsm_handle\\n\");\n+            goto fail;\n+        }\n+\n+        if ((zbe->gmem.vc_handle = zub->fn->vc_handle(zub->v)) == 0)\n+        {\n+            av_log(NULL, AV_LOG_ERROR, \"ZC: Failed to get vc handle from vcsm_handle %u\\n\", zbe->gmem.vcsm_handle);\n+            goto fail;\n+        }\n+        if ((zbe->gmem.vc = zub->fn->map_vc(zub->v)) == 0)\n+        {\n+            av_log(NULL, AV_LOG_ERROR, \"ZC: Failed to get vc addr from vcsm_handle %u\\n\", zbe->gmem.vcsm_handle);\n+            goto fail;\n+        }\n+\n+        buf->buffer->data = zbe->gmem.arm + zbe->offset;\n+        buf->buffer->size = zbe->size_pic;\n+\n+        // In this mode we shouldn't have anyone waiting for us\n+        // so no need to signal\n+        if (alloc_mode == ZC_RESOLVE_ALLOC_VALID)\n+            zbe->is_valid = 1;\n+    }\n+\n+    // Just overwrite - no point in testing\n+    buf->data = zbe->gmem.arm + zbe->offset;\n+    buf->size = zbe->size_pic;\n+    return 0;\n+\n+fail:\n+    av_buffer_unref(&zbe->user);\n+    return AVERROR(ENOMEM);\n+}\n+\n+int av_rpi_zc_resolve_frame(AVFrame * const frame, const int may_alloc)\n+{\n+    int rv;\n+\n+    // Do alloc if we need it\n+    if ((rv = av_rpi_zc_resolve_buffer(frame->buf[0], may_alloc)) != 0)\n+        return rv;\n+\n+    // If we are a framebuf copy then the alloc can be done but we haven't\n+    // imported its results yet\n+    if (frame->data[0] == NULL)\n+    {\n+        const ZcBufEnv * const zbe = pic_zbe_ptr(frame->buf[0]);\n+\n+        frame->linesize[0] = zbe->geo.stride_y;\n+        frame->linesize[1] = zbe->geo.stride_c;\n+        frame->linesize[2] = zbe->geo.stride_c;\n+        // abuse: linesize[3] = \"stripe stride\"\n+        // stripe_stride is NOT the stride between slices it is (that / geo.stride_y).\n+        // In a general case this makes the calculation an xor and multiply rather\n+        // than a divide and multiply\n+        if (zbe->geo.stripes > 1)\n+            frame->linesize[3] = zbe->geo.stripe_is_yc ? zbe->geo.height_y + zbe->geo.height_c : zbe->geo.height_y;\n+\n+        frame->data[0] = frame->buf[0]->data;\n+        frame->data[1] = frame->data[0] + (zbe->geo.stripe_is_yc ? zbe->size_y : zbe->size_y * zbe->geo.stripes);\n+        if (zbe->geo.planes_c > 1)\n+            frame->data[2] = frame->data[1] + zbe->size_c;\n+\n+        frame->extended_data = frame->data;\n+        // Leave extended buf alone\n+    }\n+\n+    return 0;\n+}\n+\n+int av_rpi_zc_set_valid_frame(AVFrame * const frame)\n+{\n+    ZcBufEnv * const zbe = pic_zbe_ptr(frame->buf[0]);\n+\n+    if (zbe == NULL)\n+        return AVERROR(EINVAL);\n+\n+    zbe->is_valid = ZC_BUF_VALID;\n+    pthread_cond_broadcast(&zbe->cond);\n+\n+    return 0;\n+}\n+\n+int av_rpi_zc_set_broken_frame(AVFrame * const frame)\n+{\n+    ZcBufEnv * const zbe = pic_zbe_ptr(frame->buf[0]);\n+\n+    if (zbe == NULL)\n+        return AVERROR(EINVAL);\n+\n+    zbe->is_valid = ZC_BUF_NEVER;\n+    pthread_cond_broadcast(&zbe->cond);\n+\n+    return 0;\n+}\n+\n+void av_rpi_zc_set_decoder_pool_size(ZcEnv *const zc, const unsigned int pool_size)\n+{\n+    zc->pool_size = pool_size;\n+}\n+\n+unsigned int av_rpi_zc_get_decoder_pool_size(ZcEnv *const zc)\n+{\n+    return zc->pool_size;\n+}\n+\n+int av_rpi_zc_get_buffer(ZcEnv *const zc, AVFrame * const frame)\n+{\n+#if 1\n+    ZcBufEnv * zbe = av_mallocz(sizeof(*zbe));\n+\n+    for (unsigned int i = 0; i < AV_NUM_DATA_POINTERS; i++) {\n+        frame->buf[i] = NULL;\n+        frame->data[i] = NULL;\n+        frame->linesize[i] = 0;\n+    }\n+\n+    if (zbe == NULL)\n+        return AVERROR(ENOMEM);\n+\n+    if ((frame->buf[0] = av_buffer_create((uint8_t *)zbe, sizeof(*zbe), zc_buf_env_free_cb, zbe, 0)) == NULL)\n+    {\n+        av_free(zbe);\n+        return AVERROR(ENOMEM);\n+    }\n+\n+    pthread_mutex_init(&zbe->lock, NULL);\n+    pthread_cond_init(&zbe->cond, NULL);\n+    zbe->zc = zc;\n+    atomic_fetch_add(&zc->refcount, 1);\n+\n+    zbe->geo = av_rpi_zc_frame_geometry(frame->format, frame->width, frame->height);  // Note geometry for later use\n+    zbe->size_y = zbe->geo.stride_y * zbe->geo.height_y;\n+    zbe->size_c = zbe->geo.stride_c * zbe->geo.height_c;\n+    zbe->size_pic = (zbe->size_y + zbe->size_c * zbe->geo.planes_c) * zbe->geo.stripes;\n+\n+#else\n+    const AVRpiZcFrameGeometry geo = av_rpi_zc_frame_geometry(frame->format, frame->width, frame->height);\n+    const unsigned int size_y = geo.stride_y * geo.height_y;\n+    const unsigned int size_c = geo.stride_c * geo.height_c;\n+    const unsigned int size_pic = (size_y + size_c * geo.planes_c) * geo.stripes;\n+    AVBufferRef * buf;\n+    unsigned int i;\n+\n+//    printf(\"Do local alloc: format=%#x, %dx%d: %u\\n\", frame->format, frame->width, frame->height, size_pic);\n+\n+    if ((buf = zc->alloc_buf(zc->pool_env, size_pic, &geo)) == NULL)\n+    {\n+        av_log(NULL, AV_LOG_ERROR, \"rpi_get_display_buffer: Failed to get buffer from pool\\n\");\n+        return AVERROR(ENOMEM);\n+    }\n+\n+    // Track\n+    atomic_fetch_add(&zc->refcount, 1);\n+    pic_zbe_ptr(buf)->zc = zc;\n+\n+    for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {\n+        frame->buf[i] = NULL;\n+        frame->data[i] = NULL;\n+        frame->linesize[i] = 0;\n+    }\n+\n+    frame->buf[0] = buf;\n+\n+    frame->linesize[0] = geo.stride_y;\n+    frame->linesize[1] = geo.stride_c;\n+    frame->linesize[2] = geo.stride_c;\n+    // abuse: linesize[3] = \"stripe stride\"\n+    // stripe_stride is NOT the stride between slices it is (that / geo.stride_y).\n+    // In a general case this makes the calculation an xor and multiply rather\n+    // than a divide and multiply\n+    if (geo.stripes > 1)\n+        frame->linesize[3] = geo.stripe_is_yc ? geo.height_y + geo.height_c : geo.height_y;\n+\n+    frame->data[0] = buf->data;\n+    frame->data[1] = frame->data[0] + (geo.stripe_is_yc ? size_y : size_y * geo.stripes);\n+    if (geo.planes_c > 1)\n+        frame->data[2] = frame->data[1] + size_c;\n+\n+    frame->extended_data = frame->data;\n+    // Leave extended buf alone\n+\n+#if RPI_ZC_SAND_8_IN_10_BUF != 0\n+    // *** If we intend to use this for real we will want a 2nd buffer pool\n+    frame->buf[RPI_ZC_SAND_8_IN_10_BUF] = zc_pool_buf_alloc(&zc->pool, size_pic);  // *** 2 * wanted size - kludge\n+#endif\n+#endif\n+\n+    return 0;\n+}\n+\n+void av_rpi_zc_env_release(const AVZcEnvPtr zc)\n+{\n+    const int n = atomic_fetch_add(&zc->refcount, -1);\n+    if (n == 1)  // was 1, now 0\n+    {\n+        zc->free_pool(zc->pool_env);\n+        av_free(zc);\n+    }\n+}\n+\n+AVZcEnvPtr av_rpi_zc_env_alloc(void * logctx,\n+                    void * pool_env,\n+                    av_rpi_zc_alloc_buf_fn_t * alloc_buf_fn,\n+                    av_rpi_zc_free_pool_fn_t * free_pool_fn)\n+{\n+    ZcEnv * zc;\n+\n+    if ((zc = av_mallocz(sizeof(ZcEnv))) == NULL)\n+    {\n+        av_log(logctx, AV_LOG_ERROR, \"av_rpi_zc_env_alloc: Context allocation failed\\n\");\n+        return NULL;\n+    }\n+\n+    *zc = (ZcEnv){\n+        .refcount = ATOMIC_VAR_INIT(1),\n+        .pool_env = pool_env,\n+        .alloc_buf = alloc_buf_fn,\n+        .free_pool = free_pool_fn,\n+        .pool_size = 0\n+    };\n+\n+    return zc;\n+}\n+\n+//============================================================================\n+//\n+// External ZC initialisation\n+\n+#define RPI_GET_BUFFER2 1\n+\n+\n+static int zc_get_buffer2(struct AVCodecContext *s, AVFrame *frame, int flags)\n+{\n+#if !RPI_GET_BUFFER2\n+    return avcodec_default_get_buffer2(s, frame, flags);\n+#else\n+    int rv;\n+\n+    if ((s->codec->capabilities & AV_CODEC_CAP_DR1) == 0)\n+    {\n+//        printf(\"Do default alloc: format=%#x\\n\", frame->format);\n+        rv = avcodec_default_get_buffer2(s, frame, flags);\n+    }\n+    else if (frame->format == AV_PIX_FMT_YUV420P ||\n+             av_rpi_is_sand_frame(frame))\n+    {\n+        if ((rv = av_rpi_zc_get_buffer(s->opaque, frame)) == 0)\n+            rv = av_rpi_zc_resolve_frame(frame, ZC_RESOLVE_ALLOC_VALID);\n+    }\n+    else\n+    {\n+        rv = avcodec_default_get_buffer2(s, frame, flags);\n+    }\n+\n+#if 0\n+    printf(\"%s: fmt:%d, %dx%d lsize=%d/%d/%d/%d data=%p/%p/%p bref=%p/%p/%p opaque[0]=%p\\n\", __func__,\n+        frame->format, frame->width, frame->height,\n+        frame->linesize[0], frame->linesize[1], frame->linesize[2], frame->linesize[3],\n+        frame->data[0], frame->data[1], frame->data[2],\n+        frame->buf[0], frame->buf[1], frame->buf[2],\n+        av_buffer_get_opaque(frame->buf[0]));\n+#endif\n+    return rv;\n+#endif\n+}\n+\n+int av_rpi_zc_in_use(const struct AVCodecContext * const s)\n+{\n+    return s->get_buffer2 == zc_get_buffer2;\n+}\n+\n+int av_rpi_zc_init2(struct AVCodecContext * const s,\n+                    void * pool_env,\n+                    av_rpi_zc_alloc_buf_fn_t * alloc_buf_fn,\n+                    av_rpi_zc_free_pool_fn_t * free_pool_fn)\n+{\n+    ZcEnv * zc;\n+\n+    av_assert0(!av_rpi_zc_in_use(s));\n+\n+    if ((zc = av_rpi_zc_env_alloc(s, pool_env, alloc_buf_fn, free_pool_fn)) == NULL)\n+        return AVERROR(ENOMEM);\n+\n+    zc->old = (ZcOldCtxVals){\n+        .opaque = s->opaque,\n+        .get_buffer2 = s->get_buffer2,\n+        .thread_safe_callbacks = s->thread_safe_callbacks\n+    };\n+\n+    s->opaque = zc;\n+    s->get_buffer2 = zc_get_buffer2;\n+    s->thread_safe_callbacks = 1;\n+    return 0;\n+}\n+\n+void av_rpi_zc_uninit2(struct AVCodecContext * const s)\n+{\n+    ZcEnv * const zc = s->opaque;\n+\n+    av_assert0(av_rpi_zc_in_use(s));\n+\n+    s->get_buffer2 = zc->old.get_buffer2;\n+    s->opaque = zc->old.opaque;\n+    s->thread_safe_callbacks = zc->old.thread_safe_callbacks;\n+\n+    av_rpi_zc_env_release(zc);\n+}\n+\ndiff --git a/libavcodec/rpi_zc.h b/libavcodec/rpi_zc.h\nnew file mode 100644\nindex 0000000000..f00a7c962c\n--- /dev/null\n+++ b/libavcodec/rpi_zc.h\n@@ -0,0 +1,228 @@\n+/*\n+Copyright (c) 2018 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox\n+*/\n+\n+#ifndef LIBAVCODEC_RPI_ZC_H\n+#define LIBAVCODEC_RPI_ZC_H\n+\n+// Zero-Copy frame code for RPi\n+// RPi needs Y/U/V planes to be contiguous for display.  By default\n+// ffmpeg will allocate separated planes so a memcpy is needed before\n+// display.  This code provides a method a making ffmpeg allocate a single\n+// bit of memory for the frame when can then be reference counted until\n+// display has finished with it.\n+\n+// Frame buffer number in which to stuff an 8-bit copy of a 16-bit frame\n+// 0 disables\n+// *** This option still in development\n+//     Only works if SAO active\n+//     Allocates buffers that are twice the required size\n+#define RPI_ZC_SAND_8_IN_10_BUF  0\n+\n+struct AVBufferRef;\n+struct AVFrame;\n+struct AVCodecContext;\n+enum AVPixelFormat;\n+\n+// \"Opaque\" pointer to whatever we are using as a buffer reference\n+typedef struct AVBufferRef * AVRpiZcRefPtr;\n+\n+struct AVZcEnv;\n+typedef struct AVZcEnv * AVZcEnvPtr;\n+\n+typedef struct AVRpiZcFrameGeometry\n+{\n+    unsigned int stride_y;  // Luma stride (bytes)\n+    unsigned int height_y;  // Luma height (lines)\n+    unsigned int stride_c;  // Chroma stride (bytes)\n+    unsigned int height_c;  // Chroma stride (lines)\n+    unsigned int planes_c;  // Chroma plane count (U, V = 2, interleaved = 1)\n+    unsigned int stripes;   // Number of stripes (sand)\n+    unsigned int bytes_per_pel;\n+    int stripe_is_yc;       // A single stripe is Y then C (false for tall sand)\n+\n+    int format;                 // Requested format\n+    unsigned int video_width;   // Requested width\n+    unsigned int video_height;  // Requested height\n+} AVRpiZcFrameGeometry;\n+\n+// Get expected MMAL geometry for a given format, width & height\n+AVRpiZcFrameGeometry av_rpi_zc_frame_geometry(\n+    const int format,\n+    const unsigned int video_width, const unsigned int video_height);\n+\n+//----------------------------------------------------------------------------\n+//\n+// Calls that extract info from a ZC frame whether internally or externally\n+// allocated\n+\n+// Generate a ZC reference to the buffer(s) in this frame\n+// If the buffer doesn't appear to be one allocated by ZC\n+// then the behaviour depends on maycopy:\n+//   If maycopy=0 then return NULL\n+//   If maycopy=1 && the src frame is in a form where we can easily copy\n+//     the data, then allocate a new buffer and copy the data into it\n+//   Otherwise return NULL\n+// If maycopy == 0 then ZC may be NULL\n+AVRpiZcRefPtr av_rpi_zc_ref(void * const logging_context, const AVZcEnvPtr zc,\n+    const struct AVFrame * const frame, const enum AVPixelFormat expected_format, const int maycopy);\n+\n+// Unreference the buffer refed/allocated by _zc_ref\n+// If fr_ref is NULL then this will NOP\n+void av_rpi_zc_unref(AVRpiZcRefPtr fr_ref);\n+\n+// Get the vc_handle from the frame ref\n+// Returns -1 if ref doesn't look valid\n+int av_rpi_zc_vc_handle(const AVRpiZcRefPtr fr_ref);\n+// Get the vcsm_handle from the frame ref\n+// Returns 0 if ref doesn't look valid\n+unsigned int av_rpi_zc_vcsm_handle(const AVRpiZcRefPtr fr_ref);\n+// Get offset from the start of the memory referenced\n+// by the vc_handle to valid data\n+int av_rpi_zc_offset(const AVRpiZcRefPtr fr_ref);\n+// Length of buffer data\n+int av_rpi_zc_length(const AVRpiZcRefPtr fr_ref);\n+// Get the number of bytes allocated from the frame ref\n+// Returns 0 if ref doesn't look valid\n+int av_rpi_zc_numbytes(const AVRpiZcRefPtr fr_ref);\n+// Geometry this frame was allocated with\n+const AVRpiZcFrameGeometry * av_rpi_zc_geometry(const AVRpiZcRefPtr fr_ref);\n+\n+//----------------------------------------------------------------------------\n+//\n+// Calls for external frame allocation\n+\n+// Callbacks registered in av_rpi_zc_init2\n+\n+// Callback to allocate a buf for a frame\n+// The frame itself is generated in the calling code\n+//\n+// Parameters:\n+//   pool_env  value passed to av-rpi_zc_init2\n+//   size      size wanted\n+//   geo       geometry of the frame to be allocated\n+// Returns:\n+//   NULL      Alloc failed\n+//   ptr       AVBufferBuf* of allocated buffer\n+//             In most cases av_rpi_zc_buf will be called by this function\n+//             and this will be the buf returned by that.\n+typedef AVBufferRef * av_rpi_zc_alloc_buf_fn_t(void * pool_env, size_t size,\n+                                               const AVRpiZcFrameGeometry * geo);\n+\n+// Callback once ffmpeg is completely done with this pool\n+// Called once all allocated buffers have been derefed and ffmpegs ref to this\n+// pool has been dropped\n+typedef void av_rpi_zc_free_pool_fn_t(void * pool_env);\n+\n+// Init ZC into a context\n+// Sets opaque, get_buffer2, thread_safe_callbacks\n+// Use if you want to allocate your own pools and/or create ZC buffers for\n+// all decoders\n+// RPI HEVC decoders will allocate appropriate VCSM buffers which can be taken\n+// apart by av_rpi_zc_xxx calls without this\n+int av_rpi_zc_init2(struct AVCodecContext * const s,\n+                    void * pool_env, av_rpi_zc_alloc_buf_fn_t * alloc_buf_fn,\n+                    av_rpi_zc_free_pool_fn_t * free_pool_fn);\n+\n+// Free ZC from a context\n+void av_rpi_zc_uninit2(struct AVCodecContext * const s);\n+\n+// Get minimum pool size in frames - valid by the time the first alloc request\n+// occurs.  Takes into account thread requests and DPB sizes derived from SPS\n+// rather than just adding a worst case DPB size.\n+unsigned int av_rpi_zc_get_decoder_pool_size(const AVZcEnvPtr zc);\n+\n+typedef struct av_rpi_zc_buf_fn_tab_s {\n+    // This AVBuffer is being freed by ffmpeg - return memory\n+    // to external pool. Memory may be, but need not be, unmapped.\n+    // v is the ptr passed in av_rpi_zc_buf\n+    void (* free)(void * v);\n+\n+    // Return appropriate handles / mappings\n+    // v is the ptr passed in av_rpi_zc_buf\n+    unsigned int (* vcsm_handle)(void * v);\n+    unsigned int (* vc_handle)(void * v);\n+    void * (* map_arm)(void * v);\n+    unsigned int (* map_vc)(void * v);\n+} av_rpi_zc_buf_fn_tab_t;\n+\n+// Allocate a ZC AVBufferRef and set its callback table\n+// Doesn't take a buffer address directly - relies on callbacks to return\n+// addresses as they are required.  Mappings need not be generated until\n+// the map callbacks are called but they should persist from then until\n+// the buffer is freed.\n+//\n+// Parameters:\n+//   numbytes    Size of the buffer\n+//   addr_offset Offset to first usable byte of buffer (for alignment)\n+//               normally 0\n+//   v           Pointer passed to callbacks\n+//   fn_tab      Function table\n+AVBufferRef * av_rpi_zc_buf(size_t numbytes, int addr_offset, void * v, const av_rpi_zc_buf_fn_tab_t * fn_tab);\n+\n+// Get v ptr set in in av_rpi_zc_buf\n+void * av_rpi_zc_buf_v(AVBufferRef * const buf);\n+\n+//----------------------------------------------------------------------------\n+//\n+// Mostly internal calls but might possibly be wanted by outside code\n+\n+void av_rpi_zc_int_env_freep(AVZcEnvPtr * zc);\n+AVZcEnvPtr av_rpi_zc_int_env_alloc(void * const logctx);\n+void av_rpi_zc_set_decoder_pool_size(const AVZcEnvPtr zc, const unsigned int pool_size);\n+\n+// Test to see if the context is using zc (checks get_buffer2)\n+int av_rpi_zc_in_use(const struct AVCodecContext * const s);\n+\n+// Get buffer generates placeholders for later alloc\n+int av_rpi_zc_get_buffer(const AVZcEnvPtr zc, AVFrame * const frame);\n+// Resolve actually does the alloc (noop if already alloced)\n+// Set data pointers on a buffer/frame that was copied before the alloc\n+// accured\n+#define ZC_RESOLVE_FAIL         0  // return error on invalid\n+#define ZC_RESOLVE_ALLOC        1  // alloc as invalid\n+#define ZC_RESOLVE_WAIT_VALID   2  // wait for valid\n+#define ZC_RESOLVE_ALLOC_VALID  3  // alloc as valid\n+int av_rpi_zc_resolve_buffer(AVBufferRef * const buf, const int may_alloc);\n+int av_rpi_zc_resolve_frame(AVFrame * const frame, const int may_alloc);\n+\n+int av_rpi_zc_set_valid_frame(AVFrame * const frame);\n+int av_rpi_zc_set_broken_frame(AVFrame * const frame);\n+\n+\n+\n+\n+AVZcEnvPtr av_rpi_zc_env_alloc(void * logctx,\n+                    void * pool_env,\n+                    av_rpi_zc_alloc_buf_fn_t * alloc_buf_fn,\n+                    av_rpi_zc_free_pool_fn_t * free_pool_fn);\n+void av_rpi_zc_env_release(const AVZcEnvPtr zc);\n+\n+\n+#endif\n+\ndiff --git a/libavcodec/rpi_zc_frames.h b/libavcodec/rpi_zc_frames.h\nnew file mode 100644\nindex 0000000000..9b7b6536a4\n--- /dev/null\n+++ b/libavcodec/rpi_zc_frames.h\n@@ -0,0 +1,142 @@\n+/*\n+Copyright (c) 2018 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox, Ben Avison\n+*/\n+\n+#ifndef RPI_ZC_FRAMES_H\n+#define RPI_ZC_FRAMES_H\n+\n+#define RPI_ONE_BUF 1\n+\n+#include \"rpi_mem.h\"  // for GPU_MEM_PTR_T\n+#include \"libavutil/frame.h\"\n+\n+#if !RPI_ONE_BUF\n+static inline uint32_t get_vc_address_y(const AVFrame * const frame) {\n+    GPU_MEM_PTR_T *p = av_buffer_pool_buffer_get_opaque(frame->buf[0]);\n+    return p->vc;\n+}\n+\n+static inline uint32_t get_vc_address_u(const AVFrame * const frame) {\n+    GPU_MEM_PTR_T *p = av_buffer_pool_buffer_get_opaque(frame->buf[1]);\n+    return p->vc;\n+}\n+\n+static inline uint32_t get_vc_address_v(const AVFrame * const frame) {\n+    GPU_MEM_PTR_T *p = av_buffer_pool_buffer_get_opaque(frame->buf[2]);\n+    return p->vc;\n+}\n+\n+static inline GPU_MEM_PTR_T get_gpu_mem_ptr_y(const AVFrame * const frame) {\n+    return *(GPU_MEM_PTR_T *)av_buffer_pool_buffer_get_opaque(frame->buf[0]);\n+}\n+\n+static inline GPU_MEM_PTR_T get_gpu_mem_ptr_u(const AVFrame * const frame) {\n+    return *(GPU_MEM_PTR_T *)av_buffer_pool_buffer_get_opaque(frame->buf[1]);\n+}\n+\n+static inline GPU_MEM_PTR_T get_gpu_mem_ptr_v(const AVFrame * const frame) {\n+    return *(GPU_MEM_PTR_T *)av_buffer_pool_buffer_get_opaque(frame->buf[2]);\n+}\n+\n+#else\n+\n+static inline int gpu_is_buf1(const AVFrame * const frame)\n+{\n+    return frame->buf[1] == NULL;\n+}\n+\n+static inline GPU_MEM_PTR_T * gpu_buf1_gmem(const AVFrame * const frame)\n+{\n+    return av_buffer_get_opaque(frame->buf[0]);\n+}\n+\n+static inline GPU_MEM_PTR_T * gpu_buf3_gmem(const AVFrame * const frame, const unsigned int n)\n+{\n+    return av_buffer_pool_buffer_get_opaque(frame->buf[n]);\n+}\n+\n+static inline uint32_t get_vc_address3(const AVFrame * const frame, const unsigned int n)\n+{\n+    const GPU_MEM_PTR_T * const gm = gpu_is_buf1(frame) ? gpu_buf1_gmem(frame) : gpu_buf3_gmem(frame, n);\n+    return gm->vc + (frame->data[n] - gm->arm);\n+}\n+\n+\n+static inline uint32_t get_vc_address_y(const AVFrame * const frame) {\n+    return get_vc_address3(frame, 0);\n+}\n+\n+static inline uint32_t get_vc_address_u(const AVFrame * const frame) {\n+    return get_vc_address3(frame, 1);\n+}\n+\n+static inline uint32_t get_vc_address_v(const AVFrame * const frame) {\n+    return get_vc_address3(frame, 2);\n+}\n+\n+#if 0\n+static inline GPU_MEM_PTR_T get_gpu_mem_ptr_y(const AVFrame * const frame) {\n+    if (gpu_is_buf1(frame))\n+    {\n+        GPU_MEM_PTR_T g = *gpu_buf1_gmem(frame);\n+        g.numbytes = frame->data[1] - frame->data[0];\n+        return g;\n+    }\n+    else\n+        return *gpu_buf3_gmem(frame, 0);\n+}\n+\n+static inline GPU_MEM_PTR_T get_gpu_mem_ptr_u(const AVFrame * const frame) {\n+    if (gpu_is_buf1(frame))\n+    {\n+        GPU_MEM_PTR_T g = *gpu_buf1_gmem(frame);\n+        g.arm += frame->data[1] - frame->data[0];\n+        g.vc += frame->data[1] - frame->data[0];\n+        g.numbytes = frame->data[2] - frame->data[1];  // chroma size\n+        return g;\n+    }\n+    else\n+        return *gpu_buf3_gmem(frame, 1);\n+}\n+\n+static inline GPU_MEM_PTR_T get_gpu_mem_ptr_v(const AVFrame * const frame) {\n+    if (gpu_is_buf1(frame))\n+    {\n+        GPU_MEM_PTR_T g = *gpu_buf1_gmem(frame);\n+        g.arm += frame->data[2] - frame->data[0];\n+        g.vc += frame->data[2] - frame->data[0];\n+        g.numbytes = frame->data[2] - frame->data[1];  // chroma size\n+        return g;\n+    }\n+    else\n+        return *gpu_buf3_gmem(frame, 2);\n+}\n+#endif\n+#endif\n+\n+#endif\ndiff --git a/libavcodec/rpivid_hevc.c b/libavcodec/rpivid_hevc.c\nnew file mode 100644\nindex 0000000000..85c5b46d75\n--- /dev/null\n+++ b/libavcodec/rpivid_hevc.c\n@@ -0,0 +1,2128 @@\n+// FFMPEG HEVC decoder hardware accelerator\n+// Andrew Holme, Argon Design Ltd\n+// Copyright (c) June 2017 Raspberry Pi Ltd\n+\n+#include <stdio.h>\n+#include <fcntl.h>\n+#include <pthread.h>\n+#include <semaphore.h>\n+#include <unistd.h>\n+#include <sys/mman.h>\n+\n+#include \"fftools/ffmpeg.h\"\n+#include \"libavutil/avassert.h\"\n+#include \"libavutil/imgutils.h\"\n+#include \"avcodec.h\"\n+#include \"hwconfig.h\"\n+#include \"decode.h\"\n+\n+#include \"hevc.h\"\n+#include \"hevcdec.h\"\n+#include \"rpi_zc.h\"\n+#include \"rpi_mem.h\"\n+#include \"rpi_zc_frames.h\"\n+#include \"rpi_mailbox.h\"\n+\n+\n+#define OPT_PHASE_TIMING 0      // Generate stats for phase usage\n+\n+#define OPT_EMU 0\n+\n+#define TRACE_DEV 0\n+#define TRACE_ENTRY 0\n+\n+#define NUM_SCALING_FACTORS 4064\n+\n+#define AXI_BASE64 0\n+\n+#define PROB_BACKUP ((20<<12) + (20<<6) + (0<<0))\n+#define PROB_RELOAD ((20<<12) + (20<<0) + (0<<6))\n+\n+#define RPIVID_COL_PICS 17                 // 16 ref & current\n+\n+#define RPIVID_BITBUFS          2          // Bit + Cmd bufs (phase 0 & 1)\n+#define RPIVID_BITBUF_SIZE      (4 << 20)  // Bit + Cmd buf size\n+\n+#define RPIVID_COEFFBUFS        3          // PU + Coeff bufs (phase 1 & 2)\n+#define RPIVID_COEFFBUF_SIZE    (16 << 20) // PU + Coeff buf size\n+\n+//////////////////////////////////////////////////////////////////////////////\n+//\n+// Register offsets\n+\n+#define RPI_SPS0         0\n+#define RPI_SPS1         4\n+#define RPI_PPS          8\n+#define RPI_SLICE        12\n+#define RPI_TILESTART    16\n+#define RPI_TILEEND      20\n+#define RPI_SLICESTART   24\n+#define RPI_MODE         28\n+#define RPI_LEFT0        32\n+#define RPI_LEFT1        36\n+#define RPI_LEFT2        40\n+#define RPI_LEFT3        44\n+#define RPI_QP           48\n+#define RPI_CONTROL      52\n+#define RPI_STATUS       56\n+#define RPI_VERSION      60\n+#define RPI_BFBASE       64\n+#define RPI_BFNUM        68\n+#define RPI_BFCONTROL    72\n+#define RPI_BFSTATUS     76\n+#define RPI_PUWBASE      80\n+#define RPI_PUWSTRIDE    84\n+#define RPI_COEFFWBASE   88\n+#define RPI_COEFFWSTRIDE 92\n+#define RPI_SLICECMDS    96\n+#define RPI_BEGINTILEEND 100\n+#define RPI_TRANSFER     104\n+#define RPI_CFBASE       108\n+#define RPI_CFNUM        112\n+#define RPI_CFSTATUS     116\n+\n+#define RPI_PURBASE       0x8000\n+#define RPI_PURSTRIDE     0x8004\n+#define RPI_COEFFRBASE    0x8008\n+#define RPI_COEFFRSTRIDE  0x800C\n+#define RPI_NUMROWS       0x8010\n+#define RPI_CONFIG2       0x8014\n+#define RPI_OUTYBASE      0x8018\n+#define RPI_OUTYSTRIDE    0x801C\n+#define RPI_OUTCBASE      0x8020\n+#define RPI_OUTCSTRIDE    0x8024\n+#define RPI_STATUS2       0x8028\n+#define RPI_FRAMESIZE     0x802C\n+#define RPI_MVBASE        0x8030\n+#define RPI_MVSTRIDE      0x8034\n+#define RPI_COLBASE       0x8038\n+#define RPI_COLSTRIDE     0x803C\n+#define RPI_CURRPOC       0x8040\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+// Unused but left here to illustrate the diffrences between FFmpegs prob\n+// structure and the rpivid one\n+\n+struct FFM_PROB {\n+    uint8_t  sao_merge_flag                   [ 1];\n+    uint8_t  sao_type_idx                     [ 1];\n+    uint8_t  split_coding_unit_flag           [ 3];\n+    uint8_t  cu_transquant_bypass_flag        [ 1];\n+    uint8_t  skip_flag                        [ 3];\n+    uint8_t  cu_qp_delta                      [ 3];\n+    uint8_t  pred_mode_flag                   [ 1];\n+    uint8_t  part_mode                        [ 4];\n+    uint8_t  prev_intra_luma_pred_flag        [ 1];\n+    uint8_t  intra_chroma_pred_mode           [ 2];\n+    uint8_t  merge_flag                       [ 1];\n+    uint8_t  merge_idx                        [ 1];\n+    uint8_t  inter_pred_idc                   [ 5];\n+    uint8_t  ref_idx_l0                       [ 2];\n+    uint8_t  ref_idx_l1                       [ 2];\n+    uint8_t  abs_mvd_greater0_flag            [ 2];\n+    uint8_t  abs_mvd_greater1_flag            [ 2];\n+    uint8_t  mvp_lx_flag                      [ 1];\n+    uint8_t  no_residual_data_flag            [ 1];\n+    uint8_t  split_transform_flag             [ 3];\n+    uint8_t  cbf_luma                         [ 2];\n+    uint8_t  cbf_cb_cr                        [ 4];\n+    uint8_t  transform_skip_flag/*[][]*/      [ 2];\n+    uint8_t  explicit_rdpcm_flag/*[][]*/      [ 2];\n+    uint8_t  explicit_rdpcm_dir_flag/*[][]*/  [ 2];\n+    uint8_t  last_significant_coeff_x_prefix  [18];\n+    uint8_t  last_significant_coeff_y_prefix  [18];\n+    uint8_t  significant_coeff_group_flag     [ 4];\n+    uint8_t  significant_coeff_flag           [44];\n+    uint8_t  coeff_abs_level_greater1_flag    [24];\n+    uint8_t  coeff_abs_level_greater2_flag    [ 6];\n+    uint8_t  log2_res_scale_abs               [ 8];\n+    uint8_t  res_scale_sign_flag              [ 2];\n+    uint8_t  cu_chroma_qp_offset_flag         [ 1];\n+    uint8_t  cu_chroma_qp_offset_idx          [ 1];\n+} __attribute__((packed));\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+struct RPI_PROB {\n+    uint8_t  SAO_MERGE_FLAG             [ 1];\n+    uint8_t  SAO_TYPE_IDX               [ 1];\n+    uint8_t  SPLIT_FLAG                 [ 3];\n+    uint8_t  CU_SKIP_FLAG               [ 3];\n+    uint8_t  CU_TRANSQUANT_BYPASS_FLAG  [ 1];\n+    uint8_t  PRED_MODE                  [ 1];\n+    uint8_t  PART_SIZE                  [ 4];\n+    uint8_t  INTRA_PRED_MODE            [ 1];\n+    uint8_t  CHROMA_PRED_MODE           [ 1];\n+    uint8_t  MERGE_FLAG_EXT             [ 1];\n+    uint8_t  MERGE_IDX_EXT              [ 1];\n+    uint8_t  INTER_DIR                  [ 5];\n+    uint8_t  REF_PIC                    [ 2];\n+    uint8_t  MVP_IDX                    [ 1];\n+    uint8_t  MVD                        [ 2];\n+    uint8_t  QT_ROOT_CBF                [ 1];\n+    uint8_t  TRANS_SUBDIV_FLAG          [ 3];\n+    uint8_t  QT_CBF                     [ 6];\n+    uint8_t  DQP                        [ 2];\n+    uint8_t  ONE_FLAG                   [24];\n+    uint8_t  LASTX                      [18];\n+    uint8_t  LASTY                      [18];\n+    uint8_t  SIG_CG_FLAG                [ 4];\n+    uint8_t  ABS_FLAG                   [ 6];\n+    uint8_t  TRANSFORMSKIP_FLAG         [ 2];\n+    uint8_t  SIG_FLAG                   [42];\n+    uint8_t  SIG_FLAG_unused            [ 2];\n+} __attribute__((packed));\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+struct RPI_CMD {\n+    uint32_t addr;\n+    uint32_t data;\n+} __attribute__((packed));\n+\n+struct RPI_BIT {\n+    int         cmd;\n+    const void *ptr;\n+    int         len;\n+};\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+struct RPI_T;\n+\n+// Actual addressability is 38bits but we can only alloc in the bottom 32\n+// currently - when passed to rpivid h/w the address is always >> 6 so will\n+// fit in 32 bit there\n+// At some point we may weant to make this uint64_t\n+typedef uint32_t vid_vc_addr_t;\n+\n+typedef enum rpivid_decode_state_e {\n+    RPIVID_DECODE_NEW = 0,\n+    RPIVID_DECODE_START,\n+    RPIVID_DECODE_SLICE,\n+    RPIVID_DECODE_END,\n+} rpivid_decode_state_t;\n+\n+#define RPI_PROB_VALS 154U\n+#define RPI_PROB_ARRAY_SIZE ((154 + 3) & ~3)\n+\n+typedef struct dec_env_s {\n+    const AVCodecContext * avctx;\n+\n+    rpivid_decode_state_t state;\n+    unsigned int    decode_order;\n+\n+    int             phase_no;           // Current phase (i.e. the last one we waited for)\n+    struct dec_env_s * phase_wait_q_next;\n+    sem_t           phase_wait;\n+\n+    struct RPI_BIT *bit_fifo;\n+    struct RPI_CMD *cmd_fifo;\n+    unsigned int    bit_len, bit_max;\n+    unsigned int    cmd_len, cmd_max;\n+    unsigned int    num_slice_msgs;\n+    unsigned int    PicWidthInCtbsY;\n+    unsigned int    PicHeightInCtbsY;\n+    unsigned int    dpbno_col;\n+    uint32_t        reg_slicestart;\n+    unsigned int    wpp_entry_x;\n+    unsigned int    wpp_entry_y;\n+\n+    const uint8_t * nal_buffer;\n+    size_t          nal_size;\n+\n+    uint16_t        slice_msgs[2*HEVC_MAX_REFS*8+3];\n+    uint8_t         scaling_factors[NUM_SCALING_FACTORS];\n+//    unsigned int    RefPicList[2][HEVC_MAX_REFS];\n+} dec_env_t;\n+\n+#define RPIVID_PHASES 3\n+#define RPIVID_PHASE_NEW (RPIVID_PHASES) // Phase before we have inced decode order\n+#define RPIVID_PHASE_START (-1)          // Phase after we have inced decode_order\n+\n+#if OPT_PHASE_TIMING\n+static const unsigned int time_thresholds[8] = {\n+    10, 15, 20, 30, 45, 60, 75, 90\n+};\n+#endif\n+\n+typedef struct phase_wait_env_s {\n+    unsigned int    last_order;\n+    dec_env_t *     q;\n+#if OPT_PHASE_TIMING\n+    uint64_t phase_time;\n+    uint64_t max_phase_time;\n+    uint64_t time_in_phase;\n+    uint64_t time_out_phase;\n+    unsigned int max_time_decode_order;\n+    unsigned int time_bins[9];\n+    unsigned int time_bins3[9];\n+    unsigned int time_bins5[9];\n+    uint64_t time_stash[16];\n+    unsigned int i3;\n+#endif\n+} phase_wait_env_t;                      // Single linked list of threads waiting for this phase\n+\n+typedef struct RPI_T {\n+    atomic_int      ref_count;\n+    sem_t           ref_zero;\n+\n+    dec_env_t **    dec_envs;\n+    AVZcEnvPtr      zc;\n+\n+    pthread_mutex_t phase_lock;\n+    phase_wait_env_t phase_reqs[RPIVID_PHASES];\n+\n+    volatile uint32_t * regs;\n+    volatile uint32_t * ints;\n+\n+    GPU_MEM_PTR_T   gcolbuf;\n+    unsigned int    col_stride;\n+    size_t          col_picsize;\n+\n+    unsigned int    bitbuf_no;\n+    sem_t           bitbuf_sem;\n+    GPU_MEM_PTR_T   gbitbufs[RPIVID_BITBUFS];\n+\n+    unsigned int    max_pu_msgs;\n+    unsigned int    coeffbuf_no;\n+    sem_t           coeffbuf_sem;\n+    GPU_MEM_PTR_T   gcoeffbufs[RPIVID_COEFFBUFS];\n+\n+    unsigned int    decode_order;\n+    int             mbox_fd;\n+    int             gpu_init_type;\n+} RPI_T;\n+\n+#if OPT_PHASE_TIMING\n+static uint64_t tus64(void)\n+{\n+    struct timespec ts;\n+    clock_gettime(CLOCK_MONOTONIC, &ts);\n+    return (uint64_t)ts.tv_sec * 1000000 + ts.tv_nsec / 1000;\n+}\n+#endif\n+\n+static inline unsigned int rnd64(unsigned int x)\n+{\n+    return (x + 63) & ~63;\n+}\n+\n+static inline int rpi_sem_wait(sem_t * const sem)\n+{\n+    int rv;\n+    while ((rv = sem_wait(sem)) != 0 && errno == EINTR)\n+        /* Loop */;\n+    return rv;\n+}\n+\n+//============================================================================\n+\n+#define REGS_NAME \"/dev/rpivid-hevcmem\"\n+#define REGS_SIZE 0x10000\n+#define INTS_NAME \"/dev/rpivid-intcmem\"\n+#define INTS_SIZE 0x10000  // 4 is probably enough but we are going to alloc a page anyway\n+\n+static volatile uint32_t * map_dev(AVCodecContext * const avctx, const char * const dev_name, size_t size)\n+{\n+    void *gpio_map;\n+    int  mem_fd;\n+\n+    /* open /dev/mem */\n+    if ((mem_fd = open(dev_name, O_RDWR|O_SYNC) ) < 0) {\n+        av_log(avctx, AV_LOG_WARNING, \"can't open %s\\n\", dev_name);\n+        return NULL;\n+    }\n+\n+    // Now map it\n+    gpio_map = mmap(\n+       NULL,\n+       size,\n+       PROT_READ|PROT_WRITE,\n+       MAP_SHARED,\n+       mem_fd,\n+       0\n+    );\n+\n+    close(mem_fd);  // No longer need the FD\n+\n+    if (gpio_map == MAP_FAILED) {\n+        av_log(avctx, AV_LOG_WARNING, \"GPIO mapping failed\");\n+        return NULL;\n+    }\n+\n+    return (volatile uint32_t *)gpio_map;\n+}\n+\n+static void unmap_devp(volatile uint32_t ** const p_gpio_map, size_t size)\n+{\n+    volatile uint32_t * const gpio_map = *p_gpio_map;\n+    if (gpio_map != NULL) {\n+        *p_gpio_map = NULL;\n+        munmap((void *)gpio_map, size);\n+    }\n+}\n+\n+#define MANGLE(x) ((x) &~0xc0000000)          // ** If x is ever a 64 bit thing this will need fixing!\n+#define MANGLE64(x) (uint32_t)(MANGLE(x)>>6)\n+\n+static inline void apb_write_vc_addr(const RPI_T *const rpi, const uint32_t addr, const vid_vc_addr_t data)\n+{\n+#if TRACE_DEV\n+    printf(\"W %x %08x\\n\", addr, MANGLE64(data));\n+#endif\n+\n+    rpi->regs[addr >> 2] = MANGLE64(data);\n+}\n+\n+static inline void apb_write_vc_len(const RPI_T *const rpi, const uint32_t addr, const unsigned int data)\n+{\n+#if TRACE_DEV\n+    printf(\"W %x %08x\\n\", addr, data >> 6);\n+#endif\n+\n+    rpi->regs[addr >> 2] = data >> 6;  // ?? rnd64 - but not currently needed\n+}\n+\n+static inline void apb_write(const RPI_T * const rpi, const uint32_t addr, const uint32_t data)\n+{\n+#if TRACE_DEV\n+    printf(\"W %x %08x\\n\", addr, data);\n+#endif\n+\n+    rpi->regs[addr >> 2] = data;\n+}\n+\n+static inline uint32_t apb_read(const RPI_T * const rpi, const uint32_t addr)\n+{\n+    const uint32_t v = rpi->regs[addr >> 2];\n+#if TRACE_DEV\n+    printf(\"R %x (=%x)\\n\", addr, v);\n+#endif\n+    return v;\n+}\n+\n+#define ARG_IC_ICTRL_ACTIVE1_INT_SET                   0x00000001\n+#define ARG_IC_ICTRL_ACTIVE1_EDGE_SET                  0x00000002\n+#define ARG_IC_ICTRL_ACTIVE1_EN_SET                    0x00000004\n+#define ARG_IC_ICTRL_ACTIVE1_STATUS_SET                0x00000008\n+#define ARG_IC_ICTRL_ACTIVE2_INT_SET                   0x00000010\n+#define ARG_IC_ICTRL_ACTIVE2_EDGE_SET                  0x00000020\n+#define ARG_IC_ICTRL_ACTIVE2_EN_SET                    0x00000040\n+#define ARG_IC_ICTRL_ACTIVE2_STATUS_SET                0x00000080\n+\n+static inline void int_wait(const RPI_T * const rpi, const unsigned int phase)\n+{\n+    const uint32_t mask_reset = phase == 1 ? ~ARG_IC_ICTRL_ACTIVE2_INT_SET : ~ARG_IC_ICTRL_ACTIVE1_INT_SET;\n+    const uint32_t mask_done = phase == 1 ? ARG_IC_ICTRL_ACTIVE1_INT_SET : ARG_IC_ICTRL_ACTIVE2_INT_SET;\n+    uint32_t ival;\n+    while (((ival = rpi->ints[0]) & mask_done) == 0) {\n+        usleep(1000);\n+    }\n+    rpi->ints[0] = ival & mask_reset;\n+}\n+\n+#if TRACE_DEV && 0\n+static void apb_dump_regs(const RPI_T * const rpi, uint16_t addr, int num) {\n+    int i;\n+\n+    for (i=0; i<num; i++)\n+    {\n+        if ((i%4)==0)\n+          printf(\"%08x: \", 0x7eb00000 + addr + 4*i);\n+\n+        printf(\"%08x\", rpi->regs[(addr>>2)+i]);\n+\n+        if ((i%4)==3 || i+1 == num)\n+            printf(\"\\n\");\n+        else\n+            printf(\" \");\n+    }\n+}\n+\n+static void axi_dump(const dec_env_t * const de, uint64_t addr, uint32_t size) {\n+    int i;\n+\n+    for (i=0; i<size>>2; i++)\n+    {\n+        if ((i%4)==0)\n+            printf(\"%08x: \", MANGLE(de->gbuf.vc) + (uint32_t)addr + 4*i);\n+\n+        printf(\"%08x\", ((uint32_t*)de->gbuf.arm)[(addr>>2)+i]);\n+\n+        if ((i%4)==3 || i+1 == size>>2)\n+            printf(\"\\n\");\n+        else\n+            printf(\" \");\n+    }\n+}\n+#endif\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+static inline size_t round_up_size(const size_t x)\n+{\n+    /* Admit no size < 256 */\n+    const unsigned int n = x < 256 ? 8 : av_log2(x) - 1;\n+\n+    return x >= (3 << n) ? 4 << n : (3 << n);\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+// Scaling factors\n+\n+static void expand_scaling_list(\n+    const unsigned int sizeID,\n+    const unsigned int matrixID,\n+    uint8_t * const dst0,\n+    const uint8_t * const src0,\n+    uint8_t dc)\n+{\n+    switch (sizeID) {\n+        case 0:\n+            memcpy(dst0, src0, 16);\n+            break;\n+        case 1:\n+            memcpy(dst0, src0, 64);\n+            break;\n+        case 2:\n+        {\n+            uint8_t * d = dst0;\n+            for (unsigned int y=0; y != 16; y++) {\n+                const uint8_t * s = src0 + (y >> 1) * 8;\n+                for (unsigned int x = 0; x != 8; ++x) {\n+                    *d++ = *s;\n+                    *d++ = *s++;\n+                }\n+            }\n+            dst0[0] = dc;\n+            break;\n+        }\n+        default:\n+        {\n+            uint8_t * d = dst0;\n+            for (unsigned int y=0; y != 32; y++) {\n+                const uint8_t * s = src0 + (y >> 2) * 8;\n+                for (unsigned int x = 0; x != 8; ++x) {\n+                    *d++ = *s;\n+                    *d++ = *s;\n+                    *d++ = *s;\n+                    *d++ = *s++;\n+                }\n+            }\n+            dst0[0] = dc;\n+            break;\n+        }\n+    }\n+}\n+\n+static void populate_scaling_factors(dec_env_t * const de, const HEVCContext * const s) {\n+    // Array of constants for scaling factors\n+    static const uint32_t scaling_factor_offsets[4][6] = {\n+        // MID0    MID1    MID2    MID3    MID4    MID5\n+        {0x0000, 0x0010, 0x0020, 0x0030, 0x0040, 0x0050},   // SID0 (4x4)\n+        {0x0060, 0x00A0, 0x00E0, 0x0120, 0x0160, 0x01A0},   // SID1 (8x8)\n+        {0x01E0, 0x02E0, 0x03E0, 0x04E0, 0x05E0, 0x06E0},   // SID2 (16x16)\n+        {0x07E0,      0,      0, 0x0BE0,      0,      0}};  // SID3 (32x32)\n+\n+    // ffmpeg places SID3,MID1 where matrixID 3 normally is\n+    const ScalingList * const sl =\n+        s->ps.pps->scaling_list_data_present_flag ? &s->ps.pps->scaling_list\n+                                                  : &s->ps.sps->scaling_list;\n+    unsigned int mid;\n+\n+    for (mid=0; mid<6; mid++)\n+        expand_scaling_list(0, mid,\n+            de->scaling_factors + scaling_factor_offsets[0][mid],\n+            sl->sl[0][mid], 0);\n+    for (mid=0; mid<6; mid++)\n+        expand_scaling_list(1, mid,\n+            de->scaling_factors + scaling_factor_offsets[1][mid],\n+            sl->sl[1][mid], 0);\n+    for (mid=0; mid<6; mid++)\n+        expand_scaling_list(2, mid,\n+            de->scaling_factors + scaling_factor_offsets[2][mid],\n+            sl->sl[2][mid],\n+            sl->sl_dc[0][mid]);\n+    // second scaling matrix for 32x32 is at matrixID 3 not 1 in ffmpeg\n+    for (mid=0; mid<6; mid += 3)\n+        expand_scaling_list(3, mid,\n+            de->scaling_factors + scaling_factor_offsets[3][mid],\n+            sl->sl[3][mid],\n+            sl->sl_dc[1][mid]);\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+// Probabilities\n+\n+static const uint8_t prob_init[3][156] = {\n+\t{\n+\t\t 153, 200, 139, 141, 157, 154, 154, 154,\n+\t\t 154, 154, 184, 154, 154, 154, 184,  63,\n+\t\t 154, 154, 154, 154, 154, 154, 154, 154,\n+\t\t 154, 154, 154, 154, 154, 153, 138, 138,\n+\t\t 111, 141,  94, 138, 182, 154, 154, 154,\n+\t\t 140,  92, 137, 138, 140, 152, 138, 139,\n+\t\t 153,  74, 149,  92, 139, 107, 122, 152,\n+\t\t 140, 179, 166, 182, 140, 227, 122, 197,\n+\t\t 110, 110, 124, 125, 140, 153, 125, 127,\n+\t\t 140, 109, 111, 143, 127, 111,  79, 108,\n+\t\t 123,  63, 110, 110, 124, 125, 140, 153,\n+\t\t 125, 127, 140, 109, 111, 143, 127, 111,\n+\t\t  79, 108, 123,  63,  91, 171, 134, 141,\n+\t\t 138, 153, 136, 167, 152, 152, 139, 139,\n+\t\t 111, 111, 125, 110, 110,  94, 124, 108,\n+\t\t 124, 107, 125, 141, 179, 153, 125, 107,\n+\t\t 125, 141, 179, 153, 125, 107, 125, 141,\n+\t\t 179, 153, 125, 140, 139, 182, 182, 152,\n+\t\t 136, 152, 136, 153, 136, 139, 111, 136,\n+\t\t 139, 111,   0,   0,\t},\n+\t{\n+\t\t 153, 185, 107, 139, 126, 197, 185, 201,\n+\t\t 154, 149, 154, 139, 154, 154, 154, 152,\n+\t\t 110, 122,  95,  79,  63,  31,  31, 153,\n+\t\t 153, 168, 140, 198,  79, 124, 138,  94,\n+\t\t 153, 111, 149, 107, 167, 154, 154, 154,\n+\t\t 154, 196, 196, 167, 154, 152, 167, 182,\n+\t\t 182, 134, 149, 136, 153, 121, 136, 137,\n+\t\t 169, 194, 166, 167, 154, 167, 137, 182,\n+\t\t 125, 110,  94, 110,  95,  79, 125, 111,\n+\t\t 110,  78, 110, 111, 111,  95,  94, 108,\n+\t\t 123, 108, 125, 110,  94, 110,  95,  79,\n+\t\t 125, 111, 110,  78, 110, 111, 111,  95,\n+\t\t  94, 108, 123, 108, 121, 140,  61, 154,\n+\t\t 107, 167,  91, 122, 107, 167, 139, 139,\n+\t\t 155, 154, 139, 153, 139, 123, 123,  63,\n+\t\t 153, 166, 183, 140, 136, 153, 154, 166,\n+\t\t 183, 140, 136, 153, 154, 166, 183, 140,\n+\t\t 136, 153, 154, 170, 153, 123, 123, 107,\n+\t\t 121, 107, 121, 167, 151, 183, 140, 151,\n+\t\t 183, 140,   0,   0,\t},\n+\t{\n+\t\t 153, 160, 107, 139, 126, 197, 185, 201,\n+\t\t 154, 134, 154, 139, 154, 154, 183, 152,\n+\t\t 154, 137,  95,  79,  63,  31,  31, 153,\n+\t\t 153, 168, 169, 198,  79, 224, 167, 122,\n+\t\t 153, 111, 149,  92, 167, 154, 154, 154,\n+\t\t 154, 196, 167, 167, 154, 152, 167, 182,\n+\t\t 182, 134, 149, 136, 153, 121, 136, 122,\n+\t\t 169, 208, 166, 167, 154, 152, 167, 182,\n+\t\t 125, 110, 124, 110,  95,  94, 125, 111,\n+\t\t 111,  79, 125, 126, 111, 111,  79, 108,\n+\t\t 123,  93, 125, 110, 124, 110,  95,  94,\n+\t\t 125, 111, 111,  79, 125, 126, 111, 111,\n+\t\t  79, 108, 123,  93, 121, 140,  61, 154,\n+\t\t 107, 167,  91, 107, 107, 167, 139, 139,\n+\t\t 170, 154, 139, 153, 139, 123, 123,  63,\n+\t\t 124, 166, 183, 140, 136, 153, 154, 166,\n+\t\t 183, 140, 136, 153, 154, 166, 183, 140,\n+\t\t 136, 153, 154, 170, 153, 138, 138, 122,\n+\t\t 121, 122, 121, 167, 151, 183, 140, 151,\n+\t\t 183, 140,   0,   0,\t},\n+};\n+\n+\n+//////////////////////////////////////////////////////////////////////////////\n+// Phase 1 command and bit FIFOs\n+\n+// ???? uint16_t addr - put in uint32_t\n+static int p1_apb_write(dec_env_t * const de, const uint16_t addr, const uint32_t data) {\n+    if (de->cmd_len==de->cmd_max)\n+        av_assert0(de->cmd_fifo = realloc(de->cmd_fifo, (de->cmd_max*=2)*sizeof(struct RPI_CMD)));\n+\n+#if TRACE_DEV\n+    printf(\"[%02x] %x %x\\n\", de->cmd_len, addr, data);\n+#endif\n+\n+    de->cmd_fifo[de->cmd_len].addr = addr;\n+    de->cmd_fifo[de->cmd_len].data = data;\n+    return de->cmd_len++;\n+}\n+\n+static void p1_axi_write(dec_env_t * const de, const uint32_t len, const void * const ptr, const int cmd_idx) {\n+    if (de->bit_len==de->bit_max)\n+        av_assert0(de->bit_fifo = realloc(de->bit_fifo, (de->bit_max*=2)*sizeof(struct RPI_BIT)));\n+    de->bit_fifo[de->bit_len].cmd = cmd_idx;\n+    de->bit_fifo[de->bit_len].ptr = ptr;\n+    de->bit_fifo[de->bit_len].len = len;\n+    de->bit_len++;\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+// Write probability and scaling factor memories\n+\n+#if 0\n+static void WriteProb(dec_env_t * const de) {\n+    int i;\n+    const uint8_t *p = (uint8_t *) &de->probabilities;\n+    for (i=0; i<sizeof(struct RPI_PROB); i+=4, p+=4)\n+        p1_apb_write(de, 0x1000+i, p[0] + (p[1]<<8) + (p[2]<<16) + (p[3]<<24));\n+}\n+#endif\n+\n+static void WriteProb(dec_env_t * const de, const HEVCContext * const s) {\n+    uint8_t dst[RPI_PROB_ARRAY_SIZE];\n+\n+    const unsigned int init_type = (s->sh.cabac_init_flag && s->sh.slice_type != HEVC_SLICE_I) ?\n+        s->sh.slice_type + 1 : 2 - s->sh.slice_type;\n+    const uint8_t * p = prob_init[init_type];\n+    const int q = av_clip(s->sh.slice_qp, 0, 51);\n+    unsigned int i;\n+\n+    for (i = 0; i < RPI_PROB_VALS; i++) {\n+        int init_value = p[i];\n+        int m = (init_value >> 4) * 5 - 45;\n+        int n = ((init_value & 15) << 3) - 16;\n+        int pre = 2 * (((m * q) >> 4) + n) - 127;\n+\n+        pre ^= pre >> 31;\n+        if (pre > 124)\n+            pre = 124 + (pre & 1);\n+        dst[i] = pre;\n+    }\n+    for (i = RPI_PROB_VALS; i != RPI_PROB_ARRAY_SIZE; ++i) {\n+        dst[i] = 0;\n+    }\n+\n+    for (i=0; i < RPI_PROB_ARRAY_SIZE; i+=4)\n+        p1_apb_write(de, 0x1000+i, dst[i] + (dst[i+1]<<8) + (dst[i+2]<<16) + (dst[i+3]<<24));\n+\n+}\n+\n+\n+static void WriteScalingFactors(dec_env_t * const de) {\n+    int i;\n+    const uint8_t *p = (uint8_t *) de->scaling_factors;\n+    for (i=0; i<NUM_SCALING_FACTORS; i+=4, p+=4)\n+        p1_apb_write(de, 0x2000+i, p[0] + (p[1]<<8) + (p[2]<<16) + (p[3]<<24));\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+static int ctb_to_tile (unsigned int ctb, unsigned int *bd, int num) {\n+    int i;\n+    for (i=1; ctb >= bd[i]; i++); // bd[] has num+1 elements; bd[0]=0; see hevc_ps.c\n+    return i-1;\n+}\n+\n+static int ctb_to_slice_w_h (unsigned int ctb, int ctb_size, int width, unsigned int *bd, int num) {\n+    if (ctb < bd[num-1]) return ctb_size;\n+    else if (width % ctb_size) return width % ctb_size;\n+    else return ctb_size;\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+// Handle PU and COEFF stream overflow\n+\n+\n+// Returns:\n+// -2 Other error\n+// -1 Out of coeff space\n+//  0  OK\n+//  1  Out of PU space\n+\n+static int check_status(const RPI_T * const rpi, dec_env_t * const de) {\n+    uint32_t status;\n+\n+    // this is the definition of successful completion of phase 1\n+    // it assures that status register is zero and all blocks in each tile have completed\n+    if (apb_read(rpi, RPI_CFSTATUS) == apb_read(rpi, RPI_CFNUM))\n+        return 0;\n+\n+    status = apb_read(rpi, RPI_STATUS);\n+\n+    if ((status & 8) != 0)\n+        return -1;\n+\n+    if ((status & 0x10) != 0)\n+        return 1;\n+\n+    return -2;\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+// Write STATUS register with expected end CTU address of previous slice\n+\n+static void end_previous_slice(dec_env_t * const de, const HEVCContext * const s, const int ctb_addr_ts) {\n+    const HEVCPPS * const pps = s->ps.pps;\n+    int last_x = pps->ctb_addr_ts_to_rs[ctb_addr_ts-1] % de->PicWidthInCtbsY;\n+    int last_y = pps->ctb_addr_ts_to_rs[ctb_addr_ts-1] / de->PicWidthInCtbsY;\n+    p1_apb_write(de, RPI_STATUS, 1 + (last_x<<5) + (last_y<<18));\n+}\n+\n+static void wpp_pause(dec_env_t * const de, int ctb_row) {\n+    p1_apb_write(de, RPI_STATUS, (ctb_row<<18) + 0x25);\n+    p1_apb_write(de, RPI_TRANSFER, PROB_BACKUP);\n+    p1_apb_write(de, RPI_MODE, ctb_row==de->PicHeightInCtbsY-1 ? 0x70000 : 0x30000);\n+    p1_apb_write(de, RPI_CONTROL, (ctb_row<<16) + 2);\n+}\n+\n+static void wpp_end_previous_slice(dec_env_t * const de, const HEVCContext * const s, int ctb_addr_ts) {\n+    const HEVCPPS *pps = s->ps.pps;\n+    int new_x = s->sh.slice_ctb_addr_rs % de->PicWidthInCtbsY;\n+    int new_y = s->sh.slice_ctb_addr_rs / de->PicWidthInCtbsY;\n+    int last_x = pps->ctb_addr_ts_to_rs[ctb_addr_ts-1] % de->PicWidthInCtbsY;\n+    int last_y = pps->ctb_addr_ts_to_rs[ctb_addr_ts-1] / de->PicWidthInCtbsY;\n+    if (de->wpp_entry_x<2 && (de->wpp_entry_y<new_y || new_x>2) && de->PicWidthInCtbsY>2)\n+        wpp_pause(de, last_y);\n+    p1_apb_write(de, RPI_STATUS, 1 + (last_x<<5) + (last_y<<18));\n+    if (new_x==2 || de->PicWidthInCtbsY==2 && de->wpp_entry_y<new_y)\n+        p1_apb_write(de, RPI_TRANSFER, PROB_BACKUP);\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+static void new_slice_segment(dec_env_t * const de, const HEVCContext * const s)\n+{\n+    const HEVCSPS *sps = s->ps.sps;\n+    const HEVCPPS *pps = s->ps.pps;\n+\n+    p1_apb_write(de, RPI_SPS0,\n+        (sps->log2_min_cb_size                    <<  0) +\n+        (sps->log2_ctb_size                       <<  4) +\n+        (sps->log2_min_tb_size                    <<  8) +\n+        (sps->log2_max_trafo_size                 << 12) +\n+        (sps->bit_depth                           << 16) +\n+        (sps->bit_depth                           << 20) +\n+        (sps->max_transform_hierarchy_depth_intra << 24) +\n+        (sps->max_transform_hierarchy_depth_inter << 28));\n+\n+    p1_apb_write(de, RPI_SPS1,\n+        (sps->pcm.bit_depth                                        <<  0) +\n+        (sps->pcm.bit_depth_chroma                                 <<  4) +\n+        (sps->pcm.log2_min_pcm_cb_size                             <<  8) +\n+        (sps->pcm.log2_max_pcm_cb_size                             << 12) +\n+        (sps->separate_colour_plane_flag? 0:sps->chroma_format_idc << 16) +\n+        (sps->amp_enabled_flag                                     << 18) +\n+        (sps->pcm_enabled_flag                                     << 19) +\n+        (sps->scaling_list_enable_flag                             << 20) +\n+        (sps->sps_strong_intra_smoothing_enable_flag               << 21));\n+\n+    p1_apb_write(de, RPI_PPS,\n+        (sps->log2_ctb_size - pps->diff_cu_qp_delta_depth   <<  0) +\n+        (pps->cu_qp_delta_enabled_flag                      <<  4) +\n+        (pps->transquant_bypass_enable_flag                 <<  5) +\n+        (pps->transform_skip_enabled_flag                   <<  6) +\n+        (pps->sign_data_hiding_flag                         <<  7) +\n+      (((pps->cb_qp_offset + s->sh.slice_cb_qp_offset)&255) <<  8) +\n+      (((pps->cr_qp_offset + s->sh.slice_cr_qp_offset)&255) << 16) +\n+        (pps->constrained_intra_pred_flag                   << 24));\n+\n+    if (s->ps.sps->scaling_list_enable_flag) WriteScalingFactors(de);\n+\n+    if (!s->sh.dependent_slice_segment_flag) {\n+        int ctb_col = s->sh.slice_ctb_addr_rs % de->PicWidthInCtbsY;\n+        int ctb_row = s->sh.slice_ctb_addr_rs / de->PicWidthInCtbsY;\n+        de->reg_slicestart = (ctb_col<<0) + (ctb_row<<16);\n+    }\n+\n+    p1_apb_write(de, RPI_SLICESTART, de->reg_slicestart);\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+static void write_slice(dec_env_t * const de, const HEVCContext * const s,\n+                        const unsigned int slice_w, const unsigned int slice_h) {\n+    uint32_t u32 =\n+          (s->sh.slice_type                           << 12)\n+        + (s->sh.slice_sample_adaptive_offset_flag[0] << 14)\n+        + (s->sh.slice_sample_adaptive_offset_flag[1] << 15)\n+        + (slice_w                                    << 17)\n+        + (slice_h                                    << 24);\n+\n+    if (s->sh.slice_type==HEVC_SLICE_B || s->sh.slice_type==HEVC_SLICE_P) u32 |=\n+          (s->sh.max_num_merge_cand << 0)\n+        + (s->sh.nb_refs[L0]        << 4)\n+        + (s->sh.nb_refs[L1]        << 8);\n+\n+    if (s->sh.slice_type==HEVC_SLICE_B)\n+        u32 |= s->sh.mvd_l1_zero_flag<<16;\n+    p1_apb_write(de, RPI_SLICE, u32);\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+// Wavefront mode\n+\n+static void wpp_entry_point(dec_env_t * const de, const HEVCContext * const s,\n+                            const int do_bte, const int resetQPY, const int ctb_addr_ts) {\n+    const HEVCSPS * const sps = s->ps.sps;\n+    const HEVCPPS * const pps = s->ps.pps;\n+\n+    int ctb_size = 1<<sps->log2_ctb_size;\n+    int ctb_addr_rs = pps->ctb_addr_ts_to_rs[ctb_addr_ts];\n+\n+    int ctb_col = de->wpp_entry_x = ctb_addr_rs % de->PicWidthInCtbsY;\n+    int ctb_row = de->wpp_entry_y = ctb_addr_rs / de->PicWidthInCtbsY;\n+\n+    int endx = de->PicWidthInCtbsY-1;\n+    int endy = ctb_row;\n+\n+    uint8_t slice_w = ctb_to_slice_w_h(ctb_col, ctb_size, sps->width,  pps->col_bd, pps->num_tile_columns);\n+    uint8_t slice_h = ctb_to_slice_w_h(ctb_row, ctb_size, sps->height, pps->row_bd, pps->num_tile_rows);\n+\n+    p1_apb_write(de, RPI_TILESTART, 0);\n+    p1_apb_write(de, RPI_TILEEND, endx + (endy<<16));\n+\n+    if (do_bte)\n+        p1_apb_write(de, RPI_BEGINTILEEND, endx + (endy<<16));\n+\n+    write_slice(de, s, slice_w, ctb_row==de->PicHeightInCtbsY-1? slice_h : ctb_size);\n+\n+    if (resetQPY) p1_apb_write(de, RPI_QP, sps->qp_bd_offset + s->sh.slice_qp);\n+\n+    p1_apb_write(de, RPI_MODE, ctb_row==de->PicHeightInCtbsY-1? 0x60001 : 0x20001);\n+    p1_apb_write(de, RPI_CONTROL, (ctb_col<<0) + (ctb_row<<16));\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+// Tiles mode\n+\n+static void new_entry_point(dec_env_t * const de, const HEVCContext * const s,\n+                            const int do_bte, const int resetQPY, const int ctb_addr_ts) {\n+    const HEVCSPS * const sps = s->ps.sps;\n+    const HEVCPPS * const pps = s->ps.pps;\n+\n+    int ctb_col = pps->ctb_addr_ts_to_rs[ctb_addr_ts] % de->PicWidthInCtbsY;\n+    int ctb_row = pps->ctb_addr_ts_to_rs[ctb_addr_ts] / de->PicWidthInCtbsY;\n+\n+    int tile_x = ctb_to_tile (ctb_col, pps->col_bd, pps->num_tile_columns);\n+    int tile_y = ctb_to_tile (ctb_row, pps->row_bd, pps->num_tile_rows);\n+\n+    int endx = pps->col_bd[tile_x+1] - 1;\n+    int endy = pps->row_bd[tile_y+1] - 1;\n+\n+    uint8_t slice_w = ctb_to_slice_w_h(ctb_col, 1<<sps->log2_ctb_size, sps->width,  pps->col_bd, pps->num_tile_columns);\n+    uint8_t slice_h = ctb_to_slice_w_h(ctb_row, 1<<sps->log2_ctb_size, sps->height, pps->row_bd, pps->num_tile_rows);\n+\n+    p1_apb_write(de, RPI_TILESTART, pps->col_bd[tile_x] + (pps->row_bd[tile_y]<<16));\n+    p1_apb_write(de, RPI_TILEEND, endx + (endy<<16));\n+\n+    if (do_bte)\n+        p1_apb_write(de, RPI_BEGINTILEEND, endx + (endy<<16));\n+\n+    write_slice(de, s, slice_w, slice_h);\n+\n+    if (resetQPY)\n+        p1_apb_write(de, RPI_QP, sps->qp_bd_offset + s->sh.slice_qp);\n+\n+    p1_apb_write(de, RPI_MODE, (0xFFFF                            <<  0)\n+                              + (0x0                               << 16)\n+                              + ((tile_x==pps->num_tile_columns-1) << 17)\n+                              + ((tile_y==pps->num_tile_rows-1)    << 18));\n+\n+    p1_apb_write(de, RPI_CONTROL, (ctb_col<<0) + (ctb_row<<16));\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+// Doesn't attempt to remove from context as we should only do this at the end\n+// of time or on create error\n+static void\n+dec_env_delete(dec_env_t * const de)\n+{\n+//    gpu_free(&de->gbuf);\n+\n+    av_freep(&de->cmd_fifo);\n+    av_freep(&de->bit_fifo);\n+\n+    sem_destroy(&de->phase_wait);\n+    av_free(de);\n+}\n+\n+static dec_env_t *\n+dec_env_new(AVCodecContext * const avctx, RPI_T * const rpi)\n+{\n+    dec_env_t * const de = av_mallocz(sizeof(*de));\n+    int i;\n+\n+    if (de == NULL)\n+        return NULL;\n+\n+    de->avctx = avctx;\n+    de->phase_no = RPIVID_PHASE_NEW;\n+\n+    sem_init(&de->phase_wait, 0, 0);\n+\n+    if ((de->cmd_fifo = malloc((de->cmd_max=1024)*sizeof(struct RPI_CMD))) == NULL)\n+        goto fail;\n+\n+    if ((de->bit_fifo = malloc((de->bit_max=1024)*sizeof(struct RPI_BIT))) == NULL)\n+        goto fail;\n+\n+    pthread_mutex_lock(&rpi->phase_lock); // Abuse - not worth creating a lock just for this\n+    for (i = 0; i != avctx->thread_count; ++i) {\n+        if (rpi->dec_envs[i] == NULL)\n+        {\n+            rpi->dec_envs[i] = de;\n+            break;\n+        }\n+    }\n+    pthread_mutex_unlock(&rpi->phase_lock);\n+\n+    if (i == avctx->thread_count) {\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to find a slot for hw thread context\\n\");\n+        goto fail;\n+    }\n+\n+    return de;\n+\n+fail:\n+    dec_env_delete(de);\n+    return NULL;\n+}\n+\n+\n+static dec_env_t *\n+dec_env_get(AVCodecContext * const avctx, RPI_T * const rpi)\n+{\n+    dec_env_t * de = NULL;\n+    const int ref_count = atomic_fetch_add(&rpi->ref_count, 1);\n+\n+    if (ref_count <= 0) {\n+        // Already dead\n+        av_log(avctx, AV_LOG_ERROR, \"RPIVID called whilst dead\\n\");;\n+        return NULL;\n+    }\n+\n+    for (int i = 0; i != avctx->thread_count; ++i) {\n+        if (rpi->dec_envs[i] == NULL)\n+        {\n+            de = dec_env_new(avctx, rpi);\n+            break;\n+        }\n+        if (rpi->dec_envs[i]->avctx == avctx)\n+        {\n+            de = rpi->dec_envs[i];\n+            break;\n+        }\n+    }\n+    return de;\n+}\n+\n+// Call at end of fn\n+// Used to ensure we aren't in a worker thead when killed\n+static void\n+dec_env_release(RPI_T * const rpi, dec_env_t * const de)\n+{\n+    const int n = atomic_fetch_sub(&rpi->ref_count, 1);\n+    if (n == 1) {\n+        sem_post(&rpi->ref_zero);\n+    }\n+}\n+\n+//----------------------------------------------------------------------------\n+\n+// Wait for a slot in the given phase\n+// Any error return is probably fatal\n+static int\n+wait_phase(RPI_T * const rpi, dec_env_t * const de, const int phase_no)\n+{\n+    int needs_wait = 0;\n+    phase_wait_env_t *const p = rpi->phase_reqs + phase_no;\n+\n+    pthread_mutex_lock(&rpi->phase_lock);\n+    if (p->last_order + 1 != de->decode_order) {\n+        de->phase_wait_q_next = p->q;\n+        p->q = de;\n+        needs_wait = 1;\n+    }\n+    pthread_mutex_unlock(&rpi->phase_lock);\n+\n+    if (needs_wait) {\n+        while (sem_wait(&de->phase_wait) == -1)\n+        {\n+            int err;\n+            if ((err = errno) != EINTR)\n+                return AVERROR(err);\n+        }\n+    }\n+\n+    de->phase_no = phase_no;\n+    return 0;\n+}\n+\n+static void\n+post_phase(RPI_T * const rpi, dec_env_t * const de, const int phase_no)\n+{\n+    dec_env_t * next_de = NULL;\n+    phase_wait_env_t *const p = rpi->phase_reqs + phase_no;\n+    dec_env_t ** q = &p->q;\n+\n+    pthread_mutex_lock(&rpi->phase_lock);\n+\n+    p->last_order = de->decode_order;\n+    while (*q != NULL) {\n+        dec_env_t * const t_de = *q;\n+\n+        if (t_de->decode_order == p->last_order + 1) {\n+            // This is us - remove from Q\n+            *q = t_de->phase_wait_q_next;\n+            t_de->phase_wait_q_next = NULL; // Tidy\n+            next_de = t_de;\n+            break;\n+        }\n+        q = &t_de->phase_wait_q_next;\n+    }\n+\n+    pthread_mutex_unlock(&rpi->phase_lock);\n+\n+    if (next_de != NULL)\n+        sem_post(&next_de->phase_wait);\n+}\n+\n+// Wait & signal stuff s.t. threads in other phases can continue\n+static void\n+abort_phases(RPI_T * const rpi, dec_env_t * const de)\n+{\n+    for (int i = de->phase_no + 1; i < RPIVID_PHASE_NEW; ++i) {\n+        wait_phase(rpi, de, i);\n+        post_phase(rpi, de, i);\n+    }\n+    de->phase_no = RPIVID_PHASE_NEW;\n+}\n+\n+// Start timing for phase\n+// Stats only - no actual effect\n+static inline void tstart_phase(RPI_T * const rpi, const int phase_no)\n+{\n+#if OPT_PHASE_TIMING\n+    phase_wait_env_t *const p = rpi->phase_reqs + phase_no;\n+    const int64_t now = tus64();\n+    if (p->phase_time != 0)\n+        p->time_out_phase += now - p->phase_time;\n+    p->phase_time = now;\n+#endif\n+}\n+\n+#if OPT_PHASE_TIMING\n+static unsigned int tavg_bin_phase(phase_wait_env_t *const p, const unsigned int avg_n)\n+{\n+    uint64_t tsum = 0;\n+    unsigned int i;\n+    for (i = 0; i != avg_n; ++i)\n+        tsum += p->time_stash[(p->i3 - i) & 15];\n+    for (i = 0; i != 9; ++i) {\n+        if (time_thresholds[i] * 1000 * avg_n > tsum)\n+            break;\n+    }\n+    return i;\n+}\n+#endif\n+\n+// End timing for phase\n+// Stats only - no actual effect\n+static inline void tend_phase(RPI_T * const rpi, const int phase_no)\n+{\n+#if OPT_PHASE_TIMING\n+    phase_wait_env_t *const p = rpi->phase_reqs + phase_no;\n+    const uint64_t now = tus64();\n+    const uint64_t in_time = now - p->phase_time;\n+\n+    p->time_in_phase += in_time;\n+    p->phase_time = now;\n+    p->time_stash[p->i3] = in_time;\n+    if (in_time > p->max_phase_time) {\n+        p->max_phase_time = in_time;\n+        p->max_time_decode_order = p->last_order;\n+    }\n+    ++p->time_bins[tavg_bin_phase(p, 1)];\n+    ++p->time_bins3[tavg_bin_phase(p, 3)];\n+    ++p->time_bins5[tavg_bin_phase(p, 5)];\n+\n+    p->i3 = (p->i3 + 1) & 15;\n+#endif\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+// Start frame\n+\n+static int rpi_hevc_start_frame(\n+    AVCodecContext * avctx,\n+    const uint8_t *buffer,\n+    uint32_t size) {\n+\n+    RPI_T * const rpi = avctx->internal->hwaccel_priv_data;\n+    dec_env_t * const de = dec_env_get(avctx, rpi);\n+    const HEVCContext * const s = avctx->priv_data;\n+    const HEVCSPS * const sps = s->ps.sps;\n+    const unsigned int CtbSizeY = 1U << sps->log2_ctb_size;\n+\n+#if TRACE_ENTRY\n+    printf(\"<<< %s[%p]\\n\", __func__, de);\n+#endif\n+\n+    if (de == NULL) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: Cannot find find context for thread\\n\", __func__);\n+        return -1;\n+    }\n+\n+    de->phase_no = RPIVID_PHASE_START;\n+    de->decode_order = ++rpi->decode_order;  // *** atomic?\n+\n+    ff_thread_finish_setup(avctx); // Allow next thread to enter rpi_hevc_start_frame\n+\n+    if (de->state != RPIVID_DECODE_NEW && de->state != RPIVID_DECODE_END) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: Unexpected state transition: %d\", __func__, de->state);\n+        return -1;\n+    }\n+    de->state = RPIVID_DECODE_START;\n+\n+    de->PicWidthInCtbsY  = (sps->width + CtbSizeY - 1) / CtbSizeY;  //7-15\n+    de->PicHeightInCtbsY = (sps->height + CtbSizeY - 1) / CtbSizeY;  //7-17\n+    de->bit_len = 0;\n+    de->cmd_len = 0;\n+\n+#if TRACE_ENTRY\n+    printf(\">>> %s[%p]\\n\", __func__, de);\n+#endif\n+\n+    dec_env_release(rpi, de);\n+    return 0;\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+// Slice messages\n+\n+static void msg_slice(dec_env_t * const de, const uint16_t msg) {\n+    de->slice_msgs[de->num_slice_msgs++] = msg;\n+}\n+\n+static void program_slicecmds(dec_env_t * const de, const int sliceid) {\n+    int i;\n+    p1_apb_write(de, RPI_SLICECMDS, de->num_slice_msgs+(sliceid<<8));\n+    for(i=0; i < de->num_slice_msgs; i++) {\n+        p1_apb_write(de, 0x4000+4*i, de->slice_msgs[i] & 0xffff);\n+    }\n+}\n+\n+static void pre_slice_decode(dec_env_t * const de, const HEVCContext * const s) {\n+    const HEVCSPS * const sps = s->ps.sps;\n+    const HEVCPPS * const pps = s->ps.pps;\n+    const SliceHeader *sh = &s->sh;\n+\n+    int weightedPredFlag, i, rIdx;\n+    uint16_t cmd_slice;\n+    unsigned int collocated_from_l0_flag;\n+\n+    de->num_slice_msgs=0;\n+    de->dpbno_col = 0;\n+    cmd_slice = 0;\n+    if (sh->slice_type==HEVC_SLICE_I) cmd_slice = 1;\n+    if (sh->slice_type==HEVC_SLICE_P) cmd_slice = 2;\n+    if (sh->slice_type==HEVC_SLICE_B) cmd_slice = 3;\n+\n+    if (sh->slice_type!=HEVC_SLICE_I) {\n+        cmd_slice += sh->nb_refs[L0]<<2;\n+        cmd_slice += sh->nb_refs[L1]<<6;\n+    }\n+\n+    if (sh->slice_type==HEVC_SLICE_P ||  sh->slice_type==HEVC_SLICE_B)\n+        cmd_slice |= sh->max_num_merge_cand<<11;\n+\n+    collocated_from_l0_flag =\n+        !sh->slice_temporal_mvp_enabled_flag ?\n+            0 :\n+        sh->slice_type == HEVC_SLICE_B ?\n+            (sh->collocated_list == L0) :\n+            (sh->slice_type==HEVC_SLICE_P);\n+    cmd_slice |= collocated_from_l0_flag<<14;\n+\n+    if (sh->slice_type==HEVC_SLICE_P || sh->slice_type==HEVC_SLICE_B) {\n+\n+        int NoBackwardPredFlag = 1; // Flag to say all reference pictures are from the past\n+        for(i=L0; i<=L1; i++) {\n+            for(rIdx=0; rIdx <sh->nb_refs[i]; rIdx++) {\n+                HEVCFrame *f = s->ref->refPicList[i].ref[rIdx];\n+                HEVCFrame *c = s->ref; // CurrentPicture\n+                if (c->poc < f->poc) NoBackwardPredFlag = 0;\n+            }\n+        }\n+\n+        if (sps->sps_temporal_mvp_enabled_flag)\n+        {\n+            const RefPicList *rpl = (sh->slice_type != HEVC_SLICE_B || collocated_from_l0_flag) ?\n+                s->ref->refPicList + 0 :\n+                s->ref->refPicList + 1;\n+            de->dpbno_col = rpl->ref[sh->collocated_ref_idx] - s->DPB;\n+        }\n+\n+        cmd_slice += NoBackwardPredFlag<<10;\n+        msg_slice(de, cmd_slice);\n+\n+        // Write reference picture descriptions\n+        weightedPredFlag = sh->slice_type==HEVC_SLICE_P? pps->weighted_pred_flag : pps->weighted_bipred_flag;\n+\n+        for(i=L0; i<=L1; i++)\n+            for(rIdx=0; rIdx <sh->nb_refs[i]; rIdx++) {\n+                HEVCFrame *f = s->ref->refPicList[i].ref[rIdx];\n+                HEVCFrame *c = s->ref; // CurrentPicture\n+                int pic = f - s->DPB;\n+                // Make sure pictures are in range 0 to 15\n+                int adjusted_pic = f<c? pic : pic-1;\n+                int lt = s->ref->refPicList[i].isLongTerm[rIdx];\n+                msg_slice(de, adjusted_pic+(lt<<4)+(weightedPredFlag<<5)+(weightedPredFlag<<6));\n+                msg_slice(de, f->poc);\n+                if (weightedPredFlag) {\n+                    msg_slice(de,   s->sh.luma_log2_weight_denom+(((i?s->  sh.luma_weight_l1:  s->sh.luma_weight_l0)[rIdx]   &0x1ff)<<3));\n+                    msg_slice(de,                                  (i?s->  sh.luma_offset_l1:  s->sh.luma_offset_l0)[rIdx]   & 0xff);\n+                    msg_slice(de, s->sh.chroma_log2_weight_denom+(((i?s->sh.chroma_weight_l1:s->sh.chroma_weight_l0)[rIdx][0]&0x1ff)<<3));\n+                    msg_slice(de,                                  (i?s->sh.chroma_offset_l1:s->sh.chroma_offset_l0)[rIdx][0]& 0xff);\n+                    msg_slice(de, s->sh.chroma_log2_weight_denom+(((i?s->sh.chroma_weight_l1:s->sh.chroma_weight_l0)[rIdx][1]&0x1ff)<<3));\n+                    msg_slice(de,                                  (i?s->sh.chroma_offset_l1:s->sh.chroma_offset_l0)[rIdx][1]& 0xff);\n+                }\n+            }\n+    }\n+    else\n+        msg_slice(de, cmd_slice);\n+\n+    msg_slice(de, ((sh->beta_offset/2)&15)\n+        + (((sh->tc_offset/2)&15)                           <<  4)\n+        + (sh->disable_deblocking_filter_flag               <<  8)\n+        + (sh->slice_loop_filter_across_slices_enabled_flag <<  9)\n+        + (pps->loop_filter_across_tiles_enabled_flag       << 10)); // CMD_DEBLOCK\n+\n+    msg_slice(de, ((sh->slice_cr_qp_offset&31)<<5) + (sh->slice_cb_qp_offset&31)); // CMD_QPOFF\n+}\n+\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+static void rpi_hevc_abort_frame(AVCodecContext * const avctx) {\n+    RPI_T * const rpi = avctx->internal->hwaccel_priv_data;\n+    dec_env_t * const de = dec_env_get(avctx,  rpi);\n+\n+#if TRACE_ENTRY\n+    printf(\"<<< %s[%p]\\n\", __func__, de);\n+#endif\n+\n+    if (de == NULL) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: Cannot find find context for thread\\n\", __func__);\n+        return;\n+    }\n+\n+    switch (de->state) {\n+        case RPIVID_DECODE_NEW:\n+        case RPIVID_DECODE_END:\n+            // Expected transition\n+            break;\n+\n+        case RPIVID_DECODE_SLICE:\n+            // Error transition\n+            av_log(avctx, AV_LOG_INFO, \"Error in decode - aborting\\n\");\n+            break;\n+\n+        case RPIVID_DECODE_START:\n+        default:\n+            av_log(avctx, AV_LOG_ERROR, \"%s: Unexpected state transition: %d\", __func__, de->state);\n+            break;\n+    }\n+\n+    abort_phases(rpi, de);\n+    de->state = RPIVID_DECODE_NEW;\n+\n+    dec_env_release(rpi, de);\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+// End frame\n+\n+static int rpi_hevc_end_frame(AVCodecContext * const avctx) {\n+    RPI_T * const rpi = avctx->internal->hwaccel_priv_data;\n+    const HEVCContext * const s = avctx->priv_data;\n+    const HEVCPPS * const pps = s->ps.pps;\n+    const HEVCSPS * const sps = s->ps.sps;\n+    dec_env_t * const de = dec_env_get(avctx,  rpi);\n+    AVFrame * const f = s->ref->frame;\n+    const unsigned int dpbno_cur = s->ref - s->DPB;\n+    vid_vc_addr_t cmds_vc;\n+    vid_vc_addr_t pu_base_vc;\n+    unsigned int pu_stride;\n+    vid_vc_addr_t coeff_base_vc;\n+    unsigned int coeff_stride;\n+    unsigned int i;\n+    int rv = 0;\n+    int status = 0;\n+    int coeffbuf_sem_claimed = 0;\n+\n+#if TRACE_ENTRY\n+    fprintf(\"<<< %s[%p]\\n\", __func__, de);\n+#endif\n+\n+    if (de == NULL) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: Cannot find find context for thread\\n\", __func__);\n+        return AVERROR_BUG;  // Should never happen\n+    }\n+\n+    if (de->state != RPIVID_DECODE_SLICE) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: Unexpected state: %d\\n\", __func__, de->state);\n+        rv = AVERROR_UNKNOWN;\n+        goto fail;\n+    }\n+    de->state = RPIVID_DECODE_END;\n+\n+    // End of command compilation\n+    {\n+        const unsigned int last_x = pps->col_bd[pps->num_tile_columns]-1;\n+        const unsigned int last_y = pps->row_bd[pps->num_tile_rows]-1;\n+        if (pps->entropy_coding_sync_enabled_flag) {\n+            if (de->wpp_entry_x<2 && de->PicWidthInCtbsY>2)\n+                wpp_pause(de, last_y);\n+        }\n+        p1_apb_write(de, RPI_STATUS, 1 + (last_x<<5) + (last_y<<18));\n+    }\n+\n+    // Phase 0 ---------------------------------------------------------------\n+\n+    wait_phase(rpi, de, 0);\n+    rpi_sem_wait(&rpi->bitbuf_sem);\n+    tstart_phase(rpi, 0);\n+\n+    // Copy cmds & bits into gpu side buffer\n+    // Layout: CMDS, BITS\n+    {\n+        uint8_t * const armbase = rpi->gbitbufs[rpi->bitbuf_no].arm;\n+        vid_vc_addr_t vcbase = rpi->gbitbufs[rpi->bitbuf_no].vc;\n+        unsigned int cmd_bytes = de->cmd_len * sizeof(struct RPI_CMD);\n+\n+        uint8_t * p = armbase + rnd64(cmd_bytes);\n+        uint8_t * const eobits = armbase + rpi->gbitbufs[rpi->bitbuf_no].numbytes;\n+\n+        cmds_vc = vcbase;\n+\n+        // Copy all the bits & update bitstream cmds to point at the right bits\n+        for (i = 0; i < de->bit_len; ++i)\n+        {\n+            const unsigned int seg_len = de->bit_fifo[i].len;\n+\n+            if (p + seg_len > eobits) {\n+                status = -1;\n+                break;\n+            }\n+\n+            memcpy(p, de->bit_fifo[i].ptr, seg_len);\n+            de->cmd_fifo[de->bit_fifo[i].cmd].data = MANGLE64((p - armbase) + vcbase);\n+\n+            p += rnd64(seg_len);\n+        }\n+\n+        memcpy(armbase, de->cmd_fifo, cmd_bytes);\n+    }\n+\n+    if (status == 0)\n+    {\n+        if (++rpi->bitbuf_no >= RPIVID_BITBUFS)\n+            rpi->bitbuf_no = 0;\n+    }\n+    else\n+    {\n+        sem_post(&rpi->bitbuf_sem);\n+        av_log(avctx, AV_LOG_ERROR, \"Out of HEVC bit/cmd memory\\n\");\n+        rv = AVERROR_BUFFER_TOO_SMALL;\n+    }\n+\n+    tend_phase(rpi, 0);\n+    post_phase(rpi, de, 0);\n+\n+    if (status < 0)\n+        goto fail;\n+\n+    // Phase 1 ---------------------------------------------------------------\n+\n+    wait_phase(rpi, de, 1);\n+    rpi_sem_wait(&rpi->coeffbuf_sem);\n+    coeffbuf_sem_claimed = 1;\n+    tstart_phase(rpi, 1);\n+\n+    status = 0;\n+    for (;;)\n+    {\n+        // (Re-)allocate PU/COEFF stream space\n+        const unsigned int total_size = rpi->gcoeffbufs[rpi->coeffbuf_no].numbytes;\n+        unsigned int pu_size;\n+\n+        pu_base_vc = rpi->gcoeffbufs[rpi->coeffbuf_no].vc;\n+        pu_stride = rnd64(rpi->max_pu_msgs * 2 * de->PicWidthInCtbsY);\n+        pu_size = pu_stride * de->PicHeightInCtbsY;\n+\n+        if (pu_size >= total_size || status == -1) {\n+            GPU_MEM_PTR_T newbuf;\n+\n+            if (gpu_malloc_uncached(round_up_size(total_size + 1), &newbuf) != 0)\n+            {\n+                av_log(avctx, AV_LOG_ERROR, \"Failed to reallocate coeffbuf\\n\");\n+                status = -1;\n+                break;\n+            }\n+            gpu_free(rpi->gcoeffbufs + rpi->coeffbuf_no);\n+            rpi->gcoeffbufs[rpi->coeffbuf_no] = newbuf;\n+            status = 0;\n+            continue;\n+        }\n+\n+        // Allocate all remaining space to coeff\n+        coeff_base_vc = pu_base_vc + pu_size;\n+        coeff_stride = ((total_size - pu_size) / de->PicHeightInCtbsY) & ~63;  // Round down to multiple of 64\n+\n+        apb_write_vc_addr(rpi, RPI_PUWBASE, pu_base_vc);\n+        apb_write_vc_len(rpi, RPI_PUWSTRIDE, pu_stride);\n+        apb_write_vc_addr(rpi, RPI_COEFFWBASE, coeff_base_vc);\n+        apb_write_vc_len(rpi, RPI_COEFFWSTRIDE, coeff_stride);\n+\n+        // Trigger command FIFO\n+        apb_write(rpi, RPI_CFNUM, de->cmd_len);\n+#if TRACE_DEV && 0\n+        apb_dump_regs(rpi, 0x0, 32);\n+        apb_dump_regs(rpi, 0x8000, 24);\n+        axi_dump(de, ((uint64_t)a64)<<6, de->cmd_len * sizeof(struct RPI_CMD));\n+#endif\n+        apb_write_vc_addr(rpi, RPI_CFBASE, cmds_vc);\n+\n+        int_wait(rpi, 1);\n+\n+        status = check_status(rpi, de);\n+\n+        if (status == -1)\n+            continue;\n+        else if (status != 1)\n+            break;\n+\n+        // Status 1 means out of PU space so try again with more\n+        // If we ran out of Coeff space then we are out of memory - we could possibly realloc?\n+        rpi->max_pu_msgs += rpi->max_pu_msgs / 2;\n+    }\n+\n+    // Inc inside the phase 1 lock, but only inc if we succeeded otherwise we\n+    // may reuse a live buffer when we kick the coeff sem\n+    if (status == 0)\n+    {\n+        if (++rpi->coeffbuf_no >= RPIVID_COEFFBUFS)\n+            rpi->coeffbuf_no = 0;\n+    }\n+    else\n+    {\n+        if (status == -1)\n+        {\n+            av_log(avctx, AV_LOG_ERROR, \"Out of pu + coeff intermediate memory: pus=%d\\n\", rpi->max_pu_msgs);\n+            rv = AVERROR_BUFFER_TOO_SMALL;\n+        }\n+        else\n+        {\n+            av_log(avctx, AV_LOG_WARNING, \"Phase 1 decode error\\n\");\n+            rv = AVERROR_INVALIDDATA;\n+        }\n+    }\n+\n+    tend_phase(rpi, 1);\n+    sem_post(&rpi->bitbuf_sem);\n+    post_phase(rpi, de, 1);\n+\n+    if (status != 0)\n+        goto fail;\n+\n+    // Phase 2 ---------------------------------------------------------------\n+\n+    wait_phase(rpi, de, 2);\n+\n+    if ((rv = av_rpi_zc_resolve_frame(f, ZC_RESOLVE_ALLOC)) != 0)\n+    {\n+        // As we are in phase 2 already here we don't need to worry about\n+        // ceoffbuf_no despite the early exit\n+        post_phase(rpi, de, 2);\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to allocate output frame\\n\");\n+        goto fail;\n+    }\n+\n+    tstart_phase(rpi, 2);\n+\n+    apb_write_vc_addr(rpi, RPI_PURBASE, pu_base_vc);\n+    apb_write_vc_len(rpi, RPI_PURSTRIDE, pu_stride);\n+    apb_write_vc_addr(rpi, RPI_COEFFRBASE, coeff_base_vc);\n+    apb_write_vc_len(rpi, RPI_COEFFRSTRIDE, coeff_stride);\n+\n+    apb_write_vc_addr(rpi, RPI_OUTYBASE, get_vc_address_y(f));\n+    apb_write_vc_addr(rpi, RPI_OUTCBASE, get_vc_address_u(f));\n+    apb_write_vc_len(rpi, RPI_OUTYSTRIDE, f->linesize[3] * 128);\n+    apb_write_vc_len(rpi, RPI_OUTCSTRIDE, f->linesize[3] * 128);\n+\n+    // Keep the last thing we resolved as fallback for any ref we fail to\n+    // resolve.  As a final fallback use our current frame.  The pels might\n+    // not be there yet but at least the memory is valid.\n+    //\n+    // Attempt to resolve the entire DPB - we could note what we have used\n+    // in ref lists but probably simpler and more reliable to set the whole thing\n+    {\n+        AVFrame * fallback_frame = f;\n+        for (i = 0; i != 16; ++i) {\n+            // Avoid current frame\n+            const HEVCFrame * hevc_fr = (s->DPB + i >= s->ref) ? s->DPB + i + 1 : s->DPB + i;\n+            AVFrame * fr = hevc_fr->frame;\n+\n+            if (fr != NULL &&\n+                av_rpi_zc_resolve_frame(fr, ZC_RESOLVE_FAIL) == 0)\n+            {\n+                fallback_frame = fr;\n+            }\n+            else\n+            {\n+                fr = fallback_frame;\n+            }\n+\n+            apb_write_vc_addr(rpi, 0x9000+16*i, get_vc_address_y(fr));\n+            apb_write(rpi, 0x9004+16*i, 0);\n+            apb_write_vc_addr(rpi, 0x9008+16*i, get_vc_address_u(fr));\n+            apb_write(rpi, 0x900C+16*i, 0);\n+        }\n+    }\n+\n+    apb_write(rpi, RPI_CONFIG2,\n+          (sps->bit_depth                             << 0) // BitDepthY\n+        + (sps->bit_depth                             << 4) // BitDepthC\n+       + ((sps->bit_depth>8)                          << 8) // BitDepthY\n+       + ((sps->bit_depth>8)                          << 9) // BitDepthC\n+        + (sps->log2_ctb_size                         <<10)\n+        + (pps->constrained_intra_pred_flag           <<13)\n+        + (sps->sps_strong_intra_smoothing_enable_flag<<14)\n+        + (sps->sps_temporal_mvp_enabled_flag         <<15)\n+        + (pps->log2_parallel_merge_level             <<16)\n+        + (s->sh.slice_temporal_mvp_enabled_flag      <<19)\n+        + (sps->pcm.loop_filter_disable_flag          <<20)\n+       + ((pps->cb_qp_offset&31)                      <<21)\n+       + ((pps->cr_qp_offset&31)                      <<26));\n+\n+    apb_write(rpi, RPI_FRAMESIZE, (sps->height<<16) + sps->width);\n+    apb_write(rpi, RPI_CURRPOC, s->poc);\n+\n+    // collocated reads/writes\n+    if (sps->sps_temporal_mvp_enabled_flag) {\n+        av_assert0(de->dpbno_col < RPIVID_COL_PICS);\n+        av_assert0(dpbno_cur < RPIVID_COL_PICS);\n+\n+        apb_write_vc_len(rpi, RPI_COLSTRIDE, rpi->col_stride);\n+        apb_write_vc_len(rpi, RPI_MVSTRIDE,  rpi->col_stride);\n+        apb_write_vc_addr(rpi, RPI_MVBASE,  rpi->gcolbuf.vc + dpbno_cur * rpi->col_picsize);\n+        apb_write_vc_addr(rpi, RPI_COLBASE, rpi->gcolbuf.vc + de->dpbno_col * rpi->col_picsize);\n+    }\n+\n+#if TRACE_DEV && 0\n+    apb_dump_regs(rpi, 0x0, 32);\n+    apb_dump_regs(rpi, 0x8000, 24);\n+#endif\n+\n+    apb_write(rpi, RPI_NUMROWS, de->PicHeightInCtbsY);\n+    apb_read(rpi, RPI_NUMROWS); // Read back to confirm write has reached block\n+\n+    int_wait(rpi, 2);\n+\n+    tend_phase(rpi, 2);\n+    coeffbuf_sem_claimed = 0;\n+    sem_post(&rpi->coeffbuf_sem);\n+    // Set valid here to avoid race in resolving in any pending phase 2\n+    av_rpi_zc_set_valid_frame(f);\n+\n+    post_phase(rpi, de, 2);\n+\n+    // Flush frame for CPU access\n+    // Arguably the best place would be at the start of phase 2 but here\n+    // will overlap with the wait\n+    //\n+    // * Even better would be to have better lock/unlock control in ZC for external access\n+    if (rpi->gpu_init_type == GPU_INIT_GPU)  // * CMA is currently always uncached\n+    {\n+        rpi_cache_buf_t cbuf;\n+        rpi_cache_flush_env_t * const fe = rpi_cache_flush_init(&cbuf);\n+        rpi_cache_flush_add_frame(fe, f, RPI_CACHE_FLUSH_MODE_INVALIDATE);\n+        rpi_cache_flush_finish(fe);\n+    }\n+\n+#if TRACE_ENTRY\n+    printf(\">>> %s[%p] OK\\n\", __func__, de);\n+#endif\n+\n+    dec_env_release(rpi, de);\n+    return 0;\n+\n+fail:\n+    av_rpi_zc_set_broken_frame(f);\n+    if (coeffbuf_sem_claimed)\n+        sem_post(&rpi->coeffbuf_sem);\n+    abort_phases(rpi, de);  // Dummy any unresolved phases\n+\n+#if TRACE_ENTRY\n+    printf(\">>> %s[%p] FAIL\\n\", __func__, de);\n+#endif\n+\n+    dec_env_release(rpi, de);\n+    return rv;\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+\n+#if TRACE_DEV\n+static void dump_data(const uint8_t * p, size_t len)\n+{\n+    size_t i;\n+    for (i = 0; i < len; i += 16) {\n+        size_t j;\n+        printf(\"%04x\", i);\n+        for (j = 0; j != 16; ++j) {\n+            printf(\"%c%02x\", i == 8 ? '-' : ' ', p[i+j]);\n+        }\n+        printf(\"\\n\");\n+    }\n+}\n+#endif\n+\n+#if OPT_EMU\n+static const uint8_t * ptr_from_index(const uint8_t * b, unsigned int idx)\n+{\n+    unsigned int z = 0;\n+    while (idx--) {\n+        if (*b++ == 0) {\n+            ++z;\n+            if (z >= 2 && *b == 3) {\n+                ++b;\n+                z = 0;\n+            }\n+        }\n+        else {\n+            z = 0;\n+        }\n+    }\n+    return b;\n+}\n+#endif\n+\n+static void WriteBitstream(dec_env_t * const de, const HEVCContext * const s) {\n+    const int rpi_use_emu = OPT_EMU; // FFmpeg removes emulation prevention bytes\n+    const int offset = 0; // Always 64-byte aligned in sim, need not be on real hardware\n+    const GetBitContext *gb = &s->HEVClc->gb;\n+\n+#if OPT_EMU\n+    const uint8_t *ptr = ptr_from_index(de->nal_buffer, gb->index/8 + 1);\n+    const int len = de->nal_size - (ptr - de->nal_buffer);\n+#else\n+    const int len = 1 + gb->size_in_bits/8 - gb->index/8;\n+    const void *ptr = &gb->buffer[gb->index/8];\n+#endif\n+\n+#if TRACE_DEV\n+    printf(\"Index=%d, /8=%#x\\n\", gb->index, gb->index/8);\n+    dump_data(de->nal_buffer, 128);\n+#endif\n+\n+    p1_axi_write(de, len, ptr, p1_apb_write(de, RPI_BFBASE, 0)); // BFBASE set later\n+    p1_apb_write(de, RPI_BFNUM, len);\n+    p1_apb_write(de, RPI_BFCONTROL, offset + (1<<7)); // Stop\n+    p1_apb_write(de, RPI_BFCONTROL, offset + (rpi_use_emu<<6));\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+// Wavefront mode\n+\n+static void wpp_decode_slice(dec_env_t * const de, const HEVCContext * const s, int ctb_addr_ts)\n+{\n+    const HEVCPPS * const pps = s->ps.pps;\n+\n+    int i, resetQPY=1;\n+    int indep = !s->sh.dependent_slice_segment_flag;\n+    int ctb_col = s->sh.slice_ctb_addr_rs % de->PicWidthInCtbsY;\n+\n+    if (ctb_addr_ts)\n+        wpp_end_previous_slice(de, s, ctb_addr_ts);\n+    pre_slice_decode(de, s);\n+    WriteBitstream(de, s);\n+    if (ctb_addr_ts==0 || indep || de->PicWidthInCtbsY==1)\n+        WriteProb(de, s);\n+    else if (ctb_col==0)\n+        p1_apb_write(de, RPI_TRANSFER, PROB_RELOAD);\n+    else\n+        resetQPY=0;\n+    program_slicecmds(de, s->slice_idx);\n+    new_slice_segment(de, s);\n+    wpp_entry_point(de, s, indep, resetQPY, ctb_addr_ts);\n+    for (i=0; i<s->sh.num_entry_point_offsets; i++) {\n+        int ctb_addr_rs = pps->ctb_addr_ts_to_rs[ctb_addr_ts];\n+        int ctb_row = ctb_addr_rs / de->PicWidthInCtbsY;\n+        int last_x = de->PicWidthInCtbsY-1;\n+        if (de->PicWidthInCtbsY>2)\n+            wpp_pause(de, ctb_row);\n+        p1_apb_write(de, RPI_STATUS, (ctb_row<<18) + (last_x<<5) + 2);\n+        if (de->PicWidthInCtbsY==2)\n+            p1_apb_write(de, RPI_TRANSFER, PROB_BACKUP);\n+        if (de->PicWidthInCtbsY==1)\n+            WriteProb(de, s);\n+        else\n+            p1_apb_write(de, RPI_TRANSFER, PROB_RELOAD);\n+        ctb_addr_ts += pps->column_width[0];\n+        wpp_entry_point(de, s, 0, 1, ctb_addr_ts);\n+    }\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+// Tiles mode\n+\n+static void decode_slice(dec_env_t * const de, const HEVCContext * const s, int ctb_addr_ts) {\n+    const HEVCPPS * const pps = s->ps.pps;\n+    int i, resetQPY;\n+\n+    if (ctb_addr_ts) end_previous_slice(de, s, ctb_addr_ts);\n+    pre_slice_decode(de, s);\n+    WriteBitstream(de, s);\n+    resetQPY = ctb_addr_ts==0\n+            || pps->tile_id[ctb_addr_ts]!=pps->tile_id[ctb_addr_ts-1]\n+            || !s->sh.dependent_slice_segment_flag;\n+    if (resetQPY) WriteProb(de, s);\n+    program_slicecmds(de, s->slice_idx);\n+    new_slice_segment(de, s);\n+    new_entry_point(de, s, !s->sh.dependent_slice_segment_flag, resetQPY, ctb_addr_ts);\n+    for (i=0; i<s->sh.num_entry_point_offsets; i++) {\n+        int ctb_addr_rs = pps->ctb_addr_ts_to_rs[ctb_addr_ts];\n+        int ctb_col = ctb_addr_rs % de->PicWidthInCtbsY;\n+        int ctb_row = ctb_addr_rs / de->PicWidthInCtbsY;\n+        int tile_x = ctb_to_tile (ctb_col, pps->col_bd, pps->num_tile_columns);\n+        int tile_y = ctb_to_tile (ctb_row, pps->row_bd, pps->num_tile_rows);\n+        int last_x = pps->col_bd[tile_x+1]-1;\n+        int last_y = pps->row_bd[tile_y+1]-1;\n+        p1_apb_write(de, RPI_STATUS, 2 + (last_x<<5) + (last_y<<18));\n+        WriteProb(de, s);\n+        ctb_addr_ts += pps->column_width[tile_x] * pps->row_height[tile_y];\n+        new_entry_point(de, s, 0, 1, ctb_addr_ts);\n+    }\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+static int cabac_start_align(HEVCContext *s)\n+{\n+    GetBitContext *gb = &s->HEVClc->gb;\n+    skip_bits(gb, 1);\n+    align_get_bits(gb);\n+    // Should look at getting rid of this\n+    return ff_init_cabac_decoder(&s->HEVClc->cc,\n+                          gb->buffer + get_bits_count(gb) / 8,\n+                          (get_bits_left(gb) + 7) / 8);\n+}\n+\n+static int rpi_hevc_decode_slice(\n+    AVCodecContext *avctx,\n+    const uint8_t *buffer,\n+    uint32_t size)\n+{\n+    RPI_T * const rpi = avctx->internal->hwaccel_priv_data;\n+    HEVCContext * const s = avctx->priv_data;\n+    dec_env_t * const de = dec_env_get(avctx, rpi);\n+    const HEVCPPS *pps = s->ps.pps;\n+    int ctb_addr_ts = pps->ctb_addr_rs_to_ts[s->sh.slice_ctb_addr_rs];\n+\n+#if TRACE_ENTRY\n+    printf(\"<<< %s[%p]\\n\", __func__, de);\n+#endif\n+    if (de == NULL) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: Cannot find find context for thread\\n\", __func__);\n+        return -1;\n+    }\n+\n+    if (de->state != RPIVID_DECODE_START && de->state != RPIVID_DECODE_SLICE) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: Unexpected state: %d\\n\", __func__, de->state);\n+        return -1;\n+    }\n+    de->state = RPIVID_DECODE_SLICE;\n+\n+    de->nal_buffer = buffer;\n+    de->nal_size   = size;\n+\n+#if !OPT_EMU\n+//    ff_hevc_cabac_init(s, ctb_addr_ts);\n+    cabac_start_align(s);\n+#endif\n+    if (s->ps.sps->scaling_list_enable_flag)\n+        populate_scaling_factors(de, s);\n+    pps->entropy_coding_sync_enabled_flag? wpp_decode_slice(de, s, ctb_addr_ts)\n+                                             : decode_slice(de, s, ctb_addr_ts);\n+#if TRACE_ENTRY\n+    printf(\">>> %s[%p]\\n\", __func__, de);\n+#endif\n+    dec_env_release(rpi, de);\n+    return 0;\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+static int rpivid_retrieve_data(void *logctx, AVFrame *frame)\n+{\n+    int rv;\n+    if ((rv = av_rpi_zc_resolve_frame(frame, ZC_RESOLVE_WAIT_VALID)) != 0)\n+        av_log(logctx, AV_LOG_ERROR, \"Unable to resolve output frame\\n\");\n+    return rv;\n+}\n+\n+static int rpivid_hevc_alloc_frame(AVCodecContext * avctx, AVFrame *frame)\n+{\n+    RPI_T * const rpi = avctx->internal->hwaccel_priv_data;\n+    HEVCContext * const s = avctx->priv_data;\n+    // Frame buffering + 1 output.  Would need thread_count extra but we now\n+    // alloc at the start of phase 2 so that is the only thread we need the\n+    // extra buffer for.\n+    const unsigned int pool_req = s->ps.sps->temporal_layer[s->ps.sps->max_sub_layers - 1].max_dec_pic_buffering + 1;\n+    int rv;\n+\n+    if (av_rpi_zc_in_use(avctx))\n+    {\n+        const AVZcEnvPtr zc = avctx->opaque;\n+        av_rpi_zc_set_decoder_pool_size(zc, pool_req);\n+        rv = av_rpi_zc_get_buffer(zc, frame);   // get_buffer2 would alloc\n+    }\n+    else\n+    {\n+        if (rpi->zc == NULL) {\n+            pthread_mutex_lock(&rpi->phase_lock); // Abuse - not worth creating a lock just for this\n+            // Alloc inside lock to make sure we only ever alloc one\n+            if (rpi->zc == NULL) {\n+                rpi->zc = av_rpi_zc_int_env_alloc(s);\n+            }\n+            pthread_mutex_unlock(&rpi->phase_lock);\n+        }\n+        av_rpi_zc_set_decoder_pool_size(rpi->zc, pool_req); // Ignored by local allocator, but set anyway :-)\n+        rv = (rpi->zc == NULL) ? AVERROR(ENOMEM) :\n+            av_rpi_zc_get_buffer(rpi->zc, frame);\n+    }\n+\n+    if (rv == 0 &&\n+        (rv = ff_attach_decode_data(frame)) < 0)\n+    {\n+        av_frame_unref(frame);\n+    }\n+\n+    if (rv == 0)\n+    {\n+        FrameDecodeData *fdd = (FrameDecodeData*)frame->private_ref->data;\n+        fdd->post_process = rpivid_retrieve_data;\n+    }\n+\n+    return rv;\n+}\n+\n+#if OPT_PHASE_TIMING\n+static void log_bin_phase(AVCodecContext * const avctx, const unsigned int * const bins)\n+{\n+    av_log(avctx, AV_LOG_INFO, \"%7d %7d %7d %7d %7d %7d %7d %7d %7d\\n\",\n+           bins[0],  bins[1], bins[2], bins[3],\n+           bins[4],  bins[5], bins[6], bins[7], bins[8]);\n+}\n+#endif\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+static int rpi_hevc_free(AVCodecContext *avctx) {\n+    RPI_T * const rpi = avctx->internal->hwaccel_priv_data;\n+\n+#if TRACE_ENTRY\n+    printf(\"<<< %s\\n\", __func__);\n+#endif\n+\n+    dec_env_release(rpi, NULL);\n+\n+    // Wait for everything else to stop\n+    {\n+        struct timespec tt;\n+        clock_gettime(CLOCK_REALTIME, &tt);\n+        tt.tv_sec += 2;\n+        while (sem_timedwait(&rpi->ref_zero, &tt) == -1) {\n+            const int err = errno;\n+            if (err == ETIMEDOUT) {\n+                av_log(avctx, AV_LOG_FATAL, \"Rpivid worker threads still running\\n\");\n+                return -1;\n+            }\n+            if (err != EINTR) {\n+                av_log(avctx, AV_LOG_ERROR, \"Unexpected error %d waiting for work thread to stop\\n\", err);\n+                break;\n+            }\n+        }\n+    }\n+\n+#if OPT_PHASE_TIMING\n+    {\n+        unsigned int i;\n+        for (i = 0; i != RPIVID_PHASES; ++i) {\n+            const phase_wait_env_t * const p = rpi->phase_reqs + i;\n+            av_log(avctx, AV_LOG_INFO, \"Phase %u: In %3u.%06u, Out %3u.%06u\\n\", i,\n+                   (unsigned int)(p->time_in_phase / 1000000), (unsigned int)(p->time_in_phase % 1000000),\n+                   (unsigned int)(p->time_out_phase / 1000000), (unsigned int)(p->time_out_phase % 1000000));\n+            av_log(avctx, AV_LOG_INFO, \"%7d %7d %7d %7d %7d %7d %7d %7d        >\\n\",\n+                   time_thresholds[0], time_thresholds[1], time_thresholds[2], time_thresholds[3],\n+                   time_thresholds[4], time_thresholds[5], time_thresholds[6], time_thresholds[7]);\n+            log_bin_phase(avctx, p->time_bins);\n+            log_bin_phase(avctx, p->time_bins3);\n+            log_bin_phase(avctx, p->time_bins5);\n+            av_log(avctx, AV_LOG_INFO, \"Longest duraction: %ums @ frame %u\\n\",\n+                   (unsigned int)(p->max_phase_time / 1000),\n+                   p->max_time_decode_order);\n+        }\n+        av_log(avctx, AV_LOG_INFO, \"PU max=%d\\n\", rpi->max_pu_msgs);\n+    }\n+#endif\n+\n+    if (rpi->dec_envs != NULL)\n+    {\n+        for (int i; i < avctx->thread_count && rpi->dec_envs[i] != NULL; ++i) {\n+            dec_env_delete(rpi->dec_envs[i]);\n+        }\n+        av_freep(&rpi->dec_envs);\n+    }\n+\n+    av_rpi_zc_int_env_freep(&rpi->zc);\n+\n+    gpu_free(&rpi->gcolbuf);\n+\n+    for (unsigned int i = 0; i != RPIVID_BITBUFS; ++i) {\n+        gpu_free(rpi->gbitbufs + i);\n+    }\n+    for (unsigned int i = 0; i != RPIVID_COEFFBUFS; ++i) {\n+        gpu_free(rpi->gcoeffbufs + i);\n+    }\n+\n+    unmap_devp(&rpi->regs, REGS_SIZE);\n+    unmap_devp(&rpi->ints, INTS_SIZE);\n+\n+    if (rpi->gpu_init_type > 0)\n+        rpi_mem_gpu_uninit();\n+\n+    if (rpi->mbox_fd >= 0) {\n+        mbox_release_clock(rpi->mbox_fd);\n+        mbox_close(rpi->mbox_fd);\n+    }\n+\n+    sem_destroy(&rpi->ref_zero);\n+    sem_destroy(&rpi->coeffbuf_sem);\n+    sem_destroy(&rpi->bitbuf_sem);\n+\n+#if TRACE_ENTRY\n+    printf(\">>> %s\\n\", __func__);\n+#endif\n+    return 0;\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+static int rpi_hevc_init(AVCodecContext *avctx) {\n+    RPI_T * const rpi = avctx->internal->hwaccel_priv_data;\n+//    const char *err;\n+\n+#if TRACE_ENTRY\n+    printf(\"<<< %s\\n\", __func__);\n+#endif\n+\n+    if (avctx->width>4096 || avctx->height>4096) {\n+        av_log(NULL, AV_LOG_FATAL, \"Picture size %dx%d exceeds 4096x4096 maximum for HWAccel\\n\", avctx->width, avctx->height);\n+        return AVERROR(ENOTSUP);\n+    }\n+\n+    memset(rpi, 0, sizeof(*rpi));\n+\n+    rpi->mbox_fd = -1;\n+    rpi->decode_order = 0;\n+\n+    // Initial PU/COEFF stream buffer split chosen as worst case seen so far\n+    rpi->max_pu_msgs = 768; // 7.2 says at most 1611 messages per CTU\n+\n+\n+    atomic_store(&rpi->ref_count, 1);\n+    sem_init(&rpi->ref_zero, 0, 0);\n+\n+    sem_init(&rpi->bitbuf_sem,   0, RPIVID_BITBUFS);\n+    sem_init(&rpi->coeffbuf_sem, 0, RPIVID_COEFFBUFS);\n+\n+    pthread_mutex_init(&rpi->phase_lock, NULL);\n+\n+    if ((rpi->mbox_fd = mbox_open()) < 0)\n+    {\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to open mailbox\\n\");\n+        goto fail;\n+    }\n+    mbox_request_clock(rpi->mbox_fd);\n+\n+    if ((rpi->regs = map_dev(avctx, REGS_NAME, REGS_SIZE)) == NULL ||\n+        (rpi->ints = map_dev(avctx, INTS_NAME, INTS_SIZE)) == NULL) {\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to open rpivid devices\\n\");\n+        goto fail;\n+    }\n+\n+    if ((rpi->gpu_init_type = rpi_mem_gpu_init(0)) < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to init GPU\\n\");\n+        goto fail;\n+    }\n+\n+    if ((rpi->dec_envs = av_mallocz(sizeof(dec_env_t *) * avctx->thread_count)) == NULL) {\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to alloc %d dec envs\\n\", avctx->thread_count);\n+        goto fail;\n+    }\n+\n+    rpi->col_stride = rnd64(avctx->width);\n+    rpi->col_picsize = rpi->col_stride * (((avctx->height + 63) & ~63) >> 4);\n+    if (gpu_malloc_uncached(rpi->col_picsize * RPIVID_COL_PICS, &rpi->gcolbuf) != 0)\n+    {\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to allocate col mv buffer\\n\");\n+        goto fail;\n+    }\n+\n+    for (unsigned int i = 0; i != RPIVID_BITBUFS; ++i) {\n+        if (gpu_malloc_uncached(RPIVID_BITBUF_SIZE, rpi->gbitbufs + i) != 0)\n+        {\n+            av_log(avctx, AV_LOG_ERROR, \"Failed to allocate bitbuf %d\\n\", i);\n+            goto fail;\n+        }\n+    }\n+\n+    for (unsigned int i = 0; i != RPIVID_COEFFBUFS; ++i) {\n+        if (gpu_malloc_uncached(RPIVID_COEFFBUF_SIZE, rpi->gcoeffbufs + i) != 0)\n+        {\n+            av_log(avctx, AV_LOG_ERROR, \"Failed to allocate coeffbuf %d\\n\", i);\n+            goto fail;\n+        }\n+    }\n+\n+    av_log(avctx, AV_LOG_INFO, \"RPI HEVC h/w accel init OK\\n\");\n+\n+    return 0;\n+\n+fail:\n+    rpi_hevc_free(avctx);\n+    return AVERROR_EXTERNAL;\n+}\n+\n+//////////////////////////////////////////////////////////////////////////////\n+\n+const AVHWAccel ff_hevc_rpi4_8_hwaccel = {\n+    .name           = \"hevc_rpi4_8\",\n+    .type           = AVMEDIA_TYPE_VIDEO,\n+    .id             = AV_CODEC_ID_HEVC,\n+    .pix_fmt        = AV_PIX_FMT_RPI4_8,\n+    .alloc_frame    = rpivid_hevc_alloc_frame,\n+    .start_frame    = rpi_hevc_start_frame,\n+    .end_frame      = rpi_hevc_end_frame,\n+    .abort_frame    = rpi_hevc_abort_frame,\n+    .decode_slice   = rpi_hevc_decode_slice,\n+    .init           = rpi_hevc_init,\n+    .uninit         = rpi_hevc_free,\n+    .priv_data_size = sizeof(RPI_T),\n+    .caps_internal  = HWACCEL_CAP_ASYNC_SAFE | HWACCEL_CAP_MT_SAFE,\n+};\n+\n+const AVHWAccel ff_hevc_rpi4_10_hwaccel = {\n+    .name           = \"hevc_rpi4_10\",\n+    .type           = AVMEDIA_TYPE_VIDEO,\n+    .id             = AV_CODEC_ID_HEVC,\n+    .pix_fmt        = AV_PIX_FMT_RPI4_10,\n+    .alloc_frame    = rpivid_hevc_alloc_frame,\n+    .start_frame    = rpi_hevc_start_frame,\n+    .end_frame      = rpi_hevc_end_frame,\n+    .abort_frame    = rpi_hevc_abort_frame,\n+    .decode_slice   = rpi_hevc_decode_slice,\n+    .init           = rpi_hevc_init,\n+    .uninit         = rpi_hevc_free,\n+    .priv_data_size = sizeof(RPI_T),\n+    .caps_internal  = HWACCEL_CAP_ASYNC_SAFE | HWACCEL_CAP_MT_SAFE,\n+};\n+\ndiff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c\nindex 4b2679eb38..8d80d19788 100644\n--- a/libavcodec/v4l2_buffers.c\n+++ b/libavcodec/v4l2_buffers.c\n@@ -21,6 +21,7 @@\n  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n  */\n \n+#include <drm_fourcc.h>\n #include <linux/videodev2.h>\n #include <sys/ioctl.h>\n #include <sys/mman.h>\n@@ -29,57 +30,88 @@\n #include <poll.h>\n #include \"libavcodec/avcodec.h\"\n #include \"libavcodec/internal.h\"\n+#include \"libavutil/avassert.h\"\n #include \"libavutil/pixdesc.h\"\n+#include \"libavutil/hwcontext.h\"\n #include \"v4l2_context.h\"\n #include \"v4l2_buffers.h\"\n #include \"v4l2_m2m.h\"\n+#include \"v4l2_req_dmabufs.h\"\n+#include \"weak_link.h\"\n \n #define USEC_PER_SEC 1000000\n-static AVRational v4l2_timebase = { 1, USEC_PER_SEC };\n+static const AVRational v4l2_timebase = { 1, USEC_PER_SEC };\n \n-static inline V4L2m2mContext *buf_to_m2mctx(V4L2Buffer *buf)\n+static inline V4L2m2mContext *ctx_to_m2mctx(const V4L2Context *ctx)\n {\n-    return V4L2_TYPE_IS_OUTPUT(buf->context->type) ?\n-        container_of(buf->context, V4L2m2mContext, output) :\n-        container_of(buf->context, V4L2m2mContext, capture);\n+    return V4L2_TYPE_IS_OUTPUT(ctx->type) ?\n+        container_of(ctx, V4L2m2mContext, output) :\n+        container_of(ctx, V4L2m2mContext, capture);\n }\n \n-static inline AVCodecContext *logger(V4L2Buffer *buf)\n+static inline V4L2m2mContext *buf_to_m2mctx(const V4L2Buffer * const buf)\n {\n-    return buf_to_m2mctx(buf)->avctx;\n+    return ctx_to_m2mctx(buf->context);\n }\n \n-static inline AVRational v4l2_get_timebase(V4L2Buffer *avbuf)\n+static inline AVCodecContext *logger(const V4L2Buffer * const buf)\n {\n-    V4L2m2mContext *s = buf_to_m2mctx(avbuf);\n+    return buf_to_m2mctx(buf)->avctx;\n+}\n \n-    if (s->avctx->pkt_timebase.num)\n-        return s->avctx->pkt_timebase;\n-    return s->avctx->time_base;\n+static inline AVRational v4l2_get_timebase(const V4L2Buffer * const avbuf)\n+{\n+    const V4L2m2mContext *s = buf_to_m2mctx(avbuf);\n+    const AVRational tb = s->avctx->pkt_timebase.num ?\n+        s->avctx->pkt_timebase :\n+        s->avctx->time_base;\n+    return tb.num && tb.den ? tb : v4l2_timebase;\n }\n \n-static inline void v4l2_set_pts(V4L2Buffer *out, int64_t pts)\n+static inline struct timeval tv_from_int(const int64_t t)\n {\n-    int64_t v4l2_pts;\n+    return (struct timeval){\n+        .tv_usec = t % USEC_PER_SEC,\n+        .tv_sec  = t / USEC_PER_SEC\n+    };\n+}\n \n-    if (pts == AV_NOPTS_VALUE)\n-        pts = 0;\n+static inline int64_t int_from_tv(const struct timeval t)\n+{\n+    return (int64_t)t.tv_sec * USEC_PER_SEC + t.tv_usec;\n+}\n \n+static inline void v4l2_set_pts(V4L2Buffer * const out, const int64_t pts)\n+{\n     /* convert pts to v4l2 timebase */\n-    v4l2_pts = av_rescale_q(pts, v4l2_get_timebase(out), v4l2_timebase);\n-    out->buf.timestamp.tv_usec = v4l2_pts % USEC_PER_SEC;\n-    out->buf.timestamp.tv_sec = v4l2_pts / USEC_PER_SEC;\n+    const int64_t v4l2_pts =\n+        pts == AV_NOPTS_VALUE ? 0 :\n+            av_rescale_q(pts, v4l2_get_timebase(out), v4l2_timebase);\n+    out->buf.timestamp = tv_from_int(v4l2_pts);\n }\n \n-static inline int64_t v4l2_get_pts(V4L2Buffer *avbuf)\n+static inline int64_t v4l2_get_pts(const V4L2Buffer * const avbuf)\n {\n-    int64_t v4l2_pts;\n-\n+    const int64_t v4l2_pts = int_from_tv(avbuf->buf.timestamp);\n+    return v4l2_pts != 0 ? v4l2_pts : AV_NOPTS_VALUE;\n+#if 0\n     /* convert pts back to encoder timebase */\n-    v4l2_pts = (int64_t)avbuf->buf.timestamp.tv_sec * USEC_PER_SEC +\n-                        avbuf->buf.timestamp.tv_usec;\n+    return\n+        avbuf->context->no_pts_rescale ? v4l2_pts :\n+        v4l2_pts == 0 ? AV_NOPTS_VALUE :\n+            av_rescale_q(v4l2_pts, v4l2_timebase, v4l2_get_timebase(avbuf));\n+#endif\n+}\n \n-    return av_rescale_q(v4l2_pts, v4l2_timebase, v4l2_get_timebase(avbuf));\n+static void set_buf_length(V4L2Buffer *out, unsigned int plane, uint32_t bytesused, uint32_t length)\n+{\n+    if (V4L2_TYPE_IS_MULTIPLANAR(out->buf.type)) {\n+        out->planes[plane].bytesused = bytesused;\n+        out->planes[plane].length = length;\n+    } else {\n+        out->buf.bytesused = bytesused;\n+        out->buf.length = length;\n+    }\n }\n \n static enum AVColorPrimaries v4l2_get_color_primaries(V4L2Buffer *buf)\n@@ -116,6 +148,105 @@ static enum AVColorPrimaries v4l2_get_color_primaries(V4L2Buffer *buf)\n     return AVCOL_PRI_UNSPECIFIED;\n }\n \n+static void v4l2_set_color(V4L2Buffer *buf,\n+                           const enum AVColorPrimaries avcp,\n+                           const enum AVColorSpace avcs,\n+                           const enum AVColorTransferCharacteristic avxc)\n+{\n+    enum v4l2_ycbcr_encoding ycbcr = V4L2_YCBCR_ENC_DEFAULT;\n+    enum v4l2_colorspace cs = V4L2_COLORSPACE_DEFAULT;\n+    enum v4l2_xfer_func xfer = V4L2_XFER_FUNC_DEFAULT;\n+\n+    switch (avcp) {\n+    case AVCOL_PRI_BT709:\n+        cs = V4L2_COLORSPACE_REC709;\n+        ycbcr = V4L2_YCBCR_ENC_709;\n+        break;\n+    case AVCOL_PRI_BT470M:\n+        cs = V4L2_COLORSPACE_470_SYSTEM_M;\n+        ycbcr = V4L2_YCBCR_ENC_601;\n+        break;\n+    case AVCOL_PRI_BT470BG:\n+        cs = V4L2_COLORSPACE_470_SYSTEM_BG;\n+        break;\n+    case AVCOL_PRI_SMPTE170M:\n+        cs = V4L2_COLORSPACE_SMPTE170M;\n+        break;\n+    case AVCOL_PRI_SMPTE240M:\n+        cs = V4L2_COLORSPACE_SMPTE240M;\n+        break;\n+    case AVCOL_PRI_BT2020:\n+        cs = V4L2_COLORSPACE_BT2020;\n+        break;\n+    case AVCOL_PRI_SMPTE428:\n+    case AVCOL_PRI_SMPTE431:\n+    case AVCOL_PRI_SMPTE432:\n+    case AVCOL_PRI_EBU3213:\n+    case AVCOL_PRI_RESERVED:\n+    case AVCOL_PRI_FILM:\n+    case AVCOL_PRI_UNSPECIFIED:\n+    default:\n+        break;\n+    }\n+\n+    switch (avcs) {\n+    case AVCOL_SPC_RGB:\n+        cs = V4L2_COLORSPACE_SRGB;\n+        break;\n+    case AVCOL_SPC_BT709:\n+        cs = V4L2_COLORSPACE_REC709;\n+        break;\n+    case AVCOL_SPC_FCC:\n+        cs = V4L2_COLORSPACE_470_SYSTEM_M;\n+        break;\n+    case AVCOL_SPC_BT470BG:\n+        cs = V4L2_COLORSPACE_470_SYSTEM_BG;\n+        break;\n+    case AVCOL_SPC_SMPTE170M:\n+        cs = V4L2_COLORSPACE_SMPTE170M;\n+        break;\n+    case AVCOL_SPC_SMPTE240M:\n+        cs = V4L2_COLORSPACE_SMPTE240M;\n+        break;\n+    case AVCOL_SPC_BT2020_CL:\n+        cs = V4L2_COLORSPACE_BT2020;\n+        ycbcr = V4L2_YCBCR_ENC_BT2020_CONST_LUM;\n+        break;\n+    case AVCOL_SPC_BT2020_NCL:\n+        cs = V4L2_COLORSPACE_BT2020;\n+        break;\n+    default:\n+        break;\n+    }\n+\n+    switch (xfer) {\n+    case AVCOL_TRC_BT709:\n+        xfer = V4L2_XFER_FUNC_709;\n+        break;\n+    case AVCOL_TRC_IEC61966_2_1:\n+        xfer = V4L2_XFER_FUNC_SRGB;\n+        break;\n+    case AVCOL_TRC_SMPTE240M:\n+        xfer = V4L2_XFER_FUNC_SMPTE240M;\n+        break;\n+    case AVCOL_TRC_SMPTE2084:\n+        xfer = V4L2_XFER_FUNC_SMPTE2084;\n+        break;\n+    default:\n+        break;\n+    }\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(buf->buf.type)) {\n+        buf->context->format.fmt.pix_mp.colorspace = cs;\n+        buf->context->format.fmt.pix_mp.ycbcr_enc = ycbcr;\n+        buf->context->format.fmt.pix_mp.xfer_func = xfer;\n+    } else {\n+        buf->context->format.fmt.pix.colorspace = cs;\n+        buf->context->format.fmt.pix.ycbcr_enc = ycbcr;\n+        buf->context->format.fmt.pix.xfer_func = xfer;\n+    }\n+}\n+\n static enum AVColorRange v4l2_get_color_range(V4L2Buffer *buf)\n {\n     enum v4l2_quantization qt;\n@@ -134,6 +265,20 @@ static enum AVColorRange v4l2_get_color_range(V4L2Buffer *buf)\n      return AVCOL_RANGE_UNSPECIFIED;\n }\n \n+static void v4l2_set_color_range(V4L2Buffer *buf, const enum AVColorRange avcr)\n+{\n+    const enum v4l2_quantization q =\n+        avcr == AVCOL_RANGE_MPEG ? V4L2_QUANTIZATION_LIM_RANGE :\n+        avcr == AVCOL_RANGE_JPEG ? V4L2_QUANTIZATION_FULL_RANGE :\n+            V4L2_QUANTIZATION_DEFAULT;\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(buf->buf.type)) {\n+        buf->context->format.fmt.pix_mp.quantization = q;\n+    } else {\n+        buf->context->format.fmt.pix.quantization = q;\n+    }\n+}\n+\n static enum AVColorSpace v4l2_get_color_space(V4L2Buffer *buf)\n {\n     enum v4l2_ycbcr_encoding ycbcr;\n@@ -210,73 +355,178 @@ static enum AVColorTransferCharacteristic v4l2_get_color_trc(V4L2Buffer *buf)\n     return AVCOL_TRC_UNSPECIFIED;\n }\n \n-static void v4l2_free_buffer(void *opaque, uint8_t *unused)\n+static int v4l2_buf_is_interlaced(const V4L2Buffer * const buf)\n {\n-    V4L2Buffer* avbuf = opaque;\n-    V4L2m2mContext *s = buf_to_m2mctx(avbuf);\n+    return V4L2_FIELD_IS_INTERLACED(buf->buf.field);\n+}\n \n-    if (atomic_fetch_sub(&avbuf->context_refcount, 1) == 1) {\n-        atomic_fetch_sub_explicit(&s->refcount, 1, memory_order_acq_rel);\n+static int v4l2_buf_is_top_first(const V4L2Buffer * const buf)\n+{\n+    return buf->buf.field == V4L2_FIELD_INTERLACED_TB;\n+}\n \n-        if (s->reinit) {\n-            if (!atomic_load(&s->refcount))\n-                sem_post(&s->refsync);\n-        } else {\n-            if (s->draining && V4L2_TYPE_IS_OUTPUT(avbuf->context->type)) {\n-                /* no need to queue more buffers to the driver */\n-                avbuf->status = V4L2BUF_AVAILABLE;\n-            }\n-            else if (avbuf->context->streamon)\n-                ff_v4l2_buffer_enqueue(avbuf);\n-        }\n+static void v4l2_set_interlace(V4L2Buffer * const buf, const int is_interlaced, const int is_tff)\n+{\n+    buf->buf.field = !is_interlaced ? V4L2_FIELD_NONE :\n+        is_tff ? V4L2_FIELD_INTERLACED_TB : V4L2_FIELD_INTERLACED_BT;\n+}\n \n-        av_buffer_unref(&avbuf->context_ref);\n+static uint8_t * v4l2_get_drm_frame(V4L2Buffer *avbuf)\n+{\n+    AVDRMFrameDescriptor *drm_desc = &avbuf->drm_frame;\n+    AVDRMLayerDescriptor *layer;\n+\n+    /* fill the DRM frame descriptor */\n+    drm_desc->nb_objects = avbuf->num_planes;\n+    drm_desc->nb_layers = 1;\n+\n+    layer = &drm_desc->layers[0];\n+    layer->nb_planes = avbuf->num_planes;\n+\n+    for (int i = 0; i < avbuf->num_planes; i++) {\n+        layer->planes[i].object_index = i;\n+        layer->planes[i].offset = avbuf->plane_info[i].offset;\n+        layer->planes[i].pitch = avbuf->plane_info[i].bytesperline;\n     }\n+\n+    switch (avbuf->context->av_pix_fmt) {\n+    case AV_PIX_FMT_YUYV422:\n+\n+        layer->format = DRM_FORMAT_YUYV;\n+        layer->nb_planes = 1;\n+\n+        break;\n+\n+    case AV_PIX_FMT_NV12:\n+    case AV_PIX_FMT_NV21:\n+\n+        layer->format = avbuf->context->av_pix_fmt == AV_PIX_FMT_NV12 ?\n+            DRM_FORMAT_NV12 : DRM_FORMAT_NV21;\n+\n+        if (avbuf->num_planes > 1)\n+            break;\n+\n+        layer->nb_planes = 2;\n+\n+        layer->planes[1].object_index = 0;\n+        layer->planes[1].offset = avbuf->plane_info[0].bytesperline *\n+            avbuf->context->format.fmt.pix.height;\n+        layer->planes[1].pitch = avbuf->plane_info[0].bytesperline;\n+        break;\n+\n+    case AV_PIX_FMT_YUV420P:\n+\n+        layer->format = DRM_FORMAT_YUV420;\n+\n+        if (avbuf->num_planes > 1)\n+            break;\n+\n+        layer->nb_planes = 3;\n+\n+        layer->planes[1].object_index = 0;\n+        layer->planes[1].offset = avbuf->plane_info[0].bytesperline *\n+            avbuf->context->format.fmt.pix.height;\n+        layer->planes[1].pitch = avbuf->plane_info[0].bytesperline >> 1;\n+\n+        layer->planes[2].object_index = 0;\n+        layer->planes[2].offset = layer->planes[1].offset +\n+            ((avbuf->plane_info[0].bytesperline *\n+              avbuf->context->format.fmt.pix.height) >> 2);\n+        layer->planes[2].pitch = avbuf->plane_info[0].bytesperline >> 1;\n+        break;\n+\n+    default:\n+        drm_desc->nb_layers = 0;\n+        break;\n+    }\n+\n+    return (uint8_t *) drm_desc;\n }\n \n-static int v4l2_buf_increase_ref(V4L2Buffer *in)\n+static void v4l2_free_bufref(void *opaque, uint8_t *data)\n {\n-    V4L2m2mContext *s = buf_to_m2mctx(in);\n+    AVBufferRef * bufref = (AVBufferRef *)data;\n+    V4L2Buffer *avbuf = (V4L2Buffer *)bufref->data;\n+    struct V4L2Context *ctx = ff_weak_link_lock(&avbuf->context_wl);\n \n-    if (in->context_ref)\n-        atomic_fetch_add(&in->context_refcount, 1);\n-    else {\n-        in->context_ref = av_buffer_ref(s->self_ref);\n-        if (!in->context_ref)\n-            return AVERROR(ENOMEM);\n+    if (ctx != NULL) {\n+        // Buffer still attached to context\n+        V4L2m2mContext *s = buf_to_m2mctx(avbuf);\n \n-        in->context_refcount = 1;\n-    }\n+        ff_mutex_lock(&ctx->lock);\n \n-    in->status = V4L2BUF_RET_USER;\n-    atomic_fetch_add_explicit(&s->refcount, 1, memory_order_relaxed);\n+        ff_v4l2_buffer_set_avail(avbuf);\n \n-    return 0;\n+        if (s->draining && V4L2_TYPE_IS_OUTPUT(ctx->type)) {\n+            av_log(logger(avbuf), AV_LOG_DEBUG, \"%s: Buffer avail\\n\", ctx->name);\n+            /* no need to queue more buffers to the driver */\n+        }\n+        else if (ctx->streamon) {\n+            av_log(logger(avbuf), AV_LOG_DEBUG, \"%s: Buffer requeue\\n\", ctx->name);\n+            avbuf->buf.timestamp.tv_sec = 0;\n+            avbuf->buf.timestamp.tv_usec = 0;\n+            ff_v4l2_buffer_enqueue(avbuf);  // will set to IN_DRIVER\n+        }\n+        else {\n+            av_log(logger(avbuf), AV_LOG_DEBUG, \"%s: Buffer freed but streamoff\\n\", ctx->name);\n+        }\n+\n+        ff_mutex_unlock(&ctx->lock);\n+    }\n+\n+    ff_weak_link_unlock(avbuf->context_wl);\n+    av_buffer_unref(&bufref);\n }\n \n-static int v4l2_buf_to_bufref(V4L2Buffer *in, int plane, AVBufferRef **buf)\n+static inline uint32_t ff_v4l2_buf_len(const struct v4l2_buffer * b, unsigned int i)\n {\n-    int ret;\n+    return V4L2_TYPE_IS_MULTIPLANAR(b->type) ? b->m.planes[i].length : b->length;\n+}\n \n-    if (plane >= in->num_planes)\n-        return AVERROR(EINVAL);\n+static int v4l2_buffer_export_drm(V4L2Buffer* avbuf)\n+{\n+    int i, ret;\n+    const V4L2m2mContext * const s = buf_to_m2mctx(avbuf);\n \n-    /* even though most encoders return 0 in data_offset encoding vp8 does require this value */\n-    *buf = av_buffer_create((char *)in->plane_info[plane].mm_addr + in->planes[plane].data_offset,\n-                            in->plane_info[plane].length, v4l2_free_buffer, in, 0);\n-    if (!*buf)\n-        return AVERROR(ENOMEM);\n+    for (i = 0; i < avbuf->num_planes; i++) {\n+        int dma_fd = -1;\n+        const uint32_t blen = ff_v4l2_buf_len(&avbuf->buf, i);\n+\n+        if (s->db_ctl != NULL) {\n+            if ((avbuf->dmabuf[i] = dmabuf_alloc(s->db_ctl, blen)) == NULL)\n+                return AVERROR(ENOMEM);\n+            dma_fd = dmabuf_fd(avbuf->dmabuf[i]);\n+            if (V4L2_TYPE_IS_MULTIPLANAR(avbuf->buf.type))\n+                avbuf->buf.m.planes[i].m.fd = dma_fd;\n+            else\n+                avbuf->buf.m.fd = dma_fd;\n+        }\n+        else {\n+            struct v4l2_exportbuffer expbuf;\n+            memset(&expbuf, 0, sizeof(expbuf));\n+\n+            expbuf.index = avbuf->buf.index;\n+            expbuf.type = avbuf->buf.type;\n+            expbuf.plane = i;\n+\n+            ret = ioctl(s->fd, VIDIOC_EXPBUF, &expbuf);\n+            if (ret < 0)\n+                return AVERROR(errno);\n+            dma_fd = expbuf.fd;\n+        }\n \n-    ret = v4l2_buf_increase_ref(in);\n-    if (ret)\n-        av_buffer_unref(buf);\n+        avbuf->drm_frame.objects[i].size = blen;\n+        avbuf->drm_frame.objects[i].fd = dma_fd;\n+        avbuf->drm_frame.objects[i].format_modifier = DRM_FORMAT_MOD_LINEAR;\n+    }\n \n-    return ret;\n+    return 0;\n }\n \n static int v4l2_bufref_to_buf(V4L2Buffer *out, int plane, const uint8_t* data, int size, int offset)\n {\n     unsigned int bytesused, length;\n+    int rv = 0;\n \n     if (plane >= out->num_planes)\n         return AVERROR(EINVAL);\n@@ -284,32 +534,57 @@ static int v4l2_bufref_to_buf(V4L2Buffer *out, int plane, const uint8_t* data, i\n     length = out->plane_info[plane].length;\n     bytesused = FFMIN(size+offset, length);\n \n-    memcpy((uint8_t*)out->plane_info[plane].mm_addr+offset, data, FFMIN(size, length-offset));\n-\n-    if (V4L2_TYPE_IS_MULTIPLANAR(out->buf.type)) {\n-        out->planes[plane].bytesused = bytesused;\n-        out->planes[plane].length = length;\n-    } else {\n-        out->buf.bytesused = bytesused;\n-        out->buf.length = length;\n+    if (size > length - offset) {\n+        size = length - offset;\n+        rv = AVERROR(ENOMEM);\n     }\n \n-    return 0;\n+    memcpy((uint8_t*)out->plane_info[plane].mm_addr+offset, data, size);\n+\n+    set_buf_length(out, plane, bytesused, length);\n+\n+    return rv;\n+}\n+\n+static AVBufferRef * wrap_avbuf(V4L2Buffer * const avbuf)\n+{\n+    AVBufferRef * bufref = av_buffer_ref(avbuf->context->bufrefs[avbuf->buf.index]);\n+    AVBufferRef * newbuf;\n+\n+    if (!bufref)\n+        return NULL;\n+\n+    newbuf = av_buffer_create((uint8_t *)bufref, sizeof(*bufref), v4l2_free_bufref, NULL, 0);\n+    if (newbuf == NULL)\n+        av_buffer_unref(&bufref);\n+\n+    avbuf->status = V4L2BUF_RET_USER;\n+    return newbuf;\n }\n \n static int v4l2_buffer_buf_to_swframe(AVFrame *frame, V4L2Buffer *avbuf)\n {\n-    int i, ret;\n+    int i;\n \n     frame->format = avbuf->context->av_pix_fmt;\n \n-    for (i = 0; i < avbuf->num_planes; i++) {\n-        ret = v4l2_buf_to_bufref(avbuf, i, &frame->buf[i]);\n-        if (ret)\n-            return ret;\n+    frame->buf[0] = wrap_avbuf(avbuf);\n+    if (frame->buf[0] == NULL)\n+        return AVERROR(ENOMEM);\n \n+    if (buf_to_m2mctx(avbuf)->output_drm) {\n+        /* 1. get references to the actual data */\n+        frame->data[0] = (uint8_t *) v4l2_get_drm_frame(avbuf);\n+        frame->format = AV_PIX_FMT_DRM_PRIME;\n+        frame->hw_frames_ctx = av_buffer_ref(avbuf->context->frames_ref);\n+        return 0;\n+    }\n+\n+\n+    /* 1. get references to the actual data */\n+    for (i = 0; i < avbuf->num_planes; i++) {\n+        frame->data[i] = (uint8_t *)avbuf->plane_info[i].mm_addr + avbuf->planes[i].data_offset;\n         frame->linesize[i] = avbuf->plane_info[i].bytesperline;\n-        frame->data[i] = frame->buf[i]->data;\n     }\n \n     /* fixup special cases */\n@@ -318,17 +593,17 @@ static int v4l2_buffer_buf_to_swframe(AVFrame *frame, V4L2Buffer *avbuf)\n     case AV_PIX_FMT_NV21:\n         if (avbuf->num_planes > 1)\n             break;\n-        frame->linesize[1] = avbuf->plane_info[0].bytesperline;\n-        frame->data[1] = frame->buf[0]->data + avbuf->plane_info[0].bytesperline * avbuf->context->format.fmt.pix_mp.height;\n+        frame->linesize[1] = frame->linesize[0];\n+        frame->data[1] = frame->data[0] + frame->linesize[0] * ff_v4l2_get_format_height(&avbuf->context->format);\n         break;\n \n     case AV_PIX_FMT_YUV420P:\n         if (avbuf->num_planes > 1)\n             break;\n-        frame->linesize[1] = avbuf->plane_info[0].bytesperline >> 1;\n-        frame->linesize[2] = avbuf->plane_info[0].bytesperline >> 1;\n-        frame->data[1] = frame->buf[0]->data + avbuf->plane_info[0].bytesperline * avbuf->context->format.fmt.pix_mp.height;\n-        frame->data[2] = frame->data[1] + ((avbuf->plane_info[0].bytesperline * avbuf->context->format.fmt.pix_mp.height) >> 2);\n+        frame->linesize[1] = frame->linesize[0] / 2;\n+        frame->linesize[2] = frame->linesize[1];\n+        frame->data[1] = frame->data[0] + frame->linesize[0] * ff_v4l2_get_format_height(&avbuf->context->format);\n+        frame->data[2] = frame->data[1] + frame->linesize[1] * ff_v4l2_get_format_height(&avbuf->context->format) / 2;\n         break;\n \n     default:\n@@ -338,68 +613,127 @@ static int v4l2_buffer_buf_to_swframe(AVFrame *frame, V4L2Buffer *avbuf)\n     return 0;\n }\n \n+static void cpy_2d(uint8_t * dst, int dst_stride, const uint8_t * src, int src_stride, int w, int h)\n+{\n+    if (dst_stride == src_stride && w + 32 >= dst_stride) {\n+        memcpy(dst, src, dst_stride * h);\n+    }\n+    else {\n+        while (--h >= 0) {\n+            memcpy(dst, src, w);\n+            dst += dst_stride;\n+            src += src_stride;\n+        }\n+    }\n+}\n+\n+static int is_chroma(const AVPixFmtDescriptor *desc, int i, int num_planes)\n+{\n+    return i != 0  && !(i == num_planes - 1 && (desc->flags & AV_PIX_FMT_FLAG_ALPHA));\n+}\n+\n+static int v4l2_buffer_primeframe_to_buf(const AVFrame *frame, V4L2Buffer *out)\n+{\n+    const AVDRMFrameDescriptor *const src = (const AVDRMFrameDescriptor *)frame->data[0];\n+\n+    if (frame->format != AV_PIX_FMT_DRM_PRIME || !src)\n+        return AVERROR(EINVAL);\n+\n+    av_assert0(out->buf.memory == V4L2_MEMORY_DMABUF);\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(out->buf.type)) {\n+        // Only currently cope with single buffer types\n+        if (out->buf.length != 1)\n+            return AVERROR_PATCHWELCOME;\n+        if (src->nb_objects != 1)\n+            return AVERROR(EINVAL);\n+\n+        out->planes[0].m.fd = src->objects[0].fd;\n+    }\n+    else {\n+        if (src->nb_objects != 1)\n+            return AVERROR(EINVAL);\n+\n+        out->buf.m.fd      = src->objects[0].fd;\n+    }\n+\n+    // No need to copy src AVDescriptor and if we did then we may confuse\n+    // fd close on free\n+    out->ref_buf = av_buffer_ref(frame->buf[0]);\n+\n+    return 0;\n+}\n+\n static int v4l2_buffer_swframe_to_buf(const AVFrame *frame, V4L2Buffer *out)\n {\n-    int i, ret;\n-    struct v4l2_format fmt = out->context->format;\n-    int pixel_format = V4L2_TYPE_IS_MULTIPLANAR(fmt.type) ?\n-                       fmt.fmt.pix_mp.pixelformat : fmt.fmt.pix.pixelformat;\n-    int height       = V4L2_TYPE_IS_MULTIPLANAR(fmt.type) ?\n-                       fmt.fmt.pix_mp.height : fmt.fmt.pix.height;\n-    int is_planar_format = 0;\n-\n-    switch (pixel_format) {\n-    case V4L2_PIX_FMT_YUV420M:\n-    case V4L2_PIX_FMT_YVU420M:\n-#ifdef V4L2_PIX_FMT_YUV422M\n-    case V4L2_PIX_FMT_YUV422M:\n-#endif\n-#ifdef V4L2_PIX_FMT_YVU422M\n-    case V4L2_PIX_FMT_YVU422M:\n-#endif\n-#ifdef V4L2_PIX_FMT_YUV444M\n-    case V4L2_PIX_FMT_YUV444M:\n-#endif\n-#ifdef V4L2_PIX_FMT_YVU444M\n-    case V4L2_PIX_FMT_YVU444M:\n-#endif\n-    case V4L2_PIX_FMT_NV12M:\n-    case V4L2_PIX_FMT_NV21M:\n-    case V4L2_PIX_FMT_NV12MT_16X16:\n-    case V4L2_PIX_FMT_NV12MT:\n-    case V4L2_PIX_FMT_NV16M:\n-    case V4L2_PIX_FMT_NV61M:\n-        is_planar_format = 1;\n-    }\n-\n-    if (!is_planar_format) {\n-        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);\n-        int planes_nb = 0;\n-        int offset = 0;\n-\n-        for (i = 0; i < desc->nb_components; i++)\n-            planes_nb = FFMAX(planes_nb, desc->comp[i].plane + 1);\n-\n-        for (i = 0; i < planes_nb; i++) {\n-            int size, h = height;\n-            if (i == 1 || i == 2) {\n+    int i;\n+    int num_planes = 0;\n+    int pel_strides[4] = {0};\n+\n+    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);\n+\n+    if ((desc->flags & AV_PIX_FMT_FLAG_HWACCEL) != 0) {\n+        av_log(NULL, AV_LOG_ERROR, \"%s: HWACCEL cannot be copied\\n\", __func__);\n+        return -1;\n+    }\n+\n+    for (i = 0; i != desc->nb_components; ++i) {\n+        if (desc->comp[i].plane >= num_planes)\n+            num_planes = desc->comp[i].plane + 1;\n+        pel_strides[desc->comp[i].plane] = desc->comp[i].step;\n+    }\n+\n+    if (out->num_planes > 1) {\n+        if (num_planes != out->num_planes) {\n+            av_log(NULL, AV_LOG_ERROR, \"%s: Num planes mismatch: %d != %d\\n\", __func__, num_planes, out->num_planes);\n+            return -1;\n+        }\n+        for (i = 0; i != num_planes; ++i) {\n+            int w = frame->width;\n+            int h = frame->height;\n+            if (is_chroma(desc, i, num_planes)) {\n+                w = AV_CEIL_RSHIFT(w, desc->log2_chroma_w);\n                 h = AV_CEIL_RSHIFT(h, desc->log2_chroma_h);\n             }\n-            size = frame->linesize[i] * h;\n-            ret = v4l2_bufref_to_buf(out, 0, frame->data[i], size, offset);\n-            if (ret)\n-                return ret;\n-            offset += size;\n+\n+            cpy_2d(out->plane_info[i].mm_addr, out->plane_info[i].bytesperline,\n+                   frame->data[i], frame->linesize[i],\n+                   w * pel_strides[i], h);\n+            set_buf_length(out, i, out->plane_info[i].bytesperline * h, out->plane_info[i].length);\n         }\n-        return 0;\n     }\n+    else\n+    {\n+        unsigned int offset = 0;\n+\n+        for (i = 0; i != num_planes; ++i) {\n+            int w = frame->width;\n+            int h = frame->height;\n+            int dst_stride = out->plane_info[0].bytesperline;\n+            uint8_t * const dst = (uint8_t *)out->plane_info[0].mm_addr + offset;\n+\n+            if (is_chroma(desc, i, num_planes)) {\n+                // Is chroma\n+                dst_stride >>= desc->log2_chroma_w;\n+                offset += dst_stride * (out->context->height >> desc->log2_chroma_h);\n+                w = AV_CEIL_RSHIFT(w, desc->log2_chroma_w);\n+                h = AV_CEIL_RSHIFT(h, desc->log2_chroma_h);\n+            }\n+            else {\n+                // Is luma or alpha\n+                offset += dst_stride * out->context->height;\n+            }\n+            if (offset > out->plane_info[0].length) {\n+                av_log(NULL, AV_LOG_ERROR, \"%s: Plane total %u > buffer size %zu\\n\", __func__, offset, out->plane_info[0].length);\n+                return -1;\n+            }\n \n-    for (i = 0; i < out->num_planes; i++) {\n-        ret = v4l2_bufref_to_buf(out, i, frame->buf[i]->data, frame->buf[i]->size, 0);\n-        if (ret)\n-            return ret;\n+            cpy_2d(dst, dst_stride,\n+                   frame->data[i], frame->linesize[i],\n+                   w * pel_strides[i], h);\n+        }\n+        set_buf_length(out, 0, offset, out->plane_info[0].length);\n     }\n-\n     return 0;\n }\n \n@@ -409,16 +743,31 @@ static int v4l2_buffer_swframe_to_buf(const AVFrame *frame, V4L2Buffer *out)\n  *\n  ******************************************************************************/\n \n-int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out)\n+int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out, const int64_t track_ts)\n {\n-    v4l2_set_pts(out, frame->pts);\n-\n-    return v4l2_buffer_swframe_to_buf(frame, out);\n+    out->buf.flags = frame->key_frame ?\n+        (out->buf.flags | V4L2_BUF_FLAG_KEYFRAME) :\n+        (out->buf.flags & ~V4L2_BUF_FLAG_KEYFRAME);\n+    // Beware that colour info is held in format rather than the actual\n+    // v4l2 buffer struct so this may not be as useful as you might hope\n+    v4l2_set_color(out, frame->color_primaries, frame->colorspace, frame->color_trc);\n+    v4l2_set_color_range(out, frame->color_range);\n+    // PTS & interlace are buffer vars\n+    if (track_ts)\n+        out->buf.timestamp = tv_from_int(track_ts);\n+    else\n+        v4l2_set_pts(out, frame->pts);\n+    v4l2_set_interlace(out, frame->interlaced_frame, frame->top_field_first);\n+\n+    return frame->format == AV_PIX_FMT_DRM_PRIME ?\n+        v4l2_buffer_primeframe_to_buf(frame, out) :\n+        v4l2_buffer_swframe_to_buf(frame, out);\n }\n \n int ff_v4l2_buffer_buf_to_avframe(AVFrame *frame, V4L2Buffer *avbuf)\n {\n     int ret;\n+    V4L2Context * const ctx = avbuf->context;\n \n     av_frame_unref(frame);\n \n@@ -429,17 +778,32 @@ int ff_v4l2_buffer_buf_to_avframe(AVFrame *frame, V4L2Buffer *avbuf)\n \n     /* 2. get frame information */\n     frame->key_frame = !!(avbuf->buf.flags & V4L2_BUF_FLAG_KEYFRAME);\n+    frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I :\n+        (avbuf->buf.flags & V4L2_BUF_FLAG_PFRAME) != 0 ? AV_PICTURE_TYPE_P :\n+        (avbuf->buf.flags & V4L2_BUF_FLAG_BFRAME) != 0 ? AV_PICTURE_TYPE_B :\n+            AV_PICTURE_TYPE_NONE;\n     frame->color_primaries = v4l2_get_color_primaries(avbuf);\n     frame->colorspace = v4l2_get_color_space(avbuf);\n     frame->color_range = v4l2_get_color_range(avbuf);\n     frame->color_trc = v4l2_get_color_trc(avbuf);\n     frame->pts = v4l2_get_pts(avbuf);\n     frame->pkt_dts = AV_NOPTS_VALUE;\n+    frame->interlaced_frame = v4l2_buf_is_interlaced(avbuf);\n+    frame->top_field_first = v4l2_buf_is_top_first(avbuf);\n \n     /* these values are updated also during re-init in v4l2_process_driver_event */\n-    frame->height = avbuf->context->height;\n-    frame->width = avbuf->context->width;\n-    frame->sample_aspect_ratio = avbuf->context->sample_aspect_ratio;\n+    frame->height = ctx->height;\n+    frame->width = ctx->width;\n+    frame->sample_aspect_ratio = ctx->sample_aspect_ratio;\n+\n+    if (ctx->selection.height && ctx->selection.width) {\n+        frame->crop_left = ctx->selection.left < frame->width ? ctx->selection.left : 0;\n+        frame->crop_top  = ctx->selection.top < frame->height ? ctx->selection.top  : 0;\n+        frame->crop_right = ctx->selection.left + ctx->selection.width < frame->width ?\n+            frame->width - (ctx->selection.left + ctx->selection.width) : 0;\n+        frame->crop_bottom = ctx->selection.top + ctx->selection.height < frame->height ?\n+            frame->height - (ctx->selection.top + ctx->selection.height) : 0;\n+    }\n \n     /* 3. report errors upstream */\n     if (avbuf->buf.flags & V4L2_BUF_FLAG_ERROR) {\n@@ -452,15 +816,15 @@ int ff_v4l2_buffer_buf_to_avframe(AVFrame *frame, V4L2Buffer *avbuf)\n \n int ff_v4l2_buffer_buf_to_avpkt(AVPacket *pkt, V4L2Buffer *avbuf)\n {\n-    int ret;\n-\n     av_packet_unref(pkt);\n-    ret = v4l2_buf_to_bufref(avbuf, 0, &pkt->buf);\n-    if (ret)\n-        return ret;\n+\n+    pkt->buf = wrap_avbuf(avbuf);\n+    if (pkt->buf == NULL)\n+        return AVERROR(ENOMEM);\n \n     pkt->size = V4L2_TYPE_IS_MULTIPLANAR(avbuf->buf.type) ? avbuf->buf.m.planes[0].bytesused : avbuf->buf.bytesused;\n-    pkt->data = pkt->buf->data;\n+    pkt->data = (uint8_t*)avbuf->plane_info[0].mm_addr + avbuf->planes[0].data_offset;\n+    pkt->flags = 0;\n \n     if (avbuf->buf.flags & V4L2_BUF_FLAG_KEYFRAME)\n         pkt->flags |= AV_PKT_FLAG_KEY;\n@@ -475,39 +839,107 @@ int ff_v4l2_buffer_buf_to_avpkt(AVPacket *pkt, V4L2Buffer *avbuf)\n     return 0;\n }\n \n-int ff_v4l2_buffer_avpkt_to_buf(const AVPacket *pkt, V4L2Buffer *out)\n+int ff_v4l2_buffer_avpkt_to_buf_ext(const AVPacket * const pkt, V4L2Buffer * const out,\n+                                    const void *extdata, size_t extlen,\n+                                    const int64_t timestamp)\n {\n     int ret;\n \n-    ret = v4l2_bufref_to_buf(out, 0, pkt->data, pkt->size, 0);\n-    if (ret)\n+    if (extlen) {\n+        ret = v4l2_bufref_to_buf(out, 0, extdata, extlen, 0);\n+        if (ret)\n+            return ret;\n+    }\n+\n+    ret = v4l2_bufref_to_buf(out, 0, pkt->data, pkt->size, extlen);\n+    if (ret && ret != AVERROR(ENOMEM))\n         return ret;\n \n-    v4l2_set_pts(out, pkt->pts);\n+    if (timestamp)\n+        out->buf.timestamp = tv_from_int(timestamp);\n+    else\n+        v4l2_set_pts(out, pkt->pts);\n \n-    if (pkt->flags & AV_PKT_FLAG_KEY)\n-        out->flags = V4L2_BUF_FLAG_KEYFRAME;\n+    out->buf.flags = (pkt->flags & AV_PKT_FLAG_KEY) != 0 ?\n+        (out->buf.flags | V4L2_BUF_FLAG_KEYFRAME) :\n+        (out->buf.flags & ~V4L2_BUF_FLAG_KEYFRAME);\n \n-    return 0;\n+    return ret;\n+}\n+\n+int ff_v4l2_buffer_avpkt_to_buf(const AVPacket *pkt, V4L2Buffer *out)\n+{\n+    return ff_v4l2_buffer_avpkt_to_buf_ext(pkt, out, NULL, 0, 0);\n }\n \n-int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index)\n+\n+static void v4l2_buffer_buffer_free(void *opaque, uint8_t *data)\n+{\n+    V4L2Buffer * const avbuf = (V4L2Buffer *)data;\n+    int i;\n+\n+    for (i = 0; i != FF_ARRAY_ELEMS(avbuf->plane_info); ++i) {\n+        struct V4L2Plane_info *p = avbuf->plane_info + i;\n+        if (p->mm_addr != NULL)\n+            munmap(p->mm_addr, p->length);\n+    }\n+\n+    if (avbuf->dmabuf[0] == NULL) {\n+        for (i = 0; i != FF_ARRAY_ELEMS(avbuf->drm_frame.objects); ++i) {\n+            if (avbuf->drm_frame.objects[i].fd != -1)\n+                close(avbuf->drm_frame.objects[i].fd);\n+        }\n+    }\n+    else {\n+        for (i = 0; i != FF_ARRAY_ELEMS(avbuf->dmabuf); ++i) {\n+            dmabuf_free(avbuf->dmabuf[i]);\n+        }\n+    }\n+\n+    av_buffer_unref(&avbuf->ref_buf);\n+\n+    ff_weak_link_unref(&avbuf->context_wl);\n+\n+    av_free(avbuf);\n+}\n+\n+\n+int ff_v4l2_buffer_initialize(AVBufferRef ** pbufref, int index, V4L2Context *ctx, enum v4l2_memory mem)\n {\n-    V4L2Context *ctx = avbuf->context;\n     int ret, i;\n+    V4L2Buffer * const avbuf = av_mallocz(sizeof(*avbuf));\n+    AVBufferRef * bufref;\n+    V4L2m2mContext * const s = ctx_to_m2mctx(ctx);\n \n-    avbuf->buf.memory = V4L2_MEMORY_MMAP;\n+    *pbufref = NULL;\n+    if (avbuf == NULL)\n+        return AVERROR(ENOMEM);\n+\n+    bufref = av_buffer_create((uint8_t*)avbuf, sizeof(*avbuf), v4l2_buffer_buffer_free, NULL, 0);\n+    if (bufref == NULL) {\n+        av_free(avbuf);\n+        return AVERROR(ENOMEM);\n+    }\n+\n+    avbuf->context = ctx;\n+    avbuf->buf.memory = mem;\n     avbuf->buf.type = ctx->type;\n     avbuf->buf.index = index;\n \n+    for (i = 0; i != FF_ARRAY_ELEMS(avbuf->drm_frame.objects); ++i) {\n+        avbuf->drm_frame.objects[i].fd = -1;\n+    }\n+\n+    avbuf->context_wl = ff_weak_link_ref(ctx->wl_master);\n+\n     if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) {\n         avbuf->buf.length = VIDEO_MAX_PLANES;\n         avbuf->buf.m.planes = avbuf->planes;\n     }\n \n-    ret = ioctl(buf_to_m2mctx(avbuf)->fd, VIDIOC_QUERYBUF, &avbuf->buf);\n+    ret = ioctl(s->fd, VIDIOC_QUERYBUF, &avbuf->buf);\n     if (ret < 0)\n-        return AVERROR(errno);\n+        goto fail;\n \n     if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) {\n         avbuf->num_planes = 0;\n@@ -520,6 +952,8 @@ int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index)\n         avbuf->num_planes = 1;\n \n     for (i = 0; i < avbuf->num_planes; i++) {\n+        const int want_mmap = avbuf->buf.memory == V4L2_MEMORY_MMAP &&\n+            (V4L2_TYPE_IS_OUTPUT(ctx->type) || !buf_to_m2mctx(avbuf)->output_drm);\n \n         avbuf->plane_info[i].bytesperline = V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ?\n             ctx->format.fmt.pix_mp.plane_fmt[i].bytesperline :\n@@ -527,25 +961,31 @@ int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index)\n \n         if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) {\n             avbuf->plane_info[i].length = avbuf->buf.m.planes[i].length;\n-            avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.m.planes[i].length,\n-                                           PROT_READ | PROT_WRITE, MAP_SHARED,\n-                                           buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.planes[i].m.mem_offset);\n+            avbuf->plane_info[i].offset = avbuf->buf.m.planes[i].data_offset;\n+\n+            if (want_mmap)\n+                avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.m.planes[i].length,\n+                                               PROT_READ | PROT_WRITE, MAP_SHARED,\n+                                               buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.planes[i].m.mem_offset);\n         } else {\n             avbuf->plane_info[i].length = avbuf->buf.length;\n-            avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.length,\n-                                          PROT_READ | PROT_WRITE, MAP_SHARED,\n-                                          buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.offset);\n+            avbuf->plane_info[i].offset = 0;\n+\n+            if (want_mmap)\n+                avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.length,\n+                                               PROT_READ | PROT_WRITE, MAP_SHARED,\n+                                               buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.offset);\n         }\n \n-        if (avbuf->plane_info[i].mm_addr == MAP_FAILED)\n-            return AVERROR(ENOMEM);\n+        if (avbuf->plane_info[i].mm_addr == MAP_FAILED) {\n+            avbuf->plane_info[i].mm_addr = NULL;\n+            ret = AVERROR(ENOMEM);\n+            goto fail;\n+        }\n     }\n \n     avbuf->status = V4L2BUF_AVAILABLE;\n \n-    if (V4L2_TYPE_IS_OUTPUT(ctx->type))\n-        return 0;\n-\n     if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) {\n         avbuf->buf.m.planes = avbuf->planes;\n         avbuf->buf.length   = avbuf->num_planes;\n@@ -555,20 +995,53 @@ int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index)\n         avbuf->buf.length    = avbuf->planes[0].length;\n     }\n \n-    return ff_v4l2_buffer_enqueue(avbuf);\n+    if (!V4L2_TYPE_IS_OUTPUT(ctx->type)) {\n+        if (s->output_drm) {\n+            ret = v4l2_buffer_export_drm(avbuf);\n+            if (ret) {\n+                av_log(logger(avbuf), AV_LOG_ERROR, \"Failed to get exported drm handles\\n\");\n+                goto fail;\n+            }\n+        }\n+    }\n+\n+    *pbufref = bufref;\n+    return 0;\n+\n+fail:\n+    av_buffer_unref(&bufref);\n+    return ret;\n }\n \n int ff_v4l2_buffer_enqueue(V4L2Buffer* avbuf)\n {\n     int ret;\n+    int qc;\n \n-    avbuf->buf.flags = avbuf->flags;\n+    if (avbuf->buf.timestamp.tv_sec || avbuf->buf.timestamp.tv_usec) {\n+        av_log(logger(avbuf), AV_LOG_DEBUG, \"--- %s pre VIDIOC_QBUF: index %d, ts=%ld.%06ld count=%d\\n\",\n+               avbuf->context->name, avbuf->buf.index,\n+               avbuf->buf.timestamp.tv_sec, avbuf->buf.timestamp.tv_usec,\n+               avbuf->context->q_count);\n+    }\n \n     ret = ioctl(buf_to_m2mctx(avbuf)->fd, VIDIOC_QBUF, &avbuf->buf);\n-    if (ret < 0)\n-        return AVERROR(errno);\n+    if (ret < 0) {\n+        int err = errno;\n+        av_log(logger(avbuf), AV_LOG_ERROR, \"--- %s VIDIOC_QBUF: index %d FAIL err %d (%s)\\n\",\n+               avbuf->context->name, avbuf->buf.index,\n+               err, strerror(err));\n+        return AVERROR(err);\n+    }\n \n+    // Lock not wanted - if called from buffer free then lock already obtained\n+    qc = atomic_fetch_add(&avbuf->context->q_count, 1) + 1;\n     avbuf->status = V4L2BUF_IN_DRIVER;\n+    pthread_cond_broadcast(&avbuf->context->cond);\n+\n+    av_log(logger(avbuf), AV_LOG_DEBUG, \"--- %s VIDIOC_QBUF: index %d, ts=%ld.%06ld count=%d\\n\",\n+           avbuf->context->name, avbuf->buf.index,\n+           avbuf->buf.timestamp.tv_sec, avbuf->buf.timestamp.tv_usec, qc);\n \n     return 0;\n }\ndiff --git a/libavcodec/v4l2_buffers.h b/libavcodec/v4l2_buffers.h\nindex 8dbc7fc104..0bda4dd06b 100644\n--- a/libavcodec/v4l2_buffers.h\n+++ b/libavcodec/v4l2_buffers.h\n@@ -27,29 +27,44 @@\n #include <stdatomic.h>\n #include <linux/videodev2.h>\n \n+#include \"libavutil/hwcontext_drm.h\"\n #include \"avcodec.h\"\n \n enum V4L2Buffer_status {\n     V4L2BUF_AVAILABLE,\n     V4L2BUF_IN_DRIVER,\n+    V4L2BUF_IN_USE,\n     V4L2BUF_RET_USER,\n };\n \n /**\n  * V4L2Buffer (wrapper for v4l2_buffer management)\n  */\n+struct V4L2Context;\n+struct ff_weak_link_client;\n+struct dmabuf_h;\n+\n typedef struct V4L2Buffer {\n-    /* each buffer needs to have a reference to its context */\n+    /* each buffer needs to have a reference to its context\n+     * The pointer is good enough for most operation but once the buffer has\n+     * been passed to the user the buffer may become orphaned so for free ops\n+     * the weak link must be used to ensure that the context is actually\n+     * there\n+     */\n     struct V4L2Context *context;\n+    struct ff_weak_link_client *context_wl;\n \n-    /* This object is refcounted per-plane, so we need to keep track\n-     * of how many context-refs we are holding. */\n-    AVBufferRef *context_ref;\n-    atomic_uint context_refcount;\n+    /* DRM descriptor */\n+    AVDRMFrameDescriptor drm_frame;\n+    /* For DRM_PRIME encode - need to keep a ref to the source buffer till we\n+     * are done\n+     */\n+    AVBufferRef * ref_buf;\n \n     /* keep track of the mmap address and mmap length */\n     struct V4L2Plane_info {\n-        int bytesperline;\n+        size_t bytesperline;\n+        size_t offset;\n         void * mm_addr;\n         size_t length;\n     } plane_info[VIDEO_MAX_PLANES];\n@@ -60,9 +75,9 @@ typedef struct V4L2Buffer {\n     struct v4l2_buffer buf;\n     struct v4l2_plane planes[VIDEO_MAX_PLANES];\n \n-    int flags;\n     enum V4L2Buffer_status status;\n \n+    struct dmabuf_h * dmabuf[VIDEO_MAX_PLANES]; // If externally alloced dmabufs - stash other info here\n } V4L2Buffer;\n \n /**\n@@ -98,6 +113,10 @@ int ff_v4l2_buffer_buf_to_avpkt(AVPacket *pkt, V4L2Buffer *buf);\n  */\n int ff_v4l2_buffer_avpkt_to_buf(const AVPacket *pkt, V4L2Buffer *out);\n \n+int ff_v4l2_buffer_avpkt_to_buf_ext(const AVPacket * const pkt, V4L2Buffer * const out,\n+                                    const void *extdata, size_t extlen,\n+                                    const int64_t timestamp);\n+\n /**\n  * Extracts the data from an AVFrame to a V4L2Buffer\n  *\n@@ -106,7 +125,7 @@ int ff_v4l2_buffer_avpkt_to_buf(const AVPacket *pkt, V4L2Buffer *out);\n  *\n  * @returns 0 in case of success, a negative AVERROR code otherwise\n  */\n-int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out);\n+int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out, const int64_t track_ts);\n \n /**\n  * Initializes a V4L2Buffer\n@@ -116,7 +135,7 @@ int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out);\n  *\n  * @returns 0 in case of success, a negative AVERROR code otherwise\n  */\n-int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index);\n+int ff_v4l2_buffer_initialize(AVBufferRef **avbuf, int index, struct V4L2Context *ctx, enum v4l2_memory mem);\n \n /**\n  * Enqueues a V4L2Buffer\n@@ -127,5 +146,12 @@ int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index);\n  */\n int ff_v4l2_buffer_enqueue(V4L2Buffer* avbuf);\n \n+static inline void\n+ff_v4l2_buffer_set_avail(V4L2Buffer* const avbuf)\n+{\n+    avbuf->status = V4L2BUF_AVAILABLE;\n+    av_buffer_unref(&avbuf->ref_buf);\n+}\n+\n \n #endif // AVCODEC_V4L2_BUFFERS_H\ndiff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c\nindex ff1ea8e57b..65b2648557 100644\n--- a/libavcodec/v4l2_context.c\n+++ b/libavcodec/v4l2_context.c\n@@ -27,11 +27,13 @@\n #include <unistd.h>\n #include <fcntl.h>\n #include <poll.h>\n+#include \"libavutil/avassert.h\"\n #include \"libavcodec/avcodec.h\"\n #include \"libavcodec/internal.h\"\n #include \"v4l2_buffers.h\"\n #include \"v4l2_fmt.h\"\n #include \"v4l2_m2m.h\"\n+#include \"weak_link.h\"\n \n struct v4l2_format_update {\n     uint32_t v4l2_fmt;\n@@ -41,26 +43,168 @@ struct v4l2_format_update {\n     int update_avfmt;\n };\n \n-static inline V4L2m2mContext *ctx_to_m2mctx(V4L2Context *ctx)\n+\n+static inline int64_t track_to_pts(AVCodecContext *avctx, unsigned int n)\n {\n-    return V4L2_TYPE_IS_OUTPUT(ctx->type) ?\n-        container_of(ctx, V4L2m2mContext, output) :\n-        container_of(ctx, V4L2m2mContext, capture);\n+    return (int64_t)n;\n }\n \n-static inline AVCodecContext *logger(V4L2Context *ctx)\n+static inline unsigned int pts_to_track(AVCodecContext *avctx, const int64_t pts)\n {\n-    return ctx_to_m2mctx(ctx)->avctx;\n+    return (unsigned int)pts;\n }\n \n-static inline unsigned int v4l2_get_width(struct v4l2_format *fmt)\n+// FFmpeg requires us to propagate a number of vars from the coded pkt into\n+// the decoded frame. The only thing that tracks like that in V4L2 stateful\n+// is timestamp. PTS maps to timestamp for this decode. FFmpeg makes no\n+// guarantees about PTS being unique or specified for every frame so replace\n+// the supplied PTS with a simple incrementing number and keep a circular\n+// buffer of all the things we want preserved (including the original PTS)\n+// indexed by the tracking no.\n+static int64_t\n+xlat_pts_pkt_in(AVCodecContext *const avctx, xlat_track_t *const x, const AVPacket *const avpkt)\n {\n-    return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.width : fmt->fmt.pix.width;\n+    int64_t track_pts;\n+\n+    // Avoid 0\n+    if (++x->track_no == 0)\n+        x->track_no = 1;\n+\n+    track_pts = track_to_pts(avctx, x->track_no);\n+\n+    av_log(avctx, AV_LOG_TRACE, \"In pkt PTS=%\" PRId64 \", DTS=%\" PRId64 \", track=%\" PRId64 \", n=%u\\n\", avpkt->pts, avpkt->dts, track_pts, x->track_no);\n+    x->track_els[x->track_no  % FF_V4L2_M2M_TRACK_SIZE] = (V4L2m2mTrackEl){\n+        .discard          = 0,\n+        .pending          = 1,\n+        .pkt_size         = avpkt->size,\n+        .pts              = avpkt->pts,\n+        .dts              = avpkt->dts,\n+        .reordered_opaque = avctx->reordered_opaque,\n+        .pkt_pos          = avpkt->pos,\n+        .pkt_duration     = avpkt->duration,\n+        .track_pts        = track_pts\n+    };\n+    return track_pts;\n+}\n+\n+static int64_t\n+xlat_pts_frame_in(AVCodecContext *const avctx, xlat_track_t *const x, const AVFrame *const frame)\n+{\n+    int64_t track_pts;\n+\n+    // Avoid 0\n+    if (++x->track_no == 0)\n+        x->track_no = 1;\n+\n+    track_pts = track_to_pts(avctx, x->track_no);\n+\n+    av_log(avctx, AV_LOG_TRACE, \"In frame PTS=%\" PRId64 \", track=%\" PRId64 \", n=%u\\n\", frame->pts, track_pts, x->track_no);\n+    x->track_els[x->track_no  % FF_V4L2_M2M_TRACK_SIZE] = (V4L2m2mTrackEl){\n+        .discard          = 0,\n+        .pending          = 1,\n+        .pkt_size         = 0,\n+        .pts              = frame->pts,\n+        .dts              = AV_NOPTS_VALUE,\n+        .reordered_opaque = frame->reordered_opaque,\n+        .pkt_pos          = frame->pkt_pos,\n+        .pkt_duration     = frame->pkt_duration,\n+        .track_pts        = track_pts\n+    };\n+    return track_pts;\n }\n \n-static inline unsigned int v4l2_get_height(struct v4l2_format *fmt)\n+\n+// Returns -1 if we should discard the frame\n+static int\n+xlat_pts_frame_out(AVCodecContext *const avctx,\n+             xlat_track_t * const x,\n+             AVFrame *const frame)\n {\n-    return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.height : fmt->fmt.pix.height;\n+    unsigned int n = pts_to_track(avctx, frame->pts) % FF_V4L2_M2M_TRACK_SIZE;\n+    V4L2m2mTrackEl *const t = x->track_els + n;\n+    if (frame->pts == AV_NOPTS_VALUE || frame->pts != t->track_pts)\n+    {\n+        av_log(avctx, frame->pts == AV_NOPTS_VALUE ? AV_LOG_DEBUG : AV_LOG_WARNING,\n+               \"Frame tracking failure: pts=%\" PRId64 \", track[%d]=%\" PRId64 \"\\n\", frame->pts, n, t->track_pts);\n+        frame->pts              = AV_NOPTS_VALUE;\n+        frame->pkt_dts          = AV_NOPTS_VALUE;\n+        frame->reordered_opaque = x->last_opaque;\n+        frame->pkt_pos          = -1;\n+        frame->pkt_duration     = 0;\n+        frame->pkt_size         = -1;\n+    }\n+    else if (!t->discard)\n+    {\n+        frame->pts              = t->pending ? t->pts : AV_NOPTS_VALUE;\n+        frame->pkt_dts          = t->dts;\n+        frame->reordered_opaque = t->reordered_opaque;\n+        frame->pkt_pos          = t->pkt_pos;\n+        frame->pkt_duration     = t->pkt_duration;\n+        frame->pkt_size         = t->pkt_size;\n+\n+        x->last_opaque = x->track_els[n].reordered_opaque;\n+        if (frame->pts != AV_NOPTS_VALUE)\n+            x->last_pts = frame->pts;\n+        t->pending = 0;\n+    }\n+    else\n+    {\n+        av_log(avctx, AV_LOG_DEBUG, \"Discard frame (flushed): pts=%\" PRId64 \", track[%d]=%\" PRId64 \"\\n\", frame->pts, n, t->track_pts);\n+        return -1;\n+    }\n+\n+    av_log(avctx, AV_LOG_TRACE, \"Out frame PTS=%\" PRId64 \"/%\"PRId64\", DTS=%\" PRId64 \", track=%\"PRId64\", n=%d\\n\",\n+           frame->pts, frame->best_effort_timestamp, frame->pkt_dts, t->track_pts, n);\n+    return 0;\n+}\n+\n+// Returns -1 if we should discard the frame\n+static int\n+xlat_pts_pkt_out(AVCodecContext *const avctx,\n+             xlat_track_t * const x,\n+             AVPacket *const pkt)\n+{\n+    unsigned int n = pts_to_track(avctx, pkt->pts) % FF_V4L2_M2M_TRACK_SIZE;\n+    V4L2m2mTrackEl *const t = x->track_els + n;\n+    if (pkt->pts == AV_NOPTS_VALUE || pkt->pts != t->track_pts)\n+    {\n+        av_log(avctx, pkt->pts == AV_NOPTS_VALUE ? AV_LOG_DEBUG : AV_LOG_WARNING,\n+               \"Pkt tracking failure: pts=%\" PRId64 \", track[%d]=%\" PRId64 \"\\n\", pkt->pts, n, t->track_pts);\n+        pkt->pts                = AV_NOPTS_VALUE;\n+    }\n+    else if (!t->discard)\n+    {\n+        pkt->pts                = t->pending ? t->pts : AV_NOPTS_VALUE;\n+\n+        x->last_opaque = x->track_els[n].reordered_opaque;\n+        if (pkt->pts != AV_NOPTS_VALUE)\n+            x->last_pts = pkt->pts;\n+        t->pending = 0;\n+    }\n+    else\n+    {\n+        av_log(avctx, AV_LOG_DEBUG, \"Discard packet (flushed): pts=%\" PRId64 \", track[%d]=%\" PRId64 \"\\n\", pkt->pts, n, t->track_pts);\n+        return -1;\n+    }\n+\n+    // * Would like something much better than this...xlat(offset + out_count)?\n+    pkt->dts = pkt->pts;\n+    av_log(avctx, AV_LOG_TRACE, \"Out pkt PTS=%\" PRId64 \", track=%\"PRId64\", n=%d\\n\",\n+           pkt->pts, t->track_pts, n);\n+    return 0;\n+}\n+\n+\n+static inline V4L2m2mContext *ctx_to_m2mctx(const V4L2Context *ctx)\n+{\n+    return V4L2_TYPE_IS_OUTPUT(ctx->type) ?\n+        container_of(ctx, V4L2m2mContext, output) :\n+        container_of(ctx, V4L2m2mContext, capture);\n+}\n+\n+static inline AVCodecContext *logger(const V4L2Context *ctx)\n+{\n+    return ctx_to_m2mctx(ctx)->avctx;\n }\n \n static AVRational v4l2_get_sar(V4L2Context *ctx)\n@@ -81,21 +225,29 @@ static AVRational v4l2_get_sar(V4L2Context *ctx)\n     return sar;\n }\n \n-static inline unsigned int v4l2_resolution_changed(V4L2Context *ctx, struct v4l2_format *fmt2)\n+static inline int ctx_buffers_alloced(const V4L2Context * const ctx)\n+{\n+    return ctx->bufrefs != NULL;\n+}\n+\n+// Width/Height changed or we don't have an alloc in the first place?\n+static int ctx_resolution_changed(const V4L2Context *ctx, const struct v4l2_format *fmt2)\n {\n-    struct v4l2_format *fmt1 = &ctx->format;\n-    int ret =  V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ?\n-        fmt1->fmt.pix_mp.width != fmt2->fmt.pix_mp.width ||\n-        fmt1->fmt.pix_mp.height != fmt2->fmt.pix_mp.height\n-        :\n-        fmt1->fmt.pix.width != fmt2->fmt.pix.width ||\n-        fmt1->fmt.pix.height != fmt2->fmt.pix.height;\n+    const struct v4l2_format *fmt1 = &ctx->format;\n+    int ret = !ctx_buffers_alloced(ctx) ||\n+        (V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ?\n+            fmt1->fmt.pix_mp.width != fmt2->fmt.pix_mp.width ||\n+            fmt1->fmt.pix_mp.height != fmt2->fmt.pix_mp.height\n+            :\n+            fmt1->fmt.pix.width != fmt2->fmt.pix.width ||\n+            fmt1->fmt.pix.height != fmt2->fmt.pix.height);\n \n     if (ret)\n-        av_log(logger(ctx), AV_LOG_DEBUG, \"%s changed (%dx%d) -> (%dx%d)\\n\",\n+        av_log(logger(ctx), AV_LOG_DEBUG, \"V4L2 %s changed: alloc=%d (%dx%d) -> (%dx%d)\\n\",\n             ctx->name,\n-            v4l2_get_width(fmt1), v4l2_get_height(fmt1),\n-            v4l2_get_width(fmt2), v4l2_get_height(fmt2));\n+            ctx_buffers_alloced(ctx),\n+            ff_v4l2_get_format_width(fmt1), ff_v4l2_get_format_height(fmt1),\n+            ff_v4l2_get_format_width(fmt2), ff_v4l2_get_format_height(fmt2));\n \n     return ret;\n }\n@@ -153,90 +305,110 @@ static inline void v4l2_save_to_context(V4L2Context* ctx, struct v4l2_format_upd\n     }\n }\n \n-/**\n- * handle resolution change event and end of stream event\n- * returns 1 if reinit was successful, negative if it failed\n- * returns 0 if reinit was not executed\n- */\n-static int v4l2_handle_event(V4L2Context *ctx)\n+static int get_default_selection(V4L2Context * const ctx, struct v4l2_rect *r)\n {\n-    V4L2m2mContext *s = ctx_to_m2mctx(ctx);\n-    struct v4l2_format cap_fmt = s->capture.format;\n-    struct v4l2_format out_fmt = s->output.format;\n-    struct v4l2_event evt = { 0 };\n-    int full_reinit, reinit, ret;\n+    V4L2m2mContext * const s = ctx_to_m2mctx(ctx);\n+    struct v4l2_selection selection = {\n+        .type = V4L2_BUF_TYPE_VIDEO_CAPTURE,\n+        .target = V4L2_SEL_TGT_COMPOSE\n+    };\n \n-    ret = ioctl(s->fd, VIDIOC_DQEVENT, &evt);\n-    if (ret < 0) {\n-        av_log(logger(ctx), AV_LOG_ERROR, \"%s VIDIOC_DQEVENT\\n\", ctx->name);\n-        return 0;\n-    }\n+    memset(r, 0, sizeof(*r));\n+    if (ioctl(s->fd, VIDIOC_G_SELECTION, &selection))\n+        return AVERROR(errno);\n \n-    if (evt.type == V4L2_EVENT_EOS) {\n-        ctx->done = 1;\n-        return 0;\n-    }\n+    *r = selection.r;\n+    return 0;\n+}\n \n-    if (evt.type != V4L2_EVENT_SOURCE_CHANGE)\n-        return 0;\n+static int do_source_change(V4L2m2mContext * const s)\n+{\n+    AVCodecContext *const avctx = s->avctx;\n \n-    ret = ioctl(s->fd, VIDIOC_G_FMT, &out_fmt);\n-    if (ret) {\n-        av_log(logger(ctx), AV_LOG_ERROR, \"%s VIDIOC_G_FMT\\n\", s->output.name);\n-        return 0;\n-    }\n+    int ret;\n+    int reinit;\n+    struct v4l2_format cap_fmt = s->capture.format;\n+\n+    s->capture.done = 0;\n \n     ret = ioctl(s->fd, VIDIOC_G_FMT, &cap_fmt);\n     if (ret) {\n-        av_log(logger(ctx), AV_LOG_ERROR, \"%s VIDIOC_G_FMT\\n\", s->capture.name);\n+        av_log(avctx, AV_LOG_ERROR, \"%s VIDIOC_G_FMT failed\\n\", s->capture.name);\n         return 0;\n     }\n \n-    full_reinit = v4l2_resolution_changed(&s->output, &out_fmt);\n-    if (full_reinit) {\n-        s->output.height = v4l2_get_height(&out_fmt);\n-        s->output.width = v4l2_get_width(&out_fmt);\n-        s->output.sample_aspect_ratio = v4l2_get_sar(&s->output);\n-    }\n+    get_default_selection(&s->capture, &s->capture.selection);\n+\n+    reinit = ctx_resolution_changed(&s->capture, &cap_fmt);\n+    if ((s->quirks & FF_V4L2_QUIRK_REINIT_ALWAYS) != 0)\n+        reinit = 1;\n \n-    reinit = v4l2_resolution_changed(&s->capture, &cap_fmt);\n+    s->capture.format = cap_fmt;\n     if (reinit) {\n-        s->capture.height = v4l2_get_height(&cap_fmt);\n-        s->capture.width = v4l2_get_width(&cap_fmt);\n-        s->capture.sample_aspect_ratio = v4l2_get_sar(&s->capture);\n+        s->capture.height = ff_v4l2_get_format_height(&cap_fmt);\n+        s->capture.width = ff_v4l2_get_format_width(&cap_fmt);\n     }\n \n-    if (full_reinit || reinit)\n-        s->reinit = 1;\n-\n-    if (full_reinit) {\n-        ret = ff_v4l2_m2m_codec_full_reinit(s);\n-        if (ret) {\n-            av_log(logger(ctx), AV_LOG_ERROR, \"v4l2_m2m_codec_full_reinit\\n\");\n-            return AVERROR(EINVAL);\n-        }\n-        goto reinit_run;\n+    // If we don't support selection (or it is bust) and we obviously have HD then kludge\n+    if ((s->capture.selection.width == 0 || s->capture.selection.height == 0) &&\n+        (s->capture.height == 1088 && s->capture.width == 1920)) {\n+        s->capture.selection = (struct v4l2_rect){.width = 1920, .height = 1080};\n     }\n \n+    s->capture.sample_aspect_ratio = v4l2_get_sar(&s->capture);\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"Source change: SAR: %d/%d, wxh %dx%d crop %dx%d @ %d,%d, reinit=%d\\n\",\n+           s->capture.sample_aspect_ratio.num, s->capture.sample_aspect_ratio.den,\n+           s->capture.width, s->capture.height,\n+           s->capture.selection.width, s->capture.selection.height,\n+           s->capture.selection.left, s->capture.selection.top, reinit);\n+\n     if (reinit) {\n-        if (s->avctx)\n-            ret = ff_set_dimensions(s->avctx, s->capture.width, s->capture.height);\n+        if (avctx)\n+            ret = ff_set_dimensions(s->avctx,\n+                                    s->capture.selection.width != 0 ? s->capture.selection.width : s->capture.width,\n+                                    s->capture.selection.height != 0 ? s->capture.selection.height : s->capture.height);\n         if (ret < 0)\n-            av_log(logger(ctx), AV_LOG_WARNING, \"update avcodec height and width\\n\");\n+            av_log(avctx, AV_LOG_WARNING, \"update avcodec height and width failed\\n\");\n \n         ret = ff_v4l2_m2m_codec_reinit(s);\n         if (ret) {\n-            av_log(logger(ctx), AV_LOG_ERROR, \"v4l2_m2m_codec_reinit\\n\");\n+            av_log(avctx, AV_LOG_ERROR, \"v4l2_m2m_codec_reinit failed\\n\");\n             return AVERROR(EINVAL);\n         }\n+\n+        if (s->capture.width > ff_v4l2_get_format_width(&s->capture.format) ||\n+            s->capture.height > ff_v4l2_get_format_height(&s->capture.format)) {\n+            av_log(avctx, AV_LOG_ERROR, \"Format post reinit too small: wanted %dx%d > got %dx%d\\n\",\n+                   s->capture.width, s->capture.height,\n+                   ff_v4l2_get_format_width(&s->capture.format), ff_v4l2_get_format_height(&s->capture.format));\n+            return AVERROR(EINVAL);\n+        }\n+\n+        // Update pixel format - should only actually do something on initial change\n+        s->capture.av_pix_fmt =\n+            ff_v4l2_format_v4l2_to_avfmt(ff_v4l2_get_format_pixelformat(&s->capture.format), AV_CODEC_ID_RAWVIDEO);\n+        if (s->output_drm) {\n+            avctx->pix_fmt = AV_PIX_FMT_DRM_PRIME;\n+            avctx->sw_pix_fmt = s->capture.av_pix_fmt;\n+        }\n+        else\n+            avctx->pix_fmt = s->capture.av_pix_fmt;\n+\n         goto reinit_run;\n     }\n \n-    /* dummy event received */\n-    return 0;\n+    /* Buffers are OK so just stream off to ack */\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: Parameters only - restart decode\\n\", __func__);\n+\n+    ret = ff_v4l2_context_set_status(&s->capture, VIDIOC_STREAMOFF);\n+    if (ret)\n+        av_log(avctx, AV_LOG_ERROR, \"capture VIDIOC_STREAMOFF failed\\n\");\n+    s->draining = 0;\n \n     /* reinit executed */\n reinit_run:\n+    ret = ff_v4l2_context_set_status(&s->capture, VIDIOC_STREAMON);\n     return 1;\n }\n \n@@ -280,171 +452,293 @@ static int v4l2_stop_encode(V4L2Context *ctx)\n     return 0;\n }\n \n-static V4L2Buffer* v4l2_dequeue_v4l2buf(V4L2Context *ctx, int timeout)\n+// DQ a buffer\n+// Amalgamates all the various ways there are of signalling EOS/Event to\n+// generate a consistant EPIPE.\n+//\n+// Sets ctx->flag_last if next dq would produce EPIPE (i.e. stream has stopped)\n+//\n+// Returns:\n+//  0               Success\n+//  AVERROR(EPIPE)  Nothing more to read\n+//  AVERROR(ENOSPC) No buffers in Q to put result in\n+//  *               AVERROR(..)\n+\n+ static int\n+dq_buf(V4L2Context * const ctx, V4L2Buffer ** const ppavbuf)\n {\n-    struct v4l2_plane planes[VIDEO_MAX_PLANES];\n-    struct v4l2_buffer buf = { 0 };\n-    V4L2Buffer *avbuf;\n-    struct pollfd pfd = {\n-        .events =  POLLIN | POLLRDNORM | POLLPRI | POLLOUT | POLLWRNORM, /* default blocking capture */\n-        .fd = ctx_to_m2mctx(ctx)->fd,\n+    V4L2m2mContext * const m = ctx_to_m2mctx(ctx);\n+    AVCodecContext * const avctx = m->avctx;\n+    V4L2Buffer * avbuf;\n+    const int is_mp = V4L2_TYPE_IS_MULTIPLANAR(ctx->type);\n+\n+    struct v4l2_plane planes[VIDEO_MAX_PLANES] = {{0}};\n+\n+    struct v4l2_buffer buf = {\n+        .type = ctx->type,\n+        .memory = V4L2_MEMORY_MMAP,\n     };\n-    int i, ret;\n \n-    if (!V4L2_TYPE_IS_OUTPUT(ctx->type) && ctx->buffers) {\n-        for (i = 0; i < ctx->num_buffers; i++) {\n-            if (ctx->buffers[i].status == V4L2BUF_IN_DRIVER)\n-                break;\n-        }\n-        if (i == ctx->num_buffers)\n-            av_log(logger(ctx), AV_LOG_WARNING, \"All capture buffers returned to \"\n-                                                \"userspace. Increase num_capture_buffers \"\n-                                                \"to prevent device deadlock or dropped \"\n-                                                \"packets/frames.\\n\");\n-    }\n-\n-    /* if we are draining and there are no more capture buffers queued in the driver we are done */\n-    if (!V4L2_TYPE_IS_OUTPUT(ctx->type) && ctx_to_m2mctx(ctx)->draining) {\n-        for (i = 0; i < ctx->num_buffers; i++) {\n-            /* capture buffer initialization happens during decode hence\n-             * detection happens at runtime\n-             */\n-            if (!ctx->buffers)\n-                break;\n-\n-            if (ctx->buffers[i].status == V4L2BUF_IN_DRIVER)\n-                goto start;\n+    *ppavbuf = NULL;\n+\n+    if (ctx->flag_last)\n+        return AVERROR(EPIPE);\n+\n+    if (is_mp) {\n+        buf.length = VIDEO_MAX_PLANES;\n+        buf.m.planes = planes;\n+    }\n+\n+    while (ioctl(m->fd, VIDIOC_DQBUF, &buf) != 0) {\n+        const int err = errno;\n+        av_assert0(AVERROR(err) < 0);\n+        if (err != EINTR) {\n+            av_log(avctx, AV_LOG_DEBUG, \"%s VIDIOC_DQBUF, errno (%s)\\n\",\n+                ctx->name, av_err2str(AVERROR(err)));\n+\n+            if (err == EPIPE)\n+                ctx->flag_last = 1;\n+\n+            return AVERROR(err);\n         }\n-        ctx->done = 1;\n-        return NULL;\n     }\n+    atomic_fetch_sub(&ctx->q_count, 1);\n+\n+    avbuf = (V4L2Buffer *)ctx->bufrefs[buf.index]->data;\n+    ff_v4l2_buffer_set_avail(avbuf);\n+    avbuf->buf = buf;\n+    if (is_mp) {\n+        memcpy(avbuf->planes, planes, sizeof(planes));\n+        avbuf->buf.m.planes = avbuf->planes;\n+    }\n+    // Done with any attached buffer\n+    av_buffer_unref(&avbuf->ref_buf);\n \n-start:\n-    if (V4L2_TYPE_IS_OUTPUT(ctx->type))\n-        pfd.events =  POLLOUT | POLLWRNORM;\n-    else {\n-        /* no need to listen to requests for more input while draining */\n-        if (ctx_to_m2mctx(ctx)->draining)\n-            pfd.events =  POLLIN | POLLRDNORM | POLLPRI;\n+    if (V4L2_TYPE_IS_CAPTURE(ctx->type)) {\n+        // Zero length cap buffer return == EOS\n+        if ((is_mp ? buf.m.planes[0].bytesused : buf.bytesused) == 0) {\n+            av_log(avctx, AV_LOG_DEBUG, \"Buffer empty - reQ\\n\");\n+\n+            // Must reQ so we don't leak\n+            // May not matter if the next thing we do is release all the\n+            // buffers but better to be tidy.\n+            ff_v4l2_buffer_enqueue(avbuf);\n+\n+            ctx->flag_last = 1;\n+            return AVERROR(EPIPE);\n+        }\n+\n+#ifdef V4L2_BUF_FLAG_LAST\n+        // If flag_last set then this contains data but is the last frame\n+        // so remember that but return OK\n+        if ((buf.flags & V4L2_BUF_FLAG_LAST) != 0)\n+            ctx->flag_last = 1;\n+#endif\n     }\n \n-    for (;;) {\n-        ret = poll(&pfd, 1, timeout);\n-        if (ret > 0)\n-            break;\n-        if (errno == EINTR)\n+    *ppavbuf = avbuf;\n+    return 0;\n+}\n+\n+/**\n+ * handle resolution change event and end of stream event\n+ * Expects to be called after the stream has stopped\n+ *\n+ * returns 1 if reinit was successful, negative if it failed\n+ * returns 0 if reinit was not executed\n+ */\n+static int\n+get_event(V4L2m2mContext * const m)\n+{\n+    AVCodecContext * const avctx = m->avctx;\n+    struct v4l2_event evt = { 0 };\n+\n+    while (ioctl(m->fd, VIDIOC_DQEVENT, &evt) != 0) {\n+        const int rv = AVERROR(errno);\n+        if (rv == AVERROR(EINTR))\n             continue;\n-        return NULL;\n+        if (rv == AVERROR(EAGAIN)) {\n+            av_log(avctx, AV_LOG_WARNING, \"V4L2 failed to get expected event - assume EOS\\n\");\n+            return AVERROR_EOF;\n+        }\n+        av_log(avctx, AV_LOG_ERROR, \"V4L2 VIDIOC_DQEVENT: %s\\n\", av_err2str(rv));\n+        return rv;\n     }\n \n-    /* 0. handle errors */\n-    if (pfd.revents & POLLERR) {\n-        /* if we are trying to get free buffers but none have been queued yet\n-           no need to raise a warning */\n-        if (timeout == 0) {\n-            for (i = 0; i < ctx->num_buffers; i++) {\n-                if (ctx->buffers[i].status != V4L2BUF_AVAILABLE)\n-                    av_log(logger(ctx), AV_LOG_WARNING, \"%s POLLERR\\n\", ctx->name);\n-            }\n-        }\n-        else\n-            av_log(logger(ctx), AV_LOG_WARNING, \"%s POLLERR\\n\", ctx->name);\n+    av_log(avctx, AV_LOG_DEBUG, \"Dq event %d\\n\", evt.type);\n \n-        return NULL;\n+    if (evt.type == V4L2_EVENT_EOS) {\n+        av_log(avctx, AV_LOG_TRACE, \"V4L2 VIDIOC_EVENT_EOS\\n\");\n+        return AVERROR_EOF;\n     }\n \n-    /* 1. handle resolution changes */\n-    if (pfd.revents & POLLPRI) {\n-        ret = v4l2_handle_event(ctx);\n-        if (ret < 0) {\n-            /* if re-init failed, abort */\n-            ctx->done = 1;\n-            return NULL;\n-        }\n-        if (ret) {\n-            /* if re-init was successful drop the buffer (if there was one)\n-             * since we had to reconfigure capture (unmap all buffers)\n-             */\n-            return NULL;\n+    if (evt.type == V4L2_EVENT_SOURCE_CHANGE)\n+        return do_source_change(m);\n+\n+    return 0;\n+}\n+\n+static inline int\n+dq_ok(const V4L2Context * const c)\n+{\n+    return c->streamon && atomic_load(&c->q_count) != 0;\n+}\n+\n+// Get a buffer\n+// If output then just gets the buffer in the expected way\n+// If capture then runs the capture state m/c to deal with res change etc.\n+// If return value == 0 then *ppavbuf != NULL\n+\n+static int\n+get_qbuf(V4L2Context * const ctx, V4L2Buffer ** const ppavbuf, const int timeout)\n+{\n+    V4L2m2mContext * const m = ctx_to_m2mctx(ctx);\n+    AVCodecContext * const avctx = m->avctx;\n+    const int is_cap = V4L2_TYPE_IS_CAPTURE(ctx->type);\n+\n+    const unsigned int poll_cap = (POLLIN | POLLRDNORM);\n+    const unsigned int poll_out = (POLLOUT | POLLWRNORM);\n+    const unsigned int poll_event = POLLPRI;\n+\n+    *ppavbuf = NULL;\n+\n+    for (;;) {\n+        struct pollfd pfd = {\n+            .fd = m->fd,\n+            // If capture && stream not started then assume we are waiting for the initial event\n+            .events = !is_cap ? poll_out :\n+                !ff_v4l2_ctx_eos(ctx) && ctx->streamon ? poll_cap :\n+                    poll_event,\n+        };\n+        int ret;\n+\n+        if (ctx->done) {\n+            av_log(avctx, AV_LOG_TRACE, \"V4L2 %s already done\\n\", ctx->name);\n+            return AVERROR_EOF;\n         }\n-    }\n \n-    /* 2. dequeue the buffer */\n-    if (pfd.revents & (POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM)) {\n+        // If capture && timeout == -1 then also wait for rx buffer free\n+        if (is_cap && timeout == -1 && dq_ok(&m->output) && !m->draining)\n+            pfd.events |= poll_out;\n \n-        if (!V4L2_TYPE_IS_OUTPUT(ctx->type)) {\n-            /* there is a capture buffer ready */\n-            if (pfd.revents & (POLLIN | POLLRDNORM))\n-                goto dequeue;\n+        // If nothing Qed all we will get is POLLERR - avoid that\n+        if ((pfd.events == poll_out && !dq_ok(&m->output)) ||\n+            (pfd.events == poll_cap && !dq_ok(&m->capture)) ||\n+            (pfd.events == (poll_cap | poll_out) && !dq_ok(&m->capture) && !dq_ok(&m->output))) {\n+            av_log(avctx, AV_LOG_TRACE, \"V4L2 poll %s empty\\n\", ctx->name);\n+            return AVERROR(ENOSPC);\n+        }\n \n-            /* the driver is ready to accept more input; instead of waiting for the capture\n-             * buffer to complete we return NULL so input can proceed (we are single threaded)\n-             */\n-            if (pfd.revents & (POLLOUT | POLLWRNORM))\n-                return NULL;\n+        // Timeout kludged s.t. \"forever\" eventually gives up & produces logging\n+        // If waiting for an event when we have seen a last_frame then we expect\n+        //   it to be ready already so force a short timeout\n+        ret = poll(&pfd, 1,\n+                   ff_v4l2_ctx_eos(ctx) ? 10 :\n+                   timeout == -1 ? 3000 : timeout);\n+        if (ret < 0) {\n+            ret = AVERROR(errno);  // Remember errno before logging etc.\n+            av_assert0(ret < 0);\n         }\n \n-dequeue:\n-        memset(&buf, 0, sizeof(buf));\n-        buf.memory = V4L2_MEMORY_MMAP;\n-        buf.type = ctx->type;\n-        if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) {\n-            memset(planes, 0, sizeof(planes));\n-            buf.length = VIDEO_MAX_PLANES;\n-            buf.m.planes = planes;\n+        av_log(avctx, AV_LOG_TRACE, \"V4L2 poll %s ret=%d, timeout=%d, events=%#x, revents=%#x\\n\",\n+               ctx->name, ret, timeout, pfd.events, pfd.revents);\n+\n+        if (ret < 0) {\n+            if (ret == AVERROR(EINTR))\n+                continue;\n+            av_log(avctx, AV_LOG_ERROR, \"V4L2 %s poll error %d (%s)\\n\", ctx->name, AVUNERROR(ret), av_err2str(ret));\n+            return ret;\n         }\n \n-        ret = ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_DQBUF, &buf);\n-        if (ret) {\n-            if (errno != EAGAIN) {\n-                ctx->done = 1;\n-                if (errno != EPIPE)\n-                    av_log(logger(ctx), AV_LOG_DEBUG, \"%s VIDIOC_DQBUF, errno (%s)\\n\",\n-                        ctx->name, av_err2str(AVERROR(errno)));\n+        if (ret == 0) {\n+            if (timeout == -1)\n+                av_log(avctx, AV_LOG_ERROR, \"V4L2 %s poll unexpected timeout: events=%#x\\n\", ctx->name, pfd.events);\n+            if (ff_v4l2_ctx_eos(ctx)) {\n+                av_log(avctx, AV_LOG_WARNING, \"V4L2 %s poll event timeout\\n\", ctx->name);\n+                ret = get_event(m);\n+                if (ret < 0) {\n+                    ctx->done = 1;\n+                    return ret;\n+                }\n             }\n-            return NULL;\n+            return AVERROR(EAGAIN);\n         }\n \n-        if (ctx_to_m2mctx(ctx)->draining && !V4L2_TYPE_IS_OUTPUT(ctx->type)) {\n-            int bytesused = V4L2_TYPE_IS_MULTIPLANAR(buf.type) ?\n-                            buf.m.planes[0].bytesused : buf.bytesused;\n-            if (bytesused == 0) {\n+        if ((pfd.revents & POLLERR) != 0) {\n+            av_log(avctx, AV_LOG_WARNING, \"V4L2 %s POLLERR\\n\", ctx->name);\n+            return AVERROR_UNKNOWN;\n+        }\n+\n+        if ((pfd.revents & poll_event) != 0) {\n+            ret = get_event(m);\n+            if (ret < 0) {\n                 ctx->done = 1;\n-                return NULL;\n+                return ret;\n             }\n-#ifdef V4L2_BUF_FLAG_LAST\n-            if (buf.flags & V4L2_BUF_FLAG_LAST)\n-                ctx->done = 1;\n-#endif\n+            continue;\n         }\n \n-        avbuf = &ctx->buffers[buf.index];\n-        avbuf->status = V4L2BUF_AVAILABLE;\n-        avbuf->buf = buf;\n-        if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) {\n-            memcpy(avbuf->planes, planes, sizeof(planes));\n-            avbuf->buf.m.planes = avbuf->planes;\n+        if ((pfd.revents & poll_cap) != 0) {\n+            ret = dq_buf(ctx, ppavbuf);\n+            if (ret == AVERROR(EPIPE))\n+                continue;\n+            return ret;\n         }\n-        return avbuf;\n+\n+        if ((pfd.revents & poll_out) != 0) {\n+            if (is_cap)\n+                return AVERROR(EAGAIN);\n+            return dq_buf(ctx, ppavbuf);\n+        }\n+\n+        av_log(avctx, AV_LOG_ERROR, \"V4L2 poll unexpected events=%#x, revents=%#x\\n\", pfd.events, pfd.revents);\n+        return AVERROR_UNKNOWN;\n     }\n+}\n \n-    return NULL;\n+// Clear out flags and timestamps that should should be set by the user\n+// Returns the passed avbuf\n+static V4L2Buffer *\n+clean_v4l2_buffer(V4L2Buffer * const avbuf)\n+{\n+    struct v4l2_buffer *const buf = &avbuf->buf;\n+\n+    buf->flags = 0;\n+    buf->field = V4L2_FIELD_ANY;\n+    buf->timestamp = (struct timeval){0};\n+    buf->timecode = (struct v4l2_timecode){0};\n+    buf->sequence = 0;\n+\n+    return avbuf;\n+}\n+\n+int\n+ff_v4l2_dq_all(V4L2Context *const ctx, int timeout1)\n+{\n+    V4L2Buffer * avbuf;\n+    if (timeout1 != 0) {\n+        int rv = get_qbuf(ctx, &avbuf, timeout1);\n+        if (rv != 0)\n+            return rv;\n+    }\n+    do {\n+        get_qbuf(ctx, &avbuf, 0);\n+    } while (avbuf);\n+    return 0;\n }\n \n static V4L2Buffer* v4l2_getfree_v4l2buf(V4L2Context *ctx)\n {\n-    int timeout = 0; /* return when no more buffers to dequeue */\n     int i;\n \n     /* get back as many output buffers as possible */\n-    if (V4L2_TYPE_IS_OUTPUT(ctx->type)) {\n-          do {\n-          } while (v4l2_dequeue_v4l2buf(ctx, timeout));\n-    }\n+    if (V4L2_TYPE_IS_OUTPUT(ctx->type))\n+        ff_v4l2_dq_all(ctx, 0);\n \n     for (i = 0; i < ctx->num_buffers; i++) {\n-        if (ctx->buffers[i].status == V4L2BUF_AVAILABLE)\n-            return &ctx->buffers[i];\n+        V4L2Buffer * const avbuf = (V4L2Buffer *)ctx->bufrefs[i]->data;\n+        if (avbuf->status == V4L2BUF_AVAILABLE)\n+            return clean_v4l2_buffer(avbuf);\n     }\n \n     return NULL;\n@@ -452,25 +746,45 @@ static V4L2Buffer* v4l2_getfree_v4l2buf(V4L2Context *ctx)\n \n static int v4l2_release_buffers(V4L2Context* ctx)\n {\n-    struct v4l2_requestbuffers req = {\n-        .memory = V4L2_MEMORY_MMAP,\n-        .type = ctx->type,\n-        .count = 0, /* 0 -> unmaps buffers from the driver */\n-    };\n-    int i, j;\n+    int i;\n+    int ret = 0;\n+    const int fd = ctx_to_m2mctx(ctx)->fd;\n \n-    for (i = 0; i < ctx->num_buffers; i++) {\n-        V4L2Buffer *buffer = &ctx->buffers[i];\n+    // Orphan any buffers in the wild\n+    ff_weak_link_break(&ctx->wl_master);\n+\n+    if (ctx->bufrefs) {\n+        for (i = 0; i < ctx->num_buffers; i++)\n+            av_buffer_unref(ctx->bufrefs + i);\n+    }\n+\n+    if (fd != -1) {\n+        struct v4l2_requestbuffers req = {\n+            .memory = V4L2_MEMORY_MMAP,\n+            .type = ctx->type,\n+            .count = 0, /* 0 -> unmap all buffers from the driver */\n+        };\n \n-        for (j = 0; j < buffer->num_planes; j++) {\n-            struct V4L2Plane_info *p = &buffer->plane_info[j];\n-            if (p->mm_addr && p->length)\n-                if (munmap(p->mm_addr, p->length) < 0)\n-                    av_log(logger(ctx), AV_LOG_ERROR, \"%s unmap plane (%s))\\n\", ctx->name, av_err2str(AVERROR(errno)));\n+        while ((ret = ioctl(fd, VIDIOC_REQBUFS, &req)) == -1) {\n+            if (errno == EINTR)\n+                continue;\n+\n+            ret = AVERROR(errno);\n+\n+            av_log(logger(ctx), AV_LOG_ERROR, \"release all %s buffers (%s)\\n\",\n+                ctx->name, av_err2str(AVERROR(errno)));\n+\n+            if (ctx_to_m2mctx(ctx)->output_drm)\n+                av_log(logger(ctx), AV_LOG_ERROR,\n+                    \"Make sure the DRM client releases all FB/GEM objects before closing the codec (ie):\\n\"\n+                    \"for all buffers: \\n\"\n+                    \"  1. drmModeRmFB(..)\\n\"\n+                    \"  2. drmIoctl(.., DRM_IOCTL_GEM_CLOSE,... )\\n\");\n         }\n     }\n+    atomic_store(&ctx->q_count, 0);\n \n-    return ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_REQBUFS, &req);\n+    return ret;\n }\n \n static inline int v4l2_try_raw_format(V4L2Context* ctx, enum AVPixelFormat pixfmt)\n@@ -499,6 +813,8 @@ static inline int v4l2_try_raw_format(V4L2Context* ctx, enum AVPixelFormat pixfm\n \n static int v4l2_get_raw_format(V4L2Context* ctx, enum AVPixelFormat *p)\n {\n+    V4L2m2mContext* s = ctx_to_m2mctx(ctx);\n+    V4L2m2mPriv *priv = s->avctx->priv_data;\n     enum AVPixelFormat pixfmt = ctx->av_pix_fmt;\n     struct v4l2_fmtdesc fdesc;\n     int ret;\n@@ -512,21 +828,22 @@ static int v4l2_get_raw_format(V4L2Context* ctx, enum AVPixelFormat *p)\n             return 0;\n     }\n \n-    for (;;) {\n+    for (;; ++fdesc.index) {\n         ret = ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_ENUM_FMT, &fdesc);\n         if (ret)\n             return AVERROR(EINVAL);\n \n+        if (priv->pix_fmt != AV_PIX_FMT_NONE) {\n+            if (fdesc.pixelformat != ff_v4l2_format_avfmt_to_v4l2(priv->pix_fmt))\n+                continue;\n+        }\n+\n         pixfmt = ff_v4l2_format_v4l2_to_avfmt(fdesc.pixelformat, AV_CODEC_ID_RAWVIDEO);\n         ret = v4l2_try_raw_format(ctx, pixfmt);\n-        if (ret){\n-            fdesc.index++;\n-            continue;\n+        if (ret == 0) {\n+            *p = pixfmt;\n+            return 0;\n         }\n-\n-        *p = pixfmt;\n-\n-        return 0;\n     }\n \n     return AVERROR(EINVAL);\n@@ -569,30 +886,99 @@ static int v4l2_get_coded_format(V4L2Context* ctx, uint32_t *p)\n   *\n   *****************************************************************************/\n \n+\n+static void flush_all_buffers_status(V4L2Context* const ctx)\n+{\n+    int i;\n+\n+    if (!ctx->bufrefs)\n+        return;\n+\n+    for (i = 0; i < ctx->num_buffers; ++i) {\n+        struct V4L2Buffer * const buf = (struct V4L2Buffer *)ctx->bufrefs[i]->data;\n+        if (buf->status == V4L2BUF_IN_DRIVER)\n+            ff_v4l2_buffer_set_avail(buf);\n+    }\n+    atomic_store(&ctx->q_count, 0);\n+}\n+\n+static int stuff_all_buffers(AVCodecContext * avctx, V4L2Context* ctx)\n+{\n+    int i;\n+    int rv;\n+\n+    if (!ctx->bufrefs) {\n+        rv = ff_v4l2_context_init(ctx);\n+        if (rv) {\n+            av_log(avctx, AV_LOG_ERROR, \"can't request capture buffers\\n\");\n+            return rv;\n+        }\n+    }\n+\n+    for (i = 0; i < ctx->num_buffers; ++i) {\n+        struct V4L2Buffer * const buf = (struct V4L2Buffer *)ctx->bufrefs[i]->data;\n+        if (buf->status == V4L2BUF_AVAILABLE) {\n+            rv = ff_v4l2_buffer_enqueue(buf);\n+            if (rv < 0)\n+                return rv;\n+        }\n+    }\n+    return 0;\n+}\n+\n int ff_v4l2_context_set_status(V4L2Context* ctx, uint32_t cmd)\n {\n     int type = ctx->type;\n-    int ret;\n+    int ret = 0;\n+    AVCodecContext * const avctx = logger(ctx);\n \n-    ret = ioctl(ctx_to_m2mctx(ctx)->fd, cmd, &type);\n-    if (ret < 0)\n-        return AVERROR(errno);\n+    // Avoid doing anything if there is nothing we can do\n+    if (cmd == VIDIOC_STREAMOFF && !ctx_buffers_alloced(ctx) && !ctx->streamon)\n+        return 0;\n \n-    ctx->streamon = (cmd == VIDIOC_STREAMON);\n+    ff_mutex_lock(&ctx->lock);\n \n-    return 0;\n+    if (cmd == VIDIOC_STREAMON && !V4L2_TYPE_IS_OUTPUT(ctx->type))\n+        stuff_all_buffers(avctx, ctx);\n+\n+    if (ioctl(ctx_to_m2mctx(ctx)->fd, cmd, &type) < 0) {\n+        const int err = errno;\n+        av_log(avctx, AV_LOG_ERROR, \"%s set status %d (%s) failed: err=%d\\n\", ctx->name,\n+               cmd, (cmd == VIDIOC_STREAMON) ? \"ON\" : \"OFF\", err);\n+        ret = AVERROR(err);\n+    }\n+    else\n+    {\n+        if (cmd == VIDIOC_STREAMOFF)\n+            flush_all_buffers_status(ctx);\n+        else\n+            ctx->first_buf = 1;\n+\n+        ctx->streamon = (cmd == VIDIOC_STREAMON);\n+        av_log(avctx, AV_LOG_DEBUG, \"%s set status %d (%s) OK\\n\", ctx->name,\n+               cmd, (cmd == VIDIOC_STREAMON) ? \"ON\" : \"OFF\");\n+    }\n+\n+    // Both stream off & on effectively clear flag_last\n+    ctx->flag_last = 0;\n+\n+    ff_mutex_unlock(&ctx->lock);\n+\n+    return ret;\n }\n \n int ff_v4l2_context_enqueue_frame(V4L2Context* ctx, const AVFrame* frame)\n {\n-    V4L2m2mContext *s = ctx_to_m2mctx(ctx);\n+    V4L2m2mContext *const s = ctx_to_m2mctx(ctx);\n+    AVCodecContext *const avctx = s->avctx;\n+    int64_t track_ts;\n     V4L2Buffer* avbuf;\n     int ret;\n \n     if (!frame) {\n         ret = v4l2_stop_encode(ctx);\n         if (ret)\n-            av_log(logger(ctx), AV_LOG_ERROR, \"%s stop_encode\\n\", ctx->name);\n+            av_log(avctx, AV_LOG_ERROR, \"%s stop_encode\\n\", ctx->name);\n         s->draining= 1;\n         return 0;\n     }\n@@ -601,23 +987,29 @@ int ff_v4l2_context_enqueue_frame(V4L2Context* ctx, const AVFrame* frame)\n     if (!avbuf)\n         return AVERROR(EAGAIN);\n \n-    ret = ff_v4l2_buffer_avframe_to_buf(frame, avbuf);\n+    track_ts = xlat_pts_frame_in(avctx, &s->xlat, frame);\n+\n+    ret = ff_v4l2_buffer_avframe_to_buf(frame, avbuf, track_ts);\n     if (ret)\n         return ret;\n \n     return ff_v4l2_buffer_enqueue(avbuf);\n }\n \n-int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt)\n+int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt,\n+                                   const void * extdata, size_t extlen)\n {\n     V4L2m2mContext *s = ctx_to_m2mctx(ctx);\n+    AVCodecContext *const avctx = s->avctx;\n     V4L2Buffer* avbuf;\n     int ret;\n+    int64_t track_ts;\n \n     if (!pkt->size) {\n         ret = v4l2_stop_decode(ctx);\n+        // Log but otherwise ignore stop failure\n         if (ret)\n-            av_log(logger(ctx), AV_LOG_ERROR, \"%s stop_decode\\n\", ctx->name);\n+            av_log(avctx, AV_LOG_ERROR, \"%s stop_decode failed: err=%d\\n\", ctx->name, ret);\n         s->draining = 1;\n         return 0;\n     }\n@@ -626,8 +1018,13 @@ int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt)\n     if (!avbuf)\n         return AVERROR(EAGAIN);\n \n-    ret = ff_v4l2_buffer_avpkt_to_buf(pkt, avbuf);\n-    if (ret)\n+    track_ts = xlat_pts_pkt_in(avctx, &s->xlat, pkt);\n+\n+    ret = ff_v4l2_buffer_avpkt_to_buf_ext(pkt, avbuf, extdata, extlen, track_ts);\n+    if (ret == AVERROR(ENOMEM))\n+        av_log(logger(ctx), AV_LOG_ERROR, \"Buffer overflow in %s: pkt->size=%d > buf->length=%d\\n\",\n+               __func__, pkt->size, avbuf->planes[0].length);\n+    else if (ret)\n         return ret;\n \n     return ff_v4l2_buffer_enqueue(avbuf);\n@@ -635,42 +1032,77 @@ int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt)\n \n int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* frame, int timeout)\n {\n+    V4L2m2mContext *s = ctx_to_m2mctx(ctx);\n+    AVCodecContext *const avctx = s->avctx;\n     V4L2Buffer *avbuf;\n+    int rv;\n \n-    /*\n-     * timeout=-1 blocks until:\n-     *  1. decoded frame available\n-     *  2. an input buffer is ready to be dequeued\n-     */\n-    avbuf = v4l2_dequeue_v4l2buf(ctx, timeout);\n-    if (!avbuf) {\n-        if (ctx->done)\n-            return AVERROR_EOF;\n+    do {\n+        if ((rv = get_qbuf(ctx, &avbuf, timeout)) != 0)\n+            return rv;\n+        if ((rv = ff_v4l2_buffer_buf_to_avframe(frame, avbuf)) != 0)\n+            return rv;\n+    } while (xlat_pts_frame_out(avctx, &s->xlat, frame) != 0);\n \n-        return AVERROR(EAGAIN);\n-    }\n-\n-    return ff_v4l2_buffer_buf_to_avframe(frame, avbuf);\n+   return 0;\n }\n \n-int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt)\n+int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt, int timeout)\n {\n+    V4L2m2mContext *s = ctx_to_m2mctx(ctx);\n+    AVCodecContext *const avctx = s->avctx;\n     V4L2Buffer *avbuf;\n+    int rv;\n \n-    /*\n-     * blocks until:\n-     *  1. encoded packet available\n-     *  2. an input buffer ready to be dequeued\n-     */\n-    avbuf = v4l2_dequeue_v4l2buf(ctx, -1);\n-    if (!avbuf) {\n-        if (ctx->done)\n-            return AVERROR_EOF;\n+    do {\n+        if ((rv = get_qbuf(ctx, &avbuf, timeout)) != 0)\n+            return rv == AVERROR(ENOSPC) ? AVERROR(EAGAIN) : rv;  // Caller not currently expecting ENOSPC\n+        if ((rv = ff_v4l2_buffer_buf_to_avpkt(pkt, avbuf)) != 0)\n+            return rv;\n+    } while (xlat_pts_pkt_out(avctx, &s->xlat, pkt) != 0);\n \n-        return AVERROR(EAGAIN);\n+    return 0;\n+}\n+\n+// Return 0 terminated list of drm fourcc video formats for this context\n+// NULL if none found or error\n+// Returned list is malloced so must be freed\n+uint32_t * ff_v4l2_context_enum_drm_formats(V4L2Context *ctx, unsigned int *pN)\n+{\n+    unsigned int i;\n+    unsigned int n = 0;\n+    unsigned int size = 0;\n+    uint32_t * e = NULL;\n+    *pN = 0;\n+\n+    for (i = 0; i < 1024; ++i) {\n+        struct v4l2_fmtdesc fdesc = {\n+            .index = i,\n+            .type = ctx->type\n+        };\n+\n+        if (ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_ENUM_FMT, &fdesc))\n+            return e;\n+\n+        if (n + 1 >= size) {\n+            unsigned int newsize = (size == 0) ? 16 : size * 2;\n+            uint32_t * t = av_realloc(e, newsize * sizeof(*t));\n+            if (!t)\n+                return e;\n+            e = t;\n+            size = newsize;\n+        }\n+\n+        e[n] = fdesc.pixelformat;\n+        e[++n] = 0;\n+        if (pN)\n+            *pN = n;\n     }\n \n-    return ff_v4l2_buffer_buf_to_avpkt(pkt, avbuf);\n+    // If we've looped 1024 times we are clearly confused\n+    *pN = 0;\n+    av_free(e);\n+    return NULL;\n }\n \n int ff_v4l2_context_get_format(V4L2Context* ctx, int probe)\n@@ -702,78 +1134,179 @@ int ff_v4l2_context_get_format(V4L2Context* ctx, int probe)\n \n int ff_v4l2_context_set_format(V4L2Context* ctx)\n {\n-    return ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_S_FMT, &ctx->format);\n+    int ret;\n+\n+    ret = ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_S_FMT, &ctx->format);\n+    if (ret != 0)\n+        return ret;\n+\n+    // Check returned size against min size and if smaller have another go\n+    // Only worry about plane[0] as this is meant to enforce limits for\n+    // encoded streams where we might know a bit more about the shape\n+    // than the driver\n+    if (V4L2_TYPE_IS_MULTIPLANAR(ctx->format.type)) {\n+        if (ctx->min_buf_size <= ctx->format.fmt.pix_mp.plane_fmt[0].sizeimage)\n+            return 0;\n+        ctx->format.fmt.pix_mp.plane_fmt[0].sizeimage = ctx->min_buf_size;\n+    }\n+    else {\n+        if (ctx->min_buf_size <= ctx->format.fmt.pix.sizeimage)\n+            return 0;\n+        ctx->format.fmt.pix.sizeimage = ctx->min_buf_size;\n+    }\n+\n+    ret = ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_S_FMT, &ctx->format);\n+    return ret;\n }\n \n void ff_v4l2_context_release(V4L2Context* ctx)\n {\n     int ret;\n \n-    if (!ctx->buffers)\n+    if (!ctx->bufrefs)\n         return;\n \n     ret = v4l2_release_buffers(ctx);\n     if (ret)\n         av_log(logger(ctx), AV_LOG_WARNING, \"V4L2 failed to unmap the %s buffers\\n\", ctx->name);\n \n-    av_freep(&ctx->buffers);\n+    av_freep(&ctx->bufrefs);\n+    av_buffer_unref(&ctx->frames_ref);\n+\n+    ff_mutex_destroy(&ctx->lock);\n+    pthread_cond_destroy(&ctx->cond);\n }\n \n-int ff_v4l2_context_init(V4L2Context* ctx)\n+\n+static int create_buffers(V4L2Context* const ctx, const unsigned int req_buffers, const enum v4l2_memory mem)\n {\n-    V4L2m2mContext *s = ctx_to_m2mctx(ctx);\n+    V4L2m2mContext * const s = ctx_to_m2mctx(ctx);\n     struct v4l2_requestbuffers req;\n-    int ret, i;\n-\n-    if (!v4l2_type_supported(ctx)) {\n-        av_log(logger(ctx), AV_LOG_ERROR, \"type %i not supported\\n\", ctx->type);\n-        return AVERROR_PATCHWELCOME;\n-    }\n+    int ret;\n+    int i;\n \n-    ret = ioctl(s->fd, VIDIOC_G_FMT, &ctx->format);\n-    if (ret)\n-        av_log(logger(ctx), AV_LOG_ERROR, \"%s VIDIOC_G_FMT failed\\n\", ctx->name);\n+    av_assert0(ctx->bufrefs == NULL);\n \n     memset(&req, 0, sizeof(req));\n-    req.count = ctx->num_buffers;\n-    req.memory = V4L2_MEMORY_MMAP;\n+    req.count = req_buffers;\n+    req.memory = mem;\n     req.type = ctx->type;\n-    ret = ioctl(s->fd, VIDIOC_REQBUFS, &req);\n-    if (ret < 0) {\n-        av_log(logger(ctx), AV_LOG_ERROR, \"%s VIDIOC_REQBUFS failed: %s\\n\", ctx->name, strerror(errno));\n-        return AVERROR(errno);\n+    while ((ret = ioctl(s->fd, VIDIOC_REQBUFS, &req)) == -1) {\n+        if (errno != EINTR) {\n+            ret = AVERROR(errno);\n+            av_log(logger(ctx), AV_LOG_ERROR, \"%s VIDIOC_REQBUFS failed: %s\\n\", ctx->name, av_err2str(ret));\n+            return ret;\n+        }\n     }\n \n     ctx->num_buffers = req.count;\n-    ctx->buffers = av_mallocz(ctx->num_buffers * sizeof(V4L2Buffer));\n-    if (!ctx->buffers) {\n+    ctx->bufrefs = av_mallocz(ctx->num_buffers * sizeof(*ctx->bufrefs));\n+    if (!ctx->bufrefs) {\n         av_log(logger(ctx), AV_LOG_ERROR, \"%s malloc enomem\\n\", ctx->name);\n-        return AVERROR(ENOMEM);\n+        goto fail_release;\n     }\n \n-    for (i = 0; i < req.count; i++) {\n-        ctx->buffers[i].context = ctx;\n-        ret = ff_v4l2_buffer_initialize(&ctx->buffers[i], i);\n-        if (ret < 0) {\n+    ctx->wl_master = ff_weak_link_new(ctx);\n+    if (!ctx->wl_master) {\n+        ret = AVERROR(ENOMEM);\n+        goto fail_release;\n+    }\n+\n+    for (i = 0; i < ctx->num_buffers; i++) {\n+        ret = ff_v4l2_buffer_initialize(&ctx->bufrefs[i], i, ctx, mem);\n+        if (ret) {\n             av_log(logger(ctx), AV_LOG_ERROR, \"%s buffer[%d] initialization (%s)\\n\", ctx->name, i, av_err2str(ret));\n-            goto error;\n+            goto fail_release;\n         }\n     }\n \n     av_log(logger(ctx), AV_LOG_DEBUG, \"%s: %s %02d buffers initialized: %04ux%04u, sizeimage %08u, bytesperline %08u\\n\", ctx->name,\n         V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? av_fourcc2str(ctx->format.fmt.pix_mp.pixelformat) : av_fourcc2str(ctx->format.fmt.pix.pixelformat),\n         req.count,\n-        v4l2_get_width(&ctx->format),\n-        v4l2_get_height(&ctx->format),\n+        ff_v4l2_get_format_width(&ctx->format),\n+        ff_v4l2_get_format_height(&ctx->format),\n         V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? ctx->format.fmt.pix_mp.plane_fmt[0].sizeimage : ctx->format.fmt.pix.sizeimage,\n         V4L2_TYPE_IS_MULTIPLANAR(ctx->type) ? ctx->format.fmt.pix_mp.plane_fmt[0].bytesperline : ctx->format.fmt.pix.bytesperline);\n \n     return 0;\n \n-error:\n+fail_release:\n     v4l2_release_buffers(ctx);\n+    av_freep(&ctx->bufrefs);\n+    return ret;\n+}\n+\n+int ff_v4l2_context_init(V4L2Context* ctx)\n+{\n+    struct v4l2_queryctrl qctrl;\n+    V4L2m2mContext * const s = ctx_to_m2mctx(ctx);\n+    int ret;\n+\n+    // It is not valid to reinit a context without a previous release\n+    av_assert0(ctx->bufrefs == NULL);\n+\n+    if (!v4l2_type_supported(ctx)) {\n+        av_log(logger(ctx), AV_LOG_ERROR, \"type %i not supported\\n\", ctx->type);\n+        return AVERROR_PATCHWELCOME;\n+    }\n \n-    av_freep(&ctx->buffers);\n+    ff_mutex_init(&ctx->lock, NULL);\n+    pthread_cond_init(&ctx->cond, NULL);\n+    atomic_init(&ctx->q_count, 0);\n+\n+    if (s->output_drm) {\n+        AVHWFramesContext *hwframes;\n+\n+        ctx->frames_ref = av_hwframe_ctx_alloc(s->device_ref);\n+        if (!ctx->frames_ref) {\n+            ret = AVERROR(ENOMEM);\n+            goto fail_unlock;\n+        }\n+\n+        hwframes = (AVHWFramesContext*)ctx->frames_ref->data;\n+        hwframes->format = AV_PIX_FMT_DRM_PRIME;\n+        hwframes->sw_format = ctx->av_pix_fmt;\n+        hwframes->width = ctx->width != 0 ? ctx->width : s->avctx->width;\n+        hwframes->height = ctx->height != 0 ? ctx->height : s->avctx->height;\n+        ret = av_hwframe_ctx_init(ctx->frames_ref);\n+        if (ret < 0)\n+            goto fail_unref_hwframes;\n+    }\n+\n+    ret = ioctl(s->fd, VIDIOC_G_FMT, &ctx->format);\n+    if (ret) {\n+        ret = AVERROR(errno);\n+        av_log(logger(ctx), AV_LOG_ERROR, \"%s VIDIOC_G_FMT failed: %s\\n\", ctx->name, av_err2str(ret));\n+        goto fail_unref_hwframes;\n+    }\n+\n+    memset(&qctrl, 0, sizeof(qctrl));\n+    qctrl.id = V4L2_CID_MIN_BUFFERS_FOR_OUTPUT;\n+    if (ioctl(s->fd, VIDIOC_QUERYCTRL, &qctrl) != 0) {\n+        ret = AVERROR(errno);\n+        if (ret != AVERROR(EINVAL)) {\n+            av_log(logger(ctx), AV_LOG_ERROR, \"%s VIDIOC_QUERCTRL failed: %s\\n\", ctx->name, av_err2str(ret));\n+            goto fail_unref_hwframes;\n+        }\n+        // Control unsupported - set default if wanted\n+        if (ctx->num_buffers < 2)\n+            ctx->num_buffers = 4;\n+    }\n+    else {\n+        if (ctx->num_buffers < 2)\n+            ctx->num_buffers = qctrl.minimum + 2;\n+        ctx->num_buffers = av_clip(ctx->num_buffers, qctrl.minimum, qctrl.maximum);\n+    }\n+\n+    ret = create_buffers(ctx, ctx->num_buffers, ctx->buf_mem);\n+    if (ret < 0)\n+        goto fail_unref_hwframes;\n+\n+    return 0;\n \n+fail_unref_hwframes:\n+    av_buffer_unref(&ctx->frames_ref);\n+fail_unlock:\n+    ff_mutex_destroy(&ctx->lock);\n     return ret;\n }\ndiff --git a/libavcodec/v4l2_context.h b/libavcodec/v4l2_context.h\nindex 22a9532444..0c8c020be1 100644\n--- a/libavcodec/v4l2_context.h\n+++ b/libavcodec/v4l2_context.h\n@@ -31,6 +31,7 @@\n #include \"libavutil/pixfmt.h\"\n #include \"libavutil/frame.h\"\n #include \"libavutil/buffer.h\"\n+#include \"libavutil/thread.h\"\n #include \"v4l2_buffers.h\"\n \n typedef struct V4L2Context {\n@@ -70,28 +71,57 @@ typedef struct V4L2Context {\n      */\n     int width, height;\n     AVRational sample_aspect_ratio;\n+    struct v4l2_rect selection;\n \n     /**\n-     * Indexed array of V4L2Buffers\n+     * If the default size of buffer is less than this then try to\n+     * set to this.\n      */\n-    V4L2Buffer *buffers;\n+    uint32_t min_buf_size;\n+\n+    /**\n+     * Indexed array of pointers to V4L2Buffers\n+     */\n+    AVBufferRef **bufrefs;\n \n     /**\n      * Readonly after init.\n      */\n     int num_buffers;\n \n+    /**\n+     * Buffer memory type V4L2_MEMORY_MMAP or V4L2_MEMORY_DMABUF\n+     */\n+    enum v4l2_memory buf_mem;\n+\n     /**\n      * Whether the stream has been started (VIDIOC_STREAMON has been sent).\n      */\n     int streamon;\n \n+    /* 1st buffer after stream on */\n+    int first_buf;\n+\n     /**\n      *  Either no more buffers available or an unrecoverable error was notified\n      *  by the V4L2 kernel driver: once set the context has to be exited.\n      */\n     int done;\n \n+    int flag_last;\n+\n+    /**\n+     * If NZ then when Qing frame/pkt use this rather than the\n+     * \"real\" PTS\n+     */\n+    uint64_t track_ts;\n+\n+    AVBufferRef *frames_ref;\n+    atomic_int q_count;\n+    struct ff_weak_link_master *wl_master;\n+\n+    AVMutex lock;\n+    pthread_cond_t cond;\n } V4L2Context;\n \n /**\n@@ -119,6 +149,19 @@ int ff_v4l2_context_set_format(V4L2Context* ctx);\n  */\n int ff_v4l2_context_get_format(V4L2Context* ctx, int probe);\n \n+/**\n+ * Get the list of drm fourcc pixel formats for this context\n+ *\n+ * @param[in] ctx A pointer to a V4L2Context. See V4L2Context\n+ *       description for required variables.\n+ * @param[in] pN A pointer to receive the number of formats\n+ *       found. May be NULL if not wanted.\n+ * @return Pointer to malloced list of zero terminated formats,\n+ *         NULL if none or error. As list is malloced it must be\n+ *         freed.\n+ */\n+uint32_t * ff_v4l2_context_enum_drm_formats(V4L2Context *ctx, unsigned int *pN);\n+\n /**\n  * Releases a V4L2Context.\n  *\n@@ -147,7 +190,7 @@ int ff_v4l2_context_set_status(V4L2Context* ctx, uint32_t cmd);\n  * @param[inout] pkt The AVPacket to dequeue to.\n  * @return 0 in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error.\n  */\n-int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt);\n+int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt, int timeout);\n \n /**\n  * Dequeues a buffer from a V4L2Context to an AVFrame.\n@@ -156,7 +199,10 @@ int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt);\n  * @param[in] ctx The V4L2Context to dequeue from.\n  * @param[inout] f The AVFrame to dequeue to.\n  * @param[in] timeout The timeout for dequeue (-1 to block, 0 to return immediately, or milliseconds)\n+ *\n  * @return 0 in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error.\n+ *                AVERROR(ENOSPC) if no buffer availible to put\n+ *                the frame in\n  */\n int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* f, int timeout);\n \n@@ -170,7 +216,7 @@ int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* f, int timeout);\n  * @param[in] pkt A pointer to an AVPacket.\n  * @return 0 in case of success, a negative error otherwise.\n  */\n-int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt);\n+int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt, const void * ext_data, size_t ext_size);\n \n /**\n  * Enqueues a buffer to a V4L2Context from an AVFrame\n@@ -183,4 +229,28 @@ int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt);\n  */\n int ff_v4l2_context_enqueue_frame(V4L2Context* ctx, const AVFrame* f);\n \n+/**\n+ * Dequeue all buffers on this queue\n+ *\n+ * Used to recycle output buffers\n+ *\n+ * @param[in] ctx The V4L2Context to dequeue from.\n+ * @param[in] timeout1 A timeout on dequeuing the 1st buffer, \n+ *       all others have a timeout of zero\n+ * @return AVERROR(EAGAIN) if timeout1 non-zero then the return\n+ *         of the first dequeue operation, 0 otherwise.\n+ */\n+int ff_v4l2_dq_all(V4L2Context *const ctx, int timeout1);\n+\n+/**\n+ * Returns the number of buffers currently queued\n+ *\n+ * @param[in] ctx The V4L2Context to evaluate\n+ */\n+static inline int\n+ff_v4l2_context_q_count(const V4L2Context* const ctx)\n+{\n+    return atomic_load(&ctx->q_count);\n+}\n+\n #endif // AVCODEC_V4L2_CONTEXT_H\ndiff --git a/libavcodec/v4l2_m2m.c b/libavcodec/v4l2_m2m.c\nindex cdfd579810..143656e792 100644\n--- a/libavcodec/v4l2_m2m.c\n+++ b/libavcodec/v4l2_m2m.c\n@@ -35,6 +35,15 @@\n #include \"v4l2_context.h\"\n #include \"v4l2_fmt.h\"\n #include \"v4l2_m2m.h\"\n+#include \"v4l2_req_dmabufs.h\"\n+\n+static void\n+xlat_init(xlat_track_t * const x)\n+{\n+    memset(x, 0, sizeof(*x));\n+    x->last_pts = AV_NOPTS_VALUE;\n+}\n+\n \n static inline int v4l2_splane_video(struct v4l2_capability *cap)\n {\n@@ -68,7 +77,9 @@ static int v4l2_prepare_contexts(V4L2m2mContext *s, int probe)\n \n     s->capture.done = s->output.done = 0;\n     s->capture.name = \"capture\";\n+    s->capture.buf_mem = s->db_ctl != NULL ? V4L2_MEMORY_DMABUF : V4L2_MEMORY_MMAP;\n     s->output.name = \"output\";\n+    s->output.buf_mem = s->input_drm ? V4L2_MEMORY_DMABUF : V4L2_MEMORY_MMAP;\n     atomic_init(&s->refcount, 0);\n     sem_init(&s->refsync, 0, 0);\n \n@@ -85,18 +96,58 @@ static int v4l2_prepare_contexts(V4L2m2mContext *s, int probe)\n     if (v4l2_mplane_video(&cap)) {\n         s->capture.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;\n         s->output.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;\n+        s->output.format.type = s->output.type;\n         return 0;\n     }\n \n     if (v4l2_splane_video(&cap)) {\n         s->capture.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;\n         s->output.type = V4L2_BUF_TYPE_VIDEO_OUTPUT;\n+        s->output.format.type = s->output.type;\n         return 0;\n     }\n \n     return AVERROR(EINVAL);\n }\n \n+static int check_size(AVCodecContext * const avctx, V4L2m2mContext * const s)\n+{\n+    struct v4l2_format fmt = {.type = s->output.type};\n+    int rv;\n+    uint32_t pixfmt = ff_v4l2_format_avfmt_to_v4l2(avctx->pix_fmt);\n+    unsigned int w;\n+    unsigned int h;\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(fmt.type)) {\n+        fmt.fmt.pix_mp.pixelformat = pixfmt;\n+        fmt.fmt.pix_mp.width = avctx->width;\n+        fmt.fmt.pix_mp.height = avctx->height;\n+    }\n+    else {\n+        fmt.fmt.pix.pixelformat = pixfmt;\n+        fmt.fmt.pix.width = avctx->width;\n+        fmt.fmt.pix.height = avctx->height;\n+    }\n+\n+    rv = ioctl(s->fd, VIDIOC_TRY_FMT, &fmt);\n+\n+    if (rv != 0) {\n+        rv = AVERROR(errno);\n+        av_log(avctx, AV_LOG_ERROR, \"%s: Tryfmt failed: %s\\n\", __func__, av_err2str(rv));\n+        return rv;\n+    }\n+\n+    w = ff_v4l2_get_format_width(&fmt);\n+    h = ff_v4l2_get_format_height(&fmt);\n+\n+    if (w < avctx->width || h < avctx->height) {\n+        av_log(avctx, AV_LOG_WARNING, \"%s: Size check failed: asked for %dx%d, got: %dx%d\\n\", __func__, avctx->width, avctx->height, w, h);\n+        return AVERROR(EINVAL);\n+    }\n+\n+    return 0;\n+}\n+\n static int v4l2_probe_driver(V4L2m2mContext *s)\n {\n     void *log_ctx = s->avctx;\n@@ -116,6 +167,11 @@ static int v4l2_probe_driver(V4L2m2mContext *s)\n         goto done;\n     }\n \n+    // If being given frames (encode) check that V4L2 can cope with the size\n+    if (s->output.av_codec_id == AV_CODEC_ID_RAWVIDEO &&\n+        (ret = check_size(s->avctx, s)) != 0)\n+        goto done;\n+\n     ret = ff_v4l2_context_get_format(&s->capture, 1);\n     if (ret) {\n         av_log(log_ctx, AV_LOG_DEBUG, \"v4l2 capture format not supported\\n\");\n@@ -215,13 +271,7 @@ int ff_v4l2_m2m_codec_reinit(V4L2m2mContext *s)\n         av_log(log_ctx, AV_LOG_ERROR, \"capture VIDIOC_STREAMOFF\\n\");\n \n     /* 2. unmap the capture buffers (v4l2 and ffmpeg):\n-     *    we must wait for all references to be released before being allowed\n-     *    to queue new buffers.\n      */\n-    av_log(log_ctx, AV_LOG_DEBUG, \"waiting for user to release AVBufferRefs\\n\");\n-    if (atomic_load(&s->refcount))\n-        while(sem_wait(&s->refsync) == -1 && errno == EINTR);\n-\n     ff_v4l2_context_release(&s->capture);\n \n     /* 3. get the new capture format */\n@@ -240,7 +290,6 @@ int ff_v4l2_m2m_codec_reinit(V4L2m2mContext *s)\n \n     /* 5. complete reinit */\n     s->draining = 0;\n-    s->reinit = 0;\n \n     return 0;\n }\n@@ -274,7 +323,6 @@ int ff_v4l2_m2m_codec_full_reinit(V4L2m2mContext *s)\n \n     /* start again now that we know the stream dimensions */\n     s->draining = 0;\n-    s->reinit = 0;\n \n     ret = ff_v4l2_context_get_format(&s->output, 0);\n     if (ret) {\n@@ -328,10 +376,14 @@ static void v4l2_m2m_destroy_context(void *opaque, uint8_t *context)\n     ff_v4l2_context_release(&s->capture);\n     sem_destroy(&s->refsync);\n \n-    close(s->fd);\n+    if (s->fd != -1)\n+        close(s->fd);\n     av_frame_unref(s->frame);\n     av_frame_free(&s->frame);\n     av_packet_unref(&s->buf_pkt);\n+    av_freep(&s->extdata_data);\n+\n+    av_log(s->avctx, AV_LOG_DEBUG, \"V4L2 Context destroyed\\n\");\n \n     av_free(s);\n }\n@@ -344,6 +396,11 @@ int ff_v4l2_m2m_codec_end(V4L2m2mPriv *priv)\n     if (!s)\n         return 0;\n \n+    av_log(s->avctx, AV_LOG_DEBUG, \"V4L2 Codec end\\n\");\n+\n+    if (s->avctx && av_codec_is_decoder(s->avctx->codec))\n+        av_packet_unref(&s->buf_pkt);\n+\n     if (s->fd >= 0) {\n         ret = ff_v4l2_context_set_status(&s->output, VIDIOC_STREAMOFF);\n         if (ret)\n@@ -355,8 +412,20 @@ int ff_v4l2_m2m_codec_end(V4L2m2mPriv *priv)\n     }\n \n     ff_v4l2_context_release(&s->output);\n+    av_buffer_unref(&s->device_ref);\n+\n+    dmabufs_ctl_unref(&s->db_ctl);\n+\n+    if (s->fd != -1) {\n+        close(s->fd);\n+        s->fd = -1;\n+    }\n \n     s->self_ref = NULL;\n+    // This is only called on avctx close so after this point we don't have that\n+    // Crash sooner if we find we are using it (can still log with avctx = NULL)\n+    s->avctx = NULL;\n+    priv->context = NULL;\n     av_buffer_unref(&priv->context_ref);\n \n     return 0;\n@@ -400,35 +469,38 @@ int ff_v4l2_m2m_codec_init(V4L2m2mPriv *priv)\n     return v4l2_configure_contexts(s);\n }\n \n-int ff_v4l2_m2m_create_context(V4L2m2mPriv *priv, V4L2m2mContext **s)\n+int ff_v4l2_m2m_create_context(V4L2m2mPriv *priv, V4L2m2mContext **pps)\n {\n-    *s = av_mallocz(sizeof(V4L2m2mContext));\n-    if (!*s)\n+    V4L2m2mContext * const s = av_mallocz(sizeof(V4L2m2mContext));\n+\n+    *pps = NULL;\n+    if (!s)\n         return AVERROR(ENOMEM);\n \n-    priv->context_ref = av_buffer_create((uint8_t *) *s, sizeof(V4L2m2mContext),\n+    priv->context_ref = av_buffer_create((uint8_t *)s, sizeof(*s),\n                                          &v4l2_m2m_destroy_context, NULL, 0);\n     if (!priv->context_ref) {\n-        av_freep(s);\n+        av_free(s);\n         return AVERROR(ENOMEM);\n     }\n \n     /* assign the context */\n-    priv->context = *s;\n-    (*s)->priv = priv;\n+    priv->context = s;\n+    s->priv = priv;\n \n     /* populate it */\n-    priv->context->capture.num_buffers = priv->num_capture_buffers;\n-    priv->context->output.num_buffers  = priv->num_output_buffers;\n-    priv->context->self_ref = priv->context_ref;\n-    priv->context->fd = -1;\n+    s->capture.num_buffers = priv->num_capture_buffers;\n+    s->output.num_buffers  = priv->num_output_buffers;\n+    s->self_ref = priv->context_ref;\n+    s->fd = -1;\n+    xlat_init(&s->xlat);\n \n     priv->context->frame = av_frame_alloc();\n     if (!priv->context->frame) {\n         av_buffer_unref(&priv->context_ref);\n-        *s = NULL; /* freed when unreferencing context_ref */\n         return AVERROR(ENOMEM);\n     }\n \n+    *pps = s;\n     return 0;\n }\ndiff --git a/libavcodec/v4l2_m2m.h b/libavcodec/v4l2_m2m.h\nindex b67b216331..a506e69d67 100644\n--- a/libavcodec/v4l2_m2m.h\n+++ b/libavcodec/v4l2_m2m.h\n@@ -30,6 +30,7 @@\n #include <linux/videodev2.h>\n \n #include \"libavcodec/avcodec.h\"\n+#include \"libavutil/pixfmt.h\"\n #include \"v4l2_context.h\"\n \n #define container_of(ptr, type, member) ({ \\\n@@ -38,7 +39,39 @@\n \n #define V4L_M2M_DEFAULT_OPTS \\\n     { \"num_output_buffers\", \"Number of buffers in the output context\",\\\n-        OFFSET(num_output_buffers), AV_OPT_TYPE_INT, { .i64 = 16 }, 6, INT_MAX, FLAGS }\n+        OFFSET(num_output_buffers), AV_OPT_TYPE_INT, { .i64 = 16 }, 2, INT_MAX, FLAGS }\n+\n+#define FF_V4L2_M2M_TRACK_SIZE 128\n+typedef struct V4L2m2mTrackEl {\n+    int     discard;   // If we see this buffer its been flushed, so discard\n+    int     pending;\n+    int     pkt_size;\n+    int64_t pts;\n+    int64_t dts;\n+    int64_t reordered_opaque;\n+    int64_t pkt_pos;\n+    int64_t pkt_duration;\n+    int64_t track_pts;\n+} V4L2m2mTrackEl;\n+\n+typedef struct pts_stats_s\n+{\n+    void * logctx;\n+    const char * name;  // For debug\n+    unsigned int last_count;\n+    unsigned int last_interval;\n+    int64_t last_pts;\n+    int64_t guess;\n+} pts_stats_t;\n+\n+typedef struct xlat_track_s {\n+    unsigned int track_no;\n+    int64_t last_pts;    // Last valid PTS decoded\n+    int64_t last_opaque;\n+    V4L2m2mTrackEl track_els[FF_V4L2_M2M_TRACK_SIZE];\n+} xlat_track_t;\n+\n+struct dmabufs_ctl;\n \n typedef struct V4L2m2mContext {\n     char devname[PATH_MAX];\n@@ -52,10 +85,10 @@ typedef struct V4L2m2mContext {\n     AVCodecContext *avctx;\n     sem_t refsync;\n     atomic_uint refcount;\n-    int reinit;\n \n     /* null frame/packet received */\n     int draining;\n+    int running;\n     AVPacket buf_pkt;\n \n     /* Reference to a frame. Only used during encoding */\n@@ -66,6 +99,36 @@ typedef struct V4L2m2mContext {\n \n     /* reference back to V4L2m2mPriv */\n     void *priv;\n+\n+    AVBufferRef *device_ref;\n+\n+    /* generate DRM frames */\n+    int output_drm;\n+\n+    /* input frames are drmprime */\n+    int input_drm;\n+\n+    /* Frame tracking */\n+    xlat_track_t xlat;\n+\n+    pts_stats_t pts_stat;\n+\n+    /* req pkt */\n+    int req_pkt;\n+    int reorder_size;\n+\n+    /* Ext data sent */\n+    int extdata_sent;\n+    /* Ext data sent in packet - overrides ctx */\n+    void * extdata_data;\n+    size_t extdata_size;\n+\n+#define FF_V4L2_QUIRK_REINIT_ALWAYS             1\n+#define FF_V4L2_QUIRK_ENUM_FRAMESIZES_BROKEN    2\n+    /* Quirks */\n+    unsigned int quirks;\n+\n+    struct dmabufs_ctl * db_ctl;\n } V4L2m2mContext;\n \n typedef struct V4L2m2mPriv {\n@@ -76,6 +139,8 @@ typedef struct V4L2m2mPriv {\n \n     int num_output_buffers;\n     int num_capture_buffers;\n+    const char * dmabuf_alloc;\n+    enum AVPixelFormat pix_fmt;\n } V4L2m2mPriv;\n \n /**\n@@ -129,4 +194,26 @@ int ff_v4l2_m2m_codec_reinit(V4L2m2mContext *ctx);\n  */\n int ff_v4l2_m2m_codec_full_reinit(V4L2m2mContext *ctx);\n \n+\n+static inline unsigned int ff_v4l2_get_format_width(const struct v4l2_format * const fmt)\n+{\n+    return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.width : fmt->fmt.pix.width;\n+}\n+\n+static inline unsigned int ff_v4l2_get_format_height(const struct v4l2_format * const fmt)\n+{\n+    return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.height : fmt->fmt.pix.height;\n+}\n+\n+static inline uint32_t ff_v4l2_get_format_pixelformat(const struct v4l2_format * const fmt)\n+{\n+    return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.pixelformat : fmt->fmt.pix.pixelformat;\n+}\n+\n+static inline int ff_v4l2_ctx_eos(const V4L2Context * const ctx)\n+{\n+    return ctx->flag_last;\n+}\n+\n+\n #endif /* AVCODEC_V4L2_M2M_H */\ndiff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c\nindex ab07c0a24a..e7fd8980e5 100644\n--- a/libavcodec/v4l2_m2m_dec.c\n+++ b/libavcodec/v4l2_m2m_dec.c\n@@ -21,8 +21,14 @@\n  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n  */\n \n+#include \"config.h\"\n+\n #include <linux/videodev2.h>\n #include <sys/ioctl.h>\n+\n+#include \"libavutil/avassert.h\"\n+#include \"libavutil/hwcontext.h\"\n+#include \"libavutil/hwcontext_drm.h\"\n #include \"libavutil/pixfmt.h\"\n #include \"libavutil/pixdesc.h\"\n #include \"libavutil/opt.h\"\n@@ -30,75 +36,279 @@\n #include \"libavcodec/decode.h\"\n #include \"libavcodec/internal.h\"\n \n+#include \"libavcodec/hwaccels.h\"\n+#include \"libavcodec/internal.h\"\n+#include \"libavcodec/hwconfig.h\"\n+\n #include \"v4l2_context.h\"\n #include \"v4l2_m2m.h\"\n #include \"v4l2_fmt.h\"\n+#include \"v4l2_req_dmabufs.h\"\n \n-static int v4l2_try_start(AVCodecContext *avctx)\n+#if CONFIG_H264_DECODER\n+#include \"h264_parse.h\"\n+#endif\n+#if CONFIG_HEVC_DECODER\n+#include \"hevc_parse.h\"\n+#endif\n+\n+// Pick 64 for max last count - that is >1sec at 60fps\n+#define STATS_LAST_COUNT_MAX 64\n+#define STATS_INTERVAL_MAX (1 << 30)\n+\n+#ifndef FF_API_BUFFER_SIZE_T\n+#define FF_API_BUFFER_SIZE_T 1\n+#endif\n+\n+#define DUMP_FAILED_EXTRADATA 0\n+\n+#if DUMP_FAILED_EXTRADATA\n+static inline char hex1(unsigned int x)\n {\n-    V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context;\n-    V4L2Context *const capture = &s->capture;\n-    V4L2Context *const output = &s->output;\n-    struct v4l2_selection selection = { 0 };\n-    int ret;\n+    x &= 0xf;\n+    return x <= 9 ? '0' + x : 'a' + x - 10;\n+}\n \n-    /* 1. start the output process */\n-    if (!output->streamon) {\n-        ret = ff_v4l2_context_set_status(output, VIDIOC_STREAMON);\n-        if (ret < 0) {\n-            av_log(avctx, AV_LOG_DEBUG, \"VIDIOC_STREAMON on output context\\n\");\n-            return ret;\n-        }\n+static inline char * hex2(char * s, unsigned int x)\n+{\n+    *s++ = hex1(x >> 4);\n+    *s++ = hex1(x);\n+    return s;\n+}\n+\n+static inline char * hex4(char * s, unsigned int x)\n+{\n+    s = hex2(s, x >> 8);\n+    s = hex2(s, x);\n+    return s;\n+}\n+\n+static inline char * dash2(char * s)\n+{\n+    *s++ = '-';\n+    *s++ = '-';\n+    return s;\n+}\n+\n+static void\n+data16(char * s, const unsigned int offset, const uint8_t * m, const size_t len)\n+{\n+    size_t i;\n+    s = hex4(s, offset);\n+    m += offset;\n+    for (i = 0; i != 8; ++i) {\n+        *s++ = ' ';\n+        s = len > i + offset ? hex2(s, *m++) : dash2(s);\n+    }\n+    *s++ = ' ';\n+    *s++ = ':';\n+    for (; i != 16; ++i) {\n+        *s++ = ' ';\n+        s = len > i + offset ? hex2(s, *m++) : dash2(s);\n     }\n+    *s++ = 0;\n+}\n \n-    if (capture->streamon)\n-        return 0;\n+static void\n+log_dump(void * logctx, int lvl, const void * const data, const size_t len)\n+{\n+    size_t i;\n+    for (i = 0; i < len; i += 16) {\n+        char buf[80];\n+        data16(buf, i, data, len);\n+        av_log(logctx, lvl, \"%s\\n\", buf);\n+    }\n+}\n+#endif\n \n-    /* 2. get the capture format */\n-    capture->format.type = capture->type;\n-    ret = ioctl(s->fd, VIDIOC_G_FMT, &capture->format);\n-    if (ret) {\n-        av_log(avctx, AV_LOG_WARNING, \"VIDIOC_G_FMT ioctl\\n\");\n-        return ret;\n+static unsigned int pts_stats_interval(const pts_stats_t * const stats)\n+{\n+    return stats->last_interval;\n+}\n+\n+static int64_t pts_stats_guess(const pts_stats_t * const stats, const int fail_bad_guess)\n+{\n+    if (stats->last_count <= 1)\n+        return stats->last_pts;\n+    if (stats->last_pts == AV_NOPTS_VALUE ||\n+            fail_bad_guess && (stats->last_interval == 0 ||\n+                               stats->last_count >= STATS_LAST_COUNT_MAX))\n+        return AV_NOPTS_VALUE;\n+    return stats->last_pts + (int64_t)(stats->last_count - 1) * (int64_t)stats->last_interval;\n+}\n+\n+static void pts_stats_add(pts_stats_t * const stats, int64_t pts)\n+{\n+    if (pts == AV_NOPTS_VALUE || pts == stats->last_pts) {\n+        if (stats->last_count < STATS_LAST_COUNT_MAX)\n+            ++stats->last_count;\n+        return;\n     }\n \n-    /* 2.1 update the AVCodecContext */\n-    avctx->pix_fmt = ff_v4l2_format_v4l2_to_avfmt(capture->format.fmt.pix_mp.pixelformat, AV_CODEC_ID_RAWVIDEO);\n-    capture->av_pix_fmt = avctx->pix_fmt;\n+    if (stats->last_pts != AV_NOPTS_VALUE) {\n+        const int64_t interval = pts - stats->last_pts;\n \n-    /* 3. set the crop parameters */\n-    selection.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;\n-    selection.r.height = avctx->coded_height;\n-    selection.r.width = avctx->coded_width;\n-    ret = ioctl(s->fd, VIDIOC_S_SELECTION, &selection);\n-    if (!ret) {\n-        ret = ioctl(s->fd, VIDIOC_G_SELECTION, &selection);\n-        if (ret) {\n-            av_log(avctx, AV_LOG_WARNING, \"VIDIOC_G_SELECTION ioctl\\n\");\n-        } else {\n-            av_log(avctx, AV_LOG_DEBUG, \"crop output %dx%d\\n\", selection.r.width, selection.r.height);\n-            /* update the size of the resulting frame */\n-            capture->height = selection.r.height;\n-            capture->width  = selection.r.width;\n+        if (interval < 0 || interval >= STATS_INTERVAL_MAX ||\n+            stats->last_count >= STATS_LAST_COUNT_MAX) {\n+            if (stats->last_interval != 0)\n+                av_log(stats->logctx, AV_LOG_DEBUG, \"%s: %s: Bad interval: %\" PRId64 \"/%d\\n\",\n+                       __func__, stats->name, interval, stats->last_count);\n+            stats->last_interval = 0;\n+        }\n+        else {\n+            const int64_t frame_time = interval / (int64_t)stats->last_count;\n+\n+            if (frame_time != stats->last_interval)\n+                av_log(stats->logctx, AV_LOG_DEBUG, \"%s: %s: New interval: %u->%\" PRId64 \"/%d=%\" PRId64 \"\\n\",\n+                       __func__, stats->name, stats->last_interval, interval, stats->last_count, frame_time);\n+            stats->last_interval = frame_time;\n         }\n     }\n \n-    /* 4. init the capture context now that we have the capture format */\n-    if (!capture->buffers) {\n-        ret = ff_v4l2_context_init(capture);\n-        if (ret) {\n-            av_log(avctx, AV_LOG_ERROR, \"can't request capture buffers\\n\");\n-            return AVERROR(ENOMEM);\n+    stats->last_pts = pts;\n+    stats->last_count = 1;\n+}\n+\n+static void pts_stats_init(pts_stats_t * const stats, void * logctx, const char * name)\n+{\n+    *stats = (pts_stats_t){\n+        .logctx = logctx,\n+        .name = name,\n+        .last_count = 1,\n+        .last_interval = 0,\n+        .last_pts = AV_NOPTS_VALUE\n+    };\n+}\n+\n+// If abdata == NULL then this just counts space required\n+// Unpacks avcC if detected\n+static int\n+h264_xd_copy(const uint8_t * const extradata, const int extrasize, uint8_t * abdata)\n+{\n+    const uint8_t * const xdend = extradata + extrasize;\n+    const uint8_t * p = extradata;\n+    uint8_t * d = abdata;\n+    unsigned int n;\n+    unsigned int len;\n+    const unsigned int hdrlen = 4;\n+    unsigned int need_pps = 1;\n+\n+    if (extrasize < 8)\n+        return AVERROR(EINVAL);\n+\n+    if (p[0] == 0 && p[1] == 0) {\n+        // Assume a couple of leading zeros are good enough to indicate NAL\n+        if (abdata)\n+            memcpy(d, p, extrasize);\n+        return extrasize;\n+    }\n+\n+    // avcC starts with a 1\n+    if (p[0] != 1)\n+        return AVERROR(EINVAL);\n+\n+    p += 5;\n+    n = *p++ & 0x1f;\n+\n+doxps:\n+    while (n--) {\n+        if (xdend - p < 2)\n+            return AVERROR(EINVAL);\n+        len = (p[0] << 8) | p[1];\n+        p += 2;\n+        if (xdend - p < (ptrdiff_t)len)\n+            return AVERROR(EINVAL);\n+        if (abdata) {\n+            d[0] = 0;\n+            d[1] = 0;\n+            d[2] = 0;\n+            d[3] = 1;\n+            memcpy(d + 4, p, len);\n         }\n+        d += len + hdrlen;\n+        p += len;\n+    }\n+    if (need_pps) {\n+        need_pps = 0;\n+        if (p >= xdend)\n+            return AVERROR(EINVAL);\n+        n = *p++;\n+        goto doxps;\n     }\n \n-    /* 5. start the capture process */\n-    ret = ff_v4l2_context_set_status(capture, VIDIOC_STREAMON);\n-    if (ret) {\n-        av_log(avctx, AV_LOG_DEBUG, \"VIDIOC_STREAMON, on capture context\\n\");\n+    return d - abdata;\n+}\n+\n+static int\n+copy_extradata(AVCodecContext * const avctx,\n+               const void * const src_data, const int src_len,\n+               void ** const pdst_data, size_t * const pdst_len)\n+{\n+    int len;\n+\n+    *pdst_len = 0;\n+    av_freep(pdst_data);\n+\n+    if (avctx->codec_id == AV_CODEC_ID_H264)\n+        len = h264_xd_copy(src_data, src_len, NULL);\n+    else\n+        len = src_len < 0 ? AVERROR(EINVAL) : src_len;\n+\n+    // Zero length is OK but we want to stop - -ve is error val\n+    if (len <= 0)\n+        return len;\n+\n+    if ((*pdst_data = av_malloc(len + AV_INPUT_BUFFER_PADDING_SIZE)) == NULL)\n+        return AVERROR(ENOMEM);\n+\n+    if (avctx->codec_id == AV_CODEC_ID_H264)\n+        h264_xd_copy(src_data, src_len, *pdst_data);\n+    else\n+        memcpy(*pdst_data, src_data, len);\n+    *pdst_len = len;\n+\n+    return 0;\n+}\n+\n+\n+\n+static int check_output_streamon(AVCodecContext *const avctx, V4L2m2mContext *const s)\n+{\n+    int ret;\n+    struct v4l2_decoder_cmd cmd = {\n+        .cmd = V4L2_DEC_CMD_START,\n+        .flags = 0,\n+    };\n+\n+    if (s->output.streamon)\n+        return 0;\n+\n+    ret = ff_v4l2_context_set_status(&s->output, VIDIOC_STREAMON);\n+    if (ret != 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"VIDIOC_STREAMON on output context: %s\\n\", av_err2str(ret));\n         return ret;\n     }\n \n+    // STREAMON should do implicit START so this just for those that don't.\n+    // It is optional so don't worry if it fails\n+    if (ioctl(s->fd, VIDIOC_DECODER_CMD, &cmd) < 0) {\n+        ret = AVERROR(errno);\n+        av_log(avctx, AV_LOG_WARNING, \"VIDIOC_DECODER_CMD start error: %s\\n\", av_err2str(ret));\n+    }\n+    else {\n+        av_log(avctx, AV_LOG_TRACE, \"VIDIOC_DECODER_CMD start OK\\n\");\n+    }\n+    return 0;\n+}\n+\n+static int v4l2_try_start(AVCodecContext *avctx)\n+{\n+    V4L2m2mContext * const s = ((V4L2m2mPriv*)avctx->priv_data)->context;\n+    int ret;\n+\n+    /* 1. start the output process */\n+    if ((ret = check_output_streamon(avctx, s)) != 0)\n+        return ret;\n     return 0;\n }\n \n@@ -133,46 +343,822 @@ static int v4l2_prepare_decoder(V4L2m2mContext *s)\n     return 0;\n }\n \n-static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame)\n+static void\n+set_best_effort_pts(AVCodecContext *const avctx,\n+             pts_stats_t * const ps,\n+             AVFrame *const frame)\n+{\n+    pts_stats_add(ps, frame->pts);\n+\n+#if FF_API_PKT_PTS\n+FF_DISABLE_DEPRECATION_WARNINGS\n+    frame->pkt_pts = frame->pts;\n+FF_ENABLE_DEPRECATION_WARNINGS\n+#endif\n+    frame->best_effort_timestamp = pts_stats_guess(ps, 1);\n+    // If we can't guess from just PTS - try DTS\n+    if (frame->best_effort_timestamp == AV_NOPTS_VALUE)\n+        frame->best_effort_timestamp = frame->pkt_dts;\n+\n+    // We can't emulate what s/w does in a useful manner and using the\n+    // \"correct\" answer seems to just confuse things.\n+    frame->pkt_dts               = frame->pts;\n+    av_log(avctx, AV_LOG_TRACE, \"Out PTS=%\" PRId64 \"/%\"PRId64\", DTS=%\" PRId64 \"\\n\",\n+           frame->pts, frame->best_effort_timestamp, frame->pkt_dts);\n+}\n+\n+static void\n+xlat_flush(xlat_track_t * const x)\n+{\n+    unsigned int i;\n+    // Do not reset track_no - this ensures that any frames left in the decoder\n+    // that turn up later get discarded.\n+\n+    x->last_pts = AV_NOPTS_VALUE;\n+    x->last_opaque = 0;\n+    for (i = 0; i != FF_V4L2_M2M_TRACK_SIZE; ++i) {\n+        x->track_els[i].pending = 0;\n+        x->track_els[i].discard = 1;\n+    }\n+}\n+\n+static void\n+xlat_init(xlat_track_t * const x)\n+{\n+    memset(x, 0, sizeof(*x));\n+    xlat_flush(x);\n+}\n+\n+static int\n+xlat_pending(const V4L2m2mContext * const s)\n+{\n+    const xlat_track_t *const x = &s->xlat;\n+    unsigned int n = x->track_no % FF_V4L2_M2M_TRACK_SIZE;\n+    int i;\n+    const int64_t now = pts_stats_guess(&s->pts_stat, 0);\n+    int64_t first_dts = AV_NOPTS_VALUE;\n+    int no_dts_count = 0;\n+    unsigned int interval = pts_stats_interval(&s->pts_stat);\n+\n+    for (i = 0; i < FF_V4L2_M2M_TRACK_SIZE; ++i, n = (n - 1) & (FF_V4L2_M2M_TRACK_SIZE - 1)) {\n+        const V4L2m2mTrackEl * const t = x->track_els + n;\n+\n+        if (first_dts == AV_NOPTS_VALUE)\n+            if (t->dts == AV_NOPTS_VALUE)\n+                ++no_dts_count;\n+            else\n+                first_dts = t->dts;\n+\n+        // Discard only set on never-set or flushed entries\n+        // So if we get here we've never successfully decoded a frame so allow\n+        // more frames into the buffer before stalling\n+        if (t->discard)\n+            return i - 16;\n+\n+        // If we've got this frame out then everything before this point\n+        // must have entered the decoder\n+        if (!t->pending)\n+            break;\n+\n+        // If we've never seen a pts all we can do is count frames\n+        if (now == AV_NOPTS_VALUE)\n+            continue;\n+\n+        if (t->dts != AV_NOPTS_VALUE && now >= t->dts)\n+            break;\n+    }\n+\n+    if (first_dts != AV_NOPTS_VALUE && now != AV_NOPTS_VALUE && interval != 0 && s->reorder_size != 0) {\n+        const int iframes = (first_dts - now) / (int)interval;\n+        const int t = iframes - s->reorder_size + no_dts_count;\n+\n+//        av_log(s->avctx, AV_LOG_DEBUG, \"Last:%\"PRId64\", Now:%\"PRId64\", First:%\"PRId64\", delta=%\"PRId64\", frames=%d, nodts=%d\\n\",\n+//               x->last_dts, now, first_dts, first_dts - now, iframes, no_dts_count);\n+\n+        if (iframes > 0 && iframes < 64 && t < i) {\n+            return t;\n+        }\n+    }\n+\n+    return i;\n+}\n+\n+static inline int stream_started(const V4L2m2mContext * const s) {\n+    return s->output.streamon;\n+}\n+\n+#define NQ_OK        0\n+#define NQ_Q_FULL    1\n+#define NQ_SRC_EMPTY 2\n+#define NQ_NONE      3\n+#define NQ_DRAINING  4\n+#define NQ_DEAD      5\n+\n+#define TRY_DQ(nq_status) ((nq_status) >= NQ_OK && (nq_status) <= NQ_DRAINING)\n+#define RETRY_NQ(nq_status) ((nq_status) == NQ_Q_FULL || (nq_status) == NQ_NONE)\n+\n+// do_not_get      If true then no new packet will be got but status will\n+//                  be set appropriately\n+\n+// AVERROR_EOF     Flushing an already flushed stream\n+// -ve             Error (all errors except EOF are unexpected)\n+// NQ_OK (0)       OK\n+// NQ_Q_FULL       Dst full (retry if we think V4L2 Q has space now)\n+// NQ_SRC_EMPTY    Src empty (do not retry)\n+// NQ_NONE         Enqueue not attempted\n+// NQ_DRAINING     At EOS, dQ dest until EOS there too\n+// NQ_DEAD         Not running (do not retry, do not attempt capture dQ)\n+\n+static int try_enqueue_src(AVCodecContext * const avctx, V4L2m2mContext * const s, const int do_not_get)\n {\n-    V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context;\n-    V4L2Context *const capture = &s->capture;\n-    V4L2Context *const output = &s->output;\n     int ret;\n \n-    if (!s->buf_pkt.size) {\n-        ret = ff_decode_get_packet(avctx, &s->buf_pkt);\n-        if (ret < 0 && ret != AVERROR_EOF)\n+    // If we don't already have a coded packet - get a new one\n+    // We will already have a coded pkt if the output Q was full last time we\n+    // tried to Q it\n+    if (!s->buf_pkt.size && !do_not_get) {\n+        unsigned int i;\n+\n+        for (i = 0; i < 256; ++i) {\n+            uint8_t * side_data;\n+#if FF_API_BUFFER_SIZE_T\n+            int side_size;\n+#else\n+            size_t side_size;\n+#endif\n+            ret = ff_decode_get_packet(avctx, &s->buf_pkt);\n+            if (ret != 0)\n+                break;\n+\n+            // New extradata is the only side-data we undertand\n+            side_data = av_packet_get_side_data(&s->buf_pkt, AV_PKT_DATA_NEW_EXTRADATA, &side_size);\n+            if (side_data) {\n+                av_log(avctx, AV_LOG_DEBUG, \"New extradata\\n\");\n+                if ((ret = copy_extradata(avctx, side_data, (int)side_size, &s->extdata_data, &s->extdata_size)) < 0)\n+                    av_log(avctx, AV_LOG_WARNING, \"Failed to copy new extra data: %s\\n\", av_err2str(ret));\n+                s->extdata_sent = 0;\n+            }\n+\n+            if (s->buf_pkt.size != 0)\n+                break;\n+\n+            if (s->buf_pkt.side_data_elems == 0) {\n+                av_log(avctx, AV_LOG_WARNING, \"Empty pkt from ff_decode_get_packet - treating as EOF\\n\");\n+                ret = AVERROR_EOF;\n+                break;\n+            }\n+\n+            // Retry a side-data only pkt\n+        }\n+        // If i >= 256 something has gone wrong\n+        if (i >= 256) {\n+            av_log(avctx, AV_LOG_ERROR, \"Too many side-data only packets\\n\");\n+            return AVERROR(EIO);\n+        }\n+\n+        if (ret == AVERROR(EAGAIN)) {\n+            if (!stream_started(s)) {\n+                av_log(avctx, AV_LOG_TRACE, \"%s: receive_frame before 1st coded packet\\n\", __func__);\n+                return NQ_DEAD;\n+            }\n+            return NQ_SRC_EMPTY;\n+        }\n+\n+        if (ret == AVERROR_EOF) {\n+            // EOF - enter drain mode\n+            av_log(avctx, AV_LOG_TRACE, \"--- EOS req: ret=%d, size=%d, started=%d, drain=%d\\n\",\n+                   ret, s->buf_pkt.size, stream_started(s), s->draining);\n+            if (!stream_started(s)) {\n+                av_log(avctx, AV_LOG_DEBUG, \"EOS on flushed stream\\n\");\n+                s->draining = 1;\n+                s->capture.done = 1;\n+                return AVERROR_EOF;\n+            }\n+\n+            if (!s->draining) {\n+                // Calling enqueue with an empty pkt starts drain\n+                av_assert0(s->buf_pkt.size == 0);\n+                ret = ff_v4l2_context_enqueue_packet(&s->output, &s->buf_pkt, NULL, 0);\n+                if (ret) {\n+                    av_log(avctx, AV_LOG_ERROR, \"Failed to start drain: ret=%d\\n\", ret);\n+                    return ret;\n+                }\n+            }\n+            return NQ_DRAINING;\n+        }\n+\n+        if (ret < 0) {\n+            av_log(avctx, AV_LOG_ERROR, \"Failed to get coded packet: err=%d\\n\", ret);\n             return ret;\n+        }\n+    }\n+\n+    if (s->draining) {\n+        if (s->buf_pkt.size) {\n+            av_log(avctx, AV_LOG_WARNING, \"Unexpected input whilst draining\\n\");\n+            av_packet_unref(&s->buf_pkt);\n+        }\n+        return NQ_DRAINING;\n     }\n \n-    if (s->draining)\n-        goto dequeue;\n+    if (!s->buf_pkt.size)\n+        return NQ_NONE;\n \n-    ret = ff_v4l2_context_enqueue_packet(output, &s->buf_pkt);\n-    if (ret < 0 && ret != AVERROR(EAGAIN))\n-        goto fail;\n+    if ((ret = check_output_streamon(avctx, s)) != 0)\n+        return ret;\n+\n+    if (s->extdata_sent)\n+        ret = ff_v4l2_context_enqueue_packet(&s->output, &s->buf_pkt, NULL, 0);\n+    else\n+        ret = ff_v4l2_context_enqueue_packet(&s->output, &s->buf_pkt, s->extdata_data, s->extdata_size);\n \n-    /* if EAGAIN don't unref packet and try to enqueue in the next iteration */\n-    if (ret != AVERROR(EAGAIN))\n+    if (ret == AVERROR(EAGAIN)) {\n+        // Out of input buffers - keep packet\n+        ret = NQ_Q_FULL;\n+    }\n+    else {\n+        // In all other cases we are done with this packet\n         av_packet_unref(&s->buf_pkt);\n+        s->extdata_sent = 1;\n \n-    if (!s->draining) {\n-        ret = v4l2_try_start(avctx);\n         if (ret) {\n-            /* cant recover */\n-            if (ret != AVERROR(ENOMEM))\n-                ret = 0;\n-            goto fail;\n+            av_log(avctx, AV_LOG_ERROR, \"Packet enqueue failure: err=%d\\n\", ret);\n+            return ret;\n         }\n     }\n \n-dequeue:\n-    return ff_v4l2_context_dequeue_frame(capture, frame, -1);\n-fail:\n-    av_packet_unref(&s->buf_pkt);\n+    // Start if we haven't\n+    {\n+        const int ret2 = v4l2_try_start(avctx);\n+        if (ret2) {\n+            av_log(avctx, AV_LOG_DEBUG, \"Start failure: err=%d\\n\", ret2);\n+            ret = (ret2 == AVERROR(ENOMEM)) ? ret2 : NQ_DEAD;\n+        }\n+    }\n+\n+    return ret;\n+}\n+\n+static int qbuf_wait(AVCodecContext * const avctx, V4L2Context * const ctx)\n+{\n+    int rv = 0;\n+\n+    ff_mutex_lock(&ctx->lock);\n+\n+    while (atomic_load(&ctx->q_count) == 0 && ctx->streamon) {\n+        if (pthread_cond_wait(&ctx->cond, &ctx->lock) != 0) {\n+            rv = AVERROR(errno);\n+            av_log(avctx, AV_LOG_ERROR, \"Cond wait failure: %s\\n\", av_err2str(rv));\n+            break;\n+        }\n+    }\n+\n+    ff_mutex_unlock(&ctx->lock);\n+    return rv;\n+}\n+\n+static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame)\n+{\n+    V4L2m2mContext *const s = ((V4L2m2mPriv*)avctx->priv_data)->context;\n+    int src_rv = -1;\n+    int dst_rv = 1;  // Non-zero (done), non-negative (error) number\n+    unsigned int i = 0;\n+\n+    do {\n+        const int pending = xlat_pending(s);\n+        const int prefer_dq = (pending > 4);\n+        const int last_src_rv = src_rv;\n+\n+        av_log(avctx, AV_LOG_TRACE, \"Pending=%d, src_rv=%d, req_pkt=%d\\n\", pending, src_rv, s->req_pkt);\n+\n+        // Enqueue another pkt for decode if\n+        // (a) We don't have a lot of stuff in the buffer already OR\n+        // (b) ... we (think we) do but we've failed to get a frame already OR\n+        // (c) We've dequeued a lot of frames without asking for input\n+        src_rv = try_enqueue_src(avctx, s, !(!prefer_dq || i != 0 || s->req_pkt > 2));\n+\n+        // If we got a frame last time or we've already tried to get a frame and\n+        // we have nothing to enqueue then return now. rv will be AVERROR(EAGAIN)\n+        // indicating that we want more input.\n+        // This should mean that once decode starts we enter a stable state where\n+        // we alternately ask for input and produce output\n+        if ((i != 0 || s->req_pkt) && src_rv == NQ_SRC_EMPTY)\n+            break;\n+\n+        if (src_rv == NQ_Q_FULL && last_src_rv == NQ_Q_FULL) {\n+            av_log(avctx, AV_LOG_WARNING, \"Poll thinks src Q has space; none found\\n\");\n+            break;\n+        }\n+\n+        // Try to get a new frame if\n+        // (a) we haven't already got one AND\n+        // (b) enqueue returned a status indicating that decode should be attempted\n+        if (dst_rv != 0 && TRY_DQ(src_rv)) {\n+            // Pick a timeout depending on state\n+            // The pending count isn't completely reliable so it is good enough\n+            // hint that we want a frame but not good enough to require it in\n+            // all cases; however if it has got > 31 that exceeds its margin of\n+            // error so require a frame to prevent ridiculous levels of latency\n+            const int t =\n+                src_rv == NQ_Q_FULL ? -1 :\n+                src_rv == NQ_DRAINING ? 300 :\n+                prefer_dq ? (s->running && pending > 31 ? 100 : 5) : 0;\n+\n+            // Dequeue frame will unref any previous contents of frame\n+            // if it returns success so we don't need an explicit unref\n+            // when discarding\n+            // This returns AVERROR(EAGAIN) on timeout or if\n+            // there is room in the input Q and timeout == -1\n+            dst_rv = ff_v4l2_context_dequeue_frame(&s->capture, frame, t);\n+\n+            // Failure due to no buffer in Q?\n+            if (dst_rv == AVERROR(ENOSPC)) {\n+                // Wait & retry\n+                if ((dst_rv = qbuf_wait(avctx, &s->capture)) == 0) {\n+                    dst_rv = ff_v4l2_context_dequeue_frame(&s->capture, frame, t);\n+                }\n+            }\n+\n+            if (dst_rv == 0) {\n+                set_best_effort_pts(avctx, &s->pts_stat, frame);\n+                if (!s->running) {\n+                    s->running = 1;\n+                    av_log(avctx, AV_LOG_VERBOSE, \"Decode running\\n\");\n+                }\n+            }\n+\n+            if (dst_rv == AVERROR(EAGAIN) && src_rv == NQ_DRAINING) {\n+                av_log(avctx, AV_LOG_WARNING, \"Timeout in drain - assume EOF\");\n+                dst_rv = AVERROR_EOF;\n+                s->capture.done = 1;\n+            }\n+            else if (dst_rv == AVERROR_EOF && (s->draining || s->capture.done))\n+                av_log(avctx, AV_LOG_DEBUG, \"Dequeue EOF: draining=%d, cap.done=%d\\n\",\n+                       s->draining, s->capture.done);\n+            else if (dst_rv && dst_rv != AVERROR(EAGAIN))\n+                av_log(avctx, AV_LOG_ERROR, \"Packet dequeue failure: draining=%d, cap.done=%d, err=%d\\n\",\n+                       s->draining, s->capture.done, dst_rv);\n+        }\n+\n+        ++i;\n+        if (i >= 256) {\n+            av_log(avctx, AV_LOG_ERROR, \"Unexpectedly large retry count: %d\\n\", i);\n+            src_rv = AVERROR(EIO);\n+        }\n+\n+        // Continue trying to enqueue packets if either\n+        // (a) we succeeded last time OR\n+        // (b) we didn't ret a frame and we can retry the input\n+    } while (src_rv == NQ_OK || (dst_rv == AVERROR(EAGAIN) && RETRY_NQ(src_rv)));\n+\n+    // Ensure that the frame contains nothing if we aren't returning a frame\n+    // (might happen when discarding)\n+    if (dst_rv)\n+        av_frame_unref(frame);\n+\n+    // If we got a frame this time ask for a pkt next time\n+    s->req_pkt = (dst_rv == 0) ? s->req_pkt + 1 : 0;\n+\n+#if 0\n+    if (dst_rv == 0)\n+    {\n+        static int z = 0;\n+        if (++z > 50) {\n+            av_log(avctx, AV_LOG_ERROR, \"Streamoff and die?\\n\");\n+            ff_v4l2_context_set_status(&s->capture, VIDIOC_STREAMOFF);\n+            return -1;\n+        }\n+    }\n+#endif\n+\n+    return dst_rv == 0 ? 0 :\n+        src_rv < 0 ? src_rv :\n+        dst_rv < 0 ? dst_rv :\n+            AVERROR(EAGAIN);\n+}\n+\n+#if 0\n+#include <time.h>\n+static int64_t us_time(void)\n+{\n+    struct timespec ts;\n+    clock_gettime(CLOCK_MONOTONIC, &ts);\n+    return (int64_t)ts.tv_sec * 1000000 + ts.tv_nsec / 1000;\n+}\n+\n+static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame)\n+{\n+    int ret;\n+    const int64_t now = us_time();\n+    int64_t done;\n+    av_log(avctx, AV_LOG_TRACE, \"<<< %s\\n\", __func__);\n+    ret = v4l2_receive_frame2(avctx, frame);\n+    done = us_time();\n+    av_log(avctx, AV_LOG_TRACE, \">>> %s: rx time=%\" PRId64 \", rv=%d\\n\", __func__, done - now, ret);\n     return ret;\n }\n+#endif\n+\n+static uint32_t\n+avprofile_to_v4l2(const enum AVCodecID codec_id, const int avprofile)\n+{\n+    switch (codec_id) {\n+        case AV_CODEC_ID_H264:\n+            switch (avprofile) {\n+                case FF_PROFILE_H264_BASELINE:\n+                    return V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE;\n+                case FF_PROFILE_H264_CONSTRAINED_BASELINE:\n+                    return V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE;\n+                case FF_PROFILE_H264_MAIN:\n+                    return V4L2_MPEG_VIDEO_H264_PROFILE_MAIN;\n+                case FF_PROFILE_H264_EXTENDED:\n+                    return V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED;\n+                case FF_PROFILE_H264_HIGH:\n+                    return V4L2_MPEG_VIDEO_H264_PROFILE_HIGH;\n+                case FF_PROFILE_H264_HIGH_10:\n+                    return V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10;\n+                case FF_PROFILE_H264_HIGH_10_INTRA:\n+                    return V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA;\n+                case FF_PROFILE_H264_MULTIVIEW_HIGH:\n+                case FF_PROFILE_H264_HIGH_422:\n+                    return V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422;\n+                case FF_PROFILE_H264_HIGH_422_INTRA:\n+                    return V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA;\n+                case FF_PROFILE_H264_STEREO_HIGH:\n+                    return V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH;\n+                case FF_PROFILE_H264_HIGH_444_PREDICTIVE:\n+                    return V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE;\n+                case FF_PROFILE_H264_HIGH_444_INTRA:\n+                    return V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA;\n+                case FF_PROFILE_H264_CAVLC_444:\n+                    return V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA;\n+                case FF_PROFILE_H264_HIGH_444:\n+                default:\n+                    break;\n+//                    V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE\t\t= 12,\n+//                    V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH\t\t= 13,\n+//                    V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA\t= 14,\n+//                    V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH\t\t= 16,\n+//                    V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH\t\t= 17,\n+            }\n+            break;\n+        case AV_CODEC_ID_MPEG2VIDEO:\n+        case AV_CODEC_ID_MPEG4:\n+        case AV_CODEC_ID_VC1:\n+        case AV_CODEC_ID_VP8:\n+        case AV_CODEC_ID_VP9:\n+        case AV_CODEC_ID_AV1:\n+            // Most profiles are a simple number that matches the V4L2 enum\n+            return avprofile;\n+        default:\n+            break;\n+    }\n+    return ~(uint32_t)0;\n+}\n+\n+// This check mirrors Chrome's profile check by testing to see if the profile\n+// exists as a possible value for the V4L2 profile control\n+static int\n+check_profile(AVCodecContext *const avctx, V4L2m2mContext *const s)\n+{\n+    struct v4l2_queryctrl query_ctrl;\n+    struct v4l2_querymenu query_menu;\n+    uint32_t profile_id;\n+\n+    // An unset profile is almost certainly zero or -99 - do not reject\n+    if (avctx->profile <= 0) {\n+        av_log(avctx, AV_LOG_VERBOSE, \"Profile %d <= 0 - check skipped\\n\", avctx->profile);\n+        return 0;\n+    }\n+\n+    memset(&query_ctrl, 0, sizeof(query_ctrl));\n+    switch (avctx->codec_id) {\n+        case AV_CODEC_ID_MPEG2VIDEO:\n+            profile_id = V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE;\n+            break;\n+        case AV_CODEC_ID_MPEG4:\n+            profile_id = V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE;\n+            break;\n+        case AV_CODEC_ID_H264:\n+            profile_id = V4L2_CID_MPEG_VIDEO_H264_PROFILE;\n+            break;\n+        case AV_CODEC_ID_VP8:\n+            profile_id = V4L2_CID_MPEG_VIDEO_VP8_PROFILE;\n+            break;\n+        case AV_CODEC_ID_VP9:\n+            profile_id = V4L2_CID_MPEG_VIDEO_VP9_PROFILE;\n+            break;\n+#ifdef V4L2_CID_MPEG_VIDEO_AV1_PROFILE\n+        case AV_CODEC_ID_AV1:\n+            profile_id = V4L2_CID_MPEG_VIDEO_AV1_PROFILE;\n+            break;\n+#endif\n+        default:\n+            av_log(avctx, AV_LOG_VERBOSE, \"Can't map profile for codec id %d; profile check skipped\\n\", avctx->codec_id);\n+            return 0;\n+    }\n+\n+    query_ctrl = (struct v4l2_queryctrl){.id = profile_id};\n+    if (ioctl(s->fd, VIDIOC_QUERYCTRL, &query_ctrl) != 0) {\n+        av_log(avctx, AV_LOG_VERBOSE, \"Query profile ctrl (%#x) not supported: assume OK\\n\", query_ctrl.id);\n+    }\n+    else {\n+        av_log(avctx, AV_LOG_DEBUG, \"%s: Control supported: %#x\\n\", __func__, query_ctrl.id);\n+\n+        query_menu = (struct v4l2_querymenu){\n+            .id = query_ctrl.id,\n+            .index = avprofile_to_v4l2(avctx->codec_id, avctx->profile),\n+        };\n+\n+        if (query_menu.index > query_ctrl.maximum ||\n+            query_menu.index < query_ctrl.minimum ||\n+            ioctl(s->fd, VIDIOC_QUERYMENU, &query_menu) != 0) {\n+            return AVERROR(ENOENT);\n+        }\n+    }\n+\n+    return 0;\n+};\n+\n+static int\n+check_size(AVCodecContext * const avctx, V4L2m2mContext * const s, const uint32_t fcc)\n+{\n+    unsigned int i;\n+    const uint32_t w = avctx->coded_width;\n+    const uint32_t h = avctx->coded_height;\n+\n+    if (w == 0 || h == 0 || fcc == 0) {\n+        av_log(avctx, AV_LOG_TRACE, \"%s: Size %dx%d or fcc %s empty\\n\", __func__, w, h, av_fourcc2str(fcc));\n+        return 0;\n+    }\n+    if ((s->quirks & FF_V4L2_QUIRK_ENUM_FRAMESIZES_BROKEN) != 0) {\n+        av_log(avctx, AV_LOG_TRACE, \"%s: Skipped (quirk): Size %dx%d, fcc %s\\n\", __func__, w, h, av_fourcc2str(fcc));\n+        return 0;\n+    }\n+\n+    for (i = 0;; ++i) {\n+        struct v4l2_frmsizeenum fs = {\n+            .index = i,\n+            .pixel_format = fcc,\n+        };\n+\n+        while (ioctl(s->fd, VIDIOC_ENUM_FRAMESIZES, &fs) != 0) {\n+            const int err = AVERROR(errno);\n+            if (err == AVERROR(EINTR))\n+                continue;\n+            if (i == 0 && err == AVERROR(ENOTTY)) {\n+                av_log(avctx, AV_LOG_DEBUG, \"Framesize enum not supported\\n\");\n+                return 0;\n+            }\n+            if (err != AVERROR(EINVAL)) {\n+                av_log(avctx, AV_LOG_ERROR, \"Failed to enum framesizes: %s\", av_err2str(err));\n+                return err;\n+            }\n+            av_log(avctx, AV_LOG_WARNING, \"Failed to find Size=%dx%d, fmt=%s in %u frame size enums\\n\",\n+                   w, h, av_fourcc2str(fcc), i);\n+            return err;\n+        }\n+\n+        switch (fs.type) {\n+            case V4L2_FRMSIZE_TYPE_DISCRETE:\n+                av_log(avctx, AV_LOG_TRACE, \"%s[%d]: Discrete: %dx%d\\n\", __func__, i,\n+                       fs.discrete.width,fs.discrete.height);\n+                if (w == fs.discrete.width && h == fs.discrete.height)\n+                    return 0;\n+                break;\n+            case V4L2_FRMSIZE_TYPE_STEPWISE:\n+                av_log(avctx, AV_LOG_TRACE, \"%s[%d]: Stepwise: Min: %dx%d Max: %dx%d, Step: %dx%d\\n\", __func__, i,\n+                       fs.stepwise.min_width, fs.stepwise.min_height,\n+                       fs.stepwise.max_width, fs.stepwise.max_height,\n+                       fs.stepwise.step_width,fs.stepwise.step_height);\n+                if (w >= fs.stepwise.min_width && w <= fs.stepwise.max_width &&\n+                    h >= fs.stepwise.min_height && h <= fs.stepwise.max_height &&\n+                    (w - fs.stepwise.min_width) % fs.stepwise.step_width == 0 &&\n+                    (h - fs.stepwise.min_height) % fs.stepwise.step_height == 0)\n+                    return 0;\n+                break;\n+            case V4L2_FRMSIZE_TYPE_CONTINUOUS:\n+                av_log(avctx, AV_LOG_TRACE, \"%s[%d]: Continuous: Min: %dx%d Max: %dx%d, Step: %dx%d\\n\", __func__, i,\n+                       fs.stepwise.min_width, fs.stepwise.min_height,\n+                       fs.stepwise.max_width, fs.stepwise.max_height,\n+                       fs.stepwise.step_width,fs.stepwise.step_height);\n+                if (w >= fs.stepwise.min_width && w <= fs.stepwise.max_width &&\n+                    h >= fs.stepwise.min_height && h <= fs.stepwise.max_height)\n+                    return 0;\n+                break;\n+            default:\n+                av_log(avctx, AV_LOG_ERROR, \"Unexpected framesize enum: %d\", fs.type);\n+                return AVERROR(EINVAL);\n+        }\n+    }\n+}\n+\n+static int\n+get_quirks(AVCodecContext * const avctx, V4L2m2mContext * const s)\n+{\n+    struct v4l2_capability cap;\n+\n+    memset(&cap, 0, sizeof(cap));\n+    while (ioctl(s->fd, VIDIOC_QUERYCAP, &cap) != 0) {\n+        int err = errno;\n+        if (err == EINTR)\n+            continue;\n+        av_log(avctx, AV_LOG_ERROR, \"V4L2: Failed to get capabilities: %s\\n\", strerror(err));\n+        return AVERROR(err);\n+    }\n+\n+    // Could be made table driven if we have a few more but right now there\n+    // seems no point\n+\n+    // Meson (amlogic) always gives a resolution changed event after output\n+    // streamon and userspace must (re)allocate capture buffers and streamon\n+    // capture to clear the event even if the capture buffers were the right\n+    // size in the first place.\n+    if (strcmp(cap.driver, \"meson-vdec\") == 0)\n+        s->quirks |= FF_V4L2_QUIRK_REINIT_ALWAYS | FF_V4L2_QUIRK_ENUM_FRAMESIZES_BROKEN;\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"Driver '%s': Quirks=%#x\\n\", cap.driver, s->quirks);\n+    return 0;\n+}\n+\n+// This heuristic is for H264 but use for everything\n+static uint32_t max_coded_size(const AVCodecContext * const avctx)\n+{\n+    uint32_t wxh = avctx->coded_width * avctx->coded_height;\n+    uint32_t size;\n+\n+    size = wxh * 3 / 2;\n+    // H.264 Annex A table A-1 gives minCR which is either 2 or 4\n+    // unfortunately that doesn't yield an actually useful limit\n+    // and it should be noted that frame 0 is special cased to allow\n+    // a bigger number which really isn't helpful for us. So just pick\n+    // frame_size / 2\n+    size /= 2;\n+    // Add 64k to allow for any overheads and/or encoder hopefulness\n+    // with small WxH\n+    return size + (1 << 16);\n+}\n+\n+static void\n+parse_extradata(AVCodecContext * const avctx, V4L2m2mContext * const s)\n+{\n+    s->reorder_size = 0;\n+\n+    if (!avctx->extradata || !avctx->extradata_size)\n+        return;\n+\n+    switch (avctx->codec_id) {\n+#if CONFIG_H264_DECODER\n+        case AV_CODEC_ID_H264:\n+        {\n+            H264ParamSets ps;\n+            int is_avc = 0;\n+            int nal_length_size = 0;\n+            int ret;\n+\n+            memset(&ps, 0, sizeof(ps));\n+\n+            ret = ff_h264_decode_extradata(avctx->extradata, avctx->extradata_size,\n+                                           &ps, &is_avc, &nal_length_size,\n+                                           avctx->err_recognition, avctx);\n+            if (ret > 0) {\n+                const SPS * sps = NULL;\n+                unsigned int i;\n+                for (i = 0; i != MAX_SPS_COUNT; ++i) {\n+                    if (ps.sps_list[i]) {\n+                        sps = (const SPS *)ps.sps_list[i]->data;\n+                        break;\n+                    }\n+                }\n+                if (sps) {\n+                    avctx->profile = ff_h264_get_profile(sps);\n+                    avctx->level = sps->level_idc;\n+                    s->reorder_size = sps->num_reorder_frames;\n+                }\n+            }\n+            ff_h264_ps_uninit(&ps);\n+            break;\n+        }\n+#endif\n+#if CONFIG_HEVC_DECODER\n+        case AV_CODEC_ID_HEVC:\n+        {\n+            HEVCParamSets ps;\n+            HEVCSEI sei;\n+            int is_nalff = 0;\n+            int nal_length_size = 0;\n+            int ret;\n+\n+            memset(&ps, 0, sizeof(ps));\n+            memset(&sei, 0, sizeof(sei));\n+\n+            ret = ff_hevc_decode_extradata(avctx->extradata, avctx->extradata_size,\n+                                           &ps, &sei, &is_nalff, &nal_length_size,\n+                                           avctx->err_recognition, 0, avctx);\n+            if (ret > 0) {\n+                const HEVCSPS * sps = NULL;\n+                unsigned int i;\n+                for (i = 0; i != HEVC_MAX_SPS_COUNT; ++i) {\n+                    if (ps.sps_list[i]) {\n+                        sps = (const HEVCSPS *)ps.sps_list[i]->data;\n+                        break;\n+                    }\n+                }\n+                if (sps) {\n+                    avctx->profile = sps->ptl.general_ptl.profile_idc;\n+                    avctx->level   = sps->ptl.general_ptl.level_idc;\n+                    s->reorder_size = sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering;\n+                }\n+            }\n+            ff_hevc_ps_uninit(&ps);\n+            ff_hevc_reset_sei(&sei);\n+            break;\n+        }\n+#endif\n+        default:\n+            break;\n+    }\n+}\n+\n+static int\n+choose_capture_format(AVCodecContext * const avctx, V4L2m2mContext * const s)\n+{\n+    const V4L2m2mPriv * const priv = avctx->priv_data;\n+    unsigned int fmts_n;\n+    uint32_t *fmts = ff_v4l2_context_enum_drm_formats(&s->capture, &fmts_n);\n+    enum AVPixelFormat *fmts2 = NULL;\n+    enum AVPixelFormat t;\n+    enum AVPixelFormat gf_pix_fmt;\n+    unsigned int i;\n+    unsigned int n = 0;\n+    unsigned int pref_n = 1;\n+    int rv = AVERROR(ENOENT);\n+\n+    if (!fmts)\n+        return AVERROR(ENOENT);\n+\n+    if ((fmts2 = av_malloc(sizeof(*fmts2) * (fmts_n + 2))) == NULL) {\n+        rv = AVERROR(ENOMEM);\n+        goto error;\n+    }\n+\n+    // Filter for formats that are supported by ffmpeg and\n+    // can accomodate the stream size\n+    fmts2[n++] = AV_PIX_FMT_DRM_PRIME;\n+    for (i = 0; i != fmts_n; ++i) {\n+        const enum AVPixelFormat f = ff_v4l2_format_v4l2_to_avfmt(fmts[i], AV_CODEC_ID_RAWVIDEO);\n+        if (f == AV_PIX_FMT_NONE)\n+            continue;\n+\n+        if (check_size(avctx, s, fmts[i]) != 0)\n+            continue;\n+\n+        if (f == priv->pix_fmt)\n+            pref_n = n;\n+        fmts2[n++] = f;\n+    }\n+    fmts2[n] = AV_PIX_FMT_NONE;\n+\n+    if (n < 2) {\n+        av_log(avctx, AV_LOG_DEBUG, \"%s: No usable formats found\\n\", __func__);\n+        goto error;\n+    }\n+\n+    // Put preferred s/w format at the end - ff_get_format will put it in sw_pix_fmt\n+    t = fmts2[n - 1];\n+    fmts2[n - 1] = fmts2[pref_n];\n+    fmts2[pref_n] = t;\n+\n+    gf_pix_fmt = ff_get_format(avctx, avctx->codec->pix_fmts);\n+    av_log(avctx, AV_LOG_DEBUG, \"avctx requested=%d (%s) %dx%d; get_format requested=%d (%s)\\n\",\n+           avctx->pix_fmt, av_get_pix_fmt_name(avctx->pix_fmt),\n+           avctx->coded_width, avctx->coded_height,\n+           gf_pix_fmt, av_get_pix_fmt_name(gf_pix_fmt));\n+\n+    if (gf_pix_fmt == AV_PIX_FMT_NONE)\n+        goto error;\n+\n+    if (gf_pix_fmt == AV_PIX_FMT_DRM_PRIME || avctx->pix_fmt == AV_PIX_FMT_DRM_PRIME) {\n+        avctx->pix_fmt = AV_PIX_FMT_DRM_PRIME;\n+        s->capture.av_pix_fmt = avctx->sw_pix_fmt;\n+        s->output_drm = 1;\n+    }\n+    else {\n+        avctx->pix_fmt = gf_pix_fmt;\n+        s->capture.av_pix_fmt = gf_pix_fmt;\n+        s->output_drm = 0;\n+    }\n+\n+    // Get format converts capture.av_pix_fmt back into a V4L2 format in the context\n+    if ((rv = ff_v4l2_context_get_format(&s->capture, 0)) != 0)\n+        goto error;\n+    rv = ff_v4l2_context_set_format(&s->capture);\n+\n+error:\n+    av_free(fmts2);\n+    av_free(fmts);\n+    return rv;\n+}\n \n static av_cold int v4l2_decode_init(AVCodecContext *avctx)\n {\n@@ -181,10 +1167,27 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)\n     V4L2m2mPriv *priv = avctx->priv_data;\n     int ret;\n \n+    av_log(avctx, AV_LOG_TRACE, \"<<< %s\\n\", __func__);\n+\n+    if (avctx->codec_id == AV_CODEC_ID_H264) {\n+        if (avctx->ticks_per_frame == 1) {\n+            if(avctx->time_base.den < INT_MAX/2) {\n+                avctx->time_base.den *= 2;\n+            } else\n+                avctx->time_base.num /= 2;\n+        }\n+        avctx->ticks_per_frame = 2;\n+    }\n+\n     ret = ff_v4l2_m2m_create_context(priv, &s);\n     if (ret < 0)\n         return ret;\n \n+    parse_extradata(avctx, s);\n+\n+    xlat_init(&s->xlat);\n+    pts_stats_init(&s->pts_stat, avctx, \"decoder\");\n+\n     capture = &s->capture;\n     output = &s->output;\n \n@@ -192,14 +1195,45 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)\n      * by the v4l2 driver; this event will trigger a full pipeline reconfig and\n      * the proper values will be retrieved from the kernel driver.\n      */\n-    output->height = capture->height = avctx->coded_height;\n-    output->width = capture->width = avctx->coded_width;\n+//    output->height = capture->height = avctx->coded_height;\n+//    output->width = capture->width = avctx->coded_width;\n+    output->height = capture->height = 0;\n+    output->width = capture->width = 0;\n \n     output->av_codec_id = avctx->codec_id;\n     output->av_pix_fmt  = AV_PIX_FMT_NONE;\n+    output->min_buf_size = max_coded_size(avctx);\n \n     capture->av_codec_id = AV_CODEC_ID_RAWVIDEO;\n     capture->av_pix_fmt = avctx->pix_fmt;\n+    capture->min_buf_size = 0;\n+\n+    capture->av_pix_fmt = AV_PIX_FMT_NONE;\n+    s->output_drm = 0;\n+\n+    s->db_ctl = NULL;\n+    if (priv->dmabuf_alloc != NULL && strcmp(priv->dmabuf_alloc, \"v4l2\") != 0) {\n+        if (strcmp(priv->dmabuf_alloc, \"cma\") == 0)\n+            s->db_ctl = dmabufs_ctl_new();\n+        else {\n+            av_log(avctx, AV_LOG_ERROR, \"Unknown dmabuf alloc method: '%s'\\n\", priv->dmabuf_alloc);\n+            return AVERROR(EINVAL);\n+        }\n+        if (!s->db_ctl) {\n+            av_log(avctx, AV_LOG_ERROR, \"Can't open dmabuf provider '%s'\\n\", priv->dmabuf_alloc);\n+            return AVERROR(ENOMEM);\n+        }\n+    }\n+\n+    s->device_ref = av_hwdevice_ctx_alloc(AV_HWDEVICE_TYPE_DRM);\n+    if (!s->device_ref) {\n+        ret = AVERROR(ENOMEM);\n+        return ret;\n+    }\n+\n+    ret = av_hwdevice_ctx_init(s->device_ref);\n+    if (ret < 0)\n+        return ret;\n \n     s->avctx = avctx;\n     ret = ff_v4l2_m2m_codec_init(priv);\n@@ -208,12 +1242,90 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)\n         return ret;\n     }\n \n-    return v4l2_prepare_decoder(s);\n+    if (avctx->extradata &&\n+        (ret = copy_extradata(avctx, avctx->extradata, avctx->extradata_size, &s->extdata_data, &s->extdata_size)) != 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to copy extradata from context: %s\\n\", av_err2str(ret));\n+#if DUMP_FAILED_EXTRADATA\n+        log_dump(avctx, AV_LOG_INFO, avctx->extradata, avctx->extradata_size);\n+#endif\n+        return ret;\n+    }\n+\n+    if ((ret = get_quirks(avctx, s)) != 0)\n+        return ret;\n+\n+    if ((ret = check_profile(avctx, s)) != 0) {\n+        av_log(avctx, AV_LOG_WARNING, \"Profile %d not supported by decode\\n\", avctx->profile);\n+        return ret;\n+    }\n+\n+    // Size check done as part of format filtering\n+    if ((ret = choose_capture_format(avctx, s)) != 0)\n+        return ret;\n+\n+    if ((ret = v4l2_prepare_decoder(s)) < 0)\n+        return ret;\n+\n+    return 0;\n }\n \n static av_cold int v4l2_decode_close(AVCodecContext *avctx)\n {\n-    return ff_v4l2_m2m_codec_end(avctx->priv_data);\n+    int rv;\n+    av_log(avctx, AV_LOG_TRACE, \"<<< %s\\n\", __func__);\n+    rv = ff_v4l2_m2m_codec_end(avctx->priv_data);\n+    av_log(avctx, AV_LOG_TRACE, \">>> %s: rv=%d\\n\", __func__, rv);\n+    return rv;\n+}\n+\n+static void v4l2_decode_flush(AVCodecContext *avctx)\n+{\n+    // An alternatve and more drastic form of flush is to simply do this:\n+    //    v4l2_decode_close(avctx);\n+    //    v4l2_decode_init(avctx);\n+    // The downside is that this keeps a decoder open until all the frames\n+    // associated with it have been returned.  This is a bit wasteful on\n+    // possibly limited h/w resources and fails on a Pi for this reason unless\n+    // more GPU mem is allocated than is the default.\n+\n+    V4L2m2mPriv * const priv = avctx->priv_data;\n+    V4L2m2mContext * const s = priv->context;\n+    V4L2Context * const output = &s->output;\n+    V4L2Context * const capture = &s->capture;\n+\n+    av_log(avctx, AV_LOG_TRACE, \"<<< %s: streamon=%d\\n\", __func__, output->streamon);\n+\n+    // Reflushing everything is benign, quick and avoids having to worry about\n+    // states like EOS processing so don't try to optimize out (having got it\n+    // wrong once)\n+\n+    ff_v4l2_context_set_status(output, VIDIOC_STREAMOFF);\n+\n+    // Clear any buffered input packet\n+    av_packet_unref(&s->buf_pkt);\n+\n+    // Clear a pending EOS\n+    if (ff_v4l2_ctx_eos(capture)) {\n+        // Arguably we could delay this but this is easy and doesn't require\n+        // thought or extra vars\n+        ff_v4l2_context_set_status(capture, VIDIOC_STREAMOFF);\n+        ff_v4l2_context_set_status(capture, VIDIOC_STREAMON);\n+    }\n+\n+    // V4L2 makes no guarantees about whether decoded frames are flushed or not\n+    // so mark all frames we are tracking to be discarded if they appear\n+    xlat_flush(&s->xlat);\n+\n+    // resend extradata\n+    s->extdata_sent = 0;\n+    // clear status vars\n+    s->running = 0;\n+    s->draining = 0;\n+    output->done = 0;\n+    capture->done = 0;\n+\n+    // Stream on will occur when we actually submit a new frame\n+    av_log(avctx, AV_LOG_TRACE, \">>> %s\\n\", __func__);\n }\n \n #define OFFSET(x) offsetof(V4L2m2mPriv, x)\n@@ -222,10 +1334,17 @@ static av_cold int v4l2_decode_close(AVCodecContext *avctx)\n static const AVOption options[] = {\n     V4L_M2M_DEFAULT_OPTS,\n     { \"num_capture_buffers\", \"Number of buffers in the capture context\",\n-        OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 20}, 20, INT_MAX, FLAGS },\n+        OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 20}, 2, INT_MAX, FLAGS },\n+    { \"pixel_format\", \"Pixel format to be used by the decoder\", OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, {.i64 = AV_PIX_FMT_NONE}, AV_PIX_FMT_NONE, AV_PIX_FMT_NB, FLAGS },\n+    { \"dmabuf_alloc\", \"Dmabuf alloc method\", OFFSET(dmabuf_alloc), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, FLAGS },\n     { NULL},\n };\n \n+static const AVCodecHWConfigInternal *v4l2_m2m_hw_configs[] = {\n+    HW_CONFIG_INTERNAL(DRM_PRIME),\n+    NULL\n+};\n+\n #define M2MDEC_CLASS(NAME) \\\n     static const AVClass v4l2_m2m_ ## NAME ## _dec_class = { \\\n         .class_name = #NAME \"_v4l2m2m_decoder\", \\\n@@ -246,9 +1365,15 @@ static const AVOption options[] = {\n         .init           = v4l2_decode_init, \\\n         .receive_frame  = v4l2_receive_frame, \\\n         .close          = v4l2_decode_close, \\\n+        .flush          = v4l2_decode_flush, \\\n         .bsfs           = bsf_name, \\\n         .capabilities   = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \\\n         .caps_internal  = FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_CLEANUP, \\\n+        .pix_fmts       = (const enum AVPixelFormat[]) { AV_PIX_FMT_DRM_PRIME, \\\n+                                                         AV_PIX_FMT_NV12, \\\n+                                                         AV_PIX_FMT_YUV420P, \\\n+                                                         AV_PIX_FMT_NONE}, \\\n+        .hw_configs     = v4l2_m2m_hw_configs, \\\n         .wrapper_name   = \"v4l2m2m\", \\\n     }\n \ndiff --git a/libavcodec/v4l2_m2m_enc.c b/libavcodec/v4l2_m2m_enc.c\nindex f644b50133..6472b56030 100644\n--- a/libavcodec/v4l2_m2m_enc.c\n+++ b/libavcodec/v4l2_m2m_enc.c\n@@ -24,6 +24,8 @@\n #include <linux/videodev2.h>\n #include <sys/ioctl.h>\n #include <search.h>\n+#include <drm_fourcc.h>\n+\n #include \"encode.h\"\n #include \"libavcodec/avcodec.h\"\n #include \"libavcodec/internal.h\"\n@@ -38,6 +40,34 @@\n #define MPEG_CID(x) V4L2_CID_MPEG_VIDEO_##x\n #define MPEG_VIDEO(x) V4L2_MPEG_VIDEO_##x\n \n+// P030 should be defined in drm_fourcc.h and hopefully will be sometime\n+// in the future but until then...\n+#ifndef DRM_FORMAT_P030\n+#define DRM_FORMAT_P030 fourcc_code('P', '0', '3', '0')\n+#endif\n+\n+#ifndef DRM_FORMAT_NV15\n+#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5')\n+#endif\n+\n+#ifndef DRM_FORMAT_NV20\n+#define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0')\n+#endif\n+\n+#ifndef V4L2_CID_CODEC_BASE\n+#define V4L2_CID_CODEC_BASE V4L2_CID_MPEG_BASE\n+#endif\n+\n+// V4L2_PIX_FMT_NV12_10_COL128 and V4L2_PIX_FMT_NV12_COL128 should be defined\n+// in videodev2.h hopefully will be sometime in the future but until then...\n+#ifndef V4L2_PIX_FMT_NV12_10_COL128\n+#define V4L2_PIX_FMT_NV12_10_COL128 v4l2_fourcc('N', 'C', '3', '0')\n+#endif\n+\n+#ifndef V4L2_PIX_FMT_NV12_COL128\n+#define V4L2_PIX_FMT_NV12_COL128 v4l2_fourcc('N', 'C', '1', '2') /* 12  Y/CbCr 4:2:0 128 pixel wide column */\n+#endif\n+\n static inline void v4l2_set_timeperframe(V4L2m2mContext *s, unsigned int num, unsigned int den)\n {\n     struct v4l2_streamparm parm = { 0 };\n@@ -148,15 +178,14 @@ static inline int v4l2_mpeg4_profile_from_ff(int p)\n static int v4l2_check_b_frame_support(V4L2m2mContext *s)\n {\n     if (s->avctx->max_b_frames)\n-        av_log(s->avctx, AV_LOG_WARNING, \"Encoder does not support b-frames yet\\n\");\n+        av_log(s->avctx, AV_LOG_WARNING, \"Encoder does not support %d b-frames yet\\n\", s->avctx->max_b_frames);\n \n-    v4l2_set_ext_ctrl(s, MPEG_CID(B_FRAMES), 0, \"number of B-frames\", 0);\n+    v4l2_set_ext_ctrl(s, MPEG_CID(B_FRAMES), s->avctx->max_b_frames, \"number of B-frames\", 1);\n     v4l2_get_ext_ctrl(s, MPEG_CID(B_FRAMES), &s->avctx->max_b_frames, \"number of B-frames\", 0);\n     if (s->avctx->max_b_frames == 0)\n         return 0;\n \n     avpriv_report_missing_feature(s->avctx, \"DTS/PTS calculation for V4L2 encoding\");\n-\n     return AVERROR_PATCHWELCOME;\n }\n \n@@ -271,17 +300,208 @@ static int v4l2_prepare_encoder(V4L2m2mContext *s)\n     return 0;\n }\n \n+static int avdrm_to_v4l2(struct v4l2_format * const format, const AVFrame * const frame)\n+{\n+    const AVDRMFrameDescriptor *const src = (const AVDRMFrameDescriptor *)frame->data[0];\n+\n+    const uint32_t drm_fmt = src->layers[0].format;\n+    // Treat INVALID as LINEAR\n+    const uint64_t mod = src->objects[0].format_modifier == DRM_FORMAT_MOD_INVALID ?\n+        DRM_FORMAT_MOD_LINEAR : src->objects[0].format_modifier;\n+    uint32_t pix_fmt = 0;\n+    uint32_t w = 0;\n+    uint32_t h = 0;\n+    uint32_t bpl = src->layers[0].planes[0].pitch;\n+\n+    // We really don't expect multiple layers\n+    // All formats that we currently cope with are single object\n+\n+    if (src->nb_layers != 1 || src->nb_objects != 1)\n+        return AVERROR(EINVAL);\n+\n+    switch (drm_fmt) {\n+        case DRM_FORMAT_YUV420:\n+            if (mod == DRM_FORMAT_MOD_LINEAR) {\n+                if (src->layers[0].nb_planes != 3)\n+                    break;\n+                pix_fmt = V4L2_PIX_FMT_YUV420;\n+                h = src->layers[0].planes[1].offset / bpl;\n+                w = bpl;\n+            }\n+            break;\n+\n+        case DRM_FORMAT_NV12:\n+            if (mod == DRM_FORMAT_MOD_LINEAR) {\n+                if (src->layers[0].nb_planes != 2)\n+                    break;\n+                pix_fmt = V4L2_PIX_FMT_NV12;\n+                h = src->layers[0].planes[1].offset / bpl;\n+                w = bpl;\n+            }\n+            else if (fourcc_mod_broadcom_mod(mod) == DRM_FORMAT_MOD_BROADCOM_SAND128) {\n+                if (src->layers[0].nb_planes != 2)\n+                    break;\n+                pix_fmt = V4L2_PIX_FMT_NV12_COL128;\n+                w = bpl;\n+                h = src->layers[0].planes[1].offset / 128;\n+                bpl = fourcc_mod_broadcom_param(mod);\n+            }\n+            break;\n+\n+        case DRM_FORMAT_P030:\n+            if (fourcc_mod_broadcom_mod(mod) == DRM_FORMAT_MOD_BROADCOM_SAND128) {\n+                if (src->layers[0].nb_planes != 2)\n+                    break;\n+                pix_fmt =  V4L2_PIX_FMT_NV12_10_COL128;\n+                w = bpl / 2;  // Matching lie to how we construct this\n+                h = src->layers[0].planes[1].offset / 128;\n+                bpl = fourcc_mod_broadcom_param(mod);\n+            }\n+            break;\n+\n+        default:\n+            break;\n+    }\n+\n+    if (!pix_fmt)\n+        return AVERROR(EINVAL);\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(format->type)) {\n+        struct v4l2_pix_format_mplane *const pix = &format->fmt.pix_mp;\n+\n+        pix->width = w;\n+        pix->height = h;\n+        pix->pixelformat = pix_fmt;\n+        pix->plane_fmt[0].bytesperline = bpl;\n+        pix->num_planes = 1;\n+    }\n+    else {\n+        struct v4l2_pix_format *const pix = &format->fmt.pix;\n+\n+        pix->width = w;\n+        pix->height = h;\n+        pix->pixelformat = pix_fmt;\n+        pix->bytesperline = bpl;\n+    }\n+\n+    return 0;\n+}\n+\n+// Do we have similar enough formats to be usable?\n+static int fmt_eq(const struct v4l2_format * const a, const struct v4l2_format * const b)\n+{\n+    if (a->type != b->type)\n+        return 0;\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(a->type)) {\n+        const struct v4l2_pix_format_mplane *const pa = &a->fmt.pix_mp;\n+        const struct v4l2_pix_format_mplane *const pb = &b->fmt.pix_mp;\n+        unsigned int i;\n+        if (pa->pixelformat != pb->pixelformat ||\n+            pa->num_planes != pb->num_planes)\n+            return 0;\n+        for (i = 0; i != pa->num_planes; ++i) {\n+            if (pa->plane_fmt[i].bytesperline != pb->plane_fmt[i].bytesperline)\n+                return 0;\n+        }\n+    }\n+    else {\n+        const struct v4l2_pix_format *const pa = &a->fmt.pix;\n+        const struct v4l2_pix_format *const pb = &b->fmt.pix;\n+        if (pa->pixelformat != pb->pixelformat ||\n+            pa->bytesperline != pb->bytesperline)\n+            return 0;\n+    }\n+    return 1;\n+}\n+\n+static inline int q_full(const V4L2Context *const output)\n+{\n+    return ff_v4l2_context_q_count(output) == output->num_buffers;\n+}\n+\n static int v4l2_send_frame(AVCodecContext *avctx, const AVFrame *frame)\n {\n     V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context;\n     V4L2Context *const output = &s->output;\n+    int rv;\n+    const int needs_slot = q_full(output);\n+\n+    av_log(avctx, AV_LOG_TRACE, \"<<< %s; needs_slot=%d\\n\", __func__, needs_slot);\n+\n+    // Signal EOF if needed (doesn't need q slot)\n+    if (!frame) {\n+        av_log(avctx, AV_LOG_TRACE, \"--- %s: EOS\\n\", __func__);\n+        return ff_v4l2_context_enqueue_frame(output, frame);\n+    }\n+\n+    if ((rv = ff_v4l2_dq_all(output, needs_slot? 500 : 0)) != 0) {\n+        // We should be able to return AVERROR(EAGAIN) to indicate buffer\n+        // exhaustion, but ffmpeg currently treats that as fatal.\n+        av_log(avctx, AV_LOG_WARNING, \"Failed to get buffer for src frame: %s\\n\", av_err2str(rv));\n+        return rv;\n+    }\n+\n+    if (s->input_drm && !output->streamon) {\n+        struct v4l2_format req_format = {.type = output->format.type};\n+\n+        // Set format when we first get a buffer\n+        if ((rv = avdrm_to_v4l2(&req_format, frame)) != 0) {\n+            av_log(avctx, AV_LOG_ERROR, \"Failed to get V4L2 format from DRM_PRIME frame\\n\");\n+            return rv;\n+        }\n+\n+        ff_v4l2_context_release(output);\n+\n+        output->format = req_format;\n+\n+        if ((rv = ff_v4l2_context_set_format(output)) != 0) {\n+            av_log(avctx, AV_LOG_ERROR, \"Failed to set V4L2 format\\n\");\n+            return rv;\n+        }\n+\n+        if (!fmt_eq(&req_format, &output->format)) {\n+            av_log(avctx, AV_LOG_ERROR, \"Format mismatch after setup\\n\");\n+            return AVERROR(EINVAL);\n+        }\n+\n+        output->selection.top = frame->crop_top;\n+        output->selection.left = frame->crop_left;\n+        output->selection.width = av_frame_cropped_width(frame);\n+        output->selection.height = av_frame_cropped_height(frame);\n+\n+        if ((rv = ff_v4l2_context_init(output)) != 0) {\n+            av_log(avctx, AV_LOG_ERROR, \"Failed to (re)init context\\n\");\n+            return rv;\n+        }\n+\n+        {\n+            struct v4l2_selection selection = {\n+                .type = V4L2_BUF_TYPE_VIDEO_OUTPUT,\n+                .target = V4L2_SEL_TGT_CROP,\n+                .r = output->selection\n+            };\n+            if (ioctl(s->fd, VIDIOC_S_SELECTION, &selection) != 0) {\n+                av_log(avctx, AV_LOG_WARNING, \"S_SELECTION (CROP) %dx%d @ %d,%d failed: %s\\n\",\n+                       selection.r.width, selection.r.height, selection.r.left, selection.r.top,\n+                       av_err2str(AVERROR(errno)));\n+            }\n+            av_log(avctx, AV_LOG_TRACE, \"S_SELECTION (CROP) %dx%d @ %d,%d OK\\n\",\n+                   selection.r.width, selection.r.height, selection.r.left, selection.r.top);\n+        }\n+    }\n \n #ifdef V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME\n-    if (frame && frame->pict_type == AV_PICTURE_TYPE_I)\n+    if (frame->pict_type == AV_PICTURE_TYPE_I)\n         v4l2_set_ext_ctrl(s, MPEG_CID(FORCE_KEY_FRAME), 0, \"force key frame\", 1);\n #endif\n \n-    return ff_v4l2_context_enqueue_frame(output, frame);\n+    rv = ff_v4l2_context_enqueue_frame(output, frame);\n+    if (rv) {\n+        av_log(avctx, AV_LOG_ERROR, \"Enqueue frame failed: %s\\n\", av_err2str(rv));\n+    }\n+\n+    return rv;\n }\n \n static int v4l2_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)\n@@ -292,6 +512,11 @@ static int v4l2_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)\n     AVFrame *frame = s->frame;\n     int ret;\n \n+    av_log(avctx, AV_LOG_TRACE, \"<<< %s: qlen out %d cap %d\\n\", __func__,\n+           ff_v4l2_context_q_count(output), ff_v4l2_context_q_count(capture));\n+\n+    ff_v4l2_dq_all(output, 0);\n+\n     if (s->draining)\n         goto dequeue;\n \n@@ -328,7 +553,115 @@ static int v4l2_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)\n     }\n \n dequeue:\n-    return ff_v4l2_context_dequeue_packet(capture, avpkt);\n+    // Dequeue a frame\n+    for (;;) {\n+        int t = q_full(output) ? -1 : s->draining ? 300 : 0;\n+        int rv2;\n+\n+        // If output is full wait for either a packet or output to become not full\n+        ret = ff_v4l2_context_dequeue_packet(capture, avpkt, t);\n+\n+        // If output was full retry packet dequeue\n+        t = (ret != AVERROR(EAGAIN) || t != -1) ? 0 : 300;\n+        rv2 = ff_v4l2_dq_all(output, t);\n+        if (t == 0 || rv2 != 0)\n+            break;\n+    }\n+    if (ret)\n+        return (s->draining && ret == AVERROR(EAGAIN)) ? AVERROR_EOF : ret;\n+\n+    if (capture->first_buf == 1) {\n+        uint8_t * data;\n+        const int len = avpkt->size;\n+\n+        // 1st buffer after streamon should be SPS/PPS\n+        capture->first_buf = 2;\n+\n+        // Clear both possible stores so there is no chance of confusion\n+        av_freep(&s->extdata_data);\n+        s->extdata_size = 0;\n+        av_freep(&avctx->extradata);\n+        avctx->extradata_size = 0;\n+\n+        if ((data = av_malloc(len + AV_INPUT_BUFFER_PADDING_SIZE)) == NULL)\n+            goto fail_no_mem;\n+\n+        memcpy(data, avpkt->data, len);\n+        av_packet_unref(avpkt);\n+\n+        // We need to copy the header, but keep local if not global\n+        if ((avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) != 0) {\n+            avctx->extradata = data;\n+            avctx->extradata_size = len;\n+        }\n+        else {\n+            s->extdata_data = data;\n+            s->extdata_size = len;\n+        }\n+\n+        ret = ff_v4l2_context_dequeue_packet(capture, avpkt, 0);\n+        ff_v4l2_dq_all(output, 0);\n+        if (ret)\n+            return ret;\n+    }\n+\n+    // First frame must be key so mark as such even if encoder forgot\n+    if (capture->first_buf == 2) {\n+        avpkt->flags |= AV_PKT_FLAG_KEY;\n+\n+        // Add any extradata to the 1st packet we emit as we cannot create it at init\n+        if (avctx->extradata_size > 0 && avctx->extradata) {\n+            void * const side = av_packet_new_side_data(avpkt,\n+                                           AV_PKT_DATA_NEW_EXTRADATA,\n+                                           avctx->extradata_size);\n+            if (!side)\n+                goto fail_no_mem;\n+\n+            memcpy(side, avctx->extradata, avctx->extradata_size);\n+        }\n+    }\n+\n+    // Add SPS/PPS to the start of every key frame if non-global headers\n+    if ((avpkt->flags & AV_PKT_FLAG_KEY) != 0 && s->extdata_size != 0) {\n+        const size_t newlen = s->extdata_size + avpkt->size;\n+        AVBufferRef * const buf = av_buffer_alloc(newlen + AV_INPUT_BUFFER_PADDING_SIZE);\n+\n+        if (buf == NULL)\n+            goto fail_no_mem;\n+\n+        memcpy(buf->data, s->extdata_data, s->extdata_size);\n+        memcpy(buf->data + s->extdata_size, avpkt->data, avpkt->size);\n+\n+        av_buffer_unref(&avpkt->buf);\n+        avpkt->buf = buf;\n+        avpkt->data = buf->data;\n+        avpkt->size = newlen;\n+    }\n+    else if (ff_v4l2_context_q_count(capture) < 2) {\n+        // Avoid running out of capture buffers\n+        // In most cases the buffers will be returned quickly in which case\n+        // we don't copy and can use the v4l2 buffers directly but sometimes\n+        // ffmpeg seems to hold onto all of them for a long time (.mkv\n+        // creation?) so avoid deadlock in those cases.\n+        AVBufferRef * const buf = av_buffer_alloc(avpkt->size + AV_INPUT_BUFFER_PADDING_SIZE);\n+        if (buf == NULL)\n+            goto fail_no_mem;\n+\n+        memcpy(buf->data, avpkt->data, avpkt->size);\n+        av_buffer_unref(&avpkt->buf);  // Will recycle the V4L2 buffer\n+\n+        avpkt->buf = buf;\n+        avpkt->data = buf->data;\n+    }\n+\n+    capture->first_buf = 0;\n+    return 0;\n+\n+fail_no_mem:\n+    av_log(avctx, AV_LOG_ERROR, \"Rx pkt failed: No memory\\n\");\n+    ret = AVERROR(ENOMEM);\n+    av_packet_unref(avpkt);\n+    return ret;\n }\n \n static av_cold int v4l2_encode_init(AVCodecContext *avctx)\n@@ -340,6 +673,8 @@ static av_cold int v4l2_encode_init(AVCodecContext *avctx)\n     uint32_t v4l2_fmt_output;\n     int ret;\n \n+    av_log(avctx, AV_LOG_INFO, \" <<< %s: fmt=%d/%d\\n\", __func__, avctx->pix_fmt, avctx->sw_pix_fmt);\n+\n     ret = ff_v4l2_m2m_create_context(priv, &s);\n     if (ret < 0)\n         return ret;\n@@ -347,13 +682,17 @@ static av_cold int v4l2_encode_init(AVCodecContext *avctx)\n     capture = &s->capture;\n     output  = &s->output;\n \n+    s->input_drm = (avctx->pix_fmt == AV_PIX_FMT_DRM_PRIME);\n+\n     /* common settings output/capture */\n     output->height = capture->height = avctx->height;\n     output->width = capture->width = avctx->width;\n \n     /* output context */\n     output->av_codec_id = AV_CODEC_ID_RAWVIDEO;\n-    output->av_pix_fmt = avctx->pix_fmt;\n+    output->av_pix_fmt = !s->input_drm ? avctx->pix_fmt :\n+            avctx->sw_pix_fmt != AV_PIX_FMT_NONE ? avctx->sw_pix_fmt :\n+            AV_PIX_FMT_YUV420P;\n \n     /* capture context */\n     capture->av_codec_id = avctx->codec_id;\n@@ -372,7 +711,7 @@ static av_cold int v4l2_encode_init(AVCodecContext *avctx)\n         v4l2_fmt_output = output->format.fmt.pix.pixelformat;\n \n     pix_fmt_output = ff_v4l2_format_v4l2_to_avfmt(v4l2_fmt_output, AV_CODEC_ID_RAWVIDEO);\n-    if (pix_fmt_output != avctx->pix_fmt) {\n+    if (!s->input_drm && pix_fmt_output != avctx->pix_fmt) {\n         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt_output);\n         av_log(avctx, AV_LOG_ERROR, \"Encoder requires %s pixel format.\\n\", desc->name);\n         return AVERROR(EINVAL);\n@@ -390,9 +729,10 @@ static av_cold int v4l2_encode_close(AVCodecContext *avctx)\n #define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM\n \n #define V4L_M2M_CAPTURE_OPTS \\\n-    V4L_M2M_DEFAULT_OPTS,\\\n+    { \"num_output_buffers\", \"Number of buffers in the output context\",\\\n+        OFFSET(num_output_buffers), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS },\\\n     { \"num_capture_buffers\", \"Number of buffers in the capture context\", \\\n-        OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 4 }, 4, INT_MAX, FLAGS }\n+        OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 8 }, 8, INT_MAX, FLAGS }\n \n static const AVOption mpeg4_options[] = {\n     V4L_M2M_CAPTURE_OPTS,\ndiff --git a/libavcodec/v4l2_req_decode_q.c b/libavcodec/v4l2_req_decode_q.c\nnew file mode 100644\nindex 0000000000..5b3fb958fa\n--- /dev/null\n+++ b/libavcodec/v4l2_req_decode_q.c\n@@ -0,0 +1,84 @@\n+#include <memory.h>\n+#include <semaphore.h>\n+#include <pthread.h>\n+\n+#include \"v4l2_req_decode_q.h\"\n+\n+int decode_q_in_q(const req_decode_ent * const d)\n+{\n+    return d->in_q;\n+}\n+\n+void decode_q_add(req_decode_q * const q, req_decode_ent * const d)\n+{\n+    pthread_mutex_lock(&q->q_lock);\n+    if (!q->head) {\n+        q->head = d;\n+        q->tail = d;\n+        d->prev = NULL;\n+    }\n+    else {\n+        q->tail->next = d;\n+        d->prev = q->tail;\n+        q->tail = d;\n+    }\n+    d->next = NULL;\n+    d->in_q = 1;\n+    pthread_mutex_unlock(&q->q_lock);\n+}\n+\n+// Remove entry from Q - if head wake-up anything that was waiting\n+void decode_q_remove(req_decode_q * const q, req_decode_ent * const d)\n+{\n+    int try_signal = 0;\n+\n+    if (!d->in_q)\n+        return;\n+\n+    pthread_mutex_lock(&q->q_lock);\n+    if (d->prev)\n+        d->prev->next = d->next;\n+    else {\n+        try_signal = 1;  // Only need to signal if we were head\n+        q->head = d->next;\n+    }\n+\n+    if (d->next)\n+        d->next->prev = d->prev;\n+    else\n+        q->tail = d->prev;\n+\n+    // Not strictly needed but makes debug easier\n+    d->next = NULL;\n+    d->prev = NULL;\n+    d->in_q = 0;\n+    pthread_mutex_unlock(&q->q_lock);\n+\n+    if (try_signal)\n+        pthread_cond_broadcast(&q->q_cond);\n+}\n+\n+void decode_q_wait(req_decode_q * const q, req_decode_ent * const d)\n+{\n+    pthread_mutex_lock(&q->q_lock);\n+\n+    while (q->head != d)\n+        pthread_cond_wait(&q->q_cond, &q->q_lock);\n+\n+    pthread_mutex_unlock(&q->q_lock);\n+}\n+\n+void decode_q_uninit(req_decode_q * const q)\n+{\n+    pthread_mutex_destroy(&q->q_lock);\n+    pthread_cond_destroy(&q->q_cond);\n+}\n+\n+void decode_q_init(req_decode_q * const q)\n+{\n+    memset(q, 0, sizeof(*q));\n+    pthread_mutex_init(&q->q_lock, NULL);\n+    pthread_cond_init(&q->q_cond, NULL);\n+}\n+\n+\ndiff --git a/libavcodec/v4l2_req_decode_q.h b/libavcodec/v4l2_req_decode_q.h\nnew file mode 100644\nindex 0000000000..af7bbe1de4\n--- /dev/null\n+++ b/libavcodec/v4l2_req_decode_q.h\n@@ -0,0 +1,25 @@\n+#ifndef AVCODEC_V4L2_REQ_DECODE_Q_H\n+#define AVCODEC_V4L2_REQ_DECODE_Q_H\n+\n+typedef struct req_decode_ent {\n+    struct req_decode_ent * next;\n+    struct req_decode_ent * prev;\n+    int in_q;\n+} req_decode_ent;\n+\n+typedef struct req_decode_q {\n+    pthread_mutex_t q_lock;\n+    pthread_cond_t q_cond;\n+    req_decode_ent * head;\n+    req_decode_ent * tail;\n+} req_decode_q;\n+\n+int decode_q_in_q(const req_decode_ent * const d);\n+void decode_q_add(req_decode_q * const q, req_decode_ent * const d);\n+void decode_q_remove(req_decode_q * const q, req_decode_ent * const d);\n+void decode_q_wait(req_decode_q * const q, req_decode_ent * const d);\n+void decode_q_uninit(req_decode_q * const q);\n+void decode_q_init(req_decode_q * const q);\n+\n+#endif\n+\ndiff --git a/libavcodec/v4l2_req_devscan.c b/libavcodec/v4l2_req_devscan.c\nnew file mode 100644\nindex 0000000000..ee8527ba1f\n--- /dev/null\n+++ b/libavcodec/v4l2_req_devscan.c\n@@ -0,0 +1,451 @@\n+#include <errno.h>\n+#include <fcntl.h>\n+#include <libudev.h>\n+#include <stdlib.h>\n+#include <string.h>\n+#include <unistd.h>\n+\n+#include <sys/ioctl.h>\n+#include <sys/sysmacros.h>\n+\n+#include <linux/media.h>\n+#include <linux/videodev2.h>\n+\n+#include \"v4l2_req_devscan.h\"\n+#include \"v4l2_req_utils.h\"\n+\n+struct decdev {\n+    enum v4l2_buf_type src_type;\n+    uint32_t src_fmt_v4l2;\n+    const char * vname;\n+    const char * mname;\n+};\n+\n+struct devscan {\n+    struct decdev env;\n+    unsigned int dev_size;\n+    unsigned int dev_count;\n+    struct decdev *devs;\n+};\n+\n+static int video_src_pixfmt_supported(uint32_t fmt)\n+{\n+    return 1;\n+}\n+\n+static void v4l2_setup_format(struct v4l2_format *format, unsigned int type,\n+                  unsigned int width, unsigned int height,\n+                  unsigned int pixelformat)\n+{\n+    unsigned int sizeimage;\n+\n+    memset(format, 0, sizeof(*format));\n+    format->type = type;\n+\n+    sizeimage = V4L2_TYPE_IS_OUTPUT(type) ? 4 * 1024 * 1024 : 0;\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(type)) {\n+        format->fmt.pix_mp.width = width;\n+        format->fmt.pix_mp.height = height;\n+        format->fmt.pix_mp.plane_fmt[0].sizeimage = sizeimage;\n+        format->fmt.pix_mp.pixelformat = pixelformat;\n+    } else {\n+        format->fmt.pix.width = width;\n+        format->fmt.pix.height = height;\n+        format->fmt.pix.sizeimage = sizeimage;\n+        format->fmt.pix.pixelformat = pixelformat;\n+    }\n+}\n+\n+static int v4l2_set_format(int video_fd, unsigned int type, unsigned int pixelformat,\n+            unsigned int width, unsigned int height)\n+{\n+    struct v4l2_format format;\n+\n+    v4l2_setup_format(&format, type, width, height, pixelformat);\n+\n+    return ioctl(video_fd, VIDIOC_S_FMT, &format) ? -errno : 0;\n+}\n+\n+static int v4l2_query_capabilities(int video_fd, unsigned int *capabilities)\n+{\n+    struct v4l2_capability capability = { 0 };\n+    int rc;\n+\n+    rc = ioctl(video_fd, VIDIOC_QUERYCAP, &capability);\n+    if (rc < 0)\n+        return -errno;\n+\n+    if (capabilities != NULL) {\n+        if ((capability.capabilities & V4L2_CAP_DEVICE_CAPS) != 0)\n+            *capabilities = capability.device_caps;\n+        else\n+            *capabilities = capability.capabilities;\n+    }\n+\n+    return 0;\n+}\n+\n+static int devscan_add(struct devscan *const scan,\n+                       enum v4l2_buf_type src_type,\n+                       uint32_t src_fmt_v4l2,\n+                       const char * vname,\n+                       const char * mname)\n+{\n+    struct decdev *d;\n+\n+    if (scan->dev_size <= scan->dev_count) {\n+        unsigned int n = !scan->dev_size ? 4 : scan->dev_size * 2;\n+        d = realloc(scan->devs, n * sizeof(*d));\n+        if (!d)\n+            return -ENOMEM;\n+        scan->devs = d;\n+        scan->dev_size = n;\n+    }\n+\n+    d = scan->devs + scan->dev_count;\n+    d->src_type = src_type;\n+    d->src_fmt_v4l2 = src_fmt_v4l2;\n+    d->vname = strdup(vname);\n+    if (!d->vname)\n+        return -ENOMEM;\n+    d->mname = strdup(mname);\n+    if (!d->mname) {\n+        free((char *)d->vname);\n+        return -ENOMEM;\n+    }\n+    ++scan->dev_count;\n+    return 0;\n+}\n+\n+void devscan_delete(struct devscan **const pScan)\n+{\n+    unsigned int i;\n+    struct devscan * const scan = *pScan;\n+\n+    if (!scan)\n+        return;\n+    *pScan = NULL;\n+\n+    for (i = 0; i < scan->dev_count; ++i) {\n+        free((char*)scan->devs[i].mname);\n+        free((char*)scan->devs[i].vname);\n+    }\n+    free(scan->devs);\n+    free(scan);\n+}\n+\n+#define REQ_BUF_CAPS (\\\n+    V4L2_BUF_CAP_SUPPORTS_DMABUF |\\\n+    V4L2_BUF_CAP_SUPPORTS_REQUESTS |\\\n+    V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF)\n+\n+static void probe_formats(void * const dc,\n+              struct devscan *const scan,\n+              const int fd,\n+              const unsigned int type_v4l2,\n+              const char *const mpath,\n+              const char *const vpath)\n+{\n+    unsigned int i;\n+    for (i = 0;; ++i) {\n+        struct v4l2_fmtdesc fmtdesc = {\n+            .index = i,\n+            .type = type_v4l2\n+        };\n+        struct v4l2_requestbuffers rbufs = {\n+            .count = 0,\n+            .type = type_v4l2,\n+            .memory = V4L2_MEMORY_MMAP\n+        };\n+        while (ioctl(fd, VIDIOC_ENUM_FMT, &fmtdesc)) {\n+            if (errno == EINTR)\n+                continue;\n+            if (errno != EINVAL)\n+                request_err(dc, \"Enum[%d] failed for type=%d\\n\", i, type_v4l2);\n+            return;\n+        }\n+        if (!video_src_pixfmt_supported(fmtdesc.pixelformat))\n+            continue;\n+\n+        if (v4l2_set_format(fd, type_v4l2, fmtdesc.pixelformat, 720, 480)) {\n+            request_debug(dc, \"Set failed for type=%d, pf=%.4s\\n\", type_v4l2, (char*)&fmtdesc.pixelformat);\n+            continue;\n+        }\n+\n+        while (ioctl(fd, VIDIOC_REQBUFS, &rbufs)) {\n+            if (errno != EINTR) {\n+                request_debug(dc, \"%s: Reqbufs failed\\n\", vpath);\n+                continue;\n+            }\n+        }\n+\n+        if ((rbufs.capabilities & REQ_BUF_CAPS) != REQ_BUF_CAPS) {\n+            request_debug(dc, \"%s: Buf caps %#x insufficient\\n\", vpath, rbufs.capabilities);\n+            continue;\n+        }\n+\n+        request_debug(dc, \"Adding: %s,%s pix=%#x, type=%d\\n\",\n+                 mpath, vpath, fmtdesc.pixelformat, type_v4l2);\n+        devscan_add(scan, type_v4l2, fmtdesc.pixelformat, vpath, mpath);\n+    }\n+}\n+\n+\n+static int probe_video_device(void * const dc,\n+                   struct udev_device *const device,\n+                   struct devscan *const scan,\n+                   const char *const mpath)\n+{\n+    int ret;\n+    unsigned int capabilities = 0;\n+    int video_fd = -1;\n+\n+    const char *path = udev_device_get_devnode(device);\n+    if (!path) {\n+        request_err(dc, \"%s: get video device devnode failed\\n\", __func__);\n+        ret = -EINVAL;\n+        goto fail;\n+    }\n+\n+    video_fd = open(path, O_RDWR, 0);\n+    if (video_fd == -1) {\n+        ret = -errno;\n+        request_err(dc, \"%s: opening %s failed, %s (%d)\\n\", __func__, path, strerror(errno), errno);\n+        goto fail;\n+    }\n+\n+    ret = v4l2_query_capabilities(video_fd, &capabilities);\n+    if (ret < 0) {\n+        request_err(dc, \"%s: get video capability failed, %s (%d)\\n\", __func__, strerror(-ret), -ret);\n+        goto fail;\n+    }\n+\n+    request_debug(dc, \"%s: path=%s capabilities=%#x\\n\", __func__, path, capabilities);\n+\n+    if (!(capabilities & V4L2_CAP_STREAMING)) {\n+        request_debug(dc, \"%s: missing required streaming capability\\n\", __func__);\n+        ret = -EINVAL;\n+        goto fail;\n+    }\n+\n+    if (!(capabilities & (V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_VIDEO_M2M))) {\n+        request_debug(dc, \"%s: missing required mem2mem capability\\n\", __func__);\n+        ret = -EINVAL;\n+        goto fail;\n+    }\n+\n+    /* Should check capture formats too... */\n+    if ((capabilities & V4L2_CAP_VIDEO_M2M) != 0)\n+        probe_formats(dc, scan, video_fd, V4L2_BUF_TYPE_VIDEO_OUTPUT, mpath, path);\n+    if ((capabilities & V4L2_CAP_VIDEO_M2M_MPLANE) != 0)\n+        probe_formats(dc, scan, video_fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, mpath, path);\n+\n+    close(video_fd);\n+    return 0;\n+\n+fail:\n+    if (video_fd >= 0)\n+        close(video_fd);\n+    return ret;\n+}\n+\n+static int probe_media_device(void * const dc,\n+                   struct udev_device *const device,\n+                   struct devscan *const scan)\n+{\n+    int ret;\n+    int rv;\n+    struct media_device_info device_info = { 0 };\n+    struct media_v2_topology topology = { 0 };\n+    struct media_v2_interface *interfaces = NULL;\n+    struct udev *udev = udev_device_get_udev(device);\n+    struct udev_device *video_device;\n+    dev_t devnum;\n+    int media_fd = -1;\n+\n+    const char *path = udev_device_get_devnode(device);\n+    if (!path) {\n+        request_err(dc, \"%s: get media device devnode failed\\n\", __func__);\n+        ret = -EINVAL;\n+        goto fail;\n+    }\n+\n+    media_fd = open(path, O_RDWR, 0);\n+    if (media_fd < 0) {\n+        ret = -errno;\n+        request_err(dc, \"%s: opening %s failed, %s (%d)\\n\", __func__, path, strerror(-ret), -ret);\n+        goto fail;\n+    }\n+\n+    rv = ioctl(media_fd, MEDIA_IOC_DEVICE_INFO, &device_info);\n+    if (rv < 0) {\n+        ret = -errno;\n+        request_err(dc, \"%s: get media device info failed, %s (%d)\\n\", __func__, strerror(-ret), -ret);\n+        goto fail;\n+    }\n+\n+    rv = ioctl(media_fd, MEDIA_IOC_G_TOPOLOGY, &topology);\n+    if (rv < 0) {\n+        ret = -errno;\n+        request_err(dc, \"%s: get media topology failed, %s (%d)\\n\", __func__, strerror(-ret), -ret);\n+        goto fail;\n+    }\n+\n+    if (topology.num_interfaces <= 0) {\n+        request_err(dc, \"%s: media device has no interfaces\\n\", __func__);\n+        ret = -EINVAL;\n+        goto fail;\n+    }\n+\n+    interfaces = calloc(topology.num_interfaces, sizeof(*interfaces));\n+    if (!interfaces) {\n+        request_err(dc, \"%s: allocating media interface struct failed\\n\", __func__);\n+        ret = -ENOMEM;\n+        goto fail;\n+    }\n+\n+    topology.ptr_interfaces = (__u64)(uintptr_t)interfaces;\n+    rv = ioctl(media_fd, MEDIA_IOC_G_TOPOLOGY, &topology);\n+    if (rv < 0) {\n+        ret = -errno;\n+        request_err(dc, \"%s: get media topology failed, %s (%d)\\n\", __func__, strerror(-ret), -ret);\n+        goto fail;\n+    }\n+\n+    for (int i = 0; i < topology.num_interfaces; i++) {\n+        if (interfaces[i].intf_type != MEDIA_INTF_T_V4L_VIDEO)\n+            continue;\n+\n+        devnum = makedev(interfaces[i].devnode.major, interfaces[i].devnode.minor);\n+        video_device = udev_device_new_from_devnum(udev, 'c', devnum);\n+        if (!video_device) {\n+            ret = -errno;\n+            request_err(dc, \"%s: video_device[%d]=%p\\n\", __func__, i, video_device);\n+            continue;\n+        }\n+\n+        ret = probe_video_device(dc, video_device, scan, path);\n+        udev_device_unref(video_device);\n+\n+        if (ret != 0)\n+            goto fail;\n+    }\n+\n+fail:\n+    free(interfaces);\n+    if (media_fd != -1)\n+        close(media_fd);\n+    return ret;\n+}\n+\n+const char *decdev_media_path(const struct decdev *const dev)\n+{\n+    return !dev ? NULL : dev->mname;\n+}\n+\n+const char *decdev_video_path(const struct decdev *const dev)\n+{\n+    return !dev ? NULL : dev->vname;\n+}\n+\n+enum v4l2_buf_type decdev_src_type(const struct decdev *const dev)\n+{\n+    return !dev ? 0 : dev->src_type;\n+}\n+\n+uint32_t decdev_src_pixelformat(const struct decdev *const dev)\n+{\n+    return !dev ? 0 : dev->src_fmt_v4l2;\n+}\n+\n+\n+const struct decdev *devscan_find(struct devscan *const scan,\n+                  const uint32_t src_fmt_v4l2)\n+{\n+    unsigned int i;\n+\n+    if (scan->env.mname && scan->env.vname)\n+        return &scan->env;\n+\n+    if (!src_fmt_v4l2)\n+        return scan->dev_count ? scan->devs + 0 : NULL;\n+\n+    for (i = 0; i != scan->dev_count; ++i) {\n+        if (scan->devs[i].src_fmt_v4l2 == src_fmt_v4l2)\n+            return scan->devs + i;\n+    }\n+    return NULL;\n+}\n+\n+int devscan_build(void * const dc, struct devscan **pscan)\n+{\n+    int ret;\n+    struct udev *udev;\n+    struct udev_enumerate *enumerate;\n+    struct udev_list_entry *devices;\n+    struct udev_list_entry *entry;\n+    struct udev_device *device;\n+    struct devscan * scan;\n+\n+    *pscan = NULL;\n+\n+    scan = calloc(1, sizeof(*scan));\n+    if (!scan) {\n+        ret = -ENOMEM;\n+        goto fail;\n+    }\n+\n+    scan->env.mname = getenv(\"LIBVA_V4L2_REQUEST_MEDIA_PATH\");\n+    scan->env.vname = getenv(\"LIBVA_V4L2_REQUEST_VIDEO_PATH\");\n+    if (scan->env.mname && scan->env.vname) {\n+        request_info(dc, \"Media/video device env overrides found: %s,%s\\n\",\n+                 scan->env.mname, scan->env.vname);\n+        *pscan = scan;\n+        return 0;\n+    }\n+\n+    udev = udev_new();\n+    if (!udev) {\n+        request_err(dc, \"%s: allocating udev context failed\\n\", __func__);\n+        ret = -ENOMEM;\n+        goto fail;\n+    }\n+\n+    enumerate = udev_enumerate_new(udev);\n+    if (!enumerate) {\n+        request_err(dc, \"%s: allocating udev enumerator failed\\n\", __func__);\n+        ret = -ENOMEM;\n+        goto fail;\n+    }\n+\n+    udev_enumerate_add_match_subsystem(enumerate, \"media\");\n+    udev_enumerate_scan_devices(enumerate);\n+\n+    devices = udev_enumerate_get_list_entry(enumerate);\n+    udev_list_entry_foreach(entry, devices) {\n+        const char *path = udev_list_entry_get_name(entry);\n+        if (!path)\n+            continue;\n+\n+        device = udev_device_new_from_syspath(udev, path);\n+        if (!device)\n+            continue;\n+\n+        probe_media_device(dc, device, scan);\n+        udev_device_unref(device);\n+    }\n+\n+    udev_enumerate_unref(enumerate);\n+    udev_unref(udev);\n+\n+    *pscan = scan;\n+    return 0;\n+\n+fail:\n+    if (udev)\n+        udev_unref(udev);\n+    devscan_delete(&scan);\n+    return ret;\n+}\n+\ndiff --git a/libavcodec/v4l2_req_devscan.h b/libavcodec/v4l2_req_devscan.h\nnew file mode 100644\nindex 0000000000..956d9234f1\n--- /dev/null\n+++ b/libavcodec/v4l2_req_devscan.h\n@@ -0,0 +1,23 @@\n+#ifndef _DEVSCAN_H_\n+#define _DEVSCAN_H_\n+\n+#include <stdint.h>\n+\n+struct devscan;\n+struct decdev;\n+enum v4l2_buf_type;\n+\n+/* These return pointers to data in the devscan structure and so are vaild\n+ * for the lifetime of that\n+ */\n+const char *decdev_media_path(const struct decdev *const dev);\n+const char *decdev_video_path(const struct decdev *const dev);\n+enum v4l2_buf_type decdev_src_type(const struct decdev *const dev);\n+uint32_t decdev_src_pixelformat(const struct decdev *const dev);\n+\n+const struct decdev *devscan_find(struct devscan *const scan, const uint32_t src_fmt_v4l2);\n+\n+int devscan_build(void * const dc, struct devscan **pscan);\n+void devscan_delete(struct devscan **const pScan);\n+\n+#endif\ndiff --git a/libavcodec/v4l2_req_dmabufs.c b/libavcodec/v4l2_req_dmabufs.c\nnew file mode 100644\nindex 0000000000..acc0366e76\n--- /dev/null\n+++ b/libavcodec/v4l2_req_dmabufs.c\n@@ -0,0 +1,369 @@\n+#include <stdatomic.h>\n+#include <stdio.h>\n+#include <stdlib.h>\n+#include <unistd.h>\n+#include <inttypes.h>\n+#include <fcntl.h>\n+#include <errno.h>\n+#include <string.h>\n+#include <sys/ioctl.h>\n+#include <sys/mman.h>\n+#include <linux/mman.h>\n+#include <linux/dma-buf.h>\n+#include <linux/dma-heap.h>\n+\n+#include \"v4l2_req_dmabufs.h\"\n+#include \"v4l2_req_utils.h\"\n+\n+#define DMABUF_NAME1  \"/dev/dma_heap/linux,cma\"\n+#define DMABUF_NAME2  \"/dev/dma_heap/reserved\"\n+\n+#define TRACE_ALLOC 0\n+\n+struct dmabufs_ctl;\n+struct dmabuf_h;\n+\n+struct dmabuf_fns {\n+    int (*buf_alloc)(struct dmabufs_ctl * dbsc, struct dmabuf_h * dh, size_t size);\n+    void (*buf_free)(struct dmabuf_h * dh);\n+    int (*ctl_new)(struct dmabufs_ctl * dbsc);\n+    void (*ctl_free)(struct dmabufs_ctl * dbsc);\n+};\n+\n+struct dmabufs_ctl {\n+    atomic_int ref_count;\n+    int fd;\n+    size_t page_size;\n+    void * v;\n+    const struct dmabuf_fns * fns;\n+};\n+\n+struct dmabuf_h {\n+    int fd;\n+    size_t size;\n+    size_t len;\n+    void * mapptr;\n+    void * v;\n+    const struct dmabuf_fns * fns;\n+};\n+\n+#if TRACE_ALLOC\n+static unsigned int total_bufs = 0;\n+static size_t total_size = 0;\n+#endif\n+\n+struct dmabuf_h * dmabuf_import_mmap(void * mapptr, size_t size)\n+{\n+    struct dmabuf_h *dh;\n+\n+    if (mapptr == MAP_FAILED)\n+        return NULL;\n+\n+    dh = malloc(sizeof(*dh));\n+    if (!dh)\n+        return NULL;\n+\n+    *dh = (struct dmabuf_h) {\n+        .fd = -1,\n+        .size = size,\n+        .mapptr = mapptr\n+    };\n+\n+    return dh;\n+}\n+\n+struct dmabuf_h * dmabuf_import(int fd, size_t size)\n+{\n+    struct dmabuf_h *dh;\n+\n+    fd = dup(fd);\n+    if (fd < 0  || size == 0)\n+        return NULL;\n+\n+    dh = malloc(sizeof(*dh));\n+    if (!dh) {\n+        close(fd);\n+        return NULL;\n+    }\n+\n+    *dh = (struct dmabuf_h) {\n+        .fd = fd,\n+        .size = size,\n+        .mapptr = MAP_FAILED\n+    };\n+\n+#if TRACE_ALLOC\n+    ++total_bufs;\n+    total_size += dh->size;\n+    request_log(\"%s: Import: %zd, total=%zd, bufs=%d\\n\", __func__, dh->size, total_size, total_bufs);\n+#endif\n+\n+    return dh;\n+}\n+\n+struct dmabuf_h * dmabuf_realloc(struct dmabufs_ctl * dbsc, struct dmabuf_h * old, size_t size)\n+{\n+    struct dmabuf_h * dh;\n+    if (old != NULL) {\n+        if (old->size >= size) {\n+            return old;\n+        }\n+        dmabuf_free(old);\n+    }\n+\n+    if (size == 0 ||\n+        (dh = malloc(sizeof(*dh))) == NULL)\n+        return NULL;\n+\n+    *dh = (struct dmabuf_h){\n+        .fd = -1,\n+        .mapptr = MAP_FAILED,\n+        .fns = dbsc->fns\n+    };\n+\n+    if (dh->fns->buf_alloc(dbsc, dh, size) != 0)\n+        goto fail;\n+\n+\n+#if TRACE_ALLOC\n+    ++total_bufs;\n+    total_size += dh->size;\n+    request_log(\"%s: Alloc: %zd, total=%zd, bufs=%d\\n\", __func__, dh->size, total_size, total_bufs);\n+#endif\n+\n+    return dh;\n+\n+fail:\n+    free(dh);\n+    return NULL;\n+}\n+\n+int dmabuf_sync(struct dmabuf_h * const dh, unsigned int flags)\n+{\n+    struct dma_buf_sync sync = {\n+        .flags = flags\n+    };\n+    if (dh->fd == -1)\n+        return 0;\n+    while (ioctl(dh->fd, DMA_BUF_IOCTL_SYNC, &sync) == -1) {\n+        const int err = errno;\n+        if (errno == EINTR)\n+            continue;\n+        request_log(\"%s: ioctl failed: flags=%#x\\n\", __func__, flags);\n+        return -err;\n+    }\n+    return 0;\n+}\n+\n+int dmabuf_write_start(struct dmabuf_h * const dh)\n+{\n+    return dmabuf_sync(dh, DMA_BUF_SYNC_START | DMA_BUF_SYNC_WRITE);\n+}\n+\n+int dmabuf_write_end(struct dmabuf_h * const dh)\n+{\n+    return dmabuf_sync(dh, DMA_BUF_SYNC_END | DMA_BUF_SYNC_WRITE);\n+}\n+\n+int dmabuf_read_start(struct dmabuf_h * const dh)\n+{\n+    if (!dmabuf_map(dh))\n+        return -1;\n+    return dmabuf_sync(dh, DMA_BUF_SYNC_START | DMA_BUF_SYNC_READ);\n+}\n+\n+int dmabuf_read_end(struct dmabuf_h * const dh)\n+{\n+    return dmabuf_sync(dh, DMA_BUF_SYNC_END | DMA_BUF_SYNC_READ);\n+}\n+\n+\n+void * dmabuf_map(struct dmabuf_h * const dh)\n+{\n+    if (!dh)\n+        return NULL;\n+    if (dh->mapptr != MAP_FAILED)\n+        return dh->mapptr;\n+    dh->mapptr = mmap(NULL, dh->size,\n+              PROT_READ | PROT_WRITE,\n+              MAP_SHARED | MAP_POPULATE,\n+              dh->fd, 0);\n+    if (dh->mapptr == MAP_FAILED) {\n+        request_log(\"%s: Map failed\\n\", __func__);\n+        return NULL;\n+    }\n+    return dh->mapptr;\n+}\n+\n+int dmabuf_fd(const struct dmabuf_h * const dh)\n+{\n+    if (!dh)\n+        return -1;\n+    return dh->fd;\n+}\n+\n+size_t dmabuf_size(const struct dmabuf_h * const dh)\n+{\n+    if (!dh)\n+        return 0;\n+    return dh->size;\n+}\n+\n+size_t dmabuf_len(const struct dmabuf_h * const dh)\n+{\n+    if (!dh)\n+        return 0;\n+    return dh->len;\n+}\n+\n+void dmabuf_len_set(struct dmabuf_h * const dh, const size_t len)\n+{\n+    dh->len = len;\n+}\n+\n+void dmabuf_free(struct dmabuf_h * dh)\n+{\n+    if (!dh)\n+        return;\n+\n+#if TRACE_ALLOC\n+    --total_bufs;\n+    total_size -= dh->size;\n+    request_log(\"%s: Free: %zd, total=%zd, bufs=%d\\n\", __func__, dh->size, total_size, total_bufs);\n+#endif\n+\n+    dh->fns->buf_free(dh);\n+\n+    if (dh->mapptr != MAP_FAILED && dh->mapptr != NULL)\n+        munmap(dh->mapptr, dh->size);\n+    if (dh->fd != -1)\n+        while (close(dh->fd) == -1 && errno == EINTR)\n+            /* loop */;\n+    free(dh);\n+}\n+\n+static struct dmabufs_ctl * dmabufs_ctl_new2(const struct dmabuf_fns * const fns)\n+{\n+    struct dmabufs_ctl * dbsc = calloc(1, sizeof(*dbsc));\n+\n+    if (!dbsc)\n+        return NULL;\n+\n+    dbsc->fd = -1;\n+    dbsc->fns = fns;\n+    dbsc->page_size = (size_t)sysconf(_SC_PAGE_SIZE);\n+\n+    if (fns->ctl_new(dbsc) != 0)\n+        goto fail;\n+\n+    return dbsc;\n+\n+fail:\n+    free(dbsc);\n+    return NULL;\n+}\n+\n+static void dmabufs_ctl_free(struct dmabufs_ctl * const dbsc)\n+{\n+    request_debug(NULL, \"Free dmabuf ctl\\n\");\n+\n+    dbsc->fns->ctl_free(dbsc);\n+\n+    free(dbsc);\n+}\n+\n+void dmabufs_ctl_unref(struct dmabufs_ctl ** const pDbsc)\n+{\n+    struct dmabufs_ctl * const dbsc = *pDbsc;\n+\n+    if (!dbsc)\n+        return;\n+    *pDbsc = NULL;\n+\n+    if (atomic_fetch_sub(&dbsc->ref_count, 1) != 0)\n+        return;\n+\n+    dmabufs_ctl_free(dbsc);\n+}\n+\n+struct dmabufs_ctl * dmabufs_ctl_ref(struct dmabufs_ctl * const dbsc)\n+{\n+    atomic_fetch_add(&dbsc->ref_count, 1);\n+    return dbsc;\n+}\n+\n+//-----------------------------------------------------------------------------\n+//\n+// Alloc dmabuf via CMA\n+\n+static int ctl_cma_new(struct dmabufs_ctl * dbsc)\n+{\n+    while ((dbsc->fd = open(DMABUF_NAME1, O_RDWR)) == -1 &&\n+           errno == EINTR)\n+        /* Loop */;\n+\n+    if (dbsc->fd == -1) {\n+        while ((dbsc->fd = open(DMABUF_NAME2, O_RDWR)) == -1 &&\n+               errno == EINTR)\n+            /* Loop */;\n+        if (dbsc->fd == -1) {\n+            request_log(\"Unable to open either %s or %s\\n\",\n+                    DMABUF_NAME1, DMABUF_NAME2);\n+            return -1;\n+        }\n+    }\n+    return 0;\n+}\n+\n+static void ctl_cma_free(struct dmabufs_ctl * dbsc)\n+{\n+    if (dbsc->fd != -1)\n+        while (close(dbsc->fd) == -1 && errno == EINTR)\n+            /* loop */;\n+\n+}\n+\n+static int buf_cma_alloc(struct dmabufs_ctl * const dbsc, struct dmabuf_h * dh, size_t size)\n+{\n+    struct dma_heap_allocation_data data = {\n+        .len = (size + dbsc->page_size - 1) & ~(dbsc->page_size - 1),\n+        .fd = 0,\n+        .fd_flags = O_RDWR,\n+        .heap_flags = 0\n+    };\n+\n+    while (ioctl(dbsc->fd, DMA_HEAP_IOCTL_ALLOC, &data)) {\n+        int err = errno;\n+        request_log(\"Failed to alloc %\" PRIu64 \" from dma-heap(fd=%d): %d (%s)\\n\",\n+                (uint64_t)data.len,\n+                dbsc->fd,\n+                err,\n+                strerror(err));\n+        if (err == EINTR)\n+            continue;\n+        return -err;\n+    }\n+\n+    dh->fd = data.fd;\n+    dh->size = (size_t)data.len;\n+    return 0;\n+}\n+\n+static void buf_cma_free(struct dmabuf_h * dh)\n+{\n+    // Nothing needed\n+}\n+\n+static const struct dmabuf_fns dmabuf_cma_fns = {\n+    .buf_alloc  = buf_cma_alloc,\n+    .buf_free   = buf_cma_free,\n+    .ctl_new    = ctl_cma_new,\n+    .ctl_free   = ctl_cma_free,\n+};\n+\n+struct dmabufs_ctl * dmabufs_ctl_new(void)\n+{\n+    request_debug(NULL, \"Dmabufs using CMA\\n\");;\n+    return dmabufs_ctl_new2(&dmabuf_cma_fns);\n+}\n+\ndiff --git a/libavcodec/v4l2_req_dmabufs.h b/libavcodec/v4l2_req_dmabufs.h\nnew file mode 100644\nindex 0000000000..381ba2708d\n--- /dev/null\n+++ b/libavcodec/v4l2_req_dmabufs.h\n@@ -0,0 +1,44 @@\n+#ifndef DMABUFS_H\n+#define DMABUFS_H\n+\n+#include <stddef.h>\n+\n+struct dmabufs_ctl;\n+struct dmabuf_h;\n+\n+struct dmabufs_ctl * dmabufs_ctl_new(void);\n+void dmabufs_ctl_unref(struct dmabufs_ctl ** const pdbsc);\n+struct dmabufs_ctl * dmabufs_ctl_ref(struct dmabufs_ctl * const dbsc);\n+\n+// Need not preserve old contents\n+// On NULL return old buffer is freed\n+struct dmabuf_h * dmabuf_realloc(struct dmabufs_ctl * dbsc, struct dmabuf_h *, size_t size);\n+\n+static inline struct dmabuf_h * dmabuf_alloc(struct dmabufs_ctl * dbsc, size_t size) {\n+    return dmabuf_realloc(dbsc, NULL, size);\n+}\n+/* Create from existing fd - dups(fd) */\n+struct dmabuf_h * dmabuf_import(int fd, size_t size);\n+/* Import an MMAP - return NULL if mapptr = MAP_FAIL */\n+struct dmabuf_h * dmabuf_import_mmap(void * mapptr, size_t size);\n+\n+void * dmabuf_map(struct dmabuf_h * const dh);\n+\n+/* flags from linux/dmabuf.h DMA_BUF_SYNC_xxx */\n+int dmabuf_sync(struct dmabuf_h * const dh, unsigned int flags);\n+\n+int dmabuf_write_start(struct dmabuf_h * const dh);\n+int dmabuf_write_end(struct dmabuf_h * const dh);\n+int dmabuf_read_start(struct dmabuf_h * const dh);\n+int dmabuf_read_end(struct dmabuf_h * const dh);\n+\n+int dmabuf_fd(const struct dmabuf_h * const dh);\n+/* Allocated size */\n+size_t dmabuf_size(const struct dmabuf_h * const dh);\n+/* Bytes in use */\n+size_t dmabuf_len(const struct dmabuf_h * const dh);\n+/* Set bytes in use */\n+void dmabuf_len_set(struct dmabuf_h * const dh, const size_t len);\n+void dmabuf_free(struct dmabuf_h * dh);\n+\n+#endif\ndiff --git a/libavcodec/v4l2_req_hevc_v1.c b/libavcodec/v4l2_req_hevc_v1.c\nnew file mode 100644\nindex 0000000000..169b532832\n--- /dev/null\n+++ b/libavcodec/v4l2_req_hevc_v1.c\n@@ -0,0 +1,3 @@\n+#define HEVC_CTRLS_VERSION 1\n+#include \"v4l2_req_hevc_vx.c\"\n+\ndiff --git a/libavcodec/v4l2_req_hevc_v2.c b/libavcodec/v4l2_req_hevc_v2.c\nnew file mode 100644\nindex 0000000000..42af98e156\n--- /dev/null\n+++ b/libavcodec/v4l2_req_hevc_v2.c\n@@ -0,0 +1,3 @@\n+#define HEVC_CTRLS_VERSION 2\n+#include \"v4l2_req_hevc_vx.c\"\n+\ndiff --git a/libavcodec/v4l2_req_hevc_v3.c b/libavcodec/v4l2_req_hevc_v3.c\nnew file mode 100644\nindex 0000000000..dcc8d95632\n--- /dev/null\n+++ b/libavcodec/v4l2_req_hevc_v3.c\n@@ -0,0 +1,3 @@\n+#define HEVC_CTRLS_VERSION 3\n+#include \"v4l2_req_hevc_vx.c\"\n+\ndiff --git a/libavcodec/v4l2_req_hevc_v4.c b/libavcodec/v4l2_req_hevc_v4.c\nnew file mode 100644\nindex 0000000000..c35579d8e0\n--- /dev/null\n+++ b/libavcodec/v4l2_req_hevc_v4.c\n@@ -0,0 +1,3 @@\n+#define HEVC_CTRLS_VERSION 4\n+#include \"v4l2_req_hevc_vx.c\"\n+\ndiff --git a/libavcodec/v4l2_req_hevc_vx.c b/libavcodec/v4l2_req_hevc_vx.c\nnew file mode 100644\nindex 0000000000..b98d8464ca\n--- /dev/null\n+++ b/libavcodec/v4l2_req_hevc_vx.c\n@@ -0,0 +1,1360 @@\n+// File included by v4l2_req_hevc_v* - not compiled on its own\n+\n+#include \"decode.h\"\n+#include \"hevcdec.h\"\n+#include \"hwconfig.h\"\n+\n+#if HEVC_CTRLS_VERSION == 1\n+#include \"hevc-ctrls-v1.h\"\n+\n+// Fixup renamed entries\n+#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT\n+\n+#elif HEVC_CTRLS_VERSION == 2\n+#include \"hevc-ctrls-v2.h\"\n+#elif HEVC_CTRLS_VERSION == 3\n+#include \"hevc-ctrls-v3.h\"\n+#elif HEVC_CTRLS_VERSION == 4\n+#include <linux/v4l2-controls.h>\n+#if !defined(V4L2_CID_STATELESS_HEVC_SPS)\n+#include \"hevc-ctrls-v4.h\"\n+#endif\n+#else\n+#error Unknown HEVC_CTRLS_VERSION\n+#endif\n+\n+#ifndef V4L2_CID_STATELESS_HEVC_SPS\n+#define V4L2_CID_STATELESS_HEVC_SPS                     V4L2_CID_MPEG_VIDEO_HEVC_SPS\n+#define V4L2_CID_STATELESS_HEVC_PPS                     V4L2_CID_MPEG_VIDEO_HEVC_PPS\n+#define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS            V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS\n+#define V4L2_CID_STATELESS_HEVC_SCALING_MATRIX          V4L2_CID_MPEG_VIDEO_HEVC_SCALING_MATRIX\n+#define V4L2_CID_STATELESS_HEVC_DECODE_PARAMS           V4L2_CID_MPEG_VIDEO_HEVC_DECODE_PARAMS\n+#define V4L2_CID_STATELESS_HEVC_DECODE_MODE             V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE\n+#define V4L2_CID_STATELESS_HEVC_START_CODE              V4L2_CID_MPEG_VIDEO_HEVC_START_CODE\n+\n+#define V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED     V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED\n+#define V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED     V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_FRAME_BASED\n+#define V4L2_STATELESS_HEVC_START_CODE_NONE             V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE\n+#define V4L2_STATELESS_HEVC_START_CODE_ANNEX_B          V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B\n+#endif\n+\n+#include \"v4l2_request_hevc.h\"\n+\n+#include \"libavutil/hwcontext_drm.h\"\n+\n+#include <semaphore.h>\n+#include <pthread.h>\n+\n+#include \"v4l2_req_devscan.h\"\n+#include \"v4l2_req_dmabufs.h\"\n+#include \"v4l2_req_pollqueue.h\"\n+#include \"v4l2_req_media.h\"\n+#include \"v4l2_req_utils.h\"\n+\n+// Attached to buf[0] in frame\n+// Pooled in hwcontext so generally create once - 1/frame\n+typedef struct V4L2MediaReqDescriptor {\n+    AVDRMFrameDescriptor drm;\n+\n+    // Media\n+    uint64_t timestamp;\n+    struct qent_dst * qe_dst;\n+\n+    // Decode only - should be NULL by the time we emit the frame\n+    struct req_decode_ent decode_ent;\n+\n+    struct media_request *req;\n+    struct qent_src *qe_src;\n+\n+#if HEVC_CTRLS_VERSION >= 2\n+    struct v4l2_ctrl_hevc_decode_params dec;\n+#endif\n+\n+    size_t num_slices;\n+    size_t alloced_slices;\n+    struct v4l2_ctrl_hevc_slice_params * slice_params;\n+    struct slice_info * slices;\n+\n+    size_t num_offsets;\n+    size_t alloced_offsets;\n+    uint32_t *offsets;\n+\n+} V4L2MediaReqDescriptor;\n+\n+struct slice_info {\n+    const uint8_t * ptr;\n+    size_t len; // bytes\n+    size_t n_offsets;\n+};\n+\n+// Handy container for accumulating controls before setting\n+struct req_controls {\n+    int has_scaling;\n+    struct timeval tv;\n+    struct v4l2_ctrl_hevc_sps sps;\n+    struct v4l2_ctrl_hevc_pps pps;\n+    struct v4l2_ctrl_hevc_scaling_matrix scaling_matrix;\n+};\n+\n+//static uint8_t nalu_slice_start_code[] = { 0x00, 0x00, 0x01 };\n+\n+\n+// Get an FFmpeg format from the v4l2 format\n+static enum AVPixelFormat pixel_format_from_format(const struct v4l2_format *const format)\n+{\n+    switch (V4L2_TYPE_IS_MULTIPLANAR(format->type) ?\n+            format->fmt.pix_mp.pixelformat : format->fmt.pix.pixelformat) {\n+    case V4L2_PIX_FMT_YUV420:\n+        return AV_PIX_FMT_YUV420P;\n+    case V4L2_PIX_FMT_NV12:\n+        return AV_PIX_FMT_NV12;\n+#if CONFIG_SAND\n+    case V4L2_PIX_FMT_NV12_COL128:\n+        return AV_PIX_FMT_RPI4_8;\n+    case V4L2_PIX_FMT_NV12_10_COL128:\n+        return AV_PIX_FMT_RPI4_10;\n+#endif\n+    default:\n+        break;\n+    }\n+    return AV_PIX_FMT_NONE;\n+}\n+\n+static inline uint64_t frame_capture_dpb(const AVFrame * const frame)\n+{\n+    const V4L2MediaReqDescriptor *const rd = (V4L2MediaReqDescriptor *)frame->data[0];\n+    return rd->timestamp;\n+}\n+\n+static inline void frame_set_capture_dpb(AVFrame * const frame, const uint64_t dpb_stamp)\n+{\n+    V4L2MediaReqDescriptor *const rd = (V4L2MediaReqDescriptor *)frame->data[0];\n+    rd->timestamp = dpb_stamp;\n+}\n+\n+static void fill_pred_table(const HEVCContext *h, struct v4l2_hevc_pred_weight_table *table)\n+{\n+    int32_t luma_weight_denom, chroma_weight_denom;\n+    const SliceHeader *sh = &h->sh;\n+\n+    if (sh->slice_type == HEVC_SLICE_I ||\n+        (sh->slice_type == HEVC_SLICE_P && !h->ps.pps->weighted_pred_flag) ||\n+        (sh->slice_type == HEVC_SLICE_B && !h->ps.pps->weighted_bipred_flag))\n+        return;\n+\n+    table->luma_log2_weight_denom = sh->luma_log2_weight_denom;\n+\n+    if (h->ps.sps->chroma_format_idc)\n+        table->delta_chroma_log2_weight_denom = sh->chroma_log2_weight_denom - sh->luma_log2_weight_denom;\n+\n+    luma_weight_denom = (1 << sh->luma_log2_weight_denom);\n+    chroma_weight_denom = (1 << sh->chroma_log2_weight_denom);\n+\n+    for (int i = 0; i < 15 && i < sh->nb_refs[L0]; i++) {\n+        table->delta_luma_weight_l0[i] = sh->luma_weight_l0[i] - luma_weight_denom;\n+        table->luma_offset_l0[i] = sh->luma_offset_l0[i];\n+        table->delta_chroma_weight_l0[i][0] = sh->chroma_weight_l0[i][0] - chroma_weight_denom;\n+        table->delta_chroma_weight_l0[i][1] = sh->chroma_weight_l0[i][1] - chroma_weight_denom;\n+        table->chroma_offset_l0[i][0] = sh->chroma_offset_l0[i][0];\n+        table->chroma_offset_l0[i][1] = sh->chroma_offset_l0[i][1];\n+    }\n+\n+    if (sh->slice_type != HEVC_SLICE_B)\n+        return;\n+\n+    for (int i = 0; i < 15 && i < sh->nb_refs[L1]; i++) {\n+        table->delta_luma_weight_l1[i] = sh->luma_weight_l1[i] - luma_weight_denom;\n+        table->luma_offset_l1[i] = sh->luma_offset_l1[i];\n+        table->delta_chroma_weight_l1[i][0] = sh->chroma_weight_l1[i][0] - chroma_weight_denom;\n+        table->delta_chroma_weight_l1[i][1] = sh->chroma_weight_l1[i][1] - chroma_weight_denom;\n+        table->chroma_offset_l1[i][0] = sh->chroma_offset_l1[i][0];\n+        table->chroma_offset_l1[i][1] = sh->chroma_offset_l1[i][1];\n+    }\n+}\n+\n+#if HEVC_CTRLS_VERSION <= 2\n+static int find_frame_rps_type(const HEVCContext *h, uint64_t timestamp)\n+{\n+    const HEVCFrame *frame;\n+    int i;\n+\n+    for (i = 0; i < h->rps[ST_CURR_BEF].nb_refs; i++) {\n+        frame = h->rps[ST_CURR_BEF].ref[i];\n+        if (frame && timestamp == frame_capture_dpb(frame->frame))\n+            return V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_BEFORE;\n+    }\n+\n+    for (i = 0; i < h->rps[ST_CURR_AFT].nb_refs; i++) {\n+        frame = h->rps[ST_CURR_AFT].ref[i];\n+        if (frame && timestamp == frame_capture_dpb(frame->frame))\n+            return V4L2_HEVC_DPB_ENTRY_RPS_ST_CURR_AFTER;\n+    }\n+\n+    for (i = 0; i < h->rps[LT_CURR].nb_refs; i++) {\n+        frame = h->rps[LT_CURR].ref[i];\n+        if (frame && timestamp == frame_capture_dpb(frame->frame))\n+            return V4L2_HEVC_DPB_ENTRY_RPS_LT_CURR;\n+    }\n+\n+    return 0;\n+}\n+#endif\n+\n+static unsigned int\n+get_ref_pic_index(const HEVCContext *h, const HEVCFrame *frame,\n+                  const struct v4l2_hevc_dpb_entry * const entries,\n+                  const unsigned int num_entries)\n+{\n+    uint64_t timestamp;\n+\n+    if (!frame)\n+        return 0;\n+\n+    timestamp = frame_capture_dpb(frame->frame);\n+\n+    for (unsigned int i = 0; i < num_entries; i++) {\n+        if (entries[i].timestamp == timestamp)\n+            return i;\n+    }\n+\n+    return 0;\n+}\n+\n+static const uint8_t * ptr_from_index(const uint8_t * b, unsigned int idx)\n+{\n+    unsigned int z = 0;\n+    while (idx--) {\n+        if (*b++ == 0) {\n+            ++z;\n+            if (z >= 2 && *b == 3) {\n+                ++b;\n+                z = 0;\n+            }\n+        }\n+        else {\n+            z = 0;\n+        }\n+    }\n+    return b;\n+}\n+\n+static int slice_add(V4L2MediaReqDescriptor * const rd)\n+{\n+    if (rd->num_slices >= rd->alloced_slices) {\n+        struct v4l2_ctrl_hevc_slice_params * p2;\n+        struct slice_info * s2;\n+        size_t n2 = rd->alloced_slices == 0 ? 8 : rd->alloced_slices * 2;\n+\n+        p2 = av_realloc_array(rd->slice_params, n2, sizeof(*p2));\n+        if (p2 == NULL)\n+            return AVERROR(ENOMEM);\n+        rd->slice_params = p2;\n+\n+        s2 = av_realloc_array(rd->slices, n2, sizeof(*s2));\n+        if (s2 == NULL)\n+            return AVERROR(ENOMEM);\n+        rd->slices = s2;\n+\n+        rd->alloced_slices = n2;\n+    }\n+    ++rd->num_slices;\n+    return 0;\n+}\n+\n+static int offsets_add(V4L2MediaReqDescriptor *const rd, const size_t n, const unsigned * const offsets)\n+{\n+    if (rd->num_offsets + n > rd->alloced_offsets) {\n+        size_t n2 = rd->alloced_slices == 0 ? 128 : rd->alloced_slices * 2;\n+        void * p2;\n+        while (rd->num_offsets + n > n2)\n+            n2 *= 2;\n+        if ((p2 = av_realloc_array(rd->offsets, n2, sizeof(*rd->offsets))) == NULL)\n+            return AVERROR(ENOMEM);\n+        rd->offsets = p2;\n+        rd->alloced_offsets = n2;\n+    }\n+    for (size_t i = 0; i != n; ++i)\n+        rd->offsets[rd->num_offsets++] = offsets[i] - 1;\n+    return 0;\n+}\n+\n+static unsigned int\n+fill_dpb_entries(const HEVCContext * const h, struct v4l2_hevc_dpb_entry * const entries)\n+{\n+    unsigned int i;\n+    unsigned int n = 0;\n+    const HEVCFrame * const pic = h->ref;\n+\n+    for (i = 0; i < FF_ARRAY_ELEMS(h->DPB); i++) {\n+        const HEVCFrame * const frame = &h->DPB[i];\n+        if (frame != pic && (frame->flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF))) {\n+            struct v4l2_hevc_dpb_entry * const entry = entries + n++;\n+\n+            entry->timestamp = frame_capture_dpb(frame->frame);\n+#if HEVC_CTRLS_VERSION <= 2\n+            entry->rps = find_frame_rps_type(h, entry->timestamp);\n+#else\n+            entry->flags = (frame->flags & HEVC_FRAME_FLAG_LONG_REF) == 0 ? 0 :\n+                V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE;\n+#endif\n+            entry->field_pic = frame->frame->interlaced_frame;\n+\n+#if HEVC_CTRLS_VERSION <= 3\n+            /* TODO: Interleaved: Get the POC for each field. */\n+            entry->pic_order_cnt[0] = frame->poc;\n+            entry->pic_order_cnt[1] = frame->poc;\n+#else\n+            entry->pic_order_cnt_val = frame->poc;\n+#endif\n+        }\n+    }\n+    return n;\n+}\n+\n+static void fill_slice_params(const HEVCContext * const h,\n+#if HEVC_CTRLS_VERSION >= 2\n+                              const struct v4l2_ctrl_hevc_decode_params * const dec,\n+#endif\n+                              struct v4l2_ctrl_hevc_slice_params *slice_params,\n+                              uint32_t bit_size, uint32_t bit_offset)\n+{\n+    const SliceHeader * const sh = &h->sh;\n+#if HEVC_CTRLS_VERSION >= 2\n+    const struct v4l2_hevc_dpb_entry *const dpb = dec->dpb;\n+    const unsigned int dpb_n = dec->num_active_dpb_entries;\n+#else\n+    struct v4l2_hevc_dpb_entry *const dpb = slice_params->dpb;\n+    unsigned int dpb_n;\n+#endif\n+    unsigned int i;\n+    RefPicList *rpl;\n+\n+    *slice_params = (struct v4l2_ctrl_hevc_slice_params) {\n+        .bit_size = bit_size,\n+#if HEVC_CTRLS_VERSION <= 3\n+        .data_bit_offset = bit_offset,\n+#else\n+        .data_byte_offset = bit_offset / 8 + 1,\n+#endif\n+        /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+        .slice_segment_addr = sh->slice_segment_addr,\n+\n+        /* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */\n+        .nal_unit_type = h->nal_unit_type,\n+        .nuh_temporal_id_plus1 = h->temporal_id + 1,\n+\n+        /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+        .slice_type = sh->slice_type,\n+        .colour_plane_id = sh->colour_plane_id,\n+        .slice_pic_order_cnt = h->ref->poc,\n+        .num_ref_idx_l0_active_minus1 = sh->nb_refs[L0] ? sh->nb_refs[L0] - 1 : 0,\n+        .num_ref_idx_l1_active_minus1 = sh->nb_refs[L1] ? sh->nb_refs[L1] - 1 : 0,\n+        .collocated_ref_idx = sh->slice_temporal_mvp_enabled_flag ? sh->collocated_ref_idx : 0,\n+        .five_minus_max_num_merge_cand = sh->slice_type == HEVC_SLICE_I ? 0 : 5 - sh->max_num_merge_cand,\n+        .slice_qp_delta = sh->slice_qp_delta,\n+        .slice_cb_qp_offset = sh->slice_cb_qp_offset,\n+        .slice_cr_qp_offset = sh->slice_cr_qp_offset,\n+        .slice_act_y_qp_offset = 0,\n+        .slice_act_cb_qp_offset = 0,\n+        .slice_act_cr_qp_offset = 0,\n+        .slice_beta_offset_div2 = sh->beta_offset / 2,\n+        .slice_tc_offset_div2 = sh->tc_offset / 2,\n+\n+        /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */\n+        .pic_struct = h->sei.picture_timing.picture_struct,\n+\n+#if HEVC_CTRLS_VERSION < 2\n+        /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+        .num_rps_poc_st_curr_before = h->rps[ST_CURR_BEF].nb_refs,\n+        .num_rps_poc_st_curr_after = h->rps[ST_CURR_AFT].nb_refs,\n+        .num_rps_poc_lt_curr = h->rps[LT_CURR].nb_refs,\n+#endif\n+    };\n+\n+    if (sh->slice_sample_adaptive_offset_flag[0])\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA;\n+\n+    if (sh->slice_sample_adaptive_offset_flag[1])\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA;\n+\n+    if (sh->slice_temporal_mvp_enabled_flag)\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED;\n+\n+    if (sh->mvd_l1_zero_flag)\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO;\n+\n+    if (sh->cabac_init_flag)\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT;\n+\n+    if (sh->collocated_list == L0)\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0;\n+\n+    if (sh->disable_deblocking_filter_flag)\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED;\n+\n+    if (sh->slice_loop_filter_across_slices_enabled_flag)\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED;\n+\n+    if (sh->dependent_slice_segment_flag)\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT;\n+\n+#if HEVC_CTRLS_VERSION < 2\n+    dpb_n = fill_dpb_entries(h, dpb);\n+    slice_params->num_active_dpb_entries = dpb_n;\n+#endif\n+\n+    if (sh->slice_type != HEVC_SLICE_I) {\n+        rpl = &h->ref->refPicList[0];\n+        for (i = 0; i < rpl->nb_refs; i++)\n+            slice_params->ref_idx_l0[i] = get_ref_pic_index(h, rpl->ref[i], dpb, dpb_n);\n+    }\n+\n+    if (sh->slice_type == HEVC_SLICE_B) {\n+        rpl = &h->ref->refPicList[1];\n+        for (i = 0; i < rpl->nb_refs; i++)\n+            slice_params->ref_idx_l1[i] = get_ref_pic_index(h, rpl->ref[i], dpb, dpb_n);\n+    }\n+\n+    fill_pred_table(h, &slice_params->pred_weight_table);\n+\n+    slice_params->num_entry_point_offsets = sh->num_entry_point_offsets;\n+#if HEVC_CTRLS_VERSION <= 3\n+    if (slice_params->num_entry_point_offsets > 256) {\n+        slice_params->num_entry_point_offsets = 256;\n+        av_log(NULL, AV_LOG_ERROR, \"%s: Currently only 256 entry points are supported, but slice has %d entry points.\\n\", __func__, sh->num_entry_point_offsets);\n+    }\n+\n+    for (i = 0; i < slice_params->num_entry_point_offsets; i++)\n+        slice_params->entry_point_offset_minus1[i] = sh->entry_point_offset[i] - 1;\n+#endif\n+}\n+\n+#if HEVC_CTRLS_VERSION >= 2\n+static void\n+fill_decode_params(const HEVCContext * const h,\n+                   struct v4l2_ctrl_hevc_decode_params * const dec)\n+{\n+    unsigned int i;\n+\n+    *dec = (struct v4l2_ctrl_hevc_decode_params){\n+        .pic_order_cnt_val = h->poc,\n+        .num_poc_st_curr_before = h->rps[ST_CURR_BEF].nb_refs,\n+        .num_poc_st_curr_after = h->rps[ST_CURR_AFT].nb_refs,\n+        .num_poc_lt_curr = h->rps[LT_CURR].nb_refs,\n+    };\n+\n+    dec->num_active_dpb_entries = fill_dpb_entries(h, dec->dpb);\n+\n+    // The docn does seem to ask that we fit our 32 bit signed POC into\n+    // a U8 so... (To be fair 16 bits would be enough)\n+    // Luckily we (Pi) don't use these fields\n+    for (i = 0; i != h->rps[ST_CURR_BEF].nb_refs; ++i)\n+        dec->poc_st_curr_before[i] = h->rps[ST_CURR_BEF].ref[i]->poc;\n+    for (i = 0; i != h->rps[ST_CURR_AFT].nb_refs; ++i)\n+        dec->poc_st_curr_after[i] = h->rps[ST_CURR_AFT].ref[i]->poc;\n+    for (i = 0; i != h->rps[LT_CURR].nb_refs; ++i)\n+        dec->poc_lt_curr[i] = h->rps[LT_CURR].ref[i]->poc;\n+\n+    if (IS_IRAP(h))\n+        dec->flags |= V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC;\n+    if (IS_IDR(h))\n+        dec->flags |= V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC;\n+    if (h->sh.no_output_of_prior_pics_flag)\n+        dec->flags |= V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR;\n+\n+}\n+#endif\n+\n+static void fill_sps(struct v4l2_ctrl_hevc_sps *ctrl, const HEVCSPS *sps)\n+{\n+    /* ISO/IEC 23008-2, ITU-T Rec. H.265: Sequence parameter set */\n+    *ctrl = (struct v4l2_ctrl_hevc_sps) {\n+        .chroma_format_idc = sps->chroma_format_idc,\n+        .pic_width_in_luma_samples = sps->width,\n+        .pic_height_in_luma_samples = sps->height,\n+        .bit_depth_luma_minus8 = sps->bit_depth - 8,\n+        .bit_depth_chroma_minus8 = sps->bit_depth - 8,\n+        .log2_max_pic_order_cnt_lsb_minus4 = sps->log2_max_poc_lsb - 4,\n+        .sps_max_dec_pic_buffering_minus1 = sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering - 1,\n+        .sps_max_num_reorder_pics = sps->temporal_layer[sps->max_sub_layers - 1].num_reorder_pics,\n+        .sps_max_latency_increase_plus1 = sps->temporal_layer[sps->max_sub_layers - 1].max_latency_increase + 1,\n+        .log2_min_luma_coding_block_size_minus3 = sps->log2_min_cb_size - 3,\n+        .log2_diff_max_min_luma_coding_block_size = sps->log2_diff_max_min_coding_block_size,\n+        .log2_min_luma_transform_block_size_minus2 = sps->log2_min_tb_size - 2,\n+        .log2_diff_max_min_luma_transform_block_size = sps->log2_max_trafo_size - sps->log2_min_tb_size,\n+        .max_transform_hierarchy_depth_inter = sps->max_transform_hierarchy_depth_inter,\n+        .max_transform_hierarchy_depth_intra = sps->max_transform_hierarchy_depth_intra,\n+        .pcm_sample_bit_depth_luma_minus1 = sps->pcm.bit_depth - 1,\n+        .pcm_sample_bit_depth_chroma_minus1 = sps->pcm.bit_depth_chroma - 1,\n+        .log2_min_pcm_luma_coding_block_size_minus3 = sps->pcm.log2_min_pcm_cb_size - 3,\n+        .log2_diff_max_min_pcm_luma_coding_block_size = sps->pcm.log2_max_pcm_cb_size - sps->pcm.log2_min_pcm_cb_size,\n+        .num_short_term_ref_pic_sets = sps->nb_st_rps,\n+        .num_long_term_ref_pics_sps = sps->num_long_term_ref_pics_sps,\n+        .chroma_format_idc = sps->chroma_format_idc,\n+        .sps_max_sub_layers_minus1 = sps->max_sub_layers - 1,\n+    };\n+\n+    if (sps->separate_colour_plane_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE;\n+\n+    if (sps->scaling_list_enable_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED;\n+\n+    if (sps->amp_enabled_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_AMP_ENABLED;\n+\n+    if (sps->sao_enabled)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET;\n+\n+    if (sps->pcm_enabled_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_PCM_ENABLED;\n+\n+    if (sps->pcm.loop_filter_disable_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED;\n+\n+    if (sps->long_term_ref_pics_present_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT;\n+\n+    if (sps->sps_temporal_mvp_enabled_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED;\n+\n+    if (sps->sps_strong_intra_smoothing_enable_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED;\n+}\n+\n+static void fill_scaling_matrix(const ScalingList * const sl,\n+                                struct v4l2_ctrl_hevc_scaling_matrix * const sm)\n+{\n+    unsigned int i;\n+\n+    for (i = 0; i < 6; i++) {\n+        unsigned int j;\n+\n+        for (j = 0; j < 16; j++)\n+            sm->scaling_list_4x4[i][j] = sl->sl[0][i][j];\n+        for (j = 0; j < 64; j++) {\n+            sm->scaling_list_8x8[i][j]   = sl->sl[1][i][j];\n+            sm->scaling_list_16x16[i][j] = sl->sl[2][i][j];\n+            if (i < 2)\n+                sm->scaling_list_32x32[i][j] = sl->sl[3][i * 3][j];\n+        }\n+        sm->scaling_list_dc_coef_16x16[i] = sl->sl_dc[0][i];\n+        if (i < 2)\n+            sm->scaling_list_dc_coef_32x32[i] = sl->sl_dc[1][i * 3];\n+    }\n+}\n+\n+static void fill_pps(struct v4l2_ctrl_hevc_pps * const ctrl, const HEVCPPS * const pps)\n+{\n+    uint64_t flags = 0;\n+\n+    if (pps->dependent_slice_segments_enabled_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED;\n+\n+    if (pps->output_flag_present_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT;\n+\n+    if (pps->sign_data_hiding_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED;\n+\n+    if (pps->cabac_init_present_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT;\n+\n+    if (pps->constrained_intra_pred_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED;\n+\n+    if (pps->transform_skip_enabled_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED;\n+\n+    if (pps->cu_qp_delta_enabled_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED;\n+\n+    if (pps->pic_slice_level_chroma_qp_offsets_present_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT;\n+\n+    if (pps->weighted_pred_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED;\n+\n+    if (pps->weighted_bipred_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED;\n+\n+    if (pps->transquant_bypass_enable_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED;\n+\n+    if (pps->tiles_enabled_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_TILES_ENABLED;\n+\n+    if (pps->entropy_coding_sync_enabled_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED;\n+\n+    if (pps->loop_filter_across_tiles_enabled_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED;\n+\n+    if (pps->seq_loop_filter_across_slices_enabled_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED;\n+\n+    if (pps->deblocking_filter_override_enabled_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED;\n+\n+    if (pps->disable_dbf)\n+        flags |= V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER;\n+\n+    if (pps->lists_modification_present_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT;\n+\n+    if (pps->slice_header_extension_present_flag)\n+        flags |= V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT;\n+\n+    /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */\n+    *ctrl = (struct v4l2_ctrl_hevc_pps) {\n+        .num_extra_slice_header_bits = pps->num_extra_slice_header_bits,\n+        .init_qp_minus26 = pps->pic_init_qp_minus26,\n+        .diff_cu_qp_delta_depth = pps->diff_cu_qp_delta_depth,\n+        .pps_cb_qp_offset = pps->cb_qp_offset,\n+        .pps_cr_qp_offset = pps->cr_qp_offset,\n+        .pps_beta_offset_div2 = pps->beta_offset / 2,\n+        .pps_tc_offset_div2 = pps->tc_offset / 2,\n+        .log2_parallel_merge_level_minus2 = pps->log2_parallel_merge_level - 2,\n+        .flags = flags\n+    };\n+\n+\n+    if (pps->tiles_enabled_flag) {\n+        ctrl->num_tile_columns_minus1 = pps->num_tile_columns - 1;\n+        ctrl->num_tile_rows_minus1 = pps->num_tile_rows - 1;\n+\n+        for (int i = 0; i < pps->num_tile_columns; i++)\n+            ctrl->column_width_minus1[i] = pps->column_width[i] - 1;\n+\n+        for (int i = 0; i < pps->num_tile_rows; i++)\n+            ctrl->row_height_minus1[i] = pps->row_height[i] - 1;\n+    }\n+}\n+\n+// Called before finally returning the frame to the user\n+// Set corrupt flag here as this is actually the frame structure that\n+// is going to the user (in MT land each thread has its own pool)\n+static int frame_post_process(void *logctx, AVFrame *frame)\n+{\n+    V4L2MediaReqDescriptor *rd = (V4L2MediaReqDescriptor*)frame->data[0];\n+\n+//    av_log(NULL, AV_LOG_INFO, \"%s\\n\", __func__);\n+    frame->flags &= ~AV_FRAME_FLAG_CORRUPT;\n+    if (rd->qe_dst) {\n+        MediaBufsStatus stat = qent_dst_wait(rd->qe_dst);\n+        if (stat != MEDIABUFS_STATUS_SUCCESS) {\n+            av_log(logctx, AV_LOG_ERROR, \"%s: Decode fail\\n\", __func__);\n+            frame->flags |= AV_FRAME_FLAG_CORRUPT;\n+        }\n+    }\n+\n+    return 0;\n+}\n+\n+static inline struct timeval cvt_dpb_to_tv(uint64_t t)\n+{\n+    t /= 1000;\n+    return (struct timeval){\n+        .tv_usec = t % 1000000,\n+        .tv_sec = t / 1000000\n+    };\n+}\n+\n+static inline uint64_t cvt_timestamp_to_dpb(const unsigned int t)\n+{\n+    return (uint64_t)t * 1000;\n+}\n+\n+static int v4l2_request_hevc_start_frame(AVCodecContext *avctx,\n+                                         av_unused const uint8_t *buffer,\n+                                         av_unused uint32_t size)\n+{\n+    const HEVCContext *h = avctx->priv_data;\n+    V4L2MediaReqDescriptor *const rd = (V4L2MediaReqDescriptor *)h->ref->frame->data[0];\n+    V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data;\n+\n+//    av_log(NULL, AV_LOG_INFO, \"%s\\n\", __func__);\n+    decode_q_add(&ctx->decode_q, &rd->decode_ent);\n+\n+    rd->num_slices = 0;\n+    ctx->timestamp++;\n+    rd->timestamp = cvt_timestamp_to_dpb(ctx->timestamp);\n+\n+    {\n+        FrameDecodeData * const fdd = (FrameDecodeData*)h->ref->frame->private_ref->data;\n+        fdd->post_process = frame_post_process;\n+    }\n+\n+    // qe_dst needs to be bound to the data buffer and only returned when that is\n+    if (!rd->qe_dst)\n+    {\n+        if ((rd->qe_dst = mediabufs_dst_qent_alloc(ctx->mbufs, ctx->dbufs)) == NULL) {\n+            av_log(avctx, AV_LOG_ERROR, \"%s: Failed to get dst buffer\\n\", __func__);\n+            return AVERROR(ENOMEM);\n+        }\n+    }\n+\n+    ff_thread_finish_setup(avctx); // Allow next thread to enter rpi_hevc_start_frame\n+\n+    return 0;\n+}\n+\n+// Object fd & size will be zapped by this & need setting later\n+static int drm_from_format(AVDRMFrameDescriptor * const desc, const struct v4l2_format * const format)\n+{\n+    AVDRMLayerDescriptor *layer = &desc->layers[0];\n+    unsigned int width;\n+    unsigned int height;\n+    unsigned int bpl;\n+    uint32_t pixelformat;\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(format->type)) {\n+        width       = format->fmt.pix_mp.width;\n+        height      = format->fmt.pix_mp.height;\n+        pixelformat = format->fmt.pix_mp.pixelformat;\n+        bpl         = format->fmt.pix_mp.plane_fmt[0].bytesperline;\n+    }\n+    else {\n+        width       = format->fmt.pix.width;\n+        height      = format->fmt.pix.height;\n+        pixelformat = format->fmt.pix.pixelformat;\n+        bpl         = format->fmt.pix.bytesperline;\n+    }\n+\n+    switch (pixelformat) {\n+    case V4L2_PIX_FMT_NV12:\n+        layer->format = DRM_FORMAT_NV12;\n+        desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR;\n+        break;\n+#if CONFIG_SAND\n+    case V4L2_PIX_FMT_NV12_COL128:\n+        layer->format = DRM_FORMAT_NV12;\n+        desc->objects[0].format_modifier = DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(bpl);\n+        break;\n+    case V4L2_PIX_FMT_NV12_10_COL128:\n+        layer->format = DRM_FORMAT_P030;\n+        desc->objects[0].format_modifier = DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(bpl);\n+        break;\n+#endif\n+#ifdef DRM_FORMAT_MOD_ALLWINNER_TILED\n+    case V4L2_PIX_FMT_SUNXI_TILED_NV12:\n+        layer->format = DRM_FORMAT_NV12;\n+        desc->objects[0].format_modifier = DRM_FORMAT_MOD_ALLWINNER_TILED;\n+        break;\n+#endif\n+#if defined(V4L2_PIX_FMT_NV15) && defined(DRM_FORMAT_NV15)\n+    case V4L2_PIX_FMT_NV15:\n+        layer->format = DRM_FORMAT_NV15;\n+        desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR;\n+        break;\n+#endif\n+    case V4L2_PIX_FMT_NV16:\n+        layer->format = DRM_FORMAT_NV16;\n+        desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR;\n+        break;\n+#if defined(V4L2_PIX_FMT_NV20) && defined(DRM_FORMAT_NV20)\n+    case V4L2_PIX_FMT_NV20:\n+        layer->format = DRM_FORMAT_NV20;\n+        desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR;\n+        break;\n+#endif\n+    default:\n+        return -1;\n+    }\n+\n+    desc->nb_objects = 1;\n+    desc->objects[0].fd = -1;\n+    desc->objects[0].size = 0;\n+\n+    desc->nb_layers = 1;\n+    layer->nb_planes = 2;\n+\n+    layer->planes[0].object_index = 0;\n+    layer->planes[0].offset = 0;\n+    layer->planes[0].pitch = bpl;\n+#if CONFIG_SAND\n+    if (pixelformat == V4L2_PIX_FMT_NV12_COL128) {\n+        layer->planes[1].object_index = 0;\n+        layer->planes[1].offset = height * 128;\n+        layer->planes[0].pitch = width;\n+        layer->planes[1].pitch = width;\n+    }\n+    else if (pixelformat == V4L2_PIX_FMT_NV12_10_COL128) {\n+        layer->planes[1].object_index = 0;\n+        layer->planes[1].offset = height * 128;\n+        layer->planes[0].pitch = width * 2; // Lies but it keeps DRM import happy\n+        layer->planes[1].pitch = width * 2;\n+    }\n+    else\n+#endif\n+    {\n+        layer->planes[1].object_index = 0;\n+        layer->planes[1].offset = layer->planes[0].pitch * height;\n+        layer->planes[1].pitch = layer->planes[0].pitch;\n+    }\n+\n+    return 0;\n+}\n+\n+static int\n+set_req_ctls(V4L2RequestContextHEVC *ctx, struct media_request * const mreq,\n+    struct req_controls *const controls,\n+#if HEVC_CTRLS_VERSION >= 2\n+    struct v4l2_ctrl_hevc_decode_params * const dec,\n+#endif\n+    struct v4l2_ctrl_hevc_slice_params * const slices, const unsigned int slice_count,\n+    void * const offsets, const size_t offset_count)\n+{\n+    int rv;\n+#if HEVC_CTRLS_VERSION >= 2\n+    unsigned int n = 3;\n+#else\n+    unsigned int n = 2;\n+#endif\n+\n+    struct v4l2_ext_control control[6] = {\n+        {\n+            .id = V4L2_CID_STATELESS_HEVC_SPS,\n+            .ptr = &controls->sps,\n+            .size = sizeof(controls->sps),\n+        },\n+        {\n+            .id = V4L2_CID_STATELESS_HEVC_PPS,\n+            .ptr = &controls->pps,\n+            .size = sizeof(controls->pps),\n+        },\n+#if HEVC_CTRLS_VERSION >= 2\n+        {\n+            .id = V4L2_CID_STATELESS_HEVC_DECODE_PARAMS,\n+            .ptr = dec,\n+            .size = sizeof(*dec),\n+        },\n+#endif\n+    };\n+\n+    if (slices)\n+        control[n++] = (struct v4l2_ext_control) {\n+            .id = V4L2_CID_STATELESS_HEVC_SLICE_PARAMS,\n+            .ptr = slices,\n+            .size = sizeof(*slices) * slice_count,\n+        };\n+\n+    if (controls->has_scaling)\n+        control[n++] = (struct v4l2_ext_control) {\n+            .id = V4L2_CID_STATELESS_HEVC_SCALING_MATRIX,\n+            .ptr = &controls->scaling_matrix,\n+            .size = sizeof(controls->scaling_matrix),\n+        };\n+\n+#if HEVC_CTRLS_VERSION >= 4\n+    if (offsets)\n+        control[n++] = (struct v4l2_ext_control) {\n+            .id = V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS,\n+            .ptr = offsets,\n+            .size = sizeof(((struct V4L2MediaReqDescriptor *)0)->offsets[0]) * offset_count,\n+        };\n+#endif\n+\n+    rv = mediabufs_ctl_set_ext_ctrls(ctx->mbufs, mreq, control, n);\n+\n+    return rv;\n+}\n+\n+// This only works because we started out from a single coded frame buffer\n+// that will remain intact until after end_frame\n+static int v4l2_request_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)\n+{\n+    const HEVCContext * const h = avctx->priv_data;\n+    V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data;\n+    V4L2MediaReqDescriptor * const rd = (V4L2MediaReqDescriptor*)h->ref->frame->data[0];\n+    int bcount = get_bits_count(&h->HEVClc->gb);\n+    uint32_t boff = (ptr_from_index(buffer, bcount/8 + 1) - (buffer + bcount/8 + 1)) * 8 + bcount;\n+\n+    const unsigned int n = rd->num_slices;\n+    const unsigned int block_start = (n / ctx->max_slices) * ctx->max_slices;\n+\n+    int rv;\n+    struct slice_info * si;\n+\n+    // This looks dodgy but we know that FFmpeg has parsed this from a buffer\n+    // that contains the entire frame including the start code\n+    if (ctx->start_code == V4L2_STATELESS_HEVC_START_CODE_ANNEX_B) {\n+        buffer -= 3;\n+        size += 3;\n+        boff += 24;\n+        if (buffer[0] != 0 || buffer[1] != 0 || buffer[2] != 1) {\n+            av_log(avctx, AV_LOG_ERROR, \"Start code requested but missing %02x:%02x:%02x\\n\",\n+                   buffer[0], buffer[1], buffer[2]);\n+        }\n+    }\n+\n+    if (ctx->decode_mode == V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED) {\n+        if (rd->slices == NULL) {\n+            if ((rd->slices = av_mallocz(sizeof(*rd->slices))) == NULL)\n+                return AVERROR(ENOMEM);\n+            rd->slices->ptr = buffer;\n+            rd->num_slices = 1;\n+        }\n+        rd->slices->len = buffer - rd->slices->ptr + size;\n+        return 0;\n+    }\n+\n+    if ((rv = slice_add(rd)) != 0)\n+        return rv;\n+\n+    si = rd->slices + n;\n+    si->ptr = buffer;\n+    si->len = size;\n+    si->n_offsets = rd->num_offsets;\n+\n+    if (n != block_start) {\n+        struct slice_info *const si0 = rd->slices + block_start;\n+        const size_t offset = (buffer - si0->ptr);\n+        boff += offset * 8;\n+        size += offset;\n+        si0->len = si->len + offset;\n+    }\n+\n+#if HEVC_CTRLS_VERSION >= 2\n+    if (n == 0)\n+        fill_decode_params(h, &rd->dec);\n+    fill_slice_params(h, &rd->dec, rd->slice_params + n, size * 8, boff);\n+#else\n+    fill_slice_params(h, rd->slice_params + n, size * 8, boff);\n+#endif\n+    if (ctx->max_offsets != 0 &&\n+        (rv = offsets_add(rd, h->sh.num_entry_point_offsets, h->sh.entry_point_offset)) != 0)\n+        return rv;\n+\n+    return 0;\n+}\n+\n+static void v4l2_request_hevc_abort_frame(AVCodecContext * const avctx)\n+{\n+    const HEVCContext * const h = avctx->priv_data;\n+    if (h->ref != NULL) {\n+        V4L2MediaReqDescriptor *const rd = (V4L2MediaReqDescriptor *)h->ref->frame->data[0];\n+        V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data;\n+\n+        media_request_abort(&rd->req);\n+        mediabufs_src_qent_abort(ctx->mbufs, &rd->qe_src);\n+\n+        decode_q_remove(&ctx->decode_q, &rd->decode_ent);\n+    }\n+}\n+\n+static int send_slice(AVCodecContext * const avctx,\n+                      V4L2MediaReqDescriptor * const rd,\n+                      struct req_controls *const controls,\n+                      const unsigned int i, const unsigned int j)\n+{\n+    V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data;\n+\n+    const int is_last = (j == rd->num_slices);\n+    struct slice_info *const si = rd->slices + i;\n+    struct media_request * req = NULL;\n+    struct qent_src * src = NULL;\n+    MediaBufsStatus stat;\n+    void * offsets = rd->offsets + rd->slices[i].n_offsets;\n+    size_t n_offsets = (is_last ? rd->num_offsets : rd->slices[j].n_offsets) - rd->slices[i].n_offsets;\n+\n+    if ((req = media_request_get(ctx->mpool)) == NULL) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: Failed to alloc media request\\n\", __func__);\n+        return AVERROR(ENOMEM);\n+    }\n+\n+    if (set_req_ctls(ctx, req,\n+                     controls,\n+#if HEVC_CTRLS_VERSION >= 2\n+                     &rd->dec,\n+#endif\n+                     rd->slice_params + i, j - i,\n+                     offsets, n_offsets)) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: Failed to set req ctls\\n\", __func__);\n+        goto fail1;\n+    }\n+\n+    if ((src = mediabufs_src_qent_get(ctx->mbufs)) == NULL) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: Failed to get src buffer\\n\", __func__);\n+        goto fail1;\n+    }\n+\n+    if (qent_src_data_copy(src, 0, si->ptr, si->len, ctx->dbufs) != 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: Failed data copy\\n\", __func__);\n+        goto fail2;\n+    }\n+\n+    if (qent_src_params_set(src, &controls->tv)) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: Failed src param set\\n\", __func__);\n+        goto fail2;\n+    }\n+\n+    stat = mediabufs_start_request(ctx->mbufs, &req, &src,\n+                                   i == 0 ? rd->qe_dst : NULL,\n+                                   is_last);\n+\n+    if (stat != MEDIABUFS_STATUS_SUCCESS) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: Failed to start request\\n\", __func__);\n+        return AVERROR_UNKNOWN;\n+    }\n+    return 0;\n+\n+fail2:\n+    mediabufs_src_qent_abort(ctx->mbufs, &src);\n+fail1:\n+    media_request_abort(&req);\n+    return AVERROR_UNKNOWN;\n+}\n+\n+static int v4l2_request_hevc_end_frame(AVCodecContext *avctx)\n+{\n+    const HEVCContext * const h = avctx->priv_data;\n+    V4L2MediaReqDescriptor *rd = (V4L2MediaReqDescriptor*)h->ref->frame->data[0];\n+    V4L2RequestContextHEVC *ctx = avctx->internal->hwaccel_priv_data;\n+    struct req_controls rc;\n+    unsigned int i;\n+    int rv;\n+\n+    // It is possible, though maybe a bug, to get an end_frame without\n+    // a previous start_frame.  If we do then give up.\n+    if (!decode_q_in_q(&rd->decode_ent)) {\n+        av_log(avctx, AV_LOG_DEBUG, \"%s: Frame not in decode Q\\n\", __func__);\n+        return AVERROR_INVALIDDATA;\n+    }\n+\n+    {\n+        const ScalingList *sl = h->ps.pps->scaling_list_data_present_flag ?\n+                                    &h->ps.pps->scaling_list :\n+                                h->ps.sps->scaling_list_enable_flag ?\n+                                    &h->ps.sps->scaling_list : NULL;\n+\n+\n+        memset(&rc, 0, sizeof(rc));\n+        rc.tv = cvt_dpb_to_tv(rd->timestamp);\n+        fill_sps(&rc.sps, h->ps.sps);\n+        fill_pps(&rc.pps, h->ps.pps);\n+        if (sl) {\n+            rc.has_scaling = 1;\n+            fill_scaling_matrix(sl, &rc.scaling_matrix);\n+        }\n+    }\n+\n+    decode_q_wait(&ctx->decode_q, &rd->decode_ent);\n+\n+    // qe_dst needs to be bound to the data buffer and only returned when that is\n+    // Alloc almost certainly wants to be serialised if there is any chance of blocking\n+    // so we get the next frame to be free in the thread that needs it for decode first.\n+    //\n+    // In our current world this probably isn't a concern but put it here anyway\n+    if (!rd->qe_dst)\n+    {\n+        if ((rd->qe_dst = mediabufs_dst_qent_alloc(ctx->mbufs, ctx->dbufs)) == NULL) {\n+            av_log(avctx, AV_LOG_ERROR, \"%s: Failed to get dst buffer\\n\", __func__);\n+            rv = AVERROR(ENOMEM);\n+            goto fail;\n+        }\n+    }\n+\n+    // Send as slices\n+    for (i = 0; i < rd->num_slices; i += ctx->max_slices) {\n+        const unsigned int e = FFMIN(rd->num_slices, i + ctx->max_slices);\n+        if ((rv = send_slice(avctx, rd, &rc, i, e)) != 0)\n+            goto fail;\n+    }\n+\n+    // Set the drm_prime desriptor\n+    drm_from_format(&rd->drm, mediabufs_dst_fmt(ctx->mbufs));\n+    rd->drm.objects[0].fd = dmabuf_fd(qent_dst_dmabuf(rd->qe_dst, 0));\n+    rd->drm.objects[0].size = dmabuf_size(qent_dst_dmabuf(rd->qe_dst, 0));\n+\n+    decode_q_remove(&ctx->decode_q, &rd->decode_ent);\n+    return 0;\n+\n+fail:\n+    decode_q_remove(&ctx->decode_q, &rd->decode_ent);\n+    return rv;\n+}\n+\n+static inline int\n+ctrl_valid(const struct v4l2_query_ext_ctrl * const c, const int64_t v)\n+{\n+    return v >= c->minimum && v <= c->maximum;\n+}\n+\n+// Initial check & init\n+static int\n+probe(AVCodecContext * const avctx, V4L2RequestContextHEVC * const ctx)\n+{\n+    const HEVCContext *h = avctx->priv_data;\n+    const HEVCSPS * const sps = h->ps.sps;\n+    struct v4l2_ctrl_hevc_sps ctrl_sps;\n+    unsigned int i;\n+\n+    // Check for var slice array\n+    struct v4l2_query_ext_ctrl qc[] = {\n+        { .id = V4L2_CID_STATELESS_HEVC_SLICE_PARAMS },\n+        { .id = V4L2_CID_STATELESS_HEVC_DECODE_MODE, },\n+        { .id = V4L2_CID_STATELESS_HEVC_SPS },\n+        { .id = V4L2_CID_STATELESS_HEVC_PPS },\n+        { .id = V4L2_CID_STATELESS_HEVC_SCALING_MATRIX },\n+#if HEVC_CTRLS_VERSION >= 2\n+        { .id = V4L2_CID_STATELESS_HEVC_DECODE_PARAMS },\n+#endif\n+    };\n+    // Order & size must match!\n+    static const size_t ctrl_sizes[] = {\n+        sizeof(struct v4l2_ctrl_hevc_slice_params),\n+        sizeof(int32_t),\n+        sizeof(struct v4l2_ctrl_hevc_sps),\n+        sizeof(struct v4l2_ctrl_hevc_pps),\n+        sizeof(struct v4l2_ctrl_hevc_scaling_matrix),\n+#if HEVC_CTRLS_VERSION >= 2\n+        sizeof(struct v4l2_ctrl_hevc_decode_params),\n+#endif\n+    };\n+    const unsigned int noof_ctrls = FF_ARRAY_ELEMS(qc);\n+\n+#if HEVC_CTRLS_VERSION == 2\n+    if (mediabufs_ctl_driver_version(ctx->mbufs) >= MEDIABUFS_DRIVER_VERSION(5, 18, 0))\n+        return AVERROR(EINVAL);\n+#elif HEVC_CTRLS_VERSION == 3\n+    if (mediabufs_ctl_driver_version(ctx->mbufs) < MEDIABUFS_DRIVER_VERSION(5, 18, 0))\n+        return AVERROR(EINVAL);\n+#endif\n+\n+    mediabufs_ctl_query_ext_ctrls(ctx->mbufs, qc, noof_ctrls);\n+    i = 0;\n+#if HEVC_CTRLS_VERSION >= 4\n+    // Skip slice check if no slice mode\n+    if (qc[1].type != 0 && !ctrl_valid(qc + 1, V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED))\n+        i = 1;\n+#else\n+    // Fail frame mode silently for anything prior to V4\n+    if (qc[1].type == 0 || !ctrl_valid(qc + 1, V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED))\n+        return AVERROR(EINVAL);\n+#endif\n+    for (; i != noof_ctrls; ++i) {\n+        if (qc[i].type == 0) {\n+            av_log(avctx, AV_LOG_DEBUG, \"Probed V%d control %#x missing\\n\", HEVC_CTRLS_VERSION, qc[i].id);\n+            return AVERROR(EINVAL);\n+        }\n+        if (ctrl_sizes[i] != (size_t)qc[i].elem_size) {\n+            av_log(avctx, AV_LOG_DEBUG, \"Probed V%d control %d size mismatch %zu != %zu\\n\",\n+                   HEVC_CTRLS_VERSION, i, ctrl_sizes[i], (size_t)qc[i].elem_size);\n+            return AVERROR(EINVAL);\n+        }\n+    }\n+\n+    fill_sps(&ctrl_sps, sps);\n+\n+    if (mediabufs_set_ext_ctrl(ctx->mbufs, NULL, V4L2_CID_STATELESS_HEVC_SPS, &ctrl_sps, sizeof(ctrl_sps))) {\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to set initial SPS\\n\");\n+        return AVERROR(EINVAL);\n+    }\n+\n+    return 0;\n+}\n+\n+// Final init\n+static int\n+set_controls(AVCodecContext * const avctx, V4L2RequestContextHEVC * const ctx)\n+{\n+    int ret;\n+\n+    struct v4l2_query_ext_ctrl querys[] = {\n+        { .id = V4L2_CID_STATELESS_HEVC_DECODE_MODE, },\n+        { .id = V4L2_CID_STATELESS_HEVC_START_CODE, },\n+        { .id = V4L2_CID_STATELESS_HEVC_SLICE_PARAMS, },\n+#if HEVC_CTRLS_VERSION >= 4\n+        { .id = V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS, },\n+#endif\n+    };\n+\n+    struct v4l2_ext_control ctrls[] = {\n+        { .id = V4L2_CID_STATELESS_HEVC_DECODE_MODE, },\n+        { .id = V4L2_CID_STATELESS_HEVC_START_CODE, },\n+    };\n+\n+    mediabufs_ctl_query_ext_ctrls(ctx->mbufs, querys, FF_ARRAY_ELEMS(querys));\n+\n+    ctx->max_slices = (!(querys[2].flags & V4L2_CTRL_FLAG_DYNAMIC_ARRAY) ||\n+                       querys[2].nr_of_dims != 1 || querys[2].dims[0] == 0) ?\n+        1 : querys[2].dims[0];\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: Max slices %d\\n\", __func__, ctx->max_slices);\n+\n+#if HEVC_CTRLS_VERSION >= 4\n+    ctx->max_offsets = (querys[3].type == 0 || querys[3].nr_of_dims != 1) ?\n+        0 : querys[3].dims[0];\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: Entry point offsets %d\\n\", __func__, ctx->max_offsets);\n+#else\n+    ctx->max_offsets = 0;\n+#endif\n+\n+    if (querys[0].default_value == V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED ||\n+        querys[0].default_value == V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED)\n+        ctx->decode_mode = querys[0].default_value;\n+    else if (ctrl_valid(querys + 0, V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED))\n+        ctx->decode_mode = V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED;\n+    else if (ctrl_valid(querys + 0, V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED))\n+        ctx->decode_mode = V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED;\n+    else {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: unsupported decode mode\\n\", __func__);\n+        return AVERROR(EINVAL);\n+    }\n+\n+    if (querys[1].default_value == V4L2_STATELESS_HEVC_START_CODE_NONE ||\n+        querys[1].default_value == V4L2_STATELESS_HEVC_START_CODE_ANNEX_B)\n+        ctx->start_code = querys[1].default_value;\n+    else if (ctrl_valid(querys + 1, V4L2_STATELESS_HEVC_START_CODE_ANNEX_B))\n+        ctx->start_code = V4L2_STATELESS_HEVC_START_CODE_ANNEX_B;\n+    else if (ctrl_valid(querys + 1, V4L2_STATELESS_HEVC_START_CODE_NONE))\n+        ctx->start_code = V4L2_STATELESS_HEVC_START_CODE_NONE;\n+    else {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: unsupported start code\\n\", __func__);\n+        return AVERROR(EINVAL);\n+    }\n+\n+    // If we are in slice mode & START_CODE_NONE supported then pick that\n+    // as it doesn't require the slightly dodgy look backwards in our raw buffer\n+    if (ctx->decode_mode == V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED &&\n+        ctrl_valid(querys + 1, V4L2_STATELESS_HEVC_START_CODE_NONE))\n+        ctx->start_code = V4L2_STATELESS_HEVC_START_CODE_NONE;\n+\n+    ctrls[0].value = ctx->decode_mode;\n+    ctrls[1].value = ctx->start_code;\n+\n+    ret = mediabufs_ctl_set_ext_ctrls(ctx->mbufs, NULL, ctrls, FF_ARRAY_ELEMS(ctrls));\n+    return !ret ? 0 : AVERROR(-ret);\n+}\n+\n+static void v4l2_req_frame_free(void *opaque, uint8_t *data)\n+{\n+    AVCodecContext *avctx = opaque;\n+    V4L2MediaReqDescriptor * const rd = (V4L2MediaReqDescriptor*)data;\n+\n+    av_log(NULL, AV_LOG_DEBUG, \"%s: avctx=%p data=%p\\n\", __func__, avctx, data);\n+\n+    qent_dst_unref(&rd->qe_dst);\n+\n+    // We don't expect req or qe_src to be set\n+    if (rd->req || rd->qe_src)\n+        av_log(NULL, AV_LOG_ERROR, \"%s: qe_src %p or req %p not NULL\\n\", __func__, rd->req, rd->qe_src);\n+\n+    av_freep(&rd->slices);\n+    av_freep(&rd->slice_params);\n+    av_freep(&rd->offsets);\n+\n+    av_free(rd);\n+}\n+\n+static AVBufferRef *v4l2_req_frame_alloc(void *opaque, int size)\n+{\n+    AVCodecContext *avctx = opaque;\n+//    V4L2RequestContextHEVC *ctx = avctx->internal->hwaccel_priv_data;\n+//    V4L2MediaReqDescriptor *req;\n+    AVBufferRef *ref;\n+    uint8_t *data;\n+//    int ret;\n+\n+    data = av_mallocz(size);\n+    if (!data)\n+        return NULL;\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: avctx=%p size=%d data=%p\\n\", __func__, avctx, size, data);\n+    ref = av_buffer_create(data, size, v4l2_req_frame_free, avctx, 0);\n+    if (!ref) {\n+        av_freep(&data);\n+        return NULL;\n+    }\n+    return ref;\n+}\n+\n+#if 0\n+static void v4l2_req_pool_free(void *opaque)\n+{\n+    av_log(NULL, AV_LOG_DEBUG, \"%s: opaque=%p\\n\", __func__, opaque);\n+}\n+\n+static void v4l2_req_hwframe_ctx_free(AVHWFramesContext *hwfc)\n+{\n+    av_log(NULL, AV_LOG_DEBUG, \"%s: hwfc=%p pool=%p\\n\", __func__, hwfc, hwfc->pool);\n+\n+    av_buffer_pool_uninit(&hwfc->pool);\n+}\n+#endif\n+\n+static int frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)\n+{\n+    V4L2RequestContextHEVC *ctx = avctx->internal->hwaccel_priv_data;\n+    AVHWFramesContext *hwfc = (AVHWFramesContext*)hw_frames_ctx->data;\n+    const struct v4l2_format *vfmt = mediabufs_dst_fmt(ctx->mbufs);\n+\n+    hwfc->format = AV_PIX_FMT_DRM_PRIME;\n+    hwfc->sw_format = pixel_format_from_format(vfmt);\n+    if (V4L2_TYPE_IS_MULTIPLANAR(vfmt->type)) {\n+        hwfc->width = vfmt->fmt.pix_mp.width;\n+        hwfc->height = vfmt->fmt.pix_mp.height;\n+    } else {\n+        hwfc->width = vfmt->fmt.pix.width;\n+        hwfc->height = vfmt->fmt.pix.height;\n+    }\n+#if 0\n+    hwfc->pool = av_buffer_pool_init2(sizeof(V4L2MediaReqDescriptor), avctx, v4l2_req_frame_alloc, v4l2_req_pool_free);\n+    if (!hwfc->pool)\n+        return AVERROR(ENOMEM);\n+\n+    hwfc->free = v4l2_req_hwframe_ctx_free;\n+\n+    hwfc->initial_pool_size = 1;\n+\n+    switch (avctx->codec_id) {\n+    case AV_CODEC_ID_VP9:\n+        hwfc->initial_pool_size += 8;\n+        break;\n+    case AV_CODEC_ID_VP8:\n+        hwfc->initial_pool_size += 3;\n+        break;\n+    default:\n+        hwfc->initial_pool_size += 2;\n+    }\n+#endif\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: avctx=%p ctx=%p hw_frames_ctx=%p hwfc=%p pool=%p width=%d height=%d initial_pool_size=%d\\n\", __func__, avctx, ctx, hw_frames_ctx, hwfc, hwfc->pool, hwfc->width, hwfc->height, hwfc->initial_pool_size);\n+\n+    return 0;\n+}\n+\n+static int alloc_frame(AVCodecContext * avctx, AVFrame *frame)\n+{\n+    int rv;\n+\n+    frame->buf[0] = v4l2_req_frame_alloc(avctx, sizeof(V4L2MediaReqDescriptor));\n+    if (!frame->buf[0])\n+        return AVERROR(ENOMEM);\n+\n+    frame->data[0] = frame->buf[0]->data;\n+\n+    frame->hw_frames_ctx = av_buffer_ref(avctx->hw_frames_ctx);\n+\n+    if ((rv = ff_attach_decode_data(frame)) != 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to attach decode data to frame\\n\");\n+        av_frame_unref(frame);\n+        return rv;\n+    }\n+\n+    return 0;\n+}\n+\n+const v4l2_req_decode_fns V(ff_v4l2_req_hevc) = {\n+    .src_pix_fmt_v4l2 = V4L2_PIX_FMT_HEVC_SLICE,\n+    .name = \"V4L2 HEVC stateless V\" STR(HEVC_CTRLS_VERSION),\n+    .probe = probe,\n+    .set_controls = set_controls,\n+\n+    .start_frame    = v4l2_request_hevc_start_frame,\n+    .decode_slice   = v4l2_request_hevc_decode_slice,\n+    .end_frame      = v4l2_request_hevc_end_frame,\n+    .abort_frame    = v4l2_request_hevc_abort_frame,\n+    .frame_params   = frame_params,\n+    .alloc_frame    = alloc_frame,\n+};\n+\ndiff --git a/libavcodec/v4l2_req_media.c b/libavcodec/v4l2_req_media.c\nnew file mode 100644\nindex 0000000000..1a9944774a\n--- /dev/null\n+++ b/libavcodec/v4l2_req_media.c\n@@ -0,0 +1,1802 @@\n+/*\n+ * Copyright (C) 2018 Paul Kocialkowski <paul.kocialkowski@bootlin.com>\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a\n+ * copy of this software and associated documentation files (the\n+ * \"Software\"), to deal in the Software without restriction, including\n+ * without limitation the rights to use, copy, modify, merge, publish,\n+ * distribute, sub license, and/or sell copies of the Software, and to\n+ * permit persons to whom the Software is furnished to do so, subject to\n+ * the following conditions:\n+ *\n+ * The above copyright notice and this permission notice (including the\n+ * next paragraph) shall be included in all copies or substantial portions\n+ * of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\n+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR\n+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n+ */\n+\n+#include <errno.h>\n+#include <fcntl.h>\n+#include <poll.h>\n+#include <pthread.h>\n+#include <semaphore.h>\n+#include <stdatomic.h>\n+#include <stdbool.h>\n+#include <stdlib.h>\n+#include <string.h>\n+#include <unistd.h>\n+#include <linux/media.h>\n+#include <linux/mman.h>\n+#include <sys/ioctl.h>\n+#include <sys/select.h>\n+#include <sys/ioctl.h>\n+#include <sys/mman.h>\n+\n+#include <linux/videodev2.h>\n+\n+#include \"v4l2_req_dmabufs.h\"\n+#include \"v4l2_req_media.h\"\n+#include \"v4l2_req_pollqueue.h\"\n+#include \"v4l2_req_utils.h\"\n+#include \"weak_link.h\"\n+\n+\n+/* floor(log2(x)) */\n+static unsigned int log2_size(size_t x)\n+{\n+    unsigned int n = 0;\n+\n+    if (x & ~0xffff) {\n+        n += 16;\n+        x >>= 16;\n+    }\n+    if (x & ~0xff) {\n+        n += 8;\n+        x >>= 8;\n+    }\n+    if (x & ~0xf) {\n+        n += 4;\n+        x >>= 4;\n+    }\n+    if (x & ~3) {\n+        n += 2;\n+        x >>= 2;\n+    }\n+    return (x & ~1) ? n + 1 : n;\n+}\n+\n+static size_t round_up_size(const size_t x)\n+{\n+    /* Admit no size < 256 */\n+    const unsigned int n = x < 256 ? 8 : log2_size(x) - 1;\n+\n+    return x >= (3 << n) ? 4 << n : (3 << n);\n+}\n+\n+struct media_request;\n+\n+struct media_pool {\n+    int fd;\n+    sem_t sem;\n+    pthread_mutex_t lock;\n+    struct media_request * free_reqs;\n+    struct pollqueue * pq;\n+};\n+\n+struct media_request {\n+    struct media_request * next;\n+    struct media_pool * mp;\n+    int fd;\n+    struct polltask * pt;\n+};\n+\n+static inline enum v4l2_memory\n+mediabufs_memory_to_v4l2(const enum mediabufs_memory m)\n+{\n+    return (enum v4l2_memory)m;\n+}\n+\n+const char *\n+mediabufs_memory_name(const enum mediabufs_memory m)\n+{\n+    switch (m) {\n+    case MEDIABUFS_MEMORY_UNSET:\n+        return \"Unset\";\n+    case MEDIABUFS_MEMORY_MMAP:\n+        return \"MMap\";\n+    case MEDIABUFS_MEMORY_USERPTR:\n+        return \"UserPtr\";\n+    case MEDIABUFS_MEMORY_OVERLAY:\n+        return \"Overlay\";\n+    case MEDIABUFS_MEMORY_DMABUF:\n+        return \"DMABuf\";\n+    default:\n+        break;\n+    }\n+    return \"Unknown\";\n+}\n+\n+\n+static inline int do_trywait(sem_t *const sem)\n+{\n+    while (sem_trywait(sem)) {\n+        if (errno != EINTR)\n+            return -errno;\n+    }\n+    return 0;\n+}\n+\n+static inline int do_wait(sem_t *const sem)\n+{\n+    while (sem_wait(sem)) {\n+        if (errno != EINTR)\n+            return -errno;\n+    }\n+    return 0;\n+}\n+\n+static int request_buffers(int video_fd, unsigned int type,\n+                           enum mediabufs_memory memory, unsigned int buffers_count)\n+{\n+    struct v4l2_requestbuffers buffers;\n+    int rc;\n+\n+    memset(&buffers, 0, sizeof(buffers));\n+    buffers.type = type;\n+    buffers.memory = mediabufs_memory_to_v4l2(memory);\n+    buffers.count = buffers_count;\n+\n+    rc = ioctl(video_fd, VIDIOC_REQBUFS, &buffers);\n+    if (rc < 0) {\n+        rc = -errno;\n+        request_log(\"Unable to request %d type %d buffers: %s\\n\", buffers_count, type, strerror(-rc));\n+        return rc;\n+    }\n+\n+    return 0;\n+}\n+\n+\n+static int set_stream(int video_fd, unsigned int type, bool enable)\n+{\n+    enum v4l2_buf_type buf_type = type;\n+    int rc;\n+\n+    rc = ioctl(video_fd, enable ? VIDIOC_STREAMON : VIDIOC_STREAMOFF,\n+           &buf_type);\n+    if (rc < 0) {\n+        rc = -errno;\n+        request_log(\"Unable to %sable stream: %s\\n\",\n+                enable ? \"en\" : \"dis\", strerror(-rc));\n+        return rc;\n+    }\n+\n+    return 0;\n+}\n+\n+\n+\n+struct media_request * media_request_get(struct media_pool * const mp)\n+{\n+    struct media_request *req = NULL;\n+\n+    /* Timeout handled by poll code */\n+    if (do_wait(&mp->sem))\n+        return NULL;\n+\n+    pthread_mutex_lock(&mp->lock);\n+    req = mp->free_reqs;\n+    if (req) {\n+        mp->free_reqs = req->next;\n+        req->next = NULL;\n+    }\n+    pthread_mutex_unlock(&mp->lock);\n+    return req;\n+}\n+\n+int media_request_fd(const struct media_request * const req)\n+{\n+    return req->fd;\n+}\n+\n+int media_request_start(struct media_request * const req)\n+{\n+    while (ioctl(req->fd, MEDIA_REQUEST_IOC_QUEUE, NULL) == -1)\n+    {\n+        const int err = errno;\n+        if (err == EINTR)\n+            continue;\n+        request_log(\"%s: Failed to Q media: (%d) %s\\n\", __func__, err, strerror(err));\n+        return -err;\n+    }\n+\n+    pollqueue_add_task(req->pt, 2000);\n+    return 0;\n+}\n+\n+static void media_request_done(void *v, short revents)\n+{\n+    struct media_request *const req = v;\n+    struct media_pool *const mp = req->mp;\n+\n+    /* ** Not sure what to do about timeout */\n+\n+    if (ioctl(req->fd, MEDIA_REQUEST_IOC_REINIT, NULL) < 0)\n+        request_log(\"Unable to reinit media request: %s\\n\",\n+                strerror(errno));\n+\n+    pthread_mutex_lock(&mp->lock);\n+    req->next = mp->free_reqs;\n+    mp->free_reqs = req;\n+    pthread_mutex_unlock(&mp->lock);\n+    sem_post(&mp->sem);\n+}\n+\n+int media_request_abort(struct media_request ** const preq)\n+{\n+    struct media_request * const req = *preq;\n+\n+    if (req == NULL)\n+        return 0;\n+    *preq = NULL;\n+\n+    media_request_done(req, 0);\n+    return 0;\n+}\n+\n+static void delete_req_chain(struct media_request * const chain)\n+{\n+    struct media_request * next = chain;\n+    while (next) {\n+        struct media_request * const req = next;\n+        next = req->next;\n+        if (req->pt)\n+            polltask_delete(&req->pt);\n+        if (req->fd != -1)\n+            close(req->fd);\n+        free(req);\n+    }\n+}\n+\n+struct media_pool * media_pool_new(const char * const media_path,\n+                   struct pollqueue * const pq,\n+                   const unsigned int n)\n+{\n+    struct media_pool * const mp = calloc(1, sizeof(*mp));\n+    unsigned int i;\n+\n+    if (!mp)\n+        goto fail0;\n+\n+    mp->pq = pq;\n+    pthread_mutex_init(&mp->lock, NULL);\n+    mp->fd = open(media_path, O_RDWR | O_NONBLOCK);\n+    if (mp->fd == -1) {\n+        request_log(\"Failed to open '%s': %s\\n\", media_path, strerror(errno));\n+        goto fail1;\n+    }\n+\n+    for (i = 0; i != n; ++i) {\n+        struct media_request * req = malloc(sizeof(*req));\n+        if (!req)\n+            goto fail4;\n+\n+        *req = (struct media_request){\n+            .next = mp->free_reqs,\n+            .mp = mp,\n+            .fd = -1\n+        };\n+        mp->free_reqs = req;\n+\n+        if (ioctl(mp->fd, MEDIA_IOC_REQUEST_ALLOC, &req->fd) == -1) {\n+            request_log(\"Failed to alloc request %d: %s\\n\", i, strerror(errno));\n+            goto fail4;\n+        }\n+\n+        req->pt = polltask_new(pq, req->fd, POLLPRI, media_request_done, req);\n+        if (!req->pt)\n+            goto fail4;\n+    }\n+\n+    sem_init(&mp->sem, 0, n);\n+\n+    return mp;\n+\n+fail4:\n+    delete_req_chain(mp->free_reqs);\n+    close(mp->fd);\n+    pthread_mutex_destroy(&mp->lock);\n+fail1:\n+    free(mp);\n+fail0:\n+    return NULL;\n+}\n+\n+void media_pool_delete(struct media_pool ** pMp)\n+{\n+    struct media_pool * const mp = *pMp;\n+\n+    if (!mp)\n+        return;\n+    *pMp = NULL;\n+\n+    delete_req_chain(mp->free_reqs);\n+    close(mp->fd);\n+    sem_destroy(&mp->sem);\n+    pthread_mutex_destroy(&mp->lock);\n+    free(mp);\n+}\n+\n+\n+#define INDEX_UNSET (~(uint32_t)0)\n+\n+enum qent_status {\n+    QENT_NEW = 0,       // Initial state - shouldn't last\n+    QENT_FREE,          // On free chain\n+    QENT_PENDING,       // User has ent\n+    QENT_WAITING,       // On inuse\n+    QENT_DONE,          // Frame rx\n+    QENT_ERROR,         // Error\n+    QENT_IMPORT\n+};\n+\n+struct qent_base {\n+    atomic_int ref_count;\n+    struct qent_base *next;\n+    struct qent_base *prev;\n+    enum qent_status status;\n+    enum mediabufs_memory memtype;\n+    uint32_t index;\n+    struct dmabuf_h *dh[VIDEO_MAX_PLANES];\n+    struct timeval timestamp;\n+};\n+\n+struct qent_src {\n+    struct qent_base base;\n+    int fixed_size;\n+};\n+\n+struct qent_dst {\n+    struct qent_base base;\n+    bool waiting;\n+    pthread_mutex_t lock;\n+    pthread_cond_t cond;\n+    struct ff_weak_link_client * mbc_wl;\n+};\n+\n+struct qe_list_head {\n+    struct qent_base *head;\n+    struct qent_base *tail;\n+};\n+\n+struct buf_pool {\n+    enum mediabufs_memory memtype;\n+    pthread_mutex_t lock;\n+    sem_t free_sem;\n+    struct qe_list_head free;\n+    struct qe_list_head inuse;\n+};\n+\n+\n+static inline struct qent_dst *base_to_dst(struct qent_base *be)\n+{\n+    return (struct qent_dst *)be;\n+}\n+\n+static inline struct qent_src *base_to_src(struct qent_base *be)\n+{\n+    return (struct qent_src *)be;\n+}\n+\n+\n+#define QENT_BASE_INITIALIZER(mtype) {\\\n+    .ref_count = ATOMIC_VAR_INIT(0),\\\n+    .status = QENT_NEW,\\\n+    .memtype = (mtype),\\\n+    .index  = INDEX_UNSET\\\n+}\n+\n+static void qe_base_uninit(struct qent_base *const be)\n+{\n+    unsigned int i;\n+    for (i = 0; i != VIDEO_MAX_PLANES; ++i) {\n+        dmabuf_free(be->dh[i]);\n+        be->dh[i] = NULL;\n+    }\n+}\n+\n+static void qe_src_free(struct qent_src *const be_src)\n+{\n+    if (!be_src)\n+        return;\n+    qe_base_uninit(&be_src->base);\n+    free(be_src);\n+}\n+\n+static struct qent_src * qe_src_new(enum mediabufs_memory mtype)\n+{\n+    struct qent_src *const be_src = malloc(sizeof(*be_src));\n+    if (!be_src)\n+        return NULL;\n+    *be_src = (struct qent_src){\n+        .base = QENT_BASE_INITIALIZER(mtype)\n+    };\n+    return be_src;\n+}\n+\n+static void qe_dst_free(struct qent_dst *const be_dst)\n+{\n+    if (!be_dst)\n+        return;\n+\n+    ff_weak_link_unref(&be_dst->mbc_wl);\n+    pthread_cond_destroy(&be_dst->cond);\n+    pthread_mutex_destroy(&be_dst->lock);\n+    qe_base_uninit(&be_dst->base);\n+    free(be_dst);\n+}\n+\n+static struct qent_dst* qe_dst_new(struct ff_weak_link_master * const wl, const enum mediabufs_memory memtype)\n+{\n+    struct qent_dst *const be_dst = malloc(sizeof(*be_dst));\n+    if (!be_dst)\n+        return NULL;\n+    *be_dst = (struct qent_dst){\n+        .base = QENT_BASE_INITIALIZER(memtype),\n+        .lock = PTHREAD_MUTEX_INITIALIZER,\n+        .cond = PTHREAD_COND_INITIALIZER,\n+        .mbc_wl = ff_weak_link_ref(wl)\n+    };\n+    return be_dst;\n+}\n+\n+static void ql_add_tail(struct qe_list_head * const ql, struct qent_base * be)\n+{\n+    if (ql->tail)\n+        ql->tail->next = be;\n+    else\n+        ql->head = be;\n+    be->prev = ql->tail;\n+    be->next = NULL;\n+    ql->tail = be;\n+}\n+\n+static struct qent_base * ql_extract(struct qe_list_head * const ql, struct qent_base * be)\n+{\n+    if (!be)\n+        return NULL;\n+\n+    if (be->next)\n+        be->next->prev = be->prev;\n+    else\n+        ql->tail = be->prev;\n+    if (be->prev)\n+        be->prev->next = be->next;\n+    else\n+        ql->head = be->next;\n+    be->next = NULL;\n+    be->prev = NULL;\n+    return be;\n+}\n+\n+\n+static void bq_put_free(struct buf_pool *const bp, struct qent_base * be)\n+{\n+    ql_add_tail(&bp->free, be);\n+}\n+\n+static struct qent_base * bq_get_free(struct buf_pool *const bp)\n+{\n+    return ql_extract(&bp->free, bp->free.head);\n+}\n+\n+static struct qent_base * bq_extract_inuse(struct buf_pool *const bp, struct qent_base *const be)\n+{\n+    return ql_extract(&bp->inuse, be);\n+}\n+\n+static struct qent_base * bq_get_inuse(struct buf_pool *const bp)\n+{\n+    return ql_extract(&bp->inuse, bp->inuse.head);\n+}\n+\n+static void bq_free_all_free_src(struct buf_pool *const bp)\n+{\n+    struct qent_base *be;\n+    while ((be = bq_get_free(bp)) != NULL)\n+        qe_src_free(base_to_src(be));\n+}\n+\n+static void bq_free_all_inuse_src(struct buf_pool *const bp)\n+{\n+    struct qent_base *be;\n+    while ((be = bq_get_inuse(bp)) != NULL)\n+        qe_src_free(base_to_src(be));\n+}\n+\n+static void bq_free_all_free_dst(struct buf_pool *const bp)\n+{\n+    struct qent_base *be;\n+    while ((be = bq_get_free(bp)) != NULL)\n+        qe_dst_free(base_to_dst(be));\n+}\n+\n+static void queue_put_free(struct buf_pool *const bp, struct qent_base *be)\n+{\n+    unsigned int i;\n+\n+    pthread_mutex_lock(&bp->lock);\n+    /* Clear out state vars */\n+    be->timestamp.tv_sec = 0;\n+    be->timestamp.tv_usec = 0;\n+    be->status = QENT_FREE;\n+    for (i = 0; i < VIDEO_MAX_PLANES && be->dh[i]; ++i)\n+        dmabuf_len_set(be->dh[i], 0);\n+    bq_put_free(bp, be);\n+    pthread_mutex_unlock(&bp->lock);\n+    sem_post(&bp->free_sem);\n+}\n+\n+static bool queue_is_inuse(const struct buf_pool *const bp)\n+{\n+    return bp->inuse.tail != NULL;\n+}\n+\n+static void queue_put_inuse(struct buf_pool *const bp, struct qent_base *be)\n+{\n+    if (!be)\n+        return;\n+    pthread_mutex_lock(&bp->lock);\n+    ql_add_tail(&bp->inuse, be);\n+    be->status = QENT_WAITING;\n+    pthread_mutex_unlock(&bp->lock);\n+}\n+\n+static struct qent_base *queue_get_free(struct buf_pool *const bp)\n+{\n+    struct qent_base *buf;\n+\n+    if (do_wait(&bp->free_sem))\n+        return NULL;\n+    pthread_mutex_lock(&bp->lock);\n+    buf = bq_get_free(bp);\n+    pthread_mutex_unlock(&bp->lock);\n+    return buf;\n+}\n+\n+static struct qent_base *queue_tryget_free(struct buf_pool *const bp)\n+{\n+    struct qent_base *buf;\n+\n+    if (do_trywait(&bp->free_sem))\n+        return NULL;\n+    pthread_mutex_lock(&bp->lock);\n+    buf = bq_get_free(bp);\n+    pthread_mutex_unlock(&bp->lock);\n+    return buf;\n+}\n+\n+static struct qent_base * queue_find_extract_index(struct buf_pool *const bp, const unsigned int index)\n+{\n+    struct qent_base *be;\n+\n+    pthread_mutex_lock(&bp->lock);\n+    /* Expect 1st in Q, but allow anywhere */\n+    for (be = bp->inuse.head; be; be = be->next) {\n+        if (be->index == index) {\n+            bq_extract_inuse(bp, be);\n+            break;\n+        }\n+    }\n+    pthread_mutex_unlock(&bp->lock);\n+\n+    return be;\n+}\n+\n+static void queue_delete(struct buf_pool *const bp)\n+{\n+    sem_destroy(&bp->free_sem);\n+    pthread_mutex_destroy(&bp->lock);\n+    free(bp);\n+}\n+\n+static struct buf_pool* queue_new(const int vfd)\n+{\n+    struct buf_pool *bp = calloc(1, sizeof(*bp));\n+    if (!bp)\n+        return NULL;\n+    pthread_mutex_init(&bp->lock, NULL);\n+    sem_init(&bp->free_sem, 0, 0);\n+    return bp;\n+}\n+\n+\n+struct mediabufs_ctl {\n+    atomic_int ref_count;  /* 0 is single ref for easier atomics */\n+    void * dc;\n+    int vfd;\n+    bool stream_on;\n+    bool polling;\n+    bool dst_fixed;             // Dst Q is fixed size\n+    pthread_mutex_t lock;\n+    struct buf_pool * src;\n+    struct buf_pool * dst;\n+    struct polltask * pt;\n+    struct pollqueue * pq;\n+    struct ff_weak_link_master * this_wlm;\n+\n+    enum mediabufs_memory src_memtype;\n+    enum mediabufs_memory dst_memtype;\n+    struct v4l2_format src_fmt;\n+    struct v4l2_format dst_fmt;\n+    struct v4l2_capability capability;\n+};\n+\n+static int qe_v4l2_queue(struct qent_base *const be,\n+               const int vfd, struct media_request *const mreq,\n+               const struct v4l2_format *const fmt,\n+               const bool is_dst, const bool hold_flag)\n+{\n+    struct v4l2_buffer buffer = {\n+        .type = fmt->type,\n+        .memory = mediabufs_memory_to_v4l2(be->memtype),\n+        .index = be->index\n+    };\n+    struct v4l2_plane planes[VIDEO_MAX_PLANES] = {{0}};\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) {\n+        unsigned int i;\n+        for (i = 0; i < VIDEO_MAX_PLANES && be->dh[i]; ++i) {\n+            if (is_dst)\n+                dmabuf_len_set(be->dh[i], 0);\n+\n+            /* *** Really need a pixdesc rather than a format so we can fill in data_offset */\n+            planes[i].length = dmabuf_size(be->dh[i]);\n+            planes[i].bytesused = dmabuf_len(be->dh[i]);\n+            if (be->memtype == MEDIABUFS_MEMORY_DMABUF)\n+                planes[i].m.fd = dmabuf_fd(be->dh[i]);\n+            else\n+                planes[i].m.mem_offset = 0;\n+        }\n+        buffer.m.planes = planes;\n+        buffer.length = i;\n+    }\n+    else {\n+        if (is_dst)\n+            dmabuf_len_set(be->dh[0], 0);\n+\n+        buffer.bytesused = dmabuf_len(be->dh[0]);\n+        buffer.length = dmabuf_size(be->dh[0]);\n+        if (be->memtype == MEDIABUFS_MEMORY_DMABUF)\n+            buffer.m.fd = dmabuf_fd(be->dh[0]);\n+        else\n+            buffer.m.offset = 0;\n+    }\n+\n+    if (!is_dst && mreq) {\n+        buffer.flags |= V4L2_BUF_FLAG_REQUEST_FD;\n+        buffer.request_fd = media_request_fd(mreq);\n+        if (hold_flag)\n+            buffer.flags |= V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF;\n+    }\n+\n+    if (is_dst)\n+        be->timestamp = (struct timeval){0,0};\n+\n+    buffer.timestamp = be->timestamp;\n+\n+    while (ioctl(vfd, VIDIOC_QBUF, &buffer)) {\n+        const int err = errno;\n+        if (err != EINTR) {\n+            request_log(\"%s: Failed to Q buffer: err=%d (%s)\\n\", __func__, err, strerror(err));\n+            return -err;\n+        }\n+    }\n+    return 0;\n+}\n+\n+static struct qent_base * qe_dequeue(struct buf_pool *const bp,\n+                     const int vfd,\n+                     const struct v4l2_format * const f)\n+{\n+    struct qent_base *be;\n+    int rc;\n+    const bool mp = V4L2_TYPE_IS_MULTIPLANAR(f->type);\n+    struct v4l2_plane planes[VIDEO_MAX_PLANES] = {{0}};\n+    struct v4l2_buffer buffer = {\n+        .type =  f->type,\n+        .memory = mediabufs_memory_to_v4l2(bp->memtype)\n+    };\n+    if (mp) {\n+        buffer.length = f->fmt.pix_mp.num_planes;\n+        buffer.m.planes = planes;\n+    }\n+\n+    while ((rc = ioctl(vfd, VIDIOC_DQBUF, &buffer)) != 0 &&\n+           errno == EINTR)\n+        /* Loop */;\n+    if (rc) {\n+        request_log(\"Error DQing buffer type %d: %s\\n\", f->type, strerror(errno));\n+        return NULL;\n+    }\n+\n+    be = queue_find_extract_index(bp, buffer.index);\n+    if (!be) {\n+        request_log(\"Failed to find index %d in Q\\n\", buffer.index);\n+        return NULL;\n+    }\n+\n+    if (mp) {\n+        unsigned int i;\n+        for (i = 0; i != buffer.length; ++i)\n+            dmabuf_len_set(be->dh[i], V4L2_TYPE_IS_CAPTURE(f->type) ? planes[i].bytesused : 0);\n+    }\n+    else\n+        dmabuf_len_set(be->dh[0], V4L2_TYPE_IS_CAPTURE(f->type) ? buffer.length : 0);\n+\n+    be->timestamp = buffer.timestamp;\n+    be->status = (buffer.flags & V4L2_BUF_FLAG_ERROR) ? QENT_ERROR : QENT_DONE;\n+    return be;\n+}\n+\n+static void qe_dst_done(struct qent_dst * dst_be)\n+{\n+    pthread_mutex_lock(&dst_be->lock);\n+    dst_be->waiting = false;\n+    pthread_cond_broadcast(&dst_be->cond);\n+    pthread_mutex_unlock(&dst_be->lock);\n+\n+    qent_dst_unref(&dst_be);\n+}\n+\n+static bool qe_dst_waiting(struct qent_dst *const dst_be)\n+{\n+    bool waiting;\n+    pthread_mutex_lock(&dst_be->lock);\n+    waiting = dst_be->waiting;\n+    dst_be->waiting = true;\n+    pthread_mutex_unlock(&dst_be->lock);\n+    return waiting;\n+}\n+\n+\n+static bool mediabufs_wants_poll(const struct mediabufs_ctl *const mbc)\n+{\n+    return queue_is_inuse(mbc->src) || queue_is_inuse(mbc->dst);\n+}\n+\n+static void mediabufs_poll_cb(void * v, short revents)\n+{\n+    struct mediabufs_ctl *mbc = v;\n+    struct qent_src *src_be = NULL;\n+    struct qent_dst *dst_be = NULL;\n+\n+    if (!revents)\n+        request_err(mbc->dc, \"%s: Timeout\\n\", __func__);\n+\n+    pthread_mutex_lock(&mbc->lock);\n+    mbc->polling = false;\n+\n+    if ((revents & POLLOUT) != 0)\n+        src_be = base_to_src(qe_dequeue(mbc->src, mbc->vfd, &mbc->src_fmt));\n+    if ((revents & POLLIN) != 0)\n+        dst_be = base_to_dst(qe_dequeue(mbc->dst, mbc->vfd, &mbc->dst_fmt));\n+\n+    /* Reschedule */\n+    if (mediabufs_wants_poll(mbc)) {\n+        mbc->polling = true;\n+        pollqueue_add_task(mbc->pt, 2000);\n+    }\n+    pthread_mutex_unlock(&mbc->lock);\n+\n+    if (src_be)\n+        queue_put_free(mbc->src, &src_be->base);\n+    if (dst_be)\n+        qe_dst_done(dst_be);\n+}\n+\n+int qent_src_params_set(struct qent_src *const be_src, const struct timeval * timestamp)\n+{\n+    struct qent_base *const be = &be_src->base;\n+\n+    be->timestamp = *timestamp;\n+    return 0;\n+}\n+\n+struct timeval qent_dst_timestamp_get(const struct qent_dst *const be_dst)\n+{\n+    return be_dst->base.timestamp;\n+}\n+\n+static int qent_base_realloc(struct qent_base *const be, const size_t len, struct dmabufs_ctl * dbsc)\n+{\n+    if (!be->dh[0] || len > dmabuf_size(be->dh[0])) {\n+        size_t newsize = round_up_size(len);\n+        request_log(\"%s: Overrun %zd > %zd; trying %zd\\n\", __func__, len, dmabuf_size(be->dh[0]), newsize);\n+        if (!dbsc) {\n+            request_log(\"%s: No dmbabuf_ctrl for realloc\\n\", __func__);\n+            return -ENOMEM;\n+        }\n+        if ((be->dh[0] = dmabuf_realloc(dbsc, be->dh[0], newsize)) == NULL) {\n+            request_log(\"%s: Realloc %zd failed\\n\", __func__, newsize);\n+            return -ENOMEM;\n+        }\n+    }\n+    return 0;\n+}\n+\n+int qent_src_alloc(struct qent_src *const be_src, const size_t len, struct dmabufs_ctl * dbsc)\n+{\n+    struct qent_base *const be = &be_src->base;\n+    return qent_base_realloc(be, len, dbsc);\n+}\n+\n+\n+int qent_src_data_copy(struct qent_src *const be_src, const size_t offset, const void *const src, const size_t len, struct dmabufs_ctl * dbsc)\n+{\n+    void * dst;\n+    struct qent_base *const be = &be_src->base;\n+    int rv;\n+\n+    // Realloc doesn't copy so don't alloc if offset != 0\n+    if ((rv = qent_base_realloc(be, offset + len,\n+                                be_src->fixed_size || offset ? NULL : dbsc)) != 0)\n+        return rv;\n+\n+    dmabuf_write_start(be->dh[0]);\n+    dst = dmabuf_map(be->dh[0]);\n+    if (!dst)\n+        return -1;\n+    memcpy((char*)dst + offset, src, len);\n+    dmabuf_len_set(be->dh[0], len);\n+    dmabuf_write_end(be->dh[0]);\n+    return 0;\n+}\n+\n+const struct dmabuf_h * qent_dst_dmabuf(const struct qent_dst *const be_dst, unsigned int plane)\n+{\n+    const struct qent_base *const be = &be_dst->base;\n+\n+    return (plane >= sizeof(be->dh)/sizeof(be->dh[0])) ? NULL : be->dh[plane];\n+}\n+\n+int qent_dst_dup_fd(const struct qent_dst *const be_dst, unsigned int plane)\n+{\n+    return dup(dmabuf_fd(qent_dst_dmabuf(be_dst, plane)));\n+}\n+\n+MediaBufsStatus mediabufs_start_request(struct mediabufs_ctl *const mbc,\n+                struct media_request **const pmreq,\n+                struct qent_src **const psrc_be,\n+                struct qent_dst *const dst_be,\n+                const bool is_final)\n+{\n+    struct media_request * mreq = *pmreq;\n+    struct qent_src *const src_be = *psrc_be;\n+\n+    // Req & src are always both \"consumed\"\n+    *pmreq = NULL;\n+    *psrc_be = NULL;\n+\n+    pthread_mutex_lock(&mbc->lock);\n+\n+    if (!src_be)\n+        goto fail1;\n+\n+    if (dst_be) {\n+        if (qe_dst_waiting(dst_be)) {\n+            request_info(mbc->dc, \"Request buffer already waiting on start\\n\");\n+            goto fail1;\n+        }\n+        dst_be->base.timestamp = (struct timeval){0,0};\n+        if (qe_v4l2_queue(&dst_be->base, mbc->vfd, NULL, &mbc->dst_fmt, true, false))\n+            goto fail1;\n+\n+        qent_dst_ref(dst_be);\n+        queue_put_inuse(mbc->dst, &dst_be->base);\n+    }\n+\n+    if (qe_v4l2_queue(&src_be->base, mbc->vfd, mreq, &mbc->src_fmt, false, !is_final))\n+        goto fail1;\n+    queue_put_inuse(mbc->src, &src_be->base);\n+\n+    if (!mbc->polling && mediabufs_wants_poll(mbc)) {\n+        mbc->polling = true;\n+        pollqueue_add_task(mbc->pt, 2000);\n+    }\n+    pthread_mutex_unlock(&mbc->lock);\n+\n+    if (media_request_start(mreq))\n+        return MEDIABUFS_ERROR_OPERATION_FAILED;\n+\n+    return MEDIABUFS_STATUS_SUCCESS;\n+\n+fail1:\n+    media_request_abort(&mreq);\n+    if (src_be)\n+        queue_put_free(mbc->src, &src_be->base);\n+\n+// *** TODO: If src Q fails this doesnt unwind properly - separate dst Q from src Q\n+    if (dst_be) {\n+        dst_be->base.status = QENT_ERROR;\n+        qe_dst_done(dst_be);\n+    }\n+    pthread_mutex_unlock(&mbc->lock);\n+    return MEDIABUFS_ERROR_OPERATION_FAILED;\n+}\n+\n+\n+static int qe_alloc_from_fmt(struct qent_base *const be,\n+                   struct dmabufs_ctl *const dbsc,\n+                   const struct v4l2_format *const fmt)\n+{\n+    if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) {\n+        unsigned int i;\n+        for (i = 0; i != fmt->fmt.pix_mp.num_planes; ++i) {\n+            be->dh[i] = dmabuf_realloc(dbsc, be->dh[i],\n+                fmt->fmt.pix_mp.plane_fmt[i].sizeimage);\n+            /* On failure tidy up and die */\n+            if (!be->dh[i]) {\n+                while (i--) {\n+                    dmabuf_free(be->dh[i]);\n+                    be->dh[i] = NULL;\n+                }\n+                return -1;\n+            }\n+        }\n+    }\n+    else {\n+//      be->dh[0] = dmabuf_alloc(dbsc, fmt->fmt.pix.sizeimage);\n+        size_t size = fmt->fmt.pix.sizeimage;\n+        be->dh[0] = dmabuf_realloc(dbsc, be->dh[0], size);\n+        if (!be->dh[0])\n+            return -1;\n+    }\n+    return 0;\n+}\n+\n+static MediaBufsStatus fmt_set(struct v4l2_format *const fmt, const int fd,\n+            const enum v4l2_buf_type buftype,\n+            uint32_t pixfmt,\n+            const unsigned int width, const unsigned int height,\n+                               const size_t bufsize)\n+{\n+    *fmt = (struct v4l2_format){.type = buftype};\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(buftype)) {\n+        fmt->fmt.pix_mp.width = width;\n+        fmt->fmt.pix_mp.height = height;\n+        fmt->fmt.pix_mp.pixelformat = pixfmt;\n+        if (bufsize) {\n+            fmt->fmt.pix_mp.num_planes = 1;\n+            fmt->fmt.pix_mp.plane_fmt[0].sizeimage = bufsize;\n+        }\n+    }\n+    else {\n+        fmt->fmt.pix.width = width;\n+        fmt->fmt.pix.height = height;\n+        fmt->fmt.pix.pixelformat = pixfmt;\n+        fmt->fmt.pix.sizeimage = bufsize;\n+    }\n+\n+    while (ioctl(fd, VIDIOC_S_FMT, fmt))\n+        if (errno != EINTR)\n+            return MEDIABUFS_ERROR_OPERATION_FAILED;\n+\n+    // Treat anything where we don't get at least what we asked for as a fail\n+    if (V4L2_TYPE_IS_MULTIPLANAR(buftype)) {\n+        if (fmt->fmt.pix_mp.width < width ||\n+            fmt->fmt.pix_mp.height < height ||\n+            fmt->fmt.pix_mp.pixelformat != pixfmt) {\n+            return MEDIABUFS_ERROR_UNSUPPORTED_BUFFERTYPE;\n+        }\n+    }\n+    else {\n+        if (fmt->fmt.pix.width < width ||\n+            fmt->fmt.pix.height < height ||\n+            fmt->fmt.pix.pixelformat != pixfmt) {\n+            return MEDIABUFS_ERROR_UNSUPPORTED_BUFFERTYPE;\n+        }\n+    }\n+\n+    return MEDIABUFS_STATUS_SUCCESS;\n+}\n+\n+static MediaBufsStatus find_fmt_flags(struct v4l2_format *const fmt,\n+                   const int fd,\n+                   const unsigned int type_v4l2,\n+                   const uint32_t flags_must,\n+                   const uint32_t flags_not,\n+                   const unsigned int width,\n+                   const unsigned int height,\n+                   mediabufs_dst_fmt_accept_fn *const accept_fn,\n+                   void *const accept_v)\n+{\n+    unsigned int i;\n+\n+    for (i = 0;; ++i) {\n+        struct v4l2_fmtdesc fmtdesc = {\n+            .index = i,\n+            .type = type_v4l2\n+        };\n+        while (ioctl(fd, VIDIOC_ENUM_FMT, &fmtdesc)) {\n+            if (errno != EINTR)\n+                return MEDIABUFS_ERROR_UNSUPPORTED_BUFFERTYPE;\n+        }\n+        if ((fmtdesc.flags & flags_must) != flags_must ||\n+            (fmtdesc.flags & flags_not))\n+            continue;\n+        if (!accept_fn(accept_v, &fmtdesc))\n+            continue;\n+\n+        if (fmt_set(fmt, fd, fmtdesc.type, fmtdesc.pixelformat,\n+                width, height, 0) == MEDIABUFS_STATUS_SUCCESS)\n+            return MEDIABUFS_STATUS_SUCCESS;\n+    }\n+    return 0;\n+}\n+\n+\n+/* Wait for qent done */\n+\n+MediaBufsStatus qent_dst_wait(struct qent_dst *const be_dst)\n+{\n+    struct qent_base *const be = &be_dst->base;\n+    enum qent_status estat;\n+\n+    pthread_mutex_lock(&be_dst->lock);\n+    while (be_dst->waiting &&\n+           !pthread_cond_wait(&be_dst->cond, &be_dst->lock))\n+        /* Loop */;\n+    estat = be->status;\n+    pthread_mutex_unlock(&be_dst->lock);\n+\n+    return estat == QENT_DONE ? MEDIABUFS_STATUS_SUCCESS :\n+        estat == QENT_ERROR ? MEDIABUFS_ERROR_DECODING_ERROR :\n+            MEDIABUFS_ERROR_OPERATION_FAILED;\n+}\n+\n+const uint8_t * qent_dst_data(struct qent_dst *const be_dst, unsigned int buf_no)\n+{\n+    struct qent_base *const be = &be_dst->base;\n+    return dmabuf_map(be->dh[buf_no]);\n+}\n+\n+MediaBufsStatus qent_dst_read_start(struct qent_dst *const be_dst)\n+{\n+    struct qent_base *const be = &be_dst->base;\n+    unsigned int i;\n+    for (i = 0; i != VIDEO_MAX_PLANES && be->dh[i]; ++i) {\n+        if (dmabuf_read_start(be->dh[i])) {\n+            while (i--)\n+                dmabuf_read_end(be->dh[i]);\n+            return MEDIABUFS_ERROR_ALLOCATION_FAILED;\n+        }\n+    }\n+    return MEDIABUFS_STATUS_SUCCESS;\n+}\n+\n+MediaBufsStatus qent_dst_read_stop(struct qent_dst *const be_dst)\n+{\n+    struct qent_base *const be = &be_dst->base;\n+    unsigned int i;\n+    MediaBufsStatus status = MEDIABUFS_STATUS_SUCCESS;\n+\n+    for (i = 0; i != VIDEO_MAX_PLANES && be->dh[i]; ++i) {\n+        if (dmabuf_read_end(be->dh[i]))\n+            status = MEDIABUFS_ERROR_OPERATION_FAILED;\n+    }\n+    return status;\n+}\n+\n+struct qent_dst * qent_dst_ref(struct qent_dst * const be_dst)\n+{\n+    if (be_dst)\n+        atomic_fetch_add(&be_dst->base.ref_count, 1);\n+    return be_dst;\n+}\n+\n+void qent_dst_unref(struct qent_dst ** const pbe_dst)\n+{\n+    struct qent_dst * const be_dst = *pbe_dst;\n+    struct mediabufs_ctl * mbc;\n+    if (!be_dst)\n+        return;\n+    *pbe_dst = NULL;\n+\n+    if (atomic_fetch_sub(&be_dst->base.ref_count, 1) != 0)\n+        return;\n+\n+    if ((mbc = ff_weak_link_lock(&be_dst->mbc_wl)) != NULL) {\n+        queue_put_free(mbc->dst, &be_dst->base);\n+        ff_weak_link_unlock(be_dst->mbc_wl);\n+    }\n+    else {\n+        qe_dst_free(be_dst);\n+    }\n+}\n+\n+MediaBufsStatus qent_dst_import_fd(struct qent_dst *const be_dst,\n+                unsigned int plane,\n+                int fd, size_t size)\n+{\n+    struct qent_base *const be = &be_dst->base;\n+    struct dmabuf_h * dh;\n+\n+    if (be->status != QENT_IMPORT || be->dh[plane])\n+        return MEDIABUFS_ERROR_OPERATION_FAILED;\n+\n+    dh = dmabuf_import(fd, size);\n+    if (!dh)\n+        return MEDIABUFS_ERROR_ALLOCATION_FAILED;\n+\n+    be->dh[plane] = dh;\n+    return MEDIABUFS_STATUS_SUCCESS;\n+}\n+\n+// Returns noof buffers created, -ve for error\n+static int create_dst_bufs(struct mediabufs_ctl *const mbc, unsigned int n, struct qent_dst * const qes[])\n+{\n+    unsigned int i;\n+\n+    struct v4l2_create_buffers cbuf = {\n+        .count = n,\n+        .memory = mediabufs_memory_to_v4l2(mbc->dst->memtype),\n+        .format = mbc->dst_fmt,\n+    };\n+\n+    while (ioctl(mbc->vfd, VIDIOC_CREATE_BUFS, &cbuf)) {\n+        const int err = -errno;\n+        if (err != EINTR) {\n+            request_err(mbc->dc, \"%s: Failed to create V4L2 buffer\\n\", __func__);\n+            return -err;\n+        }\n+    }\n+\n+    if (cbuf.count != n)\n+        request_warn(mbc->dc, \"%s: Created %d of %d V4L2 buffers requested\\n\", __func__, cbuf.count, n);\n+\n+    for (i = 0; i != cbuf.count; ++i)\n+        qes[i]->base.index = cbuf.index + i;\n+\n+    return cbuf.count;\n+}\n+\n+static MediaBufsStatus\n+qe_import_from_buf(struct mediabufs_ctl *const mbc, struct qent_base * const be, const struct v4l2_format *const fmt,\n+                   const unsigned int n, const bool x_dmabuf)\n+{\n+    struct v4l2_buffer buf = {\n+        .index = n,\n+        .type = fmt->type,\n+    };\n+    struct v4l2_plane planes[VIDEO_MAX_PLANES];\n+    int ret;\n+\n+    if (be->dh[0])\n+        return 0;\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) {\n+        memset(planes, 0, sizeof(planes));\n+        buf.m.planes = planes;\n+        buf.length = VIDEO_MAX_PLANES;\n+    }\n+\n+    if ((ret = ioctl(mbc->vfd, VIDIOC_QUERYBUF, &buf)) != 0) {\n+        request_err(mbc->dc, \"VIDIOC_QUERYBUF failed\");\n+        return MEDIABUFS_ERROR_OPERATION_FAILED;\n+    }\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type))\n+    {\n+        unsigned int i;\n+        for (i = 0; i != buf.length; ++i) {\n+            if (x_dmabuf) {\n+                struct v4l2_exportbuffer xbuf = {\n+                    .type = buf.type,\n+                    .index = buf.index,\n+                    .plane = i,\n+                    .flags = O_RDWR, // *** Arguably O_RDONLY would be fine\n+                };\n+                if (ioctl(mbc->vfd, VIDIOC_EXPBUF, &xbuf) == 0)\n+                    be->dh[i] = dmabuf_import(xbuf.fd, planes[i].length);\n+            }\n+            else {\n+                be->dh[i] = dmabuf_import_mmap(\n+                    mmap(NULL, planes[i].length,\n+                        PROT_READ | PROT_WRITE,\n+                        MAP_SHARED | MAP_POPULATE,\n+                        mbc->vfd, planes[i].m.mem_offset),\n+                    planes[i].length);\n+            }\n+            /* On failure tidy up and die */\n+            if (!be->dh[i]) {\n+                while (i--) {\n+                    dmabuf_free(be->dh[i]);\n+                    be->dh[i] = NULL;\n+                }\n+                return MEDIABUFS_ERROR_OPERATION_FAILED;\n+            }\n+        }\n+    }\n+    else\n+    {\n+        if (x_dmabuf) {\n+            struct v4l2_exportbuffer xbuf = {\n+                .type = buf.type,\n+                .index = buf.index,\n+                .flags = O_RDWR, // *** Arguably O_RDONLY would be fine\n+            };\n+            if (ioctl(mbc->vfd, VIDIOC_EXPBUF, &xbuf) == 0)\n+                be->dh[0] = dmabuf_import(xbuf.fd, buf.length);\n+        }\n+        else {\n+            be->dh[0] = dmabuf_import_mmap(\n+                mmap(NULL, buf.length,\n+                    PROT_READ | PROT_WRITE,\n+                    MAP_SHARED | MAP_POPULATE,\n+                    mbc->vfd, buf.m.offset),\n+                buf.length);\n+        }\n+        /* On failure tidy up and die */\n+        if (!be->dh[0]) {\n+            return MEDIABUFS_ERROR_OPERATION_FAILED;\n+        }\n+    }\n+\n+    return 0;\n+}\n+\n+struct qent_dst* mediabufs_dst_qent_alloc(struct mediabufs_ctl *const mbc, struct dmabufs_ctl *const dbsc)\n+{\n+    struct qent_dst * be_dst;\n+\n+    if (mbc == NULL) {\n+        be_dst = qe_dst_new(NULL, MEDIABUFS_MEMORY_DMABUF);\n+        if (be_dst)\n+            be_dst->base.status = QENT_IMPORT;\n+        return be_dst;\n+    }\n+\n+    if (mbc->dst_fixed) {\n+        be_dst = base_to_dst(queue_get_free(mbc->dst));\n+        if (!be_dst)\n+            return NULL;\n+    }\n+    else {\n+        be_dst = base_to_dst(queue_tryget_free(mbc->dst));\n+        if (!be_dst) {\n+            be_dst = qe_dst_new(mbc->this_wlm, mbc->dst->memtype);\n+            if (!be_dst)\n+                return NULL;\n+\n+            if (create_dst_bufs(mbc, 1, &be_dst) != 1) {\n+                qe_dst_free(be_dst);\n+                return NULL;\n+            }\n+        }\n+    }\n+\n+    if (mbc->dst->memtype == MEDIABUFS_MEMORY_MMAP) {\n+        if (qe_import_from_buf(mbc, &be_dst->base, &mbc->dst_fmt, be_dst->base.index, true)) {\n+            request_err(mbc->dc, \"Failed to export as dmabuf\\n\");\n+            queue_put_free(mbc->dst, &be_dst->base);\n+            return NULL;\n+        }\n+    }\n+    else {\n+        if (qe_alloc_from_fmt(&be_dst->base, dbsc, &mbc->dst_fmt)) {\n+            /* Given  how create buf works we can't uncreate it on alloc failure\n+             * all we can do is put it on the free Q\n+            */\n+            queue_put_free(mbc->dst, &be_dst->base);\n+            return NULL;\n+        }\n+    }\n+\n+    be_dst->base.status = QENT_PENDING;\n+    atomic_store(&be_dst->base.ref_count, 0);\n+    return be_dst;\n+}\n+\n+const struct v4l2_format *mediabufs_dst_fmt(struct mediabufs_ctl *const mbc)\n+{\n+    return &mbc->dst_fmt;\n+}\n+\n+MediaBufsStatus mediabufs_dst_fmt_set(struct mediabufs_ctl *const mbc,\n+               const unsigned int width,\n+               const unsigned int height,\n+               mediabufs_dst_fmt_accept_fn *const accept_fn,\n+               void *const accept_v)\n+{\n+    MediaBufsStatus status;\n+    unsigned int i;\n+    const enum v4l2_buf_type buf_type = mbc->dst_fmt.type;\n+    static const struct {\n+        unsigned int flags_must;\n+        unsigned int flags_not;\n+    } trys[] = {\n+        {0, V4L2_FMT_FLAG_EMULATED},\n+        {V4L2_FMT_FLAG_EMULATED, 0},\n+    };\n+    for (i = 0; i != sizeof(trys)/sizeof(trys[0]); ++i) {\n+        status = find_fmt_flags(&mbc->dst_fmt, mbc->vfd,\n+                                buf_type,\n+                                trys[i].flags_must,\n+                                trys[i].flags_not,\n+                                width, height, accept_fn, accept_v);\n+        if (status != MEDIABUFS_ERROR_UNSUPPORTED_BUFFERTYPE)\n+            return status;\n+    }\n+\n+    if (status != MEDIABUFS_STATUS_SUCCESS)\n+        return status;\n+\n+    /* Try to create a buffer - don't alloc */\n+    return status;\n+}\n+\n+// ** This is a mess if we get partial alloc but without any way to remove\n+//    individual V4L2 Q members we are somewhat stuffed\n+MediaBufsStatus mediabufs_dst_slots_create(struct mediabufs_ctl *const mbc, const unsigned int n, const bool fixed, const enum mediabufs_memory memtype)\n+{\n+    unsigned int i;\n+    int a = 0;\n+    unsigned int qc;\n+    struct qent_dst * qes[32];\n+\n+    if (n > 32)\n+        return MEDIABUFS_ERROR_ALLOCATION_FAILED;\n+\n+    mbc->dst->memtype = memtype;\n+\n+    // Create qents first as it is hard to get rid of the V4L2 buffers on error\n+    for (qc = 0; qc != n; ++qc)\n+    {\n+        if ((qes[qc] = qe_dst_new(mbc->this_wlm, mbc->dst->memtype)) == NULL)\n+            goto fail;\n+    }\n+\n+    if ((a = create_dst_bufs(mbc, n, qes)) < 0)\n+        goto fail;\n+\n+    for (i = 0; i != a; ++i)\n+        queue_put_free(mbc->dst, &qes[i]->base);\n+\n+    if (a != n)\n+        goto fail;\n+\n+    mbc->dst_fixed = fixed;\n+    return MEDIABUFS_STATUS_SUCCESS;\n+\n+fail:\n+    for (i = (a < 0 ? 0 : a); i != qc; ++i)\n+        qe_dst_free(qes[i]);\n+\n+    return MEDIABUFS_ERROR_ALLOCATION_FAILED;\n+}\n+\n+struct qent_src *mediabufs_src_qent_get(struct mediabufs_ctl *const mbc)\n+{\n+    struct qent_base * buf = queue_get_free(mbc->src);\n+    buf->status = QENT_PENDING;\n+    return base_to_src(buf);\n+}\n+\n+void mediabufs_src_qent_abort(struct mediabufs_ctl *const mbc, struct qent_src **const pqe_src)\n+{\n+    struct qent_src *const qe_src = *pqe_src;\n+    if (!qe_src)\n+        return;\n+    *pqe_src = NULL;\n+    queue_put_free(mbc->src, &qe_src->base);\n+}\n+\n+static MediaBufsStatus\n+chk_memory_type(struct mediabufs_ctl *const mbc,\n+    const struct v4l2_format * const f,\n+    const enum mediabufs_memory m)\n+{\n+    struct v4l2_create_buffers cbuf = {\n+        .count = 0,\n+        .memory = V4L2_MEMORY_MMAP,\n+        .format = *f\n+    };\n+\n+    if (ioctl(mbc->vfd, VIDIOC_CREATE_BUFS, &cbuf) != 0)\n+        return MEDIABUFS_ERROR_OPERATION_FAILED;\n+\n+    switch (m) {\n+    case MEDIABUFS_MEMORY_DMABUF:\n+        // 0 = Unknown but assume not in that case\n+        if ((cbuf.capabilities & V4L2_BUF_CAP_SUPPORTS_DMABUF) == 0)\n+            return MEDIABUFS_ERROR_UNSUPPORTED_MEMORY;\n+        break;\n+    case MEDIABUFS_MEMORY_MMAP:\n+        break;\n+    default:\n+        return MEDIABUFS_ERROR_UNSUPPORTED_MEMORY;\n+    }\n+\n+    return MEDIABUFS_STATUS_SUCCESS;\n+}\n+\n+MediaBufsStatus\n+mediabufs_src_chk_memtype(struct mediabufs_ctl *const mbc, const enum mediabufs_memory memtype)\n+{\n+    return chk_memory_type(mbc, &mbc->src_fmt, memtype);\n+}\n+\n+MediaBufsStatus\n+mediabufs_dst_chk_memtype(struct mediabufs_ctl *const mbc, const enum mediabufs_memory memtype)\n+{\n+    return chk_memory_type(mbc, &mbc->dst_fmt, memtype);\n+}\n+\n+/* src format must have been set up before this */\n+MediaBufsStatus mediabufs_src_pool_create(struct mediabufs_ctl *const mbc,\n+                  struct dmabufs_ctl * const dbsc,\n+                  unsigned int n, const enum mediabufs_memory memtype)\n+{\n+    unsigned int i;\n+    struct v4l2_requestbuffers req = {\n+        .count = n,\n+        .type = mbc->src_fmt.type,\n+        .memory = mediabufs_memory_to_v4l2(memtype)\n+    };\n+\n+    bq_free_all_free_src(mbc->src);\n+\n+    while (ioctl(mbc->vfd, VIDIOC_REQBUFS, &req) == -1) {\n+        if (errno != EINTR) {\n+            request_err(mbc->dc, \"%s: Failed to request src bufs\\n\", __func__);\n+            return MEDIABUFS_ERROR_OPERATION_FAILED;\n+        }\n+    }\n+\n+    if (n > req.count) {\n+        request_info(mbc->dc, \"Only allocated %d of %d src buffers requested\\n\", req.count, n);\n+        n = req.count;\n+    }\n+\n+    for (i = 0; i != n; ++i) {\n+        struct qent_src *const be_src = qe_src_new(memtype);\n+        if (!be_src) {\n+            request_err(mbc->dc, \"Failed to create src be %d\\n\", i);\n+            goto fail;\n+        }\n+        switch (memtype) {\n+        case MEDIABUFS_MEMORY_MMAP:\n+            if (qe_import_from_buf(mbc, &be_src->base, &mbc->src_fmt, i, false)) {\n+                qe_src_free(be_src);\n+                goto fail;\n+            }\n+            be_src->fixed_size = 1;\n+            break;\n+        case MEDIABUFS_MEMORY_DMABUF:\n+            if (qe_alloc_from_fmt(&be_src->base, dbsc, &mbc->src_fmt)) {\n+                qe_src_free(be_src);\n+                goto fail;\n+            }\n+            be_src->fixed_size = !mediabufs_src_resizable(mbc);\n+            break;\n+        default:\n+            request_err(mbc->dc, \"Unexpected memorty type\\n\");\n+            goto fail;\n+        }\n+        be_src->base.index = i;\n+\n+        queue_put_free(mbc->src, &be_src->base);\n+    }\n+\n+    mbc->src->memtype = memtype;\n+    return MEDIABUFS_STATUS_SUCCESS;\n+\n+fail:\n+    bq_free_all_free_src(mbc->src);\n+    req.count = 0;\n+    while (ioctl(mbc->vfd, VIDIOC_REQBUFS, &req) == -1 &&\n+           errno == EINTR)\n+        /* Loop */;\n+\n+    return MEDIABUFS_ERROR_OPERATION_FAILED;\n+}\n+\n+\n+\n+/*\n+ * Set stuff order:\n+ *  Set src fmt\n+ *  Set parameters (sps) on vfd\n+ *  Negotiate dst format (dst_fmt_set)\n+ *  Create src buffers\n+ *  Alloc a dst buffer or Create dst slots\n+*/\n+MediaBufsStatus mediabufs_stream_on(struct mediabufs_ctl *const mbc)\n+{\n+    if (mbc->stream_on)\n+        return MEDIABUFS_STATUS_SUCCESS;\n+\n+    if (set_stream(mbc->vfd, mbc->src_fmt.type, true) < 0) {\n+        request_log(\"Failed to set stream on src type %d\\n\", mbc->src_fmt.type);\n+        return MEDIABUFS_ERROR_OPERATION_FAILED;\n+    }\n+\n+    if (set_stream(mbc->vfd, mbc->dst_fmt.type, true) < 0) {\n+        request_log(\"Failed to set stream on dst type %d\\n\", mbc->dst_fmt.type);\n+        set_stream(mbc->vfd, mbc->src_fmt.type, false);\n+        return MEDIABUFS_ERROR_OPERATION_FAILED;\n+    }\n+\n+    mbc->stream_on = true;\n+    return MEDIABUFS_STATUS_SUCCESS;\n+}\n+\n+MediaBufsStatus mediabufs_stream_off(struct mediabufs_ctl *const mbc)\n+{\n+    MediaBufsStatus status = MEDIABUFS_STATUS_SUCCESS;\n+\n+    if (!mbc->stream_on)\n+        return MEDIABUFS_STATUS_SUCCESS;\n+\n+    if (set_stream(mbc->vfd, mbc->dst_fmt.type, false) < 0) {\n+        request_log(\"Failed to set stream off dst type %d\\n\", mbc->dst_fmt.type);\n+        status = MEDIABUFS_ERROR_OPERATION_FAILED;\n+    }\n+\n+    if (set_stream(mbc->vfd, mbc->src_fmt.type, false) < 0) {\n+        request_log(\"Failed to set stream off src type %d\\n\", mbc->src_fmt.type);\n+        status = MEDIABUFS_ERROR_OPERATION_FAILED;\n+    }\n+\n+    mbc->stream_on = false;\n+    return status;\n+}\n+\n+int mediabufs_ctl_set_ext_ctrls(struct mediabufs_ctl * mbc, struct media_request * const mreq, struct v4l2_ext_control control_array[], unsigned int n)\n+{\n+    struct v4l2_ext_controls controls = {\n+        .controls = control_array,\n+        .count = n\n+    };\n+\n+    if (mreq) {\n+        controls.which = V4L2_CTRL_WHICH_REQUEST_VAL;\n+        controls.request_fd = media_request_fd(mreq);\n+    }\n+\n+    while (ioctl(mbc->vfd, VIDIOC_S_EXT_CTRLS, &controls))\n+    {\n+        const int err = errno;\n+        if (err != EINTR) {\n+            request_err(mbc->dc, \"Unable to set controls: %s\\n\", strerror(err));\n+            return -err;\n+        }\n+    }\n+\n+    return 0;\n+}\n+\n+MediaBufsStatus mediabufs_set_ext_ctrl(struct mediabufs_ctl *const mbc,\n+                struct media_request * const mreq,\n+                unsigned int id, void *data,\n+                unsigned int size)\n+{\n+    struct v4l2_ext_control control = {\n+        .id = id,\n+        .ptr = data,\n+        .size = size\n+    };\n+\n+    int rv = mediabufs_ctl_set_ext_ctrls(mbc, mreq, &control, 1);\n+    return !rv ? MEDIABUFS_STATUS_SUCCESS : MEDIABUFS_ERROR_OPERATION_FAILED;\n+}\n+\n+MediaBufsStatus mediabufs_src_fmt_set(struct mediabufs_ctl *const mbc,\n+                                      enum v4l2_buf_type buf_type,\n+                   const uint32_t pixfmt,\n+                   const uint32_t width, const uint32_t height,\n+                                      const size_t bufsize)\n+{\n+    MediaBufsStatus rv = fmt_set(&mbc->src_fmt, mbc->vfd, buf_type, pixfmt, width, height, bufsize);\n+    if (rv != MEDIABUFS_STATUS_SUCCESS)\n+        request_err(mbc->dc, \"Failed to set src buftype %d, format %#x %dx%d\\n\", buf_type, pixfmt, width, height);\n+\n+    return rv;\n+}\n+\n+int mediabufs_ctl_query_ext_ctrls(struct mediabufs_ctl * mbc, struct v4l2_query_ext_ctrl ctrls[], unsigned int n)\n+{\n+    int rv = 0;\n+    while (n--) {\n+        while (ioctl(mbc->vfd, VIDIOC_QUERY_EXT_CTRL, ctrls)) {\n+            const int err = errno;\n+            if (err != EINTR) {\n+                // Often used for probing - errors are to be expected\n+                request_debug(mbc->dc, \"Failed to query ext id=%#x, err=%d\\n\", ctrls->id, err);\n+                ctrls->type = 0; // 0 is invalid\n+                rv = -err;\n+                break;\n+            }\n+        }\n+        ++ctrls;\n+    }\n+    return rv;\n+}\n+\n+int mediabufs_src_resizable(const struct mediabufs_ctl *const mbc)\n+{\n+#if 1\n+    return 0;\n+#else\n+    // Single planar OUTPUT can only take exact size buffers\n+    // Multiplanar will take larger than negotiated\n+    return V4L2_TYPE_IS_MULTIPLANAR(mbc->src_fmt.type);\n+#endif\n+}\n+\n+static void mediabufs_ctl_delete(struct mediabufs_ctl *const mbc)\n+{\n+    if (!mbc)\n+        return;\n+\n+    // Break the weak link first\n+    ff_weak_link_break(&mbc->this_wlm);\n+\n+    polltask_delete(&mbc->pt);\n+\n+    mediabufs_stream_off(mbc);\n+\n+    // Empty v4l2 buffer stash\n+    request_buffers(mbc->vfd, mbc->src_fmt.type, V4L2_MEMORY_MMAP, 0);\n+    request_buffers(mbc->vfd, mbc->dst_fmt.type, V4L2_MEMORY_MMAP, 0);\n+\n+    bq_free_all_free_src(mbc->src);\n+    bq_free_all_inuse_src(mbc->src);\n+    bq_free_all_free_dst(mbc->dst);\n+\n+    {\n+        struct qent_dst *dst_be;\n+        while ((dst_be = base_to_dst(bq_get_inuse(mbc->dst))) != NULL) {\n+            dst_be->base.timestamp = (struct timeval){0};\n+            dst_be->base.status = QENT_ERROR;\n+            qe_dst_done(dst_be);\n+        }\n+    }\n+\n+    queue_delete(mbc->dst);\n+    queue_delete(mbc->src);\n+    close(mbc->vfd);\n+    pthread_mutex_destroy(&mbc->lock);\n+\n+    free(mbc);\n+}\n+\n+struct mediabufs_ctl * mediabufs_ctl_ref(struct mediabufs_ctl *const mbc)\n+{\n+    atomic_fetch_add(&mbc->ref_count, 1);\n+    return mbc;\n+}\n+\n+void mediabufs_ctl_unref(struct mediabufs_ctl **const pmbc)\n+{\n+    struct mediabufs_ctl *const mbc = *pmbc;\n+    int n;\n+\n+    if (!mbc)\n+        return;\n+    *pmbc = NULL;\n+    n = atomic_fetch_sub(&mbc->ref_count, 1);\n+    if (n)\n+        return;\n+    mediabufs_ctl_delete(mbc);\n+}\n+\n+unsigned int mediabufs_ctl_driver_version(struct mediabufs_ctl *const mbc)\n+{\n+    return mbc->capability.version;\n+}\n+\n+static int set_capabilities(struct mediabufs_ctl *const mbc)\n+{\n+    uint32_t caps;\n+\n+    if (ioctl(mbc->vfd, VIDIOC_QUERYCAP, &mbc->capability)) {\n+        int err = errno;\n+        request_err(mbc->dc, \"Failed to get capabilities: %s\\n\", strerror(err));\n+        return -err;\n+    }\n+\n+    caps = (mbc->capability.capabilities & V4L2_CAP_DEVICE_CAPS) != 0 ?\n+            mbc->capability.device_caps :\n+            mbc->capability.capabilities;\n+\n+    if ((caps & V4L2_CAP_VIDEO_M2M_MPLANE) != 0) {\n+        mbc->src_fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;\n+        mbc->dst_fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;\n+    }\n+    else if ((caps & V4L2_CAP_VIDEO_M2M) != 0) {\n+        mbc->src_fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT;\n+        mbc->dst_fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;\n+    }\n+    else {\n+        request_err(mbc->dc, \"No M2M capabilities (%#x)\\n\", caps);\n+        return -EINVAL;\n+    }\n+\n+    return 0;\n+}\n+\n+/* One of these per context */\n+struct mediabufs_ctl * mediabufs_ctl_new(void * const dc, const char * vpath, struct pollqueue *const pq)\n+{\n+    struct mediabufs_ctl *const mbc = calloc(1, sizeof(*mbc));\n+\n+    if (!mbc)\n+        return NULL;\n+\n+    mbc->dc = dc;\n+    // Default mono planar\n+    mbc->pq = pq;\n+    pthread_mutex_init(&mbc->lock, NULL);\n+\n+    /* Pick a default  - could we scan for this? */\n+    if (vpath == NULL)\n+        vpath = \"/dev/media0\";\n+\n+    while ((mbc->vfd = open(vpath, O_RDWR)) == -1)\n+    {\n+        const int err = errno;\n+        if (err != EINTR) {\n+            request_err(dc, \"Failed to open video dev '%s': %s\\n\", vpath, strerror(err));\n+            goto fail0;\n+        }\n+    }\n+\n+    if (set_capabilities(mbc)) {\n+        request_err(dc, \"Bad capabilities for video dev '%s'\\n\", vpath);\n+        goto fail1;\n+    }\n+\n+    mbc->src = queue_new(mbc->vfd);\n+    if (!mbc->src)\n+        goto fail1;\n+    mbc->dst = queue_new(mbc->vfd);\n+    if (!mbc->dst)\n+        goto fail2;\n+    mbc->pt = polltask_new(pq, mbc->vfd, POLLIN | POLLOUT, mediabufs_poll_cb, mbc);\n+    if (!mbc->pt)\n+        goto fail3;\n+    mbc->this_wlm = ff_weak_link_new(mbc);\n+    if (!mbc->this_wlm)\n+        goto fail4;\n+\n+    /* Cannot add polltask now - polling with nothing pending\n+     * generates infinite error polls\n+    */\n+    return mbc;\n+\n+fail4:\n+    polltask_delete(&mbc->pt);\n+fail3:\n+    queue_delete(mbc->dst);\n+fail2:\n+    queue_delete(mbc->src);\n+fail1:\n+    close(mbc->vfd);\n+fail0:\n+    free(mbc);\n+    request_info(dc, \"%s: FAILED\\n\", __func__);\n+    return NULL;\n+}\n+\n+\n+\ndiff --git a/libavcodec/v4l2_req_media.h b/libavcodec/v4l2_req_media.h\nnew file mode 100644\nindex 0000000000..890947b2e2\n--- /dev/null\n+++ b/libavcodec/v4l2_req_media.h\n@@ -0,0 +1,171 @@\n+/*\n+e.h\n+*\n+ * Permission is hereby granted, free of charge, to any person obtaining a\n+ * copy of this software and associated documentation files (the\n+ * \"Software\"), to deal in the Software without restriction, including\n+ * without limitation the rights to use, copy, modify, merge, publish,\n+ * distribute, sub license, and/or sell copies of the Software, and to\n+ * permit persons to whom the Software is furnished to do so, subject to\n+ * the following conditions:\n+ *\n+ * The above copyright notice and this permission notice (including the\n+ * next paragraph) shall be included in all copies or substantial portions\n+ * of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\n+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR\n+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n+ */\n+\n+#ifndef _MEDIA_H_\n+#define _MEDIA_H_\n+\n+#include <stdbool.h>\n+#include <stdint.h>\n+\n+struct v4l2_format;\n+struct v4l2_fmtdesc;\n+struct v4l2_query_ext_ctrl;\n+\n+struct pollqueue;\n+struct media_request;\n+struct media_pool;\n+\n+typedef enum media_buf_status {\n+    MEDIABUFS_STATUS_SUCCESS = 0,\n+    MEDIABUFS_ERROR_OPERATION_FAILED,\n+    MEDIABUFS_ERROR_DECODING_ERROR,\n+    MEDIABUFS_ERROR_UNSUPPORTED_BUFFERTYPE,\n+    MEDIABUFS_ERROR_UNSUPPORTED_RT_FORMAT,\n+    MEDIABUFS_ERROR_ALLOCATION_FAILED,\n+    MEDIABUFS_ERROR_UNSUPPORTED_MEMORY,\n+} MediaBufsStatus;\n+\n+struct media_pool * media_pool_new(const char * const media_path,\n+                   struct pollqueue * const pq,\n+                   const unsigned int n);\n+void media_pool_delete(struct media_pool ** pmp);\n+\n+// Obtain a media request\n+// Will block if none availible - has a 2sec timeout\n+struct media_request * media_request_get(struct media_pool * const mp);\n+int media_request_fd(const struct media_request * const req);\n+\n+// Start this request\n+// Request structure is returned to pool once done\n+int media_request_start(struct media_request * const req);\n+\n+// Return an *unstarted* media_request to the pool\n+// May later be upgraded to allow for aborting a started req\n+int media_request_abort(struct media_request ** const preq);\n+\n+\n+struct mediabufs_ctl;\n+struct qent_src;\n+struct qent_dst;\n+struct dmabuf_h;\n+struct dmabufs_ctl;\n+\n+// 1-1 mammping to V4L2 type - just defined separetely to avoid some include versioning difficulties\n+enum mediabufs_memory {\n+   MEDIABUFS_MEMORY_UNSET            = 0,\n+   MEDIABUFS_MEMORY_MMAP             = 1,\n+   MEDIABUFS_MEMORY_USERPTR          = 2,\n+   MEDIABUFS_MEMORY_OVERLAY          = 3,\n+   MEDIABUFS_MEMORY_DMABUF           = 4,\n+};\n+\n+int qent_src_params_set(struct qent_src *const be, const struct timeval * timestamp);\n+struct timeval qent_dst_timestamp_get(const struct qent_dst *const be_dst);\n+\n+// prealloc\n+int qent_src_alloc(struct qent_src *const be_src, const size_t len, struct dmabufs_ctl * dbsc);\n+// dbsc may be NULL if realloc not required\n+int qent_src_data_copy(struct qent_src *const be_src, const size_t offset, const void *const src, const size_t len, struct dmabufs_ctl * dbsc);\n+const struct dmabuf_h * qent_dst_dmabuf(const struct qent_dst *const be, unsigned int plane);\n+int qent_dst_dup_fd(const struct qent_dst *const be, unsigned int plane);\n+MediaBufsStatus qent_dst_wait(struct qent_dst *const be);\n+void qent_dst_delete(struct qent_dst *const be);\n+// Returns a qent_dst to its mbc free Q or deletes it if the mbc is dead\n+void qent_dst_unref(struct qent_dst ** const pbe_dst);\n+struct qent_dst * qent_dst_ref(struct qent_dst * const be_dst);\n+\n+const uint8_t * qent_dst_data(struct qent_dst *const be, unsigned int buf_no);\n+MediaBufsStatus qent_dst_read_start(struct qent_dst *const be);\n+MediaBufsStatus qent_dst_read_stop(struct qent_dst *const be);\n+/* Import an fd unattached to any mediabuf */\n+MediaBufsStatus qent_dst_import_fd(struct qent_dst *const be_dst,\n+                unsigned int plane,\n+                int fd, size_t size);\n+\n+const char * mediabufs_memory_name(const enum mediabufs_memory m);\n+\n+MediaBufsStatus mediabufs_start_request(struct mediabufs_ctl *const mbc,\n+                struct media_request **const pmreq,\n+                struct qent_src **const psrc_be,\n+                struct qent_dst *const dst_be,\n+                const bool is_final);\n+// Get / alloc a dst buffer & associate with a slot\n+// If the dst pool is empty then behaviour depends on the fixed flag passed to\n+// dst_slots_create.  Default is !fixed = unlimited alloc\n+struct qent_dst* mediabufs_dst_qent_alloc(struct mediabufs_ctl *const mbc,\n+                           struct dmabufs_ctl *const dbsc);\n+// Create dst slots without alloc\n+// If fixed true then qent_alloc will only get slots from this pool and will\n+// block until a qent has been unrefed\n+MediaBufsStatus mediabufs_dst_slots_create(struct mediabufs_ctl *const mbc, const unsigned int n, const bool fixed, const enum mediabufs_memory memtype);\n+\n+MediaBufsStatus mediabufs_stream_on(struct mediabufs_ctl *const mbc);\n+MediaBufsStatus mediabufs_stream_off(struct mediabufs_ctl *const mbc);\n+const struct v4l2_format *mediabufs_dst_fmt(struct mediabufs_ctl *const mbc);\n+\n+typedef int mediabufs_dst_fmt_accept_fn(void * v, const struct v4l2_fmtdesc *fmtdesc);\n+\n+MediaBufsStatus mediabufs_dst_fmt_set(struct mediabufs_ctl *const mbc,\n+               const unsigned int width,\n+               const unsigned int height,\n+               mediabufs_dst_fmt_accept_fn *const accept_fn,\n+               void *const accept_v);\n+struct qent_src *mediabufs_src_qent_get(struct mediabufs_ctl *const mbc);\n+void mediabufs_src_qent_abort(struct mediabufs_ctl *const mbc, struct qent_src **const pqe_src);\n+\n+int mediabufs_ctl_set_ext_ctrls(struct mediabufs_ctl * mbc, struct media_request * const mreq,\n+                                struct v4l2_ext_control control_array[], unsigned int n);\n+MediaBufsStatus mediabufs_set_ext_ctrl(struct mediabufs_ctl *const mbc,\n+                struct media_request * const mreq,\n+                unsigned int id, void *data,\n+                unsigned int size);\n+int mediabufs_ctl_query_ext_ctrls(struct mediabufs_ctl * mbc, struct v4l2_query_ext_ctrl ctrls[], unsigned int n);\n+\n+int mediabufs_src_resizable(const struct mediabufs_ctl *const mbc);\n+\n+MediaBufsStatus mediabufs_src_fmt_set(struct mediabufs_ctl *const mbc,\n+                                      enum v4l2_buf_type buf_type,\n+                                      const uint32_t pixfmt,\n+                                      const uint32_t width, const uint32_t height,\n+                                      const size_t bufsize);\n+\n+MediaBufsStatus mediabufs_src_pool_create(struct mediabufs_ctl *const rw,\n+                  struct dmabufs_ctl * const dbsc,\n+                  unsigned int n,\n+                  const enum mediabufs_memory memtype);\n+\n+// Want to have appropriate formats set first\n+MediaBufsStatus mediabufs_src_chk_memtype(struct mediabufs_ctl *const mbc, const enum mediabufs_memory memtype);\n+MediaBufsStatus mediabufs_dst_chk_memtype(struct mediabufs_ctl *const mbc, const enum mediabufs_memory memtype);\n+\n+#define MEDIABUFS_DRIVER_VERSION(a, b, c) (((a) << 16) | ((b) << 8) | (c))\n+unsigned int mediabufs_ctl_driver_version(struct mediabufs_ctl *const mbc);\n+\n+struct mediabufs_ctl * mediabufs_ctl_new(void * const dc,\n+                     const char *vpath, struct pollqueue *const pq);\n+void mediabufs_ctl_unref(struct mediabufs_ctl **const pmbc);\n+struct mediabufs_ctl * mediabufs_ctl_ref(struct mediabufs_ctl *const mbc);\n+\n+\n+#endif\ndiff --git a/libavcodec/v4l2_req_pollqueue.c b/libavcodec/v4l2_req_pollqueue.c\nnew file mode 100644\nindex 0000000000..cc8a5d4001\n--- /dev/null\n+++ b/libavcodec/v4l2_req_pollqueue.c\n@@ -0,0 +1,361 @@\n+#include <errno.h>\n+#include <limits.h>\n+#include <poll.h>\n+#include <pthread.h>\n+#include <semaphore.h>\n+#include <stdatomic.h>\n+#include <stdbool.h>\n+#include <stdlib.h>\n+#include <stdint.h>\n+#include <stdio.h>\n+#include <string.h>\n+#include <unistd.h>\n+#include <sys/eventfd.h>\n+\n+#include \"v4l2_req_pollqueue.h\"\n+#include \"v4l2_req_utils.h\"\n+\n+\n+struct pollqueue;\n+\n+enum polltask_state {\n+    POLLTASK_UNQUEUED = 0,\n+    POLLTASK_QUEUED,\n+    POLLTASK_RUNNING,\n+    POLLTASK_Q_KILL,\n+    POLLTASK_RUN_KILL,\n+};\n+\n+struct polltask {\n+    struct polltask *next;\n+    struct polltask *prev;\n+    struct pollqueue *q;\n+    enum polltask_state state;\n+\n+    int fd;\n+    short events;\n+\n+    void (*fn)(void *v, short revents);\n+    void * v;\n+\n+    uint64_t timeout; /* CLOCK_MONOTONIC time, 0 => never */\n+    sem_t kill_sem;\n+};\n+\n+struct pollqueue {\n+    atomic_int ref_count;\n+    pthread_mutex_t lock;\n+\n+    struct polltask *head;\n+    struct polltask *tail;\n+\n+    bool kill;\n+    bool no_prod;\n+    int prod_fd;\n+    struct polltask *prod_pt;\n+    pthread_t worker;\n+};\n+\n+struct polltask *polltask_new(struct pollqueue *const pq,\n+                              const int fd, const short events,\n+                  void (*const fn)(void *v, short revents),\n+                  void *const v)\n+{\n+    struct polltask *pt;\n+\n+    if (!events)\n+        return NULL;\n+\n+    pt = malloc(sizeof(*pt));\n+    if (!pt)\n+        return NULL;\n+\n+    *pt = (struct polltask){\n+        .next = NULL,\n+        .prev = NULL,\n+        .q = pollqueue_ref(pq),\n+        .fd = fd,\n+        .events = events,\n+        .fn = fn,\n+        .v = v\n+    };\n+\n+    sem_init(&pt->kill_sem, 0, 0);\n+\n+    return pt;\n+}\n+\n+static void pollqueue_rem_task(struct pollqueue *const pq, struct polltask *const pt)\n+{\n+    if (pt->prev)\n+        pt->prev->next = pt->next;\n+    else\n+        pq->head = pt->next;\n+    if (pt->next)\n+        pt->next->prev = pt->prev;\n+    else\n+        pq->tail = pt->prev;\n+    pt->next = NULL;\n+    pt->prev = NULL;\n+}\n+\n+static void polltask_free(struct polltask * const pt)\n+{\n+    sem_destroy(&pt->kill_sem);\n+    free(pt);\n+}\n+\n+static int pollqueue_prod(const struct pollqueue *const pq)\n+{\n+    static const uint64_t one = 1;\n+    return write(pq->prod_fd, &one, sizeof(one));\n+}\n+\n+void polltask_delete(struct polltask **const ppt)\n+{\n+    struct polltask *const pt = *ppt;\n+    struct pollqueue * pq;\n+    enum polltask_state state;\n+    bool prodme;\n+\n+    if (!pt)\n+        return;\n+\n+    pq = pt->q;\n+    pthread_mutex_lock(&pq->lock);\n+    state = pt->state;\n+    pt->state = (state == POLLTASK_RUNNING) ? POLLTASK_RUN_KILL : POLLTASK_Q_KILL;\n+    prodme = !pq->no_prod;\n+    pthread_mutex_unlock(&pq->lock);\n+\n+    if (state != POLLTASK_UNQUEUED) {\n+        if (prodme)\n+            pollqueue_prod(pq);\n+        while (sem_wait(&pt->kill_sem) && errno == EINTR)\n+            /* loop */;\n+    }\n+\n+    // Leave zapping the ref until we have DQed the PT as might well be\n+    // legitimately used in it\n+    *ppt = NULL;\n+    polltask_free(pt);\n+    pollqueue_unref(&pq);\n+}\n+\n+static uint64_t pollqueue_now(int timeout)\n+{\n+    struct timespec now;\n+    uint64_t now_ms;\n+\n+    if (clock_gettime(CLOCK_MONOTONIC, &now))\n+        return 0;\n+    now_ms = (now.tv_nsec / 1000000) + (uint64_t)now.tv_sec * 1000 + timeout;\n+    return now_ms ? now_ms : (uint64_t)1;\n+}\n+\n+void pollqueue_add_task(struct polltask *const pt, const int timeout)\n+{\n+    bool prodme = false;\n+    struct pollqueue * const pq = pt->q;\n+\n+    pthread_mutex_lock(&pq->lock);\n+    if (pt->state != POLLTASK_Q_KILL && pt->state != POLLTASK_RUN_KILL) {\n+        if (pq->tail)\n+            pq->tail->next = pt;\n+        else\n+            pq->head = pt;\n+        pt->prev = pq->tail;\n+        pt->next = NULL;\n+        pt->state = POLLTASK_QUEUED;\n+        pt->timeout = timeout < 0 ? 0 : pollqueue_now(timeout);\n+        pq->tail = pt;\n+        prodme = !pq->no_prod;\n+    }\n+    pthread_mutex_unlock(&pq->lock);\n+    if (prodme)\n+        pollqueue_prod(pq);\n+}\n+\n+static void *poll_thread(void *v)\n+{\n+    struct pollqueue *const pq = v;\n+    struct pollfd *a = NULL;\n+    size_t asize = 0;\n+\n+    pthread_mutex_lock(&pq->lock);\n+    do {\n+        unsigned int i;\n+        unsigned int n = 0;\n+        struct polltask *pt;\n+        struct polltask *pt_next;\n+        uint64_t now = pollqueue_now(0);\n+        int timeout = -1;\n+        int rv;\n+\n+        for (pt = pq->head; pt; pt = pt_next) {\n+            int64_t t;\n+\n+            pt_next = pt->next;\n+\n+            if (pt->state == POLLTASK_Q_KILL) {\n+                pollqueue_rem_task(pq, pt);\n+                sem_post(&pt->kill_sem);\n+                continue;\n+            }\n+\n+            if (n >= asize) {\n+                asize = asize ? asize * 2 : 4;\n+                a = realloc(a, asize * sizeof(*a));\n+                if (!a) {\n+                    request_log(\"Failed to realloc poll array to %zd\\n\", asize);\n+                    goto fail_locked;\n+                }\n+            }\n+\n+            a[n++] = (struct pollfd){\n+                .fd = pt->fd,\n+                .events = pt->events\n+            };\n+\n+            t = (int64_t)(pt->timeout - now);\n+            if (pt->timeout && t < INT_MAX &&\n+                (timeout < 0 || (int)t < timeout))\n+                timeout = (t < 0) ? 0 : (int)t;\n+        }\n+        pthread_mutex_unlock(&pq->lock);\n+\n+        if ((rv = poll(a, n, timeout)) == -1) {\n+            if (errno != EINTR) {\n+                request_log(\"Poll error: %s\\n\", strerror(errno));\n+                goto fail_unlocked;\n+            }\n+        }\n+\n+        pthread_mutex_lock(&pq->lock);\n+        now = pollqueue_now(0);\n+\n+        /* Prodding in this loop is pointless and might lead to\n+         * infinite looping\n+        */\n+        pq->no_prod = true;\n+        for (i = 0, pt = pq->head; i < n; ++i, pt = pt_next) {\n+            pt_next = pt->next;\n+\n+            /* Pending? */\n+            if (a[i].revents ||\n+                (pt->timeout && (int64_t)(now - pt->timeout) >= 0)) {\n+                pollqueue_rem_task(pq, pt);\n+                if (pt->state == POLLTASK_QUEUED)\n+                    pt->state = POLLTASK_RUNNING;\n+                if (pt->state == POLLTASK_Q_KILL)\n+                    pt->state = POLLTASK_RUN_KILL;\n+                pthread_mutex_unlock(&pq->lock);\n+\n+                /* This can add new entries to the Q but as\n+                 * those are added to the tail our existing\n+                 * chain remains intact\n+                */\n+                pt->fn(pt->v, a[i].revents);\n+\n+                pthread_mutex_lock(&pq->lock);\n+                if (pt->state == POLLTASK_RUNNING)\n+                    pt->state = POLLTASK_UNQUEUED;\n+                if (pt->state == POLLTASK_RUN_KILL)\n+                    sem_post(&pt->kill_sem);\n+            }\n+        }\n+        pq->no_prod = false;\n+\n+    } while (!pq->kill);\n+\n+fail_locked:\n+    pthread_mutex_unlock(&pq->lock);\n+fail_unlocked:\n+    free(a);\n+    return NULL;\n+}\n+\n+static void prod_fn(void *v, short revents)\n+{\n+    struct pollqueue *const pq = v;\n+    char buf[8];\n+    if (revents)\n+        read(pq->prod_fd, buf, 8);\n+    if (!pq->kill)\n+        pollqueue_add_task(pq->prod_pt, -1);\n+}\n+\n+struct pollqueue * pollqueue_new(void)\n+{\n+    struct pollqueue *pq = malloc(sizeof(*pq));\n+    if (!pq)\n+        return NULL;\n+    *pq = (struct pollqueue){\n+        .ref_count = ATOMIC_VAR_INIT(0),\n+        .lock = PTHREAD_MUTEX_INITIALIZER,\n+        .head = NULL,\n+        .tail = NULL,\n+        .kill = false,\n+        .prod_fd = -1\n+    };\n+\n+    pq->prod_fd = eventfd(0, EFD_NONBLOCK);\n+    if (pq->prod_fd == 1)\n+        goto fail1;\n+    pq->prod_pt = polltask_new(pq, pq->prod_fd, POLLIN, prod_fn, pq);\n+    if (!pq->prod_pt)\n+        goto fail2;\n+    pollqueue_add_task(pq->prod_pt, -1);\n+    if (pthread_create(&pq->worker, NULL, poll_thread, pq))\n+        goto fail3;\n+    // Reset ref count which will have been inced by the add_task\n+    atomic_store(&pq->ref_count, 0);\n+    return pq;\n+\n+fail3:\n+    polltask_free(pq->prod_pt);\n+fail2:\n+    close(pq->prod_fd);\n+fail1:\n+    free(pq);\n+    return NULL;\n+}\n+\n+static void pollqueue_free(struct pollqueue *const pq)\n+{\n+    void *rv;\n+\n+    pthread_mutex_lock(&pq->lock);\n+    pq->kill = true;\n+    pollqueue_prod(pq);\n+    pthread_mutex_unlock(&pq->lock);\n+\n+    pthread_join(pq->worker, &rv);\n+    polltask_free(pq->prod_pt);\n+    pthread_mutex_destroy(&pq->lock);\n+    close(pq->prod_fd);\n+    free(pq);\n+}\n+\n+struct pollqueue * pollqueue_ref(struct pollqueue *const pq)\n+{\n+    atomic_fetch_add(&pq->ref_count, 1);\n+    return pq;\n+}\n+\n+void pollqueue_unref(struct pollqueue **const ppq)\n+{\n+    struct pollqueue * const pq = *ppq;\n+\n+    if (!pq)\n+        return;\n+    *ppq = NULL;\n+\n+    if (atomic_fetch_sub(&pq->ref_count, 1) != 0)\n+        return;\n+\n+    pollqueue_free(pq);\n+}\n+\n+\n+\ndiff --git a/libavcodec/v4l2_req_pollqueue.h b/libavcodec/v4l2_req_pollqueue.h\nnew file mode 100644\nindex 0000000000..e1182cb2fc\n--- /dev/null\n+++ b/libavcodec/v4l2_req_pollqueue.h\n@@ -0,0 +1,18 @@\n+#ifndef POLLQUEUE_H_\n+#define POLLQUEUE_H_\n+\n+struct polltask;\n+struct pollqueue;\n+\n+struct polltask *polltask_new(struct pollqueue *const pq,\n+\t\t\t      const int fd, const short events,\n+\t\t\t      void (*const fn)(void *v, short revents),\n+\t\t\t      void *const v);\n+void polltask_delete(struct polltask **const ppt);\n+\n+void pollqueue_add_task(struct polltask *const pt, const int timeout);\n+struct pollqueue * pollqueue_new(void);\n+void pollqueue_unref(struct pollqueue **const ppq);\n+struct pollqueue * pollqueue_ref(struct pollqueue *const pq);\n+\n+#endif /* POLLQUEUE_H_ */\ndiff --git a/libavcodec/v4l2_req_utils.h b/libavcodec/v4l2_req_utils.h\nnew file mode 100644\nindex 0000000000..a31cc1f4ec\n--- /dev/null\n+++ b/libavcodec/v4l2_req_utils.h\n@@ -0,0 +1,27 @@\n+#ifndef AVCODEC_V4L2_REQ_UTILS_H\n+#define AVCODEC_V4L2_REQ_UTILS_H\n+\n+#include <stdint.h>\n+#include \"libavutil/log.h\"\n+\n+#define request_log(...) av_log(NULL, AV_LOG_INFO, __VA_ARGS__)\n+\n+#define request_err(_ctx, ...) av_log(_ctx, AV_LOG_ERROR, __VA_ARGS__)\n+#define request_warn(_ctx, ...) av_log(_ctx, AV_LOG_WARNING, __VA_ARGS__)\n+#define request_info(_ctx, ...) av_log(_ctx, AV_LOG_INFO, __VA_ARGS__)\n+#define request_debug(_ctx, ...) av_log(_ctx, AV_LOG_DEBUG, __VA_ARGS__)\n+\n+static inline char safechar(char c) {\n+    return c > 0x20 && c < 0x7f ? c : '.';\n+}\n+\n+static inline const char * strfourcc(char tbuf[5], uint32_t fcc) {\n+    tbuf[0] = safechar((fcc >>  0) & 0xff);\n+    tbuf[1] = safechar((fcc >>  8) & 0xff);\n+    tbuf[2] = safechar((fcc >> 16) & 0xff);\n+    tbuf[3] = safechar((fcc >> 24) & 0xff);\n+    tbuf[4] = '\\0';\n+    return tbuf;\n+}\n+\n+#endif\ndiff --git a/libavcodec/v4l2_request_hevc.c b/libavcodec/v4l2_request_hevc.c\nnew file mode 100644\nindex 0000000000..fbec16a93e\n--- /dev/null\n+++ b/libavcodec/v4l2_request_hevc.c\n@@ -0,0 +1,347 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+\n+#include \"config.h\"\n+#include \"decode.h\"\n+#include \"hevcdec.h\"\n+#include \"hwconfig.h\"\n+\n+#include \"v4l2_request_hevc.h\"\n+\n+#include \"libavutil/hwcontext_drm.h\"\n+#include \"libavutil/pixdesc.h\"\n+\n+#include \"v4l2_req_devscan.h\"\n+#include \"v4l2_req_dmabufs.h\"\n+#include \"v4l2_req_pollqueue.h\"\n+#include \"v4l2_req_media.h\"\n+#include \"v4l2_req_utils.h\"\n+\n+static size_t bit_buf_size(unsigned int w, unsigned int h, unsigned int bits_minus8)\n+{\n+    const size_t wxh = w * h;\n+    size_t bits_alloc;\n+\n+    /* Annex A gives a min compression of 2 @ lvl 3.1\n+     * (wxh <= 983040) and min 4 thereafter but avoid\n+     * the odity of 983041 having a lower limit than\n+     * 983040.\n+     * Multiply by 3/2 for 4:2:0\n+     */\n+    bits_alloc = wxh < 983040 ? wxh * 3 / 4 :\n+        wxh < 983040 * 2 ? 983040 * 3 / 4 :\n+        wxh * 3 / 8;\n+    /* Allow for bit depth */\n+    bits_alloc += (bits_alloc * bits_minus8) / 8;\n+    /* Add a few bytes (16k) for overhead */\n+    bits_alloc += 0x4000;\n+    return bits_alloc;\n+}\n+\n+static int v4l2_req_hevc_start_frame(AVCodecContext *avctx,\n+                                     av_unused const uint8_t *buffer,\n+                                     av_unused uint32_t size)\n+{\n+    const V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data;\n+    return ctx->fns->start_frame(avctx, buffer, size);\n+}\n+\n+static int v4l2_req_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)\n+{\n+    V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data;\n+    return ctx->fns->decode_slice(avctx, buffer, size);\n+}\n+\n+static int v4l2_req_hevc_end_frame(AVCodecContext *avctx)\n+{\n+    V4L2RequestContextHEVC *ctx = avctx->internal->hwaccel_priv_data;\n+    return ctx->fns->end_frame(avctx);\n+}\n+\n+static void v4l2_req_hevc_abort_frame(AVCodecContext * const avctx)\n+{\n+    V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data;\n+    ctx->fns->abort_frame(avctx);\n+}\n+\n+static int v4l2_req_hevc_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)\n+{\n+    V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data;\n+    return ctx->fns->frame_params(avctx, hw_frames_ctx);\n+}\n+\n+static int v4l2_req_hevc_alloc_frame(AVCodecContext * avctx, AVFrame *frame)\n+{\n+    V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data;\n+    return ctx->fns->alloc_frame(avctx, frame);\n+}\n+\n+\n+static int v4l2_request_hevc_uninit(AVCodecContext *avctx)\n+{\n+    V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data;\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"<<< %s\\n\", __func__);\n+\n+    decode_q_wait(&ctx->decode_q, NULL);  // Wait for all other threads to be out of decode\n+\n+    mediabufs_ctl_unref(&ctx->mbufs);\n+    media_pool_delete(&ctx->mpool);\n+    pollqueue_unref(&ctx->pq);\n+    dmabufs_ctl_unref(&ctx->dbufs);\n+    devscan_delete(&ctx->devscan);\n+\n+    decode_q_uninit(&ctx->decode_q);\n+\n+//    if (avctx->hw_frames_ctx) {\n+//        AVHWFramesContext *hwfc = (AVHWFramesContext*)avctx->hw_frames_ctx->data;\n+//        av_buffer_pool_flush(hwfc->pool);\n+//    }\n+    return 0;\n+}\n+\n+static int dst_fmt_accept_cb(void * v, const struct v4l2_fmtdesc *fmtdesc)\n+{\n+    AVCodecContext *const avctx = v;\n+    const HEVCContext *const h = avctx->priv_data;\n+\n+    if (h->ps.sps->bit_depth == 8) {\n+        if (fmtdesc->pixelformat == V4L2_PIX_FMT_NV12_COL128 ||\n+            fmtdesc->pixelformat == V4L2_PIX_FMT_NV12) {\n+            return 1;\n+        }\n+    }\n+    else if (h->ps.sps->bit_depth == 10) {\n+        if (fmtdesc->pixelformat == V4L2_PIX_FMT_NV12_10_COL128) {\n+            return 1;\n+        }\n+    }\n+    return 0;\n+}\n+\n+static int v4l2_request_hevc_init(AVCodecContext *avctx)\n+{\n+    const HEVCContext *h = avctx->priv_data;\n+    V4L2RequestContextHEVC * const ctx = avctx->internal->hwaccel_priv_data;\n+    const HEVCSPS * const sps = h->ps.sps;\n+    int ret;\n+    const struct decdev * decdev;\n+    const uint32_t src_pix_fmt = V2(ff_v4l2_req_hevc, 4).src_pix_fmt_v4l2;  // Assuming constant for all APIs but avoiding V4L2 includes\n+    size_t src_size;\n+    enum mediabufs_memory src_memtype;\n+    enum mediabufs_memory dst_memtype;\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"<<< %s\\n\", __func__);\n+\n+    // Give up immediately if this is something that we have no code to deal with\n+    if (h->ps.sps->chroma_format_idc != 1) {\n+        av_log(avctx, AV_LOG_WARNING, \"chroma_format_idc(%d) != 1: Not implemented\\n\", h->ps.sps->chroma_format_idc);\n+        return AVERROR_PATCHWELCOME;\n+    }\n+    if (!(h->ps.sps->bit_depth == 10 || h->ps.sps->bit_depth == 8) ||\n+        h->ps.sps->bit_depth != h->ps.sps->bit_depth_chroma) {\n+        av_log(avctx, AV_LOG_WARNING, \"Bit depth Y:%d C:%d: Not implemented\\n\", h->ps.sps->bit_depth, h->ps.sps->bit_depth_chroma);\n+        return AVERROR_PATCHWELCOME;\n+    }\n+\n+    if ((ret = devscan_build(avctx, &ctx->devscan)) != 0) {\n+        av_log(avctx, AV_LOG_WARNING, \"Failed to find any V4L2 devices\\n\");\n+        return (AVERROR(-ret));\n+    }\n+    ret = AVERROR(ENOMEM);  // Assume mem fail by default for these\n+\n+    if ((decdev = devscan_find(ctx->devscan, src_pix_fmt)) == NULL)\n+    {\n+        av_log(avctx, AV_LOG_WARNING, \"Failed to find a V4L2 device for H265\\n\");\n+        ret = AVERROR(ENODEV);\n+        goto fail0;\n+    }\n+    av_log(avctx, AV_LOG_DEBUG, \"Trying V4L2 devices: %s,%s\\n\",\n+           decdev_media_path(decdev), decdev_video_path(decdev));\n+\n+    if ((ctx->dbufs = dmabufs_ctl_new()) == NULL) {\n+        av_log(avctx, AV_LOG_DEBUG, \"Unable to open dmabufs - try mmap buffers\\n\");\n+        src_memtype = MEDIABUFS_MEMORY_MMAP;\n+        dst_memtype = MEDIABUFS_MEMORY_MMAP;\n+    }\n+    else {\n+        av_log(avctx, AV_LOG_DEBUG, \"Dmabufs opened - try dmabuf buffers\\n\");\n+        src_memtype = MEDIABUFS_MEMORY_DMABUF;\n+        dst_memtype = MEDIABUFS_MEMORY_DMABUF;\n+    }\n+\n+    if ((ctx->pq = pollqueue_new()) == NULL) {\n+        av_log(avctx, AV_LOG_ERROR, \"Unable to create pollqueue\\n\");\n+        goto fail1;\n+    }\n+\n+    if ((ctx->mpool = media_pool_new(decdev_media_path(decdev), ctx->pq, 4)) == NULL) {\n+        av_log(avctx, AV_LOG_ERROR, \"Unable to create media pool\\n\");\n+        goto fail2;\n+    }\n+\n+    if ((ctx->mbufs = mediabufs_ctl_new(avctx, decdev_video_path(decdev), ctx->pq)) == NULL) {\n+        av_log(avctx, AV_LOG_ERROR, \"Unable to create media controls\\n\");\n+        goto fail3;\n+    }\n+\n+    // Ask for an initial bitbuf size of max size / 4\n+    // We will realloc if we need more\n+    // Must use sps->h/w as avctx contains cropped size\n+retry_src_memtype:\n+    src_size = bit_buf_size(sps->width, sps->height, sps->bit_depth - 8);\n+    if (src_memtype == MEDIABUFS_MEMORY_DMABUF && mediabufs_src_resizable(ctx->mbufs))\n+        src_size /= 4;\n+    // Kludge for conformance tests which break Annex A limits\n+    else if (src_size < 0x40000)\n+        src_size = 0x40000;\n+\n+    if (mediabufs_src_fmt_set(ctx->mbufs, decdev_src_type(decdev), src_pix_fmt,\n+                              sps->width, sps->height, src_size)) {\n+        char tbuf1[5];\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to set source format: %s %dx%d\\n\", strfourcc(tbuf1, src_pix_fmt), sps->width, sps->height);\n+        goto fail4;\n+    }\n+\n+    if (mediabufs_src_chk_memtype(ctx->mbufs, src_memtype)) {\n+        if (src_memtype == MEDIABUFS_MEMORY_DMABUF) {\n+            src_memtype = MEDIABUFS_MEMORY_MMAP;\n+            goto retry_src_memtype;\n+        }\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to get src memory type\\n\");\n+        goto fail4;\n+    }\n+\n+    if (V2(ff_v4l2_req_hevc, 4).probe(avctx, ctx) == 0) {\n+        av_log(avctx, AV_LOG_DEBUG, \"HEVC API version 4 probed successfully\\n\");\n+        ctx->fns = &V2(ff_v4l2_req_hevc, 4);\n+    }\n+#if CONFIG_V4L2_REQ_HEVC_VX\n+    else if (V2(ff_v4l2_req_hevc, 3).probe(avctx, ctx) == 0) {\n+        av_log(avctx, AV_LOG_DEBUG, \"HEVC API version 3 probed successfully\\n\");\n+        ctx->fns = &V2(ff_v4l2_req_hevc, 3);\n+    }\n+    else if (V2(ff_v4l2_req_hevc, 2).probe(avctx, ctx) == 0) {\n+        av_log(avctx, AV_LOG_DEBUG, \"HEVC API version 2 probed successfully\\n\");\n+        ctx->fns = &V2(ff_v4l2_req_hevc, 2);\n+    }\n+    else if (V2(ff_v4l2_req_hevc, 1).probe(avctx, ctx) == 0) {\n+        av_log(avctx, AV_LOG_DEBUG, \"HEVC API version 1 probed successfully\\n\");\n+        ctx->fns = &V2(ff_v4l2_req_hevc, 1);\n+    }\n+#endif\n+    else {\n+        av_log(avctx, AV_LOG_ERROR, \"No HEVC version probed successfully\\n\");\n+        ret = AVERROR(EINVAL);\n+        goto fail4;\n+    }\n+\n+    if (mediabufs_dst_fmt_set(ctx->mbufs, sps->width, sps->height, dst_fmt_accept_cb, avctx)) {\n+        char tbuf1[5];\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to set destination format: %s %dx%d\\n\", strfourcc(tbuf1, src_pix_fmt), sps->width, sps->height);\n+        goto fail4;\n+    }\n+\n+    if (mediabufs_src_pool_create(ctx->mbufs, ctx->dbufs, 6, src_memtype)) {\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to create source pool\\n\");\n+        goto fail4;\n+    }\n+\n+    {\n+        unsigned int dst_slots = sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering +\n+            avctx->thread_count + (avctx->extra_hw_frames > 0 ? avctx->extra_hw_frames : 6);\n+        av_log(avctx, AV_LOG_DEBUG, \"Slots=%d: Reordering=%d, threads=%d, hw+=%d\\n\", dst_slots,\n+               sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering,\n+               avctx->thread_count, avctx->extra_hw_frames);\n+\n+        if (mediabufs_dst_chk_memtype(ctx->mbufs, dst_memtype)) {\n+            if (dst_memtype != MEDIABUFS_MEMORY_DMABUF) {\n+                av_log(avctx, AV_LOG_ERROR, \"Failed to get dst memory type\\n\");\n+                goto fail4;\n+            }\n+            av_log(avctx, AV_LOG_DEBUG, \"Dst DMABUF not supported - trying mmap\\n\");\n+            dst_memtype = MEDIABUFS_MEMORY_MMAP;\n+        }\n+\n+        // extra_hw_frames is -1 if unset\n+        if (mediabufs_dst_slots_create(ctx->mbufs, dst_slots, (avctx->extra_hw_frames > 0), dst_memtype)) {\n+            av_log(avctx, AV_LOG_ERROR, \"Failed to create destination slots\\n\");\n+            goto fail4;\n+        }\n+    }\n+\n+    if (mediabufs_stream_on(ctx->mbufs)) {\n+        av_log(avctx, AV_LOG_ERROR, \"Failed stream on\\n\");\n+        goto fail4;\n+    }\n+\n+    if ((ret = ff_decode_get_hw_frames_ctx(avctx, AV_HWDEVICE_TYPE_DRM)) != 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to create frame ctx\\n\");\n+        goto fail4;\n+    }\n+\n+    if ((ret = ctx->fns->set_controls(avctx, ctx)) != 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"Failed set controls\\n\");\n+        goto fail5;\n+    }\n+\n+    decode_q_init(&ctx->decode_q);\n+\n+    // Set our s/w format\n+    avctx->sw_pix_fmt = ((AVHWFramesContext *)avctx->hw_frames_ctx->data)->sw_format;\n+\n+    av_log(avctx, AV_LOG_INFO, \"Hwaccel %s; devices: %s,%s; buffers: src %s, dst %s; swfmt=%s\\n\",\n+           ctx->fns->name,\n+           decdev_media_path(decdev), decdev_video_path(decdev),\n+           mediabufs_memory_name(src_memtype), mediabufs_memory_name(dst_memtype),\n+           av_get_pix_fmt_name(avctx->sw_pix_fmt));\n+\n+    return 0;\n+\n+fail5:\n+    av_buffer_unref(&avctx->hw_frames_ctx);\n+fail4:\n+    mediabufs_ctl_unref(&ctx->mbufs);\n+fail3:\n+    media_pool_delete(&ctx->mpool);\n+fail2:\n+    pollqueue_unref(&ctx->pq);\n+fail1:\n+    dmabufs_ctl_unref(&ctx->dbufs);\n+fail0:\n+    devscan_delete(&ctx->devscan);\n+    return ret;\n+}\n+\n+const AVHWAccel ff_hevc_v4l2request_hwaccel = {\n+    .name           = \"hevc_v4l2request\",\n+    .type           = AVMEDIA_TYPE_VIDEO,\n+    .id             = AV_CODEC_ID_HEVC,\n+    .pix_fmt        = AV_PIX_FMT_DRM_PRIME,\n+    .alloc_frame    = v4l2_req_hevc_alloc_frame,\n+    .start_frame    = v4l2_req_hevc_start_frame,\n+    .decode_slice   = v4l2_req_hevc_decode_slice,\n+    .end_frame      = v4l2_req_hevc_end_frame,\n+    .abort_frame    = v4l2_req_hevc_abort_frame,\n+    .init           = v4l2_request_hevc_init,\n+    .uninit         = v4l2_request_hevc_uninit,\n+    .priv_data_size = sizeof(V4L2RequestContextHEVC),\n+    .frame_params   = v4l2_req_hevc_frame_params,\n+    .caps_internal  = HWACCEL_CAP_ASYNC_SAFE | HWACCEL_CAP_MT_SAFE,\n+};\ndiff --git a/libavcodec/v4l2_request_hevc.h b/libavcodec/v4l2_request_hevc.h\nnew file mode 100644\nindex 0000000000..99c90064ea\n--- /dev/null\n+++ b/libavcodec/v4l2_request_hevc.h\n@@ -0,0 +1,102 @@\n+#ifndef AVCODEC_V4L2_REQUEST_HEVC_H\n+#define AVCODEC_V4L2_REQUEST_HEVC_H\n+\n+#include <stdint.h>\n+#include <drm_fourcc.h>\n+#include \"v4l2_req_decode_q.h\"\n+\n+#ifndef DRM_FORMAT_NV15\n+#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5')\n+#endif\n+\n+#ifndef DRM_FORMAT_NV20\n+#define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0')\n+#endif\n+\n+// P030 should be defined in drm_fourcc.h and hopefully will be sometime\n+// in the future but until then...\n+#ifndef DRM_FORMAT_P030\n+#define DRM_FORMAT_P030 fourcc_code('P', '0', '3', '0')\n+#endif\n+\n+#ifndef DRM_FORMAT_NV15\n+#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5')\n+#endif\n+\n+#ifndef DRM_FORMAT_NV20\n+#define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0')\n+#endif\n+\n+#include <linux/videodev2.h>\n+#ifndef V4L2_CID_CODEC_BASE\n+#define V4L2_CID_CODEC_BASE V4L2_CID_MPEG_BASE\n+#endif\n+\n+// V4L2_PIX_FMT_NV12_10_COL128 and V4L2_PIX_FMT_NV12_COL128 should be defined\n+// in drm_fourcc.h hopefully will be sometime in the future but until then...\n+#ifndef V4L2_PIX_FMT_NV12_10_COL128\n+#define V4L2_PIX_FMT_NV12_10_COL128 v4l2_fourcc('N', 'C', '3', '0')\n+#endif\n+\n+#ifndef V4L2_PIX_FMT_NV12_COL128\n+#define V4L2_PIX_FMT_NV12_COL128 v4l2_fourcc('N', 'C', '1', '2') /* 12  Y/CbCr 4:2:0 128 pixel wide column */\n+#endif\n+\n+#ifndef V4L2_CTRL_FLAG_DYNAMIC_ARRAY\n+#define V4L2_CTRL_FLAG_DYNAMIC_ARRAY\t0x0800\n+#endif\n+\n+#define VCAT(name, version) name##_v##version\n+#define V2(n,v) VCAT(n, v)\n+#define V(n) V2(n, HEVC_CTRLS_VERSION)\n+\n+#define S2(x) #x\n+#define STR(x) S2(x)\n+\n+// 1 per decoder\n+struct v4l2_req_decode_fns;\n+\n+typedef struct V4L2RequestContextHEVC {\n+//    V4L2RequestContext base;\n+    const struct v4l2_req_decode_fns * fns;\n+\n+    unsigned int timestamp;  // ?? maybe uint64_t\n+\n+    int decode_mode;\n+    int start_code;\n+    unsigned int max_slices;    // 0 => not wanted (frame mode)\n+    unsigned int max_offsets;   // 0 => not wanted\n+\n+    req_decode_q decode_q;\n+\n+    struct devscan *devscan;\n+    struct dmabufs_ctl *dbufs;\n+    struct pollqueue *pq;\n+    struct media_pool * mpool;\n+    struct mediabufs_ctl *mbufs;\n+} V4L2RequestContextHEVC;\n+\n+typedef struct v4l2_req_decode_fns {\n+    int src_pix_fmt_v4l2;\n+    const char * name;\n+\n+    // Init setup\n+    int (*probe)(AVCodecContext * const avctx, V4L2RequestContextHEVC * const ctx);\n+    int (*set_controls)(AVCodecContext * const avctx, V4L2RequestContextHEVC * const ctx);\n+\n+    // Passthrough of hwaccel fns\n+    int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);\n+    int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);\n+    int (*end_frame)(AVCodecContext *avctx);\n+    void (*abort_frame)(AVCodecContext *avctx);\n+    int (*frame_params)(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx);\n+    int (*alloc_frame)(AVCodecContext * avctx, AVFrame *frame);\n+} v4l2_req_decode_fns;\n+\n+\n+extern const v4l2_req_decode_fns V2(ff_v4l2_req_hevc, 1);\n+extern const v4l2_req_decode_fns V2(ff_v4l2_req_hevc, 2);\n+extern const v4l2_req_decode_fns V2(ff_v4l2_req_hevc, 3);\n+extern const v4l2_req_decode_fns V2(ff_v4l2_req_hevc, 4);\n+\n+#endif\ndiff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c\nindex d4ceb60791..fb7f839c5e 100644\n--- a/libavcodec/vc1dec.c\n+++ b/libavcodec/vc1dec.c\n@@ -486,7 +486,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)\n             size = next - start - 4;\n             if (size <= 0)\n                 continue;\n-            buf2_size = vc1_unescape_buffer(start + 4, size, buf2);\n+            buf2_size = v->vc1dsp.vc1_unescape_buffer(start + 4, size, buf2);\n             init_get_bits(&gb, buf2, buf2_size * 8);\n             switch (AV_RB32(start)) {\n             case VC1_CODE_SEQHDR:\n@@ -678,7 +678,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,\n                 case VC1_CODE_FRAME:\n                     if (avctx->hwaccel)\n                         buf_start = start;\n-                    buf_size2 = vc1_unescape_buffer(start + 4, size, buf2);\n+                    buf_size2 = v->vc1dsp.vc1_unescape_buffer(start + 4, size, buf2);\n                     break;\n                 case VC1_CODE_FIELD: {\n                     int buf_size3;\n@@ -695,8 +695,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,\n                         ret = AVERROR(ENOMEM);\n                         goto err;\n                     }\n-                    buf_size3 = vc1_unescape_buffer(start + 4, size,\n-                                                    slices[n_slices].buf);\n+                    buf_size3 = v->vc1dsp.vc1_unescape_buffer(start + 4, size,\n+                                                              slices[n_slices].buf);\n                     init_get_bits(&slices[n_slices].gb, slices[n_slices].buf,\n                                   buf_size3 << 3);\n                     slices[n_slices].mby_start = avctx->coded_height + 31 >> 5;\n@@ -707,7 +707,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,\n                     break;\n                 }\n                 case VC1_CODE_ENTRYPOINT: /* it should be before frame data */\n-                    buf_size2 = vc1_unescape_buffer(start + 4, size, buf2);\n+                    buf_size2 = v->vc1dsp.vc1_unescape_buffer(start + 4, size, buf2);\n                     init_get_bits(&s->gb, buf2, buf_size2 * 8);\n                     ff_vc1_decode_entry_point(avctx, v, &s->gb);\n                     break;\n@@ -724,8 +724,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,\n                         ret = AVERROR(ENOMEM);\n                         goto err;\n                     }\n-                    buf_size3 = vc1_unescape_buffer(start + 4, size,\n-                                                    slices[n_slices].buf);\n+                    buf_size3 = v->vc1dsp.vc1_unescape_buffer(start + 4, size,\n+                                                              slices[n_slices].buf);\n                     init_get_bits(&slices[n_slices].gb, slices[n_slices].buf,\n                                   buf_size3 << 3);\n                     slices[n_slices].mby_start = get_bits(&slices[n_slices].gb, 9);\n@@ -759,7 +759,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,\n                     ret = AVERROR(ENOMEM);\n                     goto err;\n                 }\n-                buf_size3 = vc1_unescape_buffer(divider + 4, buf + buf_size - divider - 4, slices[n_slices].buf);\n+                buf_size3 = v->vc1dsp.vc1_unescape_buffer(divider + 4, buf + buf_size - divider - 4, slices[n_slices].buf);\n                 init_get_bits(&slices[n_slices].gb, slices[n_slices].buf,\n                               buf_size3 << 3);\n                 slices[n_slices].mby_start = s->mb_height + 1 >> 1;\n@@ -768,9 +768,9 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,\n                 n_slices1 = n_slices - 1;\n                 n_slices++;\n             }\n-            buf_size2 = vc1_unescape_buffer(buf, divider - buf, buf2);\n+            buf_size2 = v->vc1dsp.vc1_unescape_buffer(buf, divider - buf, buf2);\n         } else {\n-            buf_size2 = vc1_unescape_buffer(buf, buf_size, buf2);\n+            buf_size2 = v->vc1dsp.vc1_unescape_buffer(buf, buf_size, buf2);\n         }\n         init_get_bits(&s->gb, buf2, buf_size2*8);\n     } else\ndiff --git a/libavcodec/vc1dsp.c b/libavcodec/vc1dsp.c\nindex c25a6f3adf..10182786b3 100644\n--- a/libavcodec/vc1dsp.c\n+++ b/libavcodec/vc1dsp.c\n@@ -32,6 +32,7 @@\n #include \"rnd_avg.h\"\n #include \"vc1dsp.h\"\n #include \"startcode.h\"\n+#include \"vc1_common.h\"\n \n /* Apply overlap transform to horizontal edge */\n static void vc1_v_overlap_c(uint8_t *src, int stride)\n@@ -1028,6 +1029,7 @@ av_cold void ff_vc1dsp_init(VC1DSPContext *dsp)\n #endif /* CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER */\n \n     dsp->startcode_find_candidate = ff_startcode_find_candidate_c;\n+    dsp->vc1_unescape_buffer      = vc1_unescape_buffer;\n \n     if (ARCH_AARCH64)\n         ff_vc1dsp_init_aarch64(dsp);\ndiff --git a/libavcodec/vc1dsp.h b/libavcodec/vc1dsp.h\nindex 75db62b1b4..e192b431be 100644\n--- a/libavcodec/vc1dsp.h\n+++ b/libavcodec/vc1dsp.h\n@@ -80,6 +80,9 @@ typedef struct VC1DSPContext {\n      * one or more further zero bytes and a one byte.\n      */\n     int (*startcode_find_candidate)(const uint8_t *buf, int size);\n+\n+    /* Copy a buffer, removing startcode emulation escape bytes as we go */\n+    int (*vc1_unescape_buffer)(const uint8_t *src, int size, uint8_t *dst);\n } VC1DSPContext;\n \n void ff_vc1dsp_init(VC1DSPContext* c);\ndiff --git a/libavcodec/weak_link.c b/libavcodec/weak_link.c\nnew file mode 100644\nindex 0000000000..5a79e89ed7\n--- /dev/null\n+++ b/libavcodec/weak_link.c\n@@ -0,0 +1,103 @@\n+#include <stdlib.h>\n+#include <pthread.h>\n+#include <stdatomic.h>\n+#include \"weak_link.h\"\n+\n+struct ff_weak_link_master {\n+    atomic_int ref_count;    /* 0 is single ref for easier atomics */\n+    pthread_rwlock_t lock;\n+    void * ptr;\n+};\n+\n+static inline struct ff_weak_link_master * weak_link_x(struct ff_weak_link_client * c)\n+{\n+    return (struct ff_weak_link_master *)c;\n+}\n+\n+struct ff_weak_link_master * ff_weak_link_new(void * p)\n+{\n+    struct ff_weak_link_master * w = malloc(sizeof(*w));\n+    if (!w)\n+        return NULL;\n+    atomic_init(&w->ref_count, 0);\n+    w->ptr = p;\n+    if (pthread_rwlock_init(&w->lock, NULL)) {\n+        free(w);\n+        return NULL;\n+    }\n+    return w;\n+}\n+\n+static void weak_link_do_unref(struct ff_weak_link_master * const w)\n+{\n+    int n = atomic_fetch_sub(&w->ref_count, 1);\n+    if (n)\n+        return;\n+\n+    pthread_rwlock_destroy(&w->lock);\n+    free(w);\n+}\n+\n+// Unref & break link\n+void ff_weak_link_break(struct ff_weak_link_master ** ppLink)\n+{\n+    struct ff_weak_link_master * const w = *ppLink;\n+    if (!w)\n+        return;\n+\n+    *ppLink = NULL;\n+    pthread_rwlock_wrlock(&w->lock);\n+    w->ptr = NULL;\n+    pthread_rwlock_unlock(&w->lock);\n+\n+    weak_link_do_unref(w);\n+}\n+\n+struct ff_weak_link_client* ff_weak_link_ref(struct ff_weak_link_master * w)\n+{\n+    if (!w)\n+        return NULL;\n+    atomic_fetch_add(&w->ref_count, 1);\n+    return (struct ff_weak_link_client*)w;\n+}\n+\n+void ff_weak_link_unref(struct ff_weak_link_client ** ppLink)\n+{\n+    struct ff_weak_link_master * const w = weak_link_x(*ppLink);\n+    if (!w)\n+        return;\n+\n+    *ppLink = NULL;\n+    weak_link_do_unref(w);\n+}\n+\n+void * ff_weak_link_lock(struct ff_weak_link_client ** ppLink)\n+{\n+    struct ff_weak_link_master * const w = weak_link_x(*ppLink);\n+\n+    if (!w)\n+        return NULL;\n+\n+    if (pthread_rwlock_rdlock(&w->lock))\n+        goto broken;\n+\n+    if (w->ptr)\n+        return w->ptr;\n+\n+    pthread_rwlock_unlock(&w->lock);\n+\n+broken:\n+    *ppLink = NULL;\n+    weak_link_do_unref(w);\n+    return NULL;\n+}\n+\n+// Ignores a NULL c (so can be on the return path of both broken & live links)\n+void ff_weak_link_unlock(struct ff_weak_link_client * c)\n+{\n+    struct ff_weak_link_master * const w = weak_link_x(c);\n+    if (w)\n+        pthread_rwlock_unlock(&w->lock);\n+}\n+\n+\ndiff --git a/libavcodec/weak_link.h b/libavcodec/weak_link.h\nnew file mode 100644\nindex 0000000000..415b6a27a0\n--- /dev/null\n+++ b/libavcodec/weak_link.h\n@@ -0,0 +1,23 @@\n+struct ff_weak_link_master;\n+struct ff_weak_link_client;\n+\n+struct ff_weak_link_master * ff_weak_link_new(void * p);\n+void ff_weak_link_break(struct ff_weak_link_master ** ppLink);\n+\n+struct ff_weak_link_client* ff_weak_link_ref(struct ff_weak_link_master * w);\n+void ff_weak_link_unref(struct ff_weak_link_client ** ppLink);\n+\n+// Returns NULL if link broken - in this case it will also zap\n+//   *ppLink and unref the weak_link.\n+// Returns NULL if *ppLink is NULL (so a link once broken stays broken)\n+//\n+// The above does mean that there is a race if this is called simultainiously\n+// by two threads using the same weak_link_client (so don't do that)\n+void * ff_weak_link_lock(struct ff_weak_link_client ** ppLink);\n+void ff_weak_link_unlock(struct ff_weak_link_client * c);\n+\n+\n+\n+\n+\n+\ndiff --git a/libavdevice/Makefile b/libavdevice/Makefile\nindex 0dfe47a1f4..ec7c7b4147 100644\n--- a/libavdevice/Makefile\n+++ b/libavdevice/Makefile\n@@ -47,6 +47,9 @@ OBJS-$(CONFIG_SNDIO_OUTDEV)              += sndio_enc.o sndio.o\n OBJS-$(CONFIG_V4L2_INDEV)                += v4l2.o v4l2-common.o timefilter.o\n OBJS-$(CONFIG_V4L2_OUTDEV)               += v4l2enc.o v4l2-common.o\n OBJS-$(CONFIG_VFWCAP_INDEV)              += vfwcap.o\n+OBJS-$(CONFIG_VOUT_DRM_OUTDEV)           += drm_vout.o\n+OBJS-$(CONFIG_VOUT_EGL_OUTDEV)           += egl_vout.o\n+OBJS-$(CONFIG_VOUT_RPI_OUTDEV)           += rpi_vout.o\n OBJS-$(CONFIG_XCBGRAB_INDEV)             += xcbgrab.o\n OBJS-$(CONFIG_XV_OUTDEV)                 += xv.o\n \ndiff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c\nindex 92b27a1d14..19d2a9de55 100644\n--- a/libavdevice/alldevices.c\n+++ b/libavdevice/alldevices.c\n@@ -53,6 +53,9 @@ extern AVOutputFormat ff_sndio_muxer;\n extern AVInputFormat  ff_v4l2_demuxer;\n extern AVOutputFormat ff_v4l2_muxer;\n extern AVInputFormat  ff_vfwcap_demuxer;\n+extern AVOutputFormat ff_vout_drm_muxer;\n+extern AVOutputFormat ff_vout_egl_muxer;\n+extern AVOutputFormat ff_vout_rpi_muxer;\n extern AVInputFormat  ff_xcbgrab_demuxer;\n extern AVOutputFormat ff_xv_muxer;\n \ndiff --git a/libavdevice/drm_vout.c b/libavdevice/drm_vout.c\nnew file mode 100644\nindex 0000000000..c7b90e6dd8\n--- /dev/null\n+++ b/libavdevice/drm_vout.c\n@@ -0,0 +1,680 @@\n+/*\n+ * Copyright (c) 2020 John Cox for Raspberry Pi Trading\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+\n+// *** This module is a work in progress and its utility is strictly\n+//     limited to testing.\n+\n+#include \"libavutil/opt.h\"\n+#include \"libavutil/pixdesc.h\"\n+#include \"libavutil/hwcontext_drm.h\"\n+#include \"libavformat/internal.h\"\n+#include \"avdevice.h\"\n+\n+#include \"pthread.h\"\n+#include <semaphore.h>\n+#include <unistd.h>\n+\n+#include <xf86drm.h>\n+#include <xf86drmMode.h>\n+#include <drm_fourcc.h>\n+\n+#define TRACE_ALL 0\n+\n+#define DRM_MODULE \"vc4\"\n+\n+#define ERRSTR strerror(errno)\n+\n+struct drm_setup {\n+   int conId;\n+   uint32_t crtcId;\n+   int crtcIdx;\n+   uint32_t planeId;\n+   unsigned int out_fourcc;\n+   struct {\n+       int x, y, width, height;\n+   } compose;\n+};\n+\n+typedef struct drm_aux_s {\n+    unsigned int fb_handle;\n+    uint32_t bo_handles[AV_DRM_MAX_PLANES];\n+    AVFrame * frame;\n+} drm_aux_t;\n+\n+// Aux size should only need to be 2, but on a few streams (Hobbit) under FKMS\n+// we get initial flicker probably due to dodgy drm timing\n+#define AUX_SIZE 3\n+typedef struct drm_display_env_s\n+{\n+    AVClass *class;\n+\n+    int drm_fd;\n+    uint32_t con_id;\n+    struct drm_setup setup;\n+    enum AVPixelFormat avfmt;\n+\n+    int show_all;\n+    const char * drm_module;\n+\n+    unsigned int ano;\n+    drm_aux_t aux[AUX_SIZE];\n+\n+    pthread_t q_thread;\n+    sem_t q_sem_in;\n+    sem_t q_sem_out;\n+    int q_terminate;\n+    AVFrame * q_next;\n+\n+} drm_display_env_t;\n+\n+\n+static int drm_vout_write_trailer(AVFormatContext *s)\n+{\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_DEBUG, \"%s\\n\", __func__);\n+#endif\n+\n+    return 0;\n+}\n+\n+static int drm_vout_write_header(AVFormatContext *s)\n+{\n+    const AVCodecParameters * const par = s->streams[0]->codecpar;\n+\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_DEBUG, \"%s\\n\", __func__);\n+#endif\n+    if (   s->nb_streams > 1\n+        || par->codec_type != AVMEDIA_TYPE_VIDEO\n+        || par->codec_id   != AV_CODEC_ID_WRAPPED_AVFRAME) {\n+        av_log(s, AV_LOG_ERROR, \"Only supports one wrapped avframe stream\\n\");\n+        return AVERROR(EINVAL);\n+    }\n+\n+    return 0;\n+}\n+\n+static int find_plane(struct AVFormatContext * const avctx,\n+                      const int drmfd, const int crtcidx, const uint32_t format,\n+                      uint32_t * const pplane_id)\n+{\n+   drmModePlaneResPtr planes;\n+   drmModePlanePtr plane;\n+   drmModeObjectPropertiesPtr props = NULL;\n+   drmModePropertyPtr prop = NULL;\n+   unsigned int i;\n+   unsigned int j;\n+   int ret = -1;\n+\n+   planes = drmModeGetPlaneResources(drmfd);\n+   if (!planes)\n+   {\n+       av_log(avctx, AV_LOG_WARNING, \"drmModeGetPlaneResources failed: %s\\n\", ERRSTR);\n+       return -1;\n+   }\n+\n+   for (i = 0; i < planes->count_planes; ++i) {\n+      plane = drmModeGetPlane(drmfd, planes->planes[i]);\n+      if (!planes)\n+      {\n+          av_log(avctx, AV_LOG_WARNING, \"drmModeGetPlane failed: %s\\n\", ERRSTR);\n+          break;\n+      }\n+\n+      if (!(plane->possible_crtcs & (1 << crtcidx))) {\n+         drmModeFreePlane(plane);\n+         continue;\n+      }\n+\n+      for (j = 0; j < plane->count_formats; ++j) {\n+         if (plane->formats[j] == format)\n+            break;\n+      }\n+\n+      if (j == plane->count_formats) {\n+         drmModeFreePlane(plane);\n+         continue;\n+      }\n+\n+      *pplane_id = plane->plane_id;\n+      drmModeFreePlane(plane);\n+      break;\n+   }\n+\n+   if (i == planes->count_planes) {\n+       ret = -1;\n+       goto fail;\n+   }\n+\n+    props = drmModeObjectGetProperties(drmfd, *pplane_id, DRM_MODE_OBJECT_PLANE);\n+    if (!props)\n+        goto fail;\n+    for (i = 0; i != props->count_props; ++i) {\n+        if (prop)\n+            drmModeFreeProperty(prop);\n+        prop = drmModeGetProperty(drmfd, props->props[i]);\n+        if (!prop)\n+            goto fail;\n+        if (strcmp(\"zpos\", prop->name) == 0) {\n+            if (drmModeObjectSetProperty(drmfd, *pplane_id, DRM_MODE_OBJECT_PLANE, props->props[i], prop->values[1]) == 0)\n+                av_log(avctx, AV_LOG_DEBUG, \"ZPOS set to %d\\n\", (int)prop->values[1]);\n+            else\n+                av_log(avctx, AV_LOG_WARNING, \"Failed to set ZPOS on DRM plane\\n\");\n+            break;\n+        }\n+    }\n+\n+    ret = 0;\n+fail:\n+    if (props)\n+        drmModeFreeObjectProperties(props);\n+    if (prop)\n+        drmModeFreeProperty(prop);\n+    drmModeFreePlaneResources(planes);\n+    return ret;\n+}\n+\n+static void da_uninit(drm_display_env_t * const de, drm_aux_t * da)\n+{\n+    if (da->fb_handle != 0) {\n+        drmModeRmFB(de->drm_fd, da->fb_handle);\n+        da->fb_handle = 0;\n+    }\n+\n+    for (unsigned int i = 0; i != AV_DRM_MAX_PLANES; ++i) {\n+        if (da->bo_handles[i]) {\n+            struct drm_gem_close gem_close = {.handle = da->bo_handles[i]};\n+            drmIoctl(de->drm_fd, DRM_IOCTL_GEM_CLOSE, &gem_close);\n+            da->bo_handles[i] = 0;\n+        }\n+    }\n+    av_frame_free(&da->frame);\n+}\n+\n+static int do_display(AVFormatContext * const s, drm_display_env_t * const de, AVFrame * frame)\n+{\n+    const AVDRMFrameDescriptor *desc = (AVDRMFrameDescriptor*)frame->data[0];\n+    drm_aux_t * da = de->aux + de->ano;\n+    const uint32_t format = desc->layers[0].format;\n+    int ret = 0;\n+\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_DEBUG, \"<<< %s: fd=%d\\n\", __func__, desc->objects[0].fd);\n+#endif\n+\n+    if (de->setup.out_fourcc != format) {\n+        if (find_plane(s, de->drm_fd, de->setup.crtcIdx, format, &de->setup.planeId)) {\n+            av_frame_free(&frame);\n+            av_log(s, AV_LOG_WARNING, \"No plane for format: %#x\\n\", format);\n+            return -1;\n+        }\n+        de->setup.out_fourcc = format;\n+    }\n+\n+    {\n+        drmVBlank vbl = {\n+            .request = {\n+                .type = DRM_VBLANK_RELATIVE,\n+                .sequence = 0\n+            }\n+        };\n+\n+        while (drmWaitVBlank(de->drm_fd, &vbl)) {\n+            if (errno != EINTR) {\n+//                av_log(s, AV_LOG_WARNING, \"drmWaitVBlank failed: %s\\n\", ERRSTR);\n+                break;\n+            }\n+        }\n+    }\n+\n+    da_uninit(de, da);\n+\n+    {\n+        uint32_t pitches[4] = {0};\n+        uint32_t offsets[4] = {0};\n+        uint64_t modifiers[4] = {0};\n+        uint32_t bo_handles[4] = {0};\n+        int has_mods = 0;\n+        int i, j, n;\n+\n+        da->frame = frame;\n+\n+        for (i = 0; i < desc->nb_objects; ++i) {\n+            if (drmPrimeFDToHandle(de->drm_fd, desc->objects[i].fd, da->bo_handles + i) != 0) {\n+                av_log(s, AV_LOG_WARNING, \"drmPrimeFDToHandle[%d](%d) failed: %s\\n\", i, desc->objects[i].fd, ERRSTR);\n+                return -1;\n+            }\n+            if (desc->objects[i].format_modifier != DRM_FORMAT_MOD_LINEAR &&\n+                desc->objects[i].format_modifier != DRM_FORMAT_MOD_INVALID)\n+                has_mods = 1;\n+        }\n+\n+        n = 0;\n+        for (i = 0; i < desc->nb_layers; ++i) {\n+            for (j = 0; j < desc->layers[i].nb_planes; ++j) {\n+                const AVDRMPlaneDescriptor * const p = desc->layers[i].planes + j;\n+                const AVDRMObjectDescriptor * const obj = desc->objects + p->object_index;\n+                pitches[n] = p->pitch;\n+                offsets[n] = p->offset;\n+                modifiers[n] = obj->format_modifier;\n+                bo_handles[n] = da->bo_handles[p->object_index];\n+                ++n;\n+            }\n+        }\n+\n+#if 1 && TRACE_ALL\n+        av_log(s, AV_LOG_DEBUG, \"%dx%d, fmt: %x, boh=%d,%d,%d,%d, pitch=%d,%d,%d,%d,\"\n+               \" offset=%d,%d,%d,%d, mod=%llx,%llx,%llx,%llx\\n\",\n+               av_frame_cropped_width(frame),\n+               av_frame_cropped_height(frame),\n+               desc->layers[0].format,\n+               bo_handles[0],\n+               bo_handles[1],\n+               bo_handles[2],\n+               bo_handles[3],\n+               pitches[0],\n+               pitches[1],\n+               pitches[2],\n+               pitches[3],\n+               offsets[0],\n+               offsets[1],\n+               offsets[2],\n+               offsets[3],\n+               (long long)modifiers[0],\n+               (long long)modifiers[1],\n+               (long long)modifiers[2],\n+               (long long)modifiers[3]\n+               );\n+#endif\n+\n+        if (drmModeAddFB2WithModifiers(de->drm_fd,\n+                                       av_frame_cropped_width(frame),\n+                                       av_frame_cropped_height(frame),\n+                                       desc->layers[0].format, bo_handles,\n+                                       pitches, offsets,\n+                                       has_mods ? modifiers : NULL,\n+                                       &da->fb_handle,\n+                                       has_mods ? DRM_MODE_FB_MODIFIERS : 0) != 0) {\n+            av_log(s, AV_LOG_WARNING, \"drmModeAddFB2WithModifiers failed: %s\\n\", ERRSTR);\n+            return -1;\n+        }\n+    }\n+\n+    ret = drmModeSetPlane(de->drm_fd, de->setup.planeId, de->setup.crtcId,\n+                              da->fb_handle, 0,\n+                de->setup.compose.x, de->setup.compose.y,\n+                de->setup.compose.width,\n+                de->setup.compose.height,\n+                0, 0,\n+                av_frame_cropped_width(frame) << 16,\n+                av_frame_cropped_height(frame) << 16);\n+\n+    if (ret != 0) {\n+        av_log(s, AV_LOG_WARNING, \"drmModeSetPlane failed: %s\\n\", ERRSTR);\n+    }\n+\n+    de->ano = de->ano + 1 >= AUX_SIZE ? 0 : de->ano + 1;\n+\n+    return ret;\n+}\n+\n+static int do_sem_wait(sem_t * const sem, const int nowait)\n+{\n+    while (nowait ? sem_trywait(sem) : sem_wait(sem)) {\n+        if (errno != EINTR)\n+            return -errno;\n+    }\n+    return 0;\n+}\n+\n+static void * display_thread(void * v)\n+{\n+    AVFormatContext * const s = v;\n+    drm_display_env_t * const de = s->priv_data;\n+    int i;\n+\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_DEBUG, \"<<< %s\\n\", __func__);\n+#endif\n+\n+    sem_post(&de->q_sem_out);\n+\n+    for (;;) {\n+        AVFrame * frame;\n+\n+        do_sem_wait(&de->q_sem_in, 0);\n+\n+        if (de->q_terminate)\n+            break;\n+\n+        frame = de->q_next;\n+        de->q_next = NULL;\n+        sem_post(&de->q_sem_out);\n+\n+        do_display(s, de, frame);\n+    }\n+\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_DEBUG, \">>> %s\\n\", __func__);\n+#endif\n+\n+    for (i = 0; i != AUX_SIZE; ++i)\n+        da_uninit(de, de->aux + i);\n+\n+    av_frame_free(&de->q_next);\n+\n+    return NULL;\n+}\n+\n+static int drm_vout_write_packet(AVFormatContext *s, AVPacket *pkt)\n+{\n+    const AVFrame * const src_frame = (AVFrame *)pkt->data;\n+    AVFrame * frame;\n+    drm_display_env_t * const de = s->priv_data;\n+    int ret;\n+\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_DEBUG, \"%s\\n\", __func__);\n+#endif\n+\n+    if ((src_frame->flags & AV_FRAME_FLAG_CORRUPT) != 0) {\n+        av_log(s, AV_LOG_WARNING, \"Discard corrupt frame: fmt=%d, ts=%\" PRId64 \"\\n\", src_frame->format, src_frame->pts);\n+        return 0;\n+    }\n+\n+    if (src_frame->format == AV_PIX_FMT_DRM_PRIME) {\n+        frame = av_frame_alloc();\n+        av_frame_ref(frame, src_frame);\n+    }\n+    else if (src_frame->format == AV_PIX_FMT_VAAPI) {\n+        frame = av_frame_alloc();\n+        frame->format = AV_PIX_FMT_DRM_PRIME;\n+        if (av_hwframe_map(frame, src_frame, 0) != 0)\n+        {\n+            av_log(s, AV_LOG_WARNING, \"Failed to map frame (format=%d) to DRM_PRiME\\n\", src_frame->format);\n+            av_frame_free(&frame);\n+            return AVERROR(EINVAL);\n+        }\n+    }\n+    else {\n+        av_log(s, AV_LOG_WARNING, \"Frame (format=%d) not DRM_PRiME\\n\", src_frame->format);\n+        return AVERROR(EINVAL);\n+    }\n+\n+    ret = do_sem_wait(&de->q_sem_out, !de->show_all);\n+    if (ret) {\n+        av_frame_free(&frame);\n+    }\n+    else {\n+        de->q_next = frame;\n+        sem_post(&de->q_sem_in);\n+    }\n+\n+    return 0;\n+}\n+\n+static int drm_vout_write_frame(AVFormatContext *s, int stream_index, AVFrame **ppframe,\n+                          unsigned flags)\n+{\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_DEBUG, \"%s: idx=%d, flags=%#x\\n\", __func__, stream_index, flags);\n+#endif\n+\n+    /* drm_vout_write_header() should have accepted only supported formats */\n+    if ((flags & AV_WRITE_UNCODED_FRAME_QUERY))\n+        return 0;\n+\n+    return 0;\n+}\n+\n+static int drm_vout_control_message(AVFormatContext *s, int type, void *data, size_t data_size)\n+{\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_DEBUG, \"%s: %d\\n\", __func__, type);\n+#endif\n+    switch(type) {\n+    case AV_APP_TO_DEV_WINDOW_REPAINT:\n+        return 0;\n+    default:\n+        break;\n+    }\n+    return AVERROR(ENOSYS);\n+}\n+\n+static int find_crtc(struct AVFormatContext * const avctx, int drmfd, struct drm_setup *s, uint32_t * const pConId)\n+{\n+   int ret = -1;\n+   int i;\n+   drmModeRes *res = drmModeGetResources(drmfd);\n+   drmModeConnector *c;\n+\n+   if(!res)\n+   {\n+      printf( \"drmModeGetResources failed: %s\\n\", ERRSTR);\n+      return -1;\n+   }\n+\n+   if (res->count_crtcs <= 0)\n+   {\n+      printf( \"drm: no crts\\n\");\n+      goto fail_res;\n+   }\n+\n+   if (!s->conId) {\n+      fprintf(stderr,\n+         \"No connector ID specified.  Choosing default from list:\\n\");\n+\n+      for (i = 0; i < res->count_connectors; i++) {\n+         drmModeConnector *con =\n+            drmModeGetConnector(drmfd, res->connectors[i]);\n+         drmModeEncoder *enc = NULL;\n+         drmModeCrtc *crtc = NULL;\n+\n+         if (con->encoder_id) {\n+            enc = drmModeGetEncoder(drmfd, con->encoder_id);\n+            if (enc->crtc_id) {\n+               crtc = drmModeGetCrtc(drmfd, enc->crtc_id);\n+            }\n+         }\n+\n+         if (!s->conId && crtc) {\n+            s->conId = con->connector_id;\n+            s->crtcId = crtc->crtc_id;\n+         }\n+\n+         av_log(avctx, AV_LOG_DEBUG, \"Connector %d (crtc %d): type %d, %dx%d%s\\n\",\n+                con->connector_id,\n+                crtc ? crtc->crtc_id : 0,\n+                con->connector_type,\n+                crtc ? crtc->width : 0,\n+                crtc ? crtc->height : 0,\n+                (s->conId == (int)con->connector_id ?\n+            \" (chosen)\" : \"\"));\n+      }\n+\n+      if (!s->conId) {\n+         av_log(avctx, AV_LOG_ERROR,\n+            \"No suitable enabled connector found.\\n\");\n+         return -1;;\n+      }\n+   }\n+\n+   s->crtcIdx = -1;\n+\n+   for (i = 0; i < res->count_crtcs; ++i) {\n+      if (s->crtcId == res->crtcs[i]) {\n+         s->crtcIdx = i;\n+         break;\n+      }\n+   }\n+\n+   if (s->crtcIdx == -1)\n+   {\n+       av_log(avctx, AV_LOG_WARNING, \"drm: CRTC %u not found\\n\", s->crtcId);\n+       goto fail_res;\n+   }\n+\n+   if (res->count_connectors <= 0)\n+   {\n+       av_log(avctx, AV_LOG_WARNING, \"drm: no connectors\\n\");\n+       goto fail_res;\n+   }\n+\n+   c = drmModeGetConnector(drmfd, s->conId);\n+   if (!c)\n+   {\n+       av_log(avctx, AV_LOG_WARNING, \"drmModeGetConnector failed: %s\\n\", ERRSTR);\n+       goto fail_res;\n+   }\n+\n+   if (!c->count_modes)\n+   {\n+       av_log(avctx, AV_LOG_WARNING, \"connector supports no mode\\n\");\n+       goto fail_conn;\n+   }\n+\n+   {\n+      drmModeCrtc *crtc = drmModeGetCrtc(drmfd, s->crtcId);\n+      s->compose.x = crtc->x;\n+      s->compose.y = crtc->y;\n+      s->compose.width = crtc->width;\n+      s->compose.height = crtc->height;\n+      drmModeFreeCrtc(crtc);\n+   }\n+\n+   if (pConId)\n+      *pConId = c->connector_id;\n+   ret = 0;\n+\n+fail_conn:\n+   drmModeFreeConnector(c);\n+\n+fail_res:\n+   drmModeFreeResources(res);\n+\n+   return ret;\n+}\n+\n+// deinit is called if init fails so no need to clean up explicity here\n+static int drm_vout_init(struct AVFormatContext * s)\n+{\n+    drm_display_env_t * const de = s->priv_data;\n+    int rv;\n+\n+    av_log(s, AV_LOG_DEBUG, \"<<< %s\\n\", __func__);\n+\n+    de->drm_fd = -1;\n+    de->con_id = 0;\n+    de->setup = (struct drm_setup){0};\n+    de->q_terminate = 0;\n+\n+    if ((de->drm_fd = drmOpen(de->drm_module, NULL)) < 0)\n+    {\n+        rv = AVERROR(errno);\n+        av_log(s, AV_LOG_ERROR, \"Failed to drmOpen %s: %s\\n\", de->drm_module, av_err2str(rv));\n+        return rv;\n+    }\n+\n+    if (find_crtc(s, de->drm_fd, &de->setup, &de->con_id) != 0)\n+    {\n+        av_log(s, AV_LOG_ERROR, \"failed to find valid mode\\n\");\n+        rv = AVERROR(EINVAL);\n+        goto fail_close;\n+    }\n+\n+    sem_init(&de->q_sem_in, 0, 0);\n+    sem_init(&de->q_sem_out, 0, 0);\n+    if (pthread_create(&de->q_thread, NULL, display_thread, s)) {\n+        rv = AVERROR(errno);\n+        av_log(s, AV_LOG_ERROR, \"Failed to create display thread: %s\\n\", av_err2str(rv));\n+        goto fail_close;\n+    }\n+\n+    av_log(s, AV_LOG_DEBUG, \">>> %s\\n\", __func__);\n+\n+    return 0;\n+\n+fail_close:\n+    close(de->drm_fd);\n+    de->drm_fd = -1;\n+    av_log(s, AV_LOG_DEBUG, \">>> %s: FAIL\\n\", __func__);\n+\n+    return rv;\n+}\n+\n+static void drm_vout_deinit(struct AVFormatContext * s)\n+{\n+    drm_display_env_t * const de = s->priv_data;\n+\n+    av_log(s, AV_LOG_DEBUG, \"<<< %s\\n\", __func__);\n+\n+    de->q_terminate = 1;\n+    sem_post(&de->q_sem_in);\n+    pthread_join(de->q_thread, NULL);\n+    sem_destroy(&de->q_sem_in);\n+    sem_destroy(&de->q_sem_out);\n+\n+    for (unsigned int i = 0; i != AUX_SIZE; ++i)\n+        da_uninit(de, de->aux + i);\n+\n+    av_frame_free(&de->q_next);\n+\n+    if (de->drm_fd >= 0) {\n+        close(de->drm_fd);\n+        de->drm_fd = -1;\n+    }\n+\n+    av_log(s, AV_LOG_DEBUG, \">>> %s\\n\", __func__);\n+}\n+\n+\n+#define OFFSET(x) offsetof(drm_display_env_t, x)\n+static const AVOption options[] = {\n+    { \"show_all\", \"show all frames\", OFFSET(show_all), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },\n+    { \"drm_module\", \"drm_module name to use, default=\" DRM_MODULE, OFFSET(drm_module), AV_OPT_TYPE_STRING, { .str = DRM_MODULE }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM },\n+    { NULL }\n+};\n+\n+static const AVClass drm_vout_class = {\n+    .class_name = \"drm vid outdev\",\n+    .item_name  = av_default_item_name,\n+    .option     = options,\n+    .version    = LIBAVUTIL_VERSION_INT,\n+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,\n+};\n+\n+AVOutputFormat ff_vout_drm_muxer = {\n+    .name           = \"vout_drm\",\n+    .long_name      = NULL_IF_CONFIG_SMALL(\"Drm video output device\"),\n+    .priv_data_size = sizeof(drm_display_env_t),\n+    .audio_codec    = AV_CODEC_ID_NONE,\n+    .video_codec    = AV_CODEC_ID_WRAPPED_AVFRAME,\n+    .write_header   = drm_vout_write_header,\n+    .write_packet   = drm_vout_write_packet,\n+    .write_uncoded_frame = drm_vout_write_frame,\n+    .write_trailer  = drm_vout_write_trailer,\n+    .control_message = drm_vout_control_message,\n+    .flags          = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS,\n+    .priv_class     = &drm_vout_class,\n+    .init           = drm_vout_init,\n+    .deinit         = drm_vout_deinit,\n+};\n+\ndiff --git a/libavdevice/egl_vout.c b/libavdevice/egl_vout.c\nnew file mode 100644\nindex 0000000000..cc6e310551\n--- /dev/null\n+++ b/libavdevice/egl_vout.c\n@@ -0,0 +1,788 @@\n+/*\n+ * Copyright (c) 2020 John Cox for Raspberry Pi Trading\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+\n+// *** This module is a work in progress and its utility is strictly\n+//     limited to testing.\n+//     Amongst other issues it doesn't wait for the pic to be displayed before\n+//     returning the buffer so flikering does occur.\n+\n+#include <epoxy/gl.h>\n+#include <epoxy/egl.h>\n+\n+#include \"libavutil/opt.h\"\n+#include \"libavutil/avassert.h\"\n+#include \"libavutil/pixdesc.h\"\n+#include \"libavutil/imgutils.h\"\n+#include \"libavutil/hwcontext_drm.h\"\n+#include \"libavformat/internal.h\"\n+#include \"avdevice.h\"\n+\n+#include \"pthread.h\"\n+#include <semaphore.h>\n+#include <stdatomic.h>\n+#include <unistd.h>\n+\n+#include <X11/Xlib.h>\n+#include <X11/Xutil.h>\n+\n+#include \"libavutil/rpi_sand_fns.h\"\n+\n+#define TRACE_ALL 0\n+\n+struct egl_setup {\n+    int conId;\n+\n+    Display *dpy;\n+    EGLDisplay egl_dpy;\n+    EGLContext ctx;\n+    EGLSurface surf;\n+    Window win;\n+\n+    uint32_t crtcId;\n+    int crtcIdx;\n+    uint32_t planeId;\n+    struct {\n+        int x, y, width, height;\n+    } compose;\n+};\n+\n+typedef struct egl_aux_s {\n+    int fd;\n+    GLuint texture;\n+\n+} egl_aux_t;\n+\n+typedef struct egl_display_env_s {\n+    AVClass *class;\n+\n+    struct egl_setup setup;\n+    enum AVPixelFormat avfmt;\n+\n+    int show_all;\n+    int window_width, window_height;\n+    int window_x, window_y;\n+    int fullscreen;\n+\n+    egl_aux_t aux[32];\n+\n+    pthread_t q_thread;\n+    pthread_mutex_t q_lock;\n+    sem_t display_start_sem;\n+    sem_t q_sem;\n+    int q_terminate;\n+    AVFrame *q_this;\n+    AVFrame *q_next;\n+\n+} egl_display_env_t;\n+\n+\n+/**\n+ * Remove window border/decorations.\n+ */\n+static void\n+no_border(Display *dpy, Window w)\n+{\n+    static const unsigned MWM_HINTS_DECORATIONS = (1 << 1);\n+    static const int PROP_MOTIF_WM_HINTS_ELEMENTS = 5;\n+\n+    typedef struct {\n+        unsigned long       flags;\n+        unsigned long       functions;\n+        unsigned long       decorations;\n+        long                inputMode;\n+        unsigned long       status;\n+    } PropMotifWmHints;\n+\n+    PropMotifWmHints motif_hints;\n+    Atom prop, proptype;\n+    unsigned long flags = 0;\n+\n+    /* setup the property */\n+    motif_hints.flags = MWM_HINTS_DECORATIONS;\n+    motif_hints.decorations = flags;\n+\n+    /* get the atom for the property */\n+    prop = XInternAtom(dpy, \"_MOTIF_WM_HINTS\", True);\n+    if (!prop) {\n+        /* something went wrong! */\n+        return;\n+    }\n+\n+    /* not sure this is correct, seems to work, XA_WM_HINTS didn't work */\n+    proptype = prop;\n+\n+    XChangeProperty(dpy, w,                         /* display, window */\n+                    prop, proptype,                 /* property, type */\n+                    32,                             /* format: 32-bit datums */\n+                    PropModeReplace,                /* mode */\n+                    (unsigned char *)&motif_hints, /* data */\n+                    PROP_MOTIF_WM_HINTS_ELEMENTS    /* nelements */\n+                   );\n+}\n+\n+\n+/*\n+ * Create an RGB, double-buffered window.\n+ * Return the window and context handles.\n+ */\n+static int\n+make_window(struct AVFormatContext *const s,\n+            egl_display_env_t *const de,\n+            Display *dpy, EGLDisplay egl_dpy, const char *name,\n+            Window *winRet, EGLContext *ctxRet, EGLSurface *surfRet)\n+{\n+    int scrnum = DefaultScreen(dpy);\n+    XSetWindowAttributes attr;\n+    unsigned long mask;\n+    Window root = RootWindow(dpy, scrnum);\n+    Window win;\n+    EGLContext ctx;\n+    const int fullscreen = de->fullscreen;\n+    EGLConfig config;\n+    int x = de->window_x;\n+    int y = de->window_y;\n+    int width = de->window_width ? de->window_width : 1280;\n+    int height = de->window_height ? de->window_height : 720;\n+\n+\n+    if (fullscreen) {\n+        int scrnum = DefaultScreen(dpy);\n+\n+        x = 0; y = 0;\n+        width = DisplayWidth(dpy, scrnum);\n+        height = DisplayHeight(dpy, scrnum);\n+    }\n+\n+    {\n+        EGLint num_configs;\n+        static const EGLint attribs[] = {\n+            EGL_RED_SIZE, 1,\n+            EGL_GREEN_SIZE, 1,\n+            EGL_BLUE_SIZE, 1,\n+            EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n+            EGL_NONE\n+        };\n+\n+        if (!eglChooseConfig(egl_dpy, attribs, &config, 1, &num_configs)) {\n+            av_log(s, AV_LOG_ERROR, \"Error: couldn't get an EGL visual config\\n\");\n+            return -1;\n+        }\n+    }\n+\n+    {\n+        EGLint vid;\n+        if (!eglGetConfigAttrib(egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) {\n+            av_log(s, AV_LOG_ERROR, \"Error: eglGetConfigAttrib() failed\\n\");\n+            return -1;\n+        }\n+\n+        {\n+            XVisualInfo visTemplate = {\n+                .visualid = vid,\n+            };\n+            int num_visuals;\n+            XVisualInfo *visinfo = XGetVisualInfo(dpy, VisualIDMask,\n+                                                  &visTemplate, &num_visuals);\n+\n+            /* window attributes */\n+            attr.background_pixel = 0;\n+            attr.border_pixel = 0;\n+            attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);\n+            attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask;\n+            /* XXX this is a bad way to get a borderless window! */\n+            mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;\n+\n+            win = XCreateWindow(dpy, root, x, y, width, height,\n+                                0, visinfo->depth, InputOutput,\n+                                visinfo->visual, mask, &attr);\n+            XFree(visinfo);\n+        }\n+    }\n+\n+    if (fullscreen)\n+        no_border(dpy, win);\n+\n+    /* set hints and properties */\n+    {\n+        XSizeHints sizehints;\n+        sizehints.x = x;\n+        sizehints.y = y;\n+        sizehints.width  = width;\n+        sizehints.height = height;\n+        sizehints.flags = USSize | USPosition;\n+        XSetNormalHints(dpy, win, &sizehints);\n+        XSetStandardProperties(dpy, win, name, name,\n+                               None, (char **)NULL, 0, &sizehints);\n+    }\n+\n+    eglBindAPI(EGL_OPENGL_ES_API);\n+\n+    {\n+        static const EGLint ctx_attribs[] = {\n+            EGL_CONTEXT_CLIENT_VERSION, 2,\n+            EGL_NONE\n+        };\n+        ctx = eglCreateContext(egl_dpy, config, EGL_NO_CONTEXT, ctx_attribs);\n+        if (!ctx) {\n+            av_log(s, AV_LOG_ERROR, \"Error: eglCreateContext failed\\n\");\n+            return -1;\n+        }\n+    }\n+\n+\n+    XMapWindow(dpy, win);\n+\n+    {\n+        EGLSurface surf = eglCreateWindowSurface(egl_dpy, config, (EGLNativeWindowType)win, NULL);\n+        if (!surf) {\n+            av_log(s, AV_LOG_ERROR, \"Error: eglCreateWindowSurface failed\\n\");\n+            return -1;\n+        }\n+\n+        if (!eglMakeCurrent(egl_dpy, surf, surf, ctx)) {\n+            av_log(s, AV_LOG_ERROR, \"Error: eglCreateContext failed\\n\");\n+            return -1;\n+        }\n+\n+        *winRet = win;\n+        *ctxRet = ctx;\n+        *surfRet = surf;\n+    }\n+\n+    return 0;\n+}\n+\n+static GLint\n+compile_shader(struct AVFormatContext *const avctx, GLenum target, const char *source)\n+{\n+    GLuint s = glCreateShader(target);\n+\n+    if (s == 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"Failed to create shader\\n\");\n+        return 0;\n+    }\n+\n+    glShaderSource(s, 1, (const GLchar **)&source, NULL);\n+    glCompileShader(s);\n+\n+    {\n+        GLint ok;\n+        glGetShaderiv(s, GL_COMPILE_STATUS, &ok);\n+\n+        if (!ok) {\n+            GLchar *info;\n+            GLint size;\n+\n+            glGetShaderiv(s, GL_INFO_LOG_LENGTH, &size);\n+            info = malloc(size);\n+\n+            glGetShaderInfoLog(s, size, NULL, info);\n+            av_log(avctx, AV_LOG_ERROR, \"Failed to compile shader: %ssource:\\n%s\\n\", info, source);\n+\n+            return 0;\n+        }\n+    }\n+\n+    return s;\n+}\n+\n+static GLuint link_program(struct AVFormatContext *const s, GLint vs, GLint fs)\n+{\n+    GLuint prog = glCreateProgram();\n+\n+    if (prog == 0) {\n+        av_log(s, AV_LOG_ERROR, \"Failed to create program\\n\");\n+        return 0;\n+    }\n+\n+    glAttachShader(prog, vs);\n+    glAttachShader(prog, fs);\n+    glLinkProgram(prog);\n+\n+    {\n+        GLint ok;\n+        glGetProgramiv(prog, GL_LINK_STATUS, &ok);\n+        if (!ok) {\n+            /* Some drivers return a size of 1 for an empty log.  This is the size\n+             * of a log that contains only a terminating NUL character.\n+             */\n+            GLint size;\n+            GLchar *info = NULL;\n+            glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &size);\n+            if (size > 1) {\n+                info = malloc(size);\n+                glGetProgramInfoLog(prog, size, NULL, info);\n+            }\n+\n+            av_log(s, AV_LOG_ERROR, \"Failed to link: %s\\n\",\n+                   (info != NULL) ? info : \"<empty log>\");\n+            return 0;\n+        }\n+    }\n+\n+    return prog;\n+}\n+\n+static int\n+gl_setup(struct AVFormatContext *const s)\n+{\n+    const char *vs =\n+        \"attribute vec4 pos;\\n\"\n+        \"varying vec2 texcoord;\\n\"\n+        \"\\n\"\n+        \"void main() {\\n\"\n+        \"  gl_Position = pos;\\n\"\n+        \"  texcoord.x = (pos.x + 1.0) / 2.0;\\n\"\n+        \"  texcoord.y = (-pos.y + 1.0) / 2.0;\\n\"\n+        \"}\\n\";\n+    const char *fs =\n+        \"#extension GL_OES_EGL_image_external : enable\\n\"\n+        \"precision mediump float;\\n\"\n+        \"uniform samplerExternalOES s;\\n\"\n+        \"varying vec2 texcoord;\\n\"\n+        \"void main() {\\n\"\n+        \"  gl_FragColor = texture2D(s, texcoord);\\n\"\n+        \"}\\n\";\n+\n+    GLuint vs_s;\n+    GLuint fs_s;\n+    GLuint prog;\n+\n+    if (!(vs_s = compile_shader(s, GL_VERTEX_SHADER, vs)) ||\n+        !(fs_s = compile_shader(s, GL_FRAGMENT_SHADER, fs)) ||\n+        !(prog = link_program(s, vs_s, fs_s)))\n+        return -1;\n+\n+    glUseProgram(prog);\n+\n+    {\n+        static const float verts[] = {\n+            -1, -1,\n+            1, -1,\n+            1,  1,\n+            -1,  1,\n+        };\n+        glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, verts);\n+    }\n+\n+    glEnableVertexAttribArray(0);\n+    return 0;\n+}\n+\n+static int egl_vout_write_trailer(AVFormatContext *s)\n+{\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_INFO, \"%s\\n\", __func__);\n+#endif\n+\n+    return 0;\n+}\n+\n+static int egl_vout_write_header(AVFormatContext *s)\n+{\n+    const AVCodecParameters *const par = s->streams[0]->codecpar;\n+\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_INFO, \"%s\\n\", __func__);\n+#endif\n+    if (s->nb_streams > 1\n+        || par->codec_type != AVMEDIA_TYPE_VIDEO\n+        || par->codec_id   != AV_CODEC_ID_WRAPPED_AVFRAME) {\n+        av_log(s, AV_LOG_ERROR, \"Only supports one wrapped avframe stream\\n\");\n+        return AVERROR(EINVAL);\n+    }\n+\n+    return 0;\n+}\n+\n+\n+static int do_display(AVFormatContext *const s, egl_display_env_t *const de, AVFrame *const frame)\n+{\n+    const AVDRMFrameDescriptor *desc = (AVDRMFrameDescriptor *)frame->data[0];\n+    egl_aux_t *da = NULL;\n+    unsigned int i;\n+\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_INFO, \"<<< %s\\n\", __func__);\n+#endif\n+\n+    for (i = 0; i != 32; ++i) {\n+        if (de->aux[i].fd == -1 || de->aux[i].fd == desc->objects[0].fd) {\n+            da = de->aux + i;\n+            break;\n+        }\n+    }\n+\n+    if (da == NULL) {\n+        av_log(s, AV_LOG_INFO, \"%s: Out of handles\\n\", __func__);\n+        return AVERROR(EINVAL);\n+    }\n+\n+    if (da->texture == 0) {\n+        EGLint attribs[50];\n+        EGLint *a = attribs;\n+        int i, j;\n+        static const EGLint anames[] = {\n+            EGL_DMA_BUF_PLANE0_FD_EXT,\n+            EGL_DMA_BUF_PLANE0_OFFSET_EXT,\n+            EGL_DMA_BUF_PLANE0_PITCH_EXT,\n+            EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT,\n+            EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT,\n+            EGL_DMA_BUF_PLANE1_FD_EXT,\n+            EGL_DMA_BUF_PLANE1_OFFSET_EXT,\n+            EGL_DMA_BUF_PLANE1_PITCH_EXT,\n+            EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT,\n+            EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT,\n+            EGL_DMA_BUF_PLANE2_FD_EXT,\n+            EGL_DMA_BUF_PLANE2_OFFSET_EXT,\n+            EGL_DMA_BUF_PLANE2_PITCH_EXT,\n+            EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT,\n+            EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT,\n+        };\n+        const EGLint *b = anames;\n+\n+        *a++ = EGL_WIDTH;\n+        *a++ = av_frame_cropped_width(frame);\n+        *a++ = EGL_HEIGHT;\n+        *a++ = av_frame_cropped_height(frame);\n+        *a++ = EGL_LINUX_DRM_FOURCC_EXT;\n+        *a++ = desc->layers[0].format;\n+\n+        for (i = 0; i < desc->nb_layers; ++i) {\n+            for (j = 0; j < desc->layers[i].nb_planes; ++j) {\n+                const AVDRMPlaneDescriptor *const p = desc->layers[i].planes + j;\n+                const AVDRMObjectDescriptor *const obj = desc->objects + p->object_index;\n+                *a++ = *b++;\n+                *a++ = obj->fd;\n+                *a++ = *b++;\n+                *a++ = p->offset;\n+                *a++ = *b++;\n+                *a++ = p->pitch;\n+                if (obj->format_modifier == 0) {\n+                    b += 2;\n+                }\n+                else {\n+                    *a++ = *b++;\n+                    *a++ = (EGLint)(obj->format_modifier & 0xFFFFFFFF);\n+                    *a++ = *b++;\n+                    *a++ = (EGLint)(obj->format_modifier >> 32);\n+                }\n+            }\n+        }\n+\n+        *a = EGL_NONE;\n+\n+#if TRACE_ALL\n+        for (a = attribs, i = 0; *a != EGL_NONE; a += 2, ++i) {\n+            av_log(s, AV_LOG_INFO, \"[%2d] %4x: %d\\n\", i, a[0], a[1]);\n+        }\n+#endif\n+        {\n+            const EGLImage image = eglCreateImageKHR(de->setup.egl_dpy,\n+                                                     EGL_NO_CONTEXT,\n+                                                     EGL_LINUX_DMA_BUF_EXT,\n+                                                     NULL, attribs);\n+            if (!image) {\n+                av_log(s, AV_LOG_ERROR, \"Failed to import fd %d\\n\", desc->objects[0].fd);\n+                return -1;\n+            }\n+\n+            glGenTextures(1, &da->texture);\n+            glBindTexture(GL_TEXTURE_EXTERNAL_OES, da->texture);\n+            glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n+            glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n+            glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, image);\n+\n+            eglDestroyImageKHR(de->setup.egl_dpy, image);\n+        }\n+\n+        da->fd = desc->objects[0].fd;\n+    }\n+\n+    glClearColor(0.5, 0.5, 0.5, 0.5);\n+    glClear(GL_COLOR_BUFFER_BIT);\n+\n+    glBindTexture(GL_TEXTURE_EXTERNAL_OES, da->texture);\n+    glDrawArrays(GL_TRIANGLE_FAN, 0, 4);\n+    eglSwapBuffers(de->setup.egl_dpy, de->setup.surf);\n+\n+    glDeleteTextures(1, &da->texture);\n+    da->texture = 0;\n+    da->fd = -1;\n+\n+    return 0;\n+}\n+\n+static void* display_thread(void *v)\n+{\n+    AVFormatContext *const s = v;\n+    egl_display_env_t *const de = s->priv_data;\n+\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_INFO, \"<<< %s\\n\", __func__);\n+#endif\n+    {\n+        EGLint egl_major, egl_minor;\n+\n+        de->setup.dpy = XOpenDisplay(NULL);\n+        if (!de->setup.dpy) {\n+            av_log(s, AV_LOG_ERROR, \"Couldn't open X display\\n\");\n+            goto fail;\n+        }\n+\n+        de->setup.egl_dpy = eglGetDisplay(de->setup.dpy);\n+        if (!de->setup.egl_dpy) {\n+            av_log(s, AV_LOG_ERROR, \"eglGetDisplay() failed\\n\");\n+            goto fail;\n+        }\n+\n+        if (!eglInitialize(de->setup.egl_dpy, &egl_major, &egl_minor)) {\n+            av_log(s, AV_LOG_ERROR, \"Error: eglInitialize() failed\\n\");\n+            goto fail;\n+        }\n+\n+        av_log(s, AV_LOG_INFO, \"EGL version %d.%d\\n\", egl_major, egl_minor);\n+\n+        if (!epoxy_has_egl_extension(de->setup.egl_dpy, \"EGL_KHR_image_base\")) {\n+            av_log(s, AV_LOG_ERROR, \"Missing EGL KHR image extension\\n\");\n+            goto fail;\n+        }\n+    }\n+\n+    if (!de->window_width || !de->window_height) {\n+        de->window_width = 1280;\n+        de->window_height = 720;\n+    }\n+    if (make_window(s, de, de->setup.dpy, de->setup.egl_dpy, \"ffmpeg-vout\",\n+                    &de->setup.win, &de->setup.ctx, &de->setup.surf)) {\n+        av_log(s, AV_LOG_ERROR, \"%s: make_window failed\\n\", __func__);\n+        goto fail;\n+    }\n+\n+    if (gl_setup(s)) {\n+        av_log(s, AV_LOG_ERROR, \"%s: gl_setup failed\\n\", __func__);\n+        goto fail;\n+    }\n+\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_INFO, \"--- %s: Start done\\n\", __func__);\n+#endif\n+    sem_post(&de->display_start_sem);\n+\n+    for (;;) {\n+        AVFrame *frame;\n+\n+        while (sem_wait(&de->q_sem) != 0) {\n+            av_assert0(errno == EINTR);\n+        }\n+\n+        if (de->q_terminate)\n+            break;\n+\n+        pthread_mutex_lock(&de->q_lock);\n+        frame = de->q_next;\n+        de->q_next = NULL;\n+        pthread_mutex_unlock(&de->q_lock);\n+\n+        do_display(s, de, frame);\n+\n+        av_frame_free(&de->q_this);\n+        de->q_this = frame;\n+    }\n+\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_INFO, \">>> %s\\n\", __func__);\n+#endif\n+\n+    return NULL;\n+\n+fail:\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_INFO, \">>> %s: FAIL\\n\", __func__);\n+#endif\n+    de->q_terminate = 1;\n+    sem_post(&de->display_start_sem);\n+\n+    return NULL;\n+}\n+\n+static int egl_vout_write_packet(AVFormatContext *s, AVPacket *pkt)\n+{\n+    const AVFrame *const src_frame = (AVFrame *)pkt->data;\n+    AVFrame *frame;\n+    egl_display_env_t *const de = s->priv_data;\n+\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_INFO, \"%s\\n\", __func__);\n+#endif\n+\n+    if (src_frame->format == AV_PIX_FMT_DRM_PRIME) {\n+        frame = av_frame_alloc();\n+        av_frame_ref(frame, src_frame);\n+    }\n+    else if (src_frame->format == AV_PIX_FMT_VAAPI) {\n+        frame = av_frame_alloc();\n+        frame->format = AV_PIX_FMT_DRM_PRIME;\n+        if (av_hwframe_map(frame, src_frame, 0) != 0) {\n+            av_log(s, AV_LOG_WARNING, \"Failed to map frame (format=%d) to DRM_PRiME\\n\", src_frame->format);\n+            av_frame_free(&frame);\n+            return AVERROR(EINVAL);\n+        }\n+    }\n+    else {\n+        av_log(s, AV_LOG_WARNING, \"Frame (format=%d) not DRM_PRiME\\n\", src_frame->format);\n+        return AVERROR(EINVAL);\n+    }\n+\n+    // Really hacky sync\n+    while (de->show_all && de->q_next) {\n+        usleep(3000);\n+    }\n+\n+    pthread_mutex_lock(&de->q_lock);\n+    {\n+        AVFrame *const t = de->q_next;\n+        de->q_next = frame;\n+        frame = t;\n+    }\n+    pthread_mutex_unlock(&de->q_lock);\n+\n+    if (frame == NULL)\n+        sem_post(&de->q_sem);\n+    else\n+        av_frame_free(&frame);\n+\n+    return 0;\n+}\n+\n+static int egl_vout_write_frame(AVFormatContext *s, int stream_index, AVFrame **ppframe,\n+                                unsigned flags)\n+{\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_INFO, \"%s: idx=%d, flags=%#x\\n\", __func__, stream_index, flags);\n+#endif\n+\n+    /* egl_vout_write_header() should have accepted only supported formats */\n+    if ((flags & AV_WRITE_UNCODED_FRAME_QUERY))\n+        return 0;\n+\n+    return 0;\n+}\n+\n+static int egl_vout_control_message(AVFormatContext *s, int type, void *data, size_t data_size)\n+{\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_INFO, \"%s: %d\\n\", __func__, type);\n+#endif\n+    switch (type) {\n+    case AV_APP_TO_DEV_WINDOW_REPAINT:\n+        return 0;\n+    default:\n+        break;\n+    }\n+    return AVERROR(ENOSYS);\n+}\n+\n+// deinit is called if init fails so no need to clean up explicity here\n+static int egl_vout_init(struct AVFormatContext *s)\n+{\n+    egl_display_env_t *const de = s->priv_data;\n+    unsigned int i;\n+\n+    av_log(s, AV_LOG_DEBUG, \"<<< %s\\n\", __func__);\n+\n+    de->setup = (struct egl_setup) { 0 };\n+\n+    for (i = 0; i != 32; ++i) {\n+        de->aux[i].fd = -1;\n+    }\n+\n+    de->q_terminate = 0;\n+    pthread_mutex_init(&de->q_lock, NULL);\n+    sem_init(&de->q_sem, 0, 0);\n+    sem_init(&de->display_start_sem, 0, 0);\n+    av_assert0(pthread_create(&de->q_thread, NULL, display_thread, s) == 0);\n+\n+    sem_wait(&de->display_start_sem);\n+    if (de->q_terminate) {\n+        av_log(s, AV_LOG_ERROR, \"%s: Display startup failure\\n\", __func__);\n+        return -1;\n+    }\n+\n+    av_log(s, AV_LOG_DEBUG, \">>> %s\\n\", __func__);\n+\n+    return 0;\n+}\n+\n+static void egl_vout_deinit(struct AVFormatContext *s)\n+{\n+    egl_display_env_t *const de = s->priv_data;\n+\n+    av_log(s, AV_LOG_DEBUG, \"<<< %s\\n\", __func__);\n+\n+    de->q_terminate = 1;\n+    sem_post(&de->q_sem);\n+    pthread_join(de->q_thread, NULL);\n+    sem_destroy(&de->q_sem);\n+    pthread_mutex_destroy(&de->q_lock);\n+\n+    av_frame_free(&de->q_next);\n+    av_frame_free(&de->q_this);\n+\n+    av_log(s, AV_LOG_DEBUG, \">>> %s\\n\", __func__);\n+}\n+\n+#define OFFSET(x) offsetof(egl_display_env_t, x)\n+static const AVOption options[] = {\n+    { \"show_all\", \"show all frames\", OFFSET(show_all), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },\n+    { \"window_size\",  \"set window forced size\", OFFSET(window_width), AV_OPT_TYPE_IMAGE_SIZE, { .str = NULL }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM },\n+    { \"window_x\",     \"set window x offset\",    OFFSET(window_x),     AV_OPT_TYPE_INT,    { .i64 = 0 }, -INT_MAX, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },\n+    { \"window_y\",     \"set window y offset\",    OFFSET(window_y),     AV_OPT_TYPE_INT,    { .i64 = 0 }, -INT_MAX, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },\n+    { \"fullscreen\",   \"set fullscreen display\", OFFSET(fullscreen),   AV_OPT_TYPE_BOOL,   { .i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },\n+    { NULL }\n+\n+};\n+\n+static const AVClass egl_vout_class = {\n+    .class_name = \"egl vid outdev\",\n+    .item_name  = av_default_item_name,\n+    .option     = options,\n+    .version    = LIBAVUTIL_VERSION_INT,\n+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,\n+};\n+\n+AVOutputFormat ff_vout_egl_muxer = {\n+    .name           = \"vout_egl\",\n+    .long_name      = NULL_IF_CONFIG_SMALL(\"Egl video output device\"),\n+    .priv_data_size = sizeof(egl_display_env_t),\n+    .audio_codec    = AV_CODEC_ID_NONE,\n+    .video_codec    = AV_CODEC_ID_WRAPPED_AVFRAME,\n+    .write_header   = egl_vout_write_header,\n+    .write_packet   = egl_vout_write_packet,\n+    .write_uncoded_frame = egl_vout_write_frame,\n+    .write_trailer  = egl_vout_write_trailer,\n+    .control_message = egl_vout_control_message,\n+    .flags          = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS,\n+    .priv_class     = &egl_vout_class,\n+    .init           = egl_vout_init,\n+    .deinit         = egl_vout_deinit,\n+};\n+\ndiff --git a/libavdevice/rpi_vout.c b/libavdevice/rpi_vout.c\nnew file mode 100644\nindex 0000000000..84723a34ad\n--- /dev/null\n+++ b/libavdevice/rpi_vout.c\n@@ -0,0 +1,534 @@\n+/*\n+ * Copyright (c) 2013 Jeff Moguillansky\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+/**\n+ * @file\n+ * XVideo output device\n+ *\n+ * TODO:\n+ * - add support to more formats\n+ */\n+\n+#include \"libavutil/opt.h\"\n+#include \"libavutil/avassert.h\"\n+#include \"libavutil/pixdesc.h\"\n+#include \"libavutil/imgutils.h\"\n+#include \"libavformat/internal.h\"\n+#include \"avdevice.h\"\n+\n+#include <stdatomic.h>\n+#include <unistd.h>\n+\n+#pragma GCC diagnostic push\n+// Many many redundant decls in the header files\n+#pragma GCC diagnostic ignored \"-Wredundant-decls\"\n+#include <bcm_host.h>\n+#include <interface/mmal/mmal.h>\n+#include <interface/mmal/mmal_parameters_camera.h>\n+#include <interface/mmal/mmal_buffer.h>\n+#include <interface/mmal/mmal_port.h>\n+#include <interface/mmal/util/mmal_util.h>\n+#include <interface/mmal/util/mmal_default_components.h>\n+#include <interface/mmal/util/mmal_connection.h>\n+#include <interface/mmal/util/mmal_util_params.h>\n+#pragma GCC diagnostic pop\n+#include \"libavutil/rpi_sand_fns.h\"\n+#include \"libavcodec/rpi_zc.h\"\n+\n+#define TRACE_ALL 0\n+\n+#define DISPLAY_PORT_DEPTH 4\n+\n+typedef struct rpi_display_env_s\n+{\n+    AVClass *class;\n+\n+    MMAL_COMPONENT_T* display;\n+    MMAL_COMPONENT_T* isp;\n+    MMAL_PORT_T * port_in;  // Input port of either isp or display depending on pipe setup\n+    MMAL_CONNECTION_T * conn;\n+\n+    MMAL_POOL_T *rpi_pool;\n+    volatile int rpi_display_count;\n+\n+    MMAL_FOURCC_T req_fmt;\n+    MMAL_VIDEO_FORMAT_T req_vfmt;\n+\n+    AVZcEnvPtr zc;\n+\n+    int window_width, window_height;\n+    int window_x, window_y;\n+    int layer, fullscreen;\n+    int show_all;\n+} rpi_display_env_t;\n+\n+\n+static void display_cb_input(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) {\n+    mmal_buffer_header_release(buffer);\n+}\n+\n+static void display_cb_control(MMAL_PORT_T *port,MMAL_BUFFER_HEADER_T *buffer) {\n+    mmal_buffer_header_release(buffer);\n+}\n+\n+\n+static MMAL_FOURCC_T mmfmt_from_avfmt(const enum AVPixelFormat fmt)\n+{\n+    switch (fmt) {\n+    case AV_PIX_FMT_SAND128:\n+    case AV_PIX_FMT_RPI4_8:\n+        return MMAL_ENCODING_YUVUV128;\n+    case AV_PIX_FMT_RPI4_10:\n+        return MMAL_ENCODING_YUV10_COL;\n+    case AV_PIX_FMT_SAND64_10:\n+        return MMAL_ENCODING_YUVUV64_10;\n+    case AV_PIX_FMT_SAND64_16:\n+        return MMAL_ENCODING_YUVUV64_16;\n+    case AV_PIX_FMT_YUV420P:\n+        return MMAL_ENCODING_I420;\n+\n+    default:\n+        break;\n+    }\n+    return 0;\n+}\n+\n+\n+static void video_format_from_zc_frame(MMAL_ES_FORMAT_T* const es_fmt,\n+                                       const AVFrame * const frame, const AVRpiZcRefPtr fr_ref)\n+{\n+    MMAL_VIDEO_FORMAT_T *const vfmt = &es_fmt->es->video;\n+    const AVRpiZcFrameGeometry * geo = av_rpi_zc_geometry(fr_ref);\n+    if (av_rpi_is_sand_format(geo->format)) {\n+        // Sand formats are a bit \"special\"\n+        // stride1 implicit in format\n+        // width = stride2\n+        vfmt->width = geo->stripe_is_yc ?\n+            geo->height_y + geo->height_c : geo->height_y;\n+//        es->height = geo->video_height;  //*** When we get the FLAG this will change\n+        vfmt->height = geo->height_y;\n+        es_fmt->flags = MMAL_ES_FORMAT_FLAG_COL_FMTS_WIDTH_IS_COL_STRIDE;\n+    }\n+    else {\n+        vfmt->width = geo->stride_y / geo->bytes_per_pel;\n+        vfmt->height = geo->height_y;\n+        es_fmt->flags = 0;\n+    }\n+\n+    es_fmt->type = MMAL_ES_TYPE_VIDEO;\n+    es_fmt->encoding = mmfmt_from_avfmt(geo->format);\n+    es_fmt->encoding_variant = 0;\n+    es_fmt->bitrate = 0;\n+\n+    vfmt->crop.x = frame->crop_left;\n+    vfmt->crop.y = frame->crop_top;\n+    vfmt->crop.width = av_frame_cropped_width(frame);\n+    vfmt->crop.height = av_frame_cropped_height(frame);\n+\n+    vfmt->frame_rate.den = 0;  // Don't think I know it here\n+    vfmt->frame_rate.num = 0;\n+\n+    vfmt->par.den = frame->sample_aspect_ratio.den;\n+    vfmt->par.num = frame->sample_aspect_ratio.num;\n+\n+    vfmt->color_space = 0;  // Unknown currently\n+}\n+\n+static MMAL_BOOL_T buf_release_cb(MMAL_BUFFER_HEADER_T * buf, void *userdata)\n+{\n+    rpi_display_env_t * const de = userdata;\n+    if (buf->user_data != NULL) {\n+        av_rpi_zc_unref((AVRpiZcRefPtr)buf->user_data);\n+        buf->user_data = NULL;\n+    }\n+    atomic_fetch_add(&de->rpi_display_count, -1);\n+    return MMAL_FALSE;\n+}\n+\n+static inline int avfmt_needs_isp(const enum AVPixelFormat avfmt)\n+{\n+    return avfmt == AV_PIX_FMT_SAND64_10;\n+}\n+\n+static void isp_remove(AVFormatContext * const s, rpi_display_env_t * const de)\n+{\n+    if (de->isp != NULL)\n+    {\n+        if (de->isp->input[0]->is_enabled)\n+            mmal_port_disable(de->isp->input[0]);\n+        if (de->isp->control->is_enabled)\n+            mmal_port_disable(de->isp->control);\n+    }\n+    if (de->conn != NULL) {\n+        mmal_connection_destroy(de->conn);\n+        de->conn = NULL;\n+    }\n+    if (de->isp != NULL) {\n+        mmal_component_destroy(de->isp);\n+        de->isp = NULL;\n+    }\n+}\n+\n+static void display_frame(AVFormatContext * const s, rpi_display_env_t * const de, const AVFrame* const fr)\n+{\n+    MMAL_BUFFER_HEADER_T* buf = NULL;\n+    AVRpiZcRefPtr fr_buf = NULL;\n+\n+    if (de == NULL)\n+        return;\n+\n+    if (atomic_load(&de->rpi_display_count) >= DISPLAY_PORT_DEPTH - 1) {\n+        av_log(s, AV_LOG_VERBOSE, \"Frame dropped\\n\");\n+        return;\n+    }\n+\n+    if ((fr_buf = av_rpi_zc_ref(s, de->zc, fr, fr->format, 1)) == NULL) {\n+        return;\n+    }\n+\n+    buf = mmal_queue_get(de->rpi_pool->queue);\n+    if (!buf) {\n+        // Running too fast so drop the frame (unexpected)\n+        goto fail;\n+    }\n+\n+    buf->cmd = 0;\n+    buf->offset = 0;\n+    buf->flags = 0;\n+    mmal_buffer_header_reset(buf);\n+\n+    atomic_fetch_add(&de->rpi_display_count, 1);  // Deced on release\n+    mmal_buffer_header_pre_release_cb_set(buf, buf_release_cb, de);\n+\n+    buf->user_data = fr_buf;\n+    buf->data = (uint8_t *)av_rpi_zc_vc_handle(fr_buf);  // Cast our handle to a pointer for mmal\n+    buf->offset = av_rpi_zc_offset(fr_buf);\n+    buf->length = av_rpi_zc_length(fr_buf);\n+    buf->alloc_size = av_rpi_zc_numbytes(fr_buf);\n+\n+    while (de->show_all && atomic_load(&de->rpi_display_count) >= DISPLAY_PORT_DEPTH - 1) {\n+        usleep(5000);\n+    }\n+\n+    {\n+        MMAL_ES_SPECIFIC_FORMAT_T new_ess = {.video = {0}};\n+        MMAL_ES_FORMAT_T new_es = {.es = &new_ess};\n+\t\tMMAL_VIDEO_FORMAT_T * const new_vfmt = &new_ess.video;\n+\n+        video_format_from_zc_frame(&new_es, fr, fr_buf);\n+        if (de->req_fmt != new_es.encoding ||\n+            de->req_vfmt.width       != new_vfmt->width ||\n+            de->req_vfmt.height      != new_vfmt->height ||\n+            de->req_vfmt.crop.x      != new_vfmt->crop.x ||\n+            de->req_vfmt.crop.y      != new_vfmt->crop.y ||\n+            de->req_vfmt.crop.width  != new_vfmt->crop.width ||\n+            de->req_vfmt.crop.height != new_vfmt->crop.height) {\n+            // Something has changed\n+\n+            // If we have an ISP tear it down\n+            isp_remove(s, de);\n+            de->port_in = de->display->input[0];\n+\n+            // If we still need an ISP create it now\n+            if (avfmt_needs_isp(fr->format))\n+            {\n+                if (mmal_component_create(\"vc.ril.isp\", &de->isp) != MMAL_SUCCESS)\n+                {\n+                    av_log(s, AV_LOG_ERROR, \"ISP creation failed\\n\");\n+                    goto fail;\n+                }\n+                de->port_in = de->isp->input[0];\n+            }\n+\n+            mmal_format_copy(de->port_in->format, &new_es);\n+\n+            if (mmal_port_format_commit(de->port_in)) {\n+                av_log(s, AV_LOG_ERROR, \"Failed to commit input format\\n\");\n+                goto fail;\n+            }\n+\n+            // If we have an ISP then we must want to use it\n+            if (de->isp != NULL) {\n+                MMAL_PORT_T * const port_out = de->isp->output[0];\n+                MMAL_VIDEO_FORMAT_T* vfmt_in = &de->port_in->format->es->video;\n+                MMAL_VIDEO_FORMAT_T* vfmt_out = &port_out->format->es->video;\n+\n+                port_out->format->type = MMAL_ES_TYPE_VIDEO;\n+                port_out->format->encoding  = MMAL_ENCODING_YUVUV128;\n+                port_out->format->encoding_variant = 0;\n+                port_out->format->bitrate = 0;\n+                port_out->format->flags = 0;\n+                port_out->format->extradata = NULL;\n+                port_out->format->extradata_size = 0;\n+\n+                vfmt_out->width       = (vfmt_in->crop.width + 31) & ~31;\n+                vfmt_out->height      = (vfmt_in->crop.height + 15) & ~15;\n+                vfmt_out->crop.x      = 0;\n+                vfmt_out->crop.y      = 0;\n+                vfmt_out->crop.width  = vfmt_in->crop.width;\n+                vfmt_out->crop.height = vfmt_in->crop.height;\n+                vfmt_out->frame_rate  = vfmt_in->frame_rate;\n+                vfmt_out->par         = vfmt_in->par;\n+                vfmt_out->color_space = vfmt_in->color_space;\n+\n+                if (mmal_port_format_commit(port_out)) {\n+                    av_log(s, AV_LOG_ERROR, \"Failed to commit output format\\n\");\n+                    goto fail;\n+                }\n+\n+                if (mmal_connection_create(&de->conn, port_out, de->display->input[0], MMAL_CONNECTION_FLAG_TUNNELLING) != MMAL_SUCCESS) {\n+                    av_log(s, AV_LOG_ERROR, \"Failed to create connection\\n\");\n+                    goto fail;\n+                }\n+                if (mmal_connection_enable(de->conn) != MMAL_SUCCESS) {\n+                    av_log(s, AV_LOG_ERROR, \"Failed to enable connection\\n\");\n+                    goto fail;\n+                }\n+                mmal_port_enable(de->isp->control,display_cb_control);\n+                mmal_component_enable(de->isp);\n+            }\n+\n+            // Number of slots in my port Q\n+            de->port_in->buffer_num = DISPLAY_PORT_DEPTH;\n+            // Size to keep it happy - isn't used for anything other than error checking\n+            de->port_in->buffer_size = buf->alloc_size;\n+            if (!de->port_in->is_enabled)\n+            {\n+                mmal_port_parameter_set_boolean(de->port_in, MMAL_PARAMETER_ZERO_COPY, MMAL_TRUE); // Does this mark that the buffer contains a vc_handle?  Would have expected a vc_image?\n+                if (mmal_port_enable(de->port_in, display_cb_input) != MMAL_SUCCESS) {\n+                    av_log(s, AV_LOG_ERROR, \"Failed to enable input port\\n\");\n+                    goto fail;\n+                }\n+            }\n+\n+            de->req_fmt  = new_es.encoding;\n+            de->req_vfmt = *new_vfmt;\n+        }\n+    }\n+\n+    if (mmal_port_send_buffer(de->port_in, buf) != MMAL_SUCCESS)\n+    {\n+        av_log(s, AV_LOG_ERROR, \"mmal_port_send_buffer failed: depth=%d\\n\", de->rpi_display_count);\n+        goto fail;\n+    }\n+    return;\n+\n+fail:\n+    // If we have a buf then fr_buf is held by that\n+    if (buf != NULL)\n+        mmal_buffer_header_release(buf);\n+    else if (fr_buf != NULL)\n+        av_rpi_zc_unref(fr_buf);\n+}\n+\n+\n+static int xv_write_trailer(AVFormatContext *s)\n+{\n+    rpi_display_env_t * const de = s->priv_data;\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_INFO, \"%s\\n\", __func__);\n+#endif\n+    if (de->port_in != NULL && de->port_in->is_enabled) {\n+        mmal_port_disable(de->port_in);\n+    }\n+\n+    // The above disable should kick out all buffers - check that\n+    if (atomic_load(&de->rpi_display_count) != 0) {\n+        av_log(s, AV_LOG_WARNING, \"Exiting with display count non-zero:%d\\n\", atomic_load(&de->rpi_display_count));\n+    }\n+\n+    isp_remove(s, de);\n+    if (de->rpi_pool != NULL) {\n+        mmal_pool_destroy(de->rpi_pool);\n+        de->rpi_pool = NULL;\n+    }\n+    if (de->display != NULL) {\n+        mmal_component_destroy(de->display);\n+        de->display = NULL;\n+    }\n+\n+    return 0;\n+}\n+\n+static int xv_write_header(AVFormatContext *s)\n+{\n+    rpi_display_env_t * const de = s->priv_data;\n+    const AVCodecParameters * const par = s->streams[0]->codecpar;\n+    const unsigned int w = de->window_width ? de->window_width : par->width;\n+    const unsigned int h = de->window_height ? de->window_height : par->height;\n+    const unsigned int x = de->window_x;\n+    const unsigned int y = de->window_y;\n+    const int layer = de->layer ? de->layer : 2;\n+    const MMAL_BOOL_T fullscreen = de->fullscreen;\n+\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_INFO, \"%s: %dx%d\\n\", __func__, w, h);\n+#endif\n+    if (   s->nb_streams > 1\n+        || par->codec_type != AVMEDIA_TYPE_VIDEO\n+        || par->codec_id   != AV_CODEC_ID_WRAPPED_AVFRAME) {\n+        av_log(s, AV_LOG_ERROR, \"Only supports one wrapped avframe stream\\n\");\n+        return AVERROR(EINVAL);\n+    }\n+\n+    {\n+        MMAL_DISPLAYREGION_T region =\n+        {\n+            .hdr = {MMAL_PARAMETER_DISPLAYREGION, sizeof(region)},\n+            .set = MMAL_DISPLAY_SET_LAYER | MMAL_DISPLAY_SET_FULLSCREEN |\n+                MMAL_DISPLAY_SET_DEST_RECT | MMAL_DISPLAY_SET_ALPHA,\n+            .layer = layer,\n+            .fullscreen = fullscreen,\n+            .dest_rect = {x, y, w, h},\n+            .alpha = !fullscreen ? 0xff : 0xff | MMAL_DISPLAY_ALPHA_FLAGS_DISCARD_LOWER_LAYERS,\n+        };\n+\n+        bcm_host_init();  // Needs to be done by someone...\n+\n+        if (mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, &de->display) != MMAL_SUCCESS)\n+        {\n+            av_log(s, AV_LOG_ERROR, \"Failed to create display component\\n\");\n+            goto fail;\n+        }\n+        de->port_in = de->display->input[0];\n+\n+        mmal_port_parameter_set(de->display->input[0], &region.hdr);\n+\n+        if (mmal_component_enable(de->display) != MMAL_SUCCESS)\n+        {\n+            av_log(s, AV_LOG_ERROR, \"Failed to enable display component\\n\");\n+            goto fail;\n+        }\n+        if (mmal_port_enable(de->display->control,display_cb_control) != MMAL_SUCCESS)\n+        {\n+            av_log(s, AV_LOG_ERROR, \"Failed to enable display control port\\n\");\n+            goto fail;\n+        }\n+\n+        if ((de->rpi_pool = mmal_pool_create(DISPLAY_PORT_DEPTH, 0)) == NULL)\n+        {\n+            av_log(s, AV_LOG_ERROR, \"Failed to create pool\\n\");\n+            goto fail;\n+        }\n+    }\n+\n+    return 0;\n+\n+fail:\n+    xv_write_trailer(s);\n+    return AVERROR_UNKNOWN;\n+}\n+\n+static int xv_write_packet(AVFormatContext *s, AVPacket *pkt)\n+{\n+    AVFrame * const frame = (AVFrame *)pkt->data;\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_INFO, \"%s\\n\", __func__);\n+#endif\n+    display_frame(s, s->priv_data, frame);\n+    return 0;\n+}\n+\n+static int xv_write_frame(AVFormatContext *s, int stream_index, AVFrame **ppframe,\n+                          unsigned flags)\n+{\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_INFO, \"%s: idx=%d, flags=%#x\\n\", __func__, stream_index, flags);\n+#endif\n+\n+    /* xv_write_header() should have accepted only supported formats */\n+    if ((flags & AV_WRITE_UNCODED_FRAME_QUERY))\n+        return 0;\n+//    return write_picture(s, (*frame)->data, (*frame)->linesize);\n+\n+    display_frame(s, s->priv_data, *ppframe);\n+    return 0;\n+}\n+\n+static int xv_control_message(AVFormatContext *s, int type, void *data, size_t data_size)\n+{\n+#if TRACE_ALL\n+    av_log(s, AV_LOG_INFO, \"%s: %d\\n\", __func__, type);\n+#endif\n+    switch(type) {\n+    case AV_APP_TO_DEV_WINDOW_REPAINT:\n+        return 0;\n+    default:\n+        break;\n+    }\n+    return AVERROR(ENOSYS);\n+}\n+\n+// deinit is called if init fails so no need to clean up explicity here\n+static int rpi_vout_init(struct AVFormatContext * s)\n+{\n+    rpi_display_env_t * const de = s->priv_data;\n+\n+    // Get a ZC context in case we need one - has little overhead if unused\n+    if ((de->zc = av_rpi_zc_int_env_alloc(s)) == NULL)\n+        return 1;\n+\n+    return 0;\n+}\n+\n+static void rpi_vout_deinit(struct AVFormatContext * s)\n+{\n+    rpi_display_env_t * const de = s->priv_data;\n+\n+    av_rpi_zc_int_env_freep(&de->zc);\n+}\n+\n+\n+#define OFFSET(x) offsetof(rpi_display_env_t, x)\n+static const AVOption options[] = {\n+    { \"show_all\",     \"show all frames\",        OFFSET(show_all),     AV_OPT_TYPE_BOOL,   {.i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },\n+    { \"window_size\",  \"set window forced size\", OFFSET(window_width), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, AV_OPT_FLAG_ENCODING_PARAM },\n+    { \"window_x\",     \"set window x offset\",    OFFSET(window_x),     AV_OPT_TYPE_INT,    {.i64 = 0 }, -INT_MAX, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },\n+    { \"window_y\",     \"set window y offset\",    OFFSET(window_y),     AV_OPT_TYPE_INT,    {.i64 = 0 }, -INT_MAX, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },\n+    { \"display_layer\",\"set display layer\",      OFFSET(layer),        AV_OPT_TYPE_INT,    {.i64 = 0 }, -INT_MAX, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },\n+    { \"fullscreen\",   \"set fullscreen display\", OFFSET(fullscreen),   AV_OPT_TYPE_BOOL,   {.i64 = 0 }, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },\n+    { NULL }\n+\n+};\n+\n+static const AVClass xv_class = {\n+    .class_name = \"rpi vid outdev\",\n+    .item_name  = av_default_item_name,\n+    .option     = options,\n+    .version    = LIBAVUTIL_VERSION_INT,\n+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,\n+};\n+\n+AVOutputFormat ff_vout_rpi_muxer = {\n+    .name           = \"vout_rpi\",\n+    .long_name      = NULL_IF_CONFIG_SMALL(\"Rpi (mmal) video output device\"),\n+    .priv_data_size = sizeof(rpi_display_env_t),\n+    .audio_codec    = AV_CODEC_ID_NONE,\n+    .video_codec    = AV_CODEC_ID_WRAPPED_AVFRAME,\n+    .write_header   = xv_write_header,\n+    .write_packet   = xv_write_packet,\n+    .write_uncoded_frame = xv_write_frame,\n+    .write_trailer  = xv_write_trailer,\n+    .control_message = xv_control_message,\n+    .flags          = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS,\n+    .priv_class     = &xv_class,\n+    .init           = rpi_vout_init,\n+    .deinit         = rpi_vout_deinit,\n+};\ndiff --git a/libavfilter/Makefile b/libavfilter/Makefile\nindex b2c254ea67..144fbda652 100644\n--- a/libavfilter/Makefile\n+++ b/libavfilter/Makefile\n@@ -233,6 +233,7 @@ OBJS-$(CONFIG_DEFLATE_FILTER)                += vf_neighbor.o\n OBJS-$(CONFIG_DEFLICKER_FILTER)              += vf_deflicker.o\n OBJS-$(CONFIG_DEINTERLACE_QSV_FILTER)        += vf_deinterlace_qsv.o\n OBJS-$(CONFIG_DEINTERLACE_VAAPI_FILTER)      += vf_deinterlace_vaapi.o vaapi_vpp.o\n+OBJS-$(CONFIG_DEINTERLACE_V4L2M2M_FILTER)    += vf_deinterlace_v4l2m2m.o\n OBJS-$(CONFIG_DEJUDDER_FILTER)               += vf_dejudder.o\n OBJS-$(CONFIG_DELOGO_FILTER)                 += vf_delogo.o\n OBJS-$(CONFIG_DENOISE_VAAPI_FILTER)          += vf_misc_vaapi.o vaapi_vpp.o\n@@ -459,6 +460,7 @@ OBJS-$(CONFIG_TRANSPOSE_OPENCL_FILTER)       += vf_transpose_opencl.o opencl.o o\n OBJS-$(CONFIG_TRANSPOSE_VAAPI_FILTER)        += vf_transpose_vaapi.o vaapi_vpp.o\n OBJS-$(CONFIG_TRIM_FILTER)                   += trim.o\n OBJS-$(CONFIG_UNPREMULTIPLY_FILTER)          += vf_premultiply.o framesync.o\n+OBJS-$(CONFIG_UNSAND_FILTER)                 += vf_unsand.o\n OBJS-$(CONFIG_UNSHARP_FILTER)                += vf_unsharp.o\n OBJS-$(CONFIG_UNSHARP_OPENCL_FILTER)         += vf_unsharp_opencl.o opencl.o \\\n                                                 opencl/unsharp.o\ndiff --git a/libavfilter/aarch64/Makefile b/libavfilter/aarch64/Makefile\nindex b58daa3a3f..b68209bc94 100644\n--- a/libavfilter/aarch64/Makefile\n+++ b/libavfilter/aarch64/Makefile\n@@ -1,3 +1,5 @@\n+OBJS-$(CONFIG_BWDIF_FILTER)                  += aarch64/vf_bwdif_init_aarch64.o\n OBJS-$(CONFIG_NLMEANS_FILTER)                += aarch64/vf_nlmeans_init.o\n \n+NEON-OBJS-$(CONFIG_BWDIF_FILTER)             += aarch64/vf_bwdif_neon.o\n NEON-OBJS-$(CONFIG_NLMEANS_FILTER)           += aarch64/vf_nlmeans_neon.o\ndiff --git a/libavfilter/aarch64/vf_bwdif_init_aarch64.c b/libavfilter/aarch64/vf_bwdif_init_aarch64.c\nnew file mode 100644\nindex 0000000000..f52bc4b9b4\n--- /dev/null\n+++ b/libavfilter/aarch64/vf_bwdif_init_aarch64.c\n@@ -0,0 +1,125 @@\n+/*\n+ * bwdif aarch64 NEON optimisations\n+ *\n+ * Copyright (c) 2023 John Cox <jc@kynesim.co.uk>\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"libavutil/common.h\"\n+#include \"libavfilter/bwdif.h\"\n+#include \"libavutil/aarch64/cpu.h\"\n+\n+void ff_bwdif_filter_edge_neon(void *dst1, void *prev1, void *cur1, void *next1,\n+                               int w, int prefs, int mrefs, int prefs2, int mrefs2,\n+                               int parity, int clip_max, int spat);\n+\n+void ff_bwdif_filter_intra_neon(void *dst1, void *cur1, int w, int prefs, int mrefs,\n+                                int prefs3, int mrefs3, int parity, int clip_max);\n+\n+void ff_bwdif_filter_line_neon(void *dst1, void *prev1, void *cur1, void *next1,\n+                               int w, int prefs, int mrefs, int prefs2, int mrefs2,\n+                               int prefs3, int mrefs3, int prefs4, int mrefs4,\n+                               int parity, int clip_max);\n+\n+void ff_bwdif_filter_line3_neon(void * dst1, int d_stride,\n+                                const void * prev1, const void * cur1, const void * next1, int s_stride,\n+                                int w, int parity, int clip_max);\n+\n+\n+static void filter_line3_helper(void * dst1, int d_stride,\n+                                const void * prev1, const void * cur1, const void * next1, int s_stride,\n+                                int w, int parity, int clip_max)\n+{\n+    // Asm works on 16 byte chunks\n+    // If w is a multiple of 16 then all is good - if not then if width rounded\n+    // up to nearest 16 will fit in both src & dst strides then allow the asm\n+    // to write over the padding bytes as that is almost certainly faster than\n+    // having to invoke the C version to clean up the tail.\n+    const int w1 = FFALIGN(w, 16);\n+    const int w0 = clip_max != 255 ? 0 :\n+                   d_stride <= w1 && s_stride <= w1 ? w : w & ~15;\n+\n+    ff_bwdif_filter_line3_neon(dst1, d_stride,\n+                               prev1, cur1, next1, s_stride,\n+                               w0, parity, clip_max);\n+\n+    if (w0 < w)\n+        ff_bwdif_filter_line3_c((char *)dst1 + w0, d_stride,\n+                                (const char *)prev1 + w0, (const char *)cur1 + w0, (const char *)next1 + w0, s_stride,\n+                                w - w0, parity, clip_max);\n+}\n+\n+static void filter_line_helper(void *dst1, void *prev1, void *cur1, void *next1,\n+                               int w, int prefs, int mrefs, int prefs2, int mrefs2,\n+                               int prefs3, int mrefs3, int prefs4, int mrefs4,\n+                               int parity, int clip_max)\n+{\n+    const int w0 = clip_max != 255 ? 0 : w & ~15;\n+\n+    ff_bwdif_filter_line_neon(dst1, prev1, cur1, next1,\n+                              w0, prefs, mrefs, prefs2, mrefs2, prefs3, mrefs3, prefs4, mrefs4, parity, clip_max);\n+\n+    if (w0 < w)\n+        ff_bwdif_filter_line_c((char *)dst1 + w0, (char *)prev1 + w0, (char *)cur1 + w0, (char *)next1 + w0,\n+                               w - w0, prefs, mrefs, prefs2, mrefs2, prefs3, mrefs3, prefs4, mrefs4, parity, clip_max);\n+}\n+\n+static void filter_edge_helper(void *dst1, void *prev1, void *cur1, void *next1,\n+                               int w, int prefs, int mrefs, int prefs2, int mrefs2,\n+                               int parity, int clip_max, int spat)\n+{\n+    const int w0 = clip_max != 255 ? 0 : w & ~15;\n+\n+    ff_bwdif_filter_edge_neon(dst1, prev1, cur1, next1, w0, prefs, mrefs, prefs2, mrefs2,\n+                              parity, clip_max, spat);\n+\n+    if (w0 < w)\n+        ff_bwdif_filter_edge_c((char *)dst1 + w0, (char *)prev1 + w0, (char *)cur1 + w0, (char *)next1 + w0,\n+                               w - w0, prefs, mrefs, prefs2, mrefs2,\n+                               parity, clip_max, spat);\n+}\n+\n+static void filter_intra_helper(void *dst1, void *cur1, int w, int prefs, int mrefs,\n+                                int prefs3, int mrefs3, int parity, int clip_max)\n+{\n+    const int w0 = clip_max != 255 ? 0 : w & ~15;\n+\n+    ff_bwdif_filter_intra_neon(dst1, cur1, w0, prefs, mrefs, prefs3, mrefs3, parity, clip_max);\n+\n+    if (w0 < w)\n+        ff_bwdif_filter_intra_c((char *)dst1 + w0, (char *)cur1 + w0,\n+                                w - w0, prefs, mrefs, prefs3, mrefs3, parity, clip_max);\n+}\n+\n+void\n+ff_bwdif_init_aarch64(BWDIFContext *s, int bit_depth)\n+{\n+    const int cpu_flags = av_get_cpu_flags();\n+\n+    if (bit_depth != 8)\n+        return;\n+\n+    if (!have_neon(cpu_flags))\n+        return;\n+\n+    s->filter_intra = filter_intra_helper;\n+    s->filter_line  = filter_line_helper;\n+    s->filter_edge  = filter_edge_helper;\n+    s->filter_line3 = filter_line3_helper;\n+}\n+\ndiff --git a/libavfilter/aarch64/vf_bwdif_neon.S b/libavfilter/aarch64/vf_bwdif_neon.S\nnew file mode 100644\nindex 0000000000..ae9aab20cd\n--- /dev/null\n+++ b/libavfilter/aarch64/vf_bwdif_neon.S\n@@ -0,0 +1,788 @@\n+/*\n+ * bwdif aarch64 NEON optimisations\n+ *\n+ * Copyright (c) 2023 John Cox <jc@kynesim.co.uk>\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+\n+#include \"libavutil/aarch64/asm.S\"\n+\n+// Space taken on the stack by an int (32-bit)\n+#ifdef __APPLE__\n+.set    SP_INT, 4\n+#else\n+.set    SP_INT, 8\n+#endif\n+\n+.macro SQSHRUNN b, s0, s1, s2, s3, n\n+        sqshrun         \\s0\\().4h, \\s0\\().4s, #\\n - 8\n+        sqshrun2        \\s0\\().8h, \\s1\\().4s, #\\n - 8\n+        sqshrun         \\s1\\().4h, \\s2\\().4s, #\\n - 8\n+        sqshrun2        \\s1\\().8h, \\s3\\().4s, #\\n - 8\n+        uzp2            \\b\\().16b, \\s0\\().16b, \\s1\\().16b\n+.endm\n+\n+.macro SMULL4K a0, a1, a2, a3, s0, s1, k\n+        smull           \\a0\\().4s, \\s0\\().4h, \\k\n+        smull2          \\a1\\().4s, \\s0\\().8h, \\k\n+        smull           \\a2\\().4s, \\s1\\().4h, \\k\n+        smull2          \\a3\\().4s, \\s1\\().8h, \\k\n+.endm\n+\n+.macro UMULL4K a0, a1, a2, a3, s0, s1, k\n+        umull           \\a0\\().4s, \\s0\\().4h, \\k\n+        umull2          \\a1\\().4s, \\s0\\().8h, \\k\n+        umull           \\a2\\().4s, \\s1\\().4h, \\k\n+        umull2          \\a3\\().4s, \\s1\\().8h, \\k\n+.endm\n+\n+.macro UMLAL4K a0, a1, a2, a3, s0, s1, k\n+        umlal           \\a0\\().4s, \\s0\\().4h, \\k\n+        umlal2          \\a1\\().4s, \\s0\\().8h, \\k\n+        umlal           \\a2\\().4s, \\s1\\().4h, \\k\n+        umlal2          \\a3\\().4s, \\s1\\().8h, \\k\n+.endm\n+\n+.macro UMLSL4K a0, a1, a2, a3, s0, s1, k\n+        umlsl           \\a0\\().4s, \\s0\\().4h, \\k\n+        umlsl2          \\a1\\().4s, \\s0\\().8h, \\k\n+        umlsl           \\a2\\().4s, \\s1\\().4h, \\k\n+        umlsl2          \\a3\\().4s, \\s1\\().8h, \\k\n+.endm\n+\n+//      int b = m2s1 - m1;\n+//      int f = p2s1 - p1;\n+//      int dc = c0s1 - m1;\n+//      int de = c0s1 - p1;\n+//      int sp_max = FFMIN(p1 - c0s1, m1 - c0s1);\n+//      sp_max = FFMIN(sp_max, FFMAX(-b,-f));\n+//      int sp_min = FFMIN(c0s1 - p1, c0s1 - m1);\n+//      sp_min = FFMIN(sp_min, FFMAX(b,f));\n+//      diff = diff == 0 ? 0 : FFMAX3(diff, sp_min, sp_max);\n+.macro SPAT_CHECK diff, m2s1, m1, c0s1, p1, p2s1, t0, t1, t2, t3\n+        uqsub           \\t0\\().16b, \\p1\\().16b, \\c0s1\\().16b\n+        uqsub           \\t2\\().16b, \\m1\\().16b, \\c0s1\\().16b\n+        umin            \\t2\\().16b, \\t0\\().16b, \\t2\\().16b\n+\n+        uqsub           \\t1\\().16b, \\m1\\().16b, \\m2s1\\().16b\n+        uqsub           \\t3\\().16b, \\p1\\().16b, \\p2s1\\().16b\n+        umax            \\t3\\().16b, \\t3\\().16b, \\t1\\().16b\n+        umin            \\t3\\().16b, \\t3\\().16b, \\t2\\().16b\n+\n+        uqsub           \\t0\\().16b, \\c0s1\\().16b, \\p1\\().16b\n+        uqsub           \\t2\\().16b, \\c0s1\\().16b, \\m1\\().16b\n+        umin            \\t2\\().16b, \\t0\\().16b, \\t2\\().16b\n+\n+        uqsub           \\t1\\().16b, \\m2s1\\().16b, \\m1\\().16b\n+        uqsub           \\t0\\().16b, \\p2s1\\().16b, \\p1\\().16b\n+        umax            \\t0\\().16b, \\t0\\().16b, \\t1\\().16b\n+        umin            \\t2\\().16b, \\t2\\().16b, \\t0\\().16b\n+\n+        cmeq            \\t1\\().16b, \\diff\\().16b, #0\n+        umax            \\diff\\().16b, \\diff\\().16b, \\t3\\().16b\n+        umax            \\diff\\().16b, \\diff\\().16b, \\t2\\().16b\n+        bic             \\diff\\().16b, \\diff\\().16b, \\t1\\().16b\n+.endm\n+\n+//      i0 = s0;\n+//      if (i0 > d0 + diff0)\n+//          i0 = d0 + diff0;\n+//      else if (i0 < d0 - diff0)\n+//          i0 = d0 - diff0;\n+//\n+// i0 = s0 is safe\n+.macro DIFF_CLIP i0, s0, d0, diff, t0, t1\n+        uqadd           \\t0\\().16b, \\d0\\().16b, \\diff\\().16b\n+        uqsub           \\t1\\().16b, \\d0\\().16b, \\diff\\().16b\n+        umin            \\i0\\().16b, \\s0\\().16b, \\t0\\().16b\n+        umax            \\i0\\().16b, \\i0\\().16b, \\t1\\().16b\n+.endm\n+\n+//      i0 = FFABS(m1 - p1) > td0 ? i1 : i2;\n+//      DIFF_CLIP\n+//\n+// i0 = i1 is safe\n+.macro INTERPOL i0, i1, i2, m1, d0, p1, td0, diff, t0, t1, t2\n+        uabd            \\t0\\().16b, \\m1\\().16b, \\p1\\().16b\n+        cmhi            \\t0\\().16b, \\t0\\().16b, \\td0\\().16b\n+        bsl             \\t0\\().16b, \\i1\\().16b, \\i2\\().16b\n+        DIFF_CLIP       \\i0, \\t0, \\d0, \\diff, \\t1, \\t2\n+.endm\n+\n+.macro PUSH_VREGS\n+        stp             d8,  d9,  [sp, #-64]!\n+        stp             d10, d11, [sp, #16]\n+        stp             d12, d13, [sp, #32]\n+        stp             d14, d15, [sp, #48]\n+.endm\n+\n+.macro POP_VREGS\n+        ldp             d14, d15, [sp, #48]\n+        ldp             d12, d13, [sp, #32]\n+        ldp             d10, d11, [sp, #16]\n+        ldp             d8,  d9,  [sp], #64\n+.endm\n+\n+.macro LDR_COEFFS d, t0\n+        movrel          \\t0, coeffs, 0\n+        ld1             {\\d\\().8h}, [\\t0]\n+.endm\n+\n+// static const uint16_t coef_lf[2] = { 4309, 213 };\n+// static const uint16_t coef_hf[3] = { 5570, 3801, 1016 };\n+// static const uint16_t coef_sp[2] = { 5077, 981 };\n+\n+const coeffs, align=4   // align 4 means align on 2^4 boundry\n+        .hword          4309 * 4, 213 * 4               // lf[0]*4 = v0.h[0]\n+        .hword          5570, 3801, 1016, -3801         // hf[0] = v0.h[2], -hf[1] = v0.h[5]\n+        .hword          5077, 981                       // sp[0] = v0.h[6]\n+endconst\n+\n+// ===========================================================================\n+//\n+// void ff_bwdif_filter_line3_neon(\n+//         void * dst1,         // x0\n+//         int d_stride,        // w1\n+//         const void * prev1,  // x2\n+//         const void * cur1,   // x3\n+//         const void * next1,  // x4\n+//         int s_stride,        // w5\n+//         int w,               // w6\n+//         int parity,          // w7\n+//         int clip_max);       // [sp, #0] (Ignored)\n+\n+function ff_bwdif_filter_line3_neon, export=1\n+        // Sanity check w\n+        cmp             w6, #0\n+        ble             99f\n+\n+        LDR_COEFFS      v0, x17\n+\n+// #define prev2 cur\n+//        const uint8_t * restrict next2 = parity ? prev : next;\n+        cmp             w7, #0\n+        csel            x17, x2, x4, ne\n+\n+        // We want all the V registers - save all the ones we must\n+        PUSH_VREGS\n+\n+        // Some rearrangement of initial values for nice layout of refs in regs\n+        mov             w10, w6                         // w10 = loop count\n+        neg             w9,  w5                         // w9  = mref\n+        lsl             w8,  w9,  #1                    // w8 =  mref2\n+        add             w7,  w9,  w9, LSL #1            // w7  = mref3\n+        lsl             w6,  w9,  #2                    // w6  = mref4\n+        mov             w11, w5                         // w11 = pref\n+        lsl             w12, w5,  #1                    // w12 = pref2\n+        add             w13, w5,  w5, LSL #1            // w13 = pref3\n+        lsl             w14, w5,  #2                    // w14 = pref4\n+        add             w15, w5,  w5, LSL #2            // w15 = pref5\n+        add             w16, w14, w12                   // w16 = pref6\n+\n+        lsl             w5,  w1,  #1                    // w5 = d_stride * 2\n+\n+//         for (x = 0; x < w; x++) {\n+//             int diff0, diff2;\n+//             int d0, d2;\n+//             int temporal_diff0, temporal_diff2;\n+//\n+//             int i1, i2;\n+//             int j1, j2;\n+//             int p6, p5, p4, p3, p2, p1, c0, m1, m2, m3, m4;\n+\n+10:\n+//             c0 = prev2[0] + next2[0];                // c0 = v20, v21\n+//             d0  = c0 >> 1;                           // d0 = v10\n+//             temporal_diff0 = FFABS(prev2[0] - next2[0]); // td0 = v11\n+        ldr             q31, [x3]\n+        ldr             q21, [x17]\n+        uhadd           v10.16b, v31.16b, v21.16b\n+        uabd            v11.16b, v31.16b, v21.16b\n+        uaddl           v20.8h,  v21.8b,  v31.8b\n+        uaddl2          v21.8h,  v21.16b, v31.16b\n+\n+        ldr             q31, [x3, w6, sxtw]\n+        ldr             q23, [x17, w6, sxtw]\n+\n+//             i1 = coef_hf[0] * c0;                    // i1 = v2-v5\n+        UMULL4K         v2, v3, v4, v5, v20, v21, v0.h[2]\n+\n+        ldr             q30, [x3, w14, sxtw]\n+        ldr             q25, [x17, w14, sxtw]\n+\n+//             m4 = prev2[mrefs4] + next2[mrefs4];      // m4 = v22,v23\n+        uaddl           v22.8h,  v23.8b,  v31.8b\n+        uaddl2          v23.8h,  v23.16b, v31.16b\n+\n+//             p4 = prev2[prefs4] + next2[prefs4];      // p4 = v24,v25, (p4 >> 1) = v12\n+        uhadd           v12.16b, v25.16b, v30.16b\n+        uaddl           v24.8h,  v25.8b,  v30.8b\n+        uaddl2          v25.8h,  v25.16b, v30.16b\n+\n+//             j1 = -coef_hf[1] * (c0 + p4);            // j1 = v6-v9  (-c0:v20,v21)\n+        add             v20.8h,  v20.8h,  v24.8h\n+        add             v21.8h,  v21.8h,  v25.8h\n+        SMULL4K         v6, v7, v8, v9, v20, v21, v0.h[5]\n+\n+//             m3 = cur[mrefs3];                        // m3 = v20\n+        ldr             q20, [x3, w7, sxtw]\n+\n+//             p3 = cur[prefs3];                        // p3 = v21\n+        ldr             q21, [x3, w13, sxtw]\n+\n+//             i1 += coef_hf[2] * (m4 + p4);            // (-m4:v22,v23) (-p4:v24,v25)\n+        add             v22.8h,  v22.8h,  v24.8h\n+        add             v23.8h,  v23.8h,  v25.8h\n+        UMLAL4K         v2, v3, v4, v5, v22, v23, v0.h[4]\n+\n+        ldr             q29, [x3, w8, sxtw]\n+        ldr             q23, [x17, w8, sxtw]\n+\n+//             i1 -= coef_lf[1] * 4 * (m3 + p3);        // -\n+        uaddl           v30.8h,  v20.8b,  v21.8b\n+        uaddl2          v31.8h,  v20.16b, v21.16b\n+\n+        ldr             q28, [x3, w16, sxtw]\n+        ldr             q25, [x17, w16, sxtw]\n+\n+        UMLSL4K         v2, v3, v4, v5, v30, v31, v0.h[1]\n+\n+//             m2 = prev2[mrefs2] + next2[mrefs2];      // m2 = v22,v23, (m2 >> 1) = v13\n+        uhadd           v13.16b, v23.16b, v29.16b\n+        uaddl           v22.8h,  v23.8b,  v29.8b\n+        uaddl2          v23.8h,  v23.16b, v29.16b\n+\n+        ldr             q31, [x3, w12, sxtw]\n+        ldr             q27, [x17, w12, sxtw]\n+\n+//             p6 = prev2[prefs6] + next2[prefs6];      // p6 = v24,v25\n+        uaddl           v24.8h,  v25.8b,  v28.8b\n+        uaddl2          v25.8h,  v25.16b, v28.16b\n+\n+//             j1 += coef_hf[2] * (m2 + p6);            // (-p6:v24,v25)\n+        add             v24.8h,  v24.8h,  v22.8h\n+        add             v25.8h,  v25.8h,  v23.8h\n+        UMLAL4K         v6, v7, v8, v9, v24, v25, v0.h[4]\n+\n+//             m1 = cur[mrefs];                         // m1 = v24\n+        ldr             q24, [x3, w9, sxtw]\n+\n+//             p5 = cur[prefs5];                        // p5 = v25\n+        ldr             q25, [x3, w15, sxtw]\n+\n+//             p2 = prev2[prefs2] + next2[prefs2];      // p2 = v26, v27\n+//             temporal_diff2 = FFABS(prev2[prefs2] - next2[prefs2]); // td2 = v14\n+//             d2  = p2 >> 1;                           // d2 = v15\n+        uabd            v14.16b, v31.16b, v27.16b\n+        uhadd           v15.16b, v31.16b, v27.16b\n+        uaddl           v26.8h,  v27.8b,  v31.8b\n+        uaddl2          v27.8h,  v27.16b, v31.16b\n+\n+//             j1 += coef_hf[0] * p2;                   // -\n+        UMLAL4K         v6, v7, v8, v9, v26, v27, v0.h[2]\n+\n+//             i1 -= coef_hf[1] * (m2 + p2);            // (-m2:v22,v23*) (-p2:v26*,v27*)\n+        add             v22.8h,  v22.8h,  v26.8h\n+        add             v23.8h,  v23.8h,  v27.8h\n+        UMLSL4K         v2, v3, v4, v5, v22, v23, v0.h[3]\n+\n+//             p1 = cur[prefs];                         // p1 = v22\n+        ldr             q22, [x3, w11, sxtw]\n+\n+//             j1 -= coef_lf[1] * 4 * (m1 + p5);        // -\n+        uaddl           v26.8h,  v24.8b,  v25.8b\n+        uaddl2          v27.8h,  v24.16b, v25.16b\n+        UMLSL4K         v6, v7, v8, v9, v26, v27, v0.h[1]\n+\n+//             j2 = (coef_sp[0] * (p1 + p3) - coef_sp[1]  * (m1 + p5)) >> 13; // (-p5:v25*) j2=v16\n+        uaddl           v18.8h,  v22.8b,  v21.8b\n+        uaddl2          v19.8h,  v22.16b, v21.16b\n+        UMULL4K         v28, v29, v30, v31, v18, v19, v0.h[6]\n+\n+        uaddl           v18.8h,  v24.8b,  v25.8b\n+        uaddl2          v19.8h,  v24.16b, v25.16b\n+        UMLSL4K         v28, v29, v30, v31, v18, v19, v0.h[7]\n+\n+        SQSHRUNN        v16, v28, v29, v30, v31, 13\n+\n+//             i2 = (coef_sp[0] * (m1 + p1) - coef_sp[1] * (m3 + p3)) >> 13; // (-m3:v20*) i2=v17\n+        uaddl           v18.8h,  v22.8b,  v24.8b\n+        uaddl2          v19.8h,  v22.16b, v24.16b\n+        UMULL4K         v28, v29, v30, v31, v18, v19, v0.h[6]\n+\n+        uaddl           v18.8h,  v20.8b,  v21.8b\n+        uaddl2          v19.8h,  v20.16b, v21.16b\n+        UMLSL4K         v28, v29, v30, v31, v18, v19, v0.h[7]\n+\n+        SQSHRUNN        v17, v28, v29, v30, v31, 13\n+\n+//             i1 += coef_lf[0] * 4 * (m1 + p1);        // p1 = v22, m1 = v24\n+        uaddl           v26.8h,  v24.8b,  v22.8b\n+        uaddl2          v27.8h,  v24.16b, v22.16b\n+        UMLAL4K         v2, v3, v4, v5, v26, v27, v0.h[0]\n+\n+        ldr             q31, [x2, w9, sxtw]\n+        ldr             q29, [x4, w9, sxtw]\n+\n+//             j1 += coef_lf[0] * 4 * (p1 + p3);        // p1 = v22, p3 = v21\n+        uaddl           v26.8h,  v21.8b,  v22.8b\n+        uaddl2          v27.8h,  v21.16b, v22.16b\n+        UMLAL4K         v6, v7, v8, v9, v26, v27, v0.h[0]\n+\n+        ldr             q30, [x2, w11, sxtw]\n+        ldr             q28, [x4, w11, sxtw]\n+\n+//             i1 >>= 15;                               // i1 = v2, -v3, -v4*, -v5*\n+        SQSHRUNN        v2, v2, v3, v4, v5, 15\n+\n+//             j1 >>= 15;                               // j1 = v3, -v6*, -v7*, -v8*, -v9*\n+        SQSHRUNN        v3, v6, v7, v8, v9, 15\n+\n+//             {\n+//                 int t1 =(FFABS(prev[mrefs] - m1) + FFABS(prev[prefs] - p1)) >> 1;\n+//                 int t2 =(FFABS(next[mrefs] - m1) + FFABS(next[prefs] - p1)) >> 1;\n+        uabd            v30.16b, v22.16b, v30.16b\n+        uabd            v31.16b, v24.16b, v31.16b\n+        uabd            v28.16b, v22.16b, v28.16b\n+        uabd            v29.16b, v24.16b, v29.16b\n+        uhadd           v31.16b, v31.16b, v30.16b\n+        uhadd           v29.16b, v29.16b, v28.16b\n+\n+        ldr             q27, [x2, w13, sxtw]\n+        ldr             q26, [x4, w13, sxtw]\n+\n+//                 diff0 = FFMAX3(temporal_diff0 >> 1, t1, t2); // diff0=v18\n+        ushr            v18.16b, v11.16b, #1\n+        umax            v18.16b, v18.16b, v31.16b\n+        umax            v18.16b, v18.16b, v29.16b\n+//             }                                        // v28, v30 preserved for next block\n+//             {  // tdiff2 = v14\n+//                 int t1 =(FFABS(prev[prefs] - p1) + FFABS(prev[prefs3] - p3)) >> 1;\n+//                 int t2 =(FFABS(next[prefs] - p1) + FFABS(next[prefs3] - p3)) >> 1;\n+        uabd            v31.16b, v21.16b, v27.16b\n+        uabd            v29.16b, v21.16b, v26.16b\n+        uhadd           v31.16b, v31.16b, v30.16b\n+        uhadd           v29.16b, v29.16b, v28.16b\n+\n+//                 diff2 = FFMAX3(temporal_diff2 >> 1, t1, t2); // diff2=v19\n+        ushr            v19.16b, v14.16b, #1\n+        umax            v19.16b, v19.16b, v31.16b\n+        umax            v19.16b, v19.16b, v29.16b\n+//             }\n+\n+        // diff0 = v18, (m2 >> 1) = v13, m1 = v24, d0 = v10, p1 = v22, d2 = v15\n+        SPAT_CHECK      v18, v13, v24, v10, v22, v15, v31, v30, v29, v28\n+\n+        //  diff2 = v19, d0 = v10, p1 = v22, d2 = v15, p3 = v21, (p4 >> 1) = v12\n+        SPAT_CHECK      v19, v10, v22, v15, v21, v12, v31, v30, v29, v28\n+\n+        // j1 = v3, j2 = v16, p1 = v22, d2 = v15, p3 = v21, td2 = v14, diff2 = v19\n+        INTERPOL        v3, v3, v16, v22, v15, v21, v14, v19, v31, v30, v29\n+\n+//                 dst[d_stride * 2] = av_clip_uint8(interpol);\n+        str             q3,  [x0, w5, sxtw]\n+\n+//             dst[d_stride] = p1;\n+        str             q22, [x0, w1, sxtw]\n+\n+        // i1 = v2, i2 = v17, m1 = v24, d0 = v10, p1 = v22, td2 = v11, diff2 = v18\n+        INTERPOL        v2, v2, v17, v24, v10, v22, v11, v18, v31, v30, v29\n+\n+//                 dst[0] = av_clip_uint8(interpol);\n+        str             q2,  [x0], #16\n+//             }\n+//\n+//             dst++;\n+//             cur++;\n+//             prev++;\n+//             prev2++;\n+//             next++;\n+//         }\n+        subs            w10, w10, #16\n+        add             x2,  x2,  #16\n+        add             x3,  x3,  #16\n+        add             x4,  x4,  #16\n+        add             x17, x17, #16\n+        bgt             10b\n+\n+        POP_VREGS\n+99:\n+        ret\n+endfunc\n+\n+// ===========================================================================\n+//\n+// void filter_line(\n+//      void *dst1,     // x0\n+//      void *prev1,    // x1\n+//      void *cur1,     // x2\n+//      void *next1,    // x3\n+//      int w,          // w4\n+//      int prefs,      // w5\n+//      int mrefs,      // w6\n+//      int prefs2,     // w7\n+//      int mrefs2,     // [sp, #0]\n+//      int prefs3,     // [sp, #SP_INT]\n+//      int mrefs3,     // [sp, #SP_INT*2]\n+//      int prefs4,     // [sp, #SP_INT*3]\n+//      int mrefs4,     // [sp, #SP_INT*4]\n+//      int parity,     // [sp, #SP_INT*5]\n+//      int clip_max)   // [sp, #SP_INT*6]\n+\n+function ff_bwdif_filter_line_neon, export=1\n+        // Sanity check w\n+        cmp             w4, #0\n+        ble             99f\n+\n+        // Rearrange regs to be the same as line3 for ease of debug!\n+        mov             w10, w4                         // w10 = loop count\n+        mov             w9,  w6                         // w9  = mref\n+        mov             w12, w7                         // w12 = pref2\n+        mov             w11, w5                         // w11 = pref\n+        ldr             w8,  [sp, #0]                   // w8 =  mref2\n+        ldr             w7,  [sp, #SP_INT*2]            // w7  = mref3\n+        ldr             w6,  [sp, #SP_INT*4]            // w6  = mref4\n+        ldr             w13, [sp, #SP_INT]              // w13 = pref3\n+        ldr             w14, [sp, #SP_INT*3]            // w14 = pref4\n+\n+        mov             x4,  x3\n+        mov             x3,  x2\n+        mov             x2,  x1\n+\n+        LDR_COEFFS      v0, x17\n+\n+// #define prev2 cur\n+//        const uint8_t * restrict next2 = parity ? prev : next;\n+        ldr             w17, [sp, #SP_INT*5]            // parity\n+        cmp             w17, #0\n+        csel            x17, x2, x4, ne\n+\n+        PUSH_VREGS\n+\n+//         for (x = 0; x < w; x++) {\n+//             int diff0, diff2;\n+//             int d0, d2;\n+//             int temporal_diff0, temporal_diff2;\n+//\n+//             int i1, i2;\n+//             int j1, j2;\n+//             int p6, p5, p4, p3, p2, p1, c0, m1, m2, m3, m4;\n+\n+10:\n+//             c0 = prev2[0] + next2[0];            // c0 = v20, v21\n+//             d0  = c0 >> 1;                       // d0 = v10\n+//             temporal_diff0 = FFABS(prev2[0] - next2[0]); // td0 = v11\n+        ldr             q31, [x3]\n+        ldr             q21, [x17]\n+        uhadd           v10.16b, v31.16b, v21.16b\n+        uabd            v11.16b, v31.16b, v21.16b\n+        uaddl           v20.8h,  v21.8b,  v31.8b\n+        uaddl2          v21.8h,  v21.16b, v31.16b\n+\n+        ldr             q31, [x3, w6, sxtw]\n+        ldr             q23, [x17, w6, sxtw]\n+\n+//             i1 = coef_hf[0] * c0;                // i1 = v2-v5\n+        UMULL4K         v2, v3, v4, v5, v20, v21, v0.h[2]\n+\n+        ldr             q30, [x3, w14, sxtw]\n+        ldr             q25, [x17, w14, sxtw]\n+\n+//             m4 = prev2[mrefs4] + next2[mrefs4];  // m4 = v22,v23\n+        uaddl           v22.8h,  v23.8b,  v31.8b\n+        uaddl2          v23.8h,  v23.16b, v31.16b\n+\n+//             p4 = prev2[prefs4] + next2[prefs4];  // p4 = v24,v25, (p4 >> 1) = v12\n+        uhadd           v12.16b, v25.16b, v30.16b\n+        uaddl           v24.8h,  v25.8b,  v30.8b\n+        uaddl2          v25.8h,  v25.16b, v30.16b\n+\n+//             m3 = cur[mrefs3];                    // m3 = v20\n+        ldr             q20, [x3, w7, sxtw]\n+\n+//             p3 = cur[prefs3];                    // p3 = v21\n+        ldr             q21, [x3, w13, sxtw]\n+\n+//             i1 += coef_hf[2] * (m4 + p4);        // (-m4:v22,v23) (-p4:v24,v25)\n+        add             v22.8h,  v22.8h,  v24.8h\n+        add             v23.8h,  v23.8h,  v25.8h\n+        UMLAL4K         v2, v3, v4, v5, v22, v23, v0.h[4]\n+\n+        ldr             q29, [x3, w8, sxtw]\n+        ldr             q23, [x17, w8, sxtw]\n+\n+//             i1 -= coef_lf[1] * 4 * (m3 + p3);    // -\n+        uaddl           v30.8h,  v20.8b,  v21.8b\n+        uaddl2          v31.8h,  v20.16b, v21.16b\n+\n+        UMLSL4K         v2, v3, v4, v5, v30, v31, v0.h[1]\n+\n+        ldr             q31, [x3, w12, sxtw]\n+        ldr             q27, [x17, w12, sxtw]\n+\n+//             m2 = prev2[mrefs2] + next2[mrefs2];  // m2 = v22,v23, (m2 >> 1) = v13\n+        uhadd           v13.16b, v23.16b, v29.16b\n+        uaddl           v22.8h,  v23.8b,  v29.8b\n+        uaddl2          v23.8h,  v23.16b, v29.16b\n+\n+//             m1 = cur[mrefs];                     // m1 = v24\n+        ldr             q24, [x3, w9, sxtw]\n+\n+//             p2 = prev2[prefs2] + next2[prefs2];  // p2 = v26, v27\n+//             temporal_diff2 = FFABS(prev2[prefs2] - next2[prefs2]); // td2 = v14\n+//             d2  = p2 >> 1;                       // d2 = v15\n+        uabd            v14.16b, v31.16b, v27.16b\n+        uhadd           v15.16b, v31.16b, v27.16b\n+        uaddl           v26.8h,  v27.8b,  v31.8b\n+        uaddl2          v27.8h,  v27.16b, v31.16b\n+\n+//             i1 -= coef_hf[1] * (m2 + p2);        // (-m2:v22,v23*) (-p2:v26*,v27*)\n+        add             v22.8h,  v22.8h,  v26.8h\n+        add             v23.8h,  v23.8h,  v27.8h\n+        UMLSL4K         v2, v3, v4, v5, v22, v23, v0.h[3]\n+\n+//             p1 = cur[prefs];                     // p1 = v22\n+        ldr             q22, [x3, w11, sxtw]\n+\n+//             i2 = (coef_sp[0] * (m1 + p1) - coef_sp[1] * (m3 + p3)) >> 13; // (-m3:v20*) i2=v17\n+        uaddl           v18.8h,  v22.8b,  v24.8b\n+        uaddl2          v19.8h,  v22.16b, v24.16b\n+        UMULL4K         v28, v29, v30, v31, v18, v19, v0.h[6]\n+\n+        uaddl           v18.8h,  v20.8b,  v21.8b\n+        uaddl2          v19.8h,  v20.16b, v21.16b\n+        UMLSL4K         v28, v29, v30, v31, v18, v19, v0.h[7]\n+\n+        SQSHRUNN        v17, v28, v29, v30, v31, 13\n+\n+//             i1 += coef_lf[0] * 4 * (m1 + p1);    // p1 = v22, m1 = v24\n+        uaddl           v26.8h,  v24.8b,  v22.8b\n+        uaddl2          v27.8h,  v24.16b, v22.16b\n+        UMLAL4K         v2, v3, v4, v5, v26, v27, v0.h[0]\n+\n+        ldr             q31, [x2, w9, sxtw]\n+        ldr             q29, [x4, w9, sxtw]\n+\n+        ldr             q30, [x2, w11, sxtw]\n+        ldr             q28, [x4, w11, sxtw]\n+\n+//             i1 >>= 15;                            // i1 = v2, -v3, -v4*, -v5*\n+        SQSHRUNN        v2, v2, v3, v4, v5, 15\n+\n+//             {\n+//                 int t1 =(FFABS(prev[mrefs] - m1) + FFABS(prev[prefs] - p1)) >> 1;\n+//                 int t2 =(FFABS(next[mrefs] - m1) + FFABS(next[prefs] - p1)) >> 1;\n+        uabd            v30.16b, v22.16b, v30.16b\n+        uabd            v31.16b, v24.16b, v31.16b\n+        uabd            v28.16b, v22.16b, v28.16b\n+        uabd            v29.16b, v24.16b, v29.16b\n+        uhadd           v31.16b, v31.16b, v30.16b\n+        uhadd           v29.16b, v29.16b, v28.16b\n+\n+//                 diff0 = FFMAX3(temporal_diff0 >> 1, t1, t2); // diff0=v18\n+        ushr            v18.16b, v11.16b, #1\n+        umax            v18.16b, v18.16b, v31.16b\n+        umax            v18.16b, v18.16b, v29.16b\n+\n+        // diff0 = v18, (m2 >> 1) = v13, m1 = v24, d0 = v10, p1 = v22, d2 = v15\n+        SPAT_CHECK      v18, v13, v24, v10, v22, v15, v31, v30, v29, v28\n+\n+        // i1 = v2, i2 = v17, m1 = v24, d0 = v10, p1 = v22, td2 = v11, diff2 = v18\n+        INTERPOL        v2, v2, v17, v24, v10, v22, v11, v18, v31, v30, v29\n+\n+//                 dst[0] = av_clip_uint8(interpol);\n+        str             q2,  [x0], #16\n+//             }\n+//\n+//             dst++;\n+//             cur++;\n+//             prev++;\n+//             prev2++;\n+//             next++;\n+//         }\n+\n+        subs            w10, w10, #16\n+        add             x2,  x2,  #16\n+        add             x3,  x3,  #16\n+        add             x4,  x4,  #16\n+        add             x17, x17, #16\n+        bgt             10b\n+\n+        POP_VREGS\n+99:\n+        ret\n+endfunc\n+\n+// ============================================================================\n+//\n+// void ff_bwdif_filter_edge_neon(\n+//      void *dst1,     // x0\n+//      void *prev1,    // x1\n+//      void *cur1,     // x2\n+//      void *next1,    // x3\n+//      int w,          // w4\n+//      int prefs,      // w5\n+//      int mrefs,      // w6\n+//      int prefs2,     // w7\n+//      int mrefs2,     // [sp, #0]\n+//      int parity,     // [sp, #SP_INT]\n+//      int clip_max,   // [sp, #SP_INT*2]  unused\n+//      int spat);      // [sp, #SP_INT*3]\n+\n+function ff_bwdif_filter_edge_neon, export=1\n+        // Sanity check w\n+        cmp             w4, #0\n+        ble             99f\n+\n+// #define prev2 cur\n+//     const uint8_t * restrict next2 = parity ? prev : next;\n+\n+        ldr             w8,  [sp, #0]                   // mrefs2\n+\n+        ldr             w17, [sp, #SP_INT]              // parity\n+        ldr             w16, [sp, #SP_INT*3]            // spat\n+        cmp             w17, #0\n+        csel            x17, x1, x3, ne\n+\n+//     for (x = 0; x < w; x++) {\n+\n+10:\n+//        int m1 = cur[mrefs];\n+//        int d = (prev2[0] + next2[0]) >> 1;\n+//        int p1 = cur[prefs];\n+//        int temporal_diff0 = FFABS(prev2[0] - next2[0]);\n+//        int temporal_diff1 =(FFABS(prev[mrefs] - m1) + FFABS(prev[prefs] - p1)) >> 1;\n+//        int temporal_diff2 =(FFABS(next[mrefs] - m1) + FFABS(next[prefs] - p1)) >> 1;\n+//        int diff = FFMAX3(temporal_diff0 >> 1, temporal_diff1, temporal_diff2);\n+        ldr             q31, [x2]\n+        ldr             q21, [x17]\n+        uhadd           v16.16b, v31.16b, v21.16b       // d0 = v16\n+        uabd            v17.16b, v31.16b, v21.16b       // td0 = v17\n+        ldr             q24, [x2, w6, sxtw]             // m1 = v24\n+        ldr             q22, [x2, w5, sxtw]             // p1 = v22\n+\n+        ldr             q0,  [x1, w6, sxtw]             // prev[mrefs]\n+        ldr             q2,  [x1, w5, sxtw]             // prev[prefs]\n+        ldr             q1,  [x3, w6, sxtw]             // next[mrefs]\n+        ldr             q3,  [x3, w5, sxtw]             // next[prefs]\n+\n+        ushr            v29.16b, v17.16b, #1\n+\n+        uabd            v31.16b, v0.16b,  v24.16b\n+        uabd            v30.16b, v2.16b,  v22.16b\n+        uhadd           v0.16b,  v31.16b, v30.16b       // td1 = q0\n+\n+        uabd            v31.16b, v1.16b,  v24.16b\n+        uabd            v30.16b, v3.16b,  v22.16b\n+        uhadd           v1.16b,  v31.16b, v30.16b       // td2 = q1\n+\n+        umax            v0.16b,  v0.16b,  v29.16b\n+        umax            v0.16b,  v0.16b,  v1.16b        // diff = v0\n+\n+//        if (spat) {\n+//            SPAT_CHECK()\n+//        }\n+//        i0 = (m1 + p1) >> 1;\n+        cbz             w16, 1f\n+\n+        ldr             q31, [x2,  w8, sxtw]\n+        ldr             q18, [x17, w8, sxtw]\n+        ldr             q30, [x2,  w7, sxtw]\n+        ldr             q19, [x17, w7, sxtw]\n+        uhadd           v18.16b, v18.16b, v31.16b\n+        uhadd           v19.16b, v19.16b, v30.16b\n+\n+        SPAT_CHECK      v0, v18, v24, v16, v22, v19, v31, v30, v29, v28\n+\n+1:\n+        uhadd           v2.16b,  v22.16b, v24.16b\n+\n+        // i0 = v2, s0 = v2, d0 = v16, diff = v0, t0 = v31, t1 = v30\n+        DIFF_CLIP       v2, v2, v16, v0, v31, v30\n+\n+//        dst[0] = av_clip(interpol, 0, clip_max);\n+        str             q2, [x0], #16\n+\n+//        dst++;\n+//        cur++;\n+//    }\n+        subs            w4,  w4,  #16\n+        add             x1,  x1,  #16\n+        add             x2,  x2,  #16\n+        add             x3,  x3,  #16\n+        add             x17, x17, #16\n+        bgt             10b\n+\n+99:\n+        ret\n+endfunc\n+\n+// ============================================================================\n+//\n+// void ff_bwdif_filter_intra_neon(\n+//      void *dst1,     // x0\n+//      void *cur1,     // x1\n+//      int w,          // w2\n+//      int prefs,      // w3\n+//      int mrefs,      // w4\n+//      int prefs3,     // w5\n+//      int mrefs3,     // w6\n+//      int parity,     // w7       unused\n+//      int clip_max)   // [sp, #0] unused\n+\n+function ff_bwdif_filter_intra_neon, export=1\n+        cmp             w2, #0\n+        ble             99f\n+\n+        LDR_COEFFS      v0, x17\n+\n+//    for (x = 0; x < w; x++) {\n+10:\n+\n+//        interpol = (coef_sp[0] * (cur[mrefs] + cur[prefs]) - coef_sp[1] * (cur[mrefs3] + cur[prefs3])) >> 13;\n+        ldr             q31, [x1, w4, sxtw]\n+        ldr             q30, [x1, w3, sxtw]\n+        ldr             q29, [x1, w6, sxtw]\n+        ldr             q28, [x1, w5, sxtw]\n+\n+        uaddl           v20.8h,  v31.8b,  v30.8b\n+        uaddl2          v21.8h,  v31.16b, v30.16b\n+\n+        UMULL4K         v2, v3, v4, v5, v20, v21, v0.h[6]\n+\n+        uaddl           v20.8h,  v29.8b,  v28.8b\n+        uaddl2          v21.8h,  v29.16b, v28.16b\n+\n+        UMLSL4K         v2, v3, v4, v5, v20, v21, v0.h[7]\n+\n+//        dst[0] = av_clip(interpol, 0, clip_max);\n+        SQSHRUNN        v2, v2, v3, v4, v5, 13\n+        str             q2, [x0], #16\n+\n+//        dst++;\n+//        cur++;\n+//    }\n+\n+        subs            w2,  w2,  #16\n+        add             x1,  x1,  #16\n+        bgt             10b\n+\n+99:\n+        ret\n+endfunc\ndiff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c\nindex 0872c6e0f2..1dd05e4d75 100644\n--- a/libavfilter/allfilters.c\n+++ b/libavfilter/allfilters.c\n@@ -218,6 +218,7 @@ extern AVFilter ff_vf_dedot;\n extern AVFilter ff_vf_deflate;\n extern AVFilter ff_vf_deflicker;\n extern AVFilter ff_vf_deinterlace_qsv;\n+extern AVFilter ff_vf_deinterlace_v4l2m2m;\n extern AVFilter ff_vf_deinterlace_vaapi;\n extern AVFilter ff_vf_dejudder;\n extern AVFilter ff_vf_delogo;\n@@ -377,6 +378,7 @@ extern AVFilter ff_vf_scale;\n extern AVFilter ff_vf_scale_cuda;\n extern AVFilter ff_vf_scale_npp;\n extern AVFilter ff_vf_scale_qsv;\n+extern AVFilter ff_vf_scale_v4l2m2m;\n extern AVFilter ff_vf_scale_vaapi;\n extern AVFilter ff_vf_scale_vulkan;\n extern AVFilter ff_vf_scale2ref;\n@@ -438,6 +440,7 @@ extern AVFilter ff_vf_transpose_opencl;\n extern AVFilter ff_vf_transpose_vaapi;\n extern AVFilter ff_vf_trim;\n extern AVFilter ff_vf_unpremultiply;\n+extern AVFilter ff_vf_unsand;\n extern AVFilter ff_vf_unsharp;\n extern AVFilter ff_vf_unsharp_opencl;\n extern AVFilter ff_vf_untile;\ndiff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c\nindex f6b572b3de..44fe8b679c 100644\n--- a/libavfilter/avfiltergraph.c\n+++ b/libavfilter/avfiltergraph.c\n@@ -32,6 +32,9 @@\n #include \"libavutil/internal.h\"\n #include \"libavutil/opt.h\"\n #include \"libavutil/pixdesc.h\"\n+#if CONFIG_UNSAND_FILTER\n+#include \"libavutil/rpi_sand_fns.h\"\n+#endif\n \n #define FF_INTERNAL_FIELDS 1\n #include \"framequeue.h\"\n@@ -422,6 +425,19 @@ static int formats_declared(AVFilterContext *f)\n     return 1;\n }\n \n+#if CONFIG_UNSAND_FILTER\n+static int has_sand_format(const AVFilterFormats * const ff)\n+{\n+    int i;\n+    for (i = 0; i != ff->nb_formats; ++i) {\n+        if (av_rpi_is_sand_format(ff->formats[i])) {\n+            return 1;\n+        }\n+    }\n+    return 0;\n+}\n+#endif\n+\n /**\n  * Perform one round of query_formats() and merging formats lists on the\n  * filter graph.\n@@ -462,6 +478,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)\n         for (j = 0; j < filter->nb_inputs; j++) {\n             AVFilterLink *link = filter->inputs[j];\n             int convert_needed = 0;\n+            unsigned int extra_convert_tried = 0;\n \n             if (!link)\n                 continue;\n@@ -504,11 +521,14 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)\n                            link->outcfg.formats, link->type)\n #undef MERGE_DISPATCH\n \n-            if (convert_needed) {\n+            while (convert_needed) {\n                 AVFilterContext *convert;\n                 const AVFilter *filter;\n                 AVFilterLink *inlink, *outlink;\n                 char inst_name[30];\n+                int can_retry = 0;\n+\n+                convert_needed = 0;\n \n                 if (graph->disable_auto_convert) {\n                     av_log(log_ctx, AV_LOG_ERROR,\n@@ -521,19 +541,45 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)\n                 /* couldn't merge format lists. auto-insert conversion filter */\n                 switch (link->type) {\n                 case AVMEDIA_TYPE_VIDEO:\n-                    if (!(filter = avfilter_get_by_name(\"scale\"))) {\n-                        av_log(log_ctx, AV_LOG_ERROR, \"'scale' filter \"\n-                               \"not present, cannot convert pixel formats.\\n\");\n-                        return AVERROR(EINVAL);\n-                    }\n-\n-                    snprintf(inst_name, sizeof(inst_name), \"auto_scaler_%d\",\n-                             scaler_count++);\n+#if CONFIG_UNSAND_FILTER\n+                    // Only try each extra conversion once\n+                    // The unsand output pad should never trigger has_sand_format\n+                    // but it is better to be safe\n+                    if ((extra_convert_tried & 1) == 0 && has_sand_format(link->incfg.formats)) {\n+                        if (!(filter = avfilter_get_by_name(\"unsand\"))) {\n+                            av_log(log_ctx, AV_LOG_ERROR, \"'unsand' filter \"\n+                                   \"not present, cannot convert pixel formats.\\n\");\n+                            return AVERROR(EINVAL);\n+                        }\n+\n+                        snprintf(inst_name, sizeof(inst_name), \"auto_unsand_%d\",\n+                                 scaler_count++);\n+\n+                        if ((ret = avfilter_graph_create_filter(&convert, filter,\n+                                                                inst_name, \"\", NULL,\n+                                                                graph)) < 0)\n+                            return ret;\n \n-                    if ((ret = avfilter_graph_create_filter(&convert, filter,\n-                                                            inst_name, graph->scale_sws_opts, NULL,\n-                                                            graph)) < 0)\n-                        return ret;\n+                        extra_convert_tried |= 1;\n+                        can_retry = 1;\n+                    }\n+                    else\n+#endif\n+                    {\n+                        if (!(filter = avfilter_get_by_name(\"scale\"))) {\n+                            av_log(log_ctx, AV_LOG_ERROR, \"'scale' filter \"\n+                                   \"not present, cannot convert pixel formats.\\n\");\n+                            return AVERROR(EINVAL);\n+                        }\n+\n+                        snprintf(inst_name, sizeof(inst_name), \"auto_scaler_%d\",\n+                                 scaler_count++);\n+\n+                        if ((ret = avfilter_graph_create_filter(&convert, filter,\n+                                                                inst_name, graph->scale_sws_opts, NULL,\n+                                                                graph)) < 0)\n+                            return ret;\n+                    }\n                     break;\n                 case AVMEDIA_TYPE_AUDIO:\n                     if (!(filter = avfilter_get_by_name(\"aresample\"))) {\n@@ -589,6 +635,13 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)\n                                                 outlink->outcfg.samplerates) ||\n                      CHECKED_MERGE(channel_layouts, outlink->incfg.channel_layouts,\n                                                     outlink->outcfg.channel_layouts))) {\n+                    // Try adding an unsand filter & see if that helps\n+                    if (ret < 0 && can_retry) {\n+                        link = outlink;\n+                        convert_needed = 1;\n+                        continue;\n+                    }\n+\n                     if (ret < 0)\n                         return ret;\n                     av_log(log_ctx, AV_LOG_ERROR,\ndiff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c\nindex 15d897cff6..c134759bbf 100644\n--- a/libavfilter/buffersink.c\n+++ b/libavfilter/buffersink.c\n@@ -58,6 +58,11 @@ typedef struct BufferSinkContext {\n     int sample_rates_size;\n \n     AVFrame *peeked_frame;\n+\n+    union {\n+        av_buffersink_alloc_video_frame * video;\n+    } alloc_cb;\n+    void * alloc_v;\n } BufferSinkContext;\n \n #define NB_ITEMS(list) (list ## _size / sizeof(*list))\n@@ -148,6 +153,22 @@ int attribute_align_arg av_buffersink_get_samples(AVFilterContext *ctx,\n     return get_frame_internal(ctx, frame, 0, nb_samples);\n }\n \n+static AVFrame * alloc_video_buffer(AVFilterLink *link, int w, int h)\n+{\n+    AVFilterContext * const ctx = link->dst;\n+    BufferSinkContext * const bs = ctx->priv;\n+    return bs->alloc_cb.video ? bs->alloc_cb.video(ctx, bs->alloc_v, w, h) :\n+        ff_default_get_video_buffer(link, w, h);\n+}\n+\n+int av_buffersink_set_alloc_video_frame(AVFilterContext *ctx, av_buffersink_alloc_video_frame * cb, void * v)\n+{\n+    BufferSinkContext * const bs = ctx->priv;\n+    bs->alloc_cb.video = cb;\n+    bs->alloc_v = v;\n+    return 0;\n+}\n+\n #if FF_API_BUFFERSINK_ALLOC\n AVBufferSinkParams *av_buffersink_params_alloc(void)\n {\n@@ -331,6 +352,7 @@ static const AVFilterPad avfilter_vsink_buffer_inputs[] = {\n     {\n         .name = \"default\",\n         .type = AVMEDIA_TYPE_VIDEO,\n+        .get_video_buffer = alloc_video_buffer,\n     },\n     { NULL }\n };\ndiff --git a/libavfilter/buffersink.h b/libavfilter/buffersink.h\nindex 69ed0f29a8..a3aa6fcb3c 100644\n--- a/libavfilter/buffersink.h\n+++ b/libavfilter/buffersink.h\n@@ -198,6 +198,9 @@ int av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame);\n  */\n int av_buffersink_get_samples(AVFilterContext *ctx, AVFrame *frame, int nb_samples);\n \n+typedef AVFrame * av_buffersink_alloc_video_frame(AVFilterContext * ctx, void * v, int w, int h);\n+int av_buffersink_set_alloc_video_frame(AVFilterContext *ctx, av_buffersink_alloc_video_frame * cb, void * v);\n+\n /**\n  * @}\n  */\ndiff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c\nindex da1cf9941e..c588ed23cb 100644\n--- a/libavfilter/buffersrc.c\n+++ b/libavfilter/buffersrc.c\n@@ -188,7 +188,7 @@ int attribute_align_arg av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFra\n \n         switch (ctx->outputs[0]->type) {\n         case AVMEDIA_TYPE_VIDEO:\n-            CHECK_VIDEO_PARAM_CHANGE(ctx, s, frame->width, frame->height,\n+            CHECK_VIDEO_PARAM_CHANGE(ctx, s, av_frame_cropped_width(frame), av_frame_cropped_height(frame),\n                                      frame->format, frame->pts);\n             break;\n         case AVMEDIA_TYPE_AUDIO:\ndiff --git a/libavfilter/bwdif.h b/libavfilter/bwdif.h\nindex 889ff772ed..496cec72ef 100644\n--- a/libavfilter/bwdif.h\n+++ b/libavfilter/bwdif.h\n@@ -35,8 +35,29 @@ typedef struct BWDIFContext {\n     void (*filter_edge)(void *dst, void *prev, void *cur, void *next,\n                         int w, int prefs, int mrefs, int prefs2, int mrefs2,\n                         int parity, int clip_max, int spat);\n+    void (*filter_line3)(void *dst, int dstride,\n+                         const void *prev, const void *cur, const void *next, int prefs,\n+                         int w, int parity, int clip_max);\n } BWDIFContext;\n \n-void ff_bwdif_init_x86(BWDIFContext *bwdif);\n+void ff_bwdif_init_filter_line(BWDIFContext *bwdif, int bit_depth);\n+void ff_bwdif_init_x86(BWDIFContext *bwdif, int bit_depth);\n+void ff_bwdif_init_aarch64(BWDIFContext *bwdif, int bit_depth);\n+\n+void ff_bwdif_filter_edge_c(void *dst1, void *prev1, void *cur1, void *next1,\n+                            int w, int prefs, int mrefs, int prefs2, int mrefs2,\n+                            int parity, int clip_max, int spat);\n+\n+void ff_bwdif_filter_intra_c(void *dst1, void *cur1, int w, int prefs, int mrefs,\n+                             int prefs3, int mrefs3, int parity, int clip_max);\n+\n+void ff_bwdif_filter_line_c(void *dst1, void *prev1, void *cur1, void *next1,\n+                            int w, int prefs, int mrefs, int prefs2, int mrefs2,\n+                            int prefs3, int mrefs3, int prefs4, int mrefs4,\n+                            int parity, int clip_max);\n+\n+void ff_bwdif_filter_line3_c(void * dst1, int d_stride,\n+                             const void * prev1, const void * cur1, const void * next1, int s_stride,\n+                             int w, int parity, int clip_max);\n \n #endif /* AVFILTER_BWDIF_H */\ndiff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c\nindex b6aed7a450..b268113271 100644\n--- a/libavfilter/vf_bwdif.c\n+++ b/libavfilter/vf_bwdif.c\n@@ -123,8 +123,8 @@ typedef struct ThreadData {\n         next2++; \\\n     }\n \n-static void filter_intra(void *dst1, void *cur1, int w, int prefs, int mrefs,\n-                         int prefs3, int mrefs3, int parity, int clip_max)\n+void ff_bwdif_filter_intra_c(void *dst1, void *cur1, int w, int prefs, int mrefs,\n+                             int prefs3, int mrefs3, int parity, int clip_max)\n {\n     uint8_t *dst = dst1;\n     uint8_t *cur = cur1;\n@@ -133,10 +133,10 @@ static void filter_intra(void *dst1, void *cur1, int w, int prefs, int mrefs,\n     FILTER_INTRA()\n }\n \n-static void filter_line_c(void *dst1, void *prev1, void *cur1, void *next1,\n-                          int w, int prefs, int mrefs, int prefs2, int mrefs2,\n-                          int prefs3, int mrefs3, int prefs4, int mrefs4,\n-                          int parity, int clip_max)\n+void ff_bwdif_filter_line_c(void *dst1, void *prev1, void *cur1, void *next1,\n+                            int w, int prefs, int mrefs, int prefs2, int mrefs2,\n+                            int prefs3, int mrefs3, int prefs4, int mrefs4,\n+                            int parity, int clip_max)\n {\n     uint8_t *dst   = dst1;\n     uint8_t *prev  = prev1;\n@@ -151,9 +151,34 @@ static void filter_line_c(void *dst1, void *prev1, void *cur1, void *next1,\n     FILTER2()\n }\n \n-static void filter_edge(void *dst1, void *prev1, void *cur1, void *next1,\n-                        int w, int prefs, int mrefs, int prefs2, int mrefs2,\n-                        int parity, int clip_max, int spat)\n+#define NEXT_LINE()\\\n+    dst += d_stride; \\\n+    prev += prefs; \\\n+    cur  += prefs; \\\n+    next += prefs;\n+\n+void ff_bwdif_filter_line3_c(void * dst1, int d_stride,\n+                             const void * prev1, const void * cur1, const void * next1, int s_stride,\n+                             int w, int parity, int clip_max)\n+{\n+    const int prefs = s_stride;\n+    uint8_t * dst  = dst1;\n+    const uint8_t * prev = prev1;\n+    const uint8_t * cur  = cur1;\n+    const uint8_t * next = next1;\n+\n+    ff_bwdif_filter_line_c(dst, (void*)prev, (void*)cur, (void*)next, w,\n+                           prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max);\n+    NEXT_LINE();\n+    memcpy(dst, cur, w);\n+    NEXT_LINE();\n+    ff_bwdif_filter_line_c(dst, (void*)prev, (void*)cur, (void*)next, w,\n+                           prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max);\n+}\n+\n+void ff_bwdif_filter_edge_c(void *dst1, void *prev1, void *cur1, void *next1,\n+                            int w, int prefs, int mrefs, int prefs2, int mrefs2,\n+                            int parity, int clip_max, int spat)\n {\n     uint8_t *dst   = dst1;\n     uint8_t *prev  = prev1;\n@@ -213,6 +238,13 @@ static void filter_edge_16bit(void *dst1, void *prev1, void *cur1, void *next1,\n     FILTER2()\n }\n \n+// Round job start line down to multiple of 4 so that if filter_line3 exists\n+// and the frame is a multiple of 4 high then filter_line will never be called\n+static inline int job_start(const int jobnr, const int nb_jobs, const int h)\n+{\n+    return jobnr >= nb_jobs ? h : ((h * jobnr) / nb_jobs) & ~3;\n+}\n+\n static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)\n {\n     BWDIFContext *s = ctx->priv;\n@@ -222,8 +254,8 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)\n     int clip_max = (1 << (yadif->csp->comp[td->plane].depth)) - 1;\n     int df = (yadif->csp->comp[td->plane].depth + 7) / 8;\n     int refs = linesize / df;\n-    int slice_start = (td->h *  jobnr   ) / nb_jobs;\n-    int slice_end   = (td->h * (jobnr+1)) / nb_jobs;\n+    int slice_start = job_start(jobnr, nb_jobs, td->h);\n+    int slice_end   = job_start(jobnr + 1, nb_jobs, td->h);\n     int y;\n \n     for (y = slice_start; y < slice_end; y++) {\n@@ -245,6 +277,11 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)\n                                refs << 1, -(refs << 1),\n                                td->parity ^ td->tff, clip_max,\n                                (y < 2) || ((y + 3) > td->h) ? 0 : 1);\n+            } else if (s->filter_line3 && y + 2 < slice_end && y + 6 < td->h) {\n+                s->filter_line3(dst, td->frame->linesize[td->plane],\n+                                prev, cur, next, linesize, td->w,\n+                                td->parity ^ td->tff, clip_max);\n+                y += 2;\n             } else {\n                 s->filter_line(dst, prev, cur, next, td->w,\n                                refs, -refs, refs << 1, -(refs << 1),\n@@ -280,7 +317,8 @@ static void filter(AVFilterContext *ctx, AVFrame *dstpic,\n         td.h     = h;\n         td.plane = i;\n \n-        ctx->internal->execute(ctx, filter_slice, &td, NULL, FFMIN(h, ff_filter_get_nb_threads(ctx)));\n+        ctx->internal->execute(ctx, filter_slice, &td, NULL,\n+                          FFMIN((h+3)/4, ff_filter_get_nb_threads(ctx)));\n     }\n     if (yadif->current_field == YADIF_FIELD_END) {\n         yadif->current_field = YADIF_FIELD_NORMAL;\n@@ -350,20 +388,29 @@ static int config_props(AVFilterLink *link)\n \n     yadif->csp = av_pix_fmt_desc_get(link->format);\n     yadif->filter = filter;\n-    if (yadif->csp->comp[0].depth > 8) {\n+    ff_bwdif_init_filter_line(s, yadif->csp->comp[0].depth);\n+\n+    return 0;\n+}\n+\n+av_cold void ff_bwdif_init_filter_line(BWDIFContext *s, int bit_depth)\n+{\n+    s->filter_line3 = 0;\n+    if (bit_depth > 8) {\n         s->filter_intra = filter_intra_16bit;\n         s->filter_line  = filter_line_c_16bit;\n         s->filter_edge  = filter_edge_16bit;\n     } else {\n-        s->filter_intra = filter_intra;\n-        s->filter_line  = filter_line_c;\n-        s->filter_edge  = filter_edge;\n+        s->filter_intra = ff_bwdif_filter_intra_c;\n+        s->filter_line  = ff_bwdif_filter_line_c;\n+        s->filter_edge  = ff_bwdif_filter_edge_c;\n     }\n \n-    if (ARCH_X86)\n-        ff_bwdif_init_x86(s);\n-\n-    return 0;\n+#if ARCH_X86\n+    ff_bwdif_init_x86(s, bit_depth);\n+#elif ARCH_AARCH64\n+    ff_bwdif_init_aarch64(s, bit_depth);\n+#endif\n }\n \n \ndiff --git a/libavfilter/vf_deinterlace_v4l2m2m.c b/libavfilter/vf_deinterlace_v4l2m2m.c\nnew file mode 100644\nindex 0000000000..d4c11cfc51\n--- /dev/null\n+++ b/libavfilter/vf_deinterlace_v4l2m2m.c\n@@ -0,0 +1,2115 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+/**\n+ * @file\n+ * deinterlace video filter - V4L2 M2M\n+ */\n+\n+#include <drm_fourcc.h>\n+\n+#include <linux/videodev2.h>\n+\n+#include <dirent.h>\n+#include <fcntl.h>\n+#include <poll.h>\n+#include <stdatomic.h>\n+#include <stdio.h>\n+#include <string.h>\n+#include <sys/ioctl.h>\n+#include <sys/mman.h>\n+#include <unistd.h>\n+\n+#include \"config.h\"\n+\n+#include \"libavutil/avassert.h\"\n+#include \"libavutil/avstring.h\"\n+#include \"libavutil/common.h\"\n+#include \"libavutil/hwcontext.h\"\n+#include \"libavutil/hwcontext_drm.h\"\n+#include \"libavutil/internal.h\"\n+#include \"libavutil/mathematics.h\"\n+#include \"libavutil/opt.h\"\n+#include \"libavutil/pixdesc.h\"\n+#include \"libavutil/time.h\"\n+\n+#define FF_INTERNAL_FIELDS 1\n+#include \"framequeue.h\"\n+#include \"filters.h\"\n+#include \"avfilter.h\"\n+#include \"formats.h\"\n+#include \"internal.h\"\n+#include \"scale_eval.h\"\n+#include \"video.h\"\n+\n+#ifndef DRM_FORMAT_P030\n+#define DRM_FORMAT_P030 fourcc_code('P', '0', '3', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel packed */\n+#endif\n+\n+// V4L2_PIX_FMT_NV12_10_COL128 and V4L2_PIX_FMT_NV12_COL128 should be defined\n+// in drm_fourcc.h hopefully will be sometime in the future but until then...\n+#ifndef V4L2_PIX_FMT_NV12_10_COL128\n+#define V4L2_PIX_FMT_NV12_10_COL128 v4l2_fourcc('N', 'C', '3', '0')\n+#endif\n+\n+#ifndef V4L2_PIX_FMT_NV12_COL128\n+#define V4L2_PIX_FMT_NV12_COL128 v4l2_fourcc('N', 'C', '1', '2') /* 12  Y/CbCr 4:2:0 128 pixel wide column */\n+#endif\n+\n+typedef struct V4L2Queue V4L2Queue;\n+typedef struct DeintV4L2M2MContextShared DeintV4L2M2MContextShared;\n+\n+typedef enum filter_type_v4l2_e\n+{\n+    FILTER_V4L2_DEINTERLACE = 1,\n+    FILTER_V4L2_SCALE,\n+} filter_type_v4l2_t;\n+\n+typedef struct V4L2Buffer {\n+    int enqueued;\n+    int reenqueue;\n+    struct v4l2_buffer buffer;\n+    AVFrame frame;\n+    struct v4l2_plane planes[VIDEO_MAX_PLANES];\n+    int num_planes;\n+    AVDRMFrameDescriptor drm_frame;\n+    V4L2Queue *q;\n+} V4L2Buffer;\n+\n+typedef struct V4L2Queue {\n+    struct v4l2_format format;\n+    struct v4l2_selection sel;\n+    int eos;\n+    int num_buffers;\n+    V4L2Buffer *buffers;\n+    const char * name;\n+    DeintV4L2M2MContextShared *ctx;\n+} V4L2Queue;\n+\n+typedef struct pts_stats_s\n+{\n+    void * logctx;\n+    const char * name;  // For debug\n+    unsigned int last_count;\n+    unsigned int last_interval;\n+    int64_t last_pts;\n+} pts_stats_t;\n+\n+#define PTS_TRACK_SIZE 32\n+typedef struct pts_track_el_s\n+{\n+    uint32_t n;\n+    unsigned int interval;\n+    AVFrame * props;\n+} pts_track_el_t;\n+\n+typedef struct pts_track_s\n+{\n+    uint32_t n;\n+    uint32_t last_n;\n+    int got_2;\n+    void * logctx;\n+    pts_stats_t stats;\n+    pts_track_el_t a[PTS_TRACK_SIZE];\n+} pts_track_t;\n+\n+typedef enum drain_state_e\n+{\n+    DRAIN_NONE = 0,     // Not draining\n+    DRAIN_TIMEOUT,      // Drain until normal timeout setup yields no frame\n+    DRAIN_LAST,         // Drain with long timeout last_frame in received on output expected\n+    DRAIN_EOS,          // Drain with long timeout EOS expected\n+    DRAIN_DONE          // Drained\n+} drain_state_t;\n+\n+typedef struct DeintV4L2M2MContextShared {\n+    void * logctx;  // For logging - will be NULL when done\n+    filter_type_v4l2_t filter_type;\n+\n+    int fd;\n+    int done;   // fd closed - awating all refs dropped\n+    int width;\n+    int height;\n+\n+    int drain;          // EOS received (inlink status)\n+    drain_state_t drain_state;\n+    int64_t drain_pts;  // PTS associated with inline status\n+\n+    unsigned int frames_rx;\n+    unsigned int frames_tx;\n+\n+    // from options\n+    int output_width;\n+    int output_height;\n+    enum AVPixelFormat output_format;\n+\n+    int has_enc_stop;\n+    // We expect to get exactly the same number of frames out as we put in\n+    // We can drain by matching input to output\n+    int one_to_one;\n+\n+    int orig_width;\n+    int orig_height;\n+    atomic_uint refcount;\n+\n+    AVBufferRef *hw_frames_ctx;\n+\n+    unsigned int field_order;\n+\n+    pts_track_t track;\n+\n+    V4L2Queue output;\n+    V4L2Queue capture;\n+} DeintV4L2M2MContextShared;\n+\n+typedef struct DeintV4L2M2MContext {\n+    const AVClass *class;\n+\n+    DeintV4L2M2MContextShared *shared;\n+\n+    char * w_expr;\n+    char * h_expr;\n+    char * output_format_string;;\n+\n+    int force_original_aspect_ratio;\n+    int force_divisible_by;\n+\n+    char *colour_primaries_string;\n+    char *colour_transfer_string;\n+    char *colour_matrix_string;\n+    int   colour_range;\n+    char *chroma_location_string;\n+\n+    enum AVColorPrimaries colour_primaries;\n+    enum AVColorTransferCharacteristic colour_transfer;\n+    enum AVColorSpace colour_matrix;\n+    enum AVChromaLocation chroma_location;\n+} DeintV4L2M2MContext;\n+\n+\n+static inline int drain_frame_expected(const drain_state_t d)\n+{\n+    return d == DRAIN_EOS || d == DRAIN_LAST;\n+}\n+\n+// These just list the ones we know we can cope with\n+static uint32_t\n+fmt_av_to_v4l2(const enum AVPixelFormat avfmt)\n+{\n+    switch (avfmt) {\n+    case AV_PIX_FMT_YUV420P:\n+        return V4L2_PIX_FMT_YUV420;\n+    case AV_PIX_FMT_NV12:\n+        return V4L2_PIX_FMT_NV12;\n+#if CONFIG_SAND\n+    case AV_PIX_FMT_RPI4_8:\n+    case AV_PIX_FMT_SAND128:\n+        return V4L2_PIX_FMT_NV12_COL128;\n+#endif\n+    default:\n+        break;\n+    }\n+    return 0;\n+}\n+\n+static enum AVPixelFormat\n+fmt_v4l2_to_av(const uint32_t pixfmt)\n+{\n+    switch (pixfmt) {\n+    case V4L2_PIX_FMT_YUV420:\n+        return AV_PIX_FMT_YUV420P;\n+    case V4L2_PIX_FMT_NV12:\n+        return AV_PIX_FMT_NV12;\n+#if CONFIG_SAND\n+    case V4L2_PIX_FMT_NV12_COL128:\n+        return AV_PIX_FMT_RPI4_8;\n+#endif\n+    default:\n+        break;\n+    }\n+    return AV_PIX_FMT_NONE;\n+}\n+\n+static unsigned int pts_stats_interval(const pts_stats_t * const stats)\n+{\n+    return stats->last_interval;\n+}\n+\n+// Pick 64 for max last count - that is >1sec at 60fps\n+#define STATS_LAST_COUNT_MAX 64\n+#define STATS_INTERVAL_MAX (1 << 30)\n+static void pts_stats_add(pts_stats_t * const stats, int64_t pts)\n+{\n+    if (pts == AV_NOPTS_VALUE || pts == stats->last_pts) {\n+        if (stats->last_count < STATS_LAST_COUNT_MAX)\n+            ++stats->last_count;\n+        return;\n+    }\n+\n+    if (stats->last_pts != AV_NOPTS_VALUE) {\n+        const int64_t interval = pts - stats->last_pts;\n+\n+        if (interval < 0 || interval >= STATS_INTERVAL_MAX ||\n+            stats->last_count >= STATS_LAST_COUNT_MAX) {\n+            if (stats->last_interval != 0)\n+                av_log(stats->logctx, AV_LOG_DEBUG, \"%s: %s: Bad interval: %\" PRId64 \"/%d\\n\",\n+                       __func__, stats->name, interval, stats->last_count);\n+            stats->last_interval = 0;\n+        }\n+        else {\n+            const int64_t frame_time = interval / (int64_t)stats->last_count;\n+\n+            if (frame_time != stats->last_interval)\n+                av_log(stats->logctx, AV_LOG_DEBUG, \"%s: %s: New interval: %u->%\" PRId64 \"/%d=%\" PRId64 \"\\n\",\n+                       __func__, stats->name, stats->last_interval, interval, stats->last_count, frame_time);\n+            stats->last_interval = frame_time;\n+        }\n+    }\n+\n+    stats->last_pts = pts;\n+    stats->last_count = 1;\n+}\n+\n+static void pts_stats_init(pts_stats_t * const stats, void * logctx, const char * name)\n+{\n+    *stats = (pts_stats_t){\n+        .logctx = logctx,\n+        .name = name,\n+        .last_count = 1,\n+        .last_interval = 0,\n+        .last_pts = AV_NOPTS_VALUE\n+    };\n+}\n+\n+static inline uint32_t pts_track_next_n(pts_track_t * const trk)\n+{\n+    if (++trk->n == 0)\n+        trk->n = 1;\n+    return trk->n;\n+}\n+\n+static int pts_track_get_frame(pts_track_t * const trk, const struct timeval tv, AVFrame * const dst)\n+{\n+    uint32_t n = (uint32_t)(tv.tv_usec / 2 + tv.tv_sec * 500000);\n+    pts_track_el_t * t;\n+\n+    // As a first guess assume that n==0 means last frame\n+    if (n == 0) {\n+        n = trk->last_n;\n+        if (n == 0)\n+            goto fail;\n+    }\n+\n+    t = trk->a + (n & (PTS_TRACK_SIZE - 1));\n+\n+    if (t->n != n) {\n+        av_log(trk->logctx, AV_LOG_ERROR, \"%s: track failure: got %u, expected %u\\n\", __func__, n, trk->n);\n+        goto fail;\n+    }\n+\n+    // 1st frame is simple - just believe it\n+    if (n != trk->last_n) {\n+        trk->last_n = n;\n+        trk->got_2 = 0;\n+        return av_frame_copy_props(dst, t->props);\n+    }\n+\n+    // Only believe in a single interpolated frame\n+    if (trk->got_2)\n+        goto fail;\n+    trk->got_2 = 1;\n+\n+    av_frame_copy_props(dst, t->props);\n+\n+\n+    // If we can't guess - don't\n+    if (t->interval == 0) {\n+        dst->best_effort_timestamp = AV_NOPTS_VALUE;\n+        dst->pts = AV_NOPTS_VALUE;\n+        dst->pkt_dts = AV_NOPTS_VALUE;\n+    }\n+    else {\n+        if (dst->best_effort_timestamp != AV_NOPTS_VALUE)\n+            dst->best_effort_timestamp += t->interval / 2;\n+        if (dst->pts != AV_NOPTS_VALUE)\n+            dst->pts += t->interval / 2;\n+        if (dst->pkt_dts != AV_NOPTS_VALUE)\n+            dst->pkt_dts += t->interval / 2;\n+    }\n+\n+    return 0;\n+\n+fail:\n+    trk->last_n = 0;\n+    trk->got_2 = 0;\n+    dst->pts = AV_NOPTS_VALUE;\n+    dst->pkt_dts = AV_NOPTS_VALUE;\n+    return 0;\n+}\n+\n+// We are only ever expecting in-order frames so nothing more clever is required\n+static unsigned int\n+pts_track_count(const pts_track_t * const trk)\n+{\n+    return (trk->n - trk->last_n) & (PTS_TRACK_SIZE - 1);\n+}\n+\n+static struct timeval pts_track_add_frame(pts_track_t * const trk, const AVFrame * const src)\n+{\n+    const uint32_t n = pts_track_next_n(trk);\n+    pts_track_el_t * const t = trk->a + (n & (PTS_TRACK_SIZE - 1));\n+\n+    pts_stats_add(&trk->stats, src->pts);\n+\n+    t->n = n;\n+    t->interval = pts_stats_interval(&trk->stats); // guess that next interval is the same as the last\n+    av_frame_unref(t->props);\n+    av_frame_copy_props(t->props, src);\n+\n+    // We now know what the previous interval was, rather than having to guess,\n+    // so set it.  There is a better than decent chance that this is before\n+    // we use it.\n+    if (t->interval != 0) {\n+        pts_track_el_t * const prev_t = trk->a + ((n - 1) & (PTS_TRACK_SIZE - 1));\n+        prev_t->interval = t->interval;\n+    }\n+\n+    // In case deinterlace interpolates frames use every other usec\n+    return (struct timeval){.tv_sec = n / 500000, .tv_usec = (n % 500000) * 2};\n+}\n+\n+static void pts_track_uninit(pts_track_t * const trk)\n+{\n+    unsigned int i;\n+    for (i = 0; i != PTS_TRACK_SIZE; ++i) {\n+        trk->a[i].n = 0;\n+        av_frame_free(&trk->a[i].props);\n+    }\n+}\n+\n+static int pts_track_init(pts_track_t * const trk, void *logctx)\n+{\n+    unsigned int i;\n+    trk->n = 1;\n+    pts_stats_init(&trk->stats, logctx, \"track\");\n+    for (i = 0; i != PTS_TRACK_SIZE; ++i) {\n+        trk->a[i].n = 0;\n+        if ((trk->a[i].props = av_frame_alloc()) == NULL) {\n+            pts_track_uninit(trk);\n+            return AVERROR(ENOMEM);\n+        }\n+    }\n+    return 0;\n+}\n+\n+static inline uint32_t\n+fmt_bpl(const struct v4l2_format * const fmt, const unsigned int plane_n)\n+{\n+    return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.plane_fmt[plane_n].bytesperline : fmt->fmt.pix.bytesperline;\n+}\n+\n+static inline uint32_t\n+fmt_height(const struct v4l2_format * const fmt)\n+{\n+    return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.height : fmt->fmt.pix.height;\n+}\n+\n+static inline uint32_t\n+fmt_width(const struct v4l2_format * const fmt)\n+{\n+    return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.width : fmt->fmt.pix.width;\n+}\n+\n+static inline uint32_t\n+fmt_pixelformat(const struct v4l2_format * const fmt)\n+{\n+    return V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ? fmt->fmt.pix_mp.pixelformat : fmt->fmt.pix.pixelformat;\n+}\n+\n+static inline uint32_t\n+buf_bytesused0(const struct v4l2_buffer * const buf)\n+{\n+    return V4L2_TYPE_IS_MULTIPLANAR(buf->type) ? buf->m.planes[0].bytesused : buf->bytesused;\n+}\n+\n+static void\n+init_format(V4L2Queue * const q, const uint32_t format_type)\n+{\n+    memset(&q->format, 0, sizeof(q->format));\n+    memset(&q->sel,    0, sizeof(q->sel));\n+    q->format.type = format_type;\n+    q->sel.type    = format_type;\n+}\n+\n+static int deint_v4l2m2m_prepare_context(DeintV4L2M2MContextShared *ctx)\n+{\n+    struct v4l2_capability cap;\n+    int ret;\n+\n+    memset(&cap, 0, sizeof(cap));\n+    ret = ioctl(ctx->fd, VIDIOC_QUERYCAP, &cap);\n+    if (ret < 0)\n+        return ret;\n+\n+    if (ctx->filter_type == FILTER_V4L2_SCALE &&\n+        strcmp(\"bcm2835-codec-isp\", cap.card) != 0)\n+    {\n+        av_log(ctx->logctx, AV_LOG_DEBUG, \"Not ISP\\n\");\n+        return AVERROR(EINVAL);\n+    }\n+\n+    if (!(cap.capabilities & V4L2_CAP_STREAMING)) {\n+        av_log(ctx->logctx, AV_LOG_DEBUG, \"No streaming\\n\");\n+        return AVERROR(EINVAL);\n+    }\n+\n+    if (cap.capabilities & V4L2_CAP_VIDEO_M2M_MPLANE) {\n+        init_format(&ctx->capture, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);\n+        init_format(&ctx->output,  V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);\n+    }\n+    else if (cap.capabilities & V4L2_CAP_VIDEO_M2M) {\n+        init_format(&ctx->capture, V4L2_BUF_TYPE_VIDEO_CAPTURE);\n+        init_format(&ctx->output,  V4L2_BUF_TYPE_VIDEO_OUTPUT);\n+    }\n+    else {\n+        av_log(ctx->logctx, AV_LOG_DEBUG, \"Not M2M\\n\");\n+        return AVERROR(EINVAL);\n+    }\n+\n+    return 0;\n+}\n+\n+// Just use for probe - doesn't modify q format\n+static int deint_v4l2m2m_try_format(V4L2Queue *queue, const uint32_t width, const uint32_t height, const enum AVPixelFormat avfmt)\n+{\n+    struct v4l2_format fmt         = {.type = queue->format.type};\n+    DeintV4L2M2MContextShared *ctx = queue->ctx;\n+    int ret, field;\n+    // Pick YUV to test with if not otherwise specified\n+    uint32_t pixelformat = avfmt == AV_PIX_FMT_NONE ? V4L2_PIX_FMT_YUV420 : fmt_av_to_v4l2(avfmt);\n+    enum AVPixelFormat r_avfmt;\n+\n+\n+    ret = ioctl(ctx->fd, VIDIOC_G_FMT, &fmt);\n+    if (ret)\n+        av_log(ctx->logctx, AV_LOG_ERROR, \"VIDIOC_G_FMT failed: %d\\n\", ret);\n+\n+    if (ctx->filter_type == FILTER_V4L2_DEINTERLACE && V4L2_TYPE_IS_OUTPUT(fmt.type))\n+        field = V4L2_FIELD_INTERLACED_TB;\n+    else\n+        field = V4L2_FIELD_NONE;\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(fmt.type)) {\n+        fmt.fmt.pix_mp.pixelformat = pixelformat;\n+        fmt.fmt.pix_mp.field = field;\n+        fmt.fmt.pix_mp.width = width;\n+        fmt.fmt.pix_mp.height = height;\n+    } else {\n+        fmt.fmt.pix.pixelformat = pixelformat;\n+        fmt.fmt.pix.field = field;\n+        fmt.fmt.pix.width = width;\n+        fmt.fmt.pix.height = height;\n+    }\n+\n+    av_log(ctx->logctx, AV_LOG_TRACE, \"%s: Trying format for type %d, wxh: %dx%d, fmt: %08x, size %u bpl %u pre\\n\", __func__,\n+         fmt.type, fmt.fmt.pix_mp.width, fmt.fmt.pix_mp.height,\n+         fmt.fmt.pix_mp.pixelformat,\n+         fmt.fmt.pix_mp.plane_fmt[0].sizeimage, fmt.fmt.pix_mp.plane_fmt[0].bytesperline);\n+\n+    ret = ioctl(ctx->fd, VIDIOC_TRY_FMT, &fmt);\n+    if (ret)\n+        return AVERROR(EINVAL);\n+\n+    av_log(ctx->logctx, AV_LOG_TRACE, \"%s: Trying format for type %d, wxh: %dx%d, fmt: %08x, size %u bpl %u post\\n\", __func__,\n+         fmt.type, fmt.fmt.pix_mp.width, fmt.fmt.pix_mp.height,\n+         fmt.fmt.pix_mp.pixelformat,\n+         fmt.fmt.pix_mp.plane_fmt[0].sizeimage, fmt.fmt.pix_mp.plane_fmt[0].bytesperline);\n+\n+    r_avfmt = fmt_v4l2_to_av(fmt_pixelformat(&fmt));\n+    if (r_avfmt != avfmt && avfmt != AV_PIX_FMT_NONE) {\n+        av_log(ctx->logctx, AV_LOG_DEBUG, \"Unable to set format %s on %s port\\n\", av_get_pix_fmt_name(avfmt), V4L2_TYPE_IS_CAPTURE(fmt.type) ? \"dest\" : \"src\");\n+        return AVERROR(EINVAL);\n+    }\n+    if (r_avfmt == AV_PIX_FMT_NONE) {\n+        av_log(ctx->logctx, AV_LOG_DEBUG, \"No supported format on %s port\\n\", V4L2_TYPE_IS_CAPTURE(fmt.type) ? \"dest\" : \"src\");\n+        return AVERROR(EINVAL);\n+    }\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(fmt.type)) {\n+        if (fmt.fmt.pix_mp.field != field) {\n+            av_log(ctx->logctx, AV_LOG_DEBUG, \"format not supported for type %d\\n\", fmt.type);\n+\n+            return AVERROR(EINVAL);\n+        }\n+    } else {\n+        if (fmt.fmt.pix.field != field) {\n+            av_log(ctx->logctx, AV_LOG_DEBUG, \"format not supported for type %d\\n\", fmt.type);\n+\n+            return AVERROR(EINVAL);\n+        }\n+    }\n+\n+    return 0;\n+}\n+\n+static int\n+do_s_fmt(V4L2Queue * const q)\n+{\n+    DeintV4L2M2MContextShared * const ctx = q->ctx;\n+    const uint32_t pixelformat = fmt_pixelformat(&q->format);\n+    int ret;\n+\n+    ret = ioctl(ctx->fd, VIDIOC_S_FMT, &q->format);\n+    if (ret) {\n+        ret = AVERROR(errno);\n+        av_log(ctx->logctx, AV_LOG_ERROR, \"VIDIOC_S_FMT failed: %s\\n\", av_err2str(ret));\n+        return ret;\n+    }\n+\n+    if (pixelformat != fmt_pixelformat(&q->format)) {\n+        av_log(ctx->logctx, AV_LOG_ERROR, \"Format not supported: %s; S_FMT returned %s\\n\", av_fourcc2str(pixelformat), av_fourcc2str(fmt_pixelformat(&q->format)));\n+        return AVERROR(EINVAL);\n+    }\n+\n+    q->sel.target = V4L2_TYPE_IS_OUTPUT(q->sel.type) ? V4L2_SEL_TGT_CROP : V4L2_SEL_TGT_COMPOSE,\n+    q->sel.flags  = V4L2_TYPE_IS_OUTPUT(q->sel.type) ? V4L2_SEL_FLAG_LE : V4L2_SEL_FLAG_GE;\n+\n+    ret = ioctl(ctx->fd, VIDIOC_S_SELECTION, &q->sel);\n+    if (ret) {\n+        ret = AVERROR(errno);\n+        av_log(ctx->logctx, AV_LOG_WARNING, \"VIDIOC_S_SELECTION failed: %s\\n\", av_err2str(ret));\n+    }\n+\n+    return 0;\n+}\n+\n+static void\n+set_fmt_color(struct v4l2_format *const fmt,\n+               const enum AVColorPrimaries avcp,\n+               const enum AVColorSpace avcs,\n+               const enum AVColorTransferCharacteristic avxc)\n+{\n+    enum v4l2_ycbcr_encoding ycbcr = V4L2_YCBCR_ENC_DEFAULT;\n+    enum v4l2_colorspace cs = V4L2_COLORSPACE_DEFAULT;\n+    enum v4l2_xfer_func xfer = V4L2_XFER_FUNC_DEFAULT;\n+\n+    switch (avcp) {\n+    case AVCOL_PRI_BT709:\n+        cs = V4L2_COLORSPACE_REC709;\n+        ycbcr = V4L2_YCBCR_ENC_709;\n+        break;\n+    case AVCOL_PRI_BT470M:\n+        cs = V4L2_COLORSPACE_470_SYSTEM_M;\n+        ycbcr = V4L2_YCBCR_ENC_601;\n+        break;\n+    case AVCOL_PRI_BT470BG:\n+        cs = V4L2_COLORSPACE_470_SYSTEM_BG;\n+        break;\n+    case AVCOL_PRI_SMPTE170M:\n+        cs = V4L2_COLORSPACE_SMPTE170M;\n+        break;\n+    case AVCOL_PRI_SMPTE240M:\n+        cs = V4L2_COLORSPACE_SMPTE240M;\n+        break;\n+    case AVCOL_PRI_BT2020:\n+        cs = V4L2_COLORSPACE_BT2020;\n+        break;\n+    case AVCOL_PRI_SMPTE428:\n+    case AVCOL_PRI_SMPTE431:\n+    case AVCOL_PRI_SMPTE432:\n+    case AVCOL_PRI_EBU3213:\n+    case AVCOL_PRI_RESERVED:\n+    case AVCOL_PRI_FILM:\n+    case AVCOL_PRI_UNSPECIFIED:\n+    default:\n+        break;\n+    }\n+\n+    switch (avcs) {\n+    case AVCOL_SPC_RGB:\n+        cs = V4L2_COLORSPACE_SRGB;\n+        break;\n+    case AVCOL_SPC_BT709:\n+        cs = V4L2_COLORSPACE_REC709;\n+        break;\n+    case AVCOL_SPC_FCC:\n+        cs = V4L2_COLORSPACE_470_SYSTEM_M;\n+        break;\n+    case AVCOL_SPC_BT470BG:\n+        cs = V4L2_COLORSPACE_470_SYSTEM_BG;\n+        break;\n+    case AVCOL_SPC_SMPTE170M:\n+        cs = V4L2_COLORSPACE_SMPTE170M;\n+        break;\n+    case AVCOL_SPC_SMPTE240M:\n+        cs = V4L2_COLORSPACE_SMPTE240M;\n+        break;\n+    case AVCOL_SPC_BT2020_CL:\n+        cs = V4L2_COLORSPACE_BT2020;\n+        ycbcr = V4L2_YCBCR_ENC_BT2020_CONST_LUM;\n+        break;\n+    case AVCOL_SPC_BT2020_NCL:\n+        cs = V4L2_COLORSPACE_BT2020;\n+        break;\n+    default:\n+        break;\n+    }\n+\n+    switch (xfer) {\n+    case AVCOL_TRC_BT709:\n+        xfer = V4L2_XFER_FUNC_709;\n+        break;\n+    case AVCOL_TRC_IEC61966_2_1:\n+        xfer = V4L2_XFER_FUNC_SRGB;\n+        break;\n+    case AVCOL_TRC_SMPTE240M:\n+        xfer = V4L2_XFER_FUNC_SMPTE240M;\n+        break;\n+    case AVCOL_TRC_SMPTE2084:\n+        xfer = V4L2_XFER_FUNC_SMPTE2084;\n+        break;\n+    default:\n+        break;\n+    }\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) {\n+        fmt->fmt.pix_mp.colorspace = cs;\n+        fmt->fmt.pix_mp.ycbcr_enc = ycbcr;\n+        fmt->fmt.pix_mp.xfer_func = xfer;\n+    } else {\n+        fmt->fmt.pix.colorspace = cs;\n+        fmt->fmt.pix.ycbcr_enc = ycbcr;\n+        fmt->fmt.pix.xfer_func = xfer;\n+    }\n+}\n+\n+static void\n+set_fmt_color_range(struct v4l2_format *const fmt, const enum AVColorRange avcr)\n+{\n+    const enum v4l2_quantization q =\n+        avcr == AVCOL_RANGE_MPEG ? V4L2_QUANTIZATION_LIM_RANGE :\n+        avcr == AVCOL_RANGE_JPEG ? V4L2_QUANTIZATION_FULL_RANGE :\n+            V4L2_QUANTIZATION_DEFAULT;\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) {\n+        fmt->fmt.pix_mp.quantization = q;\n+    } else {\n+        fmt->fmt.pix.quantization = q;\n+    }\n+}\n+\n+static enum AVColorPrimaries get_color_primaries(const struct v4l2_format *const fmt)\n+{\n+    enum v4l2_ycbcr_encoding ycbcr;\n+    enum v4l2_colorspace cs;\n+\n+    cs = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ?\n+        fmt->fmt.pix_mp.colorspace :\n+        fmt->fmt.pix.colorspace;\n+\n+    ycbcr = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ?\n+        fmt->fmt.pix_mp.ycbcr_enc:\n+        fmt->fmt.pix.ycbcr_enc;\n+\n+    switch(ycbcr) {\n+    case V4L2_YCBCR_ENC_XV709:\n+    case V4L2_YCBCR_ENC_709: return AVCOL_PRI_BT709;\n+    case V4L2_YCBCR_ENC_XV601:\n+    case V4L2_YCBCR_ENC_601:return AVCOL_PRI_BT470M;\n+    default:\n+        break;\n+    }\n+\n+    switch(cs) {\n+    case V4L2_COLORSPACE_470_SYSTEM_BG: return AVCOL_PRI_BT470BG;\n+    case V4L2_COLORSPACE_SMPTE170M: return AVCOL_PRI_SMPTE170M;\n+    case V4L2_COLORSPACE_SMPTE240M: return AVCOL_PRI_SMPTE240M;\n+    case V4L2_COLORSPACE_BT2020: return AVCOL_PRI_BT2020;\n+    default:\n+        break;\n+    }\n+\n+    return AVCOL_PRI_UNSPECIFIED;\n+}\n+\n+static enum AVColorSpace get_color_space(const struct v4l2_format *const fmt)\n+{\n+    enum v4l2_ycbcr_encoding ycbcr;\n+    enum v4l2_colorspace cs;\n+\n+    cs = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ?\n+        fmt->fmt.pix_mp.colorspace :\n+        fmt->fmt.pix.colorspace;\n+\n+    ycbcr = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ?\n+        fmt->fmt.pix_mp.ycbcr_enc:\n+        fmt->fmt.pix.ycbcr_enc;\n+\n+    switch(cs) {\n+    case V4L2_COLORSPACE_SRGB: return AVCOL_SPC_RGB;\n+    case V4L2_COLORSPACE_REC709: return AVCOL_SPC_BT709;\n+    case V4L2_COLORSPACE_470_SYSTEM_M: return AVCOL_SPC_FCC;\n+    case V4L2_COLORSPACE_470_SYSTEM_BG: return AVCOL_SPC_BT470BG;\n+    case V4L2_COLORSPACE_SMPTE170M: return AVCOL_SPC_SMPTE170M;\n+    case V4L2_COLORSPACE_SMPTE240M: return AVCOL_SPC_SMPTE240M;\n+    case V4L2_COLORSPACE_BT2020:\n+        if (ycbcr == V4L2_YCBCR_ENC_BT2020_CONST_LUM)\n+            return AVCOL_SPC_BT2020_CL;\n+        else\n+             return AVCOL_SPC_BT2020_NCL;\n+    default:\n+        break;\n+    }\n+\n+    return AVCOL_SPC_UNSPECIFIED;\n+}\n+\n+static enum AVColorTransferCharacteristic get_color_trc(const struct v4l2_format *const fmt)\n+{\n+    enum v4l2_ycbcr_encoding ycbcr;\n+    enum v4l2_xfer_func xfer;\n+    enum v4l2_colorspace cs;\n+\n+    cs = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ?\n+        fmt->fmt.pix_mp.colorspace :\n+        fmt->fmt.pix.colorspace;\n+\n+    ycbcr = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ?\n+        fmt->fmt.pix_mp.ycbcr_enc:\n+        fmt->fmt.pix.ycbcr_enc;\n+\n+    xfer = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ?\n+        fmt->fmt.pix_mp.xfer_func:\n+        fmt->fmt.pix.xfer_func;\n+\n+    switch (xfer) {\n+    case V4L2_XFER_FUNC_709: return AVCOL_TRC_BT709;\n+    case V4L2_XFER_FUNC_SRGB: return AVCOL_TRC_IEC61966_2_1;\n+    default:\n+        break;\n+    }\n+\n+    switch (cs) {\n+    case V4L2_COLORSPACE_470_SYSTEM_M: return AVCOL_TRC_GAMMA22;\n+    case V4L2_COLORSPACE_470_SYSTEM_BG: return AVCOL_TRC_GAMMA28;\n+    case V4L2_COLORSPACE_SMPTE170M: return AVCOL_TRC_SMPTE170M;\n+    case V4L2_COLORSPACE_SMPTE240M: return AVCOL_TRC_SMPTE240M;\n+    default:\n+        break;\n+    }\n+\n+    switch (ycbcr) {\n+    case V4L2_YCBCR_ENC_XV709:\n+    case V4L2_YCBCR_ENC_XV601: return AVCOL_TRC_BT1361_ECG;\n+    default:\n+        break;\n+    }\n+\n+    return AVCOL_TRC_UNSPECIFIED;\n+}\n+\n+static enum AVColorRange get_color_range(const struct v4l2_format *const fmt)\n+{\n+    enum v4l2_quantization qt;\n+\n+    qt = V4L2_TYPE_IS_MULTIPLANAR(fmt->type) ?\n+        fmt->fmt.pix_mp.quantization :\n+        fmt->fmt.pix.quantization;\n+\n+    switch (qt) {\n+    case V4L2_QUANTIZATION_LIM_RANGE: return AVCOL_RANGE_MPEG;\n+    case V4L2_QUANTIZATION_FULL_RANGE: return AVCOL_RANGE_JPEG;\n+    default:\n+        break;\n+    }\n+\n+     return AVCOL_RANGE_UNSPECIFIED;\n+}\n+\n+static int set_src_fmt(V4L2Queue * const q, const AVFrame * const frame)\n+{\n+    struct v4l2_format *const format = &q->format;\n+    const AVDRMFrameDescriptor *const src = (const AVDRMFrameDescriptor *)frame->data[0];\n+\n+    const uint32_t drm_fmt = src->layers[0].format;\n+    // Treat INVALID as LINEAR\n+    const uint64_t mod = src->objects[0].format_modifier == DRM_FORMAT_MOD_INVALID ?\n+        DRM_FORMAT_MOD_LINEAR : src->objects[0].format_modifier;\n+    uint32_t pix_fmt = 0;\n+    uint32_t w = 0;\n+    uint32_t h = 0;\n+    uint32_t bpl = src->layers[0].planes[0].pitch;\n+\n+    // We really don't expect multiple layers\n+    // All formats that we currently cope with are single object\n+\n+    if (src->nb_layers != 1 || src->nb_objects != 1)\n+        return AVERROR(EINVAL);\n+\n+    switch (drm_fmt) {\n+        case DRM_FORMAT_YUV420:\n+            if (mod == DRM_FORMAT_MOD_LINEAR) {\n+                if (src->layers[0].nb_planes != 3)\n+                    break;\n+                pix_fmt = V4L2_PIX_FMT_YUV420;\n+                h = src->layers[0].planes[1].offset / bpl;\n+                w = bpl;\n+            }\n+            break;\n+\n+        case DRM_FORMAT_NV12:\n+            if (mod == DRM_FORMAT_MOD_LINEAR) {\n+                if (src->layers[0].nb_planes != 2)\n+                    break;\n+                pix_fmt = V4L2_PIX_FMT_NV12;\n+                h = src->layers[0].planes[1].offset / bpl;\n+                w = bpl;\n+            }\n+#if CONFIG_SAND\n+            else if (fourcc_mod_broadcom_mod(mod) == DRM_FORMAT_MOD_BROADCOM_SAND128) {\n+                if (src->layers[0].nb_planes != 2)\n+                    break;\n+                pix_fmt = V4L2_PIX_FMT_NV12_COL128;\n+                w = bpl;\n+                h = src->layers[0].planes[1].offset / 128;\n+                bpl = fourcc_mod_broadcom_param(mod);\n+            }\n+#endif\n+            break;\n+\n+        case DRM_FORMAT_P030:\n+#if CONFIG_SAND\n+            if (fourcc_mod_broadcom_mod(mod) == DRM_FORMAT_MOD_BROADCOM_SAND128) {\n+                if (src->layers[0].nb_planes != 2)\n+                    break;\n+                pix_fmt =  V4L2_PIX_FMT_NV12_10_COL128;\n+                w = bpl / 2;  // Matching lie to how we construct this\n+                h = src->layers[0].planes[1].offset / 128;\n+                bpl = fourcc_mod_broadcom_param(mod);\n+            }\n+#endif\n+            break;\n+\n+        default:\n+            break;\n+    }\n+\n+    if (!pix_fmt)\n+        return AVERROR(EINVAL);\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(format->type)) {\n+        struct v4l2_pix_format_mplane *const pix = &format->fmt.pix_mp;\n+\n+        pix->width = w;\n+        pix->height = h;\n+        pix->pixelformat = pix_fmt;\n+        pix->plane_fmt[0].bytesperline = bpl;\n+        pix->num_planes = 1;\n+    }\n+    else {\n+        struct v4l2_pix_format *const pix = &format->fmt.pix;\n+\n+        pix->width = w;\n+        pix->height = h;\n+        pix->pixelformat = pix_fmt;\n+        pix->bytesperline = bpl;\n+    }\n+\n+    set_fmt_color(format, frame->color_primaries, frame->colorspace, frame->color_trc);\n+    set_fmt_color_range(format, frame->color_range);\n+\n+    q->sel.r.width = frame->width - (frame->crop_left + frame->crop_right);\n+    q->sel.r.height = frame->height - (frame->crop_top + frame->crop_bottom);\n+    q->sel.r.left = frame->crop_left;\n+    q->sel.r.top = frame->crop_top;\n+\n+    return 0;\n+}\n+\n+\n+static int set_dst_format(DeintV4L2M2MContext * const priv, V4L2Queue *queue, uint32_t pixelformat, uint32_t field, int width, int height)\n+{\n+    struct v4l2_format * const fmt   = &queue->format;\n+    struct v4l2_selection *const sel = &queue->sel;\n+\n+    memset(&fmt->fmt, 0, sizeof(fmt->fmt));\n+\n+    // Align w/h to 16 here in case there are alignment requirements at the next\n+    // stage of the filter chain (also RPi deinterlace setup is bust and this\n+    // fixes it)\n+    if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) {\n+        fmt->fmt.pix_mp.pixelformat = pixelformat;\n+        fmt->fmt.pix_mp.field = field;\n+        fmt->fmt.pix_mp.width = FFALIGN(width, 16);\n+        fmt->fmt.pix_mp.height = FFALIGN(height, 16);\n+    } else {\n+        fmt->fmt.pix.pixelformat = pixelformat;\n+        fmt->fmt.pix.field = field;\n+        fmt->fmt.pix.width = FFALIGN(width, 16);\n+        fmt->fmt.pix.height = FFALIGN(height, 16);\n+    }\n+\n+    set_fmt_color(fmt, priv->colour_primaries, priv->colour_matrix, priv->colour_transfer);\n+    set_fmt_color_range(fmt, priv->colour_range);\n+\n+    sel->r.width = width;\n+    sel->r.height = height;\n+    sel->r.left = 0;\n+    sel->r.top = 0;\n+\n+    return do_s_fmt(queue);\n+}\n+\n+static int deint_v4l2m2m_probe_device(DeintV4L2M2MContextShared *ctx, char *node)\n+{\n+    int ret;\n+\n+    ctx->fd = open(node, O_RDWR | O_NONBLOCK, 0);\n+    if (ctx->fd < 0)\n+        return AVERROR(errno);\n+\n+    ret = deint_v4l2m2m_prepare_context(ctx);\n+    if (ret) {\n+        av_log(ctx->logctx, AV_LOG_DEBUG, \"Failed to prepare context\\n\");\n+        goto fail;\n+    }\n+\n+    ret = deint_v4l2m2m_try_format(&ctx->capture, ctx->output_width, ctx->output_height, ctx->output_format);\n+    if (ret) {\n+        av_log(ctx->logctx, AV_LOG_DEBUG, \"Failed to try dst format\\n\");\n+        goto fail;\n+    }\n+\n+    ret = deint_v4l2m2m_try_format(&ctx->output, ctx->width, ctx->height, AV_PIX_FMT_NONE);\n+    if (ret) {\n+        av_log(ctx->logctx, AV_LOG_DEBUG, \"Failed to try src format\\n\");\n+        goto fail;\n+    }\n+\n+    return 0;\n+\n+fail:\n+    close(ctx->fd);\n+    ctx->fd = -1;\n+\n+    return ret;\n+}\n+\n+static int deint_v4l2m2m_find_device(DeintV4L2M2MContextShared *ctx)\n+{\n+    int ret = AVERROR(EINVAL);\n+    struct dirent *entry;\n+    char node[PATH_MAX];\n+    DIR *dirp;\n+\n+    dirp = opendir(\"/dev\");\n+    if (!dirp)\n+        return AVERROR(errno);\n+\n+    for (entry = readdir(dirp); entry; entry = readdir(dirp)) {\n+\n+        if (strncmp(entry->d_name, \"video\", 5))\n+            continue;\n+\n+        snprintf(node, sizeof(node), \"/dev/%s\", entry->d_name);\n+        av_log(ctx->logctx, AV_LOG_DEBUG, \"probing device %s\\n\", node);\n+        ret = deint_v4l2m2m_probe_device(ctx, node);\n+        if (!ret)\n+            break;\n+    }\n+\n+    closedir(dirp);\n+\n+    if (ret) {\n+        av_log(ctx->logctx, AV_LOG_ERROR, \"Could not find a valid device\\n\");\n+        ctx->fd = -1;\n+\n+        return ret;\n+    }\n+\n+    av_log(ctx->logctx, AV_LOG_INFO, \"Using device %s\\n\", node);\n+\n+    return 0;\n+}\n+\n+static int deint_v4l2m2m_enqueue_buffer(V4L2Buffer *buf)\n+{\n+    int ret;\n+\n+    ret = ioctl(buf->q->ctx->fd, VIDIOC_QBUF, &buf->buffer);\n+    if (ret < 0)\n+        return AVERROR(errno);\n+\n+    buf->enqueued = 1;\n+\n+    return 0;\n+}\n+\n+static void\n+drm_frame_init(AVDRMFrameDescriptor * const d)\n+{\n+    unsigned int i;\n+    for (i = 0; i != AV_DRM_MAX_PLANES; ++i) {\n+        d->objects[i].fd = -1;\n+    }\n+}\n+\n+static void\n+drm_frame_uninit(AVDRMFrameDescriptor * const d)\n+{\n+    unsigned int i;\n+    for (i = 0; i != d->nb_objects; ++i) {\n+        if (d->objects[i].fd != -1) {\n+            close(d->objects[i].fd);\n+            d->objects[i].fd = -1;\n+        }\n+    }\n+}\n+\n+static void\n+avbufs_delete(V4L2Buffer** ppavbufs, const unsigned int n)\n+{\n+    unsigned int i;\n+    V4L2Buffer* const avbufs = *ppavbufs;\n+\n+    if (avbufs == NULL)\n+        return;\n+    *ppavbufs = NULL;\n+\n+    for (i = 0; i != n; ++i) {\n+        V4L2Buffer* const avbuf = avbufs + i;\n+        drm_frame_uninit(&avbuf->drm_frame);\n+    }\n+\n+    av_free(avbufs);\n+}\n+\n+static int v4l2_buffer_export_drm(V4L2Queue * const q, V4L2Buffer * const avbuf)\n+{\n+    struct v4l2_exportbuffer expbuf;\n+    int i, ret;\n+    uint64_t mod = DRM_FORMAT_MOD_LINEAR;\n+\n+    AVDRMFrameDescriptor * const drm_desc = &avbuf->drm_frame;\n+    AVDRMLayerDescriptor * const layer = &drm_desc->layers[0];\n+    const struct v4l2_format *const fmt = &q->format;\n+    const uint32_t height = fmt_height(fmt);\n+    ptrdiff_t bpl0;\n+\n+    /* fill the DRM frame descriptor */\n+    drm_desc->nb_layers = 1;\n+    layer->nb_planes = avbuf->num_planes;\n+\n+    for (int i = 0; i < avbuf->num_planes; i++) {\n+        layer->planes[i].object_index = i;\n+        layer->planes[i].offset = 0;\n+        layer->planes[i].pitch = fmt_bpl(fmt, i);\n+    }\n+    bpl0 = layer->planes[0].pitch;\n+\n+    switch (fmt_pixelformat(fmt)) {\n+#if CONFIG_SAND\n+        case V4L2_PIX_FMT_NV12_COL128:\n+            mod = DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(bpl0);\n+            layer->format = V4L2_PIX_FMT_NV12;\n+\n+            if (avbuf->num_planes > 1)\n+                break;\n+\n+            layer->nb_planes = 2;\n+            layer->planes[1].object_index = 0;\n+            layer->planes[1].offset = height * 128;\n+            layer->planes[0].pitch = fmt_width(fmt);\n+            layer->planes[1].pitch = layer->planes[0].pitch;\n+            break;\n+#endif\n+\n+        case DRM_FORMAT_NV12:\n+            layer->format = V4L2_PIX_FMT_NV12;\n+\n+            if (avbuf->num_planes > 1)\n+                break;\n+\n+            layer->nb_planes = 2;\n+            layer->planes[1].object_index = 0;\n+            layer->planes[1].offset = bpl0 * height;\n+            layer->planes[1].pitch = bpl0;\n+            break;\n+\n+        case V4L2_PIX_FMT_YUV420:\n+            layer->format = DRM_FORMAT_YUV420;\n+\n+            if (avbuf->num_planes > 1)\n+                break;\n+\n+            layer->nb_planes = 3;\n+            layer->planes[1].object_index = 0;\n+            layer->planes[1].offset = bpl0 * height;\n+            layer->planes[1].pitch = bpl0 / 2;\n+            layer->planes[2].object_index = 0;\n+            layer->planes[2].offset = layer->planes[1].offset + ((bpl0 * height) / 4);\n+            layer->planes[2].pitch = bpl0 / 2;\n+            break;\n+\n+        default:\n+            drm_desc->nb_layers = 0;\n+            return AVERROR(EINVAL);\n+    }\n+\n+    drm_desc->nb_objects = 0;\n+    for (i = 0; i < avbuf->num_planes; i++) {\n+        memset(&expbuf, 0, sizeof(expbuf));\n+\n+        expbuf.index = avbuf->buffer.index;\n+        expbuf.type = avbuf->buffer.type;\n+        expbuf.plane = i;\n+\n+        ret = ioctl(avbuf->q->ctx->fd, VIDIOC_EXPBUF, &expbuf);\n+        if (ret < 0)\n+            return AVERROR(errno);\n+\n+        drm_desc->objects[i].size = V4L2_TYPE_IS_MULTIPLANAR(avbuf->buffer.type) ?\n+            avbuf->buffer.m.planes[i].length : avbuf->buffer.length;\n+        drm_desc->objects[i].fd = expbuf.fd;\n+        drm_desc->objects[i].format_modifier = mod;\n+        drm_desc->nb_objects = i + 1;\n+    }\n+\n+    return 0;\n+}\n+\n+static int deint_v4l2m2m_allocate_buffers(V4L2Queue *queue)\n+{\n+    struct v4l2_format *fmt = &queue->format;\n+    DeintV4L2M2MContextShared *ctx = queue->ctx;\n+    struct v4l2_requestbuffers req;\n+    int ret, i, multiplanar;\n+    uint32_t memory;\n+\n+    memory = V4L2_TYPE_IS_OUTPUT(fmt->type) ?\n+        V4L2_MEMORY_DMABUF : V4L2_MEMORY_MMAP;\n+\n+    multiplanar = V4L2_TYPE_IS_MULTIPLANAR(fmt->type);\n+\n+    memset(&req, 0, sizeof(req));\n+    req.count = queue->num_buffers;\n+    req.memory = memory;\n+    req.type = fmt->type;\n+\n+    ret = ioctl(ctx->fd, VIDIOC_REQBUFS, &req);\n+    if (ret < 0) {\n+        av_log(ctx->logctx, AV_LOG_ERROR, \"VIDIOC_REQBUFS failed: %s\\n\", strerror(errno));\n+\n+        return AVERROR(errno);\n+    }\n+\n+    queue->num_buffers = req.count;\n+    queue->buffers = av_mallocz(queue->num_buffers * sizeof(V4L2Buffer));\n+    if (!queue->buffers) {\n+        av_log(ctx->logctx, AV_LOG_ERROR, \"malloc enomem\\n\");\n+\n+        return AVERROR(ENOMEM);\n+    }\n+\n+    for (i = 0; i < queue->num_buffers; i++) {\n+        V4L2Buffer * const buf = &queue->buffers[i];\n+\n+        buf->enqueued = 0;\n+        buf->q = queue;\n+\n+        buf->buffer.type = fmt->type;\n+        buf->buffer.memory = memory;\n+        buf->buffer.index = i;\n+\n+        if (multiplanar) {\n+            buf->buffer.length = VIDEO_MAX_PLANES;\n+            buf->buffer.m.planes = buf->planes;\n+        }\n+\n+        drm_frame_init(&buf->drm_frame);\n+    }\n+\n+    for (i = 0; i < queue->num_buffers; i++) {\n+        V4L2Buffer * const buf = &queue->buffers[i];\n+\n+        ret = ioctl(ctx->fd, VIDIOC_QUERYBUF, &buf->buffer);\n+        if (ret < 0) {\n+            ret = AVERROR(errno);\n+\n+            goto fail;\n+        }\n+\n+        buf->num_planes = multiplanar ? buf->buffer.length : 1;\n+\n+        if (!V4L2_TYPE_IS_OUTPUT(fmt->type)) {\n+            ret = deint_v4l2m2m_enqueue_buffer(buf);\n+            if (ret)\n+                goto fail;\n+\n+            ret = v4l2_buffer_export_drm(queue, buf);\n+            if (ret)\n+                goto fail;\n+        }\n+    }\n+\n+    return 0;\n+\n+fail:\n+    avbufs_delete(&queue->buffers, queue->num_buffers);\n+    queue->num_buffers = 0;\n+    return ret;\n+}\n+\n+static int deint_v4l2m2m_streamon(V4L2Queue *queue)\n+{\n+    DeintV4L2M2MContextShared * const ctx = queue->ctx;\n+    int type = queue->format.type;\n+    int ret;\n+\n+    ret = ioctl(ctx->fd, VIDIOC_STREAMON, &type);\n+    av_log(ctx->logctx, AV_LOG_DEBUG, \"%s: type:%d ret:%d errno:%d\\n\", __func__, type, ret, AVERROR(errno));\n+    if (ret < 0)\n+        return AVERROR(errno);\n+\n+    return 0;\n+}\n+\n+static int deint_v4l2m2m_streamoff(V4L2Queue *queue)\n+{\n+    DeintV4L2M2MContextShared * const ctx = queue->ctx;\n+    int type = queue->format.type;\n+    int ret;\n+\n+    ret = ioctl(ctx->fd, VIDIOC_STREAMOFF, &type);\n+    av_log(ctx->logctx, AV_LOG_DEBUG, \"%s: type:%d ret:%d errno:%d\\n\", __func__, type, ret, AVERROR(errno));\n+    if (ret < 0)\n+        return AVERROR(errno);\n+\n+    return 0;\n+}\n+\n+// timeout in ms\n+static V4L2Buffer* deint_v4l2m2m_dequeue_buffer(V4L2Queue *queue, int timeout)\n+{\n+    struct v4l2_plane planes[VIDEO_MAX_PLANES];\n+    DeintV4L2M2MContextShared *ctx = queue->ctx;\n+    struct v4l2_buffer buf = { 0 };\n+    V4L2Buffer* avbuf = NULL;\n+    struct pollfd pfd;\n+    short events;\n+    int ret;\n+\n+    if (V4L2_TYPE_IS_OUTPUT(queue->format.type))\n+        events =  POLLOUT | POLLWRNORM;\n+    else\n+        events = POLLIN | POLLRDNORM;\n+\n+    pfd.events = events;\n+    pfd.fd = ctx->fd;\n+\n+    for (;;) {\n+        ret = poll(&pfd, 1, timeout);\n+        if (ret > 0)\n+            break;\n+        if (errno == EINTR)\n+            continue;\n+        return NULL;\n+    }\n+\n+    if (pfd.revents & POLLERR)\n+        return NULL;\n+\n+    if (pfd.revents & events) {\n+        memset(&buf, 0, sizeof(buf));\n+        buf.memory = V4L2_MEMORY_MMAP;\n+        buf.type = queue->format.type;\n+        if (V4L2_TYPE_IS_MULTIPLANAR(queue->format.type)) {\n+            memset(planes, 0, sizeof(planes));\n+            buf.length = VIDEO_MAX_PLANES;\n+            buf.m.planes = planes;\n+        }\n+\n+        ret = ioctl(ctx->fd, VIDIOC_DQBUF, &buf);\n+        if (ret) {\n+            if (errno != EAGAIN)\n+                av_log(ctx->logctx, AV_LOG_DEBUG, \"VIDIOC_DQBUF, errno (%s)\\n\",\n+                       av_err2str(AVERROR(errno)));\n+            return NULL;\n+        }\n+\n+        avbuf = &queue->buffers[buf.index];\n+        avbuf->enqueued = 0;\n+        avbuf->buffer = buf;\n+        if (V4L2_TYPE_IS_MULTIPLANAR(queue->format.type)) {\n+            memcpy(avbuf->planes, planes, sizeof(planes));\n+            avbuf->buffer.m.planes = avbuf->planes;\n+        }\n+        return avbuf;\n+    }\n+\n+    return NULL;\n+}\n+\n+static V4L2Buffer *deint_v4l2m2m_find_free_buf(V4L2Queue *queue)\n+{\n+    int i;\n+    V4L2Buffer *buf = NULL;\n+\n+    for (i = 0; i < queue->num_buffers; i++)\n+        if (!queue->buffers[i].enqueued) {\n+            buf = &queue->buffers[i];\n+            break;\n+        }\n+    return buf;\n+}\n+\n+static void deint_v4l2m2m_unref_queued(V4L2Queue *queue)\n+{\n+    int i;\n+    V4L2Buffer *buf = NULL;\n+\n+    if (!queue || !queue->buffers)\n+        return;\n+    for (i = 0; i < queue->num_buffers; i++) {\n+        buf = &queue->buffers[i];\n+        if (queue->buffers[i].enqueued)\n+            av_frame_unref(&buf->frame);\n+    }\n+}\n+\n+static void recycle_q(V4L2Queue * const queue)\n+{\n+    V4L2Buffer* avbuf;\n+    while (avbuf = deint_v4l2m2m_dequeue_buffer(queue, 0), avbuf) {\n+        av_frame_unref(&avbuf->frame);\n+    }\n+}\n+\n+static int count_enqueued(V4L2Queue *queue)\n+{\n+    int i;\n+    int n = 0;\n+\n+    if (queue->buffers == NULL)\n+        return 0;\n+\n+    for (i = 0; i < queue->num_buffers; i++)\n+        if (queue->buffers[i].enqueued)\n+            ++n;\n+    return n;\n+}\n+\n+static int deint_v4l2m2m_enqueue_frame(V4L2Queue * const queue, AVFrame * const frame)\n+{\n+    DeintV4L2M2MContextShared *const ctx = queue->ctx;\n+    AVDRMFrameDescriptor *drm_desc = (AVDRMFrameDescriptor *)frame->data[0];\n+    V4L2Buffer *buf;\n+    int i;\n+\n+    if (V4L2_TYPE_IS_OUTPUT(queue->format.type))\n+        recycle_q(queue);\n+\n+    buf = deint_v4l2m2m_find_free_buf(queue);\n+    if (!buf) {\n+        av_log(ctx->logctx, AV_LOG_ERROR, \"%s: error %d finding free buf\\n\", __func__, 0);\n+        return AVERROR(EAGAIN);\n+    }\n+    if (V4L2_TYPE_IS_MULTIPLANAR(buf->buffer.type))\n+        for (i = 0; i < drm_desc->nb_objects; i++)\n+            buf->buffer.m.planes[i].m.fd = drm_desc->objects[i].fd;\n+    else\n+        buf->buffer.m.fd = drm_desc->objects[0].fd;\n+\n+    buf->buffer.field = !frame->interlaced_frame ? V4L2_FIELD_NONE :\n+        frame->top_field_first ? V4L2_FIELD_INTERLACED_TB :\n+            V4L2_FIELD_INTERLACED_BT;\n+\n+    if (ctx->field_order != buf->buffer.field) {\n+        av_log(ctx->logctx, AV_LOG_DEBUG, \"%s: Field changed: %d->%d\\n\", __func__, ctx->field_order, buf->buffer.field);\n+        ctx->field_order = buf->buffer.field;\n+    }\n+\n+    buf->buffer.timestamp = pts_track_add_frame(&ctx->track, frame);\n+\n+    buf->drm_frame.objects[0].fd = drm_desc->objects[0].fd;\n+\n+    av_frame_move_ref(&buf->frame, frame);\n+\n+    return deint_v4l2m2m_enqueue_buffer(buf);\n+}\n+\n+static void deint_v4l2m2m_destroy_context(DeintV4L2M2MContextShared *ctx)\n+{\n+    if (atomic_fetch_sub(&ctx->refcount, 1) == 1) {\n+        V4L2Queue *capture = &ctx->capture;\n+        V4L2Queue *output  = &ctx->output;\n+\n+        av_log(NULL, AV_LOG_DEBUG, \"%s - destroying context\\n\", __func__);\n+\n+        if (ctx->fd >= 0) {\n+            deint_v4l2m2m_streamoff(capture);\n+            deint_v4l2m2m_streamoff(output);\n+        }\n+\n+        avbufs_delete(&capture->buffers, capture->num_buffers);\n+\n+        deint_v4l2m2m_unref_queued(output);\n+\n+        av_buffer_unref(&ctx->hw_frames_ctx);\n+\n+        if (capture->buffers)\n+            av_free(capture->buffers);\n+\n+        if (output->buffers)\n+            av_free(output->buffers);\n+\n+        if (ctx->fd >= 0) {\n+            close(ctx->fd);\n+            ctx->fd = -1;\n+        }\n+\n+        av_free(ctx);\n+    }\n+}\n+\n+static void v4l2_free_buffer(void *opaque, uint8_t *unused)\n+{\n+    V4L2Buffer *buf                = opaque;\n+    DeintV4L2M2MContextShared *ctx = buf->q->ctx;\n+\n+    if (!ctx->done)\n+        deint_v4l2m2m_enqueue_buffer(buf);\n+\n+    deint_v4l2m2m_destroy_context(ctx);\n+}\n+\n+// timeout in ms\n+static int deint_v4l2m2m_dequeue_frame(V4L2Queue *queue, AVFrame* frame, int timeout)\n+{\n+    DeintV4L2M2MContextShared *ctx = queue->ctx;\n+    V4L2Buffer* avbuf;\n+    enum AVColorPrimaries color_primaries;\n+    enum AVColorSpace colorspace;\n+    enum AVColorTransferCharacteristic color_trc;\n+    enum AVColorRange color_range;\n+\n+    av_log(ctx->logctx, AV_LOG_TRACE, \"<<< %s\\n\", __func__);\n+\n+    if (queue->eos) {\n+        av_log(ctx->logctx, AV_LOG_TRACE, \">>> %s: EOS\\n\", __func__);\n+        return AVERROR_EOF;\n+    }\n+\n+    avbuf = deint_v4l2m2m_dequeue_buffer(queue, timeout);\n+    if (!avbuf) {\n+        av_log(ctx->logctx, AV_LOG_DEBUG, \"%s: No buffer to dequeue (timeout=%d)\\n\", __func__, timeout);\n+        return AVERROR(EAGAIN);\n+    }\n+\n+    if (V4L2_TYPE_IS_CAPTURE(avbuf->buffer.type)) {\n+        if ((avbuf->buffer.flags & V4L2_BUF_FLAG_LAST) != 0)\n+            queue->eos = 1;\n+        if (buf_bytesused0(&avbuf->buffer) == 0)\n+            return queue->eos ? AVERROR_EOF : AVERROR(EINVAL);\n+    }\n+\n+    // Fill in PTS and anciliary info from src frame\n+    pts_track_get_frame(&ctx->track, avbuf->buffer.timestamp, frame);\n+\n+    frame->buf[0] = av_buffer_create((uint8_t *) &avbuf->drm_frame,\n+                            sizeof(avbuf->drm_frame), v4l2_free_buffer,\n+                            avbuf, AV_BUFFER_FLAG_READONLY);\n+    if (!frame->buf[0]) {\n+        av_log(ctx->logctx, AV_LOG_ERROR, \"%s: error %d creating buffer\\n\", __func__, 0);\n+        return AVERROR(ENOMEM);\n+    }\n+\n+    atomic_fetch_add(&ctx->refcount, 1);\n+\n+    frame->data[0] = (uint8_t *)&avbuf->drm_frame;\n+    frame->format = AV_PIX_FMT_DRM_PRIME;\n+    if (ctx->hw_frames_ctx)\n+        frame->hw_frames_ctx = av_buffer_ref(ctx->hw_frames_ctx);\n+    frame->height = ctx->output_height;\n+    frame->width = ctx->output_width;\n+\n+    color_primaries = get_color_primaries(&ctx->capture.format);\n+    colorspace      = get_color_space(&ctx->capture.format);\n+    color_trc       = get_color_trc(&ctx->capture.format);\n+    color_range     = get_color_range(&ctx->capture.format);\n+\n+    // If the color parameters are unspecified by V4L2 then leave alone as they\n+    // will have been copied from src\n+    if (color_primaries != AVCOL_PRI_UNSPECIFIED)\n+        frame->color_primaries = color_primaries;\n+    if (colorspace != AVCOL_SPC_UNSPECIFIED)\n+        frame->colorspace = colorspace;\n+    if (color_trc != AVCOL_TRC_UNSPECIFIED)\n+        frame->color_trc = color_trc;\n+    if (color_range != AVCOL_RANGE_UNSPECIFIED)\n+        frame->color_range = color_range;\n+\n+    if (ctx->filter_type == FILTER_V4L2_DEINTERLACE) {\n+        // Not interlaced now\n+        frame->interlaced_frame = 0;   // *** Fill in from dst buffer?\n+        frame->top_field_first = 0;\n+        // Pkt duration halved\n+        frame->pkt_duration /= 2;\n+    }\n+\n+    if (avbuf->buffer.flags & V4L2_BUF_FLAG_ERROR) {\n+        av_log(ctx->logctx, AV_LOG_ERROR, \"driver decode error\\n\");\n+        frame->decode_error_flags |= FF_DECODE_ERROR_INVALID_BITSTREAM;\n+    }\n+\n+    av_log(ctx->logctx, AV_LOG_TRACE, \">>> %s: PTS=%\"PRId64\"\\n\", __func__, frame->pts);\n+    return 0;\n+}\n+\n+static int deint_v4l2m2m_config_props(AVFilterLink *outlink)\n+{\n+    AVFilterLink *inlink           = outlink->src->inputs[0];\n+    AVFilterContext *avctx         = outlink->src;\n+    DeintV4L2M2MContext *priv      = avctx->priv;\n+    DeintV4L2M2MContextShared *ctx = priv->shared;\n+    int ret;\n+\n+    ctx->height = avctx->inputs[0]->h;\n+    ctx->width = avctx->inputs[0]->w;\n+\n+    if (ctx->filter_type == FILTER_V4L2_SCALE) {\n+        if ((ret = ff_scale_eval_dimensions(priv,\n+                                            priv->w_expr, priv->h_expr,\n+                                            inlink, outlink,\n+                                            &ctx->output_width, &ctx->output_height)) < 0)\n+            return ret;\n+\n+        ff_scale_adjust_dimensions(inlink, &ctx->output_width, &ctx->output_height,\n+                                   priv->force_original_aspect_ratio, priv->force_divisible_by);\n+    }\n+    else {\n+        ctx->output_width  = ctx->width;\n+        ctx->output_height = ctx->height;\n+    }\n+\n+    av_log(priv, AV_LOG_DEBUG, \"%s: %dx%d->%dx%d FR: %d/%d->%d/%d\\n\", __func__,\n+           ctx->width, ctx->height, ctx->output_width, ctx->output_height,\n+           inlink->frame_rate.num, inlink->frame_rate.den, outlink->frame_rate.num, outlink->frame_rate.den);\n+\n+    outlink->time_base           = inlink->time_base;\n+    outlink->w                   = ctx->output_width;\n+    outlink->h                   = ctx->output_height;\n+    outlink->format              = inlink->format;\n+    if (ctx->filter_type == FILTER_V4L2_DEINTERLACE && inlink->frame_rate.den != 0)\n+        outlink->frame_rate = (AVRational){inlink->frame_rate.num * 2, inlink->frame_rate.den};\n+\n+    if (inlink->sample_aspect_ratio.num)\n+        outlink->sample_aspect_ratio = av_mul_q((AVRational){outlink->h * inlink->w, outlink->w * inlink->h}, inlink->sample_aspect_ratio);\n+    else\n+        outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;\n+\n+    ret = deint_v4l2m2m_find_device(ctx);\n+    if (ret)\n+        return ret;\n+\n+    if (inlink->hw_frames_ctx) {\n+        ctx->hw_frames_ctx = av_buffer_ref(inlink->hw_frames_ctx);\n+        if (!ctx->hw_frames_ctx)\n+            return AVERROR(ENOMEM);\n+    }\n+    return 0;\n+}\n+\n+static int deint_v4l2m2m_query_formats(AVFilterContext *avctx)\n+{\n+    static const enum AVPixelFormat pixel_formats[] = {\n+        AV_PIX_FMT_DRM_PRIME,\n+//        AV_PIX_FMT_YUV420P,\n+        AV_PIX_FMT_NONE,\n+    };\n+\n+    return ff_set_common_formats(avctx, ff_make_format_list(pixel_formats));\n+}\n+\n+static uint32_t desc_pixelformat(const AVDRMFrameDescriptor * const drm_desc)\n+{\n+    const uint64_t mod = drm_desc->objects[0].format_modifier;\n+    const int is_linear = (mod == DRM_FORMAT_MOD_LINEAR || mod == DRM_FORMAT_MOD_INVALID);\n+\n+    // Only currently support single object things\n+    if (drm_desc->nb_objects != 1)\n+        return 0;\n+\n+    switch (drm_desc->layers[0].format) {\n+    case DRM_FORMAT_YUV420:\n+        return is_linear ? V4L2_PIX_FMT_YUV420 : 0;\n+    case DRM_FORMAT_NV12:\n+        return is_linear ? V4L2_PIX_FMT_NV12 :\n+#if CONFIG_SAND\n+            fourcc_mod_broadcom_mod(mod) == DRM_FORMAT_MOD_BROADCOM_SAND128 ? V4L2_PIX_FMT_NV12_COL128 :\n+#endif\n+            0;\n+    default:\n+        break;\n+    }\n+    return 0;\n+}\n+\n+static int deint_v4l2m2m_filter_frame(AVFilterLink *link, AVFrame *in)\n+{\n+    AVFilterContext *avctx         = link->dst;\n+    DeintV4L2M2MContext *priv      = avctx->priv;\n+    DeintV4L2M2MContextShared *ctx = priv->shared;\n+    V4L2Queue *capture             = &ctx->capture;\n+    V4L2Queue *output              = &ctx->output;\n+    int ret;\n+\n+    av_log(priv, AV_LOG_DEBUG, \"<<< %s: input pts: %\"PRId64\" dts: %\"PRId64\" field :%d interlaced: %d aspect:%d/%d\\n\",\n+           __func__, in->pts, in->pkt_dts, in->top_field_first, in->interlaced_frame, in->sample_aspect_ratio.num, in->sample_aspect_ratio.den);\n+    av_log(priv, AV_LOG_DEBUG, \"--- %s: in status in %d/ot %d; out status in %d/out %d\\n\", __func__,\n+           avctx->inputs[0]->status_in, avctx->inputs[0]->status_out, avctx->outputs[0]->status_in, avctx->outputs[0]->status_out);\n+\n+    if (ctx->field_order == V4L2_FIELD_ANY) {\n+        const AVDRMFrameDescriptor * const drm_desc = (AVDRMFrameDescriptor *)in->data[0];\n+        uint32_t pixelformat = desc_pixelformat(drm_desc);\n+\n+        if (pixelformat == 0) {\n+            av_log(avctx, AV_LOG_ERROR, \"Unsupported DRM format %s in %d objects, modifier %#\" PRIx64 \"\\n\",\n+                   av_fourcc2str(drm_desc->layers[0].format),\n+                   drm_desc->nb_objects, drm_desc->objects[0].format_modifier);\n+            return AVERROR(EINVAL);\n+        }\n+\n+        ctx->orig_width = drm_desc->layers[0].planes[0].pitch;\n+        ctx->orig_height = drm_desc->layers[0].planes[1].offset / ctx->orig_width;\n+\n+        av_log(priv, AV_LOG_DEBUG, \"%s: %dx%d (%td,%td)\\n\", __func__, ctx->width, ctx->height,\n+           drm_desc->layers[0].planes[0].pitch, drm_desc->layers[0].planes[1].offset);\n+\n+        if ((ret = set_src_fmt(output, in)) != 0) {\n+            av_log(avctx, AV_LOG_WARNING, \"Unknown input DRM format: %s mod: %#\" PRIx64 \"\\n\",\n+                   av_fourcc2str(drm_desc->layers[0].format), drm_desc->objects[0].format_modifier);\n+            return ret;\n+        }\n+\n+        ret = do_s_fmt(output);\n+        if (ret) {\n+            av_log(avctx, AV_LOG_WARNING, \"Failed to set source format\\n\");\n+            return ret;\n+        }\n+\n+        if (ctx->output_format != AV_PIX_FMT_NONE)\n+           pixelformat = fmt_av_to_v4l2(ctx->output_format);\n+        ret = set_dst_format(priv, capture, pixelformat, V4L2_FIELD_NONE, ctx->output_width, ctx->output_height);\n+        if (ret) {\n+            av_log(avctx, AV_LOG_WARNING, \"Failed to set destination format\\n\");\n+            return ret;\n+        }\n+\n+        ret = deint_v4l2m2m_allocate_buffers(capture);\n+        if (ret) {\n+            av_log(avctx, AV_LOG_WARNING, \"Failed to allocate destination buffers\\n\");\n+            return ret;\n+        }\n+\n+        ret = deint_v4l2m2m_streamon(capture);\n+        if (ret) {\n+            av_log(avctx, AV_LOG_WARNING, \"Failed set destination streamon: %s\\n\", av_err2str(ret));\n+            return ret;\n+        }\n+\n+        ret = deint_v4l2m2m_allocate_buffers(output);\n+        if (ret) {\n+            av_log(avctx, AV_LOG_WARNING, \"Failed to allocate src buffers\\n\");\n+            return ret;\n+        }\n+\n+        ret = deint_v4l2m2m_streamon(output);\n+        if (ret) {\n+            av_log(avctx, AV_LOG_WARNING, \"Failed set src streamon: %s\\n\", av_err2str(ret));\n+            return ret;\n+        }\n+\n+        if (in->top_field_first)\n+            ctx->field_order = V4L2_FIELD_INTERLACED_TB;\n+        else\n+            ctx->field_order = V4L2_FIELD_INTERLACED_BT;\n+\n+        {\n+            struct v4l2_encoder_cmd ecmd = {\n+                .cmd = V4L2_ENC_CMD_STOP\n+            };\n+            ctx->has_enc_stop = 0;\n+            if (ioctl(ctx->fd, VIDIOC_TRY_ENCODER_CMD, &ecmd) == 0) {\n+                av_log(ctx->logctx, AV_LOG_DEBUG, \"Test encode stop succeeded\\n\");\n+                ctx->has_enc_stop = 1;\n+            }\n+            else {\n+                av_log(ctx->logctx, AV_LOG_DEBUG, \"Test encode stop fail: %s\\n\", av_err2str(AVERROR(errno)));\n+            }\n+\n+        }\n+    }\n+\n+    ret = deint_v4l2m2m_enqueue_frame(output, in);\n+\n+    av_log(priv, AV_LOG_TRACE, \">>> %s: %s\\n\", __func__, av_err2str(ret));\n+    return ret;\n+}\n+\n+static int\n+ack_inlink(AVFilterContext * const avctx, DeintV4L2M2MContextShared *const s,\n+           AVFilterLink * const inlink)\n+{\n+    int instatus;\n+    int64_t inpts;\n+\n+    if (ff_inlink_acknowledge_status(inlink, &instatus, &inpts) <= 0)\n+        return 0;\n+\n+    s->drain      = instatus;\n+    s->drain_pts  = inpts;\n+    s->drain_state = DRAIN_TIMEOUT;\n+\n+    if (s->field_order == V4L2_FIELD_ANY) {  // Not yet started\n+        s->drain_state = DRAIN_DONE;\n+    }\n+    else if (s->one_to_one) {\n+        s->drain_state = DRAIN_LAST;\n+    }\n+    else if (s->has_enc_stop) {\n+        struct v4l2_encoder_cmd ecmd = {\n+            .cmd = V4L2_ENC_CMD_STOP\n+        };\n+        if (ioctl(s->fd, VIDIOC_ENCODER_CMD, &ecmd) == 0) {\n+            av_log(avctx->priv, AV_LOG_DEBUG, \"Do Encode stop\\n\");\n+            s->drain_state = DRAIN_EOS;\n+        }\n+        else {\n+            av_log(avctx->priv, AV_LOG_WARNING, \"Encode stop fail: %s\\n\", av_err2str(AVERROR(errno)));\n+        }\n+    }\n+    return 1;\n+}\n+\n+static int deint_v4l2m2m_activate(AVFilterContext *avctx)\n+{\n+    DeintV4L2M2MContext * const priv = avctx->priv;\n+    DeintV4L2M2MContextShared *const s = priv->shared;\n+    AVFilterLink * const outlink = avctx->outputs[0];\n+    AVFilterLink * const inlink = avctx->inputs[0];\n+    int n = 0;\n+    int cn = 99;\n+    int did_something = 0;\n+\n+    av_log(priv, AV_LOG_TRACE, \"<<< %s\\n\", __func__);\n+\n+    FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, avctx);\n+\n+    ack_inlink(avctx, s, inlink);\n+\n+    if (s->field_order != V4L2_FIELD_ANY)  // Can't DQ if no setup!\n+    {\n+        AVFrame * frame = av_frame_alloc();\n+        int rv;\n+\n+        recycle_q(&s->output);\n+        n = count_enqueued(&s->output);\n+\n+        if (frame == NULL) {\n+            av_log(priv, AV_LOG_ERROR, \"%s: error allocating frame\\n\", __func__);\n+            return AVERROR(ENOMEM);\n+        }\n+\n+        rv = deint_v4l2m2m_dequeue_frame(&s->capture, frame,\n+                                         drain_frame_expected(s->drain_state) || n > 4 ? 300 : 0);\n+        if (rv != 0) {\n+            av_frame_free(&frame);\n+            if (rv == AVERROR_EOF) {\n+                av_log(priv, AV_LOG_DEBUG, \"%s: --- DQ EOF\\n\", __func__);\n+                s->drain_state = DRAIN_DONE;\n+            }\n+            else if (rv == AVERROR(EAGAIN)) {\n+                if (s->drain_state != DRAIN_NONE) {\n+                    av_log(priv, AV_LOG_DEBUG, \"%s: --- DQ empty - drain done\\n\", __func__);\n+                    s->drain_state = DRAIN_DONE;\n+                }\n+            }\n+            else {\n+                av_log(priv, AV_LOG_ERROR, \">>> %s: DQ fail: %s\\n\", __func__, av_err2str(rv));\n+                return rv;\n+            }\n+        }\n+        else {\n+            frame->interlaced_frame = 0;\n+            // frame is always consumed by filter_frame - even on error despite\n+            // a somewhat confusing comment in the header\n+            rv = ff_filter_frame(outlink, frame);\n+            ++s->frames_tx;\n+\n+            av_log(priv, AV_LOG_TRACE, \"%s: Filtered: %s\\n\", __func__, av_err2str(rv));\n+            did_something = 1;\n+\n+            if (s->drain_state != DRAIN_NONE && pts_track_count(&s->track) == 0) {\n+                av_log(priv, AV_LOG_DEBUG, \"%s: --- DQ last - drain done\\n\", __func__);\n+                s->drain_state = DRAIN_DONE;\n+            }\n+        }\n+\n+        cn = count_enqueued(&s->capture);\n+    }\n+\n+    if (s->drain_state == DRAIN_DONE) {\n+        ff_outlink_set_status(outlink, s->drain, s->drain_pts);\n+        av_log(priv, AV_LOG_TRACE, \">>> %s: Status done: %s\\n\", __func__, av_err2str(s->drain));\n+        return 0;\n+    }\n+\n+    recycle_q(&s->output);\n+    n = count_enqueued(&s->output);\n+\n+    while (n < 6 && !s->drain) {\n+        AVFrame * frame;\n+        int rv;\n+\n+        if ((rv = ff_inlink_consume_frame(inlink, &frame)) < 0) {\n+            av_log(priv, AV_LOG_ERROR, \"%s: consume in failed: %s\\n\", __func__, av_err2str(rv));\n+            return rv;\n+        }\n+\n+        if (frame == NULL) {\n+            av_log(priv, AV_LOG_TRACE, \"%s: No frame\\n\", __func__);\n+            if (!ack_inlink(avctx, s, inlink)) {\n+                ff_inlink_request_frame(inlink);\n+                av_log(priv, AV_LOG_TRACE, \"%s: req frame\\n\", __func__);\n+            }\n+            break;\n+        }\n+        ++s->frames_rx;\n+\n+        rv = deint_v4l2m2m_filter_frame(inlink, frame);\n+        av_frame_free(&frame);\n+\n+        if (rv != 0)\n+            return rv;\n+\n+        av_log(priv, AV_LOG_TRACE, \"%s: Q frame\\n\", __func__);\n+        did_something = 1;\n+        ++n;\n+    }\n+\n+    if ((n > 4 || s->drain) && ff_outlink_frame_wanted(outlink)) {\n+        ff_filter_set_ready(avctx, 1);\n+        did_something = 1;\n+        av_log(priv, AV_LOG_TRACE, \"%s: ready\\n\", __func__);\n+    }\n+\n+    av_log(priv, AV_LOG_TRACE, \">>> %s: OK (n=%d, cn=%d)\\n\", __func__, n, cn);\n+    return did_something ? 0 : FFERROR_NOT_READY;\n+}\n+\n+static av_cold int common_v4l2m2m_init(AVFilterContext * const avctx, const filter_type_v4l2_t filter_type)\n+{\n+    DeintV4L2M2MContext * const priv = avctx->priv;\n+    DeintV4L2M2MContextShared * const ctx = av_mallocz(sizeof(DeintV4L2M2MContextShared));\n+\n+    if (!ctx) {\n+        av_log(priv, AV_LOG_ERROR, \"%s: error %d allocating context\\n\", __func__, 0);\n+        return AVERROR(ENOMEM);\n+    }\n+    priv->shared = ctx;\n+    ctx->logctx = priv;\n+    ctx->filter_type = filter_type;\n+    ctx->fd = -1;\n+    ctx->output.ctx = ctx;\n+    ctx->output.num_buffers = 8;\n+    ctx->output.name = \"OUTPUT\";\n+    ctx->capture.ctx = ctx;\n+    ctx->capture.num_buffers = 12;\n+    ctx->capture.name = \"CAPTURE\";\n+    ctx->done = 0;\n+    ctx->field_order = V4L2_FIELD_ANY;\n+\n+    pts_track_init(&ctx->track, priv);\n+\n+    atomic_init(&ctx->refcount, 1);\n+\n+    if (priv->output_format_string) {\n+        ctx->output_format = av_get_pix_fmt(priv->output_format_string);\n+        if (ctx->output_format == AV_PIX_FMT_NONE) {\n+            av_log(avctx, AV_LOG_ERROR, \"Invalid ffmpeg output format '%s'.\\n\", priv->output_format_string);\n+            return AVERROR(EINVAL);\n+        }\n+        if (fmt_av_to_v4l2(ctx->output_format) == 0) {\n+            av_log(avctx, AV_LOG_ERROR, \"Unsupported output format for V4L2: %s.\\n\", av_get_pix_fmt_name(ctx->output_format));\n+            return AVERROR(EINVAL);\n+        }\n+    } else {\n+        // Use the input format once that is configured.\n+        ctx->output_format = AV_PIX_FMT_NONE;\n+    }\n+\n+#define STRING_OPTION(var_name, func_name, default_value) do { \\\n+        if (priv->var_name ## _string) { \\\n+            int var = av_ ## func_name ## _from_name(priv->var_name ## _string); \\\n+            if (var < 0) { \\\n+                av_log(avctx, AV_LOG_ERROR, \"Invalid %s.\\n\", #var_name); \\\n+                return AVERROR(EINVAL); \\\n+            } \\\n+            priv->var_name = var; \\\n+        } else { \\\n+            priv->var_name = default_value; \\\n+        } \\\n+    } while (0)\n+\n+    STRING_OPTION(colour_primaries, color_primaries, AVCOL_PRI_UNSPECIFIED);\n+    STRING_OPTION(colour_transfer,  color_transfer,  AVCOL_TRC_UNSPECIFIED);\n+    STRING_OPTION(colour_matrix,    color_space,     AVCOL_SPC_UNSPECIFIED);\n+    STRING_OPTION(chroma_location,  chroma_location, AVCHROMA_LOC_UNSPECIFIED);\n+\n+    return 0;\n+}\n+\n+static av_cold int deint_v4l2m2m_init(AVFilterContext *avctx)\n+{\n+    return common_v4l2m2m_init(avctx, FILTER_V4L2_DEINTERLACE);\n+}\n+\n+static av_cold int scale_v4l2m2m_init(AVFilterContext *avctx)\n+{\n+    int rv;\n+    DeintV4L2M2MContext * priv;\n+    DeintV4L2M2MContextShared * ctx;\n+\n+    if ((rv = common_v4l2m2m_init(avctx, FILTER_V4L2_SCALE)) != 0)\n+        return rv;\n+\n+    priv = avctx->priv;\n+    ctx = priv->shared;\n+\n+    ctx->one_to_one = 1;\n+    return 0;\n+}\n+\n+static void deint_v4l2m2m_uninit(AVFilterContext *avctx)\n+{\n+    DeintV4L2M2MContext *priv = avctx->priv;\n+    DeintV4L2M2MContextShared *ctx = priv->shared;\n+\n+    av_log(priv, AV_LOG_VERBOSE, \"Frames Rx: %u, Frames Tx: %u\\n\",\n+           ctx->frames_rx, ctx->frames_tx);\n+    ctx->done = 1;\n+    ctx->logctx = NULL;  // Log to NULL works, log to missing crashes\n+    pts_track_uninit(&ctx->track);\n+    deint_v4l2m2m_destroy_context(ctx);\n+}\n+\n+static const AVOption deinterlace_v4l2m2m_options[] = {\n+    { NULL },\n+};\n+\n+AVFILTER_DEFINE_CLASS(deinterlace_v4l2m2m);\n+\n+#define OFFSET(x) offsetof(DeintV4L2M2MContext, x)\n+#define FLAGS (AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM)\n+\n+static const AVOption scale_v4l2m2m_options[] = {\n+    { \"w\", \"Output video width\",\n+      OFFSET(w_expr), AV_OPT_TYPE_STRING, {.str = \"iw\"}, .flags = FLAGS },\n+    { \"h\", \"Output video height\",\n+      OFFSET(h_expr), AV_OPT_TYPE_STRING, {.str = \"ih\"}, .flags = FLAGS },\n+    { \"format\", \"Output video format (software format of hardware frames)\",\n+      OFFSET(output_format_string), AV_OPT_TYPE_STRING, .flags = FLAGS },\n+      // These colour properties match the ones of the same name in vf_scale.\n+      { \"out_color_matrix\", \"Output colour matrix coefficient set\",\n+      OFFSET(colour_matrix_string), AV_OPT_TYPE_STRING, { .str = NULL }, .flags = FLAGS },\n+    { \"out_range\", \"Output colour range\",\n+      OFFSET(colour_range), AV_OPT_TYPE_INT, { .i64 = AVCOL_RANGE_UNSPECIFIED },\n+      AVCOL_RANGE_UNSPECIFIED, AVCOL_RANGE_JPEG, FLAGS, \"range\" },\n+        { \"full\",    \"Full range\",\n+          0, AV_OPT_TYPE_CONST, { .i64 = AVCOL_RANGE_JPEG }, 0, 0, FLAGS, \"range\" },\n+        { \"limited\", \"Limited range\",\n+          0, AV_OPT_TYPE_CONST, { .i64 = AVCOL_RANGE_MPEG }, 0, 0, FLAGS, \"range\" },\n+        { \"jpeg\",    \"Full range\",\n+          0, AV_OPT_TYPE_CONST, { .i64 = AVCOL_RANGE_JPEG }, 0, 0, FLAGS, \"range\" },\n+        { \"mpeg\",    \"Limited range\",\n+          0, AV_OPT_TYPE_CONST, { .i64 = AVCOL_RANGE_MPEG }, 0, 0, FLAGS, \"range\" },\n+        { \"tv\",      \"Limited range\",\n+          0, AV_OPT_TYPE_CONST, { .i64 = AVCOL_RANGE_MPEG }, 0, 0, FLAGS, \"range\" },\n+        { \"pc\",      \"Full range\",\n+          0, AV_OPT_TYPE_CONST, { .i64 = AVCOL_RANGE_JPEG }, 0, 0, FLAGS, \"range\" },\n+    // These colour properties match the ones in the VAAPI scaler\n+    { \"out_color_primaries\", \"Output colour primaries\",\n+      OFFSET(colour_primaries_string), AV_OPT_TYPE_STRING,\n+      { .str = NULL }, .flags = FLAGS },\n+    { \"out_color_transfer\", \"Output colour transfer characteristics\",\n+      OFFSET(colour_transfer_string),  AV_OPT_TYPE_STRING,\n+      { .str = NULL }, .flags = FLAGS },\n+    { \"out_chroma_location\", \"Output chroma sample location\",\n+      OFFSET(chroma_location_string),  AV_OPT_TYPE_STRING,\n+      { .str = NULL }, .flags = FLAGS },\n+    { \"force_original_aspect_ratio\", \"decrease or increase w/h if necessary to keep the original AR\", OFFSET(force_original_aspect_ratio), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 2, FLAGS, \"force_oar\" },\n+    { \"force_divisible_by\", \"enforce that the output resolution is divisible by a defined integer when force_original_aspect_ratio is used\", OFFSET(force_divisible_by), AV_OPT_TYPE_INT, { .i64 = 1}, 1, 256, FLAGS },\n+    { NULL },\n+};\n+\n+AVFILTER_DEFINE_CLASS(scale_v4l2m2m);\n+\n+static const AVFilterPad deint_v4l2m2m_inputs[] = {\n+    {\n+        .name         = \"default\",\n+        .type         = AVMEDIA_TYPE_VIDEO,\n+    },\n+    { NULL }\n+};\n+\n+static const AVFilterPad deint_v4l2m2m_outputs[] = {\n+    {\n+        .name          = \"default\",\n+        .type          = AVMEDIA_TYPE_VIDEO,\n+        .config_props  = deint_v4l2m2m_config_props,\n+    },\n+    { NULL }\n+};\n+\n+AVFilter ff_vf_deinterlace_v4l2m2m = {\n+    .name           = \"deinterlace_v4l2m2m\",\n+    .description    = NULL_IF_CONFIG_SMALL(\"V4L2 M2M deinterlacer\"),\n+    .priv_size      = sizeof(DeintV4L2M2MContext),\n+    .init           = &deint_v4l2m2m_init,\n+    .uninit         = &deint_v4l2m2m_uninit,\n+    .query_formats  = &deint_v4l2m2m_query_formats,\n+    .inputs         = deint_v4l2m2m_inputs,\n+    .outputs        = deint_v4l2m2m_outputs,\n+    .priv_class     = &deinterlace_v4l2m2m_class,\n+    .activate       = deint_v4l2m2m_activate,\n+};\n+\n+AVFilter ff_vf_scale_v4l2m2m = {\n+    .name           = \"scale_v4l2m2m\",\n+    .description    = NULL_IF_CONFIG_SMALL(\"V4L2 M2M scaler\"),\n+    .priv_size      = sizeof(DeintV4L2M2MContext),\n+    .init           = &scale_v4l2m2m_init,\n+    .uninit         = &deint_v4l2m2m_uninit,\n+    .query_formats  = &deint_v4l2m2m_query_formats,\n+    .inputs         = deint_v4l2m2m_inputs,\n+    .outputs        = deint_v4l2m2m_outputs,\n+    .priv_class     = &scale_v4l2m2m_class,\n+    .activate       = deint_v4l2m2m_activate,\n+};\n+\ndiff --git a/libavfilter/vf_unsand.c b/libavfilter/vf_unsand.c\nnew file mode 100644\nindex 0000000000..61c03a385c\n--- /dev/null\n+++ b/libavfilter/vf_unsand.c\n@@ -0,0 +1,229 @@\n+/*\n+ * Copyright (c) 2007 Bobby Bingham\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+/**\n+ * @file\n+ * format and noformat video filters\n+ */\n+\n+#include <string.h>\n+\n+#include \"libavutil/internal.h\"\n+#include \"libavutil/mem.h\"\n+#include \"libavutil/pixdesc.h\"\n+#include \"libavutil/opt.h\"\n+#include \"libavutil/rpi_sand_fns.h\"\n+\n+#include \"avfilter.h\"\n+#include \"formats.h\"\n+#include \"internal.h\"\n+#include \"video.h\"\n+\n+typedef struct UnsandContext {\n+    const AVClass *class;\n+} UnsandContext;\n+\n+static av_cold void uninit(AVFilterContext *ctx)\n+{\n+//    UnsandContext *s = ctx->priv;\n+}\n+\n+static av_cold int init(AVFilterContext *ctx)\n+{\n+//    UnsandContext *s = ctx->priv;\n+\n+    return 0;\n+}\n+\n+\n+static int filter_frame(AVFilterLink *link, AVFrame *in)\n+{\n+    AVFilterLink * const outlink = link->dst->outputs[0];\n+    AVFrame *out = NULL;\n+    int rv = 0;\n+\n+    if (outlink->format == in->format) {\n+        // If nothing to do then do nothing\n+        out = in;\n+    }\n+    else\n+    {\n+        if ((out = ff_get_video_buffer(outlink, av_frame_cropped_width(in), av_frame_cropped_height(in))) == NULL)\n+        {\n+            rv = AVERROR(ENOMEM);\n+            goto fail;\n+        }\n+        if (av_rpi_sand_to_planar_frame(out, in) != 0)\n+        {\n+            rv = -1;\n+            goto fail;\n+        }\n+\n+        av_frame_free(&in);\n+    }\n+\n+    return ff_filter_frame(outlink, out);\n+\n+fail:\n+    av_frame_free(&out);\n+    av_frame_free(&in);\n+    return rv;\n+}\n+\n+#if 0\n+static void dump_fmts(const AVFilterFormats * fmts)\n+{\n+    int i;\n+    if (fmts== NULL) {\n+        printf(\"NULL\\n\");\n+        return;\n+    }\n+    for (i = 0; i < fmts->nb_formats; ++i) {\n+        printf(\" %d\", fmts->formats[i]);\n+    }\n+    printf(\"\\n\");\n+}\n+#endif\n+\n+static int query_formats(AVFilterContext *ctx)\n+{\n+//    UnsandContext *s = ctx->priv;\n+    int ret;\n+\n+    // If we aren't connected at both ends then just do nothing\n+    if (ctx->inputs[0] == NULL || ctx->outputs[0] == NULL)\n+        return 0;\n+\n+    // Our output formats depend on our input formats and we can't/don't\n+    // want to convert between bit depths so we need to wait for the source\n+    // to have an opinion before we do\n+    if (ctx->inputs[0]->incfg.formats == NULL)\n+        return AVERROR(EAGAIN);\n+\n+    // Accept anything\n+    if (ctx->inputs[0]->outcfg.formats == NULL &&\n+        (ret = ff_formats_ref(ctx->inputs[0]->incfg.formats, &ctx->inputs[0]->outcfg.formats)) < 0)\n+        return ret;\n+\n+    // Filter out sand formats\n+\n+    // Generate a container if we don't already have one\n+    if (ctx->outputs[0]->incfg.formats == NULL)\n+    {\n+        // Somewhat rubbish way of ensuring we have a good structure\n+        const static enum AVPixelFormat out_fmts[] = {AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE};\n+        AVFilterFormats *formats = ff_make_format_list(out_fmts);\n+\n+        if (formats == NULL)\n+            return AVERROR(ENOMEM);\n+        if ((ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0)\n+            return ret;\n+    }\n+\n+    // Replace old format list with new filtered list derived from what our\n+    // input says it can do\n+    {\n+        const AVFilterFormats * const src_ff = ctx->inputs[0]->outcfg.formats;\n+        AVFilterFormats * const dst_ff = ctx->outputs[0]->incfg.formats;\n+        enum AVPixelFormat *dst_fmts = av_malloc(sizeof(enum AVPixelFormat) * src_ff->nb_formats);\n+        int i;\n+        int n = 0;\n+        int seen_420p = 0;\n+        int seen_420p10 = 0;\n+\n+        for (i = 0; i < src_ff->nb_formats; ++i) {\n+            const enum AVPixelFormat f = src_ff->formats[i];\n+\n+            switch (f){\n+                case AV_PIX_FMT_YUV420P:\n+                case AV_PIX_FMT_SAND128:\n+                case AV_PIX_FMT_RPI4_8:\n+                    if (!seen_420p) {\n+                        seen_420p = 1;\n+                        dst_fmts[n++] = AV_PIX_FMT_YUV420P;\n+                    }\n+                    break;\n+                case AV_PIX_FMT_SAND64_10:\n+                case AV_PIX_FMT_YUV420P10:\n+                case AV_PIX_FMT_RPI4_10:\n+                    if (!seen_420p10) {\n+                        seen_420p10 = 1;\n+                        dst_fmts[n++] = AV_PIX_FMT_YUV420P10;\n+                    }\n+                    break;\n+                default:\n+                    dst_fmts[n++] = f;\n+                    break;\n+            }\n+        }\n+\n+        av_freep(&dst_ff->formats);\n+        dst_ff->formats = dst_fmts;\n+        dst_ff->nb_formats = n;\n+    }\n+\n+//    printf(\"Unsand: %s calc: \", __func__);\n+//    dump_fmts(ctx->outputs[0]->incfg.formats);\n+\n+    return 0;\n+}\n+\n+\n+#define OFFSET(x) offsetof(UnsandContext, x)\n+static const AVOption unsand_options[] = {\n+    { NULL }\n+};\n+\n+\n+AVFILTER_DEFINE_CLASS(unsand);\n+\n+static const AVFilterPad avfilter_vf_unsand_inputs[] = {\n+    {\n+        .name             = \"default\",\n+        .type             = AVMEDIA_TYPE_VIDEO,\n+        .filter_frame = filter_frame,\n+    },\n+    { NULL }\n+};\n+\n+static const AVFilterPad avfilter_vf_unsand_outputs[] = {\n+    {\n+        .name = \"default\",\n+        .type = AVMEDIA_TYPE_VIDEO\n+    },\n+    { NULL }\n+};\n+\n+AVFilter ff_vf_unsand = {\n+    .name          = \"unsand\",\n+    .description   = NULL_IF_CONFIG_SMALL(\"Convert sand pix fmt to yuv\"),\n+\n+    .init          = init,\n+    .uninit        = uninit,\n+\n+    .query_formats = query_formats,\n+\n+    .priv_size     = sizeof(UnsandContext),\n+    .priv_class    = &unsand_class,\n+\n+    .inputs        = avfilter_vf_unsand_inputs,\n+    .outputs       = avfilter_vf_unsand_outputs,\n+};\n+\ndiff --git a/libavfilter/x86/vf_bwdif_init.c b/libavfilter/x86/vf_bwdif_init.c\nindex b1e70b3bc6..b9e3a25921 100644\n--- a/libavfilter/x86/vf_bwdif_init.c\n+++ b/libavfilter/x86/vf_bwdif_init.c\n@@ -51,11 +51,9 @@ void ff_bwdif_filter_line_12bit_ssse3(void *dst, void *prev, void *cur, void *ne\n                                       int mrefs2, int prefs3, int mrefs3, int prefs4,\n                                       int mrefs4, int parity, int clip_max);\n \n-av_cold void ff_bwdif_init_x86(BWDIFContext *bwdif)\n+av_cold void ff_bwdif_init_x86(BWDIFContext *bwdif, int bit_depth)\n {\n-    YADIFContext *yadif = &bwdif->yadif;\n     int cpu_flags = av_get_cpu_flags();\n-    int bit_depth = (!yadif->csp) ? 8 : yadif->csp->comp[0].depth;\n \n     if (bit_depth <= 8) {\n #if ARCH_X86_32\ndiff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c\nindex b4284a8778..692265593c 100644\n--- a/libavformat/matroskaenc.c\n+++ b/libavformat/matroskaenc.c\n@@ -58,6 +58,9 @@\n  * Info, Tracks, Chapters, Attachments, Tags (potentially twice) and Cues */\n #define MAX_SEEKHEAD_ENTRIES 7\n \n+/* Reserved size for H264 headers if not extant at init time */\n+#define MAX_H264_HEADER_SIZE 1024\n+\n #define IS_SEEKABLE(pb, mkv) (((pb)->seekable & AVIO_SEEKABLE_NORMAL) && \\\n                               !(mkv)->is_live)\n \n@@ -721,8 +724,12 @@ static int mkv_write_native_codecprivate(AVFormatContext *s, AVIOContext *pb,\n     case AV_CODEC_ID_WAVPACK:\n         return put_wv_codecpriv(dyn_cp, par);\n     case AV_CODEC_ID_H264:\n-        return ff_isom_write_avcc(dyn_cp, par->extradata,\n-                                  par->extradata_size);\n+        if (par->extradata_size)\n+            return ff_isom_write_avcc(dyn_cp, par->extradata,\n+                                      par->extradata_size);\n+        else\n+            put_ebml_void(pb, MAX_H264_HEADER_SIZE);\n+        break;\n     case AV_CODEC_ID_HEVC:\n         return ff_isom_write_hvcc(dyn_cp, par->extradata,\n                                   par->extradata_size, 0);\n@@ -2259,7 +2266,9 @@ static int mkv_check_new_extra_data(AVFormatContext *s, const AVPacket *pkt)\n         break;\n     // FIXME: Remove the following once libaom starts propagating extradata during init()\n     //        See https://bugs.chromium.org/p/aomedia/issues/detail?id=2012\n+    // H264 V4L2 has a similar issue\n     case AV_CODEC_ID_AV1:\n+    case AV_CODEC_ID_H264:\n         if (side_data_size && mkv->track.bc && !par->extradata_size) {\n             AVIOContext *dyn_cp;\n             uint8_t *codecpriv;\n@@ -2267,7 +2276,10 @@ static int mkv_check_new_extra_data(AVFormatContext *s, const AVPacket *pkt)\n             ret = avio_open_dyn_buf(&dyn_cp);\n             if (ret < 0)\n                 return ret;\n-            ff_isom_write_av1c(dyn_cp, side_data, side_data_size);\n+            if (par->codec_id == AV_CODEC_ID_H264)\n+                ff_isom_write_avcc(dyn_cp, side_data, side_data_size);\n+            else\n+                ff_isom_write_av1c(dyn_cp, side_data, side_data_size);\n             codecpriv_size = avio_get_dyn_buf(dyn_cp, &codecpriv);\n             if ((ret = dyn_cp->error) < 0 ||\n                 !codecpriv_size && (ret = AVERROR_INVALIDDATA)) {\n@@ -2275,8 +2287,25 @@ static int mkv_check_new_extra_data(AVFormatContext *s, const AVPacket *pkt)\n                 return ret;\n             }\n             avio_seek(mkv->track.bc, track->codecpriv_offset, SEEK_SET);\n-            // Do not write the OBUs as we don't have space saved for them\n-            put_ebml_binary(mkv->track.bc, MATROSKA_ID_CODECPRIVATE, codecpriv, 4);\n+            if (par->codec_id == AV_CODEC_ID_H264) {\n+                int filler;\n+                // Up to 6 bytes for header and the filler must be at least 2\n+                if (codecpriv_size > MAX_H264_HEADER_SIZE - 8) {\n+                    av_log(s, AV_LOG_ERROR, \"H264 header size %d > %d bytes\\n\", codecpriv_size, MAX_H264_HEADER_SIZE - 8);\n+                    return AVERROR_INVALIDDATA;\n+                }\n+                put_ebml_binary(mkv->track.bc, MATROSKA_ID_CODECPRIVATE, codecpriv, codecpriv_size);\n+                filler = MAX_H264_HEADER_SIZE - (avio_tell(mkv->track.bc) - track->codecpriv_offset);\n+                if (filler < 2) {\n+                    av_log(s, AV_LOG_ERROR, \"Unexpected SPS/PPS filler length: %d\\n\", filler);\n+                    return AVERROR_BUG;\n+                }\n+                put_ebml_void(mkv->track.bc, filler);\n+            }\n+            else {\n+                // Do not write the OBUs as we don't have space saved for them\n+                put_ebml_binary(mkv->track.bc, MATROSKA_ID_CODECPRIVATE, codecpriv, 4);\n+            }\n             ffio_free_dyn_buf(&dyn_cp);\n             ret = ff_alloc_extradata(par, side_data_size);\n             if (ret < 0)\ndiff --git a/libavformat/movenc.c b/libavformat/movenc.c\nindex 2cd5773dc5..0cbbc094de 100644\n--- a/libavformat/movenc.c\n+++ b/libavformat/movenc.c\n@@ -5926,6 +5926,7 @@ static int mov_write_single_packet(AVFormatContext *s, AVPacket *pkt)\n     if (trk->par->codec_id == AV_CODEC_ID_MP4ALS ||\n             trk->par->codec_id == AV_CODEC_ID_AAC ||\n             trk->par->codec_id == AV_CODEC_ID_AV1 ||\n+            trk->par->codec_id == AV_CODEC_ID_H264 ||\n             trk->par->codec_id == AV_CODEC_ID_FLAC) {\n         buffer_size_t side_size;\n         uint8_t *side = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, &side_size);\ndiff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c\nindex 38e4c65c4e..5e04c1df08 100644\n--- a/libavformat/rtpenc.c\n+++ b/libavformat/rtpenc.c\n@@ -19,6 +19,7 @@\n  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n  */\n \n+#include \"avc.h\"\n #include \"avformat.h\"\n #include \"mpegts.h\"\n #include \"internal.h\"\n@@ -582,8 +583,25 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)\n         ff_rtp_send_vc2hq(s1, pkt->data, size, st->codecpar->field_order != AV_FIELD_PROGRESSIVE ? 1 : 0);\n         break;\n     case AV_CODEC_ID_H264:\n+    {\n+        uint8_t *side_data;\n+        int side_data_size = 0;\n+\n+        side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA,\n+                                            &side_data_size);\n+\n+        if (side_data_size != 0) {\n+            int ps_size = side_data_size;\n+            uint8_t * ps_buf = NULL;\n+\n+            ff_avc_write_annexb_extradata(side_data, &ps_buf, &ps_size);\n+            av_log(s1, AV_LOG_TRACE, \"H264: write side data=%d\\n\", ps_size);\n+            ff_rtp_send_h264_hevc(s1, ps_buf ? ps_buf : side_data, ps_size);\n+            av_free(ps_buf);\n+        }\n         ff_rtp_send_h264_hevc(s1, pkt->data, size);\n         break;\n+    }\n     case AV_CODEC_ID_H261:\n         ff_rtp_send_h261(s1, pkt->data, size);\n         break;\ndiff --git a/libavformat/utils.c b/libavformat/utils.c\nindex 75e5350a27..e10b493dae 100644\n--- a/libavformat/utils.c\n+++ b/libavformat/utils.c\n@@ -3013,6 +3013,40 @@ static int has_codec_parameters(AVStream *st, const char **errmsg_ptr)\n     return 1;\n }\n \n+#if CONFIG_HEVC_RPI_DECODER && CONFIG_HEVC_DECODER\n+// This should be quite general purpose but avoid possible conflicts\n+// by limiting usage to cases wehere we know it works.\n+static int try_fallback_decoder(AVCodecContext * const avctx, const AVCodec *const old_codec, AVDictionary ** const opts)\n+{\n+    // Only try fallback if we know it is supported (HEVC only)\n+    const AVCodec *const new_codec = old_codec->id != AV_CODEC_ID_HEVC ? NULL :\n+        avcodec_find_decoder_by_id_and_fmt(old_codec->id, AV_PIX_FMT_NONE);\n+    int err;\n+\n+    // Failed to find fallback or we are already at the fallback\n+    if (new_codec == NULL || new_codec == old_codec)\n+    {\n+        return AVERROR_DECODER_NOT_FOUND;\n+    }\n+\n+    // * This may be dodgy - header says to not use this fn,\n+    //   especially if we are going to reopen the context...\n+    //   (but it does seem to work for our cases)\n+    if (avcodec_is_open(avctx)) {\n+        avcodec_close(avctx);\n+    }\n+\n+    if ((err = avcodec_open2(avctx, new_codec, opts)) < 0)\n+    {\n+        return err;\n+    }\n+\n+    return 0;\n+}\n+#else\n+#define try_fallback_decoder(avctx, old_codec, opts) (AVERROR_DECODER_NOT_FOUND)\n+#endif\n+\n /* returns 1 or 0 if or if not decoded data was returned, or a negative error */\n static int try_decode_frame(AVFormatContext *s, AVStream *st,\n                             const AVPacket *avpkt, AVDictionary **options)\n@@ -3051,7 +3085,11 @@ static int try_decode_frame(AVFormatContext *s, AVStream *st,\n         av_dict_set(options ? options : &thread_opt, \"lowres\", \"0\", 0);\n         if (s->codec_whitelist)\n             av_dict_set(options ? options : &thread_opt, \"codec_whitelist\", s->codec_whitelist, 0);\n-        ret = avcodec_open2(avctx, codec, options ? options : &thread_opt);\n+        if ((ret = avcodec_open2(avctx, codec, options ? options : &thread_opt)) == AVERROR_DECODER_NOT_FOUND)\n+        {\n+            // Try fallback if if looks worth a try\n+            ret = try_fallback_decoder(avctx, codec, options ? options : &thread_opt);\n+        }\n         if (!options)\n             av_dict_free(&thread_opt);\n         if (ret < 0) {\n@@ -3082,6 +3120,14 @@ static int try_decode_frame(AVFormatContext *s, AVStream *st,\n         if (avctx->codec_type == AVMEDIA_TYPE_VIDEO ||\n             avctx->codec_type == AVMEDIA_TYPE_AUDIO) {\n             ret = avcodec_send_packet(avctx, &pkt);\n+\n+            // If we are going to want to fall back we should know here\n+            if (ret == AVERROR_DECODER_NOT_FOUND) {\n+                if ((ret = try_fallback_decoder(avctx, avctx->codec, options)) < 0)\n+                    break;\n+                continue;\n+            }\n+\n             if (ret < 0 && ret != AVERROR(EAGAIN) && ret != AVERROR_EOF)\n                 break;\n             if (ret >= 0)\n@@ -3710,9 +3756,20 @@ FF_ENABLE_DEPRECATION_WARNINGS\n         // Try to just open decoders, in case this is enough to get parameters.\n         if (!has_codec_parameters(st, NULL) && st->internal->request_probe <= 0) {\n             if (codec && !avctx->codec)\n-                if (avcodec_open2(avctx, codec, options ? &options[i] : &thread_opt) < 0)\n-                    av_log(ic, AV_LOG_WARNING,\n-                           \"Failed to open codec in %s\\n\",__FUNCTION__);\n+            {\n+                int err;\n+\n+                if ((err = avcodec_open2(avctx, codec, options ? &options[i] : &thread_opt)) < 0)\n+                {\n+                    if (err == AVERROR_DECODER_NOT_FOUND) {\n+                        err = try_fallback_decoder(avctx, codec, options ? &options[i] : &thread_opt);\n+                    }\n+                    if (err < 0) {\n+                        av_log(ic, AV_LOG_WARNING,\n+                               \"Failed to open codec in %s\\n\",__FUNCTION__);\n+                    }\n+                }\n+            }\n         }\n         if (!options)\n             av_dict_free(&thread_opt);\ndiff --git a/libavutil/Makefile b/libavutil/Makefile\nindex 27bafe9e12..c9075ddf8a 100644\n--- a/libavutil/Makefile\n+++ b/libavutil/Makefile\n@@ -68,6 +68,7 @@ HEADERS = adler32.h                                                     \\\n           rational.h                                                    \\\n           replaygain.h                                                  \\\n           ripemd.h                                                      \\\n+\t  rpi_sand_fns.h                                                \\\n           samplefmt.h                                                   \\\n           sha.h                                                         \\\n           sha512.h                                                      \\\n@@ -87,6 +88,7 @@ HEADERS = adler32.h                                                     \\\n           film_grain_params.h                                           \\\n \n HEADERS-$(CONFIG_LZO)                   += lzo.h\n+HEADERS-$(CONFIG-RPI)                   += rpi_sand_fn_pw.h\n \n ARCH_HEADERS = bswap.h                                                  \\\n                intmath.h                                                \\\n@@ -182,6 +184,7 @@ OBJS-$(CONFIG_LZO)                      += lzo.o\n OBJS-$(CONFIG_MEDIACODEC)               += hwcontext_mediacodec.o\n OBJS-$(CONFIG_OPENCL)                   += hwcontext_opencl.o\n OBJS-$(CONFIG_QSV)                      += hwcontext_qsv.o\n+OBJS-$(CONFIG_SAND)                     += rpi_sand_fns.o\n OBJS-$(CONFIG_VAAPI)                    += hwcontext_vaapi.o\n OBJS-$(CONFIG_VIDEOTOOLBOX)             += hwcontext_videotoolbox.o\n OBJS-$(CONFIG_VDPAU)                    += hwcontext_vdpau.o\ndiff --git a/libavutil/aarch64/Makefile b/libavutil/aarch64/Makefile\nindex 5613813ba8..ab8bcfcf34 100644\n--- a/libavutil/aarch64/Makefile\n+++ b/libavutil/aarch64/Makefile\n@@ -1,4 +1,6 @@\n OBJS += aarch64/cpu.o                                                 \\\n         aarch64/float_dsp_init.o                                      \\\n \n-NEON-OBJS += aarch64/float_dsp_neon.o\n+NEON-OBJS += aarch64/float_dsp_neon.o                                 \\\n+             aarch64/rpi_sand_neon.o                                  \\\n+\ndiff --git a/libavutil/aarch64/rpi_sand_neon.S b/libavutil/aarch64/rpi_sand_neon.S\nnew file mode 100644\nindex 0000000000..11658de0c8\n--- /dev/null\n+++ b/libavutil/aarch64/rpi_sand_neon.S\n@@ -0,0 +1,672 @@\n+/*\n+Copyright (c) 2021 Michael Eiler\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: Michael Eiler <eiler.mike@gmail.com>\n+*/\n+\n+#include \"asm.S\"\n+\n+// void ff_rpi_sand8_lines_to_planar_y8(\n+//   uint8_t * dest,            : x0\n+//   unsigned int dst_stride,   : w1\n+//   const uint8_t * src,       : x2\n+//   unsigned int src_stride1,  : w3, always 128\n+//   unsigned int src_stride2,  : w4\n+//   unsigned int _x,           : w5\n+//   unsigned int y,            : w6\n+//   unsigned int _w,           : w7\n+//   unsigned int h);           : [sp, #0]\n+\n+function ff_rpi_sand8_lines_to_planar_y8, export=1\n+    // w15 contains the number of rows we need to process\n+    ldr w15, [sp, #0]\n+\n+    // w8 will contain the number of blocks per row\n+    // w8 = floor(_w/stride1)\n+    // stride1 is assumed to always be 128\n+    mov w8, w1\n+    lsr w8, w8, #7\n+\n+    // in case the width of the image is not a multiple of 128, there will\n+    // be an incomplete block at the end of every row\n+    // w9 contains the number of pixels stored within this block\n+    // w9 = _w - w8 * 128\n+    lsl w9, w8, #7\n+    sub w9, w7, w9\n+\n+    // this is the value we have to add to the src pointer after reading a complete block\n+    // it will move the address to the start of the next block\n+    // w10 = stride2 * stride1 - stride1 \n+    mov w10, w4\n+    lsl w10, w10, #7\n+    sub w10, w10, #128\n+\n+    // w11 is the row offset, meaning the start offset of the first block of every collumn\n+    // this will be increased with stride1 within every iteration of the row_loop\n+    eor w11, w11, w11\n+\n+    // w12 = 0, processed row count\n+    eor w12, w12, w12\n+row_loop:\n+    // start of the first block within the current row\n+    // x13 = row offset + src\n+    mov x13, x2\n+    add x13, x13, x11\n+\n+    // w14 = 0, processed block count\n+    eor w14, w14, w14\n+\n+    cmp w8, #0\n+    beq no_main_y8\n+\n+block_loop:\n+    // copy 128 bytes (a full block) into the vector registers v0-v7 and increase the src address by 128\n+    // fortunately these aren't callee saved ones, meaning we don't need to backup them\n+    ld1 { v0.16b,  v1.16b,  v2.16b,  v3.16b}, [x13], #64\n+    ld1 { v4.16b,  v5.16b,  v6.16b,  v7.16b}, [x13], #64 \n+\n+    // write these registers back to the destination vector and increase the dst address by 128\n+    st1 { v0.16b,  v1.16b,  v2.16b,  v3.16b }, [x0], #64\n+    st1 { v4.16b,  v5.16b,  v6.16b,  v7.16b }, [x0], #64\n+\n+    // move the source register to the beginning of the next block (x13 = src + block offset)\n+    add x13, x13, x10\n+    // increase the block counter\n+    add w14, w14, #1\n+\n+    // continue with the block_loop if we haven't copied all full blocks yet\n+    cmp w8, w14\n+    bgt block_loop\n+\n+    // handle the last block at the end of each row\n+    // at most 127 byte values copied from src to dst\n+no_main_y8:\n+    eor w5, w5, w5 // i = 0\n+incomplete_block_loop_y8:\n+    cmp w5, w9\n+    bge incomplete_block_loop_end_y8\n+\n+    ldrb w6, [x13]\n+    strb w6, [x0]\n+    add x13, x13, #1\n+    add x0, x0, #1\n+\n+    add w5, w5, #1\n+    b incomplete_block_loop_y8\n+incomplete_block_loop_end_y8:\n+    \n+   \n+    // increase the row offset by 128 (stride1) \n+    add w11, w11, #128\n+    // increment the row counter\n+    add w12, w12, #1\n+    \n+    // process the next row if we haven't finished yet\n+    cmp w15, w12\n+    bgt row_loop\n+\n+    ret\n+endfunc\n+\n+\n+\n+// void ff_rpi_sand8_lines_to_planar_c8(\n+//   uint8_t * dst_u,           : x0\n+//   unsigned int dst_stride_u, : w1 == width\n+//   uint8_t * dst_v,           : x2\n+//   unsigned int dst_stride_v, : w3 == width\n+//   const uint8_t * src,       : x4\n+//   unsigned int stride1,      : w5 == 128\n+//   unsigned int stride2,      : w6\n+//   unsigned int _x,           : w7\n+//   unsigned int y,            : [sp, #0]\n+//   unsigned int _w,           : [sp, #8]\n+//   unsigned int h);           : [sp, #16]\n+\n+function ff_rpi_sand8_lines_to_planar_c8, export=1\n+    // w7 = width\n+    ldr w7, [sp, #8]\n+\n+    // w15 contains the number of rows we need to process\n+    // counts down\n+    ldr w15, [sp, #16]\n+\n+    // number of full blocks, w8 = _w / (stride1 >> 1) == _w / 64 == _w >> 6\n+    mov w8, w7\n+    lsr w8, w8, #6\n+\n+    // number of pixels in block at the end of every row\n+    // w9 = _w - (w8 * 64)\n+    lsl w9, w8, #6\n+    sub w9, w7, w9\n+\n+    // Skip at the end of the line to account for stride\n+    sub w12, w1, w7\n+\n+    // address delta to the beginning of the next block\n+    // w10 = (stride2 * stride1 - stride1) = stride2 * 128 - 128\n+    lsl w10, w6, #7\n+    sub w10, w10, #128\n+\n+    // w11 = row address start offset = 0\n+    eor w11, w11, w11\n+\n+row_loop_c8:\n+    // start of the first block within the current row\n+    // x13 = row offset + src\n+    mov x13, x4\n+    add x13, x13, x11\n+\n+    // w14 = 0, processed block count\n+    eor w14, w14, w14\n+\n+    cmp w8, #0\n+    beq no_main_c8\n+\n+block_loop_c8:\n+    // load the full block -> 128 bytes, the block contains 64 interleaved U and V values \n+    ld2 { v0.16b,  v1.16b }, [x13], #32\n+    ld2 { v2.16b,  v3.16b }, [x13], #32\n+    ld2 { v4.16b,  v5.16b }, [x13], #32\n+    ld2 { v6.16b,  v7.16b }, [x13], #32\n+\n+    // swap register so that we can write them out with a single instruction\n+    mov v16.16b, v1.16b\n+    mov v17.16b, v3.16b\n+    mov v18.16b, v5.16b\n+    mov v1.16b, v2.16b\n+    mov v2.16b, v4.16b\n+    mov v3.16b, v6.16b\n+    mov v4.16b, v16.16b\n+    mov v5.16b, v17.16b\n+    mov v6.16b, v18.16b\n+\n+    st1 { v0.16b,  v1.16b,  v2.16b,  v3.16b }, [x0], #64\n+    st1 { v4.16b,  v5.16b,  v6.16b,  v7.16b }, [x2], #64\n+\n+    // increment row counter and move src to the beginning of the next block\n+    add w14, w14, #1\n+    add x13, x13, x10\n+    \n+    // jump to block_loop_c8 iff the block count is smaller than the number of full blocks\n+    cmp w8, w14\n+    bgt block_loop_c8\n+\n+no_main_c8:\n+    // handle incomplete block at the end of every row\n+    eor w5, w5, w5 // point counter, this might be \n+incomplete_block_loop_c8:\n+    cmp w5, w9\n+    bge incomplete_block_loop_end_c8\n+\n+    ldrb w1, [x13]\n+    strb w1, [x0]\n+    add x13, x13, #1\n+\n+    ldrb w1, [x13]\n+    strb w1, [x2]\n+    add x13, x13, #1\n+\n+    add x0, x0, #1\n+    add x2, x2, #1\n+\n+    add w5, w5, #1\n+    b incomplete_block_loop_c8\n+incomplete_block_loop_end_c8:\n+\n+    // increase row_offset by stride1\n+    add w11, w11, #128\n+    add x0, x0, w12, sxtw\n+    add x2, x2, w12, sxtw\n+\n+    // jump to row_Loop_c8 iff the row count is small than the height\n+    subs w15, w15, #1\n+    bgt row_loop_c8\n+\n+    ret\n+endfunc\n+\n+// Unzip chroma\n+//\n+// On entry:\n+// a0 = V0, U2,  ...\n+// a1 = U0, V1,  ...\n+// a2 = U1, V2,  ...\n+// b0 = V8, U10, ...\n+// b1 = U8, V9,  ...\n+// b2 = U9, V10, ...\n+//\n+// On exit:\n+// d0 = U0, U3, ...\n+// ...\n+// a0 = V0, V3, ..\n+// ...\n+//\n+// Reg order for USAND is a1, a0, a2 (i.e. swap natural order of 1st 2 dest regs)\n+\n+.macro UZPH_C d0, d1, d2, a0, a1, a2, b0, b1, b2\n+                uzp1            \\d0\\().8h, \\a1\\().8h, \\b1\\().8h\n+                uzp1            \\d1\\().8h, \\a2\\().8h, \\b2\\().8h\n+                uzp2            \\d2\\().8h, \\a0\\().8h, \\b0\\().8h\n+\n+                uzp1            \\a0\\().8h, \\a0\\().8h, \\b0\\().8h\n+                uzp2            \\a1\\().8h, \\a1\\().8h, \\b1\\().8h\n+                uzp2            \\a2\\().8h, \\a2\\().8h, \\b2\\().8h\n+.endm\n+\n+// SAND30 -> 10bit\n+.macro USAND10 d0, d1, d2, a0, a1\n+                shrn            \\d2\\().4h, \\a0\\().4s, #14\n+                shrn            \\d1\\().4h, \\a0\\().4s, #10\n+\n+                shrn2           \\d2\\().8h, \\a1\\().4s, #14\n+                shrn2           \\d1\\().8h, \\a1\\().4s, #10\n+                uzp1            \\d0\\().8h, \\a0\\().8h, \\a1\\().8h\n+\n+                ushr            \\d2\\().8h, \\d2\\().8h, #6\n+                bic             \\d0\\().8h, #0xfc,     lsl #8\n+                bic             \\d1\\().8h, #0xfc,     lsl #8\n+.endm\n+\n+// SAND30 -> 8bit\n+.macro USAND8 d0, d1, d2, a0, a1, a2, a3, t0, t1, t2\n+                shrn            \\d1\\().4h,  \\a0\\().4s,  #12\n+                shrn2           \\d1\\().8h,  \\a1\\().4s,  #12\n+                uzp1            \\d0\\().8h,  \\a0\\().8h,  \\a1\\().8h\n+                uzp2            \\d2\\().8h,  \\a0\\().8h,  \\a1\\().8h\n+\n+                shrn            \\t1\\().4h,  \\a2\\().4s,  #12\n+                shrn2           \\t1\\().8h,  \\a3\\().4s,  #12\n+                uzp1            \\t0\\().8h,  \\a2\\().8h,  \\a3\\().8h\n+                uzp2            \\t2\\().8h,  \\a2\\().8h,  \\a3\\().8h\n+\n+                shrn            \\d0\\().8b,  \\d0\\().8h,  #2\n+                shrn2           \\d0\\().16b, \\t0\\().8h,  #2\n+                shrn            \\d2\\().8b,  \\d2\\().8h,  #6\n+                shrn2           \\d2\\().16b, \\t2\\().8h,  #6\n+                uzp1            \\d1\\().16b, \\d1\\().16b, \\t1\\().16b\n+.endm\n+\n+\n+// void ff_rpi_sand30_lines_to_planar_c16(\n+//   uint8_t * dst_u,            // [x0]\n+//   unsigned int dst_stride_u,  // [w1]\n+//   uint8_t * dst_v,            // [x2]\n+//   unsigned int dst_stride_v,  // [w3]\n+//   const uint8_t * src,        // [x4]\n+//   unsigned int stride1,       // [w5]      128\n+//   unsigned int stride2,       // [w6]\n+//   unsigned int _x,            // [w7]      0\n+//   unsigned int y,             // [sp, #0]\n+//   unsigned int _w,            // [sp, #8]  w9\n+//   unsigned int h);            // [sp, #16] w10\n+\n+function ff_rpi_sand30_lines_to_planar_c16, export=1\n+                ldr             w7,  [sp, #0]                   // y\n+                ldr             w8,  [sp, #8]                   // _w\n+                ldr             w10, [sp, #16]                  // h\n+                lsl             w6,  w6,  #7                    // Fixup stride2\n+                sub             w6,  w6,  #64\n+                uxtw            x6,  w6\n+                sub             w1,  w1,  w8,  LSL #1           // Fixup chroma strides\n+                sub             w3,  w3,  w8,  LSL #1\n+                lsl             w7,  w7,  #7                    // Add y to src\n+                add             x4,  x4,  w7,  UXTW\n+10:\n+                mov             w13, #0\n+                mov             x5,  x4\n+                mov             w9,  w8\n+1:\n+                ld1             {v0.4s-v3.4s}, [x5], #64\n+                ld1             {v4.4s-v7.4s}, [x5], x6\n+                subs            w9,  w9,  #48\n+\n+                USAND10         v17, v16, v18, v0, v1\n+                USAND10         v20, v19, v21, v2, v3\n+                UZPH_C          v0, v1, v2, v16, v17, v18, v19, v20, v21\n+                USAND10         v23, v22, v24, v4, v5\n+                USAND10         v26, v25, v27, v6, v7\n+                UZPH_C          v4, v5, v6, v22, v23, v24, v25, v26, v27\n+\n+                blt             2f\n+\n+                st3             {v0.8h-v2.8h},   [x0], #48\n+                st3             {v4.8h-v6.8h},   [x0], #48\n+                st3             {v16.8h-v18.8h}, [x2], #48\n+                st3             {v22.8h-v24.8h}, [x2], #48\n+\n+                bne             1b\n+11:\n+                subs            w10, w10, #1\n+                add             x4,  x4,  #128\n+                add             x0,  x0,  w1,  UXTW\n+                add             x2,  x2,  w3,  UXTW\n+                bne             10b\n+99:\n+                ret\n+\n+// Partial final write\n+2:\n+                cmp             w9,  #24-48\n+                blt             1f\n+                st3             {v0.8h  - v2.8h},  [x0], #48\n+                st3             {v16.8h - v18.8h}, [x2], #48\n+                beq             11b\n+                mov             v0.16b,  v4.16b\n+                mov             v1.16b,  v5.16b\n+                sub             w9,  w9,  #24\n+                mov             v2.16b,  v6.16b\n+                mov             v16.16b, v22.16b\n+                mov             v17.16b, v23.16b\n+                mov             v18.16b, v24.16b\n+1:\n+                cmp             w9,  #12-48\n+                blt             1f\n+                st3             {v0.4h  - v2.4h},  [x0], #24\n+                st3             {v16.4h - v18.4h}, [x2], #24\n+                beq             11b\n+                mov             v0.2d[0],  v0.2d[1]\n+                sub             w9,  w9,  #12\n+                mov             v1.2d[0],  v1.2d[1]\n+                mov             v2.2d[0],  v2.2d[1]\n+                mov             v16.2d[0], v16.2d[1]\n+                mov             v17.2d[0], v17.2d[1]\n+                mov             v18.2d[0], v18.2d[1]\n+1:\n+                cmp             w9,  #6-48\n+                blt             1f\n+                st3             {v0.h  - v2.h}[0],  [x0], #6\n+                st3             {v0.h  - v2.h}[1],  [x0], #6\n+                st3             {v16.h - v18.h}[0], [x2], #6\n+                st3             {v16.h - v18.h}[1], [x2], #6\n+                beq             11b\n+                mov             v0.s[0],  v0.s[1]\n+                sub             w9,  w9,  #6\n+                mov             v1.s[0],  v1.s[1]\n+                mov             v2.s[0],  v2.s[1]\n+                mov             v16.s[0], v16.s[1]\n+                mov             v17.s[0], v17.s[1]\n+                mov             v18.s[0], v18.s[1]\n+1:\n+                cmp             w9,  #3-48\n+                blt             1f\n+                st3             {v0.h  - v2.h}[0],  [x0], #6\n+                st3             {v16.h - v18.h}[0], [x2], #6\n+                beq             11b\n+                mov             v0.h[0],  v0.h[1]\n+                sub             w9,  w9,  #3\n+                mov             v1.h[0],  v1.h[1]\n+                mov             v16.h[0], v16.h[1]\n+                mov             v17.h[0], v17.h[1]\n+1:\n+                cmp             w9,  #2-48\n+                blt             1f\n+                st2             {v0.h  - v1.h}[0],  [x0], #4\n+                st2             {v16.h - v17.h}[0], [x2], #4\n+                b               11b\n+1:\n+                st1             {v0.h}[0],  [x0], #2\n+                st1             {v16.h}[0], [x2], #2\n+                b               11b\n+endfunc\n+\n+\n+//void ff_rpi_sand30_lines_to_planar_p010(\n+//  uint8_t * dest,\n+//  unsigned int dst_stride,\n+//  const uint8_t * src,\n+//  unsigned int src_stride1,\n+//  unsigned int src_stride2,\n+//  unsigned int _x,\n+//  unsigned int y,\n+//  unsigned int _w,\n+//  unsigned int h);\n+\n+// void ff_rpi_sand30_lines_to_planar_y8(\n+//   uint8_t * dest,            : x0\n+//   unsigned int dst_stride,   : w1\n+//   const uint8_t * src,       : x2\n+//   unsigned int src_stride1,  : w3, always 128\n+//   unsigned int src_stride2,  : w4\n+//   unsigned int _x,           : w5\n+//   unsigned int y,            : w6\n+//   unsigned int _w,           : w7\n+//   unsigned int h);           : [sp, #0]\n+//\n+// Assumes that we are starting on a stripe boundary and that overreading\n+// within the stripe is OK. However it does respect the dest size for wri\n+\n+function ff_rpi_sand30_lines_to_planar_y16, export=1\n+                lsl             w4,  w4,  #7\n+                sub             w4,  w4,  #64\n+                uxtw            x4,  w4\n+                sub             w1,  w1,  w7, lsl #1\n+                uxtw            x6,  w6\n+                add             x8,  x2,  x6, lsl #7\n+                ldr             w6,  [sp, #0]\n+\n+10:\n+                mov             x2,  x8\n+                mov             w5,  w7\n+1:\n+                ld1             {v0.4s, v1.4s, v2.4s, v3.4s}, [x2], #64\n+                ld1             {v4.4s, v5.4s, v6.4s, v7.4s}, [x2], x4\n+\n+                subs            w5,  w5,  #96\n+\n+                USAND10         v16, v17, v18, v0, v1\n+                USAND10         v19, v20, v21, v2, v3\n+                USAND10         v22, v23, v24, v4, v5\n+                USAND10         v25, v26, v27, v6, v7\n+\n+                blt             2f\n+\n+                st3             {v16.8h, v17.8h, v18.8h}, [x0], #48\n+                st3             {v19.8h, v20.8h, v21.8h}, [x0], #48\n+                st3             {v22.8h, v23.8h, v24.8h}, [x0], #48\n+                st3             {v25.8h, v26.8h, v27.8h}, [x0], #48\n+\n+                bne             1b\n+\n+11:\n+                subs            w6,  w6,  #1\n+                add             x0,  x0,  w1,  uxtw\n+                add             x8,  x8,  #128\n+                bne             10b\n+\n+                ret\n+\n+// Partial final write\n+2:\n+                cmp             w5,  #48-96\n+                blt             1f\n+                st3             {v16.8h, v17.8h, v18.8h}, [x0], #48\n+                st3             {v19.8h, v20.8h, v21.8h}, [x0], #48\n+                beq             11b\n+                mov             v16.16b, v22.16b\n+                mov             v17.16b, v23.16b\n+                sub             w5,  w5,  #48\n+                mov             v18.16b, v24.16b\n+                mov             v19.16b, v25.16b\n+                mov             v20.16b, v26.16b\n+                mov             v21.16b, v27.16b\n+1:\n+                cmp             w5,  #24-96\n+                blt             1f\n+                st3             {v16.8h, v17.8h, v18.8h}, [x0], #48\n+                beq             11b\n+                mov             v16.16b, v19.16b\n+                mov             v17.16b, v20.16b\n+                sub             w5,  w5,  #24\n+                mov             v18.16b, v21.16b\n+1:\n+                cmp             w5,  #12-96\n+                blt             1f\n+                st3             {v16.4h, v17.4h, v18.4h}, [x0], #24\n+                beq             11b\n+                mov             v16.2d[0], v16.2d[1]\n+                sub             w5,  w5,  #12\n+                mov             v17.2d[0], v17.2d[1]\n+                mov             v18.2d[0], v18.2d[1]\n+1:\n+                cmp             w5,  #6-96\n+                blt             1f\n+                st3             {v16.h, v17.h, v18.h}[0], [x0], #6\n+                st3             {v16.h, v17.h, v18.h}[1], [x0], #6\n+                beq             11b\n+                mov             v16.2s[0], v16.2s[1]\n+                sub             w5,  w5,  #6\n+                mov             v17.2s[0], v17.2s[1]\n+                mov             v18.2s[0], v18.2s[1]\n+1:\n+                cmp             w5,  #3-96\n+                blt             1f\n+                st3             {v16.h, v17.h, v18.h}[0], [x0], #6\n+                beq             11b\n+                mov             v16.4h[0], v16.4h[1]\n+                sub             w5,  w5,  #3\n+                mov             v17.4h[0], v17.4h[1]\n+1:\n+                cmp             w5,  #2-96\n+                blt             1f\n+                st2             {v16.h, v17.h}[0], [x0], #4\n+                b               11b\n+1:\n+                st1             {v16.h}[0], [x0], #2\n+                b               11b\n+\n+endfunc\n+\n+// void ff_rpi_sand30_lines_to_planar_y8(\n+//   uint8_t * dest,            : x0\n+//   unsigned int dst_stride,   : w1\n+//   const uint8_t * src,       : x2\n+//   unsigned int src_stride1,  : w3, always 128\n+//   unsigned int src_stride2,  : w4\n+//   unsigned int _x,           : w5\n+//   unsigned int y,            : w6\n+//   unsigned int _w,           : w7\n+//   unsigned int h);           : [sp, #0]\n+//\n+// Assumes that we are starting on a stripe boundary and that overreading\n+// within the stripe is OK. However it does respect the dest size for wri\n+\n+function ff_rpi_sand30_lines_to_planar_y8, export=1\n+                lsl             w4,  w4,  #7\n+                sub             w4,  w4,  #64\n+                uxtw            x4,  w4\n+                sub             w1,  w1,  w7\n+                uxtw            x6,  w6\n+                add             x8,  x2,  x6, lsl #7\n+                ldr             w6,  [sp, #0]\n+\n+10:\n+                mov             x2,  x8\n+                mov             w5,  w7\n+1:\n+                ld1             {v0.4s, v1.4s, v2.4s, v3.4s}, [x2], #64\n+                ld1             {v4.4s, v5.4s, v6.4s, v7.4s}, [x2], x4\n+\n+                subs            w5,  w5,  #96\n+\n+                // v0, v1\n+                USAND8          v16, v17, v18, v0, v1, v2, v3, v22, v23, v24\n+                USAND8          v19, v20, v21, v4, v5, v6, v7, v22, v23, v24\n+\n+                blt             2f\n+\n+                st3             {v16.16b, v17.16b, v18.16b}, [x0], #48\n+                st3             {v19.16b, v20.16b, v21.16b}, [x0], #48\n+\n+                bne             1b\n+\n+11:\n+                subs            w6,  w6,  #1\n+                add             x0,  x0,  w1,  uxtw\n+                add             x8,  x8,  #128\n+                bne             10b\n+\n+                ret\n+\n+// Partial final write\n+2:\n+                cmp             w5,  #48-96\n+                blt             1f\n+                st3             {v16.16b, v17.16b, v18.16b}, [x0], #48\n+                beq             11b\n+                mov             v16.16b, v22.16b\n+                mov             v17.16b, v23.16b\n+                sub             w5,  w5,  #48\n+                mov             v18.16b, v24.16b\n+1:\n+                cmp             w5,  #24-96\n+                blt             1f\n+                st3             {v16.8b, v17.8b, v18.8b}, [x0], #24\n+                beq             11b\n+                mov             v16.2d[0], v16.2d[1]\n+                sub             w5,  w5,  #24\n+                mov             v17.2d[0], v17.2d[1]\n+                mov             v18.2d[0], v18.2d[1]\n+1:\n+                cmp             w5,  #12-96\n+                blt             1f\n+                st3             {v16.b, v17.b, v18.b}[0], [x0], #3\n+                st3             {v16.b, v17.b, v18.b}[1], [x0], #3\n+                st3             {v16.b, v17.b, v18.b}[2], [x0], #3\n+                st3             {v16.b, v17.b, v18.b}[3], [x0], #3\n+                beq             11b\n+                mov             v16.2s[0], v16.2s[1]\n+                sub             w5,  w5,  #12\n+                mov             v17.2s[0], v17.2s[1]\n+                mov             v18.2s[0], v18.2s[1]\n+1:\n+                cmp             w5,  #6-96\n+                blt             1f\n+                st3             {v16.b, v17.b, v18.b}[0], [x0], #3\n+                st3             {v16.b, v17.b, v18.b}[1], [x0], #3\n+                beq             11b\n+                mov             v16.4h[0], v16.4h[1]\n+                sub             w5,  w5,  #6\n+                mov             v17.4h[0], v17.4h[1]\n+                mov             v18.4h[0], v18.4h[1]\n+1:\n+                cmp             w5,  #3-96\n+                blt             1f\n+                st3             {v16.b, v17.b, v18.b}[0], [x0], #3\n+                beq             11b\n+                mov             v16.8b[0], v16.8b[1]\n+                sub             w5,  w5,  #3\n+                mov             v17.8b[0], v17.8b[1]\n+1:\n+                cmp             w5,  #2-96\n+                blt             1f\n+                st2             {v16.b, v17.b}[0], [x0], #2\n+                b               11b\n+1:\n+                st1             {v16.b}[0], [x0], #1\n+                b               11b\n+\n+endfunc\n+\ndiff --git a/libavutil/aarch64/rpi_sand_neon.h b/libavutil/aarch64/rpi_sand_neon.h\nnew file mode 100644\nindex 0000000000..2a56135bc3\n--- /dev/null\n+++ b/libavutil/aarch64/rpi_sand_neon.h\n@@ -0,0 +1,59 @@\n+/*\n+Copyright (c) 2021 Michael Eiler\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: Michael Eiler <eiler.mike@gmail.com>\n+*/\n+\n+#pragma once\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+void ff_rpi_sand8_lines_to_planar_y8(uint8_t * dest, unsigned int dst_stride,\n+  const uint8_t * src, unsigned int src_stride1, unsigned int src_stride2,\n+  unsigned int _x, unsigned int y, unsigned int _w, unsigned int h);\n+\n+void ff_rpi_sand8_lines_to_planar_c8(uint8_t * dst_u, unsigned int dst_stride_u,\n+  uint8_t * dst_v, unsigned int dst_stride_v, const uint8_t * src,\n+  unsigned int stride1, unsigned int stride2, unsigned int _x, unsigned int y,\n+  unsigned int _w, unsigned int h);\n+\n+void ff_rpi_sand30_lines_to_planar_y16(uint8_t * dest, unsigned int dst_stride,\n+  const uint8_t * src, unsigned int src_stride1, unsigned int src_stride2,\n+  unsigned int _x, unsigned int y, unsigned int _w, unsigned int h);\n+\n+void ff_rpi_sand30_lines_to_planar_c16(uint8_t * dst_u, unsigned int dst_stride_u,\n+  uint8_t * dst_v, unsigned int dst_stride_v, const uint8_t * src, unsigned int stride1,\n+  unsigned int stride2, unsigned int _x, unsigned int y, unsigned int _w, unsigned int h);\n+\n+void ff_rpi_sand30_lines_to_planar_y8(uint8_t * dest, unsigned int dst_stride,\n+  const uint8_t * src, unsigned int src_stride1, unsigned int src_stride2,\n+  unsigned int _x, unsigned int y, unsigned int _w, unsigned int h);\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\ndiff --git a/libavutil/arm/Makefile b/libavutil/arm/Makefile\nindex 5da44b0542..b74b7c4e2f 100644\n--- a/libavutil/arm/Makefile\n+++ b/libavutil/arm/Makefile\n@@ -6,3 +6,4 @@ VFP-OBJS += arm/float_dsp_init_vfp.o                                    \\\n \n NEON-OBJS += arm/float_dsp_init_neon.o                                  \\\n              arm/float_dsp_neon.o                                       \\\n+             arm/rpi_sand_neon.o                                        \\\ndiff --git a/libavutil/arm/rpi_sand_neon.S b/libavutil/arm/rpi_sand_neon.S\nnew file mode 100644\nindex 0000000000..60e697f681\n--- /dev/null\n+++ b/libavutil/arm/rpi_sand_neon.S\n@@ -0,0 +1,925 @@\n+/*\n+Copyright (c) 2018 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox\n+*/\n+\n+#include \"libavutil/arm/asm.S\"\n+\n+\n+@ General notes:\n+@ Having done some timing on this in sand8->y8 (Pi4)\n+@  vst1 (680fps) is a bit faster than vstm (660fps)\n+@  vldm (680fps) is noticably faster than vld1 (480fps)\n+@  (or it might be that a mix is what is required)\n+@\n+@ At least on a Pi4 it is no more expensive to have a single auto-inc register\n+@ for dest address than it is to have 2 used alternately (On Pi3 Ben asserted\n+@ the latter was better)\n+@\n+@ vstm will bus error on unaligned access (so will vldm), vst1 is safe unless\n+@ the memory is uncached.\n+@ As these are Sand -> planar we can assume that src is going to be aligned but\n+@ it is possible that dest isn't (converting to .yuv or other packed format).\n+@ Luckily vst1 is faster than vstm :-) so all is well\n+@ vst1 has alignment requirements of el size so maybe splitting vst1.32 into 4\n+@ .8 stores would let us do non-word aligned stores into uncached but it\n+@ probably isn't worth it.\n+\n+\n+\n+\n+@ void ff_rpi_sand128b_stripe_to_8_10(\n+@   uint8_t * dest,             // [r0]\n+@   const uint8_t * src1,       // [r1]\n+@   const uint8_t * src2,       // [r2]\n+@   unsigned int lines);        // [r3]\n+\n+.macro  stripe2_to_8, bit_depth\n+        vpush    {q4-q7}\n+1:\n+        vldm     r1!, {q0-q7}\n+        subs     r3, #1\n+        vldm     r2!, {q8-q15}\n+        vqrshrn.u16 d0,  q0,  #\\bit_depth - 8\n+        vqrshrn.u16 d1,  q1,  #\\bit_depth - 8\n+        vqrshrn.u16 d2,  q2,  #\\bit_depth - 8\n+        vqrshrn.u16 d3,  q3,  #\\bit_depth - 8\n+        vqrshrn.u16 d4,  q4,  #\\bit_depth - 8\n+        vqrshrn.u16 d5,  q5,  #\\bit_depth - 8\n+        vqrshrn.u16 d6,  q6,  #\\bit_depth - 8\n+        vqrshrn.u16 d7,  q7,  #\\bit_depth - 8\n+        vqrshrn.u16 d8,  q8,  #\\bit_depth - 8\n+        vqrshrn.u16 d9,  q9,  #\\bit_depth - 8\n+        vqrshrn.u16 d10, q10, #\\bit_depth - 8\n+        vqrshrn.u16 d11, q11, #\\bit_depth - 8\n+        vqrshrn.u16 d12, q12, #\\bit_depth - 8\n+        vqrshrn.u16 d13, q13, #\\bit_depth - 8\n+        vqrshrn.u16 d14, q14, #\\bit_depth - 8\n+        vqrshrn.u16 d15, q15, #\\bit_depth - 8\n+        vstm     r0!, {q0-q7}\n+        bne      1b\n+        vpop     {q4-q7}\n+        bx       lr\n+.endm\n+\n+function ff_rpi_sand128b_stripe_to_8_10, export=1\n+        stripe2_to_8     10\n+endfunc\n+\n+@ void ff_rpi_sand8_lines_to_planar_y8(\n+@   uint8_t * dest,             // [r0]\n+@   unsigned int dst_stride,    // [r1]\n+@   const uint8_t * src,        // [r2]\n+@   unsigned int src_stride1,   // [r3]      Ignored - assumed 128\n+@   unsigned int src_stride2,   // [sp, #0]  -> r3\n+@   unsigned int _x,            // [sp, #4]  Ignored - 0\n+@   unsigned int y,             // [sp, #8]  (r7 in prefix)\n+@   unsigned int _w,            // [sp, #12] -> r6 (cur r5)\n+@   unsigned int h);            // [sp, #16] -> r7\n+@\n+@ Assumes that we are starting on a stripe boundary and that overreading\n+@ within the stripe is OK. However it does respect the dest size for writing\n+\n+function ff_rpi_sand8_lines_to_planar_y8, export=1\n+                push            {r4-r8, lr}     @ +24            L\n+                ldr             r3,  [sp, #24]\n+                ldr             r6,  [sp, #36]\n+                ldr             r7,  [sp, #32]  @ y\n+                lsl             r3,  #7\n+                sub             r1,  r6\n+                add             r8,  r2,  r7,  lsl #7\n+                ldr             r7,  [sp, #40]\n+\n+10:\n+                mov             r2,  r8\n+                add             r4,  r0,  #24\n+                mov             r5,  r6\n+                mov             lr,  #0\n+1:\n+                vldm            r2,  {q8-q15}\n+                add             r2,  r3\n+                subs            r5,  #128\n+                blt             2f\n+                vst1.8          {d16, d17, d18, d19}, [r0]!\n+                vst1.8          {d20, d21, d22, d23}, [r0]!\n+                vst1.8          {d24, d25, d26, d27}, [r0]!\n+                vst1.8          {d28, d29, d30, d31}, [r0]!\n+                bne             1b\n+11:\n+                subs            r7,  #1\n+                add             r0,  r1\n+                add             r8,  #128\n+                bne             10b\n+\n+                pop             {r4-r8, pc}\n+\n+@ Partial final write\n+2:\n+                cmp             r5,  #64-128\n+                blt             1f\n+                vst1.8          {d16, d17, d18, d19}, [r0]!\n+                vst1.8          {d20, d21, d22, d23}, [r0]!\n+                beq             11b\n+                vmov            q8,  q12\n+                vmov            q9,  q13\n+                sub             r5,  #64\n+                vmov            q10, q14\n+                vmov            q11, q15\n+1:\n+                cmp             r5,  #32-128\n+                blt             1f\n+                vst1.8          {d16, d17, d18, d19}, [r0]!\n+                beq             11b\n+                vmov            q8,  q10\n+                sub             r5,  #32\n+                vmov            q9,  q11\n+1:\n+                cmp             r5,  #16-128\n+                blt             1f\n+                vst1.8          {d16, d17}, [r0]!\n+                beq             11b\n+                sub             r5,  #16\n+                vmov            q8,  q9\n+1:\n+                cmp             r5,  #8-128\n+                blt             1f\n+                vst1.8          {d16}, [r0]!\n+                beq             11b\n+                sub             r5,  #8\n+                vmov            d16, d17\n+1:\n+                cmp             r5,  #4-128\n+                blt             1f\n+                vst1.32         {d16[0]}, [r0]!\n+                beq             11b\n+                sub             r5,  #4\n+                vshr.u64        d16, #32\n+1:\n+                cmp             r5,  #2-128\n+                blt             1f\n+                vst1.16         {d16[0]}, [r0]!\n+                beq             11b\n+                vst1.8          {d16[2]}, [r0]!\n+                b               11b\n+1:\n+                vst1.8          {d16[0]}, [r0]!\n+                b               11b\n+endfunc\n+\n+@ void ff_rpi_sand8_lines_to_planar_c8(\n+@   uint8_t * dst_u,            // [r0]\n+@   unsigned int dst_stride_u,  // [r1]\n+@   uint8_t * dst_v,            // [r2]\n+@   unsigned int dst_stride_v,  // [r3]\n+@   const uint8_t * src,        // [sp, #0]  -> r4, r5\n+@   unsigned int stride1,       // [sp, #4]  128\n+@   unsigned int stride2,       // [sp, #8]  -> r8\n+@   unsigned int _x,            // [sp, #12] 0\n+@   unsigned int y,             // [sp, #16] (r7 in prefix)\n+@   unsigned int _w,            // [sp, #20] -> r12, r6\n+@   unsigned int h);            // [sp, #24] -> r7\n+@\n+@ Assumes that we are starting on a stripe boundary and that overreading\n+@ within the stripe is OK. However it does respect the dest size for writing\n+\n+function ff_rpi_sand8_lines_to_planar_c8, export=1\n+                push            {r4-r8, lr}     @ +24\n+\n+                ldr             r5,  [sp, #24]\n+                ldr             r8,  [sp, #32]\n+                ldr             r7,  [sp, #40]\n+                ldr             r6,  [sp, #44]\n+                lsl             r8,  #7\n+                add             r5,  r5,  r7,  lsl #7\n+                sub             r1,  r1,  r6\n+                sub             r3,  r3,  r6\n+                ldr             r7,  [sp, #48]\n+                vpush           {q4-q7}\n+\n+10:\n+                mov             r4,  r5\n+                mov             r12, r6\n+1:\n+                subs            r12, #64\n+                vldm            r4,  {q0-q7}\n+                add             r4,  r8\n+                it              gt\n+                vldmgt          r4,  {q8-q15}\n+                add             r4,  r8\n+\n+                vuzp.8          q0,  q1\n+                vuzp.8          q2,  q3\n+                vuzp.8          q4,  q5\n+                vuzp.8          q6,  q7\n+\n+                vuzp.8          q8,  q9\n+                vuzp.8          q10, q11\n+                vuzp.8          q12, q13\n+                vuzp.8          q14, q15\n+                subs            r12, #64\n+\n+                @ Rearrange regs so we can use vst1 with 4 regs\n+                vswp            q1,  q2\n+                vswp            q5,  q6\n+                vswp            q9,  q10\n+                vswp            q13, q14\n+                blt             2f\n+\n+                vst1.8          {d0,  d1,  d2,  d3 }, [r0]!\n+                vst1.8          {d8,  d9,  d10, d11}, [r0]!\n+                vst1.8          {d16, d17, d18, d19}, [r0]!\n+                vst1.8          {d24, d25, d26, d27}, [r0]!\n+\n+                vst1.8          {d4,  d5,  d6,  d7 }, [r2]!\n+                vst1.8          {d12, d13, d14, d15}, [r2]!\n+                vst1.8          {d20, d21, d22, d23}, [r2]!\n+                vst1.8          {d28, d29, d30, d31}, [r2]!\n+                bne             1b\n+11:\n+                subs            r7,  #1\n+                add             r5,  #128\n+                add             r0,  r1\n+                add             r2,  r3\n+                bne             10b\n+                vpop            {q4-q7}\n+                pop             {r4-r8,pc}\n+\n+2:\n+                cmp             r12, #64-128\n+                blt             1f\n+                vst1.8          {d0,  d1,  d2,  d3 }, [r0]!\n+                vst1.8          {d8,  d9,  d10, d11}, [r0]!\n+                vst1.8          {d4,  d5,  d6,  d7 }, [r2]!\n+                vst1.8          {d12, d13, d14, d15}, [r2]!\n+                beq             11b\n+                sub             r12, #64\n+                vmov            q0,  q8\n+                vmov            q1,  q9\n+                vmov            q2,  q10\n+                vmov            q3,  q11\n+                vmov            q4,  q12\n+                vmov            q5,  q13\n+                vmov            q6,  q14\n+                vmov            q7,  q15\n+1:\n+                cmp             r12, #32-128\n+                blt             1f\n+                vst1.8          {d0,  d1,  d2,  d3 }, [r0]!\n+                vst1.8          {d4,  d5,  d6,  d7 }, [r2]!\n+                beq             11b\n+                sub             r12, #32\n+                vmov            q0,  q4\n+                vmov            q1,  q5\n+                vmov            q2,  q6\n+                vmov            q3,  q7\n+1:\n+                cmp             r12, #16-128\n+                blt             1f\n+                vst1.8          {d0,  d1 }, [r0]!\n+                vst1.8          {d4,  d5 }, [r2]!\n+                beq             11b\n+                sub             r12, #16\n+                vmov            q0,  q1\n+                vmov            q2,  q3\n+1:\n+                cmp             r12, #8-128\n+                blt             1f\n+                vst1.8          {d0}, [r0]!\n+                vst1.8          {d4}, [r2]!\n+                beq             11b\n+                sub             r12, #8\n+                vmov            d0,  d1\n+                vmov            d4,  d5\n+1:\n+                cmp             r12, #4-128\n+                blt             1f\n+                vst1.32         {d0[0]}, [r0]!\n+                vst1.32         {d4[0]}, [r2]!\n+                beq             11b\n+                sub             r12, #4\n+                vmov            s0,  s1\n+                vmov            s8,  s9\n+1:\n+                cmp             r12, #2-128\n+                blt             1f\n+                vst1.16         {d0[0]}, [r0]!\n+                vst1.16         {d4[0]}, [r2]!\n+                beq             11b\n+                vst1.8          {d0[2]}, [r0]!\n+                vst1.8          {d4[2]}, [r2]!\n+                b               11b\n+1:\n+                vst1.8          {d0[0]}, [r0]!\n+                vst1.8          {d4[0]}, [r2]!\n+                b               11b\n+endfunc\n+\n+\n+\n+@ void ff_rpi_sand30_lines_to_planar_y16(\n+@   uint8_t * dest,             // [r0]\n+@   unsigned int dst_stride,    // [r1]\n+@   const uint8_t * src,        // [r2]\n+@   unsigned int src_stride1,   // [r3]      Ignored - assumed 128\n+@   unsigned int src_stride2,   // [sp, #0]  -> r3\n+@   unsigned int _x,            // [sp, #4]  Ignored - 0\n+@   unsigned int y,             // [sp, #8]  (r7 in prefix)\n+@   unsigned int _w,            // [sp, #12] -> r6 (cur r5)\n+@   unsigned int h);            // [sp, #16] -> r7\n+@\n+@ Assumes that we are starting on a stripe boundary and that overreading\n+@ within the stripe is OK. However it does respect the dest size for writing\n+\n+function ff_rpi_sand30_lines_to_planar_y16, export=1\n+                push            {r4-r8, lr}     @ +24\n+                ldr             r3,  [sp, #24]\n+                ldr             r6,  [sp, #36]\n+                ldr             r7,  [sp, #32]  @ y\n+                mov             r12, #48\n+                sub             r3,  #1\n+                lsl             r3,  #7\n+                sub             r1,  r1,  r6,  lsl #1\n+                add             r8,  r2,  r7,  lsl #7\n+                ldr             r7,  [sp, #40]\n+\n+10:\n+                mov             r2,  r8\n+                add             r4,  r0,  #24\n+                mov             r5,  r6\n+                mov             lr,  #0\n+1:\n+                vldm            r2!, {q10-q13}\n+                add             lr,  #64\n+\n+                vshrn.u32       d4 , q10, #14    @ Cannot vshrn.u32 #20!\n+                ands            lr,  #127\n+                vshrn.u32       d2,  q10, #10\n+                vmovn.u32       d0,  q10\n+\n+                vshrn.u32       d5,  q11, #14\n+                it              eq\n+                addeq           r2,  r3\n+                vshrn.u32       d3,  q11, #10\n+                vmovn.u32       d1,  q11\n+\n+                subs            r5,  #48\n+                vshr.u16        q2,  #6\n+                vbic.u16        q0,  #0xfc00\n+                vbic.u16        q1,  #0xfc00\n+\n+                vshrn.u32       d20, q12, #14\n+                vshrn.u32       d18, q12, #10\n+                vmovn.u32       d16, q12\n+\n+                vshrn.u32       d21, q13, #14\n+                vshrn.u32       d19, q13, #10\n+                vmovn.u32       d17, q13\n+\n+                vshr.u16        q10, #6\n+                vbic.u16        q8,  #0xfc00\n+                vbic.u16        q9 , #0xfc00\n+                blt             2f\n+\n+                vst3.16         {d0,  d2,  d4},  [r0], r12\n+                vst3.16         {d1,  d3,  d5},  [r4], r12\n+                vst3.16         {d16, d18, d20}, [r0], r12\n+                vst3.16         {d17, d19, d21}, [r4], r12\n+\n+                bne             1b\n+\n+11:\n+                subs            r7,  #1\n+                add             r0,  r1\n+                add             r8,  #128\n+                bne             10b\n+\n+                pop             {r4-r8, pc}\n+\n+@ Partial final write\n+2:\n+                cmp             r5,  #24-48\n+                blt             1f\n+                vst3.16         {d0,  d2,  d4},  [r0], r12\n+                vst3.16         {d1,  d3,  d5},  [r4]\n+                beq             11b\n+                vmov            q0,  q8\n+                sub             r5,  #24\n+                vmov            q1,  q9\n+                vmov            q2,  q10\n+1:\n+                cmp             r5,  #12-48\n+                blt             1f\n+                vst3.16         {d0,  d2,  d4},  [r0]!\n+                beq             11b\n+                vmov            d0, d1\n+                sub             r5, #12\n+                vmov            d2, d3\n+                vmov            d4, d5\n+1:\n+                cmp             r5,  #6-48\n+                add             r4,  r0,  #6    @ avoid [r0]! on sequential instructions\n+                blt             1f\n+                vst3.16         {d0[0], d2[0], d4[0]}, [r0]\n+                vst3.16         {d0[1], d2[1], d4[1]}, [r4]\n+                add             r0,  #12\n+                beq             11b\n+                vmov            s0,  s1\n+                sub             r5,  #6\n+                vmov            s4,  s5\n+                vmov            s8,  s9\n+1:\n+                cmp             r5, #3-48\n+                blt             1f\n+                vst3.16         {d0[0], d2[0], d4[0]}, [r0]!\n+                beq             11b\n+                sub             r5, #3\n+                vshr.u32        d0, #16\n+                vshr.u32        d2, #16\n+1:\n+                cmp             r5, #2-48\n+                blt             1f\n+                vst2.16         {d0[0], d2[0]}, [r0]!\n+                b               11b\n+1:\n+                vst1.16         {d0[0]}, [r0]!\n+                b               11b\n+\n+endfunc\n+\n+\n+@ void ff_rpi_sand30_lines_to_planar_c16(\n+@   uint8_t * dst_u,            // [r0]\n+@   unsigned int dst_stride_u,  // [r1]\n+@   uint8_t * dst_v,            // [r2]\n+@   unsigned int dst_stride_v,  // [r3]\n+@   const uint8_t * src,        // [sp, #0]  -> r4, r5\n+@   unsigned int stride1,       // [sp, #4]  128\n+@   unsigned int stride2,       // [sp, #8]  -> r8\n+@   unsigned int _x,            // [sp, #12] 0\n+@   unsigned int y,             // [sp, #16] (r7 in prefix)\n+@   unsigned int _w,            // [sp, #20] -> r6, r9\n+@   unsigned int h);            // [sp, #24] -> r7\n+@\n+@ Assumes that we are starting on a stripe boundary and that overreading\n+@ within the stripe is OK. However it does respect the dest size for writing\n+\n+function ff_rpi_sand30_lines_to_planar_c16, export=1\n+                push            {r4-r10, lr}    @ +32\n+                ldr             r5,  [sp, #32]\n+                ldr             r8,  [sp, #40]\n+                ldr             r7,  [sp, #48]\n+                ldr             r9,  [sp, #52]\n+                mov             r12, #48\n+                sub             r8,  #1\n+                lsl             r8,  #7\n+                add             r5,  r5,  r7,  lsl #7\n+                sub             r1,  r1,  r9,  lsl #1\n+                sub             r3,  r3,  r9,  lsl #1\n+                ldr             r7,  [sp, #56]\n+10:\n+                mov             lr,  #0\n+                mov             r4,  r5\n+                mov             r6,  r9\n+1:\n+                vldm            r4!, {q0-q3}\n+                add             lr,  #64\n+\n+                @ N.B. unpack [0,1,2] -> (reg order) 1, 0, 2\n+                vshrn.u32       d20, q0,  #14\n+                vmovn.u32       d18, q0\n+                vshrn.u32       d0,  q0,  #10\n+                ands            lr,  #127\n+\n+                vshrn.u32       d21, q1,  #14\n+                vmovn.u32       d19, q1\n+                vshrn.u32       d1,  q1,  #10\n+\n+                vshrn.u32       d22, q2,  #10\n+                vmovn.u32       d2,  q2\n+                vshrn.u32       d4,  q2,  #14\n+\n+                add             r10, r0,  #24\n+                vshrn.u32       d23, q3,  #10\n+                vmovn.u32       d3,  q3\n+                vshrn.u32       d5,  q3,  #14\n+\n+                it              eq\n+                addeq           r4,  r8\n+                vuzp.16         q0,  q11\n+                vuzp.16         q9,  q1\n+                vuzp.16         q10, q2\n+\n+                @ q0   V0, V3,..\n+                @ q9   U0, U3...\n+                @ q10  U1, U4...\n+                @ q11  U2, U5,..\n+                @ q1   V1, V4,\n+                @ q2   V2, V5,..\n+\n+                subs            r6,  #24\n+                vbic.u16        q11, #0xfc00\n+                vbic.u16        q9,  #0xfc00\n+                vshr.u16        q10, #6\n+                vshr.u16        q2,  #6\n+                vbic.u16        q0,  #0xfc00\n+                vbic.u16        q1,  #0xfc00\n+\n+                blt             2f\n+\n+                vst3.16         {d18, d20, d22}, [r0],  r12\n+                vst3.16         {d19, d21, d23}, [r10]\n+                add             r10, r2,  #24\n+                vst3.16         {d0,  d2,  d4},  [r2],  r12\n+                vst3.16         {d1,  d3,  d5},  [r10]\n+\n+                bne             1b\n+\n+11:\n+                subs            r7,  #1\n+                add             r5,  #128\n+                add             r0,  r1\n+                add             r2,  r3\n+                bne             10b\n+\n+                pop             {r4-r10, pc}\n+\n+@ Partial final write\n+2:\n+                cmp             r6,  #-12\n+                blt             1f\n+                vst3.16         {d18, d20, d22}, [r0]!\n+                vst3.16         {d0,  d2,  d4},  [r2]!\n+                beq             11b\n+                vmov            d18, d19\n+                vmov            d20, d21\n+                vmov            d22, d23\n+                sub             r6,  #12\n+                vmov            d0,  d1\n+                vmov            d2,  d3\n+                vmov            d4,  d5\n+1:\n+                cmp             r6,  #-18\n+                @ Rezip here as it makes the remaining tail handling easier\n+                vzip.16         d0,  d18\n+                vzip.16         d2,  d20\n+                vzip.16         d4,  d22\n+                blt             1f\n+                vst3.16         {d0[1],  d2[1],  d4[1]},  [r0]!\n+                vst3.16         {d0[0],  d2[0],  d4[0]},  [r2]!\n+                vst3.16         {d0[3],  d2[3],  d4[3]},  [r0]!\n+                vst3.16         {d0[2],  d2[2],  d4[2]},  [r2]!\n+                beq             11b\n+                vmov            d0,  d18\n+                vmov            d2,  d20\n+                sub             r6,  #6\n+                vmov            d4,  d22\n+1:\n+                cmp             r6,  #-21\n+                blt             1f\n+                vst3.16         {d0[1], d2[1], d4[1]}, [r0]!\n+                vst3.16         {d0[0], d2[0], d4[0]}, [r2]!\n+                beq             11b\n+                vmov            s4,  s5\n+                sub             r6,  #3\n+                vmov            s0,  s1\n+1:\n+                cmp             r6,  #-22\n+                blt             1f\n+                vst2.16         {d0[1], d2[1]}, [r0]!\n+                vst2.16         {d0[0], d2[0]}, [r2]!\n+                b               11b\n+1:\n+                vst1.16         {d0[1]}, [r0]!\n+                vst1.16         {d0[0]}, [r2]!\n+                b               11b\n+\n+endfunc\n+\n+@ void ff_rpi_sand30_lines_to_planar_p010(\n+@   uint8_t * dest,             // [r0]\n+@   unsigned int dst_stride,    // [r1]\n+@   const uint8_t * src,        // [r2]\n+@   unsigned int src_stride1,   // [r3]      Ignored - assumed 128\n+@   unsigned int src_stride2,   // [sp, #0]  -> r3\n+@   unsigned int _x,            // [sp, #4]  Ignored - 0\n+@   unsigned int y,             // [sp, #8]  (r7 in prefix)\n+@   unsigned int _w,            // [sp, #12] -> r6 (cur r5)\n+@   unsigned int h);            // [sp, #16] -> r7\n+@\n+@ Assumes that we are starting on a stripe boundary and that overreading\n+@ within the stripe is OK. However it does respect the dest size for writing\n+\n+function ff_rpi_sand30_lines_to_planar_p010, export=1\n+                push            {r4-r8, lr}     @ +24\n+                ldr             r3,  [sp, #24]\n+                ldr             r6,  [sp, #36]\n+                ldr             r7,  [sp, #32]  @ y\n+                mov             r12, #48\n+                vmov.u16        q15, #0xffc0\n+                sub             r3,  #1\n+                lsl             r3,  #7\n+                sub             r1,  r1,  r6,  lsl #1\n+                add             r8,  r2,  r7,  lsl #7\n+                ldr             r7,  [sp, #40]\n+\n+10:\n+                mov             r2,  r8\n+                add             r4,  r0,  #24\n+                mov             r5,  r6\n+                mov             lr,  #0\n+1:\n+                vldm            r2!, {q10-q13}\n+                add             lr,  #64\n+\n+                vshl.u32        q14, q10, #6\n+                ands            lr,  #127\n+                vshrn.u32       d4,  q10, #14\n+                vshrn.u32       d2,  q10, #4\n+                vmovn.u32       d0,  q14\n+\n+                vshl.u32        q14, q11, #6\n+                it              eq\n+                addeq           r2,  r3\n+                vshrn.u32       d5,  q11, #14\n+                vshrn.u32       d3,  q11, #4\n+                vmovn.u32       d1,  q14\n+\n+                subs            r5,  #48\n+                vand            q2,  q15\n+                vand            q1,  q15\n+                vand            q0,  q15\n+\n+                vshl.u32        q14, q12, #6\n+                vshrn.u32       d20, q12, #14\n+                vshrn.u32       d18, q12, #4\n+                vmovn.u32       d16, q14\n+\n+                vshl.u32        q14, q13, #6\n+                vshrn.u32       d21, q13, #14\n+                vshrn.u32       d19, q13, #4\n+                vmovn.u32       d17, q14\n+\n+                vand            q10, q15\n+                vand            q9,  q15\n+                vand            q8,  q15\n+                blt             2f\n+\n+                vst3.16         {d0,  d2,  d4},  [r0], r12\n+                vst3.16         {d1,  d3,  d5},  [r4], r12\n+                vst3.16         {d16, d18, d20}, [r0], r12\n+                vst3.16         {d17, d19, d21}, [r4], r12\n+\n+                bne             1b\n+\n+11:\n+                subs            r7,  #1\n+                add             r0,  r1\n+                add             r8,  #128\n+                bne             10b\n+\n+                pop             {r4-r8, pc}\n+\n+@ Partial final write\n+2:\n+                cmp             r5,  #24-48\n+                blt             1f\n+                vst3.16         {d0,  d2,  d4},  [r0], r12\n+                vst3.16         {d1,  d3,  d5},  [r4]\n+                beq             11b\n+                vmov            q0,  q8\n+                sub             r5,  #24\n+                vmov            q1,  q9\n+                vmov            q2,  q10\n+1:\n+                cmp             r5,  #12-48\n+                blt             1f\n+                vst3.16         {d0,  d2,  d4},  [r0]!\n+                beq             11b\n+                vmov            d0, d1\n+                sub             r5, #12\n+                vmov            d2, d3\n+                vmov            d4, d5\n+1:\n+                cmp             r5,  #6-48\n+                add             r4,  r0,  #6    @ avoid [r0]! on sequential instructions\n+                blt             1f\n+                vst3.16         {d0[0], d2[0], d4[0]}, [r0]\n+                vst3.16         {d0[1], d2[1], d4[1]}, [r4]\n+                add             r0,  #12\n+                beq             11b\n+                vmov            s0,  s1\n+                sub             r5,  #6\n+                vmov            s4,  s5\n+                vmov            s8,  s9\n+1:\n+                cmp             r5, #3-48\n+                blt             1f\n+                vst3.16         {d0[0], d2[0], d4[0]}, [r0]!\n+                beq             11b\n+                sub             r5, #3\n+                vshr.u32        d0, #16\n+                vshr.u32        d2, #16\n+1:\n+                cmp             r5, #2-48\n+                blt             1f\n+                vst2.16         {d0[0], d2[0]}, [r0]!\n+                b               11b\n+1:\n+                vst1.16         {d0[0]}, [r0]!\n+                b               11b\n+\n+endfunc\n+\n+\n+@ void ff_rpi_sand30_lines_to_planar_y8(\n+@   uint8_t * dest,             // [r0]\n+@   unsigned int dst_stride,    // [r1]\n+@   const uint8_t * src,        // [r2]\n+@   unsigned int src_stride1,   // [r3]      Ignored - assumed 128\n+@   unsigned int src_stride2,   // [sp, #0]  -> r3\n+@   unsigned int _x,            // [sp, #4]  Ignored - 0\n+@   unsigned int y,             // [sp, #8]  (r7 in prefix)\n+@   unsigned int _w,            // [sp, #12] -> r6 (cur r5)\n+@   unsigned int h);            // [sp, #16] -> r7\n+@\n+@ Assumes that we are starting on a stripe boundary and that overreading\n+@ within the stripe is OK. However it does respect the dest size for wri\n+\n+function ff_rpi_sand30_lines_to_planar_y8, export=1\n+                push            {r4-r8, lr}     @ +24\n+                ldr             r3,  [sp, #24]\n+                ldr             r6,  [sp, #36]\n+                ldr             r7,  [sp, #32]  @ y\n+                mov             r12, #48\n+                lsl             r3,  #7\n+                sub             r1,  r1,  r6\n+                add             r8,  r2,  r7,  lsl #7\n+                ldr             r7,  [sp, #40]\n+\n+10:\n+                mov             r2,  r8\n+                add             r4,  r0,  #24\n+                mov             r5,  r6\n+1:\n+                vldm            r2,  {q8-q15}\n+\n+                subs            r5,  #96\n+\n+                vmovn.u32       d0,  q8\n+                vshrn.u32       d2,  q8,  #12\n+                vshrn.u32       d4,  q8,  #16    @ Cannot vshrn.u32 #20!\n+\n+                add             r2,  r3\n+\n+                vmovn.u32       d1,  q9\n+                vshrn.u32       d3,  q9,  #12\n+                vshrn.u32       d5,  q9,  #16\n+\n+                pld             [r2, #0]\n+\n+                vshrn.u16       d0,  q0,  #2\n+                vmovn.u16       d1,  q1\n+                vshrn.u16       d2,  q2,  #6\n+\n+                vmovn.u32       d16, q10\n+                vshrn.u32       d18, q10, #12\n+                vshrn.u32       d20, q10, #16\n+\n+                vmovn.u32       d17, q11\n+                vshrn.u32       d19, q11, #12\n+                vshrn.u32       d21, q11, #16\n+\n+                pld             [r2, #64]\n+\n+                vshrn.u16       d4,  q8,  #2\n+                vmovn.u16       d5,  q9\n+                vshrn.u16       d6,  q10, #6\n+\n+                vmovn.u32       d16, q12\n+                vshrn.u32       d18, q12, #12\n+                vshrn.u32       d20, q12, #16\n+\n+                vmovn.u32       d17, q13\n+                vshrn.u32       d19, q13, #12\n+                vshrn.u32       d21, q13, #16\n+\n+                vshrn.u16       d16, q8,  #2\n+                vmovn.u16       d17, q9\n+                vshrn.u16       d18, q10, #6\n+\n+                vmovn.u32       d20, q14\n+                vshrn.u32       d22, q14, #12\n+                vshrn.u32       d24, q14, #16\n+\n+                vmovn.u32       d21, q15\n+                vshrn.u32       d23, q15, #12\n+                vshrn.u32       d25, q15, #16\n+\n+                vshrn.u16       d20, q10, #2\n+                vmovn.u16       d21, q11\n+                vshrn.u16       d22, q12, #6\n+\n+                blt             2f\n+\n+                vst3.8          {d0,  d1,  d2},  [r0], r12\n+                vst3.8          {d4,  d5,  d6},  [r4], r12\n+                vst3.8          {d16, d17, d18}, [r0], r12\n+                vst3.8          {d20, d21, d22}, [r4], r12\n+\n+                bne             1b\n+\n+11:\n+                subs            r7,  #1\n+                add             r0,  r1\n+                add             r8,  #128\n+                bne             10b\n+\n+                pop             {r4-r8, pc}\n+\n+@ Partial final write\n+2:\n+                cmp             r5,  #48-96\n+                blt             1f\n+                vst3.8          {d0,  d1,  d2},  [r0], r12\n+                vst3.8          {d4,  d5,  d6},  [r4], r12\n+                beq             11b\n+                vmov            q0,  q8\n+                vmov            q2,  q10\n+                sub             r5,  #48\n+                vmov            d2,  d18\n+                vmov            d6,  d22\n+1:\n+                cmp             r5,  #24-96\n+                blt             1f\n+                vst3.8          {d0,  d1,  d2},  [r0]!\n+                beq             11b\n+                vmov            q0,  q2\n+                sub             r5,  #24\n+                vmov            d2,  d6\n+1:\n+                cmp             r5,  #12-96\n+                blt             1f\n+                vst3.8          {d0[0], d1[0], d2[0]}, [r0]!\n+                vst3.8          {d0[1], d1[1], d2[1]}, [r0]!\n+                vst3.8          {d0[2], d1[2], d2[2]}, [r0]!\n+                vst3.8          {d0[3], d1[3], d2[3]}, [r0]!\n+                beq             11b\n+                vmov            s0,  s1\n+                sub             r5,  #12\n+                vmov            s2,  s3\n+                vmov            s4,  s5\n+1:\n+                cmp             r5,  #6-96\n+                blt             1f\n+                vst3.8          {d0[0], d1[0], d2[0]}, [r0]!\n+                vst3.8          {d0[1], d1[1], d2[1]}, [r0]!\n+                add             r0,  #12\n+                beq             11b\n+                vshr.u32        d0,  #16\n+                sub             r5,  #6\n+                vshr.u32        d1,  #16\n+                vshr.u32        d2,  #16\n+1:\n+                cmp             r5, #3-96\n+                blt             1f\n+                vst3.8          {d0[0], d1[0], d2[0]}, [r0]!\n+                beq             11b\n+                sub             r5, #3\n+                vshr.u32        d0, #8\n+                vshr.u32        d1, #8\n+1:\n+                cmp             r5, #2-96\n+                blt             1f\n+                vst2.8          {d0[0], d1[0]}, [r0]!\n+                b               11b\n+1:\n+                vst1.8          {d0[0]}, [r0]!\n+                b               11b\n+\n+endfunc\n+\n+\ndiff --git a/libavutil/arm/rpi_sand_neon.h b/libavutil/arm/rpi_sand_neon.h\nnew file mode 100644\nindex 0000000000..d457c10870\n--- /dev/null\n+++ b/libavutil/arm/rpi_sand_neon.h\n@@ -0,0 +1,110 @@\n+/*\n+Copyright (c) 2020 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox\n+*/\n+\n+#ifndef AVUTIL_ARM_SAND_NEON_H\n+#define AVUTIL_ARM_SAND_NEON_H\n+\n+void ff_rpi_sand128b_stripe_to_8_10(\n+  uint8_t * dest,             // [r0]\n+  const uint8_t * src1,       // [r1]\n+  const uint8_t * src2,       // [r2]\n+  unsigned int lines);        // [r3]\n+\n+void ff_rpi_sand8_lines_to_planar_y8(\n+  uint8_t * dest,             // [r0]\n+  unsigned int dst_stride,    // [r1]\n+  const uint8_t * src,        // [r2]\n+  unsigned int src_stride1,   // [r3]      Ignored - assumed 128\n+  unsigned int src_stride2,   // [sp, #0]  -> r3\n+  unsigned int _x,            // [sp, #4]  Ignored - 0\n+  unsigned int y,             // [sp, #8]  (r7 in prefix)\n+  unsigned int _w,            // [sp, #12] -> r6 (cur r5)\n+  unsigned int h);            // [sp, #16] -> r7\n+\n+void ff_rpi_sand8_lines_to_planar_c8(\n+  uint8_t * dst_u,            // [r0]\n+  unsigned int dst_stride_u,  // [r1]\n+  uint8_t * dst_v,            // [r2]\n+  unsigned int dst_stride_v,  // [r3]\n+  const uint8_t * src,        // [sp, #0]  -> r4, r5\n+  unsigned int stride1,       // [sp, #4]  128\n+  unsigned int stride2,       // [sp, #8]  -> r8\n+  unsigned int _x,            // [sp, #12] 0\n+  unsigned int y,             // [sp, #16] (r7 in prefix)\n+  unsigned int _w,            // [sp, #20] -> r12, r6\n+  unsigned int h);            // [sp, #24] -> r7\n+\n+void ff_rpi_sand30_lines_to_planar_y16(\n+  uint8_t * dest,             // [r0]\n+  unsigned int dst_stride,    // [r1]\n+  const uint8_t * src,        // [r2]\n+  unsigned int src_stride1,   // [r3]      Ignored - assumed 128\n+  unsigned int src_stride2,   // [sp, #0]  -> r3\n+  unsigned int _x,            // [sp, #4]  Ignored - 0\n+  unsigned int y,             // [sp, #8]  (r7 in prefix)\n+  unsigned int _w,            // [sp, #12] -> r6 (cur r5)\n+  unsigned int h);            // [sp, #16] -> r7\n+\n+void ff_rpi_sand30_lines_to_planar_c16(\n+  uint8_t * dst_u,            // [r0]\n+  unsigned int dst_stride_u,  // [r1]\n+  uint8_t * dst_v,            // [r2]\n+  unsigned int dst_stride_v,  // [r3]\n+  const uint8_t * src,        // [sp, #0]  -> r4, r5\n+  unsigned int stride1,       // [sp, #4]  128\n+  unsigned int stride2,       // [sp, #8]  -> r8\n+  unsigned int _x,            // [sp, #12] 0\n+  unsigned int y,             // [sp, #16] (r7 in prefix)\n+  unsigned int _w,            // [sp, #20] -> r6, r9\n+  unsigned int h);            // [sp, #24] -> r7\n+\n+void ff_rpi_sand30_lines_to_planar_p010(\n+  uint8_t * dest,             // [r0]\n+  unsigned int dst_stride,    // [r1]\n+  const uint8_t * src,        // [r2]\n+  unsigned int src_stride1,   // [r3]      Ignored - assumed 128\n+  unsigned int src_stride2,   // [sp, #0]  -> r3\n+  unsigned int _x,            // [sp, #4]  Ignored - 0\n+  unsigned int y,             // [sp, #8]  (r7 in prefix)\n+  unsigned int _w,            // [sp, #12] -> r6 (cur r5)\n+  unsigned int h);            // [sp, #16] -> r7\n+\n+void ff_rpi_sand30_lines_to_planar_y8(\n+  uint8_t * dest,             // [r0]\n+  unsigned int dst_stride,    // [r1]\n+  const uint8_t * src,        // [r2]\n+  unsigned int src_stride1,   // [r3]      Ignored - assumed 128\n+  unsigned int src_stride2,   // [sp, #0]  -> r3\n+  unsigned int _x,            // [sp, #4]  Ignored - 0\n+  unsigned int y,             // [sp, #8]  (r7 in prefix)\n+  unsigned int _w,            // [sp, #12] -> r6 (cur r5)\n+  unsigned int h);            // [sp, #16] -> r7\n+\n+#endif // AVUTIL_ARM_SAND_NEON_H\n+\ndiff --git a/libavutil/frame.c b/libavutil/frame.c\nindex 75e347bf2f..daa6477485 100644\n--- a/libavutil/frame.c\n+++ b/libavutil/frame.c\n@@ -16,6 +16,8 @@\n  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n  */\n \n+#include \"config.h\"\n+\n #include \"channel_layout.h\"\n #include \"avassert.h\"\n #include \"buffer.h\"\n@@ -26,6 +28,9 @@\n #include \"mem.h\"\n #include \"samplefmt.h\"\n #include \"hwcontext.h\"\n+#if CONFIG_SAND\n+#include \"rpi_sand_fns.h\"\n+#endif\n \n #if FF_API_FRAME_GET_SET\n MAKE_ACCESSORS(AVFrame, frame, int64_t, best_effort_timestamp)\n@@ -903,6 +908,12 @@ int av_frame_apply_cropping(AVFrame *frame, int flags)\n         (frame->crop_top + frame->crop_bottom) >= frame->height)\n         return AVERROR(ERANGE);\n \n+#if CONFIG_SAND\n+    // Sand cannot be cropped - do not try\n+    if (av_rpi_is_sand_format(frame->format))\n+        return 0;\n+#endif\n+\n     desc = av_pix_fmt_desc_get(frame->format);\n     if (!desc)\n         return AVERROR_BUG;\ndiff --git a/libavutil/frame.h b/libavutil/frame.h\nindex 7d1f8e2935..a4e7dc915d 100644\n--- a/libavutil/frame.h\n+++ b/libavutil/frame.h\n@@ -990,6 +990,16 @@ int av_frame_apply_cropping(AVFrame *frame, int flags);\n  */\n const char *av_frame_side_data_name(enum AVFrameSideDataType type);\n \n+\n+static inline int av_frame_cropped_width(const AVFrame * const frame)\n+{\n+    return frame->width - (frame->crop_left + frame->crop_right);\n+}\n+static inline int av_frame_cropped_height(const AVFrame * const frame)\n+{\n+    return frame->height - (frame->crop_top + frame->crop_bottom);\n+}\n+\n /**\n  * @}\n  */\ndiff --git a/libavutil/hwcontext_drm.c b/libavutil/hwcontext_drm.c\nindex 7a9fdbd263..2f825b7e16 100644\n--- a/libavutil/hwcontext_drm.c\n+++ b/libavutil/hwcontext_drm.c\n@@ -21,6 +21,7 @@\n #include <fcntl.h>\n #include <sys/mman.h>\n #include <unistd.h>\n+#include <sys/ioctl.h>\n \n /* This was introduced in version 4.6. And may not exist all without an\n  * optional package. So to prevent a hard dependency on needing the Linux\n@@ -31,6 +32,7 @@\n #endif\n \n #include <drm.h>\n+#include <libdrm/drm_fourcc.h>\n #include <xf86drm.h>\n \n #include \"avassert.h\"\n@@ -38,7 +40,9 @@\n #include \"hwcontext_drm.h\"\n #include \"hwcontext_internal.h\"\n #include \"imgutils.h\"\n-\n+#if CONFIG_SAND\n+#include \"libavutil/rpi_sand_fns.h\"\n+#endif\n \n static void drm_device_free(AVHWDeviceContext *hwdev)\n {\n@@ -53,6 +57,11 @@ static int drm_device_create(AVHWDeviceContext *hwdev, const char *device,\n     AVDRMDeviceContext *hwctx = hwdev->hwctx;\n     drmVersionPtr version;\n \n+    if (device == NULL) {\n+        hwctx->fd = -1;\n+        return 0;\n+    }\n+\n     hwctx->fd = open(device, O_RDWR);\n     if (hwctx->fd < 0)\n         return AVERROR(errno);\n@@ -139,6 +148,8 @@ static int drm_map_frame(AVHWFramesContext *hwfc,\n     if (flags & AV_HWFRAME_MAP_WRITE)\n         mmap_prot |= PROT_WRITE;\n \n+    if (dst->format == AV_PIX_FMT_NONE)\n+        dst->format = hwfc->sw_format;\n #if HAVE_LINUX_DMA_BUF_H\n     if (flags & AV_HWFRAME_MAP_READ)\n         map->sync_flags |= DMA_BUF_SYNC_READ;\n@@ -185,6 +196,23 @@ static int drm_map_frame(AVHWFramesContext *hwfc,\n \n     dst->width  = src->width;\n     dst->height = src->height;\n+    dst->crop_top    = src->crop_top;\n+    dst->crop_bottom = src->crop_bottom;\n+    dst->crop_left   = src->crop_left;\n+    dst->crop_right  = src->crop_right;\n+\n+#if CONFIG_SAND\n+    // Rework for sand frames\n+    if (av_rpi_is_sand_frame(dst)) {\n+        // As it stands the sand formats hold stride2 in linesize[3]\n+        // linesize[0] & [1] contain stride1 which is always 128 for everything we do\n+        // * Arguably this should be reworked s.t. stride2 is in linesize[0] & [1]\n+        dst->linesize[3] = fourcc_mod_broadcom_param(desc->objects[0].format_modifier);\n+        dst->linesize[0] = 128;\n+        dst->linesize[1] = 128;\n+        // *** Are we sure src->height is actually what we want ???\n+    }\n+#endif\n \n     err = ff_hwframe_map_create(src->hw_frames_ctx, dst, src,\n                                 &drm_unmap_frame, map);\n@@ -206,16 +234,29 @@ static int drm_transfer_get_formats(AVHWFramesContext *ctx,\n                                     enum AVHWFrameTransferDirection dir,\n                                     enum AVPixelFormat **formats)\n {\n-    enum AVPixelFormat *pix_fmts;\n+    enum AVPixelFormat *p;\n \n-    pix_fmts = av_malloc_array(2, sizeof(*pix_fmts));\n-    if (!pix_fmts)\n+    p = *formats = av_malloc_array(3, sizeof(*p));\n+    if (!p)\n         return AVERROR(ENOMEM);\n \n-    pix_fmts[0] = ctx->sw_format;\n-    pix_fmts[1] = AV_PIX_FMT_NONE;\n+    // **** Offer native sand too ????\n+    *p++ =\n+#if CONFIG_SAND\n+        ctx->sw_format == AV_PIX_FMT_RPI4_8 || ctx->sw_format == AV_PIX_FMT_SAND128 ?\n+            AV_PIX_FMT_YUV420P :\n+        ctx->sw_format == AV_PIX_FMT_RPI4_10 ?\n+            AV_PIX_FMT_YUV420P10LE :\n+#endif\n+            ctx->sw_format;\n+\n+#if CONFIG_SAND\n+    if (ctx->sw_format == AV_PIX_FMT_RPI4_10 ||\n+        ctx->sw_format == AV_PIX_FMT_RPI4_8 || ctx->sw_format == AV_PIX_FMT_SAND128)\n+        *p++ = AV_PIX_FMT_NV12;\n+#endif\n \n-    *formats = pix_fmts;\n+    *p = AV_PIX_FMT_NONE;\n     return 0;\n }\n \n@@ -231,18 +272,63 @@ static int drm_transfer_data_from(AVHWFramesContext *hwfc,\n     map = av_frame_alloc();\n     if (!map)\n         return AVERROR(ENOMEM);\n-    map->format = dst->format;\n \n+    // Map to default\n+    map->format = AV_PIX_FMT_NONE;\n     err = drm_map_frame(hwfc, map, src, AV_HWFRAME_MAP_READ);\n     if (err)\n         goto fail;\n \n-    map->width  = dst->width;\n-    map->height = dst->height;\n+#if 0\n+    av_log(hwfc, AV_LOG_INFO, \"%s: src fmt=%d (%d), dst fmt=%d (%d) s=%dx%d l=%d/%d/%d/%d, d=%dx%d l=%d/%d/%d\\n\", __func__,\n+           hwfc->sw_format, AV_PIX_FMT_RPI4_8, dst->format, AV_PIX_FMT_YUV420P10LE,\n+           map->width, map->height,\n+           map->linesize[0],\n+           map->linesize[1],\n+           map->linesize[2],\n+           map->linesize[3],\n+           dst->width, dst->height,\n+           dst->linesize[0],\n+           dst->linesize[1],\n+           dst->linesize[2]);\n+#endif\n+#if CONFIG_SAND\n+    if (av_rpi_is_sand_frame(map)) {\n+        // Preserve crop - later ffmpeg code assumes that we have in that it\n+        // overwrites any crop that we create with the old values\n+        unsigned int stride2 = map->linesize[3];\n+        const unsigned int w = FFMIN(dst->width, map->width);\n+        const unsigned int h = FFMIN(dst->height, map->height);\n+\n+        map->crop_top = 0;\n+        map->crop_bottom = 0;\n+        map->crop_left = 0;\n+        map->crop_right = 0;\n+\n+        if (av_rpi_sand_to_planar_frame(dst, map) != 0)\n+        {\n+            av_log(hwfc, AV_LOG_ERROR, \"%s: Incompatible output pixfmt for sand\\n\", __func__);\n+            err = AVERROR(EINVAL);\n+            goto fail;\n+        }\n+\n+        dst->width = w;\n+        dst->height = h;\n+    }\n+    else\n+#endif\n+    {\n+        // Kludge mapped h/w s.t. frame_copy works\n+        map->width  = dst->width;\n+        map->height = dst->height;\n+        err = av_frame_copy(dst, map);\n+    }\n \n-    err = av_frame_copy(dst, map);\n     if (err)\n+    {\n+        av_log(hwfc, AV_LOG_ERROR, \"%s: Copy fail\\n\", __func__);\n         goto fail;\n+    }\n \n     err = 0;\n fail:\n@@ -257,7 +343,10 @@ static int drm_transfer_data_to(AVHWFramesContext *hwfc,\n     int err;\n \n     if (src->width > hwfc->width || src->height > hwfc->height)\n+    {\n+        av_log(hwfc, AV_LOG_ERROR, \"%s: H/w mismatch: %d/%d, %d/%d\\n\", __func__, dst->width, hwfc->width, dst->height, hwfc->height);\n         return AVERROR(EINVAL);\n+    }\n \n     map = av_frame_alloc();\n     if (!map)\ndiff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c\nindex 18c7a0efc8..bab13a4d50 100644\n--- a/libavutil/pixdesc.c\n+++ b/libavutil/pixdesc.c\n@@ -2395,6 +2395,50 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {\n         .name = \"vulkan\",\n         .flags = AV_PIX_FMT_FLAG_HWACCEL,\n     },\n+    [AV_PIX_FMT_SAND128] = {\n+        .name = \"sand128\",\n+        .nb_components = 3,\n+        .log2_chroma_w = 1,\n+        .log2_chroma_h = 1,\n+        .comp = {\n+            { 0, 1, 0, 0, 8, 0, 7, 1 },        /* Y */\n+            { 1, 2, 0, 0, 8, 1, 7, 1 },        /* U */\n+            { 1, 2, 1, 0, 8, 1, 7, 2 },        /* V */\n+        },\n+        .flags = 0,\n+    },\n+    [AV_PIX_FMT_SAND64_10] = {\n+        .name = \"sand64_10\",\n+        .nb_components = 3,\n+        .log2_chroma_w = 1,\n+        .log2_chroma_h = 1,\n+        .comp = {\n+            { 0, 2, 0, 0, 10, 0, 9, 1 },        /* Y */\n+            { 1, 4, 0, 0, 10, 3, 9, 1 },        /* U */\n+            { 1, 4, 2, 0, 10, 3, 9, 3 },        /* V */\n+        },\n+        .flags = 0,\n+    },\n+    [AV_PIX_FMT_SAND64_16] = {\n+        .name = \"sand64_16\",\n+        .nb_components = 3,\n+        .log2_chroma_w = 1,\n+        .log2_chroma_h = 1,\n+        .comp = {\n+            { 0, 2, 0, 0, 16, 0, 15, 1 },        /* Y */\n+            { 1, 4, 0, 0, 16, 3, 15, 1 },        /* U */\n+            { 1, 4, 2, 0, 16, 3, 15, 3 },        /* V */\n+        },\n+        .flags = 0,\n+    },\n+    [AV_PIX_FMT_RPI4_8] = {\n+        .name = \"rpi4_8\",\n+        .flags = AV_PIX_FMT_FLAG_HWACCEL,\n+    },\n+    [AV_PIX_FMT_RPI4_10] = {\n+        .name = \"rpi4_10\",\n+        .flags = AV_PIX_FMT_FLAG_HWACCEL,\n+    },\n };\n #if FF_API_PLUS1_MINUS1\n FF_ENABLE_DEPRECATION_WARNINGS\ndiff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h\nindex 46ef211add..9195ead15f 100644\n--- a/libavutil/pixfmt.h\n+++ b/libavutil/pixfmt.h\n@@ -357,6 +357,14 @@ enum AVPixelFormat {\n \n     AV_PIX_FMT_Y210BE,    ///< packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, big-endian\n     AV_PIX_FMT_Y210LE,    ///< packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, little-endian\n+// RPI - not on ifdef so can be got at by calling progs\n+// #define so code that uses this can know it is there\n+#define AVUTIL_HAVE_PIX_FMT_SAND 1\n+    AV_PIX_FMT_SAND128,    ///< 4:2:0  8-bit 128x*Y stripe, 64x*UV stripe, then next x stripe, mysterious padding\n+    AV_PIX_FMT_SAND64_10,  ///< 4:2:0 10-bit  64x*Y stripe, 32x*UV stripe, then next x stripe, mysterious padding\n+    AV_PIX_FMT_SAND64_16,  ///< 4:2:0 16-bit  64x*Y stripe, 32x*UV stripe, then next x stripe, mysterious padding\n+    AV_PIX_FMT_RPI4_8,\n+    AV_PIX_FMT_RPI4_10,\n \n     AV_PIX_FMT_X2RGB10LE, ///< packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), little-endian, X=unused/undefined\n     AV_PIX_FMT_X2RGB10BE, ///< packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), big-endian, X=unused/undefined\ndiff --git a/libavutil/rpi_sand_fn_pw.h b/libavutil/rpi_sand_fn_pw.h\nnew file mode 100644\nindex 0000000000..0d5d203dc3\n--- /dev/null\n+++ b/libavutil/rpi_sand_fn_pw.h\n@@ -0,0 +1,227 @@\n+/*\n+Copyright (c) 2018 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox\n+*/\n+\n+// * Included twice from rpi_sand_fn with different PW\n+\n+#define STRCAT(x,y) x##y\n+\n+#if PW == 1\n+#define pixel uint8_t\n+#define FUNC(f) STRCAT(f, 8)\n+#elif PW == 2\n+#define pixel uint16_t\n+#define FUNC(f) STRCAT(f, 16)\n+#else\n+#error Unexpected PW\n+#endif\n+\n+// Fetches a single patch - offscreen fixup not done here\n+// w <= stride1\n+// unclipped\n+void FUNC(av_rpi_sand_to_planar_y)(uint8_t * dst, const unsigned int dst_stride,\n+                             const uint8_t * src,\n+                             unsigned int stride1, unsigned int stride2,\n+                             unsigned int _x, unsigned int y,\n+                             unsigned int _w, unsigned int h)\n+{\n+    const unsigned int x = _x;\n+    const unsigned int w = _w;\n+    const unsigned int mask = stride1 - 1;\n+\n+#if PW == 1 && HAVE_SAND_ASM\n+    if (_x == 0) {\n+        ff_rpi_sand8_lines_to_planar_y8(dst, dst_stride,\n+                                     src, stride1, stride2, _x, y, _w, h);\n+        return;\n+    }\n+#endif\n+\n+    if ((x & ~mask) == ((x + w) & ~mask)) {\n+        // All in one sand stripe\n+        const uint8_t * p = src + (x & mask) + y * stride1 + (x & ~mask) * stride2;\n+        for (unsigned int i = 0; i != h; ++i, dst += dst_stride, p += stride1) {\n+            memcpy(dst, p, w);\n+        }\n+    }\n+    else\n+    {\n+        // Two+ stripe\n+        const unsigned int sstride = stride1 * stride2;\n+        const uint8_t * p1 = src + (x & mask) + y * stride1 + (x & ~mask) * stride2;\n+        const uint8_t * p2 = p1 + sstride - (x & mask);\n+        const unsigned int w1 = stride1 - (x & mask);\n+        const unsigned int w3 = (x + w) & mask;\n+        const unsigned int w2 = w - (w1 + w3);\n+\n+        for (unsigned int i = 0; i != h; ++i, dst += dst_stride, p1 += stride1, p2 += stride1) {\n+            unsigned int j;\n+            const uint8_t * p = p2;\n+            uint8_t * d = dst;\n+            memcpy(d, p1, w1);\n+            d += w1;\n+            for (j = 0; j < w2; j += stride1, d += stride1, p += sstride) {\n+                memcpy(d, p, stride1);\n+            }\n+            memcpy(d, p, w3);\n+        }\n+    }\n+}\n+\n+// x & w in bytes but not of interleave (i.e. offset = x*2 for U&V)\n+\n+void FUNC(av_rpi_sand_to_planar_c)(uint8_t * dst_u, const unsigned int dst_stride_u,\n+                             uint8_t * dst_v, const unsigned int dst_stride_v,\n+                             const uint8_t * src,\n+                             unsigned int stride1, unsigned int stride2,\n+                             unsigned int _x, unsigned int y,\n+                             unsigned int _w, unsigned int h)\n+{\n+    const unsigned int x = _x * 2;\n+    const unsigned int w = _w * 2;\n+    const unsigned int mask = stride1 - 1;\n+\n+#if PW == 1 && HAVE_SAND_ASM\n+    if (_x == 0) {\n+        ff_rpi_sand8_lines_to_planar_c8(dst_u, dst_stride_u, dst_v, dst_stride_v,\n+                                     src, stride1, stride2, _x, y, _w, h);\n+        return;\n+    }\n+#endif\n+\n+    if ((x & ~mask) == ((x + w) & ~mask)) {\n+        // All in one sand stripe\n+        const uint8_t * p1 = src + (x & mask) + y * stride1 + (x & ~mask) * stride2;\n+        for (unsigned int i = 0; i != h; ++i, dst_u += dst_stride_u, dst_v += dst_stride_v, p1 += stride1) {\n+            pixel * du = (pixel *)dst_u;\n+            pixel * dv = (pixel *)dst_v;\n+            const pixel * p = (const pixel *)p1;\n+            for (unsigned int k = 0; k < w; k += 2 * PW) {\n+                *du++ = *p++;\n+                *dv++ = *p++;\n+            }\n+        }\n+    }\n+    else\n+    {\n+        // Two+ stripe\n+        const unsigned int sstride = stride1 * stride2;\n+        const unsigned int sstride_p = (sstride - stride1) / PW;\n+\n+        const uint8_t * p1 = src + (x & mask) + y * stride1 + (x & ~mask) * stride2;\n+        const uint8_t * p2 = p1 + sstride - (x & mask);\n+        const unsigned int w1 = stride1 - (x & mask);\n+        const unsigned int w3 = (x + w) & mask;\n+        const unsigned int w2 = w - (w1 + w3);\n+\n+        for (unsigned int i = 0; i != h; ++i, dst_u += dst_stride_u, dst_v += dst_stride_v, p1 += stride1, p2 += stride1) {\n+            unsigned int j;\n+            const pixel * p = (const pixel *)p1;\n+            pixel * du = (pixel *)dst_u;\n+            pixel * dv = (pixel *)dst_v;\n+            for (unsigned int k = 0; k < w1; k += 2 * PW) {\n+                *du++ = *p++;\n+                *dv++ = *p++;\n+            }\n+            for (j = 0, p = (const pixel *)p2; j < w2; j += stride1, p += sstride_p) {\n+                for (unsigned int k = 0; k < stride1; k += 2 * PW) {\n+                    *du++ = *p++;\n+                    *dv++ = *p++;\n+                }\n+            }\n+            for (unsigned int k = 0; k < w3; k += 2 * PW) {\n+                *du++ = *p++;\n+                *dv++ = *p++;\n+            }\n+        }\n+    }\n+}\n+\n+void FUNC(av_rpi_planar_to_sand_c)(uint8_t * dst_c,\n+                             unsigned int stride1, unsigned int stride2,\n+                             const uint8_t * src_u, const unsigned int src_stride_u,\n+                             const uint8_t * src_v, const unsigned int src_stride_v,\n+                             unsigned int _x, unsigned int y,\n+                             unsigned int _w, unsigned int h)\n+{\n+    const unsigned int x = _x * 2;\n+    const unsigned int w = _w * 2;\n+    const unsigned int mask = stride1 - 1;\n+    if ((x & ~mask) == ((x + w) & ~mask)) {\n+        // All in one sand stripe\n+        uint8_t * p1 = dst_c + (x & mask) + y * stride1 + (x & ~mask) * stride2;\n+        for (unsigned int i = 0; i != h; ++i, src_u += src_stride_u, src_v += src_stride_v, p1 += stride1) {\n+            const pixel * su = (const pixel *)src_u;\n+            const pixel * sv = (const pixel *)src_v;\n+            pixel * p = (pixel *)p1;\n+            for (unsigned int k = 0; k < w; k += 2 * PW) {\n+                *p++ = *su++;\n+                *p++ = *sv++;\n+            }\n+        }\n+    }\n+    else\n+    {\n+        // Two+ stripe\n+        const unsigned int sstride = stride1 * stride2;\n+        const unsigned int sstride_p = (sstride - stride1) / PW;\n+\n+        const uint8_t * p1 = dst_c + (x & mask) + y * stride1 + (x & ~mask) * stride2;\n+        const uint8_t * p2 = p1 + sstride - (x & mask);\n+        const unsigned int w1 = stride1 - (x & mask);\n+        const unsigned int w3 = (x + w) & mask;\n+        const unsigned int w2 = w - (w1 + w3);\n+\n+        for (unsigned int i = 0; i != h; ++i, src_u += src_stride_u, src_v += src_stride_v, p1 += stride1, p2 += stride1) {\n+            unsigned int j;\n+            const pixel * su = (const pixel *)src_u;\n+            const pixel * sv = (const pixel *)src_v;\n+            pixel * p = (pixel *)p1;\n+            for (unsigned int k = 0; k < w1; k += 2 * PW) {\n+                *p++ = *su++;\n+                *p++ = *sv++;\n+            }\n+            for (j = 0, p = (pixel *)p2; j < w2; j += stride1, p += sstride_p) {\n+                for (unsigned int k = 0; k < stride1; k += 2 * PW) {\n+                    *p++ = *su++;\n+                    *p++ = *sv++;\n+                }\n+            }\n+            for (unsigned int k = 0; k < w3; k += 2 * PW) {\n+                *p++ = *su++;\n+                *p++ = *sv++;\n+            }\n+        }\n+    }\n+}\n+\n+\n+#undef pixel\n+#undef STRCAT\n+#undef FUNC\n+\ndiff --git a/libavutil/rpi_sand_fns.c b/libavutil/rpi_sand_fns.c\nnew file mode 100644\nindex 0000000000..0626bb06cb\n--- /dev/null\n+++ b/libavutil/rpi_sand_fns.c\n@@ -0,0 +1,447 @@\n+/*\n+Copyright (c) 2018 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox\n+*/\n+\n+#include \"config.h\"\n+#include <stdint.h>\n+#include <string.h>\n+#include \"rpi_sand_fns.h\"\n+#include \"avassert.h\"\n+#include \"frame.h\"\n+\n+#if ARCH_ARM && HAVE_NEON\n+#include \"libavutil/arm/cpu.h\"\n+#include \"libavutil/arm/rpi_sand_neon.h\"\n+#define HAVE_SAND_ASM 1\n+#elif ARCH_AARCH64 && HAVE_NEON\n+#include \"libavutil/aarch64/cpu.h\"\n+#include \"libavutil/aarch64/rpi_sand_neon.h\"\n+#define HAVE_SAND_ASM 1\n+#else\n+#define HAVE_SAND_ASM 0\n+#endif\n+\n+#define PW 1\n+#include \"rpi_sand_fn_pw.h\"\n+#undef PW\n+\n+#define PW 2\n+#include \"rpi_sand_fn_pw.h\"\n+#undef PW\n+\n+#if 1\n+// Simple round\n+static void cpy16_to_8(uint8_t * dst, const uint8_t * _src, unsigned int n, const unsigned int shr)\n+{\n+    const unsigned int rnd = (1 << shr) >> 1;\n+    const uint16_t * src = (const uint16_t *)_src;\n+\n+    for (; n != 0; --n) {\n+        *dst++ = (*src++ + rnd) >> shr;\n+    }\n+}\n+#else\n+// Dithered variation\n+static void cpy16_to_8(uint8_t * dst, const uint8_t * _src, unsigned int n, const unsigned int shr)\n+{\n+    unsigned int rnd = (1 << shr) >> 1;\n+    const unsigned int mask = ((1 << shr) - 1);\n+    const uint16_t * src = (const uint16_t *)_src;\n+\n+    for (; n != 0; --n) {\n+        rnd = *src++ + (rnd & mask);\n+        *dst++ = rnd >> shr;\n+    }\n+}\n+#endif\n+\n+// Fetches a single patch - offscreen fixup not done here\n+// w <= stride1\n+// unclipped\n+// _x & _w in pixels, strides in bytes\n+void av_rpi_sand30_to_planar_y16(uint8_t * dst, const unsigned int dst_stride,\n+                             const uint8_t * src,\n+                             unsigned int stride1, unsigned int stride2,\n+                             unsigned int _x, unsigned int y,\n+                             unsigned int _w, unsigned int h)\n+{\n+    const unsigned int x0 = (_x / 3) * 4; // Byte offset of the word\n+    const unsigned int xskip0 = _x - (x0 >> 2) * 3;\n+    const unsigned int x1 = ((_x + _w) / 3) * 4;\n+    const unsigned int xrem1 = _x + _w - (x1 >> 2) * 3;\n+    const unsigned int mask = stride1 - 1;\n+    const uint8_t * p0 = src + (x0 & mask) + y * stride1 + (x0 & ~mask) * stride2;\n+    const unsigned int slice_inc = ((stride2 - 1) * stride1) >> 2;  // RHS of a stripe to LHS of next in words\n+\n+#if HAVE_SAND_ASM\n+    if (_x == 0 && have_neon(av_get_cpu_flags())) {\n+        ff_rpi_sand30_lines_to_planar_y16(dst, dst_stride, src, stride1, stride2, _x, y, _w, h);\n+        return;\n+    }\n+#endif\n+\n+    if (x0 == x1) {\n+        // *******************\n+        // Partial single word xfer\n+        return;\n+    }\n+\n+    for (unsigned int i = 0; i != h; ++i, dst += dst_stride, p0 += stride1)\n+    {\n+        unsigned int x = x0;\n+        const uint32_t * p = (const uint32_t *)p0;\n+        uint16_t * d = (uint16_t *)dst;\n+\n+        if (xskip0 != 0) {\n+            const uint32_t p3 = *p++;\n+\n+            if (xskip0 == 1)\n+                *d++ = (p3 >> 10) & 0x3ff;\n+            *d++ = (p3 >> 20) & 0x3ff;\n+\n+            if (((x += 4) & mask) == 0)\n+                p += slice_inc;\n+        }\n+\n+        while (x != x1) {\n+            const uint32_t p3 = *p++;\n+            *d++ = p3 & 0x3ff;\n+            *d++ = (p3 >> 10) & 0x3ff;\n+            *d++ = (p3 >> 20) & 0x3ff;\n+\n+            if (((x += 4) & mask) == 0)\n+                p += slice_inc;\n+        }\n+\n+        if (xrem1 != 0) {\n+            const uint32_t p3 = *p;\n+\n+            *d++ = p3 & 0x3ff;\n+            if (xrem1 == 2)\n+                *d++ = (p3 >> 10) & 0x3ff;\n+        }\n+    }\n+}\n+\n+\n+void av_rpi_sand30_to_planar_c16(uint8_t * dst_u, const unsigned int dst_stride_u,\n+                             uint8_t * dst_v, const unsigned int dst_stride_v,\n+                             const uint8_t * src,\n+                             unsigned int stride1, unsigned int stride2,\n+                             unsigned int _x, unsigned int y,\n+                             unsigned int _w, unsigned int h)\n+{\n+    const unsigned int x0 = (_x / 3) * 8; // Byte offset of the word\n+    const unsigned int xskip0 = _x - (x0 >> 3) * 3;\n+    const unsigned int x1 = ((_x + _w) / 3) * 8;\n+    const unsigned int xrem1 = _x + _w - (x1 >> 3) * 3;\n+    const unsigned int mask = stride1 - 1;\n+    const uint8_t * p0 = src + (x0 & mask) + y * stride1 + (x0 & ~mask) * stride2;\n+    const unsigned int slice_inc = ((stride2 - 1) * stride1) >> 2;  // RHS of a stripe to LHS of next in words\n+\n+#if HAVE_SAND_ASM\n+    if (_x == 0 && have_neon(av_get_cpu_flags())) {\n+        ff_rpi_sand30_lines_to_planar_c16(dst_u, dst_stride_u, dst_v, dst_stride_v,\n+                                       src, stride1, stride2, _x, y, _w, h);\n+        return;\n+    }\n+#endif\n+\n+    if (x0 == x1) {\n+        // *******************\n+        // Partial single word xfer\n+        return;\n+    }\n+\n+    for (unsigned int i = 0; i != h; ++i, dst_u += dst_stride_u, dst_v += dst_stride_v, p0 += stride1)\n+    {\n+        unsigned int x = x0;\n+        const uint32_t * p = (const uint32_t *)p0;\n+        uint16_t * du = (uint16_t *)dst_u;\n+        uint16_t * dv = (uint16_t *)dst_v;\n+\n+        if (xskip0 != 0) {\n+            const uint32_t p3a = *p++;\n+            const uint32_t p3b = *p++;\n+\n+            if (xskip0 == 1)\n+            {\n+                *du++ = (p3a >> 20) & 0x3ff;\n+                *dv++ = (p3b >>  0) & 0x3ff;\n+            }\n+            *du++ = (p3b >> 10) & 0x3ff;\n+            *dv++ = (p3b >> 20) & 0x3ff;\n+\n+            if (((x += 8) & mask) == 0)\n+                p += slice_inc;\n+        }\n+\n+        while (x != x1) {\n+            const uint32_t p3a = *p++;\n+            const uint32_t p3b = *p++;\n+\n+            *du++ = p3a & 0x3ff;\n+            *dv++ = (p3a >> 10) & 0x3ff;\n+            *du++ = (p3a >> 20) & 0x3ff;\n+            *dv++ = p3b & 0x3ff;\n+            *du++ = (p3b >> 10) & 0x3ff;\n+            *dv++ = (p3b >> 20) & 0x3ff;\n+\n+            if (((x += 8) & mask) == 0)\n+                p += slice_inc;\n+        }\n+\n+        if (xrem1 != 0) {\n+            const uint32_t p3a = *p++;\n+            const uint32_t p3b = *p++;\n+\n+            *du++ = p3a & 0x3ff;\n+            *dv++ = (p3a >> 10) & 0x3ff;\n+            if (xrem1 == 2)\n+            {\n+                *du++ = (p3a >> 20) & 0x3ff;\n+                *dv++ = p3b & 0x3ff;\n+            }\n+        }\n+    }\n+}\n+\n+// Fetches a single patch - offscreen fixup not done here\n+// w <= stride1\n+// single lose bottom 2 bits truncation\n+// _x & _w in pixels, strides in bytes\n+void av_rpi_sand30_to_planar_y8(uint8_t * dst, const unsigned int dst_stride,\n+                             const uint8_t * src,\n+                             unsigned int stride1, unsigned int stride2,\n+                             unsigned int _x, unsigned int y,\n+                             unsigned int _w, unsigned int h)\n+{\n+    const unsigned int x0 = (_x / 3) * 4; // Byte offset of the word\n+    const unsigned int xskip0 = _x - (x0 >> 2) * 3;\n+    const unsigned int x1 = ((_x + _w) / 3) * 4;\n+    const unsigned int xrem1 = _x + _w - (x1 >> 2) * 3;\n+    const unsigned int mask = stride1 - 1;\n+    const uint8_t * p0 = src + (x0 & mask) + y * stride1 + (x0 & ~mask) * stride2;\n+    const unsigned int slice_inc = ((stride2 - 1) * stride1) >> 2;  // RHS of a stripe to LHS of next in words\n+\n+#if HAVE_SAND_ASM\n+    if (_x == 0) {\n+        ff_rpi_sand30_lines_to_planar_y8(dst, dst_stride, src, stride1, stride2, _x, y, _w, h);\n+        return;\n+    }\n+#endif\n+\n+    if (x0 == x1) {\n+        // *******************\n+        // Partial single word xfer\n+        return;\n+    }\n+\n+    for (unsigned int i = 0; i != h; ++i, dst += dst_stride, p0 += stride1)\n+    {\n+        unsigned int x = x0;\n+        const uint32_t * p = (const uint32_t *)p0;\n+        uint8_t * d = dst;\n+\n+        if (xskip0 != 0) {\n+            const uint32_t p3 = *p++;\n+\n+            if (xskip0 == 1)\n+                *d++ = (p3 >> 12) & 0xff;\n+            *d++ = (p3 >> 22) & 0xff;\n+\n+            if (((x += 4) & mask) == 0)\n+                p += slice_inc;\n+        }\n+\n+        while (x != x1) {\n+            const uint32_t p3 = *p++;\n+            *d++ = (p3 >> 2) & 0xff;\n+            *d++ = (p3 >> 12) & 0xff;\n+            *d++ = (p3 >> 22) & 0xff;\n+\n+            if (((x += 4) & mask) == 0)\n+                p += slice_inc;\n+        }\n+\n+        if (xrem1 != 0) {\n+            const uint32_t p3 = *p;\n+\n+            *d++ = (p3 >> 2) & 0xff;\n+            if (xrem1 == 2)\n+                *d++ = (p3 >> 12) & 0xff;\n+        }\n+    }\n+}\n+\n+\n+\n+// w/h in pixels\n+void av_rpi_sand16_to_sand8(uint8_t * dst, const unsigned int dst_stride1, const unsigned int dst_stride2,\n+                         const uint8_t * src, const unsigned int src_stride1, const unsigned int src_stride2,\n+                         unsigned int w, unsigned int h, const unsigned int shr)\n+{\n+    const unsigned int n = dst_stride1 / 2;\n+    unsigned int j;\n+\n+    // This is true for our current layouts\n+    av_assert0(dst_stride1 == src_stride1);\n+\n+    // As we have the same stride1 for src & dest and src is wider than dest\n+    // then if we loop on src we can always write contiguously to dest\n+    // We make no effort to copy an exact width - round up to nearest src stripe\n+    // as we will always have storage in dest for that\n+\n+#if ARCH_ARM && HAVE_NEON\n+    if (shr == 3 && src_stride1 == 128) {\n+        for (j = 0; j + n < w; j += dst_stride1) {\n+            uint8_t * d = dst + j * dst_stride2;\n+            const uint8_t * s1 = src + j * 2 * src_stride2;\n+            const uint8_t * s2 = s1 + src_stride1 * src_stride2;\n+\n+            ff_rpi_sand128b_stripe_to_8_10(d, s1, s2, h);\n+        }\n+    }\n+    else\n+#endif\n+    {\n+        for (j = 0; j + n < w; j += dst_stride1) {\n+            uint8_t * d = dst + j * dst_stride2;\n+            const uint8_t * s1 = src + j * 2 * src_stride2;\n+            const uint8_t * s2 = s1 + src_stride1 * src_stride2;\n+\n+            for (unsigned int i = 0; i != h; ++i, s1 += src_stride1, s2 += src_stride1, d += dst_stride1) {\n+                cpy16_to_8(d, s1, n, shr);\n+                cpy16_to_8(d + n, s2, n, shr);\n+            }\n+        }\n+    }\n+\n+    // Fix up a trailing dest half stripe\n+    if (j < w) {\n+        uint8_t * d = dst + j * dst_stride2;\n+        const uint8_t * s1 = src + j * 2 * src_stride2;\n+\n+        for (unsigned int i = 0; i != h; ++i, s1 += src_stride1, d += dst_stride1) {\n+            cpy16_to_8(d, s1, n, shr);\n+        }\n+    }\n+}\n+\n+int av_rpi_sand_to_planar_frame(AVFrame * const dst, const AVFrame * const src)\n+{\n+    const int w = av_frame_cropped_width(src);\n+    const int h = av_frame_cropped_height(src);\n+    const int x = src->crop_left;\n+    const int y = src->crop_top;\n+\n+    // We will crop as part of the conversion\n+    dst->crop_top = 0;\n+    dst->crop_left = 0;\n+    dst->crop_bottom = 0;\n+    dst->crop_right = 0;\n+\n+    switch (src->format){\n+        case AV_PIX_FMT_SAND128:\n+        case AV_PIX_FMT_RPI4_8:\n+            switch (dst->format){\n+                case AV_PIX_FMT_YUV420P:\n+                    av_rpi_sand_to_planar_y8(dst->data[0], dst->linesize[0],\n+                                             src->data[0],\n+                                             av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src),\n+                                             x, y, w, h);\n+                    av_rpi_sand_to_planar_c8(dst->data[1], dst->linesize[1],\n+                                             dst->data[2], dst->linesize[2],\n+                                             src->data[1],\n+                                             av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src),\n+                                             x/2, y/2,  w/2, h/2);\n+                    break;\n+                case AV_PIX_FMT_NV12:\n+                    av_rpi_sand_to_planar_y8(dst->data[0], dst->linesize[0],\n+                                             src->data[0],\n+                                             av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src),\n+                                             x, y, w, h);\n+                    av_rpi_sand_to_planar_y8(dst->data[1], dst->linesize[1],\n+                                             src->data[1],\n+                                             av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src),\n+                                             x/2, y/2, w, h/2);\n+                    break;\n+                default:\n+                    return -1;\n+            }\n+            break;\n+        case AV_PIX_FMT_SAND64_10:\n+            switch (dst->format){\n+                case AV_PIX_FMT_YUV420P10:\n+                    av_rpi_sand_to_planar_y16(dst->data[0], dst->linesize[0],\n+                                             src->data[0],\n+                                             av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src),\n+                                             x*2, y, w*2, h);\n+                    av_rpi_sand_to_planar_c16(dst->data[1], dst->linesize[1],\n+                                             dst->data[2], dst->linesize[2],\n+                                             src->data[1],\n+                                             av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src),\n+                                             x, y/2,  w, h/2);\n+                    break;\n+                default:\n+                    return -1;\n+            }\n+            break;\n+        case AV_PIX_FMT_RPI4_10:\n+            switch (dst->format){\n+                case AV_PIX_FMT_YUV420P10:\n+                    av_rpi_sand30_to_planar_y16(dst->data[0], dst->linesize[0],\n+                                             src->data[0],\n+                                             av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src),\n+                                             x, y, w, h);\n+                    av_rpi_sand30_to_planar_c16(dst->data[1], dst->linesize[1],\n+                                             dst->data[2], dst->linesize[2],\n+                                             src->data[1],\n+                                             av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src),\n+                                             x/2, y/2, w/2, h/2);\n+                    break;\n+                case AV_PIX_FMT_NV12:\n+                    av_rpi_sand30_to_planar_y8(dst->data[0], dst->linesize[0],\n+                                             src->data[0],\n+                                             av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src),\n+                                             x, y, w, h);\n+                    av_rpi_sand30_to_planar_y8(dst->data[1], dst->linesize[1],\n+                                             src->data[1],\n+                                             av_rpi_sand_frame_stride1(src), av_rpi_sand_frame_stride2(src),\n+                                             x/2, y/2, w, h/2);\n+                    break;\n+                default:\n+                    return -1;\n+            }\n+            break;\n+        default:\n+            return -1;\n+    }\n+\n+    return av_frame_copy_props(dst, src);\n+}\ndiff --git a/libavutil/rpi_sand_fns.h b/libavutil/rpi_sand_fns.h\nnew file mode 100644\nindex 0000000000..462ccb8abd\n--- /dev/null\n+++ b/libavutil/rpi_sand_fns.h\n@@ -0,0 +1,188 @@\n+/*\n+Copyright (c) 2018 Raspberry Pi (Trading) Ltd.\n+All rights reserved.\n+\n+Redistribution and use in source and binary forms, with or without\n+modification, are permitted provided that the following conditions are met:\n+    * Redistributions of source code must retain the above copyright\n+      notice, this list of conditions and the following disclaimer.\n+    * Redistributions in binary form must reproduce the above copyright\n+      notice, this list of conditions and the following disclaimer in the\n+      documentation and/or other materials provided with the distribution.\n+    * Neither the name of the copyright holder nor the\n+      names of its contributors may be used to endorse or promote products\n+      derived from this software without specific prior written permission.\n+\n+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY\n+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+Authors: John Cox\n+*/\n+\n+#ifndef AVUTIL_RPI_SAND_FNS\n+#define AVUTIL_RPI_SAND_FNS\n+\n+#include \"libavutil/frame.h\"\n+\n+// For all these fns _x & _w are measured as coord * PW\n+// For the C fns coords are in chroma pels (so luma / 2)\n+// Strides are in bytes\n+\n+void av_rpi_sand_to_planar_y8(uint8_t * dst, const unsigned int dst_stride,\n+                             const uint8_t * src,\n+                             unsigned int stride1, unsigned int stride2,\n+                             unsigned int _x, unsigned int y,\n+                             unsigned int _w, unsigned int h);\n+void av_rpi_sand_to_planar_y16(uint8_t * dst, const unsigned int dst_stride,\n+                             const uint8_t * src,\n+                             unsigned int stride1, unsigned int stride2,\n+                             unsigned int _x, unsigned int y,\n+                             unsigned int _w, unsigned int h);\n+\n+void av_rpi_sand_to_planar_c8(uint8_t * dst_u, const unsigned int dst_stride_u,\n+                             uint8_t * dst_v, const unsigned int dst_stride_v,\n+                             const uint8_t * src,\n+                             unsigned int stride1, unsigned int stride2,\n+                             unsigned int _x, unsigned int y,\n+                             unsigned int _w, unsigned int h);\n+void av_rpi_sand_to_planar_c16(uint8_t * dst_u, const unsigned int dst_stride_u,\n+                             uint8_t * dst_v, const unsigned int dst_stride_v,\n+                             const uint8_t * src,\n+                             unsigned int stride1, unsigned int stride2,\n+                             unsigned int _x, unsigned int y,\n+                             unsigned int _w, unsigned int h);\n+\n+void av_rpi_planar_to_sand_c8(uint8_t * dst_c,\n+                             unsigned int stride1, unsigned int stride2,\n+                             const uint8_t * src_u, const unsigned int src_stride_u,\n+                             const uint8_t * src_v, const unsigned int src_stride_v,\n+                             unsigned int _x, unsigned int y,\n+                             unsigned int _w, unsigned int h);\n+void av_rpi_planar_to_sand_c16(uint8_t * dst_c,\n+                             unsigned int stride1, unsigned int stride2,\n+                             const uint8_t * src_u, const unsigned int src_stride_u,\n+                             const uint8_t * src_v, const unsigned int src_stride_v,\n+                             unsigned int _x, unsigned int y,\n+                             unsigned int _w, unsigned int h);\n+\n+void av_rpi_sand30_to_planar_y16(uint8_t * dst, const unsigned int dst_stride,\n+                             const uint8_t * src,\n+                             unsigned int stride1, unsigned int stride2,\n+                             unsigned int _x, unsigned int y,\n+                             unsigned int _w, unsigned int h);\n+void av_rpi_sand30_to_planar_c16(uint8_t * dst_u, const unsigned int dst_stride_u,\n+                             uint8_t * dst_v, const unsigned int dst_stride_v,\n+                             const uint8_t * src,\n+                             unsigned int stride1, unsigned int stride2,\n+                             unsigned int _x, unsigned int y,\n+                             unsigned int _w, unsigned int h);\n+\n+void av_rpi_sand30_to_planar_y8(uint8_t * dst, const unsigned int dst_stride,\n+                             const uint8_t * src,\n+                             unsigned int stride1, unsigned int stride2,\n+                             unsigned int _x, unsigned int y,\n+                             unsigned int _w, unsigned int h);\n+\n+// w/h in pixels\n+void av_rpi_sand16_to_sand8(uint8_t * dst, const unsigned int dst_stride1, const unsigned int dst_stride2,\n+                         const uint8_t * src, const unsigned int src_stride1, const unsigned int src_stride2,\n+                         unsigned int w, unsigned int h, const unsigned int shr);\n+\n+\n+// dst must contain required pixel format & allocated data buffers\n+// Cropping on the src buffer will be honoured and dst crop will be set to zero\n+int av_rpi_sand_to_planar_frame(AVFrame * const dst, const AVFrame * const src);\n+\n+\n+static inline unsigned int av_rpi_sand_frame_stride1(const AVFrame * const frame)\n+{\n+#ifdef RPI_ZC_SAND128_ONLY\n+    // If we are sure we only only support 128 byte sand formats replace the\n+    // var with a constant which should allow for better optimisation\n+    return 128;\n+#else\n+    return frame->linesize[0];\n+#endif\n+}\n+\n+static inline unsigned int av_rpi_sand_frame_stride2(const AVFrame * const frame)\n+{\n+    return frame->linesize[3];\n+}\n+\n+\n+static inline int av_rpi_is_sand_format(const int format)\n+{\n+    return (format >= AV_PIX_FMT_SAND128 && format <= AV_PIX_FMT_RPI4_10);\n+}\n+\n+static inline int av_rpi_is_sand_frame(const AVFrame * const frame)\n+{\n+    return av_rpi_is_sand_format(frame->format);\n+}\n+\n+static inline int av_rpi_is_sand8_frame(const AVFrame * const frame)\n+{\n+    return (frame->format == AV_PIX_FMT_SAND128 || frame->format == AV_PIX_FMT_RPI4_8);\n+}\n+\n+static inline int av_rpi_is_sand16_frame(const AVFrame * const frame)\n+{\n+    return (frame->format >= AV_PIX_FMT_SAND64_10 && frame->format <= AV_PIX_FMT_SAND64_16);\n+}\n+\n+static inline int av_rpi_is_sand30_frame(const AVFrame * const frame)\n+{\n+    return (frame->format == AV_PIX_FMT_RPI4_10);\n+}\n+\n+static inline int av_rpi_sand_frame_xshl(const AVFrame * const frame)\n+{\n+    return av_rpi_is_sand8_frame(frame) ? 0 : 1;\n+}\n+\n+// If x is measured in bytes (not pixels) then this works for sand64_16 as\n+// well as sand128 - but in the general case we work that out\n+\n+static inline unsigned int av_rpi_sand_frame_off_y(const AVFrame * const frame, const unsigned int x_y, const unsigned int y)\n+{\n+    const unsigned int stride1 = av_rpi_sand_frame_stride1(frame);\n+    const unsigned int stride2 = av_rpi_sand_frame_stride2(frame);\n+    const unsigned int x = x_y << av_rpi_sand_frame_xshl(frame);\n+    const unsigned int x1 = x & (stride1 - 1);\n+    const unsigned int x2 = x ^ x1;\n+\n+    return x1 + stride1 * y + stride2 * x2;\n+}\n+\n+static inline unsigned int av_rpi_sand_frame_off_c(const AVFrame * const frame, const unsigned int x_c, const unsigned int y_c)\n+{\n+    const unsigned int stride1 = av_rpi_sand_frame_stride1(frame);\n+    const unsigned int stride2 = av_rpi_sand_frame_stride2(frame);\n+    const unsigned int x = x_c << (av_rpi_sand_frame_xshl(frame) + 1);\n+    const unsigned int x1 = x & (stride1 - 1);\n+    const unsigned int x2 = x ^ x1;\n+\n+    return x1 + stride1 * y_c + stride2 * x2;\n+}\n+\n+static inline uint8_t * av_rpi_sand_frame_pos_y(const AVFrame * const frame, const unsigned int x, const unsigned int y)\n+{\n+    return frame->data[0] + av_rpi_sand_frame_off_y(frame, x, y);\n+}\n+\n+static inline uint8_t * av_rpi_sand_frame_pos_c(const AVFrame * const frame, const unsigned int x, const unsigned int y)\n+{\n+    return frame->data[1] + av_rpi_sand_frame_off_c(frame, x, y);\n+}\n+\n+#endif\n+\ndiff --git a/libswscale/aarch64/rgb2rgb.c b/libswscale/aarch64/rgb2rgb.c\nindex a9bf6ff9e0..6a0e2dcc09 100644\n--- a/libswscale/aarch64/rgb2rgb.c\n+++ b/libswscale/aarch64/rgb2rgb.c\n@@ -30,6 +30,12 @@\n void ff_interleave_bytes_neon(const uint8_t *src1, const uint8_t *src2,\n                               uint8_t *dest, int width, int height,\n                               int src1Stride, int src2Stride, int dstStride);\n+void ff_bgr24toyv12_aarch64(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n+                   uint8_t *vdst, int width, int height, int lumStride,\n+                   int chromStride, int srcStride, int32_t *rgb2yuv);\n+void ff_rgb24toyv12_aarch64(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n+                   uint8_t *vdst, int width, int height, int lumStride,\n+                   int chromStride, int srcStride, int32_t *rgb2yuv);\n \n av_cold void rgb2rgb_init_aarch64(void)\n {\n@@ -37,5 +43,7 @@ av_cold void rgb2rgb_init_aarch64(void)\n \n     if (have_neon(cpu_flags)) {\n         interleaveBytes = ff_interleave_bytes_neon;\n+        ff_rgb24toyv12 = ff_rgb24toyv12_aarch64;\n+        ff_bgr24toyv12 = ff_bgr24toyv12_aarch64;\n     }\n }\ndiff --git a/libswscale/aarch64/rgb2rgb_neon.S b/libswscale/aarch64/rgb2rgb_neon.S\nindex d81110ec57..476ca723a0 100644\n--- a/libswscale/aarch64/rgb2rgb_neon.S\n+++ b/libswscale/aarch64/rgb2rgb_neon.S\n@@ -77,3 +77,448 @@ function ff_interleave_bytes_neon, export=1\n 0:\n         ret\n endfunc\n+\n+// void ff_rgb24toyv12_aarch64(\n+//              const uint8_t *src,             // x0\n+//              uint8_t *ydst,                  // x1\n+//              uint8_t *udst,                  // x2\n+//              uint8_t *vdst,                  // x3\n+//              int width,                      // w4\n+//              int height,                     // w5\n+//              int lumStride,                  // w6\n+//              int chromStride,                // w7\n+//              int srcStr,                     // [sp, #0]\n+//              int32_t *rgb2yuv);              // [sp, #8]\n+\n+function ff_rgb24toyv12_aarch64, export=1\n+        ldr             x15, [sp, #8]\n+        ld1             {v3.s}[2], [x15], #4\n+        ld1             {v3.s}[1], [x15], #4\n+        ld1             {v3.s}[0], [x15], #4\n+        ld1             {v4.s}[2], [x15], #4\n+        ld1             {v4.s}[1], [x15], #4\n+        ld1             {v4.s}[0], [x15], #4\n+        ld1             {v5.s}[2], [x15], #4\n+        ld1             {v5.s}[1], [x15], #4\n+        ld1             {v5.s}[0], [x15]\n+        b               99f\n+endfunc\n+\n+// void ff_bgr24toyv12_aarch64(\n+//              const uint8_t *src,             // x0\n+//              uint8_t *ydst,                  // x1\n+//              uint8_t *udst,                  // x2\n+//              uint8_t *vdst,                  // x3\n+//              int width,                      // w4\n+//              int height,                     // w5\n+//              int lumStride,                  // w6\n+//              int chromStride,                // w7\n+//              int srcStr,                     // [sp, #0]\n+//              int32_t *rgb2yuv);              // [sp, #8]\n+\n+// regs\n+// v0-2         Src bytes - reused as chroma src\n+// v3-5         Coeffs (packed very inefficiently - could be squashed)\n+// v6           128b\n+// v7           128h\n+// v8-15        Reserved\n+// v16-18       Lo Src expanded as H\n+// v19          -\n+// v20-22       Hi Src expanded as H\n+// v23          -\n+// v24          U out\n+// v25          U tmp\n+// v26          Y out\n+// v27-29       Y tmp\n+// v30          V out\n+// v31          V tmp\n+\n+// Assumes Little Endian in tail stores & conversion matrix\n+\n+function ff_bgr24toyv12_aarch64, export=1\n+        ldr             x15, [sp, #8]\n+        ld3             {v3.s, v4.s, v5.s}[0], [x15], #12\n+        ld3             {v3.s, v4.s, v5.s}[1], [x15], #12\n+        ld3             {v3.s, v4.s, v5.s}[2], [x15]\n+99:\n+        ldr             w14, [sp, #0]\n+        movi            v7.8b, #128\n+        uxtl            v6.8h, v7.8b\n+        // Ensure if nothing to do then we do nothing\n+        cmp             w4, #0\n+        b.le            90f\n+        cmp             w5, #0\n+        b.le            90f\n+        // If w % 16 != 0 then -16 so we do main loop 1 fewer times with\n+        // the remainder done in the tail\n+        tst             w4, #15\n+        b.eq            1f\n+        sub             w4, w4, #16\n+1:\n+\n+// -------------------- Even line body - YUV\n+11:\n+        subs            w9,  w4, #0\n+        mov             x10, x0\n+        mov             x11, x1\n+        mov             x12, x2\n+        mov             x13, x3\n+        b.lt            12f\n+\n+        ld3             {v0.16b, v1.16b, v2.16b}, [x10], #48\n+        subs            w9, w9, #16\n+        b.le            13f\n+\n+10:\n+        uxtl            v16.8h, v0.8b\n+        uxtl            v17.8h, v1.8b\n+        uxtl            v18.8h, v2.8b\n+\n+        uxtl2           v20.8h, v0.16b\n+        uxtl2           v21.8h, v1.16b\n+        uxtl2           v22.8h, v2.16b\n+\n+        bic             v0.8h, #0xff, LSL #8\n+        bic             v1.8h, #0xff, LSL #8\n+        bic             v2.8h, #0xff, LSL #8\n+\n+        // Testing shows it is faster to stack the smull/smlal ops together\n+        // rather than interleave them between channels and indeed even the\n+        // shift/add sections seem happier not interleaved\n+\n+        // Y0\n+        smull           v26.4s, v16.4h, v3.h[0]\n+        smlal           v26.4s, v17.4h, v4.h[0]\n+        smlal           v26.4s, v18.4h, v5.h[0]\n+        smull2          v27.4s, v16.8h, v3.h[0]\n+        smlal2          v27.4s, v17.8h, v4.h[0]\n+        smlal2          v27.4s, v18.8h, v5.h[0]\n+        // Y1\n+        smull           v28.4s, v20.4h, v3.h[0]\n+        smlal           v28.4s, v21.4h, v4.h[0]\n+        smlal           v28.4s, v22.4h, v5.h[0]\n+        smull2          v29.4s, v20.8h, v3.h[0]\n+        smlal2          v29.4s, v21.8h, v4.h[0]\n+        smlal2          v29.4s, v22.8h, v5.h[0]\n+        shrn            v26.4h, v26.4s, #12\n+        shrn2           v26.8h, v27.4s, #12\n+        add             v26.8h, v26.8h, v6.8h     // +128 (>> 3 = 16)\n+        sqrshrun        v26.8b, v26.8h, #3\n+        shrn            v28.4h, v28.4s, #12\n+        shrn2           v28.8h, v29.4s, #12\n+        add             v28.8h, v28.8h, v6.8h\n+        sqrshrun2       v26.16b, v28.8h, #3\n+        // Y0/Y1\n+\n+        // U\n+        // Vector subscript *2 as we loaded into S but are only using H\n+        smull           v24.4s, v0.4h, v3.h[2]\n+        smlal           v24.4s, v1.4h, v4.h[2]\n+        smlal           v24.4s, v2.4h, v5.h[2]\n+        smull2          v25.4s, v0.8h, v3.h[2]\n+        smlal2          v25.4s, v1.8h, v4.h[2]\n+        smlal2          v25.4s, v2.8h, v5.h[2]\n+\n+        // V\n+        smull           v30.4s, v0.4h, v3.h[4]\n+        smlal           v30.4s, v1.4h, v4.h[4]\n+        smlal           v30.4s, v2.4h, v5.h[4]\n+        smull2          v31.4s, v0.8h, v3.h[4]\n+        smlal2          v31.4s, v1.8h, v4.h[4]\n+        smlal2          v31.4s, v2.8h, v5.h[4]\n+\n+        ld3             {v0.16b, v1.16b, v2.16b}, [x10], #48\n+\n+        shrn            v24.4h, v24.4s, #14\n+        shrn2           v24.8h, v25.4s, #14\n+        sqrshrn         v24.8b, v24.8h, #1\n+        add             v24.8b, v24.8b, v7.8b     // +128\n+        shrn            v30.4h, v30.4s, #14\n+        shrn2           v30.8h, v31.4s, #14\n+        sqrshrn         v30.8b, v30.8h, #1\n+        add             v30.8b, v30.8b, v7.8b     // +128\n+\n+        subs            w9, w9, #16\n+\n+        st1             {v26.16b}, [x11], #16\n+        st1             {v24.8b}, [x12], #8\n+        st1             {v30.8b}, [x13], #8\n+\n+        b.gt            10b\n+\n+// -------------------- Even line tail - YUV\n+// If width % 16 == 0 then simply runs once with preloaded RGB\n+// If other then deals with preload & then does remaining tail\n+\n+13:\n+        // Body is simple copy of main loop body minus preload\n+\n+        uxtl            v16.8h, v0.8b\n+        uxtl            v17.8h, v1.8b\n+        uxtl            v18.8h, v2.8b\n+\n+        uxtl2           v20.8h, v0.16b\n+        uxtl2           v21.8h, v1.16b\n+        uxtl2           v22.8h, v2.16b\n+\n+        bic             v0.8h, #0xff, LSL #8\n+        bic             v1.8h, #0xff, LSL #8\n+        bic             v2.8h, #0xff, LSL #8\n+\n+        // Y0\n+        smull           v26.4s, v16.4h, v3.h[0]\n+        smlal           v26.4s, v17.4h, v4.h[0]\n+        smlal           v26.4s, v18.4h, v5.h[0]\n+        smull2          v27.4s, v16.8h, v3.h[0]\n+        smlal2          v27.4s, v17.8h, v4.h[0]\n+        smlal2          v27.4s, v18.8h, v5.h[0]\n+        // Y1\n+        smull           v28.4s, v20.4h, v3.h[0]\n+        smlal           v28.4s, v21.4h, v4.h[0]\n+        smlal           v28.4s, v22.4h, v5.h[0]\n+        smull2          v29.4s, v20.8h, v3.h[0]\n+        smlal2          v29.4s, v21.8h, v4.h[0]\n+        smlal2          v29.4s, v22.8h, v5.h[0]\n+        shrn            v26.4h, v26.4s, #12\n+        shrn2           v26.8h, v27.4s, #12\n+        add             v26.8h, v26.8h, v6.8h     // +128 (>> 3 = 16)\n+        sqrshrun        v26.8b, v26.8h, #3\n+        shrn            v28.4h, v28.4s, #12\n+        shrn2           v28.8h, v29.4s, #12\n+        add             v28.8h, v28.8h, v6.8h\n+        sqrshrun2       v26.16b, v28.8h, #3\n+        // Y0/Y1\n+\n+        // U\n+        // Vector subscript *2 as we loaded into S but are only using H\n+        smull           v24.4s, v0.4h, v3.h[2]\n+        smlal           v24.4s, v1.4h, v4.h[2]\n+        smlal           v24.4s, v2.4h, v5.h[2]\n+        smull2          v25.4s, v0.8h, v3.h[2]\n+        smlal2          v25.4s, v1.8h, v4.h[2]\n+        smlal2          v25.4s, v2.8h, v5.h[2]\n+\n+        // V\n+        smull           v30.4s, v0.4h, v3.h[4]\n+        smlal           v30.4s, v1.4h, v4.h[4]\n+        smlal           v30.4s, v2.4h, v5.h[4]\n+        smull2          v31.4s, v0.8h, v3.h[4]\n+        smlal2          v31.4s, v1.8h, v4.h[4]\n+        smlal2          v31.4s, v2.8h, v5.h[4]\n+\n+        cmp             w9, #-16\n+\n+        shrn            v24.4h, v24.4s, #14\n+        shrn2           v24.8h, v25.4s, #14\n+        sqrshrn         v24.8b, v24.8h, #1\n+        add             v24.8b, v24.8b, v7.8b     // +128\n+        shrn            v30.4h, v30.4s, #14\n+        shrn2           v30.8h, v31.4s, #14\n+        sqrshrn         v30.8b, v30.8h, #1\n+        add             v30.8b, v30.8b, v7.8b     // +128\n+\n+        // Here:\n+        // w9 == 0      width % 16 == 0, tail done\n+        // w9 > -16     1st tail done (16 pels), remainder still to go\n+        // w9 == -16    shouldn't happen\n+        // w9 > -32     2nd tail done\n+        // w9 <= -32    shouldn't happen\n+\n+        b.lt            2f\n+        st1             {v26.16b}, [x11], #16\n+        st1             {v24.8b}, [x12], #8\n+        st1             {v30.8b}, [x13], #8\n+        cbz             w9, 3f\n+\n+12:\n+        sub             w9, w9, #16\n+\n+        tbz             w9, #3, 1f\n+        ld3             {v0.8b, v1.8b, v2.8b},  [x10], #24\n+1:      tbz             w9, #2, 1f\n+        ld3             {v0.b, v1.b, v2.b}[8],  [x10], #3\n+        ld3             {v0.b, v1.b, v2.b}[9],  [x10], #3\n+        ld3             {v0.b, v1.b, v2.b}[10], [x10], #3\n+        ld3             {v0.b, v1.b, v2.b}[11], [x10], #3\n+1:      tbz             w9, #1, 1f\n+        ld3             {v0.b, v1.b, v2.b}[12], [x10], #3\n+        ld3             {v0.b, v1.b, v2.b}[13], [x10], #3\n+1:      tbz             w9, #0, 13b\n+        ld3             {v0.b, v1.b, v2.b}[14], [x10], #3\n+        b               13b\n+\n+2:\n+        tbz             w9, #3, 1f\n+        st1             {v26.8b},    [x11], #8\n+        st1             {v24.s}[0],  [x12], #4\n+        st1             {v30.s}[0],  [x13], #4\n+1:      tbz             w9, #2, 1f\n+        st1             {v26.s}[2],  [x11], #4\n+        st1             {v24.h}[2],  [x12], #2\n+        st1             {v30.h}[2],  [x13], #2\n+1:      tbz             w9, #1, 1f\n+        st1             {v26.h}[6],  [x11], #2\n+        st1             {v24.b}[6],  [x12], #1\n+        st1             {v30.b}[6],  [x13], #1\n+1:      tbz             w9, #0, 1f\n+        st1             {v26.b}[14], [x11]\n+        st1             {v24.b}[7],  [x12]\n+        st1             {v30.b}[7],  [x13]\n+1:\n+3:\n+\n+// -------------------- Odd line body - Y only\n+\n+        subs            w5, w5, #1\n+        b.eq            90f\n+\n+        subs            w9,  w4, #0\n+        add             x0, x0, w14, SXTX\n+        add             x1, x1, w6, SXTX\n+        mov             x10, x0\n+        mov             x11, x1\n+        b.lt            12f\n+\n+        ld3             {v0.16b, v1.16b, v2.16b}, [x10], #48\n+        subs            w9, w9, #16\n+        b.le            13f\n+\n+10:\n+        uxtl            v16.8h, v0.8b\n+        uxtl            v17.8h, v1.8b\n+        uxtl            v18.8h, v2.8b\n+\n+        uxtl2           v20.8h, v0.16b\n+        uxtl2           v21.8h, v1.16b\n+        uxtl2           v22.8h, v2.16b\n+\n+        // Testing shows it is faster to stack the smull/smlal ops together\n+        // rather than interleave them between channels and indeed even the\n+        // shift/add sections seem happier not interleaved\n+\n+        // Y0\n+        smull           v26.4s, v16.4h, v3.h[0]\n+        smlal           v26.4s, v17.4h, v4.h[0]\n+        smlal           v26.4s, v18.4h, v5.h[0]\n+        smull2          v27.4s, v16.8h, v3.h[0]\n+        smlal2          v27.4s, v17.8h, v4.h[0]\n+        smlal2          v27.4s, v18.8h, v5.h[0]\n+        // Y1\n+        smull           v28.4s, v20.4h, v3.h[0]\n+        smlal           v28.4s, v21.4h, v4.h[0]\n+        smlal           v28.4s, v22.4h, v5.h[0]\n+        smull2          v29.4s, v20.8h, v3.h[0]\n+        smlal2          v29.4s, v21.8h, v4.h[0]\n+        smlal2          v29.4s, v22.8h, v5.h[0]\n+\n+        ld3             {v0.16b, v1.16b, v2.16b}, [x10], #48\n+\n+        shrn            v26.4h, v26.4s, #12\n+        shrn2           v26.8h, v27.4s, #12\n+        add             v26.8h, v26.8h, v6.8h     // +128 (>> 3 = 16)\n+        sqrshrun        v26.8b, v26.8h, #3\n+        shrn            v28.4h, v28.4s, #12\n+        shrn2           v28.8h, v29.4s, #12\n+        add             v28.8h, v28.8h, v6.8h\n+        sqrshrun2       v26.16b, v28.8h, #3\n+        // Y0/Y1\n+\n+        subs            w9, w9, #16\n+\n+        st1             {v26.16b}, [x11], #16\n+\n+        b.gt            10b\n+\n+// -------------------- Odd line tail - Y\n+// If width % 16 == 0 then simply runs once with preloaded RGB\n+// If other then deals with preload & then does remaining tail\n+\n+13:\n+        // Body is simple copy of main loop body minus preload\n+\n+        uxtl            v16.8h, v0.8b\n+        uxtl            v17.8h, v1.8b\n+        uxtl            v18.8h, v2.8b\n+\n+        uxtl2           v20.8h, v0.16b\n+        uxtl2           v21.8h, v1.16b\n+        uxtl2           v22.8h, v2.16b\n+\n+        // Y0\n+        smull           v26.4s, v16.4h, v3.h[0]\n+        smlal           v26.4s, v17.4h, v4.h[0]\n+        smlal           v26.4s, v18.4h, v5.h[0]\n+        smull2          v27.4s, v16.8h, v3.h[0]\n+        smlal2          v27.4s, v17.8h, v4.h[0]\n+        smlal2          v27.4s, v18.8h, v5.h[0]\n+        // Y1\n+        smull           v28.4s, v20.4h, v3.h[0]\n+        smlal           v28.4s, v21.4h, v4.h[0]\n+        smlal           v28.4s, v22.4h, v5.h[0]\n+        smull2          v29.4s, v20.8h, v3.h[0]\n+        smlal2          v29.4s, v21.8h, v4.h[0]\n+        smlal2          v29.4s, v22.8h, v5.h[0]\n+\n+        cmp             w9, #-16\n+\n+        shrn            v26.4h, v26.4s, #12\n+        shrn2           v26.8h, v27.4s, #12\n+        add             v26.8h, v26.8h, v6.8h     // +128 (>> 3 = 16)\n+        sqrshrun        v26.8b, v26.8h, #3\n+        shrn            v28.4h, v28.4s, #12\n+        shrn2           v28.8h, v29.4s, #12\n+        add             v28.8h, v28.8h, v6.8h\n+        sqrshrun2       v26.16b, v28.8h, #3\n+        // Y0/Y1\n+\n+        // Here:\n+        // w9 == 0      width % 16 == 0, tail done\n+        // w9 > -16     1st tail done (16 pels), remainder still to go\n+        // w9 == -16    shouldn't happen\n+        // w9 > -32     2nd tail done\n+        // w9 <= -32    shouldn't happen\n+\n+        b.lt            2f\n+        st1             {v26.16b}, [x11], #16\n+        cbz             w9, 3f\n+\n+12:\n+        sub             w9, w9, #16\n+\n+        tbz             w9, #3, 1f\n+        ld3             {v0.8b, v1.8b, v2.8b},  [x10], #24\n+1:      tbz             w9, #2, 1f\n+        ld3             {v0.b, v1.b, v2.b}[8],  [x10], #3\n+        ld3             {v0.b, v1.b, v2.b}[9],  [x10], #3\n+        ld3             {v0.b, v1.b, v2.b}[10], [x10], #3\n+        ld3             {v0.b, v1.b, v2.b}[11], [x10], #3\n+1:      tbz             w9, #1, 1f\n+        ld3             {v0.b, v1.b, v2.b}[12], [x10], #3\n+        ld3             {v0.b, v1.b, v2.b}[13], [x10], #3\n+1:      tbz             w9, #0, 13b\n+        ld3             {v0.b, v1.b, v2.b}[14], [x10], #3\n+        b               13b\n+\n+2:\n+        tbz             w9, #3, 1f\n+        st1             {v26.8b},    [x11], #8\n+1:      tbz             w9, #2, 1f\n+        st1             {v26.s}[2],  [x11], #4\n+1:      tbz             w9, #1, 1f\n+        st1             {v26.h}[6],  [x11], #2\n+1:      tbz             w9, #0, 1f\n+        st1             {v26.b}[14], [x11]\n+1:\n+3:\n+\n+// ------------------- Loop to start\n+\n+        add             x0, x0, w14, SXTX\n+        add             x1, x1, w6, SXTX\n+        add             x2, x2, w7, SXTX\n+        add             x3, x3, w7, SXTX\n+        subs            w5, w5, #1\n+        b.gt            11b\n+90:\n+        ret\n+endfunc\ndiff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c\nindex a7300f3ba4..ba1db155b0 100644\n--- a/libswscale/rgb2rgb.c\n+++ b/libswscale/rgb2rgb.c\n@@ -83,6 +83,31 @@ void (*ff_rgb24toyv12)(const uint8_t *src, uint8_t *ydst,\n                        int width, int height,\n                        int lumStride, int chromStride, int srcStride,\n                        int32_t *rgb2yuv);\n+void (*ff_bgr24toyv12)(const uint8_t *src, uint8_t *ydst,\n+                       uint8_t *udst, uint8_t *vdst,\n+                       int width, int height,\n+                       int lumStride, int chromStride, int srcStride,\n+                       int32_t *rgb2yuv);\n+void (*ff_rgbxtoyv12)(const uint8_t *src, uint8_t *ydst,\n+\t\t\t\t\t  uint8_t *udst, uint8_t *vdst,\n+\t\t\t\t\t  int width, int height,\n+\t\t\t\t\t  int lumStride, int chromStride, int srcStride,\n+\t\t\t\t\t  int32_t *rgb2yuv);\n+void (*ff_bgrxtoyv12)(const uint8_t *src, uint8_t *ydst,\n+\t\t\t\t\t  uint8_t *udst, uint8_t *vdst,\n+\t\t\t\t\t  int width, int height,\n+\t\t\t\t\t  int lumStride, int chromStride, int srcStride,\n+\t\t\t\t\t  int32_t *rgb2yuv);\n+void (*ff_xrgbtoyv12)(const uint8_t *src, uint8_t *ydst,\n+\t\t\t\t\t  uint8_t *udst, uint8_t *vdst,\n+\t\t\t\t\t  int width, int height,\n+\t\t\t\t\t  int lumStride, int chromStride, int srcStride,\n+\t\t\t\t\t  int32_t *rgb2yuv);\n+void (*ff_xbgrtoyv12)(const uint8_t *src, uint8_t *ydst,\n+\t\t\t\t\t  uint8_t *udst, uint8_t *vdst,\n+\t\t\t\t\t  int width, int height,\n+\t\t\t\t\t  int lumStride, int chromStride, int srcStride,\n+\t\t\t\t\t  int32_t *rgb2yuv);\n void (*planar2x)(const uint8_t *src, uint8_t *dst, int width, int height,\n                  int srcStride, int dstStride);\n void (*interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst,\ndiff --git a/libswscale/rgb2rgb.h b/libswscale/rgb2rgb.h\nindex 48bba1586a..6329533f18 100644\n--- a/libswscale/rgb2rgb.h\n+++ b/libswscale/rgb2rgb.h\n@@ -82,6 +82,9 @@ void    rgb12to15(const uint8_t *src, uint8_t *dst, int src_size);\n void ff_rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n                       uint8_t *vdst, int width, int height, int lumStride,\n                       int chromStride, int srcStride, int32_t *rgb2yuv);\n+void ff_bgr24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n+                      uint8_t *vdst, int width, int height, int lumStride,\n+                      int chromStride, int srcStride, int32_t *rgb2yuv);\n \n /**\n  * Height should be a multiple of 2 and width should be a multiple of 16.\n@@ -131,6 +134,26 @@ extern void (*ff_rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n                               int width, int height,\n                               int lumStride, int chromStride, int srcStride,\n                               int32_t *rgb2yuv);\n+extern void (*ff_bgr24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,\n+                              int width, int height,\n+                              int lumStride, int chromStride, int srcStride,\n+                              int32_t *rgb2yuv);\n+extern void (*ff_rgbxtoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,\n+                             int width, int height,\n+                             int lumStride, int chromStride, int srcStride,\n+                             int32_t *rgb2yuv);\n+extern void (*ff_bgrxtoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,\n+                             int width, int height,\n+                             int lumStride, int chromStride, int srcStride,\n+                             int32_t *rgb2yuv);\n+extern void (*ff_xrgbtoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,\n+                             int width, int height,\n+                             int lumStride, int chromStride, int srcStride,\n+                             int32_t *rgb2yuv);\n+extern void (*ff_xbgrtoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,\n+                             int width, int height,\n+                             int lumStride, int chromStride, int srcStride,\n+                             int32_t *rgb2yuv);\n extern void (*planar2x)(const uint8_t *src, uint8_t *dst, int width, int height,\n                         int srcStride, int dstStride);\n \ndiff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c\nindex 42c69801ba..e711589e1e 100644\n--- a/libswscale/rgb2rgb_template.c\n+++ b/libswscale/rgb2rgb_template.c\n@@ -646,13 +646,14 @@ static inline void uyvytoyv12_c(const uint8_t *src, uint8_t *ydst,\n  * others are ignored in the C version.\n  * FIXME: Write HQ version.\n  */\n-void ff_rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n+static void rgb24toyv12_x(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n                    uint8_t *vdst, int width, int height, int lumStride,\n-                   int chromStride, int srcStride, int32_t *rgb2yuv)\n+                   int chromStride, int srcStride, int32_t *rgb2yuv,\n+                   const uint8_t x[9])\n {\n-    int32_t ry = rgb2yuv[RY_IDX], gy = rgb2yuv[GY_IDX], by = rgb2yuv[BY_IDX];\n-    int32_t ru = rgb2yuv[RU_IDX], gu = rgb2yuv[GU_IDX], bu = rgb2yuv[BU_IDX];\n-    int32_t rv = rgb2yuv[RV_IDX], gv = rgb2yuv[GV_IDX], bv = rgb2yuv[BV_IDX];\n+    int32_t ry = rgb2yuv[x[0]], gy = rgb2yuv[x[1]], by = rgb2yuv[x[2]];\n+    int32_t ru = rgb2yuv[x[3]], gu = rgb2yuv[x[4]], bu = rgb2yuv[x[5]];\n+    int32_t rv = rgb2yuv[x[6]], gv = rgb2yuv[x[7]], bv = rgb2yuv[x[8]];\n     int y;\n     const int chromWidth = width >> 1;\n \n@@ -678,6 +679,19 @@ void ff_rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n             Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16;\n             ydst[2 * i + 1] = Y;\n         }\n+        if ((width & 1) != 0) {\n+            unsigned int b = src[6 * i + 0];\n+            unsigned int g = src[6 * i + 1];\n+            unsigned int r = src[6 * i + 2];\n+\n+            unsigned int Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) +  16;\n+            unsigned int V = ((rv * r + gv * g + bv * b) >> RGB2YUV_SHIFT) + 128;\n+            unsigned int U = ((ru * r + gu * g + bu * b) >> RGB2YUV_SHIFT) + 128;\n+\n+            udst[i]     = U;\n+            vdst[i]     = V;\n+            ydst[2 * i] = Y;\n+        }\n         ydst += lumStride;\n         src  += srcStride;\n \n@@ -700,6 +714,125 @@ void ff_rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n             Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16;\n             ydst[2 * i + 1] = Y;\n         }\n+        if ((width & 1) != 0) {\n+            unsigned int b = src[6 * i + 0];\n+            unsigned int g = src[6 * i + 1];\n+            unsigned int r = src[6 * i + 2];\n+\n+            unsigned int Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16;\n+\n+            ydst[2 * i] = Y;\n+        }\n+        udst += chromStride;\n+        vdst += chromStride;\n+        ydst += lumStride;\n+        src  += srcStride;\n+    }\n+}\n+\n+static const uint8_t x_rgb[9] = {\n+    RY_IDX, GY_IDX, BY_IDX,\n+    RU_IDX, GU_IDX, BU_IDX,\n+    RV_IDX, GV_IDX, BV_IDX,\n+};\n+\n+static const uint8_t x_bgr[9] = {\n+     BY_IDX, GY_IDX, RY_IDX,\n+     BU_IDX, GU_IDX, RU_IDX,\n+     BV_IDX, GV_IDX, RV_IDX,\n+};\n+\n+void ff_rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n+                   uint8_t *vdst, int width, int height, int lumStride,\n+                   int chromStride, int srcStride, int32_t *rgb2yuv)\n+{\n+    rgb24toyv12_x(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride, rgb2yuv, x_rgb);\n+}\n+\n+void ff_bgr24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n+                   uint8_t *vdst, int width, int height, int lumStride,\n+                   int chromStride, int srcStride, int32_t *rgb2yuv)\n+{\n+    rgb24toyv12_x(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride, rgb2yuv, x_bgr);\n+}\n+\n+static void rgbxtoyv12_x(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n+                   uint8_t *vdst, int width, int height, int lumStride,\n+                   int chromStride, int srcStride, int32_t *rgb2yuv,\n+                   const uint8_t x[9])\n+{\n+    int32_t ry = rgb2yuv[x[0]], gy = rgb2yuv[x[1]], by = rgb2yuv[x[2]];\n+    int32_t ru = rgb2yuv[x[3]], gu = rgb2yuv[x[4]], bu = rgb2yuv[x[5]];\n+    int32_t rv = rgb2yuv[x[6]], gv = rgb2yuv[x[7]], bv = rgb2yuv[x[8]];\n+    int y;\n+    const int chromWidth = width >> 1;\n+\n+    for (y = 0; y < height; y += 2) {\n+        int i;\n+        for (i = 0; i < chromWidth; i++) {\n+            unsigned int b = src[8 * i + 2];\n+            unsigned int g = src[8 * i + 1];\n+            unsigned int r = src[8 * i + 0];\n+\n+            unsigned int Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) +  16;\n+            unsigned int V = ((rv * r + gv * g + bv * b) >> RGB2YUV_SHIFT) + 128;\n+            unsigned int U = ((ru * r + gu * g + bu * b) >> RGB2YUV_SHIFT) + 128;\n+\n+            udst[i]     = U;\n+            vdst[i]     = V;\n+            ydst[2 * i] = Y;\n+\n+            b = src[8 * i + 6];\n+            g = src[8 * i + 5];\n+            r = src[8 * i + 4];\n+\n+            Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16;\n+            ydst[2 * i + 1] = Y;\n+        }\n+        if ((width & 1) != 0) {\n+            unsigned int b = src[8 * i + 2];\n+            unsigned int g = src[8 * i + 1];\n+            unsigned int r = src[8 * i + 0];\n+\n+            unsigned int Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) +  16;\n+            unsigned int V = ((rv * r + gv * g + bv * b) >> RGB2YUV_SHIFT) + 128;\n+            unsigned int U = ((ru * r + gu * g + bu * b) >> RGB2YUV_SHIFT) + 128;\n+\n+            udst[i]     = U;\n+            vdst[i]     = V;\n+            ydst[2 * i] = Y;\n+        }\n+        ydst += lumStride;\n+        src  += srcStride;\n+\n+        if (y+1 == height)\n+            break;\n+\n+        for (i = 0; i < chromWidth; i++) {\n+            unsigned int b = src[8 * i + 2];\n+            unsigned int g = src[8 * i + 1];\n+            unsigned int r = src[8 * i + 0];\n+\n+            unsigned int Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16;\n+\n+            ydst[2 * i] = Y;\n+\n+            b = src[8 * i + 6];\n+            g = src[8 * i + 5];\n+            r = src[8 * i + 4];\n+\n+            Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16;\n+            ydst[2 * i + 1] = Y;\n+        }\n+        if ((width & 1) != 0) {\n+            unsigned int b = src[8 * i + 2];\n+            unsigned int g = src[8 * i + 1];\n+            unsigned int r = src[8 * i + 0];\n+\n+            unsigned int Y = ((ry * r + gy * g + by * b) >> RGB2YUV_SHIFT) + 16;\n+\n+            ydst[2 * i] = Y;\n+        }\n         udst += chromStride;\n         vdst += chromStride;\n         ydst += lumStride;\n@@ -707,6 +840,37 @@ void ff_rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n     }\n }\n \n+static void ff_rgbxtoyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n+                   uint8_t *vdst, int width, int height, int lumStride,\n+                   int chromStride, int srcStride, int32_t *rgb2yuv)\n+{\n+    rgbxtoyv12_x(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride, rgb2yuv, x_rgb);\n+}\n+\n+static void ff_bgrxtoyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n+                   uint8_t *vdst, int width, int height, int lumStride,\n+                   int chromStride, int srcStride, int32_t *rgb2yuv)\n+{\n+    rgbxtoyv12_x(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride, rgb2yuv, x_bgr);\n+}\n+\n+// As the general code does no SIMD-like ops simply adding 1 to the src address\n+// will fix the ignored alpha position\n+static void ff_xrgbtoyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n+                   uint8_t *vdst, int width, int height, int lumStride,\n+                   int chromStride, int srcStride, int32_t *rgb2yuv)\n+{\n+    rgbxtoyv12_x(src + 1, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride, rgb2yuv, x_rgb);\n+}\n+\n+static void ff_xbgrtoyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,\n+                   uint8_t *vdst, int width, int height, int lumStride,\n+                   int chromStride, int srcStride, int32_t *rgb2yuv)\n+{\n+    rgbxtoyv12_x(src + 1, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride, rgb2yuv, x_bgr);\n+}\n+\n+\n static void interleaveBytes_c(const uint8_t *src1, const uint8_t *src2,\n                               uint8_t *dest, int width, int height,\n                               int src1Stride, int src2Stride, int dstStride)\n@@ -980,6 +1144,11 @@ static av_cold void rgb2rgb_init_c(void)\n     yuy2toyv12         = yuy2toyv12_c;\n     planar2x           = planar2x_c;\n     ff_rgb24toyv12     = ff_rgb24toyv12_c;\n+    ff_bgr24toyv12     = ff_bgr24toyv12_c;\n+    ff_rgbxtoyv12      = ff_rgbxtoyv12_c;\n+    ff_bgrxtoyv12      = ff_bgrxtoyv12_c;\n+    ff_xrgbtoyv12      = ff_xrgbtoyv12_c;\n+    ff_xbgrtoyv12      = ff_xbgrtoyv12_c;\n     interleaveBytes    = interleaveBytes_c;\n     deinterleaveBytes  = deinterleaveBytes_c;\n     vu9_to_vu12        = vu9_to_vu12_c;\ndiff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c\nindex c4dd8a4d83..da38d7f8ac 100644\n--- a/libswscale/swscale_unscaled.c\n+++ b/libswscale/swscale_unscaled.c\n@@ -1655,6 +1655,91 @@ static int bgr24ToYv12Wrapper(SwsContext *c, const uint8_t *src[],\n     return srcSliceH;\n }\n \n+static int rgb24ToYv12Wrapper(SwsContext *c, const uint8_t *src[],\n+                              int srcStride[], int srcSliceY, int srcSliceH,\n+                              uint8_t *dst[], int dstStride[])\n+{\n+    ff_bgr24toyv12(\n+        src[0],\n+        dst[0] +  srcSliceY       * dstStride[0],\n+        dst[1] + (srcSliceY >> 1) * dstStride[1],\n+        dst[2] + (srcSliceY >> 1) * dstStride[2],\n+        c->srcW, srcSliceH,\n+        dstStride[0], dstStride[1], srcStride[0],\n+        c->input_rgb2yuv_table);\n+    if (dst[3])\n+        fillPlane(dst[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255);\n+    return srcSliceH;\n+}\n+\n+static int bgrxToYv12Wrapper(SwsContext *c, const uint8_t *src[],\n+                             int srcStride[], int srcSliceY, int srcSliceH,\n+                             uint8_t *dst[], int dstStride[])\n+{\n+    ff_bgrxtoyv12(\n+        src[0],\n+        dst[0] +  srcSliceY       * dstStride[0],\n+        dst[1] + (srcSliceY >> 1) * dstStride[1],\n+        dst[2] + (srcSliceY >> 1) * dstStride[2],\n+        c->srcW, srcSliceH,\n+        dstStride[0], dstStride[1], srcStride[0],\n+        c->input_rgb2yuv_table);\n+    if (dst[3])\n+        fillPlane(dst[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255);\n+    return srcSliceH;\n+}\n+\n+static int rgbxToYv12Wrapper(SwsContext *c, const uint8_t *src[],\n+                             int srcStride[], int srcSliceY, int srcSliceH,\n+                             uint8_t *dst[], int dstStride[])\n+{\n+    ff_rgbxtoyv12(\n+        src[0],\n+        dst[0] +  srcSliceY       * dstStride[0],\n+        dst[1] + (srcSliceY >> 1) * dstStride[1],\n+        dst[2] + (srcSliceY >> 1) * dstStride[2],\n+        c->srcW, srcSliceH,\n+        dstStride[0], dstStride[1], srcStride[0],\n+        c->input_rgb2yuv_table);\n+    if (dst[3])\n+        fillPlane(dst[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255);\n+    return srcSliceH;\n+}\n+\n+static int xbgrToYv12Wrapper(SwsContext *c, const uint8_t *src[],\n+                             int srcStride[], int srcSliceY, int srcSliceH,\n+                             uint8_t *dst[], int dstStride[])\n+{\n+    ff_xbgrtoyv12(\n+        src[0],\n+        dst[0] +  srcSliceY       * dstStride[0],\n+        dst[1] + (srcSliceY >> 1) * dstStride[1],\n+        dst[2] + (srcSliceY >> 1) * dstStride[2],\n+        c->srcW, srcSliceH,\n+        dstStride[0], dstStride[1], srcStride[0],\n+        c->input_rgb2yuv_table);\n+    if (dst[3])\n+        fillPlane(dst[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255);\n+    return srcSliceH;\n+}\n+\n+static int xrgbToYv12Wrapper(SwsContext *c, const uint8_t *src[],\n+                             int srcStride[], int srcSliceY, int srcSliceH,\n+                             uint8_t *dst[], int dstStride[])\n+{\n+    ff_xrgbtoyv12(\n+        src[0],\n+        dst[0] +  srcSliceY       * dstStride[0],\n+        dst[1] + (srcSliceY >> 1) * dstStride[1],\n+        dst[2] + (srcSliceY >> 1) * dstStride[2],\n+        c->srcW, srcSliceH,\n+        dstStride[0], dstStride[1], srcStride[0],\n+        c->input_rgb2yuv_table);\n+    if (dst[3])\n+        fillPlane(dst[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255);\n+    return srcSliceH;\n+}\n+\n static int yvu9ToYv12Wrapper(SwsContext *c, const uint8_t *src[],\n                              int srcStride[], int srcSliceY, int srcSliceH,\n                              uint8_t *dst[], int dstStride[])\n@@ -2035,6 +2120,32 @@ void ff_get_unscaled_swscale(SwsContext *c)\n         (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P) &&\n         !(flags & SWS_ACCURATE_RND))\n         c->swscale = bgr24ToYv12Wrapper;\n+    /* rgb24toYV12 */\n+    if (srcFormat == AV_PIX_FMT_RGB24 &&\n+        (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P) &&\n+        !(flags & SWS_ACCURATE_RND))\n+        c->swscale = rgb24ToYv12Wrapper;\n+\n+    /* bgrxtoYV12 */\n+    if (((srcFormat == AV_PIX_FMT_BGRA && dstFormat == AV_PIX_FMT_YUV420P) ||\n+         (srcFormat == AV_PIX_FMT_BGR0 && (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P))) &&\n+        !(flags & SWS_ACCURATE_RND))\n+        c->swscale = bgrxToYv12Wrapper;\n+    /* rgbx24toYV12 */\n+    if (((srcFormat == AV_PIX_FMT_RGBA && dstFormat == AV_PIX_FMT_YUV420P) ||\n+         (srcFormat == AV_PIX_FMT_RGB0 && (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P))) &&\n+        !(flags & SWS_ACCURATE_RND))\n+        c->swscale = rgbxToYv12Wrapper;\n+    /* xbgrtoYV12 */\n+    if (((srcFormat == AV_PIX_FMT_ABGR && dstFormat == AV_PIX_FMT_YUV420P) ||\n+         (srcFormat == AV_PIX_FMT_0BGR && (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P))) &&\n+        !(flags & SWS_ACCURATE_RND))\n+        c->swscale = xbgrToYv12Wrapper;\n+    /* xrgb24toYV12 */\n+    if (((srcFormat == AV_PIX_FMT_ARGB && dstFormat == AV_PIX_FMT_YUV420P) ||\n+         (srcFormat == AV_PIX_FMT_0RGB && (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P))) &&\n+        !(flags & SWS_ACCURATE_RND))\n+        c->swscale = xrgbToYv12Wrapper;\n \n     /* RGB/BGR -> RGB/BGR (no dither needed forms) */\n     if (isAnyRGB(srcFormat) && isAnyRGB(dstFormat) && findRgbConvFn(c)\ndiff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c\nindex 6c38041ddb..12776ffec7 100644\n--- a/libswscale/tests/swscale.c\n+++ b/libswscale/tests/swscale.c\n@@ -23,6 +23,7 @@\n #include <string.h>\n #include <inttypes.h>\n #include <stdarg.h>\n+#include <time.h>\n \n #undef HAVE_AV_CONFIG_H\n #include \"libavutil/cpu.h\"\n@@ -78,6 +79,15 @@ struct Results {\n     uint32_t crc;\n };\n \n+static int time_rep = 0;\n+\n+static uint64_t utime(void)\n+{\n+    struct timespec ts;\n+    clock_gettime(CLOCK_MONOTONIC, &ts);\n+    return ts.tv_nsec / 1000 + (uint64_t)ts.tv_sec * 1000000;\n+}\n+\n // test by ref -> src -> dst -> out & compare out against ref\n // ref & out are YV12\n static int doTest(const uint8_t * const ref[4], int refStride[4], int w, int h,\n@@ -174,7 +184,7 @@ static int doTest(const uint8_t * const ref[4], int refStride[4], int w, int h,\n         goto end;\n     }\n \n-    printf(\" %s %dx%d -> %s %3dx%3d flags=%2d\",\n+    printf(\" %s %4dx%4d -> %s %4dx%4d flags=%2d\",\n            desc_src->name, srcW, srcH,\n            desc_dst->name, dstW, dstH,\n            flags);\n@@ -182,6 +192,17 @@ static int doTest(const uint8_t * const ref[4], int refStride[4], int w, int h,\n \n     sws_scale(dstContext, (const uint8_t * const*)src, srcStride, 0, srcH, dst, dstStride);\n \n+    if (time_rep != 0)\n+    {\n+        const uint64_t now = utime();\n+        uint64_t done;\n+        for (i = 1; i != time_rep; ++i) {\n+            sws_scale(dstContext, (const uint8_t * const*)src, srcStride, 0, srcH, dst, dstStride);\n+        }\n+        done = utime();\n+        printf(\" T=%7\"PRId64\"us \", done-now);\n+    }\n+\n     for (i = 0; i < 4 && dstStride[i]; i++)\n         crc = av_crc(av_crc_get_table(AV_CRC_32_IEEE), crc, dst[i],\n                      dstStride[i] * dstH);\n@@ -355,56 +376,78 @@ static int fileTest(const uint8_t * const ref[4], int refStride[4],\n     return 0;\n }\n \n-#define W 96\n-#define H 96\n-\n int main(int argc, char **argv)\n {\n+    unsigned int W = 96;\n+    unsigned int H = 96;\n+    unsigned int W2;\n+    unsigned int H2;\n+    unsigned int S;\n     enum AVPixelFormat srcFormat = AV_PIX_FMT_NONE;\n     enum AVPixelFormat dstFormat = AV_PIX_FMT_NONE;\n-    uint8_t *rgb_data   = av_malloc(W * H * 4);\n-    const uint8_t * const rgb_src[4] = { rgb_data, NULL, NULL, NULL };\n-    int rgb_stride[4]   = { 4 * W, 0, 0, 0 };\n-    uint8_t *data       = av_malloc(4 * W * H);\n-    const uint8_t * const src[4] = { data, data + W * H, data + W * H * 2, data + W * H * 3 };\n-    int stride[4]       = { W, W, W, W };\n     int x, y;\n     struct SwsContext *sws;\n     AVLFG rand;\n     int res = -1;\n     int i;\n     FILE *fp = NULL;\n-\n-    if (!rgb_data || !data)\n-        return -1;\n+    uint8_t *rgb_data;\n+    uint8_t * rgb_src[4] = { NULL };\n+    int rgb_stride[4]   = { 0 };\n+    uint8_t *data;\n+    uint8_t * src[4] = { NULL };\n+    int stride[4]       = { 0 };\n \n     for (i = 1; i < argc; i += 2) {\n+        const char * const arg2 = argv[i+1];\n+\n         if (argv[i][0] != '-' || i + 1 == argc)\n             goto bad_option;\n         if (!strcmp(argv[i], \"-ref\")) {\n-            fp = fopen(argv[i + 1], \"r\");\n+            fp = fopen(arg2, \"r\");\n             if (!fp) {\n-                fprintf(stderr, \"could not open '%s'\\n\", argv[i + 1]);\n+                fprintf(stderr, \"could not open '%s'\\n\", arg2);\n                 goto error;\n             }\n         } else if (!strcmp(argv[i], \"-cpuflags\")) {\n             unsigned flags = av_get_cpu_flags();\n-            int ret = av_parse_cpu_caps(&flags, argv[i + 1]);\n+            int ret = av_parse_cpu_caps(&flags, arg2);\n             if (ret < 0) {\n-                fprintf(stderr, \"invalid cpu flags %s\\n\", argv[i + 1]);\n+                fprintf(stderr, \"invalid cpu flags %s\\n\", arg2);\n                 return ret;\n             }\n             av_force_cpu_flags(flags);\n         } else if (!strcmp(argv[i], \"-src\")) {\n-            srcFormat = av_get_pix_fmt(argv[i + 1]);\n+            srcFormat = av_get_pix_fmt(arg2);\n             if (srcFormat == AV_PIX_FMT_NONE) {\n-                fprintf(stderr, \"invalid pixel format %s\\n\", argv[i + 1]);\n+                fprintf(stderr, \"invalid pixel format %s\\n\", arg2);\n                 return -1;\n             }\n         } else if (!strcmp(argv[i], \"-dst\")) {\n-            dstFormat = av_get_pix_fmt(argv[i + 1]);\n+            dstFormat = av_get_pix_fmt(arg2);\n             if (dstFormat == AV_PIX_FMT_NONE) {\n-                fprintf(stderr, \"invalid pixel format %s\\n\", argv[i + 1]);\n+                fprintf(stderr, \"invalid pixel format %s\\n\", arg2);\n+                return -1;\n+            }\n+        } else if (!strcmp(argv[i], \"-w\")) {\n+            char * p = NULL;\n+            W = strtoul(arg2, &p, 0);\n+            if (!W || *p) {\n+                fprintf(stderr, \"bad width %s\\n\", arg2);\n+                return -1;\n+            }\n+        } else if (!strcmp(argv[i], \"-h\")) {\n+            char * p = NULL;\n+            H = strtoul(arg2, &p, 0);\n+            if (!H || *p) {\n+                fprintf(stderr, \"bad height '%s'\\n\", arg2);\n+                return -1;\n+            }\n+        } else if (!strcmp(argv[i], \"-t\")) {\n+            char * p = NULL;\n+            time_rep = (int)strtol(arg2, &p, 0);\n+            if (*p) {\n+                fprintf(stderr, \"bad time repetitions '%s'\\n\", arg2);\n                 return -1;\n             }\n         } else {\n@@ -414,15 +457,34 @@ bad_option:\n         }\n     }\n \n-    sws = sws_getContext(W / 12, H / 12, AV_PIX_FMT_RGB32, W, H,\n+    S = (W + 15) & ~15;\n+    rgb_data   = av_mallocz(S * H * 4);\n+    rgb_src[0] = rgb_data;\n+    rgb_stride[0]   = 4 * S;\n+    data       = av_mallocz(4 * S * H);\n+    src[0] = data;\n+    src[1] = data + S * H;\n+    src[2] = data + S * H * 2;\n+    src[3] = data + S * H * 3;\n+    stride[0] = S;\n+    stride[1] = S;\n+    stride[2] = S;\n+    stride[3] = S;\n+    H2 = H < 96 ? 8 : H / 12;\n+    W2 = W < 96 ? 8 : W / 12;\n+\n+    if (!rgb_data || !data)\n+        return -1;\n+\n+    sws = sws_getContext(W2, H2, AV_PIX_FMT_RGB32, W, H,\n                          AV_PIX_FMT_YUVA420P, SWS_BILINEAR, NULL, NULL, NULL);\n \n     av_lfg_init(&rand, 1);\n \n     for (y = 0; y < H; y++)\n         for (x = 0; x < W * 4; x++)\n-            rgb_data[ x + y * 4 * W] = av_lfg_get(&rand);\n-    res = sws_scale(sws, rgb_src, rgb_stride, 0, H / 12, (uint8_t * const *) src, stride);\n+            rgb_data[ x + y * 4 * S] = av_lfg_get(&rand);\n+    res = sws_scale(sws, (const uint8_t * const *)rgb_src, rgb_stride, 0, H2, (uint8_t * const *) src, stride);\n     if (res < 0 || res != H) {\n         res = -1;\n         goto error;\n@@ -431,10 +493,10 @@ bad_option:\n     av_free(rgb_data);\n \n     if(fp) {\n-        res = fileTest(src, stride, W, H, fp, srcFormat, dstFormat);\n+        res = fileTest((const uint8_t * const *)src, stride, W, H, fp, srcFormat, dstFormat);\n         fclose(fp);\n     } else {\n-        selfTest(src, stride, W, H, srcFormat, dstFormat);\n+        selfTest((const uint8_t * const *)src, stride, W, H, srcFormat, dstFormat);\n         res = 0;\n     }\n error:\ndiff --git a/pi-util/BUILD.txt b/pi-util/BUILD.txt\nnew file mode 100644\nindex 0000000000..2b62d660c0\n--- /dev/null\n+++ b/pi-util/BUILD.txt\n@@ -0,0 +1,67 @@\n+Building Pi FFmpeg\n+==================\n+\n+Current only building on a Pi is supported.\n+This builds ffmpeg the way I've tested it\n+\n+Get all dependencies - the current package dependencies are good enough\n+\n+$ sudo apt-get build-dep ffmpeg\n+\n+Configure using the pi-util/conf_native.sh script\n+-------------------------------------------------\n+\n+This sets the normal release options and creates an ouutput dir to build into\n+The directory name will depend on system and options but will be under out/\n+\n+There are a few choices here\n+ --mmal  build including the legacy mmal-based decoders and zero-copy code\n+         this requires appropriate libraries which currently will exist for\n+         armv7 but not arm64\n+ --noshared\n+         Build a static image rather than a shared library one.  Static is\n+         easier for testing as there is no need to worry about library\n+         paths being confused and therefore running the wrong code,  Shared\n+         is what is needed, in most cases, when building for use by other\n+         programs.\n+ --usr   Set install dir to /usr (i.e. system default) rather than in\n+         <builddir>/install\n+\n+So for a static build\n+---------------------\n+\n+$ pi-util/conf_native.sh --noshared\n+\n+$ make -j8 -C out/<wherever the script said it was building to>\n+\n+You can now run ffmpeg directly from where it was built\n+\n+For a shared build\n+------------------\n+\n+There are two choices here\n+\n+$ pi-util/conf_native.sh\n+$ make -j8 -C out/<builddir> install\n+\n+This sets the install prefix to <builddir>/install and is probably what you\n+want if you don't want to overwrite the system files.\n+\n+You can now set LD_LIBRARY_PATH appropriately and run ffmpeg from where it was\n+built. You can copy the contents of <build dir>/install to /usr and that mostly\n+works. The only downside is that paths in pkgconfig end up being set to the\n+install directory in your build directory which may be less than ideal when\n+building other packages.\n+\n+The alternative if you just want to replace the system libs is:\n+\n+$ pi-util/conf_native.sh --usr\n+$ make -j8 -C out/<builddir>\n+$ sudo pi-util/clean_usr_libs.sh\n+$ sudo make -j8 -C out/<builddir> install\n+\n+The clean_usr_libs.sh step wipes any existing libs & includes (for all\n+architectures) from the system which helps avoid confusion when running other\n+progs as you can be sure you're not running old code which is unfortunately\n+easy to do otherwise.\n+\ndiff --git a/pi-util/NOTES.txt b/pi-util/NOTES.txt\nnew file mode 100644\nindex 0000000000..fcce72226a\n--- /dev/null\n+++ b/pi-util/NOTES.txt\n@@ -0,0 +1,69 @@\n+Notes on the hevc_rpi decoder & associated support code\n+-------------------------------------------------------\n+\n+There are 3 main parts to the existing code:\n+\n+1) The decoder - this is all in libavcodec as rpi_hevc*.\n+\n+2) A few filters to deal with Sand frames and a small patch to\n+automatically select the sand->i420 converter when required.\n+\n+3) A kludge in ffmpeg.c to display the decoded video. This could & should\n+be converted into a proper ffmpeg display module.\n+\n+\n+Decoder\n+-------\n+\n+The decoder is a modified version of the existing ffmpeg hevc decoder.\n+Generally it is ~100% faster than the existing ffmpeg hevc s/w decoder.\n+More complex bitstreams can be up to ~200% faster but particularly easy\n+streams can cut its advantage down to ~50%.  This means that a Pi3+ can\n+display nearly all 8-bit 1080p30 streams and with some overclocking it can\n+display most lower bitrate 10-bit 1080p30 streams - this latter case is\n+not helped by the requirement to downsample to 8-bit before display on a\n+Pi.\n+\n+It has had co-processor offload added for inter-pred and large block\n+residual transform.  Various parts have had optimized ARM NEON assembler\n+added and the existing ARM asm sections have been profiled and\n+re-optimized for A53. The main C code has been substantially reworked at\n+its lower levels in an attempt to optimize it and minimize memory\n+bandwidth. To some extent code paths that deal with frame types that it\n+doesn't support have been pruned.\n+\n+It outputs frames in Broadcom Sand format. This is a somewhat annoying\n+layout that doesn't fit into ffmpegs standard frame descriptions. It has\n+vertical stripes of 128 horizontal pixels (64 in 10 bit forms) with Y for\n+the stripe followed by interleaved U & V, that is then followed by the Y\n+for the next stripe, etc. The final stripe is always padded to\n+stripe-width. This is used in an attempt to help with cache locality and\n+cut down on the number of dram bank switches. It is annoying to use for\n+inter-pred with conventional processing but the way the Pi QPU (which is\n+used for inter-pred) works means that it has negligible downsides here and\n+the improved memory performance exceeds the overhead of the increased\n+complexity in the rest of the code.\n+\n+Frames must be allocated out of GPU memory (as otherwise they can't be\n+accessed by the co-processors). Utility functions (in rpi_zc.c) have been\n+written to make this easier. As the frames are already in GPU memory they\n+can be displayed by the Pi h/w without any further copying.\n+\n+\n+Known non-features\n+------------------\n+\n+Frame allocation should probably be done in some other way in order to fit\n+into the standard framework better.\n+\n+Sand frames are currently declared as software frames, there is an\n+argument that they should be hardware frames but they aren't really.\n+\n+There must be a better way of auto-selecting the hevc_rpi decoder over the\n+normal s/w hevc decoder, but I became confused by the existing h/w\n+acceleration framework and what I wanted to do didn't seem to fit in\n+neatly.\n+\n+Display should be a proper device rather than a kludge in ffmpeg.c\n+\n+\ndiff --git a/pi-util/TESTMESA.txt b/pi-util/TESTMESA.txt\nnew file mode 100644\nindex 0000000000..92bc13a3df\n--- /dev/null\n+++ b/pi-util/TESTMESA.txt\n@@ -0,0 +1,82 @@\n+# Setup & Build instructions for testing Argon30 mesa support (on Pi4)\r\n+\r\n+# These assume that the drm_mmal test for Sand8 has been built on this Pi\r\n+# as build relies on many of the same files\r\n+\r\n+# 1st get everything required to build ffmpeg\r\n+# If sources aren't already enabled on your Pi then enable them\r\n+sudo su\r\n+sed \"s/#deb-src/deb-src/\" /etc/apt/sources.list > /tmp/sources.list\r\n+sed \"s/#deb-src/deb-src/\" /etc/apt/sources.list.d/raspi.list > /tmp/raspi.list\r\n+mv /tmp/sources.list /etc/apt/\r\n+mv /tmp/raspi.list /etc/apt/sources.list.d/\r\n+apt update\r\n+\r\n+# Get dependancies\r\n+sudo apt build-dep ffmpeg\r\n+\r\n+sudo apt install meson libepoxy-dev libxcb-dri3-dev libxcb1-dev libx11-dev libx11-xcb-dev libdrm-dev\r\n+\r\n+# Enable H265 V4L2 request decoder\r\n+sudo su\r\n+echo dtoverlay=rpivid-v4l2 >> /boot/config.txt\r\n+# You may also want to add more CMA if you are going to try 4k videos\r\n+# Change the dtoverlay=vc4-fkms-v3d line in config.txt to read\r\n+# dtoverlay=vc4-fkms-v3d,cma-512\r\n+reboot\r\n+# Check it has turned up\r\n+ls -la /dev/video*\r\n+# This should include video19\r\n+# crw-rw----+ 1 root video 81, 7 Aug  4 17:25 /dev/video19\r\n+\r\n+# Currently on the Pi the linux headers from the debian distro don't match\r\n+# the kernel that we ship and we need to update them - hopefully this step\r\n+# will be unneeded in the future\r\n+sudo apt install git bc bison flex libssl-dev make\r\n+git clone --depth=1 https://github.com/raspberrypi/linux --branch rpi-5.10.y\r\n+cd linux\r\n+KERNEL=kernel7l\r\n+make bcm2711_defconfig\r\n+make headers_install\r\n+sudo cp -r usr/include/linux /usr/include\r\n+cd ..\r\n+\r\n+# Config - this builds a staticly linked ffmpeg which is easier for testing\r\n+pi-util/conf_native.sh --noshared\r\n+\r\n+# Build (this is a bit dull)\r\n+# If you want to poke the source the libavdevice/egl_vout.c contains the\r\n+# output code -\r\n+cd out/armv7-static-rel\r\n+\r\n+# Check that you have actually configured V4L2 request\r\n+grep HEVC_V4L2REQUEST config.h\r\n+# You are hoping for\r\n+# #define CONFIG_HEVC_V4L2REQUEST_HWACCEL 1\r\n+# if you get 0 then the config has failed\r\n+\r\n+make -j6\r\n+\r\n+# Grab test streams\r\n+wget http://www.jell.yfish.us/media/jellyfish-3-mbps-hd-h264.mkv\r\n+wget http://www.jell.yfish.us/media/jellyfish-3-mbps-hd-hevc.mkv\r\n+wget http://www.jell.yfish.us/media/jellyfish-3-mbps-hd-hevc-10bit.mkv\r\n+\r\n+# Test i420 output (works currently)\r\n+./ffmpeg -no_cvt_hw -vcodec h264_v4l2m2m -i jellyfish-3-mbps-hd-h264.mkv -f vout_egl -\r\n+\r\n+# Test Sand8 output - doesn't currently work but should once you have\r\n+# Sand8 working in drm_mmal. I can't guarantee that this will work as\r\n+# I can't test this path with a known working format, but the debug looks\r\n+# good.  If this doesn't work & drm_mmal does with sand8 then come back to me\r\n+# The \"show_all 1\" forces vout to display every frame otherwise it drops any\r\n+# frame that would cause it to block\r\n+./ffmpeg -no_cvt_hw -hwaccel drm -vcodec hevc -i jellyfish-3-mbps-hd-hevc.mkv -show_all 1 -f vout_egl -\r\n+\r\n+# Test Sand30 - doesn't currently work\r\n+# (Beware that when FFmpeg errors out it often leaves your teminal window\r\n+# in a state where you need to reset it)\r\n+./ffmpeg -no_cvt_hw -hwaccel drm -vcodec hevc -i jellyfish-3-mbps-hd-hevc-10bit.mkv -f vout_egl -\r\n+\r\n+\r\n+\r\ndiff --git a/pi-util/clean_usr_libs.sh b/pi-util/clean_usr_libs.sh\nnew file mode 100755\nindex 0000000000..01bd6a6a22\n--- /dev/null\n+++ b/pi-util/clean_usr_libs.sh\n@@ -0,0 +1,42 @@\n+set -e\n+U=/usr/include/arm-linux-gnueabihf\n+rm -rf $U/libavcodec\n+rm -rf $U/libavdevice\n+rm -rf $U/libavfilter\n+rm -rf $U/libavformat\n+rm -rf $U/libavutil\n+rm -rf $U/libswresample\n+rm -rf $U/libswscale\n+U=/usr/include/aarch64-linux-gnu\n+rm -rf $U/libavcodec\n+rm -rf $U/libavdevice\n+rm -rf $U/libavfilter\n+rm -rf $U/libavformat\n+rm -rf $U/libavutil\n+rm -rf $U/libswresample\n+rm -rf $U/libswscale\n+U=/usr/lib/arm-linux-gnueabihf\n+rm -f $U/libavcodec.*\n+rm -f $U/libavdevice.*\n+rm -f $U/libavfilter.*\n+rm -f $U/libavformat.*\n+rm -f $U/libavutil.*\n+rm -f $U/libswresample.*\n+rm -f $U/libswscale.*\n+U=/usr/lib/arm-linux-gnueabihf/neon/vfp\n+rm -f $U/libavcodec.*\n+rm -f $U/libavdevice.*\n+rm -f $U/libavfilter.*\n+rm -f $U/libavformat.*\n+rm -f $U/libavutil.*\n+rm -f $U/libswresample.*\n+rm -f $U/libswscale.*\n+U=/usr/lib/aarch64-linux-gnu\n+rm -f $U/libavcodec.*\n+rm -f $U/libavdevice.*\n+rm -f $U/libavfilter.*\n+rm -f $U/libavformat.*\n+rm -f $U/libavutil.*\n+rm -f $U/libswresample.*\n+rm -f $U/libswscale.*\n+\ndiff --git a/pi-util/conf_arm64_native.sh b/pi-util/conf_arm64_native.sh\nnew file mode 100644\nindex 0000000000..9e3bbfa190\n--- /dev/null\n+++ b/pi-util/conf_arm64_native.sh\n@@ -0,0 +1,45 @@\n+echo \"Configure for ARM64 native build\"\n+\n+#RPI_KEEPS=\"-save-temps=obj\"\n+\n+SHARED_LIBS=\"--enable-shared\"\n+if [ \"$1\" == \"--noshared\" ]; then\n+  SHARED_LIBS=\"--disable-shared\"\n+  echo Static libs\n+  OUT=out/arm64-static-rel\n+else\n+  echo Shared libs\n+  OUT=out/arm64-shared-rel\n+fi\n+\n+mkdir -p $OUT\n+cd $OUT\n+\n+A=aarch64-linux-gnu\n+USR_PREFIX=`pwd`/install\n+LIB_PREFIX=$USR_PREFIX/lib/$A\n+INC_PREFIX=$USR_PREFIX/include/$A\n+\n+../../configure \\\n+ --prefix=$USR_PREFIX\\\n+ --libdir=$LIB_PREFIX\\\n+ --incdir=$INC_PREFIX\\\n+ --disable-stripping\\\n+ --disable-thumb\\\n+ --disable-mmal\\\n+ --enable-sand\\\n+ --enable-v4l2-request\\\n+ --enable-libdrm\\\n+ --enable-epoxy\\\n+ --enable-libudev\\\n+ --enable-vout-drm\\\n+ --enable-vout-egl\\\n+ $SHARED_LIBS\\\n+ --extra-cflags=\"-ggdb\"\n+\n+# --enable-decoder=hevc_rpi\\\n+# --enable-extra-warnings\\\n+# --arch=armv71\\\n+\n+# gcc option for getting asm listing\n+# -Wa,-ahls\ndiff --git a/pi-util/conf_h265.2016.csv b/pi-util/conf_h265.2016.csv\nnew file mode 100644\nindex 0000000000..4efd5d1c67\n--- /dev/null\n+++ b/pi-util/conf_h265.2016.csv\n@@ -0,0 +1,195 @@\n+1,HEVC_v1/AMP_A_Samsung_7,AMP_A_Samsung_7.bin,AMP_A_Samsung_7.md5,8\r\n+1,HEVC_v1/AMP_B_Samsung_7,AMP_B_Samsung_7.bin,AMP_B_Samsung_7.md5,8\r\n+1,HEVC_v1/AMP_D_Hisilicon_3,AMP_D_Hisilicon.bit,AMP_D_Hisilicon_3.yuv.md5,8\r\n+1,HEVC_v1/AMP_E_Hisilicon_3,AMP_E_Hisilicon.bit,AMP_E_Hisilicon_3.yuv.md5,8\r\n+1,HEVC_v1/AMP_F_Hisilicon_3,AMP_F_Hisilicon_3.bit,AMP_F_Hisilicon_3.yuv.md5,8\r\n+1,HEVC_v1/AMVP_A_MTK_4,AMVP_A_MTK_4.bit,AMVP_A_MTK_4.md5,8\r\n+1,HEVC_v1/AMVP_B_MTK_4,AMVP_B_MTK_4.bit,AMVP_B_MTK_4.md5,8\r\n+1,HEVC_v1/AMVP_C_Samsung_7,AMVP_C_Samsung_7.bin,AMVP_C_Samsung_7.md5,8\r\n+1,HEVC_v1/BUMPING_A_ericsson_1,BUMPING_A_ericsson_1.bit,BUMPING_A_ericsson_1.md5,8\r\n+1,HEVC_v1/CAINIT_A_SHARP_4,CAINIT_A_SHARP_4.bit,CAINIT_A_SHARP_4.md5,8\r\n+1,HEVC_v1/CAINIT_B_SHARP_4,CAINIT_B_SHARP_4.bit,CAINIT_B_SHARP_4.md5,8\r\n+1,HEVC_v1/CAINIT_C_SHARP_3,CAINIT_C_SHARP_3.bit,CAINIT_C_SHARP_3.md5,8\r\n+1,HEVC_v1/CAINIT_D_SHARP_3,CAINIT_D_SHARP_3.bit,CAINIT_D_SHARP_3.md5,8\r\n+1,HEVC_v1/CAINIT_E_SHARP_3,CAINIT_E_SHARP_3.bit,CAINIT_E_SHARP_3.md5,8\r\n+1,HEVC_v1/CAINIT_F_SHARP_3,CAINIT_F_SHARP_3.bit,CAINIT_F_SHARP_3.md5,8\r\n+1,HEVC_v1/CAINIT_G_SHARP_3,CAINIT_G_SHARP_3.bit,CAINIT_G_SHARP_3.md5,8\r\n+1,HEVC_v1/CAINIT_H_SHARP_3,CAINIT_H_SHARP_3.bit,CAINIT_H_SHARP_3.md5,8\r\n+1,HEVC_v1/CIP_A_Panasonic_3,CIP_A_Panasonic_3.bit,CIP_A_Panasonic_3_yuv.md5,8\r\n+1,HEVC_v1/cip_B_NEC_3,cip_B_NEC_3.bit,cip_B_NEC_3.md5,8\r\n+1,HEVC_v1/CIP_C_Panasonic_2,CIP_C_Panasonic_2.bit,CIP_C_Panasonic_2_yuv.md5,8\r\n+1,HEVC_v1/CONFWIN_A_Sony_1,CONFWIN_A_Sony_1.bit,CONFWIN_A_Sony_1.md5,8\r\n+1,HEVC_v1/DBLK_A_MAIN10_VIXS_4,DBLK_A_MAIN10_VIXS_4.bit,DBLK_A_MAIN10_VIXS_4.md5,10\r\n+1,HEVC_v1/DBLK_A_SONY_3,DBLK_A_SONY_3.bit,DBLK_A_SONY_3.bit.yuv.md5,8\r\n+1,HEVC_v1/DBLK_B_SONY_3,DBLK_B_SONY_3.bit,DBLK_B_SONY_3.bit.yuv.md5,8\r\n+1,HEVC_v1/DBLK_C_SONY_3,DBLK_C_SONY_3.bit,DBLK_C_SONY_3.bit.yuv.md5,8\r\n+1,HEVC_v1/DBLK_D_VIXS_2,DBLK_D_VIXS_2.bit,DBLK_D_VIXS_2_yuv.md5,8\r\n+1,HEVC_v1/DBLK_E_VIXS_2,DBLK_E_VIXS_2.bit,DBLK_E_VIXS_2_yuv.md5,8\r\n+1,HEVC_v1/DBLK_F_VIXS_2,DBLK_F_VIXS_2.bit,DBLK_F_VIXS_2_yuv.md5,8\r\n+1,HEVC_v1/DBLK_G_VIXS_2,DBLK_G_VIXS_2.bit,DBLK_G_VIXS_2_yuv.md5,8\r\n+1,HEVC_v1/DELTAQP_A_BRCM_4,DELTAQP_A_BRCM_4.bit,DELTAQP_A_BRCM_4_yuv.md5,8\r\n+1,HEVC_v1/DELTAQP_B_SONY_3,DELTAQP_B_SONY_3.bit,DELTAQP_B_SONY_3.bit.yuv.md5,8\r\n+1,HEVC_v1/DELTAQP_C_SONY_3,DELTAQP_C_SONY_3.bit,DELTAQP_C_SONY_3.bit.yuv.md5,8\r\n+1,HEVC_v1/DSLICE_A_HHI_5,DSLICE_A_HHI_5.bin,DSLICE_A_HHI_5.md5,8\r\n+1,HEVC_v1/DSLICE_B_HHI_5,DSLICE_B_HHI_5.bin,DSLICE_B_HHI_5.md5,8\r\n+1,HEVC_v1/DSLICE_C_HHI_5,DSLICE_C_HHI_5.bin,DSLICE_C_HHI_5.md5,8\r\n+1,HEVC_v1/ENTP_A_QUALCOMM_1,ENTP_A_Qualcomm_1.bit,ENTP_A_Qualcomm_1.md5,8\r\n+1,HEVC_v1/ENTP_B_Qualcomm_1,ENTP_B_Qualcomm_1.bit,ENTP_B_Qualcomm_1.md5,8\r\n+1,HEVC_v1/ENTP_C_Qualcomm_1,ENTP_C_Qualcomm_1.bit,ENTP_C_Qualcomm_1.md5,8\r\n+1,HEVC_v1/EXT_A_ericsson_4,EXT_A_ericsson_4.bit,EXT_A_ericsson_4.md5,8\r\n+1,HEVC_v1/FILLER_A_Sony_1,FILLER_A_Sony_1.bit,FILLER_A_Sony_1.md5,8\r\n+1,HEVC_v1/HRD_A_Fujitsu_3,HRD_A_Fujitsu_3.bin,HRD_A_Fujitsu_3.md5,8\r\n+1,HEVC_v1/INITQP_A_Sony_1,INITQP_A_Sony_1.bit,INITQP_A_Sony_1.md5,8\r\n+1,HEVC_v1/INITQP_B_Main10_Sony_1,INITQP_B_Main10_Sony_1.bit,INITQP_B_Main10_Sony_1.md5,10\r\n+1,HEVC_v1/ipcm_A_NEC_3,ipcm_A_NEC_3.bit,ipcm_A_NEC_3.md5,8\r\n+1,HEVC_v1/ipcm_B_NEC_3,ipcm_B_NEC_3.bit,ipcm_B_NEC_3.md5,8\r\n+1,HEVC_v1/ipcm_C_NEC_3,ipcm_C_NEC_3.bit,ipcm_C_NEC_3.md5,8\r\n+1,HEVC_v1/ipcm_D_NEC_3,ipcm_D_NEC_3.bit,ipcm_D_NEC_3.md5,8\r\n+1,HEVC_v1/ipcm_E_NEC_2,ipcm_E_NEC_2.bit,ipcm_E_NEC_2.md5,8\r\n+1,HEVC_v1/IPRED_A_docomo_2,IPRED_A_docomo_2.bit,IPRED_A_docomo_2.md5,8\r\n+1,HEVC_v1/IPRED_B_Nokia_3,IPRED_B_Nokia_3.bit,IPRED_B_Nokia_3_yuv.md5,8\r\n+1,HEVC_v1/IPRED_C_Mitsubishi_3,IPRED_C_Mitsubishi_3.bit,IPRED_C_Mitsubishi_3_yuv.md5,8\r\n+1,HEVC_v1/LS_A_Orange_2,LS_A_Orange_2.bit,LS_A_Orange_2_yuv.md5,8\r\n+1,HEVC_v1/LS_B_Orange_4,LS_B_Orange_4.bit,LS_B_Orange_4_yuv.md5,8\r\n+1,HEVC_v1/LTRPSPS_A_Qualcomm_1,LTRPSPS_A_Qualcomm_1.bit,LTRPSPS_A_Qualcomm_1.md5,8\r\n+1,HEVC_v1/MAXBINS_A_TI_5,MAXBINS_A_TI_5.bit,MAXBINS_A_TI_5_yuv.md5,8\r\n+1,HEVC_v1/MAXBINS_B_TI_5,MAXBINS_B_TI_5.bit,MAXBINS_B_TI_5_yuv.md5,8\r\n+1,HEVC_v1/MAXBINS_C_TI_5,MAXBINS_C_TI_5.bit,MAXBINS_C_TI_5_yuv.md5,8\r\n+1,HEVC_v1/MERGE_A_TI_3,MERGE_A_TI_3.bit,MERGE_A_TI_3.md5,8\r\n+1,HEVC_v1/MERGE_B_TI_3,MERGE_B_TI_3.bit,MERGE_B_TI_3.md5,8\r\n+1,HEVC_v1/MERGE_C_TI_3,MERGE_C_TI_3.bit,MERGE_C_TI_3.md5,8\r\n+1,HEVC_v1/MERGE_D_TI_3,MERGE_D_TI_3.bit,MERGE_D_TI_3.md5,8\r\n+1,HEVC_v1/MERGE_E_TI_3,MERGE_E_TI_3.bit,MERGE_E_TI_3.md5,8\r\n+1,HEVC_v1/MERGE_F_MTK_4,MERGE_F_MTK_4.bit,MERGE_F_MTK_4.md5,8\r\n+1,HEVC_v1/MERGE_G_HHI_4,MERGE_G_HHI_4.bit,MERGE_G_HHI_4.md5,8\r\n+1,HEVC_v1/MVCLIP_A_qualcomm_3,MVCLIP_A_qualcomm_3.bit,MVCLIP_A_qualcomm_3.yuv.md5,8\r\n+1,HEVC_v1/MVDL1ZERO_A_docomo_4,MVDL1ZERO_A_docomo_4.bit,MVDL1ZERO_A_docomo_4.md5,8\r\n+1,HEVC_v1/MVEDGE_A_qualcomm_3,MVEDGE_A_qualcomm_3.bit,MVEDGE_A_qualcomm_3.yuv.md5,8\r\n+1,HEVC_v1/NoOutPrior_A_Qualcomm_1,NoOutPrior_A_Qualcomm_1.bit,NoOutPrior_A_Qualcomm_1.md5,8\r\n+1,HEVC_v1/NoOutPrior_B_Qualcomm_1,NoOutPrior_B_Qualcomm_1.bit,NoOutPrior_B_Qualcomm_1.md5,8\r\n+1,HEVC_v1/NUT_A_ericsson_5,NUT_A_ericsson_5.bit,NUT_A_ericsson_5.md5,8\r\n+1,HEVC_v1/OPFLAG_A_Qualcomm_1,OPFLAG_A_Qualcomm_1.bit,OPFLAG_A_Qualcomm_1.md5,8\r\n+1,HEVC_v1/OPFLAG_B_Qualcomm_1,OPFLAG_B_Qualcomm_1.bit,OPFLAG_B_Qualcomm_1.md5,8\r\n+1,HEVC_v1/OPFLAG_C_Qualcomm_1,OPFLAG_C_Qualcomm_1.bit,OPFLAG_C_Qualcomm_1.md5,8\r\n+1,HEVC_v1/PICSIZE_A_Bossen_1,PICSIZE_A_Bossen_1.bin,PICSIZE_A_Bossen_1.md5,8\r\n+1,HEVC_v1/PICSIZE_B_Bossen_1,PICSIZE_B_Bossen_1.bin,PICSIZE_B_Bossen_1.md5,8\r\n+1,HEVC_v1/PICSIZE_C_Bossen_1,PICSIZE_C_Bossen_1.bin,PICSIZE_C_Bossen_1.md5,8\r\n+1,HEVC_v1/PICSIZE_D_Bossen_1,PICSIZE_D_Bossen_1.bin,PICSIZE_D_Bossen_1.md5,8\r\n+1,HEVC_v1/PMERGE_A_TI_3,PMERGE_A_TI_3.bit,PMERGE_A_TI_3.md5,8\r\n+1,HEVC_v1/PMERGE_B_TI_3,PMERGE_B_TI_3.bit,PMERGE_B_TI_3.md5,8\r\n+1,HEVC_v1/PMERGE_C_TI_3,PMERGE_C_TI_3.bit,PMERGE_C_TI_3.md5,8\r\n+1,HEVC_v1/PMERGE_D_TI_3,PMERGE_D_TI_3.bit,PMERGE_D_TI_3.md5,8\r\n+1,HEVC_v1/PMERGE_E_TI_3,PMERGE_E_TI_3.bit,PMERGE_E_TI_3.md5,8\r\n+1,HEVC_v1/POC_A_Bossen_3,POC_A_Bossen_3.bin,POC_A_Bossen_3.md5,8\r\n+1,HEVC_v1/PPS_A_qualcomm_7,PPS_A_qualcomm_7.bit,PPS_A_qualcomm_7.yuv.md5,8\r\n+1,HEVC_v1/PS_B_VIDYO_3,PS_B_VIDYO_3.bit,PS_B_VIDYO_3_yuv.md5,8\r\n+1,HEVC_v1/RAP_A_docomo_6,RAP_A_docomo_6.bit,RAP_A_docomo_6.md5,8\r\n+1,HEVC_v1/RAP_B_Bossen_2,RAP_B_Bossen_2.bit,RAP_B_Bossen_2.md5,8\r\n+1,HEVC_v1/RPLM_A_qualcomm_4,RPLM_A_qualcomm_4.bit,RPLM_A_qualcomm_4.yuv.md5,8\r\n+1,HEVC_v1/RPLM_B_qualcomm_4,RPLM_B_qualcomm_4.bit,RPLM_B_qualcomm_4.yuv.md5,8\r\n+1,HEVC_v1/RPS_A_docomo_5,RPS_A_docomo_5.bit,RPS_A_docomo_5.md5,8\r\n+1,HEVC_v1/RPS_B_qualcomm_5,RPS_B_qualcomm_5.bit,RPS_B_qualcomm_5.yuv.md5,8\r\n+1,HEVC_v1/RPS_C_ericsson_5,RPS_C_ericsson_5.bit,RPS_C_ericsson_5.md5,8\r\n+1,HEVC_v1/RPS_D_ericsson_6,RPS_D_ericsson_6.bit,RPS_D_ericsson_6.md5,8\r\n+1,HEVC_v1/RPS_E_qualcomm_5,RPS_E_qualcomm_5.bit,RPS_E_qualcomm_5.yuv.md5,8\r\n+1,HEVC_v1/RPS_F_docomo_2,RPS_F_docomo_2.bit,RPS_F_docomo_2.md5,8\r\n+1,HEVC_v1/RQT_A_HHI_4,RQT_A_HHI_4.bit,RQT_A_HHI_4.md5,8\r\n+1,HEVC_v1/RQT_B_HHI_4,RQT_B_HHI_4.bit,RQT_B_HHI_4.md5,8\r\n+1,HEVC_v1/RQT_C_HHI_4,RQT_C_HHI_4.bit,RQT_C_HHI_4.md5,8\r\n+1,HEVC_v1/RQT_D_HHI_4,RQT_D_HHI_4.bit,RQT_D_HHI_4.md5,8\r\n+1,HEVC_v1/RQT_E_HHI_4,RQT_E_HHI_4.bit,RQT_E_HHI_4.md5,8\r\n+1,HEVC_v1/RQT_F_HHI_4,RQT_F_HHI_4.bit,RQT_F_HHI_4.md5,8\r\n+1,HEVC_v1/RQT_G_HHI_4,RQT_G_HHI_4.bit,RQT_G_HHI_4.md5,8\r\n+1,HEVC_v1/SAO_A_MediaTek_4,SAO_A_MediaTek_4.bit,SAO_A_MediaTek_4.md5,8\r\n+1,HEVC_v1/SAO_B_MediaTek_5,SAO_B_MediaTek_5.bit,SAO_B_MediaTek_5.md5,8\r\n+1,HEVC_v1/SAO_C_Samsung_5,SAO_C_Samsung_5.bin,SAO_C_Samsung_5.md5,8\r\n+1,HEVC_v1/SAO_D_Samsung_5,SAO_D_Samsung_5.bin,SAO_D_Samsung_5.md5,8\r\n+1,HEVC_v1/SAO_E_Canon_4,SAO_E_Canon_4.bit,SAO_E_Canon_4.md5,8\r\n+1,HEVC_v1/SAO_F_Canon_3,SAO_F_Canon_3.bit,SAO_F_Canon_3.md5,8\r\n+1,HEVC_v1/SAO_G_Canon_3,SAO_G_Canon_3.bit,SAO_G_Canon_3.md5,8\r\n+1,HEVC_v1/SAO_H_Parabola_1,SAO_H_Parabola_1.bit,SAO_H_Parabola_1.md5,8\r\n+1,HEVC_v1/SAODBLK_A_MainConcept_4,SAODBLK_A_MainConcept_4.bin,SAODBLK_A_MainConcept_4_md5.txt,8\r\n+1,HEVC_v1/SAODBLK_B_MainConcept_4,SAODBLK_B_MainConcept_4.bin,SAODBLK_B_MainConcept_4_md5.txt,8\r\n+1,HEVC_v1/SDH_A_Orange_4,SDH_A_Orange_4.bit,SDH_A_Orange_4_yuv.md5,8\r\n+1,HEVC_v1/SLICES_A_Rovi_3,SLICES_A_Rovi_3.bin,SLICES_A_Rovi_3.md5,8\r\n+1,HEVC_v1/SLIST_A_Sony_5,SLIST_A_Sony_5.bin,SLIST_A_Sony_5_yuv.md5,8\r\n+1,HEVC_v1/SLIST_B_Sony_9,SLIST_B_Sony_9.bin,SLIST_B_Sony_9_yuv.md5,8\r\n+1,HEVC_v1/SLIST_C_Sony_4,SLIST_C_Sony_4.bin,SLIST_C_Sony_4_yuv.md5,8\r\n+1,HEVC_v1/SLIST_D_Sony_9,str.bin,SLIST_D_Sony_9_yuv.md5,8\r\n+1,HEVC_v1/SLPPLP_A_VIDYO_2,SLPPLP_A_VIDYO_2.bit,SLPPLP_A_VIDYO_2_yuv.md5,8\r\n+1,HEVC_v1/STRUCT_A_Samsung_7,STRUCT_A_Samsung_7.bin,STRUCT_A_Samsung_7.md5,8\r\n+1,HEVC_v1/STRUCT_B_Samsung_7,STRUCT_B_Samsung_7.bin,STRUCT_B_Samsung_7.md5,8\r\n+1,HEVC_v1/TILES_A_Cisco_2,TILES_A_Cisco_2.bin,TILES_A_Cisco_2_yuv.md5,8\r\n+1,HEVC_v1/TILES_B_Cisco_1,TILES_B_Cisco_1.bin,TILES_B_Cisco_1_yuv.md5,8\r\n+1,HEVC_v1/TMVP_A_MS_3,TMVP_A_MS_3.bit,TMVP_A_MS_3.yuv.md5,8\r\n+1,HEVC_v1/TSCL_A_VIDYO_5,TSCL_A_VIDYO_5.bit,TSCL_A_VIDYO_5_yuv.md5,8\r\n+1,HEVC_v1/TSCL_B_VIDYO_4,TSCL_B_VIDYO_4.bit,TSCL_B_VIDYO_4_yuv.md5,8\r\n+1,HEVC_v1/TSKIP_A_MS_3,TSKIP_A_MS_3.bit,TSKIP_A_MS_3.yuv.md5,8\r\n+3,HEVC_v1/TSUNEQBD_A_MAIN10_Technicolor_2,TSUNEQBD_A_MAIN10_Technicolor_2.bit,TSUNEQBD_A_MAIN10_Technicolor_2_yuv.md5, # unequal bit depth,10\r\n+1,HEVC_v1/TUSIZE_A_Samsung_1,TUSIZE_A_Samsung_1.bin,TUSIZE_A_Samsung_1.md5,8\r\n+1,HEVC_v1/VPSID_A_VIDYO_2,VPSID_A_VIDYO_2.bit,VPSID_A_VIDYO_2_yuv.md5,8\r\n+3,HEVC_v1/VPSSPSPPS_A_MainConcept_1,VPSSPSPPS_A_MainConcept_1.bin,VPSSPSPPS_A_MainConcept_1_md5.txt, # ???,8\r\n+1,HEVC_v1/WP_A_MAIN10_Toshiba_3,WP_A_MAIN10_Toshiba_3.bit,WP_A_MAIN10_Toshiba_3_yuv.md5,10\r\n+1,HEVC_v1/WP_A_Toshiba_3,WP_A_Toshiba_3.bit,WP_A_Toshiba_3_yuv.md5,8\r\n+1,HEVC_v1/WP_B_Toshiba_3,WP_B_Toshiba_3.bit,WP_B_Toshiba_3_yuv.md5,8\r\n+1,HEVC_v1/WP_MAIN10_B_Toshiba_3,WP_MAIN10_B_Toshiba_3.bit,WP_MAIN10_B_Toshiba_3_yuv.md5,10\r\n+1,HEVC_v1/WPP_A_ericsson_MAIN10_2,WPP_A_ericsson_MAIN10_2.bit,WPP_A_ericsson_MAIN10_yuv.md5,10\r\n+1,HEVC_v1/WPP_A_ericsson_MAIN_2,WPP_A_ericsson_MAIN_2.bit,WPP_A_ericsson_MAIN_2_yuv.md5,8\r\n+1,HEVC_v1/WPP_B_ericsson_MAIN10_2,WPP_B_ericsson_MAIN10_2.bit,WPP_B_ericsson_MAIN10_yuv.md5,10\r\n+1,HEVC_v1/WPP_B_ericsson_MAIN_2,WPP_B_ericsson_MAIN_2.bit,WPP_B_ericsson_MAIN_2_yuv.md5,8\r\n+1,HEVC_v1/WPP_C_ericsson_MAIN10_2,WPP_C_ericsson_MAIN10_2.bit,WPP_C_ericsson_MAIN10_yuv.md5,10\r\n+1,HEVC_v1/WPP_C_ericsson_MAIN_2,WPP_C_ericsson_MAIN_2.bit,WPP_C_ericsson_MAIN_2_yuv.md5,8\r\n+1,HEVC_v1/WPP_D_ericsson_MAIN10_2,WPP_D_ericsson_MAIN10_2.bit,WPP_D_ericsson_MAIN10_yuv.md5,10\r\n+1,HEVC_v1/WPP_D_ericsson_MAIN_2,WPP_D_ericsson_MAIN_2.bit,WPP_D_ericsson_MAIN_2_yuv.md5,8\r\n+1,HEVC_v1/WPP_E_ericsson_MAIN10_2,WPP_E_ericsson_MAIN10_2.bit,WPP_E_ericsson_MAIN10_yuv.md5,10\r\n+1,HEVC_v1/WPP_E_ericsson_MAIN_2,WPP_E_ericsson_MAIN_2.bit,WPP_E_ericsson_MAIN_2_yuv.md5,8\r\n+1,HEVC_v1/WPP_F_ericsson_MAIN10_2,WPP_F_ericsson_MAIN10_2.bit,WPP_F_ericsson_MAIN10_yuv.md5,10\r\n+1,HEVC_v1/WPP_F_ericsson_MAIN_2,WPP_F_ericsson_MAIN_2.bit,WPP_F_ericsson_MAIN_2_yuv.md5,8\r\n+1,RExt/ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_2,ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_2.bit,ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_yuv_2.md5,0\r\n+0,RExt/Bitdepth_A_RExt_Sony_1,Bitdepth_A_RExt_Sony_1.bin,md5sum.txt,8\r\n+0,RExt/Bitdepth_B_RExt_Sony_1,Bitdepth_B_RExt_Sony_1.bin,md5sum.txt,8\r\n+0,RExt/CCP_10bit_RExt_QCOM,CCP_10bit_RExt_QCOM.bin,CCP_10bit_RExt_QCOM_md5sum.txt,10\r\n+0,RExt/CCP_12bit_RExt_QCOM,CCP_12bit_RExt_QCOM.bin,CCP_12bit_RExt_QCOM_md5sum.txt,8\r\n+0,RExt/CCP_8bit_RExt_QCOM,CCP_8bit_RExt_QCOM.bin,CCP_8bit_RExt_QCOM_md5sum.txt,8\r\n+1,RExt/ExplicitRdpcm_A_BBC_1,ExplicitRdpcm_A_BBC_1.bit,md5sum.txt,0\r\n+0,RExt/ExplicitRdpcm_B_BBC_2,ExplicitRdpcm_B_BBC_1.bit,md5sum.txt,8\r\n+0,RExt/EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_10BIT_RExt_Sony_1,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_10BIT_RExt_Sony_1.bit,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_10BIT_RExt_Sony_1.md5,10\r\n+0,RExt/EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_12BIT_RExt_Sony_1,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_12BIT_RExt_Sony_1.bit,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_12BIT_RExt_Sony_1.md5,8\r\n+0,RExt/EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_16BIT_RExt_Sony_1,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_16BIT_RExt_Sony_1.bit,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_16BIT_RExt_Sony_1.md5,8\r\n+0,RExt/EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_8BIT_RExt_Sony_1,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_8BIT_RExt_Sony_1.bit,EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_8BIT_RExt_Sony_1.md5,8\r\n+0,RExt/EXTPREC_MAIN_444_16_INTRA_10BIT_RExt_Sony_1,EXTPREC_MAIN_444_16_INTRA_10BIT_RExt_Sony_1.bit,EXTPREC_MAIN_444_16_INTRA_10BIT_RExt_Sony_1.md5,10\r\n+0,RExt/EXTPREC_MAIN_444_16_INTRA_12BIT_RExt_Sony_1,EXTPREC_MAIN_444_16_INTRA_12BIT_RExt_Sony_1.bit,EXTPREC_MAIN_444_16_INTRA_12BIT_RExt_Sony_1.md5,8\r\n+0,RExt/EXTPREC_MAIN_444_16_INTRA_16BIT_RExt_Sony_1,EXTPREC_MAIN_444_16_INTRA_16BIT_RExt_Sony_1.bit,EXTPREC_MAIN_444_16_INTRA_16BIT_RExt_Sony_1.md5,8\r\n+0,RExt/EXTPREC_MAIN_444_16_INTRA_8BIT_RExt_Sony_1,EXTPREC_MAIN_444_16_INTRA_8BIT_RExt_Sony_1.bit,EXTPREC_MAIN_444_16_INTRA_8BIT_RExt_Sony_1.md5,8\r\n+1,RExt/GENERAL_10b_420_RExt_Sony_1,GENERAL_10b_420_RExt_Sony_1.bit,GENERAL_10b_420_RExt_Sony_1.md5,10\r\n+1,RExt/GENERAL_10b_422_RExt_Sony_1,GENERAL_10b_422_RExt_Sony_1.bit,GENERAL_10b_422_RExt_Sony_1.md5,0\r\n+1,RExt/GENERAL_10b_444_RExt_Sony_2,GENERAL_10b_444_RExt_Sony_2.bit,GENERAL_10b_444_RExt_Sony_2.md5,0\r\n+1,RExt/GENERAL_12b_400_RExt_Sony_1,GENERAL_12b_400_RExt_Sony_1.bit,GENERAL_12b_400_RExt_Sony_1.md5,0\r\n+1,RExt/GENERAL_12b_420_RExt_Sony_1,GENERAL_12b_420_RExt_Sony_1.bit,GENERAL_12b_420_RExt_Sony_1.md5,0\r\n+1,RExt/GENERAL_12b_422_RExt_Sony_1,GENERAL_12b_422_RExt_Sony_1.bit,GENERAL_12b_422_RExt_Sony_1.md5,0\r\n+1,RExt/GENERAL_12b_444_RExt_Sony_2,GENERAL_12b_444_RExt_Sony_2.bit,GENERAL_12b_444_RExt_Sony_2.md5,0\r\n+0,RExt/GENERAL_16b_400_RExt_Sony_1,GENERAL_16b_400_RExt_Sony_1.bit,GENERAL_16b_400_RExt_Sony_1.md5,0\r\n+0,RExt/GENERAL_16b_444_highThroughput_RExt_Sony_2,GENERAL_16b_444_highThroughput_RExt_Sony_2.bit,GENERAL_16b_444_highThroughput_RExt_Sony_2.md5,8\r\n+0,RExt/GENERAL_16b_444_RExt_Sony_2,GENERAL_16b_444_RExt_Sony_2.bit,GENERAL_16b_444_RExt_Sony_2.md5,8\r\n+1,RExt/GENERAL_8b_400_RExt_Sony_1,GENERAL_8b_400_RExt_Sony_1.bit,GENERAL_8b_400_RExt_Sony_1.md5,0\r\n+1,RExt/GENERAL_8b_420_RExt_Sony_1,GENERAL_8b_420_RExt_Sony_1.bit,GENERAL_8b_420_RExt_Sony_1.md5,8\r\n+1,RExt/GENERAL_8b_444_RExt_Sony_2,GENERAL_8b_444_RExt_Sony_2.bit,GENERAL_8b_444_RExt_Sony_2.md5,0\r\n+1,RExt/IPCM_A_RExt_NEC_2,IPCM_A_RExt_NEC_2.bit,IPCM_A_RExt_NEC_2_yuv.md5,0\r\n+1,RExt/IPCM_B_RExt_NEC,IPCM_B_RExt_NEC.bit,IPCM_B_RExt_NEC_yuv.md5,0\r\n+1,RExt/Main_422_10_A_RExt_Sony_2,Main_422_10_A_RExt_Sony_2.bin,md5sum.txt,0\r\n+1,RExt/Main_422_10_B_RExt_Sony_2,Main_422_10_B_RExt_Sony_2.bin,md5sum.txt,0\r\n+1,RExt/PERSIST_RPARAM_A_RExt_Sony_3,PERSIST_RPARAM_A_RExt_Sony_3.bit,PERSIST_RPARAM_A_RExt_Sony_3.md5,0\r\n+1,RExt/QMATRIX_A_RExt_Sony_1,QMATRIX_A_RExt_Sony_1.bit,QMATRIX_A_RExt_Sony_1.md5,0\r\n+0,RExt/SAO_A_RExt_MediaTek_1,SAO_A_RExt_MediaTek_1.bit,SAO_A_RExt_MediaTek_1.md5, # Runs out of memory - could be fixed,8\r\n+0,RExt/TSCTX_10bit_I_RExt_SHARP_1,TSCTX_10bit_I_RExt_SHARP_1.bin,TSCTX_10bit_I_RExt_SHARP_1.md5,10\r\n+0,RExt/TSCTX_10bit_RExt_SHARP_1,TSCTX_10bit_RExt_SHARP_1.bin,TSCTX_10bit_RExt_SHARP_1.md5,10\r\n+0,RExt/TSCTX_12bit_I_RExt_SHARP_1,TSCTX_12bit_I_RExt_SHARP_1.bin,TSCTX_12bit_I_RExt_SHARP_1.md5,8\r\n+0,RExt/TSCTX_12bit_RExt_SHARP_1,TSCTX_12bit_RExt_SHARP_1.bin,TSCTX_12bit_RExt_SHARP_1.md5,8\r\n+0,RExt/TSCTX_8bit_I_RExt_SHARP_1,TSCTX_8bit_I_RExt_SHARP_1.bin,TSCTX_8bit_I_RExt_SHARP_1.md5,8\r\n+0,RExt/TSCTX_8bit_RExt_SHARP_1,TSCTX_8bit_RExt_SHARP_1.bin,TSCTX_8bit_RExt_SHARP_1.md5,8\r\n+0,RExt/WAVETILES_RExt_Sony_2,WAVETILES_RExt_Sony_2.bit,WAVETILES_RExt_Sony_2.md5,8\r\n+1,local/sao_cu16_mobile_344x280,sao_cu16_mobile_344x280.265,sao_cu16_mobile_344x280.md5,8\r\n+1,local/dblk_cu16_mobile_344x280,dblk_cu16_mobile_344x280.265,dblk_cu16_mobile_344x280.md5,8\r\n+1,local/dblksao_cu16_mobile_344x280,dblksao_cu16_mobile_344x280.265,dblksao_cu16_mobile_344x280.md5,8\r\n+1,local/dblk_pu32_horses_832x448,dblk_pu32_horses_832x448.265,dblk_pu32_horses_832x448.md5,8\r\n+1,local/intra_pred_21_laps,intra_pred_21_laps.265,intra_pred_21_laps.md5,8\r\ndiff --git a/pi-util/conf_h265.2016_HEVC_v1.csv b/pi-util/conf_h265.2016_HEVC_v1.csv\nnew file mode 100644\nindex 0000000000..6082641271\n--- /dev/null\n+++ b/pi-util/conf_h265.2016_HEVC_v1.csv\n@@ -0,0 +1,147 @@\n+1,AMP_A_Samsung_7,AMP_A_Samsung_7.bin,AMP_A_Samsung_7.md5\r\n+1,AMP_B_Samsung_7,AMP_B_Samsung_7.bin,AMP_B_Samsung_7.md5\r\n+1,AMP_D_Hisilicon_3,AMP_D_Hisilicon.bit,AMP_D_Hisilicon_3.yuv.md5\r\n+1,AMP_E_Hisilicon_3,AMP_E_Hisilicon.bit,AMP_E_Hisilicon_3.yuv.md5\r\n+1,AMP_F_Hisilicon_3,AMP_F_Hisilicon_3.bit,AMP_F_Hisilicon_3.yuv.md5\r\n+1,AMVP_A_MTK_4,AMVP_A_MTK_4.bit,AMVP_A_MTK_4.md5\r\n+1,AMVP_B_MTK_4,AMVP_B_MTK_4.bit,AMVP_B_MTK_4.md5\r\n+1,AMVP_C_Samsung_7,AMVP_C_Samsung_7.bin,AMVP_C_Samsung_7.md5\r\n+1,BUMPING_A_ericsson_1,BUMPING_A_ericsson_1.bit,BUMPING_A_ericsson_1.md5\r\n+1,CAINIT_A_SHARP_4,CAINIT_A_SHARP_4.bit,CAINIT_A_SHARP_4.md5\r\n+1,CAINIT_B_SHARP_4,CAINIT_B_SHARP_4.bit,CAINIT_B_SHARP_4.md5\r\n+1,CAINIT_C_SHARP_3,CAINIT_C_SHARP_3.bit,CAINIT_C_SHARP_3.md5\r\n+1,CAINIT_D_SHARP_3,CAINIT_D_SHARP_3.bit,CAINIT_D_SHARP_3.md5\r\n+1,CAINIT_E_SHARP_3,CAINIT_E_SHARP_3.bit,CAINIT_E_SHARP_3.md5\r\n+1,CAINIT_F_SHARP_3,CAINIT_F_SHARP_3.bit,CAINIT_F_SHARP_3.md5\r\n+1,CAINIT_G_SHARP_3,CAINIT_G_SHARP_3.bit,CAINIT_G_SHARP_3.md5\r\n+1,CAINIT_H_SHARP_3,CAINIT_H_SHARP_3.bit,CAINIT_H_SHARP_3.md5\r\n+1,CIP_A_Panasonic_3,CIP_A_Panasonic_3.bit,CIP_A_Panasonic_3_yuv.md5\r\n+1,cip_B_NEC_3,cip_B_NEC_3.bit,cip_B_NEC_3.md5\r\n+1,CIP_C_Panasonic_2,CIP_C_Panasonic_2.bit,CIP_C_Panasonic_2_yuv.md5\r\n+1,CONFWIN_A_Sony_1,CONFWIN_A_Sony_1.bit,CONFWIN_A_Sony_1.md5\r\n+1,DBLK_A_MAIN10_VIXS_4,DBLK_A_MAIN10_VIXS_4.bit,DBLK_A_MAIN10_VIXS_4.md5\r\n+1,DBLK_A_SONY_3,DBLK_A_SONY_3.bit,DBLK_A_SONY_3.bit.yuv.md5\r\n+1,DBLK_B_SONY_3,DBLK_B_SONY_3.bit,DBLK_B_SONY_3.bit.yuv.md5\r\n+1,DBLK_C_SONY_3,DBLK_C_SONY_3.bit,DBLK_C_SONY_3.bit.yuv.md5\r\n+1,DBLK_D_VIXS_2,DBLK_D_VIXS_2.bit,DBLK_D_VIXS_2_yuv.md5\r\n+1,DBLK_E_VIXS_2,DBLK_E_VIXS_2.bit,DBLK_E_VIXS_2_yuv.md5\r\n+1,DBLK_F_VIXS_2,DBLK_F_VIXS_2.bit,DBLK_F_VIXS_2_yuv.md5\r\n+1,DBLK_G_VIXS_2,DBLK_G_VIXS_2.bit,DBLK_G_VIXS_2_yuv.md5\r\n+1,DELTAQP_A_BRCM_4,DELTAQP_A_BRCM_4.bit,DELTAQP_A_BRCM_4_yuv.md5\r\n+1,DELTAQP_B_SONY_3,DELTAQP_B_SONY_3.bit,DELTAQP_B_SONY_3.bit.yuv.md5\r\n+1,DELTAQP_C_SONY_3,DELTAQP_C_SONY_3.bit,DELTAQP_C_SONY_3.bit.yuv.md5\r\n+1,DSLICE_A_HHI_5,DSLICE_A_HHI_5.bin,DSLICE_A_HHI_5.md5\r\n+1,DSLICE_B_HHI_5,DSLICE_B_HHI_5.bin,DSLICE_B_HHI_5.md5\r\n+1,DSLICE_C_HHI_5,DSLICE_C_HHI_5.bin,DSLICE_C_HHI_5.md5\r\n+1,ENTP_A_QUALCOMM_1,ENTP_A_Qualcomm_1.bit,ENTP_A_Qualcomm_1.md5\r\n+1,ENTP_B_Qualcomm_1,ENTP_B_Qualcomm_1.bit,ENTP_B_Qualcomm_1.md5\r\n+1,ENTP_C_Qualcomm_1,ENTP_C_Qualcomm_1.bit,ENTP_C_Qualcomm_1.md5\r\n+1,EXT_A_ericsson_4,EXT_A_ericsson_4.bit,EXT_A_ericsson_4.md5\r\n+1,FILLER_A_Sony_1,FILLER_A_Sony_1.bit,FILLER_A_Sony_1.md5\r\n+1,HRD_A_Fujitsu_3,HRD_A_Fujitsu_3.bin,HRD_A_Fujitsu_3.md5\r\n+1,INITQP_A_Sony_1,INITQP_A_Sony_1.bit,INITQP_A_Sony_1.md5\r\n+1,INITQP_B_Main10_Sony_1,INITQP_B_Main10_Sony_1.bit,INITQP_B_Main10_Sony_1.md5\r\n+1,ipcm_A_NEC_3,ipcm_A_NEC_3.bit,ipcm_A_NEC_3.md5\r\n+1,ipcm_B_NEC_3,ipcm_B_NEC_3.bit,ipcm_B_NEC_3.md5\r\n+1,ipcm_C_NEC_3,ipcm_C_NEC_3.bit,ipcm_C_NEC_3.md5\r\n+1,ipcm_D_NEC_3,ipcm_D_NEC_3.bit,ipcm_D_NEC_3.md5\r\n+1,ipcm_E_NEC_2,ipcm_E_NEC_2.bit,ipcm_E_NEC_2.md5\r\n+1,IPRED_A_docomo_2,IPRED_A_docomo_2.bit,IPRED_A_docomo_2.md5\r\n+1,IPRED_B_Nokia_3,IPRED_B_Nokia_3.bit,IPRED_B_Nokia_3_yuv.md5\r\n+1,IPRED_C_Mitsubishi_3,IPRED_C_Mitsubishi_3.bit,IPRED_C_Mitsubishi_3_yuv.md5\r\n+1,LS_A_Orange_2,LS_A_Orange_2.bit,LS_A_Orange_2_yuv.md5\r\n+1,LS_B_Orange_4,LS_B_Orange_4.bit,LS_B_Orange_4_yuv.md5\r\n+1,LTRPSPS_A_Qualcomm_1,LTRPSPS_A_Qualcomm_1.bit,LTRPSPS_A_Qualcomm_1.md5\r\n+1,MAXBINS_A_TI_5,MAXBINS_A_TI_5.bit,MAXBINS_A_TI_5_yuv.md5\r\n+1,MAXBINS_B_TI_5,MAXBINS_B_TI_5.bit,MAXBINS_B_TI_5_yuv.md5\r\n+1,MAXBINS_C_TI_5,MAXBINS_C_TI_5.bit,MAXBINS_C_TI_5_yuv.md5\r\n+1,MERGE_A_TI_3,MERGE_A_TI_3.bit,MERGE_A_TI_3.md5\r\n+1,MERGE_B_TI_3,MERGE_B_TI_3.bit,MERGE_B_TI_3.md5\r\n+1,MERGE_C_TI_3,MERGE_C_TI_3.bit,MERGE_C_TI_3.md5\r\n+1,MERGE_D_TI_3,MERGE_D_TI_3.bit,MERGE_D_TI_3.md5\r\n+1,MERGE_E_TI_3,MERGE_E_TI_3.bit,MERGE_E_TI_3.md5\r\n+1,MERGE_F_MTK_4,MERGE_F_MTK_4.bit,MERGE_F_MTK_4.md5\r\n+1,MERGE_G_HHI_4,MERGE_G_HHI_4.bit,MERGE_G_HHI_4.md5\r\n+1,MVCLIP_A_qualcomm_3,MVCLIP_A_qualcomm_3.bit,MVCLIP_A_qualcomm_3.yuv.md5\r\n+1,MVDL1ZERO_A_docomo_4,MVDL1ZERO_A_docomo_4.bit,MVDL1ZERO_A_docomo_4.md5\r\n+1,MVEDGE_A_qualcomm_3,MVEDGE_A_qualcomm_3.bit,MVEDGE_A_qualcomm_3.yuv.md5\r\n+1,NoOutPrior_A_Qualcomm_1,NoOutPrior_A_Qualcomm_1.bit,NoOutPrior_A_Qualcomm_1.md5\r\n+1,NoOutPrior_B_Qualcomm_1,NoOutPrior_B_Qualcomm_1.bit,NoOutPrior_B_Qualcomm_1.md5\r\n+1,NUT_A_ericsson_5,NUT_A_ericsson_5.bit,NUT_A_ericsson_5.md5\r\n+1,OPFLAG_A_Qualcomm_1,OPFLAG_A_Qualcomm_1.bit,OPFLAG_A_Qualcomm_1.md5\r\n+1,OPFLAG_B_Qualcomm_1,OPFLAG_B_Qualcomm_1.bit,OPFLAG_B_Qualcomm_1.md5\r\n+1,OPFLAG_C_Qualcomm_1,OPFLAG_C_Qualcomm_1.bit,OPFLAG_C_Qualcomm_1.md5\r\n+1,PICSIZE_A_Bossen_1,PICSIZE_A_Bossen_1.bin,PICSIZE_A_Bossen_1.md5\r\n+1,PICSIZE_B_Bossen_1,PICSIZE_B_Bossen_1.bin,PICSIZE_B_Bossen_1.md5\r\n+1,PICSIZE_C_Bossen_1,PICSIZE_C_Bossen_1.bin,PICSIZE_C_Bossen_1.md5\r\n+1,PICSIZE_D_Bossen_1,PICSIZE_D_Bossen_1.bin,PICSIZE_D_Bossen_1.md5\r\n+1,PMERGE_A_TI_3,PMERGE_A_TI_3.bit,PMERGE_A_TI_3.md5\r\n+1,PMERGE_B_TI_3,PMERGE_B_TI_3.bit,PMERGE_B_TI_3.md5\r\n+1,PMERGE_C_TI_3,PMERGE_C_TI_3.bit,PMERGE_C_TI_3.md5\r\n+1,PMERGE_D_TI_3,PMERGE_D_TI_3.bit,PMERGE_D_TI_3.md5\r\n+1,PMERGE_E_TI_3,PMERGE_E_TI_3.bit,PMERGE_E_TI_3.md5\r\n+1,POC_A_Bossen_3,POC_A_Bossen_3.bin,POC_A_Bossen_3.md5\r\n+1,PPS_A_qualcomm_7,PPS_A_qualcomm_7.bit,PPS_A_qualcomm_7.yuv.md5\r\n+1,PS_B_VIDYO_3,PS_B_VIDYO_3.bit,PS_B_VIDYO_3_yuv.md5\r\n+1,RAP_A_docomo_6,RAP_A_docomo_6.bit,RAP_A_docomo_6.md5\r\n+1,RAP_B_Bossen_2,RAP_B_Bossen_2.bit,RAP_B_Bossen_2.md5\r\n+1,RPLM_A_qualcomm_4,RPLM_A_qualcomm_4.bit,RPLM_A_qualcomm_4.yuv.md5\r\n+1,RPLM_B_qualcomm_4,RPLM_B_qualcomm_4.bit,RPLM_B_qualcomm_4.yuv.md5\r\n+1,RPS_A_docomo_5,RPS_A_docomo_5.bit,RPS_A_docomo_5.md5\r\n+1,RPS_B_qualcomm_5,RPS_B_qualcomm_5.bit,RPS_B_qualcomm_5.yuv.md5\r\n+1,RPS_C_ericsson_5,RPS_C_ericsson_5.bit,RPS_C_ericsson_5.md5\r\n+1,RPS_D_ericsson_6,RPS_D_ericsson_6.bit,RPS_D_ericsson_6.md5\r\n+1,RPS_E_qualcomm_5,RPS_E_qualcomm_5.bit,RPS_E_qualcomm_5.yuv.md5\r\n+1,RPS_F_docomo_2,RPS_F_docomo_2.bit,RPS_F_docomo_2.md5\r\n+1,RQT_A_HHI_4,RQT_A_HHI_4.bit,RQT_A_HHI_4.md5\r\n+1,RQT_B_HHI_4,RQT_B_HHI_4.bit,RQT_B_HHI_4.md5\r\n+1,RQT_C_HHI_4,RQT_C_HHI_4.bit,RQT_C_HHI_4.md5\r\n+1,RQT_D_HHI_4,RQT_D_HHI_4.bit,RQT_D_HHI_4.md5\r\n+1,RQT_E_HHI_4,RQT_E_HHI_4.bit,RQT_E_HHI_4.md5\r\n+1,RQT_F_HHI_4,RQT_F_HHI_4.bit,RQT_F_HHI_4.md5\r\n+1,RQT_G_HHI_4,RQT_G_HHI_4.bit,RQT_G_HHI_4.md5\r\n+1,SAO_A_MediaTek_4,SAO_A_MediaTek_4.bit,SAO_A_MediaTek_4.md5\r\n+1,SAO_B_MediaTek_5,SAO_B_MediaTek_5.bit,SAO_B_MediaTek_5.md5\r\n+1,SAO_C_Samsung_5,SAO_C_Samsung_5.bin,SAO_C_Samsung_5.md5\r\n+1,SAO_D_Samsung_5,SAO_D_Samsung_5.bin,SAO_D_Samsung_5.md5\r\n+1,SAO_E_Canon_4,SAO_E_Canon_4.bit,SAO_E_Canon_4.md5\r\n+1,SAO_F_Canon_3,SAO_F_Canon_3.bit,SAO_F_Canon_3.md5\r\n+1,SAO_G_Canon_3,SAO_G_Canon_3.bit,SAO_G_Canon_3.md5\r\n+1,SAO_H_Parabola_1,SAO_H_Parabola_1.bit,SAO_H_Parabola_1.md5\r\n+2,SAODBLK_A_MainConcept_4,SAODBLK_A_MainConcept_4.bin,SAODBLK_A_MainConcept_4_md5.txt\r\n+2,SAODBLK_B_MainConcept_4,SAODBLK_B_MainConcept_4.bin,SAODBLK_B_MainConcept_4_md5.txt\r\n+1,SDH_A_Orange_4,SDH_A_Orange_4.bit,SDH_A_Orange_4_yuv.md5\r\n+1,SLICES_A_Rovi_3,SLICES_A_Rovi_3.bin,SLICES_A_Rovi_3.md5\r\n+1,SLIST_A_Sony_5,SLIST_A_Sony_5.bin,SLIST_A_Sony_5_yuv.md5\r\n+1,SLIST_B_Sony_9,SLIST_B_Sony_9.bin,SLIST_B_Sony_9_yuv.md5\r\n+1,SLIST_C_Sony_4,SLIST_C_Sony_4.bin,SLIST_C_Sony_4_yuv.md5\r\n+1,SLIST_D_Sony_9,str.bin,SLIST_D_Sony_9_yuv.md5\r\n+1,SLPPLP_A_VIDYO_2,SLPPLP_A_VIDYO_2.bit,SLPPLP_A_VIDYO_2_yuv.md5\r\n+1,STRUCT_A_Samsung_7,STRUCT_A_Samsung_7.bin,STRUCT_A_Samsung_7.md5\r\n+1,STRUCT_B_Samsung_7,STRUCT_B_Samsung_7.bin,STRUCT_B_Samsung_7.md5\r\n+1,TILES_A_Cisco_2,TILES_A_Cisco_2.bin,TILES_A_Cisco_2_yuv.md5\r\n+1,TILES_B_Cisco_1,TILES_B_Cisco_1.bin,TILES_B_Cisco_1_yuv.md5\r\n+1,TMVP_A_MS_3,TMVP_A_MS_3.bit,TMVP_A_MS_3.yuv.md5\r\n+1,TSCL_A_VIDYO_5,TSCL_A_VIDYO_5.bit,TSCL_A_VIDYO_5_yuv.md5\r\n+1,TSCL_B_VIDYO_4,TSCL_B_VIDYO_4.bit,TSCL_B_VIDYO_4_yuv.md5\r\n+1,TSKIP_A_MS_3,TSKIP_A_MS_3.bit,TSKIP_A_MS_3.yuv.md5\r\n+3,TSUNEQBD_A_MAIN10_Technicolor_2,TSUNEQBD_A_MAIN10_Technicolor_2.bit,TSUNEQBD_A_MAIN10_Technicolor_2_yuv.md5, # unequal bit depth\r\n+1,TUSIZE_A_Samsung_1,TUSIZE_A_Samsung_1.bin,TUSIZE_A_Samsung_1.md5\r\n+1,VPSID_A_VIDYO_2,VPSID_A_VIDYO_2.bit,VPSID_A_VIDYO_2_yuv.md5\r\n+3,VPSSPSPPS_A_MainConcept_1,VPSSPSPPS_A_MainConcept_1.bin,VPSSPSPPS_A_MainConcept_1_md5.txt, # ???\r\n+1,WP_A_MAIN10_Toshiba_3,WP_A_MAIN10_Toshiba_3.bit,WP_A_MAIN10_Toshiba_3_yuv.md5\r\n+1,WP_A_Toshiba_3,WP_A_Toshiba_3.bit,WP_A_Toshiba_3_yuv.md5\r\n+1,WP_B_Toshiba_3,WP_B_Toshiba_3.bit,WP_B_Toshiba_3_yuv.md5\r\n+1,WP_MAIN10_B_Toshiba_3,WP_MAIN10_B_Toshiba_3.bit,WP_MAIN10_B_Toshiba_3_yuv.md5\r\n+1,WPP_A_ericsson_MAIN10_2,WPP_A_ericsson_MAIN10_2.bit,WPP_A_ericsson_MAIN10_yuv.md5\r\n+1,WPP_A_ericsson_MAIN_2,WPP_A_ericsson_MAIN_2.bit,WPP_A_ericsson_MAIN_2_yuv.md5\r\n+1,WPP_B_ericsson_MAIN10_2,WPP_B_ericsson_MAIN10_2.bit,WPP_B_ericsson_MAIN10_yuv.md5\r\n+1,WPP_B_ericsson_MAIN_2,WPP_B_ericsson_MAIN_2.bit,WPP_B_ericsson_MAIN_2_yuv.md5\r\n+1,WPP_C_ericsson_MAIN10_2,WPP_C_ericsson_MAIN10_2.bit,WPP_C_ericsson_MAIN10_yuv.md5\r\n+1,WPP_C_ericsson_MAIN_2,WPP_C_ericsson_MAIN_2.bit,WPP_C_ericsson_MAIN_2_yuv.md5\r\n+1,WPP_D_ericsson_MAIN10_2,WPP_D_ericsson_MAIN10_2.bit,WPP_D_ericsson_MAIN10_yuv.md5\r\n+1,WPP_D_ericsson_MAIN_2,WPP_D_ericsson_MAIN_2.bit,WPP_D_ericsson_MAIN_2_yuv.md5\r\n+1,WPP_E_ericsson_MAIN10_2,WPP_E_ericsson_MAIN10_2.bit,WPP_E_ericsson_MAIN10_yuv.md5\r\n+1,WPP_E_ericsson_MAIN_2,WPP_E_ericsson_MAIN_2.bit,WPP_E_ericsson_MAIN_2_yuv.md5\r\n+1,WPP_F_ericsson_MAIN10_2,WPP_F_ericsson_MAIN10_2.bit,WPP_F_ericsson_MAIN10_yuv.md5\r\n+1,WPP_F_ericsson_MAIN_2,WPP_F_ericsson_MAIN_2.bit,WPP_F_ericsson_MAIN_2_yuv.md5\r\ndiff --git a/pi-util/conf_h265.csv b/pi-util/conf_h265.csv\nnew file mode 100644\nindex 0000000000..fc14f2a3c2\n--- /dev/null\n+++ b/pi-util/conf_h265.csv\n@@ -0,0 +1,144 @@\n+1,ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1,ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1.bit,ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1.md5\r\n+1,AMP_A_Samsung_6,AMP_A_Samsung_6.bin,AMP_A_Samsung_6.md5\r\n+1,AMP_B_Samsung_6,AMP_B_Samsung_6.bin,AMP_B_Samsung_6.md5\r\n+1,AMP_D_Hisilicon_3,AMP_D_Hisilicon.bit,AMP_D_Hisilicon_3.yuv.md5\r\n+1,AMP_E_Hisilicon_3,AMP_E_Hisilicon.bit,AMP_E_Hisilicon_3.yuv.md5\r\n+1,AMP_F_Hisilicon_3,AMP_F_Hisilicon_3.bit,AMP_F_Hisilicon_3.yuv.md5\r\n+1,AMVP_A_MTK_4,AMVP_A_MTK_4.bit,AMVP_A_MTK_4.md5\r\n+1,AMVP_B_MTK_4,AMVP_B_MTK_4.bit,AMVP_B_MTK_4.md5\r\n+1,AMVP_C_Samsung_6,AMVP_C_Samsung_6.bin,AMVP_C_Samsung_6.md5\r\n+1,BUMPING_A_ericsson_1,BUMPING_A_ericsson_1.bit,BUMPING_A_ericsson_1.md5\r\n+1,CAINIT_A_SHARP_4,CAINIT_A_SHARP_4.bit,CAINIT_A_SHARP_4.md5\r\n+1,CAINIT_B_SHARP_4,CAINIT_B_SHARP_4.bit,CAINIT_B_SHARP_4.md5\r\n+1,CAINIT_C_SHARP_3,CAINIT_C_SHARP_3.bit,CAINIT_C_SHARP_3.md5\r\n+1,CAINIT_D_SHARP_3,CAINIT_D_SHARP_3.bit,CAINIT_D_SHARP_3.md5\r\n+1,CAINIT_E_SHARP_3,CAINIT_E_SHARP_3.bit,CAINIT_E_SHARP_3.md5\r\n+1,CAINIT_F_SHARP_3,CAINIT_F_SHARP_3.bit,CAINIT_F_SHARP_3.md5\r\n+1,CAINIT_G_SHARP_3,CAINIT_G_SHARP_3.bit,CAINIT_G_SHARP_3.md5\r\n+1,CAINIT_H_SHARP_3,CAINIT_H_SHARP_3.bit,CAINIT_H_SHARP_3.md5\r\n+1,CIP_A_Panasonic_3,CIP_A_Panasonic_3.bit,CIP_A_Panasonic_3_yuv.md5\r\n+1,cip_B_NEC_3,cip_B_NEC_3.bit,cip_B_NEC_3.md5\r\n+1,CIP_C_Panasonic_2,CIP_C_Panasonic_2.bit,CIP_C_Panasonic_2_yuv.md5\r\n+1,CONFWIN_A_Sony_1,CONFWIN_A_Sony_1.bit,CONFWIN_A_Sony_1.md5\r\n+1,DBLK_A_MAIN10_VIXS_3,DBLK_A_MAIN10_VIXS_3.bit,DBLK_A_MAIN10_VIXS_3.md5\r\n+1,DBLK_A_SONY_3,DBLK_A_SONY_3.bit,DBLK_A_SONY_3.bit.yuv.md5\r\n+1,DBLK_B_SONY_3,DBLK_B_SONY_3.bit,DBLK_B_SONY_3.bit.yuv.md5\r\n+1,DBLK_C_SONY_3,DBLK_C_SONY_3.bit,DBLK_C_SONY_3.bit.yuv.md5\r\n+1,DBLK_D_VIXS_2,DBLK_D_VIXS_2.bit,DBLK_D_VIXS_2_yuv.md5\r\n+1,DBLK_E_VIXS_2,DBLK_E_VIXS_2.bit,DBLK_E_VIXS_2_yuv.md5\r\n+1,DBLK_F_VIXS_2,DBLK_F_VIXS_2.bit,DBLK_F_VIXS_2_yuv.md5\r\n+1,DBLK_G_VIXS_2,DBLK_G_VIXS_2.bit,DBLK_G_VIXS_2_yuv.md5\r\n+1,DELTAQP_A_BRCM_4,DELTAQP_A_BRCM_4.bit,DELTAQP_A_BRCM_4_yuv.md5\r\n+1,DELTAQP_B_SONY_3,DELTAQP_B_SONY_3.bit,DELTAQP_B_SONY_3.bit.yuv.md5\r\n+1,DELTAQP_C_SONY_3,DELTAQP_C_SONY_3.bit,DELTAQP_C_SONY_3.bit.yuv.md5\r\n+1,DSLICE_A_HHI_5,DSLICE_A_HHI_5.bin,DSLICE_A_HHI_5.md5\r\n+1,DSLICE_B_HHI_5,DSLICE_B_HHI_5.bin,DSLICE_B_HHI_5.md5\r\n+1,DSLICE_C_HHI_5,DSLICE_C_HHI_5.bin,DSLICE_C_HHI_5.md5\r\n+1,ENTP_A_QUALCOMM_1,ENTP_A_Qualcomm_1.bit,ENTP_A_Qualcomm_1.md5\r\n+1,ENTP_B_Qualcomm_1,ENTP_B_Qualcomm_1.bit,ENTP_B_Qualcomm_1.md5\r\n+1,ENTP_C_Qualcomm_1,ENTP_C_Qualcomm_1.bit,ENTP_C_Qualcomm_1.md5\r\n+1,EXT_A_ericsson_4,EXT_A_ericsson_4.bit,EXT_A_ericsson_4.md5\r\n+1,FILLER_A_Sony_1,FILLER_A_Sony_1.bit,FILLER_A_Sony_1.md5\r\n+1,HRD_A_Fujitsu_3,HRD_A_Fujitsu_3.bin,HRD_A_Fujitsu_3.md5\r\n+1,INITQP_A_Sony_1,INITQP_A_Sony_1.bit,INITQP_A_Sony_1.md5\r\n+1,INITQP_B_Main10_Sony_1,INITQP_B_Main10_Sony_1.bit,INITQP_B_Main10_Sony_1.md5\r\n+1,ipcm_A_NEC_3,ipcm_A_NEC_3.bit,ipcm_A_NEC_3.md5\r\n+1,ipcm_B_NEC_3,ipcm_B_NEC_3.bit,ipcm_B_NEC_3.md5\r\n+1,ipcm_C_NEC_3,ipcm_C_NEC_3.bit,ipcm_C_NEC_3.md5\r\n+1,ipcm_D_NEC_3,ipcm_D_NEC_3.bit,ipcm_D_NEC_3.md5\r\n+1,ipcm_E_NEC_2,ipcm_E_NEC_2.bit,ipcm_E_NEC_2.md5\r\n+1,IPRED_A_docomo_2,IPRED_A_docomo_2.bit,IPRED_A_docomo_2.md5\r\n+1,IPRED_B_Nokia_3,IPRED_B_Nokia_3.bit,IPRED_B_Nokia_3_yuv.md5\r\n+1,IPRED_C_Mitsubishi_3,IPRED_C_Mitsubishi_3.bit,IPRED_C_Mitsubishi_3_yuv.md5\r\n+1,LS_A_Orange_2,LS_A_Orange_2.bit,LS_A_Orange_2_yuv.md5\r\n+1,LS_B_Orange_4,LS_B_Orange_4.bit,LS_B_Orange_4_yuv.md5\r\n+1,LTRPSPS_A_Qualcomm_1,LTRPSPS_A_Qualcomm_1.bit,LTRPSPS_A_Qualcomm_1.md5\r\n+1,MAXBINS_A_TI_4,MAXBINS_A_TI_4.bit,MAXBINS_A_TI_4.md5\r\n+1,MAXBINS_B_TI_4,MAXBINS_B_TI_4.bit,MAXBINS_B_TI_4.md5\r\n+1,MAXBINS_C_TI_4,MAXBINS_C_TI_4.bit,MAXBINS_C_TI_4.md5\r\n+1,MERGE_A_TI_3,MERGE_A_TI_3.bit,MERGE_A_TI_3.md5\r\n+1,MERGE_B_TI_3,MERGE_B_TI_3.bit,MERGE_B_TI_3.md5\r\n+1,MERGE_C_TI_3,MERGE_C_TI_3.bit,MERGE_C_TI_3.md5\r\n+1,MERGE_D_TI_3,MERGE_D_TI_3.bit,MERGE_D_TI_3.md5\r\n+1,MERGE_E_TI_3,MERGE_E_TI_3.bit,MERGE_E_TI_3.md5\r\n+1,MERGE_F_MTK_4,MERGE_F_MTK_4.bit,MERGE_F_MTK_4.md5\r\n+1,MERGE_G_HHI_4,MERGE_G_HHI_4.bit,MERGE_G_HHI_4.md5\r\n+1,MVCLIP_A_qualcomm_3,MVCLIP_A_qualcomm_3.bit,MVCLIP_A_qualcomm_3.yuv.md5\r\n+1,MVDL1ZERO_A_docomo_4,MVDL1ZERO_A_docomo_4.bit,MVDL1ZERO_A_docomo_4.md5\r\n+1,MVEDGE_A_qualcomm_3,MVEDGE_A_qualcomm_3.bit,MVEDGE_A_qualcomm_3.yuv.md5\r\n+1,NoOutPrior_A_Qualcomm_1,NoOutPrior_A_Qualcomm_1.bit,NoOutPrior_A_Qualcomm_1.md5\r\n+1,NoOutPrior_B_Qualcomm_1,NoOutPrior_B_Qualcomm_1.bit,NoOutPrior_B_Qualcomm_1.md5\r\n+1,NUT_A_ericsson_5,NUT_A_ericsson_5.bit,NUT_A_ericsson_5.md5\r\n+1,OPFLAG_A_Qualcomm_1,OPFLAG_A_Qualcomm_1.bit,OPFLAG_A_Qualcomm_1.md5\r\n+1,OPFLAG_B_Qualcomm_1,OPFLAG_B_Qualcomm_1.bit,OPFLAG_B_Qualcomm_1.md5\r\n+1,OPFLAG_C_Qualcomm_1,OPFLAG_C_Qualcomm_1.bit,OPFLAG_C_Qualcomm_1.md5\r\n+1,PICSIZE_A_Bossen_1,PICSIZE_A_Bossen_1.bin,PICSIZE_A_Bossen_1.md5\r\n+1,PICSIZE_B_Bossen_1,PICSIZE_B_Bossen_1.bin,PICSIZE_B_Bossen_1.md5\r\n+1,PICSIZE_C_Bossen_1,PICSIZE_C_Bossen_1.bin,PICSIZE_C_Bossen_1.md5\r\n+1,PICSIZE_D_Bossen_1,PICSIZE_D_Bossen_1.bin,PICSIZE_D_Bossen_1.md5\r\n+1,PMERGE_A_TI_3,PMERGE_A_TI_3.bit,PMERGE_A_TI_3.md5\r\n+1,PMERGE_B_TI_3,PMERGE_B_TI_3.bit,PMERGE_B_TI_3.md5\r\n+1,PMERGE_C_TI_3,PMERGE_C_TI_3.bit,PMERGE_C_TI_3.md5\r\n+1,PMERGE_D_TI_3,PMERGE_D_TI_3.bit,PMERGE_D_TI_3.md5\r\n+1,PMERGE_E_TI_3,PMERGE_E_TI_3.bit,PMERGE_E_TI_3.md5\r\n+1,POC_A_Bossen_3,POC_A_Bossen_3.bin,POC_A_Bossen_3.md5\r\n+1,PPS_A_qualcomm_7,PPS_A_qualcomm_7.bit,PPS_A_qualcomm_7.yuv.md5\r\n+1,PS_B_VIDYO_3,PS_B_VIDYO_3.bit,PS_B_VIDYO_3_yuv.md5\r\n+1,RAP_A_docomo_6,RAP_A_docomo_6.bit,RAP_A_docomo_6.md5\r\n+1,RAP_B_Bossen_2,RAP_B_Bossen_2.bit,RAP_B_Bossen_2.md5\r\n+1,RPLM_A_qualcomm_4,RPLM_A_qualcomm_4.bit,RPLM_A_qualcomm_4.yuv.md5\r\n+1,RPLM_B_qualcomm_4,RPLM_B_qualcomm_4.bit,RPLM_B_qualcomm_4.yuv.md5\r\n+1,RPS_A_docomo_5,RPS_A_docomo_5.bit,RPS_A_docomo_5.md5\r\n+1,RPS_B_qualcomm_5,RPS_B_qualcomm_5.bit,RPS_B_qualcomm_5.yuv.md5\r\n+1,RPS_C_ericsson_5,RPS_C_ericsson_5.bit,RPS_C_ericsson_5.md5\r\n+1,RPS_D_ericsson_6,RPS_D_ericsson_6.bit,RPS_D_ericsson_6.md5\r\n+1,RPS_E_qualcomm_5,RPS_E_qualcomm_5.bit,RPS_E_qualcomm_5.yuv.md5\r\n+1,RPS_F_docomo_2,RPS_F_docomo_2.bit,RPS_F_docomo_2.md5\r\n+1,RQT_A_HHI_4,RQT_A_HHI_4.bit,RQT_A_HHI_4.md5\r\n+1,RQT_B_HHI_4,RQT_B_HHI_4.bit,RQT_B_HHI_4.md5\r\n+1,RQT_C_HHI_4,RQT_C_HHI_4.bit,RQT_C_HHI_4.md5\r\n+1,RQT_D_HHI_4,RQT_D_HHI_4.bit,RQT_D_HHI_4.md5\r\n+1,RQT_E_HHI_4,RQT_E_HHI_4.bit,RQT_E_HHI_4.md5\r\n+1,RQT_F_HHI_4,RQT_F_HHI_4.bit,RQT_F_HHI_4.md5\r\n+1,RQT_G_HHI_4,RQT_G_HHI_4.bit,RQT_G_HHI_4.md5\r\n+1,SAO_A_MediaTek_4,SAO_A_MediaTek_4.bit,SAO_A_MediaTek_4.md5\r\n+1,SAO_B_MediaTek_5,SAO_B_MediaTek_5.bit,SAO_B_MediaTek_5.md5\r\n+1,SAO_C_Samsung_5,SAO_C_Samsung_5.bin,SAO_C_Samsung_5.md5\r\n+1,SAO_D_Samsung_5,SAO_D_Samsung_5.bin,SAO_D_Samsung_5.md5\r\n+1,SAO_E_Canon_4,SAO_E_Canon_4.bit,SAO_E_Canon_4.md5\r\n+1,SAO_F_Canon_3,SAO_F_Canon_3.bit,SAO_F_Canon_3.md5\r\n+1,SAO_G_Canon_3,SAO_G_Canon_3.bit,SAO_G_Canon_3.md5\r\n+1,SDH_A_Orange_4,SDH_A_Orange_4.bit,SDH_A_Orange_4_yuv.md5\r\n+1,SLICES_A_Rovi_3,SLICES_A_Rovi_3.bin,SLICES_A_Rovi_3.md5\r\n+1,SLIST_A_Sony_4,str.bin,SLIST_A_Sony_4_yuv.md5\r\n+1,SLIST_B_Sony_8,str.bin,SLIST_B_Sony_8_yuv.md5\r\n+1,SLIST_C_Sony_3,str.bin,SLIST_C_Sony_3_yuv.md5\r\n+1,SLIST_D_Sony_9,str.bin,SLIST_D_Sony_9_yuv.md5\r\n+1,SLPPLP_A_VIDYO_2,SLPPLP_A_VIDYO_2.bit,SLPPLP_A_VIDYO_2_yuv.md5\r\n+1,STRUCT_A_Samsung_6,STRUCT_A_Samsung_6.bin,STRUCT_A_Samsung_6.md5\r\n+1,STRUCT_B_Samsung_6,STRUCT_B_Samsung_6.bin,STRUCT_B_Samsung_6.md5\r\n+1,TILES_A_Cisco_2,TILES_A_Cisco_2.bin,TILES_A_Cisco_2_yuv.md5\r\n+1,TILES_B_Cisco_1,TILES_B_Cisco_1.bin,TILES_B_Cisco_1_yuv.md5\r\n+1,TMVP_A_MS_3,TMVP_A_MS_3.bit,TMVP_A_MS_3.yuv.md5\r\n+1,TSCL_A_VIDYO_5,TSCL_A_VIDYO_5.bit,TSCL_A_VIDYO_5_yuv.md5\r\n+1,TSCL_B_VIDYO_4,TSCL_B_VIDYO_4.bit,TSCL_B_VIDYO_4_yuv.md5\r\n+1,TSKIP_A_MS_3,TSKIP_A_MS_3.bit,TSKIP_A_MS_3.yuv.md5\r\n+0,TSUNEQBD_A_MAIN10_Technicolor_2,TSUNEQBD_A_MAIN10_Technicolor_2.bit,TSUNEQBD_A_MAIN10_Technicolor_2_yuv.md5, # Y/C bit depth unmatched\r\n+1,TUSIZE_A_Samsung_1,TUSIZE_A_Samsung_1.bin,TUSIZE_A_Samsung_1.md5\r\n+1,VPSID_A_VIDYO_2,VPSID_A_VIDYO_2.bit,VPSID_A_VIDYO_2_yuv.md5\r\n+1,WP_A_MAIN10_Toshiba_3,WP_A_MAIN10_Toshiba_3.bit,WP_A_MAIN10_Toshiba_3_yuv.md5\r\n+1,WP_A_Toshiba_3,WP_A_Toshiba_3.bit,WP_A_Toshiba_3_yuv.md5\r\n+1,WP_B_Toshiba_3,WP_B_Toshiba_3.bit,WP_B_Toshiba_3_yuv.md5\r\n+1,WP_MAIN10_B_Toshiba_3,WP_MAIN10_B_Toshiba_3.bit,WP_MAIN10_B_Toshiba_3_yuv.md5\r\n+1,WPP_A_ericsson_MAIN10_2,WPP_A_ericsson_MAIN10_2.bit,WPP_A_ericsson_MAIN10_yuv.md5\r\n+1,WPP_A_ericsson_MAIN_2,WPP_A_ericsson_MAIN_2.bit,WPP_A_ericsson_MAIN_2_yuv.md5\r\n+1,WPP_B_ericsson_MAIN10_2,WPP_B_ericsson_MAIN10_2.bit,WPP_B_ericsson_MAIN10_yuv.md5\r\n+1,WPP_B_ericsson_MAIN_2,WPP_B_ericsson_MAIN_2.bit,WPP_B_ericsson_MAIN_2_yuv.md5\r\n+1,WPP_C_ericsson_MAIN10_2,WPP_C_ericsson_MAIN10_2.bit,WPP_C_ericsson_MAIN10_yuv.md5\r\n+1,WPP_C_ericsson_MAIN_2,WPP_C_ericsson_MAIN_2.bit,WPP_C_ericsson_MAIN_2_yuv.md5\r\n+1,WPP_D_ericsson_MAIN10_2,WPP_D_ericsson_MAIN10_2.bit,WPP_D_ericsson_MAIN10_yuv.md5\r\n+1,WPP_D_ericsson_MAIN_2,WPP_D_ericsson_MAIN_2.bit,WPP_D_ericsson_MAIN_2_yuv.md5\r\n+1,WPP_E_ericsson_MAIN10_2,WPP_E_ericsson_MAIN10_2.bit,WPP_E_ericsson_MAIN10_yuv.md5\r\n+1,WPP_E_ericsson_MAIN_2,WPP_E_ericsson_MAIN_2.bit,WPP_E_ericsson_MAIN_2_yuv.md5\r\n+1,WPP_F_ericsson_MAIN10_2,WPP_F_ericsson_MAIN10_2.bit,WPP_F_ericsson_MAIN10_yuv.md5\r\n+1,WPP_F_ericsson_MAIN_2,WPP_F_ericsson_MAIN_2.bit,WPP_F_ericsson_MAIN_2_yuv.md5\r\ndiff --git a/pi-util/conf_native.sh b/pi-util/conf_native.sh\nnew file mode 100755\nindex 0000000000..5fb69ccee2\n--- /dev/null\n+++ b/pi-util/conf_native.sh\n@@ -0,0 +1,127 @@\n+echo \"Configure for native build\"\n+\n+FFSRC=`pwd`\n+MC=`dpkg --print-architecture`\n+BUILDBASE=$FFSRC/out\n+\n+#RPI_KEEPS=\"-save-temps=obj\"\n+RPI_KEEPS=\"\"\n+\n+NOSHARED=\n+MMAL=\n+USR_PREFIX=\n+\n+while [ \"$1\" != \"\" ] ; do\n+    case $1 in\n+\t--noshared)\n+\t    NOSHARED=1\n+\t    ;;\n+\t--mmal)\n+\t    MMAL=1\n+\t    ;;\n+\t--usr)\n+\t    USR_PREFIX=/usr\n+\t    ;;\n+\t*)\n+\t    echo \"Usage $0: [--noshared] [--mmal] [--usr]\"\n+\t    echo \"  noshared  Build static libs and executable - good for testing\"\n+\t    echo \"  mmal      Build mmal decoders\"\n+\t    echo \"  usr       Set install prefix to /usr [default=<build-dir>/install]\"\n+\t    exit 1\n+\t    ;;\n+    esac\n+    shift\n+done\n+\n+\n+MCOPTS=\n+RPI_INCLUDES=\n+RPI_LIBDIRS=\n+RPI_DEFINES=\n+RPI_EXTRALIBS=\n+\n+# uname -m gives kernel type which may not have the same\n+# 32/64bitness as userspace :-( getconf shoudl provide the answer\n+# but use uname to check we are on the right processor\n+MC=`uname -m`\n+LB=`getconf LONG_BIT`\n+if [ \"$MC\" == \"armv7l\" ] || [ \"$MC\" == \"aarch64\" ]; then\n+  if [ \"$LB\" == \"32\" ]; then\n+    echo \"M/C armv7\"\n+    A=arm-linux-gnueabihf\n+    B=armv7\n+    MCOPTS=\"--arch=armv6t2 --cpu=cortex-a7\"\n+    RPI_DEFINES=-mfpu=neon-vfpv4\n+  elif [ \"$LB\" == \"64\" ]; then\n+    echo \"M/C aarch64\"\n+    A=aarch64-linux-gnu\n+    B=arm64\n+  else\n+    echo \"Unknown LONG_BIT name: $LB\"\n+    exit 1\n+  fi\n+else\n+  echo \"Unknown machine name: $MC\"\n+  exit 1\n+fi\n+\n+if [ $MMAL ]; then\n+  RPI_OPT_VC=/opt/vc\n+  RPI_INCLUDES=\"-I$RPI_OPT_VC/include -I$RPI_OPT_VC/include/interface/vcos/pthreads -I$RPI_OPT_VC/include/interface/vmcs_host/linux\"\n+  RPI_LIBDIRS=\"-L$RPI_OPT_VC/lib\"\n+  RPI_DEFINES=\"$RPI_DEFINES -D__VCCOREVER__=0x4000000\"\n+  RPI_EXTRALIBS=\"-Wl,--start-group -lbcm_host -lmmal -lmmal_util -lmmal_core -lvcos -lvcsm -lvchostif -lvchiq_arm -Wl,--end-group\"\n+  RPIOPTS=\"--enable-mmal --enable-rpi\"\n+else\n+  RPIOPTS=\"--disable-mmal --enable-sand\"\n+fi\n+\n+C=`lsb_release -sc`\n+V=`cat RELEASE`\n+\n+SHARED_LIBS=\"--enable-shared\"\n+if [ $NOSHARED ]; then\n+  SHARED_LIBS=\"--disable-shared\"\n+  OUT=$BUILDBASE/$B-$C-$V-static-rel\n+  echo Static libs\n+else\n+  echo Shared libs\n+  OUT=$BUILDBASE/$B-$C-$V-shared-rel\n+fi\n+\n+if [ ! $USR_PREFIX ]; then\n+  USR_PREFIX=$OUT/install\n+fi\n+LIB_PREFIX=$USR_PREFIX/lib/$A\n+INC_PREFIX=$USR_PREFIX/include/$A\n+\n+echo Destination directory: $OUT\n+mkdir -p $OUT\n+# Nothing under here need worry git - including this .gitignore!\n+echo \"**\" > $BUILDBASE/.gitignore\n+cd $OUT\n+\n+$FFSRC/configure \\\n+ --prefix=$USR_PREFIX\\\n+ --libdir=$LIB_PREFIX\\\n+ --incdir=$INC_PREFIX\\\n+ $MCOPTS\\\n+ --disable-stripping\\\n+ --disable-thumb\\\n+ --enable-v4l2-request\\\n+ --enable-libdrm\\\n+ --enable-vout-egl\\\n+ --enable-vout-drm\\\n+ --enable-gpl\\\n+ $SHARED_LIBS\\\n+ $RPIOPTS\\\n+ --extra-cflags=\"-ggdb $RPI_KEEPS $RPI_DEFINES $RPI_INCLUDES\"\\\n+ --extra-cxxflags=\"$RPI_DEFINES $RPI_INCLUDES\"\\\n+ --extra-ldflags=\"$RPI_LIBDIRS\"\\\n+ --extra-libs=\"$RPI_EXTRALIBS\"\\\n+ --extra-version=\"rpi\"\n+\n+echo \"Configured into $OUT\"\n+\n+# gcc option for getting asm listing\n+# -Wa,-ahls\ndiff --git a/pi-util/ffconf.py b/pi-util/ffconf.py\nnew file mode 100755\nindex 0000000000..657568014e\n--- /dev/null\n+++ b/pi-util/ffconf.py\n@@ -0,0 +1,215 @@\n+#!/usr/bin/env python3\n+\n+import string\n+import os\n+import subprocess\n+import re\n+import argparse\n+import sys\n+import csv\n+from stat import *\n+\n+CODEC_HEVC_RPI  = 1\n+HWACCEL_RPI     = 2\n+HWACCEL_DRM     = 3\n+HWACCEL_VAAPI   = 4\n+\n+def testone(fileroot, srcname, es_file, md5_file, pix, dectype, vcodec, ffmpeg_exec):\n+    hwaccel = \"\"\n+    if dectype == HWACCEL_RPI:\n+        hwaccel = \"rpi\"\n+    elif dectype == HWACCEL_DRM:\n+        hwaccel = \"drm\"\n+    elif dectype == HWACCEL_VAAPI:\n+        hwaccel = \"vaapi\"\n+\n+    pix_fmt = []\n+    if pix == \"8\":\n+        pix_fmt = [\"-pix_fmt\", \"yuv420p\"]\n+    elif pix == \"10\":\n+        pix_fmt = [\"-pix_fmt\", \"yuv420p10le\"]\n+    elif pix == \"12\":\n+        pix_fmt = [\"-pix_fmt\", \"yuv420p12le\"]\n+\n+    tmp_root = \"/tmp\"\n+\n+    names = srcname.split('/')\n+    while len(names) > 1:\n+        tmp_root = os.path.join(tmp_root, names[0])\n+        del names[0]\n+    name = names[0]\n+\n+    if not os.path.exists(tmp_root):\n+        os.makedirs(tmp_root)\n+\n+    dec_file = os.path.join(tmp_root, name + \".dec.md5\")\n+    try:\n+        os.remove(dec_file)\n+    except:\n+        pass\n+\n+    flog = open(os.path.join(tmp_root, name + \".log\"), \"wt\")\n+\n+    ffargs = [ffmpeg_exec, \"-flags\", \"unaligned\", \"-hwaccel\", hwaccel, \"-vcodec\", \"hevc\", \"-i\", os.path.join(fileroot, es_file)] + pix_fmt + [\"-f\", \"md5\", dec_file]\n+\n+    # Unaligned needed for cropping conformance\n+    if hwaccel:\n+        rstr = subprocess.call(ffargs, stdout=flog, stderr=subprocess.STDOUT)\n+    else:\n+        rstr = subprocess.call(\n+            [ffmpeg_exec, \"-flags\", \"unaligned\", \"-vcodec\", vcodec, \"-i\", os.path.join(fileroot, es_file), \"-f\", \"md5\", dec_file],\n+            stdout=flog, stderr=subprocess.STDOUT)\n+\n+    try:\n+        m1 = None\n+        m2 = None\n+        with open(os.path.join(fileroot, md5_file)) as f:\n+            for line in f:\n+                m1 = re.search(\"[0-9a-f]{32}\", line.lower())\n+                if m1:\n+                    break\n+\n+        with open(dec_file) as f:\n+            m2 = re.search(\"[0-9a-f]{32}\", f.readline())\n+    except:\n+        pass\n+\n+    if  m1 and m2 and m1.group() == m2.group():\n+        print(\"Match: \" + m1.group(), file=flog)\n+        rv = 0\n+    elif not m1:\n+        print(\"****** Cannot find m1\", file=flog)\n+        rv = 3\n+    elif not m2:\n+        print(\"****** Cannot find m2\", file=flog)\n+        rv = 2\n+    else:\n+        print(\"****** Mismatch: \" + m1.group() + \" != \" + m2.group(), file=flog)\n+        rv = 1\n+    flog.close()\n+    return rv\n+\n+def scandir(root):\n+    aconf = []\n+    ents = os.listdir(root)\n+    ents.sort(key=str.lower)\n+    for name in ents:\n+        test_path = os.path.join(root, name)\n+        if S_ISDIR(os.stat(test_path).st_mode):\n+            files = os.listdir(test_path)\n+            es_file = \"?\"\n+            md5_file = \"?\"\n+            for f in files:\n+                (base, ext) = os.path.splitext(f)\n+                if base[0] == '.':\n+                    pass\n+                elif ext == \".bit\" or ext == \".bin\":\n+                    es_file = f\n+                elif ext == \".md5\" or (ext == \".txt\" and (base[-4:] == \"_md5\" or base[-6:] == \"md5sum\")):\n+                    if md5_file == \"?\":\n+                        md5_file = f\n+                    elif base[-3:] == \"yuv\":\n+                        md5_file = f\n+            aconf.append((1, name, es_file, md5_file))\n+    return aconf\n+\n+def runtest(name, tests):\n+    if not tests:\n+        return True\n+    for t in tests:\n+        if name[0:len(t)] == t or name.find(\"/\" + t) != -1:\n+            return True\n+    return False\n+\n+def doconf(csva, tests, test_root, vcodec, dectype, ffmpeg_exec):\n+    unx_failures = []\n+    unx_success = []\n+    failures = 0\n+    successes = 0\n+    for a in csva:\n+        exp_test = int(a[0])\n+        if (exp_test and runtest(a[1], tests)):\n+            name = a[1]\n+            print (\"==== \", name, end=\"\")\n+            sys.stdout.flush()\n+\n+            rv = testone(os.path.join(test_root, name), name, a[2], a[3], a[4], dectype=dectype, vcodec=vcodec, ffmpeg_exec=ffmpeg_exec)\n+            if (rv == 0):\n+                successes += 1\n+            else:\n+                failures += 1\n+\n+            if (rv == 0):\n+                if exp_test == 2:\n+                    print(\": * OK *\")\n+                    unx_success.append(name)\n+                else:\n+                    print(\": ok\")\n+            elif exp_test == 2 and rv == 1:\n+                print(\": fail\")\n+            elif exp_test == 3 and rv == 2:\n+                # Call an expected \"crash\" an abort\n+                print(\": abort\")\n+            else:\n+                unx_failures.append(name)\n+                if rv == 1:\n+                    print(\": * FAIL *\")\n+                elif (rv == 2) :\n+                    print(\": * CRASH *\")\n+                elif (rv == 3) :\n+                    print(\": * MD5 MISSING *\")\n+                else :\n+                    print(\": * BANG *\")\n+\n+    if unx_failures or unx_success:\n+        print(\"Unexpected Failures:\", unx_failures)\n+        print(\"Unexpected Success: \", unx_success)\n+    else:\n+        print(\"All tests normal:\", successes, \"ok,\", failures, \"failed\")\n+\n+\n+class ConfCSVDialect(csv.Dialect):\n+    delimiter = ','\n+    doublequote = True\n+    lineterminator = '\\n'\n+    quotechar='\"'\n+    quoting = csv.QUOTE_MINIMAL\n+    skipinitialspace = True\n+    strict = True\n+\n+if __name__ == '__main__':\n+\n+    argp = argparse.ArgumentParser(description=\"FFmpeg h265 conformance tester\")\n+    argp.add_argument(\"tests\", nargs='*')\n+    argp.add_argument(\"--pi4\", action='store_true', help=\"Force pi4 cmd line\")\n+    argp.add_argument(\"--drm\", action='store_true', help=\"Force v4l2 drm cmd line\")\n+    argp.add_argument(\"--vaapi\", action='store_true', help=\"Force vaapi cmd line\")\n+    argp.add_argument(\"--test_root\", default=\"/opt/conform/h265.2016\", help=\"Root dir for test\")\n+    argp.add_argument(\"--csvgen\", action='store_true', help=\"Generate CSV file for dir\")\n+    argp.add_argument(\"--csv\", default=\"pi-util/conf_h265.2016.csv\", help=\"CSV filename\")\n+    argp.add_argument(\"--vcodec\", default=\"hevc_rpi\", help=\"vcodec name to use\")\n+    argp.add_argument(\"--ffmpeg\", default=\"./ffmpeg\", help=\"ffmpeg exec name\")\n+    args = argp.parse_args()\n+\n+    if args.csvgen:\n+        csv.writer(sys.stdout).writerows(scandir(args.test_root))\n+        exit(0)\n+\n+    with open(args.csv, 'rt') as csvfile:\n+        csva = [a for a in csv.reader(csvfile, ConfCSVDialect())]\n+\n+    dectype = CODEC_HEVC_RPI\n+    if os.path.exists(\"/dev/rpivid-hevcmem\"):\n+        dectype = HWACCEL_RPI\n+    if args.drm or os.path.exists(\"/sys/module/rpivid_hevc\"):\n+        dectype = HWACCEL_DRM\n+\n+    if args.pi4:\n+        dectype = HWACCEL_RPI\n+    elif args.drm:\n+        dectype = HWACCEL_DRM\n+    elif args.vaapi:\n+        dectype = HWACCEL_VAAPI\n+\n+    doconf(csva, args.tests, args.test_root, args.vcodec, dectype, args.ffmpeg)\n+\ndiff --git a/pi-util/ffperf.py b/pi-util/ffperf.py\nnew file mode 100755\nindex 0000000000..65c5224cd8\n--- /dev/null\n+++ b/pi-util/ffperf.py\n@@ -0,0 +1,128 @@\n+#!/usr/bin/env python3\n+\n+import time\n+import string\n+import os\n+import tempfile\n+import subprocess\n+import re\n+import argparse\n+import sys\n+import csv\n+from stat import *\n+\n+class tstats:\n+    close_threshold = 0.01\n+\n+    def __init__(self, stats_dict=None):\n+        if stats_dict != None:\n+            self.name = stats_dict[\"name\"]\n+            self.elapsed = float(stats_dict[\"elapsed\"])\n+            self.user = float(stats_dict[\"user\"])\n+            self.sys = float(stats_dict[\"sys\"])\n+\n+    def times_str(self):\n+        ctime = self.sys + self.user\n+        return \"time=%6.2f, cpu=%6.2f (%4.2f%%)\" % (self.elapsed, ctime, (ctime * 100.0) / self.elapsed)\n+\n+    def dict(self):\n+        return {\"name\":self.name, \"elapsed\":self.elapsed, \"user\":self.user, \"sys\":self.sys}\n+\n+    def is_close(self, other):\n+        return abs(self.elapsed - other.elapsed) / self.elapsed < self.close_threshold\n+\n+    def __lt__(self, other):\n+        return self.elapsed < other.elapsed\n+    def __gt__(self, other):\n+        return self.elapsed > other.elapsed\n+\n+    def time_file(name, prefix, ffmpeg=\"./ffmpeg\"):\n+        stats = tstats()\n+        stats.name = name\n+        start_time = time.clock_gettime(time.CLOCK_MONOTONIC);\n+        cproc = subprocess.Popen([ffmpeg, \"-no_cvt_hw\",\n+                                  \"-vcodec\", \"hevc_rpi\",\n+                                  \"-t\", \"30\", \"-i\", prefix + name,\n+                                  \"-f\", \"vout_rpi\", os.devnull], bufsize=-1, stdout=flog, stderr=flog);\n+        pinfo = os.wait4(cproc.pid, 0)\n+        end_time = time.clock_gettime(time.CLOCK_MONOTONIC);\n+        stats.elapsed = end_time - start_time\n+        stats.user = pinfo[2].ru_utime\n+        stats.sys = pinfo[2].ru_stime\n+        return stats\n+\n+\n+def common_prefix(s1, s2):\n+    for i in range(min(len(s1),len(s2))):\n+        if s1[i] != s2[i]:\n+            return s1[:i]\n+    return s1[:i+1]\n+\n+def main():\n+    global flog\n+\n+    argp = argparse.ArgumentParser(description=\"FFmpeg performance tester\", epilog=\"\"\"\n+To blank the screen before starting use \"xdg-screensaver activate\"\n+(For some reason this doesn't seem to work from within python).\n+\"\"\")\n+\n+    argp.add_argument(\"streams\", nargs='*')\n+    argp.add_argument(\"--csv_out\", default=\"ffperf_out.csv\", help=\"CSV output filename\")\n+    argp.add_argument(\"--csv_in\", help=\"CSV input filename\")\n+    argp.add_argument(\"--prefix\", help=\"Filename prefix (include terminal '/' if a directory).\")\n+    argp.add_argument(\"--repeat\", default=3, type=int, help=\"Run repeat count\")\n+    argp.add_argument(\"--ffmpeg\", default=\"./ffmpeg\", help=\"FFmpeg executable\")\n+\n+    args = argp.parse_args()\n+\n+    csv_out = csv.DictWriter(open(args.csv_out, 'w', newline=''), [\"name\", \"elapsed\", \"user\", \"sys\"])\n+    csv_out.writeheader()\n+\n+    stats_in = {}\n+    if args.csv_in != None:\n+        with open(args.csv_in, 'r', newline='') as f_in:\n+            stats_in = {x[\"name\"]:tstats(x) for x in csv.DictReader(f_in)}\n+\n+    flog = open(os.path.join(tempfile.gettempdir(), \"ffperf.log\"), \"wt\")\n+\n+    streams = args.streams\n+    if not streams:\n+        if not stats_in:\n+            print (\"No source streams specified\")\n+            return 1\n+        prefix = \"\" if args.prefix == None else args.prefix\n+        streams = [k for k in stats_in]\n+    elif args.prefix != None:\n+        prefix = args.prefix\n+    else:\n+        prefix = streams[0]\n+        for f in streams[1:]:\n+            prefix = common_prefix(prefix, f)\n+        pp = prefix.rpartition(os.sep)\n+        prefix = pp[0] + pp[1]\n+        streams = [s[len(prefix):] for s in streams]\n+\n+    for f in sorted(streams, key=lambda x : \"~\" * x.count(os.sep) + x.lower()):\n+        print (\"====\", f)\n+\n+        t0 = tstats({\"name\":f, \"elapsed\":999, \"user\":999, \"sys\":999})\n+        for i in range(args.repeat):\n+            t = tstats.time_file(f, prefix, args.ffmpeg)\n+            print (\"...\", t.times_str())\n+            if t0 > t:\n+                t0 = t\n+\n+        if t0.name in stats_in:\n+            pstat = stats_in[t0.name]\n+            print(\"---\" if pstat.is_close(t0) else \"<<<\" if t0 < pstat else \">>>\", pstat.times_str())\n+\n+        csv_out.writerow(t0.dict())\n+\n+        print ()\n+\n+    return 0\n+\n+\n+if __name__ == '__main__':\n+    exit(main())\n+\ndiff --git a/pi-util/genpatch.sh b/pi-util/genpatch.sh\nnew file mode 100755\nindex 0000000000..0948a68a7a\n--- /dev/null\n+++ b/pi-util/genpatch.sh\n@@ -0,0 +1,35 @@\n+set -e\n+\n+NOPATCH=\n+if [ \"$1\" == \"--notag\" ]; then\n+  shift\n+  NOPATCH=1\n+fi\n+\n+if [ \"$1\" == \"\" ]; then\n+  echo Usage: $0 [--notag] \\<patch_tag\\>\n+  echo e.g.: $0 mmal_4\n+  exit 1\n+fi\n+\n+VERSION=`cat RELEASE`\n+if [ \"$VERSION\" == \"\" ]; then\n+  echo Can\\'t find version RELEASE\n+  exit 1\n+fi\n+\n+PATCHFILE=../ffmpeg-$VERSION-$1.patch\n+\n+if [ $NOPATCH ]; then\n+  echo Not tagged\n+else\n+  # Only continue if we are all comitted\n+  git diff --name-status --exit-code\n+\n+  PATCHTAG=pi/$VERSION/$1\n+  echo Tagging: $PATCHTAG\n+\n+  git tag $PATCHTAG\n+fi\n+echo Generating patch: $PATCHFILE\n+git diff n$VERSION -- > $PATCHFILE\ndiff --git a/pi-util/make_array.py b/pi-util/make_array.py\nnew file mode 100755\nindex 0000000000..67b22d2d51\n--- /dev/null\n+++ b/pi-util/make_array.py\n@@ -0,0 +1,23 @@\n+#!/usr/bin/env python\n+\n+# Usage\n+#   make_array file.bin\n+#   Produces file.h with array of bytes.\n+#\n+import sys\n+for file in sys.argv[1:]:\n+  prefix,suffix = file.split('.')\n+  assert suffix=='bin'\n+  name=prefix.split('/')[-1]\n+  print 'Converting',file\n+  with open(prefix+'.h','wb') as out:\n+    print >>out, 'static const unsigned char',name,'[] = {'\n+    with open(file,'rb') as fd:\n+      i = 0\n+      for byte in fd.read():\n+        print >>out, '0x%02x, ' % ord(byte),\n+        i = i + 1\n+        if i % 8 == 0:\n+          print >>out, ' // %04x' % (i - 8)\n+    print >>out,'};'\n+\ndiff --git a/pi-util/mkinst.sh b/pi-util/mkinst.sh\nnew file mode 100755\nindex 0000000000..271a39e846\n--- /dev/null\n+++ b/pi-util/mkinst.sh\n@@ -0,0 +1,5 @@\n+set -e\n+\n+make install\n+\n+cp -r install/* ../vlc/sysroot/raspian_stretch_pi1-sysroot/usr\ndiff --git a/pi-util/patkodi.sh b/pi-util/patkodi.sh\nnew file mode 100644\nindex 0000000000..dcd05a606e\n--- /dev/null\n+++ b/pi-util/patkodi.sh\n@@ -0,0 +1,9 @@\n+set -e\n+KODIBASE=/home/jc/rpi/kodi/xbmc\n+JOBS=-j20\n+make $JOBS\n+git diff xbmc/release/4.3-kodi > $KODIBASE/tools/depends/target/ffmpeg/pfcd_hevc_optimisations.patch\n+make -C $KODIBASE/tools/depends/target/ffmpeg $JOBS\n+make -C $KODIBASE/build install\n+\n+\ndiff --git a/pi-util/perfcmp.py b/pi-util/perfcmp.py\nnew file mode 100755\nindex 0000000000..e44cfa0c3c\n--- /dev/null\n+++ b/pi-util/perfcmp.py\n@@ -0,0 +1,101 @@\n+#!/usr/bin/env python3\n+\n+import time\n+import string\n+import os\n+import tempfile\n+import subprocess\n+import re\n+import argparse\n+import sys\n+import csv\n+from stat import *\n+\n+class tstats:\n+    close_threshold = 0.01\n+\n+    def __init__(self, stats_dict=None):\n+        if stats_dict != None:\n+            self.name = stats_dict[\"name\"]\n+            self.elapsed = float(stats_dict[\"elapsed\"])\n+            self.user = float(stats_dict[\"user\"])\n+            self.sys = float(stats_dict[\"sys\"])\n+\n+    def times_str(self):\n+        ctime = self.sys + self.user\n+        return \"time=%6.2f, cpu=%6.2f (%4.2f%%)\" % (self.elapsed, ctime, (ctime * 100.0) / self.elapsed)\n+\n+    def dict(self):\n+        return {\"name\":self.name, \"elapsed\":self.elapsed, \"user\":self.user, \"sys\":self.sys}\n+\n+    def is_close(self, other):\n+        return abs(self.elapsed - other.elapsed) / self.elapsed < self.close_threshold\n+\n+    def __lt__(self, other):\n+        return self.elapsed < other.elapsed\n+    def __gt__(self, other):\n+        return self.elapsed > other.elapsed\n+\n+    def time_file(name, prefix):\n+        stats = tstats()\n+        stats.name = name\n+        start_time = time.clock_gettime(time.CLOCK_MONOTONIC);\n+        cproc = subprocess.Popen([\"./ffmpeg\", \"-t\", \"30\", \"-i\", prefix + name,\n+                                  \"-f\", \"null\", os.devnull], bufsize=-1, stdout=flog, stderr=flog);\n+        pinfo = os.wait4(cproc.pid, 0)\n+        end_time = time.clock_gettime(time.CLOCK_MONOTONIC);\n+        stats.elapsed = end_time - start_time\n+        stats.user = pinfo[2].ru_utime\n+        stats.sys = pinfo[2].ru_stime\n+        return stats\n+\n+\n+def common_prefix(s1, s2):\n+    for i in range(min(len(s1),len(s2))):\n+        if s1[i] != s2[i]:\n+            return s1[:i]\n+    return s1[:i+1]\n+\n+def main():\n+    argp = argparse.ArgumentParser(description=\"FFmpeg performance compare\")\n+\n+    argp.add_argument(\"stream0\", help=\"CSV to compare\")\n+    argp.add_argument(\"stream1\", nargs='?', default=\"ffperf_out.csv\", help=\"CSV to compare\")\n+\n+    args = argp.parse_args()\n+\n+    with open(args.stream0, 'r', newline='') as f_in:\n+        stats0 = {x[\"name\"]:tstats(x) for x in csv.DictReader(f_in)}\n+    with open(args.stream1, 'r', newline='') as f_in:\n+        stats1 = {x[\"name\"]:tstats(x) for x in csv.DictReader(f_in)}\n+\n+    print (args.stream0, \"<<-->>\", args.stream1)\n+    print ()\n+\n+    for f in sorted(stats0.keys() | stats1.keys(), key=lambda x : \"~\" * x.count(os.sep) + x.lower()):\n+       if not (f in stats0) :\n+           print (\"           XX               :\", f)\n+           continue\n+       if not (f in stats1) :\n+           print (\"       XX                   :\", f)\n+           continue\n+\n+       s0 = stats0[f]\n+       s1 = stats1[f]\n+\n+       pcent = ((s0.elapsed - s1.elapsed) / s0.elapsed) * 100.0\n+       thresh = 0.3\n+       tc = 6\n+\n+       nchar = min(tc - 1, int(abs(pcent) / thresh))\n+       cc = \"  --  \" if nchar == 0 else \"<\" * nchar + \" \" * (tc - nchar) if pcent < 0 else \" \" * (tc - nchar) + \">\" * nchar\n+\n+       print (\"%6.2f %s%6.2f (%+5.2f) : %s\" %\n+           (s0.elapsed, cc, s1.elapsed, pcent, f))\n+\n+    return 0\n+\n+\n+if __name__ == '__main__':\n+    exit(main())\n+\ndiff --git a/pi-util/qem.sh b/pi-util/qem.sh\nnew file mode 100755\nindex 0000000000..a4dbb6eacd\n--- /dev/null\n+++ b/pi-util/qem.sh\n@@ -0,0 +1,9 @@\n+TARGET_DIR=../src/eupton_vc4dev_2012a/software/vc4/DEV/applications/tutorials/user_shader_example_tex\n+QASM=python\\ ../local/bin/qasm.py\n+SRC_FILE=libavcodec/rpi_hevc_shader.qasm\n+DST_BASE=shader\n+\n+cp libavcodec/rpi_hevc_shader_cmd.h $TARGET_DIR\n+$QASM -mc_c:$DST_BASE,$DST_BASE,$DST_BASE $SRC_FILE > $TARGET_DIR/$DST_BASE.c\n+$QASM -mc_h:$DST_BASE,$DST_BASE,$DST_BASE $SRC_FILE > $TARGET_DIR/$DST_BASE.h\n+\ndiff --git a/pi-util/testfilt.py b/pi-util/testfilt.py\nnew file mode 100755\nindex 0000000000..b322dac0c2\n--- /dev/null\n+++ b/pi-util/testfilt.py\n@@ -0,0 +1,83 @@\n+#!/usr/bin/env python3\n+\n+import string\n+import os\n+import subprocess\n+import re\n+import argparse\n+import sys\n+import csv\n+from stat import *\n+\n+class validator:\n+    def __init__(self):\n+        self.ok = False\n+\n+    def isok(self):\n+        return self.ok\n+\n+    def setok(self):\n+        self.ok = True\n+\n+class valid_regex(validator):\n+    def __init__(self, regex):\n+        super().__init__()\n+        self.regex = re.compile(regex)\n+\n+    def scanline(self, line):\n+        if self.isok() or self.regex.search(line):\n+            self.setok()\n+\n+\n+def validate(validators, flog):\n+    for line in flog:\n+        for v in validators:\n+            v.scanline(line)\n+\n+    ok = True\n+    for v in validators:\n+        if not v.isok():\n+            ok = False\n+            # complain\n+            print(\"Test failed\")\n+\n+    if ok:\n+        print(\"OK\")\n+    return ok\n+\n+def runtest(name, ffmpeg, args, suffix, validators):\n+    log_root = os.path.join(\"/tmp\", \"testfilt\", name)\n+    ofilename = os.path.join(log_root, name + suffix)\n+\n+    if not os.path.exists(log_root):\n+        os.makedirs(log_root)\n+\n+    try:\n+        os.remove(ofilename)\n+    except:\n+        pass\n+\n+    flog = open(os.path.join(log_root, name + \".log\"), \"wb\")\n+    ffargs = [ffmpeg] + args + [ofilename]\n+\n+    subprocess.call(ffargs, stdout=flog, stderr=subprocess.STDOUT, text=False)\n+    flog.close\n+\n+    flog = open(os.path.join(log_root, name + \".log\"), \"rt\")\n+    return validate(validators, flog)\n+\n+def sayok(log_root, flog):\n+    print(\"Woohoo\")\n+    return True\n+\n+if __name__ == '__main__':\n+\n+    argp = argparse.ArgumentParser(description=\"FFmpeg filter tester\")\n+    argp.add_argument(\"--ffmpeg\", default=\"./ffmpeg\", help=\"ffmpeg exec name\")\n+    args = argp.parse_args()\n+\n+    runtest(\"ATest\", args.ffmpeg, [\"-v\", \"verbose\", \"-no_cvt_hw\", \"-an\", \"-c:v\", \"h264_v4l2m2m\", \"-i\",\n+                                   \"/home/johncox/server/TestMedia/Sony/jellyfish-10-mbps-hd-h264.mkv\",\n+#                                    \"/home/jc/rpi/streams/jellyfish-3-mbps-hd-h264.mkv\",\n+                                   \"-c:v\", \"h264_v4l2m2m\", \"-b:v\", \"2M\"], \".mkv\",\n+            [valid_regex(r'Output stream #0:0 \\(video\\): 900 frames encoded; 900 packets muxed')])\ndiff --git a/pi-util/v3dusage.py b/pi-util/v3dusage.py\nnew file mode 100755\nindex 0000000000..5935a11ca5\n--- /dev/null\n+++ b/pi-util/v3dusage.py\n@@ -0,0 +1,128 @@\n+#!/usr/bin/env python\n+\n+import sys\n+import argparse\n+import re\n+\n+def do_logparse(logname):\n+\n+    rmatch = re.compile(r'^([0-9]+\\.[0-9]{3}): (done )?((vpu0)|(vpu1)|(qpu1)) ([A-Z_]+) cb:([0-9a-f]+) ')\n+    rqcycle = re.compile(r'^([0-9]+\\.[0-9]{3}): v3d: QPU Total clock cycles for all QPUs doing vertex/coordinate shading +([0-9]+)$')\n+    rqtscycle = re.compile(r'^([0-9]+\\.[0-9]{3}): v3d: QPU Total clock cycles for all QPUs stalled waiting for TMUs +([0-9]+)$')\n+    rl2hits = re.compile(r'^([0-9]+\\.[0-9]{3}): v3d: L2C Total Level 2 cache ([a-z]+) +([0-9]+)$')\n+\n+    ttotal = {'idle':0.0}\n+    tstart = {}\n+    qctotal = {}\n+    qtstotal = {}\n+    l2hits = {}\n+    l2total = {}\n+    time0 = None\n+    idle_start = None\n+    qpu_op_no = 0\n+    op_count = 0\n+\n+    with open(logname, \"rt\") as infile:\n+        for line in infile:\n+            match = rmatch.match(line)\n+            if match:\n+#                print match.group(1), \":\", match.group(2), \":\", match.group(3), \":\", match.group(7), \":\"\n+                time = float(match.group(1))\n+                unit = match.group(3)\n+                opstart = not match.group(2)\n+                optype = match.group(7)\n+                hascb = match.group(8) != \"0\"\n+\n+                if unit == 'qpu1':\n+                    unit = unit + \".\" + str(qpu_op_no)\n+                    if not opstart:\n+                        if hascb or optype == 'EXECUTE_SYNC':\n+                            qpu_op_no = 0\n+                        else:\n+                            qpu_op_no += 1\n+\n+                # Ignore sync type\n+                if optype == 'EXECUTE_SYNC':\n+                    continue\n+\n+                if not time0:\n+                    time0 = time\n+\n+                if opstart:\n+                    tstart[unit] = time;\n+                elif unit in tstart:\n+                    op_count += 1\n+                    if not unit in ttotal:\n+                        ttotal[unit] = 0.0\n+                    ttotal[unit] += time - tstart[unit]\n+                    del tstart[unit]\n+\n+                if not idle_start and not tstart:\n+                    idle_start = time\n+                elif idle_start and tstart:\n+                    ttotal['idle'] += time - idle_start\n+                    idle_start = None\n+\n+            match = rqcycle.match(line)\n+            if match:\n+                unit = \"qpu1.\" + str(qpu_op_no)\n+                if not unit in qctotal:\n+                    qctotal[unit] = 0\n+                qctotal[unit] += int(match.group(2))\n+\n+            match = rqtscycle.match(line)\n+            if match:\n+                unit = \"qpu1.\" + str(qpu_op_no)\n+                if not unit in qtstotal:\n+                    qtstotal[unit] = 0\n+                qtstotal[unit] += int(match.group(2))\n+\n+            match = rl2hits.match(line)\n+            if match:\n+                unit = \"qpu1.\" + str(qpu_op_no)\n+                if not unit in l2total:\n+                    l2total[unit] = 0\n+                    l2hits[unit] = 0\n+                l2total[unit] += int(match.group(3))\n+                if match.group(2) == \"hits\":\n+                    l2hits[unit] += int(match.group(3))\n+\n+\n+    if not time0:\n+        print \"No v3d profile records found\"\n+    else:\n+        tlogged = time - time0\n+\n+        print \"Logged time:\", tlogged, \"  Op count:\", op_count\n+        for unit in sorted(ttotal):\n+            print b'%6s: %10.3f    %7.3f%%' % (unit, ttotal[unit], ttotal[unit] * 100.0 / tlogged)\n+        print\n+        for unit in sorted(qctotal):\n+            if not unit in qtstotal:\n+                qtstotal[unit] = 0;\n+            print b'%6s: Qcycles: %10d, TMU stall: %10d (%7.3f%%)' % (unit, qctotal[unit], qtstotal[unit], (qtstotal[unit] * 100.0)/qctotal[unit])\n+            if unit in l2total:\n+                print b'        L2Total: %10d, hits:      %10d (%7.3f%%)' % (l2total[unit], l2hits[unit], (l2hits[unit] * 100.0)/l2total[unit])\n+\n+\n+\n+if __name__ == '__main__':\n+    argp = argparse.ArgumentParser(\n+        formatter_class=argparse.RawDescriptionHelpFormatter,\n+        description=\"QPU/VPU perf summary from VC logging\",\n+        epilog = \"\"\"\n+Will also summarise TMU stalls if logging requests set in qpu noflush param\n+in the profiled code.\n+\n+Example use:\n+  vcgencmd set_logging level=0xc0\n+  <command to profile>\n+  sudo vcdbg log msg >& t.log\n+  v3dusage.py t.log\n+\"\"\")\n+\n+    argp.add_argument(\"logfile\")\n+    args = argp.parse_args()\n+\n+    do_logparse(args.logfile)\n+\ndiff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile\nindex 1827a4e134..3c765a5eb1 100644\n--- a/tests/checkasm/Makefile\n+++ b/tests/checkasm/Makefile\n@@ -9,8 +9,10 @@ AVCODECOBJS-$(CONFIG_G722DSP)           += g722dsp.o\n AVCODECOBJS-$(CONFIG_H264DSP)           += h264dsp.o\n AVCODECOBJS-$(CONFIG_H264PRED)          += h264pred.o\n AVCODECOBJS-$(CONFIG_H264QPEL)          += h264qpel.o\n+AVCODECOBJS-$(CONFIG_IDCTDSP)           += idctdsp.o\n AVCODECOBJS-$(CONFIG_LLVIDDSP)          += llviddsp.o\n AVCODECOBJS-$(CONFIG_LLVIDENCDSP)       += llviddspenc.o\n+AVCODECOBJS-$(CONFIG_VC1DSP)            += vc1dsp.o\n AVCODECOBJS-$(CONFIG_VP8DSP)            += vp8dsp.o\n AVCODECOBJS-$(CONFIG_VIDEODSP)          += videodsp.o\n \n@@ -35,6 +37,7 @@ CHECKASMOBJS-$(CONFIG_AVCODEC)          += $(AVCODECOBJS-yes)\n # libavfilter tests\n AVFILTEROBJS-$(CONFIG_AFIR_FILTER) += af_afir.o\n AVFILTEROBJS-$(CONFIG_BLEND_FILTER) += vf_blend.o\n+AVFILTEROBJS-$(CONFIG_BWDIF_FILTER)      += vf_bwdif.o\n AVFILTEROBJS-$(CONFIG_COLORSPACE_FILTER) += vf_colorspace.o\n AVFILTEROBJS-$(CONFIG_EQ_FILTER)         += vf_eq.o\n AVFILTEROBJS-$(CONFIG_GBLUR_FILTER)      += vf_gblur.o\n@@ -52,8 +55,9 @@ CHECKASMOBJS-$(CONFIG_SWSCALE)  += $(SWSCALEOBJS)\n # libavutil tests\n AVUTILOBJS                              += fixed_dsp.o\n AVUTILOBJS                              += float_dsp.o\n+AVUTILOBJS-$(CONFIG_SAND)               += rpi_sand.o\n \n-CHECKASMOBJS-$(CONFIG_AVUTIL)  += $(AVUTILOBJS)\n+CHECKASMOBJS-$(CONFIG_AVUTIL)  += $(AVUTILOBJS) $(AVUTILOBJS-yes)\n \n CHECKASMOBJS-$(ARCH_AARCH64)            += aarch64/checkasm.o\n CHECKASMOBJS-$(HAVE_ARMV5TE_EXTERNAL)   += arm/checkasm.o\ndiff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c\nindex 8338e8ff58..c1ee09c72e 100644\n--- a/tests/checkasm/checkasm.c\n+++ b/tests/checkasm/checkasm.c\n@@ -131,6 +131,9 @@ static const struct {\n     #if CONFIG_HUFFYUV_DECODER\n         { \"huffyuvdsp\", checkasm_check_huffyuvdsp },\n     #endif\n+    #if CONFIG_IDCTDSP\n+        { \"idctdsp\", checkasm_check_idctdsp },\n+    #endif\n     #if CONFIG_JPEG2000_DECODER\n         { \"jpeg2000dsp\", checkasm_check_jpeg2000dsp },\n     #endif\n@@ -155,6 +158,9 @@ static const struct {\n     #if CONFIG_V210_ENCODER\n         { \"v210enc\", checkasm_check_v210enc },\n     #endif\n+    #if CONFIG_VC1DSP\n+        { \"vc1dsp\", checkasm_check_vc1dsp },\n+    #endif\n     #if CONFIG_VP8DSP\n         { \"vp8dsp\", checkasm_check_vp8dsp },\n     #endif\n@@ -172,6 +178,9 @@ static const struct {\n     #if CONFIG_BLEND_FILTER\n         { \"vf_blend\", checkasm_check_blend },\n     #endif\n+    #if CONFIG_BWDIF_FILTER\n+        { \"vf_bwdif\", checkasm_check_vf_bwdif },\n+    #endif\n     #if CONFIG_COLORSPACE_FILTER\n         { \"vf_colorspace\", checkasm_check_colorspace },\n     #endif\n@@ -198,6 +207,9 @@ static const struct {\n #if CONFIG_AVUTIL\n         { \"fixed_dsp\", checkasm_check_fixed_dsp },\n         { \"float_dsp\", checkasm_check_float_dsp },\n+    #if CONFIG_SAND\n+        { \"rpi_sand\",  checkasm_check_rpi_sand },\n+    #endif\n #endif\n     { NULL }\n };\ndiff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h\nindex ef6645e3a2..02d3642836 100644\n--- a/tests/checkasm/checkasm.h\n+++ b/tests/checkasm/checkasm.h\n@@ -70,12 +70,14 @@ void checkasm_check_hevc_epel_bi(void);\n void checkasm_check_hevc_epel_bi_w(void);\n void checkasm_check_hevc_sao(void);\n void checkasm_check_huffyuvdsp(void);\n+void checkasm_check_idctdsp(void);\n void checkasm_check_jpeg2000dsp(void);\n void checkasm_check_llviddsp(void);\n void checkasm_check_llviddspenc(void);\n void checkasm_check_nlmeans(void);\n void checkasm_check_opusdsp(void);\n void checkasm_check_pixblockdsp(void);\n+void checkasm_check_rpi_sand(void);\n void checkasm_check_sbrdsp(void);\n void checkasm_check_synth_filter(void);\n void checkasm_check_sw_rgb(void);\n@@ -83,6 +85,8 @@ void checkasm_check_sw_scale(void);\n void checkasm_check_utvideodsp(void);\n void checkasm_check_v210dec(void);\n void checkasm_check_v210enc(void);\n+void checkasm_check_vc1dsp(void);\n+void checkasm_check_vf_bwdif(void);\n void checkasm_check_vf_eq(void);\n void checkasm_check_vf_gblur(void);\n void checkasm_check_vf_hflip(void);\ndiff --git a/tests/checkasm/idctdsp.c b/tests/checkasm/idctdsp.c\nnew file mode 100644\nindex 0000000000..02724536a7\n--- /dev/null\n+++ b/tests/checkasm/idctdsp.c\n@@ -0,0 +1,98 @@\n+/*\n+ * Copyright (c) 2022 Ben Avison\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License along\n+ * with FFmpeg; if not, write to the Free Software Foundation, Inc.,\n+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n+ */\n+\n+#include <string.h>\n+\n+#include \"checkasm.h\"\n+\n+#include \"libavcodec/idctdsp.h\"\n+\n+#include \"libavutil/common.h\"\n+#include \"libavutil/internal.h\"\n+#include \"libavutil/intreadwrite.h\"\n+#include \"libavutil/mem_internal.h\"\n+\n+#define IDCTDSP_TEST(func) { #func, offsetof(IDCTDSPContext, func) },\n+\n+typedef struct {\n+    const char *name;\n+    size_t offset;\n+} test;\n+\n+#define RANDOMIZE_BUFFER16(name, size)          \\\n+    do {                                        \\\n+        int i;                                  \\\n+        for (i = 0; i < size; ++i) {            \\\n+            uint16_t r = rnd() % 0x201 - 0x100; \\\n+            AV_WN16A(name##0 + i, r);           \\\n+            AV_WN16A(name##1 + i, r);           \\\n+        }                                       \\\n+    } while (0)\n+\n+#define RANDOMIZE_BUFFER8(name, size)         \\\n+    do {                                      \\\n+        int i;                                \\\n+        for (i = 0; i < size; ++i) {          \\\n+            uint8_t r = rnd();                \\\n+            name##0[i] = r;                   \\\n+            name##1[i] = r;                   \\\n+        }                                     \\\n+    } while (0)\n+\n+static void check_add_put_clamped(void)\n+{\n+    /* Source buffers are only as big as needed, since any over-read won't affect results */\n+    LOCAL_ALIGNED_16(int16_t, src0, [64]);\n+    LOCAL_ALIGNED_16(int16_t, src1, [64]);\n+    /* Destination buffers have borders of one row above/below and 8 columns left/right to catch overflows */\n+    LOCAL_ALIGNED_8(uint8_t, dst0, [10 * 24]);\n+    LOCAL_ALIGNED_8(uint8_t, dst1, [10 * 24]);\n+\n+    AVCodecContext avctx = { 0 };\n+    IDCTDSPContext h;\n+\n+    const test tests[] = {\n+        IDCTDSP_TEST(add_pixels_clamped)\n+        IDCTDSP_TEST(put_pixels_clamped)\n+        IDCTDSP_TEST(put_signed_pixels_clamped)\n+    };\n+\n+    ff_idctdsp_init(&h, &avctx);\n+\n+    for (size_t t = 0; t < FF_ARRAY_ELEMS(tests); ++t) {\n+        void (*func)(const int16_t *, uint8_t * ptrdiff_t) = *(void **)((intptr_t) &h + tests[t].offset);\n+        if (check_func(func, \"idctdsp.%s\", tests[t].name)) {\n+            declare_func_emms(AV_CPU_FLAG_MMX, void, const int16_t *, uint8_t *, ptrdiff_t);\n+            RANDOMIZE_BUFFER16(src, 64);\n+            RANDOMIZE_BUFFER8(dst, 10 * 24);\n+            call_ref(src0, dst0 + 24 + 8, 24);\n+            call_new(src1, dst1 + 24 + 8, 24);\n+            if (memcmp(dst0, dst1, 10 * 24))\n+                fail();\n+            bench_new(src1, dst1 + 24 + 8, 24);\n+        }\n+    }\n+}\n+\n+void checkasm_check_idctdsp(void)\n+{\n+    check_add_put_clamped();\n+    report(\"idctdsp\");\n+}\ndiff --git a/tests/checkasm/rpi_sand.c b/tests/checkasm/rpi_sand.c\nnew file mode 100644\nindex 0000000000..0888714c4c\n--- /dev/null\n+++ b/tests/checkasm/rpi_sand.c\n@@ -0,0 +1,118 @@\n+/*\n+ * Copyright (c) 2023 John Cox\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License along\n+ * with FFmpeg; if not, write to the Free Software Foundation, Inc.,\n+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n+ */\n+\n+#include <string.h>\n+#include \"checkasm.h\"\n+#include \"libavutil/common.h\"\n+#include \"libavutil/rpi_sand_fns.h\"\n+\n+#if ARCH_ARM\n+#include \"libavutil/arm/cpu.h\"\n+#include \"libavutil/arm/rpi_sand_neon.h\"\n+#elif ARCH_AARCH64\n+#include \"libavutil/aarch64/cpu.h\"\n+#include \"libavutil/aarch64/rpi_sand_neon.h\"\n+#endif\n+\n+static inline uint32_t pack30(unsigned int a, unsigned int b, unsigned int c)\n+{\n+    return (a & 0x3ff) | ((b & 0x3ff) << 10) | ((c & 0x3ff) << 20);\n+}\n+\n+void checkasm_check_rpi_sand(void)\n+{\n+    const unsigned int w = 1280;\n+    const unsigned int h = 66;\n+    const unsigned int stride1 = 128;\n+    const unsigned int stride2 = h*3/2;\n+    const unsigned int ssize = ((w+95)/96)*128*h*3/2;\n+    const unsigned int ysize = ((w + 32) * (h + 32) * 2);\n+\n+    uint8_t * sbuf0 = malloc(ssize);\n+    uint8_t * sbuf1 = malloc(ssize);\n+    uint8_t * ybuf0 = malloc(ysize);\n+    uint8_t * ybuf1 = malloc(ysize);\n+    uint8_t * vbuf0 = malloc(ysize);\n+    uint8_t * vbuf1 = malloc(ysize);\n+    uint8_t * yframe0 = (w + 32) * 16 + ybuf0;\n+    uint8_t * yframe1 = (w + 32) * 16 + ybuf1;\n+    uint8_t * vframe0 = (w + 32) * 16 + vbuf0;\n+    uint8_t * vframe1 = (w + 32) * 16 + vbuf1;\n+    unsigned int i;\n+\n+    for (i = 0; i != ssize; i += 4)\n+        *(uint32_t*)(sbuf0 + i) = rnd();\n+    memcpy(sbuf1, sbuf0, ssize);\n+\n+    if (check_func(have_neon(av_get_cpu_flags()) ? ff_rpi_sand30_lines_to_planar_y16 : av_rpi_sand30_to_planar_y16, \"rpi_sand30_to_planar_y16\")) {\n+        declare_func(void, uint8_t * dst, const unsigned int dst_stride,\n+                     const uint8_t * src,\n+                     unsigned int stride1, unsigned int stride2,\n+                     unsigned int _x, unsigned int y,\n+                     unsigned int _w, unsigned int h);\n+\n+        memset(ybuf0, 0xbb, ysize);\n+        memset(ybuf1, 0xbb, ysize);\n+\n+        call_ref(yframe0, (w + 32) * 2, sbuf0, stride1, stride2, 0, 0, w, h);\n+        call_new(yframe1, (w + 32) * 2, sbuf1, stride1, stride2, 0, 0, w, h);\n+\n+        if (memcmp(sbuf0, sbuf1, ssize)\n+            || memcmp(ybuf0, ybuf1, ysize))\n+            fail();\n+\n+        bench_new(ybuf1, (w + 32) * 2, sbuf1, stride1, stride2, 0, 0, w, h);\n+    }\n+\n+    if (check_func(have_neon(av_get_cpu_flags()) ? ff_rpi_sand30_lines_to_planar_c16 : av_rpi_sand30_to_planar_c16, \"rpi_sand30_to_planar_c16\")) {\n+        declare_func(void, uint8_t * u_dst, const unsigned int u_stride,\n+                     uint8_t * v_dst, const unsigned int v_stride,\n+                     const uint8_t * src,\n+                     unsigned int stride1, unsigned int stride2,\n+                     unsigned int _x, unsigned int y,\n+                     unsigned int _w, unsigned int h);\n+\n+        memset(ybuf0, 0xbb, ysize);\n+        memset(ybuf1, 0xbb, ysize);\n+        memset(vbuf0, 0xbb, ysize);\n+        memset(vbuf1, 0xbb, ysize);\n+\n+        call_ref(yframe0, (w + 32), vframe0, (w + 32), sbuf0, stride1, stride2, 0, 0, w/2, h/2);\n+        call_new(yframe1, (w + 32), vframe1, (w + 32), sbuf1, stride1, stride2, 0, 0, w/2, h/2);\n+\n+        if (memcmp(sbuf0, sbuf1, ssize)\n+            || memcmp(ybuf0, ybuf1, ysize)\n+            || memcmp(vbuf0, vbuf1, ysize))\n+            fail();\n+\n+        bench_new(yframe1, (w + 32), vframe1, (w + 32), sbuf1, stride1, stride2, 0, 0, w/2, h/2);\n+    }\n+\n+\n+    report(\"sand30\");\n+\n+    free(sbuf0);\n+    free(sbuf1);\n+    free(ybuf0);\n+    free(ybuf1);\n+    free(vbuf0);\n+    free(vbuf1);\n+}\n+\ndiff --git a/tests/checkasm/vc1dsp.c b/tests/checkasm/vc1dsp.c\nnew file mode 100644\nindex 0000000000..52628d15e4\n--- /dev/null\n+++ b/tests/checkasm/vc1dsp.c\n@@ -0,0 +1,452 @@\n+/*\n+ * Copyright (c) 2022 Ben Avison\n+ *\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License along\n+ * with FFmpeg; if not, write to the Free Software Foundation, Inc.,\n+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n+ */\n+\n+#include <string.h>\n+\n+#include \"checkasm.h\"\n+\n+#include \"libavcodec/vc1dsp.h\"\n+\n+#include \"libavutil/common.h\"\n+#include \"libavutil/internal.h\"\n+#include \"libavutil/intreadwrite.h\"\n+#include \"libavutil/mem_internal.h\"\n+\n+#define VC1DSP_TEST(func) { #func, offsetof(VC1DSPContext, func) },\n+#define VC1DSP_SIZED_TEST(func, width, height) { #func, offsetof(VC1DSPContext, func), width, height },\n+\n+typedef struct {\n+    const char *name;\n+    size_t offset;\n+    int width;\n+    int height;\n+} test;\n+\n+typedef struct matrix {\n+    size_t width;\n+    size_t height;\n+    float d[];\n+} matrix;\n+\n+static const matrix T8 = { 8, 8, {\n+        12,  12,  12,  12,  12,  12,  12,  12,\n+        16,  15,   9,   4,  -4,  -9, -15, -16,\n+        16,   6,  -6, -16, -16,  -6,   6,  16,\n+        15,  -4, -16,  -9,   9,  16,   4, -15,\n+        12, -12, -12,  12,  12, -12, -12,  12,\n+         9, -16,   4,  15, -15,  -4,  16,  -9,\n+         6, -16,  16,  -6,  -6,  16, -16,   6,\n+         4,  -9,  15, -16,  16, -15,   9,  -4\n+} };\n+\n+static const matrix T4 = { 4, 4, {\n+        17,  17,  17,  17,\n+        22,  10, -10, -22,\n+        17, -17, -17,  17,\n+        10, -22,  22, -10\n+} };\n+\n+static const matrix T8t = { 8, 8, {\n+        12,  16,  16,  15,  12,   9,   6,   4,\n+        12,  15,   6,  -4, -12, -16, -16,  -9,\n+        12,   9,  -6, -16, -12,   4,  16,  15,\n+        12,   4, -16,  -9,  12,  15,  -6, -16,\n+        12,  -4, -16,   9,  12, -15,  -6,  16,\n+        12,  -9,  -6,  16, -12,  -4,  16, -15,\n+        12, -15,   6,   4, -12,  16, -16,   9,\n+        12, -16,  16, -15,  12,  -9,   6,  -4\n+} };\n+\n+static const matrix T4t = { 4, 4, {\n+        17,  22,  17,  10,\n+        17,  10, -17, -22,\n+        17, -10, -17,  22,\n+        17, -22,  17, -10\n+} };\n+\n+static matrix *new_matrix(size_t width, size_t height)\n+{\n+    matrix *out = av_mallocz(sizeof (matrix) + height * width * sizeof (float));\n+    if (out == NULL) {\n+        fprintf(stderr, \"Memory allocation failure\\n\");\n+        exit(EXIT_FAILURE);\n+    }\n+    out->width = width;\n+    out->height = height;\n+    return out;\n+}\n+\n+static matrix *multiply(const matrix *a, const matrix *b)\n+{\n+    matrix *out;\n+    if (a->width != b->height) {\n+        fprintf(stderr, \"Incompatible multiplication\\n\");\n+        exit(EXIT_FAILURE);\n+    }\n+    out = new_matrix(b->width, a->height);\n+    for (int j = 0; j < out->height; ++j)\n+        for (int i = 0; i < out->width; ++i) {\n+            float sum = 0;\n+            for (int k = 0; k < a->width; ++k)\n+                sum += a->d[j * a->width + k] * b->d[k * b->width + i];\n+            out->d[j * out->width + i] = sum;\n+        }\n+    return out;\n+}\n+\n+static void normalise(matrix *a)\n+{\n+    for (int j = 0; j < a->height; ++j)\n+        for (int i = 0; i < a->width; ++i) {\n+            float *p = a->d + j * a->width + i;\n+            *p *= 64;\n+            if (a->height == 4)\n+                *p /= (const unsigned[]) { 289, 292, 289, 292 } [j];\n+            else\n+                *p /= (const unsigned[]) { 288, 289, 292, 289, 288, 289, 292, 289 } [j];\n+            if (a->width == 4)\n+                *p /= (const unsigned[]) { 289, 292, 289, 292 } [i];\n+            else\n+                *p /= (const unsigned[]) { 288, 289, 292, 289, 288, 289, 292, 289 } [i];\n+        }\n+}\n+\n+static void divide_and_round_nearest(matrix *a, float by)\n+{\n+    for (int j = 0; j < a->height; ++j)\n+        for (int i = 0; i < a->width; ++i) {\n+            float *p = a->d + j * a->width + i;\n+            *p = rintf(*p / by);\n+        }\n+}\n+\n+static void tweak(matrix *a)\n+{\n+    for (int j = 4; j < a->height; ++j)\n+        for (int i = 0; i < a->width; ++i) {\n+            float *p = a->d + j * a->width + i;\n+            *p += 1;\n+        }\n+}\n+\n+/* The VC-1 spec places restrictions on the values permitted at three\n+ * different stages:\n+ * - D: the input coefficients in frequency domain\n+ * - E: the intermediate coefficients, inverse-transformed only horizontally\n+ * - R: the fully inverse-transformed coefficients\n+ *\n+ * To fully cater for the ranges specified requires various intermediate\n+ * values to be held to 17-bit precision; yet these conditions do not appear\n+ * to be utilised in real-world streams. At least some assembly\n+ * implementations have chosen to restrict these values to 16-bit precision,\n+ * to accelerate the decoding of real-world streams at the cost of strict\n+ * adherence to the spec. To avoid our test marking these as failures,\n+ * reduce our random inputs.\n+ */\n+#define ATTENUATION 4\n+\n+static matrix *generate_inverse_quantized_transform_coefficients(size_t width, size_t height)\n+{\n+    matrix *raw, *tmp, *D, *E, *R;\n+    raw = new_matrix(width, height);\n+    for (int i = 0; i < width * height; ++i)\n+        raw->d[i] = (int) (rnd() % (1024/ATTENUATION)) - 512/ATTENUATION;\n+    tmp = multiply(height == 8 ? &T8 : &T4, raw);\n+    D = multiply(tmp, width == 8 ? &T8t : &T4t);\n+    normalise(D);\n+    divide_and_round_nearest(D, 1);\n+    for (int i = 0; i < width * height; ++i) {\n+        if (D->d[i] < -2048/ATTENUATION || D->d[i] > 2048/ATTENUATION-1) {\n+            /* Rare, so simply try again */\n+            av_free(raw);\n+            av_free(tmp);\n+            av_free(D);\n+            return generate_inverse_quantized_transform_coefficients(width, height);\n+        }\n+    }\n+    E = multiply(D, width == 8 ? &T8 : &T4);\n+    divide_and_round_nearest(E, 8);\n+    for (int i = 0; i < width * height; ++i)\n+        if (E->d[i] < -4096/ATTENUATION || E->d[i] > 4096/ATTENUATION-1) {\n+            /* Rare, so simply try again */\n+            av_free(raw);\n+            av_free(tmp);\n+            av_free(D);\n+            av_free(E);\n+            return generate_inverse_quantized_transform_coefficients(width, height);\n+        }\n+    R = multiply(height == 8 ? &T8t : &T4t, E);\n+    tweak(R);\n+    divide_and_round_nearest(R, 128);\n+    for (int i = 0; i < width * height; ++i)\n+        if (R->d[i] < -512/ATTENUATION || R->d[i] > 512/ATTENUATION-1) {\n+            /* Rare, so simply try again */\n+            av_free(raw);\n+            av_free(tmp);\n+            av_free(D);\n+            av_free(E);\n+            av_free(R);\n+            return generate_inverse_quantized_transform_coefficients(width, height);\n+        }\n+    av_free(raw);\n+    av_free(tmp);\n+    av_free(E);\n+    av_free(R);\n+    return D;\n+}\n+\n+#define RANDOMIZE_BUFFER16(name, size)        \\\n+    do {                                      \\\n+        int i;                                \\\n+        for (i = 0; i < size; ++i) {          \\\n+            uint16_t r = rnd();               \\\n+            AV_WN16A(name##0 + i, r);         \\\n+            AV_WN16A(name##1 + i, r);         \\\n+        }                                     \\\n+    } while (0)\n+\n+#define RANDOMIZE_BUFFER8(name, size)         \\\n+    do {                                      \\\n+        int i;                                \\\n+        for (i = 0; i < size; ++i) {          \\\n+            uint8_t r = rnd();                \\\n+            name##0[i] = r;                   \\\n+            name##1[i] = r;                   \\\n+        }                                     \\\n+    } while (0)\n+\n+#define RANDOMIZE_BUFFER8_MID_WEIGHTED(name, size)  \\\n+    do {                                            \\\n+        uint8_t *p##0 = name##0, *p##1 = name##1;   \\\n+        int i = (size);                             \\\n+        while (i-- > 0) {                           \\\n+            int x = 0x80 | (rnd() & 0x7F);          \\\n+            x >>= rnd() % 9;                        \\\n+            if (rnd() & 1)                          \\\n+                x = -x;                             \\\n+            *p##1++ = *p##0++ = 0x80 + x;           \\\n+        }                                           \\\n+    } while (0)\n+\n+static void check_inv_trans_inplace(void)\n+{\n+    /* Inverse transform input coefficients are stored in a 16-bit buffer\n+     * with row stride of 8 coefficients irrespective of transform size.\n+     * vc1_inv_trans_8x8 differs from the others in two ways: coefficients\n+     * are stored in column-major order, and the outputs are written back\n+     * to the input buffer, so we oversize it slightly to catch overruns. */\n+    LOCAL_ALIGNED_16(int16_t, inv_trans_in0, [10 * 8]);\n+    LOCAL_ALIGNED_16(int16_t, inv_trans_in1, [10 * 8]);\n+\n+    VC1DSPContext h;\n+\n+    ff_vc1dsp_init(&h);\n+\n+    if (check_func(h.vc1_inv_trans_8x8, \"vc1dsp.vc1_inv_trans_8x8\")) {\n+        matrix *coeffs;\n+        declare_func_emms(AV_CPU_FLAG_MMX, void, int16_t *);\n+        RANDOMIZE_BUFFER16(inv_trans_in, 10 * 8);\n+        coeffs = generate_inverse_quantized_transform_coefficients(8, 8);\n+        for (int j = 0; j < 8; ++j)\n+            for (int i = 0; i < 8; ++i) {\n+                int idx = 8 + i * 8 + j;\n+                inv_trans_in1[idx] = inv_trans_in0[idx] = coeffs->d[j * 8 + i];\n+            }\n+        call_ref(inv_trans_in0 + 8);\n+        call_new(inv_trans_in1 + 8);\n+        if (memcmp(inv_trans_in0,  inv_trans_in1,  10 * 8 * sizeof (int16_t)))\n+            fail();\n+        bench_new(inv_trans_in1 + 8);\n+        av_free(coeffs);\n+    }\n+}\n+\n+static void check_inv_trans_adding(void)\n+{\n+    /* Inverse transform input coefficients are stored in a 16-bit buffer\n+     * with row stride of 8 coefficients irrespective of transform size. */\n+    LOCAL_ALIGNED_16(int16_t, inv_trans_in0, [8 * 8]);\n+    LOCAL_ALIGNED_16(int16_t, inv_trans_in1, [8 * 8]);\n+\n+    /* For all but vc1_inv_trans_8x8, the inverse transform is narrowed and\n+     * added with saturation to an array of unsigned 8-bit values. Oversize\n+     * this by 8 samples left and right and one row above and below. */\n+    LOCAL_ALIGNED_8(uint8_t, inv_trans_out0, [10 * 24]);\n+    LOCAL_ALIGNED_8(uint8_t, inv_trans_out1, [10 * 24]);\n+\n+    VC1DSPContext h;\n+\n+    const test tests[] = {\n+        VC1DSP_SIZED_TEST(vc1_inv_trans_8x4, 8, 4)\n+        VC1DSP_SIZED_TEST(vc1_inv_trans_4x8, 4, 8)\n+        VC1DSP_SIZED_TEST(vc1_inv_trans_4x4, 4, 4)\n+        VC1DSP_SIZED_TEST(vc1_inv_trans_8x8_dc, 8, 8)\n+        VC1DSP_SIZED_TEST(vc1_inv_trans_8x4_dc, 8, 4)\n+        VC1DSP_SIZED_TEST(vc1_inv_trans_4x8_dc, 4, 8)\n+        VC1DSP_SIZED_TEST(vc1_inv_trans_4x4_dc, 4, 4)\n+    };\n+\n+    ff_vc1dsp_init(&h);\n+\n+    for (size_t t = 0; t < FF_ARRAY_ELEMS(tests); ++t) {\n+        void (*func)(uint8_t *, ptrdiff_t, int16_t *) = *(void **)((intptr_t) &h + tests[t].offset);\n+        if (check_func(func, \"vc1dsp.%s\", tests[t].name)) {\n+            matrix *coeffs;\n+            declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *, ptrdiff_t, int16_t *);\n+            RANDOMIZE_BUFFER16(inv_trans_in, 8 * 8);\n+            RANDOMIZE_BUFFER8(inv_trans_out, 10 * 24);\n+            coeffs = generate_inverse_quantized_transform_coefficients(tests[t].width, tests[t].height);\n+            for (int j = 0; j < tests[t].height; ++j)\n+                for (int i = 0; i < tests[t].width; ++i) {\n+                    int idx = j * 8 + i;\n+                    inv_trans_in1[idx] = inv_trans_in0[idx] = coeffs->d[j * tests[t].width + i];\n+                }\n+            call_ref(inv_trans_out0 + 24 + 8, 24, inv_trans_in0);\n+            call_new(inv_trans_out1 + 24 + 8, 24, inv_trans_in1);\n+            if (memcmp(inv_trans_out0, inv_trans_out1, 10 * 24))\n+                fail();\n+            bench_new(inv_trans_out1 + 24 + 8, 24, inv_trans_in1 + 8);\n+            av_free(coeffs);\n+        }\n+    }\n+}\n+\n+static void check_loop_filter(void)\n+{\n+    /* Deblocking filter buffers are big enough to hold a 16x16 block,\n+     * plus 16 columns left and 4 rows above to hold filter inputs\n+     * (depending on whether v or h neighbouring block edge, oversized\n+     * horizontally to maintain 16-byte alignment) plus 16 columns and\n+     * 4 rows below to catch write overflows */\n+    LOCAL_ALIGNED_16(uint8_t, filter_buf0, [24 * 48]);\n+    LOCAL_ALIGNED_16(uint8_t, filter_buf1, [24 * 48]);\n+\n+    VC1DSPContext h;\n+\n+    const test tests[] = {\n+        VC1DSP_TEST(vc1_v_loop_filter4)\n+        VC1DSP_TEST(vc1_h_loop_filter4)\n+        VC1DSP_TEST(vc1_v_loop_filter8)\n+        VC1DSP_TEST(vc1_h_loop_filter8)\n+        VC1DSP_TEST(vc1_v_loop_filter16)\n+        VC1DSP_TEST(vc1_h_loop_filter16)\n+    };\n+\n+    ff_vc1dsp_init(&h);\n+\n+    for (size_t t = 0; t < FF_ARRAY_ELEMS(tests); ++t) {\n+        void (*func)(uint8_t *, ptrdiff_t, int) = *(void **)((intptr_t) &h + tests[t].offset);\n+        declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *, ptrdiff_t, int);\n+        if (check_func(func, \"vc1dsp.%s\", tests[t].name)) {\n+            for (int count = 1000; count > 0; --count) {\n+                int pq = rnd() % 31 + 1;\n+                RANDOMIZE_BUFFER8_MID_WEIGHTED(filter_buf, 24 * 48);\n+                call_ref(filter_buf0 + 4 * 48 + 16, 48, pq);\n+                call_new(filter_buf1 + 4 * 48 + 16, 48, pq);\n+                if (memcmp(filter_buf0, filter_buf1, 24 * 48))\n+                    fail();\n+            }\n+        }\n+        for (int j = 0; j < 24; ++j)\n+            for (int i = 0; i < 48; ++i)\n+                filter_buf1[j * 48 + i] = 0x60 + 0x40 * (i >= 16 && j >= 4);\n+        if (check_func(func, \"vc1dsp.%s_bestcase\", tests[t].name))\n+            bench_new(filter_buf1 + 4 * 48 + 16, 48, 1);\n+        if (check_func(func, \"vc1dsp.%s_worstcase\", tests[t].name))\n+            bench_new(filter_buf1 + 4 * 48 + 16, 48, 31);\n+    }\n+}\n+\n+#define TEST_UNESCAPE                                                                               \\\n+    do {                                                                                            \\\n+        for (int count = 100; count > 0; --count) {                                                 \\\n+            escaped_offset = rnd() & 7;                                                             \\\n+            unescaped_offset = rnd() & 7;                                                           \\\n+            escaped_len = (1u << (rnd() % 8) + 3) - (rnd() & 7);                                    \\\n+            RANDOMIZE_BUFFER8(unescaped, UNESCAPE_BUF_SIZE);                                        \\\n+            len0 = call_ref(escaped0 + escaped_offset, escaped_len, unescaped0 + unescaped_offset); \\\n+            len1 = call_new(escaped1 + escaped_offset, escaped_len, unescaped1 + unescaped_offset); \\\n+            if (len0 != len1 || memcmp(unescaped0, unescaped1, UNESCAPE_BUF_SIZE))                  \\\n+                fail();                                                                             \\\n+        }                                                                                           \\\n+    } while (0)\n+\n+static void check_unescape(void)\n+{\n+    /* This appears to be a typical length of buffer in use */\n+#define LOG2_UNESCAPE_BUF_SIZE 17\n+#define UNESCAPE_BUF_SIZE (1u<<LOG2_UNESCAPE_BUF_SIZE)\n+    LOCAL_ALIGNED_8(uint8_t, escaped0, [UNESCAPE_BUF_SIZE]);\n+    LOCAL_ALIGNED_8(uint8_t, escaped1, [UNESCAPE_BUF_SIZE]);\n+    LOCAL_ALIGNED_8(uint8_t, unescaped0, [UNESCAPE_BUF_SIZE]);\n+    LOCAL_ALIGNED_8(uint8_t, unescaped1, [UNESCAPE_BUF_SIZE]);\n+\n+    VC1DSPContext h;\n+\n+    ff_vc1dsp_init(&h);\n+\n+    if (check_func(h.vc1_unescape_buffer, \"vc1dsp.vc1_unescape_buffer\")) {\n+        int len0, len1, escaped_offset, unescaped_offset, escaped_len;\n+        declare_func_emms(AV_CPU_FLAG_MMX, int, const uint8_t *, int, uint8_t *);\n+\n+        /* Test data which consists of escapes sequences packed as tightly as possible */\n+        for (int x = 0; x < UNESCAPE_BUF_SIZE; ++x)\n+            escaped1[x] = escaped0[x] = 3 * (x % 3 == 0);\n+        TEST_UNESCAPE;\n+\n+        /* Test random data */\n+        RANDOMIZE_BUFFER8(escaped, UNESCAPE_BUF_SIZE);\n+        TEST_UNESCAPE;\n+\n+        /* Test data with escape sequences at random intervals */\n+        for (int x = 0; x <= UNESCAPE_BUF_SIZE - 4;) {\n+            int gap, gap_msb;\n+            escaped1[x+0] = escaped0[x+0] = 0;\n+            escaped1[x+1] = escaped0[x+1] = 0;\n+            escaped1[x+2] = escaped0[x+2] = 3;\n+            escaped1[x+3] = escaped0[x+3] = rnd() & 3;\n+            gap_msb = 2u << (rnd() % 8);\n+            gap = (rnd() &~ -gap_msb) | gap_msb;\n+            x += gap;\n+        }\n+        TEST_UNESCAPE;\n+\n+        /* Test data which is known to contain no escape sequences */\n+        memset(escaped0, 0xFF, UNESCAPE_BUF_SIZE);\n+        memset(escaped1, 0xFF, UNESCAPE_BUF_SIZE);\n+        TEST_UNESCAPE;\n+\n+        /* Benchmark the no-escape-sequences case */\n+        bench_new(escaped1, UNESCAPE_BUF_SIZE, unescaped1);\n+    }\n+}\n+\n+void checkasm_check_vc1dsp(void)\n+{\n+    check_inv_trans_inplace();\n+    check_inv_trans_adding();\n+    report(\"inv_trans\");\n+\n+    check_loop_filter();\n+    report(\"loop_filter\");\n+\n+    check_unescape();\n+    report(\"unescape_buffer\");\n+}\ndiff --git a/tests/checkasm/vf_bwdif.c b/tests/checkasm/vf_bwdif.c\nnew file mode 100644\nindex 0000000000..3399cacdf7\n--- /dev/null\n+++ b/tests/checkasm/vf_bwdif.c\n@@ -0,0 +1,256 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License along\n+ * with FFmpeg; if not, write to the Free Software Foundation, Inc.,\n+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n+ */\n+\n+#include <string.h>\n+#include \"checkasm.h\"\n+#include \"libavcodec/internal.h\"\n+#include \"libavfilter/bwdif.h\"\n+#include \"libavutil/mem_internal.h\"\n+\n+#define WIDTH 256\n+\n+#define randomize_buffers(buf0, buf1, mask, count) \\\n+    for (size_t i = 0; i < count; i++) \\\n+        buf0[i] = buf1[i] = rnd() & mask\n+\n+#define randomize_overflow_check(buf0, buf1, mask, count) \\\n+    for (size_t i = 0; i < count; i++) \\\n+        buf0[i] = buf1[i] = (rnd() & 1) != 0 ? mask : 0;\n+\n+#define BODY(type, depth)                                                      \\\n+    do {                                                                       \\\n+        type prev0[9*WIDTH], prev1[9*WIDTH];                                   \\\n+        type next0[9*WIDTH], next1[9*WIDTH];                                   \\\n+        type cur0[9*WIDTH], cur1[9*WIDTH];                                     \\\n+        type dst0[WIDTH], dst1[WIDTH];                                         \\\n+        const int stride = WIDTH;                                              \\\n+        const int mask = (1<<depth)-1;                                         \\\n+                                                                               \\\n+        declare_func(void, void *dst, void *prev, void *cur, void *next,       \\\n+                        int w, int prefs, int mrefs, int prefs2, int mrefs2,   \\\n+                        int prefs3, int mrefs3, int prefs4, int mrefs4,        \\\n+                        int parity, int clip_max);                             \\\n+                                                                               \\\n+        randomize_buffers(prev0, prev1, mask, 9*WIDTH);                        \\\n+        randomize_buffers(next0, next1, mask, 9*WIDTH);                        \\\n+        randomize_buffers( cur0,  cur1, mask, 9*WIDTH);                        \\\n+                                                                               \\\n+        call_ref(dst0, prev0 + 4*WIDTH, cur0 + 4*WIDTH, next0 + 4*WIDTH,       \\\n+                WIDTH, stride, -stride, 2*stride, -2*stride,                   \\\n+                3*stride, -3*stride, 4*stride, -4*stride,                      \\\n+                0, mask);                                                      \\\n+        call_new(dst1, prev1 + 4*WIDTH, cur1 + 4*WIDTH, next1 + 4*WIDTH,       \\\n+                WIDTH, stride, -stride, 2*stride, -2*stride,                   \\\n+                3*stride, -3*stride, 4*stride, -4*stride,                      \\\n+                0, mask);                                                      \\\n+                                                                               \\\n+        if (memcmp(dst0, dst1, sizeof dst0)                                    \\\n+                || memcmp(prev0, prev1, sizeof prev0)                          \\\n+                || memcmp(next0, next1, sizeof next0)                          \\\n+                || memcmp( cur0,  cur1, sizeof cur0))                          \\\n+            fail();                                                            \\\n+        bench_new(dst1, prev1 + 4*WIDTH, cur1 + 4*WIDTH, next1 + 4*WIDTH,      \\\n+                WIDTH, stride, -stride, 2*stride, -2*stride,                   \\\n+                3*stride, -3*stride, 4*stride, -4*stride,                      \\\n+                0, mask);                                                      \\\n+    } while (0)\n+\n+void checkasm_check_vf_bwdif(void)\n+{\n+    BWDIFContext ctx_8, ctx_10;\n+\n+    ff_bwdif_init_filter_line(&ctx_8, 8);\n+    ff_bwdif_init_filter_line(&ctx_10, 10);\n+\n+    if (check_func(ctx_8.filter_line, \"bwdif8\")) {\n+        BODY(uint8_t, 8);\n+        report(\"bwdif8\");\n+    }\n+\n+    if (check_func(ctx_10.filter_line, \"bwdif10\")) {\n+        BODY(uint16_t, 10);\n+        report(\"bwdif10\");\n+    }\n+\n+    if (!ctx_8.filter_line3)\n+        ctx_8.filter_line3 = ff_bwdif_filter_line3_c;\n+\n+    {\n+        LOCAL_ALIGNED_16(uint8_t, prev0, [11*WIDTH]);\n+        LOCAL_ALIGNED_16(uint8_t, prev1, [11*WIDTH]);\n+        LOCAL_ALIGNED_16(uint8_t, next0, [11*WIDTH]);\n+        LOCAL_ALIGNED_16(uint8_t, next1, [11*WIDTH]);\n+        LOCAL_ALIGNED_16(uint8_t, cur0,  [11*WIDTH]);\n+        LOCAL_ALIGNED_16(uint8_t, cur1,  [11*WIDTH]);\n+        LOCAL_ALIGNED_16(uint8_t, dst0,  [WIDTH*3]);\n+        LOCAL_ALIGNED_16(uint8_t, dst1,  [WIDTH*3]);\n+        const int stride = WIDTH;\n+        const int mask = (1<<8)-1;\n+        int parity;\n+\n+        for (parity = 0; parity != 2; ++parity) {\n+            if (check_func(ctx_8.filter_line3, \"bwdif8.line3.rnd.p%d\", parity)) {\n+\n+                declare_func(void, void * dst1, int d_stride,\n+                                          const void * prev1, const void * cur1, const void * next1, int prefs,\n+                                          int w, int parity, int clip_max);\n+\n+                randomize_buffers(prev0, prev1, mask, 11*WIDTH);\n+                randomize_buffers(next0, next1, mask, 11*WIDTH);\n+                randomize_buffers( cur0,  cur1, mask, 11*WIDTH);\n+\n+                call_ref(dst0, stride,\n+                         prev0 + stride * 4, cur0 + stride * 4, next0 + stride * 4, stride,\n+                         WIDTH, parity, mask);\n+                call_new(dst1, stride,\n+                         prev1 + stride * 4, cur1 + stride * 4, next1 + stride * 4, stride,\n+                         WIDTH, parity, mask);\n+\n+                if (memcmp(dst0, dst1, WIDTH*3)\n+                        || memcmp(prev0, prev1, WIDTH*11)\n+                        || memcmp(next0, next1, WIDTH*11)\n+                        || memcmp( cur0,  cur1, WIDTH*11))\n+                    fail();\n+\n+                bench_new(dst1, stride,\n+                         prev1 + stride * 4, cur1 + stride * 4, next1 + stride * 4, stride,\n+                         WIDTH, parity, mask);\n+            }\n+        }\n+\n+        // Use just 0s and ~0s to try to provoke bad cropping or overflow\n+        // Parity makes no difference to this test so just test 0\n+        if (check_func(ctx_8.filter_line3, \"bwdif8.line3.overflow\")) {\n+\n+            declare_func(void, void * dst1, int d_stride,\n+                                      const void * prev1, const void * cur1, const void * next1, int prefs,\n+                                      int w, int parity, int clip_max);\n+\n+            randomize_overflow_check(prev0, prev1, mask, 11*WIDTH);\n+            randomize_overflow_check(next0, next1, mask, 11*WIDTH);\n+            randomize_overflow_check( cur0,  cur1, mask, 11*WIDTH);\n+\n+            call_ref(dst0, stride,\n+                     prev0 + stride * 4, cur0 + stride * 4, next0 + stride * 4, stride,\n+                     WIDTH, 0, mask);\n+            call_new(dst1, stride,\n+                     prev1 + stride * 4, cur1 + stride * 4, next1 + stride * 4, stride,\n+                     WIDTH, 0, mask);\n+\n+            if (memcmp(dst0, dst1, WIDTH*3)\n+                    || memcmp(prev0, prev1, WIDTH*11)\n+                    || memcmp(next0, next1, WIDTH*11)\n+                    || memcmp( cur0,  cur1, WIDTH*11))\n+                fail();\n+\n+            // No point to benching\n+        }\n+\n+        report(\"bwdif8.line3\");\n+    }\n+\n+    {\n+        LOCAL_ALIGNED_16(uint8_t, prev0, [11*WIDTH]);\n+        LOCAL_ALIGNED_16(uint8_t, prev1, [11*WIDTH]);\n+        LOCAL_ALIGNED_16(uint8_t, next0, [11*WIDTH]);\n+        LOCAL_ALIGNED_16(uint8_t, next1, [11*WIDTH]);\n+        LOCAL_ALIGNED_16(uint8_t, cur0,  [11*WIDTH]);\n+        LOCAL_ALIGNED_16(uint8_t, cur1,  [11*WIDTH]);\n+        LOCAL_ALIGNED_16(uint8_t, dst0,  [WIDTH*3]);\n+        LOCAL_ALIGNED_16(uint8_t, dst1,  [WIDTH*3]);\n+        const int stride = WIDTH;\n+        const int mask = (1<<8)-1;\n+        int spat;\n+        int parity;\n+\n+        for (spat = 0; spat != 2; ++spat) {\n+            for (parity = 0; parity != 2; ++parity) {\n+                if (check_func(ctx_8.filter_edge, \"bwdif8.edge.s%d.p%d\", spat, parity)) {\n+\n+                    declare_func(void, void *dst1, void *prev1, void *cur1, void *next1,\n+                                            int w, int prefs, int mrefs, int prefs2, int mrefs2,\n+                                            int parity, int clip_max, int spat);\n+\n+                    randomize_buffers(prev0, prev1, mask, 11*WIDTH);\n+                    randomize_buffers(next0, next1, mask, 11*WIDTH);\n+                    randomize_buffers( cur0,  cur1, mask, 11*WIDTH);\n+                    memset(dst0, 0xba, WIDTH * 3);\n+                    memset(dst1, 0xba, WIDTH * 3);\n+\n+                    call_ref(dst0 + stride,\n+                             prev0 + stride * 4, cur0 + stride * 4, next0 + stride * 4, WIDTH,\n+                             stride, -stride, stride * 2, -stride * 2,\n+                             parity, mask, spat);\n+                    call_new(dst1 + stride,\n+                             prev1 + stride * 4, cur1 + stride * 4, next1 + stride * 4, WIDTH,\n+                             stride, -stride, stride * 2, -stride * 2,\n+                             parity, mask, spat);\n+\n+                    if (memcmp(dst0, dst1, WIDTH*3)\n+                            || memcmp(prev0, prev1, WIDTH*11)\n+                            || memcmp(next0, next1, WIDTH*11)\n+                            || memcmp( cur0,  cur1, WIDTH*11))\n+                        fail();\n+\n+                    bench_new(dst1 + stride,\n+                             prev1 + stride * 4, cur1 + stride * 4, next1 + stride * 4, WIDTH,\n+                             stride, -stride, stride * 2, -stride * 2,\n+                             parity, mask, spat);\n+                }\n+            }\n+        }\n+\n+        report(\"bwdif8.edge\");\n+    }\n+\n+    if (check_func(ctx_8.filter_intra, \"bwdif8.intra\")) {\n+        LOCAL_ALIGNED_16(uint8_t, cur0,  [11*WIDTH]);\n+        LOCAL_ALIGNED_16(uint8_t, cur1,  [11*WIDTH]);\n+        LOCAL_ALIGNED_16(uint8_t, dst0,  [WIDTH*3]);\n+        LOCAL_ALIGNED_16(uint8_t, dst1,  [WIDTH*3]);\n+        const int stride = WIDTH;\n+        const int mask = (1<<8)-1;\n+\n+        declare_func(void, void *dst1, void *cur1, int w, int prefs, int mrefs,\n+                     int prefs3, int mrefs3, int parity, int clip_max);\n+\n+        randomize_buffers( cur0,  cur1, mask, 11*WIDTH);\n+        memset(dst0, 0xba, WIDTH * 3);\n+        memset(dst1, 0xba, WIDTH * 3);\n+\n+        call_ref(dst0 + stride,\n+                 cur0 + stride * 4, WIDTH,\n+                 stride, -stride, stride * 3, -stride * 3,\n+                 0, mask);\n+        call_new(dst1 + stride,\n+                 cur0 + stride * 4, WIDTH,\n+                 stride, -stride, stride * 3, -stride * 3,\n+                 0, mask);\n+\n+        if (memcmp(dst0, dst1, WIDTH*3)\n+                || memcmp( cur0,  cur1, WIDTH*11))\n+            fail();\n+\n+        bench_new(dst1 + stride,\n+                  cur0 + stride * 4, WIDTH,\n+                  stride, -stride, stride * 3, -stride * 3,\n+                  0, mask);\n+\n+        report(\"bwdif8.intra\");\n+    }\n+}\ndiff --git a/tests/fate/checkasm.mak b/tests/fate/checkasm.mak\nindex 07f1d8238e..723c2b26ef 100644\n--- a/tests/fate/checkasm.mak\n+++ b/tests/fate/checkasm.mak\n@@ -16,18 +16,22 @@ FATE_CHECKASM = fate-checkasm-aacpsdsp                                  \\\n                 fate-checkasm-hevc_add_res                              \\\n                 fate-checkasm-hevc_idct                                 \\\n                 fate-checkasm-hevc_sao                                  \\\n+                fate-checkasm-idctdsp                                   \\\n                 fate-checkasm-jpeg2000dsp                               \\\n                 fate-checkasm-llviddsp                                  \\\n                 fate-checkasm-llviddspenc                               \\\n                 fate-checkasm-opusdsp                                   \\\n                 fate-checkasm-pixblockdsp                               \\\n+                fate-checkasm-rpi_sand                                  \\\n                 fate-checkasm-sbrdsp                                    \\\n                 fate-checkasm-synth_filter                              \\\n                 fate-checkasm-sw_rgb                                    \\\n                 fate-checkasm-sw_scale                                  \\\n                 fate-checkasm-v210dec                                   \\\n                 fate-checkasm-v210enc                                   \\\n+                fate-checkasm-vc1dsp                                    \\\n                 fate-checkasm-vf_blend                                  \\\n+                fate-checkasm-vf_bwdif                                  \\\n                 fate-checkasm-vf_colorspace                             \\\n                 fate-checkasm-vf_eq                                     \\\n                 fate-checkasm-vf_gblur                                  \\\n"
  },
  {
    "path": "packages/multimedia/ffmpeg/patches/v4l2-drmprime/ffmpeg-001-v4l2-drmprime.patch",
    "content": "From 1e73397d52d69378ebac5a390da508cd16d7d97e Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Tue, 24 Apr 2018 23:00:23 -0700\nSubject: [PATCH 1/9] libavcodec: v4l2m2m: output AVDRMFrameDescriptor\n\nThis allows for a zero-copy output by exporting the v4l2 buffer then wrapping that buffer\nin the AVDRMFrameDescriptor like it is done in rkmpp.\n\nThis has been in use for quite some time with great success on many platforms including:\n - Amlogic S905\n - Raspberry Pi\n - i.MX6\n - Dragonboard 410c\n\nThis was developed in conjunction with Kodi to allow handling the zero-copy buffer rendering.\nA simply utility for testing is also available here: https://github.com/BayLibre/ffmpeg-drm\n\ntodo:\n - allow selecting pixel format output from decoder\n - allow configuring amount of output and capture buffers\n\nV2:\n - allow selecting AV_PIX_FMT_DRM_PRIME\n\nV3:\n - use get_format to select AV_PIX_FMT_DRM_PRIME\n - use hw_configs\n - add handling of AV_PIX_FMT_YUV420P format (for raspberry pi)\n - add handling of AV_PIX_FMT_YUYV422 format (for i.MX6 coda decoder)\n\nV4:\n - rebased on 4.2.2\n\nV5:\n - rebased on 4.3\n---\n libavcodec/v4l2_buffers.c | 155 ++++++++++++++++++++++++++++++++++++--\n libavcodec/v4l2_buffers.h |   4 +\n libavcodec/v4l2_context.c |  40 +++++++++-\n libavcodec/v4l2_m2m.h     |   3 +\n libavcodec/v4l2_m2m_dec.c |  23 ++++++\n 5 files changed, 213 insertions(+), 12 deletions(-)\n\ndiff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c\nindex 4b2679eb38..cbd3e5680d 100644\n--- a/libavcodec/v4l2_buffers.c\n+++ b/libavcodec/v4l2_buffers.c\n@@ -21,6 +21,7 @@\n  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n  */\n \n+#include <drm/drm_fourcc.h>\n #include <linux/videodev2.h>\n #include <sys/ioctl.h>\n #include <sys/mman.h>\n@@ -30,6 +31,7 @@\n #include \"libavcodec/avcodec.h\"\n #include \"libavcodec/internal.h\"\n #include \"libavutil/pixdesc.h\"\n+#include \"libavutil/hwcontext.h\"\n #include \"v4l2_context.h\"\n #include \"v4l2_buffers.h\"\n #include \"v4l2_m2m.h\"\n@@ -210,7 +212,79 @@ static enum AVColorTransferCharacteristic v4l2_get_color_trc(V4L2Buffer *buf)\n     return AVCOL_TRC_UNSPECIFIED;\n }\n \n-static void v4l2_free_buffer(void *opaque, uint8_t *unused)\n+static uint8_t * v4l2_get_drm_frame(V4L2Buffer *avbuf)\n+{\n+    AVDRMFrameDescriptor *drm_desc = &avbuf->drm_frame;\n+    AVDRMLayerDescriptor *layer;\n+\n+    /* fill the DRM frame descriptor */\n+    drm_desc->nb_objects = avbuf->num_planes;\n+    drm_desc->nb_layers = 1;\n+\n+    layer = &drm_desc->layers[0];\n+    layer->nb_planes = avbuf->num_planes;\n+\n+    for (int i = 0; i < avbuf->num_planes; i++) {\n+        layer->planes[i].object_index = i;\n+        layer->planes[i].offset = 0;\n+        layer->planes[i].pitch = avbuf->plane_info[i].bytesperline;\n+    }\n+\n+    switch (avbuf->context->av_pix_fmt) {\n+    case AV_PIX_FMT_YUYV422:\n+\n+        layer->format = DRM_FORMAT_YUYV;\n+        layer->nb_planes = 1;\n+\n+        break;\n+\n+    case AV_PIX_FMT_NV12:\n+    case AV_PIX_FMT_NV21:\n+\n+        layer->format = avbuf->context->av_pix_fmt == AV_PIX_FMT_NV12 ?\n+            DRM_FORMAT_NV12 : DRM_FORMAT_NV21;\n+\n+        if (avbuf->num_planes > 1)\n+            break;\n+\n+        layer->nb_planes = 2;\n+\n+        layer->planes[1].object_index = 0;\n+        layer->planes[1].offset = avbuf->plane_info[0].bytesperline *\n+            avbuf->context->format.fmt.pix.height;\n+        layer->planes[1].pitch = avbuf->plane_info[0].bytesperline;\n+        break;\n+\n+    case AV_PIX_FMT_YUV420P:\n+\n+        layer->format = DRM_FORMAT_YUV420;\n+\n+        if (avbuf->num_planes > 1)\n+            break;\n+\n+        layer->nb_planes = 3;\n+\n+        layer->planes[1].object_index = 0;\n+        layer->planes[1].offset = avbuf->plane_info[0].bytesperline *\n+            avbuf->context->format.fmt.pix.height;\n+        layer->planes[1].pitch = avbuf->plane_info[0].bytesperline >> 1;\n+\n+        layer->planes[2].object_index = 0;\n+        layer->planes[2].offset = layer->planes[1].offset +\n+            ((avbuf->plane_info[0].bytesperline *\n+              avbuf->context->format.fmt.pix.height) >> 2);\n+        layer->planes[2].pitch = avbuf->plane_info[0].bytesperline >> 1;\n+        break;\n+\n+    default:\n+        drm_desc->nb_layers = 0;\n+        break;\n+    }\n+\n+    return (uint8_t *) drm_desc;\n+}\n+\n+static void v4l2_free_buffer(void *opaque, uint8_t *data)\n {\n     V4L2Buffer* avbuf = opaque;\n     V4L2m2mContext *s = buf_to_m2mctx(avbuf);\n@@ -234,6 +308,36 @@ static void v4l2_free_buffer(void *opaque, uint8_t *unused)\n     }\n }\n \n+static int v4l2_buffer_export_drm(V4L2Buffer* avbuf)\n+{\n+    struct v4l2_exportbuffer expbuf;\n+    int i, ret;\n+\n+    for (i = 0; i < avbuf->num_planes; i++) {\n+        memset(&expbuf, 0, sizeof(expbuf));\n+\n+        expbuf.index = avbuf->buf.index;\n+        expbuf.type = avbuf->buf.type;\n+        expbuf.plane = i;\n+\n+        ret = ioctl(buf_to_m2mctx(avbuf)->fd, VIDIOC_EXPBUF, &expbuf);\n+        if (ret < 0)\n+            return AVERROR(errno);\n+\n+        if (V4L2_TYPE_IS_MULTIPLANAR(avbuf->buf.type)) {\n+            /* drm frame */\n+            avbuf->drm_frame.objects[i].size = avbuf->buf.m.planes[i].length;\n+            avbuf->drm_frame.objects[i].fd = expbuf.fd;\n+        } else {\n+            /* drm frame */\n+            avbuf->drm_frame.objects[0].size = avbuf->buf.length;\n+            avbuf->drm_frame.objects[0].fd = expbuf.fd;\n+        }\n+    }\n+\n+    return 0;\n+}\n+\n static int v4l2_buf_increase_ref(V4L2Buffer *in)\n {\n     V4L2m2mContext *s = buf_to_m2mctx(in);\n@@ -254,6 +358,24 @@ static int v4l2_buf_increase_ref(V4L2Buffer *in)\n     return 0;\n }\n \n+static int v4l2_buf_to_bufref_drm(V4L2Buffer *in, AVBufferRef **buf)\n+{\n+    int ret;\n+\n+    *buf = av_buffer_create((uint8_t *) &in->drm_frame,\n+                            sizeof(in->drm_frame),\n+                            v4l2_free_buffer,\n+                            in, AV_BUFFER_FLAG_READONLY);\n+    if (!*buf)\n+        return AVERROR(ENOMEM);\n+\n+    ret = v4l2_buf_increase_ref(in);\n+    if (ret)\n+         av_buffer_unref(buf);\n+\n+    return ret;\n+}\n+\n static int v4l2_buf_to_bufref(V4L2Buffer *in, int plane, AVBufferRef **buf)\n {\n     int ret;\n@@ -303,13 +425,24 @@ static int v4l2_buffer_buf_to_swframe(AVFrame *frame, V4L2Buffer *avbuf)\n \n     frame->format = avbuf->context->av_pix_fmt;\n \n-    for (i = 0; i < avbuf->num_planes; i++) {\n-        ret = v4l2_buf_to_bufref(avbuf, i, &frame->buf[i]);\n+    if (buf_to_m2mctx(avbuf)->output_drm) {\n+        /* 1. get references to the actual data */\n+        ret = v4l2_buf_to_bufref_drm(avbuf, &frame->buf[0]);\n         if (ret)\n             return ret;\n \n-        frame->linesize[i] = avbuf->plane_info[i].bytesperline;\n-        frame->data[i] = frame->buf[i]->data;\n+        frame->data[0] = (uint8_t *) v4l2_get_drm_frame(avbuf);\n+        frame->format = AV_PIX_FMT_DRM_PRIME;\n+    } else {\n+        /* 1. get references to the actual data */\n+        for (i = 0; i < avbuf->num_planes; i++) {\n+            ret = v4l2_buf_to_bufref(avbuf, i, &frame->buf[i]);\n+            if (ret)\n+                return ret;\n+\n+            frame->linesize[i] = avbuf->plane_info[i].bytesperline;\n+            frame->data[i] = frame->buf[i]->data;\n+        }\n     }\n \n     /* fixup special cases */\n@@ -543,9 +676,6 @@ int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index)\n \n     avbuf->status = V4L2BUF_AVAILABLE;\n \n-    if (V4L2_TYPE_IS_OUTPUT(ctx->type))\n-        return 0;\n-\n     if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) {\n         avbuf->buf.m.planes = avbuf->planes;\n         avbuf->buf.length   = avbuf->num_planes;\n@@ -555,6 +685,15 @@ int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index)\n         avbuf->buf.length    = avbuf->planes[0].length;\n     }\n \n+    if (V4L2_TYPE_IS_OUTPUT(ctx->type))\n+        return 0;\n+\n+    if (buf_to_m2mctx(avbuf)->output_drm) {\n+        ret = v4l2_buffer_export_drm(avbuf);\n+        if (ret)\n+                return ret;\n+    }\n+\n     return ff_v4l2_buffer_enqueue(avbuf);\n }\n \ndiff --git a/libavcodec/v4l2_buffers.h b/libavcodec/v4l2_buffers.h\nindex 8dbc7fc104..037e667997 100644\n--- a/libavcodec/v4l2_buffers.h\n+++ b/libavcodec/v4l2_buffers.h\n@@ -27,6 +27,7 @@\n #include <stdatomic.h>\n #include <linux/videodev2.h>\n \n+#include \"libavutil/hwcontext_drm.h\"\n #include \"avcodec.h\"\n \n enum V4L2Buffer_status {\n@@ -42,6 +43,9 @@ typedef struct V4L2Buffer {\n     /* each buffer needs to have a reference to its context */\n     struct V4L2Context *context;\n \n+    /* DRM descriptor */\n+    AVDRMFrameDescriptor drm_frame;\n+\n     /* This object is refcounted per-plane, so we need to keep track\n      * of how many context-refs we are holding. */\n     AVBufferRef *context_ref;\ndiff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c\nindex ff1ea8e57b..e9e8c27a54 100644\n--- a/libavcodec/v4l2_context.c\n+++ b/libavcodec/v4l2_context.c\n@@ -455,22 +455,54 @@ static int v4l2_release_buffers(V4L2Context* ctx)\n     struct v4l2_requestbuffers req = {\n         .memory = V4L2_MEMORY_MMAP,\n         .type = ctx->type,\n-        .count = 0, /* 0 -> unmaps buffers from the driver */\n+        .count = 0, /* 0 -> unmap all buffers from the driver */\n     };\n-    int i, j;\n+    int ret, i, j;\n \n     for (i = 0; i < ctx->num_buffers; i++) {\n         V4L2Buffer *buffer = &ctx->buffers[i];\n \n         for (j = 0; j < buffer->num_planes; j++) {\n             struct V4L2Plane_info *p = &buffer->plane_info[j];\n+\n+            if (V4L2_TYPE_IS_OUTPUT(ctx->type)) {\n+                /* output buffers are not EXPORTED */\n+                goto unmap;\n+            }\n+\n+            if (ctx_to_m2mctx(ctx)->output_drm) {\n+                /* use the DRM frame to close */\n+                if (buffer->drm_frame.objects[j].fd >= 0) {\n+                    if (close(buffer->drm_frame.objects[j].fd) < 0) {\n+                        av_log(logger(ctx), AV_LOG_ERROR, \"%s close drm fd \"\n+                            \"[buffer=%2d, plane=%d, fd=%2d] - %s \\n\",\n+                            ctx->name, i, j, buffer->drm_frame.objects[j].fd,\n+                            av_err2str(AVERROR(errno)));\n+                    }\n+                }\n+            }\n+unmap:\n             if (p->mm_addr && p->length)\n                 if (munmap(p->mm_addr, p->length) < 0)\n-                    av_log(logger(ctx), AV_LOG_ERROR, \"%s unmap plane (%s))\\n\", ctx->name, av_err2str(AVERROR(errno)));\n+                    av_log(logger(ctx), AV_LOG_ERROR, \"%s unmap plane (%s))\\n\",\n+                        ctx->name, av_err2str(AVERROR(errno)));\n         }\n     }\n \n-    return ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_REQBUFS, &req);\n+    ret = ioctl(ctx_to_m2mctx(ctx)->fd, VIDIOC_REQBUFS, &req);\n+    if (ret < 0) {\n+            av_log(logger(ctx), AV_LOG_ERROR, \"release all %s buffers (%s)\\n\",\n+                ctx->name, av_err2str(AVERROR(errno)));\n+\n+            if (ctx_to_m2mctx(ctx)->output_drm)\n+                av_log(logger(ctx), AV_LOG_ERROR,\n+                    \"Make sure the DRM client releases all FB/GEM objects before closing the codec (ie):\\n\"\n+                    \"for all buffers: \\n\"\n+                    \"  1. drmModeRmFB(..)\\n\"\n+                    \"  2. drmIoctl(.., DRM_IOCTL_GEM_CLOSE,... )\\n\");\n+    }\n+\n+    return ret;\n }\n \n static inline int v4l2_try_raw_format(V4L2Context* ctx, enum AVPixelFormat pixfmt)\ndiff --git a/libavcodec/v4l2_m2m.h b/libavcodec/v4l2_m2m.h\nindex b67b216331..0fbd19a013 100644\n--- a/libavcodec/v4l2_m2m.h\n+++ b/libavcodec/v4l2_m2m.h\n@@ -66,6 +66,9 @@ typedef struct V4L2m2mContext {\n \n     /* reference back to V4L2m2mPriv */\n     void *priv;\n+\n+    /* generate DRM frames */\n+    int output_drm;\n } V4L2m2mContext;\n \n typedef struct V4L2m2mPriv {\ndiff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c\nindex ab07c0a24a..6bc7442702 100644\n--- a/libavcodec/v4l2_m2m_dec.c\n+++ b/libavcodec/v4l2_m2m_dec.c\n@@ -23,6 +23,9 @@\n \n #include <linux/videodev2.h>\n #include <sys/ioctl.h>\n+\n+#include \"libavutil/hwcontext.h\"\n+#include \"libavutil/hwcontext_drm.h\"\n #include \"libavutil/pixfmt.h\"\n #include \"libavutil/pixdesc.h\"\n #include \"libavutil/opt.h\"\n@@ -30,6 +33,9 @@\n #include \"libavcodec/decode.h\"\n #include \"libavcodec/internal.h\"\n \n+#include \"libavcodec/hwaccels.h\"\n+#include \"libavcodec/internal.h\"\n+\n #include \"v4l2_context.h\"\n #include \"v4l2_m2m.h\"\n #include \"v4l2_fmt.h\"\n@@ -201,6 +207,15 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)\n     capture->av_codec_id = AV_CODEC_ID_RAWVIDEO;\n     capture->av_pix_fmt = avctx->pix_fmt;\n \n+    /* the client requests the codec to generate DRM frames:\n+     *   - data[0] will therefore point to the returned AVDRMFrameDescriptor\n+     *       check the ff_v4l2_buffer_to_avframe conversion function.\n+     *   - the DRM frame format is passed in the DRM frame descriptor layer.\n+     *       check the v4l2_get_drm_frame function.\n+     */\n+    if (ff_get_format(avctx, avctx->codec->pix_fmts) == AV_PIX_FMT_DRM_PRIME)\n+        s->output_drm = 1;\n+\n     s->avctx = avctx;\n     ret = ff_v4l2_m2m_codec_init(priv);\n     if (ret) {\n@@ -226,6 +241,11 @@ static const AVOption options[] = {\n     { NULL},\n };\n \n+static const AVCodecHWConfigInternal *v4l2_m2m_hw_configs[] = {\n+    HW_CONFIG_INTERNAL(DRM_PRIME),\n+    NULL\n+};\n+\n #define M2MDEC_CLASS(NAME) \\\n     static const AVClass v4l2_m2m_ ## NAME ## _dec_class = { \\\n         .class_name = #NAME \"_v4l2m2m_decoder\", \\\n@@ -249,6 +269,9 @@ static const AVOption options[] = {\n         .bsfs           = bsf_name, \\\n         .capabilities   = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \\\n         .caps_internal  = FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_CLEANUP, \\\n+        .pix_fmts       = (const enum AVPixelFormat[]) { AV_PIX_FMT_DRM_PRIME, \\\n+                                                         AV_PIX_FMT_NONE}, \\\n+        .hw_configs     = v4l2_m2m_hw_configs, \\\n         .wrapper_name   = \"v4l2m2m\", \\\n     }\n \n\nFrom deb0ba531401f069dc6e4dcf235dfc08bca6577c Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Thu, 16 Aug 2018 21:09:40 -0700\nSubject: [PATCH 2/9] libavcodec: v4l2m2m: depends on libdrm\n\n---\n configure                 | 1 +\n libavcodec/v4l2_buffers.c | 2 +-\n 2 files changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/configure b/configure\nindex 4ba72bf84b..efb065905c 100755\n--- a/configure\n+++ b/configure\n@@ -3438,6 +3438,7 @@ sndio_indev_deps=\"sndio\"\n sndio_outdev_deps=\"sndio\"\n v4l2_indev_deps_any=\"linux_videodev2_h sys_videoio_h\"\n v4l2_indev_suggest=\"libv4l2\"\n+v4l2_outdev_deps=\"libdrm\"\n v4l2_outdev_deps_any=\"linux_videodev2_h sys_videoio_h\"\n v4l2_outdev_suggest=\"libv4l2\"\n vfwcap_indev_deps=\"vfw32 vfwcap_defines\"\ndiff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c\nindex cbd3e5680d..bebe2c1796 100644\n--- a/libavcodec/v4l2_buffers.c\n+++ b/libavcodec/v4l2_buffers.c\n@@ -21,7 +21,7 @@\n  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n  */\n \n-#include <drm/drm_fourcc.h>\n+#include <drm_fourcc.h>\n #include <linux/videodev2.h>\n #include <sys/ioctl.h>\n #include <sys/mman.h>\n\nFrom f89fad11f53110cd6968c83e89bafb0c449f34ec Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Thu, 16 Aug 2018 21:10:13 -0700\nSubject: [PATCH 3/9] libavcodec: v4l2m2m: set format_modifier to\n DRM_FORMAT_MOD_LINEAR\n\n---\n libavcodec/v4l2_buffers.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c\nindex bebe2c1796..12037d5d66 100644\n--- a/libavcodec/v4l2_buffers.c\n+++ b/libavcodec/v4l2_buffers.c\n@@ -328,10 +328,12 @@ static int v4l2_buffer_export_drm(V4L2Buffer* avbuf)\n             /* drm frame */\n             avbuf->drm_frame.objects[i].size = avbuf->buf.m.planes[i].length;\n             avbuf->drm_frame.objects[i].fd = expbuf.fd;\n+            avbuf->drm_frame.objects[i].format_modifier = DRM_FORMAT_MOD_LINEAR;\n         } else {\n             /* drm frame */\n             avbuf->drm_frame.objects[0].size = avbuf->buf.length;\n             avbuf->drm_frame.objects[0].fd = expbuf.fd;\n+            avbuf->drm_frame.objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR;\n         }\n     }\n \n\nFrom d5a37af1a8fe1ed70428e55286126d241986dd0c Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Thu, 16 Aug 2018 21:10:53 -0700\nSubject: [PATCH 4/9] libavcodec: v4l2m2m: only mmap the buffer when it is\n output type and drm prime is used\n\n---\n libavcodec/v4l2_buffers.c | 20 ++++++++++++++------\n 1 file changed, 14 insertions(+), 6 deletions(-)\n\ndiff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c\nindex 12037d5d66..1adf518ab9 100644\n--- a/libavcodec/v4l2_buffers.c\n+++ b/libavcodec/v4l2_buffers.c\n@@ -662,14 +662,22 @@ int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index)\n \n         if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) {\n             avbuf->plane_info[i].length = avbuf->buf.m.planes[i].length;\n-            avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.m.planes[i].length,\n-                                           PROT_READ | PROT_WRITE, MAP_SHARED,\n-                                           buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.planes[i].m.mem_offset);\n+\n+            if ((V4L2_TYPE_IS_OUTPUT(ctx->type) && buf_to_m2mctx(avbuf)->output_drm) ||\n+                !buf_to_m2mctx(avbuf)->output_drm) {\n+                avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.m.planes[i].length,\n+                                               PROT_READ | PROT_WRITE, MAP_SHARED,\n+                                               buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.planes[i].m.mem_offset);\n+            }\n         } else {\n             avbuf->plane_info[i].length = avbuf->buf.length;\n-            avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.length,\n-                                          PROT_READ | PROT_WRITE, MAP_SHARED,\n-                                          buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.offset);\n+\n+            if ((V4L2_TYPE_IS_OUTPUT(ctx->type) && buf_to_m2mctx(avbuf)->output_drm) ||\n+                !buf_to_m2mctx(avbuf)->output_drm) {\n+                avbuf->plane_info[i].mm_addr = mmap(NULL, avbuf->buf.length,\n+                                               PROT_READ | PROT_WRITE, MAP_SHARED,\n+                                               buf_to_m2mctx(avbuf)->fd, avbuf->buf.m.offset);\n+            }\n         }\n \n         if (avbuf->plane_info[i].mm_addr == MAP_FAILED)\n\nFrom d0be699166cdc413a5dc3e1c087433ac7cf142e7 Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Thu, 16 Aug 2018 21:11:38 -0700\nSubject: [PATCH 5/9] libavcodec: v4l2m2m: allow using software pixel formats\n\n---\n libavcodec/v4l2_m2m_dec.c | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)\n\ndiff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c\nindex 6bc7442702..4b9baf833c 100644\n--- a/libavcodec/v4l2_m2m_dec.c\n+++ b/libavcodec/v4l2_m2m_dec.c\n@@ -213,8 +213,16 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)\n      *   - the DRM frame format is passed in the DRM frame descriptor layer.\n      *       check the v4l2_get_drm_frame function.\n      */\n-    if (ff_get_format(avctx, avctx->codec->pix_fmts) == AV_PIX_FMT_DRM_PRIME)\n+    switch (ff_get_format(avctx, avctx->codec->pix_fmts)) {\n+    case AV_PIX_FMT_DRM_PRIME:\n         s->output_drm = 1;\n+        break;\n+    case AV_PIX_FMT_NONE:\n+        return 0;\n+        break;\n+    default:\n+        break;\n+    }\n \n     s->avctx = avctx;\n     ret = ff_v4l2_m2m_codec_init(priv);\n@@ -270,6 +278,7 @@ static const AVCodecHWConfigInternal *v4l2_m2m_hw_configs[] = {\n         .capabilities   = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \\\n         .caps_internal  = FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_CLEANUP, \\\n         .pix_fmts       = (const enum AVPixelFormat[]) { AV_PIX_FMT_DRM_PRIME, \\\n+                                                         AV_PIX_FMT_NV12, \\\n                                                          AV_PIX_FMT_NONE}, \\\n         .hw_configs     = v4l2_m2m_hw_configs, \\\n         .wrapper_name   = \"v4l2m2m\", \\\n\nFrom c4736742883eb2a1965ac65a5c75d5409e3c85a0 Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Mon, 24 Sep 2018 13:39:31 -0700\nSubject: [PATCH 6/9] libavcodec: v4l2m2m: implement hwcontext\n\n---\n libavcodec/v4l2_buffers.c | 22 ++++++++++++++++++++++\n libavcodec/v4l2_context.h |  2 ++\n libavcodec/v4l2_m2m.h     |  2 ++\n libavcodec/v4l2_m2m_dec.c | 11 +++++++++++\n 4 files changed, 37 insertions(+)\n\ndiff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c\nindex 1adf518ab9..6e2a544394 100644\n--- a/libavcodec/v4l2_buffers.c\n+++ b/libavcodec/v4l2_buffers.c\n@@ -435,6 +435,7 @@ static int v4l2_buffer_buf_to_swframe(AVFrame *frame, V4L2Buffer *avbuf)\n \n         frame->data[0] = (uint8_t *) v4l2_get_drm_frame(avbuf);\n         frame->format = AV_PIX_FMT_DRM_PRIME;\n+        frame->hw_frames_ctx = av_buffer_ref(avbuf->context->frames_ref);\n     } else {\n         /* 1. get references to the actual data */\n         for (i = 0; i < avbuf->num_planes; i++) {\n@@ -635,6 +636,27 @@ int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index)\n     avbuf->buf.type = ctx->type;\n     avbuf->buf.index = index;\n \n+    if (buf_to_m2mctx(avbuf)->output_drm) {\n+        AVHWFramesContext *hwframes;\n+\n+        av_buffer_unref(&ctx->frames_ref);\n+\n+        ctx->frames_ref = av_hwframe_ctx_alloc(buf_to_m2mctx(avbuf)->device_ref);\n+        if (!ctx->frames_ref) {\n+            ret = AVERROR(ENOMEM);\n+            return ret;\n+        }\n+\n+        hwframes = (AVHWFramesContext*)ctx->frames_ref->data;\n+        hwframes->format = AV_PIX_FMT_DRM_PRIME;\n+        hwframes->sw_format = ctx->av_pix_fmt;\n+        hwframes->width = ctx->width;\n+        hwframes->height = ctx->height;\n+        ret = av_hwframe_ctx_init(ctx->frames_ref);\n+        if (ret < 0)\n+            return ret;\n+    }\n+\n     if (V4L2_TYPE_IS_MULTIPLANAR(ctx->type)) {\n         avbuf->buf.length = VIDEO_MAX_PLANES;\n         avbuf->buf.m.planes = avbuf->planes;\ndiff --git a/libavcodec/v4l2_context.h b/libavcodec/v4l2_context.h\nindex 22a9532444..e804e94131 100644\n--- a/libavcodec/v4l2_context.h\n+++ b/libavcodec/v4l2_context.h\n@@ -92,6 +92,8 @@ typedef struct V4L2Context {\n      */\n     int done;\n \n+    AVBufferRef *frames_ref;\n+\n } V4L2Context;\n \n /**\ndiff --git a/libavcodec/v4l2_m2m.h b/libavcodec/v4l2_m2m.h\nindex 0fbd19a013..adf5997bb5 100644\n--- a/libavcodec/v4l2_m2m.h\n+++ b/libavcodec/v4l2_m2m.h\n@@ -67,6 +67,8 @@ typedef struct V4L2m2mContext {\n     /* reference back to V4L2m2mPriv */\n     void *priv;\n \n+    AVBufferRef *device_ref;\n+\n     /* generate DRM frames */\n     int output_drm;\n } V4L2m2mContext;\ndiff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c\nindex 4b9baf833c..6c23693137 100644\n--- a/libavcodec/v4l2_m2m_dec.c\n+++ b/libavcodec/v4l2_m2m_dec.c\n@@ -35,6 +35,7 @@\n \n #include \"libavcodec/hwaccels.h\"\n #include \"libavcodec/internal.h\"\n+#include \"libavcodec/hwconfig.h\"\n \n #include \"v4l2_context.h\"\n #include \"v4l2_m2m.h\"\n@@ -224,6 +225,16 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)\n         break;\n     }\n \n+    s->device_ref = av_hwdevice_ctx_alloc(AV_HWDEVICE_TYPE_DRM);\n+    if (!s->device_ref) {\n+        ret = AVERROR(ENOMEM);\n+        return ret;\n+    }\n+\n+    ret = av_hwdevice_ctx_init(s->device_ref);\n+    if (ret < 0)\n+        return ret;\n+\n     s->avctx = avctx;\n     ret = ff_v4l2_m2m_codec_init(priv);\n     if (ret) {\n\nFrom 0b15c77718900bf60c91217ed1492390022ad6db Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Mon, 4 May 2020 13:01:29 -0700\nSubject: [PATCH 7/9] libavcodec: v4l2m2m: allow lower minimum buffer values\n\nThere is no reason to enforce a high minimum. In the context\nof streaming only a few output buffers and capture buffers\nare even needed for continuous playback. This also helps\nalleviate memory pressure when decoding 4K media.\n---\n libavcodec/v4l2_m2m.h     | 2 +-\n libavcodec/v4l2_m2m_dec.c | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/libavcodec/v4l2_m2m.h b/libavcodec/v4l2_m2m.h\nindex adf5997bb5..1082b9dad2 100644\n--- a/libavcodec/v4l2_m2m.h\n+++ b/libavcodec/v4l2_m2m.h\n@@ -38,7 +38,7 @@\n \n #define V4L_M2M_DEFAULT_OPTS \\\n     { \"num_output_buffers\", \"Number of buffers in the output context\",\\\n-        OFFSET(num_output_buffers), AV_OPT_TYPE_INT, { .i64 = 16 }, 6, INT_MAX, FLAGS }\n+        OFFSET(num_output_buffers), AV_OPT_TYPE_INT, { .i64 = 16 }, 2, INT_MAX, FLAGS }\n \n typedef struct V4L2m2mContext {\n     char devname[PATH_MAX];\ndiff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c\nindex 6c23693137..e323c37052 100644\n--- a/libavcodec/v4l2_m2m_dec.c\n+++ b/libavcodec/v4l2_m2m_dec.c\n@@ -256,7 +256,7 @@ static av_cold int v4l2_decode_close(AVCodecContext *avctx)\n static const AVOption options[] = {\n     V4L_M2M_DEFAULT_OPTS,\n     { \"num_capture_buffers\", \"Number of buffers in the capture context\",\n-        OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 20}, 20, INT_MAX, FLAGS },\n+        OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 20}, 2, INT_MAX, FLAGS },\n     { NULL},\n };\n \n\nFrom acc86933e5fe3a13aae44cf84c48bab6c717e49b Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Wed, 6 May 2020 11:12:58 -0700\nSubject: [PATCH 8/9] libavcodec: v4l2m2m: add option to specify pixel format\n used by the decoder\n\n---\n libavcodec/v4l2_context.c | 9 +++++++++\n libavcodec/v4l2_m2m.h     | 2 ++\n libavcodec/v4l2_m2m_dec.c | 1 +\n 3 files changed, 12 insertions(+)\n\ndiff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c\nindex e9e8c27a54..a97b70e836 100644\n--- a/libavcodec/v4l2_context.c\n+++ b/libavcodec/v4l2_context.c\n@@ -531,6 +531,8 @@ static inline int v4l2_try_raw_format(V4L2Context* ctx, enum AVPixelFormat pixfm\n \n static int v4l2_get_raw_format(V4L2Context* ctx, enum AVPixelFormat *p)\n {\n+    V4L2m2mContext* s = ctx_to_m2mctx(ctx);\n+    V4L2m2mPriv *priv = s->avctx->priv_data;\n     enum AVPixelFormat pixfmt = ctx->av_pix_fmt;\n     struct v4l2_fmtdesc fdesc;\n     int ret;\n@@ -549,6 +551,13 @@ static int v4l2_get_raw_format(V4L2Context* ctx, enum AVPixelFormat *p)\n         if (ret)\n             return AVERROR(EINVAL);\n \n+        if (priv->pix_fmt != AV_PIX_FMT_NONE) {\n+            if (fdesc.pixelformat != ff_v4l2_format_avfmt_to_v4l2(priv->pix_fmt)) {\n+                fdesc.index++;\n+                continue;\n+            }\n+        }\n+\n         pixfmt = ff_v4l2_format_v4l2_to_avfmt(fdesc.pixelformat, AV_CODEC_ID_RAWVIDEO);\n         ret = v4l2_try_raw_format(ctx, pixfmt);\n         if (ret){\ndiff --git a/libavcodec/v4l2_m2m.h b/libavcodec/v4l2_m2m.h\nindex 1082b9dad2..943a8923c4 100644\n--- a/libavcodec/v4l2_m2m.h\n+++ b/libavcodec/v4l2_m2m.h\n@@ -30,6 +30,7 @@\n #include <linux/videodev2.h>\n \n #include \"libavcodec/avcodec.h\"\n+#include \"libavutil/pixfmt.h\"\n #include \"v4l2_context.h\"\n \n #define container_of(ptr, type, member) ({ \\\n@@ -81,6 +82,7 @@ typedef struct V4L2m2mPriv {\n \n     int num_output_buffers;\n     int num_capture_buffers;\n+    enum AVPixelFormat pix_fmt;\n } V4L2m2mPriv;\n \n /**\ndiff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c\nindex e323c37052..363e998142 100644\n--- a/libavcodec/v4l2_m2m_dec.c\n+++ b/libavcodec/v4l2_m2m_dec.c\n@@ -257,6 +257,7 @@ static const AVOption options[] = {\n     V4L_M2M_DEFAULT_OPTS,\n     { \"num_capture_buffers\", \"Number of buffers in the capture context\",\n         OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 20}, 2, INT_MAX, FLAGS },\n+    { \"pixel_format\", \"Pixel format to be used by the decoder\", OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, {.i64 = AV_PIX_FMT_NONE}, AV_PIX_FMT_NONE, AV_PIX_FMT_NB, FLAGS },\n     { NULL},\n };\n \n\nFrom 909ca6380d9112cc0111266da02a4a8e1e5abc1e Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Mon, 24 Sep 2018 13:39:56 -0700\nSubject: [PATCH 9/9] libavcodec: v4l2m2m: implement flush\n\n---\n libavcodec/v4l2_m2m_dec.c | 36 ++++++++++++++++++++++++++++++++++++\n 1 file changed, 36 insertions(+)\n\ndiff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c\nindex 363e998142..52ec67cb59 100644\n--- a/libavcodec/v4l2_m2m_dec.c\n+++ b/libavcodec/v4l2_m2m_dec.c\n@@ -250,6 +250,41 @@ static av_cold int v4l2_decode_close(AVCodecContext *avctx)\n     return ff_v4l2_m2m_codec_end(avctx->priv_data);\n }\n \n+static void v4l2_decode_flush(AVCodecContext *avctx)\n+{\n+    V4L2m2mPriv *priv = avctx->priv_data;\n+    V4L2m2mContext* s = priv->context;\n+    V4L2Context* output = &s->output;\n+    V4L2Context* capture = &s->capture;\n+    int ret, i;\n+\n+    ret = ff_v4l2_context_set_status(output, VIDIOC_STREAMOFF);\n+    if (ret < 0)\n+        av_log(avctx, AV_LOG_ERROR, \"VIDIOC_STREAMOFF %s error: %d\\n\", output->name, ret);\n+\n+    ret = ff_v4l2_context_set_status(output, VIDIOC_STREAMON);\n+    if (ret < 0)\n+        av_log(avctx, AV_LOG_ERROR, \"VIDIOC_STREAMON %s error: %d\\n\", output->name, ret);\n+\n+    for (i = 0; i < output->num_buffers; i++) {\n+        if (output->buffers[i].status == V4L2BUF_IN_DRIVER)\n+            output->buffers[i].status = V4L2BUF_AVAILABLE;\n+    }\n+\n+    struct v4l2_decoder_cmd cmd = {\n+        .cmd = V4L2_DEC_CMD_START,\n+        .flags = 0,\n+    };\n+\n+    ret = ioctl(s->fd, VIDIOC_DECODER_CMD, &cmd);\n+    if (ret < 0)\n+        av_log(avctx, AV_LOG_ERROR, \"VIDIOC_DECODER_CMD start error: %d\\n\", errno);\n+\n+    s->draining = 0;\n+    output->done = 0;\n+    capture->done = 0;\n+}\n+\n #define OFFSET(x) offsetof(V4L2m2mPriv, x)\n #define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM\n \n@@ -286,6 +321,7 @@ static const AVCodecHWConfigInternal *v4l2_m2m_hw_configs[] = {\n         .init           = v4l2_decode_init, \\\n         .receive_frame  = v4l2_receive_frame, \\\n         .close          = v4l2_decode_close, \\\n+        .flush          = v4l2_decode_flush, \\\n         .bsfs           = bsf_name, \\\n         .capabilities   = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \\\n         .caps_internal  = FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_CLEANUP, \\\n"
  },
  {
    "path": "packages/multimedia/ffmpeg/patches/v4l2-request/ffmpeg-001-v4l2-request.patch",
    "content": "From 46ce980905101822ca824243635d10d660172570 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 3 Dec 2018 23:48:04 +0100\nSubject: [PATCH 01/12] avutil: add av_buffer_pool_flush()\n\nUsed by V4L2 request API hwaccel\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n libavutil/buffer.c | 13 +++++++++++++\n libavutil/buffer.h |  5 +++++\n 2 files changed, 18 insertions(+)\n\ndiff --git a/libavutil/buffer.c b/libavutil/buffer.c\nindex 858633e8c7..41555d9982 100644\n--- a/libavutil/buffer.c\n+++ b/libavutil/buffer.c\n@@ -305,6 +305,19 @@ static void buffer_pool_free(AVBufferPool *pool)\n     av_freep(&pool);\n }\n \n+void av_buffer_pool_flush(AVBufferPool *pool)\n+{\n+    ff_mutex_lock(&pool->mutex);\n+    while (pool->pool) {\n+        BufferPoolEntry *buf = pool->pool;\n+        pool->pool = buf->next;\n+\n+        buf->free(buf->opaque, buf->data);\n+        av_freep(&buf);\n+    }\n+    ff_mutex_unlock(&pool->mutex);\n+}\n+\n void av_buffer_pool_uninit(AVBufferPool **ppool)\n {\n     AVBufferPool *pool;\ndiff --git a/libavutil/buffer.h b/libavutil/buffer.h\nindex 241a80ed67..f41363faf1 100644\n--- a/libavutil/buffer.h\n+++ b/libavutil/buffer.h\n@@ -315,6 +315,11 @@ AVBufferPool *av_buffer_pool_init2(size_t size, void *opaque,\n #endif\n                                    void (*pool_free)(void *opaque));\n \n+/**\n+ * Free all available buffers in a buffer pool.\n+ */\n+ void av_buffer_pool_flush(AVBufferPool *pool);\n+\n /**\n  * Mark the pool as being available for freeing. It will actually be freed only\n  * once all the allocated buffers associated with the pool are released. Thus it\n\nFrom 6f3b6c4d442a9a3322305e5600ce7f84af5971cc Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sat, 15 Dec 2018 22:32:16 +0100\nSubject: [PATCH 02/12] Add common V4L2 request API code\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n configure                 |   12 +\n libavcodec/Makefile       |    1 +\n libavcodec/hwconfig.h     |    2 +\n libavcodec/v4l2_request.c | 1027 +++++++++++++++++++++++++++++++++++++\n libavcodec/v4l2_request.h |   77 +++\n 5 files changed, 1119 insertions(+)\n create mode 100644 libavcodec/v4l2_request.c\n create mode 100644 libavcodec/v4l2_request.h\n\ndiff --git a/configure b/configure\nindex 4ba72bf84b..4a3a5ae9e0 100755\n--- a/configure\n+++ b/configure\n@@ -279,6 +279,7 @@ External library support:\n                            if openssl, gnutls or mbedtls is not used [no]\n   --enable-libtwolame      enable MP2 encoding via libtwolame [no]\n   --enable-libuavs3d       enable AVS3 decoding via libuavs3d [no]\n+  --enable-libudev         enable libudev [no]\n   --enable-libv4l2         enable libv4l2/v4l-utils [no]\n   --enable-libvidstab      enable video stabilization using vid.stab [no]\n   --enable-libvmaf         enable vmaf filter via libvmaf [no]\n@@ -346,6 +347,7 @@ External library support:\n   --enable-omx-rpi         enable OpenMAX IL code for Raspberry Pi [no]\n   --enable-rkmpp           enable Rockchip Media Process Platform code [no]\n   --disable-v4l2-m2m       disable V4L2 mem2mem code [autodetect]\n+  --enable-v4l2-request    enable V4L2 request API code [no]\n   --disable-vaapi          disable Video Acceleration API (mainly Unix/Intel) code [autodetect]\n   --disable-vdpau          disable Nvidia Video Decode and Presentation API for Unix code [autodetect]\n   --disable-videotoolbox   disable VideoToolbox code [autodetect]\n@@ -1814,6 +1816,7 @@ EXTERNAL_LIBRARY_LIST=\"\n     libtheora\n     libtwolame\n     libuavs3d\n+    libudev\n     libv4l2\n     libvmaf\n     libvorbis\n@@ -1868,6 +1871,7 @@ HWACCEL_LIBRARY_LIST=\"\n     mmal\n     omx\n     opencl\n+    v4l2_request\n     vulkan\n \"\n \n@@ -2920,6 +2924,7 @@ d3d11va_deps=\"dxva_h ID3D11VideoDecoder ID3D11VideoContext\"\n dxva2_deps=\"dxva2api_h DXVA2_ConfigPictureDecode ole32 user32\"\n ffnvcodec_deps_any=\"libdl LoadLibrary\"\n nvdec_deps=\"ffnvcodec\"\n+v4l2_request_deps=\"linux_videodev2_h linux_media_h v4l2_timeval_to_ns libdrm libudev\"\n vaapi_x11_deps=\"xlib\"\n videotoolbox_hwaccel_deps=\"videotoolbox pthreads\"\n videotoolbox_hwaccel_extralibs=\"-framework QuartzCore\"\n@@ -6439,6 +6444,7 @@ enabled libtwolame        && require libtwolame twolame.h twolame_init -ltwolame\n                              { check_lib libtwolame twolame.h twolame_encode_buffer_float32_interleaved -ltwolame ||\n                                die \"ERROR: libtwolame must be installed and version must be >= 0.3.10\"; }\n enabled libuavs3d         && require_pkg_config libuavs3d \"uavs3d >= 1.1.41\" uavs3d.h uavs3d_decode\n+enabled libudev           && require_pkg_config libudev libudev libudev.h udev_new\n enabled libv4l2           && require_pkg_config libv4l2 libv4l2 libv4l2.h v4l2_ioctl\n enabled libvidstab        && require_pkg_config libvidstab \"vidstab >= 0.98\" vid.stab/libvidstab.h vsMotionDetectInit\n enabled libvmaf           && require_pkg_config libvmaf \"libvmaf >= 1.5.2\" libvmaf.h compute_vmaf\n@@ -6537,6 +6543,10 @@ enabled rkmpp             && { require_pkg_config rkmpp rockchip_mpp  rockchip/r\n                                { enabled libdrm ||\n                                  die \"ERROR: rkmpp requires --enable-libdrm\"; }\n                              }\n+enabled v4l2_request      && { enabled libdrm ||\n+                               die \"ERROR: v4l2-request requires --enable-libdrm\"; } &&\n+                             { enabled libudev ||\n+                               die \"ERROR: v4l2-request requires --enable-libudev\"; }\n enabled vapoursynth       && require_pkg_config vapoursynth \"vapoursynth-script >= 42\" VSScript.h vsscript_init\n \n \n@@ -6618,6 +6628,8 @@ if enabled v4l2_m2m; then\n     check_cc vp9_v4l2_m2m linux/videodev2.h \"int i = V4L2_PIX_FMT_VP9;\"\n fi\n \n+check_func_headers \"linux/media.h linux/videodev2.h\" v4l2_timeval_to_ns\n+\n check_headers sys/videoio.h\n test_code cc sys/videoio.h \"struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;\" && enable_sanitized struct_v4l2_frmivalenum_discrete\n \ndiff --git a/libavcodec/Makefile b/libavcodec/Makefile\nindex 33a280cf69..90dfffcb20 100644\n--- a/libavcodec/Makefile\n+++ b/libavcodec/Makefile\n@@ -155,6 +155,7 @@ OBJS-$(CONFIG_VP3DSP)                  += vp3dsp.o\n OBJS-$(CONFIG_VP56DSP)                 += vp56dsp.o\n OBJS-$(CONFIG_VP8DSP)                  += vp8dsp.o\n OBJS-$(CONFIG_V4L2_M2M)                += v4l2_m2m.o v4l2_context.o v4l2_buffers.o v4l2_fmt.o\n+OBJS-$(CONFIG_V4L2_REQUEST)            += v4l2_request.o\n OBJS-$(CONFIG_WMA_FREQS)               += wma_freqs.o\n OBJS-$(CONFIG_WMV2DSP)                 += wmv2dsp.o\n \ndiff --git a/libavcodec/hwconfig.h b/libavcodec/hwconfig.h\nindex f421dc909f..ee78d8ab8e 100644\n--- a/libavcodec/hwconfig.h\n+++ b/libavcodec/hwconfig.h\n@@ -80,6 +80,8 @@ typedef struct AVCodecHWConfigInternal {\n     HW_CONFIG_HWACCEL(0, 0, 1, D3D11VA_VLD,  NONE,         ff_ ## codec ## _d3d11va_hwaccel)\n #define HWACCEL_XVMC(codec) \\\n     HW_CONFIG_HWACCEL(0, 0, 1, XVMC,         NONE,         ff_ ## codec ## _xvmc_hwaccel)\n+#define HWACCEL_V4L2REQUEST(codec) \\\n+    HW_CONFIG_HWACCEL(1, 0, 0, DRM_PRIME,    DRM,          ff_ ## codec ## _v4l2request_hwaccel)\n \n #define HW_CONFIG_ENCODER(device, frames, ad_hoc, format, device_type_) \\\n     &(const AVCodecHWConfigInternal) { \\\ndiff --git a/libavcodec/v4l2_request.c b/libavcodec/v4l2_request.c\nnew file mode 100644\nindex 0000000000..b57bbf29bc\n--- /dev/null\n+++ b/libavcodec/v4l2_request.c\n@@ -0,0 +1,1027 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include <drm_fourcc.h>\n+#include <linux/media.h>\n+#include <sys/mman.h>\n+#include <sys/types.h>\n+#include <sys/stat.h>\n+#include <fcntl.h>\n+\n+#include <sys/sysmacros.h>\n+#include <libudev.h>\n+\n+#include \"decode.h\"\n+#include \"internal.h\"\n+#include \"v4l2_request.h\"\n+\n+uint64_t ff_v4l2_request_get_capture_timestamp(AVFrame *frame)\n+{\n+    V4L2RequestDescriptor *req = (V4L2RequestDescriptor*)frame->data[0];\n+    return req ? v4l2_timeval_to_ns(&req->capture.buffer.timestamp) : 0;\n+}\n+\n+int ff_v4l2_request_reset_frame(AVCodecContext *avctx, AVFrame *frame)\n+{\n+    V4L2RequestDescriptor *req = (V4L2RequestDescriptor*)frame->data[0];\n+    memset(&req->drm, 0, sizeof(AVDRMFrameDescriptor));\n+    req->output.used = 0;\n+    return 0;\n+}\n+\n+int ff_v4l2_request_append_output_buffer(AVCodecContext *avctx, AVFrame *frame, const uint8_t *data, uint32_t size)\n+{\n+    V4L2RequestDescriptor *req = (V4L2RequestDescriptor*)frame->data[0];\n+    if (req->output.used + size + (AV_INPUT_BUFFER_PADDING_SIZE * 4) <= req->output.size) {\n+        memcpy(req->output.addr + req->output.used, data, size);\n+        req->output.used += size;\n+    } else {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: output.used=%u output.size=%u size=%u\\n\", __func__, req->output.used, req->output.size, size);\n+    }\n+    return 0;\n+}\n+\n+static int v4l2_request_controls(V4L2RequestContext *ctx, int request_fd, unsigned long type, struct v4l2_ext_control *control, int count)\n+{\n+    struct v4l2_ext_controls controls = {\n+        .controls = control,\n+        .count = count,\n+        .request_fd = request_fd,\n+        .which = (request_fd >= 0) ? V4L2_CTRL_WHICH_REQUEST_VAL : 0,\n+    };\n+\n+    if (!control || !count)\n+        return 0;\n+\n+    return ioctl(ctx->video_fd, type, &controls);\n+}\n+\n+static int v4l2_request_set_controls(V4L2RequestContext *ctx, int request_fd, struct v4l2_ext_control *control, int count)\n+{\n+    return v4l2_request_controls(ctx, request_fd, VIDIOC_S_EXT_CTRLS, control, count);\n+}\n+\n+int ff_v4l2_request_set_controls(AVCodecContext *avctx, struct v4l2_ext_control *control, int count)\n+{\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    int ret;\n+\n+    ret = v4l2_request_controls(ctx, -1, VIDIOC_S_EXT_CTRLS, control, count);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: set controls failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+        return AVERROR(EINVAL);\n+    }\n+\n+    return ret;\n+}\n+\n+int ff_v4l2_request_get_controls(AVCodecContext *avctx, struct v4l2_ext_control *control, int count)\n+{\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    int ret;\n+\n+    ret = v4l2_request_controls(ctx, -1, VIDIOC_G_EXT_CTRLS, control, count);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: get controls failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+        return AVERROR(EINVAL);\n+    }\n+\n+    return ret;\n+}\n+\n+int ff_v4l2_request_query_control(AVCodecContext *avctx, struct v4l2_query_ext_ctrl *control)\n+{\n+    int ret;\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+\n+    ret = ioctl(ctx->video_fd, VIDIOC_QUERY_EXT_CTRL, control);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: query control failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+        return AVERROR(EINVAL);\n+    }\n+\n+    return 0;\n+}\n+\n+int ff_v4l2_request_query_control_default_value(AVCodecContext *avctx, uint32_t id)\n+{\n+    int ret;\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    struct v4l2_queryctrl control = {\n+        .id = id,\n+    };\n+\n+    ret = ioctl(ctx->video_fd, VIDIOC_QUERYCTRL, &control);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: query control failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+        return AVERROR(EINVAL);\n+    }\n+\n+    return control.default_value;\n+}\n+\n+static int v4l2_request_queue_buffer(V4L2RequestContext *ctx, int request_fd, V4L2RequestBuffer *buf, uint32_t flags)\n+{\n+    struct v4l2_plane planes[1] = {};\n+    struct v4l2_buffer buffer = {\n+        .type = buf->buffer.type,\n+        .memory = buf->buffer.memory,\n+        .index = buf->index,\n+        .timestamp.tv_usec = ctx->timestamp,\n+        .bytesused = buf->used,\n+        .request_fd = request_fd,\n+        .flags = ((request_fd >= 0) ? V4L2_BUF_FLAG_REQUEST_FD : 0) | flags,\n+    };\n+\n+    buf->buffer.timestamp = buffer.timestamp;\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(buf->buffer.type)) {\n+        planes[0].bytesused = buf->used;\n+        buffer.bytesused = 0;\n+        buffer.length = 1;\n+        buffer.m.planes = planes;\n+    }\n+\n+    return ioctl(ctx->video_fd, VIDIOC_QBUF, &buffer);\n+}\n+\n+static int v4l2_request_dequeue_buffer(V4L2RequestContext *ctx, V4L2RequestBuffer *buf)\n+{\n+    int ret;\n+    struct v4l2_plane planes[1] = {};\n+    struct v4l2_buffer buffer = {\n+        .type = buf->buffer.type,\n+        .memory = buf->buffer.memory,\n+        .index = buf->index,\n+    };\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(buf->buffer.type)) {\n+        buffer.length = 1;\n+        buffer.m.planes = planes;\n+    }\n+\n+    ret = ioctl(ctx->video_fd, VIDIOC_DQBUF, &buffer);\n+    if (ret < 0)\n+        return ret;\n+\n+    buf->buffer.timestamp = buffer.timestamp;\n+    return 0;\n+}\n+\n+const uint32_t v4l2_request_capture_pixelformats[] = {\n+    V4L2_PIX_FMT_NV12,\n+#ifdef DRM_FORMAT_MOD_ALLWINNER_TILED\n+    V4L2_PIX_FMT_SUNXI_TILED_NV12,\n+#endif\n+};\n+\n+static int v4l2_request_set_drm_descriptor(V4L2RequestDescriptor *req, struct v4l2_format *format)\n+{\n+    AVDRMFrameDescriptor *desc = &req->drm;\n+    AVDRMLayerDescriptor *layer = &desc->layers[0];\n+    uint32_t pixelformat = V4L2_TYPE_IS_MULTIPLANAR(format->type) ? format->fmt.pix_mp.pixelformat : format->fmt.pix.pixelformat;\n+\n+    switch (pixelformat) {\n+    case V4L2_PIX_FMT_NV12:\n+        layer->format = DRM_FORMAT_NV12;\n+        desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR;\n+        break;\n+#ifdef DRM_FORMAT_MOD_ALLWINNER_TILED\n+    case V4L2_PIX_FMT_SUNXI_TILED_NV12:\n+        layer->format = DRM_FORMAT_NV12;\n+        desc->objects[0].format_modifier = DRM_FORMAT_MOD_ALLWINNER_TILED;\n+        break;\n+#endif\n+    default:\n+        return -1;\n+    }\n+\n+    desc->nb_objects = 1;\n+    desc->objects[0].fd = req->capture.fd;\n+    desc->objects[0].size = req->capture.size;\n+\n+    desc->nb_layers = 1;\n+    layer->nb_planes = 2;\n+\n+    layer->planes[0].object_index = 0;\n+    layer->planes[0].offset = 0;\n+    layer->planes[0].pitch = V4L2_TYPE_IS_MULTIPLANAR(format->type) ? format->fmt.pix_mp.plane_fmt[0].bytesperline : format->fmt.pix.bytesperline;\n+\n+    layer->planes[1].object_index = 0;\n+    layer->planes[1].offset = layer->planes[0].pitch * (V4L2_TYPE_IS_MULTIPLANAR(format->type) ? format->fmt.pix_mp.height : format->fmt.pix.height);\n+    layer->planes[1].pitch = layer->planes[0].pitch;\n+\n+    return 0;\n+}\n+\n+static int v4l2_request_queue_decode(AVCodecContext *avctx, AVFrame *frame, struct v4l2_ext_control *control, int count, int first_slice, int last_slice)\n+{\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    V4L2RequestDescriptor *req = (V4L2RequestDescriptor*)frame->data[0];\n+    struct timeval tv = { 2, 0 };\n+    fd_set except_fds;\n+    int ret;\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: avctx=%p used=%u controls=%d index=%d fd=%d request_fd=%d first_slice=%d last_slice=%d\\n\", __func__, avctx, req->output.used, count, req->capture.index, req->capture.fd, req->request_fd, first_slice, last_slice);\n+\n+    if (first_slice)\n+        ctx->timestamp++;\n+\n+    ret = v4l2_request_set_controls(ctx, req->request_fd, control, count);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: set controls failed for request %d, %s (%d)\\n\", __func__, req->request_fd, strerror(errno), errno);\n+        return -1;\n+    }\n+\n+    memset(req->output.addr + req->output.used, 0, AV_INPUT_BUFFER_PADDING_SIZE * 4);\n+\n+    ret = v4l2_request_queue_buffer(ctx, req->request_fd, &req->output, last_slice ? 0 : V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: queue output buffer %d failed for request %d, %s (%d)\\n\", __func__, req->output.index, req->request_fd, strerror(errno), errno);\n+        return -1;\n+    }\n+\n+    if (first_slice) {\n+        ret = v4l2_request_queue_buffer(ctx, -1, &req->capture, 0);\n+        if (ret < 0) {\n+            av_log(avctx, AV_LOG_ERROR, \"%s: queue capture buffer %d failed for request %d, %s (%d)\\n\", __func__, req->capture.index, req->request_fd, strerror(errno), errno);\n+            return -1;\n+        }\n+    }\n+\n+    // NOTE: do we need to dequeue when request fails/timeout?\n+\n+    // 4. queue request and wait\n+    ret = ioctl(req->request_fd, MEDIA_REQUEST_IOC_QUEUE, NULL);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: queue request %d failed, %s (%d)\\n\", __func__, req->request_fd, strerror(errno), errno);\n+        goto fail;\n+    }\n+\n+    FD_ZERO(&except_fds);\n+    FD_SET(req->request_fd, &except_fds);\n+\n+    ret = select(req->request_fd + 1, NULL, NULL, &except_fds, &tv);\n+    if (ret == 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: request %d timeout\\n\", __func__, req->request_fd);\n+        goto fail;\n+    } else if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: select request %d failed, %s (%d)\\n\", __func__, req->request_fd, strerror(errno), errno);\n+        goto fail;\n+    }\n+\n+    ret = v4l2_request_dequeue_buffer(ctx, &req->output);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: dequeue output buffer %d failed for request %d, %s (%d)\\n\", __func__, req->output.index, req->request_fd, strerror(errno), errno);\n+        return -1;\n+    }\n+\n+    if (last_slice) {\n+        ret = v4l2_request_dequeue_buffer(ctx, &req->capture);\n+        if (ret < 0) {\n+            av_log(avctx, AV_LOG_ERROR, \"%s: dequeue capture buffer %d failed for request %d, %s (%d)\\n\", __func__, req->capture.index, req->request_fd, strerror(errno), errno);\n+            return -1;\n+        }\n+    }\n+\n+    // TODO: check errors\n+    // buffer.flags & V4L2_BUF_FLAG_ERROR\n+\n+    ret = ioctl(req->request_fd, MEDIA_REQUEST_IOC_REINIT, NULL);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: reinit request %d failed, %s (%d)\\n\", __func__, req->request_fd, strerror(errno), errno);\n+        return -1;\n+    }\n+\n+    if (last_slice)\n+        return v4l2_request_set_drm_descriptor(req, &ctx->format);\n+\n+    return 0;\n+\n+fail:\n+    ret = v4l2_request_dequeue_buffer(ctx, &req->output);\n+    if (ret < 0)\n+        av_log(avctx, AV_LOG_ERROR, \"%s: dequeue output buffer %d failed for request %d, %s (%d)\\n\", __func__, req->output.index, req->request_fd, strerror(errno), errno);\n+\n+    ret = v4l2_request_dequeue_buffer(ctx, &req->capture);\n+    if (ret < 0)\n+        av_log(avctx, AV_LOG_ERROR, \"%s: dequeue capture buffer %d failed for request %d, %s (%d)\\n\", __func__, req->capture.index, req->request_fd, strerror(errno), errno);\n+\n+    ret = ioctl(req->request_fd, MEDIA_REQUEST_IOC_REINIT, NULL);\n+    if (ret < 0)\n+        av_log(avctx, AV_LOG_ERROR, \"%s: reinit request %d failed, %s (%d)\\n\", __func__, req->request_fd, strerror(errno), errno);\n+\n+    return -1;\n+}\n+\n+int ff_v4l2_request_decode_slice(AVCodecContext *avctx, AVFrame *frame, struct v4l2_ext_control *control, int count, int first_slice, int last_slice)\n+{\n+    V4L2RequestDescriptor *req = (V4L2RequestDescriptor*)frame->data[0];\n+\n+    // fall back to queue each slice as a full frame\n+    if ((req->output.capabilities & V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF) != V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF)\n+        return v4l2_request_queue_decode(avctx, frame, control, count, 1, 1);\n+\n+    return v4l2_request_queue_decode(avctx, frame, control, count, first_slice, last_slice);\n+}\n+\n+int ff_v4l2_request_decode_frame(AVCodecContext *avctx, AVFrame *frame, struct v4l2_ext_control *control, int count)\n+{\n+    return v4l2_request_queue_decode(avctx, frame, control, count, 1, 1);\n+}\n+\n+static int v4l2_request_try_framesize(AVCodecContext *avctx, uint32_t pixelformat)\n+{\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    struct v4l2_frmsizeenum frmsize = {\n+        .index = 0,\n+        .pixel_format = pixelformat,\n+    };\n+\n+    if (ioctl(ctx->video_fd, VIDIOC_ENUM_FRAMESIZES, &frmsize) < 0)\n+        return 0;\n+\n+    /*\n+     * We only validate min/max framesize for V4L2_FRMSIZE_TYPE_STEPWISE here, since the alignment\n+     * which is eventually needed will be done driver-side later in VIDIOC_S_FMT and there is no need\n+     * validate step_width/step_height here\n+     */\n+\n+    do {\n+\n+        if (frmsize.type == V4L2_FRMSIZE_TYPE_DISCRETE && frmsize.discrete.width == avctx->coded_width &&\n+            frmsize.discrete.height == avctx->coded_height)\n+            return 0;\n+        else if ((frmsize.type == V4L2_FRMSIZE_TYPE_STEPWISE || frmsize.type == V4L2_FRMSIZE_TYPE_CONTINUOUS) &&\n+                 avctx->coded_width >= frmsize.stepwise.min_width && avctx->coded_height >= frmsize.stepwise.min_height &&\n+                 avctx->coded_width <= frmsize.stepwise.max_width && avctx->coded_height <= frmsize.stepwise.max_height)\n+            return 0;\n+\n+        frmsize.index++;\n+\n+    } while (ioctl(ctx->video_fd, VIDIOC_ENUM_FRAMESIZES, &frmsize) >= 0);\n+\n+    av_log(avctx, AV_LOG_INFO, \"%s: pixelformat %u not supported for width %u height %u\\n\", __func__, pixelformat, avctx->coded_width, avctx->coded_height);\n+\n+    return -1;\n+}\n+\n+static int v4l2_request_try_format(AVCodecContext *avctx, enum v4l2_buf_type type, uint32_t pixelformat)\n+{\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    struct v4l2_fmtdesc fmtdesc = {\n+        .index = 0,\n+        .type = type,\n+    };\n+\n+    if (V4L2_TYPE_IS_OUTPUT(type)) {\n+        struct v4l2_create_buffers buffers = {\n+            .count = 0,\n+            .memory = V4L2_MEMORY_MMAP,\n+            .format.type = type,\n+        };\n+\n+        if (ioctl(ctx->video_fd, VIDIOC_CREATE_BUFS, &buffers) < 0) {\n+            av_log(avctx, AV_LOG_ERROR, \"%s: create buffers failed for type %u, %s (%d)\\n\", __func__, type, strerror(errno), errno);\n+            return -1;\n+        }\n+\n+        if ((buffers.capabilities & V4L2_BUF_CAP_SUPPORTS_REQUESTS) != V4L2_BUF_CAP_SUPPORTS_REQUESTS) {\n+            av_log(avctx, AV_LOG_INFO, \"%s: output buffer type do not support requests, capabilities %u\\n\", __func__, buffers.capabilities);\n+            return -1;\n+        }\n+    }\n+\n+    while (ioctl(ctx->video_fd, VIDIOC_ENUM_FMT, &fmtdesc) >= 0) {\n+        if (fmtdesc.pixelformat == pixelformat)\n+            return 0;\n+\n+        fmtdesc.index++;\n+    }\n+\n+    av_log(avctx, AV_LOG_INFO, \"%s: pixelformat %u not supported for type %u\\n\", __func__, pixelformat, type);\n+    return -1;\n+}\n+\n+static int v4l2_request_set_format(AVCodecContext *avctx, enum v4l2_buf_type type, uint32_t pixelformat, uint32_t buffersize)\n+{\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    struct v4l2_format format = {\n+        .type = type,\n+    };\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(type)) {\n+        format.fmt.pix_mp.width = avctx->coded_width;\n+        format.fmt.pix_mp.height = avctx->coded_height;\n+        format.fmt.pix_mp.pixelformat = pixelformat;\n+        format.fmt.pix_mp.plane_fmt[0].sizeimage = buffersize;\n+        format.fmt.pix_mp.num_planes = 1;\n+    } else {\n+        format.fmt.pix.width = avctx->coded_width;\n+        format.fmt.pix.height = avctx->coded_height;\n+        format.fmt.pix.pixelformat = pixelformat;\n+        format.fmt.pix.sizeimage = buffersize;\n+    }\n+\n+    return ioctl(ctx->video_fd, VIDIOC_S_FMT, &format);\n+}\n+\n+static int v4l2_request_select_capture_format(AVCodecContext *avctx)\n+{\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    enum v4l2_buf_type type = ctx->format.type;\n+\n+#if 0\n+    struct v4l2_format format = {\n+        .type = type,\n+    };\n+    struct v4l2_fmtdesc fmtdesc = {\n+        .index = 0,\n+        .type = type,\n+    };\n+    uint32_t pixelformat;\n+    int i;\n+\n+    if (ioctl(ctx->video_fd, VIDIOC_G_FMT, &format) < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: get capture format failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+        return -1;\n+    }\n+\n+    pixelformat = V4L2_TYPE_IS_MULTIPLANAR(type) ? format.fmt.pix_mp.pixelformat : format.fmt.pix.pixelformat;\n+\n+    for (i = 0; i < FF_ARRAY_ELEMS(v4l2_request_capture_pixelformats); i++) {\n+        if (pixelformat == v4l2_request_capture_pixelformats[i])\n+            return v4l2_request_set_format(avctx, type, pixelformat, 0);\n+    }\n+\n+    while (ioctl(ctx->video_fd, VIDIOC_ENUM_FMT, &fmtdesc) >= 0) {\n+        for (i = 0; i < FF_ARRAY_ELEMS(v4l2_request_capture_pixelformats); i++) {\n+            if (fmtdesc.pixelformat == v4l2_request_capture_pixelformats[i])\n+                return v4l2_request_set_format(avctx, type, fmtdesc.pixelformat, 0);\n+        }\n+\n+        fmtdesc.index++;\n+    }\n+#else\n+    for (int i = 0; i < FF_ARRAY_ELEMS(v4l2_request_capture_pixelformats); i++) {\n+        uint32_t pixelformat = v4l2_request_capture_pixelformats[i];\n+        if (!v4l2_request_try_format(avctx, type, pixelformat))\n+            return v4l2_request_set_format(avctx, type, pixelformat, 0);\n+    }\n+#endif\n+\n+    return -1;\n+}\n+\n+static int v4l2_request_probe_video_device(struct udev_device *device, AVCodecContext *avctx, uint32_t pixelformat, uint32_t buffersize, struct v4l2_ext_control *control, int count)\n+{\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    int ret = AVERROR(EINVAL);\n+    struct v4l2_capability capability = {0};\n+    unsigned int capabilities = 0;\n+\n+    const char *path = udev_device_get_devnode(device);\n+    if (!path) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: get video device devnode failed\\n\", __func__);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    ctx->video_fd = open(path, O_RDWR | O_NONBLOCK, 0);\n+    if (ctx->video_fd < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: opening %s failed, %s (%d)\\n\", __func__, path, strerror(errno), errno);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    ret = ioctl(ctx->video_fd, VIDIOC_QUERYCAP, &capability);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: get video capability failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    if (capability.capabilities & V4L2_CAP_DEVICE_CAPS)\n+        capabilities = capability.device_caps;\n+    else\n+        capabilities = capability.capabilities;\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: avctx=%p ctx=%p path=%s capabilities=%u\\n\", __func__, avctx, ctx, path, capabilities);\n+\n+    if ((capabilities & V4L2_CAP_STREAMING) != V4L2_CAP_STREAMING) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: missing required streaming capability\\n\", __func__);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    if ((capabilities & V4L2_CAP_VIDEO_M2M_MPLANE) == V4L2_CAP_VIDEO_M2M_MPLANE) {\n+        ctx->output_type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;\n+        ctx->format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;\n+    } else if ((capabilities & V4L2_CAP_VIDEO_M2M) == V4L2_CAP_VIDEO_M2M) {\n+        ctx->output_type = V4L2_BUF_TYPE_VIDEO_OUTPUT;\n+        ctx->format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;\n+    } else {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: missing required mem2mem capability\\n\", __func__);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    ret = v4l2_request_try_format(avctx, ctx->output_type, pixelformat);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_WARNING, \"%s: try output format failed\\n\", __func__);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    ret = v4l2_request_try_framesize(avctx, pixelformat);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_WARNING, \"%s: try framesize failed\\n\", __func__);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    ret = v4l2_request_set_format(avctx, ctx->output_type, pixelformat, buffersize);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: set output format failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    ret = v4l2_request_set_controls(ctx, -1, control, count);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: set controls failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    ret = v4l2_request_select_capture_format(avctx);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_WARNING, \"%s: select capture format failed\\n\", __func__);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    return 0;\n+\n+fail:\n+    if (ctx->video_fd >= 0) {\n+        close(ctx->video_fd);\n+        ctx->video_fd = -1;\n+    }\n+    return ret;\n+}\n+\n+static int v4l2_request_init_context(AVCodecContext *avctx)\n+{\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    int ret;\n+\n+    ret = ioctl(ctx->video_fd, VIDIOC_G_FMT, &ctx->format);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: get capture format failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(ctx->format.type)) {\n+        av_log(avctx, AV_LOG_DEBUG, \"%s: pixelformat=%d width=%u height=%u bytesperline=%u sizeimage=%u num_planes=%u\\n\", __func__, ctx->format.fmt.pix_mp.pixelformat, ctx->format.fmt.pix_mp.width, ctx->format.fmt.pix_mp.height, ctx->format.fmt.pix_mp.plane_fmt[0].bytesperline, ctx->format.fmt.pix_mp.plane_fmt[0].sizeimage, ctx->format.fmt.pix_mp.num_planes);\n+    } else {\n+        av_log(avctx, AV_LOG_DEBUG, \"%s: pixelformat=%d width=%u height=%u bytesperline=%u sizeimage=%u\\n\", __func__, ctx->format.fmt.pix.pixelformat, ctx->format.fmt.pix.width, ctx->format.fmt.pix.height, ctx->format.fmt.pix.bytesperline, ctx->format.fmt.pix.sizeimage);\n+    }\n+\n+    ret = ff_decode_get_hw_frames_ctx(avctx, AV_HWDEVICE_TYPE_DRM);\n+    if (ret < 0)\n+        goto fail;\n+\n+    ret = ioctl(ctx->video_fd, VIDIOC_STREAMON, &ctx->output_type);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: output stream on failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    ret = ioctl(ctx->video_fd, VIDIOC_STREAMON, &ctx->format.type);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: capture stream on failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    return 0;\n+\n+fail:\n+    ff_v4l2_request_uninit(avctx);\n+    return ret;\n+}\n+\n+static int v4l2_request_probe_media_device(struct udev_device *device, AVCodecContext *avctx, uint32_t pixelformat, uint32_t buffersize, struct v4l2_ext_control *control, int count)\n+{\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    int ret;\n+    struct media_device_info device_info = {0};\n+    struct media_v2_topology topology = {0};\n+    struct media_v2_interface *interfaces = NULL;\n+    struct udev *udev = udev_device_get_udev(device);\n+    struct udev_device *video_device;\n+    dev_t devnum;\n+\n+    const char *path = udev_device_get_devnode(device);\n+    if (!path) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: get media device devnode failed\\n\", __func__);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    ctx->media_fd = open(path, O_RDWR, 0);\n+    if (ctx->media_fd < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: opening %s failed, %s (%d)\\n\", __func__, path, strerror(errno), errno);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    ret = ioctl(ctx->media_fd, MEDIA_IOC_DEVICE_INFO, &device_info);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: get media device info failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: avctx=%p ctx=%p path=%s driver=%s\\n\", __func__, avctx, ctx, path, device_info.driver);\n+\n+    ret = ioctl(ctx->media_fd, MEDIA_IOC_G_TOPOLOGY, &topology);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: get media topology failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    if (topology.num_interfaces <= 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: media device has no interfaces\\n\", __func__);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    interfaces = av_mallocz(topology.num_interfaces * sizeof(struct media_v2_interface));\n+    if (!interfaces) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: allocating media interface struct failed\\n\", __func__);\n+        ret = AVERROR(ENOMEM);\n+        goto fail;\n+    }\n+\n+    topology.ptr_interfaces = (__u64)(uintptr_t)interfaces;\n+    ret = ioctl(ctx->media_fd, MEDIA_IOC_G_TOPOLOGY, &topology);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: get media topology failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+        ret = AVERROR(EINVAL);\n+        goto fail;\n+    }\n+\n+    ret = AVERROR(EINVAL);\n+    for (int i = 0; i < topology.num_interfaces; i++) {\n+        if (interfaces[i].intf_type != MEDIA_INTF_T_V4L_VIDEO)\n+            continue;\n+\n+        devnum = makedev(interfaces[i].devnode.major, interfaces[i].devnode.minor);\n+        video_device = udev_device_new_from_devnum(udev, 'c', devnum);\n+        if (!video_device) {\n+            av_log(avctx, AV_LOG_ERROR, \"%s: video_device=%p\\n\", __func__, video_device);\n+            continue;\n+        }\n+\n+        ret = v4l2_request_probe_video_device(video_device, avctx, pixelformat, buffersize, control, count);\n+        udev_device_unref(video_device);\n+\n+        if (!ret)\n+            break;\n+    }\n+\n+    av_freep(&interfaces);\n+    return ret;\n+\n+fail:\n+    av_freep(&interfaces);\n+    if (ctx->media_fd >= 0) {\n+        close(ctx->media_fd);\n+        ctx->media_fd = -1;\n+    }\n+    return ret;\n+}\n+\n+int ff_v4l2_request_init(AVCodecContext *avctx, uint32_t pixelformat, uint32_t buffersize, struct v4l2_ext_control *control, int count)\n+{\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    int ret = AVERROR(EINVAL);\n+    struct udev *udev;\n+    struct udev_enumerate *enumerate;\n+    struct udev_list_entry *devices;\n+    struct udev_list_entry *entry;\n+    struct udev_device *device;\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: avctx=%p hw_device_ctx=%p hw_frames_ctx=%p\\n\", __func__, avctx, avctx->hw_device_ctx, avctx->hw_frames_ctx);\n+\n+    ctx->media_fd = -1;\n+    ctx->video_fd = -1;\n+    ctx->timestamp = 0;\n+\n+    udev = udev_new();\n+    if (!udev) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: allocating udev context failed\\n\", __func__);\n+        ret = AVERROR(ENOMEM);\n+        goto fail;\n+    }\n+\n+    enumerate = udev_enumerate_new(udev);\n+    if (!enumerate) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: allocating udev enumerator failed\\n\", __func__);\n+        ret = AVERROR(ENOMEM);\n+        goto fail;\n+    }\n+\n+    udev_enumerate_add_match_subsystem(enumerate, \"media\");\n+    udev_enumerate_scan_devices(enumerate);\n+\n+    devices = udev_enumerate_get_list_entry(enumerate);\n+    udev_list_entry_foreach(entry, devices) {\n+        const char *path = udev_list_entry_get_name(entry);\n+        if (!path)\n+            continue;\n+\n+        device = udev_device_new_from_syspath(udev, path);\n+        if (!device)\n+            continue;\n+\n+        ret = v4l2_request_probe_media_device(device, avctx, pixelformat, buffersize, control, count);\n+        udev_device_unref(device);\n+\n+        if (!ret)\n+            break;\n+    }\n+\n+    udev_enumerate_unref(enumerate);\n+\n+    if (!ret)\n+        ret = v4l2_request_init_context(avctx);\n+\n+fail:\n+    udev_unref(udev);\n+    return ret;\n+}\n+\n+int ff_v4l2_request_uninit(AVCodecContext *avctx)\n+{\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    int ret;\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: avctx=%p ctx=%p\\n\", __func__, avctx, ctx);\n+\n+    if (ctx->video_fd >= 0) {\n+        ret = ioctl(ctx->video_fd, VIDIOC_STREAMOFF, &ctx->output_type);\n+        if (ret < 0)\n+            av_log(avctx, AV_LOG_ERROR, \"%s: output stream off failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+\n+        ret = ioctl(ctx->video_fd, VIDIOC_STREAMOFF, &ctx->format.type);\n+        if (ret < 0)\n+            av_log(avctx, AV_LOG_ERROR, \"%s: capture stream off failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+    }\n+\n+    if (avctx->hw_frames_ctx) {\n+        AVHWFramesContext *hwfc = (AVHWFramesContext*)avctx->hw_frames_ctx->data;\n+        av_buffer_pool_flush(hwfc->pool);\n+    }\n+\n+    if (ctx->video_fd >= 0)\n+        close(ctx->video_fd);\n+\n+    if (ctx->media_fd >= 0)\n+        close(ctx->media_fd);\n+\n+    return 0;\n+}\n+\n+static int v4l2_request_buffer_alloc(AVCodecContext *avctx, V4L2RequestBuffer *buf, enum v4l2_buf_type type)\n+{\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    int ret;\n+    struct v4l2_plane planes[1] = {};\n+    struct v4l2_create_buffers buffers = {\n+        .count = 1,\n+        .memory = V4L2_MEMORY_MMAP,\n+        .format.type = type,\n+    };\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: avctx=%p buf=%p type=%u\\n\", __func__, avctx, buf, type);\n+\n+    ret = ioctl(ctx->video_fd, VIDIOC_G_FMT, &buffers.format);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: get format failed for type %u, %s (%d)\\n\", __func__, type, strerror(errno), errno);\n+        return ret;\n+    }\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(buffers.format.type)) {\n+        av_log(avctx, AV_LOG_DEBUG, \"%s: pixelformat=%d width=%u height=%u bytesperline=%u sizeimage=%u num_planes=%u\\n\", __func__, buffers.format.fmt.pix_mp.pixelformat, buffers.format.fmt.pix_mp.width, buffers.format.fmt.pix_mp.height, buffers.format.fmt.pix_mp.plane_fmt[0].bytesperline, buffers.format.fmt.pix_mp.plane_fmt[0].sizeimage, buffers.format.fmt.pix_mp.num_planes);\n+    } else {\n+        av_log(avctx, AV_LOG_DEBUG, \"%s: pixelformat=%d width=%u height=%u bytesperline=%u sizeimage=%u\\n\", __func__, buffers.format.fmt.pix.pixelformat, buffers.format.fmt.pix.width, buffers.format.fmt.pix.height, buffers.format.fmt.pix.bytesperline, buffers.format.fmt.pix.sizeimage);\n+    }\n+\n+    ret = ioctl(ctx->video_fd, VIDIOC_CREATE_BUFS, &buffers);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: create buffers failed for type %u, %s (%d)\\n\", __func__, type, strerror(errno), errno);\n+        return ret;\n+    }\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(type)) {\n+        buf->width = buffers.format.fmt.pix_mp.width;\n+        buf->height = buffers.format.fmt.pix_mp.height;\n+        buf->size = buffers.format.fmt.pix_mp.plane_fmt[0].sizeimage;\n+        buf->buffer.length = 1;\n+        buf->buffer.m.planes = planes;\n+    } else {\n+        buf->width = buffers.format.fmt.pix.width;\n+        buf->height = buffers.format.fmt.pix.height;\n+        buf->size = buffers.format.fmt.pix.sizeimage;\n+    }\n+\n+    buf->index = buffers.index;\n+    buf->capabilities = buffers.capabilities;\n+    buf->used = 0;\n+\n+    buf->buffer.type = type;\n+    buf->buffer.memory = V4L2_MEMORY_MMAP;\n+    buf->buffer.index = buf->index;\n+\n+    ret = ioctl(ctx->video_fd, VIDIOC_QUERYBUF, &buf->buffer);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: query buffer %d failed, %s (%d)\\n\", __func__, buf->index, strerror(errno), errno);\n+        return ret;\n+    }\n+\n+    if (V4L2_TYPE_IS_OUTPUT(type)) {\n+        void *addr = mmap(NULL, buf->size, PROT_READ | PROT_WRITE, MAP_SHARED, ctx->video_fd, V4L2_TYPE_IS_MULTIPLANAR(type) ? buf->buffer.m.planes[0].m.mem_offset : buf->buffer.m.offset);\n+        if (addr == MAP_FAILED) {\n+            av_log(avctx, AV_LOG_ERROR, \"%s: mmap failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+            return -1;\n+        }\n+\n+        buf->addr = (uint8_t*)addr;\n+    } else {\n+        struct v4l2_exportbuffer exportbuffer = {\n+            .type = type,\n+            .index = buf->index,\n+            .flags = O_RDONLY,\n+        };\n+\n+        ret = ioctl(ctx->video_fd, VIDIOC_EXPBUF, &exportbuffer);\n+        if (ret < 0) {\n+            av_log(avctx, AV_LOG_ERROR, \"%s: export buffer %d failed, %s (%d)\\n\", __func__, buf->index, strerror(errno), errno);\n+            return ret;\n+        }\n+\n+        buf->fd = exportbuffer.fd;\n+    }\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: buf=%p index=%d fd=%d addr=%p width=%u height=%u size=%u\\n\", __func__, buf, buf->index, buf->fd, buf->addr, buf->width, buf->height, buf->size);\n+    return 0;\n+}\n+\n+static void v4l2_request_buffer_free(V4L2RequestBuffer *buf)\n+{\n+    av_log(NULL, AV_LOG_DEBUG, \"%s: buf=%p index=%d fd=%d addr=%p width=%u height=%u size=%u\\n\", __func__, buf, buf->index, buf->fd, buf->addr, buf->width, buf->height, buf->size);\n+\n+    if (buf->addr)\n+        munmap(buf->addr, buf->size);\n+\n+    if (buf->fd >= 0)\n+        close(buf->fd);\n+}\n+\n+static void v4l2_request_frame_free(void *opaque, uint8_t *data)\n+{\n+    AVCodecContext *avctx = opaque;\n+    V4L2RequestDescriptor *req = (V4L2RequestDescriptor*)data;\n+\n+    av_log(NULL, AV_LOG_DEBUG, \"%s: avctx=%p data=%p request_fd=%d\\n\", __func__, avctx, data, req->request_fd);\n+\n+    if (req->request_fd >= 0)\n+        close(req->request_fd);\n+\n+    v4l2_request_buffer_free(&req->capture);\n+    v4l2_request_buffer_free(&req->output);\n+\n+    av_free(data);\n+}\n+\n+static AVBufferRef *v4l2_request_frame_alloc(void *opaque, int size)\n+{\n+    AVCodecContext *avctx = opaque;\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    V4L2RequestDescriptor *req;\n+    AVBufferRef *ref;\n+    uint8_t *data;\n+    int ret;\n+\n+    data = av_mallocz(size);\n+    if (!data)\n+        return NULL;\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: avctx=%p size=%d data=%p\\n\", __func__, avctx, size, data);\n+\n+    ref = av_buffer_create(data, size, v4l2_request_frame_free, avctx, 0);\n+    if (!ref) {\n+        av_freep(&data);\n+        return NULL;\n+    }\n+\n+    req = (V4L2RequestDescriptor*)data;\n+    req->request_fd = -1;\n+    req->output.fd = -1;\n+    req->capture.fd = -1;\n+\n+    ret = v4l2_request_buffer_alloc(avctx, &req->output, ctx->output_type);\n+    if (ret < 0) {\n+        av_buffer_unref(&ref);\n+        return NULL;\n+    }\n+\n+    ret = v4l2_request_buffer_alloc(avctx, &req->capture, ctx->format.type);\n+    if (ret < 0) {\n+        av_buffer_unref(&ref);\n+        return NULL;\n+    }\n+\n+    ret = ioctl(ctx->media_fd, MEDIA_IOC_REQUEST_ALLOC, &req->request_fd);\n+    if (ret < 0) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: request alloc failed, %s (%d)\\n\", __func__, strerror(errno), errno);\n+        av_buffer_unref(&ref);\n+        return NULL;\n+    }\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: avctx=%p size=%d data=%p request_fd=%d\\n\", __func__, avctx, size, data, req->request_fd);\n+    return ref;\n+}\n+\n+static void v4l2_request_pool_free(void *opaque)\n+{\n+    av_log(NULL, AV_LOG_DEBUG, \"%s: opaque=%p\\n\", __func__, opaque);\n+}\n+\n+static void v4l2_request_hwframe_ctx_free(AVHWFramesContext *hwfc)\n+{\n+    av_log(NULL, AV_LOG_DEBUG, \"%s: hwfc=%p pool=%p\\n\", __func__, hwfc, hwfc->pool);\n+\n+    av_buffer_pool_flush(hwfc->pool);\n+    av_buffer_pool_uninit(&hwfc->pool);\n+}\n+\n+int ff_v4l2_request_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)\n+{\n+    V4L2RequestContext *ctx = avctx->internal->hwaccel_priv_data;\n+    AVHWFramesContext *hwfc = (AVHWFramesContext*)hw_frames_ctx->data;\n+\n+    hwfc->format = AV_PIX_FMT_DRM_PRIME;\n+    hwfc->sw_format = AV_PIX_FMT_NV12;\n+    if (V4L2_TYPE_IS_MULTIPLANAR(ctx->format.type)) {\n+        hwfc->width = ctx->format.fmt.pix_mp.width;\n+        hwfc->height = ctx->format.fmt.pix_mp.height;\n+    } else {\n+        hwfc->width = ctx->format.fmt.pix.width;\n+        hwfc->height = ctx->format.fmt.pix.height;\n+    }\n+\n+    hwfc->pool = av_buffer_pool_init2(sizeof(V4L2RequestDescriptor), avctx, v4l2_request_frame_alloc, v4l2_request_pool_free);\n+    if (!hwfc->pool)\n+        return AVERROR(ENOMEM);\n+\n+    hwfc->free = v4l2_request_hwframe_ctx_free;\n+\n+    hwfc->initial_pool_size = 1;\n+\n+    switch (avctx->codec_id) {\n+    case AV_CODEC_ID_VP9:\n+        hwfc->initial_pool_size += 8;\n+        break;\n+    case AV_CODEC_ID_VP8:\n+        hwfc->initial_pool_size += 3;\n+        break;\n+    default:\n+        hwfc->initial_pool_size += 2;\n+    }\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: avctx=%p ctx=%p hw_frames_ctx=%p hwfc=%p pool=%p width=%d height=%d initial_pool_size=%d\\n\", __func__, avctx, ctx, hw_frames_ctx, hwfc, hwfc->pool, hwfc->width, hwfc->height, hwfc->initial_pool_size);\n+\n+    return 0;\n+}\ndiff --git a/libavcodec/v4l2_request.h b/libavcodec/v4l2_request.h\nnew file mode 100644\nindex 0000000000..58d2aa70af\n--- /dev/null\n+++ b/libavcodec/v4l2_request.h\n@@ -0,0 +1,77 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#ifndef AVCODEC_V4L2_REQUEST_H\n+#define AVCODEC_V4L2_REQUEST_H\n+\n+#include <linux/videodev2.h>\n+\n+#include \"libavutil/hwcontext_drm.h\"\n+\n+typedef struct V4L2RequestContext {\n+    int video_fd;\n+    int media_fd;\n+    enum v4l2_buf_type output_type;\n+    struct v4l2_format format;\n+    int timestamp;\n+} V4L2RequestContext;\n+\n+typedef struct V4L2RequestBuffer {\n+    int index;\n+    int fd;\n+    uint8_t *addr;\n+    uint32_t width;\n+    uint32_t height;\n+    uint32_t size;\n+    uint32_t used;\n+    uint32_t capabilities;\n+    struct v4l2_buffer buffer;\n+} V4L2RequestBuffer;\n+\n+typedef struct V4L2RequestDescriptor {\n+    AVDRMFrameDescriptor drm;\n+    int request_fd;\n+    V4L2RequestBuffer output;\n+    V4L2RequestBuffer capture;\n+} V4L2RequestDescriptor;\n+\n+uint64_t ff_v4l2_request_get_capture_timestamp(AVFrame *frame);\n+\n+int ff_v4l2_request_reset_frame(AVCodecContext *avctx, AVFrame *frame);\n+\n+int ff_v4l2_request_append_output_buffer(AVCodecContext *avctx, AVFrame *frame, const uint8_t *data, uint32_t size);\n+\n+int ff_v4l2_request_set_controls(AVCodecContext *avctx, struct v4l2_ext_control *control, int count);\n+\n+int ff_v4l2_request_get_controls(AVCodecContext *avctx, struct v4l2_ext_control *control, int count);\n+\n+int ff_v4l2_request_query_control(AVCodecContext *avctx, struct v4l2_query_ext_ctrl *control);\n+\n+int ff_v4l2_request_query_control_default_value(AVCodecContext *avctx, uint32_t id);\n+\n+int ff_v4l2_request_decode_slice(AVCodecContext *avctx, AVFrame *frame, struct v4l2_ext_control *control, int count, int first_slice, int last_slice);\n+\n+int ff_v4l2_request_decode_frame(AVCodecContext *avctx, AVFrame *frame, struct v4l2_ext_control *control, int count);\n+\n+int ff_v4l2_request_init(AVCodecContext *avctx, uint32_t pixelformat, uint32_t buffersize, struct v4l2_ext_control *control, int count);\n+\n+int ff_v4l2_request_uninit(AVCodecContext *avctx);\n+\n+int ff_v4l2_request_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx);\n+\n+#endif /* AVCODEC_V4L2_REQUEST_H */\n\nFrom 3a8ac13e041cec840d3cd1e83e6294a1a47ac6df Mon Sep 17 00:00:00 2001\nFrom: Ezequiel Garcia <ezequiel@collabora.com>\nDate: Wed, 20 Feb 2019 11:18:00 -0300\nSubject: [PATCH 03/12] h264dec: add idr_pic_id to slice context\n\nUsed by V4L2 request API h264 hwaccel\n\nSigned-off-by: Ezequiel Garcia <ezequiel@collabora.com>\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n libavcodec/h264_slice.c | 2 +-\n libavcodec/h264dec.h    | 1 +\n 2 files changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c\nindex 0b415ada6f..b3e3ef6183 100644\n--- a/libavcodec/h264_slice.c\n+++ b/libavcodec/h264_slice.c\n@@ -1830,7 +1830,7 @@ static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,\n     }\n \n     if (nal->type == H264_NAL_IDR_SLICE)\n-        get_ue_golomb_long(&sl->gb); /* idr_pic_id */\n+        sl->idr_pic_id = get_ue_golomb_long(&sl->gb);\n \n     sl->poc_lsb = 0;\n     sl->delta_poc_bottom = 0;\ndiff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h\nindex b7b19ba4f1..0698ab95ba 100644\n--- a/libavcodec/h264dec.h\n+++ b/libavcodec/h264dec.h\n@@ -336,6 +336,7 @@ typedef struct H264SliceContext {\n     int delta_poc[2];\n     int curr_pic_num;\n     int max_pic_num;\n+    int idr_pic_id;\n } H264SliceContext;\n \n /**\n\nFrom e7f515597ca5f0900f3bd08ef40bb517703433bc Mon Sep 17 00:00:00 2001\nFrom: Boris Brezillon <boris.brezillon@collabora.com>\nDate: Wed, 22 May 2019 14:44:22 +0200\nSubject: [PATCH 04/12] h264dec: add ref_pic_marking and pic_order_cnt bit_size\n to slice context\n\nUsed by V4L2 request API h264 hwaccel\n\nSigned-off-by: Boris Brezillon <boris.brezillon@collabora.com>\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n libavcodec/h264_slice.c | 6 +++++-\n libavcodec/h264dec.h    | 2 ++\n 2 files changed, 7 insertions(+), 1 deletion(-)\n\ndiff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c\nindex b3e3ef6183..bcb9f70c0e 100644\n--- a/libavcodec/h264_slice.c\n+++ b/libavcodec/h264_slice.c\n@@ -1748,7 +1748,7 @@ static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,\n     unsigned int slice_type, tmp, i;\n     int field_pic_flag, bottom_field_flag;\n     int first_slice = sl == h->slice_ctx && !h->current_slice;\n-    int picture_structure;\n+    int picture_structure, pos;\n \n     if (first_slice)\n         av_assert0(!h->setup_finished);\n@@ -1834,6 +1834,7 @@ static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,\n \n     sl->poc_lsb = 0;\n     sl->delta_poc_bottom = 0;\n+    pos = sl->gb.index;\n     if (sps->poc_type == 0) {\n         sl->poc_lsb = get_bits(&sl->gb, sps->log2_max_poc_lsb);\n \n@@ -1848,6 +1849,7 @@ static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,\n         if (pps->pic_order_present == 1 && picture_structure == PICT_FRAME)\n             sl->delta_poc[1] = get_se_golomb(&sl->gb);\n     }\n+    sl->pic_order_cnt_bit_size = sl->gb.index - pos;\n \n     sl->redundant_pic_count = 0;\n     if (pps->redundant_pic_cnt_present)\n@@ -1887,9 +1889,11 @@ static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,\n \n     sl->explicit_ref_marking = 0;\n     if (nal->ref_idc) {\n+        pos = sl->gb.index;\n         ret = ff_h264_decode_ref_pic_marking(sl, &sl->gb, nal, h->avctx);\n         if (ret < 0 && (h->avctx->err_recognition & AV_EF_EXPLODE))\n             return AVERROR_INVALIDDATA;\n+        sl->ref_pic_marking_bit_size = sl->gb.index - pos;\n     }\n \n     if (sl->slice_type_nos != AV_PICTURE_TYPE_I && pps->cabac) {\ndiff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h\nindex 0698ab95ba..2b39e82c3b 100644\n--- a/libavcodec/h264dec.h\n+++ b/libavcodec/h264dec.h\n@@ -329,6 +329,7 @@ typedef struct H264SliceContext {\n     MMCO mmco[MAX_MMCO_COUNT];\n     int  nb_mmco;\n     int explicit_ref_marking;\n+    int ref_pic_marking_bit_size;\n \n     int frame_num;\n     int poc_lsb;\n@@ -337,6 +338,7 @@ typedef struct H264SliceContext {\n     int curr_pic_num;\n     int max_pic_num;\n     int idr_pic_id;\n+    int pic_order_cnt_bit_size;\n } H264SliceContext;\n \n /**\n\nFrom 9f455a7adb8cabb575049204375cc3b8d97b2c86 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Sat, 15 Dec 2018 22:32:16 +0100\nSubject: [PATCH 05/12] Add V4L2 request API h264 hwaccel\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n configure                      |   3 +\n libavcodec/Makefile            |   1 +\n libavcodec/h264_slice.c        |   4 +\n libavcodec/h264dec.c           |   3 +\n libavcodec/hwaccels.h          |   1 +\n libavcodec/v4l2_request_h264.c | 456 +++++++++++++++++++++++++++++++++\n 6 files changed, 468 insertions(+)\n create mode 100644 libavcodec/v4l2_request_h264.c\n\ndiff --git a/configure b/configure\nindex 4a3a5ae9e0..efd12f1b52 100755\n--- a/configure\n+++ b/configure\n@@ -2952,6 +2952,8 @@ h264_dxva2_hwaccel_deps=\"dxva2\"\n h264_dxva2_hwaccel_select=\"h264_decoder\"\n h264_nvdec_hwaccel_deps=\"nvdec\"\n h264_nvdec_hwaccel_select=\"h264_decoder\"\n+h264_v4l2request_hwaccel_deps=\"v4l2_request h264_v4l2_request\"\n+h264_v4l2request_hwaccel_select=\"h264_decoder\"\n h264_vaapi_hwaccel_deps=\"vaapi\"\n h264_vaapi_hwaccel_select=\"h264_decoder\"\n h264_vdpau_hwaccel_deps=\"vdpau\"\n@@ -6629,6 +6631,7 @@ if enabled v4l2_m2m; then\n fi\n \n check_func_headers \"linux/media.h linux/videodev2.h\" v4l2_timeval_to_ns\n+check_cc h264_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_H264_SLICE;\"\n \n check_headers sys/videoio.h\n test_code cc sys/videoio.h \"struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;\" && enable_sanitized struct_v4l2_frmivalenum_discrete\ndiff --git a/libavcodec/Makefile b/libavcodec/Makefile\nindex 90dfffcb20..426c7528e9 100644\n--- a/libavcodec/Makefile\n+++ b/libavcodec/Makefile\n@@ -935,6 +935,7 @@ OBJS-$(CONFIG_H264_D3D11VA_HWACCEL)       += dxva2_h264.o\n OBJS-$(CONFIG_H264_DXVA2_HWACCEL)         += dxva2_h264.o\n OBJS-$(CONFIG_H264_NVDEC_HWACCEL)         += nvdec_h264.o\n OBJS-$(CONFIG_H264_QSV_HWACCEL)           += qsvdec.o\n+OBJS-$(CONFIG_H264_V4L2REQUEST_HWACCEL)   += v4l2_request_h264.o\n OBJS-$(CONFIG_H264_VAAPI_HWACCEL)         += vaapi_h264.o\n OBJS-$(CONFIG_H264_VDPAU_HWACCEL)         += vdpau_h264.o\n OBJS-$(CONFIG_H264_VIDEOTOOLBOX_HWACCEL)  += videotoolbox.o\ndiff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c\nindex bcb9f70c0e..6b7f569da4 100644\n--- a/libavcodec/h264_slice.c\n+++ b/libavcodec/h264_slice.c\n@@ -768,6 +768,7 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)\n #define HWACCEL_MAX (CONFIG_H264_DXVA2_HWACCEL + \\\n                      (CONFIG_H264_D3D11VA_HWACCEL * 2) + \\\n                      CONFIG_H264_NVDEC_HWACCEL + \\\n+                     CONFIG_H264_V4L2REQUEST_HWACCEL + \\\n                      CONFIG_H264_VAAPI_HWACCEL + \\\n                      CONFIG_H264_VIDEOTOOLBOX_HWACCEL + \\\n                      CONFIG_H264_VDPAU_HWACCEL)\n@@ -852,6 +853,9 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)\n #endif\n #if CONFIG_H264_VIDEOTOOLBOX_HWACCEL\n             *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX;\n+#endif\n+#if CONFIG_H264_V4L2REQUEST_HWACCEL\n+            *fmt++ = AV_PIX_FMT_DRM_PRIME;\n #endif\n             if (h->avctx->codec->pix_fmts)\n                 choices = h->avctx->codec->pix_fmts;\ndiff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c\nindex 1705046e29..55046031b2 100644\n--- a/libavcodec/h264dec.c\n+++ b/libavcodec/h264dec.c\n@@ -1076,6 +1076,9 @@ AVCodec ff_h264_decoder = {\n #endif\n #if CONFIG_H264_VIDEOTOOLBOX_HWACCEL\n                                HWACCEL_VIDEOTOOLBOX(h264),\n+#endif\n+#if CONFIG_H264_V4L2REQUEST_HWACCEL\n+                               HWACCEL_V4L2REQUEST(h264),\n #endif\n                                NULL\n                            },\ndiff --git a/libavcodec/hwaccels.h b/libavcodec/hwaccels.h\nindex 8e54cf73f9..969a1da0f4 100644\n--- a/libavcodec/hwaccels.h\n+++ b/libavcodec/hwaccels.h\n@@ -32,6 +32,7 @@ extern const AVHWAccel ff_h264_d3d11va_hwaccel;\n extern const AVHWAccel ff_h264_d3d11va2_hwaccel;\n extern const AVHWAccel ff_h264_dxva2_hwaccel;\n extern const AVHWAccel ff_h264_nvdec_hwaccel;\n+extern const AVHWAccel ff_h264_v4l2request_hwaccel;\n extern const AVHWAccel ff_h264_vaapi_hwaccel;\n extern const AVHWAccel ff_h264_vdpau_hwaccel;\n extern const AVHWAccel ff_h264_videotoolbox_hwaccel;\ndiff --git a/libavcodec/v4l2_request_h264.c b/libavcodec/v4l2_request_h264.c\nnew file mode 100644\nindex 0000000000..394bae0550\n--- /dev/null\n+++ b/libavcodec/v4l2_request_h264.c\n@@ -0,0 +1,456 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"h264dec.h\"\n+#include \"hwconfig.h\"\n+#include \"v4l2_request.h\"\n+\n+typedef struct V4L2RequestControlsH264 {\n+    struct v4l2_ctrl_h264_sps sps;\n+    struct v4l2_ctrl_h264_pps pps;\n+    struct v4l2_ctrl_h264_scaling_matrix scaling_matrix;\n+    struct v4l2_ctrl_h264_decode_params decode_params;\n+    struct v4l2_ctrl_h264_slice_params slice_params;\n+    struct v4l2_ctrl_h264_pred_weights pred_weights;\n+    int pred_weights_required;\n+    int first_slice;\n+    int num_slices;\n+} V4L2RequestControlsH264;\n+\n+typedef struct V4L2RequestContextH264 {\n+    V4L2RequestContext base;\n+    int decode_mode;\n+    int start_code;\n+} V4L2RequestContextH264;\n+\n+static uint8_t nalu_slice_start_code[] = { 0x00, 0x00, 0x01 };\n+\n+static void fill_weight_factors(struct v4l2_h264_weight_factors *factors, int list, const H264SliceContext *sl)\n+{\n+    for (int i = 0; i < sl->ref_count[list]; i++) {\n+        if (sl->pwt.luma_weight_flag[list]) {\n+            factors->luma_weight[i] = sl->pwt.luma_weight[i][list][0];\n+            factors->luma_offset[i] = sl->pwt.luma_weight[i][list][1];\n+        } else {\n+            factors->luma_weight[i] = 1 << sl->pwt.luma_log2_weight_denom;\n+            factors->luma_offset[i] = 0;\n+        }\n+        for (int j = 0; j < 2; j++) {\n+            if (sl->pwt.chroma_weight_flag[list]) {\n+                factors->chroma_weight[i][j] = sl->pwt.chroma_weight[i][list][j][0];\n+                factors->chroma_offset[i][j] = sl->pwt.chroma_weight[i][list][j][1];\n+            } else {\n+                factors->chroma_weight[i][j] = 1 << sl->pwt.chroma_log2_weight_denom;\n+                factors->chroma_offset[i][j] = 0;\n+            }\n+        }\n+    }\n+}\n+\n+static void fill_dpb_entry(struct v4l2_h264_dpb_entry *entry, const H264Picture *pic)\n+{\n+    entry->reference_ts = ff_v4l2_request_get_capture_timestamp(pic->f);\n+    entry->pic_num = pic->pic_id;\n+    entry->frame_num = pic->long_ref ? pic->pic_id : pic->frame_num;\n+    entry->fields = pic->reference & V4L2_H264_FRAME_REF;\n+    entry->flags = V4L2_H264_DPB_ENTRY_FLAG_VALID;\n+    if (entry->fields)\n+        entry->flags |= V4L2_H264_DPB_ENTRY_FLAG_ACTIVE;\n+    if (pic->long_ref)\n+        entry->flags |= V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM;\n+    if (pic->field_picture)\n+        entry->flags |= V4L2_H264_DPB_ENTRY_FLAG_FIELD;\n+    if (pic->field_poc[0] != INT_MAX)\n+        entry->top_field_order_cnt = pic->field_poc[0];\n+    if (pic->field_poc[1] != INT_MAX)\n+        entry->bottom_field_order_cnt = pic->field_poc[1];\n+}\n+\n+static void fill_dpb(struct v4l2_ctrl_h264_decode_params *decode, const H264Context *h)\n+{\n+    int entries = 0;\n+\n+    for (int i = 0; i < h->short_ref_count; i++) {\n+        const H264Picture *pic = h->short_ref[i];\n+        if (pic && (pic->field_poc[0] != INT_MAX || pic->field_poc[1] != INT_MAX))\n+            fill_dpb_entry(&decode->dpb[entries++], pic);\n+    }\n+\n+    if (!h->long_ref_count)\n+        return;\n+\n+    for (int i = 0; i < FF_ARRAY_ELEMS(h->long_ref); i++) {\n+        const H264Picture *pic = h->long_ref[i];\n+        if (pic && (pic->field_poc[0] != INT_MAX || pic->field_poc[1] != INT_MAX))\n+            fill_dpb_entry(&decode->dpb[entries++], pic);\n+    }\n+}\n+\n+static void fill_ref_list(struct v4l2_h264_reference *reference, struct v4l2_ctrl_h264_decode_params *decode, const H264Ref *ref)\n+{\n+    uint64_t timestamp;\n+\n+    if (!ref->parent)\n+        return;\n+\n+    timestamp = ff_v4l2_request_get_capture_timestamp(ref->parent->f);\n+\n+    for (uint8_t i = 0; i < FF_ARRAY_ELEMS(decode->dpb); i++) {\n+        struct v4l2_h264_dpb_entry *entry = &decode->dpb[i];\n+        if ((entry->flags & V4L2_H264_DPB_ENTRY_FLAG_VALID) &&\n+            entry->reference_ts == timestamp) {\n+            reference->fields = ref->reference & V4L2_H264_FRAME_REF;\n+            reference->index = i;\n+            return;\n+        }\n+    }\n+}\n+\n+static void fill_sps(struct v4l2_ctrl_h264_sps *ctrl, const H264Context *h)\n+{\n+    const SPS *sps = h->ps.sps;\n+\n+    *ctrl = (struct v4l2_ctrl_h264_sps) {\n+        .profile_idc = sps->profile_idc,\n+        .constraint_set_flags = sps->constraint_set_flags,\n+        .level_idc = sps->level_idc,\n+        .seq_parameter_set_id = sps->sps_id,\n+        .chroma_format_idc = sps->chroma_format_idc,\n+        .bit_depth_luma_minus8 = sps->bit_depth_luma - 8,\n+        .bit_depth_chroma_minus8 = sps->bit_depth_chroma - 8,\n+        .log2_max_frame_num_minus4 = sps->log2_max_frame_num - 4,\n+        .pic_order_cnt_type = sps->poc_type,\n+        .log2_max_pic_order_cnt_lsb_minus4 = sps->log2_max_poc_lsb - 4,\n+        .max_num_ref_frames = sps->ref_frame_count,\n+        .num_ref_frames_in_pic_order_cnt_cycle = sps->poc_cycle_length,\n+        .offset_for_non_ref_pic = sps->offset_for_non_ref_pic,\n+        .offset_for_top_to_bottom_field = sps->offset_for_top_to_bottom_field,\n+        .pic_width_in_mbs_minus1 = h->mb_width - 1,\n+        .pic_height_in_map_units_minus1 = sps->frame_mbs_only_flag ? h->mb_height - 1 : h->mb_height / 2 - 1,\n+    };\n+\n+    if (sps->poc_cycle_length > 0 && sps->poc_cycle_length <= 255)\n+        memcpy(ctrl->offset_for_ref_frame, sps->offset_for_ref_frame, sps->poc_cycle_length * sizeof(ctrl->offset_for_ref_frame[0]));\n+\n+    if (sps->residual_color_transform_flag)\n+        ctrl->flags |= V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE;\n+    if (sps->transform_bypass)\n+        ctrl->flags |= V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS;\n+    if (sps->delta_pic_order_always_zero_flag)\n+        ctrl->flags |= V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO;\n+    if (sps->gaps_in_frame_num_allowed_flag)\n+        ctrl->flags |= V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED;\n+    if (sps->frame_mbs_only_flag)\n+        ctrl->flags |= V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY;\n+    if (sps->mb_aff)\n+        ctrl->flags |= V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD;\n+    if (sps->direct_8x8_inference_flag)\n+        ctrl->flags |= V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE;\n+}\n+\n+static void fill_pps(struct v4l2_ctrl_h264_pps *ctrl, const H264Context *h)\n+{\n+    const SPS *sps = h->ps.sps;\n+    const PPS *pps = h->ps.pps;\n+    const H264SliceContext *sl = &h->slice_ctx[0];\n+    int qp_bd_offset = 6 * (sps->bit_depth_luma - 8);\n+\n+    *ctrl = (struct v4l2_ctrl_h264_pps) {\n+        .pic_parameter_set_id = sl->pps_id,\n+        .seq_parameter_set_id = pps->sps_id,\n+        .num_slice_groups_minus1 = pps->slice_group_count - 1,\n+        .num_ref_idx_l0_default_active_minus1 = pps->ref_count[0] - 1,\n+        .num_ref_idx_l1_default_active_minus1 = pps->ref_count[1] - 1,\n+        .weighted_bipred_idc = pps->weighted_bipred_idc,\n+        .pic_init_qp_minus26 = pps->init_qp - 26 - qp_bd_offset,\n+        .pic_init_qs_minus26 = pps->init_qs - 26 - qp_bd_offset,\n+        .chroma_qp_index_offset = pps->chroma_qp_index_offset[0],\n+        .second_chroma_qp_index_offset = pps->chroma_qp_index_offset[1],\n+    };\n+\n+    if (pps->cabac)\n+        ctrl->flags |= V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE;\n+    if (pps->pic_order_present)\n+        ctrl->flags |= V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT;\n+    if (pps->weighted_pred)\n+        ctrl->flags |= V4L2_H264_PPS_FLAG_WEIGHTED_PRED;\n+    if (pps->deblocking_filter_parameters_present)\n+        ctrl->flags |= V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT;\n+    if (pps->constrained_intra_pred)\n+        ctrl->flags |= V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED;\n+    if (pps->redundant_pic_cnt_present)\n+        ctrl->flags |= V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT;\n+    if (pps->transform_8x8_mode)\n+        ctrl->flags |= V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE;\n+\n+    /* FFmpeg always provide a scaling matrix */\n+    ctrl->flags |= V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT;\n+}\n+\n+static int v4l2_request_h264_start_frame(AVCodecContext *avctx,\n+                                         av_unused const uint8_t *buffer,\n+                                         av_unused uint32_t size)\n+{\n+    const H264Context *h = avctx->priv_data;\n+    const PPS *pps = h->ps.pps;\n+    const SPS *sps = h->ps.sps;\n+    const H264SliceContext *sl = &h->slice_ctx[0];\n+    V4L2RequestControlsH264 *controls = h->cur_pic_ptr->hwaccel_picture_private;\n+\n+    fill_sps(&controls->sps, h);\n+    fill_pps(&controls->pps, h);\n+\n+    memcpy(controls->scaling_matrix.scaling_list_4x4, pps->scaling_matrix4, sizeof(controls->scaling_matrix.scaling_list_4x4));\n+    memcpy(controls->scaling_matrix.scaling_list_8x8[0], pps->scaling_matrix8[0], sizeof(controls->scaling_matrix.scaling_list_8x8[0]));\n+    memcpy(controls->scaling_matrix.scaling_list_8x8[1], pps->scaling_matrix8[3], sizeof(controls->scaling_matrix.scaling_list_8x8[1]));\n+\n+    if (sps->chroma_format_idc == 3) {\n+        memcpy(controls->scaling_matrix.scaling_list_8x8[2], pps->scaling_matrix8[1], sizeof(controls->scaling_matrix.scaling_list_8x8[2]));\n+        memcpy(controls->scaling_matrix.scaling_list_8x8[3], pps->scaling_matrix8[4], sizeof(controls->scaling_matrix.scaling_list_8x8[3]));\n+        memcpy(controls->scaling_matrix.scaling_list_8x8[4], pps->scaling_matrix8[2], sizeof(controls->scaling_matrix.scaling_list_8x8[4]));\n+        memcpy(controls->scaling_matrix.scaling_list_8x8[5], pps->scaling_matrix8[5], sizeof(controls->scaling_matrix.scaling_list_8x8[5]));\n+    }\n+\n+    controls->decode_params = (struct v4l2_ctrl_h264_decode_params) {\n+        .nal_ref_idc = h->nal_ref_idc,\n+        .frame_num = h->poc.frame_num,\n+        .top_field_order_cnt = h->cur_pic_ptr->field_poc[0] != INT_MAX ? h->cur_pic_ptr->field_poc[0] : 0,\n+        .bottom_field_order_cnt = h->cur_pic_ptr->field_poc[1] != INT_MAX ? h->cur_pic_ptr->field_poc[1] : 0,\n+        .idr_pic_id = sl->idr_pic_id,\n+        .pic_order_cnt_lsb = sl->poc_lsb,\n+        .delta_pic_order_cnt_bottom = sl->delta_poc_bottom,\n+        .delta_pic_order_cnt0 = sl->delta_poc[0],\n+        .delta_pic_order_cnt1 = sl->delta_poc[1],\n+        /* Size in bits of dec_ref_pic_marking() syntax element. */\n+        .dec_ref_pic_marking_bit_size = sl->ref_pic_marking_bit_size,\n+        /* Size in bits of pic order count syntax. */\n+        .pic_order_cnt_bit_size = sl->pic_order_cnt_bit_size,\n+        .slice_group_change_cycle = 0, /* slice group not supported by FFmpeg */\n+    };\n+\n+    if (h->picture_idr)\n+        controls->decode_params.flags |= V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC;\n+    if (FIELD_PICTURE(h))\n+        controls->decode_params.flags |= V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC;\n+    if (h->picture_structure == PICT_BOTTOM_FIELD)\n+        controls->decode_params.flags |= V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD;\n+\n+    fill_dpb(&controls->decode_params, h);\n+\n+    controls->first_slice = !FIELD_PICTURE(h) || h->first_field;\n+    controls->num_slices = 0;\n+\n+    return ff_v4l2_request_reset_frame(avctx, h->cur_pic_ptr->f);\n+}\n+\n+static int v4l2_request_h264_queue_decode(AVCodecContext *avctx, int last_slice)\n+{\n+    const H264Context *h = avctx->priv_data;\n+    V4L2RequestControlsH264 *controls = h->cur_pic_ptr->hwaccel_picture_private;\n+    V4L2RequestContextH264 *ctx = avctx->internal->hwaccel_priv_data;\n+\n+    struct v4l2_ext_control control[] = {\n+        {\n+            .id = V4L2_CID_STATELESS_H264_SPS,\n+            .ptr = &controls->sps,\n+            .size = sizeof(controls->sps),\n+        },\n+        {\n+            .id = V4L2_CID_STATELESS_H264_PPS,\n+            .ptr = &controls->pps,\n+            .size = sizeof(controls->pps),\n+        },\n+        {\n+            .id = V4L2_CID_STATELESS_H264_SCALING_MATRIX,\n+            .ptr = &controls->scaling_matrix,\n+            .size = sizeof(controls->scaling_matrix),\n+        },\n+        {\n+            .id = V4L2_CID_STATELESS_H264_DECODE_PARAMS,\n+            .ptr = &controls->decode_params,\n+            .size = sizeof(controls->decode_params),\n+        },\n+        {\n+            .id = V4L2_CID_STATELESS_H264_SLICE_PARAMS,\n+            .ptr = &controls->slice_params,\n+            .size = sizeof(controls->slice_params),\n+        },\n+        {\n+            .id = V4L2_CID_STATELESS_H264_PRED_WEIGHTS,\n+            .ptr = &controls->pred_weights,\n+            .size = sizeof(controls->pred_weights),\n+        },\n+    };\n+\n+    if (ctx->decode_mode == V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED) {\n+        int count = FF_ARRAY_ELEMS(control) - (controls->pred_weights_required ? 0 : 1);\n+        return ff_v4l2_request_decode_slice(avctx, h->cur_pic_ptr->f, control, count, controls->first_slice, last_slice);\n+    }\n+\n+    return ff_v4l2_request_decode_frame(avctx, h->cur_pic_ptr->f, control, FF_ARRAY_ELEMS(control) - 2);\n+}\n+\n+static int v4l2_request_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)\n+{\n+    const H264Context *h = avctx->priv_data;\n+    const PPS *pps = h->ps.pps;\n+    const H264SliceContext *sl = &h->slice_ctx[0];\n+    V4L2RequestControlsH264 *controls = h->cur_pic_ptr->hwaccel_picture_private;\n+    V4L2RequestContextH264 *ctx = avctx->internal->hwaccel_priv_data;\n+    int i, ret, count;\n+\n+    if (ctx->decode_mode == V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED && controls->num_slices) {\n+        ret = v4l2_request_h264_queue_decode(avctx, 0);\n+        if (ret)\n+            return ret;\n+\n+        ff_v4l2_request_reset_frame(avctx, h->cur_pic_ptr->f);\n+        controls->first_slice = 0;\n+    }\n+\n+    if (ctx->start_code == V4L2_STATELESS_H264_START_CODE_ANNEX_B) {\n+        ret = ff_v4l2_request_append_output_buffer(avctx, h->cur_pic_ptr->f, nalu_slice_start_code, 3);\n+        if (ret)\n+            return ret;\n+    }\n+\n+    ret = ff_v4l2_request_append_output_buffer(avctx, h->cur_pic_ptr->f, buffer, size);\n+    if (ret)\n+        return ret;\n+\n+    if (ctx->decode_mode != V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED)\n+        return 0;\n+\n+    controls->slice_params = (struct v4l2_ctrl_h264_slice_params) {\n+        /* Offset in bits to slice_data() from the beginning of this slice. */\n+        .header_bit_size = get_bits_count(&sl->gb),\n+\n+        .first_mb_in_slice = sl->first_mb_addr,\n+\n+        .slice_type = ff_h264_get_slice_type(sl),\n+        .colour_plane_id = 0, /* separate colour plane not supported by FFmpeg */\n+        .redundant_pic_cnt = sl->redundant_pic_count,\n+        .cabac_init_idc = sl->cabac_init_idc,\n+        .slice_qp_delta = sl->qscale - pps->init_qp,\n+        .slice_qs_delta = 0, /* not implemented by FFmpeg */\n+        .disable_deblocking_filter_idc = sl->deblocking_filter < 2 ? !sl->deblocking_filter : sl->deblocking_filter,\n+        .slice_alpha_c0_offset_div2 = sl->slice_alpha_c0_offset / 2,\n+        .slice_beta_offset_div2 = sl->slice_beta_offset / 2,\n+        .num_ref_idx_l0_active_minus1 = sl->list_count > 0 ? sl->ref_count[0] - 1 : 0,\n+        .num_ref_idx_l1_active_minus1 = sl->list_count > 1 ? sl->ref_count[1] - 1 : 0,\n+    };\n+\n+    if (sl->slice_type == AV_PICTURE_TYPE_B && sl->direct_spatial_mv_pred)\n+        controls->slice_params.flags |= V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED;\n+    /* V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH: not implemented by FFmpeg */\n+\n+    controls->pred_weights_required = V4L2_H264_CTRL_PRED_WEIGHTS_REQUIRED(&controls->pps, &controls->slice_params);\n+    if (controls->pred_weights_required) {\n+        controls->pred_weights.chroma_log2_weight_denom = sl->pwt.chroma_log2_weight_denom;\n+        controls->pred_weights.luma_log2_weight_denom = sl->pwt.luma_log2_weight_denom;\n+    }\n+\n+    count = sl->list_count > 0 ? sl->ref_count[0] : 0;\n+    for (i = 0; i < count; i++)\n+        fill_ref_list(&controls->slice_params.ref_pic_list0[i], &controls->decode_params, &sl->ref_list[0][i]);\n+    if (count && controls->pred_weights_required)\n+        fill_weight_factors(&controls->pred_weights.weight_factors[0], 0, sl);\n+\n+    count = sl->list_count > 1 ? sl->ref_count[1] : 0;\n+    for (i = 0; i < count; i++)\n+        fill_ref_list(&controls->slice_params.ref_pic_list1[i], &controls->decode_params, &sl->ref_list[1][i]);\n+    if (count && controls->pred_weights_required)\n+        fill_weight_factors(&controls->pred_weights.weight_factors[1], 1, sl);\n+\n+    controls->num_slices++;\n+    return 0;\n+}\n+\n+static int v4l2_request_h264_end_frame(AVCodecContext *avctx)\n+{\n+    const H264Context *h = avctx->priv_data;\n+    return v4l2_request_h264_queue_decode(avctx, !FIELD_PICTURE(h) || !h->first_field);\n+}\n+\n+static int v4l2_request_h264_set_controls(AVCodecContext *avctx)\n+{\n+    V4L2RequestContextH264 *ctx = avctx->internal->hwaccel_priv_data;\n+\n+    struct v4l2_ext_control control[] = {\n+        { .id = V4L2_CID_STATELESS_H264_DECODE_MODE, },\n+        { .id = V4L2_CID_STATELESS_H264_START_CODE, },\n+    };\n+\n+    ctx->decode_mode = ff_v4l2_request_query_control_default_value(avctx, V4L2_CID_STATELESS_H264_DECODE_MODE);\n+    if (ctx->decode_mode != V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED &&\n+        ctx->decode_mode != V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: unsupported decode mode, %d\\n\", __func__, ctx->decode_mode);\n+        return AVERROR(EINVAL);\n+    }\n+\n+    ctx->start_code = ff_v4l2_request_query_control_default_value(avctx, V4L2_CID_STATELESS_H264_START_CODE);\n+    if (ctx->start_code != V4L2_STATELESS_H264_START_CODE_NONE &&\n+        ctx->start_code != V4L2_STATELESS_H264_START_CODE_ANNEX_B) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: unsupported start code, %d\\n\", __func__, ctx->start_code);\n+        return AVERROR(EINVAL);\n+    }\n+\n+    control[0].value = ctx->decode_mode;\n+    control[1].value = ctx->start_code;\n+\n+    return ff_v4l2_request_set_controls(avctx, control, FF_ARRAY_ELEMS(control));\n+}\n+\n+static int v4l2_request_h264_init(AVCodecContext *avctx)\n+{\n+    const H264Context *h = avctx->priv_data;\n+    struct v4l2_ctrl_h264_sps sps;\n+    int ret;\n+\n+    struct v4l2_ext_control control[] = {\n+        {\n+            .id = V4L2_CID_STATELESS_H264_SPS,\n+            .ptr = &sps,\n+            .size = sizeof(sps),\n+        },\n+    };\n+\n+    fill_sps(&sps, h);\n+\n+    ret = ff_v4l2_request_init(avctx, V4L2_PIX_FMT_H264_SLICE, 4 * 1024 * 1024, control, FF_ARRAY_ELEMS(control));\n+    if (ret)\n+        return ret;\n+\n+    return v4l2_request_h264_set_controls(avctx);\n+}\n+\n+const AVHWAccel ff_h264_v4l2request_hwaccel = {\n+    .name           = \"h264_v4l2request\",\n+    .type           = AVMEDIA_TYPE_VIDEO,\n+    .id             = AV_CODEC_ID_H264,\n+    .pix_fmt        = AV_PIX_FMT_DRM_PRIME,\n+    .start_frame    = v4l2_request_h264_start_frame,\n+    .decode_slice   = v4l2_request_h264_decode_slice,\n+    .end_frame      = v4l2_request_h264_end_frame,\n+    .frame_priv_data_size = sizeof(V4L2RequestControlsH264),\n+    .init           = v4l2_request_h264_init,\n+    .uninit         = ff_v4l2_request_uninit,\n+    .priv_data_size = sizeof(V4L2RequestContextH264),\n+    .frame_params   = ff_v4l2_request_frame_params,\n+    .caps_internal  = HWACCEL_CAP_ASYNC_SAFE,\n+};\n\nFrom 1ffea498d7e1000acbaa456bb52e26757779622a Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sat, 15 Dec 2018 22:32:16 +0100\nSubject: [PATCH 06/12] Add V4L2 request API mpeg2 hwaccel\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n configure                       |   3 +\n libavcodec/Makefile             |   1 +\n libavcodec/hwaccels.h           |   1 +\n libavcodec/mpeg12dec.c          |   6 ++\n libavcodec/v4l2_request_mpeg2.c | 159 ++++++++++++++++++++++++++++++++\n 5 files changed, 170 insertions(+)\n create mode 100644 libavcodec/v4l2_request_mpeg2.c\n\ndiff --git a/configure b/configure\nindex efd12f1b52..1b70ea65e4 100755\n--- a/configure\n+++ b/configure\n@@ -2996,6 +2996,8 @@ mpeg2_dxva2_hwaccel_deps=\"dxva2\"\n mpeg2_dxva2_hwaccel_select=\"mpeg2video_decoder\"\n mpeg2_nvdec_hwaccel_deps=\"nvdec\"\n mpeg2_nvdec_hwaccel_select=\"mpeg2video_decoder\"\n+mpeg2_v4l2request_hwaccel_deps=\"v4l2_request mpeg2_v4l2_request\"\n+mpeg2_v4l2request_hwaccel_select=\"mpeg2video_decoder\"\n mpeg2_vaapi_hwaccel_deps=\"vaapi\"\n mpeg2_vaapi_hwaccel_select=\"mpeg2video_decoder\"\n mpeg2_vdpau_hwaccel_deps=\"vdpau\"\n@@ -6632,6 +6634,7 @@ fi\n \n check_func_headers \"linux/media.h linux/videodev2.h\" v4l2_timeval_to_ns\n check_cc h264_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_H264_SLICE;\"\n+check_cc mpeg2_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_MPEG2_SLICE;\"\n \n check_headers sys/videoio.h\n test_code cc sys/videoio.h \"struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;\" && enable_sanitized struct_v4l2_frmivalenum_discrete\ndiff --git a/libavcodec/Makefile b/libavcodec/Makefile\nindex 426c7528e9..02c023a447 100644\n--- a/libavcodec/Makefile\n+++ b/libavcodec/Makefile\n@@ -955,6 +955,7 @@ OBJS-$(CONFIG_MPEG2_D3D11VA_HWACCEL)      += dxva2_mpeg2.o\n OBJS-$(CONFIG_MPEG2_DXVA2_HWACCEL)        += dxva2_mpeg2.o\n OBJS-$(CONFIG_MPEG2_NVDEC_HWACCEL)        += nvdec_mpeg12.o\n OBJS-$(CONFIG_MPEG2_QSV_HWACCEL)          += qsvdec.o\n+OBJS-$(CONFIG_MPEG2_V4L2REQUEST_HWACCEL)  += v4l2_request_mpeg2.o\n OBJS-$(CONFIG_MPEG2_VAAPI_HWACCEL)        += vaapi_mpeg2.o\n OBJS-$(CONFIG_MPEG2_VDPAU_HWACCEL)        += vdpau_mpeg12.o\n OBJS-$(CONFIG_MPEG2_VIDEOTOOLBOX_HWACCEL) += videotoolbox.o\ndiff --git a/libavcodec/hwaccels.h b/libavcodec/hwaccels.h\nindex 969a1da0f4..a8ae1483d8 100644\n--- a/libavcodec/hwaccels.h\n+++ b/libavcodec/hwaccels.h\n@@ -53,6 +53,7 @@ extern const AVHWAccel ff_mpeg2_d3d11va_hwaccel;\n extern const AVHWAccel ff_mpeg2_d3d11va2_hwaccel;\n extern const AVHWAccel ff_mpeg2_nvdec_hwaccel;\n extern const AVHWAccel ff_mpeg2_dxva2_hwaccel;\n+extern const AVHWAccel ff_mpeg2_v4l2request_hwaccel;\n extern const AVHWAccel ff_mpeg2_vaapi_hwaccel;\n extern const AVHWAccel ff_mpeg2_vdpau_hwaccel;\n extern const AVHWAccel ff_mpeg2_videotoolbox_hwaccel;\ndiff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c\nindex 09bf01247d..bcdf26680a 100644\n--- a/libavcodec/mpeg12dec.c\n+++ b/libavcodec/mpeg12dec.c\n@@ -1147,6 +1147,9 @@ static const enum AVPixelFormat mpeg2_hwaccel_pixfmt_list_420[] = {\n #endif\n #if CONFIG_MPEG2_VIDEOTOOLBOX_HWACCEL\n     AV_PIX_FMT_VIDEOTOOLBOX,\n+#endif\n+#if CONFIG_MPEG2_V4L2REQUEST_HWACCEL\n+    AV_PIX_FMT_DRM_PRIME,\n #endif\n     AV_PIX_FMT_YUV420P,\n     AV_PIX_FMT_NONE\n@@ -2961,6 +2964,9 @@ AVCodec ff_mpeg2video_decoder = {\n #endif\n #if CONFIG_MPEG2_XVMC_HWACCEL\n                         HWACCEL_XVMC(mpeg2),\n+#endif\n+#if CONFIG_MPEG2_V4L2REQUEST_HWACCEL\n+                        HWACCEL_V4L2REQUEST(mpeg2),\n #endif\n                         NULL\n                     },\ndiff --git a/libavcodec/v4l2_request_mpeg2.c b/libavcodec/v4l2_request_mpeg2.c\nnew file mode 100644\nindex 0000000000..84d53209c7\n--- /dev/null\n+++ b/libavcodec/v4l2_request_mpeg2.c\n@@ -0,0 +1,159 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"hwconfig.h\"\n+#include \"mpegvideo.h\"\n+#include \"v4l2_request.h\"\n+\n+typedef struct V4L2RequestControlsMPEG2 {\n+    struct v4l2_ctrl_mpeg2_sequence sequence;\n+    struct v4l2_ctrl_mpeg2_picture picture;\n+    struct v4l2_ctrl_mpeg2_quantisation quantisation;\n+} V4L2RequestControlsMPEG2;\n+\n+static int v4l2_request_mpeg2_start_frame(AVCodecContext *avctx,\n+                                          av_unused const uint8_t *buffer,\n+                                          av_unused uint32_t size)\n+{\n+    const MpegEncContext *s = avctx->priv_data;\n+    V4L2RequestControlsMPEG2 *controls = s->current_picture_ptr->hwaccel_picture_private;\n+    V4L2RequestDescriptor *req = (V4L2RequestDescriptor*)s->current_picture_ptr->f->data[0];\n+\n+    controls->sequence = (struct v4l2_ctrl_mpeg2_sequence) {\n+        /* ISO/IEC 13818-2, ITU-T Rec. H.262: Sequence header */\n+        .horizontal_size = s->width,\n+        .vertical_size = s->height,\n+        .vbv_buffer_size = req->output.size,\n+\n+        /* ISO/IEC 13818-2, ITU-T Rec. H.262: Sequence extension */\n+        .profile_and_level_indication = 0,\n+        .chroma_format = s->chroma_format,\n+    };\n+\n+    if (s->progressive_sequence)\n+        controls->sequence.flags |= V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE;\n+\n+    controls->picture = (struct v4l2_ctrl_mpeg2_picture) {\n+        /* ISO/IEC 13818-2, ITU-T Rec. H.262: Picture header */\n+        .picture_coding_type = s->pict_type,\n+\n+        /* ISO/IEC 13818-2, ITU-T Rec. H.262: Picture coding extension */\n+        .f_code[0][0] = s->mpeg_f_code[0][0],\n+        .f_code[0][1] = s->mpeg_f_code[0][1],\n+        .f_code[1][0] = s->mpeg_f_code[1][0],\n+        .f_code[1][1] = s->mpeg_f_code[1][1],\n+        .picture_structure = s->picture_structure,\n+        .intra_dc_precision = s->intra_dc_precision,\n+    };\n+\n+    if (s->top_field_first)\n+        controls->picture.flags |= V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST;\n+\n+    if (s->frame_pred_frame_dct)\n+        controls->picture.flags |= V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT;\n+\n+    if (s->concealment_motion_vectors)\n+        controls->picture.flags |= V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV;\n+\n+    if (s->intra_vlc_format)\n+        controls->picture.flags |= V4L2_MPEG2_PIC_FLAG_INTRA_VLC;\n+\n+    if (s->q_scale_type)\n+        controls->picture.flags |= V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE;\n+\n+    if (s->alternate_scan)\n+        controls->picture.flags |= V4L2_MPEG2_PIC_FLAG_ALT_SCAN;\n+\n+    if (s->repeat_first_field)\n+        controls->picture.flags |= V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST;\n+\n+    if (s->progressive_frame)\n+        controls->picture.flags |= V4L2_MPEG2_PIC_FLAG_PROGRESSIVE;\n+\n+    switch (s->pict_type) {\n+    case AV_PICTURE_TYPE_B:\n+        controls->picture.backward_ref_ts = ff_v4l2_request_get_capture_timestamp(s->next_picture.f);\n+        // fall-through\n+    case AV_PICTURE_TYPE_P:\n+        controls->picture.forward_ref_ts = ff_v4l2_request_get_capture_timestamp(s->last_picture.f);\n+    }\n+\n+    for (int i = 0; i < 64; i++) {\n+        int n = s->idsp.idct_permutation[ff_zigzag_direct[i]];\n+        controls->quantisation.intra_quantiser_matrix[i] = s->intra_matrix[n];\n+        controls->quantisation.non_intra_quantiser_matrix[i] = s->inter_matrix[n];\n+        controls->quantisation.chroma_intra_quantiser_matrix[i] = s->chroma_intra_matrix[n];\n+        controls->quantisation.chroma_non_intra_quantiser_matrix[i] = s->chroma_inter_matrix[n];\n+    }\n+\n+    return ff_v4l2_request_reset_frame(avctx, s->current_picture_ptr->f);\n+}\n+\n+static int v4l2_request_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)\n+{\n+    const MpegEncContext *s = avctx->priv_data;\n+\n+    return ff_v4l2_request_append_output_buffer(avctx, s->current_picture_ptr->f, buffer, size);\n+}\n+\n+static int v4l2_request_mpeg2_end_frame(AVCodecContext *avctx)\n+{\n+    const MpegEncContext *s = avctx->priv_data;\n+    V4L2RequestControlsMPEG2 *controls = s->current_picture_ptr->hwaccel_picture_private;\n+\n+    struct v4l2_ext_control control[] = {\n+        {\n+            .id = V4L2_CID_STATELESS_MPEG2_SEQUENCE,\n+            .ptr = &controls->sequence,\n+            .size = sizeof(controls->sequence),\n+        },\n+        {\n+            .id = V4L2_CID_STATELESS_MPEG2_PICTURE,\n+            .ptr = &controls->picture,\n+            .size = sizeof(controls->picture),\n+        },\n+        {\n+            .id = V4L2_CID_STATELESS_MPEG2_QUANTISATION,\n+            .ptr = &controls->quantisation,\n+            .size = sizeof(controls->quantisation),\n+        },\n+    };\n+\n+    return ff_v4l2_request_decode_frame(avctx, s->current_picture_ptr->f, control, FF_ARRAY_ELEMS(control));\n+}\n+\n+static int v4l2_request_mpeg2_init(AVCodecContext *avctx)\n+{\n+    return ff_v4l2_request_init(avctx, V4L2_PIX_FMT_MPEG2_SLICE, 1024 * 1024, NULL, 0);\n+}\n+\n+const AVHWAccel ff_mpeg2_v4l2request_hwaccel = {\n+    .name           = \"mpeg2_v4l2request\",\n+    .type           = AVMEDIA_TYPE_VIDEO,\n+    .id             = AV_CODEC_ID_MPEG2VIDEO,\n+    .pix_fmt        = AV_PIX_FMT_DRM_PRIME,\n+    .start_frame    = v4l2_request_mpeg2_start_frame,\n+    .decode_slice   = v4l2_request_mpeg2_decode_slice,\n+    .end_frame      = v4l2_request_mpeg2_end_frame,\n+    .frame_priv_data_size = sizeof(V4L2RequestControlsMPEG2),\n+    .init           = v4l2_request_mpeg2_init,\n+    .uninit         = ff_v4l2_request_uninit,\n+    .priv_data_size = sizeof(V4L2RequestContext),\n+    .frame_params   = ff_v4l2_request_frame_params,\n+    .caps_internal  = HWACCEL_CAP_ASYNC_SAFE,\n+};\n\nFrom 2190df619ea9d9cedf3d3c7442de0dc863c8b62e Mon Sep 17 00:00:00 2001\nFrom: Boris Brezillon <boris.brezillon@collabora.com>\nDate: Wed, 22 May 2019 14:46:58 +0200\nSubject: [PATCH 07/12] Add V4L2 request API vp8 hwaccel\n\nSigned-off-by: Boris Brezillon <boris.brezillon@collabora.com>\nSigned-off-by: Ezequiel Garcia <ezequiel@collabora.com>\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n configure                     |   3 +\n libavcodec/Makefile           |   1 +\n libavcodec/hwaccels.h         |   1 +\n libavcodec/v4l2_request_vp8.c | 180 ++++++++++++++++++++++++++++++++++\n libavcodec/vp8.c              |   6 ++\n 5 files changed, 191 insertions(+)\n create mode 100644 libavcodec/v4l2_request_vp8.c\n\ndiff --git a/configure b/configure\nindex 1b70ea65e4..3f8f7b195a 100755\n--- a/configure\n+++ b/configure\n@@ -3028,6 +3028,8 @@ vc1_vdpau_hwaccel_deps=\"vdpau\"\n vc1_vdpau_hwaccel_select=\"vc1_decoder\"\n vp8_nvdec_hwaccel_deps=\"nvdec\"\n vp8_nvdec_hwaccel_select=\"vp8_decoder\"\n+vp8_v4l2request_hwaccel_deps=\"v4l2_request vp8_v4l2_request\"\n+vp8_v4l2request_hwaccel_select=\"vp8_decoder\"\n vp8_vaapi_hwaccel_deps=\"vaapi\"\n vp8_vaapi_hwaccel_select=\"vp8_decoder\"\n vp9_d3d11va_hwaccel_deps=\"d3d11va DXVA_PicParams_VP9\"\n@@ -6635,6 +6637,7 @@ fi\n check_func_headers \"linux/media.h linux/videodev2.h\" v4l2_timeval_to_ns\n check_cc h264_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_H264_SLICE;\"\n check_cc mpeg2_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_MPEG2_SLICE;\"\n+check_cc vp8_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_VP8_FRAME;\"\n \n check_headers sys/videoio.h\n test_code cc sys/videoio.h \"struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;\" && enable_sanitized struct_v4l2_frmivalenum_discrete\ndiff --git a/libavcodec/Makefile b/libavcodec/Makefile\nindex 02c023a447..c79d678eb3 100644\n--- a/libavcodec/Makefile\n+++ b/libavcodec/Makefile\n@@ -971,6 +971,7 @@ OBJS-$(CONFIG_VC1_QSV_HWACCEL)            += qsvdec.o\n OBJS-$(CONFIG_VC1_VAAPI_HWACCEL)          += vaapi_vc1.o\n OBJS-$(CONFIG_VC1_VDPAU_HWACCEL)          += vdpau_vc1.o\n OBJS-$(CONFIG_VP8_NVDEC_HWACCEL)          += nvdec_vp8.o\n+OBJS-$(CONFIG_VP8_V4L2REQUEST_HWACCEL)    += v4l2_request_vp8.o\n OBJS-$(CONFIG_VP8_VAAPI_HWACCEL)          += vaapi_vp8.o\n OBJS-$(CONFIG_VP9_D3D11VA_HWACCEL)        += dxva2_vp9.o\n OBJS-$(CONFIG_VP9_DXVA2_HWACCEL)          += dxva2_vp9.o\ndiff --git a/libavcodec/hwaccels.h b/libavcodec/hwaccels.h\nindex a8ae1483d8..9f8d41e367 100644\n--- a/libavcodec/hwaccels.h\n+++ b/libavcodec/hwaccels.h\n@@ -69,6 +69,7 @@ extern const AVHWAccel ff_vc1_nvdec_hwaccel;\n extern const AVHWAccel ff_vc1_vaapi_hwaccel;\n extern const AVHWAccel ff_vc1_vdpau_hwaccel;\n extern const AVHWAccel ff_vp8_nvdec_hwaccel;\n+extern const AVHWAccel ff_vp8_v4l2request_hwaccel;\n extern const AVHWAccel ff_vp8_vaapi_hwaccel;\n extern const AVHWAccel ff_vp9_d3d11va_hwaccel;\n extern const AVHWAccel ff_vp9_d3d11va2_hwaccel;\ndiff --git a/libavcodec/v4l2_request_vp8.c b/libavcodec/v4l2_request_vp8.c\nnew file mode 100644\nindex 0000000000..bc0fc40072\n--- /dev/null\n+++ b/libavcodec/v4l2_request_vp8.c\n@@ -0,0 +1,180 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"hwconfig.h\"\n+#include \"v4l2_request.h\"\n+#include \"vp8.h\"\n+\n+typedef struct V4L2RequestControlsVP8 {\n+    struct v4l2_ctrl_vp8_frame ctrl;\n+} V4L2RequestControlsVP8;\n+\n+static int v4l2_request_vp8_start_frame(AVCodecContext          *avctx,\n+                                        av_unused const uint8_t *buffer,\n+                                        av_unused uint32_t       size)\n+{\n+    const VP8Context *s = avctx->priv_data;\n+    V4L2RequestControlsVP8 *controls = s->framep[VP56_FRAME_CURRENT]->hwaccel_picture_private;\n+\n+    memset(&controls->ctrl, 0, sizeof(controls->ctrl));\n+    return ff_v4l2_request_reset_frame(avctx, s->framep[VP56_FRAME_CURRENT]->tf.f);\n+}\n+\n+static int v4l2_request_vp8_end_frame(AVCodecContext *avctx)\n+{\n+    const VP8Context *s = avctx->priv_data;\n+    V4L2RequestControlsVP8 *controls = s->framep[VP56_FRAME_CURRENT]->hwaccel_picture_private;\n+    struct v4l2_ext_control control[] = {\n+        {\n+            .id = V4L2_CID_STATELESS_VP8_FRAME,\n+            .ptr = &controls->ctrl,\n+            .size = sizeof(controls->ctrl),\n+        },\n+    };\n+\n+    return ff_v4l2_request_decode_frame(avctx, s->framep[VP56_FRAME_CURRENT]->tf.f,\n+                                        control, FF_ARRAY_ELEMS(control));\n+}\n+\n+static int v4l2_request_vp8_decode_slice(AVCodecContext *avctx,\n+                                         const uint8_t *buffer,\n+                                         uint32_t size)\n+{\n+    const VP8Context *s = avctx->priv_data;\n+    V4L2RequestControlsVP8 *controls = s->framep[VP56_FRAME_CURRENT]->hwaccel_picture_private;\n+    struct v4l2_ctrl_vp8_frame *frame = &controls->ctrl;\n+    const uint8_t *data = buffer + 3 + 7 * s->keyframe;\n+    unsigned int i, j, k;\n+\n+    frame->version = s->profile & 0x3;\n+    frame->width = avctx->width;\n+    frame->height = avctx->height;\n+    /* FIXME: set ->xx_scale */\n+    frame->prob_skip_false = s->prob->mbskip;\n+    frame->prob_intra = s->prob->intra;\n+    frame->prob_gf = s->prob->golden;\n+    frame->prob_last = s->prob->last;\n+    frame->first_part_size = s->header_partition_size;\n+    frame->first_part_header_bits = (8 * (s->coder_state_at_header_end.input - data) -\n+                                    s->coder_state_at_header_end.bit_count - 8);\n+    frame->num_dct_parts = s->num_coeff_partitions;\n+    for (i = 0; i < 8; i++)\n+        frame->dct_part_sizes[i] = s->coeff_partition_size[i];\n+\n+    frame->coder_state.range = s->coder_state_at_header_end.range;\n+    frame->coder_state.value = s->coder_state_at_header_end.value;\n+    frame->coder_state.bit_count = s->coder_state_at_header_end.bit_count;\n+    if (s->framep[VP56_FRAME_PREVIOUS])\n+        frame->last_frame_ts = ff_v4l2_request_get_capture_timestamp(s->framep[VP56_FRAME_PREVIOUS]->tf.f);\n+    if (s->framep[VP56_FRAME_GOLDEN])\n+        frame->golden_frame_ts = ff_v4l2_request_get_capture_timestamp(s->framep[VP56_FRAME_GOLDEN]->tf.f);\n+    if (s->framep[VP56_FRAME_GOLDEN2])\n+        frame->alt_frame_ts = ff_v4l2_request_get_capture_timestamp(s->framep[VP56_FRAME_GOLDEN2]->tf.f);\n+    frame->flags |= s->invisible ? 0 : V4L2_VP8_FRAME_FLAG_SHOW_FRAME;\n+    frame->flags |= s->mbskip_enabled ? V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF : 0;\n+    frame->flags |= (s->profile & 0x4) ? V4L2_VP8_FRAME_FLAG_EXPERIMENTAL : 0;\n+    frame->flags |= s->keyframe ? V4L2_VP8_FRAME_FLAG_KEY_FRAME : 0;\n+    frame->flags |= s->sign_bias[VP56_FRAME_GOLDEN] ? V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN : 0;\n+    frame->flags |= s->sign_bias[VP56_FRAME_GOLDEN2] ? V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT : 0;\n+    frame->segment.flags |= s->segmentation.enabled ? V4L2_VP8_SEGMENT_FLAG_ENABLED : 0;\n+    frame->segment.flags |= s->segmentation.update_map ? V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP : 0;\n+    frame->segment.flags |= s->segmentation.update_feature_data ? V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA : 0;\n+    frame->segment.flags |= s->segmentation.absolute_vals ? 0 : V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE;\n+    for (i = 0; i < 4; i++) {\n+        frame->segment.quant_update[i] = s->segmentation.base_quant[i];\n+        frame->segment.lf_update[i] = s->segmentation.filter_level[i];\n+    }\n+\n+    for (i = 0; i < 3; i++)\n+        frame->segment.segment_probs[i] = s->prob->segmentid[i];\n+\n+    frame->lf.level = s->filter.level;\n+    frame->lf.sharpness_level = s->filter.sharpness;\n+    frame->lf.flags |= s->lf_delta.enabled ? V4L2_VP8_LF_ADJ_ENABLE : 0;\n+    frame->lf.flags |= s->lf_delta.update ? V4L2_VP8_LF_DELTA_UPDATE : 0;\n+    frame->lf.flags |= s->filter.simple ? V4L2_VP8_LF_FILTER_TYPE_SIMPLE : 0;\n+    for (i = 0; i < 4; i++) {\n+        frame->lf.ref_frm_delta[i] = s->lf_delta.ref[i];\n+        frame->lf.mb_mode_delta[i] = s->lf_delta.mode[i + MODE_I4x4];\n+    }\n+\n+    // Probabilites\n+    if (s->keyframe) {\n+        static const uint8_t keyframe_y_mode_probs[4] = {\n+            145, 156, 163, 128\n+        };\n+        static const uint8_t keyframe_uv_mode_probs[3] = {\n+            142, 114, 183\n+        };\n+\n+        memcpy(frame->entropy.y_mode_probs, keyframe_y_mode_probs,  4);\n+        memcpy(frame->entropy.uv_mode_probs, keyframe_uv_mode_probs, 3);\n+    } else {\n+        for (i = 0; i < 4; i++)\n+            frame->entropy.y_mode_probs[i] = s->prob->pred16x16[i];\n+        for (i = 0; i < 3; i++)\n+            frame->entropy.uv_mode_probs[i] = s->prob->pred8x8c[i];\n+    }\n+    for (i = 0; i < 2; i++)\n+        for (j = 0; j < 19; j++)\n+            frame->entropy.mv_probs[i][j] = s->prob->mvc[i][j];\n+\n+    for (i = 0; i < 4; i++) {\n+        for (j = 0; j < 8; j++) {\n+            static const int coeff_bands_inverse[8] = {\n+                0, 1, 2, 3, 5, 6, 4, 15\n+            };\n+            int coeff_pos = coeff_bands_inverse[j];\n+\n+            for (k = 0; k < 3; k++) {\n+                memcpy(frame->entropy.coeff_probs[i][j][k],\n+                       s->prob->token[i][coeff_pos][k], 11);\n+            }\n+        }\n+    }\n+\n+    frame->quant.y_ac_qi = s->quant.yac_qi;\n+    frame->quant.y_dc_delta = s->quant.ydc_delta;\n+    frame->quant.y2_dc_delta = s->quant.y2dc_delta;\n+    frame->quant.y2_ac_delta = s->quant.y2ac_delta;\n+    frame->quant.uv_dc_delta = s->quant.uvdc_delta;\n+    frame->quant.uv_ac_delta = s->quant.uvac_delta;\n+\n+    return ff_v4l2_request_append_output_buffer(avctx, s->framep[VP56_FRAME_CURRENT]->tf.f, buffer, size);\n+}\n+\n+static int v4l2_request_vp8_init(AVCodecContext *avctx)\n+{\n+    return ff_v4l2_request_init(avctx, V4L2_PIX_FMT_VP8_FRAME, 2 * 1024 * 1024, NULL, 0);\n+}\n+\n+const AVHWAccel ff_vp8_v4l2request_hwaccel = {\n+    .name           = \"vp8_v4l2request\",\n+    .type           = AVMEDIA_TYPE_VIDEO,\n+    .id             = AV_CODEC_ID_VP8,\n+    .pix_fmt        = AV_PIX_FMT_DRM_PRIME,\n+    .start_frame    = v4l2_request_vp8_start_frame,\n+    .decode_slice   = v4l2_request_vp8_decode_slice,\n+    .end_frame      = v4l2_request_vp8_end_frame,\n+    .frame_priv_data_size = sizeof(V4L2RequestControlsVP8),\n+    .init           = v4l2_request_vp8_init,\n+    .uninit         = ff_v4l2_request_uninit,\n+    .priv_data_size = sizeof(V4L2RequestContext),\n+    .frame_params   = ff_v4l2_request_frame_params,\n+    .caps_internal  = HWACCEL_CAP_ASYNC_SAFE,\n+};\ndiff --git a/libavcodec/vp8.c b/libavcodec/vp8.c\nindex d16e7b6aa3..8ee768d875 100644\n--- a/libavcodec/vp8.c\n+++ b/libavcodec/vp8.c\n@@ -176,6 +176,9 @@ static enum AVPixelFormat get_pixel_format(VP8Context *s)\n #endif\n #if CONFIG_VP8_NVDEC_HWACCEL\n         AV_PIX_FMT_CUDA,\n+#endif\n+#if CONFIG_VP8_V4L2REQUEST_HWACCEL\n+        AV_PIX_FMT_DRM_PRIME,\n #endif\n         AV_PIX_FMT_YUV420P,\n         AV_PIX_FMT_NONE,\n@@ -2972,6 +2975,9 @@ AVCodec ff_vp8_decoder = {\n #endif\n #if CONFIG_VP8_NVDEC_HWACCEL\n                                HWACCEL_NVDEC(vp8),\n+#endif\n+#if CONFIG_VP8_V4L2REQUEST_HWACCEL\n+                               HWACCEL_V4L2REQUEST(vp8),\n #endif\n                                NULL\n                            },\n\nFrom 4886d1e8caeee49c6ca4d92bc1eaebcdb884924c Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Sat, 15 Dec 2018 22:32:16 +0100\nSubject: [PATCH 08/12] Add V4L2 request API hevc hwaccel\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\nSigned-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n configure                      |   3 +\n libavcodec/Makefile            |   1 +\n libavcodec/hevcdec.c           |  10 +\n libavcodec/hwaccels.h          |   1 +\n libavcodec/v4l2_request_hevc.c | 681 +++++++++++++++++++++++++++++++++\n 5 files changed, 696 insertions(+)\n create mode 100644 libavcodec/v4l2_request_hevc.c\n\ndiff --git a/configure b/configure\nindex 3f8f7b195a..6192a6c144 100755\n--- a/configure\n+++ b/configure\n@@ -2968,6 +2968,8 @@ hevc_dxva2_hwaccel_deps=\"dxva2 DXVA_PicParams_HEVC\"\n hevc_dxva2_hwaccel_select=\"hevc_decoder\"\n hevc_nvdec_hwaccel_deps=\"nvdec\"\n hevc_nvdec_hwaccel_select=\"hevc_decoder\"\n+hevc_v4l2request_hwaccel_deps=\"v4l2_request hevc_v4l2_request\"\n+hevc_v4l2request_hwaccel_select=\"hevc_decoder\"\n hevc_vaapi_hwaccel_deps=\"vaapi VAPictureParameterBufferHEVC\"\n hevc_vaapi_hwaccel_select=\"hevc_decoder\"\n hevc_vdpau_hwaccel_deps=\"vdpau VdpPictureInfoHEVC\"\n@@ -6636,6 +6638,7 @@ fi\n \n check_func_headers \"linux/media.h linux/videodev2.h\" v4l2_timeval_to_ns\n check_cc h264_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_H264_SLICE;\"\n+check_cc hevc_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_HEVC_SLICE;\"\n check_cc mpeg2_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_MPEG2_SLICE;\"\n check_cc vp8_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_VP8_FRAME;\"\n \ndiff --git a/libavcodec/Makefile b/libavcodec/Makefile\nindex c79d678eb3..0059074530 100644\n--- a/libavcodec/Makefile\n+++ b/libavcodec/Makefile\n@@ -943,6 +943,7 @@ OBJS-$(CONFIG_HEVC_D3D11VA_HWACCEL)       += dxva2_hevc.o\n OBJS-$(CONFIG_HEVC_DXVA2_HWACCEL)         += dxva2_hevc.o\n OBJS-$(CONFIG_HEVC_NVDEC_HWACCEL)         += nvdec_hevc.o\n OBJS-$(CONFIG_HEVC_QSV_HWACCEL)           += qsvdec.o\n+OBJS-$(CONFIG_HEVC_V4L2REQUEST_HWACCEL)   += v4l2_request_hevc.o\n OBJS-$(CONFIG_HEVC_VAAPI_HWACCEL)         += vaapi_hevc.o h265_profile_level.o\n OBJS-$(CONFIG_HEVC_VDPAU_HWACCEL)         += vdpau_hevc.o h265_profile_level.o\n OBJS-$(CONFIG_MJPEG_NVDEC_HWACCEL)        += nvdec_mjpeg.o\ndiff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c\nindex 2231aed259..7507966d71 100644\n--- a/libavcodec/hevcdec.c\n+++ b/libavcodec/hevcdec.c\n@@ -392,6 +392,7 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)\n #define HWACCEL_MAX (CONFIG_HEVC_DXVA2_HWACCEL + \\\n                      CONFIG_HEVC_D3D11VA_HWACCEL * 2 + \\\n                      CONFIG_HEVC_NVDEC_HWACCEL + \\\n+                     CONFIG_HEVC_V4L2REQUEST_HWACCEL + \\\n                      CONFIG_HEVC_VAAPI_HWACCEL + \\\n                      CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL + \\\n                      CONFIG_HEVC_VDPAU_HWACCEL)\n@@ -418,6 +419,9 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)\n #endif\n #if CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL\n         *fmt++ = AV_PIX_FMT_VIDEOTOOLBOX;\n+#endif\n+#if CONFIG_HEVC_V4L2REQUEST_HWACCEL\n+        *fmt++ = AV_PIX_FMT_DRM_PRIME;\n #endif\n         break;\n     case AV_PIX_FMT_YUV420P10:\n@@ -439,6 +443,9 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)\n #endif\n #if CONFIG_HEVC_NVDEC_HWACCEL\n         *fmt++ = AV_PIX_FMT_CUDA;\n+#endif\n+#if CONFIG_HEVC_V4L2REQUEST_HWACCEL\n+        *fmt++ = AV_PIX_FMT_DRM_PRIME;\n #endif\n         break;\n     case AV_PIX_FMT_YUV444P:\n@@ -3705,6 +3712,9 @@ AVCodec ff_hevc_decoder = {\n #endif\n #if CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL\n                                HWACCEL_VIDEOTOOLBOX(hevc),\n+#endif\n+#if CONFIG_HEVC_V4L2REQUEST_HWACCEL\n+                               HWACCEL_V4L2REQUEST(hevc),\n #endif\n                                NULL\n                            },\ndiff --git a/libavcodec/hwaccels.h b/libavcodec/hwaccels.h\nindex 9f8d41e367..ffb9fa5087 100644\n--- a/libavcodec/hwaccels.h\n+++ b/libavcodec/hwaccels.h\n@@ -40,6 +40,7 @@ extern const AVHWAccel ff_hevc_d3d11va_hwaccel;\n extern const AVHWAccel ff_hevc_d3d11va2_hwaccel;\n extern const AVHWAccel ff_hevc_dxva2_hwaccel;\n extern const AVHWAccel ff_hevc_nvdec_hwaccel;\n+extern const AVHWAccel ff_hevc_v4l2request_hwaccel;\n extern const AVHWAccel ff_hevc_vaapi_hwaccel;\n extern const AVHWAccel ff_hevc_vdpau_hwaccel;\n extern const AVHWAccel ff_hevc_videotoolbox_hwaccel;\ndiff --git a/libavcodec/v4l2_request_hevc.c b/libavcodec/v4l2_request_hevc.c\nnew file mode 100644\nindex 0000000000..c12748ed03\n--- /dev/null\n+++ b/libavcodec/v4l2_request_hevc.c\n@@ -0,0 +1,681 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"hevcdec.h\"\n+#include \"hwconfig.h\"\n+#include \"v4l2_request.h\"\n+\n+#define MAX_SLICES 600 // as per HEVC spec ?\n+#define V4L2_HEVC_CONTROLS_MAX 6\n+\n+typedef struct V4L2RequestControlsHEVC {\n+    struct v4l2_ctrl_hevc_sps sps;\n+    struct v4l2_ctrl_hevc_pps pps;\n+    struct v4l2_ctrl_hevc_decode_params dec_params;\n+    struct v4l2_ctrl_hevc_scaling_matrix scaling_matrix;\n+    struct v4l2_ctrl_hevc_slice_params slice_params[MAX_SLICES];\n+    __u32 *entry_point_offsets;\n+    unsigned int num_entry_point_offsets;\n+    int first_slice;\n+    int num_slices;\n+} V4L2RequestControlsHEVC;\n+\n+typedef struct V4L2RequestContextHEVC {\n+    V4L2RequestContext base;\n+    unsigned int decode_mode;\n+    unsigned int start_code;\n+    __u32 max_slices;\n+    unsigned int supports_entry_point_offsets;\n+    unsigned int supports_slices;\n+    unsigned int supports_scaling_matrix;\n+} V4L2RequestContextHEVC;\n+\n+static uint8_t nalu_slice_start_code[] = { 0x00, 0x00, 0x01 };\n+\n+static void v4l2_request_hevc_fill_pred_table(const HEVCContext *h, struct v4l2_hevc_pred_weight_table *table)\n+{\n+    int32_t luma_weight_denom, chroma_weight_denom;\n+    const SliceHeader *sh = &h->sh;\n+\n+    if (sh->slice_type == HEVC_SLICE_I ||\n+        (sh->slice_type == HEVC_SLICE_P && !h->ps.pps->weighted_pred_flag) ||\n+        (sh->slice_type == HEVC_SLICE_B && !h->ps.pps->weighted_bipred_flag))\n+        return;\n+\n+    table->luma_log2_weight_denom = sh->luma_log2_weight_denom;\n+\n+    if (h->ps.sps->chroma_format_idc)\n+        table->delta_chroma_log2_weight_denom = sh->chroma_log2_weight_denom - sh->luma_log2_weight_denom;\n+\n+    luma_weight_denom = (1 << sh->luma_log2_weight_denom);\n+    chroma_weight_denom = (1 << sh->chroma_log2_weight_denom);\n+\n+    for (int i = 0; i < 15 && i < sh->nb_refs[L0]; i++) {\n+        table->delta_luma_weight_l0[i] = sh->luma_weight_l0[i] - luma_weight_denom;\n+        table->luma_offset_l0[i] = sh->luma_offset_l0[i];\n+        table->delta_chroma_weight_l0[i][0] = sh->chroma_weight_l0[i][0] - chroma_weight_denom;\n+        table->delta_chroma_weight_l0[i][1] = sh->chroma_weight_l0[i][1] - chroma_weight_denom;\n+        table->chroma_offset_l0[i][0] = sh->chroma_offset_l0[i][0];\n+        table->chroma_offset_l0[i][1] = sh->chroma_offset_l0[i][1];\n+    }\n+\n+    if (sh->slice_type != HEVC_SLICE_B)\n+        return;\n+\n+    for (int i = 0; i < 15 && i < sh->nb_refs[L1]; i++) {\n+        table->delta_luma_weight_l1[i] = sh->luma_weight_l1[i] - luma_weight_denom;\n+        table->luma_offset_l1[i] = sh->luma_offset_l1[i];\n+        table->delta_chroma_weight_l1[i][0] = sh->chroma_weight_l1[i][0] - chroma_weight_denom;\n+        table->delta_chroma_weight_l1[i][1] = sh->chroma_weight_l1[i][1] - chroma_weight_denom;\n+        table->chroma_offset_l1[i][0] = sh->chroma_offset_l1[i][0];\n+        table->chroma_offset_l1[i][1] = sh->chroma_offset_l1[i][1];\n+    }\n+}\n+\n+static uint8_t get_ref_pic_index(const HEVCContext *h, const HEVCFrame *frame,\n+                                 struct v4l2_ctrl_hevc_decode_params *dec_params)\n+{\n+    uint64_t timestamp;\n+\n+    if (!frame)\n+        return 0;\n+\n+    timestamp = ff_v4l2_request_get_capture_timestamp(frame->frame);\n+\n+    for (uint8_t i = 0; i < dec_params->num_active_dpb_entries; i++) {\n+        struct v4l2_hevc_dpb_entry *entry = &dec_params->dpb[i];\n+        if (entry->timestamp == timestamp)\n+            return i;\n+    }\n+\n+    return 0;\n+}\n+\n+static void fill_dec_params(struct v4l2_ctrl_hevc_decode_params *dec_params, const HEVCContext *h)\n+{\n+    const HEVCFrame *pic = h->ref;\n+    const SliceHeader *sh = &h->sh;\n+    int i, entries = 0;\n+\n+    *dec_params = (struct v4l2_ctrl_hevc_decode_params) {\n+        .pic_order_cnt_val = pic->poc, /* FIXME: is this same as slice_params->slice_pic_order_cnt ? */\n+        .short_term_ref_pic_set_size = sh->short_term_ref_pic_set_size,\n+        .long_term_ref_pic_set_size = sh->long_term_ref_pic_set_size,\n+\t.num_poc_st_curr_before = h->rps[ST_CURR_BEF].nb_refs,\n+        .num_poc_st_curr_after = h->rps[ST_CURR_AFT].nb_refs,\n+        .num_poc_lt_curr = h->rps[LT_CURR].nb_refs,\n+    };\n+\n+    for (i = 0; i < FF_ARRAY_ELEMS(h->DPB); i++) {\n+        const HEVCFrame *frame = &h->DPB[i];\n+        if (frame != pic && (frame->flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF))) {\n+            struct v4l2_hevc_dpb_entry *entry = &dec_params->dpb[entries++];\n+\n+            entry->timestamp = ff_v4l2_request_get_capture_timestamp(frame->frame);\n+            entry->field_pic = frame->frame->interlaced_frame;\n+            entry->flags = 0;\n+            if (frame->flags & HEVC_FRAME_FLAG_LONG_REF)\n+                entry->flags |= V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE;\n+\n+            entry->pic_order_cnt_val = frame->poc;\n+        }\n+    }\n+\n+    dec_params->num_active_dpb_entries = entries;\n+\n+    if (IS_IRAP(h))\n+        dec_params->flags |= V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC;\n+\n+    if (IS_IDR(h))\n+        dec_params->flags |= V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC;\n+\n+    if (sh->no_output_of_prior_pics_flag)\n+        dec_params->flags |= V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR;\n+\n+    for (i = 0; i < V4L2_HEVC_DPB_ENTRIES_NUM_MAX; i++) {\n+        dec_params->poc_st_curr_before[i] = get_ref_pic_index(h, h->rps[ST_CURR_BEF].ref[i], dec_params);\n+        dec_params->poc_st_curr_after[i] = get_ref_pic_index(h, h->rps[ST_CURR_AFT].ref[i], dec_params);\n+        dec_params->poc_lt_curr[i] = get_ref_pic_index(h, h->rps[LT_CURR].ref[i], dec_params);\n+    }\n+}\n+\n+static int v4l2_request_hevc_fill_slice_params(const HEVCContext *h,\n+                                               V4L2RequestControlsHEVC *controls,\n+                                               int slice)\n+{\n+    struct v4l2_ctrl_hevc_slice_params *slice_params = &controls->slice_params[slice];\n+    struct v4l2_ctrl_hevc_decode_params *dec_params = &controls->dec_params;\n+    const HEVCFrame *pic = h->ref;\n+    const SliceHeader *sh = &h->sh;\n+    RefPicList *rpl;\n+    int i;\n+\n+    *slice_params = (struct v4l2_ctrl_hevc_slice_params) {\n+        .bit_size = 0,\n+        .data_byte_offset = (get_bits_count(&h->HEVClc->gb) + 1 + 7) / 8,\n+        .num_entry_point_offsets = sh->num_entry_point_offsets,\n+\n+        /* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */\n+        .nal_unit_type = h->nal_unit_type,\n+        .nuh_temporal_id_plus1 = h->temporal_id + 1,\n+\n+        /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+        .slice_type = sh->slice_type,\n+        .colour_plane_id = sh->colour_plane_id,\n+        .slice_pic_order_cnt = pic->poc,\n+        .num_ref_idx_l0_active_minus1 = sh->nb_refs[L0] ? sh->nb_refs[L0] - 1 : 0,\n+        .num_ref_idx_l1_active_minus1 = sh->nb_refs[L1] ? sh->nb_refs[L1] - 1 : 0,\n+        .collocated_ref_idx = sh->slice_temporal_mvp_enabled_flag ? sh->collocated_ref_idx : 0,\n+        .five_minus_max_num_merge_cand = sh->slice_type == HEVC_SLICE_I ? 0 : 5 - sh->max_num_merge_cand,\n+        .slice_qp_delta = sh->slice_qp_delta,\n+        .slice_cb_qp_offset = sh->slice_cb_qp_offset,\n+        .slice_cr_qp_offset = sh->slice_cr_qp_offset,\n+        .slice_act_y_qp_offset = 0,\n+        .slice_act_cb_qp_offset = 0,\n+        .slice_act_cr_qp_offset = 0,\n+        .slice_beta_offset_div2 = sh->beta_offset / 2,\n+        .slice_tc_offset_div2 = sh->tc_offset / 2,\n+\n+        /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture timing SEI message */\n+        .pic_struct = h->sei.picture_timing.picture_struct,\n+\n+        /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */\n+        .slice_segment_addr = sh->slice_segment_addr,\n+        .short_term_ref_pic_set_size = sh->short_term_ref_pic_set_size,\n+        .long_term_ref_pic_set_size = sh->long_term_ref_pic_set_size,\n+    };\n+\n+    if (sh->slice_sample_adaptive_offset_flag[0])\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA;\n+\n+    if (sh->slice_sample_adaptive_offset_flag[1])\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA;\n+\n+    if (sh->slice_temporal_mvp_enabled_flag)\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED;\n+\n+    if (sh->mvd_l1_zero_flag)\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO;\n+\n+    if (sh->cabac_init_flag)\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT;\n+\n+    if (sh->collocated_list == L0)\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0;\n+\n+    /* TODO: V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV */\n+\n+    if (sh->disable_deblocking_filter_flag)\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED;\n+\n+    if (sh->slice_loop_filter_across_slices_enabled_flag)\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED;\n+\n+    if (sh->dependent_slice_segment_flag)\n+        slice_params->flags |= V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT;\n+\n+    if (sh->slice_type != HEVC_SLICE_I) {\n+        rpl = &h->ref->refPicList[0];\n+        for (i = 0; i < rpl->nb_refs; i++)\n+            slice_params->ref_idx_l0[i] = get_ref_pic_index(h, rpl->ref[i], dec_params);\n+    }\n+\n+    if (sh->slice_type == HEVC_SLICE_B) {\n+        rpl = &h->ref->refPicList[1];\n+        for (i = 0; i < rpl->nb_refs; i++)\n+            slice_params->ref_idx_l1[i] = get_ref_pic_index(h, rpl->ref[i], dec_params);\n+    }\n+\n+    v4l2_request_hevc_fill_pred_table(h, &slice_params->pred_weight_table);\n+\n+    if (controls->num_entry_point_offsets < sh->num_entry_point_offsets) {\n+        av_freep(&controls->entry_point_offsets);\n+        controls->entry_point_offsets = av_mallocz(sizeof(*controls->entry_point_offsets) * sh->num_entry_point_offsets);\n+        if (!controls->entry_point_offsets)\n+            return AVERROR(ENOMEM);\n+        controls->num_entry_point_offsets = sh->num_entry_point_offsets;\n+    }\n+\n+    for (i = 0; i < sh->num_entry_point_offsets; i++)\n+        controls->entry_point_offsets[i] = sh->entry_point_offset[i];\n+\n+    return 0;\n+}\n+\n+static void fill_sps(struct v4l2_ctrl_hevc_sps *ctrl, const HEVCContext *h)\n+{\n+    const HEVCSPS *sps = h->ps.sps;\n+    const HEVCPPS *pps = h->ps.pps;\n+\n+    /* ISO/IEC 23008-2, ITU-T Rec. H.265: Sequence parameter set */\n+    *ctrl = (struct v4l2_ctrl_hevc_sps) {\n+        .video_parameter_set_id = sps->vps_id,\n+        .seq_parameter_set_id = pps->sps_id,\n+        .pic_width_in_luma_samples = sps->width,\n+        .pic_height_in_luma_samples = sps->height,\n+        .bit_depth_luma_minus8 = sps->bit_depth - 8,\n+        .bit_depth_chroma_minus8 = sps->bit_depth_chroma - 8,\n+        .log2_max_pic_order_cnt_lsb_minus4 = sps->log2_max_poc_lsb - 4,\n+        .sps_max_dec_pic_buffering_minus1 = sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering - 1,\n+        .sps_max_num_reorder_pics = sps->temporal_layer[sps->max_sub_layers - 1].num_reorder_pics,\n+        .sps_max_latency_increase_plus1 = sps->temporal_layer[sps->max_sub_layers - 1].max_latency_increase + 1,\n+        .log2_min_luma_coding_block_size_minus3 = sps->log2_min_cb_size - 3,\n+        .log2_diff_max_min_luma_coding_block_size = sps->log2_diff_max_min_coding_block_size,\n+        .log2_min_luma_transform_block_size_minus2 = sps->log2_min_tb_size - 2,\n+        .log2_diff_max_min_luma_transform_block_size = sps->log2_max_trafo_size - sps->log2_min_tb_size,\n+        .max_transform_hierarchy_depth_inter = sps->max_transform_hierarchy_depth_inter,\n+        .max_transform_hierarchy_depth_intra = sps->max_transform_hierarchy_depth_intra,\n+        .pcm_sample_bit_depth_luma_minus1 = sps->pcm.bit_depth - 1,\n+        .pcm_sample_bit_depth_chroma_minus1 = sps->pcm.bit_depth_chroma - 1,\n+        .log2_min_pcm_luma_coding_block_size_minus3 = sps->pcm.log2_min_pcm_cb_size - 3,\n+        .log2_diff_max_min_pcm_luma_coding_block_size = sps->pcm.log2_max_pcm_cb_size - sps->pcm.log2_min_pcm_cb_size,\n+        .num_short_term_ref_pic_sets = sps->nb_st_rps,\n+        .num_long_term_ref_pics_sps = sps->num_long_term_ref_pics_sps,\n+        .chroma_format_idc = sps->chroma_format_idc,\n+        .sps_max_sub_layers_minus1 = sps->max_sub_layers - 1,\n+    };\n+\n+    if (sps->separate_colour_plane_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE;\n+\n+    if (sps->scaling_list_enable_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED;\n+\n+    if (sps->amp_enabled_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_AMP_ENABLED;\n+\n+    if (sps->sao_enabled)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET;\n+\n+    if (sps->pcm_enabled_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_PCM_ENABLED;\n+\n+    if (sps->pcm.loop_filter_disable_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED;\n+\n+    if (sps->long_term_ref_pics_present_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT;\n+\n+    if (sps->sps_temporal_mvp_enabled_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED;\n+\n+    if (sps->sps_strong_intra_smoothing_enable_flag)\n+        ctrl->flags |= V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED;\n+}\n+\n+static int v4l2_request_hevc_start_frame(AVCodecContext *avctx,\n+                                         av_unused const uint8_t *buffer,\n+                                         av_unused uint32_t size)\n+{\n+    const HEVCContext *h = avctx->priv_data;\n+    const HEVCPPS *pps = h->ps.pps;\n+    const HEVCSPS *sps = h->ps.sps;\n+    const ScalingList *sl = pps->scaling_list_data_present_flag ?\n+                            &pps->scaling_list :\n+                            sps->scaling_list_enable_flag ?\n+                            &sps->scaling_list : NULL;\n+    V4L2RequestControlsHEVC *controls = h->ref->hwaccel_picture_private;\n+    const SliceHeader *sh = &h->sh;\n+\n+    fill_sps(&controls->sps, h);\n+    fill_dec_params(&controls->dec_params, h);\n+\n+    if (sl) {\n+        for (int i = 0; i < 6; i++) {\n+            for (int j = 0; j < 16; j++)\n+                controls->scaling_matrix.scaling_list_4x4[i][j] = sl->sl[0][i][j];\n+            for (int j = 0; j < 64; j++) {\n+                controls->scaling_matrix.scaling_list_8x8[i][j]   = sl->sl[1][i][j];\n+                controls->scaling_matrix.scaling_list_16x16[i][j] = sl->sl[2][i][j];\n+                if (i < 2)\n+                    controls->scaling_matrix.scaling_list_32x32[i][j] = sl->sl[3][i * 3][j];\n+            }\n+            controls->scaling_matrix.scaling_list_dc_coef_16x16[i] = sl->sl_dc[0][i];\n+            if (i < 2)\n+                controls->scaling_matrix.scaling_list_dc_coef_32x32[i] = sl->sl_dc[1][i * 3];\n+        }\n+    }\n+\n+    /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */\n+    controls->pps = (struct v4l2_ctrl_hevc_pps) {\n+        .pic_parameter_set_id = sh->pps_id,\n+        .num_extra_slice_header_bits = pps->num_extra_slice_header_bits,\n+        .num_ref_idx_l0_default_active_minus1 = pps->num_ref_idx_l0_default_active - 1,\n+        .num_ref_idx_l1_default_active_minus1 = pps->num_ref_idx_l1_default_active - 1,\n+        .init_qp_minus26 = pps->pic_init_qp_minus26,\n+        .diff_cu_qp_delta_depth = pps->diff_cu_qp_delta_depth,\n+        .pps_cb_qp_offset = pps->cb_qp_offset,\n+        .pps_cr_qp_offset = pps->cr_qp_offset,\n+        .pps_beta_offset_div2 = pps->beta_offset / 2,\n+        .pps_tc_offset_div2 = pps->tc_offset / 2,\n+        .log2_parallel_merge_level_minus2 = pps->log2_parallel_merge_level - 2,\n+    };\n+\n+    if (pps->dependent_slice_segments_enabled_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED;\n+\n+    if (pps->output_flag_present_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT;\n+\n+    if (pps->sign_data_hiding_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED;\n+\n+    if (pps->cabac_init_present_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT;\n+\n+    if (pps->constrained_intra_pred_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED;\n+\n+    if (pps->transform_skip_enabled_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED;\n+\n+    if (pps->cu_qp_delta_enabled_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED;\n+\n+    if (pps->pic_slice_level_chroma_qp_offsets_present_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT;\n+\n+    if (pps->weighted_pred_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED;\n+\n+    if (pps->weighted_bipred_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED;\n+\n+    if (pps->transquant_bypass_enable_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED;\n+\n+    if (pps->tiles_enabled_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_TILES_ENABLED;\n+\n+    if (pps->entropy_coding_sync_enabled_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED;\n+\n+    if (pps->loop_filter_across_tiles_enabled_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED;\n+\n+    if (pps->seq_loop_filter_across_slices_enabled_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED;\n+\n+    if (pps->deblocking_filter_override_enabled_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED;\n+\n+    if (pps->disable_dbf)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER;\n+\n+    if (pps->lists_modification_present_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT;\n+\n+    if (pps->slice_header_extension_present_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT;\n+\n+    if (pps->deblocking_filter_control_present_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT;\n+\n+    if (pps->uniform_spacing_flag)\n+        controls->pps.flags |= V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING;\n+\n+    if (pps->tiles_enabled_flag) {\n+        controls->pps.num_tile_columns_minus1 = pps->num_tile_columns - 1;\n+        controls->pps.num_tile_rows_minus1 = pps->num_tile_rows - 1;\n+\n+        for (int i = 0; i < pps->num_tile_columns; i++)\n+            controls->pps.column_width_minus1[i] = pps->column_width[i] - 1;\n+\n+        for (int i = 0; i < pps->num_tile_rows; i++)\n+            controls->pps.row_height_minus1[i] = pps->row_height[i] - 1;\n+    }\n+\n+    controls->first_slice = 1;\n+    controls->num_slices = 0;\n+    controls->num_entry_point_offsets = 0;\n+\n+    return ff_v4l2_request_reset_frame(avctx, h->ref->frame);\n+}\n+\n+static int v4l2_request_hevc_queue_decode(AVCodecContext *avctx, int last_slice)\n+{\n+    const HEVCContext *h = avctx->priv_data;\n+    V4L2RequestControlsHEVC *controls = h->ref->hwaccel_picture_private;\n+    struct v4l2_ctrl_hevc_slice_params *first_slice_params = &controls->slice_params[0];\n+    V4L2RequestContextHEVC *ctx = avctx->internal->hwaccel_priv_data;\n+    int num_controls = 0;\n+\n+    struct v4l2_ext_control control[V4L2_HEVC_CONTROLS_MAX] = {};\n+\n+    control[num_controls++] = (struct v4l2_ext_control) {\n+            .id = V4L2_CID_STATELESS_HEVC_SPS,\n+            .ptr = &controls->sps,\n+            .size = sizeof(controls->sps),\n+    };\n+\n+    control[num_controls++] = (struct v4l2_ext_control) {\n+            .id = V4L2_CID_STATELESS_HEVC_PPS,\n+            .ptr = &controls->pps,\n+            .size = sizeof(controls->pps),\n+    };\n+\n+    control[num_controls++] = (struct v4l2_ext_control) {\n+         .id = V4L2_CID_STATELESS_HEVC_DECODE_PARAMS,\n+         .ptr = &controls->dec_params,\n+         .size = sizeof(controls->dec_params),\n+    };\n+\n+    if (ctx->supports_scaling_matrix) {\n+       control[num_controls++] = (struct v4l2_ext_control) {\n+            .id = V4L2_CID_STATELESS_HEVC_SCALING_MATRIX,\n+            .ptr = &controls->scaling_matrix,\n+            .size = sizeof(controls->scaling_matrix),\n+        };\n+    }\n+\n+    if (ctx->supports_slices) {\n+       control[num_controls++] = (struct v4l2_ext_control) {\n+            .id = V4L2_CID_STATELESS_HEVC_SLICE_PARAMS,\n+            .ptr = &controls->slice_params,\n+            .size = sizeof(*first_slice_params) * controls->num_slices,\n+        };\n+    }\n+    //this assumes that decoders supporting entry_point_offsets submit a single slice per request\n+    if (ctx->supports_entry_point_offsets && first_slice_params->num_entry_point_offsets > 0) {\n+       control[num_controls++] = (struct v4l2_ext_control) {\n+            .id = V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS,\n+            .ptr = controls->entry_point_offsets,\n+            .size = sizeof(*controls->entry_point_offsets) * first_slice_params->num_entry_point_offsets,\n+        };\n+    }\n+\n+    if (ctx->decode_mode == V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED)\n+        return ff_v4l2_request_decode_slice(avctx, h->ref->frame, control, num_controls, controls->first_slice, last_slice);\n+\n+    return ff_v4l2_request_decode_frame(avctx, h->ref->frame, control, num_controls);\n+}\n+\n+static int v4l2_request_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)\n+{\n+    const HEVCContext *h = avctx->priv_data;\n+    V4L2RequestControlsHEVC *controls = h->ref->hwaccel_picture_private;\n+    V4L2RequestContextHEVC *ctx = avctx->internal->hwaccel_priv_data;\n+    V4L2RequestDescriptor *req = (V4L2RequestDescriptor*)h->ref->frame->data[0];\n+    int ret, slice = FFMIN(controls->num_slices, MAX_SLICES - 1);\n+\n+    if (ctx->decode_mode == V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED && slice) {\n+        ret = v4l2_request_hevc_queue_decode(avctx, 0);\n+        if (ret)\n+            return ret;\n+\n+        ff_v4l2_request_reset_frame(avctx, h->ref->frame);\n+        slice = controls->num_slices = 0;\n+        controls->first_slice = 0;\n+    }\n+\n+    ret = v4l2_request_hevc_fill_slice_params(h, controls, slice);\n+    if (ret)\n+        return ret;\n+\n+    if (ctx->start_code == V4L2_STATELESS_HEVC_START_CODE_ANNEX_B) {\n+        ret = ff_v4l2_request_append_output_buffer(avctx, h->ref->frame, nalu_slice_start_code, 3);\n+        if (ret)\n+            return ret;\n+    }\n+\n+    ret = ff_v4l2_request_append_output_buffer(avctx, h->ref->frame, buffer, size);\n+    if (ret)\n+        return ret;\n+\n+    controls->slice_params[slice].bit_size = req->output.used * 8; //FIXME\n+    controls->num_slices++;\n+    return 0;\n+}\n+\n+static int v4l2_request_hevc_end_frame(AVCodecContext *avctx)\n+{\n+    const HEVCContext *h = avctx->priv_data;\n+    V4L2RequestControlsHEVC *controls = h->ref->hwaccel_picture_private;\n+    int ret;\n+\n+    ret = v4l2_request_hevc_queue_decode(avctx, 1);\n+\n+    av_freep(&controls->entry_point_offsets);\n+\n+    return ret;\n+}\n+\n+static int v4l2_request_hevc_set_controls(AVCodecContext *avctx)\n+{\n+    V4L2RequestContextHEVC *ctx = avctx->internal->hwaccel_priv_data;\n+    int ret;\n+\n+    struct v4l2_ext_control control[] = {\n+        { .id = V4L2_CID_STATELESS_HEVC_DECODE_MODE, },\n+        { .id = V4L2_CID_STATELESS_HEVC_START_CODE, },\n+    };\n+    struct v4l2_query_ext_ctrl entry_point_offsets = {\n+        .id = V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS,\n+    };\n+    struct v4l2_query_ext_ctrl slice_params = {\n+        .id = V4L2_CID_STATELESS_HEVC_SLICE_PARAMS,\n+    };\n+    struct v4l2_query_ext_ctrl scaling_matrix = {\n+        .id = V4L2_CID_STATELESS_HEVC_SCALING_MATRIX,\n+    };\n+\n+    ctx->decode_mode = ff_v4l2_request_query_control_default_value(avctx, V4L2_CID_STATELESS_HEVC_DECODE_MODE);\n+    if (ctx->decode_mode != V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED &&\n+        ctx->decode_mode != V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: unsupported decode mode, %d\\n\", __func__, ctx->decode_mode);\n+        return AVERROR(EINVAL);\n+    }\n+\n+    ctx->start_code = ff_v4l2_request_query_control_default_value(avctx, V4L2_CID_STATELESS_HEVC_START_CODE);\n+    if (ctx->start_code != V4L2_STATELESS_HEVC_START_CODE_NONE &&\n+        ctx->start_code != V4L2_STATELESS_HEVC_START_CODE_ANNEX_B) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: unsupported start code, %d\\n\", __func__, ctx->start_code);\n+        return AVERROR(EINVAL);\n+    }\n+\n+    ret = ff_v4l2_request_query_control(avctx, &entry_point_offsets);\n+    if (ret) {\n+      ctx->supports_entry_point_offsets = 0;\n+    } else {\n+      ctx->supports_entry_point_offsets = 1;\n+    }\n+\n+    ret = ff_v4l2_request_query_control(avctx, &slice_params);\n+    if (ret) {\n+      ctx->supports_slices = 0;\n+      ctx->max_slices = 0;\n+      if (ctx->decode_mode == V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: decoder is slice-based, \\\n+               but doesn't support V4L2_CID_STATELESS_HEVC_SLICE_PARAMS control \\n\", __func__);\n+        return AVERROR(EINVAL);\n+      }\n+\n+      if (ctx->supports_entry_point_offsets) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: decoder supports entry_point_offsets, \\\n+               but doesn't support V4L2_CID_STATELESS_HEVC_SLICE_PARAMS control \\n\", __func__);\n+        return AVERROR(EINVAL);\n+      }\n+    } else {\n+      ctx->supports_slices = 1;\n+      ctx->max_slices = slice_params.dims[0];\n+      if (ctx->max_slices > MAX_SLICES) {\n+        av_log(avctx, AV_LOG_ERROR, \"%s: unsupported max slices, %u\\n\", __func__, ctx->max_slices);\n+        return AVERROR(EINVAL);\n+      }\n+    }\n+\n+    ret = ff_v4l2_request_query_control(avctx, &scaling_matrix);\n+    if (ret) {\n+      ctx->supports_scaling_matrix = 0;\n+    } else {\n+      ctx->supports_scaling_matrix = 1;\n+    }\n+\n+    av_log(avctx, AV_LOG_DEBUG, \"%s: decoder is %s and supports slices %d, supports entry_point_offsets: %d supports scaling_matrix: %d max slices: %u\\n\",\n+           __func__,\n+          ctx->decode_mode == V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED ? \"slice based\" : \"frame based\",\n+          ctx->supports_slices,\n+          ctx->supports_entry_point_offsets,\n+          ctx->supports_scaling_matrix,\n+          ctx->max_slices\n+    );\n+\n+    control[0].value = ctx->decode_mode;\n+    control[1].value = ctx->start_code;\n+\n+    return ff_v4l2_request_set_controls(avctx, control, FF_ARRAY_ELEMS(control));\n+}\n+\n+static int v4l2_request_hevc_init(AVCodecContext *avctx)\n+{\n+    const HEVCContext *h = avctx->priv_data;\n+    struct v4l2_ctrl_hevc_sps sps;\n+    int ret;\n+\n+    struct v4l2_ext_control control[] = {\n+        {\n+            .id = V4L2_CID_STATELESS_HEVC_SPS,\n+            .ptr = &sps,\n+            .size = sizeof(sps),\n+        },\n+    };\n+\n+    fill_sps(&sps, h);\n+\n+    ret = ff_v4l2_request_init(avctx, V4L2_PIX_FMT_HEVC_SLICE, 4 * 1024 * 1024, control, FF_ARRAY_ELEMS(control));\n+    if (ret)\n+        return ret;\n+\n+    return v4l2_request_hevc_set_controls(avctx);\n+}\n+\n+const AVHWAccel ff_hevc_v4l2request_hwaccel = {\n+    .name           = \"hevc_v4l2request\",\n+    .type           = AVMEDIA_TYPE_VIDEO,\n+    .id             = AV_CODEC_ID_HEVC,\n+    .pix_fmt        = AV_PIX_FMT_DRM_PRIME,\n+    .start_frame    = v4l2_request_hevc_start_frame,\n+    .decode_slice   = v4l2_request_hevc_decode_slice,\n+    .end_frame      = v4l2_request_hevc_end_frame,\n+    .frame_priv_data_size = sizeof(V4L2RequestControlsHEVC),\n+    .init           = v4l2_request_hevc_init,\n+    .uninit         = ff_v4l2_request_uninit,\n+    .priv_data_size = sizeof(V4L2RequestContextHEVC),\n+    .frame_params   = ff_v4l2_request_frame_params,\n+    .caps_internal  = HWACCEL_CAP_ASYNC_SAFE,\n+};\n\nFrom 44f20a53f2ef6ad0ecfb413ebcc95f92fc17377f Mon Sep 17 00:00:00 2001\nFrom: Boris Brezillon <boris.brezillon@collabora.com>\nDate: Thu, 12 Dec 2019 16:13:55 +0100\nSubject: [PATCH 09/12] Add V4L2 request API VP9 hwaccel\n\nSigned-off-by: Boris Brezillon <boris.brezillon@collabora.com>\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\n---\n configure                     |   3 +\n libavcodec/Makefile           |   1 +\n libavcodec/hwaccels.h         |   1 +\n libavcodec/v4l2_request_vp9.c | 282 ++++++++++++++++++++++++++++++++++\n libavcodec/vp9.c              | 192 ++++++++++++++++-------\n libavcodec/vp9dec.h           |   4 +\n libavcodec/vp9shared.h        |   1 +\n 7 files changed, 429 insertions(+), 55 deletions(-)\n create mode 100644 libavcodec/v4l2_request_vp9.c\n\ndiff --git a/configure b/configure\nindex 6192a6c144..36a1271a6c 100755\n--- a/configure\n+++ b/configure\n@@ -3042,6 +3042,8 @@ vp9_dxva2_hwaccel_deps=\"dxva2 DXVA_PicParams_VP9\"\n vp9_dxva2_hwaccel_select=\"vp9_decoder\"\n vp9_nvdec_hwaccel_deps=\"nvdec\"\n vp9_nvdec_hwaccel_select=\"vp9_decoder\"\n+vp9_v4l2request_hwaccel_deps=\"v4l2_request\"\n+vp9_v4l2request_hwaccel_select=\"vp9_decoder\"\n vp9_vaapi_hwaccel_deps=\"vaapi VADecPictureParameterBufferVP9_bit_depth\"\n vp9_vaapi_hwaccel_select=\"vp9_decoder\"\n vp9_vdpau_hwaccel_deps=\"vdpau VdpPictureInfoVP9\"\n@@ -6641,6 +6643,7 @@ check_cc h264_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_H264_SLICE;\"\n check_cc hevc_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_HEVC_SLICE;\"\n check_cc mpeg2_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_MPEG2_SLICE;\"\n check_cc vp8_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_VP8_FRAME;\"\n+check_cc vp9_v4l2_request linux/videodev2.h \"int i = V4L2_PIX_FMT_VP9_FRAME;\"\n \n check_headers sys/videoio.h\n test_code cc sys/videoio.h \"struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;\" && enable_sanitized struct_v4l2_frmivalenum_discrete\ndiff --git a/libavcodec/Makefile b/libavcodec/Makefile\nindex 0059074530..38edf1cfe5 100644\n--- a/libavcodec/Makefile\n+++ b/libavcodec/Makefile\n@@ -977,6 +977,7 @@ OBJS-$(CONFIG_VP8_VAAPI_HWACCEL)          += vaapi_vp8.o\n OBJS-$(CONFIG_VP9_D3D11VA_HWACCEL)        += dxva2_vp9.o\n OBJS-$(CONFIG_VP9_DXVA2_HWACCEL)          += dxva2_vp9.o\n OBJS-$(CONFIG_VP9_NVDEC_HWACCEL)          += nvdec_vp9.o\n+OBJS-$(CONFIG_VP9_V4L2REQUEST_HWACCEL)    += v4l2_request_vp9.o\n OBJS-$(CONFIG_VP9_VAAPI_HWACCEL)          += vaapi_vp9.o\n OBJS-$(CONFIG_VP9_VDPAU_HWACCEL)          += vdpau_vp9.o\n OBJS-$(CONFIG_VP8_QSV_HWACCEL)            += qsvdec.o\ndiff --git a/libavcodec/hwaccels.h b/libavcodec/hwaccels.h\nindex ffb9fa5087..fc5d0b0479 100644\n--- a/libavcodec/hwaccels.h\n+++ b/libavcodec/hwaccels.h\n@@ -76,6 +76,7 @@ extern const AVHWAccel ff_vp9_d3d11va_hwaccel;\n extern const AVHWAccel ff_vp9_d3d11va2_hwaccel;\n extern const AVHWAccel ff_vp9_dxva2_hwaccel;\n extern const AVHWAccel ff_vp9_nvdec_hwaccel;\n+extern const AVHWAccel ff_vp9_v4l2request_hwaccel;\n extern const AVHWAccel ff_vp9_vaapi_hwaccel;\n extern const AVHWAccel ff_vp9_vdpau_hwaccel;\n extern const AVHWAccel ff_wmv3_d3d11va_hwaccel;\ndiff --git a/libavcodec/v4l2_request_vp9.c b/libavcodec/v4l2_request_vp9.c\nnew file mode 100644\nindex 0000000000..ec0300f66d\n--- /dev/null\n+++ b/libavcodec/v4l2_request_vp9.c\n@@ -0,0 +1,282 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+#include \"hwconfig.h\"\n+#include \"v4l2_request.h\"\n+#include \"vp9dec.h\"\n+\n+typedef struct V4L2RequestControlsVP9 {\n+    struct v4l2_ctrl_vp9_frame decode_params;\n+    struct v4l2_ctrl_vp9_compressed_hdr chp;\n+} V4L2RequestControlsVP9;\n+\n+static void v4l2_request_vp9_set_frame_ctx(AVCodecContext *avctx)\n+{\n+    VP9Context *s = avctx->priv_data;\n+    const VP9Frame *f = &s->s.frames[CUR_FRAME];\n+    V4L2RequestControlsVP9 *controls = f->hwaccel_picture_private;\n+    struct v4l2_ctrl_vp9_compressed_hdr *chp = &controls->chp;\n+\n+    memset(chp, 0, sizeof(&chp));\n+\n+    chp->tx_mode = s->s.h.txfmmode;\n+    memcpy(chp->tx8, s->prob_raw.p.tx8p, sizeof(s->prob_raw.p.tx8p));\n+    memcpy(chp->tx16, s->prob_raw.p.tx16p, sizeof(s->prob_raw.p.tx16p));\n+    memcpy(chp->tx32, s->prob_raw.p.tx32p, sizeof(s->prob_raw.p.tx32p));\n+    for (unsigned i = 0; i < 4; i++) {\n+        for (unsigned j = 0; j < 2; j++) {\n+            for (unsigned k = 0; k < 2; k++) {\n+                for (unsigned l = 0; l < 6; l++) {\n+                    for (unsigned m = 0; m < 6; m++) {\n+                        memcpy(chp->coef[i][j][k][l][m], s->prob_raw.coef[i][j][k][l][m], sizeof(chp->coef[0][0][0][0][0]));\n+                    }\n+                }\n+            }\n+        }\n+    }\n+    memcpy(chp->skip, s->prob_raw.p.skip, sizeof(s->prob_raw.p.skip));\n+    memcpy(chp->inter_mode, s->prob_raw.p.mv_mode, sizeof(s->prob_raw.p.mv_mode));\n+    memcpy(chp->interp_filter, s->prob_raw.p.filter, sizeof(s->prob_raw.p.filter));\n+    memcpy(chp->is_inter, s->prob_raw.p.intra, sizeof(s->prob_raw.p.intra));\n+    memcpy(chp->comp_mode, s->prob_raw.p.comp, sizeof(s->prob_raw.p.comp));\n+    memcpy(chp->single_ref, s->prob_raw.p.single_ref, sizeof(s->prob_raw.p.single_ref));\n+    memcpy(chp->comp_ref, s->prob_raw.p.comp_ref, sizeof(s->prob_raw.p.comp_ref));\n+    memcpy(chp->y_mode, s->prob_raw.p.y_mode, sizeof(s->prob_raw.p.y_mode));\n+    for (unsigned i = 0; i < 10; i++)\n+        memcpy(chp->uv_mode[i], s->prob.p.uv_mode[i], sizeof(s->prob.p.uv_mode[0]));\n+    for (unsigned i = 0; i < 4; i++)\n+        memcpy(chp->partition[i * 4], s->prob_raw.p.partition[i], sizeof(s->prob_raw.p.partition[0]));\n+    memcpy(chp->mv.joint, s->prob_raw.p.mv_joint, sizeof(s->prob_raw.p.mv_joint));\n+    for (unsigned i = 0; i < 2; i++) {\n+         chp->mv.sign[i] = s->prob_raw.p.mv_comp[i].sign;\n+         memcpy(chp->mv.classes[i], s->prob_raw.p.mv_comp[i].classes, sizeof(s->prob_raw.p.mv_comp[0].classes));\n+         chp->mv.class0_bit[i] = s->prob_raw.p.mv_comp[i].class0;\n+         memcpy(chp->mv.bits[i], s->prob_raw.p.mv_comp[i].bits, sizeof(s->prob_raw.p.mv_comp[0].bits));\n+         memcpy(chp->mv.class0_fr[i], s->prob_raw.p.mv_comp[i].class0_fp, sizeof(s->prob_raw.p.mv_comp[0].class0_fp));\n+         memcpy(chp->mv.fr[i], s->prob_raw.p.mv_comp[i].fp, sizeof(s->prob_raw.p.mv_comp[0].fp));\n+         chp->mv.class0_hp[i] = s->prob_raw.p.mv_comp[i].class0_hp;\n+         chp->mv.hp[i] = s->prob_raw.p.mv_comp[i].hp;\n+    }\n+}\n+\n+static void fill_frame(struct v4l2_ctrl_vp9_frame *dec_params, AVCodecContext *avctx)\n+{\n+    const VP9Context *s = avctx->priv_data;\n+    const ThreadFrame *ref;\n+\n+    memset(dec_params, 0, sizeof(*dec_params));\n+\n+    if (s->s.h.keyframe)\n+        dec_params->flags |= V4L2_VP9_FRAME_FLAG_KEY_FRAME;\n+    if (!s->s.h.invisible)\n+        dec_params->flags |= V4L2_VP9_FRAME_FLAG_SHOW_FRAME;\n+    if (s->s.h.errorres)\n+        dec_params->flags |= V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT;\n+    if (s->s.h.intraonly)\n+        dec_params->flags |= V4L2_VP9_FRAME_FLAG_INTRA_ONLY;\n+    if (!s->s.h.keyframe && s->s.h.highprecisionmvs)\n+        dec_params->flags |= V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV;\n+    if (s->s.h.refreshctx)\n+        dec_params->flags |= V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX;\n+    if (s->s.h.parallelmode)\n+        dec_params->flags |= V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE;\n+    if (s->ss_h)\n+        dec_params->flags |= V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING;\n+    if (s->ss_v)\n+        dec_params->flags |= V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING;\n+    if (avctx->color_range == AVCOL_RANGE_JPEG)\n+        dec_params->flags |= V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING;\n+\n+    dec_params->compressed_header_size = s->s.h.compressed_header_size;\n+    dec_params->uncompressed_header_size = s->s.h.uncompressed_header_size;\n+    dec_params->profile = s->s.h.profile;\n+    dec_params->reset_frame_context = s->s.h.resetctx > 0 ? s->s.h.resetctx - 1 : 0;\n+    dec_params->frame_context_idx = s->s.h.framectxid;\n+    dec_params->bit_depth = s->s.h.bpp;\n+\n+    dec_params->interpolation_filter = s->s.h.filtermode ^ (s->s.h.filtermode <= 1);\n+    dec_params->tile_cols_log2 = s->s.h.tiling.log2_tile_cols;\n+    dec_params->tile_rows_log2 = s->s.h.tiling.log2_tile_rows;\n+    dec_params->reference_mode = s->s.h.comppredmode;\n+    dec_params->frame_width_minus_1 = s->w - 1;\n+    dec_params->frame_height_minus_1 = s->h - 1;\n+    //dec_params->render_width_minus_1 = avctx->width - 1;\n+    //dec_params->render_height_minus_1 = avctx->height - 1;\n+\n+    ref = &s->s.refs[s->s.h.refidx[0]];\n+    if (ref->f && ref->f->buf[0])\n+        dec_params->last_frame_ts = ff_v4l2_request_get_capture_timestamp(ref->f);\n+    ref = &s->s.refs[s->s.h.refidx[1]];\n+    if (ref->f && ref->f->buf[0])\n+        dec_params->golden_frame_ts = ff_v4l2_request_get_capture_timestamp(ref->f);\n+    ref = &s->s.refs[s->s.h.refidx[2]];\n+    if (ref->f && ref->f->buf[0])\n+        dec_params->alt_frame_ts = ff_v4l2_request_get_capture_timestamp(ref->f);\n+\n+    if (s->s.h.signbias[0])\n+        dec_params->ref_frame_sign_bias |= V4L2_VP9_SIGN_BIAS_LAST;\n+    if (s->s.h.signbias[1])\n+        dec_params->ref_frame_sign_bias |= V4L2_VP9_SIGN_BIAS_GOLDEN;\n+    if (s->s.h.signbias[2])\n+        dec_params->ref_frame_sign_bias |= V4L2_VP9_SIGN_BIAS_ALT;\n+\n+    if (s->s.h.lf_delta.enabled)\n+        dec_params->lf.flags |= V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED;\n+    if (s->s.h.lf_delta.updated)\n+        dec_params->lf.flags |= V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE;\n+\n+    dec_params->lf.level = s->s.h.filter.level;\n+    dec_params->lf.sharpness = s->s.h.filter.sharpness;\n+    for (unsigned i = 0; i < 4; i++)\n+        dec_params->lf.ref_deltas[i] = s->s.h.lf_delta.ref[i];\n+    for (unsigned i = 0; i < 2; i++)\n+        dec_params->lf.mode_deltas[i] = s->s.h.lf_delta.mode[i];\n+\n+    dec_params->quant.base_q_idx = s->s.h.yac_qi;\n+    dec_params->quant.delta_q_y_dc = s->s.h.ydc_qdelta;\n+    dec_params->quant.delta_q_uv_dc = s->s.h.uvdc_qdelta;\n+    dec_params->quant.delta_q_uv_ac = s->s.h.uvac_qdelta;\n+\n+    if (s->s.h.segmentation.enabled)\n+        dec_params->seg.flags |= V4L2_VP9_SEGMENTATION_FLAG_ENABLED;\n+    if (s->s.h.segmentation.update_map)\n+        dec_params->seg.flags |= V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP;\n+    if (s->s.h.segmentation.temporal)\n+        dec_params->seg.flags |= V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE;\n+    if (s->s.h.segmentation.update_data)\n+        dec_params->seg.flags |= V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA;\n+    if (s->s.h.segmentation.absolute_vals)\n+        dec_params->seg.flags |= V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE;\n+\n+    for (unsigned i = 0; i < 7; i++)\n+        dec_params->seg.tree_probs[i] = s->s.h.segmentation.prob[i];\n+\n+    if (s->s.h.segmentation.temporal) {\n+        for (unsigned i = 0; i < 3; i++)\n+            dec_params->seg.pred_probs[i] = s->s.h.segmentation.pred_prob[i];\n+    } else {\n+        memset(dec_params->seg.pred_probs, 255, sizeof(dec_params->seg.pred_probs));\n+    }\n+\n+    for (unsigned i = 0; i < 8; i++) {\n+        if (s->s.h.segmentation.feat[i].q_enabled) {\n+            dec_params->seg.feature_enabled[i] |= 1 << V4L2_VP9_SEG_LVL_ALT_Q;\n+            dec_params->seg.feature_data[i][V4L2_VP9_SEG_LVL_ALT_Q] = s->s.h.segmentation.feat[i].q_val;\n+        }\n+\n+        if (s->s.h.segmentation.feat[i].lf_enabled) {\n+            dec_params->seg.feature_enabled[i] |= 1 << V4L2_VP9_SEG_LVL_ALT_L;\n+            dec_params->seg.feature_data[i][V4L2_VP9_SEG_LVL_ALT_L] = s->s.h.segmentation.feat[i].lf_val;\n+        }\n+\n+        if (s->s.h.segmentation.feat[i].ref_enabled) {\n+            dec_params->seg.feature_enabled[i] |= 1 << V4L2_VP9_SEG_LVL_REF_FRAME;\n+            dec_params->seg.feature_data[i][V4L2_VP9_SEG_LVL_REF_FRAME] = s->s.h.segmentation.feat[i].ref_val;\n+        }\n+\n+        if (s->s.h.segmentation.feat[i].skip_enabled)\n+            dec_params->seg.feature_enabled[i] |= 1 << V4L2_VP9_SEG_LVL_SKIP;\n+    }\n+}\n+\n+static int v4l2_request_vp9_start_frame(AVCodecContext *avctx,\n+                                        av_unused const uint8_t *buffer,\n+                                        av_unused uint32_t size)\n+{\n+    const VP9Context *s = avctx->priv_data;\n+    const VP9Frame *f = &s->s.frames[CUR_FRAME];\n+    V4L2RequestControlsVP9 *controls = f->hwaccel_picture_private;\n+\n+    v4l2_request_vp9_set_frame_ctx(avctx);\n+\n+    fill_frame(&controls->decode_params, avctx);\n+\n+    return ff_v4l2_request_reset_frame(avctx, f->tf.f);\n+}\n+\n+static int v4l2_request_vp9_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)\n+{\n+    const VP9Context *s = avctx->priv_data;\n+    const VP9Frame *f = &s->s.frames[CUR_FRAME];\n+\n+    return ff_v4l2_request_append_output_buffer(avctx, f->tf.f, buffer, size);\n+}\n+\n+static int v4l2_request_vp9_end_frame(AVCodecContext *avctx)\n+{\n+    const VP9Context *s = avctx->priv_data;\n+    const VP9Frame *f = &s->s.frames[CUR_FRAME];\n+    V4L2RequestControlsVP9 *controls = f->hwaccel_picture_private;\n+    int ret;\n+\n+    struct v4l2_ext_control control[] = {\n+        {\n+            .id = V4L2_CID_STATELESS_VP9_FRAME,\n+            .ptr = &controls->decode_params,\n+            .size = sizeof(controls->decode_params),\n+        },\n+        {\n+            .id = V4L2_CID_STATELESS_VP9_COMPRESSED_HDR,\n+            .ptr = &controls->chp,\n+            .size = sizeof(controls->chp),\n+        },\n+    };\n+\n+    ret = ff_v4l2_request_decode_frame(avctx, f->tf.f, control, FF_ARRAY_ELEMS(control));\n+    if (ret)\n+        return ret;\n+\n+    if (!s->s.h.refreshctx)\n+        return 0;\n+\n+    return 0;\n+}\n+\n+static int v4l2_request_vp9_init(AVCodecContext *avctx)\n+{\n+    struct v4l2_ctrl_vp9_frame frame;\n+\n+    struct v4l2_ext_control control[] = {\n+        {\n+            .id = V4L2_CID_STATELESS_VP9_FRAME,\n+            .ptr = &frame,\n+            .size = sizeof(frame),\n+        },\n+    };\n+\n+    fill_frame(&frame, avctx);\n+\n+    // TODO: check V4L2_CID_MPEG_VIDEO_VP9_PROFILE\n+    return ff_v4l2_request_init(avctx, V4L2_PIX_FMT_VP9_FRAME, 3 * 1024 * 1024, control, FF_ARRAY_ELEMS(control));\n+}\n+\n+const AVHWAccel ff_vp9_v4l2request_hwaccel = {\n+    .name           = \"vp9_v4l2request\",\n+    .type           = AVMEDIA_TYPE_VIDEO,\n+    .id             = AV_CODEC_ID_VP9,\n+    .pix_fmt        = AV_PIX_FMT_DRM_PRIME,\n+    .start_frame    = v4l2_request_vp9_start_frame,\n+    .decode_slice   = v4l2_request_vp9_decode_slice,\n+    .end_frame      = v4l2_request_vp9_end_frame,\n+    .frame_priv_data_size = sizeof(V4L2RequestControlsVP9),\n+    .init           = v4l2_request_vp9_init,\n+    .uninit         = ff_v4l2_request_uninit,\n+    .priv_data_size = sizeof(V4L2RequestContext),\n+    .frame_params   = ff_v4l2_request_frame_params,\n+    .caps_internal  = HWACCEL_CAP_ASYNC_SAFE,\n+};\ndiff --git a/libavcodec/vp9.c b/libavcodec/vp9.c\nindex 4659f94ee8..1b2f1eeaf6 100644\n--- a/libavcodec/vp9.c\n+++ b/libavcodec/vp9.c\n@@ -191,6 +191,7 @@ static int update_size(AVCodecContext *avctx, int w, int h)\n #define HWACCEL_MAX (CONFIG_VP9_DXVA2_HWACCEL + \\\n                      CONFIG_VP9_D3D11VA_HWACCEL * 2 + \\\n                      CONFIG_VP9_NVDEC_HWACCEL + \\\n+                     CONFIG_VP9_V4L2REQUEST_HWACCEL + \\\n                      CONFIG_VP9_VAAPI_HWACCEL + \\\n                      CONFIG_VP9_VDPAU_HWACCEL)\n     enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmtp = pix_fmts;\n@@ -223,6 +224,9 @@ static int update_size(AVCodecContext *avctx, int w, int h)\n #endif\n #if CONFIG_VP9_VDPAU_HWACCEL\n             *fmtp++ = AV_PIX_FMT_VDPAU;\n+#endif\n+#if CONFIG_VP9_V4L2REQUEST_HWACCEL\n+            *fmtp++ = AV_PIX_FMT_DRM_PRIME;\n #endif\n             break;\n         case AV_PIX_FMT_YUV420P12:\n@@ -234,6 +238,9 @@ static int update_size(AVCodecContext *avctx, int w, int h)\n #endif\n #if CONFIG_VP9_VDPAU_HWACCEL\n             *fmtp++ = AV_PIX_FMT_VDPAU;\n+#endif\n+#if CONFIG_VP9_V4L2REQUEST_HWACCEL\n+            *fmtp++ = AV_PIX_FMT_DRM_PRIME;\n #endif\n             break;\n         }\n@@ -382,7 +389,7 @@ static av_always_inline int inv_recenter_nonneg(int v, int m)\n }\n \n // differential forward probability updates\n-static int update_prob(VP56RangeCoder *c, int p)\n+static int read_prob_delta(VP56RangeCoder *c)\n {\n     static const uint8_t inv_map_table[255] = {\n           7,  20,  33,  46,  59,  72,  85,  98, 111, 124, 137, 150, 163, 176,\n@@ -436,8 +443,13 @@ static int update_prob(VP56RangeCoder *c, int p)\n         av_assert2(d < FF_ARRAY_ELEMS(inv_map_table));\n     }\n \n-    return p <= 128 ? 1 + inv_recenter_nonneg(inv_map_table[d], p - 1) :\n-                    255 - inv_recenter_nonneg(inv_map_table[d], 255 - p);\n+    return inv_map_table[d];\n+}\n+\n+static int update_prob(int p, int d)\n+{\n+    return p <= 128 ? 1 + inv_recenter_nonneg(d, p - 1) :\n+                    255 - inv_recenter_nonneg(d, 255 - p);\n }\n \n static int read_colorspace_details(AVCodecContext *avctx)\n@@ -703,7 +715,8 @@ static int decode_frame_header(AVCodecContext *avctx,\n                                          get_bits(&s->gb, 8) : 255;\n         }\n \n-        if (get_bits1(&s->gb)) {\n+        s->s.h.segmentation.update_data = get_bits1(&s->gb);\n+        if (s->s.h.segmentation.update_data) {\n             s->s.h.segmentation.absolute_vals = get_bits1(&s->gb);\n             for (i = 0; i < 8; i++) {\n                 if ((s->s.h.segmentation.feat[i].q_enabled = get_bits1(&s->gb)))\n@@ -904,6 +917,8 @@ static int decode_frame_header(AVCodecContext *avctx,\n      * as explicit copies if the fw update is missing (and skip the copy upon\n      * fw update)? */\n     s->prob.p = s->prob_ctx[c].p;\n+    memset(&s->prob_raw.p, 0, sizeof(s->prob_raw.p));\n+    memset(&s->prob_raw.coef, 0, sizeof(s->prob_raw.coef));\n \n     // txfm updates\n     if (s->s.h.lossless) {\n@@ -915,18 +930,25 @@ static int decode_frame_header(AVCodecContext *avctx,\n \n         if (s->s.h.txfmmode == TX_SWITCHABLE) {\n             for (i = 0; i < 2; i++)\n-                if (vp56_rac_get_prob_branchy(&s->c, 252))\n-                    s->prob.p.tx8p[i] = update_prob(&s->c, s->prob.p.tx8p[i]);\n+                if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                    s->prob_raw.p.tx8p[i] = read_prob_delta(&s->c);\n+                    s->prob.p.tx8p[i] = update_prob(s->prob.p.tx8p[i],\n+                                                    s->prob_raw.p.tx8p[i]);\n+                }\n             for (i = 0; i < 2; i++)\n                 for (j = 0; j < 2; j++)\n-                    if (vp56_rac_get_prob_branchy(&s->c, 252))\n-                        s->prob.p.tx16p[i][j] =\n-                            update_prob(&s->c, s->prob.p.tx16p[i][j]);\n+                    if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                        s->prob_raw.p.tx16p[i][j] = read_prob_delta(&s->c);\n+                        s->prob.p.tx16p[i][j] = update_prob(s->prob.p.tx16p[i][j],\n+                                                            s->prob_raw.p.tx16p[i][j]);\n+                    }\n             for (i = 0; i < 2; i++)\n                 for (j = 0; j < 3; j++)\n-                    if (vp56_rac_get_prob_branchy(&s->c, 252))\n-                        s->prob.p.tx32p[i][j] =\n-                            update_prob(&s->c, s->prob.p.tx32p[i][j]);\n+                    if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                        s->prob_raw.p.tx32p[i][j] = read_prob_delta(&s->c);\n+                        s->prob.p.tx32p[i][j] = update_prob(s->prob.p.tx32p[i][j],\n+                                                            s->prob_raw.p.tx32p[i][j]);\n+                    }\n         }\n     }\n \n@@ -938,15 +960,18 @@ static int decode_frame_header(AVCodecContext *avctx,\n                 for (k = 0; k < 2; k++)\n                     for (l = 0; l < 6; l++)\n                         for (m = 0; m < 6; m++) {\n+                            uint8_t *pd = s->prob_raw.coef[i][j][k][l][m];\n                             uint8_t *p = s->prob.coef[i][j][k][l][m];\n                             uint8_t *r = ref[j][k][l][m];\n                             if (m >= 3 && l == 0) // dc only has 3 pt\n                                 break;\n                             for (n = 0; n < 3; n++) {\n-                                if (vp56_rac_get_prob_branchy(&s->c, 252))\n-                                    p[n] = update_prob(&s->c, r[n]);\n-                                else\n+                                if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                                    pd[n] = read_prob_delta(&s->c);\n+                                    p[n] = update_prob(r[n], pd[n]);\n+                                } else {\n                                     p[n] = r[n];\n+                                }\n                             }\n                             memcpy(&p[3], ff_vp9_model_pareto8[p[2]], 8);\n                         }\n@@ -961,7 +986,7 @@ static int decode_frame_header(AVCodecContext *avctx,\n                                 break;\n                             memcpy(p, r, 3);\n                             memcpy(&p[3], ff_vp9_model_pareto8[p[2]], 8);\n-                        }\n+                         }\n         }\n         if (s->s.h.txfmmode == i)\n             break;\n@@ -969,25 +994,37 @@ static int decode_frame_header(AVCodecContext *avctx,\n \n     // mode updates\n     for (i = 0; i < 3; i++)\n-        if (vp56_rac_get_prob_branchy(&s->c, 252))\n-            s->prob.p.skip[i] = update_prob(&s->c, s->prob.p.skip[i]);\n+        if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+            s->prob_raw.p.skip[i] = read_prob_delta(&s->c);\n+            s->prob.p.skip[i] = update_prob(s->prob.p.skip[i],\n+                                            s->prob_raw.p.skip[i]);\n+        }\n     if (!s->s.h.keyframe && !s->s.h.intraonly) {\n         for (i = 0; i < 7; i++)\n             for (j = 0; j < 3; j++)\n-                if (vp56_rac_get_prob_branchy(&s->c, 252))\n+                if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                    s->prob_raw.p.mv_mode[i][j] = read_prob_delta(&s->c);\n                     s->prob.p.mv_mode[i][j] =\n-                        update_prob(&s->c, s->prob.p.mv_mode[i][j]);\n+                        update_prob(s->prob.p.mv_mode[i][j],\n+                                    s->prob_raw.p.mv_mode[i][j]);\n+                }\n \n         if (s->s.h.filtermode == FILTER_SWITCHABLE)\n             for (i = 0; i < 4; i++)\n                 for (j = 0; j < 2; j++)\n-                    if (vp56_rac_get_prob_branchy(&s->c, 252))\n+                    if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                        s->prob_raw.p.filter[i][j] = read_prob_delta(&s->c);\n                         s->prob.p.filter[i][j] =\n-                            update_prob(&s->c, s->prob.p.filter[i][j]);\n+                            update_prob(s->prob.p.filter[i][j],\n+                                        s->prob_raw.p.filter[i][j]);\n+                    }\n \n         for (i = 0; i < 4; i++)\n-            if (vp56_rac_get_prob_branchy(&s->c, 252))\n-                s->prob.p.intra[i] = update_prob(&s->c, s->prob.p.intra[i]);\n+            if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                s->prob_raw.p.intra[i] = read_prob_delta(&s->c);\n+                s->prob.p.intra[i] = update_prob(s->prob.p.intra[i],\n+                                                 s->prob_raw.p.intra[i]);\n+            }\n \n         if (s->s.h.allowcompinter) {\n             s->s.h.comppredmode = vp8_rac_get(&s->c);\n@@ -995,92 +1032,134 @@ static int decode_frame_header(AVCodecContext *avctx,\n                 s->s.h.comppredmode += vp8_rac_get(&s->c);\n             if (s->s.h.comppredmode == PRED_SWITCHABLE)\n                 for (i = 0; i < 5; i++)\n-                    if (vp56_rac_get_prob_branchy(&s->c, 252))\n+                    if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                        s->prob_raw.p.comp[i] = read_prob_delta(&s->c);\n                         s->prob.p.comp[i] =\n-                            update_prob(&s->c, s->prob.p.comp[i]);\n+                            update_prob(s->prob.p.comp[i], s->prob_raw.p.comp[i]);\n+                    }\n         } else {\n             s->s.h.comppredmode = PRED_SINGLEREF;\n         }\n \n         if (s->s.h.comppredmode != PRED_COMPREF) {\n             for (i = 0; i < 5; i++) {\n-                if (vp56_rac_get_prob_branchy(&s->c, 252))\n+                if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                    s->prob_raw.p.single_ref[i][0] = read_prob_delta(&s->c);\n                     s->prob.p.single_ref[i][0] =\n-                        update_prob(&s->c, s->prob.p.single_ref[i][0]);\n-                if (vp56_rac_get_prob_branchy(&s->c, 252))\n+                        update_prob(s->prob.p.single_ref[i][0],\n+                                    s->prob_raw.p.single_ref[i][0]);\n+                }\n+                if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                    s->prob_raw.p.single_ref[i][1] = read_prob_delta(&s->c);\n                     s->prob.p.single_ref[i][1] =\n-                        update_prob(&s->c, s->prob.p.single_ref[i][1]);\n+                        update_prob(s->prob.p.single_ref[i][1],\n+                                    s->prob_raw.p.single_ref[i][1]);\n+                }\n             }\n         }\n \n         if (s->s.h.comppredmode != PRED_SINGLEREF) {\n             for (i = 0; i < 5; i++)\n-                if (vp56_rac_get_prob_branchy(&s->c, 252))\n+                if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                    s->prob_raw.p.comp_ref[i] = read_prob_delta(&s->c);\n                     s->prob.p.comp_ref[i] =\n-                        update_prob(&s->c, s->prob.p.comp_ref[i]);\n+                        update_prob(s->prob.p.comp_ref[i],\n+                                    s->prob_raw.p.comp_ref[i]);\n+                }\n         }\n \n         for (i = 0; i < 4; i++)\n             for (j = 0; j < 9; j++)\n-                if (vp56_rac_get_prob_branchy(&s->c, 252))\n+                if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                    s->prob_raw.p.y_mode[i][j] = read_prob_delta(&s->c);\n                     s->prob.p.y_mode[i][j] =\n-                        update_prob(&s->c, s->prob.p.y_mode[i][j]);\n+                        update_prob(s->prob.p.y_mode[i][j],\n+                                    s->prob_raw.p.y_mode[i][j]);\n+                }\n \n         for (i = 0; i < 4; i++)\n             for (j = 0; j < 4; j++)\n                 for (k = 0; k < 3; k++)\n-                    if (vp56_rac_get_prob_branchy(&s->c, 252))\n+                    if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                        s->prob_raw.p.partition[i][j][k] = read_prob_delta(&s->c);\n                         s->prob.p.partition[3 - i][j][k] =\n-                            update_prob(&s->c,\n-                                        s->prob.p.partition[3 - i][j][k]);\n+                            update_prob(s->prob.p.partition[3 - i][j][k],\n+                                        s->prob_raw.p.partition[i][j][k]);\n+                    }\n \n         // mv fields don't use the update_prob subexp model for some reason\n         for (i = 0; i < 3; i++)\n-            if (vp56_rac_get_prob_branchy(&s->c, 252))\n-                s->prob.p.mv_joint[i] = (vp8_rac_get_uint(&s->c, 7) << 1) | 1;\n+            if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                s->prob_raw.p.mv_joint[i] = (vp8_rac_get_uint(&s->c, 7) << 1) | 1;\n+                s->prob.p.mv_joint[i] = s->prob_raw.p.mv_joint[i];\n+            }\n \n         for (i = 0; i < 2; i++) {\n-            if (vp56_rac_get_prob_branchy(&s->c, 252))\n-                s->prob.p.mv_comp[i].sign =\n+            if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                s->prob_raw.p.mv_comp[i].sign =\n                     (vp8_rac_get_uint(&s->c, 7) << 1) | 1;\n+                s->prob.p.mv_comp[i].sign =\n+                    s->prob_raw.p.mv_comp[i].sign;\n+            }\n \n             for (j = 0; j < 10; j++)\n-                if (vp56_rac_get_prob_branchy(&s->c, 252))\n-                    s->prob.p.mv_comp[i].classes[j] =\n+                if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                    s->prob_raw.p.mv_comp[i].classes[j] =\n                         (vp8_rac_get_uint(&s->c, 7) << 1) | 1;\n+                    s->prob.p.mv_comp[i].classes[j] =\n+                        s->prob_raw.p.mv_comp[i].classes[j];\n+                }\n \n-            if (vp56_rac_get_prob_branchy(&s->c, 252))\n-                s->prob.p.mv_comp[i].class0 =\n+            if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                s->prob_raw.p.mv_comp[i].class0 =\n                     (vp8_rac_get_uint(&s->c, 7) << 1) | 1;\n+                s->prob.p.mv_comp[i].class0 =\n+                    s->prob_raw.p.mv_comp[i].class0;\n+            }\n \n             for (j = 0; j < 10; j++)\n-                if (vp56_rac_get_prob_branchy(&s->c, 252))\n-                    s->prob.p.mv_comp[i].bits[j] =\n+                if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                    s->prob_raw.p.mv_comp[i].bits[j] =\n                         (vp8_rac_get_uint(&s->c, 7) << 1) | 1;\n+                    s->prob.p.mv_comp[i].bits[j] =\n+                        s->prob_raw.p.mv_comp[i].bits[j];\n+                }\n         }\n \n         for (i = 0; i < 2; i++) {\n             for (j = 0; j < 2; j++)\n                 for (k = 0; k < 3; k++)\n-                    if (vp56_rac_get_prob_branchy(&s->c, 252))\n-                        s->prob.p.mv_comp[i].class0_fp[j][k] =\n+                    if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                        s->prob_raw.p.mv_comp[i].class0_fp[j][k] =\n                             (vp8_rac_get_uint(&s->c, 7) << 1) | 1;\n+                        s->prob.p.mv_comp[i].class0_fp[j][k] =\n+                            s->prob_raw.p.mv_comp[i].class0_fp[j][k];\n+                    }\n \n             for (j = 0; j < 3; j++)\n-                if (vp56_rac_get_prob_branchy(&s->c, 252))\n-                    s->prob.p.mv_comp[i].fp[j] =\n+                if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                    s->prob_raw.p.mv_comp[i].fp[j] =\n                         (vp8_rac_get_uint(&s->c, 7) << 1) | 1;\n+                    s->prob.p.mv_comp[i].fp[j] =\n+                        s->prob_raw.p.mv_comp[i].fp[j];\n+                }\n         }\n \n         if (s->s.h.highprecisionmvs) {\n             for (i = 0; i < 2; i++) {\n-                if (vp56_rac_get_prob_branchy(&s->c, 252))\n-                    s->prob.p.mv_comp[i].class0_hp =\n+                if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                    s->prob_raw.p.mv_comp[i].class0_hp =\n                         (vp8_rac_get_uint(&s->c, 7) << 1) | 1;\n+                    s->prob.p.mv_comp[i].class0_hp =\n+                        s->prob_raw.p.mv_comp[i].class0_hp;\n+                }\n \n-                if (vp56_rac_get_prob_branchy(&s->c, 252))\n-                    s->prob.p.mv_comp[i].hp =\n+                if (vp56_rac_get_prob_branchy(&s->c, 252)) {\n+                    s->prob_raw.p.mv_comp[i].hp =\n                         (vp8_rac_get_uint(&s->c, 7) << 1) | 1;\n+                    s->prob.p.mv_comp[i].hp =\n+                        s->prob_raw.p.mv_comp[i].hp;\n+                }\n             }\n         }\n     }\n@@ -1912,6 +1991,9 @@ AVCodec ff_vp9_decoder = {\n #endif\n #if CONFIG_VP9_VDPAU_HWACCEL\n                                HWACCEL_VDPAU(vp9),\n+#endif\n+#if CONFIG_VP9_V4L2REQUEST_HWACCEL\n+                               HWACCEL_V4L2REQUEST(vp9),\n #endif\n                                NULL\n                            },\ndiff --git a/libavcodec/vp9dec.h b/libavcodec/vp9dec.h\nindex d82b258a3d..8d2c341e0b 100644\n--- a/libavcodec/vp9dec.h\n+++ b/libavcodec/vp9dec.h\n@@ -131,6 +131,10 @@ typedef struct VP9Context {\n         ProbContext p;\n         uint8_t coef[4][2][2][6][6][11];\n     } prob;\n+    struct {\n+        ProbContext p;\n+        uint8_t coef[4][2][2][6][6][11];\n+    } prob_raw;\n \n     // contextual (above) cache\n     uint8_t *above_partition_ctx;\ndiff --git a/libavcodec/vp9shared.h b/libavcodec/vp9shared.h\nindex 54726df742..fee3568736 100644\n--- a/libavcodec/vp9shared.h\n+++ b/libavcodec/vp9shared.h\n@@ -131,6 +131,7 @@ typedef struct VP9BitstreamHeader {\n         uint8_t temporal;\n         uint8_t absolute_vals;\n         uint8_t update_map;\n+        uint8_t update_data;\n         uint8_t prob[7];\n         uint8_t pred_prob[3];\n         struct {\n\nFrom 0a7d6808383a5c88a690b7ba6c634970dcd33548 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 29 Apr 2019 22:08:59 +0000\nSubject: [PATCH 10/12] HACK: hwcontext_drm: do not require drm device\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n libavutil/hwcontext_drm.c | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/libavutil/hwcontext_drm.c b/libavutil/hwcontext_drm.c\nindex 7a9fdbd263..6297d1f9b6 100644\n--- a/libavutil/hwcontext_drm.c\n+++ b/libavutil/hwcontext_drm.c\n@@ -53,6 +53,11 @@ static int drm_device_create(AVHWDeviceContext *hwdev, const char *device,\n     AVDRMDeviceContext *hwctx = hwdev->hwctx;\n     drmVersionPtr version;\n \n+    if (device == NULL) {\n+      hwctx->fd = -1;\n+      return 0;\n+    }\n+\n     hwctx->fd = open(device, O_RDWR);\n     if (hwctx->fd < 0)\n         return AVERROR(errno);\n\nFrom d82c704c262fea62250c5989d8e97cdd769d8359 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Fri, 15 May 2020 16:54:05 +0000\nSubject: [PATCH 11/12] WIP: add NV15 and NV20 support\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n libavcodec/h264_slice.c   | 14 ++++++++++++--\n libavcodec/v4l2_request.c | 23 +++++++++++++++++++++++\n 2 files changed, 35 insertions(+), 2 deletions(-)\n\ndiff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c\nindex 6b7f569da4..ee4c76cf41 100644\n--- a/libavcodec/h264_slice.c\n+++ b/libavcodec/h264_slice.c\n@@ -794,10 +794,17 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)\n                 *fmt++ = AV_PIX_FMT_GBRP10;\n             } else\n                 *fmt++ = AV_PIX_FMT_YUV444P10;\n-        } else if (CHROMA422(h))\n+        } else if (CHROMA422(h)) {\n+#if CONFIG_H264_V4L2REQUEST_HWACCEL\n+            *fmt++ = AV_PIX_FMT_DRM_PRIME;\n+#endif\n             *fmt++ = AV_PIX_FMT_YUV422P10;\n-        else\n+        } else {\n+#if CONFIG_H264_V4L2REQUEST_HWACCEL\n+            *fmt++ = AV_PIX_FMT_DRM_PRIME;\n+#endif\n             *fmt++ = AV_PIX_FMT_YUV420P10;\n+        }\n         break;\n     case 12:\n         if (CHROMA444(h)) {\n@@ -836,6 +843,9 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)\n             else\n                 *fmt++ = AV_PIX_FMT_YUV444P;\n         } else if (CHROMA422(h)) {\n+#if CONFIG_H264_V4L2REQUEST_HWACCEL\n+                *fmt++ = AV_PIX_FMT_DRM_PRIME;\n+#endif\n             if (h->avctx->color_range == AVCOL_RANGE_JPEG)\n                 *fmt++ = AV_PIX_FMT_YUVJ422P;\n             else\ndiff --git a/libavcodec/v4l2_request.c b/libavcodec/v4l2_request.c\nindex b57bbf29bc..349ed67cb2 100644\n--- a/libavcodec/v4l2_request.c\n+++ b/libavcodec/v4l2_request.c\n@@ -188,6 +188,13 @@ const uint32_t v4l2_request_capture_pixelformats[] = {\n #ifdef DRM_FORMAT_MOD_ALLWINNER_TILED\n     V4L2_PIX_FMT_SUNXI_TILED_NV12,\n #endif\n+#if defined(V4L2_PIX_FMT_NV15) && defined(DRM_FORMAT_NV15)\n+    V4L2_PIX_FMT_NV15,\n+#endif\n+    V4L2_PIX_FMT_NV16,\n+#if defined(V4L2_PIX_FMT_NV20) && defined(DRM_FORMAT_NV20)\n+    V4L2_PIX_FMT_NV20,\n+#endif\n };\n \n static int v4l2_request_set_drm_descriptor(V4L2RequestDescriptor *req, struct v4l2_format *format)\n@@ -206,6 +213,22 @@ static int v4l2_request_set_drm_descriptor(V4L2RequestDescriptor *req, struct v4\n         layer->format = DRM_FORMAT_NV12;\n         desc->objects[0].format_modifier = DRM_FORMAT_MOD_ALLWINNER_TILED;\n         break;\n+#endif\n+#if defined(V4L2_PIX_FMT_NV15) && defined(DRM_FORMAT_NV15)\n+    case V4L2_PIX_FMT_NV15:\n+        layer->format = DRM_FORMAT_NV15;\n+        desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR;\n+        break;\n+#endif\n+    case V4L2_PIX_FMT_NV16:\n+        layer->format = DRM_FORMAT_NV16;\n+        desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR;\n+        break;\n+#if defined(V4L2_PIX_FMT_NV20) && defined(DRM_FORMAT_NV20)\n+    case V4L2_PIX_FMT_NV20:\n+        layer->format = DRM_FORMAT_NV20;\n+        desc->objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR;\n+        break;\n #endif\n     default:\n         return -1;\n\nFrom 0b8eff40d910669ea03417f76468fcf2518d293e Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 27 Jul 2020 23:15:45 +0000\nSubject: [PATCH 12/12] HACK: define drm NV15 and NV20 format\n\n---\n libavcodec/v4l2_request.c | 8 ++++++++\n 1 file changed, 8 insertions(+)\n\ndiff --git a/libavcodec/v4l2_request.c b/libavcodec/v4l2_request.c\nindex 349ed67cb2..824dcaa8e9 100644\n--- a/libavcodec/v4l2_request.c\n+++ b/libavcodec/v4l2_request.c\n@@ -30,6 +30,14 @@\n #include \"internal.h\"\n #include \"v4l2_request.h\"\n \n+#ifndef DRM_FORMAT_NV15\n+#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5')\n+#endif\n+\n+#ifndef DRM_FORMAT_NV20\n+#define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0')\n+#endif\n+\n uint64_t ff_v4l2_request_get_capture_timestamp(AVFrame *frame)\n {\n     V4L2RequestDescriptor *req = (V4L2RequestDescriptor*)frame->data[0];\n"
  },
  {
    "path": "packages/multimedia/gmmlib/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gmmlib\"\nPKG_VERSION=\"22.3.3\"\nPKG_SHA256=\"86651bd2803c9f0afd82471bec784e65d2b418dee315a053d22215eb2a679be7\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://01.org/linuxmedia\"\nPKG_URL=\"https://github.com/intel/gmmlib/archive/intel-gmmlib-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"gmmlib: The Intel(R) Graphics Memory Management Library provides device specific and buffer management for the Intel(R) Graphics Compute Runtime for OpenCL(TM) and the Intel(R) Media Driver for VAAPI.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_TYPE=release \\\n                       -DRUN_TEST_SUITE=OFF\"\n"
  },
  {
    "path": "packages/multimedia/gstreamer/gst-plugins-bad/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gst-plugins-bad\"\nPKG_VERSION=\"1.22.0\"\nPKG_SHA256=\"3c9d9300f5f4fb3e3d36009379d1fb6d9ecd79c1a135df742b8a68417dd663a1\"\nPKG_LICENSE=\"LGPL-2.1-or-later\"\nPKG_SITE=\"https://gstreamer.freedesktop.org/modules/gst-plugins-bad.html\"\nPKG_URL=\"https://gstreamer.freedesktop.org/src/gst-plugins-bad/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain gst-plugins-base\"\nPKG_LONGDESC=\"GStreamer Bad Plug-ins is a set of plug-ins that aren't up to par compared to the rest.\"\n\npre_configure_target() {\n  PKG_MESON_OPTS_TARGET=\"-Dgst_play_tests=false \\\n                         -Daccurip=disabled \\\n                         -Dadpcmdec=disabled \\\n                         -Dadpcmenc=disabled \\\n                         -Daiff=disabled \\\n                         -Dasfmux=disabled \\\n                         -Daudiobuffersplit=disabled \\\n                         -Daudiofxbad=disabled \\\n                         -Daudiolatency=disabled \\\n                         -Daudiomixmatrix=disabled \\\n                         -Daudiovisualizers=disabled \\\n                         -Dautoconvert=disabled \\\n                         -Dbayer=disabled \\\n                         -Dcamerabin2=disabled \\\n                         -Dcoloreffects=disabled \\\n                         -Ddebugutils=disabled \\\n                         -Ddvbsubenc=disabled \\\n                         -Ddvbsuboverlay=disabled \\\n                         -Ddvdspu=disabled \\\n                         -Dfaceoverlay=disabled \\\n                         -Dfestival=disabled \\\n                         -Dfieldanalysis=disabled \\\n                         -Dfreeverb=disabled \\\n                         -Dfrei0r=disabled \\\n                         -Dgaudieffects=disabled \\\n                         -Dgdp=disabled \\\n                         -Dgeometrictransform=disabled \\\n                         -Did3tag=disabled \\\n                         -Dinter=disabled \\\n                         -Dinterlace=disabled \\\n                         -Divfparse=disabled \\\n                         -Divtc=disabled \\\n                         -Djp2kdecimator=disabled \\\n                         -Djpegformat=disabled \\\n                         -Dlibrfb=disabled \\\n                         -Dmidi=disabled \\\n                         -Dmpegdemux=disabled \\\n                         -Dmpegpsmux=disabled \\\n                         -Dmpegtsdemux=disabled \\\n                         -Dmpegtsmux=disabled \\\n                         -Dmxf=disabled \\\n                         -Dnetsim=disabled \\\n                         -Donvif=disabled \\\n                         -Dpcapparse=disabled \\\n                         -Dpnm=disabled \\\n                         -Dproxy=disabled \\\n                         -Drawparse=disabled \\\n                         -Dremovesilence=disabled \\\n                         -Drist=disabled \\\n                         -Drtmp2=disabled \\\n                         -Drtp=disabled \\\n                         -Dsdp=disabled \\\n                         -Dsegmentclip=disabled \\\n                         -Dsiren=disabled \\\n                         -Dsmooth=disabled \\\n                         -Dspeed=disabled \\\n                         -Dsubenc=disabled \\\n                         -Dswitchbin=disabled \\\n                         -Dtimecode=disabled \\\n                         -Dvideofilters=disabled \\\n                         -Dvideoframe_audiolevel=disabled \\\n                         -Dvideoparsers=enabled \\\n                         -Dvideosignal=disabled \\\n                         -Dvmnc=disabled \\\n                         -Dy4m=disabled \\\n                         -Dopencv=disabled \\\n                         -Dwayland=disabled \\\n                         -Dx11=disabled \\\n                         -Daom=disabled \\\n                         -Davtp=disabled \\\n                         -Dandroidmedia=disabled \\\n                         -Dapplemedia=disabled \\\n                         -Dassrender=disabled \\\n                         -Dbluez=disabled \\\n                         -Dbs2b=disabled \\\n                         -Dbz2=disabled \\\n                         -Dchromaprint=disabled \\\n                         -Dclosedcaption=disabled \\\n                         -Dcolormanagement=disabled \\\n                         -Dcurl=disabled \\\n                         -Dcurl-ssh2=disabled \\\n                         -Dd3dvideosink=disabled \\\n                         -Dd3d11=disabled \\\n                         -Ddash=disabled \\\n                         -Ddc1394=disabled \\\n                         -Ddecklink=disabled \\\n                         -Ddirectfb=disabled \\\n                         -Ddirectsound=disabled \\\n                         -Ddtls=disabled \\\n                         -Ddts=disabled \\\n                         -Ddvb=disabled \\\n                         -Dfaac=disabled \\\n                         -Dfaad=disabled \\\n                         -Dfbdev=disabled \\\n                         -Dfdkaac=disabled \\\n                         -Dflite=disabled \\\n                         -Dfluidsynth=disabled \\\n                         -Dgl=disabled \\\n                         -Dgme=disabled \\\n                         -Dgsm=disabled \\\n                         -Dipcpipeline=disabled \\\n                         -Diqa=disabled \\\n                         -Dkate=disabled \\\n                         -Dkms=disabled \\\n                         -Dladspa=disabled \\\n                         -Dlibde265=disabled \\\n                         -Dlv2=disabled \\\n                         -Dmediafoundation=disabled \\\n                         -Dmicrodns=disabled \\\n                         -Dmodplug=disabled \\\n                         -Dmpeg2enc=disabled \\\n                         -Dmplex=disabled \\\n                         -Dmsdk=disabled \\\n                         -Dmusepack=disabled \\\n                         -Dneon=disabled \\\n                         -Dnvcodec=disabled \\\n                         -Dopenal=disabled \\\n                         -Dopenexr=disabled \\\n                         -Dopenh264=disabled \\\n                         -Dopenjpeg=disabled \\\n                         -Dopenmpt=disabled \\\n                         -Dopenni2=disabled \\\n                         -Dopensles=disabled \\\n                         -Dopus=disabled \\\n                         -Dresindvd=disabled \\\n                         -Drsvg=disabled \\\n                         -Drtmp=disabled \\\n                         -Dsbc=disabled \\\n                         -Dsctp=disabled \\\n                         -Dshm=disabled \\\n                         -Dsmoothstreaming=disabled \\\n                         -Dsndfile=disabled \\\n                         -Dsoundtouch=disabled \\\n                         -Dspandsp=disabled \\\n                         -Dsrt=disabled \\\n                         -Dsrtp=disabled \\\n                         -Dsvthevcenc=disabled \\\n                         -Dteletext=disabled \\\n                         -Dtinyalsa=disabled \\\n                         -Dtranscode=disabled \\\n                         -Dttml=disabled \\\n                         -Duvch264=disabled \\\n                         -Dva=disabled \\\n                         -Dvoaacenc=disabled \\\n                         -Dvoamrwbenc=disabled \\\n                         -Dvulkan=disabled \\\n                         -Dwasapi=disabled \\\n                         -Dwasapi2=disabled \\\n                         -Dwebp=disabled \\\n                         -Dwebrtc=disabled \\\n                         -Dwebrtcdsp=disabled \\\n                         -Dwildmidi=disabled \\\n                         -Dwinks=disabled \\\n                         -Dwinscreencap=disabled \\\n                         -Dx265=disabled \\\n                         -Dzbar=disabled \\\n                         -Dzxing=disabled \\\n                         -Dwpe=disabled \\\n                         -Dmagicleap=disabled \\\n                         -Dv4l2codecs=disabled \\\n                         -Dhls=disabled \\\n                         -Dsctp-internal-usrsctp=disabled \\\n                         -Dexamples=disabled \\\n                         -Dtests=disabled \\\n                         -Dintrospection=disabled \\\n                         -Dnls=disabled \\\n                         -Dorc=disabled \\\n                         -Dgobject-cast-checks=disabled \\\n                         -Dglib-asserts=disabled \\\n                         -Dglib-checks=disabled \\\n                         -Dpackage-name=gst-plugins-bad \\\n                         -Dpackage-origin=LibreELEC.tv \\\n                         -Ddoc=disabled\"\n}\n\npost_makeinstall_target() {\n  # clean up\n  safe_remove ${INSTALL}/usr/bin\n  for PKG_GST_PLUGINS_BAD in \\\n    libgstadaptivedemux libgstbadaudio libgstbasecamerabinsrc libgstcodecs \\\n    libgstinsertbin libgstisoff libgstmpegts libgstphotography libgstplayer \\\n    libgstsctp libgsttranscoder libgsturidownloader libgstwebrtc\n  do\n    safe_remove ${INSTALL}/usr/lib/${PKG_GST_PLUGINS_BAD}-1.0*\n  done\n  safe_remove ${INSTALL}/usr/share\n}\n"
  },
  {
    "path": "packages/multimedia/gstreamer/gst-plugins-base/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gst-plugins-base\"\nPKG_VERSION=\"1.22.0\"\nPKG_SHA256=\"f53672294f3985d56355c8b1df8f6b49c8c8721106563e19f53be3507ff2229d\"\nPKG_LICENSE=\"GPL-2.1-or-later\"\nPKG_SITE=\"https://gstreamer.freedesktop.org/modules/gst-plugins-base.html\"\nPKG_URL=\"https://gstreamer.freedesktop.org/src/gst-plugins-base/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain gstreamer\"\nPKG_LONGDESC=\"Base GStreamer plugins and helper libraries\"\nPKG_BUILD_FLAGS=\"-gold\"\n\npre_configure_target() {\n  PKG_MESON_OPTS_TARGET=\"-Dgl=disabled \\\n                         -Dadder=disabled \\\n                         -Dapp=disabled \\\n                         -Daudioconvert=disabled \\\n                         -Daudiomixer=disabled \\\n                         -Daudiorate=disabled \\\n                         -Daudioresample=disabled \\\n                         -Daudiotestsrc=disabled \\\n                         -Dcompositor=disabled \\\n                         -Dencoding=disabled \\\n                         -Dgio=disabled \\\n                         -Dgio-typefinder=disabled \\\n                         -Doverlaycomposition=disabled \\\n                         -Dpbtypes=disabled \\\n                         -Dplayback=disabled \\\n                         -Drawparse=enabled \\\n                         -Dsubparse=enabled \\\n                         -Dtcp=disabled \\\n                         -Dtypefind=disabled \\\n                         -Dvideoconvertscale=disabled \\\n                         -Dvideorate=disabled \\\n                         -Dvideotestsrc=disabled \\\n                         -Dvolume=disabled \\\n                         -Dalsa=disabled \\\n                         -Dcdparanoia=disabled \\\n                         -Dlibvisual=disabled \\\n                         -Dogg=disabled \\\n                         -Dopus=disabled \\\n                         -Dpango=disabled \\\n                         -Dtheora=disabled \\\n                         -Dtremor=disabled \\\n                         -Dvorbis=disabled \\\n                         -Dx11=disabled \\\n                         -Dxshm=disabled \\\n                         -Dxi=disabled \\\n                         -Dxvideo=disabled \\\n                         -Dexamples=disabled \\\n                         -Dtests=disabled \\\n                         -Dtools=disabled \\\n                         -Dintrospection=disabled \\\n                         -Dnls=disabled \\\n                         -Dorc=disabled \\\n                         -Dgobject-cast-checks=disabled \\\n                         -Dglib-asserts=disabled \\\n                         -Dglib-checks=disabled \\\n                         -Dpackage-name=gst-plugins-base \\\n                         -Dpackage-origin=LibreELEC.tv \\\n                         -Ddoc=disabled\"\n}\n\npost_makeinstall_target() {\n  # clean up\n  safe_remove ${INSTALL}\n}\n"
  },
  {
    "path": "packages/multimedia/gstreamer/gstreamer/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gstreamer\"\nPKG_VERSION=\"1.22.0\"\nPKG_SHA256=\"78d21b5469ac93edafc6d8ceb63bc82f6cbbee94d2f866cca6b9252157ee0a09\"\nPKG_LICENSE=\"GPL-2.1-or-later\"\nPKG_SITE=\"https://gstreamer.freedesktop.org\"\nPKG_URL=\"https://gstreamer.freedesktop.org/src/gstreamer/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain glib glib:host\"\nPKG_LONGDESC=\"GStreamer open-source multimedia framework core library\"\n\npre_configure_target() {\n  PKG_MESON_OPTS_TARGET=\"-Dgst_debug=false \\\n                         -Dgst_parse=true \\\n                         -Dregistry=false \\\n                         -Dtracer_hooks=false \\\n                         -Doption-parsing=true \\\n                         -Dpoisoning=false \\\n                         -Dcheck=disabled \\\n                         -Dlibunwind=disabled \\\n                         -Dlibdw=disabled \\\n                         -Ddbghelp=disabled \\\n                         -Dbash-completion=disabled \\\n                         -Dcoretracers=disabled \\\n                         -Dexamples=disabled \\\n                         -Dtests=disabled \\\n                         -Dbenchmarks=disabled \\\n                         -Dtools=disabled \\\n                         -Ddoc=disabled \\\n                         -Dintrospection=disabled \\\n                         -Dnls=disabled \\\n                         -Dgobject-cast-checks=disabled \\\n                         -Dglib-asserts=disabled \\\n                         -Dglib-checks=disabled \\\n                         -Dextra-checks=disabled \\\n                         -Dpackage-name=\"gstreamer\"\n                         -Dpackage-origin=\"LibreELEC.tv\"\n                         -Ddoc=disabled\"\n}\n\npost_makeinstall_target() {\n  # clean up\n  safe_remove ${INSTALL}/usr/share\n  safe_remove ${INSTALL}/usr/lib/{libgstcontroller-1.0*,libgstnet-1.0*}\n}\n"
  },
  {
    "path": "packages/multimedia/intel-vaapi-driver/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"intel-vaapi-driver\"\nPKG_VERSION=\"2.4.1\"\nPKG_SHA256=\"03cd7e16acc94f828b6e7f3087863d8ca06e99ffa3385588005b1984bdd56157\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://01.org/linuxmedia\"\nPKG_URL=\"https://github.com/intel/intel-vaapi-driver/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libva libdrm\"\nPKG_LONGDESC=\"intel-vaapi-driver: VA-API user mode driver for Intel GEN Graphics family\"\n\nif [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n  DISPLAYSERVER_LIBVA=\"-Dwith_x11=yes -Dwith_wayland=no\"\nelif [ \"${DISPLAYSERVER}\" = \"wl\" ]; then\n  DISPLAYSERVER_LIBVA=\"-Dwith_x11=no -Dwith_wayland=yes\"\nelse\n  DISPLAYSERVER_LIBVA=\"-Dwith_x11=no -Dwith_wayland=no\"\nfi\n\nPKG_MESON_OPTS_TARGET=\"-Denable_hybrid_codec=false \\\n                       -Denable_tests=false \\\n                       ${DISPLAYSERVER_LIBVA}\"\n\n"
  },
  {
    "path": "packages/multimedia/intel-vaapi-driver/patches/0001-intel-vaapi-driver-2.4.1-Handle-odd-resolution.patch",
    "content": "From d87db2111a33b157d1913415f15d201cc5182850 Mon Sep 17 00:00:00 2001\nFrom: Haihao Xiang <haihao.xiang@intel.com>\nDate: Wed, 12 Aug 2020 14:24:55 +0800\nSubject: [PATCH] Handle odd resolution\n\nThis fixes https://github.com/intel/intel-vaapi-driver/issues/516\n\nSigned-off-by: Haihao Xiang <haihao.xiang@intel.com>\n---\n src/gen8_post_processing.c | 24 +++++++++----------\n src/gen9_post_processing.c | 24 +++++++++----------\n src/i965_drv_video.c       | 48 +++++++++++++++++++-------------------\n 3 files changed, 48 insertions(+), 48 deletions(-)\n\ndiff --git a/src/gen8_post_processing.c b/src/gen8_post_processing.c\nindex abddcd078..2163300ac 100644\n--- a/src/gen8_post_processing.c\n+++ b/src/gen8_post_processing.c\n@@ -1909,17 +1909,17 @@ gen8_pp_context_get_surface_conf(VADriverContextP ctx,\n             fourcc == VA_FOURCC_BGRA) {\n             /* nothing to do here */\n         } else if (fourcc == VA_FOURCC_P010 || fourcc == VA_FOURCC_NV12) {\n-            width[1] = width[0] / 2;\n-            height[1] = height[0] / 2;\n+            width[1] = ALIGN(width[0], 2) / 2;\n+            height[1] = ALIGN(height[0], 2) / 2;\n             pitch[1] = obj_surface->cb_cr_pitch;\n             bo_offset[1] = obj_surface->width * obj_surface->y_cb_offset;\n         } else {\n-            width[1] = width[0] / 2;\n-            height[1] = height[0] / 2;\n+            width[1] = ALIGN(width[0], 2) / 2;\n+            height[1] = ALIGN(height[0], 2) / 2;\n             pitch[1] = obj_surface->cb_cr_pitch;\n             bo_offset[1] = obj_surface->width * obj_surface->y_cb_offset;\n-            width[2] = width[0] / 2;\n-            height[2] = height[0] / 2;\n+            width[2] = ALIGN(width[0], 2) / 2;\n+            height[2] = ALIGN(height[0], 2) / 2;\n             pitch[2] = obj_surface->cb_cr_pitch;\n             bo_offset[2] = obj_surface->width * obj_surface->y_cr_offset;\n         }\n@@ -1940,8 +1940,8 @@ gen8_pp_context_get_surface_conf(VADriverContextP ctx,\n             fourcc == VA_FOURCC_BGRA) {\n             /* nothing to do here */\n         } else if (fourcc == VA_FOURCC_P010 || fourcc == VA_FOURCC_NV12) {\n-            width[1] = width[0] / 2;\n-            height[1] = height[0] / 2;\n+            width[1] = ALIGN(width[0], 2) / 2;\n+            height[1] = ALIGN(height[0], 2) / 2;\n             pitch[1] = obj_image->image.pitches[1];\n             bo_offset[1] = obj_image->image.offsets[1];\n         } else {\n@@ -1950,12 +1950,12 @@ gen8_pp_context_get_surface_conf(VADriverContextP ctx,\n             if (fourcc == VA_FOURCC_YV12 || fourcc == VA_FOURCC_IMC1)\n                 u = 2, v = 1;\n \n-            width[1] = width[0] / 2;\n-            height[1] = height[0] / 2;\n+            width[1] = ALIGN(width[0], 2) / 2;\n+            height[1] = ALIGN(height[0], 2) / 2;\n             pitch[1] = obj_image->image.pitches[u];\n             bo_offset[1] = obj_image->image.offsets[u];\n-            width[2] = width[0] / 2;\n-            height[2] = height[0] / 2;\n+            width[2] = ALIGN(width[0], 2) / 2;\n+            height[2] = ALIGN(height[0], 2) / 2;\n             pitch[2] = obj_image->image.pitches[v];\n             bo_offset[2] = obj_image->image.offsets[v];\n         }\ndiff --git a/src/gen9_post_processing.c b/src/gen9_post_processing.c\nindex eede36f7f..da36f2abc 100644\n--- a/src/gen9_post_processing.c\n+++ b/src/gen9_post_processing.c\n@@ -731,19 +731,19 @@ gen9_pp_context_get_surface_conf(VADriverContextP ctx,\n             fourcc == VA_FOURCC_BGRA) {\n             /* nothing to do here */\n         } else if (fourcc == VA_FOURCC_P010 || fourcc == VA_FOURCC_NV12) {\n-            width[1] = width[0] / 2;\n-            height[1] = height[0] / 2;\n+            width[1] = ALIGN(width[0], 2) / 2;\n+            height[1] = ALIGN(height[0], 2) / 2;\n             pitch[1] = obj_surface->cb_cr_pitch;\n             bo_offset[1] = obj_surface->width * obj_surface->y_cb_offset;\n         } else if (fourcc == VA_FOURCC_YUY2 || fourcc == VA_FOURCC_UYVY) {\n             /* nothing to do here */\n         } else {\n-            width[1] = width[0] / 2;\n-            height[1] = height[0] / 2;\n+            width[1] = ALIGN(width[0], 2) / 2;\n+            height[1] = ALIGN(height[0], 2) / 2;\n             pitch[1] = obj_surface->cb_cr_pitch;\n             bo_offset[1] = obj_surface->width * obj_surface->y_cb_offset;\n-            width[2] = width[0] / 2;\n-            height[2] = height[0] / 2;\n+            width[2] = ALIGN(width[0], 2) / 2;\n+            height[2] = ALIGN(height[0], 2) / 2;\n             pitch[2] = obj_surface->cb_cr_pitch;\n             bo_offset[2] = obj_surface->width * obj_surface->y_cr_offset;\n         }\n@@ -764,8 +764,8 @@ gen9_pp_context_get_surface_conf(VADriverContextP ctx,\n             fourcc == VA_FOURCC_BGRA) {\n             /* nothing to do here */\n         } else if (fourcc == VA_FOURCC_P010 || fourcc == VA_FOURCC_NV12) {\n-            width[1] = width[0] / 2;\n-            height[1] = height[0] / 2;\n+            width[1] = ALIGN(width[0], 2) / 2;\n+            height[1] = ALIGN(height[0], 2) / 2;\n             pitch[1] = obj_image->image.pitches[1];\n             bo_offset[1] = obj_image->image.offsets[1];\n         } else if (fourcc == VA_FOURCC_YUY2 || fourcc == VA_FOURCC_UYVY) {\n@@ -776,12 +776,12 @@ gen9_pp_context_get_surface_conf(VADriverContextP ctx,\n             if (fourcc == VA_FOURCC_YV12 || fourcc == VA_FOURCC_IMC1)\n                 u = 2, v = 1;\n \n-            width[1] = width[0] / 2;\n-            height[1] = height[0] / 2;\n+            width[1] = ALIGN(width[0], 2) / 2;\n+            height[1] = ALIGN(height[0], 2) / 2;\n             pitch[1] = obj_image->image.pitches[u];\n             bo_offset[1] = obj_image->image.offsets[u];\n-            width[2] = width[0] / 2;\n-            height[2] = height[0] / 2;\n+            width[2] = ALIGN(width[0], 2) / 2;\n+            height[2] = ALIGN(height[0], 2) / 2;\n             pitch[2] = obj_image->image.pitches[v];\n             bo_offset[2] = obj_image->image.offsets[v];\n         }\ndiff --git a/src/i965_drv_video.c b/src/i965_drv_video.c\nindex ff163887e..80278bb70 100644\n--- a/src/i965_drv_video.c\n+++ b/src/i965_drv_video.c\n@@ -1725,8 +1725,8 @@ i965_suface_external_memory(VADriverContextP ctx,\n         obj_surface->subsampling = SUBSAMPLE_YUV420;\n         obj_surface->y_cb_offset = obj_surface->height;\n         obj_surface->y_cr_offset = obj_surface->height;\n-        obj_surface->cb_cr_width = obj_surface->orig_width / 2;\n-        obj_surface->cb_cr_height = obj_surface->orig_height / 2;\n+        obj_surface->cb_cr_width = ALIGN(obj_surface->orig_width, 2) / 2;\n+        obj_surface->cb_cr_height = ALIGN(obj_surface->orig_height, 2) / 2;\n         obj_surface->cb_cr_pitch = memory_attibute->pitches[1];\n         if (tiling)\n             ASSERT_RET(IS_ALIGNED(obj_surface->cb_cr_pitch, 128), VA_STATUS_ERROR_INVALID_PARAMETER);\n@@ -1743,8 +1743,8 @@ i965_suface_external_memory(VADriverContextP ctx,\n         obj_surface->subsampling = SUBSAMPLE_YUV420;\n         obj_surface->y_cr_offset = obj_surface->height;\n         obj_surface->y_cb_offset = memory_attibute->offsets[2] / obj_surface->width;\n-        obj_surface->cb_cr_width = obj_surface->orig_width / 2;\n-        obj_surface->cb_cr_height = obj_surface->orig_height / 2;\n+        obj_surface->cb_cr_width = ALIGN(obj_surface->orig_width, 2) / 2;\n+        obj_surface->cb_cr_height = ALIGN(obj_surface->orig_height, 2) / 2;\n         obj_surface->cb_cr_pitch = memory_attibute->pitches[1];\n \n         if (tiling)\n@@ -1764,8 +1764,8 @@ i965_suface_external_memory(VADriverContextP ctx,\n         obj_surface->subsampling = SUBSAMPLE_YUV420;\n         obj_surface->y_cb_offset = obj_surface->height;\n         obj_surface->y_cr_offset = memory_attibute->offsets[2] / obj_surface->width;\n-        obj_surface->cb_cr_width = obj_surface->orig_width / 2;\n-        obj_surface->cb_cr_height = obj_surface->orig_height / 2;\n+        obj_surface->cb_cr_width = ALIGN(obj_surface->orig_width, 2) / 2;\n+        obj_surface->cb_cr_height = ALIGN(obj_surface->orig_height, 2) / 2;\n         obj_surface->cb_cr_pitch = memory_attibute->pitches[1];\n         if (tiling)\n             ASSERT_RET(IS_ALIGNED(obj_surface->cb_cr_pitch, 128), VA_STATUS_ERROR_INVALID_PARAMETER);\n@@ -1837,7 +1837,7 @@ i965_suface_external_memory(VADriverContextP ctx,\n         obj_surface->subsampling = SUBSAMPLE_YUV422H;\n         obj_surface->y_cb_offset = obj_surface->height;\n         obj_surface->y_cr_offset = memory_attibute->offsets[2] / obj_surface->width;\n-        obj_surface->cb_cr_width = obj_surface->orig_width / 2;\n+        obj_surface->cb_cr_width = ALIGN(obj_surface->orig_width, 2) / 2;\n         obj_surface->cb_cr_height = obj_surface->orig_height;\n         obj_surface->cb_cr_pitch = memory_attibute->pitches[1];\n         if (tiling)\n@@ -1854,7 +1854,7 @@ i965_suface_external_memory(VADriverContextP ctx,\n         obj_surface->subsampling = SUBSAMPLE_YUV422H;\n         obj_surface->y_cr_offset = memory_attibute->offsets[1] / obj_surface->width;\n         obj_surface->y_cb_offset = memory_attibute->offsets[2] / obj_surface->width;\n-        obj_surface->cb_cr_width = obj_surface->orig_width / 2;\n+        obj_surface->cb_cr_width = ALIGN(obj_surface->orig_width, 2) / 2;\n         obj_surface->cb_cr_height = obj_surface->orig_height;\n         obj_surface->cb_cr_pitch = memory_attibute->pitches[1];\n         ASSERT_RET(IS_ALIGNED(obj_surface->cb_cr_pitch, i965->codec_info->min_linear_wpitch), VA_STATUS_ERROR_INVALID_PARAMETER);\n@@ -1869,7 +1869,7 @@ i965_suface_external_memory(VADriverContextP ctx,\n         obj_surface->y_cb_offset = obj_surface->height;\n         obj_surface->y_cr_offset = memory_attibute->offsets[2] / obj_surface->width;\n         obj_surface->cb_cr_width = obj_surface->orig_width;\n-        obj_surface->cb_cr_height = obj_surface->orig_height / 2;\n+        obj_surface->cb_cr_height = ALIGN(obj_surface->orig_height, 2) / 2;\n         obj_surface->cb_cr_pitch = memory_attibute->pitches[1];\n         if (tiling)\n             ASSERT_RET(IS_ALIGNED(obj_surface->cb_cr_pitch, 128), VA_STATUS_ERROR_INVALID_PARAMETER);\n@@ -4526,8 +4526,8 @@ i965_check_alloc_surface_bo(VADriverContextP ctx,\n         case VA_FOURCC_P010:\n             assert(subsampling == SUBSAMPLE_YUV420);\n             obj_surface->cb_cr_pitch = obj_surface->width;\n-            obj_surface->cb_cr_width = obj_surface->orig_width / 2;\n-            obj_surface->cb_cr_height = obj_surface->orig_height / 2;\n+            obj_surface->cb_cr_width = ALIGN(obj_surface->orig_width, 2) / 2;\n+            obj_surface->cb_cr_height = ALIGN(obj_surface->orig_height, 2) / 2;\n             obj_surface->y_cb_offset = obj_surface->height;\n             obj_surface->y_cr_offset = obj_surface->height;\n             region_width = obj_surface->width;\n@@ -4538,8 +4538,8 @@ i965_check_alloc_surface_bo(VADriverContextP ctx,\n         case VA_FOURCC_IMC1:\n             assert(subsampling == SUBSAMPLE_YUV420);\n             obj_surface->cb_cr_pitch = obj_surface->width;\n-            obj_surface->cb_cr_width = obj_surface->orig_width / 2;\n-            obj_surface->cb_cr_height = obj_surface->orig_height / 2;\n+            obj_surface->cb_cr_width = ALIGN(obj_surface->orig_width, 2) / 2;\n+            obj_surface->cb_cr_height = ALIGN(obj_surface->orig_height, 2) / 2;\n             obj_surface->y_cr_offset = obj_surface->height;\n             obj_surface->y_cb_offset = obj_surface->y_cr_offset + ALIGN(obj_surface->cb_cr_height, 32);\n             region_width = obj_surface->width;\n@@ -4550,8 +4550,8 @@ i965_check_alloc_surface_bo(VADriverContextP ctx,\n         case VA_FOURCC_IMC3:\n             assert(subsampling == SUBSAMPLE_YUV420);\n             obj_surface->cb_cr_pitch = obj_surface->width;\n-            obj_surface->cb_cr_width = obj_surface->orig_width / 2;\n-            obj_surface->cb_cr_height = obj_surface->orig_height / 2;\n+            obj_surface->cb_cr_width = ALIGN(obj_surface->orig_width, 2) / 2;\n+            obj_surface->cb_cr_height = ALIGN(obj_surface->orig_height, 2) / 2;\n             obj_surface->y_cb_offset = obj_surface->height;\n             obj_surface->y_cr_offset = obj_surface->y_cb_offset + ALIGN(obj_surface->cb_cr_height, 32);\n             region_width = obj_surface->width;\n@@ -4562,7 +4562,7 @@ i965_check_alloc_surface_bo(VADriverContextP ctx,\n         case VA_FOURCC_422H:\n             assert(subsampling == SUBSAMPLE_YUV422H);\n             obj_surface->cb_cr_pitch = obj_surface->width;\n-            obj_surface->cb_cr_width = obj_surface->orig_width / 2;\n+            obj_surface->cb_cr_width = ALIGN(obj_surface->orig_width, 2) / 2;\n             obj_surface->cb_cr_height = obj_surface->orig_height;\n             obj_surface->y_cb_offset = obj_surface->height;\n             obj_surface->y_cr_offset = obj_surface->y_cb_offset + ALIGN(obj_surface->cb_cr_height, 32);\n@@ -4575,7 +4575,7 @@ i965_check_alloc_surface_bo(VADriverContextP ctx,\n             assert(subsampling == SUBSAMPLE_YUV422V);\n             obj_surface->cb_cr_pitch = obj_surface->width;\n             obj_surface->cb_cr_width = obj_surface->orig_width;\n-            obj_surface->cb_cr_height = obj_surface->orig_height / 2;\n+            obj_surface->cb_cr_height = ALIGN(obj_surface->orig_height, 2) / 2;\n             obj_surface->y_cb_offset = obj_surface->height;\n             obj_surface->y_cr_offset = obj_surface->y_cb_offset + ALIGN(obj_surface->cb_cr_height, 32);\n             region_width = obj_surface->width;\n@@ -4663,17 +4663,17 @@ i965_check_alloc_surface_bo(VADriverContextP ctx,\n         case VA_FOURCC_P010:\n             obj_surface->y_cb_offset = obj_surface->height;\n             obj_surface->y_cr_offset = obj_surface->height;\n-            obj_surface->cb_cr_width = obj_surface->orig_width / 2;\n+            obj_surface->cb_cr_width = ALIGN(obj_surface->orig_width, 2) / 2;\n             obj_surface->width = ALIGN(obj_surface->cb_cr_width * 2, i965->codec_info->min_linear_wpitch) *\n                                  bpp_1stplane;\n-            obj_surface->cb_cr_height = obj_surface->orig_height / 2;\n+            obj_surface->cb_cr_height = ALIGN(obj_surface->orig_height, 2) / 2;\n             obj_surface->cb_cr_pitch = obj_surface->width;\n             region_width = obj_surface->width;\n             region_height = obj_surface->height + obj_surface->height / 2;\n             break;\n \n         case VA_FOURCC_YV16:\n-            obj_surface->cb_cr_width = obj_surface->orig_width / 2;\n+            obj_surface->cb_cr_width = ALIGN(obj_surface->orig_width, 2) / 2;\n             obj_surface->width = ALIGN(obj_surface->cb_cr_width, i965->codec_info->min_linear_wpitch) * 2;\n             obj_surface->cb_cr_height = obj_surface->orig_height;\n             obj_surface->y_cr_offset = obj_surface->height;\n@@ -4694,9 +4694,9 @@ i965_check_alloc_surface_bo(VADriverContextP ctx,\n                 obj_surface->y_cr_offset = obj_surface->height + obj_surface->height / 4;\n             }\n \n-            obj_surface->cb_cr_width = obj_surface->orig_width / 2;\n+            obj_surface->cb_cr_width = ALIGN(obj_surface->orig_width, 2) / 2;\n             obj_surface->width = ALIGN(obj_surface->cb_cr_width, i965->codec_info->min_linear_wpitch) * 2;\n-            obj_surface->cb_cr_height = obj_surface->orig_height / 2;\n+            obj_surface->cb_cr_height = ALIGN(obj_surface->orig_height, 2) / 2;\n             obj_surface->cb_cr_pitch = obj_surface->width / 2;\n             region_width = obj_surface->width;\n             region_height = obj_surface->height + obj_surface->height / 2;\n@@ -4705,9 +4705,9 @@ i965_check_alloc_surface_bo(VADriverContextP ctx,\n         case VA_FOURCC_I010:\n             obj_surface->y_cb_offset = obj_surface->height;\n             obj_surface->y_cr_offset = obj_surface->height + obj_surface->height / 4;\n-            obj_surface->cb_cr_width = obj_surface->orig_width / 2;\n+            obj_surface->cb_cr_width = ALIGN(obj_surface->orig_width, 2) / 2;\n             obj_surface->width = ALIGN(obj_surface->cb_cr_width * 2, i965->codec_info->min_linear_wpitch) * 2;\n-            obj_surface->cb_cr_height = obj_surface->orig_height / 2;\n+            obj_surface->cb_cr_height =ALIGN(obj_surface->orig_height, 2) / 2;\n             obj_surface->cb_cr_pitch = obj_surface->width / 2;\n             region_width = obj_surface->width;\n             region_height = obj_surface->height + obj_surface->height / 2;\n"
  },
  {
    "path": "packages/multimedia/libaacs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"libaacs\"\nPKG_VERSION=\"0.11.1\"\nPKG_SHA256=\"a88aa0ebe4c98a77f7aeffd92ab3ef64ac548c6b822e8248a8b926725bea0a39\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.videolan.org/developers/libaacs.html\"\nPKG_URL=\"https://download.videolan.org/pub/videolan/libaacs/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libgcrypt\"\nPKG_LONGDESC=\"Open implementation of the AACS (Advanced Access Content System) specification.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-werror \\\n                           --disable-extra-warnings \\\n                           --disable-optimizations \\\n                           --with-libgcrypt-prefix=${SYSROOT_PREFIX}/usr \\\n                           --with-libgpg-error-prefix=${SYSROOT_PREFIX}/usr \\\n                           --with-gnu-ld\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/config/aacs\n    cp -P ../KEYDB.cfg ${INSTALL}/usr/config/aacs\n}\n"
  },
  {
    "path": "packages/multimedia/libass/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libass\"\nPKG_VERSION=\"0.17.0\"\nPKG_SHA256=\"971e2e1db59d440f88516dcd1187108419a370e64863f70687da599fdf66cc1a\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://github.com/libass/libass\"\nPKG_URL=\"https://github.com/libass/libass/releases/download/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain freetype fontconfig fribidi harfbuzz\"\nPKG_LONGDESC=\"A portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-test \\\n                           --enable-fontconfig \\\n                           --disable-libunibreak \\\n                           --disable-silent-rules \\\n                           --with-gnu-ld\"\n\nif [ ${TARGET_ARCH} = \"x86_64\" ]; then\n  PKG_DEPENDS_TARGET+=\" nasm:host\"\n  PKG_CONFIGURE_OPTS_TARGET+=\" --enable-asm\"\nfi\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/multimedia/libbdplus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"libbdplus\"\nPKG_VERSION=\"0.2.0\"\nPKG_SHA256=\"b93eea3eaef33d6e9155d2c34b068c505493aa5a4936e63274f4342ab0f40a58\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.videolan.org/developers/libbdplus.html\"\nPKG_URL=\"http://download.videolan.org/pub/videolan/${PKG_NAME}/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libgcrypt libgpg-error\"\nPKG_LONGDESC=\"libbdplus is a research project to implement the BD+ System Specifications.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-werror \\\n                           --disable-extra-warnings \\\n                           --disable-optimizations \\\n                           --with-libgcrypt-prefix=${SYSROOT_PREFIX}/usr \\\n                           --with-gpg-error-prefix=${SYSROOT_PREFIX}/usr \\\n                           --with-gnu-ld\"\n\nif [ \"${BLURAY_AACS_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" libaacs\"\n  PKG_CONFIGURE_OPTS_TARGET+=\" --with-libaacs\"\nelse\n  PKG_CONFIGURE_OPTS_TARGET+=\" --without-libaacs\"\nfi\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/multimedia/libbluray/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libbluray\"\nPKG_VERSION=\"1.3.4\"\nPKG_SHA256=\"478ffd68a0f5dde8ef6ca989b7f035b5a0a22c599142e5cd3ff7b03bbebe5f2b\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://www.videolan.org/developers/libbluray.html\"\nPKG_URL=\"http://download.videolan.org/pub/videolan/libbluray/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain fontconfig freetype libxml2 libudfread\"\nPKG_LONGDESC=\"libbluray is an open-source library designed for Blu-Ray Discs playback for media players.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nif [ \"${BLURAY_AACS_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" libaacs\"\nfi\n\nif [ \"${BLURAY_BDPLUS_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" libbdplus\"\nfi\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-werror \\\n                           --disable-extra-warnings \\\n                           --disable-optimizations \\\n                           --disable-examples \\\n                           --disable-bdjava-jar \\\n                           --disable-doxygen-doc \\\n                           --disable-doxygen-dot \\\n                           --disable-doxygen-man \\\n                           --disable-doxygen-rtf \\\n                           --disable-doxygen-xml \\\n                           --disable-doxygen-chm \\\n                           --disable-doxygen-chi \\\n                           --disable-doxygen-html \\\n                           --disable-doxygen-ps \\\n                           --disable-doxygen-pdf \\\n                           --with-freetype \\\n                           --with-fontconfig \\\n                           --with-libxml2 \\\n                           --with-gnu-ld\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/multimedia/libbluray/patches/libbluray-00-fix-build-with-autoconf-archive-2016-or-later.patch",
    "content": "From bc746413e07c504535873cf860a8f2c38862896e Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Thu, 1 Feb 2018 08:15:27 +0000\nSubject: [PATCH] Fix build failure with recent ax_prog_doxygen.m4\n\nRecent autotool-archives doxygen macros breaks the current build,\nso this patch updates to the method of the latest autoconf-archive version.\n\nThe required autoconf-archive macro has been committed to their repository\nin November 2015, so anything later should work.\n\nRef: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837020\n---\n Makefile.am | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\n--- a/Makefile.am\n+++ b/Makefile.am\n@@ -1,4 +1,5 @@\n-include $(top_srcdir)/doxygen-include.am\n+# include Doxygen rules (requires autoconf-archive >2016-03-20)\n+@DX_RULES@\n \n ACLOCAL_AMFLAGS = -I m4\n \n"
  },
  {
    "path": "packages/multimedia/libbluray/patches/libbluray-03-set-headless-false.patch",
    "content": "From 29be28f8062baca2856742a8f7ad2594981cf128 Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Mon, 27 Sep 2021 19:59:20 +0200\nSubject: [PATCH] disable X11 check because it will not run in headless mode\n\nhttps://github.com/fandangos/libbluray/commit/47726b99922899bb9c4ea688356199f2068d156a\nhttps://github.com/PojavLauncherTeam/PojavLauncher/issues/713#issuecomment-769816262\n\n---\n src/libbluray/bdj/bdj.c | 2 ++\n 1 file changed, 2 insertions(+)\n\n--- a/src/libbluray/bdj/bdj.c\n+++ b/src/libbluray/bdj/bdj.c\n@@ -903,6 +903,8 @@ static int _create_jvm(void *jvm_lib, co\n     option[n++].optionString = str_dup   (\"-Xms256M\");\n     option[n++].optionString = str_dup   (\"-Xmx256M\");\n     option[n++].optionString = str_dup   (\"-Xss2048k\");\n+    option[n++].optionString = str_dup   (\"-Djava.awt.headless=false\");\n+    BD_DEBUG(DBG_CRIT | DBG_BDJ, \"Disable X11 check\\n\");\n #ifdef HAVE_BDJ_J2ME\n     option[n++].optionString = str_printf(\"-Djava.home=%s\", java_home);\n     option[n++].optionString = str_printf(\"-Xbootclasspath/a:%s/lib/xmlparser.jar\", java_home);\n"
  },
  {
    "path": "packages/multimedia/libdvdcss/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libdvdcss\"\nPKG_VERSION=\"1.4.3-Next-Nexus-Alpha2-2\"\nPKG_SHA256=\"f38c4a4e7a4f4da6d8e83b8852489aa3bb6588a915dc41f5ee89d9aad305a06e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/libdvdcss\"\nPKG_URL=\"https://github.com/xbmc/${PKG_NAME}/archive/refs/tags/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"libdvdcss is a simple library designed for accessing DVDs as a block device without having to bother about the decryption.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/multimedia/libdvdnav/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libdvdnav\"\nPKG_VERSION=\"6.1.1-Next-Nexus-Alpha2-2\"\nPKG_SHA256=\"584f62a3896794408d46368e2ecf2c6217ab9c676ce85921b2d68b8961f49dfc\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/libdvdnav\"\nPKG_URL=\"https://github.com/xbmc/${PKG_NAME}/archive/refs/tags/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libdvdread\"\nPKG_LONGDESC=\"libdvdnav is a library that allows easy use of sophisticated DVD navigation features such as DVD menus, multiangle playback and even interactive DVD games.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/multimedia/libdvdread/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libdvdread\"\nPKG_VERSION=\"6.1.3-Next-Nexus-Alpha2-2\"\nPKG_SHA256=\"719130091e3adc9725ba72df808f24a14737a009dca5a4c38c601c0c76449b62\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/xbmc/libdvdread\"\nPKG_URL=\"https://github.com/xbmc/${PKG_NAME}/archive/refs/tags/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"libdvdread is a library which provides a simple foundation for reading DVDs.\"\nPKG_TOOLCHAIN=\"manual\"\n\nif [ \"${KODI_DVDCSS_SUPPORT}\" = yes ]; then\n  PKG_DEPENDS_TARGET+=\" libdvdcss\"\nfi\n"
  },
  {
    "path": "packages/multimedia/libmpeg2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libmpeg2\"\nPKG_VERSION=\"0.5.1\"\nPKG_SHA256=\"dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"http://libmpeg2.sourceforge.net/\"\nPKG_URL=\"http://libmpeg2.sourceforge.net/files/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"The MPEG Library is a collection of C routines to decode MPEG-1 and MPEG-2 movies.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-sdl \\\n                           --without-x\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/multimedia/libudfread/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libudfread\"\nPKG_VERSION=\"1.1.2\"\nPKG_SHA256=\"2bf16726ac98d093156195bb049a663e07d3323e079c26912546f4e05c77bac5\"\nPKG_LICENSE=\"LGPLv2.1\"\nPKG_SITE=\"https://code.videolan.org/videolan/libudfread\"\nPKG_URL=\"https://code.videolan.org/videolan/${PKG_NAME}/-/archive/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"UDF reader\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared\"\n"
  },
  {
    "path": "packages/multimedia/libva/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libva\"\nPKG_VERSION=\"2.17.0\"\nPKG_SHA256=\"8940541980ef998a36cd8f6ad905e81838ea4ddf56dc479ed2bebd12711e6001\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://01.org/linuxmedia\"\nPKG_URL=\"https://github.com/intel/libva/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"Libva is an implementation for VA-API (VIdeo Acceleration API).\"\n\nif [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n  PKG_DEPENDS_TARGET=\"toolchain libX11 libXext libXfixes libdrm\"\n  DISPLAYSERVER_LIBVA=\"-Dwith_x11=yes -Dwith_glx=no -Dwith_wayland=no\"\nelif [ \"${DISPLAYSERVER}\" = \"wl\" ]; then\n  DISPLAYSERVER_LIBVA=\"-Dwith_x11=no -Dwith_glx=no -Dwith_wayland=yes\"\n  PKG_DEPENDS_TARGET=\"toolchain libdrm wayland\"\nelse\n  PKG_DEPENDS_TARGET=\"toolchain libdrm\"\n  DISPLAYSERVER_LIBVA=\"-Dwith_x11=no -Dwith_glx=no -Dwith_wayland=no\"\nfi\n\nPKG_MESON_OPTS_TARGET=\"-Ddisable_drm=false \\\n                       -Denable_docs=false \\\n                       -Denable_va_messaging=true \\\n                       ${DISPLAYSERVER_LIBVA}\"\n"
  },
  {
    "path": "packages/multimedia/libvdpau/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libvdpau\"\nPKG_VERSION=\"1.5\"\nPKG_SHA256=\"a5d50a42b8c288febc07151ab643ac8de06a18446965c7241f89b4e810821913\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://wiki.freedesktop.org/www/Software/VDPAU/\"\nPKG_URL=\"https://gitlab.freedesktop.org/vdpau/libvdpau/-/archive/${PKG_VERSION}/libvdpau-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libX11 xorgproto libXext\"\nPKG_LONGDESC=\"VDPAU is the Video Decode and Presentation API for UNIX.\"\n\nPKG_MESON_OPTS_TARGET=\"-Ddocumentation=false \\\n                       -Ddri2=true \\\n                       -Dmoduledir=/usr/lib/vdpau\"\n"
  },
  {
    "path": "packages/multimedia/media-driver/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"media-driver\"\nPKG_VERSION=\"22.6.6\"\nPKG_SHA256=\"b553290e829dfd824eb62295c9f07dbe8062ce7998f7c527cc92856d0792562d\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://01.org/linuxmedia\"\nPKG_URL=\"https://github.com/intel/media-driver/archive/intel-media-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libva libdrm gmmlib\"\nPKG_LONGDESC=\"media-driver: The Intel(R) Media Driver for VAAPI is a new VA-API (Video Acceleration API) user mode driver supporting hardware accelerated decoding, encoding, and video post processing for GEN based graphics hardware.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_CMRTLIB=OFF \\\n                       -DBUILD_KERNELS=ON \\\n                       -DBUILD_TYPE=release \\\n                       -DENABLE_NONFREE_KERNELS=ON \\\n                       -DMEDIA_BUILD_FATAL_WARNINGS=ON \\\n                       -DMEDIA_RUN_TEST_SUITE=OFF\"\n"
  },
  {
    "path": "packages/multimedia/media-driver/patches/media-driver-999.01-PR1162-use-forward_references-as-the-reference-for-ADI.patch",
    "content": "From 1e79d58e7af77453e55ce40fe01c1cc8ca84461b Mon Sep 17 00:00:00 2001\nFrom: Jason Chen <jason.k.chen@intel.com>\nDate: Thu, 18 Mar 2021 11:52:11 +0800\nSubject: [PATCH] [VP] Use forward_references as the reference for ADI\n\nVAAPI define forward_references as past referene frame, but vphal regart forward reference as future reference frame. This change will only correct the behavior in DDI level to map forward_references to VPHAL_SURFACE.pBwdRef, and backward_references to VPHAL_SURFACE.pFwdRef\n---\n media_driver/linux/common/ddi/media_libva.cpp | 17 ++++++++\n .../linux/common/vp/ddi/media_libva_vp.c      | 42 ++++++++++---------\n 2 files changed, 39 insertions(+), 20 deletions(-)\n\ndiff --git a/media_driver/linux/common/ddi/media_libva.cpp b/media_driver/linux/common/ddi/media_libva.cpp\nindex 63f1659ed..efa0c08cc 100755\n--- a/media_driver/linux/common/ddi/media_libva.cpp\n+++ b/media_driver/linux/common/ddi/media_libva.cpp\n@@ -6525,6 +6525,23 @@ DdiMedia_QueryVideoProcPipelineCaps(\n         pipeline_caps->min_output_width           = VP_MIN_PIC_WIDTH;\n         pipeline_caps->min_output_height          = VP_MIN_PIC_WIDTH;\n     }\n+\n+    for (int i = 0; i < num_filters; i++) {\n+        void *pData;\n+        DdiMedia_MapBuffer(ctx, filters[i], &pData);\n+        DDI_CHK_NULL(pData, \"nullptr pData\", VA_STATUS_ERROR_INVALID_PARAMETER);\n+        VAProcFilterParameterBufferBase* base_param = (VAProcFilterParameterBufferBase*) pData;\n+        if (base_param->type == VAProcFilterDeinterlacing)\n+        {\n+            VAProcFilterParameterBufferDeinterlacing *di_param = (VAProcFilterParameterBufferDeinterlacing *)base_param;\n+            if (di_param->algorithm == VAProcDeinterlacingMotionAdaptive ||\n+                di_param->algorithm == VAProcDeinterlacingMotionCompensated)\n+            {\n+                pipeline_caps->num_forward_references = 1;\n+            }\n+        }\n+    }\n+    \n     return VA_STATUS_SUCCESS;\n }\n \ndiff --git a/media_driver/linux/common/vp/ddi/media_libva_vp.c b/media_driver/linux/common/vp/ddi/media_libva_vp.c\nindex 1f544749b..7d5b95b4e 100644\n--- a/media_driver/linux/common/vp/ddi/media_libva_vp.c\n+++ b/media_driver/linux/common/vp/ddi/media_libva_vp.c\n@@ -90,8 +90,8 @@ VAStatus     DdiVp_SetProcFilterTotalColorCorrectionParams(PDDI_VP_CONTEXT, uint\n VAStatus     DdiVp_SetProcFilterHdrTmParams(PDDI_VP_CONTEXT, uint32_t, VAProcFilterParameterBufferHDRToneMapping*);\n VAStatus     DdiVp_SetProcPipelineBlendingParams(PDDI_VP_CONTEXT pVpCtx, uint32_t uiSurfIndex, VAProcPipelineParameterBuffer* pPipelineParam);\n VAStatus     DdiVp_ConvertSurface (VADriverContextP ctx, DDI_MEDIA_SURFACE  *srcSurface, int16_t srcx,  int16_t srcy, uint16_t srcw,  uint16_t srch,  DDI_MEDIA_SURFACE  *dstSurface,  int16_t destx,  int16_t desty, uint16_t destw, uint16_t desth );\n-VAStatus     DdiVp_UpdateProcPipelineForwardReferenceFrames(PDDI_VP_CONTEXT pVpCtx, VADriverContextP pVaDrvCtx, PVPHAL_SURFACE pVpHalSrcSurf, VAProcPipelineParameterBuffer* pPipelineParam);\n-VAStatus     DdiVp_UpdateProcPipelineBackwardReferenceFrames(PDDI_VP_CONTEXT pVpCtx, VADriverContextP pVaDrvCtx, PVPHAL_SURFACE pVpHalSrcSurf, VAProcPipelineParameterBuffer* pPipelineParam);\n+VAStatus     DdiVp_UpdateProcPipelineFutureReferenceFrames(PDDI_VP_CONTEXT pVpCtx, VADriverContextP pVaDrvCtx, PVPHAL_SURFACE pVpHalSrcSurf, VAProcPipelineParameterBuffer* pPipelineParam);\n+VAStatus     DdiVp_UpdateProcPipelinePastReferenceFrames(PDDI_VP_CONTEXT pVpCtx, VADriverContextP pVaDrvCtx, PVPHAL_SURFACE pVpHalSrcSurf, VAProcPipelineParameterBuffer* pPipelineParam);\n VAStatus     DdiVp_UpdateVphalTargetSurfColorSpace(VADriverContextP, PDDI_VP_CONTEXT, VAProcPipelineParameterBuffer*, uint32_t targetIndex);\n VAStatus     DdiVp_BeginPictureInt(VADriverContextP pVaDrvCtx, PDDI_VP_CONTEXT pVpCtx, VASurfaceID vaSurfID);\n \n@@ -1174,15 +1174,15 @@ DdiVp_SetProcPipelineParams(\n \n     // Update fwd and bkward ref frames: Required for Advanced processing - will be supported in the future\n \n-    pVpHalSrcSurf->uFwdRefCount  = pPipelineParam->num_forward_references;\n+    pVpHalSrcSurf->uFwdRefCount  = pPipelineParam->num_backward_references;\n \n-    vaStatus = DdiVp_UpdateProcPipelineForwardReferenceFrames(pVpCtx, pVaDrvCtx, pVpHalSrcSurf, pPipelineParam);\n-    DDI_CHK_RET(vaStatus, \"Failed to update forward reference frames!\");\n+    vaStatus = DdiVp_UpdateProcPipelineFutureReferenceFrames(pVpCtx, pVaDrvCtx, pVpHalSrcSurf, pPipelineParam);\n+    DDI_CHK_RET(vaStatus, \"Failed to update future reference frames!\");\n \n-    pVpHalSrcSurf->uBwdRefCount  = pPipelineParam->num_backward_references;\n+    pVpHalSrcSurf->uBwdRefCount  = pPipelineParam->num_forward_references;\n \n-    vaStatus = DdiVp_UpdateProcPipelineBackwardReferenceFrames(pVpCtx, pVaDrvCtx, pVpHalSrcSurf, pPipelineParam);\n-    DDI_CHK_RET(vaStatus, \"Failed to update backward reference frames!\");\n+    vaStatus = DdiVp_UpdateProcPipelinePastReferenceFrames(pVpCtx, pVaDrvCtx, pVpHalSrcSurf, pPipelineParam);\n+    DDI_CHK_RET(vaStatus, \"Failed to update past reference frames!\");\n \n     // Check if filter values changed,if yes, then reset all filters for this surface\n \n@@ -3890,7 +3890,7 @@ DdiVp_SetProcPipelineBlendingParams(\n }\n \n ////////////////////////////////////////////////////////////////////////////////\n-//! \\purpose Update the forward reference frames for VPHAL input surface\n+//! \\purpose Update the future reference frames for VPHAL input surface\n //! \\params\n //! [in]  pVpCtx : VP context\n //! [in]  pVaDrvCtx : VA Driver context\n@@ -3900,7 +3900,7 @@ DdiVp_SetProcPipelineBlendingParams(\n //! \\returns VA_STATUS_SUCCESS if call succeeds\n ////////////////////////////////////////////////////////////////////////////////\n VAStatus\n-DdiVp_UpdateProcPipelineForwardReferenceFrames(\n+DdiVp_UpdateProcPipelineFutureReferenceFrames(\n     PDDI_VP_CONTEXT                 pVpCtx,\n     VADriverContextP                pVaDrvCtx,\n     PVPHAL_SURFACE                  pVpHalSrcSurf,\n@@ -3930,9 +3930,10 @@ DdiVp_UpdateProcPipelineForwardReferenceFrames(\n \n     pSurface = pVpHalSrcSurf;\n \n-    if (pPipelineParam->forward_references != nullptr)\n+    // DDI regard backward_references as future frame, but VPHAL regard pFwdRef as future frame\n+    if (pPipelineParam->backward_references != nullptr)\n     {\n-        for (i = 0;i < pPipelineParam->num_forward_references; i++)\n+        for (i = 0;i < pPipelineParam->num_backward_references; i++)\n         {\n             PDDI_MEDIA_SURFACE pRefSurfBuffObj = nullptr;\n             if(pSurface->pFwdRef == nullptr)\n@@ -3952,9 +3953,9 @@ DdiVp_UpdateProcPipelineForwardReferenceFrames(\n                 pSurface->pFwdRef->dwWidth       = pVpHalSrcSurf->dwWidth;\n                 pSurface->pFwdRef->dwHeight      = pVpHalSrcSurf->dwHeight;\n                 pSurface->pFwdRef->dwPitch       = pVpHalSrcSurf->dwPitch;\n-                pSurface->uFwdRefCount           = pPipelineParam->num_forward_references - i;\n+                pSurface->uFwdRefCount           = pPipelineParam->num_backward_references - i;\n             }\n-            pRefSurfBuffObj = DdiMedia_GetSurfaceFromVASurfaceID(pMediaCtx, pPipelineParam->forward_references[i]);\n+            pRefSurfBuffObj = DdiMedia_GetSurfaceFromVASurfaceID(pMediaCtx, pPipelineParam->backward_references[i]);\n             DDI_CHK_NULL(pRefSurfBuffObj,\n                             \"Null pRefSurfBuffObj!\",\n                              VA_STATUS_ERROR_INVALID_SURFACE);\n@@ -3979,7 +3980,7 @@ DdiVp_UpdateProcPipelineForwardReferenceFrames(\n }\n \n ////////////////////////////////////////////////////////////////////////////////\n-//! \\purpose Update the backward reference frames for VPHAL input surface\n+//! \\purpose Update the past reference frames for VPHAL input surface\n //! \\params\n //! [in]  pVpCtx : VP context\n //! [in]  pVaDrvCtx : VA Driver context\n@@ -3989,7 +3990,7 @@ DdiVp_UpdateProcPipelineForwardReferenceFrames(\n //! \\returns VA_STATUS_SUCCESS if call succeeds\n ////////////////////////////////////////////////////////////////////////////////\n VAStatus\n-DdiVp_UpdateProcPipelineBackwardReferenceFrames(\n+DdiVp_UpdateProcPipelinePastReferenceFrames(\n     PDDI_VP_CONTEXT                 pVpCtx,\n     VADriverContextP                pVaDrvCtx,\n     PVPHAL_SURFACE                  pVpHalSrcSurf,\n@@ -4019,9 +4020,10 @@ DdiVp_UpdateProcPipelineBackwardReferenceFrames(\n \n     pSurface = pVpHalSrcSurf;\n \n-    if (pPipelineParam->backward_references != nullptr)\n+    // DDI regard forward_references as past frame, but VPHAL regard pBwdRef as past frame\n+    if (pPipelineParam->forward_references != nullptr)\n     {\n-        for (i = 0;i < pPipelineParam->num_backward_references; i++)\n+        for (i = 0;i < pPipelineParam->num_forward_references; i++)\n         {\n             PDDI_MEDIA_SURFACE pRefSurfBuffObj = nullptr;\n             if(pSurface->pBwdRef == nullptr)\n@@ -4041,9 +4043,9 @@ DdiVp_UpdateProcPipelineBackwardReferenceFrames(\n                 pSurface->pBwdRef->dwWidth       = pVpHalSrcSurf->dwWidth;\n                 pSurface->pBwdRef->dwHeight      = pVpHalSrcSurf->dwHeight;\n                 pSurface->pBwdRef->dwPitch       = pVpHalSrcSurf->dwPitch;\n-                pSurface->uBwdRefCount           = pPipelineParam->num_backward_references - i;;\n+                pSurface->uBwdRefCount           = pPipelineParam->num_forward_references - i;;\n             }\n-            pRefSurfBuffObj = DdiMedia_GetSurfaceFromVASurfaceID(pMediaCtx, pPipelineParam->backward_references[i]);\n+            pRefSurfBuffObj = DdiMedia_GetSurfaceFromVASurfaceID(pMediaCtx, pPipelineParam->forward_references[i]);\n             DDI_CHK_NULL(pRefSurfBuffObj,\n                             \"Null pRefSurfBuffObj!\",\n                              VA_STATUS_ERROR_INVALID_SURFACE);\n"
  },
  {
    "path": "packages/multimedia/nv-codec-headers/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"nv-codec-headers\"\nPKG_VERSION=\"11.1.5.2\"\nPKG_SHA256=\"576df78bad704e2854991100bea99e974759304ac1411c02707ebc95a425191b\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/FFmpeg/nv-codec-headers\"\nPKG_URL=\"https://github.com/FFmpeg/nv-codec-headers/archive/n${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"FFmpeg version of headers required to interface with Nvidias codec APIs.\"\n\nmakeinstall_target(){\n  make DESTDIR=${SYSROOT_PREFIX} PREFIX=/usr install\n}\n"
  },
  {
    "path": "packages/multimedia/nvidia-vaapi-driver/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"nvidia-vaapi-driver\"\nPKG_VERSION=\"0.0.8\"\nPKG_SHA256=\"a396e8b48ec9bc58cec50d5b049e401ddc59083195edf2b8669e9788f4d44293\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/elFarto/nvidia-vaapi-driver\"\nPKG_URL=\"https://github.com/elFarto/nvidia-vaapi-driver/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libva nv-codec-headers gst-plugins-bad\"\nPKG_LONGDESC=\"A VA-API implemention using NVIDIA's NVDEC\"\n"
  },
  {
    "path": "packages/multimedia/rtmpdump/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rtmpdump\"\nPKG_VERSION=\"c5f04a58fc2aeea6296ca7c44ee4734c18401aa3\"\nPKG_SHA256=\"fd8c21263d93fbde8bee8aa6c5f6a657789674bb0f9e74f050651504d5f43b46\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://rtmpdump.mplayerhq.hu/\"\nPKG_URL=\"http://repo.or.cz/rtmpdump.git/snapshot/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib openssl\"\nPKG_LONGDESC=\"rtmpdump is a toolkit for RTMP streams.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nmake_target() {\n  make prefix=/usr \\\n       incdir=/usr/include/librtmp \\\n       libdir=/usr/lib \\\n       mandir=/usr/share/man \\\n       CC=\"${CC}\" \\\n       LD=\"${LD}\" \\\n       AR=\"${AR}\" \\\n       SHARED=no \\\n       CRYPTO=\"OPENSSL\" \\\n       OPT=\"\" \\\n       XCFLAGS=\"${CFLAGS}\" \\\n       XCFLAGS=\"${CFLAGS} -Wno-unused-but-set-variable -Wno-unused-const-variable\" \\\n       XLDFLAGS=\"${LDFLAGS}\" \\\n       XLIBS=\"-lm\"\n}\n\nmakeinstall_target() {\n  make DESTDIR=${SYSROOT_PREFIX} \\\n       prefix=/usr \\\n       incdir=/usr/include/librtmp \\\n       libdir=/usr/lib \\\n       mandir=/usr/share/man \\\n       CC=\"${CC}\" \\\n       LD=\"${LD}\" \\\n       AR=\"${AR}\" \\\n       SHARED=no \\\n       CRYPTO=\"OPENSSL\" \\\n       OPT=\"\" \\\n       XCFLAGS=\"${CFLAGS}\" \\\n       XLDFLAGS=\"${LDFLAGS}\" \\\n       XLIBS=\"-lm\" \\\n       install\n\n  make DESTDIR=${INSTALL} \\\n       prefix=/usr \\\n       incdir=/usr/include/librtmp \\\n       libdir=/usr/lib \\\n       mandir=/usr/share/man \\\n       CC=\"${CC}\" \\\n       LD=\"${LD}\" \\\n       AR=\"${AR}\" \\\n       SHARED=no \\\n       CRYPTO=\"OPENSSL\" \\\n       OPT=\"\" \\\n       XCFLAGS=\"${CFLAGS}\" \\\n       XLDFLAGS=\"${LDFLAGS}\" \\\n       XLIBS=\"-lm\" \\\n       install\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/sbin\n\n#  # to be removed: hack for \"compatibility\"\n#  mkdir -p ${INSTALL}/usr/lib\n#    ln -sf librtmp.so.1 ${INSTALL}/usr/lib/librtmp.so.0\n}\n"
  },
  {
    "path": "packages/multimedia/rtmpdump/patches/001_fix-racing-build-issue.patch",
    "content": "--- a/librtmp/Makefile\t2018-02-01 18:38:52.866867721 +0100\n+++ b/librtmp/Makefile\t2018-02-01 18:39:23.315007740 +0100\n@@ -115,6 +115,7 @@\n \tcp librtmp.3 $(MANDIR)/man3\n \n install_so:\tlibrtmp$(SO_EXT)\n+\t-mkdir -p $(SODIR)\n \tcp librtmp$(SO_EXT) $(SODIR)\n \t$(INSTALL_IMPLIB)\n \tcd $(SODIR); ln -sf librtmp$(SO_EXT) librtmp.$(SOX)\n"
  },
  {
    "path": "packages/multimedia/rtmpdump/patches/002_build-with-openssl11.patch",
    "content": "--- a/librtmp/dh.h\n+++ b/librtmp/dh.h\n@@ -253,20 +253,42 @@\n   if (!dh)\n     goto failed;\n \n+#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L\n   MP_new(dh->g);\n \n   if (!dh->g)\n     goto failed;\n+#else\n+  BIGNUM *g = NULL;\n+  MP_new(g);\n+  if (!g)\n+    goto failed;\n+#endif\n \n+#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L\n   MP_gethex(dh->p, P1024, res);\t/* prime P1024, see dhgroups.h */\n+#else\n+  BIGNUM* p = NULL;\n+  DH_get0_pqg(dh, (BIGNUM const**)&p, NULL, NULL);\n+  MP_gethex(p, P1024, res); /* prime P1024, see dhgroups.h */\n+#endif\n   if (!res)\n     {\n       goto failed;\n     }\n \n+#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L\n   MP_set_w(dh->g, 2);\t/* base 2 */\n+#else\n+  MP_set_w(g, 2);   /* base 2 */\n+  DH_set0_pqg(dh, p, NULL, g);\n+#endif\n \n+#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L\n   dh->length = nKeyBits;\n+#else\n+  DH_set_length(dh, nKeyBits);\n+#endif\n   return dh;\n \n failed:\n@@ -293,12 +315,24 @@\n       MP_gethex(q1, Q1024, res);\n       assert(res);\n \n+#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L\n       res = isValidPublicKey(dh->pub_key, dh->p, q1);\n+#else\n+      BIGNUM const* pub_key = NULL;\n+      BIGNUM const* p = NULL;\n+      DH_get0_key(dh, &pub_key, NULL);\n+      DH_get0_pqg(dh, &p, NULL, NULL);\n+      res = isValidPublicKey((BIGNUM*)pub_key, (BIGNUM*)p, q1);\n+#endif\n       if (!res)\n \t{\n+#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L\n \t  MP_free(dh->pub_key);\n \t  MP_free(dh->priv_key);\n \t  dh->pub_key = dh->priv_key = 0;\n+#else\n+          DH_free(dh);\n+#endif\n \t}\n \n       MP_free(q1);\n@@ -314,15 +348,29 @@\n DHGetPublicKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen)\n {\n   int len;\n+#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L\n   if (!dh || !dh->pub_key)\n+#else\n+  BIGNUM const* pub_key = NULL;\n+  DH_get0_key(dh, &pub_key, NULL);\n+  if (!dh || !pub_key)\n+#endif\n     return 0;\n \n+#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L\n   len = MP_bytes(dh->pub_key);\n+#else\n+  len = MP_bytes(pub_key);\n+#endif\n   if (len <= 0 || len > (int) nPubkeyLen)\n     return 0;\n \n   memset(pubkey, 0, nPubkeyLen);\n+#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L\n   MP_setbin(dh->pub_key, pubkey + (nPubkeyLen - len), len);\n+#else\n+  MP_setbin(pub_key, pubkey + (nPubkeyLen - len), len);\n+#endif\n   return 1;\n }\n \n@@ -364,7 +412,13 @@\n   MP_gethex(q1, Q1024, len);\n   assert(len);\n \n+#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L\n   if (isValidPublicKey(pubkeyBn, dh->p, q1))\n+#else\n+  BIGNUM const* p = NULL;\n+  DH_get0_pqg(dh, &p, NULL, NULL);\n+  if (isValidPublicKey(pubkeyBn, (BIGNUM*)p, q1))\n+#endif\n     res = MDH_compute_key(secret, nPubkeyLen, pubkeyBn, dh);\n   else\n     res = -1;\n--- a/librtmp/handshake.h\n+++ b/librtmp/handshake.h\n@@ -31,9 +31,9 @@\n #define SHA256_DIGEST_LENGTH\t32\n #endif\n #define HMAC_CTX\tsha2_context\n-#define HMAC_setup(ctx, key, len)\tsha2_hmac_starts(&ctx, (unsigned char *)key, len, 0)\n-#define HMAC_crunch(ctx, buf, len)\tsha2_hmac_update(&ctx, buf, len)\n-#define HMAC_finish(ctx, dig, dlen)\tdlen = SHA256_DIGEST_LENGTH; sha2_hmac_finish(&ctx, dig)\n+#define HMAC_setup(ctx, key, len)\tsha2_hmac_starts(ctx, (unsigned char *)key, len, 0)\n+#define HMAC_crunch(ctx, buf, len)\tsha2_hmac_update(ctx, buf, len)\n+#define HMAC_finish(ctx, dig, dlen)\tdlen = SHA256_DIGEST_LENGTH; sha2_hmac_finish(ctx, dig)\n \n typedef arc4_context *\tRC4_handle;\n #define RC4_alloc(h)\t*h = malloc(sizeof(arc4_context))\n@@ -50,9 +50,9 @@\n #endif\n #undef HMAC_CTX\n #define HMAC_CTX\tstruct hmac_sha256_ctx\n-#define HMAC_setup(ctx, key, len)\thmac_sha256_set_key(&ctx, len, key)\n-#define HMAC_crunch(ctx, buf, len)\thmac_sha256_update(&ctx, len, buf)\n-#define HMAC_finish(ctx, dig, dlen)\tdlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(&ctx, SHA256_DIGEST_LENGTH, dig)\n+#define HMAC_setup(ctx, key, len)\thmac_sha256_set_key(ctx, len, key)\n+#define HMAC_crunch(ctx, buf, len)\thmac_sha256_update(ctx, len, buf)\n+#define HMAC_finish(ctx, dig, dlen)\tdlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(ctx, SHA256_DIGEST_LENGTH, dig)\n #define HMAC_close(ctx)\n \n typedef struct arcfour_ctx*\tRC4_handle;\n@@ -64,14 +64,23 @@\n \n #else\t/* USE_OPENSSL */\n #include <openssl/sha.h>\n+#include <openssl/ossl_typ.h>\n #include <openssl/hmac.h>\n #include <openssl/rc4.h>\n #if OPENSSL_VERSION_NUMBER < 0x0090800 || !defined(SHA256_DIGEST_LENGTH)\n #error Your OpenSSL is too old, need 0.9.8 or newer with SHA256\n #endif\n-#define HMAC_setup(ctx, key, len)\tHMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, key, len, EVP_sha256(), 0)\n-#define HMAC_crunch(ctx, buf, len)\tHMAC_Update(&ctx, buf, len)\n-#define HMAC_finish(ctx, dig, dlen)\tHMAC_Final(&ctx, dig, &dlen); HMAC_CTX_cleanup(&ctx)\n+#if OPENSSL_VERSION_NUMBER < 0x10100000L\n+#define HMAC_setup(ctx, key, len)\tHMAC_CTX_init(ctx); HMAC_Init_ex(ctx, key, len, EVP_sha256(), 0)\n+#else\n+#define HMAC_setup(ctx, key, len)\tctx = HMAC_CTX_new(); HMAC_CTX_reset(ctx); HMAC_Init_ex(ctx, key, len, EVP_sha256(), 0)\n+#endif\n+#define HMAC_crunch(ctx, buf, len)\tHMAC_Update(ctx, buf, len)\n+#if OPENSSL_VERSION_NUMBER < 0x10100000L\n+#define HMAC_finish(ctx, dig, dlen)\tHMAC_Final(ctx, dig, &dlen); HMAC_CTX_cleanup(ctx)\n+#else\n+#define HMAC_finish(ctx, dig, dlen)     HMAC_Final(ctx, dig, &dlen); HMAC_CTX_free(ctx)\n+#endif\n \n typedef RC4_KEY *\tRC4_handle;\n #define RC4_alloc(h)\t*h = malloc(sizeof(RC4_KEY))\n@@ -117,7 +126,7 @@\n {\n   uint8_t digest[SHA256_DIGEST_LENGTH];\n   unsigned int digestLen = 0;\n-  HMAC_CTX ctx;\n+  HMAC_CTX* ctx = NULL;\n \n   RC4_alloc(rc4keyIn);\n   RC4_alloc(rc4keyOut);\n@@ -266,7 +275,7 @@\n \t   size_t keylen, uint8_t *digest)\n {\n   unsigned int digestLen;\n-  HMAC_CTX ctx;\n+  HMAC_CTX* ctx = NULL;\n \n   HMAC_setup(ctx, key, keylen);\n   HMAC_crunch(ctx, message, messageLen);\n--- a/librtmp/hashswf.c\n+++ b/librtmp/hashswf.c\n@@ -37,9 +37,9 @@\n #define SHA256_DIGEST_LENGTH\t32\n #endif\n #define HMAC_CTX\tsha2_context\n-#define HMAC_setup(ctx, key, len)\tsha2_hmac_starts(&ctx, (unsigned char *)key, len, 0)\n-#define HMAC_crunch(ctx, buf, len)\tsha2_hmac_update(&ctx, buf, len)\n-#define HMAC_finish(ctx, dig, dlen)\tdlen = SHA256_DIGEST_LENGTH; sha2_hmac_finish(&ctx, dig)\n+#define HMAC_setup(ctx, key, len)\tsha2_hmac_starts(ctx, (unsigned char *)key, len, 0)\n+#define HMAC_crunch(ctx, buf, len)\tsha2_hmac_update(ctx, buf, len)\n+#define HMAC_finish(ctx, dig, dlen)\tdlen = SHA256_DIGEST_LENGTH; sha2_hmac_finish(ctx, dig)\n #define HMAC_close(ctx)\n #elif defined(USE_GNUTLS)\n #include <nettle/hmac.h>\n@@ -48,19 +48,27 @@\n #endif\n #undef HMAC_CTX\n #define HMAC_CTX\tstruct hmac_sha256_ctx\n-#define HMAC_setup(ctx, key, len)\thmac_sha256_set_key(&ctx, len, key)\n-#define HMAC_crunch(ctx, buf, len)\thmac_sha256_update(&ctx, len, buf)\n-#define HMAC_finish(ctx, dig, dlen)\tdlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(&ctx, SHA256_DIGEST_LENGTH, dig)\n+#define HMAC_setup(ctx, key, len)\thmac_sha256_set_key(ctx, len, key)\n+#define HMAC_crunch(ctx, buf, len)\thmac_sha256_update(ctx, len, buf)\n+#define HMAC_finish(ctx, dig, dlen)\tdlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(ctx, SHA256_DIGEST_LENGTH, dig)\n #define HMAC_close(ctx)\n #else\t/* USE_OPENSSL */\n #include <openssl/ssl.h>\n #include <openssl/sha.h>\n #include <openssl/hmac.h>\n #include <openssl/rc4.h>\n-#define HMAC_setup(ctx, key, len)\tHMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, (unsigned char *)key, len, EVP_sha256(), 0)\n-#define HMAC_crunch(ctx, buf, len)\tHMAC_Update(&ctx, (unsigned char *)buf, len)\n-#define HMAC_finish(ctx, dig, dlen)\tHMAC_Final(&ctx, (unsigned char *)dig, &dlen);\n-#define HMAC_close(ctx)\tHMAC_CTX_cleanup(&ctx)\n+#if OPENSSL_VERSION_NUMBER < 0x10100000L\n+#define HMAC_setup(ctx, key, len)\tHMAC_CTX_init(ctx); HMAC_Init_ex(ctx, (unsigned char *)key, len, EVP_sha256(), 0)\n+#else\n+#define HMAC_setup(ctx, key, len)\tctx = HMAC_CTX_new(); HMAC_CTX_reset(ctx); HMAC_Init_ex(ctx, key, len, EVP_sha256(), 0)\n+#endif\n+#define HMAC_crunch(ctx, buf, len)\tHMAC_Update(ctx, (unsigned char *)buf, len)\n+#define HMAC_finish(ctx, dig, dlen)\tHMAC_Final(ctx, (unsigned char *)dig, &dlen);\n+#if OPENSSL_VERSION_NUMBER < 0x10100000L\n+#define HMAC_close(ctx)\tHMAC_CTX_cleanup(ctx)\n+#else\n+#define HMAC_close(ctx) HMAC_CTX_reset(ctx); HMAC_CTX_free(ctx)\n+#endif\n #endif\n \n extern void RTMP_TLS_Init();\n@@ -289,7 +297,7 @@\n struct info\n {\n   z_stream *zs;\n-  HMAC_CTX ctx;\n+  HMAC_CTX *ctx;\n   int first;\n   int zlib;\n   int size;\n"
  },
  {
    "path": "packages/multimedia/zvbi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"zvbi\"\nPKG_VERSION=\"0.2.35\"\nPKG_SHA256=\"fc883c34111a487c4a783f91b1b2bb5610d8d8e58dcba80c7ab31e67e4765318\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"http://zapping.sourceforge.net/ZVBI\"\nPKG_URL=\"https://downloads.sourceforge.net/sourceforge/zapping/zvbi-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libpng zlib\"\nPKG_LONGDESC=\"Library to provide functions to capture and decode VBI data.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-dvb \\\n                           --disable-bktr \\\n                           --disable-nls \\\n                           --disable-proxy \\\n                           --without-doxygen \\\n                           --without-x\"\n"
  },
  {
    "path": "packages/multimedia/zvbi/patches/zvbi-0010-fix-static-linking.patch",
    "content": "--- a/configure\n+++ b/configure\n@@ -16515,7 +16515,7 @@\n { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_destroy_write_struct\" >&5\n $as_echo \"$ac_cv_lib_png_png_destroy_write_struct\" >&6; }\n if test \"x$ac_cv_lib_png_png_destroy_write_struct\" = x\"\"yes; then :\n-  LIBS=\"$LIBS -lpng -lz\"\n+  LIBS=\"-lpng -lz $LIBS\"\n else\n   HAVE_PNG=\"no\"\n fi\n--- a/configure.in\n+++ b/configure.in\n@@ -244,7 +244,7 @@ dnl (PNG page export)\n dnl\n HAVE_PNG=\"yes\"\n AC_CHECK_LIB(png, png_destroy_write_struct,\n-  LIBS=\"$LIBS -lpng -lz\", HAVE_PNG=\"no\", -lz -lm)\n+  LIBS=\"-lpng $LIBS -lz -lm\", HAVE_PNG=\"no\", -lz -lm)\n if test \"x$HAVE_PNG\" = xyes; then\n   AC_DEFINE(HAVE_LIBPNG, 1, [Define if you have libpng])\n fi\n--- a/examples/Makefile.am\n+++ b/examples/Makefile.am\n@@ -19,4 +19,4 @@ EXTRA_DIST = \\\n INCLUDES = -I$(top_srcdir)/src\n \n LDADD = $(top_builddir)/src/libzvbi.la \\\n-\t$(PTHREAD_LIB) -lm $(PNG_LIB)\n+\t$(PTHREAD_LIB) $(PNG_LIB) -lm\n--- a/examples/Makefile.in\n+++ b/examples/Makefile.in\n@@ -262,7 +262,7 @@ EXTRA_DIST = \\\n \n INCLUDES = -I$(top_srcdir)/src\n LDADD = $(top_builddir)/src/libzvbi.la \\\n-\t$(PTHREAD_LIB) -lm $(PNG_LIB)\n+\t$(PTHREAD_LIB) $(PNG_LIB) -lm\n \n all: all-am\n \n"
  },
  {
    "path": "packages/multimedia/zvbi/patches/zvbi-0020-ioctl.patch",
    "content": "--- a/contrib/ntsc-cc.c\n+++ b/contrib/ntsc-cc.c\n@@ -32,7 +32,6 @@\n #include <fcntl.h>\n #include <errno.h>\n #include <locale.h>\n-#include <sys/ioctl.h>\n #include <sys/types.h>\n #include <sys/stat.h>\n #include <sys/time.h>\n@@ -45,6 +44,7 @@\n #include \"src/libzvbi.h\"\n \n #ifdef ENABLE_V4L2\n+#  include <sys/ioctl.h>\n #  include <asm/types.h>\n #  include \"src/videodev2k.h\"\n #endif\n"
  },
  {
    "path": "packages/multimedia/zvbi/patches/zvbi-0030-ssize_max.patch",
    "content": "Linear memory extents over SSIZE_MAX are undefined, so there is no\npoint in protecting against them.\n--- a/src/export.c\n+++ b/src/export.c\n@@ -1056,8 +1056,6 @@\n \t\tsize_t count;\n \n \t\tcount = src_size;\n-\t\tif (unlikely (src_size > SSIZE_MAX))\n-\t\t\tcount = SSIZE_MAX & -4096;\n \n \t\tfor (retry = 10;; --retry) {\n \t\t\tactual = write (e->_handle.fd, src, count);\n@@ -1614,12 +1612,7 @@\n \t\t\tfree (e->buffer.data);\n \t\t}\n \n-\t\tif (unlikely (e->buffer.offset > (size_t) SSIZE_MAX)) {\n-\t\t\terrno = EOVERFLOW;\n-\t\t\tactual = -1; /* failed */\n-\t\t} else {\n-\t\t\tactual = e->buffer.offset;\n-\t\t}\n+\t\tactual = e->buffer.offset;\n \t} else {\n \t\tif (VBI_EXPORT_TARGET_ALLOC == e->target)\n \t\t\tfree (e->buffer.data);\n\n"
  },
  {
    "path": "packages/multimedia/zvbi/patches/zvbi-0040-fix-clang-support.patch",
    "content": "--- a/src/misc.h\n+++ b/src/misc.h\n@@ -52,17 +52,6 @@\n #  define unlikely(expr) __builtin_expect(expr, 0)\n #endif\n \n-#undef __i386__\n-#undef __i686__\n-/* FIXME #cpu is deprecated\n-#if #cpu (i386)\n-#  define __i386__ 1\n-#endif\n-#if #cpu (i686)\n-#  define __i686__ 1\n-#endif\n-*/\n-\n /* &x == PARENT (&x.tm_min, struct tm, tm_min),\n    safer than &x == (struct tm *) &x.tm_min. A NULL _ptr is safe and\n    will return NULL, not -offsetof(_member). */\n@@ -156,8 +145,6 @@\n \n #define likely(expr) (expr)\n #define unlikely(expr) (expr)\n-#undef __i386__\n-#undef __i686__\n \n static char *\n PARENT_HELPER (char *p, unsigned int offset)\n"
  },
  {
    "path": "packages/multimedia/zvbi/patches/zvbi-0050-prevent-test.patch",
    "content": "--- a/Makefile.am\n+++ b/Makefile.am\n@@ -22,8 +22,6 @@ SUBDIRS = \\\n \tsrc \\\n \t$(proxy_dirs) \\\n \tcontrib \\\n-\texamples \\\n-\ttest \\\n \tpo \\\n \tdoc\n \n--- a/Makefile.in\n+++ b/Makefile.in\n@@ -78,7 +78,7 @@ pkgconfigDATA_INSTALL = $(INSTALL_DATA)\n DATA = $(pkgconfig_DATA)\n ETAGS = etags\n CTAGS = ctags\n-DIST_SUBDIRS = m4 src daemon contrib examples test po doc\n+DIST_SUBDIRS = m4 src daemon contrib po doc\n DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)\n distdir = $(PACKAGE)-$(VERSION)\n top_distdir = $(distdir)\n@@ -268,8 +268,6 @@ SUBDIRS = \\\n \tsrc \\\n \t$(proxy_dirs) \\\n \tcontrib \\\n-\texamples \\\n-\ttest \\\n \tpo \\\n \tdoc\n \n--- a/configure\n+++ b/configure\n@@ -18591,7 +18591,7 @@ else\n fi\n \n \n-ac_config_files=\"$ac_config_files Makefile contrib/Makefile examples/Makefile daemon/Makefile daemon/zvbid.init doc/Doxyfile doc/Makefile m4/Makefile src/Makefile src/dvb/Makefile test/Makefile po/Makefile.in zvbi.spec zvbi-0.2.pc\"\n+ac_config_files=\"$ac_config_files Makefile contrib/Makefile daemon/Makefile daemon/zvbid.init doc/Doxyfile doc/Makefile m4/Makefile src/Makefile src/dvb/Makefile po/Makefile.in zvbi.spec zvbi-0.2.pc\"\n \n cat >confcache <<\\_ACEOF\n # This file is a shell script that caches the results of configure\n@@ -19726,7 +19726,6 @@ do\n     \"po-directories\") CONFIG_COMMANDS=\"$CONFIG_COMMANDS po-directories\" ;;\n     \"Makefile\") CONFIG_FILES=\"$CONFIG_FILES Makefile\" ;;\n     \"contrib/Makefile\") CONFIG_FILES=\"$CONFIG_FILES contrib/Makefile\" ;;\n-    \"examples/Makefile\") CONFIG_FILES=\"$CONFIG_FILES examples/Makefile\" ;;\n     \"daemon/Makefile\") CONFIG_FILES=\"$CONFIG_FILES daemon/Makefile\" ;;\n     \"daemon/zvbid.init\") CONFIG_FILES=\"$CONFIG_FILES daemon/zvbid.init\" ;;\n     \"doc/Doxyfile\") CONFIG_FILES=\"$CONFIG_FILES doc/Doxyfile\" ;;\n@@ -19734,7 +19733,6 @@ do\n     \"m4/Makefile\") CONFIG_FILES=\"$CONFIG_FILES m4/Makefile\" ;;\n     \"src/Makefile\") CONFIG_FILES=\"$CONFIG_FILES src/Makefile\" ;;\n     \"src/dvb/Makefile\") CONFIG_FILES=\"$CONFIG_FILES src/dvb/Makefile\" ;;\n-    \"test/Makefile\") CONFIG_FILES=\"$CONFIG_FILES test/Makefile\" ;;\n     \"po/Makefile.in\") CONFIG_FILES=\"$CONFIG_FILES po/Makefile.in\" ;;\n     \"zvbi.spec\") CONFIG_FILES=\"$CONFIG_FILES zvbi.spec\" ;;\n     \"zvbi-0.2.pc\") CONFIG_FILES=\"$CONFIG_FILES zvbi-0.2.pc\" ;;\n--- a/configure.in\n+++ b/configure.in\n@@ -384,7 +384,6 @@ AM_CONDITIONAL(BUILD_STATIC_LIB, [test \"x$enable_static\" = xyes])\n AC_OUTPUT([\n   Makefile\n   contrib/Makefile\n-  examples/Makefile\n   daemon/Makefile\n   daemon/zvbid.init\n   doc/Doxyfile\n@@ -392,7 +391,6 @@ AC_OUTPUT([\n   m4/Makefile\n   src/Makefile\n   src/dvb/Makefile\n-  test/Makefile\n   po/Makefile.in\n   zvbi.spec\n   zvbi-0.2.pc\n"
  },
  {
    "path": "packages/network/avahi/debug.d/avahi.conf",
    "content": "AVAHI_DEBUG=\"--debug\"\n"
  },
  {
    "path": "packages/network/avahi/default.d/avahi.conf",
    "content": ""
  },
  {
    "path": "packages/network/avahi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"avahi\"\nPKG_VERSION=\"0.8\"\nPKG_SHA256=\"c15e750ef7c6df595fb5f2ce10cac0fee2353649600e6919ad08ae8871e4945f\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://avahi.org/\"\nPKG_URL=\"https://github.com/lathiat/avahi/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain expat libdaemon dbus connman gettext\"\nPKG_LONGDESC=\"Service Discovery for Linux using mDNS/DNS-SD, compatible with Bonjour.\"\nPKG_TOOLCHAIN=\"configure\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"py_cv_mod_gtk_=yes \\\n                           py_cv_mod_dbus_=yes \\\n                           ac_cv_func_chroot=no \\\n                           --with-distro=none \\\n                           --enable-static \\\n                           --disable-glib \\\n                           --disable-gobject \\\n                           --disable-qt3 \\\n                           --disable-qt4 \\\n                           --disable-qt5 \\\n                           --disable-gtk \\\n                           --disable-gtk3 \\\n                           --enable-dbus \\\n                           --disable-dbm \\\n                           --disable-gdbm \\\n                           --enable-libdaemon \\\n                           --disable-python \\\n                           --disable-python-dbus \\\n                           --disable-mono \\\n                           --disable-monodoc \\\n                           --disable-autoipd \\\n                           --disable-doxygen-doc \\\n                           --disable-doxygen-dot \\\n                           --disable-doxygen-man \\\n                           --disable-doxygen-rtf \\\n                           --disable-doxygen-xml \\\n                           --disable-doxygen-chm \\\n                           --disable-doxygen-chi \\\n                           --disable-doxygen-html \\\n                           --disable-doxygen-ps \\\n                           --disable-doxygen-pdf \\\n                           --disable-core-docs \\\n                           --disable-manpages \\\n                           --disable-xmltoman \\\n                           --disable-tests \\\n                           --disable-libevent \\\n                           --enable-compat-libdns_sd \\\n                           --disable-compat-howl \\\n                           --disable-rpath \\\n                           --with-xml=expat \\\n                           --with-avahi-user=avahi \\\n                           --with-avahi-group=avahi \\\n                           --disable-nls\"\n\npre_configure_target() {\n  NOCONFIGURE=1 ./autogen.sh\n}\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n# disable wide-area\n  sed -e \"s,^.*enable-wide-area=.*$,enable-wide-area=no,g\" -i ${INSTALL}/etc/avahi/avahi-daemon.conf\n# publish-hinfo\n  sed -e \"s,^.*publish-hinfo=.*$,publish-hinfo=no,g\" -i ${INSTALL}/etc/avahi/avahi-daemon.conf\n# publish-workstation\n  sed -e \"s,^.*publish-workstation=.*$,publish-workstation=no,g\" -i ${INSTALL}/etc/avahi/avahi-daemon.conf\n# browse domains?\n  sed -e \"s,^.*browse-domains=.*$,# browse-domains=,g\" -i ${INSTALL}/etc/avahi/avahi-daemon.conf\n# set root user as default\n  sed -e \"s,<port>22</port>,<port>22</port>\\n    <txt-record>path=/storage</txt-record>\\n    <txt-record>u=root</txt-record>,g\" -i ${INSTALL}/etc/avahi/services/sftp-ssh.service\n\n  rm -rf ${INSTALL}/etc/avahi/avahi-dnsconfd.action\n  if [ ! ${SFTP_SERVER} = \"yes\" ]; then\n    rm -rf ${INSTALL}/etc/avahi/services/ssh.service\n    rm -rf ${INSTALL}/etc/avahi/services/sftp-ssh.service\n  fi\n  rm -rf ${INSTALL}/usr/lib/systemd\n  rm -f ${INSTALL}/usr/share/dbus-1/system-services/org.freedesktop.Avahi.service\n  rm -f ${INSTALL}/usr/sbin/avahi-dnsconfd\n  rm -f ${INSTALL}/usr/bin/avahi-bookmarks\n  rm -f ${INSTALL}/usr/bin/avahi-publish*\n  rm -f ${INSTALL}/usr/bin/avahi-resolve*\n  rm -f ${INSTALL}/usr/lib/libdns_sd*\n\n  mkdir -p ${INSTALL}/usr/share/services\n    cp -P ${PKG_DIR}/default.d/*.conf ${INSTALL}/usr/share/services\n}\n\npost_install() {\n  add_user avahi x 495 495 \"avahi-daemon\" \"/var/run/avahi-daemon\" \"/bin/sh\"\n  add_group avahi 495\n\n  enable_service avahi-defaults.service\n  enable_service avahi-daemon.service\n}\n"
  },
  {
    "path": "packages/network/avahi/system.d/avahi-daemon.service",
    "content": "[Unit]\nDescription=Avahi Daemon\nAfter=network.target avahi-defaults.service\nRequires=avahi-defaults.service\nConditionPathExists=/storage/.cache/services/avahi.conf\n\n[Service]\nRestart=on-failure\nEnvironmentFile=-/run/libreelec/debug/avahi.conf\nExecStart=/usr/sbin/avahi-daemon -s $AVAHI_DEBUG\nExecReload=/usr/sbin/avahi-daemon -r\nTimeoutStopSec=1s\nRestartSec=2\nStartLimitInterval=60\nStartLimitBurst=10\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/network/avahi/system.d/avahi-defaults.service",
    "content": "[Unit]\nDescription=Avahi defaults\nAfter=local-fs.target\n\nConditionPathExists=!/storage/.cache/services/avahi.conf\nConditionPathExists=!/storage/.cache/services/avahi.disabled\n\n[Service]\nType=oneshot\nExecStart=/bin/sh -c 'cp /usr/share/services/avahi.conf /storage/.cache/services/'\nRemainAfterExit=yes\n"
  },
  {
    "path": "packages/network/bluez/debug.d/bluez.conf",
    "content": "BLUEZ_DEBUG=\"--debug\"\n"
  },
  {
    "path": "packages/network/bluez/debug.d/obexd.conf",
    "content": "OBEXD_DEBUG=\"--debug\"\n"
  },
  {
    "path": "packages/network/bluez/default.d/bluez.conf",
    "content": ""
  },
  {
    "path": "packages/network/bluez/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"bluez\"\nPKG_VERSION=\"5.72\"\nPKG_SHA256=\"499d7fa345a996c1bb650f5c6749e1d929111fa6ece0be0e98687fee6124536e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.bluez.org/\"\nPKG_URL=\"https://www.kernel.org/pub/linux/bluetooth/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain dbus glib readline systemd\"\nPKG_LONGDESC=\"Bluetooth Tools and System Daemons for Linux.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+lto\"\n\nif build_with_debug; then\n  BLUEZ_CONFIG=\"--enable-debug\"\nelse\n  BLUEZ_CONFIG=\"--disable-debug\"\nfi\n\nBLUEZ_CONFIG+=\" --enable-monitor --enable-test\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-dependency-tracking \\\n                           --disable-silent-rules \\\n                           --enable-library \\\n                           --enable-udev \\\n                           --disable-cups \\\n                           --disable-obex \\\n                           --enable-client \\\n                           --enable-systemd \\\n                           --enable-tools \\\n                           --enable-deprecated \\\n                           --enable-datafiles \\\n                           --disable-manpages \\\n                           --disable-experimental \\\n                           --enable-sixaxis \\\n                           --with-gnu-ld \\\n                           ${BLUEZ_CONFIG} \\\n                           storagedir=/storage/.cache/bluetooth\"\n\npre_configure_target() {\n# bluez fails to build in subdirs\n  cd ${PKG_BUILD}\n    rm -rf .${TARGET_NAME}\n\n  export LIBS=\"-lncurses\"\n}\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/lib/systemd\n  safe_remove ${INSTALL}/usr/bin/bluemoon\n  safe_remove ${INSTALL}/usr/bin/ciptool\n\n  mkdir -p ${INSTALL}/etc/bluetooth\n    cp src/main.conf ${INSTALL}/etc/bluetooth\n    sed -i ${INSTALL}/etc/bluetooth/main.conf \\\n        -e \"s|^#\\[Policy\\]|\\[Policy\\]|g\" \\\n        -e \"s|^#AutoEnable.*|AutoEnable=true|g\" \\\n        -e \"s|^#JustWorksRepairing.*|JustWorksRepairing=always|g\"\n    echo \"[General]\" > ${INSTALL}/etc/bluetooth/input.conf\n    echo \"ClassicBondedOnly=false\" >> ${INSTALL}/etc/bluetooth/input.conf\n\n  mkdir -p ${INSTALL}/usr/share/services\n    cp -P ${PKG_DIR}/default.d/*.conf ${INSTALL}/usr/share/services\n\n  # bluez looks in /etc/firmware/\n    ln -sf /usr/lib/firmware ${INSTALL}/etc/firmware\n\n  # pulseaudio checks for bluez via pkgconfig but lib is not actually needed\n    sed -i 's/-lbluetooth//g' ${PKG_BUILD}/lib/bluez.pc\n    cp -P ${PKG_BUILD}/lib/bluez.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n  \n  # copy bluezutils.py  \n    mkdir -p ${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}\n\tcp -rf ${INSTALL}/usr/lib/bluez/test/bluezutils.py ${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}\n\trm -rf ${INSTALL}/usr/lib/bluez/test\n}\n\npost_install() {\n  enable_service bluetooth-defaults.service\n  enable_service bluetooth.service\n  enable_service obex.service\n}\n"
  },
  {
    "path": "packages/network/bluez/patches/bluez-01_add-obexd-policy.patch",
    "content": "diff --git a/src/bluetooth.conf b/src/bluetooth.conf\nindex 8a1e258..31b7542 100644\n--- a/src/bluetooth.conf\n+++ b/src/bluetooth.conf\n@@ -20,10 +20,24 @@\n     <allow send_interface=\"org.freedesktop.DBus.ObjectManager\"/>\n     <allow send_interface=\"org.freedesktop.DBus.Properties\"/>\n     <allow send_interface=\"org.mpris.MediaPlayer2.Player\"/>\n+\n+    <allow own=\"org.bluez.obex\"/>\n+    <allow send_destination=\"org.bluez.obex\"/>\n+    <allow send_interface=\"org.bluez.obex.Agent1\"/>\n+    <allow send_interface=\"org.bluez.obex.Client1\"/>\n+    <allow send_interface=\"org.bluez.obex.Session1\"/>\n+    <allow send_interface=\"org.bluez.obex.Transfer1\"/>\n+    <allow send_interface=\"org.bluez.obex.ObjectPush1\"/>\n+    <allow send_interface=\"org.bluez.obex.FileTransfer1\"/>\n+    <allow send_interface=\"org.bluez.obex.PhonebookAccess1\"/>\n+    <allow send_interface=\"org.bluez.obex.Synchronization1\"/>\n+    <allow send_interface=\"org.bluez.obex.MessageAccess1\"/>\n+    <allow send_interface=\"org.bluez.obex.Message1\"/>\n   </policy>\n \n   <policy context=\"default\">\n     <allow send_destination=\"org.bluez\"/>\n+    <deny send_destination=\"org.bluez.obex\"/>\n   </policy>\n \n </busconfig>\n"
  },
  {
    "path": "packages/network/bluez/patches/bluez-02_obexd-use-system-bus.patch",
    "content": "From 20dfa1079c088236bcd63f1a986956b488177ebf Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Tue, 6 Aug 2013 11:18:09 +0300\nSubject: [PATCH] obexd: use system bus\n\n---\n obexd/src/manager.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/obexd/src/manager.c b/obexd/src/manager.c\nindex dbfbef8..9a29f8c 100644\n--- a/obexd/src/manager.c\n+++ b/obexd/src/manager.c\n@@ -569,7 +569,7 @@ gboolean manager_init(void)\n \n \tdbus_error_init(&err);\n \n-\tconnection = g_dbus_setup_bus(DBUS_BUS_SESSION, OBEXD_SERVICE, &err);\n+\tconnection = g_dbus_setup_bus(DBUS_BUS_SYSTEM, OBEXD_SERVICE, &err);\n \tif (connection == NULL) {\n \t\tif (dbus_error_is_set(&err) == TRUE) {\n \t\t\tfprintf(stderr, \"%s\\n\", err.message);\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/network/bluez/patches/bluez-03_storagedir.patch",
    "content": "diff -Naur bluez-5.7/configure.ac bluez-5.7.patch/configure.ac\n--- bluez-5.7/configure.ac\t2013-06-26 18:17:07.000000000 +0200\n+++ bluez-5.7.patch/configure.ac\t2013-07-12 20:21:17.000000000 +0200\n@@ -238,10 +238,13 @@\n \tprefix=\"${ac_default_prefix}\"\n fi\n \n-if (test \"$localstatedir\" = '${prefix}/var'); then\n-\tstoragedir=\"${prefix}/var/lib/bluetooth\"\n-else\n-\tstoragedir=\"${localstatedir}/lib/bluetooth\"\n+\n+if (test \"x$storagedir\" = 'x'); then\n+\tif (test \"$localstatedir\" = '${prefix}/var'); then\n+\t\tstoragedir=\"${prefix}/var/lib/bluetooth\"\n+\telse\n+\t\tstoragedir=\"${localstatedir}/lib/bluetooth\"\n+\tfi\n fi\n AC_DEFINE_UNQUOTED(STORAGEDIR, \"${storagedir}\",\n \t\t\t[Directory for the storage files])\n"
  },
  {
    "path": "packages/network/bluez/patches/bluez-04_work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch",
    "content": "From aa73bf5039dfd2cf0a52dd6fd22501d955cc1a00 Mon Sep 17 00:00:00 2001\nFrom: Tommy <mesilliac@gmail.com>\nDate: Thu, 10 Jan 2013 09:18:43 +0100\nSubject: [PATCH] work around Logitech diNovo Edge keyboard firmware issue\n\nhttps://bugs.launchpad.net/ubuntu/+source/bluez/+bug/269851\n---\n tools/hid2hci.rules |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/tools/hid2hci.rules b/tools/hid2hci.rules\nindex db6bb03..7db4572 100644\n--- a/tools/hid2hci.rules\n+++ b/tools/hid2hci.rules\n@@ -11,7 +11,10 @@ ATTR{bInterfaceClass}==\"03\", ATTR{bInterfaceSubClass}==\"01\", ATTR{bInterfaceProt\n   RUN+=\"hid2hci --method=dell --devpath=%p\", ENV{HID2HCI_SWITCH}=\"1\"\n \n # Logitech devices\n-KERNEL==\"hiddev*\", ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"c70[345abce]|c71[34bc]\", \\\n+KERNEL==\"hiddev*\", ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"c70[345abce]|c71[3bc]\", \\\n+  RUN+=\"hid2hci --method=logitech-hid --devpath=%p\"\n+# Logitech, Inc. diNovo Edge Keyboard\n+KERNEL==\"hidraw*\", ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"c714\", \\\n   RUN+=\"hid2hci --method=logitech-hid --devpath=%p\"\n \n ENV{DEVTYPE}!=\"usb_device\", GOTO=\"hid2hci_end\"\n-- \n1.8.0.1\n\n"
  },
  {
    "path": "packages/network/bluez/patches/bluez-05-046d-c52b-Logitech-Inc.-Unifying-Receiver.patch",
    "content": "From 50f34d1b65c2fb6c557e2b802e908986e8ec0b74 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Fri, 7 Feb 2014 12:50:29 +0200\nSubject: [PATCH] 046d:c52b Logitech, Inc. Unifying Receiver\n\n---\n tools/hid2hci.rules |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/tools/hid2hci.rules b/tools/hid2hci.rules\nindex 7db4572..1feca6e 100644\n--- a/tools/hid2hci.rules\n+++ b/tools/hid2hci.rules\n@@ -16,6 +16,9 @@ KERNEL==\"hiddev*\", ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"c70[345abce]|c71[\n # Logitech, Inc. diNovo Edge Keyboard\n KERNEL==\"hidraw*\", ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"c714\", \\\n   RUN+=\"hid2hci --method=logitech-hid --devpath=%p\"\n+# Logitech, Inc. Unifying Receiver\n+KERNEL==\"hidraw*\", ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"c52b\", \\\n+  RUN+=\"hid2hci --method=logitech-hid --devpath=%p\"\n \n ENV{DEVTYPE}!=\"usb_device\", GOTO=\"hid2hci_end\"\n \n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/network/bluez/patches/bluez-06-raspberry-pi-mods.patch",
    "content": "Description: Patches for compatibility with on-board Bluetooth on RPi 3\nAuthor: Simon Long <simon@raspberrypi.org>\nLast-Update: 2017-04-05\n\n--- a/tools/hciattach.c\n+++ b/tools/hciattach.c\n@@ -1091,6 +1091,9 @@\n \t{ \"bcm43xx\",    0x0000, 0x0000, HCI_UART_H4,   115200, 3000000,\n \t\t\t\tFLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL  },\n \n+\t{ \"bcm43xx-3wire\",    0x0000, 0x0000, HCI_UART_3WIRE,   115200, 3000000,\n+\t\t\t\t0, DISABLE_PM, NULL, bcm43xx, NULL  },\n+\n \t{ \"ath3k\",    0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200,\n \t\t\tFLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm  },\n \n@@ -1237,7 +1240,7 @@\n {\n \tstruct uart_t *u = NULL;\n \tint detach, printpid, raw, opt, i, n, ld, err;\n-\tint to = 10;\n+\tint to = 30;\n \tint init_speed = 0;\n \tint send_break = 0;\n \tpid_t pid;\n--- a/tools/hciattach.h\n+++ b/tools/hciattach.h\n@@ -44,7 +45,7 @@\n #define HCI_UART_VND_DETECT\t5\n \n #ifndef FIRMWARE_DIR\n-#define FIRMWARE_DIR \"/etc/firmware\"\n+#define FIRMWARE_DIR \"/lib/firmware\"\n #endif\n \n int read_hci_event(int fd, unsigned char *buf, int size);\n--- a/tools/hciattach_bcm43xx.c\n+++ b/tools/hciattach_bcm43xx.c\n@@ -36,6 +36,7 @@\n #include <dirent.h>\n #include <time.h>\n #include <limits.h>\n+#include <sys/stat.h>\n \n #include \"lib/bluetooth.h\"\n #include \"lib/hci.h\"\n@@ -303,9 +304,23 @@\n static int bcm43xx_locate_patch(const char *dir_name,\n \t\tconst char *chip_name, char *location)\n {\n+\tstruct stat statbuf;\n+\tchar path[PATH_MAX];\n \tDIR *dir;\n \tint ret = -1;\n \n+\t/* Try an exact match before scanning, otherwise a board without a specific\n+\t * firmware/link may end up loading a specific firmware for another board\n+\t * just because it is encountered first.\n+\t */\n+\tif (snprintf(path, PATH_MAX, \"%s/%s%s\", dir_name, chip_name, FW_EXT) < 0)\n+\t\treturn -1;\n+\tif ((stat(path, &statbuf) == 0) && S_ISREG(statbuf.st_mode)) {\n+\t\tstrcpy(location, path);\n+\t\treturn 0;\n+\t}\n+\n+\t/* Now search subdirectories and files with suffixes */\n \tdir = opendir(dir_name);\n \tif (!dir) {\n \t\tfprintf(stderr, \"Cannot open directory '%s': %s\\n\",\n@@ -320,8 +335,6 @@\n \t\t\tbreak;\n \n \t\tif (entry->d_type & DT_DIR) {\n-\t\t\tchar path[PATH_MAX];\n-\n \t\t\tif (!strcmp(entry->d_name, \"..\") || !strcmp(entry->d_name, \".\"))\n \t\t\t\tcontinue;\n \n@@ -341,8 +354,10 @@\n \t\t\t\tbreak;\n \n \t\t\t/* found */\n-\t\t\tsnprintf(location, PATH_MAX, \"%s/%s\", dir_name, entry->d_name);\n-\t\t\tret = 0;\n+\t\t\tif (snprintf(location, PATH_MAX, \"%s/%s\", dir_name, entry->d_name) < 0)\n+\t\t\t\tret = -1;\n+\t\t\telse\n+\t\t\t\tret = 0;\n \t\t\tbreak;\n \t\t}\n \t}\n@@ -352,11 +367,32 @@\n \treturn ret;\n }\n \n+static int get_board_type(char *buf, int buf_size)\n+{\n+\tint bytes_read;\n+\tint len;\n+\tint fd;\n+\n+\tfd = open(\"/sys/firmware/devicetree/base/compatible\", O_RDONLY);\n+\tif (fd < 0)\n+\t\treturn -1;\n+\n+\tbytes_read = read(fd, buf, buf_size);\n+\tclose(fd);\n+\tif (bytes_read < 0)\n+\t\treturn -1;\n+\n+\tlen = strnlen(buf, buf_size);\n+\treturn (len < buf_size) ? len : -1;\n+}\n+\n int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,\n \t\tconst char *bdaddr)\n {\n \tchar chip_name[20];\n+\tchar board_specific_name[sizeof(chip_name) + 64];\n \tchar fw_path[PATH_MAX];\n+\tint chip_name_len;\n \n \tprintf(\"bcm43xx_init\\n\");\n \n@@ -366,12 +402,17 @@\n \tif (bcm43xx_read_local_name(fd, chip_name, sizeof(chip_name)))\n \t\treturn -1;\n \n-\tif (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) {\n-\t\tfprintf(stderr, \"Patch not found, continue anyway\\n\");\n+\t/* Grab the board compatible string from Device Tree */\n+\tchip_name_len = strlen(chip_name);\n+\tmemcpy(board_specific_name, chip_name, chip_name_len);\n+\tboard_specific_name[chip_name_len++] = '.';\n+\n+\tif (((get_board_type(board_specific_name + chip_name_len,\n+\t\t\t     sizeof(board_specific_name) - chip_name_len) < 0) ||\n+\t     bcm43xx_locate_patch(FIRMWARE_DIR, board_specific_name, fw_path)) &&\n+\t    bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) {\n+\t\tfprintf(stderr, \"Patch not found for %s, continue anyway\\n\", chip_name);\n \t} else {\n-\t\tif (bcm43xx_set_speed(fd, ti, speed))\n-\t\t\treturn -1;\n-\n \t\tif (bcm43xx_load_firmware(fd, fw_path))\n \t\t\treturn -1;\n \n@@ -381,6 +422,7 @@\n \t\t\treturn -1;\n \t\t}\n \n+\t\tsleep(1);\n \t\tif (bcm43xx_reset(fd))\n \t\t\treturn -1;\n \t}\n"
  },
  {
    "path": "packages/network/bluez/patches/bluez-08-hciattach-retry-device-reset-when-no-response.patch",
    "content": "From 57f7aead147b138109709bbef9d4c674a3a6dc9b Mon Sep 17 00:00:00 2001\nFrom: meijjaa <jjmeijer88@gmail.com>\nDate: Mon, 23 Jan 2017 22:35:33 +0100\nSubject: [PATCH] hciattach: retry device reset when no response\n\nSome bcm chips need a couple of retries to reset. Currently init will just\ntimeout after a failed reset.\n\nSigned-off-by: meijjaa <jjmeijer88@gmail.com>\n---\n tools/hciattach_bcm43xx.c | 15 +++++++++++++--\n 1 file changed, 13 insertions(+), 2 deletions(-)\n\ndiff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c\nindex bb24483..ad89161 100644\n--- a/tools/hciattach_bcm43xx.c\n+++ b/tools/hciattach_bcm43xx.c\n@@ -24,6 +24,7 @@\n #include <time.h>\n #include <limits.h>\n #include <sys/stat.h>\n+#include <signal.h>\n\n #include \"lib/bluetooth.h\"\n #include \"lib/hci.h\"\n@@ -82,21 +83,31 @@ fail:\n \treturn -1;\n }\n\n+int _fd;\n+void expired(int sig)\n+{\n+\tunsigned char cmd[] = { HCI_COMMAND_PKT, 0x03, 0x0C, 0x00 };\n+\twrite(_fd, cmd, sizeof(cmd)) != sizeof(cmd);\n+\talarm(4);\n+}\n+\n static int bcm43xx_reset(int fd)\n {\n \tunsigned char cmd[] = { HCI_COMMAND_PKT, 0x03, 0x0C, 0x00 };\n \tunsigned char resp[CC_MIN_SIZE];\n\n+\t_fd = fd;\n+\tsignal(SIGALRM, expired);\n \tif (write(fd, cmd, sizeof(cmd)) != sizeof(cmd)) {\n \t\tfprintf(stderr, \"Failed to write reset command\\n\");\n \t\treturn -1;\n \t}\n-\n+\talarm(4);\n \tif (read_hci_event(fd, resp, sizeof(resp)) < CC_MIN_SIZE) {\n \t\tfprintf(stderr, \"Failed to reset chip, invalid HCI event\\n\");\n \t\treturn -1;\n \t}\n-\n+\talarm(0);\n \tif (resp[4] != cmd[1] || resp[5] != cmd[2] || resp[6] != CMD_SUCCESS) {\n \t\tfprintf(stderr, \"Failed to reset chip, command failure\\n\");\n \t\treturn -1;\n--\n2.38.1\n"
  },
  {
    "path": "packages/network/bluez/patches/bluez-11_sixaxis-fix-PID-navigation-controller.patch",
    "content": "From ccc0a0cba8a2fdb8cfb148276e7c9413a3e22dc8 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Thu, 19 Sep 2019 22:48:19 +0100\nSubject: [PATCH] sixaxis: Fix PID for Navigation Controller\n\nNewsgroups: gmane.linux.bluez.kernel\nDate: 2015-06-15 18:28:26 GMT (36 weeks, 4 days, 21 hours and 32 minutes ago)\n\nNavigation Controller is using PID 0x042f over USB but PID 0x0268\n(same as Dualshock 3) over BT.\n---\n plugins/sixaxis.c        | 8 +++++++-\n profiles/input/sixaxis.h | 2 ++\n 2 files changed, 9 insertions(+), 1 deletion(-)\n\ndiff --git a/plugins/sixaxis.c b/plugins/sixaxis.c\nindex 939fed7..f6baea7 100644\n--- a/plugins/sixaxis.c\n+++ b/plugins/sixaxis.c\n@@ -364,7 +364,13 @@ static bool setup_device(int fd, const char *sysfs_path,\n \tinfo(\"sixaxis: setting up new device\");\n \n \tbtd_device_device_set_name(device, cp->name);\n-\tbtd_device_set_pnpid(device, cp->source, cp->vid, cp->pid, cp->version);\n+\n+\t/* if device reports different pid/vid on BT prefer those over USB */\n+\tif (cp->bt_pid)\n+\t\tbtd_device_set_pnpid(device, cp->source, cp->vid, cp->bt_pid, cp->version);\n+\telse\n+\t\tbtd_device_set_pnpid(device, cp->source, cp->vid, cp->pid, cp->version);\n+\n \tbtd_device_set_temporary(device, true);\n \n \tclosure = g_new0(struct authentication_closure, 1);\ndiff --git a/profiles/input/sixaxis.h b/profiles/input/sixaxis.h\nindex 8e6f3cc..321a918 100644\n--- a/profiles/input/sixaxis.h\n+++ b/profiles/input/sixaxis.h\n@@ -38,6 +38,7 @@ struct cable_pairing {\n \tuint16_t vid;\n \tuint16_t pid;\n \tuint16_t version;\n+\tuint16_t bt_pid;\n \tCablePairingType type;\n };\n \n@@ -59,6 +60,7 @@ get_pairing(uint16_t vid, uint16_t pid)\n \t\t\t.vid = 0x054c,\n \t\t\t.pid = 0x042f,\n \t\t\t.version = 0x0000,\n+\t\t\t.bt_pid = 0x0268,\n \t\t\t.type = CABLE_PAIRING_SIXAXIS,\n \t\t},\n \t\t{\n-- \n2.7.4\n\n"
  },
  {
    "path": "packages/network/bluez/patches/bluez-12-fix-obexd-after-5_50.patch",
    "content": "diff --git a/Makefile.obexd b/Makefile.obexd\nindex cd3ace4..89f1609 100644\n--- a/Makefile.obexd\n+++ b/Makefile.obexd\n@@ -8,8 +8,6 @@ endif\n \n EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service\n \n-if OBEX\n-\n obex_plugindir = $(libdir)/obex/plugins\n \n obexd_builtin_modules =\n@@ -33,6 +31,8 @@ obexd_builtin_sources += obexd/plugins/opp.c\n obexd_builtin_modules += ftp\n obexd_builtin_sources += obexd/plugins/ftp.c obexd/plugins/ftp.h\n \n+if OBEX\n+\n obexd_builtin_modules += irmc\n obexd_builtin_sources += obexd/plugins/irmc.c\n \n@@ -47,6 +47,8 @@ obexd_builtin_sources += obexd/plugins/mas.c obexd/src/map_ap.h \\\n                                obexd/plugins/messages.h \\\n                                obexd/plugins/messages-dummy.c\n \n+endif\n+\n obexd_builtin_modules += mns\n obexd_builtin_sources += obexd/client/mns.c obexd/src/map_ap.h \\\n                                obexd/client/map-event.h\n@@ -90,8 +92,6 @@ obexd_src_obexd_CFLAGS = $(AM_CFLAGS) @GLIB_CFLAGS@ @DBUS_CFLAGS@ \\\n \n obexd_src_obexd_CPPFLAGS = -I$(builddir)/lib -I$(builddir)/obexd/src\n \n-endif\n-\n obexd_src_obexd_SHORTNAME = obexd\n \n obexd_builtin_files = obexd/src/builtin.h $(obexd_builtin_nodist)\n"
  },
  {
    "path": "packages/network/bluez/patches/bluez-21-hciattach-add-QCA9377-Tuffello-support.patch",
    "content": "From b42a087411199d7f480f1683bddd3206c5fd17b1 Mon Sep 17 00:00:00 2001\nFrom: Gary Bisson <gary.bisson@boundarydevices.com>\nDate: Wed, 17 Aug 2016 11:36:28 +0200\nSubject: [PATCH] hciattach: add QCA9377 Tuffello support\n\nFrom CodeAurora repository:\nhttps://source.codeaurora.org/quic/la/platform/external/bluetooth/bluez/\n\nModifications:\n- code indentation\n- remove verbose traces\n- use H4 protocol instead of IBS\n\nAlso squashed:\nhciattach_rome: simplify baudrate setting\nhciattach_rome: do not override module internal MAC address\nhciattach_rome: force IBS to disabled in NVM\nhciattach_rome: display ROM and TLV info by default\n\nSigned-off-by: Gary Bisson <gary.bisson@boundarydevices.com>\n---\n Makefile.tools         |    1 +\n android/Android.mk     |    1 +\n tools/hciattach.c      |   12 +\n tools/hciattach.h      |    1 +\n tools/hciattach_rome.c | 1872 ++++++++++++++++++++++++++++++++++++++++\n tools/hciattach_rome.h |  388 +++++++++\n 6 files changed, 2275 insertions(+)\n create mode 100644 tools/hciattach_rome.c\n create mode 100644 tools/hciattach_rome.h\n\ndiff --git a/Makefile.tools b/Makefile.tools\nindex b7b422506..e0e995089 100644\n--- a/Makefile.tools\n+++ b/Makefile.tools\n@@ -304,6 +304,7 @@ tools_hciattach_SOURCES = tools/hciattach.c tools/hciattach.h \\\n \t\t\t\t\t\ttools/hciattach_ti.c \\\n \t\t\t\t\t\ttools/hciattach_tialt.c \\\n \t\t\t\t\t\ttools/hciattach_ath3k.c \\\n+\t\t\t\t\t\ttools/hciattach_rome.c \\\n \t\t\t\t\t\ttools/hciattach_qualcomm.c \\\n \t\t\t\t\t\ttools/hciattach_intel.c \\\n \t\t\t\t\t\ttools/hciattach_bcm43xx.c\ndiff --git a/android/Android.mk b/android/Android.mk\nindex 76a826b47..01599c04b 100644\n--- a/android/Android.mk\n+++ b/android/Android.mk\n@@ -696,6 +696,7 @@ LOCAL_SRC_FILES := \\\n \tbluez/tools/hciattach_ti.c \\\n \tbluez/tools/hciattach_tialt.c \\\n \tbluez/tools/hciattach_ath3k.c \\\n+\tbluez/tools/hciattach_rome.c \\\n \tbluez/tools/hciattach_qualcomm.c \\\n \tbluez/tools/hciattach_intel.c \\\n \tbluez/tools/hciattach_bcm43xx.c \\\ndiff --git a/tools/hciattach.c b/tools/hciattach.c\nindex fad176c9b..02a65c692 100644\n--- a/tools/hciattach.c\n+++ b/tools/hciattach.c\n@@ -263,6 +263,11 @@ static int ath3k_pm(int fd, struct uart_t *u, struct termios *ti)\n \treturn ath3k_post(fd, u->pm);\n }\n \n+static int qca(int fd, struct uart_t *u, struct termios *ti)\n+{\n+\treturn qca_soc_init(fd, u->speed, u->bdaddr);\n+}\n+\n static int qualcomm(int fd, struct uart_t *u, struct termios *ti)\n {\n \treturn qualcomm_init(fd, u->speed, ti, u->bdaddr);\n@@ -1093,6 +1098,10 @@ struct uart_t uart[] = {\n \t{ \"ath3k\",    0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200,\n \t\t\tFLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm  },\n \n+\t/* QCA ROME */\n+\t{ \"qca\",    0x0000, 0x0000, HCI_UART_H4, 115200, 115200,\n+\t\t\tFLOW_CTL, DISABLE_PM, NULL, qca, NULL },\n+\n \t/* QUALCOMM BTS */\n \t{ \"qualcomm\",   0x0000, 0x0000, HCI_UART_H4,   115200, 115200,\n \t\t\tFLOW_CTL, DISABLE_PM, NULL, qualcomm, NULL },\n@@ -1145,6 +1154,9 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw)\n \tif (u->flags & AMP_DEV)\n \t\tflags |= 1 << HCI_UART_CREATE_AMP;\n \n+\tif (!strncmp(u->type, \"qca\", 3))\n+\t\tflags |= 1 << HCI_UART_RESET_ON_INIT;\n+\n \tfd = open(dev, O_RDWR | O_NOCTTY);\n \tif (fd < 0) {\n \t\tperror(\"Can't open serial port\");\ndiff --git a/tools/hciattach.h b/tools/hciattach.h\nindex 249aab49e..85c801ccf 100644\n--- a/tools/hciattach.h\n+++ b/tools/hciattach.h\n@@ -65,6 +65,7 @@ int bgb2xx_init(int dd, bdaddr_t *bdaddr);\n int ath3k_init(int fd, int speed, int init_speed, char *bdaddr,\n \t\t\t\t\t\tstruct termios *ti);\n int ath3k_post(int fd, int pm);\n+int qca_soc_init(int fd, int speed, char *bdaddr);\n int qualcomm_init(int fd, int speed, struct termios *ti, const char *bdaddr);\n int intel_init(int fd, int init_speed, int *speed, struct termios *ti);\n int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,\ndiff --git a/tools/hciattach_rome.c b/tools/hciattach_rome.c\nnew file mode 100644\nindex 000000000..9a7f222c4\n--- /dev/null\n+++ b/tools/hciattach_rome.c\n@@ -0,0 +1,1872 @@\n+/*\n+ *\n+ *  Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.\n+ *  Not a Contribution.\n+ *\n+ *  Copyright 2012 The Android Open Source Project\n+ *\n+ *  Licensed under the Apache License, Version 2.0 (the \"License\"); you\n+ *  may not use this file except in compliance with the License. You may\n+ *  obtain a copy of the License at\n+ *\n+ *  http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ *  Unless required by applicable law or agreed to in writing, software\n+ *  distributed under the License is distributed on an \"AS IS\" BASIS,\n+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n+ *  implied. See the License for the specific language governing\n+ *  permissions and limitations under the License.\n+ *\n+ */\n+\n+/******************************************************************************\n+ *\n+ *  Filename:      hciattach_rome.c\n+ *\n+ *  Description:   Contains controller-specific functions, like\n+ *                      firmware patch download\n+ *                      low power mode operations\n+ *\n+ ******************************************************************************/\n+\n+#define MODULE_HAS_MAC_ADDR\n+#define LOG_TAG \"bt_vendor\"\n+#include <stdio.h>\n+#include <unistd.h>\n+#include <sys/socket.h>\n+#include <sys/types.h>\n+#include <sys/stat.h>\n+#include <sys/ioctl.h>\n+#include <signal.h>\n+#include <time.h>\n+#include <errno.h>\n+#include <fcntl.h>\n+#include <dirent.h>\n+#include <ctype.h>\n+#include <stdlib.h>\n+#include <string.h>\n+#include <termios.h>\n+#include <bluetooth/bluetooth.h>\n+#include \"hciattach_rome.h\"\n+#include \"hciattach.h\"\n+\n+/******************************************************************************\n+ **  Variables\n+ ******************************************************************************/\n+FILE *file;\n+unsigned char *phdr_buffer;\n+unsigned char *pdata_buffer = NULL;\n+patch_info rampatch_patch_info;\n+int rome_ver = ROME_VER_UNKNOWN;\n+unsigned char gTlv_type;\n+unsigned char gtlv_dwndcfg;\n+char *rampatch_file_path;\n+char *nvm_file_path;\n+vnd_userial_cb_t vnd_userial;\n+unsigned char wait_vsc_evt = TRUE;\n+\n+/*****************************************************************************\n+ **   Functions\n+ *****************************************************************************/\n+\n+/*******************************************************************************\n+ **\n+ ** Function        userial_to_tcio_baud\n+ **\n+ ** Description     helper function converts USERIAL baud rates into TCIO\n+ **                  conforming baud rates\n+ **\n+ ** Returns         TRUE/FALSE\n+ **\n+ *******************************************************************************/\n+unsigned char userial_to_tcio_baud(unsigned char cfg_baud, unsigned int *baud)\n+{\n+\tif (cfg_baud == USERIAL_BAUD_115200)\n+\t\t*baud = B115200;\n+\telse if (cfg_baud == USERIAL_BAUD_4M)\n+\t\t*baud = B4000000;\n+\telse if (cfg_baud == USERIAL_BAUD_3M)\n+\t\t*baud = B3000000;\n+\telse if (cfg_baud == USERIAL_BAUD_2M)\n+\t\t*baud = B2000000;\n+\telse if (cfg_baud == USERIAL_BAUD_1M)\n+\t\t*baud = B1000000;\n+\telse if (cfg_baud == USERIAL_BAUD_921600)\n+\t\t*baud = B921600;\n+\telse if (cfg_baud == USERIAL_BAUD_460800)\n+\t\t*baud = B460800;\n+\telse if (cfg_baud == USERIAL_BAUD_230400)\n+\t\t*baud = B230400;\n+\telse if (cfg_baud == USERIAL_BAUD_57600)\n+\t\t*baud = B57600;\n+\telse if (cfg_baud == USERIAL_BAUD_19200)\n+\t\t*baud = B19200;\n+\telse if (cfg_baud == USERIAL_BAUD_9600)\n+\t\t*baud = B9600;\n+\telse if (cfg_baud == USERIAL_BAUD_1200)\n+\t\t*baud = B1200;\n+\telse if (cfg_baud == USERIAL_BAUD_600)\n+\t\t*baud = B600;\n+\telse {\n+\t\tfprintf(stderr,  \"userial vendor open: unsupported baud idx %i\\n\", cfg_baud);\n+\t\t*baud = B115200;\n+\t\treturn FALSE;\n+\t}\n+\n+\treturn TRUE;\n+}\n+\n+\n+/*******************************************************************************\n+ **\n+ ** Function        userial_vendor_set_baud\n+ **\n+ ** Description     Set new baud rate\n+ **\n+ ** Returns         None\n+ **\n+ *******************************************************************************/\n+void userial_vendor_set_baud(unsigned char userial_baud)\n+{\n+\tunsigned int tcio_baud;\n+\n+\tif (tcgetattr(vnd_userial.fd, &vnd_userial.termios) < 0) {\n+\t\tperror(\"Can't get port settings\");\n+\t\treturn;\n+\t}\n+\tcfmakeraw(&vnd_userial.termios);\n+\tvnd_userial.termios.c_cflag |= CLOCAL;\n+\tvnd_userial.termios.c_cflag |= CREAD;\n+\tvnd_userial.termios.c_cflag |= CS8;\n+\ttcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios);\n+\n+\tuserial_to_tcio_baud(userial_baud, &tcio_baud);\n+\n+\tcfsetospeed(&vnd_userial.termios, tcio_baud);\n+\tcfsetispeed(&vnd_userial.termios, tcio_baud);\n+\ttcsetattr(vnd_userial.fd, TCSADRAIN, &vnd_userial.termios); /* don't change speed until last write done */\n+\n+}\n+\n+\n+/*******************************************************************************\n+ **\n+ ** Function        userial_vendor_ioctl\n+ **\n+ ** Description     ioctl inteface\n+ **\n+ ** Returns         None\n+ **\n+ *******************************************************************************/\n+int userial_vendor_ioctl(int fd, userial_vendor_ioctl_op_t op, int *p_data)\n+{\n+\tint err = -1;\n+\tstruct termios ti;\n+\n+\tif (tcgetattr(fd, &ti) < 0) {\n+\t\tperror(\"Can't get port settings\");\n+\t\treturn -1;\n+\t}\n+\tcfmakeraw(&ti);\n+\tti.c_cflag |= CLOCAL;\n+\tti.c_cflag |= CREAD;\n+\tti.c_cflag |= CS8;\n+\n+\tswitch(op) {\n+#if (BT_WAKE_VIA_USERIAL_IOCTL==TRUE)\n+\t\tcase USERIAL_OP_ASSERT_BT_WAKE:\n+\t\t\tVNDUSERIALDBG(\"## userial_vendor_ioctl: Asserting BT_Wake ##\");\n+\t\t\terr = ioctl(fd, USERIAL_IOCTL_BT_WAKE_ASSERT, NULL);\n+\t\t\tbreak;\n+\n+\t\tcase USERIAL_OP_DEASSERT_BT_WAKE:\n+\t\t\tVNDUSERIALDBG(\"## userial_vendor_ioctl: De-asserting BT_Wake ##\");\n+\t\t\terr = ioctl(fd, USERIAL_IOCTL_BT_WAKE_DEASSERT, NULL);\n+\t\t\tbreak;\n+\n+\t\tcase USERIAL_OP_GET_BT_WAKE_STATE:\n+\t\t\terr = ioctl(fd, USERIAL_IOCTL_BT_WAKE_GET_ST, p_data);\n+\t\t\tbreak;\n+#endif  //  (BT_WAKE_VIA_USERIAL_IOCTL==TRUE)\n+\t\tcase USERIAL_OP_FLOW_ON:\n+\t\t\tti.c_cflag |= CRTSCTS;\n+\t\t\tif (err = tcsetattr(fd, TCSANOW, &ti) < 0) {\n+\t\t\t\tperror(\"Can't set port settings\");\n+\t\t\t\treturn -1;\n+\t\t\t}\n+\n+\t\t\tbreak;\n+\n+\t\tcase USERIAL_OP_FLOW_OFF:\n+\t\t\tti.c_cflag &= ~CRTSCTS;\n+\t\t\tif (err = tcsetattr(fd, TCSANOW, &ti) < 0) {\n+\t\t\t\tfprintf(stderr, \"Can't set port settings\");\n+\t\t\t\treturn -1;\n+\t\t\t}\n+\t\t\tbreak;\n+\n+\t\tdefault:\n+\t\t\tbreak;\n+\t}\n+\n+\treturn err;\n+}\n+\n+\n+int get_vs_hci_event(unsigned char *rsp)\n+{\n+\tint err = 0, soc_id =0;\n+\tunsigned char paramlen = 0;\n+\n+\tif ( (rsp[EVENTCODE_OFFSET] == VSEVENT_CODE) || (rsp[EVENTCODE_OFFSET] == EVT_CMD_COMPLETE))\n+\t\tPR_DBG(\"%s: Received HCI-Vendor Specific event\\n\", __FUNCTION__);\n+\telse {\n+\t\tfprintf(stderr, \"%s: Failed to receive HCI-Vendor Specific event\\n\", __FUNCTION__);\n+\t\terr = -EIO;\n+\t\tgoto failed;\n+\t}\n+\n+\t/* Check the status of the operation */\n+\tswitch ( rsp[CMD_RSP_OFFSET] ) {\n+\tcase EDL_CMD_REQ_RES_EVT:\n+\t\tswitch(rsp[RSP_TYPE_OFFSET]) {\n+\t\tcase EDL_PATCH_VER_RES_EVT:\n+\t\tcase EDL_APP_VER_RES_EVT:\n+\t\t\tPR_INFO(\"Current Product ID\\t\\t: 0x%08x\\n\",\n+\t\t\t       (unsigned int)(rsp[PATCH_PROD_ID_OFFSET +3] << 24 |\n+\t\t\t\t\t      rsp[PATCH_PROD_ID_OFFSET+2] << 16 |\n+\t\t\t\t\t      rsp[PATCH_PROD_ID_OFFSET+1] << 8 |\n+\t\t\t\t\t      rsp[PATCH_PROD_ID_OFFSET]  ));\n+\n+\t\t\t/* Patch Version indicates FW patch version */\n+\t\t\tPR_INFO(\"Current Patch Version\\t\\t: 0x%04x\\n\",\n+\t\t\t       (unsigned short)(rsp[PATCH_PATCH_VER_OFFSET + 1] << 8 |\n+\t\t\t\t\t\trsp[PATCH_PATCH_VER_OFFSET] ));\n+\n+\t\t\t/* ROM Build Version indicates ROM build version like 1.0/1.1/2.0 */\n+\t\t\trome_ver = (int)(rsp[PATCH_ROM_BUILD_VER_OFFSET + 1] << 8 |\n+\t\t\t\t\t rsp[PATCH_ROM_BUILD_VER_OFFSET]);\n+\t\t\tPR_INFO(\"Current ROM Build Version\\t: 0x%04x\\n\", rome_ver);\n+\n+\t\t\t/* In case rome 1.0/1.1, there is no SOC ID version available */\n+\t\t\tif (paramlen - 10) {\n+\t\t\t\tsoc_id = (unsigned int)(rsp[PATCH_SOC_VER_OFFSET +3] << 24 |\n+\t\t\t\t\t\t\trsp[PATCH_SOC_VER_OFFSET+2] << 16 |\n+\t\t\t\t\t\t\trsp[PATCH_SOC_VER_OFFSET+1] << 8 |\n+\t\t\t\t\t\t\trsp[PATCH_SOC_VER_OFFSET]);\n+\t\t\t\tPR_INFO(\"Current SOC Version\\t\\t: 0x%08x\\n\", soc_id);\n+\t\t\t}\n+\n+\t\t\t/* Rome Chipset Version can be decided by Patch version and SOC version,\n+\t\t\t   Upper 2 bytes will be used for Patch version and Lower 2 bytes will be\n+\t\t\t   used for SOC as combination for BT host driver */\n+\t\t\trome_ver = (rome_ver << 16) | (soc_id & 0x0000ffff);\n+\t\t\tbreak;\n+\t\tcase EDL_TVL_DNLD_RES_EVT:\n+\t\tcase EDL_CMD_EXE_STATUS_EVT:\n+\t\t\tswitch (err = rsp[CMD_STATUS_OFFSET]) {\n+\t\t\tcase HCI_CMD_SUCCESS:\n+\t\t\t\tPR_DBG(\"%s: Download Packet successfully!\\n\", __FUNCTION__);\n+\t\t\t\tbreak;\n+\t\t\tcase PATCH_LEN_ERROR:\n+\t\t\t\tfprintf(stderr, \"%s: Invalid patch length argument passed for EDL PATCH \"\n+\t\t\t\t\t\"SET REQ cmd\\n\", __FUNCTION__);\n+\t\t\t\tbreak;\n+\t\t\tcase PATCH_VER_ERROR:\n+\t\t\t\tfprintf(stderr, \"%s: Invalid patch version argument passed for EDL PATCH \"\n+\t\t\t\t\t\"SET REQ cmd\\n\", __FUNCTION__);\n+\t\t\t\tbreak;\n+\t\t\tcase PATCH_CRC_ERROR:\n+\t\t\t\tfprintf(stderr, \"%s: CRC check of patch failed!!!\\n\", __FUNCTION__);\n+\t\t\t\tbreak;\n+\t\t\tcase PATCH_NOT_FOUND:\n+\t\t\t\tfprintf(stderr, \"%s: Invalid patch data!!!\\n\", __FUNCTION__);\n+\t\t\t\tbreak;\n+\t\t\tcase TLV_TYPE_ERROR:\n+\t\t\t\tfprintf(stderr, \"%s: TLV Type Error !!!\\n\", __FUNCTION__);\n+\t\t\t\tbreak;\n+\t\t\tdefault:\n+\t\t\t\tfprintf(stderr, \"%s: Undefined error (0x%x)\", __FUNCTION__, err);\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tbreak;\n+\t\t}\n+\t\tbreak;\n+\n+\tcase NVM_ACCESS_CODE:\n+\t\tPR_DBG(\"%s: NVM Access Code!!!\\n\", __FUNCTION__);\n+\t\terr = HCI_CMD_SUCCESS;\n+\t\tbreak;\n+\tcase EDL_SET_BAUDRATE_RSP_EVT:\n+\t\t/* Rome 1.1 has bug with the response, so it should ignore it. */\n+\t\tif (rsp[BAUDRATE_RSP_STATUS_OFFSET] != BAUDRATE_CHANGE_SUCCESS) {\n+\t\t\tfprintf(stderr, \"%s: Set Baudrate request failed - 0x%x\\n\", __FUNCTION__,\n+\t\t\t\trsp[CMD_STATUS_OFFSET]);\n+\t\t\terr = -1;\n+\t\t}\n+\t\tbreak;\n+\tdefault:\n+\t\tfprintf(stderr, \"%s: Not a valid status!!!\\n\", __FUNCTION__);\n+\t\terr = -1;\n+\t\tbreak;\n+\t}\n+\n+failed:\n+\treturn err;\n+}\n+\n+\n+int wait_for_data(int fd, int maxTimeOut)\n+{\n+\tfd_set infids;\n+\tstruct timeval timeout;\n+\n+\tif (maxTimeOut <= 0) {\n+\t\tfprintf(stderr, \"%s: Invalid timeout value specified\", __func__);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tFD_ZERO (&infids);\n+\tFD_SET (fd, &infids);\n+\ttimeout.tv_sec = maxTimeOut;\n+\ttimeout.tv_usec = 0;\n+\n+\t/* Check whether data is available in TTY buffer before calling read() */\n+\tif (select (fd + 1, &infids, NULL, NULL, &timeout) < 1) {\n+\t\tfprintf(stderr, \"%s: Timing out on select for %d secs.\\n\", __FUNCTION__, maxTimeOut);\n+\t\treturn -1;\n+\t}\n+\n+\treturn 1;\n+}\n+\n+/*\n+ * Read an VS HCI event from the given file descriptor.\n+ */\n+int read_vs_hci_event(int fd, unsigned char* buf, int size)\n+{\n+\tint remain, r, retry = 0;\n+\tint count = 0;\n+\n+\tif (size <= 0) {\n+\t\tfprintf(stderr, \"Invalid size arguement!\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\t/* Check whether data is available in TTY buffer before calling read() */\n+\tif (wait_for_data(fd, SELECT_TIMEOUT) < 1)\n+\t\treturn -1;\n+\n+\t/* The first byte identifies the packet type. For HCI event packets, it\n+\t * should be 0x04, so we read until we get to the 0x04. */\n+\t/* It will keep reading until find 0x04 byte */\n+\twhile (1) {\n+\t\t/* Read UART Buffer for HCI-DATA */\n+\t\tr = read(fd, buf, 1);\n+\t\tif (r <= 0) {\n+\t\t\tfprintf(stderr, \"%s: read() failed. error: %d\\n\",\n+\t\t\t\t__FUNCTION__, r);\n+\t\t\treturn -1;\n+\t\t}\n+\n+\t\t/* Check if received data is HCI-DATA or not.\n+\t\t * If not HCI-DATA, then retry reading the UART Buffer once.\n+\t\t * Sometimes there could be corruption on the UART lines and to\n+\t\t * avoid that retry once reading the UART Buffer for HCI-DATA.\n+\t\t */\n+\t\tif (buf[0] == 0x04) { /* Recvd. HCI DATA */\n+\t\t\tretry = 0;\n+\t\t\tbreak;\n+\t\t}\n+\t\telse if (retry < MAX_RETRY_CNT) { /* Retry mechanism */\n+\t\t\tretry++;\n+\t\t\tfprintf(stderr, \"%s: Not an HCI-VS-Event! buf[0]: %d\",\n+\t\t\t\t__FUNCTION__, buf[0]);\n+\t\t\tif (wait_for_data(fd, SELECT_TIMEOUT) < 1)\n+\t\t\t\treturn -1;\n+\t\t\telse /* Data available in UART Buffer: Continue to read */\n+\t\t\t\tcontinue;\n+\t\t}\n+\t\telse { /* RETRY failed : Exiting with failure */\n+\t\t\tfprintf(stderr, \"%s: RETRY failed!\", __FUNCTION__);\n+\t\t\treturn -1;\n+\t\t}\n+\t}\n+\tcount++;\n+\n+\t/* The next two bytes are the event code and parameter total length. */\n+\twhile (count < 3) {\n+\t\tr = read(fd, buf + count, 3 - count);\n+\t\tif ((r <= 0) || (buf[1] != 0xFF )) {\n+\t\t\tfprintf(stderr, \"It is not VS event !!\\n\");\n+\t\t\treturn -1;\n+\t\t}\n+\t\tcount += r;\n+\t}\n+\n+\t/* Now we read the parameters. */\n+\tif (buf[2] < (size - 3))\n+\t\tremain = buf[2];\n+\telse\n+\t\tremain = size - 3;\n+\n+\twhile ((count - 3) < remain) {\n+\t\tr = read(fd, buf + count, remain - (count - 3));\n+\t\tif (r <= 0)\n+\t\t\treturn -1;\n+\t\tcount += r;\n+\t}\n+\n+\t/* Check if the set patch command is successful or not */\n+\tif (get_vs_hci_event(buf) != HCI_CMD_SUCCESS)\n+\t\treturn -1;\n+\n+\treturn count;\n+}\n+\n+\n+int hci_send_vs_cmd(int fd, unsigned char *cmd, unsigned char *rsp, int size)\n+{\n+\tint ret = 0;\n+\n+\t/* Send the HCI command packet to UART for transmission */\n+\tret = write(fd, cmd, size);\n+\tif (ret != size) {\n+\t\tfprintf(stderr, \"%s: Send failed with ret value: %d\\n\", __FUNCTION__, ret);\n+\t\tgoto failed;\n+\t}\n+\n+\tif (wait_vsc_evt) {\n+\t\t/* Check for response from the Controller */\n+\t\tif (read_vs_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE) < 0) {\n+\t\t\tret = -ETIMEDOUT;\n+\t\t\tfprintf(stderr, \"%s: Failed to get HCI-VS Event from SOC\\n\", __FUNCTION__);\n+\t\t\tgoto failed;\n+\t\t}\n+\t}\n+\n+failed:\n+\treturn ret;\n+}\n+\n+void frame_hci_cmd_pkt(\n+    unsigned char *cmd,\n+    int edl_cmd, unsigned int p_base_addr,\n+    int segtNo, int size\n+    )\n+{\n+\tint offset = 0;\n+\thci_command_hdr *cmd_hdr;\n+\n+\tmemset(cmd, 0x0, HCI_MAX_CMD_SIZE);\n+\n+\tcmd_hdr = (void *) (cmd + 1);\n+\n+\tcmd[0]      = HCI_COMMAND_PKT;\n+\tcmd_hdr->opcode = cmd_opcode_pack(HCI_VENDOR_CMD_OGF, HCI_PATCH_CMD_OCF);\n+\tcmd_hdr->plen   = size;\n+\tcmd[4]      = edl_cmd;\n+\n+\tswitch (edl_cmd) {\n+\tcase EDL_PATCH_SET_REQ_CMD:\n+\t\t/* Copy the patch header info as CMD params */\n+\t\tmemcpy(&cmd[5], phdr_buffer, PATCH_HDR_LEN);\n+\t\tPR_DBG(\"%s: Sending EDL_PATCH_SET_REQ_CMD\\n\", __FUNCTION__);\n+\t\tPR_DBG(\"HCI-CMD %d:\\t0x%x \\t0x%x \\t0x%x \\t0x%x \\t0x%x\\n\",\n+\t\t\tsegtNo, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]);\n+\t\tbreak;\n+\tcase EDL_PATCH_DLD_REQ_CMD:\n+\t\toffset = ((segtNo - 1) * MAX_DATA_PER_SEGMENT);\n+\t\tp_base_addr += offset;\n+\t\tcmd_hdr->plen   = (size + 6);\n+\t\tcmd[5]  = (size + 4);\n+\t\tcmd[6]  = EXTRACT_BYTE(p_base_addr, 0);\n+\t\tcmd[7]  = EXTRACT_BYTE(p_base_addr, 1);\n+\t\tcmd[8]  = EXTRACT_BYTE(p_base_addr, 2);\n+\t\tcmd[9]  = EXTRACT_BYTE(p_base_addr, 3);\n+\t\tmemcpy(&cmd[10], (pdata_buffer + offset), size);\n+\n+\t\tPR_DBG(\"%s: Sending EDL_PATCH_DLD_REQ_CMD: size: %d bytes\\n\",\n+\t\t\t__FUNCTION__, size);\n+\t\tPR_DBG(\"HCI-CMD %d:\\t0x%x\\t0x%x\\t0x%x\\t0x%x\\t0x%x\\t0x%x\\t0x%x\\t\"\n+\t\t\t\"0x%x\\t0x%x\\t0x%x\\t\\n\", segtNo, cmd[0], cmd[1], cmd[2],\n+\t\t\tcmd[3], cmd[4], cmd[5], cmd[6], cmd[7], cmd[8], cmd[9]);\n+\t\tbreak;\n+\tcase EDL_PATCH_ATCH_REQ_CMD:\n+\t\tPR_DBG(\"%s: Sending EDL_PATCH_ATTACH_REQ_CMD\\n\", __FUNCTION__);\n+\t\tPR_DBG(\"HCI-CMD %d:\\t0x%x \\t0x%x \\t0x%x \\t0x%x \\t0x%x\\n\",\n+\t\t\tsegtNo, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]);\n+\t\tbreak;\n+\tcase EDL_PATCH_RST_REQ_CMD:\n+\t\tPR_DBG(\"%s: Sending EDL_PATCH_RESET_REQ_CMD\\n\", __FUNCTION__);\n+\t\tPR_DBG(\"HCI-CMD %d:\\t0x%x \\t0x%x \\t0x%x \\t0x%x \\t0x%x\\n\",\n+\t\t\tsegtNo, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]);\n+\t\tbreak;\n+\tcase EDL_PATCH_VER_REQ_CMD:\n+\t\tPR_DBG(\"%s: Sending EDL_PATCH_VER_REQ_CMD\\n\", __FUNCTION__);\n+\t\tPR_DBG(\"HCI-CMD %d:\\t0x%x \\t0x%x \\t0x%x \\t0x%x \\t0x%x\\n\",\n+\t\t\tsegtNo, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]);\n+\t\tbreak;\n+\tcase EDL_PATCH_TLV_REQ_CMD:\n+\t\tPR_DBG(\"%s: Sending EDL_PATCH_TLV_REQ_CMD\\n\", __FUNCTION__);\n+\t\t/* Parameter Total Length */\n+\t\tcmd[3] = size +2;\n+\n+\t\t/* TLV Segment Length */\n+\t\tcmd[5] = size;\n+\t\tPR_DBG(\"HCI-CMD %d:\\t0x%x \\t0x%x \\t0x%x \\t0x%x \\t0x%x \\t0x%x\\n\",\n+\t\t\tsegtNo, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4], cmd[5]);\n+\t\toffset = (segtNo * MAX_SIZE_PER_TLV_SEGMENT);\n+\t\tmemcpy(&cmd[6], (pdata_buffer + offset), size);\n+\t\tbreak;\n+\tdefault:\n+\t\tfprintf(stderr, \"%s: Unknown EDL CMD !!!\\n\", __FUNCTION__);\n+\t}\n+}\n+\n+void rome_extract_patch_header_info(unsigned char *buf)\n+{\n+\tint index;\n+\n+\t/* Extract patch id */\n+\tfor (index = 0; index < 4; index++)\n+\t\trampatch_patch_info.patch_id |=\n+\t\t\t(LSH(buf[index + P_ID_OFFSET], (index * 8)));\n+\n+\t/* Extract (ROM and BUILD) version information */\n+\tfor (index = 0; index < 2; index++)\n+\t\trampatch_patch_info.patch_ver.rom_version |=\n+\t\t\t(LSH(buf[index + P_ROME_VER_OFFSET], (index * 8)));\n+\n+\tfor (index = 0; index < 2; index++)\n+\t\trampatch_patch_info.patch_ver.build_version |=\n+\t\t\t(LSH(buf[index + P_BUILD_VER_OFFSET], (index * 8)));\n+\n+\t/* Extract patch base and entry addresses */\n+\tfor (index = 0; index < 4; index++)\n+\t\trampatch_patch_info.patch_base_addr |=\n+\t\t\t(LSH(buf[index + P_BASE_ADDR_OFFSET], (index * 8)));\n+\n+\t/* Patch BASE & ENTRY addresses are same */\n+\trampatch_patch_info.patch_entry_addr = rampatch_patch_info.patch_base_addr;\n+\n+\t/* Extract total length of the patch payload */\n+\tfor (index = 0; index < 4; index++)\n+\t\trampatch_patch_info.patch_length |=\n+\t\t\t(LSH(buf[index + P_LEN_OFFSET], (index * 8)));\n+\n+\t/* Extract the CRC checksum of the patch payload */\n+\tfor (index = 0; index < 4; index++)\n+\t\trampatch_patch_info.patch_crc |=\n+\t\t\t(LSH(buf[index + P_CRC_OFFSET], (index * 8)));\n+\n+\t/* Extract patch control value */\n+\tfor (index = 0; index < 4; index++)\n+\t\trampatch_patch_info.patch_ctrl |=\n+\t\t\t(LSH(buf[index + P_CONTROL_OFFSET], (index * 8)));\n+\n+\tfprintf(stderr, \"PATCH_ID\\t : 0x%x\\n\", rampatch_patch_info.patch_id);\n+\tfprintf(stderr, \"ROM_VERSION\\t : 0x%x\\n\", rampatch_patch_info.patch_ver.rom_version);\n+\tfprintf(stderr, \"BUILD_VERSION\\t : 0x%x\\n\", rampatch_patch_info.patch_ver.build_version);\n+\tfprintf(stderr, \"PATCH_LENGTH\\t : 0x%x\\n\", rampatch_patch_info.patch_length);\n+\tfprintf(stderr, \"PATCH_CRC\\t : 0x%x\\n\", rampatch_patch_info.patch_crc);\n+\tfprintf(stderr, \"PATCH_CONTROL\\t : 0x%x\\n\", rampatch_patch_info.patch_ctrl);\n+\tfprintf(stderr, \"PATCH_BASE_ADDR\\t : 0x%x\\n\", rampatch_patch_info.patch_base_addr);\n+\n+}\n+\n+int rome_edl_set_patch_request(int fd)\n+{\n+\tint size, err;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\n+\t/* Frame the HCI CMD to be sent to the Controller */\n+\tframe_hci_cmd_pkt(cmd, EDL_PATCH_SET_REQ_CMD, 0,\n+\t\t\t  -1, PATCH_HDR_LEN + 1);\n+\n+\t/* Total length of the packet to be sent to the Controller */\n+\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + cmd[PLEN]);\n+\n+\t/* Send HCI Command packet to Controller */\n+\terr = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size);\n+\tif (err != size) {\n+\t\tfprintf(stderr, \"Failed to set the patch info to the Controller!\\n\");\n+\t\tgoto error;\n+\t}\n+\n+\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\tif (err < 0) {\n+\t\tfprintf(stderr, \"%s: Failed to set patch info on Controller\\n\", __FUNCTION__);\n+\t\tgoto error;\n+\t}\n+error:\n+\treturn err;\n+}\n+\n+int rome_edl_patch_download_request(int fd)\n+{\n+\tint no_of_patch_segment;\n+\tint index = 1, err = 0, size = 0;\n+\tunsigned int p_base_addr;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\n+\tno_of_patch_segment = (rampatch_patch_info.patch_length /\n+\t\t\t       MAX_DATA_PER_SEGMENT);\n+\n+\t/* Initialize the patch base address from the one read from bin file */\n+\tp_base_addr = rampatch_patch_info.patch_base_addr;\n+\n+\t/*\n+\t * Depending upon size of the patch payload, download the patches in\n+\t * segments with a max. size of 239 bytes\n+\t */\n+\tfor (index = 1; index <= no_of_patch_segment; index++) {\n+\t\t/* Frame the HCI CMD PKT to be sent to Controller*/\n+\t\tframe_hci_cmd_pkt(cmd, EDL_PATCH_DLD_REQ_CMD, p_base_addr,\n+\t\t\t\t  index, MAX_DATA_PER_SEGMENT);\n+\n+\t\t/* Total length of the packet to be sent to the Controller */\n+\t\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + cmd[PLEN]);\n+\n+\t\t/* Initialize the RSP packet everytime to 0 */\n+\t\tmemset(rsp, 0x0, HCI_MAX_EVENT_SIZE);\n+\n+\t\t/* Send HCI Command packet to Controller */\n+\t\terr = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size);\n+\t\tif (err != size) {\n+\t\t\tfprintf(stderr, \"Failed to send the patch payload to the Controller!\\n\");\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Read Command Complete Event */\n+\t\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: Failed to downlaod patch segment: %d!\\n\",\n+\t\t\t\t__FUNCTION__, index);\n+\t\t\tgoto error;\n+\t\t}\n+\t}\n+\n+\t/* Check if any pending patch data to be sent */\n+\tsize = (rampatch_patch_info.patch_length < MAX_DATA_PER_SEGMENT) ?\n+\t\trampatch_patch_info.patch_length :\n+\t\t(rampatch_patch_info.patch_length  % MAX_DATA_PER_SEGMENT);\n+\n+\tif (size) {\n+\t\t/* Frame the HCI CMD PKT to be sent to Controller*/\n+\t\tframe_hci_cmd_pkt(cmd, EDL_PATCH_DLD_REQ_CMD, p_base_addr, index, size);\n+\n+\t\t/* Initialize the RSP packet everytime to 0 */\n+\t\tmemset(rsp, 0x0, HCI_MAX_EVENT_SIZE);\n+\n+\t\t/* Total length of the packet to be sent to the Controller */\n+\t\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + cmd[PLEN]);\n+\n+\t\t/* Send HCI Command packet to Controller */\n+\t\terr = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size);\n+\t\tif (err != size) {\n+\t\t\tfprintf(stderr, \"Failed to send the patch payload to the Controller!\\n\");\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Read Command Complete Event */\n+\t\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: Failed to downlaod patch segment: %d!\\n\",\n+\t\t\t\t__FUNCTION__, index);\n+\t\t\tgoto error;\n+\t\t}\n+\t}\n+\n+error:\n+\treturn err;\n+}\n+\n+static int rome_download_rampatch(int fd)\n+{\n+\tint c, size, index, ret = -1;\n+\n+\t/* Get handle to the RAMPATCH binary file */\n+\tfprintf(stderr, \"%s: Getting handle to the RAMPATCH binary file from %s\\n\", __FUNCTION__, ROME_FW_PATH);\n+\tfile = fopen(ROME_FW_PATH, \"r\");\n+\tif (file == NULL) {\n+\t\tfprintf(stderr, \"%s: Failed to get handle to the RAMPATCH bin file!\\n\",\n+\t\t\t__FUNCTION__);\n+\t\treturn -ENFILE;\n+\t}\n+\n+\t/* Allocate memory for the patch headder info */\n+\tfprintf(stderr, \"%s: Allocating memory for the patch header\\n\", __FUNCTION__);\n+\tphdr_buffer = (unsigned char *) malloc(PATCH_HDR_LEN + 1);\n+\tif (phdr_buffer == NULL) {\n+\t\tfprintf(stderr, \"%s: Failed to allocate memory for patch header\\n\",\n+\t\t\t__FUNCTION__);\n+\t\tgoto phdr_alloc_failed;\n+\t}\n+\tfor (index = 0; index < PATCH_HDR_LEN + 1; index++)\n+\t\tphdr_buffer[index] = 0x0;\n+\n+\t/* Read 28 bytes of patch header information */\n+\tfprintf(stderr, \"%s: Reading patch header info\\n\", __FUNCTION__);\n+\tindex = 0;\n+\tdo {\n+\t\tc = fgetc (file);\n+\t\tphdr_buffer[index++] = (unsigned char)c;\n+\t} while (index != PATCH_HDR_LEN);\n+\n+\t/* Save the patch header info into local structure */\n+\tfprintf(stderr, \"%s: Saving patch hdr. info\\n\", __FUNCTION__);\n+\trome_extract_patch_header_info((unsigned char *)phdr_buffer);\n+\n+\t/* Set the patch header info onto the Controller */\n+\tret = rome_edl_set_patch_request(fd);\n+\tif (ret < 0) {\n+\t\tfprintf(stderr, \"%s: Error setting the patchheader info!\\n\", __FUNCTION__);\n+\t\tgoto pdata_alloc_failed;\n+\t}\n+\n+\t/* Allocate memory for the patch payload */\n+\tfprintf(stderr, \"%s: Allocating memory for patch payload\\n\", __FUNCTION__);\n+\tsize = rampatch_patch_info.patch_length;\n+\tpdata_buffer = (unsigned char *) malloc(size+1);\n+\tif (pdata_buffer == NULL) {\n+\t\tfprintf(stderr, \"%s: Failed to allocate memory for patch payload\\n\",\n+\t\t\t__FUNCTION__);\n+\t\tgoto pdata_alloc_failed;\n+\t}\n+\tfor (index = 0; index < size+1; index++)\n+\t\tpdata_buffer[index] = 0x0;\n+\n+\t/* Read the patch data from Rampatch binary image */\n+\tfprintf(stderr, \"%s: Reading patch payload from RAMPATCH file\\n\", __FUNCTION__);\n+\tindex = 0;\n+\tdo {\n+\t\tc = fgetc (file);\n+\t\tpdata_buffer[index++] = (unsigned char)c;\n+\t} while (c != EOF);\n+\n+\t/* Downloading patches in segments to controller */\n+\tret = rome_edl_patch_download_request(fd);\n+\tif (ret < 0) {\n+\t\tfprintf(stderr, \"%s: Error downloading patch segments!\\n\", __FUNCTION__);\n+\t\tgoto cleanup;\n+\t}\n+cleanup:\n+\tfree(pdata_buffer);\n+pdata_alloc_failed:\n+\tfree(phdr_buffer);\n+phdr_alloc_failed:\n+\tfclose(file);\n+\n+\treturn ret;\n+}\n+\n+int rome_attach_rampatch(int fd)\n+{\n+\tint size, err;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\n+\t/* Frame the HCI CMD to be sent to the Controller */\n+\tframe_hci_cmd_pkt(cmd, EDL_PATCH_ATCH_REQ_CMD, 0,\n+\t\t\t  -1, EDL_PATCH_CMD_LEN);\n+\n+\t/* Total length of the packet to be sent to the Controller */\n+\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + cmd[PLEN]);\n+\n+\t/* Send HCI Command packet to Controller */\n+\terr = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size);\n+\tif (err != size) {\n+\t\tfprintf(stderr, \"Failed to attach the patch payload to the Controller!\\n\");\n+\t\tgoto error;\n+\t}\n+\n+\t/* Read Command Complete Event */\n+\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\tif (err < 0) {\n+\t\tfprintf(stderr, \"%s: Failed to attach the patch segment(s)\\n\", __FUNCTION__);\n+\t\tgoto error;\n+\t}\n+error:\n+\treturn err;\n+}\n+\n+int rome_rampatch_reset(int fd)\n+{\n+\tint size, err = 0;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tstruct timespec tm = { 0, 100*1000*1000 }; /* 100 ms */\n+\n+\t/* Frame the HCI CMD to be sent to the Controller */\n+\tframe_hci_cmd_pkt(cmd, EDL_PATCH_RST_REQ_CMD, 0,\n+\t\t\t  -1, EDL_PATCH_CMD_LEN);\n+\n+\t/* Total length of the packet to be sent to the Controller */\n+\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + EDL_PATCH_CMD_LEN);\n+\n+\t/* Send HCI Command packet to Controller */\n+\terr = write(fd, cmd, size);\n+\tif (err != size) {\n+\t\tfprintf(stderr, \"%s: Send failed with ret value: %d\\n\", __FUNCTION__, err);\n+\t\tgoto error;\n+\t}\n+\n+\t/*\n+\t * Controller doesn't sends any response for the patch reset\n+\t * command. HOST has to wait for 100ms before proceeding.\n+\t */\n+\tnanosleep(&tm, NULL);\n+\n+error:\n+\treturn err;\n+}\n+\n+int get_value_from_config(char *file_path,char *param)\n+{\n+\tFILE *pfile = NULL;\n+\tchar *line = NULL;\n+\tchar *pch = NULL;\n+\tchar param_str[20];\n+\tint bytes_read = 0, position;\n+\tint ret = -1;\n+\n+\tif (!file_path || !param) {\n+\t\tfprintf(stderr,\"Invalid arguments\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tpfile = fopen(file_path, \"r\" );\n+\tif (!pfile) {\n+\t\tfprintf(stderr, \"Failed to open %s\\n\", file_path);\n+\t\treturn ret;\n+\t}\n+\n+\twhile (getline(&line, &bytes_read, pfile) > 0 ) {\n+\t\tif (line[0] != '#'  && line[0] != '\\n') {\n+\t\t\tpch = memchr(line, '=', strlen(line));\n+\t\t\tif (pch != NULL) {\n+\t\t\t\tposition = pch - line;\n+\t\t\t\tstrncpy(param_str, line, position);\n+\t\t\t\tif (strncmp(param_str, param, position) == 0) {\n+\t\t\t\t\tret = atoi(pch + 1);\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\t}\n+\tfree(line);\n+\tfclose(pfile);\n+\treturn ret;\n+}\n+\n+int read_bd_address(unsigned char *bdaddr)\n+{\n+\tint fd = -1;\n+\tint readPtr = 0;\n+\tunsigned char data[BD_ADDR_LEN];\n+\n+\t/* Open the persist file for reading device address*/\n+\tfd = open(\"/etc/bluetooth/.bt_nv.bin\", O_RDONLY);\n+\tif (fd < 0) {\n+\t\tfprintf(stderr, \"%s: Open failed: Programming default BD ADDR\\n\", __func__);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Read the NVM Header : fp will be advanced by readPtr number of bytes */\n+\treadPtr = read(fd, data, PERSIST_HEADER_LEN);\n+\tif (readPtr > 0)\n+\t\tfprintf(stderr, \"%s: Persist header data: %02x \\t %02x \\t %02x\\n\", __func__,\n+\t\t\tdata[NVITEM], data[RDWR_PROT], data[NVITEM_SIZE]);\n+\telse {\n+\t\tfprintf(stderr, \"%s: Read from persist memory failed : Programming default\"\n+\t\t\t\" BD ADDR\\n\");\n+\t\tclose(fd);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Check for BD ADDR length before programming */\n+\tif (data[NVITEM_SIZE] != BD_ADDR_LEN) {\n+\t\tfprintf(stderr, \"Invalid BD ADDR: Programming default BD ADDR!\\n\");\n+\t\tclose(fd);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Read the BD ADDR info */\n+\treadPtr = read(fd, data, BD_ADDR_LEN);\n+\tif (readPtr > 0)\n+\t\tfprintf(stderr, \"BD-ADDR: ==> %02x:%02x:%02x:%02x:%02x:%02x\\n\", data[0],\n+\t\t\tdata[1], data[2], data[3], data[4], data[5]);\n+\telse {\n+\t\tfprintf(stderr, \"%s: Read from persist memory failed : Programming default\"\n+\t\t\t\" BD ADDR\\n\");\n+\t\tclose(fd);\n+\t\treturn -1;\n+\t}\n+\tmemcpy(bdaddr, data, BD_ADDR_LEN);\n+\tclose(fd);\n+\treturn 0;\n+}\n+\n+int isSpeedValid(int speed, unsigned char *baud_rate)\n+{\n+\tswitch(speed) {\n+\tcase 9600:\n+\t\t*baud_rate = BAUDRATE_9600;\n+\t\tbreak;\n+\tcase 19200:\n+\t\t*baud_rate = BAUDRATE_19200;\n+\t\tbreak;\n+\tcase 57600:\n+\t\t*baud_rate = BAUDRATE_57600;\n+\t\tbreak;\n+\tcase 115200:\n+\t\t*baud_rate = BAUDRATE_115200;\n+\t\tbreak;\n+\tcase 230400:\n+\t\t*baud_rate = BAUDRATE_230400;\n+\t\tbreak;\n+\tcase 460800:\n+\t\t*baud_rate = BAUDRATE_460800;\n+\t\tbreak;\n+\tcase 921600:\n+\t\t*baud_rate = BAUDRATE_921600;\n+\t\tbreak;\n+\tcase 1000000:\n+\t\t*baud_rate = BAUDRATE_1000000;\n+\t\tbreak;\n+\tcase 2000000:\n+\t\t*baud_rate = BAUDRATE_2000000;\n+\t\tbreak;\n+\tcase 3000000:\n+\t\t*baud_rate = BAUDRATE_3000000;\n+\t\tbreak;\n+\tcase 4000000:\n+\t\t*baud_rate = BAUDRATE_4000000;\n+\t\tbreak;\n+\tcase 300:\n+\tcase 600:\n+\tcase 1200:\n+\tcase 2400:\n+\tdefault:\n+\t\tfprintf(stderr, \"Invalid baudrate, default to 115200!\\n\");\n+\t\t*baud_rate = BAUDRATE_115200;\n+\t\tbreak;\n+\t}\n+\treturn -1;\n+}\n+\n+int rome_get_tlv_file(char *file_path, unsigned char baud_rate)\n+{\n+\tFILE * pFile;\n+\tlong fileSize;\n+\tint readSize, nvm_length, nvm_index, i;\n+\tunsigned short nvm_tag_len;\n+\ttlv_patch_info *ptlv_header;\n+\ttlv_nvm_hdr *nvm_ptr;\n+\tunsigned char data_buf[PRINT_BUF_SIZE]={0,};\n+\tunsigned char *nvm_byte_ptr;\n+\tunsigned char bdaddr[6];\n+\tunsigned short pcm_value, ibs_value;\n+\tunsigned short deep_sleep_value;\n+\n+\tpFile = fopen ( file_path , \"r\" );\n+\tif (pFile==NULL) {\n+\t\tfprintf(stderr, \"%s File Open Fail\\n\", file_path);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Get File Size */\n+\tfseek (pFile , 0 , SEEK_END);\n+\n+\tif ((fileSize = ftell(pFile)) < 0) {\n+\t\tfprintf(stderr, \"%s: fail to get current file position\\n\", file_path);\n+\t\tfclose(pFile);\n+\t\treturn -1;\n+\t}\n+\n+\tif (fileSize == 0) {\n+\t\tfprintf(stderr, \"%s: no content in the file\\n\", file_path);\n+\t\tfclose(pFile);\n+\t\treturn -1;\n+\t}\n+\n+\trewind (pFile);\n+\n+\tpdata_buffer = (unsigned char*) malloc (sizeof(char)*fileSize);\n+\tif (pdata_buffer == NULL) {\n+\t\tfprintf(stderr, \"Allocated Memory failed\\n\");\n+\t\tfclose (pFile);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Copy file into allocated buffer */\n+\treadSize = fread (pdata_buffer,1,fileSize,pFile);\n+\n+\t/* File Close */\n+\tfclose (pFile);\n+\n+\tif (readSize != fileSize) {\n+\t\tfprintf(stderr, \"Read file size(%d) not matched with actual file size (%ld bytes)\\n\",readSize,fileSize);\n+\t\treturn -1;\n+\t}\n+\n+\tptlv_header = (tlv_patch_info *) pdata_buffer;\n+\n+\t/* To handle different event between rampatch and NVM */\n+\tgTlv_type = ptlv_header->tlv_type;\n+\tgtlv_dwndcfg = ptlv_header->tlv.patch.dwnd_cfg;\n+\n+\tif (ptlv_header->tlv_type == TLV_TYPE_PATCH) {\n+\t\tPR_INFO(\"====================================================\\n\");\n+\t\tPR_INFO(\"TLV Type               : 0x%x\\n\", ptlv_header->tlv_type);\n+\t\tPR_INFO(\"Length                 : %d bytes\\n\", (ptlv_header->tlv_length1) |\n+\t\t       (ptlv_header->tlv_length2 << 8) |\n+\t\t       (ptlv_header->tlv_length3 << 16));\n+\t\tPR_INFO(\"Total Length           : %d bytes\\n\", ptlv_header->tlv.patch.tlv_data_len);\n+\t\tPR_INFO(\"Patch Data Length      : %d bytes\\n\",ptlv_header->tlv.patch.tlv_patch_data_len);\n+\t\tPR_INFO(\"Signing Format Version : 0x%x\\n\", ptlv_header->tlv.patch.sign_ver);\n+\t\tPR_INFO(\"Signature Algorithm    : 0x%x\\n\", ptlv_header->tlv.patch.sign_algorithm);\n+\t\tPR_INFO(\"Event Handling         : 0x%x\\n\", ptlv_header->tlv.patch.dwnd_cfg);\n+\t\tPR_INFO(\"Reserved               : 0x%x\\n\", ptlv_header->tlv.patch.reserved1);\n+\t\tPR_INFO(\"Product ID             : 0x%04x\\n\", ptlv_header->tlv.patch.prod_id);\n+\t\tPR_INFO(\"Rom Build Version      : 0x%04x\\n\", ptlv_header->tlv.patch.build_ver);\n+\t\tPR_INFO(\"Patch Version          : 0x%04x\\n\", ptlv_header->tlv.patch.patch_ver);\n+\t\tPR_INFO(\"Reserved               : 0x%x\\n\", ptlv_header->tlv.patch.reserved2);\n+\t\tPR_INFO(\"Patch Entry Address    : 0x%x\\n\", (ptlv_header->tlv.patch.patch_entry_addr));\n+\t\tPR_INFO(\"====================================================\\n\");\n+\n+\t} else if (ptlv_header->tlv_type == TLV_TYPE_NVM) {\n+\t\tPR_INFO(\"====================================================\\n\");\n+\t\tPR_INFO(\"TLV Type               : 0x%x\\n\", ptlv_header->tlv_type);\n+\t\tPR_INFO(\"Length                 : %d bytes\\n\",  nvm_length =\n+\t\t\t(ptlv_header->tlv_length1) |\n+\t\t\t(ptlv_header->tlv_length2 << 8) |\n+\t\t\t(ptlv_header->tlv_length3 << 16));\n+\n+\t\tif (nvm_length <= 0)\n+\t\t\treturn readSize;\n+\n+\t\tfor(nvm_byte_ptr=(unsigned char *)(nvm_ptr = &(ptlv_header->tlv.nvm)), nvm_index=0;\n+\t\t    nvm_index < nvm_length ; nvm_ptr = (tlv_nvm_hdr *) nvm_byte_ptr) {\n+\t\t\tPR_DBG(\"TAG ID\\t\\t\\t : %d\\n\", nvm_ptr->tag_id);\n+\t\t\tPR_DBG(\"TAG Length\\t\\t\\t : %d\\n\", nvm_tag_len = nvm_ptr->tag_len);\n+\t\t\tPR_DBG(\"TAG Pointer\\t\\t\\t : %d\\n\", nvm_ptr->tag_ptr);\n+\t\t\tPR_DBG(\"TAG Extended Flag\\t\\t : %d\\n\", nvm_ptr->tag_ex_flag);\n+\n+\t\t\t/* Increase nvm_index to NVM data */\n+\t\t\tnvm_index+=sizeof(tlv_nvm_hdr);\n+\t\t\tnvm_byte_ptr+=sizeof(tlv_nvm_hdr);\n+\n+#ifndef MODULE_HAS_MAC_ADDR\n+\t\t\t/* Write BD Address */\n+\t\t\tif (nvm_ptr->tag_id == TAG_NUM_2 && read_bd_address(bdaddr) == 0) {\n+\t\t\t\tmemcpy(nvm_byte_ptr, bdaddr, 6);\n+\t\t\t\tPR_INFO(\"Overriding default BD ADDR with user\"\n+\t\t\t\t       \" programmed BD Address: %02x:%02x:%02x:%02x:%02x:%02x\\n\",\n+\t\t\t\t       *nvm_byte_ptr, *(nvm_byte_ptr+1), *(nvm_byte_ptr+2),\n+\t\t\t\t       *(nvm_byte_ptr+3), *(nvm_byte_ptr+4), *(nvm_byte_ptr+5));\n+\t\t\t}\n+#else\n+\t\t\t/* Remove it from NVM data */\n+\t\t\tif (nvm_ptr->tag_id == TAG_NUM_2) {\n+\t\t\t\tint nvm_size = nvm_ptr->tag_len + sizeof(tlv_nvm_hdr);\n+\t\t\t\tPR_INFO(\"Skip BD Address from NVM\\n\");\n+\t\t\t\tnvm_index += nvm_ptr->tag_len;\n+\t\t\t\tnvm_byte_ptr += nvm_ptr->tag_len;\n+\t\t\t\tmemmove(nvm_ptr, nvm_byte_ptr, nvm_length - nvm_index);\n+\t\t\t\tnvm_length -= nvm_size;\n+\t\t\t\tnvm_byte_ptr -= nvm_size;\n+\t\t\t\treadSize -= nvm_size;\n+\t\t\t\tnvm_index -= nvm_size;\n+\t\t\t\tcontinue;\n+\t\t\t}\n+#endif\n+\n+\t\t\tif (nvm_ptr->tag_id == TAG_NUM_17) {\n+\t\t\t\tPR_DBG(\"Forcing IBS to be disabled\\n\");\n+\t\t\t\tnvm_byte_ptr[FWCONF_IBS_VAL_OFFSET] &=\n+\t\t\t\t\t(~(FWCONF_IBS_ENABLE << FWCONF_IBS_VAL_BIT));\n+\t\t\t\tif (baud_rate != nvm_byte_ptr[FWCONF_BAUD_VAL_OFFSET]) {\n+\t\t\t\t\tPR_INFO(\"Change Vendor Baud from 0x%02x to 0x%02x\\n\",\n+\t\t\t\t\t       nvm_byte_ptr[FWCONF_BAUD_VAL_OFFSET], baud_rate);\n+\t\t\t\t\tnvm_byte_ptr[FWCONF_BAUD_VAL_OFFSET] = baud_rate;\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\tif (nvm_ptr->tag_id == TAG_NUM_27) {\n+\t\t\t\tif ((deep_sleep_value =\n+\t\t\t\t     get_value_from_config(FW_CONFIG_FILE_PATH, \"DEEP_SLEEP\")) >= 0) {\n+\t\t\t\t\tif (deep_sleep_value == FWCONF_DEEP_SLEEP_DISABLE) {\n+\t\t\t\t\t\tnvm_byte_ptr[FWCONF_DEEP_SLEEP_BYTE_OFFSET] &=\n+\t\t\t\t\t\t\t(~(1 << FWCONF_DEEP_SLEEP_BIT_OFFSET));\n+\t\t\t\t\t} else if (deep_sleep_value == FWCONF_DEEP_SLEEP_ENABLE) {\n+\t\t\t\t\t\tnvm_byte_ptr[FWCONF_DEEP_SLEEP_BYTE_OFFSET] |=\n+\t\t\t\t\t\t\t(1 << FWCONF_DEEP_SLEEP_BIT_OFFSET);\n+\t\t\t\t\t} else {\n+\t\t\t\t\t\tfprintf(stderr, \"Ignoring invalid deep sleep config value\\n\");\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\t/* Read from file and check what PCM Configuration is required:\n+\t\t\t * Master = 0 /Slave = 1 */\n+\t\t\t/* Override PCM configuration */\n+\t\t\tif (nvm_ptr->tag_id == TAG_NUM_44) {\n+\t\t\t\tif ((pcm_value =\n+\t\t\t\t     get_value_from_config(FW_CONFIG_FILE_PATH, \"PCM\")) >= 0) {\n+\n+\t\t\t\t\tif (pcm_value == FWCONF_PCM_SLAVE) {\n+\t\t\t\t\t\tnvm_byte_ptr[FWCONF_PCM_MS_OFFSET_1] |=\n+\t\t\t\t\t\t\t(1 << FWCONF_PCM_ROLE_BIT_OFFSET);\n+\t\t\t\t\t\tnvm_byte_ptr[FWCONF_PCM_MS_OFFSET_2] |=\n+\t\t\t\t\t\t\t(1 << FWCONF_PCM_ROLE_BIT_OFFSET);\n+\t\t\t\t\t} else if (pcm_value == FWCONF_PCM_MASTER) {\n+\t\t\t\t\t\tnvm_byte_ptr[FWCONF_PCM_MS_OFFSET_1] &=\n+\t\t\t\t\t\t\t(~(1 << FWCONF_PCM_ROLE_BIT_OFFSET));\n+\t\t\t\t\t\tnvm_byte_ptr[FWCONF_PCM_MS_OFFSET_2] &=\n+\t\t\t\t\t\t\t(~(1 << FWCONF_PCM_ROLE_BIT_OFFSET));\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\tfor(i =0;(i<nvm_ptr->tag_len && (i*3 + 2) < PRINT_BUF_SIZE);i++)\n+\t\t\t\tsnprintf((char *) data_buf, PRINT_BUF_SIZE, \"%s%.02x \",\n+\t\t\t\t\t (char *)data_buf, *(nvm_byte_ptr + i));\n+\n+\t\t\tPR_DBG(\"TAG Data\\t\\t\\t : %s\\n\", data_buf);\n+\n+\t\t\t/* Clear buffer */\n+\t\t\tmemset(data_buf, 0x0, PRINT_BUF_SIZE);\n+\n+\t\t\t/* increased by tag_len */\n+\t\t\tnvm_index+=nvm_ptr->tag_len;\n+\t\t\tnvm_byte_ptr +=nvm_ptr->tag_len;\n+\t\t}\n+\n+\t\tPR_INFO(\"====================================================\\n\");\n+\n+\t} else {\n+\t\tfprintf(stderr, \"TLV Header type is unknown (%d) \\n\", ptlv_header->tlv_type);\n+\t}\n+\n+\treturn readSize;\n+}\n+\n+int rome_tlv_dnld_segment(int fd, int index, int seg_size, unsigned char wait_cc_evt)\n+{\n+\tint size=0, err = -1;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\n+\t/* Frame the HCI CMD PKT to be sent to Controller*/\n+\tframe_hci_cmd_pkt(cmd, EDL_PATCH_TLV_REQ_CMD, 0, index, seg_size);\n+\n+\t/* Total length of the packet to be sent to the Controller */\n+\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + cmd[PLEN]);\n+\n+\t/* Initialize the RSP packet everytime to 0 */\n+\tmemset(rsp, 0x0, HCI_MAX_EVENT_SIZE);\n+\n+\t/* Send HCI Command packet to Controller */\n+\terr = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size);\n+\tif (err != size) {\n+\t\tfprintf(stderr, \"Failed to send the patch payload to the Controller! 0x%x\\n\", err);\n+\t\treturn err;\n+\t}\n+\n+\tif (wait_cc_evt) {\n+\t\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: Failed to downlaod patch segment: %d!\\n\",  __FUNCTION__, index);\n+\t\t\treturn err;\n+\t\t}\n+\t}\n+\n+\treturn err;\n+}\n+\n+int rome_tlv_dnld_req(int fd, int tlv_size)\n+{\n+\tint  total_segment, remain_size, i, err = -1;\n+\tunsigned char wait_cc_evt = FALSE;\n+\tunsigned int rom = rome_ver >> 16;\n+\n+\ttotal_segment = tlv_size/MAX_SIZE_PER_TLV_SEGMENT;\n+\tremain_size = (tlv_size < MAX_SIZE_PER_TLV_SEGMENT)?\\\n+\t\t      tlv_size: (tlv_size%MAX_SIZE_PER_TLV_SEGMENT);\n+\n+\tif (gTlv_type == TLV_TYPE_PATCH) {\n+\t\t/* Prior to Rome version 3.2(including inital few rampatch release of\n+\t\t * Rome 3.2), the event handling mechanism is ROME_SKIP_EVT_NONE. After\n+\t\t * few release of rampatch for Rome 3.2, the mechamism is changed to\n+\t\t * ROME_SKIP_EVT_VSE_CC. Rest of the mechanism is not used for now\n+\t\t */\n+\t\tswitch (gtlv_dwndcfg)\n+\t\t{\n+\t\t\tcase ROME_SKIP_EVT_NONE:\n+\t\t\t\twait_vsc_evt = TRUE;\n+\t\t\t\twait_cc_evt = TRUE;\n+\t\t\t\tPR_DBG(\"%s: Event handling type: ROME_SKIP_EVT_NONE\", __func__);\n+\t\t\t\tbreak;\n+\t\t\tcase ROME_SKIP_EVT_VSE_CC:\n+\t\t\t\twait_vsc_evt = FALSE;\n+\t\t\t\twait_cc_evt = FALSE;\n+\t\t\t\tPR_DBG(\"%s: Event handling type: ROME_SKIP_EVT_VSE_CC\", __func__);\n+\t\t\t\tbreak;\n+\t\t\t\t/* Not handled for now */\n+\t\t\tcase ROME_SKIP_EVT_VSE:\n+\t\t\tcase ROME_SKIP_EVT_CC:\n+\t\t\tdefault:\n+\t\t\t\tfprintf(stderr, \"%s: Unsupported Event handling: %d\", __func__, gtlv_dwndcfg);\n+\t\t\t\tbreak;\n+\t\t}\n+\t} else {\n+\t\twait_vsc_evt = TRUE;\n+\t\twait_cc_evt = TRUE;\n+\t}\n+\n+\tfor(i = 0; i < total_segment; i++) {\n+\t\tif ((i+1) == total_segment) {\n+\t\t\tif ((rom >= ROME_PATCH_VER_0100) && (rom < ROME_PATCH_VER_0302) &&\n+\t\t\t    (gTlv_type == TLV_TYPE_PATCH)) {\n+\t\t\t\t/* If the Rome version is from 1.1 to 3.1\n+\t\t\t\t * 1. No CCE for the last command segment but all other segment\n+\t\t\t\t * 2. All the command segments get VSE including the last one\n+\t\t\t\t */\n+\t\t\t\twait_cc_evt = !remain_size ? FALSE: TRUE;\n+\t\t\t} else if ((rom == ROME_PATCH_VER_0302) &&\n+\t\t\t\t   (gTlv_type == TLV_TYPE_PATCH)) {\n+\t\t\t\t/* If the Rome version is 3.2\n+\t\t\t\t * 1. None of the command segments receive CCE\n+\t\t\t\t * 2. No command segments receive VSE except the last one\n+\t\t\t\t * 3. If gtlv_dwndcfg is ROME_SKIP_EVT_NONE then the logic is\n+\t\t\t\t *    same as Rome 2.1, 2.2, 3.0\n+\t\t\t\t */\n+\t\t\t\tif (gtlv_dwndcfg == ROME_SKIP_EVT_NONE) {\n+\t\t\t\t\twait_cc_evt = !remain_size ? FALSE: TRUE;\n+\t\t\t\t} else if (gtlv_dwndcfg == ROME_SKIP_EVT_VSE_CC) {\n+\t\t\t\t\twait_vsc_evt = !remain_size ? TRUE: FALSE;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\n+\t\tif ((err = rome_tlv_dnld_segment(fd, i, MAX_SIZE_PER_TLV_SEGMENT, wait_cc_evt )) < 0)\n+\t\t\tgoto error;\n+\t}\n+\n+\tif ((rom >= ROME_PATCH_VER_0100) && (rom < ROME_PATCH_VER_0302) &&\n+\t    (gTlv_type == TLV_TYPE_PATCH)) {\n+\t\t/* If the Rome version is from 1.1 to 3.1\n+\t\t * 1. No CCE for the last command segment but all other segment\n+\t\t * 2. All the command segments get VSE including the last one\n+\t\t */\n+\t\twait_cc_evt = remain_size ? FALSE: TRUE;\n+\t} else if ((rom == ROME_PATCH_VER_0302) && (gTlv_type == TLV_TYPE_PATCH)) {\n+\t\t/* If the Rome version is 3.2\n+\t\t * 1. None of the command segments receive CCE\n+\t\t * 2. No command segments receive VSE except the last one\n+\t\t * 3. If gtlv_dwndcfg is ROME_SKIP_EVT_NONE then the logic is\n+\t\t *    same as Rome 2.1, 2.2, 3.0\n+\t\t */\n+\t\tif (gtlv_dwndcfg == ROME_SKIP_EVT_NONE) {\n+\t\t\twait_cc_evt = remain_size ? FALSE: TRUE;\n+\t\t} else if (gtlv_dwndcfg == ROME_SKIP_EVT_VSE_CC) {\n+\t\t\twait_vsc_evt = remain_size ? TRUE: FALSE;\n+\t\t}\n+\t}\n+\n+\tif (remain_size) err =rome_tlv_dnld_segment(fd, i, remain_size, wait_cc_evt);\n+\n+error:\n+\treturn err;\n+}\n+\n+int rome_download_tlv_file(int fd, unsigned char baud_rate)\n+{\n+\tint tlv_size, err = -1;\n+\n+\t/* Rampatch TLV file Downloading */\n+\tpdata_buffer = NULL;\n+\n+\tif ((tlv_size = rome_get_tlv_file(rampatch_file_path, baud_rate)) < 0)\n+\t\tgoto error;\n+\n+\tif ((err = rome_tlv_dnld_req(fd, tlv_size)) < 0)\n+\t\tgoto error;\n+\n+\tif (pdata_buffer != NULL) {\n+\t\tfree (pdata_buffer);\n+\t\tpdata_buffer = NULL;\n+\t}\n+\n+\t/* NVM TLV file Downloading */\n+\tif ((tlv_size = rome_get_tlv_file(nvm_file_path, baud_rate)) < 0)\n+\t\tgoto error;\n+\n+\tif ((err = rome_tlv_dnld_req(fd, tlv_size)) < 0)\n+\t\tgoto error;\n+\n+error:\n+\tif (pdata_buffer != NULL)\n+\t\tfree (pdata_buffer);\n+\n+\treturn err;\n+}\n+\n+int rome_1_0_nvm_tag_dnld(int fd)\n+{\n+\tint i, size, err = 0;\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\n+#if (NVM_VERSION >= ROME_1_0_100019)\n+\tunsigned char cmds[MAX_TAG_CMD][HCI_MAX_CMD_SIZE] =\n+\t{\n+\t\t/* Tag 2 */ /* BD Address */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     9,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     2,\n+\t\t\t/* Tag Len */      6,\n+\t\t\t/* Tag Value */   0x77,0x78,0x23,0x01,0x56,0x22\n+\t\t},\n+\t\t/* Tag 6 */ /* Bluetooth Support Features */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     11,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     6,\n+\t\t\t/* Tag Len */      8,\n+\t\t\t/* Tag Value */   0xFF,0xFE,0x8B,0xFE,0xD8,0x3F,0x5B,0x8B\n+\t\t},\n+\t\t/* Tag 17 */ /* HCI Transport Layer Setting */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     11,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     17,\n+\t\t\t/* Tag Len */      8,\n+\t\t\t/* Tag Value */   0x82,0x01,0x0E,0x08,0x04,0x32,0x0A,0x00\n+\t\t},\n+\t\t/* Tag 35 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     58,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     35,\n+\t\t\t/* Tag Len */      55,\n+\t\t\t/* Tag Value */   0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x58, 0x59,\n+\t\t\t0x0E, 0x0E, 0x16, 0x16, 0x16, 0x1E, 0x26, 0x5F, 0x2F, 0x5F,\n+\t\t\t0x0E, 0x0E, 0x16, 0x16, 0x16, 0x1E, 0x26, 0x5F, 0x2F, 0x5F,\n+\t\t\t0x0C, 0x18, 0x14, 0x24, 0x40, 0x4C, 0x70, 0x80, 0x80, 0x80,\n+\t\t\t0x0C, 0x18, 0x14, 0x24, 0x40, 0x4C, 0x70, 0x80, 0x80, 0x80,\n+\t\t\t0x1B, 0x14, 0x01, 0x04, 0x48\n+\t\t},\n+\t\t/* Tag 36 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     15,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     36,\n+\t\t\t/* Tag Len */      12,\n+\t\t\t/* Tag Value */   0x0F,0x00,0x03,0x03,0x03,0x03,0x00,0x00,0x03,0x03,0x04,0x00\n+\t\t},\n+\t\t/* Tag 39 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     7,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     39,\n+\t\t\t/* Tag Len */      4,\n+\t\t\t/* Tag Value */   0x12,0x00,0x00,0x00\n+\t\t},\n+\t\t/* Tag 41 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     91,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     41,\n+\t\t\t/* Tag Len */      88,\n+\t\t\t/* Tag Value */   0x15, 0x00, 0x00, 0x00, 0xF6, 0x02, 0x00, 0x00, 0x76, 0x00,\n+\t\t\t0x1E, 0x00, 0x29, 0x02, 0x1F, 0x00, 0x61, 0x00, 0x1A, 0x00,\n+\t\t\t0x76, 0x00, 0x1E, 0x00, 0x7D, 0x00, 0x40, 0x00, 0x91, 0x00,\n+\t\t\t0x06, 0x00, 0x92, 0x00, 0x03, 0x00, 0xA6, 0x01, 0x50, 0x00,\n+\t\t\t0xAA, 0x01, 0x15, 0x00, 0xAB, 0x01, 0x0A, 0x00, 0xAC, 0x01,\n+\t\t\t0x00, 0x00, 0xB0, 0x01, 0xC5, 0x00, 0xB3, 0x01, 0x03, 0x00,\n+\t\t\t0xB4, 0x01, 0x13, 0x00, 0xB5, 0x01, 0x0C, 0x00, 0xC5, 0x01,\n+\t\t\t0x0D, 0x00, 0xC6, 0x01, 0x10, 0x00, 0xCA, 0x01, 0x2B, 0x00,\n+\t\t\t0xCB, 0x01, 0x5F, 0x00, 0xCC, 0x01, 0x48, 0x00\n+\t\t},\n+\t\t/* Tag 42 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     63,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     42,\n+\t\t\t/* Tag Len */      60,\n+\t\t\t/* Tag Value */   0xD7, 0xC0, 0x00, 0x00, 0x8F, 0x5C, 0x02, 0x00, 0x80, 0x47,\n+\t\t\t0x60, 0x0C, 0x70, 0x4C, 0x00, 0x00, 0x00, 0x01, 0x1F, 0x01,\n+\t\t\t0x42, 0x01, 0x69, 0x01, 0x95, 0x01, 0xC7, 0x01, 0xFE, 0x01,\n+\t\t\t0x3D, 0x02, 0x83, 0x02, 0xD1, 0x02, 0x29, 0x03, 0x00, 0x0A,\n+\t\t\t0x10, 0x00, 0x1F, 0x00, 0x3F, 0x00, 0x7F, 0x00, 0xFD, 0x00,\n+\t\t\t0xF9, 0x01, 0xF1, 0x03, 0xDE, 0x07, 0x00, 0x00, 0x9A, 0x01\n+\t\t},\n+\t\t/* Tag 84 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     153,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     84,\n+\t\t\t/* Tag Len */      150,\n+\t\t\t/* Tag Value */   0x7C, 0x6A, 0x59, 0x47, 0x19, 0x36, 0x35, 0x25, 0x25, 0x28,\n+\t\t\t0x2C, 0x2B, 0x2B, 0x28, 0x2C, 0x28, 0x29, 0x28, 0x29, 0x28,\n+\t\t\t0x29, 0x29, 0x2C, 0x29, 0x2C, 0x29, 0x2C, 0x28, 0x29, 0x28,\n+\t\t\t0x29, 0x28, 0x29, 0x2A, 0x00, 0x00, 0x2C, 0x2A, 0x2C, 0x18,\n+\t\t\t0x98, 0x98, 0x98, 0x98, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E,\n+\t\t\t0x1E, 0x13, 0x1E, 0x1E, 0x1E, 0x1E, 0x13, 0x13, 0x11, 0x13,\n+\t\t\t0x1E, 0x1E, 0x13, 0x12, 0x12, 0x12, 0x11, 0x12, 0x1F, 0x12,\n+\t\t\t0x12, 0x12, 0x10, 0x0C, 0x18, 0x0D, 0x01, 0x01, 0x01, 0x01,\n+\t\t\t0x01, 0x01, 0x01, 0x0C, 0x01, 0x01, 0x01, 0x01, 0x0D, 0x0D,\n+\t\t\t0x0E, 0x0D, 0x01, 0x01, 0x0D, 0x0D, 0x0D, 0x0D, 0x0F, 0x0D,\n+\t\t\t0x10, 0x0D, 0x0D, 0x0D, 0x0D, 0x10, 0x05, 0x10, 0x03, 0x00,\n+\t\t\t0x7E, 0x7B, 0x7B, 0x72, 0x71, 0x50, 0x50, 0x50, 0x00, 0x40,\n+\t\t\t0x60, 0x60, 0x30, 0x08, 0x02, 0x0F, 0x00, 0x01, 0x00, 0x00,\n+\t\t\t0x00, 0x00, 0x00, 0x00, 0x08, 0x16, 0x16, 0x08, 0x08, 0x00,\n+\t\t\t0x00, 0x00, 0x1E, 0x34, 0x2B, 0x1B, 0x23, 0x2B, 0x15, 0x0D\n+\t\t},\n+\t\t/* Tag 85 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     119,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     85,\n+\t\t\t/* Tag Len */      116,\n+\t\t\t/* Tag Value */   0x03, 0x00, 0x38, 0x00, 0x45, 0x77, 0x00, 0xE8, 0x00, 0x59,\n+\t\t\t0x01, 0xCA, 0x01, 0x3B, 0x02, 0xAC, 0x02, 0x1D, 0x03, 0x8E,\n+\t\t\t0x03, 0x00, 0x89, 0x01, 0x0E, 0x02, 0x5C, 0x02, 0xD7, 0x02,\n+\t\t\t0xF8, 0x08, 0x01, 0x00, 0x1F, 0x00, 0x0A, 0x02, 0x55, 0x02,\n+\t\t\t0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xD7, 0x00, 0x00,\n+\t\t\t0x00, 0x1E, 0xDE, 0x00, 0x00, 0x00, 0x14, 0x0F, 0x0A, 0x0F,\n+\t\t\t0x0A, 0x0C, 0x0C, 0x0C, 0x0C, 0x04, 0x04, 0x04, 0x0C, 0x0C,\n+\t\t\t0x0C, 0x0C, 0x06, 0x06, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02,\n+\t\t\t0x01, 0x00, 0x02, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00,\n+\t\t\t0x06, 0x0F, 0x14, 0x05, 0x47, 0xCF, 0x77, 0x00, 0x00, 0x00,\n+\t\t\t0x00, 0x00, 0x00, 0xAC, 0x7C, 0xFF, 0x40, 0x00, 0x00, 0x00,\n+\t\t\t0x12, 0x04, 0x04, 0x01, 0x04, 0x03\n+\t\t},\n+\t\t{TAG_END}\n+\t};\n+#elif (NVM_VERSION == ROME_1_0_6002)\n+\tunsigned char cmds[MAX_TAG_CMD][HCI_MAX_CMD_SIZE] =\n+\t{\n+\t\t/* Tag 2 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     9,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     2,\n+\t\t\t/* Tag Len */      6,\n+\t\t\t/* Tag Value */   0x77,0x78,0x23,0x01,0x56,0x22 /* BD Address */\n+\t\t},\n+\t\t/* Tag 6 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     11,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     6,\n+\t\t\t/* Tag Len */      8,\n+\t\t\t/* Tag Value */   0xFF,0xFE,0x8B,0xFE,0xD8,0x3F,0x5B,0x8B\n+\t\t},\n+\t\t/* Tag 17 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     11,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     17,\n+\t\t\t/* Tag Len */      8,\n+\t\t\t/* Tag Value */   0x82,0x01,0x0E,0x08,0x04,0x32,0x0A,0x00\n+\t\t},\n+\t\t/* Tag 36 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     15,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     36,\n+\t\t\t/* Tag Len */      12,\n+\t\t\t/* Tag Value */   0x0F,0x00,0x03,0x03,0x03,0x03,0x00,0x00,0x03,0x03,0x04,0x00\n+\t\t},\n+\n+\t\t/* Tag 39 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     7,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     39,\n+\t\t\t/* Tag Len */      4,\n+\t\t\t/* Tag Value */   0x12,0x00,0x00,0x00\n+\t\t},\n+\n+\t\t/* Tag 41 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     199,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     41,\n+\t\t\t/* Tag Len */      196,\n+\t\t\t/* Tag Value */   0x30,0x00,0x00,0x00,0xD5,0x00,0x0E,0x00,0xD6,0x00,0x0E,0x00,\n+\t\t\t0xD7,0x00,0x16,0x00,0xD8,0x00,0x16,0x00,0xD9,0x00,0x16,0x00,\n+\t\t\t0xDA,0x00,0x1E,0x00,0xDB,0x00,0x26,0x00,0xDC,0x00,0x5F,0x00,\n+\t\t\t0xDD,0x00,0x2F,0x00,0xDE,0x00,0x5F,0x00,0xE0,0x00,0x0E,0x00,\n+\t\t\t0xE1,0x00,0x0E,0x00,0xE2,0x00,0x16,0x00,0xE3,0x00,0x16,0x00,\n+\t\t\t0xE4,0x00,0x16,0x00,0xE5,0x00,0x1E,0x00,0xE6,0x00,0x26,0x00,\n+\t\t\t0xE7,0x00,0x5F,0x00,0xE8,0x00,0x2F,0x00,0xE9,0x00,0x5F,0x00,\n+\t\t\t0xEC,0x00,0x0C,0x00,0xED,0x00,0x08,0x00,0xEE,0x00,0x14,0x00,\n+\t\t\t0xEF,0x00,0x24,0x00,0xF0,0x00,0x40,0x00,0xF1,0x00,0x4C,0x00,\n+\t\t\t0xF2,0x00,0x70,0x00,0xF3,0x00,0x80,0x00,0xF4,0x00,0x80,0x00,\n+\t\t\t0xF5,0x00,0x80,0x00,0xF8,0x00,0x0C,0x00,0xF9,0x00,0x18,0x00,\n+\t\t\t0xFA,0x00,0x14,0x00,0xFB,0x00,0x24,0x00,0xFC,0x00,0x40,0x00,\n+\t\t\t0xFD,0x00,0x4C,0x00,0xFE,0x00,0x70,0x00,0xFF,0x00,0x80,0x00,\n+\t\t\t0x00,0x01,0x80,0x00,0x01,0x01,0x80,0x00,0x04,0x01,0x1B,0x00,\n+\t\t\t0x05,0x01,0x14,0x00,0x06,0x01,0x01,0x00,0x07,0x01,0x04,0x00,\n+\t\t\t0x08,0x01,0x00,0x00,0x09,0x01,0x00,0x00,0x0A,0x01,0x03,0x00,\n+\t\t\t0x0B,0x01,0x03,0x00\n+\t\t},\n+\n+\t\t/* Tag 44 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     44,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     44,\n+\t\t\t/* Tag Len */      41,\n+\t\t\t/* Tag Value */   0x6F,0x0A,0x00,0x00,0x00,0x00,0x00,0x50,0xFF,0x10,0x02,0x02,\n+\t\t\t0x01,0x00,0x14,0x01,0x06,0x28,0xA0,0x62,0x03,0x64,0x01,0x01,\n+\t\t\t0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0xA0,0xFF,0x10,0x02,0x01,\n+\t\t\t0x00,0x14,0x01,0x02,0x03\n+\t\t},\n+\t\t{TAG_END}\n+\t};\n+#endif\n+\n+\tfor (i=0; (i < MAX_TAG_CMD) && (cmds[i][0] != TAG_END); i++) {\n+\t\t/* Write BD Address */\n+\t\tif (cmds[i][TAG_NUM_OFFSET] == TAG_NUM_2){\n+\t\t\tmemcpy(&cmds[i][TAG_BDADDR_OFFSET], vnd_local_bd_addr, 6);\n+\t\t\tfprintf(stderr, \"BD Address: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\\n\",\n+\t\t\t\tcmds[i][TAG_BDADDR_OFFSET ], cmds[i][TAG_BDADDR_OFFSET + 1],\n+\t\t\t\tcmds[i][TAG_BDADDR_OFFSET + 2], cmds[i][TAG_BDADDR_OFFSET + 3],\n+\t\t\t\tcmds[i][TAG_BDADDR_OFFSET + 4], cmds[i][TAG_BDADDR_OFFSET + 5]);\n+\t\t}\n+\t\tsize = cmds[i][3] + HCI_COMMAND_HDR_SIZE + 1;\n+\t\t/* Send HCI Command packet to Controller */\n+\t\terr = hci_send_vs_cmd(fd, (unsigned char *)&cmds[i][0], rsp, size);\n+\t\tif (err != size) {\n+\t\t\tfprintf(stderr, \"Failed to attach the patch payload to the Controller!\\n\");\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Read Command Complete Event - This is extra routine for ROME 1.0. From ROM 2.0, it should be removed. */\n+\t\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: Failed to get patch version(s)\\n\", __FUNCTION__);\n+\t\t\tgoto error;\n+\t\t}\n+\t}\n+\n+error:\n+\treturn err;\n+}\n+\n+\n+\n+int rome_patch_ver_req(int fd)\n+{\n+\tint size, err = 0;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\n+\t/* Frame the HCI CMD to be sent to the Controller */\n+\tframe_hci_cmd_pkt(cmd, EDL_PATCH_VER_REQ_CMD, 0,\n+\t\t\t  -1, EDL_PATCH_CMD_LEN);\n+\n+\t/* Total length of the packet to be sent to the Controller */\n+\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + EDL_PATCH_CMD_LEN);\n+\n+\t/* Send HCI Command packet to Controller */\n+\terr = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size);\n+\tif (err != size) {\n+\t\tfprintf(stderr, \"Failed to attach the patch payload to the Controller!\\n\");\n+\t\tgoto error;\n+\t}\n+\n+\t/* Read Command Complete Event - This is extra routine for ROME 1.0. From ROM 2.0, it should be removed. */\n+\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\tif (err < 0) {\n+\t\tfprintf(stderr, \"%s: Failed to get patch version(s)\\n\", __FUNCTION__);\n+\t\tgoto error;\n+\t}\n+error:\n+\treturn err;\n+\n+}\n+\n+static void flow_control(int fd, int opt)\n+{\n+\tstruct termios c_opt;\n+\n+\tioctl(fd, TIOCMGET, &c_opt);\n+\tc_opt.c_cc[VTIME] = 0; /* inter-character timer unused */\n+\tc_opt.c_cc[VMIN] = 0; /* blocking read until 8 chars received */\n+\tc_opt.c_cflag &= ~CSIZE;\n+\tc_opt.c_cflag |= (CS8 | CLOCAL | CREAD);\n+\tif (opt == MSM_ENABLE_FLOW_CTRL)\n+\t\tc_opt.c_cflag |= CRTSCTS;\n+\telse if (opt == MSM_DISABLE_FLOW_CTRL)\n+\t\tc_opt.c_cflag &= ~CRTSCTS;\n+\telse {\n+\t\tfprintf(stderr, \"%s: Incorrect option passed for TIOCMSET\\n\", __func__);\n+\t\treturn;\n+\t}\n+\tc_opt.c_iflag = IGNPAR;\n+\tc_opt.c_oflag = 0;\n+\tc_opt.c_lflag = 0;\n+\tioctl(fd, TIOCMSET, &c_opt);\n+}\n+\n+\n+int rome_set_baudrate_req(int fd, unsigned char baud_rate)\n+{\n+\tint size, err = 0;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\thci_command_hdr *cmd_hdr;\n+\tint flags;\n+\n+\tmemset(cmd, 0x0, HCI_MAX_CMD_SIZE);\n+\n+\tcmd_hdr = (void *) (cmd + 1);\n+\tcmd[0]  = HCI_COMMAND_PKT;\n+\tcmd_hdr->opcode = cmd_opcode_pack(HCI_VENDOR_CMD_OGF, EDL_SET_BAUDRATE_CMD_OCF);\n+\tcmd_hdr->plen     = VSC_SET_BAUDRATE_REQ_LEN;\n+\tcmd[4]  = baud_rate;\n+\n+\t/* Total length of the packet to be sent to the Controller */\n+\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + VSC_SET_BAUDRATE_REQ_LEN);\n+\n+\t/* Flow off during baudrate change */\n+\tflow_control(fd, MSM_DISABLE_FLOW_CTRL);\n+\n+\t/* Send the HCI command packet to UART for transmission */\n+\terr = write(fd, cmd, size);\n+\tif (err != size) {\n+\t\tfprintf(stderr, \"%s: Send failed with ret value: %d\\n\", __FUNCTION__, err);\n+\t\tgoto error;\n+\t}\n+\t/* Change Local UART baudrate to high speed UART */\n+\tuserial_vendor_set_baud(baud_rate);\n+\n+\t/* Flow on after changing local uart baudrate */\n+\tflow_control(fd, MSM_ENABLE_FLOW_CTRL);\n+\n+\t/* Check for response from the Controller */\n+\tif ((err = read_vs_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE)) < 0) {\n+\t\tfprintf(stderr, \"%s: Failed to get HCI-VS Event from SOC\\n\", __FUNCTION__);\n+\t\tgoto error;\n+\t}\n+\n+\t/* Wait for command complete event */\n+\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\tif (err < 0) {\n+\t\tfprintf(stderr, \"%s: Failed to set patch info on Controller\\n\", __FUNCTION__);\n+\t\tgoto error;\n+\t}\n+error:\n+\treturn err;\n+\n+}\n+\n+\n+int rome_hci_reset_req(int fd, char baud)\n+{\n+\tint size, err = 0;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\thci_command_hdr *cmd_hdr;\n+\tint flags;\n+\n+\tmemset(cmd, 0x0, HCI_MAX_CMD_SIZE);\n+\n+\tcmd_hdr = (void *) (cmd + 1);\n+\tcmd[0]  = HCI_COMMAND_PKT;\n+\tcmd_hdr->opcode = HCI_RESET;\n+\tcmd_hdr->plen   = 0;\n+\n+\t/* Total length of the packet to be sent to the Controller */\n+\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE);\n+\n+\t/* Flow off during baudrate change */\n+\tflow_control(fd, MSM_DISABLE_FLOW_CTRL);\n+\n+\t/* Send the HCI command packet to UART for transmission */\n+\terr = write(fd, cmd, size);\n+\tif (err != size) {\n+\t\tfprintf(stderr, \"%s: Send failed with ret value: %d\\n\", __FUNCTION__, err);\n+\t\tgoto error;\n+\t}\n+\n+\t/* Change Local UART baudrate to high speed UART */\n+\tuserial_vendor_set_baud(baud);\n+\n+\t/* Flow on after changing local uart baudrate */\n+\tflow_control(fd, MSM_ENABLE_FLOW_CTRL);\n+\n+\t/* Wait for command complete event */\n+\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\tif (err < 0) {\n+\t\tfprintf(stderr, \"%s: Failed to set patch info on Controller\\n\", __FUNCTION__);\n+\t\tgoto error;\n+\t}\n+\n+error:\n+\treturn err;\n+\n+}\n+\n+int qca_soc_init(int fd, int speed, char *bdaddr)\n+{\n+\tint err = -1;\n+\tint ret = 0;\n+\tint size;\n+\tunsigned char baud_rate = 0;\n+\n+\tvnd_userial.fd = fd;\n+\n+\t/* Get Rome version information */\n+\tif ((err = rome_patch_ver_req(fd)) < 0) {\n+\t\tfprintf(stderr, \"%s: Fail to get Rome Version (0x%x)\\n\", __FUNCTION__, err);\n+\t\tret = -1;\n+\t\tgoto error;\n+\t}\n+\n+\tfprintf(stderr, \"%s: Rome Version (0x%08x)\\n\", __FUNCTION__, rome_ver);\n+\n+\tswitch (rome_ver){\n+\tcase ROME_VER_1_0:\n+\t\t/* Set and Download the RAMPATCH */\n+\t\tfprintf(stderr, \"%s: Setting Patch Header & Downloading Patches\\n\", __FUNCTION__);\n+\t\terr = rome_download_rampatch(fd);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: DOWNLOAD RAMPATCH failed!\\n\", __FUNCTION__);\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Attach the RAMPATCH */\n+\t\tfprintf(stderr, \"%s: Attaching the patches\\n\", __FUNCTION__);\n+\t\terr = rome_attach_rampatch(fd);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: ATTACH RAMPATCH failed!\\n\", __FUNCTION__);\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Send Reset */\n+\t\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + EDL_PATCH_CMD_LEN);\n+\t\terr = rome_rampatch_reset(fd);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"Failed to RESET after RAMPATCH upgrade!\\n\");\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* NVM download */\n+\t\tfprintf(stderr, \"%s: Downloading NVM\\n\", __FUNCTION__);\n+\t\terr = rome_1_0_nvm_tag_dnld(fd);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"Downloading NVM Failed !!\\n\");\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Change baud rate 115.2 kbps to 3Mbps*/\n+\t\terr = rome_hci_reset_req(fd, baud_rate);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"HCI Reset Failed !!\\n\");\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\t\tbreak;\n+\tcase ROME_VER_1_1:\n+\t\trampatch_file_path = ROME_RAMPATCH_TLV_PATH;\n+\t\tnvm_file_path = ROME_NVM_TLV_PATH;\n+\t\tgoto download;\n+\tcase ROME_VER_1_3:\n+\t\trampatch_file_path = ROME_RAMPATCH_TLV_1_0_3_PATH;\n+\t\tnvm_file_path = ROME_NVM_TLV_1_0_3_PATH;\n+\t\tgoto download;\n+\tcase ROME_VER_2_1:\n+\t\trampatch_file_path = ROME_RAMPATCH_TLV_2_0_1_PATH;\n+\t\tnvm_file_path = ROME_NVM_TLV_2_0_1_PATH;\n+\t\tgoto download;\n+\tcase ROME_VER_3_0:\n+\t\trampatch_file_path = ROME_RAMPATCH_TLV_3_0_0_PATH;\n+\t\tnvm_file_path = ROME_NVM_TLV_3_0_0_PATH;\n+\t\tgoto download;\n+\tcase ROME_VER_3_2:\n+\t\trampatch_file_path = ROME_RAMPATCH_TLV_3_0_2_PATH;\n+\t\tnvm_file_path = ROME_NVM_TLV_3_0_2_PATH;\n+\t\tgoto download;\n+\tcase TUFELLO_VER_1_0:\n+\t\trampatch_file_path = TF_RAMPATCH_TLV_1_0_0_PATH;\n+\t\tnvm_file_path = TF_NVM_TLV_1_0_0_PATH;\n+\t\tgoto download;\n+\tcase TUFELLO_VER_1_1:\n+\t\trampatch_file_path = TF_RAMPATCH_TLV_1_0_1_PATH;\n+\t\tnvm_file_path = TF_NVM_TLV_1_0_1_PATH;\n+download:\n+\t\tisSpeedValid(speed, &baud_rate);\n+\t\tif (baud_rate < 0) {\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Donwload TLV files (rampatch, NVM) */\n+\t\terr = rome_download_tlv_file(fd, baud_rate);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: Download TLV file failed!\\n\", __FUNCTION__);\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/*\n+\t\t * Overriding the baud rate value in NVM file with the user\n+\t\t * requested baud rate, since default baud rate in NVM file is 3M.\n+\t\t */\n+\t\terr = rome_set_baudrate_req(fd, baud_rate);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: Baud rate change failed!\\n\", __FUNCTION__);\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Perform HCI reset here*/\n+\t\terr = rome_hci_reset_req(fd, baud_rate);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"HCI Reset Failed !!!\\n\");\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\tbreak;\n+\tcase ROME_VER_UNKNOWN:\n+\tdefault:\n+\t\tfprintf(stderr, \"%s: Detected unknown ROME version\\n\", __FUNCTION__);\n+\t\tret = -1;\n+\t\tbreak;\n+\t}\n+\n+error:\n+\treturn ret;\n+}\ndiff --git a/tools/hciattach_rome.h b/tools/hciattach_rome.h\nnew file mode 100644\nindex 000000000..597743e0b\n--- /dev/null\n+++ b/tools/hciattach_rome.h\n@@ -0,0 +1,388 @@\n+/*\n+ * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.\n+ * Not a Contribution.\n+ * Copyright 2012 The Android Open Source Project\n+ *\n+ *  Licensed under the Apache License, Version 2.0 (the \"License\");\n+ *  you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *  http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ *  Unless required by applicable law or agreed to in writing, software\n+ *  distributed under the License is distributed on an \"AS IS\" BASIS,\n+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ *  See the License for the specific language governing permissions and\n+ *  limitations under the License.\n+ */\n+#ifndef HW_ROME_H\n+#define HW_ROME_H\n+\n+/******************************************************************************\n+**  Constants & Macros\n+******************************************************************************/\n+#define HCI_MAX_CMD_SIZE       260\n+#define HCI_MAX_EVENT_SIZE     260\n+#define PRINT_BUF_SIZE         ((HCI_MAX_CMD_SIZE * 3) + 2)\n+/* HCI Command/Event Opcode */\n+#define HCI_RESET              0x0C03\n+#define EVT_CMD_COMPLETE       0x0E\n+/* HCI Packet types */\n+#define HCI_COMMAND_PKT        0x01\n+#define HCI_ACLDATA_PKT        0x02\n+#define HCI_SCODATA_PKT        0x03\n+#define HCI_EVENT_PKT          0x04\n+#define HCI_VENDOR_PKT         0xff\n+#define cmd_opcode_pack(ogf, ocf) (unsigned short)((ocf & 0x03ff)|(ogf << 10))\n+\n+#define NVITEM                 0\n+#define RDWR_PROT              1\n+#define NVITEM_SIZE            2\n+#define PERSIST_HEADER_LEN     3\n+#define BD_ADDR_LEN            6\n+#define MSM_DISABLE_FLOW_CTRL  0\n+#define MSM_ENABLE_FLOW_CTRL   1\n+\n+#ifdef _PLATFORM_MDM_\n+#define USERIAL_OP_CLK_ON      0x5441\n+#define USERIAL_OP_CLK_OFF     0x5442\n+#endif\n+\n+#define PR_INFO(fmt, arg...) printf(fmt, ## arg)\n+#ifdef DEBUG\n+    #define PR_DBG(fmt, arg...) printf(fmt, ## arg)\n+#else\n+    #define PR_DBG(fmt, arg...)\n+#endif\n+\n+unsigned char vnd_local_bd_addr[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};\n+typedef enum {\n+    USERIAL_OP_FLOW_ON,\n+    USERIAL_OP_FLOW_OFF,\n+    USERIAL_OP_NOP,\n+} userial_vendor_ioctl_op_t;\n+\n+\n+/* vendor serial control block */\n+typedef struct\n+{\n+    int fd;                     /* fd to Bluetooth device */\n+    struct termios termios;     /* serial terminal of BT port */\n+    char port_name[256];\n+} vnd_userial_cb_t;\n+\n+/**** baud rates ****/\n+#define USERIAL_BAUD_300        0\n+#define USERIAL_BAUD_600        1\n+#define USERIAL_BAUD_1200       2\n+#define USERIAL_BAUD_2400       3\n+#define USERIAL_BAUD_9600       4\n+#define USERIAL_BAUD_19200      5\n+#define USERIAL_BAUD_57600      6\n+#define USERIAL_BAUD_115200     7\n+#define USERIAL_BAUD_230400     8\n+#define USERIAL_BAUD_460800     9\n+#define USERIAL_BAUD_921600     10\n+#define USERIAL_BAUD_1M         11\n+#define USERIAL_BAUD_1_5M       12\n+#define USERIAL_BAUD_2M         13\n+#define USERIAL_BAUD_3M         14\n+#define USERIAL_BAUD_4M         15\n+#define USERIAL_BAUD_AUTO       16\n+\n+#ifndef FALSE\n+#define FALSE  0\n+#endif\n+\n+#ifndef TRUE\n+#define TRUE   (!FALSE)\n+#endif\n+\n+#define HCI_CHG_BAUD_CMD_OCF        0x0C\n+#define HCI_VENDOR_CMD_OGF          0x3F\n+#define WRITE_BDADDR_CMD_LEN        14\n+#define WRITE_BAUD_CMD_LEN          6\n+#define MAX_CMD_LEN                 WRITE_BDADDR_CMD_LEN\n+#define GET_VERSION_OCF             0x1E\n+\n+#define PS_HDR_LEN                  4\n+#define HCI_VENDOR_CMD_OGF          0x3F\n+#define HCI_PS_CMD_OCF              0x0B\n+\n+#define HCI_COMMAND_HDR_SIZE        3\n+#define EVT_CMD_COMPLETE_SIZE       3\n+#define EVT_CMD_STATUS              0x0F\n+#define EVT_CMD_STATUS_SIZE         4\n+#define HCI_EVENT_HDR_SIZE          2\n+#define HCI_EV_SUCCESS              0x00\n+/* HCI Socket options */\n+#define HCI_DATA_DIR                1\n+#define HCI_FILTER                  2\n+#define HCI_TIME_STAMP              3\n+\n+#define P_ID_OFFSET                 (0)\n+#define HCI_CMD_IND                 (1)\n+#define EVENTCODE_OFFSET            (1)\n+#define EVT_PLEN                    (2)\n+#define PLEN                        (3)\n+#define CMD_RSP_OFFSET              (3)\n+#define RSP_TYPE_OFFSET             (4)\n+#define BAUDRATE_RSP_STATUS_OFFSET  (4)\n+#define CMD_STATUS_OFFSET           (5)\n+#define P_ROME_VER_OFFSET           (4)\n+#define P_BUILD_VER_OFFSET          (6)\n+#define P_BASE_ADDR_OFFSET          (8)\n+#define P_ENTRY_ADDR_OFFSET         (12)\n+#define P_LEN_OFFSET                (16)\n+#define P_CRC_OFFSET                (20)\n+#define P_CONTROL_OFFSET            (24)\n+#define PATCH_HDR_LEN               (28)\n+#define MAX_DATA_PER_SEGMENT        (239)\n+#define VSEVENT_CODE                (0xFF)\n+#define HC_VS_MAX_CMD_EVENT         (0xFF)\n+#define PATCH_PROD_ID_OFFSET        (5)\n+#define PATCH_PATCH_VER_OFFSET      (9)\n+#define PATCH_ROM_BUILD_VER_OFFSET  (11)\n+#define PATCH_SOC_VER_OFFSET        (13)\n+#define MAX_SIZE_PER_TLV_SEGMENT    (243)\n+\n+/* VS Opcode */\n+#define HCI_PATCH_CMD_OCF           (0)\n+#define EDL_SET_BAUDRATE_CMD_OCF    (0x48)\n+\n+/* VS Commands */\n+#define VSC_SET_BAUDRATE_REQ_LEN    (1)\n+#define EDL_PATCH_CMD_LEN           (1)\n+#define EDL_PATCH_CMD_REQ_LEN       (1)\n+#define EDL_PATCH_DLD_REQ_CMD       (0x01)\n+#define EDL_PATCH_RST_REQ_CMD       (0x05)\n+#define EDL_PATCH_SET_REQ_CMD       (0x16)\n+#define EDL_PATCH_ATCH_REQ_CMD      (0x17)\n+#define EDL_PATCH_VER_REQ_CMD       (0x19)\n+#define EDL_PATCH_TLV_REQ_CMD       (0x1E)\n+#define VSC_DISABLE_IBS_LEN         (0x04)\n+\n+/* VS Event */\n+#define EDL_CMD_REQ_RES_EVT         (0x00)\n+#define EDL_CMD_EXE_STATUS_EVT      (0x00)\n+#define EDL_SET_BAUDRATE_RSP_EVT    (0x92)\n+#define EDL_PATCH_VER_RES_EVT       (0x19)\n+#define EDL_TVL_DNLD_RES_EVT        (0x04)\n+#define EDL_APP_VER_RES_EVT         (0x02)\n+\n+/* Status Codes of HCI CMD execution*/\n+#define HCI_CMD_SUCCESS             (0x0)\n+#define PATCH_LEN_ERROR             (0x1)\n+#define PATCH_VER_ERROR             (0x2)\n+#define PATCH_CRC_ERROR             (0x3)\n+#define PATCH_NOT_FOUND             (0x4)\n+#define TLV_TYPE_ERROR              (0x10)\n+#define NVM_ACCESS_CODE             (0x0B)\n+#define BAUDRATE_CHANGE_SUCCESS     (1)\n+\n+/* TLV_TYPE */\n+#define TLV_TYPE_PATCH              (1)\n+#define TLV_TYPE_NVM                (2)\n+\n+/* NVM */\n+#define MAX_TAG_CMD                 30\n+#define TAG_END                     0xFF\n+#define NVM_ACCESS_SET              0x01\n+#define TAG_NUM_OFFSET              5\n+#define TAG_NUM_2                   2\n+#define TAG_NUM_17                  (17)\n+#define TAG_NUM_27                  27\n+#define TAG_NUM_44                  44\n+#define TAG_BDADDR_OFFSET           7\n+\n+/* FW PCM Configuration */\n+#define FWCONF_PCM_MS_OFFSET_1      9\n+#define FWCONF_PCM_MS_OFFSET_2      33\n+#define FWCONF_PCM_SLAVE            1\n+#define FWCONF_PCM_MASTER           0\n+#define FWCONF_PCM_ROLE_BIT_OFFSET  4\n+\n+/* FW HCI Transport Layer Configuration */\n+#define FWCONF_IBS_DISABLE          (0)\n+#define FWCONF_IBS_ENABLE           (1)\n+#define FWCONF_IBS_VAL_BIT          (7)\n+#define FWCONF_IBS_VAL_OFFSET       (0)\n+#define FWCONF_BAUD_VAL_OFFSET      (2)\n+\n+/* FW DEEP SLEEP Configuration */\n+#define FWCONF_DEEP_SLEEP_DISABLE       0\n+#define FWCONF_DEEP_SLEEP_ENABLE        1\n+#define FWCONF_DEEP_SLEEP_BYTE_OFFSET   0\n+#define FWCONF_DEEP_SLEEP_BIT_OFFSET    0\n+\n+#define MAX_RETRY_CNT  1\n+#define SELECT_TIMEOUT 3\n+\n+/* NVM Tags specifically used for ROME 1.0 */\n+#define ROME_1_0_100022_1       0x101000221\n+#define ROME_1_0_100019         0x101000190\n+#define ROME_1_0_6002           0x100600200\n+\n+/* Default NVM Version setting for ROME 1.0 */\n+#define NVM_VERSION                  ROME_1_0_100022_1\n+\n+\n+#define LSH(val, n)     ((unsigned int)(val) << (n))\n+#define EXTRACT_BYTE(val, pos)      (char) (((val) >> (8 * (pos))) & 0xFF)\n+#define CALC_SEG_SIZE(len, max)   ((plen) % (max))?((plen/max)+1) : ((plen) / (max))\n+\n+#define ROME_FW_PATH                    \"/lib/firmware/rampatch.img\"\n+#define ROME_RAMPATCH_TLV_PATH          \"/lib/firmware/rampatch_tlv.img\"\n+#define ROME_NVM_TLV_PATH               \"/lib/firmware/nvm_tlv.bin\"\n+#define ROME_RAMPATCH_TLV_1_0_3_PATH    \"/lib/firmware/rampatch_tlv_1.3.tlv\"\n+#define ROME_NVM_TLV_1_0_3_PATH         \"/lib/firmware/nvm_tlv_1.3.bin\"\n+#define ROME_RAMPATCH_TLV_2_0_1_PATH    \"/lib/firmware/rampatch_tlv_2.1.tlv\"\n+#define ROME_NVM_TLV_2_0_1_PATH         \"/lib/firmware/nvm_tlv_2.1.bin\"\n+#define ROME_RAMPATCH_TLV_3_0_0_PATH    \"/lib/firmware/rampatch_tlv_3.0.tlv\"\n+#define ROME_NVM_TLV_3_0_0_PATH         \"/lib/firmware/nvm_tlv_3.0.bin\"\n+#define ROME_RAMPATCH_TLV_3_0_2_PATH    \"/lib/firmware/btfw32.tlv\"\n+#define ROME_NVM_TLV_3_0_2_PATH         \"/lib/firmware/btnv32.bin\"\n+#ifdef _PLATFORM_MDM_\n+#define TF_RAMPATCH_TLV_1_0_0_PATH      \"/lib/firmware/rampatch_tlv_tf_1.0.tlv\"\n+#define TF_NVM_TLV_1_0_0_PATH           \"/lib/firmware/nvm_tlv_tf_1.0.bin\"\n+#define TF_RAMPATCH_TLV_1_0_1_PATH      \"/lib/firmware/tfbtfw11.tlv\"\n+#define TF_NVM_TLV_1_0_1_PATH           \"/lib/firmware/tfbtnv11.bin\"\n+#else\n+#define TF_RAMPATCH_TLV_1_0_0_PATH      \"/lib/firmware/qca/rampatch_tlv_tf_1.0.tlv\"\n+#define TF_NVM_TLV_1_0_0_PATH           \"/lib/firmware/qca/nvm_tlv_tf_1.0.bin\"\n+#define TF_RAMPATCH_TLV_1_0_1_PATH      \"/lib/firmware/qca/tfbtfw11.tlv\"\n+#define TF_NVM_TLV_1_0_1_PATH           \"/lib/firmware/qca/tfbtnv11.bin\"\n+#endif\n+\n+/* This header value in rampatch file decides event handling mechanism in the HOST */\n+#define ROME_SKIP_EVT_NONE     0x00\n+#define ROME_SKIP_EVT_VSE      0x01\n+#define ROME_SKIP_EVT_CC       0x02\n+#define ROME_SKIP_EVT_VSE_CC   0x03\n+\n+#define FW_CONFIG_FILE_PATH        \"/etc/bluetooth/firmware.conf\"\n+/******************************************************************************\n+**  Local type definitions\n+******************************************************************************/\n+\n+typedef struct {\n+    unsigned char     ncmd;\n+    unsigned short    opcode;\n+} __attribute__ ((packed)) evt_cmd_complete;\n+\n+typedef struct {\n+    unsigned char     status;\n+    unsigned char     ncmd;\n+    unsigned short    opcode;\n+} __attribute__ ((packed)) evt_cmd_status;\n+\n+typedef struct {\n+    unsigned short    opcode;\n+    unsigned char     plen;\n+} __attribute__ ((packed))  hci_command_hdr;\n+\n+typedef struct {\n+    unsigned char     evt;\n+    unsigned char     plen;\n+} __attribute__ ((packed))  hci_event_hdr;\n+typedef struct {\n+    unsigned short rom_version;\n+    unsigned short build_version;\n+} __attribute__ ((packed)) patch_version;\n+\n+typedef struct {\n+    unsigned int patch_id;\n+    patch_version patch_ver;\n+    unsigned int patch_base_addr;\n+    unsigned int patch_entry_addr;\n+    unsigned short patch_length;\n+    int patch_crc;\n+    unsigned short patch_ctrl;\n+} __attribute__ ((packed)) patch_info;\n+\n+typedef struct {\n+    unsigned int  tlv_data_len;\n+    unsigned int  tlv_patch_data_len;\n+    unsigned char sign_ver;\n+    unsigned char sign_algorithm;\n+    unsigned char dwnd_cfg;\n+    unsigned char reserved1;\n+    unsigned short prod_id;\n+    unsigned short build_ver;\n+    unsigned short patch_ver;\n+    unsigned short reserved2;\n+    unsigned int patch_entry_addr;\n+} __attribute__ ((packed)) tlv_patch_hdr;\n+\n+typedef struct {\n+    unsigned short tag_id;\n+    unsigned short tag_len;\n+    unsigned int tag_ptr;\n+    unsigned int tag_ex_flag;\n+} __attribute__ ((packed)) tlv_nvm_hdr;\n+\n+typedef struct {\n+    unsigned char tlv_type;\n+    unsigned char tlv_length1;\n+    unsigned char tlv_length2;\n+    unsigned char tlv_length3;\n+\n+    union{\n+        tlv_patch_hdr patch;\n+        tlv_nvm_hdr nvm;\n+    }tlv;\n+} __attribute__ ((packed)) tlv_patch_info;\n+\n+enum{\n+    BAUDRATE_115200    = 0x00,\n+    BAUDRATE_57600     = 0x01,\n+    BAUDRATE_38400     = 0x02,\n+    BAUDRATE_19200     = 0x03,\n+    BAUDRATE_9600      = 0x04,\n+    BAUDRATE_230400    = 0x05,\n+    BAUDRATE_250000    = 0x06,\n+    BAUDRATE_460800    = 0x07,\n+    BAUDRATE_500000    = 0x08,\n+    BAUDRATE_720000    = 0x09,\n+    BAUDRATE_921600    = 0x0A,\n+    BAUDRATE_1000000   = 0x0B,\n+    BAUDRATE_1250000   = 0x0C,\n+    BAUDRATE_2000000   = 0x0D,\n+    BAUDRATE_3000000   = 0x0E,\n+    BAUDRATE_4000000   = 0x0F,\n+    BAUDRATE_1600000   = 0x10,\n+    BAUDRATE_3200000   = 0x11,\n+    BAUDRATE_3500000   = 0x12,\n+    BAUDRATE_AUTO      = 0xFE,\n+    BAUDRATE_Reserved  = 0xFF\n+};\n+\n+enum{\n+    ROME_PATCH_VER_0100 = 0x0100,\n+    ROME_PATCH_VER_0101 = 0x0101,\n+    ROME_PATCH_VER_0200 = 0x0200,\n+    ROME_PATCH_VER_0300 = 0x0300,\n+    ROME_PATCH_VER_0302 = 0x0302\n+ };\n+\n+enum{\n+    ROME_SOC_ID_00 = 0x00000000,\n+    ROME_SOC_ID_11 = 0x00000011,\n+    ROME_SOC_ID_13 = 0x00000013,\n+    ROME_SOC_ID_22 = 0x00000022,\n+    ROME_SOC_ID_23 = 0x00000023,\n+    ROME_SOC_ID_44 = 0x00000044\n+};\n+\n+enum{\n+    ROME_VER_UNKNOWN = 0,\n+    ROME_VER_1_0 = ((ROME_PATCH_VER_0100 << 16 ) | ROME_SOC_ID_00 ),\n+    ROME_VER_1_1 = ((ROME_PATCH_VER_0101 << 16 ) | ROME_SOC_ID_00 ),\n+    ROME_VER_1_3 = ((ROME_PATCH_VER_0200 << 16 ) | ROME_SOC_ID_00 ),\n+    ROME_VER_2_1 = ((ROME_PATCH_VER_0200 << 16 ) | ROME_SOC_ID_11 ),\n+    ROME_VER_3_0 = ((ROME_PATCH_VER_0300 << 16 ) | ROME_SOC_ID_22 ),\n+    ROME_VER_3_2 = ((ROME_PATCH_VER_0302 << 16 ) | ROME_SOC_ID_44 ),\n+    TUFELLO_VER_1_0 = ((ROME_PATCH_VER_0300 << 16 ) | ROME_SOC_ID_13 ),\n+    TUFELLO_VER_1_1 = ((ROME_PATCH_VER_0302 << 16 ) | ROME_SOC_ID_23 )\n+};\n+#endif /* HW_ROME_H */\n"
  },
  {
    "path": "packages/network/bluez/patches/bluez-40-Add-support-for-sprd-type-in-hciattach.patch",
    "content": "From 8db209b20b58ce1915b1366d29ae85c79dc1c4ea Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Tue, 28 Jun 2022 10:10:12 +0200\nSubject: [PATCH] Add support for sprd type in hciattach\n\n/usr/bin/hciattach -s 1500000 /dev/ttyBT0 sprd\n\nhciattach_sprd.c file come from\nhttps://github.com/orangepi-xunlong/orangepi-build/commit/cbface3801e14c3f99cdabb53f57a0baff4319a1\nhttps://github.com/orangepi-xunlong/orangepi-build/blob/main/external/cache/sources/hcitools/hciattach_sprd.c\nBT_CONFIG_PATH changed to \"/lib/firmware/unisoc\"\n---\n Makefile.tools         |   3 +-\n tools/hciattach.c      |  30 +-\n tools/hciattach.h      |  18 +\n tools/hciattach_sprd.c | 832 +++++++++++++++++++++++++++++++++++++++++\n 4 files changed, 868 insertions(+), 15 deletions(-)\n create mode 100644 tools/hciattach_sprd.c\n\ndiff --git a/Makefile.tools b/Makefile.tools\nindex 4b513366f..1842e6285 100644\n--- a/Makefile.tools\n+++ b/Makefile.tools\n@@ -378,7 +378,8 @@ tools_hciattach_SOURCES = tools/hciattach.c tools/hciattach.h \\\n \t\t\t\t\t\ttools/hciattach_ath3k.c \\\n \t\t\t\t\t\ttools/hciattach_qualcomm.c \\\n \t\t\t\t\t\ttools/hciattach_intel.c \\\n-\t\t\t\t\t\ttools/hciattach_bcm43xx.c\n+\t\t\t\t\t\ttools/hciattach_bcm43xx.c \\\n+\t\t\t\t\t\ttools/hciattach_sprd.c\n tools_hciattach_LDADD = lib/libbluetooth-internal.la\n \n tools_hciconfig_SOURCES = tools/hciconfig.c\ndiff --git a/tools/hciattach.c b/tools/hciattach.c\nindex 276a4e56e..a3267a962 100644\n--- a/tools/hciattach.c\n+++ b/tools/hciattach.c\n@@ -38,20 +38,6 @@\n \n #include \"hciattach.h\"\n \n-struct uart_t {\n-\tchar *type;\n-\tint  m_id;\n-\tint  p_id;\n-\tint  proto;\n-\tint  init_speed;\n-\tint  speed;\n-\tint  flags;\n-\tint  pm;\n-\tchar *bdaddr;\n-\tint  (*init) (int fd, struct uart_t *u, struct termios *ti);\n-\tint  (*post) (int fd, struct uart_t *u, struct termios *ti);\n-};\n-\n #define FLOW_CTL\t0x0001\n #define AMP_DEV\t\t0x0002\n #define ENABLE_PM\t1\n@@ -266,6 +252,19 @@ static int bcm43xx(int fd, struct uart_t *u, struct termios *ti)\n \treturn bcm43xx_init(fd, u->init_speed, u->speed, ti, u->bdaddr);\n }\n \n+/* add sprd init and post function */\n+static int sprd_init(int fd, struct uart_t *u, struct termios *ti)\n+{\n+\tfprintf(stderr, \"SPRD Bluetooth init uart with init speed:%d, final_speed:%d, type:HCI UART %s\\n\", u->init_speed, u->speed, (u->proto == HCI_UART_H4)? \"H4\":\"H5\" );\n+\treturn sprd_config_init(fd, u, ti);\n+}\n+\n+static int sprd_post(int fd, struct uart_t *u, struct termios *ti)\n+{\n+\tfprintf(stderr, \"SPRD Bluetooth post process\\n\");\n+\treturn sprd_config_post(fd, u, ti);\n+}\n+\n static int read_check(int fd, void *buf, int count)\n {\n \tint res;\n@@ -1097,6 +1096,9 @@ struct uart_t uart[] = {\n \t{ \"amp\",\t0x0000, 0x0000, HCI_UART_H4, 115200, 115200,\n \t\t\tAMP_DEV, DISABLE_PM, NULL, NULL, NULL },\n \n+\t/* Bluetooth chip (UWE5622)*/\n+\t{  \"sprd\",      0x0000, 0x0000, NULL, 115200, 1500000,\n+\t\t\tFLOW_CTL, DISABLE_PM, NULL, sprd_init, sprd_post},\n \t{ NULL, 0 }\n };\n \ndiff --git a/tools/hciattach.h b/tools/hciattach.h\nindex 26c0d5424..69bc0ccef 100644\n--- a/tools/hciattach.h\n+++ b/tools/hciattach.h\n@@ -40,6 +40,20 @@\n #define HCI_UART_EXT_CONFIG\t4\n #define HCI_UART_VND_DETECT\t5\n \n+struct uart_t {\n+\tchar *type;\n+\tint  m_id;\n+\tint  p_id;\n+\tint  proto;\n+\tint  init_speed;\n+\tint  speed;\n+\tint  flags;\n+\tint  pm;\n+\tchar *bdaddr;\n+\tint  (*init) (int fd, struct uart_t *u, struct termios *ti);\n+\tint  (*post) (int fd, struct uart_t *u, struct termios *ti);\n+};\n+\n int read_hci_event(int fd, unsigned char *buf, int size);\n int set_speed(int fd, struct termios *ti, int speed);\n int uart_speed(int speed);\n@@ -56,3 +70,7 @@ int qualcomm_init(int fd, int speed, struct termios *ti, const char *bdaddr);\n int intel_init(int fd, int init_speed, int *speed, struct termios *ti);\n int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,\n \t\tconst char *bdaddr);\n+\n+/* add sprd init and post process for sprd Bluetooth chip (UWE5622) */\n+int sprd_config_init(int fd, struct uart_t *u, struct termios *ti);\n+int sprd_config_post(int fd, struct uart_t *u, struct termios *ti);\ndiff --git a/tools/hciattach_sprd.c b/tools/hciattach_sprd.c\nnew file mode 100644\nindex 000000000..12b4795de\n--- /dev/null\n+++ b/tools/hciattach_sprd.c\n@@ -0,0 +1,832 @@\n+#include <stdio.h>\n+#include <stdlib.h>\n+#include <unistd.h>\n+#include <errno.h>\n+#include <fcntl.h>\n+#include <string.h>\n+#include <signal.h>\n+#include <time.h>\n+#include <stdint.h>\n+#include <sys/termios.h>\n+#include <sys/ioctl.h>\n+#include <limits.h>\n+#include \"lib/bluetooth.h\"\n+#include \"hciattach.h\"\n+\n+/******************************************************************************\n+**  Constants & Macros\n+******************************************************************************/\n+#define LOG_STR \"SPRD Bluetooth\"\n+#define DBG_ON   1\n+\n+#define SPRD_DBG(fmt, arg...)                                \\\n+  do {                                                     \\\n+    if (DBG_ON)                                            \\\n+      fprintf(stderr, \"%s: \" fmt \"\\n\" , LOG_STR, ##arg);   \\\n+  } while(0)\n+\n+#define SPRD_ERR(fmt, arg...)                                \\\n+  do {                                                     \\\n+    fprintf(stderr, \"%s ERROR: \" fmt \"\\n\", LOG_STR, ##arg);\\\n+    perror(LOG_STR\" ERROR reason\");                        \\\n+  } while(0)\n+\n+#define SPRD_DUMP(buffer, len)                               \\\n+  fprintf(stderr, \"%s: \", LOG_STR);                        \\\n+  do {                                                     \\\n+    int i = 0;                                             \\\n+    for (i = 0; i < len; i++) {                        \\\n+      if (i && !(i % 16)) {                                \\\n+        fprintf(stderr, \"\\n\");                             \\\n+        fprintf(stderr, \"%s: \", LOG_STR);                  \\\n+      }                                                    \\\n+      fprintf(stderr, \"%02x \", buffer[i]);                 \\\n+    }                                                      \\\n+    fprintf(stderr, \"\\n\");                                 \\\n+  } while (0)\n+\n+#define CONF_ITEM_TABLE(ITEM, ACTION, BUF, LEN) \\\n+  { #ITEM, ACTION, &(BUF.ITEM), LEN, (sizeof(BUF.ITEM) / LEN) }\n+\n+#define UINT8_TO_STREAM(p, u8) \\\n+  { *(p)++ = (uint8_t)(u8); }\n+\n+#define STREAM_TO_UINT8(u8, p) \\\n+  {                            \\\n+    (u8) = (uint8_t)(*(p));    \\\n+    (p) += 1;                  \\\n+  }\n+\n+#define UINT16_TO_STREAM(p, u16)    \\\n+  {                                 \\\n+    *(p)++ = (uint8_t)(u16);        \\\n+    *(p)++ = (uint8_t)((u16) >> 8); \\\n+  }\n+\n+#define STREAM_TO_UINT16(u16, p)                                  \\\n+  {                                                               \\\n+    (u16) = ((uint16_t)(*(p)) + (((uint16_t)(*((p) + 1))) << 8)); \\\n+    (p) += 2;                                                     \\\n+  }\n+\n+#define UINT32_TO_STREAM(p, u32)     \\\n+  {                                  \\\n+    *(p)++ = (uint8_t)(u32);         \\\n+    *(p)++ = (uint8_t)((u32) >> 8);  \\\n+    *(p)++ = (uint8_t)((u32) >> 16); \\\n+    *(p)++ = (uint8_t)((u32) >> 24); \\\n+  }\n+\n+#define CONF_COMMENT               '#'\n+#define CONF_DELIMITERS            \" =\\n\\r\\t\"\n+#define CONF_VALUES_DELIMITERS     \"=\\n\\r\\t#\"\n+#define CONF_VALUES_PARTITION      \" ,=\\n\\r\\t#\"\n+#define CONF_MAX_LINE_LEN          255\n+\n+#define HCI_PSKEY                  0xFCA0\n+#define HCI_VSC_ENABLE_COMMMAND    0xFCA1\n+#define HCI_RF_PARA                0xFCA2\n+\n+#define RESPONSE_LENGTH            100\n+#define HCI_CMD_MAX_LEN            258\n+#define HCI_EVT_CMD_CMPL_OPCODE    3\n+#define HCI_PACKET_TYPE_COMMAND    1\n+#define HCI_CMD_PREAMBLE_SIZE      3\n+\n+#define FW_NODE_BYTE               6\n+#define FW_DATE_D_BYTE             8\n+#define FW_DATE_M_BYTE             9\n+#define FW_DATE_Y_BYTE             10\n+\n+//#define BT_CONFIG_PATH             \"/lib/firmware\"\n+#define BT_CONFIG_PATH             \"/lib/firmware/unisoc\"\n+#define BT_HC_HDR_SIZE             (sizeof(HC_BT_HDR))\n+#define BT_VND_OP_RESULT_SUCCESS   0\n+#define BT_VND_OP_RESULT_FAIL      1\n+#define MSG_STACK_TO_HC_HCI_CMD    0x2000\n+#define START_STOP_CMD_SIZE        3\n+#define DUAL_MODE                  0\n+#define DISABLE_BT                 0\n+#define ENABLE_BT                  1\n+\n+typedef void (*hci_cback)(void *);\n+typedef int  (conf_action_t)(char *p_conf_name, char *p_conf_value, void *buf, int len, int size);\n+\n+typedef struct {\n+\tuint16_t event;\n+\tuint16_t len;\n+\tuint16_t offset;\n+\tuint16_t layer_specific;\n+\tuint8_t data[];\n+} HC_BT_HDR;\n+\n+typedef struct {\n+\tuint32_t  device_class;\n+\tuint8_t  feature_set[16];\n+\tuint8_t  device_addr[6];\n+\tuint16_t  comp_id;\n+\tuint8_t g_sys_uart0_communication_supported;\n+\tuint8_t cp2_log_mode;\n+\tuint8_t LogLevel;\n+\tuint8_t g_central_or_perpheral;\n+\tuint16_t Log_BitMask;\n+\tuint8_t super_ssp_enable;\n+\tuint8_t common_rfu_b3;\n+\tuint32_t common_rfu_w[2];\n+\tuint32_t le_rfu_w[2];\n+\tuint32_t lmp_rfu_w[2];\n+\tuint32_t lc_rfu_w[2];\n+\tuint16_t g_wbs_nv_117;\n+\tuint16_t g_wbs_nv_118;\n+\tuint16_t g_nbv_nv_117;\n+\tuint16_t g_nbv_nv_118;\n+\tuint8_t g_sys_sco_transmit_mode;\n+\tuint8_t audio_rfu_b1;\n+\tuint8_t audio_rfu_b2;\n+\tuint8_t audio_rfu_b3;\n+\tuint32_t audio_rfu_w[2];\n+\tuint8_t g_sys_sleep_in_standby_supported;\n+\tuint8_t g_sys_sleep_master_supported;\n+\tuint8_t g_sys_sleep_slave_supported;\n+\tuint8_t power_rfu_b1;\n+\tuint32_t power_rfu_w[2];\n+\tuint32_t win_ext;\n+\tuint8_t edr_tx_edr_delay;\n+\tuint8_t edr_rx_edr_delay;\n+\tuint8_t tx_delay;\n+\tuint8_t rx_delay;\n+\tuint32_t bb_rfu_w[2];\n+\tuint8_t agc_mode;\n+\tuint8_t diff_or_eq;\n+\tuint8_t ramp_mode;\n+\tuint8_t modem_rfu_b1;\n+\tuint32_t modem_rfu_w[2];\n+\tuint32_t BQB_BitMask_1;\n+\tuint32_t BQB_BitMask_2;\n+\tuint16_t bt_coex_threshold[8];\n+\tuint32_t other_rfu_w[6];\n+} pskey_config_t;\n+\n+typedef struct {\n+\tuint16_t g_GainValue_A[6];\n+\tuint16_t g_ClassicPowerValue_A[10];\n+\tuint16_t g_LEPowerValue_A[16];\n+\tuint16_t g_BRChannelpwrvalue_A[8];\n+\tuint16_t g_EDRChannelpwrvalue_A[8];\n+\tuint16_t g_LEChannelpwrvalue_A[8];\n+\tuint16_t g_GainValue_B[6];\n+\tuint16_t g_ClassicPowerValue_B[10];\n+\tuint16_t g_LEPowerValue_B[16];\n+\tuint16_t g_BRChannelpwrvalue_B[8];\n+\tuint16_t g_EDRChannelpwrvalue_B[8];\n+\tuint16_t g_LEChannelpwrvalue_B[8];\n+\tuint16_t LE_fix_powerword;\n+\tuint8_t Classic_pc_by_channel;\n+\tuint8_t LE_pc_by_channel;\n+\tuint8_t RF_switch_mode;\n+\tuint8_t Data_Capture_Mode;\n+\tuint8_t Analog_IQ_Debug_Mode;\n+\tuint8_t RF_common_rfu_b3;\n+\tuint32_t RF_common_rfu_w[5];\n+} rf_config_t;\n+\n+typedef struct {\n+\tconst char *conf_entry;\n+\tconf_action_t *p_action;\n+\tvoid *buf;\n+\tint len;\n+\tint size;\n+} conf_entry_t;\n+\n+static uint8_t local_bdaddr[6]={0x10, 0x11, 0x12, 0x13, 0x14, 0x15};\n+static pskey_config_t marlin3_pskey;\n+static rf_config_t marlin3_rf_config;\n+static int s_bt_fd = -1;\n+\n+static const conf_entry_t marlin3_pksey_table[] = {\n+\tCONF_ITEM_TABLE(device_class, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(feature_set, 0, marlin3_pskey, 16),\n+\tCONF_ITEM_TABLE(device_addr, 0, marlin3_pskey, 6),\n+\tCONF_ITEM_TABLE(comp_id, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(g_sys_uart0_communication_supported, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(cp2_log_mode, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(LogLevel, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(g_central_or_perpheral, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(Log_BitMask, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(super_ssp_enable, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(common_rfu_b3, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(common_rfu_w, 0, marlin3_pskey, 2),\n+\tCONF_ITEM_TABLE(le_rfu_w, 0, marlin3_pskey, 2),\n+\tCONF_ITEM_TABLE(lmp_rfu_w, 0, marlin3_pskey, 2),\n+\tCONF_ITEM_TABLE(lc_rfu_w, 0, marlin3_pskey, 2),\n+\tCONF_ITEM_TABLE(g_wbs_nv_117, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(g_wbs_nv_118, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(g_nbv_nv_117, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(g_nbv_nv_118, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(g_sys_sco_transmit_mode, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(audio_rfu_b1, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(audio_rfu_b2, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(audio_rfu_b3, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(audio_rfu_w, 0, marlin3_pskey, 2),\n+\tCONF_ITEM_TABLE(g_sys_sleep_in_standby_supported, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(g_sys_sleep_master_supported, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(g_sys_sleep_slave_supported, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(power_rfu_b1, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(power_rfu_w, 0, marlin3_pskey, 2),\n+\tCONF_ITEM_TABLE(win_ext, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(edr_tx_edr_delay, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(edr_rx_edr_delay, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(tx_delay, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(rx_delay, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(bb_rfu_w, 0, marlin3_pskey, 2),\n+\tCONF_ITEM_TABLE(agc_mode, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(diff_or_eq, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(ramp_mode, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(modem_rfu_b1, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(modem_rfu_w, 0, marlin3_pskey, 2),\n+\tCONF_ITEM_TABLE(BQB_BitMask_1, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(BQB_BitMask_2, 0, marlin3_pskey, 1),\n+\tCONF_ITEM_TABLE(bt_coex_threshold, 0, marlin3_pskey, 8),\n+\tCONF_ITEM_TABLE(other_rfu_w, 0, marlin3_pskey, 6),\n+\t{0, 0, 0, 0, 0}\n+};\n+\n+static const conf_entry_t marlin3_rf_table[] = {\n+\tCONF_ITEM_TABLE(g_GainValue_A, 0, marlin3_rf_config, 6),\n+\tCONF_ITEM_TABLE(g_ClassicPowerValue_A, 0, marlin3_rf_config, 10),\n+\tCONF_ITEM_TABLE(g_LEPowerValue_A, 0, marlin3_rf_config, 16),\n+\tCONF_ITEM_TABLE(g_BRChannelpwrvalue_A, 0, marlin3_rf_config, 8),\n+\tCONF_ITEM_TABLE(g_EDRChannelpwrvalue_A, 0, marlin3_rf_config, 8),\n+\tCONF_ITEM_TABLE(g_LEChannelpwrvalue_A, 0, marlin3_rf_config, 8),\n+\tCONF_ITEM_TABLE(g_GainValue_B, 0, marlin3_rf_config, 6),\n+\tCONF_ITEM_TABLE(g_ClassicPowerValue_B, 0, marlin3_rf_config, 10),\n+\tCONF_ITEM_TABLE(g_LEPowerValue_B, 0, marlin3_rf_config, 16),\n+\tCONF_ITEM_TABLE(g_BRChannelpwrvalue_B, 0, marlin3_rf_config, 8),\n+\tCONF_ITEM_TABLE(g_EDRChannelpwrvalue_B, 0, marlin3_rf_config, 8),\n+\tCONF_ITEM_TABLE(g_LEChannelpwrvalue_B, 0, marlin3_rf_config, 8),\n+\tCONF_ITEM_TABLE(LE_fix_powerword, 0, marlin3_rf_config, 1),\n+\tCONF_ITEM_TABLE(Classic_pc_by_channel, 0, marlin3_rf_config, 1),\n+\tCONF_ITEM_TABLE(LE_pc_by_channel, 0, marlin3_rf_config, 1),\n+\tCONF_ITEM_TABLE(RF_switch_mode, 0, marlin3_rf_config, 1),\n+\tCONF_ITEM_TABLE(Data_Capture_Mode, 0, marlin3_rf_config, 1),\n+\tCONF_ITEM_TABLE(Analog_IQ_Debug_Mode, 0, marlin3_rf_config, 1),\n+\tCONF_ITEM_TABLE(RF_common_rfu_b3, 0, marlin3_rf_config, 1),\n+\tCONF_ITEM_TABLE(RF_common_rfu_w, 0, marlin3_rf_config, 5),\n+\t{0, 0, 0, 0, 0}\n+};\n+\n+static void log_bin_to_hexstr(uint8_t *bin, uint8_t binsz, const char *log_tag)\n+{\n+\tSPRD_DBG(\"%s\", log_tag);\n+\tSPRD_DUMP(bin, binsz);\n+}\n+\n+static void parse_number(char *p_conf_name, char *p_conf_value, void *buf, int len, int size)\n+{\n+\tuint8_t *dest = (uint8_t *)buf;\n+\tchar *sub_value, *p;\n+\tuint32_t value;\n+\t(void)p_conf_name;\n+\tsub_value = strtok_r(p_conf_value, CONF_VALUES_PARTITION, &p);\n+\tdo {\n+\t\tif (sub_value == NULL)\n+\t\t\tbreak;\n+\n+\t\tif (sub_value[0] == '0' && (sub_value[1] == 'x' || sub_value[1] == 'X'))\n+\t\t\tvalue = strtoul(sub_value, 0, 16) & 0xFFFFFFFF;\n+\t\telse\n+\t\t\tvalue = strtoul(sub_value, 0, 10) & 0xFFFFFFFF;\n+\n+\t\tswitch (size) {\n+\t\tcase sizeof(uint8_t):\n+\t\t\t*dest = value & 0xFF;\n+\t\t\tdest += size;\n+\t\t\tbreak;\n+\n+\t\tcase sizeof(uint16_t):\n+\t\t\t*((uint16_t *)dest) = value & 0xFFFF;\n+\t\t\tdest += size;\n+\t\t\tbreak;\n+\n+\t\tcase sizeof(uint32_t):\n+\t\t\t*((uint32_t *)dest) = value & 0xFFFFFFFF;\n+\t\t\tdest += size;\n+\t\t\tbreak;\n+\n+\t\tdefault:\n+\t\t\tbreak;\n+\t\t}\n+\t\tsub_value = strtok_r(NULL, CONF_VALUES_PARTITION, &p);\n+\t} while (--len);\n+}\n+\n+static unsigned char compare_char(unsigned char ch)\n+{\n+\t\tunsigned char data = 0x0;\n+\n+\t\tswitch(ch)\n+\t\t{\n+\t\t\tcase 0:\n+\t\t\tcase '0':\n+\t\t\t\tdata = 0x0;\n+\t\t\t\tbreak;\n+\t\t\tcase 1:\n+\t\t\tcase '1':\n+\t\t\t\tdata = 0x1;\n+\t\t\t\tbreak;\n+\t\t\tcase 2:\n+\t\t\tcase '2':\n+\t\t\t\tdata = 0x2;\n+\t\t\t\tbreak;\n+\t\t\tcase 3:\n+\t\t\tcase '3':\n+\t\t\t\tdata = 0x3;\n+\t\t\t\tbreak;\n+\t\t\tcase 4:\n+\t\t\tcase '4':\n+\t\t\t\tdata = 0x4;\n+\t\t\t\tbreak;\n+\t\t\tcase 5:\n+\t\t\tcase '5':\n+\t\t\t\tdata = 0x5;\n+\t\t\t\tbreak;\n+\t\t\tcase 6:\n+\t\t\tcase '6':\n+\t\t\t\tdata = 0x6;\n+\t\t\t\tbreak;\n+\t\t\tcase 7:\n+\t\t\tcase '7':\n+\t\t\t\tdata = 0x7;\n+\t\t\t\tbreak;\n+\t\t\tcase 8:\n+\t\t\tcase '8':\n+\t\t\t\tdata = 0x8;\n+\t\t\t\tbreak;\n+\t\t\tcase 9:\n+\t\t\tcase '9':\n+\t\t\t\tdata = 0x9;\n+\t\t\t\tbreak;\n+\t\t\tcase 10:\n+\t\t\tcase 'a':\n+\t\t\tcase 'A':\n+\t\t\t\tdata = 0xA;\n+\t\t\t\tbreak;\n+\t\t\tcase 11:\n+\t\t\tcase 'b':\n+\t\t\tcase 'B':\n+\t\t\t\tdata = 0xB;\n+\t\t\t\tbreak;\n+\t\t\tcase 12:\n+\t\t\tcase 'c':\n+\t\t\tcase 'C':\n+\t\t\t\tdata = 0xC;\n+\t\t\t\tbreak;\n+\t\t\tcase 13:\n+\t\t\tcase 'd':\n+\t\t\tcase 'D':\n+\t\t\t\tdata = 0xD;\n+\t\t\t\tbreak;\n+\t\t\tcase 14:\n+\t\t\tcase 'e':\n+\t\t\tcase 'E':\n+\t\t\t\tdata = 0xE;\n+\t\t\t\tbreak;\n+\t\t\tcase 15:\n+\t\t\tcase 'f':\n+\t\t\tcase 'F':\n+\t\t\t\tdata = 0xF;\n+\t\t\t\tbreak;\n+\t\t}\n+\t\treturn data;\n+}\n+\n+static void set_mac_address(uint8_t *addr)\n+{\n+\tint i = 0;\n+\tSPRD_DBG(\"%s\", __func__);\n+\t//for (i = 0; i < 6; i++)\n+\t//\taddr[5-i] = (unsigned char)local_bdaddr[i];\n+\n+\tFILE *fp = fopen(\"/sys/class/addr_mgt/addr_bt\", \"r+\");\n+\tunsigned char buff[255];\n+\tfscanf(fp, \"%s\", buff);\n+\tfclose(fp);\n+\tint k = 0;\n+\n+\tunsigned char tmp[5];\n+\tsprintf(tmp, \"%c%c\", buff[0], buff[1]);\n+\tunsigned char str = compare_char(tmp[0]);\n+\tunsigned char str2 = compare_char(tmp[1]);\n+\tlocal_bdaddr[0] = (str << 4) | str2;\n+\n+\tsprintf(tmp, \"%c%c\", buff[3], buff[4]);\n+\tstr = compare_char(tmp[0]);\n+\tstr2 = compare_char(tmp[1]);\n+\tlocal_bdaddr[1] = (str << 4) | str2;\n+\n+\tsprintf(tmp, \"%c%c\", buff[6], buff[7]);\n+\tstr = compare_char(tmp[0]);\n+\tstr2 = compare_char(tmp[1]);\n+\tlocal_bdaddr[2] = (str << 4) | str2;\n+\n+\tsprintf(tmp, \"%c%c\", buff[9], buff[10]);\n+\tstr = compare_char(tmp[0]);\n+\tstr2 = compare_char(tmp[1]);\n+\tlocal_bdaddr[3] = (str << 4) | str2;\n+\n+\tsprintf(tmp, \"%c%c\", buff[12], buff[13]);\n+\tstr = compare_char(tmp[0]);\n+\tstr2 = compare_char(tmp[1]);\n+\tlocal_bdaddr[4] = (str << 4) | str2;\n+\n+\tsprintf(tmp, \"%c%c\", buff[15], buff[16]);\n+\tstr = compare_char(tmp[0]);\n+\tstr2 = compare_char(tmp[1]);\n+\tlocal_bdaddr[5] = (str << 4) | str2;\n+\n+\t{\n+\t\tfor (i = 0; i < 6; i++)\n+        addr[5-i] = (unsigned char)local_bdaddr[i];\n+\t}\n+\n+}\n+\n+static void vnd_load_configure(const char *p_path, const conf_entry_t *entry)\n+{\n+\tFILE *p_file;\n+\tchar *p_name, *p_value, *p;\n+\tconf_entry_t *p_entry;\n+\tchar line[CONF_MAX_LINE_LEN + 1]; /* add 1 for \\0 char */\n+\n+\tSPRD_DBG(\"Attempt to load conf from %s\", p_path);\n+\n+\tif ((p_file = fopen(p_path, \"r\")) != NULL) {\n+\t\t/* read line by line */\n+\t\twhile (fgets(line, CONF_MAX_LINE_LEN + 1, p_file) != NULL) {\n+\t\t\tif (line[0] == CONF_COMMENT) continue;\n+\n+\t\t\tp_name = strtok_r(line, CONF_DELIMITERS, &p);\n+\n+\t\t\tif (NULL == p_name) {\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\n+\t\t\tp_value = strtok_r(NULL, CONF_VALUES_DELIMITERS, &p);\n+\n+\t\t\tif (NULL == p_value) {\n+\t\t\t\tSPRD_DBG(\"vnd_load_conf: missing value for name: %s\", p_name);\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\n+\t\t\tp_entry = (conf_entry_t*)entry;\n+\n+\t\t\twhile (p_entry->conf_entry != NULL) {\n+\t\t\t\tif (strcmp(p_entry->conf_entry, (const char *)p_name) == 0) {\n+\t\t\t\t\tif (p_entry->p_action) {\n+\t\t\t\t\t\tp_entry->p_action(p_name, p_value, p_entry->buf, p_entry->len,\n+\t\t\t\t\t\t\t\t\tp_entry->size);\n+\t\t\t\t\t} else {\n+\t\t\t\t\t\tSPRD_DBG(\"%s -> %s\", p_name, p_value);\n+\t\t\t\t\t\tparse_number(p_name, p_value, p_entry->buf, p_entry->len,\n+\t\t\t\t\t\t\t\t\tp_entry->size);\n+\t\t\t\t\t}\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\n+\t\t\t\tp_entry++;\n+\t\t\t}\n+\t\t}\n+\n+\t\tfclose(p_file);\n+\t} else {\n+\t\tSPRD_DBG(\"vnd_load_conf file >%s< not found\", p_path);\n+\t}\n+}\n+\n+static size_t H4Protocol_Send(uint8_t type, const uint8_t* data, size_t length)\n+{\n+\tstruct iovec iov[] = {\n+\t\t{&type, sizeof(type)},\n+\t\t{(uint8_t *)data, length}};\n+\n+\tssize_t ret = 0;\n+\tdo {\n+\t\tret = writev(s_bt_fd, iov, sizeof(iov) / sizeof(iov[0]));\n+\t} while (-1 == ret && EAGAIN == errno);\n+\n+\tif (ret == -1) {\n+\t\tSPRD_ERR(\"%s error writing to UART (%s)\", __func__, strerror(errno));\n+\t} else if (ret < length + 1) {\n+\t\tSPRD_ERR(\"%s: %d / %d bytes written - something went wrong...\", __func__, ret, length + 1);\n+\t}\n+\n+\treturn ret;\n+}\n+\n+static void *bt_vendor_alloc(int size)\n+{\n+\tvoid *p = (uint8_t *)malloc(size);\n+\treturn p;\n+}\n+\n+static void bt_vendor_free(void *buffer)\n+{\n+\tfree(buffer);\n+}\n+\n+static uint8_t bt_vendor_xmit(uint16_t opcode, void* buffer, hci_cback callback)\n+{\n+\tuint8_t type = HCI_PACKET_TYPE_COMMAND;\n+\t(void)opcode;\n+\tHC_BT_HDR* bt_hdr = (HC_BT_HDR *)buffer;\n+\tH4Protocol_Send(type, bt_hdr->data, bt_hdr->len);\n+\treturn BT_VND_OP_RESULT_SUCCESS;\n+}\n+\n+static uint8_t sprd_vnd_send_hci_vsc(uint16_t cmd, uint8_t *payload, uint8_t len, hci_cback cback)\n+{\n+\tHC_BT_HDR   *p_buf;\n+\tuint8_t     *p, ret;\n+\n+\tp_buf = (HC_BT_HDR *)bt_vendor_alloc(\n+\t\tBT_HC_HDR_SIZE + HCI_CMD_PREAMBLE_SIZE + len);\n+\tif (p_buf) {\n+\t\tp_buf->event = MSG_STACK_TO_HC_HCI_CMD;\n+\t\tp_buf->offset = 0;\n+\t\tp_buf->layer_specific = 0;\n+\t\tp_buf->len = HCI_CMD_PREAMBLE_SIZE + len;\n+\t\tp = (uint8_t *)(p_buf + 1);\n+\n+\t\tUINT16_TO_STREAM(p, cmd);\n+\t\t*p++ = len;\n+\t\tmemcpy(p, payload, len);\n+\t\tlog_bin_to_hexstr((uint8_t *)(p_buf + 1), HCI_CMD_PREAMBLE_SIZE + len, __FUNCTION__);\n+\t\tret = bt_vendor_xmit(cmd, p_buf, cback);\n+\t\tbt_vendor_free(p_buf);\n+\t\treturn ret;\n+\t}\n+\treturn BT_VND_OP_RESULT_FAIL;\n+}\n+\n+static void hw_core_cback(void *p_mem)\n+{\n+\tuint8_t *p_evt_buf = (uint8_t *)p_mem;\n+\tuint8_t *p, status;\n+\tuint16_t opcode, mode;\n+\n+\tp = (uint8_t *)(p_evt_buf + 1) + HCI_EVT_CMD_CMPL_OPCODE;\n+\tSTREAM_TO_UINT16(opcode,p);\n+\tSTREAM_TO_UINT16(mode,p);\n+\tSTREAM_TO_UINT8(status,p);\n+\tSPRD_DBG(\"%s hw_core_cback response: [0x%04X, 0x%04X, 0x%02X]\", __func__, opcode, mode, status);\n+\tbt_vendor_free(p_evt_buf);\n+}\n+\n+static void hw_core_enable(unsigned char enable)\n+{\n+\tuint8_t *p, msg_req[HCI_CMD_MAX_LEN];\n+\tp = msg_req;\n+\tUINT16_TO_STREAM(p, DUAL_MODE);\n+\tUINT8_TO_STREAM(p, enable ? ENABLE_BT : DISABLE_BT);\n+\tsprd_vnd_send_hci_vsc(HCI_VSC_ENABLE_COMMMAND, msg_req, (uint8_t)(p - msg_req), NULL);\n+}\n+\n+static void hw_rf_cback(void *p_mem)\n+{\n+\tuint8_t *p_evt_buf = (uint8_t *)p_mem, len;\n+\tuint8_t *p, status;\n+\tuint16_t opcode, mode = 0;\n+\n+\tp = (uint8_t *)(p_evt_buf + 1) + 1;\n+\tSTREAM_TO_UINT8(len, p);\n+\n+\tp = (uint8_t *)(p_evt_buf + 1) + HCI_EVT_CMD_CMPL_OPCODE;\n+\tSTREAM_TO_UINT16(opcode, p);\n+\tif (len == 6)\n+\t\tSTREAM_TO_UINT16(mode, p);\n+\n+\tSTREAM_TO_UINT8(status, p);\n+\n+\tSPRD_DBG(\"%s hw_rf_cback response: [0x%04X, 0x%04X, 0x%02X]\", __func__, opcode, mode, status);\n+\t/* Must free the RX event buffer */\n+\tbt_vendor_free(p_evt_buf);\n+}\n+\n+static int marlin3_rf_preload()\n+{\n+\tuint8_t *p, msg_req[HCI_CMD_MAX_LEN];\n+\tint i;\n+\n+\tSPRD_DBG(\"yujian.qin %s\", __FUNCTION__);\n+\tp = msg_req;\n+\n+\tfor (i = 0; i < 6; i++)\n+\t\tUINT16_TO_STREAM(p, marlin3_rf_config.g_GainValue_A[i]);\n+\n+\tfor (i = 0; i < 10; i++)\n+\t\tUINT16_TO_STREAM(p, marlin3_rf_config.g_ClassicPowerValue_A[i]);\n+\n+\tfor (i = 0; i < 16; i++)\n+\t\tUINT16_TO_STREAM(p, marlin3_rf_config.g_LEPowerValue_A[i]);\n+\n+\tfor (i = 0; i < 8; i++)\n+\t\tUINT16_TO_STREAM(p, marlin3_rf_config.g_BRChannelpwrvalue_A[i]);\n+\n+\tfor (i = 0; i < 8; i++)\n+\t\tUINT16_TO_STREAM(p, marlin3_rf_config.g_EDRChannelpwrvalue_A[i]);\n+\n+\tfor (i = 0; i < 8; i++)\n+\t\tUINT16_TO_STREAM(p, marlin3_rf_config.g_LEChannelpwrvalue_A[i]);\n+\n+\tfor (i = 0; i < 6; i++)\n+\t\tUINT16_TO_STREAM(p, marlin3_rf_config.g_GainValue_B[i]);\n+\n+\tfor (i = 0; i < 10; i++)\n+\t\tUINT16_TO_STREAM(p, marlin3_rf_config.g_ClassicPowerValue_B[i]);\n+\n+\tfor (i = 0; i < 16; i++)\n+\t\tUINT16_TO_STREAM(p, marlin3_rf_config.g_LEPowerValue_B[i]);\n+\n+\tfor (i = 0; i < 8; i++)\n+\t\tUINT16_TO_STREAM(p, marlin3_rf_config.g_BRChannelpwrvalue_B[i]);\n+\n+\tfor (i = 0; i < 8; i++)\n+\t\tUINT16_TO_STREAM(p, marlin3_rf_config.g_EDRChannelpwrvalue_B[i]);\n+\n+\tfor (i = 0; i < 8; i++)\n+\t\tUINT16_TO_STREAM(p, marlin3_rf_config.g_LEChannelpwrvalue_B[i]);\n+\n+\tUINT16_TO_STREAM(p, marlin3_rf_config.LE_fix_powerword);\n+\n+\tUINT8_TO_STREAM(p, marlin3_rf_config.Classic_pc_by_channel);\n+\tUINT8_TO_STREAM(p, marlin3_rf_config.LE_pc_by_channel);\n+\tUINT8_TO_STREAM(p, marlin3_rf_config.RF_switch_mode);\n+\tUINT8_TO_STREAM(p, marlin3_rf_config.Data_Capture_Mode);\n+\tUINT8_TO_STREAM(p, marlin3_rf_config.Analog_IQ_Debug_Mode);\n+\tUINT8_TO_STREAM(p, marlin3_rf_config.RF_common_rfu_b3);\n+\n+\tfor (i = 0; i < 5; i++)\n+\t\tUINT32_TO_STREAM(p, marlin3_rf_config.RF_common_rfu_w[i]);\n+\n+\tsprd_vnd_send_hci_vsc(HCI_RF_PARA, msg_req, (uint8_t)(p - msg_req), NULL);\n+\treturn 0;\n+}\n+\n+static void marlin3_pskey_cback(void *p_mem)\n+{\n+\tuint8_t *p_evt_buf = (uint8_t *)p_mem;\n+\n+\tuint16_t opcode, node, year;\n+\tuint8_t *p, month, day;\n+\t(void)opcode;\n+\n+\tp = (uint8_t *)(p_evt_buf + 1) + HCI_EVT_CMD_CMPL_OPCODE;\n+\tSTREAM_TO_UINT16(opcode, p);\n+\n+\tp = (uint8_t *)(p_evt_buf + 1) + FW_NODE_BYTE;\n+\tSTREAM_TO_UINT16(node, p);\n+\tp = (uint8_t *)(p_evt_buf + 1) + FW_DATE_Y_BYTE;\n+\tSTREAM_TO_UINT16(year, p);\n+\tp = (uint8_t *)(p_evt_buf + 1) + FW_DATE_M_BYTE;\n+\tSTREAM_TO_UINT8(month, p);\n+\tp = (uint8_t *)(p_evt_buf + 1) + FW_DATE_D_BYTE;\n+\tSTREAM_TO_UINT8(day, p);\n+\n+\tSPRD_DBG(\"Bluetooth Firmware Node: %04X Date: %04x-%02x-%02x\", node, year, month, day);\n+\n+\t/* Must free the RX event buffer */\n+\tbt_vendor_free(p_evt_buf);\n+}\n+\n+static int marlin3_pskey_preload(void *arg)\n+{\n+\tuint8_t *p, msg_req[HCI_CMD_MAX_LEN];\n+\tint i;\n+\t(void)arg;\n+\n+\tSPRD_DBG(\"%s\", __FUNCTION__);\n+\tp = msg_req;\n+\tUINT32_TO_STREAM(p, marlin3_pskey.device_class);\n+\n+\tfor (i = 0; i < 16; i++)\n+\t\tUINT8_TO_STREAM(p, marlin3_pskey.feature_set[i]);\n+\n+\tfor (i = 0; i < 6; i++)\n+\t\tUINT8_TO_STREAM(p, marlin3_pskey.device_addr[i]);\n+\n+\tUINT16_TO_STREAM(p, marlin3_pskey.comp_id);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.g_sys_uart0_communication_supported);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.cp2_log_mode);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.LogLevel);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.g_central_or_perpheral);\n+\n+\tUINT16_TO_STREAM(p, marlin3_pskey.Log_BitMask);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.super_ssp_enable);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.common_rfu_b3);\n+\n+\tfor (i = 0; i < 2; i++)\n+\t\tUINT32_TO_STREAM(p, marlin3_pskey.common_rfu_w[i]);\n+\n+\tfor (i = 0; i < 2; i++)\n+\t\tUINT32_TO_STREAM(p, marlin3_pskey.le_rfu_w[i]);\n+\n+\tfor (i = 0; i < 2; i++)\n+\t\tUINT32_TO_STREAM(p, marlin3_pskey.lmp_rfu_w[i]);\n+\n+\tfor (i = 0; i < 2; i++)\n+\t\tUINT32_TO_STREAM(p, marlin3_pskey.lc_rfu_w[i]);\n+\n+\tUINT16_TO_STREAM(p, marlin3_pskey.g_wbs_nv_117);\n+\tUINT16_TO_STREAM(p, marlin3_pskey.g_wbs_nv_118);\n+\tUINT16_TO_STREAM(p, marlin3_pskey.g_nbv_nv_117);\n+\tUINT16_TO_STREAM(p, marlin3_pskey.g_nbv_nv_118);\n+\n+\tUINT8_TO_STREAM(p, marlin3_pskey.g_sys_sco_transmit_mode);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.audio_rfu_b1);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.audio_rfu_b2);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.audio_rfu_b3);\n+\n+\tfor (i = 0; i < 2; i++)\n+\t\tUINT32_TO_STREAM(p, marlin3_pskey.audio_rfu_w[i]);\n+\n+\tUINT8_TO_STREAM(p, marlin3_pskey.g_sys_sleep_in_standby_supported);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.g_sys_sleep_master_supported);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.g_sys_sleep_slave_supported);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.power_rfu_b1);\n+\n+\tfor (i = 0; i < 2; i++)\n+\t\tUINT32_TO_STREAM(p, marlin3_pskey.power_rfu_w[i]);\n+\n+\tUINT32_TO_STREAM(p, marlin3_pskey.win_ext);\n+\n+\tUINT8_TO_STREAM(p, marlin3_pskey.edr_tx_edr_delay);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.edr_rx_edr_delay);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.tx_delay);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.rx_delay);\n+\n+\tfor (i = 0; i < 2; i++)\n+\t\tUINT32_TO_STREAM(p, marlin3_pskey.bb_rfu_w[i]);\n+\n+\tUINT8_TO_STREAM(p, marlin3_pskey.agc_mode);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.diff_or_eq);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.ramp_mode);\n+\tUINT8_TO_STREAM(p, marlin3_pskey.modem_rfu_b1);\n+\n+\tfor (i = 0; i < 2; i++)\n+\t\tUINT32_TO_STREAM(p, marlin3_pskey.modem_rfu_w[i]);\n+\n+\tUINT32_TO_STREAM(p, marlin3_pskey.BQB_BitMask_1);\n+\tUINT32_TO_STREAM(p, marlin3_pskey.BQB_BitMask_2);\n+\tfor (i = 0; i < 8; i++)\n+\t\tUINT16_TO_STREAM(p, marlin3_pskey.bt_coex_threshold[i]);\n+\n+\tfor (i = 0; i < 6; i++)\n+\t\tUINT32_TO_STREAM(p, marlin3_pskey.other_rfu_w[i]);\n+\n+\tsprd_vnd_send_hci_vsc(HCI_PSKEY, msg_req, (uint8_t)(p - msg_req), NULL);\n+\treturn 0;\n+}\n+\n+\n+int sprd_config_init(int fd, struct uart_t *u, struct termios *ti)\n+{\n+\tuint8_t *recv = NULL;\n+\tint len = 0;\n+\n+\ts_bt_fd = fd;\n+\n+\tmemset(&marlin3_pskey, 0, sizeof(marlin3_pskey));\n+\tmemset(&marlin3_rf_config, 0, sizeof(marlin3_rf_config));\n+\tvnd_load_configure(BT_CONFIG_PATH \"/bt_configure_pskey.ini\", &marlin3_pksey_table[0]);\n+\tvnd_load_configure(BT_CONFIG_PATH \"/bt_configure_rf.ini\", &marlin3_rf_table[0]);\n+\t//set_mac_address(marlin3_pskey.device_addr);\n+\n+\tmarlin3_pskey_preload(NULL);\n+\trecv = bt_vendor_alloc(RESPONSE_LENGTH);\n+\tlen = read_hci_event(s_bt_fd, recv, RESPONSE_LENGTH);\n+\tSPRD_DBG(\"Received event, len: %d\", len);\n+\tSPRD_DUMP(recv, len);\n+\tmarlin3_pskey_cback(recv);\n+\n+\tmarlin3_rf_preload();\n+\trecv = bt_vendor_alloc(RESPONSE_LENGTH);\n+\tlen = read_hci_event(s_bt_fd, recv, RESPONSE_LENGTH);\n+\tSPRD_DBG(\"Received event, len: %d\", len);\n+\tSPRD_DUMP(recv, len);\n+\thw_rf_cback(recv);\n+\n+\thw_core_enable(1);\n+\trecv = bt_vendor_alloc(RESPONSE_LENGTH);\n+\tlen = read_hci_event(s_bt_fd, recv, RESPONSE_LENGTH);\n+\tSPRD_DBG(\"Received event, len: %d\", len);\n+\tSPRD_DUMP(recv, len);\n+\thw_core_cback(recv);\n+\n+\treturn 0;\n+}\n+\n+int sprd_config_post(int fd, struct uart_t *u, struct termios *ti)\n+{\n+\tSPRD_DBG(\"Done setting line discpline\");\n+\treturn 0;\n+}\n-- \n2.30.2\n\n"
  },
  {
    "path": "packages/network/bluez/patches/fake-ps3.patch",
    "content": "diff --unified --recursive --text --color bluez-5.61.org/profiles/input/sixaxis.h bluez-5.61.new/profiles/input/sixaxis.h\n--- bluez-5.61.org/profiles/input/sixaxis.h\t2021-02-23 04:26:59.000000000 +0800\n+++ bluez-5.61.new/profiles/input/sixaxis.h\t2021-08-29 16:30:07.102346000 +0800\n@@ -87,6 +87,10 @@\n \t\treturn &devices[i];\n \t}\n \n+\tif ( vid == 0x054c && pid == 0x0268 )\n+\n+\t\treturn &devices[1];\n+\n \treturn NULL;\n }\n \n"
  },
  {
    "path": "packages/network/bluez/system.d/bluetooth-defaults.service",
    "content": "[Unit]\nDescription=Bluetooth defaults\nAfter=local-fs.target\n\nConditionPathExists=!/storage/.cache/services/bluez.conf\nConditionPathExists=!/storage/.cache/services/bluez.disabled\n\n[Service]\nType=oneshot\nExecStart=/bin/sh -c 'cp /usr/share/services/bluez.conf /storage/.cache/services/'\nRemainAfterExit=yes\n"
  },
  {
    "path": "packages/network/bluez/system.d/bluetooth.service",
    "content": "[Unit]\nDescription=Bluetooth service\nAfter=syslog.target bluetooth-defaults.service\nRequires=bluetooth-defaults.service\n\nConditionPathExists=/storage/.cache/services/bluez.conf\n\n[Service]\nType=dbus\nBusName=org.bluez\nNotifyAccess=main\nEnvironmentFile=/storage/.cache/services/bluez.conf\nEnvironmentFile=-/run/libreelec/debug/bluez.conf\nExecStart=/usr/lib/bluetooth/bluetoothd $BLUEZ_ARGS $BLUEZ_DEBUG\nCapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_FOWNER\nLimitNPROC=1\nTimeoutStopSec=1s\nRestart=on-failure\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=bluetooth.target\nAlias=dbus-org.bluez.service\n"
  },
  {
    "path": "packages/network/bluez/system.d/obex.service",
    "content": "[Unit]\nDescription=Bluetooth service\nRequires=bluetooth.target bluetooth.service\nAfter=bluetooth.service\n\nConditionPathExists=/storage/.cache/services/obexd.conf\nConditionPathExists=/storage/.cache/services/bluez.conf\n\n[Service]\nEnvironmentFile=/storage/.cache/services/obexd.conf\nEnvironmentFile=-/run/libreelec/debug/obexd.conf\nExecStartPre=/bin/sh -c 'mkdir -p $OBEXD_ROOT'\nExecStart=/usr/lib/bluetooth/obexd -r $OBEXD_ROOT $OBEXD_DEBUG\nTimeoutStopSec=1s\n\n[Install]\nWantedBy=bluetooth.target\n"
  },
  {
    "path": "packages/network/bluez/tmpfiles.d/z_05_bluez.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nd    /storage/.cache/bluetooth  0755 root root - -\n"
  },
  {
    "path": "packages/network/connman/config/settings",
    "content": "[global]\nOfflineMode=false\n\n[Wired]\nEnable=true\n\n[WiFi]\nEnable=true\n"
  },
  {
    "path": "packages/network/connman/debug.d/connman.conf",
    "content": "CONNMAN_DEBUG=\"--debug\"\nCONNMANVPN_DEBUG=\"--debug\"\n"
  },
  {
    "path": "packages/network/connman/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"connman\"\nPKG_VERSION=\"1.42\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.connman.net\"\nPKG_URL=\"https://git.kernel.org/pub/scm/network/connman/connman.git/snapshot/connman-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain glib readline dbus iptables\"\nPKG_LONGDESC=\"A modular network connection manager.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--srcdir=.. \\\n                           --disable-debug \\\n                           --disable-hh2serial-gps \\\n                           --disable-openconnect \\\n                           --disable-openvpn \\\n                           --disable-vpnc \\\n                           --disable-l2tp \\\n                           --disable-pptp \\\n                           --disable-iospm \\\n                           --disable-tist \\\n                           --disable-session-policy-local \\\n                           --disable-test \\\n                           --disable-nmcompat \\\n                           --disable-polkit \\\n                           --disable-selinux \\\n                           --enable-loopback \\\n                           --enable-ethernet \\\n                           --disable-gadget \\\n                           --disable-bluetooth \\\n                           --disable-ofono \\\n                           --disable-dundee \\\n                           --disable-pacrunner \\\n                           --disable-neard \\\n                           --disable-wispr \\\n                           --disable-tools \\\n                           --disable-stats \\\n                           --enable-client \\\n                           --enable-datafiles \\\n                           --with-dbusconfdir=/etc \\\n                           --with-systemdunitdir=/usr/lib/systemd/system \\\n                           --disable-silent-rules\"\n\nif [ \"${WIREGUARD_SUPPORT}\" = \"yes\" ]; then\n  PKG_CONFIGURE_OPTS_TARGET+=\" --enable-wireguard=builtin\"\nelse\n  PKG_CONFIGURE_OPTS_TARGET+=\" --disable-wireguard\"\nfi\n\ncase \"${WIRELESS_DAEMON}\" in\n  wpa_supplicant)\n    PKG_DEPENDS_TARGET+=\" wpa_supplicant\"\n    PKG_CONFIGURE_OPTS_TARGET+=\" WPASUPPLICANT=/usr/bin/wpa_supplicant \\\n                                 --enable-wifi \\\n                                 --disable-iwd\"\n    ;;\n  iwd)\n    PKG_DEPENDS_TARGET+=\" iwd\"\n    PKG_CONFIGURE_OPTS_TARGET+=\" --disable-wifi \\\n                                 --enable-iwd\"\n    ;;\nesac\n\nPKG_MAKE_OPTS_TARGET=\"storagedir=/storage/.cache/connman \\\n                      vpn_storagedir=/storage/.config/wireguard \\\n                      statedir=/run/connman\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/lib/systemd\n  rm -rf ${INSTALL}/usr/lib/tmpfiles.d/connman_resolvconf.conf\n\n  mkdir -p ${INSTALL}/usr/bin\n    cp -P client/connmanctl ${INSTALL}/usr/bin\n\n  mkdir -p ${INSTALL}/usr/lib/connman\n    cp -P ${PKG_DIR}/scripts/connman-setup ${INSTALL}/usr/lib/connman\n\n  mkdir -p ${INSTALL}/etc/connman\n    cp ../src/main.conf ${INSTALL}/etc/connman\n    sed -i ${INSTALL}/etc/connman/main.conf \\\n        -e \"s|^# BackgroundScanning.*|BackgroundScanning = true|g\" \\\n        -e \"s|^# UseGatewaysAsTimeservers.*|UseGatewaysAsTimeservers = false|g\" \\\n        -e \"s|^# FallbackNameservers.*|FallbackNameservers = 8.8.8.8,8.8.4.4|g\" \\\n        -e \"s|^# FallbackTimeservers.*|FallbackTimeservers = 0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org|g\" \\\n        -e \"s|^# PreferredTechnologies.*|PreferredTechnologies = ethernet,wifi,cellular|g\" \\\n        -e \"s|^# TetheringTechnologies.*|TetheringTechnologies = ethernet,wifi|g\" \\\n        -e \"s|^# AllowHostnameUpdates.*|AllowHostnameUpdates = false|g\" \\\n        -e \"s|^# PersistentTetheringMode.*|PersistentTetheringMode = true|g\" \\\n        -e \"s|^# NetworkInterfaceBlacklist = vmnet,vboxnet,virbr,ifb|NetworkInterfaceBlacklist = vmnet,vboxnet,virbr,ifb,docker,veth,zt|g\"\n\n  mkdir -p ${INSTALL}/usr/share/connman/\n    cp ${PKG_DIR}/config/settings ${INSTALL}/usr/share/connman/\n}\n\npost_install() {\n  add_user system x 430 430 \"service\" \"/var/run/connman\" \"/bin/sh\"\n  add_group system 430\n\n  enable_service connman.service\n  if [ \"${WIREGUARD_SUPPORT}\" = \"yes\" ]; then\n    enable_service connman-vpn.service\n  fi\n}\n"
  },
  {
    "path": "packages/network/connman/patches/connman-01-do-not-cleanup-routes.patch",
    "content": "diff --git a/src/device.c b/src/device.c\nindex 0fda950..eb09e53 100644\n--- a/src/device.c\n+++ b/src/device.c\n@@ -1490,8 +1490,6 @@ int __connman_device_init(const char *device, const char *nodevice)\n \tif (nodevice)\n \t\tnodevice_filter = g_strsplit(nodevice, \",\", -1);\n \n-\tcleanup_devices();\n-\n \treturn 0;\n }\n \n"
  },
  {
    "path": "packages/network/connman/patches/connman-04-ipv6-disabled-by-default.patch",
    "content": "commit 707a0d73d7231b1821072712a7771c7aef140e21\nAuthor: Stefan Saraev <stefan@saraev.ca>\nDate:   Tue Jul 23 11:28:10 2013 +0300\n\n    ipv6 disabled by default\n\ndiff --git a/src/ipconfig.c b/src/ipconfig.c\nindex fbeff8f..3eb61c4 100644\n--- a/src/ipconfig.c\n+++ b/src/ipconfig.c\n@@ -1243,10 +1243,7 @@ static struct connman_ipconfig *create_ipv6config(int index)\n \tipv6config->index = index;\n \tipv6config->type = CONNMAN_IPCONFIG_TYPE_IPV6;\n \n-\tif (!is_ipv6_supported)\n-\t\tipv6config->method = CONNMAN_IPCONFIG_METHOD_OFF;\n-\telse\n-\t\tipv6config->method = CONNMAN_IPCONFIG_METHOD_AUTO;\n+\tipv6config->method = CONNMAN_IPCONFIG_METHOD_OFF;\n \n \tipdevice = g_hash_table_lookup(ipdevice_hash, GINT_TO_POINTER(index));\n \tif (ipdevice)\n"
  },
  {
    "path": "packages/network/connman/patches/connman-05_link-against-ncurses.patch",
    "content": "From 59bd0267cc8a581ff6f3388756a5524159a75b3b Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Sat, 13 Dec 2014 14:36:57 +0200\nSubject: [PATCH 5/5] link against ncurses\n\n---\n Makefile.am |    2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile.am b/Makefile.am\nindex 41efc1f..d1d3ddc 100644\n--- a/Makefile.am\n+++ b/Makefile.am\n@@ -312,7 +312,7 @@ client_connmanctl_SOURCES = client/dbus_helpers.h client/dbus_helpers.c \\\n \t\t\tclient/main.c\n \n client_connmanctl_LDADD = gdbus/libgdbus-internal.la @DBUS_LIBS@ @GLIB_LIBS@ \\\n-\t\t\t\t-lreadline -ldl\n+\t\t\t\t-lreadline -lncurses -ldl\n endif\n \n noinst_PROGRAMS += unit/test-ippool\n-- \n1.7.10.4\n\n"
  },
  {
    "path": "packages/network/connman/scripts/connman-setup",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n# creating initial settings file\n  if [ ! -f /storage/.cache/connman/settings ]; then\n    mkdir -p /storage/.cache/connman\n      cp /usr/share/connman/settings /storage/.cache/connman\n  fi\n\n# set variable for connman main.conf location\n  if [ -f /storage/.config/connman_main.conf ]; then\n    export CONNMAN_MAIN=\"--config=/storage/.config/connman_main.conf\"\n  else\n    export CONNMAN_MAIN=\"--config=/etc/connman/main.conf\"\n  fi\n\n# switch resolv.conf management to connman and use current contents\n# as a fallback\nif [ -f /run/libreelec/resolv.conf ]; then\n  cat /run/libreelec/resolv.conf > /run/connman/resolv.conf\nfi\nrm -f /run/libreelec/resolv.conf\nln -s /run/connman/resolv.conf /run/libreelec/resolv.conf\n"
  },
  {
    "path": "packages/network/connman/system.d/connman-vpn.service",
    "content": "[Unit]\nDescription=ConnMan VPN service\n\n[Service]\nType=dbus\nBusName=net.connman.vpn\nExecStart=/usr/sbin/connman-vpnd -n\nStandardOutput=null\nCapabilityBoundingSet=CAP_KILL CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETGID CAP_SETUID\nProtectHome=read-only\nProtectSystem=full\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/network/connman/system.d/connman.service",
    "content": "[Unit]\nDescription=Connection service\nDefaultDependencies=false\nConflicts=shutdown.target\nBefore=network.target multi-user.target shutdown.target\nAfter=dbus.service network-base.service\nWants=network.target\nConditionPathExists=!/dev/.kernel_ipconfig\n\n[Service]\nType=dbus\nBusName=net.connman\nRestart=on-failure\nEnvironmentFile=-/run/libreelec/debug/connman.conf\nExecStart=/bin/sh -c \". /usr/lib/connman/connman-setup; exec /usr/sbin/connmand -nr $CONNMAN_MAIN $CONNMAN_DEBUG\"\nStandardOutput=null\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/network/connman/system.d/network-online.service",
    "content": "[Unit]\nDescription=Wait for network to be configured by ConnMan\nAfter=connman.service\nBefore=network-online.target\nDefaultDependencies=no\nConflicts=shutdown.target\nConditionPathExists=!/dev/.kernel_ipconfig\n\n[Service]\nType=oneshot\nExecStartPre=/bin/sh -c 'echo \"waiting on Network to come online ...\"'\nExecStart=/usr/sbin/connmand-wait-online --timeout=30\nStandardOutput=tty\nRemainAfterExit=yes\n\n[Install]\nWantedBy=network-online.target\n"
  },
  {
    "path": "packages/network/connman/tmpfiles.d/z_03_connman.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nd    /run/connman                0755 root root - -\nd    /storage/.cache/connman     0755 root root - -\n"
  },
  {
    "path": "packages/network/ethtool/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ethtool\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.kernel.org/pub/software/network/ethtool/\"\nPKG_DEPENDS_TARGET=\"toolchain libmnl\"\nPKG_LONGDESC=\"Ethtool is used for querying settings of an ethernet device and changing them.\"\n\ncase \"$LINUX\" in\n  rockchip-4.4|odroid-go-a-4.4|gameforce-4.4)\n    PKG_VERSION=\"6.0\"\n    PKG_SHA256=\"d5446c93de570ce68f3b1ea69dbfa12fcfd67fc19897f655d3f18231e2b818d6\"\n    PKG_URL=\"https://www.kernel.org/pub/software/network/ethtool/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\n    ;;\n  *)\n    PKG_VERSION=\"6.1\"\n    PKG_SHA256=\"c41fc881ffa5a40432d2dd829eb44c64a49dee482e716baacf9262c64daa8f90\"\n    PKG_URL=\"https://www.kernel.org/pub/software/network/ethtool/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\n    ;;\nesac\n"
  },
  {
    "path": "packages/network/ethtool/udev.d/99-wakeup-eth.rules",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2010-2011 Roman Weber (roman@openelec.tv)\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nACTION!=\"add|change\", GOTO=\"end\"\nSUBSYSTEM!=\"net\", GOTO=\"end\"\nENV{INTERFACE}!=\"eth*\", GOTO=\"end\"\n\nTEST==\"/sys/class/net/$env{INTERFACE}/device/power/wakeup\", RUN+=\"/bin/sh -c 'echo enabled >/sys/class/net/$env{INTERFACE}/device/power/wakeup'\"\nRUN+=\"/usr/sbin/ethtool -s $env{INTERFACE} wol g\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "packages/network/iptables/config/README",
    "content": "To create your own set of Netfilters you can save your rules in:\n\n/storage/.config/iptables/rules.v4 for ipv4\n/storage/.config/iptables/rules.v6 for ipv6\n\nTo modify tables, edit with nano then save with:\n\niptables-save >/storage/.config/iptables/rules.v4\nip6tables-save >/storage/.config/iptables/rules.v6\n\nTo disable iptables use the following command:\n\nsystemctl mask iptables\n\nTo enable iptables again:\n\nsystemctl unmask iptables\n"
  },
  {
    "path": "packages/network/iptables/config/home.v4",
    "content": "*filter\n:INPUT DROP [0:0]\n:FORWARD DROP [0:0]\n:OUTPUT ACCEPT [0:0]\n:DOCKER-USER - [0:0]\n:private-subnets - [0:0]\n-A INPUT -i lo -j ACCEPT\n-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A INPUT -i tether -p udp -m conntrack --ctstate NEW -j ACCEPT\n-A INPUT -j private-subnets\n-A FORWARD -i tether -m conntrack --ctstate NEW,RELATED,ESTABLISHED -j ACCEPT\n-A FORWARD -o tether -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A DOCKER-USER -j private-subnets\n-A private-subnets -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A private-subnets -s 10.0.0.0/8 -i eth+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 172.16.0.0/12 -i eth+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 192.168.0.0/16 -i eth+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 10.0.0.0/8 -i en+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 172.16.0.0/12 -i en+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 192.168.0.0/16 -i en+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 10.0.0.0/8 -i wl+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 172.16.0.0/12 -i wl+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 192.168.0.0/16 -i wl+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 10.0.0.0/8 -i tether -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 172.16.0.0/12 -i tether -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 192.168.0.0/16 -i tether -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 10.0.0.0/8 -i docker+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 172.16.0.0/12 -i docker+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 192.168.0.0/16 -i docker+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -j REJECT --reject-with icmp-port-unreachable\nCOMMIT\n*nat\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n*mangle\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n"
  },
  {
    "path": "packages/network/iptables/config/home.v6",
    "content": "*filter\n:INPUT DROP [0:0]\n:FORWARD DROP [0:0]\n:OUTPUT ACCEPT [0:0]\n:DOCKER-USER - [0:0]\n:private-subnets - [0:0]\n-A INPUT -i lo -j ACCEPT\n-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A INPUT -i tether -p udp -m conntrack --ctstate NEW -j ACCEPT\n-A INPUT -j private-subnets\n-A FORWARD -i tether -m conntrack --ctstate NEW,RELATED,ESTABLISHED -j ACCEPT\n-A FORWARD -o tether -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A DOCKER-USER -j private-subnets\n-A private-subnets -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A private-subnets -s fc00::/7 -i eth+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s fc00::/7 -i en+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s fc00::/7 -i wl+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s fc00::/7 -i tether -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s fc00::/7 -i docker+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -j REJECT --reject-with icmp6-port-unreachable\nCOMMIT\n*nat\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n*mangle\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n"
  },
  {
    "path": "packages/network/iptables/config/public.v4",
    "content": "# Netfilter rules for public \"untrusted\" networks\n*filter\n:INPUT DROP [0:0]\n:FORWARD DROP [0:0]\n:OUTPUT ACCEPT [0:0]\n:DOCKER-USER - [0:0]\n-A INPUT -i lo -j ACCEPT\n-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n# Allow tethered Wifi AP\n-A INPUT -i tether -p udp -m conntrack --ctstate NEW -j ACCEPT\n-A INPUT -i tether -s 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 -m conntrack --ctstate NEW -j ACCEPT\n-A FORWARD -i tether -s 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 -m conntrack --ctstate NEW -j ACCEPT\n-A FORWARD -i tether -s 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\n-A FORWARD -o tether -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\n# Block DOCKER\n-A DOCKER-USER -m conntrack --ctstate RELATED,ESTABLISHED -j RETURN\n-A DOCKER-USER -j REJECT --reject-with icmp-port-unreachable\nCOMMIT\n*nat\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n*mangle\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n"
  },
  {
    "path": "packages/network/iptables/config/public.v6",
    "content": "# Netfilter Rules for trusted home networks.\n*filter\n:INPUT DROP [0:0]\n:FORWARD DROP [0:0]\n:OUTPUT ACCEPT [0:0]\n:DOCKER-USER - [0:0]\n-A INPUT -i lo -j ACCEPT\n-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n# Allow tethered Wifi AP\n-A INPUT -i tether -p udp -m conntrack --ctstate NEW -j ACCEPT\n-A INPUT -i tether -s fc00::/7 -m conntrack --ctstate NEW -j ACCEPT\n-A FORWARD -i tether -s fc00::/7 -m conntrack --ctstate NEW -j ACCEPT\n-A FORWARD -i tether -s fc00::/7 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\n-A FORWARD -o tether -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\n-A DOCKER-USER -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A DOCKER-USER -j REJECT --reject-with icmp6-port-unreachable\nCOMMIT\n*nat\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n*mangle\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n"
  },
  {
    "path": "packages/network/iptables/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"iptables\"\nPKG_VERSION=\"1.8.9\"\nPKG_SHA256=\"ef6639a43be8325a4f8ea68123ffac236cb696e8c78501b64e8106afb008c87f\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.netfilter.org/\"\nPKG_URL=\"https://www.netfilter.org/projects/iptables/files/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain linux:host libmnl libnftnl\"\nPKG_LONGDESC=\"IP packet filter administration.\"\nPKG_TOOLCHAIN=\"autotools\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/config/iptables/\n    cp -PR ${PKG_DIR}/config/README ${INSTALL}/usr/config/iptables/\n\n  mkdir -p ${INSTALL}/etc/iptables/\n    cp -PR ${PKG_DIR}/config/* ${INSTALL}/etc/iptables/\n\n  mkdir -p ${INSTALL}/usr/lib/libreelec\n    cp ${PKG_DIR}/scripts/iptables_helper ${INSTALL}/usr/lib/libreelec\n}\n\npost_install() {\n  enable_service iptables.service\n}\n"
  },
  {
    "path": "packages/network/iptables/patches/iptables-0002-xshared-fix-for-build-in-sub-directory.patch",
    "content": "--- a/libxtables/xtables.c\t2022-05-13 13:26:26.000000000 +0000\n+++ b/libxtables/xtables.c\t2022-05-14 09:53:20.593250503 +0000\n@@ -49,7 +49,7 @@\n #include <linux/netfilter_ipv4/ip_tables.h>\n #include <linux/netfilter_ipv6/ip6_tables.h>\n #include <libiptc/libxtc.h>\n-#include <libiptc/linux_list.h>\n+#include \"../libiptc/linux_list.h\"\n \n #ifndef NO_SHARED_LIBS\n #include <dlfcn.h>\n"
  },
  {
    "path": "packages/network/iptables/scripts/iptables_helper",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nIPTABLES4=\"/usr/sbin/iptables\"\nIPTABLES6=\"/usr/sbin/ip6tables\"\nIPTABLES_CMDS=\"$IPTABLES4 $IPTABLES6\"\nPUBLIC_RULES=\"/etc/iptables/public.v\"\nHOME_RULES=\"/etc/iptables/home.v\"\nCUSTOM_RULES=\"/storage/.config/iptables/rules.v\"\nDOCKER=\"service.system.docker.service\"\nSYSTEMCTL=\"/usr/bin/systemctl\"\nCONNMANCTL=\"/usr/bin/connmanctl\"\n\ncheck_docker() {\n  $SYSTEMCTL is-active --quiet $DOCKER && $SYSTEMCTL restart $DOCKER\n}\n\nget_technology_config() {\n  $CONNMANCTL technologies | awk -v pattern=\"^/.*/technology/$1$\" -e 'BEGIN {S=0}; /^\\/.*/ {S=0}; $0 ~ pattern {S=1}; S==1 {print $0}'\n}\n\ncheck_tether() {\n  for technology in wifi ethernet; do\n    if get_technology_config $technology | grep -q 'Tethering = True'; then\n      $CONNMANCTL tether $technology off\n      sleep 1\n      $CONNMANCTL tether $technology on\n      break\n    fi\n  done\n}\n\nflush() {\n  for cmd in $IPTABLES_CMDS; do\n    $cmd -F\n    $cmd -X\n    $cmd -t nat -F\n    $cmd -t nat -X\n    $cmd -t mangle -F\n    $cmd -t mangle -X\n    $cmd -P INPUT ACCEPT\n    $cmd -P FORWARD ACCEPT\n    $cmd -P OUTPUT ACCEPT\n  done\n  check_docker\n  check_tether\n}\n\nenable() {\n  for cmd in $IPTABLES_CMDS; do\n    case \"$cmd\" in\n      *6*) \n         rules=\"$RULES6\"\n\t ipv=\"6\"\n\t ;;\n        *) \n         rules=\"$RULES4\"\n\t ipv=\"4\"\n\t ;;\n    esac\n    if [ -e \"$rules\" ]; then\n      \"$cmd-restore\" \"$rules\" \n    fi\n  done\n  check_docker\n  check_tether\n}\n\nif [ \"$1\" = \"enable\" ]; then\n  case \"${RULES}\" in\n    \"none\") \n       flush\n       ;;\n    \"public\") \n       RULES4=\"${PUBLIC_RULES}4\"\n       RULES6=\"${PUBLIC_RULES}6\"\n       ;;\n    \"home\") \n       RULES4=\"${HOME_RULES}4\"\n       RULES6=\"${HOME_RULES}6\"\n       ;;\n    \"custom\") \n       RULES4=\"${CUSTOM_RULES}4\"\n       RULES6=\"${CUSTOM_RULES}6\"\n       ;;\n    *) \n       exit 1\n       ;;\n  esac\n  enable\nelif [ \"$1\" = \"disable\" ]; then\n  flush\nelse\n  exit 1\nfi\n\nexit 0\n"
  },
  {
    "path": "packages/network/iptables/system.d/iptables.service",
    "content": "[Unit]\nDescription=IPTABLES Packet Filtering\nConditionPathExists=/usr/lib/libreelec/iptables_helper\nConditionPathExists=|/storage/.cache/services/iptables.conf\nBefore=network.target\nWants=network.target\n\n[Service]\nType=oneshot\nEnvironmentFile=-/storage/.cache/services/iptables.conf\nExecStart=/usr/lib/libreelec/iptables_helper enable\nExecReload=/usr/lib/libreelec/iptables_helper enable\nExecStop=/usr/lib/libreelec/iptables_helper disable\nRemainAfterExit=yes\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/network/iw/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"iw\"\nPKG_VERSION=\"5.19\"\nPKG_SHA256=\"f167bbe947dd53bb9ebc0c1dcef5db6ad73ac1d6084f2c6f9376c5c360cc4d4e\"\nPKG_LICENSE=\"PUBLIC_DOMAIN\"\nPKG_SITE=\"http://wireless.kernel.org/en/users/Documentation/iw\"\nPKG_URL=\"https://www.kernel.org/pub/software/network/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libnl\"\nPKG_LONGDESC=\"A new nl80211 based CLI configuration utility for wireless devices.\"\n# iw fails at runtime with lto enabled\n\npre_configure_target() {\n  export LDFLAGS=\"${LDFLAGS} -pthread\"\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/iw\n    cp ${PKG_DIR}/scripts/setregdomain ${INSTALL}/usr/lib/iw\n}\n"
  },
  {
    "path": "packages/network/iw/scripts/setregdomain",
    "content": "#!/bin/sh\n\nREGDOMAIN=\nREGDOMAIN_CONF=\"/storage/.cache/regdomain.conf\"\n[ -r \"$REGDOMAIN_CONF\" ] && . \"$REGDOMAIN_CONF\"\n[ -z \"$REGDOMAIN\" ] && exit 0\n\nexec /usr/sbin/iw reg set \"$REGDOMAIN\"\n"
  },
  {
    "path": "packages/network/iw/udev.d/60-iw-regdomain.rules",
    "content": "SUBSYSTEM==\"ieee80211\", ACTION==\"add\", RUN+=\"/usr/lib/iw/setregdomain\"\n"
  },
  {
    "path": "packages/network/iwd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"iwd\"\nPKG_VERSION=\"2.6\"\nPKG_SHA256=\"f7ac93aeef672604f5b5194ca038035ae222925be392c4345873c9742f477797\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://git.kernel.org/cgit/network/wireless/iwd.git/about/\"\nPKG_URL=\"https://www.kernel.org/pub/linux/network/wireless/iwd-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain readline dbus\"\nPKG_LONGDESC=\"Wireless daemon for Linux\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-client \\\n                           --enable-monitor \\\n                           --enable-systemd-service \\\n                           --enable-dbus-policy \\\n                           --disable-manual-pages\"\n\npre_configure_target() {\n  export LIBS=\"-lncurses\"\n}\n\npost_makeinstall_target() {\n  # ProtectSystem et al seems to break the service when systemd isn't built with seccomp.\n  # investigate this more as it might be a systemd problem or kernel problem\n  sed -e 's|^\\(PrivateTmp=.*\\)$|#\\1|g' \\\n      -e 's|^\\(NoNewPrivileges=.*\\)$|#\\1|g' \\\n      -e 's|^\\(PrivateDevices=.*\\)$|#\\1|g' \\\n      -e 's|^\\(ProtectHome=.*\\)$|#\\1|g' \\\n      -e 's|^\\(ProtectSystem=.*\\)$|#\\1|g' \\\n      -e 's|^\\(ReadWritePaths=.*\\)$|#\\1|g' \\\n      -e 's|^\\(ProtectControlGroups=.*\\)$|#\\1|g' \\\n      -e 's|^\\(ProtectKernelModules=.*\\)$|#\\1|g' \\\n      -e 's|^\\(ConfigurationDirectory=.*\\)$|#\\1|g' \\\n      -i ${INSTALL}/usr/lib/systemd/system/iwd.service\n}\n\npost_install() {\n  enable_service iwd.service\n}\n\n"
  },
  {
    "path": "packages/network/libdnet/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libdnet\"\nPKG_VERSION=\"1.14\"\nPKG_SHA256=\"592599c54a57102a177270f3a2caabda2c2ac7768b977d7458feba97da923dfe\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://github.com/ofalk/libdnet\"\nPKG_URL=\"https://github.com/ofalk/libdnet/archive/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A simplified, portable interface to several low-level networking routines\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_func_strlcat=no \\\n                           ac_cv_func_strlcpy=no \\\n                           --enable-static \\\n                           --disable-shared \\\n                           --disable-python\"\n\npre_configure_target() {\n  export CFLAGS+=\" -I${PKG_BUILD}/include\"\n}\n\npost_makeinstall_target() {\n  cp ${SYSROOT_PREFIX}/usr/bin/dnet-config \\\n     ${TOOLCHAIN}/bin/dnet-config\n}\n"
  },
  {
    "path": "packages/network/libmnl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libmnl\"\nPKG_VERSION=\"1.0.5\"\nPKG_SHA256=\"274b9b919ef3152bfb3da3a13c950dd60d6e2bcd54230ffeca298d03b40d0525\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://netfilter.org/projects/libmnl\"\nPKG_URL=\"http://netfilter.org/projects/libmnl/files/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A minimalistic user-space library oriented to Netlink developers.\"\n"
  },
  {
    "path": "packages/network/libnfs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libnfs\"\nPKG_VERSION=\"5.0.2\"\nPKG_SHA256=\"637e56643b19da9fba98f06847788c4dad308b723156a64748041035dcdf9bd3\"\nPKG_LICENSE=\"LGPL2.1+\"\nPKG_SITE=\"https://github.com/sahlberg/libnfs\"\nPKG_URL=\"https://github.com/sahlberg/libnfs/archive/libnfs-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A client library for accessing NFS shares over a network.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-examples\"\n\npre_configure_target() {\n  export CFLAGS=\"${CFLAGS} -D_FILE_OFFSET_BITS=64\"\n}\n"
  },
  {
    "path": "packages/network/libnftnl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libnftnl\"\nPKG_VERSION=\"1.2.4\"\nPKG_SHA256=\"c0fe233be4cdfd703e7d5977ef8eb63fcbf1d0052b6044e1b23d47ca3562477f\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://netfilter.org/projects/libnftnl\"\nPKG_URL=\"https://netfilter.org/projects/libnftnl/files/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libmnl\"\nPKG_LONGDESC=\"A userspace library providing a low-level netlink programming interface (API) to the in-kernel nf_tables subsystem.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-shared --enable-static\"\n"
  },
  {
    "path": "packages/network/libnl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libnl\"\nPKG_VERSION=\"3.7.0\"\nPKG_SHA256=\"9fe43ccbeeea72c653bdcf8c93332583135cda46a79507bfd0a483bb57f65939\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://github.com/thom311/libnl\"\nPKG_URL=\"https://github.com/thom311/libnl/releases/download/libnl${PKG_VERSION//./_}/libnl-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A library for applications dealing with netlink socket.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           --disable-cli\"\n"
  },
  {
    "path": "packages/network/libshairplay/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libshairplay\"\nPKG_VERSION=\"096b61ad14c90169f438e690d096e3fcf87e504e\"\nPKG_SHA256=\"7e2b013ffe75ea2f13fb12b1aa38b8e2e8b1899ac292d57f05d7b352a3a181cf\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/juhovh/shairplay\"\nPKG_URL=\"https://github.com/juhovh/shairplay/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain avahi\"\nPKG_LONGDESC=\"Apple airplay and raop protocol server\"\nPKG_TOOLCHAIN=\"autotools\"\n\npre_configure_target() {\n  CFLAGS+=\" -I${SYSROOT_PREFIX}/usr/include/avahi-compat-libdns_sd\"\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/etc/shairplay\n    cp -P ../airport.key ${INSTALL}/etc/shairplay\n}\n"
  },
  {
    "path": "packages/network/libshairplay/patches/libshairplay-read_airportkey_from_etc.patch",
    "content": "--- shairplay-0.9.0.orig/src/shairplay.c\n+++ shairplay-0.9.0/src/shairplay.c\n@@ -313,9 +313,12 @@ main(int argc, char *argv[])\n \n \traop = raop_init_from_keyfile(10, &raop_cbs, \"airport.key\", NULL);\n \tif (raop == NULL) {\n-\t\tfprintf(stderr, \"Could not initialize the RAOP service\\n\");\n-\t\tfprintf(stderr, \"Please make sure the airport.key file is in the current directory.\\n\");\n-\t\treturn -1;\n+\t\traop = raop_init_from_keyfile(10, &raop_cbs, \"/etc/shairplay/airport.key\", NULL);\n+\t\tif (raop == NULL) {\n+\t\t\tfprintf(stderr, \"Could not initialize the RAOP service\\n\");\n+\t\t\tfprintf(stderr, \"Please make sure the airport.key file is in the current directory.\\n\");\n+\t\t\treturn -1;\n+\t\t}\n \t}\n \n \tif (strlen(options.password)) {\n\n"
  },
  {
    "path": "packages/network/libssh/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libssh\"\nPKG_VERSION=\"0.10.4\"\nPKG_SHA256=\"07392c54ab61476288d1c1f0a7c557b50211797ad00c34c3af2bbc4dbc4bd97d\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"http://www.libssh.org/\"\nPKG_URL=\"https://www.libssh.org/files/$(get_pkg_version_maj_min)/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib openssl\"\nPKG_LONGDESC=\"Library for accessing ssh client services through C libraries.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_SHARED_LIBS=OFF \\\n                       -DWITH_SERVER=OFF \\\n                       -DWITH_GCRYPT=OFF \\\n                       -DWITH_EXAMPLES=OFF \\\n                       -DWITH_GSSAPI=OFF \\\n                       -DWITH_GEX=OFF \\\n                       -DWITH_INTERNAL_DOC=OFF\"\n\nmakeinstall_target() {\n# install static library only\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n    cp ${PKG_BUILD}/.${TARGET_NAME}/src/libssh.a ${SYSROOT_PREFIX}/usr/lib\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n    cp ${PKG_BUILD}/.${TARGET_NAME}/libssh.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/libssh\n    cp ${PKG_BUILD}/include/libssh/{callbacks.h,legacy.h,libssh.h,server.h,sftp.h,ssh2.h} \\\n       ${PKG_BUILD}/.${TARGET_NAME}/include/libssh/libssh_version.h \\\n    ${SYSROOT_PREFIX}/usr/include/libssh\n}\n"
  },
  {
    "path": "packages/network/libtirpc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libtirpc\"\nPKG_VERSION=\"1.3.3\"\nPKG_SHA256=\"6474e98851d9f6f33871957ddee9714fdcd9d8a5ee9abb5a98d63ea2e60e12f3\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://sourceforge.net/projects/libtirpc/\"\nPKG_URL=\"https://downloads.sourceforge.net/project/libtirpc/libtirpc/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A port of Suns Transport-Independent RPC library to Linux.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared \\\n                           --disable-silent-rules \\\n                           --enable-ipv6 \\\n                           --disable-gssapi \\\n                           --with-gnu-ld\"\n"
  },
  {
    "path": "packages/network/netbase/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"netbase\"\nPKG_VERSION=\"6.4\"\nPKG_SHA256=\"fa6621826ff1150e581bd90bc3c8a4ecafe5df90404f207db6dcdf2c75f26ad7\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://salsa.debian.org/md/netbase\"\nPKG_URL=\"http://ftp.debian.org/debian/pool/main/n/netbase/netbase_${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"The netbase package provides data for network services and protocols from the iana db.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/etc\n    cp etc/protocols ${INSTALL}/etc\n    cp etc/services ${INSTALL}/etc\n}\n"
  },
  {
    "path": "packages/network/nfs-utils/config/exports.sample",
    "content": "/media   *(rw,no_root_squash,insecure,no_subtree_check,fsid=0,crossmnt)\n"
  },
  {
    "path": "packages/network/nfs-utils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"nfs-utils\"\nPKG_VERSION=\"2.6.4\"\nPKG_SHA256=\"c0ae376ac056011ed0954deba2362d7d8193c653b500b68a543aec512cd2ecfa\"\nPKG_LICENSE=\"GPL-2.0+\"\nPKG_SITE=\"http://nfs.sourceforge.net/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/nfs/nfs-utils/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2\"\nPKG_DEPENDS_HOST=\"toolchain\"\nPKG_DEPENDS_TARGET=\"toolchain nfs-utils:host systemd sqlite libtirpc rpcsvc-proto libevent libdevmapper\"\nPKG_LONGDESC=\"The NFS Utilities package contains the userspace server and client tools necessary to use the kernel NFS abilities.\"\n\npost_unpack() {\n  # we use own proc-fs-nfsd.mount file to also load nfsd module\n  cp $PKG_DIR/system.d/* $PKG_BUILD/systemd\n\n  # move path /var/lib/nfs -> /run/nfs\n  #   nfsdcld[3268]: cld_inotify_setup: inotify_add_watch failed: No such file or directory\n  find $PKG_BUILD -type f -exec sed -i \\\n    -e 's|/var/lib/nfs|/run/nfs|g' \\\n    -e 's|var-lib-nfs|run-nfs|g' {} \\;\n\n  mv $PKG_BUILD/systemd/var-lib-nfs-rpc_pipefs.mount \\\n     $PKG_BUILD/systemd/run-nfs-rpc_pipefs.mount\n  mv $PKG_BUILD/systemd/var-lib-nfs-rpc_pipefs.mount.in \\\n     $PKG_BUILD/systemd/run-nfs-rpc_pipefs.mount.in\n}\n\npre_configure_host() {\n  cd $PKG_BUILD\n  rm -rf .$HOST_NAME\n\n[ -f /etc/lsb-release ] && ( grep -q \"22.04\" /etc/lsb-release ) && CFLAGS+=\" -I/usr/include/tirpc\"\n\n  PKG_CONFIGURE_OPTS_HOST=\" \\\n    --with-statedir=/run/nfs \\\n    --with-rpcgen=internal \\\n    libsqlite3_cv_is_recent=unknown \\\n    ac_cv_header_rpc_rpc_h=yes \\\n    ac_cv_header_event2_event_h=yes \\\n    ac_cv_lib_event_core_event_base_dispatch=yes \\\n    --disable-nfsdcld \\\n    --disable-nfsv4 \\\n    --disable-nfsv41 \\\n    --disable-gss \\\n    --disable-uuid \\\n    --disable-ipv6 \\\n    --disable-caps \\\n    --disable-tirpc \\\n    --without-systemd \\\n    --without-tcp-wrappers\"\n}\n\npre_configure_target() {\n  cd $PKG_BUILD\n  rm -rf .$TARGET_NAME\n\n  PKG_CONFIGURE_OPTS_TARGET=\" \\\n    --with-systemd=/usr/lib/systemd/system \\\n    --with-nfsconfig=/storage/.config/nfs.conf \\\n    --with-statduser=$(whoami) \\\n    --with-statedir=/run/nfs \\\n    --with-rpcgen=$PKG_BUILD/tools/rpcgen/rpcgen \\\n    --enable-nfsv4 \\\n    --enable-nfsv41 \\\n    --enable-tirpc \\\n    --enable-uuid \\\n    --disable-gss \\\n    --disable-ipv6 \\\n    --without-tcp-wrappers\"\n\n  # use different paths /etc -> /storage/.config\n  # /etc/exports\n  CFLAGS+=\" -D_PATH_EXPORTS=\\\\\\\"/storage/.config/exports\\\\\\\"\"\n  # /etc/exports.d\n  CFLAGS+=\" -D_PATH_EXPORTS_D=\\\\\\\"/storage/.config/exports.d\\\\\\\"\"\n  # /etc/idmapd.conf\n  CFLAGS+=\" -D_PATH_IDMAPDCONF=\\\\\\\"/storage/.config/idmapd.conf\\\\\\\"\"\n  # we don't have nobody user and group\n  CFLAGS+=\" -DNFS4NOBODY_USER=\\\\\\\"root\\\\\\\"\"\n  CFLAGS+=\" -DNFS4NOBODY_GROUP=\\\\\\\"root\\\\\\\"\"\n}\n\nmake_host() {\n  make rpcgen -C tools/rpcgen\n}\n\nmakeinstall_host() {\n  : #\n}\n\npost_makeinstall_target() {\n  mkdir -p $INSTALL/usr/config\n\n  cp nfs.conf $INSTALL/usr/config\n  cp support/nfsidmap/idmapd.conf $INSTALL/usr/config\n  cp $PKG_DIR/config/* $INSTALL/usr/config\n\n  # we use tmpfs for it\n  rm -fr \"$INSTALL/run\"\n\n  # we have symbolic link to /usr/sbin\n  mkdir -p $INSTALL/usr/sbin\n  chmod 755 $INSTALL/sbin/*\n  mv $INSTALL/sbin/* $INSTALL/usr/sbin\n  rmdir $INSTALL/sbin\n}\n\npost_install() {\n  enable_service nfs-server.service\n}\n"
  },
  {
    "path": "packages/network/nfs-utils/patches/nfs-utils-01-ce-specific.patch",
    "content": "diff -aurNp a/systemd/nfs-server.service b/systemd/nfs-server.service\n--- a/systemd/nfs-server.service\t2020-02-09 20:41:19.000000000 +0100\n+++ b/systemd/nfs-server.service\t2020-08-03 11:43:44.697756700 +0200\n@@ -18,6 +18,8 @@ Before= rpc-statd-notify.service\n Wants=auth-rpcgss-module.service\n After=rpc-gssd.service gssproxy.service rpc-svcgssd.service\n \n+ConditionPathExists=/storage/.config/exports\n+\n [Service]\n Type=oneshot\n RemainAfterExit=yes\ndiff -aurNp a/systemd/proc-fs-nfsd.mount b/systemd/proc-fs-nfsd.mount\n--- a/systemd/proc-fs-nfsd.mount\t2020-02-09 20:41:19.000000000 +0100\n+++ b/systemd/proc-fs-nfsd.mount\t2020-08-03 11:44:12.913697307 +0200\n@@ -1,5 +1,7 @@\n [Unit]\n Description=NFSD configuration filesystem\n+Requires=load-module-nfsd.service\n+After=load-module-nfsd.service\n \n [Mount]\n What=nfsd\n"
  },
  {
    "path": "packages/network/nfs-utils/system.d/load-module-nfsd.service",
    "content": "[Unit]\nDescription=Load module nfsd service\n\n[Service]\nType=oneshot\nExecStart=/usr/sbin/modprobe nfsd\nRemainAfterExit=true\n"
  },
  {
    "path": "packages/network/nfs-utils/tmpfiles.d/nfs-utils.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nd  /run/nfs/sm      0700 root root -\nd  /run/nfs/sm.bak  0700 root root -\nf  /run/nfs/rmtab   0644 root root -\nf  /run/nfs/etab    0644 root root -\n"
  },
  {
    "path": "packages/network/nss-mdns/config/nsswitch.conf",
    "content": "# /etc/nsswitch.conf\n#\n# Example configuration of GNU Name Service Switch functionality.\n#\n\npasswd:\t\tfiles\ngroup:\t\tfiles\nshadow:\t\tfiles\ngshadow:\tfiles\n\nhosts:\t\tfiles mdns_minimal [NOTFOUND=return] dns\nnetworks:\tfiles dns\n\nprotocols:\tfiles\nservices:\tfiles\nethers:\t\tfiles\nrpc:\t\tfiles\n\nnetgroup:\tfiles\n"
  },
  {
    "path": "packages/network/nss-mdns/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"nss-mdns\"\nPKG_VERSION=\"0.15.1\"\nPKG_SHA256=\"2d1b8de2e9ed5526f51c8bb627b719c07668465b5315787e7cfeed776ab90b9a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/lathiat/nss-mdns\"\nPKG_URL=\"https://github.com/lathiat/nss-mdns/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain avahi\"\nPKG_LONGDESC=\"A plugin for nss to allow name resolution via Multicast DNS.\"\nPKG_TOOLCHAIN=\"autotools\"\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/etc\n  cp ${PKG_DIR}/config/nsswitch.conf ${INSTALL}/etc/nsswitch.conf\n}\n"
  },
  {
    "path": "packages/network/openssh/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"openssh\"\nPKG_VERSION=\"9.2p1\"\nPKG_SHA256=\"3f66dbf1655fb45f50e1c56da62ab01218c228807b21338d634ebcdf9d71cf46\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.openssh.com/\"\nPKG_URL=\"https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain openssl zlib\"\nPKG_LONGDESC=\"An open re-implementation of the SSH package.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+lto\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_header_rpc_types_h=no \\\n                           --sysconfdir=/etc/ssh \\\n                           --libexecdir=/usr/lib/openssh \\\n                           --disable-strip \\\n                           --disable-lastlog \\\n                           --with-sandbox=no \\\n                           --disable-utmp \\\n                           --disable-utmpx \\\n                           --disable-wtmp \\\n                           --disable-wtmpx \\\n                           --without-rpath \\\n                           --with-ssl-engine \\\n                           --with-privsep-user=nobody \\\n                           --disable-pututline \\\n                           --disable-pututxline \\\n                           --disable-etc-default-login \\\n                           --with-keydir=/storage/.cache/ssh \\\n                           --without-pam\"\n\npre_configure_target() {\n  export LD=\"${CC}\"\n  export LDFLAGS=\"${TARGET_CFLAGS} ${TARGET_LDFLAGS}\"\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/lib/openssh/ssh-keysign\n  rm -rf ${INSTALL}/usr/lib/openssh/ssh-pkcs11-helper\n  if [ ! ${SFTP_SERVER} = \"yes\" ]; then\n    rm -rf ${INSTALL}/usr/lib/openssh/sftp-server\n  fi\n  rm -rf ${INSTALL}/usr/bin/ssh-add\n  rm -rf ${INSTALL}/usr/bin/ssh-agent\n  rm -rf ${INSTALL}/usr/bin/ssh-keyscan\n\n  sed -e \"s|^#PermitRootLogin.*|PermitRootLogin yes|g\" \\\n      -e \"s|^#StrictModes.*|StrictModes no|g\" \\\n      -i ${INSTALL}/etc/ssh/sshd_config\n\n  debug_strip ${INSTALL}/usr\n}\n\npost_install() {\n  enable_service sshd.service\n}\n"
  },
  {
    "path": "packages/network/openssh/patches/openssh-8.9p1-keydir.patch",
    "content": "diff -u a/configure.ac b/configure.ac\n--- a/configure.ac\t2018-10-16 20:01:20.000000000 -0400\n+++ b/configure.ac\t2018-12-06 04:08:42.718993760 -0500\n@@ -5185,6 +5185,19 @@\n )\n \n \n+# Set keydir\n+AC_ARG_WITH([keydir],\n+\t[  --with-keydir=      Specify different path for storing keys],\n+\t[\n+\t\tif test -n \"$withval\" && test \"x$withval\" != \"xno\" && \\\n+\t\t\ttest \"x${withval}\" != \"xyes\"; then\n+\t\t\tKEYDIR=$withval\n+\t\tfi\n+\t]\n+)\n+AC_SUBST([KEYDIR])\n+\n+\n AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])\n IPV4_IN6_HACK_MSG=\"no\"\n AC_ARG_WITH(4in6,\n@@ -5565,6 +5578,7 @@\n H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`\n I=`eval echo ${user_path}` ; I=`eval echo ${I}`\n J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`\n+K=`eval echo ${KEYDIR}` ; K=`eval echo ${K}`\n \n echo \"\"\n echo \"OpenSSH has been configured with the following options:\"\n@@ -5588,6 +5602,9 @@\n if test ! -z \"$superuser_path\" ; then\n echo \"          sshd superuser user PATH: $J\"\n fi\n+if test ! -z \"$KEYDIR\" ; then\n+echo \"                       sshd keydir: $K\"\n+fi\n echo \"                    Manpage format: $MANTYPE\"\n echo \"                       PAM support: $PAM_MSG\"\n echo \"                   OSF SIA support: $SIA_MSG\"\nCommon subdirectories: a/contrib and b/contrib\ndiff -u a/Makefile.in b/Makefile.in\n--- a/Makefile.in\t2018-10-16 20:01:20.000000000 -0400\n+++ b/Makefile.in\t2018-12-06 04:00:04.301968236 -0500\n@@ -32,8 +32,10 @@\n STRIP_OPT=@STRIP_OPT@\n TEST_SHELL=@TEST_SHELL@\n BUILDDIR=@abs_top_builddir@\n+KEYDIR=@KEYDIR@\n \n PATHS= -DSSHDIR=\\\"$(sysconfdir)\\\" \\\n+\t-DKEYDIR=\\\"$(KEYDIR)\\\" \\\n \t-D_PATH_SSH_PROGRAM=\\\"$(SSH_PROGRAM)\\\" \\\n \t-D_PATH_SSH_ASKPASS_DEFAULT=\\\"$(ASKPASS_PROGRAM)\\\" \\\n \t-D_PATH_SFTP_SERVER=\\\"$(SFTP_SERVER)\\\" \\\n@@ -168,11 +170,11 @@\n \t-e 's|/etc/ssh/sshd_config|$(sysconfdir)/sshd_config|g' \\\n \t-e 's|/usr/libexec|$(libexecdir)|g' \\\n \t-e 's|/etc/shosts.equiv|$(sysconfdir)/shosts.equiv|g' \\\n-\t-e 's|/etc/ssh/ssh_host_key|$(sysconfdir)/ssh_host_key|g' \\\n-\t-e 's|/etc/ssh/ssh_host_ecdsa_key|$(sysconfdir)/ssh_host_ecdsa_key|g' \\\n-\t-e 's|/etc/ssh/ssh_host_dsa_key|$(sysconfdir)/ssh_host_dsa_key|g' \\\n-\t-e 's|/etc/ssh/ssh_host_rsa_key|$(sysconfdir)/ssh_host_rsa_key|g' \\\n-\t-e 's|/etc/ssh/ssh_host_ed25519_key|$(sysconfdir)/ssh_host_ed25519_key|g' \\\n+\t-e 's|/etc/ssh/ssh_host_key|$(KEYDIR)/ssh_host_key|g' \\\n+\t-e 's|/etc/ssh/ssh_host_ecdsa_key|$(KEYDIR)/ssh_host_ecdsa_key|g' \\\n+\t-e 's|/etc/ssh/ssh_host_dsa_key|$(KEYDIR)/ssh_host_dsa_key|g' \\\n+\t-e 's|/etc/ssh/ssh_host_rsa_key|$(KEYDIR)/ssh_host_rsa_key|g' \\\n+\t-e 's|/etc/ssh/ssh_host_ed25519_key|$(KEYDIR)/ssh_host_ed25519_key|g' \\\n \t-e 's|/var/run/sshd.pid|$(piddir)/sshd.pid|g' \\\n \t-e 's|/etc/moduli|$(sysconfdir)/moduli|g' \\\n \t-e 's|/etc/ssh/moduli|$(sysconfdir)/moduli|g' \\\nCommon subdirectories: a/openbsd-compat and b/openbsd-compat\ndiff -u a/pathnames.h b/pathnames.h\n--- a/pathnames.h\t2018-10-16 20:01:20.000000000 -0400\n+++ b/pathnames.h\t2018-12-06 04:15:01.286012398 -0500\n@@ -18,6 +18,10 @@\n #define SSHDIR\t\t\t\tETCDIR \"/ssh\"\n #endif\n \n+#ifndef KEYDIR\n+#define KEYDIR\t\t\t\tSSHDIR\n+#endif\n+\n #ifndef _PATH_SSH_PIDDIR\n #define _PATH_SSH_PIDDIR\t\t\"/var/run\"\n #endif\n@@ -26,9 +30,9 @@\n  * System-wide file containing host keys of known hosts.  This file should be\n  * world-readable.\n  */\n-#define _PATH_SSH_SYSTEM_HOSTFILE\tSSHDIR \"/ssh_known_hosts\"\n+#define _PATH_SSH_SYSTEM_HOSTFILE\tKEYDIR \"/ssh_known_hosts\"\n /* backward compat for protocol 2 */\n-#define _PATH_SSH_SYSTEM_HOSTFILE2\tSSHDIR \"/ssh_known_hosts2\"\n+#define _PATH_SSH_SYSTEM_HOSTFILE2\tKEYDIR \"/ssh_known_hosts2\"\n \n /*\n  * Of these, ssh_host_key must be readable only by root, whereas ssh_config\n@@ -36,12 +40,12 @@\n  */\n #define _PATH_SERVER_CONFIG_FILE\tSSHDIR \"/sshd_config\"\n #define _PATH_HOST_CONFIG_FILE\t\tSSHDIR \"/ssh_config\"\n-#define _PATH_HOST_DSA_KEY_FILE\t\tSSHDIR \"/ssh_host_dsa_key\"\n-#define _PATH_HOST_ECDSA_KEY_FILE\tSSHDIR \"/ssh_host_ecdsa_key\"\n-#define _PATH_HOST_ED25519_KEY_FILE\tSSHDIR \"/ssh_host_ed25519_key\"\n-#define _PATH_HOST_XMSS_KEY_FILE\tSSHDIR \"/ssh_host_xmss_key\"\n-#define _PATH_HOST_RSA_KEY_FILE\t\tSSHDIR \"/ssh_host_rsa_key\"\n-#define _PATH_DH_MODULI\t\t\tSSHDIR \"/moduli\"\n+#define _PATH_HOST_DSA_KEY_FILE\t\tKEYDIR \"/ssh_host_dsa_key\"\n+#define _PATH_HOST_ECDSA_KEY_FILE\tKEYDIR \"/ssh_host_ecdsa_key\"\n+#define _PATH_HOST_ED25519_KEY_FILE\tKEYDIR \"/ssh_host_ed25519_key\"\n+#define _PATH_HOST_XMSS_KEY_FILE\tKEYDIR \"/ssh_host_xmss_key\"\n+#define _PATH_HOST_RSA_KEY_FILE\t\tKEYDIR \"/ssh_host_rsa_key\"\n+#define _PATH_DH_MODULI\t\t\tKEYDIR \"/moduli\"\n \n #ifndef _PATH_SSH_PROGRAM\n #define _PATH_SSH_PROGRAM\t\t\"/usr/bin/ssh\"\n"
  },
  {
    "path": "packages/network/openssh/patches/openssh-motd-add-device-info.patch",
    "content": "Using username \"root\".\nroot@192.168.1.8's password:\nSend automatic password\n##############################################\n#                  CoreELEC                  #\n#            https://coreelec.org            #\n##############################################\n\nCoreELEC (community): 20.0-Nexus_devel_20220926082903 (Amlogic-ne.arm)\n       Machine model: Khadas VIM4\n      CoreELEC dt-id: t7_a311d2_khadas_vim4\n\nCoreELEC:~ #\n\n\n--- a/session.c\t2022-09-24 17:07:26.675597500 +0200\n+++ b/session.c\t2022-09-26 11:06:59.549512600 +0200\n@@ -792,6 +792,9 @@ do_motd(void)\n {\n \tFILE *f;\n \tchar buf[256];\n+\tchar *p;\n+\tssize_t len_pretty = 0;\n+\tssize_t len;\n \n \tif (options.print_motd) {\n #ifdef HAVE_LOGIN_CAP\n@@ -805,6 +808,73 @@ do_motd(void)\n \t\t\t\tfputs(buf, stdout);\n \t\t\tfclose(f);\n \t\t}\n+\n+\t\t/* get os pretty name length */\n+\t\tf = fopen(\"/etc/os-release\", \"r\");\n+\t\tif (f) {\n+\t\t\twhile (fgets(buf, sizeof(buf), f)) {\n+\t\t\t\tif (strncmp(buf, \"PRETTY_NAME=\", 12) == 0) {\n+\t\t\t\t\tp = strchr(&buf[12], ':');\n+\t\t\t\t\tif (p)\n+\t\t\t\t\t\tlen_pretty = p - &buf[12];\n+\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\tfclose(f);\n+\t\t}\n+\n+\t\t/* display machine model */\n+\t\tf = fopen(\"/proc/device-tree/model\", \"r\");\n+\t\tif (f) {\n+\t\t\tlen = len_pretty - 14;\n+\t\t\tif (len < 0)\n+\t\t\t\tlen = 0;\n+\n+\t\t\tmemset(buf, ' ', sizeof(buf));\n+\t\t\tsnprintf(&buf[len], sizeof(buf) - len, \"Machine model: \");\n+\t\t\tfputs(buf, stdout);\n+\t\t\tfgets(buf, sizeof(buf), f);\n+\t\t\tfputs(buf, stdout);\n+\t\t\tfputs(\"\\n\", stdout);\n+\t\t\tfclose(f);\n+\t\t}\n+\n+\t\t/* display coreelec dt-id */\n+\t\tf = fopen(\"/proc/device-tree/coreelec-dt-id\", \"r\");\n+\t\tif (f) {\n+\t\t\tlen = len_pretty - 15;\n+\t\t\tif (len < 0)\n+\t\t\t\tlen = 0;\n+\n+\t\t\tmemset(buf, ' ', sizeof(buf));\n+\t\t\tsnprintf(&buf[len], sizeof(buf) - len, \"CoreELEC dt-id: \");\n+\t\t\tfputs(buf, stdout);\n+\t\t\tfgets(buf, sizeof(buf), f);\n+\t\t\tfputs(buf, stdout);\n+\t\t\tfputs(\"\\n\", stdout);\n+\t\t\tfclose(f);\n+\t\t}\n+\n+\t\t/* display amlogic dt-id */\n+\t\tf = fopen(\"/proc/device-tree/amlogic-dt-id\", \"r\");\n+\t\tif (f) {\n+\t\t\tlen = len_pretty - 14;\n+\t\t\tif (len < 0)\n+\t\t\t\tlen = 0;\n+\n+\t\t\tmemset(buf, ' ', sizeof(buf));\n+\t\t\tsnprintf(&buf[len], sizeof(buf) - len, \"Amlogic dt-id: \");\n+\t\t\tfputs(buf, stdout);\n+\t\t\tfgets(buf, sizeof(buf), f);\n+\t\t\tfputs(buf, stdout);\n+\t\t\tfputs(\"\\n\", stdout);\n+\t\t\tfclose(f);\n+\t\t}\n+\n+\t\t/* put empty line before prompt */\n+\t\tfputs(\"\\n\", stdout);\n \t}\n }\n \n"
  },
  {
    "path": "packages/network/openssh/patches/openssh-silence-missing-identity-error.patch",
    "content": "diff --git a/sshconnect2.c b/sshconnect2.c\nindex d6af0b9..22c0aa6 100644\n--- a/sshconnect2.c\n+++ b/sshconnect2.c\n@@ -1524,9 +1524,7 @@\n \tstruct stat st;\n \n \tif (stat(id->filename, &st) == -1) {\n-\t\tdo_log2(id->userprovided ?\n-\t\t    SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_DEBUG3,\n-\t\t    \"no such identity: %s: %s\", id->filename, strerror(errno));\n+\t\tdebug3(\"no such identity: %s\", id->filename);\n \t\treturn NULL;\n \t}\n \tsnprintf(prompt, sizeof prompt,\n"
  },
  {
    "path": "packages/network/openssh/patches/openssh-source-etc-environment.patch",
    "content": "From c05ee9208db5e25d550ec6dd4b5ff54a199959fd Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Mon, 16 Dec 2019 20:34:22 +0000\nSubject: [PATCH] openssh: source /etc/environment\n\n---\n session.c | 2 --\n 1 file changed, 2 deletions(-)\n\ndiff --git a/session.c b/session.c\nindex ac06b08..0a1c59a 100644\n--- a/session.c\n+++ b/session.c\n@@ -1080,7 +1080,6 @@ do_setup_env(struct ssh *ssh, Session *s, const char *shell)\n \t\t\tchild_set_env(&env, &envsize, \"KRB5CCNAME\", cp);\n \t}\n \n-#ifdef _AIX\n \t{\n \t\tchar *cp;\n \n@@ -1089,7 +1088,6 @@ do_setup_env(struct ssh *ssh, Session *s, const char *shell)\n \t\tread_environment_file(&env, &envsize, \"/etc/environment\",\n \t\t    options.permit_user_env_whitelist);\n \t}\n-#endif\n #ifdef KRB5\n \tif (s->authctxt->krb5_ccname)\n \t\tchild_set_env(&env, &envsize, \"KRB5CCNAME\",\n-- \n2.7.4\n\n"
  },
  {
    "path": "packages/network/openssh/system.d/sshd.service",
    "content": "[Unit]\nDescription=OpenSSH server daemon\nAfter=network.target\nConditionKernelCommandLine=|ssh\nConditionPathExists=|/storage/.cache/services/sshd.conf\n\n[Service]\nRestart=on-failure\nEnvironmentFile=-/storage/.cache/services/sshd.conf\nExecStartPre=-/bin/sh -c 'mkdir -p /storage/.cache/ssh'\nExecStartPre=/usr/bin/ssh-keygen -A\nExecStartPre=-/bin/sh -c 'chmod 600 /storage/.cache/ssh/ssh_host_*'\nExecStartPre=-/bin/sh -c 'chmod 644 /storage/.cache/ssh/ssh_host_*.pub'\nExecStart=/usr/sbin/sshd -D $SSH_ARGS\nExecReload=/bin/kill -HUP $MAINPID\nTimeoutStopSec=1s\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/network/openssh/tmpfiles.d/z_04_openssh.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nd    /var/empty              0600 root root - -\nd    /storage/.cache/ssh     0755 root root - -\nd    /storage/.ssh           0700 root root - -\n"
  },
  {
    "path": "packages/network/openvpn/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"openvpn\"\nPKG_VERSION=\"2.5.8\"\nPKG_SHA256=\"a6f315b7231d44527e65901ff646f87d7f07862c87f33531daa109fb48c53db2\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://openvpn.net\"\nPKG_URL=\"https://swupdate.openvpn.org/community/releases/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain lzo openssl\"\nPKG_LONGDESC=\"A full featured SSL VPN software solution that integrates OpenVPN server capabilities.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_have_decl_TUNSETPERSIST=no \\\n                           --disable-server \\\n                           --disable-plugins \\\n                           --enable-iproute2 IPROUTE=/sbin/ip \\\n                           --enable-management \\\n                           --enable-fragment \\\n                           --disable-multihome \\\n                           --disable-port-share \\\n                           --disable-debug\"\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    ln -sf ../sbin/openvpn ${INSTALL}/usr/bin/openvpn\n}\n"
  },
  {
    "path": "packages/network/rpcbind/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rpcbind\"\nPKG_VERSION=\"1.2.6\"\nPKG_SHA256=\"5613746489cae5ae23a443bb85c05a11741a5f12c8f55d2bb5e83b9defeee8de\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://rpcbind.sourceforge.net/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/rpcbind/rpcbind/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libtirpc systemd\"\nPKG_LONGDESC=\"The rpcbind utility is a server that converts RPC program numbers into universal addresses.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_header_rpcsvc_mount_h=no \\\n                           --disable-warmstarts \\\n                           --disable-libwrap \\\n                           --enable-rmtcalls \\\n                           --with-statedir=/tmp \\\n                           --with-rpcuser=root\"\n\npost_install() {\n  enable_service rpcbind.service\n}\n"
  },
  {
    "path": "packages/network/rpcbind/patches/rpcbind-01-drop-warm-start-as-it-fails.patch",
    "content": "diff -Naur a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in\n--- a/systemd/rpcbind.service.in\t2016-12-20 03:18:51.839794796 +0000\n+++ b/systemd/rpcbind.service.in\t2016-12-20 03:21:30.476854474 +0000\n@@ -8,11 +8,12 @@\n # rpcbind.socket, no matter how this unit is started.\n Requires=rpcbind.socket\n Wants=rpcbind.target\n+After=rpcbind.socket systemd-tmpfiles-setup.service\n \n [Service]\n Type=notify\n # distro can provide a drop-in adding EnvironmentFile=-/??? if needed.\n-ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f\n+ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -f\n \n [Install]\n WantedBy=multi-user.target\n"
  },
  {
    "path": "packages/network/rpcbind/patches/rpcbind-1.2.6-vulnerability_fixes-1.patch",
    "content": "Submitted By: Ken Moffat <ken at linuxfromscratch dot org>\nDate: 2017-05-29\nInitial Package Version: 0.2.4 (also affects earlier versions)\nUpstream Status: Unknown\nOrigin: Guido Vranken\nDescription: Fixes CVE-2017-8779 (DOS by remote attackers - memory consumption\nwithout subsequent free).\n\ndiff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c\nindex 5862c26..e11f61b 100644\n--- a/src/rpcb_svc_com.c\n+++ b/src/rpcb_svc_com.c\n@@ -48,6 +48,7 @@\n #include <rpc/rpc.h>\n #include <rpc/rpcb_prot.h>\n #include <rpc/svc_dg.h>\n+#include <rpc/rpc_com.h>\n #include <netconfig.h>\n #include <errno.h>\n #include <syslog.h>\n@@ -432,7 +433,7 @@ rpcbproc_taddr2uaddr_com(void *arg, struct svc_req *rqstp /*__unused*/,\n static bool_t\n xdr_encap_parms(XDR *xdrs, struct encap_parms *epp)\n {\n-\treturn (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), ~0));\n+\treturn (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), RPC_MAXDATASIZE));\n }\n \n /*\n"
  },
  {
    "path": "packages/network/rpcsvc-proto/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"rpcsvc-proto\"\nPKG_VERSION=\"1.4.1\"\nPKG_SHA256=\"9429e143bb8dd33d34bf0663f571d4d4a1103e1afd7c49791b367b7ae1ef7f35\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://nfs.sourceforge.net/\"\nPKG_URL=\"https://github.com/thkukuk/rpcsvc-proto/releases/download/v$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.xz\"\nPKG_DEPENDS_HOST=\"toolchain\"\nPKG_DEPENDS_TARGET=\"toolchain rpcsvc-proto:host\"\nPKG_LONGDESC=\"The rpcsvc-proto package contains the rcpsvc protocol.x files and headers.\"\n\npre_configure_host() {\n  cd $PKG_BUILD\n  rm -rf .$HOST_NAME\n}\n\npre_configure_target() {\n  cd $PKG_BUILD\n  rm -rf .$TARGET_NAME\n}\n\nmake_host() {\n  make rpcgen -C rpcgen\n}\n\nmakeinstall_target() {\n  : #\n}\n"
  },
  {
    "path": "packages/network/rsync/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rsync\"\nPKG_VERSION=\"3.2.7\"\nPKG_SHA256=\"4e7d9d3f6ed10878c58c5fb724a67dacf4b6aac7340b13e488fb2dc41346f2bb\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://rsync.samba.org\"\nPKG_URL=\"https://download.samba.org/pub/rsync/src/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"autotools:host zlib:host\"\nPKG_DEPENDS_TARGET=\"toolchain zlib openssl\"\nPKG_LONGDESC=\"A very fast method for bringing remote files into sync.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--disable-md2man \\\n                         --disable-ipv6 \\\n                         --disable-openssl \\\n                         --disable-xxhash \\\n                         --disable-zstd \\\n                         --disable-lz4 \\\n                         --disable-iconv \\\n                         --with-included-popt \\\n                         --without-included-zlib\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-acl-support \\\n                           --disable-md5-asm \\\n                           --enable-openssl \\\n                           --disable-lz4 \\\n                           --disable-md2man \\\n                           --disable-roll-simd \\\n                           --disable-xattr-support \\\n                           --disable-xxhash \\\n                           --disable-zstd \\\n                           --with-included-popt \\\n                           --without-included-zlib\"\n\npre_configure_host() {\n  HOST_CONFIGURE_OPTS=$(echo ${HOST_CONFIGURE_OPTS} | sed -e \"s|--disable-static||\" -e \"s|--enable-shared||\")\n}\n\npre_configure_target() {\n  TARGET_CONFIGURE_OPTS=$(echo ${TARGET_CONFIGURE_OPTS} | sed -e \"s|--disable-static||\" -e \"s|--enable-shared||\")\n}\n\npre_make_host() {\n  # do not detect LE git version\n  echo \"#define RSYNC_GITVER \\\"${PKG_VERSION}\\\"\" >git-version.h\n}\n\npre_make_target() {\n  pre_make_host\n}\n"
  },
  {
    "path": "packages/network/samba/config/samba4-cache.txt",
    "content": "Checking simple C program: OK\nrpath library support: OK\n-Wl,--version-script support: OK\nChecking getconf LFS_CFLAGS: NO\nChecking for large file support without additional flags: OK\nChecking for -D_LARGE_FILES: OK\nChecking correct behavior of strtoll: NO\nChecking for working strptime: OK\nChecking for C99 vsnprintf: OK\nChecking for HAVE_SHARED_MMAP: OK\nChecking for HAVE_MREMAP: OK\nChecking for HAVE_INCOHERENT_MMAP: NO\nChecking for HAVE_SECURE_MKSTEMP: OK\nChecking for HAVE_IFACE_GETIFADDRS: OK\nChecking for kernel change notify support: OK\nChecking for Linux kernel oplocks: OK\nChecking for kernel share modes: OK\nChecking if can we convert from CP850 to UCS-2LE: OK\nChecking if can we convert from UTF-8 to UCS-2LE: OK\nChecking whether we can use Linux thread-specific credentials with 32-bit system calls: OK\nChecking whether we can use Linux thread-specific credentials: OK\nChecking whether setreuid is available: OK\nChecking whether setresuid is available: OK\nChecking whether seteuid is available: OK\nChecking whether fcntl locking is available: OK\nChecking whether fcntl lock supports open file description locks: OK\nChecking for the maximum value of the 'time_t' type: OK\nChecking whether the realpath function allows a NULL argument: OK\nChecking whether POSIX capabilities are available: OK\nChecking for ftruncate extend: OK\nvfs_fileid checking for statfs() and struct statfs.f_fsid: OK\ngetcwd takes a NULL argument: OK\nChecking uname sysname type: \"Linux\"\nChecking uname release type: \"3.0.0\"\nChecking uname version type: \"#1 Tue Nov 1 12:34:56 UTC 2013\"\nChecking value of NSIG: \"32\"\nChecking value of _NSIG: \"64\"\nChecking value of SIGRTMAX: \"64\"\nChecking value of SIGRTMIN: \"32\"\nChecking errno of iconv for illegal multibyte sequence: \"0\"\nChecking for a 64-bit host to support lmdb: NO\nChecking value of GNUTLS_CIPHER_AES_128_CFB8: OK\nChecking value of GNUTLS_MAC_AES_CMAC_128: OK\nChecking whether fcntl supports flags to send direct I/O availability signals: OK\nChecking whether fcntl supports setting/geting hints: OK\nChecking for gnutls fips mode support: NO\nChecking for readlink breakage: NO\n\n"
  },
  {
    "path": "packages/network/samba/config/smb.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-2019 Team LibreELEC (https://libreelec.tv)\n\n# samba.conf v4 (do not remove)\n\n# This configuration file allows you to customize the samba shares\n# available from your machine\n\n[global]\n  server string = EmuELEC\n  browseable = yes\n  writeable = yes\n  printable = no\n  deadtime = 30\n  mangled names = no\n  name resolve order = host bcast\n  printcap name = /dev/null\n  load printers = no\n  enable core files = no\n  passdb backend = smbpasswd\n  smb encrypt = disabled\n  fruit:model = Xserve\n\n  # samba share options\n  map to guest = Bad User\n  guest account = root\n  security = user\n\n  # samba tuning options\n  socket options = TCP_NODELAY IPTOS_LOWDELAY\n  min receivefile size = 16384\n  aio read size = 16384\n  aio write size = 16384\n  use sendfile = yes\n\n  # The following are default values for the master selection process\n  # local master = yes\n  # preferred master = auto\n  # domain master = auto\n  # os level = 20\n\n  # \"strict allocate = yes\" breaks large network transfers to external hdd\n  # Force this to \"no\" in case \"yes\" becomes the default in future\n  strict allocate = no\n\n# Using the following configurations as a template allows you to add\n# writeable shares of disks and paths under /storage\n\n[Update]\n  path = /storage/.update\n  available = yes\n  browseable = yes\n  public = yes\n  writeable = yes\n  root preexec = mkdir -p /storage/.update\n\n[Downloads]\n  path = /storage/downloads\n  available = yes\n  browseable = yes\n  public = yes\n  writeable = yes\n  root preexec = mkdir -p /storage/downloads\n\n[USB Media]\n  path = /var/media\n  available = yes\n  browseable = yes\n  public = yes\n  writeable = yes  \n\n[EmuELEC]\n  path = /emuelec\n  available = yes\n  browseable = yes\n  public = yes\n  writeable = yes\n  root preexec = mkdir -p /storage/.config/emuelec\n\n[Configfiles]\n  path = /storage/.config\n  available = yes\n  browseable = yes\n  public = yes\n  writeable = yes\n  root preexec = mkdir -p /storage/.config\n\n[Logfiles]\n  path = /emuelec/logs\n  available = yes\n  browseable = yes\n  public = yes\n  writeable = yes\n  root preexec = mkdir -p /emuelec/logs\n  \n[ROMS]\n  path = /storage/roms\n  available = yes\n  browseable = yes\n  public = yes\n  writeable = yes\n  root preexec = mkdir -p /storage/roms\n  \n[Emulationstation Config]\n  path = /storage/.emulationstation\n  available = yes\n  browseable = yes\n  public = yes\n  writeable = yes\n  root preexec = mkdir -p /storage/.emulationstation\n  \n[Storage]\n  path = /storage\n  available = yes\n  browseable = yes\n  public = yes\n  writeable = yes  \n  \n[Assets]\n  path = /tmp/assets\n  available = yes\n  browsable = yes\n  public = yes\n  writable = yes\n  root preexec = mkdir -p /tmp/assets\n\n[Overlays]\n  path = /tmp/overlays\n  available = yes\n  browsable = yes\n  public = yes\n  writable = yes\n  root preexec = mkdir -p /tmp/overlays\n\n[Bezels]\n  path = /storage/roms/bezels\n  available = yes\n  browsable = yes\n  public = yes\n  writable = yes\n  root preexec = mkdir -p /storage/roms/bezels\n\n[Splash]\n  path = /storage/roms/splash\n  available = yes\n  browsable = yes\n  public = yes\n  writable = yes\n  root preexec = mkdir -p /storage/roms/splash\n\n[Cores]\n  path = /tmp/cores\n  available = yes\n  browsable = yes\n  public = yes\n  writable = yes\n  root preexec = mkdir -p /tmp/cores\n\n[Playlists]\n  path = /tmp/playlists\n  available = yes\n  browsable = yes\n  public = yes\n  writable = yes\n  root preexec = mkdir -p /storage/playlists\n\n[Screenshots]\n  path = /storage/roms/screenshots\n  available = yes\n  browsable = yes\n  public = yes\n  writable = yes\n  root preexec = mkdir -p /storage/roms/screenshots\n\n[Shaders]\n  path = /tmp/shaders\n  available = yes\n  browsable = yes\n  public = yes\n  writable = yes\n  root preexec = mkdir -p /tmp/shaders\n\n[Joypads]\n  path = /tmp/joypads\n  available = yes\n  browsable = yes\n  public = yes\n  writable = yes\n  root preexec = mkdir -p /tmp/joypads\n\n[Cheats]\n  path = /tmp/database/cht\n  available = yes\n  browsable = yes\n  public = yes\n  writable = yes\n  root preexec = mkdir -p /tmp/database/cht\n  \n[SaveStates]\n  path = /storage/roms/savestates\n  available = yes\n  browsable = yes\n  public = yes\n  writable = yes\n  root preexec = mkdir -p /storage/roms/savestates\n"
  },
  {
    "path": "packages/network/samba/default.d/samba.conf",
    "content": "SAMBA_AUTOSHARE=\"true\"\nSAMBA_USERNAME=\"coreelec\"\nSAMBA_PASSWORD=\"coreelec\"\nSAMBA_SECURE=\"false\"\nSAMBA_MINPROTOCOL=\"SMB2\"\nSAMBA_MAXPROTOCOL=\"SMB3\"\nSAMBA_WORKGROUP=\"WORKGROUP\"\n"
  },
  {
    "path": "packages/network/samba/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"samba\"\nPKG_VERSION=\"4.17.12\"\nPKG_SHA256=\"6129a7f967b822b308c57152326e7302711c2d0b9830a82d0c21832b648741f4\"\nPKG_LICENSE=\"GPLv3+\"\nPKG_SITE=\"https://www.samba.org\"\nPKG_URL=\"https://download.samba.org/pub/samba/stable/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain attr heimdal:host e2fsprogs Python3 libunwind zlib readline popt libaio connman gnutls\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory heimdal) $(get_pkg_directory e2fsprogs)\"\nPKG_LONGDESC=\"A free SMB / CIFS fileserver and client.\"\n\n\n[[ \"${DEVICE}\" != \"Amlogic-old\" ]] && PKG_DEPENDS_TARGET+=\" wsdd2\"\n\nconfigure_package() {\n  #PKG_WAF_VERBOSE=\"-v\"\n\n  if [ \"${AVAHI_DAEMON}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" avahi\"\n    SMB_AVAHI=\"--enable-avahi\"\n  else\n    SMB_AVAHI=\"--disable-avahi\"\n  fi\n\n  if [ \"${TARGET_ARCH}\" = x86_64 ]; then\n    SMB_AESNI=\"--accel-aes=intelaesni\"\n  else\n    SMB_AESNI=\"--accel-aes=none\"\n  fi\n\n  PKG_CONFIGURE_OPTS=\"--prefix=/usr \\\n                      --sysconfdir=/etc \\\n                      --localstatedir=/var \\\n                      --with-lockdir=/var/lock-samba \\\n                      --with-logfilebase=/var/log \\\n                      --with-piddir=/run/samba \\\n                      --with-privatedir=/run/samba \\\n                      --with-modulesdir=/usr/lib \\\n                      --with-privatelibdir=/usr/lib \\\n                      --with-sockets-dir=/run/samba \\\n                      --with-configdir=/run/samba \\\n                      --with-libiconv=${SYSROOT_PREFIX}/usr \\\n                      --cross-compile \\\n                      --cross-answers=${PKG_BUILD}/cache.txt \\\n                      --hostcc=gcc \\\n                      --enable-fhs \\\n                      --without-dmapi \\\n                      --disable-glusterfs \\\n                      --disable-rpath \\\n                      --disable-rpath-install \\\n                      --disable-rpath-private-install \\\n                      ${SMB_AVAHI} \\\n                      ${SMB_AESNI} \\\n                      --disable-cups \\\n                      --disable-iprint \\\n                      --with-relro \\\n                      --with-sendfile-support \\\n                      --without-acl-support \\\n                      --without-ads \\\n                      --without-ad-dc \\\n                      --without-automount \\\n                      --without-cluster-support \\\n                      --without-fam \\\n                      --without-gettext \\\n                      --without-gpgme \\\n                      --without-iconv \\\n                      --without-ldap \\\n                      --without-libarchive \\\n                      --without-pam \\\n                      --without-pie \\\n                      --without-regedit \\\n                      --without-systemd \\\n                      --without-utmp \\\n                      --without-winbind \\\n                      --enable-auto-reconfigure \\\n                      --bundled-libraries='ALL,!asn1_compile,!compile_et,!zlib' \\\n                      --without-quotas \\\n                      --with-syslog  \\\n                      --without-json \\\n                      --without-ldb-lmdb \\\n                      --nopyc --nopyo\"\n\n  PKG_SAMBA_TARGET=\"smbclient,client/smbclient,smbtree,nmblookup,testparm\"\n\n  if [ \"${SAMBA_SERVER}\" = \"yes\" ]; then\n    PKG_SAMBA_TARGET+=\",nmbd,rpcd_classic,rpcd_epmapper,rpcd_winreg,samba-dcerpcd,smbpasswd,smbd/smbd\"\n  fi\n}\n\npre_configure_target() {\n# samba uses its own build directory\n  cd ${PKG_BUILD}\n    rm -rf .${TARGET_NAME}\n\n# work around link issues\n  export LDFLAGS=\"${LDFLAGS} -lreadline -lncurses\"\n\n# support 64-bit offsets and seeks on 32-bit platforms\n  if [ \"${TARGET_ARCH}\" = \"arm\" ]; then\n    export CFLAGS+=\" -D_FILE_OFFSET_BITS=64 -D_OFF_T_DEFINED_ -Doff_t=off64_t -Dlseek=lseek64\"\n  fi\n}\n\nconfigure_target() {\n  cp ${PKG_DIR}/config/samba4-cache.txt ${PKG_BUILD}/cache.txt\n    echo \"Checking uname machine type: \\\"${TARGET_ARCH}\\\"\" >> ${PKG_BUILD}/cache.txt\n\n  export COMPILE_ET=${TOOLCHAIN}/bin/heimdal_compile_et\n  export ASN1_COMPILE=${TOOLCHAIN}/bin/heimdal_asn1_compile\n\n  PYTHON_CONFIG=\"${SYSROOT_PREFIX}/usr/bin/python3-config\" \\\n  python_LDFLAGS=\"\" python_LIBDIR=\"\" \\\n  PYTHON=${TOOLCHAIN}/bin/python3 ./configure ${PKG_CONFIGURE_OPTS}\n}\n\n# disable icu, there is no buildswitch to disable\npre_make_target() {\n  sed -e '/#define HAVE_ICU_I18N 1/d' \\\n      -e '/#define HAVE_LIBICUI.* 1/d' \\\n      -i bin/default/include/config.h\n}\n\nmake_target() {\n  make ${PKG_SAMBA_TARGET} -j${CONCURRENCY_MAKE_LEVEL}\n}\n\nmakeinstall_target() {\n  PYTHONHASHSEED=1 WAF_MAKE=1 ./buildtools/bin/waf install ${PKG_WAF_VERBOSE} --destdir=${SYSROOT_PREFIX} --targets=smbclient -j${CONCURRENCY_MAKE_LEVEL}\n  PYTHONHASHSEED=1 WAF_MAKE=1 ./buildtools/bin/waf install ${PKG_WAF_VERBOSE} --destdir=${INSTALL} --targets=${PKG_SAMBA_TARGET} -j${CONCURRENCY_MAKE_LEVEL}\n}\n\ncopy_directory_of_links() {\n  local _tmp link\n  for link in \"${1}/\"*.so*; do\n    if [ -L ${link} ]; then\n      _tmp=\"$(readlink -m \"${link}\")\"\n      cp -P ${_tmp} ${2}\n      cp -P ${_tmp}.* ${2} 2>/dev/null || true\n    else\n      cp -P ${link} ${2}\n    fi\n  done\n}\n\nperform_manual_install() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n    copy_directory_of_links ${PKG_BUILD}/bin/shared ${SYSROOT_PREFIX}/usr/lib\n\n  mkdir -p ${INSTALL}/usr/lib\n    copy_directory_of_links ${PKG_BUILD}/bin/shared ${INSTALL}/usr/lib\n    copy_directory_of_links ${PKG_BUILD}/bin/shared/private ${INSTALL}/usr/lib\n\n  if [ \"${SAMBA_SERVER}\" = \"yes\" ]; then\n    mkdir -p ${INSTALL}/usr/sbin\n      cp -L ${PKG_BUILD}/bin/smbd ${INSTALL}/usr/sbin\n      cp -L ${PKG_BUILD}/bin/nmbd ${INSTALL}/usr/sbin\n\n    mkdir -p ${INSTALL}/usr/libexec/samba\n      cp -PR bin/default/source3/rpc_server/samba-dcerpcd ${INSTALL}/usr/libexec/samba\n      cp -PR bin/default/source3/rpc_server/rpcd_classic ${INSTALL}/usr/libexec/samba\n      cp -PR bin/default/source3/rpc_server/rpcd_epmapper ${INSTALL}/usr/libexec/samba\n      cp -PR bin/default/source3/rpc_server/rpcd_winreg ${INSTALL}/usr/libexec/samba\n  fi\n}\n\npost_makeinstall_target() {\n  perform_manual_install\n\n  rm -rf ${INSTALL}/usr/bin\n  rm -rf ${INSTALL}/usr/lib/python*\n  rm -rf ${INSTALL}/usr/share/perl*\n  rm -rf ${INSTALL}/usr/lib64\n\n  mkdir -p ${INSTALL}/usr/lib/samba\n    cp ${PKG_DIR}/scripts/samba-config ${INSTALL}/usr/lib/samba\n    cp ${PKG_DIR}/scripts/samba-autoshare ${INSTALL}/usr/lib/samba\n    cp ${PKG_DIR}/scripts/smbpasswd ${INSTALL}/usr/lib/samba\n\n  if find_file_path config/smb.conf; then\n    mkdir -p ${INSTALL}/etc/samba\n      cp ${FOUND_PATH} ${INSTALL}/etc/samba\n    mkdir -p ${INSTALL}/usr/config\n      cp ${INSTALL}/etc/samba/smb.conf ${INSTALL}/usr/config/samba.conf.sample\n  fi\n\n  mkdir -p ${INSTALL}/usr/bin\n    cp -PR bin/default/source3/client/smbclient ${INSTALL}/usr/bin\n    cp -PR bin/default/source3/utils/smbtree ${INSTALL}/usr/bin\n    cp -PR bin/default/source3/utils/nmblookup ${INSTALL}/usr/bin\n    cp -PR bin/default/source3/utils/testparm ${INSTALL}/usr/bin\n\n  if [ \"${SAMBA_SERVER}\" = \"yes\" ]; then\n    mkdir -p ${INSTALL}/usr/bin\n      cp -PR bin/default/source3/utils/smbpasswd ${INSTALL}/usr/bin\n\n    mkdir -p ${INSTALL}/usr/lib/systemd/system\n      cp ${PKG_DIR}/system.d.opt/* ${INSTALL}/usr/lib/systemd/system\n\n    mkdir -p ${INSTALL}/usr/share/services\n      cp -P ${PKG_DIR}/default.d/*.conf ${INSTALL}/usr/share/services\n  fi\n  \n  chmod +x ${INSTALL}/usr/sbin/*\n  chmod +x ${INSTALL}/usr/bin/*\n  chmod +x ${INSTALL}/usr/sbin/*\n  chmod +x ${INSTALL}/usr/lib/samba/*\n  chmod +x ${INSTALL}/usr/libexec/samba/*\n}\n\npost_install() {\n  enable_service samba-config.service\n\n  if [ \"${SAMBA_SERVER}\" = \"yes\" ]; then\n    enable_service nmbd.service\n    enable_service smbd.service\n  fi\n}\n"
  },
  {
    "path": "packages/network/samba/patches/samba-200-4.11-fix-ASN1-bso14164.patch",
    "content": "From 2e53f331104b29db7caf1641a30d3e9316b57184 Mon Sep 17 00:00:00 2001\nFrom: Uri Simchoni <uri@samba.org>\nDate: Sun, 20 Oct 2019 00:03:14 +0300\nSubject: [PATCH] build: find pre-built heimdal build tools in case of embedded\n heimdal\n\nThis patch fixes the case of finding asn1_compile and compile_et for\nbuilding embedded heimdal, by setting\n--bundled-libraries='!asn1_compile,!compile_et' as configure flags.\n\nThe Heimdal build tools compile_et and asn1_compile are needed *only*\nif we use the embedded heimdal (otherwise we don't build heimdal and\nuse headers that have been generated by those tools elsewhere).\n\nFor cross-compilation with embedded heimdal, it is vital to use host build\ntools, and so asn1_compile and compile_et must be supplied and not\nbuilt. One way of doing this would be to set the COMPILE_ET and\nASN1_COMPILE env vars to the location of supplied binaries. Another way,\nwhich is more commonly used, is to exclude asn1_compile and compile_et\nfrom bundled packages via the switch\n-bundled-libraries='!asn1_compile,!compile_et'. When this is done,\nthe build script searches the path for those tools and sets the\nASN1_COMPILE and COMPILE_ET vars accordingly. (this is admittedly\nkind of a round-about way of doing things but this has become the\nde-facto standard amongst embedded distro builders).\n\nIn commit 8061983d4882f3ba3f12da71443b035d7b672eec, this process of\nfinding the binaris has been moved to be carried out only in the\nsystem heimdal case. As explained above, we only need these tools,\nand hence the check, in bundled mode.\n\nBUG: https://bugzilla.samba.org/show_bug.cgi?id=14164\n\nSigned-off-by: Uri Simchoni <uri@samba.org>\n---\n wscript_configure_embedded_heimdal | 11 +++++++++++\n wscript_configure_system_heimdal   | 11 -----------\n 2 files changed, 11 insertions(+), 11 deletions(-)\n\ndiff --git a/wscript_configure_embedded_heimdal b/wscript_configure_embedded_heimdal\nindex 8c55ae2..4fdae80 100644\n--- a/wscript_configure_embedded_heimdal\n+++ b/wscript_configure_embedded_heimdal\n@@ -6,3 +6,14 @@\n \n conf.define('USING_EMBEDDED_HEIMDAL', 1)\n conf.RECURSE('third_party/heimdal_build')\n+\n+def check_system_heimdal_binary(name):\n+    if conf.LIB_MAY_BE_BUNDLED(name):\n+        return False\n+    if not conf.find_program(name, var=name.upper()):\n+        return False\n+    conf.define('USING_SYSTEM_%s' % name.upper(), 1)\n+    return True\n+\n+check_system_heimdal_binary(\"compile_et\")\n+check_system_heimdal_binary(\"asn1_compile\")\ndiff --git a/wscript_configure_system_heimdal b/wscript_configure_system_heimdal\nindex 235fa19..4f4a83cd 100644\n--- a/wscript_configure_system_heimdal\n+++ b/wscript_configure_system_heimdal\n@@ -37,14 +37,6 @@ def check_system_heimdal_lib(name, functions='', headers='', onlyif=None):\n     conf.define('USING_SYSTEM_%s' % name.upper(), 1)\n     return True\n \n-def check_system_heimdal_binary(name):\n-    if conf.LIB_MAY_BE_BUNDLED(name):\n-        return False\n-    if not conf.find_program(name, var=name.upper()):\n-        return False\n-    conf.define('USING_SYSTEM_%s' % name.upper(), 1)\n-    return True\n-\n check_system_heimdal_lib(\"com_err\", \"com_right_r com_err\", \"com_err.h\")\n \n if check_system_heimdal_lib(\"roken\", \"rk_socket_set_reuseaddr\", \"roken.h\"):\n@@ -86,7 +78,4 @@ finally:\n #if conf.CHECK_BUNDLED_SYSTEM('tommath', checkfunctions='mp_init', headers='tommath.h'):\n #    conf.define('USING_SYSTEM_TOMMATH', 1)\n \n-check_system_heimdal_binary(\"compile_et\")\n-check_system_heimdal_binary(\"asn1_compile\")\n-\n conf.env.KRB5_VENDOR = 'heimdal'\n-- \n2.20.1\n\n"
  },
  {
    "path": "packages/network/samba/patches/samba-950-no-man.patch",
    "content": "From 0cb025d911dd3e2f9a9184293f571214192e3a54 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Tue, 19 Mar 2019 12:39:41 +0000\nSubject: [PATCH] disable man pages\n\n---\n buildtools/wafsamba/wafsamba.py |  8 --------\n docs-xml/wscript_build          | 22 ----------------------\n 2 files changed, 30 deletions(-)\n\ndiff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py\nindex a077026..2a897d0 100644\n--- a/buildtools/wafsamba/wafsamba.py\n+++ b/buildtools/wafsamba/wafsamba.py\n@@ -328,11 +328,6 @@ def SAMBA_LIBRARY(bld, libname, source,\n         else:\n             bld.PKG_CONFIG_FILES(pc_files, vnum=vnum)\n \n-    if (manpages is not None and 'XSLTPROC_MANPAGES' in bld.env and\n-        bld.env['XSLTPROC_MANPAGES']):\n-        bld.MANPAGES(manpages, install)\n-\n-\n Build.BuildContext.SAMBA_LIBRARY = SAMBA_LIBRARY\n \n \n@@ -437,9 +432,6 @@ def SAMBA_BINARY(bld, binname, source,\n         samba_ldflags  = pie_ldflags\n         )\n \n-    if manpages is not None and 'XSLTPROC_MANPAGES' in bld.env and bld.env['XSLTPROC_MANPAGES']:\n-        bld.MANPAGES(manpages, install)\n-\n Build.BuildContext.SAMBA_BINARY = SAMBA_BINARY\n \n \n-- \n2.7.4\n\n"
  },
  {
    "path": "packages/network/samba/patches/samba-951-no-man-4.16.patch",
    "content": "diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build\n--- a/docs-xml/wscript_build\t2020-12-05 09:01:19.652459634 +0000\n+++ b/docs-xml/wscript_build\t2020-12-05 09:10:10.639446971 +0000\n@@ -175,32 +175,3 @@\n                     target=path_entities,\n                     rule=generate_path_entity_file,\n                     dep_vars=bld.dynconfig_varnames())\n-\n-\n-def SMBDOTCONF_MANPAGE(bld, target):\n-    ''' assemble and build smb.conf.5 manual page'''\n-    bld.SAMBAMANPAGES(target, parameter_all)\n-\n-if ('XSLTPROC_MANPAGES' in bld.env and bld.env['XSLTPROC_MANPAGES']):\n-\n-    SMBDOTCONF_MANPAGE(bld, 'manpages/smb.conf.5')\n-    bld.SAMBAMANPAGES(manpages)\n-\n-    if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):\n-        bld.SAMBAMANPAGES(pam_winbind_manpages)\n-\n-    if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):\n-        bld.SAMBAMANPAGES(krb5_locator_manpages)\n-\n-    if bld.CONFIG_SET('HAVE_KRB5_LOCALAUTH_PLUGIN_H'):\n-        bld.SAMBAMANPAGES(krb5_localauth_manpages)\n-\n-    if conf.env.build_winexe == True:\n-        bld.SAMBAMANPAGES(winexe_manpages)\n-\n-    if bld.CONFIG_SET('ENABLE_SELFTEST'):\n-        bld.SAMBAMANPAGES('manpages/vfstest.1')\n-\n-    for manpage in vfs_module_manpages:\n-        if bld.SAMBA3_IS_ENABLED_MODULE(manpage):\n-            bld.SAMBAMANPAGES('manpages/%s.8' % manpage)\n"
  },
  {
    "path": "packages/network/samba/scripts/samba-autoshare",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2017 Stephan Raue (stephan@openelec.tv)\n\nif [ -f /storage/.cache/services/samba.conf ]; then\n  . /storage/.cache/services/samba.conf\n\n  if [ \"$SAMBA_AUTOSHARE\" == \"true\" ] ; then\n    /usr/lib/samba/samba-config\n    [ -f /run/samba/smbd.pid ] && pkill -HUP smbd\n  fi\nfi\n"
  },
  {
    "path": "packages/network/samba/scripts/samba-config",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2017 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nSMB_USERCONF=\"/storage/.config/samba.conf\"\nSMB_DEFCONF=\"/etc/samba/smb.conf\"\nSMB_CONF=\"/run/samba/smb.conf\"\n\nSMB_DIR=$(dirname ${SMB_CONF})\nmkdir -p ${SMB_DIR}\n\n# exclusive access\nSMB_LOCK=\"${SMB_DIR}/samba-config.lock\"\nexec 200>\"${SMB_LOCK}\"\nflock 200\n\nSMB_TMP=$(mktemp -p ${SMB_DIR})\n\nSMB_USERCONF_IS_VALID=no\nSMB_CONFIG_VERSION=4\n\n# If user config is based on legacy OpenELEC, or old version (or no version)\n# then don't use it, and log a warning.\nif [ -f ${SMB_USERCONF} ]; then\n  SMB_IS_LEGACY=\"$(awk 'NR <= 2 && /This file is part of OpenELEC/{ print }' ${SMB_USERCONF})\"\n  SMB_THIS_VER=\"$(awk '/^# samba.conf v[0-9\\.]*/{ print substr($3,2); exit }' ${SMB_USERCONF})\"\n  if [ -n \"${SMB_IS_LEGACY}\" ]; then\n    echo \"WARNING: Ignoring user config ${SMB_USERCONF} due to incompatibility [Old style OpenELEC]\"\n  elif [ -z \"${SMB_THIS_VER}\" ]; then\n    echo \"WARNING: Ignoring user config ${SMB_USERCONF} due to incompatibility [version is unknown or invalid]\"\n  elif [ ${SMB_THIS_VER} !=  ${SMB_CONFIG_VERSION} ]; then\n    echo \"WARNING: Ignoring user config ${SMB_USERCONF} due to incompatibility [version ${SMB_THIS_VER} is not the required version ${SMB_CONFIG_VERSION}]\"\n  else\n    SMB_USERCONF_IS_VALID=yes\n  fi\nfi\n\nif [ ${SMB_USERCONF_IS_VALID} = yes ]; then\n  cp ${SMB_USERCONF} ${SMB_TMP}\nelse\n  cp ${SMB_DEFCONF} ${SMB_TMP}\nfi\n\necho >>${SMB_TMP}\n\nif [ ! -f /storage/.cache/services/samba.disabled ]; then\n\n  ### Generate smb.conf\n\n  if [ ! -f /storage/.cache/services/samba.conf ]; then\n    cp /usr/share/services/samba.conf /storage/.cache/services\n  fi\n\n  # Specify defaults here, in case these new properties not yet added in .cache\n  SAMBA_WORKGROUP=WORKGROUP\n  SAMBA_MINPROTOCOL=SMB2\n  SAMBA_MAXPROTOCOL=SMB3\n\n  . /storage/.cache/services/samba.conf\n\n  # fixup synonyms\n  sed -i 's/browsable/browseable/g; s/writable/writeable/g' ${SMB_TMP}\n\n  # handle external drives\n  if [ \"${SAMBA_AUTOSHARE}\" = \"true\" ] ; then\n    for dir in /media/* ; do\n      if [ -d \"$dir\" ] ; then\n        name=$(basename \"$dir\")\n        echo -e \"[$name]\\n  path = $dir\\n  available = yes\\n  browseable = yes\\n  public = yes\\n  writeable = yes\\n\" >> ${SMB_TMP}\n      fi\n    done\n  fi\n\n  # Allow access to a \"failed\" (safe mode) Kodi installation\n  if [ -d /storage/.kodi.FAILED ]; then\n    echo -e \"[Kodi-Failed]\\n  path = /storage/.kodi.FAILED\\n  available = yes\\n  browseable = yes\\n  public = yes\\n  writeable = yes\\n\" >> ${SMB_TMP}\n  fi\n\n  ADD_CONFIG=\n\n  # If workgroup is not set, don't set it - who knows, user may know better.\n  if [ -n \"$SAMBA_WORKGROUP\" ]; then\n    # Remove any existing workgroup setting\n    sed -E '/^[[:space:]]*workgroup[[:space:]]*=/d' -i ${SMB_TMP}\n    ADD_CONFIG=\"${ADD_CONFIG}  workgroup = ${SAMBA_WORKGROUP:-WORKGROUP}\\n\"\n  fi\n\n  ADD_CONFIG=\"${ADD_CONFIG}  server min protocol = ${SAMBA_MINPROTOCOL/SMB1/NT1}\\n\"\n  ADD_CONFIG=\"${ADD_CONFIG}  server max protocol = ${SAMBA_MAXPROTOCOL/SMB1/NT1}\\n\"\n\n  # Add extra config after [global], escaping spaces so that all are retained by sed\n  sed -e \"/\\[global\\]/ a ${ADD_CONFIG// /\\\\ }\" -i ${SMB_TMP}\n\n  if [ \"${SAMBA_SECURE}\" = \"true\" -a -n \"${SAMBA_USERNAME}\" -a -n \"${SAMBA_PASSWORD}\" ] ; then\n    # username map: first line makes sure plain root does not work all the time\n    # processing continues, so if user chooses root as username, second line overrides the first\n    # this is done always in case user uses passwords in userconf.\n    # many thanks to viljoviitanen for this\n    sed -e 's|^.[ \\t]*.public.=.*|  public = no |' \\\n        -e 's|^.[ \\t]*.username map.=.*||' \\\n        -e 's|^.[ \\t]*.security.=.*|  security = user\\n  username map = /run/samba/samba.map|' \\\n        -e 's|^.[ \\t]*.map.to.guest.=.*|  map to guest = Never|' \\\n        -i ${SMB_TMP}\n\n    printf \"%s\\n%s\" \"${SAMBA_PASSWORD}\" \"${SAMBA_PASSWORD}\" | smbpasswd -c ${SMB_TMP} -s -a root\n    printf 'nobody = root\\nroot = \"%s\"\\n' \"${SAMBA_USERNAME}\" > /run/samba/samba.map\n\n  else\n    sed -e 's|^.[ \\t]*.public.=.*|  public = yes |' \\\n        -e 's|^.[ \\t]*.username map.=.*||' \\\n        -e 's|^.[ \\t]*.security.=.*|  security = user|' \\\n        -e 's|^.[ \\t]*.map.to.guest.=.*|  map to guest = Bad User|' \\\n        -i ${SMB_TMP}\n  fi\nfi\n\nmv -f ${SMB_TMP} ${SMB_CONF}\n\n#win11 superior only with password. root:123, previous version does not need password, enter anonymously.\n#copy authenticated password\ncp -f /usr/lib/samba/smbpasswd /run/samba/smbpasswd\n\nexit 0\n"
  },
  {
    "path": "packages/network/samba/scripts/smbpasswd",
    "content": "root:0:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:FBB6A560CD4342ED657CB01F01087236:[U          ]:LCT-68312268:\n"
  },
  {
    "path": "packages/network/samba/system.d/samba-config.service",
    "content": "[Unit]\nDescription=Samba Configuration\nDefaultDependencies=false\nAfter=basic.target\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/lib/samba/samba-config\nStartLimitInterval=0\n"
  },
  {
    "path": "packages/network/samba/system.d.opt/nmbd.service",
    "content": "[Unit]\nDescription=Samba NMB Daemon\nWants=network-online.target samba-config.service\nAfter=network-online.target samba-config.service\nConditionPathExists=!/storage/.cache/services/samba.disabled\nConditionPathExists=/run/samba/smb.conf\n\n[Service]\nType=forking\nPIDFile=/run/samba/nmbd.pid\nExecStart=/usr/sbin/nmbd\nExecReload=/bin/kill -HUP $MAINPID\nTimeoutStopSec=1s\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/network/samba/system.d.opt/smbd.service",
    "content": "[Unit]\nDescription=Samba SMB Daemon\nWants=network-online.target nmbd.service\nAfter=network-online.target nmbd.service\nConditionPathExists=!/storage/.cache/services/samba.disabled\nConditionPathExists=/run/samba/smb.conf\n\n[Service]\nType=forking\nPIDFile=/run/samba/smbd.pid\nLimitNOFILE=16384\nExecStart=/usr/sbin/smbd\nExecReload=/bin/kill -HUP $MAINPID\nTimeoutStopSec=1s\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/network/sshpass/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"sshpass\"\nPKG_VERSION=\"1.09\"\nPKG_SHA256=\"71746e5e057ffe9b00b44ac40453bf47091930cba96bbea8dc48717dedc49fb7\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://sourceforge.net/p/sshpass\"\nPKG_URL=\"https://downloads.sourceforge.net/sshpass/sshpass-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"sshpass: a tool for non-interactive ssh password auth\"\n\npre_configure_target(){\n  export ac_cv_func_malloc_0_nonnull=yes\n  export ac_cv_func_realloc_0_nonnull=yes\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp sshpass ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/network/wireguard-linux-compat/modules-load.d/wireguard.conf",
    "content": "wireguard\n"
  },
  {
    "path": "packages/network/wireguard-linux-compat/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"wireguard-linux-compat\"\nPKG_VERSION=\"v1.0.20210219\"\nPKG_SHA256=\"11a75cf2387b6bb227c96241c911b5f48475def1ac84d0e758793cf9e677a6f0\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://www.wireguard.com\"\nPKG_URL=\"https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-$PKG_VERSION.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain linux libmnl\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"WireGuard VPN kernel module\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  kernel_make KERNELDIR=$(kernel_path) -C src/ module\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    cp src/*.ko $INSTALL/$(get_full_module_dir)/$PKG_NAME\n}\n"
  },
  {
    "path": "packages/network/wireguard-tools/config/system.d/wireguard.service.sample",
    "content": "[Unit]\nDescription=WireGuard VPN Service\nAfter=network-online.target nss-lookup.target connman-vpn.service time-sync.target\nWants=network-online.target nss-lookup.target connman-vpn.service time-sync.target\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/connmanctl connect vpn_service_name_goes_here\nExecStop=/usr/bin/connmanctl disconnect vpn_service_name_goes_here\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/network/wireguard-tools/config/wireguard/wireguard.config.sample",
    "content": "[provider_wireguard]\nType = WireGuard\nName = WireGuard VPN Tunnel\nHost = 3.2.5.6\nWireGuard.Address = 10.2.0.2/24\nWireGuard.ListenPort = 51820\nWireGuard.PrivateKey = qKIj010hDdWSjQQyVCnEgthLXusBgm3I6HWrJUaJymc=\nWireGuard.PublicKey = zzqUfWGIil6QxrAGz77HE5BGUEdD2PgHYnCg3CDKagE=\nWireGuard.PresharedKey = DfEYeVs04HS9XhKGM4/ZXHG3Qc4MFK2AJd8XouYDbRQ=\nWireGuard.DNS = 8.8.8.8, 1.1.1.1\nWireGuard.AllowedIPs = 0.0.0.0/0\nWireGuard.EndpointPort = 51820\nWireGuard.PersistentKeepalive = 25\n"
  },
  {
    "path": "packages/network/wireguard-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"wireguard-tools\"\nPKG_VERSION=\"1.0.20210914\"\nPKG_SHA256=\"69de713458a887cddb46b2fd1d43bf20548f693136af95792e65ec925538c770\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://www.wireguard.com\"\nPKG_URL=\"https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-v${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"WireGuard VPN userspace tools\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  kernel_make KERNELDIR=$(kernel_path) -C src/ wg\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/wg-keygen ${INSTALL}/usr/bin\n    cp ${PKG_BUILD}/src/wg ${INSTALL}/usr/bin\n\n  mkdir -p ${INSTALL}/usr\n    cp -R ${PKG_DIR}/config ${INSTALL}/usr\n}\n"
  },
  {
    "path": "packages/network/wireguard-tools/scripts/wg-keygen",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nif [ -x /usr/bin/wg ]; then\n\n  umask 077\n  mkdir -p /storage/.cache/wireguard\n\n  if [ ! -f /storage/.cache/wireguard/privatekey ]; then\n    wg genkey > /storage/.cache/wireguard/privatekey\n    echo \"created /storage/.cache/wireguard/privatekey\"\n  else\n    echo \"error, /storage/.cache/wireguard/privatekey already exists\"\n  fi\n\n  if [ ! -f /storage/.cache/wireguard/publickey ]; then\n    wg pubkey < /storage/.cache/wireguard/privatekey > /storage/.cache/wireguard/publickey\n    echo \"created /storage/.cache/wireguard/publickey\"\n  else\n    echo \"error, /storage/.cache/wireguard/publickey already exists\"\n  fi\n\n  if [ ! -f /storage/.cache/wireguard/preshared ]; then\n    wg genpsk > /storage/.cache/wireguard/preshared\n    echo \"created /storage/.cache/wireguard/preshared\"\n  else\n    echo \"error, /storage/.cache/wireguard/preshared already exists\"\n  fi\n\nfi\n\nexit\n"
  },
  {
    "path": "packages/network/wireguard-tools/tmpfiles.d/z_03_wireguard.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nd    /storage/.cache/wireguard   0755 root root - -\n"
  },
  {
    "path": "packages/network/wireless-regdb/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"wireless-regdb\"\nPKG_VERSION=\"2023.09.01\"\nPKG_SHA256=\"26d4c2a727cc59239b84735aad856b7c7d0b04e30aa5c235c4f7f47f5f053491\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb\"\nPKG_URL=\"https://www.kernel.org/pub/software/network/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_LONGDESC=\"wireless-regdb is a regulatory database\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  FW_TARGET_DIR=${INSTALL}/$(get_full_firmware_dir)\n\n  mkdir -p ${FW_TARGET_DIR}\n    cp ${PKG_BUILD}/regulatory.db ${PKG_BUILD}/regulatory.db.p7s ${FW_TARGET_DIR}\n}\n"
  },
  {
    "path": "packages/network/wpa_supplicant/config/makefile.config",
    "content": "CONFIG_CTRL_IFACE=y\nCONFIG_CTRL_IFACE_DBUS=y\nCONFIG_CTRL_IFACE_DBUS_NEW=y\nCONFIG_CTRL_IFACE_DBUS_INTRO=y\nCONFIG_DRIVER_WEXT=y\nCONFIG_LIBNL32=y\nCONFIG_DRIVER_NL80211=y\nCONFIG_DRIVER_WIRED=y\nCONFIG_IEEE8021X_EAPOL=y\nCONFIG_EAP_MD5=y\nCONFIG_EAP_MSCHAPV2=y\nCONFIG_EAP_TLS=y\nCONFIG_EAP_PEAP=y\nCONFIG_EAP_TTLS=y\nCONFIG_EAP_PSK=y\nCONFIG_EAP_FAST=y\nCONFIG_EAP_GTC=y\nCONFIG_EAP_OTP=y\nCONFIG_EAP_AKA=y\nCONFIG_EAP_PAX=y\nCONFIG_EAP_LEAP=y\nCONFIG_EAP_SAKE=y\nCONFIG_EAP_GPSK=y\nCONFIG_EAP_GPSK_SHA256=y\nCONFIG_EAP_TNC=y\nCONFIG_WPS=y\nCONFIG_EAP_IKEV2=y\nCONFIG_PKCS12=y\nCONFIG_SMARTCARD=y\nCONFIG_DEBUG_FILE=y\nCONFIG_BACKEND=file\nCONFIG_PEERKEY=y\nCONFIG_BGSCAN_SIMPLE=y\nCONFIG_AP=y\n#CONFIG_FIPS=y"
  },
  {
    "path": "packages/network/wpa_supplicant/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"wpa_supplicant\"\nPKG_VERSION=\"2.10\"\nPKG_SHA256=\"20df7ae5154b3830355f8ab4269123a87affdea59fe74fe9292a91d0d7e17b2f\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://w1.fi/wpa_supplicant/\"\nPKG_URL=\"https://w1.fi/releases/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain dbus libnl openssl\"\nPKG_LONGDESC=\"A free software implementation of an IEEE 802.11i supplicant.\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"+lto-parallel\"\n\nPKG_MAKE_OPTS_TARGET=\"-C wpa_supplicant V=1 LIBDIR=/usr/lib BINDIR=/usr/bin\"\nPKG_MAKEINSTALL_OPTS_TARGET=\"-C wpa_supplicant V=1 LIBDIR=/usr/lib BINDIR=/usr/bin\"\n\nconfigure_target() {\n  LDFLAGS+=\" -lpthread -lm\"\n\n  cp ${PKG_DIR}/config/makefile.config wpa_supplicant/.config\n}\n\npost_makeinstall_target() {\n  rm -r ${INSTALL}/usr/bin/wpa_cli\n\n  mkdir -p ${INSTALL}/etc/dbus-1/system.d\n    cp wpa_supplicant/dbus/dbus-wpa_supplicant.conf ${INSTALL}/etc/dbus-1/system.d\n\n  mkdir -p ${INSTALL}/usr/lib/systemd/system\n    cp wpa_supplicant/systemd/wpa_supplicant.service ${INSTALL}/usr/lib/systemd/system\n\n  mkdir -p ${INSTALL}/usr/share/dbus-1/system-services\n    cp wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service ${INSTALL}/usr/share/dbus-1/system-services\n}\n"
  },
  {
    "path": "packages/network/wpa_supplicant/patches/wpa_supplicant-2.4-libnl3-includes.patch",
    "content": "diff -Naur wpa_supplicant-2.4/src/drivers/drivers.mk wpa_supplicant-2.4.patch/src/drivers/drivers.mk\n--- wpa_supplicant-2.4/src/drivers/drivers.mk\t2015-03-15 18:30:39.000000000 +0100\n+++ wpa_supplicant-2.4.patch/src/drivers/drivers.mk\t2015-03-17 13:16:01.390789977 +0100\n@@ -35,7 +35,7 @@\n ifdef CONFIG_LIBNL32\n   DRV_LIBS += -lnl-3\n   DRV_LIBS += -lnl-genl-3\n-  DRV_CFLAGS += -I/usr/include/libnl3\n+  DRV_CFLAGS += `pkg-config --cflags libnl-3.0`\n ifdef CONFIG_LIBNL3_ROUTE\n   DRV_LIBS += -lnl-route-3\n   DRV_CFLAGS += -DCONFIG_LIBNL3_ROUTE\n"
  },
  {
    "path": "packages/network/wsdd2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"wsdd2\"\nPKG_VERSION=\"1.8.7\"\nPKG_SHA256=\"b0b6b31522f4a5e39d075b31d59d57af9a567f543e0b39b2fbdfec324d30310a\"\nPKG_LICENSE=\"GPL 3.0\"\nPKG_SITE=\"https://github.com/Netgear/wsdd2/\"\nPKG_URL=\"https://github.com/Netgear/wsdd2/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"WSD/LLMNR Discovery/Name Service Daemon\"\nPKG_BUILD_FLAGS=\"+size\"\n\npost_install() {\n  enable_service wsdd2.service\n}\n"
  },
  {
    "path": "packages/oem/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"oem\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"various\"\nPKG_SITE=\"http://www.libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain ${PROJECT}\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"OEM: Metapackage for various OEM packages\"\n"
  },
  {
    "path": "packages/packages.mk.addon_template",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"[package name]\"\nPKG_VERSION=\"[package version identifier or unique githash]\"\nPKG_REV=\"100\"\nPKG_SHA256=\"[sha256 hash of the source file, downloaded from PKG_URL]\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"[license of the upstream project]\"\nPKG_SITE=\"[url to the upstream project, e.g. http://example.com/libexample\"\nPKG_URL=\"[download url, e.g. https://github.com/example/libexample/archive/$PKG_VERSION.tar.gz]\"\n# PKG_MAINTAINER=\"John Doe\" # Full name or forum/GitHub nickname, if you want to be identified as the addon maintainer\nPKG_DEPENDS_TARGET=\"[build system dependencies, e.g. toolchain zlib openssl]\"\nPKG_SECTION=\"[location under packages, e.g. database]\"\nPKG_SHORTDESC=\"[short description of the package, e.g. libexample: library to calculate examples]\"\nPKG_LONGDESC=\"[long description of the package, often taken from the package/project website, e.g. libexample: this project is created to calculate examples for x and y, with maximum efficiency and fewer errors]\"\n# PKG_TOOLCHAIN=\"auto\" or one of meson, cmake, cmake-make, configure, make, ninja, autotools, manual\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"[proper name of the addon that is shown at the repo]\"\nPKG_ADDON_TYPE=\"[type]\"\n# PKG_ADDON_PROJECTS=\"[project, only set when not any]\"\n# PKG_ADDON_PROVIDES=\"executable\"\n# PKG_ADDON_REQUIRES=\"some.addon:0.0.0\"\n\n#PKG_CMAKE_OPTS_TARGET=\"-DWITH_EXAMPLE_PATH=/storage/.example\n#                      \"\n\n#pre_configure_target() {\n#  do something, or drop it\n#}\n\naddon() {\n  # copy needed files from other packages (which are not in the image)\n}\n\n# see https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/readme.md for more\n# take a look to other packages, for inspiration\n"
  },
  {
    "path": "packages/packages.mk.template",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"[package name]\"\nPKG_VERSION=\"[package version identifier or unique githash]\"\nPKG_SHA256=\"[sha256 hash of the source file, downloaded from PKG_URL]\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"[license of the upstream project]\"\nPKG_SITE=\"[url to the upstream project, e.g. http://example.com/libexample\"\nPKG_URL=\"[download url, e.g. https://github.com/example/libexample/archive/$PKG_VERSION.tar.gz]\"\n# PKG_MAINTAINER=\"John Doe\" # Full name or forum/GitHub nickname, if you want to be identified as the addon maintainer\nPKG_DEPENDS_TARGET=\"[build system dependencies, e.g. toolchain zlib openssl]\"\nPKG_SECTION=\"[location under packages, e.g. database]\"\nPKG_SHORTDESC=\"[short description of the package, e.g. libexample: library to calculate examples]\"\nPKG_LONGDESC=\"[long description of the package, often taken from the package/project website, e.g. libexample: this project is created to calculate examples for x and y, with maximum efficiency and fewer errors]\"\n# PKG_TOOLCHAIN=\"auto\"\n\n#PKG_CMAKE_OPTS_TARGET=\"-DWITH_EXAMPLE_PATH=/storage/.example\n#                      \"\n\n#pre_configure_target() {\n#  do something, or drop it\n#}\n\n# see https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/readme.md for more\n# take a look to other packages, for inspiration\n"
  },
  {
    "path": "packages/print/freetype/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"freetype\"\nPKG_VERSION=\"2.12.1\"\nPKG_SHA256=\"4766f20157cc4cf0cd292f80bf917f92d1c439b243ac3018debf6b9140c41a7f\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://freetype.org\"\nPKG_URL=\"https://download.savannah.gnu.org/releases/freetype/freetype-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain zlib libpng\"\nPKG_LONGDESC=\"The FreeType engine is a free and portable TrueType font rendering engine.\"\nPKG_TOOLCHAIN=\"configure\"\n\n# package specific configure options\nPKG_CONFIGURE_OPTS_TARGET=\"LIBPNG_CFLAGS=-I${SYSROOT_PREFIX}/usr/include \\\n                           LIBPNG_LDFLAGS=-L${SYSROOT_PREFIX}/usr/lib \\\n                           --with-zlib\"\n\npre_configure_target() {\n  # unset LIBTOOL because freetype uses its own\n    ( cd ..\n      unset LIBTOOL\n      sh autogen.sh\n    )\n}\n\npost_makeinstall_target() {\n  sed -e \"s#prefix=/usr#prefix=${SYSROOT_PREFIX}/usr#\" -i \"${SYSROOT_PREFIX}/usr/lib/pkgconfig/freetype2.pc\"\n\n  cp -P \"${PKG_BUILD}/.${TARGET_NAME}/freetype-config\" \"${SYSROOT_PREFIX}/usr/bin\"\n}\n"
  },
  {
    "path": "packages/print/freetype/patches/freetype-01-fix-pkgconf.patch",
    "content": "diff -Naur freetype-2.6.1/builds/unix/freetype2.in freetype-2.6.1.patch/builds/unix/freetype2.in\n--- freetype-2.6.1/builds/unix/freetype2.in\t2015-09-25 07:58:57.000000000 +0200\n+++ freetype-2.6.1.patch/builds/unix/freetype2.in\t2015-10-12 21:58:50.736816464 +0200\n@@ -1,7 +1,7 @@\n prefix=%prefix%\n-exec_prefix=%exec_prefix%\n-libdir=%libdir%\n-includedir=%includedir%\n+exec_prefix=${prefix}\n+libdir=${exec_prefix}/lib\n+includedir=${prefix}/include\n \n Name: FreeType 2\n URL: https://freetype.org\n"
  },
  {
    "path": "packages/python/devel/Jinja2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Jinja2\"\nPKG_VERSION=\"3.1.2\"\nPKG_SHA256=\"31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://pypi.org/project/Jinja2/\"\nPKG_URL=\"https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"Python3:host setuptools:host MarkupSafe:host\"\nPKG_LONGDESC=\"Jinja is a fast, expressive, extensible templating engine.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_host() {\n  python3 setup.py build\n}\n\nmakeinstall_host() {\n  exec_thread_safe python3 setup.py install --prefix=${TOOLCHAIN}\n}\n"
  },
  {
    "path": "packages/python/devel/Mako/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Mako\"\nPKG_VERSION=\"1.2.4\"\nPKG_SHA256=\"d60a3903dc3bb01a18ad6a89cdbe2e4eadc69c0bc8ef1e3773ba53d44c3f7a34\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://pypi.org/project/Mako\"\nPKG_URL=\"https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"Python3:host setuptools:host MarkupSafe:host\"\nPKG_LONGDESC=\"Mako is a super-fast templating language that borrows the best ideas from the existing templating languages.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_host() {\n  exec_thread_safe python3 setup.py install --prefix=${TOOLCHAIN}\n}\n"
  },
  {
    "path": "packages/python/devel/MarkupSafe/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"MarkupSafe\"\nPKG_VERSION=\"2.1.1\"\nPKG_SHA256=\"7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://pypi.org/project/MarkupSafe/\"\nPKG_URL=\"https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"Python3:host setuptools:host\"\nPKG_LONGDESC=\"MarkupSafe implements a XML/HTML/XHTML Markup safe string for Python\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_host() {\n  exec_thread_safe python3 setup.py install --prefix=${TOOLCHAIN}\n}\n"
  },
  {
    "path": "packages/python/devel/distutilscross/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"distutilscross\"\nPKG_VERSION=\"0.1\"\nPKG_SHA256=\"4ed3fb427708c8a3ed5fe9c599532480f581078a1e0aec0e50f40eb58e9f0015\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://pypi.org/project/distutilscross/\"\nPKG_URL=\"https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"Python3:host setuptools:host\"\nPKG_LONGDESC=\"distutilscross enhances distutils to support Cross Compile of Python extensions\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_host() {\n  exec_thread_safe python setup.py install --prefix=${TOOLCHAIN}\n}\n"
  },
  {
    "path": "packages/python/devel/distutilscross/patches/distutilscross-0000-fix-python3.patch",
    "content": "diff --git a/distutilscross/crosscompile.py b/distutilscross/crosscompile.py\nindex 31dfd6c..16b683e 100644\n--- a/distutilscross/crosscompile.py\n+++ b/distutilscross/crosscompile.py\n@@ -13,7 +13,7 @@ class build(_build):\n         self.cross_compile = 0\n \n     def finalize_options(self):\n-        if self.cross_compile and os.environ.has_key('PYTHONXCPREFIX'):\n+        if self.cross_compile and 'PYTHONXCPREFIX' in os.environ:\n             prefix = os.environ['PYTHONXCPREFIX']\n             sysconfig.get_python_lib = get_python_lib\n             sysconfig.PREFIX = prefix\n@@ -31,8 +31,8 @@ class build(_build):\n \n _get_python_lib = sysconfig.get_python_lib\n def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):\n-    if os.environ.has_key('PYTHONXCPREFIX'):\n-        print \"Setting prefix\"\n+    if 'PYTHONXCPREFIX' in os.environ:\n+        print(\"Setting prefix\")\n         prefix = os.environ['PYTHONXCPREFIX']\n \n     return _get_python_lib(plat_specific, standard_lib, prefix)\n@@ -50,24 +50,24 @@ def customize_compiler(compiler):\n             sysconfig.get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',\n                             'CCSHARED', 'LDSHARED', 'SO')\n \n-        if os.environ.has_key('CC'):\n+        if 'CC' in os.environ:\n             cc = os.environ['CC']\n-        if os.environ.has_key('CXX'):\n+        if 'CXX' in os.environ:\n             cxx = os.environ['CXX']\n-        if os.environ.has_key('LDSHARED'):\n+        if 'LDSHARED' in os.environ:\n             ldshared = os.environ['LDSHARED']\n-        if os.environ.has_key('CPP'):\n+        if 'CPP' in os.environ:\n             cpp = os.environ['CPP']\n         else:\n             cpp = cc + \" -E\"           # not always\n-        if os.environ.has_key('LDFLAGS'):\n+        if 'LDFLAGS' in os.environ:\n             ldshared = ldshared + ' ' + os.environ['LDFLAGS']\n-        if os.environ.has_key('OPT'):\n+        if 'OPT' in os.environ:\n             opt = os.environ['OPT']\n-        if os.environ.has_key('CFLAGS'):\n+        if 'CFLAGS' in os.environ:\n             cflags = opt + ' ' + os.environ['CFLAGS']\n             ldshared = ldshared + ' ' + os.environ['CFLAGS']\n-        if os.environ.has_key('CPPFLAGS'):\n+        if 'CPPFLAGS' in os.environ:\n             cpp = cpp + ' ' + os.environ['CPPFLAGS']\n             cflags = cflags + ' ' + os.environ['CPPFLAGS']\n             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']\n"
  },
  {
    "path": "packages/python/devel/meson/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"meson\"\nPKG_VERSION=\"0.64.1\"\nPKG_SHA256=\"3a8e030c2334f782085f81627062cc6d4a6771edf31e055ffe374f9e6b089ab9\"\nPKG_LICENSE=\"Apache\"\nPKG_SITE=\"http://mesonbuild.com\"\nPKG_URL=\"https://github.com/mesonbuild/meson/releases/download/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"Python3:host setuptools:host\"\nPKG_LONGDESC=\"High productivity build system\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_host() {\n  python3 setup.py build\n}\n\nmakeinstall_host() {\n  exec_thread_safe python3 setup.py install --prefix=${TOOLCHAIN} --skip-build\n\n  # Avoid using full path to python3 that may exceed 128 byte limit.\n  # Instead use PATH as we know our toolchain is first.\n  sed -e '1 s/^#!.*$/#!\\/usr\\/bin\\/env python3/' -i ${TOOLCHAIN}/bin/meson\n}\n"
  },
  {
    "path": "packages/python/devel/ninja/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ninja\"\nPKG_VERSION=\"1.11.1\"\nPKG_SHA256=\"31747ae633213f1eda3842686f83c2aa1412e0f5691d1c14dbbcc67fe7400cea\"\nPKG_LICENSE=\"Apache\"\nPKG_SITE=\"https://ninja-build.org/\"\nPKG_URL=\"https://github.com/ninja-build/ninja/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"Python3:host\"\nPKG_LONGDESC=\"Small build system with a focus on speed\"\nPKG_TOOLCHAIN=\"cmake-make\"\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp ninja ${TOOLCHAIN}/bin\n}\n"
  },
  {
    "path": "packages/python/devel/pgi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"pgi\"\nPKG_VERSION=\"0.0.11.2\"\nPKG_SHA256=\"7a1ca8ac4e8bee6b663e6d556ecda8032584de753acd76ab3fc21c4f874fa738\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"https://github.com/pygobject/pgi\"\nPKG_URL=\"https://github.com/pygobject/pgi/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3\"\nPKG_SECTION=\"python/devel\"\nPKG_SHORTDESC=\"PGI - Pure Python GObject Introspection Bindings\"\nPKG_LONGDESC=\"GObject Introspection bindings written in pure Python using ctypes and cffi (optional). API compatible with PyGObject.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  export PYTHONXCPREFIX=\"$SYSROOT_PREFIX/usr\"\n}\n\nmake_target() {\n  exec_thread_safe python3 setup.py build\n}\n\nmakeinstall_target() {\n  exec_thread_safe python3 setup.py install --root=$INSTALL --prefix=/usr\n}\n\npost_makeinstall_target() {\n  find $INSTALL/usr/lib -name \"*.py\" -exec rm -rf \"{}\" \";\"\n  rm -rf $INSTALL/usr/lib/python*/site-packages/*/tests\n}\n"
  },
  {
    "path": "packages/python/devel/pgi/patches/pgi-0001-remove-type-as-it-s-not-Python-3-compatible.patch",
    "content": "From 40f45d7f4a49ec1e66acec5d5ff1ce10c94a99ce Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Wed, 25 Nov 2020 13:41:14 +0100\nSubject: [PATCH] remove 'type' as it's not Python 3 compatible\n\n---\n pgi/clib/_utils.py | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/pgi/clib/_utils.py b/pgi/clib/_utils.py\nindex b45d901..bd0f416 100644\n--- a/pgi/clib/_utils.py\n+++ b/pgi/clib/_utils.py\n@@ -31,7 +31,7 @@ class _BaseFinalizer(object):\n         self.ptr = ptr\n \n     def delete(self, deadweakproxy):\n-        type(self)._objects.remove(self)\n+        self._objects.remove(self)\n         self.destructor(deadweakproxy, self.ptr)\n \n \n-- \n2.29.2\n\n"
  },
  {
    "path": "packages/python/devel/pygobject/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"pygobject\"\nPKG_VERSION=\"3.42.2\"\nPKG_SHA256=\"ade8695e2a7073849dd0316d31d8728e15e1e0bc71d9ff6d1c09e86be52bc957\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"http://www.pygtk.org/\"\nPKG_URL=\"http://ftp.gnome.org/pub/GNOME/sources/pygobject/$(get_pkg_version_maj_min)/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 glib libffi gobject-introspection pgi\"\nPKG_LONGDESC=\"A convenient wrapper for the GObject+ library for use in Python programs.\"\nPKG_TOOLCHAIN=\"meson\"\n\npre_configure_target() {\n  PKG_CONFIG_PATH=\"${SYSROOT_PREFIX}/usr/lib/pkgconfig\"\n\n  PKG_MESON_OPTS_TARGET=\" \\\n    -Dpython=${TOOLCHAIN}/bin/${PKG_PYTHON_VERSION} \\\n    -Dpycairo=disabled \\\n    -Dtests=false\"\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n  rm -rf ${INSTALL}/usr/share/pygobject\n}\n"
  },
  {
    "path": "packages/python/devel/setuptools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"setuptools\"\nPKG_VERSION=\"52.0.0\"\nPKG_SHA256=\"ff0c74d1b905a224d647f99c6135eacbec2620219992186b81aa20012bc7f882\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://pypi.org/project/setuptools\"\nPKG_URL=\"https://github.com/pypa/setuptools/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"Python3:host\"\nPKG_LONGDESC=\"Replaces Setuptools as the standard method for working with Python module distributions.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_host() {\n  python3 bootstrap.py\n}\n\nmakeinstall_host() {\n  exec_thread_safe python3 setup.py install --prefix=${TOOLCHAIN}\n}\n"
  },
  {
    "path": "packages/python/devel/waf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"waf\"\nPKG_VERSION=\"2.0.25\"\nPKG_SHA256=\"66cff7beed0e77db874e9232cc08874abb3e866c7f0f1f34ba2f959fde44fdd4\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://waf.io\"\nPKG_URL=\"https://waf.io/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_LONGDESC=\"The Waf build system\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_host() {\n  cp -pf ${PKG_BUILD}/waf ${TOOLCHAIN}/bin/\n}\n"
  },
  {
    "path": "packages/python/graphics/Pillow/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"Pillow\"\nPKG_VERSION=\"9.3.0\"\nPKG_SHA256=\"188b2a5fd445b2afa05bc0c1318ce49d4335ebbb69417fbb79acaf0a0784709e\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://python-pillow.org/\"\nPKG_URL=\"https://github.com/python-pillow/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host zlib freetype libjpeg-turbo tiff\"\nPKG_LONGDESC=\"The Python Imaging Library adds image processing capabilities to your Python interpreter.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n  export LDSHARED=\"${CC} -shared\"\n}\n\nmake_target() {\n  python3 setup.py build --cross-compile\n}\n\nmakeinstall_target() {\n  python3 setup.py install --root=${INSTALL} --prefix=/usr\n}\n\npost_makeinstall_target() {\n  python_remove_source\n\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/python/graphics/Pillow/patches/Pillow-0001-crosscompiling.patch",
    "content": "diff --git a/setup.py b/setup.py\nindex 8eb0b3c..277e44a 100755\n--- a/setup.py\n+++ b/setup.py\n@@ -253,7 +253,7 @@ class pil_build_ext(build_ext):\n     ] + [('add-imaging-libs=', None, 'Add libs to _imaging build')]\n \n     def initialize_options(self):\n-        self.disable_platform_guessing = None\n+        self.disable_platform_guessing = True\n         self.add_imaging_libs = \"\"\n         build_ext.initialize_options(self)\n         for x in self.feature:\n"
  },
  {
    "path": "packages/python/python-uinput/package.mk",
    "content": "PKG_NAME=\"python-uinput\"\nPKG_VERSION=\"master\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/tuomasjjrasanen/python-uinput\"\nPKG_URL=\"https://github.com/tuomasjjrasanen/python-uinput/archive/refs/heads/master.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain systemd Python3\"\nPKG_SECTION=\"python\"\nPKG_LONGDESC=\"Pythonic API to create virtual input devices via uinput kernel module.\"\nPKG_TOOLCHAIN=\"manual\"\n\n\npre_configure_target() {\n  export LDSHARED=\"${CC} -shared\"\n  export PYTHONPATH=\"${SYSROOT_PREFIX}/usr/lib/${PKG_PYTHON_VERSION}/site-packages:${PYTHONPATH}\"\n  export PYTHON_CPPFLAGS=\"-I${SYSROOT_PREFIX}/usr/include/${PKG_PYTHON_VERSION}\"\n  export PYTHON_LDFLAGS=\"-L${SYSROOT_PREFIX}/usr/lib -l${PKG_PYTHON_VERSION}\"\n  export PYTHON_SITE_PKG=\"${SYSROOT_PREFIX}/usr/lib/${PKG_PYTHON_VERSION}/site-packages\"\n  export _python_sysroot=\"${SYSROOT_PREFIX}\"\n  export _python_prefix=\"/usr\"\n  export _python_exec_prefix=\"/usr\"\n}\n\n\nmake_target() {\n  python3 setup.py build_ext --include-dirs=${SYSROOT_PREFIX}/usr/include\n  python3 setup.py build\n}\n\nmakeinstall_target() {\n  python3 setup.py install \\\n    --root=${INSTALL} \\\n    --prefix=/usr\n\n}\n\npost_makeinstall_target() {\n  python_compile ${INSTALL}/usr/lib/python*/site-packages/\n  python_remove_source ${INSTALL}/usr/lib/python*/site-packages/\n}"
  },
  {
    "path": "packages/python/security/pycryptodome/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pycryptodome\"\nPKG_VERSION=\"3.16.0\"\nPKG_SHA256=\"c8f6878f11e6164b663058246d2c3ecc3c445f9cbff03dea97cee80c4223b9ff\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://pypi.org/project/pycryptodome\"\nPKG_URL=\"https://github.com/Legrandin/${PKG_NAME}/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"PyCryptodome is a self-contained Python package of low-level cryptographic primitives.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n  export LDSHARED=\"${CC} -shared\"\n}\n\nmake_target() {\n  python3 setup.py build --cross-compile\n}\n\nmakeinstall_target() {\n  python3 setup.py install --root=${INSTALL} --prefix=/usr\n\n  # Remove SelfTest bloat\n  find ${INSTALL} -type d -name SelfTest -exec rm -fr \"{}\" \\; 2>/dev/null || true\n  find ${INSTALL} -name SOURCES.txt -exec sed -i \"/\\/SelfTest\\//d;\" \"{}\" \\;\n\n  # Create Cryptodome as an alternative namespace to Crypto (Kodi addons may use either)\n  ln -sf /usr/lib/${PKG_PYTHON_VERSION}/site-packages/Crypto ${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}/site-packages/Cryptodome\n}\n\npost_makeinstall_target() {\n  python_remove_source\n}\n"
  },
  {
    "path": "packages/python/system/dbus-python/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"dbus-python\"\nPKG_VERSION=\"1.3.2\"\nPKG_SHA256=\"ad67819308618b5069537be237f8e68ca1c7fcc95ee4a121fe6845b1418248f8\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://freedesktop.org/wiki/Software/dbus\"\nPKG_URL=\"https://dbus.freedesktop.org/releases/dbus-python/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 dbus dbus-glib\"\nPKG_LONGDESC=\"D-BUS is a message bus, used for sending messages between applications.\"\nPKG_BUILD_FLAGS=\"+lto\"\nPKG_TOOLCHAIN=\"autotools\"\n\npre_configure_target() {\n  export PKG_CONFIG_PATH=\"${SYSROOT_PREFIX}/usr/lib/pkgconfig\"\n  export PYTHON_CONFIG=\"${SYSROOT_PREFIX}/usr/bin/python3-config\"\n  export PYTHON_INCLUDES=\"$(${SYSROOT_PREFIX}/usr/bin/python3-config --includes)\"\n  export PYTHON_LIBS=\"$(${SYSROOT_PREFIX}/usr/bin/python3-config --ldflags --embed)\"\n}\n\npost_makeinstall_target() {\n  python_remove_source\n}\n"
  },
  {
    "path": "packages/python/system/dbussy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dbussy\"\nPKG_VERSION=\"691a8a8a1914416b7ea1545fb931d74f2e381f09\"\nPKG_SHA256=\"857104ef2fd1978323d7c87b32c753d2d178b79adbd13f52cea23511f5195ded\"\nPKG_LICENSE=\"LGPLv2.1+\"\nPKG_SITE=\"https://gitlab.com/ldo/dbussy\"\nPKG_URL=\"https://github.com/ldo/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 dbus\"\nPKG_LONGDESC=\"DBussy is a wrapper around libdbus, written in pure Python\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  python3 setup.py build\n}\n\nmakeinstall_target() {\n  python3 setup.py install --root=${INSTALL} --prefix=/usr\n}\n\npost_makeinstall_target() {\n  python_remove_source\n}\n"
  },
  {
    "path": "packages/python/system/simplejson/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2017 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"simplejson\"\nPKG_VERSION=\"3.18.1\"\nPKG_SHA256=\"746086e3ef6d74b53599df31b491d88a355abf2e31c837137dd90f8c4561cafa\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://pypi.org/project/simplejson\"\nPKG_URL=\"https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"A simple, fast, complete, correct and extensible JSON encoder and decoder for Python 2.5+.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n}\n\nmake_target() {\n  python3 setup.py build --cross-compile\n}\n\nmakeinstall_target() {\n  python3 setup.py install --root=${INSTALL} --prefix=/usr\n}\n\npost_makeinstall_target() {\n  python_remove_source\n\n  rm -rf ${INSTALL}/usr/lib/python*/site-packages/*/tests\n}\n"
  },
  {
    "path": "packages/rust/cargo/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"cargo\"\nPKG_VERSION=\"$(get_pkg_version rust)\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://www.rust-lang.org\"\nPKG_DEPENDS_HOST=\"openssl:host rust:host\"\nPKG_DEPENDS_UNPACK=\"cargo-snapshot rust\"\nPKG_LONGDESC=\"Cargo is the Rust package manager\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_configure_host() {\n  \"$(get_build_dir cargo-snapshot)/install.sh\" --prefix=\"${PKG_BUILD}/cargo-snapshot\" --disable-ldconfig\n}\n\nconfigure_host() {\n  cd ${PKG_BUILD}\n}\n\nmake_host() {\n  cd ${PKG_BUILD}\n\n  export RUSTC_BOOTSTRAP=\"1\"\n\n  ./cargo-snapshot/bin/cargo build -v --target ${RUST_HOST} --release --manifest-path=\"$(get_build_dir rust)/src/tools/cargo/Cargo.toml\"\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp -a ${PKG_BUILD}/.${RUST_HOST}/target/${RUST_HOST}/release/cargo ${TOOLCHAIN}/bin/\n}\n"
  },
  {
    "path": "packages/rust/cargo-c/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"cargo-c\"\nPKG_VERSION=\"v0.9.17\"\nPKG_SHA256=\"95fcf50505516dfa6a941e666d1388810da9d7a9e1c623c09068faef5d50b3b9\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/lu-zero/cargo-c\"\nPKG_URL=\"https://github.com/lu-zero/cargo-c/archive/refs/tags/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"cargo:host\"\nPKG_LONGDESC=\"Use Cargo-c to build and install C-compatible libraries\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_host() {\n  cargo build --release --manifest-path ${PKG_BUILD}/Cargo.toml\n}\n\nmakeinstall_host() {\n  cargo install --profile release --path ${PKG_BUILD}\n}\n"
  },
  {
    "path": "packages/rust/cargo-snapshot/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"cargo-snapshot\"\nPKG_VERSION=\"$(get_pkg_version rust)\"\nPKG_SHA256=\"e744dad75de8419e7fea530c29bd56cf931b4d4de62eb4bd442bfac7b54e61ed\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://www.rust-lang.org\"\nPKG_URL=\"https://static.rust-lang.org/dist/cargo-${PKG_VERSION}-${MACHINE_HARDWARE_NAME}-unknown-linux-gnu.tar.xz\"\nPKG_LONGDESC=\"cargo bootstrap package\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/rust/rust/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rust\"\nPKG_VERSION=\"1.67.1\"\nPKG_SHA256=\"46483d3e5de85a3bd46f8e7a3ae1837496391067dbe713a25d3cf051b3d9ff6e\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://www.rust-lang.org\"\nPKG_URL=\"https://static.rust-lang.org/dist/rustc-${PKG_VERSION}-src.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain llvm:host\"\nPKG_DEPENDS_UNPACK=\"rustc-snapshot rust-std-snapshot cargo-snapshot\"\nPKG_LONGDESC=\"A systems programming language that prevents segfaults, and guarantees thread safety.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_configure_host() {\n  \"$(get_build_dir rustc-snapshot)/install.sh\" --prefix=\"${PKG_BUILD}/rust-snapshot\" --disable-ldconfig\n  \"$(get_build_dir rust-std-snapshot)/install.sh\" --prefix=\"${PKG_BUILD}/rust-snapshot\" --disable-ldconfig\n  \"$(get_build_dir cargo-snapshot)/install.sh\" --prefix=\"${PKG_BUILD}/rust-snapshot\" --disable-ldconfig\n}\n\nconfigure_host() {\n\n  mkdir -p ${PKG_BUILD}/targets\n\n  case \"${TARGET_ARCH}\" in\n    \"arm\")\n      # the arm target is special because we specify the subarch. ie armv8a\n      cp -a ${PKG_DIR}/targets/arm-libreelec-linux-gnueabihf.json ${PKG_BUILD}/targets/${TARGET_NAME}.json\n      ;;\n    \"aarch64\"|\"x86_64\")\n      cp -a ${PKG_DIR}/targets/${TARGET_NAME}.json ${PKG_BUILD}/targets/${TARGET_NAME}.json\n      ;;\n  esac\n\n  cat > ${PKG_BUILD}/config.toml <<END\nchangelog-seen = 2\n\n[target.${TARGET_NAME}]\nllvm-config = \"${TOOLCHAIN}/bin/llvm-config\"\ncxx = \"${TARGET_PREFIX}g++\"\ncc = \"${TARGET_PREFIX}gcc\"\n\n[target.${RUST_HOST}]\nllvm-config = \"${TOOLCHAIN}/bin/llvm-config\"\ncxx = \"${CXX}\"\ncc = \"${CC}\"\n\n[rust]\nrpath = true\nchannel = \"stable\"\ncodegen-tests = false\noptimize = true\n\n[build]\nsubmodules = false\ndocs = false\nprofiler = true\nvendor = true\n\nrustc = \"${PKG_BUILD}/rust-snapshot/bin/rustc\"\ncargo = \"${PKG_BUILD}/rust-snapshot/bin/cargo\"\n\ntarget = [\n  \"${TARGET_NAME}\",\n  \"${RUST_HOST}\"\n]\n\nhost = [\n  \"${RUST_HOST}\"\n]\n\nbuild = \"${RUST_HOST}\"\n\n[install]\nprefix = \"${TOOLCHAIN}\"\nbindir = \"${TOOLCHAIN}/bin\"\nlibdir = \"${TOOLCHAIN}/lib\"\ndatadir = \"${TOOLCHAIN}/share\"\nmandir = \"${TOOLCHAIN}/share/man\"\n\nEND\n\nCARGO_HOME=\"${PKG_BUILD}/cargo_home\"\nmkdir -p \"${CARGO_HOME}\"\n\ncat > ${CARGO_HOME}/config << END\n[target.${TARGET_NAME}]\nlinker = \"${TARGET_PREFIX}gcc\"\n\n[target.${RUST_HOST}]\nlinker = \"${CC}\"\nrustflags = [\"-C\", \"link-arg=-Wl,-rpath,${TOOLCHAIN}/lib\"]\n\n[build]\ntarget-dir = \"${PKG_BUILD}/target\"\n\n[term]\nprogress.when = 'always'\nprogress.width = 80\n\nEND\n\n}\n\nmake_host() {\n  cd ${PKG_BUILD}\n\n  unset CFLAGS\n  unset CXXFLAGS\n  unset CPPFLAGS\n  unset LDFLAGS\n\n  export RUST_TARGET_PATH=\"${PKG_BUILD}/targets/\"\n\n  python3 src/bootstrap/bootstrap.py -j ${CONCURRENCY_MAKE_LEVEL} build --stage 2 --verbose\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp -a build/${RUST_HOST}/stage2/bin/* ${TOOLCHAIN}/bin\n\n  mkdir -p ${TOOLCHAIN}/lib/rustlib\n    cp -a build/${RUST_HOST}/stage2/lib/* ${TOOLCHAIN}/lib\n\n    cp -a ${PKG_BUILD}/targets/*.json ${TOOLCHAIN}/lib/rustlib/\n}\n"
  },
  {
    "path": "packages/rust/rust/targets/aarch64-libreelec-linux-gnu.json",
    "content": "{\n  \"arch\": \"aarch64\",\n  \"crt-static-respected\": true,\n  \"data-layout\": \"e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128\",\n  \"dynamic-linking\": true,\n  \"env\": \"gnu\",\n  \"executables\": true,\n  \"features\": \"+outline-atomics\",\n  \"has-rpath\": true,\n  \"has-thread-local\": true,\n  \"is-builtin\": false,\n  \"llvm-target\": \"aarch64-unknown-linux-gnu\",\n  \"max-atomic-width\": 128,\n  \"os\": \"linux\",\n  \"position-independent-executables\": true,\n  \"relro-level\": \"full\",\n  \"supported-sanitizers\": [\n    \"address\",\n    \"cfi\",\n    \"leak\",\n    \"memory\",\n    \"memtag\",\n    \"thread\",\n    \"hwaddress\"\n  ],\n  \"target-family\": [\n    \"unix\"\n  ],\n  \"target-mcount\": \"\\u0001_mcount\",\n  \"target-pointer-width\": \"64\"\n}\n\n"
  },
  {
    "path": "packages/rust/rust/targets/arm-libreelec-linux-gnueabihf.json",
    "content": "{\n  \"abi\": \"eabihf\",\n  \"arch\": \"arm\",\n  \"crt-static-respected\": true,\n  \"data-layout\": \"e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64\",\n  \"dynamic-linking\": true,\n  \"env\": \"gnu\",\n  \"executables\": true,\n  \"features\": \"+strict-align,+v6,+vfp2,-d32\",\n  \"has-rpath\": true,\n  \"has-thread-local\": true,\n  \"is-builtin\": false,\n  \"llvm-target\": \"arm-unknown-linux-gnueabihf\",\n  \"max-atomic-width\": 64,\n  \"os\": \"linux\",\n  \"position-independent-executables\": true,\n  \"relro-level\": \"full\",\n  \"target-family\": [\n    \"unix\"\n  ],\n  \"target-mcount\": \"\\u0001__gnu_mcount_nc\",\n  \"target-pointer-width\": \"32\"\n}\n"
  },
  {
    "path": "packages/rust/rust/targets/x86_64-libreelec-linux-gnu.json",
    "content": "{\n  \"arch\": \"x86_64\",\n  \"cpu\": \"x86-64\",\n  \"crt-static-respected\": true,\n  \"data-layout\": \"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128\",\n  \"dynamic-linking\": true,\n  \"env\": \"gnu\",\n  \"executables\": true,\n  \"has-rpath\": true,\n  \"has-thread-local\": true,\n  \"is-builtin\": false,\n  \"llvm-target\": \"x86_64-unknown-linux-gnu\",\n  \"max-atomic-width\": 64,\n  \"os\": \"linux\",\n  \"position-independent-executables\": true,\n  \"pre-link-args\": {\n    \"gcc\": [\n      \"-m64\"\n    ]\n  },\n  \"relro-level\": \"full\",\n  \"stack-probes\": {\n    \"kind\": \"call\"\n  },\n  \"static-position-independent-executables\": true,\n  \"supported-sanitizers\": [\n    \"address\",\n    \"cfi\",\n    \"leak\",\n    \"memory\",\n    \"thread\"\n  ],\n  \"target-family\": [\n    \"unix\"\n  ],\n  \"target-pointer-width\": \"64\"\n}\n\n"
  },
  {
    "path": "packages/rust/rust-std-snapshot/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rust-std-snapshot\"\nPKG_VERSION=\"$(get_pkg_version rust)\"\nPKG_SHA256=\"f4dc8468dfc1dbd86f865b10f06e0e4b4e76f5a3a1cc27317a520ab1660844e9\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://www.rust-lang.org\"\nPKG_URL=\"https://static.rust-lang.org/dist/rust-std-${PKG_VERSION}-${MACHINE_HARDWARE_NAME}-unknown-linux-gnu.tar.xz\"\nPKG_LONGDESC=\"rust std library bootstrap package\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/rust/rustc-snapshot/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rustc-snapshot\"\nPKG_VERSION=\"$(get_pkg_version rust)\"\nPKG_SHA256=\"e27ec0c6d1a2b2b38e5258904c3741ddb246bff5715aa95e595f818aa77f7bee\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://www.rust-lang.org\"\nPKG_URL=\"https://static.rust-lang.org/dist/rustc-${PKG_VERSION}-${MACHINE_HARDWARE_NAME}-unknown-linux-gnu.tar.xz\"\nPKG_LONGDESC=\"rustc bootstrap compiler\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/security/gnutls/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gnutls\"\nPKG_VERSION=\"3.7.8\"\nPKG_SHA256=\"c58ad39af0670efe6a8aee5e3a8b2331a1200418b64b7c51977fb396d4617114\"\nPKG_LICENSE=\"LGPL2.1\"\nPKG_SITE=\"https://gnutls.org\"\nPKG_URL=\"https://www.gnupg.org/ftp/gcrypt/gnutls/v${PKG_VERSION:0:3}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libidn2 nettle zlib\"\nPKG_LONGDESC=\"A library which provides a secure layer over a reliable transport layer.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-doc \\\n                           --disable-full-test-suite \\\n                           --disable-guile \\\n                           --disable-libdane \\\n                           --disable-padlock \\\n                           --disable-rpath \\\n                           --disable-tests \\\n                           --disable-tools \\\n                           --disable-valgrind-tests \\\n                           --with-idn \\\n                           --with-included-libtasn1 \\\n                           --with-included-unistring \\\n                           --without-p11-kit \\\n                           --without-tpm\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/security/libgcrypt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libgcrypt\"\nPKG_VERSION=\"1.8.7\"\nPKG_SHA256=\"03b70f028299561b7034b8966d7dd77ef16ed139c43440925fe8782561974748\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://www.gnupg.org/\"\nPKG_URL=\"https://www.gnupg.org/ftp/gcrypt/libgcrypt/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libgpg-error\"\nPKG_LONGDESC=\"A General purpose cryptographic library.\"\nPKG_TOOLCHAIN=\"autotools\"\n# libgcrypt-1.7.x fails to build with LTO support\n# see for example https://bugs.gentoo.org/show_bug.cgi?id=581114\n\npre_configure_target() {\n  PKG_CONFIGURE_OPTS_TARGET=\"CC_FOR_BUILD=${HOST_CC} \\\n                             ac_cv_sys_symbol_underscore=no \\\n                             --enable-asm \\\n                             --with-gnu-ld \\\n                             --with-libgpg-error-prefix=${SYSROOT_PREFIX}/usr \\\n                             --disable-doc\"\n}\n\npost_makeinstall_target() {\n  sed -e \"s:\\(['= ]\\)\\\"/usr:\\\\1\\\"${SYSROOT_PREFIX}/usr:g\" -i src/${PKG_NAME}-config\n  cp src/${PKG_NAME}-config ${SYSROOT_PREFIX}/usr/bin\n\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/security/libgcrypt/patches/libgcrypt-01-dont_replace_parts_of_path-0.1.patch",
    "content": "diff -Naur libgcrypt-1.4.6/cipher/Makefile.am libgcrypt-1.4.6.patch/cipher/Makefile.am\n--- libgcrypt-1.4.6/cipher/Makefile.am\t2009-12-11 16:31:38.000000000 +0100\n+++ libgcrypt-1.4.6.patch/cipher/Makefile.am\t2011-05-08 03:21:56.463021968 +0200\n@@ -68,7 +68,7 @@\n camellia.c camellia.h camellia-glue.c\n \n if ENABLE_O_FLAG_MUNGING\n-o_flag_munging = sed -e 's/-O\\([2-9s][2-9s]*\\)/-O1/' -e 's/-Ofast/-O1/g'\n+o_flag_munging = sed -e 's/-O\\([2-9s][2-9s]\\)/-O1/' -e 's/-Ofast/-O1/g'\n else\n o_flag_munging = cat\n endif\ndiff -Naur libgcrypt-1.4.6/cipher/Makefile.in libgcrypt-1.4.6.patch/cipher/Makefile.in\n--- libgcrypt-1.4.6/cipher/Makefile.in\t2010-07-13 17:42:20.000000000 +0200\n+++ libgcrypt-1.4.6.patch/cipher/Makefile.in\t2011-05-08 03:22:12.059208971 +0200\n@@ -274,7 +274,7 @@\n camellia.c camellia.h camellia-glue.c\n \n @ENABLE_O_FLAG_MUNGING_FALSE@o_flag_munging = cat\n-@ENABLE_O_FLAG_MUNGING_TRUE@o_flag_munging = sed -e 's/-O\\([2-9s][2-9s]*\\)/-O1/' -e 's/-Ofast/-O1/g'\n+@ENABLE_O_FLAG_MUNGING_TRUE@o_flag_munging = sed -e 's/-O\\([2-9s][2-9s]\\)/-O1/' -e 's/-Ofast/-O1/g'\n all: all-am\n \n .SUFFIXES:\n"
  },
  {
    "path": "packages/security/libgcrypt/patches/libgcrypt-ac_cv_sys_symbol_underscore.patch",
    "content": "diff --git a/acinclude.m4 b/acinclude.m4\nindex a7bc0fa..1a5bffc 100644\n--- a/acinclude.m4\n+++ b/acinclude.m4\n@@ -76,13 +76,14 @@ case \"${host}\" in\n     i386-emx-os2 | i[3456]86-pc-os2*emx | i386-pc-msdosdjgpp)\n         ac_cv_sys_symbol_underscore=yes\n         ;;\n-    *)\n-      if test \"$cross_compiling\" = yes; then\n-        if test \"x$ac_cv_sys_symbol_underscore\" = x ; then\n-           ac_cv_sys_symbol_underscore=yes\n-        fi\n-      else\n-         tmp_do_check=\"yes\"\n+    *) if test -z \"$ac_cv_sys_symbol_underscore\"; then\n+         if test \"$cross_compiling\" = yes; then\n+           if test \"x$ac_cv_sys_symbol_underscore\" = x ; then\n+              ac_cv_sys_symbol_underscore=yes\n+           fi\n+         else\n+            tmp_do_check=\"yes\"\n+         fi\n       fi\n        ;;\n esac\n \n"
  },
  {
    "path": "packages/security/libgpg-error/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libgpg-error\"\nPKG_VERSION=\"1.46\"\nPKG_SHA256=\"b7e11a64246bbe5ef37748de43b245abd72cfcd53c9ae5e7fc5ca59f1c81268d\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://www.gnupg.org\"\nPKG_URL=\"https://www.gnupg.org/ftp/gcrypt/libgpg-error/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A library that defines common error values for all GnuPG components.\"\n\npre_configure_target() {\n  PKG_CONFIGURE_OPTS_TARGET=\"CC_FOR_BUILD=${HOST_CC} --enable-static --disable-shared --disable-nls --disable-rpath --with-gnu-ld --with-pic\"\n\n# inspired by openembedded\n  case ${TARGET_ARCH} in\n    aarch64)\n      GPGERROR_TUPLE=aarch64-unknown-linux-gnu\n      GPGERROR_TARGET=linux-gnu${TARGET_ABI}\n      ;;\n    arm)\n      GPGERROR_TUPLE=arm-unknown-linux-gnueabi\n      GPGERROR_TARGET=linux-gnu${TARGET_ABI}\n      ;;\n    x86_64)\n      GPGERROR_TUPLE=x86_64-unknown-linux-gnu\n      GPGERROR_TARGET=linux-gnu\n      ;;\n  esac\n\n  cp ${PKG_BUILD}/src/syscfg/lock-obj-pub.${GPGERROR_TUPLE}.h ${PKG_BUILD}/src/syscfg/lock-obj-pub.${GPGERROR_TARGET}.h\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n  rm -rf ${INSTALL}/usr/share\n\n  sed -e \"s:\\(['= ]\\)/usr:\\\\1${SYSROOT_PREFIX}/usr:g\" -i src/gpg-error-config\n  cp src/gpg-error-config ${SYSROOT_PREFIX}/usr/bin\n}\n"
  },
  {
    "path": "packages/security/nettle/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"nettle\"\nPKG_VERSION=\"3.8.1\"\nPKG_SHA256=\"364f3e2b77cd7dcde83fd7c45219c834e54b0c75e428b6f894a23d12dd41cbfe\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"http://www.lysator.liu.se/~nisse/nettle\"\nPKG_URL=\"https://ftp.gnu.org/gnu/nettle/nettle-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gmp\"\nPKG_LONGDESC=\"A low-level cryptographic library.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-documentation \\\n                           --disable-openssl\"\n\nif target_has_feature neon; then\n  PKG_CONFIGURE_OPTS_TARGET+=\" --enable-arm-neon\"\nfi\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/security/nspr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"nspr\"\nPKG_VERSION=\"4.35\"\nPKG_LICENSE=\"Mozilla Public License\"\nPKG_SITE=\"http://www.linuxfromscratch.org/blfs/view/svn/general/nspr.html\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_DEPENDS_TARGET=\"toolchain nss:host nspr:host\"\nPKG_DEPENDS_UNPACK=\"nss\"\nPKG_LONGDESC=\"Netscape Portable Runtime (NSPR) provides a platform-neutral API for system level and libc like functions\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"-parallel\"\n\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  TARGET_USE_64=\"--enable-64bit\"\nfi\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-pthreads ${TARGET_USE_64}\"\nPKG_MAKE_OPTS_TARGET=\"NSINSTALL=${TOOLCHAIN}/bin/nsinstall\"\nPKG_MAKEINSTALL_OPTS_TARGET=\"NSINSTALL=${TOOLCHAIN}/bin/nsinstall\"\n\nconfigure_host() {\n  cd $(get_build_dir nss)/nspr\n  ./configure --with-pthreads --enable-64bit --with-pthreads --prefix=${TOOLCHAIN}\n}\n\npre_make_host() {\n  cd $(get_build_dir nss)/nspr\n  make clean\n}\n\nconfigure_target() {\n  cd $(get_build_dir nss)/nspr\n  ./configure --with-pthreads ${TARGET_USE_64} ${TARGET_CONFIGURE_OPTS}\n}\n\npre_make_target() {\n  cd $(get_build_dir nss)/nspr\n  make clean\n}\n"
  },
  {
    "path": "packages/security/nss/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"nss\"\nPKG_VERSION=\"3.87\"\nPKG_SHA256=\"eb70ea0b58dce69aa490e9e9fecd132a7d644e1da3d631e163376a0dcc11a022\"\nPKG_LICENSE=\"Mozilla Public License\"\nPKG_SITE=\"http://ftp.mozilla.org/\"\nPKG_URL=\"https://ftp.mozilla.org/pub/security/nss/releases/NSS_${PKG_VERSION//./_}_RTM/src/nss-${PKG_VERSION}-with-nspr-$(get_pkg_version nspr).tar.gz\"\nPKG_DEPENDS_HOST=\"nspr:host zlib:host\"\nPKG_DEPENDS_TARGET=\"toolchain nss:host nspr zlib sqlite\"\nPKG_LONGDESC=\"The Network Security Services (NSS) package is a set of libraries designed to support cross-platform development of security-enabled client and server applications\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"-parallel\"\n\nmake_host() {\n  cd ${PKG_BUILD}/nss\n\n  make clean || true\n  rm -rf ${PKG_BUILD}/dist\n\n  INCLUDES=\"-I${TOOLCHAIN}/include\" \\\n  make BUILD_OPT=1 USE_64=1 NSS_ENABLE_WERROR=0 \\\n     PREFIX=${TOOLCHAIN} \\\n     NSPR_INCLUDE_DIR=${TOOLCHAIN}/include/nspr \\\n     USE_SYSTEM_ZLIB=1 ZLIB_LIBS=\"-lz -L${TOOLCHAIN}/lib\" \\\n     SKIP_SHLIBSIGN=1 \\\n     NSS_TESTS=\"dummy\" \\\n     CC=${CC} LDFLAGS=\"${LDFLAGS} -L${TOOLCHAIN}/lib\" \\\n     V=1\n}\n\nmakeinstall_host() {\n  cd ${PKG_BUILD}\n  ${STRIP} dist/Linux*/lib/*.so\n  cp -L dist/Linux*/lib/*.so ${TOOLCHAIN}/lib\n  mkdir -p ${TOOLCHAIN}/include/nss\n  cp -RL dist/{public,private}/nss/* ${TOOLCHAIN}/include/nss\n  cp -L dist/Linux*/lib/pkgconfig/nss.pc ${TOOLCHAIN}/lib/pkgconfig\n  cp -L nss/coreconf/nsinstall/*/nsinstall ${TOOLCHAIN}/bin\n}\n\nmake_target() {\n  cd ${PKG_BUILD}/nss\n\n  local TARGET_USE_64=\"\"\n  [ \"${TARGET_ARCH}\" = \"x86_64\" -o \"${TARGET_ARCH}\" = \"aarch64\" ] && TARGET_USE_64=\"USE_64=1\"\n\n  local TARGET_x86_64=\"\"\n  [ \"${TARGET_ARCH}\" != \"x86_64\" ] && TARGET_x86_64=\"NSS_DISABLE_AVX2=1\"\n\n  make ${TARGET_x86_64} clean || true\n  rm -rf ${PKG_BUILD}/dist\n\n  make BUILD_OPT=1 ${TARGET_USE_64} ${TARGET_x86_64} \\\n     NSS_USE_SYSTEM_SQLITE=1 \\\n     NSPR_INCLUDE_DIR=${SYSROOT_PREFIX}/usr/include/nspr \\\n     NSS_USE_SYSTEM_SQLITE=1 \\\n     USE_SYSTEM_ZLIB=1 ZLIB_LIBS=-lz \\\n     SKIP_SHLIBSIGN=1 \\\n     OS_TEST=${TARGET_ARCH} \\\n     NSS_TESTS=\"dummy\" \\\n     NSINSTALL=${TOOLCHAIN}/bin/nsinstall \\\n     CPU_ARCH_TAG=${TARGET_ARCH} \\\n     CC=${CC} \\\n     LDFLAGS=\"${LDFLAGS} -L${SYSROOT_PREFIX}/usr/lib\" \\\n     V=1\n}\n\nmakeinstall_target() {\n  cd ${PKG_BUILD}\n  ${STRIP} dist/Linux*/lib/*.so\n  cp -L dist/Linux*/lib/*.so ${SYSROOT_PREFIX}/usr/lib\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/nss\n  cp -RL dist/{public,private}/nss/* ${SYSROOT_PREFIX}/usr/include/nss\n  cp -L dist/Linux*/lib/pkgconfig/nss.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n\n  mkdir -p ${PKG_INSTALL}/usr/lib\n    cp -PL dist/Linux*/lib/*.so ${PKG_INSTALL}/usr/lib\n}\n"
  },
  {
    "path": "packages/security/nss/patches/nss-02_3.15.5-standalone-1.patch",
    "content": "Submitted By:            Armin K. <krejzi at email dot com>\nDate:                    2013-07-02\nInitial Package Version: 3.15\nUpstream Status:         Not applicable\nOrigin:                  Based on dj's original patch, rediffed and modified for 3.15\nDescription:             Adds auto-generated nss.pc and nss-config script, and allows\n                         building without nspr in the source tree.\n\n--- a/nss/config/Makefile\t1970-01-01 01:00:00.000000000 +0100\n+++ b/nss/config/Makefile\t2013-07-02 14:53:56.684750636 +0200\n@@ -0,0 +1,40 @@\n+CORE_DEPTH = ..\n+DEPTH      = ..\n+\n+include $(CORE_DEPTH)/coreconf/config.mk\n+\n+NSS_MAJOR_VERSION = `grep \"NSS_VMAJOR\" ../lib/nss/nss.h | awk '{print $$3}'`\n+NSS_MINOR_VERSION = `grep \"NSS_VMINOR\" ../lib/nss/nss.h | awk '{print $$3}'`\n+NSS_PATCH_VERSION = `grep \"NSS_VPATCH\" ../lib/nss/nss.h | awk '{print $$3}'`\n+PREFIX = /usr\n+\n+all: export libs\n+\n+export:\n+\t# Create the nss.pc file\n+\tmkdir -p $(DIST)/lib/pkgconfig\n+\tsed -e \"s,@prefix@,$(PREFIX),\" \\\n+\t    -e \"s,@exec_prefix@,\\$${prefix},\" \\\n+\t    -e \"s,@libdir@,\\$${prefix}/lib,\" \\\n+\t    -e \"s,@includedir@,\\$${prefix}/include/nss,\" \\\n+\t    -e \"s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g\" \\\n+\t    -e \"s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION),\" \\\n+\t    -e \"s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION),\" \\\n+\t    nss.pc.in > nss.pc\n+\tchmod 0644 nss.pc\n+\tln -sf ../../../../nss/config/nss.pc $(DIST)/lib/pkgconfig\n+\n+\t# Create the nss-config script\n+\tmkdir -p $(DIST)/bin\n+\tsed -e \"s,@prefix@,$(PREFIX),\" \\\n+\t    -e \"s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),\" \\\n+\t    -e \"s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION),\" \\\n+\t    -e \"s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION),\" \\\n+\t    nss-config.in > nss-config\n+\tchmod 0755 nss-config\n+\tln -sf ../../../nss/config/nss-config $(DIST)/bin\n+\n+libs:\n+\n+dummy: all export libs\n+\n--- a/nss/config/nss-config.in\t1970-01-01 01:00:00.000000000 +0100\n+++ b/nss/config/nss-config.in\t2013-07-02 14:52:58.328084334 +0200\n@@ -0,0 +1,153 @@\n+#!/bin/sh\n+\n+prefix=@prefix@\n+\n+major_version=@NSS_MAJOR_VERSION@\n+minor_version=@NSS_MINOR_VERSION@\n+patch_version=@NSS_PATCH_VERSION@\n+\n+usage()\n+{\n+\tcat <<EOF\n+Usage: nss-config [OPTIONS] [LIBRARIES]\n+Options:\n+\t[--prefix[=DIR]]\n+\t[--exec-prefix[=DIR]]\n+\t[--includedir[=DIR]]\n+\t[--libdir[=DIR]]\n+\t[--version]\n+\t[--libs]\n+\t[--cflags]\n+Dynamic Libraries:\n+\tnss\n+\tnssutil\n+\tsmime\n+\tssl\n+\tsoftokn\n+EOF\n+\texit $1\n+}\n+\n+if test $# -eq 0; then\n+\tusage 1 1>&2\n+fi\n+\n+lib_nss=yes\n+lib_nssutil=yes\n+lib_smime=yes\n+lib_ssl=yes\n+lib_softokn=yes\n+\n+while test $# -gt 0; do\n+  case \"$1\" in\n+  -*=*) optarg=`echo \"$1\" | sed 's/[-_a-zA-Z0-9]*=//'` ;;\n+  *) optarg= ;;\n+  esac\n+\n+  case $1 in\n+    --prefix=*)\n+      prefix=$optarg\n+      ;;\n+    --prefix)\n+      echo_prefix=yes\n+      ;;\n+    --exec-prefix=*)\n+      exec_prefix=$optarg\n+      ;;\n+    --exec-prefix)\n+      echo_exec_prefix=yes\n+      ;;\n+    --includedir=*)\n+      includedir=$optarg\n+      ;;\n+    --includedir)\n+      echo_includedir=yes\n+      ;;\n+    --libdir=*)\n+      libdir=$optarg\n+      ;;\n+    --libdir)\n+      echo_libdir=yes\n+      ;;\n+    --version)\n+      echo ${major_version}.${minor_version}.${patch_version}\n+      ;;\n+    --cflags)\n+      echo_cflags=yes\n+      ;;\n+    --libs)\n+      echo_libs=yes\n+      ;;\n+    nss)\n+      lib_nss=yes\n+      ;;\n+    nssutil)\n+      lib_nssutil=yes\n+      ;;\n+    smime)\n+      lib_smime=yes\n+      ;;\n+    ssl)\n+      lib_ssl=yes\n+      ;;\n+    softokn)\n+      lib_softokn=yes\n+      ;;\n+    *)\n+      usage 1 1>&2\n+      ;;\n+  esac\n+  shift\n+done\n+\n+# Set variables that may be dependent upon other variables\n+if test -z \"$exec_prefix\"; then\n+    exec_prefix=`pkg-config --variable=exec_prefix nss`\n+fi\n+if test -z \"$includedir\"; then\n+    includedir=`pkg-config --variable=includedir nss`\n+fi\n+if test -z \"$libdir\"; then\n+    libdir=`pkg-config --variable=libdir nss`\n+fi\n+\n+if test \"$echo_prefix\" = \"yes\"; then\n+    echo $prefix\n+fi\n+\n+if test \"$echo_exec_prefix\" = \"yes\"; then\n+    echo $exec_prefix\n+fi\n+\n+if test \"$echo_includedir\" = \"yes\"; then\n+    echo $includedir\n+fi\n+\n+if test \"$echo_libdir\" = \"yes\"; then\n+    echo $libdir\n+fi\n+\n+if test \"$echo_cflags\" = \"yes\"; then\n+    echo -I$includedir\n+fi\n+\n+if test \"$echo_libs\" = \"yes\"; then\n+      libdirs=\"-L$libdir\"\n+      if test -n \"$lib_nss\"; then\n+\tlibdirs=\"$libdirs -lnss${major_version}\"\n+      fi\n+      if test -n \"$lib_nssutil\"; then\n+        libdirs=\"$libdirs -lnssutil${major_version}\"\n+      fi\n+      if test -n \"$lib_smime\"; then\n+\tlibdirs=\"$libdirs -lsmime${major_version}\"\n+      fi\n+      if test -n \"$lib_ssl\"; then\n+\tlibdirs=\"$libdirs -lssl${major_version}\"\n+      fi\n+      if test -n \"$lib_softokn\"; then\n+        libdirs=\"$libdirs -lsoftokn${major_version}\"\n+      fi\n+      echo $libdirs\n+fi      \n+\n--- a/nss/config/nss.pc.in\t1970-01-01 01:00:00.000000000 +0100\n+++ b/nss/config/nss.pc.in\t2013-07-02 14:52:58.328084334 +0200\n@@ -0,0 +1,12 @@\n+prefix=@prefix@\n+exec_prefix=@exec_prefix@\n+libdir=@libdir@\n+includedir=@includedir@\n+\n+Name: NSS\n+Description: Network Security Services\n+Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@\n+Requires: nspr >= 4.8\n+Libs: -L@libdir@ -lnss@NSS_MAJOR_VERSION@ -lnssutil@NSS_MAJOR_VERSION@ -lsmime@NSS_MAJOR_VERSION@ -lssl@NSS_MAJOR_VERSION@ -lsoftokn@NSS_MAJOR_VERSION@\n+Cflags: -I${includedir}\n+\n--- a/nss/Makefile.orig\t2020-12-19 09:07:22.015285016 +0000\n+++ a/nss/Makefile\t2020-12-19 09:17:06.966350898 +0000\n@@ -48,7 +48,6 @@\n #######################################################################\n \n nss_build_all:\n-\t$(MAKE) build_nspr\n \t$(MAKE) all\n \t$(MAKE) latest\n \n--- a/nss/manifest.mn\t2013-05-28 23:43:24.000000000 +0200\n+++ b/nss/manifest.mn\t2013-07-02 14:52:58.331417666 +0200\n@@ -10,7 +10,7 @@\n \n RELEASE = nss\n \n-DIRS = coreconf lib cmd cpputil gtests\n+DIRS = coreconf lib cmd config\n \n HAVE_ALL_TARGET := 1\n \n"
  },
  {
    "path": "packages/security/nss/patches/nss-04-skip_shlibsign.patch",
    "content": "diff -Naur nss-3.29.5.orig/nss/cmd/shlibsign/Makefile nss-3.29.5/nss/cmd/shlibsign/Makefile\n--- nss-3.29.5.orig/nss/cmd/shlibsign/Makefile\t2017-09-08 10:56:01.663876686 +0200\n+++ nss-3.29.5/nss/cmd/shlibsign/Makefile\t2017-09-08 10:57:19.659306831 +0200\n@@ -95,7 +95,9 @@\n     endif\n endif\n \n+ifndef SKIP_SHLIBSIGN\n libs: install\n ifdef CHECKLOC\n \t$(MAKE) $(CHECKLOC)\n endif\n+endif\n"
  },
  {
    "path": "packages/security/nss/patches/nss-05-disable_host_cflags.patch",
    "content": "diff -Naur nss-3.29.5.orig/nspr/config/autoconf.mk.in nss-3.29.5/nspr/config/autoconf.mk.in\n--- nss-3.29.5.orig/nspr/config/autoconf.mk.in\t2017-09-08 11:03:27.572619156 +0200\n+++ nss-3.29.5/nspr/config/autoconf.mk.in\t2017-09-08 11:03:41.100520343 +0200\n@@ -104,7 +104,7 @@\n RESOLVE_LINK_SYMBOLS = @RESOLVE_LINK_SYMBOLS@\n \n HOST_CC\t\t= @HOST_CC@\n-HOST_CFLAGS\t= @HOST_CFLAGS@\n+#HOST_CFLAGS\t= @HOST_CFLAGS@\n HOST_LDFLAGS\t= @HOST_LDFLAGS@\n \n DEFINES\t\t= @DEFINES@ @DEFS@\n"
  },
  {
    "path": "packages/security/nss/patches/nss-09-gcc-warning-workaround.patch",
    "content": "diff -r ab04fd73fd6d coreconf/nsinstall/nsinstall.c\n--- a/nss/coreconf/nsinstall/nsinstall.c\tMon Aug 24 22:52:43 2020 +0000\n+++ b/nss/coreconf/nsinstall/nsinstall.c\tWed Aug 26 13:04:16 2020 +0200\n@@ -50,6 +50,7 @@\n extern int fchmod(int fildes, mode_t mode);\n #endif\n \n+#define GETCWD_CANT_MALLOC 1\n \n #ifdef GETCWD_CANT_MALLOC\n /*\n"
  },
  {
    "path": "packages/security/openssl/cert/cacert.pem",
    "content": "##\n## Bundle of CA Root Certificates\n##\n## Certificate data from Mozilla as of: Sat Nov 18 22:59:13 2023 GMT\n##\n## This is a bundle of X.509 certificates of public Certificate Authorities\n## (CA). These were automatically extracted from Mozilla's root certificates\n## file (certdata.txt).  This file can be found in the mozilla source tree:\n## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt\n##\n## It contains the certificates in PEM format and therefore\n## can be directly used with curl / libcurl / php_curl, or with\n## an Apache+mod_ssl webserver for SSL client authentication.\n## Just configure this file as the SSLCACertificateFile.\n##\n## Conversion done with mk-ca-bundle.pl version 1.29.\n## SHA256: 1970dd65858925d68498d2356aea6d03f764422523c5887deca8ce3ba9e1f845\n##\n\n\nGlobalSign Root CA\n==================\n-----BEGIN CERTIFICATE-----\nMIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx\nGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds\nb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV\nBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD\nVQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa\nDuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc\nTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb\nKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP\nc1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX\ngzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV\nHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF\nAAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj\nY1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG\nj/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH\nhm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC\nX4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==\n-----END CERTIFICATE-----\n\nEntrust.net Premium 2048 Secure Server CA\n=========================================\n-----BEGIN CERTIFICATE-----\nMIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u\nZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp\nbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV\nBAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx\nNzUwNTFaFw0yOTA3MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3\nd3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl\nMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u\nZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A\nMIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOL\nGp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSr\nhRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzW\nnLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUi\nVBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo0IwQDAOBgNVHQ8BAf8E\nBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJ\nKoZIhvcNAQEFBQADggEBADubj1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPy\nT/4xmf3IDExoU8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf\nzX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5bu/8j72gZyxKT\nJ1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+bYQLCIt+jerXmCHG8+c8eS9e\nnNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/ErfF6adulZkMV8gzURZVE=\n-----END CERTIFICATE-----\n\nBaltimore CyberTrust Root\n=========================\n-----BEGIN CERTIFICATE-----\nMIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE\nChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li\nZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC\nSUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs\ndGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME\nuyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB\nUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C\nG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9\nXbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr\nl3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI\nVDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB\nBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh\ncL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5\nhbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa\nY71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H\nRCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp\n-----END CERTIFICATE-----\n\nEntrust Root Certification Authority\n====================================\n-----BEGIN CERTIFICATE-----\nMIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV\nBAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw\nb3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG\nA1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0\nMloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu\nMTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu\nY2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNVBAMTJEVudHJ1c3QgUm9v\ndCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB\nALaVtkNC+sZtKm9I35RMOVcF7sN5EUFoNu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYsz\nA9u3g3s+IIRe7bJWKKf44LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOww\nCj0Yzfv9KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGIrb68\nj6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi94DkZfs0Nw4pgHBN\nrziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOBsDCBrTAOBgNVHQ8BAf8EBAMCAQYw\nDwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAigA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1\nMzQyWjAfBgNVHSMEGDAWgBRokORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DH\nhmak8fdLQ/uEvW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA\nA4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9tO1KzKtvn1ISM\nY/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6ZuaAGAT/3B+XxFNSRuzFVJ7yVTa\nv52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTS\nW3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0\ntHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8\n-----END CERTIFICATE-----\n\nComodo AAA Services root\n========================\n-----BEGIN CERTIFICATE-----\nMIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS\nR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg\nTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw\nMFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hl\nc3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV\nBAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\nggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhG\nC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUs\ni14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszW\nY19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjH\nYpy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEK\nIz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0f\nBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNl\ncy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2Vz\nLmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm\n7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz\nRt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z\n8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C\n12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==\n-----END CERTIFICATE-----\n\nQuoVadis Root CA 2\n==================\n-----BEGIN CERTIFICATE-----\nMIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT\nEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMjAeFw0wNjExMjQx\nODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM\naW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4IC\nDwAwggIKAoICAQCaGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6\nXJxgFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55JWpzmM+Yk\nlvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bBrrcCaoF6qUWD4gXmuVbB\nlDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp+ARz8un+XJiM9XOva7R+zdRcAitMOeGy\nlZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt\n66/3FsvbzSUr5R/7mp/iUcw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1Jdxn\nwQ5hYIizPtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og/zOh\nD7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UHoycR7hYQe7xFSkyy\nBNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuIyV77zGHcizN300QyNQliBJIWENie\nJ0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1Ud\nDgQWBBQahGK8SEwzJQTU7tD2A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGU\na6FJpEcwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT\nElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2fBluornFdLwUv\nZ+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzng/iN/Ae42l9NLmeyhP3ZRPx3\nUIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2BlfF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodm\nVjB3pjd4M1IQWK4/YY7yarHvGH5KWWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK\n+JDSV6IZUaUtl0HaB0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrW\nIozchLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPRTUIZ3Ph1\nWVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWDmbA4CD/pXvk1B+TJYm5X\nf6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II\n4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8\nVCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u\n-----END CERTIFICATE-----\n\nQuoVadis Root CA 3\n==================\n-----BEGIN CERTIFICATE-----\nMIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT\nEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMzAeFw0wNjExMjQx\nOTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM\naW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4IC\nDwAwggIKAoICAQDMV0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNgg\nDhoB4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUrH556VOij\nKTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd8lyyBTNvijbO0BNO/79K\nDDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9CabwvvWhDFlaJKjdhkf2mrk7AyxRllDdLkgbv\nBNDInIjbC3uBr7E9KsRlOni27tyAsdLTmZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwp\np5ijJUMv7/FfJuGITfhebtfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8\nnT8KKdjcT5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDtWAEX\nMJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZc6tsgLjoC2SToJyM\nGf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A4iLItLRkT9a6fUg+qGkM17uGcclz\nuD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYDVR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHT\nBgkrBgEEAb5YAAMwgcUwgZMGCCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmlj\nYXRlIGNvbnN0aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0\naWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVudC4wLQYIKwYB\nBQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2NwczALBgNVHQ8EBAMCAQYwHQYD\nVR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4GA1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4\nywLQoUmkRzBFMQswCQYDVQQGEwJCTTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UE\nAxMSUXVvVmFkaXMgUm9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZV\nqyM07ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSemd1o417+s\nhvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd+LJ2w/w4E6oM3kJpK27z\nPOuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2\nPb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp\n8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC\nbjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu\ng/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p\nvGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr\nqZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto=\n-----END CERTIFICATE-----\n\nXRamp Global CA Root\n====================\n-----BEGIN CERTIFICATE-----\nMIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE\nBhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj\ndXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB\ndXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx\nHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg\nU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp\ndHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwu\nIR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMx\nfoArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FE\nzG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqs\nAxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNViPvry\nxS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud\nEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASsjVy16bYbMDYGA1UdHwQvMC0wK6Ap\noCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMC\nAQEwDQYJKoZIhvcNAQEFBQADggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc\n/Kh4ZzXxHfARvbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt\nqZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLaIR9NmXmd4c8n\nnxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSyi6mx5O+aGtA9aZnuqCij4Tyz\n8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQO+7ETPTsJ3xCwnR8gooJybQDJbw=\n-----END CERTIFICATE-----\n\nGo Daddy Class 2 CA\n===================\n-----BEGIN CERTIFICATE-----\nMIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMY\nVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRp\nZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkG\nA1UEBhMCVVMxITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g\nRGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQAD\nggENADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCAPVYYYwhv\n2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6wwdhFJ2+qN1j3hybX2C32\nqRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXiEqITLdiOr18SPaAIBQi2XKVlOARFmR6j\nYGB0xUGlcmIbYsUfb18aQr4CUWWoriMYavx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmY\nvLEHZ6IVDd2gWMZEewo+YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0O\nBBYEFNLEsNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h/t2o\natTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMu\nMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG\nA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim\nPQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt\nI3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ\nHmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI\nLs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b\nvZ8=\n-----END CERTIFICATE-----\n\nStarfield Class 2 CA\n====================\n-----BEGIN CERTIFICATE-----\nMIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc\nU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg\nQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo\nMQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG\nA1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG\nSIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY\nbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ\nJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm\nepsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN\nF4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF\nMIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f\nhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo\nbm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g\nQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs\nafPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM\nPUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl\nxy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD\nKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3\nQBFGmh95DmK/D5fs4C8fF5Q=\n-----END CERTIFICATE-----\n\nDigiCert Assured ID Root CA\n===========================\n-----BEGIN CERTIFICATE-----\nMIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw\nIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzEx\nMTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL\nExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0Ew\nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO\n9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy\nUmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW\n/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy\noeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf\nGHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF\n66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq\nhkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc\nEkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn\nSbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i\n8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe\n+o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g==\n-----END CERTIFICATE-----\n\nDigiCert Global Root CA\n=======================\n-----BEGIN CERTIFICATE-----\nMIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw\nMDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3\ndy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq\nhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn\nTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5\nBmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H\n4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y\n7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB\no2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm\n8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF\nBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr\nEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt\ntep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886\nUAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk\nCAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=\n-----END CERTIFICATE-----\n\nDigiCert High Assurance EV Root CA\n==================================\n-----BEGIN CERTIFICATE-----\nMIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw\nKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw\nMFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ\nMBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu\nY2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t\nMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS\nOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3\nMRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ\nNAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe\nh10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB\nAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY\nJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ\nV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp\nmyPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK\nmNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe\nvEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K\n-----END CERTIFICATE-----\n\nSwissSign Gold CA - G2\n======================\n-----BEGIN CERTIFICATE-----\nMIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw\nEwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN\nMDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp\nc3NTaWduIEFHMR8wHQYDVQQDExZTd2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0B\nAQEFAAOCAg8AMIICCgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUq\nt2/876LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+bbqBHH5C\njCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c6bM8K8vzARO/Ws/BtQpg\nvd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqEemA8atufK+ze3gE/bk3lUIbLtK/tREDF\nylqM2tIrfKjuvqblCqoOpd8FUrdVxyJdMmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvR\nAiTysybUa9oEVeXBCsdtMDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuend\njIj3o02yMszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69yFGkO\npeUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPiaG59je883WX0XaxR\n7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxMgI93e2CaHt+28kgeDrpOVG2Y4OGi\nGqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw\nAwEB/zAdBgNVHQ4EFgQUWyV7lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64\nOfPAeGZe6Drn8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov\nL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe645R88a7A3hfm\n5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr\n44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf\nMke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m\nGu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp\nmo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk\nvC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf\nKzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br\nNU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj\nviOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ\n-----END CERTIFICATE-----\n\nSwissSign Silver CA - G2\n========================\n-----BEGIN CERTIFICATE-----\nMIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT\nBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X\nDTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3\naXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG\n9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644\nN0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm\n+/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH\n6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu\nMGoM9ZDulebyzYLs2aFK7PayS+VFheZteJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5h\nqAaEuSh6XzjZG6k4sIN/c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5\nFZGkECwJMoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRHHTBs\nROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTfjNFusB3hB48IHpmc\ncelM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb65i/4z3GcRm25xBWNOHkDRUjvxF3X\nCO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/\nBAUwAwEB/zAdBgNVHQ4EFgQUF6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRB\ntjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0\ncDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P\n4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F\nkWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L\n3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx\n/uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa\nDGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP\ne97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu\nWxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ\nDIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub\nDgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u\n-----END CERTIFICATE-----\n\nSecureTrust CA\n==============\n-----BEGIN CERTIFICATE-----\nMIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBIMQswCQYDVQQG\nEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xFzAVBgNVBAMTDlNlY3VyZVRy\ndXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIzMTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAe\nBgNVBAoTF1NlY3VyZVRydXN0IENvcnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCC\nASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQX\nOZEzZum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO0gMdA+9t\nDWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIaowW8xQmxSPmjL8xk037uH\nGFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b\n01k/unK8RCSc43Oz969XL0Imnal0ugBS8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmH\nursCAwEAAaOBnTCBmjATBgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/\nBAUwAwEB/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCegJYYj\naHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ\nKoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt36Z3q059c4EVlew3KW+JwULKUBRSu\nSceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHf\nmbx8IVQr5Fiiu1cprp6poxkmD5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZ\nnMUFdAvnZyPSCPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR\n3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE=\n-----END CERTIFICATE-----\n\nSecure Global CA\n================\n-----BEGIN CERTIFICATE-----\nMIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQG\nEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBH\nbG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkxMjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEg\nMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwg\nQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jx\nYDiJiQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa/FHtaMbQ\nbqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJjnIFHovdRIWCQtBJwB1g\n8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV\nHDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi\n0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud\nEwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn\noCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA\nMA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+\nOYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn\nCDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5\n3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc\nf8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW\n-----END CERTIFICATE-----\n\nCOMODO Certification Authority\n==============================\n-----BEGIN CERTIFICATE-----\nMIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE\nBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG\nA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1\ndGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb\nMBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD\nT01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH\n+7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww\nxHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV\n4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA\n1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI\nrLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E\nBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k\nb2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC\nAQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP\nOGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/\nRxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc\nIGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN\n+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ==\n-----END CERTIFICATE-----\n\nCOMODO ECC Certification Authority\n==================================\n-----BEGIN CERTIFICATE-----\nMIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC\nR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE\nChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB\ndXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix\nGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR\nQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo\nb3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X\n4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni\nwz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E\nBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG\nFAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA\nU/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=\n-----END CERTIFICATE-----\n\nCertigna\n========\n-----BEGIN CERTIFICATE-----\nMIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAkZSMRIw\nEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4XDTA3MDYyOTE1MTMwNVoXDTI3\nMDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwI\nQ2VydGlnbmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7q\nXOEm7RFHYeGifBZ4QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyH\nGxnygQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbwzBfsV1/p\nogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q130yGLMLLGq/jj8UEYkg\nDncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKf\nIrjxwo1p3Po6WAbfAgMBAAGjgbwwgbkwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQ\ntCRZvgHyUtVF9lo53BEwZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJ\nBgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzjAQ/J\nSP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQUFAAOCAQEA\nhQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8hbV6lUmPOEvjvKtpv6zf+EwLHyzs+\nImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFncfca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1klu\nPBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY\n1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw\nWyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==\n-----END CERTIFICATE-----\n\nePKI Root Certification Authority\n=================================\n-----BEGIN CERTIFICATE-----\nMIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG\nEwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg\nUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx\nMjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq\nMCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B\nAQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs\nIZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi\nlTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv\nqOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX\n12ruOzjjK9SXDrkb5wdJfzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0O\nWQqraffAsgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uUWH1+\nETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLSnT0IFaUQAS2zMnao\nlQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pHdmX2Os+PYhcZewoozRrSgx4hxyy/\nvv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJipNiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXi\nZo1jDiVN1Rmy5nk3pyKdVDECAwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/Qkqi\nMAwGA1UdEwQFMAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH\nClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGBuvl2ICO1J2B0\n1GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6YlPwZpVnPDimZI+ymBV3QGypzq\nKOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkPJXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdV\nxrsStZf0X4OFunHB2WyBEXYKCrC/gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEP\nNXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r\nGNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE\nxJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx\ngMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy\nsP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD\nBCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw=\n-----END CERTIFICATE-----\n\ncertSIGN ROOT CA\n================\n-----BEGIN CERTIFICATE-----\nMIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYTAlJPMREwDwYD\nVQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTAeFw0wNjA3MDQxNzIwMDRa\nFw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UE\nCxMQY2VydFNJR04gUk9PVCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7I\nJUqOtdu0KBuqV5Do0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHH\nrfAQUySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5dRdY4zTW2\nssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQOA7+j0xbm0bqQfWwCHTD\n0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwvJoIQ4uNllAoEwF73XVv4EOLQunpL+943\nAAAaWyjj0pxzPjKHmKHJUS/X3qwzs08CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B\nAf8EBAMCAcYwHQYDVR0OBBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IB\nAQA+0hyJLjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecYMnQ8\nSG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ44gx+FkagQnIl6Z0\nx2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6IJd1hJyMctTEHBDa0GpC9oHRxUIlt\nvBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz\nTogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD\n-----END CERTIFICATE-----\n\nNetLock Arany (Class Gold) Főtanúsítvány\n========================================\n-----BEGIN CERTIFICATE-----\nMIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G\nA1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610\ndsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB\ncmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx\nMjA2MTUwODIxWjCBpzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxO\nZXRMb2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlmaWNhdGlv\nbiBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNzIEdvbGQpIEbFkXRhbsO6\nc8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCRec75LbRTDofTjl5Bu\n0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrTlF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw\n/HpYzY6b7cNGbIRwXdrzAZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAk\nH3B5r9s5VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRGILdw\nfzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2BJtr+UBdADTHLpl1\nneWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIB\nBjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2MU9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwW\nqZw8UQCgwBEIBaeZ5m8BiFRhbvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTta\nYtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC\nbLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna\nNwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu\ndZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E=\n-----END CERTIFICATE-----\n\nSecureSign RootCA11\n===================\n-----BEGIN CERTIFICATE-----\nMIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi\nSmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS\nb290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw\nKQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1\ncmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL\nTJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO\nwvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOVMdrAG/LuYpmGYz+/3ZMq\ng6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rP\nO7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitA\nbpSACW22s293bzUIUPsCh8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZX\nt94wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKCh\nOBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xmKbabfSVSSUOrTC4r\nbnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQX5Ucv+2rIrVls4W6ng+4reV6G4pQ\nOh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWrQbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01\ny8hSyn+B/tlr0/cR7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061\nlgeLKBObjBmNQSdJQO7e5iNEOdyhIta6A/I=\n-----END CERTIFICATE-----\n\nMicrosec e-Szigno Root CA 2009\n==============================\n-----BEGIN CERTIFICATE-----\nMIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJIVTER\nMA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jv\nc2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o\ndTAeFw0wOTA2MTYxMTMwMThaFw0yOTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UE\nBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUt\nU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTCCASIw\nDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvPkd6mJviZpWNwrZuuyjNA\nfW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tccbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG\n0IMZfcChEhyVbUr02MelTTMuhTlAdX4UfIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKA\npxn1ntxVUwOXewdI/5n7N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm\n1HxdrtbCxkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1+rUC\nAwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTLD8bf\nQkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAbBgNVHREE\nFDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqGSIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0o\nlZMEyL/azXm4Q5DwpL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX\nI/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775\ntyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02\nyULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi\nLXpUq3DDfSJlgnCW\n-----END CERTIFICATE-----\n\nGlobalSign Root CA - R3\n=======================\n-----BEGIN CERTIFICATE-----\nMIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xv\nYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh\nbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT\naWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln\nbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt\niHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ\n0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3\nrHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl\nOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2\nxmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE\nFI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7\nlgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8\nEpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E\nbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18\nYIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r\nkpeDMdmztcpHWD9f\n-----END CERTIFICATE-----\n\nIzenpe.com\n==========\n-----BEGIN CERTIFICATE-----\nMIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG\nEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz\nMTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMu\nQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ\n03rKDx6sp4boFmVqscIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAK\nClaOxdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6HLmYRY2xU\n+zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFXuaOKmMPsOzTFlUFpfnXC\nPCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQDyCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxT\nOTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbK\nF7jJeodWLBoBHmy+E60QrLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK\n0GqfvEyNBjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8Lhij+\n0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIBQFqNeb+Lz0vPqhbB\nleStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+HMh3/1uaD7euBUbl8agW7EekFwID\nAQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2luZm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+\nSVpFTlBFIFMuQS4gLSBDSUYgQTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBG\nNjIgUzgxQzBBBgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx\nMCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O\nBBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUAA4ICAQB4pgwWSp9MiDrAyw6l\nFn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWblaQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbga\nkEyrkgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q\nhT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs\ng1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5\naTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5\nnXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC\nClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo\nQ0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z\nWrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw==\n-----END CERTIFICATE-----\n\nGo Daddy Root Certificate Authority - G2\n========================================\n-----BEGIN CERTIFICATE-----\nMIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT\nB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu\nMTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5\nMDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6\nb25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G\nA1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI\nhvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq\n9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD\n+qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd\nfMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl\nNAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC\nMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9\nBUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac\nvNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r\n5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV\nN8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO\nLPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1\n-----END CERTIFICATE-----\n\nStarfield Root Certificate Authority - G2\n=========================================\n-----BEGIN CERTIFICATE-----\nMIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT\nB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s\nb2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0\neSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw\nDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg\nVGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB\ndXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv\nW59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs\nbhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk\nN3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf\nZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU\nJtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC\nAQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol\nTwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx\n4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw\nF5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K\npL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ\nc2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0\n-----END CERTIFICATE-----\n\nStarfield Services Root Certificate Authority - G2\n==================================================\n-----BEGIN CERTIFICATE-----\nMIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT\nB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s\nb2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl\nIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV\nBAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT\ndGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg\nUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC\nAQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2\nh/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa\nhHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP\nLJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB\nrMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw\nAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMA0GCSqG\nSIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMIbw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPP\nE95Dz+I0swSdHynVv/heyNXBve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTy\nxQGjhdByPq1zqwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd\niEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza\nYyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6\n-----END CERTIFICATE-----\n\nAffirmTrust Commercial\n======================\n-----BEGIN CERTIFICATE-----\nMIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS\nBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw\nMDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly\nbVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF\nAAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb\nDuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV\nC8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6\nBfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww\nMmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV\nHQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC\nAQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG\nhi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi\nqX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv\n0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh\nsUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8=\n-----END CERTIFICATE-----\n\nAffirmTrust Networking\n======================\n-----BEGIN CERTIFICATE-----\nMIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS\nBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw\nMDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly\nbVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF\nAAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE\nHi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI\ndIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24\n/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb\nh+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV\nHQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC\nAQYwDQYJKoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfOtDIu\nUFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzuQY0x2+c06lkh1QF6\n12S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZLgo/bNjR9eUJtGxUAArgFU2HdW23\nWJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4uolu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9\n/ZFvgrG+CJPbFEfxojfHRZ48x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s=\n-----END CERTIFICATE-----\n\nAffirmTrust Premium\n===================\n-----BEGIN CERTIFICATE-----\nMIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UEBhMCVVMxFDAS\nBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMB4XDTEwMDEy\nOTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRy\ndXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A\nMIICCgKCAgEAxBLfqV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtn\nBKAQJG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ+jjeRFcV\n5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrSs8PhaJyJ+HoAVt70VZVs\n+7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmd\nGPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d770O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5R\np9EixAqnOEhss/n/fauGV+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NI\nS+LI+H+SqHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S5u04\n6uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4IaC1nEWTJ3s7xgaVY5\n/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TXOwF0lkLgAOIua+rF7nKsu7/+6qqo\n+Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYEFJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB\n/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByv\nMiPIs0laUZx2KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg\nNt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B8OWycvpEgjNC\n6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQMKSOyARiqcTtNd56l+0OOF6S\nL5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK\n+4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV\nBtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg\nIxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60\ng2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb\nzxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw==\n-----END CERTIFICATE-----\n\nAffirmTrust Premium ECC\n=======================\n-----BEGIN CERTIFICATE-----\nMIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV\nBAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx\nMjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U\ncnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA\nIgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ\nN8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW\nBBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK\nBggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X\n57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM\neQ==\n-----END CERTIFICATE-----\n\nCertum Trusted Network CA\n=========================\n-----BEGIN CERTIFICATE-----\nMIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK\nExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv\nbiBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy\nMTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU\nZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5\nMSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC\nAQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC\nl/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J\nJ7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4\nfOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0\ncvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB\nAf8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw\nDQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj\njSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1\nmS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj\nZt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI\n03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw=\n-----END CERTIFICATE-----\n\nTWCA Root Certification Authority\n=================================\n-----BEGIN CERTIFICATE-----\nMIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ\nVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh\ndGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG\nEwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB\nIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx\nQhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC\noi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP\n4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r\ny+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB\nBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG\n9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC\nmtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW\nQtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY\nT0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny\nYh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw==\n-----END CERTIFICATE-----\n\nSecurity Communication RootCA2\n==============================\n-----BEGIN CERTIFICATE-----\nMIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc\nU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh\ndGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC\nSlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy\naXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB\nANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++\n+T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVMVAX3NuRFg3sUZdbcDE3R\n3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQhNBqyjoGADdH5H5XTz+L62e4iKrFvlNV\nspHEfbmwhRkGeC7bYRr6hfVKkaHnFtWOojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1K\nEOtOghY6rCcMU/Gt1SSwawNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8\nQIH4D5csOPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB\nCwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpFcoJxDjrSzG+ntKEj\nu/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXcokgfGT+Ok+vx+hfuzU7jBBJV1uXk\n3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6q\ntnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29\nmvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03\n-----END CERTIFICATE-----\n\nActalis Authentication Root CA\n==============================\n-----BEGIN CERTIFICATE-----\nMIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCSVQxDjAM\nBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UE\nAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDky\nMjExMjIwMlowazELMAkGA1UEBhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlz\nIFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290\nIENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNvUTufClrJ\nwkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX4ay8IMKx4INRimlNAJZa\nby/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9KK3giq0itFZljoZUj5NDKd45RnijMCO6\nzfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1f\nYVEiVRvjRuPjPdA1YprbrxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2\noxgkg4YQ51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2Fbe8l\nEfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxeKF+w6D9Fz8+vm2/7\nhNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4Fv6MGn8i1zeQf1xcGDXqVdFUNaBr8\nEBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbnfpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5\njF66CyCU3nuDuP/jVo23Eek7jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLY\niDrIn3hm7YnzezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt\nifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQALe3KHwGCmSUyI\nWOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70jsNjLiNmsGe+b7bAEzlgqqI0\nJZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDzWochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKx\nK3JCaKygvU5a2hi/a5iB0P2avl4VSM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+\nXlff1ANATIGk0k9jpwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC\n4yyXX04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+OkfcvHlXHo\n2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7RK4X9p2jIugErsWx0Hbhz\nlefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btUZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXem\nOR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9\nvwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg==\n-----END CERTIFICATE-----\n\nBuypass Class 2 Root CA\n=======================\n-----BEGIN CERTIFICATE-----\nMIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU\nQnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMiBSb290IENBMB4X\nDTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1owTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1\neXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIw\nDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1\ng1Lr6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPVL4O2fuPn\n9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC911K2GScuVr1QGbNgGE41b\n/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHxMlAQTn/0hpPshNOOvEu/XAFOBz3cFIqU\nCqTqc/sLUegTBxj6DvEr0VQVfTzh97QZQmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeff\nawrbD02TTqigzXsu8lkBarcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgI\nzRFo1clrUs3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLiFRhn\nBkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRSP/TizPJhk9H9Z2vX\nUq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN9SG9dKpN6nIDSdvHXx1iY8f93ZHs\nM+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxPAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD\nVR0OBBYEFMmAd+BikoL1RpzzuvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF\nAAOCAgEAU18h9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s\nA20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3tOluwlN5E40EI\nosHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo+fsicdl9sz1Gv7SEr5AcD48S\naq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYd\nDnkM/crqJIByw5c/8nerQyIKx+u2DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWD\nLfJ6v9r9jv6ly0UsH8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0\noyLQI+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK75t98biGC\nwWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h3PFaTWwyI0PurKju7koS\nCTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPzY11aWOIv4x3kqdbQCtCev9eBCfHJxyYN\nrJgWVqA=\n-----END CERTIFICATE-----\n\nBuypass Class 3 Root CA\n=======================\n-----BEGIN CERTIFICATE-----\nMIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU\nQnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMyBSb290IENBMB4X\nDTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFowTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1\neXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIw\nDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRH\nsJ8YZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3EN3coTRiR\n5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9tznDDgFHmV0ST9tD+leh\n7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX0DJq1l1sDPGzbjniazEuOQAnFN44wOwZ\nZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH\n2xc519woe2v1n/MuwU8XKhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV\n/afmiSTYzIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvSO1UQ\nRwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D34xFMFbG02SrZvPA\nXpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgPK9Dx2hzLabjKSWJtyNBjYt1gD1iq\nj6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD\nVR0OBBYEFEe4zf/lb+74suwvTg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF\nAAOCAgEAACAjQTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV\ncSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXSIGrs/CIBKM+G\nuIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2HJLw5QY33KbmkJs4j1xrG0aG\nQ0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsaO5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8\nZORK15FTAaggiG6cX0S5y2CBNOxv033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2\nKSb12tjE8nVhz36udmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz\n6MkEkbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg413OEMXbug\nUZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvDu79leNKGef9JOxqDDPDe\neOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi\nCp/HuZc=\n-----END CERTIFICATE-----\n\nT-TeleSec GlobalRoot Class 3\n============================\n-----BEGIN CERTIFICATE-----\nMIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM\nIlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU\ncnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgx\nMDAxMTAyOTU2WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz\ndGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD\nZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0GCSqGSIb3\nDQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN8ELg63iIVl6bmlQdTQyK\n9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/RLyTPWGrTs0NvvAgJ1gORH8EGoel15YU\nNpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZF\niP0Zf3WHHx+xGwpzJFu5ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W\n0eDrXltMEnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGjQjBA\nMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1A/d2O2GCahKqGFPr\nAyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOyWL6ukK2YJ5f+AbGwUgC4TeQbIXQb\nfsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzT\nucpH9sry9uetuUg/vBa3wW306gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7h\nP0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml\ne9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw==\n-----END CERTIFICATE-----\n\nD-TRUST Root Class 3 CA 2 2009\n==============================\n-----BEGIN CERTIFICATE-----\nMIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQK\nDAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTAe\nFw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NThaME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxE\nLVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIw\nDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOAD\nER03UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42tSHKXzlA\nBF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9RySPocq60vFYJfxLLHLGv\nKZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsMlFqVlNpQmvH/pStmMaTJOKDfHR+4CS7z\np+hnUquVH+BGPtikw8paxTGA6Eian5Rp/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUC\nAwEAAaOCARowggEWMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ\n4PGEMA4GA1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVjdG9y\neS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUyMENBJTIwMiUyMDIw\nMDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3QwQ6BBoD+G\nPWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3JsL2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAw\nOS5jcmwwDQYJKoZIhvcNAQELBQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm\n2H6NMLVwMeniacfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0\no3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4KzCUqNQT4YJEV\ndT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8PIWmawomDeCTmGCufsYkl4ph\nX5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3YJohw1+qRzT65ysCQblrGXnRl11z+o+I=\n-----END CERTIFICATE-----\n\nD-TRUST Root Class 3 CA 2 EV 2009\n=================================\n-----BEGIN CERTIFICATE-----\nMIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK\nDAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw\nOTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUwNDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK\nDAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw\nOTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfS\negpnljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM03TP1YtHh\nzRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6ZqQTMFexgaDbtCHu39b+T\n7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lRp75mpoo6Kr3HGrHhFPC+Oh25z1uxav60\nsUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure35\n11H3a6UCAwEAAaOCASQwggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyv\ncop9NteaHNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFwOi8v\nZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xhc3MlMjAzJTIwQ0El\nMjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1ERT9jZXJ0aWZpY2F0ZXJldm9jYXRp\nb25saXN0MEagRKBChkBodHRwOi8vd3d3LmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xh\nc3NfM19jYV8yX2V2XzIwMDkuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+\nPPoeUSbrh/Yp3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05\nnsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNFCSuGdXzfX2lX\nANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7naxpeG0ILD5EJt/rDiZE4OJudA\nNCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqXKVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVv\nw9y4AyHqnxbxLFS1\n-----END CERTIFICATE-----\n\nCA Disig Root R2\n================\n-----BEGIN CERTIFICATE-----\nMIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNVBAYTAlNLMRMw\nEQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp\nZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQyMDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sx\nEzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp\nc2lnIFJvb3QgUjIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbC\nw3OeNcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNHPWSb6Wia\nxswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3Ix2ymrdMxp7zo5eFm1tL7\nA7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbeQTg06ov80egEFGEtQX6sx3dOy1FU+16S\nGBsEWmjGycT6txOgmLcRK7fWV8x8nhfRyyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqV\ng8NTEQxzHQuyRpDRQjrOQG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa\n5Beny912H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJQfYE\nkoopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUDi/ZnWejBBhG93c+A\nAk9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORsnLMOPReisjQS1n6yqEm70XooQL6i\nFh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNV\nHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5u\nQu0wDQYJKoZIhvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM\ntCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqfGopTpti72TVV\nsRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkblvdhuDvEK7Z4bLQjb/D907Je\ndR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W8\n1k/BfDxujRNt+3vrMNDcTa/F1balTFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjx\nmHHEt38OFdAlab0inSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01\nutI3gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18DrG5gPcFw0\nsorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3OszMOl6W8KjptlwlCFtaOg\nUxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8xL4ysEr3vQCj8KWefshNPZiTEUxnpHikV\n7+ZtsH8tZ/3zbBt1RqPlShfppNcL\n-----END CERTIFICATE-----\n\nACCVRAIZ1\n=========\n-----BEGIN CERTIFICATE-----\nMIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UEAwwJQUNDVlJB\nSVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQswCQYDVQQGEwJFUzAeFw0xMTA1\nMDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQBgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwH\nUEtJQUNDVjENMAsGA1UECgwEQUNDVjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4IC\nDwAwggIKAoICAQCbqau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gM\njmoYHtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWoG2ioPej0\nRGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpAlHPrzg5XPAOBOp0KoVdD\naaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhrIA8wKFSVf+DuzgpmndFALW4ir50awQUZ\n0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDG\nWuzndN9wrqODJerWx5eHk6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs7\n8yM2x/474KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMOm3WR\n5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpacXpkatcnYGMN285J\n9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPluUsXQA+xtrn13k/c4LOsOxFwYIRK\nQ26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYIKwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRw\nOi8vd3d3LmFjY3YuZXMvZmlsZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEu\nY3J0MB8GCCsGAQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2\nVuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeTVfZW6oHlNsyM\nHj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIGCCsGAQUFBwICMIIBFB6CARAA\nQQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUAcgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBh\nAO0AegAgAGQAZQAgAGwAYQAgAEEAQwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUA\nYwBuAG8AbABvAGcA7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBj\nAHQAcgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAAQwBQAFMA\nIABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUAczAwBggrBgEFBQcCARYk\naHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2MuaHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0\ndHA6Ly93d3cuYWNjdi5lcy9maWxlYWRtaW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2\nMV9kZXIuY3JsMA4GA1UdDwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZI\nhvcNAQEFBQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdpD70E\nR9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gUJyCpZET/LtZ1qmxN\nYEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+mAM/EKXMRNt6GGT6d7hmKG9Ww7Y49\nnCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepDvV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJ\nTS+xJlsndQAJxGJ3KQhfnlmstn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3\nsCPdK6jT2iWH7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h\nI6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szAh1xA2syVP1Xg\nNce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xFd3+YJ5oyXSrjhO7FmGYvliAd\n3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2HpPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3p\nEfbRD0tVNEYqi4Y7\n-----END CERTIFICATE-----\n\nTWCA Global Root CA\n===================\n-----BEGIN CERTIFICATE-----\nMIIFQTCCAymgAwIBAgICDL4wDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVFcxEjAQBgNVBAoT\nCVRBSVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEcMBoGA1UEAxMTVFdDQSBHbG9iYWwgUm9vdCBD\nQTAeFw0xMjA2MjcwNjI4MzNaFw0zMDEyMzExNTU5NTlaMFExCzAJBgNVBAYTAlRXMRIwEAYDVQQK\nEwlUQUlXQU4tQ0ExEDAOBgNVBAsTB1Jvb3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3Qg\nQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwBdvI64zEbooh745NnHEKH1Jw7W2C\nnJfF10xORUnLQEK1EjRsGcJ0pDFfhQKX7EMzClPSnIyOt7h52yvVavKOZsTuKwEHktSz0ALfUPZV\nr2YOy+BHYC8rMjk1Ujoog/h7FsYYuGLWRyWRzvAZEk2tY/XTP3VfKfChMBwqoJimFb3u/Rk28OKR\nQ4/6ytYQJ0lM793B8YVwm8rqqFpD/G2Gb3PpN0Wp8DbHzIh1HrtsBv+baz4X7GGqcXzGHaL3SekV\ntTzWoWH1EfcFbx39Eb7QMAfCKbAJTibc46KokWofwpFFiFzlmLhxpRUZyXx1EcxwdE8tmx2RRP1W\nKKD+u4ZqyPpcC1jcxkt2yKsi2XMPpfRaAok/T54igu6idFMqPVMnaR1sjjIsZAAmY2E2TqNGtz99\nsy2sbZCilaLOz9qC5wc0GZbpuCGqKX6mOL6OKUohZnkfs8O1CWfe1tQHRvMq2uYiN2DLgbYPoA/p\nyJV/v1WRBXrPPRXAb94JlAGD1zQbzECl8LibZ9WYkTunhHiVJqRaCPgrdLQABDzfuBSO6N+pjWxn\nkjMdwLfS7JLIvgm/LCkFbwJrnu+8vyq8W8BQj0FwcYeyTbcEqYSjMq+u7msXi7Kx/mzhkIyIqJdI\nzshNy/MGz19qCkKxHh53L46g5pIOBvwFItIm4TFRfTLcDwIDAQABoyMwITAOBgNVHQ8BAf8EBAMC\nAQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAXzSBdu+WHdXltdkCY4QWwa6g\ncFGn90xHNcgL1yg9iXHZqjNB6hQbbCEAwGxCGX6faVsgQt+i0trEfJdLjbDorMjupWkEmQqSpqsn\nLhpNgb+E1HAerUf+/UqdM+DyucRFCCEK2mlpc3INvjT+lIutwx4116KD7+U4x6WFH6vPNOw/KP4M\n8VeGTslV9xzU2KV9Bnpv1d8Q34FOIWWxtuEXeZVFBs5fzNxGiWNoRI2T9GRwoD2dKAXDOXC4Ynsg\n/eTb6QihuJ49CcdP+yz4k3ZB3lLg4VfSnQO8d57+nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlg\nlPx4mI88k1HtQJAH32RjJMtOcQWh15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryP\nA9gK8kxkRr05YuWW6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3m\ni4TWnsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5jwa19hAM8\nEHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWzaGHQRiapIVJpLesux+t3\nzqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmyKwbQBM0=\n-----END CERTIFICATE-----\n\nTeliaSonera Root CA v1\n======================\n-----BEGIN CERTIFICATE-----\nMIIFODCCAyCgAwIBAgIRAJW+FqD3LkbxezmCcvqLzZYwDQYJKoZIhvcNAQEFBQAwNzEUMBIGA1UE\nCgwLVGVsaWFTb25lcmExHzAdBgNVBAMMFlRlbGlhU29uZXJhIFJvb3QgQ0EgdjEwHhcNMDcxMDE4\nMTIwMDUwWhcNMzIxMDE4MTIwMDUwWjA3MRQwEgYDVQQKDAtUZWxpYVNvbmVyYTEfMB0GA1UEAwwW\nVGVsaWFTb25lcmEgUm9vdCBDQSB2MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMK+\n6yfwIaPzaSZVfp3FVRaRXP3vIb9TgHot0pGMYzHw7CTww6XScnwQbfQ3t+XmfHnqjLWCi65ItqwA\n3GV17CpNX8GH9SBlK4GoRz6JI5UwFpB/6FcHSOcZrr9FZ7E3GwYq/t75rH2D+1665I+XZ75Ljo1k\nB1c4VWk0Nj0TSO9P4tNmHqTPGrdeNjPUtAa9GAH9d4RQAEX1jF3oI7x+/jXh7VB7qTCNGdMJjmhn\nXb88lxhTuylixcpecsHHltTbLaC0H2kD7OriUPEMPPCs81Mt8Bz17Ww5OXOAFshSsCPN4D7c3TxH\noLs1iuKYaIu+5b9y7tL6pe0S7fyYGKkmdtwoSxAgHNN/Fnct7W+A90m7UwW7XWjH1Mh1Fj+JWov3\nF0fUTPHSiXk+TT2YqGHeOh7S+F4D4MHJHIzTjU3TlTazN19jY5szFPAtJmtTfImMMsJu7D0hADnJ\noWjiUIMusDor8zagrC/kb2HCUQk5PotTubtn2txTuXZZNp1D5SDgPTJghSJRt8czu90VL6R4pgd7\ngUY2BIbdeTXHlSw7sKMXNeVzH7RcWe/a6hBle3rQf5+ztCo3O3CLm1u5K7fsslESl1MpWtTwEhDc\nTwK7EpIvYtQ/aUN8Ddb8WHUBiJ1YFkveupD/RwGJBmr2X7KQarMCpgKIv7NHfirZ1fpoeDVNAgMB\nAAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBTwj1k4ALP1j5qW\nDNXr+nuqF+gTEjANBgkqhkiG9w0BAQUFAAOCAgEAvuRcYk4k9AwI//DTDGjkk0kiP0Qnb7tt3oNm\nzqjMDfz1mgbldxSR651Be5kqhOX//CHBXfDkH1e3damhXwIm/9fH907eT/j3HEbAek9ALCI18Bmx\n0GtnLLCo4MBANzX2hFxc469CeP6nyQ1Q6g2EdvZR74NTxnr/DlZJLo961gzmJ1TjTQpgcmLNkQfW\npb/ImWvtxBnmq0wROMVvMeJuScg/doAmAyYp4Db29iBT4xdwNBedY2gea+zDTYa4EzAvXUYNR0PV\nG6pZDrlcjQZIrXSHX8f8MVRBE+LHIQ6e4B4N4cB7Q4WQxYpYxmUKeFfyxiMPAdkgS94P+5KFdSpc\nc41teyWRyu5FrgZLAMzTsVlQ2jqIOylDRl6XK1TOU2+NSueW+r9xDkKLfP0ooNBIytrEgUy7onOT\nJsjrDNYmiLbAJM+7vVvrdX3pCI6GMyx5dwlppYn8s3CQh3aP0yK7Qs69cwsgJirQmz1wHiRszYd2\nqReWt88NkvuOGKmYSdGe/mBEciG5Ge3C9THxOUiIkCR1VBatzvT4aRRkOfujuLpwQMcnHL/EVlP6\nY2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems\nWWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY=\n-----END CERTIFICATE-----\n\nT-TeleSec GlobalRoot Class 2\n============================\n-----BEGIN CERTIFICATE-----\nMIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM\nIlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU\ncnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwHhcNMDgx\nMDAxMTA0MDE0WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz\ndGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD\nZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwggEiMA0GCSqGSIb3\nDQEBAQUAA4IBDwAwggEKAoIBAQCqX9obX+hzkeXaXPSi5kfl82hVYAUdAqSzm1nzHoqvNK38DcLZ\nSBnuaY/JIPwhqgcZ7bBcrGXHX+0CfHt8LRvWurmAwhiCFoT6ZrAIxlQjgeTNuUk/9k9uN0goOA/F\nvudocP05l03Sx5iRUKrERLMjfTlH6VJi1hKTXrcxlkIF+3anHqP1wvzpesVsqXFP6st4vGCvx970\n2cu+fjOlbpSD8DT6IavqjnKgP6TeMFvvhk1qlVtDRKgQFRzlAVfFmPHmBiiRqiDFt1MmUUOyCxGV\nWOHAD3bZwI18gfNycJ5v/hqO2V81xrJvNHy+SE/iWjnX2J14np+GPgNeGYtEotXHAgMBAAGjQjBA\nMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS/WSA2AHmgoCJrjNXy\nYdK4LMuCSjANBgkqhkiG9w0BAQsFAAOCAQEAMQOiYQsfdOhyNsZt+U2e+iKo4YFWz827n+qrkRk4\nr6p8FU3ztqONpfSO9kSpp+ghla0+AGIWiPACuvxhI+YzmzB6azZie60EI4RYZeLbK4rnJVM3YlNf\nvNoBYimipidx5joifsFvHZVwIEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR\n3p1m0IvVVGb6g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN\n9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlPBSeOE6Fuwg==\n-----END CERTIFICATE-----\n\nAtos TrustedRoot 2011\n=====================\n-----BEGIN CERTIFICATE-----\nMIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UEAwwVQXRvcyBU\ncnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0xMTA3MDcxNDU4\nMzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMMFUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsG\nA1UECgwEQXRvczELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV\nhTuXbyo7LjvPpvMpNb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr\n54rMVD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+SZFhyBH+\nDgMq92og3AIVDV4VavzjgsG1xZ1kCWyjWZgHJ8cblithdHFsQ/H3NYkQ4J7sVaE3IqKHBAUsR320\nHLliKWYoyrfhk/WklAOZuXCFteZI6o1Q/NnezG8HDt0Lcp2AMBYHlT8oDv3FdU9T1nSatCQujgKR\nz3bFmx5VdJx4IbHwLfELn8LVlhgf8FQieowHAgMBAAGjfTB7MB0GA1UdDgQWBBSnpQaxLKYJYO7R\nl+lwrrw7GWzbITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKelBrEspglg7tGX6XCuvDsZ\nbNshMBgGA1UdIAQRMA8wDQYLKwYBBAGwLQMEAQEwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB\nCwUAA4IBAQAmdzTblEiGKkGdLD4GkGDEjKwLVLgfuXvTBznk+j57sj1O7Z8jvZfza1zv7v1Apt+h\nk6EKhqzvINB5Ab149xnYJDE0BAGmuhWawyfc2E8PzBhj/5kPDpFrdRbhIfzYJsdHt6bPWHJxfrrh\nTZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pcmaHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a9\n61qn8FYiqTxlVMYVqL2Gns2Dlmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G\n3mB/ufNPRJLvKrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed\n-----END CERTIFICATE-----\n\nQuoVadis Root CA 1 G3\n=====================\n-----BEGIN CERTIFICATE-----\nMIIFYDCCA0igAwIBAgIUeFhfLq0sGUvjNwc1NBMotZbUZZMwDQYJKoZIhvcNAQELBQAwSDELMAkG\nA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv\nb3QgQ0EgMSBHMzAeFw0xMjAxMTIxNzI3NDRaFw00MjAxMTIxNzI3NDRaMEgxCzAJBgNVBAYTAkJN\nMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDEg\nRzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCgvlAQjunybEC0BJyFuTHK3C3kEakE\nPBtVwedYMB0ktMPvhd6MLOHBPd+C5k+tR4ds7FtJwUrVu4/sh6x/gpqG7D0DmVIB0jWerNrwU8lm\nPNSsAgHaJNM7qAJGr6Qc4/hzWHa39g6QDbXwz8z6+cZM5cOGMAqNF34168Xfuw6cwI2H44g4hWf6\nPser4BOcBRiYz5P1sZK0/CPTz9XEJ0ngnjybCKOLXSoh4Pw5qlPafX7PGglTvF0FBM+hSo+LdoIN\nofjSxxR3W5A2B4GbPgb6Ul5jxaYA/qXpUhtStZI5cgMJYr2wYBZupt0lwgNm3fME0UDiTouG9G/l\ng6AnhF4EwfWQvTA9xO+oabw4m6SkltFi2mnAAZauy8RRNOoMqv8hjlmPSlzkYZqn0ukqeI1RPToV\n7qJZjqlc3sX5kCLliEVx3ZGZbHqfPT2YfF72vhZooF6uCyP8Wg+qInYtyaEQHeTTRCOQiJ/GKubX\n9ZqzWB4vMIkIG1SitZgj7Ah3HJVdYdHLiZxfokqRmu8hqkkWCKi9YSgxyXSthfbZxbGL0eUQMk1f\niyA6PEkfM4VZDdvLCXVDaXP7a3F98N/ETH3Goy7IlXnLc6KOTk0k+17kBL5yG6YnLUlamXrXXAkg\nt3+UuU/xDRxeiEIbEbfnkduebPRq34wGmAOtzCjvpUfzUwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD\nAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUo5fW816iEOGrRZ88F2Q87gFwnMwwDQYJKoZI\nhvcNAQELBQADggIBABj6W3X8PnrHX3fHyt/PX8MSxEBd1DKquGrX1RUVRpgjpeaQWxiZTOOtQqOC\nMTaIzen7xASWSIsBx40Bz1szBpZGZnQdT+3Btrm0DWHMY37XLneMlhwqI2hrhVd2cDMT/uFPpiN3\nGPoajOi9ZcnPP/TJF9zrx7zABC4tRi9pZsMbj/7sPtPKlL92CiUNqXsCHKnQO18LwIE6PWThv6ct\nTr1NxNgpxiIY0MWscgKCP6o6ojoilzHdCGPDdRS5YCgtW2jgFqlmgiNR9etT2DGbe+m3nUvriBbP\n+V04ikkwj+3x6xn0dxoxGE1nVGwvb2X52z3sIexe9PSLymBlVNFxZPT5pqOBMzYzcfCkeF9OrYMh\n3jRJjehZrJ3ydlo28hP0r+AJx2EqbPfgna67hkooby7utHnNkDPDs3b69fBsnQGQ+p6Q9pxyz0fa\nwx/kNSBT8lTR32GDpgLiJTjehTItXnOQUl1CxM49S+H5GYQd1aJQzEH7QRTDvdbJWqNjZgKAvQU6\nO0ec7AAmTPWIUb+oI38YB7AL7YsmoWTTYUrrXJ/es69nA7Mf3W1daWhpq1467HxpvMc7hU6eFbm0\nFU/DlXpY18ls6Wy58yljXrQs8C097Vpl4KlbQMJImYFtnh8GKjwStIsPm6Ik8KaN1nrgS7ZklmOV\nhMJKzRwuJIczYOXD\n-----END CERTIFICATE-----\n\nQuoVadis Root CA 2 G3\n=====================\n-----BEGIN CERTIFICATE-----\nMIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQELBQAwSDELMAkG\nA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv\nb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJN\nMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIg\nRzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFh\nZiFfqq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMWn4rjyduY\nNM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ymc5GQYaYDFCDy54ejiK2t\noIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+O7q414AB+6XrW7PFXmAqMaCvN+ggOp+o\nMiwMzAkd056OXbxMmO7FGmh77FOm6RQ1o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+l\nV0POKa2Mq1W/xPtbAd0jIaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZo\nL1NesNKqIcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz8eQQ\nsSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43ehvNURG3YBZwjgQQvD\n6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l7ZizlWNof/k19N+IxWA1ksB8aRxh\nlRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALGcC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTAD\nAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZI\nhvcNAQELBQADggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66\nAarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RCroijQ1h5fq7K\npVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0GaW/ZZGYjeVYg3UQt4XAoeo0L9\nx52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4nlv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgz\ndWqTHBLmYF5vHX/JHyPLhGGfHoJE+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6X\nU/IyAgkwo1jwDQHVcsaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+Nw\nmNtddbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNgKCLjsZWD\nzYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeMHVOyToV7BjjHLPj4sHKN\nJeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4WSr2Rz0ZiC3oheGe7IUIarFsNMkd7Egr\nO3jtZsSOeWmD3n+M\n-----END CERTIFICATE-----\n\nQuoVadis Root CA 3 G3\n=====================\n-----BEGIN CERTIFICATE-----\nMIIFYDCCA0igAwIBAgIULvWbAiin23r/1aOp7r0DoM8Sah0wDQYJKoZIhvcNAQELBQAwSDELMAkG\nA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv\nb3QgQ0EgMyBHMzAeFw0xMjAxMTIyMDI2MzJaFw00MjAxMTIyMDI2MzJaMEgxCzAJBgNVBAYTAkJN\nMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDMg\nRzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCzyw4QZ47qFJenMioKVjZ/aEzHs286\nIxSR/xl/pcqs7rN2nXrpixurazHb+gtTTK/FpRp5PIpM/6zfJd5O2YIyC0TeytuMrKNuFoM7pmRL\nMon7FhY4futD4tN0SsJiCnMK3UmzV9KwCoWdcTzeo8vAMvMBOSBDGzXRU7Ox7sWTaYI+FrUoRqHe\n6okJ7UO4BUaKhvVZR74bbwEhELn9qdIoyhA5CcoTNs+cra1AdHkrAj80//ogaX3T7mH1urPnMNA3\nI4ZyYUUpSFlob3emLoG+B01vr87ERRORFHAGjx+f+IdpsQ7vw4kZ6+ocYfx6bIrc1gMLnia6Et3U\nVDmrJqMz6nWB2i3ND0/kA9HvFZcba5DFApCTZgIhsUfei5pKgLlVj7WiL8DWM2fafsSntARE60f7\n5li59wzweyuxwHApw0BiLTtIadwjPEjrewl5qW3aqDCYz4ByA4imW0aucnl8CAMhZa634RylsSqi\nMd5mBPfAdOhx3v89WcyWJhKLhZVXGqtrdQtEPREoPHtht+KPZ0/l7DxMYIBpVzgeAVuNVejH38DM\ndyM0SXV89pgR6y3e7UEuFAUCf+D+IOs15xGsIs5XPd7JMG0QA4XN8f+MFrXBsj6IbGB/kE+V9/Yt\nrQE5BwT6dYB9v0lQ7e/JxHwc64B+27bQ3RP+ydOc17KXqQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD\nAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUxhfQvKjqAkPyGwaZXSuQILnXnOQwDQYJKoZI\nhvcNAQELBQADggIBADRh2Va1EodVTd2jNTFGu6QHcrxfYWLopfsLN7E8trP6KZ1/AvWkyaiTt3px\nKGmPc+FSkNrVvjrlt3ZqVoAh313m6Tqe5T72omnHKgqwGEfcIHB9UqM+WXzBusnIFUBhynLWcKzS\nt/Ac5IYp8M7vaGPQtSCKFWGafoaYtMnCdvvMujAWzKNhxnQT5WvvoxXqA/4Ti2Tk08HS6IT7SdEQ\nTXlm66r99I0xHnAUrdzeZxNMgRVhvLfZkXdxGYFgu/BYpbWcC/ePIlUnwEsBbTuZDdQdm2NnL9Du\nDcpmvJRPpq3t/O5jrFc/ZSXPsoaP0Aj/uHYUbt7lJ+yreLVTubY/6CD50qi+YUbKh4yE8/nxoGib\nIh6BJpsQBJFxwAYf3KDTuVan45gtf4Od34wrnDKOMpTwATwiKp9Dwi7DmDkHOHv8XgBCH/MyJnmD\nhPbl8MFREsALHgQjDFSlTC9JxUrRtm5gDWv8a4uFJGS3iQ6rJUdbPM9+Sb3H6QrG2vd+DhcI00iX\n0HGS8A85PjRqHH3Y8iKuu2n0M7SmSFXRDw4m6Oy2Cy2nhTXN/VnIn9HNPlopNLk9hM6xZdRZkZFW\ndSHBd575euFgndOtBBj0fOtek49TSiIp+EgrPk2GrFt/ywaZWWDYWGWVjUTR939+J399roD1B0y2\nPpxxVJkES/1Y+Zj0\n-----END CERTIFICATE-----\n\nDigiCert Assured ID Root G2\n===========================\n-----BEGIN CERTIFICATE-----\nMIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQG\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw\nIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgw\nMTE1MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL\nExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIw\nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSAn61UQbVH\n35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4HteccbiJVMWWXvdMX0h5i89vq\nbFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9HpEgjAALAcKxHad3A2m67OeYfcgnDmCXRw\nVWmvo2ifv922ebPynXApVfSr/5Vh88lAbx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OP\nYLfykqGxvYmJHzDNw6YuYjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+Rn\nlTGNAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTO\nw0q5mVXyuNtgv6l+vVa1lzan1jANBgkqhkiG9w0BAQsFAAOCAQEAyqVVjOPIQW5pJ6d1Ee88hjZv\n0p3GeDgdaZaikmkuOGybfQTUiaWxMTeKySHMq2zNixya1r9I0jJmwYrA8y8678Dj1JGG0VDjA9tz\nd29KOVPt3ibHtX2vK0LRdWLjSisCx1BL4GnilmwORGYQRI+tBev4eaymG+g3NJ1TyWGqolKvSnAW\nhsI6yLETcDbYz+70CjTVW0z9B5yiutkBclzzTcHdDrEcDcRjvq30FPuJ7KJBDkzMyFdA0G4Dqs0M\njomZmWzwPDCvON9vvKO+KSAnq3T/EyJ43pdSVR6DtVQgA+6uwE9W3jfMw3+qBCe703e4YtsXfJwo\nIhNzbM8m9Yop5w==\n-----END CERTIFICATE-----\n\nDigiCert Assured ID Root G3\n===========================\n-----BEGIN CERTIFICATE-----\nMIICRjCCAc2gAwIBAgIQC6Fa+h3foLVJRK/NJKBs7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYD\nVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1\nMTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\nd3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwdjAQ\nBgcqhkjOPQIBBgUrgQQAIgNiAAQZ57ysRGXtzbg/WPuNsVepRC0FFfLvC/8QdJ+1YlJfZn4f5dwb\nRXkLzMZTCp2NXQLZqVneAlr2lSoOjThKiknGvMYDOAdfVdp+CW7if17QRSAPWXYQ1qAk8C3eNvJs\nKTmjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTL0L2p4ZgF\nUaFNN6KDec6NHSrkhDAKBggqhkjOPQQDAwNnADBkAjAlpIFFAmsSS3V0T8gj43DydXLefInwz5Fy\nYZ5eEJJZVrmDxxDnOOlYJjZ91eQ0hjkCMHw2U/Aw5WJjOpnitqM7mzT6HtoQknFekROn3aRukswy\n1vUhZscv6pZjamVFkpUBtA==\n-----END CERTIFICATE-----\n\nDigiCert Global Root G2\n=======================\n-----BEGIN CERTIFICATE-----\nMIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw\nHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUx\nMjAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3\ndy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkq\nhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI2/Ou8jqJ\nkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx1x7e/dfgy5SDN67sH0NO\n3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQq2EGnI/yuum06ZIya7XzV+hdG82MHauV\nBJVJ8zUtluNJbd134/tJS7SsVQepj5WztCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyM\nUNGPHgm+F6HmIcr9g+UQvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQAB\no0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu\n5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsr\nF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0U\nWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBH\nQRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/\niyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl\nMrY=\n-----END CERTIFICATE-----\n\nDigiCert Global Root G3\n=======================\n-----BEGIN CERTIFICATE-----\nMIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV\nUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD\nVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw\nMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k\naWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C\nAQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O\nYwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP\nBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp\nYim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y\n3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34\nVOKa5Vt8sycX\n-----END CERTIFICATE-----\n\nDigiCert Trusted Root G4\n========================\n-----BEGIN CERTIFICATE-----\nMIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBiMQswCQYDVQQG\nEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEw\nHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1\nMTIwMDAwWjBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\nd3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0G\nCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3yithZwuEp\npz1Yq3aaza57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1Ifxp4VpX6+n6lXFllVcq9o\nk3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDVySAdYyktzuxeTsiT+CFhmzTrBcZe7Fsa\nvOvJz82sNEBfsXpm7nfISKhmV1efVFiODCu3T6cw2Vbuyntd463JT17lNecxy9qTXtyOj4DatpGY\nQJB5w3jHtrHEtWoYOAMQjdjUN6QuBX2I9YI+EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6\nMUSaM0C/CNdaSaTC5qmgZ92kJ7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCiEhtm\nmnTK3kse5w5jrubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADMfRyVw4/3IbKyEbe7\nf/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QYuKZ3AeEPlAwhHbJUKSWJbOUOUlFH\ndL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXKchYiCd98THU/Y+whX8QgUWtvsauGi0/C1kVfnSD8\noR7FwI+isX4KJpn15GkvmB0t9dmpsh3lGwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud\nDwEB/wQEAwIBhjAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5nP+e6mK4cD08wDQYJKoZIhvcNAQEMBQAD\nggIBALth2X2pbL4XxJEbw6GiAI3jZGgPVs93rnD5/ZpKmbnJeFwMDF/k5hQpVgs2SV1EY+CtnJYY\nZhsjDT156W1r1lT40jzBQ0CuHVD1UvyQO7uYmWlrx8GnqGikJ9yd+SeuMIW59mdNOj6PWTkiU0Tr\nyF0Dyu1Qen1iIQqAyHNm0aAFYF/opbSnr6j3bTWcfFqK1qI4mfN4i/RN0iAL3gTujJtHgXINwBQy\n7zBZLq7gcfJW5GqXb5JQbZaNaHqasjYUegbyJLkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iah\nixTXTBmyUEFxPT9NcCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN\n5r5N0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie4u1Ki7wb\n/UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mIr/OSmbaz5mEP0oUA51Aa\n5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tK\nG48BtieVU+i2iW1bvGjUI+iLUaJW+fCmgKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP\n82Z+\n-----END CERTIFICATE-----\n\nCOMODO RSA Certification Authority\n==================================\n-----BEGIN CERTIFICATE-----\nMIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCBhTELMAkGA1UE\nBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG\nA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlv\nbiBBdXRob3JpdHkwHhcNMTAwMTE5MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMC\nR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE\nChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBB\ndXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR6FSS0gpWsawNJN3Fz0Rn\ndJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8Xpz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZ\nFGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+\n5eNu/Nio5JIk2kNrYrhV/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pG\nx8cgoLEfZd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z+pUX\n2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7wqP/0uK3pN/u6uPQL\nOvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZahSL0896+1DSJMwBGB7FY79tOi4lu3\nsgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVICu9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+C\nGCe01a60y1Dma/RMhnEw6abfFobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5\nWdYgGq/yapiqcrxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E\nFgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w\nDQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvlwFTPoCWOAvn9sKIN9SCYPBMt\nrFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+\nnq6PK7o9mfjYcwlYRm6mnPTXJ9OV2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSg\ntZx8jb8uk2IntznaFxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwW\nsRqZCuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiKboHGhfKp\npC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmckejkk9u+UJueBPSZI9FoJA\nzMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yLS0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHq\nZJx64SIDqZxubw5lT2yHh17zbqD5daWbQOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk52\n7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I\nLaZRfyHBNVOFBkpdn627G190\n-----END CERTIFICATE-----\n\nUSERTrust RSA Certification Authority\n=====================================\n-----BEGIN CERTIFICATE-----\nMIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCBiDELMAkGA1UE\nBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK\nExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh\ndGlvbiBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UE\nBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK\nExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh\ndGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCAEmUXNg7D2wiz\n0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2j\nY0K2dvKpOyuR+OJv0OwWIJAJPuLodMkYtJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFn\nRghRy4YUVD+8M/5+bJz/Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O\n+T23LLb2VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT79uq\n/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6c0Plfg6lZrEpfDKE\nY1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmTYo61Zs8liM2EuLE/pDkP2QKe6xJM\nlXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97lc6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8\nyexDJtC/QV9AqURE9JnnV4eeUB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+\neLf8ZxXhyVeEHg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd\nBgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF\nMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPFUp/L+M+ZBn8b2kMVn54CVVeW\nFPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KOVWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ\n7l8wXEskEVX/JJpuXior7gtNn3/3ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQ\nEg9zKC7F4iRO/Fjs8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM\n8WcRiQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYzeSf7dNXGi\nFSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZXHlKYC6SQK5MNyosycdi\nyA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9c\nJ2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRBVXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGw\nsAvgnEzDHNb842m1R0aBL6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gx\nQ+6IHdfGjjxDah2nGN59PRbxYvnKkKj9\n-----END CERTIFICATE-----\n\nUSERTrust ECC Certification Authority\n=====================================\n-----BEGIN CERTIFICATE-----\nMIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDELMAkGA1UEBhMC\nVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU\naGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv\nbiBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMC\nVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU\naGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv\nbiBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQarFRaqfloI+d61SRvU8Za2EurxtW2\n0eZzca7dnNYMYf3boIkDuAUU7FfO7l0/4iGzzvfUinngo4N+LZfQYcTxmdwlkWOrfzCjtHDix6Ez\nnPO/LlxTsV+zfTJ/ijTjeXmjQjBAMB0GA1UdDgQWBBQ64QmG1M8ZwpZ2dEl23OA1xmNjmjAOBgNV\nHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjA2Z6EWCNzklwBB\nHU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu\n9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg=\n-----END CERTIFICATE-----\n\nGlobalSign ECC Root CA - R5\n===========================\n-----BEGIN CERTIFICATE-----\nMIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEkMCIGA1UECxMb\nR2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD\nEwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb\nR2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD\nEwpHbG9iYWxTaWduMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6\nSFkc8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8kehOvRnkmS\nh5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd\nBgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYIKoZIzj0EAwMDaAAwZQIxAOVpEslu28Yx\nuglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7\nyFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3\n-----END CERTIFICATE-----\n\nIdenTrust Commercial Root CA 1\n==============================\n-----BEGIN CERTIFICATE-----\nMIIFYDCCA0igAwIBAgIQCgFCgAAAAUUjyES1AAAAAjANBgkqhkiG9w0BAQsFADBKMQswCQYDVQQG\nEwJVUzESMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBS\nb290IENBIDEwHhcNMTQwMTE2MTgxMjIzWhcNMzQwMTE2MTgxMjIzWjBKMQswCQYDVQQGEwJVUzES\nMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBSb290IENB\nIDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnUBneP5k91DNG8W9RYYKyqU+PZ4ld\nhNlT3Qwo2dfw/66VQ3KZ+bVdfIrBQuExUHTRgQ18zZshq0PirK1ehm7zCYofWjK9ouuU+ehcCuz/\nmNKvcbO0U59Oh++SvL3sTzIwiEsXXlfEU8L2ApeN2WIrvyQfYo3fw7gpS0l4PJNgiCL8mdo2yMKi\n1CxUAGc1bnO/AljwpN3lsKImesrgNqUZFvX9t++uP0D1bVoE/c40yiTcdCMbXTMTEl3EASX2MN0C\nXZ/g1Ue9tOsbobtJSdifWwLziuQkkORiT0/Br4sOdBeo0XKIanoBScy0RnnGF7HamB4HWfp1IYVl\n3ZBWzvurpWCdxJ35UrCLvYf5jysjCiN2O/cz4ckA82n5S6LgTrx+kzmEB/dEcH7+B1rlsazRGMzy\nNeVJSQjKVsk9+w8YfYs7wRPCTY/JTw436R+hDmrfYi7LNQZReSzIJTj0+kuniVyc0uMNOYZKdHzV\nWYfCP04MXFL0PfdSgvHqo6z9STQaKPNBiDoT7uje/5kdX7rL6B7yuVBgwDHTc+XvvqDtMwt0viAg\nxGds8AgDelWAf0ZOlqf0Hj7h9tgJ4TNkK2PXMl6f+cB7D3hvl7yTmvmcEpB4eoCHFddydJxVdHix\nuuFucAS6T6C6aMN7/zHwcz09lCqxC0EOoP5NiGVreTO01wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC\nAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7UQZwNPwBovupHu+QucmVMiONnYwDQYJKoZI\nhvcNAQELBQADggIBAA2ukDL2pkt8RHYZYR4nKM1eVO8lvOMIkPkp165oCOGUAFjvLi5+U1KMtlwH\n6oi6mYtQlNeCgN9hCQCTrQ0U5s7B8jeUeLBfnLOic7iPBZM4zY0+sLj7wM+x8uwtLRvM7Kqas6pg\nghstO8OEPVeKlh6cdbjTMM1gCIOQ045U8U1mwF10A0Cj7oV+wh93nAbowacYXVKV7cndJZ5t+qnt\nozo00Fl72u1Q8zW/7esUTTHHYPTa8Yec4kjixsU3+wYQ+nVZZjFHKdp2mhzpgq7vmrlR94gjmmmV\nYjzlVYA211QC//G5Xc7UI2/YRYRKW2XviQzdFKcgyxilJbQN+QHwotL0AMh0jqEqSI5l2xPE4iUX\nfeu+h1sXIFRRk0pTAwvsXcoz7WL9RccvW9xYoIA55vrX/hMUpu09lEpCdNTDd1lzzY9GvlU47/ro\nkTLql1gEIt44w8y8bckzOmoKaT+gyOpyj4xjhiO9bTyWnpXgSUyqorkqG5w2gXjtw+hG4iZZRHUe\n2XWJUc0QhJ1hYMtd+ZciTY6Y5uN/9lu7rs3KSoFrXgvzUeF0K+l+J6fZmUlO+KWA2yUPHGNiiskz\nZ2s8EIPGrd6ozRaOjfAHN3Gf8qv8QfXBi+wAN10J5U6A7/qxXDgGpRtK4dw4LTzcqx+QGtVKnO7R\ncGzM7vRX+Bi6hG6H\n-----END CERTIFICATE-----\n\nIdenTrust Public Sector Root CA 1\n=================================\n-----BEGIN CERTIFICATE-----\nMIIFZjCCA06gAwIBAgIQCgFCgAAAAUUjz0Z8AAAAAjANBgkqhkiG9w0BAQsFADBNMQswCQYDVQQG\nEwJVUzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3Rv\nciBSb290IENBIDEwHhcNMTQwMTE2MTc1MzMyWhcNMzQwMTE2MTc1MzMyWjBNMQswCQYDVQQGEwJV\nUzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3RvciBS\nb290IENBIDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2IpT8pEiv6EdrCvsnduTy\nP4o7ekosMSqMjbCpwzFrqHd2hCa2rIFCDQjrVVi7evi8ZX3yoG2LqEfpYnYeEe4IFNGyRBb06tD6\nHi9e28tzQa68ALBKK0CyrOE7S8ItneShm+waOh7wCLPQ5CQ1B5+ctMlSbdsHyo+1W/CD80/HLaXI\nrcuVIKQxKFdYWuSNG5qrng0M8gozOSI5Cpcu81N3uURF/YTLNiCBWS2ab21ISGHKTN9T0a9SvESf\nqy9rg3LvdYDaBjMbXcjaY8ZNzaxmMc3R3j6HEDbhuaR672BQssvKplbgN6+rNBM5Jeg5ZuSYeqoS\nmJxZZoY+rfGwyj4GD3vwEUs3oERte8uojHH01bWRNszwFcYr3lEXsZdMUD2xlVl8BX0tIdUAvwFn\nol57plzy9yLxkA2T26pEUWbMfXYD62qoKjgZl3YNa4ph+bz27nb9cCvdKTz4Ch5bQhyLVi9VGxyh\nLrXHFub4qjySjmm2AcG1hp2JDws4lFTo6tyePSW8Uybt1as5qsVATFSrsrTZ2fjXctscvG29ZV/v\niDUqZi/u9rNl8DONfJhBaUYPQxxp+pu10GFqzcpL2UyQRqsVWaFHVCkugyhfHMKiq3IXAAaOReyL\n4jM9f9oZRORicsPfIsbyVtTdX5Vy7W1f90gDW/3FKqD2cyOEEBsB5wIDAQABo0IwQDAOBgNVHQ8B\nAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU43HgntinQtnbcZFrlJPrw6PRFKMw\nDQYJKoZIhvcNAQELBQADggIBAEf63QqwEZE4rU1d9+UOl1QZgkiHVIyqZJnYWv6IAcVYpZmxI1Qj\nt2odIFflAWJBF9MJ23XLblSQdf4an4EKwt3X9wnQW3IV5B4Jaj0z8yGa5hV+rVHVDRDtfULAj+7A\nmgjVQdZcDiFpboBhDhXAuM/FSRJSzL46zNQuOAXeNf0fb7iAaJg9TaDKQGXSc3z1i9kKlT/YPyNt\nGtEqJBnZhbMX73huqVjRI9PHE+1yJX9dsXNw0H8GlwmEKYBhHfpe/3OsoOOJuBxxFcbeMX8S3OFt\nm6/n6J91eEyrRjuazr8FGF1NFTwWmhlQBJqymm9li1JfPFgEKCXAZmExfrngdbkaqIHWchezxQMx\nNRF4eKLg6TCMf4DfWN88uieW4oA0beOY02QnrEh+KHdcxiVhJfiFDGX6xDIvpZgF5PgLZxYWxoK4\nMhn5+bl53B/N66+rDt0b20XkeucC4pVd/GnwU2lhlXV5C15V5jgclKlZM57IcXR5f1GJtshquDDI\najjDbp7hNxbqBWJMWxJH7ae0s1hWx0nzfxJoCTFx8G34Tkf71oXuxVhAGaQdp/lLQzfcaFpPz+vC\nZHTetBXZ9FRUGi8c15dxVJCO2SCdUyt/q4/i6jC8UDfv8Ue1fXwsBOxonbRJRBD0ckscZOf85muQ\n3Wl9af0AVqW3rLatt8o+Ae+c\n-----END CERTIFICATE-----\n\nEntrust Root Certification Authority - G2\n=========================================\n-----BEGIN CERTIFICATE-----\nMIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMCVVMxFjAUBgNV\nBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVy\nbXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ug\nb25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIw\nHhcNMDkwNzA3MTcyNTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoT\nDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMx\nOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25s\neTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwggEi\nMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP\n/vaCeb9zYQYKpSfYs1/TRU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXz\nHHfV1IWNcCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hWwcKU\ns/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1U1+cPvQXLOZprE4y\nTGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0jaWvYkxN4FisZDQSA/i2jZRjJKRx\nAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ6\n0B7vfec7aVHUbI2fkBJmqzANBgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5Z\niXMRrEPR9RP/jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ\nRkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v1fN2D807iDgi\nnWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4RnAuknZoh8/CbCzB428Hch0P+\nvGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmHVHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xO\ne4pIb4tF9g==\n-----END CERTIFICATE-----\n\nEntrust Root Certification Authority - EC1\n==========================================\n-----BEGIN CERTIFICATE-----\nMIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkGA1UEBhMCVVMx\nFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVn\nYWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXpl\nZCB1c2Ugb25seTEzMDEGA1UEAxMqRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5\nIC0gRUMxMB4XDTEyMTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYw\nFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2Fs\nLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQg\ndXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt\nIEVDMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHy\nAsWfoPZb1YsGGYZPUxBtByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef\n9eNi1KlHBz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE\nFLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVCR98crlOZF7ZvHH3h\nvxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nXhTcGtXsI/esni0qU+eH6p44mCOh8\nkmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G\n-----END CERTIFICATE-----\n\nCFCA EV ROOT\n============\n-----BEGIN CERTIFICATE-----\nMIIFjTCCA3WgAwIBAgIEGErM1jANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJDTjEwMC4GA1UE\nCgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQDDAxDRkNB\nIEVWIFJPT1QwHhcNMTIwODA4MDMwNzAxWhcNMjkxMjMxMDMwNzAxWjBWMQswCQYDVQQGEwJDTjEw\nMC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQD\nDAxDRkNBIEVWIFJPT1QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDXXWvNED8fBVnV\nBU03sQ7smCuOFR36k0sXgiFxEFLXUWRwFsJVaU2OFW2fvwwbwuCjZ9YMrM8irq93VCpLTIpTUnrD\n7i7es3ElweldPe6hL6P3KjzJIx1qqx2hp/Hz7KDVRM8Vz3IvHWOX6Jn5/ZOkVIBMUtRSqy5J35DN\nuF++P96hyk0g1CXohClTt7GIH//62pCfCqktQT+x8Rgp7hZZLDRJGqgG16iI0gNyejLi6mhNbiyW\nZXvKWfry4t3uMCz7zEasxGPrb382KzRzEpR/38wmnvFyXVBlWY9ps4deMm/DGIq1lY+wejfeWkU7\nxzbh72fROdOXW3NiGUgthxwG+3SYIElz8AXSG7Ggo7cbcNOIabla1jj0Ytwli3i/+Oh+uFzJlU9f\npy25IGvPa931DfSCt/SyZi4QKPaXWnuWFo8BGS1sbn85WAZkgwGDg8NNkt0yxoekN+kWzqotaK8K\ngWU6cMGbrU1tVMoqLUuFG7OA5nBFDWteNfB/O7ic5ARwiRIlk9oKmSJgamNgTnYGmE69g60dWIol\nhdLHZR4tjsbftsbhf4oEIRUpdPA+nJCdDC7xij5aqgwJHsfVPKPtl8MeNPo4+QgO48BdK4PRVmrJ\ntqhUUy54Mmc9gn900PvhtgVguXDbjgv5E1hvcWAQUhC5wUEJ73IfZzF4/5YFjQIDAQABo2MwYTAf\nBgNVHSMEGDAWgBTj/i39KNALtbq2osS/BqoFjJP7LzAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB\n/wQEAwIBBjAdBgNVHQ4EFgQU4/4t/SjQC7W6tqLEvwaqBYyT+y8wDQYJKoZIhvcNAQELBQADggIB\nACXGumvrh8vegjmWPfBEp2uEcwPenStPuiB/vHiyz5ewG5zz13ku9Ui20vsXiObTej/tUxPQ4i9q\necsAIyjmHjdXNYmEwnZPNDatZ8POQQaIxffu2Bq41gt/UP+TqhdLjOztUmCypAbqTuv0axn96/Ua\n4CUqmtzHQTb3yHQFhDmVOdYLO6Qn+gjYXB74BGBSESgoA//vU2YApUo0FmZ8/Qmkrp5nGm9BC2sG\nE5uPhnEFtC+NiWYzKXZUmhH4J/qyP5Hgzg0b8zAarb8iXRvTvyUFTeGSGn+ZnzxEk8rUQElsgIfX\nBDrDMlI1Dlb4pd19xIsNER9Tyx6yF7Zod1rg1MvIB671Oi6ON7fQAUtDKXeMOZePglr4UeWJoBjn\naH9dCi77o0cOPaYjesYBx4/IXr9tgFa+iiS6M+qf4TIRnvHST4D2G0CvOJ4RUHlzEhLN5mydLIhy\nPDCBBpEi6lmt2hkuIsKNuYyH4Ga8cyNfIWRjgEj1oDwYPZTISEEdQLpe/v5WOaHIz16eGWRGENoX\nkbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C\nekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su\n-----END CERTIFICATE-----\n\nOISTE WISeKey Global Root GB CA\n===============================\n-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQG\nEwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl\nZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQiBDQTAeFw0xNDEyMDExNTAw\nMzJaFw0zOTEyMDExNTEwMzFaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYD\nVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEds\nb2JhbCBSb290IEdCIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Be3HEokKtaX\nscriHvt9OO+Y9bI5mE4nuBFde9IllIiCFSZqGzG7qFshISvYD06fWvGxWuR51jIjK+FTzJlFXHtP\nrby/h0oLS5daqPZI7H17Dc0hBt+eFf1Biki3IPShehtX1F1Q/7pn2COZH8g/497/b1t3sWtuuMlk\n9+HKQUYOKXHQuSP8yYFfTvdv37+ErXNku7dCjmn21HYdfp2nuFeKUWdy19SouJVUQHMD9ur06/4o\nQnc/nSMbsrY9gBQHTC5P99UKFg29ZkM3fiNDecNAhvVMKdqOmq0NpQSHiB6F4+lT1ZvIiwNjeOvg\nGUpuuy9rM2RYk61pv48b74JIxwIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB\n/zAdBgNVHQ4EFgQUNQ/INmNe4qPs+TtmFc5RUuORmj0wEAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZI\nhvcNAQELBQADggEBAEBM+4eymYGQfp3FsLAmzYh7KzKNbrghcViXfa43FK8+5/ea4n32cZiZBKpD\ndHij40lhPnOMTZTg+XHEthYOU3gf1qKHLwI5gSk8rxWYITD+KJAAjNHhy/peyP34EEY7onhCkRd0\nVQreUGdNZtGn//3ZwLWoo4rOZvUPQ82nK1d7Y0Zqqi5S2PTt4W2tKZB4SLrhI6qjiey1q5bAtEui\nHZeeevJuQHHfaPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic\nNc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM=\n-----END CERTIFICATE-----\n\nSZAFIR ROOT CA2\n===============\n-----BEGIN CERTIFICATE-----\nMIIDcjCCAlqgAwIBAgIUPopdB+xV0jLVt+O2XwHrLdzk1uQwDQYJKoZIhvcNAQELBQAwUTELMAkG\nA1UEBhMCUEwxKDAmBgNVBAoMH0tyYWpvd2EgSXpiYSBSb3psaWN6ZW5pb3dhIFMuQS4xGDAWBgNV\nBAMMD1NaQUZJUiBST09UIENBMjAeFw0xNTEwMTkwNzQzMzBaFw0zNTEwMTkwNzQzMzBaMFExCzAJ\nBgNVBAYTAlBMMSgwJgYDVQQKDB9LcmFqb3dhIEl6YmEgUm96bGljemVuaW93YSBTLkEuMRgwFgYD\nVQQDDA9TWkFGSVIgUk9PVCBDQTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3vD5Q\nqEvNQLXOYeeWyrSh2gwisPq1e3YAd4wLz32ohswmUeQgPYUM1ljj5/QqGJ3a0a4m7utT3PSQ1hNK\nDJA8w/Ta0o4NkjrcsbH/ON7Dui1fgLkCvUqdGw+0w8LBZwPd3BucPbOw3gAeqDRHu5rr/gsUvTaE\n2g0gv/pby6kWIK05YO4vdbbnl5z5Pv1+TW9NL++IDWr63fE9biCloBK0TXC5ztdyO4mTp4CEHCdJ\nckm1/zuVnsHMyAHs6A6KCpbns6aH5db5BSsNl0BwPLqsdVqc1U2dAgrSS5tmS0YHF2Wtn2yIANwi\nieDhZNRnvDF5YTy7ykHNXGoAyDw4jlivAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0P\nAQH/BAQDAgEGMB0GA1UdDgQWBBQuFqlKGLXLzPVvUPMjX/hd56zwyDANBgkqhkiG9w0BAQsFAAOC\nAQEAtXP4A9xZWx126aMqe5Aosk3AM0+qmrHUuOQn/6mWmc5G4G18TKI4pAZw8PRBEew/R40/cof5\nO/2kbytTAOD/OblqBw7rHRz2onKQy4I9EYKL0rufKq8h5mOGnXkZ7/e7DDWQw4rtTw/1zBLZpD67\noPwglV9PJi8RI4NOdQcPv5vRtB3pEAT+ymCPoky4rc/hkA/NrgrHXXu3UNLUYfrVFdvXn4dRVOul\n4+vJhaAlIDf7js4MNIThPIGyd05DpYhfhmehPea0XGG2Ptv+tyjFogeutcrKjSoS75ftwjCkySp6\n+/NNIxuZMzSgLvWpCz/UXeHPhJ/iGcJfitYgHuNztw==\n-----END CERTIFICATE-----\n\nCertum Trusted Network CA 2\n===========================\n-----BEGIN CERTIFICATE-----\nMIIF0jCCA7qgAwIBAgIQIdbQSk8lD8kyN/yqXhKN6TANBgkqhkiG9w0BAQ0FADCBgDELMAkGA1UE\nBhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVzIFMuQS4xJzAlBgNVBAsTHkNlcnR1\nbSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEkMCIGA1UEAxMbQ2VydHVtIFRydXN0ZWQgTmV0d29y\nayBDQSAyMCIYDzIwMTExMDA2MDgzOTU2WhgPMjA0NjEwMDYwODM5NTZaMIGAMQswCQYDVQQGEwJQ\nTDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENl\ncnRpZmljYXRpb24gQXV0aG9yaXR5MSQwIgYDVQQDExtDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENB\nIDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC9+Xj45tWADGSdhhuWZGc/IjoedQF9\n7/tcZ4zJzFxrqZHmuULlIEub2pt7uZld2ZuAS9eEQCsn0+i6MLs+CRqnSZXvK0AkwpfHp+6bJe+o\nCgCXhVqqndwpyeI1B+twTUrWwbNWuKFBOJvR+zF/j+Bf4bE/D44WSWDXBo0Y+aomEKsq09DRZ40b\nRr5HMNUuctHFY9rnY3lEfktjJImGLjQ/KUxSiyqnwOKRKIm5wFv5HdnnJ63/mgKXwcZQkpsCLL2p\nuTRZCr+ESv/f/rOf69me4Jgj7KZrdxYq28ytOxykh9xGc14ZYmhFV+SQgkK7QtbwYeDBoz1mo130\nGO6IyY0XRSmZMnUCMe4pJshrAua1YkV/NxVaI2iJ1D7eTiew8EAMvE0Xy02isx7QBlrd9pPPV3WZ\n9fqGGmd4s7+W/jTcvedSVuWz5XV710GRBdxdaeOVDUO5/IOWOZV7bIBaTxNyxtd9KXpEulKkKtVB\nRgkg/iKgtlswjbyJDNXXcPiHUv3a76xRLgezTv7QCdpw75j6VuZt27VXS9zlLCUVyJ4ueE742pye\nhizKV/Ma5ciSixqClnrDvFASadgOWkaLOusm+iPJtrCBvkIApPjW/jAux9JG9uWOdf3yzLnQh1vM\nBhBgu4M1t15n3kfsmUjxpKEV/q2MYo45VU85FrmxY53/twIDAQABo0IwQDAPBgNVHRMBAf8EBTAD\nAQH/MB0GA1UdDgQWBBS2oVQ5AsOgP46KvPrU+Bym0ToO/TAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZI\nhvcNAQENBQADggIBAHGlDs7k6b8/ONWJWsQCYftMxRQXLYtPU2sQF/xlhMcQSZDe28cmk4gmb3DW\nAl45oPePq5a1pRNcgRRtDoGCERuKTsZPpd1iHkTfCVn0W3cLN+mLIMb4Ck4uWBzrM9DPhmDJ2vuA\nL55MYIR4PSFk1vtBHxgP58l1cb29XN40hz5BsA72udY/CROWFC/emh1auVbONTqwX3BNXuMp8SMo\nclm2q8KMZiYcdywmdjWLKKdpoPk79SPdhRB0yZADVpHnr7pH1BKXESLjokmUbOe3lEu6LaTaM4tM\npkT/WjzGHWTYtTHkpjx6qFcL2+1hGsvxznN3Y6SHb0xRONbkX8eftoEq5IVIeVheO/jbAoJnwTnb\nw3RLPTYe+SmTiGhbqEQZIfCn6IENLOiTNrQ3ssqwGyZ6miUfmpqAnksqP/ujmv5zMnHCnsZy4Ypo\nJ/HkD7TETKVhk/iXEAcqMCWpuchxuO9ozC1+9eB+D4Kob7a6bINDd82Kkhehnlt4Fj1F4jNy3eFm\nypnTycUm/Q1oBEauttmbjL4ZvrHG8hnjXALKLNhvSgfZyTXaQHXyxKcZb55CEJh15pWLYLztxRLX\nis7VmFxWlgPF7ncGNf/P5O4/E2Hu29othfDNrp2yGAlFw5Khchf8R7agCyzxxN5DaAhqXzvwdmP7\nzAYspsbiDrW5viSP\n-----END CERTIFICATE-----\n\nHellenic Academic and Research Institutions RootCA 2015\n=======================================================\n-----BEGIN CERTIFICATE-----\nMIIGCzCCA/OgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcT\nBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0\naW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNVBAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNl\nYXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIwMTUwHhcNMTUwNzA3MTAxMTIxWhcNNDAwNjMwMTAx\nMTIxWjCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMg\nQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNV\nBAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIw\nMTUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDC+Kk/G4n8PDwEXT2QNrCROnk8Zlrv\nbTkBSRq0t89/TSNTt5AA4xMqKKYx8ZEA4yjsriFBzh/a/X0SWwGDD7mwX5nh8hKDgE0GPt+sr+eh\niGsxr/CL0BgzuNtFajT0AoAkKAoCFZVedioNmToUW/bLy1O8E00BiDeUJRtCvCLYjqOWXjrZMts+\n6PAQZe104S+nfK8nNLspfZu2zwnI5dMK/IhlZXQK3HMcXM1AsRzUtoSMTFDPaI6oWa7CJ06CojXd\nFPQf/7J31Ycvqm59JCfnxssm5uX+Zwdj2EUN3TpZZTlYepKZcj2chF6IIbjV9Cz82XBST3i4vTwr\ni5WY9bPRaM8gFH5MXF/ni+X1NYEZN9cRCLdmvtNKzoNXADrDgfgXy5I2XdGj2HUb4Ysn6npIQf1F\nGQatJ5lOwXBH3bWfgVMS5bGMSF0xQxfjjMZ6Y5ZLKTBOhE5iGV48zpeQpX8B653g+IuJ3SWYPZK2\nfu/Z8VFRfS0myGlZYeCsargqNhEEelC9MoS+L9xy1dcdFkfkR2YgP/SWxa+OAXqlD3pk9Q0Yh9mu\niNX6hME6wGkoLfINaFGq46V3xqSQDqE3izEjR8EJCOtu93ib14L8hCCZSRm2Ekax+0VVFqmjZayc\nBw/qa9wfLgZy7IaIEuQt218FL+TwA9MmM+eAws1CoRc0CwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD\nAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUcRVnyMjJvXVdctA4GGqd83EkVAswDQYJKoZI\nhvcNAQELBQADggIBAHW7bVRLqhBYRjTyYtcWNl0IXtVsyIe9tC5G8jH4fOpCtZMWVdyhDBKg2mF+\nD1hYc2Ryx+hFjtyp8iY/xnmMsVMIM4GwVhO+5lFc2JsKT0ucVlMC6U/2DWDqTUJV6HwbISHTGzrM\nd/K4kPFox/la/vot9L/J9UUbzjgQKjeKeaO04wlshYaT/4mWJ3iBj2fjRnRUjtkNaeJK9E10A/+y\nd+2VZ5fkscWrv2oj6NSU4kQoYsRL4vDY4ilrGnB+JGGTe08DMiUNRSQrlrRGar9KC/eaj8GsGsVn\n82800vpzY4zvFrCopEYq+OsS7HK07/grfoxSwIuEVPkvPuNVqNxmsdnhX9izjFk0WaSrT2y7Hxjb\ndavYy5LNlDhhDgcGH0tGEPEVvo2FXDtKK4F5D7Rpn0lQl033DlZdwJVqwjbDG2jJ9SrcR5q+ss7F\nJej6A7na+RZukYT1HCjI/CbM1xyQVqdfbzoEvM14iQuODy+jqk+iGxI9FghAD/FGTNeqewjBCvVt\nJ94Cj8rDtSvK6evIIVM4pcw72Hc3MKJP2W/R8kCtQXoXxdZKNYm3QdV8hn9VTYNKpXMgwDqvkPGa\nJI7ZjnHKe7iG2rKPmT4dEw0SEe7Uq/DpFXYC5ODfqiAeW2GFZECpkJcNrVPSWh2HagCXZWK0vm9q\np/UsQu0yrbYhnr68\n-----END CERTIFICATE-----\n\nHellenic Academic and Research Institutions ECC RootCA 2015\n===========================================================\n-----BEGIN CERTIFICATE-----\nMIICwzCCAkqgAwIBAgIBADAKBggqhkjOPQQDAjCBqjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0\naGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u\ncyBDZXJ0LiBBdXRob3JpdHkxRDBCBgNVBAMTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJj\naCBJbnN0aXR1dGlvbnMgRUNDIFJvb3RDQSAyMDE1MB4XDTE1MDcwNzEwMzcxMloXDTQwMDYzMDEw\nMzcxMlowgaoxCzAJBgNVBAYTAkdSMQ8wDQYDVQQHEwZBdGhlbnMxRDBCBgNVBAoTO0hlbGxlbmlj\nIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9yaXR5MUQwQgYD\nVQQDEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIEVDQyBSb290\nQ0EgMjAxNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABJKgQehLgoRc4vgxEZmGZE4JJS+dQS8KrjVP\ndJWyUWRrjWvmP3CV8AVER6ZyOFB2lQJajq4onvktTpnvLEhvTCUp6NFxW98dwXU3tNf6e3pCnGoK\nVlp8aQuqgAkkbH7BRqNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O\nBBYEFLQiC4KZJAEOnLvkDv2/+5cgk5kqMAoGCCqGSM49BAMCA2cAMGQCMGfOFmI4oqxiRaeplSTA\nGiecMjvAwNW6qef4BENThe5SId6d9SWDPp5YSy/XZxMOIQIwBeF1Ad5o7SofTUwJCA3sS61kFyjn\ndc5FZXIhF8siQQ6ME5g4mlRtm8rifOoCWCKR\n-----END CERTIFICATE-----\n\nISRG Root X1\n============\n-----BEGIN CERTIFICATE-----\nMIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAwTzELMAkGA1UE\nBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2VhcmNoIEdyb3VwMRUwEwYDVQQD\nEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQG\nEwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMT\nDElTUkcgUm9vdCBYMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54r\nVygch77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+0TM8ukj1\n3Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6UA5/TR5d8mUgjU+g4rk8K\nb4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sWT8KOEUt+zwvo/7V3LvSye0rgTBIlDHCN\nAymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyHB5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ\n4Q7e2RCOFvu396j3x+UCB5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf\n1b0SHzUvKBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWnOlFu\nhjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTnjh8BCNAw1FtxNrQH\nusEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbwqHyGO0aoSCqI3Haadr8faqU9GY/r\nOPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CIrU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4G\nA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY\n9umbbjANBgkqhkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL\nubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ3BebYhtF8GaV\n0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KKNFtY2PwByVS5uCbMiogziUwt\nhDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJw\nTdwJx4nLCgdNbOhdjsnvzqvHu7UrTkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nx\ne5AW0wdeRlN8NwdCjNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZA\nJzVcoyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq4RgqsahD\nYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPAmRGunUHBcnWEvgJBQl9n\nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57demyPxgcYxn/eR44/KJ4EBs+lVDR3veyJ\nm+kXQ99b21/+jh5Xos1AnX5iItreGCc=\n-----END CERTIFICATE-----\n\nAC RAIZ FNMT-RCM\n================\n-----BEGIN CERTIFICATE-----\nMIIFgzCCA2ugAwIBAgIPXZONMGc2yAYdGsdUhGkHMA0GCSqGSIb3DQEBCwUAMDsxCzAJBgNVBAYT\nAkVTMREwDwYDVQQKDAhGTk1ULVJDTTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTAeFw0wODEw\nMjkxNTU5NTZaFw0zMDAxMDEwMDAwMDBaMDsxCzAJBgNVBAYTAkVTMREwDwYDVQQKDAhGTk1ULVJD\nTTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC\nggIBALpxgHpMhm5/yBNtwMZ9HACXjywMI7sQmkCpGreHiPibVmr75nuOi5KOpyVdWRHbNi63URcf\nqQgfBBckWKo3Shjf5TnUV/3XwSyRAZHiItQDwFj8d0fsjz50Q7qsNI1NOHZnjrDIbzAzWHFctPVr\nbtQBULgTfmxKo0nRIBnuvMApGGWn3v7v3QqQIecaZ5JCEJhfTzC8PhxFtBDXaEAUwED653cXeuYL\nj2VbPNmaUtu1vZ5Gzz3rkQUCwJaydkxNEJY7kvqcfw+Z374jNUUeAlz+taibmSXaXvMiwzn15Cou\n08YfxGyqxRxqAQVKL9LFwag0Jl1mpdICIfkYtwb1TplvqKtMUejPUBjFd8g5CSxJkjKZqLsXF3mw\nWsXmo8RZZUc1g16p6DULmbvkzSDGm0oGObVo/CK67lWMK07q87Hj/LaZmtVC+nFNCM+HHmpxffnT\ntOmlcYF7wk5HlqX2doWjKI/pgG6BU6VtX7hI+cL5NqYuSf+4lsKMB7ObiFj86xsc3i1w4peSMKGJ\n47xVqCfWS+2QrYv6YyVZLag13cqXM7zlzced0ezvXg5KkAYmY6252TUtB7p2ZSysV4999AeU14EC\nll2jB0nVetBX+RvnU0Z1qrB5QstocQjpYL05ac70r8NWQMetUqIJ5G+GR4of6ygnXYMgrwTJbFaa\ni0b1AgMBAAGjgYMwgYAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE\nFPd9xf3E6Jobd2Sn9R2gzL+HYJptMD4GA1UdIAQ3MDUwMwYEVR0gADArMCkGCCsGAQUFBwIBFh1o\ndHRwOi8vd3d3LmNlcnQuZm5tdC5lcy9kcGNzLzANBgkqhkiG9w0BAQsFAAOCAgEAB5BK3/MjTvDD\nnFFlm5wioooMhfNzKWtN/gHiqQxjAb8EZ6WdmF/9ARP67Jpi6Yb+tmLSbkyU+8B1RXxlDPiyN8+s\nD8+Nb/kZ94/sHvJwnvDKuO+3/3Y3dlv2bojzr2IyIpMNOmqOFGYMLVN0V2Ue1bLdI4E7pWYjJ2cJ\nj+F3qkPNZVEI7VFY/uY5+ctHhKQV8Xa7pO6kO8Rf77IzlhEYt8llvhjho6Tc+hj507wTmzl6NLrT\nQfv6MooqtyuGC2mDOL7Nii4LcK2NJpLuHvUBKwrZ1pebbuCoGRw6IYsMHkCtA+fdZn71uSANA+iW\n+YJF1DngoABd15jmfZ5nc8OaKveri6E6FO80vFIOiZiaBECEHX5FaZNXzuvO+FB8TxxuBEOb+dY7\nIxjp6o7RTUaN8Tvkasq6+yO3m/qZASlaWFot4/nUbQ4mrcFuNLwy+AwF+mWj2zs3gyLp1txyM/1d\n8iC9djwj2ij3+RvrWWTV3F9yfiD8zYm1kGdNYno/Tq0dwzn+evQoFt9B9kiABdcPUXmsEKvU7ANm\n5mqwujGSQkBqvjrTcuFqN1W8rB2Vt2lh8kORdOag0wokRqEIr9baRRmW1FMdW4R58MD3R++Lj8UG\nrp1MYp3/RgT408m2ECVAdf4WqslKYIYvuu8wd+RU4riEmViAqhOLUTpPSPaLtrM=\n-----END CERTIFICATE-----\n\nAmazon Root CA 1\n================\n-----BEGIN CERTIFICATE-----\nMIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsFADA5MQswCQYD\nVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAxMB4XDTE1\nMDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv\nbjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\nggEBALJ4gHHKeNXjca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgH\nFzZM9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qwIFAGbHrQ\ngLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6VOujw5H5SNz/0egwLX0t\ndHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L93FcXmn/6pUCyziKrlA4b9v7LWIbxcce\nVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQmjgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB\n/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3\nDQEBCwUAA4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDIU5PM\nCCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUsN+gDS63pYaACbvXy\n8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vvo/ufQJVtMVT8QtPHRh8jrdkPSHCa\n2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2\nxJNDd2ZhwLnoQdeXeGADbkpyrqXRfboQnoZsG4q5WTP468SQvvG5\n-----END CERTIFICATE-----\n\nAmazon Root CA 2\n================\n-----BEGIN CERTIFICATE-----\nMIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwFADA5MQswCQYD\nVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAyMB4XDTE1\nMDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv\nbjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC\nggIBAK2Wny2cSkxKgXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4\nkHbZW0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg1dKmSYXp\nN+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K8nu+NQWpEjTj82R0Yiw9\nAElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvd\nfLC6HM783k81ds8P+HgfajZRRidhW+mez/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAEx\nkv8LV/SasrlX6avvDXbR8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSS\nbtqDT6ZjmUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz7Mt0\nQ5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6+XUyo05f7O0oYtlN\nc/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI0u1ufm8/0i2BWSlmy5A5lREedCf+\n3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSw\nDPBMMPQFWAJI/TPlUq9LhONmUjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oA\nA7CXDpO8Wqj2LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY\n+gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kSk5Nrp+gvU5LE\nYFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl7uxMMne0nxrpS10gxdr9HIcW\nxkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygmbtmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQ\ngj9sAq+uEjonljYE1x2igGOpm/HlurR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbW\naQbLU8uz/mtBzUF+fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoV\nYh63n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE76KlXIx3\nKadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H9jVlpNMKVv/1F2Rs76gi\nJUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT4PsJYGw=\n-----END CERTIFICATE-----\n\nAmazon Root CA 3\n================\n-----BEGIN CERTIFICATE-----\nMIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5MQswCQYDVQQG\nEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAzMB4XDTE1MDUy\nNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ\nMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZB\nf8ANm+gBG1bG8lKlui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjr\nZt6jQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSrttvXBp43\nrDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkrBqWTrBqYaGFy+uGh0Psc\neGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteMYyRIHN8wfdVoOw==\n-----END CERTIFICATE-----\n\nAmazon Root CA 4\n================\n-----BEGIN CERTIFICATE-----\nMIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5MQswCQYDVQQG\nEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSA0MB4XDTE1MDUy\nNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ\nMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN\n/sGKe0uoe0ZLY7Bi9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri\n83BkM6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV\nHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WBMAoGCCqGSM49BAMDA2gA\nMGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlwCkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1\nAE47xDqUEpHJWEadIRNyp4iciuRMStuW1KyLa2tJElMzrdfkviT8tQp21KW8EA==\n-----END CERTIFICATE-----\n\nTUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1\n=============================================\n-----BEGIN CERTIFICATE-----\nMIIEYzCCA0ugAwIBAgIBATANBgkqhkiG9w0BAQsFADCB0jELMAkGA1UEBhMCVFIxGDAWBgNVBAcT\nD0dlYnplIC0gS29jYWVsaTFCMEAGA1UEChM5VHVya2l5ZSBCaWxpbXNlbCB2ZSBUZWtub2xvamlr\nIEFyYXN0aXJtYSBLdXJ1bXUgLSBUVUJJVEFLMS0wKwYDVQQLEyRLYW11IFNlcnRpZmlrYXN5b24g\nTWVya2V6aSAtIEthbXUgU00xNjA0BgNVBAMTLVRVQklUQUsgS2FtdSBTTSBTU0wgS29rIFNlcnRp\nZmlrYXNpIC0gU3VydW0gMTAeFw0xMzExMjUwODI1NTVaFw00MzEwMjUwODI1NTVaMIHSMQswCQYD\nVQQGEwJUUjEYMBYGA1UEBxMPR2ViemUgLSBLb2NhZWxpMUIwQAYDVQQKEzlUdXJraXllIEJpbGlt\nc2VsIHZlIFRla25vbG9qaWsgQXJhc3Rpcm1hIEt1cnVtdSAtIFRVQklUQUsxLTArBgNVBAsTJEth\nbXUgU2VydGlmaWthc3lvbiBNZXJrZXppIC0gS2FtdSBTTTE2MDQGA1UEAxMtVFVCSVRBSyBLYW11\nIFNNIFNTTCBLb2sgU2VydGlmaWthc2kgLSBTdXJ1bSAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A\nMIIBCgKCAQEAr3UwM6q7a9OZLBI3hNmNe5eA027n/5tQlT6QlVZC1xl8JoSNkvoBHToP4mQ4t4y8\n6Ij5iySrLqP1N+RAjhgleYN1Hzv/bKjFxlb4tO2KRKOrbEz8HdDc72i9z+SqzvBV96I01INrN3wc\nwv61A+xXzry0tcXtAA9TNypN9E8Mg/uGz8v+jE69h/mniyFXnHrfA2eJLJ2XYacQuFWQfw4tJzh0\n3+f92k4S400VIgLI4OD8D62K18lUUMw7D8oWgITQUVbDjlZ/iSIzL+aFCr2lqBs23tPcLG07xxO9\nWSMs5uWk99gL7eqQQESolbuT1dCANLZGeA4fAJNG4e7p+exPFwIDAQABo0IwQDAdBgNVHQ4EFgQU\nZT/HiobGPN08VFw1+DrtUgxHV8gwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJ\nKoZIhvcNAQELBQADggEBACo/4fEyjq7hmFxLXs9rHmoJ0iKpEsdeV31zVmSAhHqT5Am5EM2fKifh\nAHe+SMg1qIGf5LgsyX8OsNJLN13qudULXjS99HMpw+0mFZx+CFOKWI3QSyjfwbPfIPP54+M638yc\nlNhOT8NrF7f3cuitZjO1JVOr4PhMqZ398g26rrnZqsZr+ZO7rqu4lzwDGrpDxpa5RXI4s6ehlj2R\ne37AIVNMh+3yC1SVUZPVIqUNivGTDj5UDrDYyU7c8jEyVupk+eq1nRZmQnLzf9OxMUP8pI4X8W0j\nq5Rm+K37DwhuJi1/FwcJsoz7UMCflo3Ptv0AnVoUmr8CRPXBwp8iXqIPoeM=\n-----END CERTIFICATE-----\n\nGDCA TrustAUTH R5 ROOT\n======================\n-----BEGIN CERTIFICATE-----\nMIIFiDCCA3CgAwIBAgIIfQmX/vBH6nowDQYJKoZIhvcNAQELBQAwYjELMAkGA1UEBhMCQ04xMjAw\nBgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZIENPLixMVEQuMR8wHQYDVQQD\nDBZHRENBIFRydXN0QVVUSCBSNSBST09UMB4XDTE0MTEyNjA1MTMxNVoXDTQwMTIzMTE1NTk1OVow\nYjELMAkGA1UEBhMCQ04xMjAwBgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZ\nIENPLixMVEQuMR8wHQYDVQQDDBZHRENBIFRydXN0QVVUSCBSNSBST09UMIICIjANBgkqhkiG9w0B\nAQEFAAOCAg8AMIICCgKCAgEA2aMW8Mh0dHeb7zMNOwZ+Vfy1YI92hhJCfVZmPoiC7XJjDp6L3TQs\nAlFRwxn9WVSEyfFrs0yw6ehGXTjGoqcuEVe6ghWinI9tsJlKCvLriXBjTnnEt1u9ol2x8kECK62p\nOqPseQrsXzrj/e+APK00mxqriCZ7VqKChh/rNYmDf1+uKU49tm7srsHwJ5uu4/Ts765/94Y9cnrr\npftZTqfrlYwiOXnhLQiPzLyRuEH3FMEjqcOtmkVEs7LXLM3GKeJQEK5cy4KOFxg2fZfmiJqwTTQJ\n9Cy5WmYqsBebnh52nUpmMUHfP/vFBu8btn4aRjb3ZGM74zkYI+dndRTVdVeSN72+ahsmUPI2JgaQ\nxXABZG12ZuGR224HwGGALrIuL4xwp9E7PLOR5G62xDtw8mySlwnNR30YwPO7ng/Wi64HtloPzgsM\nR6flPri9fcebNaBhlzpBdRfMK5Z3KpIhHtmVdiBnaM8Nvd/WHwlqmuLMc3GkL30SgLdTMEZeS1SZ\nD2fJpcjyIMGC7J0R38IC+xo70e0gmu9lZJIQDSri3nDxGGeCjGHeuLzRL5z7D9Ar7Rt2ueQ5Vfj4\noR24qoAATILnsn8JuLwwoC8N9VKejveSswoAHQBUlwbgsQfZxw9cZX08bVlX5O2ljelAU58VS6Bx\n9hoh49pwBiFYFIeFd3mqgnkCAwEAAaNCMEAwHQYDVR0OBBYEFOLJQJ9NzuiaoXzPDj9lxSmIahlR\nMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQDRSVfg\np8xoWLoBDysZzY2wYUWsEe1jUGn4H3++Fo/9nesLqjJHdtJnJO29fDMylyrHBYZmDRd9FBUb1Ov9\nH5r2XpdptxolpAqzkT9fNqyL7FeoPueBihhXOYV0GkLH6VsTX4/5COmSdI31R9KrO9b7eGZONn35\n6ZLpBN79SWP8bfsUcZNnL0dKt7n/HipzcEYwv1ryL3ml4Y0M2fmyYzeMN2WFcGpcWwlyua1jPLHd\n+PwyvzeG5LuOmCd+uh8W4XAR8gPfJWIyJyYYMoSf/wA6E7qaTfRPuBRwIrHKK5DOKcFw9C+df/KQ\nHtZa37dG/OaG+svgIHZ6uqbL9XzeYqWxi+7egmaKTjowHz+Ay60nugxe19CxVsp3cbK1daFQqUBD\nF8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ\n8s1uV9JiDnxXk7Gnbc2dg7sq5+W2O3FYrf3RRbxake5TFW/TRQl1brqQXR4EzzffHqhmsYzmIGrv\n/EhOdJhCrylvLmrH+33RZjEizIYAfmaDDEL0vTSSwxrqT8p+ck0LcIymSLumoRT2+1hEmRSuqguT\naaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g==\n-----END CERTIFICATE-----\n\nSSL.com Root Certification Authority RSA\n========================================\n-----BEGIN CERTIFICATE-----\nMIIF3TCCA8WgAwIBAgIIeyyb0xaAMpkwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxDjAM\nBgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24x\nMTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBSU0EwHhcNMTYw\nMjEyMTczOTM5WhcNNDEwMjEyMTczOTM5WjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx\nEDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NM\nLmNvbSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFJTQTCCAiIwDQYJKoZIhvcNAQEBBQAD\nggIPADCCAgoCggIBAPkP3aMrfcvQKv7sZ4Wm5y4bunfh4/WvpOz6Sl2RxFdHaxh3a3by/ZPkPQ/C\nFp4LZsNWlJ4Xg4XOVu/yFv0AYvUiCVToZRdOQbngT0aXqhvIuG5iXmmxX9sqAn78bMrzQdjt0Oj8\nP2FI7bADFB0QDksZ4LtO7IZl/zbzXmcCC52GVWH9ejjt/uIZALdvoVBidXQ8oPrIJZK0bnoix/ge\noeOy3ZExqysdBP+lSgQ36YWkMyv94tZVNHwZpEpox7Ko07fKoZOI68GXvIz5HdkihCR0xwQ9aqkp\nk8zruFvh/l8lqjRYyMEjVJ0bmBHDOJx+PYZspQ9AhnwC9FwCTyjLrnGfDzrIM/4RJTXq/LrFYD3Z\nfBjVsqnTdXgDciLKOsMf7yzlLqn6niy2UUb9rwPW6mBo6oUWNmuF6R7As93EJNyAKoFBbZQ+yODJ\ngUEAnl6/f8UImKIYLEJAs/lvOCdLToD0PYFH4Ih86hzOtXVcUS4cK38acijnALXRdMbX5J+tB5O2\nUzU1/Dfkw/ZdFr4hc96SCvigY2q8lpJqPvi8ZVWb3vUNiSYE/CUapiVpy8JtynziWV+XrOvvLsi8\n1xtZPCvM8hnIk2snYxnP/Okm+Mpxm3+T/jRnhE6Z6/yzeAkzcLpmpnbtG3PrGqUNxCITIJRWCk4s\nbE6x/c+cCbqiM+2HAgMBAAGjYzBhMB0GA1UdDgQWBBTdBAkHovV6fVJTEpKV7jiAJQ2mWTAPBgNV\nHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFN0ECQei9Xp9UlMSkpXuOIAlDaZZMA4GA1UdDwEB/wQE\nAwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAIBgRlCn7Jp0cHh5wYfGVcpNxJK1ok1iOMq8bs3AD/CUr\ndIWQPXhq9LmLpZc7tRiRux6n+UBbkflVma8eEdBcHadm47GUBwwyOabqG7B52B2ccETjit3E+ZUf\nijhDPwGFpUenPUayvOUiaPd7nNgsPgohyC0zrL/FgZkxdMF1ccW+sfAjRfSda/wZY52jvATGGAsl\nu1OJD7OAUN5F7kR/q5R4ZJjT9ijdh9hwZXT7DrkT66cPYakylszeu+1jTBi7qUD3oFRuIIhxdRjq\nerQ0cuAjJ3dctpDqhiVAq+8zD8ufgr6iIPv2tS0a5sKFsXQP+8hlAqRSAUfdSSLBv9jra6x+3uxj\nMxW3IwiPxg+NQVrdjsW5j+VFP3jbutIbQLH+cU0/4IGiul607BXgk90IH37hVZkLId6Tngr75qNJ\nvTYw/ud3sqB1l7UtgYgXZSD32pAAn8lSzDLKNXz1PQ/YK9f1JmzJBjSWFupwWRoyeXkLtoh/D1JI\nPb9s2KJELtFOt3JY04kTlf5Eq/jXixtunLwsoFvVagCvXzfh1foQC5ichucmj87w7G6KVwuA406y\nwKBjYZC6VWg3dGq2ktufoYYitmUnDuy2n0Jg5GfCtdpBC8TTi2EbvPofkSvXRAdeuims2cXp71NI\nWuuA8ShYIc2wBlX7Jz9TkHCpBB5XJ7k=\n-----END CERTIFICATE-----\n\nSSL.com Root Certification Authority ECC\n========================================\n-----BEGIN CERTIFICATE-----\nMIICjTCCAhSgAwIBAgIIdebfy8FoW6gwCgYIKoZIzj0EAwIwfDELMAkGA1UEBhMCVVMxDjAMBgNV\nBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xMTAv\nBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYwMjEy\nMTgxNDAzWhcNNDEwMjEyMTgxNDAzWjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAO\nBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNv\nbSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuBBAAiA2IA\nBEVuqVDEpiM2nl8ojRfLliJkP9x6jh3MCLOicSS6jkm5BBtHllirLZXI7Z4INcgn64mMU1jrYor+\n8FsPazFSY0E7ic3s7LaNGdM0B9y7xgZ/wkWV7Mt/qCPgCemB+vNH06NjMGEwHQYDVR0OBBYEFILR\nhXMw5zUE044CkvvlpNHEIejNMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUgtGFczDnNQTT\njgKS++Wk0cQh6M0wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2cAMGQCMG/n61kRpGDPYbCW\ne+0F+S8Tkdzt5fxQaxFGRrMcIQBiu77D5+jNB5n5DQtdcj7EqgIwH7y6C+IwJPt8bYBVCpk+gA0z\n5Wajs6O7pdWLjwkspl1+4vAHCGht0nxpbl/f5Wpl\n-----END CERTIFICATE-----\n\nSSL.com EV Root Certification Authority RSA R2\n==============================================\n-----BEGIN CERTIFICATE-----\nMIIF6zCCA9OgAwIBAgIIVrYpzTS8ePYwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAlVTMQ4w\nDAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9u\nMTcwNQYDVQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIy\nMB4XDTE3MDUzMTE4MTQzN1oXDTQyMDUzMDE4MTQzN1owgYIxCzAJBgNVBAYTAlVTMQ4wDAYDVQQI\nDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMTcwNQYD\nVQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIyMIICIjAN\nBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAjzZlQOHWTcDXtOlG2mvqM0fNTPl9fb69LT3w23jh\nhqXZuglXaO1XPqDQCEGD5yhBJB/jchXQARr7XnAjssufOePPxU7Gkm0mxnu7s9onnQqG6YE3Bf7w\ncXHswxzpY6IXFJ3vG2fThVUCAtZJycxa4bH3bzKfydQ7iEGonL3Lq9ttewkfokxykNorCPzPPFTO\nZw+oz12WGQvE43LrrdF9HSfvkusQv1vrO6/PgN3B0pYEW3p+pKk8OHakYo6gOV7qd89dAFmPZiw+\nB6KjBSYRaZfqhbcPlgtLyEDhULouisv3D5oi53+aNxPN8k0TayHRwMwi8qFG9kRpnMphNQcAb9Zh\nCBHqurj26bNg5U257J8UZslXWNvNh2n4ioYSA0e/ZhN2rHd9NCSFg83XqpyQGp8hLH94t2S42Oim\n9HizVcuE0jLEeK6jj2HdzghTreyI/BXkmg3mnxp3zkyPuBQVPWKchjgGAGYS5Fl2WlPAApiiECto\nRHuOec4zSnaqW4EWG7WK2NAAe15itAnWhmMOpgWVSbooi4iTsjQc2KRVbrcc0N6ZVTsj9CLg+Slm\nJuwgUHfbSguPvuUCYHBBXtSuUDkiFCbLsjtzdFVHB3mBOagwE0TlBIqulhMlQg+5U8Sb/M3kHN48\n+qvWBkofZ6aYMBzdLNvcGJVXZsb/XItW9XcCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNV\nHSMEGDAWgBT5YLvU49U09rj1BoAlp3PbRmmonjAdBgNVHQ4EFgQU+WC71OPVNPa49QaAJadz20Zp\nqJ4wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBWs47LCp1Jjr+kxJG7ZhcFUZh1\n++VQLHqe8RT6q9OKPv+RKY9ji9i0qVQBDb6Thi/5Sm3HXvVX+cpVHBK+Rw82xd9qt9t1wkclf7nx\nY/hoLVUE0fKNsKTPvDxeH3jnpaAgcLAExbf3cqfeIg29MyVGjGSSJuM+LmOW2puMPfgYCdcDzH2G\nguDKBAdRUNf/ktUM79qGn5nX67evaOI5JpS6aLe/g9Pqemc9YmeuJeVy6OLk7K4S9ksrPJ/psEDz\nOFSz/bdoyNrGj1E8svuR3Bznm53htw1yj+KkxKl4+esUrMZDBcJlOSgYAsOCsp0FvmXtll9ldDz7\nCTUue5wT/RsPXcdtgTpWD8w74a8CLyKsRspGPKAcTNZEtF4uXBVmCeEmKf7GUmG6sXP/wwyc5Wxq\nlD8UykAWlYTzWamsX0xhk23RO8yilQwipmdnRC652dKKQbNmC1r7fSOl8hqw/96bg5Qu0T/fkreR\nrwU7ZcegbLHNYhLDkBvjJc40vG93drEQw/cFGsDWr3RiSBd3kmmQYRzelYB0VI8YHMPzA9C/pEN1\nhlMYegouCRw2n5H9gooiS9EOUCXdywMMF8mDAAhONU2Ki+3wApRmLER/y5UnlhetCTCstnEXbosX\n9hwJ1C07mKVx01QT2WDz9UtmT/rx7iASjbSsV7FFY6GsdqnC+w==\n-----END CERTIFICATE-----\n\nSSL.com EV Root Certification Authority ECC\n===========================================\n-----BEGIN CERTIFICATE-----\nMIIClDCCAhqgAwIBAgIILCmcWxbtBZUwCgYIKoZIzj0EAwIwfzELMAkGA1UEBhMCVVMxDjAMBgNV\nBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xNDAy\nBgNVBAMMK1NTTC5jb20gRVYgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYw\nMjEyMTgxNTIzWhcNNDEwMjEyMTgxNTIzWjB/MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx\nEDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjE0MDIGA1UEAwwrU1NM\nLmNvbSBFViBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuB\nBAAiA2IABKoSR5CYG/vvw0AHgyBO8TCCogbR8pKGYfL2IWjKAMTH6kMAVIbc/R/fALhBYlzccBYy\n3h+Z1MzFB8gIH2EWB1E9fVwHU+M1OIzfzZ/ZLg1KthkuWnBaBu2+8KGwytAJKaNjMGEwHQYDVR0O\nBBYEFFvKXuXe0oGqzagtZFG22XKbl+ZPMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUW8pe\n5d7SgarNqC1kUbbZcpuX5k8wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2gAMGUCMQCK5kCJ\nN+vp1RPZytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZgh5Mm\nm7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg==\n-----END CERTIFICATE-----\n\nGlobalSign Root CA - R6\n=======================\n-----BEGIN CERTIFICATE-----\nMIIFgzCCA2ugAwIBAgIORea7A4Mzw4VlSOb/RVEwDQYJKoZIhvcNAQEMBQAwTDEgMB4GA1UECxMX\nR2xvYmFsU2lnbiBSb290IENBIC0gUjYxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds\nb2JhbFNpZ24wHhcNMTQxMjEwMDAwMDAwWhcNMzQxMjEwMDAwMDAwWjBMMSAwHgYDVQQLExdHbG9i\nYWxTaWduIFJvb3QgQ0EgLSBSNjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFs\nU2lnbjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJUH6HPKZvnsFMp7PPcNCPG0RQss\ngrRIxutbPK6DuEGSMxSkb3/pKszGsIhrxbaJ0cay/xTOURQh7ErdG1rG1ofuTToVBu1kZguSgMpE\n3nOUTvOniX9PeGMIyBJQbUJmL025eShNUhqKGoC3GYEOfsSKvGRMIRxDaNc9PIrFsmbVkJq3MQbF\nvuJtMgamHvm566qjuL++gmNQ0PAYid/kD3n16qIfKtJwLnvnvJO7bVPiSHyMEAc4/2ayd2F+4OqM\nPKq0pPbzlUoSB239jLKJz9CgYXfIWHSw1CM69106yqLbnQneXUQtkPGBzVeS+n68UARjNN9rkxi+\nazayOeSsJDa38O+2HBNXk7besvjihbdzorg1qkXy4J02oW9UivFyVm4uiMVRQkQVlO6jxTiWm05O\nWgtH8wY2SXcwvHE35absIQh1/OZhFj931dmRl4QKbNQCTXTAFO39OfuD8l4UoQSwC+n+7o/hbguy\nCLNhZglqsQY6ZZZZwPA1/cnaKI0aEYdwgQqomnUdnjqGBQCe24DWJfncBZ4nWUx2OVvq+aWh2IMP\n0f/fMBH5hc8zSPXKbWQULHpYT9NLCEnFlWQaYw55PfWzjMpYrZxCRXluDocZXFSxZba/jJvcE+kN\nb7gu3GduyYsRtYQUigAZcIN5kZeR1BonvzceMgfYFGM8KEyvAgMBAAGjYzBhMA4GA1UdDwEB/wQE\nAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSubAWjkxPioufi1xzWx/B/yGdToDAfBgNV\nHSMEGDAWgBSubAWjkxPioufi1xzWx/B/yGdToDANBgkqhkiG9w0BAQwFAAOCAgEAgyXt6NH9lVLN\nnsAEoJFp5lzQhN7craJP6Ed41mWYqVuoPId8AorRbrcWc+ZfwFSY1XS+wc3iEZGtIxg93eFyRJa0\nlV7Ae46ZeBZDE1ZXs6KzO7V33EByrKPrmzU+sQghoefEQzd5Mr6155wsTLxDKZmOMNOsIeDjHfrY\nBzN2VAAiKrlNIC5waNrlU/yDXNOd8v9EDERm8tLjvUYAGm0CuiVdjaExUd1URhxN25mW7xocBFym\nFe944Hn+Xds+qkxV/ZoVqW/hpvvfcDDpw+5CRu3CkwWJ+n1jez/QcYF8AOiYrg54NMMl+68KnyBr\n3TsTjxKM4kEaSHpzoHdpx7Zcf4LIHv5YGygrqGytXm3ABdJ7t+uA/iU3/gKbaKxCXcPu9czc8FB1\n0jZpnOZ7BN9uBmm23goJSFmH63sUYHpkqmlD75HHTOwY3WzvUy2MmeFe8nI+z1TIvWfspA9MRf/T\nuTAjB0yPEL+GltmZWrSZVxykzLsViVO6LAUP5MSeGbEYNNVMnbrt9x+vJJUEeKgDu+6B5dpffItK\noZB0JaezPkvILFa9x8jvOOJckvB595yEunQtYQEgfn7R8k8HWV+LLUNS60YMlOH1Zkd5d9VUWx+t\nJDfLRVpOoERIyNiwmcUVhAn21klJwGW45hpxbqCo8YLoRT5s1gLXCmeDBVrJpBA=\n-----END CERTIFICATE-----\n\nOISTE WISeKey Global Root GC CA\n===============================\n-----BEGIN CERTIFICATE-----\nMIICaTCCAe+gAwIBAgIQISpWDK7aDKtARb8roi066jAKBggqhkjOPQQDAzBtMQswCQYDVQQGEwJD\nSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEo\nMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQyBDQTAeFw0xNzA1MDkwOTQ4MzRa\nFw00MjA1MDkwOTU4MzNaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYDVQQL\nExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2Jh\nbCBSb290IEdDIENBMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAETOlQwMYPchi82PG6s4nieUqjFqdr\nVCTbUf/q9Akkwwsin8tqJ4KBDdLArzHkdIJuyiXZjHWd8dvQmqJLIX4Wp2OQ0jnUsYd4XxiWD1Ab\nNTcPasbc2RNNpI6QN+a9WzGRo1QwUjAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd\nBgNVHQ4EFgQUSIcUrOPDnpBgOtfKie7TrYy0UGYwEAYJKwYBBAGCNxUBBAMCAQAwCgYIKoZIzj0E\nAwMDaAAwZQIwJsdpW9zV57LnyAyMjMPdeYwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtk\nAjEA2zQgMgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9\n-----END CERTIFICATE-----\n\nUCA Global G2 Root\n==================\n-----BEGIN CERTIFICATE-----\nMIIFRjCCAy6gAwIBAgIQXd+x2lqj7V2+WmUgZQOQ7zANBgkqhkiG9w0BAQsFADA9MQswCQYDVQQG\nEwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxGzAZBgNVBAMMElVDQSBHbG9iYWwgRzIgUm9vdDAeFw0x\nNjAzMTEwMDAwMDBaFw00MDEyMzEwMDAwMDBaMD0xCzAJBgNVBAYTAkNOMREwDwYDVQQKDAhVbmlU\ncnVzdDEbMBkGA1UEAwwSVUNBIEdsb2JhbCBHMiBSb290MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A\nMIICCgKCAgEAxeYrb3zvJgUno4Ek2m/LAfmZmqkywiKHYUGRO8vDaBsGxUypK8FnFyIdK+35KYmT\noni9kmugow2ifsqTs6bRjDXVdfkX9s9FxeV67HeToI8jrg4aA3++1NDtLnurRiNb/yzmVHqUwCoV\n8MmNsHo7JOHXaOIxPAYzRrZUEaalLyJUKlgNAQLx+hVRZ2zA+te2G3/RVogvGjqNO7uCEeBHANBS\nh6v7hn4PJGtAnTRnvI3HLYZveT6OqTwXS3+wmeOwcWDcC/Vkw85DvG1xudLeJ1uK6NjGruFZfc8o\nLTW4lVYa8bJYS7cSN8h8s+1LgOGN+jIjtm+3SJUIsUROhYw6AlQgL9+/V087OpAh18EmNVQg7Mc/\nR+zvWr9LesGtOxdQXGLYD0tK3Cv6brxzks3sx1DoQZbXqX5t2Okdj4q1uViSukqSKwxW/YDrCPBe\nKW4bHAyvj5OJrdu9o54hyokZ7N+1wxrrFv54NkzWbtA+FxyQF2smuvt6L78RHBgOLXMDj6DlNaBa\n4kx1HXHhOThTeEDMg5PXCp6dW4+K5OXgSORIskfNTip1KnvyIvbJvgmRlld6iIis7nCs+dwp4wwc\nOxJORNanTrAmyPPZGpeRaOrvjUYG0lZFWJo8DA+DuAUlwznPO6Q0ibd5Ei9Hxeepl2n8pndntd97\n8XplFeRhVmUCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O\nBBYEFIHEjMz15DD/pQwIX4wVZyF0Ad/fMA0GCSqGSIb3DQEBCwUAA4ICAQATZSL1jiutROTL/7lo\n5sOASD0Ee/ojL3rtNtqyzm325p7lX1iPyzcyochltq44PTUbPrw7tgTQvPlJ9Zv3hcU2tsu8+Mg5\n1eRfB70VVJd0ysrtT7q6ZHafgbiERUlMjW+i67HM0cOU2kTC5uLqGOiiHycFutfl1qnN3e92mI0A\nDs0b+gO3joBYDic/UvuUospeZcnWhNq5NXHzJsBPd+aBJ9J3O5oUb3n09tDh05S60FdRvScFDcH9\nyBIw7m+NESsIndTUv4BFFJqIRNow6rSn4+7vW4LVPtateJLbXDzz2K36uGt/xDYotgIVilQsnLAX\nc47QN6MUPJiVAAwpBVueSUmxX8fjy88nZY41F7dXyDDZQVu5FLbowg+UMaeUmMxq67XhJ/UQqAHo\njhJi6IjMtX9Gl8CbEGY4GjZGXyJoPd/JxhMnq1MGrKI8hgZlb7F+sSlEmqO6SWkoaY/X5V+tBIZk\nbxqgDMUIYs6Ao9Dz7GjevjPHF1t/gMRMTLGmhIrDO7gJzRSBuhjjVFc2/tsvfEehOjPI+Vg7RE+x\nygKJBJYoaMVLuCaJu9YzL1DV/pqJuhgyklTGW+Cd+V7lDSKb9triyCGyYiGqhkCyLmTTX8jjfhFn\nRR8F/uOi77Oos/N9j/gMHyIfLXC0uAE0djAA5SN4p1bXUB+K+wb1whnw0A==\n-----END CERTIFICATE-----\n\nUCA Extended Validation Root\n============================\n-----BEGIN CERTIFICATE-----\nMIIFWjCCA0KgAwIBAgIQT9Irj/VkyDOeTzRYZiNwYDANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQG\nEwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9u\nIFJvb3QwHhcNMTUwMzEzMDAwMDAwWhcNMzgxMjMxMDAwMDAwWjBHMQswCQYDVQQGEwJDTjERMA8G\nA1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9uIFJvb3QwggIi\nMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCpCQcoEwKwmeBkqh5DFnpzsZGgdT6o+uM4AHrs\niWogD4vFsJszA1qGxliG1cGFu0/GnEBNyr7uaZa4rYEwmnySBesFK5pI0Lh2PpbIILvSsPGP2KxF\nRv+qZ2C0d35qHzwaUnoEPQc8hQ2E0B92CvdqFN9y4zR8V05WAT558aopO2z6+I9tTcg1367r3CTu\neUWnhbYFiN6IXSV8l2RnCdm/WhUFhvMJHuxYMjMR83dksHYf5BA1FxvyDrFspCqjc/wJHx4yGVMR\n59mzLC52LqGj3n5qiAno8geK+LLNEOfic0CTuwjRP+H8C5SzJe98ptfRr5//lpr1kXuYC3fUfugH\n0mK1lTnj8/FtDw5lhIpjVMWAtuCeS31HJqcBCF3RiJ7XwzJE+oJKCmhUfzhTA8ykADNkUVkLo4KR\nel7sFsLzKuZi2irbWWIQJUoqgQtHB0MGcIfS+pMRKXpITeuUx3BNr2fVUbGAIAEBtHoIppB/TuDv\nB0GHr2qlXov7z1CymlSvw4m6WC31MJixNnI5fkkE/SmnTHnkBVfblLkWU41Gsx2VYVdWf6/wFlth\nWG82UBEL2KwrlRYaDh8IzTY0ZRBiZtWAXxQgXy0MoHgKaNYs1+lvK9JKBZP8nm9rZ/+I8U6laUpS\nNwXqxhaN0sSZ0YIrO7o1dfdRUVjzyAfd5LQDfwIDAQABo0IwQDAdBgNVHQ4EFgQU2XQ65DA9DfcS\n3H5aBZ8eNJr34RQwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQEL\nBQADggIBADaNl8xCFWQpN5smLNb7rhVpLGsaGvdftvkHTFnq88nIua7Mui563MD1sC3AO6+fcAUR\nap8lTwEpcOPlDOHqWnzcSbvBHiqB9RZLcpHIojG5qtr8nR/zXUACE/xOHAbKsxSQVBcZEhrxH9cM\naVr2cXj0lH2RC47skFSOvG+hTKv8dGT9cZr4QQehzZHkPJrgmzI5c6sq1WnIeJEmMX3ixzDx/BR4\ndxIOE/TdFpS/S2d7cFOFyrC78zhNLJA5wA3CXWvp4uXViI3WLL+rG761KIcSF3Ru/H38j9CHJrAb\n+7lsq+KePRXBOy5nAliRn+/4Qh8st2j1da3Ptfb/EX3C8CSlrdP6oDyp+l3cpaDvRKS+1ujl5BOW\nF3sGPjLtx7dCvHaj2GU4Kzg1USEODm8uNBNA4StnDG1KQTAYI1oyVZnJF+A83vbsea0rWBmirSwi\nGpWOvpaQXUJXxPkUAzUrHC1RVwinOt4/5Mi0A3PCwSaAuwtCH60NryZy2sy+s6ODWA2CxR9GUeOc\nGMyNm43sSet1UNWMKFnKdDTajAshqx7qG+XH/RU+wBeq+yNuJkbL+vmxcmtpzyKEC2IPrNkZAJSi\ndjzULZrtBJ4tBmIQN1IchXIbJ+XMxjHsN+xjWZsLHXbMfjKaiJUINlK73nZfdklJrX+9ZSCyycEr\ndhh2n1ax\n-----END CERTIFICATE-----\n\nCertigna Root CA\n================\n-----BEGIN CERTIFICATE-----\nMIIGWzCCBEOgAwIBAgIRAMrpG4nxVQMNo+ZBbcTjpuEwDQYJKoZIhvcNAQELBQAwWjELMAkGA1UE\nBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczEcMBoGA1UECwwTMDAwMiA0ODE0NjMwODEwMDAzNjEZ\nMBcGA1UEAwwQQ2VydGlnbmEgUm9vdCBDQTAeFw0xMzEwMDEwODMyMjdaFw0zMzEwMDEwODMyMjda\nMFoxCzAJBgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxHDAaBgNVBAsMEzAwMDIgNDgxNDYz\nMDgxMDAwMzYxGTAXBgNVBAMMEENlcnRpZ25hIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4IC\nDwAwggIKAoICAQDNGDllGlmx6mQWDoyUJJV8g9PFOSbcDO8WV43X2KyjQn+Cyu3NW9sOty3tRQgX\nstmzy9YXUnIo245Onoq2C/mehJpNdt4iKVzSs9IGPjA5qXSjklYcoW9MCiBtnyN6tMbaLOQdLNyz\nKNAT8kxOAkmhVECe5uUFoC2EyP+YbNDrihqECB63aCPuI9Vwzm1RaRDuoXrC0SIxwoKF0vJVdlB8\nJXrJhFwLrN1CTivngqIkicuQstDuI7pmTLtipPlTWmR7fJj6o0ieD5Wupxj0auwuA0Wv8HT4Ks16\nXdG+RCYyKfHx9WzMfgIhC59vpD++nVPiz32pLHxYGpfhPTc3GGYo0kDFUYqMwy3OU4gkWGQwFsWq\n4NYKpkDfePb1BHxpE4S80dGnBs8B92jAqFe7OmGtBIyT46388NtEbVncSVmurJqZNjBBe3YzIoej\nwpKGbvlw7q6Hh5UbxHq9MfPU0uWZ/75I7HX1eBYdpnDBfzwboZL7z8g81sWTCo/1VTp2lc5ZmIoJ\nlXcymoO6LAQ6l73UL77XbJuiyn1tJslV1c/DeVIICZkHJC1kJWumIWmbat10TWuXekG9qxf5kBdI\njzb5LdXF2+6qhUVB+s06RbFo5jZMm5BX7CO5hwjCxAnxl4YqKE3idMDaxIzb3+KhF1nOJFl0Mdp/\n/TBt2dzhauH8XwIDAQABo4IBGjCCARYwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw\nHQYDVR0OBBYEFBiHVuBud+4kNTxOc5of1uHieX4rMB8GA1UdIwQYMBaAFBiHVuBud+4kNTxOc5of\n1uHieX4rMEQGA1UdIAQ9MDswOQYEVR0gADAxMC8GCCsGAQUFBwIBFiNodHRwczovL3d3d3cuY2Vy\ndGlnbmEuZnIvYXV0b3JpdGVzLzBtBgNVHR8EZjBkMC+gLaArhilodHRwOi8vY3JsLmNlcnRpZ25h\nLmZyL2NlcnRpZ25hcm9vdGNhLmNybDAxoC+gLYYraHR0cDovL2NybC5kaGlteW90aXMuY29tL2Nl\ncnRpZ25hcm9vdGNhLmNybDANBgkqhkiG9w0BAQsFAAOCAgEAlLieT/DjlQgi581oQfccVdV8AOIt\nOoldaDgvUSILSo3L6btdPrtcPbEo/uRTVRPPoZAbAh1fZkYJMyjhDSSXcNMQH+pkV5a7XdrnxIxP\nTGRGHVyH41neQtGbqH6mid2PHMkwgu07nM3A6RngatgCdTer9zQoKJHyBApPNeNgJgH60BGM+RFq\n7q89w1DTj18zeTyGqHNFkIwgtnJzFyO+B2XleJINugHA64wcZr+shncBlA2c5uk5jR+mUYyZDDl3\n4bSb+hxnV29qao6pK0xXeXpXIs/NX2NGjVxZOob4Mkdio2cNGJHc+6Zr9UhhcyNZjgKnvETq9Emd\n8VRY+WCv2hikLyhF3HqgiIZd8zvn/yk1gPxkQ5Tm4xxvvq0OKmOZK8l+hfZx6AYDlf7ej0gcWtSS\n6Cvu5zHbugRqh5jnxV/vfaci9wHYTfmJ0A6aBVmknpjZbyvKcL5kwlWj9Omvw5Ip3IgWJJk8jSaY\ntlu3zM63Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayhjWZS\naX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw3kAP+HwV96LOPNde\nE4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0=\n-----END CERTIFICATE-----\n\nemSign Root CA - G1\n===================\n-----BEGIN CERTIFICATE-----\nMIIDlDCCAnygAwIBAgIKMfXkYgxsWO3W2DANBgkqhkiG9w0BAQsFADBnMQswCQYDVQQGEwJJTjET\nMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRl\nZDEcMBoGA1UEAxMTZW1TaWduIFJvb3QgQ0EgLSBHMTAeFw0xODAyMTgxODMwMDBaFw00MzAyMTgx\nODMwMDBaMGcxCzAJBgNVBAYTAklOMRMwEQYDVQQLEwplbVNpZ24gUEtJMSUwIwYDVQQKExxlTXVk\naHJhIFRlY2hub2xvZ2llcyBMaW1pdGVkMRwwGgYDVQQDExNlbVNpZ24gUm9vdCBDQSAtIEcxMIIB\nIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0u76WaK7p1b1TST0Bsew+eeuGQzf2N4aLTN\nLnF115sgxk0pvLZoYIr3IZpWNVrzdr3YzZr/k1ZLpVkGoZM0Kd0WNHVO8oG0x5ZOrRkVUkr+PHB1\ncM2vK6sVmjM8qrOLqs1D/fXqcP/tzxE7lM5OMhbTI0Aqd7OvPAEsbO2ZLIvZTmmYsvePQbAyeGHW\nDV/D+qJAkh1cF+ZwPjXnorfCYuKrpDhMtTk1b+oDafo6VGiFbdbyL0NVHpENDtjVaqSW0RM8LHhQ\n6DqS0hdW5TUaQBw+jSztOd9C4INBdN+jzcKGYEho42kLVACL5HZpIQ15TjQIXhTCzLG3rdd8cIrH\nhQIDAQABo0IwQDAdBgNVHQ4EFgQU++8Nhp6w492pufEhF38+/PB3KxowDgYDVR0PAQH/BAQDAgEG\nMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFn/8oz1h31xPaOfG1vR2vjTnGs2\nvZupYeveFix0PZ7mddrXuqe8QhfnPZHr5X3dPpzxz5KsbEjMwiI/aTvFthUvozXGaCocV685743Q\nNcMYDHsAVhzNixl03r4PEuDQqqE/AjSxcM6dGNYIAwlG7mDgfrbESQRRfXBgvKqy/3lyeqYdPV8q\n+Mri/Tm3R7nrft8EI6/6nAYH6ftjk4BAtcZsCjEozgyfz7MjNYBBjWzEN3uBL4ChQEKF6dk4jeih\nU80Bv2noWgbyRQuQ+q7hv53yrlc8pa6yVvSLZUDp/TGBLPQ5Cdjua6e0ph0VpZj3AYHYhX3zUVxx\niN66zB+Afko=\n-----END CERTIFICATE-----\n\nemSign ECC Root CA - G3\n=======================\n-----BEGIN CERTIFICATE-----\nMIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQGEwJJTjETMBEG\nA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEg\nMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4\nMTgzMDAwWjBrMQswCQYDVQQGEwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11\nZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g\nRzMwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0WXTsuwYc\n58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xySfvalY8L1X44uT6EYGQIr\nMgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuBzhccLikenEhjQjAOBgNVHQ8BAf8EBAMC\nAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+D\nCBeQyh+KTOgNG3qxrdWBCUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7\njHvrZQnD+JbNR6iC8hZVdyR+EhCVBCyj\n-----END CERTIFICATE-----\n\nemSign Root CA - C1\n===================\n-----BEGIN CERTIFICATE-----\nMIIDczCCAlugAwIBAgILAK7PALrEzzL4Q7IwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMx\nEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQDExNlbVNp\nZ24gUm9vdCBDQSAtIEMxMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowVjELMAkGA1UE\nBhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQD\nExNlbVNpZ24gUm9vdCBDQSAtIEMxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz+up\nufGZBczYKCFK83M0UYRWEPWgTywS4/oTmifQz/l5GnRfHXk5/Fv4cI7gklL35CX5VIPZHdPIWoU/\nXse2B+4+wM6ar6xWQio5JXDWv7V7Nq2s9nPczdcdioOl+yuQFTdrHCZH3DspVpNqs8FqOp099cGX\nOFgFixwR4+S0uF2FHYP+eF8LRWgYSKVGczQ7/g/IdrvHGPMF0Ybzhe3nudkyrVWIzqa2kbBPrH4V\nI5b2P/AgNBbeCsbEBEV5f6f9vtKppa+cxSMq9zwhbL2vj07FOrLzNBL834AaSaTUqZX3noleooms\nlMuoaJuvimUnzYnu3Yy1aylwQ6BpC+S5DwIDAQABo0IwQDAdBgNVHQ4EFgQU/qHgcB4qAzlSWkK+\nXJGFehiqTbUwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQAD\nggEBAMJKVvoVIXsoounlHfv4LcQ5lkFMOycsxGwYFYDGrK9HWS8mC+M2sO87/kOXSTKZEhVb3xEp\n/6tT+LvBeA+snFOvV71ojD1pM/CjoCNjO2RnIkSt1XHLVip4kqNPEjE2NuLe/gDEo2APJ62gsIq1\nNnpSob0n9CAnYuhNlCQT5AoE6TyrLshDCUrGYQTlSTR+08TI9Q/Aqum6VF7zYytPT1DU/rl7mYw9\nwC68AivTxEDkigcxHpvOJpkT+xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQ\nBmIMMMAVSKeoWXzhriKi4gp6D/piq1JM4fHfyr6DDUI=\n-----END CERTIFICATE-----\n\nemSign ECC Root CA - C3\n=======================\n-----BEGIN CERTIFICATE-----\nMIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQGEwJVUzETMBEG\nA1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMxIDAeBgNVBAMTF2VtU2lnbiBF\nQ0MgUm9vdCBDQSAtIEMzMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowWjELMAkGA1UE\nBhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMSAwHgYDVQQD\nExdlbVNpZ24gRUNDIFJvb3QgQ0EgLSBDMzB2MBAGByqGSM49AgEGBSuBBAAiA2IABP2lYa57JhAd\n6bciMK4G9IGzsUJxlTm801Ljr6/58pc1kjZGDoeVjbk5Wum739D+yAdBPLtVb4OjavtisIGJAnB9\nSMVK4+kiVCJNk7tCDK93nCOmfddhEc5lx/h//vXyqaNCMEAwHQYDVR0OBBYEFPtaSNCAIEDyqOkA\nB2kZd6fmw/TPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMDA2gA\nMGUCMQC02C8Cif22TGK6Q04ThHK1rt0c3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwU\nZOR8loMRnLDRWmFLpg9J0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ==\n-----END CERTIFICATE-----\n\nHongkong Post Root CA 3\n=======================\n-----BEGIN CERTIFICATE-----\nMIIFzzCCA7egAwIBAgIUCBZfikyl7ADJk0DfxMauI7gcWqQwDQYJKoZIhvcNAQELBQAwbzELMAkG\nA1UEBhMCSEsxEjAQBgNVBAgTCUhvbmcgS29uZzESMBAGA1UEBxMJSG9uZyBLb25nMRYwFAYDVQQK\nEw1Ib25na29uZyBQb3N0MSAwHgYDVQQDExdIb25na29uZyBQb3N0IFJvb3QgQ0EgMzAeFw0xNzA2\nMDMwMjI5NDZaFw00MjA2MDMwMjI5NDZaMG8xCzAJBgNVBAYTAkhLMRIwEAYDVQQIEwlIb25nIEtv\nbmcxEjAQBgNVBAcTCUhvbmcgS29uZzEWMBQGA1UEChMNSG9uZ2tvbmcgUG9zdDEgMB4GA1UEAxMX\nSG9uZ2tvbmcgUG9zdCBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz\niNfqzg8gTr7m1gNt7ln8wlffKWihgw4+aMdoWJwcYEuJQwy51BWy7sFOdem1p+/l6TWZ5Mwc50tf\njTMwIDNT2aa71T4Tjukfh0mtUC1Qyhi+AViiE3CWu4mIVoBc+L0sPOFMV4i707mV78vH9toxdCim\n5lSJ9UExyuUmGs2C4HDaOym71QP1mbpV9WTRYA6ziUm4ii8F0oRFKHyPaFASePwLtVPLwpgchKOe\nsL4jpNrcyCse2m5FHomY2vkALgbpDDtw1VAliJnLzXNg99X/NWfFobxeq81KuEXryGgeDQ0URhLj\n0mRiikKYvLTGCAj4/ahMZJx2Ab0vqWwzD9g/KLg8aQFChn5pwckGyuV6RmXpwtZQQS4/t+TtbNe/\nJgERohYpSms0BpDsE9K2+2p20jzt8NYt3eEV7KObLyzJPivkaTv/ciWxNoZbx39ri1UbSsUgYT2u\ny1DhCDq+sI9jQVMwCFk8mB13umOResoQUGC/8Ne8lYePl8X+l2oBlKN8W4UdKjk60FSh0Tlxnf0h\n+bV78OLgAo9uliQlLKAeLKjEiafv7ZkGL7YKTE/bosw3Gq9HhS2KX8Q0NEwA/RiTZxPRN+ZItIsG\nxVd7GYYKecsAyVKvQv83j+GjHno9UKtjBucVtT+2RTeUN7F+8kjDf8V1/peNRY8apxpyKBpADwID\nAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBQXnc0e\ni9Y5K3DTXNSguB+wAPzFYTAdBgNVHQ4EFgQUF53NHovWOStw01zUoLgfsAD8xWEwDQYJKoZIhvcN\nAQELBQADggIBAFbVe27mIgHSQpsY1Q7XZiNc4/6gx5LS6ZStS6LG7BJ8dNVI0lkUmcDrudHr9Egw\nW62nV3OZqdPlt9EuWSRY3GguLmLYauRwCy0gUCCkMpXRAJi70/33MvJJrsZ64Ee+bs7Lo3I6LWld\ny8joRTnU+kLBEUx3XZL7av9YROXrgZ6voJmtvqkBZss4HTzfQx/0TW60uhdG/H39h4F5ag0zD/ov\n+BS5gLNdTaqX4fnkGMX41TiMJjz98iji7lpJiCzfeT2OnpA8vUFKOt1b9pq0zj8lMH8yfaIDlNDc\neqFS3m6TjRgm/VWsvY+b0s+v54Ysyx8Jb6NvqYTUc79NoXQbTiNg8swOqn+knEwlqLJmOzj/2ZQw\n9nKEvmhVEA/GcywWaZMH/rFF7buiVWqw2rVKAiUnhde3t4ZEFolsgCs+l6mc1X5VTMbeRRAc6uk7\nnwNT7u56AQIWeNTowr5GdogTPyK7SBIdUgC0An4hGh6cJfTzPV4e0hz5sy229zdcxsshTrD3mUcY\nhcErulWuBurQB7Lcq9CClnXO0lD+mefPL5/ndtFhKvshuzHQqp9HpLIiyhY6UFfEW0NnxWViA0kB\n60PZ2Pierc+xYw5F9KBaLJstxabArahH9CdMOA0uG0k7UvToiIMrVCjU8jVStDKDYmlkDJGcn5fq\ndBb9HxEGmpv0\n-----END CERTIFICATE-----\n\nEntrust Root Certification Authority - G4\n=========================================\n-----BEGIN CERTIFICATE-----\nMIIGSzCCBDOgAwIBAgIRANm1Q3+vqTkPAAAAAFVlrVgwDQYJKoZIhvcNAQELBQAwgb4xCzAJBgNV\nBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3Qu\nbmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1\ndGhvcml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1\ndGhvcml0eSAtIEc0MB4XDTE1MDUyNzExMTExNloXDTM3MTIyNzExNDExNlowgb4xCzAJBgNVBAYT\nAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0\nL2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhv\ncml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhv\ncml0eSAtIEc0MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsewsQu7i0TD/pZJH4i3D\numSXbcr3DbVZwbPLqGgZ2K+EbTBwXX7zLtJTmeH+H17ZSK9dE43b/2MzTdMAArzE+NEGCJR5WIoV\n3imz/f3ET+iq4qA7ec2/a0My3dl0ELn39GjUu9CH1apLiipvKgS1sqbHoHrmSKvS0VnM1n4j5pds\n8ELl3FFLFUHtSUrJ3hCX1nbB76W1NhSXNdh4IjVS70O92yfbYVaCNNzLiGAMC1rlLAHGVK/XqsEQ\ne9IFWrhAnoanw5CGAlZSCXqc0ieCU0plUmr1POeo8pyvi73TDtTUXm6Hnmo9RR3RXRv06QqsYJn7\nibT/mCzPfB3pAqoEmh643IhuJbNsZvc8kPNXwbMv9W3y+8qh+CmdRouzavbmZwe+LGcKKh9asj5X\nxNMhIWNlUpEbsZmOeX7m640A2Vqq6nPopIICR5b+W45UYaPrL0swsIsjdXJ8ITzI9vF01Bx7owVV\n7rtNOzK+mndmnqxpkCIHH2E6lr7lmk/MBTwoWdPBDFSoWWG9yHJM6Nyfh3+9nEg2XpWjDrk4JFX8\ndWbrAuMINClKxuMrLzOg2qOGpRKX/YAr2hRC45K9PvJdXmd0LhyIRyk0X+IyqJwlN4y6mACXi0mW\nHv0liqzc2thddG5msP9E36EYxr5ILzeUePiVSj9/E15dWf10hkNjc0kCAwEAAaNCMEAwDwYDVR0T\nAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJ84xFYjwznooHFs6FRM5Og6sb9n\nMA0GCSqGSIb3DQEBCwUAA4ICAQAS5UKme4sPDORGpbZgQIeMJX6tuGguW8ZAdjwD+MlZ9POrYs4Q\njbRaZIxowLByQzTSGwv2LFPSypBLhmb8qoMi9IsabyZIrHZ3CL/FmFz0Jomee8O5ZDIBf9PD3Vht\n7LGrhFV0d4QEJ1JrhkzO3bll/9bGXp+aEJlLdWr+aumXIOTkdnrG0CSqkM0gkLpHZPt/B7NTeLUK\nYvJzQ85BK4FqLoUWlFPUa19yIqtRLULVAJyZv967lDtX/Zr1hstWO1uIAeV8KEsD+UmDfLJ/fOPt\njqF/YFOOVZ1QNBIPt5d7bIdKROf1beyAN/BYGW5KaHbwH5Lk6rWS02FREAutp9lfx1/cH6NcjKF+\nm7ee01ZvZl4HliDtC3T7Zk6LERXpgUl+b7DUUH8i119lAg2m9IUe2K4GS0qn0jFmwvjO5QimpAKW\nRGhXxNUzzxkvFMSUHHuk2fCfDrGA4tGeEWSpiBE6doLlYsKA2KSD7ZPvfC+QsDJMlhVoSFLUmQjA\nJOgc47OlIQ6SwJAfzyBfyjs4x7dtOvPmRLgOMWuIjnDrnBdSqEGULoe256YSxXXfW8AKbnuk5F6G\n+TaU33fD6Q3AOfF5u0aOq0NZJ7cguyPpVkAh7DE9ZapD8j3fcEThuk0mEDuYn/PIjhs4ViFqUZPT\nkcpG2om3PVODLAgfi49T3f+sHw==\n-----END CERTIFICATE-----\n\nMicrosoft ECC Root Certificate Authority 2017\n=============================================\n-----BEGIN CERTIFICATE-----\nMIICWTCCAd+gAwIBAgIQZvI9r4fei7FK6gxXMQHC7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV\nUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNyb3NvZnQgRUND\nIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwHhcNMTkxMjE4MjMwNjQ1WhcNNDIwNzE4\nMjMxNjA0WjBlMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYw\nNAYDVQQDEy1NaWNyb3NvZnQgRUNDIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwdjAQ\nBgcqhkjOPQIBBgUrgQQAIgNiAATUvD0CQnVBEyPNgASGAlEvaqiBYgtlzPbKnR5vSmZRogPZnZH6\nthaxjG7efM3beaYvzrvOcS/lpaso7GMEZpn4+vKTEAXhgShC48Zo9OYbhGBKia/teQ87zvH2RPUB\neMCjVDBSMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTIy5lycFIM\n+Oa+sgRXKSrPQhDtNTAQBgkrBgEEAYI3FQEEAwIBADAKBggqhkjOPQQDAwNoADBlAjBY8k3qDPlf\nXu5gKcs68tvWMoQZP3zVL8KxzJOuULsJMsbG7X7JNpQS5GiFBqIb0C8CMQCZ6Ra0DvpWSNSkMBaR\neNtUjGUBiudQZsIxtzm6uBoiB078a1QWIP8rtedMDE2mT3M=\n-----END CERTIFICATE-----\n\nMicrosoft RSA Root Certificate Authority 2017\n=============================================\n-----BEGIN CERTIFICATE-----\nMIIFqDCCA5CgAwIBAgIQHtOXCV/YtLNHcB6qvn9FszANBgkqhkiG9w0BAQwFADBlMQswCQYDVQQG\nEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNyb3NvZnQg\nUlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwHhcNMTkxMjE4MjI1MTIyWhcNNDIw\nNzE4MjMwMDIzWjBlMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9u\nMTYwNAYDVQQDEy1NaWNyb3NvZnQgUlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcw\nggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKW76UM4wplZEWCpW9R2LBifOZNt9GkMml\n7Xhqb0eRaPgnZ1AzHaGm++DlQ6OEAlcBXZxIQIJTELy/xztokLaCLeX0ZdDMbRnMlfl7rEqUrQ7e\nS0MdhweSE5CAg2Q1OQT85elss7YfUJQ4ZVBcF0a5toW1HLUX6NZFndiyJrDKxHBKrmCk3bPZ7Pw7\n1VdyvD/IybLeS2v4I2wDwAW9lcfNcztmgGTjGqwu+UcF8ga2m3P1eDNbx6H7JyqhtJqRjJHTOoI+\ndkC0zVJhUXAoP8XFWvLJjEm7FFtNyP9nTUwSlq31/niol4fX/V4ggNyhSyL71Imtus5Hl0dVe49F\nyGcohJUcaDDv70ngNXtk55iwlNpNhTs+VcQor1fznhPbRiefHqJeRIOkpcrVE7NLP8TjwuaGYaRS\nMLl6IE9vDzhTyzMMEyuP1pq9KsgtsRx9S1HKR9FIJ3Jdh+vVReZIZZ2vUpC6W6IYZVcSn2i51BVr\nlMRpIpj0M+Dt+VGOQVDJNE92kKz8OMHY4Xu54+OU4UZpyw4KUGsTuqwPN1q3ErWQgR5WrlcihtnJ\n0tHXUeOrO8ZV/R4O03QK0dqq6mm4lyiPSMQH+FJDOvTKVTUssKZqwJz58oHhEmrARdlns87/I6KJ\nClTUFLkqqNfs+avNJVgyeY+QW5g5xAgGwax/Dj0ApQIDAQABo1QwUjAOBgNVHQ8BAf8EBAMCAYYw\nDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUCctZf4aycI8awznjwNnpv7tNsiMwEAYJKwYBBAGC\nNxUBBAMCAQAwDQYJKoZIhvcNAQEMBQADggIBAKyvPl3CEZaJjqPnktaXFbgToqZCLgLNFgVZJ8og\n6Lq46BrsTaiXVq5lQ7GPAJtSzVXNUzltYkyLDVt8LkS/gxCP81OCgMNPOsduET/m4xaRhPtthH80\ndK2Jp86519efhGSSvpWhrQlTM93uCupKUY5vVau6tZRGrox/2KJQJWVggEbbMwSubLWYdFQl3JPk\n+ONVFT24bcMKpBLBaYVu32TxU5nhSnUgnZUP5NbcA/FZGOhHibJXWpS2qdgXKxdJ5XbLwVaZOjex\n/2kskZGT4d9Mozd2TaGf+G0eHdP67Pv0RR0Tbc/3WeUiJ3IrhvNXuzDtJE3cfVa7o7P4NHmJweDy\nAmH3pvwPuxwXC65B2Xy9J6P9LjrRk5Sxcx0ki69bIImtt2dmefU6xqaWM/5TkshGsRGRxpl/j8nW\nZjEgQRCHLQzWwa80mMpkg/sTV9HB8Dx6jKXB/ZUhoHHBk2dxEuqPiAppGWSZI1b7rCoucL5mxAyE\n7+WL85MB+GqQk2dLsmijtWKP6T+MejteD+eMuMZ87zf9dOLITzNy4ZQ5bb0Sr74MTnB8G2+NszKT\nc0QWbej09+CVgI+WXTik9KveCjCHk9hNAHFiRSdLOkKEW39lt2c0Ui2cFmuqqNh7o0JMcccMyj6D\n5KbvtwEwXlGjefVwaaZBRA+GsCyRxj3qrg+E\n-----END CERTIFICATE-----\n\ne-Szigno Root CA 2017\n=====================\n-----BEGIN CERTIFICATE-----\nMIICQDCCAeWgAwIBAgIMAVRI7yH9l1kN9QQKMAoGCCqGSM49BAMCMHExCzAJBgNVBAYTAkhVMREw\nDwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UECgwNTWljcm9zZWMgTHRkLjEXMBUGA1UEYQwOVkFUSFUt\nMjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3ppZ25vIFJvb3QgQ0EgMjAxNzAeFw0xNzA4MjIxMjA3MDZa\nFw00MjA4MjIxMjA3MDZaMHExCzAJBgNVBAYTAkhVMREwDwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UE\nCgwNTWljcm9zZWMgTHRkLjEXMBUGA1UEYQwOVkFUSFUtMjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3pp\nZ25vIFJvb3QgQ0EgMjAxNzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJbcPYrYsHtvxie+RJCx\ns1YVe45DJH0ahFnuY2iyxl6H0BVIHqiQrb1TotreOpCmYF9oMrWGQd+HWyx7xf58etqjYzBhMA8G\nA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSHERUI0arBeAyxr87GyZDv\nvzAEwDAfBgNVHSMEGDAWgBSHERUI0arBeAyxr87GyZDvvzAEwDAKBggqhkjOPQQDAgNJADBGAiEA\ntVfd14pVCzbhhkT61NlojbjcI4qKDdQvfepz7L9NbKgCIQDLpbQS+ue16M9+k/zzNY9vTlp8tLxO\nsvxyqltZ+efcMQ==\n-----END CERTIFICATE-----\n\ncertSIGN Root CA G2\n===================\n-----BEGIN CERTIFICATE-----\nMIIFRzCCAy+gAwIBAgIJEQA0tk7GNi02MA0GCSqGSIb3DQEBCwUAMEExCzAJBgNVBAYTAlJPMRQw\nEgYDVQQKEwtDRVJUU0lHTiBTQTEcMBoGA1UECxMTY2VydFNJR04gUk9PVCBDQSBHMjAeFw0xNzAy\nMDYwOTI3MzVaFw00MjAyMDYwOTI3MzVaMEExCzAJBgNVBAYTAlJPMRQwEgYDVQQKEwtDRVJUU0lH\nTiBTQTEcMBoGA1UECxMTY2VydFNJR04gUk9PVCBDQSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIP\nADCCAgoCggIBAMDFdRmRfUR0dIf+DjuW3NgBFszuY5HnC2/OOwppGnzC46+CjobXXo9X69MhWf05\nN0IwvlDqtg+piNguLWkh59E3GE59kdUWX2tbAMI5Qw02hVK5U2UPHULlj88F0+7cDBrZuIt4Imfk\nabBoxTzkbFpG583H+u/E7Eu9aqSs/cwoUe+StCmrqzWaTOTECMYmzPhpn+Sc8CnTXPnGFiWeI8Mg\nwT0PPzhAsP6CRDiqWhqKa2NYOLQV07YRaXseVO6MGiKscpc/I1mbySKEwQdPzH/iV8oScLumZfNp\ndWO9lfsbl83kqK/20U6o2YpxJM02PbyWxPFsqa7lzw1uKA2wDrXKUXt4FMMgL3/7FFXhEZn91Qqh\nngLjYl/rNUssuHLoPj1PrCy7Lobio3aP5ZMqz6WryFyNSwb/EkaseMsUBzXgqd+L6a8VTxaJW732\njcZZroiFDsGJ6x9nxUWO/203Nit4ZoORUSs9/1F3dmKh7Gc+PoGD4FapUB8fepmrY7+EF3fxDTvf\n95xhszWYijqy7DwaNz9+j5LP2RIUZNoQAhVB/0/E6xyjyfqZ90bp4RjZsbgyLcsUDFDYg2WD7rlc\nz8sFWkz6GZdr1l0T08JcVLwyc6B49fFtHsufpaafItzRUZ6CeWRgKRM+o/1Pcmqr4tTluCRVLERL\niohEnMqE0yo7AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1Ud\nDgQWBBSCIS1mxteg4BXrzkwJd8RgnlRuAzANBgkqhkiG9w0BAQsFAAOCAgEAYN4auOfyYILVAzOB\nywaK8SJJ6ejqkX/GM15oGQOGO0MBzwdw5AgeZYWR5hEit/UCI46uuR59H35s5r0l1ZUa8gWmr4UC\nb6741jH/JclKyMeKqdmfS0mbEVeZkkMR3rYzpMzXjWR91M08KCy0mpbqTfXERMQlqiCA2ClV9+BB\n/AYm/7k29UMUA2Z44RGx2iBfRgB4ACGlHgAoYXhvqAEBj500mv/0OJD7uNGzcgbJceaBxXntC6Z5\n8hMLnPddDnskk7RI24Zf3lCGeOdA5jGokHZwYa+cNywRtYK3qq4kNFtyDGkNzVmf9nGvnAvRCjj5\nBiKDUyUM/FHE5r7iOZULJK2v0ZXkltd0ZGtxTgI8qoXzIKNDOXZbbFD+mpwUHmUUihW9o4JFWklW\natKcsWMy5WHgUyIOpwpJ6st+H6jiYoD2EEVSmAYY3qXNL3+q1Ok+CHLsIwMCPKaq2LxndD0UF/tU\nSxfj03k9bWtJySgOLnRQvwzZRjoQhsmnP+mg7H/rpXdYaXHmgwo38oZJar55CJD2AhZkPuXaTH4M\nNMn5X7azKFGnpyuqSfqNZSlO42sTp5SjLVFteAxEy9/eCG/Oo2Sr05WE1LlSVHJ7liXMvGnjSG4N\n0MedJ5qq+BOS3R7fY581qRY27Iy4g/Q9iY/NtBde17MXQRBdJ3NghVdJIgc=\n-----END CERTIFICATE-----\n\nTrustwave Global Certification Authority\n========================================\n-----BEGIN CERTIFICATE-----\nMIIF2jCCA8KgAwIBAgIMBfcOhtpJ80Y1LrqyMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJV\nUzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2\nZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u\nIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM0MTJaFw00MjA4MjMxOTM0MTJaMIGIMQswCQYDVQQGEwJV\nUzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2\nZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u\nIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALldUShLPDeS0YLOvR29\nzd24q88KPuFd5dyqCblXAj7mY2Hf8g+CY66j96xz0XznswuvCAAJWX/NKSqIk4cXGIDtiLK0thAf\nLdZfVaITXdHG6wZWiYj+rDKd/VzDBcdu7oaJuogDnXIhhpCujwOl3J+IKMujkkkP7NAP4m1ET4Bq\nstTnoApTAbqOl5F2brz81Ws25kCI1nsvXwXoLG0R8+eyvpJETNKXpP7ScoFDB5zpET71ixpZfR9o\nWN0EACyW80OzfpgZdNmcc9kYvkHHNHnZ9GLCQ7mzJ7Aiy/k9UscwR7PJPrhq4ufogXBeQotPJqX+\nOsIgbrv4Fo7NDKm0G2x2EOFYeUY+VM6AqFcJNykbmROPDMjWLBz7BegIlT1lRtzuzWniTY+HKE40\nCz7PFNm73bZQmq131BnW2hqIyE4bJ3XYsgjxroMwuREOzYfwhI0Vcnyh78zyiGG69Gm7DIwLdVcE\nuE4qFC49DxweMqZiNu5m4iK4BUBjECLzMx10coos9TkpoNPnG4CELcU9402x/RpvumUHO1jsQkUm\n+9jaJXLE9gCxInm943xZYkqcBW89zubWR2OZxiRvchLIrH+QtAuRcOi35hYQcRfO3gZPSEF9NUqj\nifLJS3tBEW1ntwiYTOURGa5CgNz7kAXU+FDKvuStx8KU1xad5hePrzb7AgMBAAGjQjBAMA8GA1Ud\nEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJngGWcNYtt2s9o9uFvo/ULSMQ6HMA4GA1UdDwEB/wQEAwIB\nBjANBgkqhkiG9w0BAQsFAAOCAgEAmHNw4rDT7TnsTGDZqRKGFx6W0OhUKDtkLSGm+J1WE2pIPU/H\nPinbbViDVD2HfSMF1OQc3Og4ZYbFdada2zUFvXfeuyk3QAUHw5RSn8pk3fEbK9xGChACMf1KaA0H\nZJDmHvUqoai7PF35owgLEQzxPy0QlG/+4jSHg9bP5Rs1bdID4bANqKCqRieCNqcVtgimQlRXtpla\n4gt5kNdXElE1GYhBaCXUNxeEFfsBctyV3lImIJgm4nb1J2/6ADtKYdkNy1GTKv0WBpanI5ojSP5R\nvbbEsLFUzt5sQa0WZ37b/TjNuThOssFgy50X31ieemKyJo90lZvkWx3SD92YHJtZuSPTMaCm/zjd\nzyBP6VhWOmfD0faZmZ26NraAL4hHT4a/RDqA5Dccprrql5gR0IRiR2Qequ5AvzSxnI9O4fKSTx+O\n856X3vOmeWqJcU9LJxdI/uz0UA9PSX3MReO9ekDFQdxhVicGaeVyQYHTtgGJoC86cnn+OjC/QezH\nYj6RS8fZMXZC+fc8Y+wmjHMMfRod6qh8h6jCJ3zhM0EPz8/8AKAigJ5Kp28AsEFFtyLKaEjFQqKu\n3R3y4G5OBVixwJAWKqQ9EEC+j2Jjg6mcgn0tAumDMHzLJ8n9HmYAsC7TIS+OMxZsmO0QqAfWzJPP\n29FpHOTKyeC2nOnOcXHebD8WpHk=\n-----END CERTIFICATE-----\n\nTrustwave Global ECC P256 Certification Authority\n=================================================\n-----BEGIN CERTIFICATE-----\nMIICYDCCAgegAwIBAgIMDWpfCD8oXD5Rld9dMAoGCCqGSM49BAMCMIGRMQswCQYDVQQGEwJVUzER\nMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI\nb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1NiBDZXJ0aWZp\nY2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM1MTBaFw00MjA4MjMxOTM1MTBaMIGRMQswCQYD\nVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy\ndXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1\nNiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABH77bOYj\n43MyCMpg5lOcunSNGLB4kFKA3TjASh3RqMyTpJcGOMoNFWLGjgEqZZ2q3zSRLoHB5DOSMcT9CTqm\nP62jQzBBMA8GA1UdEwEB/wQFMAMBAf8wDwYDVR0PAQH/BAUDAwcGADAdBgNVHQ4EFgQUo0EGrJBt\n0UrrdaVKEJmzsaGLSvcwCgYIKoZIzj0EAwIDRwAwRAIgB+ZU2g6gWrKuEZ+Hxbb/ad4lvvigtwjz\nRM4q3wghDDcCIC0mA6AFvWvR9lz4ZcyGbbOcNEhjhAnFjXca4syc4XR7\n-----END CERTIFICATE-----\n\nTrustwave Global ECC P384 Certification Authority\n=================================================\n-----BEGIN CERTIFICATE-----\nMIICnTCCAiSgAwIBAgIMCL2Fl2yZJ6SAaEc7MAoGCCqGSM49BAMDMIGRMQswCQYDVQQGEwJVUzER\nMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI\nb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4NCBDZXJ0aWZp\nY2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM2NDNaFw00MjA4MjMxOTM2NDNaMIGRMQswCQYD\nVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy\ndXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4\nNCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTB2MBAGByqGSM49AgEGBSuBBAAiA2IABGvaDXU1CDFH\nBa5FmVXxERMuSvgQMSOjfoPTfygIOiYaOs+Xgh+AtycJj9GOMMQKmw6sWASr9zZ9lCOkmwqKi6vr\n/TklZvFe/oyujUF5nQlgziip04pt89ZF1PKYhDhloKNDMEEwDwYDVR0TAQH/BAUwAwEB/zAPBgNV\nHQ8BAf8EBQMDBwYAMB0GA1UdDgQWBBRVqYSJ0sEyvRjLbKYHTsjnnb6CkDAKBggqhkjOPQQDAwNn\nADBkAjA3AZKXRRJ+oPM+rRk6ct30UJMDEr5E0k9BpIycnR+j9sKS50gU/k6bpZFXrsY3crsCMGcl\nCrEMXu6pY5Jv5ZAL/mYiykf9ijH3g/56vxC+GCsej/YpHpRZ744hN8tRmKVuSw==\n-----END CERTIFICATE-----\n\nNAVER Global Root Certification Authority\n=========================================\n-----BEGIN CERTIFICATE-----\nMIIFojCCA4qgAwIBAgIUAZQwHqIL3fXFMyqxQ0Rx+NZQTQ0wDQYJKoZIhvcNAQEMBQAwaTELMAkG\nA1UEBhMCS1IxJjAkBgNVBAoMHU5BVkVSIEJVU0lORVNTIFBMQVRGT1JNIENvcnAuMTIwMAYDVQQD\nDClOQVZFUiBHbG9iYWwgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MTgwODU4\nNDJaFw0zNzA4MTgyMzU5NTlaMGkxCzAJBgNVBAYTAktSMSYwJAYDVQQKDB1OQVZFUiBCVVNJTkVT\nUyBQTEFURk9STSBDb3JwLjEyMDAGA1UEAwwpTkFWRVIgR2xvYmFsIFJvb3QgQ2VydGlmaWNhdGlv\nbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC21PGTXLVAiQqrDZBb\nUGOukJR0F0Vy1ntlWilLp1agS7gvQnXp2XskWjFlqxcX0TM62RHcQDaH38dq6SZeWYp34+hInDEW\n+j6RscrJo+KfziFTowI2MMtSAuXaMl3Dxeb57hHHi8lEHoSTGEq0n+USZGnQJoViAbbJAh2+g1G7\nXNr4rRVqmfeSVPc0W+m/6imBEtRTkZazkVrd/pBzKPswRrXKCAfHcXLJZtM0l/aM9BhK4dA9WkW2\naacp+yPOiNgSnABIqKYPszuSjXEOdMWLyEz59JuOuDxp7W87UC9Y7cSw0BwbagzivESq2M0UXZR4\nYb8ObtoqvC8MC3GmsxY/nOb5zJ9TNeIDoKAYv7vxvvTWjIcNQvcGufFt7QSUqP620wbGQGHfnZ3z\nVHbOUzoBppJB7ASjjw2i1QnK1sua8e9DXcCrpUHPXFNwcMmIpi3Ua2FzUCaGYQ5fG8Ir4ozVu53B\nA0K6lNpfqbDKzE0K70dpAy8i+/Eozr9dUGWokG2zdLAIx6yo0es+nPxdGoMuK8u180SdOqcXYZai\ncdNwlhVNt0xz7hlcxVs+Qf6sdWA7G2POAN3aCJBitOUt7kinaxeZVL6HSuOpXgRM6xBtVNbv8ejy\nYhbLgGvtPe31HzClrkvJE+2KAQHJuFFYwGY6sWZLxNUxAmLpdIQM201GLQIDAQABo0IwQDAdBgNV\nHQ4EFgQU0p+I36HNLL3s9TsBAZMzJ7LrYEswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMB\nAf8wDQYJKoZIhvcNAQEMBQADggIBADLKgLOdPVQG3dLSLvCkASELZ0jKbY7gyKoNqo0hV4/GPnrK\n21HUUrPUloSlWGB/5QuOH/XcChWB5Tu2tyIvCZwTFrFsDDUIbatjcu3cvuzHV+YwIHHW1xDBE1UB\njCpD5EHxzzp6U5LOogMFDTjfArsQLtk70pt6wKGm+LUx5vR1yblTmXVHIloUFcd4G7ad6Qz4G3bx\nhYTeodoS76TiEJd6eN4MUZeoIUCLhr0N8F5OSza7OyAfikJW4Qsav3vQIkMsRIz75Sq0bBwcupTg\nE34h5prCy8VCZLQelHsIJchxzIdFV4XTnyliIoNRlwAYl3dqmJLJfGBs32x9SuRwTMKeuB330DTH\nD8z7p/8Dvq1wkNoL3chtl1+afwkyQf3NosxabUzyqkn+Zvjp2DXrDige7kgvOtB5CTh8piKCk5XQ\nA76+AqAF3SAi428diDRgxuYKuQl1C/AH6GmWNcf7I4GOODm4RStDeKLRLBT/DShycpWbXgnbiUSY\nqqFJu3FS8r/2/yehNq+4tneI3TqkbZs0kNwUXTC/t+sX5Ie3cdCh13cV1ELX8vMxmV2b3RZtP+oG\nI/hGoiLtk/bdmuYqh7GYVPEi92tF4+KOdh2ajcQGjTa3FPOdVGm3jjzVpG2Tgbet9r1ke8LJaDmg\nkpzNNIaRkPpkUZ3+/uul9XXeifdy\n-----END CERTIFICATE-----\n\nAC RAIZ FNMT-RCM SERVIDORES SEGUROS\n===================================\n-----BEGIN CERTIFICATE-----\nMIICbjCCAfOgAwIBAgIQYvYybOXE42hcG2LdnC6dlTAKBggqhkjOPQQDAzB4MQswCQYDVQQGEwJF\nUzERMA8GA1UECgwIRk5NVC1SQ00xDjAMBgNVBAsMBUNlcmVzMRgwFgYDVQRhDA9WQVRFUy1RMjgy\nNjAwNEoxLDAqBgNVBAMMI0FDIFJBSVogRk5NVC1SQ00gU0VSVklET1JFUyBTRUdVUk9TMB4XDTE4\nMTIyMDA5MzczM1oXDTQzMTIyMDA5MzczM1oweDELMAkGA1UEBhMCRVMxETAPBgNVBAoMCEZOTVQt\nUkNNMQ4wDAYDVQQLDAVDZXJlczEYMBYGA1UEYQwPVkFURVMtUTI4MjYwMDRKMSwwKgYDVQQDDCNB\nQyBSQUlaIEZOTVQtUkNNIFNFUlZJRE9SRVMgU0VHVVJPUzB2MBAGByqGSM49AgEGBSuBBAAiA2IA\nBPa6V1PIyqvfNkpSIeSX0oNnnvBlUdBeh8dHsVnyV0ebAAKTRBdp20LHsbI6GA60XYyzZl2hNPk2\nLEnb80b8s0RpRBNm/dfF/a82Tc4DTQdxz69qBdKiQ1oKUm8BA06Oi6NCMEAwDwYDVR0TAQH/BAUw\nAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFAG5L++/EYZg8k/QQW6rcx/n0m5JMAoGCCqG\nSM49BAMDA2kAMGYCMQCuSuMrQMN0EfKVrRYj3k4MGuZdpSRea0R7/DjiT8ucRRcRTBQnJlU5dUoD\nzBOQn5ICMQD6SmxgiHPz7riYYqnOK8LZiqZwMR2vsJRM60/G49HzYqc8/5MuB1xJAWdpEgJyv+c=\n-----END CERTIFICATE-----\n\nGlobalSign Root R46\n===================\n-----BEGIN CERTIFICATE-----\nMIIFWjCCA0KgAwIBAgISEdK7udcjGJ5AXwqdLdDfJWfRMA0GCSqGSIb3DQEBDAUAMEYxCzAJBgNV\nBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYDVQQDExNHbG9iYWxTaWduIFJv\nb3QgUjQ2MB4XDTE5MDMyMDAwMDAwMFoXDTQ2MDMyMDAwMDAwMFowRjELMAkGA1UEBhMCQkUxGTAX\nBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExHDAaBgNVBAMTE0dsb2JhbFNpZ24gUm9vdCBSNDYwggIi\nMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCsrHQy6LNl5brtQyYdpokNRbopiLKkHWPd08Es\nCVeJOaFV6Wc0dwxu5FUdUiXSE2te4R2pt32JMl8Nnp8semNgQB+msLZ4j5lUlghYruQGvGIFAha/\nr6gjA7aUD7xubMLL1aa7DOn2wQL7Id5m3RerdELv8HQvJfTqa1VbkNud316HCkD7rRlr+/fKYIje\n2sGP1q7Vf9Q8g+7XFkyDRTNrJ9CG0Bwta/OrffGFqfUo0q3v84RLHIf8E6M6cqJaESvWJ3En7YEt\nbWaBkoe0G1h6zD8K+kZPTXhc+CtI4wSEy132tGqzZfxCnlEmIyDLPRT5ge1lFgBPGmSXZgjPjHvj\nK8Cd+RTyG/FWaha/LIWFzXg4mutCagI0GIMXTpRW+LaCtfOW3T3zvn8gdz57GSNrLNRyc0NXfeD4\n12lPFzYE+cCQYDdF3uYM2HSNrpyibXRdQr4G9dlkbgIQrImwTDsHTUB+JMWKmIJ5jqSngiCNI/on\nccnfxkF0oE32kRbcRoxfKWMxWXEM2G/CtjJ9++ZdU6Z+Ffy7dXxd7Pj2Fxzsx2sZy/N78CsHpdls\neVR2bJ0cpm4O6XkMqCNqo98bMDGfsVR7/mrLZqrcZdCinkqaByFrgY/bxFn63iLABJzjqls2k+g9\nvXqhnQt2sQvHnf3PmKgGwvgqo6GDoLclcqUC4wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYD\nVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA1yrc4GHqMywptWU4jaWSf8FmSwwDQYJKoZIhvcNAQEM\nBQADggIBAHx47PYCLLtbfpIrXTncvtgdokIzTfnvpCo7RGkerNlFo048p9gkUbJUHJNOxO97k4Vg\nJuoJSOD1u8fpaNK7ajFxzHmuEajwmf3lH7wvqMxX63bEIaZHU1VNaL8FpO7XJqti2kM3S+LGteWy\ngxk6x9PbTZ4IevPuzz5i+6zoYMzRx6Fcg0XERczzF2sUyQQCPtIkpnnpHs6i58FZFZ8d4kuaPp92\nCC1r2LpXFNqD6v6MVenQTqnMdzGxRBF6XLE+0xRFFRhiJBPSy03OXIPBNvIQtQ6IbbjhVp+J3pZm\nOUdkLG5NrmJ7v2B0GbhWrJKsFjLtrWhV/pi60zTe9Mlhww6G9kuEYO4Ne7UyWHmRVSyBQ7N0H3qq\nJZ4d16GLuc1CLgSkZoNNiTW2bKg2SnkheCLQQrzRQDGQob4Ez8pn7fXwgNNgyYMqIgXQBztSvwye\nqiv5u+YfjyW6hY0XHgL+XVAEV8/+LbzvXMAaq7afJMbfc2hIkCwU9D9SGuTSyxTDYWnP4vkYxboz\nnxSjBF25cfe1lNj2M8FawTSLfJvdkzrnE6JwYZ+vj+vYxXX4M2bUdGc6N3ec592kD3ZDZopD8p/7\nDEJ4Y9HiD2971KE9dJeFt0g5QdYg/NA6s/rob8SKunE3vouXsXgxT7PntgMTzlSdriVZzH81Xwj3\nQEUxeCp6\n-----END CERTIFICATE-----\n\nGlobalSign Root E46\n===================\n-----BEGIN CERTIFICATE-----\nMIICCzCCAZGgAwIBAgISEdK7ujNu1LzmJGjFDYQdmOhDMAoGCCqGSM49BAMDMEYxCzAJBgNVBAYT\nAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYDVQQDExNHbG9iYWxTaWduIFJvb3Qg\nRTQ2MB4XDTE5MDMyMDAwMDAwMFoXDTQ2MDMyMDAwMDAwMFowRjELMAkGA1UEBhMCQkUxGTAXBgNV\nBAoTEEdsb2JhbFNpZ24gbnYtc2ExHDAaBgNVBAMTE0dsb2JhbFNpZ24gUm9vdCBFNDYwdjAQBgcq\nhkjOPQIBBgUrgQQAIgNiAAScDrHPt+ieUnd1NPqlRqetMhkytAepJ8qUuwzSChDH2omwlwxwEwkB\njtjqR+q+soArzfwoDdusvKSGN+1wCAB16pMLey5SnCNoIwZD7JIvU4Tb+0cUB+hflGddyXqBPCCj\nQjBAMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQxCpCPtsad0kRL\ngLWi5h+xEk8blTAKBggqhkjOPQQDAwNoADBlAjEA31SQ7Zvvi5QCkxeCmb6zniz2C5GMn0oUsfZk\nvLtoURMMA/cVi4RguYv/Uo7njLwcAjA8+RHUjE7AwWHCFUyqqx0LMV87HOIAl0Qx5v5zli/altP+\nCAezNIm8BZ/3Hobui3A=\n-----END CERTIFICATE-----\n\nGLOBALTRUST 2020\n================\n-----BEGIN CERTIFICATE-----\nMIIFgjCCA2qgAwIBAgILWku9WvtPilv6ZeUwDQYJKoZIhvcNAQELBQAwTTELMAkGA1UEBhMCQVQx\nIzAhBgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVT\nVCAyMDIwMB4XDTIwMDIxMDAwMDAwMFoXDTQwMDYxMDAwMDAwMFowTTELMAkGA1UEBhMCQVQxIzAh\nBgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVTVCAy\nMDIwMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAri5WrRsc7/aVj6B3GyvTY4+ETUWi\nD59bRatZe1E0+eyLinjF3WuvvcTfk0Uev5E4C64OFudBc/jbu9G4UeDLgztzOG53ig9ZYybNpyrO\nVPu44sB8R85gfD+yc/LAGbaKkoc1DZAoouQVBGM+uq/ufF7MpotQsjj3QWPKzv9pj2gOlTblzLmM\nCcpL3TGQlsjMH/1WljTbjhzqLL6FLmPdqqmV0/0plRPwyJiT2S0WR5ARg6I6IqIoV6Lr/sCMKKCm\nfecqQjuCgGOlYx8ZzHyyZqjC0203b+J+BlHZRYQfEs4kUmSFC0iAToexIiIwquuuvuAC4EDosEKA\nA1GqtH6qRNdDYfOiaxaJSaSjpCuKAsR49GiKweR6NrFvG5Ybd0mN1MkGco/PU+PcF4UgStyYJ9OR\nJitHHmkHr96i5OTUawuzXnzUJIBHKWk7buis/UDr2O1xcSvy6Fgd60GXIsUf1DnQJ4+H4xj04KlG\nDfV0OoIu0G4skaMxXDtG6nsEEFZegB31pWXogvziB4xiRfUg3kZwhqG8k9MedKZssCz3AwyIDMvU\nclOGvGBG85hqwvG/Q/lwIHfKN0F5VVJjjVsSn8VoxIidrPIwq7ejMZdnrY8XD2zHc+0klGvIg5rQ\nmjdJBKuxFshsSUktq6HQjJLyQUp5ISXbY9e2nKd+Qmn7OmMCAwEAAaNjMGEwDwYDVR0TAQH/BAUw\nAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFNwuH9FhN3nkq9XVsxJxaD1qaJwiMB8GA1Ud\nIwQYMBaAFNwuH9FhN3nkq9XVsxJxaD1qaJwiMA0GCSqGSIb3DQEBCwUAA4ICAQCR8EICaEDuw2jA\nVC/f7GLDw56KoDEoqoOOpFaWEhCGVrqXctJUMHytGdUdaG/7FELYjQ7ztdGl4wJCXtzoRlgHNQIw\n4Lx0SsFDKv/bGtCwr2zD/cuz9X9tAy5ZVp0tLTWMstZDFyySCstd6IwPS3BD0IL/qMy/pJTAvoe9\niuOTe8aPmxadJ2W8esVCgmxcB9CpwYhgROmYhRZf+I/KARDOJcP5YBugxZfD0yyIMaK9MOzQ0MAS\n8cE54+X1+NZK3TTN+2/BT+MAi1bikvcoskJ3ciNnxz8RFbLEAwW+uxF7Cr+obuf/WEPPm2eggAe2\nHcqtbepBEX4tdJP7wry+UUTF72glJ4DjyKDUEuzZpTcdN3y0kcra1LGWge9oXHYQSa9+pTeAsRxS\nvTOBTI/53WXZFM2KJVj04sWDpQmQ1GwUY7VA3+vA/MRYfg0UFodUJ25W5HCEuGwyEn6CMUO+1918\noa2u1qsgEu8KwxCMSZY13At1XrFP1U80DhEgB3VDRemjEdqso5nCtnkn4rnvyOL2NSl6dPrFf4IF\nYqYK6miyeUcGbvJXqBUzxvd4Sj1Ce2t+/vdG6tHrju+IaFvowdlxfv1k7/9nR4hYJS8+hge9+6jl\ngqispdNpQ80xiEmEU5LAsTkbOYMBMMTyqfrQA71yN2BWHzZ8vTmR9W0Nv3vXkg==\n-----END CERTIFICATE-----\n\nANF Secure Server Root CA\n=========================\n-----BEGIN CERTIFICATE-----\nMIIF7zCCA9egAwIBAgIIDdPjvGz5a7EwDQYJKoZIhvcNAQELBQAwgYQxEjAQBgNVBAUTCUc2MzI4\nNzUxMDELMAkGA1UEBhMCRVMxJzAlBgNVBAoTHkFORiBBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lv\nbjEUMBIGA1UECxMLQU5GIENBIFJhaXoxIjAgBgNVBAMTGUFORiBTZWN1cmUgU2VydmVyIFJvb3Qg\nQ0EwHhcNMTkwOTA0MTAwMDM4WhcNMzkwODMwMTAwMDM4WjCBhDESMBAGA1UEBRMJRzYzMjg3NTEw\nMQswCQYDVQQGEwJFUzEnMCUGA1UEChMeQU5GIEF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uMRQw\nEgYDVQQLEwtBTkYgQ0EgUmFpejEiMCAGA1UEAxMZQU5GIFNlY3VyZSBTZXJ2ZXIgUm9vdCBDQTCC\nAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANvrayvmZFSVgpCjcqQZAZ2cC4Ffc0m6p6zz\nBE57lgvsEeBbphzOG9INgxwruJ4dfkUyYA8H6XdYfp9qyGFOtibBTI3/TO80sh9l2Ll49a2pcbnv\nT1gdpd50IJeh7WhM3pIXS7yr/2WanvtH2Vdy8wmhrnZEE26cLUQ5vPnHO6RYPUG9tMJJo8gN0pcv\nB2VSAKduyK9o7PQUlrZXH1bDOZ8rbeTzPvY1ZNoMHKGESy9LS+IsJJ1tk0DrtSOOMspvRdOoiXse\nzx76W0OLzc2oD2rKDF65nkeP8Nm2CgtYZRczuSPkdxl9y0oukntPLxB3sY0vaJxizOBQ+OyRp1RM\nVwnVdmPF6GUe7m1qzwmd+nxPrWAI/VaZDxUse6mAq4xhj0oHdkLePfTdsiQzW7i1o0TJrH93PB0j\n7IKppuLIBkwC/qxcmZkLLxCKpvR/1Yd0DVlJRfbwcVw5Kda/SiOL9V8BY9KHcyi1Swr1+KuCLH5z\nJTIdC2MKF4EA/7Z2Xue0sUDKIbvVgFHlSFJnLNJhiQcND85Cd8BEc5xEUKDbEAotlRyBr+Qc5RQe\n8TZBAQIvfXOn3kLMTOmJDVb3n5HUA8ZsyY/b2BzgQJhdZpmYgG4t/wHFzstGH6wCxkPmrqKEPMVO\nHj1tyRRM4y5Bu8o5vzY8KhmqQYdOpc5LMnndkEl/AgMBAAGjYzBhMB8GA1UdIwQYMBaAFJxf0Gxj\no1+TypOYCK2Mh6UsXME3MB0GA1UdDgQWBBScX9BsY6Nfk8qTmAitjIelLFzBNzAOBgNVHQ8BAf8E\nBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEATh65isagmD9uw2nAalxJ\nUqzLK114OMHVVISfk/CHGT0sZonrDUL8zPB1hT+L9IBdeeUXZ701guLyPI59WzbLWoAAKfLOKyzx\nj6ptBZNscsdW699QIyjlRRA96Gejrw5VD5AJYu9LWaL2U/HANeQvwSS9eS9OICI7/RogsKQOLHDt\ndD+4E5UGUcjohybKpFtqFiGS3XNgnhAY3jyB6ugYw3yJ8otQPr0R4hUDqDZ9MwFsSBXXiJCZBMXM\n5gf0vPSQ7RPi6ovDj6MzD8EpTBNO2hVWcXNyglD2mjN8orGoGjR0ZVzO0eurU+AagNjqOknkJjCb\n5RyKqKkVMoaZkgoQI1YS4PbOTOK7vtuNknMBZi9iPrJyJ0U27U1W45eZ/zo1PqVUSlJZS2Db7v54\nEX9K3BR5YLZrZAPbFYPhor72I5dQ8AkzNqdxliXzuUJ92zg/LFis6ELhDtjTO0wugumDLmsx2d1H\nhk9tl5EuT+IocTUW0fJz/iUrB0ckYyfI+PbZa/wSMVYIwFNCr5zQM378BvAxRAMU8Vjq8moNqRGy\ng77FGr8H6lnco4g175x2MjxNBiLOFeXdntiP2t7SxDnlF4HPOEfrf4htWRvfn0IUrn7PqLBmZdo3\nr5+qPeoott7VMVgWglvquxl1AnMaykgaIZOQCo6ThKd9OyMYkomgjaw=\n-----END CERTIFICATE-----\n\nCertum EC-384 CA\n================\n-----BEGIN CERTIFICATE-----\nMIICZTCCAeugAwIBAgIQeI8nXIESUiClBNAt3bpz9DAKBggqhkjOPQQDAzB0MQswCQYDVQQGEwJQ\nTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2Vy\ndGlmaWNhdGlvbiBBdXRob3JpdHkxGTAXBgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwHhcNMTgwMzI2\nMDcyNDU0WhcNNDMwMzI2MDcyNDU0WjB0MQswCQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERh\ndGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkx\nGTAXBgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAATEKI6rGFtq\nvm5kN2PkzeyrOvfMobgOgknXhimfoZTy42B4mIF4Bk3y7JoOV2CDn7TmFy8as10CW4kjPMIRBSqn\niBMY81CE1700LCeJVf/OTOffph8oxPBUw7l8t1Ot68KjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD\nVR0OBBYEFI0GZnQkdjrzife81r1HfS+8EF9LMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNo\nADBlAjADVS2m5hjEfO/JUG7BJw+ch69u1RsIGL2SKcHvlJF40jocVYli5RsJHrpka/F2tNQCMQC0\nQoSZ/6vnnvuRlydd3LBbMHHOXjgaatkl5+r3YZJW+OraNsKHZZYuciUvf9/DE8k=\n-----END CERTIFICATE-----\n\nCertum Trusted Root CA\n======================\n-----BEGIN CERTIFICATE-----\nMIIFwDCCA6igAwIBAgIQHr9ZULjJgDdMBvfrVU+17TANBgkqhkiG9w0BAQ0FADB6MQswCQYDVQQG\nEwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0g\nQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0Ew\nHhcNMTgwMzE2MTIxMDEzWhcNNDMwMzE2MTIxMDEzWjB6MQswCQYDVQQGEwJQTDEhMB8GA1UEChMY\nQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBB\ndXRob3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEB\nAQUAA4ICDwAwggIKAoICAQDRLY67tzbqbTeRn06TpwXkKQMlzhyC93yZn0EGze2jusDbCSzBfN8p\nfktlL5On1AFrAygYo9idBcEq2EXxkd7fO9CAAozPOA/qp1x4EaTByIVcJdPTsuclzxFUl6s1wB52\nHO8AU5853BSlLCIls3Jy/I2z5T4IHhQqNwuIPMqw9MjCoa68wb4pZ1Xi/K1ZXP69VyywkI3C7Te2\nfJmItdUDmj0VDT06qKhF8JVOJVkdzZhpu9PMMsmN74H+rX2Ju7pgE8pllWeg8xn2A1bUatMn4qGt\ng/BKEiJ3HAVz4hlxQsDsdUaakFjgao4rpUYwBI4Zshfjvqm6f1bxJAPXsiEodg42MEx51UGamqi4\nNboMOvJEGyCI98Ul1z3G4z5D3Yf+xOr1Uz5MZf87Sst4WmsXXw3Hw09Omiqi7VdNIuJGmj8PkTQk\nfVXjjJU30xrwCSss0smNtA0Aq2cpKNgB9RkEth2+dv5yXMSFytKAQd8FqKPVhJBPC/PgP5sZ0jeJ\nP/J7UhyM9uH3PAeXjA6iWYEMspA90+NZRu0PqafegGtaqge2Gcu8V/OXIXoMsSt0Puvap2ctTMSY\nnjYJdmZm/Bo/6khUHL4wvYBQv3y1zgD2DGHZ5yQD4OMBgQ692IU0iL2yNqh7XAjlRICMb/gv1SHK\nHRzQ+8S1h9E6Tsd2tTVItQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSM+xx1\nvALTn04uSNn5YFSqxLNP+jAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQADggIBAEii1QAL\nLtA/vBzVtVRJHlpr9OTy4EA34MwUe7nJ+jW1dReTagVphZzNTxl4WxmB82M+w85bj/UvXgF2Ez8s\nALnNllI5SW0ETsXpD4YN4fqzX4IS8TrOZgYkNCvozMrnadyHncI013nR03e4qllY/p0m+jiGPp2K\nh2RX5Rc64vmNueMzeMGQ2Ljdt4NR5MTMI9UGfOZR0800McD2RrsLrfw9EAUqO0qRJe6M1ISHgCq8\nCYyqOhNf6DR5UMEQGfnTKB7U0VEwKbOukGfWHwpjscWpxkIxYxeU72nLL/qMFH3EQxiJ2fAyQOaA\n4kZf5ePBAFmo+eggvIksDkc0C+pXwlM2/KfUrzHN/gLldfq5Jwn58/U7yn2fqSLLiMmq0Uc9Nneo\nWWRrJ8/vJ8HjJLWG965+Mk2weWjROeiQWMODvA8s1pfrzgzhIMfatz7DP78v3DSk+yshzWePS/Tj\n6tQ/50+6uaWTRRxmHyH6ZF5v4HaUMst19W7l9o/HuKTMqJZ9ZPskWkoDbGs4xugDQ5r3V7mzKWmT\nOPQD8rv7gmsHINFSH5pkAnuYZttcTVoP0ISVoDwUQwbKytu4QTbaakRnh6+v40URFWkIsr4WOZck\nbxJF0WddCajJFdr60qZfE2Efv4WstK2tBZQIgx51F9NxO5NQI1mg7TyRVJ12AMXDuDjb\n-----END CERTIFICATE-----\n\nTunTrust Root CA\n================\n-----BEGIN CERTIFICATE-----\nMIIFszCCA5ugAwIBAgIUEwLV4kBMkkaGFmddtLu7sms+/BMwDQYJKoZIhvcNAQELBQAwYTELMAkG\nA1UEBhMCVE4xNzA1BgNVBAoMLkFnZW5jZSBOYXRpb25hbGUgZGUgQ2VydGlmaWNhdGlvbiBFbGVj\ndHJvbmlxdWUxGTAXBgNVBAMMEFR1blRydXN0IFJvb3QgQ0EwHhcNMTkwNDI2MDg1NzU2WhcNNDQw\nNDI2MDg1NzU2WjBhMQswCQYDVQQGEwJUTjE3MDUGA1UECgwuQWdlbmNlIE5hdGlvbmFsZSBkZSBD\nZXJ0aWZpY2F0aW9uIEVsZWN0cm9uaXF1ZTEZMBcGA1UEAwwQVHVuVHJ1c3QgUm9vdCBDQTCCAiIw\nDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMPN0/y9BFPdDCA61YguBUtB9YOCfvdZn56eY+hz\n2vYGqU8ftPkLHzmMmiDQfgbU7DTZhrx1W4eI8NLZ1KMKsmwb60ksPqxd2JQDoOw05TDENX37Jk0b\nbjBU2PWARZw5rZzJJQRNmpA+TkBuimvNKWfGzC3gdOgFVwpIUPp6Q9p+7FuaDmJ2/uqdHYVy7BG7\nNegfJ7/Boce7SBbdVtfMTqDhuazb1YMZGoXRlJfXyqNlC/M4+QKu3fZnz8k/9YosRxqZbwUN/dAd\ngjH8KcwAWJeRTIAAHDOFli/LQcKLEITDCSSJH7UP2dl3RxiSlGBcx5kDPP73lad9UKGAwqmDrViW\nVSHbhlnUr8a83YFuB9tgYv7sEG7aaAH0gxupPqJbI9dkxt/con3YS7qC0lH4Zr8GRuR5KiY2eY8f\nTpkdso8MDhz/yV3A/ZAQprE38806JG60hZC/gLkMjNWb1sjxVj8agIl6qeIbMlEsPvLfe/ZdeikZ\njuXIvTZxi11Mwh0/rViizz1wTaZQmCXcI/m4WEEIcb9PuISgjwBUFfyRbVinljvrS5YnzWuioYas\nDXxU5mZMZl+QviGaAkYt5IPCgLnPSz7ofzwB7I9ezX/SKEIBlYrilz0QIX32nRzFNKHsLA4KUiwS\nVXAkPcvCFDVDXSdOvsC9qnyW5/yeYa1E0wCXAgMBAAGjYzBhMB0GA1UdDgQWBBQGmpsfU33x9aTI\n04Y+oXNZtPdEITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFAaamx9TffH1pMjThj6hc1m0\n90QhMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAqgVutt0Vyb+zxiD2BkewhpMl\n0425yAA/l/VSJ4hxyXT968pk21vvHl26v9Hr7lxpuhbI87mP0zYuQEkHDVneixCwSQXi/5E/S7fd\nAo74gShczNxtr18UnH1YeA32gAm56Q6XKRm4t+v4FstVEuTGfbvE7Pi1HE4+Z7/FXxttbUcoqgRY\nYdZ2vyJ/0Adqp2RT8JeNnYA/u8EH22Wv5psymsNUk8QcCMNE+3tjEUPRahphanltkE8pjkcFwRJp\nadbGNjHh/PqAulxPxOu3Mqz4dWEX1xAZufHSCe96Qp1bWgvUxpVOKs7/B9dPfhgGiPEZtdmYu65x\nxBzndFlY7wyJz4sfdZMaBBSSSFCp61cpABbjNhzI+L/wM9VBD8TMPN3pM0MBkRArHtG5Xc0yGYuP\njCB31yLEQtyEFpslbei0VXF/sHyz03FJuc9SpAQ/3D2gu68zngowYI7bnV2UqL1g52KAdoGDDIzM\nMEZJ4gzSqK/rYXHv5yJiqfdcZGyfFoxnNidF9Ql7v/YQCvGwjVRDjAS6oz/v4jXH+XTgbzRB0L9z\nZVcg+ZtnemZoJE6AZb0QmQZZ8mWvuMZHu/2QeItBcy6vVR/cO5JyboTT0GFMDcx2V+IthSIVNg3r\nAZ3r2OvEhJn7wAzMMujjd9qDRIueVSjAi1jTkD5OGwDxFa2DK5o=\n-----END CERTIFICATE-----\n\nHARICA TLS RSA Root CA 2021\n===========================\n-----BEGIN CERTIFICATE-----\nMIIFpDCCA4ygAwIBAgIQOcqTHO9D88aOk8f0ZIk4fjANBgkqhkiG9w0BAQsFADBsMQswCQYDVQQG\nEwJHUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u\ncyBDQTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBSU0EgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTEwNTUz\nOFoXDTQ1MDIxMzEwNTUzN1owbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRl\nbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgUlNB\nIFJvb3QgQ0EgMjAyMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAIvC569lmwVnlskN\nJLnQDmT8zuIkGCyEf3dRywQRNrhe7Wlxp57kJQmXZ8FHws+RFjZiPTgE4VGC/6zStGndLuwRo0Xu\na2s7TL+MjaQenRG56Tj5eg4MmOIjHdFOY9TnuEFE+2uva9of08WRiFukiZLRgeaMOVig1mlDqa2Y\nUlhu2wr7a89o+uOkXjpFc5gH6l8Cct4MpbOfrqkdtx2z/IpZ525yZa31MJQjB/OCFks1mJxTuy/K\n5FrZx40d/JiZ+yykgmvwKh+OC19xXFyuQnspiYHLA6OZyoieC0AJQTPb5lh6/a6ZcMBaD9YThnEv\ndmn8kN3bLW7R8pv1GmuebxWMevBLKKAiOIAkbDakO/IwkfN4E8/BPzWr8R0RI7VDIp4BkrcYAuUR\n0YLbFQDMYTfBKnya4dC6s1BG7oKsnTH4+yPiAwBIcKMJJnkVU2DzOFytOOqBAGMUuTNe3QvboEUH\nGjMJ+E20pwKmafTCWQWIZYVWrkvL4N48fS0ayOn7H6NhStYqE613TBoYm5EPWNgGVMWX+Ko/IIqm\nhaZ39qb8HOLubpQzKoNQhArlT4b4UEV4AIHrW2jjJo3Me1xR9BQsQL4aYB16cmEdH2MtiKrOokWQ\nCPxrvrNQKlr9qEgYRtaQQJKQCoReaDH46+0N0x3GfZkYVVYnZS6NRcUk7M7jAgMBAAGjQjBAMA8G\nA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFApII6ZgpJIKM+qTW8VX6iVNvRLuMA4GA1UdDwEB/wQE\nAwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAPpBIqm5iFSVmewzVjIuJndftTgfvnNAUX15QvWiWkKQU\nEapobQk1OUAJ2vQJLDSle1mESSmXdMgHHkdt8s4cUCbjnj1AUz/3f5Z2EMVGpdAgS1D0NTsY9FVq\nQRtHBmg8uwkIYtlfVUKqrFOFrJVWNlar5AWMxajaH6NpvVMPxP/cyuN+8kyIhkdGGvMA9YCRotxD\nQpSbIPDRzbLrLFPCU3hKTwSUQZqPJzLB5UkZv/HywouoCjkxKLR9YjYsTewfM7Z+d21+UPCfDtcR\nj88YxeMn/ibvBZ3PzzfF0HvaO7AWhAw6k9a+F9sPPg4ZeAnHqQJyIkv3N3a6dcSFA1pj1bF1BcK5\nvZStjBWZp5N99sXzqnTPBIWUmAD04vnKJGW/4GKvyMX6ssmeVkjaef2WdhW+o45WxLM0/L5H9MG0\nqPzVMIho7suuyWPEdr6sOBjhXlzPrjoiUevRi7PzKzMHVIf6tLITe7pTBGIBnfHAT+7hOtSLIBD6\nAlfm78ELt5BGnBkpjNxvoEppaZS3JGWg/6w/zgH7IS79aPib8qXPMThcFarmlwDB31qlpzmq6YR/\nPFGoOtmUW4y/Twhx5duoXNTSpv4Ao8YWxw/ogM4cKGR0GQjTQuPOAF1/sdwTsOEFy9EgqoZ0njnn\nkf3/W9b3raYvAwtt41dU63ZTGI0RmLo=\n-----END CERTIFICATE-----\n\nHARICA TLS ECC Root CA 2021\n===========================\n-----BEGIN CERTIFICATE-----\nMIICVDCCAdugAwIBAgIQZ3SdjXfYO2rbIvT/WeK/zjAKBggqhkjOPQQDAzBsMQswCQYDVQQGEwJH\nUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBD\nQTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBFQ0MgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTExMDExMFoX\nDTQ1MDIxMzExMDEwOVowbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRlbWlj\nIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgRUNDIFJv\nb3QgQ0EgMjAyMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABDgI/rGgltJ6rK9JOtDA4MM7KKrxcm1l\nAEeIhPyaJmuqS7psBAqIXhfyVYf8MLA04jRYVxqEU+kw2anylnTDUR9YSTHMmE5gEYd103KUkE+b\nECUqqHgtvpBBWJAVcqeht6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUyRtTgRL+BNUW\n0aq8mm+3oJUZbsowDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMDA2cAMGQCMBHervjcToiwqfAi\nrcJRQO9gcS3ujwLEXQNwSaSS6sUUiHCm0w2wqsosQJz76YJumgIwK0eaB8bRwoF8yguWGEEbo/Qw\nCZ61IygNnxS2PFOiTAZpffpskcYqSUXm7LcT4Tps\n-----END CERTIFICATE-----\n\nAutoridad de Certificacion Firmaprofesional CIF A62634068\n=========================================================\n-----BEGIN CERTIFICATE-----\nMIIGFDCCA/ygAwIBAgIIG3Dp0v+ubHEwDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCRVMxQjBA\nBgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2\nMjYzNDA2ODAeFw0xNDA5MjMxNTIyMDdaFw0zNjA1MDUxNTIyMDdaMFExCzAJBgNVBAYTAkVTMUIw\nQAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB\nNjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD\nUtd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P\nB99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY\n7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH\nECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI\nplD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX\nMbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX\nLZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK\nbpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU\nvzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMB0GA1Ud\nDgQWBBRlzeurNR4APn7VdMActHNHDhpkLzASBgNVHRMBAf8ECDAGAQH/AgEBMIGmBgNVHSAEgZ4w\ngZswgZgGBFUdIAAwgY8wLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuZmlybWFwcm9mZXNpb25hbC5j\nb20vY3BzMFwGCCsGAQUFBwICMFAeTgBQAGEAcwBlAG8AIABkAGUAIABsAGEAIABCAG8AbgBhAG4A\nbwB2AGEAIAA0ADcAIABCAGEAcgBjAGUAbABvAG4AYQAgADAAOAAwADEANzAOBgNVHQ8BAf8EBAMC\nAQYwDQYJKoZIhvcNAQELBQADggIBAHSHKAIrdx9miWTtj3QuRhy7qPj4Cx2Dtjqn6EWKB7fgPiDL\n4QjbEwj4KKE1soCzC1HA01aajTNFSa9J8OA9B3pFE1r/yJfY0xgsfZb43aJlQ3CTkBW6kN/oGbDb\nLIpgD7dvlAceHabJhfa9NPhAeGIQcDq+fUs5gakQ1JZBu/hfHAsdCPKxsIl68veg4MSPi3i1O1il\nI45PVf42O+AMt8oqMEEgtIDNrvx2ZnOorm7hfNoD6JQg5iKj0B+QXSBTFCZX2lSX3xZEEAEeiGaP\ncjiT3SC3NL7X8e5jjkd5KAb881lFJWAiMxujX6i6KtoaPc1A6ozuBRWV1aUsIC+nmCjuRfzxuIgA\nLI9C2lHVnOUTaHFFQ4ueCyE8S1wF3BqfmI7avSKecs2tCsvMo2ebKHTEm9caPARYpoKdrcd7b/+A\nlun4jWq9GJAd/0kakFI3ky88Al2CdgtR5xbHV/g4+afNmyJU72OwFW1TZQNKXkqgsqeOSQBZONXH\n9IBk9W6VULgRfhVwOEqwf9DEMnDAGf/JOC0ULGb0QkTmVXYbgBVX/8Cnp6o5qtjTcNAuuuuUavpf\nNIbnYrX9ivAwhZTJryQCL2/W3Wf+47BVTwSYT6RBVuKT0Gro1vP7ZeDOdcQxWQzugsgMYDNKGbqE\nZycPvEJdvSRUDewdcAZfpLz6IHxV\n-----END CERTIFICATE-----\n\nvTrus ECC Root CA\n=================\n-----BEGIN CERTIFICATE-----\nMIICDzCCAZWgAwIBAgIUbmq8WapTvpg5Z6LSa6Q75m0c1towCgYIKoZIzj0EAwMwRzELMAkGA1UE\nBhMCQ04xHDAaBgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xGjAYBgNVBAMTEXZUcnVzIEVDQyBS\nb290IENBMB4XDTE4MDczMTA3MjY0NFoXDTQzMDczMTA3MjY0NFowRzELMAkGA1UEBhMCQ04xHDAa\nBgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xGjAYBgNVBAMTEXZUcnVzIEVDQyBSb290IENBMHYw\nEAYHKoZIzj0CAQYFK4EEACIDYgAEZVBKrox5lkqqHAjDo6LN/llWQXf9JpRCux3NCNtzslt188+c\nToL0v/hhJoVs1oVbcnDS/dtitN9Ti72xRFhiQgnH+n9bEOf+QP3A2MMrMudwpremIFUde4BdS49n\nTPEQo0IwQDAdBgNVHQ4EFgQUmDnNvtiyjPeyq+GtJK97fKHbH88wDwYDVR0TAQH/BAUwAwEB/zAO\nBgNVHQ8BAf8EBAMCAQYwCgYIKoZIzj0EAwMDaAAwZQIwV53dVvHH4+m4SVBrm2nDb+zDfSXkV5UT\nQJtS0zvzQBm8JsctBp61ezaf9SXUY2sAAjEA6dPGnlaaKsyh2j/IZivTWJwghfqrkYpwcBE4YGQL\nYgmRWAD5Tfs0aNoJrSEGGJTO\n-----END CERTIFICATE-----\n\nvTrus Root CA\n=============\n-----BEGIN CERTIFICATE-----\nMIIFVjCCAz6gAwIBAgIUQ+NxE9izWRRdt86M/TX9b7wFjUUwDQYJKoZIhvcNAQELBQAwQzELMAkG\nA1UEBhMCQ04xHDAaBgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xFjAUBgNVBAMTDXZUcnVzIFJv\nb3QgQ0EwHhcNMTgwNzMxMDcyNDA1WhcNNDMwNzMxMDcyNDA1WjBDMQswCQYDVQQGEwJDTjEcMBoG\nA1UEChMTaVRydXNDaGluYSBDby4sTHRkLjEWMBQGA1UEAxMNdlRydXMgUm9vdCBDQTCCAiIwDQYJ\nKoZIhvcNAQEBBQADggIPADCCAgoCggIBAL1VfGHTuB0EYgWgrmy3cLRB6ksDXhA/kFocizuwZots\nSKYcIrrVQJLuM7IjWcmOvFjai57QGfIvWcaMY1q6n6MLsLOaXLoRuBLpDLvPbmyAhykUAyyNJJrI\nZIO1aqwTLDPxn9wsYTwaP3BVm60AUn/PBLn+NvqcwBauYv6WTEN+VRS+GrPSbcKvdmaVayqwlHeF\nXgQPYh1jdfdr58tbmnDsPmcF8P4HCIDPKNsFxhQnL4Z98Cfe/+Z+M0jnCx5Y0ScrUw5XSmXX+6KA\nYPxMvDVTAWqXcoKv8R1w6Jz1717CbMdHflqUhSZNO7rrTOiwCcJlwp2dCZtOtZcFrPUGoPc2BX70\nkLJrxLT5ZOrpGgrIDajtJ8nU57O5q4IikCc9Kuh8kO+8T/3iCiSn3mUkpF3qwHYw03dQ+A0Em5Q2\nAXPKBlim0zvc+gRGE1WKyURHuFE5Gi7oNOJ5y1lKCn+8pu8fA2dqWSslYpPZUxlmPCdiKYZNpGvu\n/9ROutW04o5IWgAZCfEF2c6Rsffr6TlP9m8EQ5pV9T4FFL2/s1m02I4zhKOQUqqzApVg+QxMaPnu\n1RcN+HFXtSXkKe5lXa/R7jwXC1pDxaWG6iSe4gUH3DRCEpHWOXSuTEGC2/KmSNGzm/MzqvOmwMVO\n9fSddmPmAsYiS8GVP1BkLFTltvA8Kc9XAgMBAAGjQjBAMB0GA1UdDgQWBBRUYnBj8XWEQ1iO0RYg\nscasGrz2iTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOC\nAgEAKbqSSaet8PFww+SX8J+pJdVrnjT+5hpk9jprUrIQeBqfTNqK2uwcN1LgQkv7bHbKJAs5EhWd\nnxEt/Hlk3ODg9d3gV8mlsnZwUKT+twpw1aA08XXXTUm6EdGz2OyC/+sOxL9kLX1jbhd47F18iMjr\njld22VkE+rxSH0Ws8HqA7Oxvdq6R2xCOBNyS36D25q5J08FsEhvMKar5CKXiNxTKsbhm7xqC5PD4\n8acWabfbqWE8n/Uxy+QARsIvdLGx14HuqCaVvIivTDUHKgLKeBRtRytAVunLKmChZwOgzoy8sHJn\nxDHO2zTlJQNgJXtxmOTAGytfdELSS8VZCAeHvsXDf+eW2eHcKJfWjwXj9ZtOyh1QRwVTsMo554Wg\nicEFOwE30z9J4nfrI8iIZjs9OXYhRvHsXyO466JmdXTBQPfYaJqT4i2pLr0cox7IdMakLXogqzu4\nsEb9b91fUlV1YvCXoHzXOP0l382gmxDPi7g4Xl7FtKYCNqEeXxzP4padKar9mK5S4fNBUvupLnKW\nnyfjqnN9+BojZns7q2WwMgFLFT49ok8MKzWixtlnEjUwzXYuFrOZnk1PTi07NEPhmg4NpGaXutIc\nSkwsKouLgU9xGqndXHt7CMUADTdA43x7VF8vhV929vensBxXVsFy6K2ir40zSbofitzmdHxghm+H\nl3s=\n-----END CERTIFICATE-----\n\nISRG Root X2\n============\n-----BEGIN CERTIFICATE-----\nMIICGzCCAaGgAwIBAgIQQdKd0XLq7qeAwSxs6S+HUjAKBggqhkjOPQQDAzBPMQswCQYDVQQGEwJV\nUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElT\nUkcgUm9vdCBYMjAeFw0yMDA5MDQwMDAwMDBaFw00MDA5MTcxNjAwMDBaME8xCzAJBgNVBAYTAlVT\nMSkwJwYDVQQKEyBJbnRlcm5ldCBTZWN1cml0eSBSZXNlYXJjaCBHcm91cDEVMBMGA1UEAxMMSVNS\nRyBSb290IFgyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEzZvVn4CDCuwJSvMWSj5cz3es3mcFDR0H\nttwW+1qLFNvicWDEukWVEYmO6gbf9yoWHKS5xcUy4APgHoIYOIvXRdgKam7mAHf7AlF9ItgKbppb\nd9/w+kHsOdx1ymgHDB/qo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNV\nHQ4EFgQUfEKWrt5LSDv6kviejM9ti6lyN5UwCgYIKoZIzj0EAwMDaAAwZQIwe3lORlCEwkSHRhtF\ncP9Ymd70/aTSVaYgLXTWNLxBo1BfASdWtL4ndQavEi51mI38AjEAi/V3bNTIZargCyzuFJ0nN6T5\nU6VR5CmD1/iQMVtCnwr1/q4AaOeMSQ+2b1tbFfLn\n-----END CERTIFICATE-----\n\nHiPKI Root CA - G1\n==================\n-----BEGIN CERTIFICATE-----\nMIIFajCCA1KgAwIBAgIQLd2szmKXlKFD6LDNdmpeYDANBgkqhkiG9w0BAQsFADBPMQswCQYDVQQG\nEwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xGzAZBgNVBAMMEkhpUEtJ\nIFJvb3QgQ0EgLSBHMTAeFw0xOTAyMjIwOTQ2MDRaFw0zNzEyMzExNTU5NTlaME8xCzAJBgNVBAYT\nAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEbMBkGA1UEAwwSSGlQS0kg\nUm9vdCBDQSAtIEcxMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA9B5/UnMyDHPkvRN0\no9QwqNCuS9i233VHZvR85zkEHmpwINJaR3JnVfSl6J3VHiGh8Ge6zCFovkRTv4354twvVcg3Px+k\nwJyz5HdcoEb+d/oaoDjq7Zpy3iu9lFc6uux55199QmQ5eiY29yTw1S+6lZgRZq2XNdZ1AYDgr/SE\nYYwNHl98h5ZeQa/rh+r4XfEuiAU+TCK72h8q3VJGZDnzQs7ZngyzsHeXZJzA9KMuH5UHsBffMNsA\nGJZMoYFL3QRtU6M9/Aes1MU3guvklQgZKILSQjqj2FPseYlgSGDIcpJQ3AOPgz+yQlda22rpEZfd\nhSi8MEyr48KxRURHH+CKFgeW0iEPU8DtqX7UTuybCeyvQqww1r/REEXgphaypcXTT3OUM3ECoWqj\n1jOXTyFjHluP2cFeRXF3D4FdXyGarYPM+l7WjSNfGz1BryB1ZlpK9p/7qxj3ccC2HTHsOyDry+K4\n9a6SsvfhhEvyovKTmiKe0xRvNlS9H15ZFblzqMF8b3ti6RZsR1pl8w4Rm0bZ/W3c1pzAtH2lsN0/\nVm+h+fbkEkj9Bn8SV7apI09bA8PgcSojt/ewsTu8mL3WmKgMa/aOEmem8rJY5AIJEzypuxC00jBF\n8ez3ABHfZfjcK0NVvxaXxA/VLGGEqnKG/uY6fsI/fe78LxQ+5oXdUG+3Se0CAwEAAaNCMEAwDwYD\nVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU8ncX+l6o/vY9cdVouslGDDjYr7AwDgYDVR0PAQH/BAQD\nAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBQUfB13HAE4/+qddRxosuej6ip0691x1TPOhwEmSKsxBHi\n7zNKpiMdDg1H2DfHb680f0+BazVP6XKlMeJ45/dOlBhbQH3PayFUhuaVevvGyuqcSE5XCV0vrPSl\ntJczWNWseanMX/mF+lLFjfiRFOs6DRfQUsJ748JzjkZ4Bjgs6FzaZsT0pPBWGTMpWmWSBUdGSquE\nwx4noR8RkpkndZMPvDY7l1ePJlsMu5wP1G4wB9TcXzZoZjmDlicmisjEOf6aIW/Vcobpf2Lll07Q\nJNBAsNB1CI69aO4I1258EHBGG3zgiLKecoaZAeO/n0kZtCW+VmWuF2PlHt/o/0elv+EmBYTksMCv\n5wiZqAxeJoBF1PhoL5aPruJKHJwWDBNvOIf2u8g0X5IDUXlwpt/L9ZlNec1OvFefQ05rLisY+Gpz\njLrFNe85akEez3GoorKGB1s6yeHvP2UEgEcyRHCVTjFnanRbEEV16rCf0OY1/k6fi8wrkkVbbiVg\nhUbN0aqwdmaTd5a+g744tiROJgvM7XpWGuDpWsZkrUx6AEhEL7lAuxM+vhV4nYWBSipX3tUZQ9rb\nyltHhoMLP7YNdnhzeSJesYAfz77RP1YQmCuVh6EfnWQUYDksswBVLuT1sw5XxJFBAJw/6KXf6vb/\nyPCtbVKoF6ubYfwSUTXkJf2vqmqGOQ==\n-----END CERTIFICATE-----\n\nGlobalSign ECC Root CA - R4\n===========================\n-----BEGIN CERTIFICATE-----\nMIIB3DCCAYOgAwIBAgINAgPlfvU/k/2lCSGypjAKBggqhkjOPQQDAjBQMSQwIgYDVQQLExtHbG9i\nYWxTaWduIEVDQyBSb290IENBIC0gUjQxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds\nb2JhbFNpZ24wHhcNMTIxMTEzMDAwMDAwWhcNMzgwMTE5MDMxNDA3WjBQMSQwIgYDVQQLExtHbG9i\nYWxTaWduIEVDQyBSb290IENBIC0gUjQxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds\nb2JhbFNpZ24wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAS4xnnTj2wlDp8uORkcA6SumuU5BwkW\nymOxuYb4ilfBV85C+nOh92VC/x7BALJucw7/xyHlGKSq2XE/qNS5zowdo0IwQDAOBgNVHQ8BAf8E\nBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVLB7rUW44kB/+wpu+74zyTyjhNUwCgYI\nKoZIzj0EAwIDRwAwRAIgIk90crlgr/HmnKAWBVBfw147bmF0774BxL4YSFlhgjICICadVGNA3jdg\nUM/I2O2dgq43mLyjj0xMqTQrbO/7lZsm\n-----END CERTIFICATE-----\n\nGTS Root R1\n===========\n-----BEGIN CERTIFICATE-----\nMIIFVzCCAz+gAwIBAgINAgPlk28xsBNJiGuiFzANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQGEwJV\nUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg\nUjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE\nChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIiMA0G\nCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx9vaM\nf/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7wCl7raKb0\nxlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjwTcLCeoiKu7rPWRnWr4+w\nB7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0PfyblqAj+lug8aJRT7oM6iCsVlgmy4HqMLnXW\nnOunVmSPlk9orj2XwoSPwLxAwAtcvfaHszVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly4cpk\n9+aCEI3oncKKiPo4Zor8Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr06zq\nkUspzBmkMiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92wO1A\nK/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70paDPvOmbsB4om3xPX\nV2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrNVjzRlwW5y0vtOUucxD/SVRNuJLDW\ncfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0T\nAQH/BAUwAwEB/zAdBgNVHQ4EFgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEMBQAD\nggIBAJ+qQibbC5u+/x6Wki4+omVKapi6Ist9wTrYggoGxval3sBOh2Z5ofmmWJyq+bXmYOfg6LEe\nQkEzCzc9zolwFcq1JKjPa7XSQCGYzyI0zzvFIoTgxQ6KfF2I5DUkzps+GlQebtuyh6f88/qBVRRi\nClmpIgUxPoLW7ttXNLwzldMXG+gnoot7TiYaelpkttGsN/H9oPM47HLwEXWdyzRSjeZ2axfG34ar\nJ45JK3VmgRAhpuo+9K4l/3wV3s6MJT/KYnAK9y8JZgfIPxz88NtFMN9iiMG1D53Dn0reWVlHxYci\nNuaCp+0KueIHoI17eko8cdLiA6EfMgfdG+RCzgwARWGAtQsgWSl4vflVy2PFPEz0tv/bal8xa5me\nLMFrUKTX5hgUvYU/Z6tGn6D/Qqc6f1zLXbBwHSs09dR2CQzreExZBfMzQsNhFRAbd03OIozUhfJF\nfbdT6u9AWpQKXCBfTkBdYiJ23//OYb2MI3jSNwLgjt7RETeJ9r/tSQdirpLsQBqvFAnZ0E6yove+\n7u7Y/9waLd64NnHi/Hm3lCXRSHNboTXns5lndcEZOitHTtNCjv0xyBZm2tIMPNuzjsmhDYAPexZ3\nFL//2wmUspO8IFgV6dtxQ/PeEMMA3KgqlbbC1j+Qa3bbbP6MvPJwNQzcmRk13NfIRmPVNnGuV/u3\ngm3c\n-----END CERTIFICATE-----\n\nGTS Root R2\n===========\n-----BEGIN CERTIFICATE-----\nMIIFVzCCAz+gAwIBAgINAgPlrsWNBCUaqxElqjANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQGEwJV\nUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg\nUjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE\nChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIiMA0G\nCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTukk3Lv\nCvptnfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3KgGjSY6Dlo7JUl\ne3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9BuXvAuMC6C/Pq8tBcKSOWIm8Wb\na96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOdre7kRXuJVfeKH2JShBKzwkCX44ofR5GmdFrS\n+LFjKBC4swm4VndAoiaYecb+3yXuPuWgf9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbuak7M\nkogwTZq9TwtImoS1mKPV+3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscszcTJG\nr61K8YzodDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqjx5RWIr9q\nS34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsRnTKaG73VululycslaVNV\nJ1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0kzCqgc7dGtxRcw1PcOnlthYhGXmy5okL\ndWTK1au8CcEYof/UVKGFPP0UJAOyh9OktwIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0T\nAQH/BAUwAwEB/zAdBgNVHQ4EFgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEMBQAD\nggIBAB/Kzt3HvqGf2SdMC9wXmBFqiN495nFWcrKeGk6c1SuYJF2ba3uwM4IJvd8lRuqYnrYb/oM8\n0mJhwQTtzuDFycgTE1XnqGOtjHsB/ncw4c5omwX4Eu55MaBBRTUoCnGkJE+M3DyCB19m3H0Q/gxh\nswWV7uGugQ+o+MePTagjAiZrHYNSVc61LwDKgEDg4XSsYPWHgJ2uNmSRXbBoGOqKYcl3qJfEycel\n/FVL8/B/uWU9J2jQzGv6U53hkRrJXRqWbTKH7QMgyALOWr7Z6v2yTcQvG99fevX4i8buMTolUVVn\njWQye+mew4K6Ki3pHrTgSAai/GevHyICc/sgCq+dVEuhzf9gR7A/Xe8bVr2XIZYtCtFenTgCR2y5\n9PYjJbigapordwj6xLEokCZYCDzifqrXPW+6MYgKBesntaFJ7qBFVHvmJ2WZICGoo7z7GJa7Um8M\n7YNRTOlZ4iBgxcJlkoKM8xAfDoqXvneCbT+PHV28SSe9zE8P4c52hgQjxcCMElv924SgJPFI/2R8\n0L5cFtHvma3AH/vLrrw4IgYmZNralw4/KBVEqE8AyvCazM90arQ+POuV7LXTWtiBmelDGDfrs7vR\nWGJB82bSj6p4lVQgw1oudCvV0b4YacCs1aTPObpRhANl6WLAYv7YTVWW4tAR+kg0Eeye7QUd5MjW\nHYbL\n-----END CERTIFICATE-----\n\nGTS Root R3\n===========\n-----BEGIN CERTIFICATE-----\nMIICCTCCAY6gAwIBAgINAgPluILrIPglJ209ZjAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJVUzEi\nMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMw\nHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZ\nR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcqhkjO\nPQIBBgUrgQQAIgNiAAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUURout\n736GjOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL24CejQjBA\nMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTB8Sa6oC2uhYHP0/Eq\nEr24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEA9uEglRR7VKOQFhG/hMjqb2sXnh5GmCCbn9MN2azT\nL818+FsuVbu/3ZL3pAzcMeGiAjEA/JdmZuVDFhOD3cffL74UOO0BzrEXGhF16b0DjyZ+hOXJYKaV\n11RZt+cRLInUue4X\n-----END CERTIFICATE-----\n\nGTS Root R4\n===========\n-----BEGIN CERTIFICATE-----\nMIICCTCCAY6gAwIBAgINAgPlwGjvYxqccpBQUjAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJVUzEi\nMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQw\nHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZ\nR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcqhkjO\nPQIBBgUrgQQAIgNiAATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa6zzu\nhXyiQHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvRHYqjQjBA\nMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSATNbrdP9JNqPV2Py1\nPsVq8JQdjDAKBggqhkjOPQQDAwNpADBmAjEA6ED/g94D9J+uHXqnLrmvT/aDHQ4thQEd0dlq7A/C\nr8deVl5c1RxYIigL9zC2L7F8AjEA8GE8p/SgguMh1YQdc4acLa/KNJvxn7kjNuK8YAOdgLOaVsjh\n4rsUecrNIdSUtUlD\n-----END CERTIFICATE-----\n\nTelia Root CA v2\n================\n-----BEGIN CERTIFICATE-----\nMIIFdDCCA1ygAwIBAgIPAWdfJ9b+euPkrL4JWwWeMA0GCSqGSIb3DQEBCwUAMEQxCzAJBgNVBAYT\nAkZJMRowGAYDVQQKDBFUZWxpYSBGaW5sYW5kIE95ajEZMBcGA1UEAwwQVGVsaWEgUm9vdCBDQSB2\nMjAeFw0xODExMjkxMTU1NTRaFw00MzExMjkxMTU1NTRaMEQxCzAJBgNVBAYTAkZJMRowGAYDVQQK\nDBFUZWxpYSBGaW5sYW5kIE95ajEZMBcGA1UEAwwQVGVsaWEgUm9vdCBDQSB2MjCCAiIwDQYJKoZI\nhvcNAQEBBQADggIPADCCAgoCggIBALLQPwe84nvQa5n44ndp586dpAO8gm2h/oFlH0wnrI4AuhZ7\n6zBqAMCzdGh+sq/H1WKzej9Qyow2RCRj0jbpDIX2Q3bVTKFgcmfiKDOlyzG4OiIjNLh9vVYiQJ3q\n9HsDrWj8soFPmNB06o3lfc1jw6P23pLCWBnglrvFxKk9pXSW/q/5iaq9lRdU2HhE8Qx3FZLgmEKn\npNaqIJLNwaCzlrI6hEKNfdWV5Nbb6WLEWLN5xYzTNTODn3WhUidhOPFZPY5Q4L15POdslv5e2QJl\ntI5c0BE0312/UqeBAMN/mUWZFdUXyApT7GPzmX3MaRKGwhfwAZ6/hLzRUssbkmbOpFPlob/E2wnW\n5olWK8jjfN7j/4nlNW4o6GwLI1GpJQXrSPjdscr6bAhR77cYbETKJuFzxokGgeWKrLDiKca5JLNr\nRBH0pUPCTEPlcDaMtjNXepUugqD0XBCzYYP2AgWGLnwtbNwDRm41k9V6lS/eINhbfpSQBGq6WT0E\nBXWdN6IOLj3rwaRSg/7Qa9RmjtzG6RJOHSpXqhC8fF6CfaamyfItufUXJ63RDolUK5X6wK0dmBR4\nM0KGCqlztft0DbcbMBnEWg4cJ7faGND/isgFuvGqHKI3t+ZIpEYslOqodmJHixBTB0hXbOKSTbau\nBcvcwUpej6w9GU7C7WB1K9vBykLVAgMBAAGjYzBhMB8GA1UdIwQYMBaAFHKs5DN5qkWH9v2sHZ7W\nxy+G2CQ5MB0GA1UdDgQWBBRyrOQzeapFh/b9rB2e1scvhtgkOTAOBgNVHQ8BAf8EBAMCAQYwDwYD\nVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAoDtZpwmUPjaE0n4vOaWWl/oRrfxn83EJ\n8rKJhGdEr7nv7ZbsnGTbMjBvZ5qsfl+yqwE2foH65IRe0qw24GtixX1LDoJt0nZi0f6X+J8wfBj5\ntFJ3gh1229MdqfDBmgC9bXXYfef6xzijnHDoRnkDry5023X4blMMA8iZGok1GTzTyVR8qPAs5m4H\neW9q4ebqkYJpCh3DflminmtGFZhb069GHWLIzoBSSRE/yQQSwxN8PzuKlts8oB4KtItUsiRnDe+C\ny748fdHif64W1lZYudogsYMVoe+KTTJvQS8TUoKU1xrBeKJR3Stwbbca+few4GeXVtt8YVMJAygC\nQMez2P2ccGrGKMOF6eLtGpOg3kuYooQ+BXcBlj37tCAPnHICehIv1aO6UXivKitEZU61/Qrowc15\nh2Er3oBXRb9n8ZuRXqWk7FlIEA04x7D6w0RtBPV4UBySllva9bguulvP5fBqnUsvWHMtTy3EHD70\nsz+rFQ47GUGKpMFXEmZxTPpT41frYpUJnlTd0cI8Vzy9OK2YZLe4A5pTVmBds9hCG1xLEooc6+t9\nxnppxyd/pPiL8uSUZodL6ZQHCRJ5irLrdATczvREWeAWysUsWNc8e89ihmpQfTU2Zqf7N+cox9jQ\nraVplI/owd8k+BsHMYeB2F326CjYSlKArBPuUBQemMc=\n-----END CERTIFICATE-----\n\nD-TRUST BR Root CA 1 2020\n=========================\n-----BEGIN CERTIFICATE-----\nMIIC2zCCAmCgAwIBAgIQfMmPK4TX3+oPyWWa00tNljAKBggqhkjOPQQDAzBIMQswCQYDVQQGEwJE\nRTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMSIwIAYDVQQDExlELVRSVVNUIEJSIFJvb3QgQ0EgMSAy\nMDIwMB4XDTIwMDIxMTA5NDUwMFoXDTM1MDIxMTA5NDQ1OVowSDELMAkGA1UEBhMCREUxFTATBgNV\nBAoTDEQtVHJ1c3QgR21iSDEiMCAGA1UEAxMZRC1UUlVTVCBCUiBSb290IENBIDEgMjAyMDB2MBAG\nByqGSM49AgEGBSuBBAAiA2IABMbLxyjR+4T1mu9CFCDhQ2tuda38KwOE1HaTJddZO0Flax7mNCq7\ndPYSzuht56vkPE4/RAiLzRZxy7+SmfSk1zxQVFKQhYN4lGdnoxwJGT11NIXe7WB9xwy0QVK5buXu\nQqOCAQ0wggEJMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFHOREKv/VbNafAkl1bK6CKBrqx9t\nMA4GA1UdDwEB/wQEAwIBBjCBxgYDVR0fBIG+MIG7MD6gPKA6hjhodHRwOi8vY3JsLmQtdHJ1c3Qu\nbmV0L2NybC9kLXRydXN0X2JyX3Jvb3RfY2FfMV8yMDIwLmNybDB5oHegdYZzbGRhcDovL2RpcmVj\ndG9yeS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwQlIlMjBSb290JTIwQ0ElMjAxJTIwMjAyMCxP\nPUQtVHJ1c3QlMjBHbWJILEM9REU/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdDAKBggqhkjOPQQD\nAwNpADBmAjEAlJAtE/rhY/hhY+ithXhUkZy4kzg+GkHaQBZTQgjKL47xPoFWwKrY7RjEsK70Pvom\nAjEA8yjixtsrmfu3Ubgko6SUeho/5jbiA1czijDLgsfWFBHVdWNbFJWcHwHP2NVypw87\n-----END CERTIFICATE-----\n\nD-TRUST EV Root CA 1 2020\n=========================\n-----BEGIN CERTIFICATE-----\nMIIC2zCCAmCgAwIBAgIQXwJB13qHfEwDo6yWjfv/0DAKBggqhkjOPQQDAzBIMQswCQYDVQQGEwJE\nRTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMSIwIAYDVQQDExlELVRSVVNUIEVWIFJvb3QgQ0EgMSAy\nMDIwMB4XDTIwMDIxMTEwMDAwMFoXDTM1MDIxMTA5NTk1OVowSDELMAkGA1UEBhMCREUxFTATBgNV\nBAoTDEQtVHJ1c3QgR21iSDEiMCAGA1UEAxMZRC1UUlVTVCBFViBSb290IENBIDEgMjAyMDB2MBAG\nByqGSM49AgEGBSuBBAAiA2IABPEL3YZDIBnfl4XoIkqbz52Yv7QFJsnL46bSj8WeeHsxiamJrSc8\nZRCC/N/DnU7wMyPE0jL1HLDfMxddxfCxivnvubcUyilKwg+pf3VlSSowZ/Rk99Yad9rDwpdhQntJ\nraOCAQ0wggEJMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFH8QARY3OqQo5FD4pPfsazK2/umL\nMA4GA1UdDwEB/wQEAwIBBjCBxgYDVR0fBIG+MIG7MD6gPKA6hjhodHRwOi8vY3JsLmQtdHJ1c3Qu\nbmV0L2NybC9kLXRydXN0X2V2X3Jvb3RfY2FfMV8yMDIwLmNybDB5oHegdYZzbGRhcDovL2RpcmVj\ndG9yeS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwRVYlMjBSb290JTIwQ0ElMjAxJTIwMjAyMCxP\nPUQtVHJ1c3QlMjBHbWJILEM9REU/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdDAKBggqhkjOPQQD\nAwNpADBmAjEAyjzGKnXCXnViOTYAYFqLwZOZzNnbQTs7h5kXO9XMT8oi96CAy/m0sRtW9XLS/BnR\nAjEAkfcwkz8QRitxpNA7RJvAKQIFskF3UfN5Wp6OFKBOQtJbgfM0agPnIjhQW+0ZT0MW\n-----END CERTIFICATE-----\n\nDigiCert TLS ECC P384 Root G5\n=============================\n-----BEGIN CERTIFICATE-----\nMIICGTCCAZ+gAwIBAgIQCeCTZaz32ci5PhwLBCou8zAKBggqhkjOPQQDAzBOMQswCQYDVQQGEwJV\nUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJjAkBgNVBAMTHURpZ2lDZXJ0IFRMUyBFQ0MgUDM4\nNCBSb290IEc1MB4XDTIxMDExNTAwMDAwMFoXDTQ2MDExNDIzNTk1OVowTjELMAkGA1UEBhMCVVMx\nFzAVBgNVBAoTDkRpZ2lDZXJ0LCBJbmMuMSYwJAYDVQQDEx1EaWdpQ2VydCBUTFMgRUNDIFAzODQg\nUm9vdCBHNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABMFEoc8Rl1Ca3iOCNQfN0MsYndLxf3c1Tzvd\nlHJS7cI7+Oz6e2tYIOyZrsn8aLN1udsJ7MgT9U7GCh1mMEy7H0cKPGEQQil8pQgO4CLp0zVozptj\nn4S1mU1YoI71VOeVyaNCMEAwHQYDVR0OBBYEFMFRRVBZqz7nLFr6ICISB4CIfBFqMA4GA1UdDwEB\n/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMDA2gAMGUCMQCJao1H5+z8blUD2Wds\nJk6Dxv3J+ysTvLd6jLRl0mlpYxNjOyZQLgGheQaRnUi/wr4CMEfDFXuxoJGZSZOoPHzoRgaLLPIx\nAJSdYsiJvRmEFOml+wG4DXZDjC5Ty3zfDBeWUA==\n-----END CERTIFICATE-----\n\nDigiCert TLS RSA4096 Root G5\n============================\n-----BEGIN CERTIFICATE-----\nMIIFZjCCA06gAwIBAgIQCPm0eKj6ftpqMzeJ3nzPijANBgkqhkiG9w0BAQwFADBNMQswCQYDVQQG\nEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMTHERpZ2lDZXJ0IFRMUyBSU0E0\nMDk2IFJvb3QgRzUwHhcNMjEwMTE1MDAwMDAwWhcNNDYwMTE0MjM1OTU5WjBNMQswCQYDVQQGEwJV\nUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMTHERpZ2lDZXJ0IFRMUyBSU0E0MDk2\nIFJvb3QgRzUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz0PTJeRGd/fxmgefM1eS8\n7IE+ajWOLrfn3q/5B03PMJ3qCQuZvWxX2hhKuHisOjmopkisLnLlvevxGs3npAOpPxG02C+JFvuU\nAT27L/gTBaF4HI4o4EXgg/RZG5Wzrn4DReW+wkL+7vI8toUTmDKdFqgpwgscONyfMXdcvyej/Ces\ntyu9dJsXLfKB2l2w4SMXPohKEiPQ6s+d3gMXsUJKoBZMpG2T6T867jp8nVid9E6P/DsjyG244gXa\nzOvswzH016cpVIDPRFtMbzCe88zdH5RDnU1/cHAN1DrRN/BsnZvAFJNY781BOHW8EwOVfH/jXOnV\nDdXifBBiqmvwPXbzP6PosMH976pXTayGpxi0KcEsDr9kvimM2AItzVwv8n/vFfQMFawKsPHTDU9q\nTXeXAaDxZre3zu/O7Oyldcqs4+Fj97ihBMi8ez9dLRYiVu1ISf6nL3kwJZu6ay0/nTvEF+cdLvvy\nz6b84xQslpghjLSR6Rlgg/IwKwZzUNWYOwbpx4oMYIwo+FKbbuH2TbsGJJvXKyY//SovcfXWJL5/\nMZ4PbeiPT02jP/816t9JXkGPhvnxd3lLG7SjXi/7RgLQZhNeXoVPzthwiHvOAbWWl9fNff2C+MIk\nwcoBOU+NosEUQB+cZtUMCUbW8tDRSHZWOkPLtgoRObqME2wGtZ7P6wIDAQABo0IwQDAdBgNVHQ4E\nFgQUUTMc7TZArxfTJc1paPKvTiM+s0EwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8w\nDQYJKoZIhvcNAQEMBQADggIBAGCmr1tfV9qJ20tQqcQjNSH/0GEwhJG3PxDPJY7Jv0Y02cEhJhxw\nGXIeo8mH/qlDZJY6yFMECrZBu8RHANmfGBg7sg7zNOok992vIGCukihfNudd5N7HPNtQOa27PShN\nlnx2xlv0wdsUpasZYgcYQF+Xkdycx6u1UQ3maVNVzDl92sURVXLFO4uJ+DQtpBflF+aZfTCIITfN\nMBc9uPK8qHWgQ9w+iUuQrm0D4ByjoJYJu32jtyoQREtGBzRj7TG5BO6jm5qu5jF49OokYTurWGT/\nu4cnYiWB39yhL/btp/96j1EuMPikAdKFOV8BmZZvWltwGUb+hmA+rYAQCd05JS9Yf7vSdPD3Rh9G\nOUrYU9DzLjtxpdRv/PNn5AeP3SYZ4Y1b+qOTEZvpyDrDVWiakuFSdjjo4bq9+0/V77PnSIMx8IIh\n47a+p6tv75/fTM8BuGJqIz3nCU2AG3swpMPdB380vqQmsvZB6Akd4yCYqjdP//fx4ilwMUc/dNAU\nFvohigLVigmUdy7yWSiLfFCSCmZ4OIN1xLVaqBHG5cGdZlXPU8Sv13WFqUITVuwhd4GTWgzqltlJ\nyqEI8pc7bZsEGCREjnwB8twl2F6GmrE52/WRMmrRpnCKovfepEWFJqgejF0pW8hL2JpqA15w8oVP\nbEtoL8pU9ozaMv7Da4M/OMZ+\n-----END CERTIFICATE-----\n\nCertainly Root R1\n=================\n-----BEGIN CERTIFICATE-----\nMIIFRzCCAy+gAwIBAgIRAI4P+UuQcWhlM1T01EQ5t+AwDQYJKoZIhvcNAQELBQAwPTELMAkGA1UE\nBhMCVVMxEjAQBgNVBAoTCUNlcnRhaW5seTEaMBgGA1UEAxMRQ2VydGFpbmx5IFJvb3QgUjEwHhcN\nMjEwNDAxMDAwMDAwWhcNNDYwNDAxMDAwMDAwWjA9MQswCQYDVQQGEwJVUzESMBAGA1UEChMJQ2Vy\ndGFpbmx5MRowGAYDVQQDExFDZXJ0YWlubHkgUm9vdCBSMTCCAiIwDQYJKoZIhvcNAQEBBQADggIP\nADCCAgoCggIBANA21B/q3avk0bbm+yLA3RMNansiExyXPGhjZjKcA7WNpIGD2ngwEc/csiu+kr+O\n5MQTvqRoTNoCaBZ0vrLdBORrKt03H2As2/X3oXyVtwxwhi7xOu9S98zTm/mLvg7fMbedaFySpvXl\n8wo0tf97ouSHocavFwDvA5HtqRxOcT3Si2yJ9HiG5mpJoM610rCrm/b01C7jcvk2xusVtyWMOvwl\nDbMicyF0yEqWYZL1LwsYpfSt4u5BvQF5+paMjRcCMLT5r3gajLQ2EBAHBXDQ9DGQilHFhiZ5shGI\nXsXwClTNSaa/ApzSRKft43jvRl5tcdF5cBxGX1HpyTfcX35pe0HfNEXgO4T0oYoKNp43zGJS4YkN\nKPl6I7ENPT2a/Z2B7yyQwHtETrtJ4A5KVpK8y7XdeReJkd5hiXSSqOMyhb5OhaRLWcsrxXiOcVTQ\nAjeZjOVJ6uBUcqQRBi8LjMFbvrWhsFNunLhgkR9Za/kt9JQKl7XsxXYDVBtlUrpMklZRNaBA2Cnb\nrlJ2Oy0wQJuK0EJWtLeIAaSHO1OWzaMWj/Nmqhexx2DgwUMFDO6bW2BvBlyHWyf5QBGenDPBt+U1\nVwV/J84XIIwc/PH72jEpSe31C4SnT8H2TsIonPru4K8H+zMReiFPCyEQtkA6qyI6BJyLm4SGcprS\np6XEtHWRqSsjAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud\nDgQWBBTgqj8ljZ9EXME66C6ud0yEPmcM9DANBgkqhkiG9w0BAQsFAAOCAgEAuVevuBLaV4OPaAsz\nHQNTVfSVcOQrPbA56/qJYv331hgELyE03fFo8NWWWt7CgKPBjcZq91l3rhVkz1t5BXdm6ozTaw3d\n8VkswTOlMIAVRQdFGjEitpIAq5lNOo93r6kiyi9jyhXWx8bwPWz8HA2YEGGeEaIi1wrykXprOQ4v\nMMM2SZ/g6Q8CRFA3lFV96p/2O7qUpUzpvD5RtOjKkjZUbVwlKNrdrRT90+7iIgXr0PK3aBLXWopB\nGsaSpVo7Y0VPv+E6dyIvXL9G+VoDhRNCX8reU9ditaY1BMJH/5n9hN9czulegChB8n3nHpDYT3Y+\ngjwN/KUD+nsa2UUeYNrEjvn8K8l7lcUq/6qJ34IxD3L/DCfXCh5WAFAeDJDBlrXYFIW7pw0WwfgH\nJBu6haEaBQmAupVjyTrsJZ9/nbqkRxWbRHDxakvWOF5D8xh+UG7pWijmZeZ3Gzr9Hb4DJqPb1OG7\nfpYnKx3upPvaJVQTA945xsMfTZDsjxtK0hzthZU4UHlG1sGQUDGpXJpuHfUzVounmdLyyCwzk5Iw\nx06MZTMQZBf9JBeW0Y3COmor6xOLRPIh80oat3df1+2IpHLlOR+Vnb5nwXARPbv0+Em34yaXOp/S\nX3z7wJl8OSngex2/DaeP0ik0biQVy96QXr8axGbqwua6OV+KmalBWQewLK8=\n-----END CERTIFICATE-----\n\nCertainly Root E1\n=================\n-----BEGIN CERTIFICATE-----\nMIIB9zCCAX2gAwIBAgIQBiUzsUcDMydc+Y2aub/M+DAKBggqhkjOPQQDAzA9MQswCQYDVQQGEwJV\nUzESMBAGA1UEChMJQ2VydGFpbmx5MRowGAYDVQQDExFDZXJ0YWlubHkgUm9vdCBFMTAeFw0yMTA0\nMDEwMDAwMDBaFw00NjA0MDEwMDAwMDBaMD0xCzAJBgNVBAYTAlVTMRIwEAYDVQQKEwlDZXJ0YWlu\nbHkxGjAYBgNVBAMTEUNlcnRhaW5seSBSb290IEUxMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE3m/4\nfxzf7flHh4axpMCK+IKXgOqPyEpeKn2IaKcBYhSRJHpcnqMXfYqGITQYUBsQ3tA3SybHGWCA6TS9\nYBk2QNYphwk8kXr2vBMj3VlOBF7PyAIcGFPBMdjaIOlEjeR2o0IwQDAOBgNVHQ8BAf8EBAMCAQYw\nDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU8ygYy2R17ikq6+2uI1g4hevIIgcwCgYIKoZIzj0E\nAwMDaAAwZQIxALGOWiDDshliTd6wT99u0nCK8Z9+aozmut6Dacpps6kFtZaSF4fC0urQe87YQVt8\nrgIwRt7qy12a7DLCZRawTDBcMPPaTnOGBtjOiQRINzf43TNRnXCve1XYAS59BWQOhriR\n-----END CERTIFICATE-----\n\nSecurity Communication RootCA3\n==============================\n-----BEGIN CERTIFICATE-----\nMIIFfzCCA2egAwIBAgIJAOF8N0D9G/5nMA0GCSqGSIb3DQEBDAUAMF0xCzAJBgNVBAYTAkpQMSUw\nIwYDVQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMScwJQYDVQQDEx5TZWN1cml0eSBD\nb21tdW5pY2F0aW9uIFJvb3RDQTMwHhcNMTYwNjE2MDYxNzE2WhcNMzgwMTE4MDYxNzE2WjBdMQsw\nCQYDVQQGEwJKUDElMCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UE\nAxMeU2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0EzMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A\nMIICCgKCAgEA48lySfcw3gl8qUCBWNO0Ot26YQ+TUG5pPDXC7ltzkBtnTCHsXzW7OT4rCmDvu20r\nhvtxosis5FaU+cmvsXLUIKx00rgVrVH+hXShuRD+BYD5UpOzQD11EKzAlrenfna84xtSGc4RHwsE\nNPXY9Wk8d/Nk9A2qhd7gCVAEF5aEt8iKvE1y/By7z/MGTfmfZPd+pmaGNXHIEYBMwXFAWB6+oHP2\n/D5Q4eAvJj1+XCO1eXDe+uDRpdYMQXF79+qMHIjH7Iv10S9VlkZ8WjtYO/u62C21Jdp6Ts9EriGm\nnpjKIG58u4iFW/vAEGK78vknR+/RiTlDxN/e4UG/VHMgly1s2vPUB6PmudhvrvyMGS7TZ2crldtY\nXLVqAvO4g160a75BflcJdURQVc1aEWEhCmHCqYj9E7wtiS/NYeCVvsq1e+F7NGcLH7YMx3weGVPK\np7FKFSBWFHA9K4IsD50VHUeAR/94mQ4xr28+j+2GaR57GIgUssL8gjMunEst+3A7caoreyYn8xrC\n3PsXuKHqy6C0rtOUfnrQq8PsOC0RLoi/1D+tEjtCrI8Cbn3M0V9hvqG8OmpI6iZVIhZdXw3/JzOf\nGAN0iltSIEdrRU0id4xVJ/CvHozJgyJUt5rQT9nO/NkuHJYosQLTA70lUhw0Zk8jq/R3gpYd0Vcw\nCBEF/VfR2ccCAwEAAaNCMEAwHQYDVR0OBBYEFGQUfPxYchamCik0FW8qy7z8r6irMA4GA1UdDwEB\n/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBDAUAA4ICAQDcAiMI4u8hOscNtybS\nYpOnpSNyByCCYN8Y11StaSWSntkUz5m5UoHPrmyKO1o5yGwBQ8IibQLwYs1OY0PAFNr0Y/Dq9HHu\nTofjcan0yVflLl8cebsjqodEV+m9NU1Bu0soo5iyG9kLFwfl9+qd9XbXv8S2gVj/yP9kaWJ5rW4O\nH3/uHWnlt3Jxs/6lATWUVCvAUm2PVcTJ0rjLyjQIUYWg9by0F1jqClx6vWPGOi//lkkZhOpn2ASx\nYfQAW0q3nHE3GYV5v4GwxxMOdnE+OoAGrgYWp421wsTL/0ClXI2lyTrtcoHKXJg80jQDdwj98ClZ\nXSEIx2C/pHF7uNkegr4Jr2VvKKu/S7XuPghHJ6APbw+LP6yVGPO5DtxnVW5inkYO0QR4ynKudtml\n+LLfiAlhi+8kTtFZP1rUPcmTPCtk9YENFpb3ksP+MW/oKjJ0DvRMmEoYDjBU1cXrvMUVnuiZIesn\nKwkK2/HmcBhWuwzkvvnoEKQTkrgc4NtnHVMDpCKn3F2SEDzq//wbEBrD2NCcnWXL0CsnMQMeNuE9\ndnUM/0Umud1RvCPHX9jYhxBAEg09ODfnRDwYwFMJZI//1ZqmfHAuc1Uh6N//g7kdPjIe1qZ9LPFm\n6Vwdp6POXiUyK+OVrCoHzrQoeIY8LaadTdJ0MN1kURXbg4NR16/9M51NZg==\n-----END CERTIFICATE-----\n\nSecurity Communication ECC RootCA1\n==================================\n-----BEGIN CERTIFICATE-----\nMIICODCCAb6gAwIBAgIJANZdm7N4gS7rMAoGCCqGSM49BAMDMGExCzAJBgNVBAYTAkpQMSUwIwYD\nVQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMSswKQYDVQQDEyJTZWN1cml0eSBDb21t\ndW5pY2F0aW9uIEVDQyBSb290Q0ExMB4XDTE2MDYxNjA1MTUyOFoXDTM4MDExODA1MTUyOFowYTEL\nMAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xKzApBgNV\nBAMTIlNlY3VyaXR5IENvbW11bmljYXRpb24gRUNDIFJvb3RDQTEwdjAQBgcqhkjOPQIBBgUrgQQA\nIgNiAASkpW9gAwPDvTH00xecK4R1rOX9PVdu12O/5gSJko6BnOPpR27KkBLIE+CnnfdldB9sELLo\n5OnvbYUymUSxXv3MdhDYW72ixvnWQuRXdtyQwjWpS4g8EkdtXP9JTxpKULGjQjBAMB0GA1UdDgQW\nBBSGHOf+LaVKiwj+KBH6vqNm+GBZLzAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAK\nBggqhkjOPQQDAwNoADBlAjAVXUI9/Lbu9zuxNuie9sRGKEkz0FhDKmMpzE2xtHqiuQ04pV1IKv3L\nsnNdo4gIxwwCMQDAqy0Obe0YottT6SXbVQjgUMzfRGEWgqtJsLKB7HOHeLRMsmIbEvoWTSVLY70e\nN9k=\n-----END CERTIFICATE-----\n\nBJCA Global Root CA1\n====================\n-----BEGIN CERTIFICATE-----\nMIIFdDCCA1ygAwIBAgIQVW9l47TZkGobCdFsPsBsIDANBgkqhkiG9w0BAQsFADBUMQswCQYDVQQG\nEwJDTjEmMCQGA1UECgwdQkVJSklORyBDRVJUSUZJQ0FURSBBVVRIT1JJVFkxHTAbBgNVBAMMFEJK\nQ0EgR2xvYmFsIFJvb3QgQ0ExMB4XDTE5MTIxOTAzMTYxN1oXDTQ0MTIxMjAzMTYxN1owVDELMAkG\nA1UEBhMCQ04xJjAkBgNVBAoMHUJFSUpJTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZMR0wGwYDVQQD\nDBRCSkNBIEdsb2JhbCBSb290IENBMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAPFm\nCL3ZxRVhy4QEQaVpN3cdwbB7+sN3SJATcmTRuHyQNZ0YeYjjlwE8R4HyDqKYDZ4/N+AZspDyRhyS\nsTphzvq3Rp4Dhtczbu33RYx2N95ulpH3134rhxfVizXuhJFyV9xgw8O558dnJCNPYwpj9mZ9S1Wn\nP3hkSWkSl+BMDdMJoDIwOvqfwPKcxRIqLhy1BDPapDgRat7GGPZHOiJBhyL8xIkoVNiMpTAK+BcW\nyqw3/XmnkRd4OJmtWO2y3syJfQOcs4ll5+M7sSKGjwZteAf9kRJ/sGsciQ35uMt0WwfCyPQ10WRj\neulumijWML3mG90Vr4TqnMfK9Q7q8l0ph49pczm+LiRvRSGsxdRpJQaDrXpIhRMsDQa4bHlW/KNn\nMoH1V6XKV0Jp6VwkYe/iMBhORJhVb3rCk9gZtt58R4oRTklH2yiUAguUSiz5EtBP6DF+bHq/pj+b\nOT0CFqMYs2esWz8sgytnOYFcuX6U1WTdno9uruh8W7TXakdI136z1C2OVnZOz2nxbkRs1CTqjSSh\nGL+9V/6pmTW12xB3uD1IutbB5/EjPtffhZ0nPNRAvQoMvfXnjSXWgXSHRtQpdaJCbPdzied9v3pK\nH9MiyRVVz99vfFXQpIsHETdfg6YmV6YBW37+WGgHqel62bno/1Afq8K0wM7o6v0PvY1NuLxxAgMB\nAAGjQjBAMB0GA1UdDgQWBBTF7+3M2I0hxkjk49cULqcWk+WYATAPBgNVHRMBAf8EBTADAQH/MA4G\nA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAUoKsITQfI/Ki2Pm4rzc2IInRNwPWaZ+4\nYRC6ojGYWUfo0Q0lHhVBDOAqVdVXUsv45Mdpox1NcQJeXyFFYEhcCY5JEMEE3KliawLwQ8hOnThJ\ndMkycFRtwUf8jrQ2ntScvd0g1lPJGKm1Vrl2i5VnZu69mP6u775u+2D2/VnGKhs/I0qUJDAnyIm8\n60Qkmss9vk/Ves6OF8tiwdneHg56/0OGNFK8YT88X7vZdrRTvJez/opMEi4r89fO4aL/3Xtw+zuh\nTaRjAv04l5U/BXCga99igUOLtFkNSoxUnMW7gZ/NfaXvCyUeOiDbHPwfmGcCCtRzRBPbUYQaVQNW\n4AB+dAb/OMRyHdOoP2gxXdMJxy6MW2Pg6Nwe0uxhHvLe5e/2mXZgLR6UcnHGCyoyx5JO1UbXHfmp\nGQrI+pXObSOYqgs4rZpWDW+N8TEAiMEXnM0ZNjX+VVOg4DwzX5Ze4jLp3zO7Bkqp2IRzznfSxqxx\n4VyjHQy7Ct9f4qNx2No3WqB4K/TUfet27fJhcKVlmtOJNBir+3I+17Q9eVzYH6Eze9mCUAyTF6ps\n3MKCuwJXNq+YJyo5UOGwifUll35HaBC07HPKs5fRJNz2YqAo07WjuGS3iGJCz51TzZm+ZGiPTx4S\nSPfSKcOYKMryMguTjClPPGAyzQWWYezyr/6zcCwupvI=\n-----END CERTIFICATE-----\n\nBJCA Global Root CA2\n====================\n-----BEGIN CERTIFICATE-----\nMIICJTCCAaugAwIBAgIQLBcIfWQqwP6FGFkGz7RK6zAKBggqhkjOPQQDAzBUMQswCQYDVQQGEwJD\nTjEmMCQGA1UECgwdQkVJSklORyBDRVJUSUZJQ0FURSBBVVRIT1JJVFkxHTAbBgNVBAMMFEJKQ0Eg\nR2xvYmFsIFJvb3QgQ0EyMB4XDTE5MTIxOTAzMTgyMVoXDTQ0MTIxMjAzMTgyMVowVDELMAkGA1UE\nBhMCQ04xJjAkBgNVBAoMHUJFSUpJTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZMR0wGwYDVQQDDBRC\nSkNBIEdsb2JhbCBSb290IENBMjB2MBAGByqGSM49AgEGBSuBBAAiA2IABJ3LgJGNU2e1uVCxA/jl\nSR9BIgmwUVJY1is0j8USRhTFiy8shP8sbqjV8QnjAyEUxEM9fMEsxEtqSs3ph+B99iK++kpRuDCK\n/eHeGBIK9ke35xe/J4rUQUyWPGCWwf0VHKNCMEAwHQYDVR0OBBYEFNJKsVF/BvDRgh9Obl+rg/xI\n1LCRMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMAoGCCqGSM49BAMDA2gAMGUCMBq8\nW9f+qdJUDkpd0m2xQNz0Q9XSSpkZElaA94M04TVOSG0ED1cxMDAtsaqdAzjbBgIxAMvMh1PLet8g\nUXOQwKhbYdDFUDn9hf7B43j4ptZLvZuHjw/l1lOWqzzIQNph91Oj9w==\n-----END CERTIFICATE-----\n\nSectigo Public Server Authentication Root E46\n=============================================\n-----BEGIN CERTIFICATE-----\nMIICOjCCAcGgAwIBAgIQQvLM2htpN0RfFf51KBC49DAKBggqhkjOPQQDAzBfMQswCQYDVQQGEwJH\nQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1TZWN0aWdvIFB1YmxpYyBTZXJ2\nZXIgQXV0aGVudGljYXRpb24gUm9vdCBFNDYwHhcNMjEwMzIyMDAwMDAwWhcNNDYwMzIxMjM1OTU5\nWjBfMQswCQYDVQQGEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1TZWN0\naWdvIFB1YmxpYyBTZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBFNDYwdjAQBgcqhkjOPQIBBgUr\ngQQAIgNiAAR2+pmpbiDt+dd34wc7qNs9Xzjoq1WmVk/WSOrsfy2qw7LFeeyZYX8QeccCWvkEN/U0\nNSt3zn8gj1KjAIns1aeibVvjS5KToID1AZTc8GgHHs3u/iVStSBDHBv+6xnOQ6OjQjBAMB0GA1Ud\nDgQWBBTRItpMWfFLXyY4qp3W7usNw/upYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB\n/zAKBggqhkjOPQQDAwNnADBkAjAn7qRaqCG76UeXlImldCBteU/IvZNeWBj7LRoAasm4PdCkT0RH\nlAFWovgzJQxC36oCMB3q4S6ILuH5px0CMk7yn2xVdOOurvulGu7t0vzCAxHrRVxgED1cf5kDW21U\nSAGKcw==\n-----END CERTIFICATE-----\n\nSectigo Public Server Authentication Root R46\n=============================================\n-----BEGIN CERTIFICATE-----\nMIIFijCCA3KgAwIBAgIQdY39i658BwD6qSWn4cetFDANBgkqhkiG9w0BAQwFADBfMQswCQYDVQQG\nEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1TZWN0aWdvIFB1YmxpYyBT\nZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBSNDYwHhcNMjEwMzIyMDAwMDAwWhcNNDYwMzIxMjM1\nOTU5WjBfMQswCQYDVQQGEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1T\nZWN0aWdvIFB1YmxpYyBTZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBSNDYwggIiMA0GCSqGSIb3\nDQEBAQUAA4ICDwAwggIKAoICAQCTvtU2UnXYASOgHEdCSe5jtrch/cSV1UgrJnwUUxDaef0rty2k\n1Cz66jLdScK5vQ9IPXtamFSvnl0xdE8H/FAh3aTPaE8bEmNtJZlMKpnzSDBh+oF8HqcIStw+Kxwf\nGExxqjWMrfhu6DtK2eWUAtaJhBOqbchPM8xQljeSM9xfiOefVNlI8JhD1mb9nxc4Q8UBUQvX4yMP\nFF1bFOdLvt30yNoDN9HWOaEhUTCDsG3XME6WW5HwcCSrv0WBZEMNvSE6Lzzpng3LILVCJ8zab5vu\nZDCQOc2TZYEhMbUjUDM3IuM47fgxMMxF/mL50V0yeUKH32rMVhlATc6qu/m1dkmU8Sf4kaWD5Qaz\nYw6A3OASVYCmO2a0OYctyPDQ0RTp5A1NDvZdV3LFOxxHVp3i1fuBYYzMTYCQNFu31xR13NgESJ/A\nwSiItOkcyqex8Va3e0lMWeUgFaiEAin6OJRpmkkGj80feRQXEgyDet4fsZfu+Zd4KKTIRJLpfSYF\nplhym3kT2BFfrsU4YjRosoYwjviQYZ4ybPUHNs2iTG7sijbt8uaZFURww3y8nDnAtOFr94MlI1fZ\nEoDlSfB1D++N6xybVCi0ITz8fAr/73trdf+LHaAZBav6+CuBQug4urv7qv094PPK306Xlynt8xhW\n6aWWrL3DkJiy4Pmi1KZHQ3xtzwIDAQABo0IwQDAdBgNVHQ4EFgQUVnNYZJX5khqwEioEYnmhQBWI\nIUkwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAC9c\nmTz8Bl6MlC5w6tIyMY208FHVvArzZJ8HXtXBc2hkeqK5Duj5XYUtqDdFqij0lgVQYKlJfp/imTYp\nE0RHap1VIDzYm/EDMrraQKFz6oOht0SmDpkBm+S8f74TlH7Kph52gDY9hAaLMyZlbcp+nv4fjFg4\nexqDsQ+8FxG75gbMY/qB8oFM2gsQa6H61SilzwZAFv97fRheORKkU55+MkIQpiGRqRxOF3yEvJ+M\n0ejf5lG5Nkc/kLnHvALcWxxPDkjBJYOcCj+esQMzEhonrPcibCTRAUH4WAP+JWgiH5paPHxsnnVI\n84HxZmduTILA7rpXDhjvLpr3Etiga+kFpaHpaPi8TD8SHkXoUsCjvxInebnMMTzD9joiFgOgyY9m\npFuiTdaBJQbpdqQACj7LzTWb4OE4y2BThihCQRxEV+ioratF4yUQvNs+ZUH7G6aXD+u5dHn5Hrwd\nVw1Hr8Mvn4dGp+smWg9WY7ViYG4A++MnESLn/pmPNPW56MORcr3Ywx65LvKRRFHQV80MNNVIIb/b\nE/FmJUNS0nAiNs2fxBx1IK1jcmMGDw4nztJqDby1ORrp0XZ60Vzk50lJLVU3aPAaOpg+VBeHVOmm\nJ1CJeyAvP/+/oYtKR5j/K3tJPsMpRmAYQqszKbrAKbkTidOIijlBO8n9pu0f9GBj39ItVQGL\n-----END CERTIFICATE-----\n\nSSL.com TLS RSA Root CA 2022\n============================\n-----BEGIN CERTIFICATE-----\nMIIFiTCCA3GgAwIBAgIQb77arXO9CEDii02+1PdbkTANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQG\nEwJVUzEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMSUwIwYDVQQDDBxTU0wuY29tIFRMUyBSU0Eg\nUm9vdCBDQSAyMDIyMB4XDTIyMDgyNTE2MzQyMloXDTQ2MDgxOTE2MzQyMVowTjELMAkGA1UEBhMC\nVVMxGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjElMCMGA1UEAwwcU1NMLmNvbSBUTFMgUlNBIFJv\nb3QgQ0EgMjAyMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANCkCXJPQIgSYT41I57u\n9nTPL3tYPc48DRAokC+X94xI2KDYJbFMsBFMF3NQ0CJKY7uB0ylu1bUJPiYYf7ISf5OYt6/wNr/y\n7hienDtSxUcZXXTzZGbVXcdotL8bHAajvI9AI7YexoS9UcQbOcGV0insS657Lb85/bRi3pZ7Qcac\noOAGcvvwB5cJOYF0r/c0WRFXCsJbwST0MXMwgsadugL3PnxEX4MN8/HdIGkWCVDi1FW24IBydm5M\nR7d1VVm0U3TZlMZBrViKMWYPHqIbKUBOL9975hYsLfy/7PO0+r4Y9ptJ1O4Fbtk085zx7AGL0SDG\nD6C1vBdOSHtRwvzpXGk3R2azaPgVKPC506QVzFpPulJwoxJF3ca6TvvC0PeoUidtbnm1jPx7jMEW\nTO6Af77wdr5BUxIzrlo4QqvXDz5BjXYHMtWrifZOZ9mxQnUjbvPNQrL8VfVThxc7wDNY8VLS+YCk\n8OjwO4s4zKTGkH8PnP2L0aPP2oOnaclQNtVcBdIKQXTbYxE3waWglksejBYSd66UNHsef8JmAOSq\ng+qKkK3ONkRN0VHpvB/zagX9wHQfJRlAUW7qglFA35u5CCoGAtUjHBPW6dvbxrB6y3snm/vg1UYk\n7RBLY0ulBY+6uB0rpvqR4pJSvezrZ5dtmi2fgTIFZzL7SAg/2SW4BCUvAgMBAAGjYzBhMA8GA1Ud\nEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAU+y437uOEeicuzRk1sTN8/9REQrkwHQYDVR0OBBYEFPsu\nN+7jhHonLs0ZNbEzfP/UREK5MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAjYlt\nhEUY8U+zoO9opMAdrDC8Z2awms22qyIZZtM7QbUQnRC6cm4pJCAcAZli05bg4vsMQtfhWsSWTVTN\nj8pDU/0quOr4ZcoBwq1gaAafORpR2eCNJvkLTqVTJXojpBzOCBvfR4iyrT7gJ4eLSYwfqUdYe5by\niB0YrrPRpgqU+tvT5TgKa3kSM/tKWTcWQA673vWJDPFs0/dRa1419dvAJuoSc06pkZCmF8NsLzjU\no3KUQyxi4U5cMj29TH0ZR6LDSeeWP4+a0zvkEdiLA9z2tmBVGKaBUfPhqBVq6+AL8BQx1rmMRTqo\nENjwuSfr98t67wVylrXEj5ZzxOhWc5y8aVFjvO9nHEMaX3cZHxj4HCUp+UmZKbaSPaKDN7Egkaib\nMOlqbLQjk2UEqxHzDh1TJElTHaE/nUiSEeJ9DU/1172iWD54nR4fK/4huxoTtrEoZP2wAgDHbICi\nvRZQIA9ygV/MlP+7mea6kMvq+cYMwq7FGc4zoWtcu358NFcXrfA/rs3qr5nsLFR+jM4uElZI7xc7\nP0peYNLcdDa8pUNjyw9bowJWCZ4kLOGGgYz+qxcs+sjiMho6/4UIyYOf8kpIEFR3N+2ivEC+5BB0\n9+Rbu7nzifmPQdjH5FCQNYA+HLhNkNPU98OwoX6EyneSMSy4kLGCenROmxMmtNVQZlR4rmA=\n-----END CERTIFICATE-----\n\nSSL.com TLS ECC Root CA 2022\n============================\n-----BEGIN CERTIFICATE-----\nMIICOjCCAcCgAwIBAgIQFAP1q/s3ixdAW+JDsqXRxDAKBggqhkjOPQQDAzBOMQswCQYDVQQGEwJV\nUzEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMSUwIwYDVQQDDBxTU0wuY29tIFRMUyBFQ0MgUm9v\ndCBDQSAyMDIyMB4XDTIyMDgyNTE2MzM0OFoXDTQ2MDgxOTE2MzM0N1owTjELMAkGA1UEBhMCVVMx\nGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjElMCMGA1UEAwwcU1NMLmNvbSBUTFMgRUNDIFJvb3Qg\nQ0EgMjAyMjB2MBAGByqGSM49AgEGBSuBBAAiA2IABEUpNXP6wrgjzhR9qLFNoFs27iosU8NgCTWy\nJGYmacCzldZdkkAZDsalE3D07xJRKF3nzL35PIXBz5SQySvOkkJYWWf9lCcQZIxPBLFNSeR7T5v1\n5wj4A4j3p8OSSxlUgaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBSJjy+j6CugFFR7\n81a4Jl9nOAuc0DAdBgNVHQ4EFgQUiY8vo+groBRUe/NWuCZfZzgLnNAwDgYDVR0PAQH/BAQDAgGG\nMAoGCCqGSM49BAMDA2gAMGUCMFXjIlbp15IkWE8elDIPDAI2wv2sdDJO4fscgIijzPvX6yv/N33w\n7deedWo1dlJF4AIxAMeNb0Igj762TVntd00pxCAgRWSGOlDGxK0tk/UYfXLtqc/ErFc2KAhl3zx5\nZn6g6g==\n-----END CERTIFICATE-----\n\nAtos TrustedRoot Root CA ECC TLS 2021\n=====================================\n-----BEGIN CERTIFICATE-----\nMIICFTCCAZugAwIBAgIQPZg7pmY9kGP3fiZXOATvADAKBggqhkjOPQQDAzBMMS4wLAYDVQQDDCVB\ndG9zIFRydXN0ZWRSb290IFJvb3QgQ0EgRUNDIFRMUyAyMDIxMQ0wCwYDVQQKDARBdG9zMQswCQYD\nVQQGEwJERTAeFw0yMTA0MjIwOTI2MjNaFw00MTA0MTcwOTI2MjJaMEwxLjAsBgNVBAMMJUF0b3Mg\nVHJ1c3RlZFJvb3QgUm9vdCBDQSBFQ0MgVExTIDIwMjExDTALBgNVBAoMBEF0b3MxCzAJBgNVBAYT\nAkRFMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEloZYKDcKZ9Cg3iQZGeHkBQcfl+3oZIK59sRxUM6K\nDP/XtXa7oWyTbIOiaG6l2b4siJVBzV3dscqDY4PMwL502eCdpO5KTlbgmClBk1IQ1SQ4AjJn8ZQS\nb+/Xxd4u/RmAo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR2KCXWfeBmmnoJsmo7jjPX\nNtNPojAOBgNVHQ8BAf8EBAMCAYYwCgYIKoZIzj0EAwMDaAAwZQIwW5kp85wxtolrbNa9d+F851F+\nuDrNozZffPc8dz7kUK2o59JZDCaOMDtuCCrCp1rIAjEAmeMM56PDr9NJLkaCI2ZdyQAUEv049OGY\na3cpetskz2VAv9LcjBHo9H1/IISpQuQo\n-----END CERTIFICATE-----\n\nAtos TrustedRoot Root CA RSA TLS 2021\n=====================================\n-----BEGIN CERTIFICATE-----\nMIIFZDCCA0ygAwIBAgIQU9XP5hmTC/srBRLYwiqipDANBgkqhkiG9w0BAQwFADBMMS4wLAYDVQQD\nDCVBdG9zIFRydXN0ZWRSb290IFJvb3QgQ0EgUlNBIFRMUyAyMDIxMQ0wCwYDVQQKDARBdG9zMQsw\nCQYDVQQGEwJERTAeFw0yMTA0MjIwOTIxMTBaFw00MTA0MTcwOTIxMDlaMEwxLjAsBgNVBAMMJUF0\nb3MgVHJ1c3RlZFJvb3QgUm9vdCBDQSBSU0EgVExTIDIwMjExDTALBgNVBAoMBEF0b3MxCzAJBgNV\nBAYTAkRFMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAtoAOxHm9BYx9sKOdTSJNy/BB\nl01Z4NH+VoyX8te9j2y3I49f1cTYQcvyAh5x5en2XssIKl4w8i1mx4QbZFc4nXUtVsYvYe+W/CBG\nvevUez8/fEc4BKkbqlLfEzfTFRVOvV98r61jx3ncCHvVoOX3W3WsgFWZkmGbzSoXfduP9LVq6hdK\nZChmFSlsAvFr1bqjM9xaZ6cF4r9lthawEO3NUDPJcFDsGY6wx/J0W2tExn2WuZgIWWbeKQGb9Cpt\n0xU6kGpn8bRrZtkh68rZYnxGEFzedUlnnkL5/nWpo63/dgpnQOPF943HhZpZnmKaau1Fh5hnstVK\nPNe0OwANwI8f4UDErmwh3El+fsqyjW22v5MvoVw+j8rtgI5Y4dtXz4U2OLJxpAmMkokIiEjxQGMY\nsluMWuPD0xeqqxmjLBvk1cbiZnrXghmmOxYsL3GHX0WelXOTwkKBIROW1527k2gV+p2kHYzygeBY\nBr3JtuP2iV2J+axEoctr+hbxx1A9JNr3w+SH1VbxT5Aw+kUJWdo0zuATHAR8ANSbhqRAvNncTFd+\nrrcztl524WWLZt+NyteYr842mIycg5kDcPOvdO3GDjbnvezBc6eUWsuSZIKmAMFwoW4sKeFYV+xa\nfJlrJaSQOoD0IJ2azsct+bJLKZWD6TWNp0lIpw9MGZHQ9b8Q4HECAwEAAaNCMEAwDwYDVR0TAQH/\nBAUwAwEB/zAdBgNVHQ4EFgQUdEmZ0f+0emhFdcN+tNzMzjkz2ggwDgYDVR0PAQH/BAQDAgGGMA0G\nCSqGSIb3DQEBDAUAA4ICAQAjQ1MkYlxt/T7Cz1UAbMVWiLkO3TriJQ2VSpfKgInuKs1l+NsW4AmS\n4BjHeJi78+xCUvuppILXTdiK/ORO/auQxDh1MoSf/7OwKwIzNsAQkG8dnK/haZPso0UvFJ/1TCpl\nQ3IM98P4lYsU84UgYt1UU90s3BiVaU+DR3BAM1h3Egyi61IxHkzJqM7F78PRreBrAwA0JrRUITWX\nAdxfG/F851X6LWh3e9NpzNMOa7pNdkTWwhWaJuywxfW70Xp0wmzNxbVe9kzmWy2B27O3Opee7c9G\nslA9hGCZcbUztVdF5kJHdWoOsAgMrr3e97sPWD2PAzHoPYJQyi9eDF20l74gNAf0xBLh7tew2Vkt\nafcxBPTy+av5EzH4AXcOPUIjJsyacmdRIXrMPIWo6iFqO9taPKU0nprALN+AnCng33eU0aKAQv9q\nTFsR0PXNor6uzFFcw9VUewyu1rkGd4Di7wcaaMxZUa1+XGdrudviB0JbuAEFWDlN5LuYo7Ey7Nmj\n1m+UI/87tyll5gfp77YZ6ufCOB0yiJA8EytuzO+rdwY0d4RPcuSBhPm5dDTedk+SKlOxJTnbPP/l\nPqYO5Wue/9vsL3SD3460s6neFE3/MaNFcyT6lSnMEpcEoji2jbDwN/zIIX8/syQbPYtuzE2wFg2W\nHYMfRsCbvUOZ58SWLs5fyQ==\n-----END CERTIFICATE-----\n\nTrustAsia Global Root CA G3\n===========================\n-----BEGIN CERTIFICATE-----\nMIIFpTCCA42gAwIBAgIUZPYOZXdhaqs7tOqFhLuxibhxkw8wDQYJKoZIhvcNAQEMBQAwWjELMAkG\nA1UEBhMCQ04xJTAjBgNVBAoMHFRydXN0QXNpYSBUZWNobm9sb2dpZXMsIEluYy4xJDAiBgNVBAMM\nG1RydXN0QXNpYSBHbG9iYWwgUm9vdCBDQSBHMzAeFw0yMTA1MjAwMjEwMTlaFw00NjA1MTkwMjEw\nMTlaMFoxCzAJBgNVBAYTAkNOMSUwIwYDVQQKDBxUcnVzdEFzaWEgVGVjaG5vbG9naWVzLCBJbmMu\nMSQwIgYDVQQDDBtUcnVzdEFzaWEgR2xvYmFsIFJvb3QgQ0EgRzMwggIiMA0GCSqGSIb3DQEBAQUA\nA4ICDwAwggIKAoICAQDAMYJhkuSUGwoqZdC+BqmHO1ES6nBBruL7dOoKjbmzTNyPtxNST1QY4Sxz\nlZHFZjtqz6xjbYdT8PfxObegQ2OwxANdV6nnRM7EoYNl9lA+sX4WuDqKAtCWHwDNBSHvBm3dIZwZ\nQ0WhxeiAysKtQGIXBsaqvPPW5vxQfmZCHzyLpnl5hkA1nyDvP+uLRx+PjsXUjrYsyUQE49RDdT/V\nP68czH5GX6zfZBCK70bwkPAPLfSIC7Epqq+FqklYqL9joDiR5rPmd2jE+SoZhLsO4fWvieylL1Ag\ndB4SQXMeJNnKziyhWTXAyB1GJ2Faj/lN03J5Zh6fFZAhLf3ti1ZwA0pJPn9pMRJpxx5cynoTi+jm\n9WAPzJMshH/x/Gr8m0ed262IPfN2dTPXS6TIi/n1Q1hPy8gDVI+lhXgEGvNz8teHHUGf59gXzhqc\nD0r83ERoVGjiQTz+LISGNzzNPy+i2+f3VANfWdP3kXjHi3dqFuVJhZBFcnAvkV34PmVACxmZySYg\nWmjBNb9Pp1Hx2BErW+Canig7CjoKH8GB5S7wprlppYiU5msTf9FkPz2ccEblooV7WIQn3MSAPmea\nmseaMQ4w7OYXQJXZRe0Blqq/DPNL0WP3E1jAuPP6Z92bfW1K/zJMtSU7/xxnD4UiWQWRkUF3gdCF\nTIcQcf+eQxuulXUtgQIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFEDk5PIj\n7zjKsK5Xf/IhMBY027ySMB0GA1UdDgQWBBRA5OTyI+84yrCuV3/yITAWNNu8kjAOBgNVHQ8BAf8E\nBAMCAQYwDQYJKoZIhvcNAQEMBQADggIBACY7UeFNOPMyGLS0XuFlXsSUT9SnYaP4wM8zAQLpw6o1\nD/GUE3d3NZ4tVlFEbuHGLige/9rsR82XRBf34EzC4Xx8MnpmyFq2XFNFV1pF1AWZLy4jVe5jaN/T\nG3inEpQGAHUNcoTpLrxaatXeL1nHo+zSh2bbt1S1JKv0Q3jbSwTEb93mPmY+KfJLaHEih6D4sTNj\nduMNhXJEIlU/HHzp/LgV6FL6qj6jITk1dImmasI5+njPtqzn59ZW/yOSLlALqbUHM/Q4X6RJpstl\ncHboCoWASzY9M/eVVHUl2qzEc4Jl6VL1XP04lQJqaTDFHApXB64ipCz5xUG3uOyfT0gA+QEEVcys\n+TIxxHWVBqB/0Y0n3bOppHKH/lmLmnp0Ft0WpWIp6zqW3IunaFnT63eROfjXy9mPX1onAX1daBli\n2MjN9LdyR75bl87yraKZk62Uy5P2EgmVtqvXO9A/EcswFi55gORngS1d7XB4tmBZrOFdRWOPyN9y\naFvqHbgB8X7754qz41SgOAngPN5C8sLtLpvzHzW2NtjjgKGLzZlkD8Kqq7HK9W+eQ42EVJmzbsAS\nZthwEPEGNTNDqJwuuhQxzhB/HIbjj9LV+Hfsm6vxL2PZQl/gZ4FkkfGXL/xuJvYz+NO1+MRiqzFR\nJQJ6+N1rZdVtTTDIZbpoFGWsJwt0ivKH\n-----END CERTIFICATE-----\n\nTrustAsia Global Root CA G4\n===========================\n-----BEGIN CERTIFICATE-----\nMIICVTCCAdygAwIBAgIUTyNkuI6XY57GU4HBdk7LKnQV1tcwCgYIKoZIzj0EAwMwWjELMAkGA1UE\nBhMCQ04xJTAjBgNVBAoMHFRydXN0QXNpYSBUZWNobm9sb2dpZXMsIEluYy4xJDAiBgNVBAMMG1Ry\ndXN0QXNpYSBHbG9iYWwgUm9vdCBDQSBHNDAeFw0yMTA1MjAwMjEwMjJaFw00NjA1MTkwMjEwMjJa\nMFoxCzAJBgNVBAYTAkNOMSUwIwYDVQQKDBxUcnVzdEFzaWEgVGVjaG5vbG9naWVzLCBJbmMuMSQw\nIgYDVQQDDBtUcnVzdEFzaWEgR2xvYmFsIFJvb3QgQ0EgRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNi\nAATxs8045CVD5d4ZCbuBeaIVXxVjAd7Cq92zphtnS4CDr5nLrBfbK5bKfFJV4hrhPVbwLxYI+hW8\nm7tH5j/uqOFMjPXTNvk4XatwmkcN4oFBButJ+bAp3TPsUKV/eSm4IJijYzBhMA8GA1UdEwEB/wQF\nMAMBAf8wHwYDVR0jBBgwFoAUpbtKl86zK3+kMd6Xg1mDpm9xy94wHQYDVR0OBBYEFKW7SpfOsyt/\npDHel4NZg6ZvccveMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNnADBkAjBe8usGzEkxn0AA\nbbd+NvBNEU/zy4k6LHiRUKNbwMp1JvK/kF0LgoxgKJ/GcJpo5PECMFxYDlZ2z1jD1xCMuo6u47xk\ndUfFVZDj/bpV6wfEU6s3qe4hsiFbYI89MvHVI5TWWA==\n-----END CERTIFICATE-----\n\nCommScope Public Trust ECC Root-01\n==================================\n-----BEGIN CERTIFICATE-----\nMIICHTCCAaOgAwIBAgIUQ3CCd89NXTTxyq4yLzf39H91oJ4wCgYIKoZIzj0EAwMwTjELMAkGA1UE\nBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29tbVNjb3BlIFB1YmxpYyBUcnVz\ndCBFQ0MgUm9vdC0wMTAeFw0yMTA0MjgxNzM1NDNaFw00NjA0MjgxNzM1NDJaME4xCzAJBgNVBAYT\nAlVTMRIwEAYDVQQKDAlDb21tU2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1c3Qg\nRUNDIFJvb3QtMDEwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAARLNumuV16ocNfQj3Rid8NeeqrltqLx\neP0CflfdkXmcbLlSiFS8LwS+uM32ENEp7LXQoMPwiXAZu1FlxUOcw5tjnSCDPgYLpkJEhRGnSjot\n6dZoL0hOUysHP029uax3OVejQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G\nA1UdDgQWBBSOB2LAUN3GGQYARnQE9/OufXVNMDAKBggqhkjOPQQDAwNoADBlAjEAnDPfQeMjqEI2\nJpc1XHvr20v4qotzVRVcrHgpD7oh2MSg2NED3W3ROT3Ek2DS43KyAjB8xX6I01D1HiXo+k515liW\npDVfG2XqYZpwI7UNo5uSUm9poIyNStDuiw7LR47QjRE=\n-----END CERTIFICATE-----\n\nCommScope Public Trust ECC Root-02\n==================================\n-----BEGIN CERTIFICATE-----\nMIICHDCCAaOgAwIBAgIUKP2ZYEFHpgE6yhR7H+/5aAiDXX0wCgYIKoZIzj0EAwMwTjELMAkGA1UE\nBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29tbVNjb3BlIFB1YmxpYyBUcnVz\ndCBFQ0MgUm9vdC0wMjAeFw0yMTA0MjgxNzQ0NTRaFw00NjA0MjgxNzQ0NTNaME4xCzAJBgNVBAYT\nAlVTMRIwEAYDVQQKDAlDb21tU2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1c3Qg\nRUNDIFJvb3QtMDIwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAR4MIHoYx7l63FRD/cHB8o5mXxO1Q/M\nMDALj2aTPs+9xYa9+bG3tD60B8jzljHz7aRP+KNOjSkVWLjVb3/ubCK1sK9IRQq9qEmUv4RDsNuE\nSgMjGWdqb8FuvAY5N9GIIvejQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G\nA1UdDgQWBBTmGHX/72DehKT1RsfeSlXjMjZ59TAKBggqhkjOPQQDAwNnADBkAjAmc0l6tqvmSfR9\nUj/UQQSugEODZXW5hYA4O9Zv5JOGq4/nich/m35rChJVYaoR4HkCMHfoMXGsPHED1oQmHhS48zs7\n3u1Z/GtMMH9ZzkXpc2AVmkzw5l4lIhVtwodZ0LKOag==\n-----END CERTIFICATE-----\n\nCommScope Public Trust RSA Root-01\n==================================\n-----BEGIN CERTIFICATE-----\nMIIFbDCCA1SgAwIBAgIUPgNJgXUWdDGOTKvVxZAplsU5EN0wDQYJKoZIhvcNAQELBQAwTjELMAkG\nA1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29tbVNjb3BlIFB1YmxpYyBU\ncnVzdCBSU0EgUm9vdC0wMTAeFw0yMTA0MjgxNjQ1NTRaFw00NjA0MjgxNjQ1NTNaME4xCzAJBgNV\nBAYTAlVTMRIwEAYDVQQKDAlDb21tU2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1\nc3QgUlNBIFJvb3QtMDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwSGWjDR1C45Ft\nnYSkYZYSwu3D2iM0GXb26v1VWvZVAVMP8syMl0+5UMuzAURWlv2bKOx7dAvnQmtVzslhsuitQDy6\nuUEKBU8bJoWPQ7VAtYXR1HHcg0Hz9kXHgKKEUJdGzqAMxGBWBB0HW0alDrJLpA6lfO741GIDuZNq\nihS4cPgugkY4Iw50x2tBt9Apo52AsH53k2NC+zSDO3OjWiE260f6GBfZumbCk6SP/F2krfxQapWs\nvCQz0b2If4b19bJzKo98rwjyGpg/qYFlP8GMicWWMJoKz/TUyDTtnS+8jTiGU+6Xn6myY5QXjQ/c\nZip8UlF1y5mO6D1cv547KI2DAg+pn3LiLCuz3GaXAEDQpFSOm117RTYm1nJD68/A6g3czhLmfTif\nBSeolz7pUcZsBSjBAg/pGG3svZwG1KdJ9FQFa2ww8esD1eo9anbCyxooSU1/ZOD6K9pzg4H/kQO9\nlLvkuI6cMmPNn7togbGEW682v3fuHX/3SZtS7NJ3Wn2RnU3COS3kuoL4b/JOHg9O5j9ZpSPcPYeo\nKFgo0fEbNttPxP/hjFtyjMcmAyejOQoBqsCyMWCDIqFPEgkBEa801M/XrmLTBQe0MXXgDW1XT2mH\n+VepuhX2yFJtocucH+X8eKg1mp9BFM6ltM6UCBwJrVbl2rZJmkrqYxhTnCwuwwIDAQABo0IwQDAP\nBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUN12mmnQywsL5x6YVEFm4\n5P3luG0wDQYJKoZIhvcNAQELBQADggIBAK+nz97/4L1CjU3lIpbfaOp9TSp90K09FlxD533Ahuh6\nNWPxzIHIxgvoLlI1pKZJkGNRrDSsBTtXAOnTYtPZKdVUvhwQkZyybf5Z/Xn36lbQnmhUQo8mUuJM\n3y+Xpi/SB5io82BdS5pYV4jvguX6r2yBS5KPQJqTRlnLX3gWsWc+QgvfKNmwrZggvkN80V4aCRck\njXtdlemrwWCrWxhkgPut4AZ9HcpZuPN4KWfGVh2vtrV0KnahP/t1MJ+UXjulYPPLXAziDslg+Mkf\nFoom3ecnf+slpoq9uC02EJqxWE2aaE9gVOX2RhOOiKy8IUISrcZKiX2bwdgt6ZYD9KJ0DLwAHb/W\nNyVntHKLr4W96ioDj8z7PEQkguIBpQtZtjSNMgsSDesnwv1B10A8ckYpwIzqug/xBpMu95yo9GA+\no/E4Xo4TwbM6l4c/ksp4qRyv0LAbJh6+cOx69TOY6lz/KwsETkPdY34Op054A5U+1C0wlREQKC6/\noAI+/15Z0wUOlV9TRe9rh9VIzRamloPh37MG88EU26fsHItdkJANclHnYfkUyq+Dj7+vsQpZXdxc\n1+SWrVtgHdqul7I52Qb1dgAT+GhMIbA1xNxVssnBQVocicCMb3SgazNNtQEo/a2tiRc7ppqEvOuM\n6sRxJKi6KfkIsidWNTJf6jn7MZrVGczw\n-----END CERTIFICATE-----\n\nCommScope Public Trust RSA Root-02\n==================================\n-----BEGIN CERTIFICATE-----\nMIIFbDCCA1SgAwIBAgIUVBa/O345lXGN0aoApYYNK496BU4wDQYJKoZIhvcNAQELBQAwTjELMAkG\nA1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29tbVNjb3BlIFB1YmxpYyBU\ncnVzdCBSU0EgUm9vdC0wMjAeFw0yMTA0MjgxNzE2NDNaFw00NjA0MjgxNzE2NDJaME4xCzAJBgNV\nBAYTAlVTMRIwEAYDVQQKDAlDb21tU2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1\nc3QgUlNBIFJvb3QtMDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDh+g77aAASyE3V\nrCLENQE7xVTlWXZjpX/rwcRqmL0yjReA61260WI9JSMZNRTpf4mnG2I81lDnNJUDMrG0kyI9p+Kx\n7eZ7Ti6Hmw0zdQreqjXnfuU2mKKuJZ6VszKWpCtYHu8//mI0SFHRtI1CrWDaSWqVcN3SAOLMV2MC\ne5bdSZdbkk6V0/nLKR8YSvgBKtJjCW4k6YnS5cciTNxzhkcAqg2Ijq6FfUrpuzNPDlJwnZXjfG2W\nWy09X6GDRl224yW4fKcZgBzqZUPckXk2LHR88mcGyYnJ27/aaL8j7dxrrSiDeS/sOKUNNwFnJ5rp\nM9kzXzehxfCrPfp4sOcsn/Y+n2Dg70jpkEUeBVF4GiwSLFworA2iI540jwXmojPOEXcT1A6kHkIf\nhs1w/tkuFT0du7jyU1fbzMZ0KZwYszZ1OC4PVKH4kh+Jlk+71O6d6Ts2QrUKOyrUZHk2EOH5kQMr\neyBUzQ0ZGshBMjTRsJnhkB4BQDa1t/qp5Xd1pCKBXbCL5CcSD1SIxtuFdOa3wNemKfrb3vOTlycE\nVS8KbzfFPROvCgCpLIscgSjX74Yxqa7ybrjKaixUR9gqiC6vwQcQeKwRoi9C8DfF8rhW3Q5iLc4t\nVn5V8qdE9isy9COoR+jUKgF4z2rDN6ieZdIs5fq6M8EGRPbmz6UNp2YINIos8wIDAQABo0IwQDAP\nBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUR9DnsSL/nSz12Vdgs7Gx\ncJXvYXowDQYJKoZIhvcNAQELBQADggIBAIZpsU0v6Z9PIpNojuQhmaPORVMbc0RTAIFhzTHjCLqB\nKCh6krm2qMhDnscTJk3C2OVVnJJdUNjCK9v+5qiXz1I6JMNlZFxHMaNlNRPDk7n3+VGXu6TwYofF\n1gbTl4MgqX67tiHCpQ2EAOHyJxCDut0DgdXdaMNmEMjRdrSzbymeAPnCKfWxkxlSaRosTKCL4BWa\nMS/TiJVZbuXEs1DIFAhKm4sTg7GkcrI7djNB3NyqpgdvHSQSn8h2vS/ZjvQs7rfSOBAkNlEv41xd\ngSGn2rtO/+YHqP65DSdsu3BaVXoT6fEqSWnHX4dXTEN5bTpl6TBcQe7rd6VzEojov32u5cSoHw2O\nHG1QAk8mGEPej1WFsQs3BWDJVTkSBKEqz3EWnzZRSb9wO55nnPt7eck5HHisd5FUmrh1CoFSl+Nm\nYWvtPjgelmFV4ZFUjO2MJB+ByRCac5krFk5yAD9UG/iNuovnFNa2RU9g7Jauwy8CTl2dlklyALKr\ndVwPaFsdZcJfMw8eD/A7hvWwTruc9+olBdytoptLFwG+Qt81IR2tq670v64fG9PiO/yzcnMcmyiQ\niRM9HcEARwmWmjgb3bHPDcK0RPOWlc4yOo80nOAXx17Org3bhzjlP1v9mxnhMUF6cKojawHhRUzN\nlM47ni3niAIi9G7oyOzWPPO5std3eqx7\n-----END CERTIFICATE-----\n"
  },
  {
    "path": "packages/security/openssl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"openssl\"\nPKG_VERSION=\"3.0.12\"\nPKG_SHA256=\"f93c9e8edde5e9166119de31755fc87b4aa34863662f67ddfcba14d0b6b69b61\"\nPKG_LICENSE=\"Apache-2.0\"\nPKG_SITE=\"https://www.openssl.org\"\nPKG_URL=\"https://www.openssl.org/source/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"The Open Source toolkit for Secure Sockets Layer and Transport Layer Security\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"+local-cc\"\n\nPKG_CONFIGURE_OPTS_SHARED=\"--libdir=lib \\\n                           shared \\\n                           threads \\\n                           no-ec2m \\\n                           no-md2 \\\n                           no-rc5 \\\n                           no-rfc3779 \\\n                           no-sctp \\\n                           no-ssl-trace \\\n                           no-ssl3 \\\n                           no-unit-test \\\n                           no-weak-ssl-ciphers \\\n                           no-zlib \\\n                           no-zlib-dynamic \\\n                           no-static-engine\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--prefix=${TOOLCHAIN} \\\n                         --openssldir=${TOOLCHAIN}/etc/ssl\"\nPKG_CONFIGURE_OPTS_TARGET=\"--prefix=/usr \\\n                           --openssldir=/etc/ssl\"\n\npost_unpack() {\n  find ${PKG_BUILD}/apps -type f | xargs -n 1 -t sed 's|./demoCA|/etc/ssl|' -i\n}\n\npre_configure_host() {\n  mkdir -p ${PKG_BUILD}/.${HOST_NAME}\n  cp -a ${PKG_BUILD}/* ${PKG_BUILD}/.${HOST_NAME}/\n}\n\nconfigure_host() {\n  cd ${PKG_BUILD}/.${HOST_NAME}\n  ./Configure ${PKG_CONFIGURE_OPTS_HOST} ${PKG_CONFIGURE_OPTS_SHARED} linux-${MACHINE_HARDWARE_NAME} ${CFLAGS} ${LDFLAGS}\n}\n\nmakeinstall_host() {\n  make install_sw\n}\n\npre_configure_target() {\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n  cp -a ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}/\n\n  case ${TARGET_ARCH} in\n    x86_64)\n      OPENSSL_TARGET=linux-x86_64\n      PLATFORM_FLAGS=enable-ec_nistp_64_gcc_128\n      ;;\n    arm)\n      OPENSSL_TARGET=linux-armv4\n      ;;\n    aarch64)\n      OPENSSL_TARGET=linux-aarch64\n      ;;\n  esac\n}\n\nconfigure_target() {\n  cd ${PKG_BUILD}/.${TARGET_NAME}\n  ./Configure ${PKG_CONFIGURE_OPTS_TARGET} ${PKG_CONFIGURE_OPTS_SHARED} ${PLATFORM_FLAGS} ${OPENSSL_TARGET} ${CFLAGS} ${LDFLAGS}\n}\n\nmakeinstall_target() {\n  make DESTDIR=${INSTALL} install_sw\n  make DESTDIR=${SYSROOT_PREFIX} install_sw\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/etc/ssl/misc\n  rm -rf ${INSTALL}/usr/bin/c_rehash\n\n  debug_strip ${INSTALL}/usr/bin/openssl\n\n  # cert from https://curl.haxx.se/docs/caextract.html\n  mkdir -p ${INSTALL}/etc/ssl\n    cp ${PKG_DIR}/cert/cacert.pem ${INSTALL}/etc/ssl/cacert.pem.system\n\n  # give user the chance to include their own CA\n  mkdir -p ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/openssl-config ${INSTALL}/usr/bin\n    ln -sf /run/libreelec/cacert.pem ${INSTALL}/etc/ssl/cacert.pem\n    ln -sf /run/libreelec/cacert.pem ${INSTALL}/etc/ssl/cert.pem\n\n  # backwards comatibility\n  mkdir -p ${INSTALL}/etc/pki/tls\n    ln -sf /run/libreelec/cacert.pem ${INSTALL}/etc/pki/tls/cacert.pem\n  mkdir -p ${INSTALL}/etc/pki/tls/certs\n    ln -sf /run/libreelec/cacert.pem ${INSTALL}/etc/pki/tls/certs/ca-bundle.crt\n  mkdir -p ${INSTALL}/usr/lib/ssl\n    ln -sf /run/libreelec/cacert.pem ${INSTALL}/usr/lib/ssl/cert.pem\n}\n\npost_install() {\n  enable_service openssl-config.service\n}\n"
  },
  {
    "path": "packages/security/openssl/scripts/openssl-config",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\ncp /etc/ssl/cacert.pem.system /run/libreelec/cacert.pem\n\n[ -f /storage/.config/cacert.pem ] && cat /storage/.config/cacert.pem >>/run/libreelec/cacert.pem\n\nexit 0\n"
  },
  {
    "path": "packages/security/openssl/system.d/openssl-config.service",
    "content": "[Unit]\nDescription=OpenSSL configuration service\nDefaultDependencies=no\nAfter=systemd-tmpfiles-setup.service\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/openssl-config\n\n[Install]\nWantedBy=sysinit.target\n"
  },
  {
    "path": "packages/sx05re/Amlogic/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"Amlogic\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"various\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain emuelec\"\nPKG_SECTION=\"virtual\"\n\n\n"
  },
  {
    "path": "packages/sx05re/Amlogic-ng/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"Amlogic-ng\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"various\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain emuelec\"\nPKG_SECTION=\"virtual\"\n\n\n"
  },
  {
    "path": "packages/sx05re/Amlogic-no/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"Amlogic-no\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"various\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain emuelec\"\nPKG_SECTION=\"virtual\"\n\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-bluetooth",
    "content": "#!/bin/bash\n\n. /etc/profile\n\nACTION=$1\nshift\n\ndo_help() {\n    echo \"${1} list\" >&2\n    echo \"${1} trust\" >&2\n    echo \"${1} remove <device address>\" >&2\n}\n\ndo_list() {\n    find /storage/.cache/bluetooth -type f -name info |\n\twhile read FILE\n\tdo\n\t    if grep -qE '^Trusted=true$' \"${FILE}\"\n\t    then\n\t\tDEVNAME=$(grep -E '^Name=' \"${FILE}\" | sed -e s+\"^Name=\"++)\n\t\tDEVADDR=$(basename $(dirname \"${FILE}\"))\n\t\techo \"${DEVADDR} ${DEVNAME}\"\n\t    fi\n\tdone\n}\n\ndo_remove() {\n    DEV=\"${1}\"\n    # output is never nice\n    if ! (echo \"untrust ${DEV}\" ; echo \"remove ${DEV}\") | /usr/bin/bluetoothctl >> /emuelec/logs/bluetooth.log 2>&1\n    then\n\treturn 1\n    fi\n    return 0\n}\n\ndo_trust() {\n\tlocal LEGACY=$(get_ee_setting ee_bluetooth_legacy.enabled)\n\tif [[ \"$LEGACY\" == \"1\" ]]; then\n\t\temuelec-bluetooth-legacy\n\telse\n\t\temuelec-bluetooth\n\tfi\n}\n\ncase \"${ACTION}\" in\n    \"list\")\n\tdo_list\n\t;;\n    \"trust\")\n\tdo_trust\n\t;;\n    \"remove\")\n    do_remove \"${1}\" || exit 1\n\t;;\n    *)\n\tdo_help \"${0}\"\n\texit 1\nesac\n\nexit 0\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-bluetooth-agent",
    "content": "#!/usr/bin/python\n\nfrom __future__ import absolute_import, print_function\n\nfrom optparse import OptionParser, make_option\nimport dbus\nimport dbus.service\nimport dbus.mainloop.glib\nfrom bluetool import bluezutils\nimport time\nimport os\nimport logging\nimport signal\nimport pgi\npgi.install_as_gi()\nfrom gi.repository import GLib\n\nAGENT_INTERFACE = 'org.bluez.Agent1'\n\ngadapter = None\ngdiscovering = False\ngdevices = {}\ng_devices_seen = {}\n\nlogging.basicConfig(filename='/emuelec/logs/bluetooth-agent.log', level=logging.DEBUG, format='%(asctime)s %(message)s')\n\ndef bool2str(val, valiftrue, valiffalse):\n  if val:\n    return valiftrue\n  else:\n    return valiffalse\n\ndef logging_status(msg):\n  with open(\"/var/run/bt_status\", \"w\") as file:\n    file.write(msg + \"\\n\")\n\ndef connect_device(path, address, properties, forceConnect, typeInput, typeAudio):\n  global gdiscovering\n\n  devName = \"\"\n  trusted = False\n  connected = False\n\n  # avoid devices without interesting information\n  if \"Trusted\" not in properties:\n    return\n  if \"Connected\" not in properties:\n    return\n\n  rproperties = {}\n  # Get the adapter name and bt mac\n  for key, value in properties.items():\n    if type(value) is dbus.String:\n      value = value.encode('ascii', 'replace')\n    rproperties[key] = value\n\n  trusted   = rproperties[\"Trusted\"]\n  paired    = rproperties[\"Paired\"]\n  devName = getDevName(rproperties)\n  shortDevName = getShortDevName(rproperties)\n  connected = rproperties[\"Connected\"]\n\n  # skip non input devices\n  if \"Icon\" not in properties:\n    logging.info(\"Skipping device {} (no type)\".format(getDevName(rproperties)));\n    return\n\n  if not ( (typeInput and properties[\"Icon\"].startswith(\"input\")) or (typeAudio and properties[\"Icon\"].startswith(\"audio-card\")) ):\n    logging.info(\"Skipping device {} because of type {}\".format(getDevName(rproperties), properties[\"Icon\"]));\n    return\n\n  blacklistAddr, blacklistName = getBlacklistAddrAndName(properties)\n\n  # add device to the seen list\n  if blacklistAddr not in g_devices_seen:\n    g_devices_seen[blacklistAddr] = { \"name\": blacklistName }\n    updateKnownDevicesList(g_devices_seen)\n\n  # skip blacklisted devices\n  if blacklistAddr is not None and isDeviceBlacklisted(blacklistAddr):\n    logging.info(\"Skipping blacklisted device {}\".format(blacklistName))\n    return\n\n  logging.info(\"event for \" + devName + \"(paired=\" + bool2str(paired, \"paired\", \"not paired\") + \", trusted=\" + bool2str(trusted, \"trusted\", \"untrusted\") + \", connected=\" + bool2str(connected, \"connected\", \"disconnected\") + \")\")\n\n  # skipping connected devices\n  if paired and trusted and connected:\n    logging.info(\"Skipping already connected device {}\".format(getDevName(rproperties)));\n    return\n  \n  if not paired:\n    if connected == False and gdiscovering:\n      doParing(address, devName, shortDevName)\n    return\n\n  # now it is paired\n  if not trusted and (gdiscovering or forceConnect):\n    logging.info(\"Trusting (\" + devName + \")\")\n    logging_status(\"Trusting \" + shortDevName + \"...\")\n    bluezProps = dbus.Interface(bus.get_object(\"org.bluez\", path), \"org.freedesktop.DBus.Properties\")\n    bluezProps.Set(\"org.bluez.Device1\", \"Trusted\", True)\n\n  # now it is paired and trusted\n  # Connect if Trusted and paired\n  if not connected or forceConnect:\n    doConnect(address, devName, shortDevName)\n\ndef doParing(address, devName, shortDevName):\n  logging.info(\"Pairing... (\" + devName + \")\")\n  logging_status(\"Pairing \" + shortDevName + \"...\")\n  device = bluezutils.find_device(address)\n  try:\n    device.Pair()\n  except Exception as e:\n    logging.info(\"Pairing failed (\" + devName + \")\")\n    logging_status(\"Pairing failed (\" + shortDevName + \")\")\n\ndef doConnect(address, devName, shortDevName):\n  global gadapter\n  global gdiscovering\n  \n  try:\n    # discovery stopped during connection to help some devices\n    if gdiscovering:\n      logging.info(\"Stop discovery\")\n      gadapter.StopDiscovery()\n\n    device = bluezutils.find_device(address)\n    ntry=5\n    while ntry > 0:\n      ntry = ntry -1\n      try:\n        logging.info(\"Connecting... (\" + devName + \")\")\n        logging_status(\"Connecting \" + shortDevName + \"...\")\n        device.Connect()\n        logging.info(\"Connected successfully (\" + devName + \")\")\n        logging_status(\"Connected successfully (\" + shortDevName + \")\")\n\n        if gdiscovering:\n          logging.info(\"Start discovery\")\n          gadapter.StartDiscovery()\n          return\n      except dbus.exceptions.DBusException as err:\n        logging.info(\"dbus: \" + err.get_dbus_message())\n        time.sleep(1)\n      except Exception as err:\n        logging.info(\"Connection failed (\" + devName + \")\")\n        time.sleep(1)\n    \n    logging.info(\"Connection failed. Give up. (\" + devName + \")\")\n    logging_status(\"Connection failed. Give up. (\" + shortDevName + \")\")\n    if gdiscovering:\n      logging.info(\"Start discovery\")\n      gadapter.StartDiscovery()\n  except Exception as e:\n    if gdiscovering:\n      logging.info(\"Start discovery\")\n      gadapter.StartDiscovery()\n    # don't raise, while startdiscovery doesn't like it\n    #raise e\n\ndef getDevName(properties):\n  #devName = properties[\"Name\"] + \" (\" + properties[\"Address\"] + \", \" + properties[\"Icon\"] + \")\"\n  #devStatus = \"Trusted=\" + str(properties[\"Trusted\"]) + \", paired=\" + str(properties[\"Paired\"]) + \", connected=\" + str(properties[\"Connected\"]), \", blocked=\" + str(properties[\"Blocked\"])\n  #devTech = \"legacyPairing: \" + str(properties[\"LegacyPairing\"]) # + \", RSSI: \" + properties[\"RSSI\"]\n\n  if \"Name\" in properties and \"Address\" in properties and \"Icon\" in properties:\n    return str(properties[\"Name\"]) + \" (\" + str(properties[\"Address\"]) + \", \" + str(properties[\"Icon\"]) + \")\"\n\n  if \"Name\" in properties and \"Address\" in properties:\n    return str(properties[\"Name\"]) + \" (\" + str(properties[\"Address\"]) + \")\"\n\n  if \"Name\" in properties and \"Icon\" in properties:\n    return str(properties[\"Name\"]) + \" (\" + str(properties[\"Icon\"]) + \")\"\n\n  if \"Name\" in properties:\n    return str(properties[\"Name\"])\n\n  if \"Address\" in properties and \"Icon\" in properties:\n    return str(properties[\"Address\"]) + \" (\" + str(properties[\"Icon\"]) + \")\"\n\n  if \"Address\" in properties:\n    return str(properties[\"Address\"])\n\n  if \"Icon\" in properties:\n    return str(properties[\"Icon\"])\n\n  return \"unknown\"\n\ndef updateKnownDevicesList(g_devices_seen):\n  f = open(\"/var/run/bluetooth_seen\", \"w\")\n  for key in g_devices_seen:\n    f.write(\"{} {}\\n\".format(key, g_devices_seen[key][\"name\"]))\n  f.close()\n\ndef isDeviceBlacklisted(blacklistAddr):\n  datafile = \"/var/lib/bluetooth/bluetooth_blacklisted\"\n\n  # reread the file each time in case somebody changed it\n  if not os.path.isfile(datafile):\n    return False\n\n  with open(datafile) as file:\n    lines = file.readlines()\n    for line in lines:\n      if line[0:len(blacklistAddr)] == blacklistAddr:\n        return True\n\n  return False\n\ndef getBlacklistAddrAndName(properties):\n  if \"Address\" not in properties:\n    return None\n  address = str(properties[\"Address\"])\n  name = \"\"\n\n  if \"Name\" in properties:\n    name = str(properties[\"Name\"])\n  elif \"Icon\" in properties:\n    name = str(properties[\"Icon\"])\n  else:\n    name = \"unknown\"\n\n  return address, name\n\ndef getShortDevName(properties):\n  if \"Name\" in properties:\n    return str(properties[\"Name\"])\n\n  if \"Address\" in properties:\n    return str(properties[\"Address\"])\n\n  if \"Icon\" in properties:\n    return str(properties[\"Icon\"])\n\n  return \"unknown\"\n\ndef getBluetoothWantedTypes():\n  if not os.path.isfile(\"/var/run/bt_types\"):\n    logging.info(\"no bt_types file\")\n    return True, True\n\n  btype = \"\"\n  with open(\"/var/run/bt_types\", \"r\") as file:\n    btype = file.read().strip()\n    logging.info(\"bt_type: {}\".format(btype))\n\n  if btype == \"\":\n    return True, True\n  if btype == \"pad\":\n    return True, False\n  if btype == \"audio\":\n    return False, True\n  return False, False\n\ndef interfaces_added(path, interfaces):\n  global gdevices\n\n  if \"org.bluez.Device1\" not in interfaces:\n    return\n  if not interfaces[\"org.bluez.Device1\"]:\n    return\n\n  properties = interfaces[\"org.bluez.Device1\"]\n\n  if path in gdevices:\n    gdevices[path] = merge2dicts(gdevices[path], properties)\n  else:\n    gdevices[path] = properties\n\n  if \"Address\" in gdevices[path]:\n    typeInput, typeAudio = getBluetoothWantedTypes()\n    connect_device(path, properties[\"Address\"], gdevices[path], False, typeInput, typeAudio)\n\ndef properties_changed(interface, changed, invalidated, path):\n  global gdevices\n\n  if interface != \"org.bluez.Device1\":\n    return\n\n  if path in gdevices:\n    gdevices[path] = merge2dicts(gdevices[path], changed)\n  else:\n    gdevices[path] = changed\n\n  #logging.info(\"Properties changed:\")\n  #logging.info(changed)\n  #logging.info(invalidated)\n\n  if \"Paired\" in changed and changed[\"Paired\"] == True:\n    # ok, do as in simple-agent, trust and connect\n    typeInput, typeAudio = getBluetoothWantedTypes()\n    connect_device(path, gdevices[path][\"Address\"], gdevices[path], True, typeInput, typeAudio)\n    return\n  \n  # ok, it is now connected, what else ?\n  if \"Connected\" in changed and changed[\"Connected\"] == True:\n    return\n\n  if \"Connected\" in changed and changed[\"Connected\"] == False:\n    logging.info(\"Skipping (property Connected changed to False)\");\n    return\n\n  if \"Address\" in gdevices[path]:\n    typeInput, typeAudio = getBluetoothWantedTypes()\n    connect_device(path, gdevices[path][\"Address\"], gdevices[path], False, typeInput, typeAudio)\n\ndef merge2dicts(d1, d2):\n  res = d1.copy()\n  res.update(d2)\n  return res\n\ndef user_signal_start_discovery(signum, frame):\n  global gdiscovering\n  global gadapter\n\n  try:\n    if gdiscovering == False:\n      gdiscovering = True\n      logging.info(\"Start discovery (signal)\")\n      gadapter.StartDiscovery()\n  except:\n    pass\n\ndef user_signal_stop_discovery(signum, frame):\n  global gdiscovering\n  global gadapter\n\n  try:\n    if gdiscovering:\n      gdiscovering = False\n      logging.info(\"Stop discovery (signal)\")\n      gadapter.StopDiscovery()\n  except:\n    pass\n\nclass Agent(dbus.service.Object):\n  exit_on_release = True\n\n  def set_exit_on_release(self, exit_on_release):\n    self.exit_on_release = exit_on_release\n\n  @dbus.service.method(AGENT_INTERFACE, in_signature=\"\", out_signature=\"\")\n  def Release(self):\n    logging.info(\"agent: Release\")\n    if self.exit_on_release:\n      mainloop.quit()\n  \n  @dbus.service.method(AGENT_INTERFACE, in_signature=\"os\", out_signature=\"\")\n  def AuthorizeService(self, device, uuid):\n    logging.info(\"agent: AuthorizeService\")\n    return\n  \n  @dbus.service.method(AGENT_INTERFACE, in_signature=\"o\", out_signature=\"s\")\n  def RequestPinCode(self, device):\n    logging.info(\"RequestPinCode (%s)\" % (device))\n    return \"0000\"\n\n  @dbus.service.method(AGENT_INTERFACE, in_signature=\"o\", out_signature=\"u\")\n  def RequestPasskey(self, device):\n    logging.info(\"RequestPasskey (%s)\" % (device))\n    return 0\n  \n  @dbus.service.method(AGENT_INTERFACE, in_signature=\"ouq\", out_signature=\"\")\n  def DisplayPasskey(self, device, passkey, entered):\n    logging.info(\"agent: DisplayPasskey (%s, %06u entered %u)\" % (device, passkey, entered))\n  \n  @dbus.service.method(AGENT_INTERFACE, in_signature=\"os\", out_signature=\"\")\n  def DisplayPinCode(self, device, pincode):\n    logging.info(\"agent: DisplayPinCode (%s, %s)\" % (device, pincode))\n  \n  @dbus.service.method(AGENT_INTERFACE, in_signature=\"ou\", out_signature=\"\")\n  def RequestConfirmation(self, device, passkey):\n    logging.info(\"agent: RequestConfirmation\")\n    return\n  \n  @dbus.service.method(AGENT_INTERFACE, in_signature=\"o\", out_signature=\"\")\n  def RequestAuthorization(self, device):\n    logging.info(\"agent: RequestAuthorization\")\n    return\n  \n  @dbus.service.method(AGENT_INTERFACE, in_signature=\"\", out_signature=\"\")\n  def Cancel(self):\n    logging.info(\"agent: Cancel\")\n\ndef do_main_loop(dev_id):\n  global gadapter\n\n  # adapter\n  try:\n    adapter = bluezutils.find_adapter(dev_id)\n  except:\n    # try to find any adapter\n    adapter = bluezutils.find_adapter(None)\n  logging.info(\"adapter found\")\n\n  gadapter = adapter\n  adapters = {}\n\n  om = dbus.Interface(bus.get_object(\"org.bluez\", \"/\"), \"org.freedesktop.DBus.ObjectManager\")\n  objects = om.GetManagedObjects()\n  for path, interfaces in objects.items():\n    if \"org.bluez.Device1\" in interfaces:\n      gdevices[path] = interfaces[\"org.bluez.Device1\"]\n    if \"org.bluez.Adapter1\" in interfaces:\n      adapters[path] = interfaces[\"org.bluez.Adapter1\"]\n  \n  adapter_props = adapters[adapter.object_path]\n  logging.info(adapter_props[\"Name\"] + \"(\" + adapter_props[\"Address\"] + \"), powered=\" + str(adapter_props[\"Powered\"]))\n\n  # power on adapter if needed\n  if adapter_props[\"Powered\"] == 0:\n    try:\n      logging.info(\"powering on adapter (\"+ adapter_props[\"Address\"] +\")\")\n      adapterSetter = dbus.Interface(bus.get_object(\"org.bluez\", adapter.object_path), \"org.freedesktop.DBus.Properties\")\n      adapterSetter.Set(\"org.bluez.Adapter1\", \"Powered\", True)\n    except:\n      pass # hum, not nice\n\n  gdiscovering = False\n\n  # events\n  # use events while i manage to stop discovery only from the process having started it\n  signal.signal(signal.SIGUSR1, user_signal_start_discovery)\n  signal.signal(signal.SIGUSR2, user_signal_stop_discovery)\n  \n  mainloop = GLib.MainLoop()\n  mainloop.run()\n\nif __name__ == '__main__':\n  # options\n  option_list = [ make_option(\"-i\", \"--device\", action=\"store\", type=\"string\", dest=\"dev_id\") ]\n  parser = OptionParser(option_list=option_list)\n  (options, args) = parser.parse_args()\n\n  # initialize the seen devices file\n  updateKnownDevicesList(g_devices_seen)\n\n  # register dbus\n  dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)\n  bus = dbus.SystemBus()\n\n  bus.add_signal_receiver(interfaces_added,   dbus_interface = \"org.freedesktop.DBus.ObjectManager\", signal_name = \"InterfacesAdded\")\n  bus.add_signal_receiver(properties_changed, dbus_interface = \"org.freedesktop.DBus.Properties\",    signal_name = \"PropertiesChanged\", arg0 = \"org.bluez.Device1\", path_keyword = \"path\")\n\n  # register the agent\n  agentpath = \"/emuelec/agent\"\n  obj = bus.get_object(\"org.bluez\", \"/org/bluez\")\n  manager = dbus.Interface(obj, \"org.bluez.AgentManager1\")\n  manager.RegisterAgent(agentpath, \"NoInputNoOutput\")\n  manager.RequestDefaultAgent(agentpath)\n  agent = Agent(bus, agentpath)\n  logging.info(\"agent registered\")\n\n  # run the agent, allows some tries while hardware can take time to initiate\n  time.sleep(5)\n  try:\n    do_main_loop(options.dev_id)\n  except Exception as e:\n    logging.error(\"agent fails\")\n    logging.error(e, exc_info=True)\n    raise\n  logging.error(\"agent gave up\")\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-brightness",
    "content": "#!/bin/bash\n\nif test ! -e /sys/class/backlight/backlight/brightness\nthen\n    echo \"no brightness found\" >&2\n    exit 1\nfi\n\nsetValue() {\n    NEWVAL=$1\n    XMAX=$2\n\n    test \"${NEWVAL}\" -lt 0         && NEWVAL=0\n    test \"${NEWVAL}\" -gt \"${XMAX}\" && NEWVAL=\"${XMAX}\"\n    \n    echo \"${NEWVAL}\" > /sys/class/backlight/backlight/brightness\n}\n\n# get\nif test $# = 0\nthen\n    X=$(cat /sys/class/backlight/backlight/brightness)\n    XMAX=$(cat /sys/class/backlight/backlight/max_brightness)\n    echo $(expr \"${X}\" \"*\" \"100\" / \"${XMAX}\")\n    exit 0\nfi\n\n# set\nif test $# = 1\nthen\n    XMAX=$(cat /sys/class/backlight/backlight/max_brightness)\n    NEWVAL=$(expr \"${1}\" \"*\" \"${XMAX}\" / 100)\n    setValue \"${NEWVAL}\" \"${XMAX}\"\n    exit 0\nfi\n\n# set +\nif test $# = 2\nthen\n    X=$(cat /sys/class/backlight/backlight/brightness)\n    XMAX=$(cat /sys/class/backlight/backlight/max_brightness)\n    DELTA=$(expr \"${2}\" '*' ${XMAX} / 100)\n    NEWVAL=$(expr \"${X}\" \"${1}\" \"${DELTA}\")\n    setValue \"${NEWVAL}\" \"${XMAX}\"\n    exit 0\nfi\n\n# help\necho \"${0}\"      >&2\necho \"${0} + 10\" >&2\necho \"${0} - 20\" >&2\nexit 1\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-bt-list-devices",
    "content": "#!/usr/bin/python\n\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport dbus\n\nbus = dbus.SystemBus()\n\nmanager = dbus.Interface(bus.get_object(\"org.bluez\", \"/\"),\n\t\t\t\t\t\"org.freedesktop.DBus.ObjectManager\")\n\ndef extract_objects(object_list):\n\tlist = \"\"\n\tfor object in object_list:\n\t\tval = str(object)\n\t\tlist = list + val[val.rfind(\"/\") + 1:] + \" \"\n\treturn list\n\ndef extract_uuids(uuid_list):\n\tlist = \"\"\n\tfor uuid in uuid_list:\n\t\tif (uuid.endswith(\"-0000-1000-8000-00805f9b34fb\")):\n\t\t\tif (uuid.startswith(\"0000\")):\n\t\t\t\tval = \"0x\" + uuid[4:8]\n\t\t\telse:\n\t\t\t\tval = \"0x\" + uuid[0:8]\n\t\telse:\n\t\t\tval = str(uuid)\n\t\tlist = list + val + \" \"\n\treturn list\n\nobjects = manager.GetManagedObjects()\n\nall_devices = (str(path) for path, interfaces in objects.iteritems() if\n\t\t\t\t\t\"org.bluez.Device1\" in interfaces.keys())\n\nfor path, interfaces in objects.iteritems():\n\tif \"org.bluez.Adapter1\" not in interfaces.keys():\n\t\tcontinue\n\n\tprint(\"[ \" + path + \" ]\")\n\n\tproperties = interfaces[\"org.bluez.Adapter1\"]\n\tfor key in properties.keys():\n\t\tvalue = properties[key]\n\t\tif (key == \"UUIDs\"):\n\t\t\tlist = extract_uuids(value)\n\t\t\t#print(\"    %s = %s\" % (key, list))\n\t\telse:\n                        if key not in [\"Class\", \"Alias\", \"Modalias\", \"DiscoverableTimeout\", \"PairableTimeout\", \"Discoverable\"]:\n\t\t\t        print(\"    %s = %s\" % (key, value))\n\n\tdevice_list = [d for d in all_devices if d.startswith(path + \"/\")]\n\n\tfor dev_path in device_list:\n\t\tprint(\"    [ \" + dev_path + \" ]\")\n\n\t\tdev = objects[dev_path]\n\t\tproperties = dev[\"org.bluez.Device1\"]\n\n\t\tfor key in properties.keys():\n                    if key not in [\"UUIDs\", \"Class\", \"ServicesResolved\", \"Adapter\"]:\n\t\t\tvalue = properties[key]\n\t\t\tif (key == \"UUIDs\"):\n\t\t\t\tlist = extract_uuids(value)\n\t\t\t\tprint(\"        %s = %s\" % (key, list))\n\t\t\telif (key == \"Class\"):\n\t\t\t\tprint(\"        %s = 0x%06x\" % (key, value))\n\t\t\telif (key == \"Vendor\"):\n\t\t\t\tprint(\"        %s = 0x%04x\" % (key, value))\n\t\t\telif (key == \"Product\"):\n\t\t\t\tprint(\"        %s = 0x%04x\" % (key, value))\n\t\t\telif (key == \"Version\"):\n\t\t\t\tprint(\"        %s = 0x%04x\" % (key, value))\n\t\t\telse:\n\t\t\t\tprint(\"        %s = %s\" % (key, value))\n\n\tprint(\"\")\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-bt-test-device",
    "content": "#!/usr/bin/python\n\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nfrom optparse import OptionParser, make_option\nimport re\nimport sys\nimport dbus\nimport dbus.mainloop.glib\ntry:\n  from gi.repository import GObject\nexcept ImportError:\n  import gobject as GObject\nimport bluezutils\n\ndbus.mainloop.glib.DBusGMainLoop(set_as_default=True)\nbus = dbus.SystemBus()\nmainloop = GObject.MainLoop()\n\noption_list = [\n\t\tmake_option(\"-i\", \"--device\", action=\"store\",\n\t\t\t\ttype=\"string\", dest=\"dev_id\"),\n\t\t]\nparser = OptionParser(option_list=option_list)\n\n(options, args) = parser.parse_args()\n\nif (len(args) < 1):\n\tprint(\"Usage: %s <command>\" % (sys.argv[0]))\n\tprint(\"\")\n\tprint(\"  list\")\n\tprint(\"  create <address>\")\n\tprint(\"  remove <address|path>\")\n\tprint(\"  connect <address> [profile]\")\n\tprint(\"  disconnect <address> [profile]\")\n\tprint(\"  class <address>\")\n\tprint(\"  name <address>\")\n\tprint(\"  alias <address> [alias]\")\n\tprint(\"  trusted <address> [yes/no]\")\n\tprint(\"  blocked <address> [yes/no]\")\n\tsys.exit(1)\n\nif (args[0] == \"list\"):\n\tadapter = bluezutils.find_adapter(options.dev_id)\n\tadapter_path = adapter.object_path\n\n\tom = dbus.Interface(bus.get_object(\"org.bluez\", \"/\"),\n\t\t\t\t\t\"org.freedesktop.DBus.ObjectManager\")\n\tobjects = om.GetManagedObjects()\n\n\tfor path, interfaces in objects.iteritems():\n\t\tif \"org.bluez.Device1\" not in interfaces:\n\t\t\tcontinue\n\t\tproperties = interfaces[\"org.bluez.Device1\"]\n\t\tif properties[\"Adapter\"] != adapter_path:\n\t\t\tcontinue;\n\t\tprint(\"%s %s\" % (properties[\"Address\"], properties[\"Alias\"]))\n\n\tsys.exit(0)\n\ndef create_device_reply(device):\n\tprint(\"New device (%s)\" % device)\n\tmainloop.quit()\n\tsys.exit(0)\n\ndef create_device_error(error):\n\tprint(\"Creating device failed: %s\" % error)\n\tmainloop.quit()\n\tsys.exit(1)\n\nif (args[0] == \"create\"):\n\tif (len(args) < 2):\n\t\tprint(\"Need address parameter\")\n\telse:\n\t\tadapter = bluezutils.find_adapter(options.dev_id)\n\t\tadapter.CreateDevice(args[1],\n\t\t\t\treply_handler=create_device_reply,\n\t\t\t\terror_handler=create_device_error)\n\tmainloop.run()\n\nif (args[0] == \"remove\"):\n\tif (len(args) < 2):\n\t\tprint(\"Need address or object path parameter\")\n\telse:\n\t\tmanaged_objects = bluezutils.get_managed_objects()\n\t\tadapter = bluezutils.find_adapter_in_objects(managed_objects,\n\t\t\t\t\t\t\t\toptions.dev_id)\n\t\ttry:\n\t\t\tdev = bluezutils.find_device_in_objects(managed_objects,\n\t\t\t\t\t\t\t\targs[1],\n\t\t\t\t\t\t\t\toptions.dev_id)\n\t\t\tpath = dev.object_path\n\t\texcept:\n\t\t\tpath = args[1]\n\t\tadapter.RemoveDevice(path)\n\tsys.exit(0)\n\nif (args[0] == \"connect\"):\n\tif (len(args) < 2):\n\t\tprint(\"Need address parameter\")\n\telse:\n\t\tdevice = bluezutils.find_device(args[1], options.dev_id)\n\t\tif (len(args) > 2):\n\t\t\tdevice.ConnectProfile(args[2])\n\t\telse:\n\t\t\tdevice.Connect()\n\tsys.exit(0)\n\nif (args[0] == \"disconnect\"):\n\tif (len(args) < 2):\n\t\tprint(\"Need address parameter\")\n\telse:\n\t\tdevice = bluezutils.find_device(args[1], options.dev_id)\n\t\tif (len(args) > 2):\n\t\t\tdevice.DisconnectProfile(args[2])\n\t\telse:\n\t\t\tdevice.Disconnect()\n\tsys.exit(0)\n\nif (args[0] == \"class\"):\n\tif (len(args) < 2):\n\t\tprint(\"Need address parameter\")\n\telse:\n\t\tdevice = bluezutils.find_device(args[1], options.dev_id)\n\t\tpath = device.object_path\n\t\tprops = dbus.Interface(bus.get_object(\"org.bluez\", path),\n\t\t\t\t\t\"org.freedesktop.DBus.Properties\")\n\t\tcls = props.Get(\"org.bluez.Device1\", \"Class\")\n\t\tprint(\"0x%06x\" % cls)\n\tsys.exit(0)\n\nif (args[0] == \"name\"):\n\tif (len(args) < 2):\n\t\tprint(\"Need address parameter\")\n\telse:\n\t\tdevice = bluezutils.find_device(args[1], options.dev_id)\n\t\tpath = device.object_path\n\t\tprops = dbus.Interface(bus.get_object(\"org.bluez\", path),\n\t\t\t\t\t\"org.freedesktop.DBus.Properties\")\n\t\tname = props.Get(\"org.bluez.Device1\", \"Name\")\n\t\tprint(name)\n\tsys.exit(0)\n\nif (args[0] == \"alias\"):\n\tif (len(args) < 2):\n\t\tprint(\"Need address parameter\")\n\telse:\n\t\tdevice = bluezutils.find_device(args[1], options.dev_id)\n\t\tpath = device.object_path\n\t\tprops = dbus.Interface(bus.get_object(\"org.bluez\", path),\n\t\t\t\t\t\"org.freedesktop.DBus.Properties\")\n\t\tif (len(args) < 3):\n\t\t\talias = props.Get(\"org.bluez.Device1\", \"Alias\")\n\t\t\tprint(alias)\n\t\telse:\n\t\t\tprops.Set(\"org.bluez.Device1\", \"Alias\", args[2])\n\tsys.exit(0)\n\nif (args[0] == \"trusted\"):\n\tif (len(args) < 2):\n\t\tprint(\"Need address parameter\")\n\telse:\n\t\tdevice = bluezutils.find_device(args[1], options.dev_id)\n\t\tpath = device.object_path\n\t\tprops = dbus.Interface(bus.get_object(\"org.bluez\", path),\n\t\t\t\t\t\"org.freedesktop.DBus.Properties\")\n\t\tif (len(args) < 3):\n\t\t\ttrusted = props.Get(\"org.bluez.Device1\", \"Trusted\")\n\t\t\tprint(trusted)\n\t\telse:\n\t\t\tif (args[2] == \"yes\"):\n\t\t\t\tvalue = dbus.Boolean(1)\n\t\t\telif (args[2] == \"no\"):\n\t\t\t\tvalue = dbus.Boolean(0)\n\t\t\telse:\n\t\t\t\tvalue = dbus.Boolean(args[2])\n\t\t\tprops.Set(\"org.bluez.Device1\", \"Trusted\", value)\n\tsys.exit(0)\n\nif (args[0] == \"blocked\"):\n\tif (len(args) < 2):\n\t\tprint(\"Need address parameter\")\n\telse:\n\t\tdevice = bluezutils.find_device(args[1], options.dev_id)\n\t\tpath = device.object_path\n\t\tprops = dbus.Interface(bus.get_object(\"org.bluez\", path),\n\t\t\t\t\t\"org.freedesktop.DBus.Properties\")\n\t\tif (len(args) < 3):\n\t\t\tblocked = props.Get(\"org.bluez.Device1\", \"Blocked\")\n\t\t\tprint(blocked)\n\t\telse:\n\t\t\tif (args[2] == \"yes\"):\n\t\t\t\tvalue = dbus.Boolean(1)\n\t\t\telif (args[2] == \"no\"):\n\t\t\t\tvalue = dbus.Boolean(0)\n\t\t\telse:\n\t\t\t\tvalue = dbus.Boolean(args[2])\n\t\t\tprops.Set(\"org.bluez.Device1\", \"Blocked\", value)\n\tsys.exit(0)\n\nprint(\"Unknown command\")\nsys.exit(1)\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-btDaemon",
    "content": "#!/usr/bin/python\n\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nfrom optparse import OptionParser, make_option\nimport dbus\nimport dbus.mainloop.glib\ntry:\n  from gi.repository import GObject\nexcept ImportError:\n  import gobject as GObject\nimport bluezutils\n\ncompact = False\ndevices = {}\n\ndef connect_device(address, properties):\n\t# Get the adapter name and bt mac\n\tfor key, value in properties.iteritems():\n\t\tif type(value) is dbus.String:\n\t\t\tvalue = unicode(value).encode('ascii', 'replace')\n\t\tif (key == \"Trusted\"):\n\t\t\ttrusted = value\n\t\telif (key == \"Connected\"):\n\t\t\tconnected = value\n\t# Get the device\n\tdevice = bluezutils.find_device(address)\n\t# Connect if Trusted\n\tif trusted and not connected:\n\t\tprint(\"Connecting {} ...\".format(address))\n\t\tdevice.Connect()\n\telse:\n\t\tprint(\"{} is either not trusted, either already connected\".format(address))\n\ndef print_compact(address, properties):\n\tname = \"\"\n\taddress = \"<unknown>\"\n\n\tfor key, value in properties.iteritems():\n\t\tif type(value) is dbus.String:\n\t\t\tvalue = unicode(value).encode('ascii', 'replace')\n\t\tif (key == \"Name\"):\n\t\t\tname = value\n\t\telif (key == \"Address\"):\n\t\t\taddress = value\n\n\tif \"Logged\" in properties:\n\t\tflag = \"*\"\n\telse:\n\t\tflag = \" \"\n\n\tprint(\"%s%s %s\" % (flag, address, name))\n\n\tproperties[\"Logged\"] = True\n\ndef print_normal(address, properties):\n\tprint(\"[ \" + address + \" ]\")\n\n\tfor key in properties.keys():\n\t\tvalue = properties[key]\n\t\tif type(value) is dbus.String:\n\t\t\tvalue = unicode(value).encode('ascii', 'replace')\n\t\tif (key == \"Class\"):\n\t\t\tprint(\"    %s = 0x%06x\" % (key, value))\n\t\telse:\n\t\t\tprint(\"    %s = %s\" % (key, value))\n\n\tprint()\n\n\tproperties[\"Logged\"] = True\n\ndef skip_dev(old_dev, new_dev):\n\tif not \"Logged\" in old_dev:\n\t\treturn False\n\tif \"Name\" in old_dev:\n\t\treturn True\n\tif not \"Name\" in new_dev:\n\t\treturn True\n\treturn False\n\ndef interfaces_added(path, interfaces):\n\tproperties = interfaces[\"org.bluez.Device1\"]\n\tif not properties:\n\t\treturn\n\n\tif path in devices:\n\t\tdev = devices[path]\n\n\t\tif compact and skip_dev(dev, properties):\n\t\t\treturn\n\t\tdevices[path] = dict(devices[path].items() + properties.items())\n\telse:\n\t\tdevices[path] = properties\n\n\tif \"Address\" in devices[path]:\n\t\taddress = properties[\"Address\"]\n\telse:\n\t\taddress = \"<unknown>\"\n\n\tprint(\"Interface added {}\".format(address))\n\n\tif compact:\n\t\tprint_compact(address, devices[path])\n\telse:\n\t\tprint_normal(address, devices[path])\n\tconnect_device(address, devices[path])\n\ndef properties_changed(interface, changed, invalidated, path):\n\tif interface != \"org.bluez.Device1\":\n\t\treturn\n\n\tif path in devices:\n\t\tdev = devices[path]\n\n\t\tif compact and skip_dev(dev, changed):\n\t\t\treturn\n\t\tdevices[path] = dict(devices[path].items() + changed.items())\n\telse:\n\t\tdevices[path] = changed\n\n\tif \"Address\" in devices[path]:\n\t\taddress = devices[path][\"Address\"]\n\telse:\n\t\taddress = \"<unknown>\"\n\n\tprint(\"Properties changed {}\".format(address))\n\n\tif compact:\n\t\tprint_compact(address, devices[path])\n\telse:\n\t\tprint_normal(address, devices[path])\n\tconnect_device(address, devices[path])\n\nif __name__ == '__main__':\n\tdbus.mainloop.glib.DBusGMainLoop(set_as_default=True)\n\n\tbus = dbus.SystemBus()\n\n\toption_list = [\n\t\t\tmake_option(\"-i\", \"--device\", action=\"store\",\n\t\t\t\t\ttype=\"string\", dest=\"dev_id\"),\n\t\t\tmake_option(\"-c\", \"--compact\",\n\t\t\t\t\taction=\"store_true\", dest=\"compact\"),\n\t\t\t]\n\tparser = OptionParser(option_list=option_list)\n\n\t(options, args) = parser.parse_args()\n\n\tadapter = bluezutils.find_adapter(options.dev_id)\n\n\tif options.compact:\n\t\tcompact = True;\n\n\tbus.add_signal_receiver(interfaces_added,\n\t\t\tdbus_interface = \"org.freedesktop.DBus.ObjectManager\",\n\t\t\tsignal_name = \"InterfacesAdded\")\n\n\tbus.add_signal_receiver(properties_changed,\n\t\t\tdbus_interface = \"org.freedesktop.DBus.Properties\",\n\t\t\tsignal_name = \"PropertiesChanged\",\n\t\t\targ0 = \"org.bluez.Device1\",\n\t\t\tpath_keyword = \"path\")\n\n\tom = dbus.Interface(bus.get_object(\"org.bluez\", \"/\"),\n\t\t\t\t\"org.freedesktop.DBus.ObjectManager\")\n\tobjects = om.GetManagedObjects()\n\tfor path, interfaces in objects.iteritems():\n\t\tif \"org.bluez.Device1\" in interfaces:\n\t\t\tdevices[path] = interfaces[\"org.bluez.Device1\"]\n\n\tmainloop = GObject.MainLoop()\n\tmainloop.run()\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-config",
    "content": "#!/bin/bash\n\n. /etc/profile\n\nif [ ! \"$1\" ];then\n\techo -e \"usage : batocera-config [command] [args]\\nWith command in\\n\\toverscan [enable|disable]\\n\\tlsaudio\\n\\tgetaudio\\n\\taudio [hdmi|jack|auto|custom|x,y]\\n\\tcanupdate\\n\\tupdate\\n\\twifi [enable|disable] ssid key\\n\\tstorage [current|list|INTERNAL|ANYEXTERNAL|RAM|DEV UUID]\\n\\tsetRootPassword [password]\\n\\tgetRootPassword\\n\\ttz [|tz]\"\n\texit 1\nfi\nconfigFile=\"/storage/.config/emuelec/configs/config.txt\"\ncommand=\"$1\"\nmode=\"$2\"\nextra1=\"$3\"\nextra2=\"$4\"\nextra3=\"$5\"\nextra4=\"$6\"\narch=$(cat /ee_arch)\n\nupdateurl=\"https://127.0.0.1\"\n\npreBootConfig() {\n    mount -o remount,rw /boot\n}\n\npostBootConfig() {\n    mount -o remount,ro /boot\n}\n\nbato_config_set_value () {\n\tkey=$1\n\tvalue=$2\n\t[ -z \"$value\" ] && value=0\n\tcat \"$configFile\" | grep \"$key\"\n        valPresent=$?\n\tif [ \"$valPresent\" != \"0\" ];then\n\t\techo \"$key=$value\" >> \"$configFile\"\n\telse\n\t\tsed -i \"s/#\\?$key=.*/$key=$value/g\" \"$configFile\"\n\tfi\n}\n\nif [ \"$(get_es_setting string LogLevel)\" == \"minimal\" ]; then \n    log=\"/dev/null\"\nelse\n    log=/emuelec/logs/systemsettings.log\nfi\nsystemsetting=\"/usr/bin/batocera/batocera-settings\"\n\n\n#echo \"----config ----\" >> $log\n\nif [ \"$command\" == \"volume\" ];then\n\tif [ \"$mode\" != \"\" ];then\n        \techo \"setting audio volume : $mode\" >> $log\n\n\t\t# on my pc, the master is turned off at boot\n\t\t# i don't know what are the rules to set here.\n\t\tamixer set Master unmute      || exit 1\n                amixer set Master    -- ${mode}% || exit 1\n\n\t\t# maximize the sound to be sure it's not 0, allow errors\n\t\tamixer set PCM       -- 100% #|| exit 1\n\t\tamixer set Headphone -- 100% #|| exit 1\n\t\texit 0\n\tfi\n\texit 12\nfi\n\nif [ \"$command\" == \"canupdate\" ];then\n\navailable=$(updatecheck.sh canupdate)\n\tif [[ \"$available\" != \"no\" ]]; then\n        echo \"$available\"\n\t\texit 0\n\tfi\n\texit 12\nfi\n\nif [ \"$command\" == \"update\" ];then\n\temuelec-upgrade\n\texit $?\nfi\n\nif [[ \"$command\" == \"wifi\" ]]; then\n        ssid=\"$3\"\n        psk=\"$4\"\n\n        if [[ \"$mode\" == \"enable\" ]]; then\n            echo \"configure wifi\" >> $log\n\t    mkdir -p \"/storage/.cache/connman\" || exit 1\n\t    cat > \"/storage/.cache/connman/emuelec_wifi.config\" <<EOF\n[global]\nName=emuelec\n\n[service_emuelec_default]\nType=wifi\nName=${ssid}\nEOF\n\t    if test \"${psk}\" != \"\"\n\t    then\n\t\techo \"Passphrase=${psk}\" >> \"/storage/.cache/connman/emuelec_wifi.config\"\n\t    fi\n\n\t    connmanctl enable wifi || exit 1\n\t    connmanctl scan   wifi || exit 1\n            exit 0\n        fi\n  \tif [[ \"$mode\" =~ \"start\" ]]; then\n            if [[ \"$mode\" != \"forcestart\" ]]; then\n                settingsWlan=\"`$systemsetting -command load -key wifi.enabled`\"\n                if [ \"$settingsWlan\" != \"1\" ];then\n                    exit 1\n                fi\n            fi\n\t    connmanctl enable wifi || exit 1\n\t    connmanctl scan   wifi || exit 1\n\t    exit 0\n        fi\n        if [[ \"$mode\" == \"disable\" ]]; then\n\t    connmanctl disable wifi\n            exit $?\n        fi\n\tif [[ \"$mode\" == \"list\" ]]; then\n\t    WAVAILABLE=$(connmanctl services | cut -b 5- | sed -e s+'^\\([^ ]*\\).*$'+'\\1'+ | grep -vE '^Wired$|^<hidden>$')\n\t    if test -n \"${ssid}\"\n\t    then\n\t\techo \"${WAVAILABLE}\" | grep -qE '^'\"${ssid}\"'$' || echo \"${ssid}\"\n\t    fi\n\t    echo \"${WAVAILABLE}\"\n            exit 0\n\tfi\nfi\n\nif [[ \"$command\" == \"storage\" ]]; then\n    exit 0; \nfi\n\nif [[ \"$command\" == \"forgetBT\" ]]; then\n   killall -9 hcitool\n   systemctl stop bluetooth\n   rm -rf /storage/.cache/bluetooth/*\n   systemctl start bluetooth\n   exit 0\nfi\n\nif [ \"$command\" == \"tz\" ];then\n    if test \"$mode\" == \"\"\n    then\n\tcat /emuelec/configs/tz\n    else\n\tif test -f \"/usr/share/zoneinfo/${mode}\"\n\tthen\n\t    echo \"TIMEZONE=${mode}\" > /storage/.cache/timezone\n        systemctl restart tz-data.service\n\tfi\n    fi\n    exit $?\nfi\n\nexit 10\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-es-thebezelproject",
    "content": "#! /bin/bash\n#\n# Download and install The Bezel Project for Batocera\n#\n# @evoflash and @lbrpdx on Batocera Forums and Discord\n#\n# Usage:\n# batocera-es-thebezelproject 'list', 'install or remove <system_name>'\n#\n#\n\nDECODIR=\"/storage/roms/\"\nROMSDIR=\"/storage/roms/\"\nDEFAULTBEZELDIR=\"default/systems/\"\nBEZELPROJECTDIR=\"bezels/\"\nBEZELPROJECTGAMESDIR=\"${BEZELPROJECTDIR}\"\nBEZELPROJECTSYSTEMDIR=\"${BEZELPROJECTDIR}\"\nBEZELSLIST=\"https://raw.githubusercontent.com/EmuELEC/emuelec.github.io/master/settings/bezelproject\"\nLOCALBEZELSLIST=\"/storage/.config/emuelec/configs/bezels.txt\"\n# bezels.txt must be a plain file with the format 'bezel_name https://githubURL' (spaces or tabs)\n# Example of a bezels.txt file:\n# fba\thttps://github.com/thebezelproject/bezelproject-MAME\n# snes\thttps://github.com/thebezelproject/bezelproject-SNES\nDEBUG=0\nEE_TMP=\"/tmp/overlays\"\n\n###############################\n#\nfunction usage() {\n\techo \"$(basename $0) - downloads and installs The Bezel Project for Batocera\"\n\techo \" \"\n\techo \"It accepts three modes: 'list', 'install' and 'remove' <system>'\"\n\techo \"- 'list' for the list of systems installed on the system, and available within TheBezelProject, and if they are\"\n\techo \"   [A]vailable to install, [I]nstalled or [?]unknown.\"\n\techo \"- 'install <system>' to install the bezels for this <system>.\"\n\techo \"- 'remove <system>' to remove the bezels for this <system>.\"\n\techo \"- 'remove all' to remove all the bezels.\"\n\techo \" \"\n\techo \"If you have a local $LOCALBEZELSLIST file,\"\n\techo \"it will override the one hosted on Batocera website.\"\n\treturn 1\n}\n\n###############################\n# check if url format is valid\nfunction check_url() {\n\t[[ \"$1\" =~ ^(https?|ftp)://.*$ ]] && echo \"[A]\" || echo \"[?]\"\n}\n\n###############################\n# return the git name\nfunction git_name() {\n\techo \"$1\" | sed \"s,.*/\\(.*\\),\\1,\"\n}\n\n###############################\n# return the number of files in a directory\nfunction files_count() {\n\techo `find \"$1\" -maxdepth 1 -type f -name \"[!.]*\" | wc -l`\n}\n\n###############################\n#\nfunction list() {\n\tlocal count=0\n\tlocal fn=$(date +\"%s\")\n\tlocal tmp=\"$EE_TMP/bezels_$fn\"\n\tlocal filescount\n\tlocal systemname\n\tlocal url\n\n\t[ $DEBUG -eq 1 ] && echo \"DEBUG: path to bezels ${DECODIR}${BEZELPROJECTGAMESDIR}\"\n\techo \"* EmuELEC bezels *\"\n\t\n\t# create temporary files in /tmp\n\tif [ -f $LOCALBEZELSLIST ]; then\n\t\tcp -f \"$LOCALBEZELSLIST\" \"${tmp}\"\n\telse\n\t\tcurl -sfL \"$BEZELSLIST\" -o \"${tmp}\" || return 1\n\t\tsed -i 's/\\r$//' \"${tmp}\"\n\tfi\n\t\n\t# reading bezels list from configuration file\n\twhile IFS=$' \\t' read systemname url ; do\n\t\t[ -z \"${systemname}\" ] && continue\n\t\tlet count+=1\n\t\t[ $DEBUG -eq 1 ] && echo \"DEBUG: bezels for system ${systemname} (from bezels list)\"\n\t\t# check if roms/<system> directory exist\n\t\tif [ ! -d \"${ROMSDIR}${systemname}\" ]; then continue; fi\n\t\t# there is at least one file in each roms/<system> directory (i.e. _info.txt)\n\t\tfilescount=$(files_count \"${ROMSDIR}${systemname}\")\n\t\tif [ \"${filescount}\" -le 1 ]; then\t continue; fi\n\t\t# check if url is valid and return [A] else [?]\n\t\tia=$(check_url \"${url}\")\n        \n        if [ \"${systemname}\" == \"mame\" ] || [ \"${systemname}\" == \"arcade\" ] || [ \"${systemname}\" == \"fbneo\" ] || [ \"${systemname}\" == \"neogeo\" ]; then\n        rsystemname=\"arcade\"\n        else\n        rsystemname=\"${systemname}\"\n        fi\n        \n\t\t# if games/<system> directory exist we assume the bezels are already installed\n\t\tif [ -d \"${DECODIR}${BEZELPROJECTGAMESDIR}${rsystemname}\" ]; then ia=\"[I]\"; fi\n\t\techo \"$ia ${systemname} - ${url}\"\n\tdone < \"${tmp}\"\n\t\n\t[ $DEBUG -eq 1 ] && echo \"DEBUG:  there are $count systems (from bezels list)\"\n\trm \"${tmp}\"\n}\n\n###############################\n#\nfunction install() {\n\tlocal count=0\n\tlocal installed_count=0\n\tlocal fn=$(date +\"%s\")\n\tlocal tmp=\"$EE_TMP/bezels_$fn\"\n\tlocal gitname\n\tlocal gitsystem\n\tlocal filescount\n\tlocal filename\n\tlocal romname\n\tlocal systemname\n\tlocal url\n\tlocal systemtoinstall=\"$1\"\n\tlocal systemfound=0\n    local realsystemtoinstall=\"${systemtoinstall}\"\n\ncase \"${systemtoinstall}\" in\n \"arcade\"|\"fbneo\"|\"fbn\"|\"neogeo\"|\"mame\"|cps*)\n   systemtoinstall=\"arcade\"\n  ;;\nesac\n\t\n\t[ $DEBUG -eq 1 ] && echo \"DEBUG: path to bezels ${DECODIR}${BEZELPROJECTGAMESDIR}\"\n\n\t# create temporary files in /tmp\n\tif [ -f $LOCALBEZELSLIST ]; then\n\t\tcp -f \"$LOCALBEZELSLIST\" \"${tmp}\"\n\telse\n\t\tcurl -sfL \"$BEZELSLIST\" -o \"${tmp}\" || return 1\n\t\tsed -i 's/\\r$//' \"${tmp}\"\n\tfi\n\t\n\t# reading bezels list from configuration file\n\twhile IFS=$' \\t' read systemname url ; do\n\t\t[ -z \"${systemname}\" ] && continue\n\t\t[ $DEBUG -eq 1 ] && echo \"DEBUG: bezels for system ${systemname} (from bezels list)\"\n\t\t[ \"${systemname}\" != \"${systemtoinstall}\" ] && continue\n\t\t# check if url is valid and return [A] else [?]\n\t\tia=$(check_url \"${url}\")\n\t\tif [ \"$ia\" != \"[A]\" ]; then\n\t\t\techo \"Error - invalid bezels URL ${url}\"\n\t\t\treturn 1\n\t\telse\n\t\t\tsystemfound=1\n\t\t\tbreak\n\t\tfi\n\tdone < \"${tmp}\"\n\trm \"${tmp}\"\n\t\n\t# in case of TheBezelProject does not own the system we want to install\n\tif [ \"$systemfound\" -eq 0 ]; then\n\t\techo -n \"Error - system ${systemtoinstall} could not be found in \"\n\t\t[ -f $LOCALBEZELSLIST ] && echo \"$LOCALBEZELSLIST\" || echo \"$BEZELSLIST\"\n\t\treturn 1\n\tfi\n\n\t# check if roms/<system> directory exists\n\tif [ ! -d \"${ROMSDIR}${realsystemtoinstall}\" ]; then\n\t\techo \"Error - ROMs directory for system ${systemtoinstall} could not be found\"\n\t\treturn 1\n\tfi\n\t\n\t# there is at least one file in each roms/<system> directory (i.e. _info.txt)\n\tfilescount=$(files_count \"${ROMSDIR}${realsystemtoinstall}\")\n\t[ $DEBUG -eq 1 ] && echo \"DEBUG: roms files count ${filescount}\"\n\tif [ \"${filescount}\" -le 1 ]; then\n\t\techo \"Error - ROMs directory for system ${realsystemtoinstall} is empty\"\n\t\treturn 1\n\tfi\n\n\t# create temporary directory in /tmp\n\tfn=$(date +\"%s\")\n\ttmp=\"$EE_TMP/dl_$fn\"\n\t[ $DEBUG -eq 1 ] && echo \"DEBUG: path to roms ${ROMSDIR}${realsystemtoinstall}\"\n\t[ $DEBUG -eq 1 ] && echo \"DEBUG: path for downloading ${tmp}\"\n\t# extract gitname from the url\n\tgitname=$(git_name \"${url}\")\n\t# keep only the final word for searching sub-folders of /retroarch/overlay/GameBezels/<gitsystem>\n\tgitsystem=${gitname#bezelproject-}\n\tmkdir -p \"${tmp}\"\n\tcd \"${tmp}\"\n\techo \"Downloading bezels for system ${realsystemtoinstall}\"\n    [[ \"${systemtoinstall}\" == \"arcade\" ]] && echo \"they will be installed to ${systemtoinstall}\"\n\t[ $DEBUG -eq 1 ] && echo \"DEBUG: URL: ${url} OUT: ${gitname}.zip GITNAME: $gitname GITSYSTEM: $gitsystem\"\n\tcurl -sfL \"${url}/archive/master.zip\" -o \"${gitname}.zip\"\n\t# error while downloading ?\n\tif [[ \"$?\" -ne 0 || ! -f \"${gitname}.zip\" ]]; then\n\t\techo \"Error - ${gitname} zip file could not be downloaded from ${url}\"\n\t\t# leave current directory and remove all downloads\n\t\tcd\n\t\trm -r \"${tmp}\"\n\t\treturn 1\n\tfi\n\t\n\t# if it doesn't already exist, create the games bezels directory\n\tif [ ! -d \"${DECODIR}${BEZELPROJECTGAMESDIR}${systemtoinstall}\" ]; then\n\t\t[ $DEBUG -eq 1 ] && echo \"DEBUG: creating ${DECODIR}${BEZELPROJECTGAMESDIR}${systemtoinstall}\"\n\t\tmkdir -p \"${DECODIR}${BEZELPROJECTGAMESDIR}${systemtoinstall}\"\n\telse\n\t\t[ $DEBUG -eq 1 ] && echo \"DEBUG: directory ${DECODIR}${BEZELPROJECTGAMESDIR}${systemtoinstall} already exist\"\n\tfi\n\t\n\t# if it doesn't already exist, create the systems bezels directory\n\tif [ ! -d \"${DECODIR}${BEZELPROJECTSYSTEMDIR}\" ]; then\n\t\t[ $DEBUG -eq 1 ] && echo \"DEBUG: creating ${DECODIR}${BEZELPROJECTSYSTEMDIR}\"\n\t\tmkdir -p \"${DECODIR}${BEZELPROJECTSYSTEMDIR}\"\n\telse\n\t\t[ $DEBUG -eq 1 ] && echo \"DEBUG: directory ${DECODIR}${BEZELPROJECTSYSTEMDIR} already exist\"\n\tfi\n\t\n\t# unzip archive for working on and remove the zip file\n\techo \"Installing/Updating bezels for system ${realsystemtoinstall}...\"\n    [[ \"${systemtoinstall}\" == \"arcade\" ]] && echo \"removing from ${systemtoinstall}\"\n\tunzip -q \"${gitname}.zip\"\n\tmv \"${gitname}-master\" \"${gitname}\"\n\trm \"${gitname}.zip\"\n\t\n\t# install games bezels if provided by TheBezelProject\n\techo \"installing games bezels\"\n\techo 0 > \"/tmp/bcount\"\n\techo 0 > \"/tmp/bicount\"\n\tfind \"${ROMSDIR}${realsystemtoinstall}\" -maxdepth 1 -type f -iname \"[!.]*\" | sort -V |\n\twhile read filename; do\n\t\tfilename=$(basename \"$filename\")\n\t\tromname=${filename%%.*}\n\t\t[ -z \"${romname}\" ] && continue\n\t\tcount=$((count + 1))\n\t\techo $count > \"/tmp/bcount\"\n\t\t[ $DEBUG -eq 1 ] && echo \"DEBUG: count -> $count\"\n\t\t[ $DEBUG -eq 1 ] && echo \"DEBUG: rom -> ${romname}\"\n\t\tif [ \"${systemtoinstall}\" == \"mame\" ] || [ \"${systemtoinstall}\" == \"arcade\" ] || [ \"${systemtoinstall}\" == \"fbneo\" ] || [ \"${systemtoinstall}\" == \"neogeo\" ]; then\n\t\t\t# is there a matching PNG for arcade rom name ?\n\t\t\tEE_REALSYSTEM=\"ArcadeBezels\"\n\t\t\telse\n\t\t\tEE_REALSYSTEM=\"GameBezels/${gitsystem}\"\n\t\tfi\n\t\t\n\t\tif [ -f \"${tmp}/${gitname}/retroarch/overlay/$EE_REALSYSTEM/${romname}.png\" ]; then\n\t\t\t[ $DEBUG -eq 1 ] && echo \"DEBUG: found PNG for ${romname}\"\n\t\t\t# copy the matching PNG\n\t\t\tcp \"${tmp}/${gitname}/retroarch/overlay/$EE_REALSYSTEM/${romname}.png\" \"${DECODIR}${BEZELPROJECTGAMESDIR}${systemtoinstall}\"\n\t\t\tcp \"${tmp}/${gitname}/retroarch/overlay/$EE_REALSYSTEM/${romname}.cfg\" \"${DECODIR}${BEZELPROJECTGAMESDIR}${systemtoinstall}\"\n\t\t    sed -i '/overlay0_overlay/d' \"${DECODIR}${BEZELPROJECTGAMESDIR}${systemtoinstall}/${romname}.cfg\"\n\t\t\techo \"overlay0_overlay = \\\"${romname}.png\\\"\" >> \"${DECODIR}${BEZELPROJECTGAMESDIR}${systemtoinstall}/${romname}.cfg\"\n\t\t\tinstalled_count=$((installed_count + 1))\n\t\t\techo $installed_count > \"/tmp/bicount\"\n\t\t\t[ $DEBUG -eq 1 ] && echo \"DEBUG: installed_count -> $installed_count\"\n\t\tfi\n\tdone\n\techo \"Bezels found\" $(cat /tmp/bcount) \"Bezels installed\" $(cat /tmp/bicount)\n\trm /tmp/bcount\n\trm /tmp/bicount\n\t\n\t# install system bezel if provided by TheBezelProject\n\techo \"installing system bezel\"\n\t# * Arcade *\n\tif [ \"${systemtoinstall}\" == \"mame\" ] || [ \"${systemtoinstall}\" == \"arcade\" ] || [ \"${systemtoinstall}\" == \"fbneo\" ] || [ \"${systemtoinstall}\" == \"neogeo\" ]; then\n\t\t# copy the HORIZONTAL system bezel to the correct directory and rename it\n\t\tcp \"${tmp}/${gitname}/retroarch/overlay/MAME-Horizontal.png\" \"${DECODIR}${BEZELPROJECTSYSTEMDIR}${systemtoinstall}.png\"\n\telse\n\t\t# * Other *\n\t\tfilescount=$(find \"${tmp}/${gitname}/retroarch/overlay\" -maxdepth 1 -type f -name \"*.png\" | wc -l)\n \t\tif [ \"${filescount}\" -eq 1 ]; then\n\t\t\trm -f \"${DECODIR}${BEZELPROJECTSYSTEMDIR}${systemname}.png\"\n\t\t\trm -f \"${DECODIR}${BEZELPROJECTSYSTEMDIR}${systemname}.info\"\n \t\t\t# copy the system bezel to the correct directory and rename it\n \t\t\tfilename=$(ls -1 \"${tmp}/${gitname}\"/retroarch/overlay/*.png)\n \t\t\t[ $DEBUG -eq 1 ] && echo \"DEBUG: $filename ${DECODIR}${BEZELPROJECTSYSTEMDIR}${systemtoinstall}/default.png\"\n \t\t\tcp \"$filename\" \"${DECODIR}${BEZELPROJECTSYSTEMDIR}${systemtoinstall}/default.png\"\n \t\t\tfilename=${filename%.*}\n \t\t\t[ $DEBUG -eq 1 ] && echo \"DEBUG: ${filename}.cfg ${DECODIR}${BEZELPROJECTSYSTEMDIR}${systemtoinstall}/default.cfg\"\n \t\t\tcp \"${filename}.cfg\" \"${DECODIR}${BEZELPROJECTSYSTEMDIR}${systemtoinstall}/default.cfg\"\n \t\t\tsed -i '/overlay0_overlay/d' \"${DECODIR}${BEZELPROJECTSYSTEMDIR}${systemtoinstall}/default.cfg\"\n\t\t\techo \"overlay0_overlay = \\\"default.png\\\"\" >> \"${DECODIR}${BEZELPROJECTSYSTEMDIR}${systemtoinstall}/default.cfg\"\n \t\telse\n\t\t\t# make a symbolic link to the Batocera's bezel default system pack\n\t\t\tln -fs \"${DECODIR}${DEFAULTBEZELDIR}${systemtoinstall}.png\" \"${DECODIR}${BEZELPROJECTSYSTEMDIR}${systemtoinstall}.png\"\n\t\t\tln -fs \"${DECODIR}${DEFAULTBEZELDIR}${systemtoinstall}.info\" \"${DECODIR}${BEZELPROJECTSYSTEMDIR}${systemtoinstall}.info\"\n\t\tfi\n\tfi\n\t\n#\t# install default bezel (i.e. system not supported in TheBezelProject)\n#\techo \"installing default bezels\"\n#\tif [ -d \"${DECODIR}${BEZELPROJECTDIR}\" ]; then\n#\t\techo \"TODO : install the @fery65's default.png bezel\"\n#\tfi\n\t\n\t# leave current directory and remove all downloads\n\techo \"Bezels for system ${realsystemtoinstall} are now installed\"\n\tcd\n\trm -r \"${tmp}\"\n}\n\n###############################\n#\nfunction remove() {\n\tsystemname=\"$1\"\n\t\n\t#  do we want to remove all TheBezelProject ?\n\tif [ \"${systemname}\" == \"all\" ]; then\n\t\tif [ -d \"${DECODIR}${BEZELPROJECTDIR}\" ]; then\n\t\t\tread -p \"Do you wish to remove all bezels ? \" yn\n\t\t\tif [[ \"$yn\" = \"y\" || \"$yn\" = \"Y\" ]]; then\n\t\t\t\trm -rf \"${DECODIR}${BEZELPROJECTDIR}\"\n\t\t\tfi\n\t\telse\n\t\t\techo \"Error - bezels directory ${DECODIR}${BEZELPROJECTDIR} is not valid\"\n\t\t\treturn 1\n\t\tfi\n\telse\n\t\t# check if games/<system> directory exist\n\t\tif [ ! -d \"${DECODIR}${BEZELPROJECTGAMESDIR}${systemname}\" ]; then\n\t\t\techo \"Error - bezels for system ${systemname} could not be found\"\n\t\t\treturn 1\n\t\telse\n\t\t\trm -rf \"${DECODIR}${BEZELPROJECTGAMESDIR}${systemname}\"\n\t\t\trm -f \"${DECODIR}${BEZELPROJECTSYSTEMDIR}${systemname}.png\"\n\t\t\trm -f \"${DECODIR}${BEZELPROJECTSYSTEMDIR}${systemname}.info\"\n\t\tfi\n\tfi\n}\n\n###############################\n#### Main loop\n#\ncommand=\"$1\"\nsystem=\"$2\"\ncount=1\ninstalled_count=1\nif [ ! -d \"${DECODIR}\" ]; then\n\techo \"Error - decorations directory ${DECODIR} is not valid\"\n\texit 1\nfi\n\nif [[ \"$command\" == \"list\" ]]; then\n\tlist\nelif [[ \"$command\" == \"install\" && -n \"$system\" ]]; then\n\t install \"$system\"\nelif [[ \"$command\" == \"remove\" && -n \"$system\" ]]; then\n\t remove \"$system\"\nelse\n\tusage\nfi\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-es-theme",
    "content": "#!/bin/bash \n#\n# Download and install EmulationStation themes for Batocera\n#\n# @lbrpdx on Batocera Forums and Discord\n#\n# Usage:\n# batocera-es-theme 'list' or 'install <theme>' \n# \n# If you don't provide a <theme>, the list of themes available online will be returned back to you\n#\n\nDEFAULTTHEME=\"Crystal\"\nCONFIGDIR=\"/storage/.emulationstation/themes\"\n\nif mountpoint -q /emuelec/themes; then \nCONFIGDIR=\"/emuelec/themes\"\nelif mountpoint -q /var/media/EEROMS; then \n[[ -d \"/var/media/EEROMS/themes\" ]] && CONFIGDIR=\"/var/media/EEROMS/themes\"\nelif mountpoint -q /storage/roms; then \n[[ -d \"/storage/roms/themes\" ]] && CONFIGDIR=\"/storage/roms/themes\"\nfi\n\n#echo $CONFIGDIR\n\nTHEMESLIST=\"https://raw.githubusercontent.com/EmuELEC/emuelec.github.io/master/settings/EE_themes\"\nLOCALTHEMESLIST=\"/storage/.config/emuelec/configs/themes.txt\"\n# themes.txt must be a plain file with the format 'theme_name https://githubURL' (spaces or tabs)\n# Example of a themes.txt file: \n#  fundamental\thttps://github.com/jdorigao/es-theme-fundamental\n#  Zoid\t\thttps://github.com/RetroPie/es-theme-zoid\n\n###############################\n#\nfunction usage() {\n\techo \"$0 - downloads and installs EmulationStation themes for Batocera\"\n\techo \" \"\n\techo \"It accepts two modes: 'list' and 'install <theme>'\"\n\techo \"- 'list' for the list of themes available online, and if they are\"\n\techo \"   [A]vailable to install, [I]nstalled or [?]unknown.\"\n\techo \"- 'install <theme>' to install the theme, from its theme name.\"\n    echo \"- 'remove <theme>' to delete an installed theme.\"\n\techo \" \"\n\techo \"If you have a local $LOCALTHEMESLIST file,\"\n\techo \"it will override the one hosted on Batocera website.\"\n\texit 1\n}\n\n###############################\n#\nfunction check_url() {\n\t[[ \"$1\" =~ ^(https?|ftp)://.*$ ]] && echo \"[A]\" || echo \"[?]\"\n}\n\n###############################\n#\nfunction git_name() {\n\techo \"$1\" | sed \"s,.*/\\(.*\\),\\1,\"\n}\n\n###############################\n#\nfunction repo_name() {\n\techo \"$1\" | sed \"s,.*github.com/\\([A-Za-z0-9_-]*\\)/.*,\\1,\"\n}\n\n###############################\n#\nfunction list_themes() {\n\tfn=$(date +\"%s\")\n\ttmp=\"/tmp/themes_$fn\"\n\techo \"* Batocera themes *\"\n\tif [ -f $LOCALTHEMESLIST ]; then\n\t\tcp -f \"$LOCALTHEMESLIST\" \"$tmp\"\n\telse\n\t\tcurl -sfL \"$THEMESLIST\" -o \"$tmp\" || exit 1\n\t\tsed -i 's/\\r$//' \"${tmp}\"\n\tfi\n\twhile IFS=$' \\t' read name url ; do\n\t\t[ x\"$name\" == \"x\" ] && continue \n\t\tia=$(check_url \"$url\")\n\t\tgitname=$(git_name \"$url\")\n        [[ \"$gitname\" == \"$DEFAULTTHEME\" ]] && CONFIGDIR=\"/storage/.emulationstation/themes\"\n\t\t[ -d \"$CONFIGDIR\"/\"$gitname\" ] && ia=\"[I]\"\n\t\techo \"$ia $name - $url\"\n\tdone < \"$tmp\"\n\t[[ -e \"$tmp\" ]] && rm \"$tmp\"\n}\n\n\n###############################\n#\nfunction getPer() {\n\tTARFILE=\"$1\"\n\tTARVAL=\"$2\"\n    [ -z ${TARVAL} ] && TARVAL=0\n\twhile true; do\n\t\tCURVAL=$(stat \"$TARFILE\" | grep -E '^[ ]*Size:' | sed -e s+'^[ ]*Size: \\([0-9][0-9]*\\) .*$'+'\\1'+)\n\t\tCURVAL=$((CURVAL / 1024 / 1024))\n\t\tPER=$((${CURVAL} * 100 / ${TARVAL}))\n\t\techo \"${PER}% - ${theme^^} - [${TARVAL}MB]\"\n\t\tsleep 1\n\tdone\n}\n\n###############################\n#\nfunction install_theme() {\n\ttheme=\"$1\"\n\tsuccess_installed=0\n\tfn=$(date +\"%s\")\n\ttmp=\"/tmp/themes_$fn\"\n\tif [ -f $LOCALTHEMESLIST ]; then\n\t\tcp -f \"$LOCALTHEMESLIST\" \"$tmp\"\n\telse\n\t\tcurl -sfL \"$THEMESLIST\" -o \"$tmp\" || exit 1\n\t\tsed -i 's/\\r$//' \"${tmp}\"\n\tfi\n\twhile IFS=$' \\t' read name url ; do\n\t\t[ x\"$name\" != x\"$theme\" ] && continue \n\t\tia=$(check_url \"$url\")\n\t\tif [ x\"$ia\" != x\"[A]\" ]; then\n\t\t\techo \"Error - invalid theme URL $url\"\n\t\t\texit 1\n\t\telse\n\t\t\treponame=$(repo_name \"$url\")\n\t\t\tgitname=$(git_name \"$url\")\n            [[ \"$gitname\" == \"$DEFAULTTHEME\" ]] && CONFIGDIR=\"/storage/.emulationstation/themes\"\n\t\t\tcd \"$CONFIGDIR\"\n\t\t\tfilezip=\"${url}/archive/master.zip\"\n\t\t\t# get size to download (hack to get it from github)\n\t\t\t# size=$(curl -sfL https://api.github.com/repos/\"$reponame\"/\"$gitname\" | grep size | head -1 | tr -dc '[:digit:]')\n            #echo \"https://codeload.github.com/${reponame}/${gitname}/zip/master\"\n            for i in {0..9}; do\n\t\t\t   size=$(curl -Is \"https://codeload.github.com/${reponame}/${gitname}/zip/master\" | grep Content-Length | tail -1 | cut -d ' ' -f2 | tr -d '\\r')\n               [[ -z $size ]] && sleep 1 || { size=$((size / 1024 / 1024 )); break; }\n            done\n            #size=$((size / 1024 ))\n\t\t\ttest $? -eq 0 || exit 1\n\t\t\ttouch \"$gitname.zip\"\n\t\t\tgetPer \"$CONFIGDIR\"/\"$gitname.zip\" \"${size}\" &\n\t\t\tGETPERPID=$!\n\t\t\tcurl -sfL \"${filezip}\" -o \"$gitname.zip\" || exit 1\n\t\t\tkill -9 \"${GETPERPID}\" >/dev/null 2>/dev/null\n\t\t\tGETPERPID=\n\t\t\tif [ -f \"$gitname.zip\" ]; then \n\t\t\t\techo \"Unzipping $gitname theme files >>> 99%\"\n\t\t\t\t[ -d \"$CONFIGDIR\"/\"$gitname\" ] && rm -rf \"$CONFIGDIR\"/\"$gitname\" \n\t\t\t\tunzip \"$gitname.zip\" >/dev/null\n\t\t\t\tmv \"$gitname-master\" \"$gitname\"\n\t\t\t\trm \"$gitname.zip\"\n\t\t\t\tsuccess_installed=1\n\t\t\telse\n\t\t\t\techo \"Error - $theme zip file could not be downloaded from $url\"\n\t\t\t\texit 1\n\t\t\tfi\n\t\tfi\n\tdone < \"$tmp\"\n\t[[ -e \"$tmp\" ]] && rm \"$tmp\"\n\tif [ \"$success_installed\" == 1 ]; then\n\t\techo \"Theme $theme is now installed >>> 100%\"\n\t\texit 0\n\telse\n\t\techo \"Error - theme $theme could not be found\"\n\t\texit 1\n\tfi\n}\n\n###############################\n#\nfunction remove_theme() {\n\ttheme=\"$1\"\n\tsuccess_removed=0\n\t\tgitname=$theme\n\t\tif [ -d \"${CONFIGDIR}/${gitname}\" ]; then\n\t\t       \trm -rf \"$CONFIGDIR\"/\"$gitname\" && success_removed=1\n\t\telse\n\t\t\techo \"Theme $theme doesn't appear to be in $CONFIGDIR/$gitname\"\n\t\tfi\n\tif [ \"$success_removed\" == 1 ]; then\n\t\t[ $TERMINAL = 1 ] && echo -e \"Theme $theme removed from:\\t$CONFIGDIR/$gitname\"\n\t\t[ $TERMINAL = 0 ] && echo \"Theme ${theme^^} is now removed >>>100\"\n\t\texit 0\n\telse\n\t\techo \"Error - theme $theme could not be removed\"\n\t\texit 1\n\tfi\n}\n\n#### Main loop\n#\ncommand=\"$1\"\ntheme=\"$2\"\n\nif ! [ -d \"$CONFIGDIR\" ]; then\n\techo \"Error - theme directory $CONFIGDIR is not valid.\"\n\texit 1\nfi \nif [ x\"$command\" == \"xlist\" ]; then\n\tlist_themes\nelif [ x\"$command\" == \"xinstall\" ]; then\n\t[ x\"$theme\" != \"x\" ] && install_theme $theme || usage\nelif [ x\"$command\" == \"xremove\" ]; then\n\t[ x\"$theme\" != \"x\" ] && remove_theme $theme || usage\nelse \n\tusage\t\nfi\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-info",
    "content": "#!/bin/bash\n\n### short version (for osd)\nif test \"$1\" = \"--short\"\nthen\n    BATT=$(cat /sys/class/power_supply/{BAT,bat}*/uevent 2>/dev/null | grep -E \"^POWER_SUPPLY_CAPACITY=\" | sed -e s+'^POWER_SUPPLY_CAPACITY='++ | sort -rn | head -1)\n    DT=$(date +%H:%M)\n    if test -n \"${BATT}\"\n    then\n\techo \"Battery: ${BATT}% - ${DT}\"\n    else\n\techo \"${DT}\"\n    fi\n    exit 0\nfi\n###\n\nV_ARCH=EmuELEC\nV_CPUNB=$(grep -E $'^processor\\t:' /proc/cpuinfo | wc -l)\nV_CPUMODEL1=$(grep -E $'^model name\\t:' /proc/cpuinfo | head -1 | sed -e s+'^model name\\t: '++)\nV_SYSTEM=$(uname -rs)\n\n# battery\nBATT=$(cat /sys/class/power_supply/{BAT,bat}*/uevent 2>/dev/null | grep -E \"^POWER_SUPPLY_CAPACITY=\" | sed -e s+'^POWER_SUPPLY_CAPACITY='++ | sort -rn | head -1)\nif test -n \"${BATT}\"\nthen\n    echo \"Battery: ${BATT}%\"\nfi\n\n# PAD Battery\nfor PADBAT in /sys/class/power_supply/*/device/uevent\ndo\n    # HID devices only\n    PADNAME=$(grep -E '^HID_NAME=' \"${PADBAT}\" | sed -e s+'^HID_NAME='++)\n    if test -n \"${PADNAME}\"\n    then\n\t# parent of parent / uevent\n\tBATTUEVENT=$(dirname \"${PADBAT}\")\n\tBATTUEVENT=$(dirname \"${BATTUEVENT}\")/uevent\n\tBATT=$(grep -E \"^POWER_SUPPLY_CAPACITY=\" \"${BATTUEVENT}\" | sed -e s+'^POWER_SUPPLY_CAPACITY='++ | sort -rn | head -1)\n\techo \"${PADNAME}: ${BATT}%\"\n    fi\ndone\n\n# temperature\n# Unit: millidegree Celsius\nTEMPE=$(cat /sys/devices/virtual/thermal/thermal_zone*/temp 2>/dev/null | sort -rn | head -1 | sed -e s+\"[0-9][0-9][0-9]$\"++)\nif test -n \"${TEMPE}\"\nthen\n    echo \"Temperature: ${TEMPE}°\"\nfi\n\necho \"Architecture: ${V_ARCH}\"\necho \"System: ${V_SYSTEM}\"\nif test \"${V_ARCH}\" = \"x86\" -o \"${V_ARCH}\" = \"x86_64\"\nthen\n    V_OPENGLVERSION=$(DISPLAY=:0.0 glxinfo | grep -E '^OpenGL core profile version string:' | sed -e s+'^OpenGL core profile version string:[ ]*'++)\n    if test -z \"${V_OPENGLVERSION}\"\n    then\n\tV_OPENGLVERSION=$(DISPLAY=:0.0 glxinfo | grep -E '^OpenGL version string:' | sed -e s+'^OpenGL version string:[ ]*'++)\n    fi\n    echo \"OpenGL: ${V_OPENGLVERSION}\"\nfi\necho \"Cpu model: ${V_CPUMODEL1}\"\necho \"Cpu number: ${V_CPUNB}\"\nif grep -q \" avx2\" /proc/cpuinfo\nthen\n    echo \"Cpu feature: avx2\"\nfi\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-resolution",
    "content": "#!/bin/bash\n\nACTION=$1\nshift\n\nFILEMODES=\"/sys/class/graphics/fb0/modes\"\n\ncase \"${ACTION}\" in\n    \"listModes\")\n    ;;\n    \"setMode\")\n    ;;\n    \"currentMode\"|\"currentResolution\")\n        # mode can be different from resolution (ie on rpi)\n\ttest -e \"${FILEMODES}\" && head -1 \"${FILEMODES}\" | sed -e s+'^[^:]:\\([0-9]*\\)x\\([0-9]*\\)[a-z]*.*$'+'\\1x\\2'+\n\t;;\nesac\nexit 0\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-retroachievements-info",
    "content": "#!/bin/bash\n#\n# Get RetroAchievements information for Batocera\n#\n# @lbrpdx on Batocera Forums and Discord\n#\n# 20191124 - v2 with now outputs in XML format (for Batocera 5.25+)\n# 20200113 - updated for retroachievements.org HTML changes\n# 20200124 - added badges for each game played\n# 20200304 - fixed a bug in rare cases where a RA game has no success icons\n# 20200410 - updated for retroachievements.org HTML changes, again\n# 20200625 - retroachievements.org HTML changes, again\n# 20201104 - retroachievements.org HTML changes, again, again\n#\n# Usage:\n# batocera-retroachievements-info\n#\nCONFIGFILE=\"/storage/.config/emuelec/configs/emuelec.conf\"\nTIMEOUT=4 # seconds before timeout (>2 sec)\nUSER=\"\"\n\n###############################\n#\nfunction usage() {\n\techo \"$0 username\"\n\techo \" - where username is the RetroAchievements username you want to check out\"\n\texit 1\n}\n\n###############################\n#\nfunction process() {\n\tfn=$(date +\"%s\")\n\ttmpfile=/tmp/ra_$fn\n\tcurl -m \"$TIMEOUT\" -o $tmpfile https://retroachievements.org/user/$USER 2>/dev/null\n\tif [ x\"$?\" != x0 ]; then\n\t\techo \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\"\n\t\techo \"<retroachievements>\"\n\t\techo \"  <lastrefresh>$fn</lastrefresh>\"\n\t\techo \"  <error>RetroAchievements website is too slow to respond</error>\"\n\t\techo \"</retroachievements>\"\n\t\texit 1;\n\tfi\n\tcat \"$tmpfile\" |  awk -v FS=\"(<div class='username'><span class='username'>|</div><div class='userpage recentlyplayed' >)\" '{print $2}' | uniq > \"$tmpfile\"_2\n\tidcard=$(cat \"$tmpfile\" | sed -e \"/^[[:blank:]]*$/d\" | awk -v FS=\"(</span></div><br/?>Member Since: |<br/?>Account Type:)\" '{print $2}' | uniq)\n\tparsedid=$(echo \"$idcard\" | sed -e \"/^[[:blank:]]*$/d\" | sed -e \"s;\\(.*\\)<br>Last Activity: \\(.*\\);\\1@\\2;\")\n\tavcompletion=$(cat \"$tmpfile\" | sed -e \"/^[[:blank:]]*$/d\" | awk -v FS=\"(</span><br/?>Average Completion: <b>|</b><br/?>Site Rank:)\" '{print $2}' | sed -e \"/^[[:blank:]]*$/d\" | uniq)\n\tpoints=$(cat \"$tmpfile\"_2 | sed -e \"/^[[:blank:]]*$/d\" | awk -v FS=\"(</strong></a>&nbsp;|<span class='TrueRatio'>)\" '{print $2}' |  sed -e \"s;(\\([0-9]*\\) points);\\1;\")\n\tif [ x\"$points\" != x ] && [ \"$points\" -ge 1 ]; then\n\t\trank=$(cat \"$tmpfile\"_2  | sed -e \"/^[[:blank:]]*$/d\" | awk -v FS=\"(globalRanking.php|<br/?><br/?>)\" '{print $3}' | sed -e \"s/\\?[a-zA-Z0-9=&;']*>//\" -e \"s;</a>;;\" -e \"s;%).*;%);\")\n\t\t## For future use: UserPic is RetroAchievements' user avatar - however the S3 bucket is protected.\n\t\t# UserPic=$(cat $tmpfile | grep 'meta property=.og:image. content=' | cut -d= -f3 | awk -F\\' '{print $2}')\n\t\t# Workaround: use the line below\n\t\tUserPic=\"https://retroachievements.org/UserPic/$USER\".png\n\t\tpic=\"\"\n\t\tcurl -m \"$TIMEOUT\" -f -s \"$UserPic\" >/dev/null 2>/dev/null\n\t\tif [ x\"$?\" == x0 ]; then\n\t\t\tpic=\"  <userpic>$UserPic</userpic>\\n\"\n\t\tfi\n\t\techo \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\"\n\t\techo \"<retroachievements>\"\n\t\techo \"  <lastrefresh>$fn</lastrefresh>\"\n\t\techo \"  <username>$USER</username>\"\n\t\techo \"  <totalpoints>$points</totalpoints>\"\n\t        echo \"  <rank>$rank</rank>\"\n\t        echo \"  <averagecompletion>$avcompletion</averagecompletion>\"\n\t\techo -ne \"$pic\"\n\t\techo \"$parsedid\" | sed -e \"s;\\(.*\\)@\\(.*\\);  <registered>\\1</registered>\\n  <lastactivity>\\2</lastactivity>;\"\n\t\txmllint --html \"$tmpfile\" 2>/dev/null | grep '<a href=\"/[gG]ame/[0-9]*\\\">.*points.<br\\?>' | sed -e \"/^[[:blank:]]*$/d\" | sed -e 's:\\(<a href=\\\"/[gG]ame/[0-9]*\\\">.*\\)points\\.<br>:\\1points\\@\\\\\\n:g;' > \"$tmpfile\"_2\n\t\tcat \"$tmpfile\"_2 | awk -v FS=\"(href=\\\"/[gG]ame/[0-9]*\\\">|@)\" '{print $2}' | sed -e \"s;</a><br/*>\\(Last played[ 0-9:-]*\\)<br/*>\\(.*\\);@\\2@\\1;\" | sed -e \"s;achievements, ;achievements@;\" | sed -e \"s;Earned ;;\" | sed -e \"/^[[:blank:]]*$/d\" > \"$tmpfile\"_st\n\t\tcat \"$tmpfile\"_2 | grep -e 'div class=\"bb_inline\" onmouseover' -e '^$' | sed \"s:.*src=\\\"\\(.*/Badge/.*\\.png\\)\\\".*:\\1:\" | sed \"s;^$;https://batocera.org/favicon-64.png;\" > \"$tmpfile\"_ba\n\t\ti=0\n\t\tif [ $(cat \"$tmpfile\"_ba | wc -l) -eq $(cat \"$tmpfile\"_st | wc -l) ]; then\n\t\t\twhile IFS= read -r line || [[ -n \"$line\" ]]; do\n\t\t\t\ti=$((i+1))\n\t\t\t\techo \"$line\" | sed -e \"s;\\(.*\\)@\\(.*\\) achievements@\\(.*\\) points@Last played \\(.*\\);  <game>\\n    <name>\\1</name>\\n    <achievements>\\2</achievements>\\n    <points>\\3</points>\\n    <lastplayed>\\4</lastplayed>;\"\n\t\t\t\tcat \"$tmpfile\"_ba | head -n \"$i\" | tail -n 1 | sed \"s:^:    <badge>:;s:$:</badge>:\"\n\t\t\t\techo \"  </game>\"\n\t\t\tdone < \"$tmpfile\"_st \n\t\telse\n\t\t\techo \"$res\" | sed -e \"s;\\(.*\\)@\\(.*\\) achievements@\\(.*\\) points@Last played \\(.*\\);  <game>\\n    <name>\\1</name>\\n    <achievements>\\2</achievements>\\n    <points>\\3</points>\\n    <lastplayed>\\4</lastplayed>\\n  </game>;\"\n\t\tfi\n\t\techo \"</retroachievements>\"\n\telse\n\t\techo \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\"\n\t\techo \"<retroachievements>\"\n\t\techo \"  <lastrefresh>$fn</lastrefresh>\"\n\t\techo \"  <error>Player $USER hasn't unlocked any RetroAchievement yet</error>\"\n\t\techo \"</retroachievements>\"\n\tfi\n\trm \"$tmpfile\" \"$tmpfile\"_2 \"$tmpfile\"_st \"$tmpfile\"_ba 2>/dev/null\n}\n\n#### Main loop\n#\nif [ $# -lt 1 ]; then\n\t[ -f \"$CONFIGFILE\" ] && USER=$(grep -E \"^[ \\t]*global.retroachievements.username=\" \"$CONFIGFILE\" | cut -d= -f2 | uniq)\nelse\n\ttmp=\"$1\"\n\t[ x\"${tmp::1}\" == \"x-\" ] && usage || USER=\"$1\"\nfi\n\n[ x\"$USER\" == x ] && usage || process\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-scraper",
    "content": "#!/bin/bash\n\nsystemsetting=\"/usr/bin/batocera/batocera-settings\"\nsyslang=$($systemsetting -command load -key system.language)\nIMGSTYLE=$($systemsetting -command load -key scrapper.style)\n\nif test $# = 1\nthen\n    DOSYS=$1\nfi\n\n# supported languages : en, fr, es, de, pt\ncase \"${syslang}\" in\n    fr_FR)\n\tsslang=fr,en\n\t;;\n    es_ES)\n\tsslang=es,en\n\t;;\n    de_DE)\n\tsslang=de,en\n\t;;\n    pt_PT)\n\tsslang=pt,en\n\t;;\n\tpt_BR)\n\tsslang=pt,en\n\t;;\n    *)\n\tsslang=en\nesac\n\nif test -z \"${IMGSTYLE}\"\nthen\n    IMGSTYLE=\"b,f,a,l,3b,s\"\nfi\n\ndo_scrap() {\n    LRDIR=$1\n    NF=$(ls \"${LRDIR}\" | grep -vE '\\.txt$|\\.xml$' | wc -l)\n    if test \"${NF}\" -gt 0\n    then\n\tBASEDIR=$(basename \"${LRDIR}\")\n\techo \"GAME: system ${BASEDIR}\"\n\tEXTRAOPT=\n\n\tfor x in \"mame\" \"fba\" \"fba_libretro\" \"neogeo\"\n\tdo\n\t    test \"${LRDIR}\" = \"/storage/roms/${x}\" && EXTRAOPT=\"-mame\"\n\tdone\n\n\t(cd \"${LRDIR}\" && sselph-scraper -console_src ss,gdb,ovgdb -lang \"${sslang}\" -console_img \"${IMGSTYLE}\" -download_videos -workers 5 ${EXTRAOPT}) 2>&1\n    fi\n}\n\n# find system to scrape\n(if test -n \"${DOSYS}\"\n then\n     test -d \"/storage/roms/${DOSYS}\" && echo \"/storage/roms/${DOSYS}\"\n else\n     find /storage/roms -maxdepth 1 -mindepth 1 -type d\n fi) |\n    while read RDIR1\n    do\n\t# read the 2 next dir\n\tread RDIR2\n\tread RDIR3\n\tread RDIR4\n\n\tdo_scrap \"${RDIR1}\" &\n\ttest -n \"${RDIR2}\" && do_scrap \"${RDIR2}\" &\n\ttest -n \"${RDIR3}\" && do_scrap \"${RDIR3}\" &\n\ttest -n \"${RDIR4}\" && do_scrap \"${RDIR4}\" &\n\twait\n\n    done\n\n# synchronize to not make the usb/sdcard slowing down once finnished\nsync\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-settings",
    "content": "#!/bin/bash\n\n# batocera-settings can mimic batoceraSettings.py\n# goal: abolish this python script, it's useless for the sake of the load feature only\n#       get a more user friendly environment for setting, getting and saving keys\n#\n# Usage of BASE COMMAND:\n#           longform:   <filename> --command <cmd> --key <key> --value <value>\n#\n#           shortform:  <file> <cmd> <key> <value>\n#\n#           --command    load write enable disable status\n#           --key        any key in emuelec.conf (kodi.enabled...)\n#           --value      any alphanumerical string\n#                        use quotation marks to avoid globbing use slashes escape special characters \n\n# This script reads only 1st occurrence if string and writes only to this first hit\n#\n# This script uses #-Character to comment values\n#\n# If there is a boolean value (0,1) then then enable and disable command will set the corresponding\n# boolean value.\n\n# Examples:\n# 'batocera-settings --command load --key wifi.enabled' will print out 0 or 1\n# 'batocera-settings --command write --key wifi.ssid -value \"This is my NET\"' will set 'wlan.ssid=This is my NET'\n# 'batocera-settings enable wifi.ssid' will remove # from  configfile (activate)\n# 'batocera-settings disable wifi.enabled' will set key wifi.enabled=0\n# 'botocera-settings /myown/config.file --command status --key my.key' will output status of own config.file and my.key \n\n# by cyperghost - 2019/12/30\n\n##### INITS #####\nBATOCERA_CONFIGFILE=\"/storage/.config/emuelec/configs/emuelec.conf\"\nCOMMENT_CHAR_SEARCH=\"[#|;]\"\nCOMMENT_CHAR=\"#\"\n##### INITS #####\n\n##### Function Calls #####\n\nfunction get_config() {\n    #Will search for key.value and #key.value for only one occurrence\n    #If the character is the COMMENT CHAR then set value to it\n    #Otherwise strip till the equal-char to obtain value\n    local val\n    local ret\n    val=\"$(grep -E -m1 \"^\\s*$1\\s*=\" $BATOCERA_CONFIGFILE)\"\n    ret=$?\n    if [[ $ret -eq 1 ]]; then \n        val=\"$(grep -E -m1 \"^$COMMENT_CHAR_SEARCH\\s*$1\\s*=\" $BATOCERA_CONFIGFILE)\"\n        ret=$?\n        [[ $ret -eq 0 ]] && val=$COMMENT_CHAR\n    else\n         #Maybe here some finetuning to catch key.value = ENTRY without blanks\n         val=\"${val#*=}\"\n    fi\n    echo \"$val\"\n    return $ret\n}\n\nfunction set_config() {\n     #Will search for first key.name at beginning of line and write value to it\n     sed -i \"1,/^\\(\\s*$1\\s*=\\).*/s//\\1$2/\" \"$BATOCERA_CONFIGFILE\"\n}\n\nfunction uncomment_config() {\n     #Will search for first Comment Char at beginning of line and remove it\n     sed -i \"1,/^$COMMENT_CHAR_SEARCH\\(\\s*$1\\)/s//\\1/\" \"$BATOCERA_CONFIGFILE\"\n}\n\nfunction comment_config() {\n     #Will search for first key.name at beginning of line and add a comment char to it\n     sed -i \"1,/^\\(\\s*$1\\)/s//$COMMENT_CHAR\\1/\" \"$BATOCERA_CONFIGFILE\"\n}\n\nfunction check_argument() {\n    # This method does not accept arguments starting with '-'.\n    if [[ -z \"$2\" || \"$2\" =~ ^- ]]; then\n        echo >&2\n        echo \"ERROR: '$1' is missing an argument.\" >&2\n        echo >&2\n        echo \"Just type '$0' to see usage page.\" >&2\n        echo >&2\n        return 1\n    fi\n}\n\nfunction dash_style() {\n    #This function is needed to \"simulate\" the python script with single dash\n    #commands. It will also accept the more common posix double dashes   \n    #Accept dashes and double dashes and build new array ii with parameter set\n    #The else-branch can be used for the shortform\n\n    for i in --command --key --value; do\n        if [[ -z \"$1\" ]]; then\n            continue \n        elif [[ \"$i\" =~ ^-{0,1}\"${1,,}\" ]]; then\n            check_argument $1 $2\n            [[ $? -eq 0 ]] || exit 1\n            ii+=(\"$2\")\n            shift 2\n        else\n            ii+=(\"$1\")\n            shift 1\n        fi\n    done\n}\n\n\nfunction usage() {\nval=\" Usage of BASE COMMAND:\n\n           <file> --command <cmd> --key <key> --value <value>\n\n           shortform: <file> <cmd> <key> <value>\n\n           --command    load write enable disable status\n           --key        any key in emuelec.conf (kodi.enabled...)\n           --value      any alphanumerical string\n                        use quotation marks to avoid globbing\n\n           For write command --value <value> must be provided\n\n           exit codes: exit 0  = value is available, proper exit\n                       exit 1  = general error\n                       exit 2  = file error\n                       exit 10 = value found, but empty\n                       exit 11 = value found, but not activated\n                       exit 12 = value not found\n\n           If you don't set a filename then default is '~/emuelec.conf'\"\n\necho \"$val\"\n\n}\n##### Function Calls #####\n\n##### MAIN FUNCTION #####\nfunction main() {\n\n    #Filename parsed?\n    if [[ -f \"$1\" ]]; then\n        BATOCERA_CONFIGFILE=\"$1\"\n        shift \n    else\n       [[ -f \"$BATOCERA_CONFIGFILE\" ]] || { echo \"not found: $BATOCERA_CONFIGFILE\" >&2; exit 2; }\n    fi\n\n    #How much arguments are parsed, up to 6 then it is the long format\n    #up to 3 then it is the short format\n    if [[ ${#@} -eq 0 || ${#@} -gt 6 ]]; then\n        usage\n        exit 1\n    else\n        dash_style \"$@\"\n        command=\"${ii[0]}\"\n        keyvalue=\"${ii[1]}\"\n        newvalue=\"${ii[2]}\"\n        unset ii\n    fi\n\n    [[ -z $keyvalue ]] && { echo \"error: Please provide a proper keyvalue\" >&2; exit 1; }\n\n    # value processing, switch case\n    case \"${command,,}\" in\n\n        \"read\"|\"get\"|\"load\")\n            val=\"$(get_config $keyvalue)\"\n            ret=$?\n            [[ \"$val\" == \"$COMMENT_CHAR\" ]] && exit 11\n            [[ -z \"$val\" && $ret -eq 0 ]] && exit 10\n            [[ -z \"$val\" && $ret -eq 1 ]] && exit 12\n            [[ -n \"$val\" ]] && echo \"$val\" && exit 0\n        ;;\n\n        \"stat\"|\"status\")\n            val=\"$(get_config $keyvalue)\"\n            ret=$?\n            [[ -f \"$BATOCERA_CONFIGFILE\" ]] && echo \"ok: found '$BATOCERA_CONFIGFILE'\" >&2 || echo \"error: not found '$BATOCERA_CONFIGFILE'\" >&2\n            [[ -w \"$BATOCERA_CONFIGFILE\" ]] && echo \"ok: r/w file '$BATOCERA_CONFIGFILE'\" >&2 || echo \"error: r/o file '$BATOCERA_CONFIGFILE'\" >&2\n            [[ -z \"$val\" && $ret -eq 1 ]] && echo \"error: '$keyvalue' not found!\" >&2\n            [[ -z \"$val\" && $ret -eq 0 ]] && echo \"error: '$keyvalue' is empty - use 'comment' command to retrieve\" >&2\n            [[ \"$val\" == \"$COMMENT_CHAR\" ]] && echo \"error: '$keyvalue' is commented $COMMENT_CHAR!\" >&2 && val=\n            [[ -n \"$val\" ]] && echo \"ok: '$keyvalue' $val\"\n            exit 0\n        ;;\n\n        \"set\"|\"write\"|\"save\")\n            #Is file write protected?\n            [[ -w \"$BATOCERA_CONFIGFILE\" ]] || { echo \"r/o file: $BATOCERA_CONFIGFILE\" >&2; exit 2; }\n            #We can comment line above to erase keys, it's much saver to check if a value is setted\n            [[ -z \"$newvalue\" ]] && echo \"error: '$keyvalue' needs value to be setted\" >&2 && exit 1\n\n            val=\"$(get_config $keyvalue)\"\n            ret=$?\n            if [[ \"$val\" == \"$COMMENT_CHAR\" ]]; then\n                echo \"$keyvalue: hashed out!\" >&2\n                uncomment_config \"$keyvalue\"\n                set_config \"$keyvalue\" \"$newvalue\"\n                echo \"$keyvalue: set from '$val' to '$newvalue'\" >&2\n                exit 0\n            elif [[ -z \"$val\" && $ret -eq 1 ]]; then\n                echo \"$keyvalue: not found!\" >&2\n                exit 12\n            elif [[ \"$val\" != \"$newvalue\" ]]; then\n                set_config \"$keyvalue\" \"$newvalue\"\n                exit 0 \n            fi\n        ;;\n\n        \"uncomment\"|\"enable\"|\"activate\")\n            val=\"$(get_config $keyvalue)\"\n            ret=$?\n            # Boolean\n            if [[ \"$val\" == \"$COMMENT_CHAR\" ]]; then\n                 uncomment_config \"$keyvalue\"\n                 echo \"$keyvalue: removed '$COMMENT_CHAR', key is active\" >&2\n            elif [[ \"$val\" == \"0\" ]]; then\n                 set_config \"$keyvalue\" \"1\"\n                 echo \"$keyvalue: boolean set '1'\" >&2\n            elif [[ -z \"$val\" && $ret -eq 1 ]]; then\n                 echo \"$keyvalue: not found!\" && exit 2\n            fi\n        ;;\n\n        \"comment\"|\"disable\"|\"remark\")\n            val=\"$(get_config $keyvalue)\"\n            ret=$?\n            # Boolean\n            [[ \"$val\" == \"$COMMENT_CHAR\" || \"$val\" == \"0\" ]] && exit 0\n            if [[ -z \"$val\" && $ret -eq 1 ]]; then\n                echo \"$keyvalue: not found!\" >&2 && exit 12\n            elif [[ \"$val\" == \"1\" ]]; then\n                 set_config \"$keyvalue\" \"0\"\n                 echo \"$keyvalue: boolean set to '0'\" >&2\n            else\n                 comment_config \"$keyvalue\"\n                 echo \"$keyvalue: added '$COMMENT_CHAR', key is not active\" >&2\n            fi\n        ;;\n\n        *)\n            echo \"ERROR: invalid command '$command'\" >&2\n            exit 1\n        ;;\n    esac\n}\n##### MAIN FUNCTION #####\n\n##### MAIN CALL #####\n\n# Prepare arrays from fob python script\n# Keyword for python call is mimic_python\n# Attention the unset is needed to eliminate first argument (python basefile)\n\nif [[ \"${#@}\" -eq 1 && \"$1\" =~ \"mimic_python\" ]]; then\n   #batoceraSettings.py fob\n   readarray -t arr <<< \"$1\"\n   unset arr[0]\nelse\n   #regular call by shell\n   arr=(\"$@\")\nfi\n\nmain \"${arr[@]}\"\n\n##### MAIN CALL #####\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-systems",
    "content": "#!/usr/bin/env python\n\nfrom __future__ import print_function\n\nfrom hashlib import md5\nfrom os.path import isfile\nfrom collections import OrderedDict\nimport sys\n\nsystems = {\n\n    # Atari\n    \"atari5200\": { \"name\": \"Atari 5200\", \"biosFiles\": [ { \"md5\": \"281f20ea4320404ec820fb7ec0693b38\", \"file\": \"bios/5200.rom\"          } ] },\n\t\"atari800\":  { \"name\": \"Atari 800\", \"biosFiles\":   [ { \"md5\": \"06daac977823773a3eea3422fd26a703\", \"file\": \"bios/ATARIXL.ROM\"      },\n\t\t\t\t\t\t\t\t\t\t                { \"md5\": \"0bac0c6a50104045d902df4503a4c30b\", \"file\": \"bios/ATARIBAS.ROM\"      },\n                                                        { \"md5\": \"eb1f32f5d9f382db1bbfb8d7f9cb343a\", \"file\": \"bios/ATARIOSA.ROM\"      },\n                                                        { \"md5\": \"a3e8d617c95d08031fe1b20d541434b2\", \"file\": \"bios/ATARIOSB.ROM\"      } ] },\n\t\"atari7800\": { \"name\": \"Atari 7800\", \"biosFiles\": [ { \"md5\": \"0763f1ffb006ddbe32e52d497ee848ae\", \"file\": \"bios/7800 BIOS (U).rom\" } ] },\n    \"atarist\":   { \"name\": \"Atari ST\", \"biosFiles\":   [ { \"md5\": \"b2a8570de2e850c5acf81cb80512d9f6\", \"file\": \"bios/tos.img\"           } ] },\n    \"atarilynx\": { \"name\": \"Lynx\", \"biosFiles\":       [ { \"md5\": \"fcd403db69f54290b51035d82f835e7b\", \"file\": \"bios/lynxboot.img\"\t  } ] },\n\n    # Colecovision\n\t\"colecovision\":  { \"name\": \"Colecovision\",\t\"biosFiles\":  [ { \"md5\": \"\", \"file\": \"bios/Machines/COL - Bit Corporation Dina/config.ini\"                                                      },\n                                                                { \"md5\": \"2c66f5911e5b42b8ebe113403548eee7 \", \"file\": \"bios/colecovision.rom\"                                                   },\n                                                                { \"md5\": \"1de922acdd742d31349c2801e9768c35\", \"file\": \"bios/Machines/COL - Bit Corporation Dina/czz50-1.rom\"                     },\n                                                                { \"md5\": \"72b089dc55b7fe7ffb5028f365e8c045\", \"file\": \"bios/Machines/COL - Bit Corporation Dina/czz50-2.rom\"                     },\n                                                                { \"md5\": \"2c66f5911e5b42b8ebe113403548eee7\", \"file\": \"bios/Machines/COL - ColecoVision/coleco.rom\"                              },\n                                                                { \"md5\": \"\", \"file\": \"bios/Machines/COL - ColecoVision/config.ini\"                                                              },\n                                                                { \"md5\": \"2c66f5911e5b42b8ebe113403548eee7\", \"file\": \"bios/Machines/COL - ColecoVision with Opcode Memory Extension/coleco.rom\" },\n                                                                { \"md5\": \"\", \"file\": \"bios/Machines/COL - ColecoVision with Opcode Memory Extension/config.ini\"                                 },\n                                                                { \"md5\": \"\", \"file\": \"bios/Machines/COL - Spectravideo SVI-603 Coleco/config.ini\"                                               },\n                                                                { \"md5\": \"c60a2e85572c0ccb69505a7646d5c1b6\", \"file\": \"bios/Machines/COL - Spectravideo SVI-603 Coleco/SVI603.ROM\"               },\n                                                                { \"md5\": \"\", \"file\": \"bios/Databases/colecodb.xml\"                                                                              },  ] },\n\n    # Commodore\n\t\"amiga\":  { \"name\": \"Amiga/CD32\",\t\"biosFiles\":  [ { \"md5\": \"89da1838a24460e4b93f4f0c5d92d48d\", \"file\": \"bios/CDTV Extended-ROM v1.0 (1991)(Commodore)(CDTV)[!].rom\"                },\n                                                    { \"md5\": \"85ad74194e87c08904327de1a9443b7a\", \"file\": \"bios/Kickstart v1.2 r33.180 (1986)(Commodore)(A500-A1000-A2000)[!].rom\"    },\n                                                    { \"md5\": \"68c9c0826f6c0ca20546d588ee77391c\", \"file\": \"bios/Kickstart v1.2 rev 33.166 (1986)(Commodore)(A1000).rom\"               },\n                                                    { \"md5\": \"192d6d950d0ed3df8040b788502831c2\", \"file\": \"bios/Kickstart v1.3 r34.5 (1987)(Commodore)(A500-A1000-A2000-CDTV)[o].rom\" },\n                                                    { \"md5\": \"82a21c1890cae844b3df741f2762d48d\", \"file\": \"bios/Kickstart v1.3 r34.5 (1987)(Commodore)(A500-A1000-A2000-CDTV)[!].rom\" },\n                                                    { \"md5\": \"dc10d7bdd1b6f450773dfb558477c230\", \"file\": \"bios/Kickstart v2.04 r37.175 (1991)(Commodore)(A500+)[!].rom\"              },\n                                                    { \"md5\": \"465646c9b6729f77eea5314d1f057951\", \"file\": \"bios/Kickstart v2.05 r37.350 (1992)(Commodore)(A600HD)[!].rom\"             },\n                                                    { \"md5\": \"5f8924d013dd57a89cf349f4cdedc6b1\", \"file\": \"bios/Kickstart v3.1 r40.60 (1993)(Commodore)(CD32).rom\"                    },\n                                                    { \"md5\": \"646773759326fbac3b2311fd8c8793ee\", \"file\": \"bios/Kickstart v3.1 r40.68 (1993)(Commodore)(A1200)[!].rom\"                },\n                                                    { \"md5\": \"413590e50098a056cfec418d3df0212d\", \"file\": \"bios/Kickstart v3.1 r40.68 (1993)(Commodore)(A3000).rom\"                   },\n                                                    { \"md5\": \"9bdedde6a4f33555b4a270c8ca53297d\", \"file\": \"bios/Kickstart v3.1 r40.68 (1993)(Commodore)(A4000).rom\"                   },\n                                                    { \"md5\": \"85ad74194e87c08904327de1a9443b7a\", \"file\": \"bios/kick33180.A500\"                   },\n                                                    { \"md5\": \"82a21c1890cae844b3df741f2762d48d\", \"file\": \"bios/kick34005.A500\"                   },\n                                                    { \"md5\": \"dc10d7bdd1b6f450773dfb558477c230\", \"file\": \"bios/kick37175.A500\"                   },\n                                                    { \"md5\": \"5f8924d013dd57a89cf349f4cdedc6b1\", \"file\": \"bios/kick40060.CD32\"                   },\n                                                    { \"md5\": \"bb72565701b1b6faece07d68ea5da639\", \"file\": \"bios/kick40060.CD32.ext\"               },\n                                                    { \"md5\": \"e40a5dfb3d017ba8779faba30cbd1c8e\", \"file\": \"bios/kick40063.A600\"                   },\n                                                    { \"md5\": \"646773759326fbac3b2311fd8c8793ee\", \"file\": \"bios/kick40068.A1200\"                  },\n                                                    { \"md5\": \"9bdedde6a4f33555b4a270c8ca53297d\", \"file\": \"bios/kick40068.A4000\"                  },\n                                                    { \"md5\": \"bb72565701b1b6faece07d68ea5da639\", \"file\": \"bios/CD32 Extended-ROM r40.60 (1993)(Commodore)(CD32).rom\"         } ] },\n    \n    # ---------- Fujistu FM-Towns ---------- #\n    # https://github.com/captainys/TOWNSEMU\n    \"fmtowns\":  { \"name\": \"Fujistu FM-Towns\", \"biosFiles\": [  { \"md5\": \"8fa4e553f28cfc0c30a0a1e589799942\", \"file\": \"bios/fmtowns/FMT_DIC.ROM\" },\n                                  { \"md5\": \"0585b19930d4a7f4c71bcc8a33746588\", \"file\": \"bios/fmtowns/FMT_DOS.ROM\" },\n                                  { \"md5\": \"ac0c7021e9bf48ca84b51ab651169a88\", \"file\": \"bios/fmtowns/FMT_F20.ROM\" },\n                                  { \"md5\": \"b91300e55b70227ce98b59c5f02fa8dd\", \"file\": \"bios/fmtowns/FMT_FNT.ROM\" },\n                                  { \"md5\": \"86fb6f7280689259f0ca839dd3dd6cde\", \"file\": \"bios/fmtowns/FMT_SYS.ROM\" },\n                                  { \"md5\": \"\", \"file\": \"bios/fmtmarty.zip\" },\n                                  { \"md5\": \"6618519b2c104cf9b7e71a48381b44a9\", \"zippedFile\": \"mrom.m36\", \"file\": \"bios/fmtmarty.zip\"},\n                                  { \"md5\": \"75a5c7afb4bc8221bab8cf24db417950\", \"zippedFile\": \"mrom.m37\", \"file\": \"bios/fmtmarty.zip\"},\n                                  { \"md5\": \"\", \"file\": \"bios/fmtowns.zip\" },\n                                  { \"md5\": \"34847786d7de94b5d1133c956ab1d75d\", \"zippedFile\": \"fmt_dic.rom\", \"file\": \"bios/fmtowns.zip\"},\n                                  { \"md5\": \"0585b19930d4a7f4c71bcc8a33746588\", \"zippedFile\": \"fmt_dos.rom\", \"file\": \"bios/fmtowns.zip\"},\n                                  { \"md5\": \"eb44f2093f51eb7159f03e170b13af76\", \"zippedFile\": \"fmt_fnt.rom\", \"file\": \"bios/fmtowns.zip\"},\n                                  { \"md5\": \"feaf8c5675151e00cfe3ad27673bff29\", \"zippedFile\": \"fmt_sys.rom\", \"file\": \"bios/fmtowns.zip\"},\n                                  { \"md5\": \"\", \"file\": \"bios/fmtownsux.zip\" },\n                                  { \"md5\": \"8fa4e553f28cfc0c30a0a1e589799942\", \"zippedFile\": \"fmt_dic.rom\", \"file\": \"bios/fmtownsux.zip\"},\n                                  { \"md5\": \"03c8fac9a5f5f5f35fb5de5a5d0d018f\", \"zippedFile\": \"fmt_dos_a.rom\", \"file\": \"bios/fmtownsux.zip\"},\n                                  { \"md5\": \"b91300e55b70227ce98b59c5f02fa8dd\", \"zippedFile\": \"fmt_fnt.rom\", \"file\": \"bios/fmtownsux.zip\"},\n                                  { \"md5\": \"90b5e01d42aaa93e8f4503a5e94e120b\", \"zippedFile\": \"fmt_sys_a.rom\", \"file\": \"bios/fmtownsux.zip\"},\n                                  { \"md5\": \"1a15f6c1b58ec7e5f850118610a787a7\", \"zippedFile\": \"mytownsux.rom\", \"file\": \"bios/fmtownsux.zip\"} ] },\n\n\n    # Magnavox and Philips\n\t\"o2em\": { \"name\": \"Odyssey 2\", \"biosFiles\": [ { \"md5\": \"562d5ebf9e030a40d6fabfc2f33139fd\", \"file\": \"bios/o2rom.bin\" },\n\t\t\t\t\t\t\t\t\t\t\t\t  { \"md5\": \"f1071cdb0b6b10dde94d3bc8a6146387\", \"file\": \"bios/c52.bin\"   },\n\t\t\t\t\t\t\t\t\t\t\t\t  { \"md5\": \"c500ff71236068e0dc0d0603d265ae76\", \"file\": \"bios/g7400.bin\" },\n\t\t\t\t\t\t\t\t\t\t\t\t  { \"md5\": \"279008e4a0db2dc5f1c048853b033828\", \"file\": \"bios/jopac.bin\" } ] },\n\n    # Mattel\n    \"intellivision\": { \"name\": \"Mattel Intellivision\", \"biosFiles\": [ { \"md5\": \"62e761035cb657903761800f4437b8af\", \"file\": \"bios/exec.bin\"   },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  { \"md5\": \"0cd5946c6473e42e8e4c2137785e427f\", \"file\": \"bios/grom.bin\"   },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  { \"md5\": \"2e72a9a2b897d330a35c8b07a6146c52\", \"file\": \"bios/ECS.bin\"    },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  { \"md5\": \"d5530f74681ec6e0f282dab42e6b1c5f\", \"file\": \"bios/IVOICE.bin\" } ] },\n\n    # Microsoft\n    \"msx\": { \"name\": \"MSX\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"bios/Machines/Forte II Games - Pesadelo/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Forte II Games - Pesadelo/pesadelo.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX/MSX.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX/MSX2.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX/MSX2EXT.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX/MSX2P.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX/MSX2PEXT.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX/MSXDOS2.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Al Alamiah AX-170/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Arabic/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Brazilian/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Brazilian/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - C-BIOS/cbios.txt\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - C-BIOS/cbios_logo_msx1.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - C-BIOS/cbios_main_msx1.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - C-BIOS/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Canon V-10/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Canon V-20/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Daewoo DPC-100/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Daewoo DPC-180/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Daewoo DPC-200/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Estonian/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Frael Bruc 100-1/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - French/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - German/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - German/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Goldstar FC-200/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Gradiente Expert 1.0/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Gradiente Expert 1.1/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Gradiente Expert 1.3/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Gradiente Expert DDPlus/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Gradiente Expert Plus/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Japanese/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Japanese/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - JVC HC-7GB/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Korean/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Korean/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Mitsubishi ML-F80/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Mitsubishi ML-FX1/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - National CF-1200/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Panasonic FS-A1/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Panasonic FS-A1 (a)/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Panasonic FS-A1F/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Panasonic FS-A1FM/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Panasonic FS-A1MK2/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Philips NMS-8220/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Philips NMS-8220 (a)/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Philips NMS-8245/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Philips NMS-8245F/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Philips NMS-8250/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Philips NMS-8255/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Philips NMS-8280/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Philips NMS-8280G/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Philips VG-8230/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Philips VG-8235/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sharp Epcom HotBit 1.2/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sharp Epcom HotBit 1.3b/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sharp Epcom HotBit 1.3p/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sony HB-10P/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sony HB-201/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sony HB-201P/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sony HB-20P/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sony HB-501P/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sony HB-55D/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sony HB-55P/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sony HB-75D/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sony HB-75P/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Spanish/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Spectravideo SVI-728/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Spectravideo SVI-738/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Spectravideo SVI-738-2 CUC/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Spectravideo SVI-738-2 JP Grobler/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Spectravideo SVI-738-2 LC Grosso/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Swedish/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Talent TPC-310/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Toshiba HX-23/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Toshiba HX-23F/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Virtual Haesung Console/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Yamaha CX7M/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Yamaha CX7M-128/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+/MSX.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+/MSX2.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+/MSX2EXT.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+/MSX2P.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+/MSX2PEXT.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+/MSXDOS2.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - Brazilian/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - C-BIOS/cbios.txt\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - C-BIOS/cbios_logo_msx2+.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - C-BIOS/cbios_main_msx2+.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - C-BIOS/cbios_music.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - C-BIOS/cbios_sub.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - C-BIOS/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - Ciel Expert 3 IDE/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - Ciel Expert 3 Turbo/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Spectravideo SVI-738 Swedish/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Swedish/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Swedish/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Talent DPC-200/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Talent DPC-200A/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Toshiba HX-10/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Toshiba HX-10S/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Toshiba HX-20/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Yamaha CX5M-1/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Yamaha CX5M-128/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Yamaha CX5M-2/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Yamaha CX5MII/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Yamaha YIS303/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Yamaha YIS503/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Yamaha YIS503F/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Yamaha YIS503II/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Yamaha YIS503IIR/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Yamaha YIS503M/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Yashica YC-64/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Yeno DPC-64/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Yeno MX64/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2/MSX.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2/MSX2.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2/MSX2EXT.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2/MSX2P.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2/MSX2PEXT.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2/MSXDOS2.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Al Alamiah AX-350/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Al Alamiah AX-370/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Arabic/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Arabic/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Brazilian/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Brazilian/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - C-BIOS/cbios.txt\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - C-BIOS/cbios_logo_msx2.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - C-BIOS/cbios_main_msx2.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - C-BIOS/cbios_sub.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - C-BIOS/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Daewoo CPC-300/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Daewoo CPC-300E/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Daewoo CPC-400/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Daewoo CPC-400S/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Estonian/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - French/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - French/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - German/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - German/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Gradiente Expert 2.0/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Japanese/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Japanese/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Korean/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Korean/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - National FS-4500/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - National FS-4600/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - National FS-4700/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - National FS-5000/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - National FS-5500F1/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - National FS-5500F2/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Daewoo DPC-200E/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - National CF-2000/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sharp Epcom HotBit 1.1/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Spectravideo SVI-738 Henrik Gilvad/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Yamaha YIS503IIR Estonian/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Only PSG/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Only PSG/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Philips VG-8235F/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Spanish/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Spanish/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - European/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - National CF-2700/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - National CF-3000/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - National CF-3300/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - National FS-1300/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - National FS-4000/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Olympia PHC-2/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Olympia PHC-28/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Panasonic CF-2700G/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Philips NMS-801/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Philips VG-8000/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Philips VG-8010/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Philips VG-8010F/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Philips VG-8020-00/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Philips VG-8020-20/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Philips VG-8020F/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Pioneer PX-7/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Pioneer PX-V60/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Russian/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sanyo MPC-100/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sanyo MPC-64/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sanyo PHC-28L/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sanyo PHC-28S/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX - Sanyo Wavy MPC-10/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - Gradiente Expert AC88+/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - Gradiente Expert DDX+/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - MSXPLAYer 2003/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - Panasonic FS-A1FX/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - Panasonic FS-A1WSX/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - Panasonic FS-A1WX/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - Panasonic FS-A1WX (a)/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - Sanyo Wavy PHC-35J/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - Sanyo Wavy PHC-70FD1/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - Sanyo Wavy PHC-70FD2/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - Sony HB-F1XDJ/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - Sony HB-F1XV/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2+ - Sony HB-F9S+/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSXturboR/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSXturboR - European/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSXturboR - Panasonic FS-A1GT/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSXturboR - Panasonic FS-A1ST/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSXturboR - Panasonic FS-A1ST (a)/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSXturboR - Panasonic FS-A1ST (b)/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2G.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXDOS23.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/ARAB1.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/ARABIC.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/BEERIDE.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/FMPAC.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/GCVMX80.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/HANGUL.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/KANJI.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MICROSOLDISK.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MOONSOUND.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2AR.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2AREXT.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2BR.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2BREXT.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2EXT.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2FR.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2FREXT.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2GEXT.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2HAN.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2J.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2JEXT.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2KR.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2KREXT.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2P.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2PEXT.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2PMUS.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2R.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2R2.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2REXT.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2SE.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2SP.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSX2SPEXT.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXAR.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXBR.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXDOS2.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXFR.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXG.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXHAN.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXJ.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXKANJI.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXKR.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXR.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXR2.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXSE.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXSP.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXTR.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXTREXT.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXTRMUS.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/MSXTROPT.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/NATIONALDISK.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/NOVAXIS.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/nowindDos1.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/nowindDos2.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/PAINT.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/PANASONICDISK.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/PHILIPSDISK.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/RS232.ROM\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/Shared.txt\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/SUNRISEIDE.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/SWP.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Shared Roms/XBASIC2.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/SVI - Spectravideo SVI-318/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/SVI - Spectravideo SVI-318/svi318.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/SVI - Spectravideo SVI-328/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/SVI - Spectravideo SVI-328/svi328.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/SVI - Spectravideo SVI-328 80 Column/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/SVI - Spectravideo SVI-328 80 Column/svi328a.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/SVI - Spectravideo SVI-328 80 Column/svi806.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/SVI - Spectravideo SVI-328 80 Swedish/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/SVI - Spectravideo SVI-328 80 Swedish/svi328a.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/SVI - Spectravideo SVI-328 80 Swedish/svi806se.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/SVI - Spectravideo SVI-328 MK2/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/SVI - Spectravideo SVI-328 MK2/svi328a.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/SVI - Spectravideo SVI-328 MK2/svi806.rom\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/Turbo-R/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Philips VG-8240/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Russian/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Russian/hardwareconfig.xml\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sanyo Wavy MPC-25FD/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sanyo Wavy PHC-23/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sharp Epcom HotBit 2.0/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-F1/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-F1II/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-F1XD/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-F1XDMK2/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-F500/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-F500P/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-F700D/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-F700F/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-F700P/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-F700S/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-F900/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-F900 (a)/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-F9P/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-F9P Russian/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-F9S/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-G900AP/config.ini\" },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/Machines/MSX2 - Sony HB-G900P/config.ini\" } ] },\n\n\n    # NEC\n\t\"pcengine\":   { \"name\": \"PC Engine\", \"biosFiles\":  [ { \"md5\": \"ff1a674273fe3540ccef576376407d1d\", \"file\": \"bios/syscard3.pce\" } ] },\n    \"pcfx\":       { \"name\": \"PC-FX\", \"biosFiles\":      [ { \"md5\": \"08e36edbea28a017f79f8d4f7ff9b6d7\", \"file\": \"bios/pcfx.rom\"     } ] },\n    \"supergrafx\": { \"name\": \"Supergrafx\", \"biosFiles\": [ { \"md5\": \"ff1a674273fe3540ccef576376407d1d\", \"file\": \"bios/syscard3.pce\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"bios/syscard2.pce\"\t\t\t\t\t\t\t\t  },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"bios/syscard1.pce\"\t\t\t\t\t\t\t\t  },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"bios/gexpress.pce\"\t\t\t\t\t\t\t\t  } ] },\n\n\n    # Nintendo\n\t\"fds\":         { \"name\": \"Nintendo Family Computer Disk System\", \"biosFiles\": [ { \"md5\": \"7bfe8c0540ed4bd6a0f1e2a0f0118ced\", \"file\": \"bios/NstDatabase.xml\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t            { \"md5\": \"ca30b50f880eb660a320674ed365ef7a\", \"file\": \"bios/disksys.rom\"     } ] },\n    \"gb\":          { \"name\": \"Game Boy\", \"biosFiles\":                             [ { \"md5\": \"32fbbd84168d3482956eb3c5051637f5\", \"file\": \"bios/gb_bios.bin\"  \t},\n\t\t\t\t\t\t\t\t\t\t\t                                        { \"md5\": \"dbfce9db9deaa2567f6a84fde55f9680\", \"file\": \"bios/gbc_bios.bin\" \t} ] },\n\t\"gbc\":         { \"name\": \"Game Boy Color\", \"biosFiles\":                       [ { \"md5\": \"32fbbd84168d3482956eb3c5051637f5\", \"file\": \"bios/gb_bios.bin\"  \t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t                                { \"md5\": \"dbfce9db9deaa2567f6a84fde55f9680\", \"file\": \"bios/gbc_bios.bin\" \t} ] },\n    \"gba\":         { \"name\": \"Game Boy Advance\", \"biosFiles\":                     [ { \"md5\": \"a860e8c0b6d573d191e4ec7db1b1e4f6\", \"file\": \"bios/gba_bios.bin\" \t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t                            { \"md5\": \"32fbbd84168d3482956eb3c5051637f5\", \"file\": \"bios/gb_bios.bin\"  \t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t                            { \"md5\": \"dbfce9db9deaa2567f6a84fde55f9680\", \"file\": \"bios/gbc_bios.bin\" \t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t                            { \"md5\": \"d574d4f9c12f305074798f54c091a8b4\", \"file\": \"bios/sgb_bios.bin\" \t} ] },\n    \"n64\":         { \"name\": \"Nintendo 64\", \"biosFiles\":                          [ { \"md5\": \"8d3d9f294b6e174bc7b1d2fd1c727530\", \"file\": \"bios/64DD_IPL.bin\"    } ] },\n    \"nds\":         { \"name\": \"Nintendo DS\", \"biosFiles\":                          [ { \"md5\": \"145eaef5bd3037cbc247c213bb3da1b3\", \"file\": \"bios/firmware.bin\" \t},\n\t\t\t\t\t\t\t\t\t\t\t\t                                    { \"md5\": \"df692a80a5b1bc90728bc3dfc76cd948\", \"file\": \"bios/bios7.bin\"    \t},\n\t\t\t\t\t\t\t\t\t\t\t\t                                    { \"md5\": \"a392174eb3e572fed6447e956bde4b25\", \"file\": \"bios/bios9.bin\"    \t} ] },\n    \"satellaview\": { \"name\": \"Satellaview\", \"biosFiles\":                          [ { \"md5\": \"fed4d8242cfbed61343d53d48432aced\", \"file\": \"bios/BS-X.bin\"        } ] },\n    \"sufami\":      { \"name\": \"Sufami\", \"biosFiles\":                               [ { \"md5\": \"d3a44ba7d42a74d3ac58cb9c14c6a5ca\", \"file\": \"bios/STBIOS.bin\"      } ] },\n\n\n    # Panasonic, Sanyo and Goldstar\n    \"3do\":\t{ \"name\": \"3DO\", \"biosFiles\": [ { \"md5\": \"f47264dd47fe30f73ab3c010015c155b\", \"file\": \"bios/panafz1.bin\"\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{ \"md5\": \"51f2f43ae2f3508a14d9f56597e2d3ce\", \"file\": \"bios/panafz10.bin\"\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{ \"md5\": \"8639fd5e549bd6238cfee79e3e749114\", \"file\": \"bios/goldstar.bin\"\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{ \"md5\": \"35fa1a1ebaaeea286dc5cd15487c13ea\", \"file\": \"bios/sanyotry.bin\"\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{ \"md5\": \"8970fc987ab89a7f64da9f8a8c4333ff\", \"file\": \"bios/3do_arcade_saot.bin\" } ] },\n\n\n    # Sega\n    \"naomi\":   { \"name\": \"Naomi\", \"biosFiles\":    [ { \"md5\": \"e63d892cdb8b532351dc7020bb60b6f4\", \"file\": \"bios/dc/naomi.zip\"   \t  } ] },\n    \"atomiswave\":   { \"name\": \"Atomiswave\", \"biosFiles\":    [ { \"md5\": \"0ec5ae5b5a5c4959fa8b43fcf8687f7c\", \"file\": \"bios/dc/awbios.zip\"   \t  } ] },\n    \"dreamcast\":    { \"name\": \"Dreamcast\", \"biosFiles\":    [ { \"md5\": \"e10c53c2f8b90bab96ead2d368858623\", \"file\": \"bios/dc/dc_boot.bin\"   \t  },\n\t\t\t\t\t\t\t\t\t\t\t\t\t         { \"md5\": \"0a93f7940c455905bea6e392dfde92a4\", \"file\": \"bios/dc/dc_flash.bin\"  \t  } ] },\n    \"gamegear\":     { \"name\": \"Game Gear\", \"biosFiles\":    [ { \"md5\": \"672e104c3be3a238301aceffc3b23fd6\", \"file\": \"bios/bios.gg\" \t   \t  } ] },\n    \"mastersystem\": { \"name\": \"MasterSystem\", \"biosFiles\": [ { \"md5\": \"840481177270d5642a14ca71ee72844c\", \"file\": \"bios/bios_E.sms\"    \t  },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"840481177270d5642a14ca71ee72844c\", \"file\": \"bios/bios_U.sms\"    \t  },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"24a519c53f67b00640d0048ef7089105\", \"file\": \"bios/bios_J.sms\"    \t  } ] },\n    \"saturn\":       { \"name\": \"Sega Saturn\", \"biosFiles\":  [ { \"md5\": \"af5828fdff51384f99b3c4926be27762\", \"file\": \"bios/saturn_bios.bin\"  },\n\t\t\t\t\t\t\t\t\t\t\t\t\t         { \"md5\": \"85ec9ca47d8f6807718151cbcca8b964\", \"file\": \"bios/sega_101.bin\"\t  },\n\t\t\t\t\t\t\t\t\t\t\t\t\t         { \"md5\": \"3240872c70984b6cbfda1586cab68dbe\", \"file\": \"bios/mpr-17933.bin\"\t  },\n\t\t\t\t\t\t\t\t\t\t\t\t\t         { \"md5\": \"255113ba943c92a54facd25a10fd780c\", \"file\": \"bios/mpr-18811-mx.ic1\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t         { \"md5\": \"1cd19988d1d72a3e7caa0b73234c96b4\", \"file\": \"bios/mpr-19367-mx.ic1\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t         { \"md5\": \"53a094ad3a188f86de4e64624fe9b3ca\", \"file\": \"bios/stvbios.zip\"\t  } ] },\n    \"segacd\":       { \"name\": \"Sega CD\", \"biosFiles\":      [ { \"md5\": \"e66fa1dc5820d254611fdcdba0662372\", \"file\": \"bios/bios_CD_E.bin\" \t  },\n\t\t\t\t\t\t\t\t\t\t\t\t             { \"md5\": \"854b9150240a198070150e4566ae1290\", \"file\": \"bios/bios_CD_U.bin\" \t  },\n\t\t\t\t\t\t\t\t\t\t\t\t             { \"md5\": \"278a9397d192149e84e820ac621a8edd\", \"file\": \"bios/bios_CD_J.bin\" \t  } ] },\n    \"naomi\":        { \"name\": \"Naomi\", \"biosFiles\":        [ { \"md5\": \"3bffafac42a7767d8dcecf771f5552ba\", \"file\": \"bios/dc/naomi_boot.bin\"   },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"e63d892cdb8b532351dc7020bb60b6f4\", \"file\": \"bios/dc/naomi.zip\"   } ] },\n    \"sc-3000\":     { \"name\": \"SC-3000\", \"biosFiles\":     [ { \"md5\": \"\", \"file\": \"bios/Machines/SEGA - SC-3000/config.ini\" } ] },\n\n\n    # Sharp\n    \"x68000\": { \"name\": \"Sharp x68000\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"bios/keropi/iplrom.dat\"   },\n\t\t\t\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/keropi/iplrom30.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/keropi/iplromco.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/keropi/iplromxv.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"\", \"file\": \"bios/keropi/cgrom.dat\"\t   } ] },\n\n\n    # SNK\n\t\"neogeo\":   { \"name\": \"NeoGeo\", \"biosFiles\":    [ { \"md5\": \"\", \"file\": \"neogeo/neogeo.zip\" } ] },\n\t\"neogeocd\": { \"name\": \"NeoGeo CD\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"neogeo/neogeo.zip\" },\t\t\t\t\t\t\t\t\t\t\t\t\t  \n                                                      { \"md5\": \"f39572af7584cb5b3f70ae8cc848aba2\", \"file\": \"bios/neocd/neocd_z.rom\"} ] },\n\n\n    # Sony Computer Entertainment\n    \"psx\": { \"name\": \"PSX\", \"biosFiles\": [ { \"md5\": \"8dd7d5296a650fac7319bce665a6a53c\", \"file\": \"bios/scph5500.bin\"   },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"490f666e1afb15b7362b406ed1cea246\", \"file\": \"bios/scph5501.bin\"   },\n\t\t\t\t\t\t\t\t\t\t   { \"md5\": \"32736f17079d0b2b7024407c39bd3050\", \"file\": \"bios/scph5502.bin\"   } ] },\n\n\t# Ports\n\t\"Diablo\": { \"name\": \"Diablo 1 (devilutionx) \", \"biosFiles\": [ { \"md5\": \"68f049866b44688a7af65ba766bef75a\", \"file\": \"ports/diablo/diabdat.mpq\" } ] },\n    \"Hellfire\": { \"name\": \"Diablo 1: Hellfire (devilutionx) \", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/diablo/hellfire.mpq\" },\n                                                                              { \"md5\": \"\", \"file\": \"ports/diablo/hfmonk.mpq\" },\n                                                                              { \"md5\": \"\", \"file\": \"ports/diablo/hfmusic.mpq\" },\n                                                                              { \"md5\": \"\", \"file\": \"ports/diablo/hfvoice.mpq\" },\n                                                                              { \"md5\": \"68f049866b44688a7af65ba766bef75a\", \"file\": \"ports/diablo/diabdat.mpq\" },\n                                                                            ] },\n\t\n\t\"Dinothawr\": { \"name\": \"Dinothawr\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/dinothawr/level_3-3.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_7-2.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_right_walk2.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/.directory\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/bg/bg1.ogg\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/bg/bg2.ogg\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/bg/bg3.ogg\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/bg/bg4.ogg\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/bg/bg5.ogg\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/bg/bg8.ogg\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/bg/theme.ogg\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/bg.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino.sprite\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dinopush_down.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dinopush_left.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dinopush_right.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dinopush_up.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_cheer.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_down.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_down_slide1.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_down_slide2.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_down_walk1.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_down_walk2.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_down_walk3.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_down_walk4.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_left.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_left_slide1.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_left_slide2.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_left_walk1.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_left_walk2.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_left_walk3.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_left_walk4.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_right.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_right_slide1.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_right_slide2.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_right_walk1.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_right_walk3.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_right_walk4.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_up.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_up_slide1.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_up_slide2.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_up_walk1.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_up_walk2.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_up_walk3.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/dino_up_walk4.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/ending.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/finished.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/font.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/frozen.sprite\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/frozen_dino_block.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/frozen_dino_cheer.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/frozen_dino_defrost1.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/frozen_dino_defrost2.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/frozen_dino_down.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/level_select_bg.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/lock.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/nav.sprite\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfx/chapter_locked.wav\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfx/dino_jump.wav\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfx/dino_push.wav\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfx/frozen_dino_melt.wav\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfx/ice_bump.wav\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfx/level_next.wav\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfxr/block_slide.sfs\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfxr/chapter_locked.sfs\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfxr/dino_bump.sfs\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfxr/dino_jump.sfs\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfxr/dino_push.sfs\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfxr/frozen_dino_melt.sfs\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfxr/ice_bump.sfs\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfxr/level_complete.sfs\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfxr/level_failed.sfs\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfxr/level_next.sfs\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfxr/level_select.sfs\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfxr/rock_bump.sfs\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfxr/slide_ice.sfs\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/sfxr/slide_snow.sfs\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/tileset-ground.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/tileset-misc.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/tileset-pushblocks.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/tileset-rocks.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/tileset-slippery.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/assets/titlescreen.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/dino.font\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/dinothawr.game\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/hq2x.glsl\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/hq2x.glslp\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_1-1.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_1-2.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_1-3.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_1-4.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_1-5.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_10-1.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_10-2.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_10-3.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_10-4.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_10-5.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_2-1.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_2-2.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_2-3.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_2-4.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_2-5.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_3-1.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_3-2.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_3-4.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_3-5.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_4-1.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_4-2.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_4-3.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_4-4.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_4-5.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_5-1.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_5-2.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_5-3.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_5-4.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_5-5.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_6-1.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_6-2.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_6-3.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_6-4.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_6-5.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_7-1.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_7-3.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_7-4.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_7-5.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_8-1.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_8-2.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_8-3.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_8-4.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_8-5.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_9-1.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_9-2.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_9-3.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_9-4.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/level_9-5.tmx\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/overlay.cfg\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/overlay.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/overlay_big.cfg\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/overlay_big.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/RetroArch-0916-233002.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/RetroArch-0916-233008.png\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/scanline.glsl\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/stock.glsl\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/xbr-lv2-a-pass0.glsl\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/xbr-lv2-a.glslp\" },\n                                                       { \"md5\": \"\", \"file\": \"ports/dinothawr/xbr-lv2-pass1.glsl\" } ] },\n\n\t\"DOOM1\": { \"name\": \"DOOM1 (PrBoom)\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/doom/doom1.wad\" } ] },\n\n\t\"DOOM2\": { \"name\": \"DOOM2 (PrBoom)\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/doom2/doom2.wad\" } ] },\n\t\n\t\"OpenTyrian\": { \"name\": \"OpenTyrian\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/opentyrian/cubetxt1.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/cubetxt2.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/cubetxt3.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/cubetxt4.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/demo.1\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/demo.2\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/demo.3\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/demo.4\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/demo.5\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/dpmi16bi.ovl\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/estsc.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/exitmsg.bin\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/levels1.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/levels2.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/levels3.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/levels4.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/loudness.awe\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/modems.txt\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/music.mus\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/netarena.pcx\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/netfont1.pcx\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/netfont2.pcx\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/netmega.pcx\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/netset.pcx\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsh#.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsh0.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsh1.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsh2.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsh3.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsh4.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsh5.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsh6.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsh7.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsh8.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsh9.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsha.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshb.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshc.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshd.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshe.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshf.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshg.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshh.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshj.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshk.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshl.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshm.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshn.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsho.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshp.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshr.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshs.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsht.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshu.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshv.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsh^.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newsh~.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/order.tfp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/palette.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/setup.box\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/setup.ini\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/setup.int\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/shapesw.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/shapesx.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/shapesy.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/shapesz.dat\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/shipedit.pcx\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/tshp2.pcx\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/tyrend.anm\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/tyrian.cdt\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/tyrian.hdt\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/tyrian.ico\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/tyrian.pic\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/tyrian.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/tyrian.snd\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/tyrian1.lvl\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/tyrian2.lvl\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/tyrian3.lvl\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/tyrian4.lvl\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/tyrianc.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/tyrset.pcx\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/user1.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/user2.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/voices.snd\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/voicesc.snd\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/netterm.int\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/newshi.shp\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/opentyrian/shapes).dat\" } ] },\n\n\t\"Cannonball\": { \"name\": \"Cannonball\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10187.88\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10327.76\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10327a.76\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10328.75\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10328a.75\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10329.58\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10329a.58\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10330.57\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10330a.57\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10380.133\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10380b.133\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10381.132\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10381b.132\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10382.118\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10382b.118\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10383.117\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/epr-10383b.117\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/mpr-10371.9\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/mpr-10372.13\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/mpr-10373.10\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/mpr-10374.14\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/mpr-10375.11\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/mpr-10376.15\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/mpr-10377.12\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/mpr-10378.16\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/opr-10185.11\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/opr-10186.47\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/opr-10188.71\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/opr-10189.70\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/opr-10190.69\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/opr-10191.68\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/opr-10192.67\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/opr-10193.66\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/opr-10230.104\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/opr-10231.103\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/opr-10232.102\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/opr-10266.101\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/opr-10267.100\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/cannonball/opr-10268.99\" } ] },\n\n\t\"CaveStory\": { \"name\": \"Cave Story (nxengine)\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/CaveStory/Doukutsu.exe\" } ] },\n\n\t\"Dinothawr\": { \"name\": \"Dinothawr\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/dinothawr/dinothawr.game\" } ] },\n\n\t\"Quake\": { \"name\": \"Quake (tryquake)\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/quake/id1/pak0.pak\" } ] },\n\n\t\"REminiscence\": { \"name\": \"Flashback (REminiscence)\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/reminiscence/level1.map\" } ] },\n\t\n\t\"RickDangerous\": { \"name\": \"Rick Dangerous (xrick)\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/xrick/data.zip\" } ] },\n\t\n\t\"VVVVVV\": { \"name\": \"VVVVVV\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/VVVVVV/data.zip\" } ] },\n\t\n\t\"eduke32\": { \"name\": \"Duke Nukem 3D\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/eduke/duke3d.grp\" } ] },\n    \"sonic1\": { \"name\": \"Sonic 1\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/sonic1/Data.rsdk\" } ] },\n    \"sonic2\": { \"name\": \"Sonic 2\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/sonic2/Data.rsdk\" } ] },\n    \"soniccd\": { \"name\": \"Sonic CD\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/soniccd/Data.rsdk\" } ] },\n    \"sonicmania\": { \"name\": \"Sonic Mania\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/sonicmania/Data.rsdk\" } ] },\n\t\n    \"RigelEngine\": { \"name\": \"Duke Nukem 2\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"ports/rigelengine/NUKEM2.CMP\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/rigelengine/NUKEM2.F1\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/rigelengine/NUKEM2.F2\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/rigelengine/NUKEM2.F3\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/rigelengine/NUKEM2.F4\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"ports/rigelengine/NUKEM2.F5\" } ] },\n    \n    # Philips CDI\n    \"cdi\": { \"name\": \"Philips CDI\", \"biosFiles\": [ { \"md5\": \"\", \"file\": \"bios/same_cdi/bios/cdimono1.zip\" },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"bios/same_cdi/bios/cdimono2.zip\"\t\t\t\t\t\t  },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t { \"md5\": \"\", \"file\": \"bios/same_cdi/bios/cdibios.zip\"\t\t\t\t\t\t  } ] },\n                                                         \n    }\n\nclass BiosStatus:\n    MISSING = \"MISSING\"\n    UNTESTED = \"UNTESTED\"\n\ndef md5sum(filename, blocksize=65536):\n    hash = md5()\n    with open(filename, \"rb\") as f:\n        for block in iter(lambda: f.read(blocksize), b\"\"):\n            hash.update(block)\n    return hash.hexdigest()\n\ndef checkBios(systems, prefix):\n    missingBios = {}\n    for system in systems.keys():\n        for file in systems[system][\"biosFiles\"]:\n            filepath = prefix + \"/\" + file[\"file\"]\n            if isfile(filepath):\n                md5 = md5sum(filepath)\n                if md5 != file[\"md5\"] and file[\"md5\"] != \"\":\n                    if system not in missingBios:\n                        missingBios[system] = {}\n                    missingBios[system][file[\"file\"]] = { \"status\": BiosStatus.UNTESTED, \"md5\": file[\"md5\"], \"file\": file[\"file\"] }\n            else:\n                if system not in missingBios:\n                    missingBios[system] = {}\n                missingBios[system][file[\"file\"]] = { \"status\": BiosStatus.MISSING, \"md5\": file[\"md5\"], \"file\": file[\"file\"] }\n    return missingBios\n\n# Returns True if missing, False if nothing is missing\ndef displayMissingBios(systems, missingBios):\n    sortedMissingBios = OrderedDict(sorted(missingBios.items()))\n    if sortedMissingBios:\n        for system in sortedMissingBios:\n            print(\"> {}\".format(systems[system][\"name\"]))\n            for file in sortedMissingBios[system].keys():\n                md5str = \"-\"\n                if sortedMissingBios[system][file][\"md5\"] != \"\":\n                    md5str = sortedMissingBios[system][file][\"md5\"]\n                print(\"{} {} {}\".format(sortedMissingBios[system][file][\"status\"], md5str, sortedMissingBios[system][file][\"file\"]))\n        return True\n    else:\n        print(\"No missing bios\")\n        return False\n\ndef createReadme(systems):\n    for system in sorted(systems):\n        print(\"{}:\".format(systems[system][\"name\"]))\n        for bios in systems[system][\"biosFiles\"]:\n            print(\"{} {}\".format(bios[\"md5\"], \"/storage/roms/\" + bios[\"file\"]))\n        print(\"\")\n\nif __name__ == '__main__':\n    if len(sys.argv) == 1:\n        prefix = \"/storage/roms/\"\n        if displayMissingBios(systems, checkBios(systems, prefix)):\n            exit(2)\n    elif sys.argv[1] == \"--createReadme\":\n        createReadme(systems)\n    elif len(sys.argv) == 3 and sys.argv[1] in [\"--filter\", \"--strictfilter\"]:\n        prefix = \"/storage/roms/\"\n        lowered_name = sys.argv[2].lower()\n\n        filtered_systems = {}\n        for system in systems:\n            lowered_system = system.lower()\n            lowered_system_name = systems[system]['name'].lower()\n            \n            if ((lowered_name == lowered_system or lowered_name == lowered_system_name) or\n               (sys.argv[1] == \"--filter\" and (lowered_name in lowered_system or lowered_name in lowered_system_name))):\n                filtered_systems[system] = systems[system]\n\n        if len(filtered_systems) == 0:\n            print(\"No system named {} found\".format(sys.argv[2]))\n            exit(1)\n\n        if displayMissingBios(filtered_systems, checkBios(filtered_systems, prefix)):\n            exit(2)\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/batocera-wifi",
    "content": "#!/bin/bash\n\nACTION=$1\nshift\n\ndo_help() {\n    echo \"${1} scanlist\" >&2\n    echo \"${1} list\" >&2\n}\n\nremove_last_word() {\n    echo \"${@:1:$#-1}\"\n}\n\ndo_list() {\n    connmanctl services | while read; do\n        if [[ $REPLY == *'wifi_'* ]]; then\n          WITHOUT_PREFIX=${REPLY:4}\n          echo $(remove_last_word $WITHOUT_PREFIX)\n        fi\n    done\n}\n\ndo_scanlist() {\n    connmanctl scan wifi >/dev/null 2>/dev/null\n    do_list\n}\n\ncase \"${ACTION}\" in\n    \"list\")\n\tdo_list\n\t;;\n    \"scanlist\")\n\tdo_scanlist\n\t;;\n    *)\n\tdo_help \"${0}\"\nesac\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/emuelec-bluetooth",
    "content": "#!/usr/bin/python -u\n\n################################################################################\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present ebeem (https://github.com/ebeem)\n# Modifications made by:\n#   Langerz82 (https://github.com/Langerz82)\n#   wang80919 (https://github.com/wang80919)\n# Testing done by:\n#   junm6802030 (https://github.com/junm6802030)\n# Special thanks to everyone who worked on this.\n################################################################################\n\nfrom subprocess import Popen, PIPE, STDOUT\nfrom dataclasses import dataclass\nimport time\nimport sys\nimport os\nfrom multiprocessing import Process\n\nDEBUG = False\n\n\n@dataclass\nclass BluetoothDevice:\n    mac: str\n    name: str\n    alias: str\n    clas: str\n    icon: str\n    paired: bool\n    bounded: bool\n    trusted: bool\n    blocked: bool\n    connected: bool\n    wake_allowed: bool\n    legacy_pairing: bool\n    rssi: int\n\n\nclass ShellIO:\n    @staticmethod\n    def execute(cmd: list[str], debug=DEBUG) -> list[str]:\n        if debug:\n            print(\"> \" + \" \".join(x for x in cmd))\n        out: list[str] = []\n        with Popen(cmd, stdout=PIPE, bufsize=1, universal_newlines=True, encoding=\"latin-1\") as p:\n            for line in p.stdout:\n                out.append(line)\n                if debug:\n                    print(line)\n        return out\n\n    @staticmethod\n    def execute_lookup(cmd: list[str], match: str, debug=DEBUG) -> str:\n        out = ShellIO.execute(cmd, debug=debug)\n        for o in out:\n            if match in o:\n                return o\n        return \"\"\n\n    @staticmethod\n    def execute_async(cmd: list[str]):\n        Popen(cmd, stdout=PIPE, bufsize=1, universal_newlines=True, encoding=\"latin-1\")\n\n\nclass BluetoothCTL:\n    async_bluetooth_process: \"Popen | None\"\n\n    def __init__(self):\n        self.async_bluetooth_process = None\n\n    def _parse_device_info(self, mac: str):\n        info = ShellIO.execute([\"bluetoothctl\", \"info\", mac], debug=False)\n        dev = BluetoothDevice(\n            mac=mac,\n            name=\"\",\n            alias=\"\",\n            clas=\"\",\n            icon=\"\",\n            paired=False,\n            bounded=False,\n            trusted=False,\n            blocked=False,\n            connected=False,\n            wake_allowed=False,\n            legacy_pairing=False,\n            rssi=0,\n        )\n        for i in info:\n            i = i.strip()\n            if i.startswith(\"Name:\"):\n                dev.name = i.split(\":\")[1].strip()\n            if i.startswith(\"Alias:\"):\n                dev.alias = i.split(\":\")[1].strip()\n            if i.startswith(\"Class:\"):\n                dev.clas = i.split(\":\")[1].strip()\n            if i.startswith(\"Icon:\"):\n                dev.icon = i.split(\":\")[1].strip()\n            if i.startswith(\"Paired:\"):\n                dev.paired = i.split(\":\")[1].strip() == \"yes\"\n            if i.startswith(\"Bounded:\"):\n                dev.bounded = i.split(\":\")[1].strip() == \"yes\"\n            if i.startswith(\"Trusted:\"):\n                dev.trusted = i.split(\":\")[1].strip() == \"yes\"\n            if i.startswith(\"Blocked:\"):\n                dev.blocked = i.split(\":\")[1].strip() == \"yes\"\n            if i.startswith(\"Connected:\"):\n                dev.connected = i.split(\":\")[1].strip() == \"yes\"\n            if i.startswith(\"WakeAllowed:\"):\n                dev.wake_allowed = i.split(\":\")[1].strip() == \"yes\"\n            if i.startswith(\"LegacyPairing:\"):\n                dev.legacy_pairing = i.split(\":\")[1].strip() == \"yes\"\n            if i.startswith(\"RSSI:\"):\n# Following code tested on bluez 5.66, and should work with 5.72 too.\t\t\t\t\n                dev.rssi = int(i.split(\" \")[-1].replace(\"(\",\"\").replace(\")\",\"\").strip())\n        return dev\n\n    @property\n    def power(self) -> bool:\n        return \"yes\" in ShellIO.execute_lookup([\"bluetoothctl\", \"show\"], \"Pairable\", debug=False)\n\n    @property\n    def discoverable(self) -> bool:\n        return \"yes\" in ShellIO.execute_lookup([\"bluetoothctl\", \"show\"], \"Discoverable\", debug=False)\n\n    @property\n    def pairable(self) -> bool:\n        return \"yes\" in ShellIO.execute_lookup([\"bluetoothctl\", \"show\"], \"Pairable\", debug=False)\n\n    @power.setter\n    def power(self, value):\n        ShellIO.execute([\"bluetoothctl\", \"power\", \"on\" if value else \"off\"])\n\n    @discoverable.setter\n    def discoverable(self, value):\n        ShellIO.execute([\"bluetoothctl\", \"discoverable\", \"on\" if value else \"off\"])\n\n    @pairable.setter\n    def pairable(self, value):\n        ShellIO.execute([\"bluetoothctl\", \"pairable\", \"on\" if value else \"off\"])\n\n    @pairable.setter\n    def agent(self, value):\n        ShellIO.execute([\"bluetoothctl\", \"agent\", \"on\" if value else \"off\"])\n\n    def scan(self, timeout=10):\n        ShellIO.execute([\"bluetoothctl\", \"--timeout\", str(timeout), \"scan\", \"on\"])\n\n    def scan_async(self, timeout=10):\n        # using stdbuf to flush buffer and get output immediately (bluetoothctl issue)\n        cmd = (\n            \"stdbuf -oL bluetoothctl --timeout \" + str(timeout) + \" scan on\"\n            if timeout > 0\n            else \"stdbuf -oL bluetoothctl -- scan on\"\n        )\n        process = Popen(cmd.split(), stdout=PIPE, universal_newlines=True)\n        while True:\n            line = process.stdout.readline()\n            if line == \"\" and process.poll() is not None:\n                break\n            if line:\n                line = line.strip().rstrip()\n                if DEBUG:\n                    print(\"< \", line)\n                if (\n                    len(line.split()) >= 3\n                    and len(line.split()[2]) == 17\n                    and (\n                        \"NEW\" in line.split()[0]\n                        or \"CHG\" in line.split()[0]\n                        or \"DEL\" in line.split()[0]\n                    )\n                ):\n                    if DEBUG:\n                        print(bt.devices)\n                    devs = [x for x in bt.devices if x.mac == line.split()[2]]\n                    if len(devs) > 0:\n                        if \"DEL\" in line.split()[0]:\n                            on_device_removed(devs[0])\n                        elif \"NEW\" in line.split()[0] or (\n                            \"CHG\" in line.split()[0] and \"RSSI:\" in line\n                        ):\n                            if DEBUG:\n                                print(devs)\n                            if not on_device_discovered(devs[0]):\n                                print(\"stopping thread\")\n                                break\n\n    def scan_stop(self):\n        ShellIO.execute_async([\"pkill\", \"-f\", \"bluetoothctl\"])\n\n    @property\n    def scanning(self) -> bool:\n        return \"yes\" in ShellIO.execute_lookup([\"bluetoothctl\", \"show\"], \"Discovering\", debug=False)\n\n    @property\n    def controllers(self) -> list[str]:\n        controllers = ShellIO.execute([\"bluetoothctl\", \"list\"], debug=False)\n        return [ctrl.split()[1] for ctrl in controllers]\n\n    @property\n    def devices(self) -> list[BluetoothDevice]:\n        devs = ShellIO.execute([\"bluetoothctl\", \"devices\"], debug=False)\n        return [self._parse_device_info(dev.split()[1]) for dev in devs]\n\n    def trust(self, dev: BluetoothDevice) -> bool:\n        return \"succeeded\" in ShellIO.execute_lookup(\n            [\"bluetoothctl\", \"trust\", dev.mac], \"trust succeeded\"\n        )\n\n    def untrust(self, dev: BluetoothDevice) -> bool:\n        return \"succeeded\" in ShellIO.execute_lookup(\n            [\"bluetoothctl\", \"untrust\", dev.mac], \"untrust succeeded\"\n        )\n\n    def pair(self, dev: BluetoothDevice) -> bool:\n        return \"successful\" in ShellIO.execute_lookup(\n            [\"bluetoothctl\", \"pair\", dev.mac], \"Pairing successful\"\n        )\n\n    def disconnect(self, dev: BluetoothDevice) -> bool:\n        return \"successful\" in ShellIO.execute_lookup(\n            [\"bluetoothctl\", \"disconnect\", dev.mac], \"Disconnection successful\"\n        )\n\n    def connect(self, dev: BluetoothDevice) -> bool:\n        return \"successful\" in ShellIO.execute_lookup(\n            [\"bluetoothctl\", \"connect\", dev.mac], \"Connection successful\"\n        )\n\n    def forget(self, dev: BluetoothDevice) -> bool:\n        return \"removed\" in ShellIO.execute_lookup(\n            [\"bluetoothctl\", \"remove\", dev.mac], \"Device has been removed\"\n        )\n\n\n# returns true if a game is running via the emuelecRunEmu script\ndef is_in_game():\n    return os.path.isfile(\"/tmp/game.running\")\n\n# returns true if another process (not current) is running infinite scan\ndef is_bluetooth_running():\n    out = ShellIO.execute([\"ps\", \"-ef\"], debug=False)\n    for o in out:\n        if \"emuelec-bluetooth -1\" in o:\n            return False if str(os.getpid()) in o else True\n    return False\n\ndef on_device_discovered(dev: BluetoothDevice) -> bool:\n    if DEBUG:\n        print(dev)\n    if dev.blocked:\n        return True\n    \n\n    if (dev.trusted and dev.paired and not dev.connected and bt.connect(dev)):\n        return True\n\n    if (\n        not dev.connected  # exclude already connected devices\n        and dev.rssi != 0  # exclude inactive devices (saved)\n        and \"input-\" in dev.icon  # exclude any non-input device\n    ):\n        print(\n            \"found device {}, mac: {}, icon: {}, paired: {}\".format(\n                dev.name, dev.mac, dev.icon, dev.paired\n            )\n        )\n\n        if bt.trust(dev) and bt.pair(dev) and bt.connect(dev):\n            print(\"connected device {}\".format(dev.name))\n            return False\n        else:\n            bt.forget(dev)\n            print(\"forgot device {}\".format(dev.name))\n    elif (\n        dev.connected and not dev.trusted\n#       and dev.rssi == 0\n#       and \"input-\" in dev.icon\n    ):\n        print(\n            \"trusting and pairing device {}, mac: {}, icon: {}, paired: {}\".format(\n                dev.name, dev.mac, dev.icon, dev.paired\n            )\n        )\n\n        if bt.trust(dev):\n            bt.pair(dev)\n            print(\"connect cable.\")\n\n    return True\n\n\ndef on_device_removed(dev: BluetoothDevice):\n    pass\n\n\nSCAN_TIME = 60\n\n# ELAPSED_TIME = 0\nUPDATE_INTERVAL = 1\n\nBEEN_IN_GAME = False\nBT_THREAD: Process = None\n\nif __name__ == \"__main__\":\n    if len(sys.argv) >= 2:\n        SCAN_TIME = int(sys.argv[1])\n\n    print(\"running scan for \" + str(SCAN_TIME) + \" seconds.\")\n    bt = BluetoothCTL()\n\n    if is_bluetooth_running():\n        print(\"bluetooth is already running, exiting.\")\n        exit()\n\n    if len(bt.controllers) == 0:\n        print(\"no controller found, exiting.\")\n        exit()\n\n    bt.power = True\n    bt.agent = True\n    bt.discoverable = True\n    bt.pairable = True\n\n    start_time = time.perf_counter()\n    while True:\n        diff_time = time.perf_counter() - start_time\n        if SCAN_TIME != -1 and diff_time > SCAN_TIME:\n                exit()\n\n        IS_IN_GAME = is_in_game()\n\n        connected_devs = [dev for dev in bt.devices if dev.connected]\n        if not bt.scanning and (\n            not IS_IN_GAME or len(connected_devs) == 0\n        ):\n            print(\"resuming scan\")\n            BT_THREAD = Process(target=bt.scan_async, args=(SCAN_TIME,))\n            BT_THREAD.start()\n        elif (\n            bt.scanning and IS_IN_GAME and (len(connected_devs) > 0)\n        ):\n            print(\"stopping scan\")\n            if BT_THREAD is not None:\n                BT_THREAD.terminate()\n            bt.scan_stop()\n\n        time.sleep(UPDATE_INTERVAL)\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/emuelec-bluetooth-legacy",
    "content": "#!/usr/bin/python -u\n\n################################################################################\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present Shanti Gilbert (https://github.com/shantigilbert)\n# Modifications made by:\n#   Langerz82 (https://github.com/Langerz82)\n################################################################################\n\n#!/usr/bin/env python\n\nimport time\nfrom bluetool import Bluetooth\n\nif __name__ == \"__main__\":\n    bt = Bluetooth()\n    print('Scanning for available devices for 60 seconds, please wait...')\n    bt.make_discoverable();\n    bt.start_scanning(60)\n    print('Getting pairable devices, please wait...')\n    for x in range(0,10):\n        time.sleep(3)\n        devices = bt.get_available_devices()\n        for device in devices:\n            mac = device['mac_address'].decode('utf-8')\n            name = device['name'].decode('utf-8')\n            print(\"Icon:\"+ str(bt.get_device_property(mac,'Icon')))\n            if ((not bt.get_device_property(mac,'Icon') and bt.get_device_property(mac,'Connected') == 1) or bt.get_device_property(mac,'Icon') == 'input-gaming'):\n                print('Found MAC: {}\\tName: {}'.format(mac,name))\n                if bt.get_device_property(mac,'Trusted') == 1:\n                    continue\n                print('Found controller {} Name: {}, trusting...'.format(mac,name))\n                bt.trust(mac)\n                if bt.get_device_property(mac,'Trusted') == 1:\n                    print('Trusted {}, quick pause, then pairing...'.format(name))\n                    time.sleep(5)\n                    bt.pair(mac)\n                    if bt.get_device_property(mac,'Paired') == 1:\n                        print('Paired {}, quick pause, then connecting...'.format(name))\n                        time.sleep(5)\n                        bt.connect(mac)\n                        if bt.get_device_property(mac,'Connected') == 1:\n                            print('Connected {}, exiting...'.format(name))\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/batocera/emuelec-upgrade",
    "content": "#!/bin/bash\n\ndo_clean() {\n    test -n \"${GETPERPID}\" && kill -9 \"${GETPERPID}\"\n     rm -f \"/storage/.update/*\"\n }\ntrap do_clean EXIT\n\ngetPer() {\n    TARVAL=$1\n  \n    while true\n    do\n    touch \"/storage/.update/${UFILE}\"\n\tCURVAL=$(stat \"/storage/.update/${UFILE}\" | grep -E '^[ ]*Size:' | sed -e s+'^[ ]*Size: \\([0-9][0-9]*\\) .*$'+'\\1'+)\n\tCURVAL=$((${CURVAL} / 1024 / 1024))\n\tPER=$((${CURVAL}*100/${TARVAL}))\n\techo \"downloading >>> ${PER}%\"\n\tsleep 5\n    done\n}\n\nif [ \"$1\" == \"canupdate\" ]; then\navailable=$(updatecheck.sh canupdate)\n\techo \"$available\"\n\tif [[ \"$available\" == \"no\" ]]; then\n\t\texit 12\n\telse\n\t\texit 0\n\tfi\nfi\n\n#Started from Terminal/SSH or from Emulationstation?\n[ -t 1 ] && TERMINAL=1 || TERMINAL=0\n\necho \"starting the upgrade...\"\n\n# download directory\nmkdir -p /storage/.update || exit 1\n\n# get size to download\nurl=$(updatecheck.sh geturl)\nUFILE=${url##*/}\necho \"url: ${url}\"\nsize=$(updatecheck.sh getsize)\nsize=$((size / 1024 / 1024))\necho \"need to download ${size}mB\"\n\n# check free space on fs\n    freespace=$(df -m \"/storage/.update/\" | tail -1 | awk '{print $4}')\n    test $? -eq 0 || exit 1\nif test \"${size}\" -gt \"${freespace}\"; then\n\techo \"Not enough space on ${fs} to download the update\"\n\texit 1\nfi\n\n\n# download\nif [ $TERMINAL = 0 ]; then\n    # Download by EMULATIONSTATION\n    getPer \"${size}\" &\n    GETPERPID=$!\n    curl -sfL \"${url}\" -o \"/storage/.update/${UFILE}\" || exit 1\n    kill -9 \"${GETPERPID}\"\n    GETPERPID=\nelse\n    # Download inside SSH/TERMINAL\n    wget -q \"${url}\" -O \"/storage/.update/${UFILE}\" || exit 1\nfi\n\n# try to download an sha256 checksum\ncurl -sfL \"${url}.sha256\" -o \"/storage/.update/${UFILE}.sha256\"\nif test -e \"/storage/.update/${UFILE}.sha256\"\nthen\n    DISTMD5=$(cat \"/storage/.update/${UFILE}.sha256\" | cut -d ' ' -f 1)\n    CURRMD5=$(sha256sum \"/storage/.update/${UFILE}\" | cut -d ' ' -f 1)\n    if test \"${DISTMD5}\" = \"${CURRMD5}\"\n    then\n\techo \"valid checksum.\"\n    else\n\techo \"invalid checksum. Got +${DISTMD5}+. Attempted +${CURRMD5}+.\"\n\texit 1\n    fi\nelse\n    echo \"no checksum found. don't check the file.\"\nfi\n\n# a sync\nsync\necho \"Done. Please reboot EmuELEC so that the changes take effect!\"\nexit 0\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/bezels.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present SumavisionQ5 (https://github.com/SumavisionQ5)\n# Modifications by Shanti Gilbert (https://github.com/shantigilbert)\n\n. /etc/profile\n\nPLATFORM=\"${1}\"\n\nif [ \"${2}\" != \"default\" ]; then\n    ROMNAME=$(basename \"${2%.*}\")\nfi\nRACONFIG=\"/storage/.config/retroarch/retroarch.cfg\"\nOPACITY=\"1.000000\"\nBEZELDIR=\"/storage/roms/bezels\"\nDEFAULT_BEZEL=\"false\"\nDEFAULT_SCALE=\"true\"\nDEFAULT_RATIO=\"22\"\n\n[ \"${3}\" != \"true\" ] && DEFAULT_SCALE=\"false\"\n[ ! -z \"${4}\" ] && DEFAULT_RATIO=\"${4}\"\n\ncase ${PLATFORM} in\n \"arcade\"|\"fbneo\"|\"fbn\"|\"neogeo\"|\"mame\"|cps*)\n   PLATFORM=\"ARCADE\"\n  ;;\n  \"none\")\n  if [ -f \"/storage/.config/bezels_enabled\" ]; then\n  clear_bezel\n  sed -i '/input_overlay = \"/d' ${RACONFIG}\n  sed -i '/input_overlay_enable = \"/d' ${RACONFIG}\n  rm \"/storage/.config/bezels_enabled\"\n  fi\n   exit 0\n  ;;\n  \"SETUP\")\n  # fbterm does not need bezels\n  exit 0\n  ;;\nesac\n\n if [ ! -f \"/storage/.config/bezels_enabled\" ]; then\n   touch /storage/.config/bezels_enabled\n fi\n\n# we make sure the platform is all lowercase\nPLATFORM=${PLATFORM,,}\n\n# bezelmap.cfg in ${BEZELDIR}/ is to share bezels between arcade clones and parent. \nBEZELMAP=\"/emuelec/configs/bezels/arcademap.cfg\"\nBZLNAME=$(sed -n \"/\"${PLATFORM}\"_\"${ROMNAME}\" = /p\" \"${BEZELMAP}\" 2>/dev/null)\nBZLNAME=\"${BZLNAME#*\\\"}\"\nBZLNAME=\"${BZLNAME%\\\"*}\"\nOVERLAYDIR1=$(find ${BEZELDIR}/${PLATFORM} -maxdepth 1 -iname \"${ROMNAME}*.cfg\" | sort -V | head -n 1)\n[ ! -z \"${BZLNAME}\" ] && OVERLAYDIR2=$(find ${BEZELDIR}/${PLATFORM} -maxdepth 1 -iname \"${BZLNAME}*.cfg\" | sort -V | head -n 1)\nOVERLAYDIR3=\"${BEZELDIR}/${PLATFORM}/default.cfg\"\n\nOVERLAYDIR_ROM=\"/storage/roms/${PLATFORM}/images/${ROMNAME}-bezel.png\"\nOVERLAYDIR_ROM_CFG=\"/storage/roms/${PLATFORM}/images/${ROMNAME}-bezel.cfg\"\n\nclear_bezel() { \n\t\tsed -i '/aspect_ratio_index = \"/d' ${RACONFIG}\n\t\tsed -i '/custom_viewport_width = \"/d' ${RACONFIG}\n\t\tsed -i '/custom_viewport_height = \"/d' ${RACONFIG}\n\t\tsed -i '/custom_viewport_x = \"/d' ${RACONFIG}\n\t\tsed -i '/custom_viewport_y = \"/d' ${RACONFIG}\n\t\tsed -i '/video_scale_integer = \"/d' ${RACONFIG}\n\t\tsed -i '/input_overlay_opacity = \"/d' ${RACONFIG}\n        sed -i '/input_overlay_enable = \"/d' ${RACONFIG}\n\t\techo \"video_scale_integer = \\\"${DEFAULT_SCALE}\\\"\" >> ${RACONFIG}\n\t\techo \"aspect_ratio_index = \\\"${DEFAULT_RATIO}\\\"\" >> ${RACONFIG}\n\t\techo 'input_overlay_opacity = \"0.150000\"' >> ${RACONFIG}\n}\n\nset_bezel() {\n# ${OPACITY}: input_overlay_opacity\n# ${1}: custom_viewport_width \n# ${2}: custom_viewport_height\n# ${3}: ustom_viewport_x\n# ${4}: custom_viewport_y\n# ${5}: video_scale_integer\n# ${6}: aspect_ratio_index\n        clear_bezel\n        sed -i '/input_overlay_opacity = \"/d' ${RACONFIG}\n        sed -i \"1i input_overlay_opacity = \\\"${OPACITY}\\\"\" ${RACONFIG}\n\t\tsed -i \"2i aspect_ratio_index = \\\"${6}\\\"\" ${RACONFIG}\n\t\tsed -i \"3i custom_viewport_width = \\\"${1}\\\"\" ${RACONFIG}\n\t\tsed -i \"4i custom_viewport_height = \\\"${2}\\\"\" ${RACONFIG}\n\t\tsed -i \"5i custom_viewport_x = \\\"${3}\\\"\" ${RACONFIG}\n\t\tsed -i \"6i custom_viewport_y = \\\"${4}\\\"\" ${RACONFIG}\n\t\tsed -i \"7i video_scale_integer = \\\"${5}\\\"\" ${RACONFIG}\n        sed -i \"8i input_overlay_enable = \\\"true\\\"\" ${RACONFIG}\n}\n\ncheck_overlay_dir() {\n# The bezel will be searched and used in following order:\n# 1.${OVERLAYDIR1} will be used, if it does not exist, then\n# 2.${OVERLAYDIR2} will be used, if it does not exist, then\n# 3.${OVERLAYDIR2} platform default bezel as \"${BEZELDIR}/\"${PLATFORM}\"/default.cfg\\\" will be used.\n# 4.Default bezel at \"${BEZELDIR}/default.cfg\\\" will be used.\n\t\n\tsed -i '/input_overlay = \"/d' ${RACONFIG}\n\t\t\n\tif [ -f \"${OVERLAYDIR_ROM}\" ]; then\n        if [ ! -f \"${OVERLAYDIR_ROM_CFG}\" ]; then\n            echo \"overlays = 1\" > \"${OVERLAYDIR_ROM_CFG}\"\n            echo \"overlay0_full_screen = true\" >> \"${OVERLAYDIR_ROM_CFG}\"\n            echo \"overlay0_descs = 0\">> \"${OVERLAYDIR_ROM_CFG}\"\n            echo \"overlay0_overlay = \\\"${OVERLAYDIR_ROM}\\\"\" >> \"${OVERLAYDIR_ROM_CFG}\"\n        fi\n        echo -e \"input_overlay = \\\"\"${OVERLAYDIR_ROM_CFG}\"\\\"\\n\" >> ${RACONFIG}\n\telif [ -f \"${OVERLAYDIR1}\" ]; then\n\t\techo -e \"input_overlay = \\\"\"${OVERLAYDIR1}\"\\\"\\n\" >> ${RACONFIG}\n\telif [ -f \"${OVERLAYDIR2}\" ]; then\n\t\techo -e \"input_overlay = \\\"\"${OVERLAYDIR2}\"\\\"\\n\" >> ${RACONFIG}\n\telif [ -f \"${OVERLAYDIR3}\" ]; then\n\t\techo -e \"input_overlay = \\\"\"${OVERLAYDIR3}\"\\\"\\n\" >> ${RACONFIG}\n\telse\n\t\techo -e \"input_overlay = \\\"${BEZELDIR}/default.cfg\\\"\\n\" >> ${RACONFIG}\n\t\tDEFAULT_BEZEL=\"true\"\n\tfi\n}\n\n# Only 720P and 1080P can use bezels. For 480p/i and 576p/i we just delete bezel config.\nhdmimode=$(get_resolution)\n\nOGA_VER=$(oga_ver)\n\n# This whole section needs to be reworked, specially for Odroid-GO Super, but for now we just force bezels at 720p\nif [ \"${OGA_VER}\" == \"OGS\" ]; then\n    hdmimode=\"OGS\"\nfi\n\ncase ${hdmimode} in\n  *480)\n\tsed -i '/input_overlay = \"/d' ${RACONFIG}\n\tclear_bezel\n  ;;\n  *576)\n\tsed -i '/input_overlay = \"/d' ${RACONFIG}\n\tclear_bezel\n  ;;\n  \"OGS\"|*720)\n\tcheck_overlay_dir \"${PLATFORM}\"\n        case \"${PLATFORM}\" in\n            \"gamegear\")\n                set_bezel \"780\" \"580\" \"245\" \"70\" \"${DEFAULT_SCALE}\" \"${DEFAULT_RATIO}\"\n            ;;\n            \"gb\")\n                set_bezel \"429\" \"380\" \"420\" \"155\" \"${DEFAULT_SCALE}\" \"${DEFAULT_RATIO}\"\n            ;;\n            \"gbc\")\n                set_bezel \"430\" \"380\" \"425\" \"155\" \"${DEFAULT_SCALE}\" \"${DEFAULT_RATIO}\"\n            ;;\n            \"ngp\")\n                set_bezel \"461\" \"428\" \"407\" \"145\" \"${DEFAULT_SCALE}\" \"${DEFAULT_RATIO}\"\n            ;;\n            \"ngpc\")\n                set_bezel \"460\" \"428\" \"407\" \"145\" \"${DEFAULT_SCALE}\" \"${DEFAULT_RATIO}\"\n            ;;\n            \"wonderswan\")\n                set_bezel \"645\" \"407\" \"325\" \"150\" \"${DEFAULT_SCALE}\" \"${DEFAULT_RATIO}\"\n            ;;\n            \"wonderswancolor\")\n                set_bezel \"643\" \"405\" \"325\" \"150\" \"${DEFAULT_SCALE}\" \"${DEFAULT_RATIO}\"\n            ;;\n            *)\n                # delete aspect_ratio_index to make sure video is expanded fullscreen. Only certain handheld platforms need custom_viewport.\n                clear_bezel\n                sed -i '/input_overlay_opacity = \"/d' ${RACONFIG}\n                sed -i \"1i input_overlay_opacity = \\\"${OPACITY}\\\"\" ${RACONFIG}\n            ;;\n        esac\n    ;;\n    *)\n        check_overlay_dir \"${PLATFORM}\"\n        clear_bezel\n        sed -i '/input_overlay_opacity = \"/d' ${RACONFIG}\n        sed -i \"1i input_overlay_opacity = \\\"${OPACITY}\\\"\" ${RACONFIG}\n    ;;\nesac\n\nif [ \"${DEFAULT_BEZEL}\" = \"true\" ] && [ $(oga_ver) != \"OGS\" ]; then\n\tset_bezel \"1427\" \"1070\" \"247\" \"10\" \"${DEFAULT_SCALE}\" \"${DEFAULT_RATIO}\"\nelif [ \"${OGA_VER}\" != \"OGS\" ]; then\n\tset_bezel \"1427\" \"1070\" \"247\" \"10\" \"${DEFAULT_SCALE}\" \"${DEFAULT_RATIO}\"\nfi\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/check_res.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present Langerz82 (https://github.com/Langerz82)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# DO NOT modify this file. \n\n# It seems some slow SDcards have a problem creating the symlink on time :/\nCONFIG_FLASH=\"/flash/config.ini\"\nVIDEO_FILE=\"/storage/.config/EE_VIDEO_MODE\"\nVIDEO_MODE=\"/sys/class/display/mode\"\n\n\n\n# If the video-mode is contained in flash config.\nDEFE=\"\"\n\n# FLASH CONFIG hdmimode takes priority 1.\nif [ -z \"${DEFE}\" ]; then\n  CFG_VAL=$(get_config_value \"${CONFIG_FLASH}\" \"vout\")\n  if [[ ! -z \"${CFG_VAL}\" ]]; then\n    DEFE=\"${CFG_VAL}\"\n  fi\nfi\n\n# Check for EE_VIDEO_MODE override 2nd.\nif [[ -z \"${DEFE}\" && -f \"${VIDEO_FILE}\" ]]; then\n  DEFE=$(cat ${VIDEO_FILE})\nfi\n\n# 3rd check ES for it's preferred resolution.\nif [ -z \"${DEFE}\" ]; then\n  DEFE=$(get_ee_setting ee_videomode)\n  if [ \"${DEFE}\" == \"Custom\" ]; then\n      DEFE=$(cat ${VIDEO_MODE})\n  fi\nfi\n\n# Set video mode, this has to be done before starting ES\n# finally we correct the FB according to video mode\n[[ ! -z \"${DEFE}\" ]] && [[ -f \"${VIDEO_MODE}\" ]] && setres.sh ${DEFE}\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/connectbtwii.sh",
    "content": "# /emuelec/bin/connectbtwii.sh\n#!/bin/sh\n# Wiimote connect for EmuELEC (bluetoothctl-only, multi-scan with re-arm prompts)\n# Copyright (C) 2025 worstcase_scenario (https://github.com/worstcase-scenario)\n\n. /etc/profile\nBTCTL=\"$(command -v bluetoothctl || echo /usr/bin/bluetoothctl)\"\n\n# Tunables\nSCAN_TIMEOUT=\"${SCAN_TIMEOUT:-25}\"     # seconds per scan round\nSCAN_ROUNDS=\"${SCAN_ROUNDS:-4}\"        # how many scan rounds\nREARM_PROMPT=\"${REARM_PROMPT:-1}\"      # prompt to press 1+2 before next round\nREARM_PAUSE=\"${REARM_PAUSE:-3}\"        # seconds to wait after prompt\nCONNECT_TRIES=\"${CONNECT_TRIES:-30}\"   # connect attempts while scan is ON\nSLEEP_STEP=1\n\nlog(){ printf '%s\\n' \"$*\" >&2; }\n\n# Prep\n/usr/bin/systemctl stop eventlircd 2>/dev/null || true\nmodprobe uhid 2>/dev/null || true\nmodprobe hid-wiimote 2>/dev/null || true\nmodprobe hid-nintendo 2>/dev/null || true\n$BTCTL power on       >/dev/null 2>&1 || true\n$BTCTL pairable on    >/dev/null 2>&1 || true\n$BTCTL agent NoInputNoOutput >/dev/null 2>&1 || $BTCTL agent on >/dev/null 2>&1 || true\n$BTCTL default-agent  >/dev/null 2>&1 || true\n\nTMP=\"/tmp/btscan_$$.log\"; rm -f \"$TMP\"\n\npick_mac_round() {\n  # one scan round, append raw output to $TMP, return MAC or empty\n  $BTCTL --timeout \"$SCAN_TIMEOUT\" scan on 2>&1 | tee -a \"$TMP\" >/dev/null\n  awk 'BEGIN{IGNORECASE=1}\n    /Device/ && /(nintendo|wiimote|rvl-cnt)/ {\n      for (i=1;i<=NF;i++)\n        if ($i ~ /^[0-9A-F]{2}(:[0-9A-F]{2}){5}$/) { print $i; exit }\n    }' \"$TMP\" | head -n1\n}\n\n# Multi-scan with re-arm hints\nMAC=\"\"\nround=1\nwhile [ $round -le \"$SCAN_ROUNDS\" ] && [ -z \"$MAC\" ]; do\n  if [ $round -eq 1 ]; then\n    log \"Scanning… hold 1+2 on the Wiimote (round $round/$SCAN_ROUNDS)\"\n  else\n    [ \"$REARM_PROMPT\" = \"1\" ] && log \"Press 1+2 again now… (round $round/$SCAN_ROUNDS)\" && sleep \"$REARM_PAUSE\"\n  fi\n  MAC=\"$(pick_mac_round)\"\n  round=$((round+1))\ndone\n\n[ -n \"$MAC\" ] || { log \"No Wiimote seen by BlueZ.\"; rm -f \"$TMP\"; exit 1; }\nlog \"Target: $MAC\"\n\n# Keep scan ON during connect attempts\n$BTCTL scan on >/dev/null 2>&1 || true\n\n# Clean stale state but keep object if BlueZ just learned it\n$BTCTL disconnect \"$MAC\" >/dev/null 2>&1 || true\n\n# Ensure BlueZ keeps the device object\nfor i in $(seq 1 10); do\n  $BTCTL info \"$MAC\" >/dev/null 2>&1 || true\n  $BTCTL devices | grep -qi \"$MAC\" && break\n  sleep \"$SLEEP_STEP\"\ndone\n\n# Connect loop\n$BTCTL trust \"$MAC\" >/dev/null 2>&1 || true\nok=1\nfor i in $(seq 1 \"$CONNECT_TRIES\"); do\n  $BTCTL connect \"$MAC\" >/dev/null 2>&1 || true\n  sleep \"$SLEEP_STEP\"\n  if $BTCTL info \"$MAC\" | grep -q \"Connected: yes\"; then ok=0; break; fi\ndone\n\n$BTCTL scan off >/dev/null 2>&1 || true\n\nif [ $ok -ne 0 ]; then\n  log \"Connect failed.\"\n  [ -s \"$TMP\" ] && { log \"Scan summary:\"; grep -E 'Device|(\\[NEW\\])' \"$TMP\" | tail -n 20 >&2; }\n  rm -f \"$TMP\"\n  exit 1\nfi\n\n# Finalize\n$BTCTL pair  \"$MAC\" >/dev/null 2>&1 || true\n$BTCTL trust \"$MAC\" >/dev/null 2>&1 || true\n$BTCTL info \"$MAC\" | sed -n '1,60p'\nrm -f \"$TMP\"\nlog \"Wiimote connected.\"\nexit 0\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/emuelec-utils",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nfunction set_rotation()\n{\n  local rotate=$1\n  local emulator=$2\n\n  if [[ \"${emulator}\" == \"libretro\" ]]; then\n\t\tset_ra_setting \"video_rotation\" \"${rotate}\"\n\t\treturn\t\t\n  fi\n\n  if [[ \"${emulator}\" == \"retrorun\" ]]; then\n\t\tif [[ \"${rotate}\" == \"0\" ]]; then\n\t\t\tset_rr_setting \"retrorun_tate_mode\" \"disabled\"\n\t\t\tset_rr_setting \"retrorun_swap_sticks\" \"false\"\n\t\t\techo \" \"\n\t\telse\n\t\t\tset_rr_setting \"retrorun_tate_mode\" \"enabled\"\n\t\t\tset_rr_setting \"retrorun_swap_sticks\" \"true\"\n\t\t\techo \" -z \"\n\t\tfi\n\t\treturn\n\tfi\n}\n\nfunction rotation_output() {\n    local emulator=$1\n    local core=$2\n\n    if [[ \"${emulator}\" == \"libretro\" ]]; then\n        echo \"90 Degrees,180 Degrees,270 Degrees\"\n    fi\n\n    if [[ \"${emulator}\" == \"retrorun\" ]]; then\n        echo \"Tate Mode\"\n    fi\n}\n\nfunction killall_midi()\n{\n\tpkill -9 timidity\n  pkill -9 mt32d\n  pkill -9 fluidsynth\n\t\n}\n\nfunction set_midi_source()\n{\n  local midi_source=$1\n  local midi_emulator=$2\n\n  killall_midi\n\n  [[ \"${midi_emulator}\" == \"retrorun\" ]] && return\n\n  local midi_output=OFF\n  \n  case ${midi_source} in\n    fluidsynth)\n      fluidsynth -is /storage/roms/bios/sc/SC-55.sf2 &\n      sleep 6\n      midi_output=$(cat /proc/asound/seq/clients | grep \"Port   0 : \\\"S\" | cut -d'\"' -f2)\n      ;;\n    timidity)\n      timidity -iA --module 1 &\n      midi_output=\"TiMidity port 0\"\n\t\t\t;;\n    cm32l)\n      mt32d -o 1 -i 24 -f /roms/bios &\n      midi_output=Standard\n      ;;\n    mt32)\n      mt32d -o 2 -i 24 -f /roms/bios &\n      midi_output=Standard\n\t\t\t;;\nesac\n\n  if [[ \"${midi_emulator}\" == \"libretro\" ]]; then\n    set_ra_setting \"midi_output\" \"${midi_output}\"\n  fi\n}\n\nfunction get_filenames_no_ext() {\n\tlocal FN=($( ls -1 $1 | sed -e 's/\\.[^.]*$//' ))\n\tIFS=\",\"\n\techo \"${FN[*]}\"\n}\n\nfunction test() {\n    echo \"success\"\n    exit 1\n}\n\nfunction error() {\n# Displays emuelec.log if there was an error.\n    text_viewer /emuelec/logs/emuelec.log -w -t \"Error! ${2}\" -f 24\n\tshow_splash.sh exit\n}\n\nfunction setauddev() {\n#set audio device out according to emuelec.conf\n    AUDIO_DEVICE=\"${1}\"\n    [ -z \"${AUDIO_DEVICE}\" ] && AUDIO_DEVICE=\"$(get_ee_setting ee_audio_device)\"\n    [[ \"${AUDIO_DEVICE}\" = \"auto\" || -z \"${AUDIO_DEVICE}\" ]] && AUDIO_DEVICE=\"0,0\"\n    sed -i \"s|pcm \\\"hw:.*|pcm \\\"hw:${AUDIO_DEVICE}\\\"|\" /storage/.config/asound.conf\n}\n\nfunction audio() {\n    setauddev;\n    # This has to be expanded to check for new GLX devices running on Amlogic-ng,\n\t# but right now its mostly used on ES to change audio to alsa before launching or else ES hangs on GXL devices.\n   if [[ \"$1\" == \"alsa\" ]]; then\n\t\tset_audio alsa\n   elif [[ \"$1\" == \"pulse\"* ]]; then\n\t\tset_audio pulseaudio\n   else\n\t\tset_audio default\n   fi\n}\n\nfunction clearconfig() {\n# This function resets configurations based on argument 1\n\tcase \"${1}\" in\n\t\"EMUS\")\n        unmount_all\n\t\tsystemctl stop emustation\n\t\tee_backup backup no\n\t\tfind /storage -mindepth 1 \\( ! -regex '^/storage/.config/emuelec/themes.*' -a ! -regex '^/storage/.config/emulationstation/themes.*' -a ! -regex '^/storage/.update.*' -a ! -regex '^/storage/download.*' -a ! -regex '^/storage/roms.*' -a ! -regex '^/storage/.cache/bluetooth.*' \\) -delete\n\t\tmkdir /storage/.config/\n\t\tsync\n        small-cores enable\n\t\tsystemctl reboot\n\t\t;;\n\t\"retroarch\")\n\t\trm -f /storage/.config/retroarch/retroarch.cfg\n\t\tcp -rf /usr/config/retroarch/retroarch.cfg /storage/.config/retroarch/retroarch.cfg\n\t;;\n\t\"ALL\")\n        unmount_all\n\t\tsystemctl stop emustation\n\t\tfind /storage -mindepth 1 \\( ! -regex '^/storage/.config/emuelec/themes.*' -a ! -regex '^/storage/.update.*' -a ! -regex '^/storage/roms.*' -a ! -regex '^/storage/.cache/bluetooth.*' \\) -delete\n\t\tmkdir /storage/.config/\n\t\tsync\n        small-cores enable\n\t\tsystemctl reboot\n\t;;\n\tesac\n}\n\nfunction ee_backup() {\n# Creates a backup of current configurations\n    BACKUPDIR=\"/storage/roms/backup\"\n    BACKUPTAR=\"ee_backup_config.tar.gz\"\n    BACKUPFILE=\"${BACKUPDIR}/${BACKUPTAR}\"\n\n    mkdir -p \"${BACKUPDIR}\"\n\n\tcase \"${1}\" in\n\t\"restore\")\n\t\t[ -z \"${2}\" ] && systemctl stop emustation\n        cd /\n\t\ttar xvf \"${BACKUPFILE}\"\n\t\tsync\n        sleep 3\n        RESTOREDATE=\"$(date +'%m-%d-%Y')_$(uuidgen)\"\n        # Move the backup file instead of deleting it\n        mv \"${BACKUPFILE}\" \"${BACKUPDIR}/restored_${RESTOREDATE}_${BACKUPTAR}\" &\n\t\t[ -z \"${2}\" ] && systemctl start emustation\n\t;;\n\t\"backup\")\n\t\t[ -f \"${BACKUPFILE}\" ] && rm \"${BACKUPFILE}\"\n\t\t[ -z \"${2}\" ] && systemctl stop emustation\n        tar -zcvf \"${BACKUPFILE}\" /storage/.local/share/VVVVVV/* \\\n\t\t\t\t\t  /storage/.cache/bluetooth/* \\\n\t\t\t\t\t  /storage/.cache/timezone \\\n\t\t\t\t\t  /storage/.cache/hostname \\\n\t\t\t\t\t  /storage/.config/scummvm/* \\\n\t\t\t\t\t  /storage/.config/emuelec/configs/* \\\n\t\t\t\t\t  /storage/.emulationstation/es_*.cfg \\\n\t\t\t\t\t  /storage/.emulationstation/themesettings \\\n\t\t\t\t\t  /tmp/joypads/* \\\n\t\t\t\t\t  /storage/.config/retroarch/*.cfg \\\n\t\t\t\t\t  /storage/.config/ppsspp/* \\\n\t\t\t\t\t  /storage/.config/retroarch/config/* \\\n\t\t\t\t\t  /storage/.config/supertux* \\\n\t\t\t\t\t  /storage/.emulationstation/scripts/drastic/config/* \\\n\t\t\t\t\t  /storage/.emulationstation/scripts/drastic/backup/* \\\n\t\t\t\t\t  /storage/.emulationstation/scripts/drastic/savestates/* \\\n\t\t\t\t\t  /storage/.config/emuelec/bin/pico-8/* \\\n        sync\n\t\tsleep 3\n\t\t[ -z \"${2}\" ] && systemctl start emustation\n\t;;\n    esac\n}\n\nfunction ee_cloud_backup() {\n# Creates a cloud backup of current configurations using rclone\n    RCLONECONF=\"/emuelec/configs/rclone/rclone.conf\"\n    EESYNCCFG=\"/emuelec/configs/rclone/ee_cloud_sync.cfg\"\n    \n    if [ -e \"${EESYNCCFG}\" ]; then\n        . \"${EESYNCCFG}\"\n    fi\n    \n    [ -z \"${EE_SYNC_REMOTE}\" ] && EE_SYNC_REMOTE=\"EmuELEC_Remote\"\n    [ -z \"${EE_SYNC_PATH}\" ] && EE_SYNC_PATH=\"EmuELEC_Backup\"\n\n    [ -z \"${2}\" ] && systemctl stop emustation\n    \n    # We need to check if rclone.conf exists and its configured correctly, else show error\n    if [ -e \"${RCLONECONF}\" ]; then\n        # in case this file was created in windows, we need to convert it\n        dos2unix ${RCLONECONF}\n        if ! grep -Fxq \"[${EE_SYNC_REMOTE}]\" ${RCLONECONF}; then\n            text_viewer -e -w -t \"rclone.conf error!\" -f 24 -m \"rclone.conf exist but it does not contain a remote named ${EE_SYNC_REMOTE}, please read https://rclone.org/remote_setup/ name your remote ${EE_SYNC_REMOTE} and copy resulting rclone.conf to /emuelec/configs/rclone/\"\n            systemctl start emustation\n            exit 1;\n        fi\n    else\n        text_viewer -e -w -t \"rclone.conf does not exist!\" -f 24 -m \"rclone.conf does not exist and its required for cloud sync to function! please read https://rclone.org/remote_setup/ and copy resulting rclone.conf to /emuelec/configs/rclone/\"\n        systemctl start emustation\n        exit 1;\n    fi\n        \n   \tcase \"${1}\" in \n    \"backup\")\n        # we first create a regular backup\n        echo \"emuelec-utils ee_backup backup no\" > /tmp/cloud.sh\n        # We sync to EmuELEC_Remote specified in /emuelec/configs/rclone/rclone.conf to EmuELEC_Backup in the remote server\n        echo \"rclone sync /storage/roms/ ${EE_SYNC_REMOTE}:/${EE_SYNC_PATH}/ --filter-from /emuelec/configs/rclone/emuelec-cloud-filter.cfg -P -v --config ${RCLONECONF} 2>&1 | tee /emuelec/logs/cloud-backup.log\" >> /tmp/cloud.sh\n    ;;\n    \"restore\")\n        # We first sync to /storage/roms from EmuELEC_Remote specified in /emuelec/configs/rclone/rclone.conf\n        echo \"rclone sync ${EE_SYNC_REMOTE}:/${EE_SYNC_PATH}/ /storage/roms/ --filter-from /emuelec/configs/rclone/emuelec-cloud-filter.cfg -P -v --config ${RCLONECONF} 2>&1 | tee /emuelec/logs/cloud-backup.log\" > /tmp/cloud.sh\n        # We then restore the backup file (if it exists)\n        echo \"emuelec-utils ee_backup restore no\" >> /tmp/cloud.sh\n    ;;\n\tesac\n    echo \"echo \\\"Done!...Press 'Select' or choose 'Close' to continue!\\\"\" >> /tmp/cloud.sh    \n    chmod +x /tmp/cloud.sh\n    text_viewer -s /tmp/cloud.sh -t \"EmuELEC cloud sync, please wait!...\"\n    rm /tmp/cloud.sh > /dev/null 2>&1\n    \n    if [ \"${1}\" == \"restore\" ]; then \n        systemctl reboot\n    else\n        [ -z \"${2}\" ] && systemctl start emustation\n    fi\n}\n\nfunction filemanager() {\n# runs the file manager script, might be outdated. \n\t/usr/bin/scripts/setup/file_manager.sh\n}\n\nfunction getshaders() {\n# Returns a list of available shaders, mostly used in Emulationstation.\n\tfind /tmp/shaders -name '*.glslp' -print0 |\n\t\twhile IFS= read -r -d '' line; do\n\t\techo ${line#/tmp/shaders/},\n\tdone\n}\n\nfunction getip() {\n# returns current IP Address\nIP=\"$(ifconfig wlan0 | grep 'inet addr' | cut -d: -f2 | awk '{print $1}')\"\n\n  if [ -z \"$IP\" ]; then\n\t IP=\"$(ifconfig eth0 | grep 'inet addr' | cut -d: -f2 | awk '{print $1}')\"\n  fi\n\n if [ -z \"$IP\" ]; then\n\techo \"No Internet\"\n else\n\techo \"${IP}\"\n\techo \"${IP}\" > /emuelec/ip.txt\n fi\n}\n\nfunction dimensions() {\n\n\tDIMENSIONS=()\n\n\tlocal FILEPATH=\"/emuelec/configs/dimensions.conf\"\n\n\t[[ ! -f \"$FILEPATH\" ]] && cp /usr/config/emuelec/configs/dimensions.conf /emuelec/configs\n\n  # Screen supported dimensions\n  SCREEN_DIMENSIONS=`/usr/bin/cat \"$FILEPATH\"`\n  for SD in $SCREEN_DIMENSIONS\n  do\n    DIMENSIONS+=($SD)\n  done\n\n  DIMENSIONS=($(printf \"%s\\n\" \"${DIMENSIONS[@]}\" | sort -u))\n\n\tIFS=\",\"\n\techo \"${DIMENSIONS[*]}\"\n}\n\nfunction midi_output() {\n\tlocal emulator=$1\n\tlocal core=$2\n\n\techo \"fluidsynth,mt32,cm32l,timidity\"\n}\n\nfunction resolutions() {\n# Returns a list of supported resolutions depending on device\n\tRESOLUTIONS=()\n\n  if [ -f \"/storage/LEGACY_RESOLUTIONS\" ]; then\n    # N2 supported resolutions source : https://wiki.odroid.com/odroid-n2/application_note/software/set_display_mode\n    N2_SUPPORTED_RESOLUTIONS=\"480x320p60hz 640x480p60hz 720x480p60hz 720x576p50hz 800x480p60hz 1024x600p60hz 1024x768p60hz 1280x1024p60hz 1280x720p50hz 1280x720p60hz 1280x800p60hz 1360x768p60hz 1440x900p60hz 1600x1200p60hz 1600x900p60hz 1680x1050p60hz 1920x1080p24hz 1920x1080p30hz 1920x1080p50hz 1920x1080p60hz 1920x1200p60hz 2560x1080p60hz 2560x1440p60hz 2560x1600p60hz 3440x1440p60hz 3840x2160p24hz 3840x2160p25hz 3840x2160p30hz 3840x2160p50hz 3840x2160p60hz\"\n\n    # Screen supported resolutions\n    SCREEN_SUPPORTED_RESOLUTIONS=`/usr/bin/cat /sys/class/amhdmitx/amhdmitx0/rawedid | /usr/bin/edid-decode |/usr/bin/grep \"@\" | sed -E \"s| {0,9}VIC {0,9}[0-9]{1,2}||\" | /usr/bin/awk '{print $1}' | /usr/bin/sed  's/@/p/g'|/usr/bin/tr '[:upper:]' '[:lower:]'`\n\n    for N2SP in $N2_SUPPORTED_RESOLUTIONS\n    do\n      for SSR in $SCREEN_SUPPORTED_RESOLUTIONS\n      do\n        if [ \"$N2SP\" = \"$SSR\" ]\n        then\n          RESOLUTIONS+=($N2SP)\n        fi\n      done\n    done\n  fi\n\n  if [[ \"$EE_PROJECT\" == \"Rockchip\" ]]; then\n    SCREEN_SUPPORTED_RESOLUTIONS=`/usr/bin/cat /sys/class/display/display0.HDMI/modes | sort -u`\n    for SSR in $SCREEN_SUPPORTED_RESOLUTIONS\n    do\n      RESOLUTIONS+=($SSR)\n    done\n  else\n    # Screen supported resolutions\n    SCREEN_SUPPORTED_RESOLUTIONS=`/usr/bin/cat /sys/class/display/cap | sed '/smpte/d' | sed '/pal/d' | sed '/ntsc/d' | sed 's/\\*//' | grep -E '[0-9x]+[pi][56]0hz|cvbs'`\n    for SSR in $SCREEN_SUPPORTED_RESOLUTIONS\n    do\n      RESOLUTIONS+=($SSR)\n    done\n  fi\n\n  if [ \"$EE_DEVICE\" == \"OdroidGoAdvance\" ]; then\n    RESOLUTIONS+=(\"480x320p60hz\")\n  fi\n\n\t[[ ! ${RESOLUTIONS[@]} == *\"640x480p60hz\"* ]] && RESOLUTIONS+=(\"640x480p60hz\")\n\t[[ ! ${RESOLUTIONS[@]} == *\"480i60hz\"* ]] && RESOLUTIONS+=(\"480i60hz\")\n\n\tlocal FILEPATH=\"/emuelec/configs/resolutions_amlogic.conf\"\n\tif [[ \"$DEVICE\" == \"Rockchip\" ]]; then\n\t\tFILEPATH=\"/emuelec/configs/resolutions_rockchip.conf\"\n\tfi\n\n\tif [[ -f \"$FILEPATH\" ]]; then\n\t  SCREEN_SUPPORTED_RESOLUTIONS=`/usr/bin/cat \"$FILEPATH\"`\n\t  for SSR in $SCREEN_SUPPORTED_RESOLUTIONS\n\t  do\n\t    RESOLUTIONS+=($SSR)\n\t  done\n\tfi\n\n  RESOLUTIONS=($(printf \"%s\\n\" \"${RESOLUTIONS[@]}\" | sort -u))\n\n\tIFS=\",\"\n\techo \"${RESOLUTIONS[*]}\"\n}\n\nfunction current_timezone() {\n# Returns the current timezone\n\treadlink -f /etc/localtime | sed 's;/usr/share/zoneinfo/;;'\n}\n\nfunction timezones() {\n# Returns a list of timezones, used in ES\n\tcat /usr/share/zoneinfo/zone1970.tab | grep -v \"^#\" | awk '{ print $3\",\" }' | sort -u\n}\n\nfunction small-cores() {\n\tSCF=$(get_ee_setting ee_scf)\n\t[ \"${SCF}\" != \"1\" ] && return 0\n \t\n# Switch the small cores on the N2 on and off, we mostly have them off as the small cores are slower.\n    if grep -q \"g12b\" /proc/device-tree/compatible; then\n        case \"$1\" in\n        \"enable\")\n            echo \"1\" > /sys/devices/system/cpu/cpu0/online\n            echo \"1\" > /sys/devices/system/cpu/cpu1/online\n        ;;\n        \"disable\")\n            echo \"0\" > /sys/devices/system/cpu/cpu0/online\n            echo \"0\" > /sys/devices/system/cpu/cpu1/online\n        ;;\n        esac\n    fi\n}\n\nfunction unmount_all () {\n    if /usr/bin/busybox mountpoint -q /emuelec/themes ; then\n        umount /emuelec/themes > /dev/null 2>&1\n    fi\n\n    if /usr/bin/busybox mountpoint -q /storage/roms ; then\n        umount /storage/roms > /dev/null 2>&1\n    fi\n    \n    if /usr/bin/busybox mountpoint -q /storage/roms/ports_scripts ; then\n        umount /storage/roms/ports_scripts > /dev/null 2>&1\n    fi\n    \n}\n\nfunction createMultidisc() {\n# Creates a multidisc m3u file, used in ES. \n  local ROMNAME=\"$1\"\n\n  local BASEROMNAME=\"${ROMNAME##*/}\"\n  local BASEFOLDER=\"$(dirname \"${ROMNAME}\")\"\n  local ROMEXT=\"${BASEROMNAME##*.}\"\n  local ROMNAME_NOEXT=\"${BASEROMNAME%.*}\"\n\n  [[ \"$ROMEXT\" == \"m3u\" ]] && echo -e \"\\n\" && return\n\n  if [[ \"${ROMNAME_NOEXT,,}\" =~ ^.*disc[[:space:]]*1.*$ ]]; then\n      local M3U_FILE=$(echo \"${ROMNAME_NOEXT}\" | sed -nE \"s/(.*)(disc *)1(.*)/\\1 DISCS \\3/pi\")\n      M3U_FILE=$(echo \"${BASEFOLDER}/${M3U_FILE}.m3u\")\n      [[ -f \"${M3U_FILE}\" ]] && echo -e \"\\n\" && return\n\n      touch \"${M3U_FILE}\"\n      local HAS_SEQ=0\n      local REGEX=$( echo \"${ROMNAME_NOEXT}\" | sed -nE \"s/(.*)(disc*)\\s*[0-9](.*)/\\1\\2\\3/pi\" \\\n        | sed -e 's/\\[[^][]*\\]//g' | sed -e 's/([^()]*)//g' | sed -e 's/\\s+/ /' \\\n        | awk '{$1=$1};1' )\n      REGEX=$( echo \".*${REGEX}.*\" )\n      local FILES=$( ls \"${BASEFOLDER}/\"* | grep \".${ROMEXT}\" | grep -E \"${REGEX}\" | sort )\n      IFS=$'\\n'\n      local ITER=0\n      for item in $FILES\n      do\n        echo \"${item}\" >> \"$M3U_FILE\"\n        ((ITER++))\n      done\n      if [[ \"$ITER\" -gt \"1\" ]]; then\n        echo -e \"${M3U_FILE}\"\n      else\n        rm \"${M3U_FILE}\"\n      fi\n  fi\n  echo -e \"\\n\"\n}\n\nfunction blank_buffer() {\n# Clears screen buffer\n  # Blank the buffer.\n  dd if=/dev/zero of=/dev/fb0 bs=256K conv=sync,noerror,notrunc > /dev/null 2>&1\n  dd if=/dev/zero of=/dev/fb1 bs=256K conv=sync,noerror,notrunc > /dev/null 2>&1\n}\n\nfunction init_app_video() {\n\tlocal PLATFORM=$1\n\tlocal ROMNAME=$2\n\tlocal BASEROMNAME=${ROMNAME##*/}\n\n\t[[ -f \"/tmp/EE_LASTVIDEO\" ]] && return\n\n  blank_buffer\n\n\tif [[ \"${PLATFORM}\" == \"ports\" ]] && [[ \"${BASEROMNAME}\" == \"PortMaster.sh\" ]]; then\n\t\treturn\n\tfi\n\t\n  if [[ \"${PLATFORM}\" == \"setup\" ]]; then \n\t\treturn\n\tfi\n\n\techo \"$(cat /sys/class/display/mode)\" > /tmp/EE_LASTVIDEO\n\tlocal VIDEO_EMU=$(get_ee_setting nativevideo \"${PLATFORM}\" \"${BASEROMNAME}\")\n\t[[ -z \"$VIDEO_EMU\" ]] && VIDEO_EMU=$(cat /tmp/EE_LASTVIDEO)\n\n\t# Set the display video to that of the emulator setting.\n\t[ ! -z \"${VIDEO_EMU}\" ] && ${TBASH} setres.sh \"${VIDEO_EMU}\" \"${PLATFORM}\" \"${BASEROMNAME}\" # set display\n\n\t# Show splash screen if enabled\n\tlocal SPL=$(get_ee_setting ee_splash.enabled)\n\t[ \"${SPL}\" -eq \"1\" ] && ${TBASH} show_splash.sh gameloading \"${PLATFORM}\" \"${ROMNAME}\"\n\n  if [[ \"${PLATFORM}\" == \"ports\" ]]; then\n    fbfix $( emuelec-utils getmainfb )\n  fi\n}\n\nfunction end_app_video() {\n\tlocal PLATFORM=$1\n\tlocal ROMNAME=$2\n\tlocal BASEROMNAME=${ROMNAME##*/}\n\n  [[ ! -f \"/tmp/EE_LASTVIDEO\" ]] && return\n\n\tif [[ \"${PLATFORM}\" == \"ports\" ]] && [[ \"${BASEROMNAME}\" == \"PortMaster.sh\" ]]; then \n\t\treturn\n\tfi\n\t\n\tif [[ \"${PLATFORM}\" == \"setup\" ]]; then \n\t\treturn\n\tfi\n\n  blank_buffer\n\n\tlocal LAST_VIDEO=\"$(cat /tmp/EE_LASTVIDEO)\"\n\n\t# Return to default mode\n\t${TBASH} setres.sh ${LAST_VIDEO}\n\n\t# Show exit splash\n\t${TBASH} show_splash.sh exit\n\n\tblank_buffer\n\n\t[[ -f \"/tmp/EE_LASTVIDEO\" ]] && rm /tmp/EE_LASTVIDEO\n}\n\nfunction getmainfb() {\n  local max_area=0\n  local max_fb=0\n  for fb in /sys/class/graphics/fb*/virtual_size; do\n      if [ -f \"$fb\" ]; then\n          local fb_num=$(echo \"$fb\" | grep -o 'fb[0-9]*' | sed 's/fb//')\n          local size=$(cat \"$fb\")\n          local width=$(echo \"$size\" | cut -d',' -f1)\n          local height=$(echo \"$size\" | cut -d',' -f2)\n          local area=$((width * height))\n\n          if [ $area -gt $max_area ]; then\n              max_area=$area\n              max_fb=$fb_num\n          fi\n      fi\n  done\n  echo $max_fb\n}\n\nfunction set_gptokeyb() {\n\tlocal default=$1\n\tlocal gptokeyb=$2\n\n\t[[ -z \"${gptokeyb}\" ]] && gptokeyb=$default\n\n\tlocal kbfile=\"/emuelec/configs/gptokeyb/${gptokeyb}.gptk\"\n\n\tif [[ ! -f \"$kbfile\" ]]; then\n\t\techo -e \"\\n\" && return\n\tfi\n\n\techo \"-c ${kbfile}\"\n}\n\ncmd=${1}\nshift\n$cmd \"$@\"\n\nexit 0\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/emuelecRunApp.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2024-present Langerz82 (https://github.com/Langerz82)\n\n# Source predefined functions and variables\n. /etc/profile\n\narguments=\"$@\"\n\n# Extract the platform name from the arguments\nPLATFORM=\"${arguments##*-P}\"  # read from -P onwards\nPLATFORM=\"${PLATFORM%% *}\"  # until a space is found\n\nROMNAME=\"${1}\"\n\nRUNEMU=$(echo \"${1}\" | grep \"^emuelecRunEmu.sh\")\n\ninit_game\n[[ -z \"${RUNEMU}\" ]] && emuelec-utils init_app_video \"${PLATFORM}\" \"${ROMNAME}\"\n\n\"$@\"\n\n[[ -z \"${RUNEMU}\" ]] && emuelec-utils end_app_video \"${PLATFORM}\" \"${ROMNAME}\"\nend_game\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/emuelecRunEmu.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# This whole file has become very hacky, I am sure there is a better way to do all of this, but for now, this works.\n\nif [ -f \"/usr/bin/odroidgoa_utils.sh\" ]; then\n    DEFBRIGHT=$(get_ee_setting brightness.level)\n    RACONF=/storage/.config/retroarch/retroarch.cfg\n    sed -i \"/screen_brightness/d\" ${RACONF}\n    echo \"screen_brightness = \\\"${DEFBRIGHT}\\\"\" >> ${RACONF}\nfi\n\nBTENABLED=$(get_ee_setting ee_bluetooth.enabled)\n\nif [[ \"${BTENABLED}\" == \"1\" ]]; then\n        # We don't need the BT agent while running games\n    systemctl stop bluetooth-agent\nfi\n\n# clear terminal window\n        clear > /dev/tty < /dev/null 2>&1\n        clear > /dev/tty0 < /dev/null 2>&1\n        clear > /dev/tty1 < /dev/null 2>&1\n        clear > /dev/console < /dev/null 2>&1\n\narguments=\"$@\"\n\nemuelec-utils setauddev\n\n# set audio to alsa\nset_audio alsa\n\n# Set the variables\nCFG=\"/storage/.emulationstation/es_settings.cfg\"\nLOGEMU=\"No\"\nVERBOSE=\"\"\nLOGSDIR=\"/emuelec/logs\"\nTBASH=\"/usr/bin/bash\"\nRACONF=\"/storage/.config/retroarch/retroarch.cfg\"\nNETPLAY=\"No\"\nRABIN=\"retroarch\"\n\ninit_game\n\n# Make sure the /emuelec/logs directory exists\nif [[ ! -d \"${LOGSDIR}\" ]]; then\n    mkdir -p \"${LOGSDIR}\"\nfi\n\nUSELOG=\"1\"\nLOGLEVEL=$(get_ee_setting \"retroarchLogging\" \"global\")\nif [[ ${arguments} == *\"--NOLOG\"* ]] || [[ \"${LOGLEVEL}\" == \"0\" ]]; then\n  USELOG=\"0\"\nfi\n\nif [ \"${USELOG}\" == \"0\" ]; then\n    EMUELECLOG=\"/dev/null\"\n    cat /etc/motd > \"${LOGSDIR}/emuelec.log\"\n    echo \"Logging has been disabled, enable it in Main Menu > System Settings > Developer > Log Level\" >> \"${LOGSDIR}/emuelec.log\"\nelse\n    EMUELECLOG=\"${LOGSDIR}/emuelec.log\"\nfi\n\nset_kill_keys() {\n    # If gptokeyb is running we kill it first.\n    kill_video_controls\n    KILLTHIS=${1}\n    KILLSIGNAL=${2}\n}\n\n# Extract the platform name from the arguments\nPLATFORM=\"${arguments##*-P}\"  # read from -P onwards\nPLATFORM=\"${PLATFORM%% *}\"  # until a space is found\n\nCORE=\"${arguments##*--core=}\"  # read from --core= onwards\nCORE=\"${CORE%% *}\"  # until a space is found\n\nEMULATOR=\"${arguments##*--emulator=}\"  # read from --emulator= onwards\nEMULATOR=\"${EMULATOR%% *}\"  # until a space is found\n\nROMNAME=\"${1}\"\nBASEROMNAME=\"${ROMNAME##*/}\"\nGAMEFOLDER=\"${ROMNAME//${BASEROMNAME}}\"\n\nKILLTHIS=\"none\"\nKILLSIGNAL=\"15\"\n\nif [[ \"${CORE}\" == *\"_32b\"* ]]; then\n    BIT32=\"yes\"\n    #LD_LIBRARY_PATH=\"/emuelec/lib32:${LD_LIBRARY_PATH}\"\n    RABIN=\"retroarch32\"\nelse\n    BIT32=\"No\"\nfi\n\nif [[ \"${EMULATOR}\" = \"libretro\" ]]; then\n    [[ -f \"/storage/.config/RA_KILL_KEYS\" ]] && set_kill_keys \"${RABIN}\"\n    EMU=\"${CORE}_libretro\"\n    LIBRETRO=\"yes\"\n    RETRORUN=\"\"\nelse\n        EMU=\"${CORE}\"\nfi\n\nif [[ \"${EMULATOR}\" = \"retrorun\" ]]; then\n                RR_EXE=\"retrorun\"\n                [[ \"${BIT32}\" == \"yes\" ]] && RR_EXE=\"retrorun32\"\n                set_kill_keys \"${RR_EXE}\"\n    EMU=\"${CORE}_libretro\"\n    RETRORUN=\"yes\"\n    LIBRETRO=\"\"\nfi\n\nROTATION_OUTPUT=$(get_ee_setting \"${EMULATOR}.rotation_output\" \"${PLATFORM}\" \"${BASEROMNAME}\")\n[[ -z \"${ROTATION_OUTPUT}\" ]] && ROTATION_OUTPUT=0\nCMD_ROTATE=$(emuelec-utils set_rotation \"${ROTATION_OUTPUT}\" \"${EMULATOR}\")\n\nMIDI_OUTPUT=$(get_ee_setting \"ra_midi_output\" \"${PLATFORM}\" \"${BASEROMNAME}\")\nif [[ ! -z \"${MIDI_OUTPUT}\" ]]; then\n\t\temuelec-utils set_midi_source \"${MIDI_OUTPUT}\" \"${EMULATOR}\"\nfi\n\n# freej2me needs the JDK to be downloaded on the first run\nif [ ${EMU} == \"freej2me_libretro\" ]; then\nfreej2me.sh\n\nJAVA_HOME='/storage/roms/bios/jdk'\nexport JAVA_HOME\nPATH=\"${JAVA_HOME}/bin:${PATH}\"\nexport PATH\n\nfi\n\n# Ports that use this file are all Libretro, so lets set it\n[[ ${PLATFORM} = \"ports\" ]] && LIBRETRO=\"yes\"\n\n# if there wasn't a --NOLOG included in the arguments, enable the emulator log output. TODO: this should be handled in ES menu\nif [ \"${USELOG}\" == \"1\" ]; then\n    LOGEMU=\"Yes\"\n    VERBOSE=\"-v\"\nfi\n\n# Get the latest save files if there is any\nCLOUD_SYNC=$(get_ee_setting \"${PLATFORM}.cloudsave\")\n[[ \"${CLOUD_SYNC}\" == \"1\" ]] && ra_rclone.sh get \"${PLATFORM}\" \"${ROMNAME}\" &\nCLOUD_PID=$!\n\nemuelec-utils init_app_video \"${PLATFORM}\" \"${ROMNAME}\"\n\nCONTROLLERCONFIG=\"${arguments#*--controllers=*}\"\necho \"${CONTROLLERCONFIG}\" | tr -d '\"' > \"/tmp/controllerconfig.txt\"\n\n# .bighard files always go to BigInstinct, regardless of platform/emu choice\nif [[ \"${ROMNAME,,}\" == *.bighard ]]; then\n    set_kill_keys \"biginstinct\"\n    RUNTHIS='${TBASH} biginstinctstart.sh \"${ROMNAME}\"'\n\nelif [ -z ${LIBRETRO} ] && [ -z ${RETRORUN} ]; then\n\nGPTOKEYB=$(get_ee_setting \"gptokeyb\" \"${PLATFORM}\" \"${BASEROMNAME}\")\nVIRTUAL_KB=\n\n# Read the first argument in order to set the right emulator\ncase ${PLATFORM} in\n        \"atari2600\")\n                if [ \"${EMU}\" = \"STELLASA\" ]; then\n            set_kill_keys \"stella\"\n            RUNTHIS='${TBASH} stella.sh \"${ROMNAME}\"'\n                fi\n                ;;\n        \"atarist\")\n                if [ \"${EMU}\" = \"HATARISA\" ]; then\n            set_kill_keys \"hatari\"\n            RUNTHIS='${TBASH} hatari.start \"${ROMNAME}\"'\n                fi\n                ;;\n\t\t\"atarijaguar\")\n                if [ \"${EMU}\" = \"bigpemu\" ]; then\n\t\t\t\tset_kill_keys \"bigpemu\"\n\t\t\t\tRUNTHIS='${TBASH} bigpemustart.sh \"${ROMNAME}\"'\n                fi\n                ;;\t\n\t\t\"atarijaguarcd\")\n                if [ \"${EMU}\" = \"bigpemu\" ]; then\n\t\t\t\tset_kill_keys \"bigpemu\"\n\t\t\t\tRUNTHIS='${TBASH} bigpemustart.sh \"${ROMNAME}\"'\n                fi\n                ;;\t\n        \"openbor\")\n                VIRTUAL_KB=$(emuelec-utils set_gptokeyb \"${PLATFORM}\" \"${GPTOKEYB}\")\n                set_kill_keys \"${EMU}\"\n                RUNTHIS='${TBASH} openbor.sh \"${ROMNAME}\" \"${EMU}\"'\n                ;;\n        \"ikemen\")\n\t\tif [ \"$EMU\" = \"ikemen\" ]; then\n            set_kill_keys \"Ikemen_Go\"\n            RUNTHIS='${TBASH} Ikemen_Go.sh \"${ROMNAME}\"'\n        fi\n               ;;\n        \"setup\")\n        if [ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${EE_DEVICE}\" == \"GameForce\" ]; then\n            set_kill_keys \"kmscon\"\n        else\n            set_kill_keys \"fbterm\"\n        fi\n                RUNTHIS='${TBASH} fbterm.sh \"${ROMNAME}\"'\n                EMUELECLOG=\"${LOGSDIR}/ee_script.log\"\n                ;;\n        \"dreamcast\"|\"naomi\"|\"atomiswave\")\n                if [ \"${EMU}\" = \"flycastsa\" ]; then\n            set_kill_keys \"flycast\"\n            RUNTHIS='${TBASH} flycast.sh \"${ROMNAME}\"'\n                elif [ \"${EMU}\" = \"flycast_dojo\" ]; then\n            set_kill_keys \"flycastdojo\"\n            RUNTHIS='flycastdojo.sh \"${ROMNAME}\"'\n                fi\n                ;;\n        \"psx\")\n                if [ \"${EMU}\" = \"duckstation\" ]; then\n            set_kill_keys \"duckstation-nogui\"\n            RUNTHIS='${TBASH} duckstation.sh \"${ROMNAME}\"'\n        fi\n                ;;\n        \"mame\"|\"arcade\"|\"cps1\"|\"cps2\"|\"cps3\")\n                if [ \"${EMU}\" = \"AdvanceMame\" ]; then\n            set_kill_keys \"advmame\" 3\n            RUNTHIS='${TBASH} advmame.sh \"${PLATFORM}\" \"${ROMNAME}\"'\n                elif [ \"${EMU}\" = \"FbneoSA\" ]; then\n            set_kill_keys \"fbneo\"\n            RUNTHIS='fbneo.sh \"${ROMNAME}\"'\n                fi\n                ;;\n        \"fbn\"|\"neogeo\")\n        if [ \"${EMU}\" = \"FbneoSA\" ]; then\n            set_kill_keys \"fbneo\"\n            RUNTHIS='fbneo.sh \"${ROMNAME}\"'\n                fi\n                ;;\n        \"nds\")\n                set_kill_keys \"drastic\"\n                RUNTHIS='${TBASH} /storage/.emulationstation/scripts/drastic.sh \"${ROMNAME}\"'\n                ;;\n        \"n64\")\n                if [ \"${EMU}\" = \"rice\" ]; then\n            set_kill_keys \"mupen64plus\"\n            RUNTHIS='${TBASH} m64p.sh \"${ROMNAME}\"'\n                elif [ \"${EMU}\" = \"glide64mk2\" ]; then\n            set_kill_keys \"mupen64plus\"\n            RUNTHIS='${TBASH} m64p.sh \"${ROMNAME}\" m64p_gl64mk2'\n        fi\n                ;;\n        \"amiga\"|\"amigacd32\")\n                if [ \"${EMU}\" = \"AMIBERRY-LITE\" ] || [ \"${EMU}\" = \"AMIBERRY\" ]; then\n            RUNTHIS='${TBASH} amiberry.start \"${ROMNAME}\" \"${EMU}\"'\n                fi\n                ;;\n        \"scummvm\")\n                if [[ \"${ROMNAME}\" == *\".sh\" ]]; then\n            set_kill_keys \"fbterm\"\n            RUNTHIS='${TBASH} fbterm.sh \"${ROMNAME}\"'\n            EMUELECLOG=\"${LOGSDIR}/ee_script.log\"\n                else\n                if [ \"${EMU}\" = \"SCUMMVMSA\" ]; then\n            set_kill_keys \"scummvm\"\n            RUNTHIS='${TBASH} scummvm.start sa \"${ROMNAME}\"'\n                else\n            RUNTHIS='${TBASH} scummvm.start libretro'\n                fi\n                fi\n                ;;\n        \"solarus\")\n                set_kill_keys \"solarus-run\"\n                RUNTHIS='${TBASH} solarus.sh \"${ROMNAME}\"'\n                ;;\n\t\t\"ti99\")\n                if [ \"${EMU}\" = \"ti99sim\" ]; then\n\t\t\t\tset_kill_keys \"ti99sim-sdl\"\n\t\t\t\tRUNTHIS='${TBASH} ti99sdlstart.sh \"${ROMNAME}\"'\n                fi\n                ;;\t\n\t\t\"samcoupe\")\n                if [ \"${EMU}\" = \"simcoupe\" ]; then\n\t\t\t\tset_kill_keys \"simcoupe\"\n\t\t\t\tRUNTHIS='${TBASH} simcoupestart.sh \"${ROMNAME}\"'\n                fi\n                ;;\t\n        \"daphne\")\n                if [ \"${EMU}\" = \"HYPSEUS\" ]; then\n            set_kill_keys \"hypseus\"\n            RUNTHIS='${TBASH} hypseus.start.sh \"${ROMNAME}\"'\n                fi\n                ;;\n        \"wii\"|\"gamecube\")\n                if [ \"${EMU}\" = \"dolphin\" ]; then\n            set_kill_keys \"dolphin-emu-nogui\"\n            RUNTHIS='${TBASH} dolphin.sh \"${ROMNAME}\"'\n                fi\n                ;;\n        \"pc\")\n                if [ \"${EMU}\" = \"DOSBOXSDL2\" ]; then\n            set_kill_keys \"dosbox\"\n            RUNTHIS='${TBASH} dosbox.start \"${ROMNAME}\"'\n            #RUNTHIS='${TBASH} dosbox.start -conf \"${GAMEFOLDER}dosbox-SDL2.conf\"'\n                fi\n                if [ \"${EMU}\" = \"DOSBOX-X\" ]; then\n            set_kill_keys \"dosbox-x\"\n            RUNTHIS='${TBASH} dosbox-x.start \"${ROMNAME}\"'\n            #RUNTHIS='${TBASH} dosbox-x.start -conf \"${GAMEFOLDER}dosbox-SDL2.conf\"'\n                fi\n                ;;\n        \"psp\"|\"pspminis\")\n                if [ \"${EMU}\" = \"PPSSPPSDL\" ]; then\n            set_kill_keys \"PPSSPPSDL\"\n            RUNTHIS='${TBASH} ppsspp.sh \"${ROMNAME}\"'\n                fi\n                ;;\n\t\t\"ngage\")\n\t\tif [ \"$EMU\" = \"eka2l1\" ]; then\n            set_kill_keys \"eka2l1\"\n            RUNTHIS='${TBASH} ekastart.sh \"${ROMNAME}\"'\n        fi\n               ;;\n        \"neocd\")\n                if [ \"${EMU}\" = \"fbneo\" ]; then\n            RUNTHIS='${RABIN} ${VERBOSE} -L /tmp/cores/fbneo_libretro.so --subsystem neocd --config ${RACONF} \"${ROMNAME}\"'\n                elif [ \"${EMU}\" = \"FbneoSA\" ]; then\n            set_kill_keys \"fbneo\"\n            RUNTHIS='fbneo.sh \"${ROMNAME}\" NCD'\n                fi\n                ;;\n        \"mplayer\")\n                set_kill_keys \"${EMU}\"\n                RUNTHIS='${TBASH} fbterm.sh mplayer_video \"${ROMNAME}\" \"${EMU}\"'\n                ;;\n        \"pico8\")\n                set_kill_keys \"pico8_dyn\"\n                RUNTHIS='${TBASH} pico8.sh \"${ROMNAME}\"'\n                        ;;\n        \"prboom\")\n        if [ \"${EMU}\" = \"Chocolate-Doom\" ]; then\n            set_kill_keys \"chocolate-doom\"\n            CONTROLLERCONFIG=\"${arguments#*--controllers=*}\"\n            RUNTHIS='${TBASH} chocodoom.sh \"${ROMNAME}\" --controllers=\"${CONTROLLERCONFIG}\"'\n        elif [ \"${EMU}\" = \"LZDoom\" ]; then\n            set_kill_keys \"lzdoom\"\n            CONTROLLERCONFIG=\"${arguments#*--controllers=*}\"\n            RUNTHIS='${TBASH} lzdoom.sh \"${ROMNAME}\" --controllers=\"${CONTROLLERCONFIG}\"'\n        elif [ \"${EMU}\" = \"GZDoom\" ]; then\n            set_kill_keys \"gzdoom\"\n            CONTROLLERCONFIG=\"${arguments#*--controllers=*}\"\n            RUNTHIS='${TBASH} gzdoom.sh \"${ROMNAME}\" --controllers=\"${CONTROLLERCONFIG}\"'\n        fi\n        ;;\n        \"ecwolf\")\n        if [ \"${EMU}\" = \"ecwolf\" ]; then\n            set_kill_keys \"ecwolf\"\n            CONTROLLERCONFIG=\"${arguments#*--controllers=*}\"\n            RUNTHIS='${TBASH} ecwolf.sh \"${ROMNAME}\" --controllers=\"${CONTROLLERCONFIG}\"'\n        fi\n        ;;\n        \"gmloader\")\n            set_kill_keys \"gmloader\"\n            CONTROLLERCONFIG=\"${arguments#*--controllers=*}\"\n            RUNTHIS='${TBASH} gmloader.sh \"${ROMNAME}\" --controllers=\"${CONTROLLERCONFIG}\"'\n        ;;\n        \"intellivision\")\n        if [ \"${EMU}\" = \"jzintv\" ]; then\n            set_kill_keys \"jzintv\"\n            RUNTHIS='jzintv.sh \"${ROMNAME}\"'\n        fi\n\t\t;;\n\t\t\"x16\")\n        if [ \"${EMU}\" = \"x16emu\" ]; then\n            set_kill_keys \"x16emu\"\n            RUNTHIS='${TBASH} x16emustart.sh \"${ROMNAME}\"'\n        fi\n\t\t;;\n\t\t\"oricatmos\")\n        if [ \"${EMU}\" = \"oricutron\" ]; then\n            set_kill_keys \"oricutron\"\n            RUNTHIS='${TBASH} oricutronstart.sh \"${ROMNAME}\"'\n        fi\n\t\t;;\t\n        \"dragon32\"|\"dragon64\")\n\t\t\tif [ \"${EMU}\" = \"xroar\" ]; then\n\t\t\tset_kill_keys \"xroar.aarch64\"\n\t\t\tRUNTHIS='${TBASH} /usr/bin/xroar.sh \"${ROMNAME}\"'\n\t\tfi\n\t\t;;\n\t\t\"coco\")\n\t\t\tif [ \"${EMU}\" = \"xroar\" ]; then\n\t\t\tset_kill_keys \"xroar.aarch64\"\n            RUNTHIS='${TBASH} /usr/bin/xroar.sh \"${ROMNAME}\"'\n\t\tfi\n\t\t;;\n\t\t\"coco3\")\n\t\t\tif [ \"${EMU}\" = \"xroar\" ]; then\n\t\t\tset_kill_keys \"xroar.aarch64\"\n\t\t    RUNTHIS='${TBASH} /usr/bin/xroar.sh \"${ROMNAME}\"'\n\t\tfi\n\t\t;;\n\t\t\"mc10\")\n\t\t\tif [ \"${EMU}\" = \"xroar\" ]; then\n\t\t\tset_kill_keys \"xroar.aarch64\"\n            RUNTHIS='${TBASH} /usr/bin/xroar.sh \"${ROMNAME}\"'\n\t\tfi\n\t\t;;\n\t\t\"saturn\")\n        if [ \"${EMU}\" = \"yabasanshiroSA\" ]; then\n            set_kill_keys \"yabasanshiro\"\n            RUNTHIS='yabasanshiro.sh \"${ROMNAME}\"'\n        elif [ \"${EMU}\" = \"yabasanshiroSA1_5\" ]; then\n\t\t        set_kill_keys \"yabasanshiro1_5\"\n            \tRUNTHIS='yabasanshiro1_5.sh \"${ROMNAME}\"'\n        fi\n        ;;\n        esac\nelif [ ${LIBRETRO} == \"yes\" ]; then\n# We are running a Libretro emulator set all the settings that we chose on ES\n\ncase ${PLATFORM} in\n\"arcade\"|\"mame\"|\"fmtmarty\"|\"pgm2\"|\"apple2\")\n\tif [ \"$EMU\" = \"mame_libretro\" ]; then\n\t\tmame.sh\n    fi\n    ;;\nesac\n\nif [ \"$EMU\" = \"mednafen_supafaust_libretro\" ]; then\n\t\temuelec-utils small-cores enable\nfi\n\nif [[ ${PLATFORM} == \"ports\" ]]; then\n        PORTCORE=\"${arguments##*-C}\"  # read from -C onwards\n        EMU=\"${PORTCORE%% *}_libretro\"  # until a space is found\n        PORTSCRIPT=\"${arguments##*-SC}\"  # read from -SC onwards\n    ROMNAME_SHADER=${PORTSCRIPT}\nelse\n    ROMNAME_SHADER=${ROMNAME}\nfi\n\nif [ -s \"/emuelec/configs/RA_ARGS\" ]; then\n\tRA_ARGS = $(cat \"/emuelec/configs/RA_ARGS\")\nfi\n\nRUNTHIS='${RABIN} ${VERBOSE} ${RA_ARGS} -L /tmp/cores/${EMU}.so --config ${RACONF} \"${ROMNAME}\"'\nCONTROLLERCONFIG=\"${arguments#*--controllers=*}\"\n\nif [[ \"${arguments}\" == *\"-state_slot\"* ]]; then\n    CONTROLLERCONFIG=\"${CONTROLLERCONFIG%% -state_slot*}\"  # until -state_slot is found\n    SNAPSHOT=\"${arguments#*-state_slot *}\" # -state_slot x ...\n    SNAPSHOT=\"${SNAPSHOT%% -*}\"  # we only need the state_slot\nelse\n   SNAPSHOT=\"\"\nfi\n\nif [[ \"${arguments}\" == *\"-autosave\"* ]]; then\n    CONTROLLERCONFIG=\"${CONTROLLERCONFIG%% -autosave*}\"  # until -autosave is found\n    AUTOSAVE=\"${arguments#*-autosave *}\" # -autosave x ...\n    AUTOSAVE=\"${AUTOSAVE%% -*}\" # we only need autosave\nelse\n    AUTOSAVE=\"0\"\nfi\n\nCORE=${EMU%%_*}\n\n# Netplay\n\n# make sure the ip and port are blank\nset_ee_setting \"netplay.server.ip\" \"disable\"\nset_ee_setting \"netplay.server.port\" \"disable\"\nset_ee_setting \"netplay.mode\" \"disable\"\n\n# check if we started as host for a game\nif [[ \"${arguments}\" == *\"--host\"* ]]; then\n    NETPLAY=\"${arguments##*--host}\"  # read from --host onwards\n    NETPLAY=\"${NETPLAY%%--nick*}\"  # until --nick is found\n    NETPLAY=\"--host ${NETPLAY} --nick\"\nfi\n\n# check if we are trying to connect to a client on netplay\nif [[ \"${arguments}\" == *\"--connect\"* ]]; then\n    NETPLAY=\"${arguments##*--connect}\"  # read from --connect onwards\n    NETPLAY=\"${NETPLAY%%--nick*}\"  # until --nick is found\n    NETPLAY=\"--connect ${NETPLAY} --nick\"\n    set_ee_setting \"netplay.mode\" \"client\"\nfi\n\n# check if we are trying to connect as spectator on netplay\nif [[ \"${arguments}\" == *\"--netplaymode spectator\"* ]]; then\n    set_ee_setting \"netplay.mode\" \"spectator\"\nfi\n\nif [[ ${NETPLAY} != \"No\" ]]; then\n    NETPLAY_NICK=$(get_ee_setting netplay.nickname)\n    [[ -z \"${NETPLAY_NICK}\" ]] && NETPLAY_NICK=\"Anonymous\"\n    NETPLAY=\"$(echo ${NETPLAY} | sed \"s|--nick|--nick \\\"${NETPLAY_NICK}\\\"|\")\"\n    RUNTHIS=$(echo ${RUNTHIS} | sed \"s|--config|${NETPLAY} --config|\")\n\n    if [[ \"${NETPLAY}\" == *\"connect\"* ]]; then\n        NETPLAY_PORT=\"${arguments##*--port }\"  # read from -netplayport  onwards\n        NETPLAY_PORT=\"${NETPLAY_PORT%% *}\"  # until a space is found\n        NETPLAY_IP=\"${arguments##*--connect }\"  # read from -netplayip  onwards\n        NETPLAY_IP=\"${NETPLAY_IP%% *}\"  # until a space is found\n        set_ee_setting \"netplay.server.ip\" \"${NETPLAY_IP}\"\n        set_ee_setting \"netplay.server.port\" \"${NETPLAY_PORT}\"\n    fi\nfi\n# End netplay\n\nSHADERSET=$(setsettings.sh \"${PLATFORM}\" \"${ROMNAME_SHADER}\" \"${CORE}\" --controllers=\"${CONTROLLERCONFIG}\" --autosave=\"${AUTOSAVE}\" --snapshot=\"${SNAPSHOT}\")\n#echo ${SHADERSET} # Only needed for debug\n\nif [[ ${SHADERSET} != 0 ]]; then\n    RUNTHIS=$(echo ${RUNTHIS} | sed \"s|--config|${SHADERSET} --config|\")\nfi\n\n# we check is maxperf is set only if OGA OC is off\nOGAOC=$(get_ee_setting ee_oga_oc)\n[ -z \"${OGAOC}\" ] && OGAOC=\"Off\"\n\nif [[ \"${OGAOC}\" == \"Off\" ]]; then\n    if [ $(get_ee_setting \"maxperf\" \"${PLATFORM}\" \"${BASEROMNAME}\") == \"0\" ]; then\n        normperf\n    else\n        maxperf\n    fi\nfi\n\nelse # Retrorun was selected\n# Retrotun does not support settings\n    RUNTHIS=\"retrorun\"\n    if [ \"${BIT32}\" == \"yes\" ]; then\n        RUNTHIS+=\"32\"\n    fi\n\n\t\tJOY_FILE=$(ls \"/dev/input/by-path/*-event-joystick\" )\n    if [[ -f \"${JOY_FILE}\" ]]; then\n            ln -s /dev/input/event2 ${JOY_FILE}\n    fi\n\n    RUNTHIS+=' ${CMD_ROTATE} --triggers -g -d /storage/roms/bios /tmp/cores/${EMU}.so \"${ROMNAME}\"'\n\nfi # end Libretro/retrorun or standalone emu logic\n\nif [ \"${USELOG}\" == \"1\" ]; then # No need to do all this if log is disabled\n    # Clear the log file\n    echo \"EmuELEC Run Log\" > ${EMUELECLOG}\n    cat /etc/motd >> ${EMUELECLOG}\n\n    [[ \"${NETPLAY}\" == *\"connect\"* ]] && echo \"Netplay client!\" >> ${EMUELECLOG}\n\n    # Write the command to the log file.\n    echo \"PLATFORM: ${PLATFORM}\" >> ${EMUELECLOG}\n    echo \"ROM NAME: ${ROMNAME}\" >> ${EMUELECLOG}\n    echo \"BASE ROM NAME: ${ROMNAME##*/}\" >> ${EMUELECLOG}\n    echo \"USING CONFIG: ${RACONF}\" >> ${EMUELECLOG}\n    echo \"1st Argument: ${1}\" >> ${EMUELECLOG}\n    echo \"2nd Argument: ${2}\" >> ${EMUELECLOG}\n    echo \"3rd Argument: ${3}\" >> ${EMUELECLOG}\n    echo \"4th Argument: ${4}\" >> ${EMUELECLOG}\n    echo \"Full arguments: ${arguments}\" >> ${EMUELECLOG}\n    echo \"Run Command is:\" >> ${EMUELECLOG}\n    eval echo ${RUNTHIS} >> ${EMUELECLOG}\nfi\n\n[[ \"${KILLTHIS}\" != \"none\" ]] && gptokeyb 1 ${KILLTHIS} ${VIRTUAL_KB} -killsignal ${KILLSIGNAL} &\n\n[[ \"${CLOUD_SYNC}\" == \"1\" ]] && wait ${CLOUD_PID}\n\n# Execute the command and try to output the results to the log file if it was not disabled.\nif [[ ${LOGEMU} == \"Yes\" ]]; then\n   echo \"Emulator Output is:\" >> ${EMUELECLOG}\n   eval ${RUNTHIS} >> ${EMUELECLOG} 2>&1\n   ret_error=${?}\nelse\n   echo \"Emulator log was dissabled\" >> ${EMUELECLOG}\n   eval ${RUNTHIS} > /dev/null 2>&1\n   ret_error=${?}\nfi\n\n# clear terminal window\n        reset > /dev/tty < /dev/null 2>&1\n        reset > /dev/tty0 < /dev/null 2>&1\n        reset > /dev/tty1 < /dev/null 2>&1\n        reset > /dev/console < /dev/null 2>&1\n\n# END loading\n\nemuelec-utils end_app_video \"${PLATFORM}\" \"${ROMNAME}\"\n\nemuelec-utils set_rotation \"0\" \"${EMULATOR}\"\n\n# Kill MIDI Processes\nemuelec-utils set_midi_source \"None\" \"${EMULATOR}\"\n\n[[ \"${CLOUD_SYNC}\" == \"1\" ]] && ra_rclone.sh set \"${PLATFORM}\" \"${ROMNAME}\" &\n\n# Just in case\nkill_video_controls\n\n# Just for good measure lets make a symlink to Retroarch logs if it exists\nif [[ -f \"/storage/.config/retroarch/retroarch.log\" ]] && [[ ! -e \"${LOGSDIR}/retroarch.log\" ]]; then\n        ln -sf /storage/.config/retroarch/retroarch.log ${LOGSDIR}/retroarch.log\nfi\n\n#{log_addon}#\n\n# reset audio to default\nset_audio default\n\nif [[ \"${BTENABLED}\" == \"1\" ]]; then\n        # Restart the bluetooth agent\n    systemctl start bluetooth-agent\nfi\n\nif [ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ]; then\n# To avoid screwing up the gamepad configuration after setting vertical mode we return the config to horizontal\n\n        case \"$(oga_ver)\" in\n            \"OGA\")\n                if [ -f \"/tmp/joypads/GO-Advance Gamepad_horizontal.cfg\" ]; then\n                    mv \"/tmp/joypads/GO-Advance Gamepad.cfg\" \"/tmp/joypads/GO-Advance Gamepad_vertical.cfg\"\n                    mv \"/tmp/joypads/GO-Advance Gamepad_horizontal.cfg\" \"/tmp/joypads/GO-Advance Gamepad.cfg\"\n                fi\n            ;;\n            \"OGABE\")\n                if [ -f \"/tmp/joypads/GO-Advance Gamepad (rev 1.1)_horizontal.cfg\" ]; then\n                    mv \"/tmp/joypads/GO-Advance Gamepad (rev 1.1).cfg\" \"/tmp/joypads/GO-Advance Gamepad (rev 1.1)_vertical.cfg\"\n                    mv \"/tmp/joypads/GO-Advance Gamepad (rev 1.1)_horizontal.cfg\" \"/tmp/joypads/GO-Advance Gamepad (rev 1.1).cfg\"\n                fi\n            ;;\n            \"OGS\")\n                if [ -f \"/tmp/joypads/GO-Super Gamepad_horizontal.cfg\" ]; then\n                    mv \"/tmp/joypads/GO-Super Gamepad.cfg\" \"/tmp/joypads/GO-Super Gamepad_vertical.cfg\"\n                    mv \"/tmp/joypads/GO-Super Gamepad_horizontal.cfg\" \"/tmp/joypads/GO-Super Gamepad.cfg\"\n                fi\n            ;;\n        esac\nfi\n\n# These emus do not like to be killed by gptokeyb\ncase \"${EMU}\" in\n    \"dolphin\" | \"Chocolate-Doom\" | \"yabasanshiroSA\" | \"yabasanshiroSA1_5\" | *\"scummvm_libretro\"* | *\"ikemen\"* | *\"jzintv\"*)\n        ret_error=\"0\"\n        ;;\nesac\n[[ \"${RETRORUN}\" == \"yes\" ]] && ret_error=0\n\n[[ \"${CLOUD_SYNC}\" == \"1\" ]] && wait ${CLOUD_PID}\n\nend_game\n\nif [ \"$EMU\" = \"mednafen_supafaust_libretro\" ]; then\n\t\temuelec-utils small-cores disable\nfi\n\nif [[ \"${ret_error}\" != \"0\" ]]; then\n    echo \"exit ${ret_error}\" >> ${EMUELECLOG}\n    ret_bios=0\n\n    # Check for missing bios if needed\n    REQUIRESBIOS=(atari5200 atari800 atari7800 atarilynx colecovision amiga amigacd32 o2em intellivision pcengine pcenginecd pcfx fds segacd saturn dreamcast naomi atomiswave x68000 neogeo neogeocd msx msx2 sc-3000)\n\n    (for e in \"${REQUIRESBIOS[@]}\"; do [[ \"${e}\" == \"${PLATFORM}\" ]] && exit 0; done) && RB=0 || RB=1\n        if [ ${RB} == 0 ]; then\n            CBPLATFORM=\"${PLATFORM}\"\n            [[ \"${CBPLATFORM}\" == \"msx2\" ]] && CBPLATFORM=\"msx\"\n            [[ \"${CBPLATFORM}\" == \"pcenginecd\" ]] && CBPLATFORM=\"pcengine\"\n            [[ \"${CBPLATFORM}\" == \"amigacd32\" ]] && CBPLATFORM=\"amiga\"\n            ee_check_bios \"${CBPLATFORM}\" \"${CORE}\" \"${EMULATOR}\" \"${ROMNAME}\" \"${EMUELECLOG}\"\n            ret_bios=${?}\n            echo \"exit bios ${ret_bios}\" >> ${EMUELECLOG}\n        fi #require bios ends\n\n    # Since the error was not because of missing BIOS but we did get an error, display the log to find out\n    [[ \"${ret_bios}\" == \"0\" ]] && text_viewer -e -w -t \"Error! ${PLATFORM}-${EMULATOR}-${CORE}-${ROMNAME}\" -f 24 ${EMUELECLOG}\n    emuelec-utils blank_buffer\n    exit 1\nelse\n    echo \"exit 0\" >> ${EMUELECLOG}\n    echo \"return_from_game\" > /tmp/es_return_from_game\n    emuelec-utils blank_buffer\n    exit 0\nfi"
  },
  {
    "path": "packages/sx05re/emuelec/bin/emuelec_autostart.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# DO NOT modify this file, if you need to use autostart please use /storage/.config/custom_start.sh \n\n# It seems some slow SDcards have a problem creating the symlink on time :/\nCONFIG_DIR=\"/storage/.emulationstation\"\nCONFIG_DIR2=\"/storage/.config/emulationstation\"\n\nif [ ! -L \"${CONFIG_DIR}\" ]; then\nln -sf ${CONFIG_DIR2} ${CONFIG_DIR}\nfi\n\nif [ \"${EE_DEVICE}\" == \"Amlogic\" ]; then\n    rm \"/storage/.config/asound.conf\" > /dev/null 2>&1\n    cp \"/storage/.config/asound.conf-amlogic\" \"/storage/.config/asound.conf\"\n    if [ \"$(get_ee_setting bool StopMusicOnScreenSaver)\" != \"false\" ]; then \n        sed -i \"/<bool name=\\\"StopMusicOnScreenSaver\\\"/d\" \"${ES_CONF}\"\n        sed -i \"s|</config>|    <bool name=\\\"StopMusicOnScreenSaver\\\" value=\\\"false\\\" />\\n</config>|g\" \"${ES_CONF}\"\n    fi\nelif [ \"${EE_DEVICE}\" == \"Amlogic-ng\" ] || [ \"${EE_DEVICE}\" == \"OdroidM1\" ]; then\n    rm \"/storage/.config/asound.conf\" > /dev/null 2>&1\n    cp \"/storage/.config/asound.conf-amlogic-ng\" \"/storage/.config/asound.conf\"\nelif [ \"${EE_DEVICE}\" == \"Amlogic-no\" ]; then\n    rm \"/storage/.config/asound.conf\" > /dev/null 2>&1\n    cp \"/storage/.config/asound.conf-amlogic-ng\" \"/storage/.config/asound.conf\"\n    \n    AUDIO_DEVICE_NO=$(get_ee_setting ee_audio_device)\n    if [ \"${AUDIO_DEVICE_NO,,}\" = \"auto\" ] || [ -z \"${AUDIO_DEVICE_NO}\" ]; then\n    set_ee_setting \"ee_audio_device\" \"0,2\"\n    fi\nfi\n\nHOSTNAME=$(get_ee_setting system.hostname)\nif [ ! -z \"${HOSTNAME}\" ];then \n    echo \"${HOSTNAME}\" > /storage/.cache/hostname\nelse\n    echo \"EMUELEC\" > /storage/.cache/hostname\nfi\ncat /storage/.cache/hostname > /proc/sys/kernel/hostname\n\nif [[ \"${EE_DEVICE}\" == \"GameForce\" ]]; then\nLED=$(get_ee_setting bl_rgb)\n[ -z \"${LED}\" ] && LED=\"Off\"\nodroidgoa_utils.sh bl \"${LED}\"\n\nLED=$(get_ee_setting gf_statusled)\n[ -z \"${LED}\" ] && LED=\"heartbeat\"\nodroidgoa_utils.sh pl \"${LED}\"\n\n\nrk_wifi_init /dev/ttyS1\nfi\n\nif [[ \"${EE_DEVICE}\" == \"GameForce\" ]] || [[ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ]]; then\n    if [ -e \"/flash/no_oc.oga\" ]; then \n        set_ee_setting ee_oga_oc disable\n        OGAOC=\"\"\n    else\n        OGAOC=$(get_ee_setting ee_oga_oc)\n    fi\n[ -z \"${OGAOC}\" ] && OGAOC=\"Off\"\n    odroidgoa_utils.sh oga_oc \"${OGAOC}\"\nfi\n\n# Mounts /storage/roms\nMOUNT_HANDLER=$(get_ee_setting ee_mount.handler)\nif [ -z \"${MOUNT_HANDLER}\" ]; then\n  MOUNT_HANDLER=\"eemount\"\nfi\n${MOUNT_HANDLER} &> /emuelec/logs/eemount.log\n\n# copy default bezel to /storage/roms/bezel if it doesn't exists\nif [ ! -f \"/storage/roms/bezels/default.cfg\" ]; then \nmkdir -p /storage/roms/bezels/\ncp -rf /usr/share/retroarch-overlays/bezels/* /storage/roms/bezels/ &\nfi\n\n# Restore config if backup exists\nBACKUPTAR=\"ee_backup_config.tar.gz\"\nBACKUPFILE=\"/storage/roms/backup/${BACKUPTAR}\"\n\n[[ ! -f \"${BACKUPFILE}\" ]] && BACKUPFILE=\"/var/media/EEROMS/backup/${BACKUPTAR}\"\n\nif [ -f \"${BACKUPFILE}\" ]; then \n\temuelec-utils ee_backup restore no > /emuelec/logs/last-restore.log 2>&1\nfi\n\n# Clean cache garbage when boot up.\nrm -rf /storage/.cache/cores/* &\n\n# handle SSH\nDEFE=$(get_ee_setting ee_ssh.enabled)\n\ncase \"${DEFE}\" in\n\"0\")\n\tsystemctl stop sshd\n\trm /storage/.cache/services/sshd.conf\n\t;;\n*)\n\tmkdir -p /storage/.cache/services/\n\ttouch /storage/.cache/services/sshd.conf\n\tsystemctl start sshd\n\t;;\nesac\n\n# Checks and sets the resolution for starting ES.\ncheck_res.sh\n\n# Show splash creen \nshow_splash.sh intro\n\n# run custom_start before FE scripts\n/storage/.config/custom_start.sh before &\n\n# Just make sure all the subshells are finished before starting front-end\nwait\n\n# Start Scanning for Bluetooth Controllers\nBTENABLED=$(get_ee_setting ee_bluetooth.enabled)\nBTSCANTIME=$(get_ee_setting ee_bluetooth.scantime)\nif [[ \"${BTENABLED}\" != \"1\" ]]; then\nsystemctl stop bluetooth\nrm /storage/.cache/services/bluez.conf & \nelse\nsystemctl restart bluetooth\nemuelec-bluetooth ${BTSCANTIME} &\nfi\n\n# Auto shutdown will persist between reboots as long as ee_auto_shutdown_timeout is > 0\nASHD=$(get_ee_setting ee_auto_shutdown_persistent)\n\nif [ \"${ASHD}\" != \"1\" ]; then \n\tset_ee_setting ee_auto_shutdown_timeout 0\n\tset_ee_setting ee_auto_shutdown_persistent 0 # Paranoia \nfi\nkillall ee_asd > /dev/null 2>&1 # Paranoia \nee_asd\n\n# What to start at boot?\nDEFE=$(get_ee_setting ee_boot)\n\ncase \"${DEFE}\" in\n\"Retroarch\")\n\trm -rf /var/lock/start.retro\n\ttouch /var/lock/start.retro\n\tsystemctl start retroarch\n\t;;\n*)\n\trm /var/lock/start.games\n\ttouch /var/lock/start.games\n    systemctl start emustation\n\t;;\nesac\n\n# run custom_start ending scripts\n/storage/.config/custom_start.sh after\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/emueleclogs.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n# create logfile\n\nDATE=`date -u +%Y-%m-%d-%H.%M.%S`\nBASEDIR=\"/tmp\"\nLOGDIR=\"log-${DATE}\"\nRELEASE=\"`cat /etc/release`\"\nGIT=\"`cat /etc/issue | grep git`\"\n\ngetlog_cmd() {\n  if command -v ${1} >/dev/null; then\n    echo \"################################################################################\" >> ${BASEDIR}/${LOGDIR}/${LOGFILE}\n    echo \"# ... output of $@\" >> ${BASEDIR}/${LOGDIR}/${LOGFILE}\n    echo \"# EmuELEC release: ${RELEASE}\" >> ${BASEDIR}/${LOGDIR}/${LOGFILE}\n    echo \"# ${GIT}\" >> ${BASEDIR}/${LOGDIR}/${LOGFILE}\n    echo \"################################################################################\" >> ${BASEDIR}/${LOGDIR}/${LOGFILE}\n    \"$@\" >> ${BASEDIR}/${LOGDIR}/${LOGFILE} 2>/dev/null\n    echo \"\" >> ${BASEDIR}/${LOGDIR}/${LOGFILE}\n  fi\n}\n\nget_governor_details() {\n  (\n    cat_all_files /sys/devices/system/cpu\n    cat_all_files /sys/devices/system/cpu/cpufreq\n    for cpun in /sys/devices/system/cpu/cpu[0-9]*; do\n      cat_all_files ${cpun}/cpufreq\n    done\n  )\n}\n\ncat_all_files() {\n  local adir=${1}\n  local afile var\n\n  [ -d ${adir} ] || return 0\n\n  echo \"${adir}\"\n\n  cd ${adir}\n  for afile in $(find . -maxdepth 1 -print | sort); do\n    afile=${afile:2}\n    if [ -n \"${afile}\" ]; then\n      if [ -d ${afile} ]; then\n        var=\"<dir>\"\n      else\n        var=\"$(cat ${afile} 2>/dev/null)\"\n      fi\n      [ -n \"${var}\" ] && printf \"    %-30s : %s\\n\" \"${afile}\" \"${var}\"\n    fi\n  done\n}\n\nrm -rf ${BASEDIR}/${LOGDIR}\nmkdir -p ${BASEDIR}/${LOGDIR}\n\n# emuelec.conf\nEE_LOG_DIR=/emuelec/configs\n\n  LOGFILE=\"00_EMUELEC_CONF.log\"\n  for i in emuelec.conf; do\n    [ -f ${EE_LOG_DIR}/${i} ] && getlog_cmd cat ${EE_LOG_DIR}/${i}\n  done\n  \n# es_log.txt\nEE_LOG_DIR=/storage\n\n  LOGFILE=\"01_EE_VERSION.log\"\n  for i in EE_VERSION; do\n    [ -f ${EE_LOG_DIR}/.config/${i} ] && getlog_cmd cat ${EE_LOG_DIR}/.config/${i}\n       getlog_cmd cat /usr/config/EE_VERSION\n  done\n  \nLOGFILE=\"02_JOYPADS.log\"\n find /tmp/joypads -type f -name \"*.cfg\" -print0 | while IFS= read -r -d '' file; do\n    getlog_cmd cat \"${file}\"\ndone\n\nEE_LOG_DIR=/emuelec/logs\n  \n  LOGFILE=\"03_EE_LOGS.LOG\"\nfor i in emuelec.log sx05re.log emulationstation.log es_log.txt es_log.txt.bak retroarch.log hatari.log dosbox.log amiberry.log; do\n\tif [ ${i} = \"es_log.txt\" ] || [ ${i} = \"es_log.txt.bak\" ]; then\n\t\tgetlog_cmd grep -e lvl2 -e Error ${EE_LOG_DIR}/${i}\n\telse\n\t\t[ -f ${EE_LOG_DIR}/${i} ] && getlog_cmd cat ${EE_LOG_DIR}/${i}\n\tfi\ndone\nEE_LOG_DIR=/storage/.config/retroarch\n  \nLOGFILE=\"04_RETROARCH.log\"\n  for i in retroarch.cfg; do\n     [ -f ${EE_LOG_DIR}/${i} ] && getlog_cmd cat ${EE_LOG_DIR}/${i}\n  done\n\nEE_LOG_DIR=/storage/\n\n  LOGFILE=\"05_ES.LOG\"\n  for i in es_input.cfg es_settings.cfg es_systems.cfg; do\n    [ -f ${EE_LOG_DIR}/.emulationstation/${i} ] && getlog_cmd cat ${EE_LOG_DIR}/.emulationstation/${i}\n  done\n\n# System.log\n  LOGFILE=\"06_System.log\"\n  echo \"****** dmseg ******\" >> ${BASEDIR}/${LOGDIR}/${LOGFILE} 2>/dev/null\n  dmesg | grep -v cectx >> ${BASEDIR}/${LOGDIR}/${LOGFILE} 2>/dev/null\n  echo \"****** end dmseg ******\" >> ${BASEDIR}/${LOGDIR}/${LOGFILE} 2>/dev/null\n  getlog_cmd lsmod\n  getlog_cmd ps xa\n  for i in /storage/.config/hwdb.d/*.hwdb \\\n      /storage/.config/modprobe.d/*.conf \\\n      /storage/.config/modules-load.d/*.conf \\\n      /storage/.config/sleep.d/*.power \\\n      /storage/.config/sysctl.d/*.conf \\\n      /storage/.config/udev.rules.d/.rules \\\n  ; do\n    if [ -f \"${i}\" ] ; then\n      getlog_cmd cat ${i}\n    fi\n  done\n  if [ -f \"/storage/.config/autostart.sh\" ] ; then\n    getlog_cmd cat /storage/.config/autostart.sh\n  fi\n  if [ -f \"/storage/.config/shutdown.sh\" ] ; then\n    getlog_cmd cat /storage/.config/shutdown.sh\n  fi\n  getlog_cmd ls -laR /storage/.config/system.d\n  # note: we dont add .mount units here as they may contan\n  # login credentials\n  for i in /storage/.config/system.d/*.service ; do\n    if [ -f \"${i}\" -a ! -L \"${i}\" ] ; then\n      getlog_cmd cat ${i}\n    fi\n  done\n\n# Hardware.log\n  LOGFILE=\"07_Hardware.log\"\n  getlog_cmd lspci -vvvvnn\n  getlog_cmd lsusb -vvv\n  getlog_cmd lsusb -t\n  getlog_cmd cat /proc/cpuinfo\n  getlog_cmd get_governor_details\n  getlog_cmd cat /proc/meminfo\n\n# Audio.log\n  LOGFILE=\"08_Audio.log\"\n  getlog_cmd aplay -l\n  getlog_cmd aplay -L\n  getlog_cmd amixer\n\n# Network.log\n  LOGFILE=\"09_Network.log\"\n  getlog_cmd ifconfig -a\n  getlog_cmd netstat -rn\n  getlog_cmd netstat -nalp\n  getlog_cmd connmanctl services\n  getlog_cmd cat /etc/resolv.conf\n\n# varlog.log\n  LOGFILE=\"10_varlog.log\"\n  for i in `find /var/log -type f`; do\n    getlog_cmd cat ${i}\n  done\n\n# Input.log\n  LOGFILE=\"11_input.log\"\n  getlog_cmd cat /proc/bus/input/devices\n  # make RPi users happy\n  if [ -e /proc/acpi/wakeup ] ; then\n    getlog_cmd cat /proc/acpi/wakeup\n  fi\n\n# Filesystem.log\n  LOGFILE=\"12_Filesystem.log\"\n  getlog_cmd cat /proc/mounts\n  getlog_cmd df -h\n  getlog_cmd blkid\n\n# Journal (current)\n  LOGFILE=\"13_Journal-cur.log\"\n  echo \"****** journalctl --no-pager -b -0 ******\" >> ${BASEDIR}/${LOGDIR}/${LOGFILE} 2>/dev/null\n  journalctl --no-pager -b -0 | grep -v \"cectx\" >> ${BASEDIR}/${LOGDIR}/${LOGFILE} 2>/dev/null\n  echo \"****** end journalctl --no-pager -b -0 ******\" >> ${BASEDIR}/${LOGDIR}/${LOGFILE} 2>/dev/null\n  \n# Journal (prev)\n  LOGFILE=\"14_Journal-prev.log\"\n  getlog_cmd journalctl --no-pager -b -1 | grep -v \"cectx\"\n\n# pack logfiles\n  mkdir -p /emuelec/logs\n  find ${BASEDIR}/${LOGDIR} -type f -exec sed -i \"s|.*password.*||g\" {} \\;\n  find ${BASEDIR}/${LOGDIR} -type f -exec sed -i \"s|.*username.*||g\" {} \\;\n  find ${BASEDIR}/${LOGDIR} -type f -exec sed -i \"s|.*ssid=.*||g\" {} \\;\n  find ${BASEDIR}/${LOGDIR} -type f -exec sed -i \"s|.*ukey=.*||g\" {} \\;\n  find ${BASEDIR}/${LOGDIR} -type f -exec sed -i \"s|.*Attempting to login.*||g\" {} \\;\n  find ${BASEDIR}/${LOGDIR} -type f -exec sed -i \"s|.*logged in successfully.*||g\" {} \\;\n  zip -jq /emuelec/logs/log-${DATE}.zip ${BASEDIR}/${LOGDIR}/*\n  cat ${BASEDIR}/${LOGDIR}/* > /emuelec/logs/FULL_EMUELEC.LOG\n  pastebinit /emuelec/logs/FULL_EMUELEC.LOG\n\n# remove logdir\n  rm -rf ${BASEDIR}/${LOGDIR}\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/emustation-config",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# odroidgoa\n\nfunction check_pwd() {\n\nESSETTINGS=\"/storage/.config/emulationstation/es_settings.cfg\"\n\nPWDFILE=\"${1}\"\n\nwhile read line; do \n\n# Extract the first part (usually username)\nFIRST=\"${line#*=}\"  # read from = onwards\nFIRST=\"${FIRST%%:\\{#\\}:*}\"  # until a :{#}: is found\n\n# Extract the second part (usually password)\nSECOND=\"${line##*:\\{#\\}:}\"  # read from :{#}: onwards\nSECOND=$(echo \"${SECOND}\" |  tr -d '[:space:]')\ncase \"$line\" in\n    WIFI=*)\n    if [[ ! -z \"${FIRST}\" ]] && [[ ! -z \"${SECOND}\" ]]; then\n        set_ee_setting wifi.ssid \"${FIRST}\"\n        set_ee_setting wifi.key \"${SECOND}\"\n        set_ee_setting wifi.enabled 1\n        #echo \"WiFi information added\"\n        \n        # Connect to WiFi\n        if [[ ! -f \"/storage/.cache/connman/emuelec_wifi.config\" ]]; then\n            batocera-config wifi enable \"${FIRST}\" \"${SECOND}\"\n        fi\n    fi\n    ;;\n    RAC=*)\n    if [[ ! -z \"${FIRST}\" ]] && [[ ! -z \"${SECOND}\" ]]; then\n        set_ee_setting global.retroachievements 1\n        set_ee_setting global.retroachievements.username \"${FIRST}\"\n        set_ee_setting global.retroachievements.password \"${SECOND}\"\n        # echo \"Retroachievements information added\"\n    fi\n    ;;\n    SS=*)\n    if [[ ! -z \"${FIRST}\" ]] && [[ ! -z \"${SECOND}\" ]]; then\n        sed -i '/<\\/config>/d' \"${ESSETTINGS}\"\n        sed -i '/<string name=\"ScreenScraperPass\" /d' \"${ESSETTINGS}\"\n        sed -i '/<string name=\"ScreenScraperUser\" /d' \"${ESSETTINGS}\"\n        \n        echo \"\t<string name=\\\"ScreenScraperPass\\\" value=\\\"${SECOND}\\\" />\" >> \"${ESSETTINGS}\"\n        echo \"\t<string name=\\\"ScreenScraperUser\\\" value=\\\"${FIRST}\\\" />\" >> \"${ESSETTINGS}\"\n        echo '</config>' >> \"${ESSETTINGS}\" \n        # echo \"screenscraper information added\"\n    fi    \n    ;;\n    LANG=*)\n        if [[ ! -z \"${FIRST}\" ]]; then\n        set_ee_setting system.language \"${FIRST}\"\n        fi\n    ;;\n    TZ=*)\n        if [[ ! -z \"${FIRST}\" ]]; then\n        set_ee_setting system.timezone \"${FIRST}\"\n        fi\n    ;;\nesac\n\ndone < \"${PWDFILE}\"\n\n}\n\n# Make sure retroarch is not running before starting emulationstation to avoid sound conflicts\nwhile pgrep -x /usr/bin/retroarch >/dev/null; do\n    systemctl stop retroarch\n    sleep 1\ndone\n\n# We look for themes\numount /emuelec/themes > /dev/null 2>&1\nmkdir -p /emuelec/themes > /dev/null 2>&1\n        \nif [[ -d \"/var/media/EEROMS/themes\" ]]; then\n        mount --bind /var/media/EEROMS/themes /emuelec/themes\nelif [[ -d \"/storage/roms/themes\" ]]; then\n        mount --bind /storage/roms/themes /emuelec/themes\nfi\n\nsystemctl start smbd\n\n# Set audio to alsa if we are starting retroarch or default otherwise\n[[ \"$1\" == \"retroarch\" ]] && set_audio alsa || set_audio default\n\nTZ=$(get_ee_setting system.timezone)\necho \"TIMEZONE=$TZ\"|tr -d '\\n' > /storage/.cache/timezone\nsystemctl restart tz-data.service\n\n# create charmap used for translations\nlocale=$(get_ee_setting system.language)\ncharmap=\"UTF-8\"\nlang=\"${locale}.${charmap}\"\nlocpath=\"/emuelec/configs/locale\"\ni18npath=\"$locpath/i18n\"\nlocalepath=\"$locpath/$lang\"\n\nif [ $locale != \"en_US\" ]; then\n\tif [ ! -d $localepath ]; then\n\t\texport I18NPATH=$i18npath\n\t\t/usr/bin/localedef -f $charmap -i $locale $localepath\n\tfi\nfi\n\nexport LOCPATH=$locpat\nexport LANG=$lang\nexport LANGUAGE=$lang\nsystemctl import-environment LANG\nsystemctl import-environment LOCPATH\nsystemctl import-environment I18NPATH\nsystemctl import-environment LANGUAGE\n\nif [ \"$EE_DEVICE\" == \"OdroidGoAdvance\" ] || [ \"$EE_DEVICE\" == \"GameForce\" ]; then\n# For some reason the audio is being reseted to 100 at boot, so we reaply the saved settings here\nodroidgoa_utils.sh vol $(get_ee_setting \"audio.volume\")\n\n# Workaround for theme not displaying correctly \nCONDIR=\"/storage/.config/emulationstation/themesettings\"\nCONFILE=\"${CONDIR}/Crystal.cfg\"\nESSETTINGS=\"/storage/.config/emulationstation/es_settings.cfg\"\n\nif [ ! -e \"${CONFILE}\" ]; then \n    mkdir -p \"${CONDIR}\"\n    touch \"${CONFILE}\"\n    sed -i '/<string name=\"ThemeSystemView\"/d' \"${ESSETTINGS}\"\n    sed -i '/<\\/config>/d' \"${ESSETTINGS}\"\n\n    echo '<string name=\"ThemeSystemView\" value=\"small panel\" />' >> \"${ESSETTINGS}\"\n    \n    if [ -e \"/dev/input/by-path/platform-odroidgo2-joypad-joystick\" ]; then\n        echo \"subset.ratio=43\" > \"${CONFILE}\"\n        echo '<string name=\"subset.ratio\" value=\"43\" />' >> \"${ESSETTINGS}\"\n    else\n        echo \"subset.ratio=169\" > \"${CONFILE}\"\n        echo '<string name=\"subset.ratio\" value=\"169\" />' >> \"${ESSETTINGS}\"\n    fi\n    echo '</config>' >> \"${ESSETTINGS}\" \nfi\n\nelse\n    # Use stored volume instead of system default, this is only for Amlogic devices using AV as output\n    AUDIO_DEVICE=\"hw:$(get_ee_setting ee_audio_device)\"\n\n\t\tVOLUME=98\n\n\t\tSTORED_VOLUME=$(get_ee_setting audio.volume)\n\t\t[[ ! -z \"$STORED_VOLUME\" ]] && VOLUME=$STORED_VOLUME\n\n    amixer set Master \"$VOLUME%\"\nfi\n\n# We need to always use the newest es_systems.cfg if there was a recent update, we also need to update the ports gamelist.xml and es_features.cfg\nCVER=$(cat /storage/.config/EE_VERSION)\nNVER=$(cat /usr/config/EE_VERSION)\nBUILDATE=$(cat /usr/buildate)\n\nESDIR=\"/storage/.config/emulationstation\"\nOLDCFG=\"${ESDIR}/es_systems.cfg.${BUILDATE}.bak\"\nCFG=\"${ESDIR}/es_systems.cfg\"\n\nif [[ \"${CVER}\" != \"${NVER}\" ]]; then\n    #mv \"/storage/.config/emuelec/ports/gamelist.xml\" \"/storage/.config/emuelec/ports/gamelist.xml.${BUILDATE}.bak\"\n    #cp -rf \"/usr/bin/ports/gamelist.xml\" \"/storage/.config/emuelec/ports/gamelist.xml\"\n    \n    mv \"${ESDIR}/es_features.cfg\" \"${ESDIR}/es_features.cfg.${BUILDATE}.bak\"\n    cp -rf \"/usr/config/emulationstation/es_features.cfg\" \"${ESDIR}/es_features.cfg\"\n    \n    cp -f \"${CFG}\" \"${OLDCFG}\"\n    cp -f \"/usr/config/emulationstation/es_systems.cfg\" \"${CFG}\"\n\n    echo \"${NVER}\" > /storage/.config/EE_VERSION\n(\n    if grep -q '<name>nds</name>' \"${OLDCFG}\"; then\n        xmlstarlet ed --omit-decl --inplace \\\n            -s '//systemList' -t elem -n 'system' \\\n            -s '//systemList/system[last()]' -t elem -n 'name' -v 'nds'\\\n            -s '//systemList/system[last()]' -t elem -n 'fullname' -v 'Nintendo DS'\\\n            -s '//systemList/system[last()]' -t elem -n 'manufacturer' -v 'Nintendo'\\\n            -s '//systemList/system[last()]' -t elem -n 'release' -v '2004'\\\n            -s '//systemList/system[last()]' -t elem -n 'hardware' -v 'portable'\\\n            -s '//systemList/system[last()]' -t elem -n 'path' -v '/storage/roms/nds'\\\n            -s '//systemList/system[last()]' -t elem -n 'extension' -v '.nds .zip .NDS .ZIP'\\\n            -s '//systemList/system[last()]' -t elem -n 'command' -v \"emuelecRunEmu.sh %ROM% -P%SYSTEM% --core=%CORE% --emulator=%EMULATOR% --controllers=\\\"%CONTROLLERSCONFIG%\\\"\"\\\n            -s '//systemList/system[last()]' -t elem -n 'platform' -v 'nds'\\\n            -s '//systemList/system[last()]' -t elem -n 'theme' -v 'nds'\\\n            ${CFG} \n    fi\n) &\n\nfi\n\n(\n# Pico-8 check\n# If there is a new version copy the files\n\nif [[ -e \"/storage/roms/bios/pico-8\" ]]; then\n    mkdir -p /emuelec/bin/pico-8\n    cp -rf /storage/roms/bios/pico-8/* /emuelec/bin/pico-8\n    rm -rf /storage/roms/bios/pico-8\n    chmod +x /emuelec/bin/pico-8/pico8_dyn\n    touch /storage/roms/pico-8/splore.p8\nfi \n\n# If Pico-8 binary does not exist remove the splore.p8\nif [[ ! -e \"/emuelec/bin/pico-8/pico8_dyn\" ]]; then\n    rm /storage/roms/pico-8/splore.p8 > /dev/null 2>&1 \nelse\n    touch /storage/roms/pico-8/splore.p8 > /dev/null 2>&1 \nfi\n) &\n\n#check if we have ecwolf data installed\necwolfdir=\"/storage/roms/ports/ecwolf\"\n\nmkdir -p ${ecwolfdir}/games\n\nfor ecwolf in SOD sod WL6 wl6 N3D n3d SD2 sd2 SD3 sd3; do\n    if find ${ecwolfdir} -name *.${ecwolf} -maxdepth 1 | read; then\n    case ${ecwolf} in\n        \"SOD\"|\"sod\")\n            touch \"${ecwolfdir}/games/Spear of Destiny.${ecwolf}\" > /dev/null 2>&1 \n        ;;\n        \"SD2\"|\"sd2\")\n            touch \"${ecwolfdir}/games/Spear of Destiny SD2.${ecwolf}\" > /dev/null 2>&1 \n        ;;\n        \"SD3\"|\"sd3\")\n            touch \"${ecwolfdir}/games/Spear of Destiny SD3.${ecwolf}\" > /dev/null 2>&1 \n        ;;\n        \"WL6\"|\"wl6\")\n            touch \"${ecwolfdir}/games/Wolfenstein 3D.${ecwolf}\" > /dev/null 2>&1 \n        ;;\n        \"N3D\"|\"n3d\")\n            touch \"${ecwolfdir}/games/Super 3D Noah's Ark.${ecwolf}\" > /dev/null 2>&1 \n        ;;\n    esac\n    else\n        rm ${ecwolfdir}/games/*.${ecwolf} > /dev/null 2>&1 \n    fi\ndone\n\n# Check if we have a ee_defaults.txt file and if true process it\nPWDFILE=\"/flash/ee_defaults.txt\"\n[ ! -f \"${PWDFILE}\" ] && PWDFILE=\"/emuelec/configs/ee_defaults.txt\"\n[ ! -f \"${PWDFILE}\" ] && PWDFILE=\"/storage/roms/ee_defaults.txt\"\n[ -f \"${PWDFILE}\" ] && check_pwd ${PWDFILE}\n\n# The mounting logic for ports_scripts is now handled in the mount handler\n# # Find and mount the ports directory \n# if [ -L \"/storage/roms\" ]; then\n#     LINK=$(readlink /storage/roms)\n# else\n#     LINK=\"/storage/roms\"\n# fi\n# # Just in case\n# mkdir -p \"${LINK}/ports_scripts\"\n# mkdir -p \"/emuelec/ports\"\n# mkdir -p \"/storage/.tmp/ports-workdir\"\n# umount \"/storage/roms/ports_scripts\" > /dev/null 2>&1\n# umount \"/var/media/EEROMS/roms/ports_scripts\" > /dev/null 2>&1\n\n# mount -t overlay ports -o lowerdir=/usr/bin/ports,upperdir=/emuelec/ports,workdir=/storage/.tmp/ports-workdir \"${LINK}/ports_scripts\"\n\n# wait for all the subshells to finish\nwait\n\n# We do not care if BT scanning finishes before ES starts\nBTENABLED=$(get_ee_setting ee_bluetooth.enabled)\nif [[ \"$BTENABLED\" == \"1\" ]]; then\n    # Search for bluetooth gamepads while ES loads. \n    (\n        batocera-bluetooth trust\n    ) &\nfi\n\nemuelec-utils setauddev\n\n# Checks and sets the resolution for starting ES.\ncheck_res.sh\n\n# START - SECTIONS TO WIPE PREVIOUS VERSION CONFIG DATA\nREMAP_VERSION=\"/emuelec/configs/JOY_REMAP_VERSION\"\nif [[ ! -f \"$REMAP_VERSION\" ]]; then\n\tgrep -Ev \"^.*\\.joy_btn.*=.*$\" /emuelec/configs/emuelec.conf > /tmp/emuelec.conf.bak && mv /tmp/emuelec.conf.bak /emuelec/configs/emuelec.conf\n\techo \"2\" > \"${REMAP_VERSION}\"\nfi\n\nFRAMEBUFFER_VERSION=\"/emuelec/configs/FRAMEBUFFER_VERSION\"\nif [[ ! -f \"$FRAMEBUFFER_VERSION\" ]]; then\n\tgrep -Ev \"^.*\\framebuffer.*=.*$\" /emuelec/configs/emuelec.conf > /tmp/emuelec.conf.bak && mv /tmp/emuelec.conf.bak /emuelec/configs/emuelec.conf\n\techo \"2\" > \"${FRAMEBUFFER_VERSION}\"\nfi\n# END - SECTIONS TO WIPE PREVIOUS VERSION CONFIG DATA\n\nRA_CORE_OPTION=\"/storage/.config/retroarch/retroarch-core-options.cfg\"\nHAS_RA_CORE_OPTION_X68K_FDD_FIX=$(cat \"${RA_CORE_OPTION}\" | grep px68k_save_fdd_path)\n[[ -z \"${HAS_RA_CORE_OPTION_X68K_FDD_FIX}\" ]] && echo \"px68k_save_fdd_path = \\\"disabled\\\"\" >> \"${RA_CORE_OPTION}\"\nHAS_RA_CORE_OPTION_X68K_HDD_FIX=$(cat \"${RA_CORE_OPTION}\" | grep px68k_save_hdd_path)\n[[ -z \"${HAS_RA_CORE_OPTION_X68K_HDD_FIX}\" ]] && echo \"px68k_save_hdd_path = \\\"disabled\\\"\" >> \"${RA_CORE_OPTION}\"\n\nexit 0\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/env.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nexport TERM=\"xterm\"\nexport TERMINFO=\"/usr/share/terminfo\"\nexport TERMINFO_DIRS=${TERMINFO}\nexport LANG=\"C.UTF-8\"\nexport HOME=\"/storage\"\nexport romdir=\"/storage/roms/\"\n# export configdir=\"/usr/bin/scripts\"\nexport scriptdir=\"/usr/bin/scripts\"\n#export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/emuelec/lib\nexport PATH=${PATH}:/emuelec/bin:/emuelec/scripts\n\nuser=\"root\"\nrootdir=\"/emuelec\"\nhome=\"/storage\"\nromdir=\"${home}/roms\"\nbiosdir=\"${romdir}/BIOS\"\ndatadir=\"${home}/.config/emuelec/RetroPie\"\nemudir=\"${rootdir}/emulators\"\nconfigdir=\"${rootdir}/configs\"\n__logdir=\"${scriptdir}/logs\"\n__tmpdir=\"/tmp\"\n__builddir=\"${__tmpdir}/build\"\n__swapdir=\"${__tmpdir}\"\n__backtitle=\"EmuELEC - Configuration\"\n\nsource \"${scriptdir}/scriptmodules/system.sh\"\nsource \"${scriptdir}/scriptmodules/helpers.sh\"\nsource \"${scriptdir}/scriptmodules/inifuncs.sh\"\nsource \"${scriptdir}/scriptmodules/packages.sh\"\n\ncat /etc/motd\necho \"Loading...Please Wait!\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/fbterm.sh",
    "content": "#!/usr/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n. /etc/profile\n\nEE_DEVICE=$(cat /ee_arch)\n\nee_console enable\n\nif [[ \"${1}\" == *\"launch_terminal_(kb).sh\"* ]]; then\n        ee_console disable\n    if [ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${EE_DEVICE}\" == \"GameForce\" ]; then\n        #kmscon\n\t\tkmscon --font-size 8 --login /usr/bin/login -- -p -f root \n    else\n\t\ttmpsh=/tmp/tmp.$$.sh\n\t\techo \"/usr/bin/login -p -f root\" > ${tmpsh}\n\t\tchmod +x ${tmpsh}\n\t\tfbterm \"${tmpsh}\" -s 24 < /dev/tty1\n\t\trm ${tmpsh}\n    fi\nelif [[ \"${1}\" == *\"file_manager.sh\"* ]]; then\n        if [ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${EE_DEVICE}\" == \"GameForce\" ]; then\n            bash \"${1}\"\n        else\n            fbterm \"${1}\" -s 24 < /dev/tty1\n        fi\nelse\n\t\tcase ${1} in\n\t\t\"mplayer_video\")\n            bash playvideo.sh \"${2}\" \"${3}\" < /dev/tty0\n\t\t;;\n\t\t*)\n            bash \"${1}\" > /dev/tty0\n        ;;\n\t\tesac\nfi \n\nee_console disable\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/find.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nfind / -type d \\( -path /var/media -o -path /storage/roms \\) -prune -o -iname *${1}* -print\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/gamelist-cleaner.sh",
    "content": "#!/bin/bash - \n# gamelist-cleaner.sh\n#####################\n#\n# This script gets a gamelist.xml as input and check if the path for the games\n# leads to an existing file. If the file doesn't exist, the <game> entry will\n# be deleted from the resulting gamelist.xml.\n#\n# Run the script with '--help' to get more info.\n# \n# meleu - 2017/Jun\n# kaltinril - 2017-08-19 - Added -r option to replace the existing gameslist\n# shantigilbert - 2019-02-18 - Fix for filenames with '&' not being removed\n\n# Global Variables\nREPLACE_GAMELIST=false\nDO_ALL=false\nLISTS_DIR=\"${HOME}/.emulationstation/gamelists\"\nROMS_DIR=\"${HOME}/roms\"\nELIMINATE_BACKUPS=false\n\n# Read only Variables\nreadonly SCRIPT_DIR=\"$(dirname \"${0}\")\"\nreadonly SCRIPT_NAME=\"$(basename \"${0}\")\"\nreadonly SCRIPT_FULL=\"${SCRIPT_DIR}/${SCRIPT_NAME}\"\nreadonly SCRIPT_URL=\"https://raw.githubusercontent.com/meleu/share/master/gamelist-cleaner.sh\"\n\nreadonly USAGE=\"Usage:\n${0} [OPTIONS] [gamelist.xml]...\n\"\n\nreadonly EXAMPLE=\"Example:\n${0} ~/.emulationstation/gamelists/nes/gamelist.xml\n\"\n\nreadonly HELP=\"\nThis script gets a gamelist.xml as input and checks if the path for the games\nleads to an existing file. If the file doesn't exist, the <game> entry will\nbe deleted and a cleaner gamelist.xml file will be generated.\n\nThe resulting file will be named \\\"gamelist.xml-clean\\\" and will be in the\nsame folder as the original file. Nothing changes in the original gamelist.xml.\n\n${USAGE}\n${EXAMPLE}\nThe OPTIONS are:\n\n-h|--help           print this message and exit.\n\n-u|--update         update the script and exit.\n\n-s|--system SYSTEM  specifies to which system the gamelist.xml file belongs,\n                    e.g.: nes, megadrive. Default: name of the directory where\n                    the file is located.\n\n-d|--directory DIR  specifies the ROMs directory. Default:\n                    ${ROMS_DIR}\n\n-r|--replace        Force replace the gamelist.xml file (Creates backup of original)\n\n-a|--all            Automatically clean all gamelists that exist in lists folder\n\n-l|--gamelist DIR   specifies the gamelist directory.  Default:\n                    ${LISTS_DIR}\n\"\n\nfunction update_script() {\n    local err_flag=0\n    local err_msg\n\n    if err_msg=$(wget \"${SCRIPT_URL}\" -O \"/tmp/${SCRIPT_NAME}\" 2>&1); then\n        if diff -q \"${SCRIPT_FULL}\" \"/tmp/${SCRIPT_NAME}\" >/dev/null; then\n            echo \"You already have the latest version. Nothing changed.\"\n            rm -f \"/tmp/${SCRIPT_NAME}\"\n            exit 0\n        fi\n        err_msg=$(mv \"/tmp/${SCRIPT_NAME}\" \"${SCRIPT_FULL}\" 2>&1) \\\n        || err_flag=1\n    else\n        err_flag=1\n    fi\n\n    if [[ ${err_flag} -ne 0 ]]; then\n        err_msg=$(echo \"${err_msg}\" | tail -1)\n        echo \"Failed to update \\\"${SCRIPT_NAME}\\\": ${err_msg}\" >&2\n        exit 1\n    fi\n    \n    chmod a+x \"${SCRIPT_FULL}\"\n    echo \"The script has been successfully updated. You can run it again.\"\n    exit 0\n}\n\nfunction eliminate_backup_files() {\n    backups=$(ls ${LISTS_DIR}/*/gamelist.xml-orig*)\n    for file in ${backups}; do\n      echo \"Removing: ${file}\"\n      rm ${file}\n    done\n}\n\nwhile [[ -n \"${1}\" ]]; do\n    case \"${1}\" in\n        -h|--help)\n            echo \"${HELP}\" >&2\n            exit 0\n            ;;\n        -u|--update)\n            update_script\n            ;;\n        -s|--system)\n            shift\n            CUSTOM_SYSTEM=\"${1}\"\n            shift\n            ;;\n        -d|--directory)\n            shift\n            ROMS_DIR=\"${1}\"\n            shift\n            ;;\n        -r|--replace)\n            shift\n            REPLACE_GAMELIST=true\n            echo \"Using replace option\"\n            echo\n            ;;\n        -a|--all)\n            shift\n            DO_ALL=true\n            echo \"Cleaning all gamelists!\"\n            echo\n            ;;\n        -l|--list)\n            shift\n            LISTS_DIR=\"${1}\"\n            shift\n            ;;\n        -e|--eliminate)\n            shift\n            ELIMINATE_BACKUPS=true\n            echo \"Using eliminate option\"\n            echo\n            ;;\n        '')\n            echo \"ERROR: missing gamelist.xml parameter\" >&2\n            echo \"${HELP}\" >&2\n            exit 1\n            ;;\n        -*) # yes, files starting with '-' don't work in this script\n            echo \"ERROR: \\\"${1}\\\": invalid option\" >&2\n            echo \"${HELP}\" >&2\n            exit 1\n            ;;\n        *)\n            break\n            ;;\n    esac\ndone\n\n# Verify there is at least 1 file after all parameters\nif [ \"$#\" -eq 0 ] && [ \"${DO_ALL}\" = false ]; then\n    echo \"ERROR: missing gamelist.xml parameter\" >&2\n    echo \"${HELP}\" >&2\n    exit 1\nfi\n\n# Get list of files to use\ngamelist_files=\"$@\"\nif [ \"${DO_ALL}\" = true ]; then\n    gamelist_files=$(ls ${LISTS_DIR}/*/gamelist.xml)\nfi\n\nfor file in ${gamelist_files}; do\n    original_gamelist=\"$(readlink -f \"${file}\")\"\n    clean_gamelist=\"${original_gamelist}-clean\"\n    gamelist_dir=\"$(dirname \"${original_gamelist}\")\"\n    backup_gamelist=\"${original_gamelist}-orig-$(date +%s)\"\n\n    if [[ ! -s \"${original_gamelist}\" ]]; then\n        [[ -z \"${original_gamelist}\" ]] && original_gamelist=\"${file}\" # Make sure we print the name if the readlink failed to find a file\n        echo \"\\\"${original_gamelist}\\\": file not found or is zero-length. Ignoring...\"\n        continue\n    fi\n\n    system=\"${CUSTOM_SYSTEM}\"\n    [[ -z \"${system}\" ]] && system=$(basename \"${gamelist_dir}\")\n    if [[ ! -d \"${ROMS_DIR}/${system}\" ]]; then\n        echo \"WARNING: \\\"${ROMS_DIR}/${system}\\\": directory not found.\" >&2\n        echo \"You don't have a ROMs folder for a system named \\\"${system}\\\".\" >&2\n        echo \"Ignoring \\\"${original_gamelist}\\\"...\" >&2\n        continue\n    fi\n\n    # What file are we working on?\n    echo \"Working on: ${original_gamelist}\"\n    \n    # Make backup of gamelist and replace original\n    if [ \"${REPLACE_GAMELIST}\" = true ]; then\n      cat \"${original_gamelist}\" > \"${backup_gamelist}\"\n      clean_gamelist=\"${original_gamelist}\"\n      original_gamelist=\"${backup_gamelist}\"\n    fi\n    \n    # use a temp file to convert \"&\" to \"&amp: on the whole gamelist.xml even if the file has both \"&\" and \"&amp;\"\n    temp_gamelist=\"/tmp/gamelist-${system}.xml\"\n    sed \"s/\\&/&amp;/g; s/;amp;/;/g; s/&amp;#39;/'/g\" \"${original_gamelist}\" > \"${temp_gamelist}\"\n    original_gamelist=$(readlink -f \"${temp_gamelist}\")\n    cat \"${original_gamelist}\" > \"${clean_gamelist}\"\n\n    # Check to see if we have any entries before we try to loop over them.\n    xml_entries=$(xmlstarlet sel -t -v \"/gameList/game/path\" \"${original_gamelist}\")\n    if [[ -z ${xml_entries} ]]; then\n        echo \"No entries found, file is empty.\"\n        echo\n        echo\n        continue\n    fi\n    \n    while read -r path; do\n        #it seems xmlstarlet will convert '&amp;' internally, so remove it from the path or else the node will not be found\n        path=\"${path//&amp;/&}\"\n        full_path=\"${path}\"\n        [[ \"${path}\" == ./* ]] && full_path=\"${ROMS_DIR}/${system}/${path}\"\n        [[ -f \"${full_path}\" ]] && continue\n\n        xmlstarlet ed -L -d \"/gameList/game[path=\\\"${path}\\\"]\" \"${clean_gamelist}\"\n        echo \"The game with <path> = \\\"${path}\\\" has been removed from xml.\"\n    done < <(xmlstarlet sel -t -v \"/gameList/game/path\" \"${original_gamelist}\"; echo)\n    echo\n    echo \"The \\\"${clean_gamelist}\\\" is ready!\"\n    echo\n    echo \"See the difference between file sizes:\"\n    du -h \"${original_gamelist}\" \"${clean_gamelist}\"\n    rm \"${temp_gamelist}\"\n    echo\n    echo\ndone\n\nif [ \"${ELIMINATE_BACKUPS}\" = true ];then\n    echo \"Removing backups....\"\n    eliminate_backup_files\nfi\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/hypseus.start.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\ndir=\"${1}\"\nname=${dir##*/}\nname=${name%.*}\nconfig=\"/storage/.config/emuelec/configs/hypseus\"\nconfigfile=\"${config}/hypinput.ini\"\n\nexport AUDIODEV=hw:0,0\n\nif [[ ! -f \"${config}/ee_updated\" ]]; then\n    cp \"/usr/config/emuelec/configs/hypseus/hypinput_gamepad.ini\" \"${configfile}\"\nfi\ntouch \"${config}/ee_updated\"\n\nif [[ -f \"${dir}/${name}.commands\" ]]; then\n    params=$(<\"${dir}/${name}.commands\")\nfi\n\n# Not all gamepads use a trigger.\nsed -i 's|AXIS_TRIGGER_RIGHT|BUTTON_X AXIS_TRIGGER_RIGHT|' ${configfile}\n\ncd \"${config}\"\n\nif [[ -f \"${dir}/${name}.singe\" ]]; then\n    hypseus singe vldp -gamepad -manymouse -framefile \"${dir}/${name}.txt\" -script \"${dir}/${name}.singe\" -fullscreen -useoverlaysb 2 ${params}\nelse\n    hypseus \"${name}\" vldp -gamepad -manymouse -framefile \"${dir}/${name}.txt\" -fullscreen -useoverlaysb 2 ${params}\nfi\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/joy2key.py",
    "content": "#!/usr/bin/python\n\n# This file is part of The RetroPie Project\n# \n# The RetroPie Project is the legal property of its developers, whose names are\n# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.\n# \n# See the LICENSE.md file at the top-level directory of this distribution and \n# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md\n#\n\nimport os, sys, struct, time, fcntl, termios, signal\nimport curses, errno, re\nfrom pyudev import Context\n\n\n#    struct js_event {\n#        __u32 time;     /* event timestamp in milliseconds */\n#        __s16 value;    /* value */\n#        __u8 type;      /* event type */\n#        __u8 number;    /* axis/button number */\n#    };\n\nJS_MIN = -32768\nJS_MAX = 32768\nJS_REP = 0.20\n\nJS_THRESH = 0.75\n\nJS_EVENT_BUTTON = 0x01\nJS_EVENT_AXIS = 0x02\nJS_EVENT_INIT = 0x80\n\nCONFIG_DIR = '/storage/.config/'\nRETROARCH_CFG = CONFIG_DIR + 'retroarch/retroarch.cfg'\nBUTTON_CFG = CONFIG_DIR + 'emuelec/configs/buttonmapping.cfg'\n\ndef ini_get(key, cfg_file):\n    pattern = r'[ |\\t]*' + key + r'[ |\\t]*=[ |\\t]*'\n    value_m = r'\"*([^\"\\|\\r]*)\"*'\n    value = ''\n    with open(cfg_file, 'r') as ini_file:\n        for line in ini_file:\n            if re.match(pattern, line):\n                value = re.sub(pattern + value_m + '.*\\n', r'\\1', line)\n                break\n    return value\n\ndef get_btn_num(btn, cfg):\n    num = ini_get('input_' + btn + '_btn', cfg)\n    if num: return num\n    num = ini_get('input_player1_' + btn + '_btn', cfg)\n    if num: return num\n    return ''\n\ndef sysdev_get(key, sysdev_path):\n    value = ''\n    for line in open(sysdev_path + key, 'r'):\n        value = line.rstrip('\\n')\n        break\n    return value\n\ndef get_button_codes(dev_path):\n    js_cfg_dir = '/tmp/joypads/'\n    js_cfg = ''\n    dev_name = ''\n    dev_button_codes = list(default_button_codes)\n\n    for device in Context().list_devices(DEVNAME=dev_path):\n        sysdev_path = os.path.normpath('/sys' + device.get('DEVPATH')) + '/'\n        if not os.path.isfile(sysdev_path + 'name'):\n            sysdev_path = os.path.normpath(sysdev_path + '/../') + '/'\n        # getting joystick name\n        dev_name = sysdev_get('name', sysdev_path)\n        # getting joystick vendor ID\n        dev_vendor_id = int(sysdev_get('id/vendor', sysdev_path), 16)\n        # getting joystick product ID\n        dev_product_id = int(sysdev_get('id/product', sysdev_path), 16)\n    if not dev_name:\n        return dev_button_codes\n\n    # getting retroarch config file for joystick\n    for f in os.listdir(js_cfg_dir):\n        if f.endswith('.cfg'):\n            input_device = ini_get('input_device', js_cfg_dir + f)\n            input_vendor_id = ini_get('input_vendor_id', js_cfg_dir + f)\n            input_product_id = ini_get('input_product_id', js_cfg_dir + f)\n            if (input_device == dev_name and\n               (input_vendor_id  == '' or int(input_vendor_id)  == dev_vendor_id) and\n               (input_product_id == '' or int(input_product_id) == dev_product_id)):\n                js_cfg = js_cfg_dir + f\n                break\n    if not js_cfg:\n        js_cfg = RETROARCH_CFG\n\n    # getting configs for dpad from second line of BUTTON_CFG\n    btn_map = []\n    with open(BUTTON_CFG,'r') as f:\n        for button in f.readlines()[1].rstrip().split(' '):\n            btn_map.append(button)\n    btn_num = {}\n    biggest_num = 0\n    i = 0\n    for btn in list(btn_map):\n        if i >= len(dev_button_codes):\n            break\n        try:\n            btn_num[btn] = int(get_btn_num(btn, js_cfg))\n        except ValueError:\n            btn_map.pop(i)\n            dev_button_codes.pop(i)\n            btn_num.pop(btn, None)\n            continue\n        if btn_num[btn] > biggest_num:\n            biggest_num = btn_num[btn]\n        i += 1\n\n    # building the button codes list\n    btn_codes = [''] * (biggest_num + 1)\n    i = 0\n    for btn in btn_map:\n        if i >= len(dev_button_codes):\n            break\n        btn_codes[btn_num[btn]] = dev_button_codes[i]\n        i += 1\n    try:\n        # if button A is <enter> and menu_swap_ok_cancel_buttons is true, swap buttons A and B functions\n        if (ini_get('menu_swap_ok_cancel_buttons', RETROARCH_CFG) == 'true' and\n           'a' in btn_num and 'b' in btn_num and btn_codes[btn_num['a']] == '\\n'):\n            btn_codes[btn_num['a']] = btn_codes[btn_num['b']]\n            btn_codes[btn_num['b']] = '\\n'\n    except (IOError, ValueError):\n        pass\n\n    return btn_codes\n\ndef signal_handler(signum, frame):\n    signal.signal(signal.SIGINT, signal.SIG_IGN)\n    signal.signal(signal.SIGTERM, signal.SIG_IGN)\n    if (js_fds):\n        close_fds(js_fds)\n    if (tty_fd):\n        tty_fd.close()\n    sys.exit(0)\n\ndef get_hex_chars(key_str):\n    if (key_str.startswith(\"0x\")):\n        return key_str[2:].decode('hex')\n    else:\n        return curses.tigetstr(key_str)\n\ndef get_devices():\n    devs = []\n    if sys.argv[1] == '/dev/input/jsX':\n        for dev in os.listdir('/dev/input'):\n            if dev.startswith('js'):\n                devs.append('/dev/input/' + dev)\n    else:\n        devs.append(sys.argv[1])\n\n    return devs\n\ndef open_devices():\n    devs = get_devices()\n\n    fds = []\n    for dev in devs:\n        try:\n            fds.append(os.open(dev, os.O_RDONLY | os.O_NONBLOCK ))\n            js_button_codes[fds[-1]] = get_button_codes(dev)\n        except (OSError, ValueError):\n            pass\n\n    return devs, fds\n\ndef close_fds(fds):\n    for fd in fds:\n        os.close(fd)\n\ndef read_event(fd):\n    while True:\n        try:\n            event = os.read(fd, event_size)\n        except OSError, e:\n            if e.errno == errno.EWOULDBLOCK:\n                return None\n            return False\n\n        else:\n            return event\n\ndef process_event(event):\n\n    (js_time, js_value, js_type, js_number) = struct.unpack(event_format, event)\n\n    # ignore init events\n    if js_type & JS_EVENT_INIT:\n        return False\n\n    hex_chars = \"\"\n\n    if js_type == JS_EVENT_BUTTON:\n        if js_number < len(button_codes) and js_value == 1:\n            hex_chars = button_codes[js_number]\n\n    if js_type == JS_EVENT_AXIS and js_number <= 7:\n        if js_number % 2 == 0:\n            if js_value <= JS_MIN * JS_THRESH:\n                hex_chars = axis_codes[0]\n            if js_value >= JS_MAX * JS_THRESH:\n                hex_chars = axis_codes[1]\n        if js_number % 2 == 1:\n            if js_value <= JS_MIN * JS_THRESH:\n                hex_chars = axis_codes[2]\n            if js_value >= JS_MAX * JS_THRESH:\n                hex_chars = axis_codes[3]\n\n    if hex_chars:\n        for c in hex_chars:\n            fcntl.ioctl(tty_fd, termios.TIOCSTI, c)\n        return True\n\n    return False\n\njs_fds = []\ntty_fd = []\n\nsignal.signal(signal.SIGINT, signal_handler)\nsignal.signal(signal.SIGTERM, signal_handler)\n\n# daemonize when signal handlers are registered\nif os.fork():\n    os._exit(0)\n\njs_button_codes = {}\nbutton_codes = []\ndefault_button_codes = []\naxis_codes = []\n\ncurses.setupterm()\n\ni = 0\n# Read mapped buttons from first line of BUTTON_CFG\nargs = []\nwith open(BUTTON_CFG,'r') as f:\n    for mapping in f.readlines()[0].rstrip().split(' '):\n        args.append(mapping)\nfor arg in args:\n    chars = get_hex_chars(arg)\n    if i < 4:\n        axis_codes.append(chars)\n\n    default_button_codes.append(chars)\n    i += 1\n\nevent_format = 'IhBB'\nevent_size = struct.calcsize(event_format)\n\ntty_device = sys.argv[2] if len(sys.argv) >= 3 else '/dev/tty'\n\ntry:\n    tty_fd = open(tty_device, 'a')\nexcept IOError:\n    print 'Unable to open {}'.format(tty_device)\n    sys.exit(1)\n\nrescan_time = time.time()\nwhile True:\n    do_sleep = True\n    if not js_fds:\n        js_devs, js_fds = open_devices()\n        if js_fds:\n            i = 0\n            current = time.time()\n            js_last = [None] * len(js_fds)\n            for js in js_fds:\n                js_last[i] = current\n                i += 1\n        else:\n            time.sleep(1)\n    else:\n        i = 0\n        for fd in js_fds:\n            event = read_event(fd)\n            if event:\n                do_sleep = False\n                if time.time() - js_last[i] > JS_REP:\n                    if fd in js_button_codes:\n                        button_codes = js_button_codes[fd]\n                    else:\n                        button_codes = default_button_codes\n                    if process_event(event):\n                        js_last[i] = time.time()\n            elif event == False:\n                close_fds(js_fds)\n                js_fds = []\n                break\n            i += 1\n\n    if time.time() - rescan_time > 2:\n        rescan_time = time.time()\n        if cmp(js_devs, get_devices()):\n            close_fds(js_fds)\n            js_fds = []\n\n    if do_sleep:\n        time.sleep(0.01)\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/joy_common.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present Joshua L (https://github.com/Langerz82)\n\n# 08/01/23 - Joshua L - Modified get GUID thanks to shantigilbert.\n# 16/10/25 - Joshua L - Modified uses sdljoytest.\n# 22/02/26 - Joshua L - Added js instance ID.\n# 23/02/26 - Pablo S - Added ES Ordering fixes. (https://github.com/pmsobrado)\n\n# Source predefined functions and variables\n. /etc/profile\n\nGCDB=\"${SDL_GAMECONTROLLERCONFIG_FILE}\"\n\nEMULATOR=\"${1}\"\n\nFIXED_ORDER=0\n[[ \"${2}\" == \"fixed_order\" ]] && FIXED_ORDER=1\n\nmkdir -p \"/tmp/jc\"\n\nGAMEPAD_INFO_ALL=\"/tmp/jc/gamepad_info.txt\"\n\nCONTROLLERS_PRIORITY_DATA=\n[[ -f \"/tmp/controllerconfig.txt\" ]] && CONTROLLERS_PRIORITY_DATA=$(cat \"/tmp/controllerconfig.txt\")\n\njc_wipe_config_sub_heading() {\n    local config_file=\"$1\"\n    local sub_heading=\"$2\"\n    local tmp_file=\"$3\"\n\n    shift\n    shift\n    shift\n\n    declare -a array_ref=(\"$@\")\n\n    [[ -f \"${tmp_file}\" ]] && rm \"${tmp_file}\"\n    local LN=1\n    local START_LN=-1\n    [[ ! -f \"${config_file}\" ]] && return\n    local REGEX_SUB_HEADING='^\\[.+\\]$'\n    local SUB_HEADING_ACTIVE=0\n    while read -r line; do\n      if [[ \"${line}\" =~ $REGEX_SUB_HEADING ]]; then\n        if [[ \"${line}\" == \"${sub_heading}\" ]]; then\n          START_LN=${LN}\n          SUB_HEADING_ACTIVE=1\n        else\n          [[ ${START_LN} != -1 ]] && break\n        fi\n      fi\n      LN=$(( LN + 1 ))\n      if [[ \"${SUB_HEADING_ACTIVE}\" == 1 ]]; then\n        for item in \"${array_ref[@]}\"; do\n          local rx=\"^${item}\\ *\\=.+$\"\n          [[ \"${line}\" =~ ${rx} ]] && echo \"${line}\" >> ${tmp_file}\n        done\n      fi\n    done < ${config_file}\n    if [[ ${START_LN} != -1 ]]; then\n      sed -i \"${START_LN},$(( LN-1 ))d\" \"${config_file}\"\n    fi\n}\n\njc_set_record() {\n  local FILE=$1\n  local HEADER=$2\n  local KEY=$3\n  local VALUE=$4\n\n  local rec=$( cat \"${FILE}\" | grep -e \"^${KEY} *= *.*$\" )\n  if [[ -z \"${rec}\" ]]; then\n    sed -i \"/${HEADER}/a ${KEY} = ${RUMBLE}\" \"${EMU_FILE}\"\n  else\n    sed -i \"s/^${KEY} *= *.*$/${KEY} = ${VALUE}/g\" \"${EMU_FILE}\"\n  fi\n}\n\njc_get_config() {\n  local GAMEPAD_DATA=$(cat ${GAMEPAD_INFO_ALL} | grep -E -A6 \"^Gamepad ${1}$\")\n  [[ -z \"${GAMEPAD_DATA}\" ]] && echo '' && return\n\n  mapfile -t GAMEPAD_INFO < <(echo \"${GAMEPAD_DATA}\")\n\n  local JOY_UDEV_NAME=\"$( echo \"${GAMEPAD_INFO[1]}\" | cut -c18- )\"\n  local JOY_SDL_NAME=\"$( echo \"${GAMEPAD_INFO[2]}\" | cut -c18- )\"\n  local DEVICE_GUID=\"$( echo \"${GAMEPAD_INFO[3]}\" | cut -c18- )\"\n  local JOYMAPPING=\"$( echo \"${GAMEPAD_INFO[4]}\" | cut -c18- )\"\n  local INSTANCE_ID=\"$( echo \"${GAMEPAD_INFO[5]}\" | cut -c18- )\"\n  local JS_INDEX=\"$( echo \"${GAMEPAD_INFO[6]}\" | cut -c18- )\"\n\n  echo js${JS_INDEX} ${DEVICE_GUID} \\\"${JOY_UDEV_NAME}\\\" \\\"${JOYMAPPING}\\\" \\\"${JOY_SDL_NAME}\\\"\n}\n\njc_get_order_indexes() {\n  local MAX_VALUE=$1\n  shift\n  local GUIDS=(${@})\n  local PLAYER_ORDER=()\n  for i in {0..3}; do\n    local CURRENT_GUID=${GUIDS[${i}]}\n    local PINDEX=\n\n    # 1. Get player for this physical index (jci)\n    if [[ ! -z \"${CURRENT_GUID}\" ]] && [[ ! -z \"${CONTROLLERS_PRIORITY_DATA}\" ]]; then\n      local priority_record=$( echo \"${CONTROLLERS_PRIORITY_DATA}\" | grep -o \"\\-p[1-4]index [0-9] -p[1-4]guid ${CURRENT_GUID}\" | head -n1 )\n      if [[ ! -z \"${priority_record}\" ]]; then\n        CONTROLLERS_PRIORITY_DATA=$( echo $CONTROLLERS_PRIORITY_DATA | sed \"s/${priority_record}//g\" )\n        PINDEX=$(echo \"${priority_record}\" | cut -c3 )\n        [[ -n \"${PINDEX}\" ]] && PINDEX=$(( PINDEX - 1 ))\n      fi\n    fi\n\n    # 2. If it does not exist on the priority settings, assign default one but respecting reserved joypad slots\n    if [[ ! -n \"${PINDEX}\" ]]; then\n      for (( i = 0; i < MAX_VALUE; i++ ))\n      do\n        PINDEX=$i\n        [[ ! \" ${PLAYER_ORDER[@]} \" =~ \" ${PINDEX} \" ]] && break\n      done\n    fi\n    PLAYER_ORDER+=(\"${PINDEX}\")\n  done\n  echo \"${PLAYER_ORDER[@]}\"\n}\n\njc_get_players() {\n  gamepad_info -more > ${GAMEPAD_INFO_ALL}\n\n  declare -a player_cfgs=()\n  declare -a player_guids=()\n\n  for i in {0..3}; do\n    local CFG=$( jc_get_config \"${i}\" )\n    local GUID=$(echo \"${CFG}\" | awk '{print $2}')\n\n    [[ ! -z \"${GUID}\" ]] && player_guids+=(\"${GUID}\")\n    player_cfgs+=(\"${CFG}\")\n  done\n\n  local player_order=(0 1 2 3)\n  if [[ \"${FIXED_ORDER}\" == \"0\" ]]; then\n    player_order=($( jc_get_order_indexes 4 \"${player_guids[@]}\"))\n  fi\n\n  for i in {0..3}; do\n      local pi=$(( i + 1 ))\n      clean_pad ${pi}\n      local order=${player_order[${i}]}\n      local cfg=${player_cfgs[${order}]}\n      [[ ! -z \"${cfg}\" ]] && eval set_pad ${pi} ${cfg} ${order}\n  done\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/killes.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n if pgrep -x \"/usr/bin/emulationstation\" > /dev/null\n  then\n    killall -9 emulationstation\n  fi\n\n exit 0\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/ldd_32",
    "content": "#! /bin/sh\n# Copyright (C) 1996-2019 Free Software Foundation, Inc.\n# This file is part of the GNU C Library.\n\n# The GNU C Library is free software; you can redistribute it and/or\n# modify it under the terms of the GNU Lesser General Public\n# License as published by the Free Software Foundation; either\n# version 2.1 of the License, or (at your option) any later version.\n\n# The GNU C Library is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# Lesser General Public License for more details.\n\n# You should have received a copy of the GNU Lesser General Public\n# License along with the GNU C Library; if not, see\n# <http://www.gnu.org/licenses/>.\n\n\n# This is the `ldd' command, which lists what shared libraries are\n# used by given dynamically-linked executables.  It works by invoking the\n# run-time dynamic linker as a command and setting the environment\n# variable LD_TRACE_LOADED_OBJECTS to a non-empty value.\n\n# We should be able to find the translation right at the beginning.\nTEXTDOMAIN=libc\nTEXTDOMAINDIR=/usr/share/locale\n\nRTLDLIST=/usr/lib/ld-linux-armhf.so.3\nwarn=\nbind_now=\nverbose=\n\nwhile test $# -gt 0; do\n  case \"$1\" in\n  --vers | --versi | --versio | --version)\n    echo 'ldd (GNU libc) 2.29'\n    printf $\"Copyright (C) %s Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions.  There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\" \"2019\"\n    printf $\"Written by %s and %s.\n\" \"Roland McGrath\" \"Ulrich Drepper\"\n    exit 0\n    ;;\n  --h | --he | --hel | --help)\n    echo $\"Usage: ldd [OPTION]... FILE...\n      --help              print this help and exit\n      --version           print version information and exit\n  -d, --data-relocs       process data relocations\n  -r, --function-relocs   process data and function relocations\n  -u, --unused            print unused direct dependencies\n  -v, --verbose           print all information\n\"\n    printf $\"For bug reporting instructions, please see:\\\\n%s.\\\\n\" \\\n      \"<http://www.gnu.org/software/libc/bugs.html>\"\n    exit 0\n    ;;\n  -d | --d | --da | --dat | --data | --data- | --data-r | --data-re | \\\n  --data-rel | --data-relo | --data-reloc | --data-relocs)\n    warn=yes\n    shift\n    ;;\n  -r | --f | --fu | --fun | --func | --funct | --functi | --functio | \\\n  --function | --function- | --function-r | --function-re | --function-rel | \\\n  --function-relo | --function-reloc | --function-relocs)\n    warn=yes\n    bind_now=yes\n    shift\n    ;;\n  -v | --verb | --verbo | --verbos | --verbose)\n    verbose=yes\n    shift\n    ;;\n  -u | --u | --un | --unu | --unus | --unuse | --unused)\n    unused=yes\n    shift\n    ;;\n  --v | --ve | --ver)\n    echo >&2 $\"ldd: option \\`$1' is ambiguous\"\n    exit 1\n    ;;\n  --)\t\t# Stop option processing.\n    shift; break\n    ;;\n  -*)\n    echo >&2 'ldd:' $\"unrecognized option\" \"\\`$1'\"\n    echo >&2 $\"Try \\`ldd --help' for more information.\"\n    exit 1\n    ;;\n  *)\n    break\n    ;;\n  esac\ndone\n\nnonelf ()\n{\n  # Maybe extra code for non-ELF binaries.\n  return 1;\n}\n\nadd_env=\"LD_TRACE_LOADED_OBJECTS=1 LD_WARN=$warn LD_BIND_NOW=$bind_now\"\nadd_env=\"$add_env LD_VERBOSE=$verbose\"\nif test \"$unused\" = yes; then\n  add_env=\"$add_env LD_DEBUG=\\\"$LD_DEBUG${LD_DEBUG:+,}unused\\\"\"\nfi\n\n# The following command substitution is needed to make ldd work in SELinux\n# environments where the RTLD might not have permission to write to the\n# terminal.  The extra \"x\" character prevents the shell from trimming trailing\n# newlines from command substitution results.  This function is defined as a\n# subshell compound list (using \"(...)\") to prevent parameter assignments from\n# affecting the calling shell execution environment.\ntry_trace() (\n  output=$(eval $add_env '\"$@\"' 2>&1; rc=$?; printf 'x'; exit $rc)\n  rc=$?\n  printf '%s' \"${output%x}\"\n  return $rc\n)\n\ncase $# in\n0)\n  echo >&2 'ldd:' $\"missing file arguments\"\n  echo >&2 $\"Try \\`ldd --help' for more information.\"\n  exit 1\n  ;;\n1)\n  single_file=t\n  ;;\n*)\n  single_file=f\n  ;;\nesac\n\nresult=0\nfor file do\n  # We don't list the file name when there is only one.\n  test $single_file = t || echo \"${file}:\"\n  case $file in\n  */*) :\n       ;;\n  *) file=./$file\n     ;;\n  esac\n  if test ! -e \"$file\"; then\n    echo \"ldd: ${file}:\" $\"No such file or directory\" >&2\n    result=1\n  elif test ! -f \"$file\"; then\n    echo \"ldd: ${file}:\" $\"not regular file\" >&2\n    result=1\n  elif test -r \"$file\"; then\n    test -x \"$file\" || echo 'ldd:' $\"\\\nwarning: you do not have execution permission for\" \"\\`$file'\" >&2\n    RTLD=\n    ret=1\n    for rtld in ${RTLDLIST}; do\n      if test -x $rtld; then\n\tverify_out=`${rtld} --verify \"$file\"`\n\tret=$?\n\tcase $ret in\n\t[02]) RTLD=${rtld}; break;;\n\tesac\n      fi\n    done\n    case $ret in\n    1)\n      # This can be a non-ELF binary or no binary at all.\n      nonelf \"$file\" || {\n\techo $\"\tnot a dynamic executable\"\n\tresult=1\n      }\n      ;;\n    0|2)\n      try_trace \"$RTLD\" \"$file\" || result=1\n      ;;\n    *)\n      echo 'ldd:' ${RTLD} $\"exited with unknown exit code\" \"($ret)\" >&2\n      exit 1\n      ;;\n    esac\n  else\n    echo 'ldd:' $\"error: you do not have read permission for\" \"\\`$file'\" >&2\n    result=1\n  fi\ndone\n\nexit $result\n# Local Variables:\n#  mode:ksh\n# End:\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/mount_romfs.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\n# Source predefined functions and variables\n. /etc/profile\n\nROMS_PART_LABEL='EEROMS'\nROMS_PART_FS_CONFIG='/flash/ee_fstype'\nROMS_FILE_MARK='emuelecroms'\nROMS_DIR_NAME='roms'\nROMS_DIR_ACTUAL=\"/storage/${ROMS_DIR_NAME}\"\nUPDATE_DIR='/storage/.update'\nROMS_DIR_BACKUP=\"${ROMS_DIR_ACTUAL}_backup\"\nMEDIA_DIR='/var/media'\nROMS_DIR_MEDIA=\"${MEDIA_DIR}/${ROMS_PART_LABEL}\"\n\nif [ \"${1}\" == 'yes' ]; then\n  ACTION_ES_RESTART='yes'\n  echo 'Note: restart of EmulattionStation is requested, it will be restarted after roms is correctly mounted'\nelse\n  ACTION_ES_RESTART=''\nfi\n\nif [ \"${2}\" ]; then\n  ROMS_PART_MATCHER=\"${2}\"\nelse\n  ROMS_PART_MATCHER=\"$(get_ee_setting global.externalmount)\"\n  if [[ \"${ROMS_PART_MATCHER}\" == 'auto' || -z \"${ROMS_PART_MATCHER}\" ]]; then\n    echo 'Note: no specific externalmount defined in config or argument, will try to scan all possible external drives'\n    ROMS_PART_MATCHER='*'\n  fi\nfi\n\nget_mount_list() {  # MOUNTPOINT should be set/gotten by outer functions\n  local IFS=$'\\n'\n  MOUNTLIST=($(printf \"$(cat /proc/mounts | cut -d ' ' -f 2)\")) # Use printf to convert \\040, \\134, etc back to ' ', '\\', etc\n}\n\numount_recursively() { # ${1}: start point, e.g. /storage. This is a replica of umount -r from standard Linux distros\n  [ -z \"${1}\" ] && return 1\n  local TARGET=\"$(readlink -f \"${1}\")\"\n  [ -z \"${TARGET}\" ] && TARGET=\"$(pwd -P)/${1}\"\n  echo \"WARNING: unmounting '${TARGET}', recursively\"\n  local IFS=$'\\n'\n  UMOUNTLIST=($(printf \"$(cat /proc/mounts | cut -d ' ' -f 2)\" | grep ^\"${TARGET}\"'\\(/\\|$\\)' | sort -r ))\n  unset IFS\n  local MOUNTPOINT\n  local TRY\n  for MOUNTPOINT in \"${UMOUNTLIST[@]}\"; do\n    for TRY in {0..2}; do # Brute force, hope we only run once\n      sync\n      if umount -f \"${MOUNTPOINT}\"; then\n        echo \"Successfully umounted '${MOUNTPOINT}'\"\n        break\n      fi\n      sleep 1\n    done\n  done\n}\n\nmove_merge() { #${1} source dir, ${2} target dir\n  # e.g. move_merge /storage/roms_backup /storage/roms\n  [ -z \"${1}\" ] || [ -z \"${2}\" ] && return 1\n  local SOURCE=\"$(readlink -f \"${1}\")\"\n  local TARGET=\"$(readlink -f \"${2}\")\"\n  local PWD_SECURE=\"$(pwd -P)\"\n  [ -z \"${SOURCE}\" ] && SOURCE=\"${PWD_SECURE}/${1}\"\n  [ -z \"${TARGET}\" ] && TARGET=\"${PWD_SECURE}/${2}\"\n  echo \"WARNING: Merging '${SOURCE}' into '${TARGET}'\"\n  pushd \"${SOURCE}\" &>/dev/null\n  find . -type d -exec mkdir -p \"${TARGET}/\"\\{} \\; \n  find . -type f -exec mv \\{} \"${TARGET}/\"\\{} \\; \n  find . -type d -empty -delete\n  popd &>/dev/null\n}\n\n# Check if (multiple) EEROMS exists. By calling blkid we also force all drives to wake up\nscan_eeroms() {\n  BOOL_EEROMS_EXIST=''  # ='yes' if EEROMS exist, ='' if not\n  ROMS_PART_PATH=''  # The dev path for the EEROMS partition, shouldn't be empty if EEROMS_EXIST\n  ROMS_PART_TOKEN=''  # What we should use to mount eeroms, shouldn't be empty if EEROMS_EXIST, default is LABEL=EEROMS \n  # Get EEROMS filetype, vfat is default (considering capacity, it is most likely fat32)\n  if [ -e \"${ROMS_PART_FS_CONFIG}\" ]; then\n    ROMS_PART_FS=\"$(cat \"${ROMS_PART_FS_CONFIG}\")\"\n    case \"${ROMS_PART_FS}\" in\n      'ntfs'|'ext4'|'exfat'|'vfat')\n        : # Do nothing\n      ;;\n      *) # Always downgrade to vfat in case it's messed up\n        ROMS_PART_FS=\"vfat\"\n      ;;\n    esac \n  else\n    ROMS_PART_FS='vfat'\n  fi\n  LINE_EEROMS=\"$(blkid | grep \"LABEL=\\\"${ROMS_PART_LABEL}\\\"\")\" &>/dev/null\n  if [ \"${LINE_EEROMS}\" ]; then\n    ROMS_PART_FS_ACTUAL=''\n    roms_part_fs_from_line(){\n      ROMS_PART_FS_ACTUAL=\"$(sed -e 's/.* TYPE=\"\\([a-z0-9]\\+\\)\".*/\\1/' <<< \"${LINE_EEROMS}\")\"\n    }\n    if [ \"$(wc -l <<< \"${LINE_EEROMS}\")\" == 1 ]; then # Only one EEROMS, good\n      ROMS_PART_PATH=\"${LINE_EEROMS%%:*}\"\n      roms_part_fs_from_line\n    else # Multiple EEROMS\n      LINES_EEROMS=\"${LINE_EEROMS}\"\n      while read LINE_EEROMS; do\n        LINE_PART_PATH=\"${LINE_EEROMS%%:*}\"\n        if [ -z \"${ROMS_PART_PATH}\" ] || grep -q \"^${LINE_PART_PATH} ${ROMS_DIR_ACTUAL} \" '/proc/mounts'; then\n          # At least use the first EEROMS. We prefer the one already mounted\n          ROMS_PART_PATH=\"${LINE_PART_PATH}\"\n          roms_part_fs_from_line\n        fi\n      done <<< \"${LINES_EEROMS}\"\n    fi\n    if [ \"${ROMS_PART_PATH}\" ]; then\n      ROMS_PART_TOKEN=\"${ROMS_PART_PATH}\"\n    else # Failsafe, this shouldn't happen\n      ROMS_PART_TOKEN=\"LABEL=${ROMS_PART_LABEL}\"\n    fi\n    case \"${ROMS_PART_FS_ACTUAL}\" in \n      # Update roms part fs in case it's different from the config\n      'ntfs'|'ext4'|'exfat'|'vfat')\n        if [ \"${ROMS_PART_FS_ACTUAL}\" != \"${ROMS_PART_FS}\" ]; then\n          echo \"WARNING: Actual EEROMS partition fs type different from configured fs type ('${ROMS_PART_FS_ACTUAL}' != '${ROMS_PART_FS}'), fixing '${ROMS_PART_FS_CONFIG}'\"\n          mount -o rw,remount /flash\n          echo \"${ROMS_PART_FS_ACTUAL}\" > \"${ROMS_PART_FS_CONFIG}\"\n          mount -o ro,remount /flash\n        fi\n        BOOL_EEROMS_EXIST='yes'\n        ROMS_PART_FS=\"${ROMS_PART_FS_ACTUAL}\"\n      ;;\n      # If fs is not supported, then consider EEROMS does not exist\n      *)\n        echo \"ERROR: EEROMS partition fs not supported (${ROMS_PART_FS_ACTUAL}), please re-format it to one of the following fs: fat32, exfat, ext4, ntfs\"\n      ;;\n    esac\n  fi\n}\n\nis_storage_roms_mounted() {\n  if mountpoint -q \"${ROMS_DIR_ACTUAL}\" &>/dev/null; then\n    return 0\n  else\n    return 1\n  fi\n}\n\nmount_eeroms() { # ${1} where to mount\n  if [[ -L \"${1}\" || ! -d \"${1}\" ]]; then\n    rm -f \"${1}\" &>/dev/null\n    mkdir -p \"${1}\" &>/dev/null \n  fi\n  mount -t \"${ROMS_PART_FS}\" \"${ROMS_PART_TOKEN}\" \"${1}\" &>/dev/null\n  ROMS_PART_MOUNTPOINT=\"${1}\"\n}\n\numount_eeroms() {\n  if [ \"${ROMS_PART_PATH}\" ]; then\n    local i\n    local MOUNTPOINT_RAW\n    local MOUNTPOINT\n    for MOUNTPOINT_RAW in $(grep \"^${ROMS_PART_PATH} \" '/proc/mounts' | cut -d ' ' -f 2); do\n      MOUNTPOINT=\"$(printf ${MOUNTPOINT_RAW})\"\n      if [ \"${MOUNTPOINT}\" != \"${UPDATE_DIR}\" ]; then # Don't umount /storage/.update\n        for i in {0..2}; do\n          if grep -q \"^${ROMS_PART_PATH} ${MOUNTPOINT_RAW} \" '/proc/mounts' &>/dev/null; then\n            sync\n            umount -f \"${MOUNTPOINT}\" && break\n          else\n            break\n          fi\n          sleep 1\n        done\n      fi\n    done\n  else\n    echo 'ERROR: Failed to find valid EEROMS partition, impossible to umount it'\n    return 1\n  fi\n}\n\nmount_eeroms_to_media() {\n  if [ \"${BOOL_EEROMS_EXIST}\" ]; then\n    if [ -d \"${ROMS_DIR_MEDIA}\" ]; then\n      if grep -q \"^${ROMS_PART_PATH} ${ROMS_DIR_MEDIA} \" '/proc/mounts' &>/dev/null; then\n        return\n      else\n        umount_recursively \"${ROMS_DIR_MEDIA}\" &>/dev/null\n      fi\n    fi\n    umount_eeroms\n    mount_eeroms \"${ROMS_DIR_MEDIA}\"\n    echo \"Note: Moved EEROMS partition to '${ROMS_DIR_MEDIA}', you can still access your roms from there, but the roms inside it can't be scanned and used by EmulationStation\"\n  fi\n}\n\nmigrate_roms() { # ${1} source, ${2} target\n  echo \"Migrating roms: '${1}' => '${2}'\"\n  if mountpoint -q \"${1}\" &>/dev/null || mountpoint -q \"${2}\" &>/dev/null; then\n    echo 'ERROR: Refuse to migrate as one of the source/target folder is a mountpoint!'\n    return\n  elif [[ -L \"${2}\" || ! -d \"${2}\" ]]; then # Easy, just move it\n    rm -f \"${2}\" &>/dev/null\n    mv \"${1}\" \"${2}\"\n  else # We need to move-merge roms_backup into roms\n    move_merge \"${1}\" \"${2}\"\n    rm -rf \"${1}\" &>/dev/null\n  fi\n}\n\nbackup_roms() {\n  echo 'Preparing to backup roms...'\n  umount_recursively \"${ROMS_DIR_ACTUAL}\"\n  umount_recursively \"${ROMS_DIR_BACKUP}\" # Usually /storage/roms_backup shouldn't be mounted, but we do this in case something wrong happened\n  if is_storage_roms_mounted; then\n    echo \"ERROR: refuse to backup roms since '${ROMS_DIR_ACTUAL}' is a mountpoint, we will only backup roms if '${ROMS_DIR_ACTUAL}' is an folder directly stored on the underlying disk\"\n    return 1\n  elif [ -d \"${ROMS_DIR_ACTUAL}\" ]; then\n    echo 'Backing up roms...'\n    migrate_roms \"${ROMS_DIR_ACTUAL}\" \"${ROMS_DIR_BACKUP}\"\n  elif [ -e \"${ROMS_DIR_ACTUAL}\" ]; then\n    # Don't mess up with our intended layout\n    echo \"WARNING: '${ROMS_DIR_BACKUP}' exists but is not a folder. No roms are backed up\"\n    return 1\n  else\n    echo 'Note: no roms need to be backed up'\n  fi\n}\n\nrestore_roms() {\n  echo 'Preparing to restore roms...'\n  umount_recursively \"${ROMS_DIR_ACTUAL}\"\n  umount_recursively \"${ROMS_DIR_BACKUP}\" # Usually /storage/roms_backup shouldn't be mounted, but we do this in case something wrong happened\n  if is_storage_roms_mounted; then\n    echo \"ERROR: refuse to restore roms since '${ROMS_DIR_ACTUAL}' is a mountpoint, we will only restore roms if '${ROMS_DIR_ACTUAL}' is an folder directly stored on the underlying disk\"\n    return 1\n  elif [ -d \"${ROMS_DIR_BACKUP}\" ]; then\n    echo 'Restoring roms...'\n    migrate_roms \"${ROMS_DIR_BACKUP}\" \"${ROMS_DIR_ACTUAL}\"\n  elif [ -e \"${ROMS_DIR_BACKUP}\" ]; then\n    # Don't mess up with our intended layout\n    echo \"WARNING: '${ROMS_DIR_BACKUP}' exists but is not a folder. No roms are restored\"\n    return 1\n  else\n    echo 'Note: no roms need to be restored'\n  fi\n}\n\nprepare_scan() {\n  ROMS_PART_MOUNTPOINT=''\n  echo \"Preparing to scan for roms mounts...\"\n  echo \"Stopping samba to avoid I/O conflicts...\"\n  systemctl stop smbd.service # Stop samba to avoid I/O conflicts\n  LOAD_DELAY=\"$(get_ee_setting ee_load.delay)\" # The delay is waited before we check for EEROMS\n  [ \"${LOAD_DELAY}\" ] && sleep \"${LOAD_DELAY}\"\n  scan_eeroms\n}\n\nensure_dir_update_mounted() {\n  if [[ -L \"${UPDATE_DIR}\" || ! -d \"${UPDATE_DIR}\" ]]; then\n    rm -rf \"${UPDATE_DIR}\" &>/dev/null\n    mkdir -p \"${UPDATE_DIR}\" &>/dev/null\n  fi\n  # This should only be useful for the very first boot after a user re-format EEROMS yet forgot to update ee_fstype\n  if [ \"${BOOL_EEROMS_EXIST}\" ]  && ! mountpoint -q \"${UPDATE_DIR}\" &>/dev/null; then\n    if [ -z \"${ROMS_PART_MOUNTPOINT}\" ]; then\n      ROMS_PART_MOUNTPOINT=\"$(mktemp -d)\"\n      mount_eeroms \"${ROMS_PART_MOUNTPOINT}\"\n      BOOL_ROMS_TEMP='yes'\n    else\n      BOOL_ROMS_TEMP=''\n    fi\n    ROMS_DIR_UPDATE=\"${ROMS_PART_MOUNTPOINT}/.update\"\n    if [[ -L \"${ROMS_DIR_UPDATE}\" || ! -d \"${ROMS_DIR_UPDATE}\" ]]; then\n      rm -rf \"${ROMS_DIR_UPDATE}\" &>/dev/null\n      mkdir -p \"${ROMS_DIR_UPDATE}\" &>/dev/null\n    fi\n    mount --bind \"${ROMS_DIR_UPDATE}\" \"${UPDATE_DIR}\" &>/dev/null\n    if [ \"${BOOL_ROMS_TEMP}\" ]; then\n      umount_recursively \"${ROMS_PART_MOUNTPOINT}\"\n      rm -rf \"${ROMS_PART_MOUNTPOINT}\" &>/dev/null\n    fi\n  fi\n}\n\nfinish_scan() {\n  ensure_dir_update_mounted\n  echo \"Finished scanning for roms mounts...\"\n  echo \"Bringing back samba...\"\n  systemctl start smbd.service\n  \n  #echo \"Mounting ports_scripts...\"\n  #if [ -L \"/storage/roms\" ]; then\n  #  local LINK=$(readlink /storage/roms)\n  #else\n  #  local LINK=\"/storage/roms\"\n  #fi\n  # Just in case\n  #mkdir -p \"${LINK}/ports_scripts\"\n  #mkdir -p \"/emuelec/ports\"\n  #mkdir -p \"/storage/.tmp/ports-workdir\"\n  #umount \"/storage/roms/ports_scripts\" &>/dev/null\n  #umount \"/var/media/EEROMS/roms/ports_scripts\" &>/dev/null\n\n  #mount -t overlay ports -o lowerdir=/usr/bin/ports,upperdir=/emuelec/ports,workdir=/storage/.tmp/ports-workdir \"${LINK}/ports_scripts\"\n}\n\nif compgen -G /storage/.config/system.d/storage-roms*.mount &>/dev/null; then\n  prepare_scan\n  echo 'Note: mount unit starts with storage-roms found under /storage/.config/system.d, we will only try to mount these units and will not scan for external drives'\n  # User defined mount units, most likely samba mounts\n  BOOL_DAEMON_RELOADED=''\n  SYSTEMD_UNIT_NAME='storage-roms.mount'\n  SYSTEMD_UNIT_PATH=\"/storage/.config/system.d/${SYSTEMD_UNIT_NAME}\"\n  mount_samba_and_notice() {\n    if [ -z \"${BOOL_DAEMON_RELOAD}\" ]; then # Only reload once, to save time\n      BOOL_DAEMON_RELOADED='yes'\n      systemctl daemon-reload\n    fi\n    systemctl start \"${SYSTEMD_UNIT_NAME}\" &>/dev/null\n    systemctl is-active --quiet \"${SYSTEMD_UNIT_NAME}\" && echo \"Mounted '${SYSTEMD_UNIT_PATH}' from samba roms\"\n  }\n  # Only try to mount /storage/roms according to systemd if it's not mounted yet\n  if [ -f \"${SYSTEMD_UNIT_PATH}\" ]; then\n    echo \"Note: Systemd mount unit '${SYSTEMD_UNIT_NAME}' found, will try to mount the whole roms folder\"\n    # backup_roms No need to backup roms\n    umount_recursively \"${ROMS_DIR_ACTUAL}\"\n    mount_eeroms_to_media\n    if [[ -L \"${ROMS_DIR_ACTUAL}\" || ! -d \"${ROMS_DIR_ACTUAL}\" ]]; then\n      rm -f \"${ROMS_DIR_ACTUAL}\" &>/dev/null\n      mkdir -p \"${ROMS_DIR_ACTUAL}\"\n    fi\n    mount_samba_and_notice\n  fi\n  if ! is_storage_roms_mounted && [ \"${BOOL_EEROMS_EXIST}\" ]; then # If systemd mount units fail, then try to bring EEROMS back\n    umount_eeroms\n    mount_eeroms \"${ROMS_DIR_ACTUAL}\"\n  fi\n  is_storage_roms_mounted || restore_roms # If for some wierd reasons rom can't be mounted from the systemd unit and can't be brought back, then at least restore backed up roms\n  IFS=$'\\n'\n  SYSTEMD_UNIT_PATHS=($(ls -d /storage/.config/system.d/storage-roms-*.mount 2>/dev/null | sort))\n  unset IFS\n  if [ \"${#SYSTEMD_UNIT_PATHS[@]}\" -gt 0 ]; then\n    echo \"Note: Multiple systemd mount units for folders under '${ROMS_DIR_ACTUAL}' found, will try to mount the roms folders for specific systems\"\n    for SYSTEMD_UNIT_PATH in \"${SYSTEMD_UNIT_PATHS[@]}\"; do\n      [ ! -f \"${SYSTEMD_UNIT_PATH}\" ] && continue\n      # Note: systemd unit names need specific escape rules, which should be done by systemd-escape, and I really don't think users would make themselves suffer and create units with name like that\n      SYSTEMD_UNIT_NAME=\"$(basename ${SYSTEMD_UNIT_PATH})\"\n      MOUNTPOINT=\"$(grep ^Where= \"${SYSTEMD_UNIT_PATH}\")\"\n      umount_recursively \"${MOUNTPOINT:6}\"\n      mount_samba_and_notice\n    done\n  fi\n  finish_scan\nelif [[ ! -f \"${ROMS_DIR_ACTUAL}/${ROMS_FILE_MARK}\" || \"${ACTION_ES_RESTART}\" ]]; then\n  prepare_scan\n  echo \"Note: current '${ROMS_DIR_ACTUAL}' is not linked from external drives or es_restart requested, we'll try to scan for external roms\"\n  find_roms_mark() {\n    echo \"Finding roms mark (${ROMS_FILE_MARK})...\"\n    if ! compgen -G \"${MEDIA_DIR}/${ROMS_PART_MATCHER}/${ROMS_DIR_NAME}\" &>/dev/null; then\n      echo \"ERROR: no folders under '${MEDIA_DIR}' match the matcher '${ROMS_PART_MATCHER}' and contain roms folder, maybe you should adjust some settings?\"\n      ROMS_PATH_MARK=''\n      return 1\n    elif [ \"${ROMS_PART_MATCHER}\" == '*' ]; then\n      ROMS_PATH_MARK=\"$(find \"${MEDIA_DIR}/\"*\"/${ROMS_DIR_NAME}\" -maxdepth 1 -name ${ROMS_FILE_MARK}* -not -path \"${MEDIA_DIR}/${ROMS_PART_LABEL}/*\" 2>/dev/null | head -n 1)\" # Even we said the mark file should have no extension, but we still accept that, just in case\n    else\n      ROMS_PATH_MARK=\"$(find \"${MEDIA_DIR}/${ROMS_PART_MATCHER}/${ROMS_DIR_NAME}\" -maxdepth 1 -name ${ROMS_FILE_MARK}* -not -path \"${MEDIA_DIR}/${ROMS_PART_LABEL}/*\" 2>/dev/null | head -n 1)\"\n    fi\n  }\n  find_roms_mark\n  if [ -z \"${ROMS_PATH_MARK}\" ]; then\n    TRY=1\n    RETRY=\"$(get_ee_setting ee_mount.retry)\"\n    if [ \"${RETRY}\" -ge 1 ]; then\n      while [ \"${TRY}\" -le \"${RETRY}\" ] ; do\n        echo \"WARNING: Roms mark not found (${ROMS_FILE_MARK}), retrying (${TRY}/${RETRY})\"\n        find_roms_mark\n        [ \"${EE_ROMS_PATH_MARK}\" ] && break\n        let TRY++\n        sleep 1\n      done\n    fi\n  fi\n  if [ -z \"${ROMS_PATH_MARK}\" ]; then\n    echo \"WARNING: No external mount mark found (${ROMS_FILE_MARK}), if you want to use external roms, make sure you set it correctly\"\n    # No external roms could be found, if EEROMS exists, make sure it's mounted, otherwise restore backed up roms if possible\n    if [ \"${BOOL_EEROMS_EXIST}\" ]; then\n      if ! is_storage_roms_mounted; then\n        echo \"Note: Remounting EEROMS to '${ROMS_DIR_ACTUAL}'\"\n        umount_eeroms \n        mount_eeroms \"${ROMS_DIR_ACTUAL}\"\n      fi\n    fi\n    if ! is_storage_roms_mounted; then\n      echo \"WARNING: '${ROMS_DIR_ACTUAL}' is not a mountpoint, checking if we should restore backed up roms\"\n      restore_roms  # If for some wierd reason EEROMS can't be mounted, then at least restore backed up roms\n    fi\n  else\n    echo \"Note: External mount mark found (${ROMS_PATH_MARK})\"\n    if [[ -f \"${ROMS_DIR_ACTUAL}/${ROMS_FILE_MARK}\" && \"$(readlink -f \"${ROMS_DIR_ACTUAL}/${ROMS_FILE_MARK}\")\" == \"$(readlink -f \"${ROMS_PATH_MARK}\")\" ]]; then\n      echo 'Note: This is the same external drive as we are using, no need to update'\n    else\n      echo \"Trying to create a symbol link at '${ROMS_DIR_ACTUAL}' to it\"\n      umount_recursively \"${ROMS_DIR_ACTUAL}\"\n      mount_eeroms_to_media\n      backup_roms\n      ROMS_DIR_EXTERNAL=\"$(dirname \"${ROMS_PATH_MARK}\")\"\n      echo \"Using '${ROMS_DIR_EXTERNAL}' as the external roms dir\"\n      rm -rf \"${ROMS_DIR_ACTUAL}\" &>/dev/null\n      if ln -sTf \"${ROMS_DIR_EXTERNAL}\" \"${ROMS_DIR_ACTUAL}\" &>/dev/null; then\n        echo \"Successfully create symbol link '${ROMS_DIR_ACTUAL}' pointing to '${ROMS_DIR_EXTERNAL}'\"\n      else\n        echo \"WARNING: Failed to create symbol link, restoring backed up roms if possible\"\n        restore_roms\n      fi\n    fi\n  fi\n  finish_scan\nelse\n  echo 'Note: no need to scan external roms, mount_romfs skipped'\nfi\n\nfind \"${ROMS_DIR_BACKUP}\" -maxdepth 0 -empty -exec rm -rf \\{} \\;\n\nif [ \"${ACTION_ES_RESTART}\" ]; then\n  echo 'Restarting EmulationStation as requested...'\n  systemctl restart emustation.service\nfi\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/pico8.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n. /etc/profile\n\n# If there is a new version copy the files\nif [[ -e \"/storage/roms/bios/pico-8\" ]]; then\n    mkdir -p /emuelec/bin/pico-8\n    cp -rf /storage/roms/bios/pico-8/* /emuelec/bin/pico-8\n    rm -rf /storage/roms/bios/pico-8\n    chmod +x /emuelec/bin/pico-8/pico8_dyn\n    touch /storage/roms/pico-8/splore.p8\n    \nfi \n\nif [ ! -L \"/storage/.config/emuelec/configs/pico-8/bbs/carts\" ]; then\n    mkdir -p /storage/.config/emuelec/configs/pico-8/bbs/\n    ln -sf /storage/roms/pico-8 /storage/.config/emuelec/configs/pico-8/bbs/carts\nfi\n\nif [[ \"${EE_DEVICE}\" == \"Amlogic-old\" ]]; then\nset_audio alsa\nmv /storage/.config/asound.conf /storage/.config/asound.conf2\nfi\n\nmkdir -p /emuelec/configs/pico-8\n\nif [[ ! -L \"/emuelec/configs/pico-8/sdl_controllers.txt\" ]]; then\n    rm /emuelec/configs/pico-8/sdl_controllers.txt\n    ln -sf /storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt /emuelec/configs/pico-8/sdl_controllers.txt\nfi\n\n#LD_LIBRARY_PATH=\"/emuelec/lib32:${LD_LIBRARY_PATH}\"\n\nCART=\"${1}\"\n\nif [[ \"${CART}\" == *\"/splore\"* ]]; then\n    /emuelec/bin/pico-8/pico8_dyn -splore -home /emuelec/configs/pico-8 -root_path /storage/roms/pico-8 -joystick 0\nelse\n    /emuelec/bin/pico-8/pico8_dyn -run \"${CART}\" -home /emuelec/configs/pico-8 -root_path /storage/roms/pico-8 -joystick 0\nfi\n\nif [[ \"${EE_DEVICE}\" == \"Amlogic-old\" ]]; then\nset_audio default\nmv /storage/.config/asound.conf2 /storage/.config/asound.conf\nfi\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/playvideo.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nclear > /dev/console\nclear > /dev/tty1\nclear > /dev/tty0\nee_console disable\n\nset_video_controls\nromdir=\"/storage/roms/\"\n\nPLAYER=\"${2}\"\n\ncase ${PLAYER} in\n\t\"ffplay\")\nMODE=`get_resolution`;\ndeclare -a RES=( ${MODE} )\nSIZE=\" -x ${RES[0]} -y ${RES[1]}\"\n\n\tplayer=\"ffplay -fs -autoexit -loglevel warning -hide_banner ${SIZE}\"\n\t;;\n\t\"vlc\")\n\t# does not work...\n\t/usr/bin/vlc -I \"dummy\" --aout=alsa \"${1}\" vlc://quit < /dev/tty1 > /dev/null 2>&1\n\t;;\n\t\"mpv\")\n\tplayer=\"mpv -fs --volume-max=200 --really-quiet\"\n\t;;\nesac\n\ncd /tmp\n\nVIDEO_MODE=general\nIS_YOUTUBE=$(cat \"${1}\" | grep -E \"^https://www.youtube.com/.*\")\n[[ ! -z \"${IS_YOUTUBE}\" ]] && VIDEO_MODE=youtube\nIS_TWITCH=$(cat \"${1}\" | grep -E \"^https://www.twitch.tv/.*\")\n[[ ! -z \"${IS_TWITCH}\" ]] && VIDEO_MODE=twitch\n\n[[ \"${1}\" == *\".ytb\" ]] && VIDEO_MODE=youtube\n[[ \"${1}\" == *\".twi\" ]] && VIDEO_MODE=twitch\n\ncase ${VIDEO_MODE} in\n\tyoutube)\n\t\t#Youtube Video\n\t\t${player} \"/storage/.config/splash/youtube-1080.png\"\n\t\tyoutube-dl --quiet --no-warnings -o - -a \"${1}\" | ${player} - > /dev/tty1 2>&1\n\t;;\n\ttwitch)\n\t\t# Twitch Video\n\t\t${player}  \"/storage/.config/splash/twitch-1080.png\" \n\t\tyoutube-dl --quiet --no-warnings -o - -a \"${1}\" | ${player} - > /dev/tty1 2>&1\n\t;;\n\tgeneral)\n\t# Regular video\n\t${player} \"${1}\" #> /dev/tty1 2>&1\n\t;;\nesac\n\nclear > /dev/console\nclear > /dev/tty1\nclear > /dev/tty0\n\nkill_video_controls\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/romconf.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# Make sure ES is not running to prevent file corruption.\nif pgrep -x \"emulationstation\" > /dev/null\n  then\n    echo \"ERROR: This script should not be run if emulationstation is running\"\n    exit 1\nfi\n \n state=\"${1}\"\n romconf=\"/storage/roms/emuelec.conf\"\n conf=\"/emuelec/configs/emuelec.conf\"\n [[ -z \"${state}\" ]] && state=$(get_ee_setting ee_romconf_enable)\n\n\nif [[ \"${state}\" != \"1\" ]]  ; then \n    if [[ -L \"${conf}\" ]]; then\n        cp --remove-destination $(readlink ${conf}) ${conf}\n    elif [[ -f \"${romconf}\" ]] && [[ ! -f \"${conf}\" ]]; then\n        cp -rf \"${romconf}\" \"${conf}\"\n    fi\n    set_ee_setting ee_romconf_enable \"0\"\nelif [[ \"${state}\" == \"1\" ]]; then\n    if [[ ! -f \"${romconf}\" ]]; then\n        cp -f \"${conf}\" \"${conf}.bak\"\n        mv -- \"${conf}\" \"${romconf}\"\n    else\n        mv -- \"${conf}\" \"${conf}.bak\"\n    fi\n        ln -s -- \"${romconf}\" \"${conf}\"\n        set_ee_setting ee_romconf_enable \"1\"\nfi\n\nexit 0\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/rr_audio.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Frank Hartung (supervisedthinking@gmail.com)\n# Modifications by Shanti Gilbert (shantic@gmail.com) to work on EmuELEC Copyright (C) 2019-present \n\n. /etc/profile \n\nAUDIO_LOG=\"/emuelec/logs/rr_audio.log\"\n\necho \"Set Audio: Log\" > ${AUDIO_LOG} 2>&1\n\n# Set common paths and defaults\nexport PULSE_RUNTIME_PATH=/run/pulse\n\tRR_AUDIO_DEVICE=\"hw:$(get_ee_setting ee_audio_device)\"\n\t[ ${RR_AUDIO_DEVICE} = \"hw:\" ] && RR_AUDIO_DEVICE=\"hw:0\"\n\techo \"Set-Audio: Using audio device ${RR_AUDIO_DEVICE}\" >> ${AUDIO_LOG} 2>&1\n\tRR_PA_UDEV=\"false\"\n    RR_PA_TSCHED=\"true\"\n    RR_AUDIO_VOLUME=\"$(get_ee_setting audio.volume)\"\n    RR_AUDIO_BACKEND=\"PulseAudio\"\n\n[[ -z \"${RR_AUDIO_VOLUME}\" ]]\t&& RR_AUDIO_VOLUME=\"100\"\n\npulseaudio_sink_load() {\n\n  if [ ${RR_AUDIO_BACKEND} = \"PulseAudio\" ];then\n  systemctl restart pulseaudio \n    if [ \"${RR_PA_TSCHED}\" = \"false\" ]; then\n      TSCHED=\"tsched=0\"\n      echo \"Set-Audio: PulseAudio will disable timer-based audio scheduling\" >> ${AUDIO_LOG} 2>&1\n    else\n      TSCHED=\"tsched=1\"\n      echo \"Set-Audio: PulseAudio will enable timer-based audio scheduling\" >> ${AUDIO_LOG} 2>&1\n    fi\n\n    if [ ! -z \"$(pactl list modules short | grep module-null-sink)\" ];then\n      if [ \"${RR_PA_UDEV}\" = \"true\" ]; then\n        pactl load-module module-udev-detect ${TSCHED} > /dev/null\n        pactl set-sink-volume \"$(pactl info | grep 'Default Sink:' | cut -d ' ' -f 3)\" ${RR_AUDIO_VOLUME}% >> ${AUDIO_LOG} 2>&1\n        if [ ! -z \"$(pactl list modules short | grep module-alsa-card)\" ];then\n          echo \"Set-Audio: PulseAudio module-udev-detect loaded, setting a volume of \"${RR_AUDIO_VOLUME}\"%\" >> ${AUDIO_LOG} 2>&1\n          echo \"Set-Audio: PulseAudio will use sink \"$(pactl list sinks short) >> ${AUDIO_LOG} 2>&1\n        else\n          echo \"Set-Audio: PulseAudio module-udev-detect failed to load\" >> ${AUDIO_LOG} 2>&1\n        fi\n      else\n        pactl load-module module-alsa-sink device=\"${RR_AUDIO_DEVICE}\" name=\"temp_sink\" ${TSCHED} > /dev/null\n        pactl set-sink-volume alsa_output.temp_sink ${RR_AUDIO_VOLUME}%  >> ${AUDIO_LOG} 2>&1\n        if [ ! -z \"$(pactl list modules short | grep module-alsa-sink)\" ];then\n          echo \"Set-Audio: PulseAudio module-alsa-sink loaded, setting a volume of \"${RR_AUDIO_VOLUME}\"%\"  >> ${AUDIO_LOG} 2>&1\n          echo \"Set-Audio: PulseAudio will use sink \"$(pactl list sinks short)  >> ${AUDIO_LOG} 2>&1\n        else\n          echo \"Set-Audio: PulseAudio module-alsa-sink failed to load\"  >> ${AUDIO_LOG} 2>&1\n        fi\n      fi\n    fi\n  fi\n}\n\n# Unload PulseAudio sink\npulseaudio_sink_unload() {\n  \n  if [ ${RR_AUDIO_BACKEND} = \"PulseAudio\" ]; then\n    if [ \"${RR_PA_UDEV}\" = \"true\" ] && [ ! -z \"$(pactl list modules short | grep module-alsa-card)\" ]; then\n      pactl set-sink-volume \"$(pactl info | grep 'Default Sink:' | cut -d ' ' -f 3)\" 100%   >> ${AUDIO_LOG} 2>&1\n      pactl unload-module module-udev-detect  >> ${AUDIO_LOG} 2>&1\n      pactl unload-module module-alsa-card  >> ${AUDIO_LOG} 2>&1\n      echo \"Set-Audio: PulseAudio module-udev-detect unloaded\"  >> ${AUDIO_LOG} 2>&1\n    elif [ \"${RR_PA_UDEV}\" = \"false\" ] && [ ! -z \"$(pactl list modules short | grep module-alsa-sink)\" ]; then\n      pactl set-sink-volume alsa_output.temp_sink 100%  >> ${AUDIO_LOG} 2>&1\n      NUMBER=\"$(pactl list modules short | grep \"name=temp_sink\" | awk '{print ${1};}')\"\n      if [ -n \"${NUMBER}\" ]; then\n        pactl unload-module \"${NUMBER}\"  >> ${AUDIO_LOG} 2>&1\n      fi\n      echo \"Set-Audio: PulseAudio module-alsa-sink unloaded\"  >> ${AUDIO_LOG} 2>&1\n    else\n      echo \"Set-Audio: neither the PulseAudio module module-alsa-card or module-alsa-sink was found. Nothing to unload\"  >> ${AUDIO_LOG} 2>&1\n    fi\n\n    # Restore ALSA Master volume to 100%\n    if [ ! -z \"$(amixer | grep \"'Master',0\")\" ] && [ ! $(amixer get Master | awk '${0}~/%/{print ${4}}' | tr -d '[]%') = \"100\" ]; then\n      amixer -q set Master,0 100% unmute\n      echo \"Set-Audio: ALSA mixer restore volume to 100%\"  >> ${AUDIO_LOG} 2>&1\n    fi\n  fi\n  systemctl stop pulseaudio \n}\n\n# Start FluidSynth\nfluidsynth_service_start() {\n  \n  if [ ${RR_AUDIO_BACKEND} = \"PulseAudio\" ] && [ ! \"$(systemctl is-active fluidsynth)\" = \"active\" ]; then\n    systemctl start fluidsynth\n    if [ \"$(systemctl is-active fluidsynth)\" = \"active\" ]; then \n      echo \"Set-Audio: FluidSynth service loaded successfully\"  >> ${AUDIO_LOG} 2>&1\n    else\n      echo \"Set-Audio: FluidSynth service failed to load\"  >> ${AUDIO_LOG} 2>&1\n    fi\n  fi\n}\n\n# Stop FluidSynth\nfluidsynth_service_stop() {\n  \n\n  if [ \"$(systemctl is-active fluidsynth)\" = \"active\" ]; then\n    systemctl stop fluidsynth\n    if [ ! \"$(systemctl is-active fluidsynth)\" = \"active\" ]; then \n      echo \"Set-Audio: FluidSynth service successfully stopped\"  >> ${AUDIO_LOG} 2>&1\n    else\n      echo \"Set-Audio: FluidSynth service failed to stop\"  >> ${AUDIO_LOG} 2>&1\n    fi\n  fi\n}\n\n# SDL2: Set audio driver to Pulseaudio or ALSA\nset_SDL_audiodriver() {\n  \n  if [ ${RR_AUDIO_BACKEND} = \"PulseAudio\" ]; then\n    export SDL_AUDIODRIVER=pulseaudio\n  else\n    export SDL_AUDIODRIVER=alsa\n  fi\n  echo \"Set-Audio: SDL2 set environment variable SDL_AUDIODRIVER=\"${SDL_AUDIODRIVER}  >> ${AUDIO_LOG} 2>&1\n}\n\n# RETROARCH: Set audio & midi driver\nset_RA_audiodriver() {\n  \n  RETROARCH_HOME=/storage/.config/retroarch\n  RETROARCH_CONFIG=${RETROARCH_HOME}/retroarch.cfg\n\n  if [ -f ${RETROARCH_CONFIG} ]; then\n    if [ ${RR_AUDIO_BACKEND} = \"PulseAudio\" ]; then\n      sed -e \"s/audio_driver = \\\"alsathread\\\"/audio_driver = \\\"pulse\\\"/\" -i ${RETROARCH_CONFIG}\n      sed -e \"s/midi_driver = \\\"null\\\"/midi_driver = \\\"alsa\\\"/\" -i          ${RETROARCH_CONFIG}\n      sed -e \"s/midi_output = \\\"Off\\\"/midi_output = \\\"FluidSynth\\\"/\" -i     ${RETROARCH_CONFIG}\n      echo \"Set-Audio: Retroarch force audio driver to PulseAudio & MIDI output to FluidSynth\"\n    else\n      sed -e \"s/audio_driver = \\\"pulse\\\"/audio_driver = \\\"alsathread\\\"/\" -i ${RETROARCH_CONFIG}\n      sed -e \"s/midi_driver = \\\"alsa\\\"/midi_driver = \\\"null\\\"/\" -i          ${RETROARCH_CONFIG}\n      sed -e \"s/midi_output = \\\"FluidSynth\\\"/midi_output = \\\"Off\\\"/\" -i     ${RETROARCH_CONFIG}\n      echo \"Set-Audio: Retroarch force audio driver to ALSA & disable MIDI output\"\n    fi\n  fi\n}\n\ncase \"${1}\" in\n\t\"pulseaudio\")\n\t\tpulseaudio_sink_unload\n\t\tfluidsynth_service_stop\n\t\tpulseaudio_sink_load\n\t;;\n\t\"fluidsynth\")\n\t\tpulseaudio_sink_unload\n\t\tpulseaudio_sink_load\n\t\tfluidsynth_service_stop\n\t\tfluidsynth_service_start\n\t;;\n\t\"alsa\")\n\t\tpulseaudio_sink_unload\n\t\tfluidsynth_service_stop\n\t\tRR_AUDIO_BACKEND=\"alsa\"\n\t;;\nesac\n\t\tset_SDL_audiodriver\n\nif [ \"$EE_DEVICE\" == \"OdroidGoAdvance\" ] || [ \"$EE_DEVICE\" == \"GameForce\" ]; then\n\t# For some reason the audio is being reseted to 100 at boot, so we reaply the saved settings here\n\todroidgoa_utils.sh vol ${RR_AUDIO_VOLUME}\nelse\n\t#amixer set 'DAC Digital' \"${RR_AUDIO_VOLUME}%\"\n\tamixer set Master \"${RR_AUDIO_VOLUME}%\"  >> ${AUDIO_LOG} 2>&1\nfi\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/runwiimote.sh",
    "content": "#!/bin/sh\n\"\"\":\"\n\n/usr/bin/systemctl stop eventlircd\nexec python3 \"$0\" \"$@\"\n\"\"\"\n\n\nimport sysconfig\nif sysconfig.get_config_var(\"SO\") is None:\n    import sys\n    sysconfig._CONFIG_VARS[\"SO\"] = \".so\"\n\nimport evdev\nimport uinput\n\nSCREEN_WIDTH = 1920\nSCREEN_HEIGHT = 1080\nMAX_IR_X = 1023\nMAX_IR_Y = 767\nIR_DEVICE_NAME = \"Nintendo Wii Remote IR\"\n\ndef normalize(val, max_val, screen_size):\n    return int((val / max_val) * screen_size)\n\ndef find_ir_device():\n    devices = [evdev.InputDevice(path) for path in evdev.list_devices()]\n    for dev in devices:\n        if IR_DEVICE_NAME in dev.name:\n            print(f\"✔ Found IR device: {dev.name} ({dev.path})\")\n            return dev\n    raise RuntimeError(\"❌ Wiimote IR device not found\")\n\ndef main():\n    ir_dev = find_ir_device()\n\n    ui = uinput.Device([\n        uinput.ABS_X + (0, SCREEN_WIDTH, 0, 0),\n        uinput.ABS_Y + (0, SCREEN_HEIGHT, 0, 0),\n        uinput.BTN_LEFT\n    ], name=\"Wiimote IR\")  \n\n    x = SCREEN_WIDTH // 2\n    y = SCREEN_HEIGHT // 2\n\n    for event in ir_dev.read_loop():\n        if event.type == evdev.ecodes.EV_ABS:\n            if event.code == evdev.ecodes.ABS_HAT0X:\n                x = SCREEN_WIDTH - normalize(event.value, MAX_IR_X, SCREEN_WIDTH)\n            elif event.code == evdev.ecodes.ABS_HAT0Y:\n                y = normalize(event.value, MAX_IR_Y, SCREEN_HEIGHT)\n\n            ui.emit(uinput.ABS_X, x, syn=False)\n            ui.emit(uinput.ABS_Y, y)\n\nif __name__ == \"__main__\":\n    try:\n        main()\n    except KeyboardInterrupt:\n        print(\"Exit.\")\n\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/scriptmodules/archivefuncs.sh",
    "content": "#!/bin/bash\n\n# This file is part of The RetroPie Project\n#\n# The RetroPie Project is the legal property of its developers, whose names are\n# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.\n#\n# See the LICENSE.md file at the top-level directory of this distribution and\n# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md\n#\n\n## @file archivefuncs.sh\n## @brief RetroPie archivefuncs library\n## @copyright GPLv3\n\nreadonly arch_dir=\"/tmp/retropie-archive\"\n\n## @fn archiveExtract()\n## @param src_file Full path to archive file to extract\n## @param disk_exts Space separated list of supported disk extensions (e.g. \".d64 .t64\")\n## @brief Extracts an archive to a temporary directory\n## @details After calling this the variable arch_dir will contain the directory that was used\n## for extraction. Also the variable arch_files will contain an array of filenames that are\n## considered as game disks according to parameter disk_exts.\nfunction archiveExtract() {\n    local src_file=\"$1\"\n    local disk_exts=\"$2\"\n\n    # clean temp directory if needed\n    archiveCleanup\n    mkdir \"$arch_dir\"\n\n    local ext=\"${src_file##*.}\"\n\n    case \"${ext,,}\" in\n        zip)\n            unzip \"$src_file\" -d \"$arch_dir\"\n            ;;\n        *)\n            echo \"Unsupported archive: $src_file\"\n            return 1\n            ;;\n    esac\n\n    # build a regex portion from the passed extensions\n    local regex=\"${disk_exts// /\\\\|}\"\n\n    IFS=$'\\n' read -d '' -r -a arch_files < <(find \"$arch_dir\" -iregex \".*.\\(${regex}\\)$\" | sort)\n\n    if [[ ${#arch_files[@]} -eq 0 ]]; then\n        return 2\n    fi\n}\n\n## @fn archiveCleanup()\n## @brief Purges archive temp directory from previous calls to archiveExtract\nfunction archiveCleanup() {\n    [[ -d \"$arch_dir\" ]] && rm -rf \"$arch_dir\"\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/scriptmodules/helpers.sh",
    "content": "#!/bin/bash\n\n# This file is part of The RetroPie Project\n#\n# The RetroPie Project is the legal property of its developers, whose names are\n# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.\n#\n# See the LICENSE.md file at the top-level directory of this distribution and\n# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md\n#\n\n# Source predefined functions and variables\n. /etc/profile\n\n## @file helpers.sh\n## @brief RetroPie helpers library\n## @copyright GPLv3\n\n## @fn printMsgs()\n## @param type style of display to use - dialog, console or heading\n## @param message string or array of messages to display\n## @brief Prints messages in a variety of ways.\nfunction printMsgs() {\n    local type=\"$1\"\n    shift\n    if [[ \"$__nodialog\" == \"1\" && \"$type\" == \"dialog\" ]]; then\n        type=\"console\"\n    fi\n    for msg in \"$@\"; do\n        [[ \"$type\" == \"dialog\" ]] && dialog --ascii-lines --backtitle \"$__backtitle\" --cr-wrap --no-collapse --msgbox \"$msg\" 20 60 >/dev/tty0\n        [[ \"$type\" == \"console\" ]] && echo -e \"$msg\" >/dev/tty0\n        [[ \"$type\" == \"heading\" ]] && echo -e \"\\n= = = = = = = = = = = = = = = = = = = = =\\n$msg\\n= = = = = = = = = = = = = = = = = = = = =\\n\" >/dev/tty0\n    done\n    return 0\n}\n\n## @fn printHeading()\n## @param message string or array of messages to display\n## @brief Calls PrintMsgs with \"heading\" type.\nfunction printHeading() {\n    printMsgs \"heading\" \"$@\"\n}\n\n## @fn fatalError()\n## @param message string or array of messages to display\n## @brief Calls PrintMsgs with \"heading\" type, and exits immediately.\nfunction fatalError() {\n    printHeading \"Error\"\n    echo -e \"$1\"\n    joy2keyStop\n    exit 1\n}\n\n# @fn fnExists()\n# @param name name of function to check for\n# @brief Checks if function name exists.\n# @retval 0 if the function name exists\n# @retval 1 if the function name does not exist\nfunction fnExists() {\n    declare -f \"$1\" > /dev/null\n    return $?\n}\n\nfunction ask() {\n    echo -e -n \"$@\" '[y/n] ' ; read ans\n    case \"$ans\" in\n        y*|Y*) return 0 ;;\n        *) return 1 ;;\n    esac\n}\n\n## @fn runCmd()\n## @param command command to run\n## @brief Calls command and record any non zero return codes for later printing.\n## @return whatever the command returns.\nfunction runCmd() {\n    local ret\n    \"$@\"\n    ret=$?\n    if [[ \"$ret\" -ne 0 ]]; then\n        md_ret_errors+=(\"Error running '$*' - returned $ret\")\n    fi\n    return $ret\n}\n\n## @fn hasFlag()\n## @param string string to search in\n## @param flag flag to search for\n## @brief Checks for a flag in a string (consisting of space separated flags).\n## @retval 0 if the flag was found\n## @retval 1 if the flag was not found\nfunction hasFlag() {\n    local string=\"$1\"\n    local flag=\"$2\"\n    [[ -z \"$string\" || -z \"$flag\" ]] && return 1\n\n    if [[ \"$string\" =~ (^| )$flag($| ) ]]; then\n        return 0\n    else\n        return 1\n    fi\n}\n\n## @fn isPlatform()\n## @param platform\n## @brief Test for current platform / platform flags.\nfunction isPlatform() {\n    local flag=\"$1\"\n    if hasFlag \"$__platform $__platform_flags\" \"$flag\"; then\n        return 0\n    fi\n    return 1\n}\n\n## @fn addLineToFile()\n## @param line line to add\n## @param file file to add line to\n## @brief Adds a new line of text to a file.\nfunction addLineToFile() {\n    if [[ -f \"$2\" ]]; then\n        cp -p \"$2\" \"$2.bak\"\n    else\n        sed -i '$a\\' \"$2\"\n    fi\n\n    echo \"$1\" >> \"$2\"\n}\n\n## @fn editFile()\n## @param file file to edit\n## @brief Opens an editing dialog for specified file.\nfunction editFile() {\n    local file=\"$1\"\n    local cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --editbox \"$file\" 22 76)\n    local choice=$(\"${cmd[@]}\" 2>&1 >/dev/tty)\n    [[ -n \"$choice\" ]] && echo \"$choice\" >\"$file\"\n}\n\n## @fn hasPackage()\n## @param package name of Debian package\n## @param version requested version (optional)\n## @param comparison type of comparison - defaults to `ge` (greater than or equal) if a version parameter is provided.\n## @brief Test for an installed Debian package / package version.\n## @retval 0 if the requested package / version was installed\n## @retval 1 if the requested package / version was not installed\nfunction hasPackage() {\n    local pkg=\"$1\"\n    local req_ver=\"$2\"\n    local comp=\"$3\"\n    [[ -z \"$comp\" ]] && comp=\"ge\"\n    local status=$(dpkg-query -W --showformat='${Status} ${Version}' $1 2>/dev/null)\n    if [[ $? -eq 0 ]]; then\n        local ver=\"${status##* }\"\n        local status=\"${status% *}\"\n        # if status doesn't contain \"ok installed\" package is not installed\n        if [[ \"$status\" == *\"ok installed\" ]]; then\n            # if we didn't request a version number, be happy with any\n            [[ -z \"$req_ver\" ]] && return 0\n            compareVersions \"$ver\" \"$comp\" \"$req_ver\" && return 0\n        fi\n    fi\n    return 1\n}\n\n## @fn aptUpdate()\n## @brief Calls apt-get update (if it has not been called before).\nfunction aptUpdate() {\n    if [[ \"$__apt_update\" != \"1\" ]]; then\n        apt-get update\n        __apt_update=\"1\"\n    fi\n}\n\n## @fn aptInstall()\n## @param packages package / space separated list of packages to install\n## @brief Calls apt-get install with the packages provided.\nfunction aptInstall() {\n    aptUpdate\n    apt-get install -y \"$@\"\n    return $?\n}\n\n## @fn aptRemove()\n## @param packages package / space separated list of packages to install\n## @brief Calls apt-get remove with the packages provided.\nfunction aptRemove() {\n    aptUpdate\n    apt-get remove -y \"$@\"\n    return $?\n}\n\n## @fn getDepends()\n## @param packages package / space separated list of packages to install\n## @brief Installs packages if they are not installed.\n## @retval 0 on success\n## @retval 1 on failure\nfunction getDepends() {\n\treturn 0\n    local required\n    local packages=()\n    local failed=()\n\n    # check whether to use our own sdl2 - can be disabled to resolve issues with\n    # mixing custom 64bit sdl2 and os distributed i386 version on multiarch\n    local own_sdl2=1\n    iniConfig \" = \" '\"' \"$configdir/all/retropie.cfg\"\n    iniGet \"own_sdl2\"\n    [[ \"$ini_value\" == \"0\" ]] && own_sdl2=0\n\n    for required in $@; do\n\n        # workaround for different package names on osmc / xbian\n        if [[ \"$required\" == \"libraspberrypi-bin\" ]]; then\n            isPlatform \"osmc\" && required=\"rbp-userland-osmc\"\n            isPlatform \"xbian\" && required=\"xbian-package-firmware\"\n        fi\n        if [[ \"$required\" == \"libraspberrypi-dev\" ]]; then\n            isPlatform \"osmc\" && required=\"rbp-userland-dev-osmc\"\n            isPlatform \"xbian\" && required=\"xbian-package-firmware\"\n        fi\n\n        # map libpng12-dev to libpng-dev for Stretch+\n        if [[ \"$required\" == \"libpng12-dev\" ]] && compareVersions \"$__os_debian_ver\" ge 9;  then\n            required=\"libpng-dev\"\n            printMsgs \"console\" \"RetroPie module references libpng12-dev and should be changed to libpng-dev\"\n        fi\n\n        # map libpng-dev to libpng12-dev for Jessie\n        if [[ \"$required\" == \"libpng-dev\" ]] && compareVersions \"$__os_debian_ver\" lt 9; then\n            required=\"libpng12-dev\"\n        fi\n\n        if [[ \"$md_mode\" == \"install\" ]]; then\n            # make sure we have our sdl1 / sdl2 installed\n            if ! isPlatform \"x11\" && [[ \"$required\" == \"libsdl1.2-dev\" ]] && hasPackage libsdl1.2-dev $(get_pkg_ver_sdl1) \"ne\"; then\n                packages+=(\"$required\")\n                continue\n            fi\n            if [[ \"$own_sdl2\" -eq 1 && \"$required\" == \"libsdl2-dev\" ]] && hasPackage libsdl2-dev $(get_pkg_ver_sdl2) \"ne\"; then\n                packages+=(\"$required\")\n                continue\n            fi\n\n            # make sure libraspberrypi-dev/libraspberrypi0 is up to date.\n            if [[ \"$required\" == \"libraspberrypi-dev\" ]] && hasPackage libraspberrypi-dev 1.20170703-1 \"lt\"; then\n                packages+=(\"$required\")\n                continue\n            fi\n        fi\n\n        if [[ \"$md_mode\" == \"remove\" ]]; then\n            hasPackage \"$required\" && packages+=(\"$required\")\n        else\n            hasPackage \"$required\" || packages+=(\"$required\")\n        fi\n    done\n    if [[ ${#packages[@]} -ne 0 ]]; then\n        if [[ \"$md_mode\" == \"remove\" ]]; then\n            apt-get remove --purge -y \"${packages[@]}\"\n            apt-get autoremove --purge -y\n            return 0\n        fi\n        echo \"Did not find needed package(s): ${packages[@]}. I am trying to install them now.\"\n\n        # workaround to force installation of our fixed libsdl1.2 and custom compiled libsdl2\n        local temp=()\n        for required in ${packages[@]}; do\n            if isPlatform \"rpi\" && [[ \"$required\" == \"libsdl1.2-dev\" ]]; then\n                if [[ \"$__has_binaries\" -eq 1 ]]; then\n                    rp_callModule sdl1 install_bin\n                else\n                    rp_callModule sdl1\n                fi\n            elif [[ \"$required\" == \"libsdl2-dev\" && \"$own_sdl2\" == \"1\" ]]; then\n                if [[ \"$__has_binaries\" -eq 1 ]]; then\n                    rp_callModule sdl2 install_bin\n                else\n                    rp_callModule sdl2\n                fi\n            else\n                temp+=(\"$required\")\n            fi\n        done\n        packages=(\"${temp[@]}\")\n\n        aptInstall --no-install-recommends \"${packages[@]}\"\n\n        # check the required packages again rather than return code of apt-get,\n        # as apt-get might fail for other reasons (eg other half installed packages)\n        for required in ${packages[@]}; do\n            if ! hasPackage \"$required\"; then\n                # workaround for installing samba in a chroot (fails due to failed smbd service restart)\n                # we replace the init.d script with an empty script so the install completes\n                if [[ \"$required\" == \"samba\" && \"$__chroot\" -eq 1 ]]; then\n                    mv /etc/init.d/smbd /etc/init.d/smbd.old\n                    echo \"#!/bin/sh\" >/etc/init.d/smbd\n                    chmod u+x /etc/init.d/smbd\n                    apt-get -f install\n                    mv /etc/init.d/smbd.old /etc/init.d/smbd\n                else\n                    failed+=(\"$required\")\n                fi\n            fi\n        done\n        if [[ ${#failed[@]} -eq 0 ]]; then\n            printMsgs \"console\" \"Successfully installed package(s): ${packages[*]}.\"\n        else\n            md_ret_errors+=(\"Could not install package(s): ${failed[*]}.\")\n            return 1\n        fi\n    fi\n    return 0\n}\n\n\n## @fn rpSwap()\n## @param command *on* to add swap if needed and *off* to remove later\n## @param memory total memory needed (swap added = memory needed - available memory)\n## @brief Adds additional swap to the system if needed.\nfunction rpSwap() {\n    local command=$1\n    local swapfile=\"$__swapdir/swap\"\n    case $command in\n        on)\n            rpSwap off\n            local memory=$(free -t -m | awk '/^Total:/{print $2}')\n            local needed=$2\n            local size=$((needed - memory))\n            mkdir -p \"$__swapdir/\"\n            if [[ $size -ge 0 ]]; then\n                echo \"Adding $size MB of additional swap\"\n                fallocate -l ${size}M \"$swapfile\"\n                chmod 600 \"$swapfile\"\n                mkswap \"$swapfile\"\n                swapon \"$swapfile\"\n            fi\n            ;;\n        off)\n            echo \"Removing additional swap\"\n            swapoff \"$swapfile\" 2>/dev/null\n            rm -f \"$swapfile\"\n            ;;\n    esac\n}\n\n## @fn gitPullOrClone()\n## @param dest destination directory\n## @param repo repository to clone or pull from\n## @param branch branch to clone or pull from (optional)\n## @param commit specific commit to checkout (optional - requires branch to be set)\n## @brief Git clones or pulls a repository.\nfunction gitPullOrClone() {\n    local dir=\"$1\"\n    local repo=\"$2\"\n    local branch=\"$3\"\n    [[ -z \"$branch\" ]] && branch=\"master\"\n    local commit=\"$4\"\n\n    if [[ -d \"$dir/.git\" ]]; then\n        pushd \"$dir\" > /dev/null\n        runCmd git checkout \"$branch\"\n        runCmd git pull\n        runCmd git submodule update --init --recursive\n        popd > /dev/null\n    else\n        local git=\"git clone --recursive\"\n        if [[ \"$__persistent_repos\" -ne 1 && \"$repo\" == *github* && -z \"$commit\" ]]; then\n            git+=\" --depth 1\"\n        fi\n        [[ \"$branch\" != \"master\" ]] && git+=\" --branch $branch\"\n        printMsgs \"console\" \"$git \\\"$repo\\\" \\\"$dir\\\"\"\n        runCmd $git \"$repo\" \"$dir\"\n    fi\n\n    if [[ -n \"$commit\" ]]; then\n        printMsgs \"console\" \"Winding back $repo->$branch to commit: #$commit\"\n        git -C \"$dir\" branch -D \"$commit\" &>/dev/null\n        runCmd git -C \"$dir\" checkout -f \"$commit\" -b \"$commit\"\n    fi\n\n    branch=$(runCmd git -C \"$dir\" rev-parse --abbrev-ref HEAD)\n    commit=$(runCmd git -C \"$dir\" rev-parse HEAD)\n    printMsgs \"console\" \"HEAD is now in branch '$branch' at commit '$commit'\"\n}\n\n# @fn setupDirectories()\n# @brief Makes sure some required retropie directories and files are created.\nfunction setupDirectories() {\n    mkdir -p \"$rootdir\"\n    mkUserDir \"$datadir\"\n    mkUserDir \"$romdir\"\n    mkUserDir \"$biosdir\"\n    mkUserDir \"$configdir\"\n    mkUserDir \"$configdir/all\"\n\n    # some home folders for configs that modules rely on\n    mkUserDir \"$home/.cache\"\n    mkUserDir \"$home/.config\"\n    mkUserDir \"$home/.local\"\n    mkUserDir \"$home/.local/share\"\n\n    # make sure we have inifuncs.sh in place and that it is up to date\n    mkdir -p \"$rootdir/lib\"\n    local helper_libs=(inifuncs.sh archivefuncs.sh)\n    for helper in \"${helper_libs[@]}\"; do\n        if [[ ! -f \"$rootdir/lib/$helper\" || \"$rootdir/lib/$helper\" -ot \"$scriptdir/scriptmodules/$helper\" ]]; then\n            cp --preserve=timestamps \"$scriptdir/scriptmodules/$helper\" \"$rootdir/lib/$helper\"\n        fi\n    done\n\n    # create template for autoconf.cfg and make sure it is owned by $user\n    local config=\"$configdir/all/autoconf.cfg\"\n    if [[ ! -f \"$config\" ]]; then\n        echo \"# this file can be used to enable/disable retropie autoconfiguration features\" >\"$config\"\n    fi\n    chown $user:$user \"$config\"\n}\n\n## @fn rmDirExists()\n## @param dir directory to remove\n## @brief Removes a directory and all contents if it exists.\nfunction rmDirExists() {\n    if [[ -d \"$1\" ]]; then\n        rm -rf \"$1\"\n    fi\n}\n\n## @fn mkUserDir()\n## @param dir directory to create\n## @brief Creates a directory owned by the current user.\nfunction mkUserDir() {\n    mkdir -p \"$1\"\n    chown $user:$user \"$1\"\n}\n\n## @fn mkRomDir()\n## @param dir rom directory to create\n## @brief Creates a directory under $romdir owned by the current user.\nfunction mkRomDir() {\n    mkUserDir \"$romdir/$1\"\n    if [[ \"$1\" == \"megadrive\" ]]; then\n        pushd \"$romdir\"\n        ln -snf \"$1\" \"genesis\"\n        popd\n    fi\n}\n\n## @fn moveConfigDir()\n## @param from source directory\n## @param to destination directory\n## @brief Moves the contents of a folder and symlinks to the new location.\nfunction moveConfigDir() {\n    local from=\"$1\"\n    local to=\"$2\"\n\n    # if we are in remove mode - remove the symlink\n    if [[ \"$md_mode\" == \"remove\" ]]; then\n        [[ -h \"$from\" ]] && rm -f \"$from\"\n        return\n    fi\n\n    mkUserDir \"$to\"\n    # move any old configs to the new location\n    if [[ -d \"$from\" && ! -h \"$from\" ]]; then\n        cp -a \"$from/.\" \"$to/\"\n        rm -rf \"$from\"\n    fi\n    ln -snf \"$to\" \"$from\"\n    # set ownership of the actual link to $user\n    chown -h $user:$user \"$from\"\n}\n\n## @fn moveConfigFile()\n## @param from source file\n## @param to destination file\n## @brief Moves the file and symlinks to the new location.\nfunction moveConfigFile() {\n    local from=\"$1\"\n    local to=\"$2\"\n\n    # if we are in remove mode - remove the symlink\n    if [[ \"$md_mode\" == \"remove\" && -h \"$from\" ]]; then\n        rm -f \"$from\"\n        return\n    fi\n\n    # move old file\n    if [[ -f \"$from\" && ! -h \"$from\" ]]; then\n        mv \"$from\" \"$to\"\n    fi\n    ln -sf \"$to\" \"$from\"\n    # set ownership of the actual link to $user\n    chown -h $user:$user \"$from\"\n}\n\n## @fn diffFiles()\n## @param file1 file to compare\n## @param file2 file to compare\n## @brief Compares two files using diff.\n## @retval 0 if the files were the same\n## @retval 1 if they were not\n## @retval >1 an error occurred\nfunction diffFiles() {\n    diff -q \"$1\" \"$2\" >/dev/null\n    return $?\n}\n\n## @fn compareVersions()\n## @param version first version to compare\n## @param operator operator to use (lt le eq ne ge gt)\n## @brief version second version to compare\n## @retval 0 if the comparison was true\n## @retval 1 if the comparison was false\nfunction compareVersions() {\n    dpkg --compare-versions \"$1\" \"$2\" \"$3\" >/dev/null\n    return $?\n}\n\n## @fn dirIsEmpty()\n## @param path path to directory\n## @param files_only set to 1 to ignore sub directories\n## @retval 0 if the directory is empty\n## @retval 1 if the directory is not empty\nfunction dirIsEmpty() {\n    if [[ \"$2\" -eq 1 ]]; then\n        [[ -z \"$(ls -lA1 \"$1\" | grep \"^-\")\" ]] && return 0\n    else\n        [[ -z \"$(ls -A \"$1\")\" ]] && return 0\n    fi\n    return 1\n}\n\n## @fn copyDefaultConfig()\n## @param from source file\n## @param to destination file\n## @brief Copies a default configuration.\n## @details Copies from the source file to the destination file if the destination\n## file doesn't exist. If the destination is the same nothing is done. If different\n## the source is copied to `$destination.rp-dist`.\nfunction copyDefaultConfig() {\n    local from=\"$1\"\n    local to=\"$2\"\n    # if the destination exists, and is different then copy the config as name.rp-dist\n    if [[ -f \"$to\" ]]; then\n        if ! diffFiles \"$from\" \"$to\"; then\n            to+=\".rp-dist\"\n            printMsgs \"console\" \"Copying new default configuration to $to\"\n            cp \"$from\" \"$to\"\n        fi\n    else\n        printMsgs \"console\" \"Copying default configuration to $to\"\n        cp \"$from\" \"$to\"\n    fi\n\n    chown $user:$user \"$to\"\n}\n\n## @fn renameModule()\n## @param from source file\n## @param to destination file\n## @brief Renames an existing module.\n## @details Renames an existing module, moving it's install folder to the new location\n## and changing any references to it in `emulators.cfg`.\nfunction renameModule() {\n    local from=\"$1\"\n    local to=\"$2\"\n    # move from old location and update emulators.cfg\n    if [[ -d \"$rootdir/$md_type/$from\" ]]; then\n        rm -rf \"$rootdir/$md_type/$to\"\n        mv \"$rootdir/$md_type/$from\" \"$rootdir/$md_type/$to\"\n        # replace any default = \"$from\"\n        sed -i \"s/\\\"$from\\\"/\\\"$to\\\"/g\" \"$configdir\"/*/emulators.cfg\n        # replace any $from = \"cmdline\"\n        sed -i \"s/^$from\\([ =]\\)/$to\\1/g\" \"$configdir\"/*/emulators.cfg\n        # replace any paths with /$from/\n        sed -i \"s|/$from/|/$to/|g\" \"$configdir\"/*/emulators.cfg\n    fi\n}\n\n## @fn addUdevInputRules()\n## @brief Creates a udev rule to adjust input device permissions.\n## @details Creates a udev rule in `/etc/udev/rules.d/99-input.rules` to\n## make everything in `/dev/input` it writable by any user in group `input`.\nfunction addUdevInputRules() {\n    if [[ ! -f /etc/udev/rules.d/99-input.rules ]]; then\n        echo 'SUBSYSTEM==\"input\", GROUP=\"input\", MODE=\"0660\"' > /etc/udev/rules.d/99-input.rules\n    fi\n    # remove old 99-evdev.rules\n    rm -f /etc/udev/rules.d/99-evdev.rules\n}\n\n## @fn setDispmanx()\n## @param module_id name of module to add dispmanx flag for\n## @param status initial status of flag (0 or 1)\n## @brief Sets a dispmanx flag for a module.\n## @details Set a dispmanx flag for a module as to whether it should use the\n## sdl1 dispmanx backend by default or not (0 for framebuffer, 1 for dispmanx).\nfunction setDispmanx() {\n    isPlatform \"rpi\" || return\n    local mod_id=\"$1\"\n    local status=\"$2\"\n    iniConfig \"=\" \"\\\"\" \"$configdir/all/dispmanx.cfg\"\n    iniSet $mod_id \"$status\"\n    chown $user:$user \"$configdir/all/dispmanx.cfg\"\n}\n\n## @fn iniFileEditor()\n## @param delim ini file delimiter eg. ' = '\n## @param quote ini file quoting character eg. '\"'\n## @param config ini file to edit\n## @brief Allows editing of ini files with a user friendly dialog based gui.\n## @details Some arrays need to be configured before calling this, which are\n## used to display what can be edited and the options available.\n##\n## The first array is `$ini_titles` which provides the titles for each\n## entry..\n##\n## The second array is `$ini_descs` which contains a help description for each\n## entry.\n##\n## The third array is `$ini_options` which contains multiple space separated\n## strings in each element to control how each entry should be managed.\n##\n## The `$ini_options` array is constructed as follows:\n##\n## If the first string is `_function_` then the next string should be a function\n## name that will handle that entry. The function will be called with a parameter\n## `get` or `set`. The function should return the value for get via `echo`\n## and should handle any gui functionality when called with `set`. This can be\n## used for example to build custom dialogs.\n##\n## If the first option is anything else, it is assumed to be a key name, followed\n## by a control type and a list of parameters.\n##\n## Control types are:\n##  * `_id_` map the following values to an id\n##  * `_string_` allow the value to be inputted by the user\n##  * `_file_` select from a list of files. The following values are wildcard,\n##    then file path.\n##\n## If none of the above, then the rest of the array element should be a list of\n## possible values for the key.\n##\n## Some examples for ini_options:\n##\n##     ini_options=('video_smooth true false')\n## Allow setting of the key `video_smooth` with the values of *true* or *false*\n##\n##     ini_options=('aspect_ratio_index _id_ 4:3 16:9 16:10)\n## Allow setting of the key `aspect_ratio_index` with the values 0 1 or 2 which\n## correspond to the ratios. The user is shown the ratios, but the ini configuration\n## is set to the id (4:3 = 0, 16:9 = 1, 16:10 = 2).\n##\n##     ini_options=('_function_ _video_fullscreen_configedit')\n## The function `_video_fullscreen_configedit` is called with *get* or *set*\n## to manage this entry.\n##\n##     ini_options=(\"video_shader _file_ *.*p $rootdir/emulators/retroarch/shader\")\n## The key `video_shader` will be able to be set to a list of files in\n## `$rootdir/emulators/retroarch/shader` that match the wildcard `*.*p`\n##\n## For more examples you can check out the code in supplementary/configedit.sh\nfunction iniFileEditor() {\n    local delim=\"$1\"\n    local quote=\"$2\"\n    local config=\"$3\"\n    [[ ! -f \"$config\" ]] && return\n\n    iniConfig \"$delim\" \"$quote\" \"$config\"\n    local sel\n    local value\n    local option\n    local title\n    while true; do\n        local options=()\n        local params=()\n        local values=()\n        local keys=()\n        local i=0\n\n        # generate menu from options\n        for option in \"${ini_options[@]}\"; do\n            # split into new array (globbing safe)\n            read -ra option <<<\"$option\"\n            key=\"${option[0]}\"\n            keys+=(\"$key\")\n            params+=(\"${option[*]:1}\")\n\n            # if the first parameter is _function_ we call the second parameter as a function\n            # so we can handle some options with a custom menu etc\n            if [[ \"$key\" == \"_function_\" ]]; then\n                value=\"$(${option[1]} get)\"\n            else\n                # get current value\n                iniGet \"$key\"\n                if [[ -n \"$ini_value\" ]]; then\n                    value=\"$ini_value\"\n                else\n                    value=\"unset\"\n                fi\n            fi\n\n            values+=(\"$value\")\n\n            # add the matching value to our id in _id_ lists\n            if [[ \"${option[1]}\" == \"_id_\" && \"$value\" != \"unset\" ]]; then\n                value+=\" - ${option[value+2]}\"\n            fi\n\n            # use custom title if provided\n            if [[ -n \"${ini_titles[i]}\" ]]; then\n                title=\"${ini_titles[i]}\"\n            else\n                title=\"$key\"\n            fi\n\n            options+=(\"$i\" \"$title ($value)\" \"${ini_descs[i]}\")\n\n            ((i++))\n        done\n\n        local cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --default-item \"$sel\" --item-help --help-button --menu \"Please choose the setting to modify in $config\" 22 76 16)\n        sel=$(\"${cmd[@]}\" \"${options[@]}\" 2>&1 >/dev/tty)\n        if [[ \"${sel[@]:0:4}\" == \"HELP\" ]]; then\n            printMsgs \"dialog\" \"${sel[@]:5}\"\n            continue\n        fi\n\n        [[ -z \"$sel\" ]] && break\n\n        # if the key is _function_ we handle the option with a custom function\n        if [[ \"${keys[sel]}\" == \"_function_\" ]]; then\n            \"${params[sel]}\" set \"${values[sel]}\"\n            continue\n        fi\n\n        # process the editing of the option\n        i=0\n        options=(\"U\" \"unset\")\n        local default=\"\"\n\n        # split into new array (globbing safe)\n        read -ra params <<<\"${params[sel]}\"\n\n        local mode=\"${params[0]}\"\n\n        case \"$mode\" in\n            _string_)\n                options+=(\"E\" \"Edit (Currently ${values[sel]})\")\n                ;;\n            _file_)\n                local match=\"${params[1]}\"\n                local path=\"${params[*]:2}\"\n                local file\n                while read file; do\n                    [[ \"${values[sel]}\" == \"$file\" ]] && default=\"$i\"\n                    file=\"${file//$path\\//}\"\n                    options+=(\"$i\" \"$file\")\n                    ((i++))\n                done < <(find -L \"$path\" -type f -name \"$match\" | sort)\n                ;;\n            _id_|*)\n                [[ \"$mode\" == \"_id_\" ]] && params=(\"${params[@]:1}\")\n                for option in \"${params[@]}\"; do\n                    if [[ \"$mode\" == \"_id_\" ]]; then\n                        [[ \"${values[sel]}\" == \"$i\" ]] && default=\"$i\"\n                    else\n                        [[ \"${values[sel]}\" == \"$option\" ]] && default=\"$i\"\n                    fi\n                    options+=(\"$i\" \"$option\")\n                    ((i++))\n                done\n                ;;\n        esac\n        [[ -z \"$default\" ]] && default=\"U\"\n        # display values\n        cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --default-item \"$default\" --menu \"Please choose the value for ${keys[sel]}\" 22 76 16)\n        local choice=$(\"${cmd[@]}\" \"${options[@]}\" 2>&1 >/dev/tty)\n\n        # if it is a _string_ type we will open an inputbox dialog to get a manual value\n        if [[ -z \"$choice\" ]]; then\n            continue\n        elif [[ \"$choice\" == \"E\" ]]; then\n            [[ \"${values[sel]}\" == \"unset\" ]] && values[sel]=\"\"\n            cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --inputbox \"Please enter the value for ${keys[sel]}\" 10 60 \"${values[sel]}\")\n            value=$(\"${cmd[@]}\" 2>&1 >/dev/tty)\n        elif [[ \"$choice\" == \"U\" ]]; then\n            value=\"\"\n        else\n            if [[ \"$mode\" == \"_id_\" ]]; then\n                value=\"$choice\"\n            else\n                # get the actual value from the options array\n                local index=$((choice*2+3))\n                if [[ \"$mode\" == \"_file_\" ]]; then\n                    value=\"$path/${options[index]}\"\n                else\n                    value=\"${options[index]}\"\n                fi\n            fi\n        fi\n\n        if [[ \"$choice\" == \"U\" ]]; then\n            iniUnset \"${keys[sel]}\" \"$value\"\n        else\n            iniSet \"${keys[sel]}\" \"$value\"\n        fi\n\n    done\n}\n\n## @fn setESSystem()\n## @param fullname full name of system\n## @param name short name of system\n## @param path rom path\n## @param extension file extensions to show\n## @param command command to run\n## @param platform name of platform (used by es for scraping)\n## @param theme name of theme to use\n## @brief Adds a system entry for Emulation Station (to /etc/emulationstation/es_systems.cfg).\nfunction setESSystem() {\n    local function\n    for function in $(compgen -A function _add_system_); do\n        \"$function\" \"$@\"\n    done\n}\n\n## @fn ensureSystemretroconfig()\n## @param system system to create retroarch.cfg for\n## @param shader set a default shader to use (deprecated)\n## @brief Creates a default retroarch.cfg for specified system in `/opt/retropie/configs/$system/retroarch.cfg`.\nfunction ensureSystemretroconfig() {\n    local system=\"$1\"\n    local shader=\"$2\"\n\n    if [[ ! -d \"$configdir/$system\" ]]; then\n        mkUserDir \"$configdir/$system\"\n    fi\n\n    local config=\"$(mktemp)\"\n    # add the initial comment regarding include order\n    echo -e \"# Settings made here will only override settings in the global retroarch.cfg if placed above the #include line\\n\" >\"$config\"\n\n    # add the per system default settings\n    iniConfig \" = \" '\"' \"$config\"\n    iniSet \"input_remapping_directory\" \"$configdir/$system/\"\n\n    if [[ -n \"$shader\" ]]; then\n        iniUnset \"video_smooth\" \"false\"\n        iniSet \"video_shader\" \"$emudir/retroarch/shader/$shader\"\n        iniUnset \"video_shader_enable\" \"true\"\n    fi\n\n    # include the main retroarch config\n    echo -e \"\\n#include \\\"$configdir/all/retroarch.cfg\\\"\" >>\"$config\"\n\n    copyDefaultConfig \"$config\" \"$configdir/$system/retroarch.cfg\"\n    rm \"$config\"\n}\n\n## @fn setRetroArchCoreOption()\n## @param option option to set\n## @param value value to set\n## @brief Sets a retroarch core option in `$configdir/all/retroarch-core-options.cfg`.\nfunction setRetroArchCoreOption() {\n    local option=\"$1\"\n    local value=\"$2\"\n    iniConfig \" = \" \"\\\"\" \"$configdir/all/retroarch-core-options.cfg\"\n    iniGet \"$option\"\n    if [[ -z \"$ini_value\" ]]; then\n        iniSet \"$option\" \"$value\"\n    fi\n    chown $user:$user \"$configdir/all/retroarch-core-options.cfg\"\n}\n\n## @fn setConfigRoot()\n## @param dir directory under $configdir to use\n## @brief Sets module config root `$md_conf_root` to subfolder from `$configdir`\n## @details This is used for ports that are not actually in scriptmodules/ports\n## as they would get the wrong config root otherwise.\nfunction setConfigRoot() {\n    local dir=\"$1\"\n    md_conf_root=\"$configdir\"\n    [[ -n \"$dir\" ]] && md_conf_root+=\"/$dir\"\n    mkUserDir \"$md_conf_root\"\n}\n\n## @fn loadModuleConfig()\n## @param params space separated list of key=value parameters\n## @brief Load the settings for a module.\n## @details This allows modules to quickly load some settings from an ini file.\n## It can provide a shortcut way to load a set of keys from an ini file into\n## variables.\n##\n## It requires iniConfig to be called first to specify the format and file.\n## eg.\n##\n##     iniConfig \" = \" '\"' \"$configdir/all/mymodule.cfg\"\n##     eval $(loadModuleConfig \\\n##        'some_option=1' \\\n##        'another_option=2'\n##\n## This would load the keys `some_option` and `another_option` into local\n## variables `some_option` and `another_option`. If the keys did not exist\n## in mymodule.cfg the variables would be initialised to 1 and 2.\nfunction loadModuleConfig() {\n    local options=(\"$@\")\n    local option\n    local key\n    local value\n\n    for option in \"${options[@]}\"; do\n        option=(${option/=/ })\n        key=\"${option[0]}\"\n        value=\"${option[@]:1}\"\n        iniGet \"$key\"\n        if [[ -z \"$ini_value\" ]]; then\n            iniSet \"$key\" \"$value\"\n            echo \"local $key=\\\"$value\\\"\"\n        else\n            echo \"local $key=\\\"$ini_value\\\"\"\n        fi\n    done\n}\n\n## @fn applyPatch()\n## @param patch filename of patch to apply\n## @brief Apply a patch if it has not already been applied to current folder.\n## @details This is used for applying patches against upstream code.\n## @retval 0 on success\n## @retval 1 on failure\nfunction applyPatch() {\n    local patch=\"$1\"\n    local patch_applied=\"${patch##*/}.applied\"\n\n    if [[ ! -f \"$patch_applied\" ]]; then\n        if patch -f -p1 <\"$patch\"; then\n            touch \"$patch_applied\"\n            printMsgs \"console\" \"Successfully applied patch: $patch\"\n        else\n            md_ret_errors+=(\"$md_id patch $patch failed to apply\")\n            return 1\n        fi\n    fi\n    return 0\n}\n\n## @fn downloadAndExtract()\n## @param url url of archive\n## @param dest destination folder for the archive\n## @param optional additional parameters to pass to the decompression tool.\n## @brief Download and extract an archive\n## @details Download and extract an archive.\n## @retval 0 on success\nfunction downloadAndExtract() {\n    local url=\"$1\"\n    local dest=\"$2\"\n    shift 2\n    local opts=(\"$@\")\n\n    local ext=\"${url##*.}\"\n    local cmd=(tar -xv)\n    local is_tar=1\n\n    local ret\n    case \"$ext\" in\n        gz|tgz)\n            cmd+=(-z)\n            ;;\n        bz2)\n            cmd+=(-j)\n            ;;\n        xz)\n            cmd+=(-J)\n            ;;\n        exe|zip)\n            is_tar=0\n            local tmp=\"$(mktemp -d)\"\n            local file=\"${url##*/}\"\n            runCmd wget -q -O\"$tmp/$file\" \"$url\"\n            runCmd unzip \"${opts[@]}\" -o \"$tmp/$file\" -d \"$dest\"\n            rm -rf \"$tmp\"\n            ret=$?\n    esac\n\n    if [[ \"$is_tar\" -eq 1 ]]; then\n        mkdir -p \"$dest\"\n        cmd+=(-C \"$dest\" \"${opts[@]}\")\n\n        runCmd \"${cmd[@]}\" < <(wget -q -O- \"$url\")\n        ret=$?\n    fi\n\n    return $ret\n}\n\n## @fn ensureFBMode()\n## @param res_x width of mode\n## @param res_y height of mode\n## @brief Add a framebuffer mode to /etc/fb.modes\n## @details Useful for adding specific resolutions used by emulators so SDL1 can\n## use them and utilise the RPI hardware scaling. Without for example a 320x240\n## mode in fb.modes many of the emulators that output to the framebuffer and\n## were not set to use the dispmanx SDL1 backend would just show in a small\n## area of the screen.\nfunction ensureFBMode() {\n    [[ ! -f /etc/fb.modes ]] && return\n    local res_x=\"$1\"\n    local res_y=\"$2\"\n    local res=\"${res_x}x${res_y}\"\n    sed -i \"/$res mode/,/endmode/d\" /etc/fb.modes\n\n    cat >> /etc/fb.modes <<_EOF_\n# added by RetroPie-Setup - $res mode for emulators\nmode \"$res\"\n    geometry $res_x $res_y $res_x $res_y 16\n    timings 0 0 0 0 0 0 0\nendmode\n_EOF_\n}\n\n## @fn joy2keyStart()\n## @brief Start joy2key.py process in background to map joystick presses to keyboard\nfunction joy2keyStart() {\ngptokeyb &\n}\n\n## @fn joy2keyStop()\n## @brief Stop previously started joy2key.py process.\nfunction joy2keyStop() {\nkillall gptokeyb\n}\n\n## @fn getPlatformConfig()\n## @param key key to look up\n## @brief gets a config from a platforms.cfg ini\n## @details gets a config from a platforms.cfg ini first looking in\n## `$configdir/all/platforms.cfg` then `$scriptdir/platforms.cfg`\n## allowing users to override any parts of `$scriptdir/platforms.cfg`\nfunction getPlatformConfig() {\n    local key=\"$1\"\n    local conf\n    for conf in \"$configdir/all/platforms.cfg\" \"$scriptdir/platforms.cfg\"; do\n        [[ ! -f \"$conf\" ]] && continue\n        iniConfig \"=\" '\"' \"$conf\"\n        iniGet \"$key\"\n        [[ -n \"$ini_value\" ]] && break\n    done\n    # workaround for RetroPie platform\n    [[ \"$key\" == \"retropie_fullname\" ]] && ini_value=\"RetroPie\"\n    echo \"$ini_value\"\n}\n\n## @fn addSystem()\n## @param system system to add\n## @brief adds an emulator entry / system\n## @param fullname optional fullname for the frontend (if not present in platforms.cfg)\n## @param exts optional extensions for the frontend (if not present in platforms.cfg)\n## @details Adds a system to one of the frontend launchers\nfunction addSystem() {\n    # backward compatibility for old addSystem functionality\n    if [[ $# > 3 ]]; then\n        addEmulator \"$@\"\n        addSystem \"$3\"\n        return\n    fi\n\n    local system=\"$1\"\n    local fullname=\"$2\"\n    local exts=($3)\n\n    local platform=\"$system\"\n    local theme=\"$system\"\n    local cmd\n    local path\n\n    # check if we are removing the system\n    if [[ \"$md_mode\" == \"remove\" ]]; then\n        delSystem \"$id\" \"$system\"\n        return\n    fi\n\n    # set system / platform / theme for configuration based on data in names field\n    if [[ \"$system\" == \"ports\" ]]; then\n        cmd=\"bash %ROM%\"\n        path=\"$romdir/ports\"\n    else\n        cmd=\"$rootdir/supplementary/runcommand/runcommand.sh 0 _SYS_ $system %ROM%\"\n        path=\"$romdir/$system\"\n    fi\n\n    exts+=(\"$(getPlatformConfig \"${system}_exts\")\")\n\n    local temp\n    temp=\"$(getPlatformConfig \"${system}_theme\")\"\n    if [[ -n \"$temp\" ]]; then\n        theme=\"$temp\"\n    else\n        theme=\"$system\"\n    fi\n\n    temp=\"$(getPlatformConfig \"${system}_platform\")\"\n    if [[ -n \"$temp\" ]]; then\n        platform=\"$temp\"\n    else\n        platform=\"$system\"\n    fi\n\n    temp=\"$(getPlatformConfig \"${system}_fullname\")\"\n    [[ -n \"$temp\" ]] && fullname=\"$temp\"\n\n    exts=\"${exts[*]}\"\n    # add the extensions again as uppercase\n    exts+=\" ${exts^^}\"\n\n    setESSystem \"$fullname\" \"$system\" \"$path\" \"$exts\" \"$cmd\" \"$platform\" \"$theme\"\n}\n\n## @fn delSystem()\n## @param system system to delete\n## @brief Deletes a system\n## @details deletes a system from all frontends.\nfunction delSystem() {\n    local system=\"$1\"\n    local fullname=\"$(getPlatformConfig \"${system}_fullname\")\"\n\n    local function\n    for function in $(compgen -A function _del_system_); do\n        \"$function\" \"$fullname\" \"$system\"\n    done\n}\n\n## @fn addPort()\n## @param id id of the module / command\n## @param port name of the port\n## @param name display name for the launch script\n## @param cmd commandline to launch\n## @param game rom/game parameter (optional)\n## @brief Adds a port to the emulationstation ports menu.\n## @details Adds an emulators.cfg entry as with addSystem but also creates a launch script in `$datadir/ports/$name.sh`.\n##\n## Can also optionally take a game parameter which can be used to create multiple launch\n## scripts for different games using the same engine - eg for quake\n##\n##     addPort \"lr-tyrquake\" \"quake\" \"Quake\" \"$emudir/retroarch/bin/retroarch -L $md_inst/tyrquake_libretro.so --config $md_conf_root/quake/retroarch.cfg %ROM%\" \"$romdir/ports/quake/id1/pak0.pak\"\n##     addPort \"lr-tyrquake\" \"quake\" \"Quake Mission Pack 2 (rogue)\" \"$emudir/retroarch/bin/retroarch -L $md_inst/tyrquake_libretro.so --config $md_conf_root/quake/retroarch.cfg %ROM%\" \"$romdir/ports/quake/id1/rogue/pak0.pak\"\n##\n## Would add an entry in $configdir/ports/quake/emulators.cfg for lr-tyrquake (setting it to default if no default set)\n## and create a launch script in $romdir/ports for each game.\nfunction addPort() {\n    local id=\"$1\"\n    local port=\"$2\"\n    local file=\"$romdir/ports/$3.sh\"\n    local cmd=\"$4\"\n    local game=\"$5\"\n\n    # move configurations from old ports location\n    if [[ -d \"$configdir/$port\" ]]; then\n        mv \"$configdir/$port\" \"$md_conf_root/\"\n    fi\n\n    # remove the ports launch script if in remove mode\n    if [[ \"$md_mode\" == \"remove\" ]]; then\n        rm -f \"$file\"\n        delEmulator \"$id\" \"$port\"\n        # if there are no more port launch scripts we can remove ports from emulation station\n        if [[ \"$(find \"$romdir/ports\" -maxdepth 1 -name \"*.sh\" | wc -l)\" -eq 0 ]]; then\n            delSystem \"$id\" \"ports\"\n        fi\n        return\n    fi\n\n    mkUserDir \"$romdir/ports\"\n\n    cat >\"$file\" << _EOF_\n#!/bin/bash\n\"$rootdir/supplementary/runcommand/runcommand.sh\" 0 _PORT_ \"$port\" \"$game\"\n_EOF_\n\n    chown $user:$user \"$file\"\n    chmod +x \"$file\"\n\n    [[ -n \"$cmd\" ]] && addEmulator 1 \"$id\" \"$port\" \"$cmd\"\n    addSystem \"ports\"\n}\n\n## @fn addEmulator()\n## @param default 1 to make the emulator / command default for the system if no default already set\n## @param id unique id of the module / command\n## @param name name of the system to add the emulator to\n## @param cmd commandline to launch\n## @brief Adds a new emulator for a system.\n## @details This is the primary function for adding emulators to a system which can be\n## switched between via the runcommand launch menu \n##\n##     addEmulator 1 \"vice-x64\" \"c64\" \"$md_inst/bin/x64 %ROM%\"\n##     addEmulator 0 \"vice-xvic\" \"c64\" \"$md_inst/bin/xvic %ROM%\"\n##\n## Would add two optional emulators for the c64 - with vice-x64 being the default if no default\n## was already set. This adds entries to `$configdir/$system/emulators.cfg` with\n##\n##     id = \"cmd\"\n##     default = id\n##\n## Which are then selectable from runcommand when launching roms\n##\n## For libretro emulators, cmd needs to only contain the path to the libretro library.\n##\n## eg. for the lr-fcuemm module\n##\n##     addEmulator 1 \"$md_id\" \"nes\" \"$md_inst/fceumm_libretro.so\"\nfunction addEmulator() {\n    local default=\"$1\"\n    local id=\"$2\"\n    local system=\"$3\"\n    local cmd=\"$4\"\n\n    # check if we are removing the system\n    if [[ \"$md_mode\" == \"remove\" ]]; then\n        delEmulator \"$id\" \"$system\"\n        return\n    fi\n\n    # automatically add parameters for libretro modules\n    if [[ \"$id\" == lr-* && \"$cmd\" =~ ^\"$md_inst\"[^[:space:]]*\\.so ]]; then\n        cmd=\"$emudir/retroarch/bin/retroarch -L $cmd --config $md_conf_root/$system/retroarch.cfg %ROM%\"\n    fi\n\n    # create a config folder for the system / port\n    mkUserDir \"$md_conf_root/$system\"\n\n    # add the emulator to the $conf_dir/emulators.cfg if a commandline exists (not used for some ports)\n    if [[ -n \"$cmd\" ]]; then\n        iniConfig \" = \" '\"' \"$md_conf_root/$system/emulators.cfg\"\n        iniSet \"$id\" \"$cmd\"\n        # set a default unless there is one already set\n        iniGet \"default\"\n        if [[ -z \"$ini_value\" && \"$default\" -eq 1 ]]; then\n            iniSet \"default\" \"$id\"\n        fi\n        chown $user:$user \"$md_conf_root/$system/emulators.cfg\"\n    fi\n}\n\n## @fn delEmulator()\n## @param id id of emulator to delete\n## @param system system to delete from\n## @brief Deletes an emulator entry / system\n## @details Delete the entry for the id from `$configdir/$system/emulators.cfg`.\n## If there are no more emulators for the system present, it will also\n## delete the system entry from the installed frontends.\nfunction delEmulator() {\n    local id=\"$1\"\n    local system=\"$2\"\n\n    local config=\"$md_conf_root/$system/emulators.cfg\"\n    # remove from apps list for system\n    if [[ -f \"$config\" && -n \"$id\" ]]; then\n        # delete emulator entry\n        iniConfig \" = \" '\"' \"$config\"\n        iniDel \"$id\"\n        # if it is the default - remove it - runcommand will prompt to select a new default\n        iniGet \"default\"\n        [[ \"$ini_value\" == \"$id\" ]] && iniDel \"default\"\n        # if we no longer have any entries in the emulators.cfg file we can remove it\n        grep -q \"=\" \"$config\" || rm -f \"$config\"\n    fi\n\n    # if we don't have an emulators.cfg we can remove the system from the frontends\n    if [[ ! -f \"$md_conf_root/$system/emulators.cfg\" ]]; then\n        local function\n        for function in $(compgen -A function _del_system_); do\n            \"$function\" \"$fullname\" \"$system\"\n        done\n    fi\n}\n\n## @fn patchVendorGraphics()\n## @param filename file to patch\n## @details replace declared dependencies of old vendor graphics libraries with new names\n## Temporary compatibility workaround for legacy software to work on new Raspberry Pi firmwares.\nfunction patchVendorGraphics() {\n    local filename=\"$1\"\n\n    # patchelf is not available on Raspbian Jessie\n    compareVersions \"$__os_debian_ver\" lt 9 && return\n\n    getDepends patchelf\n    printMsgs \"console\" \"Applying vendor graphics patch: $filename\"\n    patchelf --replace-needed libEGL.so libbrcmEGL.so \\\n             --replace-needed libGLES_CM.so libbrcmGLESv2.so \\\n             --replace-needed libGLESv1_CM.so libbrcmGLESv2.so \\\n             --replace-needed libGLESv2.so libbrcmGLESv2.so \\\n             --replace-needed libOpenVG.so libbrcmOpenVG.so \\\n             --replace-needed libWFC.so libbrcmWFC.so \"$filename\"\n}\n\n## @fn dkmsManager()\n## @param mode dkms operation type\n## @module_name name of dkms module\n## @module_ver version of dkms module\n## Helper function to manage DKMS modules installed by RetroPie\nfunction dkmsManager() {\n    local mode=\"$1\"\n    local module_name=\"$2\"\n    local module_ver=\"$3\"\n    local kernel=\"$(uname -r)\"\n    local ver\n\n    case \"$mode\" in\n        install)\n            if dkms status | grep -q \"^$module_name\"; then\n                dkmsManager remove \"$module_name\" \"$module_ver\"\n            fi\n            if [[ \"$__chroot\" -eq 1 ]]; then\n                kernel=\"$(ls -1 /lib/modules | tail -n -1)\"\n            fi\n            ln -sf \"$md_inst\" \"/usr/src/${module_name}-${module_ver}\"\n            dkms install --force -m \"$module_name\" -v \"$module_ver\" -k \"$kernel\"\n            if dkms status | grep -q \"^$module_name\"; then\n                md_ret_error+=(\"Failed to install $md_id\")\n                return 1\n            fi\n            ;;\n        remove)\n            for ver in $(dkms status \"$module_name\" | cut -d\",\" -f2 | cut -d\":\" -f1); do\n                dkms remove -m \"$module_name\" -v \"$ver\" --all\n                rm -f \"/usr/src/${module_name}-${ver}\"\n            done\n            dkmsManager unload \"$module_name\" \"$module_ver\"\n            ;;\n        reload)\n            dkmsManager unload \"$module_name\" \"$module_ver\"\n            modprobe \"$module_name\"\n            ;;\n        unload)\n            if [[ -n \"$(lsmod | grep ${module_name/-/_})\" ]]; then\n                rmmod \"$module_name\"\n            fi\n            ;;\n    esac\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/scriptmodules/inifuncs.sh",
    "content": "#!/bin/bash\n\n# This file is part of The RetroPie Project\n#\n# The RetroPie Project is the legal property of its developers, whose names are\n# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.\n#\n# See the LICENSE.md file at the top-level directory of this distribution and\n# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md\n#\n\n## @file inifuncs.sh\n## @brief RetroPie inifuncs library\n## @copyright GPLv3\n\n# @fn fatalError()\n# @param message string or array of messages to display\n# @brief echos message, and exits immediately.\nfunction fatalError() {\n    echo -e \"$1\"\n    exit 1\n}\n\n# arg 1: delimiter, arg 2: quote, arg 3: file\n\n## @fn iniConfig()\n## @param delim ini file delimiter eg. ' = '\n## @param quote ini file quoting character eg. '\"'\n## @param config ini file to edit\n## @brief Configure an ini file for getting/setting values with `iniGet` and `iniSet`\nfunction iniConfig() {\n    __ini_cfg_delim=\"$1\"\n    __ini_cfg_quote=\"$2\"\n    __ini_cfg_file=\"$3\"\n}\n\n# arg 1: command, arg 2: key, arg 2: value, arg 3: file (optional - uses file from iniConfig if not used)\n\n# @fn iniProcess()\n# @param command `set`, `unset` or `del`\n# @param key ini key to operate on\n# @param value to set\n# @param file optional file to use another file than the one configured with iniConfig\n# @brief The main function for setting and deleting from ini files - usually\n# not called directly but via iniSet iniUnset and iniDel\nfunction iniProcess() {\n    local cmd=\"$1\"\n    local key=\"$2\"\n    local value=\"$3\"\n    local file=\"$4\"\n    [[ -z \"$file\" ]] && file=\"$__ini_cfg_file\"\n    local delim=\"$__ini_cfg_delim\"\n    local quote=\"$__ini_cfg_quote\"\n\n    [[ -z \"$file\" ]] && fatalError \"No file provided for ini/config change\"\n    [[ -z \"$key\" ]] && fatalError \"No key provided for ini/config change on $file\"\n\n    # we strip the delimiter of spaces, so we can \"fussy\" match existing entries that have the wrong spacing\n    local delim_strip=${delim// /}\n    # if the stripped delimiter is empty - such as in the case of a space, just use the delimiter instead\n    [[ -z \"$delim_strip\" ]] && delim_strip=\"$delim\"\n    local match_re=\"^[[:space:]#]*$key[[:space:]]*$delim_strip.*$\"\n\n    local match\n    if [[ -f \"$file\" ]]; then\n        match=$(grep -E -i \"$match_re\" \"$file\" | tail -1)\n    else\n        touch \"$file\"\n    fi\n\n    if [[ \"$cmd\" == \"del\" ]]; then\n        [[ -n \"$match\" ]] && sed -i \"\\|$(sedQuote \"$match\")|d\" \"$file\"\n        return 0\n    fi\n\n    [[ \"$cmd\" == \"unset\" ]] && key=\"# $key\"\n\n    local replace=\"$key$delim$quote$value$quote\"\n    if [[ -z \"$match\" ]]; then\n        # make sure there is a newline then add the key-value pair\n        sed -i '$a\\' \"$file\"\n        echo \"$replace\" >> \"$file\"\n    else\n        # replace existing key-value pair\n        sed -i \"s|$(sedQuote \"$match\")|$(sedQuote \"$replace\")|g\" \"$file\"\n    fi\n\n    [[ \"$file\" =~ retroarch\\.cfg$ ]] && retroarchIncludeToEnd \"$file\"\n    return 0\n}\n\n## @fn iniUnset()\n## @param key ini key to operate on\n## @param value to Unset (key will be commented out, but the value can be changed also)\n## @param file optional file to use another file than the one configured with iniConfig\n## @brief Unset (comment out) a key / value pair in an ini file.\n## @details The key does not have to exist - if it doesn't exist a new line will\n## be added - eg. `# key = \"value\"`\n##\n## This function is useful for creating example configuration entries for users\n## to manually enable later or if a configuration is to be disabled but left\n## as an example.\nfunction iniUnset() {\n    iniProcess \"unset\" \"$1\" \"$2\" \"$3\"\n}\n\n## @fn iniSet()\n## @param key ini key to operate on\n## @param value to set\n## @param file optional file to use another file than the one configured with iniConfig\n## @brief Set a key / value pair in an ini file.\n## @details If the key already exists the existing line will be changed. If not\n## a new line will be created.\nfunction iniSet() {\n    iniProcess \"set\" \"$1\" \"$2\" \"$3\"\n}\n\n## @fn iniDel()\n## @param key ini key to operate on\n## @param file optional file to use another file than the one configured with iniConfig\n## @brief Delete a key / value pair in an ini file.\nfunction iniDel() {\n    iniProcess \"del\" \"$1\" \"\" \"$2\"\n}\n\n## @fn iniGet()\n## @param key ini key to get the value of\n## @param file optional file to use another file than the one configured with iniConfig\n## @brief Get the value of a key from an ini file.\n## @details The value of the key will end up in the global ini_value variable.\nfunction iniGet() {\n    local key=\"$1\"\n    local file=\"$2\"\n    [[ -z \"$file\" ]] && file=\"$__ini_cfg_file\"\n    if [[ ! -f \"$file\" ]]; then\n        ini_value=\"\"\n        return 1\n    fi\n\n    local delim=\"$__ini_cfg_delim\"\n    local quote=\"$__ini_cfg_quote\"\n    # we strip the delimiter of spaces, so we can \"fussy\" match existing entries that have the wrong spacing\n    local delim_strip=${delim// /}\n    # if the stripped delimiter is empty - such as in the case of a space, just use the delimiter instead\n    [[ -z \"$delim_strip\" ]] && delim_strip=\"$delim\"\n\n    # create a regexp to match the value based on whether we are looking for quotes or not\n    local value_m\n    if [[ -n \"$quote\" ]]; then\n        value_m=\"$quote*\\([^$quote|\\r]*\\)$quote*\"\n    else\n        value_m=\"\\([^\\r]*\\)\"\n    fi\n\n    ini_value=\"$(sed -n \"s/^[ |\\t]*$key[ |\\t]*$delim_strip[ |\\t]*$value_m.*/\\1/p\" \"$file\" | tail -1)\"\n}\n\n# @fn retroarchIncludeToEnd()\n# @param file config file to process\n# @brief Makes sure a `retroarch.cfg` file has the `#include` line at the end.\n# @details Used in runcommand.sh and iniProcess to ensure the #include for the\n# main retroarch.cfg is always at the end of a system `retroarch.cfg`. This\n# is because when processing its config RetroArch will take the first value it\n# finds, so any overrides need to be above the `#include` line where the global\n# retroarch.cfg is included.\nfunction retroarchIncludeToEnd() {\n    local config=\"$1\"\n\n    [[ ! -f \"$config\" ]] && return\n\n    local re=\"^#include.*retroarch\\.cfg\"\n\n    # extract the include line (unless it is the last line in the file)\n    # (remove blank lines, the last line and search for an include line in remaining lines)\n    local include=$(sed '/^$/d;$d' \"$config\" | grep \"$re\")\n\n    # if matched remove it and re-add it at the end\n    if [[ -n \"$include\" ]]; then\n        sed -i \"/$re/d\" \"$config\"\n        # add newline if missing and the #include line\n        sed -i '$a\\' \"$config\"\n        echo \"$include\" >>\"$config\"\n    fi\n}\n\n# arg 1: key, arg 2: default value (optional - is 1 if not used)\nfunction addAutoConf() {\n    local key=\"$1\"\n    local default=\"$2\"\n    local file=\"$configdir/all/autoconf.cfg\"\n\n    if [[ -z \"$default\" ]]; then\n       default=\"1\"\n    fi\n\n    iniConfig \" = \" '\"' \"$file\"\n    iniGet \"$key\"\n    ini_value=\"${ini_value// /}\"\n    if [[ -z \"$ini_value\" ]]; then\n        iniSet \"$key\" \"$default\"\n    fi\n}\n\n# arg 1: key, arg 2: value\nfunction setAutoConf() {\n    local key=\"$1\"\n    local value=\"$2\"\n    local file=\"$configdir/all/autoconf.cfg\"\n\n    iniConfig \" = \" '\"' \"$file\"\n    iniSet \"$key\" \"$value\"\n}\n\n# arg 1: key\nfunction getAutoConf(){\n    local key=\"$1\"\n\n    iniConfig \" = \" '\"' \"$configdir/all/autoconf.cfg\"\n    iniGet \"$key\"\n\n    [[ \"$ini_value\" == \"1\" ]] && return 0\n    return 1\n}\n\n# escape backslashes and pipes for sed\nfunction sedQuote() {\n    local string=\"$1\"\n    string=\"${string//\\\\/\\\\\\\\}\"\n    string=\"${string//|/\\\\|}\"\n    echo \"$string\"\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/scriptmodules/packages.sh",
    "content": "#!/usr/bin/env bash\n\n# This file is part of The RetroPie Project\n#\n# The RetroPie Project is the legal property of its developers, whose names are\n# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.\n#\n# See the LICENSE.md file at the top-level directory of this distribution and\n# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md\n#\n\ndeclare -A __mod_id_to_idx\n__mod_idx=()\n__mod_id=()\n__mod_type=()\n__mod_desc=()\n__mod_help=()\n__mod_licence=()\n__mod_section=()\n__mod_flags=()\n\ndeclare -A __sections\n__sections[core]=\"core\"\n__sections[main]=\"main\"\n__sections[opt]=\"optional\"\n__sections[exp]=\"experimental\"\n__sections[driver]=\"driver\"\n__sections[config]=\"configuration\"\n\nfunction rp_listFunctions() {\n    local idx\n    local mod_id\n    local desc\n    local mode\n    local func\n\n    echo -e \"Index/ID:                 Description:                                 List of available actions\"\n    echo \"-----------------------------------------------------------------------------------------------------------------------------------\"\n    for idx in ${__mod_idx[@]}; do\n        mod_id=${__mod_id[$idx]};\n        printf \"%d/%-20s: %-42s :\" \"$idx\" \"$mod_id\" \"${__mod_desc[$idx]}\"\n        while read mode; do\n            # skip private module functions (start with an underscore)\n            [[ \"$mode\" = _* ]] && continue\n            mode=${mode//_$mod_id/}\n            echo -n \" $mode\"\n        done < <(compgen -A function -X \\!*_$mod_id)\n        fnExists \"install_${mod_id}\" || fnExists \"install_bin_${mod_id}\" && ! fnExists \"remove_${mod_id}\" && echo -n \" remove\"\n        echo -n \" help\"\n        echo \"\"\n    done\n    echo \"===================================================================================================================================\"\n}\n\nfunction rp_printUsageinfo() {\n    echo -e \"Usage:\\n$0 <Index # or ID>\\nThis will run the actions depends, sources, build, install, configure and clean automatically.\\n\"\n    echo -e \"Alternatively, $0 can be called as\\n$0 <Index # or ID [depends|sources|build|install|configure|clean|remove]\\n\"\n    echo    \"Definitions:\"\n    echo    \"depends:    install the dependencies for the module\"\n    echo    \"sources:    install the sources for the module\"\n    echo    \"build:      build/compile the module\"\n    echo    \"install:    install the compiled module\"\n    echo    \"configure:  configure the installed module (es_systems.cfg / launch parameters etc)\"\n    echo    \"clean:      remove the sources/build folder for the module\"\n    echo    \"help:       get additional help on the module\"\n    echo -e \"\\nThis is a list of valid modules/packages and supported commands:\\n\"\n    rp_listFunctions\n}\n\nfunction rp_callModule() {\n    local req_id=\"$1\"\n    local mode=\"$2\"\n    # shift the function parameters left so $@ will contain any additional parameters which we can use in modules\n    shift 2\n\n    # if index get mod_id from array else we look it up\n    local md_id\n    local md_idx\n    if [[ \"$req_id\" =~ ^[0-9]+$ ]]; then\n        md_id=\"$(rp_getIdFromIdx $req_id)\"\n        md_idx=\"$req_id\"\n    else\n        md_idx=\"$(rp_getIdxFromId $req_id)\"\n        md_id=\"$req_id\"\n    fi\n\n    if [[ -z \"$md_id\" || -z \"$md_idx\" ]]; then\n        printMsgs \"console\" \"No module '$req_id' found for platform $__platform\"\n        return 2\n    fi\n\n    # automatically build/install module if no parameters are given\n    if [[ -z \"$mode\" ]]; then\n        for mode in depends sources build install configure clean; do\n            rp_callModule \"$md_idx\" \"$mode\" || return 1\n        done\n        return 0\n    fi\n\n    # create variables that can be used in modules\n    local md_desc=\"${__mod_desc[$md_idx]}\"\n    local md_help=\"${__mod_help[$md_idx]}\"\n    local md_type=\"${__mod_type[$md_idx]}\"\n    local md_flags=\"${__mod_flags[$md_idx]}\"\n    local md_build=\"$__builddir/$md_id\"\n    local md_inst=\"$rootdir/$md_type/$md_id\"\n    local md_data=\"$scriptdir/scriptmodules/$md_type/$md_id\"\n    local md_mode=\"install\"\n\n    # set md_conf_root to $configdir and to $configdir/ports for ports\n    # ports in libretrocores or systems (as ES sees them) in ports will need to change it manually with setConfigRoot\n    local md_conf_root\n    if [[ \"$md_type\" == \"ports\" ]]; then\n        setConfigRoot \"ports\"\n    else\n        setConfigRoot \"\"\n    fi\n\n    case \"$mode\" in\n        # remove sources\n        clean)\n            if [[ \"$__persistent_repos\" -eq 1 ]] && [[ -d \"$md_build/.git\" ]]; then\n                git -C \"$md_build\" reset --hard\n                git -C \"$md_build\" clean -f -d\n            else\n                rmDirExists \"$md_build\"\n            fi\n            return 0\n            ;;\n        # create binary archive\n        create_bin)\n            rp_createBin\n            return 0\n            ;;\n        # echo module help to console\n        help)\n            printMsgs \"console\" \"$md_desc\\n\\n$md_help\"\n            return 0;\n            ;;\n    esac\n\n    # create function name\n    function=\"${mode}_${md_id}\"\n\n    # handle cases where we have automatic module functions like remove\n    if ! fnExists \"$function\"; then\n        if [[ \"$mode\" == \"install\" ]] && fnExists \"install_bin_${md_id}\"; then\n            function=\"install_bin_${md_id}\"\n        elif [[ \"$mode\" != \"install_bin\" && \"$mode\" != \"remove\" ]]; then\n            return 0\n        fi\n    fi\n\n    # these can be returned by a module\n    local md_ret_require=()\n    local md_ret_files=()\n    local md_ret_errors=()\n    local md_ret_info=()\n\n    local action\n    local pushed=1\n    case \"$mode\" in\n        depends)\n            if [[ \"$1\" == \"remove\" ]]; then\n                md_mode=\"remove\"\n                action=\"Removing\"\n            else\n                action=\"Installing\"\n            fi\n            action+=\" dependencies for\"\n            ;;\n        sources)\n            action=\"Getting sources for\"\n            mkdir -p \"$md_build\"\n            pushd \"$md_build\"\n            pushed=$?\n            ;;\n        build)\n            action=\"Building\"\n            pushd \"$md_build\" 2>/dev/null\n            pushed=$?\n            ;;\n        install|install_bin)\n            action=\"Installing\"\n            # remove any previous install folder before installing\n            if ! hasFlag \"${__mod_flags[$md_idx]}\" \"noinstclean\"; then\n                rmDirExists \"$md_inst\"\n            fi\n            mkdir -p \"$md_inst\"\n            pushd \"$md_build\" 2>/dev/null\n            pushed=$?\n            ;;\n        configure)\n            action=\"Configuring\"\n            pushd \"$md_inst\" 2>/dev/null\n            pushed=$?\n            ;;\n        remove)\n            action=\"Removing\"\n            ;;\n        _update_hook)\n            ;;\n        *)\n            action=\"Running action '$mode' for\"\n            ;;\n    esac\n\n    # print an action and a description\n    if [[ -n \"$action\" ]]; then\n        printHeading \"$action '$md_id' : $md_desc\"\n    fi\n\n    case \"$mode\" in\n        remove)\n            fnExists \"$function\" && \"$function\" \"$@\"\n            md_mode=\"remove\"\n            if fnExists \"configure_${md_id}\"; then\n                pushd \"$md_inst\" 2>/dev/null\n                pushed=$?\n                \"configure_${md_id}\"\n            fi\n            rm -rf \"$md_inst\"\n            printMsgs \"console\" \"Removed directory $md_inst\"\n            ;;\n        install)\n            if fnExists \"$function\"; then\n                \"$function\" \"$@\"\n            elif fnExists \"install_bin_${md_id}\"; then\n                \"install_bin_${md_id}\" \"$@\"\n            fi\n            ;;\n        install_bin)\n            if fnExists \"install_bin_${md_id}\"; then\n                if ! \"$function\" \"$@\"; then\n                    md_ret_errors+=(\"Unable to install binary for $md_id\")\n                fi\n            else\n                if rp_hasBinary \"$md_idx\"; then\n                    rp_installBin\n                else\n                    md_ret_errors+=(\"Could not find a binary for $md_id\")\n                fi\n            fi\n            ;;\n        *)\n            # call the function with parameters\n            fnExists \"$function\" && \"$function\" \"$@\"\n            ;;\n    esac\n\n    # check if any required files are found\n    if [[ -n \"$md_ret_require\" ]]; then\n        for file in \"${md_ret_require[@]}\"; do\n            if [[ ! -e \"$file\" ]]; then\n                md_ret_errors+=(\"Could not successfully $mode $md_id - $md_desc ($file not found).\")\n                break\n            fi\n        done\n    fi\n\n    if [[ \"${#md_ret_errors}\" -eq 0 && -n \"$md_ret_files\" ]]; then\n        # check for existence and copy any files/directories returned\n        local file\n        for file in \"${md_ret_files[@]}\"; do\n            if [[ ! -e \"$md_build/$file\" ]]; then\n                md_ret_errors+=(\"Could not successfully install $md_desc ($md_build/$file not found).\")\n                break\n            fi\n            cp -Rvf \"$md_build/$file\" \"$md_inst\"\n        done\n    fi\n\n    # remove build folder if empty\n    [[ -d \"$md_build\" ]] && find \"$md_build\" -maxdepth 0 -empty -exec rmdir {} \\;\n\n    [[ \"$pushed\" -eq 0 ]] && popd\n\n    # some errors were returned.\n    if [[ \"${#md_ret_errors[@]}\" -gt 0 ]]; then\n        __ERRMSGS+=(\"${md_ret_errors[@]}\")\n        printMsgs \"console\" \"${md_ret_errors[@]}\" >&2\n        # if sources fails make sure we clean up\n        if [[ \"$mode\" == \"sources\" ]]; then\n            rp_callModule \"$md_idx\" clean\n        fi\n        # remove install folder if there is an error (and it is empty)\n        [[ -d \"$md_inst\" ]] && find \"$md_inst\" -maxdepth 0 -empty -exec rmdir {} \\;\n        return 1\n    fi\n\n    # some information messages were returned\n    if [[ \"${#md_ret_info[@]}\" -gt 0 ]]; then\n        __INFMSGS+=(\"${md_ret_info[@]}\")\n    fi\n\n    return 0\n}\n\nfunction rp_hasBinaries() {\n    [[ \"$__has_binaries\" -eq 1 ]] && return 0\n    return 1\n}\n\nfunction rp_hasBinary() {\n    local idx=\"$1\"\n    local id=\"${__mod_id[$idx]}\"\n    fnExists \"install_bin_${__mod_id[$idx]}\" && return 0\n\n    # binary blacklist for armv7 Debian/OSMC due to GCC ABI incompatibility with\n    # threaded C++ apps on Raspbian (armv6 userland)\n    if [[ \"$__os_id\" != \"Raspbian\" ]] && ! isPlatform \"armv6\"; then\n        case \"$id\" in\n            emulationstation|zdoom|lr-dinothawr|lr-ppsspp|ppsspp)\n                return 1\n                ;;\n        esac\n    fi\n\n    if rp_hasBinaries; then\n        wget --spider -q \"$__binary_url/${__mod_type[$idx]}/${__mod_id[$idx]}.tar.gz\"\n        return $?\n    fi\n    return 1\n}\n\nfunction rp_installBin() {\n    rp_hasBinaries || fatalError \"There are no binary archives for platform $__platform\"\n    local archive=\"$md_type/$md_id.tar.gz\";\n    local dest=\"$rootdir/$md_type\"\n    mkdir -p \"$dest\"\n    wget -O- -q \"$__binary_url/$archive\" | tar -xvz -C \"$dest\"\n}\n\nfunction rp_createBin() {\n    printHeading \"Creating binary archive for $md_desc\"\n\n    if [[ ! -d \"$rootdir/$md_type/$md_id\" ]]; then\n        printMsgs \"console\" \"No install directory $rootdir/$md_type/$md_id - no archive created\"\n        return 1\n    fi\n\n    if dirIsEmpty \"$rootdir/$md_type/$md_id\"; then\n        printMsgs \"console\" \"Empty install directory $rootdir/$md_type/$md_id - no archive created\"\n        return 1\n    fi\n\n    local archive=\"$md_id.tar.gz\"\n    local dest=\"$__tmpdir/archives/$__os_codename/$__platform/$md_type\"\n    rm -f \"$dest/$archive\"\n    mkdir -p \"$dest\"\n    tar cvzf \"$dest/$archive\" -C \"$rootdir/$md_type\" \"$md_id\"\n    chown $user:$user \"$dest/$archive\"\n}\n\nfunction rp_installModule() {\n    local idx=\"$1\"\n    local mode\n    if rp_hasBinary \"$idx\"; then\n        for mode in depends install_bin configure; do\n            rp_callModule \"$idx\" \"$mode\" || return 1\n        done\n    else\n        rp_callModule \"$idx\" clean\n        rp_callModule \"$idx\" || return 1\n    fi\n    return 0\n}\n\nfunction rp_registerModule() {\n    local module_idx=\"$1\"\n    local module_path=\"$2\"\n    local module_type=\"$3\"\n    local rp_module_id=\"\"\n    local rp_module_desc=\"\"\n    local rp_module_help=\"\"\n    local rp_module_licence=\"\"\n    local rp_module_section=\"\"\n    local rp_module_flags=\"\"\n    local var\n    local error=0\n\n    source \"$module_path\"\n\n    for var in rp_module_id rp_module_desc; do\n        if [[ -z \"${!var}\" ]]; then\n            echo \"Module $module_path is missing valid $var\"\n            error=1\n        fi\n    done\n    [[ $error -eq 1 ]] && exit 1\n\n    local flags=($rp_module_flags)\n    local flag\n    local valid=1\n\n    for flag in \"${flags[@]}\"; do\n        if [[ \"$flag\" =~ ^\\!(.+) ]] && isPlatform \"${BASH_REMATCH[1]}\"; then\n            valid=0\n            break\n        fi\n    done\n\n    if [[ \"$valid\" -eq 1 ]]; then\n        __mod_idx+=(\"$module_idx\")\n        __mod_id[\"$module_idx\"]=\"$rp_module_id\"\n        __mod_type[\"$module_idx\"]=\"$module_type\"\n        __mod_desc[\"$module_idx\"]=\"$rp_module_desc\"\n        __mod_help[\"$module_idx\"]=\"$rp_module_help\"\n        __mod_licence[\"$module_idx\"]=\"$rp_module_licence\"\n        __mod_section[\"$module_idx\"]=\"$rp_module_section\"\n        __mod_flags[\"$module_idx\"]=\"$rp_module_flags\"\n\n        # id to idx mapping via associative array\n        __mod_id_to_idx[\"$rp_module_id\"]=\"$module_idx\"\n    fi\n}\n\nfunction rp_registerModuleDir() {\n    local module_idx=\"$1\"\n    local module_dir=\"$2\"\n    for module in $(find \"$scriptdir/scriptmodules/$2\" -maxdepth 1 -name \"*.sh\" | sort); do\n        rp_registerModule $module_idx \"$module\" \"$module_dir\"\n        ((module_idx++))\n    done\n}\n\nfunction rp_registerAllModules() {\n  # rp_registerModuleDir 100 \"emulators\"\n  # rp_registerModuleDir 200 \"libretrocores\"\n    rp_registerModuleDir 300 \"ports\"\n    rp_registerModuleDir 800 \"supplementary\"\n  # rp_registerModuleDir 900 \"admin\"\n}\n\nfunction rp_getIdxFromId() {\n    echo \"${__mod_id_to_idx[$1]}\"\n}\n\nfunction rp_getIdFromIdx() {\n    echo \"${__mod_id[$1]}\"\n}\n\nfunction rp_getSectionIds() {\n    local section\n    local id\n    local ids=()\n    for id in \"${__mod_idx[@]}\"; do\n        for section in \"$@\"; do\n            [[ \"${__mod_section[$id]}\" == \"$section\" ]] && ids+=(\"$id\")\n        done\n    done\n    echo \"${ids[@]}\"\n}\n\nfunction rp_isInstalled() {\n    local md_idx=\"$1\"\n    local md_inst=\"$rootdir/${__mod_type[$md_idx]}/${__mod_id[$md_idx]}\"\n    [[ -d \"$md_inst\" ]] && return 0\n    return 1\n}\n\nfunction rp_updateHooks() {\n    local function\n    local mod_idx\n    for function in $(compgen -A function _update_hook_); do\n        mod_idx=\"$(rp_getIdxFromId \"${function/_update_hook_/}\")\"\n        [[ -n \"$mod_idx\" ]] && rp_callModule \"$mod_idx\" _update_hook\n    done\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/scriptmodules/supplementary/bluetoothcontroller.py",
    "content": "#!/usr/bin/env python\n\n# - \"curses\" menu based on https://stackoverflow.com/a/14205494\n\nimport curses,sys,time\nfrom bluetool import Bluetooth\nfrom curses import panel\n\nclass Menu(object):\n    def __init__(self, items, stdscreen):\n        self.window = stdscreen.subwin(0, 0)\n        self.window.keypad(1)\n        self.panel = panel.new_panel(self.window)\n        self.panel.hide()\n        panel.update_panels()\n\n        self.position = 0\n        self.items = items\n        self.items.append((\"Back / Exit\", \"exit\"))\n\n    def navigate(self, n):\n        self.position += n\n        if self.position < 0:\n            self.position = 0\n        elif self.position >= len(self.items):\n            self.position = len(self.items) - 1\n\n    def display(self):\n        self.panel.top()\n        self.panel.show()\n        self.window.clear()\n\n        while True:\n            self.window.refresh()\n            curses.doupdate()\n            for index, item in enumerate(self.items):\n                if index == self.position:\n                    mode = curses.A_REVERSE\n                else:\n                    mode = curses.A_NORMAL\n\n                msg = \"%d. %s\" % (index, item[0])\n                self.window.addstr(1 + index, 1, msg, mode)\n\n            key = self.window.getch()\n\n            if key in [curses.KEY_ENTER, ord(\"\\n\")]:\n                if self.position == len(self.items) - 1:\n                    break\n                else:\n                    self.items[self.position][1]()\n\n            elif key == curses.KEY_UP:\n                self.navigate(-1)\n\n            elif key == curses.KEY_DOWN:\n                self.navigate(1)\n\n        self.window.clear()\n        self.panel.hide()\n        panel.update_panels()\n        curses.doupdate()\n\nclass MyApp(object):\n    def __init__(self, stdscreen):\n        self.scan_timeout = 90\n        self.bt = Bluetooth()\n        self.bt.start_scanning(self.scan_timeout)\n\n        self.screen = stdscreen\n        curses.curs_set(0)\n        mainMenu = [\n            ('Rescan devices\\t\\t(scans for {} seconds in background, system bus will be processed every 10 seconds)'.format(self.scan_timeout), self.rescan_devices),\n            ('Trust controller\\t\\t(shows only untrusted pairable controllers)', self.trust_controller_menu),\n            ('Pair controller\\t\\t(shows only unpaired pairable controllers)', self.pair_controller_menu),\n            ('Connect controller\\t\\t(shows only paired and trusted connectable controllers)', self.connect_device_menu),\n            ('Disconnect controller\\t(shows only connected controllers)', self.disconnect_device_menu),\n            ('Remove controller\\t\\t(shows only trusted, paired OR connected controllers)', self.remove_device_menu),\n        ]\n        self.make_menu(mainMenu)\n        self.menu.display()\n\n    def make_menu(self, menulist):\n        self.menu = Menu(menulist, self.screen)\n\n    def trust_controller_menu(self):\n        properties = [\n            'Icon',\n            'RSSI',\n            'Trusted',\n        ]\n        menu = []\n        for device in self.bt.get_available_devices():\n            mac_address = device['mac_address'].decode('utf-8')\n            for property in properties:\n                device[property] = self.bt.get_device_property(mac_address,property)\n            if ((device['Icon'] == 'input-gaming') and (device['Trusted'] == 0)):\n                menu.append(('{}\\t{}\\tRSSI: {}'.format(device['mac_address'].decode('utf-8'),device['name'].decode('utf-8'),device['RSSI']),self.trust_controller))\n        self.make_menu(menu)\n        self.menu.display()\n\n    def trust_controller(self):\n        mac = self.get_selected_device()[0]\n        self.bt.trust(mac)\n        if self.bt.get_device_property(mac,'Trusted') == 1:\n            self.menu.items[self.menu.position] = ('MAC {} ({}) trusted!\\n'.format(mac,self.get_selected_device()[1]),self.navigate_to_back)\n        else:\n            self.menu.items[self.menu.position] = ('Error trusting MAC {} ({})!\\n'.format(mac,self.get_selected_device()[1]),self.navigate_to_back)\n\n    def pair_controller_menu(self):\n        properties = [\n            'Icon',\n            'Paired',\n            'RSSI',\n            'Trusted',\n        ]\n        menu = []\n        for device in self.bt.get_devices_to_pair():\n            mac_address = device['mac_address'].decode('utf-8')\n            for property in properties:\n                device[property] = self.bt.get_device_property(mac_address,property)\n            if ((device['Icon'] == 'input-gaming') and (device['Trusted'] == 1) and device['Paired'] == 0):\n                menu.append(('{}\\t{}\\tRSSI: {}'.format(device['mac_address'].decode('utf-8'),device['name'].decode('utf-8'),device['RSSI']),self.pair_controller))\n        self.make_menu(menu)\n        self.menu.display()\n\n    def pair_controller(self):\n        mac = self.get_selected_device()[0]\n        self.bt.pair(mac)\n        if self.bt.get_device_property(mac,'Paired') == 1:\n            self.menu.items[self.menu.position] = ('MAC {} ({}) paired!\\n'.format(mac,self.get_selected_device()[1]),self.navigate_to_back)\n        else:\n            self.menu.items[self.menu.position] = ('Error paring MAC {} ({})!\\n'.format(mac,self.get_selected_device()[1]),self.navigate_to_back)        \n\n    def connect_device_menu(self):\n        properties = [\n            'Icon',\n            'RSSI',\n            'Connected',\n            'Paired',\n            'Trusted',\n        ]\n        menu = []\n        for device in self.bt.get_available_devices():\n            mac_address = device['mac_address'].decode('utf-8')\n            for property in properties:\n                device[property] = self.bt.get_device_property(mac_address,property)\n            if ((device['Icon'] == 'input-gaming') and (device['Paired'] == 1) and (device['Trusted'] == 1) and (device['Connected'] == 0)):\n                menu.append(('{}\\t{}\\tRSSI: {}'.format(device['mac_address'].decode('utf-8'),device['name'].decode('utf-8'),device['RSSI']),self.connect_device))\n        self.make_menu(menu)\n        self.menu.display()\n\n    def connect_device(self):\n        mac = self.get_selected_device()[0]\n        self.bt.connect(mac)\n        if self.bt.get_device_property(mac,'Connected') == 1:\n            self.menu.items[self.menu.position] = ('MAC {} ({}) connected!\\n'.format(mac,self.get_selected_device()[1]),self.navigate_to_back)\n        else:\n            self.menu.items[self.menu.position] = ('Error connecting MAC {} ({})!\\n'.format(mac,self.get_selected_device()[1]),self.navigate_to_back)        \n\n\n    def disconnect_device_menu(self):\n        properties = [\n            'Icon',\n            'Connected',\n            'RSSI',\n        ]\n        menu = []\n        for device in self.bt.get_connected_devices():\n            mac_address = device['mac_address'].decode('utf-8')\n            for property in properties:\n                device[property] = self.bt.get_device_property(mac_address,property)\n            if ((device['Icon'] == 'input-gaming') and (device['Connected'] == 1)):\n                menu.append(('{}\\t{}\\tRSSI: {}'.format(device['mac_address'].decode('utf-8'),device['name'].decode('utf-8'),device['RSSI']),self.disconnect_device))\n        self.make_menu(menu)\n        self.menu.display()\n\n    def disconnect_device(self):\n        mac = self.get_selected_device()[0]\n        self.bt.disconnect(mac)\n        if self.bt.get_device_property(mac,'Connected') == 0:\n            self.menu.items[self.menu.position] = ('MAC {} ({}) disconnected!\\n'.format(mac,self.get_selected_device()[1]),self.navigate_to_back)\n        else:\n            self.menu.items[self.menu.position] = ('Error disconnecting MAC {} ({})!\\n'.format(mac,self.get_selected_device()[1]),self.navigate_to_back)          \n\n    def remove_device_menu(self):\n        properties = [\n            'Icon',\n            'Paired',\n            'Trusted',\n            'RSSI',\n            'Blocked',\n            'Connected',\n        ]\n        menu = []\n        for device in self.bt.get_available_devices():\n            mac_address = device['mac_address'].decode('utf-8')\n            for property in properties:\n                device[property] = self.bt.get_device_property(mac_address,property)\n            if ((device['Icon'] == 'input-gaming') and ((device['Paired'] == 1) or (device['Trusted'] == 1) or (device['Blocked'] == 1))):\n                menu.append(('{}\\t{}\\tRSSI: {}\\tTrusted: {}\\tPaired: {}\\tConnected: {}\\tBlocked: {}'.format(device['mac_address'].decode('utf-8'),device['name'].decode('utf-8'),device['RSSI'],device['Trusted'],device['Paired'],device['Connected'],device['Blocked']),self.remove_device))\n        self.make_menu(menu)\n        self.menu.display()\n\n    def remove_device(self):\n        mac = self.get_selected_device()[0]\n        self.bt.remove(mac)\n        self.menu.items[self.menu.position] = ('MAC {} ({}) removed!\\n'.format(mac,self.get_selected_device()[1]),self.navigate_to_back)\n\n    def rescan_devices(self):\n        self.menu.window.addstr(9, 1, 'Scanning for device for {} seconds in background now, please refresh views...'.format(self.scan_timeout), curses.A_NORMAL)\n        self.bt.start_scanning(self.scan_timeout)\n\n    def get_selected_device(self):\n        return(self.menu.items[self.menu.position][0].split('\\t'))\n\n    def navigate_to_back(self):\n        self.menu.navigate(len(self.menu.items) -1)\n\nif __name__ == \"__main__\":\n    if (len(sys.argv) == 1):\n        bt = Bluetooth()\n        print('Scanning for available devices for 90 seconds, please wait...')\n        bt.start_scanning(90)\n        time.sleep(15)\n        print('Getting pairable devices, please wait...')\n        devices = bt.get_devices_to_pair()\n        print(devices)\n        for device in devices:\n            mac = device['mac_address'].decode('utf-8')\n            name = device['name'].decode('utf-8')\n            print('Found MAC: {}\\tName: {}'.format(mac,name))\n            if bt.get_device_property(mac,'Icon') == 'input-gaming':\n                print('Found controller {} Name: {}, trusting...'.format(mac,name))\n                bt.trust(mac)\n                if bt.get_device_property(mac,'Trusted') == 1:\n                    print('Trusted {}, quick pause, then pairing...'.format(name))\n                    time.sleep(5)\n                    bt.pair(mac)\n                    if bt.get_device_property(mac,'Paired') == 1:\n                        print('Paired {}, quick pause, then connecting...'.format(name))\n                        time.sleep(5)\n                        bt.connect(mac)\n                        if bt.get_device_property(mac,'Connected') == 1:\n                            print('Connected {}, exiting...'.format(name))\n    else:\n        curses.wrapper(MyApp)\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/scriptmodules/supplementary/esthemes.sh",
    "content": "#!/usr/bin/env bash\n\n# This file is part of The RetroPie Project\n#\n# The RetroPie Project is the legal property of its developers, whose names are\n# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.\n#\n# See the LICENSE.md file at the top-level directory of this distribution and\n# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md\n#\n\nrp_module_id=\"esthemes\"\nrp_module_desc=\"Install themes for Emulation Station\"\nrp_module_section=\"config\"\n\nfunction install_theme_esthemes() {\n    local theme=\"$1\"\n    local repo=\"$2\"\n    if [[ -z \"$repo\" ]]; then\n        repo=\"RetroPie\"\n    fi\n    if [[ -z \"$theme\" ]]; then\n        theme=\"carbon\"\n        repo=\"RetroPie\"\n    fi\n   if [ -d \"/storage/.emulationstation/themes/$theme\" ]; then\n    rm -rf \"/storage/.emulationstation/themes/$theme\"\n   else    \n    mkdir -p /storage/.emulationstation/themes/$theme\n   fi\n    #gitPullOrClone \"/storage/.emulationstation/themes/$theme\" \"https://github.com/$repo/es-theme-$theme.git\"\n    wget https://github.com/$repo/es-theme-$theme/archive/master.zip -O /tmp/$theme.zip\n    zip=/tmp/$theme.zip\n    dest=/storage/.emulationstation/themes/$theme\n    unzip -d \"$dest\" -o \"$zip\" && f=(\"$dest\"/*) && cp -rf \"$dest\"/*/* \"$dest\" && rm -rf \"${f[@]}\"\n    rm /tmp/$theme.zip\n}\n\nfunction uninstall_theme_esthemes() {\n    local theme=\"$1\"\n    if [[ -d \"/storage/.emulationstation/themes/$theme\" ]]; then\n        rm -rf \"/storage/.emulationstation/themes/$theme\"\n    fi\n}\n\nfunction gui_esthemes() {\n    local themes=(\n        'RetroPie carbon'\n        'RetroPie carbon-centered'\n        'RetroPie carbon-nometa'\n        'RetroPie simple'\n        'RetroPie simple-dark'\n        'RetroPie clean-look'\n        'RetroPie color-pi'\n        'RetroPie nbba'\n        'RetroPie simplified-static-canela'\n        'RetroPie turtle-pi'\n        'RetroPie zoid'\n        'ehettervik pixel'\n        'ehettervik pixel-metadata'\n        'ehettervik pixel-tft'\n        'ehettervik luminous'\n        'ehettervik minilumi'\n        'ehettervik workbench'\n        'AmadhiX eudora'\n        'AmadhiX eudora-bigshot'\n        'AmadhiX eudora-concise'\n        'InsecureSpike retroplay-clean-canela'\n        'InsecureSpike retroplay-clean-detail-canela'\n        'Omnija simpler-turtlepi'\n        'Omnija simpler-turtlemini'\n        'Omnija metro'\n        'lilbud material'\n        'mattrixk io'\n        'mattrixk metapixel'\n        'mattrixk spare'\n        'robertybob space'\n        'robertybob simplebigart'\n        'robertybob tv'\n        'HerbFargus tronkyfran'\n        'lilbud flat'\n        'lilbud flat-dark'\n        'lilbud minimal'\n        'lilbud switch'\n        'FlyingTomahawk futura-V'\n        'FlyingTomahawk futura-dark-V'\n        'G-rila fundamental'\n        'ruckage nes-mini'\n        'ruckage famicom-mini'\n        'ruckage snes-mini'\n        'anthonycaccese crt'\n        'anthonycaccese crt-centered'\n        'anthonycaccese art-book'\n        'anthonycaccese art-book-4-3'\n        'anthonycaccese art-book-pocket'\n        'anthonycaccese art-book-micro'\n        'anthonycaccese tft'\n        'anthonycaccese picade'\n        'TMNTturtleguy ComicBook'\n        'TMNTturtleguy ComicBook_4-3'\n        'TMNTturtleguy ComicBook_SE-Wheelart'\n        'TMNTturtleguy ComicBook_4-3_SE-Wheelart'\n        'ChoccyHobNob cygnus'\n        'dmmarti steampunk'\n        'dmmarti hurstyblue'\n        'dmmarti maximuspie'\n        'dmmarti showcase'\n        'dmmarti kidz'\n        'dmmarti unified'\n        'rxbrad freeplay'\n        'rxbrad gbz35'\n        'rxbrad gbz35-dark'\n        'garaine marioblue'\n        'garaine bigwood'\n        'MrTomixf Royal_Primicia'\n        'lostless playstation'\n        'mrharias superdisplay'\n        'coinjunkie synthwave'\n        'RetroHursty69 magazinemadness'\n        'RetroHursty69 stirling'\n        'RetroHursty69 boxalloyred'\n        'RetroHursty69 boxalloyblue'\n        'RetroHursty69 greenilicious'\n        'RetroHursty69 retroroid'\n        'RetroHursty69 merryxmas'\n        'RetroHursty69 cardcrazy'\n        'RetroHursty69 license2game'\n        'RetroHursty69 comiccrazy'\n        'RetroHursty69 snazzy'\n        'RetroHursty69 tributeGoT'\n        'RetroHursty69 tributeSTrek'\n        'RetroHursty69 tributeSWars'\n        'RetroHursty69 crisp'\n        'RetroHursty69 crisp_light'\n        'RetroHursty69 primo'\n        'RetroHursty69 primo_light'\n        'RetroHursty69 back2basics'\n        'RetroHursty69 retrogamenews'\n        'RetroHursty69 bluray'\n        'RetroHursty69 soda'\n        'RetroHursty69 lightswitch'\n        'RetroHursty69 darkswitch'\n        'RetroHursty69 whiteslide'\n        'RetroHursty69 graffiti'\n        'RetroHursty69 whitewood'\n        'RetroHursty69 sublime'\n        'RetroHursty69 infinity'\n        'RetroHursty69 neogeo_only'\n        'RetroHursty69 boxcity'\n        'RetroHursty69 vertical_arcade'\n        'RetroHursty69 cabsnazzy'\n        'RetroHursty69 garfieldism'\n        'RetroHursty69 halloweenspecial'\n        'RetroHursty69 heychromey'\n        'RetroHursty69 homerism'\n        'RetroHursty69 spaceinvaders'\n        'RetroHursty69 disenchantment'\n        'RetroHursty69 minions'\n        'RetroHursty69 tmnt'\n        'RetroHursty69 pacman'\n        'RetroHursty69 dragonballz'\n        'RetroHursty69 minecraft'\n        'RetroHursty69 incredibles'\n        'RetroHursty69 mario_melee'\n        'RetroHursty69 evilresident'\n        'RetroHursty69 hurstyspin'\n        'RetroHursty69 cyber'\n        'RetroHursty69 supersweet'\n        'RetroHursty69 donkeykonkey'\n        'RetroHursty69 snapback'\n        'RetroHursty69 heman'\n        'RetroHursty69 pitube'\n        'RetroHursty69 batmanburton'\n        'RetroHursty69 NegativeColor'\n        'RetroHursty69 NegativeSepia'\n        'RetroHursty69 corg'\n        'RetroHursty69 mysticorb'\n        'RetroHursty69 joysticks'\n        'RetroHursty69 orbpilot'\n        'RetroHursty69 bitfit'\n        'RetroHursty69 circuit'\n        'RetroHursty69 retroboy'\n        'RetroHursty69 retroboy2'\n        'RetroHursty69 hurstybluetake2'\n        'RetroHursty69 fabuloso'\n        'RetroHursty69 arcade1up_aspectratio54'\n        'RetroHursty69 supersweet_aspectratio54'\n        'RetroHursty69 heychromey_aspectratio54'\n        'RetroHursty69 mariobrosiii'\n        'RetroHursty69 vertical_limit_verticaltheme'\n        'Saracade scv720'\n        'chicueloarcade Chicuelo'\n        'SuperMagicom nostalgic'\n        'lipebello retrorama'\n        'lipebello strangerstuff'\n        'lipebello spaceoddity'\n        'lipebello swineapple'\n        'waweedman pii-wii'\n        'waweedman Blade-360'\n        'waweedman Venom'\n        'waweedman Spider-Man'\n        'blowfinger77 locomotion'\n    )\n    while true; do\n        local theme\n        local installed_themes=()\n        local repo\n        local options=()\n        local status=()\n        local default\n\n        options+=(U \"Update all installed themes\")\n\n        local i=1\n        for theme in \"${themes[@]}\"; do\n            theme=($theme)\n            repo=\"${theme[0]}\"\n            theme=\"${theme[1]}\"\n            if [[ -d \"/storage/.emulationstation/themes/$theme\" ]]; then\n                status+=(\"i\")\n                options+=(\"$i\" \"Update or Uninstall $repo/$theme (installed)\")\n                installed_themes+=(\"$theme $repo\")\n            else\n                status+=(\"n\")\n                options+=(\"$i\" \"Install $repo/$theme\")\n            fi\n            ((i++))\n        done\n        local cmd=(dialog --ascii-lines --default-item \"$default\" --backtitle \"$__backtitle\" --menu \"Choose an option\" 22 76 16)\n        local choice=$(\"${cmd[@]}\" \"${options[@]}\" 2>&1 >/dev/tty)\n        default=\"$choice\"\n        [[ -z \"$choice\" ]] && break\n        case \"$choice\" in\n            U)\n                for theme in \"${installed_themes[@]}\"; do\n                    theme=($theme)\n                    rp_callModule esthemes install_theme \"${theme[0]}\" \"${theme[1]}\"\n                done\n                ;;\n            *)\n                theme=(${themes[choice-1]})\n                repo=\"${theme[0]}\"\n                theme=\"${theme[1]}\"\n                  if [[ -d \"/storage/.emulationstation/themes/$theme\" ]]; then\n                    options=(1 \"Update $repo/$theme\" 2 \"Uninstall $repo/$theme\")\n                    cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --menu \"Choose an option for theme\" 12 40 06)\n                    local choice=$(\"${cmd[@]}\" \"${options[@]}\" 2>&1 >/dev/tty)\n                    case \"$choice\" in\n                        1)\n                            rp_callModule esthemes install_theme \"$theme\" \"$repo\"\n                            ;;\n                        2)\n                            rp_callModule esthemes uninstall_theme \"$theme\"\n                            ;;\n                    esac\n                else\n                    rp_callModule esthemes install_theme \"$theme\" \"$repo\"\n                fi\n                ;;\n        esac\n    done\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/scriptmodules/supplementary/reicast.sh",
    "content": "#!/usr/bin/env bash\n\n# This file is part of The RetroPie Project\n#\n# The RetroPie Project is the legal property of its developers, whose names are\n# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.\n#\n# See the LICENSE.md file at the top-level directory of this distribution and\n# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md\n#\n\nrp_module_id=\"reicast\"\nrp_module_desc=\"Dreamcast emulator Reicast\"\nrp_module_help=\"ROM Extensions: .cdi .gdi\\n\\nCopy your Dreamcast roms to $romdir/dreamcast\\n\\nCopy the required BIOS files dc_boot.bin and dc_flash.bin to $biosdir/dc\"\nrp_module_licence=\"GPL2 https://raw.githubusercontent.com/reicast/reicast-emulator/master/LICENSE\"\nrp_module_section=\"opt\"\n\nfunction input_reicast() {\n    local temp_file=\"$(mktemp)\"\n    cd \"/usr/bin\"\n    ./reicast-joyconfig.py -f \"$temp_file\" >/dev/tty\n    iniConfig \" = \" \"\" \"$temp_file\"\n    iniGet \"mapping_name\"\n    local mapping_file=\"/storage/.config/reicast/mappings/controller_${ini_value// /}.cfg\"\n    mv \"$temp_file\" \"$mapping_file\"\n    chown $user:$user \"$mapping_file\"\n}\n\nfunction gui_reicast() {\n    while true; do\n        local options=(\n            1 \"Configure input devices for Reicast\"\n        )\n        local cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --menu \"Choose an option\" 22 76 16)\n        local choice=$(\"${cmd[@]}\" \"${options[@]}\" 2>&1 >/dev/tty)\n        [[ -z \"$choice\" ]] && break\n        case \"$choice\" in\n            1)\n                clear\n                input_reicast\n                ;;\n        esac\n    done\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/scriptmodules/supplementary/scraper.sh",
    "content": "#!/usr/bin/env bash\n\n# This file is part of The RetroPie Project\n#\n# The RetroPie Project is the legal property of its developers, whose names are\n# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.\n#\n# See the LICENSE.md file at the top-level directory of this distribution and\n# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md\n#\n\nrp_module_id=\"scraper\"\nrp_module_desc=\"Scraper for EmulationStation by Steven Selph\"\nrp_module_licence=\"MIT https://raw.githubusercontent.com/sselph/scraper/master/LICENSE\"\nrp_module_section=\"opt\"\nrp_module_flags=\"nobin\"\n\n\nfunction list_systems_scraper() {\n    find -L \"$romdir\" -mindepth 1 -maxdepth 1 -type d | sort\n}\n\nfunction scrape_scraper() {\n    local system=\"$1\"\n    [[ -z \"$system\" ]] && return\n\n    iniConfig \" = \" '\"' \"$configdir/all/scraper.cfg\"\n    eval $(_load_config_scraper)\n\n    local gamelist\n    local img_dir\n    local img_path\n    if [[ \"$use_rom_folder\" -eq 1 ]]; then\n        gamelist=\"$romdir/$system/gamelist.xml\"\n        img_dir=\"$romdir/$system/images\"\n        img_path=\"./images\"\n    else\n        gamelist=\"$home/.emulationstation/gamelists/$system/gamelist.xml\"\n        img_dir=\"$home/.emulationstation/downloaded_images/$system\"\n        img_path=\"~/.emulationstation/downloaded_images/$system\"\n    fi\n\n    local params=()\n    params+=(-image_dir \"$img_dir\")\n    params+=(-image_path \"$img_path\")\n    params+=(-video_dir \"$img_dir\")\n    params+=(-video_path \"$img_path\")\n    params+=(-marquee_dir \"$img_dir\")\n    params+=(-marquee_path \"$img_path\")\n    params+=(-output_file \"$gamelist\")\n    params+=(-rom_dir \"$romdir/$system\")\n    params+=(-workers \"4\")\n    params+=(-skip_check)\n\n    [[ \"$system\" =~ ^mame-|arcade|fba|neogeo ]] && params+=(-mame)\n\n    if [[ \"$use_thumbs\" -eq 1 ]]; then\n        params+=(-thumb_only)\n    fi\n    if [[ \"$screenshots\" -eq 1 ]]; then\n        if [[ \"$system\" =~ ^mame-|arcade|fba|neogeo ]]; then\n            params+=(-mame_img \"s,m,t\")\n        else\n            params+=(-console_img \"s,b,3b,l,f\")\n        fi\n    fi\n    if [[ \"$download_videos\" -eq 1 ]]; then\n        params+=(-download_videos)\n    fi\n    if [[ \"$download_marquees\" -eq 1 ]]; then\n        params+=(-download_marquees)\n    fi\n    if [[ -n \"$max_width\" ]]; then\n        params+=(-max_width \"$max_width\")\n    fi\n    if [[ -n \"$max_height\" ]]; then\n        params+=(-max_height \"$max_height\")\n    fi\n    if [[ \"$console_src\" -eq 0 ]]; then\n        params+=(-console_src=\"ovgdb\")\n    elif [[ \"$console_src\" -eq 1 ]]; then\n        params+=(-console_src=\"gdb\")\n    else\n        params+=(-console_src=\"ss\")\n    fi\n    if [[ \"$mame_src\" -eq 0 ]]; then\n        params+=(-mame_src=\"mamedb\")\n    elif [[ \"$mame_src\" -eq 1 ]]; then\n        params+=(-mame_src=\"ss\")\n    else\n        params+=(-mame_src=\"adb\")\n    fi\n    if [[ \"$rom_name\" -eq 1 ]]; then\n        params+=(-use_nointro_name=false)\n    elif [[ \"$rom_name\" -eq 2 ]]; then\n        params+=(-use_filename=true)\n    fi\n    if [[ \"$append_only\" -eq 1 ]]; then\n        params+=(-append)\n    fi\n\n    # trap ctrl+c and return if pressed (rather than exiting retropie-setup etc)\n    trap 'trap 2; return 1' INT\n    \"/usr/bin/scraper\" ${params[@]}\n    trap 2\n}\n\nfunction scrape_all_scraper() {\n    local system\n    while read system; do\n        system=$(basename $system)\n        scrape_scraper \"$system\" \"$@\" || return 1\n    done < <(list_systems_scraper)\n}\n\nfunction scrape_chosen_scraper() {\n    local options=()\n    local system\n    local i=1\n    while read system; do\n        system=$(basename $system)\n        options+=($i \"$system\" OFF)\n        ((i++))\n    done < <(list_systems_scraper)\n\n    if [[ ${#options[@]} -eq 0 ]] ; then\n        printMsgs \"dialog\" \"No populated rom folders were found in $romdir.\"\n        return\n    fi\n\n    local cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --checklist \"Select ROM Folders\" 22 76 16)\n    local choice=($(\"${cmd[@]}\" \"${options[@]}\" 2>&1 >/dev/tty0))\n\n    [[ ${#choice[@]} -eq 0 ]] && return\n\n    local choice\n    for choice in \"${choice[@]}\"; do\n        choice=${options[choice*3-2]}\n        scrape_scraper \"$choice\" \"$@\"\n    done\n}\n\nfunction _load_config_scraper() {\n    echo \"$(loadModuleConfig \\\n        'use_thumbs=1' \\\n        'screenshots=0' \\\n        'max_width=400' \\\n        'max_height=400' \\\n        'console_src=1' \\\n        'mame_src=2' \\\n        'rom_name=0' \\\n        'append_only=0' \\\n        'use_rom_folder=0' \\\n        'download_videos=0' \\\n        'download_marquees=0' \\\n    )\"\n}\n\nfunction gui_scraper() {\nee_console enable\n\necho \"Success!\" > /dev/tty0\nsleep 1\n\n    if pgrep \"emulationstation\" >/dev/null; then\n        printMsgs \"dialog\" \"This scraper must not be run while Emulation Station is running or the scraped data will be overwritten. \\n\\nPlease quit from Emulation Station, and run RetroPie-Setup from the terminal\"\n        return\n    fi\n\n    iniConfig \" = \" '\"' \"$configdir/all/scraper.cfg\"\n    eval $(_load_config_scraper)\n    chown $user:$user \"$configdir/all/scraper.cfg\"\n\n    local default\n    while true; do\n        local ver=$(get_ver_scraper)\n        [[ -z \"$ver\" ]] && ver=\"v(Git)\"\n        local cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --default-item \"$default\" --menu \"Scraper $ver by Steven Selph\" 22 76 16)\n        local options=(\n            1 \"Scrape all systems\"\n            2 \"Scrape chosen systems\"\n        )\n\n        if [[ \"$use_thumbs\" -eq 1 ]]; then\n            options+=(3 \"Thumbnails only (Enabled)\")\n        else\n            options+=(3 \"Thumbnails only (Disabled)\")\n        fi\n\n        if [[ \"$screenshots\" -eq 1 ]]; then\n            options+=(4 \"Prefer screenshots (Enabled)\")\n        else\n            options+=(4 \"Prefer screenshots (Disabled)\")\n        fi\n\n        if [[ \"$mame_src\" -eq 0 ]]; then\n            options+=(5 \"Arcade Source (MameDB)\")\n        elif [[ \"$mame_src\" -eq 1 ]]; then\n            options+=(5 \"Arcade Source (ScreenScraper)\")\n        else\n            options+=(5 \"Arcade Source (ArcadeItalia)\")\n        fi\n\n        if [[ \"$console_src\" -eq 0 ]]; then\n            options+=(6 \"Console Source (OpenVGDB)\")\n        elif [[ \"$console_src\" -eq 1 ]]; then\n            options+=(6 \"Console Source (thegamesdb)\")\n        else\n            options+=(6 \"Console Source (ScreenScraper)\")\n        fi\n\n        if [[ \"$rom_name\" -eq 0 ]]; then\n            options+=(7 \"ROM Names (No-Intro)\")\n        elif [[ \"$rom_name\" -eq 1 ]]; then\n            options+=(7 \"ROM Names (theGamesDB)\")\n        else\n            options+=(7 \"ROM Names (Filename)\")\n        fi\n\n        if [[ \"$append_only\" -eq 1 ]]; then\n            options+=(8 \"Gamelist (Append)\")\n        else\n            options+=(8 \"Gamelist (Overwrite)\")\n        fi\n\n        if [[ \"$use_rom_folder\" -eq 1 ]]; then\n            options+=(9 \"Use rom folder for gamelist & images (Enabled)\")\n        else\n            options+=(9 \"Use rom folder for gamelist & images (Disabled)\")\n        fi\n\n        if [[ \"$download_videos\" -eq 1 ]]; then\n            options+=(V \"Download Videos (Enabled)\")\n        else\n            options+=(V \"Download Videos (Disabled)\")\n        fi\n\n        if [[ \"$download_marquees\" -eq 1 ]]; then\n            options+=(M \"Download Marquees (Enabled)\")\n        else\n            options+=(M \"Download Marquees (Disabled)\")\n        fi\n\n        options+=(W \"Max image width ($max_width)\")\n        options+=(H \"Max image height ($max_height)\")\n\n        local choice=$(\"${cmd[@]}\" \"${options[@]}\" 2>&1 >/dev/tty0)\n        if [[ -n \"$choice\" ]]; then\n            default=\"$choice\"\n            case \"$choice\" in\n                1)\n                    if scrape_all_scraper; then\n                        printMsgs \"dialog\" \"ROMS have been scraped.\"\n                    else\n                        printMsgs \"dialog\" \"Scraping was aborted\"\n                    fi\n                    ;;\n                2)\n                    if scrape_chosen_scraper; then\n                        printMsgs \"dialog\" \"ROMS have been scraped.\"\n                    else\n                        printMsgs \"dialog\" \"Scraping was aborted\"\n                    fi\n                    ;;\n                3)\n                    use_thumbs=\"$((use_thumbs ^ 1))\"\n                    iniSet \"use_thumbs\" \"$use_thumbs\"\n                    ;;\n                4)\n                    screenshots=\"$((screenshots ^ 1))\"\n                    iniSet \"screenshots\" \"$screenshots\"\n                    ;;\n                5)\n                    mame_src=\"$((( mame_src + 1) % 3))\"\n                    iniSet \"mame_src\" \"$mame_src\"\n                    ;;\n                6)\n                    console_src=\"$((( console_src + 1) % 3))\"\n                    iniSet \"console_src\" \"$console_src\"\n                    ;;\n                7)\n                    rom_name=\"$((( rom_name + 1 ) % 3))\"\n                    iniSet \"rom_name\" \"$rom_name\"\n                    ;;\n                8)\n                    append_only=\"$((append_only ^ 1))\"\n                    iniSet \"append_only\" \"$append_only\"\n                    ;;\n                9)\n                    use_rom_folder=\"$((use_rom_folder ^ 1))\"\n                    iniSet \"use_rom_folder\" \"$use_rom_folder\"\n                    ;;\n                V)\n                    download_videos=\"$((download_videos ^ 1))\"\n                    iniSet \"download_videos\" \"$download_videos\"\n                    ;;\n                M)\n                    download_marquees=\"$((download_marquees ^ 1))\"\n                    iniSet \"download_marquees\" \"$download_marquees\"\n                    ;;\n                H)\n                    cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --inputbox \"Please enter the max image height in pixels\" 10 60 \"$max_height\")\n                    max_height=$(\"${cmd[@]}\" 2>&1 >/dev/tty0)\n                    iniSet \"max_height\" \"$max_height\"\n                    ;;\n                W)\n                    cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --inputbox \"Please enter the max image width in pixels\" 10 60 \"$max_width\")\n                    max_width=$(\"${cmd[@]}\" 2>&1 >/dev/tty0)\n                    iniSet \"max_width\" \"$max_width\"\n                    ;;\n                U)\n                    rp_callModule \"$md_id\"\n                    ;;\n            esac\n        else\n            break\n        fi\n    done\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/scriptmodules/supplementary/skyscraper.sh",
    "content": "#!/usr/bin/env bash\n\n# This file is part of The RetroPie Project\n#\n# The RetroPie Project is the legal property of its developers, whose names are\n# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.\n#\n# See the LICENSE.md file at the top-level directory of this distribution and\n# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md\n#\n\nrp_module_id=\"skyscraper\"\nrp_module_desc=\"Scraper for EmulationStation by Lars Muldjord\"\nrp_module_licence=\"GPLv3.0 https://raw.githubusercontent.com/muldjord/skyscraper/master/LICENSE\"\nrp_module_section=\"exp\"\n\n\n# Get the location of the cached resources folder. In v3+, this changed to 'cache'.\n# Note: the cache folder might be unavailable during first time installations\nfunction _cache_folder_skyscraper() {\n    if [[ -d \"$configdir/all/skyscraper/dbs\" ]]; then\n        echo \"dbs\"\n    else\n        echo \"cache\"\n    fi\n}\n\n# Purge all Skyscraper caches\nfunction _purge_skyscraper() {\n    local platform\n    local cache_folder=$(_cache_folder_skyscraper)\n\n    while read platform; do\n        # Find any sub-folders of the cache folder and clear them\n        _clear_platform_skyscraper \"$platform\"\n    done < <(find \"$configdir/all/skyscraper/$cache_folder\" -maxdepth 1 -mindepth 1 -type d -exec basename {} \\;)\n}\n\nfunction _clear_platform_skyscraper() {\n    local platform=\"$1\"\n    local mode=\"$2\"\n    local cache_folder=$(_cache_folder_skyscraper)\n\n    [[ ! -d \"$configdir/all/skyscraper/$cache_folder/$platform\" ]] && return\n\n    if [[ $mode == \"vacuum\" ]]; then\n        sudo -u \"$user\" stdbuf -o0 $md_inst/Skyscraper --unattend -p \"$platform\" --cache vacuum\n    else\n        sudo -u \"$user\" stdbuf -o0 $md_inst/Skyscraper --unattend -p \"$platform\" --cache purge:all\n    fi\n    sleep 5\n}\n\nfunction _purge_platform_skyscraper() {\n    local options=()\n    local cache_folder=$(_cache_folder_skyscraper)\n    local system\n\n    while read system; do\n        # If there is no 'db.xml' file underneath the folder, skip it, it means folder is empty\n        [[ ! -f \"$configdir/all/skyscraper/$cache_folder/$system/db.xml\" ]] && continue\n\n        # Get the size on disk of the system and show it in the select list\n        local size=$(du -sh  \"$configdir/all/skyscraper/$cache_folder/$system\" | cut -f1)\n        options+=(\"$system\" \"$size\" OFF)\n    done < <(find \"$configdir/all/skyscraper/$cache_folder\" -maxdepth 1 -mindepth 1 -type d -exec basename {} \\;)\n\n    # If not folders are found, show an info message instead of the selection list\n    if [[ ${#options[@]} -eq 0 ]] ; then\n        printMsgs \"dialog\" \"Nothing to delete ! No cached platforms found in \\n$configdir/all/skyscraper/$cache_folder.\"\n        return\n    fi\n\n    local mode=\"$1\"\n    [[ -z \"$mode\" ]] && mode=\"purge\"\n\n    local cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --radiolist \"Select platform to $mode\" 20 60 12)\n    local platform=$(\"${cmd[@]}\" \"${options[@]}\" 2>&1 >/dev/tty0)\n\n    # Exit if no platform chosen\n    [[ -z \"$platform\" ]] && return\n\n    _clear_platform_skyscraper \"$platform\" \"$@\"\n}\n\nfunction _get_ver_skyscraper() {\n    if [[ -f \"$md_inst/Skyscraper\" ]]; then\n        echo $(\"$md_inst/Skyscraper\" -h | grep 'Running Skyscraper'  | cut -d' '  -f 3 | tr -d v 2>/dev/null)\n    fi\n}\n\nfunction _latest_ver_skyscraper() {\n    wget -qO- https://api.github.com/repos/muldjord/skyscraper/releases/latest | grep -m 1 tag_name | cut -d\\\" -f4\n}\n\n# List any non-empty systems found in the ROM folder\nfunction _list_systems_skyscraper() {\n    find -L \"$romdir\" -mindepth 1 -maxdepth 1 -type d | sort\n}\n\nfunction remove_skyscraper() {\n    # On removal of the package, purge the cache\n    _purge_skyscraper\n}\n\nfunction configure_skyscraper() {\n    if [[ \"$md_mode\" == \"remove\" ]]; then\n        return\n    fi\n\n    # Check if this a first time install\n    local local_config\n    local_config=$(readlink -qn \"$home/.skyscraper\")\n\n    # Handle the cases where the user has an existing Skyscraper installation.\n    if [[ -d \"$home/.skyscraper\" && \"$local_config\" != \"$configdir/all/skyscraper\" ]]; then\n        # We have an existing Skyscraper installation, but not handled by this scriptmodule.\n        # Since the $HOME/.skyscraper folder will be moved, make sure the 'cache' and 'import' folders are moved separately\n        local f_size\n        local cache_folder=\"dbs\"\n        [[ -d \"$home/.skyscraper/cache\" ]] && cache_folder=\"cache\"\n\n        f_size=$(du --total -sm \"$home/.skyscraper/$cache_folder\" \"$home/.skyscraper/import\" 2>/dev/null | tail -n 1 | cut -f 1 )\n        printMsgs \"console\" \"INFO: Moving the Cache and Import folders to new configuration folder (total: $f_size Mb)\"\n\n        local folder\n        for folder in $cache_folder import; do\n            mv \"$home/.skyscraper/$folder\" \"$home/.skyscraper-$folder\" && \\\n                printMsgs \"console\" \"INFO: Moved \"$home/.skyscraper/$folder\" to \"$home/.skyscraper-$folder\"\"\n        done\n\n        # When having an existing installation, chances are the gamelist is generated in the ROMs folder\n        # Create a GUI config file with this setting pre-set.\n        iniConfig \" = \" '\"' \"$configdir/all/skyscraper.cfg\"\n        iniSet \"use_rom_folder\" 1\n    fi\n\n    moveConfigDir \"$home/.skyscraper\" \"$configdir/all/skyscraper\"\n\n    # Move the Cache and Import folders back the new conf folder\n    for folder in $cache_folder import; do\n        if [[ -d \"$home/.skyscraper-$folder\" ]]; then\n            printMsgs \"console\" \"INFO: Moving \"$home/.skyscraper-$folder\" back to configuration folder\"\n            mv  \"$home/.skyscraper-$folder\" \"$configdir/all/skyscraper/$folder\"\n        fi\n    done\n\n    _init_config_skyscraper\n    chown -R $user:$user \"$configdir/all/skyscraper\"\n}\n\nfunction _init_config_skyscraper() {\n    local md_conf_dir=\"/storage/.skyscraper\"\n\n    # Make sure the `artwork.xml` and other conf file(s) are present, but don't overwrite them on upgrades\n    local f_conf\n    for f_conf in artwork.xml aliasMap.csv; do\n        if [[ -f \"$md_conf_dir/$f_conf\" ]]; then\n            cp -f \"$md_inst/$f_conf\" \"$md_conf_dir/$f_conf.default\"\n        else\n            cp \"$md_inst/$f_conf\" \"$md_conf_dir\"\n        fi\n    done\n\n    # If we don't have a previous config.ini file, copy the example one\n    [[ ! -f \"$md_conf_dir/config.ini\" ]] && cp \"$md_inst/config.ini.example\" \"$md_conf_dir/config.ini\"\n\n    # Try to find the rest of the necesary files from the qmake build file\n    # They should be listed in the `unix:examples.file` configuration line\n    if [[ $(grep unix:examples.files \"$md_build/skyscraper.pro\" 2>/dev/null | cut -d= -f2-) ]]; then\n        local files=$(grep unix:examples.files \"$md_build/skyscraper.pro\" | cut -d= -f2-)\n        local file\n\n        for file in $files; do\n            # Copy the files to the configuration folder. Skip config.ini, artwork.xml and aliasMap.csv\n            if [[ $file != \"artwork.xml\" && $file != \"config.ini\" && $file != \"aliasMap.csv\" ]]; then\n                cp -f \"$md_build/$file\" \"$md_conf_dir\"\n            fi\n        done\n    else\n        # Fallback to the known resource files list\n        cp -f \"$md_inst/artwork.xml.example\"* \"$md_conf_dir\"\n\n        # Copy resources and readme\n        local resource_file\n        for resource_file in README.md mameMap.csv tgdb_developers.json tgdb_publishers.json hints.txt; do\n            cp -f \"$md_inst/$resource_file\" \"$md_conf_dir\"\n        done\n    fi\n\n    # Copy the rest of the folders\n    cp -rf \"$md_inst/resources\" \"$md_conf_dir\"\n\n    # Create the import folders and add the sample files.\n    local folder\n    for folder in covers marquees screenshots textual videos wheels; do\n        mkUserDir \"$md_conf_dir/import/$folder\"\n    done\n    cp -rf \"$md_inst/import\" \"$md_conf_dir\"\n}\n\n# Scrape one system, passed as parameter\nfunction _scrape_skyscraper() {\n    local system=\"$1\"\n\n    [[ -z \"$system\" ]] && return\n\n    iniConfig \" = \" '\"' \"$configdir/all/skyscraper.cfg\"\n    eval $(_load_config_skyscraper)\n\n    local -a params=(\"--unattend\" \"--skipped\")\n\n    if [[ \"$use_rom_folder\" -eq 1 ]]; then\n        params+=(-g \"$romdir/$system\")\n        params+=(-o \"$romdir/$system/media\")\n        # If we're saving to the ROM folder, then use relative paths in the gamelist\n        params+=(--relative)\n    else\n        params+=(-g \"$home/.emulationstation/gamelists/$system\")\n        params+=(-o \"$home/.emulationstation/downloaded_media/$system\")\n    fi\n\n\n    # If 2nd parameter is unset, use the configured scraping source, otherwise scrape from cache.\n    # Scraping from cache means we can omit '-s' from the parameter list.\n    if [[ -z \"$2\" ]]; then\n        params+=(-s \"$scrape_source\")\n    fi\n\n    params+=(-p \"$system\")\n\n    [[ \"$download_videos\" -eq 1 ]] && params+=(--videos)\n\n    [[ \"$cache_marquees\" -eq 0 ]] && params+=(--nomarquees)\n\n    [[ \"$cache_covers\" -eq 0 ]] && params+=(--nocovers)\n\n    [[ \"$cache_screenshots\" -eq 0 ]] && params+=(--noscreenshots)\n\n    [[ \"$cache_wheels\" -eq 0 ]] && params+=(--nowheels)\n\n    [[ \"$rom_name\" -eq 1 ]] && params+=(--forcefilename)\n\n    [[ \"$remove_brackets\" -eq 1 ]] && params+=(--nobrackets)\n\n    [[ \"$force_refresh\" -eq 1 ]] && params+=(--refresh)\n\n    # trap ctrl+c and return if pressed (rather than exiting retropie-setup etc)\n    trap 'trap 2; return 1' INT\n        \"/usr/bin/Skyscraper\" \"${params[@]}\"\n        echo -e \"\\nCOMMAND LINE USED:\\n $md_inst/Skyscraper\" \"${params[@]}\"\n        sleep 2\n    trap 2\n}\n\n# Scrape a list of systems, chosen by the user\nfunction _scrape_chosen_skyscraper() {\n    local options=()\n    local system\n    local i=1\n\n    while read system; do\n        system=$(basename $system)\n        options+=($i \"$system\" OFF)\n        ((i++))\n    done < <(_list_systems_skyscraper)\n\n    if [[ ${#options[@]} -eq 0 ]] ; then\n        printMsgs \"dialog\" \"No populated ROM folders were found in $romdir.\"\n        return\n    fi\n\n    local choices\n    local cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --ok-label \"Start\" --cancel-label \"Back\" --checklist \" Select platforms for resource gathering\\n\\n\" 22 60 16)\n\n    choices=($(\"${cmd[@]}\" \"${options[@]}\" 2>&1 >/dev/tty0))\n\n    # Exit if nothing was chosen or Cancel was used\n    [[ ${#choices[@]} -eq 0 || $? -eq 1 ]] && return 1\n\n    # Confirm with the user that scraping can start\n    dialog --ascii-lines --clear --colors --yes-label \"Proceed\" --no-label \"Abort\" --yesno \"This will start the gathering process, which can take a long time if you have a large game collection.\\n\\nYou can interrupt this process anytime by pressing \\ZbCtrl+C\\Zn.\\nProceed ?\" 12 70 2>&1 >/dev/tty0\n    [[ ! $? -eq 0 ]] && return 1\n    \n    local choice\n\n    for choice in \"${choices[@]}\"; do\n        choice=\"${options[choice*3-2]}\"\n        _scrape_skyscraper \"$choice\" \"$@\"\n    done\n}\n\n# Generate gamelists for a list of systems, chosen by the user\nfunction _generate_chosen_skyscraper() {\n    local options=()\n    local system\n    local i=1\n\n    while read system; do\n        system=$(basename $system)\n        options+=($i \"$system\" OFF)\n        ((i++))\n    done < <(_list_systems_skyscraper)\n\n    if [[ ${#options[@]} -eq 0 ]] ; then\n        printMsgs \"dialog\" \"No populated ROM folders were found in $romdir.\"\n        return\n    fi\n\n    local choices\n    local cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --ok-label \"Start\" --cancel-label \"Back\" --checklist \" Select platforms for gamelist(s) generation\\n\\n\" 22 60 16) \n\n    choices=($(\"${cmd[@]}\" \"${options[@]}\" 2>&1 >/dev/tty0))\n\n    # Exit if nothing was chosen or Cancel was used\n    [[ ${#choices[@]} -eq 0 || $? -eq 1 ]] && return 1\n\n    for choice in \"${choices[@]}\"; do\n        choice=\"${options[choice*3-2]}\"\n        _scrape_skyscraper \"$choice\" \"cache\" \"$@\"\n    done\n}\n\nfunction _load_config_skyscraper() {\n    echo \"$(loadModuleConfig \\\n        'rom_name=0' \\\n        'use_rom_folder=1' \\\n        'download_videos=0' \\\n        'cache_marquees=1' \\\n        'cache_covers=1' \\\n        'cache_wheels=1' \\\n        'cache_screenshots=1' \\\n        'scrape_source=screenscraper' \\\n        'remove_brackets=0' \\\n        'force_refresh=0'\n    )\"\n}\n\n# Try to guess the most appropriate editor. On Debian derivatives, we have `sensible-editor` for that.\nfunction _open_editor_skyscraper() {\n    local editor\n\n    \n        nano \"$1\" > /dev/tty0 < /dev/tty0\n    \n}\n\nfunction _gui_advanced_skyscraper() {\n    declare -A help_strings_adv\n\n    iniConfig \" = \" '\"' \"$configdir/all/skyscraper.cfg\"\n    eval $(_load_config_skyscraper)\n\n    help_strings_adv=(\n        [E]=\"Opens the configuration file \\Zbconfig.ini\\Zn in an editor.\"\n        [F]=\"Opens the artwork definition file \\Zbartwork.xml\\Zn in an editor.\"\n        [G]=\"Opens the game alias configuration file \\ZbaliasMap.csv\\Zn in an editor.\"\n    )\n\n    while true; do\n\n        local cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --help-button --colors --no-collapse --default-item \"$default\" --ok-label \"Ok\" --cancel-label \"Back\" --title \"Advanced options\" --menu \"    EXPERT - edit configurations\\n\" 14 50 5)\n        local options=()\n\n        options+=(E \"Edit 'config.ini'\")\n        options+=(F \"Edit 'artwork.xml'\")\n        options+=(G \"Edit 'aliasMap.csv'\")\n\n        local choice=$(\"${cmd[@]}\" \"${options[@]}\" 2>&1 > /dev/tty0)\n\n        if [[ -n \"$choice\" ]]; then\n            local default=\"$choice\"\n\n            case \"$choice\" in\n\n                E)\n                    _open_editor_skyscraper \"/storage/.skyscraper/config.ini\"\n                    ;;\n\n                F)\n                    _open_editor_skyscraper \"/storage/.skyscraper/artwork.xml\"\n                    ;;\n\n                G)\n                    _open_editor_skyscraper \"/storage/.skyscraper/aliasMap.csv\"\n                    ;;\n\n                HELP*)\n                    # Retain choice\n                    default=\"${choice/HELP /}\"\n                    if [[ ! -z \"${help_strings_adv[${default}]}\" ]]; then\n                    dialog --ascii-lines --colors --no-collapse --ok-label \"Close\" --msgbox \"${help_strings_adv[${default}]}\" 22 65 >&1\n                    fi\n            esac\n        else\n            break\n        fi\n    done\n}\n\nfunction gui_skyscraper() {\nee_console enable\n\necho \"Success!\" > /dev/tty0\nsleep 1\n    \n    if pgrep \"emulationstatio\" >/dev/null; then\n        printMsgs \"dialog\" \"This scraper must not be run while EmulationStation is running or the scraped data will be overwritten.\\n\\nPlease quit EmulationStation and run RetroPie-Setup from the terminal:\\n\\n sudo \\$HOME/RetroPie-Setup/retropie_setup.sh\"\n        return\n    fi\n\n    iniConfig \" = \" '\"' \"$configdir/all/skyscraper.cfg\"\n    eval $(_load_config_skyscraper)\n    chown \"$user\":\"$user\" \"$configdir/all/skyscraper.cfg\"\n\n    local -a s_source\n    local -a s_source_names\n    declare -A help_strings\n\n    s_source=(\n        [1]=screenscraper\n        [2]=arcadedb\n        [3]=thegamesdb\n        [4]=openretro\n        [5]=worldofspectrum\n    )\n    s_source+=(\n        [10]=esgamelist\n        [11]=import\n    )\n\n    s_source_names=(\n        [1]=ScreenScraper\n        [2]=ArcadeDB\n        [3]=TheGamesDB\n        [4]=OpenRetro\n        [5]=\"World of Spectrum\"\n    )\n    s_source_names+=(\n        [10]=\"EmulationStation Gamelist\"\n        [11]=\"Import Folder\"\n    )\n\n    local ver\n    local lastest_ver\n\n    # Help strings for this GUI\n    help_strings=(\n        [1]=\"Gather resources and cache them for the platforms found in \\Zb$romdir\\Zn.\\nRuns the scraper to download the information and media from the selected gathering source.\"\n        [2]=\"Select the source for ROM scraping. Supported sources:\\n\\ZbONLINE\\Zn\\n * ScreenScraper (screenscraper.fr)\\n * TheGamesDB (thegamesdb.net)\\n * OpenRetro (openretro.org)\\n * ArcadeDB (adb.arcadeitalia.net)\\n * World of Spectrum (worldofspectrum.org)\\n\\ZbLOCAL\\Zn\\n * EmulationStation Gamelist (imports data from ES gamelist)\\n * Import (imports resources in the local cache)\\n\\n\\Zb\\ZrNOTE\\Zn: Some sources require a username and password for access. These can be set per source in the \\Zbconfig.ini\\Zn configuration file.\\n\\n Skyscraper parameter: \\Zb-s <source_name>\\Zn\"\n        [3]=\"Options for resource gathering and caching sub-menu.\\nClick to open it.\"\n        [4]=\"Generate EmulationStation game lists.\\nRuns the scraper to incorporate downloaded information and media from the local cache and write them to \\Zbgamelist.xml\\Zn files to be used by EmulationStation.\"\n        [5]=\"Options for EmulationStation game list generation sub-menu.\\nClick to open it and change the options.\"\n        [V]=\"Toggle the download and caching of videos.\\nThis also toggles whether the videos will be included in the resulting gamelist.\\n\\nSkyscraper option: \\Zb--videos\\Zn\"\n        [A]=\"Advanced options sub-menu.\"\n        [U]=\"Check for an update to Skyscraper\\nIf there is a new release, you'll have the option to update.\"\n    )\n\n    ver=$(_get_ver_skyscraper)\n\n    while true; do\n        [[ -z \"$ver\" ]] && ver=\"v(Git)\"\n\n        local cmd=(dialog --ascii-lines --backtitle \"$__backtitle\"  --colors --cancel-label \"Exit\" --help-button --no-collapse --cr-wrap --default-item \"$default\" --menu \"   Skyscraper: game scraper by Lars Muldjord ($ver)\\\\n \\\\n\" 22 60 12)\n\n        local options=(\n            \"-\" \"GATHER and cache resources\"\n        )\n\n        local source_found=0\n        local online=\"Online\"\n        local i\n\n        options+=(\n            1 \"Gather resources\"\n        )\n\n        for i in \"${!s_source[@]}\"; do\n            if [[ \"$scrape_source\" == \"${s_source[$i]}\" ]]; then\n                [[ $i -ge 10 ]] && online=\"Local\"\n                options+=(2 \"Gather source - ${s_source_names[$i]} ($online) -->\")\n                source_found=1\n            fi\n        done\n\n        if [[ $source_found -ne 1 ]]; then\n            options+=(2 \"Gather from - Screenscraper (Online) -->\")\n            scrape_source=\"screenscraper\" # default scraping source if none found\n            iniSet \"scrape_source\" \"$scrape_source\"\n        fi\n\n        options+=(3 \"Cache options and commands -->\")\n\n        options+=(\"-\" \"GAME LIST generation\")\n        options+=(4 \"Generate game list(s)\")\n        options+=(5 \"Generate options -->\")\n\n        options+=(\"-\" \"OTHER options\")\n\n        if [[ \"$download_videos\" -eq 1 ]]; then\n            options+=(V \"Download videos (Enabled)\")\n        else\n            options+=(V \"Download videos (Disabled)\")\n        fi\n\n        options+=(A \"Advanced options -->\")\n\n        # Show different options, depending on the previous check action\n        if [[ -n \"$latest_ver\" ]] && compareVersions \"$latest_ver\" gt \"$ver\" ; then\n            options+=(U \"Update to $latest_ver\")\n        else \n            options+=(U \"Check for Updates\")\n        fi\n\n        # Run the GUI\n        local choice=$(\"${cmd[@]}\" \"${options[@]}\" 2>&1 >/dev/tty0)\n\n        if [[ -n \"$choice\" ]]; then\n            local default=\"$choice\"\n\n            case \"$choice\" in\n\n                1)\n                    if _scrape_chosen_skyscraper; then\n                        printMsgs \"dialog\" \"ROMs information gathered.\\nDon't forget to use 'Generate Game list(s)' to add this information to EmulationStation.\"\n                    elif [[ $? -eq 2 ]]; then\n                        printMsgs \"dialog\" \"Gathering was aborted\"\n                    fi\n                    ;;\n\n                2)\n                    # Scrape source options have a separate dialog\n                    local s_options=()\n                    local i\n\n                    for i in \"${!s_source[@]}\"; do\n                        online=\"Online:\"\n                        [[ i -ge 10 ]] && online=\"Local:\"\n\n                        if [[ \"$scrape_source\" == \"${s_source[$i]}\" ]]; then\n                            s_default=\"$online ${s_source_names[$i]}\"\n                        fi\n\n                        s_options+=(\"$online ${s_source_names[$i]}\" \"\")\n                    done\n\n                    if [[ -z \"$s_default\" ]]; then\n                        s_default=\"Online: ${s_source_names[1]}\"\n                    fi\n\n                    local s_cmd=(dialog --ascii-lines --title \"Select Scraping source\" --default-item \"$s_default\" \\\n                        --menu \"Choose one of the available scraping sources\" 18 50 9)\n\n                    # Run the Scraper source selection dialog\n                    local scrape_source_name=$(\"${s_cmd[@]}\" \"${s_options[@]}\" 2>&1 >/dev/tty0)\n\n                    # If Cancel was chosen, don't do anything\n                    [[ -z \"$scrape_source_name\" ]] && continue\n\n                    # Strip the \"XYZ:\" prefix from the chosen scraper source, then compare to our list\n                    local src=$(echo \"$scrape_source_name\" | cut -d' ' -f2-)\n\n                    for i in \"${!s_source_names[@]}\"; do\n                        [[ \"${s_source_names[$i]}\" == \"$src\" ]] && scrape_source=${s_source[$i]}\n                    done\n\n                    iniSet \"scrape_source\" \"$scrape_source\"\n                    ;;\n\n                3)\n                    _gui_cache_skyscraper\n                    ;;\n\n                4)\n                    if _generate_chosen_skyscraper \"cache\"; then\n                        printMsgs \"dialog\" \"Game list(s) generated.\"\n                    elif [[ $? -eq 2 ]]; then\n                        printMsgs \"dialog\" \"Game list generation aborted\"\n                    fi\n                    ;;\n\n                5)\n                    _gui_generate_skyscraper\n                    ;;\n\n                V)\n                    download_videos=\"$((download_videos ^ 1))\"\n                    iniSet \"download_videos\" \"$download_videos\"\n                    ;;\n\n                A)\n                    _gui_advanced_skyscraper\n                    ;;\n\n                HELP*)\n                    # Retain choice when the Help button is selected\n                    default=\"${choice/HELP /}\"\n                    if [[ ! -z \"${help_strings[$default]}\" ]]; then\n                        dialog --ascii-lines --colors --no-collapse --ok-label \"Close\" --msgbox \"${help_strings[$default]}\" 22 65 >&1\n                    fi\n                    ;;\n            esac\n        else\n            break\n        fi\n    done\n}\n\nfunction _gui_cache_skyscraper() {\n    local db_size\n    local cache_folder=$(_cache_folder_skyscraper)\n    declare -A help_strings_cache\n\n    iniConfig \" = \" '\"' \"$configdir/all/skyscraper.cfg\"\n    eval $(_load_config_skyscraper)\n\n    help_strings_cache=(\n        [1]=\"Toggle whether screenshots are cached locally when scraping.\\n\\nSkyscraper option: \\Zb--noscreenshots\\Zn\"\n        [2]=\"Toggle whether covers are cached locally when scraping.\\n\\nSkyscraper option: \\Zb--nocovers\\Zn\"\n        [3]=\"Toggle whether wheels are cached locally when scraping.\\n\\nSkyscraper option: \\Zb--nowheels\\Zn\"\n        [4]=\"Toggle whether marquees are cached locally when scraping.\\n\\nSkyscraper option: \\Zb--nomarquees\\Zn\"\n        [5]=\"Force the refresh of resources in the local cache when scraping.\\n\\nSkyscraper option: \\Zb--cache refresh\\Zn\"\n        [P]=\"Purge \\ZbALL\\Zn all cached resources for all platforms.\"\n        [S]=\"Purge all cached resources for a chosen platform.\\n\\nSkyscraper option: \\Zb--cache purge:all\\Zn\"\n        [V]=\"Removes all non-used cached resources for a chosen platform (vacuum).\\n\\nSkyscraper option: \\Zb--cache vacuum\\Zn\"\n    )\n\n    while true; do\n        db_size=$(du -sh \"$configdir/all/skyscraper/$cache_folder\" 2>/dev/null | cut -f 1 || echo 0m)\n        [[ -z \"$db_size\" ]] && db_size=\"0Mb\"\n\n        local cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --help-button --colors --no-collapse --default-item \"$default\" --ok-label \"Ok\" --cancel-label \"Back\" --title \"Cache options and commands\" --menu \"\\n               Current cache size: $db_size\\n\\n\" 21 60 12)\n\n        local options=(\"-\" \"OPTIONS for gathering and caching\")\n\n        if [[ \"$cache_screenshots\" -eq 1 ]]; then\n            options+=(1 \"Cache screenshots (Enabled)\")\n        else\n            options+=(1 \"Cache screenshots (Disabled)\")\n        fi\n\n        if [[ \"$cache_covers\" -eq 1 ]]; then\n            options+=(2 \"Cache covers (Enabled)\")\n        else\n            options+=(2 \"Cache covers (Disabled)\")\n        fi\n\n        if [[ \"$cache_wheels\" -eq 1 ]]; then\n            options+=(3 \"Cache wheels (Enabled)\")\n        else\n            options+=(3 \"Cache wheels (Disabled)\")\n        fi\n\n        if [[ \"$cache_marquees\" -eq 1 ]]; then\n            options+=(4 \"Cache marquees (Enabled)\")\n        else\n            options+=(4 \"Cache marquees (Disabled)\")\n        fi\n\n        if [[ \"$force_refresh\" -eq 0 ]]; then\n            options+=(5 \"Force cache refresh (Disabled)\")\n        else\n            options+=(5 \"Force cache refresh (Enabled)\")\n        fi\n\n        options+=(\"-\" \"PURGE cache commands\")\n        options+=(V \"Vacuum chosen platform\")\n        options+=(S \"Purge chosen platform\")\n        options+=(P \"Purge all platforms(!)\")\n\n        local choice=$(\"${cmd[@]}\" \"${options[@]}\" 2>&1 > /dev/tty0)\n\n        if [[ -n \"$choice\" ]]; then\n            local default=\"$choice\"\n\n            case \"$choice\" in\n\n                1)\n                    cache_screenshots=\"$((cache_screenshots ^ 1))\"\n                    iniSet \"cache_screenshots\" \"$cache_screenshots\"\n                    ;;\n\n                2)\n                    cache_covers=\"$((cache_covers ^ 1))\"\n                    iniSet \"cache_covers\" \"$cache_covers\"\n                    ;;\n\n                3)\n                    cache_wheels=\"$((cache_wheels ^ 1))\"\n                    iniSet \"cache_wheels\" \"$cache_wheels\"\n                    ;;\n\n                4)\n                    cache_marquees=\"$((cache_marquees ^ 1))\"\n                    iniSet \"cache_marquees\" \"$cache_marquees\"\n                    ;;\n\n                5)\n                    force_refresh=\"$((force_refresh ^ 1))\"\n                    iniSet \"force_refresh\" \"$force_refresh\"\n                    ;;\n\n                V)\n                    _purge_platform_skyscraper \"vacuum\"\n                    ;;\n\n                S)\n                    _purge_platform_skyscraper\n                    ;;\n\n                P)\n                    dialog --ascii-lines --clear --defaultno --colors --yesno  \"\\Z1\\ZbAre you sure ?\\Zn\\nThis will \\Zb\\ZuERASE\\Zn all locally cached scraped resources\" 8 60 2>&1 >/dev/tty0\n                    if [[ $? == 0 ]]; then\n                        _purge_skyscraper\n                    fi\n                    ;;\n\n                HELP*)\n                    # Retain choice\n                    default=\"${choice/HELP /}\"\n                    if [[ ! -z \"${help_strings_cache[${default}]}\" ]]; then\n                    dialog --ascii-lines --colors --no-collapse --ok-label \"Close\" --msgbox \"${help_strings_cache[${default}]}\" 22 65 >&1\n                    fi\n            esac\n        else\n            break\n        fi\n    done\n}\n\nfunction _gui_generate_skyscraper() {\n    declare -A help_strings_gen\n\n    iniConfig \" = \" '\"' \"$configdir/all/skyscraper.cfg\"\n    eval $(_load_config_skyscraper)\n\n    help_strings_gen=(\n        [1]=\"Game name format used in the EmulationStation game list. Available options:\\n\\n\\ZbSource name\\Zn: use the name returned by the scraper\\n\\ZbFilename\\Zn: use the filename of the ROM as game name\\n\\nSkyscraper option: \\Zb--forcefilename\\Z0\"\n        [2]=\"Game name option to remove/keep the text found between '()' and '[]' in the ROMs filename.\\n\\nSkyscraper option: \\Zb--nobrackets\\Zn\"\n        [3]=\"Choose to save the generated 'gamelist.xml' and media in the ROMs folder. Supported options:\\n\\n\\ZbEnabled\\Zn saves the 'gamelist.xml' in the ROMs folder and the media in the 'media' sub-folder.\\n\\n\\ZbDisabled\\Zn saves the 'gamelist.xml' in \\Zu\\$HOME/.emulationstation/gamelists/<system>\\Zn and the media in \\Zu\\$HOME/.emulationstation/downloaded_media\\Zn.\\n\\n\\Zb\\ZrNOTE\\Zn: changing this option will not automatically copy the 'gamelist.xml' file and the media to the new location or remove the ones in the old location. You must do this manually.\\n\\nSkyscraper parameters: \\Zb-g <gamelist>\\Zn / \\Zb-o <path>\\Zn\"\n    )\n\n    while true; do\n\n        local cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --help-button --colors --no-collapse --default-item \"$default\" --ok-label \"Ok\" --cancel-label \"Back\" --title \"Game list generation options\" --menu \"\\n\\n\" 13 60 5)\n        local -a options\n\n        if [[ \"$rom_name\" -eq 0 ]]; then\n            options=(1 \"ROM Names (Source name)\")\n        else\n            options=(1 \"ROM Names (Filename)\")\n        fi\n\n        if [[ \"$remove_brackets\" -eq 1 ]]; then\n            options+=(2 \"Remove bracket info (Enabled)\")\n        else\n            options+=(2 \"Remove bracket info (Disabled)\")\n        fi\n\n        if [[ \"$use_rom_folder\" -eq 1 ]]; then\n            options+=(3 \"Use ROM folders for game list & media (Enabled)\")\n        else\n            options+=(3 \"Use ROM folders for game list & media (Disabled)\")\n        fi\n\n        local choice=$(\"${cmd[@]}\" \"${options[@]}\" 2>&1 > /dev/tty0)\n\n        if [[ -n \"$choice\" ]]; then\n            local default=\"$choice\"\n\n            case \"$choice\" in\n\n                1)\n                    rom_name=\"$((rom_name ^ 1))\"\n                    iniSet \"rom_name\" \"$rom_name\"\n                    ;;\n\n                2)\n                    remove_brackets=\"$((remove_brackets ^ 1))\"\n                    iniSet \"remove_brackets\" \"$remove_brackets\"\n                    ;;\n\n                3)\n                    use_rom_folder=\"$((use_rom_folder ^ 1))\"\n                    iniSet \"use_rom_folder\" \"$use_rom_folder\"\n                    ;;\n\n                HELP*)\n                    # Retain choice\n                    default=\"${choice/HELP /}\"\n                    if [[ ! -z \"${help_strings_gen[${default}]}\" ]]; then\n                    dialog --ascii-lines --colors --no-collapse --ok-label \"Close\" --msgbox \"${help_strings_gen[${default}]}\" 22 65 >&1\n                    fi\n            esac\n        else\n            break\n        fi\n    done\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/scriptmodules/supplementary/systeminfo.sh",
    "content": "#!/bin/bash\n\n# This file is part of The RetroArena (TheRA)\n#\n# The RetroArena (TheRA) is the legal property of its developers, whose names are\n# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.\n#\n# See the LICENSE.md file at the top-level directory of this distribution and\n# at https://raw.githubusercontent.com/Retro-Arena/RetroArena-Setup/master/LICENSE.md\n#\n\nrp_module_id=\"systeminfo\"\nrp_module_desc=\"View your CPU temps, IP connectivity, and storage to include external storage addons.\"\nrp_module_section=\"config\"\n\nfunction gui_systeminfo() {\n    echo \"                         Storage System\" > /tmp/line1\n    echo \" \" > /tmp/free\n    df -h | tail -n +4 > /tmp/temp-disk3\n    sed '1 i \"Name          Total      Used      Free Load Mountpoint\"' /tmp/temp-disk3 > /tmp/temp-disk2\n    sed '/^tmpfs/ d' /tmp/temp-disk2 > /tmp/temp-disk4\n    sed '/^none/ d' /tmp/temp-disk4 > /tmp/temp-disk\n    sed -i 's,'\"/dev/data          \"',/dev/data,' /tmp/temp-disk > /tmp/tt\n    sed -i 's,'\"/dev/loop0          \"',/dev/loop0,' /tmp/temp-disk > /tmp/tt\n    sed -i 's,'\"/dev/sda1    \"',USB,' /tmp/temp-disk > /tmp/tt\n    sed -i 's,'\"/var\"',,' /tmp/temp-disk > /tmp/tt\n    echo \"                     Temperature Monitoring\" > /tmp/temph\n    cpuTempC=$(($(cat /sys/class/thermal/thermal_zone0/temp)/1000)) && cpuTempF=$((cpuTempC*9/5+32))\n    echo $cpuTempC > /tmp/tempc\n    sed 's/^/Cpu Temperature in Celcius degree :   /' /tmp/tempc > /tmp/tempC\n    echo $cpuTempF > /tmp/tempf\n    sed 's/^/Cpu Temperature in Farenheit degree : /' /tmp/tempf > /tmp/tempF\n    echo \"                         Network Info\" > /tmp/net\n    ip route get 8.8.8.8 2>/dev/null | awk '{print $NF; exit}' > /tmp/ip\n    sed 's/^/Local Ip address :           /' /tmp/ip > /tmp/IP\n    wget -qO- http://ipecho.net/plain > /tmp/wan\n    sed 's/^/Public Ip address :          /' /tmp/wan > /tmp/WAN\n    cat /sys/class/net/eth0/operstate > /tmp/wired\n    sed 's/^/Ethernet Connection status : /' /tmp/wired > /tmp/WIRED\n    cat /sys/class/net/lo/operstate > /tmp/loop\n    sed 's/^/Loopback interface status :  /' /tmp/loop > /tmp/LOOP\n    cat /sys/class/net/wlan0/operstate > /tmp/wlan\n    sed 's/^/Wireless Connection status : /' /tmp/wlan > /tmp/WLAN\n    sed h /tmp/line1 /tmp/free /tmp/temp-disk /tmp/free /tmp/free /tmp/temph /tmp/free /tmp/tempC /tmp/tempF /tmp/free /tmp/free /tmp/net /tmp/free /tmp/IP /tmp/WAN /tmp/LOOP /tmp/WIRED /tmp/WLAN > /tmp/display\n    rm /tmp/free /tmp/tt /tmp/line1 /tmp/temp* /tmp/ip /tmp/loop /tmp/wan /tmp/wired /tmp/wlan /tmp/net /tmp/IP /tmp/WAN /tmp/LOOP /tmp/WIRED /tmp/WLAN\n    dialog --ascii-lines --backtitle \"emuELEC System Information\" --title \"emuELEC System Information\" --textbox /tmp/display 27 72\n    rm /tmp/display\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/scriptmodules/supplementary/wifi.sh",
    "content": "#!/usr/bin/env bash\n\n# This file is part of The RetroPie Project\n#\n# The RetroPie Project is the legal property of its developers, whose names are\n# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.\n#\n# See the LICENSE.md file at the top-level directory of this distribution and\n# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md\n#\n\nrp_module_id=\"wifi\"\nrp_module_desc=\"Configure Wifi\"\nrp_module_section=\"config\"\nrp_module_flags=\"!x11\"\n\nfunction _set_interface_wifi() {\n    local state=\"$1\"\n\n    if [[ \"$state\" == \"up\" ]]; then\n        if ! ifup wlan0; then\n            ip link set wlan0 up\n        fi\n    elif [[ \"$state\" == \"down\" ]]; then\n        if ! ifdown wlan0; then\n            ip link set wlan0 down\n        fi\n    fi\n}\n\nfunction remove_wifi() {\n    sed -i '/RETROPIE CONFIG START/,/RETROPIE CONFIG END/d' \"/etc/wpa_supplicant/wpa_supplicant.conf\"\n    _set_interface_wifi down 2>/dev/null\n}\n\nfunction list_wifi() {\n    local line\n    local essid\n    local type\n    while read line; do\n        [[ \"$line\" =~ ^Cell && -n \"$essid\" ]] && echo -e \"$essid\\n$type\"\n        [[ \"$line\" =~ ^ESSID ]] && essid=$(echo \"$line\" | cut -d\\\" -f2)\n        [[ \"$line\" == \"Encryption key:off\" ]] && type=\"open\"\n        [[ \"$line\" == \"Encryption key:on\" ]] && type=\"wep\"\n        [[ \"$line\" =~ ^IE:.*WPA ]] && type=\"wpa\"\n    done < <(iwlist wlan0 scan | grep -o \"Cell .*\\|ESSID:\\\".*\\\"\\|IE: .*WPA\\|Encryption key:.*\")\n    echo -e \"$essid\\n$type\"\n}\n\nfunction connect_wifi() {\n    if [[ ! -d \"/sys/class/net/wlan0/\" ]]; then\n        printMsgs \"dialog\" \"No wlan0 interface detected\"\n        return 1\n    fi\n    local essids=()\n    local essid\n    local types=()\n    local type\n    local options=()\n    i=0\n    _set_interface_wifi up 2>/dev/null\n    sleep 1\n    while read essid; read type; do\n        essids+=(\"$essid\")\n        types+=(\"$type\")\n        options+=(\"$i\" \"$essid\")\n        ((i++))\n    done < <(list_wifi)\n    options+=(\"H\" \"Hidden ESSID\")\n\n    local cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --menu \"Please choose the network you would like to connect to\" 22 76 16)\n    choice=$(\"${cmd[@]}\" \"${options[@]}\" 2>&1 >/dev/tty)\n    [[ -z \"$choice\" ]] && return\n\n    local hidden=0\n    if [[ \"$choice\" == \"H\" ]]; then\n        cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --inputbox \"Please enter the ESSID\" 10 60)\n        essid=$(\"${cmd[@]}\" 2>&1 >/dev/tty)\n        [[ -z \"$essid\" ]] && return\n        cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --nocancel --menu \"Please choose the WiFi type\" 12 40 6)\n        options=(\n            wpa \"WPA/WPA2\"\n            wep \"WEP\"\n            open \"Open\"\n        )\n        type=$(\"${cmd[@]}\" \"${options[@]}\" 2>&1 >/dev/tty)\n        hidden=1\n    else\n        essid=${essids[choice]}\n        type=${types[choice]}\n    fi\n\n    if [[ \"$type\" == \"wpa\" || \"$type\" == \"wep\" ]]; then\n        local key=\"\"\n        cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --insecure --passwordbox \"Please enter the WiFi key/password for $essid\" 10 63)\n        local key_ok=0\n        while [[ $key_ok -eq 0 ]]; do\n            key=$(\"${cmd[@]}\" 2>&1 >/dev/tty) || return\n            key_ok=1\n            if [[ ${#key} -lt 8 || ${#key} -gt 63 ]] && [[ \"$type\" == \"wpa\" ]]; then\n                printMsgs \"dialog\" \"Password must be between 8 and 63 characters\"\n                key_ok=0\n            fi\n            if [[ -z \"$key\" && $type == \"wep\" ]]; then\n                printMsgs \"dialog\" \"Password cannot be empty\"\n                key_ok=0\n            fi\n        done\n    fi\n\n    create_config_wifi \"$type\" \"$essid\" \"$key\"\n\n    gui_connect_wifi\n}\n\nfunction create_config_wifi() {\n    local type=\"$1\"\n    local essid=\"$2\"\n    local key=\"$3\"\n\n    local wpa_config\n    wpa_config+=\"\\tssid=\\\"$essid\\\"\\n\"\n    case $type in\n        wpa)\n            wpa_config+=\"\\tpsk=\\\"$key\\\"\\n\"\n            ;;\n        wep)\n            wpa_config+=\"\\tkey_mgmt=NONE\\n\"\n            wpa_config+=\"\\twep_tx_keyidx=0\\n\"\n            wpa_config+=\"\\twep_key0=$key\\n\"\n            ;;\n        open)\n            wpa_config+=\"\\tkey_mgmt=NONE\\n\"\n            ;;\n    esac\n\n    [[ $hidden -eq 1 ]] &&  wpa_config+=\"\\tscan_ssid=1\\n\"\n\n    remove_wifi\n    wpa_config=$(echo -e \"$wpa_config\")\n    cat >> \"/etc/wpa_supplicant/wpa_supplicant.conf\" <<_EOF_\n# RETROPIE CONFIG START\nnetwork={\n$wpa_config\n}\n# RETROPIE CONFIG END\n_EOF_\n}\n\nfunction gui_connect_wifi() {\n    _set_interface_wifi down 2>/dev/null\n    _set_interface_wifi up 2>/dev/null\n    # BEGIN workaround for dhcpcd trigger failure on Raspbian stretch\n    systemctl restart dhcpcd &>/dev/null\n    # END workaround\n    dialog --ascii-lines --backtitle \"$__backtitle\" --infobox \"\\nConnecting ...\" 5 40 >/dev/tty\n    local id=\"\"\n    i=0\n    while [[ -z \"$id\" && $i -lt 30 ]]; do\n        sleep 1\n        id=$(iwgetid -r)\n        ((i++))\n    done\n    if [[ -z \"$id\" ]]; then\n        printMsgs \"dialog\" \"Unable to connect to network $essid\"\n        _set_interface_wifi down 2>/dev/null\n    fi\n}\n\nfunction _check_country_wifi() {\n    [[ ! -f /etc/wpa_supplicant/wpa_supplicant.conf ]] && return\n    iniConfig \"=\" \"\" /etc/wpa_supplicant/wpa_supplicant.conf\n    iniGet \"country\"\n    if [[ -z \"$ini_value\" ]]; then\n        if dialog --ascii-lines --defaultno --yesno \"You don't currently have your WiFi country set in /etc/wpa_supplicant/wpa_supplicant.conf\\n\\nOn a Raspberry Pi 3 Model B+ your WiFI will be disabled until the country is set. You can do this via raspi-config which is available from the RetroPie menu in Emulation Station. Once in raspi-config you can set your country via menu 4 (Localisation Options)\\n\\nDo you want me to launch raspi-config for you now ?\" 22 76 2>&1 >/dev/tty; then\n            raspi-config\n        fi\n    fi\n}\n\nfunction gui_wifi() {\n\n    isPlatform \"rpi\" && _check_country_wifi\n\n    local default\n    while true; do\n        local ip_current=$(ip route get 8.8.8.8 2>/dev/null | awk '{print $NF; exit}')\n        local ip_wlan=$(ip route ls dev wlan0 2>/dev/null | awk 'END {print $7}')\n        local cmd=(dialog --ascii-lines --backtitle \"$__backtitle\" --cancel-label \"Exit\" --item-help --help-button --default-item \"$default\" --menu \"Configure WiFi\\nCurrent IP: $ip_current\\nWireless IP: $ip_wlan\\nWireless ESSID: $(iwgetid -r)\" 22 76 16)\n        local options=(\n            1 \"Connect to WiFi network\"\n            \"1 Connect to your WiFi network\"\n            2 \"Disconnect/Remove WiFi config\"\n            \"2 Disconnect and remove any Wifi configuration\"\n            3 \"Import wifi credentials from /boot/wifikeyfile.txt\"\n            \"3 Will import the ssid (name) and psk (password) from a file /boot/wifikeyfile.txt\n\nThe file should contain two lines as follows\\n\\nssid = \\\"YOUR WIFI SSID\\\"\\npsk = \\\"YOUR PASSWORD\\\"\"\n        )\n\n        local choice=$(\"${cmd[@]}\" \"${options[@]}\" 2>&1 >/dev/tty)\n        if [[ \"${choice[@]:0:4}\" == \"HELP\" ]]; then\n            choice=\"${choice[@]:5}\"\n            default=\"${choice/%\\ */}\"\n            choice=\"${choice#* }\"\n            printMsgs \"dialog\" \"$choice\"\n            continue\n        fi\n        default=\"$choice\"\n\n        if [[ -n \"$choice\" ]]; then\n            case \"$choice\" in\n                1)\n                    connect_wifi\n                    ;;\n                2)\n                    remove_wifi\n                    ;;\n                3)\n                    if [[ -f \"/boot/wifikeyfile.txt\" ]]; then\n                        iniConfig \" = \" \"\\\"\" \"/boot/wifikeyfile.txt\"\n                        iniGet \"ssid\"\n                        local ssid=\"$ini_value\"\n                        iniGet \"psk\"\n                        local psk=\"$ini_value\"\n                        create_config_wifi \"wpa\" \"$ssid\" \"$psk\"\n                        gui_connect_wifi\n                    else\n                        printMsgs \"dialog\" \"No /boot/wifikeyfile.txt found\"\n                    fi\n                    ;;\n            esac\n        else\n            break\n        fi\n    done\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/scriptmodules/system.sh",
    "content": "#!/usr/bin/env bash\n\n# This file is part of The RetroPie Project\n#\n# The RetroPie Project is the legal property of its developers, whose names are\n# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.\n#\n# See the LICENSE.md file at the top-level directory of this distribution and\n# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md\n#\n\nfunction setup_env() {\n\n    __ERRMSGS=()\n    __INFMSGS=()\n\n    # if no apt-get we need to fail\n    [[ -z \"$(which apt-get)\" ]] && fatalError \"Unsupported OS - No apt-get command found\"\n\n    __memory_phys=$(free -m | awk '/^Mem:/{print $2}')\n    __memory_total=$(free -m -t | awk '/^Total:/{print $2}')\n\n    __has_binaries=0\n\n    get_platform\n    get_os_version\n    get_retropie_depends\n\n    __gcc_version=$(gcc -dumpversion)\n\n    # workaround for GCC ABI incompatibility with threaded armv7+ C++ apps built\n    # on Raspbian's armv6 userland https://github.com/raspberrypi/firmware/issues/491\n    if [[ \"$__os_id\" == \"Raspbian\" ]] && compareVersions $__gcc_version lt 5.0.0; then\n        __default_cxxflags+=\" -U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2\"\n    fi\n\n    # set location of binary downloads\n    __binary_host=\"files.retropie.org.uk\"\n    [[ \"$__has_binaries\" -eq 1 ]] && __binary_url=\"https://$__binary_host/binaries/$__os_codename/$__platform\"\n\n    __archive_url=\"https://files.retropie.org.uk/archives\"\n\n    # -pipe is faster but will use more memory - so let's only add it if we have more thans 256M free ram.\n    [[ $__memory_phys -ge 512 ]] && __default_cflags+=\" -pipe\"\n\n    [[ -z \"${CFLAGS}\" ]] && export CFLAGS=\"${__default_cflags}\"\n    [[ -z \"${CXXFLAGS}\" ]] && export CXXFLAGS=\"${__default_cxxflags}\"\n    [[ -z \"${ASFLAGS}\" ]] && export ASFLAGS=\"${__default_asflags}\"\n    [[ -z \"${MAKEFLAGS}\" ]] && export MAKEFLAGS=\"${__default_makeflags}\"\n\n    # test if we are in a chroot\n    if [[ \"$(stat -c %d:%i /)\" != \"$(stat -c %d:%i /proc/1/root/.)\" ]]; then\n        [[ -z \"$QEMU_CPU\" && -n \"$__qemu_cpu\" ]] && export QEMU_CPU=$__qemu_cpu\n        __chroot=1\n    else\n        __chroot=0\n    fi\n\n    if [[ -z \"$__nodialog\" ]]; then\n        __nodialog=0\n    fi\n}\n\nfunction get_os_version() {\n    # make sure lsb_release is installed\n    # getDepends lsb-release\n\n    # get os distributor id, description, release number and codename\n    local os\n    mapfile -t os < <(lsb_release -sidrc)\n    __os_id=\"${os[0]}\"\n    __os_desc=\"${os[1]}\"\n    __os_release=\"${os[2]}\"\n    __os_codename=\"${os[3]}\"\n    \n    local error=\"\"\n    __os_id=\"Ubuntu\"\n    __os_release=\"16.10\"\n    case \"$__os_id\" in\n        Raspbian|Debian)\n            # Debian unstable is not officially supported though\n            if [[ \"$__os_release\" == \"unstable\" ]]; then\n                __os_release=10\n            fi\n\n            if compareVersions \"$__os_release\" lt 8; then\n                error=\"You need Raspbian/Debian Jessie or newer\"\n            fi\n\n            # set a platform flag for osmc\n            if grep -q \"ID=osmc\" /etc/os-release; then\n                __platform_flags+=\" osmc\"\n            fi\n\n            # and for xbian\n            if grep -q \"NAME=XBian\" /etc/os-release; then\n                __platform_flags+=\" xbian\"\n            fi\n\n            # we provide binaries for RPI on Raspbian < 10 only\n            if isPlatform \"rpi\" && compareVersions \"$__os_release\" lt 10; then\n                __has_binaries=1\n            fi\n\n            # get major version (8 instead of 8.0 etc)\n            __os_debian_ver=\"${__os_release%%.*}\"\n            ;;\n        Devuan)\n            if isPlatform \"rpi\"; then\n                error=\"We do not support Devuan on the Raspberry Pi. We recommend you use Raspbian to run RetroPie.\"\n            fi\n            # devuan lsb-release version numbers don't match jessie\n            case \"$__os_codename\" in\n                jessie)\n                    __os_debian_ver=\"8\"\n                    ;;\n                ascii)\n                    __os_debian_ver=\"9\"\n                    ;;\n                beowolf)\n                    __os_debian_ver=\"10\"\n                    ;;\n                ceres)\n                    __os_debian_ver=\"11\"\n                    ;;\n            esac\n            ;;\n        LinuxMint)\n            if [[ \"$__os_desc\" != LMDE* ]]; then\n                if compareVersions \"$__os_release\" lt 17; then\n                    error=\"You need Linux Mint 17 or newer\"\n                elif compareVersions \"$__os_release\" lt 18; then\n                    __os_ubuntu_ver=\"14.04\"\n                    __os_debian_ver=\"8\"\n                elif compareVersions \"$__os_release\" lt 19; then\n                    __os_ubuntu_ver=\"16.04\"\n                    __os_debian_ver=\"8\"\n                else\n                    __os_ubuntu_ver=\"18.04\"\n                    __os_debian_ver=\"9\"\n                fi\n            fi\n            ;;\n        Ubuntu)\n            if compareVersions \"$__os_release\" lt 14.04; then\n                error=\"You need Ubuntu 14.04 or newer\"\n            elif compareVersions \"$__os_release\" lt 16.10; then\n                __os_debian_ver=\"8\"\n            else\n                __os_debian_ver=\"9\"\n            fi\n            __os_ubuntu_ver=\"$__os_release\"\n            ;;\n        Deepin)\n            if compareVersions \"$__os_release\" lt 15.5; then\n                error=\"You need Deepin OS 15.5 or newer\"\n            fi\n            __os_debian_ver=\"9\"\n            ;;\n        elementary)\n            if compareVersions \"$__os_release\" lt 0.3; then\n                error=\"You need Elementary OS 0.3 or newer\"\n            elif compareVersions \"$__os_release\" lt 0.4; then\n                __os_ubuntu_ver=\"14.04\"\n            else\n                __os_ubuntu_ver=\"16.04\"\n            fi\n            __os_debian_ver=\"8\"\n            ;;\n        neon)\n            __os_ubuntu_ver=\"$__os_release\"\n            if compareVersions \"$__os_release\" lt 16.10; then\n                __os_debian_ver=\"8\"\n            else\n                __os_debian_ver=\"9\"\n            fi\n            ;;\n        *)\n            error=\"Unsupported OS\"\n            ;;\n    esac\n    \n    [[ -n \"$error\" ]] && fatalError \"$error\\n\\n$(lsb_release -idrc)\"\n\n    # add 32bit/64bit to platform flags\n    __platform_flags+=\" 32bit\"\n\n    # configure Raspberry Pi graphics stack\n    isPlatform \"rpi\" && get_rpi_video\n}\n\nfunction get_retropie_depends() {\n    local depends=(git dialog wget gcc g++ build-essential unzip xmlstarlet python-pyudev ca-certificates)\n\n    if ! getDepends \"${depends[@]}\"; then\n        fatalError \"Unable to install packages required by $0 - ${md_ret_errors[@]}\"\n    fi\n\n    # make sure we don't have xserver-xorg-legacy installed as it breaks launching x11 apps from ES\n    if ! isPlatform \"x11\" && hasPackage \"xserver-xorg-legacy\"; then\n        aptRemove xserver-xorg-legacy\n    fi\n}\n\nfunction get_rpi_video() {\n    local pkgconfig=\"/opt/vc/lib/pkgconfig\"\n\n    # detect driver via inserted module / platform driver setup\n    if [[ -d \"/sys/module/vc4\" ]]; then\n        __platform_flags+=\" mesa kms\"\n        [[ \"$(ls -A /sys/bus/platform/drivers/vc4_firmware_kms/*.firmwarekms 2>/dev/null)\" ]] && __platform_flags+=\" dispmanx\"\n    else\n        __platform_flags+=\" videocore dispmanx\"\n    fi\n\n    # use our supplied fallback pkgconfig if necessary\n    [[ ! -d \"$pkgconfig\" ]] && pkgconfig=\"$scriptdir/pkgconfig\"\n\n    # set pkgconfig path for vendor libraries\n    export PKG_CONFIG_PATH=\"$pkgconfig\"\n}\n\nfunction get_platform() {\n    local architecture=\"$(uname --machine)\"\n    if [[ -z \"$__platform\" ]]; then\n        case \"$(sed -n '/^Hardware/s/^.*: \\(.*\\)/\\1/p' < /proc/cpuinfo)\" in\n            BCM*)\n                # calculated based on information from https://github.com/AndrewFromMelbourne/raspberry_pi_revision\n                local rev=\"0x$(sed -n '/^Revision/s/^.*: \\(.*\\)/\\1/p' < /proc/cpuinfo)\"\n                # if bit 23 is not set, we are on a rpi1 (bit 23 means the revision is a bitfield)\n                if [[ $((($rev >> 23) & 1)) -eq 0 ]]; then\n                    __platform=\"rpi1\"\n                else\n                    # if bit 23 is set, get the cpu from bits 12-15\n                    local cpu=$((($rev >> 12) & 15))\n                    case $cpu in\n                        0)\n                            __platform=\"rpi1\"\n                            ;;\n                        1)\n                            __platform=\"rpi2\"\n                            ;;\n                        2)\n                            __platform=\"rpi3\"\n                            ;;\n                    esac\n                fi\n                ;;\n            ODROIDC)\n                __platform=\"odroid-c1\"\n                ;;\n            ODROID-C2)\n                __platform=\"odroid-c2\"\n                ;;\n            \"Freescale i.MX6 Quad/DualLite (Device Tree)\")\n                __platform=\"imx6\"\n                ;;\n            ODROID-XU[34])\n                __platform=\"odroid-xu\"\n                ;;\n            \"Rockchip (Device Tree)\")\n                __platform=\"tinker\"\n                ;;\n            Vero4K)\n                __platform=\"vero4k\"\n                ;;\n            \"Allwinner sun8i Family\")\n                __platform=\"armv7-mali\"\n                ;;\n            *)\n                case $architecture in\n                    i686|x86_64|amd64)\n                        __platform=\"x86\"\n                        ;;\n                esac\n                ;;\n        esac\n    fi\n\n    __platform=\"odroid-c2\"\n\n    if ! fnExists \"platform_${__platform}\"; then\n        fatalError \"Unknown platform - please manually set the __platform variable to one of the following: $(compgen -A function platform_ | cut -b10- | paste -s -d' ')\"\n    fi\n\n    platform_${__platform}\n    [[ -z \"$__default_cxxflags\" ]] && __default_cxxflags=\"$__default_cflags\"\n}\n\nfunction platform_rpi1() {\n    # values to be used for configure/make\n    __default_cflags=\"-O2 -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard\"\n    __default_asflags=\"\"\n    __default_makeflags=\"\"\n    __platform_flags=\"arm armv6 rpi gles\"\n    # if building in a chroot, what cpu should be set by qemu\n    # make chroot identify as arm6l\n    __qemu_cpu=arm1176\n}\n\nfunction platform_rpi2() {\n    __default_cflags=\"-O2 -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations\"\n    __default_asflags=\"\"\n    __default_makeflags=\"-j2\"\n    __platform_flags=\"arm armv7 neon rpi gles\"\n    __qemu_cpu=cortex-a7\n}\n\n# note the rpi3 currently uses the rpi2 binaries - for ease of maintenance - rebuilding from source\n# could improve performance with the compiler options below but needs further testing\nfunction platform_rpi3() {\n    __default_cflags=\"-O2 -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations\"\n    __default_asflags=\"\"\n    __default_makeflags=\"-j2\"\n    __platform_flags=\"arm armv8 neon rpi gles\"\n}\n\nfunction platform_odroid-c1() {\n    __default_cflags=\"-O2 -mcpu=cortex-a5 -mfpu=neon-vfpv4 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations\"\n    __default_asflags=\"\"\n    __default_makeflags=\"-j2\"\n    __platform_flags=\"arm armv7 neon mali gles\"\n    __qemu_cpu=cortex-a9\n}\n\nfunction platform_odroid-c2() {\n    if [[ \"32\" -eq 32 ]]; then\n        __default_cflags=\"-O2 -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8\"\n        __platform_flags=\"arm armv8 neon mali gles\"\n    else\n        __default_cflags=\"-O2 -march=native\"\n        __platform_flags=\"aarch64 mali gles\"\n    fi\n    __default_cflags+=\" -ftree-vectorize -funsafe-math-optimizations\"\n    __default_asflags=\"\"\n    __default_makeflags=\"-j2\"\n}\n\nfunction platform_odroid-xu() {\n    __default_cflags=\"-O2 -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations\"\n    # required for mali-fbdev headers to define GL functions\n    __default_cflags+=\" -DGL_GLEXT_PROTOTYPES\"\n    __default_asflags=\"\"\n    __default_makeflags=\"-j2\"\n    __platform_flags=\"arm armv7 neon mali gles\"\n}\n\nfunction platform_tinker() {\n    __default_cflags=\"-O2 -marm -march=armv7-a -mtune=cortex-a17 -mfpu=neon-vfpv4 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations\"\n    # required for mali headers to define GL functions\n    __default_cflags+=\" -DGL_GLEXT_PROTOTYPES\"\n    __default_asflags=\"\"\n    __default_makeflags=\"-j2\"\n    __platform_flags=\"arm armv7 neon kms gles\"\n}\n\nfunction platform_x86() {\n    __default_cflags=\"-O2 -march=native\"\n    __default_asflags=\"\"\n    __default_makeflags=\"-j$(nproc)\"\n    __platform_flags=\"x11 gl\"\n}\n\nfunction platform_generic-x11() {\n    __default_cflags=\"-O2\"\n    __default_asflags=\"\"\n    __default_makeflags=\"-j$(nproc)\"\n    __platform_flags=\"x11 gl\"\n}\n\nfunction platform_armv7-mali() {\n    __default_cflags=\"-O2 -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations\"\n    __default_asflags=\"\"\n    __default_makeflags=\"-j$(nproc)\"\n    __platform_flags=\"arm armv7 neon mali gles\"\n}\n\nfunction platform_imx6() {\n    __default_cflags=\"-O2 -march=armv7-a -mfpu=neon -mtune=cortex-a9 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations\"\n    __default_asflags=\"\"\n    __default_makeflags=\"-j2\"\n    __platform_flags=\"arm armv7 neon\"\n}\n\nfunction platform_vero4k() {\n    __default_cflags=\"-I/opt/vero3/include -L/opt/vero3/lib -O2 -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations\"\n    __default_asflags=\"\"\n    __default_makeflags=\"-j4\"\n    __platform_flags=\"arm armv8 neon vero4k gles\"\n}\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/CMD_MAKER.py",
    "content": "#!/usr/bin/env python3\n\"\"\"EmuELEC MAME .cmd batch generator (controller UI).\"\"\"\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2026-present worstcase_scenario (https://github.com/worstcase-scenario)\n\nimport os\nimport glob\nimport re\nimport shutil\nimport xml.etree.ElementTree as ET\nfrom typing import Dict, List, Tuple, Optional\nimport sys\nimport struct\nimport select\nimport time\nfrom evdev import InputDevice, list_devices, ecodes as e\n\n\nclass MediaEntry:\n    def __init__(self, system: str, media_name: str, brief: str, exts: List[str]):\n        self.system = system\n        self.media_name = media_name\n        self.brief = brief\n        self.exts = exts\n\n\nDEFAULT_LISTMEDIA_FILE = \"/storage/roms/listmedia.txt\"\nSYSTEM_LISTMEDIA_FILE = \"/usr/bin/scripts/setup/listmedia.txt\"\nROM_PLACEHOLDER = \"<ROM_PATH>\"\n\n# Linux input event codes\nEV_KEY = 1\nEV_ABS = 3\n\n# Button codes (common gamepad mapping)\nBTN_SOUTH = 304  # A/Cross\nBTN_EAST = 305   # B/Circle\nBTN_WEST = 306   # X/Square\nBTN_NORTH = 307  # Y/Triangle\nBTN_TL = 308     # L1\nBTN_TR = 309     # R1\nBTN_SELECT = 314 # Select/Back\nBTN_START = 315  # Start\nBTN_MODE = 316   # Home/Guide\n\n# D-Pad absolute axes\nABS_HAT0X = 16\nABS_HAT0Y = 17\n\n# Keyboard codes\nKEY_UP = 103\nKEY_DOWN = 108\nKEY_LEFT = 105\nKEY_RIGHT = 106\nKEY_ENTER = 28\nKEY_ESC = 1\nKEY_BACKSPACE = 14\nKEY_Q = 16\n\n# Character set for command line editor\nCMD_ALPHABET = list(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 -_./\\\\()[]{}\\\"'=:,;\")\nMAX_CMD_LEN = 256\n\n\nclass UserQuit(Exception):\n    pass\n\n\nclass GoBack(Exception):\n    pass\n\n\ndef find_controller_device() -> str:\n    patterns = re.compile(r\"(pad|controller|joystick|xbox|playstation|ps[0-9]|dualshock|dualsense|8bitdo)\", re.I)\n\n    # Collect candidates: (priority, path, name)\n    candidates = []\n    for path in sorted(glob.glob(\"/dev/input/event*\")):\n        base = os.path.basename(path)\n        name_path = f\"/sys/class/input/{base}/device/name\"\n        devname = \"\"\n        try:\n            with open(name_path, \"r\", encoding=\"utf-8\", errors=\"ignore\") as f:\n                devname = f.read().strip()\n        except Exception:\n            devname = \"\"\n\n        priority = 0 if (devname and patterns.search(devname)) else 1\n        candidates.append((priority, path, devname))\n\n    # Try preferred candidates first\n    for _, path, devname in sorted(candidates, key=lambda t: (t[0], t[1])):\n        try:\n            with open(path, \"rb\") as _f:\n                pass\n            if devname:\n                print(f\"Auto-detected controller: {devname} ({path})\", flush=True)\n            else:\n                print(f\"Auto-detected input device: {path}\", flush=True)\n            return path\n        except Exception:\n            continue\n\n    print(\"Warning: No /dev/input/event* device could be opened; falling back to /dev/input/event0\", flush=True)\n    return \"/dev/input/event0\"\n\n# ---------------------------------------------------------------------------\n# Controller Input Handling\n# ---------------------------------------------------------------------------\n\nclass ControllerInput:\n\n    def __init__(self, preferred_path: Optional[str] = None):\n        self.dev = wait_for_controller(preferred_path)\n        self.last_hat_x = 0\n        self.last_hat_y = 0\n\n    def wait_for_input(self) -> str:\n        for event in self.dev.read_loop():\n            # Button presses\n            if event.type == e.EV_KEY and event.value == 1:\n                code = event.code\n\n                # D-Pad (digital)\n                if code == e.BTN_DPAD_UP:\n                    return 'up'\n                if code == e.BTN_DPAD_DOWN:\n                    return 'down'\n                if code == e.BTN_DPAD_LEFT:\n                    return 'left'\n                if code == e.BTN_DPAD_RIGHT:\n                    return 'right'\n\n                # Confirm / Back\n                if code in (e.BTN_SOUTH, e.BTN_START):\n                    return 'a'\n                if code == e.BTN_EAST:\n                    return 'b'\n\n                # Additional buttons\n                if code == e.BTN_NORTH:\n                    return 'y'\n                if code == e.BTN_WEST:\n                    return 'x'\n                if code == e.BTN_TL:\n                    return 'l1'\n                if code == e.BTN_TR:\n                    return 'r1'\n\n                # Quit / special\n                if code in (e.BTN_SELECT, e.BTN_MODE):\n                    return 'select'\n\n                # Some controllers map D-pad to face buttons/keys; keep a small fallback\n                if code in (e.KEY_UP,):\n                    return 'up'\n                if code in (e.KEY_DOWN,):\n                    return 'down'\n                if code in (e.KEY_LEFT,):\n                    return 'left'\n                if code in (e.KEY_RIGHT,):\n                    return 'right'\n                if code in (e.KEY_ENTER,):\n                    return 'a'\n                if code in (e.KEY_ESC, e.KEY_BACKSPACE):\n                    return 'b'\n\n            # D-Pad (hat axes)\n            if event.type == e.EV_ABS:\n                if event.code == e.ABS_HAT0Y:\n                    if event.value < 0 and self.last_hat_y >= 0:\n                        self.last_hat_y = event.value\n                        return 'up'\n                    if event.value > 0 and self.last_hat_y <= 0:\n                        self.last_hat_y = event.value\n                        return 'down'\n                    if event.value == 0:\n                        self.last_hat_y = 0\n\n                if event.code == e.ABS_HAT0X:\n                    if event.value < 0 and self.last_hat_x >= 0:\n                        self.last_hat_x = event.value\n                        return 'left'\n                    if event.value > 0 and self.last_hat_x <= 0:\n                        self.last_hat_x = event.value\n                        return 'right'\n                    if event.value == 0:\n                        self.last_hat_x = 0\n\n    def close(self):\n        try:\n            self.dev.close()\n        except Exception:\n            pass\n\n\ndef wait_for_controller(preferred_path: Optional[str] = None) -> InputDevice:\n    print(\"\\nWaiting for controller...\", flush=True)\n\n    if preferred_path:\n        try:\n            dev = InputDevice(preferred_path)\n            print(f\"Controller found: {dev.name} ({dev.path})\", flush=True)\n            return dev\n        except OSError:\n            pass\n\n    while True:\n        for path in list_devices():\n            try:\n                dev = InputDevice(path)\n            except OSError:\n                continue\n\n            caps = dev.capabilities()\n            keys = caps.get(e.EV_KEY, [])\n            abs_caps = caps.get(e.EV_ABS, [])\n\n            # Heuristic: real gamepad usually has face buttons and/or dpad\n            has_face = any(btn in keys for btn in (e.BTN_SOUTH, e.BTN_EAST, e.BTN_NORTH, e.BTN_WEST))\n            has_dpad = any(btn in keys for btn in (e.BTN_DPAD_UP, e.BTN_DPAD_DOWN, e.BTN_DPAD_LEFT, e.BTN_DPAD_RIGHT))\n            has_hat = any(ax in abs_caps for ax in (e.ABS_HAT0X, e.ABS_HAT0Y))\n\n            if has_face or has_dpad or has_hat:\n                print(f\"Controller found: {dev.name} ({dev.path})\", flush=True)\n                return dev\n\n        time.sleep(1.0)\n\n\ndef init_controller(preferred_path: Optional[str] = None):\n    global controller\n    controller = ControllerInput(preferred_path)\n\ndef unblank_framebuffer() -> None:\n    for p in (\"/sys/class/graphics/fb0/blank\", \"/sys/class/graphics/fb1/blank\"):\n        try:\n            with open(p, \"w\", encoding=\"utf-8\") as f:\n                f.write(\"0\")\n        except Exception:\n            pass\n\ndef clear_screen():\n    unblank_framebuffer()\n    print(\"\\033[2J\\033[H\", end='', flush=True)\n\n\ndef show_menu(\n    title: str,\n    options: List[str],\n    selected: int = 0,\n    info: str = \"\",\n    offset: int = 0,\n    visible: int = 20,\n    show_items: bool = False,\n) -> None:\n    \"\"\"Render the menu.\"\"\"\n    clear_screen()\n    print(\"=\" * 98)\n    print(f\" {title}\")\n    print(\"=\" * 98)\n\n    total = len(options)\n    if visible <= 0:\n        visible = total\n\n    # Clamp offset\n    if offset < 0:\n        offset = 0\n    if offset > max(0, total - 1):\n        offset = max(0, total - 1)\n\n    start = offset\n    end = min(offset + visible, total)\n    \n    if info:\n        print(f\"\\n\\n\\n{info}\\n\")\n\n    for i in range(start, end):\n        option = options[i]\n        if i == selected:\n            print(f\"  > {option}\")\n        else:\n            print(f\"    {option}\")\n\n    if end < total:\n        print(\"    ...\")\n\n    print(\"\\n\" + \"-\" * 98)\n    print(\"D-Pad: Navigate | A: Select | B: Back | Select: Quit | Left/Right: Page up/down\")\n    print(\"-\" * 98)\n    sys.stdout.flush()\n\ndef select_from_list(title: str, items: List[str], info: str = \"\", visible: int = 20, show_items: bool = False) -> Optional[int]:\n    if not items:\n        return None\n\n    total = len(items)\n    selected = 0\n    offset = 0\n\n    # Ensure sensible visible window\n    if visible <= 0:\n        visible = total\n\n    while True:\n        # Keep selected visible\n        if selected < offset:\n            offset = selected\n        elif selected >= offset + visible:\n            offset = selected - visible + 1\n\n        # Clamp offset to valid range\n        if total > visible:\n            max_off = max(0, total - visible)\n            if offset > max_off:\n                offset = max_off\n        else:\n            offset = 0\n\n        show_menu(title, items, selected, info, offset=offset, visible=visible)\n\n        key = controller.wait_for_input()\n\n        if key == 'select':\n            raise UserQuit()\n\n        elif key == 'up':\n            if selected > 0:\n                selected -= 1\n\n        elif key == 'down':\n            if selected < total - 1:\n                selected += 1\n\n        elif key == 'left':\n            # Page up\n            selected = max(0, selected - visible)\n\n        elif key == 'right':\n            # Page down\n            selected = min(total - 1, selected + visible)\n\n        elif key == 'a':\n            return selected\n\n        elif key == 'b':\n            raise GoBack()\n\n\ndef confirm_dialog(title: str, message: str, default_yes: bool = True) -> bool:\n    options = [\"Yes\", \"No\"]\n    selected = 0 if default_yes else 1\n    \n    while True:\n        show_menu(title, options, selected, message)\n        \n        key = controller.wait_for_input()\n        \n        if key == 'select':\n            raise UserQuit()\n        \n        elif key in ['up', 'down']:\n            selected = 1 - selected\n        \n        elif key == 'a':\n            return selected == 0\n        \n        elif key == 'b':\n            return False\n\n\ndef ok_dialog(title: str, message: str) -> None:\n    options = [\"OK\"]\n    selected = 0\n    while True:\n        show_menu(title, options, selected, message, 0, 20, False)\n        key = controller.wait_for_input()\n        if key == 'select':\n            raise UserQuit()\n        if key in ['a', 'b', 'start']:\n            return\n\n\ndef back_exit_dialog(title: str, message: str) -> str:\n    options = [\"B A C K\", \"E X I T\"]\n    selected = 0\n    while True:\n        show_menu(title, options, selected, message, 0, 20, False)\n        key = controller.wait_for_input()\n        if key == 'select':\n            raise UserQuit()\n        if key in ['up', 'down']:\n            selected = 1 - selected\n        if key in ['b']:\n            return \"back\"\n        if key in ['a', 'start']:\n            return \"back\" if selected == 0 else \"exit\"\n\n\n# ---------------------------------------------------------------------------\n# Custom Command Line Editor\n# ---------------------------------------------------------------------------\n\ndef edit_command_line(default_cmd: str) -> Optional[str]:\n\n    # Prepare the command as a list of characters\n    cmd = list(default_cmd[:MAX_CMD_LEN])\n    if not cmd:\n        cmd = list(\"mame \")\n    \n    # Pad to minimum length for easier editing\n    while len(cmd) < 20:\n        cmd.append(\" \")\n    \n    position = 0\n    view_offset = 0  # For horizontal scrolling\n    view_width = 80  # Visible characters at once\n    \n    while True:\n        clear_screen()\n        print(\"=\" * 98)\n        print(\" Edit Command Line\")\n        print(\"=\" * 98)\n        print()\n        print(\"LEFT/RIGHT: Move cursor | UP/DOWN: Change character\")\n        print(\"L1/R1: Jump 10 chars | X: Insert space | Y: Delete char\")\n        print(\"A: Accept | B: Cancel\")\n        print()\n        print(\"-\" * 98)\n        \n        # Adjust view offset to keep cursor visible\n        if position < view_offset:\n            view_offset = position\n        elif position >= view_offset + view_width:\n            view_offset = position - view_width + 1\n        \n        # Create visible window\n        visible_start = view_offset\n        visible_end = min(view_offset + view_width, len(cmd))\n        \n        # Build display with cursor\n        display = []\n        for idx in range(visible_start, visible_end):\n            char = cmd[idx] if idx < len(cmd) else \" \"\n            if idx == position:\n                display.append(f\"[{char}]\")\n            else:\n                display.append(f\" {char} \")\n        \n        # Show scroll indicators\n        left_indicator = \"<\" if view_offset > 0 else \" \"\n        right_indicator = \">\" if visible_end < len(cmd) else \" \"\n        \n        print(f\"{left_indicator}{''.join(display)}{right_indicator}\")\n        print()\n        print(f\"Position: {position + 1}/{len(cmd)} | Length: {len(cmd)}/{MAX_CMD_LEN}\")\n        print(\"-\" * 98)\n        \n        # Get current command preview\n        current_cmd = ''.join(cmd).rstrip()\n        if len(current_cmd) > 90:\n            preview = current_cmd[:87] + \"...\"\n        else:\n            preview = current_cmd\n        print(f\"Preview: {preview}\")\n        print(\"=\" * 98)\n        sys.stdout.flush()\n        \n        key = controller.wait_for_input()\n        \n        if key == 'select':\n            raise UserQuit()\n        \n        elif key == 'right':\n            if position < len(cmd) - 1:\n                position += 1\n        \n        elif key == 'left':\n            if position > 0:\n                position -= 1\n        \n        elif key == 'r1':  # Jump right\n            position = min(position + 10, len(cmd) - 1)\n        \n        elif key == 'l1':  # Jump left\n            position = max(position - 10, 0)\n        \n        elif key == 'up':\n            # Next character in alphabet\n            current = cmd[position]\n            try:\n                idx = CMD_ALPHABET.index(current)\n            except ValueError:\n                idx = 0\n            cmd[position] = CMD_ALPHABET[(idx + 1) % len(CMD_ALPHABET)]\n        \n        elif key == 'down':\n            # Previous character in alphabet\n            current = cmd[position]\n            try:\n                idx = CMD_ALPHABET.index(current)\n            except ValueError:\n                idx = 0\n            cmd[position] = CMD_ALPHABET[(idx - 1) % len(CMD_ALPHABET)]\n        \n        elif key == 'x':\n            # Insert space at current position\n            if len(cmd) < MAX_CMD_LEN:\n                cmd.insert(position, ' ')\n        \n        elif key == 'y':\n            # Delete character at current position\n            if len(cmd) > 1:\n                cmd.pop(position)\n                if position >= len(cmd):\n                    position = len(cmd) - 1\n        \n        elif key == 'a':\n            # Accept\n            final_cmd = ''.join(cmd).strip()\n            if not final_cmd:\n                continue\n            # Ensure ROM placeholder is present\n            if ROM_PLACEHOLDER not in final_cmd:\n                ok_dialog(\"Missing Placeholder\", \n                         f\"Command must contain {ROM_PLACEHOLDER}\\n\\nThis will be replaced with the ROM path.\")\n                continue\n            return final_cmd\n        \n        elif key == 'b':\n            # Cancel\n            return None\n\n\ndef ask_file_filter(default_exts: List[str]) -> List[str]:\n    exts = [e.lower() for e in (default_exts or [])]\n    if \".zip\" not in exts:\n        exts.append(\".zip\")\n\n    if not exts:\n        return []\n\n    ext_str = \" \".join(exts[:8])\n    if len(exts) > 8:\n        ext_str += f\" ... (+{len(exts)-8})\"\n\n    use_filter = confirm_dialog(\n        \"File Filter\",\n        f\"Filter by these file types?\\n\\n{ext_str}\",\n        True\n    )\n    if use_filter:\n        return exts\n\n    options = [\"All files (no filter)\"] + exts\n    choice = select_from_list(\"Pick one file type\", options, visible=20)\n    if choice is None:\n        raise GoBack()\n    if choice == 0:\n        return []\n    return [exts[choice - 1]]\n\ndef _read_listmedia_text(path: str) -> str:\n    with open(path, \"rb\") as bf:\n        data = bf.read()\n\n    if b\"\\x00\" in data[:4096]:\n        try:\n            return data.decode(\"utf-16\")\n        except UnicodeError:\n            return data.decode(\"utf-16-le\", errors=\"ignore\")\n    else:\n        return data.decode(\"utf-8\", errors=\"ignore\")\n\n\ndef parse_listmedia(path: str) -> Dict[str, List[MediaEntry]]:\n    if not os.path.isfile(path):\n        raise FileNotFoundError(f\"Listmedia file not found: {path}\")\n\n    text = _read_listmedia_text(path)\n    systems: Dict[str, List[MediaEntry]] = {}\n    current_system: Optional[str] = None\n\n    for line in text.splitlines():\n        original = line.rstrip(\"\\r\\n\")\n        stripped = original.strip()\n        if not stripped:\n            continue\n\n        tokens = stripped.split()\n        if len(tokens) == 2 and tokens[1].startswith(\"(none\"):\n            continue\n\n        if len(tokens) < 3:\n            continue\n\n        brief_idx = None\n        for i, t in enumerate(tokens):\n            if t.startswith(\"(\") and t.endswith(\")\"):\n                brief_idx = i\n                break\n        if brief_idx is None or brief_idx == 0:\n            continue\n\n        is_continuation = bool(original) and original[0].isspace()\n\n        if is_continuation:\n            if current_system is None:\n                continue\n            system = current_system\n            media_name = tokens[0]\n        else:\n            system = tokens[0]\n            current_system = system\n            if brief_idx >= 2:\n                media_name = tokens[1]\n            else:\n                continue\n\n        brief = tokens[brief_idx].strip(\"()\")\n        exts = [t for t in tokens[brief_idx + 1:] if t.startswith(\".\")]\n\n        entry = MediaEntry(system, media_name, brief, exts)\n        systems.setdefault(system, []).append(entry)\n\n    return systems\n\n\n# ---------------------------------------------------------------------------\n# System selection\n# ---------------------------------------------------------------------------\n\ndef browse_systems_paged(all_systems: List[str], page_size: int = 20) -> Optional[str]:\n    if not all_systems:\n        return None\n\n    info = f\"Total systems: {len(all_systems)}\"\n    idx = select_from_list(\"Select System\", all_systems, info, visible=page_size, show_items=True)\n    if idx is None:\n        return None\n    return all_systems[idx]\n\n\ndef choose_system(systems: Dict[str, List[MediaEntry]]) -> str:\n    all_systems = sorted(systems.keys())\n    \n    while True:\n        options = [\n            \"Browse System List\",\n            \"Back to Main Menu\"\n        ]\n        \n        try:\n            idx = select_from_list(\n                \"System Selection\",\n                options,\n                f\"{len(all_systems)} systems available\"\n            )\n            \n            if idx is None or idx == 1:\n                raise GoBack()\n            \n            if idx == 0:\n                selected = browse_systems_paged(all_systems)\n                if selected:\n                    return selected\n                \n        except GoBack:\n            raise\n\n\ndef choose_media(entries: List[MediaEntry]) -> MediaEntry:\n    options = []\n    for e in entries:\n        exts_str = \" \".join(e.exts[:3]) if e.exts else \"\"\n        options.append(f\"{e.media_name} ({e.brief}) {exts_str}\")\n    \n    idx = select_from_list(\"Select Media Type\", options)\n    \n    if idx is None:\n        raise GoBack()\n    \n    return entries[idx]\n\n\n# ---------------------------------------------------------------------------\n# Directory selection\n# ---------------------------------------------------------------------------\n\ndef choose_directory_interactive(prompt: str, start_dir: str = \"/storage/roms\") -> str:\n    current = os.path.abspath(start_dir)\n\n    while True:\n        try:\n            entries = os.listdir(current)\n            subdirs = sorted(\n                d for d in entries\n                if os.path.isdir(os.path.join(current, d)) and not d.startswith('.')\n            )\n        except Exception:\n            subdirs = []\n\n        options: List[str] = [\"[Use This Directory]\"]\n        if current != \"/\":\n            options.append(\"[.. Parent Directory]\")\n        options.extend(subdirs)\n\n        info = f\"Current: {current}\"\n        idx = select_from_list(prompt, options, info, visible=20, show_items=True)\n        if idx is None:\n            raise GoBack()\n\n        selected = options[idx]\n\n        if selected == \"[Use This Directory]\":\n            return current\n        elif selected == \"[.. Parent Directory]\":\n            parent = os.path.dirname(current)\n            if parent and parent != current:\n                current = parent\n        else:\n            current = os.path.join(current, selected)\n\n\ndef ask_directory_and_filter(default_exts: List[str]) -> Tuple[str, List[str]]:\n    rom_dir = choose_directory_interactive(\"Select ROM Directory\", \"/storage/roms\")\n\n    exts = [e.lower() for e in (default_exts or [])]\n    if \".zip\" not in exts:\n        exts.append(\".zip\")\n\n    if exts:\n        ext_str = \" \".join(exts[:8])\n        if len(exts) > 8:\n            ext_str += f\" ... (+{len(exts)-8})\"\n\n        use_filter = confirm_dialog(\n            \"File Filter\",\n            f\"Filter by these file types?\\n\\n{ext_str}\",\n            True\n        )\n\n        if use_filter:\n            return rom_dir, exts\n\n        options = [\"All files (no filter)\"] + exts\n        choice = select_from_list(\"Pick one file type\", options, visible=20)\n        if choice is None or choice == 0:\n            return rom_dir, []\n        return rom_dir, [exts[choice - 1]]\n\n    return rom_dir, []\n\n\ndef find_rom_files(rom_dir: str, exts: List[str]) -> List[str]:\n    files: List[str] = []\n    try:\n        for name in os.listdir(rom_dir):\n            full = os.path.join(rom_dir, name)\n            if not os.path.isfile(full):\n                continue\n            if exts:\n                _, ext = os.path.splitext(name)\n                if ext.lower() not in exts:\n                    continue\n            if name.lower().endswith(\".cmd\"):\n                continue\n            files.append(name)\n    except:\n        pass\n    return sorted(files)\n\n\n# ---------------------------------------------------------------------------\n# Templates\n# ---------------------------------------------------------------------------\n\ndef build_default_template_preset(system: str, media: MediaEntry, extra_options: str) -> str:\n    parts = [system, \"-rp /storage/roms/bios\"]\n    extra_options = extra_options.strip()\n    if extra_options:\n        parts.append(extra_options)\n    parts.append(f\"-{media.brief} \\\"{ROM_PLACEHOLDER}\\\"\")\n    return \" \".join(parts)\n\n\ndef apply_template(template: str, rom_path: str) -> str:\n    return template.replace(ROM_PLACEHOLDER, rom_path)\n\n\n# ---------------------------------------------------------------------------\n# Per-file review\n# ---------------------------------------------------------------------------\n\ndef review_cmd(cmd_path: str, cmd_line: str, accept_all: bool) -> Tuple[Optional[str], bool, bool]:\n    if accept_all:\n        return cmd_line, True, True\n\n    options = [\n        \"CREATE .CMD-FILE FOR THIS ROM\",\n        \"SKIP THIS ROM\",\n        \"CREATE .CMD-FILES FOR ALL SELECTED ROMS\",\n        \"BACK\"\n    ]\n    \n    display_path = cmd_path\n    if len(display_path) > 65:\n        display_path = \"...\" + display_path[-62:]\n    \n    display_cmd = cmd_line\n    if len(display_cmd) > 68:\n        display_cmd = display_cmd[:65] + \"...\"\n    \n    info = f\"File: {display_path}\\n\\nThe command line in the .cmd files will be:\\n{display_cmd}\"\n    \n    try:\n        idx = select_from_list(\"Create .cmd File\", options, info)\n        \n        if idx is None or idx == 3:\n            raise GoBack()\n        \n        if idx == 0:\n            return cmd_line, True, False\n        \n        if idx == 2:\n            return cmd_line, True, True\n        \n        # idx == 1: Skip\n        return None, False, False\n        \n    except GoBack:\n        raise\n\n\n# ---------------------------------------------------------------------------\n# Write .cmd\n# ---------------------------------------------------------------------------\n\ndef write_cmd_file(cmd_path: str, cmd_line: str) -> None:\n    os.makedirs(os.path.dirname(cmd_path), exist_ok=True)\n    with open(cmd_path, \"w\", encoding=\"utf-8\") as f:\n        f.write(cmd_line)\n        f.write(\"\\n\")\n\n\n# ---------------------------------------------------------------------------\n# gamelist.xml update\n# ---------------------------------------------------------------------------\n\ndef update_gamelist_paths(gamelist_path: str, rom_dir: str, rom_files: List[str]) -> int:\n    if not os.path.isfile(gamelist_path):\n        return 0\n\n    base_names = {os.path.splitext(name)[0] for name in rom_files}\n\n    try:\n        tree = ET.parse(gamelist_path)\n        root = tree.getroot()\n    except:\n        return 0\n\n    changed = 0\n\n    for path_elem in root.iter(\"path\"):\n        text = path_elem.text or \"\"\n        original = text.strip()\n        if not original:\n            continue\n\n        old_basename = os.path.basename(original)\n        base, ext = os.path.splitext(old_basename)\n        if base not in base_names:\n            continue\n        if ext.lower() == \".cmd\":\n            continue\n\n        new_basename = base + \".cmd\"\n        new_text = original[:-len(old_basename)] + new_basename\n        path_elem.text = new_text\n        changed += 1\n\n    if changed > 0:\n        backup_path = gamelist_path + \".bak\"\n        try:\n            shutil.copy2(gamelist_path, backup_path)\n            tree.write(gamelist_path, encoding=\"utf-8\", xml_declaration=True)\n        except:\n            return 0\n\n    return changed\n\n\ndef maybe_update_gamelist(rom_dir: str, rom_files: List[str]) -> None:\n    if not rom_files:\n        return\n\n    update = confirm_dialog(\n        \"Update gamelist.xml\",\n        \"Update gamelist.xml paths to use .cmd files?\",\n        False\n    )\n\n    default_gamelist = os.path.join(rom_dir, \"gamelist.xml\")\n\n    if not update:\n        ok_dialog(\"Gamelist.xml\", \"Gamelist.xml update was skipped.\")\n        return\n\n    if not os.path.isfile(default_gamelist):\n        ok_dialog(\"Gamelist.xml\", \"gamelist.xml not found; no changes made.\")\n        return\n\n    changed = update_gamelist_paths(default_gamelist, rom_dir, rom_files)\n\n    if changed > 0:\n        ok_dialog(\"Success\", f\"Updated {changed} entries in gamelist.xml\")\n    else:\n        ok_dialog(\"Gamelist.xml\", \"No matching entries were updated.\")\n\n\n# ---------------------------------------------------------------------------\n# Preset Mode\n# ---------------------------------------------------------------------------\n\ndef run_preset_mode(systems: Dict[str, List[MediaEntry]]) -> None:\n    system: Optional[str] = None\n    media: Optional[MediaEntry] = None\n    rom_dir: Optional[str] = None\n    exts: List[str] = []\n    rom_files: List[str] = []\n\n    step = 0  # 0=system, 1=media, 2=dir, 3=filter, 4=process\n\n    while True:\n        if step == 0:\n            system = choose_system(systems)\n            media = None\n            rom_dir = None\n            exts = []\n            rom_files = []\n            step = 1\n            continue\n\n        if step == 1:\n            try:\n                media = choose_media(systems[system])  # type: ignore[index]\n                step = 2\n            except GoBack:\n                step = 0\n            continue\n\n        if step == 2:\n            try:\n                rom_dir = choose_directory_interactive(\"Select ROM Directory\", \"/storage/roms\")\n                step = 3\n            except GoBack:\n                step = 1\n            continue\n\n        if step == 3:\n            try:\n                while True:\n                    exts = ask_file_filter(media.exts if media else [])  # type: ignore[union-attr]\n                    rom_files = find_rom_files(rom_dir, exts)  # type: ignore[arg-type]\n                    if rom_files:\n                        break\n\n                    action = back_exit_dialog(\n                        \"No Files Found\",\n                        f\"No ROM files found in:\\n{rom_dir}\\n\\nSelect BACK to adjust the file filter, or EXIT to quit.\"\n                    )\n                    if action == \"exit\":\n                        raise UserQuit()\n                    # BACK: loop back to filter selection\n\n                ok_dialog(\"Files Found\", f\"Found {len(rom_files)} ROM file(s) that will be processed.\")\n                step = 4\n            except GoBack:\n                step = 2\n            continue\n\n        # step == 4: Process files with preset template\n        template = build_default_template_preset(system, media, \"\")  # type: ignore[arg-type]\n            \n        accept_all = False\n        created_for_gamelist: List[str] = []\n\n        i = 0\n        while i < len(rom_files):\n            name = rom_files[i]\n            rom_path = os.path.join(rom_dir, name)  # type: ignore[arg-type]\n            cmd_line = apply_template(template, rom_path)\n\n            cmd_path = os.path.join(rom_dir, os.path.splitext(name)[0] + \".cmd\")  # type: ignore[arg-type]\n\n            try:\n                selected_cmd, accepted, accept_all = review_cmd(cmd_path, cmd_line, accept_all)\n            except GoBack:\n                # Go back to file filter selection\n                step = 3\n                break\n\n            if not accepted or not selected_cmd:\n                i += 1\n                continue\n\n            try:\n                write_cmd_file(cmd_path, selected_cmd)\n                created_for_gamelist.append(name)\n            except Exception as e:\n                ok_dialog(\"Write Error\", f\"Failed to write:\\n{cmd_path}\\n\\n{e}\")\n            i += 1\n\n        if step == 3:\n            continue\n\n        if created_for_gamelist:\n            maybe_update_gamelist(rom_dir, created_for_gamelist)  # type: ignore[arg-type]\n\n        ok_dialog(\"Completed\", f\"Created {len(created_for_gamelist)} .cmd files\")\n        return\n\n\ndef run_custom_mode() -> None:\n    rom_dir: Optional[str] = None\n    exts: List[str] = []\n    rom_files: List[str] = []\n    custom_template: Optional[str] = None\n\n    step = 0  # 0=create_command, 1=dir, 2=filter, 3=process\n\n    while True:\n        if step == 0:\n            # Create custom command\n            try:\n                default_cmd = f\"mame -rp /storage/roms/bios -cdrom \\\"{ROM_PLACEHOLDER}\\\"\"\n                \n                options = [\n                    \"Create Custom Command\",\n                    \"Back to Main Menu\"\n                ]\n                \n                info = \"Create a custom command line for your ROM files.\\n\\nThe command will be used for all selected ROMs.\"\n                \n                idx = select_from_list(\"Custom Mode\", options, info)\n                \n                if idx is None or idx == 1:\n                    raise GoBack()\n                \n                if idx == 0:\n                    edited = edit_command_line(default_cmd)\n                    if edited is None:\n                        continue\n                    \n                    # Show confirmation\n                    preview = edited if len(edited) <= 80 else edited[:77] + \"...\"\n                    confirm = confirm_dialog(\n                        \"Confirm Custom Command\",\n                        f\"Use this command for all ROMs?\\n\\n{preview}\",\n                        True\n                    )\n                    \n                    if confirm:\n                        custom_template = edited\n                        step = 1\n                    else:\n                        continue\n                        \n            except GoBack:\n                raise\n            continue\n\n        if step == 1:\n            try:\n                rom_dir = choose_directory_interactive(\"Select ROM Directory\", \"/storage/roms\")\n                step = 2\n            except GoBack:\n                step = 0\n            continue\n\n        if step == 2:\n            try:\n                while True:\n                    # Scan directory for available file extensions\n                    available_exts = set()\n                    try:\n                        for name in os.listdir(rom_dir):  # type: ignore[arg-type]\n                            full = os.path.join(rom_dir, name)  # type: ignore[arg-type]\n                            if not os.path.isfile(full):\n                                continue\n                            if name.lower().endswith(\".cmd\"):\n                                continue\n                            _, ext = os.path.splitext(name)\n                            if ext:\n                                available_exts.add(ext.lower())\n                    except Exception:\n                        available_exts = {\".zip\", \".chd\", \".cue\", \".iso\", \".bin\"}\n                    \n                    # Build options list\n                    options = [\"All files (no filter)\"]\n                    sorted_exts = sorted(available_exts)\n                    options.extend(sorted_exts)\n                    \n                    info = f\"Found {len(available_exts)} file types in directory\"\n                    choice = select_from_list(\"Pick file type filter\", options, info, visible=20)\n                    \n                    if choice is None:\n                        raise GoBack()\n                    \n                    if choice == 0:\n                        exts = []\n                    else:\n                        exts = [sorted_exts[choice - 1]]\n                    \n                    rom_files = find_rom_files(rom_dir, exts)  # type: ignore[arg-type]\n                    if rom_files:\n                        break\n\n                    action = back_exit_dialog(\n                        \"No Files Found\",\n                        f\"No ROM files found in:\\n{rom_dir}\\n\\nSelect BACK to adjust the file filter, or EXIT to quit.\"\n                    )\n                    if action == \"exit\":\n                        raise UserQuit()\n\n                ok_dialog(\"Files Found\", f\"Found {len(rom_files)} ROM file(s) that will be processed.\")\n                step = 3\n            except GoBack:\n                step = 1\n            continue\n\n        # step == 3: Process files with custom template\n        if not custom_template:\n            step = 0\n            continue\n            \n        accept_all = False\n        created_for_gamelist: List[str] = []\n\n        i = 0\n        while i < len(rom_files):\n            name = rom_files[i]\n            rom_path = os.path.join(rom_dir, name)  # type: ignore[arg-type]\n            cmd_line = apply_template(custom_template, rom_path)\n\n            cmd_path = os.path.join(rom_dir, os.path.splitext(name)[0] + \".cmd\")  # type: ignore[arg-type]\n\n            try:\n                selected_cmd, accepted, accept_all = review_cmd(cmd_path, cmd_line, accept_all)\n            except GoBack:\n                step = 2\n                break\n\n            if not accepted or not selected_cmd:\n                i += 1\n                continue\n\n            try:\n                write_cmd_file(cmd_path, selected_cmd)\n                created_for_gamelist.append(name)\n            except Exception as e:\n                ok_dialog(\"Write Error\", f\"Failed to write:\\n{cmd_path}\\n\\n{e}\")\n            i += 1\n\n        if step == 2:\n            continue\n\n        if created_for_gamelist:\n            maybe_update_gamelist(rom_dir, created_for_gamelist)  # type: ignore[arg-type]\n\n        ok_dialog(\"Completed\", f\"Created {len(created_for_gamelist)} .cmd files\")\n        return\n\n\ndef main() -> None:\n    # EmulationStation may launch this script without a real TTY on stdin.\n    # Only enable raw terminal mode when stdin is a TTY (e.g. when run via SSH).\n    try:\n        # Initialize controller (auto-detect; no argument required)\n        preferred_path = sys.argv[1] if len(sys.argv) > 1 else None\n        init_controller(preferred_path)\n        \n        clear_screen()\n        print(\"Initializing CMD Maker...\", flush=True)\n        time.sleep(0.5)\n        \n        systems: Dict[str, List[MediaEntry]] = {}\n        \n        # Check which listmedia files are available\n        user_listmedia_exists = os.path.exists(DEFAULT_LISTMEDIA_FILE)\n        system_listmedia_exists = os.path.exists(SYSTEM_LISTMEDIA_FILE)\n        \n        list_path = None\n        \n        # If both exist, let user choose\n        if user_listmedia_exists and system_listmedia_exists:\n            try:\n                options = [\n                    f\"User listmedia.txt ({DEFAULT_LISTMEDIA_FILE})\",\n                    f\"System listmedia.txt ({SYSTEM_LISTMEDIA_FILE})\"\n                ]\n                \n                idx = select_from_list(\n                    \"Choose listmedia.txt\",\n                    options,\n                    \"Multiple listmedia.txt files found\"\n                )\n                \n                if idx == 0:\n                    list_path = DEFAULT_LISTMEDIA_FILE\n                elif idx == 1:\n                    list_path = SYSTEM_LISTMEDIA_FILE\n                    \n            except (GoBack, UserQuit):\n                pass\n        \n        # Otherwise use whichever exists\n        elif user_listmedia_exists:\n            list_path = DEFAULT_LISTMEDIA_FILE\n            print(f\"Using user listmedia.txt\", flush=True)\n            time.sleep(0.3)\n        elif system_listmedia_exists:\n            list_path = SYSTEM_LISTMEDIA_FILE\n            print(f\"Using system listmedia.txt\", flush=True)\n            time.sleep(0.3)\n        \n        # Try to load listmedia.txt\n        if list_path:\n            try:\n                systems = parse_listmedia(list_path)\n                print(f\"Loaded {len(systems)} systems from {os.path.basename(list_path)}\", flush=True)\n                time.sleep(0.5)\n            except Exception as e:\n                print(f\"Warning: Could not load listmedia.txt: {e}\", flush=True)\n                time.sleep(1)\n\n        try:\n            while True:\n                try:\n                    options = [\n                        f\"Preset Mode ({len(systems)} systems)\",\n                        \"Custom Mode\",\n                        \"Exit\"\n                    ]\n                    \n                    idx = select_from_list(\n                        \"C M D  M A K E R\",\n                        options,\n                        \"Create .cmd files for MAME ROMs\"\n                    )\n                    \n                    if idx is None or idx == 2:\n                        break\n                    \n                    if idx == 0:\n                        if not systems:\n                            ok_dialog(\n                                \"No Presets\", \n                                f\"No listmedia.txt found in:\\n{DEFAULT_LISTMEDIA_FILE}\\nor\\n{SYSTEM_LISTMEDIA_FILE}\"\n                            )\n                        else:\n                            try:\n                                run_preset_mode(systems)\n                            except GoBack:\n                                continue\n                    \n                    elif idx == 1:\n                        try:\n                            run_custom_mode()\n                        except GoBack:\n                            continue\n                \n                except GoBack:\n                    continue\n        \n        except UserQuit:\n            pass\n        except KeyboardInterrupt:\n            pass\n        finally:\n            clear_screen()\n            print(\"Exiting CMD Maker...\", flush=True)\n            time.sleep(0.5)\n            \n            if controller:\n                controller.close()\n    \n    finally:\n        pass\n\n\nif __name__ == \"__main__\":\n    main()"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/EKA_INSTALL.py",
    "content": "#!/usr/bin/env python3\n\"\"\"EmuELEC eka2l1 firmware, SIS installer, device selector, UID creator & lowercase converter (controller UI).\"\"\"\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2026-present worstcase_scenario (https://github.com/worstcase-scenario)\n\nimport os\nimport glob\nimport sys\nimport time\nimport subprocess\nimport shutil\nimport re\nfrom typing import List, Optional, Tuple\nfrom evdev import InputDevice, list_devices, ecodes as e\n\n# ---------------------------------------------------------------------------\n# Paths\n# ---------------------------------------------------------------------------\nEKA_EXE         = \"/usr/bin/eka2l1/eka2l1_sdl2\"\nEKA_CONFIG      = \"/storage/.config/eka2l1\"\nEKA_BIOS_DIR    = \"/storage/roms/bios/eka2l1\"\nEKA_ROMS_DIR    = \"/storage/roms/ngage\"\nEKA_LOG         = \"/emuelec/logs/eka2l1-install.log\"\nEKA_CONFIG_YML  = os.path.join(EKA_CONFIG, \"config.yml\")\nEKA_Z_DRIVES    = os.path.join(EKA_CONFIG, \"data\", \"drives\", \"z\")\n\n# ---------------------------------------------------------------------------\n# Exceptions\n# ---------------------------------------------------------------------------\nclass UserQuit(Exception):\n    pass\n\nclass GoBack(Exception):\n    pass\n\n# ---------------------------------------------------------------------------\n# Controller\n# ---------------------------------------------------------------------------\ncontroller = None\n\nclass ControllerInput:\n    def __init__(self, preferred_path: Optional[str] = None):\n        self.preferred_path = preferred_path\n        self.dev = wait_for_controller(preferred_path)\n        self.preferred_path = getattr(self.dev, \"path\", preferred_path)\n        self.last_hat_x = 0\n        self.last_hat_y = 0\n\n    def reconnect(self):\n        old_path = getattr(self.dev, \"path\", self.preferred_path)\n        self.close()\n        self.last_hat_x = 0\n        self.last_hat_y = 0\n        log(f\"Controller disconnected, waiting for reconnect (last path: {old_path})\")\n        print(\"\\nController disconnected. Waiting for reconnect...\", flush=True)\n        self.dev = wait_for_controller(old_path)\n        self.preferred_path = getattr(self.dev, \"path\", old_path)\n        log(f\"Controller reconnected: {self.dev.name} ({self.dev.path})\")\n\n    def wait_for_input(self) -> str:\n        while True:\n            try:\n                for event in self.dev.read_loop():\n                    if event.type == e.EV_KEY and event.value == 1:\n                        code = event.code\n                        if code == e.BTN_DPAD_UP:    return 'up'\n                        if code == e.BTN_DPAD_DOWN:  return 'down'\n                        if code == e.BTN_DPAD_LEFT:  return 'left'\n                        if code == e.BTN_DPAD_RIGHT: return 'right'\n                        if code in (e.BTN_SOUTH, e.BTN_START): return 'a'\n                        if code == e.BTN_EAST:       return 'b'\n                        if code == e.BTN_NORTH:      return 'y'\n                        if code == e.BTN_WEST:       return 'x'\n                        if code in (e.BTN_SELECT, e.BTN_MODE): return 'select'\n                        if code == e.KEY_UP:         return 'up'\n                        if code == e.KEY_DOWN:       return 'down'\n                        if code == e.KEY_LEFT:       return 'left'\n                        if code == e.KEY_RIGHT:      return 'right'\n                        if code == e.KEY_ENTER:      return 'a'\n                        if code in (e.KEY_ESC, e.KEY_BACKSPACE): return 'b'\n\n                    if event.type == e.EV_ABS:\n                        if event.code == e.ABS_HAT0Y:\n                            if event.value < 0 and self.last_hat_y >= 0:\n                                self.last_hat_y = event.value\n                                return 'up'\n                            if event.value > 0 and self.last_hat_y <= 0:\n                                self.last_hat_y = event.value\n                                return 'down'\n                            if event.value == 0:\n                                self.last_hat_y = 0\n                        if event.code == e.ABS_HAT0X:\n                            if event.value < 0 and self.last_hat_x >= 0:\n                                self.last_hat_x = event.value\n                                return 'left'\n                            if event.value > 0 and self.last_hat_x <= 0:\n                                self.last_hat_x = event.value\n                                return 'right'\n                            if event.value == 0:\n                                self.last_hat_x = 0\n            except OSError as ex:\n                if getattr(ex, \"errno\", None) == 19:\n                    self.reconnect()\n                    continue\n                raise\n\n    def close(self):\n        try:\n            self.dev.close()\n        except Exception:\n            pass\n\n\ndef wait_for_controller(preferred_path: Optional[str] = None) -> InputDevice:\n    print(\"\\nWaiting for controller...\", flush=True)\n    if preferred_path:\n        try:\n            dev = InputDevice(preferred_path)\n            print(f\"Controller found: {dev.name} ({dev.path})\", flush=True)\n            return dev\n        except OSError:\n            pass\n\n    while True:\n        for path in list_devices():\n            try:\n                dev = InputDevice(path)\n            except OSError:\n                continue\n\n            caps = dev.capabilities()\n            keys = caps.get(e.EV_KEY, [])\n            abs_caps = caps.get(e.EV_ABS, [])\n\n            has_face = any(btn in keys for btn in (\n                e.BTN_SOUTH, e.BTN_EAST, e.BTN_NORTH, e.BTN_WEST\n            ))\n            has_dpad = any(btn in keys for btn in (\n                e.BTN_DPAD_UP, e.BTN_DPAD_DOWN, e.BTN_DPAD_LEFT, e.BTN_DPAD_RIGHT\n            ))\n            has_hat = any(ax in abs_caps for ax in (e.ABS_HAT0X, e.ABS_HAT0Y))\n\n            if has_face or has_dpad or has_hat:\n                print(f\"Controller found: {dev.name} ({dev.path})\", flush=True)\n                return dev\n\n        time.sleep(1.0)\n\n\ndef init_controller(preferred_path: Optional[str] = None):\n    global controller\n    controller = ControllerInput(preferred_path)\n\n# ---------------------------------------------------------------------------\n# Screen\n# ---------------------------------------------------------------------------\ndef unblank_framebuffer():\n    for p in (\"/sys/class/graphics/fb0/blank\", \"/sys/class/graphics/fb1/blank\"):\n        try:\n            with open(p, \"w\") as f:\n                f.write(\"0\")\n        except Exception:\n            pass\n\ndef clear_screen():\n    unblank_framebuffer()\n    print(\"\\033[2J\\033[H\", end='', flush=True)\n\n# ---------------------------------------------------------------------------\n# UI Primitives\n# ---------------------------------------------------------------------------\ndef show_menu(title: str, options: List[str], selected: int = 0,\n              info: str = \"\", offset: int = 0, visible: int = 20) -> None:\n    clear_screen()\n    print(\"=\" * 72)\n    print(f\"  E K A 2 L 1   C O M M A N D E R  -  {title}\")\n    print(\"=\" * 72)\n    if info:\n        print(f\"\\n{info}\\n\")\n    total = len(options)\n    end = min(offset + visible, total)\n    for i in range(offset, end):\n        marker = \"  > \" if i == selected else \"    \"\n        print(f\"{marker}{options[i]}\")\n    if end < total:\n        print(\"    ...\")\n    print(\"\\n\" + \"-\" * 72)\n    print(\"D-Pad: Navigate | A: Select | B: Back | Select: Quit\")\n    print(\"-\" * 72)\n    sys.stdout.flush()\n\n\ndef select_from_list(title: str, items: List[str], info: str = \"\",\n                     visible: int = 20) -> Optional[int]:\n    if not items:\n        return None\n\n    total = len(items)\n    selected = 0\n    offset = 0\n\n    while True:\n        if selected < offset:\n            offset = selected\n        elif selected >= offset + visible:\n            offset = selected - visible + 1\n\n        offset = max(0, min(offset, max(0, total - visible)))\n        show_menu(title, items, selected, info, offset, visible)\n\n        key = controller.wait_for_input()\n        if key == 'select':\n            raise UserQuit()\n        elif key == 'up':\n            selected = max(0, selected - 1)\n        elif key == 'down':\n            selected = min(total - 1, selected + 1)\n        elif key == 'left':\n            selected = max(0, selected - visible)\n        elif key == 'right':\n            selected = min(total - 1, selected + visible)\n        elif key == 'a':\n            return selected\n        elif key == 'b':\n            raise GoBack()\n\n\ndef ok_dialog(title: str, message: str) -> None:\n    while True:\n        show_menu(title, [\"OK\"], 0, message)\n        key = controller.wait_for_input()\n        if key == 'select':\n            raise UserQuit()\n        if key in ('a', 'b'):\n            return\n\n\ndef confirm_dialog(title: str, message: str, default_yes: bool = True) -> bool:\n    options = [\"Yes\", \"No\"]\n    selected = 0 if default_yes else 1\n\n    while True:\n        show_menu(title, options, selected, message)\n        key = controller.wait_for_input()\n        if key == 'select':\n            raise UserQuit()\n        elif key in ('up', 'down'):\n            selected = 1 - selected\n        elif key == 'a':\n            return selected == 0\n        elif key == 'b':\n            return False\n\n# ---------------------------------------------------------------------------\n# Directory browser\n# ---------------------------------------------------------------------------\ndef choose_directory_interactive(prompt: str, start_dir: str) -> str:\n    current = os.path.abspath(start_dir)\n\n    while True:\n        try:\n            entries = os.listdir(current)\n            subdirs = sorted(\n                d for d in entries\n                if os.path.isdir(os.path.join(current, d)) and not d.startswith('.')\n            )\n        except Exception:\n            subdirs = []\n\n        options: List[str] = [\"[Use This Directory]\"]\n        if current != \"/\":\n            options.append(\"[.. Parent Directory]\")\n        options.extend(subdirs)\n\n        idx = select_from_list(prompt, options, f\"Current: {current}\")\n        if idx is None:\n            raise GoBack()\n\n        selected = options[idx]\n        if selected == \"[Use This Directory]\":\n            return current\n        elif selected == \"[.. Parent Directory]\":\n            parent = os.path.dirname(current)\n            if parent and parent != current:\n                current = parent\n        else:\n            current = os.path.join(current, selected)\n\n# ---------------------------------------------------------------------------\n# Log / run helper\n# ---------------------------------------------------------------------------\ndef log(msg: str):\n    try:\n        with open(EKA_LOG, \"a\") as f:\n            f.write(msg + \"\\n\")\n    except Exception:\n        pass\n\n\ndef run_eka(args: List[str], timeout: int = 120) -> int:\n    cmd = [EKA_EXE] + args\n    log(\"Running: \" + \" \".join(cmd))\n    print(\"\", flush=True)\n\n    try:\n        result = subprocess.run(cmd, cwd=EKA_CONFIG, timeout=timeout)\n        return result.returncode\n    except subprocess.TimeoutExpired:\n        log(\"Process timed out\")\n        return 0\n    except Exception as ex:\n        log(f\"Exception: {ex}\")\n        return 1\n\n\ndef run_eka_capture(args: List[str], timeout: int = 120) -> Tuple[int, str]:\n    cmd = [EKA_EXE] + args\n    log(\"Running (capture): \" + \" \".join(cmd))\n\n    try:\n        result = subprocess.run(\n            cmd,\n            cwd=EKA_CONFIG,\n            timeout=timeout,\n            stdout=subprocess.PIPE,\n            stderr=subprocess.STDOUT,\n            text=True,\n            errors=\"replace\",\n        )\n        output = result.stdout or \"\"\n        if output:\n            log(output.rstrip())\n        return result.returncode, output\n    except subprocess.TimeoutExpired as ex:\n        output = (ex.stdout or \"\") if isinstance(ex.stdout, str) else \"\"\n        if output:\n            log(output.rstrip())\n        log(\"Process timed out\")\n        return 124, output\n    except Exception as ex:\n        log(f\"Exception: {ex}\")\n        return 1, \"\"\n\n\ndef eka_success(ret: int) -> bool:\n    \"\"\"eka2l1 often segfaults (exit -11 / 245) after install - treat as success.\"\"\"\n    return ret in (0, -11, 245)\n\n# ---------------------------------------------------------------------------\n# Device handling\n# ---------------------------------------------------------------------------\ndef parse_listdevices_output(output: str) -> List[Tuple[int, str]]:\n    devices: List[Tuple[int, str]] = []\n    for raw_line in output.splitlines():\n        line = raw_line.strip()\n        match = re.match(r'^(\\d+)\\s*:\\s*(.+)$', line)\n        if match:\n            devices.append((int(match.group(1)), match.group(2).strip()))\n    return devices\n\n\ndef get_current_device_index() -> Optional[int]:\n    if not os.path.exists(EKA_CONFIG_YML):\n        return None\n\n    try:\n        with open(EKA_CONFIG_YML, \"r\", encoding=\"utf-8\") as f:\n            for line in f:\n                match = re.match(r'^\\s*device\\s*:\\s*([0-9]+)\\s*$', line)\n                if match:\n                    return int(match.group(1))\n    except Exception as ex:\n        log(f\"Failed to read config.yml: {ex}\")\n\n    return None\n\n\ndef set_device_index(index: int) -> None:\n    os.makedirs(EKA_CONFIG, exist_ok=True)\n\n    lines: List[str] = []\n    if os.path.exists(EKA_CONFIG_YML):\n        try:\n            with open(EKA_CONFIG_YML, \"r\", encoding=\"utf-8\") as f:\n                lines = f.readlines()\n        except Exception as ex:\n            log(f\"Failed to read existing config.yml: {ex}\")\n            lines = []\n\n    replaced = False\n    new_lines: List[str] = []\n\n    for line in lines:\n        if re.match(r'^\\s*device\\s*:\\s*[0-9]+\\s*$', line):\n            new_lines.append(f\"device: {index}\\n\")\n            replaced = True\n        else:\n            new_lines.append(line)\n\n    if not replaced:\n        if new_lines and not new_lines[-1].endswith(\"\\n\"):\n            new_lines[-1] += \"\\n\"\n        new_lines.append(f\"device: {index}\\n\")\n\n    with open(EKA_CONFIG_YML, \"w\", encoding=\"utf-8\") as f:\n        f.writelines(new_lines)\n\n    log(f\"Set device to {index} in {EKA_CONFIG_YML}\")\n\n\ndef change_device():\n    clear_screen()\n    print(\"Loading device list...\", flush=True)\n\n    ret, output = run_eka_capture([\"--listdevices\"])\n    devices = parse_listdevices_output(output)\n\n    if ret != 0 and not devices:\n        ok_dialog(\"Error\", f\"Could not get device list.\\n\\nSee log: {EKA_LOG}\")\n        return\n\n    if not devices:\n        ok_dialog(\"Error\", \"No devices found.\")\n        return\n\n    current_device = get_current_device_index()\n    options: List[str] = []\n\n    for device_num, device_name in devices:\n        label = f\"{device_num} : {device_name}\"\n        if current_device is not None and device_num == current_device:\n            label += \"  [CURRENT]\"\n        options.append(label)\n\n    info = \"Select device to write into config.yml\"\n\n    try:\n        idx = select_from_list(\"Change Device\", options, info, visible=16)\n    except GoBack:\n        return\n\n    if idx is None:\n        return\n\n    device_num, device_name = devices[idx]\n\n    warning = \"\"\n    if \"Don't Select this Rom\" in device_name or \"brick EKA2L1\" in device_name:\n        warning = \"\\n\\nWARNING:\\nThis device is marked as unsafe in EKA2L1.\"\n\n    if not confirm_dialog(\n        \"Confirm Device\",\n        f\"Set this device?\\n\\n{device_num} : {device_name}{warning}\"\n    ):\n        return\n\n    try:\n        set_device_index(device_num)\n        ok_dialog(\"Done\", f\"Device changed successfully.\\n\\ndevice: {device_num}\")\n    except Exception as ex:\n        log(f\"Failed to write config.yml: {ex}\")\n        ok_dialog(\"Error\", f\"Could not write config.yml\\n\\nSee log: {EKA_LOG}\")\n\n# ---------------------------------------------------------------------------\n# Uppercase-to-lowercase converter for device trees\n# ---------------------------------------------------------------------------\ndef is_within_path(path: str, base: str) -> bool:\n    try:\n        return os.path.commonpath([os.path.abspath(path), os.path.abspath(base)]) == os.path.abspath(base)\n    except Exception:\n        return False\n\n\ndef compute_lowercase_path(path: str) -> str:\n    parent = os.path.dirname(path)\n    base = os.path.basename(path)\n    return os.path.join(parent, base.lower())\n\n\ndef collect_lowercase_rename_ops(root: str) -> Tuple[List[Tuple[str, str]], List[str]]:\n    ops: List[Tuple[str, str]] = []\n    errors: List[str] = []\n\n    for current_root, dirs, files in os.walk(root, topdown=False):\n        for name in sorted(files):\n            if name != name.lower():\n                old_path = os.path.join(current_root, name)\n                new_path = os.path.join(current_root, name.lower())\n                ops.append((old_path, new_path))\n\n        for name in sorted(dirs):\n            if name != name.lower():\n                old_path = os.path.join(current_root, name)\n                new_path = os.path.join(current_root, name.lower())\n                ops.append((old_path, new_path))\n\n    root_base = os.path.basename(root)\n    if root_base and root_base != root_base.lower():\n        ops.append((root, compute_lowercase_path(root)))\n\n    target_to_source: dict = {}\n    for old_path, new_path in ops:\n        if new_path in target_to_source and target_to_source[new_path] != old_path:\n            errors.append(\n                f'Collision: both\\n{target_to_source[new_path]}\\nand\\n{old_path}\\nwould become\\n{new_path}'\n            )\n            continue\n\n        target_to_source[new_path] = old_path\n\n        if os.path.exists(new_path) and os.path.abspath(new_path) != os.path.abspath(old_path):\n            errors.append(f'Collision: target already exists\\n{new_path}')\n\n    return ops, errors\n\n\ndef convert_tree_to_lowercase(root_path):\n    renamed = []\n    errors = []\n\n    root_path = os.path.abspath(root_path)\n    final_root = root_path\n\n    def unique_temp_name(path):\n        base = path + \".__tmp_lowercase__\"\n        candidate = base\n        idx = 1\n        while os.path.exists(candidate):\n            candidate = f\"{base}{idx}\"\n            idx += 1\n        return candidate\n\n    def safe_case_rename(src, dst):\n        if src == dst:\n            return src\n\n        src_abs = os.path.abspath(src)\n        dst_abs = os.path.abspath(dst)\n\n        if src_abs.lower() == dst_abs.lower():\n            tmp = unique_temp_name(src_abs)\n            os.rename(src_abs, tmp)\n            os.rename(tmp, dst_abs)\n            return dst_abs\n\n        if os.path.exists(dst_abs):\n            raise FileExistsError(f\"Target already exists: {dst_abs}\")\n\n        os.rename(src_abs, dst_abs)\n        return dst_abs\n\n    for current_root, dirs, files in os.walk(root_path, topdown=False):\n        for name in files:\n            src = os.path.join(current_root, name)\n            dst = os.path.join(current_root, name.lower())\n\n            if src == dst:\n                continue\n\n            try:\n                new_path = safe_case_rename(src, dst)\n                renamed.append((src, new_path))\n                log(f\"Renamed file: {src} -> {new_path}\")\n            except Exception as ex:\n                errors.append(f\"Failed to rename\\n{src}\\n->\\n{dst}\\n{ex}\")\n                log(f\"ERROR renaming file: {src} -> {dst} ({ex})\")\n\n        for name in dirs:\n            src = os.path.join(current_root, name)\n            dst = os.path.join(current_root, name.lower())\n\n            if src == dst:\n                continue\n\n            try:\n                new_path = safe_case_rename(src, dst)\n                renamed.append((src, new_path))\n                log(f\"Renamed dir: {src} -> {new_path}\")\n            except Exception as ex:\n                errors.append(f\"Failed to rename\\n{src}\\n->\\n{dst}\\n{ex}\")\n                log(f\"ERROR renaming dir: {src} -> {dst} ({ex})\")\n\n    parent = os.path.dirname(root_path)\n    base = os.path.basename(root_path)\n    lower_base = base.lower()\n\n    if base != lower_base:\n        src = root_path\n        dst = os.path.join(parent, lower_base)\n        try:\n            final_root = safe_case_rename(src, dst)\n            renamed.append((src, final_root))\n            log(f\"Renamed root dir: {src} -> {final_root}\")\n        except Exception as ex:\n            errors.append(f\"Failed to rename\\n{src}\\n->\\n{dst}\\n{ex}\")\n            log(f\"ERROR renaming root dir: {src} -> {dst} ({ex})\")\n\n    return renamed, errors, final_root\n\n\ndef convert_device_paths_to_lowercase():\n    start_dir = \"/storage/.config/eka2l1/data\"\n\n    try:\n        target_dir = choose_directory_interactive(\n            \"Lowercase Converter: Select Folder\",\n            start_dir\n        )\n    except GoBack:\n        return\n\n    warning = \"\"\n    abs_target = os.path.abspath(target_dir)\n\n    if abs_target == \"/\":\n        warning = \"\\n\\nWARNING:\\nThis will rename files and folders recursively from the root directory.\"\n    elif abs_target == \"/storage\":\n        warning = \"\\n\\nWARNING:\\nThis will rename the complete contents of /storage recursively.\"\n\n    if not confirm_dialog(\n        \"Confirm Lowercase Conversion\",\n        \"Convert folder names and file names to lowercase recursively?\\n\\n\"\n        f\"Selected folder:\\n{target_dir}{warning}\"\n    ):\n        return\n\n    clear_screen()\n    print(\"Converting names to lowercase...\", flush=True)\n\n    renamed, errors, final_root = convert_tree_to_lowercase(target_dir)\n\n    if errors:\n        preview = \"\\n\\n\".join(errors[:3])\n        more = \"\"\n        if len(errors) > 3:\n            more = f\"\\n\\n... and {len(errors) - 3} more error(s).\"\n        ok_dialog(\n            \"Conversion Result\",\n            f\"Conversion stopped with errors.\\n\\n\"\n            f\"Renamed: {len(renamed)}\\n\"\n            f\"Errors: {len(errors)}\\n\\n\"\n            f\"{preview}{more}\\n\\nSee log: {EKA_LOG}\"\n        )\n        return\n\n    if not renamed:\n        ok_dialog(\n            \"Conversion Result\",\n            f\"Nothing to rename.\\n\\nAll names are already lowercase in:\\n{target_dir}\"\n        )\n        return\n\n    renamed_sorted = sorted(renamed, key=lambda item: item[1].lower())\n    options = [f\"{os.path.basename(new)}  <=  {os.path.basename(old)}\" for old, new in renamed_sorted]\n    selected = 0\n    offset = 0\n    visible = 14\n\n    while True:\n        if selected < offset:\n            offset = selected\n        elif selected >= offset + visible:\n            offset = selected - visible + 1\n\n        offset = max(0, min(offset, max(0, len(options) - visible)))\n        show_menu(\n            \"Lowercase Conversion Result\",\n            options,\n            selected,\n            f\"Converted: {len(renamed)}\\nFinal folder: {final_root}\\n\\nPress A or B to return.\",\n            offset,\n            visible\n        )\n        key = controller.wait_for_input()\n        if key == \"select\":\n            raise UserQuit()\n        elif key == \"up\":\n            selected = max(0, selected - 1)\n        elif key == \"down\":\n            selected = min(len(options) - 1, selected + 1)\n        elif key == \"left\":\n            selected = max(0, selected - visible)\n        elif key == \"right\":\n            selected = min(len(options) - 1, selected + visible)\n        elif key in (\"a\", \"b\"):\n            return\n\n# ---------------------------------------------------------------------------\n# Mode 1: Install firmware\n# ---------------------------------------------------------------------------\ndef install_firmware():\n    try:\n        bios_dir = choose_directory_interactive(\n            \"Firmware: Select Directory\", EKA_BIOS_DIR)\n    except GoBack:\n        return\n\n    rpkg_files = sorted(glob.glob(os.path.join(bios_dir, \"*.rpkg\")) +\n                        glob.glob(os.path.join(bios_dir, \"*.RPKG\")))\n    rom_files = sorted(glob.glob(os.path.join(bios_dir, \"*.rom\")) +\n                       glob.glob(os.path.join(bios_dir, \"*.ROM\")))\n\n    if not rpkg_files:\n        ok_dialog(\"Error\", f\"No .rpkg file found in:\\n{bios_dir}\")\n        return\n    if not rom_files:\n        ok_dialog(\"Error\", f\"No .rom file found in:\\n{bios_dir}\")\n        return\n\n    rpkg = rpkg_files[0]\n    if len(rpkg_files) > 1:\n        try:\n            idx = select_from_list(\"Select RPKG\", [os.path.basename(f) for f in rpkg_files])\n            if idx is None:\n                return\n            rpkg = rpkg_files[idx]\n        except GoBack:\n            return\n\n    rom = rom_files[0]\n    if len(rom_files) > 1:\n        try:\n            idx = select_from_list(\"Select ROM\", [os.path.basename(f) for f in rom_files])\n            if idx is None:\n                return\n            rom = rom_files[idx]\n        except GoBack:\n            return\n\n    info = (\n        f\"RPKG: {os.path.basename(rpkg)}\\n\"\n        f\"ROM:  {os.path.basename(rom)}\\n\\n\"\n        f\"Install firmware?\"\n    )\n    if not confirm_dialog(\"Install Firmware\", info):\n        return\n\n    seed_dir = os.path.join(EKA_CONFIG, \"data\", \"roms\", \"rm-409\")\n    os.makedirs(seed_dir, exist_ok=True)\n    try:\n        shutil.copy2(rom, os.path.join(seed_dir, os.path.basename(rom)))\n    except Exception:\n        pass\n\n    clear_screen()\n    print(\"Installing firmware...\", flush=True)\n    print(f\"  {os.path.basename(rpkg)}\", flush=True)\n    print(f\"  {os.path.basename(rom)}\", flush=True)\n    print(\"\\nThis may take a few minutes...\", flush=True)\n\n    ret = run_eka([\"--installdevice\", rpkg, rom])\n\n    if eka_success(ret):\n        ok_dialog(\"Done\", \"Firmware installed successfully!\\n\\n(Non-zero exit after install is normal)\")\n    else:\n        ok_dialog(\"Error\", f\"Installation failed (code {ret})\\n\\nSee log: {EKA_LOG}\")\n\n# ---------------------------------------------------------------------------\n# Mode 2: Install SIS games\n# ---------------------------------------------------------------------------\ndef find_sis_files_recursive(root_dir: str) -> List[str]:\n    sis_files: List[str] = []\n    valid_exts = (\".sis\", \".sisx\")\n    for current_root, _, files in os.walk(root_dir):\n        for name in files:\n            if name.lower().endswith(valid_exts):\n                sis_files.append(os.path.join(current_root, name))\n    return sorted(sis_files, key=lambda p: p.lower())\n\n\ndef get_relative_path(path: str, base: str) -> str:\n    try:\n        rel = os.path.relpath(path, base)\n        return rel.replace(\"\\\\\", \"/\")\n    except Exception:\n        return os.path.basename(path)\n\n\ndef parse_listapp_to_map(output: str) -> dict:\n    app_map = {}\n    for name, uid in parse_listapp_output(output):\n        app_map[uid.lower()] = name.strip()\n    return app_map\n\n\ndef get_installed_apps_map() -> dict:\n    ret, output = run_eka_capture([\"--listapp\"])\n    if ret != 0 and not output.strip():\n        return {}\n    return parse_listapp_to_map(output)\n\n\ndef find_new_app_after_install(before_apps: dict, after_apps: dict) -> Optional[Tuple[str, str]]:\n    new_uids = [uid for uid in after_apps if uid not in before_apps]\n    if len(new_uids) == 1:\n        uid = new_uids[0]\n        return after_apps[uid], uid\n\n    candidates = []\n    for uid in new_uids:\n        name = after_apps[uid]\n        if not is_system_app(name):\n            candidates.append((name, uid))\n\n    if len(candidates) == 1:\n        return candidates[0]\n\n    if candidates:\n        return candidates[0]\n\n    return None\n\n\ndef find_graphic_in_same_folder(folder: str) -> Optional[str]:\n    exts = (\".png\", \".jpg\", \".jpeg\", \".bmp\", \".gif\", \".webp\")\n    candidates = []\n\n    try:\n        for name in os.listdir(folder):\n            full = os.path.join(folder, name)\n            if os.path.isfile(full) and name.lower().endswith(exts):\n                candidates.append(full)\n    except Exception:\n        return None\n\n    if not candidates:\n        return None\n\n    return sorted(candidates, key=lambda p: os.path.basename(p).lower())[0]\n\n\ndef copy_matching_image_for_uid(source_folder: str, app_name: str, uid_output_dir: str) -> Optional[str]:\n    image_src = find_graphic_in_same_folder(source_folder)\n    if not image_src:\n        return None\n\n    os.makedirs(uid_output_dir, exist_ok=True)\n\n    safe_name = sanitize_uid_name(app_name)\n    ext = os.path.splitext(image_src)[1].lower()\n    target_name = f\"{safe_name}{ext}\"\n    target_path = os.path.join(uid_output_dir, target_name)\n\n    try:\n        shutil.copy2(image_src, target_path)\n        log(f\"Copied artwork: {image_src} -> {target_path}\")\n        return target_name\n    except Exception as ex:\n        log(f\"Failed to copy artwork {image_src} -> {target_path}: {ex}\")\n        return None\n\n\ndef install_sis():\n    try:\n        sis_dir = choose_directory_interactive(\n            \"SIS/SISX: Select Directory\", EKA_ROMS_DIR)\n    except GoBack:\n        return\n\n    sis_files = find_sis_files_recursive(sis_dir)\n\n    if not sis_files:\n        ok_dialog(\"Error\", f\"No .sis or .sisx files found in:\\n{sis_dir}\")\n        return\n\n    image_out_dir = os.path.join(sis_dir, \"media\", \"images\")\n\n    try:\n        mode_idx = select_from_list(\n            \"SIS/SISX Installer Mode\",\n            [\n                \"Install all SIS/SISX files (recursive)\",\n                \"Select SIS/SISX files individually (recursive)\",\n            ],\n            f\"{len(sis_files)} file(s) found recursively in:\\n{sis_dir}\"\n        )\n    except GoBack:\n        return\n\n    if mode_idx is None:\n        return\n\n    selected_files = []\n\n    if mode_idx == 0:\n        if not confirm_dialog(\n            \"Install All\",\n            f\"Install all {len(sis_files)} SIS/SISX files recursively?\\n\\nDirectory:\\n{sis_dir}\"\n        ):\n            return\n        selected_files = sis_files\n    else:\n        sis_options = [get_relative_path(f, sis_dir) for f in sis_files]\n\n        try:\n            selected_indexes = select_multiple_from_list(\n                \"Select SIS/SISX Files\",\n                sis_options,\n                f\"Directory:\\n{sis_dir}\\n\\nToggle files with A, press Y to install.\",\n                visible=14\n            )\n        except GoBack:\n            return\n\n        if not selected_indexes:\n            ok_dialog(\"SIS/SISX Installer\", \"No SIS/SISX files selected.\")\n            return\n\n        selected_files = [sis_files[i] for i in selected_indexes]\n\n        if not confirm_dialog(\n            \"Install Selected\",\n            f\"Install {len(selected_files)} selected SIS/SISX file(s)?\"\n        ):\n            return\n\n    success = 0\n    fail = 0\n    failed_files = []\n    artwork_copied = 0\n    artwork_failed = 0\n\n    for pos, sis_file in enumerate(selected_files, start=1):\n        clear_screen()\n        rel_name = get_relative_path(sis_file, sis_dir)\n        print(f\"Installing {pos}/{len(selected_files)}:\")\n        print(f\"  {rel_name}\")\n\n        before_apps = get_installed_apps_map()\n        ret = run_eka([\"--install\", sis_file])\n        after_apps = get_installed_apps_map()\n\n        if eka_success(ret):\n            success += 1\n            log(f\"SIS/SISX installed successfully: {sis_file}\")\n\n            new_app = find_new_app_after_install(before_apps, after_apps)\n            if new_app:\n                app_name, uid = new_app\n                copied_name = copy_matching_image_for_uid(\n                    os.path.dirname(sis_file),\n                    app_name,\n                    image_out_dir\n                )\n                if copied_name:\n                    artwork_copied += 1\n                    log(f\"Matched artwork for app '{app_name}' ({uid}): {copied_name}\")\n                else:\n                    artwork_failed += 1\n                    log(f\"No artwork copied for app '{app_name}' ({uid}) from folder {os.path.dirname(sis_file)}\")\n            else:\n                artwork_failed += 1\n                log(f\"Could not determine new app UID/name after install: {sis_file}\")\n        else:\n            fail += 1\n            failed_files.append(rel_name)\n            log(f\"SIS/SISX install failed ({ret}): {sis_file}\")\n\n    if fail == 0:\n        ok_dialog(\n            \"Done\",\n            f\"Installation completed successfully.\\n\\n\"\n            f\"Installed: {success}\\n\"\n            f\"Failed: {fail}\\n\"\n            f\"Artwork copied: {artwork_copied}\\n\"\n            f\"Artwork unresolved: {artwork_failed}\\n\\n\"\n            f\"Artwork target:\\n{image_out_dir}\"\n        )\n    else:\n        preview = \"\\n\".join(failed_files[:8])\n        more = \"\"\n        if len(failed_files) > 8:\n            more = f\"\\n... and {len(failed_files) - 8} more\"\n\n        ok_dialog(\n            \"Installation Result\",\n            f\"Completed.\\n\\n\"\n            f\"Installed: {success}\\n\"\n            f\"Failed: {fail}\\n\"\n            f\"Artwork copied: {artwork_copied}\\n\"\n            f\"Artwork unresolved: {artwork_failed}\\n\\n\"\n            f\"Failed files:\\n{preview}{more}\\n\\nSee log:\\n{EKA_LOG}\"\n        )\n\n# ---------------------------------------------------------------------------\n# UID launcher creator\n# ---------------------------------------------------------------------------\ndef parse_listapp_output(output: str) -> List[Tuple[str, str]]:\n    apps: List[Tuple[str, str]] = []\n    for raw_line in output.splitlines():\n        line = raw_line.strip()\n        match = re.match(r'^\\d+\\s*:\\s*(.*?)\\s*\\(UID:\\s*(0x[0-9a-fA-F]+)\\)\\s*$', line)\n        if match:\n            name = match.group(1).strip()\n            uid = match.group(2).strip().lower()\n            apps.append((name, uid))\n    return apps\n\n\ndef sanitize_uid_name(name: str) -> str:\n    name = re.sub(r'[\\\\/:*?\"<>|]', '_', name)\n    name = name.replace(\"'\", \"_\")\n    name = re.sub(r'\\s+', ' ', name).strip()\n    while name.startswith('.'):\n        name = '_' + name[1:]\n    if not name:\n        name = 'unnamed'\n    return name\n\n\ndef is_system_app(name: str) -> bool:\n    name_lc = name.lower().strip()\n    system_names = {\n        '', 'installer', 'applications', 'help', 'screensaver', 'telephone', 'app. manager',\n        'messaging', 'recorder', 'multimedia', 'settings', 'call divert', 'sysap', 'startup',\n        'voice mailbox', 'profiles', 'to-do', 'calendar', 'calculator', 'clock', 'notes',\n        'speed dial', 'favourites', 'bluetooth', 'ussd', 'composer', 'fixed dialling',\n        'autolock', 'save certificate', 'info message', 'bounce', 'about product',\n        'services', 'pushviewer', 'download', 'realone player', 'screen shot',\n        'memory card', 'converter', 'videoui', 'contacts', 'images', 'menu',\n        'cell broadcast', 'log', 'e-mail', 'sim services', 'service nos.',\n        'sim directory', 'radio', 'music player', 'unlockmmc'\n    }\n    return name_lc in system_names\n\n\ndef build_uid_candidates(apps: List[Tuple[str, str]]) -> Tuple[List[Tuple[str, str]], int, int, int]:\n    candidates: List[Tuple[str, str]] = []\n    seen_uids = set()\n    skipped_system = 0\n    skipped_blank = 0\n    skipped_dup = 0\n\n    for name, uid in apps:\n        name = name.strip()\n        uid = uid.strip().lower()\n\n        if not name:\n            skipped_blank += 1\n            continue\n        if uid in seen_uids:\n            skipped_dup += 1\n            continue\n        if is_system_app(name):\n            seen_uids.add(uid)\n            skipped_system += 1\n            continue\n\n        seen_uids.add(uid)\n        candidates.append((name, uid))\n\n    return candidates, skipped_system, skipped_blank, skipped_dup\n\n\ndef show_multi_select_menu(title: str, options: List[str], checked: set, selected: int = 0,\n                           info: str = \"\", offset: int = 0, visible: int = 16) -> None:\n    clear_screen()\n    print(\"=\" * 72)\n    print(f\"  E K A 2 L 1   I N S T A L L E R  -  {title}\")\n    print(\"=\" * 72)\n    if info:\n        print(f\"\\n{info}\\n\")\n    total = len(options)\n    end = min(offset + visible, total)\n    for i in range(offset, end):\n        cursor = \"  > \" if i == selected else \"    \"\n        mark = \"[x]\" if i in checked else \"[ ]\"\n        print(f\"{cursor}{mark} {options[i]}\")\n    if end < total:\n        print(\"    ...\")\n    print(\"\\n\" + \"-\" * 72)\n    print(\"D-Pad: Navigate | A: Toggle | Y: Create Selected | B: Back | Select: Quit\")\n    print(\"-\" * 72)\n    sys.stdout.flush()\n\n\ndef select_multiple_from_list(title: str, items: List[str], info: str = \"\",\n                              visible: int = 16) -> Optional[List[int]]:\n    if not items:\n        return []\n\n    total = len(items)\n    selected = 0\n    offset = 0\n    checked = set()\n\n    while True:\n        if selected < offset:\n            offset = selected\n        elif selected >= offset + visible:\n            offset = selected - visible + 1\n\n        offset = max(0, min(offset, max(0, total - visible)))\n        show_multi_select_menu(title, items, checked, selected, info, offset, visible)\n\n        key = controller.wait_for_input()\n        if key == 'select':\n            raise UserQuit()\n        elif key == 'up':\n            selected = max(0, selected - 1)\n        elif key == 'down':\n            selected = min(total - 1, selected + 1)\n        elif key == 'left':\n            selected = max(0, selected - visible)\n        elif key == 'right':\n            selected = min(total - 1, selected + visible)\n        elif key == 'a':\n            if selected in checked:\n                checked.remove(selected)\n            else:\n                checked.add(selected)\n        elif key == 'y':\n            return sorted(checked)\n        elif key == 'b':\n            raise GoBack()\n\n\ndef show_available_uid_apps(candidates: List[Tuple[str, str]]) -> None:\n    if not candidates:\n        ok_dialog('Available Apps', 'No launchable non-system apps found.')\n        return\n\n    options = [f'{name} ({uid})' for name, uid in candidates]\n    selected = 0\n    offset = 0\n    visible = 14\n\n    while True:\n        if selected < offset:\n            offset = selected\n        elif selected >= offset + visible:\n            offset = selected - visible + 1\n\n        offset = max(0, min(offset, max(0, len(options) - visible)))\n        show_menu(\n            'Available Apps',\n            options,\n            selected,\n            f'Available launchable apps: {len(candidates)}\\n\\nPress A to continue or B to go back.',\n            offset,\n            visible\n        )\n\n        key = controller.wait_for_input()\n        if key == 'select':\n            raise UserQuit()\n        elif key == 'up':\n            selected = max(0, selected - 1)\n        elif key == 'down':\n            selected = min(len(options) - 1, selected + 1)\n        elif key == 'left':\n            selected = max(0, selected - visible)\n        elif key == 'right':\n            selected = min(len(options) - 1, selected + visible)\n        elif key == 'a':\n            return\n        elif key == 'b':\n            raise GoBack()\n\n\ndef show_generated_uid_list(created_entries: List[Tuple[str, str, str]], out_dir: str) -> None:\n    if not created_entries:\n        ok_dialog('Generated UID Files', f'No UID files were created.\\n\\nOutput: {out_dir}')\n        return\n\n    options = [f\"{name} -> {uid} [{filename}]\" for name, uid, filename in created_entries]\n    selected = 0\n    offset = 0\n    visible = 14\n\n    while True:\n        if selected < offset:\n            offset = selected\n        elif selected >= offset + visible:\n            offset = selected - visible + 1\n\n        offset = max(0, min(offset, max(0, len(options) - visible)))\n        show_menu(\n            'Generated UID Files',\n            options,\n            selected,\n            f'Output: {out_dir}\\nCreated: {len(created_entries)}\\n\\nPress A or B to return.',\n            offset,\n            visible\n        )\n\n        key = controller.wait_for_input()\n        if key == 'select':\n            raise UserQuit()\n        elif key == 'up':\n            selected = max(0, selected - 1)\n        elif key == 'down':\n            selected = min(len(options) - 1, selected + 1)\n        elif key == 'left':\n            selected = max(0, selected - visible)\n        elif key == 'right':\n            selected = min(len(options) - 1, selected + visible)\n        elif key in ('a', 'b'):\n            return\n\n\ndef write_uid_files(selected_apps: List[Tuple[str, str]], out_dir: str) -> List[Tuple[str, str, str]]:\n    created_entries: List[Tuple[str, str, str]] = []\n    os.makedirs(out_dir, exist_ok=True)\n\n    for name, uid in selected_apps:\n        safe_name = sanitize_uid_name(name)\n        target = os.path.join(out_dir, f'{safe_name}.uid')\n        if os.path.exists(target):\n            target = os.path.join(out_dir, f'{safe_name}_{uid}.uid')\n\n        try:\n            with open(target, 'w', encoding='utf-8') as f:\n                f.write(uid + '\\n')\n            log(f'Created UID launcher: {target} -> {uid}')\n            created_entries.append((name, uid, os.path.basename(target)))\n        except Exception as ex:\n            log(f'Failed to create UID launcher {target}: {ex}')\n\n    return created_entries\n\n\ndef xml_escape(text: str) -> str:\n    return (text.replace(\"&\", \"&amp;\")\n                .replace(\"<\", \"&lt;\")\n                .replace(\">\", \"&gt;\")\n                .replace('\"', \"&quot;\")\n                .replace(\"'\", \"&apos;\"))\n\n\ndef create_uid_gamelist():\n    try:\n        uid_dir = choose_directory_interactive(\n            \"Gamelist: Select UID Directory\", EKA_ROMS_DIR)\n    except GoBack:\n        return\n\n    uid_files = sorted(glob.glob(os.path.join(uid_dir, \"*.uid\")) +\n                       glob.glob(os.path.join(uid_dir, \"*.UID\")))\n\n    if not uid_files:\n        ok_dialog(\"Error\", f\"No .uid files found in:\\n{uid_dir}\")\n        return\n\n    out_file = os.path.join(uid_dir, \"gamelist.xml\")\n    image_dir = os.path.join(uid_dir, \"media\", \"images\")\n\n    if os.path.exists(out_file):\n        if not confirm_dialog(\n            \"Overwrite?\",\n            f\"gamelist.xml already exists in:\\n{uid_dir}\\n\\nOverwrite it?\"\n        ):\n            return\n\n    lines = ['<?xml version=\"1.0\"?>', '<gameList>']\n\n    for uid_file in uid_files:\n        base = os.path.basename(uid_file)\n        name = os.path.splitext(base)[0]\n\n        image_tag = \"./media/images/ngage.png\"\n        for ext in (\".png\", \".jpg\", \".jpeg\", \".bmp\", \".gif\", \".webp\"):\n            candidate = os.path.join(image_dir, name + ext)\n            if os.path.exists(candidate):\n                image_tag = f\"./media/images/{xml_escape(name + ext)}\"\n                break\n\n        lines.append('\\t<game>')\n        lines.append(f'\\t\\t<path>./{xml_escape(base)}</path>')\n        lines.append(f'\\t\\t<name>{xml_escape(name)}</name>')\n        lines.append(f'\\t\\t<desc>{xml_escape(name)}</desc>')\n        lines.append(f'\\t\\t<image>{image_tag}</image>')\n        lines.append('\\t\\t<video>./media/videos/ngage.mp4</video>')\n        lines.append('\\t</game>')\n\n    lines.append('</gameList>')\n\n    try:\n        with open(out_file, \"w\", encoding=\"utf-8\", newline=\"\\n\") as f:\n            f.write(\"\\n\".join(lines) + \"\\n\")\n    except Exception as ex:\n        log(f\"Failed to write gamelist.xml {out_file}: {ex}\")\n        ok_dialog(\"Error\", f\"Failed to write gamelist.xml:\\n{ex}\")\n        return\n\n    ok_dialog(\n        \"Done\",\n        f\"gamelist.xml created successfully.\\n\\n\"\n        f\"UID files: {len(uid_files)}\\n\"\n        f\"Output:\\n{out_file}\"\n    )\n\n\ndef create_uid_launchers():\n    try:\n        out_dir = choose_directory_interactive(\n            'UID Creator: Select Output Directory', '/storage/roms')\n    except GoBack:\n        return\n\n    clear_screen()\n    print('Loading installed app list...', flush=True)\n\n    ret, output = run_eka_capture(['--listapp'])\n    apps = parse_listapp_output(output)\n\n    if ret != 0 and not apps:\n        ok_dialog('Error', f'Could not get app list.\\n\\nSee log: {EKA_LOG}')\n        return\n\n    if not apps:\n        ok_dialog('Error', 'No installed apps found.')\n        return\n\n    candidates, skipped_system, skipped_blank, skipped_dup = build_uid_candidates(apps)\n    candidates = sorted(candidates, key=lambda item: (item[0].lower(), item[1]))\n\n    if not candidates:\n        ok_dialog('Error', 'No launchable non-system apps found.')\n        return\n\n    try:\n        show_available_uid_apps(candidates)\n        mode_idx = select_from_list(\n            'UID Creator Mode',\n            ['Create all UID launcher files', 'Select apps individually'],\n            f'Output: {out_dir}\\n\\nAvailable apps: {len(candidates)}'\n        )\n    except GoBack:\n        return\n\n    if mode_idx is None:\n        return\n\n    selected_apps: List[Tuple[str, str]] = []\n\n    if mode_idx == 0:\n        if not confirm_dialog(\n            'Create All UID Files',\n            f'Create {len(candidates)} UID launcher files in:\\n\\n{out_dir}'\n        ):\n            return\n        selected_apps = candidates\n    else:\n        app_options = [f'{name} ({uid})' for name, uid in candidates]\n        try:\n            selected_indexes = select_multiple_from_list(\n                'Select Apps For UID',\n                app_options,\n                f'Output: {out_dir}\\n\\nToggle apps with A, then press Y to create.',\n                visible=14\n            )\n        except GoBack:\n            return\n\n        if not selected_indexes:\n            ok_dialog('UID Creator', 'No apps selected.')\n            return\n\n        selected_apps = [candidates[i] for i in selected_indexes]\n\n        if not confirm_dialog(\n            'Create Selected UID Files',\n            f'Create {len(selected_apps)} selected UID launcher files in:\\n\\n{out_dir}'\n        ):\n            return\n\n    created_entries = write_uid_files(selected_apps, out_dir)\n\n    ok_dialog(\n        'Done',\n        f'UID launcher creation finished.\\n\\n'\n        f'Output: {out_dir}\\n\\n'\n        f'Requested: {len(selected_apps)}\\n'\n        f'Created: {len(created_entries)}\\n'\n        f'Skipped system apps: {skipped_system}\\n'\n        f'Skipped blank names: {skipped_blank}\\n'\n        f'Skipped duplicate UIDs: {skipped_dup}'\n    )\n\n    show_generated_uid_list(created_entries, out_dir)\n\n# ---------------------------------------------------------------------------\n# Main\n# ---------------------------------------------------------------------------\nDEFAULT_CONFIG_YML = \"\"\"bkg-path: \"\"\nfont: \"\"\nlog-read: false\nlog-write: false\nlog-ipc: false\nlog-svc: false\nlog-passed: false\nlog-exports: false\ncpu: dynarmic\ndevice: 0\nlanguage: 1\nemulator-language: -1\nenable-gdb-stub: false\ndata-storage: data\ngdb-port: 24689\ninternet-bluetooth-port: 35689\nenable-srv-rights: true\nenable-srv-sa: true\nenable-srv-drm: true\nfbs-enable-compression-queue: false\nenable-btrace: false\nstop-warn-touchscreen-disabled: false\ndump-imb-range-code: false\nhide-mouse-in-screen-space: false\nenable-nearest-neighbor-filter: true\ninteger-scaling: true\ncpu-load-save: true\nmime-detection: true\nrtos-level: \"\"\nui-new-style: true\nsvg-icon-cache-reset: true\nimei: 540806859904945\nmmc-id: 00000000-00000000-00000000-00000000\naudio-master-volume: 100\ncurrent-keybind-profile: default\nscreen-buffer-sync: preferred\nreport-mmfdev-underflow: false\ndisable-display-content-scale: false\ndevice-display-name: EKA2L1\nmidi-backend: tsf\nhsb-bank-path: resources/defaultbank.hsb\nsf2-bank-path: resources/defaultbank.sf2\nbt-central-server-url: btnetplay.12z1.com\nbackground-image: \"\"\nbackground-image-opacity: 255\nenable-hw-gles1: true\nlog-filter: \"*:trace\"\nhide-system-apps: true\nbtnet-port-offset: 15000\nbtnet-password: \"\"\nbtnet-discovery-mode: 0\nenable-upnp: true\nextensive-logging: false\ninternet-bluetooth-friends:\n  []\n\"\"\"\n\n\ndef _create_default_config():\n    cfg_path = os.path.join(EKA_CONFIG, \"config.yml\")\n    if not os.path.exists(cfg_path):\n        try:\n            with open(cfg_path, \"w\") as f:\n                f.write(DEFAULT_CONFIG_YML)\n            log(\"Created default config.yml\")\n            return True\n        except Exception as ex:\n            log(f\"Failed to create config.yml: {ex}\")\n    return False\n\n\ndef _seed_bundled_files():\n    install_dir = \"/usr/bin/eka2l1\"\n    if not os.path.isdir(install_dir):\n        ok_dialog(\"Error\", f\"eka2l1 install directory not found:\\n{install_dir}\")\n        return\n\n    clear_screen()\n    print(\"Seeding bundled data...\", flush=True)\n    seeded = []\n\n    for item in os.listdir(install_dir):\n        src = os.path.join(install_dir, item)\n        dst = os.path.join(EKA_CONFIG, item)\n        if not os.path.exists(dst):\n            try:\n                if os.path.isdir(src):\n                    shutil.copytree(src, dst)\n                else:\n                    shutil.copy2(src, dst)\n                seeded.append(item)\n                log(f\"Seeded: {item}\")\n                print(f\"  {item}\", flush=True)\n            except Exception as ex:\n                log(f\"Seed failed for {item}: {ex}\")\n\n    cfg_created = _create_default_config()\n    if cfg_created:\n        seeded.append(\"config.yml (default)\")\n        print(\"  config.yml (default)\", flush=True)\n\n    if seeded:\n        ok_dialog(\"Seed Bundled Files\", f\"Done!\\n\\nCopied {len(seeded)} item(s) into:\\n{EKA_CONFIG}\\n\\nYou can now install firmware and games.\")\n    else:\n        ok_dialog(\"Seed Bundled Files\", \"Nothing to seed - all files already present.\")\n\n\ndef _autoset_device_from_zdrive():\n    devices_yml = os.path.join(EKA_CONFIG, \"data\", \"devices.yml\")\n    z_drives_dir = os.path.join(EKA_CONFIG, \"data\", \"drives\", \"z\")\n    cfg_path = os.path.join(EKA_CONFIG, \"config.yml\")\n\n    if not os.path.isfile(devices_yml) or not os.path.isdir(z_drives_dir):\n        return\n\n    device_keys = []\n    try:\n        with open(devices_yml, \"r\") as f:\n            for line in f:\n                stripped = line.rstrip()\n                if stripped and not stripped.startswith(\" \") and stripped.endswith(\":\"):\n                    device_keys.append(stripped[:-1])\n    except Exception as ex:\n        log(f\"_autoset_device_from_zdrive: could not read devices.yml: {ex}\")\n        return\n\n    available_z = {\n        d.lower(): d for d in os.listdir(z_drives_dir)\n        if os.path.isdir(os.path.join(z_drives_dir, d))\n    }\n\n    match_index = None\n    for i, key in enumerate(device_keys):\n        if key.lower() in available_z:\n            match_index = i\n            log(f\"_autoset_device_from_zdrive: matched device {key} at index {i}\")\n            break\n\n    if match_index is None:\n        log(\"_autoset_device_from_zdrive: no matching Z-drive found\")\n        return\n\n    if not os.path.isfile(cfg_path):\n        _create_default_config()\n\n    try:\n        with open(cfg_path, \"r\") as f:\n            lines = f.readlines()\n\n        new_lines = []\n        for line in lines:\n            if line.startswith(\"device:\"):\n                new_lines.append(f\"device: {match_index}\\n\")\n            else:\n                new_lines.append(line)\n\n        with open(cfg_path, \"w\") as f:\n            f.writelines(new_lines)\n\n        log(f\"_autoset_device_from_zdrive: set device: {match_index}\")\n    except Exception as ex:\n        log(f\"_autoset_device_from_zdrive: failed to update config.yml: {ex}\")\n\n\ndef _import_preconfigured():\n    try:\n        src_dir = choose_directory_interactive(\n            \"Select source directory (must contain a 'data' folder)\",\n            \"/storage/roms/bios/eka2l1\"\n        )\n    except GoBack:\n        return\n\n    data_src = os.path.join(src_dir, \"data\")\n    if not os.path.isdir(data_src):\n        ok_dialog(\"Error\", f\"No 'data' folder found in:\\n{src_dir}\\n\\nPlease select a directory that contains a pre-configured eka2l1 'data' folder.\")\n        return\n\n    data_dst = os.path.join(EKA_CONFIG, \"data\")\n    os.makedirs(data_dst, exist_ok=True)\n\n    clear_screen()\n    print(f\"Importing data from:\\n  {data_src}\", flush=True)\n    print(\"Only adding new files - existing files will not be overwritten.\", flush=True)\n    log(f\"Importing pre-configured data from: {data_src}\")\n\n    added = 0\n    skipped = 0\n\n    for root, dirs, files in os.walk(data_src):\n        rel = os.path.relpath(root, data_src)\n        dst_root = os.path.join(data_dst, rel) if rel != \".\" else data_dst\n        os.makedirs(dst_root, exist_ok=True)\n\n        for fname in files:\n            src_file = os.path.join(root, fname)\n            dst_file = os.path.join(dst_root, fname)\n\n            if fname == \"devices.yml\" and os.path.exists(dst_file):\n                backup = dst_file + \".bak\"\n                try:\n                    shutil.copy2(dst_file, backup)\n                    shutil.copy2(src_file, dst_file)\n                    log(f\"Overwritten with backup: {dst_file}\")\n                    added += 1\n                except Exception as ex:\n                    log(f\"Failed to overwrite devices.yml: {ex}\")\n                    skipped += 1\n                continue\n\n            if not os.path.exists(dst_file):\n                try:\n                    shutil.copy2(src_file, dst_file)\n                    log(f\"Added: {dst_file}\")\n                    added += 1\n                except Exception as ex:\n                    log(f\"Failed to copy {src_file}: {ex}\")\n                    skipped += 1\n            else:\n                skipped += 1\n\n    _autoset_device_from_zdrive()\n\n    ok_dialog(\"Import Complete\",\n              f\"Import finished!\\n\\n\"\n              f\"Added: {added} file(s)\\n\"\n              f\"Skipped (already exist): {skipped} file(s)\\n\\n\"\n              f\"devices.yml overwritten (backup: devices.yml.bak)\\n\"\n              f\"Device index auto-set to match available firmware.\")\n\n\ndef first_run_setup():\n    _seed_bundled_files()\n\n\ndef main():\n    preferred = sys.argv[1] if len(sys.argv) > 1 else None\n    init_controller(preferred)\n\n    os.makedirs(EKA_CONFIG, exist_ok=True)\n\n    try:\n        with open(EKA_LOG, \"w\") as f:\n            f.write(\"EmuELEC eka2l1 Commander Log\\n\")\n    except Exception:\n        pass\n\n    clear_screen()\n    print(\"Starting eka2l1 Commander...\", flush=True)\n    time.sleep(0.5)\n\n    try:\n        while True:\n            try:\n                idx = select_from_list(\n                    \"Main Menu\",\n                    [\n                        \"[ RUN THIS FIRST ! ] : Setup eka2l1 (copy needed files to EmuELEC)\",\n                        \"Import pre-configured devices-collection\",\n                        \"Install firmware (.rpkg + .rom)\",\n                        \"Install games and apps (.sis/.sisx)\",\n                        \"Create UID launcher-files from installed games and apps (.uid)\",\n                        \"Create gamelist.xml from .uid launcher-files\",\n                        \"Show / change current device\",\n                        \"Convert uppercase device paths and files to lowercase\",\n                        \"Exit\",\n                    ],\n                    \"What would you like to do?\"\n                )\n\n                if idx is None or idx == 8:\n                    break\n                if idx == 0:\n                    try:\n                        first_run_setup()\n                    except GoBack:\n                        continue\n                elif idx == 1:\n                    try:\n                        _import_preconfigured()\n                    except GoBack:\n                        continue\n                elif idx == 2:\n                    try:\n                        install_firmware()\n                    except GoBack:\n                        continue\n                elif idx == 3:\n                    try:\n                        install_sis()\n                    except GoBack:\n                        continue\n                elif idx == 4:\n                    try:\n                        create_uid_launchers()\n                    except GoBack:\n                        continue\n                elif idx == 5:\n                    try:\n                        create_uid_gamelist()\n                    except GoBack:\n                        continue\n                elif idx == 6:\n                    try:\n                        change_device()\n                    except GoBack:\n                        continue\n                elif idx == 7:\n                    try:\n                        convert_device_paths_to_lowercase()\n                    except GoBack:\n                        continue\n            except GoBack:\n                continue\n\n    except UserQuit:\n        pass\n    except KeyboardInterrupt:\n        pass\n    finally:\n        clear_screen()\n        print(\"Exiting eka2l1 Commander...\", flush=True)\n        time.sleep(0.5)\n        if controller:\n            controller.close()\n\n\nif __name__ == \"__main__\":\n    main()"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/Skyscraper.start",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nee_console enable\n\nwhile pgrep -f emulationstation; do\n    clear /dev/tty0\n    echo \"Waiting for Emulationstation to quit\" > /dev/tty0\n    sleep 1\ndone\n\nsource /usr/bin/env.sh\nsource \"$scriptdir/scriptmodules/supplementary/skyscraper.sh\"\nrp_registerAllModules\n\njoy2keyStart\nromdir=\"/storage/roms/\" \ngui_skyscraper\nee_console disable\nsystemctl start emustation\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/btconnect.sh",
    "content": "#!/bin/bash\n# Bluetooth connect: ES overlays, audio devices only\nset -euo pipefail\n. /etc/profile\n\nLOG=\"/tmp/btconnect.log\"\nRESTART=1\n[ \"${NO_ES_RESTART:-}\" = \"1\" ] && RESTART=0\nif [ \"${1:-}\" = \"--no-restart\" ]; then RESTART=0; shift; fi\n\noverlay_yes() {\n  ee_console disable\n  text_viewer -y -w -t \"$1\" -f 24 -m \"$2\"\n  rc=$?; rm -f /tmp/display\n  [ \"$rc\" -eq 21 ] || [ \"$rc\" -eq 0 ]\n}\noverlay_msg() { ee_console disable; text_viewer -w -t \"$1\" -f 24 -m \"$2\"; rm -f /tmp/display; }\noverlay_err() { ee_console disable; text_viewer -e -w -t \"$1\" -f 24 -m \"$2\"; rm -f /tmp/display; }\n\nis_audio_mac() {\n  local mac=\"$1\" info\n  info=\"$(bluetoothctl info \"$mac\" 2>/dev/null || true)\"\n  echo \"$info\" | grep -qiE 'Icon:\\s*audio-' && return 0\n  echo \"$info\" | grep -qiE 'UUID.*(A2DP|Audio Sink|Headset|Handsfree)' && return 0\n  return 1\n}\n\nrun_connect() {\n  local MAC_IN=\"${1:-}\"\n  [ -z \"$MAC_IN\" ] && [ -f /storage/.config/btaudio.last ] && MAC_IN=\"$(cat /storage/.config/btaudio.last)\"\n  [ -z \"$MAC_IN\" ] && { overlay_err \"MISSING\" \"Usage: btconnect.sh [--no-restart] AA:BB:CC:DD:EE:FF\"; exit 1; }\n\n  local BTMAC BTID CARD SINK\n  BTMAC=\"$(echo \"$MAC_IN\" | tr '[:lower:]' '[:upper:]')\"\n  is_audio_mac \"$BTMAC\" || { overlay_err \"CANCEL\" \"Not an audio device.\"; exit 2; }\n  BTID=\"${BTMAC//:/_}\"\n  CARD=\"bluez_card.$BTID\"\n\n  pgrep -f \"pulseaudio.*--system\" >/dev/null || {\n    pulseaudio --system --disallow-exit --disable-shm --log-level=error &>>\"$LOG\" &\n    sleep 2\n  }\n\n  if ! bluetoothctl info \"$BTMAC\" 2>/dev/null | grep -q \"Paired: yes\"; then\n    bluetoothctl power on >>\"$LOG\" 2>&1 || true\n    bluetoothctl pairable on >>\"$LOG\" 2>&1 || true\n    bluetoothctl pair  \"$BTMAC\" >>\"$LOG\" 2>&1 || true\n    bluetoothctl trust \"$BTMAC\" >>\"$LOG\" 2>&1 || true\n  else\n    bluetoothctl trust \"$BTMAC\" >>\"$LOG\" 2>&1 || true\n  fi\n\n  local connected=0\n  for i in {1..6}; do\n    bluetoothctl connect \"$BTMAC\" >>\"$LOG\" 2>&1 || true\n    bluetoothctl info \"$BTMAC\" 2>/dev/null | grep -q \"Connected: yes\" && { connected=1; break; }\n    sleep 2\n  done\n  [ \"$connected\" -eq 1 ] || { overlay_err \"ERROR\" \"Connect failed. See $LOG\"; exit 1; }\n\n  for _ in {1..12}; do pactl list cards short | grep -q \"$CARD\" && break; sleep 1; done\n  pactl set-card-profile \"$CARD\" a2dp_sink >/dev/null 2>&1 || true\n\n  SINK=\"\"\n  for _ in {1..12}; do\n    SINK=$(pactl list short sinks | awk '{print $2}' | grep -E \"bluez_sink\\.${BTID}(\\.a2dp_sink)?\") || true\n    [ -n \"$SINK\" ] && break; sleep 1\n  done\n  [ -n \"$SINK\" ] || { overlay_err \"ERROR\" \"No A2DP sink found.\"; exit 1; }\n\n  pactl set-default-sink \"$SINK\" >/dev/null 2>&1 || true\n  pactl set-sink-mute   \"$SINK\" 0   >/dev/null 2>&1 || true\n  pactl set-sink-volume \"$SINK\" 100% >/dev/null 2>&1 || true\n  for id in $(pactl list short sink-inputs | awk '{print $1}'); do pactl move-sink-input \"$id\" \"$SINK\" >/dev/null 2>&1 || true; done\n  pactl list modules short | grep -q module-switch-on-connect || pactl load-module module-switch-on-connect >/dev/null 2>&1 || true\n\n  echo \"$BTMAC\" > /storage/.config/btaudio.last\n  overlay_msg \"STATUS\" \"Active sink: $SINK\\n\"\n\n  [ \"$RESTART\" -eq 1 ] && systemctl restart emustation\n}\n\nif overlay_yes \"CONNECT LAST BLUETOOTH AUDIO DEVICE\" \"Audio devices only. A2DP enforced.\\n\\n\\n[YES]=Continue and exit to Emulationstation\\n\\n\\n[No]=Cancel\"; then\n  run_connect \"${1:-}\"\nfi\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/btsetup.sh",
    "content": "#!/bin/bash\n# ES Bluetooth setup (audio devices only) with Yes/Exit selection\nset -euo pipefail\n. /etc/profile\n\nLOG=\"/tmp/btsetup.log\"\n\nee_console enable\ncleanup() {\n  ee_console disable\n  rm -f /tmp/display\n  [ -n \"${BTCTL_PID:-}\" ] && kill \"$BTCTL_PID\" >/dev/null 2>&1 || true\n}\ntrap cleanup EXIT\n\nask_yes() {\n  text_viewer -y -w -t \"$1\" -f 24 -m \"$2\"\n  rc=$?\n  case \"$rc\" in\n    21)   # A button\n      return 0   # Yes\n      ;;\n    0)    # B button\n      return 1   # No/Exit\n      ;;\n    *)\n      return 1   # any other keys treated as No\n      ;;\n  esac\n}\n\nensure_pa() {\n  pgrep -f \"pulseaudio.*--system\" >/dev/null || {\n    pulseaudio --system --disallow-exit --disable-shm --log-level=error &>>\"$LOG\" &\n    sleep 2\n  }\n}\n\n# Persistent bluetoothctl session for stable pairing\ncoproc BTCTL { bluetoothctl >>\"$LOG\" 2>&1; }\nBTFD=\"${BTCTL[1]}\"     # write fd\n\nbt() { printf '%s\\n' \"$*\" >&\"$BTFD\"; }\n\nbt_init() {\n  bt \"power on\"\n  bt \"pairable on\"\n  bt \"agent NoInputNoOutput\"\n  bt \"default-agent\"\n}\n\nscan_start() { bt \"scan on\"; }\nscan_stop()  { bt \"scan off\"; }\n\nis_audio_mac() {\n  local mac=\"$1\" info\n  info=\"$(bluetoothctl info \"$mac\" 2>/dev/null || true)\"\n  echo \"$info\" | grep -qiE 'Icon:\\s*audio-' && return 0\n  echo \"$info\" | grep -qiE 'UUID.*(A2DP|Audio Sink|Headset|Handsfree)' && return 0\n  return 1\n}\n\nscan_audio_devices() {\n  scan_start; sleep 10\n  bluetoothctl devices \\\n    | awk '/^Device/ { mac=$2; $1=$2=\"\"; sub(/^ /,\"\"); print mac \"|\" $0 }' \\\n    | while IFS='|' read -r mac name; do\n        [ -z \"$mac\" ] && continue\n        is_audio_mac \"$mac\" && echo \"${mac}|${name}\"\n      done\n  scan_stop\n}\n\npair_trust_connect() {\n  local mac=\"$1\"\n  bluetoothctl info \"$mac\" >/dev/null 2>&1 || bt \"remove $mac\"\n\n  if ! bluetoothctl info \"$mac\" 2>/dev/null | grep -q \"Paired: yes\"; then\n    bt \"pair $mac\"\n    for i in {1..10}; do\n      bluetoothctl info \"$mac\" 2>/dev/null | grep -q \"Paired: yes\" && break\n      sleep 1\n    done\n  fi\n\n  bt \"trust $mac\"\n  scan_stop\n\n  for i in {1..8}; do\n    bt \"connect $mac\"\n    bluetoothctl info \"$mac\" 2>/dev/null | grep -q \"Connected: yes\" && return 0\n    sleep 2\n  done\n\n  # Fallback: re-pair\n  bt \"remove $mac\"; sleep 1\n  bt \"pair $mac\"; sleep 2\n  bt \"trust $mac\"\n  for i in {1..6}; do\n    bt \"connect $mac\"\n    bluetoothctl info \"$mac\" 2>/dev/null | grep -q \"Connected: yes\" && return 0\n    sleep 2\n  done\n\n  return 1\n}\n\nmain() {\n  ensure_pa\n  bt_init\n\n  ask_yes \"BLUETOOTH SETUP\" \\\n    \"Put the audio device in pairing mode, then press YES to start scan.\\n\\nBe patient until the scan is done, it takes some seconds.\\n\\n\\n[Yes]=Scan         [No]=Exit\" || return 0\n\n  while true; do\n    mapfile -t DEVLIST < <(scan_audio_devices)\n\n    if [ ${#DEVLIST[@]} -eq 0 ]; then\n      ask_yes \"NO AUDIO DEVICES\" \\\n        \"Nothing found.\\n\\n[Yes]=Scan again   [No]=Exit\" \\\n        && continue || return 1\n    fi\n\n    LAST_MAC=\"\"\n\n    for entry in \"${DEVLIST[@]}\"; do\n      mac=\"${entry%%|*}\"\n      name=\"${entry#*|}\"\n\n      if ask_yes \"AUDIO DEVICE\" \\\n          \"Name: ${name}\\nMAC: ${mac}\\n\\n[Yes]=Connect   [No]=Cancel\"; then\n\n        if pair_trust_connect \"$mac\"; then\n          echo \"$mac\" > /storage/.config/btaudio.last\n          LAST_MAC=\"$mac\"\n          text_viewer -w -t \"SUCCESS\" -f 24 -m \"Connected: ${name}\"\n        else\n          text_viewer -w -t \"ERROR\" -f 24 -m \"Pair/connect failed.\"\n        fi\n\n        break   # stop after first attempt\n      else\n        break 2 # B button: abort entire scan cycle\n      fi\n    done\n\n    ask_yes \"CONNECTION COMPLETED\" \\\n      \"Scan again (YES) or exit to Emulationstation (NO)?\\n\" \\\n      && continue || break\n  done\n\n  \n}\n\nmain\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/cmdmaker.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2026-present worstcase_scenario (https://github.com/worstcase-scenario)\n\n# Source predefined functions and variables\n. /etc/profile\n\nCMD_MAKER_SCRIPT=\"/usr/bin/scripts/setup/CMD_MAKER.py\"\n\nfunction cmdmaker_confirm() {\n    text_viewer -y -w -t \"C M D  M A K E R\" -f 24 -m \"Welcome to the .cmd Maker.\\n\\nThis script will guide you through creating .cmd files for MAME ROMs.\\n\\nController Navigation:\\n\\n- D-Pad: Navigate menus\\n- A/Start: Confirm selection\\n- B: Go back\\n- Select: Exit program\\n\\nContinue?\"\n    \n    if [[ $? == 21 ]]; then\n        if cmdmaker_start; then\n            text_viewer -w -t \"CMD MAKER\" -f 24 -m \"\\nIf you have created your .cmd-files, they are now ready to use.\\n\\nCheck your ROM directories for the generated files.\\n\\nIn case you have chosen to also update your gamelist.xml, refresh the gamelists via the menu or restart Emulationstation.\\n\\nIMPORTANT:\\n\\nMake sure that the file extension .cmd is available in the extension tag inside es_systems.cfg for the system you have created the cmd files for, otherwise the newly generated .cmd files will not show up on the game list.\"\n        else\n            text_viewer -e -w -t \"CMD MAKER FAILED!\" -f 24 -m \"Failed to complete CMD Maker setup!\\n\\nCheck /tmp/cmdmaker.log for details.\"\n        fi\n    fi\n    \n    ee_console disable\n}\n\nfunction cmdmaker_start() {\n    ee_console enable\n\n    # Prefer a real VT device for output\n    TTY=\"/dev/tty1\"\n    [[ -w \"$TTY\" ]] || TTY=\"/dev/tty0\"\n    [[ -w \"$TTY\" ]] || TTY=\"/dev/console\"\n\n    # Redirect this script's stdio to the VT so output is always visible on-screen\n    exec <\"$TTY\" >\"$TTY\" 2>&1\n\n    # Unblank framebuffer (screensaver/DPMS can leave it black)\n    for b in /sys/class/graphics/fb0/blank /sys/class/graphics/fb1/blank; do\n        [[ -w \"$b\" ]] && echo 0 >\"$b\"\n    done\n\n    # Disable console blanking/powersave if setterm exists\n    if command -v setterm >/dev/null 2>&1; then\n        setterm -blank 0 -powerdown 0 -powersave off >\"$TTY\" 2>/dev/null || true\n    fi\n\n    clear\n\n    echo \"==========================================\"\n    echo \"   E m u E L E C ' s  C M D  M A K E R    \"\n    echo \"==========================================\"\n    echo \"\"\n    echo \"Starting CMD Maker...\"\n    echo \"Follow the instructions that will appear below:\"\n    echo \"\"\n\n    if [[ ! -f \"$CMD_MAKER_SCRIPT\" ]]; then\n        echo \"ERROR: CMD_MAKER.py not found at $CMD_MAKER_SCRIPT\"\n        echo \"\"\n        ee_console disable\n        return 1\n    fi\n\n    chmod +x \"$CMD_MAKER_SCRIPT\"\n    echo \"\"\n    echo \"Starting interactive mode...\"\n    echo \"\"\n    sleep 1\n\n    rm -f /tmp/cmdmaker.ret >/dev/null 2>&1\n\n    if command -v openvt >/dev/null 2>&1; then\n        # Run inside a real VT; keeps output visible even after screensaver\n        openvt -c 1 -s -f -- /bin/sh -c \"/usr/bin/python3 -u '$CMD_MAKER_SCRIPT' 2>&1 | tee /tmp/cmdmaker.log; echo \\$? >/tmp/cmdmaker.ret\"\n        setup_result=$(cat /tmp/cmdmaker.ret 2>/dev/null || echo 1)\n    else\n        /usr/bin/python3 -u \"$CMD_MAKER_SCRIPT\" 2>&1 | tee /tmp/cmdmaker.log\n        setup_result=${PIPESTATUS[0]}\n    fi\n\n    echo \"\"\n\n    if [[ $setup_result == 0 ]]; then\n        echo \"CMD Maker completed successfully\"\n        echo \"\"\n        ee_console disable\n        rm /tmp/display > /dev/null 2>&1\n        return 0\n    else\n        echo \"CMD Maker exited with code: $setup_result\"\n        echo \"\"\n        ee_console disable\n        rm /tmp/display > /dev/null 2>&1\n        return 1\n    fi\n}\n\n\n# Start CMD Maker\ncmdmaker_confirm"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/copy_usb_roms_to_device.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nROMFILE=\"emuelec_copy_roms_from_here\"\n\nfunction copy_from_where() {\nFULLPATHTOROMS=\"$(find /media/*/roms/ -name ${ROMFILE} -maxdepth 1 | head -n 1)\"\n\nif [[ -z \"${FULLPATHTOROMS}\" ]]; then\n\tROMSNOTFOUND=\"yes\"\nelse\n\tROMSNOTFOUND=\"no\"\n\tPATHTOROMS=\"${FULLPATHTOROMS%${ROMFILE}}\"\nfi \n\necho ${PATHTOROMS}\n}\n\nROMFOLDER=\"$(copy_from_where)\"\n\nfunction copy_confirm() {\nif [ -z \"${ROMFOLDER}\" ]; then \n    text_viewer -e -w -t \"ERROR!\" -f 24 -m \"No USB media with the file \\\"${ROMFILE}\\\" is connected! Did you create the file?\\n\\nYou need to create a file (NOT A FOLDER/DIRECTORY!) named\\n\\n\\\"${ROMFILE}\\\" (WITH NO EXTENSION!)\\n\\nin the USB:/roms folder before runing this script! \"\n\texit 1\nfi\n    text_viewer -y -w -t \"Copy roms from USB to SD\" -f 24 -m \"This will copy all files from \\\"${ROMFOLDER}\\\", to \\\"/storage/roms\\\" on the device.\\n\\nMAKE SURE YOU HAVE ENOUGH SPACE IN YOUR DEVICE!\\n\\nWARNING: Existing files in \\\"/storage/roms\\\" with the same name will be overwriten\\nNO BACKUP WILL BE CREATED!\\n\\nare you sure you want to continue?\"\n    [[ $? == 21 ]] && copy_roms || exit 0;\n }\n\nfunction copy_roms() {\n\t# Sanity checks\n\t[[ -L \"/storage/roms\" ]] && rm /storage/roms\n\t[[ -d /storage/roms2 ]] && mv /storage/roms2 /storage/roms\n\t[[ ! -d /storage/roms ]] && mkdir -p /storage/roms\n\t# End sanity\n\t\n    ee_console enable\n\n    echo \"Copying, please wait!...\" > /dev/tty0\n\trsync -ahI --progress \"${ROMFOLDER}\"* /storage/roms > /dev/tty0\n    COPY=$(cat /tmp/copy)\n    \n    ee_console disable\n    \n\t# Clean up\n\t[[ -f /storage/roms/${ROMFILE} ]] && rm /storage/roms/${ROMFILE}\n\t[[ -f /storage/roms/emuelecroms ]] && rm /storage/roms/emuelecroms\n    echo -en \"Copy finished!\\n\\n\" >> /tmp/display\n\techo -en \"Remove the USB media from the device and press YES to restart ES\\n\\nPressing NO will return to ES without restarting!\" >> /tmp/display\n    echo -en \"\\n\\n\\n${COPY}\" >> /tmp/display\n    text_viewer -y -w -t \"Copy roms from USB to SD\" -f 24 /tmp/display\n\tif [[ $? == 21 ]]; then\n        rm /tmp/display\n        ee_console disable\n        systemctl restart emustation\n    else\n        exit 0;\n    fi\n}\n\ncopy_confirm\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/create_rom_dirs.sh",
    "content": "#!/bin/bash\n\nES_SYSTEMS=\"/storage/.config/emulationstation/es_systems.cfg\"\n\n# Extract path elements from XML and filter out those not containing \"/storage/roms\"\nPATHS=$(grep -oP '(?<=<path>).*?(?=</path>)' \"${ES_SYSTEMS}\" | grep '/storage/roms')\n\n# Loop through each path and create directories\nwhile IFS= read -r path; do\n    #echo \"${path}\"\n    mkdir -p \"${path}\"\n    chmod +x 0777 \"${path}\"\ndone <<< \"${PATHS}\"\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/eka-install.sh",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2025-present EmuELEC Team (https://github.com/EmuELEC/EmuELEC)\n\n. /etc/profile\n\nEKA_INSTALL_SCRIPT=\"/usr/bin/scripts/setup/EKA_INSTALL.py\"\n\nfunction ekainstall_confirm() {\n    text_viewer -y -w -t \"E K A 2 L 1   C O M M A N D E R\" -f 24 -m \"Welcome to the eka2l1 Commander.\\n\\nUse this tool to setup eka2l1, install firmware and .sis/.sisx apps, import pre-configured device folders, change the active device, create `.uid` launcher files for installed applications, and convert selected device folders and their contents to lowercase so EKA2L1 can access case-sensitive paths correctly.\\n\\nController Navigation:\\n\\n- D-Pad: Navigate menus\\n- A / Start: Confirm selection\\n- B: Go back\\n- Select: Exit program\\n\\nContinue?\"\n\n    if [[ $? == 21 ]]; then\n        if ekainstall_start; then\n            text_viewer -w -t \"EKA2L1 COMMANDER\" -f 24 -m \"\\n\\nLaunch eka2l1 via EmulationStation.\"\n        else\n            text_viewer -e -w -t \"EKA2L1 COMMANDER FAILED\" -f 24 -m \"There has been an error!\\n\\nCheck /emuelec/logs/eka2l1-install.log for details.\"\n        fi\n    fi\n\n    ee_console disable\n}\n\nfunction ekainstall_start() {\n    ee_console enable\n\n    TTY=\"/dev/tty1\"\n    [[ -w \"$TTY\" ]] || TTY=\"/dev/tty0\"\n    [[ -w \"$TTY\" ]] || TTY=\"/dev/console\"\n\n    exec <\"$TTY\" >\"$TTY\" 2>&1\n\n    for b in /sys/class/graphics/fb0/blank /sys/class/graphics/fb1/blank; do\n        [[ -w \"$b\" ]] && echo 0 >\"$b\"\n    done\n\n    if command -v setterm >/dev/null 2>&1; then\n        setterm -blank 0 -powerdown 0 -powersave off >\"$TTY\" 2>/dev/null || true\n    fi\n\n    clear\n\n    echo \"======================================\"\n    echo \"   E K A 2 L 1   C O M M A N D E R       \"\n    echo \"======================================\"\n    echo \"\"\n    echo \"Starting...\"\n    echo \"\"\n\n    if [[ ! -f \"$EKA_INSTALL_SCRIPT\" ]]; then\n        echo \"ERROR: EKA_INSTALL.py not found at $EKA_INSTALL_SCRIPT\"\n        echo \"\"\n        ee_console disable\n        return 1\n    fi\n\n    chmod +x \"$EKA_INSTALL_SCRIPT\"\n    sleep 1\n\n    rm -f /tmp/ekainstall.ret >/dev/null 2>&1\n\n    if command -v openvt >/dev/null 2>&1; then\n        openvt -c 1 -s -f -- /bin/sh -c \"/usr/bin/python3 -u '$EKA_INSTALL_SCRIPT' 2>&1 | tee /emuelec/logs/eka2l1-install.log; echo \\$? >/tmp/ekainstall.ret\"\n        setup_result=$(cat /tmp/ekainstall.ret 2>/dev/null || echo 1)\n    else\n        /usr/bin/python3 -u \"$EKA_INSTALL_SCRIPT\" 2>&1 | tee /emuelec/logs/eka2l1-install.log\n        setup_result=${PIPESTATUS[0]}\n    fi\n\n    if [[ $setup_result == 0 ]]; then\n        echo \"EKA2L1 Commander completed successfully.\"\n        ee_console disable\n        rm -f /tmp/display >/dev/null 2>&1\n        return 0\n    else\n        echo \"EKA2L1 Commander exited with code: $setup_result\"\n        ee_console disable\n        rm -f /tmp/display >/dev/null 2>&1\n        return 1\n    fi\n}\n\nekainstall_confirm\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/file_manager.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n. /etc/profile\nBIN=\"351Files\"\n\ninit_port ${BIN} \"default\"\n\ngptokeyb -c \"/emuelec/configs/gptokeyb/${BIN}.gptk\" &\n\nclear >/dev/console\nee_console disable\n\nif [ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${EE_DEVICE}\" == \"GameForce\" ]; then\n    \n    clear >/dev/console\n    \n    case \"$(oga_ver)\" in\n    \"OGA\"*)\n        ${BIN} 480 320 14 24 24\n    ;;\n    \"OGS\")\n        ${BIN} 854 480 14 24 24\n    ;;\n    \"GF\")\n        ${BIN} 640 480 14 24 24\n    ;;\n        esac\nelse\n    ${BIN}\nfi\n\nend_port\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/gamelist.xml",
    "content": "<?xml version=\"1.0\"?>\n<gameList>\n\t<game>\n\t\t<path>./btsetup.sh</path>\n\t\t<name>Setup Bluetooth Audio device</name>\n\t\t<desc>Scan and pair bluetooth audio devices (like speakers and headphones or earbuds) to EmuELEC (via pulseaudio). After the setup, you must run the \"Connect Bluetooth Audio device\"-script. Make sure to switch the audio device in the retroarch menu from alsa to pulseaudio in order to hear the in-game sound.</desc>\n\t\t<developer>worstcase_scenario </developer>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/btsetup.png</image>\n\t</game>\n\t<game>\n\t\t<path>./btconnect.sh</path>\n\t\t<name>Connect Bluetooth Audio device</name>\n\t\t<desc>Connect last paired bluetooth audio device. Make sure to switch the audio device in retroarch menu from alsa to pulseaudio in order to hear the in-game sound.</desc>\n\t\t<developer>worstcase_scenario </developer>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/btconnect.png</image>\n\t</game>\n\t<game>\n\t\t<path>./create_rom_dirs.sh</path>\n\t\t<name>Create ROM Dirs</name>\n\t\t<desc>Small script to create all the dirs in /storage/roms based on es_systems.cfg</desc>\n\t\t<developer>shantigilbert</developer>\n\t\t<publisher>Emuelec</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/create_dirs.png</image>\n\t</game>\n\t<game>\n\t\t<path>./install_portmaster.sh</path>\n\t\t<name>Install PortMaster</name>\n\t\t<desc>Install latest PortMaster</desc>\n\t\t<developer>shantigilbert</developer>\n\t\t<publisher>Emuelec</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/portmaster.png</image>\n\t</game>\n\t\t<game>\n\t\t<path>./eka-install.sh</path>\n\t\t<name>EKA2L1 Commander</name>\n\t\t<desc>Use this tool to setup eka2l1, install SIS/SISX apps and install/import firmware. You can also show and change the active device, create `.uid` launcher files for installed applications, and convert selected device folders and their contents to lowercase so EKA2L1 can access case-sensitive paths correctly. For the firmware installation, you WILL need both a .rpkg and a .rom file (for example sym.rpkg and sym.rom) in one of the folders on your device (for example /storage/bios). In order to run N-GAGE 2.0 games, you need to install the N-Gage Installer, which must be a .sis-file. Afterwards you need to copy your .ngage files to /storage/.config/eka2l1/data/drives/e/n-gage. Then create an empty \"Launch.ngage\" file in /storage/roms/ngage and start it in Emulationstation. The N-GAGE-Games-app will start up and list all the ngage files that you then can install and start via the menu. If you have created .uid files, each game or app can be started individually through the gamelist.</desc>\n\t\t<developer>worstcase_scenario </developer>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/ekainstall.png</image>\n\t</game>\n\t\t<game>\n\t\t<path>./macrosetup.sh</path>\n\t\t<name>Macro Setup</name>\n\t\t<desc>Define a trigger button on your controller that executes a macro of button presses. When you are finished recording the button input, wait three seconds. The configuration is being saved in macro_config.json</desc>\n\t\t<developer>worstcase_scenario </developer>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/macrosetup.png</image>\n\t</game>\n\t<game>\n\t\t<path>./macrorun.sh</path>\n\t\t<name>Macro Enabler</name>\n\t\t<desc>Runs the pre-defined macro when the trigger button is pressed. To stop and remove the macro from memory, press the trigger button for 3-5 seconds.</desc>\n\t\t<developer>worstcase_scenario </developer>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/macrorun.png</image>\n\t</game>\n\t<game>\n\t\t<path>./cmdmaker.sh</path>\n\t\t<name>.cmd maker for MAME systems</name>\n\t\t<desc>This script automates the creation of .cmd files for MAME ROMs in EmuELEC. What it does: - Reads MAME's listmedia.txt to detect available systems and their media types (floppy, cartridge, CD-ROM, etc.) - Lets you browse and select a MAME system (e.g., apple2gs, fmtownsux) - Choose the media type with correct extensions - Select your ROM directory - Generates .cmd files for each ROM with the proper MAME command line - Optionally updates gamelist.xml to point to the new .cmd files instead of original ROMs.</desc>\n\t\t<developer>worstcase_scenario </developer>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/cmdmaker.png</image>\n\t</game>\n\t<game>\n\t\t<path>./file_manager.sh</path>\n\t\t<name>File Manager</name>\n\t\t<desc>MC File Manager. NO keyboard required</desc>\n\t\t<developer>shantigilbert </developer>\n\t\t<publisher>Emuelec</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/File Manager.png</image>\n\t</game>\n\t<game>\n\t\t<path>./wifi.sh</path>\n\t\t<name>Alternate WiFi method</name>\n\t\t<desc>Connect to WiFi using wifi.txt in /storage/.config/wifi.txt</desc>\n\t\t<developer>shantigilbert </developer>\n\t\t<publisher>Emuelec</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/wifi.png</image>\n\t</game>\n\t<game>\n\t\t<path>./install_drastic.sh</path>\n\t\t<name>Install Drastic</name>\n\t\t<desc>Download and install Drastic, internet is required!</desc>\n\t\t<developer>shantigilbert </developer>\n\t\t<publisher>Emuelec</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/drastic.png</image>\n\t</game>\n\t<game>\n\t\t<path>./install_pixelcade.sh</path>\n\t\t<name>Install Pixelcade</name>\n\t\t<desc>Download and install software for Pixelcade - LED Marquee for Arcade Machines!</desc>\n\t\t<developer>pixelcade</developer>\n\t\t<publisher>pixelcade.org</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/pixelcade.png</image>\n\t</game>\n\t<game>\n\t\t<path>./install_cheats.sh</path>\n\t\t<name>Install Libretro Cheats</name>\n\t\t<desc>Download and install Libretro Cheats</desc>\n\t\t<developer>Hector Calvarro</developer>\n\t\t<publisher>Emuelec</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/cheats.png</image>\n\t</game>\n\t<game>\n\t\t<path>./sselphs_scraper.sh</path>\n\t\t<name>Sselphs scraper</name>\n\t\t<desc>Alternative ROM Scraper. Configuration is required!</desc>\n\t\t<developer>shantigilbert </developer>\n\t\t<publisher>Emuelec</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/help.png</image>\n\t</game>\n\t<game>\n\t\t<path>./skyscraper.sh</path>\n\t\t<name>Skyscraper</name>\n\t\t<desc>Alternative ROM Scraper. Configuration is required!</desc>\n\t\t<developer>shantigilbert </developer>\n\t\t<publisher>Emuelec</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/sh.png</image>\n\t</game>\n\t<game>\n\t\t<path>./send_logs.sh</path>\n\t\t<name>Send logs</name>\n\t\t<desc>Use this to get a URL that you can share when asking for help</desc>\n\t\t<developer>shantigilbert </developer>\n\t\t<publisher>Emuelec</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/logs.png</image>\n\t</game>\n\t<game>\n\t\t<path>./system_info.sh</path>\n\t\t<name>System info</name>\n\t\t<desc>Display System info</desc>\n\t\t<developer>shantigilbert </developer>\n\t\t<publisher>Emuelec</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/info.png</image>\n\t</game>\n\t<game>\n\t\t<path>./copy_usb_roms_to_device.sh</path>\n\t\t<name>Copy USB roms to device</name>\n\t\t<desc>Easily copy ROMS from any external device to the SD/MMC where EmuELEC is installed</desc>\n\t\t<developer>shantigilbert </developer>\n\t\t<publisher>Emuelec</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/usb.png</image>\n\t</game>\n\t<game>\n\t\t<path>./show_last_emuelec.log.sh</path>\n\t\t<name>Show last emuelec</name>\n\t\t<desc>Display the last emuelec.log on screen to debug game launching problems</desc>\n\t\t<developer>shantigilbert </developer>\n\t\t<publisher>Emuelec</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/last.png</image>\n\t</game>\n\t<game>\n\t\t<path>./launch_terminal_(kb).sh</path>\n\t\t<name>Launch Terminal</name>\n\t\t<desc>Start a terminal, a keybord is required!</desc>\n\t\t<developer>shantigilbert </developer>\n\t\t<publisher>Emuelec</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/terminal.png</image>\n\t</game>\n\t<game>\n\t\t<path>./youtube_search.sh</path>\n\t\t<name>YouTube Search</name>\n\t\t<desc>Do a quick youtube search based on the word predefined in the EmuELEC settings menu</desc>\n\t\t<developer>shantigilbert </developer>\n\t\t<publisher>Emuelec</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/youtube.png</image>\n\t</game>\n\t<game>\n\t\t<path>./scan_scummVM_games.sh</path>\n\t\t<name>Scan ScummVM Games</name>\n\t\t<desc>Scan Scummvm and add them to the gamelist!</desc>\n\t\t<developer>shantigilbert </developer>\n\t\t<publisher>Emuelec</publisher>\n\t\t<genre>script</genre>\n\t\t<image>./setup_images/scummvm.png</image>\n\t</game>\n</gameList>\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/install_cheats.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n\n# Source predefined functions and variables\n. /etc/profile\n\nfunction cheats_confirm() {\n    text_viewer -y -w -t \"Install Cheats\" -f 24 -m \"This will install Retroarch Cheats\\n\\nNOTE: You need to have an active internet connection and you will need to restart ES after this script ends, continue?\"\n        if [[ $? == 21 ]]; then\n            if cheats; then\n                text_viewer -w -t \"Install Retroarch Cheats Complete!\" -f 24 -m \"Retroarch Cheats installation is done!\"\n            else\n                text_viewer -e -w -t \"Install Cheats FAILED!\" -f 24 -m \"Retroarch Cheats installation was not completed!, Are you sure you are connected to the internet?\"\n            fi\n      fi\n    ee_console disable\n }\n\nfunction cheats() {\nee_console enable\n\n\nLINK=\"http://buildbot.libretro.com/assets/frontend/cheats.zip\"\n\nLINKDEST=\"/tmp/database/cht/cheats.zip\"\n\nwget -O ${LINKDEST} ${LINK}\n\n[[ ! -f ${LINKDEST} ]] && return 1\nunzip -o \"${LINKDEST}\" -d \"/tmp/database/cht\"  \nrm -rf ${LINKDEST}\n\necho \"Done, restart ES\"\nee_console disable\nrm /tmp/display > /dev/null 2>&1\nreturn 0\n}\ncheats_confirm"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/install_drastic.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nfunction drastic_confirm() {\n    text_viewer -y -w -t \"Install Drastic\" -f 24 -m \"This will install Drastic and enable it on Emulationstation\\n\\nNOTE: You need to have an active internet connection and you will need to restart ES after this script ends, continue?\"\n        if [[ $? == 21 ]]; then\n            if drastic_install; then\n                text_viewer -w -t \"Install Drastic Complete!\" -f 24 -m \"Drastic installation is done!, don't forget to install roms to /storage/roms/nds and restart Emulationstation!\"\n            else\n                text_viewer -e -w -t \"Install Drastic FAILED!\" -f 24 -m \"Drastic installation was not completed!, Are you sure you are connected to the internet?\"\n            fi\n      fi\n    ee_console disable\n }\n\nfunction drastic_install() {\nee_console enable\n\nif grep -q \"aarch64\" /etc/motd; then\n    LINK=\"https://raw.githubusercontent.com/shantigilbert/binaries-1/master/drastic.tar.gz\"\nelse\n\tLINK=\"https://raw.githubusercontent.com/shantigilbert/binaries/master/odroid-xu4/drastic.tar.gz\"\nfi\n\nES_FOLDER=\"/storage/.emulationstation\"\nLINKDEST=\"${ES_FOLDER}/scripts/drastic.tar.gz\"\nCFG=\"${ES_FOLDER}/es_systems.cfg\"\n\nmkdir -p \"${ES_FOLDER}/scripts/\"\n\nwget -O ${LINKDEST} ${LINK}\n\n[[ ! -f ${LINKDEST} ]] && return 1\ntar xvf ${LINKDEST} -C \"${ES_FOLDER}/scripts\"\nrm ${LINKDEST}\n\nif grep -q '<name>nds</name>' \"${CFG}\"\nthen\n\techo 'Drastic is already setup in your es_systems.cfg file'\n\techo 'deleting...nd from es_system.cfg'\n\txmlstarlet ed -L -P -d \"/systemList/system[name='nds']\" ${CFG}\nfi\n\n\techo 'Adding Drastic to systems list'\n\txmlstarlet ed --omit-decl --inplace \\\n\t\t-s '//systemList' -t elem -n 'system' \\\n\t\t-s '//systemList/system[last()]' -t elem -n 'name' -v 'nds'\\\n\t\t-s '//systemList/system[last()]' -t elem -n 'fullname' -v 'Nintendo DS'\\\n\t\t-s '//systemList/system[last()]' -t elem -n 'manufacturer' -v 'Nintendo'\\\n\t\t-s '//systemList/system[last()]' -t elem -n 'release' -v '2004'\\\n\t\t-s '//systemList/system[last()]' -t elem -n 'hardware' -v 'portable'\\\n\t\t-s '//systemList/system[last()]' -t elem -n 'path' -v '/storage/roms/nds'\\\n\t\t-s '//systemList/system[last()]' -t elem -n 'extension' -v '.nds .NDS .zip .ZIP .7z .7Z'\\\n\t\t-s '//systemList/system[last()]' -t elem -n 'command' -v \"emuelecRunEmu.sh %ROM% -P%SYSTEM% --core=%CORE% --emulator=%EMULATOR% --controllers=\\\"%CONTROLLERSCONFIG%\\\"\"\\\n\t\t-s '//systemList/system[last()]' -t elem -n 'platform' -v 'nds'\\\n\t\t-s '//systemList/system[last()]' -t elem -n 'theme' -v 'nds'\\\n\t\t${CFG}\n\nread -d '' content <<EOF\n#!/bin/bash\n\n# Only run pixel if it exists, mainly for N2\nif [ -f \"/storage/.emulationstation/scripts/pixel.sh\" ]; then\n/storage/.emulationstation/scripts/pixel.sh\nfi\n\ncd /storage/.emulationstation/scripts/drastic/\n./drastic \"\\${1}\" > /dev/null 2>&1\n\nEOF\necho \"${content}\" > ${ES_FOLDER}/scripts/drastic.sh\nchmod +x ${ES_FOLDER}/scripts/drastic.sh\n\nif [ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${EE_DEVICE}\" == \"GameForce\" ]; then\n# copy the correct config file depending on what OGA\n\nDEVICE=$(oga_ver)\ncd \"/storage/.emulationstation/scripts/drastic/config\"\n\ncase \"${DEVICE}\" in\n    \"OGS\")\n        cp -rf drastic_ogs.cfg drastic.cfg\n    ;;\n    \"OGABE\")\n        cp -rf drastic_ogabe.cfg drastic.cfg\n    ;;\n    \"OGA1\")\n        cp -rf drastic_oga.cfg drastic.cfg\n    ;;\n    \"GF\")\n        cp -rf drastic_ogs.cfg drastic.cfg\n    ;;\nesac\n\nfi\n\necho \"Done, restart ES\"\nee_console disable\nrm /tmp/display > /dev/null 2>&1\nreturn 0\n}\n\ndrastic_confirm\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/install_pixelcade.sh",
    "content": "#!/bin/bash\n\n. /etc/profile\n\ninstall_succesful=false\nversion=10  #increment this as the script is updated\nINSTALLPATH=\"/storage/roms/\"\n\ncat > /tmp/pixelcade.txt << \"EOF\"\n       _          _               _\n _ __ (_)_  _____| | ___ __ _  __| | ___\n| '_ \\| \\ \\/ / _ \\ |/ __/ _` |/ _` |/ _ \\\n| |_) | |>  <  __/ | (_| (_| | (_| |  __/\n| .__/|_/_/\\_\\___|_|\\___\\__,_|\\__,_|\\___|\n|_|\nEOF\n\ncat >> /tmp/pixelcade.txt <<EOF\n\n       Pixelcade LED Installer for EmuELEC : Installer Version ${version}\n\nThis script will install/update Pixelcade in your /storage/roms folder\nPlese ensure you have at least 800 MB of free disk space in /storage/roms\nNow connect Pixelcade to a free USB port on your device (Odroid, Android Box, etc)\nEnsure the toggle switch on the Pixelcade board is pointing towards USB and not BT\nThe installer will not run unless the Pixelcade hardware is connected\nGrab a coffee or tea as this installer will take around 15 minutes\n\nYou may also re-run this installer later to update marquee artwork\n\nWould you like to continue?\nEOF\n\ntext_viewer -w -y -t \"Pixelcade LED Marquee Installer\" -f 24 /tmp/pixelcade.txt\n    if [[ $? != 21 ]]; then\n        text_viewer -w -t \"Installation canceled!\" -f 24 -m \"Pixelcade installation canceled! press start or A to exit!\"\n        exit 0\n    fi\n\n# let's detect if Pixelcade is USB connected, could be 0 or 1 so we need to check both\nif ls /dev/ttyACM0 | grep -q '/dev/ttyACM0'; then\n   echo \"Pixelcade LED Marquee Detected on ttyACM0\"\nelse\n    if ls /dev/ttyACM1 | grep -q '/dev/ttyACM1'; then\n        echo \"Pixelcade LED Marquee Detected on ttyACM1\"\n    else\n       text_viewer -e -w -t \"ERROR: PixelCade Not Detected!\" -f 24 -m \"Sorry, Pixelcade LED Marquee was not detected, pleasse ensure Pixelcade is USB connected to your EmuELEC device and the toggle switch on the Pixelcade board is pointing towards USB, exiting...\"\n       exit 1\n    fi\nfi\n\ncat > /tmp/pixelcade_install.rc <<EOF\n#!/bin/bash\n\n. /etc/profile\n\nmachine_arch=arm64\nINSTALLPATH=\"${INSTALLPATH}\"\n\nEOF\n\ncat >> /tmp/pixelcade_install.rc << \"EOF\"\n\nif [[ -f \"${INSTALLPATH}master.zip\" ]]; then #if the user killed the installer mid-stream,it's possible this file is still there so let's remove it to be sure before downloading, otherwise wget will download and rename to .1\n   rm \"${INSTALLPATH}master.zip\"\nfi\n\necho \"Stopping Pixelcade (if running...)\"\n# let's make sure pixelweb is not already running\nkillall java >/dev/null 2>&1 #in the case user has java pixelweb running\ncurl localhost:8080/quit >/dev/null 2>&1\n\nmkdir -p ${INSTALLPATH}pixelcade\ncd ${INSTALLPATH}pixelcade\n\nwget -O ${INSTALLPATH}pixelcade/pixelweb https://github.com/alinke/pixelcade-linux-builds/raw/main/linux_${machine_arch}/pixelweb\nchmod +x pixelweb\n\n#install the artwork\n echo \"Installing artwork, this can take a few minutes, please be patient even if it looks like it's stuck!\"\n./pixelweb -install-artwork\n\nif [[ $? == 2 ]]; then #this means artwork is already installed so let's check for updates and get if so\n  echo \"Checking for new Pixelcade artwork...\"\n  cd ${INSTALLPATH}pixelcade && ./pixelweb -update-artwork\nfi\n\necho \"Artwork installation done!\"\n\nif [[ -d ${INSTALLPATH}ptemp ]]; then\n    rm -r ${INSTALLPATH}ptemp\nfi\n\n#creating a temp dir for the Pixelcade common system files & scripts\nmkdir -p ${INSTALLPATH}ptemp\ncd ${INSTALLPATH}ptemp\n\n#get the Pixelcade system files\nwget -O ${INSTALLPATH}ptemp/main.zip https://github.com/alinke/pixelcade-linux/archive/refs/heads/main.zip\nunzip main.zip\nmkdir -p /storage/.emulationstation/scripts\n\n#copy over the custom scripts\necho \"${yellow}Installing Pixelcade EmulationStation Scripts...${white}\"\ncp -r -f ${INSTALLPATH}ptemp/pixelcade-linux-main/emuelec/scripts /storage/.emulationstation #note this will overwrite existing scripts\nfind /storage/.emulationstation/scripts -type f -iname \"*.sh\" -exec chmod +x {} \\; #make all the scripts executble\n\n#hi2txt for high score scrolling\necho \"${yellow}Installing hi2txt for High Scores...${white}\"\ncp -r -f ${INSTALLPATH}ptemp/pixelcade-linux-main/hi2txt ${INSTALLPATH} #for high scores\n\nsed -i '/all,mame/d' ${INSTALLPATH}pixelcade/console.csv\nsed -i '/favorites,mame/d' ${INSTALLPATH}pixelcade/console.csv\nsed -i '/recent,mame/d' ${INSTALLPATH}pixelcade/console.csv\nsed -i '/fbn,mame/d' ${INSTALLPATH}pixelcade/console.csv\n\nif cat /storage/.config/custom_start.sh | grep \"^[^#;]\" | grep -q 'java'; then  #ignore any comment line, user has the old java pixelweb, we need to comment out this line and replace\n    echo \"Backing up custom.sh to custom.bak\"\n    cp /storage/.config/custom_start.sh /storage/.config/custom_start.bak\n    echo \"Replacing old java pixelweb with new pixelweb\"\n    sed -i \"/java -jar pixelweb.jar/c\\cd ${INSTALLPATH}pixelcade && ./pixelweb -image \"system/emuelec.png\" -startup &\" /storage/.config/custom_start.sh #comment out the line\n    sed -i \"s|pixelweb.jar|pixelweb|\" /storage/.config/custom_start.sh\nfi\n\nif cat /storage/.config/custom_start.sh | grep -q 'pixelweb -image'; then\n    echo \"Pixelcade was already added to custom_start.sh, skipping...\"\nelse\n    echo \"Adding Pixelcade Listener auto start to custom_start.sh ...\"\n    sed -i \"/^\"before\")/a cd ${INSTALLPATH}pixelcade && ./pixelweb -image \"system/emuelec.png\" -startup &\" /storage/.config/custom_start.sh  #insert this line after \"before\"\nfi\n\nchmod +x /storage/.config/custom_start.sh\n\necho \"Cleaning up...\"\nrm -r ${INSTALLPATH}ptemp >/dev/null 2>&1\n\nexit 0 \nEOF\nchmod +x /tmp/pixelcade_install.rc\n\nkillall java >/dev/null 2>&1\n\n# Lets check if java is installed and up to date, called from profile\ninstall_java\n\n# Install Pixelcade software\nprogressor --log \"/emuelec/logs/install_pixelcade.log\" --title \"Installing Pixelcade, please wait...\" \"/tmp/pixelcade_install.rc\" --font \"dummy.ttf\"\n\n         if [[ $? == 0 && -f ${INSTALLPATH}pixelcade/pixelweb && -d ${INSTALLPATH}pixelcade ]]; then\n          cd ${INSTALLPATH}pixelcade && ./pixelweb -image \"system/emuelec.png\" -startup >/dev/null 2>&1 &\n           pixelcade_version=\"$(cd ${INSTALLPATH}pixelcade && ./pixelweb -version)\"\n           text_viewer -y -w -t \"Installation complete!\" -f 24 -m \"PixelCade Version: ${pixelcade_version} INSTALLATION COMPLETE, The EmuELEC logo should now be displayed. If you don't see the logo, please reboot and then Pixelcade will be controlled by EmuELEC, would you like to reboot now?\"\n            if [[ $? == 21 ]]; then\n               systemctl reboot\n            fi\n         else\n           text_viewer -e -w -t \"ERROR: Installation incomplete!\" -f 24 -m \"Something went wrong! Please make sure you have enough disk space and are connnected to the internet!\"\n         fi\n# Delete temporary files\nrm -rf /tmp/pixelcade* >/dev/null 2>&1\nexit 0\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/install_portmaster.sh",
    "content": "#!/bin/bash\n\n# Source predefined functions and variables\n. /etc/profile\n\nfunction portmaster_confirm() {\n    text_viewer -y -w -t \"Install Portmaster\" -f 24 -m \"This will install Portmaster and enable it on Emulationstation\\n\\nNOTE: You need to have an active internet connection and you will need to restart ES after this script ends, continue?\"\n        if [[ $? == 21 ]]; then\n            if portmaster_install; then\n                text_viewer -y -w -t \"Install Portmaster Complete!\" -f 24 -m \"Portmaster installation is done!.\\n\\n Don't forget to restart Emulationstation! Would you like to restart it now?\"\n                    if [[ $? == 21 ]]; then\n                        systemctl restart emustation\n                    fi\n            else\n                text_viewer -e -w -t \"Install Portmaster FAILED!\" -f 24 -m \"Portmaster installation was not completed!, Are you sure you are connected to the internet?\"\n            fi\n      fi\n    ee_console disable\n }\n\nfunction portmaster_install() {\nee_console enable\n\nLINK=\"https://github.com/PortsMaster/PortMaster-GUI/releases/latest/download/PortMaster.zip\"\nLINKTMP=$(mktemp -d);\nLINKDEST=\"${LINKTMP}/PortMaster.zip\"\n\nwget -O ${LINKDEST} ${LINK}\n\n[[ ! -f ${LINKDEST} ]] && return 1\nunzip -o \"${LINKDEST}\" -d \"/storage/roms/ports\"\nmkdir -p \"/storage/roms/ports_scripts\"\ncp \"/storage/roms/ports/PortMaster/PortMaster.sh\" \"/storage/roms/ports_scripts\"\nrm -rf ${LINKTMP}\n\nXML_FILE=\"/storage/roms/ports_scripts/gamelist.xml\"\n\nif xmlstarlet sel -t -v \"count(/gameList/game[name='PortMaster'])\" \"${XML_FILE}\" | grep -qv '^0$'; then\n\techo \"PortMaster already in ${XML_FILE}\" #nothing need to be done PortMaster Exists in gamelist\nelse\n\techo \"Adding PortMaster to ${XML_FILE}\"\n\t\n\t# create xml file if it doesn't exist\n\tif [ ! -f \"${XML_FILE}\" ]; then\n\t\techo \"${XML_FILE} does not exists, creating...\"\n\t\techo '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' > \"${XML_FILE}\"\n\t\techo '<gameList/>' >> \"${XML_FILE}\"\n\telse\n\t\t# Check if <gameList> exists\n\t\tif ! xmlstarlet sel -t -c \"/gameList\" \"${XML_FILE}\" >/dev/null 2>&1; then\n\t\t\techo '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' > \"$XML_FILE\"\n\t\t\techo '<gameList/>' >> \"${XML_FILE}\"\n\t\tfi\n\tfi\n\n\t# 3. Add new <game> entry using xmlstarlet\n\txmlstarlet ed --inplace \\\n\t-s \"/gameList\" -t elem -n \"gameTMP\" -v \"\" \\\n\t-s \"/gameList/gameTMP\" -t elem -n \"path\" -v \"./PortMaster.sh\" \\\n\t-s \"/gameList/gameTMP\" -t elem -n \"name\" -v \"PortMaster\" \\\n\t-s \"/gameList/gameTMP\" -t elem -n \"image\" -v \"/usr/bin/scripts/setup/setup_images/LaunchPortMaster.png\" \\\n\t-s \"/gameList/gameTMP\" -t elem -n \"rating\" -v \"10\" \\\n\t-r \"//gameTMP\" -v \"game\" \\\n\t\"${XML_FILE}\"\nfi\n\n\necho \"Done, restart ES\"\nee_console disable\nrm /tmp/display > /dev/null 2>&1\nreturn 0\n}\nportmaster_confirm\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/launch_terminal_(kb).sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nsource /usr/bin/env.sh\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/listmedia.txt",
    "content": "1292apvs         quickload        (quik)     .pgm  .tvc  \n1292apvs         cartridge        (cart)     .bin  .rom  \n1392apvs         quickload        (quik)     .pgm  .tvc  \n1392apvs         cartridge        (cart)     .bin  .rom  \n32x              cartridge        (cart)     .32x  .bin  \n32x_mcd          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \n32x_mcd          cartridge        (cart)     .32x  .bin  \n32x_mcdj         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \n32x_mcdj         cartridge        (cart)     .32x  .bin  \n32x_scd          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \n32x_scd          cartridge        (cart)     .32x  .bin  \n32xe             cartridge        (cart)     .32x  .bin  \n32xj             cartridge        (cart)     .32x  .bin  \n386i             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \n386i             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \n386sc            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n386sc            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n386sc            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \n386sc            printout         (prin)     .prn  \n386sc2c          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n386sc2c          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n386sc2c          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \n386sc2c          printout         (prin)     .prn  \n386schg          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n386schg          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n386schg          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \n386schg          printout         (prin)     .prn  \n386sxvhcom       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n386sxvhcom       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n386sxvhcom       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \n3b1              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \n3b1              harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \n3do              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \n3do_pal          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \n3dobios          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \n3siud            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n3siud            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n3siud            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \n486apio          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n486apio          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n486apio          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \n486apio          printout         (prin)     .prn  \n486ccv           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n486ccv           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n486ccv           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \n486ccv           printout         (prin)     .prn  \n486igb21         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n486igb21         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n486igb21         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \n486igb21         printout         (prin)     .prn  \n486wb6a3         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n486wb6a3         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n486wb6a3         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \n486wb6a3         printout         (prin)     .prn  \n4dmshl3g         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n4dmshl3g         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n4dmshl3g         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \n4dmshl3g         printout         (prin)     .prn  \n4dmuhl3s         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n4dmuhl3s         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n4dmuhl3s         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \n4dmuhl3s         printout         (prin)     .prn  \n4nd04a           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n4nd04a           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \n4nd04a           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \n4nd04a           printout         (prin)     .prn  \n705p3prg         romimage1        (rom1)     .bin  .rom  \n705p3prg         romimage2        (rom2)     .bin  .rom  \n705p5prg         romimage1        (rom1)     .bin  .rom  \n705p5prg         romimage2        (rom2)     .bin  .rom  \n705r3prg         romimage1        (rom1)     .bin  .rom  \n705r3prg         romimage2        (rom2)     .bin  .rom  \n705u3prg         romimage1        (rom1)     .bin  .rom  \n705u3prg         romimage2        (rom2)     .bin  .rom  \n990189           cassette         (cass)     .wav  .flac \n990189           serial           (serl)     .     \n990189v          cassette         (cass)     .wav  .flac \n990189v          serial           (serl)     .     \n99bottles        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \n99bottles        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \n99bottles        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \n99bottles        printout         (prin)     .prn  \na1000            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na1000            printout         (prin)     .prn  \na1000n           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na1000n           printout         (prin)     .prn  \na1200            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na1200            printout         (prin)     .prn  \na1200            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na1200n           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na1200n           printout         (prin)     .prn  \na1200n           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na1200xl          floppydisk1      (flop1)    .atr  .dsk  .xfd  \na1200xl          floppydisk2      (flop2)    .atr  .dsk  .xfd  \na1200xl          floppydisk3      (flop3)    .atr  .dsk  .xfd  \na1200xl          floppydisk4      (flop4)    .atr  .dsk  .xfd  \na1200xl          cartridge        (cart)     .bin  .rom  .car  \na130xe           floppydisk1      (flop1)    .atr  .dsk  .xfd  \na130xe           floppydisk2      (flop2)    .atr  .dsk  .xfd  \na130xe           floppydisk3      (flop3)    .atr  .dsk  .xfd  \na130xe           floppydisk4      (flop4)    .atr  .dsk  .xfd  \na130xe           cartridge        (cart)     .bin  .rom  .car  \na2000            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na2000            printout         (prin)     .prn  \na2000n           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na2000n           printout         (prin)     .prn  \na2600            cartridge        (cart)     .bin  .a26  \na2600p           cartridge        (cart)     .bin  .a26  \na3000            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na3000            printout         (prin)     .prn  \na3000n           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na3000n           printout         (prin)     .prn  \na400             floppydisk1      (flop1)    .atr  .dsk  .xfd  \na400             floppydisk2      (flop2)    .atr  .dsk  .xfd  \na400             floppydisk3      (flop3)    .atr  .dsk  .xfd  \na400             floppydisk4      (flop4)    .atr  .dsk  .xfd  \na400             cartridge        (cart)     .bin  .rom  .car  \na4000            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na4000            printout         (prin)     .prn  \na4000            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na400030          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na400030          printout         (prin)     .prn  \na400030          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na400030n         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na400030n         printout         (prin)     .prn  \na400030n         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na4000n           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na4000n           printout         (prin)     .prn  \na4000n           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na4000t           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na4000t           printout         (prin)     .prn  \na4000t           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na4000tn          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na4000tn          printout         (prin)     .prn  \na4000tn          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na400pal          floppydisk1      (flop1)    .atr  .dsk  .xfd  \na400pal          floppydisk2      (flop2)    .atr  .dsk  .xfd  \na400pal          floppydisk3      (flop3)    .atr  .dsk  .xfd  \na400pal          floppydisk4      (flop4)    .atr  .dsk  .xfd  \na400pal          cartridge        (cart)     .bin  .rom  .car  \na433cc           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na433cc           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na433cc           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na433cc           printout         (prin)     .prn  \na486ap4          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na486ap4          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na486ap4          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na486ap4          printout         (prin)     .prn  \na486isa          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na486isa          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na486isa          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na486isa          printout         (prin)     .prn  \na486sio          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na486sio          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na486sio          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na486sio          printout         (prin)     .prn  \na486sp3          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na486sp3          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \na486sp3          printout         (prin)     .prn  \na486sp3g         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na486sp3g         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na486sp3g         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na486sp3g         printout         (prin)     .prn  \na486sv1          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na486sv1          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na486sv1          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na486sv1          printout         (prin)     .prn  \na486sv2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na486sv2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na486sv2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na486sv2          printout         (prin)     .prn  \na486sv2g         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na486sv2g         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \na486sv2g         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na486sv2g         printout         (prin)     .prn  \na500             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na500             printout         (prin)     .prn  \na500n            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na500n            printout         (prin)     .prn  \na500p            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na500p            printout         (prin)     .prn  \na500pn           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na500pn           printout         (prin)     .prn  \na5105            cassette         (cass)     .wav  .flac \na5105            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \na5105            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \na5105            floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \na5105            floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \na51mxr3k         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na51mxr3ka        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na51site4         printout         (prin)     .prn  \na51site4         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na51site4a        printout         (prin)     .prn  \na51site4a        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na5200            cartridge        (cart)     .bin  .rom  .car  .a52  \na5200a           cartridge        (cart)     .bin  .rom  .car  .a52  \na600             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na600             printout         (prin)     .prn  \na600             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na600n            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \na600n            printout         (prin)     .prn  \na600n            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \na600xl           floppydisk1      (flop1)    .atr  .dsk  .xfd  \na600xl           floppydisk2      (flop2)    .atr  .dsk  .xfd  \na600xl           floppydisk3      (flop3)    .atr  .dsk  .xfd  \na600xl           floppydisk4      (flop4)    .atr  .dsk  .xfd  \na600xl           cartridge        (cart)     .bin  .rom  .car  \na65xe            floppydisk1      (flop1)    .atr  .dsk  .xfd  \na65xe            floppydisk2      (flop2)    .atr  .dsk  .xfd  \na65xe            floppydisk3      (flop3)    .atr  .dsk  .xfd  \na65xe            floppydisk4      (flop4)    .atr  .dsk  .xfd  \na65xe            cartridge        (cart)     .bin  .rom  .car  \na65xea           floppydisk1      (flop1)    .atr  .dsk  .xfd  \na65xea           floppydisk2      (flop2)    .atr  .dsk  .xfd  \na65xea           floppydisk3      (flop3)    .atr  .dsk  .xfd  \na65xea           floppydisk4      (flop4)    .atr  .dsk  .xfd  \na65xea           cartridge        (cart)     .bin  .rom  .car  \na7150            harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \na7150            harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \na7150            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \na7800            cartridge        (cart)     .a78  \na7800p           cartridge        (cart)     .a78  \na800             floppydisk1      (flop1)    .atr  .dsk  .xfd  \na800             floppydisk2      (flop2)    .atr  .dsk  .xfd  \na800             floppydisk3      (flop3)    .atr  .dsk  .xfd  \na800             floppydisk4      (flop4)    .atr  .dsk  .xfd  \na800             cartridge1       (cart1)    .bin  .rom  .car  \na800             cartridge2       (cart2)    .bin  .rom  .car  \na800pal          floppydisk1      (flop1)    .atr  .dsk  .xfd  \na800pal          floppydisk2      (flop2)    .atr  .dsk  .xfd  \na800pal          floppydisk3      (flop3)    .atr  .dsk  .xfd  \na800pal          floppydisk4      (flop4)    .atr  .dsk  .xfd  \na800pal          cartridge1       (cart1)    .bin  .rom  .car  \na800pal          cartridge2       (cart2)    .bin  .rom  .car  \na800xe           floppydisk1      (flop1)    .atr  .dsk  .xfd  \na800xe           floppydisk2      (flop2)    .atr  .dsk  .xfd  \na800xe           floppydisk3      (flop3)    .atr  .dsk  .xfd  \na800xe           floppydisk4      (flop4)    .atr  .dsk  .xfd  \na800xe           cartridge        (cart)     .bin  .rom  .car  \na800xl           floppydisk1      (flop1)    .atr  .dsk  .xfd  \na800xl           floppydisk2      (flop2)    .atr  .dsk  .xfd  \na800xl           floppydisk3      (flop3)    .atr  .dsk  .xfd  \na800xl           floppydisk4      (flop4)    .atr  .dsk  .xfd  \na800xl           cartridge        (cart)     .bin  .rom  .car  \na800xlp          floppydisk1      (flop1)    .atr  .dsk  .xfd  \na800xlp          floppydisk2      (flop2)    .atr  .dsk  .xfd  \na800xlp          floppydisk3      (flop3)    .atr  .dsk  .xfd  \na800xlp          floppydisk4      (flop4)    .atr  .dsk  .xfd  \na800xlp          cartridge        (cart)     .bin  .rom  .car  \naa3000           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa3010           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa3010           printout         (prin)     .prn  \naa3010_de        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa3010_de        printout         (prin)     .prn  \naa3020           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naa3020           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa3020           printout         (prin)     .prn  \naa305            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa310            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa4              harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naa4              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa4              printout         (prin)     .prn  \naa4              romimage         (rom)      .bin  .rom  \naa4000           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naa4000           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa4000           printout         (prin)     .prn  \naa4101           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa4201           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa440            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa4401           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa486s           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naa486s           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \naa486s           printout         (prin)     .prn  \naa500            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa5000           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naa5000           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa5000           printout         (prin)     .prn  \naa5000           romimage         (rom)      .bin  .rom  \naa5000a          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naa5000a          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa5000a          printout         (prin)     .prn  \naa5000a          romimage         (rom)      .bin  .rom  \naa500d           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa540            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa680            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \naa680            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nabae4            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nabae4            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nabae4            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nabae4            printout         (prin)     .prn  \nabah4            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nabah4            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nabah4            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nabah4            printout         (prin)     .prn  \nabav4            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nabav4            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nabav4            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nabav4            printout         (prin)     .prn  \nabax4            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nabax4            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nabax4            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nabax4            printout         (prin)     .prn  \nabc110           cassette         (cass)     .wav  .flac .csw  .uef  \nabc110           printout         (prin)     .prn  \nabc110           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nabc110           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nabc110           romimage1        (rom1)     .rom  .bin  \nabc110           romimage2        (rom2)     .rom  .bin  \nabc110           romimage3        (rom3)     .rom  .bin  \nabc110           romimage4        (rom4)     .rom  .bin  \nabc110           romimage5        (rom5)     .rom  .bin  \nabc1600          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nabc1600          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nabc310           cassette         (cass)     .wav  .flac .csw  .uef  \nabc310           printout         (prin)     .prn  \nabc310           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nabc310           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nabc310           romimage1        (rom1)     .rom  .bin  \nabc310           romimage2        (rom2)     .rom  .bin  \nabc310           romimage3        (rom3)     .rom  .bin  \nabc310           romimage4        (rom4)     .rom  .bin  \nabc310           romimage5        (rom5)     .rom  .bin  \nabc80            cassette         (cass)     .wav  .flac \nabc80            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nabc80            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nabc80            romimage1        (rom1)     .bin  \nabc80            romimage2        (rom2)     .bin  \nabc80            romimage3        (rom3)     .bin  \nabc80            romimage4        (rom4)     .bin  \nabc80            quickload        (quik)     .bac  \nabc800c          cassette         (cass)     .wav  .flac \nabc800c          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nabc800c          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nabc800c          quickload        (quik)     .bac  \nabc800m          cassette         (cass)     .wav  .flac \nabc800m          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nabc800m          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nabc800m          quickload        (quik)     .bac  \nabc802           cassette         (cass)     .wav  .flac \nabc802           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nabc802           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nabc802           quickload        (quik)     .bac  \nabc806           cassette         (cass)     .wav  .flac \nabc806           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nabc806           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nabc806           quickload        (quik)     .bac  \nabc80l           cassette         (cass)     .wav  .flac \nabc80l           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nabc80l           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nabc80l           romimage1        (rom1)     .bin  \nabc80l           romimage2        (rom2)     .bin  \nabc80l           romimage3        (rom3)     .bin  \nabc80l           romimage4        (rom4)     .bin  \nabc80l           quickload        (quik)     .bac  \nabpb4            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nabpb4            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nabpb4            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nabpb4            printout         (prin)     .prn  \nabpi4            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nabpi4            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nabpi4            printout         (prin)     .prn  \nabpm4            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nabpm4            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nabpm4            printout         (prin)     .prn  \nabpv4            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nabpv4            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nabpv4            printout         (prin)     .prn  \nabpw4            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nabpw4            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nabpw4            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nabpw4            printout         (prin)     .prn  \nac1              cassette         (cass)     .wav  .flac \nac1_32           cassette         (cass)     .wav  .flac \nac1scch          cassette         (cass)     .wav  .flac \nace100           floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nace100           floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nace100           cassette         (cass)     .wav  .flac \nace1000          floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nace1000          floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nace1000          cassette         (cass)     .wav  .flac \nace2200          cassette         (cass)     .wav  .flac \nace2200          floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nace2200          floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nace2200          printout         (prin)     .prn  \nace500           printout         (prin)     .prn  \nace500           floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nace500           floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nacrnsys1         cassette         (cass)     .wav  .flac \nacrnsys2         romimage1        (rom1)     .bin  .rom  \nacrnsys2         romimage2        (rom2)     .bin  .rom  \nacrnsys2         cassette         (cass)     .wav  .flac \nacrnsys3         romimage1        (rom1)     .bin  .rom  \nacrnsys3         romimage2        (rom2)     .bin  .rom  \nacrnsys3         romimage3        (rom3)     .bin  .rom  \nacrnsys3         romimage4        (rom4)     .bin  .rom  \nacrnsys3         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  \nacrnsys3         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  \nacrnsys3_6809    printout         (prin)     .prn  \nacrnsys3_6809    romimage1        (rom1)     .bin  .rom  \nacrnsys3_6809    romimage2        (rom2)     .bin  .rom  \nacrnsys3_6809    romimage3        (rom3)     .bin  .rom  \nacrnsys3_6809    romimage4        (rom4)     .bin  .rom  \nacrnsys3_6809    romimage5        (rom5)     .bin  .rom  \nacrnsys3_6809    romimage6        (rom6)     .bin  .rom  \nacrnsys3_6809    cassette         (cass)     .wav  .flac \nacrnsys3_6809    floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  \nacrnsys3_6809    floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  \nacrnsys4         romimage1        (rom1)     .bin  .rom  \nacrnsys4         romimage2        (rom2)     .bin  .rom  \nacrnsys4         romimage3        (rom3)     .bin  .rom  \nacrnsys4         romimage4        (rom4)     .bin  .rom  \nacrnsys4         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  \nacrnsys4         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  \nacrnsys5         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  \nacrnsys5         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  \nacw443           cassette         (cass)     .wav  .flac .csw  .uef  \nacw443           printout         (prin)     .prn  \nacw443           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nacw443           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nacw443           romimage1        (rom1)     .rom  .bin  \nacw443           romimage2        (rom2)     .rom  .bin  \nacw443           romimage3        (rom3)     .rom  .bin  \nacw443           romimage4        (rom4)     .rom  .bin  \nacw443           romimage5        (rom5)     .rom  .bin  \nadam             cassette1        (cass1)    .wav  .flac .ddp  \nadam             cassette2        (cass2)    .wav  .flac .ddp  \nadam             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nadam             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nadam             cartridge1       (cart1)    .rom  .col  .bin  \nadam             cartridge2       (cart2)    .bin  .rom  \nadam             cartridge3       (cart3)    .bin  .rom  \nadam             cartridge4       (cart4)    .bin  .rom  \nadvision         cartridge        (cart)     .bin  \nadvsnha          cartridge        (cart)     .bin  \naerofgtsg        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naes              memcard          (memc)     .neo  \naes              cartridge        (cart)     .bin  \nagat7            floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nagat7            floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nagat7            printout         (prin)     .prn  \nagat7            cassette         (cass)     .wav  .flac \nagat9            floppydisk1      (flop1)    .mfi  .dfi  .ds9  .aim  \nagat9            floppydisk2      (flop2)    .mfi  .dfi  .ds9  .aim  \nagat9            floppydisk3      (flop3)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nagat9            floppydisk4      (flop4)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nagat9            cassette         (cass)     .wav  .flac \nai1000           cartridge1       (cart1)    .bin  \nai1000           cartridge2       (cart2)    .bin  \naim65            cassette1        (cass1)    .wav  .flac \naim65            cassette2        (cass2)    .wav  .flac \naim65            romimage1        (rom1)     .z26  \naim65            romimage2        (rom2)     .z25  \naim65            romimage3        (rom3)     .z24  \naim65            romimage4        (rom4)     .z12  \naim65            romimage5        (rom5)     .z13  \naim65            romimage6        (rom6)     .z14  \naim65            romimage7        (rom7)     .z15  \naimode           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \naiwamcd          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nal486vd          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nal486vd          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nal486vd          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nal486vd          printout         (prin)     .prn  \nal520ex          printout         (prin)     .prn  \nal520ex          snapshot         (dump)     .sna  \nal520ex          cassette         (cass)     .wav  .flac .cdt  \nal520ex          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nal520ex          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nal8800bt         quickload        (quik)     .bin  \nalacou           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalacou           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalacou           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nalacou           printout         (prin)     .prn  \nalaleolx         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalaleolx         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalaleolx         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nalator2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalator2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalator2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nalator2          printout         (prin)     .prn  \nalbert           floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nalbert           floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nalbert           cassette         (cass)     .wav  .flac \nalfa             cassette         (cass)     .wav  .flac .pmd  .tap  .ptp  \nalg3do           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nalice            cassette         (cass)     .wav  .flac .cas  .c10  .k7   \nalice            printout         (prin)     .prn  \nalice            cartridge        (cart)     .mcc  .rom  \nalice32          cassette         (cass)     .wav  .flac .cas  .c10  .k7   \nalice32          printout         (prin)     .prn  \nalice32          cartridge        (cart)     .mcc  .rom  \nalice90          cassette         (cass)     .wav  .flac .cas  .c10  .k7   \nalice90          printout         (prin)     .prn  \nalice90          cartridge        (cart)     .mcc  .rom  \nalien            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nalim1217         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalim1217         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalim1217         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nalim1419         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalim1419         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalim1419         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nalim1419         printout         (prin)     .prn  \nalim1429         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalim1429         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalim1429         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nalim1429         printout         (prin)     .prn  \nalim1489         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalim1489         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalim1489         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nalim1489         printout         (prin)     .prn  \nalphatan         printout         (prin)     .prn  \nalphatan         cassette         (cass)     .wav  .flac \nalphatp1         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nalphatp1         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nalphatp10        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalphatp10        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalphatp10        printout         (prin)     .prn  \nalphatp2         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nalphatp2         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nalphatp2u        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nalphatp2u        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nalphatp3         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nalphatp3         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nalphatp30        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nalphatp30        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nalphatp50        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalphatp50        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nalphatp50        printout         (prin)     .prn  \nalphatpc16       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nalphatpc16       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nalphatpc16       floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nalphatpc16       floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nalphatro         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nalphatro         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nalphatro         cassette         (cass)     .wav  .flac \nalphatro         cartridge        (cart)     .bin  \nalphatrob        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nalphatrob        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nalphatrob        cassette         (cass)     .wav  .flac \nalphatrob        cartridge        (cart)     .bin  \nalphatron        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nalphatron        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nalphatron        cassette         (cass)     .wav  .flac \nalphatron        cartridge        (cart)     .bin  \nalto2            harddisk1        (hard1)    .chd  .dsk  \nalto2            harddisk2        (hard2)    .chd  .dsk  \naltos486         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \naltos5           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \naltos5           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \naltos5           quickload        (quik)     .com  .cpm  \naltos586         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \naltos586         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \naltos586         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \naltos586         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \naltos8600        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \naltos8600        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \naltos8600        floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \naltos8600        floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \naltos8600        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nam100            floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nam100            floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nam100            cassette         (cass)     .wav  .flac \nam4              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \nam4              harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nam64             floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nam64             floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nam64             cassette         (cass)     .wav  .flac \namibaby          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namibaby          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namibaby          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \namibaby          printout         (prin)     .prn  \namient2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namient2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namient2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \namient2          printout         (prin)     .prn  \namient3          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namient3          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namient3          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \namient3          printout         (prin)     .prn  \namient4          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namient4          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namient4          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \namient4          printout         (prin)     .prn  \namisvpci2        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namisvpci2        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namisvpci2        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \namisvpci2        printout         (prin)     .prn  \namisvvlb         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namisvvlb         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namisvvlb         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \namisvvlb         printout         (prin)     .prn  \namisvvlb2        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namisvvlb2        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namisvvlb2        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \namisvvlb2        printout         (prin)     .prn  \namisvvlb3        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namisvvlb3        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \namisvvlb3        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \namisvvlb3        printout         (prin)     .prn  \nampro            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nampro            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nampro            floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nampro            floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \namu880           cassette         (cass)     .wav  .flac \namust            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \namust            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nanakonda         cassette         (cass)     .wav  .flac .rks  \nanch386s         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nanch386s         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nanch386s         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naoap43           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naoap43           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \naoap43           printout         (prin)     .prn  \naovi15g          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naovi15g          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naovi15g          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naovi15g          printout         (prin)     .prn  \napc              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  \napc              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  \napfimag          cartridge        (cart)     .bin  \napfimag          cassette         (cass)     .wav  .flac .cas  .cpf  .apt  \napfimag          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \napfimag          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \napfm1000         cartridge        (cart)     .bin  \naplannb          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naplannb          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naplannb          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naplannb          printout         (prin)     .prn  \naplanst          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naplanst          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naplanst          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naplanst          printout         (prin)     .prn  \naplsbon          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naplsbon          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naplsbon          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naplsbon          printout         (prin)     .prn  \naplscar          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naplscar          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naplscar          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naplscar          printout         (prin)     .prn  \napogee           cassette         (cass)     .wav  .flac .rka  \napollo80         cartridge        (cart)     .st2  .bin  .rom  \napple1           cassette         (cass)     .wav  .flac \napple1           snapshot         (dump)     .snp  \napple2           floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2           floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2           cassette         (cass)     .wav  .flac \napple2c          floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2c          floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2c0         floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c0         floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c0de       floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c0de       floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c0fr       floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c0fr       floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c0se       floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c0se       floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c0uk       floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c0uk       floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c3         floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c3         floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c3de       floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c3de       floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c3fr       floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c3fr       floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c3se       floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c3se       floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c3uk       floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c3uk       floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c4         floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c4         floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c4de       floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c4de       floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c4fr       floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c4fr       floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c4se       floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c4se       floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c4uk       floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2c4uk       floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2cde        floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2cde        floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2cfr        floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2cfr        floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2cp         floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2cp         floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2cp         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2cp         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2cse        floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2cse        floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2cuk        floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2cuk        floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2e          floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2e          floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2e          cassette         (cass)     .wav  .flac \napple2ede        floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2ede        floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2ede        cassette         (cass)     .wav  .flac \napple2ee         floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2ee         floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2ee         cassette         (cass)     .wav  .flac \napple2eede       floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2eede       floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2eede       cassette         (cass)     .wav  .flac \napple2eefr       floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2eefr       floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2eefr       cassette         (cass)     .wav  .flac \napple2ees        floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2ees        floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2ees        cassette         (cass)     .wav  .flac \napple2eese       floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2eese       floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2eese       cassette         (cass)     .wav  .flac \napple2eeuk       floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2eeuk       floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2eeuk       cassette         (cass)     .wav  .flac \napple2efr        floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2efr        floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2efr        cassette         (cass)     .wav  .flac \napple2ep         floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2ep         floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2ep         cassette         (cass)     .wav  .flac \napple2epde       floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2epde       floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2epde       cassette         (cass)     .wav  .flac \napple2epfr       floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2epfr       floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2epfr       cassette         (cass)     .wav  .flac \napple2epse       floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2epse       floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2epse       cassette         (cass)     .wav  .flac \napple2epuk       floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2epuk       floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2epuk       cassette         (cass)     .wav  .flac \napple2ese        floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2ese        floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2ese        cassette         (cass)     .wav  .flac \napple2euk        floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2euk        floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2euk        cassette         (cass)     .wav  .flac \napple2gs         floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2gs         floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2gs         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2gs         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2gsmt       floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2gsmt       floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2gsmt       floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2gsmt       floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2gsr0       floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2gsr0       floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2gsr0       floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2gsr0       floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2gsr0p      floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2gsr0p      floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2gsr0p      floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2gsr0p      floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2gsr0p2     floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2gsr0p2     floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2gsr0p2     floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2gsr0p2     floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2gsr1       floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2gsr1       floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2gsr1       floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2gsr1       floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2gsr3p      floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2gsr3p      floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple2gsr3p      floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2gsr3p      floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \napple2jp         floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2jp         floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2jp         cassette         (cass)     .wav  .flac \napple2p          floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2p          floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2p          cassette         (cass)     .wav  .flac \napple2pe         floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2pe         floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \napple2pe         cassette         (cass)     .wav  .flac \napple3           floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple3           floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple3           floppydisk3      (flop3)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napple3           floppydisk4      (flop4)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \napplix           printout         (prin)     .prn  \napplix           cassette         (cass)     .wav  .flac \napplix           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .raw  \napplix           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .raw  \naprfte           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naprfte           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naprfte           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naprfte           printout         (prin)     .prn  \napricot          printout         (prin)     .prn  \napricot          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \napricot          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \napricotxi        printout         (prin)     .prn  \napricotxi        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \napricotxi        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \naprpand          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naprpand          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naprpand          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naprpand          printout         (prin)     .prn  \napvxft           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \napvxft           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \napvxft           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \napvxft           printout         (prin)     .prn  \napxen            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \napxen            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \napxena1          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \napxena1          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \napxena1          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \napxena1          printout         (prin)     .prn  \napxeni           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \napxeni           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \napxeni           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \napxeni           printout         (prin)     .prn  \napxenls3         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \napxenls3         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \napxenls3         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \napxenls3         printout         (prin)     .prn  \napxenp2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \napxenp2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \napxenp2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \napxenp2          printout         (prin)     .prn  \napxlsam          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \napxlsam          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \napxlsam          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \napxlsam          printout         (prin)     .prn  \naquarius         cassette         (cass)     .wav  .flac .caq  \naquarius         printout         (prin)     .prn  \naquarius         cartridge1       (cart1)    .rom  .bin  \naquarius         cartridge2       (cart2)    .rom  .bin  \naquarius         cartridge3       (cart3)    .rom  .bin  \naquarius2        cassette         (cass)     .wav  .flac .caq  \naquarius2        printout         (prin)     .prn  \naquarius2        cartridge1       (cart1)    .rom  .bin  \naquarius2        cartridge2       (cart2)    .rom  .bin  \naquarius2        cartridge3       (cart3)    .rom  .bin  \naquarius_ar      cassette         (cass)     .wav  .flac .caq  \naquarius_ar      printout         (prin)     .prn  \naquarius_ar      cartridge1       (cart1)    .rom  .bin  \naquarius_ar      cartridge2       (cart2)    .rom  .bin  \naquarius_ar      cartridge3       (cart3)    .rom  .bin  \naquariusp        cassette         (cass)     .wav  .flac .caq  \naquariusp        printout         (prin)     .prn  \naquariusp        cartridge1       (cart1)    .rom  .bin  \naquariusp        cartridge2       (cart2)    .rom  .bin  \naquariusp        cartridge3       (cart3)    .rom  .bin  \nar140            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \nar225            romimage1        (rom1)     .bin  .rom  \nar225            romimage2        (rom2)     .bin  .rom  \nar225            romimage3        (rom3)     .bin  .rom  \nar225            romimage4        (rom4)     .bin  .rom  \nar225            romimage5        (rom5)     .bin  .rom  \nar225            romimage6        (rom6)     .bin  .rom  \nar260            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \nar4glx3          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nar4glx3          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nar4glx3          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nar4glx3          printout         (prin)     .prn  \narb              cartridge        (cart)     .bin  \narcadia          cartridge        (cart)     .bin  \narea51           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \narea51a          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \narea51mx         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \narea51t          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \narea51ta         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nargo             cassette         (cass)     .wav  .flac \nas496            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nas496            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nas496            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nas496            printout         (prin)     .prn  \nasc486slc        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nasc486slc        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nasc486slc        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nasi100b0         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nasi100b0         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nasi100b0         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nasst128          cassette         (cass)     .wav  .flac \nasst128          printout         (prin)     .prn  \nasst128          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nasst128          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nast6000          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nast6000          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nast6000          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nast6000          printout         (prin)     .prn  \nast611           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nast611           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nast611           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nast611           printout         (prin)     .prn  \nastrocde         cartridge        (cart)     .bin  \nastrocdl         cartridge        (cart)     .bin  \nastrocdw         cartridge        (cart)     .bin  \nasuscubx         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nasuscubx         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nasuscubx         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nasuscubx         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nasuscubx         printout         (prin)     .prn  \nasuscusc         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nasuscusc         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nasuscusc         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nasuscusc         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nasuscusc         printout         (prin)     .prn  \nasuspolo         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nasuspolo         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nasuspolo         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nasuspolo         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nasuspolo         printout         (prin)     .prn  \nat               floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nat               floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nat               harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nat386            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nat386            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nat386            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nat386            printout         (prin)     .prn  \nat386sx          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nat386sx          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nat386sx          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nat486            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nat486            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nat486            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nat486            printout         (prin)     .prn  \nat586            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nat586            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nat586            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nat586            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nat586            printout         (prin)     .prn  \nat586x3          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nat586x3          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \natariabc286      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \natariabc286      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \natariabc286      harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nataripc1         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nataripc1         printout         (prin)     .prn  \nataripc3         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nataripc3         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nataripc3         printout         (prin)     .prn  \nataripc4         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nataripc4         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nataripc4         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nataripc5         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nataripc5         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nataripc5         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nataripc5         printout         (prin)     .prn  \natc1415          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \natc1415          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \natc1415          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \natc1415          printout         (prin)     .prn  \natc1425a         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \natc1425a         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \natc1425a         printout         (prin)     .prn  \natc1425b         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \natc1425b         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \natc1425b         printout         (prin)     .prn  \natm              snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \natm              quickload        (quik)     .raw  .scr  \natm              cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \natm              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \natm              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \natm              floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \natm              floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \natmtb2           snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \natmtb2           quickload        (quik)     .raw  .scr  \natmtb2           cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \natmtb2           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \natmtb2           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \natmtb2           floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \natmtb2           floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \natmtb2plus       snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \natmtb2plus       quickload        (quik)     .raw  .scr  \natmtb2plus       cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \natmtb2plus       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \natmtb2plus       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \natmtb2plus       floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \natmtb2plus       floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \natom             cassette         (cass)     .wav  .flac .tap  .csw  .uef  \natom             printout         (prin)     .prn  \natom             quickload        (quik)     .atm  \natom             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .40t  \natom             romimage         (rom)      .bin  .rom  \natombbc          cassette         (cass)     .wav  .flac .tap  .csw  .uef  \natombbc          printout         (prin)     .prn  \natombbc          quickload        (quik)     .atm  \natombbc          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .40t  \natombbc          romimage         (rom)      .bin  .rom  \natomes           cassette         (cass)     .wav  .flac .tap  .csw  .uef  \natomrr           cassette         (cass)     .wav  .flac .tap  .csw  .uef  \natomrr           printout         (prin)     .prn  \natomrr           quickload        (quik)     .atm  \natomrr           romimage         (rom)      .bin  .rom  \natt6300p         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \natt6300p         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \natt6300p         printout         (prin)     .prn  \natt6300p         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \natt6300p         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nattache          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nattache          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nattache816       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nattache816       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \natturbo          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \natturbo          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \natturbo          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naubam12s2        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naubam12s2        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \naubam12s2        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \naussieby         printout         (prin)     .prn  \naussieby         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \naussieby         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \naussieby         quickload        (quik)     .com  .cpm  \nautoc15          printout         (prin)     .prn  \nautoc15          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nautoc15          romimage1        (rom1)     .rom  .bin  \nautoc15          romimage2        (rom2)     .rom  .bin  \nautoc15          romimage3        (rom3)     .rom  .bin  \nautoc15          romimage4        (rom4)     .rom  .bin  \nauvip800         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nauvip800         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nauvip800         printout         (prin)     .prn  \nav20dev          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .adf  .apd  .jfd  .ads  .adm  .adl  .ssd  .bbc  .dsd  .st   .msa  \navalnc12         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalnc13         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalnc25         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalnc25a        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalns12         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalns13         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalns25         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalns25a        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalon20         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalonc          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalonca         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navaloncc         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalonce         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navaloncf         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalons          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalonsa         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalonsc         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalonse         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navalonsf         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \navigo            quickload        (quik)     .app  \navigo_de         quickload        (quik)     .app  \navigo_es         quickload        (quik)     .app  \navigo_fr         quickload        (quik)     .app  \navigo_it         quickload        (quik)     .app  \naviion_4600      harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nax150            cartridge1       (cart1)    .mx1  .bin  .rom  \nax150            cartridge2       (cart2)    .mx1  .bin  .rom  \nax150            printout         (prin)     .prn  \nax150            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nax170            cartridge1       (cart1)    .mx1  .bin  .rom  \nax170            cartridge2       (cart2)    .mx1  .bin  .rom  \nax170            printout         (prin)     .prn  \nax170            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nax20             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nax200            cartridge1       (cart1)    .mx1  .bin  .rom  \nax200            cartridge2       (cart2)    .mx1  .bin  .rom  \nax200            cartridge60pin   (cart60p)  .mx1  .bin  .rom  \nax200            printout         (prin)     .prn  \nax200            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nax200m           cartridge1       (cart1)    .mx1  .bin  .rom  \nax200m           cartridge2       (cart2)    .mx1  .bin  .rom  \nax200m           cartridge60pin   (cart60p)  .mx1  .bin  .rom  \nax200m           midiout          (mout)     .mid  \nax200m           midiin           (min)      .mid  .syx  \nax200m           printout         (prin)     .prn  \nax200m           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nax230            cartridge        (cart)     .mx1  .bin  .rom  \nax230            printout         (prin)     .prn  \nax230            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nax350            cartridge1       (cart1)    .mx1  .bin  .rom  \nax350            cartridge2       (cart2)    .mx1  .bin  .rom  \nax350            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nax350            printout         (prin)     .prn  \nax350            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nax350ii          cartridge1       (cart1)    .mx1  .bin  .rom  \nax350ii          cartridge2       (cart2)    .mx1  .bin  .rom  \nax350ii          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nax350ii          printout         (prin)     .prn  \nax350ii          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nax350iif         cartridge1       (cart1)    .mx1  .bin  .rom  \nax350iif         cartridge2       (cart2)    .mx1  .bin  .rom  \nax350iif         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nax350iif         printout         (prin)     .prn  \nax350iif         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nax370            cartridge1       (cart1)    .mx1  .bin  .rom  \nax370            cartridge2       (cart2)    .mx1  .bin  .rom  \nax370            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nax370            printout         (prin)     .prn  \nax370            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nax500            cartridge1       (cart1)    .mx1  .bin  .rom  \nax500            cartridge2       (cart2)    .mx1  .bin  .rom  \nax500            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nax500            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nax500            cartridge60pin   (cart60p)  .mx1  .bin  .rom  \nax500            printout         (prin)     .prn  \nax500            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nazumanga         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nb128             floppydisk1      (flop1)    .mfi  .dfi  .d80  \nb128             floppydisk2      (flop2)    .mfi  .dfi  .d80  \nb128             cartridge        (cart)     .20   .40   .60   \nb128             quickload        (quik)     .p00  .prg  .t64  \nb128hp           floppydisk1      (flop1)    .mfi  .dfi  .d80  \nb128hp           floppydisk2      (flop2)    .mfi  .dfi  .d80  \nb128hp           cartridge        (cart)     .20   .40   .60   \nb128hp           quickload        (quik)     .p00  .prg  .t64  \nb16              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nb16              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nb16ex2           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nb16ex2           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nb256             floppydisk1      (flop1)    .mfi  .dfi  .d80  \nb256             floppydisk2      (flop2)    .mfi  .dfi  .d80  \nb256             cartridge        (cart)     .20   .40   .60   \nb256             quickload        (quik)     .p00  .prg  .t64  \nb256hp           floppydisk1      (flop1)    .mfi  .dfi  .d80  \nb256hp           floppydisk2      (flop2)    .mfi  .dfi  .d80  \nb256hp           cartridge        (cart)     .20   .40   .60   \nb256hp           quickload        (quik)     .p00  .prg  .t64  \nb2m              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \nb2m              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \nb2mrom           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \nb2mrom           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \nb500             floppydisk1      (flop1)    .mfi  .dfi  .d80  \nb500             floppydisk2      (flop2)    .mfi  .dfi  .d80  \nb500             cartridge        (cart)     .20   .40   .60   \nb500             quickload        (quik)     .p00  .prg  .t64  \nballpom          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbam16a0          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nbam16a0          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nbam16a0          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbam2             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbam2a            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbasf7120         printout         (prin)     .prn  \nbasf7120         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbasf7120         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbasf7120         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbasis108         floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nbasis108         floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nbasis108         cassette         (cass)     .wav  .flac \nbassang2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbassangl         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbatlgear         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbatlgr2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbatlgr2a         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbay1000c         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nbay1000c         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nbay1000c         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbbca             cassette         (cass)     .wav  .flac .csw  .uef  \nbbca             romimage1        (rom1)     .rom  .bin  \nbbca             romimage2        (rom2)     .rom  .bin  \nbbca             romimage3        (rom3)     .rom  .bin  \nbbca             romimage4        (rom4)     .rom  .bin  \nbbcb             cassette         (cass)     .wav  .flac .csw  .uef  \nbbcb             romimage1        (rom1)     .rom  .bin  \nbbcb             romimage2        (rom2)     .rom  .bin  \nbbcb             romimage3        (rom3)     .rom  .bin  \nbbcb             romimage4        (rom4)     .rom  .bin  \nbbcb             romimage5        (rom5)     .bin  .rom  \nbbcb             printout         (prin)     .prn  \nbbcb             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \nbbcb             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \nbbcb_de          cassette         (cass)     .wav  .flac .csw  .uef  \nbbcb_de          romimage1        (rom1)     .rom  .bin  \nbbcb_de          romimage2        (rom2)     .rom  .bin  \nbbcb_de          romimage3        (rom3)     .rom  .bin  \nbbcb_de          romimage4        (rom4)     .rom  .bin  \nbbcb_de          romimage5        (rom5)     .bin  .rom  \nbbcb_de          printout         (prin)     .prn  \nbbcb_de          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \nbbcb_de          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \nbbcb_no          cassette         (cass)     .wav  .flac .csw  .uef  \nbbcb_no          romimage1        (rom1)     .rom  .bin  \nbbcb_no          romimage2        (rom2)     .rom  .bin  \nbbcb_no          romimage3        (rom3)     .rom  .bin  \nbbcb_no          romimage4        (rom4)     .rom  .bin  \nbbcb_no          romimage5        (rom5)     .bin  .rom  \nbbcb_no          printout         (prin)     .prn  \nbbcb_no          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \nbbcb_no          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \nbbcb_us          cassette         (cass)     .wav  .flac .csw  .uef  \nbbcb_us          romimage1        (rom1)     .rom  .bin  \nbbcb_us          romimage2        (rom2)     .rom  .bin  \nbbcb_us          romimage3        (rom3)     .rom  .bin  \nbbcb_us          romimage4        (rom4)     .rom  .bin  \nbbcb_us          romimage5        (rom5)     .bin  .rom  \nbbcb_us          printout         (prin)     .prn  \nbbcb_us          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \nbbcb_us          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \nbbcbc            cartridge        (cart)     .bin  \nbbcbp            cassette         (cass)     .wav  .flac .csw  .uef  \nbbcbp            printout         (prin)     .prn  \nbbcbp            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbcbp            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbcbp            romimage1        (rom1)     .rom  .bin  \nbbcbp            romimage2        (rom2)     .rom  .bin  \nbbcbp            romimage3        (rom3)     .rom  .bin  \nbbcbp            romimage4        (rom4)     .rom  .bin  \nbbcbp            romimage5        (rom5)     .rom  .bin  \nbbcbp128         cassette         (cass)     .wav  .flac .csw  .uef  \nbbcbp128         printout         (prin)     .prn  \nbbcbp128         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbcbp128         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbcbp128         romimage1        (rom1)     .rom  .bin  \nbbcbp128         romimage2        (rom2)     .rom  .bin  \nbbcbp128         romimage3        (rom3)     .rom  .bin  \nbbcbp128         romimage4        (rom4)     .rom  .bin  \nbbcbp128         romimage5        (rom5)     .rom  .bin  \nbbcm             cartridge1       (cart1)    .rom  .bin  \nbbcm             cartridge2       (cart2)    .rom  .bin  \nbbcm             romimage1        (rom1)     .rom  .bin  \nbbcm             cassette         (cass)     .wav  .flac .csw  .uef  \nbbcm             printout         (prin)     .prn  \nbbcm             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbcm             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbcm512          cartridge1       (cart1)    .rom  .bin  \nbbcm512          cartridge2       (cart2)    .rom  .bin  \nbbcm512          romimage1        (rom1)     .rom  .bin  \nbbcm512          cassette         (cass)     .wav  .flac .csw  .uef  \nbbcm512          printout         (prin)     .prn  \nbbcm512          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbcm512          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbcmaiv          cartridge1       (cart1)    .rom  .bin  \nbbcmaiv          cartridge2       (cart2)    .rom  .bin  \nbbcmaiv          romimage1        (rom1)     .rom  .bin  \nbbcmaiv          cassette         (cass)     .wav  .flac .csw  .uef  \nbbcmaiv          printout         (prin)     .prn  \nbbcmaiv          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbcmaiv          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbcmarm          cartridge1       (cart1)    .rom  .bin  \nbbcmarm          cartridge2       (cart2)    .rom  .bin  \nbbcmarm          romimage1        (rom1)     .rom  .bin  \nbbcmarm          cassette         (cass)     .wav  .flac .csw  .uef  \nbbcmarm          printout         (prin)     .prn  \nbbcmarm          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbcmarm          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbcmarm          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbbcmc            printout         (prin)     .prn  \nbbcmc            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbcmc            romimage1        (rom1)     .rom  .bin  \nbbcmc            romimage2        (rom2)     .rom  .bin  \nbbcmc            romimage3        (rom3)     .rom  .bin  \nbbcmc            romimage4        (rom4)     .rom  .bin  \nbbcmc_ar         printout         (prin)     .prn  \nbbcmc_ar         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbcmc_ar         romimage1        (rom1)     .rom  .bin  \nbbcmc_ar         romimage2        (rom2)     .rom  .bin  \nbbcmc_ar         romimage3        (rom3)     .rom  .bin  \nbbcmc_ar         romimage4        (rom4)     .rom  .bin  \nbbcmet           cartridge1       (cart1)    .rom  .bin  \nbbcmet           cartridge2       (cart2)    .rom  .bin  \nbbcmet           romimage         (rom)      .rom  .bin  \nbbcmt            cartridge1       (cart1)    .rom  .bin  \nbbcmt            cartridge2       (cart2)    .rom  .bin  \nbbcmt            romimage1        (rom1)     .rom  .bin  \nbbcmt            cassette         (cass)     .wav  .flac .csw  .uef  \nbbcmt            printout         (prin)     .prn  \nbbcmt            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbcmt            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nbbear            cartridge        (cart)     .vsm  .bin  \nbbh              harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nbbh              cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbbh              harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nbbh              cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbbh2sp           harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nbbh2sp           cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbbh2sp           harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nbbh2sp           cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbbh2spa          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nbbh2spa          cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbbh2spa          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nbbh2spa          cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbbh2spb          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nbbh2spb          cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbbh2spb          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nbbh2spb          cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbbhcotw          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nbbhcotw          cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbbhcotw          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nbbhcotw          cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbbhsc            harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nbbhsc            cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbbhsc            harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nbbhsc            cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbbhsca           harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nbbhsca           cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbbhsca           harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nbbhsca           cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbcs3a            cassette         (cass)     .wav  .flac \nbcs3b            cassette         (cass)     .wav  .flac \nbcs3c            cassette         (cass)     .wav  .flac \nbcs3d            cassette         (cass)     .wav  .flac \nbdesignm         cartridge        (cart)     .bin  \nbdrdown          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbeachspi         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbebox            harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nbebox            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbebox            harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nbebox            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nbebox2           harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nbebox2           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbebox2           harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nbebox2           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nbeena            cartridge        (cart)     .bin  \nbeena            card             (crd)      .png  .jpg  .bmp  \nbestzx           snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nbestzx           quickload        (quik)     .raw  .scr  \nbestzx           cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nbestzx           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nbestzx           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nbestzx           floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nbestzx           floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nbeta             cartridge        (cart)     .bin  .rom  \nbi025c           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nbi025c           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nbi025c           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbigboard         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbigboard         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbigboard         quickload        (quik)     .com  .cpm  \nbigbord2         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbigbord2         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbikiniko         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbinbug           cassette         (cass)     .wav  .flac \nbinbug           quickload        (quik)     .pgm  \nbiofreak         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nbiofreak         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbiofreak         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nbiofreak         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbit90            cartridge        (cart)     .rom  .col  .bin  \nbk0010           cassette         (cass)     .wav  .flac \nbk0010           quickload        (quik)     .bin  \nbk001001         cassette         (cass)     .wav  .flac \nbk001001         quickload        (quik)     .bin  \nbk0010fd         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .bkd  \nbk0010fd         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .bkd  \nbk0010fd         cassette         (cass)     .wav  .flac \nbk0010fd         quickload        (quik)     .bin  \nbk0011           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .bkd  \nbk0011           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .bkd  \nbk0011           cassette         (cass)     .wav  .flac \nbk0011           quickload        (quik)     .bin  \nbk0011m          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .bkd  \nbk0011m          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .bkd  \nbk0011m          cassette         (cass)     .wav  .flac \nbk0011m          quickload        (quik)     .bin  \nbk08             snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nbk08             quickload        (quik)     .raw  .scr  \nbk08             cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nbk8t             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nbk8t             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nbk8t             floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nbk8t             floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nbk8t             cassette         (cass)     .wav  .flac \nbkrankp          cartridge        (cart)     .bin  \nblackbd          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nblackbd          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nblackbda         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nblackbda         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nblackbdb         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nblackbdb         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nblackbdu         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nblackbdu         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nblitz            harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nblitz            cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nblitz            harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nblitz            cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nblitz2k          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nblitz2k          cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nblitz2k          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nblitz2k          cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nblitz99          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nblitz99          cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nblitz99          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nblitz99          cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nblitz99a         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nblitz99a         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nblitz99a         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nblitz99a         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nblitzs           snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nblitzs           quickload        (quik)     .raw  .scr  \nblitzs           cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nbluenote         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nbluenote         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nbluenote         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbluenote         printout         (prin)     .prn  \nbm1stmix         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbm2ndmix         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbm2ndmixa        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbm3              cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbm3              cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbm3              harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbm3              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nbm3              printout         (prin)     .prn  \nbm36th           cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbm36th           cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbm36th           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbm36th           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nbm36th           printout         (prin)     .prn  \nbm37th           cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbm37th           cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbm37th           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbm37th           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nbm37th           printout         (prin)     .prn  \nbm3core          cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbm3core          cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbm3core          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbm3core          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nbm3core          printout         (prin)     .prn  \nbm3final         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbm3final         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbm3final         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbm3final         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nbm3final         printout         (prin)     .prn  \nbm3rdmix         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbm3rdmixa        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbm3rdmixe        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbm4thmix         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbm5thmix         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbm6thmix         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbm7thmix         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmclubmx         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmcmxaac         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmcompm2         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmcompmx         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmcompmxb        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmcorerm         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmdct            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmfinal          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidx           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidx           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidx           printout         (prin)     .prn  \nbmiidx2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidx2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidx2          printout         (prin)     .prn  \nbmiidx3          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidx3          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidx3          printout         (prin)     .prn  \nbmiidx3a         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidx3a         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidx3a         printout         (prin)     .prn  \nbmiidx3b         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidx3b         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidx3b         printout         (prin)     .prn  \nbmiidx4          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidx4          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidx4          printout         (prin)     .prn  \nbmiidx5          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidx5          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidx5          printout         (prin)     .prn  \nbmiidx6          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidx6          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidx6          printout         (prin)     .prn  \nbmiidx6a         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidx6a         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidx6a         printout         (prin)     .prn  \nbmiidx7          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidx7          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidx7          printout         (prin)     .prn  \nbmiidx7a         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidx7a         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidx7a         printout         (prin)     .prn  \nbmiidx8          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidx8          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidx8          printout         (prin)     .prn  \nbmiidxa          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidxa          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidxa          printout         (prin)     .prn  \nbmiidxc          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidxc          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidxc          printout         (prin)     .prn  \nbmiidxc2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidxc2         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidxc2         printout         (prin)     .prn  \nbmiidxca         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidxca         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidxca         printout         (prin)     .prn  \nbmiidxs          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidxs          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidxs          printout         (prin)     .prn  \nbmiidxsa         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbmiidxsa         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbmiidxsa         printout         (prin)     .prn  \nbmjr             cassette         (cass)     .wav  .flac \nbml3             cassette         (cass)     .wav  .flac \nbml3mk2          cassette         (cass)     .wav  .flac \nbml3mk5          cassette         (cass)     .wav  .flac \nbndarc           cartridge        (cart)     .bin  \nbob85            cassette         (cass)     .wav  .flac \nbossa85          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbossa85          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbossb85          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbossb85          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nboxingm          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbrailab4         cassette         (cass)     .wav  .flac \nbrailab4         quickload        (quik)     .htp  \nbruc100          printout         (prin)     .prn  \nbruc100          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nbruc100a         cartridge        (cart)     .mx1  .bin  .rom  \nbruc100a         printout         (prin)     .prn  \nbruc100a         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nbrvbladeg        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbs4thmix         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbscompmx         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbtchamp          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbtltryst         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nbtm2105          cassette         (cass)     .wav  .flac .csw  .uef  \nbtm2105          bitbanger        (bitb)     .     \nbtm2105          printout         (prin)     .prn  \nbujutsu          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nbup25            cartridge        (cart)     .bin  \nbuzztime         cartridge        (cart)     .bin  \nbw12             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbw12             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbw12             printout         (prin)     .prn  \nbw14             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbw14             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbw14             printout         (prin)     .prn  \nbw14d            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbw14d            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbw14d            printout         (prin)     .prn  \nbw2              printout         (prin)     .prn  \nbw2              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nbw230            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nbw230            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nbw230            printout         (prin)     .prn  \nbx256hp          floppydisk1      (flop1)    .mfi  .dfi  .d80  \nbx256hp          floppydisk2      (flop2)    .mfi  .dfi  .d80  \nbx256hp          cartridge        (cart)     .20   .40   .60   \nbx256hp          quickload        (quik)     .p00  .prg  .t64  \nbyte             snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nbyte             quickload        (quik)     .raw  .scr  \nbyte             cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nc116             cassette         (cass)     .wav  .flac .tap  \nc116             floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nc116             cartridge        (cart)     .rom  .bin  \nc116             quickload        (quik)     .p00  .prg  \nc128             cassette         (cass)     .wav  .flac .tap  \nc128             cartridge        (cart)     .80   .a0   .e0   .crt  \nc128             quickload        (quik)     .p00  .prg  \nc128             romimage         (rom)      .bin  .rom  \nc128             floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  .d71  \nc128_de          cassette         (cass)     .wav  .flac .tap  \nc128_de          cartridge        (cart)     .80   .a0   .e0   .crt  \nc128_de          quickload        (quik)     .p00  .prg  \nc128_de          romimage         (rom)      .bin  .rom  \nc128_de          floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  .d71  \nc128_se          cassette         (cass)     .wav  .flac .tap  \nc128_se          cartridge        (cart)     .80   .a0   .e0   .crt  \nc128_se          quickload        (quik)     .p00  .prg  \nc128_se          romimage         (rom)      .bin  .rom  \nc128_se          floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  .d71  \nc128cr           cassette         (cass)     .wav  .flac .tap  \nc128cr           cartridge        (cart)     .80   .a0   .e0   .crt  \nc128cr           quickload        (quik)     .p00  .prg  \nc128cr           romimage         (rom)      .bin  .rom  \nc128cr           floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  .d71  \nc128d            cassette         (cass)     .wav  .flac .tap  \nc128d            cartridge        (cart)     .80   .a0   .e0   .crt  \nc128d            quickload        (quik)     .p00  .prg  \nc128d            romimage         (rom)      .bin  .rom  \nc128d            floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  .d71  \nc128d81          cassette         (cass)     .wav  .flac .tap  \nc128d81          cartridge        (cart)     .80   .a0   .e0   .crt  \nc128d81          quickload        (quik)     .p00  .prg  \nc128d81          romimage         (rom)      .bin  .rom  \nc128d81          floppydisk       (flop)     .mfi  .dfi  .d81  \nc128dcr          cassette         (cass)     .wav  .flac .tap  \nc128dcr          cartridge        (cart)     .80   .a0   .e0   .crt  \nc128dcr          quickload        (quik)     .p00  .prg  \nc128dcr          romimage         (rom)      .bin  .rom  \nc128dcr          floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  .d71  \nc128dcr_de       cassette         (cass)     .wav  .flac .tap  \nc128dcr_de       cartridge        (cart)     .80   .a0   .e0   .crt  \nc128dcr_de       quickload        (quik)     .p00  .prg  \nc128dcr_de       romimage         (rom)      .bin  .rom  \nc128dcr_de       floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  .d71  \nc128dcr_se       cassette         (cass)     .wav  .flac .tap  \nc128dcr_se       cartridge        (cart)     .80   .a0   .e0   .crt  \nc128dcr_se       quickload        (quik)     .p00  .prg  \nc128dcr_se       romimage         (rom)      .bin  .rom  \nc128dcr_se       floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  .d71  \nc128dcrp         cassette         (cass)     .wav  .flac .tap  \nc128dcrp         cartridge        (cart)     .80   .a0   .e0   .crt  \nc128dcrp         quickload        (quik)     .p00  .prg  \nc128dcrp         romimage         (rom)      .bin  .rom  \nc128dcrp         floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  .d71  \nc128dp           cassette         (cass)     .wav  .flac .tap  \nc128dp           cartridge        (cart)     .80   .a0   .e0   .crt  \nc128dp           quickload        (quik)     .p00  .prg  \nc128dp           romimage         (rom)      .bin  .rom  \nc128dp           floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  .d71  \nc128p            cassette         (cass)     .wav  .flac .tap  \nc128p            cartridge        (cart)     .80   .a0   .e0   .crt  \nc128p            quickload        (quik)     .p00  .prg  \nc128p            romimage         (rom)      .bin  .rom  \nc128p            floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  .d71  \nc16              cassette         (cass)     .wav  .flac .tap  \nc16              floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nc16              cartridge        (cart)     .rom  .bin  \nc16              quickload        (quik)     .p00  .prg  \nc16_hu           cassette         (cass)     .wav  .flac .tap  \nc16_hu           floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nc16_hu           cartridge        (cart)     .rom  .bin  \nc16_hu           quickload        (quik)     .p00  .prg  \nc16p             cassette         (cass)     .wav  .flac .tap  \nc16p             floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nc16p             cartridge        (cart)     .rom  .bin  \nc16p             quickload        (quik)     .p00  .prg  \nc1p              cassette         (cass)     .wav  .flac \nc1pmf            cassette         (cass)     .wav  .flac \nc1pmf            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nc232             cassette         (cass)     .wav  .flac .tap  \nc232             floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nc232             cartridge        (cart)     .rom  .bin  \nc232             quickload        (quik)     .p00  .prg  \nc264             cassette         (cass)     .wav  .flac .tap  \nc264             floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nc264             cartridge        (cart)     .rom  .bin  \nc264             quickload        (quik)     .p00  .prg  \nc2717            cassette         (cass)     .wav  .flac .pmd  .tap  .ptp  \nc2717pmd         cassette         (cass)     .wav  .flac .pmd  .tap  .ptp  \nc286lt           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nc286lt           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nc286lt           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nc2color          cartridge        (cart)     .bin  \nc386sx16         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nc386sx16         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nc386sx16         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nc386sx25         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nc386sx25         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nc386sx25         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nc386sxlt         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nc386sxlt         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nc386sxlt         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nc64              cassette         (cass)     .wav  .flac .tap  \nc64              floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nc64              cartridge        (cart)     .80   .a0   .e0   .crt  \nc64              quickload        (quik)     .p00  .prg  .t64  \nc64_jp           cassette         (cass)     .wav  .flac .tap  \nc64_jp           floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nc64_jp           cartridge        (cart)     .80   .a0   .e0   .crt  \nc64_jp           quickload        (quik)     .p00  .prg  .t64  \nc64_se           cassette         (cass)     .wav  .flac .tap  \nc64_se           floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nc64_se           cartridge        (cart)     .80   .a0   .e0   .crt  \nc64_se           quickload        (quik)     .p00  .prg  .t64  \nc64c             cassette         (cass)     .wav  .flac .tap  \nc64c             floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nc64c             cartridge        (cart)     .80   .a0   .e0   .crt  \nc64c             quickload        (quik)     .p00  .prg  .t64  \nc64c_es          cassette         (cass)     .wav  .flac .tap  \nc64c_es          floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nc64c_es          cartridge        (cart)     .80   .a0   .e0   .crt  \nc64c_es          quickload        (quik)     .p00  .prg  .t64  \nc64c_se          cassette         (cass)     .wav  .flac .tap  \nc64c_se          floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nc64c_se          cartridge        (cart)     .80   .a0   .e0   .crt  \nc64c_se          quickload        (quik)     .p00  .prg  .t64  \nc64cp            cassette         (cass)     .wav  .flac .tap  \nc64cp            floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nc64cp            cartridge        (cart)     .80   .a0   .e0   .crt  \nc64cp            quickload        (quik)     .p00  .prg  .t64  \nc64dx            cartridge        (cart)     .bin  \nc64g             cassette         (cass)     .wav  .flac .tap  \nc64g             floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nc64g             cartridge        (cart)     .80   .a0   .e0   .crt  \nc64g             quickload        (quik)     .p00  .prg  .t64  \nc64gs            cartridge        (cart)     .80   .a0   .e0   .crt  \nc64gs            quickload        (quik)     .p00  .prg  .t64  \nc64p             cassette         (cass)     .wav  .flac .tap  \nc64p             floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nc64p             cartridge        (cart)     .80   .a0   .e0   .crt  \nc64p             quickload        (quik)     .p00  .prg  .t64  \nc65              cartridge        (cart)     .bin  \nc80              cassette         (cass)     .wav  .flac \ncadd810          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncadd810          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncadd810          printout         (prin)     .prn  \ncalchase         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncalspeed         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ncalspeed         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncalspeed         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ncalspeed         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncalspeeda        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ncalspeeda        cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncalspeeda        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ncalspeeda        cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncalspeedb        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ncalspeedb        cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncalspeedb        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ncalspeedb        cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncan09t           cassette         (cass)     .wav  .flac \ncanonv10         cartridge1       (cart1)    .mx1  .bin  .rom  \ncanonv10         cartridge2       (cart2)    .mx1  .bin  .rom  \ncanonv10         printout         (prin)     .prn  \ncanonv10         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncanonv20         cartridge1       (cart1)    .mx1  .bin  .rom  \ncanonv20         cartridge2       (cart2)    .mx1  .bin  .rom  \ncanonv20         printout         (prin)     .prn  \ncanonv20         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncanonv20e        cartridge1       (cart1)    .mx1  .bin  .rom  \ncanonv20e        cartridge2       (cart2)    .mx1  .bin  .rom  \ncanonv20e        printout         (prin)     .prn  \ncanonv20e        cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncanonv20f        cartridge1       (cart1)    .mx1  .bin  .rom  \ncanonv20f        cartridge2       (cart2)    .mx1  .bin  .rom  \ncanonv20f        printout         (prin)     .prn  \ncanonv20f        cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncanonv20g        cartridge1       (cart1)    .mx1  .bin  .rom  \ncanonv20g        cartridge2       (cart2)    .mx1  .bin  .rom  \ncanonv20g        printout         (prin)     .prn  \ncanonv20g        cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncanonv20s        cartridge1       (cart1)    .mx1  .bin  .rom  \ncanonv20s        cartridge2       (cart2)    .mx1  .bin  .rom  \ncanonv20s        printout         (prin)     .prn  \ncanonv20s        cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncanonv25         cartridge1       (cart1)    .mx1  .bin  .rom  \ncanonv25         cartridge2       (cart2)    .mx1  .bin  .rom  \ncanonv25         printout         (prin)     .prn  \ncanonv25         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncanonv30f        cartridge1       (cart1)    .mx1  .bin  .rom  \ncanonv30f        cartridge2       (cart2)    .mx1  .bin  .rom  \ncanonv30f        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \ncanonv30f        printout         (prin)     .prn  \ncanonv30f        cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncanonv8          cartridge        (cart)     .mx1  .bin  .rom  \ncanonv8          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncarbeena         cartridge        (cart)     .bin  \ncarmarty         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \ncarmarty         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncarmarty         memcard          (memc)     .icm  \ncarnevil         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ncarnevil         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncarnevil         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ncarnevil         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncarnevil1        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ncarnevil1        cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncarnevil1        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ncarnevil1        cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncarnivac         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncarnivac         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncarnking         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ncarnking         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncarnking         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ncarnking         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncartfury         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ncartfury         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncartfury         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ncartfury         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncasiorom         cartridge        (cart)     .bin  \ncasloopy         cartridge        (cart)     .bin  \ncassvisn         cartridge        (cart)     .bin  \ncbm3008          floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm3008          floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm3008          cassette         (cass)     .wav  .flac .tap  \ncbm3008          quickload        (quik)     .p00  .prg  \ncbm3008          cartridge1       (cart1)    .bin  .rom  \ncbm3008          cartridge2       (cart2)    .bin  .rom  \ncbm3016          floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm3016          floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm3016          cassette         (cass)     .wav  .flac .tap  \ncbm3016          quickload        (quik)     .p00  .prg  \ncbm3016          cartridge1       (cart1)    .bin  .rom  \ncbm3016          cartridge2       (cart2)    .bin  .rom  \ncbm3032          floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm3032          floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm3032          cassette         (cass)     .wav  .flac .tap  \ncbm3032          quickload        (quik)     .p00  .prg  \ncbm3032          cartridge1       (cart1)    .bin  .rom  \ncbm3032          cartridge2       (cart2)    .bin  .rom  \ncbm3032b         floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm3032b         floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm3032b         cassette         (cass)     .wav  .flac .tap  \ncbm3032b         quickload        (quik)     .p00  .prg  \ncbm3032b         cartridge1       (cart1)    .bin  .rom  \ncbm3032b         cartridge2       (cart2)    .bin  .rom  \ncbm3032b         cartridge3       (cart3)    .bin  .rom  \ncbm4016          floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm4016          floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm4016          cassette         (cass)     .wav  .flac .tap  \ncbm4016          quickload        (quik)     .p00  .prg  \ncbm4016          cartridge1       (cart1)    .bin  .rom  \ncbm4016          cartridge2       (cart2)    .bin  .rom  \ncbm4032          floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm4032          floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm4032          cassette         (cass)     .wav  .flac .tap  \ncbm4032          quickload        (quik)     .p00  .prg  \ncbm4032          cartridge1       (cart1)    .bin  .rom  \ncbm4032          cartridge2       (cart2)    .bin  .rom  \ncbm4032b         floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm4032b         floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm4032b         cassette         (cass)     .wav  .flac .tap  \ncbm4032b         quickload        (quik)     .p00  .prg  \ncbm4032b         cartridge1       (cart1)    .bin  .rom  \ncbm4032b         cartridge2       (cart2)    .bin  .rom  \ncbm4032f         floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm4032f         floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ncbm4032f         cassette         (cass)     .wav  .flac .tap  \ncbm4032f         quickload        (quik)     .p00  .prg  \ncbm4032f         cartridge1       (cart1)    .bin  .rom  \ncbm4032f         cartridge2       (cart2)    .bin  .rom  \ncbm610           floppydisk1      (flop1)    .mfi  .dfi  .d80  \ncbm610           floppydisk2      (flop2)    .mfi  .dfi  .d80  \ncbm610           cartridge        (cart)     .20   .40   .60   \ncbm610           quickload        (quik)     .p00  .prg  .t64  \ncbm620           floppydisk1      (flop1)    .mfi  .dfi  .d80  \ncbm620           floppydisk2      (flop2)    .mfi  .dfi  .d80  \ncbm620           cartridge        (cart)     .20   .40   .60   \ncbm620           quickload        (quik)     .p00  .prg  .t64  \ncbm620_hu        floppydisk1      (flop1)    .mfi  .dfi  .d80  \ncbm620_hu        floppydisk2      (flop2)    .mfi  .dfi  .d80  \ncbm620_hu        cartridge        (cart)     .20   .40   .60   \ncbm620_hu        quickload        (quik)     .p00  .prg  .t64  \ncbm710           floppydisk1      (flop1)    .mfi  .dfi  .d80  \ncbm710           floppydisk2      (flop2)    .mfi  .dfi  .d80  \ncbm710           cartridge        (cart)     .20   .40   .60   \ncbm710           quickload        (quik)     .p00  .prg  .t64  \ncbm720           floppydisk1      (flop1)    .mfi  .dfi  .d80  \ncbm720           floppydisk2      (flop2)    .mfi  .dfi  .d80  \ncbm720           cartridge        (cart)     .20   .40   .60   \ncbm720           quickload        (quik)     .p00  .prg  .t64  \ncbm720_de        floppydisk1      (flop1)    .mfi  .dfi  .d80  \ncbm720_de        floppydisk2      (flop2)    .mfi  .dfi  .d80  \ncbm720_de        cartridge        (cart)     .20   .40   .60   \ncbm720_de        quickload        (quik)     .p00  .prg  .t64  \ncbm720_se        floppydisk1      (flop1)    .mfi  .dfi  .d80  \ncbm720_se        floppydisk2      (flop2)    .mfi  .dfi  .d80  \ncbm720_se        cartridge        (cart)     .20   .40   .60   \ncbm720_se        quickload        (quik)     .p00  .prg  .t64  \ncbm730           floppydisk1      (flop1)    .mfi  .dfi  .d80  \ncbm730           floppydisk2      (flop2)    .mfi  .dfi  .d80  \ncbm730           cartridge        (cart)     .20   .40   .60   \ncbm730           quickload        (quik)     .p00  .prg  .t64  \ncbm8032          floppydisk1      (flop1)    .mfi  .dfi  .d80  \ncbm8032          floppydisk2      (flop2)    .mfi  .dfi  .d80  \ncbm8032          cassette         (cass)     .wav  .flac .tap  \ncbm8032          quickload        (quik)     .p00  .prg  \ncbm8032          cartridge1       (cart1)    .bin  .rom  \ncbm8032          cartridge2       (cart2)    .bin  .rom  \ncbm8032_de       floppydisk1      (flop1)    .mfi  .dfi  .d80  \ncbm8032_de       floppydisk2      (flop2)    .mfi  .dfi  .d80  \ncbm8032_de       cassette         (cass)     .wav  .flac .tap  \ncbm8032_de       quickload        (quik)     .p00  .prg  \ncbm8032_de       cartridge1       (cart1)    .bin  .rom  \ncbm8032_de       cartridge2       (cart2)    .bin  .rom  \ncbm8032_fr       floppydisk1      (flop1)    .mfi  .dfi  .d80  \ncbm8032_fr       floppydisk2      (flop2)    .mfi  .dfi  .d80  \ncbm8032_fr       cassette         (cass)     .wav  .flac .tap  \ncbm8032_fr       quickload        (quik)     .p00  .prg  \ncbm8032_fr       cartridge1       (cart1)    .bin  .rom  \ncbm8032_fr       cartridge2       (cart2)    .bin  .rom  \ncbm8032_se       floppydisk1      (flop1)    .mfi  .dfi  .d80  \ncbm8032_se       floppydisk2      (flop2)    .mfi  .dfi  .d80  \ncbm8032_se       cassette         (cass)     .wav  .flac .tap  \ncbm8032_se       quickload        (quik)     .p00  .prg  \ncbm8032_se       cartridge1       (cart1)    .bin  .rom  \ncbm8032_se       cartridge2       (cart2)    .bin  .rom  \ncbm8096          floppydisk1      (flop1)    .mfi  .dfi  .d80  \ncbm8096          floppydisk2      (flop2)    .mfi  .dfi  .d80  \ncbm8096          cassette         (cass)     .wav  .flac .tap  \ncbm8096          quickload        (quik)     .p00  .prg  \ncbm8096          cartridge1       (cart1)    .bin  .rom  \ncbm8096          cartridge2       (cart2)    .bin  .rom  \ncbm8296          floppydisk1      (flop1)    .mfi  .dfi  .d80  .d82  \ncbm8296          floppydisk2      (flop2)    .mfi  .dfi  .d80  .d82  \ncbm8296          cassette         (cass)     .wav  .flac .tap  \ncbm8296          quickload        (quik)     .p00  .prg  \ncbm8296          cartridge1       (cart1)    .bin  .rom  \ncbm8296          cartridge2       (cart2)    .bin  .rom  \ncbm8296d         floppydisk1      (flop1)    .mfi  .dfi  .d80  .d82  \ncbm8296d         floppydisk2      (flop2)    .mfi  .dfi  .d80  .d82  \ncbm8296d         cassette         (cass)     .wav  .flac .tap  \ncbm8296d         quickload        (quik)     .p00  .prg  \ncbm8296d         cartridge1       (cart1)    .bin  .rom  \ncbm8296d         cartridge2       (cart2)    .bin  .rom  \ncbm8296d_de      floppydisk1      (flop1)    .mfi  .dfi  .d80  .d82  \ncbm8296d_de      floppydisk2      (flop2)    .mfi  .dfi  .d80  .d82  \ncbm8296d_de      cassette         (cass)     .wav  .flac .tap  \ncbm8296d_de      quickload        (quik)     .p00  .prg  \ncbm8296d_de      cartridge1       (cart1)    .bin  .rom  \ncbm8296d_de      cartridge2       (cart2)    .bin  .rom  \ncbm8296dgv_de    floppydisk1      (flop1)    .mfi  .dfi  .d80  .d82  \ncbm8296dgv_de    floppydisk2      (flop2)    .mfi  .dfi  .d80  .d82  \ncbm8296dgv_de    cassette         (cass)     .wav  .flac .tap  \ncbm8296dgv_de    quickload        (quik)     .p00  .prg  \ncbm8296dgv_de    cartridge1       (cart1)    .bin  .rom  \ncbm8296dgv_de    cartridge2       (cart2)    .bin  .rom  \ncbm8296ed        floppydisk1      (flop1)    .mfi  .dfi  .d80  .d82  \ncbm8296ed        floppydisk2      (flop2)    .mfi  .dfi  .d80  .d82  \ncbm8296ed        cassette         (cass)     .wav  .flac .tap  \ncbm8296ed        quickload        (quik)     .p00  .prg  \ncbm8296ed        cartridge1       (cart1)    .bin  .rom  \ncbm8296ed        cartridge2       (cart2)    .bin  .rom  \ncbm8296gd        floppydisk1      (flop1)    .mfi  .dfi  .d80  .d82  \ncbm8296gd        floppydisk2      (flop2)    .mfi  .dfi  .d80  .d82  \ncbm8296gd        cassette         (cass)     .wav  .flac .tap  \ncbm8296gd        quickload        (quik)     .p00  .prg  \ncbm8296gd        cartridge1       (cart1)    .bin  .rom  \ncbm8296gd        cartridge2       (cart2)    .bin  .rom  \ncc40             cartridge        (cart)     .bin  .rom  .256  \ncc40p            cartridge        (cart)     .bin  .rom  .256  \ncc40p            cassette         (cass)     .wav  .flac \nccfboxa          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nccs2422          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nccs300           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ncd2650           quickload        (quik)     .pgm  \ncd2650           cassette         (cass)     .wav  .flac \ncd3000i          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  \ncd3000i          midiin           (min)      .mid  .syx  \ncd3000i          midiout          (mout)     .mid  \ncd3000i          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncd3000i          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncd3000xl         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  \ncd3000xl         midiin           (min)      .mid  .syx  \ncd3000xl         midiout          (mout)     .mid  \ncd3000xl         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncd3000xl         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncd32             printout         (prin)     .prn  \ncd32             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncd32n            printout         (prin)     .prn  \ncd32n            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncd6809           cassette         (cass)     .wav  .flac .cas  \ncd6809           printout         (prin)     .prn  \ncd6809           cartridge        (cart)     .ccc  .rom  \ncd6809           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncd6809           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncd6809           harddisk1        (hard1)    .vhd  \ncd6809           harddisk2        (hard2)    .vhd  \ncdi490a          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncdi910           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncdibios          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncdimono1         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncdimono2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncdtekg2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncdtekg2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncdtekg2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncdtv             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \ncdtv             printout         (prin)     .prn  \ncdtv             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncdtvn            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .adf  .ipf  \ncdtvn            printout         (prin)     .prn  \ncdtvn            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncdx              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncec2000          cassette         (cass)     .wav  .flac \ncec2000          floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \ncec2000          floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \ncece             cassette         (cass)     .wav  .flac \ncece             floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \ncece             floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \ncecg             cassette         (cass)     .wav  .flac \ncecg             floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \ncecg             floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nceci             cassette         (cass)     .wav  .flac \nceci             floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nceci             floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \ncecm             cassette         (cass)     .wav  .flac \ncecm             floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \ncecm             floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nceres1           harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nceres1           harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nceres1           harddisk3        (hard3)    .chd  .hd   .hdv  .2mg  .hdi  \nceres1           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ncf1200           cartridge1       (cart1)    .mx1  .bin  .rom  \ncf1200           cartridge2       (cart2)    .mx1  .bin  .rom  \ncf1200           printout         (prin)     .prn  \ncf1200           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncf2000           cartridge1       (cart1)    .mx1  .bin  .rom  \ncf2000           cartridge2       (cart2)    .mx1  .bin  .rom  \ncf2000           printout         (prin)     .prn  \ncf2000           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncf2700           cartridge1       (cart1)    .mx1  .bin  .rom  \ncf2700           cartridge2       (cart2)    .mx1  .bin  .rom  \ncf2700           printout         (prin)     .prn  \ncf2700           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncf2700g          cartridge1       (cart1)    .mx1  .bin  .rom  \ncf2700g          cartridge2       (cart2)    .mx1  .bin  .rom  \ncf2700g          printout         (prin)     .prn  \ncf2700g          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncf2700uk         cartridge1       (cart1)    .mx1  .bin  .rom  \ncf2700uk         cartridge2       (cart2)    .mx1  .bin  .rom  \ncf2700uk         printout         (prin)     .prn  \ncf2700uk         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncf3000           cartridge1       (cart1)    .mx1  .bin  .rom  \ncf3000           cartridge2       (cart2)    .mx1  .bin  .rom  \ncf3000           printout         (prin)     .prn  \ncf3000           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncf3300           cartridge1       (cart1)    .mx1  .bin  .rom  \ncf3300           cartridge2       (cart2)    .mx1  .bin  .rom  \ncf3300           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \ncf3300           printout         (prin)     .prn  \ncf3300           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncfa3000          cartridge1       (cart1)    .rom  .bin  \ncfa3000          cartridge2       (cart2)    .rom  .bin  \ncfa3000          romimage1        (rom1)     .rom  .bin  \ncfa3000          cassette         (cass)     .wav  .flac .csw  .uef  \ncfa3000          printout         (prin)     .prn  \ncfa3000bp        cassette         (cass)     .wav  .flac .csw  .uef  \ncfa3000bp        printout         (prin)     .prn  \ncfa3000bp        romimage1        (rom1)     .rom  .bin  \ncfa3000bp        romimage2        (rom2)     .rom  .bin  \ncfa3000bp        romimage3        (rom3)     .rom  .bin  \ncfa3000bp        romimage4        (rom4)     .rom  .bin  \ncfa3000bp        romimage5        (rom5)     .rom  .bin  \ncfield           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncgenie           cassette         (cass)     .wav  .flac .cas  \ncgenienz         cassette         (cass)     .wav  .flac .cas  \nch48633c         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nch48633c         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nch48633c         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nch48633c         printout         (prin)     .prn  \nch486spm         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nch486spm         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nch486spm         printout         (prin)     .prn  \nch491e           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nch491e           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nch491e           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nch491e           printout         (prin)     .prn  \nch4slez1         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nch4slez1         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nch4slez1         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nch4slez1         printout         (prin)     .prn  \nch4spi           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nch4spi           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nch4spi           printout         (prin)     .prn  \nchalgear         cartridge        (cart)     .bin  \nchannelf         cartridge        (cart)     .bin  .chf  \nchannlf2         cartridge        (cart)     .bin  .chf  \nchaoshea         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nchaosheaj        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nchesskng         cartridge        (cart)     .bin  \nchessmstdm       cartridge        (cart)     .bin  \nchloe            snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nchloe            quickload        (quik)     .raw  .scr  \nchloe            cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nchloe            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nchn333sc         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nchn333sc         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nchn333sc         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nchn333sc         printout         (prin)     .prn  \nchocomk          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nchocovdr         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncip01            snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ncip01            quickload        (quik)     .raw  .scr  \ncip01            cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ncip03            snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ncip03            quickload        (quik)     .raw  .scr  \ncip03            cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nckz80            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ncl28612s         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncl28612s         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncl28612s         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncleoftp          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nclikstrt         cartridge        (cart)     .bin  \nclipper          cassette         (cass)     .wav  .flac .tap  \nclipper          floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nclipper          cartridge        (cart)     .80   .a0   .e0   .crt  \nclipper          quickload        (quik)     .p00  .prg  .t64  \nclubkcyc         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nclubkcyco        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncm1200           cartridge        (cart)     .st2  .bin  .rom  \ncm32p            cartridge        (cart)     .bin  \ncmi2x            midiout1         (mout1)    .mid  \ncmi2x            midiout2         (mout2)    .mid  \ncmi2x            midiout3         (mout3)    .mid  \ncmi2x            midiout4         (mout4)    .mid  \ncmi2x            midiin1          (min1)     .mid  .syx  \ncmi2x            midiin2          (min2)     .mid  .syx  \ncmi2x            midiin3          (min3)     .mid  .syx  \ncmi2x            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ncmi2x            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ncmpa286          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncmpa286          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncmpa286          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncms6502          printout         (prin)     .prn  \ncms6502          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  .dsd  \ncms6502          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  .dsd  \ncndypuzl         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncobra80          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ncobra80          quickload        (quik)     .raw  .scr  \ncobra80          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ncobrasp          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ncobrasp          quickload        (quik)     .raw  .scr  \ncobrasp          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ncoco             cassette         (cass)     .wav  .flac .cas  \ncoco             printout         (prin)     .prn  \ncoco             cartridge        (cart)     .ccc  .rom  \ncoco             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncoco             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncoco             harddisk1        (hard1)    .vhd  \ncoco             harddisk2        (hard2)    .vhd  \ncoco2b           cassette         (cass)     .wav  .flac .cas  \ncoco2b           printout         (prin)     .prn  \ncoco2b           cartridge        (cart)     .ccc  .rom  \ncoco2b           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncoco2b           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncoco2b           harddisk1        (hard1)    .vhd  \ncoco2b           harddisk2        (hard2)    .vhd  \ncoco2bh          cassette         (cass)     .wav  .flac .cas  \ncoco2bh          printout         (prin)     .prn  \ncoco2bh          cartridge        (cart)     .ccc  .rom  \ncoco2bh          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncoco2bh          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncoco2bh          harddisk1        (hard1)    .vhd  \ncoco2bh          harddisk2        (hard2)    .vhd  \ncoco3            cassette         (cass)     .wav  .flac .cas  \ncoco3            printout         (prin)     .prn  \ncoco3            harddisk1        (hard1)    .vhd  \ncoco3            harddisk2        (hard2)    .vhd  \ncoco3            cartridge        (cart)     .ccc  .rom  \ncoco3            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncoco3            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncoco3h           cassette         (cass)     .wav  .flac .cas  \ncoco3h           printout         (prin)     .prn  \ncoco3h           harddisk1        (hard1)    .vhd  \ncoco3h           harddisk2        (hard2)    .vhd  \ncoco3h           cartridge        (cart)     .ccc  .rom  \ncoco3h           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncoco3h           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncoco3p           cassette         (cass)     .wav  .flac .cas  \ncoco3p           printout         (prin)     .prn  \ncoco3p           harddisk1        (hard1)    .vhd  \ncoco3p           harddisk2        (hard2)    .vhd  \ncoco3p           cartridge        (cart)     .ccc  .rom  \ncoco3p           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncoco3p           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncocoh            cassette         (cass)     .wav  .flac .cas  \ncocoh            printout         (prin)     .prn  \ncocoh            cartridge        (cart)     .ccc  .rom  \ncocoh            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncocoh            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncocoh            harddisk1        (hard1)    .vhd  \ncocoh            harddisk2        (hard2)    .vhd  \ncode1d           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncode1db          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncoh1000w         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncoleco           cartridge        (cart)     .rom  .col  .bin  \ncolecop          cartridge        (cart)     .rom  .col  .bin  \ncomdesk          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncomdesk          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncomdesk          printout         (prin)     .prn  \ncomebaby         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncomebaby         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncomebaby         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \ncomebaby         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \ncomebaby         printout         (prin)     .prn  \ncompani1         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ncompani1         quickload        (quik)     .raw  .scr  \ncompani1         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ncompc1           printout1        (prin1)    .prn  \ncompc1           printout2        (prin2)    .prn  \ncompc1           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncompc1           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncompc10          printout1        (prin1)    .prn  \ncompc10          printout2        (prin2)    .prn  \ncompc10          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncompc10          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncompclr2         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .ccvf \ncompis           cassette         (cass)     .wav  .flac \ncompis           printout         (prin)     .prn  \ncompis           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \ncompis           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \ncompis2          cassette         (cass)     .wav  .flac \ncompis2          printout         (prin)     .prn  \ncompis2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \ncompis2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \ncomport          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncomport          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncomport          printout         (prin)     .prn  \ncomportii        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncomportii        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ncomportii        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ncomportiii       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncomportiii       harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ncomportiii       harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ncomslt286        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncomslt286        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncomslt286        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncomt386          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncomt386          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncomt386          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncomt386          printout         (prin)     .prn  \ncomt486          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncomt486          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncomt486          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncomt486          printout         (prin)     .prn  \ncomx35n          quickload        (quik)     .comx \ncomx35n          cassette         (cass)     .wav  .flac \ncomx35n          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \ncomx35p          quickload        (quik)     .comx \ncomx35p          cassette         (cass)     .wav  .flac \ncomx35p          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nconc             cartridge        (cart)     .bin  \nconca            cartridge        (cart)     .bin  \nconcams          cartridge        (cart)     .bin  \nconcams5         cartridge        (cart)     .bin  \nconcept          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  \nconcept          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  \nconcept          floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  \nconcept          floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  \nconcgla          cartridge        (cart)     .bin  \nconcglap         cartridge        (cart)     .bin  \nconcglapa        cartridge        (cart)     .bin  \nconcvicp         cartridge        (cart)     .bin  \nconfmiss         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncopera           cartridge        (cart)     .bin  .md   \ncoppc21          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncoppc21          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncoppc21          printout         (prin)     .prn  \ncoppc400         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncoppc400         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncoppc400         printout         (prin)     .prn  \ncorona           romimage         (rom)      .bin  \ncoronaa          romimage         (rom)      .bin  \ncoronab          romimage         (rom)      .bin  \ncosmicos         quickload        (quik)     .bin  \ncosmicos         cassette         (cass)     .wav  .flac \ncp1              cassette         (cass)     .wav  .flac \ncp1              quickload        (quik)     .obj  \ncp400            cassette         (cass)     .wav  .flac .cas  \ncp400            printout         (prin)     .prn  \ncp400            cartridge        (cart)     .ccc  .rom  \ncp400            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncp400            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncp400            harddisk1        (hard1)    .vhd  \ncp400            harddisk2        (hard2)    .vhd  \ncp400c2          cassette         (cass)     .wav  .flac .cas  \ncp400c2          printout         (prin)     .prn  \ncp400c2          cartridge        (cart)     .ccc  .rom  \ncp400c2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncp400c2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ncp400c2          harddisk1        (hard1)    .vhd  \ncp400c2          harddisk2        (hard2)    .vhd  \ncp500            cassette         (cass)     .wav  .flac .cas  \ncp500            quickload        (quik)     .cmd  \ncp500            floppydisk1      (flop1)    .mfi  .dfi  .imd  .jv3  .dsk  .dmk  .jv1  \ncp500            floppydisk2      (flop2)    .mfi  .dfi  .imd  .jv3  .dsk  .dmk  .jv1  \ncp500            printout         (prin)     .prn  \ncpc300           cartridge        (cart)     .mx1  .bin  .rom  \ncpc300           printout         (prin)     .prn  \ncpc300           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncpc300e          cartridge        (cart)     .mx1  .bin  .rom  \ncpc300e          printout         (prin)     .prn  \ncpc300e          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncpc330k          cartridge        (cart)     .mx1  .bin  .rom  \ncpc330k          printout         (prin)     .prn  \ncpc330k          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncpc400           cartridge        (cart)     .mx1  .bin  .rom  \ncpc400           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \ncpc400           printout         (prin)     .prn  \ncpc400           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncpc400s          cartridge        (cart)     .mx1  .bin  .rom  \ncpc400s          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \ncpc400s          printout         (prin)     .prn  \ncpc400s          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncpc464           printout         (prin)     .prn  \ncpc464           snapshot         (dump)     .sna  \ncpc464           cassette         (cass)     .wav  .flac .cdt  \ncpc464p          printout         (prin)     .prn  \ncpc464p          snapshot         (dump)     .sna  \ncpc464p          cassette         (cass)     .wav  .flac .cdt  \ncpc464p          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \ncpc464p          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \ncpc464p          cartridge        (cart)     .bin  .cpr  \ncpc50a           cartridge        (cart)     .mx1  .bin  .rom  \ncpc50b           cartridge        (cart)     .mx1  .bin  .rom  \ncpc51            cartridge        (cart)     .mx1  .bin  .rom  \ncpc61            cartridge        (cart)     .mx1  .bin  .rom  \ncpc6128          printout         (prin)     .prn  \ncpc6128          snapshot         (dump)     .sna  \ncpc6128          cassette         (cass)     .wav  .flac .cdt  \ncpc6128          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \ncpc6128          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \ncpc6128f         printout         (prin)     .prn  \ncpc6128f         snapshot         (dump)     .sna  \ncpc6128f         cassette         (cass)     .wav  .flac .cdt  \ncpc6128f         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \ncpc6128f         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \ncpc6128p         printout         (prin)     .prn  \ncpc6128p         snapshot         (dump)     .sna  \ncpc6128p         cassette         (cass)     .wav  .flac .cdt  \ncpc6128p         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \ncpc6128p         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \ncpc6128p         cartridge        (cart)     .bin  .cpr  \ncpc6128s         printout         (prin)     .prn  \ncpc6128s         snapshot         (dump)     .sna  \ncpc6128s         cassette         (cass)     .wav  .flac .cdt  \ncpc6128s         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \ncpc6128s         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \ncpc6128sp        printout         (prin)     .prn  \ncpc6128sp        snapshot         (dump)     .sna  \ncpc6128sp        cassette         (cass)     .wav  .flac .cdt  \ncpc6128sp        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \ncpc6128sp        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \ncpc664           printout         (prin)     .prn  \ncpc664           snapshot         (dump)     .sna  \ncpc664           cassette         (cass)     .wav  .flac .cdt  \ncpc664           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \ncpc664           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \ncpc88            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncpg120           cartridge1       (cart1)    .mx1  .bin  .rom  \ncpg120           cartridge2       (cart2)    .mx1  .bin  .rom  \ncpg120           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncps3boot         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncps3boota        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncps3bootao       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncps3bootao2      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncps3booto        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncps3booto2       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncps3bs32         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncps3bs32a        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncpu09            cassette         (cass)     .wav  .flac \ncr589fw          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncr589fwa         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncraft2p          floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \ncraft2p          floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \ncraft2p          cassette         (cass)     .wav  .flac \ncregchg          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncrei680          cassette         (cass)     .wav  .flac \ncrisscrs         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ncrtaxihr         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncrvisio2         cassette         (cass)     .wav  .flac \ncrvisio2         printout         (prin)     .prn  \ncrvisio2         cartridge        (cart)     .bin  .rom  \ncrvisioj         cassette         (cass)     .wav  .flac \ncrvisioj         printout         (prin)     .prn  \ncrvisioj         cartridge        (cart)     .bin  .rom  \ncrvision         cassette         (cass)     .wav  .flac \ncrvision         printout         (prin)     .prn  \ncrvision         cartridge        (cart)     .bin  .rom  \ncryptklr         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncs113            cassette         (cass)     .wav  .flac \ncs113            romimage         (rom)      .bin  .rom  \ncs8230           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncs8230           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncs8230           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncs8230           printout         (prin)     .prn  \ncsl286           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncsl286           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncsl286           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncsplayh1         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncsplayh5         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncsplayh6         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncsplayh7         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nct386sx          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nct386sx          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nct386sx          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nct486            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nct486            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nct486            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nct486            printout         (prin)     .prn  \nctcc386mx        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nctcc386mx        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nctcc386mx        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nctcc386mx        printout         (prin)     .prn  \nctvboy           cartridge        (cart)     .bin  \ncubibrd4         cartridge1       (cart1)    .bin  \ncubibrd4         cartridge2       (cart2)    .bin  \ncubo             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncvs2             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncvs2mf           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncvsgd            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ncx3000tc         quickload        (quik)     .pgm  .tvc  \ncx3000tc         cartridge        (cart)     .bin  .rom  \ncx5f             cartridge        (cart)     .mx1  .bin  .rom  \ncx5f             cartridge60pin   (cart60p)  .mx1  .bin  .rom  \ncx5f             midiout          (mout)     .mid  \ncx5f             midiin           (min)      .mid  .syx  \ncx5f             printout         (prin)     .prn  \ncx5f             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncx5f1            cartridge        (cart)     .mx1  .bin  .rom  \ncx5f1            cartridge60pin   (cart60p)  .mx1  .bin  .rom  \ncx5f1            midiout          (mout)     .mid  \ncx5f1            midiin           (min)      .mid  .syx  \ncx5f1            printout         (prin)     .prn  \ncx5f1            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncx5m128          cartridge1       (cart1)    .mx1  .bin  .rom  \ncx5m128          cartridge2       (cart2)    .mx1  .bin  .rom  \ncx5m128          yamahaminicart   (mini)     .mx1  .bin  .rom  \ncx5m128          cartridge60pin   (cart60p)  .mx1  .bin  .rom  \ncx5m128          midiout          (mout)     .mid  \ncx5m128          midiin           (min)      .mid  .syx  \ncx5m128          printout         (prin)     .prn  \ncx5m128          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncx5miib          cartridge1       (cart1)    .mx1  .bin  .rom  \ncx5miib          cartridge2       (cart2)    .mx1  .bin  .rom  \ncx5miib          yamahaminicart   (mini)     .mx1  .bin  .rom  \ncx5miib          cartridge60pin   (cart60p)  .mx1  .bin  .rom  \ncx5miib          midiout          (mout)     .mid  \ncx5miib          midiin           (min)      .mid  .syx  \ncx5miib          printout         (prin)     .prn  \ncx5miib          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncx5mu            cartridge        (cart)     .mx1  .bin  .rom  \ncx5mu            cartridge60pin   (cart60p)  .mx1  .bin  .rom  \ncx5mu            midiout          (mout)     .mid  \ncx5mu            midiin           (min)      .mid  .syx  \ncx5mu            printout         (prin)     .prn  \ncx5mu            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncx7128           cartridge1       (cart1)    .mx1  .bin  .rom  \ncx7128           cartridge2       (cart2)    .mx1  .bin  .rom  \ncx7128           yamahaminicart   (mini)     .mx1  .bin  .rom  \ncx7128           cartridge60pin   (cart60p)  .mx1  .bin  .rom  \ncx7128           printout         (prin)     .prn  \ncx7128           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncx7m128          cartridge1       (cart1)    .mx1  .bin  .rom  \ncx7m128          cartridge2       (cart2)    .mx1  .bin  .rom  \ncx7m128          yamahaminicart   (mini)     .mx1  .bin  .rom  \ncx7m128          cartridge60pin   (cart60p)  .mx1  .bin  .rom  \ncx7m128          midiout          (mout)     .mid  \ncx7m128          midiin           (min)      .mid  .syx  \ncx7m128          printout         (prin)     .prn  \ncx7m128          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ncxsxd            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncxsxd            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ncxsxd            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ncybikov1         quickload        (quik)     .bin  .nv   \ncybikov2         quickload        (quik)     .bin  .nv   \ncybikoxt         quickload        (quik)     .bin  .nv   \ncz1              cartridge        (cart)     .bin  \ncz1              midiin           (min)      .mid  .syx  \ncz1              midiout1         (mout1)    .mid  \ncz1              midiout2         (mout2)    .mid  \ncz101            cartridge        (cart)     .bin  \ncz101            midiin           (min)      .mid  .syx  \ncz101            midiout          (mout)     .mid  \ncz230s           midiin           (min)      .mid  .syx  \ncz230s           midiout1         (mout1)    .mid  \ncz230s           midiout2         (mout2)    .mid  \ncz230s           cassette         (cass)     .wav  .flac \nczz50            cartridge        (cart)     .rom  .col  .bin  \nd64plus          cassette         (cass)     .wav  .flac .cas  \nd64plus          printout         (prin)     .prn  \nd64plus          cartridge        (cart)     .ccc  .rom  \nd64plus          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \nd64plus          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \nd6800            cassette         (cass)     .wav  .flac \nd6800            quickload        (quik)     .bin  .c8   \nd6809            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ndai              cassette         (cass)     .wav  .flac \ndaisy            cartridge1       (cart1)    .rom  .bin  \ndaisy            cartridge2       (cart2)    .rom  .bin  \ndaisy            romimage1        (rom1)     .rom  .bin  \ndaisy            cassette         (cass)     .wav  .flac .csw  .uef  \ndaisy            printout         (prin)     .prn  \ndaisy            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \ndaisy            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \ndarkhleg         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndatabase         quickload        (quik)     .pgm  .tvc  \ndatabase         cartridge        (cart)     .bin  .rom  \ndauphin          cassette         (cass)     .wav  .flac \ndawg             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ndawg             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndb32016          cassette         (cass)     .wav  .flac \ndc               cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndcdev            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndceu             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndcfish           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndcjp             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndctream          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr2m            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr2mc           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr2mc2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr2mc2          memcard1         (memc1)    .mc   \nddr2mc2          memcard2         (memc2)    .mc   \nddr2ml           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr2ml           memcard1         (memc1)    .mc   \nddr2ml           memcard2         (memc2)    .mc   \nddr2mla          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr2mla          memcard1         (memc1)    .mc   \nddr2mla          memcard2         (memc2)    .mc   \nddr2mlb          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr2mlb          memcard1         (memc1)    .mc   \nddr2mlb          memcard2         (memc2)    .mc   \nddr3ma           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr3ma           memcard1         (memc1)    .mc   \nddr3ma           memcard2         (memc2)    .mc   \nddr3mj           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr3mj           memcard1         (memc1)    .mc   \nddr3mj           memcard2         (memc2)    .mc   \nddr3mk           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr3mk           memcard1         (memc1)    .mc   \nddr3mk           memcard2         (memc2)    .mc   \nddr3mka          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr3mka          memcard1         (memc1)    .mc   \nddr3mka          memcard2         (memc2)    .mc   \nddr3mp           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr3mp           memcard1         (memc1)    .mc   \nddr3mp           memcard2         (memc2)    .mc   \nddr4m            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr4m            memcard1         (memc1)    .mc   \nddr4m            memcard2         (memc2)    .mc   \nddr4mj           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr4mj           memcard1         (memc1)    .mc   \nddr4mj           memcard2         (memc2)    .mc   \nddr4mp           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr4mp           memcard1         (memc1)    .mc   \nddr4mp           memcard2         (memc2)    .mc   \nddr4mps          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr4mps          memcard1         (memc1)    .mc   \nddr4mps          memcard2         (memc2)    .mc   \nddr4ms           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr4ms           memcard1         (memc1)    .mc   \nddr4ms           memcard2         (memc2)    .mc   \nddr4msj          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr4msj          memcard1         (memc1)    .mc   \nddr4msj          memcard2         (memc2)    .mc   \nddr5m            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddr5m            memcard1         (memc1)    .mc   \nddr5m            memcard2         (memc2)    .mc   \nddra             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddrbocd          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddrextrm         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddrextrm         memcard1         (memc1)    .mc   \nddrextrm         memcard2         (memc2)    .mc   \nddrfammt         cartridge        (cart)     .bin  .u1   \nddrj             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddrja            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddrjb            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddrkara          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddrkara2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddrkids          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nddrmax           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddrmax           memcard1         (memc1)    .mc   \nddrmax           memcard2         (memc2)    .mc   \nddrmax2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddrmax2          memcard1         (memc1)    .mc   \nddrmax2          memcard2         (memc2)    .mc   \nddrs2k           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddrs2kj          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddrsbm           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddru             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nddrusa           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndecmate2         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ndecmate3         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ndeluxecoco       cassette         (cass)     .wav  .flac .cas  \ndeluxecoco       printout         (prin)     .prn  \ndeluxecoco       cartridge        (cart)     .ccc  .rom  \ndeluxecoco       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ndeluxecoco       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ndeluxecoco       harddisk1        (hard1)    .vhd  \ndeluxecoco       harddisk2        (hard2)    .vhd  \ndendego3         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ndendy            cartridge        (cart)     .nes  .unf  .unif \ndendy2           cartridge        (cart)     .nes  .unf  .unif \ndfi386           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndfi386           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndfi386           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ndfi386           printout         (prin)     .prn  \ndfi386sx         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndfi386sx         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndfi386sx         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ndfs500           picture1         (pic1)     .png  .jpg  .jpeg .jfif .bmp  .dib  \ndfs500           picture2         (pic2)     .png  .jpg  .jpeg .jfif .bmp  .dib  \ndfs500           picture3         (pic3)     .png  .jpg  .jpeg .jfif .bmp  .dib  \ndfs500           picture4         (pic4)     .png  .jpg  .jpeg .jfif .bmp  .dib  \ndg680            cassette         (cass)     .wav  .flac \ndgama87          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ndgama87          quickload        (quik)     .raw  .scr  \ndgama87          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ndgama88          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ndgama88          quickload        (quik)     .raw  .scr  \ndgama88          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ndgama89          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ndgama89          quickload        (quik)     .raw  .scr  \ndgama89          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ndgnalpha         cassette         (cass)     .wav  .flac .cas  \ndgnalpha         printout         (prin)     .prn  \ndgnalpha         cartridge        (cart)     .ccc  .rom  \ndgnalpha         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .vdk  .dmk  .sdf  \ndgnalpha         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .vdk  .dmk  .sdf  \ndgnbeta          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .vdk  .dmk  \ndgnbeta          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .vdk  .dmk  \ndgnmsx           cartridge1       (cart1)    .mx1  .bin  .rom  \ndgnmsx           cartridge2       (cart2)    .mx1  .bin  .rom  \ndgnmsx           printout         (prin)     .prn  \ndgnmsx           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ndgone            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndgone            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndgone            printout         (prin)     .prn  \ndidakm91         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ndidakm91         quickload        (quik)     .raw  .scr  \ndidakm91         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ndidakm92         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ndidakm92         quickload        (quik)     .raw  .scr  \ndidakm92         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ndidakm93         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ndidakm93         quickload        (quik)     .raw  .scr  \ndidakm93         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ndidakt90         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ndidakt90         quickload        (quik)     .raw  .scr  \ndidakt90         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ndidaktk          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ndidaktk          quickload        (quik)     .raw  .scr  \ndidaktk          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ndidj             cartridge        (cart)     .bin  \ndigiblst         cartridge        (cart)     .bin  \ndigilog320       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ndim68k           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ndim68k           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ndina             cartridge        (cart)     .rom  .col  .bin  \ndiscmate         cartridge1       (cart1)    .rom  .bin  \ndiscmate         cartridge2       (cart2)    .rom  .bin  \ndiscmate         romimage1        (rom1)     .rom  .bin  \ndiscmate         cassette         (cass)     .wav  .flac .csw  .uef  \ndiscmate         printout         (prin)     .prn  \ndiscmate         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \ndiscmate         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \ndiscmon          cartridge1       (cart1)    .rom  .bin  \ndiscmon          cartridge2       (cart2)    .rom  .bin  \ndiscmon          romimage1        (rom1)     .rom  .bin  \ndiscmon          cassette         (cass)     .wav  .flac .csw  .uef  \ndiscmon          printout         (prin)     .prn  \ndiscmon          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \ndiscmon          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \ndkbanana         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ndkbanans         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ndkjfever         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ndks7000c         cartridge        (cart)     .bin  \ndks7000p         cartridge        (cart)     .bin  \ndmax8000         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ndmv              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \ndmv              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \ndmv              quickload        (quik)     .com  .cpm  \ndmx              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndmx2m            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndmx2majp         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndmxa             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndn3000           node_id          (ni)       .ani  .bin  \ndn3000           winchester1      (disk1)    .awd  \ndn3000           winchester2      (disk2)    .awd  \ndn3000           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .afd  \ndn3000           ctape            (ct)       .act  .ct   \ndn3000_19i       node_id          (ni)       .ani  .bin  \ndn3000_19i       winchester1      (disk1)    .awd  \ndn3000_19i       winchester2      (disk2)    .awd  \ndn3000_19i       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .afd  \ndn3000_19i       ctape            (ct)       .act  .ct   \ndn3500           node_id          (ni)       .ani  .bin  \ndn3500           winchester1      (disk1)    .awd  \ndn3500           winchester2      (disk2)    .awd  \ndn3500           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .afd  \ndn3500           ctape            (ct)       .act  .ct   \ndn3500_19i       node_id          (ni)       .ani  .bin  \ndn3500_19i       winchester1      (disk1)    .awd  \ndn3500_19i       winchester2      (disk2)    .awd  \ndn3500_19i       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .afd  \ndn3500_19i       ctape            (ct)       .act  .ct   \ndn5500           node_id          (ni)       .ani  .bin  \ndn5500           winchester1      (disk1)    .awd  \ndn5500           winchester2      (disk2)    .awd  \ndn5500           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .afd  \ndn5500           ctape            (ct)       .act  .ct   \ndn5500_19i       node_id          (ni)       .ani  .bin  \ndn5500_19i       winchester1      (disk1)    .awd  \ndn5500_19i       winchester2      (disk2)    .awd  \ndn5500_19i       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .afd  \ndn5500_19i       ctape            (ct)       .act  .ct   \ndncfrks          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndodo             floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \ndodo             floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \ndodo             cassette         (cass)     .wav  .flac \ndokodemo         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ndolphinm         cassette         (cass)     .wav  .flac .csw  .uef  \ndolphinm         romimage1        (rom1)     .rom  .bin  \ndolphinm         romimage2        (rom2)     .rom  .bin  \ndolphinm         printout         (prin)     .prn  \ndolphinm         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \ndolphinm         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \ndpb7000          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ndpb7000          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ndpc100           cartridge        (cart)     .mx1  .bin  .rom  \ndpc100           printout         (prin)     .prn  \ndpc100           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ndpc180           cartridge        (cart)     .mx1  .bin  .rom  \ndpc180           printout         (prin)     .prn  \ndpc180           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ndpc200           cartridge        (cart)     .mx1  .bin  .rom  \ndpc200           printout         (prin)     .prn  \ndpc200           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ndpc200e          cartridge        (cart)     .mx1  .bin  .rom  \ndpc200e          printout         (prin)     .prn  \ndpc200e          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ndps1             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ndragntr          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndragntr2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndragntr3         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndragntra         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndragon200        cassette         (cass)     .wav  .flac .cas  \ndragon200        printout         (prin)     .prn  \ndragon200        cartridge        (cart)     .ccc  .rom  \ndragon200        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ndragon200        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ndragon200e       cassette         (cass)     .wav  .flac .cas  \ndragon200e       printout         (prin)     .prn  \ndragon200e       cartridge        (cart)     .ccc  .rom  \ndragon200e       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ndragon200e       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ndragon32         cassette         (cass)     .wav  .flac .cas  \ndragon32         printout         (prin)     .prn  \ndragon32         cartridge        (cart)     .ccc  .rom  \ndragon32         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ndragon32         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ndragon64         cassette         (cass)     .wav  .flac .cas  \ndragon64         printout         (prin)     .prn  \ndragon64         cartridge        (cart)     .ccc  .rom  \ndragon64         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ndragon64         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ndragon64h        cassette         (cass)     .wav  .flac .cas  \ndragon64h        printout         (prin)     .prn  \ndragon64h        cartridge        (cart)     .ccc  .rom  \ndragon64h        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ndragon64h        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ndrmn             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndrmn10m          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndrmn2m           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndrmn2mpu         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndrmn3m           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndrmn4m           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndrmn5m           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndrmn6m           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndrmn7m           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndrmn7ma          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndrmn8m           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndrmn9m           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndrmn9ma          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndrmna            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndrmnu            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndrpcjr           cartridge        (cart)     .nes  .unf  .unif \nds2              quickload        (quik)     .rex  .ds2  \nds2100           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nds2100           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nds3100           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nds3100           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nds5k133          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nds5k133          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nds8              cartridge        (cart)     .ds8_card\ndsem             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndsem2            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndsfdct           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndsfdcta          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndsfdr            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndsftkd           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndslayrr          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ndslayrr          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndslayrra         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ndslayrra         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndsp3000          node_id          (ni)       .ani  .bin  \ndsp3000          winchester1      (disk1)    .awd  \ndsp3000          winchester2      (disk2)    .awd  \ndsp3000          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .afd  \ndsp3000          ctape            (ct)       .act  .ct   \ndsp3500          node_id          (ni)       .ani  .bin  \ndsp3500          winchester1      (disk1)    .awd  \ndsp3500          winchester2      (disk2)    .awd  \ndsp3500          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .afd  \ndsp3500          ctape            (ct)       .act  .ct   \ndsp5500          node_id          (ni)       .ani  .bin  \ndsp5500          winchester1      (disk1)    .awd  \ndsp5500          winchester2      (disk2)    .awd  \ndsp5500          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .afd  \ndsp5500          ctape            (ct)       .act  .ct   \ndss1             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ndss1             midiin           (min)      .mid  .syx  \ndss1             midiout          (mout)     .mid  \ndssmsrk          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ndssmsrk          midiin           (min)      .mid  .syx  \ndssmsrk          midiout          (mout)     .mid  \ndstage           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndstagea          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndsys200          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndsys200          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndsys200          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ndt386            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndt386            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndt386            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ndt386            printout         (prin)     .prn  \ndt486            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndt486            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndt486            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ndt486            printout         (prin)     .prn  \ndtc              cassette         (cass)     .wav  .flac \ndtc              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \ndtc              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \ndtc              quickload        (quik)     .bac  \ndtkerso          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndtkerso          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndtkerso          printout         (prin)     .prn  \nduelmast         cartridge        (cart)     .bin  .u1   \nduet16           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nduet16           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ndvbslan          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndvbslan          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ndvbslan          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ndx100            midiin           (min)      .mid  .syx  \ndx100            midiout          (mout)     .mid  \ndx100            cassette         (cass)     .wav  .flac \ndx64             cassette         (cass)     .wav  .flac .tap  \ndx64             floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ndx64             floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \ndx64             cartridge        (cart)     .80   .a0   .e0   .crt  \ndx64             quickload        (quik)     .p00  .prg  .t64  \ndygolf           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ndynavisn         cartridge        (cart)     .bin  \ne100             cassette         (cass)     .wav  .flac \neagle1600        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \neagle1600        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \neagle1600        printout         (prin)     .prn  \neaglepc2         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \neaglepc2         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \neaglepc2         printout         (prin)     .prn  \neaglespirit      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \neaglespirit      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \neaglespirit      printout         (prin)     .prn  \neasykara         cartridge        (cart)     .bin  \nec1840           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec1840           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec1840           printout         (prin)     .prn  \nec1841           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec1841           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec1841           printout         (prin)     .prn  \nec1841           harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nec1841           harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nec1842           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec1842           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec1842           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nec1845           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec1845           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec1845           printout         (prin)     .prn  \nec1845           harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nec1845           harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nec1847           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec1847           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec1847           printout         (prin)     .prn  \nec1849           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec1849           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec1849           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nec4913           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec4913           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec4913           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nec4913           printout         (prin)     .prn  \nec4915aio        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec4915aio        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nec4915aio        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nec4915aio        printout         (prin)     .prn  \necm6032          cassette         (cass)     .wav  .flac \necm6032          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \necm6032          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \necm6127          cassette         (cass)     .wav  .flac \necm6127          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \necm6127          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \neconx25          cassette         (cass)     .wav  .flac .csw  .uef  \neconx25          romimage1        (rom1)     .rom  .bin  \neconx25          romimage2        (rom2)     .rom  .bin  \neconx25          romimage3        (rom3)     .rom  .bin  \neconx25          romimage4        (rom4)     .rom  .bin  \neconx25          romimage5        (rom5)     .rom  .bin  \necs38632         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \necs38632         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \necs38632         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \necs38632         printout         (prin)     .prn  \necs386a          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \necs386a          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \necs386a          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \necs386a          printout         (prin)     .prn  \necs8517          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \necs8517          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \necs8517          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \necsfx3000        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \necsfx3000        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \necsfx3000        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \necsfx3000        printout         (prin)     .prn  \necssi5pi         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \necssi5pi         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \necssi5pi         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \necssi5pi         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \necssi5pi         printout         (prin)     .prn  \necsum386         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \necsum386         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \necsum386         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \necsum386         printout         (prin)     .prn  \ned486vl3h        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ned486vl3h        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ned486vl3h        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ned486vl3h        printout         (prin)     .prn  \nedmv035f         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nedmv035f         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nedmv035f         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nedmv035f         printout         (prin)     .prn  \nedu64            cassette         (cass)     .wav  .flac .tap  \nedu64            floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nedu64            cartridge        (cart)     .80   .a0   .e0   .crt  \nedu64            quickload        (quik)     .p00  .prg  .t64  \neg3003           cassette         (cass)     .wav  .flac .cas  \neg3003           quickload        (quik)     .cmd  \neg3003           floppydisk1      (flop1)    .mfi  .dfi  .dmk  .jv1  .dsk  \neg3003           floppydisk2      (flop2)    .mfi  .dfi  .dmk  .jv1  .dsk  \neg3003           printout         (prin)     .prn  \neggsplc          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nehx20            cassette         (cass)     .wav  .flac \nehx20            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nehx20            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nehx20            romimage         (rom)      .bin  .rom  \nehx20e           cassette         (cass)     .wav  .flac \nehx20e           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nehx20e           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nehx20e           romimage         (rom)      .bin  .rom  \neinst256         printout         (prin)     .prn  \neinst256         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \neinst256         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \neinst256         quickload        (quik)     .com  \neinst256         cassette         (cass)     .wav  .flac \neinstein         printout         (prin)     .prn  \neinstein         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \neinstein         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \neinstein         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \neinstein         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \neinstein         romimage         (rom)      .bin  .rom  \neinstein         quickload        (quik)     .com  \nekara            cartridge        (cart)     .bin  .u1   \nekaraa           cartridge        (cart)     .bin  .u1   \nekarag           cartridge        (cart)     .bin  .u1   \nekaraj           cartridge        (cart)     .bin  .u1   \nekaramix         cartridge        (cart)     .bin  .u1   \nekaraphs         cartridge        (cart)     .bin  .u1   \nekaras           cartridge        (cart)     .bin  .u1   \nekusera          cartridge        (cart)     .bin  \nelanht286        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nelanht286        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nelanht286        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \neldoralg         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nelectron         cassette         (cass)     .wav  .flac .csw  .uef  \nelectron         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  .dsd  .adf  .ads  .adm  .adl  \nelectron         printout         (prin)     .prn  \nelectron         cartridge1       (cart1)    .rom  .bin  \nelectron         cartridge2       (cart2)    .rom  .bin  \nelectron64       cassette         (cass)     .wav  .flac .csw  .uef  \nelectron64       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  .dsd  .adf  .ads  .adm  .adl  \nelectron64       printout         (prin)     .prn  \nelectron64       cartridge1       (cart1)    .rom  .bin  \nelectron64       cartridge2       (cart2)    .rom  .bin  \nelectronsp       cassette         (cass)     .wav  .flac .csw  .uef  \nelectronsp       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  .dsd  .adf  .ads  .adm  .adl  \nelectronsp       printout         (prin)     .prn  \nelectronsp       cartridge1       (cart1)    .rom  .bin  \nelectronsp       cartridge2       (cart2)    .rom  .bin  \nelectronsp       romimage1        (rom1)     .bin  .rom  \nelectronsp       romimage2        (rom2)     .bin  .rom  \nelectront        cassette         (cass)     .wav  .flac .csw  .uef  \nelectront        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  .dsd  .adf  .ads  .adm  .adl  \nelectront        printout         (prin)     .prn  \nelectront        cartridge1       (cart1)    .rom  .bin  \nelectront        cartridge2       (cart2)    .rom  .bin  \nelekscmp         cassette         (cass)     .wav  .flac \nelektor          quickload        (quik)     .pgm  .tvc  \nelektor          cartridge        (cart)     .bin  .rom  \nelektor          cassette         (cass)     .wav  .flac \nelf2             cassette         (cass)     .wav  .flac \nelf2             quickload        (quik)     .bin  \nelppa            floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nelppa            floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nelppa            cassette         (cass)     .wav  .flac \nelt286b          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nelt286b          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nelt286b          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nelt386sx         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nelt386sx         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nelt386sx         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \neltp9            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \neltp9            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \neltp9            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nelwro800         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nelwro800         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nelwro800         printout         (prin)     .prn  \nelwro800         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nelzet80k         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nelzet80k         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nelzet80p         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nelzet80p         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nemax2            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nemaxp            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nemma2            cassette         (cass)     .wav  .flac \nemu3             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nemu3             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nenmirage         cassette         (cass)     .wav  .flac \nenmirage         midiin           (min)      .mid  .syx  \nenmirage         midiout          (mout)     .mid  \nenmirage         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nep128            printout         (prin)     .prn  \nep128            cassette1        (cass1)    .wav  .flac \nep128            cassette2        (cass2)    .wav  .flac \nep128            cartridge        (cart)     .bin  .rom  \nep64             printout         (prin)     .prn  \nep64             cassette1        (cass1)    .wav  .flac \nep64             cassette2        (cass2)    .wav  .flac \nep64             cartridge        (cart)     .bin  .rom  \nepc              printout         (prin)     .prn  \nepc              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nepc              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nepitch           cartridge        (cart)     .bin  .u1   \neppc             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \neppc             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \neppc             printout         (prin)     .prn  \neps              midiin           (min)      .mid  .syx  \neps              midiout          (mout)     .mid  \neps              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .hfe  \neps16p           midiin           (min)      .mid  .syx  \neps16p           midiout          (mout)     .mid  \neps16p           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .hfe  \nepsax            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nepsax            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nepsax            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nepsax2e          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nepsax2e          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nepsax2e          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nepsax3           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nepsax3           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nepsax3           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nerik             cassette         (cass)     .wav  .flac .rks  \nerik             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \nerik             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \net3400           cassette         (cass)     .wav  .flac \neti660           cassette         (cass)     .wav  .flac \neti660           quickload        (quik)     .bin  .c8   .ch8  \neuroat           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \neuroat           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \neurocom2         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .wta  \neurocom2         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .wta  \neuropc           printout         (prin)     .prn  \neuropc           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \neuropc2          printout         (prin)     .prn  \neuropc2          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \neuroxt           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \neuroxt           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \neuroxt           printout         (prin)     .prn  \nev1806           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nev1806           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nev1806           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nev1815           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nev1815           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nev1815           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nevilngt          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nevio             cartridge        (cart)     .bin  .u1   \news286           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \news286           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \news4800_310      harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nexcali64         cassette         (cass)     .wav  .flac \nexcali64         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .raw  \nexcali64         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .raw  \nexcali64         printout         (prin)     .prn  \nexecutel         cassette         (cass)     .wav  .flac .cas  \nexl100           cartridge        (cart)     .bin  .rom  \nexl100           cassette         (cass)     .wav  .flac \nexorciser        printout1        (prin1)    .prn  \nexorciser        printout2        (prin2)    .prn  \nexorciser        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nexorciser        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nexorciser        floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nexorciser        floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nexp4044          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nexp4044          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nexp4044          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nexp4044          printout         (prin)     .prn  \nexp85            cassette         (cass)     .wav  .flac \nexpert10         cartridge1       (cart1)    .mx1  .bin  .rom  \nexpert10         cartridge2       (cart2)    .mx1  .bin  .rom  \nexpert10         printout         (prin)     .prn  \nexpert10         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nexpert11         cartridge1       (cart1)    .mx1  .bin  .rom  \nexpert11         cartridge2       (cart2)    .mx1  .bin  .rom  \nexpert11         printout         (prin)     .prn  \nexpert11         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nexpert13         cartridge1       (cart1)    .mx1  .bin  .rom  \nexpert13         cartridge2       (cart2)    .mx1  .bin  .rom  \nexpert13         printout         (prin)     .prn  \nexpert13         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nexpert20         cartridge1       (cart1)    .mx1  .bin  .rom  \nexpert20         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nexpert20         cartridge2       (cart2)    .mx1  .bin  .rom  \nexpert20         printout         (prin)     .prn  \nexpert20         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nexpert3i         cartridge1       (cart1)    .mx1  .bin  .rom  \nexpert3i         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nexpert3i         cartridge2       (cart2)    .mx1  .bin  .rom  \nexpert3i         printout         (prin)     .prn  \nexpert3i         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nexpert3t         cartridge1       (cart1)    .mx1  .bin  .rom  \nexpert3t         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nexpert3t         cartridge2       (cart2)    .mx1  .bin  .rom  \nexpert3t         printout         (prin)     .prn  \nexpert3t         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nexpertac         cartridge1       (cart1)    .mx1  .bin  .rom  \nexpertac         cartridge2       (cart2)    .mx1  .bin  .rom  \nexpertac         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nexpertac         printout         (prin)     .prn  \nexpertac         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nexpertdp         cartridge1       (cart1)    .mx1  .bin  .rom  \nexpertdp         cartridge2       (cart2)    .mx1  .bin  .rom  \nexpertdp         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nexpertdp         printout         (prin)     .prn  \nexpertdp         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nexpertdx         cartridge1       (cart1)    .mx1  .bin  .rom  \nexpertdx         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nexpertdx         cartridge2       (cart2)    .mx1  .bin  .rom  \nexpertdx         printout         (prin)     .prn  \nexpertdx         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nexpertpl         cartridge1       (cart1)    .mx1  .bin  .rom  \nexpertpl         cartridge2       (cart2)    .mx1  .bin  .rom  \nexpertpl         printout         (prin)     .prn  \nexpertpl         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nez2d2m           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nez2d2m           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nez2d2m           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nez2d2m           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nez2d2m           printout         (prin)     .prn  \nf1               printout         (prin)     .prn  \nf1               floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nf1               floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nf10              printout         (prin)     .prn  \nf10              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nf10              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nf1392            quickload        (quik)     .pgm  .tvc  \nf1392            cartridge        (cart)     .bin  .rom  \nf1e              printout         (prin)     .prn  \nf1e              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nf1e              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nf2               printout         (prin)     .prn  \nf2               floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nf2               floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nf4dxluc4         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nf4dxluc4         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nf4dxluc4         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nf4dxluc4         printout         (prin)     .prn  \nfalcon30         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nfalcon30         printout         (prin)     .prn  \nfalcon30         midiin           (min)      .mid  .syx  \nfalcon30         midiout          (mout)     .mid  \nfalcon30         romimage         (rom)      .bin  .rom  .stc  \nfalcon40         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nfalcon40         printout         (prin)     .prn  \nfalcon40         midiin           (min)      .mid  .syx  \nfalcon40         midiout          (mout)     .mid  \nfalcon40         romimage         (rom)      .bin  .rom  .stc  \nfamicom          cartridge        (cart)     .nes  .unf  .unif \nfamicomo         cartridge        (cart)     .nes  .unf  .unif \nfamitvc1         cartridge        (cart)     .nes  .unf  .unif \nfamitwin         cartridge        (cart)     .nes  .unf  .unif \nfamitwin         floppydisk       (flop)     .fds  \nfanucspg         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfanucspg         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfanucspgm        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfanucspgm        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfbait2bc         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfbaitbc          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfbaitmc          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfbaitmca         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfbaitmcj         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfbaitmcu         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfbcrazy          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfc100            cassette         (cass)     .wav  .flac .cas  \nfc100            cartridge        (cart)     .bin  \nfc100            printout         (prin)     .prn  \nfctitler         cartridge        (cart)     .nes  .unf  .unif \nfdpc200          cartridge        (cart)     .mx1  .bin  .rom  \nfdpc200          printout         (prin)     .prn  \nfdpc200          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfds              floppydisk       (flop)     .fds  \nfeag             cartridge        (cart)     .bin  \nfeag2100         cartridge        (cart)     .bin  \nfeag2100a        cartridge        (cart)     .bin  \nfeagpriv         cartridge        (cart)     .bin  \nfeagv10          cartridge        (cart)     .bin  \nfeagv11          cartridge        (cart)     .bin  \nfeagv4           cartridge        (cart)     .bin  \nfeagv4a          cartridge        (cart)     .bin  \nfeagv4b          cartridge        (cart)     .bin  \nfeagv5           cartridge        (cart)     .bin  \nfeagv7           cartridge        (cart)     .bin  \nfeagv7a          cartridge        (cart)     .bin  \nfeagv7b          cartridge        (cart)     .bin  \nfeagv7c          cartridge        (cart)     .bin  \nfeagv9           cartridge        (cart)     .bin  \nfeagv9a          cartridge        (cart)     .bin  \nfeagv9b          cartridge        (cart)     .bin  \nfeagv9c          cartridge        (cart)     .bin  \nfeas             cartridge        (cart)     .bin  \nfeasbu           cartridge        (cart)     .bin  \nfeasbua          cartridge        (cart)     .bin  \nfeasgla          cartridge        (cart)     .bin  \nfeasglaa         cartridge        (cart)     .bin  \nfeasglab         cartridge        (cart)     .bin  \nfeasx            cartridge        (cart)     .bin  \nfeleg            cartridge        (cart)     .bin  \nfelega           cartridge        (cart)     .bin  \nfelega1          cartridge        (cart)     .bin  \nfelega2          cartridge        (cart)     .bin  \nfelega3          cartridge        (cart)     .bin  \nfellow           snapshot         (dump)     .vz   \nfellow           cassette         (cass)     .wav  .flac .cas  \nfforce2          quickload        (quik)     .pgm  .tvc  \nfforce2          cartridge        (cart)     .bin  .rom  \nfghtmn           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfghtmna          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfghtmnk          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfghtmnu          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfic4386vchd      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfic4386vchd      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfic4386vchd      harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nfic4386vchd      printout         (prin)     .prn  \nfic4386vcv       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfic4386vcv       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfic4386vcv       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nfic4386vcv       printout         (prin)     .prn  \nfic486gvt        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfic486gvt        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfic486gvt        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nfic486gvt        printout         (prin)     .prn  \nfic486kvd        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfic486kvd        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfic486kvd        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nfic486kvd        printout         (prin)     .prn  \nfic486vchd       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfic486vchd       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfic486vchd       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nfic486vchd       printout         (prin)     .prn  \nficeli6ii        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nficeli6ii        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nficeli6ii        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nficeli6ii        printout         (prin)     .prn  \nficgiovt2        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nficgiovt2        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nficgiovt2        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nficgiovt2        printout         (prin)     .prn  \nficpio2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nficpio2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nficpio2          printout         (prin)     .prn  \nficpio2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nficpio2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nficvipio         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nficvipio         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nficvipio         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nficvipio         printout         (prin)     .prn  \nficvipio2        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nficvipio2        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nficvipio2        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nficvipio2        printout         (prin)     .prn  \nficvt503         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nficvt503         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nficvt503         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nficvt503         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nficvt503         printout         (prin)     .prn  \nfl100            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfl100            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nflamegung        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nflipmaze         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nfm11             cassette         (cass)     .wav  .flac .t77  \nfm11             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfm11             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfm11             printout         (prin)     .prn  \nfm16beta         cassette         (cass)     .wav  .flac .t77  \nfm16beta         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfm16beta         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfm16beta         printout         (prin)     .prn  \nfm7              cassette         (cass)     .wav  .flac .t77  \nfm7              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfm7              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfm7              printout         (prin)     .prn  \nfm7740sx         cassette         (cass)     .wav  .flac .t77  \nfm7740sx         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfm7740sx         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfm7740sx         printout         (prin)     .prn  \nfm77av           cassette         (cass)     .wav  .flac .t77  \nfm77av           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfm77av           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfm77av           printout         (prin)     .prn  \nfm8              cassette         (cass)     .wav  .flac .t77  \nfm8              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfm8              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfm8              printout         (prin)     .prn  \nfmnew7           cassette         (cass)     .wav  .flac .t77  \nfmnew7           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfmnew7           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfmnew7           printout         (prin)     .prn  \nfmtmarty         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtmarty         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfmtmarty         memcard          (memc)     .icm  \nfmtmarty2        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtmarty2        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfmtmarty2        memcard          (memc)     .icm  \nfmtowns          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtowns          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtowns          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfmtowns          memcard          (memc)     .icm  \nfmtownsftv       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtownsftv       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtownsftv       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfmtownsftv       memcard          (memc)     .icm  \nfmtownsftv       harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownsftv       harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownsftv       harddisk3        (hard3)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownsftv       harddisk4        (hard4)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownsftv       harddisk5        (hard5)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownshr        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtownshr        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtownshr        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfmtownshr        memcard          (memc)     .icm  \nfmtownshr        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownshr        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownshr        harddisk3        (hard3)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownshr        harddisk4        (hard4)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownshr        harddisk5        (hard5)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownsmx        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtownsmx        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtownsmx        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfmtownsmx        memcard          (memc)     .icm  \nfmtownsmx        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownsmx        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownsmx        harddisk3        (hard3)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownsmx        harddisk4        (hard4)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownsmx        harddisk5        (hard5)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownssj        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtownssj        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtownssj        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfmtownssj        memcard          (memc)     .icm  \nfmtownssj        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownssj        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownssj        harddisk3        (hard3)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownssj        harddisk4        (hard4)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownssj        harddisk5        (hard5)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownsux        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtownsux        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtownsux        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfmtownsux        memcard          (memc)     .icm  \nfmtownsux        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownsux        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownsux        harddisk3        (hard3)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownsux        harddisk4        (hard4)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownsux        harddisk5        (hard5)    .chd  .hd   .hdv  .2mg  .hdi  \nfmtownsv03       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtownsv03       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .bin  \nfmtownsv03       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfmtownsv03       memcard          (memc)     .icm  \nfmx              cartridge        (cart)     .mx1  .bin  .rom  \nfmx              cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfnvision         cassette         (cass)     .wav  .flac \nfnvision         printout         (prin)     .prn  \nfnvision         cartridge        (cart)     .bin  .rom  \nfp               floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfp               printout         (prin)     .prn  \nfp1000           printout         (prin)     .prn  \nfp1000           cassette         (cass)     .wav  .flac \nfp1100           printout         (prin)     .prn  \nfp1100           cassette         (cass)     .wav  .flac \nfp6000           cassette         (cass)     .wav  .flac \nfp6000           printout         (prin)     .prn  \nfpc500           cartridge1       (cart1)    .mx1  .bin  .rom  \nfpc500           cartridge2       (cart2)    .mx1  .bin  .rom  \nfpc500           printout         (prin)     .prn  \nfpc500           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfpc900           cartridge1       (cart1)    .mx1  .bin  .rom  \nfpc900           cartridge2       (cart2)    .mx1  .bin  .rom  \nfpc900           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfpc900           printout         (prin)     .prn  \nfpc900           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfpres            cartridge        (cart)     .bin  \nfpresa           cartridge        (cart)     .bin  \nfpresb           cartridge        (cart)     .bin  \nfpresbu          cartridge        (cart)     .bin  \nfpresc           cartridge        (cart)     .bin  \nfpresd           cartridge        (cart)     .bin  \nfprese           cartridge        (cart)     .bin  \nfpresgla         cartridge        (cart)     .bin  \nfraking          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfruitpc          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nfruitpc          midiin           (min)      .mid  .syx  \nfruitpc          midiout          (mout)     .mid  \nfrx386c          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfrx386c          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfrx386c          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nfrx386c          printout         (prin)     .prn  \nfrxc402          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfrxc402          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfrxc402          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nfrxc402          printout         (prin)     .prn  \nfs1300           cartridge1       (cart1)    .mx1  .bin  .rom  \nfs1300           cartridge2       (cart2)    .mx1  .bin  .rom  \nfs1300           printout         (prin)     .prn  \nfs1300           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfs3216           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfs4000           cartridge1       (cart1)    .mx1  .bin  .rom  \nfs4000           cartridge2       (cart2)    .mx1  .bin  .rom  \nfs4000           printout         (prin)     .prn  \nfs4000           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfs4000a          cartridge1       (cart1)    .mx1  .bin  .rom  \nfs4000a          cartridge2       (cart2)    .mx1  .bin  .rom  \nfs4000a          printout         (prin)     .prn  \nfs4000a          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfs4500           cartridge1       (cart1)    .mx1  .bin  .rom  \nfs4500           cartridge2       (cart2)    .mx1  .bin  .rom  \nfs4500           printout         (prin)     .prn  \nfs4500           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfs4600f          cartridge1       (cart1)    .mx1  .bin  .rom  \nfs4600f          cartridge2       (cart2)    .mx1  .bin  .rom  \nfs4600f          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfs4600f          printout         (prin)     .prn  \nfs4600f          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfs4700f          cartridge1       (cart1)    .mx1  .bin  .rom  \nfs4700f          cartridge2       (cart2)    .mx1  .bin  .rom  \nfs4700f          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfs4700f          printout         (prin)     .prn  \nfs4700f          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfs5000f2         cartridge1       (cart1)    .mx1  .bin  .rom  \nfs5000f2         cartridge2       (cart2)    .mx1  .bin  .rom  \nfs5000f2         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfs5000f2         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfs5000f2         printout         (prin)     .prn  \nfs5000f2         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfs5500f1         cartridge1       (cart1)    .mx1  .bin  .rom  \nfs5500f1         cartridge2       (cart2)    .mx1  .bin  .rom  \nfs5500f1         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfs5500f1         printout         (prin)     .prn  \nfs5500f1         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfs5500f2         cartridge1       (cart1)    .mx1  .bin  .rom  \nfs5500f2         cartridge2       (cart2)    .mx1  .bin  .rom  \nfs5500f2         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfs5500f2         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfs5500f2         printout         (prin)     .prn  \nfs5500f2         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfsa1             cartridge1       (cart1)    .mx1  .bin  .rom  \nfsa1             cartridge2       (cart2)    .mx1  .bin  .rom  \nfsa1             printout         (prin)     .prn  \nfsa1             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfsa1a            cartridge1       (cart1)    .mx1  .bin  .rom  \nfsa1a            cartridge2       (cart2)    .mx1  .bin  .rom  \nfsa1a            printout         (prin)     .prn  \nfsa1a            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfsa1f            cartridge1       (cart1)    .mx1  .bin  .rom  \nfsa1f            cartridge2       (cart2)    .mx1  .bin  .rom  \nfsa1f            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfsa1f            printout         (prin)     .prn  \nfsa1f            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfsa1fm           cartridge1       (cart1)    .mx1  .bin  .rom  \nfsa1fm           cartridge2       (cart2)    .mx1  .bin  .rom  \nfsa1fm           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfsa1fm           printout         (prin)     .prn  \nfsa1fm           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfsa1fx           cartridge1       (cart1)    .mx1  .bin  .rom  \nfsa1fx           cartridge2       (cart2)    .mx1  .bin  .rom  \nfsa1fx           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfsa1fx           printout         (prin)     .prn  \nfsa1fx           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfsa1gt           cartridge1       (cart1)    .mx1  .bin  .rom  \nfsa1gt           cartridge2       (cart2)    .mx1  .bin  .rom  \nfsa1gt           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfsa1gt           printout         (prin)     .prn  \nfsa1gt           midiin           (min)      .mid  .syx  \nfsa1gt           midiout          (mout)     .mid  \nfsa1mk2          cartridge1       (cart1)    .mx1  .bin  .rom  \nfsa1mk2          cartridge2       (cart2)    .mx1  .bin  .rom  \nfsa1mk2          printout         (prin)     .prn  \nfsa1mk2          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfsa1st           cartridge1       (cart1)    .mx1  .bin  .rom  \nfsa1st           cartridge2       (cart2)    .mx1  .bin  .rom  \nfsa1st           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfsa1st           printout         (prin)     .prn  \nfsa1wsx          cartridge1       (cart1)    .mx1  .bin  .rom  \nfsa1wsx          cartridge2       (cart2)    .mx1  .bin  .rom  \nfsa1wsx          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfsa1wsx          printout         (prin)     .prn  \nfsa1wsx          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfsa1wx           cartridge1       (cart1)    .mx1  .bin  .rom  \nfsa1wx           cartridge2       (cart2)    .mx1  .bin  .rom  \nfsa1wx           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfsa1wx           printout         (prin)     .prn  \nfsa1wx           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfsa1wxa          cartridge1       (cart1)    .mx1  .bin  .rom  \nfsa1wxa          cartridge2       (cart2)    .mx1  .bin  .rom  \nfsa1wxa          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nfsa1wxa          printout         (prin)     .prn  \nfsa1wxa          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfscc12           cartridge        (cart)     .bin  \nfscc12a          cartridge        (cart)     .bin  \nfscc6            cartridge        (cart)     .bin  \nfscc9            cartridge        (cart)     .bin  \nfscc9b           cartridge        (cart)     .bin  \nfscc9c           cartridge        (cart)     .bin  \nfscc9ps          cartridge        (cart)     .bin  \nfspc800          cartridge1       (cart1)    .mx1  .bin  .rom  \nfspc800          cartridge2       (cart2)    .mx1  .bin  .rom  \nfspc800          printout         (prin)     .prn  \nfspc800          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nfstm1            cartridge1       (cart1)    .mx1  .bin  .rom  \nfstm1            cartridge2       (cart2)    .mx1  .bin  .rom  \nfstm1            printout         (prin)     .prn  \nfstm1            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nft486f55         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nft486f55         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nft486f55         printout         (prin)     .prn  \nftimpactg        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nftsserv          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nftsserv          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nftsserv          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nftsserv          printout         (prin)     .prn  \nfu340            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfu340            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nfu340            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nfu340            printout         (prin)     .prn  \nfunkball         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nfuture32a        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nfuture32a        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nfuudol           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfz1              midiin           (min)      .mid  .syx  \nfz1              midiout1         (mout1)    .mid  \nfz1              midiout2         (mout2)    .mid  \nfz1              floppydisk       (flop)     .mfi  .dfi  .img  .hfe  \nfz10m            midiin           (min)      .mid  .syx  \nfz10m            midiout1         (mout1)    .mid  \nfz10m            midiout2         (mout2)    .mid  \nfz10m            floppydisk       (flop)     .mfi  .dfi  .img  .hfe  \nfz20m            midiin           (min)      .mid  .syx  \nfz20m            midiout1         (mout1)    .mid  \nfz20m            midiout2         (mout2)    .mid  \nfz20m            floppydisk       (flop)     .mfi  .dfi  .img  .hfe  \nfz20m            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nfzeroax          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfzeroaxc         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nfzeroaxd         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ng13jnr           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nga486am          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nga486am          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nga486am          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nga486am          printout         (prin)     .prn  \nga486vf          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nga486vf          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nga486vf          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nga486vf          printout         (prin)     .prn  \nga486vs          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nga486vs          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nga486vs          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nga486vs          printout         (prin)     .prn  \nga6la7           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nga6la7           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nga6la7           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nga6la7           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nga6la7           printout         (prin)     .prn  \ngaelcods         cartridge        (cart)     .bin  \ngahaha           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngahaha2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngalaxy           snapshot         (dump)     .gal  \ngalaxy           cassette         (cass)     .wav  .flac .gtp  \ngalaxyp          snapshot         (dump)     .gal  \ngalaxyp          cassette         (cass)     .wav  .flac .gtp  \ngaleb            cassette         (cass)     .wav  .flac \ngamate           cartridge        (cart)     .bin  \ngameboy          cartridge        (cart)     .bin  .gb   .gbc  .gbx  \ngamecom          cartridge1       (cart1)    .bin  .tgc  \ngamecom          cartridge2       (cart2)    .bin  .tgc  \ngamecst2         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngamecst2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngamecst2         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \ngamecst2         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \ngamecst2         printout         (prin)     .prn  \ngamecstl         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngamecstl         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngamecstl         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \ngamecstl         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \ngamecstl         printout         (prin)     .prn  \ngamefgtr         cartridge        (cart)     .bin  .gb   .gbc  .gbx  \ngamegeaj         cartridge        (cart)     .bin  .gg   \ngamegear         cartridge        (cart)     .bin  .gg   \ngamekin3         cartridge        (cart)     .bin  \ngameking         cartridge        (cart)     .bin  \ngamepock         cartridge        (cart)     .bin  \ngammagic         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngammagic         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \ngammagic         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \ngammagic         printout         (prin)     .prn  \ngamshara         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngamsharao        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngauntdl          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngauntdl          cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngauntdl          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngauntdl          cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngauntdl24        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngauntdl24        cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngauntdl24        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngauntdl24        cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngauntleg         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngauntleg         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngauntleg         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngauntleg         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngauntleg12       harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngauntleg12       cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngauntleg12       harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngauntleg12       cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngauntleg14       harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngauntleg14       cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngauntleg14       harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngauntleg14       cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngba              cartridge        (cart)     .gba  .bin  \ngbcolor          cartridge        (cart)     .bin  .gb   .gbc  .gbx  \ngbpocket         cartridge        (cart)     .bin  .gb   .gbc  .gbx  \ngbs5505x         cartridge        (cart)     .bin  \ngc10a            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ngc10a            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ngc10a            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngc10a            printout         (prin)     .prn  \ngchinatv         cartridge        (cart)     .nes  .unf  .unif \ngcslottv         cartridge        (cart)     .bin  .u1   \ngdariusg         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngegemdb          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngekimaka         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngekpurya         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngekpuryb         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngen_nomd         cartridge        (cart)     .smd  .bin  .md   .gen  \ngenesis          cartridge        (cart)     .smd  .bin  .md   .gen  \ngenesis_tmss     cartridge        (cart)     .smd  .bin  .md   .gen  \nges9051n         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nges9051n         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nges9051n         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nges9051n         printout         (prin)     .prn  \ngete486vl        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ngete486vl        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ngete486vl        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngete486vl        printout         (prin)     .prn  \ngfc1080          cartridge        (cart)     .mx1  .bin  .rom  \ngfc1080          printout         (prin)     .prn  \ngfc1080          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ngfc1080a         cartridge        (cart)     .mx1  .bin  .rom  \ngfc1080a         printout         (prin)     .prn  \ngfc1080a         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nggm              cartridge        (cart)     .bin  \nggxx             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nggxxac           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nggxxrl           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nggxxrlo          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nggxxsla          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nghostsqo         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nghostsqu         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngiglnrdo         cartridge        (cart)     .bin  \ngimix            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \ngimix            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \ngimix            floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \ngimix            floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \ngjspace          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngl2000           cartridge        (cart)     .bin  \ngl2000c          cartridge        (cart)     .bin  \ngl2000p          cartridge        (cart)     .bin  \ngl3000s          cartridge        (cart)     .bin  \ngl4000           cartridge        (cart)     .bin  \ngl4004           cartridge        (cart)     .bin  \ngl5000           cartridge        (cart)     .bin  \ngl5005x          cartridge        (cart)     .bin  \ngl6000sl         cartridge        (cart)     .bin  \ngl7007sl         cartridge        (cart)     .bin  \nglcolor          cartridge        (cart)     .bin  \nglmcolor         cartridge        (cart)     .bin  \nglpn             cartridge        (cart)     .bin  \nglscolor         cartridge        (cart)     .bin  \ngmaster          cartridge        (cart)     .bin  \ngmb486sg         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ngmb486sg         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ngmb486sg         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngmb486sg         printout         (prin)     .prn  \ngmb486unp        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ngmb486unp        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ngmb486unp        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngmb486unp        printout         (prin)     .prn  \ngmfamily         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngmfamily         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngmfamily         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \ngmfamily         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \ngmfamily         printout         (prin)     .prn  \ngmmc             cartridge        (cart)     .bin  \ngmtt             cartridge        (cart)     .bin  \ngnat10           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ngnat10           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ngobyrc           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngogostrk         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngoupilg1         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ngoupilg1         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ngoupilg2         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ngoupilg2         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ngpi1200          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngq863            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngq863            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngq863            printout         (prin)     .prn  \ngr700            cartridge        (cart)     .mks30_cart\ngs611606a        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ngs611606a        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ngs611606a        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngs611606a        printout         (prin)     .prn  \ngscpm            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngsfc200          cartridge        (cart)     .mx1  .bin  .rom  \ngsfc200          printout         (prin)     .prn  \ngsfc200          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ngsfc80u          cartridge        (cart)     .mx1  .bin  .rom  \ngsfc80u          printout         (prin)     .prn  \ngsfc80u          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ngtfore01         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore01         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore01         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore01         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore02         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore02         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore02         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore02         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore03         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore03         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore03         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore03         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore03a        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore03a        cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore03a        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore03a        cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore04         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore04         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore04         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore04         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore04a        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore04a        cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore04a        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore04a        cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore05         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore05         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore05         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore05         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore05a        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore05a        cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore05a        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore05a        cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore05b        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore05b        cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore05b        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore05b        cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore05c        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore05c        cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore05c        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore05c        cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore06         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore06         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfore06         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ngtfore06         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfrk10m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfrk10ma        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfrk11m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfrk3ma         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtfrk3ma         memcard1         (memc1)    .mc   \ngtfrk3ma         memcard2         (memc2)    .mc   \ngtfrk3mb         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngticlub2         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngticlub2ea       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ngtrfrk2m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk2ma        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk2maa       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk2mja       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk2mka       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk2ml1       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk2ml1       memcard1         (memc1)    .mc   \ngtrfrk2ml1       memcard2         (memc2)    .mc   \ngtrfrk2ml2       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk2ml2       memcard1         (memc1)    .mc   \ngtrfrk2ml2       memcard2         (memc2)    .mc   \ngtrfrk2mua       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk3m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk3m         memcard1         (memc1)    .mc   \ngtrfrk3m         memcard2         (memc2)    .mc   \ngtrfrk4m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk4m         memcard1         (memc1)    .mc   \ngtrfrk4m         memcard2         (memc2)    .mc   \ngtrfrk5m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk5ma        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk6m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk7m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk8m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk8ma        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrk9m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrks          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrksa         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrksaa        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrksac        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrksc         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrksea        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrksj         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrksja        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrksjc        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrksu         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrksua        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngtrfrksuc        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nguab             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ngunbalina        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngundamos         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngundcb79         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngundcb79a        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngundcb83         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngundcb83a        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngundcb83b        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngundmgd          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngundmxgd         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ngwnf             cartridge        (cart)     .bin  \ngx4000           cartridge        (cart)     .bin  .cpr  \nh01b             cassette         (cass)     .wav  .flac \nh01jce           cassette         (cass)     .wav  .flac \nh21              quickload        (quik)     .pgm  .tvc  \nh21              cartridge        (cart)     .bin  .rom  \nh8               cassette1        (cass1)    .wav  .flac .h8t  \nh8               cassette2        (cass2)    .wav  .flac .h8t  \nh88              cassette1        (cass1)    .wav  .flac .h8t  \nh88              cassette2        (cass2)    .wav  .flac .h8t  \nh88              printout         (prin)     .prn  \nh89              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nh89              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nh89              floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nh89              printout         (prin)     .prn  \nh89_cdr          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nh89_cdr          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nh89_cdr          floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nh89_cdr          floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nh89_cdr          printout         (prin)     .prn  \nh89_mms          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nh89_mms          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nh89_mms          floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nh89_mms          floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nh89_mms          floppydisk5      (flop5)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nh89_mms          floppydisk6      (flop6)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nh89_mms          floppydisk7      (flop7)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nh89_mms          floppydisk8      (flop8)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nh89_mms          printout         (prin)     .prn  \nhanihac          cartridge        (cart)     .bin  \nharemchl         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhawaii           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhawaii           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhb10             cartridge1       (cart1)    .mx1  .bin  .rom  \nhb10             cartridge2       (cart2)    .mx1  .bin  .rom  \nhb10             printout         (prin)     .prn  \nhb10             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhb101            cartridge1       (cart1)    .mx1  .bin  .rom  \nhb101            cartridge2       (cart2)    .mx1  .bin  .rom  \nhb101            printout         (prin)     .prn  \nhb101            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhb101p           cartridge1       (cart1)    .mx1  .bin  .rom  \nhb101p           cartridge2       (cart2)    .mx1  .bin  .rom  \nhb101p           printout         (prin)     .prn  \nhb101p           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhb10p            cartridge1       (cart1)    .mx1  .bin  .rom  \nhb10p            cartridge2       (cart2)    .mx1  .bin  .rom  \nhb10p            printout         (prin)     .prn  \nhb10p            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhb201            cartridge1       (cart1)    .mx1  .bin  .rom  \nhb201            cartridge2       (cart2)    .mx1  .bin  .rom  \nhb201            printout         (prin)     .prn  \nhb201            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhb201p           cartridge1       (cart1)    .mx1  .bin  .rom  \nhb201p           cartridge2       (cart2)    .mx1  .bin  .rom  \nhb201p           printout         (prin)     .prn  \nhb201p           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhb20p            cartridge1       (cart1)    .mx1  .bin  .rom  \nhb20p            cartridge2       (cart2)    .mx1  .bin  .rom  \nhb20p            printout         (prin)     .prn  \nhb20p            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhb501p           cartridge1       (cart1)    .mx1  .bin  .rom  \nhb501p           cartridge2       (cart2)    .mx1  .bin  .rom  \nhb501p           printout         (prin)     .prn  \nhb501p           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhb55             cartridge        (cart)     .mx1  .bin  .rom  \nhb55             printout         (prin)     .prn  \nhb55             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhb55d            cartridge1       (cart1)    .mx1  .bin  .rom  \nhb55d            cartridge2       (cart2)    .mx1  .bin  .rom  \nhb55d            printout         (prin)     .prn  \nhb55d            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhb55p            cartridge1       (cart1)    .mx1  .bin  .rom  \nhb55p            cartridge2       (cart2)    .mx1  .bin  .rom  \nhb55p            printout         (prin)     .prn  \nhb55p            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhb701fd          cartridge1       (cart1)    .mx1  .bin  .rom  \nhb701fd          cartridge2       (cart2)    .mx1  .bin  .rom  \nhb701fd          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhb701fd          printout         (prin)     .prn  \nhb701fd          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhb75             cartridge        (cart)     .mx1  .bin  .rom  \nhb75             printout         (prin)     .prn  \nhb75             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhb75d            cartridge1       (cart1)    .mx1  .bin  .rom  \nhb75d            cartridge2       (cart2)    .mx1  .bin  .rom  \nhb75d            printout         (prin)     .prn  \nhb75d            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhb75p            cartridge1       (cart1)    .mx1  .bin  .rom  \nhb75p            cartridge2       (cart2)    .mx1  .bin  .rom  \nhb75p            printout         (prin)     .prn  \nhb75p            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhb8000           cartridge1       (cart1)    .mx1  .bin  .rom  \nhb8000           cartridge2       (cart2)    .mx1  .bin  .rom  \nhb8000           printout         (prin)     .prn  \nhb8000           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf1             cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf1             cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf1             printout         (prin)     .prn  \nhbf1             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf1ii           cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf1ii           cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf1ii           printout         (prin)     .prn  \nhbf1ii           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf1xd           cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf1xd           cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf1xd           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbf1xd           printout         (prin)     .prn  \nhbf1xd           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf1xdj          cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf1xdj          cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf1xdj          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbf1xdj          printout         (prin)     .prn  \nhbf1xdj          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf1xv           cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf1xv           cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf1xv           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbf1xv           printout         (prin)     .prn  \nhbf1xv           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf5             cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf5             cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf5             printout         (prin)     .prn  \nhbf5             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf500           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbf500           cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf500           cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf500           printout         (prin)     .prn  \nhbf500           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf500_2         cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf500_2         cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf500_2         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbf500_2         printout         (prin)     .prn  \nhbf500_2         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf500f          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbf500f          cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf500f          cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf500f          cartridge3       (cart3)    .mx1  .bin  .rom  \nhbf500f          printout         (prin)     .prn  \nhbf500f          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf500p          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbf500p          cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf500p          cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf500p          cartridge3       (cart3)    .mx1  .bin  .rom  \nhbf500p          printout         (prin)     .prn  \nhbf500p          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf700d          cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf700d          cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf700d          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbf700d          printout         (prin)     .prn  \nhbf700d          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf700f          cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf700f          cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf700f          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbf700f          printout         (prin)     .prn  \nhbf700f          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf700p          cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf700p          cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf700p          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbf700p          printout         (prin)     .prn  \nhbf700p          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf700s          cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf700s          cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf700s          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbf700s          printout         (prin)     .prn  \nhbf700s          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf900           cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf900           cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf900           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbf900           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbf900           printout         (prin)     .prn  \nhbf900           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf900a          cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf900a          cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf900a          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbf900a          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbf900a          printout         (prin)     .prn  \nhbf900a          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf9p            cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf9p            cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf9p            printout         (prin)     .prn  \nhbf9p            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf9pr           cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf9pr           cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf9pr           printout         (prin)     .prn  \nhbf9pr           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbf9s            cartridge1       (cart1)    .mx1  .bin  .rom  \nhbf9s            cartridge2       (cart2)    .mx1  .bin  .rom  \nhbf9s            printout         (prin)     .prn  \nhbf9s            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbg900ap         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbg900ap         cartridge1       (cart1)    .mx1  .bin  .rom  \nhbg900ap         cartridge2       (cart2)    .mx1  .bin  .rom  \nhbg900ap         printout         (prin)     .prn  \nhbg900ap         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhbg900p          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhbg900p          cartridge1       (cart1)    .mx1  .bin  .rom  \nhbg900p          cartridge2       (cart2)    .mx1  .bin  .rom  \nhbg900p          printout         (prin)     .prn  \nhbg900p          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhc128            snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nhc128            quickload        (quik)     .raw  .scr  \nhc128            cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nhc2000           snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nhc2000           quickload        (quik)     .raw  .scr  \nhc2000           cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nhc5              cartridge        (cart)     .mx1  .bin  .rom  \nhc5              printout         (prin)     .prn  \nhc5              cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhc6              cartridge        (cart)     .mx1  .bin  .rom  \nhc6              printout         (prin)     .prn  \nhc6              cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhc7              cartridge1       (cart1)    .mx1  .bin  .rom  \nhc7              cartridge2       (cart2)    .mx1  .bin  .rom  \nhc7              printout         (prin)     .prn  \nhc7              cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhc85             snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nhc85             quickload        (quik)     .raw  .scr  \nhc85             cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nhc88             snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nhc88             quickload        (quik)     .raw  .scr  \nhc88             cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nhc90             snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nhc90             quickload        (quik)     .raw  .scr  \nhc90             cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nhc91             snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nhc91             quickload        (quik)     .raw  .scr  \nhc91             cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nheadg2           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nheadg2           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nheadg2           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nheatof11         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhec2hr           cassette         (cass)     .wav  .flac .k7   .cin  .for  \nhec2hr           printout         (prin)     .prn  \nhec2hrp          cassette         (cass)     .wav  .flac .k7   .cin  .for  \nhec2hrp          printout         (prin)     .prn  \nhec2hrx          cassette         (cass)     .wav  .flac .k7   .cin  .for  \nhec2hrx          printout         (prin)     .prn  \nhec2hrx          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhec2hrx          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhec2mdhrx        cassette         (cass)     .wav  .flac .k7   .cin  .for  \nhec2mdhrx        printout         (prin)     .prn  \nhec2mdhrx        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .hmd  \nhec2mx40         cassette         (cass)     .wav  .flac .k7   .cin  .for  \nhec2mx40         printout         (prin)     .prn  \nhec2mx40         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhec2mx40         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhec2mx80         cassette         (cass)     .wav  .flac .k7   .cin  .for  \nhec2mx80         printout         (prin)     .prn  \nhec2mx80         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhec2mx80         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhector1          cassette         (cass)     .wav  .flac .k7   .cin  .for  \nhector1          printout         (prin)     .prn  \nhektor           cassette         (cass)     .wav  .flac \nhektor2          cassette         (cass)     .wav  .flac \nhektor3          cassette         (cass)     .wav  .flac \nhellngt          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhhtiger          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhhtiger          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhhtiger          printout         (prin)     .prn  \nhhtiger          cassette         (cass)     .wav  .flac \nhikara           cartridge        (cart)     .bin  .u1   \nhisaturn         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhisaturn         cartridge        (cart)     .bin  \nhkc8800a         floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nhkc8800a         floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nhkc8800a         cassette         (cass)     .wav  .flac \nhmcompm2         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhmcompmx         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhmg1292          quickload        (quik)     .pgm  .tvc  \nhmg1292          cartridge        (cart)     .bin  .rom  \nhmg1392          quickload        (quik)     .pgm  .tvc  \nhmg1392          cartridge        (cart)     .bin  .rom  \nhmg2650          cartridge        (cart)     .bin  \nhobby            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhomelab2         cassette         (cass)     .wav  .flac \nhomelab2         quickload        (quik)     .htp  \nhomelab3         cassette         (cass)     .wav  .flac \nhomelab3         quickload        (quik)     .htp  \nhomelab4         cassette         (cass)     .wav  .flac \nhomelab4         quickload        (quik)     .htp  \nhostinv          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhot304           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhot304           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhot304           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhot304           printout         (prin)     .prn  \nhot307h          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhot307h          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhot307h          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhot307h          printout         (prin)     .prn  \nhot409           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhot409           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhot409           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhot409           printout         (prin)     .prn  \nhot419           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhot419           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhot419           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhot419           printout         (prin)     .prn  \nhot433           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhot433           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhot433           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhot433           printout         (prin)     .prn  \nhotbi13b         cartridge1       (cart1)    .mx1  .bin  .rom  \nhotbi13b         cartridge2       (cart2)    .mx1  .bin  .rom  \nhotbi13b         printout         (prin)     .prn  \nhotbi13b         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhotbi13p         cartridge1       (cart1)    .mx1  .bin  .rom  \nhotbi13p         cartridge2       (cart2)    .mx1  .bin  .rom  \nhotbi13p         printout         (prin)     .prn  \nhotbi13p         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhotbit20         cartridge1       (cart1)    .mx1  .bin  .rom  \nhotbit20         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhotbit20         cartridge2       (cart2)    .mx1  .bin  .rom  \nhotbit20         printout         (prin)     .prn  \nhotbit20         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhotd3            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhp2641           microtape1       (utap1)    .hti  \nhp2641           microtape2       (utap2)    .hti  \nhp2645           microtape1       (utap1)    .hti  \nhp2645           microtape2       (utap2)    .hti  \nhp64k            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp64k            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp85             romimage1        (rom1)     .bin  \nhp85             romimage2        (rom2)     .bin  \nhp85             romimage3        (rom3)     .bin  \nhp85             romimage4        (rom4)     .bin  \nhp85             romimage5        (rom5)     .bin  \nhp85             romimage6        (rom6)     .bin  \nhp85             microtape        (utap)     .hti  \nhp85             bitbanger1       (bitb1)    .     \nhp85             bitbanger2       (bitb2)    .     \nhp86b            romimage1        (rom1)     .bin  \nhp86b            romimage2        (rom2)     .bin  \nhp86b            romimage3        (rom3)     .bin  \nhp86b            romimage4        (rom4)     .bin  \nhp86b            romimage5        (rom5)     .bin  \nhp86b            romimage6        (rom6)     .bin  \nhp86b_001        romimage1        (rom1)     .bin  \nhp86b_001        romimage2        (rom2)     .bin  \nhp86b_001        romimage3        (rom3)     .bin  \nhp86b_001        romimage4        (rom4)     .bin  \nhp86b_001        romimage5        (rom5)     .bin  \nhp86b_001        romimage6        (rom6)     .bin  \nhp86b_004        romimage1        (rom1)     .bin  \nhp86b_004        romimage2        (rom2)     .bin  \nhp86b_004        romimage3        (rom3)     .bin  \nhp86b_004        romimage4        (rom4)     .bin  \nhp86b_004        romimage5        (rom5)     .bin  \nhp86b_004        romimage6        (rom6)     .bin  \nhp9808a          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nhp9808a          romimage1        (rom1)     .bin  \nhp9808a          romimage2        (rom2)     .bin  \nhp9816a          romimage1        (rom1)     .bin  \nhp9816a          romimage2        (rom2)     .bin  \nhp9825a          microtape        (utap)     .hti  \nhp9825a          romimage1        (rom1)     .bin  \nhp9825a          romimage2        (rom2)     .bin  \nhp9825a          romimage3        (rom3)     .bin  \nhp9825a          romimage4        (rom4)     .bin  \nhp9825a          bitbanger1       (bitb1)    .     \nhp9825a          bitbanger2       (bitb2)    .     \nhp9825b          microtape        (utap)     .hti  \nhp9825b          romimage1        (rom1)     .bin  \nhp9825b          romimage2        (rom2)     .bin  \nhp9825b          romimage3        (rom3)     .bin  \nhp9825b          romimage4        (rom4)     .bin  \nhp9825b          bitbanger1       (bitb1)    .     \nhp9825b          bitbanger2       (bitb2)    .     \nhp9825t          microtape        (utap)     .hti  \nhp9825t          romimage1        (rom1)     .bin  \nhp9825t          romimage2        (rom2)     .bin  \nhp9825t          romimage3        (rom3)     .bin  \nhp9825t          romimage4        (rom4)     .bin  \nhp9825t          bitbanger1       (bitb1)    .     \nhp9825t          bitbanger2       (bitb2)    .     \nhp9826a          romimage1        (rom1)     .bin  \nhp9826a          romimage2        (rom2)     .bin  \nhp9826a          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9831           microtape        (utap)     .hti  \nhp9831           romimage1        (rom1)     .bin  \nhp9831           romimage2        (rom2)     .bin  \nhp9831           romimage3        (rom3)     .bin  \nhp9831           romimage4        (rom4)     .bin  \nhp9836a          romimage1        (rom1)     .bin  \nhp9836a          romimage2        (rom2)     .bin  \nhp9836a          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9836a          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9836c          romimage1        (rom1)     .bin  \nhp9836c          romimage2        (rom2)     .bin  \nhp9836c          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9836c          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9845b          microtape1       (utap1)    .hti  \nhp9845b          microtape2       (utap2)    .hti  \nhp9845b          romimage1        (rom1)     .bin  \nhp9845b          romimage2        (rom2)     .bin  \nhp9845b          romimage3        (rom3)     .bin  \nhp9845b          romimage4        (rom4)     .bin  \nhp9845b          romimage5        (rom5)     .bin  \nhp9845b          romimage6        (rom6)     .bin  \nhp9845b          romimage7        (rom7)     .bin  \nhp9845b          romimage8        (rom8)     .bin  \nhp9845b          bitbanger1       (bitb1)    .     \nhp9845b          bitbanger2       (bitb2)    .     \nhp9845b_de       microtape1       (utap1)    .hti  \nhp9845b_de       microtape2       (utap2)    .hti  \nhp9845b_de       romimage1        (rom1)     .bin  \nhp9845b_de       romimage2        (rom2)     .bin  \nhp9845b_de       romimage3        (rom3)     .bin  \nhp9845b_de       romimage4        (rom4)     .bin  \nhp9845b_de       romimage5        (rom5)     .bin  \nhp9845b_de       romimage6        (rom6)     .bin  \nhp9845b_de       romimage7        (rom7)     .bin  \nhp9845b_de       romimage8        (rom8)     .bin  \nhp9845b_de       bitbanger1       (bitb1)    .     \nhp9845b_de       bitbanger2       (bitb2)    .     \nhp9845c          microtape1       (utap1)    .hti  \nhp9845c          microtape2       (utap2)    .hti  \nhp9845c          romimage1        (rom1)     .bin  \nhp9845c          romimage2        (rom2)     .bin  \nhp9845c          romimage3        (rom3)     .bin  \nhp9845c          romimage4        (rom4)     .bin  \nhp9845c          romimage5        (rom5)     .bin  \nhp9845c          romimage6        (rom6)     .bin  \nhp9845c          romimage7        (rom7)     .bin  \nhp9845c          romimage8        (rom8)     .bin  \nhp9845c          bitbanger1       (bitb1)    .     \nhp9845c          bitbanger2       (bitb2)    .     \nhp9845c_de       microtape1       (utap1)    .hti  \nhp9845c_de       microtape2       (utap2)    .hti  \nhp9845c_de       romimage1        (rom1)     .bin  \nhp9845c_de       romimage2        (rom2)     .bin  \nhp9845c_de       romimage3        (rom3)     .bin  \nhp9845c_de       romimage4        (rom4)     .bin  \nhp9845c_de       romimage5        (rom5)     .bin  \nhp9845c_de       romimage6        (rom6)     .bin  \nhp9845c_de       romimage7        (rom7)     .bin  \nhp9845c_de       romimage8        (rom8)     .bin  \nhp9845c_de       bitbanger1       (bitb1)    .     \nhp9845c_de       bitbanger2       (bitb2)    .     \nhp9845t          microtape1       (utap1)    .hti  \nhp9845t          microtape2       (utap2)    .hti  \nhp9845t          romimage1        (rom1)     .bin  \nhp9845t          romimage2        (rom2)     .bin  \nhp9845t          romimage3        (rom3)     .bin  \nhp9845t          romimage4        (rom4)     .bin  \nhp9845t          romimage5        (rom5)     .bin  \nhp9845t          romimage6        (rom6)     .bin  \nhp9845t          romimage7        (rom7)     .bin  \nhp9845t          romimage8        (rom8)     .bin  \nhp9845t          bitbanger1       (bitb1)    .     \nhp9845t          bitbanger2       (bitb2)    .     \nhp9845t_de       microtape1       (utap1)    .hti  \nhp9845t_de       microtape2       (utap2)    .hti  \nhp9845t_de       romimage1        (rom1)     .bin  \nhp9845t_de       romimage2        (rom2)     .bin  \nhp9845t_de       romimage3        (rom3)     .bin  \nhp9845t_de       romimage4        (rom4)     .bin  \nhp9845t_de       romimage5        (rom5)     .bin  \nhp9845t_de       romimage6        (rom6)     .bin  \nhp9845t_de       romimage7        (rom7)     .bin  \nhp9845t_de       romimage8        (rom8)     .bin  \nhp9845t_de       bitbanger1       (bitb1)    .     \nhp9845t_de       bitbanger2       (bitb2)    .     \nhp9k310          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k310          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k320          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k320          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k320          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhp9k320          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhp9k330          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k330          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k332          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k332          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k340          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k340          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k340          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhp9k340          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhp9k360          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k360          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k360          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhp9k360          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhp9k370          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k370          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k370          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhp9k370          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhp9k380          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k380          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k380          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhp9k380          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhp9k382          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k382          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhp9k382          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhp9k382          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhp_ipc           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nhp_ipc           romimage1        (rom1)     .bin  \nhp_ipc           romimage2        (rom2)     .bin  \nhr16             cassette         (cass)     .wav  .flac \nhr16b            cassette         (cass)     .wav  .flac \nhr84             cassette         (cass)     .wav  .flac \nhstrtpls         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhstrtpls         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhstrtpls         printout         (prin)     .prn  \nht108064         cassette         (cass)     .wav  .flac .cas  \nht108064         quickload        (quik)     .cmd  \nht108064         floppydisk1      (flop1)    .mfi  .dfi  .dmk  .jv1  .dsk  \nht108064         floppydisk2      (flop2)    .mfi  .dfi  .dmk  .jv1  .dsk  \nht108064         printout         (prin)     .prn  \nht1080z          cassette         (cass)     .wav  .flac .cas  \nht1080z          quickload        (quik)     .cmd  \nht1080z          floppydisk1      (flop1)    .mfi  .dfi  .dmk  .jv1  .dsk  \nht1080z          floppydisk2      (flop2)    .mfi  .dfi  .dmk  .jv1  .dsk  \nht1080z          printout         (prin)     .prn  \nht1080z2         cassette         (cass)     .wav  .flac .cas  \nht1080z2         quickload        (quik)     .cmd  \nht1080z2         floppydisk1      (flop1)    .mfi  .dfi  .dmk  .jv1  .dsk  \nht1080z2         floppydisk2      (flop2)    .mfi  .dfi  .dmk  .jv1  .dsk  \nht1080z2         printout         (prin)     .prn  \nht12a            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nht12a            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nht12a            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nht18c            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nht18c            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nht18c            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nht280            romimage1        (rom1)     .rom  .bin  \nht280            cassette         (cass)     .wav  .flac .csw  .uef  \nht280            printout         (prin)     .prn  \nht280            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nht280            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nht68k            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nhwparty          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhwparty          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhx10             cartridge        (cart)     .mx1  .bin  .rom  \nhx10             printout         (prin)     .prn  \nhx10             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx10d            cartridge        (cart)     .mx1  .bin  .rom  \nhx10d            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx10dp           cartridge        (cart)     .mx1  .bin  .rom  \nhx10dp           printout         (prin)     .prn  \nhx10dp           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx10e            cartridge        (cart)     .mx1  .bin  .rom  \nhx10e            printout         (prin)     .prn  \nhx10e            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx10f            cartridge        (cart)     .mx1  .bin  .rom  \nhx10f            printout         (prin)     .prn  \nhx10f            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx10s            cartridge        (cart)     .mx1  .bin  .rom  \nhx10s            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx10sa           cartridge        (cart)     .mx1  .bin  .rom  \nhx10sa           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx20             cartridge1       (cart1)    .mx1  .bin  .rom  \nhx20             cartridge2       (cart2)    .mx1  .bin  .rom  \nhx20             printout         (prin)     .prn  \nhx20             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx20e            cartridge1       (cart1)    .mx1  .bin  .rom  \nhx20e            cartridge2       (cart2)    .mx1  .bin  .rom  \nhx20e            printout         (prin)     .prn  \nhx20e            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx20i            cartridge1       (cart1)    .mx1  .bin  .rom  \nhx20i            cartridge2       (cart2)    .mx1  .bin  .rom  \nhx20i            printout         (prin)     .prn  \nhx20i            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx21             cartridge1       (cart1)    .mx1  .bin  .rom  \nhx21             cartridge2       (cart2)    .mx1  .bin  .rom  \nhx21             printout         (prin)     .prn  \nhx21             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx21f            cartridge1       (cart1)    .mx1  .bin  .rom  \nhx21f            cartridge2       (cart2)    .mx1  .bin  .rom  \nhx21f            printout         (prin)     .prn  \nhx21f            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx22             cartridge1       (cart1)    .mx1  .bin  .rom  \nhx22             cartridge2       (cart2)    .mx1  .bin  .rom  \nhx22             printout         (prin)     .prn  \nhx22             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx22i            cartridge1       (cart1)    .mx1  .bin  .rom  \nhx22i            cartridge2       (cart2)    .mx1  .bin  .rom  \nhx22i            printout         (prin)     .prn  \nhx22i            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx23             cartridge1       (cart1)    .mx1  .bin  .rom  \nhx23             cartridge2       (cart2)    .mx1  .bin  .rom  \nhx23             printout         (prin)     .prn  \nhx23             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx23f            cartridge1       (cart1)    .mx1  .bin  .rom  \nhx23f            cartridge2       (cart2)    .mx1  .bin  .rom  \nhx23f            printout         (prin)     .prn  \nhx23f            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx32             cartridge1       (cart1)    .mx1  .bin  .rom  \nhx32             cartridge2       (cart2)    .mx1  .bin  .rom  \nhx32             printout         (prin)     .prn  \nhx32             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx33             cartridge1       (cart1)    .mx1  .bin  .rom  \nhx33             cartridge2       (cart2)    .mx1  .bin  .rom  \nhx33             printout         (prin)     .prn  \nhx33             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx34             cartridge1       (cart1)    .mx1  .bin  .rom  \nhx34             cartridge2       (cart2)    .mx1  .bin  .rom  \nhx34             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nhx34             printout         (prin)     .prn  \nhx34             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhx51i            cartridge1       (cart1)    .mx1  .bin  .rom  \nhx51i            cartridge2       (cart2)    .mx1  .bin  .rom  \nhx51i            printout         (prin)     .prn  \nhx51i            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nhydrthnd         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhydrthnd         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhydrthnd         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nhydrthnd         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nhydrthnd         printout         (prin)     .prn  \nhydrthnd100d     harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhydrthnd100d     cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhydrthnd100d     floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nhydrthnd100d     floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nhydrthnd100d     printout         (prin)     .prn  \nhydrthnd101b     harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nhydrthnd101b     cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhydrthnd101b     floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nhydrthnd101b     floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nhydrthnd101b     printout         (prin)     .prn  \nhyo88t           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhyo88t           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhyo88t           printout         (prin)     .prn  \nhypbbc2p         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhypbbc2pk        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhyperath         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhyprdriv         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nhyprdriv         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhyprdriv         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nhyprdriv         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhyprdriv131      harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nhyprdriv131      cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhyprdriv131      harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nhyprdriv131      cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhyprscan         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nhyprscan         memcard          (memc)     .bin  \nhyprscan         quickload        (quik)     .exe  \nhyu16t           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhyu16t           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhyu16t           printout         (prin)     .prn  \nhyu16te          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhyu16te          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nhyu16te          printout         (prin)     .prn  \ni7000            cartridge        (cart)     .rom  \ni8530286         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8530286         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8530286         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ni8530h31         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8530h31         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8530h31         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ni8535043         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8535043         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8535043         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ni8535043         printout         (prin)     .prn  \ni8550021         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8550021         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8550021         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ni8550061         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8550061         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8550061         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ni8555081         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8555081         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8555081         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ni8555081         printout         (prin)     .prn  \ni8580071         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8580071         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8580071         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ni8580071         printout         (prin)     .prn  \ni8580111         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8580111         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ni8580111         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ni8580111         printout         (prin)     .prn  \nibm2011          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm2011          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm2011          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nibm2011rd        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm2011rd        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm2011rd        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nibm2121          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm2121          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm2121          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nibm2121rd        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm2121rd        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm2121rd        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nibm2123          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm2123          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm2123          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nibm2133          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm2133          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm2133          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nibm2133          printout         (prin)     .prn  \nibm5140          cassette         (cass)     .wav  .flac \nibm5140          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm5140          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm5140          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nibm5140          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nibm5150          cassette         (cass)     .wav  .flac \nibm5150          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm5150          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm5150          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nibm5150          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nibm5155          cassette         (cass)     .wav  .flac \nibm5155          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm5155          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm5155          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nibm5155          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nibm5160          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm5160          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm5160          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nibm5160          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nibm5162          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm5162          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm5162          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nibm5170          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm5170          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm5170          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nibm5170a         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm5170a         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibm5170a         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nibm6580          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nibm6580          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nibmpcjr          printout         (prin)     .prn  \nibmpcjr          cassette         (cass)     .wav  .flac \nibmpcjr          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibmpcjr          cartridge1       (cart1)    .bin  .jrc  \nibmpcjr          cartridge2       (cart2)    .bin  .jrc  \nibmpcjx          printout         (prin)     .prn  \nibmpcjx          cassette         (cass)     .wav  .flac \nibmpcjx          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibmpcjx          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nibmpcjx          cartridge1       (cart1)    .bin  .jrc  \nibmpcjx          cartridge2       (cart2)    .bin  .jrc  \nicanguit         cartridge        (cart)     .bin  \nicanpian         cartridge        (cart)     .bin  \nicebox           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nicebox           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nicldrsm40        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nicldrsm40        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nicldrsm40        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nikaruga          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nilm396b          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nilm396b          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nilm396b          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nimac             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nimds2            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .img  \nimds2            printout         (prin)     .prn  \nimpuls03         cassette         (cass)     .wav  .flac .rk   .rkr  .gam  .g16  .pki  \nindiana          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nindiana          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nindiana          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nindigo           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nindigo           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nindigo2_4415     harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nindigo2_4415     cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nindigo2_4415     printout         (prin)     .prn  \nindigo_r4000     harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nindigo_r4000     cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nindigo_r4400     harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nindigo_r4400     cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nindy_4610        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nindy_4610        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nindy_4610        printout         (prin)     .prn  \nindy_4610        picture          (pic)      .png  .jpg  .jpeg .jfif .bmp  .dib  \nindy_4610        vidfile          (vid)      .avi  \nindy_4613        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nindy_4613        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nindy_4613        printout         (prin)     .prn  \nindy_4613        picture          (pic)      .png  .jpg  .jpeg .jfif .bmp  .dib  \nindy_4613        vidfile          (vid)      .avi  \nindy_5015        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nindy_5015        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nindy_5015        printout         (prin)     .prn  \nindy_5015        picture          (pic)      .png  .jpg  .jpeg .jfif .bmp  .dib  \nindy_5015        vidfile          (vid)      .avi  \ningtelma         cartridge        (cart)     .bin  .chf  \ninidv3ca         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ninidv3cy         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ninitd            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ninitdexp         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ninitdexpo        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ninitdo           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ninitdv2e         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ninitdv2j         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ninitdv2ja        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ninitdv2jo        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ninitdv3e         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ninitdv3j         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ninitdv3jb        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ninnotab2         cartridge        (cart)     .bin  \ninnotv           cartridge        (cart)     .bin  \ninstruct         quickload        (quik)     .pgm  \ninstruct         cassette         (cass)     .wav  .flac \nintchess         cassette         (cass)     .wav  .flac \nintel02          cartridge        (cart)     .bin  \ninteract         cassette         (cass)     .wav  .flac .k7   .cin  .for  \ninteract         printout         (prin)     .prn  \nintervsn         cartridge        (cart)     .bin  \nintlc44          promimage1       (prom1)    .rom  .bin  \nintlc44          punchtape        (ptap)     .bnpf .hex  .lst  .txt  \nintlc44          promimage2       (prom2)    .rom  .bin  \nintlc440         promimage1       (prom1)    .rom  .bin  \nintlc440         punchtape        (ptap)     .bnpf .hex  .lst  .txt  \nintlc440         promimage2       (prom2)    .rom  .bin  \nintmpt03         cartridge        (cart)     .bin  \nintv             cartridge        (cart)     .bin  .int  .rom  .itv  \nintv2            cartridge        (cart)     .bin  .int  .rom  .itv  \nintvecs          cartridge        (cart)     .bin  .int  .rom  .itv  \nintvkbd          cartridge1       (cart1)    .bin  .int  .rom  .itv  \nintvkbd          cartridge2       (cart2)    .bin  \nintvkbd          cartridge3       (cart3)    .bin  \nintvoice         cartridge        (cart)     .bin  .int  .rom  .itv  \nintvsrs          cartridge        (cart)     .bin  .int  .rom  .itv  \ninves            snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ninves            quickload        (quik)     .raw  .scr  \ninves            cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nip2000           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nip2000           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nip2000           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nip2400           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nip2400           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nip2400           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nip2500           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nip2500           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nip2500           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nip2700           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nip2700           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nip2700           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nip2800           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nip2800           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nip2800           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nip6000           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nip6000           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nip6000           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nip6400           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nip6400           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nip6400           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nip6700           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nip6700           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nip6700           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nip6800           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nip6800           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nip6800           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nippo             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nippo2            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \niq128            cartridge        (cart)     .bin  \niq128_fr         cartridge        (cart)     .bin  \niq151            cassette         (cass)     .wav  .flac \niq151            cartridge1       (cart1)    .bin  .rom  \niq151            cartridge2       (cart2)    .bin  .rom  \niq151            cartridge3       (cart3)    .bin  .rom  \niq151            cartridge4       (cart4)    .bin  .rom  \niq151            cartridge5       (cart5)    .bin  .rom  \niq501            cartridge        (cart)     .nes  .unf  .unif \niq502            cartridge        (cart)     .nes  .unf  .unif \niq7000           cartridge        (cart)     .bin  \niqtv512          cartridge        (cart)     .bin  \niquest           cartridge        (cart)     .bin  \niqunlim          cartridge        (cart)     .bin  \niqunlimgr        cartridge        (cart)     .bin  \niqunlimz         cartridge        (cart)     .bin  \niris3130         quickload        (quik)     .     \nisa386c          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nisa386c          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nisa386c          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nisa386c          printout         (prin)     .prn  \nisa386u30        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nisa386u30        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nisa386u30        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nisa386u30        printout         (prin)     .prn  \nisbc286          printout         (prin)     .prn  \nisbc286          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nisbc286          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nisbc286          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nisbc2861         printout         (prin)     .prn  \nisbc2861         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nisbc2861         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nisbc2861         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nisbc28612        printout         (prin)     .prn  \nisbc28612        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nisbc28612        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nisbc28612        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nisbc8605         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nisbc8605         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nisbc8630         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nisbc8630         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nisbc8630         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nisinger          cartridge        (cart)     .bin  .u1   \niskr1030m        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \niskr1030m        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \niskr1031         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \niskr1031         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \niskr3104         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \niskr3104         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \niskr3104         printout         (prin)     .prn  \niteagle          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \niteagle          cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \niteagle          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \niteagle          cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nitmcmtp3         cartridge        (cart)     .bin  \nitt3030          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nitt3030          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nitt3030          floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nitttelma         cartridge        (cart)     .bin  .chf  \nittxtra          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nittxtra          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nittxtra          printout         (prin)     .prn  \nitunlim          cartridge        (cart)     .bin  \nivelultr         floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nivelultr         floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nivelultr         cassette         (cass)     .wav  .flac \nivg09            cassette         (cass)     .wav  .flac \nivg09            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nixl2000          cartridge        (cart)     .bin  \njaguar           quickload        (quik)     .abs  .bin  .cof  .jag  .prg  .rom  \njaguar           cartridge        (cart)     .j64  \njaguarcd         quickload        (quik)     .abs  .bin  .cof  .jag  .prg  .rom  \njaguarcd         cartridge        (cart)     .j64  \njaguarcd         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njak_capc         cartridge        (cart)     .bin  .u1   \njak_care         cartridge        (cart)     .bin  .u1   \njak_dbz          cartridge        (cart)     .bin  .u1   \njak_disf         cartridge        (cart)     .bin  .u1   \njak_disn         cartridge        (cart)     .bin  .u1   \njak_dora         cartridge        (cart)     .bin  .u1   \njak_dorr         cartridge        (cart)     .bin  .u1   \njak_dpr          cartridge        (cart)     .bin  .u1   \njak_dprs         cartridge        (cart)     .bin  .u1   \njak_fan4         cartridge        (cart)     .bin  .u1   \njak_just         cartridge        (cart)     .bin  .u1   \njak_mpac         cartridge        (cart)     .bin  .u1   \njak_nick         cartridge        (cart)     .bin  .u1   \njak_pooh         cartridge        (cart)     .bin  .u1   \njak_sbfc         cartridge        (cart)     .bin  .u1   \njak_sdoo         cartridge        (cart)     .bin  .u1   \njak_sith         cartridge        (cart)     .bin  .u1   \njak_sithp        cartridge        (cart)     .bin  .u1   \njak_spdm         cartridge        (cart)     .bin  .u1   \njak_swot         cartridge        (cart)     .bin  .u1   \njak_wof          cartridge        (cart)     .bin  .u1   \njak_wwe          cartridge        (cart)     .bin  .u1   \njakms41          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \njakms41          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njakms41          printout         (prin)     .prn  \njaminator        cartridge        (cart)     .bin  \njb3000           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \njb3000           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \njb3000           floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \njb3000           floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \njb3000           printout         (prin)     .prn  \njdredd           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \njdreddb          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \njet              snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \njet              quickload        (quik)     .raw  .scr  \njet              cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \njingystm         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njnero            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \njojo             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojoa            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojoar1          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojoar2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojoba           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojobajr1        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojobajr2        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojoban          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojobaner1       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojobaner2       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojobanr1        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojobanr2        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojobar1         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojobar2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojoj            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojojr1          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojojr2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojon            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojonr1          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojonr2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojor1           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojor2           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojou            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojour1          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njojour2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njopac            cartridge        (cart)     .bin  .rom  \njpark3           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \njpark3u          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \njpopira          cartridge        (cart)     .bin  .u1   \njppyex98         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njr100            cassette         (cass)     .wav  .flac \njr100            quickload        (quik)     .prg  \njr100u           cassette         (cass)     .wav  .flac \njr100u           quickload        (quik)     .prg  \njtc              cassette         (cass)     .wav  .flac \njtc              printout         (prin)     .prn  \njtc              quickload        (quik)     .jtc  .bin  \njtces23          cassette         (cass)     .wav  .flac \njtces23          printout         (prin)     .prn  \njtces23          quickload        (quik)     .jtc  .bin  \njtces40          cassette         (cass)     .wav  .flac \njtces40          printout         (prin)     .prn  \njtces40          quickload        (quik)     .jtc  .bin  \njtces88          cassette         (cass)     .wav  .flac \njtces88          printout         (prin)     .prn  \njtces88          quickload        (quik)     .jtc  .bin  \njuko16           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \njuko16           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \njuko16           printout         (prin)     .prn  \njuko8            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \njuko8            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \njuko8            printout         (prin)     .prn  \njuku             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .juk  \njuku             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .juk  \njunai            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njunai2           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njunior80         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \njunior80         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \njupace           cassette         (cass)     .wav  .flac .tap  \njupace           printout         (prin)     .prn  \njupace           snapshot         (dump)     .ace  \njupiter2         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \njupiter3         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \njvchc7gb         cartridge1       (cart1)    .mx1  .bin  .rom  \njvchc7gb         cartridge2       (cart2)    .mx1  .bin  .rom  \njvchc7gb         printout         (prin)     .prn  \njvchc7gb         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \njwj403tg         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \njwj403tg         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \njwj403tg         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \njwj403tg         printout         (prin)     .prn  \njwj446a          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \njwj446a          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \njwj446a          printout         (prin)     .prn  \njx10             cartridge        (cart)     .jx8p_cart\njx8p             cartridge        (cart)     .jx8p_cart\njx8po            cartridge        (cart)     .jx8p_cart\nk28              cartridge        (cart)     .vsm  .bin  \nk286i            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nk286i            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nk286i            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nkarams           cartridge        (cart)     .bin  \nkaramsg          cartridge        (cart)     .bin  \nkarous           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkatochan         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nkay1024          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nkay1024          quickload        (quik)     .raw  .scr  \nkay1024          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nkay1024          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nkay1024          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nkay1024          floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nkay1024          floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nkaypro1          quickload        (quik)     .com  .cpm  \nkaypro1          printout         (prin)     .prn  \nkaypro1          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkaypro1          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkaypro10         quickload        (quik)     .com  .cpm  \nkaypro10         printout         (prin)     .prn  \nkaypro10         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkaypro1084       quickload        (quik)     .com  .cpm  \nkaypro1084       printout         (prin)     .prn  \nkaypro1084       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkaypro16         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nkaypro16         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nkaypro16         printout         (prin)     .prn  \nkaypro284        quickload        (quik)     .com  .cpm  \nkaypro284        printout         (prin)     .prn  \nkaypro284        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkaypro284        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkaypro2x         quickload        (quik)     .com  .cpm  \nkaypro2x         printout         (prin)     .prn  \nkaypro2x         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkaypro2x         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkaypro484        quickload        (quik)     .com  .cpm  \nkaypro484        printout         (prin)     .prn  \nkaypro484        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkaypro484        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkaypro484p88     quickload        (quik)     .com  .cpm  \nkaypro484p88     printout         (prin)     .prn  \nkaypro484p88     floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkaypro484p88     floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkaypro4x         quickload        (quik)     .com  .cpm  \nkaypro4x         printout         (prin)     .prn  \nkaypro4x         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkaypro4x         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkayproii         quickload        (quik)     .com  .cpm  \nkayproii         printout         (prin)     .prn  \nkayproii         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkayproii         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkayproiip88      quickload        (quik)     .com  .cpm  \nkayproiip88      printout         (prin)     .prn  \nkayproiip88      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkayproiip88      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkayproiv         quickload        (quik)     .com  .cpm  \nkayproiv         printout         (prin)     .prn  \nkayproiv         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkayproiv         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkaypronew2       quickload        (quik)     .com  .cpm  \nkaypronew2       printout         (prin)     .prn  \nkaypronew2       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nkaypropc         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nkaypropc         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nkaypropc         printout         (prin)     .prn  \nkbh              cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkbh              cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkbm              cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkbm              cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkbm2nd           cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkbm2nd           cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkbm3rd           cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkbm3rd           cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkc85             printout         (prin)     .prn  \nkc85             cassette         (cass)     .wav  .flac \nkc85             cartridge        (cart)     .bin  .rom  \nkc85_111         cassette         (cass)     .wav  .flac \nkc85_2           quickload        (quik)     .kcc  \nkc85_2           cassette         (cass)     .wav  .flac .kcc  .kcb  .tap  .853  .854  .855  .tp2  .kcm  .sss  \nkc85_2           cartridge1       (cart1)    .bin  \nkc85_2           cartridge2       (cart2)    .bin  \nkc85_3           quickload        (quik)     .kcc  \nkc85_3           cassette         (cass)     .wav  .flac .kcc  .kcb  .tap  .853  .854  .855  .tp2  .kcm  .sss  \nkc85_3           cartridge1       (cart1)    .bin  \nkc85_3           cartridge2       (cart2)    .bin  \nkc85_4           quickload        (quik)     .kcc  \nkc85_4           cassette         (cass)     .wav  .flac .kcc  .kcb  .tap  .853  .854  .855  .tp2  .kcm  .sss  \nkc85_4           cartridge1       (cart1)    .bin  \nkc85_4           cartridge2       (cart2)    .bin  \nkc85_5           quickload        (quik)     .kcc  \nkc85_5           cassette         (cass)     .wav  .flac .kcc  .kcb  .tap  .853  .854  .855  .tp2  .kcm  .sss  \nkc85_5           cartridge1       (cart1)    .bin  \nkc85_5           cartridge2       (cart2)    .bin  \nkc87_10          cassette         (cass)     .wav  .flac \nkc87_11          cassette         (cass)     .wav  .flac \nkc87_20          cassette         (cass)     .wav  .flac \nkc87_21          cassette         (cass)     .wav  .flac \nkccomp           printout         (prin)     .prn  \nkccomp           snapshot         (dump)     .sna  \nkccomp           cassette         (cass)     .wav  .flac .cdt  \nkccomp           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \nkccomp           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \nkd2001           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkdeadeye         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkeroro           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkeyboard         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkharkovsky       cassette         (cass)     .wav  .flac .rks  \nkim1             cassette         (cass)     .wav  .flac .kim  .kim1 \nkinst            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nkinst2           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nkinst2uk         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nkisssite         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkma202f          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nkma202f          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nkma202f          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nkma300g          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nkma300g          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nkma300g          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nkma300g          printout         (prin)     .prn  \nkmc5000          cartridge1       (cart1)    .mx1  .bin  .rom  \nkmc5000          cartridge2       (cart2)    .mx1  .bin  .rom  \nkmc5000          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nkmc5000          printout         (prin)     .prn  \nkmc5000          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nkminus           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nkminus           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nkn5000           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nknpuzzle         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkokoroj          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkokoroj2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkokoroja         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkollon           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nkollonc          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nkonam80a         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkonam80j         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkonam80k         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkonam80s         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkonam80u         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkonamigv         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkonhaji          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkonotako         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkontiki          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nkontiki          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nkontiki          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nkontiki          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nkontiki          printout         (prin)     .prn  \nkontiki          cassette         (cass)     .wav  .flac \nkontur           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nkontur           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nkontur           floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nkontur           floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nkontur           cassette         (cass)     .wav  .flac \nkorg707          cartridge        (cart)     .ds8_card\nkorvet           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nkorvet           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nkorvet           floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nkorvet           floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nkorvet           cassette         (cass)     .wav  .flac \nkr03             cassette         (cass)     .wav  .flac .rk   .rkr  .gam  .g16  .pki  \nkrista2          cassette         (cass)     .wav  .flac \nkrista2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .fdd  \nkrista2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .fdd  \nkrista2          cartridge        (cart)     .bin  .emr  \nkristall2        cassette         (cass)     .wav  .flac .rk8  \nkrvnjvtv         quickload        (quik)     .pgm  .tvc  \nkrvnjvtv         cartridge        (cart)     .bin  .rom  \nks32             midiin           (min)      .mid  .syx  \nks32             midiout          (mout)     .mid  \nks32             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .hfe  \nkt216wb5         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nkt216wb5         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nkt216wb5         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nktx20t02         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nktx20t02         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nktx20t02         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nkurucham         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nkviper           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nkyoxt            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nkyoxt            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nkyoxt            printout         (prin)     .prn  \nlabtam           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nlacrazyc         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nlambda           cassette         (cass)     .wav  .flac .p    .81   .tzx  \nlandhigh         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nlandhigha        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nlanteach         cartridge        (cart)     .vsm  .bin  \nlantrans         cartridge        (cart)     .vsm  .bin  \nlantransp        cartridge        (cart)     .vsm  .bin  \nlas128e2         floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nlas128e2         floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nlas128e2         printout         (prin)     .prn  \nlas128ex         floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nlas128ex         floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nlas128ex         printout         (prin)     .prn  \nlaser110         snapshot         (dump)     .vz   \nlaser110         cassette         (cass)     .wav  .flac .cas  \nlaser128         floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nlaser128         floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nlaser128         printout         (prin)     .prn  \nlaser128o        floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nlaser128o        floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nlaser128o        printout         (prin)     .prn  \nlaser200         snapshot         (dump)     .vz   \nlaser200         cassette         (cass)     .wav  .flac .cas  \nlaser210         snapshot         (dump)     .vz   \nlaser210         cassette         (cass)     .wav  .flac .cas  \nlaser2c          floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nlaser2c          floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nlaser2c          cassette         (cass)     .wav  .flac \nlaser310         snapshot         (dump)     .vz   \nlaser310         cassette         (cass)     .wav  .flac .cas  \nlaser310h        snapshot         (dump)     .vz   \nlaser310h        cassette         (cass)     .wav  .flac .cas  \nlaser350         cassette         (cass)     .wav  .flac .cas  \nlaser350         cartridge        (cart)     .rom  .bin  \nlaser350         floppydisk       (flop)     .fdi  .td0  .imd  .cqm  .dsk  .d77  .d88  .1dd  \nlaser3k          floppydisk1      (flop1)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nlaser3k          floppydisk2      (flop2)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nlaser3k          floppydisk3      (flop3)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nlaser3k          floppydisk4      (flop4)    .mfi  .dfi  .dsk  .do   .po   .edd  .woz  .nib  \nlaser3k          cassette         (cass)     .wav  .flac \nlaser3k          printout         (prin)     .prn  \nlaser500         cassette         (cass)     .wav  .flac .cas  \nlaser500         cartridge        (cart)     .rom  .bin  \nlaser500         floppydisk       (flop)     .fdi  .td0  .imd  .cqm  .dsk  .d77  .d88  .1dd  \nlaser700         cassette         (cass)     .wav  .flac .cas  \nlaser700         cartridge        (cart)     .rom  .bin  \nlaser700         floppydisk1      (flop1)    .fdi  .td0  .imd  .cqm  .dsk  .d77  .d88  .1dd  \nlaser700         floppydisk2      (flop2)    .fdi  .td0  .imd  .cqm  .dsk  .d77  .d88  .1dd  \nlaser_turbo_xt   floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nlaser_turbo_xt   floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nlaser_turbo_xt   printout         (prin)     .prn  \nlaser_xt3        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nlaser_xt3        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nlaser_xt3        printout         (prin)     .prn  \nlaseract         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nlaseractj        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nlasr2001         cassette         (cass)     .wav  .flac \nlasr2001         printout         (prin)     .prn  \nlasr2001         cartridge        (cart)     .bin  .rom  \nlasstixx         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nlb186            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nlb186            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nlbpc             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nlc80             cassette         (cass)     .wav  .flac \nlc80_2           cassette         (cass)     .wav  .flac \nlc80a            cassette         (cass)     .wav  .flac \nlc80e            cassette         (cass)     .wav  .flac \nleapexpr         cartridge        (cart)     .bin  \nleappad          cartridge        (cart)     .bin  \nleappadmic       cartridge        (cart)     .bin  \nleapster         cartridge        (cart)     .bin  \nleapster2        cartridge        (cart)     .bin  \nleapsterlmx      cartridge        (cart)     .bin  \nleapstertv       cartridge        (cart)     .bin  \nledgmodd         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nledgmodd         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nledgmodd         printout         (prin)     .prn  \nledgmodm         cassette         (cass)     .wav  .flac \nledgmodm         printout1        (prin1)    .prn  \nledgmodm         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nledgmodm         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nledgmodm         printout2        (prin2)    .prn  \nledgmodm         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nledgmodm         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nlexipcm          cartridge        (cart)     .bin  \nlik              cassette         (cass)     .wav  .flac .rks  \nlion3500         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nlion3500         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nlion3500         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nlion3500         printout         (prin)     .prn  \nlisa             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nlisa             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nlisa2            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nlisa2            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nlisa210          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nlisa210          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nlk3000           cartridge        (cart)     .bin  \nllc2             cassette         (cass)     .wav  .flac \nlm103s           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nlm103s           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nlm103s           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nlnsy1392         quickload        (quik)     .pgm  .tvc  \nlnsy1392         cartridge        (cart)     .bin  .rom  \nlnux4004         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nlnw80            cassette         (cass)     .wav  .flac .cas  \nlnw80            quickload        (quik)     .cmd  \nlnw80            floppydisk1      (flop1)    .mfi  .dfi  .jv1  .dsk  .td0  \nlnw80            floppydisk2      (flop2)    .mfi  .dfi  .jv1  .dsk  .td0  \nlnw80            printout         (prin)     .prn  \nlola8            cassette         (cass)     .wav  .flac \nlola8a           cassette         (cass)     .wav  .flac \nlola8nk          cassette         (cass)     .wav  .flac \nls486e           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nls486e           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nls486e           printout         (prin)     .prn  \nlsrquiz          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nlsrquiz2i        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nlsrquizg         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nlsucm486v30      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nlsucm486v30      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nlsucm486v30      harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nlsucm486v30      printout         (prin)     .prn  \nltleappad        cartridge        (cart)     .bin  \nltmpbp           cassette         (cass)     .wav  .flac .csw  .uef  \nltmpbp           printout         (prin)     .prn  \nltmpbp           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nltmpbp           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nltmpbp           romimage1        (rom1)     .rom  .bin  \nltmpbp           romimage2        (rom2)     .rom  .bin  \nltmpbp           romimage3        (rom3)     .rom  .bin  \nltmpbp           romimage4        (rom4)     .rom  .bin  \nltmpbp           romimage5        (rom5)     .rom  .bin  \nltmpm            cartridge1       (cart1)    .rom  .bin  \nltmpm            cartridge2       (cart2)    .rom  .bin  \nltmpm            romimage1        (rom1)     .rom  .bin  \nltmpm            cassette         (cass)     .wav  .flac .csw  .uef  \nltmpm            printout         (prin)     .prn  \nltmpm            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nltmpm            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nluna             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nluna             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nluna88k          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nluna88k2         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nlupinsho         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nlupinshoo        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nluptype          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nluxorvec         cartridge        (cart)     .bin  .chf  \nluxorves         cartridge        (cart)     .bin  .chf  \nlvision          cartridge        (cart)     .bin  \nlviv             snapshot         (dump)     .sav  \nlviv             cassette         (cass)     .wav  .flac .lvt  .lvr  .lv0  .lv1  .lv2  .lv3  \nlw30             floppydisk       (flop)     .mfi  .dfi  .img  \nlw350            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nlw450            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nlw700i           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nlw840            floppydisk       (flop)     .mfi  .dfi  .dsk  .ima  .img  .ufi  .360  \nlx_jg7420        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nlynx             quickload        (quik)     .o    \nlynx             cartridge        (cart)     .lnx  .lyx  \nlynx128k         cassette         (cass)     .wav  .flac .tap  \nlynx128k         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ldf  \nlynx128k         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ldf  \nlynx48k          cassette         (cass)     .wav  .flac .tap  \nlynx96k          cassette         (cass)     .wav  .flac .tap  \nlynx96k          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ldf  \nlynx96k          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ldf  \nlzcolor64        cassette         (cass)     .wav  .flac .cas  \nlzcolor64        printout         (prin)     .prn  \nlzcolor64        cartridge        (cart)     .ccc  .rom  \nlzcolor64        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \nlzcolor64        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \nlzcolor64        harddisk1        (hard1)    .vhd  \nlzcolor64        harddisk2        (hard2)    .vhd  \nm10              printout         (prin)     .prn  \nm10              cassette         (cass)     .wav  .flac \nm10              cartridge        (cart)     .bin  .rom  \nm20              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nm20              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nm21              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nm21              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nm21              printout         (prin)     .prn  \nm21              harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nm21              harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nm24              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nm24              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nm24              printout         (prin)     .prn  \nm24              harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nm24              harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nm240             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nm240             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nm240             printout         (prin)     .prn  \nm240             harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nm240             harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nm250e            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nm250e            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nm250e            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nm290             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nm290             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nm290             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nm3               floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nm3               floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nm40              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nm40              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nm44              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nm44              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nm5               printout         (prin)     .prn  \nm5               cassette         (cass)     .wav  .flac .cas  \nm5               floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nm5               cartridge1       (cart1)    .bin  .rom  \nm5               cartridge2       (cart2)    .bin  .rom  \nm55hipl          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nm55hipl          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nm55hipl          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nm55hipl          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nm55hipl          printout         (prin)     .prn  \nm5p              printout         (prin)     .prn  \nm5p              cassette         (cass)     .wav  .flac .cas  \nm5p              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nm5p              cartridge1       (cart1)    .bin  .rom  \nm5p              cartridge2       (cart2)    .bin  .rom  \nm5p_brno         printout         (prin)     .prn  \nm5p_brno         cassette         (cass)     .wav  .flac .cas  \nm5p_brno         cartridge1       (cart1)    .bin  .rom  \nm5p_brno         cartridge2       (cart2)    .bin  .rom  \nm5p_brno         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nm5p_brno         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nm86rk            cassette         (cass)     .wav  .flac .rkm  \nm86rk            cartridge        (cart)     .bin  .rom  \nmac128k          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmac128k          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmac2fdhd         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmac2fdhd         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmac2fdhd         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmac2fdhd         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmac3             cassette         (cass)     .wav  .flac \nmac512k          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmac512k          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmac512ke         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmac512ke         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaccclas         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaccclas         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaccclas         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacclas2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacclas2         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacclas2         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacclasc         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacclasc         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacclasc         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacclasc         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacct610         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacct610         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacct610         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacct650         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacct650         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacct650         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmace             harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nmace             cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmace             harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nmace             cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacea            harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nmacea            cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacea            harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nmacea            cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacii            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacii            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacii            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaciici          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaciici          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaciici          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaciicx          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaciicx          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaciicx          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaciicx          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaciifx          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaciifx          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaciifx          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaciihmu         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaciihmu         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaciihmu         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaciisi          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaciisi          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaciisi          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaciivi          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaciivi          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaciivi          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaciivx          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaciivx          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaciivx          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaciix           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaciix           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaciix           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaciix           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaclc            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaclc            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaclc            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaclc2           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaclc2           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaclc2           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaclc3           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaclc3           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaclc3           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaclc3p          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaclc3p          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaclc3p          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaclc475         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaclc475         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaclc475         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaclc520         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaclc520         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaclc520         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaclc550         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaclc550         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaclc550         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaclc575         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmaclc575         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaclc575         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaclc580         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaclc580         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmaclc580         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacpb100         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacpb100         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacpb100         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpb140         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacpb140         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpb140         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacpb145         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacpb145         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpb145         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacpb145b        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacpb145b        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpb145b        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacpb160         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacpb160         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpb160         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacpb165         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacpb165         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpb165         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacpb165c        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacpb165c        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpb165c        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacpb170         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacpb170         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpb170         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacpb180         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacpb180         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpb180         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacpb180c        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacpb180c        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpb180c        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacpd210         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpd210         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacpd230         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpd230         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacpd250         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpd250         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacpd270c        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpd270c        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacpd280         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpd280         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacpd280c        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacpd280c        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacplus          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacplus          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacplus          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacplus          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacplusj         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacplusj         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacplusj         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacplusj         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacprtb          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacprtb          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacprtb          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacqd605         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacqd605         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacqd605         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacqd610         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacqd610         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacqd610         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacqd630         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacqd630         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacqd630         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacqd650         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacqd650         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacqd650         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacqd700         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacqd700         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacqd700         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacqd800         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacqd800         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacqd800         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacqd900         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacqd900         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacqd900         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacqd950         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacqd950         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacqd950         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacse            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacse            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacse            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacse            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacse30          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacse30          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacse30          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacse30          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmacsefd          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacsefd          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacsefd          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmacsefd          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmactv            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmactv            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmactv            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacxl            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmacxl            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nmagb233          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmagb233          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmagb233          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmagb236          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmagb236          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmagb236          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmagic6           snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nmagic6           quickload        (quik)     .raw  .scr  \nmagic6           cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nmagistr16        cartridge        (cart)     .smd  .bin  .md   .gen  \nmagistr16        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nmagistr16        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nmagistr16        printout         (prin)     .prn  \nmahjngoh         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmamboagg         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmamboagga        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmanager          cassette         (cass)     .wav  .flac \nmanager          printout         (prin)     .prn  \nmanager          cartridge        (cart)     .bin  .rom  \nmap1010          cassette         (cass)     .wav  .flac .phc  \nmap1010          printout         (prin)     .prn  \nmariojjl         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmasmario         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmasmario2        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmasmarios        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmat286           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmat286           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmat286           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmathsmag         cartridge        (cart)     .vsm  .bin  \nmato             cassette         (cass)     .wav  .flac .pmd  .tap  .ptp  \nmatrix           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmatrix           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmawasunda        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmax80            floppydisk       (flop)     .mfi  .dfi  .imd  \nmaxf_102         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaxf_ng          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaxforce         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmaxxi            floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nmaxxi            floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nmaxxi            cassette         (cass)     .wav  .flac \nmb1212c          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmb1212c          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmb1212c          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmb133340         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmb133340         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmb133340         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmb133340         printout         (prin)     .prn  \nmb1433aeap       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmb1433aeap       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmb1433aeap       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmb1433aeap       printout         (prin)     .prn  \nmb1433ucv        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmb1433ucv        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmb1433ucv        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmb1433ucv        printout         (prin)     .prn  \nmb1433uiv        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmb1433uiv        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmb1433uiv        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmb1433uiv        printout         (prin)     .prn  \nmb4d33           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmb4d33           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmb4d33           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmb4d33           printout         (prin)     .prn  \nmb8433uud        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmb8433uud        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmb8433uud        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmb8433uud        printout         (prin)     .prn  \nmba009           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmba009           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmba009           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmba029           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmba029           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmba029           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmba029           printout         (prin)     .prn  \nmba032q          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmba032q          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmba032q          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmba032q          printout         (prin)     .prn  \nmbc16            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmbc16            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmbc16            printout         (prin)     .prn  \nmbc16lt          printout1        (prin1)    .prn  \nmbc16lt          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmbc16lt          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmbc16lt          printout2        (prin2)    .prn  \nmbc18nb          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmbc18nb          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmbc18nb          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmbc200           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmbc200           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmbc200           printout         (prin)     .prn  \nmbc28            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmbc28            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmbc28            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmbc55x           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nmbc55x           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nmbee             quickload        (quik)     .mwb  .com  .bee  .bin  \nmbee             cassette         (cass)     .wav  .flac .tap  \nmbee             romimage1        (rom1)     .mbn  \nmbee             romimage2        (rom2)     .mbp  \nmbee128          printout         (prin)     .prn  \nmbee128          cassette         (cass)     .wav  .flac .tap  \nmbee128          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmbee128          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmbee128p         printout         (prin)     .prn  \nmbee128p         cassette         (cass)     .wav  .flac .tap  \nmbee128p         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmbee128p         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmbee256          printout         (prin)     .prn  \nmbee256          cassette         (cass)     .wav  .flac .tap  \nmbee256          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmbee256          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmbee56           printout         (prin)     .prn  \nmbee56           cassette         (cass)     .wav  .flac .tap  \nmbee56           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmbee56           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmbeeic           quickload        (quik)     .mwb  .com  .bee  .bin  \nmbeeic           printout         (prin)     .prn  \nmbeeic           cassette         (cass)     .wav  .flac .tap  \nmbeeic           romimage1        (rom1)     .mbn  \nmbeeic           romimage2        (rom2)     .mbp  \nmbeeic           romimage3        (rom3)     .mbp  \nmbeeic           romimage4        (rom4)     .mbp  \nmbeeic           romimage5        (rom5)     .mbp  \nmbeeic           romimage6        (rom6)     .mbp  \nmbeeic           romimage7        (rom7)     .mbp  \nmbeepc           quickload        (quik)     .mwb  .com  .bee  .bin  \nmbeepc           printout         (prin)     .prn  \nmbeepc           cassette         (cass)     .wav  .flac .tap  \nmbeepc           romimage1        (rom1)     .mbn  \nmbeepc           romimage2        (rom2)     .mbp  \nmbeepc           romimage3        (rom3)     .mbp  \nmbeepc           romimage4        (rom4)     .mbp  \nmbeepc           romimage5        (rom5)     .mbp  \nmbeepc           romimage6        (rom6)     .mbp  \nmbeepc           romimage7        (rom7)     .mbp  \nmbeepc85         quickload        (quik)     .mwb  .com  .bee  .bin  \nmbeepc85         printout         (prin)     .prn  \nmbeepc85         cassette         (cass)     .wav  .flac .tap  \nmbeepc85         romimage1        (rom1)     .mbn  \nmbeepc85         romimage2        (rom2)     .mbp  \nmbeepc85         romimage3        (rom3)     .mbp  \nmbeepc85         romimage4        (rom4)     .mbp  \nmbeepc85         romimage5        (rom5)     .mbp  \nmbeepc85         romimage6        (rom6)     .mbp  \nmbeepc85         romimage7        (rom7)     .mbp  \nmbeepc85b        quickload        (quik)     .mwb  .com  .bee  .bin  \nmbeepc85b        printout         (prin)     .prn  \nmbeepc85b        cassette         (cass)     .wav  .flac .tap  \nmbeepc85b        romimage1        (rom1)     .mbn  \nmbeepc85b        romimage2        (rom2)     .mbp  \nmbeepc85b        romimage3        (rom3)     .mbp  \nmbeepc85b        romimage4        (rom4)     .mbp  \nmbeepc85b        romimage5        (rom5)     .mbp  \nmbeepc85b        romimage6        (rom6)     .mbp  \nmbeepc85b        romimage7        (rom7)     .mbp  \nmbeepc85s        quickload        (quik)     .mwb  .com  .bee  .bin  \nmbeepc85s        printout         (prin)     .prn  \nmbeepc85s        cassette         (cass)     .wav  .flac .tap  \nmbeepc85s        romimage1        (rom1)     .mbn  \nmbeepc85s        romimage2        (rom2)     .mbp  \nmbeepc85s        romimage3        (rom3)     .mbp  \nmbeepc85s        romimage4        (rom4)     .mbp  \nmbeepc85s        romimage5        (rom5)     .mbp  \nmbeepc85s        romimage6        (rom6)     .mbp  \nmbeepc85s        romimage7        (rom7)     .mbp  \nmbeepp           printout         (prin)     .prn  \nmbeepp           cassette         (cass)     .wav  .flac .tap  \nmbeepp           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmbeepp           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmbeeppc          quickload        (quik)     .mwb  .com  .bee  .bin  \nmbeeppc          printout         (prin)     .prn  \nmbeeppc          cassette         (cass)     .wav  .flac .tap  \nmbeeppc          romimage1        (rom1)     .mbn  \nmbeeppc          romimage2        (rom2)     .mbp  \nmbeeppc          romimage3        (rom3)     .mbp  \nmbeeppc          romimage4        (rom4)     .mbp  \nmbeeppc          romimage5        (rom5)     .mbp  \nmbeeppc          romimage6        (rom6)     .mbp  \nmbeeppc          romimage7        (rom7)     .mbp  \nmbeett           printout         (prin)     .prn  \nmbeett           cassette         (cass)     .wav  .flac .tap  \nmbeett           romimage1        (rom1)     .mbn  \nmbeett           romimage2        (rom2)     .mbp  \nmbh1             cartridge1       (cart1)    .mx1  .bin  .rom  \nmbh1             cartridge2       (cart2)    .mx1  .bin  .rom  \nmbh1             printout         (prin)     .prn  \nmbh1             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmbh1e            cartridge1       (cart1)    .mx1  .bin  .rom  \nmbh1e            cartridge2       (cart2)    .mx1  .bin  .rom  \nmbh1e            printout         (prin)     .prn  \nmbh1e            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmbh2             cartridge1       (cart1)    .mx1  .bin  .rom  \nmbh2             cartridge2       (cart2)    .mx1  .bin  .rom  \nmbh2             printout         (prin)     .prn  \nmbh2             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmbh25            cartridge1       (cart1)    .mx1  .bin  .rom  \nmbh25            cartridge2       (cart2)    .mx1  .bin  .rom  \nmbh25            printout         (prin)     .prn  \nmbh25            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmbh3             cartridge1       (cart1)    .mx1  .bin  .rom  \nmbh3             cartridge2       (cart2)    .mx1  .bin  .rom  \nmbh3             printout         (prin)     .prn  \nmbh3             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmbh50            cartridge1       (cart1)    .mx1  .bin  .rom  \nmbh50            cartridge2       (cart2)    .mx1  .bin  .rom  \nmbh50            printout         (prin)     .prn  \nmbh50            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmbh70            cartridge1       (cart1)    .mx1  .bin  .rom  \nmbh70            cartridge2       (cart2)    .mx1  .bin  .rom  \nmbh70            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nmbh70            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nmbh70            printout         (prin)     .prn  \nmbh70            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmbs1             cassette         (cass)     .wav  .flac \nmc10             cassette         (cass)     .wav  .flac .cas  .c10  .k7   \nmc10             printout         (prin)     .prn  \nmc10             cartridge        (cart)     .mcc  .rom  \nmc1000           cassette         (cass)     .wav  .flac \nmc1000           printout         (prin)     .prn  \nmc1502           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nmc1502           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nmc1502           printout         (prin)     .prn  \nmc1502           cassette         (cass)     .wav  .flac \nmc1702           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmc1702           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmc1702           printout         (prin)     .prn  \nmc200            ssd1             (ssd1)     .rom  .bin  \nmc200            ssd2             (ssd2)     .rom  .bin  \nmc200            ssd3             (ssd3)     .rom  .bin  \nmc200            ssd4             (ssd4)     .rom  .bin  \nmc200            printout         (prin)     .prn  \nmc300            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmc400            ssd1             (ssd1)     .rom  .bin  \nmc400            ssd2             (ssd2)     .rom  .bin  \nmc400            ssd3             (ssd3)     .rom  .bin  \nmc400            ssd4             (ssd4)     .rom  .bin  \nmc400            printout         (prin)     .prn  \nmc50             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmc50mk2          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmc600            printout         (prin)     .prn  \nmc600            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nmc600            ssd1             (ssd1)     .rom  .bin  \nmc600            ssd2             (ssd2)     .rom  .bin  \nmc600            ssd3             (ssd3)     .rom  .bin  \nmc600            ssd4             (ssd4)     .rom  .bin  \nmccpm            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmccpm            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmcword           ssd1             (ssd1)     .rom  .bin  \nmcword           ssd2             (ssd2)     .rom  .bin  \nmcword           ssd3             (ssd3)     .rom  .bin  \nmcword           ssd4             (ssd4)     .rom  .bin  \nmcword           printout         (prin)     .prn  \nmcword_de        ssd1             (ssd1)     .rom  .bin  \nmcword_de        ssd2             (ssd2)     .rom  .bin  \nmcword_de        ssd3             (ssd3)     .rom  .bin  \nmcword_de        ssd4             (ssd4)     .rom  .bin  \nmcword_de        printout         (prin)     .prn  \nmd2              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmd23do           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmd3              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmd4duvc          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmd4duvc          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmd4duvc          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmd4duvc          printout         (prin)     .prn  \nmdisk            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmdisk            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmduckspa         cartridge        (cart)     .bin  \nmedalnt          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmedalnt2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmedalnta         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmegacd           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmegacd2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmegacd2j         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmegacda          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmegacdj          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmegadrij         cartridge        (cart)     .smd  .bin  .md   .gen  \nmegadriv         cartridge        (cart)     .smd  .bin  .md   .gen  \nmegaduck         cartridge        (cart)     .bin  \nmegajet          cartridge        (cart)     .smd  .bin  .md   .gen  \nmegapc           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmegapc           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmegapc           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmegapc           printout         (prin)     .prn  \nmegapcpl         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmegapcpl         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmegapcpl         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmegapcpl         printout         (prin)     .prn  \nmegapcpla        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmegapcpla        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmegapcpla        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmegapcpla        printout         (prin)     .prn  \nmegast           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nmegast           printout         (prin)     .prn  \nmegast           midiin           (min)      .mid  .syx  \nmegast           midiout          (mout)     .mid  \nmegast           romimage         (rom)      .bin  .rom  .stc  \nmegast_de        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nmegast_de        printout         (prin)     .prn  \nmegast_de        midiin           (min)      .mid  .syx  \nmegast_de        midiout          (mout)     .mid  \nmegast_de        romimage         (rom)      .bin  .rom  .stc  \nmegast_fr        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nmegast_fr        printout         (prin)     .prn  \nmegast_fr        midiin           (min)      .mid  .syx  \nmegast_fr        midiout          (mout)     .mid  \nmegast_fr        romimage         (rom)      .bin  .rom  .stc  \nmegast_se        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nmegast_se        printout         (prin)     .prn  \nmegast_se        midiin           (min)      .mid  .syx  \nmegast_se        midiout          (mout)     .mid  \nmegast_se        romimage         (rom)      .bin  .rom  .stc  \nmegast_sg        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nmegast_sg        printout         (prin)     .prn  \nmegast_sg        midiin           (min)      .mid  .syx  \nmegast_sg        midiout          (mout)     .mid  \nmegast_sg        romimage         (rom)      .bin  .rom  .stc  \nmegast_uk        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nmegast_uk        printout         (prin)     .prn  \nmegast_uk        midiin           (min)      .mid  .syx  \nmegast_uk        midiout          (mout)     .mid  \nmegast_uk        romimage         (rom)      .bin  .rom  .stc  \nmegaste          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nmegaste          printout         (prin)     .prn  \nmegaste          midiin           (min)      .mid  .syx  \nmegaste          midiout          (mout)     .mid  \nmegaste          romimage         (rom)      .bin  .rom  .stc  \nmegaste_de       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nmegaste_de       printout         (prin)     .prn  \nmegaste_de       midiin           (min)      .mid  .syx  \nmegaste_de       midiout          (mout)     .mid  \nmegaste_de       romimage         (rom)      .bin  .rom  .stc  \nmegaste_es       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nmegaste_es       printout         (prin)     .prn  \nmegaste_es       midiin           (min)      .mid  .syx  \nmegaste_es       midiout          (mout)     .mid  \nmegaste_es       romimage         (rom)      .bin  .rom  .stc  \nmegaste_fr       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nmegaste_fr       printout         (prin)     .prn  \nmegaste_fr       midiin           (min)      .mid  .syx  \nmegaste_fr       midiout          (mout)     .mid  \nmegaste_fr       romimage         (rom)      .bin  .rom  .stc  \nmegaste_it       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nmegaste_it       printout         (prin)     .prn  \nmegaste_it       midiin           (min)      .mid  .syx  \nmegaste_it       midiout          (mout)     .mid  \nmegaste_it       romimage         (rom)      .bin  .rom  .stc  \nmegaste_se       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nmegaste_se       printout         (prin)     .prn  \nmegaste_se       midiin           (min)      .mid  .syx  \nmegaste_se       midiout          (mout)     .mid  \nmegaste_se       romimage         (rom)      .bin  .rom  .stc  \nmegaste_uk       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nmegaste_uk       printout         (prin)     .prn  \nmegaste_uk       midiin           (min)      .mid  .syx  \nmegaste_uk       midiout          (mout)     .mid  \nmegaste_uk       romimage         (rom)      .bin  .rom  .stc  \nmegatech         cartridge1       (cart1)    .bin  \nmegatech         cartridge2       (cart2)    .bin  \nmegatech         cartridge3       (cart3)    .bin  \nmegatech         cartridge4       (cart4)    .bin  \nmegatech         cartridge5       (cart5)    .bin  \nmegatech         cartridge6       (cart6)    .bin  \nmegatech         cartridge7       (cart7)    .bin  \nmegatech         cartridge8       (cart8)    .bin  \nmekd2            cassette         (cass)     .wav  .flac \nmekd2            quickload        (quik)     .d2   \nmekd3            cassette         (cass)     .wav  .flac \nmekd4            cassette         (cass)     .wav  .flac \nmekd5            cassette         (cass)     .wav  .flac \nmeltyb           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmeltybld         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmeltyblo         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmeltybo          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmeritum1         printout         (prin)     .prn  \nmeritum1         cassette         (cass)     .wav  .flac \nmeritum1         quickload        (quik)     .cmd  \nmeritum2         printout         (prin)     .prn  \nmeritum2         cassette         (cass)     .wav  .flac \nmeritum2         quickload        (quik)     .cmd  \nmeritum_net      printout         (prin)     .prn  \nmeritum_net      cassette         (cass)     .wav  .flac \nmeritum_net      quickload        (quik)     .cmd  \nmfabfz           cassette         (cass)     .wav  .flac \nmfabfz85         cassette         (cass)     .wav  .flac \nmfightc          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmfightcc         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmfleappad        cartridge        (cart)     .bin  \nmg1              harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nmg1              harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nmg1              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .raw  \nmgnumber         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmgprem11         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmicral45         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmicral45         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmicral45         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmicro88          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmicro88          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmicro88          printout         (prin)     .prn  \nmicro88          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmicrobx2         printout         (prin)     .prn  \nmicrobx2         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmicrobx2         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmicroeng         floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nmicroeng         floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nmicroeng         cassette         (cass)     .wav  .flac \nmicron           cassette         (cass)     .wav  .flac \nmicron           romimage1        (rom1)     .bin  .rom  \nmicron           romimage2        (rom2)     .bin  .rom  \nmicron           romimage3        (rom3)     .bin  .rom  \nmicron           romimage4        (rom4)     .bin  .rom  \nmicron           romimage5        (rom5)     .bin  .rom  \nmicron           snapshot         (dump)     .dmp  .m65  \nmicron           quickload        (quik)     .hex  \nmicrotrol        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .wta  \nmicrotrol        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .wta  \nmicrovsn         cartridge        (cart)     .bin  \nmijx30gp         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmijx30gp         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmijx30gp         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmijx30gp         printout         (prin)     .prn  \nmikro80          cassette         (cass)     .wav  .flac .rk8  \nmikron2          cassette         (cass)     .wav  .flac .rk   .rkr  .gam  .g16  .pki  \nmikrosha         cassette         (cass)     .wav  .flac .rkm  \nmikrosha         cartridge        (cart)     .bin  .rom  \nmindset          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nmindset          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nmini5sx          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \nmini5sx          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \nminifram         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nminiscc          cartridge        (cart)     .bin  \nminiscco         cartridge        (cart)     .bin  \nminisys2k        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nminisys2k        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nminisys2k        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nminitel2         romimage         (rom)      .bin  .rom  \nmisterx          cartridge        (cart)     .bin  \nmistrum          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nmistrum          quickload        (quik)     .raw  .scr  \nmistrum          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nmj1              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmj1a             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmj1b             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmj1c             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmj1d             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmj1e             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmj2              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmj2c             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmj2f             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmj3              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmj3c             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmj3d             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmj3evo           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmj3evoa          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmj3evoup         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmj3up            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmjgalpri         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmjmania          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmk14             cassette         (cass)     .wav  .flac \nmk14             quickload        (quik)     .bin  \nmk14vdu          cassette         (cass)     .wav  .flac \nmk14vdu          quickload        (quik)     .bin  \nmk82             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmk82             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmk82             quickload        (quik)     .com  .cpm  \nmk83             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmk83             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmk83             quickload        (quik)     .com  .cpm  \nmk88             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmk88             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmk88             printout         (prin)     .prn  \nmkit09           cassette         (cass)     .wav  .flac \nmkit09a          cassette         (cass)     .wav  .flac \nmkp286           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmkp286           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmkp286           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmks30            cartridge        (cart)     .mks30_cart\nmks70            cartridge        (cart)     .jx8p_cart\nml8000           cartridge        (cart)     .mx1  .bin  .rom  \nml8000           printout         (prin)     .prn  \nml8000           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmlf110           cartridge1       (cart1)    .mx1  .bin  .rom  \nmlf110           cartridge2       (cart2)    .mx1  .bin  .rom  \nmlf110           printout         (prin)     .prn  \nmlf110           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmlf120           cartridge1       (cart1)    .mx1  .bin  .rom  \nmlf120           cartridge2       (cart2)    .mx1  .bin  .rom  \nmlf120           printout         (prin)     .prn  \nmlf120           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmlf48            cartridge1       (cart1)    .mx1  .bin  .rom  \nmlf48            cartridge2       (cart2)    .mx1  .bin  .rom  \nmlf48            printout         (prin)     .prn  \nmlf48            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmlf80            cartridge1       (cart1)    .mx1  .bin  .rom  \nmlf80            cartridge2       (cart2)    .mx1  .bin  .rom  \nmlf80            printout         (prin)     .prn  \nmlf80            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmlfx1            cartridge1       (cart1)    .mx1  .bin  .rom  \nmlfx1            cartridge2       (cart2)    .mx1  .bin  .rom  \nmlfx1            printout         (prin)     .prn  \nmlfx1            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmlg1             cartridge1       (cart1)    .mx1  .bin  .rom  \nmlg1             cartridge2       (cart2)    .mx1  .bin  .rom  \nmlg1             printout         (prin)     .prn  \nmlg1             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmlg10            cartridge1       (cart1)    .mx1  .bin  .rom  \nmlg10            cartridge2       (cart2)    .mx1  .bin  .rom  \nmlg10            printout         (prin)     .prn  \nmlg10            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmlg3             cartridge1       (cart1)    .mx1  .bin  .rom  \nmlg3             cartridge2       (cart2)    .mx1  .bin  .rom  \nmlg3             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nmlg3             cartridge3       (cart3)    .mx1  .bin  .rom  \nmlg3             printout         (prin)     .prn  \nmlg3             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmlg30            cartridge1       (cart1)    .mx1  .bin  .rom  \nmlg30            cartridge2       (cart2)    .mx1  .bin  .rom  \nmlg30            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nmlg30            cartridge3       (cart3)    .mx1  .bin  .rom  \nmlg30            cartridge4       (cart4)    .mx1  .bin  .rom  \nmlg30            printout         (prin)     .prn  \nmlg30            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmlg30_2          cartridge1       (cart1)    .mx1  .bin  .rom  \nmlg30_2          cartridge2       (cart2)    .mx1  .bin  .rom  \nmlg30_2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nmlg30_2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nmlg30_2          cartridge3       (cart3)    .mx1  .bin  .rom  \nmlg30_2          printout         (prin)     .prn  \nmlg30_2          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmm1              cartridge        (cart)     .bin  \nmm1a             cartridge        (cart)     .bin  \nmm1m4            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmm1m4            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmm1m4g           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmm1m4g           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmm1m6            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmm1m6            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmm1m6g           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmm1m6g           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmm1m7            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmm1m7            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmm1m7g           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmm1m7g           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmm2              cartridge        (cart)     .bin  \nmm2a             cartridge        (cart)     .bin  \nmm2b             cartridge        (cart)     .bin  \nmm2c             cartridge        (cart)     .bin  \nmm2d             cartridge        (cart)     .bin  \nmm2e             cartridge        (cart)     .bin  \nmm2f             cartridge        (cart)     .bin  \nmm2m35d          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmm2m35d          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmm4              cartridge        (cart)     .bin  \nmm4a             cartridge        (cart)     .bin  \nmm4b             cartridge        (cart)     .bin  \nmm4tk            cartridge        (cart)     .bin  \nmm5              cartridge        (cart)     .bin  \nmm5a             cartridge        (cart)     .bin  \nmmaruchan        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmmaruchana       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmmbo4088         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmmbo4088         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmmbo4088         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmmd1             cassette         (cass)     .wav  .flac \nmmd2             cassette         (cass)     .wav  .flac \nmmf9000          floppydisk1      (flop1)    .mfi  .dfi  .d80  \nmmf9000          floppydisk2      (flop2)    .mfi  .dfi  .d80  \nmmf9000          cassette         (cass)     .wav  .flac .tap  \nmmf9000          quickload        (quik)     .p00  .prg  \nmmf9000          cartridge1       (cart1)    .bin  .rom  \nmmf9000          cartridge2       (cart2)    .bin  .rom  \nmmf9000_se       floppydisk1      (flop1)    .mfi  .dfi  .d80  \nmmf9000_se       floppydisk2      (flop2)    .mfi  .dfi  .d80  \nmmf9000_se       cassette         (cass)     .wav  .flac .tap  \nmmf9000_se       quickload        (quik)     .p00  .prg  \nmmf9000_se       cartridge1       (cart1)    .bin  .rom  \nmmf9000_se       cartridge2       (cart2)    .bin  .rom  \nmmr4000be        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmmr4000be        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmmr4000be        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nmmr4000be        printout         (prin)     .prn  \nmmr4000le        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmmr4000le        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmmr4000le        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nmmr4000le        printout         (prin)     .prn  \nmmt8             cassette         (cass)     .wav  .flac \nmo5              cassette         (cass)     .wav  .k5   .k7   \nmo5              cartridge        (cart)     .m5   .rom  \nmo5e             cassette         (cass)     .wav  .k5   .k7   \nmo5e             cartridge        (cart)     .m5   .rom  \nmo5nr            cassette         (cass)     .wav  .k5   .k7   \nmo5nr            cartridge        (cart)     .m5   .rom  \nmo6              cassette         (cass)     .wav  .k5   .k7   \nmo6              cartridge        (cart)     .m5   .rom  \nmo6              printout         (prin)     .prn  \nmobigo           cartridge        (cart)     .bin  \nmobigo2          cartridge        (cart)     .bin  \nmobigos          cartridge        (cart)     .bin  \nmocapb           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmocapbj          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmocapglf         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmoeru            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmogitate         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmojmikro         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmojmikro         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmojmikro         quickload        (quik)     .com  .cpm  \nmok              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmokp386          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmokp386          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmokp386          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmokp386          printout         (prin)     .prn  \nmokp386sx        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmokp386sx        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmokp386sx        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmom3v3           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmom3v3           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmom3v3           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmom3v3           printout         (prin)     .prn  \nmonkeyba         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmonkmonk         cartridge        (cart)     .vsm  .bin  \nmonkyjmp         cartridge1       (cart1)    .bin  \nmonkyjmp         cartridge2       (cart2)    .bin  \nmononcol         cartridge        (cart)     .bin  \nmononuxt         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmononuxt         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmononuxt         printout         (prin)     .prn  \nmononuxt         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmononuxt2        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmononuxt2        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmononuxt2        printout         (prin)     .prn  \nmononuxt2        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmp68a            cassette         (cass)     .wav  .flac \nmpc10            cartridge        (cart)     .mx1  .bin  .rom  \nmpc10            printout         (prin)     .prn  \nmpc10            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmpc100           cartridge1       (cart1)    .mx1  .bin  .rom  \nmpc100           cartridge2       (cart2)    .mx1  .bin  .rom  \nmpc100           printout         (prin)     .prn  \nmpc100           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmpc1600          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmpc1600          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmpc1600          printout         (prin)     .prn  \nmpc200           cartridge1       (cart1)    .mx1  .bin  .rom  \nmpc200           cartridge2       (cart2)    .mx1  .bin  .rom  \nmpc200           printout         (prin)     .prn  \nmpc200           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmpc2000xl        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  \nmpc2000xl        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmpc2000xl        midiin1          (min1)     .mid  .syx  \nmpc2000xl        midiin2          (min2)     .mid  .syx  \nmpc2000xl        midiout1         (mout1)    .mid  \nmpc2000xl        midiout2         (mout2)    .mid  \nmpc200sp         cartridge1       (cart1)    .mx1  .bin  .rom  \nmpc200sp         cartridge2       (cart2)    .mx1  .bin  .rom  \nmpc200sp         printout         (prin)     .prn  \nmpc200sp         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmpc2300          cartridge1       (cart1)    .mx1  .bin  .rom  \nmpc2300          cartridge2       (cart2)    .mx1  .bin  .rom  \nmpc2300          printout         (prin)     .prn  \nmpc2300          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmpc2500f         cartridge        (cart)     .mx1  .bin  .rom  \nmpc2500f         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nmpc2500f         printout         (prin)     .prn  \nmpc2500f         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmpc25fd          cartridge        (cart)     .mx1  .bin  .rom  \nmpc25fd          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nmpc25fd          printout         (prin)     .prn  \nmpc25fd          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmpc25fs          cartridge        (cart)     .mx1  .bin  .rom  \nmpc25fs          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nmpc25fs          printout         (prin)     .prn  \nmpc25fs          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmpc27            cartridge1       (cart1)    .mx1  .bin  .rom  \nmpc27            cartridge2       (cart2)    .mx1  .bin  .rom  \nmpc27            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nmpc27            printout         (prin)     .prn  \nmpc27            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmpc3000          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  \nmpc3000          midiin           (min)      .mid  .syx  \nmpc3000          midiout          (mout)     .mid  \nmpc60            midiin1          (min1)     .mid  .syx  \nmpc60            midiin2          (min2)     .mid  .syx  \nmpc60            midiout1         (mout1)    .mid  \nmpc60            midiout2         (mout2)    .mid  \nmpc60            midiout3         (mout3)    .mid  \nmpc60            midiout4         (mout4)    .mid  \nmpc60            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  \nmpc64            cartridge1       (cart1)    .mx1  .bin  .rom  \nmpc64            cartridge2       (cart2)    .mx1  .bin  .rom  \nmpc64            printout         (prin)     .prn  \nmpc64            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmpc800           romimage1        (rom1)     .rom  .bin  \nmpc800           cassette         (cass)     .wav  .flac .csw  .uef  \nmpc800           printout         (prin)     .prn  \nmpc800           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nmpc800           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nmpc900           romimage1        (rom1)     .rom  .bin  \nmpc900           cassette         (cass)     .wav  .flac .csw  .uef  \nmpc900           printout         (prin)     .prn  \nmpc900           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nmpc900           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nmpc900gx         romimage1        (rom1)     .rom  .bin  \nmpc900gx         cassette         (cass)     .wav  .flac .csw  .uef  \nmpc900gx         printout         (prin)     .prn  \nmpc900gx         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nmpc900gx         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nmpf1             cassette         (cass)     .wav  .flac \nmpf1             romimage         (rom)      .bin  .rom  \nmpf1_88          cassette         (cass)     .wav  .flac \nmpf1_88          printout         (prin)     .prn  \nmpf1_88          romimage1        (rom1)     .bin  .rom  \nmpf1_88          romimage2        (rom2)     .bin  .rom  \nmpf1b            cassette         (cass)     .wav  .flac \nmpf1b            romimage         (rom)      .bin  .rom  \nmpf1p            cassette         (cass)     .wav  .flac \nmpf1p            romimage         (rom)      .bin  .rom  \nmpf2             cassette         (cass)     .wav  .flac \nmprof3           floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nmprof3           floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nmprof3           cassette         (cass)     .wav  .flac \nmpt02            cartridge        (cart)     .st2  .bin  .rom  \nmpt02h           cartridge        (cart)     .st2  .bin  .rom  \nmpt05            quickload        (quik)     .pgm  .tvc  \nmpt05            cartridge        (cart)     .bin  .rom  \nmpu1000          quickload        (quik)     .pgm  .tvc  \nmpu1000          cartridge        (cart)     .bin  .rom  \nmpu2000          quickload        (quik)     .pgm  .tvc  \nmpu2000          cartridge        (cart)     .bin  .rom  \nmpu9088vf        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmpu9088vf        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmpu9088vf        printout         (prin)     .prn  \nmpx16            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmpx16            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmpx16            printout         (prin)     .prn  \nmpz80            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmratlus          cartridge        (cart)     .bin  \nmrdrilr2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmrdrilr2j        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmrdrilr2u        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmrdrilrg         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmrtlbeat         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmrtlbeat         memcard1         (memc1)    .mc   \nmrtlbeat         memcard2         (memc2)    .mc   \nmrtlbeata        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmrtlbeata        memcard1         (memc1)    .mc   \nmrtlbeata        memcard2         (memc2)    .mc   \nms0515           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nms0515           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nms1600           cassette         (cass)     .wav  .flac .cas  \nms1600           printout         (prin)     .prn  \nms1600           cartridge        (cart)     .ccc  .rom  \nms1600           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \nms1600           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \nms1600           harddisk1        (hard1)    .vhd  \nms1600           harddisk2        (hard2)    .vhd  \nms4125           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nms4125           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nms4125           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nms4125           printout         (prin)     .prn  \nms4132           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nms4132           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nms4132           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nms4132           printout         (prin)     .prn  \nms4134           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nms4134           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nms4134           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nms4134           printout         (prin)     .prn  \nms4138           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nms4138           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nms4138           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nms4138           printout         (prin)     .prn  \nms4144           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nms4144           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nms4144           printout         (prin)     .prn  \nms4145           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nms4145           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nms4145           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nms4145           printout         (prin)     .prn  \nms68k            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nms68k            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nms68k            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nms68k            printout         (prin)     .prn  \nmsm3             cassette         (cass)     .wav  .flac .cas  \nmsm3             printout         (prin)     .prn  \nmsm3             harddisk1        (hard1)    .vhd  \nmsm3             harddisk2        (hard2)    .vhd  \nmsm3             cartridge        (cart)     .ccc  .rom  \nmsm3             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \nmsm3             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \nmt65             cassette         (cass)     .wav  .flac \nmt65             romimage1        (rom1)     .bin  .rom  \nmt65             romimage2        (rom2)     .bin  .rom  \nmt65             romimage3        (rom3)     .bin  .rom  \nmt65             romimage4        (rom4)     .bin  .rom  \nmt65             romimage5        (rom5)     .bin  .rom  \nmt65             snapshot         (dump)     .dmp  .m65  \nmt65             quickload        (quik)     .hex  \nmt6809           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  \nmt6809           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ssd  .bbc  .img  \nmt80z            cassette         (cass)     .wav  .flac \nmt80z            romimage         (rom)      .bin  .rom  \nmtc9016          cartridge        (cart)     .st2  .bin  .rom  \nmtchxl5k         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmtchxl5ko        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmtchxl5ko2       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmtchxl6k         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmtchxl6ko        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmtchxl6ko4       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmtchxlgld        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmtchxlgldo       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmtchxlti         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmtouchxl         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmtu130           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmtu130           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmtu130           romimage1        (rom1)     .rom  .bin  \nmtu130           romimage2        (rom2)     .rom  .bin  \nmtu130           romimage3        (rom3)     .rom  .bin  \nmtu130           romimage4        (rom4)     .rom  .bin  \nmtx500           printout         (prin)     .prn  \nmtx500           snapshot         (dump)     .mtx  \nmtx500           quickload        (quik)     .run  \nmtx500           cassette         (cass)     .wav  .flac \nmtx500           romimage         (rom)      .bin  .rom  \nmtx500           cartridge1       (cart1)    .bin  .rom  \nmtx500           cartridge2       (cart2)    .bin  .rom  \nmtx512           printout         (prin)     .prn  \nmtx512           snapshot         (dump)     .mtx  \nmtx512           quickload        (quik)     .run  \nmtx512           cassette         (cass)     .wav  .flac \nmtx512           romimage         (rom)      .bin  .rom  \nmtx512           cartridge1       (cart1)    .bin  .rom  \nmtx512           cartridge2       (cart2)    .bin  .rom  \nmulti16          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmulti8           cassette         (cass)     .wav  .flac \nmultmega         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmusclhit         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmwskins          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nmwskins          cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmwskins          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nmwskins          cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmwskinsa         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nmwskinsa         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmwskinsa         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nmwskinsa         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmwskinso         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nmwskinso         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmwskinso         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nmwskinso         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmwskinst         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nmwskinst         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmwskinst         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nmwskinst         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nmx10             cartridge        (cart)     .mx1  .bin  .rom  \nmx101            cartridge        (cart)     .mx1  .bin  .rom  \nmx15             cartridge        (cart)     .mx1  .bin  .rom  \nmx15             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmx1600           cassette         (cass)     .wav  .flac .cas  \nmx1600           printout         (prin)     .prn  \nmx1600           cartridge        (cart)     .ccc  .rom  \nmx1600           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \nmx1600           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \nmx1600           harddisk1        (hard1)    .vhd  \nmx1600           harddisk2        (hard2)    .vhd  \nmx64             cartridge1       (cart1)    .mx1  .bin  .rom  \nmx64             cartridge2       (cart2)    .mx1  .bin  .rom  \nmx64             printout         (prin)     .prn  \nmx64             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nmx83c305         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmx83c305         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nmx83c305         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nmx83c305         printout         (prin)     .prn  \nmyb3k            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nmyb3k            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nmyb3k            floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nmyb3k            floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nmyb3k            printout         (prin)     .prn  \nmycom            cassette         (cass)     .wav  .flac \nmycom            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmycom            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmyvision         cartridge        (cart)     .bin  \nmz1              cartridge        (cart)     .bin  \nmz1              midiin           (min)      .mid  .syx  \nmz1              midiout1         (mout1)    .mid  \nmz1              midiout2         (mout2)    .mid  \nmz1500           cassette         (cass)     .wav  .flac .m12  .mzf  .mzt  \nmz1500           printout         (prin)     .prn  \nmz2000           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nmz2000           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nmz2000           cassette         (cass)     .wav  .flac .m12  .mzf  .mzt  \nmz2000           snapshot         (dump)     .bin  .dat  \nmz2200           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nmz2200           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nmz2200           cassette         (cass)     .wav  .flac .m12  .mzf  .mzt  \nmz2200           snapshot         (dump)     .bin  .dat  \nmz2500           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmz2500           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmz2520           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmz2520           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmz3500           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmz3500           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmz3500           floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmz3500           floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmz5500           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmz5500           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmz6500           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmz6500           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmz6550           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmz6550           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nmz700            cassette         (cass)     .wav  .flac .m12  .mzf  .mzt  \nmz700j           cassette         (cass)     .wav  .flac .m12  .mzf  .mzt  \nmz800            cassette         (cass)     .wav  .flac .m12  .mzf  .mzt  \nmz800            printout         (prin)     .prn  \nmz80a            cassette         (cass)     .wav  .flac .m12  .mzf  .mzt  \nmz80b            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nmz80b            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nmz80b            cassette         (cass)     .wav  .flac .m12  .mzf  .mzt  \nmz80b            snapshot         (dump)     .bin  .dat  \nmz80k            cassette         (cass)     .wav  .flac .m12  .mzf  .mzt  \nmz80kj           cassette         (cass)     .wav  .flac .m12  .mzf  .mzt  \nn64              cartridge        (cart)     .v64  .z64  .rom  .n64  .bin  \nn64_lodgenet     cartridge        (cart)     .v64  .z64  .rom  .n64  .bin  \nn64dd            cartridge        (cart)     .v64  .z64  .rom  .n64  .bin  \nn64dd            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nn64pal           cartridge        (cart)     .v64  .z64  .rom  .n64  .bin  \nn8810m15         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nn8810m15         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nn8810m15         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nn8810m16c        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nn8810m16c        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nn8810m16c        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nn8810m16v        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nn8810m16v        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nn8810m16v        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nn8810m20         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nn8810m20         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nn8810m20         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nn8810m20         printout         (prin)     .prn  \nn8810m30         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nn8810m30         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nn8810m30         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nn8810m55         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nn8810m55         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nn8810m55         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnagano98         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnaganoj          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnano             quickload        (quik)     .bin  \nnano             cassette         (cass)     .wav  .flac \nnanos            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nnascom1          cassette         (cass)     .wav  .flac \nnascom1          snapshot1        (dump1)    .nas  \nnascom1          snapshot2        (dump2)    .chr  \nnascom2          cassette         (cass)     .wav  .flac \nnascom2          snapshot1        (dump1)    .nas  \nnascom2          snapshot2        (dump2)    .chr  \nnascom2          romimage1        (rom1)     .bin  .rom  \nnascom2          romimage2        (rom2)     .bin  .rom  \nnascom2c         cassette         (cass)     .wav  .flac \nnascom2c         snapshot1        (dump1)    .nas  \nnascom2c         snapshot2        (dump2)    .chr  \nnascom2c         romimage1        (rom1)     .bin  .rom  \nnascom2c         romimage2        (rom2)     .bin  .rom  \nnascom2c         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nnascom2c         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nnat48pv          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nnat48pv          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nnat48pv          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnat48pv          printout         (prin)     .prn  \nnbagold          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nnbagold          cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnbagold          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nnbagold          cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnbanfl           harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nnbanfl           cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnbanfl           harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nnbanfl           cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnbashowt         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nnbashowt         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnbashowt         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nnbashowt         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnc200            printout         (prin)     .prn  \nnc200            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nncr3302          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nncr3302          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nncr3302          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nncr3433          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nncr3433          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nncr3433          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nncr3433          printout         (prin)     .prn  \nncrpc4i          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nncrpc4i          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nncrpc4i          printout         (prin)     .prn  \nncrpc6           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nncrpc6           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nncrpc6           printout         (prin)     .prn  \nncrpc8           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nncrpc8           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nncrpc8           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nndcfboxa         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nneat             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nneat             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nneat             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnecapciv         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nnecapciv         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nnecapciv         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nneiva            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nneiva            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nneiva            floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nneiva            floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nneiva            cassette         (cass)     .wav  .flac \nneocd            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nneocdz           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nneocdzj          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nneogeo           memcard          (memc)     .neo  \nneogeo           cartridge1       (cart1)    .bin  \nneogeo           cartridge2       (cart2)    .bin  \nneogeo           cartridge3       (cart3)    .bin  \nneogeo           cartridge4       (cart4)    .bin  \nneogeo           cartridge5       (cart5)    .bin  \nneogeo           cartridge6       (cart6)    .bin  \nnes              cartridge        (cart)     .nes  .unf  .unif \nnespal           cartridge        (cart)     .nes  .unf  .unif \nnewbrain         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nnewbrain         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nnewbrain         cassette1        (cass1)    .wav  .flac \nnewbrain         cassette2        (cass2)    .wav  .flac \nnewbraina        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nnewbraina        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nnewbraina        cassette1        (cass1)    .wav  .flac \nnewbraina        cassette2        (cass2)    .wav  .flac \nnewbrainmd       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nnewbrainmd       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nnewbrainmd       cassette1        (cass1)    .wav  .flac \nnewbrainmd       cassette2        (cass2)    .wav  .flac \nnext             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnext             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnextc            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnextc            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnextct           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnextct           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnextct           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnextctc          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnextctc          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnextctc          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnexts            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnexts            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnexts            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnexts2           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnexts2           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnexts2           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnextsc           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnextsc           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnextsc           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnextst           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnextst           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnextst           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnextstc          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnextstc          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnextstc          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnf500a           cassette         (cass)     .wav  .flac \nnflclsfb         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnforcepc         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnforcepc         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnforcepc         printout         (prin)     .prn  \nnforcepc         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnforcepc         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nng_mv1           memcard          (memc)     .neo  \nng_mv1           cartridge        (cart)     .bin  \nng_mv1f          cartridge        (cart)     .bin  \nng_mv1fz         cartridge        (cart)     .bin  \nng_mv2f          memcard          (memc)     .neo  \nng_mv2f          cartridge1       (cart1)    .bin  \nng_mv2f          cartridge2       (cart2)    .bin  \nng_mv4f          memcard          (memc)     .neo  \nng_mv4f          cartridge1       (cart1)    .bin  \nng_mv4f          cartridge2       (cart2)    .bin  \nng_mv4f          cartridge3       (cart3)    .bin  \nng_mv4f          cartridge4       (cart4)    .bin  \nngdup23a         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nngdup23c         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nngdup23e         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nngen             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nngen             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nngen386          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nngen386          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nngenb38          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nngenb38          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nngp              cartridge        (cart)     .bin  .ngp  .npc  .ngc  \nngpc             cartridge        (cart)     .bin  .ngp  .npc  .ngc  \nnicetsuk         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnichidvd         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnichisel         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnightrai         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnimbus           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nnimbus           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nnimbus           harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nnimbus           harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nnimbus           harddisk3        (hard3)    .chd  .hd   .hdv  .2mg  .hdi  \nnimbus           harddisk4        (hard4)    .chd  .hd   .hdv  .2mg  .hdi  \nnimbus           printout         (prin)     .prn  \nnixpc01          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nnixpc01          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nnixpc01          printout         (prin)     .prn  \nnms801           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nnms8220          cartridge1       (cart1)    .mx1  .bin  .rom  \nnms8220          cartridge2       (cart2)    .mx1  .bin  .rom  \nnms8220          printout         (prin)     .prn  \nnms8220          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nnms8245          cartridge1       (cart1)    .mx1  .bin  .rom  \nnms8245          cartridge2       (cart2)    .mx1  .bin  .rom  \nnms8245          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nnms8245          printout         (prin)     .prn  \nnms8245          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nnms8245f         cartridge1       (cart1)    .mx1  .bin  .rom  \nnms8245f         cartridge2       (cart2)    .mx1  .bin  .rom  \nnms8245f         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nnms8245f         printout         (prin)     .prn  \nnms8245f         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nnms8250          cartridge1       (cart1)    .mx1  .bin  .rom  \nnms8250          cartridge2       (cart2)    .mx1  .bin  .rom  \nnms8250          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nnms8250          printout         (prin)     .prn  \nnms8250          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nnms8250_16       cartridge1       (cart1)    .mx1  .bin  .rom  \nnms8250_16       cartridge2       (cart2)    .mx1  .bin  .rom  \nnms8250_16       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nnms8250_16       printout         (prin)     .prn  \nnms8250_16       cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nnms8250_19       cartridge1       (cart1)    .mx1  .bin  .rom  \nnms8250_19       cartridge2       (cart2)    .mx1  .bin  .rom  \nnms8250_19       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nnms8250_19       printout         (prin)     .prn  \nnms8250_19       cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nnms8255          cartridge1       (cart1)    .mx1  .bin  .rom  \nnms8255          cartridge2       (cart2)    .mx1  .bin  .rom  \nnms8255          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nnms8255          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nnms8255          printout         (prin)     .prn  \nnms8255          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nnms8255f         cartridge1       (cart1)    .mx1  .bin  .rom  \nnms8255f         cartridge2       (cart2)    .mx1  .bin  .rom  \nnms8255f         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nnms8255f         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nnms8255f         printout         (prin)     .prn  \nnms8255f         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nnms8260          cartridge        (cart)     .mx1  .bin  .rom  \nnms8260          printout         (prin)     .prn  \nnms8260          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nnms8280          cartridge1       (cart1)    .mx1  .bin  .rom  \nnms8280          cartridge2       (cart2)    .mx1  .bin  .rom  \nnms8280          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nnms8280          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nnms8280          printout         (prin)     .prn  \nnms8280          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nnms8280f         cartridge1       (cart1)    .mx1  .bin  .rom  \nnms8280f         cartridge2       (cart2)    .mx1  .bin  .rom  \nnms8280f         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nnms8280f         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nnms8280f         printout         (prin)     .prn  \nnms8280f         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nnms8280g         cartridge1       (cart1)    .mx1  .bin  .rom  \nnms8280g         cartridge2       (cart2)    .mx1  .bin  .rom  \nnms8280g         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nnms8280g         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nnms8280g         printout         (prin)     .prn  \nnms8280g         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nnms9100          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nnms9100          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nnms9100          printout         (prin)     .prn  \nnotetakr         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nnpc8300          printout         (prin)     .prn  \nnpc8300          cassette         (cass)     .wav  .flac \nnpc8300          cartridge1       (cart1)    .bin  .rom  \nnpc8300          cartridge2       (cart2)    .bin  .rom  \nnshrz            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nnshrz            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nnshrz2mhz        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nnshrz2mhz        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nnuretemi         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnws1250          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnws1250          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnws1580          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnws1580          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnws3260          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnws3260          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnws3410          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnws3410          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnws3720          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnws3720          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnws3860          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnws3860          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnws3860          tape             (tap)      .tap  \nnws5000x         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnws5000x         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nnws5000x         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nnws831           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nnws831           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \no286foxii        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \no286foxii        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \no286foxii        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \noc2000           quickload        (quik)     .pgm  .tvc  \noc2000           cartridge        (cart)     .bin  .rom  \nocfoxm           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nocfoxm           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nocfoxm           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nochawk           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nochawk           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nochawk           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nochawk           printout         (prin)     .prn  \nochipcom         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nochipcom         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nochipcom         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nochipcom         printout         (prin)     .prn  \nochipdca2        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nochipdca2        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nochipdca2        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nochipdca2        printout         (prin)     .prn  \nochipvlp         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nochipvlp         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nochipvlp         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nochipvlp         printout         (prin)     .prn  \nocjagii          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nocjagii          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nocjagii          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nocjagii          printout         (prin)     .prn  \nocjagv           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nocjagv           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nocjagv           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nocjagv           printout         (prin)     .prn  \nocpanii          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nocpanii          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nocpanii          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \noctekg2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \noctekg2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \noctekg2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \noctopus          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \noctopus          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \noctopus          printout         (prin)     .prn  \nocxt286          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nocxt286          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nocxt286          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nodeontw          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nodeontw2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nodyssey          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nodyssey          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nodyssey          printout         (prin)     .prn  \nodyssey2         cartridge        (cart)     .bin  .rom  \nodyssey3         cartridge        (cart)     .bin  .rom  \noffrthnd         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \noffrthnd         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \noffrthnd         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \noffrthnd         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \noffrthnd         printout         (prin)     .prn  \noligam           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \noligam           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nolim203          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nolim203          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nolim203          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nolivm15          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nolivm15          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nolivm15          printout         (prin)     .prn  \nolivpc1          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nollie            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nolybossb         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nolybossb         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nolybossc         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nolybossc         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nolybossd         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nolypeopl         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nolypeopl         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nolyport40        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nolyport40        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nolyport40        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nolystar20f       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nolystar20f       harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nolystar20f       harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nolytext          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nolytext          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nolytext30        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nolytext30        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nolytext30        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nomni2            quickload        (quik)     .com  .cpm  \nomni2            printout         (prin)     .prn  \nomni2            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nomni2            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nomni4            quickload        (quik)     .com  .cpm  \nomni4            printout         (prin)     .prn  \nomni4            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nomni4            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nomv1000          cartridge        (cart)     .bin  .sg   \nomv2000          cartridge        (cart)     .bin  .sg   \nondrat           cassette         (cass)     .wav  .flac \nondrav           cassette         (cass)     .wav  .flac \nonyx             cartridge        (cart)     .rom  .col  .bin  \nop386wb          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nop386wb          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nop386wb          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nop386wb          printout         (prin)     .prn  \nop82c283         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nop82c283         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nop82c283         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nop82c291         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nop82c291         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nop82c291         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nop82c381         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nop82c381         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nop82c381         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nop82c381         printout         (prin)     .prn  \nop82c391         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nop82c391         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nop82c391         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nop82c391         printout         (prin)     .prn  \nop82c392         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nop82c392         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nop82c392         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nop82c392         printout         (prin)     .prn  \nopti495slc       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nopti495slc       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nopti495slc       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nopti495slc       printout         (prin)     .prn  \nopti495xlc       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nopti495xlc       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nopti495xlc       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nopti495xlc       printout         (prin)     .prn  \norao             cassette         (cass)     .wav  .flac .tap  \norao103          cassette         (cass)     .wav  .flac .tap  \norbatak          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \norbituvi         cartridge        (cart)     .bin  \nordisava         cartridge        (cart)     .bin  \noric1            printout         (prin)     .prn  \noric1            cassette         (cass)     .wav  .flac .tap  \norica            printout         (prin)     .prn  \norica            cassette         (cass)     .wav  .flac .tap  \norinasp          cartridge        (cart)     .bin  \norion128         cassette         (cass)     .wav  .flac .rko  \norion128         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norion128         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norion128         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norion128         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norion128         cartridge        (cart)     .bin  \norionide         cassette         (cass)     .wav  .flac .rko  \norionide         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionide         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionide         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionide         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionide         cartridge        (cart)     .bin  \norionidm         cassette         (cass)     .wav  .flac .rko  \norionidm         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionidm         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionidm         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionidm         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionidm         cartridge        (cart)     .bin  \norionms          cassette         (cass)     .wav  .flac .rko  \norionms          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionms          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionms          floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionms          floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionms          cartridge        (cart)     .bin  \norionpro         cassette         (cass)     .wav  .flac .rko  \norionpro         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionpro         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionpro         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionpro         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionpro         cartridge        (cart)     .bin  \norionz80         cassette         (cass)     .wav  .flac .rko  \norionz80         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionz80         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionz80         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionz80         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionz80         cartridge        (cart)     .bin  \norionzms         cassette         (cass)     .wav  .flac .rko  \norionzms         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionzms         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionzms         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionzms         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \norionzms         cartridge        (cart)     .bin  \norizon           snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \norizon           quickload        (quik)     .raw  .scr  \norizon           cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \normatu           cartridge        (cart)     .bin  \nosbexec          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nosbexec          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nosborne1         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nosborne1         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nosborne1nv       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nosborne1nv       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nosborne1sp       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nosborne1sp       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nosc1000b         quickload        (quik)     .bin  \nosc1000b         cassette         (cass)     .wav  .flac \notenamhf         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \notenamih         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \notenki           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \noutr2            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \noutr2st          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \noutr2stj         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \noutr2stjo        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \noutr2sto         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \noz750            quickload        (quik)     .wzd  \np2000m           cassette         (cass)     .wav  .flac .cas  \np2000t           cassette         (cass)     .wav  .flac .cas  \np386dx40         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \np386dx40         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \np386dx40         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \np386dx40         printout         (prin)     .prn  \np386sx25pw       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \np386sx25pw       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \np386sx25pw       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \np500             floppydisk1      (flop1)    .mfi  .dfi  .d80  \np500             floppydisk2      (flop2)    .mfi  .dfi  .d80  \np500             cartridge        (cart)     .20   .40   .60   \np500             quickload        (quik)     .p00  .prg  \np500p            floppydisk1      (flop1)    .mfi  .dfi  .d80  \np500p            floppydisk2      (flop2)    .mfi  .dfi  .d80  \np500p            cartridge        (cart)     .20   .40   .60   \np500p            quickload        (quik)     .p00  .prg  \np5txla           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \np5txla           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \np8000            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \np8000            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \np911             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \np9112            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \np911ac           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \np911ed           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \np911j            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \np911k            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \np911kc           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \np911ud           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npacmball         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npanikuru         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npartner          cassette         (cass)     .wav  .flac .rkp  \npartner          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \npartner          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \npartner1fg       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \npartnerw         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \npartnerw         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npartnerwfg       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \npartnerwfg       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npasogo           cartridge        (cart)     .bin  \npasopia          cassette         (cass)     .wav  .flac \npasopia7         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npasopia7         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npasopia7         cassette         (cass)     .wav  .flac \npasopia7lcd      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npasopia7lcd      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npasopia7lcd      cassette         (cass)     .wav  .flac \npatinho          cartridge        (cart)     .bin  \npb2000c          cartridge1       (cart1)    .bin  \npb2000c          cartridge2       (cart2)    .bin  \npbo              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npbo              harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc               floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc               floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc               harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \npc               harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \npc100            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npc100            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npc1000           cartridge        (cart)     .bin  \npc10iii          printout1        (prin1)    .prn  \npc10iii          printout2        (prin2)    .prn  \npc10iii          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc10iii          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc1512           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npc1512           printout         (prin)     .prn  \npc1512dd         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npc1512dd         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npc1512dd         printout         (prin)     .prn  \npc1512hd10       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npc1512hd10       printout         (prin)     .prn  \npc1512hd10       harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \npc1512hd10       harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \npc1512hd20       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npc1512hd20       printout         (prin)     .prn  \npc1512hd20       harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \npc1512hd20       harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \npc1640           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npc1640           printout         (prin)     .prn  \npc1640dd         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npc1640dd         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npc1640dd         printout         (prin)     .prn  \npc1640hd20       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npc1640hd20       printout         (prin)     .prn  \npc1640hd20       harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \npc1640hd20       harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \npc1640hd30       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npc1640hd30       printout         (prin)     .prn  \npc1640hd30       harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \npc1640hd30       harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \npc20             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc20             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc20             printout1        (prin1)    .prn  \npc20             printout2        (prin2)    .prn  \npc20             printout3        (prin3)    .prn  \npc200            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc200            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc200            printout1        (prin1)    .prn  \npc200            printout2        (prin2)    .prn  \npc200            printout3        (prin3)    .prn  \npc2000           cartridge        (cart)     .bin  \npc2000s          cartridge        (cart)     .bin  \npc2086           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc2086           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc2086           printout1        (prin1)    .prn  \npc2086           printout2        (prin2)    .prn  \npc2086           printout3        (prin3)    .prn  \npc2386           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc2386           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc2386           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc2386           printout         (prin)     .prn  \npc286u           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc286u           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc286vs          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc286vs          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc3086           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc3086           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc3086           printout1        (prin1)    .prn  \npc3086           printout2        (prin2)    .prn  \npc3086           printout3        (prin3)    .prn  \npc30iii          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc30iii          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc30iii          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc386m           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc386m           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc386m           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc386m           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc40iii          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc40iii          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc40iii          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc45iii          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc45iii          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc45iii          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc486mu          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc486mu          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc486mu          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc486mu          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc486se          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc486se          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc486se          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc486se          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc5086           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc5086           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc5086           printout1        (prin1)    .prn  \npc5086           printout2        (prin2)    .prn  \npc5086           printout3        (prin3)    .prn  \npc50ii           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc50ii           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc50ii           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc532            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc6001           cartridge1       (cart1)    .bin  \npc6001           cartridge2       (cart2)    .cas  .p6   \npc6001a          cartridge1       (cart1)    .bin  \npc6001a          cartridge2       (cart2)    .cas  .p6   \npc6001mk2        cartridge1       (cart1)    .bin  \npc6001mk2        cartridge2       (cart2)    .cas  .p6   \npc6001mk2sr      cartridge1       (cart1)    .bin  \npc6001mk2sr      cartridge2       (cart2)    .cas  .p6   \npc6001mk2sr      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npc6001mk2sr      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc6001mk2sr      floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc60iii          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc60iii          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc60iii          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc60iii          printout         (prin)     .prn  \npc6601           cartridge1       (cart1)    .bin  \npc6601           cartridge2       (cart2)    .cas  .p6   \npc6601           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npc6601           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc6601           floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc6601sr         cartridge1       (cart1)    .bin  \npc6601sr         cartridge2       (cart2)    .cas  .p6   \npc6601sr         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npc6601sr         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc6601sr         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc7000           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc7000           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc7000           printout         (prin)     .prn  \npc70iii          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc70iii          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc70iii          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc70iii          printout         (prin)     .prn  \npc8001           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8001           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8001           printout         (prin)     .prn  \npc8001           cassette         (cass)     .wav  .flac \npc8001           snapshot         (dump)     .bin  .n80  \npc8001mk2        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8001mk2        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8001mk2        printout         (prin)     .prn  \npc8001mk2        cassette         (cass)     .wav  .flac \npc8001mk2        snapshot         (dump)     .bin  .n80  \npc8001mk2sr      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8001mk2sr      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8001mk2sr      printout         (prin)     .prn  \npc8001mk2sr      cassette         (cass)     .wav  .flac \npc8001mk2sr      snapshot         (dump)     .bin  .n80  \npc8201           printout         (prin)     .prn  \npc8201           cassette         (cass)     .wav  .flac \npc8201           cartridge1       (cart1)    .bin  .rom  \npc8201           cartridge2       (cart2)    .bin  .rom  \npc8201a          printout         (prin)     .prn  \npc8201a          cassette         (cass)     .wav  .flac \npc8201a          cartridge1       (cart1)    .bin  .rom  \npc8201a          cartridge2       (cart2)    .bin  .rom  \npc8300           cassette         (cass)     .wav  .flac .p    .81   .tzx  \npc8401bd         cartridge1       (cart1)    .bin  .rom  \npc8401bd         cartridge2       (cart2)    .bin  .rom  \npc8500           cartridge1       (cart1)    .bin  .rom  \npc8500           cartridge2       (cart2)    .bin  .rom  \npc8801           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801           printout         (prin)     .prn  \npc8801           cassette         (cass)     .wav  .flac \npc8801fa         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801fa         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801fa         printout         (prin)     .prn  \npc8801fa         cassette         (cass)     .wav  .flac \npc8801ma         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801ma         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801ma         printout         (prin)     .prn  \npc8801ma         cassette         (cass)     .wav  .flac \npc8801ma2        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801ma2        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801ma2        printout         (prin)     .prn  \npc8801ma2        cassette         (cass)     .wav  .flac \npc8801mc         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801mc         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801mc         printout         (prin)     .prn  \npc8801mc         cassette         (cass)     .wav  .flac \npc8801mc         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc8801mh         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801mh         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801mh         printout         (prin)     .prn  \npc8801mh         cassette         (cass)     .wav  .flac \npc8801mk2        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801mk2        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801mk2        printout         (prin)     .prn  \npc8801mk2        cassette         (cass)     .wav  .flac \npc8801mk2fr      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801mk2fr      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801mk2fr      printout         (prin)     .prn  \npc8801mk2fr      cassette         (cass)     .wav  .flac \npc8801mk2mr      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801mk2mr      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801mk2mr      printout         (prin)     .prn  \npc8801mk2mr      cassette         (cass)     .wav  .flac \npc8801mk2sr      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801mk2sr      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc8801mk2sr      printout         (prin)     .prn  \npc8801mk2sr      cassette         (cass)     .wav  .flac \npc88va           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc88va           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc88va2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc88va2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc9486           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc9486           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npc9486           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9486           printout         (prin)     .prn  \npc9801           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801           floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc9801           floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc9801bx2        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801bx2        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801bx2        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9801bx2        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9801dx         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801dx         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801f          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801f          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801f          floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801f          floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801f          floppydisk5      (flop5)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc9801f          floppydisk6      (flop6)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc9801fs         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801fs         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801fs         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9801fs         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9801m2         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801m2         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801m2         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc9801m2         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .fdi  \npc9801rs         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801rs         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801rs         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9801rs         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9801rx         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801rx         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801rx         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9801rx         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9801us         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801us         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801us         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9801us         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9801uv2        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801uv2        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801ux         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801ux         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801vm         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801vm         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801vx         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9801vx         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9821           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9821ap2        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821ap2        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821ap2        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9821ap2        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9821as         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821as         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821as         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9821as         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9821ce         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821ce         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821ce         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9821ce         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9821cx3        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821cx3        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821cx3        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9821cx3        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9821nr15       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821nr15       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821nr15       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9821nr15       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9821nr166      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821nr166      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821nr166      harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9821nr166      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9821nw150      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821nw150      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821nw150      harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9821nw150      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9821ra20       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821ra20       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821ra20       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9821ra20       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9821ra266      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821ra266      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821ra266      harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9821ra266      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9821ra333      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821ra333      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821ra333      harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9821ra333      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9821xa16       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821xa16       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821xa16       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9821xa16       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc9821xv13       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821xv13       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc9821xv13       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc9821xv13       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npc98ha           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc98ha           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc98lt           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc98lt           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc_h98s          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc_h98s          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .hdm  .fdi  .fdd  .dcp  .dcu  .dip  .nfd  \npc_h98s          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npc_h98s          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcb303           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcb303           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcb303           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npccm205          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm205          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm205          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npccm209          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm209          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm209          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npccm216          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm216          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm216          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npccm317          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm317          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm317          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npccm317          printout         (prin)     .prn  \npccm321          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm321          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm321          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npccm321          printout         (prin)     .prn  \npccm326          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm326          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm326          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npccm326          printout         (prin)     .prn  \npccm396f         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm396f         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm396f         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npccm912          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm912          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm912          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npccm912          printout         (prin)     .prn  \npccm915i         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm915i         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm915i         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npccm915i         printout         (prin)     .prn  \npccm919          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm919          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npccm919          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npccm919          printout         (prin)     .prn  \npcd              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npcd              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npcd              harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \npcd              harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \npcd2             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd2             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd2             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npcd204           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd204           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd204           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npcd2m            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd2m            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd2m            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npcd3nsl          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd3nsl          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd3nsl          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npcd3nsx          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd3nsx          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd3nsx          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npcd4nd           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd4nd           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd4nd           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npcd4nd           printout         (prin)     .prn  \npcd4nl           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd4nl           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd4nl           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npcd4nl           printout         (prin)     .prn  \npcd4x            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd4x            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcd4x            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npcd4x            printout         (prin)     .prn  \npce              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npce              cartridge        (cart)     .pce  .bin  \npcega            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcega            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcega            harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \npcega            harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \npcfx             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcfxga           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcherc           printout         (prin)     .prn  \npcherc           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcherc           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcherc           harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \npcherc           harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \npci48af          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npci48af          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npci48af          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npci48af          printout         (prin)     .prn  \npciagp           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npciagp           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npciagp           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npciagp           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npciagp           printout         (prin)     .prn  \npcipc            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npcipc            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcipc            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npcipc            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npcipc            printout         (prin)     .prn  \npcipcs7          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npcipcs7          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcipcs7          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npcipcs7          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npcipcs7          printout         (prin)     .prn  \npck486dx         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npck486dx         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npck486dx         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npck486dx         printout         (prin)     .prn  \npcm              cassette         (cass)     .wav  .flac \npcmda            printout         (prin)     .prn  \npcmda            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcmda            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcmda            harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \npcmda            harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \npcnfrk           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcnfrk10m        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcnfrk2m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcnfrk2mk        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcnfrk3m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcnfrk3mk        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcnfrk4m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcnfrk4mk        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcnfrk5m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcnfrk5mk        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcnfrk6m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcnfrk7m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcnfrk8m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcnfrk9m         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcnfrka          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcnfrkk          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npcscolor         cartridge        (cart)     .bin  \npcunlim          cartridge        (cart)     .bin  \npcv20            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcv20            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcv20            harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \npcv20            harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \npcvga            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcvga            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npcvga            harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \npcvga            harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \npcw10            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npcw16            printout         (prin)     .prn  \npcw16            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npcw16            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npcw8256          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npcw8512          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npcw8512          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npcw9256          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npcw9512          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npcw9512p         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npcx              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npcx              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npcx              harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \npcx              harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \npda600           cartridge        (cart)     .bin  \npda600           printout         (prin)     .prn  \npdp11qb          floppydisk1      (flop1)    .img  .fdi  .td0  .imd  .cqm  .dsk  .d77  .d88  .1dd  \npdp11qb          floppydisk2      (flop2)    .img  .fdi  .td0  .imd  .cqm  .dsk  .d77  .d88  .1dd  \npdp11qb          punchtape        (ptap)     .bin  .bim  .lda  \npdp11ub          floppydisk1      (flop1)    .img  .fdi  .td0  .imd  .cqm  .dsk  .d77  .d88  .1dd  \npdp11ub          floppydisk2      (flop2)    .img  .fdi  .td0  .imd  .cqm  .dsk  .d77  .d88  .1dd  \npdp11ub          punchtape        (ptap)     .bin  .bim  .lda  \npdp11ub2         floppydisk1      (flop1)    .img  .fdi  .td0  .imd  .cqm  .dsk  .d77  .d88  .1dd  \npdp11ub2         floppydisk2      (flop2)    .img  .fdi  .td0  .imd  .cqm  .dsk  .d77  .d88  .1dd  \npdp11ub2         punchtape        (ptap)     .bin  .bim  .lda  \npeas286          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npeas286          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npeas286          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npecom32          cassette         (cass)     .wav  .flac \npecom64          cassette         (cass)     .wav  .flac \npegasus          romimage1        (rom1)     .bin  \npegasus          romimage2        (rom2)     .bin  \npegasus          romimage3        (rom3)     .bin  \npegasus          romimage4        (rom4)     .bin  \npegasus          romimage5        (rom5)     .bin  \npegasus          cassette         (cass)     .wav  .flac \npegasusm         romimage1        (rom1)     .bin  \npegasusm         romimage2        (rom2)     .bin  \npegasusm         romimage3        (rom3)     .bin  \npegasusm         romimage4        (rom4)     .bin  \npegasusm         romimage5        (rom5)     .bin  \npegasusm         cassette         (cass)     .wav  .flac \npem2530          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npem2530          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npem2530          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npem2530          printout         (prin)     .prn  \npencil2          cassette         (cass)     .wav  .flac \npencil2          cartridge        (cart)     .bin  \npencil2          printout         (prin)     .prn  \npent1024         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \npent1024         quickload        (quik)     .raw  .scr  \npent1024         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \npent1024         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \npent1024         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \npent1024         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \npent1024         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \npentagon         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \npentagon         quickload        (quik)     .raw  .scr  \npentagon         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \npentagon         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \npentagon         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \npentagon         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \npentagon         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \npentevo          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \npentevo          quickload        (quik)     .raw  .scr  \npentevo          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \npentevo          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \npentevo          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \npentevo          floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \npentevo          floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \npentevo          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nperfect1         cartridge        (cart)     .mx1  .bin  .rom  \nperfect1         printout         (prin)     .prn  \nperfect1         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \npet2001          floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet2001          floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet2001          cassette         (cass)     .wav  .flac .tap  \npet2001          quickload        (quik)     .p00  .prg  \npet20018         floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet20018         floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet20018         cassette         (cass)     .wav  .flac .tap  \npet20018         quickload        (quik)     .p00  .prg  \npet2001b         floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet2001b         floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet2001b         cassette         (cass)     .wav  .flac .tap  \npet2001b         quickload        (quik)     .p00  .prg  \npet2001b         cartridge1       (cart1)    .bin  .rom  \npet2001b         cartridge2       (cart2)    .bin  .rom  \npet2001b         cartridge3       (cart3)    .bin  .rom  \npet2001b16       floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet2001b16       floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet2001b16       cassette         (cass)     .wav  .flac .tap  \npet2001b16       quickload        (quik)     .p00  .prg  \npet2001b16       cartridge1       (cart1)    .bin  .rom  \npet2001b16       cartridge2       (cart2)    .bin  .rom  \npet2001b16       cartridge3       (cart3)    .bin  .rom  \npet2001b32       floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet2001b32       floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet2001b32       cassette         (cass)     .wav  .flac .tap  \npet2001b32       quickload        (quik)     .p00  .prg  \npet2001b32       cartridge1       (cart1)    .bin  .rom  \npet2001b32       cartridge2       (cart2)    .bin  .rom  \npet2001b32       cartridge3       (cart3)    .bin  .rom  \npet2001n         floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet2001n         floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet2001n         cassette         (cass)     .wav  .flac .tap  \npet2001n         quickload        (quik)     .p00  .prg  \npet2001n         cartridge1       (cart1)    .bin  .rom  \npet2001n         cartridge2       (cart2)    .bin  .rom  \npet2001n         cartridge3       (cart3)    .bin  .rom  \npet2001n16       floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet2001n16       floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet2001n16       cassette         (cass)     .wav  .flac .tap  \npet2001n16       quickload        (quik)     .p00  .prg  \npet2001n16       cartridge1       (cart1)    .bin  .rom  \npet2001n16       cartridge2       (cart2)    .bin  .rom  \npet2001n16       cartridge3       (cart3)    .bin  .rom  \npet2001n32       floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet2001n32       floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet2001n32       cassette         (cass)     .wav  .flac .tap  \npet2001n32       quickload        (quik)     .p00  .prg  \npet2001n32       cartridge1       (cart1)    .bin  .rom  \npet2001n32       cartridge2       (cart2)    .bin  .rom  \npet2001n32       cartridge3       (cart3)    .bin  .rom  \npet4016          floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet4016          floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet4016          cassette         (cass)     .wav  .flac .tap  \npet4016          quickload        (quik)     .p00  .prg  \npet4016          cartridge1       (cart1)    .bin  .rom  \npet4016          cartridge2       (cart2)    .bin  .rom  \npet4032          floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet4032          floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet4032          cassette         (cass)     .wav  .flac .tap  \npet4032          quickload        (quik)     .p00  .prg  \npet4032          cartridge1       (cart1)    .bin  .rom  \npet4032          cartridge2       (cart2)    .bin  .rom  \npet4032b         floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet4032b         floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet4032b         cassette         (cass)     .wav  .flac .tap  \npet4032b         quickload        (quik)     .p00  .prg  \npet4032b         cartridge1       (cart1)    .bin  .rom  \npet4032b         cartridge2       (cart2)    .bin  .rom  \npet4032f         floppydisk1      (flop1)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet4032f         floppydisk2      (flop2)    .mfi  .dfi  .d64  .g64  .g41  .g71  \npet4032f         cassette         (cass)     .wav  .flac .tap  \npet4032f         quickload        (quik)     .p00  .prg  \npet4032f         cartridge1       (cart1)    .bin  .rom  \npet4032f         cartridge2       (cart2)    .bin  .rom  \npet64            cassette         (cass)     .wav  .flac .tap  \npet64            floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \npet64            cartridge        (cart)     .80   .a0   .e0   .crt  \npet64            quickload        (quik)     .p00  .prg  .t64  \npet8032          floppydisk1      (flop1)    .mfi  .dfi  .d80  \npet8032          floppydisk2      (flop2)    .mfi  .dfi  .d80  \npet8032          cassette         (cass)     .wav  .flac .tap  \npet8032          quickload        (quik)     .p00  .prg  \npet8032          cartridge1       (cart1)    .bin  .rom  \npet8032          cartridge2       (cart2)    .bin  .rom  \npf2012           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npf2012           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npg675            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npg675            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npg685            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npg685oua12       floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npg750            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npg750            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npg750            printout         (prin)     .prn  \npg750            harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \npg750            harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \npg750eisa        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npg750eisa        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npg750eisa        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npg750eisa        printout         (prin)     .prn  \nphc2             cartridge        (cart)     .mx1  .bin  .rom  \nphc2             printout         (prin)     .prn  \nphc2             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nphc20            cassette         (cass)     .wav  .flac \nphc23            cartridge1       (cart1)    .mx1  .bin  .rom  \nphc23            cartridge2       (cart2)    .mx1  .bin  .rom  \nphc23            printout         (prin)     .prn  \nphc23            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nphc23jb          cartridge1       (cart1)    .mx1  .bin  .rom  \nphc23jb          cartridge2       (cart2)    .mx1  .bin  .rom  \nphc23jb          printout         (prin)     .prn  \nphc23jb          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nphc25            cassette         (cass)     .wav  .flac .phc  \nphc25            printout         (prin)     .prn  \nphc25j           cassette         (cass)     .wav  .flac .phc  \nphc25j           printout         (prin)     .prn  \nphc28            cartridge1       (cart1)    .mx1  .bin  .rom  \nphc28            cartridge2       (cart2)    .mx1  .bin  .rom  \nphc28            printout         (prin)     .prn  \nphc28            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nphc28l           cartridge1       (cart1)    .mx1  .bin  .rom  \nphc28l           cartridge2       (cart2)    .mx1  .bin  .rom  \nphc28l           printout         (prin)     .prn  \nphc28l           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nphc28s           cartridge1       (cart1)    .mx1  .bin  .rom  \nphc28s           cartridge2       (cart2)    .mx1  .bin  .rom  \nphc28s           printout         (prin)     .prn  \nphc28s           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nphc35j           cartridge1       (cart1)    .mx1  .bin  .rom  \nphc35j           cartridge2       (cart2)    .mx1  .bin  .rom  \nphc35j           printout         (prin)     .prn  \nphc35j           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nphc55fd2         cartridge1       (cart1)    .mx1  .bin  .rom  \nphc55fd2         cartridge2       (cart2)    .mx1  .bin  .rom  \nphc55fd2         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nphc55fd2         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nphc55fd2         printout         (prin)     .prn  \nphc55fd2         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nphc64            printout         (prin)     .prn  \nphc64            cassette1        (cass1)    .wav  .flac \nphc64            cassette2        (cass2)    .wav  .flac \nphc64            cartridge        (cart)     .bin  .rom  \nphc70fd          cartridge1       (cart1)    .mx1  .bin  .rom  \nphc70fd          cartridge2       (cart2)    .mx1  .bin  .rom  \nphc70fd          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nphc70fd          printout         (prin)     .prn  \nphc70fd          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nphc70fd2         cartridge1       (cart1)    .mx1  .bin  .rom  \nphc70fd2         cartridge2       (cart2)    .mx1  .bin  .rom  \nphc70fd2         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nphc70fd2         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nphc70fd2         printout         (prin)     .prn  \nphc70fd2         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nphc77            cartridge1       (cart1)    .mx1  .bin  .rom  \nphc77            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nphc77            cartridge2       (cart2)    .mx1  .bin  .rom  \nphc77            printout         (prin)     .prn  \nphc77            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nphotoply2k       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nphotoply2k       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nphotoply2k       printout         (prin)     .prn  \nphotoply2k1it    harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nphotoply2k1it    cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nphotoply2k1it    printout         (prin)     .prn  \nphotoply2k1mtnl  harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nphotoply2k1mtnl  cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nphotoply2k1mtnl  printout         (prin)     .prn  \nphotoply2k1nl    harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nphotoply2k1nl    cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nphotoply2k1nl    printout         (prin)     .prn  \nphotoply2k2be    harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nphotoply2k2be    cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nphotoply2k2be    printout         (prin)     .prn  \nphotoply2k4      harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nphotoply2k4      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nphotoply2k4      printout         (prin)     .prn  \nphotoply2knl     harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nphotoply2knl     cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nphotoply2knl     printout         (prin)     .prn  \nphotoply2ksp     harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nphotoply2ksp     cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nphotoply2ksp     printout         (prin)     .prn  \nphotoply98sp     harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nphotoply98sp     cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nphotoply98sp     printout         (prin)     .prn  \nphotoply99nl     harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nphotoply99nl     cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nphotoply99nl     printout         (prin)     .prn  \nphotoply99sp     harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nphotoply99sp     cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nphotoply99sp     printout         (prin)     .prn  \nphp3239          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nphp3239          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nphp3239          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nphunsy           cassette         (cass)     .wav  .flac \nphunsy           quickload        (quik)     .bin  \npi4d20           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npi4d20           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npi4d25           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npi4d25           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npi4d30           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npi4d30           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npi4d35           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npi4d35           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npi4d50           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npi4d50           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npi4d50           tape             (tap)      .tap  \npi4d70           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npi4d70           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npi4d70           tape             (tap)      .tap  \npi_stry          cartridge        (cart)     .bin  \npi_stry2         cartridge        (cart)     .bin  \npicno            cartridge        (cart)     .bin  \npicno2           cartridge        (cart)     .bin  \npico             cartridge        (cart)     .bin  .md   \npicoj            cartridge        (cart)     .bin  .md   \npicou            cartridge        (cart)     .bin  .md   \npingu            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npioner           cassette         (cass)     .wav  .flac .rks  \npiopx7           cartridge1       (cart1)    .mx1  .bin  .rom  \npiopx7           cartridge2       (cart2)    .mx1  .bin  .rom  \npiopx7           printout         (prin)     .prn  \npiopx7           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \npiopx7uk         cartridge1       (cart1)    .mx1  .bin  .rom  \npiopx7uk         cartridge2       (cart2)    .mx1  .bin  .rom  \npiopx7uk         printout         (prin)     .prn  \npiopx7uk         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \npiopxv60         cartridge1       (cart1)    .mx1  .bin  .rom  \npiopxv60         cartridge2       (cart2)    .mx1  .bin  .rom  \npiopxv60         printout         (prin)     .prn  \npiopxv60         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \npipbug           quickload        (quik)     .pgm  \npipbug           cassette         (cass)     .wav  .flac \npippin           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \npippin           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npixtermu         cartridge        (cart)     .bin  \npk6128c          cassette         (cass)     .wav  .flac \npk6128c          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .fdd  \npk6128c          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .fdd  \npk6128c          cartridge        (cart)     .bin  .emr  \npk8002           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \npk88             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npk88             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npk88             printout         (prin)     .prn  \npk88             cassette         (cass)     .wav  .flac \npkm0038s         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npkm0038s         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npkm0038s         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npkm0038s         printout         (prin)     .prn  \npl6_cm           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npl6_demo         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npl6_kfp          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npl6_lgk          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nplaymaker        cartridge        (cart)     .bin  \nplldium          cartridge        (cart)     .bin  \npls1000          cartridge        (cart)     .bin  \nplus4            cassette         (cass)     .wav  .flac .tap  \nplus4            floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nplus4            cartridge        (cart)     .rom  .bin  \nplus4            quickload        (quik)     .p00  .prg  \nplus4p           cassette         (cass)     .wav  .flac .tap  \nplus4p           floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nplus4p           cartridge        (cart)     .rom  .bin  \nplus4p           quickload        (quik)     .p00  .prg  \npm486pu          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npm486pu          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npm486pu          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npm486pu          printout         (prin)     .prn  \npmac6100         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npmac6100         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npmac6100         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \npmd851           cassette         (cass)     .wav  .flac .pmd  .tap  .ptp  \npmd852           cassette         (cass)     .wav  .flac .pmd  .tap  .ptp  \npmd852a          cassette         (cass)     .wav  .flac .pmd  .tap  .ptp  \npmd852b          cassette         (cass)     .wav  .flac .pmd  .tap  .ptp  \npmd853           cassette         (cass)     .wav  .flac .pmd  .tap  .ptp  \npmi80            cassette         (cass)     .wav  .flac \npn8800           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npnchmn           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npnchmn2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npnchmna          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npockchal         cartridge        (cart)     .bin  \npockchv2         cartridge        (cart)     .ws   .wsc  .bin  \npocketbk         ssd1             (ssd1)     .rom  .bin  \npocketbk         ssd2             (ssd2)     .rom  .bin  \npocketbk2        ssd1             (ssd1)     .rom  .bin  \npocketbk2        ssd2             (ssd2)     .rom  .bin  \npockstat         cartridge        (cart)     .gme  \npoisk1           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npoisk1           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npoisk1           cassette         (cass)     .wav  .flac \npoisk2           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npoisk2           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npoisk2           printout         (prin)     .prn  \npokegac2         cartridge        (cart)     .bin  \npokegac2y        cartridge        (cart)     .bin  \npokegach         cartridge        (cart)     .bin  \npokemini         cartridge        (cart)     .bin  .min  \npokoachu         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npoly88           cassette         (cass)     .wav  .flac \npoly88           snapshot         (dump)     .img  \npoly880          cassette         (cass)     .wav  .flac \npoly880s         cassette         (cass)     .wav  .flac \npoly8813         cassette         (cass)     .wav  .flac \npoly8813         snapshot         (dump)     .img  \npolydev          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \npolysix          cassette         (cass)     .wav  .flac \npolystar         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npolyvcg          cartridge        (cart)     .bin  \npopira           cartridge        (cart)     .bin  .u1   \npopira2          cartridge        (cart)     .bin  .u1   \npopirak          cartridge        (cart)     .bin  .u1   \npopn1            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npopn1a           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npopn1j           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npopn1k           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npopn2            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npopn3            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npopn4            cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopn4            cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopn4            cdrom3           (cdrm3)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopn5            cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopn5            cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopn5            cdrom3           (cdrm3)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopn6            cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopn6            cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopn6            cdrom3           (cdrm3)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopn7            cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopn7            cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopn7            cdrom3           (cdrm3)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopn8            cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopn8            cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopn8            cdrom3           (cdrm3)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanm          cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanm          cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanm          cdrom3           (cdrm3)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanm2         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanm2         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanm2         cdrom3           (cdrm3)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanm2a        cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanm2a        cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanm2a        cdrom3           (cdrm3)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanm2ja       cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanm2ja       cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanm2ja       cdrom3           (cdrm3)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanm2jaa      cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanm2jaa      cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanm2jaa      cdrom3           (cdrm3)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanma         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanma         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnanma         cdrom3           (cdrm3)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnmt           cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnmt           cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnmt           cdrom3           (cdrm3)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnmt2          cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnmt2          cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnmt2          cdrom3           (cdrm3)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npopnstex         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npoppympt         cartridge        (cart)     .bin  \npositron         cassette         (cass)     .wav  .flac \npow3000          cassette         (cass)     .wav  .flac .p    .81   .tzx  \npowyak96         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npowyakex         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npp               floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npp01             cassette         (cass)     .wav  .flac \npp1292           quickload        (quik)     .pgm  .tvc  \npp1292           cartridge        (cart)     .bin  .rom  \npp1392           quickload        (quik)     .pgm  .tvc  \npp1392           cartridge        (cart)     .bin  .rom  \nppc512           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nppc512           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nppc512           printout1        (prin1)    .prn  \nppc512           printout2        (prin2)    .prn  \nppc512           printout3        (prin3)    .prn  \nppc640           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nppc640           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nppc640           printout1        (prin1)    .prn  \nppc640           printout2        (prin2)    .prn  \nppc640           printout3        (prin3)    .prn  \nppd              cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nppd              cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nppm3333p         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nppm3333p         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nppm3333p         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nppp              cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nppp              cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nppp11            cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nppp11            cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nppp1mp           cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nppp1mp           cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nppp2nd           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nppp2nda          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nprav82           floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nprav82           floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nprav82           cassette         (cass)     .wav  .flac \nprav8c           floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nprav8c           floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nprav8c           cassette         (cass)     .wav  .flac \nprav8d           printout         (prin)     .prn  \nprav8d           cassette         (cass)     .wav  .flac .tap  \nprav8dd          printout         (prin)     .prn  \nprav8dd          cassette         (cass)     .wav  .flac .tap  \nprav8m           floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nprav8m           floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nprav8m           cassette         (cass)     .wav  .flac \nprestige         cartridge        (cart)     .bin  \nprestmpt         cartridge        (cart)     .bin  \nprimoa32         snapshot         (dump)     .pss  \nprimoa32         quickload        (quik)     .pp   \nprimoa32         cassette         (cass)     .wav  .flac .ptp  \nprimoa32         cartridge1       (cart1)    .bin  .rom  \nprimoa32         cartridge2       (cart2)    .bin  .rom  \nprimoa48         snapshot         (dump)     .pss  \nprimoa48         quickload        (quik)     .pp   \nprimoa48         cassette         (cass)     .wav  .flac .ptp  \nprimoa48         cartridge1       (cart1)    .bin  .rom  \nprimoa48         cartridge2       (cart2)    .bin  .rom  \nprimoa64         snapshot         (dump)     .pss  \nprimoa64         quickload        (quik)     .pp   \nprimoa64         cassette         (cass)     .wav  .flac .ptp  \nprimoa64         cartridge1       (cart1)    .bin  .rom  \nprimoa64         cartridge2       (cart2)    .bin  .rom  \nprimob32         snapshot         (dump)     .pss  \nprimob32         quickload        (quik)     .pp   \nprimob32         cassette         (cass)     .wav  .flac .ptp  \nprimob32         cartridge1       (cart1)    .bin  .rom  \nprimob32         cartridge2       (cart2)    .bin  .rom  \nprimob48         snapshot         (dump)     .pss  \nprimob48         quickload        (quik)     .pp   \nprimob48         cassette         (cass)     .wav  .flac .ptp  \nprimob48         cartridge1       (cart1)    .bin  .rom  \nprimob48         cartridge2       (cart2)    .bin  .rom  \nprimob64         snapshot         (dump)     .pss  \nprimob64         quickload        (quik)     .pp   \nprimob64         cassette         (cass)     .wav  .flac .ptp  \nprimob64         cartridge1       (cart1)    .bin  .rom  \nprimob64         cartridge2       (cart2)    .bin  .rom  \nprimoc64         snapshot         (dump)     .pss  \nprimoc64         quickload        (quik)     .pp   \nprimoc64         cassette         (cass)     .wav  .flac .ptp  \nprimoc64         cartridge1       (cart1)    .bin  .rom  \nprimoc64         cartridge2       (cart2)    .bin  .rom  \nprimrag2         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nprinc            cartridge        (cart)     .bin  \nprincnt          cartridge        (cart)     .bin  \nprincnt3         cartridge        (cart)     .bin  \npro128           cassette         (cass)     .wav  .k5   .k7   \npro128           cartridge        (cart)     .m5   .rom  \npro128           printout         (prin)     .prn  \npro128s          printout         (prin)     .prn  \npro128s          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \npro128s          romimage1        (rom1)     .rom  .bin  \npro128s          romimage2        (rom2)     .rom  .bin  \npro128s          romimage3        (rom3)     .rom  .bin  \npro128s          romimage4        (rom4)     .rom  .bin  \npro80            cassette         (cass)     .wav  .flac \nprof180x         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nprof180x         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nprof180x         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nprof180x         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nprof180x         printout         (prin)     .prn  \nprof181x         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nprof181x         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nprof181x         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nprof181x         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nprof181x         printout         (prin)     .prn  \nprof80           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nprof80           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nprof80           printout         (prin)     .prn  \nprofi            snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nprofi            quickload        (quik)     .raw  .scr  \nprofi            cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nprofi            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nprofi            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nprofi            floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nprofi            floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nprofpc33         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nprofpc33         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nprofpc33         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nprofweis         cartridge        (cart)     .bin  \nprolite286       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nprolite286       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nprolite286       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nprophet2         cassette         (cass)     .wav  .flac .tap  .csw  .uef  \nprophet2         printout         (prin)     .prn  \nprophet2         quickload        (quik)     .atm  \nprophet2         romimage         (rom)      .bin  .rom  \nproteus          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  .cpm  \nproteus          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  .cpm  \nproteus          printout         (prin)     .prn  \nproteus3         cassette         (cass)     .wav  .flac \nprsarcde         cartridge        (cart)     .rom  .col  .bin  \nprzonegd         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nprzonegd         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nprzonegd         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nprzonegd         printout         (prin)     .prn  \nprzonegd         midiin           (min)      .mid  .syx  \nprzonegd         midiout          (mout)     .mid  \npsa              memcard1         (memc1)    .mc   \npsa              memcard2         (memc2)    .mc   \npsa              quickload        (quik)     .cpe  .exe  .psf  .psx  \npsa              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npsattack         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npse              memcard1         (memc1)    .mc   \npse              memcard2         (memc2)    .mc   \npse              quickload        (quik)     .cpe  .exe  .psf  .psx  \npse              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npsi98            printout         (prin)     .prn  \npsi98            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npsi98            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npsion3           ssd1             (ssd1)     .rom  .bin  \npsion3           ssd2             (ssd2)     .rom  .bin  \npsion3a          ssd1             (ssd1)     .rom  .bin  \npsion3a          ssd2             (ssd2)     .rom  .bin  \npsion3a2         ssd1             (ssd1)     .rom  .bin  \npsion3a2         ssd2             (ssd2)     .rom  .bin  \npsion3a2_de      ssd1             (ssd1)     .rom  .bin  \npsion3a2_de      ssd2             (ssd2)     .rom  .bin  \npsion3a2_it      ssd1             (ssd1)     .rom  .bin  \npsion3a2_it      ssd2             (ssd2)     .rom  .bin  \npsion3a2_ru      ssd1             (ssd1)     .rom  .bin  \npsion3a2_ru      ssd2             (ssd2)     .rom  .bin  \npsion3a2_us      ssd1             (ssd1)     .rom  .bin  \npsion3a2_us      ssd2             (ssd2)     .rom  .bin  \npsion3c          ssd1             (ssd1)     .rom  .bin  \npsion3c          ssd2             (ssd2)     .rom  .bin  \npsion3mx         ssd1             (ssd1)     .rom  .bin  \npsion3mx         ssd2             (ssd2)     .rom  .bin  \npsion3mx_fr      ssd1             (ssd1)     .rom  .bin  \npsion3mx_fr      ssd2             (ssd2)     .rom  .bin  \npsion3mx_nl      ssd1             (ssd1)     .rom  .bin  \npsion3mx_nl      ssd2             (ssd2)     .rom  .bin  \npsion3s          ssd1             (ssd1)     .rom  .bin  \npsion3s          ssd2             (ssd2)     .rom  .bin  \npsionhc100       ssd1             (ssd1)     .rom  .bin  \npsionhc100       ssd2             (ssd2)     .rom  .bin  \npsionhc110       ssd1             (ssd1)     .rom  .bin  \npsionhc110       ssd2             (ssd2)     .rom  .bin  \npsionhc120       ssd1             (ssd1)     .rom  .bin  \npsionhc120       ssd2             (ssd2)     .rom  .bin  \npsionwa          ssd1             (ssd1)     .rom  .bin  \npsionwa          ssd2             (ssd2)     .rom  .bin  \npsionwamx        ssd1             (ssd1)     .rom  .bin  \npsionwamx        ssd2             (ssd2)     .rom  .bin  \npsj              memcard1         (memc1)    .mc   \npsj              memcard2         (memc2)    .mc   \npsj              quickload        (quik)     .cpe  .exe  .psf  .psx  \npsj              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npsr540           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \npsr540           midiin           (min)      .mid  .syx  \npsr540           midiout          (mout)     .mid  \npsu              memcard1         (memc1)    .mc   \npsu              memcard2         (memc2)    .mc   \npsu              quickload        (quik)     .cpe  .exe  .psf  .psx  \npsu              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npsyvar2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npsyvaria         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npsyvarij         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npsyvarrv         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npt319a           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npt319a           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npt319a           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npt430            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npt430            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npt430            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npt430            printout         (prin)     .prn  \npt432b           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npt432b           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npt432b           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npt432b           printout         (prin)     .prn  \npt581392         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npt581392         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npt581392         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npt581392         printout         (prin)     .prn  \npt68k2           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npt68k2           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npt68k4           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npt68k4           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nptblank3         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nptmb457          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nptmb457          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nptmb457          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nptmb457          printout         (prin)     .prn  \npulsarlb         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npulsarlb         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npumpipx2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpipx2p        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpipx3         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpipx3a        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpipx3b        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpit1          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpit2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpit2a         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpit3          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpit3a         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpit8          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpitc          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpite          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpitea         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpito          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpitp2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpitp3         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpitp3a        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpitpc         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpitpr         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpitpru        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpitpx         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npumpitup         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npuyofev          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npuyofevj         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npuzzball         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npuzzballa        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \npv1000           cartridge        (cart)     .bin  \npv16             cartridge        (cart)     .mx1  .bin  .rom  \npv16             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \npv2000           cassette         (cass)     .wav  .flac \npv2000           cartridge        (cart)     .bin  .rom  .col  \npv7              cartridge        (cart)     .mx1  .bin  .rom  \npv7              cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \npwaih4077c       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npwaih4077c       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npwaih4077c       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npwaih4077c       printout         (prin)     .prn  \npwaih4077d       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npwaih4077d       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npwaih4077d       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npwaih4077d       printout         (prin)     .prn  \npwb7270e         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npwb7270e         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npwb7270e         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npwrmacg3         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \npwrshovl         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npwrview          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npwrview          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \npx4              printout         (prin)     .prn  \npx4              cassette         (cass)     .wav  .flac \npx4              cartridge1       (cart1)    .bin  \npx4              cartridge2       (cart2)    .bin  \npx486p3          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npx486p3          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \npx486p3          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \npx486p3          printout         (prin)     .prn  \npx4p             printout         (prin)     .prn  \npx4p             cassette         (cass)     .wav  .flac \npx4p             cartridge1       (cart1)    .bin  \npx4p             cartridge2       (cart2)    .bin  \npx4p             cartridge3       (cart3)    .bin  \npx8              cartridge1       (cart1)    .bin  .rom  \npx8              cartridge2       (cart2)    .bin  .rom  \npx8              cassette         (cass)     .wav  .flac \npyl601           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \npyl601           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \npyl601a          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \npyl601a          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \npyuuta           printout         (prin)     .prn  \npyuuta           cassette         (cass)     .wav  .flac \npyuuta           cartridge        (cart)     .bin  \npyuutajr         printout         (prin)     .prn  \npyuutajr         cassette         (cass)     .wav  .flac \npyuutajr         cartridge        (cart)     .bin  \nqdrmfgp          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nqdrmfgp2         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nqdu386dx         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nqdu386dx         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nqdu386dx         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nqdu386dx         printout         (prin)     .prn  \nqi600            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nqi600            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nqi600            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nqi600            printout         (prin)     .prn  \nqi900            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nqi900            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nqi900            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nqi900            printout         (prin)     .prn  \nql               microtape1       (utap1)    .mdv  .mdr  \nql               microtape2       (utap2)    .mdv  .mdr  \nql               cartridge        (cart)     .rom  .bin  \nql_de            microtape1       (utap1)    .mdv  .mdr  \nql_de            microtape2       (utap2)    .mdv  .mdr  \nql_de            cartridge        (cart)     .rom  .bin  \nql_dk            microtape1       (utap1)    .mdv  .mdr  \nql_dk            microtape2       (utap2)    .mdv  .mdr  \nql_dk            cartridge        (cart)     .rom  .bin  \nql_es            microtape1       (utap1)    .mdv  .mdr  \nql_es            microtape2       (utap2)    .mdv  .mdr  \nql_es            cartridge        (cart)     .rom  .bin  \nql_fr            microtape1       (utap1)    .mdv  .mdr  \nql_fr            microtape2       (utap2)    .mdv  .mdr  \nql_fr            cartridge        (cart)     .rom  .bin  \nql_gr            microtape1       (utap1)    .mdv  .mdr  \nql_gr            microtape2       (utap2)    .mdv  .mdr  \nql_gr            cartridge        (cart)     .rom  .bin  \nql_it            microtape1       (utap1)    .mdv  .mdr  \nql_it            microtape2       (utap2)    .mdv  .mdr  \nql_it            cartridge        (cart)     .rom  .bin  \nql_se            microtape1       (utap1)    .mdv  .mdr  \nql_se            microtape2       (utap2)    .mdv  .mdr  \nql_se            cartridge        (cart)     .rom  .bin  \nql_us            microtape1       (utap1)    .mdv  .mdr  \nql_us            microtape2       (utap2)    .mdv  .mdr  \nql_us            cartridge        (cart)     .rom  .bin  \nqofd3            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nqofdtbk          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquake            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nquake            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquake            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nquake            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nquake            printout         (prin)     .prn  \nqueen            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nquestofd         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizard          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizard2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizard2_22      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizard3         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizard3_32      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizard3a        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizard4         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizard4_40      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizard4_41      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizard4cz       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizard_10       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizard_12       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizard_17       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizardff        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizardi         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizardi_12      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizardi_17      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizqgd          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nquizshow         cassette         (cass)     .wav  .flac \nquizwizc         cartridge        (cart)     .bin  \nquorum           snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nquorum           quickload        (quik)     .raw  .scr  \nquorum           cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nquorum           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nquorum           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nquorum           floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nquorum           floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nquorum48         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nquorum48         quickload        (quik)     .raw  .scr  \nquorum48         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nqx10             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nqx10             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nqx10             quickload        (quik)     .com  .cpm  \nr8               cartridge        (cart)     .bin  \nr8m              cartridge1       (cart1)    .bin  \nr8m              cartridge2       (cart2)    .bin  \nr8m              cartridge3       (cart3)    .bin  \nr8mk2            cartridge        (cart)     .bin  \nr9751            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nr9751            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nr9751            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nracjamdx         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nradio16          cassette         (cass)     .wav  .flac .rk   .rkr  .gam  .g16  .pki  \nradio4k          cassette         (cass)     .wav  .flac .rk   .rkr  .gam  .g16  .pki  \nradio86          cassette         (cass)     .wav  .flac .rk   .rkr  .gam  .g16  .pki  \nradio99          cassette         (cass)     .wav  .flac .rk8  \nradionic         cassette         (cass)     .wav  .flac .cas  \nradionic         quickload        (quik)     .cmd  \nradionic         floppydisk1      (flop1)    .mfi  .dfi  .jv1  .dsk  \nradionic         floppydisk2      (flop2)    .mfi  .dfi  .jv1  .dsk  \nradionic         printout         (prin)     .prn  \nradioram         cassette         (cass)     .wav  .flac .rk   .rkr  .gam  .g16  .pki  \nradiorom         cassette         (cass)     .wav  .flac .rk   .rkr  .gam  .g16  .pki  \nradiorom         cartridge        (cart)     .bin  .rom  \nradirgy          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nradirgyo         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nrainbow          floppydisk1      (flop1)    .mfi  .dfi  .img  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .ufi  .360  .ipf  \nrainbow          floppydisk2      (flop2)    .mfi  .dfi  .img  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .ufi  .360  .ipf  \nrainbow          floppydisk3      (flop3)    .mfi  .dfi  .img  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .ufi  .360  .ipf  \nrainbow          floppydisk4      (flop4)    .mfi  .dfi  .img  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .ufi  .360  .ipf  \nrainbow          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nrainbow          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nrainbow          harddisk3        (hard3)    .chd  .hd   .hdv  .2mg  .hdi  \nrainbow          harddisk4        (hard4)    .chd  .hd   .hdv  .2mg  .hdi  \nrainbow          harddisk5        (hard5)    .chd  .hd   .hdv  .2mg  .hdi  \nrainbow          printout         (prin)     .prn  \nrainbow100a      floppydisk1      (flop1)    .mfi  .dfi  .img  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .ufi  .360  .ipf  \nrainbow100a      floppydisk2      (flop2)    .mfi  .dfi  .img  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .ufi  .360  .ipf  \nrainbow100a      floppydisk3      (flop3)    .mfi  .dfi  .img  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .ufi  .360  .ipf  \nrainbow100a      floppydisk4      (flop4)    .mfi  .dfi  .img  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .ufi  .360  .ipf  \nrainbow100a      harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nrainbow100a      harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nrainbow100a      harddisk3        (hard3)    .chd  .hd   .hdv  .2mg  .hdi  \nrainbow100a      harddisk4        (hard4)    .chd  .hd   .hdv  .2mg  .hdi  \nrainbow100a      harddisk5        (hard5)    .chd  .hd   .hdv  .2mg  .hdi  \nrainbow100a      printout         (prin)     .prn  \nrainbow190       floppydisk1      (flop1)    .mfi  .dfi  .img  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .ufi  .360  .ipf  \nrainbow190       floppydisk2      (flop2)    .mfi  .dfi  .img  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .ufi  .360  .ipf  \nrainbow190       floppydisk3      (flop3)    .mfi  .dfi  .img  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .ufi  .360  .ipf  \nrainbow190       floppydisk4      (flop4)    .mfi  .dfi  .img  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .ufi  .360  .ipf  \nrainbow190       harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nrainbow190       harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nrainbow190       harddisk3        (hard3)    .chd  .hd   .hdv  .2mg  .hdi  \nrainbow190       harddisk4        (hard4)    .chd  .hd   .hdv  .2mg  .hdi  \nrainbow190       harddisk5        (hard5)    .chd  .hd   .hdv  .2mg  .hdi  \nrainbow190       printout         (prin)     .prn  \nraizpin          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nraizpinj         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrameses          cassette         (cass)     .wav  .flac \nrameses          printout         (prin)     .prn  \nrameses          cartridge        (cart)     .bin  .rom  \nrasce            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrasce            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nravens           quickload        (quik)     .pgm  \nravens           cassette         (cass)     .wav  .flac \nravens2          quickload        (quik)     .pgm  \nravens2          cassette         (cass)     .wav  .flac \nraycris          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nraycrisj         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nraystormg        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrc2014minicpm    harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrc2014pro        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrc2030           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nrc2030           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrc3230           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrc3230           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nrc702            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrc759            printout         (prin)     .prn  \nrc759            cassette         (cass)     .wav  .flac \nrc759            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nrc759            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nrcdego           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nredearth         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nredearthn        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nredearthnr1      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nredearthr1       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nrenaimj          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nrex6000          quickload        (quik)     .rex  .ds2  \nrfmpb            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrfmpbr2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrhnation         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nringo470         cassette         (cass)     .wav  .flac .p    .81   .tzx  \nrizstals         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrk7007           cassette         (cass)     .wav  .flac .rk   .rkr  .gam  .g16  .pki  \nrk700716         cassette         (cass)     .wav  .flac .rk   .rkr  .gam  .g16  .pki  \nrlndtnsc1        cartridge        (cart)     .bin  \nrlndtnsc2        cartridge        (cart)     .bin  \nrm380z           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrm380z           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrm380z34d        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrm380z34d        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrm380z34d        cassette         (cass)     .wav  .flac \nrm380z34e        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrm380z34e        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrm380z34e        cassette         (cass)     .wav  .flac \nrm380zf          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrm380zf          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrm380zfhrg       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrm380zfhrg       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrm380zhrg        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrm380zhrg        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrm480z           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrm480z           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrm480za          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nrm480za          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nroadburn         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nroadburn         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nroadburn         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nroadburn         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nroadburn1        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nroadburn1        cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nroadburn1        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nroadburn1        cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nrobie            quickload        (quik)     .com  .cpm  \nrobie            printout         (prin)     .prn  \nrobie            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nrobie            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kay  \nrockmanbc        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrockmanmdl       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrotr             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrotra            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrowtrn2k         cartridge        (cart)     .bin  \nrs128            printout         (prin)     .prn  \nrs128            snapshot         (dump)     .mtx  \nrs128            quickload        (quik)     .run  \nrs128            cassette         (cass)     .wav  .flac \nrs128            romimage         (rom)      .bin  .rom  \nrs128            cartridge1       (cart1)    .bin  .rom  \nrs128            cartridge2       (cart2)    .bin  .rom  \nrs2030           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nrs2030           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrs3230           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrs3230           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nrt1715w          printout         (prin)     .prn  \nrt1715w          bitbanger        (bitb)     .     \nrt1715w          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nrt1715w          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .kdi  \nrtpc010          printout         (prin)     .prn  \nrtpc010          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nrtpc010          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nrtpc015          printout         (prin)     .prn  \nrtpc015          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nrtpc015          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nrtpc020          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nrtpc020          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nrtpc020          printout         (prin)     .prn  \nrtpc025          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nrtpc025          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nrtpc025          printout         (prin)     .prn  \nrtpca25          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nrtpca25          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nrtpca25          printout         (prin)     .prn  \nrunpuppy         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nrwtrntcs         quickload        (quik)     .pgm  .tvc  \nrwtrntcs         cartridge        (cart)     .bin  .rom  \nrx78             cartridge        (cart)     .bin  .rom  \nrx78             cassette         (cass)     .wav  .flac \nrz1              midiin           (min)      .mid  .syx  \nrz1              midiout1         (mout1)    .mid  \nrz1              midiout2         (mout2)    .mid  \nrz1              cassette1        (cass1)    .wav  .flac .cas  \nrz1              cassette2        (cass2)    .wav  .flac \ns2000            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  \ns2000            midiin           (min)      .mid  .syx  \ns2000            midiout          (mout)     .mid  \ns2000            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ns2000            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ns3000            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  \ns3000            midiin           (min)      .mid  .syx  \ns3000            midiout          (mout)     .mid  \ns3000            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ns3000            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ns3000xl          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  \ns3000xl          midiin           (min)      .mid  .syx  \ns3000xl          midiout          (mout)     .mid  \ns3000xl          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ns3000xl          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ns50              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .out  .w30  \ns550             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .out  .w30  \nsabavdpl         cartridge        (cart)     .bin  .chf  \nsabavpl2         cartridge        (cart)     .bin  .chf  \nsag              cartridge        (cart)     .bin  \nsagafox          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsagafox          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsagafoxf80       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsagafoxf80       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsage2            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsage2            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsage2            printout         (prin)     .prn  \nsalarymc         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsamcoupe         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nsamcoupe         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .mgt  \nsamcoupe         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .mgt  \nsamdm286         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsamdm286         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsamdm286         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsantacl          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsantacl          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsantaka2         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nsantaka2         quickload        (quik)     .raw  .scr  \nsantaka2         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nsapi1            cassette         (cass)     .wav  .flac \nsapizps2         cassette         (cass)     .wav  .flac \nsarcpc           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsarcpc           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsarcpc           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsaturn           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsaturn           cartridge        (cart)     .bin  \nsaturneu         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsaturneu         cartridge        (cart)     .bin  \nsaturnjp         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsaturnjp         cartridge        (cart)     .bin  \nsaturnkr         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsaturnkr         cartridge        (cart)     .bin  \nsavquest         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsavquest         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsavquest         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsavquest         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsavquest         midiin           (min)      .mid  .syx  \nsavquest         midiout          (mout)     .mid  \nsawatte          cartridge        (cart)     .bin  \nsb180            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsb180            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsb180            floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsb180            floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsb2m600b         cassette         (cass)     .wav  .flac \nsb486            cartridge        (cart)     .nes  .unf  .unif \nsbrain           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsbrain           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsc3000           cassette         (cass)     .wav  .flac .bit  .tzx  \nsc3000           cartridge        (cart)     .bin  .sg   .sc   \nsc3000pal        cassette         (cass)     .wav  .flac .bit  .tzx  \nsc3000pal        cartridge        (cart)     .bin  .sg   .sc   \nscamp386sx       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nscamp386sx       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nscamp386sx       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nscg05nt          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nscg05ntb         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nscg06nt          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nschess           cartridge        (cart)     .bin  \nscorpio          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nscorpio          quickload        (quik)     .raw  .scr  \nscorpio          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nscorpio          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nscorpio          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nscorpio          floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nscorpio          floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nscorpiongmx      snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nscorpiongmx      quickload        (quik)     .raw  .scr  \nscorpiongmx      cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nscorpiongmx      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nscorpiongmx      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nscorpiongmx      floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nscorpiongmx      floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nscorpiontb       snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nscorpiontb       quickload        (quik)     .raw  .scr  \nscorpiontb       cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nscorpiontb       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nscorpiontb       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nscorpiontb       floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nscorpiontb       floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nscsxaio          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nscsxaio          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nscsxaio          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nscv              cartridge        (cart)     .bin  \nscv_pal          cartridge        (cart)     .bin  \nsd1              midiin           (min)      .mid  .syx  \nsd1              midiout          (mout)     .mid  \nsd1              cartridge        (cart)     .rom  .cart .eeprom.sc32 \nsd1              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .hfe  \nsd132            midiin           (min)      .mid  .syx  \nsd132            midiout          (mout)     .mid  \nsd132            cartridge        (cart)     .rom  .cart .eeprom.sc32 \nsd132            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .hfe  \nsdk85            romimage         (rom)      .bin  \nse3010           romimage1        (rom1)     .rom  .bin  \nse3010           cassette         (cass)     .wav  .flac .csw  .uef  \nse3010           printout         (prin)     .prn  \nse3010           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nse3010           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .hfe  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .dds  .fsd  \nsegaai           card             (card)     .aic  .bin  \nsegaai           cassette         (cass)     .wav  .flac \nsegacd           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsegacd2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsekaikh          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsekaikha         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsengomjk         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsenko            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsenkoo           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsenkosp          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsergeysxt        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsergeysxt        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsergeysxt        printout         (prin)     .prn  \nsergeysxt        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsf2049           harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nsf2049           cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsf2049           harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nsf2049           cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsf2049se         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nsf2049se         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsf2049se         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nsf2049se         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsf2049te         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nsf2049te         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsf2049te         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nsf2049te         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsf2049tea        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nsf2049tea        cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsf2049tea        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nsf2049tea        cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsf7000           cassette         (cass)     .wav  .flac .bit  .tzx  \nsf7000           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .sf7  \nsf7000           printout         (prin)     .prn  \nsfiii            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiii2           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiii2h          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiii2j          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiii2n          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiii3           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiii3j          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiii3jr1        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiii3n          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiii3na         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiii3nar1       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiii3nr1        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiii3r1         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiii3u          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiii3ur1        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiiia           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiiih           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiiij           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiiin           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiiina          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfiiiu           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfish2           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfish2j          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfrush           harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nsfrush           cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfrush           harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nsfrush           cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfrushrk         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nsfrushrk         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfrushrk         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nsfrushrk         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfrushrkw        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nsfrushrkw        cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfrushrkw        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nsfrushrkw        cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfrushrkwo       harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nsfrushrkwo       cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfrushrkwo       harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nsfrushrkwo       cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsfz3ugd          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsg1000           cartridge        (cart)     .bin  .sg   \nsg1000m2         cassette         (cass)     .wav  .flac .bit  .tzx  \nsg1000m2         cartridge        (cart)     .bin  .sg   .sc   \nsg1000m3         cartridge        (cart)     .bin  .sms  .sg   \nsg1000m3         card             (card)     .bin  \nsgx              cartridge        (cart)     .pce  .bin  \nsgx              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsh386sx20        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsh386sx20        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsh386sx20        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nshaktam          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nshaktamb         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nshaktmsp         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nshambros         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nshanghss         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nshangtou         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsheenhvc         cartridge        (cart)     .bin  \nshikgam2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nshikigam         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nshikigama        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nshine            printout         (prin)     .prn  \nshine            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nshine            cassette         (cass)     .wav  .flac \nshmc1200         cartridge        (cart)     .st2  .bin  .rom  \nshngmtkbg        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsht3do           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nshtzone          cartridge1       (cart1)    .bin  .sms  \nshtzone          cartridge2       (cart2)    .bin  .sms  \nshtzone          cartridge3       (cart3)    .bin  .sms  \nshtzone          cartridge4       (cart4)    .bin  .sms  \nshtzone          cartridge5       (cart5)    .bin  .sms  \nshutms11         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nshutms11         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nshutms11         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nshutms11         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nshutms11         printout         (prin)     .prn  \nsianniv          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsicpc1605        cassette         (cass)     .wav  .flac \nsicpc1605        printout1        (prin1)    .prn  \nsicpc1605        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsicpc1605        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsicpc1605        printout2        (prin2)    .prn  \nsicpc1605        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nsicpc1605        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nsiena            ssd              (ssd)      .rom  .bin  \nsiena_fr         ssd              (ssd)      .rom  .bin  \nsimpbowl         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsimultano        romimage         (rom)      .bin  \nsimultanoa       romimage         (rom)      .bin  \nsintez2          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nsintez2          quickload        (quik)     .raw  .scr  \nsintez2          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nsis85c471        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsis85c471        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsis85c471        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsis85c471        printout         (prin)     .prn  \nsis85c496        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsis85c496        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsis85c496        printout         (prin)     .prn  \nsisrabb          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsisrabb          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsisrabb          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsisrabb          printout         (prin)     .prn  \nsist1            cassette         (cass)     .wav  .flac .csw  .uef  \nsist1            romimage1        (rom1)     .rom  .bin  \nsist1            romimage2        (rom2)     .rom  .bin  \nsist1            romimage3        (rom3)     .rom  .bin  \nsist1            romimage4        (rom4)     .rom  .bin  \nsist1            romimage5        (rom5)     .bin  .rom  \nsist1            printout         (prin)     .prn  \nsist1            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \nsist1            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \nslashout         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nslicer           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nslotouji         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nslotoujia        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nslvrball632      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nslvrball632      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nslvrball632      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nslvrball632      printout         (prin)     .prn  \nslvrball720      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nslvrball720      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nslvrball720      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nslvrball720      printout         (prin)     .prn  \nslvrball806      cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nslvrball806      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nslvrball806      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nslvrball806      printout         (prin)     .prn  \nslvrballbu409    cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nslvrballbu409    floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nslvrballbu409    floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nslvrballbu409    printout         (prin)     .prn  \nslvrballbu409b   cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nslvrballbu409b   floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nslvrballbu409b   floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nslvrballbu409b   printout         (prin)     .prn  \nsm1810           harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nsm1810           harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nsm1810           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsm38640f         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsm38640f         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsm38640f         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsm38640f         printout         (prin)     .prn  \nsm48650usc       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsm48650usc       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsm48650usc       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsm48650usc       printout         (prin)     .prn  \nsmartcyc         cartridge        (cart)     .bin  \nsmartvad         cartridge        (cart)     .bin  \nsmc777           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsmc777           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsmc777           quickload        (quik)     .com  .cpm  \nsmih0107         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsmih0107         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsmih0107         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsmih0107         printout         (prin)     .prn  \nsmondial2        cartridge        (cart)     .bin  \nsms              cartridge        (cart)     .bin  .sms  \nsms1             cartridge        (cart)     .bin  .sms  \nsms1             card             (card)     .bin  \nsms1000          floppydisk1      (flop1)    .img  .fdi  .td0  .imd  .cqm  .dsk  .d77  .d88  .1dd  \nsms1000          floppydisk2      (flop2)    .img  .fdi  .td0  .imd  .cqm  .dsk  .d77  .d88  .1dd  \nsms1000          punchtape        (ptap)     .bin  .bim  .lda  \nsms1br           cartridge        (cart)     .bin  .sms  \nsms1br           card             (card)     .bin  \nsms1kr           cartridge        (cart)     .bin  .sms  .sg   \nsms1kr           card             (card)     .bin  \nsms1krfm         cartridge        (cart)     .bin  .sms  .sg   \nsms1krfm         card             (card)     .bin  \nsms1pal          cartridge        (cart)     .bin  .sms  \nsms1pal          card             (card)     .bin  \nsms1paln         cartridge        (cart)     .bin  .sms  \nsms1paln         card             (card)     .bin  \nsms2br           cartridge        (cart)     .bin  .sms  \nsms2br           card             (card)     .bin  \nsms2paln         cartridge        (cart)     .bin  .sms  \nsms2paln         card             (card)     .bin  \nsmsbr            cartridge        (cart)     .bin  .sms  \nsmsj             cartridge        (cart)     .bin  .sms  .sg   \nsmsj             card             (card)     .bin  \nsmskr            cartridge        (cart)     .bin  .sms  .sg   \nsmspal           cartridge        (cart)     .bin  .sms  \nsmspaln          cartridge        (cart)     .bin  .sms  \nsmssdisp         cartridge1       (cart1)    .bin  .sms  \nsmssdisp         cartridge2       (cart2)    .bin  .sms  \nsmssdisp         cartridge3       (cart3)    .bin  .sms  \nsmssdisp         cartridge4       (cart4)    .bin  .sms  \nsmssdisp         cartridge5       (cart5)    .bin  .sms  \nsmssdisp         cartridge6       (cart6)    .bin  .sms  \nsmssdisp         cartridge7       (cart7)    .bin  .sms  \nsmssdisp         cartridge8       (cart8)    .bin  .sms  \nsmssdisp         cartridge9       (cart9)    .bin  .sms  \nsmssdisp         cartridge10      (cart10)   .bin  .sms  \nsmssdisp         cartridge11      (cart11)   .bin  .sms  \nsmssdisp         cartridge12      (cart12)   .bin  .sms  \nsmssdisp         cartridge13      (cart13)   .bin  .sms  \nsmssdisp         cartridge14      (cart14)   .bin  .sms  \nsmssdisp         cartridge15      (cart15)   .bin  .sms  \nsmssdisp         cartridge16      (cart16)   .bin  .sms  \nsmssdisp         card1            (card1)    .bin  \nsmssdisp         card2            (card2)    .bin  \nsmssdisp         card3            (card3)    .bin  \nsmssdisp         card4            (card4)    .bin  \nsmssdisp         card5            (card5)    .bin  \nsmssdisp         card6            (card6)    .bin  \nsmssdisp         card7            (card7)    .bin  \nsmssdisp         card8            (card8)    .bin  \nsmssdisp         card9            (card9)    .bin  \nsmssdisp         card10           (card10)   .bin  \nsmssdisp         card11           (card11)   .bin  \nsmssdisp         card12           (card12)   .bin  \nsmssdisp         card13           (card13)   .bin  \nsmssdisp         card14           (card14)   .bin  \nsmssdisp         card15           (card15)   .bin  \nsmssdisp         card16           (card16)   .bin  \nsnes             cartridge        (cart)     .sfc  \nsnespal          cartridge        (cart)     .sfc  \nsnomi286         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsnomi286         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsnomi286         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsnotec           cartridge        (cart)     .bin  \nsnotecex         cartridge        (cart)     .bin  \nsnotecu          cartridge        (cart)     .bin  \nsnotecug         cartridge        (cart)     .bin  \nsnotecut         cartridge        (cart)     .bin  \nsnread           cartridge        (cart)     .vsm  .bin  \nsnspell          cartridge        (cart)     .vsm  .bin  \nsnspellc         cartridge        (cart)     .vsm  .bin  \nsnspellca        cartridge        (cart)     .vsm  .bin  \nsnspellfr        cartridge        (cart)     .vsm  .bin  \nsnspellit        cartridge        (cart)     .vsm  .bin  \nsnspelljp        cartridge        (cart)     .vsm  .bin  \nsnspellp         cartridge        (cart)     .vsm  .bin  \nsnspellsp        cartridge        (cart)     .vsm  .bin  \nsnspellua        cartridge        (cart)     .vsm  .bin  \nsnspellub        cartridge        (cart)     .vsm  .bin  \nsnspelluk        cartridge        (cart)     .vsm  .bin  \nsnspelluka       cartridge        (cart)     .vsm  .bin  \nsnwrite          cartridge        (cart)     .vsm  .bin  \nso025d2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nso025d2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nso025d2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nso025d2          printout         (prin)     .prn  \nso025k2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nso025k2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nso025k2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nso025k2          printout         (prin)     .prn  \nso025r2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nso025r2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nso025r2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nso025r2          printout         (prin)     .prn  \nso30h            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nso30h            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nso30h            printout         (prin)     .prn  \nso4saw2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nso4saw2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nso4saw2          printout         (prin)     .prn  \nsocrates         cartridge        (cart)     .bin  \nsocratfc         cartridge        (cart)     .bin  \nsoftbox          floppydisk1      (flop1)    .mfi  .dfi  .d80  \nsoftbox          floppydisk2      (flop2)    .mfi  .dfi  .d80  \nsoftbox          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nsoftbox          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nsoftbox          harddisk3        (hard3)    .chd  .hd   .hdv  .2mg  .hdi  \nsoftbox          harddisk4        (hard4)    .chd  .hd   .hdv  .2mg  .hdi  \nsogeki           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsol20            cassette1        (cass1)    .wav  .flac .svt  \nsol20            cassette2        (cass2)    .wav  .flac .svt  \nsorcerer         bitbanger        (bitb)     .     \nsorcerer         quickload        (quik)     .bin  .snp  \nsorcerer         cassette1        (cass1)    .wav  .flac .tape \nsorcerer         cassette2        (cass2)    .wav  .flac .tape \nsorcerer         cartridge        (cart)     .bin  .rom  \nsorcerer2        bitbanger        (bitb)     .     \nsorcerer2        quickload        (quik)     .bin  .snp  \nsorcerer2        cassette1        (cass1)    .wav  .flac .tape \nsorcerer2        cassette2        (cass2)    .wav  .flac .tape \nsorcerer2        cartridge        (cart)     .bin  .rom  \nsorcerera        bitbanger        (bitb)     .     \nsorcerera        quickload        (quik)     .bin  .snp  \nsorcerera        cassette1        (cass1)    .wav  .flac .tape \nsorcerera        cassette2        (cass2)    .wav  .flac .tape \nsorcerera        cartridge        (cart)     .bin  .rom  \nsorcerera        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsorcerera        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsorcerera        floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsorcerera        floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsorcererb        bitbanger        (bitb)     .     \nsorcererb        quickload        (quik)     .bin  .snp  \nsorcererb        cassette1        (cass1)    .wav  .flac .tape \nsorcererb        cassette2        (cass2)    .wav  .flac .tape \nsorcererb        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsorcererb        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsorcererb        floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsorcererb        floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsorcererd        bitbanger        (bitb)     .     \nsorcererd        quickload        (quik)     .bin  .snp  \nsorcererd        cassette1        (cass1)    .wav  .flac .tape \nsorcererd        cassette2        (cass2)    .wav  .flac .tape \nsorcererd        cartridge        (cart)     .bin  .rom  \nsorcererd        floppydisk1      (flop1)    .dsk  .fdi  .td0  .imd  .cqm  .d77  .d88  .1dd  \nsorcererd        floppydisk2      (flop2)    .dsk  .fdi  .td0  .imd  .cqm  .d77  .d88  .1dd  \nsorcererd        floppydisk3      (flop3)    .dsk  .fdi  .td0  .imd  .cqm  .d77  .d88  .1dd  \nsorcererd        floppydisk4      (flop4)    .dsk  .fdi  .td0  .imd  .cqm  .d77  .d88  .1dd  \nsorcererd        floppydisk5      (flop5)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsorcererd        floppydisk6      (flop6)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsoundic          cartridge        (cart)     .bin  \nsoutenry         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsp3e8bit         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nsp3e8bit         quickload        (quik)     .raw  .scr  \nsp3e8bit         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nsp3e8bit         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \nsp3eata          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nsp3eata          quickload        (quik)     .raw  .scr  \nsp3eata          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nsp3eata          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \nsp3ezcf          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nsp3ezcf          quickload        (quik)     .raw  .scr  \nsp3ezcf          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nsp3ezcf          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \nspace84          floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nspace84          floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nspace84          cassette         (cass)     .wav  .flac \nspc1000          printout         (prin)     .prn  \nspc1000          cassette         (cass)     .wav  .flac .tap  .cas  \nspc1500          printout         (prin)     .prn  \nspc1500          cassette         (cass)     .wav  .flac .tap  .cas  \nspc4000          quickload        (quik)     .pgm  .tvc  \nspc4000          cartridge        (cart)     .bin  .rom  \nspc400d          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nspc400d          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nspc400d          printout         (prin)     .prn  \nspc800           cartridge        (cart)     .mx1  .bin  .rom  \nspc800           printout         (prin)     .prn  \nspc800           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nspec128          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nspec128          quickload        (quik)     .raw  .scr  \nspec128          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nspec80k          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nspec80k          quickload        (quik)     .raw  .scr  \nspec80k          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nspecfrce         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nspecfrceo        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nspecial          cassette         (cass)     .wav  .flac .rks  \nspecialm         cassette         (cass)     .wav  .flac .rks  \nspecialp         cassette         (cass)     .wav  .flac .rks  \nspecide          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nspecide          quickload        (quik)     .raw  .scr  \nspecide          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nspecimx          cassette         (cass)     .wav  .flac .rks  \nspecimx          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \nspecimx          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .odi  .cpm  .img  \nspecpl2a         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nspecpl2a         quickload        (quik)     .raw  .scr  \nspecpl2a         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nspecpl3e         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nspecpl3e         quickload        (quik)     .raw  .scr  \nspecpl3e         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nspecpl3e         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \nspecpls2         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nspecpls2         quickload        (quik)     .raw  .scr  \nspecpls2         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nspecpls3         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nspecpls3         quickload        (quik)     .raw  .scr  \nspecpls3         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nspecpls3         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ipf  \nspectred         floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nspectred         floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nspectred         cassette         (cass)     .wav  .flac \nspectrum         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nspectrum         quickload        (quik)     .raw  .scr  \nspectrum         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nspektr01         cassette         (cass)     .wav  .flac .rk   .rkr  .gam  .g16  .pki  \nspektrbk         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nspektrbk         quickload        (quik)     .raw  .scr  \nspektrbk         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nspkrbtl          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsprachmg         cartridge        (cart)     .bin  \nsprinter         snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nsprinter         quickload        (quik)     .raw  .scr  \nsprinter         cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nsprinter         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nsprinter         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsprinter         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nsprinter         harddisk3        (hard3)    .chd  .hd   .hdv  .2mg  .hdi  \nsprinter         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nsprinter         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nsprinter         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nsprinter         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \nsprtjam          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nspuzbobl         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nspuzboblj        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsq2              midiin           (min)      .mid  .syx  \nsq2              midiout          (mout)     .mid  \nsq2              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .hfe  \nsquale           printout         (prin)     .prn  \nsquale           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsquale           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsquale           cartridge        (cart)     .bin  \nsquizchs         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsr16             cassette         (cass)     .wav  .flac \nss2005           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nss2005o          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nssam88s          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nssam88s          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nssam88s          printout         (prin)     .prn  \nsscopefh         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsscopex          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsscopexu         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nssem             quickload        (quik)     .snp  .asm  \nssensor4         romimage         (rom)      .bin  \nsstarkar         cartridge        (cart)     .bin  \nst               floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nst               printout         (prin)     .prn  \nst               midiin           (min)      .mid  .syx  \nst               midiout          (mout)     .mid  \nst               romimage         (rom)      .bin  .rom  .stc  \nst_de            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nst_de            printout         (prin)     .prn  \nst_de            midiin           (min)      .mid  .syx  \nst_de            midiout          (mout)     .mid  \nst_de            romimage         (rom)      .bin  .rom  .stc  \nst_es            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nst_es            printout         (prin)     .prn  \nst_es            midiin           (min)      .mid  .syx  \nst_es            midiout          (mout)     .mid  \nst_es            romimage         (rom)      .bin  .rom  .stc  \nst_fr            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nst_fr            printout         (prin)     .prn  \nst_fr            midiin           (min)      .mid  .syx  \nst_fr            midiout          (mout)     .mid  \nst_fr            romimage         (rom)      .bin  .rom  .stc  \nst_nl            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nst_nl            printout         (prin)     .prn  \nst_nl            midiin           (min)      .mid  .syx  \nst_nl            midiout          (mout)     .mid  \nst_nl            romimage         (rom)      .bin  .rom  .stc  \nst_se            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nst_se            printout         (prin)     .prn  \nst_se            midiin           (min)      .mid  .syx  \nst_se            midiout          (mout)     .mid  \nst_se            romimage         (rom)      .bin  .rom  .stc  \nst_sg            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nst_sg            printout         (prin)     .prn  \nst_sg            midiin           (min)      .mid  .syx  \nst_sg            midiout          (mout)     .mid  \nst_sg            romimage         (rom)      .bin  .rom  .stc  \nst_uk            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nst_uk            printout         (prin)     .prn  \nst_uk            midiin           (min)      .mid  .syx  \nst_uk            midiout          (mout)     .mid  \nst_uk            romimage         (rom)      .bin  .rom  .stc  \nstarseek         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nstartrgn         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nste              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nste              printout         (prin)     .prn  \nste              midiin           (min)      .mid  .syx  \nste              midiout          (mout)     .mid  \nste              romimage         (rom)      .bin  .rom  .stc  \nste_de           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nste_de           printout         (prin)     .prn  \nste_de           midiin           (min)      .mid  .syx  \nste_de           midiout          (mout)     .mid  \nste_de           romimage         (rom)      .bin  .rom  .stc  \nste_es           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nste_es           printout         (prin)     .prn  \nste_es           midiin           (min)      .mid  .syx  \nste_es           midiout          (mout)     .mid  \nste_es           romimage         (rom)      .bin  .rom  .stc  \nste_fr           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nste_fr           printout         (prin)     .prn  \nste_fr           midiin           (min)      .mid  .syx  \nste_fr           midiout          (mout)     .mid  \nste_fr           romimage         (rom)      .bin  .rom  .stc  \nste_it           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nste_it           printout         (prin)     .prn  \nste_it           midiin           (min)      .mid  .syx  \nste_it           midiout          (mout)     .mid  \nste_it           romimage         (rom)      .bin  .rom  .stc  \nste_se           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nste_se           printout         (prin)     .prn  \nste_se           midiin           (min)      .mid  .syx  \nste_se           midiout          (mout)     .mid  \nste_se           romimage         (rom)      .bin  .rom  .stc  \nste_sg           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nste_sg           printout         (prin)     .prn  \nste_sg           midiin           (min)      .mid  .syx  \nste_sg           midiout          (mout)     .mid  \nste_sg           romimage         (rom)      .bin  .rom  .stc  \nste_uk           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \nste_uk           printout         (prin)     .prn  \nste_uk           midiin           (min)      .mid  .syx  \nste_uk           midiout          (mout)     .mid  \nste_uk           romimage         (rom)      .bin  .rom  .stc  \nstep3            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nstep3            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nstep3            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nstep3            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nstep3            printout         (prin)     .prn  \nstepone          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nstepone          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nstepone          floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nstepone          floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nstepone          printout         (prin)     .prn  \nstepstag         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nstepstag         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nstepstag         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nstepstag         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nstepstag         printout         (prin)     .prn  \nsto486wb         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsto486wb         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsto486wb         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsto486wb         printout         (prin)     .prn  \nstorio           cartridge        (cart)     .bin  \nstoriode         cartridge        (cart)     .bin  \nstorioes         cartridge        (cart)     .bin  \nstorioesa        cartridge        (cart)     .bin  \nstoriofr         cartridge        (cart)     .bin  \nstorionl         cartridge        (cart)     .bin  \nstratos          romimage         (rom)      .bin  \nstratosa         romimage         (rom)      .bin  \nstudio2          cartridge        (cart)     .st2  .bin  .rom  \nstvbios          cartridge1       (cart1)    .bin  \nstvbios          cartridge2       (cart2)    .bin  \nstvbios          cartridge3       (cart3)    .bin  \nstvbios          cartridge4       (cart4)    .bin  \nstyphp           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsugorotc         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsugorotca        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsugorotcb        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun3_110         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun3_110         tape             (tap)      .tap  \nsun3_110         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun3_150         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun3_150         tape             (tap)      .tap  \nsun3_150         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun3_260         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun3_260         tape             (tap)      .tap  \nsun3_260         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun3_50          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun3_50          tape             (tap)      .tap  \nsun3_50          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun3_60          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun3_60          tape             (tap)      .tap  \nsun3_60          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun3_80          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun3_80          tape             (tap)      .tap  \nsun3_80          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun3_80          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsun3_e           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun3_e           tape             (tap)      .tap  \nsun3_e           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun4_110         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsun4_110         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun4_110         tape             (tap)      .tap  \nsun4_110         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun4_20          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsun4_20          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun4_20          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun4_25          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsun4_25          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun4_25          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun4_300         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsun4_300         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun4_300         tape             (tap)      .tap  \nsun4_300         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun4_40          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsun4_40          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun4_40          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun4_400         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsun4_400         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun4_400         tape             (tap)      .tap  \nsun4_400         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun4_50          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsun4_50          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun4_50          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun4_60          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsun4_60          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun4_60          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun4_65          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsun4_65          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun4_65          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun4_75          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsun4_75          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun4_75          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun_s10          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsun_s10          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun_s10          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsun_s20          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nsun_s20          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsun_s20          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsuntac303        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsuntac303        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsuntac303        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsuntac6          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsuntac6          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsuntac6          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsuper6           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsuper80          printout         (prin)     .prn  \nsuper80          quickload        (quik)     .bin  \nsuper80          cassette         (cass)     .wav  .flac \nsuper80d         printout         (prin)     .prn  \nsuper80d         quickload        (quik)     .bin  \nsuper80d         cassette         (cass)     .wav  .flac \nsuper80e         printout         (prin)     .prn  \nsuper80e         quickload        (quik)     .bin  \nsuper80e         cassette         (cass)     .wav  .flac \nsuper80m         printout         (prin)     .prn  \nsuper80m         quickload        (quik)     .bin  \nsuper80m         cassette         (cass)     .wav  .flac \nsuper80r         printout         (prin)     .prn  \nsuper80r         quickload        (quik)     .bin  \nsuper80r         cassette         (cass)     .wav  .flac \nsuper80r         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsuper80r         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsuper80r         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsuper80r         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsuper80v         printout         (prin)     .prn  \nsuper80v         quickload        (quik)     .bin  \nsuper80v         cassette         (cass)     .wav  .flac \nsuper80v         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsuper80v         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsuper80v         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsuper80v         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsupergb          cartridge        (cart)     .bin  .gb   .gbc  .gbx  \nsupergb2         cartridge        (cart)     .bin  .gb   .gbc  .gbx  \nsuperpet         floppydisk1      (flop1)    .mfi  .dfi  .d80  \nsuperpet         floppydisk2      (flop2)    .mfi  .dfi  .d80  \nsuperpet         cassette         (cass)     .wav  .flac .tap  \nsuperpet         quickload        (quik)     .p00  .prg  \nsuperpet         cartridge1       (cart1)    .bin  .rom  \nsuperpet         cartridge2       (cart2)    .bin  .rom  \nsupracan         cartridge        (cart)     .bin  \nsuprtvpc         cartridge        (cart)     .bin  \nsuprtvpcdo       cartridge        (cart)     .bin  \nsuprtvpchk       cartridge        (cart)     .bin  \nsuprtvpcln       cartridge        (cart)     .bin  \nsusume           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nsv8000           cartridge        (cart)     .bin  \nsvi318           cassette         (cass)     .wav  .flac .cas  \nsvi318           cartridge        (cart)     .bin  .rom  \nsvi318n          cassette         (cass)     .wav  .flac .cas  \nsvi318n          cartridge        (cart)     .bin  .rom  \nsvi328           cassette         (cass)     .wav  .flac .cas  \nsvi328           cartridge        (cart)     .bin  .rom  \nsvi328n          cassette         (cass)     .wav  .flac .cas  \nsvi328n          cartridge        (cart)     .bin  .rom  \nsvi728           cartridge        (cart)     .mx1  .bin  .rom  \nsvi728           printout         (prin)     .prn  \nsvi728           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nsvi728es         cartridge        (cart)     .mx1  .bin  .rom  \nsvi728es         printout         (prin)     .prn  \nsvi728es         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nsvi738           cartridge        (cart)     .mx1  .bin  .rom  \nsvi738           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nsvi738           printout         (prin)     .prn  \nsvi738           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nsvi738ar         cartridge        (cart)     .mx1  .bin  .rom  \nsvi738ar         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nsvi738ar         printout         (prin)     .prn  \nsvi738ar         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nsvi738dk         cartridge        (cart)     .mx1  .bin  .rom  \nsvi738dk         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nsvi738dk         printout         (prin)     .prn  \nsvi738dk         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nsvi738pl         cartridge        (cart)     .mx1  .bin  .rom  \nsvi738pl         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nsvi738pl         printout         (prin)     .prn  \nsvi738pl         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nsvi738sp         cartridge        (cart)     .mx1  .bin  .rom  \nsvi738sp         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nsvi738sp         printout         (prin)     .prn  \nsvi738sp         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nsvi738sw         cartridge        (cart)     .mx1  .bin  .rom  \nsvi738sw         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nsvi738sw         printout         (prin)     .prn  \nsvi738sw         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nsvision          cartridge        (cart)     .bin  .ws   .sv   \nsvisionn         cartridge        (cart)     .bin  .ws   .sv   \nsvisionp         cartridge        (cart)     .bin  .ws   .sv   \nsvisions         cartridge        (cart)     .bin  .ws   .sv   \nsvmu             quickload        (quik)     .vms  .bin  \nswe1pb           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nswtpc            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nswtpc            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nswtpc            floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nswtpc            floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nswtpc09          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nswtpc09          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nswtpc09          floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nswtpc09          floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nswtpc09d3        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nswtpc09d3        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nswtpc09d3        floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nswtpc09d3        floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nswtpc09d3        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nswtpc09d3        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nswtpc09d3        harddisk3        (hard3)    .chd  .hd   .hdv  .2mg  .hdi  \nswtpc09d3        harddisk4        (hard4)    .chd  .hd   .hdv  .2mg  .hdi  \nswtpc09i         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nswtpc09i         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nswtpc09i         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nswtpc09i         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nswtpc09i         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nswtpc09o         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nswtpc09o         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nswtpc09o         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nswtpc09o         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nswtpc09u         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nswtpc09u         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nswtpc09u         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nswtpc09u         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dsk  \nswtpcm           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nswtpcm           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nswtpcm           floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nswtpcm           floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .os9  \nsx100            cartridge        (cart)     .mx1  .bin  .rom  \nsx100            printout         (prin)     .prn  \nsx100            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nsx16             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsx16             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsx16             printout         (prin)     .prn  \nsx64             cassette         (cass)     .wav  .flac .tap  \nsx64             floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nsx64             cartridge        (cart)     .80   .a0   .e0   .crt  \nsx64             quickload        (quik)     .p00  .prg  .t64  \nsx64p            cassette         (cass)     .wav  .flac .tap  \nsx64p            floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nsx64p            cartridge        (cart)     .80   .a0   .e0   .crt  \nsx64p            quickload        (quik)     .p00  .prg  .t64  \nsy012            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsy012            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsy012            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsy012            printout         (prin)     .prn  \nsy019hi          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsy019hi          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsy019hi          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsy019hi          printout         (prin)     .prn  \nsybaby386        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsybaby386        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nsybaby386        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nsybaby386        printout         (prin)     .prn  \nsym1             cassette         (cass)     .wav  .flac \nsys80            cassette         (cass)     .wav  .flac .cas  \nsys80            quickload        (quik)     .cmd  \nsys80            floppydisk1      (flop1)    .mfi  .dfi  .dmk  .jv1  .dsk  \nsys80            floppydisk2      (flop2)    .mfi  .dfi  .dmk  .jv1  .dsk  \nsys80            printout         (prin)     .prn  \nsys80p           cassette         (cass)     .wav  .flac .cas  \nsys80p           quickload        (quik)     .cmd  \nsys80p           floppydisk1      (flop1)    .mfi  .dfi  .dmk  .jv1  .dsk  \nsys80p           floppydisk2      (flop2)    .mfi  .dfi  .dmk  .jv1  .dsk  \nsys80p           printout         (prin)     .prn  \nsystel100        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nsz1              midiin           (min)      .mid  .syx  \nsz1              midiout          (mout)     .mid  \nsz1              cassette         (cass)     .wav  .flac \nsz1              cartridge        (cart)     .bin  \nt1000            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nt1000            printout         (prin)     .prn  \nt1000hx          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nt1000hx          printout         (prin)     .prn  \nt1000rl          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nt1000rl          printout         (prin)     .prn  \nt1000sl2         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nt1000sl2         printout         (prin)     .prn  \nt1000sx          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nt1000sx          printout         (prin)     .prn  \nt1000tl          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nt1000tl          printout         (prin)     .prn  \nt1000tl2         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nt1000tl2         printout         (prin)     .prn  \nt1000tx          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nt1000tx          printout         (prin)     .prn  \nt2000sx          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nt2000sx          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nt2000sx          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nt4000            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nt4000            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nt4000            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nt4000            printout         (prin)     .prn  \nt4426            cassette         (cass)     .wav  .flac .cas  \nt4426            printout         (prin)     .prn  \nt4426            cartridge        (cart)     .ccc  .rom  \nt4426            harddisk1        (hard1)    .vhd  \nt4426            harddisk2        (hard2)    .vhd  \nt9000            cassette         (cass)     .wav  .k7   \nt9000            cartridge        (cart)     .m7   .rom  \nta1700pc         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nta1700pc         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nta1700pc         printout         (prin)     .prn  \ntadpc200         cartridge        (cart)     .mx1  .bin  .rom  \ntadpc200         printout         (prin)     .prn  \ntadpc200         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ntadpc200a        cartridge        (cart)     .mx1  .bin  .rom  \ntadpc200a        printout         (prin)     .prn  \ntadpc200a        cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ntadpc200b        cartridge        (cart)     .mx1  .bin  .rom  \ntadpc200b        printout         (prin)     .prn  \ntadpc200b        cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ntaiko2           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntaiko3           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntaiko4           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntaiko5           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntaiko6           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntaikodp          cartridge        (cart)     .bin  .u1   \ntaikort          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntaitotz          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntak_daig         cartridge        (cart)     .bin  .u1   \ntakoron          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntam25p2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntam25p2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntam25p2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntam25p2          printout         (prin)     .prn  \ntam3340ma0       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntam3340ma0       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntam3340ma0       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntam3340ma0       printout         (prin)     .prn  \ntandy102         printout         (prin)     .prn  \ntandy102         cassette         (cass)     .wav  .flac \ntandy102         cartridge        (cart)     .bin  .rom  \ntandy200         printout         (prin)     .prn  \ntandy200         cassette         (cass)     .wav  .flac \ntandy200         cartridge        (cart)     .bin  .rom  \ntandy2k          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntandy2k          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntandy2k          printout         (prin)     .prn  \ntandy2khd        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntandy2khd        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntandy2khd        printout         (prin)     .prn  \ntandy2khd        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntanodr64         cassette         (cass)     .wav  .flac .cas  \ntanodr64         printout         (prin)     .prn  \ntanodr64         cartridge        (cart)     .ccc  .rom  \ntanodr64         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ntanodr64         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ntanodr64h        cassette         (cass)     .wav  .flac .cas  \ntanodr64h        printout         (prin)     .prn  \ntanodr64h        cartridge        (cart)     .ccc  .rom  \ntanodr64h        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ntanodr64h        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  .sdf  .jvc  .vdk  .os9  \ntbblue           quickload        (quik)     .raw  .scr  \ntbblue           cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ntbblue           harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ntbblue           harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ntbbympt3         cartridge        (cart)     .bin  \ntblkkuzug        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntc2048           snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ntc2048           quickload        (quik)     .raw  .scr  \ntc2048           cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ntc4              cartridge        (cart)     .bin  \ntccosmos         cartridge        (cart)     .bin  \ntcfboxa          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntd4ipaio         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntd4ipaio         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntd4ipaio         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntd4ipaio         printout         (prin)     .prn  \ntd60c            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntd60c            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntd60c            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntd70a            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntd70a            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntd70a            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntd70n            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntd70n            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntd70n            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntdv2324          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntdv2324          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntecjmon          cassette         (cass)     .wav  .flac \ntek4051          cartridge1       (cart1)    .bin  \ntek4051          cartridge2       (cart2)    .bin  \ntek4052a         cartridge1       (cart1)    .bin  \ntek4052a         cartridge2       (cart2)    .bin  \ntek4132          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntek4404          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntek4404          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntek6130          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntek6130          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntelefevr         cartridge        (cart)     .bin  \ntelestry         cartridge        (cart)     .bin  \ntelngtcs         quickload        (quik)     .pgm  .tvc  \ntelngtcs         cartridge        (cart)     .bin  .rom  \ntelstrat         printout         (prin)     .prn  \ntelstrat         cassette         (cass)     .wav  .flac .tap  \ntelstrat         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntempestm         cartridge        (cart)     .bin  \ntenthdeg         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ntenthdeg         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntenthdeg         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ntenthdeg         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntenup            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nteradrive        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nteradrive        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nteradrive        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nteradrive        printout         (prin)     .prn  \nteradrive        cartridge        (cart)     .smd  .bin  .md   .gen  \nteradrive3       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nteradrive3       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nteradrive3       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nteradrive3       printout         (prin)     .prn  \nteradrive3       cartridge        (cart)     .smd  .bin  .md   .gen  \ntesa6240         cassette         (cass)     .wav  .flac .tap  \ntesa6240         floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \ntesa6240         cartridge        (cart)     .80   .a0   .e0   .crt  \ntesa6240         quickload        (quik)     .p00  .prg  .t64  \ntetkiwam         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntfupdate         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntg16             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntg16             cartridge        (cart)     .pce  .bin  \nthenanpa         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nthrild2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nthrild2a         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nthrild2c         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nthrild2j         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nti74             cartridge        (cart)     .bin  .rom  .256  \nti74a            cartridge        (cart)     .bin  .rom  .256  \nti95             cartridge        (cart)     .bin  .rom  .256  \nti990_10         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nti990_10         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nti990_10         harddisk3        (hard3)    .chd  .hd   .hdv  .2mg  .hdi  \nti990_10         harddisk4        (hard4)    .chd  .hd   .hdv  .2mg  .hdi  \nti990_10         magtape1         (mtap1)    .tap  \nti990_10         magtape2         (mtap2)    .tap  \nti990_10         magtape3         (mtap3)    .tap  \nti990_10         magtape4         (mtap4)    .tap  \nti99_224         cassette         (cass)     .wav  .flac \nti99_232         cassette         (cass)     .wav  .flac \nti99_4           cartridge        (cart)     .rpk  \nti99_4           cassette1        (cass1)    .wav  .flac \nti99_4           cassette2        (cass2)    .wav  .flac \nti99_4a          cartridge        (cart)     .rpk  \nti99_4a          cassette1        (cass1)    .wav  .flac \nti99_4a          cassette2        (cass2)    .wav  .flac \nti99_4ae         cartridge        (cart)     .rpk  \nti99_4ae         cassette1        (cass1)    .wav  .flac \nti99_4ae         cassette2        (cass2)    .wav  .flac \nti99_4e          cartridge        (cart)     .rpk  \nti99_4e          cassette1        (cass1)    .wav  .flac \nti99_4e          cassette2        (cass2)    .wav  .flac \nti99_4ev         cartridge        (cart)     .rpk  \nti99_4ev         cassette1        (cass1)    .wav  .flac \nti99_4ev         cassette2        (cass2)    .wav  .flac \nti99_4p          cassette         (cass)     .wav  .flac \nti99_4qi         cartridge        (cart)     .rpk  \nti99_4qi         cassette1        (cass1)    .wav  .flac \nti99_4qi         cassette2        (cass2)    .wav  .flac \nti99_8           cartridge        (cart)     .rpk  \nti99_8           cassette         (cass)     .wav  .flac \nti99_8e          cartridge        (cart)     .rpk  \nti99_8e          cassette         (cass)     .wav  .flac \ntijkpots         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntiki100          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \ntiki100          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \ntiki100          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntiki100          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntiki100          printout         (prin)     .prn  \ntiki100          cassette         (cass)     .wav  .flac \ntim011           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \ntimetp25         cartridge        (cart)     .bin  \ntk2000           cassette         (cass)     .wav  .flac \ntk3000           floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \ntk3000           floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \ntk3000           cassette         (cass)     .wav  .flac \ntk85             cassette         (cass)     .wav  .flac .p    .81   .tzx  \ntk90x            snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ntk90x            quickload        (quik)     .raw  .scr  \ntk90x            cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ntk95             snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ntk95             quickload        (quik)     .raw  .scr  \ntk95             cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ntking            romimage         (rom)      .bin  \ntkinga           romimage         (rom)      .bin  \ntkingb           romimage         (rom)      .bin  \ntkn80            cassette         (cass)     .wav  .flac \ntkn80            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \ntkn80            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \ntkn80            romimage1        (rom1)     .bin  \ntkn80            romimage2        (rom2)     .bin  \ntkn80            romimage3        (rom3)     .bin  \ntkn80            romimage4        (rom4)     .bin  \ntkn80            quickload        (quik)     .bac  \ntmc1800          quickload        (quik)     .bin  \ntmc1800          cassette         (cass)     .wav  .flac \ntmc2000          quickload        (quik)     .bin  \ntmc2000          cassette         (cass)     .wav  .flac \ntmc2000e         cassette         (cass)     .wav  .flac \ntmc600s2         printout         (prin)     .prn  \ntmc600s2         cassette         (cass)     .wav  .flac \ntmc600s2         quickload        (quik)     .tmc600\ntmosh            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntmoshs           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntmoshsp          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntmoshspa         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntmpat48av        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntmpat48av        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntmpat48av        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntmpat48av        printout         (prin)     .prn  \ntmpat48pg4       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntmpat48pg4       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntmpat48pg4       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntmpat48pg4       printout         (prin)     .prn  \ntntell           cartridge        (cart)     .vsm  .bin  \ntntellfr         cartridge        (cart)     .vsm  .bin  \ntntellp          cartridge        (cart)     .vsm  .bin  \ntntelluk         cartridge        (cart)     .vsm  .bin  \nto16             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nto16             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nto16             printout         (prin)     .prn  \nto7              cassette         (cass)     .wav  .k7   \nto7              cartridge        (cart)     .m7   .rom  \nto770            cassette         (cass)     .wav  .k7   \nto770            cartridge        (cart)     .m7   .rom  \nto770a           cassette         (cass)     .wav  .k7   \nto770a           cartridge        (cart)     .m7   .rom  \nto8              cassette         (cass)     .wav  .k7   \nto8              cartridge        (cart)     .m7   .rom  \nto8              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .fd   .sap  \nto8              printout         (prin)     .prn  \nto8d             cassette         (cass)     .wav  .k7   \nto8d             cartridge        (cart)     .m7   .rom  \nto8d             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .fd   .sap  \nto8d             printout         (prin)     .prn  \nto9              cassette         (cass)     .wav  .k7   \nto9              cartridge        (cart)     .m7   .rom  \nto9              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .fd   .sap  \nto9              printout         (prin)     .prn  \nto9p             cassette         (cass)     .wav  .k7   \nto9p             cartridge        (cart)     .m7   .rom  \nto9p             floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .fd   .sap  \nto9p             printout         (prin)     .prn  \ntonto            microtape1       (utap1)    .mdv  .mdr  \ntonto            microtape2       (utap2)    .mdv  .mdr  \ntonto            cartridge        (cart)     .rom  .bin  \ntoptek286        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntoptek286        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntoptek286        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntorarech         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntorch301         cassette         (cass)     .wav  .flac .csw  .uef  \ntorch301         romimage1        (rom1)     .rom  .bin  \ntorch301         romimage2        (rom2)     .rom  .bin  \ntorch301         romimage3        (rom3)     .rom  .bin  \ntorch301         romimage4        (rom4)     .rom  .bin  \ntorch301         romimage5        (rom5)     .bin  .rom  \ntorch301         printout         (prin)     .prn  \ntorch301         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \ntorch301         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \ntorch301         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntorch725         cassette         (cass)     .wav  .flac .csw  .uef  \ntorch725         romimage1        (rom1)     .rom  .bin  \ntorch725         romimage2        (rom2)     .rom  .bin  \ntorch725         romimage3        (rom3)     .rom  .bin  \ntorch725         romimage4        (rom4)     .rom  .bin  \ntorch725         romimage5        (rom5)     .bin  .rom  \ntorch725         printout         (prin)     .prn  \ntorch725         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \ntorch725         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \ntorch725         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntorchf           cassette         (cass)     .wav  .flac .csw  .uef  \ntorchf           romimage1        (rom1)     .rom  .bin  \ntorchf           romimage2        (rom2)     .rom  .bin  \ntorchf           romimage3        (rom3)     .rom  .bin  \ntorchf           romimage4        (rom4)     .rom  .bin  \ntorchf           romimage5        (rom5)     .bin  .rom  \ntorchf           printout         (prin)     .prn  \ntorchf           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \ntorchf           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \ntorchh           cassette         (cass)     .wav  .flac .csw  .uef  \ntorchh           romimage1        (rom1)     .rom  .bin  \ntorchh           romimage2        (rom2)     .rom  .bin  \ntorchh           romimage3        (rom3)     .rom  .bin  \ntorchh           romimage4        (rom4)     .rom  .bin  \ntorchh           romimage5        (rom5)     .bin  .rom  \ntorchh           printout         (prin)     .prn  \ntorchh           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \ntorchh           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .ssd  .bbc  .dsd  .adf  .ads  .adm  .adl  .fsd  \ntorchh           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntosh1000         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntosh1000         printout         (prin)     .prn  \ntot3200sxc       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntot3200sxc       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntot3200sxc       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntotlvica         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntotlvice         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntotlvicj         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntotlvicu         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntourvis          cartridge        (cart)     .bin  \ntower386sx       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntower386sx       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntower386sx       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntowerat2xx       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntowerat2xx       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntowerat2xx       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntpad600e         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntpad600e         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntpad600e         printout         (prin)     .prn  \ntpc310           cartridge        (cart)     .mx1  .bin  .rom  \ntpc310           printout         (prin)     .prn  \ntpc310           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ntpp311           printout         (prin)     .prn  \ntpp311           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ntps312           cartridge        (cart)     .mx1  .bin  .rom  \ntps312           printout         (prin)     .prn  \ntps312           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ntr707            midiin           (min)      .mid  .syx  \ntr707            midiout          (mout)     .mid  \ntr707            cartridge        (cart)     .m64c_cart\ntr727            midiin           (min)      .mid  .syx  \ntr727            midiout          (mout)     .mid  \ntr727            cartridge        (cart)     .m64c_cart\ntr909            cartridge        (cart)     .bin  \ntrakcvg          cartridge        (cart)     .bin  \ntreasurh         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntreasurh         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntrgheart         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntrghearto        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntriplex          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntriplex          printout         (prin)     .prn  \ntriton41         cassette         (cass)     .wav  .flac \ntriton41         romimage1        (rom1)     .rom  .bin  \ntriton41         romimage2        (rom2)     .rom  .bin  \ntriton41         printout         (prin)     .prn  \ntriton51         cassette         (cass)     .wav  .flac \ntriton51         romimage1        (rom1)     .rom  .bin  \ntriton51         romimage2        (rom2)     .rom  .bin  \ntriton51         printout         (prin)     .prn  \ntriton52         cassette         (cass)     .wav  .flac \ntriton52         romimage1        (rom1)     .rom  .bin  \ntriton52         romimage2        (rom2)     .rom  .bin  \ntriton52         printout         (prin)     .prn  \ntriton72         cassette         (cass)     .wav  .flac \ntriton72         romimage1        (rom1)     .rom  .bin  \ntriton72         romimage2        (rom2)     .rom  .bin  \ntriton72         printout         (prin)     .prn  \ntrizeal          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntropchnc         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntrs80            cassette         (cass)     .wav  .flac .cas  \ntrs80l2          cassette         (cass)     .wav  .flac .cas  \ntrs80l2          quickload        (quik)     .cmd  \ntrs80l2          floppydisk1      (flop1)    .mfi  .dfi  .dmk  .jv1  .dsk  \ntrs80l2          floppydisk2      (flop2)    .mfi  .dfi  .dmk  .jv1  .dsk  \ntrs80l2          printout         (prin)     .prn  \ntrs80m16         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntrs80m16         printout         (prin)     .prn  \ntrs80m2          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntrs80m2          printout         (prin)     .prn  \ntrs80m3          cassette         (cass)     .wav  .flac .cas  \ntrs80m3          quickload        (quik)     .cmd  \ntrs80m3          floppydisk1      (flop1)    .mfi  .dfi  .imd  .jv3  .dsk  .dmk  .jv1  \ntrs80m3          floppydisk2      (flop2)    .mfi  .dfi  .imd  .jv3  .dsk  .dmk  .jv1  \ntrs80m3          printout         (prin)     .prn  \ntrs80m4          cassette         (cass)     .wav  .flac .cas  \ntrs80m4          floppydisk1      (flop1)    .mfi  .dfi  .imd  .jv3  .dsk  .dmk  .jv1  \ntrs80m4          floppydisk2      (flop2)    .mfi  .dfi  .imd  .jv3  .dsk  .dmk  .jv1  \ntrs80m4          printout         (prin)     .prn  \ntrs80m4p         floppydisk1      (flop1)    .mfi  .dfi  .imd  .jv3  .dsk  .dmk  .jv1  \ntrs80m4p         floppydisk2      (flop2)    .mfi  .dfi  .imd  .jv3  .dsk  .dmk  .jv1  \ntrs80m4p         printout         (prin)     .prn  \ntrsm100          printout         (prin)     .prn  \ntrsm100          cassette         (cass)     .wav  .flac \ntrsm100          cartridge        (cart)     .bin  .rom  \ntruckk           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntryomvgc         cartridge        (cart)     .bin  \nts1000           cassette         (cass)     .wav  .flac .p    .81   .tzx  \nts1500           cassette         (cass)     .wav  .flac .p    .81   .tzx  \nts2068           snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nts2068           quickload        (quik)     .raw  .scr  \nts2068           cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nts2068           cartridge        (cart)     .dck  .bin  \nts34t25          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nts34t25          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nts34t25          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nts34t25          printout         (prin)     .prn  \nts802            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nts802h           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nts803h           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nts803h           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntsconf           snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ntsconf           quickload        (quik)     .raw  .scr  \ntsconf           cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ntsconf           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntsconf           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \ntsconf           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \ntsconf           floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \ntsconf           floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \ntsconf2          snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \ntsconf2          quickload        (quik)     .raw  .scr  \ntsconf2          cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \ntsconf2          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntsconf2          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \ntsconf2          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \ntsconf2          floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \ntsconf2          floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .trd  \ntstar432         romimage         (rom)      .bin  \ntstar432a        romimage         (rom)      .bin  \ntstar432b        romimage         (rom)      .bin  \ntsurugi          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntsurugij         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntsuwaku          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \ntt030            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \ntt030            printout         (prin)     .prn  \ntt030            midiin           (min)      .mid  .syx  \ntt030            midiout          (mout)     .mid  \ntt030            romimage         (rom)      .bin  .rom  .stc  \ntt030_de         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \ntt030_de         printout         (prin)     .prn  \ntt030_de         midiin           (min)      .mid  .syx  \ntt030_de         midiout          (mout)     .mid  \ntt030_de         romimage         (rom)      .bin  .rom  .stc  \ntt030_fr         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \ntt030_fr         printout         (prin)     .prn  \ntt030_fr         midiin           (min)      .mid  .syx  \ntt030_fr         midiout          (mout)     .mid  \ntt030_fr         romimage         (rom)      .bin  .rom  .stc  \ntt030_pl         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \ntt030_pl         printout         (prin)     .prn  \ntt030_pl         midiin           (min)      .mid  .syx  \ntt030_pl         midiout          (mout)     .mid  \ntt030_pl         romimage         (rom)      .bin  .rom  .stc  \ntt030_uk         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .st   .msa  .stx  .ipf  \ntt030_uk         printout         (prin)     .prn  \ntt030_uk         midiin           (min)      .mid  .syx  \ntt030_uk         midiout          (mout)     .mid  \ntt030_uk         romimage         (rom)      .bin  .rom  .stc  \nttrail           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nttwistbq         cartridge        (cart)     .bin  \nttwistfb         cartridge        (cart)     .bin  \nttwistm          cartridge        (cart)     .bin  \nttwistsp         cartridge        (cart)     .bin  \nttwistvc         cartridge        (cart)     .bin  \ntulip1           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntulip1           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \ntunixha          cartridge        (cart)     .bin  \nturboex          cartridge        (cart)     .bin  \nturfwld3         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nturrett          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntutor            printout         (prin)     .prn  \ntutor            cassette         (cass)     .wav  .flac \ntutor            cartridge        (cart)     .bin  \ntvc4000          quickload        (quik)     .pgm  .tvc  \ntvc4000          cartridge        (cart)     .bin  .rom  \ntvc64            printout         (prin)     .prn  \ntvc64            cartridge        (cart)     .bin  .rom  .crt  \ntvc64            cassette         (cass)     .wav  .flac .cas  \ntvc64            quickload        (quik)     .cas  \ntvc64p           printout         (prin)     .prn  \ntvc64p           cartridge        (cart)     .bin  .rom  .crt  \ntvc64p           cassette         (cass)     .wav  .flac .cas  \ntvc64p           quickload        (quik)     .cas  \ntvc64pru         printout         (prin)     .prn  \ntvc64pru         cartridge        (cart)     .bin  .rom  .crt  \ntvc64pru         cassette         (cass)     .wav  .flac .cas  \ntvc64pru         quickload        (quik)     .cas  \ntvdear           cartridge        (cart)     .bin  \ntvg2000          cartridge        (cart)     .bin  \ntvgogo           cartridge        (cart)     .bin  \ntvlinkp          cartridge        (cart)     .bin  .ws   .sv   \ntwinnet          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntwinnet          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \ntwinnet          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ntx8000           snapshot         (dump)     .vz   \ntx8000           cassette         (cass)     .wav  .flac .cas  \nu3911v3          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nu3911v3          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nu3911v3          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nuchroma68        cassette         (cass)     .wav  .flac \nucv102           cartridge        (cart)     .mx1  .bin  .rom  \nucv102           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nucv102           printout         (prin)     .prn  \nujlnow           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nuk101            cassette         (cass)     .wav  .flac \nuk2086           snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nuk2086           quickload        (quik)     .raw  .scr  \nuk2086           cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nuk2086           cartridge        (cart)     .dck  .bin  \nuknc             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .bkd  \nuknc             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .bkd  \nuknc             floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .bkd  \nuknc             floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .bkd  \nuknc             cassette         (cass)     .wav  .flac \num486            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num486            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num486            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \num486            printout         (prin)     .prn  \num486v           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num486v           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num486v           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \num486v           printout         (prin)     .prn  \num82c481af       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num82c481af       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num82c481af       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \num82c481af       printout         (prin)     .prn  \num82c491f        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num82c491f        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num82c491f        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \num82c491f        printout         (prin)     .prn  \num82c493f        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num82c493f        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num82c493f        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \num82c493f        printout         (prin)     .prn  \num8498f          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num8498f          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num8498f          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \num8498f          printout         (prin)     .prn  \num8810paio       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num8810paio       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num8810paio       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \num8810paio       printout         (prin)     .prn  \num8886           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num8886           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \num8886           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \num8886           printout         (prin)     .prn  \nundefeat         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nunga             cassette         (cass)     .wav  .flac .rks  \nuni386w          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nuni386w          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nuni386w          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nuni386w          printout         (prin)     .prn  \nuni4800          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nuni4800          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nuni4800          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nuni4800          printout         (prin)     .prn  \nuniap2en         floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nuniap2en         floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nuniap2en         cassette         (cass)     .wav  .flac \nuniap2pt         floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nuniap2pt         floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nuniap2pt         cassette         (cass)     .wav  .flac \nunichamp         cartridge        (cart)     .bin  .rom  \nunior            cassette         (cass)     .wav  .flac \nunitron          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nunitron          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nuniwb4407        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nuniwb4407        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nuniwb4407        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nuniwb4407        printout         (prin)     .prn  \nusagi            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nusagiym          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nut88             cassette         (cass)     .wav  .flac .rku  \nut88mini         cassette         (cass)     .wav  .flac .rku  \nutrn1024         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nutrn1024         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .dc42 .woz  .moof .2mg  \nutrn1024         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nutrn1024         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nuzebox           cartridge        (cart)     .bin  .uze  \nv1050            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nv1050            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nv1050            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nv1050            printout         (prin)     .prn  \nv286c            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nv286c            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nv286c            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nv364             cassette         (cass)     .wav  .flac .tap  \nv364             floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nv364             cartridge        (cart)     .rom  .bin  \nv364             quickload        (quik)     .p00  .prg  \nv4p895p3         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nv4p895p3         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nv4p895p3         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nv4p895p3         printout         (prin)     .prn  \nv6809            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nv6809            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nvaportrx         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nvaportrx         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvaportrx         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nvaportrx         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvaportrxp        harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nvaportrxp        cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvaportrxp        harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nvaportrxp        cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvathlete         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvax785           floppydisk1      (flop1)    .img  .fdi  .td0  .imd  .cqm  .dsk  .d77  .d88  .1dd  \nvax785           floppydisk2      (flop2)    .img  .fdi  .td0  .imd  .cqm  .dsk  .d77  .d88  .1dd  \nvbaby            cartridge        (cart)     .bin  \nvboy             cartridge        (cart)     .vb   .bin  \nvc4000           quickload        (quik)     .pgm  .tvc  \nvc4000           cartridge        (cart)     .bin  .rom  \nvc6000           quickload        (quik)     .pgm  .tvc  \nvc6000           cartridge        (cart)     .bin  .rom  \nvcircle          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nvcop3            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvcop3a           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvdmaster         cartridge        (cart)     .bin  \nvec1200          cassette         (cass)     .wav  .flac \nvec1200          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .fdd  \nvec1200          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .fdd  \nvec1200          cartridge        (cart)     .bin  .emr  \nvector06         cassette         (cass)     .wav  .flac \nvector06         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .fdd  \nvector06         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .fdd  \nvector06         cartridge        (cart)     .bin  .emr  \nvector1          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nvector1          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nvector4          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .vgi  \nvector4          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .vgi  \nvector4          floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .vgi  \nvector4          floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .vgi  \nvectrex          cartridge        (cart)     .bin  .gam  .vec  \nvesta            cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvf4              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvf4b             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvf4evo           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvf4evoa          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvf4evob          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvf4o             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvf4tuned         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvf4tuneda        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvf4tunedd        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvfx              midiin           (min)      .mid  .syx  \nvfx              midiout          (mout)     .mid  \nvfx              cartridge        (cart)     .rom  .cart .eeprom.sc32 \nvfxsd            midiin           (min)      .mid  .syx  \nvfxsd            midiout          (mout)     .mid  \nvfxsd            cartridge        (cart)     .rom  .cart .eeprom.sc32 \nvfxsd            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  .hfe  \nvg5k             cassette         (cass)     .wav  .flac .k7   \nvg5k             printout         (prin)     .prn  \nvg8000           cartridge1       (cart1)    .mx1  .bin  .rom  \nvg8000           cartridge2       (cart2)    .mx1  .bin  .rom  \nvg8000           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvg8010           cartridge1       (cart1)    .mx1  .bin  .rom  \nvg8010           cartridge2       (cart2)    .mx1  .bin  .rom  \nvg8010           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvg8010f          cartridge1       (cart1)    .mx1  .bin  .rom  \nvg8010f          cartridge2       (cart2)    .mx1  .bin  .rom  \nvg8010f          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvg802000         cartridge1       (cart1)    .mx1  .bin  .rom  \nvg802000         cartridge2       (cart2)    .mx1  .bin  .rom  \nvg802000         printout         (prin)     .prn  \nvg802000         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvg802020         cartridge1       (cart1)    .mx1  .bin  .rom  \nvg802020         cartridge2       (cart2)    .mx1  .bin  .rom  \nvg802020         printout         (prin)     .prn  \nvg802020         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvg8020f          cartridge1       (cart1)    .mx1  .bin  .rom  \nvg8020f          cartridge2       (cart2)    .mx1  .bin  .rom  \nvg8020f          printout         (prin)     .prn  \nvg8020f          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvg8230           cartridge1       (cart1)    .mx1  .bin  .rom  \nvg8230           cartridge2       (cart2)    .mx1  .bin  .rom  \nvg8230           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nvg8230           printout         (prin)     .prn  \nvg8230           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvg8235           cartridge1       (cart1)    .mx1  .bin  .rom  \nvg8235           cartridge2       (cart2)    .mx1  .bin  .rom  \nvg8235           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nvg8235           printout         (prin)     .prn  \nvg8235           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvg8235f          cartridge1       (cart1)    .mx1  .bin  .rom  \nvg8235f          cartridge2       (cart2)    .mx1  .bin  .rom  \nvg8235f          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nvg8235f          printout         (prin)     .prn  \nvg8235f          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvg8240           cartridge1       (cart1)    .mx1  .bin  .rom  \nvg8240           cartridge2       (cart2)    .mx1  .bin  .rom  \nvg8240           floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nvg8240           printout         (prin)     .prn  \nvg8240           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvgmplay          quickload        (quik)     .vgm  .vgz  \nvia4386vio       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nvia4386vio       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nvia4386vio       harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nvia4386vio       printout         (prin)     .prn  \nvic10            cassette         (cass)     .wav  .flac .tap  \nvic10            cartridge        (cart)     .80   .e0   \nvic1001          cartridge        (cart)     .20   .40   .60   .70   .a0   .b0   .crt  \nvic1001          cassette         (cass)     .wav  .flac .tap  \nvic1001          floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nvic1001          quickload        (quik)     .p00  .prg  \nvic20            cartridge        (cart)     .20   .40   .60   .70   .a0   .b0   .crt  \nvic20            cassette         (cass)     .wav  .flac .tap  \nvic20            floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nvic20            quickload        (quik)     .p00  .prg  \nvic20_se         cartridge        (cart)     .20   .40   .60   .70   .a0   .b0   .crt  \nvic20_se         cassette         (cass)     .wav  .flac .tap  \nvic20_se         floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nvic20_se         quickload        (quik)     .p00  .prg  \nvic20p           cartridge        (cart)     .20   .40   .60   .70   .a0   .b0   .crt  \nvic20p           cassette         (cass)     .wav  .flac .tap  \nvic20p           floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nvic20p           quickload        (quik)     .p00  .prg  \nvicthc80         cartridge1       (cart1)    .mx1  .bin  .rom  \nvicthc80         cartridge2       (cart2)    .mx1  .bin  .rom  \nvicthc80         printout         (prin)     .prn  \nvicthc80         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvicthc90         cartridge        (cart)     .mx1  .bin  .rom  \nvicthc90         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nvicthc90         printout         (prin)     .prn  \nvicthc90         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvicthc90a        cartridge        (cart)     .mx1  .bin  .rom  \nvicthc90a        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nvicthc90a        printout         (prin)     .prn  \nvicthc90a        cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvicthc95         cartridge        (cart)     .mx1  .bin  .rom  \nvicthc95         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nvicthc95         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nvicthc95         printout         (prin)     .prn  \nvicthc95         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvicthc95a        cartridge        (cart)     .mx1  .bin  .rom  \nvicthc95a        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nvicthc95a        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \nvicthc95a        printout         (prin)     .prn  \nvicthc95a        cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nvictor           cassette         (cass)     .wav  .flac .k7   .cin  .for  \nvictor           printout         (prin)     .prn  \nvictor9k         printout         (prin)     .prn  \nvictor9k         floppydisk1      (flop1)    .mfi  .dfi  .img  \nvictor9k         floppydisk2      (flop2)    .mfi  .dfi  .img  \nvictor9k         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nvidbrain         cartridge        (cart)     .bin  \nvideoart         cartridge        (cart)     .bin  \nvideopac         cartridge        (cart)     .bin  .rom  \nvideopacf        cartridge        (cart)     .bin  .rom  \nvideopacp        cartridge        (cart)     .bin  .rom  \nvii              cartridge        (cart)     .bin  \nvip              quickload        (quik)     .bin  .c8   \nvip              cassette         (cass)     .wav  .flac \nvip64            cassette         (cass)     .wav  .flac .tap  \nvip64            floppydisk       (flop)     .mfi  .dfi  .d64  .g64  .g41  .g71  \nvip64            cartridge        (cart)     .80   .a0   .e0   .crt  \nvip64            quickload        (quik)     .p00  .prg  .t64  \nvirtpool         harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nvirtpool         cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvirtpool         harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nvirtpool         cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvis              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvis              memcard          (memc)     .bin  \nvisicom          cartridge        (cart)     .bin  .rom  \nvixen            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nvixen            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nvjdash           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nvjdash           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvjdash           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nvjdash           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nvjdash           printout         (prin)     .prn  \nvjdasha          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nvjdasha          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvjdasha          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nvjdasha          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nvjdasha          printout         (prin)     .prn  \nvjslap           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nvjslap           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvjslap           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nvjslap           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nvjslap           printout         (prin)     .prn  \nvl1              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nvlsi5            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nvlsi5            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nvlsi5            harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nvmdtbase         quickload        (quik)     .pgm  .tvc  \nvmdtbase         cartridge        (cart)     .bin  .rom  \nvp111            quickload        (quik)     .bin  .c8   \nvp111            cassette         (cass)     .wav  .flac \nvpcii            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nvpcii            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nvpcii            printout         (prin)     .prn  \nvreader          cartridge        (cart)     .bin  \nvreadercaen      cartridge        (cart)     .bin  \nvreadercafr      cartridge        (cart)     .bin  \nvs2002ex         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvs2002j          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvs2002t3         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvs4              cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvs42006          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvs42006b         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvs42k6ex         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvs4e             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvs4eo            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvs4j             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvs4jc            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvs4o             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvsaturn          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvsaturn          cartridge        (cart)     .bin  \nvsmile           cartridge        (cart)     .u1   .u3   .bin  \nvsmileb          cartridge        (cart)     .u1   .u3   .bin  \nvsmilebf         cartridge        (cart)     .u1   .u3   .bin  \nvsmilebfp        cartridge        (cart)     .u1   .u3   .bin  \nvsmilebg         cartridge        (cart)     .u1   .u3   .bin  \nvsmilebs         cartridge        (cart)     .u1   .u3   .bin  \nvsmilebsw        cartridge        (cart)     .u1   .u3   .bin  \nvsmilem          cartridge        (cart)     .u1   .u3   .bin  \nvsmilpro         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvstrik3          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvtennis2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvtennisg         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nvz200            snapshot         (dump)     .vz   \nvz200            cassette         (cass)     .wav  .flac .cas  \nvz2000           cassette         (cass)     .wav  .flac \nvz2000           printout         (prin)     .prn  \nvz2000           cartridge        (cart)     .bin  .rom  \nvz200de          snapshot         (dump)     .vz   \nvz200de          cassette         (cass)     .wav  .flac .cas  \nvz300            snapshot         (dump)     .vz   \nvz300            cassette         (cass)     .wav  .flac .cas  \nw30              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .out  .w30  \nwalk386dx        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nwalk386dx        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nwalk386dx        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nwalk386dx        printout         (prin)     .prn  \nwalk386sx        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nwalk386sx        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nwalk386sx        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nwangmid          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwangmid2         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwangmid2j        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwangmid2ja       cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwangmid2o        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwangmidj         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwangpc           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nwangpc           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nwangpc           printout         (prin)     .prn  \nwarfa            harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nwarfa            cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwarfa            harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nwarfa            cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwarfaa           harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nwarfaa           cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwarfaa           harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nwarfaa           cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwarfab           harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nwarfab           cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwarfab           harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nwarfab           cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwargods          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nwargodsa         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nwargodsb         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nwarzard          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwarzardr1        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwaveterm         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .wta  \nwaveterm         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .wta  \nwccf116          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwccf1dup         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwccf212e         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwccf234j         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwccf2chk         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwccf310j         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwccf322e         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwccf331e         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwccf331j         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwccf341j         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwccf400j         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwccf420e         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwcombat          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nwcombatj         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nwcombatk         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nwcombatu         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nweddingr         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwg3dh            harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nwg3dh            cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwg3dh            harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nwg3dh            cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwg3dhfe          harddisk1        (hard1)    .chd  .hd   .hdv  .2mg  .hdi  \nwg3dhfe          cdrom1           (cdrm1)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwg3dhfe          harddisk2        (hard2)    .chd  .hd   .hdv  .2mg  .hdi  \nwg3dhfe          cdrom2           (cdrm2)    .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwicat            floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nwizzard          cassette         (cass)     .wav  .flac \nwizzard          printout         (prin)     .prn  \nwizzard          cartridge        (cart)     .bin  .rom  \nwmbullet         floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nwmbullet         printout         (prin)     .prn  \nwmbulletf        floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nwmbulletf        printout         (prin)     .prn  \nwmbulletf        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nwmega            cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwmegam2          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwontame          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nwpc250           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nwpc250           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nwpc250           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nwren             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .hfe  .img  \nwren             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .hfe  .img  \nwsbbgd           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nwscolor          cartridge        (cart)     .ws   .wsc  .bin  \nwswan            cartridge        (cart)     .ws   .wsc  .bin  \nwy220001         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nwy220001         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nwy220001         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nx07              printout         (prin)     .prn  \nx07              cartridge        (cart)     .rom  .bin  \nx07              cassette         (cass)     .wav  .flac .k7   .lst  .cas  \nx1               floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1               floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1               floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1               floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1               cartridge        (cart)     .bin  .rom  \nx1               cassette         (cass)     .wav  .flac .tap  \nx168             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nx168             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nx168             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nx168             quickload        (quik)     .com  .cpm  \nx1turbo          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1turbo          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1turbo          floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1turbo          floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1turbo          cartridge        (cart)     .bin  .rom  \nx1turbo          cassette         (cass)     .wav  .flac .tap  \nx1turbo40        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1turbo40        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1turbo40        floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1turbo40        floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1turbo40        cartridge        (cart)     .bin  .rom  \nx1turbo40        cassette         (cass)     .wav  .flac .tap  \nx1twin           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1twin           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1twin           floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1twin           floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .2d   \nx1twin           cartridge        (cart)     .bin  .rom  \nx1twin           cassette         (cass)     .wav  .flac .tap  \nx37              floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .img  \nx37              harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nx68000           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68000           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68000           floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68000           floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68000           sasihd           (sasi)     .hdf  \nx68030           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68030           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68030           floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68030           floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68030           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nx68030           cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nx68ksupr         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68ksupr         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68ksupr         floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68ksupr         floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68ksupr         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nx68ksupr         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nx68kxvi          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68kxvi          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68kxvi          floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68kxvi          floppydisk4      (flop4)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .xdf  .hdm  .2hd  .dim  \nx68kxvi          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nx68kxvi          cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nx820             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nx820             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nx820             quickload        (quik)     .com  .cpm  \nx820ii           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nx820ii           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nx820ii           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nx820ii           quickload        (quik)     .com  .cpm  \nxb42639          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nxb42639          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nxb42639          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nxb42639a         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nxb42639a         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nxb42639a         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nxb42663          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nxb42663          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nxb42663          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nxb42663          printout         (prin)     .prn  \nxb42664          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nxb42664          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nxb42664          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nxb42664          printout         (prin)     .prn  \nxb42664a         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nxb42664a         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nxb42664a         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nxb42664a         printout         (prin)     .prn  \nxbox             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nxbox             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nxegs             floppydisk1      (flop1)    .atr  .dsk  .xfd  \nxegs             floppydisk2      (flop2)    .atr  .dsk  .xfd  \nxegs             floppydisk3      (flop3)    .atr  .dsk  .xfd  \nxegs             floppydisk4      (flop4)    .atr  .dsk  .xfd  \nxegs             cartridge        (cart)     .bin  .rom  .car  \nxeye             cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nxiistag          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nxiprocessor      floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nxiprocessor      floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nxiprocessor      printout         (prin)     .prn  \nxiprocessor      harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nxor100           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nxor100           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nxor100           printout         (prin)     .prn  \nxtrial           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \ny503iiir         cartridge1       (cart1)    .mx1  .bin  .rom  \ny503iiir         cartridge2       (cart2)    .mx1  .bin  .rom  \ny503iiir         printout         (prin)     .prn  \ny503iiir         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ny503iiire        cartridge1       (cart1)    .mx1  .bin  .rom  \ny503iiire        cartridge2       (cart2)    .mx1  .bin  .rom  \ny503iiire        printout         (prin)     .prn  \ny503iiire        cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ny503iir          cartridge1       (cart1)    .mx1  .bin  .rom  \ny503iir          cartridge2       (cart2)    .mx1  .bin  .rom  \ny503iir          yamahaminicart   (mini)     .mx1  .bin  .rom  \ny503iir          cartridge60pin   (cart60p)  .mx1  .bin  .rom  \ny503iir          printout         (prin)     .prn  \ny503iir          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ny503iir2         cartridge1       (cart1)    .mx1  .bin  .rom  \ny503iir2         cartridge2       (cart2)    .mx1  .bin  .rom  \ny503iir2         yamahaminicart   (mini)     .mx1  .bin  .rom  \ny503iir2         cartridge60pin   (cart60p)  .mx1  .bin  .rom  \ny503iir2         printout         (prin)     .prn  \ny503iir2         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ny805128          cartridge1       (cart1)    .mx1  .bin  .rom  \ny805128          cartridge2       (cart2)    .mx1  .bin  .rom  \ny805128          floppydisk       (flop)     .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \ny805128          cartridge60pin   (cart60p)  .mx1  .bin  .rom  \ny805128          printout         (prin)     .prn  \ny805128          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ny805128r2        cartridge1       (cart1)    .mx1  .bin  .rom  \ny805128r2        cartridge2       (cart2)    .mx1  .bin  .rom  \ny805128r2        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \ny805128r2        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \ny805128r2        printout         (prin)     .prn  \ny805128r2        cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ny805128r2e       cartridge1       (cart1)    .mx1  .bin  .rom  \ny805128r2e       cartridge2       (cart2)    .mx1  .bin  .rom  \ny805128r2e       floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \ny805128r2e       floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \ny805128r2e       printout         (prin)     .prn  \ny805128r2e       cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \ny805256          cartridge1       (cart1)    .mx1  .bin  .rom  \ny805256          cartridge2       (cart2)    .mx1  .bin  .rom  \ny805256          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \ny805256          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .dmk  \ny805256          cartridge60pin   (cart60p)  .mx1  .bin  .rom  \ny805256          printout         (prin)     .prn  \ny805256          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nyc64             cartridge        (cart)     .mx1  .bin  .rom  \nyc64             printout         (prin)     .prn  \nyc64             cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nyis303           cartridge        (cart)     .mx1  .bin  .rom  \nyis303           cartridge60pin   (cart60p)  .mx1  .bin  .rom  \nyis303           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nyis503           cartridge        (cart)     .mx1  .bin  .rom  \nyis503           cartridge60pin   (cart60p)  .mx1  .bin  .rom  \nyis503           printout         (prin)     .prn  \nyis503           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nyis503f          cartridge        (cart)     .mx1  .bin  .rom  \nyis503f          cartridge60pin   (cart60p)  .mx1  .bin  .rom  \nyis503f          printout         (prin)     .prn  \nyis503f          cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nyis503ii         cartridge1       (cart1)    .mx1  .bin  .rom  \nyis503ii         cartridge2       (cart2)    .mx1  .bin  .rom  \nyis503ii         cartridge60pin   (cart60p)  .mx1  .bin  .rom  \nyis503ii         printout         (prin)     .prn  \nyis503ii         cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nyis604           cartridge1       (cart1)    .mx1  .bin  .rom  \nyis604           cartridge2       (cart2)    .mx1  .bin  .rom  \nyis604           yamahaminicart   (mini)     .mx1  .bin  .rom  \nyis604           cartridge60pin   (cart60p)  .mx1  .bin  .rom  \nyis604           printout         (prin)     .prn  \nyis604           cassette         (cass)     .wav  .flac .tap  .cas  .tsx  \nz100             floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nz100             floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nz1013            cassette         (cass)     .wav  .flac \nz1013            snapshot         (dump)     .z80  \nz1013a2          cassette         (cass)     .wav  .flac \nz1013a2          snapshot         (dump)     .z80  \nz1013k69         cassette         (cass)     .wav  .flac \nz1013k69         snapshot         (dump)     .z80  \nz1013k76         cassette         (cass)     .wav  .flac \nz1013k76         snapshot         (dump)     .z80  \nz1013s60         cassette         (cass)     .wav  .flac \nz1013s60         snapshot         (dump)     .z80  \nz80clock         cartridge1       (cart1)    .bin  \nz80clock         cartridge2       (cart2)    .bin  \nz80clock         cartridge3       (cart3)    .bin  \nz80clock         quickload        (quik)     .rom  \nz80ne            cassette1        (cass1)    .wav  .flac \nz80ne            cassette2        (cass2)    .wav  .flac \nz80net           cassette1        (cass1)    .wav  .flac \nz80net           cassette2        (cass2)    .wav  .flac \nz80netb          cassette1        (cass1)    .wav  .flac \nz80netb          cassette2        (cass2)    .wav  .flac \nz80netf          cassette1        (cass1)    .wav  .flac \nz80netf          cassette2        (cass2)    .wav  .flac \nz80netf          floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dmk  \nz80netf          floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .dmk  \nz88              serial           (serl)     .     \nz88              cartridge1       (cart1)    .epr  .bin  \nz88              cartridge2       (cart2)    .epr  .bin  \nz88              cartridge3       (cart3)    .epr  .bin  \nz88ch            serial           (serl)     .     \nz88ch            cartridge1       (cart1)    .epr  .bin  \nz88ch            cartridge2       (cart2)    .epr  .bin  \nz88ch            cartridge3       (cart3)    .epr  .bin  \nz88de            serial           (serl)     .     \nz88de            cartridge1       (cart1)    .epr  .bin  \nz88de            cartridge2       (cart2)    .epr  .bin  \nz88de            cartridge3       (cart3)    .epr  .bin  \nz88dk            serial           (serl)     .     \nz88dk            cartridge1       (cart1)    .epr  .bin  \nz88dk            cartridge2       (cart2)    .epr  .bin  \nz88dk            cartridge3       (cart3)    .epr  .bin  \nz88es            serial           (serl)     .     \nz88es            cartridge1       (cart1)    .epr  .bin  \nz88es            cartridge2       (cart2)    .epr  .bin  \nz88es            cartridge3       (cart3)    .epr  .bin  \nz88fi            serial           (serl)     .     \nz88fi            cartridge1       (cart1)    .epr  .bin  \nz88fi            cartridge2       (cart2)    .epr  .bin  \nz88fi            cartridge3       (cart3)    .epr  .bin  \nz88fr            serial           (serl)     .     \nz88fr            cartridge1       (cart1)    .epr  .bin  \nz88fr            cartridge2       (cart2)    .epr  .bin  \nz88fr            cartridge3       (cart3)    .epr  .bin  \nz88it            serial           (serl)     .     \nz88it            cartridge1       (cart1)    .epr  .bin  \nz88it            cartridge2       (cart2)    .epr  .bin  \nz88it            cartridge3       (cart3)    .epr  .bin  \nz88no            serial           (serl)     .     \nz88no            cartridge1       (cart1)    .epr  .bin  \nz88no            cartridge2       (cart2)    .epr  .bin  \nz88no            cartridge3       (cart3)    .epr  .bin  \nz88se            serial           (serl)     .     \nz88se            cartridge1       (cart1)    .epr  .bin  \nz88se            cartridge2       (cart2)    .epr  .bin  \nz88se            cartridge3       (cart3)    .epr  .bin  \nz88tr            serial           (serl)     .     \nz88tr            cartridge1       (cart1)    .epr  .bin  \nz88tr            cartridge2       (cart2)    .epr  .bin  \nz88tr            cartridge3       (cart3)    .epr  .bin  \nz90              floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nz90              floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nz90              floppydisk3      (flop3)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nz90              printout         (prin)     .prn  \nz9001            cassette         (cass)     .wav  .flac \nzdsupers         cassette         (cass)     .wav  .flac \nzdsupers         floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nzdsupers         floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nzdsupers         printout         (prin)     .prn  \nzdz150           cassette         (cass)     .wav  .flac \nzdz150           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nzdz150           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nzdz150           printout         (prin)     .prn  \nzdz160           cassette         (cass)     .wav  .flac \nzdz160           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nzdz160           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nzdz160           printout         (prin)     .prn  \nzdz180           cassette         (cass)     .wav  .flac \nzdz180           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nzdz180           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nzdz180           printout         (prin)     .prn  \nzdz248           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nzdz248           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nzdz248           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nzeos386sx        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nzeos386sx        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nzeos386sx        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nzi4dvs           floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nzi4dvs           floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  .xdf  \nzi4dvs           harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nzi4dvs           printout         (prin)     .prn  \nzidav630e        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nzidav630e        cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nzidav630e        floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nzidav630e        floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  .ima  .img  .ufi  .360  .ipf  \nzidav630e        printout         (prin)     .prn  \nzijini           cassette         (cass)     .wav  .flac \nzijini           floppydisk1      (flop1)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nzijini           floppydisk2      (flop2)    .mfi  .dfi  .d13  .dsk  .do   .po   .edd  .woz  .nib  \nzippity          cartridge        (cart)     .bin  \nzippityuk        cartridge        (cart)     .bin  \nzito4dps         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nzito4dps         cdrom            (cdrm)     .chd  .cue  .toc  .nrg  .gdi  .iso  .cdr  \nzito4dps         printout         (prin)     .prn  \nzokuoten         harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nzokuotena        harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nzoofari          harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nzooo             harddisk         (hard)     .chd  .hd   .hdv  .2mg  .hdi  \nzorba            floppydisk1      (flop1)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nzorba            floppydisk2      (flop2)    .mfi  .dfi  .mfm  .td0  .imd  .86f  .d77  .d88  .1dd  .cqm  .cqi  .dsk  \nzorba            printout         (prin)     .prn  \nzvezda           snapshot         (dump)     .ach  .frz  .plusd.prg  .sem  .sit  .sna  .snp  .snx  .sp   .z80  .zx   \nzvezda           quickload        (quik)     .raw  .scr  \nzvezda           cassette         (cass)     .wav  .flac .tzx  .tap  .blk  \nzx80             cassette         (cass)     .wav  .flac .o    .80   \nzx81             cassette         (cass)     .wav  .flac .p    .81   .tzx  \nzx97             cassette         (cass)     .wav  .flac .p    .81   .tzx  \n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/macrorun.py",
    "content": "#!/usr/bin/env python3\r\nimport sys, os, json, time, stat\r\nfrom evdev import InputDevice, list_devices, ecodes as e\r\nfrom evdev import UInput\r\n\r\nCONFIG_FILE = \"/storage/.config/emuelec/scripts/macro_config.json\"\r\nPID_FILE = \"/tmp/macrorun.pid\"\r\nLOG_FILE = \"/tmp/macrorun.log\"\r\n\r\n\r\n\r\ndef load_config():\r\n    if not os.path.exists(CONFIG_FILE):\r\n        print(\"No saved configuration found. Please run Setup first!\")\r\n        sys.exit(1)\r\n    with open(CONFIG_FILE, \"r\") as f:\r\n        data = json.load(f)\r\n    if \"macros\" not in data:\r\n        data = {\r\n            \"device_path\": data.get(\"device_path\"),\r\n            \"macros\": [\r\n                {\r\n                    \"name\": \"DEFAULT MACRO\",\r\n                    \"trigger_code\": data.get(\"trigger_code\"),\r\n                    \"macro_keys\": data.get(\"macro_keys\", []),\r\n                }\r\n            ],\r\n        }\r\n    macros = [m for m in data.get(\"macros\", []) if m.get(\"macro_keys\")]\r\n    if not macros:\r\n        print(\"No macros stored in configuration file. Please create one first with Setup!\")\r\n        sys.exit(1)\r\n    data[\"macros\"] = macros\r\n    return data\r\n\r\ndef wait_for_controller(preferred_path=None):\r\n    print(\"\\nWaiting for controller...\")\r\n    if preferred_path:\r\n        try:\r\n            dev = InputDevice(preferred_path)\r\n            print(f\"Controller found: {dev.name} ({dev.path})\")\r\n            return dev\r\n        except OSError:\r\n            pass\r\n    while True:\r\n        for path in list_devices():\r\n            dev = InputDevice(path)\r\n            if dev.capabilities().get(e.EV_KEY):\r\n                keys = dev.capabilities()[e.EV_KEY]\r\n                if any(btn in keys for btn in [e.BTN_SOUTH, e.BTN_EAST, e.BTN_NORTH, e.BTN_WEST]):\r\n                    print(f\"Controller found: {dev.name} ({dev.path})\")\r\n                    return dev\r\n        time.sleep(1)\r\n\r\ndef clear_console():\r\n    print(\"\\033[2J\\033[H\", end=\"\")\r\n\r\ndef controller_menu(dev, title, options):\r\n    index = 0\r\n    while True:\r\n        clear_console()\r\n        print(title)\r\n        print(\"\\nUse D-Pad to choose a macro and press (A) to confirm.\")\r\n        print(\"Press (B) to cancel and exit.\\n\")\r\n        for i, option in enumerate(options):\r\n            prefix = \"->\" if i == index else \"  \"\r\n            print(f\"{prefix} {option}\")\r\n        for event in dev.read_loop():\r\n            if event.type != e.EV_KEY or event.value != 1:\r\n                continue\r\n            if event.code == e.BTN_DPAD_DOWN:\r\n                index = (index + 1) % len(options); break\r\n            if event.code == e.BTN_DPAD_UP:\r\n                index = (index - 1) % len(options); break\r\n            if event.code == e.BTN_SOUTH:\r\n                return index\r\n            if event.code == e.BTN_EAST:\r\n                print(\"\\nMacro activation cancelled.\")\r\n                sys.exit(0)\r\n\r\ndef run_macro_mode(dev, macro):\r\n    trigger_code = macro[\"trigger_code\"]\r\n    macro_keys = macro[\"macro_keys\"]\r\n    ui = UInput({e.EV_KEY: list(set(macro_keys))}, name=\"Virtual-Macro\", bustype=e.BUS_USB)\r\n    trigger_pressed = False\r\n    macro_executed = False\r\n    press_start = 0\r\n    print(\"\\nMacro active! Press the trigger to execute. Hold for 3 seconds to disable Macro again.\")\r\n    for event in dev.read_loop():\r\n        if event.type == e.EV_KEY and event.code == trigger_code:\r\n            if event.value == 1:\r\n                trigger_pressed = True\r\n                macro_executed = False\r\n                press_start = time.time()\r\n            elif event.value == 0 and trigger_pressed:\r\n                hold_time = time.time() - press_start\r\n                trigger_pressed = False\r\n                if hold_time >= 3:\r\n                    print(\"Exiting...\")\r\n                    ui.close()\r\n                    return\r\n                elif not macro_executed:\r\n                    print(\"Executing macro...\")\r\n                    for key in macro_keys:\r\n                        ui.write(e.EV_KEY, key, 1); ui.syn(); time.sleep(0.05)\r\n                        ui.write(e.EV_KEY, key, 0); ui.syn()\r\n        if trigger_pressed and not macro_executed and time.time() - press_start >= 0.1:\r\n            macro_executed = True\r\n            print(\"Executing macro...\")\r\n            for key in macro_keys:\r\n                ui.write(e.EV_KEY, key, 1); ui.syn(); time.sleep(0.05)\r\n                ui.write(e.EV_KEY, key, 0); ui.syn()\r\n\r\ndef already_running():\r\n    try:\r\n        with open(PID_FILE) as f:\r\n            pid = int(f.read().strip())\r\n        os.kill(pid, 0)\r\n        return True\r\n    except Exception:\r\n        return False\r\n\r\ndef daemonize(dev_path, macro):\r\n   \r\n    try:\r\n        if os.fork() > 0:\r\n            return 0  \r\n        os.setsid()\r\n        if os.fork() > 0:\r\n            os._exit(0)\r\n    except OSError:\r\n        return 2\r\n\r\n    \r\n    try:\r\n        sys.stdin.close()\r\n    except Exception:\r\n        pass\r\n    try:\r\n        log = open(LOG_FILE, \"ab\", buffering=0)\r\n    except OSError:\r\n        log = open(\"/dev/null\", \"ab\", buffering=0)\r\n    for fd in (1, 2):\r\n        try:\r\n            os.dup2(log.fileno(), fd)\r\n        except OSError:\r\n            pass\r\n\r\n    \r\n    try:\r\n        with open(PID_FILE, \"w\") as pf:\r\n            pf.write(str(os.getpid()))\r\n    except OSError:\r\n        pass\r\n\r\n    \r\n    try:\r\n        dev = InputDevice(dev_path)\r\n        run_macro_mode(dev, macro)\r\n    finally:\r\n        try:\r\n            os.remove(PID_FILE)\r\n        except OSError:\r\n            pass\r\n    os._exit(0)\r\n\r\ndef main():\r\n    if already_running():\r\n        print(\"Macro already running. Aborting.\")\r\n        return 0\r\n\r\n    cfg = load_config()\r\n    macros = cfg[\"macros\"]\r\n    dev = wait_for_controller(cfg.get(\"device_path\"))\r\n    option_labels = [f\"{m['name']} (Trigger {m['trigger_code']})\" for m in macros]\r\n    selection = controller_menu(dev, \"Select macro to activate\", option_labels)\r\n    chosen_macro = macros[selection]\r\n\r\n    print(\"\\nStarting macro in background...\")\r\n    rc = daemonize(dev.path, chosen_macro)\r\n    if rc == 0:\r\n        print(\"Macro is now running in the background. Exiting to Emulationstation...\")\r\n        return 0\r\n    else:\r\n        print(\"Macro could not be started in the background.\")\r\n        return 1\r\n\r\nif __name__ == \"__main__\":\r\n    sys.exit(main())\r\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/macrorun.sh",
    "content": "#!/bin/bash\n. /etc/profile\n\nmacro_confirm() {\n    text_viewer -y -w -t \"ACTIVATE MACRO\" -f 24 -m \"This will activate the macro mode in the background.\\n\\nThe macro will be active while you continue using EmulationStation.\\n\\nContinue?\"\n    if [[ $? == 21 ]]; then\n        if macro_start; then\n\t\t\ttext_viewer -w -t \"MACRO ACTIVATED!\" -f 24 -m \"Macro mode is now active in the background!\\n\\nATTENTION: DO NOT press the trigger button as long as you are in Emulationstation, otherwise the new controller-setup screen will pop up.\\n\\nIn this case, just press the hotkey button to exit the routine.\\n\\nTo DISABLE the macro again, press the macro button for around 3-5 seconds.\"\n        else\n            text_viewer -e -w -t \"MACRO ACTIVATION FAILED!\" -f 24 -m \"Failed to activate macro mode! Check /tmp/macrorun.log for details.\"\n        fi\n    fi\n    ee_console disable\n}\n\nmacro_start() {\n    ee_console enable\n    echo \"Starting macro run (foreground menu, then daemonize)...\"\n\t\n    /usr/bin/python3 -u /usr/bin/scripts/setup/macrorun.py\n    rc=$?\n\n   \n    sleep 1\n    if [[ -f /tmp/macrorun.pid ]] && ps -p \"$(cat /tmp/macrorun.pid)\" >/dev/null 2>&1; then\n        echo \"Macro daemon running with PID $(cat /tmp/macrorun.pid)\"\n        ee_console disable\n        rm /tmp/display >/dev/null 2>&1\n        return 0\n    fi\n\n  \n    if pgrep -f \"Virtual-Macro\" >/dev/null 2>&1 || pgrep -f \"/usr/bin/scripts/setup/macrorun.py\" >/dev/null 2>&1; then\n        ee_console disable\n        rm /tmp/display >/dev/null 2>&1\n        return 0\n    fi\n\n    echo \"Macro daemon not detected (rc=${rc})\"\n    ee_console disable\n    rm /tmp/display >/dev/null 2>&1\n    return 1\n}\n\nmacro_confirm\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/macrosetup.py",
    "content": "#!/usr/bin/env python3\r\nfrom evdev import InputDevice, list_devices, ecodes as e\r\nimport json\r\nimport os\r\nimport time\r\nimport builtins\r\nimport functools\r\nimport sys\r\n\r\nCONFIG_FILE = \"/storage/.config/emuelec/scripts/macro_config.json\"\r\nMAX_NAME_LEN = 16\r\nNAME_ALPHABET = list(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 -_\")\r\n\r\nif hasattr(sys.stdout, \"reconfigure\"):\r\n    try:\r\n        sys.stdout.reconfigure(line_buffering=True, write_through=True)\r\n    except (ValueError, OSError):\r\n        pass\r\n\r\n# Every print call should flush immediately so prompts appear on the EmuELEC\r\n# console even when the script runs through a tee pipeline.\r\nprint = functools.partial(builtins.print, flush=True)\r\n\r\n\r\ndef map_controller_to_key(code):\r\n    mapping = {\r\n        e.BTN_DPAD_UP: e.KEY_UP,\r\n        e.BTN_DPAD_DOWN: e.KEY_DOWN,\r\n        e.BTN_DPAD_LEFT: e.KEY_LEFT,\r\n        e.BTN_DPAD_RIGHT: e.KEY_RIGHT,\r\n        e.BTN_SOUTH: e.KEY_Z,\r\n        e.BTN_EAST: e.KEY_X,\r\n        e.BTN_NORTH: e.KEY_A,\r\n        e.BTN_WEST: e.KEY_S,\r\n        e.BTN_TL: e.KEY_Q,\r\n        e.BTN_TR: e.KEY_W,\r\n        e.BTN_TL2: e.KEY_E,\r\n        e.BTN_TR2: e.KEY_R,\r\n    }\r\n    return mapping.get(code)\r\n\r\n\r\ndef ensure_config_dir():\r\n    os.makedirs(os.path.dirname(CONFIG_FILE), exist_ok=True)\r\n\r\n\r\ndef load_config():\r\n    if not os.path.exists(CONFIG_FILE):\r\n        return {\"macros\": []}\r\n\r\n    with open(CONFIG_FILE, \"r\") as f:\r\n        data = json.load(f)\r\n\r\n    # migrate old single-macro configuration\r\n    if \"macros\" not in data:\r\n        macro = {\r\n            \"name\": \"DEFAULT MACRO\",\r\n            \"trigger_code\": data.get(\"trigger_code\"),\r\n            \"macro_keys\": data.get(\"macro_keys\", []),\r\n        }\r\n        return {\r\n            \"device_path\": data.get(\"device_path\"),\r\n            \"macros\": [macro],\r\n        }\r\n\r\n    return data\r\n\r\n\r\ndef save_config(data):\r\n    ensure_config_dir()\r\n    with open(CONFIG_FILE, \"w\") as f:\r\n        json.dump(data, f, indent=2)\r\n    print(f\"\\nConfiguration saved to {CONFIG_FILE}.\")\r\n\r\n\r\ndef wait_for_controller(preferred_path=None):\r\n    print(\"\\nWaiting for controller...\")\r\n\r\n    if preferred_path:\r\n        try:\r\n            dev = InputDevice(preferred_path)\r\n            print(f\"Controller found: {dev.name} ({dev.path})\")\r\n            return dev\r\n        except OSError:\r\n            pass\r\n\r\n    while True:\r\n        devices = [InputDevice(path) for path in list_devices()]\r\n        for dev in devices:\r\n            if dev.capabilities().get(e.EV_KEY):\r\n                keys = dev.capabilities()[e.EV_KEY]\r\n                if any(btn in keys for btn in [e.BTN_SOUTH, e.BTN_EAST, e.BTN_NORTH, e.BTN_WEST]):\r\n                    print(f\"Controller found: {dev.name} ({dev.path})\")\r\n                    return dev\r\n        time.sleep(1)\r\n\r\n\r\ndef clear_console():\r\n    print(\"\\033[2J\\033[H\", end=\"\")\r\n\r\n\r\ndef controller_menu(dev, title, options, allow_cancel=False):\r\n    index = 0 if options else -1\r\n\r\n    while True:\r\n        clear_console()\r\n        print(title)\r\n        print(\"\\nUse D-Pad to choose and press (A) to confirm.\" )\r\n        if allow_cancel:\r\n            print(\"Press (B) to cancel.\")\r\n        print()\r\n\r\n        for i, option in enumerate(options):\r\n            prefix = \"-\" if i == index else \"  \"\r\n            print(f\"{prefix} {option}\")\r\n\r\n        if not options:\r\n            print(\"\\nNo options available.\")\r\n\r\n        for event in dev.read_loop():\r\n            if event.type != e.EV_KEY or event.value != 1:\r\n                continue\r\n\r\n            if event.code == e.BTN_DPAD_DOWN and options:\r\n                index = (index + 1) % len(options)\r\n                break\r\n            if event.code == e.BTN_DPAD_UP and options:\r\n                index = (index - 1) % len(options)\r\n                break\r\n            if event.code == e.BTN_SOUTH and options:\r\n                return index\r\n            if allow_cancel and event.code == e.BTN_EAST:\r\n                return None\r\n\r\n        # loop will refresh display after handling navigation\r\n\r\n\r\ndef enter_macro_name(dev, default_name):\r\n    name = list(default_name.upper()[:MAX_NAME_LEN])\r\n    if not name:\r\n        name = list(\"MACRO\")\r\n\r\n    while len(name) < MAX_NAME_LEN:\r\n        name.append(\" \")\r\n\r\n    position = 0\r\n\r\n    while True:\r\n        clear_console()\r\n        print(\"Name your macro\")\r\n        print(\"\\nUse LEFT/RIGHT to move, UP/DOWN to change character.\")\r\n        print(\"Press (A) to accept, (Y) to erase character, (B) to cancel.\")\r\n        print()\r\n\r\n        display = []\r\n        for idx, char in enumerate(name):\r\n            if idx == position:\r\n                display.append(f\"[{char}]\")\r\n            else:\r\n                display.append(f\" {char} \")\r\n        print(\"\".join(display))\r\n\r\n        for event in dev.read_loop():\r\n            if event.type != e.EV_KEY or event.value != 1:\r\n                continue\r\n\r\n            if event.code == e.BTN_DPAD_RIGHT:\r\n                position = min(position + 1, MAX_NAME_LEN - 1)\r\n                break\r\n            if event.code == e.BTN_DPAD_LEFT:\r\n                position = max(position - 1, 0)\r\n                break\r\n            if event.code == e.BTN_DPAD_UP:\r\n                current = name[position]\r\n                try:\r\n                    idx = NAME_ALPHABET.index(current)\r\n                except ValueError:\r\n                    idx = 0\r\n                name[position] = NAME_ALPHABET[(idx + 1) % len(NAME_ALPHABET)]\r\n                break\r\n            if event.code == e.BTN_DPAD_DOWN:\r\n                current = name[position]\r\n                try:\r\n                    idx = NAME_ALPHABET.index(current)\r\n                except ValueError:\r\n                    idx = 0\r\n                name[position] = NAME_ALPHABET[(idx - 1) % len(NAME_ALPHABET)]\r\n                break\r\n            if event.code == e.BTN_WEST:  # Y button to clear character\r\n                name[position] = \" \"\r\n                break\r\n            if event.code == e.BTN_SOUTH:\r\n                final_name = \"\".join(name).strip()\r\n                return final_name or default_name.upper()\r\n            if event.code == e.BTN_EAST:\r\n                return None\r\n\r\n\r\ndef record_trigger_button(dev):\r\n    print(\"\\nPress the button that will later trigger the macro...\")\r\n    while True:\r\n        for event in dev.read_loop():\r\n            if event.type == e.EV_KEY and event.value == 1 and event.code != e.BTN_MODE:\r\n                print(f\"Trigger button: Code {event.code}\")\r\n                time.sleep(0.5)\r\n                return event.code\r\n\r\n\r\ndef record_macro_sequence(dev, trigger_code):\r\n    print(\"\\nPress the buttons for your macro. When you are finished, wait three seconds and then press any button to save and exit.\")\r\n    macro_keys = []\r\n    last_press_time = time.time()\r\n\r\n    for event in dev.read_loop():\r\n        if event.type == e.EV_KEY and event.value == 1:\r\n            if event.code != trigger_code:\r\n                macro_keys.append(event.code)\r\n                last_press_time = time.time()\r\n                print(f\"→ Button added: Code {event.code}\")\r\n        if time.time() - last_press_time > 3:\r\n            break\r\n\r\n    if not macro_keys:\r\n        print(\"No buttons recorded!\")\r\n        return None\r\n\r\n    mapped = [map_controller_to_key(c) for c in macro_keys if map_controller_to_key(c)]\r\n    if not mapped:\r\n        print(\"None of the recorded buttons can be mapped to keyboard keys!\")\r\n        return None\r\n\r\n    print(f\"Macro recorded: {len(mapped)} valid keys\")\r\n    return mapped\r\n\r\n\r\ndef main():\r\n    config = load_config()\r\n    dev = wait_for_controller(config.get(\"device_path\"))\r\n\r\n    macros = config.setdefault(\"macros\", [])\r\n    options = [f\"Overwrite: {macro['name']}\" for macro in macros]\r\n    options.append(\"Create new macro\")\r\n\r\n    selection = controller_menu(dev, \"🎛  Choose macro slot\", options, allow_cancel=True)\r\n    if selection is None:\r\n        print(\"\\nSetup cancelled.\")\r\n        return\r\n\r\n    creating_new = selection == len(macros)\r\n\r\n    if creating_new:\r\n        default_name = f\"MACRO {len(macros) + 1}\"\r\n        macro_name = enter_macro_name(dev, default_name)\r\n        if macro_name is None:\r\n            print(\"\\nSetup cancelled.\")\r\n            return\r\n    else:\r\n        macro_name = macros[selection][\"name\"]\r\n        print(f\"\\nOverwriting macro '{macro_name}'. Press the trigger to re-record.\")\r\n\r\n    trigger_code = record_trigger_button(dev)\r\n    macro_keys = record_macro_sequence(dev, trigger_code)\r\n\r\n    if macro_keys:\r\n        new_macro = {\r\n            \"name\": macro_name,\r\n            \"trigger_code\": trigger_code,\r\n            \"macro_keys\": macro_keys,\r\n        }\r\n\r\n        if creating_new:\r\n            macros.append(new_macro)\r\n        else:\r\n            macros[selection] = new_macro\r\n\r\n        config[\"device_path\"] = dev.path\r\n        save_config(config)\r\n        print(\"\\nSetup complete! You can choose and activate your recorded macros with Macro Enabler.\")\r\n        \r\n    else:\r\n        print(\"\\nMacro recording aborted.\")\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    main()"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/macrosetup.sh",
    "content": "#!/bin/bash\n# Source predefined functions and variables\n. /etc/profile\n\nfunction macrosetup_confirm() {\n    text_viewer -y -w -t \"SETUP MACRO\" -f 24 -m \"This will start the macro setup configuration.\\n\\nThe setup will guide you through configuring your macro settings.\\n\\nContinue?\"\n    if [[ $? == 21 ]]; then\n        if macrosetup_start; then\n            text_viewer -w -t \"MACRO SETUP COMPLETED!\" -f 24 -m \"Macro setup has been completed successfully!\\n\\nYour macro configuration has been saved and is ready to use.\\n\\nYou can now select and activate macros using the macro activation script.\"\n        else\n            text_viewer -e -w -t \"MACRO SETUP FAILED!\" -f 24 -m \"Failed to complete macro setup! Check /tmp/macrosetup.log for details.\"\n        fi\n    fi\n    ee_console disable\n}\n\nfunction macrosetup_start() {\n    ee_console enable\n    \n    echo \"Starting macro setup...\"\n    echo \"Follow the instructions that will appear below:\"\n    echo \"\"\n    \n    # Run Python setup script with logging (but keep interactive output)\n    /usr/bin/python3 -u /usr/bin/scripts/setup/macrosetup.py 2>&1 | tee /tmp/macrosetup.log\n    setup_result=${PIPESTATUS[0]}\n    \n    echo \"\"\n    \n    # Check if setup completed successfully\n    if [[ $setup_result == 0 ]]; then\n        echo \"Macro setup completed successfully\"\n        ee_console disable\n        rm /tmp/display > /dev/null 2>&1\n        return 0\n    else\n        echo \"Failed to complete macro setup\"\n        ee_console disable\n        rm /tmp/display > /dev/null 2>&1\n        return 1\n    fi\n}\n\nmacrosetup_confirm"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/scan_scummVM_games.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nfunction restart_confirm() {\n    text_viewer -y -w -t \"ScummVM scan completed\" -f 24 -m \"ScummVM scan completed, if any games were found they will appear next time you restart Emulationstation!\\n\\nDo you wish to restart now?\"\n\t[[ $? == 21 ]] && systemctl restart emustation || exit 0; \n}\n\nsdlterm --title \"Adding Scummvm games, please be patient...\" --run \"/usr/bin/scummvm.start\" --runargs \"add\"\nsdlterm --title \"Creating Scummvm game files, please be patient...\" --run  \"/usr/bin/scummvm.start \" --runargs \"create\"\nrestart_confirm\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/scraper.start",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nee_console enable\n\nwhile pgrep -f emulationstation; do\n    clear /dev/tty0\n    echo \"Waiting for Emulationstation to quit\" > /dev/tty0\n    sleep 1\ndone\n\n\nsource /usr/bin/env.sh\nsource \"$scriptdir/scriptmodules/supplementary/scraper.sh\"\nrp_registerAllModules\n\njoy2keyStart\n\nromdir=\"/storage/roms/\"\ngui_scraper\nee_console disable\nsystemctl start emustation\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/send_logs.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nLOGLINK=$(emueleclogs.sh)\ntext_viewer -w -t \"EmuELEC Send Logs\" -f 24 -m \"Use this link to ask for help:\\n\\n${LOGLINK}\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/show_last_emuelec.log.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\ntext_viewer -t \"Last EmuELEC Log!\" -f 24 /emuelec/logs/emuelec.log\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/skyscraper.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nif [ ! -L \"/storage/.skyscraper\" ]; then\nln -sTf /storage/.config/skyscraper /storage/.skyscraper\nfi\n\nfunction scrape_confirm() {\n    text_viewer -y -w -t \"Skyscraper Launcher\" -f 24 -m \"This will Kill Emulationstation and will start Skyscraper, do you want to continue?\\n\\nYou will need a keyboard to be able to use the scraping menu\"\n    [[ $? == 21 ]] && start_skyscraper || exit 0;\n }\n\nfunction start_skyscraper() {\nee_console enable\nsystemd-run bash /usr/bin/scripts/setup/Skyscraper.start\nsystemctl stop emustation\n}\n\nee_console disable\nscrape_confirm\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/sselphs_scraper.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nee_console enable\n\nfunction scrape_confirm() {\n\ttext_viewer -y -w -t \"Sselph's Scraper\" -f 24 -m \"This will Kill Emulationstation and will start Sselph's Scraper, do you want to continue?\\n\\nYou will need a keyboard to be able to use the scraping menu\"\n    [[ $? == 21 ]] && start_scraper || exit 0;\n }\n\nfunction start_scraper() {\nee_console enable\nsystemd-run bash /usr/bin/scripts/setup/scraper.start\nsystemctl stop emustation\n}\n\nee_console disable\nscrape_confirm\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/system_info.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n    echo \"                         Storage System\" > /tmp/line1\n    echo \" \" > /tmp/free\n    df -h | tail -n +4 > /tmp/temp-disk3\n    sed '1 i Name          Total      Used      Free Load Mountpoint' /tmp/temp-disk3 > /tmp/temp-disk2\n    sed '/^tmpfs/ d' /tmp/temp-disk2 > /tmp/temp-disk4\n    sed '/^none/ d' /tmp/temp-disk4 > /tmp/temp-disk\n    sed -i 's,'\"/dev/data          \"',/dev/data,' /tmp/temp-disk > /tmp/tt\n    sed -i 's,'\"/dev/loop0          \"',/dev/loop0,' /tmp/temp-disk > /tmp/tt\n    sed -i 's,'\"/dev/sda1    \"',USB,' /tmp/temp-disk > /tmp/tt\n    sed -i 's,'\"/var\"',,' /tmp/temp-disk > /tmp/tt\n    echo \"                     Temperature Monitoring\" > /tmp/temph\n    cpuTempC=$(($(cat /sys/class/thermal/thermal_zone0/temp)/1000)) && cpuTempF=$((cpuTempC*9/5+32))\n    echo ${cpuTempC} > /tmp/tempc\n    sed 's/^/Cpu Temperature in Celcius degree :   /' /tmp/tempc > /tmp/tempC\n    echo ${cpuTempF} > /tmp/tempf\n    sed 's/^/Cpu Temperature in Farenheit degree : /' /tmp/tempf > /tmp/tempF\n    echo \"                         Network Info\" > /tmp/net\n    ip route get 8.8.8.8 2>/dev/null | awk '{print $NF; exit}' > /tmp/ip\n    sed 's/^/Local Ip address :           /' /tmp/ip > /tmp/IP\n    wget -qO- http://ipecho.net/plain > /tmp/wan\n    sed 's/^/Public Ip address :          /' /tmp/wan > /tmp/WAN\n    cat /sys/class/net/eth0/operstate > /tmp/wired\n    sed 's/^/Ethernet Connection status : /' /tmp/wired > /tmp/WIRED\n    cat /sys/class/net/lo/operstate > /tmp/loop\n    sed 's/^/Loopback interface status :  /' /tmp/loop > /tmp/LOOP\n    cat /sys/class/net/wlan0/operstate > /tmp/wlan\n    sed 's/^/Wireless Connection status : /' /tmp/wlan > /tmp/WLAN\n    sed h /tmp/line1 /tmp/free /tmp/temp-disk /tmp/free /tmp/free /tmp/temph /tmp/free /tmp/tempC /tmp/tempF /tmp/free /tmp/free /tmp/net /tmp/free /tmp/IP /tmp/WAN /tmp/LOOP /tmp/WIRED /tmp/WLAN > /tmp/display\n    rm /tmp/free /tmp/tt /tmp/line1 /tmp/temp* /tmp/ip /tmp/loop /tmp/wan /tmp/wired /tmp/wlan /tmp/net /tmp/IP /tmp/WAN /tmp/LOOP /tmp/WIRED /tmp/WLAN\n    text_viewer -w -t \"EmuELEC System Information\" -f 24 /tmp/display\n    rm /tmp/display\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/wifi.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Helper script to activate/desactivate WLAN from command line\n\n# Usage :\n# wifi connect <ssid> <passphrase>\n# wifi disconnect <ssid> \n# wifi scan\n# wifi status\n\n#####################################################\n\n# downloaded from : https://jira.automotivelinux.org/secure/attachment/10300/wifi\n\n### global vars ###\n\nsource /usr/bin/env.sh\njoy2keyStart\n\nCONNMAN=/usr/bin/connmanctl\n\nscript=$(basename \"${0}\")\nconfigpath=/storage/.cache/connman # connman config directory\nssid=\"\" \t# ssid of wifi network to reach\npassphrase=\"\" \t# passphrase of wifi network to reach\nservice=\"\"\t# service identifier of the network service to reach\nfullservice=\"\"\t# <ssid><service>\n\nfunction error() {\n\techo ERROR: \"$@\" >&2\n\tcat << EOF >&2\nUsage:\n\t${script} connect <ssid> [passphrase]\n\t${script} disconnect [ssid]\n\t${script} scan\n\t${script} status\nEOF\n\texit 1\n}\n\nfunction wifi_enable() {\n\tcommand=$(${CONNMAN} technologies | grep -A 4 wifi | sed -n '4p')\n\n\tif [[ ${command} == *True ]]; then\n\t\techo \">>> Wifi is already enabled ... Ok\"\n\telse\n\t\techo \">>> Enabling wifi ...\"\n\t\tcommand=$(${CONNMAN} enable wifi)\n\t\tif [[ ${command} == Enabled* ]]; then\n\t\t\techo ${command}\n\t\telse\n\t\t\techo \">>> Cannot enable wifi !\"\n\t\t\texit 1\n\t\tfi\n\tfi\n}\n\nfunction wifi_disable() {\n\t${CONNMAN} disable wifi\n}\n\nfunction wifi_scan() {\n\techo -e \"\\n>>> Scanning for available wifi networks...\"\n\t${CONNMAN} scan wifi\n}\n\nfunction wifi_connected() {\n\tcommand=$(${CONNMAN} technologies | grep -A 4 wifi | sed -n '5p')\n\n\tif [[ ${command} == *True ]];then\n\t\techo -e \"\\n>>> Already connected to a wifi network\"\n\t\treturn 0\n\tfi\n\treturn 1\n}\n\nfunction wifi_status() {\n\techo -e \"\\n>>> Wifi status:\"\n\t${CONNMAN} technologies | grep -A 4 wifi\n\techo -e \"\\n>>> Available SSIDs:\"\n\t${CONNMAN} services | grep wifi_\n}\n\nfunction wifi_config() {\n\techo -e \"\\n>>> Setting up wifi connection...\"\n\n\tretries=5\n\n\twhile [ 1 ]; do\n\t\t${CONNMAN} scan wifi\n\t\techo -e \"\\n>>> Available SSIDs:\"\n\t\t${CONNMAN} services | grep wifi_\n\n\t\tfullservice=$(${CONNMAN} services | cut -c 5- | sed 's/ \\+ /:/g' | grep \"${ssid}:\")\n\t\tif [[ -n ${fullservice} ]]; then\n\t\t\tbreak\n\t\tfi\n\n\t\tretries=$(( retries - 1 ))\n\t\tif [[ ${retries} -gt 0 ]]; then\n\t\t\techo \"waiting for ${ssid} to appear...\"\n\t\t\tsleep 5\n\t\t\tcontinue\n\t\tfi\n\t\techo \"Target ssid not found !\"\n\t\texit 1\n\tdone\n\n\tssid=$(echo \"${fullservice}\" | awk -F: '{print ${1}}')\n\tservice=$(echo \"${fullservice}\" | awk -F: '{print ${2}}')\n\n\techo \"Target ssid found - config is :\"\n\techo \"SSID       : ${ssid}\"\n\techo \"Service Id : ${service}\"\n\techo \"Passphrase : ${passphrase}\"\n\n\tcat <<EOF >\"${configpath}/${ssid}.config\"\n[service_${service}]\nName = ${ssid}\nType = wifi\nPassphrase = ${passphrase}\nEOF\n\techo \"Configuration written\"\n}\n\nfunction wifi_connect() {\n\techo -e \"\\n>>> Performing connection ...\"\n\toutput=$(${CONNMAN} connect ${service})\n\n\tif [[ ${output} == Connected* ]];then\n\t\techo \"...Ok.\"\n\t\techo ${output}\n\telse\n\t\techo \"...connection failed !\"\n\t\techo ${output}\n\n\t\twifi_disconnect \n\t\techo \"Check your SSID or your passphrase\"\n\t\tread -n 1 -s -r -p \"Press any key to continue\"\n\t\texit 1\n\tfi\n}\n\nfunction wifi_disconnect() {\n\n\tif [[ -z \"${ssid}\" ]]; then\n\t\t${CONNMAN} services | cut -c5- | sed 's/ \\+ /:/g' | ( while read line; do\n\t\t\tssid=$(cut -f1 -d':' <<<${line})\n\t\t\tserv=$(cut -f2 -d':' <<<${line})\n\t\t\tif [[ \"${serv}\" =~ ^wifi_  && -f \"${configpath}/${ssid}.config\" ]]; then\n\t\t\t\techo \"Disconnecting ${serv}\"\n\t\t\t\t${CONNMAN} disconnect ${serv}\n\t\t\t\techo \"Cleaning config ${ssid}.config\"\n\t\t\t\trm -rf \"${configpath}/${ssid}.config\"\n\t\t\tfi\n\t\tdone )\n\t\treturn 0\n\tfi\n\n\tservice=$(${CONNMAN} services | cut -c 5- | sed 's/ \\+ /:/g' | grep \"^${ssid}:\" | awk -F: '{print ${2}}')\n\tif [[ -z \"${service}\" ]]; then\n\t\techo \"... unknown service\"\n\t\trm -rf \"${configpath}/${ssid}.config\" # clear config in all cases\n\t\treturn 1\n\tfi\n\n\toutput=$(${CONNMAN} disconnect ${service})\n\trm -rf \"${configpath}/${ssid}.config\" # clear config in all cases\n\tif [[ ${output} == Disconnected* ]];then\n\t\techo \"...Ok.\"\n\t\techo ${output}\n\telse\n\t\techo \"...disconnection failed !\"\n\t\techo ${output}\n\t\treturn 1\n\tfi\n}\n\n\n# changes made by emuELEC \n\nCOPTION=${1}\nCSSID=${2}\nCPASS=${3}\n\n# check for a file named wifi.txt on /storage/.config or /flash\n# read the content ssid:password and pass it as parameters to the script\n\n if [ -f \"/storage/.config/wifi.txt\" ]; then\n\tstr=$(cat /storage/.config/wifi.txt)\n elif [ -f \"/flash/wifi.txt\" ]; then\n\tstr=$(cat /flash/wifi.txt)\nelse\n    echo \"no wifi.txt found. Make sure you create one in /storage/.config/wifi.txt and add your ssid:password inside\"\n    read -n 1 -s -r -p \"Press any key to continue\"\n fi\n\nIFS=':' # space is set as delimiter\nread -ra WIFI <<< \"${str}\" # str is read into an array as tokens separated by IFS\n\n[ -z \"${COPTION}\" ] && COPTION=\"connect\"\n[ -z \"${CSSID}\" ] && CSSID=${WIFI[0]}\n[ -z \"${CPASS}\" ] && CPASS=${WIFI[1]}\n\nif wifi_connected; then\n    ssid=${CSSID}\n\twifi_disconnect\n\techo \"WiFi disconnected\"\n\tread -n 1 -s -r -p \"Press any key to continue\"\n\texit 0\nfi \n\ncase ${COPTION} in\n\tconnect)\n\t\tssid=${CSSID}\n\t\tpassphrase=${CPASS}\n\t\t[ -z \"${ssid}\" ] && error \"No ssid defined !\"\n\t    wifi_disconnect\n\t\twifi_enable\n\t\twifi_connected && exit 0\n\t\twifi_config\n\t\twifi_connect\n\t\t;;\n\tdisconnect)\n\t\tssid=${CSSID}\n\t\twifi_disconnect\n\t\twifi_disable\n\t\t;;\n\tscan)\n\t\twifi_enable\n\t\twifi_scan\n\t\twifi_status\n\t\t;;\n\tstatus)\n\t\twifi_status\n\t\t;;\n\tconnected)\n\t\twifi_connected && exit 0\n\t\texit 1\n\t\t;;\n\t*)\n\t\terror \"Command line doesn't have any option !\"\nesac\n\n\nread -n 1 -s -r -p \"Press any key to continue\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/scripts/setup/youtube_search.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present KenshinX and Shanti Gilbert (https://github.com/emuelec)\n\nsource /usr/bin/env.sh\njoy2keyStart\n\nromdir=\"/storage/roms/\"\n[[ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ]] && TTY=\"/dev/tty1\" || TTY=\"/dev/tty\" \n[[ \"${EE_DEVICE}\" == \"GameForce\" ]] && TTY=\"/dev/tty1\" || TTY=\"/dev/tty\"\n\nfunction buscarVideo {\nlocal f=0\nlocal f2=0\nlocal t=0\nlocal v=0\nlocal ytstreams\nlocal yttitles\nlocal yttitles2\nlocal ytthumbs\n\n\t#for t in $(seq 0 10 100) ; do sleep 1; echo ${t} | dialog --ascii-lines --backtitle \"YouTube Video para EmuElec\" --gauge \"Generando resultados de la búsqueda...\" 10 70 0; done\n\tmpv -fs \"/storage/.config/splash/youtube-1080.png\" --really-quiet\n\t\n\tytresults=$(youtube-dl --restrict-filenames -j ytsearchdate10:\"${ytSearchMode}\")\n\t\n\trm /tmp/ytresults\n\techo ${ytresults} > /tmp/ytresults\n\n\tlosid=$(grep -o '\"webpage_url\": *\"[^\"]*\"' /tmp/ytresults | grep -o '\"[^\"]*\"$' | sed 's/\"//g')\n\tlostitulos=$(grep -o '\"fulltitle\": *\"[^\"]*\"' /tmp/ytresults | grep -o '\"[^\"]*\"$' | sed 's/\"//g'| cut -c 1-50 | sed 's/|/-/g')\n\tduracionvideos=$(grep -o ', \"duration\": *[^,]*' /tmp/ytresults | grep -o '[^ ]*$')\n\tvideopreview=$(grep -o '\"thumbnail\": *\"[^\"]*\"' /tmp/ytresults | grep -o '\"[^\"]*\"$' | sed 's/\"//g' | sed 's/maxresdefault/hqdefault/g')\n\n\tfor f in ${losid}; do\n\tytstreams+=(\"${f}\")\n\tdone\n\n\tfor v in ${videopreview}; do\n\tytthumbs+=(\"${v}\")\n\tdone\n\n\tlet i=0\n\twhile read t; do\n\tyttitles+=(\"${t}\")\n\tlet i=${i}+1\n\tdone <<< \"${duracionvideos}\"\n\n\n\tlet i2=0\n\twhile read f2; do\n\tyttitles2+=(${i2} \"${f2} | $(date -d@${yttitles[i2]} -u +%H:%M:%S)\")\n\tlet i2=${i2}+1\n\tdone <<< \"${lostitulos}\"\n\n\tplayYTVideo\n}\n\nfunction playYTVideo {\nclear\nselectedstream=$(dialog --ascii-lines --backtitle \"YouTube Video for EmuElec\" --ok-label \"Play\" --column-separator \"|\" --title \"${ytResultsLabel}\"  --menu \"Select a video to play\" 0 0 0 \"${yttitles2[@]}\" 3>&2 2>&1 1>&3 > ${TTY})\nreturn_value=$?\n\n\tcase ${return_value} in\n\t0)\n\tclear\n    mpv -fs \"/storage/.config/splash/youtube-1080.png\" --really-quiet\n\t    #mpv -fs \"${ytthumbs[selectedstream]}\"\n\tyt=\"${ytstreams[selectedstream]}\"\n\n\tyoutube-dl --quiet --no-warnings -o - ${yt} | mpv - -fs --quiet --really-quiet\n#playYTVideo\n\t\n\t\n\tplayYTVideo\n\t;;\n\t1)\n\tmenuPrincipal\n\t;;\n\tesac\n\t\t\n}\n\nfunction listarPorYTBfile {\nclear\n\tytbfilelist=$(cat \"/storage/roms/mplayer/youtube.ytb\")\n\tytSearchMode=${ytbfilelist}\n\tytResultsLabel=\"Videos found on local youtube.ytb file:\"\n\tbuscarVideo\n\n}\nfunction listarPorInput {\nclear\npalabra=$(get_ee_setting youtube.searchword)\n[[ -z \"${palabra}\" ]] && palabra=\"emuelec\"\n\npalabra=$(dialog --stdout --ascii-lines --backtitle \"YouTube Video for EmuElec\" --title \"Search videos from Youtube\" --inputbox \"Type any term to search for videos\" 0 0 \"${palabra}\" > ${TTY})\nretval=$?\n\n\tcase ${retval} in\n\t0)\n\t[[ -z \"${palabra}\" ]] && palabra=\"emuelec\"\n\t#clear\n\tytSearchMode=\"${palabra}\"\n\tytResultsLabel=\"Results for: '${palabra}'\"\n\tbuscarVideo\n\t;;\n\t1)\n\tmenuPrincipal\n\t;;\n\tesac\n}\n\nfunction menuPrincipal {\nclear\nopcionmenu=$(dialog --ascii-lines --backtitle \"YouTube Video for EmuElec\" --title \"Play videos from YouTube\" --menu \"Choose an option\" 0 0 0 \"1\" \"Search videos from YouTube\" \"2\" \"Play videos from local youtube.ytb file\" 3>&2 2>&1 1>&3 > ${TTY})\n\n\tcase ${opcionmenu} in\n\t1)\n\tlistarPorInput\n\t;;\n\t2)\n\tlistarPorYTBfile\n\t;;\n\tesac\n\n}\nmenuPrincipal\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/setres.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present Joshua L (https://github.com/Langerz82)\n# 2025-present DiegroSan (https://github.com/Diegrosan)\n\n# Read the video output mode and set it for emuelec to avoid video flicking.\n\n# This file sets the hdmi output and frame buffer to the argument in pixel width.\n# Allowed argument example ./setres.sh 1080p60hz <-- For height 1080 pixels.\n\n# set -x #echo on\n\n# Source predefined functions and variables\n. /etc/profile\n\nFILE_MODE=\"/sys/class/display/mode\"\nPLATFORM=\"\"\n\n#here we look for the best framebuffer; the default is fb0, but on some devices it is fb1. Here we choose the best available,\n#thus achieving the best video performance. \nmax_area=0\nmax_fb=\"\"\n\nfor fb in /sys/class/graphics/fb*/virtual_size; do\n    if [ -f \"$fb\" ]; then\n        fb_num=$(echo \"$fb\" | grep -o 'fb[0-9]*' | sed 's/fb//')\n        size=$(cat \"$fb\")\n        width=$(echo \"$size\" | cut -d',' -f1)\n        height=$(echo \"$size\" | cut -d',' -f2)\n        area=$((width * height))\n              \n        if [ $area -gt $max_area ]; then\n            max_area=$area\n            max_fb=$fb_num\n        fi\n    fi\ndone\n\nswitch_resolution()\n{\n  local MODE=${1}\n\n  # Here we first clear the primary display buffer of leftover artifacts then set\n  # the secondary small buffers flag to stop copying across.\n\techo 1 > /sys/class/graphics/fb${max_fb}/blank\n  case ${MODE} in\n    480cvbs|576cvbs|480p*|480i*|576p*|720p*|1080p*|1440p*|2160p*|576i*|720i*|1080i*|1440i*|2160i*|*x*)\n      echo null > \"${FILE_MODE}\"\n      sleep 1\n      echo ${MODE} > \"${FILE_MODE}\"\n  esac\n\techo 0 > /sys/class/graphics/fb${max_fb}/blank\n\tNEW_MODE=$( cat ${FILE_MODE} )\n\t[[ \"${NEW_MODE}\" != \"${MODE}\" ]] && exit 1\n}\n\nget_resolution_size()\n{\n  local MODE=${1}\n\n  # Here we set the Height and Width of the particular resolution.\n  # FBW - Frame Buffer Width, PSW - Physical Screen Width.\n  # FBH - Frame Buffer Height, PSH - Physical Screen Height.\n\n  local FBW=${2}\n  local FBH=${3}\n\n  local PSW=0\n  local PSH=0\n\n  case ${MODE} in\n    480cvbs)\n      PSW=720\n      PSH=480\n      [[ -z \"${FBW}\" ]] && FBW=1024\n      [[ -z \"${FBH}\" ]] && FBH=768\n      ;;\n    576cvbs)\n      PSW=720\n      PSH=576\n      [[ -z \"${FBW}\" ]] && FBW=1024\n      [[ -z \"${FBH}\" ]] && FBH=768\n      ;;\n    480p*|480i*|576p*|720p*|1080p*|1440p*|2160p*|576i*|720i*|1080i*|1440i*|2160i*)\n      # For resolution with 2 width and height resolution numbers extract the Height.\n      # *p* stand for progressive and *i* stand for interlaced.\n      case ${MODE} in\n        *p*) PSH=$(echo ${MODE} | cut -d'p' -f 1) ;;\n        *i*) PSH=$(echo ${MODE} | cut -d'i' -f 1) ;;\n      esac\n      PSW=$(( ${PSH}*16/9 ))\n      [[ \"${MODE}\" == \"480\"* ]] && PSW=640\n      [[ -z \"${FBW}\" || ${FBW} == 0 ]] && FBW=${PSW}\n      [[ -z \"${FBH}\" || ${FBH} == 0 ]] && FBH=${PSH}\n      ;;\n    *x*)\n      PSW=$(echo ${MODE} | cut -d'x' -f 1)\n      PSH=$(echo ${MODE} | cut -d'x' -f 2 | cut -d'p' -f 1)\n      [ ! -n \"${PSH}\" ] && PSH=$(echo ${MODE} | cut -d'x' -f 2 | cut -d'i' -f 1)\n      [[ -z \"${FBW}\" || ${FBW} == 0 ]] && FBW=${PSW}\n      [[ -z \"${FBH}\" || ${FBH} == 0 ]] && FBH=${PSH}\n      ;;\n  esac\n  echo \"${FBW} ${FBH} ${PSW} ${PSH}\"\n}\n\nset_main_framebuffer() {\n  local FBW=${1}\n  local FBH=${2}\n  local BPP=32\n\n  if [[ -n \"${FBW}\" && \"${FBW}\" > 0 && -n \"${FBH}\" && \"${FBH}\" > 0 ]]; then\n    MFBH=$(( FBH*2 ))\n    fbset -fb /dev/fb$max_fb -g ${FBW} ${FBH} ${FBW} ${MFBH} ${BPP}\n    [[ -f \"/sys/class/graphics/fb$max_fb/free_scale_axis\" ]] && echo 0 0 $(( FBW-1 )) $(( FBH-1 )) > /sys/class/graphics/fb$max_fb/free_scale_axis\n    [[ -f \"/sys/class/graphics/fb$max_fb/free_scale\" ]] && echo 0 > /sys/class/graphics/fb$max_fb/free_scale\n    [[ -f \"/sys/class/graphics/fb$max_fb/freescale_mode\" ]] && echo 0 > /sys/class/graphics/fb$max_fb/freescale_mode\n  fi\n}\n\nset_fb_borders() {\n\tlocal CUSTOM_OFFSETS=( ${1} ${2} ${3} ${4} )\n\tlocal COUNT_ARGS=${#CUSTOM_OFFSETS[@]}\n\tif [[ \"${COUNT_ARGS}\" == \"4\" ]]; then\n\t  echo ${CUSTOM_OFFSETS[@]} > /sys/class/graphics/fb$max_fb/window_axis\n\t  echo 1 > /sys/class/graphics/fb$max_fb/freescale_mode\n\t  echo 0x10001 > /sys/class/graphics/fb$max_fb/free_scale\n\tfi\n}\n\n\n\n# Here we initialize any arguments and variables to be used in the script.\n# The Mode we want the display to change too.\n\nMODE=$( cat ${FILE_MODE} )\nBPP=32\n\nES_MODE=\"\"\n\nif [[ $# == 1 ]]; then\n\tMODE=${1}\n\tES_MODE=\"ee_es.\"\nfi\n\nif [[ $# == 2 ]]; then\n\tMODE=${1}\n\tPLATFORM=${2}\nfi\n\nif [[ $# == 3 ]]; then\n\tMODE=${1}\n\tPLATFORM=${2}\n\tROMNAME=${3}\nfi\n\nFBW=0\nFBH=0\n\n# The current display mode before it may get changed below.\nOLD_MODE=$( cat ${FILE_MODE} )\n\nBORDER_VALS=$(get_ee_setting ee_videowindow)\n\n# Legacy code, we use to set the buffer that is used for small parts of graphics\n# like Cursors and Fonts but setting default 32 made ES Fonts dissappear.\nBUFF=$(get_ee_setting ee_video_fb1_size)\n[[ -z \"${BUFF}\" ]] && BUFF=32\n\nif [[ -n \"${BUFF}\" ]] && [[ ${BUFF} > 0 ]]; then\n\t[[ \"${max_fb}\" == 0 ]] && fbset -fb /dev/fb1 -g ${BUFF} ${BUFF} ${BUFF} ${BUFF} ${BPP}\n\t[[ \"${max_fb}\" == 1 ]] && fbset -fb /dev/fb0 -g ${BUFF} ${BUFF} ${BUFF} ${BUFF} ${BPP}\nfi\n\n# This is needed to reset scaling.\n[[ -f \"/sys/class/ppmgr/ppscaler\" ]] && echo 0 > /sys/class/ppmgr/ppscaler\n\n# Option too Custom set the CVBS Resolution by creating a cvbs_resolution.txt file.\n# File contents must just 2 different integers seperated by a space. e.g. 800 600.\nCVBS_RES_FILE=\"/storage/.config/cvbs_resolution.txt\"\nif [[ \"${MODE}\" == *\"cvbs\" ]]; then\n  if [[ -f \"${CVBS_RES_FILE}\" ]]; then\n    declare -a CVBS_RES=($(cat \"${CVBS_RES_FILE}\"))\n    if [[ ! -z \"${CVBS_RES[@]}\" ]]; then\n        FBW=${CVBS_RES[0]}\n        FBH=${CVBS_RES[1]}\n    fi\n  fi\nfi\n\nCUSTOM_RES=$(get_ee_setting ${ES_MODE}framebuffer \"${PLATFORM}\" \"${ROMNAME}\")\n#[[ -z \"${CUSTOM_RES}\" ]] && CUSTOM_RES=$(get_ee_setting ee_framebuffer.${MODE})\nif [[ ! -z \"${CUSTOM_RES}\" ]]; then\n  declare -a RES=($(echo \"${CUSTOM_RES}\"))\n  if [[ ! -z \"${RES[@]}\" ]]; then\n      FBW=${RES[0]}\n      FBH=${RES[1]}\n  fi\nfi\n\nif [[ ${OLD_MODE} != ${MODE} ]]; then\n\tswitch_resolution ${MODE}\nfi\nMODE=$( cat ${FILE_MODE} )\n\ndeclare -a SIZE=($( get_resolution_size ${MODE} ${FBW} ${FBH}))\n\nFBW=${SIZE[0]}\nFBH=${SIZE[1]}\nPSW=${SIZE[2]}\nPSH=${SIZE[3]}\n\nif [[ \"${EE_DEVICE}\" == \"Amlogic\" ]]; then\n  FBW=1920\n  FBH=1080\nfi\n\n# Once we know the Width and Height is valid numbers we set the primary display\n# buffer, and we multiply the 2nd height by a factor of 2 I assume for interlaced \n# support.\nCURRENT_SIZE=\"$( fbset -fb /dev/fb${max_fb} | grep geometry | cut -d' ' -f2-3 )\"\nNEW_SIZE=\"${FBW} ${FBH}\"\nif [[ \"${CURRENT_SIZE}\" != \"${NEW_SIZE}\" ]]; then\n\temuelec-utils blank_buffer\n  echo \"SET MAIN FRAME BUFFER\"\n  set_main_framebuffer ${FBW} ${FBH} \nfi\n\n# Now that the primary buffer has been acquired we blank it again because the new\n# memory allocated, may contain garbage artifact data.\n\n# Legacy code - I have no idea about these values but apparently they should\n# make cvbs display properly. The values go over the real values which leads me\n# to believe that cvbs uses longer pixel ranges because of overscanning.\ndeclare -a CUSTOM_OFFSETS\nif [[ -f \"/storage/.config/${MODE}_offsets\" ]]; then\n  CUSTOM_OFFSETS=( $( cat \"/storage/.config/${MODE}_offsets\" ) )\nfi\n\nOFFSET_SETTING=$(get_ee_setting ${ES_MODE}framebuffer_border \"${PLATFORM}\" \"${ROMNAME}\")\n#[[ -z \"${OFFSET_SETTING}\" ]] && OFFSET_SETTING=\"$(get_ee_setting ${MODE}.ee_offsets)\"\nif [[ ! -z \"${OFFSET_SETTING}\" ]]; then\n  CUSTOM_OFFSETS=( ${OFFSET_SETTING} )\n\tCUSTOM_OFFSETS[2]=$(( ${PSW} - CUSTOM_OFFSETS[2] - 1 ))\n\tCUSTOM_OFFSETS[3]=$(( ${PSH} - CUSTOM_OFFSETS[3] - 1 ))\nfi\n\n# Now that the primary buffer has been acquired we blank it again because the new\n# memory allocated, may contain garbage artifact data.\nCOUNT_ARGS=${#CUSTOM_OFFSETS[@]}\nif [[ -z \"${OFFSET_SETTING}\" ]] && [[ \"${MODE}\" == *\"cvbs\" ]]; then\n  if [[ \"${COUNT_ARGS}\" == \"0\" ]]; then\n    [[ \"${MODE}\" == \"480cvbs\" ]] && CUSTOM_OFFSETS=\"30 10 669 469\"\n    [[ \"${MODE}\" == \"576cvbs\" ]] && CUSTOM_OFFSETS=\"35 20 680 565\"\n  fi\nfi\n\nCOUNT_ARGS=${#CUSTOM_OFFSETS[@]}\nif [[ \"${COUNT_ARGS}\" == \"0\" ]] && [[ ${FBW} != ${PSW} || ${FBH} != ${PSH} ]]; then\n\tCUSTOM_OFFSETS=(0 0 $(( PSW - 1 )) $(( PSH - 1 )))\nelif [[ \"${COUNT_ARGS}\" == \"2\" ]]; then\n  TMP=\"${CUSTOM_OFFSETS[0]}\"\n  CUSTOM_OFFSETS[2]=$(( ${PSW} - ${TMP} - 1 ))\n  TMP=\"${CUSTOM_OFFSETS[1]}\"\n  CUSTOM_OFFSETS[3]=$(( ${PSH} - ${TMP} - 1 ))\nfi\n\nif [[ \"${#CUSTOM_OFFSETS[@]}\" == \"4\" ]]; then\n\tset_fb_borders ${CUSTOM_OFFSETS[@]}\n  exit 0\nfi\n\n# Gets the default X, and Y position offsets for cvbs so the display can fit \n# inside the actual analog diplay resolution which is a bit smaller than the \n# resolution it's usually transmitted as.\ndeclare -a BORDERS\nBORDER_VALS=$(get_ee_setting ee_videowindow)\nif [[ ! -z \"${BORDER_VALS}\" ]]; then\n  BORDERS=(${BORDER_VALS})\n  COUNT_ARGS=${#BORDERS[@]}\n  if [[ ${COUNT_ARGS} != 4 && ${COUNT_ARGS} != 2 ]]; then\n    exit 0\n  fi\n  A1=${BORDERS[0]}\n  A2=${BORDERS[1]}\n  A3=${BORDERS[2]}\n  [[ -z \"${A3}\" ]] && A3=${PSW}\n  A4=${BORDERS[3]}\n  [[ -z \"${A4}\" ]] && A4=${PSH}\n\n  if [[ ! -n \"${A1}\" || ! -n \"${A2}\" || ! -n \"${A3}\" || ! -n \"${A4}\" ]]; then\n    exit 0\n  fi\n  A3=$(( PSW-A1-1 ))\n  A4=$(( PSH-A2-1 ))\n\tset_fb_borders ${A1} ${A2} ${A3} ${A4}\nfi\n# End Legacy code\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/setsettings.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# I use ${} for easier reading\n\n# IMPORTANT: This script should not return (echo) anything other than the shader if its set\n\n. /etc/profile\n\nLOGGING=0\n[[ \"$(get_es_setting string LogLevel)\" == \"debug\" ]] && LOGGING=1\nLOG=/emuelec/logs/setsettings.log\n\nRETROARCHIVEMENTS=(3do arcade atari2600 atari7800 atarilynx coleco colecovision famicom fbn fbneo fds gamegear gb gba gbc lynx mame genesis mastersystem megadrive megadrive-japan msx n64 neogeo nes ngp pcengine pcfx pokemini psx saturn sega32x segacd sfc sg-1000 snes tg16 vectrex virtualboy wonderswan)\nNOREWIND=(sega32x zxspectrum odyssey2 mame n64 dreamcast atomiswave naomi neogeocd saturn psp pspminis)\nNORUNAHEAD=(psp sega32x n64 dreamcast atomiswave naomi neogeocd saturn)\n\nINDEXRATIOS=(4/3 16/9 16/10 16/15 21/9 1/1 2/1 3/2 3/4 4/1 9/16 5/4 6/5 7/9 8/3 8/7 19/12 19/14 30/17 32/9 config squarepixel core custom full)\nCONF=\"/storage/.config/emuelec/configs/emuelec.conf\"\nexport RA_CONF=\"/storage/.config/retroarch/retroarch.cfg\"\nRACORECONF=\"/storage/.config/retroarch/retroarch-core-options.cfg\"\n\nTMP_RACONF=\"/tmp/ra_merge_settings.cfg\"\nRACONF=\"${TMP_RACONF}\"\n\nif [ \"${LOGGING}\" ]; then \necho \"Setsettings Log ${RACONF}\" > \"${LOG}\"\nfi\n\nPLATFORM=${1,,}\nCORE=${3,,}\nROM=\"${2##*/}\"\nROM=\"$(printf '%s' \"${ROM}\" | sed 's/\\([][]\\)/\\\\\\1/g')\"\nSETF=0\nSHADERSET=0\nAUTOLOAD=\"false\"\n\n#bezels\nISBEZEL=\"false\"\nIRBEZEL=\"22\"\n\n#Autosave\nAUTOSAVE=\"$@\"\nAUTOSAVE=\"${AUTOSAVE#*--autosave=*}\"\nAUTOSAVE=\"${AUTOSAVE% --*}\"\n\n#Snapshot\nSNAPSHOT=\"$@\"\nSNAPSHOT=\"${SNAPSHOT#*--snapshot=*}\"\nSNAPSHOT=\"${SNAPSHOT% --*}\"\n\n\nwrite_log() {\n\tlocal timestamp\n    timestamp=\"$(date '+%Y-%m-%d %H:%M:%S')\"\n    \n\t[[ \"${LOGGING}\" ]] && echo \"${timestamp} : ${1}\" >> \"${LOG}\"\n}\n\n# Helper function: check if array contains value\narray_contains() {\n    local seeking=$1; shift\n    local element\n    for element; do\n        [[ \"$element\" == \"$seeking\" ]] && return 0\n    done\n    return 1\n}\n\n# Helper function: write boolean setting\nwrite_bool() {\n    local key=$1\n    local value=$2\n    [ \"$value\" == \"1\" ] && echo \"${key} = \\\"true\\\"\" >> ${RACONF} || echo \"${key} = \\\"false\\\"\" >> ${RACONF}\n}\n\n#Self language retroarch\nEE_LANG=$(get_ee_setting system.language)\n\ncase \"${EE_LANG}\" in\n    pt_BR|pt_PT) LANGEMUELEC=\"7\" ;;\n    en_US|en_GB) LANGEMUELEC=\"0\" ;;\n    fr_FR)       LANGEMUELEC=\"2\" ;;\n    es_ES|es_MX|eu_ES) LANGEMUELEC=\"3\" ;;\n    de_DE)       LANGEMUELEC=\"4\" ;;\n    it_IT)       LANGEMUELEC=\"5\" ;;\n    tr_TR)       LANGEMUELEC=\"18\" ;;\n    zh_CN)       LANGEMUELEC=\"12\" ;;\n    zh_TW)       LANGEMUELEC=\"11\" ;;\n    ko_KR)       LANGEMUELEC=\"10\" ;;\n    ja_JP)       LANGEMUELEC=\"1\" ;;\n    ru_RU)       LANGEMUELEC=\"9\" ;;\n    nl_NL)       LANGEMUELEC=\"6\" ;;\n    pl_PL)       LANGEMUELEC=\"14\" ;;\n    sv_SE)       LANGEMUELEC=\"25\" ;;\n    hu_HU)       LANGEMUELEC=\"31\" ;;\n    cs_CZ)       LANGEMUELEC=\"27\" ;;\n    *)           LANGEMUELEC=\"0\" ;;\nesac\n\necho \"user_language = ${LANGEMUELEC}\" >> ${TMP_RACONF}\n\nwrite_log \"Set Language to ${EE_LANG} Retroarch: ${LANGEMUELEC}\"\n\nEE_RUMBLE=$(get_ee_setting ee_rumble_strength)\n[[ -z \"${EE_RUMBLE}\" ]] && EE_RUMBLE=0\nEE_RUMBLE_VAL=0\n[[ \"${EE_RUMBLE}\" -gt 0 ]] && EE_RUMBLE_VAL=1\nwrite_bool \"input_enable_vibration\" \"${EE_RUMBLE_VAL}\"\n\necho \"input_vibration_vibe_strength  = \\\"${EE_RUMBLE}\\\"\" >> ${TMP_RACONF}\nwrite_log \"Set Input Vibration Strength to ${EE_RUMBLE}\"\n\n# For the new snapshot save state manager we need to set the path to be /storage/roms/savestates/[PLATFORM]\nmkdir -p \"/storage/roms/savestates/${PLATFORM}\"\n\ncat >> ${RACONF} << EOF\nsavestates_in_content_dir = \"false\"\nsort_savefiles_by_content_enable = \"false\"\nsort_savefiles_enable = \"false\"\nsort_savestates_by_content_enable = \"false\"\nsort_savestates_enable = \"false\"\nsavestate_directory = \"/storage/roms/savestates/${PLATFORM}\"\nEOF\n\nfunction default_settings() {\n# IMPORTANT: Every setting we change should have a default value here\n    cat >> ${RACONF} << EOF\nvideo_scale_integer = \"false\"\nvideo_scale_integer_overscale = \"false\"\nvideo_shader = \"\"\nvideo_shader_enable = \"false\"\nvideo_smooth = \"false\"\naspect_ratio_index = \"22\"\nrewind_enable = \"false\"\nrun_ahead_enabled = \"false\"\nrun_ahead_frames = \"1\"\nrun_ahead_secondary_instance = \"false\"\nsavestate_auto_save = \"false\"\nsavestate_auto_load = \"false\"\ncheevos_enable = \"false\"\ncheevos_username = \"\"\ncheevos_password = \"\"\ncheevos_hardcore_mode_enable = \"false\"\ncheevos_start_active = \"false\"\ncheevos_leaderboards_enable = \"false\"\ncheevos_verbose_enable = \"false\"\ncheevos_auto_screenshot = \"false\"\nai_service_mode = \"0\"\nai_service_enable = \"false\"\nai_service_source_lang = \"0\"\nai_service_url = \"\"\ninput_libretro_device_p1 = \"1\"\nfps_show = \"false\"\nnetplay = \"false\"\nvideo_oga_vertical_enable = \"false\"\nvideo_ogs_vertical_enable = \"false\"\nvideo_ctx_scaling = \"false\"\nvideo_frame_delay_auto = \"false\"\nEOF\n}\n\nfunction set_setting() {\n# we set the setting on the configuration file\n\nwrite_log \"Called \\\"${1}\\\" with \\\"${2}\\\"\"\n\ncase ${1} in\n    \"ratio\")\n    if [[ -z \"${2}\" || \"${2}\" == \"none\" || \"${2}\" == \"0\" ]]; then\n        # 22 is the \"Core Provided\" aspect ratio and its set by default if no other is selected\n        echo 'aspect_ratio_index = \"22\"' >> ${RACONF}\n    else\n    for i in \"${!INDEXRATIOS[@]}\"; do\n        if [[ \"${INDEXRATIOS[${i}]}\" = \"${2}\" ]]; then\n            break\n        fi\n    done\n        echo \"aspect_ratio_index = \\\"${i}\\\"\"  >> ${RACONF}\n        IRBEZEL=\"${i}\"\n    fi\n    ;;\n    \"smooth\")\n        write_bool \"video_smooth\" \"${2}\"\n    ;;\n    \"rewind\")\n        if array_contains \"${PLATFORM}\" \"${NOREWIND[@]}\"; then\n            echo 'rewind_enable = \"false\"' >> ${RACONF}\n        else\n            write_bool \"rewind_enable\" \"${2}\"\n        fi\n    ;;\n    \"autosave\")\n        if [[ -z \"${AUTOSAVE}\" || \"${AUTOSAVE}\" == \"0\" ]]; then\n            echo 'savestate_auto_save = \"false\"' >> ${RACONF}\n            echo 'savestate_auto_load = \"false\"' >> ${RACONF}\n        else\n        write_log \"Autosave ${AUTOSAVE}\"\n            echo 'savestate_auto_save = \"true\"' >> ${RACONF}\n            echo 'savestate_auto_load = \"true\"' >> ${RACONF}\n            AUTOLOAD=\"true\"\n        fi\n    ;;\n    \"snapshot\")\n        if [[ ! -z \"${SNAPSHOT}\" ]]; then\n            echo \"state_slot = \\\"${SNAPSHOT}\\\"\" >> ${RACONF}\n        else\n            if [[ \"${AUTOLOAD}\" == \"false\" ]]; then\n                echo 'savestate_auto_save = \"false\"' >> ${RACONF}\n                echo 'savestate_auto_load = \"false\"' >> ${RACONF}\n            fi\n            echo 'state_slot = \"0\"' >> ${RACONF}\n        fi\n    ;;\n    \"integerscale\")\n        write_bool \"video_scale_integer\" \"${2}\"\n        [ \"${2}\" == \"1\" ] && ISBEZEL=\"true\" || ISBEZEL=\"false\"\n    ;;\n    \"integerscaleoverscale\")\n\t\tcase \"${2}\" in\n\t\t\t\"1\")\n\t\t\t\techo 'video_scale_integer_scaling = \"1\"' >> \"${RACONF}\"\n\t\t\t\techo 'video_scale_integer_axis = \"1\"' >> \"${RACONF}\"\n\t\t\t;;\n\t\t\t\"2\")\n\t\t\t\techo 'video_scale_integer_scaling = \"2\"' >> \"${RACONF}\"\n\t\t\t\techo 'video_scale_integer_axis = \"1\"' >> \"${RACONF}\"\n\t\t\t;;\n\t\t\t*)\n\t\t\t\techo 'video_scale_integer_overscale = \"0\"' >> \"${RACONF}\"\n\t\t\t\techo 'video_scale_integer_axis = \"0\"' >> \"${RACONF}\"\n\t\t\t;;\nesac\n    ;;\n    \"rgascale\")\n        write_bool \"video_ctx_scaling\" \"${2}\"\n    ;;\n    \"shaderset\")\n        if [[ -z \"${2}\" || \"${2}\" == \"none\" || \"${2}\" == \"0\" ]]; then\n            echo 'video_shader_enable = \"false\"' >> ${RACONF}\n            echo 'video_shader = \"\"' >> ${RACONF}\n        else\n            echo \"video_shader = \\\"${2}\\\"\" >> ${RACONF}\n            echo 'video_shader_enable = \"true\"' >> ${RACONF}\n            echo \"--set-shader /tmp/shaders/${2}\"\n        fi\n    ;;\n    \"runahead\")\n    if ! array_contains \"${PLATFORM}\" \"${NORUNAHEAD[@]}\"; then\n        if [[ -z \"${2}\" || \"${2}\" == \"none\" || \"${2}\" == \"0\" ]]; then\n            echo 'run_ahead_enabled = \"false\"' >> ${RACONF}\n            echo 'run_ahead_frames = \"1\"' >> ${RACONF}\n        else\n            echo 'run_ahead_enabled = \"true\"' >> ${RACONF}\n            echo \"run_ahead_frames = \\\"${2}\\\"\" >> ${RACONF}\n        fi\n\tfi\n    ;;\n    \"secondinstance\")\n        if ! array_contains \"${PLATFORM}\" \"${NORUNAHEAD[@]}\"; then\n        write_bool \"run_ahead_secondary_instance\" \"${2}\"\n        fi\n    ;;\n    \"video_frame_delay_auto\")\n        write_bool \"video_frame_delay_auto\" \"${2}\"\n    ;;\n    \"ai_service_enabled\")\n        if [[ -z \"${2}\" || \"${2}\" == \"none\" || \"${2}\" == \"0\" ]]; then\n            echo 'ai_service_enable = \"false\"' >> ${RACONF}\n        else\n            echo 'ai_service_enable = \"true\"' >> ${RACONF}\n            AI_LANG=$(get_setting \"ai_target_lang\")\n            AI_URL=$(get_setting \"ai_service_url\")\n            [[ -z \"${AI_LANG}\" ]] && AI_LANG=\"0\"\n            echo \"ai_service_source_lang = \\\"${AI_LANG}\\\"\" >> ${RACONF}\n            if [[ -z \"${AI_URL}\" || \"${AI_URL}\" == \"auto\" || \"${AI_URL}\" == \"none\" ]]; then\n                echo \"ai_service_url = \\\"http://ztranslate.net/service?api_key=BATOCERA&mode=Fast&output=png&target_lang=${AI_LANG}\\\"\" >> ${RACONF}\n            else\n                echo \"ai_service_url = \\\"${AI_URL}&mode=Fast&output=png&target_lang=${AI_LANG}\\\"\" >> ${RACONF}\n            fi\n        fi\n    ;;\n    \"retroachievements\")\n        if [[ $(array_contains \"${PLATFORM}\" \"${RETROARCHIVEMENTS[@]}\") && \"${2}\" == \"1\" ]]; then\n            # Batch read all retroachievements settings at once\n            local RA_USER=$(get_setting \"retroachievements.username\")\n            local RA_PASS=$(get_setting \"retroachievements.password\")\n            local RA_HARD=$(get_setting \"retroachievements.hardcore\")\n            local RA_ENCORE=$(get_setting \"retroachievements.encore\")\n            local RA_LEAD=$(get_setting \"retroachievements.leaderboards\")\n            local RA_VERB=$(get_setting \"retroachievements.verbose\")\n            local RA_SCREEN=$(get_setting \"retroachievements.screenshot\")\n            \n            echo 'cheevos_enable = \"true\"' >> ${RACONF}\n            echo \"cheevos_username = \\\"${RA_USER}\\\"\"  >> ${RACONF}\n            echo \"cheevos_password = \\\"${RA_PASS}\\\"\"  >> ${RACONF}\n                    # retroachievements_hardcore_mode\n            write_bool \"cheevos_hardcore_mode_enable\" \"${RA_HARD}\"\n                    # retroachievements_encore_mode\n            write_bool \"cheevos_start_active\" \"${RA_ENCORE}\"\n                    # retroachievements_leaderboards\n            write_bool \"cheevos_leaderboards_enable\" \"${RA_LEAD}\"\n                    # retroachievements_verbose_mode\n            write_bool \"cheevos_verbose_enable\" \"${RA_VERB}\"\n                    # retroachievements_automatic_screenshot\n            write_bool \"cheevos_auto_screenshot\" \"${RA_SCREEN}\"\n            if [ \"${RA_SCREEN}\" == \"1\" ]; then \n\t\t\t\techo 'cheevos_auto_screenshot = \"true\"' >> ${RACONF}\n\t\t\t\techo 'screenshot_directory = \"/roms/screenshots\"' >> ${RACONF}\n\t\t\t\tmkdir -p \"/roms/screenshots\"\n            else\n\t\t\t\techo 'cheevos_auto_screenshot = \"false\"' >> ${RACONF}\n            fi\n\t\telse\n            cat >> ${RACONF} << EOF\ncheevos_enable = \"false\"\ncheevos_username = \"\"\ncheevos_password = \"\"\ncheevos_hardcore_mode_enable = \"false\"\ncheevos_start_active = \"false\"\ncheevos_leaderboards_enable = \"false\"\ncheevos_verbose_enable = \"false\"\ncheevos_auto_screenshot = \"false\"\nEOF\n        fi\n    ;;\n    \"netplay\")\n        if [[ -z \"${2}\" || \"${2}\" == \"none\" || \"${2}\" == \"0\" ]]; then\n            echo 'netplay = \"false\"' >> ${RACONF}\n        else\n            echo 'netplay = \"true\"' >> ${RACONF}\n            \n            # Batch read netplay settings\n            local NP_MODE=$(get_setting \"netplay.mode\")\n            local NP_PORT=$(get_setting \"netplay.port\")\n            local NP_IP=$(get_setting \"netplay.server.ip\")\n            local NP_SPORT=$(get_setting \"netplay.server.port\")\n            local NP_PASS=$(get_setting \"netplay.password\")\n            local NP_SPASS=$(get_setting \"netplay.spectatepassword\")\n            local NP_PUBLIC=$(get_setting \"netplay_public_announce\")\n            local NP_RELAY=$(get_setting \"netplay.relay\")\n            local NP_FRAMES=$(get_setting \"netplay.frames\")\n            local NP_NICK=$(get_setting \"netplay.nickname\")\n\n        # Security : hardcore mode disables save states, which would kill netplay\n\t# double check if this is not a duplicated entry when it \n            echo 'cheevos_hardcore_mode_enable = \"false\"' >> ${RACONF}\n\n            if [[ \"${NP_MODE}\" == \"host\" ]]; then\n        # Quite strangely, host mode requires netplay_mode to be set to false when launched from command line\n                echo 'netplay_mode = \"false\"' >> ${RACONF}\n                echo 'netplay_client_swap_input = \"false\"' >> ${RACONF}\n                echo \"netplay_ip_port = \\\"${NP_PORT}\\\"\" >> ${RACONF}\n            elif [[ \"${NP_MODE}\" == \"client\" || \"${NP_MODE}\" == \"spectator\" ]]; then\n        # But client needs netplay_mode = true ... bug ?\n                echo 'netplay_mode = \"true\"' >> ${RACONF}\n                echo \"netplay_ip_address = \\\"${NP_IP}\\\"\" >> ${RACONF}\n                echo \"netplay_ip_port = \\\"${NP_SPORT}\\\"\" >> ${RACONF}\n                echo 'netplay_client_swap_input = \"true\"' >> ${RACONF}\n            fi\n\n            [[ \"${NP_MODE}\" == \"spectator\" ]] && echo 'netplay_start_as_spectator = \"true\"' >> ${RACONF}\n\n            if [[ -n \"${NP_PASS}\" && \"${NP_PASS}\" != \"none\" && \"${NP_PASS}\" != \"false\" ]]; then\n                echo \"netplay_password = \\\"${NP_PASS}\\\"\" >> ${RACONF}\n            fi\n\n            if [[ -n \"${NP_SPASS}\" && \"${NP_SPASS}\" != \"none\" && \"${NP_SPASS}\" != \"false\" ]]; then\n                echo \"netplay_spectate_password = \\\"${NP_SPASS}\\\"\" >> ${RACONF}\n            fi\n\n        # Netplay hide the gameplay\n            if [[ -n \"${NP_PUBLIC}\" && \"${NP_PUBLIC}\" != \"none\" && \"${NP_PUBLIC}\" != \"false\" ]]; then\n                echo 'netplay_public_announce = \"true\"' >> ${RACONF}\n            else\n                echo 'netplay_public_announce = \"false\"' >> ${RACONF}\n            fi\n\n            if [[ -n \"${NP_RELAY}\" && \"${NP_RELAY}\" != \"none\" && \"${NP_RELAY}\" != \"false\" ]]; then\n                echo 'netplay_use_mitm_server = \"true\"'  >> ${RACONF}\n                echo \"netplay_mitm_server = \\\"${NP_RELAY}\\\"\" >> ${RACONF}\n            else\n                echo 'netplay_use_mitm_server = \"false\"' >> ${RACONF}\n            fi\n\n            echo \"netplay_delay_frames = \\\"${NP_FRAMES}\\\"\" >> ${RACONF}\n            echo \"netplay_nickname = \\\"${NP_NICK}\\\"\" >> ${RACONF}\n        fi\n    ;;\n    \"fps\")\n    # Display FPS in Retroarch\n        local SHOWFPS=$(get_setting \"showFPS\")\n        write_bool \"fps_show\" \"${SHOWFPS}\"\n    ;;\n    \"vertical\")\n    # Vertical orientation game\n    if [ \"${2}\" == \"1\" ]; then\n        echo 'video_oga_vertical_enable = \"true\"' >> ${RACONF}\n   \n            local VERT_ASP=$(get_setting \"vert_aspect\")\n            if [[ -z \"${VERT_ASP}\"  || \"${VERT_ASP}\" == \"none\" || \"${VERT_ASP}\" == \"0\" || \"${VERT_ASP}\" == \"1\" ]]; then\n                echo 'aspect_ratio_index = \"1\"' >> ${RACONF}\n                IRBEZEL=\"1\"\n            else\n                echo \"aspect_ratio_index = \\\"${VERT_ASP}\\\"\" >> ${RACONF}\n                IRBEZEL=\"${VERT_ASP}\"\n            fi\n            \n            case \"$(oga_ver)\" in\n                \"OGA\")\n                    [ -f \"/tmp/joypads/GO-Advance Gamepad_vertical.cfg\" ] && {\n                        mv \"/tmp/joypads/GO-Advance Gamepad.cfg\" \"/tmp/joypads/GO-Advance Gamepad_horizontal.cfg\"\n                        mv \"/tmp/joypads/GO-Advance Gamepad_vertical.cfg\" \"/tmp/joypads/GO-Advance Gamepad.cfg\"\n                    }\n                ;;\n                \"OGABE\")\n                    [ -f \"/tmp/joypads/GO-Advance Gamepad (rev 1.1)_vertical.cfg\" ] && {\n                        mv \"/tmp/joypads/GO-Advance Gamepad (rev 1.1).cfg\" \"/tmp/joypads/GO-Advance Gamepad (rev 1.1)_horizontal.cfg\"\n                        mv \"/tmp/joypads/GO-Advance Gamepad (rev 1.1)_vertical.cfg\" \"/tmp/joypads/GO-Advance Gamepad (rev 1.1).cfg\"\n                    }\n                ;;\n                \"OGS\")\n                    echo 'video_ogs_vertical_enable = \"true\"' >> ${RACONF}\n                    [ -f \"/tmp/joypads/GO-Super Gamepad_vertical.cfg\" ] && {\n                        mv \"/tmp/joypads/GO-Super Gamepad.cfg\" \"/tmp/joypads/GO-Super Gamepad_horizontal.cfg\"\n                        mv \"/tmp/joypads/GO-Super Gamepad_vertical.cfg\" \"/tmp/joypads/GO-Super Gamepad.cfg\"\n                    }\n                ;;\n            esac\n        else\n            echo 'video_oga_vertical_enable = \"false\"' >> ${RACONF}\n            echo 'video_ogs_vertical_enable = \"false\"' >> ${RACONF}\n\n            case \"$(oga_ver)\" in\n                \"OGA\")\n                    [ -f \"/tmp/joypads/GO-Advance Gamepad_horizontal.cfg\" ] && {\n                        mv \"/tmp/joypads/GO-Advance Gamepad.cfg\" \"/tmp/joypads/GO-Advance Gamepad_vertical.cfg\"\n                        mv \"/tmp/joypads/GO-Advance Gamepad_horizontal.cfg\" \"/tmp/joypads/GO-Advance Gamepad.cfg\"\n                    }\n                ;;\n                \"OGABE\")\n                    [ -f \"/tmp/joypads/GO-Advance Gamepad (rev 1.1)_horizontal.cfg\" ] && {\n                        mv \"/tmp/joypads/GO-Advance Gamepad (rev 1.1).cfg\" \"/tmp/joypads/GO-Advance Gamepad (rev 1.1)_vertical.cfg\"\n                        mv \"/tmp/joypads/GO-Advance Gamepad (rev 1.1)_horizontal.cfg\" \"/tmp/joypads/GO-Advance Gamepad (rev 1.1).cfg\"\n                    }\n                ;;\n                \"OGS\")\n                    [ -f \"/tmp/joypads/GO-Super Gamepad_horizontal.cfg\" ] && {\n                        mv \"/tmp/joypads/GO-Super Gamepad.cfg\" \"/tmp/joypads/GO-Super Gamepad_vertical.cfg\"\n                        mv \"/tmp/joypads/GO-Super Gamepad_horizontal.cfg\" \"/tmp/joypads/GO-Super Gamepad.cfg\"\n                    }\n                ;;\n            esac\n        fi\n    ;;\nesac\n}\n\nfunction get_setting() {\n   ees -e -r \"${1}\" -p \"${PLATFORM}\" -m \"${ROM}\"\n}\n\nfor s in ratio smooth shaderset rewind autosave integerscale integerscaleoverscale runahead secondinstance video_frame_delay_auto retroachievements ai_service_enabled netplay fps vertical rgascale snapshot; do\nEES=$(get_setting ${s})\nset_setting \"${s}\" \"${EES}\"\n[ -z \"${EES}\" ] || SETF=1\ndone\n\n# If no setting was changed, set all options to default on the configuration files\n[ ${SETF} == 0 ] && default_settings\n\n# Core-specific configurations, these settings should probably be moved to other file or script\n# TODO: Need to check if file exists first, it may contain other settings that we do not want to remove.\nif [ \"${CORE}\" == \"atari800\" ]; then\nATARICONF=\"/storage/.config/emuelec/configs/atari800.cfg\"\nATARI800CONF=\"/storage/.config/retroarch/config/Atari800/Atari800.opt\"\n\n    if [ \"${PLATFORM}\" == \"atari5200\" ]; then\n        cat > \"${ATARI800CONF}\" << EOF\natari800_system = \"5200\"\nEOF\n        cat > \"${ATARICONF}\" << EOF\nRAM_SIZE=16\nSTEREO_POKEY=0\nBUILTIN_BASIC=0\nEOF\n        echo 'atari800_system = \"5200\"' >> ${RACORECONF}\n    else\n        cat > \"${ATARI800CONF}\" << EOF\natari800_system = \"800XL (64K)\"\nEOF\n        cat > \"${ATARICONF}\" << EOF\nRAM_SIZE=64\nSTEREO_POKEY=1\nBUILTIN_BASIC=1\nEOF\n        echo 'atari800_system = \"800XL (64K)\"' >> ${RACORECONF}\n    fi\nfi\n\nif [ \"${PLATFORM}\" == \"amstradgx4000\" ]; then\n# Make sure cap32_model is set to \"6128+ (experimental)\"\nCAP32CONF=\"/storage/.config/retroarch/config/cap32/cap32.opt\"\n    cat > \"${CAP32CONF}\" << EOF\ncap32_model = \"6128+ (experimental)\"\ncap32_gfx_colors = \"24bit\"\nEOF\nfi\n\nif [ \"${PLATFORM}\" == \"amstradcpc\" ]; then\n# But amstradcpc wants cap32_model set to \"6128\"\nCAP32CONF=\"/storage/.config/retroarch/config/cap32/cap32.opt\"\n   cat > \"${CAP32CONF}\" << EOF\ncap32_model = \"6128\"\ncap32_gfx_colors = \"16bit\"\nEOF\nfi\n\nif [ \"${CORE}\" == \"gambatte\" ]; then\nGAMBATTECONF=\"/storage/.config/retroarch/config/Gambatte/Gambatte.opt\"\n    COLORIZE=$(get_setting \"renderer.colorization\")\n    \n    write_log \"Gambatte Colorization: ${COLORIZE}\"\n    \n    if [[ -z \"${COLORIZE}\" || \"${COLORIZE}\" == \"auto\"  ||  \"${COLORIZE}\" == \"none\" ]]; then\n        cat > \"${GAMBATTECONF}\" << EOF\ngambatte_gb_colorization = \"disabled\"\ngambatte_gb_internal_palette = \"\"\nEOF\n        cat >> ${RACORECONF} << EOF\ngambatte_gb_colorization = \"disabled\"\ngambatte_gb_internal_palette = \"\"\nEOF\n    elif [ \"${COLORIZE}\" == \"GBC\" ]; then\n        cat > \"${GAMBATTECONF}\" << EOF\ngambatte_gb_colorization = \"GBC\"\ngambatte_gb_internal_palette = \"\"\nEOF\n        cat >> ${RACORECONF} << EOF\ngambatte_gb_colorization = \"GBC\"\ngambatte_gb_internal_palette = \"\"\nEOF\n    elif [ \"${COLORIZE}\" == \"SGB\" ]; then\n        cat > \"${GAMBATTECONF}\" << EOF\ngambatte_gb_colorization = \"SGB\"\ngambatte_gb_internal_palette = \"\"\nEOF\n        cat >> ${RACORECONF} << EOF\ngambatte_gb_colorization = \"SGB\"\ngambatte_gb_internal_palette = \"\"\nEOF\n    elif [ \"${COLORIZE}\" == \"Best Guess\" ]; then\n        cat > \"${GAMBATTECONF}\" << EOF\ngambatte_gb_colorization = \"auto\"\ngambatte_gb_internal_palette = \"\"\nEOF\n        cat >> ${RACORECONF} << EOF\ngambatte_gb_colorization = \"auto\"\ngambatte_gb_internal_palette = \"\"\nEOF\n    else\n        cat > \"${GAMBATTECONF}\" << EOF\ngambatte_gb_colorization = \"internal\"\ngambatte_gb_internal_palette = \"${COLORIZE}\"\nEOF\n        cat >> ${RACORECONF} << EOF\ngambatte_gb_colorization = \"internal\"\ngambatte_gb_internal_palette = \"${COLORIZE}\"\nEOF\n    fi\nfi\n\n# We set up the controller index\nCONTROLLERS=\"$@\"\nCONTROLLERS=\"${CONTROLLERS#*--controllers=*}\"\nCONTROLLERS=\"${CONTROLLERS%% --autosave*}\"  # until --autosave is found\n\nfor i in 1 2 3 4 5; do\nif [[ \"${CONTROLLERS}\" == *p${i}* ]]; then\nPINDEX=\"${CONTROLLERS#*-p${i}index }\"\nPINDEX=\"${PINDEX%% -p${i}guid*}\"\nPINDEX_UDEV=$(sdl_ra_joystick_map \"${PINDEX}\")\n[[ -n \"${PINDEX_UDEV}\" ]] && PINDEX=${PINDEX_UDEV}\necho \"input_player${i}_joypad_index = \\\"${PINDEX}\\\"\" >> ${RACONF}\n\n# Setting controller type for different cores\n        [ \"${PLATFORM}\" == \"atari5200\" ] && echo \"input_libretro_device_p${i} = \\\"513\\\"\" >> ${RACONF}\n    fi\ndone\n\n# EE Device detection\nread -r EE_DEVICE < /ee_arch\nMENU_DRV=$(get_setting \"retroarch.menu_driver\")\n\nwrite_log \"Menu driver ${MENU_DRV} for ${EE_DEVICE}\"\n\nif [[ -z \"${MENU_DRV}\"  ||  \"${MENU_DRV}\" == \"auto\"  ||  \"${MENU_DRV}\" == \"none\"  ||  \"${MENU_DRV}\" == \"0\" ]]; then\n    if [ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${EE_DEVICE}\" == \"GameForce\" ]; then\n        MENU_DRV=\"xmb\"\n    else\n        MENU_DRV=\"ozone\"\n    fi\nfi\n\n[[ -z \"${MENU_DRV}\" ]] && MENU_DRV=\"ozone\"\n\necho \"menu_driver = \\\"${MENU_DRV}\\\"\" >> ${RACONF}\n\n# Show bezel if enabled\nBEZEL_SET=$(get_setting \"bezel\")\nif [[ -z \"${BEZEL_SET}\" || \"${BEZEL_SET}\" == \"none\"  ||  \"${BEZEL_SET}\" == \"0\" ]]; then\n    ${TBASH} bezels.sh \"none\" \"default\" \"${ISBEZEL}\" \"${IRBEZEL}\"\nelse\n    ${TBASH} bezels.sh \"${PLATFORM}\" \"${ROM}\" \"${ISBEZEL}\" \"${IRBEZEL}\"\nfi\n\ninverted_ok_cancel=$(get_es_setting bool InvertButtons)\n[[ ${inverted_ok_cancel} == \"true\" ]] || inverted_ok_cancel=\"false\"\necho \"menu_swap_ok_cancel_buttons = \\\"${inverted_ok_cancel}\\\"\" >> ${RACONF}\n\necho \"cheevos_unsupported_notification = \\\"false\\\"\" >> ${RACONF}\n\n# Merge the changes to: /storage/.config/retroarch/retroarch.cfg \nees -i ${RACONF}\n\nif [[ \"${LOGGING}\" == \"1\" ]]; then\nwrite_log \"- merged settings to retroarch.cfg -\"\ncat \"${RACONF}\" >> \"${LOG}\"\nfi\n \nrm ${RACONF}\n\nRA_CONF_OVERRIDES=\"/storage/.config/retroarch/retroarch_overrides.cfg\"\nif [[ -f \"${RA_CONF_OVERRIDES}\" ]]; then\n\tees -i ${RA_CONF_OVERRIDES}\n\tif [[ \"${LOGGING}\" == \"1\" ]]; then\n\t\twrite_log \"- merged ${RA_CONF_OVERRIDES} settings to retroarch.cfg -\"\n\t\tcat \"${RA_CONF_OVERRIDES}\" >> \"${LOG}\"\n\tfi\nfi\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/show_splash.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present SumavisionQ5 (https://github.com/SumavisionQ5)\n# Modifications by Shanti Gilbert (https://github.com/shantigilbert)\n# 2025-present Mod by DiegroSan\n# 2025-present Mod by WorstcaseSecenario (https://github.com/worstcase-scenario)\n# 2025-present Mod by Langerz82 (https://github.com/Langerz82)\n\n# 12/07/2019 use mpv for all splash \n# 19/01/2020 use ffplay for all splash \n# 06/02/2020 move splash to roms folder and add global splash support\n# 22/09/2025 various updates.\n\n. /etc/profile\n\nENABLE_LOGGING=0\n[[ \"$(get_es_setting string LogLevel)\" == \"debug\" ]] && ENABLE_LOGGING=1\nSPLASH_LOG=\"/emuelec/logs/splash.log\"\n\n\nfunction write_log() {\n\t[[ \"${ENABLE_LOGGING}\" == 1 ]] && echo \"${1}\" >> \"${SPLASH_LOG}\"\n}\n\nACTION_TYPE=\"${1}\"\n\n# Initialize log for each run\n[[ \"${ACTION_TYPE}\" != \"exit\" ]] && echo \"Splash log for Platorm ${PLATFORM} and game ${ROMNAME}\" > ${SPLASH_LOG}\n\nPLATFORM=\"${2}\"\nROMNAME=\"$(printf '%s' \"${3}\" | sed 's/\\([][]\\)/\\\\\\1/g')\"\nBASEROMNAME=\"${ROMNAME##*/}\"\nBASEROMNAME_NOEXT=\"${BASEROMNAME%.*}\"\n\nGAMELOADINGSPLASH=\"/storage/.config/splash/loading-game.png\"\nBLANKSPLASH=\"/storage/.config/splash/blank.png\"\nDEFAULTSPLASH=\"/storage/.config/splash/splash-1080.png\"\nVIDEOSPLASH=\"/usr/config/splash/emuelec_intro_1080p.mp4\"\nRANDOMVIDEO=\"/storage/roms/splash/introvideos\"\n\n[ -f \"/storage/roms/splash/intro.mp4\" ] && VIDEOSPLASH=\"/storage/roms/splash/intro.mp4\"\n\nPLATFORM=${PLATFORM,,}\nPLAYER_VID=\"ffplay\"\nPLAYER_IMG=\"mpv\"\n\nhave_mpv=0\n\ncase ${PLATFORM} in\n  arcade|fba|fbn|neogeo|mame|cps*) PLATFORM=\"arcade\" ;;\n  retropie|setup) exit 0 ;;\nesac\n\nMODE=\"$(get_resolution)\"\nSPLASHDIR=\"/storage/roms/splash\"\nPLATFORMDIR=\"/storage/roms/${PLATFORM}\"\n\nIMAGE_EXT=(png jpg jpeg bmp gif)\nVIDEO_EXT=(mp4 mkv webm avi mov mpg mpeg)\n#FIND_IMAGE_EXT=$( echo ${IMAGE_EXT[@]} | sed 's/ /\\\\|/g')\n#FIND_VIDEO_EXT=$( echo ${VIDEO_EXT[@]} | sed 's/ /\\\\|/g')\n\nCOMBINED_EXT=($( echo ${VIDEO_EXT[@]} ${IMAGE_EXT[@]} ))\nFIND_COMBINED_EXT=$( echo ${COMBINED_EXT[@]} | sed 's/ /\\\\|/g')\n\nmkdir -p /tmp/splash\n\n\nmake_absolute_path() {\n    local PATH=\"${1}\"\n    local BASE=\"${2}\"\n    [[ \"${PATH}\" == ./* ]] && echo \"${BASE}/${PATH#./}\" || echo \"${PATH}\"\n}\n\nfunction get_file_ext() {\n\tif [ \"${ENABLE_LOGGING}\" == 1 ]; then\n\t\tlocal start_time=$(date +%s%3N)\n\t\tlocal end_time=\n\tfi\n\n\tlocal MEDIA_FILES=()\n\tif [[ -d \"${1}\" ]]; then\n\t\tMEDIA_FILES=(\"$(find ${1} -maxdepth 1 -type f -name \"${2}.*\" -regex \".*\\.\\(${FIND_COMBINED_EXT}\\)$\")\")\n\tfi\n\tif [[ ! -z \"${MEDIA_FILES[@]}\" ]]; then\n\t\tfor CEXT in \"${COMBINED_EXT[@]}\"; do\n\t\t\tlocal FILE=$(echo \"${MEDIA_FILES[@]}\" | grep -e \"^.*\\.${CEXT}$\" )\n\t\t\tlocal FILE_EXT=\"${FILE##*.}\"\n\t\t\tif [[ \"${CEXT}\" == \"${FILE_EXT}\" ]]; then\n        end_time=$(date +%s%3N)\n        duration_ms=$(( end_time - start_time ))\n        \n        write_log \"get_file_ext execution time in ms: $duration_ms\"\n\n\t\t\t \techo \"${FILE}\" && return\n\t\t\tfi\n\t\tdone\n\tfi\n\n\tif [ \"${ENABLE_LOGGING}\" == 1 ]; then\n\t\tend_time=$(date +%s%3N)\n\t\tduration_ms=$(( end_time - start_time ))\n\t\twrite_log \"get_file_ext execution time in ms: $duration_ms\" \n\tfi\n}\n\nif [ \"${ACTION_TYPE}\" = \"intro\" ] || [ \"${ACTION_TYPE}\" = \"exit\" ]; then\n SPLASH=\"${DEFAULTSPLASH}\"\n [[ \"${MODE}\" == *\"x\"* ]] && SPLASH=\"/storage/.config/splash/splash-std.png\"\n\n if [ \"${ACTION_TYPE}\" = \"exit\" ]; then\n   EE_SPLASH_EXIT=\"$(get_ee_setting ee_splashexit)\"\n   [[ -z \"${EE_SPLASH_EXIT}\" ]] && EE_SPLASH_EXIT=0\n\n   CUSTOM_EXIT=\"$(get_ee_setting ee_customexitsplash)\"\n\n   if [ \"${EE_SPLASH_EXIT}\" = \"1\" ] && [ -n \"${CUSTOM_EXIT}\" ] && [ -f \"${CUSTOM_EXIT}\" ]; then\n      SPLASH=\"${CUSTOM_EXIT}\"\n   fi\n   [[ ! -f \"${SPLASH}\" ]] && SPLASH=\"${DEFAULTSPLASH}\"\n fi\n\nelif [ \"${ACTION_TYPE}\" = \"blank\" ]; then\n  SPLASH=\"${BLANKSPLASH}\"\n\nelif [ \"${ACTION_TYPE}\" = \"gameloading\" ]; then\n [[ \"${MODE}\" == *\"x\"* ]] && GAMELOADINGSPLASH=\"/storage/.config/splash/loading-game-std.png\"\n\n EE_SPLASH_LOADING=\"$(get_ee_setting ee_splashloading)\"\n [[ -z \"${EE_SPLASH_LOADING}\" ]] && EE_SPLASH_LOADING=0\n\n CUSTOM_SPLASH=\"$(get_ee_setting ee_customsplash)\"\n\n EE_SPLASH_PLATFORM_ROMS=\"$(get_ee_setting ee_splash_loading_platform_roms)\"\n\n if [[ \"${EE_SPLASH_PLATFORM_ROMS}\" != 0 ]]; then\n   SPLASH=$(get_file_ext \"${SPLASHDIR}/${PLATFORM}\" \"${BASEROMNAME_NOEXT}\")\n   [[ -z \"${SPLASH}\" ]] && SPLASH=$(get_file_ext \"${SPLASHDIR}/${PLATFORM}\" \"${PLATFORM}\")\n   [[ -z \"${SPLASH}\" ]] && SPLASH=$(get_file_ext \"${SPLASHDIR}/${PLATFORM}\" \"launching\")\n fi\n\n if [ \"${EE_SPLASH_LOADING}\" = \"0\" ]; then\n   [[ -z \"${SPLASH}\" ]] && SPLASH=${GAMELOADINGSPLASH}\n elif [ \"${EE_SPLASH_LOADING}\" = \"1\" ] && [ -n \"${CUSTOM_SPLASH}\" ] && [ -f \"${CUSTOM_SPLASH}\" ]; then\n   [[ -z \"${SPLASH}\" ]] && SPLASH=\"${CUSTOM_SPLASH}\"\n elif [ \"${EE_SPLASH_LOADING}\" = \"2\" ]; then\n   EE_SPLASH_RANDOM_PATH=\"$(get_ee_setting ee_randomsplashpath)\"\n   [[ ! -d \"${EE_SPLASH_RANDOM_PATH}\" ]] && EE_SPLASH_RANDOM_PATH=\"${SPLASHDIR}/random\"\n\t [[ -z \"${SPLASH}\" ]] && SPLASH=\"$(find \"${EE_SPLASH_RANDOM_PATH}\" -maxdepth 1 -type f -regex \".*\\.\\(${FIND_COMBINED_EXT}\\)$\" 2>/dev/null | sort -R | head -n 1)\"\n elif [ \"${EE_SPLASH_LOADING}\" = \"3\" ]; then\n \nif [ -z \"${SPLASH}\" ]; then\n \n   PLATFORM_GAMELIST=\"${PLATFORMDIR}/gamelist.xml\"\n\t\n\tif [ -s \"${PLATFORM_GAMELIST}\" ]; then\n\t\twrite_log \"Gamelist.xml found: ${PLATFORM_GAMELIST}\"\n\t\t\n\tEE_SPLASH_SCRAPED_PATH=\"$(get_ee_setting ee_scrapedsplashpath)\"\t\n\tcase \"${EE_SPLASH_SCRAPED_PATH}\" in\n\t\timage|thumbnail|video|marquee|fanart)\n\t\twrite_log \"Scraped media: ${EE_SPLASH_SCRAPED_PATH}\"\n\t\t\tSCRAPED_VIDEO=$(xmlstarlet sel -t -v \"//game[contains(path, \\\"${BASEROMNAME}\\\")]/${EE_SPLASH_SCRAPED_PATH}\" \"${PLATFORM_GAMELIST}\")\n\t\t\tSCRAPED_VIDEO=$(make_absolute_path \"${SCRAPED_VIDEO}\" \"${PLATFORMDIR}\")\n\t\t\t;;\n\t\trandom)\n\t\t\toptions=(image thumbnail video marquee fanart) # allowed options to search \n\t\t\trandom_index=(\"${options[@]}\")\n\n\t\t\t# While we still have options left and haven't found a file, keep trying \n\t\t\twhile [[ ${#random_index[@]} -gt 0 ]]; do\n\t\t\t\tidx=$(( RANDOM % ${#random_index[@]} ))\n\t\t\t\tvalue=\"${random_index[$idx]}\"\n\n\t\t\t\twrite_log \"[Random] Trying xml path: ${value}\"\n\n\t\t\t\tSCRAPED_VIDEO=$(xmlstarlet sel -t -v \"//game[contains(path, \\\"${BASEROMNAME}\\\")]/${value}\" \"${PLATFORM_GAMELIST}\")\n\t\t\t\tSCRAPED_VIDEO=$(make_absolute_path \"${SCRAPED_VIDEO}\" \"${PLATFORMDIR}\")\n\n\t\t\t\t# If media exists, we're done and we break out of the loop\n\t\t\t\tif [[ -f \"${SCRAPED_VIDEO}\" ]]; then\n\t\t\t\t\twrite_log \"Found media: ${value} = ${SCRAPED_VIDEO}\"\n\t\t\t\t\tbreak\n\t\t\t\tfi\n\n\t\t\t\t# Remove this option from the list\n\t\t\t\tunset 'random_index[idx]'\n\t\t\t\t# Rebuild the array (important to eliminate gaps in the index)\n\t\t\t\trandom_index=(\"${random_index[@]}\")\n\t\t\tdone\n\t\t\t;;\n\t\t\t*)\n\t\t\tSCRAPED_VIDEO=$(xmlstarlet sel -t -v \"//game[contains(path, \\\"${BASEROMNAME}\\\")]/video\" \"${PLATFORM_GAMELIST}\")\n\t\t\tSCRAPED_VIDEO=$(make_absolute_path \"${SCRAPED_VIDEO}\" \"${PLATFORMDIR}\")\n\t\t\n\t\t\tif [ -z \"${SCRAPED_VIDEO}\" ] && [ \"${SCRAPED_VIDEO}\" != \"${PLATFORMDIR}\" ]; then\n\t\t\t\tSCRAPED_IMAGE=$(xmlstarlet sel -t -v \"//game[contains(path, \\\"${BASEROMNAME}\\\")]/image\" \"${PLATFORM_GAMELIST}\")\n\t\t\t\tSCRAPED_IMAGE=$(make_absolute_path \"${SCRAPED_IMAGE}\" \"${PLATFORMDIR}\")\n\t\t\tfi\n\t\t\t;;\n\tesac\n\t\t[[ -f \"${SCRAPED_IMAGE}\" ]] && SPLASH=\"${SCRAPED_IMAGE}\"\n\t\t# We don't care if image was found as videos take priority, so if a video is found we set that instead to SPLASH\n\t\t[[ -f \"${SCRAPED_VIDEO}\" ]] && SPLASH=\"${SCRAPED_VIDEO}\"\n\telse \n\t\twrite_log \"Gamelist.xml NOT found: ${PLATFORM_GAMELIST}\"\n\t\t[[ -z \"${SPLASH}\" ]] && SPLASH=$(get_file_ext \"${PLATFORMDIR}/snap\" \"${BASEROMNAME_NOEXT}\")\n\t\t[[ -z \"${SPLASH}\" ]] && SPLASH=$(get_file_ext \"${PLATFORMDIR}/images\" \"${BASEROMNAME_NOEXT}-image\")\n\tfi\nfi\n\n else\n   SPLASH=\"${GAMELOADINGSPLASH}\"\n fi\n [[ ! -f \"${SPLASH}\" ]] && SPLASH=\"${GAMELOADINGSPLASH}\"\nfi\n\nwrite_log \"will show SPLASH: ${SPLASH}\"\n\n# OGA/GameForce -> mpv\nSS_DEVICE=0\nif [[ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ]] || [[ \"${EE_DEVICE}\" == \"GameForce\" ]]; then\n  SS_DEVICE=1\n  clear > /dev/console\n  echo \"Loading ...\" > /dev/console\n  PLAYER_VID=\"mpv\"\n  PLAYER_IMG=\"mpv\"\n  have_mpv=1\nfi\n\nif [[ \"${EE_DEVICE}\" == \"OdroidM1\" ]]; then\n\tPLAYER_IMG=\"mpv\"\n\thave_mpv=1\nfi\n\ndeclare -a RES=( ${MODE} )\nSCALE=\"${RES[0]}:${RES[1]}\"\nFILTER_FILL=\"scale=${SCALE}:force_original_aspect_ratio=increase,crop=${RES[0]}:${RES[1]},setsar=1\"\nMPV_VF=\"${FILTER_FILL}\"\n\n[[ \"${ACTION_TYPE}\" != \"intro\" ]] && VIDEO=0 || VIDEO=\"$(get_ee_setting ee_bootvideo.enabled)\"\n\nis_video() { case \"${1,,}\" in *.mp4|*.mkv|*.webm|*.avi|*.mov|*.mpg|*.mpeg) return 0;; *) return 1;; esac; }\nis_image() { case \"${1,,}\" in *.png|*.jpg|*.jpeg|*.bmp|*.gif) return 0;; *) return 1;; esac; }\n\nif [[ -f \"/storage/.config/emuelec/configs/novideo\" ]] && [[ ${VIDEO} != \"1\" ]]; then\n if [ \"${ACTION_TYPE}\" != \"intro\" ]; then\n   DURATION=\"$(get_ee_setting ee_splash_loading_duration)\"\n   FALLBACK_SPLASH=\"${GAMELOADINGSPLASH}\"\n\nwrite_log \"DURATION is ${DURATION}\"\n\n   if [ \"${ACTION_TYPE}\" = \"exit\" ]; then\n     EXIT_DURATION=\"$(get_ee_setting ee_splash_exit_duration)\"\n     DURATION=\"${EXIT_DURATION}\"\n     FALLBACK_SPLASH=\"/storage/roms/splash/exitsplash.png\"\n   fi\n\n   if [ -z \"${DURATION}\" ] || [ ! -n ${DURATION} ]; then\n     DURATION=0\n   fi\n\n   # if no is_image and no is_video.\n   if is_image \"${SPLASH}\" == 1 && is_video \"${SPLASH}\" == 1; then\n     SPLASH=\"${FALLBACK_SPLASH}\"\n   fi\n\n   if is_image \"${SPLASH}\"; then\n     if [ \"${have_mpv}\" -eq 1 ]; then\n       ${PLAYER_IMG} --fullscreen --no-keepaspect --vf=\"${MPV_VF}\" --image-display-duration=${DURATION} \"${SPLASH}\" >/dev/null 2>&1\n     else\n\t\t\t ffplay -fs -loglevel error -nostats -vf \"${FILTER_FILL}\" -i \"${SPLASH}\" -autoexit >/dev/null 2>&1\n       sleep ${DURATION}\n     fi\n   elif is_video \"${SPLASH}\"; then\n   \n   # get video lenght\n\tVID_DURATION=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 \"${SPLASH}\")\n\twrite_log \"Video duration: ${VID_DURATION}\"\n\t\n\tDURATION_INT=${DURATION%.*}\n\tVID_DURATION_INT=${VID_DURATION%.*}\n\t\n\t# compare durations and set the one that is lower\n\tif [ \"$VID_DURATION_INT\" -lt \"$DURATION_INT\" ]; then\n\t\tDURATION=${VID_DURATION}\n\t\twrite_log \"Setting Duration to video duration: ${VID_DURATION}\"\n\tfi\n   \n     if [ \"${DURATION}\" -le 3 ]; then\n       DURATION=3\n     fi\n     \n     write_log \"FINAL DURATION ${DURATION}\"\n     \n     if [ \"${PLAYER_VID}\" = \"ffplay\" ]; then\n       ${PLAYER_VID} -fs -autoexit -loglevel error -nostats -vf \"${FILTER_FILL}\" -t ${DURATION} -i \"${SPLASH}\" >/dev/null 2>&1\n     else\n       ${PLAYER_VID} --fullscreen --no-keepaspect --vf=\"${MPV_VF}\" --length=${DURATION} \"${SPLASH}\" -t 1 >/dev/null 2>&1\n     fi\n   fi\n fi\nelse\n  RND=\"$(get_ee_setting ee_randombootvideo.enabled)\"\n  if [ \"${RND}\" = \"1\" ]; then\n    SPLASH=\"$(ls ${RANDOMVIDEO}/*.mp4 2>/dev/null | sort -R | tail -1)\"\n    [[ -z \"${SPLASH}\" ]] && SPLASH=\"${VIDEOSPLASH}\"\n  else\n    SPLASH=\"${VIDEOSPLASH}\"\n  fi\n\n  set_audio alsa\n\n  if [ ${SS_DEVICE} -eq 1 ]; then\n    ${PLAYER_VID} --fullscreen --no-keepaspect --vf=\"${MPV_VF}\" \"${SPLASH}\" >/dev/null 2>&1\n  else\n    ${PLAYER_VID} -fs -autoexit -vf \"${FILTER_FILL}\" -i \"${SPLASH}\" >/dev/null 2>&1\n  fi\n\n  touch \"/storage/.config/emuelec/configs/novideo\"\nfi\n\nSPLASHTIME=\"$(get_ee_setting ee_splash.delay)\"\n[ -n \"${SPLASHTIME}\" ] && sleep \"${SPLASHTIME}\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/bin/updatecheck.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n. /etc/profile\n\nUPDINFO=\"https://raw.githubusercontent.com/EmuELEC/emuelec.github.io/master/settings/EE_update\"\nUPDURL=\"https://github.com/EmuELEC/EmuELEC/releases/download/v\"\nTEST_UPDURL=\"https://github.com/EmuELEC/EmuELEC-tests/releases/download/v\"\nBUILDATE=$(cat /usr/buildate)\narguments=\"$@\"\n\nif [[ \"${arguments}\" == *\"forceupdate\"* ]]; then\nsystemctl stop emustation\nee_console enable\nclear /dev/tty0\n    \nwhile pgrep -f emulationstation; do\n    clear /dev/tty0\n    echo \"Waiting for Emulationstation to quit...\" > /dev/tty0\n    sleep 1\ndone\n\nfi\n\nUPDTYPE=$(get_ee_setting updates.type)\n[[ -z \"${UPDTYPE}\" ]] && UPDTYPE=\"stable\"\n[[ \"${UPDTYPE}\" != \"stable\" ]] && UPDURL=\"${TEST_UPDURL}\"\n\nfunction do_cleanup() {\n\trm -rf /storage/.update/* > /dev/null 2>&1\n}\n\nfunction no_update() {\n\techo \"no\"\n\tdo_cleanup\nif [[ \"${arguments}\" == *\"forceupdate\"* ]]; then\n    ee_console disable\n    systemctl start emustation\nfi\n\texit 1\n}\n\nfunction forced_update() {\nee_console enable\n\techo \"Downloadinng ${UPDURL} to /storage/.update/${UFILE}\" > /dev/tty0\n\ttouch \"/storage/.update/${UFILE}\"\n\twget \"${UPDURL}\" -O \"/storage/.update/${UFILE}\" || echo \"Exit code: $?\" > /dev/tty0\n\n# Try to download an sha256 checksum\n\techo \"Trying to download sha256 checksum\" > /dev/tty0\n    wget -q \"${UPDURL}.sha256\" -O \"/storage/.update/${UFILE}.sha256\"\n\nif test -e \"/storage/.update/${UFILE}.sha256\"; then\n\techo \"Doing checksum...\" > /dev/tty0\n    DISTMD5=$(cat \"/storage/.update/${UFILE}.sha256\" | cut -d ' ' -f 1)\n    CURRMD5=$(sha256sum \"/storage/.update/${UFILE}\" | cut -d ' ' -f 1)\n\n    if test \"${DISTMD5}\" = \"${CURRMD5}\"; then\n        echo \"Valid checksum...continuing\" > /dev/tty0\n    else\n        text_viewer -e -w -t \"Invalid Checksum!\" -f 24 -m \"invalid checksum. Got +${DISTMD5}+. Attempted +${CURRMD5}+.\\n\\n FORCE UPDATE ABORTED!\"\n        no_update\n\texit 1\n    fi\n\nelse\n    echo \"No checksum found. Won't check the file.\" > /dev/tty0\nfi\n    echo \"Aplying update\" > /dev/tty0\n\tsync\n\tsystemctl stop emustation\n\nwhile pgrep -f emulationstation; do\n    clear /dev/tty0\n    echo \"Waiting for Emulationstation to quit...\" > /dev/tty0\n    sleep 1\ndone\n\n\temuelec-utils clearconfig EMUS\n\tsystemctl reboot\n\texit 0\n}\n\nfunction check_update() { \nif [[ \"${arguments}\" == *\"canupdate\"* ]]; then\n\techo \"${UPDATEVERP}\"\nelif [[ \"${arguments}\" == *\"geturl\"* ]]; then\t\n\techo \"${UPDURL}\"\nelif [[ \"${arguments}\" == *\"getsize\"* ]]; then\n    USIZE=$(wget \"${UPDURL}\" --spider --server-response -O - 2>&1 | sed -ne '/Content-Length:/{s/.*: //;p}' | tail -1)\t\n\techo \"${USIZE}\"\nfi\n}\n\n#make sure there is no old update\ndo_cleanup\n\n# To avoid curl error \"(23) Failed writing body\", we download the full page to /tmp/eeupd and use cat to read it then delete it\ncurl -s ${UPDINFO} -o /tmp/eeupd\n\nUPDDATA=$(cat /tmp/eeupd | grep \"${UPDTYPE}\")\nrm /tmp/eeupd\n[ -z \"${UPDDATA}\" ] && no_update\n\nOLDIFS=${IFS}\nIFS=';' read -r -a updinfo <<< \"${UPDDATA}\"\nIFS=${OLDIFS}\n\nUVER=\"${updinfo[0]}\"\nUFILE=\"EmuELEC-${EE_DEVICE}.aarch64-${UVER}\"\n\nif [[ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ]]; then\n    UFILE+=\"-odroidgo2.tar\"\nelif [[ \"${EE_DEVICE}\" == \"GameForce\" ]]; then\n    UFILE+=\"-chi.tar\"\nelif [[ \"${EE_DEVICE}\" == \"RK356x\" ]]; then\n    UFILE+=\"-rk356x.tar\"\nelse\n    UFILE+=\".tar\"\nfi\n\nUPDURL+=\"${UVER}/${UFILE}\"\n\n#check if file exists\nif ! curl --head --fail --silent \"${UPDURL}\" >/dev/null; then\nif [[ \"${arguments}\" == *\"forceupdate\"* ]]; then\ntext_viewer -e -w -t \"ERROR!\" -f 24 -m \"The update file either does not exists or you are not connected to the internet! FORCE UPDATE ABORTED!\\n\\nEmulationstation will now restart!\"\nno_update\nfi\n    no_update\nfi\n\nCVER=$(cat /usr/config/EE_VERSION)\n[[ -z \"${CVER}\" ]] && no_update\nif $(echo \"${CVER}\" | grep -q \"TEST\"); then\n    CVER=$(echo \"${CVER}\" | sed \"s|-TEST-||\")\nfi\n\nUVER=$(echo \"${UVER}\" | sed \"s|-TEST-||\")\n[[ -z \"${UVER}\" ]] && no_update\n\nCURRENTVER=\"${CVER%%.*}${CVER#*.}\"\nUPDATEVER=\"${UVER%%.*}${UVER#*.}\"\nUPDATEVERP=\"${UVER}\"\n\nCURRENTVER=\"${CURRENTVER%%-*}\"\nUPDATEVER=\"${UPDATEVER%%-*}\"\n\n# If current or update version is only 2 digits, then we add 99999999 to allow updating from beta to stable and viceversa\n[ ${#CURRENTVER} == 2 ] && CURRENTVER=\"${CURRENTVER}99999999\" \n[ ${#UPDATEVER} == 2 ] && UPDATEVER=\"${UPDATEVER}99999999\"\n\n\n# if you use forceupdate as an argument you can forcibly download the latest STABLE release and call an update\nif [[ \"${arguments}\" == *\"forceupdate\"* ]]; then\n    text_viewer -y -w -t \"Force update!\" -f 24 -m \"A forced update has been called, this will download the latest release depending on your type settings (stable or test/beta)\\n\\nThe system will reboot if the update file is downloaded succesfully.\\n\\nAre you sure you want to continue?\"\n    if [[ $? == 21 ]]; then\n        forced_update\n    else\n        echo \"Force update canceled.\"\n        no_update\n\texit 1\n    fi\nelse\n    if [ \"${UPDATEVER}\" -gt \"${CURRENTVER}\" ] ; then \n        check_update\n    else \n        no_update\n    fi \nfi\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/EE_VERSION",
    "content": "4.8\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/asound.conf-amlogic",
    "content": "## not needed\n#pcm.!default {\n#type plug\n#slave {\n#pcm \"hw:0,0\"\n#}\n#}\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/asound.conf-amlogic-ng",
    "content": "pcm.!default {\n    type plug\n    slave.pcm \"softvol\"\n}\n\npcm.softvol {\n    type softvol\n    slave {\n        pcm \"dmixer\"\n    }\n    control {\n        name \"Master\"\n        card 0\n    }\n    min_dB -50.0\n    max_dB 0.0\n}\n\npcm.dmixer {\n    type dmix\n    ipc_key 1024\n    slave {\n        pcm \"hw:0,0\"\n        period_time 0\n        period_size 1024\n        buffer_size 4096\n        rate 44100\n    }\n    bindings {\n        0 0\n        1 1\n    }\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/asound.conf-amlogic-no",
    "content": "pcm.!default {\n    type plug\n    slave.pcm \"softvol\"\n}\n\npcm.softvol {\n    type softvol\n    slave {\n        pcm \"dmixer\"\n    }\n    control {\n        name \"Master\"\n        card 0\n    }\n    min_dB -50.0\n    max_dB 0.0\n}\n\npcm.dmixer {\n    type dmix\n    ipc_key 1024\n    slave {\n        pcm \"hw:0,0\"\n        period_time 0\n        period_size 1024\n        buffer_size 4096\n        rate 44100\n    }\n    bindings {\n        0 0\n        1 1\n    }\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/autostart.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# WARNING DO NOT modify this file it will do nothing, if you need to use autostart please use /storage/.config/custom_start.sh\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/custom_start.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# Place any scripts you need to run at boot on this file\n\ncase \"${1}\" in\n\"before\")\n\n# Any commands that you want to run before the frontend begins should go here\n\n# example BT config, use only as a last resort\n# Bluetooth, Make sure you change your BT MAC address, you need to do this by SSH the first time\n# by running \n\n# hcitool scan\n# bluetoothctl pair yourmac\n# bluetoothctl trust yourmac \n\n# If you want to use bluetooth, uncomment every line after this one \n\n# BTMAC=\"E4:17:D8:8B:F1:80\"\n# (\n# echo \"agent on\" | bluetoothctl\n# echo \"default-agent\" | bluetoothctl\n# echo \"power on\" | bluetoothctl\n# echo \"discoverable on\" | bluetoothctl\n# echo \"pairable on\" | bluetoothctl\n# echo \"scan on\" | bluetoothctl\n# echo \"trust ${BTMAC}\" | bluetoothctl\n# echo \"connect ${BTMAC}\" | bluetoothctl\n# )&\n\n\texit 0\n\t;;\n*)\n# Any commands that you want to run after the frontend has started goes here\n\n    exit 0\n\t;;\nesac\n## nothing was called so exit\nexit 0\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/bin/put_user_bins_here",
    "content": "Place user bins here, they will take priority over /usr\n\nPlease take care of the added binaries by yourself and remember to clean/update them if neccessary for each update as they may be outdated and break some other programs"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/configs/all/autoconf.cfg",
    "content": "8bitdo_hack = \"0\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/configs/all/bluetooth.cfg",
    "content": "connect_mode=\"default\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/configs/all/scraper.cfg",
    "content": "use_thumbs = \"1\"\n\nscreenshots = \"0\"\n\nmax_width = \"400\"\n\nmax_height = \"400\"\n\nconsole_src = \"2\"\n\nmame_src = \"2\"\n\nrom_name = \"0\"\n\nappend_only = \"0\"\n\nuse_rom_folder = \"1\"\n\ndownload_videos = \"1\"\n\ndownload_marquees = \"0\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/configs/all/skyscraper.cfg",
    "content": "rom_name = \"0\"\n\nuse_rom_folder = \"1\"\n\ndownload_videos = \"0\"\n\ncache_marquees = \"1\"\n\ncache_covers = \"1\"\n\ncache_wheels = \"1\"\n\ncache_screenshots = \"1\"\n\nscrape_source = \"thegamesdb\"\n\nremove_brackets = \"0\"\n\nforce_refresh = \"0\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/configs/atari800.cfg",
    "content": "Atari 800 Emulator, Version 3.1.0\nROM_OS_A_NTSC=\nROM_OS_A_PAL=/storage/roms/bios/ATARIOSA.ROM\nROM_OS_B_NTSC=\nROM_OS_AA00R10=\nROM_OS_AA00R11=\nROM_OS_BB00R1=\nROM_OS_BB01R2=/storage/roms/bios/ATARIXL.ROM\nROM_OS_BB02R3=\nROM_OS_BB02R3V4=\nROM_OS_CC01R4=\nROM_OS_BB01R3=\nROM_OS_BB01R4=\nROM_OS_BB01R59=\nROM_OS_BB01R59A=\nROM_5200=/storage/roms/bios/5200.rom\nROM_5200_A=/storage/roms/bios/5200a.rom\nROM_BASIC_A=/storage/roms/bios/BASIC_Rev_A.rom\nROM_BASIC_B=/storage/roms/bios/BASIC_Rev_B.rom\nROM_BASIC_C=/storage/roms/bios/ATARIBAS.ROM\nROM_XEGAME=\nROM_400/800_CUSTOM=/storage/roms/bios/ATARIOSB.ROM\nROM_XL/XE_CUSTOM=\nROM_5200_CUSTOM=\nROM_BASIC_CUSTOM=\nROM_XEGAME_CUSTOM=\nOS_400/800_VERSION=AUTO\nOS_XL/XE_VERSION=AUTO\nOS_5200_VERSION=AUTO\nBASIC_VERSION=AUTO\nXEGS_GAME_VERSION=AUTO\nH1_DIR=\nH2_DIR=\nH3_DIR=\nH4_DIR=\nHD_READ_ONLY=1\nPRINT_COMMAND=lpr %s\nSCREEN_REFRESH_RATIO=1\nMACHINE_TYPE=Atari 5200\nDEFAULT_TV_MODE=NTSC\nMOSAIC_RAM_NUM_BANKS=0\nAXLON_RAM_NUM_BANKS=0\nENABLE_MAPRAM=0\nDISABLE_BASIC=1\nENABLE_SIO_PATCH=0\nENABLE_SLOW_XEX_LOADING=0\nENABLE_H_PATCH=0\nENABLE_P_PATCH=0\nENABLE_NEW_POKEY=1\nKEYBOARD_LEDS=0\nF_KEYS=0\nBUILTIN_GAME=0\nKEYBOARD_DETACHED=0\n1200XL_JUMPER=0\nCFG_SAVE_ON_EXIT=0\nMIO_ROM=\nBLACK_BOX_ROM=\nPROTO80_ROM=\nCARTRIDGE_FILENAME=\nCARTRIDGE_TYPE=0\nCARTRIDGE_PIGGYBACK_FILENAME=\nCARTRIDGE_PIGGYBACK_TYPE=0\nCARTRIDGE_AUTOREBOOT=1\nCASSETTE_FILENAME=\nCASSETTE_LOADED=0\nCASSETTE_WRITE_PROTECT=0\nRTIME=1\nXEP80_CHARSET=\nAF80_ROM=\nAF80_CHARSET=\nCOLOURS_NTSC_SATURATION=0\nCOLOURS_NTSC_CONTRAST=0\nCOLOURS_NTSC_BRIGHTNESS=0\nCOLOURS_NTSC_GAMMA=2.35\nCOLOURS_NTSC_HUE=0\nCOLOURS_NTSC_GTIA_DELAY=26.8\nCOLOURS_NTSC_EXTERNAL_PALETTE=\nCOLOURS_NTSC_EXTERNAL_PALETTE_LOADED=0\nCOLOURS_NTSC_ADJUST_EXTERNAL_PALETTE=0\nCOLOURS_PAL_SATURATION=0\nCOLOURS_PAL_CONTRAST=0\nCOLOURS_PAL_BRIGHTNESS=0\nCOLOURS_PAL_GAMMA=2.35\nCOLOURS_PAL_HUE=0\nCOLOURS_PAL_GTIA_DELAY=23.2\nCOLOURS_PAL_EXTERNAL_PALETTE=\nCOLOURS_PAL_EXTERNAL_PALETTE_LOADED=0\nCOLOURS_PAL_ADJUST_EXTERNAL_PALETTE=0\nARTIFACT_NTSC=NONE\nARTIFACT_PAL=NONE\nARTIFACT_NTSC_MODE=0\nSCREEN_SHOW_SPEED=0\nSCREEN_SHOW_IO_ACTIVITY=1\nSCREEN_SHOW_IO_COUNTER=0\nSCREEN_SHOW_1200XL_LEDS=1\nFILTER_NTSC_SHARPNESS=-0.5\nFILTER_NTSC_RESOLUTION=-0.1\nFILTER_NTSC_ARTIFACTS=0\nFILTER_NTSC_FRINGING=0\nFILTER_NTSC_BLEED=0\nFILTER_NTSC_BURST_PHASE=0\nSOUND_ENABLED=1\nSOUND_RATE=44100\nSOUND_BITS=16\nSOUND_BUFFER_MS=0\nSOUND_LATENCY=20\nRAM_SIZE=16\nSTEREO_POKEY=0\nBUILTIN_BASIC=0\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/configs/bezels/arcademap.cfg",
    "content": "arcade_1941 = \"1941\"\r\narcade_1941j = \"1941\"\r\narcade_1941r1 = \"1941\"\r\narcade_1941u = \"1941\"\r\narcade_1942 = \"1942\"\r\narcade_1942a = \"1942\"\r\narcade_1942abl = \"1942\"\r\narcade_1942b = \"1942\"\r\narcade_1942c64 = \"1942\"\r\narcade_1942h = \"1942\"\r\narcade_1942w = \"1942\"\r\narcade_1943 = \"1943\"\r\narcade_1943b = \"1943\"\r\narcade_1943b2 = \"1943\"\r\narcade_1943bj = \"1943\"\r\narcade_1943j = \"1943\"\r\narcade_1943ja = \"1943\"\r\narcade_1943jah = \"1943\"\r\narcade_1943kai = \"1943kai\"\r\narcade_1943mii = \"1943mii\"\r\narcade_1943u = \"1943\"\r\narcade_1943ua = \"1943\"\r\narcade_1944 = \"1944\"\r\narcade_1944ad = \"1944\"\r\narcade_1944d = \"1944\"\r\narcade_1944j = \"1944\"\r\narcade_1945kiii = \"1945kiii\"\r\narcade_1945kiiin = \"1945kiii\"\r\narcade_1945kiiio = \"1945kiii\"\r\narcade_19xx = \"19xx\"\r\narcade_19xxa = \"19xx\"\r\narcade_19xxar1 = \"19xx\"\r\narcade_19xxb = \"19xx\"\r\narcade_19xxd = \"19xx\"\r\narcade_19xxh = \"19xx\"\r\narcade_19xxj = \"19xx\"\r\narcade_19xxjr1 = \"19xx\"\r\narcade_19xxjr2 = \"19xx\"\r\narcade_2020bb = \"2020bb\"\r\narcade_2020bba = \"2020bb\"\r\narcade_2020bbh = \"2020bb\"\r\narcade_20pacgal = \"20pacgal\"\r\narcade_20pacgalr0 = \"20pacgal\"\r\narcade_20pacgalr1 = \"20pacgal\"\r\narcade_20pacgalr2 = \"20pacgal\"\r\narcade_20pacgalr3 = \"20pacgal\"\r\narcade_20pacgalr4 = \"20pacgal\"\r\narcade_25pacman = \"25pacman\"\r\narcade_25pacmano = \"25pacman\"\r\narcade_280zzzap = \"280zzzap\"\r\narcade_3countb = \"3countb\"\r\narcade_3countba = \"3countb\"\r\narcade_3in1semi = \"3in1semi\"\r\narcade_3kokushi = \"3kokushi\"\r\narcade_3stooges = \"3stooges\"\r\narcade_3wonders = \"3wonders\"\r\narcade_3wondersb = \"3wonders\"\r\narcade_3wondersh = \"3wonders\"\r\narcade_3wondersha = \"3wonders\"\r\narcade_3wondersr1 = \"3wonders\"\r\narcade_3wondersu = \"3wonders\"\r\narcade_3wonderu = \"3wonders\"\r\narcade_3x3puzzl = \"3x3puzzl\"\r\narcade_3x3puzzla = \"3x3puzzl\"\r\narcade_40love = \"40love\"\r\narcade_47pie2 = \"47pie2\"\r\narcade_47pie2o = \"47pie2\"\r\narcade_4dwarrio = \"4dwarrio\"\r\narcade_4enraya = \"4enraya\"\r\narcade_4enrayaa = \"4enraya\"\r\narcade_4in1 = \"4in1\"\r\narcade_4in1boot = \"4in1boot\"\r\narcade_4play = \"4play\"\r\narcade_5 = \"5\"\r\narcade_600 = \"turtles\"\r\narcade_64streej = \"64street\"\r\narcade_64street = \"64street\"\r\narcade_64streetj = \"64street\"\r\narcade_64streetja = \"64street\"\r\narcade_720 = \"720\"\r\narcade_720g = \"720\"\r\narcade_720gr1 = \"720\"\r\narcade_720r1 = \"720\"\r\narcade_720r2 = \"720\"\r\narcade_720r3 = \"720\"\r\narcade_7jigen = \"7jigen\"\r\narcade_7ordi = \"7ordi\"\r\narcade_7toitsu = \"mgakuen\"\r\narcade_800fath = \"mariner\"\r\narcade_88games = \"88games\"\r\narcade_8ball = \"8ball\"\r\narcade_8ball1 = \"8ball\"\r\narcade_8ballact = \"8ballact\"\r\narcade_8ballat2 = \"8ballact\"\r\narcade_8bpm = \"8ballact\"\r\narcade_99lstwar = \"repulse\"\r\narcade_99lstwara = \"repulse\"\r\narcade_99lstwarb = \"repulse\"\r\narcade_99lstwark = \"repulse\"\r\narcade_99lstwra = \"sonofphx\"\r\narcade_9ballsh2 = \"coolpool\"\r\narcade_9ballsh3 = \"coolpool\"\r\narcade_9ballsht = \"coolpool\"\r\narcade_a51mxr3k = \"area51mx\"\r\narcade_aafb = \"aafb\"\r\narcade_aafbb = \"aafb\"\r\narcade_aafbc = \"aafb\"\r\narcade_aafbd2p = \"aafb\"\r\narcade_abaseb = \"abaseb\"\r\narcade_abaseb2 = \"abaseb\"\r\narcade_abcop = \"abcop\"\r\narcade_abcopd = \"abcop\"\r\narcade_abcopj = \"abcop\"\r\narcade_abcopjd = \"abcop\"\r\narcade_ablast = \"penbros\"\r\narcade_abscam = \"puckman\"\r\narcade_aburner = \"aburner2\"\r\narcade_aburner2 = \"aburner2\"\r\narcade_aburner2g = \"aburner2\"\r\narcade_ace = \"ace\"\r\narcade_aceattac = \"aceattac\"\r\narcade_aceattaca = \"aceattac\"\r\narcade_acedrvrw = \"acedrvrw\"\r\narcade_acitya = \"bwcasino\"\r\narcade_acrobatm = \"acrobatm\"\r\narcade_actfanc1 = \"actfancr\"\r\narcade_actfancj = \"actfancr\"\r\narcade_actfancr = \"actfancr\"\r\narcade_actfancr1 = \"actfancr\"\r\narcade_actfancr2 = \"actfancr\"\r\narcade_actfancrj = \"actfancr\"\r\narcade_ad2083 = \"ad2083\"\r\narcade_aeroboto = \"formatz\"\r\narcade_aerofgt = \"aerofgt\"\r\narcade_aerofgtb = \"aerofgt\"\r\narcade_aerofgtc = \"aerofgt\"\r\narcade_afighter = \"afighter\"\r\narcade_afightera = \"afighter\"\r\narcade_afighterb = \"afighter\"\r\narcade_agallet = \"agallet\"\r\narcade_agalleta = \"agallet\"\r\narcade_agalletah = \"agallet\"\r\narcade_agalletaj = \"agallet\"\r\narcade_agalletak = \"agallet\"\r\narcade_agalletat = \"agallet\"\r\narcade_agalletau = \"agallet\"\r\narcade_agalleth = \"agallet\"\r\narcade_agalletj = \"agallet\"\r\narcade_agalletk = \"agallet\"\r\narcade_agallett = \"agallet\"\r\narcade_agalletu = \"agallet\"\r\narcade_agentx1 = \"cloak\"\r\narcade_agentx2 = \"cloak\"\r\narcade_agentx3 = \"cloak\"\r\narcade_agentx4 = \"cloak\"\r\narcade_agress = \"agress\"\r\narcade_agressb = \"agress\"\r\narcade_ainferno = \"ainferno\"\r\narcade_airass = \"airass\"\r\narcade_airattck = \"airattck\"\r\narcade_airattcka = \"airattck\"\r\narcade_airbustj = \"airbustr\"\r\narcade_airbustr = \"airbustr\"\r\narcade_airbustrb = \"airbustr\"\r\narcade_airbustrj = \"airbustr\"\r\narcade_airco22b = \"airco22b\"\r\narcade_aircombj = \"aircombj\"\r\narcade_aircombu = \"aircombj\"\r\narcade_airduel = \"airduel\"\r\narcade_airduelm72 = \"airduel\"\r\narcade_airraid = \"cshooter\"\r\narcade_airwolf = \"airwolf\"\r\narcade_airwolfa = \"airwolf\"\r\narcade_ajax = \"ajax\"\r\narcade_ajaxj = \"ajax\"\r\narcade_akiss = \"akiss\"\r\narcade_akkanvdr = \"spcinv95\"\r\narcade_akumajou = \"hcastle\"\r\narcade_akumajoun = \"hcastle\"\r\narcade_alcon = \"alcon\"\r\narcade_alexkida = \"alexkidd\"\r\narcade_alexkidd = \"alexkidd\"\r\narcade_alexkidd1 = \"alexkidd\"\r\narcade_alibaba = \"alibaba\"\r\narcade_alibabab = \"alibaba\"\r\narcade_alien3 = \"alien3\"\r\narcade_alienar = \"alienar\"\r\narcade_alienaru = \"alienaru\"\r\narcade_aliencha = \"aliencha\"\r\narcade_alienchac = \"aliencha\"\r\narcade_alieninv = \"invaders\"\r\narcade_aliens = \"aliens\"\r\narcade_aliens2 = \"aliens\"\r\narcade_aliens3 = \"aliens\"\r\narcade_aliensa = \"aliens\"\r\narcade_aliensec = \"aliensec\"\r\narcade_aliensj = \"aliens\"\r\narcade_aliensj2 = \"aliens\"\r\narcade_aliensu = \"aliens\"\r\narcade_aliensya = \"aliensyn\"\r\narcade_aliensyb = \"aliensyn\"\r\narcade_aliensyj = \"aliensyn\"\r\narcade_aliensyn = \"aliensyn\"\r\narcade_aliensyn2 = \"aliensyn\"\r\narcade_aliensyn3 = \"aliensyn\"\r\narcade_aliensyn5 = \"aliensyn\"\r\narcade_aliensyn7 = \"aliensyn\"\r\narcade_aliensynj = \"aliensyn\"\r\narcade_aliensynjo = \"aliensyn\"\r\narcade_aligator = \"aligator\"\r\narcade_aligators = \"aligator\"\r\narcade_aligatorun = \"aligator\"\r\narcade_aligatoruna = \"aligator\"\r\narcade_aligatun = \"aligator\"\r\narcade_alinvade = \"alinvade\"\r\narcade_alleymas = \"alleymas\"\r\narcade_alphaho = \"alphaho\"\r\narcade_alpham2 = \"alpham2\"\r\narcade_alpham2p = \"alpham2\"\r\narcade_alphamis = \"aso\"\r\narcade_alphaona = \"mhavoc\"\r\narcade_alphaone = \"mhavoc\"\r\narcade_alphaxz = \"m660\"\r\narcade_alpine = \"alpine\"\r\narcade_alpinea = \"alpine\"\r\narcade_alpinerc = \"alpinerd\"\r\narcade_alpinerd = \"alpinerd\"\r\narcade_altbeas2 = \"altbeast\"\r\narcade_altbeast = \"altbeast\"\r\narcade_altbeast2 = \"altbeast\"\r\narcade_altbeast4 = \"altbeast\"\r\narcade_altbeast5 = \"altbeast\"\r\narcade_altbeast5d = \"altbeast\"\r\narcade_altbeast6 = \"altbeast\"\r\narcade_altbeastbl = \"altbeast\"\r\narcade_altbeastj = \"altbeast\"\r\narcade_altbeastj1 = \"altbeast\"\r\narcade_altbeastj3 = \"altbeast\"\r\narcade_altbeastj3d = \"altbeast\"\r\narcade_amatelas = \"amazon\"\r\narcade_amazon = \"amazon\"\r\narcade_ambush = \"ambush\"\r\narcade_ambushh = \"ambush\"\r\narcade_ambushj = \"ambush\"\r\narcade_ambusht = \"ambush\"\r\narcade_ambushv = \"ambush\"\r\narcade_amerdart = \"amerdart\"\r\narcade_amidar = \"amidar\"\r\narcade_amidar1 = \"amidar\"\r\narcade_amidarb = \"amidar\"\r\narcade_amidaro = \"amidar\"\r\narcade_amidars = \"amidar\"\r\narcade_amidaru = \"amidar\"\r\narcade_amigo = \"amidar\"\r\narcade_amspdwy = \"amspdwy\"\r\narcade_amspdwya = \"amspdwy\"\r\narcade_androdun = \"androdun\"\r\narcade_androidp = \"androidp\"\r\narcade_androidpo = \"androidp\"\r\narcade_andromed = \"andromed\"\r\narcade_angelkds = \"angelkds\"\r\narcade_anteater = \"anteater\"\r\narcade_anteaterg = \"anteater\"\r\narcade_anteateruk = \"anteater\"\r\narcade_aodk = \"aodk\"\r\narcade_aof = \"aof\"\r\narcade_aof2 = \"aof2\"\r\narcade_aof2a = \"aof2\"\r\narcade_aof3 = \"aof3\"\r\narcade_aof3k = \"aof3\"\r\narcade_apb = \"apb\"\r\narcade_apb1 = \"apb\"\r\narcade_apb2 = \"apb\"\r\narcade_apb3 = \"apb\"\r\narcade_apb4 = \"apb\"\r\narcade_apb5 = \"apb\"\r\narcade_apb6 = \"apb\"\r\narcade_apbf = \"apb\"\r\narcade_apbg = \"apb\"\r\narcade_aponow = \"rescue\"\r\narcade_apparel = \"apparel\"\r\narcade_appoooh = \"appoooh\"\r\narcade_aquajack = \"aquajack\"\r\narcade_aquajackj = \"aquajack\"\r\narcade_aquajacku = \"aquajack\"\r\narcade_aquajckj = \"aquajack\"\r\narcade_aquarium = \"aquarium\"\r\narcade_aquariumj = \"aquarium\"\r\narcade_aquarush = \"aquarush\"\r\narcade_arabfgt = \"arabfgt\"\r\narcade_arabiamj = \"arabianm\"\r\narcade_arabiamu = \"arabianm\"\r\narcade_arabian = \"arabian\"\r\narcade_arabiana = \"arabian\"\r\narcade_arabianm = \"arabianm\"\r\narcade_arabianmj = \"arabianm\"\r\narcade_arabianmu = \"arabianm\"\r\narcade_aracnis = \"scorpion\"\r\narcade_arbalest = \"arbalest\"\r\narcade_arcadecl = \"arcadecl\"\r\narcade_arcadia = \"nyny\"\r\narcade_arcadian = \"arcadian\"\r\narcade_archriv2 = \"archrivl\"\r\narcade_archrivl = \"archrivl\"\r\narcade_area51 = \"area51\"\r\narcade_area51mx = \"area51mx\"\r\narcade_area88 = \"unsquad\"\r\narcade_area88r = \"unsquad\"\r\narcade_arescue = \"arescue\"\r\narcade_argus = \"argus\"\r\narcade_arian = \"aso\"\r\narcade_ark1ball = \"arkanoid\"\r\narcade_ark1balla = \"arkanoid\"\r\narcade_arkangc = \"arkanoid\"\r\narcade_arkangc2 = \"arkanoid\"\r\narcade_arkanoid = \"arkanoid\"\r\narcade_arkanoidj = \"arkanoid\"\r\narcade_arkanoidja = \"arkanoid\"\r\narcade_arkanoidjb = \"arkanoid\"\r\narcade_arkanoidjbl = \"arkanoid\"\r\narcade_arkanoidjbl2 = \"arkanoid\"\r\narcade_arkanoidjbla = \"arkanoid\"\r\narcade_arkanoidu = \"arkanoid\"\r\narcade_arkanoiduo = \"arkanoid\"\r\narcade_arkarea = \"arkarea\"\r\narcade_arkatayt = \"arkanoid\"\r\narcade_arkatour = \"arkatour\"\r\narcade_arkbl2 = \"arkanoid\"\r\narcade_arkbl3 = \"arkanoid\"\r\narcade_arkbloc2 = \"arkanoid\"\r\narcade_arkblock = \"arkanoid\"\r\narcade_arkgcbl = \"arkanoid\"\r\narcade_arknid2j = \"arknoid2\"\r\narcade_arknid2u = \"arknoid2\"\r\narcade_arknoid2 = \"arknoid2\"\r\narcade_arknoid2b = \"arknoid2\"\r\narcade_arknoid2j = \"arknoid2\"\r\narcade_arknoid2u = \"arknoid2\"\r\narcade_arknoidj = \"arkanoid\"\r\narcade_arknoidu = \"arkanoid\"\r\narcade_arknoiuo = \"arkanoid\"\r\narcade_arkretrn = \"arkretrn\"\r\narcade_arkretrnj = \"arkretrn\"\r\narcade_arkretrnu = \"arkretrn\"\r\narcade_arktayt2 = \"arkanoid\"\r\narcade_arlingtn = \"arlingtn\"\r\narcade_armedf = \"armedf\"\r\narcade_armedff = \"armedf\"\r\narcade_armora = \"armora\"\r\narcade_armorap = \"armora\"\r\narcade_armorar = \"armora\"\r\narcade_armorca2 = \"armorcar\"\r\narcade_armorcar = \"armorcar\"\r\narcade_armorcar2 = \"armorcar\"\r\narcade_armwar = \"armwar\"\r\narcade_armwar1d = \"armwar\"\r\narcade_armwara = \"armwar\"\r\narcade_armwarar1 = \"armwar\"\r\narcade_armwarr1 = \"armwar\"\r\narcade_armwaru = \"armwar\"\r\narcade_armwaru1 = \"armwar\"\r\narcade_armwrest = \"armwrest\"\r\narcade_ashnojoe = \"scessjoe\"\r\narcade_ashura = \"ashura\"\r\narcade_ashuraj = \"ashura\"\r\narcade_ashurau = \"ashura\"\r\narcade_asideral = \"uniwars\"\r\narcade_aso = \"aso\"\r\narcade_assault = \"assault\"\r\narcade_assaultj = \"assault\"\r\narcade_assaultp = \"assault\"\r\narcade_astdelu1 = \"astdelux\"\r\narcade_astdelux = \"astdelux\"\r\narcade_asterix = \"asterix\"\r\narcade_asterixaad = \"asterix\"\r\narcade_asterixeaa = \"asterix\"\r\narcade_asterixeac = \"asterix\"\r\narcade_asterixj = \"asterix\"\r\narcade_asterock = \"asteroid\"\r\narcade_asteroi1 = \"asteroid\"\r\narcade_asteroib = \"asteroid\"\r\narcade_asteroid = \"asteroid\"\r\narcade_astinvad = \"astinvad\"\r\narcade_astorm = \"astorm\"\r\narcade_astorm2p = \"astorm\"\r\narcade_astorm3 = \"astorm\"\r\narcade_astorm3d = \"astorm\"\r\narcade_astormbl = \"astorm\"\r\narcade_astormj = \"astorm\"\r\narcade_astormjd = \"astorm\"\r\narcade_astormu = \"astorm\"\r\narcade_astormud = \"astorm\"\r\narcade_astrass = \"astrass\"\r\narcade_astrians = \"galaxian\"\r\narcade_astrob = \"astrob\"\r\narcade_astrob1 = \"astrob\"\r\narcade_astrob2 = \"astrob\"\r\narcade_astrof = \"astrof\"\r\narcade_astrof2 = \"astrof\"\r\narcade_astrof3 = \"astrof\"\r\narcade_astrofl = \"transfrm\"\r\narcade_astrxeaa = \"asterix\"\r\narcade_astrxeac = \"asterix\"\r\narcade_astyanax = \"astyanax\"\r\narcade_asuka = \"asuka\"\r\narcade_asukaj = \"asuka\"\r\narcade_asurabld = \"asurabld\"\r\narcade_asurabus = \"asurabus\"\r\narcade_asurabusa = \"asurabus\"\r\narcade_asylum = \"asylum\"\r\narcade_atarifb = \"atarifb\"\r\narcade_atarifb1 = \"atarifb\"\r\narcade_atarifb4 = \"atarifb\"\r\narcade_ataxx = \"ataxx\"\r\narcade_ataxxa = \"ataxx\"\r\narcade_ataxxj = \"ataxx\"\r\narcade_atehate = \"atehate\"\r\narcade_atetckt2 = \"atetris\"\r\narcade_atetcktl = \"atetris\"\r\narcade_atetris = \"atetris\"\r\narcade_atetrisa = \"atetris\"\r\narcade_atetrisb = \"atetris\"\r\narcade_atetrisb2 = \"atetris\"\r\narcade_atetrisc = \"atetris\"\r\narcade_atetrisc2 = \"atetris\"\r\narcade_athena = \"athena\"\r\narcade_athenab = \"athena\"\r\narcade_atlantis = \"atlantis\"\r\narcade_atlantis2 = \"atlantis\"\r\narcade_atlantisb = \"atlantis\"\r\narcade_atlantol = \"trackfld\"\r\narcade_atlants2 = \"atlantis\"\r\narcade_atomboy = \"wilytowr\"\r\narcade_atomboya = \"wilytowr\"\r\narcade_atomicp = \"atomicp\"\r\narcade_atompunk = \"dynablst\"\r\narcade_aurail = \"aurail\"\r\narcade_aurail1 = \"aurail\"\r\narcade_aurail1d = \"aurail\"\r\narcade_auraila = \"aurail\"\r\narcade_aurailj = \"aurail\"\r\narcade_aurailjd = \"aurail\"\r\narcade_av2mj1bb = \"av2mj1bb\"\r\narcade_av2mj2rg = \"av2mj2rg\"\r\narcade_avalnche = \"avalnche\"\r\narcade_avefenix = \"phoenix\"\r\narcade_avefenixl = \"phoenix\"\r\narcade_avefenixrf = \"phoenix\"\r\narcade_avenger2 = \"avengers\"\r\narcade_avengers = \"avengers\"\r\narcade_avengers2 = \"avengers\"\r\narcade_avengrgs = \"avengrgs\"\r\narcade_avengrgsj = \"avengrgs\"\r\narcade_avsp = \"avsp\"\r\narcade_avspa = \"avsp\"\r\narcade_avspd = \"avsp\"\r\narcade_avsph = \"avsp\"\r\narcade_avspirit = \"avspirit\"\r\narcade_avspj = \"avsp\"\r\narcade_avspu = \"avsp\"\r\narcade_aztarac = \"aztarac\"\r\narcade_azurian = \"azurian\"\r\narcade_b2b = \"b2b\"\r\narcade_backfire = \"backfire\"\r\narcade_backfirea = \"backfire\"\r\narcade_backfirt = \"backfirt\"\r\narcade_baddudes = \"baddudes\"\r\narcade_badlands = \"badlands\"\r\narcade_bagman = \"bagman\"\r\narcade_bagmanm2 = \"bagman\"\r\narcade_bagmanmc = \"bagman\"\r\narcade_bagmans = \"bagman\"\r\narcade_bagmans2 = \"bagman\"\r\narcade_bagnard = \"bagman\"\r\narcade_bakatono = \"bakatono\"\r\narcade_bakubaku = \"bakubaku\"\r\narcade_bakubrkr = \"explbrkr\"\r\narcade_bakuhatu = \"mjgottsu\"\r\narcade_bakutotu = \"bakutotu\"\r\narcade_balcube = \"balcube\"\r\narcade_ballbomb = \"ballbomb\"\r\narcade_ballboy = \"snowbro3\"\r\narcade_ballbros = \"ballbros\"\r\narcade_balonfgt = \"balonfgt\"\r\narcade_baluba = \"baluba\"\r\narcade_bananadr = \"bananadr\"\r\narcade_bandido = \"sheriff\"\r\narcade_bang = \"bang\"\r\narcade_bangball = \"bangball\"\r\narcade_bangbead = \"bangbead\"\r\narcade_bangbedp = \"bangbead\"\r\narcade_bangj = \"bang\"\r\narcade_bankp = \"bankp\"\r\narcade_baraduka = \"baraduke\"\r\narcade_baraduke = \"aliensec\"\r\narcade_barricad = \"barricad\"\r\narcade_barrier = \"barrier\"\r\narcade_baryon = \"baryon\"\r\narcade_baryona = \"baryon\"\r\narcade_basebal2 = \"basebal2\"\r\narcade_batcir = \"batcir\"\r\narcade_batcira = \"batcir\"\r\narcade_batcird = \"batcir\"\r\narcade_batcirj = \"batcir\"\r\narcade_batlbubl = \"bangball\"\r\narcade_batman = \"batman\"\r\narcade_batman2 = \"phoenix\"\r\narcade_batmanfr = \"batmanfr\"\r\narcade_batrider = \"batrider\"\r\narcade_batriderc = \"batrider\"\r\narcade_batriderhk = \"batrider\"\r\narcade_batriderj = \"batrider\"\r\narcade_batriderja = \"batrider\"\r\narcade_batriderk = \"batrider\"\r\narcade_batridert = \"batrider\"\r\narcade_batrideru = \"batrider\"\r\narcade_batridra = \"batrider\"\r\narcade_batridrk = \"batrider\"\r\narcade_batsugun = \"batsugun\"\r\narcade_batsuguna = \"batsugun\"\r\narcade_batsugunb = \"batsugun\"\r\narcade_batsugunsp = \"batsugun\"\r\narcade_battlan2 = \"battlane\"\r\narcade_battlan3 = \"battlane\"\r\narcade_battlane = \"battlane\"\r\narcade_battlane2 = \"battlane\"\r\narcade_battlane3 = \"battlane\"\r\narcade_battlcry = \"battlcry\"\r\narcade_battleg = \"battleg\"\r\narcade_battlega = \"battleg\"\r\narcade_battlegb = \"battleg\"\r\narcade_battlera = \"battlera\"\r\narcade_battles = \"xevious\"\r\narcade_battlex = \"battlex\"\r\narcade_battlntj = \"battlnts\"\r\narcade_battlnts = \"battlnts\"\r\narcade_battlntsa = \"battlnts\"\r\narcade_battlntsj = \"battlnts\"\r\narcade_battroad = \"battroad\"\r\narcade_batugnsp = \"batsugun\"\r\narcade_batwings = \"bwing\"\r\narcade_bayrouta = \"bayroute\"\r\narcade_bayroute = \"bayroute\"\r\narcade_bayroute1 = \"bayroute\"\r\narcade_bayrouted = \"bayroute\"\r\narcade_bayroutej = \"bayroute\"\r\narcade_bayroutejd = \"bayroute\"\r\narcade_bayrtbl1 = \"bayroute\"\r\narcade_bayrtbl2 = \"bayroute\"\r\narcade_bbakradu = \"bbakraid\"\r\narcade_bbakraid = \"bbakraid\"\r\narcade_bbakraidc = \"bbakraid\"\r\narcade_bbakraidj = \"bbakraid\"\r\narcade_bbakraidja = \"bbakraid\"\r\narcade_bballs = \"bballs\"\r\narcade_bballsa = \"bballs\"\r\narcade_bbbuster = \"bbbuster\"\r\narcade_bbbxing = \"bbbxing\"\r\narcade_bbmanw = \"bbmanw\"\r\narcade_bbmanwj = \"bbmanw\"\r\narcade_bbmanwja = \"bbmanw\"\r\narcade_bbonk = \"bbonk\"\r\narcade_bbprot = \"bbprot\"\r\narcade_bbredux = \"bublbobl\"\r\narcade_bbros = \"pang\"\r\narcade_bbusters = \"bbusters\"\r\narcade_bbustersj = \"bbusters\"\r\narcade_bbustersja = \"bbusters\"\r\narcade_bbustersu = \"bbusters\"\r\narcade_bbustersua = \"bbusters\"\r\narcade_bchopper = \"bchopper\"\r\narcade_bcrusher = \"kncljoe\"\r\narcade_bcruzm12 = \"bcruzm12\"\r\narcade_bcstry = \"bcstry\"\r\narcade_bcstrya = \"bcstry\"\r\narcade_beaminv = \"beaminv\"\r\narcade_beast = \"beast\"\r\narcade_beastf = \"suprglob\"\r\narcade_beastfp = \"suprglob\"\r\narcade_beastrzb = \"beastrzb\"\r\narcade_beastrzr = \"beastrzr\"\r\narcade_beathead = \"beathead\"\r\narcade_beezer = \"beezer\"\r\narcade_beezer1 = \"beezer\"\r\narcade_benberob = \"benberob\"\r\narcade_berabohm = \"berabohm\"\r\narcade_berabohmb = \"berabohm\"\r\narcade_beraboho = \"berabohm\"\r\narcade_berlwall = \"berlwall\"\r\narcade_berlwallk = \"berlwall\"\r\narcade_berlwallt = \"berlwall\"\r\narcade_berlwalt = \"berlwall\"\r\narcade_bermudaa = \"bermudat\"\r\narcade_bermudao = \"bermudat\"\r\narcade_bermudat = \"bermudat\"\r\narcade_bermudata = \"worldwar\"\r\narcade_bermudatj = \"bermudat\"\r\narcade_berzerk = \"berzerk\"\r\narcade_berzerk1 = \"berzerk\"\r\narcade_bestbest = \"bestbest\"\r\narcade_bestleag = \"bigstrik\"\r\narcade_bestleaw = \"bigstrik\"\r\narcade_bestri = \"bestri\"\r\narcade_bgaregga = \"bgaregga\"\r\narcade_bgareggabl = \"bgaregga\"\r\narcade_bgareggabla = \"bgaregga\"\r\narcade_bgareggacn = \"bgaregga\"\r\narcade_bgareggahk = \"bgaregga\"\r\narcade_bgaregganv = \"bgaregga\"\r\narcade_bgareggat2 = \"bgaregga\"\r\narcade_bgareggatw = \"bgaregga\"\r\narcade_bgareggaz = \"bgaregga\"\r\narcade_bigbang = \"tdragon2\"\r\narcade_bigbucks = \"bigbucks\"\r\narcade_bigevglf = \"bigevglf\"\r\narcade_bigfghtr = \"skyrobo\"\r\narcade_bigkarnk = \"bigkarnk\"\r\narcade_bigprowr = \"bigprowr\"\r\narcade_bigrun = \"bigrun\"\r\narcade_bigstrik = \"bigstrik\"\r\narcade_bigstrkb = \"bigstrik\"\r\narcade_bigstrkba = \"bigstrik\"\r\narcade_bigtwin = \"bigtwin\"\r\narcade_bijokkog = \"bijokkog\"\r\narcade_bijokkoy = \"bijokkoy\"\r\narcade_bikkuric = \"bikkuric\"\r\narcade_billiard = \"hustler\"\r\narcade_bioatack = \"bioatack\"\r\narcade_biofreak = \"biofreak\"\r\narcade_biomtoy = \"biomtoy\"\r\narcade_biomtoya = \"biomtoy\"\r\narcade_biomtoyb = \"biomtoy\"\r\narcade_bionicc = \"bionicc\"\r\narcade_bionicc1 = \"bionicc\"\r\narcade_bionicc2 = \"bionicc\"\r\narcade_bioniccbl = \"bionicc\"\r\narcade_bioniccbl2 = \"bionicc\"\r\narcade_bioplayc = \"biomtoy\"\r\narcade_bioship = \"bioship\"\r\narcade_birdiy = \"birdiy\"\r\narcade_birdtry = \"birdtry\"\r\narcade_bishi = \"bishi\"\r\narcade_bjourney = \"bjourney\"\r\narcade_bjourneyh = \"bjourney\"\r\narcade_bjtwin = \"bjtwin\"\r\narcade_bjtwina = \"bjtwin\"\r\narcade_bking = \"bking\"\r\narcade_bking2 = \"bking2\"\r\narcade_bking3 = \"bking3\"\r\narcade_bkrtmaq = \"bkrtmaq\"\r\narcade_bktigerb = \"blktiger\"\r\narcade_bladestl = \"bladestl\"\r\narcade_bladestle = \"bladestl\"\r\narcade_bladestll = \"bladestl\"\r\narcade_bladstle = \"bladestl\"\r\narcade_blandia = \"blandia\"\r\narcade_blandiap = \"blandia\"\r\narcade_blasted = \"blasted\"\r\narcade_blaster = \"blaster\"\r\narcade_blastkit = \"blaster\"\r\narcade_blasto = \"blasto\"\r\narcade_blastoff = \"blastoff\"\r\narcade_blazeon = \"blazeon\"\r\narcade_blazer = \"blazer\"\r\narcade_blazstar = \"blazstar\"\r\narcade_blckgalb = \"blockgal\"\r\narcade_blckout2 = \"blockout\"\r\narcade_blckoutj = \"blockout\"\r\narcade_bldwolf = \"battlera\"\r\narcade_blitz = \"blitz\"\r\narcade_blitz2k = \"blitz2k\"\r\narcade_blitz99 = \"blitz99\"\r\narcade_blkbustr = \"mrjong\"\r\narcade_blkdrgnb = \"blktiger\"\r\narcade_blkdrgon = \"blktiger\"\r\narcade_blkdrgonb = \"blktiger\"\r\narcade_blkhearj = \"blkheart\"\r\narcade_blkheart = \"blkheart\"\r\narcade_blkheartj = \"blkheart\"\r\narcade_blkhole = \"blkhole\"\r\narcade_blkpnthr = \"blkpnthr\"\r\narcade_blktiger = \"blktiger\"\r\narcade_blktigera = \"blktiger\"\r\narcade_blktigerb1 = \"blktiger\"\r\narcade_blktigerb2 = \"blktiger\"\r\narcade_blktigerb3 = \"blktiger\"\r\narcade_blmbycar = \"blmbycar\"\r\narcade_blmbycaru = \"blmbycar\"\r\narcade_blmbycau = \"blmbycar\"\r\narcade_block = \"block\"\r\narcade_blocka = \"block\"\r\narcade_blockade = \"blockade\"\r\narcade_blockbl = \"block\"\r\narcade_blockcar = \"blockcar\"\r\narcade_blocken = \"blocken\"\r\narcade_blockgal = \"blockgal\"\r\narcade_blockhl = \"blockhl\"\r\narcade_blockj = \"block\"\r\narcade_blockout = \"blockout\"\r\narcade_blockout2 = \"blockout\"\r\narcade_blockoutj = \"blockout\"\r\narcade_blockr1 = \"block\"\r\narcade_blockr2 = \"block\"\r\narcade_bloodbro = \"bloodbro\"\r\narcade_bloodbroj = \"bloodbro\"\r\narcade_bloodbroja = \"bloodbro\"\r\narcade_bloodbrou = \"bloodbro\"\r\narcade_bloods11 = \"bloodstm\"\r\narcade_bloods21 = \"bloodstm\"\r\narcade_bloods22 = \"bloodstm\"\r\narcade_bloodstm = \"bloodstm\"\r\narcade_bloodwar = \"bloodwar\"\r\narcade_blox16b = \"bloxeed\"\r\narcade_bloxeed = \"bloxeed\"\r\narcade_bloxeedc = \"bloxeed\"\r\narcade_bloxeedd = \"bloxeed\"\r\narcade_blsthead = \"blstroid\"\r\narcade_blstroi2 = \"blstroid\"\r\narcade_blstroi3 = \"blstroid\"\r\narcade_blstroid = \"blstroid\"\r\narcade_blstroig = \"blstroid\"\r\narcade_blswhstl = \"blswhstl\"\r\narcade_blswhstla = \"blswhstl\"\r\narcade_bluehawk = \"bluehawk\"\r\narcade_bluehawkn = \"bluehawk\"\r\narcade_bluehawn = \"bluehawk\"\r\narcade_blueprnj = \"blueprnt\"\r\narcade_blueprnt = \"blueprnt\"\r\narcade_blueprntj = \"blueprnt\"\r\narcade_blueshrk = \"blueshrk\"\r\narcade_blzntrnd = \"blzntrnd\"\r\narcade_bm1stmix = \"bm1stmix\"\r\narcade_bm2ndmix = \"bm2ndmix\"\r\narcade_bm2ndmxa = \"bm2ndmix\"\r\narcade_bm4thmix = \"bm4thmix\"\r\narcade_bmaster = \"bmaster\"\r\narcade_bmcompmx = \"bmcompmx\"\r\narcade_bmcorerm = \"bmcorerm\"\r\narcade_bmdct = \"bmdct\"\r\narcade_bnglngby = \"bnglngby\"\r\narcade_bnj = \"brubber\"\r\narcade_bnzabros = \"bnzabros\"\r\narcade_boblbobl = \"bublbobl\"\r\narcade_boblcave = \"bublbobl\"\r\narcade_bodyslam = \"bodyslam\"\r\narcade_bogeyman = \"bogeyman\"\r\narcade_boggy84 = \"boggy84\"\r\narcade_boggy84b = \"boggy84\"\r\narcade_bombbee = \"bombbee\"\r\narcade_bomber = \"scramble\"\r\narcade_bombjac2 = \"bombjack\"\r\narcade_bombjack = \"bombjack\"\r\narcade_bombjack2 = \"bombjack\"\r\narcade_bombjackt = \"bombjack\"\r\narcade_bombkick = \"bombkick\"\r\narcade_bombkicka = \"bombkick\"\r\narcade_bombrman = \"dynablst\"\r\narcade_bongo = \"bongo\"\r\narcade_bonkadv = \"bonkadv\"\r\narcade_bonzeadu = \"bonzeadv\"\r\narcade_bonzeadv = \"bonzeadv\"\r\narcade_bonzeadvo = \"bonzeadv\"\r\narcade_bonzeadvp = \"bonzeadv\"\r\narcade_bonzeadvu = \"bonzeadv\"\r\narcade_boobhack = \"horekid\"\r\narcade_boogwing = \"boogwing\"\r\narcade_boogwinga = \"boogwing\"\r\narcade_boogwingu = \"boogwing\"\r\narcade_boomrang = \"boomrang\"\r\narcade_bootcamp = \"combasc\"\r\narcade_boothill = \"boothill\"\r\narcade_borench = \"borench\"\r\narcade_bosco = \"bosco\"\r\narcade_boscomd = \"bosco\"\r\narcade_boscomdo = \"bosco\"\r\narcade_boscoo = \"bosco\"\r\narcade_boscoo2 = \"bosco\"\r\narcade_botanic = \"botanic\"\r\narcade_bottom9 = \"bottom9\"\r\narcade_bottom9n = \"bottom9\"\r\narcade_bouldash = \"bouldash\"\r\narcade_bouldashj = \"bouldash\"\r\narcade_bouldshj = \"bouldash\"\r\narcade_bounty = \"bounty\"\r\narcade_bowler = \"bowler\"\r\narcade_bowlrama = \"bowlrama\"\r\narcade_boxer = \"boxer\"\r\narcade_boxingb = \"boxingb\"\r\narcade_boxyboy = \"boxyboy\"\r\narcade_bradley = \"bradley\"\r\narcade_brain = \"brain\"\r\narcade_brapboys = \"brapboys\"\r\narcade_brapboysj = \"brapboys\"\r\narcade_brapboysp = \"brapboys\"\r\narcade_brapboyspj = \"brapboys\"\r\narcade_brapboyspu = \"brapboys\"\r\narcade_brdrlinb = \"brdrline\"\r\narcade_brdrline = \"brdrline\"\r\narcade_brdrlinet = \"brdrline\"\r\narcade_brdrlins = \"brdrline\"\r\narcade_breakers = \"breakers\"\r\narcade_breakrev = \"breakrev\"\r\narcade_breywood = \"shackled\"\r\narcade_brickyrd = \"barricad\"\r\narcade_brickzn = \"brickzn\"\r\narcade_brickzn3 = \"brickzn\"\r\narcade_brival = \"brival\"\r\narcade_brix = \"zzyzzyxx\"\r\narcade_brkthru = \"brkthru\"\r\narcade_brkthruj = \"brkthru\"\r\narcade_brubber = \"brubber\"\r\narcade_brutforc = \"brutforc\"\r\narcade_brvblade = \"brvblade\"\r\narcade_bshark = \"bshark\"\r\narcade_bsharkj = \"bshark\"\r\narcade_bsharkjjs = \"bshark\"\r\narcade_bsharku = \"bshark\"\r\narcade_bsktball = \"bsktball\"\r\narcade_bssoccer = \"bssoccer\"\r\narcade_bstars = \"bstars\"\r\narcade_bstars2 = \"bstars2\"\r\narcade_bstarsh = \"bstars\"\r\narcade_btime = \"btime\"\r\narcade_btime2 = \"btime\"\r\narcade_btime3 = \"btime\"\r\narcade_btimem = \"btime\"\r\narcade_btlecity = \"btlecity\"\r\narcade_btlfield = \"timesold\"\r\narcade_btlfieldb = \"timesold\"\r\narcade_btlkroad = \"btlkroad\"\r\narcade_btlkroadk = \"btlkroad\"\r\narcade_btoads = \"btoads\"\r\narcade_bub68705 = \"bublbobl\"\r\narcade_bub68705a = \"bublbobl\"\r\narcade_bubblem = \"bubblem\"\r\narcade_bubblemj = \"bubblem\"\r\narcade_bubbles = \"bubbles\"\r\narcade_bubblesp = \"bubbles\"\r\narcade_bubblesr = \"bubbles\"\r\narcade_bubbletr = \"bubbletr\"\r\narcade_bubbletrj = \"bubbletr\"\r\narcade_bubbobr1 = \"bublbobl\"\r\narcade_bubl2000 = \"bubl2000\"\r\narcade_bublbob1 = \"bublbobl\"\r\narcade_bublbob2 = \"bublbob2\"\r\narcade_bublbob2o = \"bublbob2\"\r\narcade_bublbob2p = \"bublbob2\"\r\narcade_bublbobl = \"bublbobl\"\r\narcade_bublbobl1 = \"bublbobl\"\r\narcade_bublboblb = \"bublbobl\"\r\narcade_bublboblp = \"bublbobl\"\r\narcade_bublboblr = \"bublbobl\"\r\narcade_bublboblr1 = \"bublbobl\"\r\narcade_bublboblu = \"bublbobl\"\r\narcade_bublbobr = \"bublbobl\"\r\narcade_bublcave = \"bublbobl\"\r\narcade_bublcave10 = \"bublbobl\"\r\narcade_bublcave11 = \"bublbobl\"\r\narcade_bubsympe = \"bublbob2\"\r\narcade_bubsymph = \"bublbob2\"\r\narcade_bubsymphb = \"bublbob2\"\r\narcade_bubsymphe = \"bublbob2\"\r\narcade_bubsymphj = \"bublbob2\"\r\narcade_bubsymphu = \"bublbob2\"\r\narcade_bubsympu = \"bublbob2\"\r\narcade_bucaner = \"puckman\"\r\narcade_buccanrs = \"buccanrs\"\r\narcade_buccanrsa = \"buccanrs\"\r\narcade_buccanrsb = \"buccanrs\"\r\narcade_buckrog = \"buckrog\"\r\narcade_buckrogn = \"buckrog\"\r\narcade_bucky = \"bucky\"\r\narcade_buckyaa = \"bucky\"\r\narcade_buckyaab = \"bucky\"\r\narcade_buckyea = \"bucky\"\r\narcade_buckyjaa = \"bucky\"\r\narcade_buckyua = \"bucky\"\r\narcade_buckyuab = \"bucky\"\r\narcade_buggychl = \"buggychl\"\r\narcade_buggycht = \"buggychl\"\r\narcade_bullet = \"bullet\"\r\narcade_bulletd = \"bullet\"\r\narcade_bullfgt = \"bullfgt\"\r\narcade_bullfgtr = \"bullfgtr\"\r\narcade_buraiken = \"avengers\"\r\narcade_burglarx = \"burglarx\"\r\narcade_burnforc = \"burnforc\"\r\narcade_burnforco = \"burnforc\"\r\narcade_burningf = \"burningf\"\r\narcade_burningfh = \"burningf\"\r\narcade_burningfp = \"burningf\"\r\narcade_burningfpa = \"burningf\"\r\narcade_burningh = \"burningf\"\r\narcade_butasan = \"butasan\"\r\narcade_buzzard = \"gyrodine\"\r\narcade_bwcasino = \"bwcasino\"\r\narcade_bwidow = \"bwidow\"\r\narcade_bwing = \"bwing\"\r\narcade_bwings = \"bwings\"\r\narcade_bwingsa = \"bwings\"\r\narcade_bwingso = \"bwings\"\r\narcade_bygone = \"bygone\"\r\narcade_bzone = \"bzone\"\r\narcade_bzone2 = \"bzone\"\r\narcade_bzonec = \"bzone\"\r\narcade_cabal = \"cabal\"\r\narcade_cabala = \"cabal\"\r\narcade_cabalbl = \"cabal\"\r\narcade_cabaluk = \"cabal\"\r\narcade_cabalukj = \"cabal\"\r\narcade_cabalus = \"cabal\"\r\narcade_cabalus2 = \"cabal\"\r\narcade_cabaret = \"cabaret\"\r\narcade_cachat = \"cachat\"\r\narcade_cactus = \"sabotenb\"\r\narcade_cadanglr = \"cadanglr\"\r\narcade_cadash = \"cadash\"\r\narcade_cadashf = \"cadash\"\r\narcade_cadashg = \"cadash\"\r\narcade_cadashi = \"cadash\"\r\narcade_cadashj = \"cadash\"\r\narcade_cadashj1 = \"cadash\"\r\narcade_cadashjo = \"cadash\"\r\narcade_cadashp = \"cadash\"\r\narcade_cadashs = \"cadash\"\r\narcade_cadashu = \"cadash\"\r\narcade_cairblad = \"cairblad\"\r\narcade_calibr50 = \"calibr50\"\r\narcade_calipso = \"calipso\"\r\narcade_calorie = \"calorie\"\r\narcade_calorieb = \"calorie\"\r\narcade_calspeed = \"calspeed\"\r\narcade_cameltrj = \"cameltry\"\r\narcade_cameltry = \"cameltry\"\r\narcade_cameltrya = \"cameltry\"\r\narcade_cameltryau = \"cameltry\"\r\narcade_cameltryj = \"cameltry\"\r\narcade_camltrua = \"cameltry\"\r\narcade_candance = \"osman\"\r\narcade_candory = \"ponpoko\"\r\narcade_cannball = \"cannball\"\r\narcade_cannballv = \"cannball\"\r\narcade_cannonb = \"cannonb\"\r\narcade_cannonbp = \"cannonbp\"\r\narcade_canvas = \"canvas\"\r\narcade_canyon = \"canyon\"\r\narcade_canyonp = \"canyon\"\r\narcade_capbowl = \"capbowl\"\r\narcade_capbowl2 = \"capbowl\"\r\narcade_capbowl3 = \"capbowl\"\r\narcade_capbowl4 = \"capbowl\"\r\narcade_capitol = \"pleiads\"\r\narcade_captaven = \"captaven\"\r\narcade_captavena = \"captaven\"\r\narcade_captavene = \"captaven\"\r\narcade_captavenj = \"captaven\"\r\narcade_captavenu = \"captaven\"\r\narcade_captavenua = \"captaven\"\r\narcade_captavenuu = \"captaven\"\r\narcade_captavna = \"captaven\"\r\narcade_captavne = \"captaven\"\r\narcade_captavnj = \"captaven\"\r\narcade_captavnu = \"captaven\"\r\narcade_captavuu = \"captaven\"\r\narcade_captcomj = \"captcomm\"\r\narcade_captcomm = \"captcomm\"\r\narcade_captcommb = \"captcomm\"\r\narcade_captcommb2 = \"captcomm\"\r\narcade_captcommj = \"captcomm\"\r\narcade_captcommjr1 = \"captcomm\"\r\narcade_captcommr1 = \"captcomm\"\r\narcade_captcommu = \"captcomm\"\r\narcade_captcomu = \"captcomm\"\r\narcade_car2 = \"headon2\"\r\narcade_caractn = \"brubber\"\r\narcade_carhntds = \"carhntds\"\r\narcade_carjmbre = \"carjmbre\"\r\narcade_carnevil = \"carnevil\"\r\narcade_carnival = \"carnival\"\r\narcade_carnivalc = \"carnival\"\r\narcade_carnivalh = \"carnival\"\r\narcade_carnivalha = \"carnival\"\r\narcade_carnvckt = \"carnival\"\r\narcade_carpolo = \"carpolo\"\r\narcade_casanova = \"casanova\"\r\narcade_cashquiz = \"cashquiz\"\r\narcade_castfant = \"castfant\"\r\narcade_catacomb = \"catacomb\"\r\narcade_catapult = \"catapult\"\r\narcade_catch22 = \"combat\"\r\narcade_catt = \"mcatadv\"\r\narcade_cavelon = \"cavelon\"\r\narcade_cavenger = \"cavenger\"\r\narcade_cawing = \"cawing\"\r\narcade_cawingb2 = \"cawing\"\r\narcade_cawingbl = \"cawing\"\r\narcade_cawingj = \"cawing\"\r\narcade_cawingr1 = \"cawing\"\r\narcade_cawingu = \"cawing\"\r\narcade_cawingur1 = \"cawing\"\r\narcade_cbasebal = \"cbasebal\"\r\narcade_cbdash = \"cbdash\"\r\narcade_cbnj = \"cburnrub\"\r\narcade_cbtime = \"cbtime\"\r\narcade_cburnrb2 = \"cburnrub\"\r\narcade_cburnrub = \"cburnrub\"\r\narcade_cburnrub2 = \"cburnrub\"\r\narcade_cbuster = \"cbuster\"\r\narcade_cbusterj = \"cbuster\"\r\narcade_cbusterw = \"cbuster\"\r\narcade_ccasino = \"ccasino\"\r\narcade_ccastle2 = \"ccastles\"\r\narcade_ccastle3 = \"ccastles\"\r\narcade_ccastlej = \"ccastles\"\r\narcade_ccastles = \"ccastles\"\r\narcade_ccboot = \"cclimber\"\r\narcade_ccboot2 = \"cclimber\"\r\narcade_cchasm = \"cchasm\"\r\narcade_cchasm1 = \"cchasm\"\r\narcade_cclimber = \"cclimber\"\r\narcade_cclimbera = \"cclimber\"\r\narcade_cclimberj = \"cclimber\"\r\narcade_cclimbr2 = \"cclimbr2\"\r\narcade_cclimbr2a = \"cclimbr2\"\r\narcade_cclimbrj = \"cclimber\"\r\narcade_cdiscon1 = \"cdiscon1\"\r\narcade_cdsteljn = \"cdsteljn\"\r\narcade_cencourt = \"passsht\"\r\narcade_centipb2 = \"centiped\"\r\narcade_centipd2 = \"centiped\"\r\narcade_centipdb = \"centiped\"\r\narcade_centiped = \"centiped\"\r\narcade_centiped3 = \"centiped\"\r\narcade_centtime = \"centiped\"\r\narcade_cerberus = \"cerberus\"\r\narcade_cexplore = \"cexplore\"\r\narcade_cfboy0a1 = \"cfboy0a1\"\r\narcade_cfghtice = \"cfghtice\"\r\narcade_cfishing = \"cadanglr\"\r\narcade_cflyball = \"cflyball\"\r\narcade_cgangpzj = \"cgangpzl\"\r\narcade_cgangpzl = \"cgangpzl\"\r\narcade_cgraplop = \"cgraplop\"\r\narcade_cgraplop2 = \"cgraplop\"\r\narcade_cgraplp2 = \"cgraplop\"\r\narcade_chainrec = \"chainrec\"\r\narcade_chaknpop = \"chaknpop\"\r\narcade_challeng = \"challeng\"\r\narcade_chamburger = \"cbtime\"\r\narcade_chameleo = \"chameleo\"\r\narcade_champbas = \"champbas\"\r\narcade_champbb2 = \"champbb2\"\r\narcade_champbbj = \"champbas\"\r\narcade_champbja = \"champbas\"\r\narcade_champwr = \"champwr\"\r\narcade_champwrj = \"champwr\"\r\narcade_champwru = \"champwr\"\r\narcade_chanbara = \"chanbara\"\r\narcade_changes = \"changes\"\r\narcade_changesa = \"changes\"\r\narcade_charlien = \"charlien\"\r\narcade_chasehq = \"chasehq\"\r\narcade_chasehqj = \"chasehq\"\r\narcade_chasehqju = \"chasehq\"\r\narcade_chasehqu = \"chasehq\"\r\narcade_chboxing = \"chboxing\"\r\narcade_checkmaj = \"checkman\"\r\narcade_checkman = \"checkman\"\r\narcade_checkmanj = \"checkman\"\r\narcade_checkmat = \"checkmat\"\r\narcade_cheekyms = \"cheekyms\"\r\narcade_cheesech = \"cheesech\"\r\narcade_chelnov = \"chelnov\"\r\narcade_chelnovj = \"chelnov\"\r\narcade_chelnovu = \"chelnov\"\r\narcade_chewing = \"luctoday\"\r\narcade_cheyenne = \"cheyenne\"\r\narcade_chikij = \"mtwins\"\r\narcade_chiller = \"chiller\"\r\narcade_chimerab = \"chimerab\"\r\narcade_chinagat = \"chinagat\"\r\narcade_chinatwn = \"chinatwn\"\r\narcade_chinher2 = \"chinhero\"\r\narcade_chinhero = \"chinhero\"\r\narcade_chinmoku = \"chinmoku\"\r\narcade_chkun = \"chkun\"\r\narcade_chokchok = \"chokchok\"\r\narcade_choko = \"choko\"\r\narcade_choplift = \"choplift\"\r\narcade_chopliftbl = \"choplift\"\r\narcade_chopliftu = \"choplift\"\r\narcade_chopper = \"chopper\"\r\narcade_choppera = \"chopper\"\r\narcade_chopperb = \"chopper\"\r\narcade_chplft = \"chplft\"\r\narcade_chplftb = \"chplft\"\r\narcade_chplftbl = \"chplft\"\r\narcade_chqflag = \"chqflag\"\r\narcade_chqflagj = \"chqflag\"\r\narcade_chukatai = \"chukatai\"\r\narcade_chukataij = \"chukatai\"\r\narcade_chukataija = \"chukatai\"\r\narcade_chukataiu = \"chukatai\"\r\narcade_chukataj = \"chukatai\"\r\narcade_chukatau = \"chukatai\"\r\narcade_chwrestl = \"chwrestl\"\r\narcade_chwy = \"chwy\"\r\narcade_circus = \"circus\"\r\narcade_circusc = \"circusc\"\r\narcade_circusc2 = \"circusc\"\r\narcade_circusc3 = \"circusc\"\r\narcade_circusc4 = \"circusc\"\r\narcade_circuscc = \"circusc\"\r\narcade_circusce = \"circusc\"\r\narcade_cischeat = \"cischeat\"\r\narcade_citybmrj = \"citybomb\"\r\narcade_citybomb = \"citybomb\"\r\narcade_citybombj = \"citybomb\"\r\narcade_citycon = \"citycon\"\r\narcade_citycona = \"citycon\"\r\narcade_citylove = \"citylove\"\r\narcade_ckong = \"ckong\"\r\narcade_ckonga = \"ckong\"\r\narcade_ckongalc = \"ckong\"\r\narcade_ckongg = \"ckong\"\r\narcade_ckongjeu = \"ckong\"\r\narcade_ckongmc = \"ckong\"\r\narcade_ckongo = \"ckong\"\r\narcade_ckongpt2 = \"ckongpt2\"\r\narcade_ckongs = \"ckong\"\r\narcade_clapapa = \"clapapa\"\r\narcade_clapapa2 = \"clapapa\"\r\narcade_claypign = \"claypign\"\r\narcade_clayshoo = \"clayshoo\"\r\narcade_clbowl = \"capbowl\"\r\narcade_cleopatr = \"cleopatr\"\r\narcade_cloak = \"cloak\"\r\narcade_cloakfr = \"cloak\"\r\narcade_cloakgr = \"cloak\"\r\narcade_cloaksp = \"cloak\"\r\narcade_clocknch = \"clocknch\"\r\narcade_clocknchj = \"clocknch\"\r\narcade_cloud9 = \"cloud9\"\r\narcade_clowns = \"clowns\"\r\narcade_clowns1 = \"clowns\"\r\narcade_clshroad = \"clshroad\"\r\narcade_clshroadd = \"clshroad\"\r\narcade_clshroads = \"clshroad\"\r\narcade_cltchitr = \"cltchitr\"\r\narcade_cltchitrd = \"cltchitr\"\r\narcade_cltchitrj = \"cltchitr\"\r\narcade_cltchitrjd = \"cltchitr\"\r\narcade_club90s = \"club90s\"\r\narcade_club90sa = \"club90s\"\r\narcade_cluckypo = \"cluckypo\"\r\narcade_cluclu = \"cluclu\"\r\narcade_cmanhat = \"cmanhat\"\r\narcade_cmehyou = \"cmehyou\"\r\narcade_cmissnx = \"cmissnx\"\r\narcade_cnbe = \"cnbe\"\r\narcade_cndi = \"cndi\"\r\narcade_cnights2 = \"cnightst\"\r\narcade_cnightst = \"cnightst\"\r\narcade_cnightst2 = \"cnightst\"\r\narcade_cninja = \"cninja\"\r\narcade_cninja0 = \"cninja\"\r\narcade_cninja1 = \"cninja\"\r\narcade_cninjabl = \"cninja\"\r\narcade_cninjau = \"cninja\"\r\narcade_cobracmj = \"cobracom\"\r\narcade_cobracom = \"cobracom\"\r\narcade_cobracoma = \"cobracom\"\r\narcade_cobracomb = \"cobracom\"\r\narcade_cobracomj = \"cobracom\"\r\narcade_cobracomja = \"cobracom\"\r\narcade_cobracomjb = \"cobracom\"\r\narcade_cocean1a = \"cocean1a\"\r\narcade_cocean6b = \"cocean1a\"\r\narcade_colmns97 = \"colmns97\"\r\narcade_colony7 = \"colony7\"\r\narcade_colony7a = \"colony7\"\r\narcade_columns = \"columns\"\r\narcade_columns2 = \"columns2\"\r\narcade_columnsj = \"columns\"\r\narcade_columnsn = \"columnsn\"\r\narcade_combasc = \"combasc\"\r\narcade_combascb = \"combasc\"\r\narcade_combascj = \"combasc\"\r\narcade_combasct = \"combasc\"\r\narcade_combat = \"combat\"\r\narcade_combatsc = \"combatsc\"\r\narcade_combh = \"combh\"\r\narcade_commandj = \"commando\"\r\narcade_commando = \"commando\"\r\narcade_commandob = \"commando\"\r\narcade_commandob2 = \"commando\"\r\narcade_commandoj = \"commando\"\r\narcade_commandou = \"commando\"\r\narcade_commandou2 = \"commando\"\r\narcade_commandu = \"commando\"\r\narcade_commandw = \"commandw\"\r\narcade_commsega = \"commsega\"\r\narcade_comotion = \"comotion\"\r\narcade_compgolf = \"compgolf\"\r\narcade_complexx = \"complexx\"\r\narcade_condor = \"phoenix\"\r\narcade_condorn = \"phoenix\"\r\narcade_congo = \"congo\"\r\narcade_congoa = \"congo\"\r\narcade_conquer = \"conquer\"\r\narcade_contcirc = \"contcirc\"\r\narcade_contcircj = \"contcirc\"\r\narcade_contcircu = \"contcirc\"\r\narcade_contcircua = \"contcirc\"\r\narcade_contcrcu = \"contcirc\"\r\narcade_contra = \"contra\"\r\narcade_contra1 = \"contra\"\r\narcade_contrab = \"contra\"\r\narcade_contrabj = \"contra\"\r\narcade_contrabj1 = \"contra\"\r\narcade_contrae = \"contra\"\r\narcade_contraj = \"contra\"\r\narcade_contraj1 = \"contra\"\r\narcade_contrajb = \"contra\"\r\narcade_cookbib = \"cookbib\"\r\narcade_cookbib2 = \"cookbib2\"\r\narcade_cookbib2a = \"cookbib2\"\r\narcade_cookbib3 = \"cookbib3\"\r\narcade_cookbiba = \"cookbib\"\r\narcade_cookrace = \"btime\"\r\narcade_coolpool = \"coolpool\"\r\narcade_coozumou = \"coozumou\"\r\narcade_cop01 = \"cop01\"\r\narcade_cop01a = \"cop01\"\r\narcade_copsnrob = \"copsnrob\"\r\narcade_cosmccop = \"cosmccop\"\r\narcade_cosmica = \"cosmica\"\r\narcade_cosmica2 = \"cosmica\"\r\narcade_cosmicg = \"cosmicg\"\r\narcade_cosmicmo = \"invaders\"\r\narcade_cosmo = \"cosmo\"\r\narcade_cosmogng = \"cosmogng\"\r\narcade_cosmognj = \"cosmogng\"\r\narcade_cosmos = \"cosmos\"\r\narcade_cotton = \"cotton\"\r\narcade_cotton2 = \"cotton2\"\r\narcade_cottona = \"cotton\"\r\narcade_cottonbm = \"cottonbm\"\r\narcade_cottond = \"cotton\"\r\narcade_cottong = \"locomotn\"\r\narcade_cottonj = \"cotton\"\r\narcade_cottonja = \"cotton\"\r\narcade_cottonjad = \"cotton\"\r\narcade_cottonjd = \"cotton\"\r\narcade_cottonu = \"cotton\"\r\narcade_cottonud = \"cotton\"\r\narcade_countrb2 = \"countrun\"\r\narcade_countrnb = \"countrun\"\r\narcade_countrun = \"countrun\"\r\narcade_countrunb = \"countrun\"\r\narcade_countryc = \"countryc\"\r\narcade_cphd = \"cphd\"\r\narcade_cppicf = \"cppicf\"\r\narcade_cppicf2 = \"cppicf\"\r\narcade_cprobowl = \"cprobowl\"\r\narcade_cprogolf = \"cprogolf\"\r\narcade_cprogolf18 = \"cprogolf\"\r\narcade_cprogolfj = \"cprogolf\"\r\narcade_cprosocc = \"cprosocc\"\r\narcade_cps1demo = \"cps1demo\"\r\narcade_cps1frog = \"cps1frog\"\r\narcade_cpsoccer = \"cpsoccer\"\r\narcade_cpsoccerj = \"cpsoccer\"\r\narcade_cptennis = \"cptennis\"\r\narcade_cptennisj = \"cptennis\"\r\narcade_cracksht = \"cracksht\"\r\narcade_crash = \"crash\"\r\narcade_crater = \"crater\"\r\narcade_crazyblk = \"mrjong\"\r\narcade_crazycop = \"gbusters\"\r\narcade_crazyfgt = \"crazyfgt\"\r\narcade_crbalon2 = \"crbaloon\"\r\narcade_crbaloon = \"crbaloon\"\r\narcade_crbaloon2 = \"crbaloon\"\r\narcade_crgolf = \"crgolf\"\r\narcade_crgolfa = \"crgolf\"\r\narcade_crgolfb = \"crgolf\"\r\narcade_crgolfc = \"crgolf\"\r\narcade_crimec = \"crimec\"\r\narcade_crimecj = \"crimec\"\r\narcade_crimecu = \"crimec\"\r\narcade_crimfght = \"crimfght\"\r\narcade_crimfghtj = \"crimfght\"\r\narcade_crimfghtu = \"crimfght\"\r\narcade_crimfgt2 = \"crimfght\"\r\narcade_crimfgtj = \"crimfght\"\r\narcade_crkdown = \"crkdown\"\r\narcade_crockman = \"puckman\"\r\narcade_croquis = \"logicpro\"\r\narcade_crospang = \"crospang\"\r\narcade_crossbld = \"bmaster\"\r\narcade_crossbow = \"crossbow\"\r\narcade_crshrac2 = \"crshrace\"\r\narcade_crshrace = \"crshrace\"\r\narcade_crshrace2 = \"crshrace\"\r\narcade_crswd2bl = \"crswd2bl\"\r\narcade_crsword = \"crsword\"\r\narcade_cruisin = \"citycon\"\r\narcade_crush = \"crush\"\r\narcade_crush2 = \"crush\"\r\narcade_crush3 = \"crush\"\r\narcade_crush4 = \"crush\"\r\narcade_crush5 = \"crush\"\r\narcade_crushbl = \"crush\"\r\narcade_crushbl2 = \"crush\"\r\narcade_crushbl3 = \"crush\"\r\narcade_crusherm = \"crusherm\"\r\narcade_crushs = \"crush\"\r\narcade_crusnu21 = \"crusnusa\"\r\narcade_crusnu40 = \"crusnusa\"\r\narcade_crusnusa = \"crusnusa\"\r\narcade_crusnw13 = \"crusnwld\"\r\narcade_crusnw20 = \"crusnwld\"\r\narcade_crusnwld = \"crusnwld\"\r\narcade_cryptklr = \"cryptklr\"\r\narcade_crystal2 = \"crystal2\"\r\narcade_crystalg = \"crystalg\"\r\narcade_crzrally = \"crzrally\"\r\narcade_csclub = \"csclub\"\r\narcade_csclub1 = \"csclub\"\r\narcade_csclub1d = \"csclub\"\r\narcade_cscluba = \"csclub\"\r\narcade_csclubh = \"csclub\"\r\narcade_csclubj = \"csclub\"\r\narcade_csclubjy = \"csclub\"\r\narcade_cscrtry = \"cscrtry\"\r\narcade_cscrtry2 = \"cscrtry\"\r\narcade_csdtenis = \"csdtenis\"\r\narcade_cshift = \"cshift\"\r\narcade_cshooter = \"cshooter\"\r\narcade_cshootre = \"cshooter\"\r\narcade_csilver = \"csilver\"\r\narcade_csilverj = \"csilver\"\r\narcade_csilverja = \"csilver\"\r\narcade_cskater = \"cskater\"\r\narcade_cspring1 = \"csprint\"\r\narcade_csprins1 = \"csprint\"\r\narcade_csprint = \"csprint\"\r\narcade_csprint1 = \"csprint\"\r\narcade_csprint2 = \"csprint\"\r\narcade_csprintf = \"csprint\"\r\narcade_csprintg = \"csprint\"\r\narcade_csprints = \"csprint\"\r\narcade_cstlevna = \"cstlevna\"\r\narcade_csuperas = \"csuperas\"\r\narcade_csweetht = \"cdiscon1\"\r\narcade_ct2k3sa = \"kof2001\"\r\narcade_ct2k3sp = \"kof2001\"\r\narcade_cterrani = \"cterrani\"\r\narcade_cthd2003 = \"kof2001\"\r\narcade_cthd2k3a = \"kof2001\"\r\narcade_ctisland = \"ctisland\"\r\narcade_ctisland2 = \"ctisland\"\r\narcade_ctisland3 = \"ctisland\"\r\narcade_ctislnd2 = \"ctisland\"\r\narcade_ctislnd3 = \"ctisland\"\r\narcade_ctomaday = \"ctomaday\"\r\narcade_ctornado = \"ctornado\"\r\narcade_ctribe = \"ctribe\"\r\narcade_ctribe1 = \"ctribe\"\r\narcade_ctribeb = \"ctribe\"\r\narcade_ctribeb2 = \"ctribe\"\r\narcade_ctribej = \"ctribe\"\r\narcade_ctribeo = \"ctribe\"\r\narcade_ctrpllrp = \"puckman\"\r\narcade_ctsttape = \"ctsttape\"\r\narcade_cubybop = \"cubybop\"\r\narcade_cuebrckj = \"cuebrick\"\r\narcade_cuebrick = \"cuebrick\"\r\narcade_cuebrickj = \"cuebrick\"\r\narcade_cultures = \"cultures\"\r\narcade_cupfinal = \"cupfinal\"\r\narcade_cupsoc = \"cupsoc\"\r\narcade_cupsoc2 = \"cupsoc\"\r\narcade_cupsocbl = \"cupsoc\"\r\narcade_curvebal = \"curvebal\"\r\narcade_cutefght = \"cutefght\"\r\narcade_cutieq = \"cutieq\"\r\narcade_cv_1on1 = \"cv_1on1\"\r\narcade_cv_2010 = \"cv_2010\"\r\narcade_cv_2010p = \"cv_2010\"\r\narcade_cv_2010p1 = \"cv_2010\"\r\narcade_cv_alcazar = \"cv_alcazar\"\r\narcade_cv_alphazoo = \"cv_alphazoo\"\r\narcade_cv_amazing = \"cv_amazing\"\r\narcade_cv_antarct = \"cv_antarct\"\r\narcade_cv_apshai = \"cv_apshai\"\r\narcade_cv_aquatack = \"cv_aquatack\"\r\narcade_cv_aquatacka = \"cv_aquatack\"\r\narcade_cv_artduel = \"cv_artduel\"\r\narcade_cv_bbears = \"cv_bbears\"\r\narcade_cv_bcquest = \"cv_bcquest\"\r\narcade_cv_bcquest2 = \"cv_bcquest2\"\r\narcade_cv_bcquest2ca = \"cv_bcquest2\"\r\narcade_cv_bdash = \"cv_bdash\"\r\narcade_cv_beamridr = \"cv_beamridr\"\r\narcade_cv_blockrun = \"cv_blockrun\"\r\narcade_cv_bnj = \"cv_bnj\"\r\narcade_cv_brainstr = \"cv_brainstr\"\r\narcade_cv_btime = \"cv_btime\"\r\narcade_cv_btimem = \"cv_btime\"\r\narcade_cv_buckrog = \"cv_buckrog\"\r\narcade_cv_cabbage = \"cv_cabbage\"\r\narcade_cv_cabbagep1 = \"cv_cabbage\"\r\narcade_cv_cabbagep2 = \"cv_cabbage\"\r\narcade_cv_cabbshow = \"cv_cabbshow\"\r\narcade_cv_campaign = \"cv_campaign\"\r\narcade_cv_carnival = \"cv_carnival\"\r\narcade_cv_castelo = \"cv_castelo\"\r\narcade_cv_cavenger = \"cv_cavenger\"\r\narcade_cv_cavengera = \"cv_cavenger\"\r\narcade_cv_cbsmon = \"cv_cbsmon\"\r\narcade_cv_ccrisis = \"cv_ccrisis\"\r\narcade_cv_centiped = \"cv_centiped\"\r\narcade_cv_choplift = \"cv_choplift\"\r\narcade_cv_chucknor = \"cv_chucknor\"\r\narcade_cv_coleco = \"cv_coleco\"\r\narcade_cv_congo = \"cv_congo\"\r\narcade_cv_dambust = \"cv_dambust\"\r\narcade_cv_danslither = \"cv_slither\"\r\narcade_cv_decathln = \"cv_decathln\"\r\narcade_cv_defender = \"cv_defender\"\r\narcade_cv_destruct = \"cv_destruct\"\r\narcade_cv_digdug = \"cv_digdug\"\r\narcade_cv_digger = \"cv_digger\"\r\narcade_cv_dkong = \"cv_dkong\"\r\narcade_cv_dkonga = \"cv_dkong\"\r\narcade_cv_dkongjr = \"cv_dkongjr\"\r\narcade_cv_dlair = \"cv_dlair\"\r\narcade_cv_dncfntsy = \"cv_dncfntsy\"\r\narcade_cv_docastle = \"cv_docastle\"\r\narcade_cv_drgnfire = \"cv_drgnfire\"\r\narcade_cv_drseuss = \"cv_drseuss\"\r\narcade_cv_evolutio = \"cv_evolutio\"\r\narcade_cv_facemakr = \"cv_facemakr\"\r\narcade_cv_fallguy = \"cv_fallguy\"\r\narcade_cv_fathom = \"cv_fathom\"\r\narcade_cv_ffreddy = \"cv_ffreddy\"\r\narcade_cv_finaltst = \"cv_finaltst\"\r\narcade_cv_flipslip = \"cv_flipslip\"\r\narcade_cv_fortune = \"cv_fortune\"\r\narcade_cv_fracfevr = \"cv_fracfevr\"\r\narcade_cv_frenzy = \"cv_frenzy\"\r\narcade_cv_frenzya = \"cv_frenzy\"\r\narcade_cv_frenzya2 = \"cv_frenzy\"\r\narcade_cv_frogger = \"cv_frogger\"\r\narcade_cv_frogger2 = \"cv_frogger2\"\r\narcade_cv_frontlin = \"cv_frontlin\"\r\narcade_cv_frontlina = \"cv_frontlin\"\r\narcade_cv_galaxian = \"cv_galaxian\"\r\narcade_cv_galaxiana = \"cv_galaxian\"\r\narcade_cv_gorf = \"cv_gorf\"\r\narcade_cv_gustbust = \"cv_gustbust\"\r\narcade_cv_gyruss = \"cv_gyruss\"\r\narcade_cv_hazzard = \"cv_hazzard\"\r\narcade_cv_heist = \"cv_heist\"\r\narcade_cv_heista = \"cv_heist\"\r\narcade_cv_hero = \"cv_hero\"\r\narcade_cv_hustler = \"cv_hustler\"\r\narcade_cv_hustler1 = \"cv_hustler\"\r\narcade_cv_illusion = \"cv_illusion\"\r\narcade_cv_jbond = \"cv_jbond\"\r\narcade_cv_jmpmanjr = \"cv_jmpmanjr\"\r\narcade_cv_jmpmanjra = \"cv_jmpmanjr\"\r\narcade_cv_joust = \"cv_joust\"\r\narcade_cv_jukebox = \"cv_jukebox\"\r\narcade_cv_jungleh = \"cv_jungleh\"\r\narcade_cv_keykaper = \"cv_keykaper\"\r\narcade_cv_kubjpok = \"cv_kubjpok\"\r\narcade_cv_ladybug = \"cv_ladybug\"\r\narcade_cv_lancelot = \"cv_lancelot\"\r\narcade_cv_leeper = \"cv_leeper\"\r\narcade_cv_linklogc = \"cv_linklogc\"\r\narcade_cv_logiclvl = \"cv_logiclvl\"\r\narcade_cv_looping = \"cv_looping\"\r\narcade_cv_mash = \"cv_mash\"\r\narcade_cv_memmanor = \"cv_memmanor\"\r\narcade_cv_meteosho = \"cv_meteosho\"\r\narcade_cv_mindmstr = \"cv_mindmstr\"\r\narcade_cv_mine2049 = \"cv_mine2049\"\r\narcade_cv_mine2049a = \"cv_mine2049\"\r\narcade_cv_mking = \"cv_mking\"\r\narcade_cv_mkinga = \"cv_mking\"\r\narcade_cv_monkey = \"cv_monkey\"\r\narcade_cv_montezum = \"cv_montezum\"\r\narcade_cv_moonswpr = \"cv_moonswpr\"\r\narcade_cv_moonswpra = \"cv_moonswpr\"\r\narcade_cv_mrdo = \"cv_mrdo\"\r\narcade_cv_mrdoa = \"cv_mrdo\"\r\narcade_cv_mtcracer = \"cv_mtcracer\"\r\narcade_cv_mtcracera = \"cv_mtcracer\"\r\narcade_cv_mtrap = \"cv_mtrap\"\r\narcade_cv_mtrapa = \"cv_mtrap\"\r\narcade_cv_musicbox = \"cv_musicbox\"\r\narcade_cv_novablst = \"cv_novablst\"\r\narcade_cv_numbump = \"cv_amazing\"\r\narcade_cv_oilswell = \"cv_oilswell\"\r\narcade_cv_oilswella = \"cv_oilswell\"\r\narcade_cv_omegrace = \"cv_omegrace\"\r\narcade_cv_onlyrock = \"cv_onlyrock\"\r\narcade_cv_orbit = \"cv_orbit\"\r\narcade_cv_pacman = \"cv_pacman\"\r\narcade_cv_panic = \"cv_panic\"\r\narcade_cv_pepper2 = \"cv_pepper2\"\r\narcade_cv_pitfall = \"cv_pitfall\"\r\narcade_cv_pitfall2 = \"cv_pitfall2\"\r\narcade_cv_pitstop = \"cv_pitstop\"\r\narcade_cv_pitstopa = \"cv_pitstop\"\r\narcade_cv_popeye = \"cv_popeye\"\r\narcade_cv_popeyea = \"cv_popeye\"\r\narcade_cv_porkys = \"cv_porkys\"\r\narcade_cv_power = \"cv_power\"\r\narcade_cv_pquest = \"cv_pquest\"\r\narcade_cv_qbert = \"cv_qbert\"\r\narcade_cv_qberta = \"cv_qbert\"\r\narcade_cv_qbertqub = \"cv_qbertqub\"\r\narcade_cv_questgc = \"cv_questgc\"\r\narcade_cv_quintana = \"cv_quintana\"\r\narcade_cv_quintanaa = \"cv_quintana\"\r\narcade_cv_riveraid = \"cv_riveraid\"\r\narcade_cv_robinh = \"cv_robinh\"\r\narcade_cv_robinha = \"cv_robinh\"\r\narcade_cv_rockbolt = \"cv_rockbolt\"\r\narcade_cv_rockbolta = \"cv_rockbolt\"\r\narcade_cv_rocky = \"cv_rocky\"\r\narcade_cv_rocnrope = \"cv_rocnrope\"\r\narcade_cv_rollover = \"cv_rollover\"\r\narcade_cv_sabaseb = \"cv_sabaseb\"\r\narcade_cv_safootb = \"cv_safootb\"\r\narcade_cv_saftsocc = \"cv_sasoccer\"\r\narcade_cv_sammylf = \"cv_sammylf\"\r\narcade_cv_sammylfa = \"cv_sammylf\"\r\narcade_cv_sasoccer = \"cv_sasoccer\"\r\narcade_cv_scobra = \"cv_scobra\"\r\narcade_cv_scobraa = \"cv_scobra\"\r\narcade_cv_secalpha = \"cv_secalpha\"\r\narcade_cv_sewersam = \"cv_sewersam\"\r\narcade_cv_skiing = \"cv_skiing\"\r\narcade_cv_slither = \"cv_slither\"\r\narcade_cv_slurpy = \"cv_slurpy\"\r\narcade_cv_smurf = \"cv_smurf\"\r\narcade_cv_smurfa = \"cv_smurf\"\r\narcade_cv_smurfply = \"cv_smurfply\"\r\narcade_cv_smurfpnt = \"cv_smurfpnt\"\r\narcade_cv_spacfury = \"cv_spacfury\"\r\narcade_cv_spectron = \"cv_spectron\"\r\narcade_cv_sprcross = \"cv_sprcross\"\r\narcade_cv_sprcrossa = \"cv_sprcross\"\r\narcade_cv_spyhunt = \"cv_spyhunt\"\r\narcade_cv_spyhuntp = \"cv_spyhunt\"\r\narcade_cv_spyhuntp1 = \"cv_spyhunt\"\r\narcade_cv_squishem = \"cv_squishem\"\r\narcade_cv_ssketch = \"cv_ssketch\"\r\narcade_cv_startrek = \"cv_startrek\"\r\narcade_cv_starwars = \"cv_starwars\"\r\narcade_cv_steam = \"cv_steam\"\r\narcade_cv_strikeit = \"cv_strikeit\"\r\narcade_cv_subroc = \"cv_subroc\"\r\narcade_cv_superdk = \"cv_superdk\"\r\narcade_cv_suprdkjr = \"cv_suprdkjr\"\r\narcade_cv_suprtest = \"cv_suprtest\"\r\narcade_cv_sword = \"cv_sword\"\r\narcade_cv_tankwars = \"cv_tankwars\"\r\narcade_cv_tapper = \"cv_tapper\"\r\narcade_cv_tarzan = \"cv_tarzan\"\r\narcade_cv_telly = \"cv_telly\"\r\narcade_cv_threshld = \"cv_threshld\"\r\narcade_cv_timeplt = \"cv_timeplt\"\r\narcade_cv_tomarc = \"cv_tomarc\"\r\narcade_cv_ttennis = \"cv_ttennis\"\r\narcade_cv_tunnels = \"cv_tunnels\"\r\narcade_cv_turbo = \"cv_turbo\"\r\narcade_cv_tutankhm = \"cv_tutankhm\"\r\narcade_cv_tutankhma = \"cv_tutankhm\"\r\narcade_cv_upndown = \"cv_upndown\"\r\narcade_cv_venture = \"cv_venture\"\r\narcade_cv_victory = \"cv_victory\"\r\narcade_cv_wargames = \"cv_wargames\"\r\narcade_cv_wargamesp = \"cv_wargames\"\r\narcade_cv_warroom = \"cv_warroom\"\r\narcade_cv_wingwar = \"cv_wingwar\"\r\narcade_cv_wizmath = \"cv_wizmath\"\r\narcade_cv_wordfeud = \"cv_wordfeud\"\r\narcade_cv_yolk = \"cv_yolk\"\r\narcade_cv_zaxxon = \"cv_zaxxon\"\r\narcade_cv_zenji = \"cv_zenji\"\r\narcade_cworld = \"cworld\"\r\narcade_cworld2j = \"cworld2j\"\r\narcade_cworld2ja = \"cworld2j\"\r\narcade_cworld2jb = \"cworld2j\"\r\narcade_cybattlr = \"cybattlr\"\r\narcade_cyberb21 = \"cyberbal\"\r\narcade_cyberb22 = \"cyberbal\"\r\narcade_cyberb23 = \"cyberbal\"\r\narcade_cyberb2p = \"cyberbal\"\r\narcade_cyberba2 = \"cyberbal\"\r\narcade_cyberbal = \"cyberbal\"\r\narcade_cyberbap = \"cyberbal\"\r\narcade_cyberbt = \"cyberbal\"\r\narcade_cyberbt1 = \"cyberbal\"\r\narcade_cyberlip = \"cyberlip\"\r\narcade_cybertnk = \"cybertnk\"\r\narcade_cybots = \"cybots\"\r\narcade_cybotsj = \"cybots\"\r\narcade_cybotsjd = \"cybots\"\r\narcade_cybotsu = \"cybots\"\r\narcade_cybotsud = \"cybots\"\r\narcade_cybrcomm = \"cybrcomm\"\r\narcade_cybrcycc = \"cybrcycc\"\r\narcade_cybsled = \"cybsled\"\r\narcade_cyclshtg = \"cyclshtg\"\r\narcade_cyvern = \"cyvern\"\r\narcade_cyvernj = \"cyvern\"\r\narcade_czeroize = \"czeroize\"\r\narcade_dacholer = \"dacholer\"\r\narcade_dadandrn = \"mmaulers\"\r\narcade_daimakai = \"ghouls\"\r\narcade_daimakaib = \"ghouls\"\r\narcade_daimakair = \"ghouls\"\r\narcade_daioh = \"daioh\"\r\narcade_daioha = \"daioh\"\r\narcade_daiohc = \"daioh\"\r\narcade_daiohp = \"daioh\"\r\narcade_daireika = \"daireika\"\r\narcade_dairesya = \"ironhors\"\r\narcade_daisenpu = \"twinhawk\"\r\narcade_daiskiss = \"daiskiss\"\r\narcade_daitorid = \"daitorid\"\r\narcade_daitorida = \"daitorid\"\r\narcade_daiyogen = \"daiyogen\"\r\narcade_dakkochn = \"dakkochn\"\r\narcade_dambustr = \"dambustr\"\r\narcade_dambustra = \"dambustr\"\r\narcade_dambustruk = \"dambustr\"\r\narcade_danceyes = \"danceyes\"\r\narcade_danchih = \"danchih\"\r\narcade_dangar = \"dangar\"\r\narcade_dangar2 = \"dangar\"\r\narcade_dangara = \"dangar\"\r\narcade_dangarb = \"dangar\"\r\narcade_dangarbt = \"dangar\"\r\narcade_dangarj = \"dangar\"\r\narcade_dangerz = \"dangerz\"\r\narcade_dangseed = \"dangseed\"\r\narcade_dankuga = \"dankuga\"\r\narcade_daraku = \"daraku\"\r\narcade_darius = \"darius\"\r\narcade_darius2 = \"darius2\"\r\narcade_darius2d = \"darius2\"\r\narcade_darius2do = \"darius2\"\r\narcade_dariuse = \"darius\"\r\narcade_dariusg = \"dariusg\"\r\narcade_dariusgj = \"dariusg\"\r\narcade_dariusgu = \"dariusg\"\r\narcade_dariusgx = \"dariusgx\"\r\narcade_dariusj = \"darius\"\r\narcade_dariuso = \"darius\"\r\narcade_dariusu = \"darius\"\r\narcade_darkadv = \"devilw\"\r\narcade_darkedge = \"darkedge\"\r\narcade_darkmist = \"darkmist\"\r\narcade_darkplnt = \"darkplnt\"\r\narcade_darksea1 = \"darkseal\"\r\narcade_darkseaj = \"darkseal\"\r\narcade_darkseal = \"darkseal\"\r\narcade_darkseal1 = \"darkseal\"\r\narcade_darkseal2 = \"wizdfire\"\r\narcade_darksealj = \"darkseal\"\r\narcade_darksel2 = \"wizdfire\"\r\narcade_darktowr = \"darktowr\"\r\narcade_darkwar = \"darkwar\"\r\narcade_darwin = \"darwin\"\r\narcade_dassaul4 = \"thndzone\"\r\narcade_dassault = \"thndzone\"\r\narcade_dassault4 = \"thndzone\"\r\narcade_dazzler = \"dazzler\"\r\narcade_dblaxle = \"dblaxle\"\r\narcade_dblaxleu = \"dblaxle\"\r\narcade_dbldyn = \"dynduke\"\r\narcade_dbldynj = \"dbldynj\"\r\narcade_dbldynu = \"dbldynj\"\r\narcade_dblewing = \"dblewing\"\r\narcade_dblplay = \"dblplay\"\r\narcade_dblpoint = \"dblpoint\"\r\narcade_dblpointd = \"dblpoint\"\r\narcade_dbreed = \"dbreed\"\r\narcade_dbreedm72 = \"dbreed\"\r\narcade_dbz = \"dbz\"\r\narcade_dbz2 = \"dbz2\"\r\narcade_dbza = \"dbz\"\r\narcade_dbzvrvs = \"dbzvrvs\"\r\narcade_dcclub = \"dcclub\"\r\narcade_dcon = \"dcon\"\r\narcade_dday = \"dday\"\r\narcade_ddayc = \"dday\"\r\narcade_ddaydoo = \"lastday\"\r\narcade_ddcrew = \"ddcrew\"\r\narcade_ddcrew1 = \"ddcrew\"\r\narcade_ddcrew1d = \"ddcrew\"\r\narcade_ddcrew2 = \"ddcrew\"\r\narcade_ddcrew2d = \"ddcrew\"\r\narcade_ddcrewd = \"ddcrew\"\r\narcade_ddcrewj = \"ddcrew\"\r\narcade_ddcrewj2 = \"ddcrew\"\r\narcade_ddcrewj2d = \"ddcrew\"\r\narcade_ddcrewjd = \"ddcrew\"\r\narcade_ddcrewu = \"ddcrew\"\r\narcade_ddcrewud = \"ddcrew\"\r\narcade_ddenlovr = \"ddenlovr\"\r\narcade_ddonpach = \"ddonpach\"\r\narcade_ddonpacha = \"ddonpach\"\r\narcade_ddonpachj = \"ddonpach\"\r\narcade_ddonpchj = \"ddonpach\"\r\narcade_ddp2 = \"ddp2\"\r\narcade_ddp2100 = \"ddp2\"\r\narcade_ddp2100c = \"ddp2\"\r\narcade_ddp2100hk = \"ddp2\"\r\narcade_ddp2100j = \"ddp2\"\r\narcade_ddp2100k = \"ddp2\"\r\narcade_ddp2100t = \"ddp2\"\r\narcade_ddp2101 = \"ddp2\"\r\narcade_ddp2101c = \"ddp2\"\r\narcade_ddp2101hk = \"ddp2\"\r\narcade_ddp2101j = \"ddp2\"\r\narcade_ddp2101k = \"ddp2\"\r\narcade_ddp2101t = \"ddp2\"\r\narcade_ddp2c = \"ddp2\"\r\narcade_ddp2hk = \"ddp2\"\r\narcade_ddp2j = \"ddp2\"\r\narcade_ddp2k = \"ddp2\"\r\narcade_ddp2t = \"ddp2\"\r\narcade_ddp3 = \"ddp3\"\r\narcade_ddp3a = \"ddp3\"\r\narcade_ddp3b = \"ddp3\"\r\narcade_ddp3blk = \"ddp3\"\r\narcade_ddpdoj = \"ddp3\"\r\narcade_ddpdoja = \"ddp3\"\r\narcade_ddpdojb = \"ddp3\"\r\narcade_ddpdojblk = \"ddp3\"\r\narcade_ddpdojblka = \"ddp3\"\r\narcade_ddpdojblkbl = \"ddp3\"\r\narcade_ddragn2u = \"ddragon2\"\r\narcade_ddrago3b = \"ddragon3\"\r\narcade_ddragon = \"ddragon\"\r\narcade_ddragon2 = \"ddragon2\"\r\narcade_ddragon2b = \"ddragon2\"\r\narcade_ddragon2b2 = \"ddragon2\"\r\narcade_ddragon2u = \"ddragon2\"\r\narcade_ddragon3 = \"ddragon3\"\r\narcade_ddragon3b = \"ddragon3\"\r\narcade_ddragon3j = \"ddragon3\"\r\narcade_ddragon3p = \"ddragon3\"\r\narcade_ddragonb = \"ddragon\"\r\narcade_ddragonb2 = \"ddragon\"\r\narcade_ddragonba = \"ddragon\"\r\narcade_ddragonu = \"ddragon\"\r\narcade_ddragonua = \"ddragon\"\r\narcade_ddragonub = \"ddragon\"\r\narcade_ddragonw = \"ddragon\"\r\narcade_ddragonw1 = \"ddragon\"\r\narcade_ddream95 = \"hoops96\"\r\narcade_ddribble = \"ddribble\"\r\narcade_ddribblep = \"ddribble\"\r\narcade_ddsom = \"ddsom\"\r\narcade_ddsoma = \"ddsom\"\r\narcade_ddsomar1 = \"ddsom\"\r\narcade_ddsomb = \"ddsom\"\r\narcade_ddsomh = \"ddsom\"\r\narcade_ddsomj = \"ddsom\"\r\narcade_ddsomjr1 = \"ddsom\"\r\narcade_ddsomjr2 = \"ddsom\"\r\narcade_ddsomr1 = \"ddsom\"\r\narcade_ddsomr2 = \"ddsom\"\r\narcade_ddsomr3 = \"ddsom\"\r\narcade_ddsomu = \"ddsom\"\r\narcade_ddsomud = \"ddsom\"\r\narcade_ddsomur1 = \"ddsom\"\r\narcade_ddtod = \"ddtod\"\r\narcade_ddtoda = \"ddtod\"\r\narcade_ddtodar1 = \"ddtod\"\r\narcade_ddtodd = \"ddtod\"\r\narcade_ddtodh = \"ddtod\"\r\narcade_ddtodhr1 = \"ddtod\"\r\narcade_ddtodhr2 = \"ddtod\"\r\narcade_ddtodj = \"ddtod\"\r\narcade_ddtodjr1 = \"ddtod\"\r\narcade_ddtodjr2 = \"ddtod\"\r\narcade_ddtodr1 = \"ddtod\"\r\narcade_ddtodu = \"ddtod\"\r\narcade_ddtodur1 = \"ddtod\"\r\narcade_ddungeon = \"ddungeon\"\r\narcade_ddux = \"ddux\"\r\narcade_ddux1 = \"ddux\"\r\narcade_dduxbl = \"ddux\"\r\narcade_dduxd = \"ddux\"\r\narcade_dduxj = \"ddux\"\r\narcade_dduxjd = \"ddux\"\r\narcade_deadang = \"deadang\"\r\narcade_deadconj = \"deadconx\"\r\narcade_deadconx = \"deadconx\"\r\narcade_deadconxj = \"deadconx\"\r\narcade_deadeye = \"deadeye\"\r\narcade_dealer = \"dealer\"\r\narcade_deathbrd = \"mutantf\"\r\narcade_decathlt = \"decathlt\"\r\narcade_decocass = \"decocass\"\r\narcade_decomult = \"decomult\"\r\narcade_deerhunt = \"deerhunt\"\r\narcade_deerhunta = \"deerhunt\"\r\narcade_deerhuntb = \"deerhunt\"\r\narcade_deerhuntc = \"deerhunt\"\r\narcade_deerhuntd = \"deerhunt\"\r\narcade_deerhunte = \"deerhunt\"\r\narcade_defcmnd = \"defender\"\r\narcade_defence = \"defender\"\r\narcade_defender = \"defender\"\r\narcade_defendg = \"defender\"\r\narcade_defendw = \"defender\"\r\narcade_defense = \"sdi\"\r\narcade_defndjeu = \"defender\"\r\narcade_deltrace = \"omegrace\"\r\narcade_deluxe4u = \"deluxe5\"\r\narcade_deluxe5 = \"deluxe5\"\r\narcade_deluxe5a = \"deluxe5\"\r\narcade_deluxe5b = \"deluxe5\"\r\narcade_demoderb = \"demoderb\"\r\narcade_demoderm = \"demoderb\"\r\narcade_demon = \"demon\"\r\narcade_demoneye = \"demoneye\"\r\narcade_demonwl1 = \"demonwld\"\r\narcade_demonwld = \"demonwld\"\r\narcade_demonwld1 = \"demonwld\"\r\narcade_demonwld2 = \"demonwld\"\r\narcade_demonwld3 = \"demonwld\"\r\narcade_demonwld4 = \"demonwld\"\r\narcade_denjinmk = \"denjinmk\"\r\narcade_depthch = \"depthch\"\r\narcade_depthcho = \"depthch\"\r\narcade_depthv1 = \"depthch\"\r\narcade_deroon = \"deroon\"\r\narcade_deroona = \"deroon\"\r\narcade_desertbr = \"desertbr\"\r\narcade_desertbrd = \"desertbr\"\r\narcade_desertbrj = \"desertbr\"\r\narcade_desertbrjd = \"desertbr\"\r\narcade_desertdn = \"desertdn\"\r\narcade_desertgu = \"desertgu\"\r\narcade_desertwr = \"desertwr\"\r\narcade_desterth = \"lrescue\"\r\narcade_destroyr = \"destroyr\"\r\narcade_detatwin = \"blswhstl\"\r\narcade_devilfsg = \"devilfsh\"\r\narcade_devilfsh = \"devilfsh\"\r\narcade_devilw = \"devilw\"\r\narcade_devstor2 = \"devstors\"\r\narcade_devstor3 = \"devstors\"\r\narcade_devstors = \"devstors\"\r\narcade_devstors2 = \"devstors\"\r\narcade_devstors3 = \"devstors\"\r\narcade_devzone = \"devzone\"\r\narcade_devzone2 = \"devzone\"\r\narcade_dfeveron = \"feversos\"\r\narcade_dharma = \"dharma\"\r\narcade_dharmaj = \"dharma\"\r\narcade_dharmak = \"dharma\"\r\narcade_diamond = \"diamond\"\r\narcade_diehard = \"diehard\"\r\narcade_dietgo = \"dietgo\"\r\narcade_dietgoe = \"dietgo\"\r\narcade_dietgoj = \"dietgo\"\r\narcade_dietgou = \"dietgo\"\r\narcade_digdug = \"digdug\"\r\narcade_digdug2 = \"digdug2\"\r\narcade_digdug2o = \"digdug2\"\r\narcade_digduga1 = \"digdug\"\r\narcade_digdugat = \"digdug\"\r\narcade_digdugb = \"digdug\"\r\narcade_digger = \"digger\"\r\narcade_diggerma = \"diggerma\"\r\narcade_dimahoo = \"dimahoo\"\r\narcade_dimahoou = \"dimahoo\"\r\narcade_dimahoud = \"dimahoo\"\r\narcade_dingo = \"dingo\"\r\narcade_dingoe = \"dingo\"\r\narcade_dino = \"dino\"\r\narcade_dinoa = \"dino\"\r\narcade_dinoeh = \"dino\"\r\narcade_dinoh = \"dino\"\r\narcade_dinohc = \"dino\"\r\narcade_dinohunt = \"dino\"\r\narcade_dinoj = \"dino\"\r\narcade_dinopic = \"dino\"\r\narcade_dinopic2 = \"dino\"\r\narcade_dinopic3 = \"dino\"\r\narcade_dinopic4 = \"dino\"\r\narcade_dinorex = \"dinorex\"\r\narcade_dinorexj = \"dinorex\"\r\narcade_dinorexu = \"dinorex\"\r\narcade_dinot = \"dino\"\r\narcade_dinotpic = \"dino\"\r\narcade_dinou = \"dino\"\r\narcade_dirtfoxj = \"dirtfoxj\"\r\narcade_disco = \"disco\"\r\narcade_discof = \"disco\"\r\narcade_diverboy = \"diverboy\"\r\narcade_djboy = \"djboy\"\r\narcade_djboya = \"djboy\"\r\narcade_djboyj = \"djboy\"\r\narcade_dkgenm72 = \"hharry\"\r\narcade_dkgensan = \"hharry\"\r\narcade_dkgensanm72 = \"hharry\"\r\narcade_dkingjr = \"dkongjr\"\r\narcade_dkngjnrb = \"dkongjr\"\r\narcade_dkngjnrj = \"dkongjr\"\r\narcade_dkong = \"dkong\"\r\narcade_dkong3 = \"dkong3\"\r\narcade_dkong3b = \"dkong3\"\r\narcade_dkong3j = \"dkong3\"\r\narcade_dkongf = \"dkong\"\r\narcade_dkonghrd = \"dkong\"\r\narcade_dkongj = \"dkong\"\r\narcade_dkongjnrj = \"dkongjr\"\r\narcade_dkongjo = \"dkong\"\r\narcade_dkongjo1 = \"dkong\"\r\narcade_dkongjp = \"dkong\"\r\narcade_dkongjr = \"dkongjr\"\r\narcade_dkongjr2 = \"dkongjr\"\r\narcade_dkongjrb = \"dkongjr\"\r\narcade_dkongjre = \"dkongjr\"\r\narcade_dkongjrj = \"dkongjr\"\r\narcade_dkongjrm = \"dkongjr\"\r\narcade_dkongjrpb = \"dkongjr\"\r\narcade_dkongo = \"dkong\"\r\narcade_dkongpe = \"dkong\"\r\narcade_dkongx = \"dkong\"\r\narcade_dkongx11 = \"dkong\"\r\narcade_dkrainbow = \"dkong\"\r\narcade_dkrdemo = \"dkong\"\r\narcade_dlair = \"dlair\"\r\narcade_dland = \"bublbobl\"\r\narcade_dleague = \"dleague\"\r\narcade_dleaguej = \"dleague\"\r\narcade_dmnfrnt = \"dmnfrnt\"\r\narcade_dmnfrnta = \"dmnfrnt\"\r\narcade_dmnfrntb = \"dmnfrnt\"\r\narcade_dmnfrntpcb = \"dmnfrnt\"\r\narcade_dngrtrck = \"rallyx\"\r\narcade_dnmtdeka = \"diehard\"\r\narcade_doapp = \"doapp\"\r\narcade_docastl2 = \"docastle\"\r\narcade_docastle = \"docastle\"\r\narcade_docastlo = \"docastle\"\r\narcade_dockman = \"dockman\"\r\narcade_dodgem = \"dodgem\"\r\narcade_dodgeman = \"dodgeman\"\r\narcade_dogfgt = \"dogfgt\"\r\narcade_dogfgtj = \"dogfgt\"\r\narcade_dogfgtu = \"dogfgt\"\r\narcade_dogfight = \"dogfight\"\r\narcade_dogosokb = \"victroad\"\r\narcade_dogosoke = \"victroad\"\r\narcade_dogosokj = \"victroad\"\r\narcade_dogpatch = \"dogpatch\"\r\narcade_dogyuun = \"dogyuun\"\r\narcade_dogyuuna = \"dogyuun\"\r\narcade_dogyuunt = \"dogyuun\"\r\narcade_dokaben = \"dokaben\"\r\narcade_dokidoki = \"dokidoki\"\r\narcade_dokyusei = \"dokyusei\"\r\narcade_dokyusp = \"dokyusp\"\r\narcade_dolmen = \"dolmen\"\r\narcade_domino = \"domino\"\r\narcade_dominos = \"dominos\"\r\narcade_dommy = \"dommy\"\r\narcade_dondenmj = \"dondenmj\"\r\narcade_dondokdj = \"dondokod\"\r\narcade_dondokdu = \"dondokod\"\r\narcade_dondokod = \"dondokod\"\r\narcade_dondokodj = \"dondokod\"\r\narcade_dondokodu = \"dondokod\"\r\narcade_donight = \"donight\"\r\narcade_donpachi = \"donpachi\"\r\narcade_donpachihk = \"donpachi\"\r\narcade_donpachij = \"donpachi\"\r\narcade_donpachikr = \"donpachi\"\r\narcade_donpachj = \"donpachi\"\r\narcade_donpachk = \"donpachi\"\r\narcade_dorachan = \"dorachan\"\r\narcade_dorodon = \"dorodon\"\r\narcade_dorodon2 = \"dorodon\"\r\narcade_dorunru2 = \"dorunrun\"\r\narcade_dorunruc = \"dorunrun\"\r\narcade_dorunrun = \"dorunrun\"\r\narcade_dotriku2 = \"dotrikun\"\r\narcade_dotrikun = \"dotrikun\"\r\narcade_dotrikun2 = \"dotrikun\"\r\narcade_dotriman = \"dotrikun\"\r\narcade_dotron = \"dotron\"\r\narcade_dotrona = \"dotron\"\r\narcade_dotrone = \"dotron\"\r\narcade_doubledr = \"doubledr\"\r\narcade_douni = \"docastle\"\r\narcade_dowild = \"dowild\"\r\narcade_downtowj = \"downtown\"\r\narcade_downtown = \"downtown\"\r\narcade_downtown2 = \"downtown\"\r\narcade_downtownj = \"downtown\"\r\narcade_downtownp = \"downtown\"\r\narcade_dplay = \"einnings\"\r\narcade_dquizgo = \"dquizgo\"\r\narcade_dragnblz = \"dragnblz\"\r\narcade_dragngun = \"dragngun\"\r\narcade_dragngunj = \"dragngun\"\r\narcade_dragonsh = \"dragonsh\"\r\narcade_dragoonj = \"dragoonj\"\r\narcade_dragrace = \"dragrace\"\r\narcade_dragwld2 = \"dragwld2\"\r\narcade_drakton = \"drakton\"\r\narcade_dreambal = \"dreambal\"\r\narcade_dreamwld = \"dreamwld\"\r\narcade_dremshpr = \"dremshpr\"\r\narcade_drgnbowl = \"drgnbowl\"\r\narcade_drgnbowla = \"drgnbowl\"\r\narcade_drgnbstr = \"drgnbstr\"\r\narcade_drgninja = \"baddudes\"\r\narcade_drgninjab = \"baddudes\"\r\narcade_drgninjab2 = \"baddudes\"\r\narcade_drgnmst = \"drgnmst\"\r\narcade_drgnunit = \"drgnunit\"\r\narcade_drgnwrld = \"drgnwrld\"\r\narcade_drgpunch = \"drgpunch\"\r\narcade_drgw2 = \"drgw2\"\r\narcade_drgw2c = \"drgw2\"\r\narcade_drgw2hk = \"drgw2\"\r\narcade_drgw2j = \"drgw2\"\r\narcade_drgw3 = \"drgw3\"\r\narcade_drgw3100 = \"drgw3\"\r\narcade_drgw3103 = \"drgw3\"\r\narcade_drgw3105 = \"drgw3\"\r\narcade_dribling = \"dribling\"\r\narcade_driblingbr = \"dribling\"\r\narcade_driblingo = \"dribling\"\r\narcade_driblino = \"dribling\"\r\narcade_drifto94 = \"drifto94\"\r\narcade_driftout = \"driftout\"\r\narcade_driftoutj = \"driftout\"\r\narcade_drius2do = \"darius2\"\r\narcade_drivedge = \"drivedge\"\r\narcade_driveout = \"driftout\"\r\narcade_drivfrcb = \"drivfrcp\"\r\narcade_drivfrcg = \"drivfrcp\"\r\narcade_drivfrcp = \"drivfrcp\"\r\narcade_drivfrct = \"drivfrcp\"\r\narcade_drktnjr = \"drakton\"\r\narcade_drmario = \"drmario\"\r\narcade_drmicro = \"drmicro\"\r\narcade_drtomy = \"drtomy\"\r\narcade_drtoppel = \"drtoppel\"\r\narcade_drtoppela = \"drtoppel\"\r\narcade_drtoppelj = \"drtoppel\"\r\narcade_drtoppelu = \"drtoppel\"\r\narcade_drtopplj = \"drtoppel\"\r\narcade_drtopplu = \"drtoppel\"\r\narcade_dsaber = \"dsaber\"\r\narcade_dsabera = \"dsaber\"\r\narcade_dsaberj = \"dsaber\"\r\narcade_dsccr94j = \"dsoccr94\"\r\narcade_dsoccr94 = \"dsoccr94\"\r\narcade_dsoccr94j = \"dsoccr94\"\r\narcade_dsoccr94k = \"dsoccr94\"\r\narcade_dspirit = \"dspirit\"\r\narcade_dspirit1 = \"dspirit\"\r\narcade_dspirit2 = \"dspirit\"\r\narcade_dspirito = \"dspirit\"\r\narcade_dstlk = \"dstlk\"\r\narcade_dstlka = \"dstlk\"\r\narcade_dstlkh = \"dstlk\"\r\narcade_dstlku = \"dstlk\"\r\narcade_dstlku1d = \"dstlk\"\r\narcade_dstlkur1 = \"dstlk\"\r\narcade_duckhunt = \"duckhunt\"\r\narcade_ducki = \"ducki\"\r\narcade_dumpmtmt = \"bodyslam\"\r\narcade_dungenmu = \"dungeonm\"\r\narcade_dungeonm = \"lightbr\"\r\narcade_dungeonmu = \"lightbr\"\r\narcade_dunkmnia = \"dunkmnia\"\r\narcade_dunkshot = \"dunkshot\"\r\narcade_dunkshota = \"dunkshot\"\r\narcade_dunkshoto = \"dunkshot\"\r\narcade_dw = \"dw\"\r\narcade_dw2001 = \"dw2001\"\r\narcade_dw2v100x = \"drgw2\"\r\narcade_dwex = \"dwex\"\r\narcade_dwi = \"dwi\"\r\narcade_dwia = \"dwi\"\r\narcade_dwj = \"dw\"\r\narcade_dwpc = \"dwpc\"\r\narcade_dyger = \"dyger\"\r\narcade_dygera = \"dyger\"\r\narcade_dynablsb = \"dynablst\"\r\narcade_dynablst = \"dynablst\"\r\narcade_dynagear = \"dynagear\"\r\narcade_dynamski = \"dynamski\"\r\narcade_dynduke = \"dynduke\"\r\narcade_dyndukea = \"dynduke\"\r\narcade_dyndukej = \"dynduke\"\r\narcade_dyndukeja = \"dynduke\"\r\narcade_dyndukeu = \"dynduke\"\r\narcade_dynobop = \"dynobop\"\r\narcade_dynwar = \"dynwar\"\r\narcade_dynwara = \"dynwar\"\r\narcade_dynwarj = \"dynwar\"\r\narcade_dynwarjr = \"dynwar\"\r\narcade_dzigzag = \"digdug\"\r\narcade_eagle = \"mooncrst\"\r\narcade_eagle2 = \"mooncrst\"\r\narcade_eagle3 = \"mooncrst\"\r\narcade_eaglshot = \"eaglshot\"\r\narcade_eaglshta = \"eaglshot\"\r\narcade_earthinv = \"invaders\"\r\narcade_earthjkr = \"earthjkr\"\r\narcade_earthjkrp = \"earthjkr\"\r\narcade_ebases = \"ebases\"\r\narcade_ecofghta = \"ecofghtr\"\r\narcade_ecofghtr = \"ecofghtr\"\r\narcade_ecofghtra = \"ecofghtr\"\r\narcade_ecofghtrd = \"ecofghtr\"\r\narcade_ecofghtrh = \"ecofghtr\"\r\narcade_ecofghtru = \"ecofghtr\"\r\narcade_ecofghtru1 = \"ecofghtr\"\r\narcade_edf = \"edf\"\r\narcade_edfa = \"edf\"\r\narcade_edfbl = \"edf\"\r\narcade_edfu = \"edf\"\r\narcade_edrandy = \"edrandy\"\r\narcade_edrandy1 = \"edrandy\"\r\narcade_edrandy2 = \"edrandy\"\r\narcade_edrandyj = \"edrandy\"\r\narcade_eeekk = \"eeekk\"\r\narcade_egghunt = \"egghunt\"\r\narcade_eggor = \"eggor\"\r\narcade_eggs = \"scregg\"\r\narcade_eggventr = \"eggventr\"\r\narcade_eggvntdx = \"eggventr\"\r\narcade_ehrgeiz = \"ehrgeiz\"\r\narcade_eightfrc = \"eightfrc\"\r\narcade_eightman = \"eightman\"\r\narcade_einnings = \"einnings\"\r\narcade_ejihon = \"ejihon\"\r\narcade_elandore = \"elandore\"\r\narcade_elecyoy2 = \"elecyoyo\"\r\narcade_elecyoyo = \"elecyoyo\"\r\narcade_elevatob = \"elevator\"\r\narcade_elevator = \"elevator\"\r\narcade_elim2 = \"elim2\"\r\narcade_elim2a = \"elim2\"\r\narcade_elim4 = \"elim2\"\r\narcade_elvact2u = \"elvactr\"\r\narcade_elvactr = \"elvactr\"\r\narcade_elvactrj = \"elvactr\"\r\narcade_embargo = \"embargo\"\r\narcade_emeralda = \"emeralda\"\r\narcade_emerldaa = \"emeralda\"\r\narcade_empcity = \"empcity\"\r\narcade_empcityj = \"empcity\"\r\narcade_endurob2 = \"enduror\"\r\narcade_endurobl = \"enduror\"\r\narcade_enduror = \"enduror\"\r\narcade_enduror1 = \"enduror\"\r\narcade_endurora = \"enduror\"\r\narcade_enforce = \"enforce\"\r\narcade_enforcej = \"enforce\"\r\narcade_enforceja = \"enforce\"\r\narcade_enigma2 = \"enigma2\"\r\narcade_enigma2a = \"enigma2\"\r\narcade_eprom = \"eprom\"\r\narcade_eprom2 = \"eprom\"\r\narcade_equites = \"equites\"\r\narcade_equitess = \"equites\"\r\narcade_esb = \"esb\"\r\narcade_esckids = \"esckids\"\r\narcade_esckidsj = \"esckids\"\r\narcade_espgal = \"espgal\"\r\narcade_espgalbl = \"espgal\"\r\narcade_espial = \"espial\"\r\narcade_espiale = \"espial\"\r\narcade_esprade = \"esprade\"\r\narcade_espradej = \"esprade\"\r\narcade_espradejo = \"esprade\"\r\narcade_espradeo = \"esprade\"\r\narcade_eswat = \"eswat\"\r\narcade_eswatbl = \"eswat\"\r\narcade_eswatd = \"eswat\"\r\narcade_eswatj = \"eswat\"\r\narcade_eswatj1 = \"eswat\"\r\narcade_eswatj1d = \"eswat\"\r\narcade_eswatjd = \"eswat\"\r\narcade_eswatu = \"eswat\"\r\narcade_eswatud = \"eswat\"\r\narcade_eto = \"eto\"\r\narcade_euroch92 = \"euroch92\"\r\narcade_evilston = \"evilston\"\r\narcade_excelsr = \"excelsr\"\r\narcade_excelsra = \"excelsr\"\r\narcade_excitbkj = \"excitebk\"\r\narcade_excitebk = \"excitebk\"\r\narcade_excthour = \"matmania\"\r\narcade_exctleag = \"exctleag\"\r\narcade_exctleagd = \"exctleag\"\r\narcade_exctscc2 = \"exctsccr\"\r\narcade_exctscca = \"exctsccr\"\r\narcade_exctsccb = \"exctsccr\"\r\narcade_exctsccr = \"exctsccr\"\r\narcade_exedexes = \"exedexes\"\r\narcade_exerion = \"exerion\"\r\narcade_exerionb = \"exerion\"\r\narcade_exeriont = \"exerion\"\r\narcade_exerizerb = \"skyfox\"\r\narcade_exerizrb = \"skyfox\"\r\narcade_exodus = \"redufo\"\r\narcade_explbrkr = \"explbrkr\"\r\narcade_explbrkrk = \"explbrkr\"\r\narcade_explorer = \"scramble\"\r\narcade_exprraid = \"exprraid\"\r\narcade_extdwnhl = \"extdwnhl\"\r\narcade_exterm = \"exterm\"\r\narcade_extrmatn = \"extrmatn\"\r\narcade_extrmatnj = \"extrmatn\"\r\narcade_extrmatnu = \"extrmatn\"\r\narcade_extrmatnur = \"extrmatn\"\r\narcade_exvania = \"exvania\"\r\narcade_exzisus = \"exzisus\"\r\narcade_exzisusa = \"exzisus\"\r\narcade_exzisust = \"exzisus\"\r\narcade_eyes = \"eyes\"\r\narcade_eyes2 = \"eyes\"\r\narcade_eyesb = \"eyes\"\r\narcade_eyeszacb = \"eyes\"\r\narcade_f1dream = \"f1dream\"\r\narcade_f1dreamb = \"f1dream\"\r\narcade_f1dreamba = \"f1dream\"\r\narcade_f1en = \"f1en\"\r\narcade_f1gp = \"f1gp\"\r\narcade_f1gp2 = \"f1gp2\"\r\narcade_f1gpb = \"f1gp\"\r\narcade_f1gpstar = \"f1gpstar\"\r\narcade_f1gpstr2 = \"f1gpstr2\"\r\narcade_f1lap = \"f1lap\"\r\narcade_f1superb = \"f1superb\"\r\narcade_fa = \"fghtatck\"\r\narcade_faceoff = \"faceoff\"\r\narcade_falcon = \"phoenix\"\r\narcade_falconz = \"phoenix\"\r\narcade_fantasia = \"fantasia\"\r\narcade_fantasiaa = \"fantasia\"\r\narcade_fantasiab = \"fantasia\"\r\narcade_fantasian = \"fantasia\"\r\narcade_fantastc = \"fantastc\"\r\narcade_fantasy = \"fantasy\"\r\narcade_fantasyg = \"fantasyu\"\r\narcade_fantasyg2 = \"fantasyu\"\r\narcade_fantasyj = \"fantasyu\"\r\narcade_fantasyu = \"fantasyu\"\r\narcade_fantazia = \"mooncrst\"\r\narcade_fantjour = \"gokuparo\"\r\narcade_fantland = \"fantland\"\r\narcade_fantlanda = \"fantland\"\r\narcade_fantsia2 = \"fantsia2\"\r\narcade_fantsia2a = \"fantsia2\"\r\narcade_fantsia2n = \"fantsia2\"\r\narcade_fantsy95 = \"newfant\"\r\narcade_fantzn2 = \"fantzn2\"\r\narcade_fantzn2x = \"fantzn2x\"\r\narcade_fantzn2xp = \"fantzn2x\"\r\narcade_fantzn2xps2 = \"fantzn2x\"\r\narcade_fantznta = \"fantzn2x\"\r\narcade_fantzone = \"fantzone\"\r\narcade_fantzone1 = \"fantzone\"\r\narcade_fantzonep = \"fantzone\"\r\narcade_fantzoneta = \"fantzone\"\r\narcade_fantzono = \"fantzone\"\r\narcade_farmer = \"ikki\"\r\narcade_farwest = \"ironhors\"\r\narcade_fastfred = \"flyboy\"\r\narcade_fastlane = \"fastlane\"\r\narcade_fatfursa = \"fatfursp\"\r\narcade_fatfursp = \"fatfursp\"\r\narcade_fatfurspa = \"fatfursp\"\r\narcade_fatfury1 = \"fatfury1\"\r\narcade_fatfury2 = \"fatfury2\"\r\narcade_fatfury2a = \"fatfury2\"\r\narcade_fatfury3 = \"fatfury3\"\r\narcade_fatfury3a = \"fatfury3\"\r\narcade_fax = \"fax\"\r\narcade_fball = \"fball\"\r\narcade_fbfrenzy = \"fbfrenzy\"\r\narcade_fcombat = \"fcombat\"\r\narcade_fcrash = \"ffight\"\r\narcade_fenix = \"phoenix\"\r\narcade_feversos = \"feversos\"\r\narcade_ffantasa = \"hippodrm\"\r\narcade_ffantasy = \"hippodrm\"\r\narcade_ffantasya = \"hippodrm\"\r\narcade_ffantasyb = \"hippodrm\"\r\narcade_ffantasyj = \"hippodrm\"\r\narcade_ffight = \"ffight\"\r\narcade_ffighta = \"ffight\"\r\narcade_ffightbl = \"ffight\"\r\narcade_ffightbla = \"ffight\"\r\narcade_ffightj = \"ffight\"\r\narcade_ffightj1 = \"ffight\"\r\narcade_ffightj2 = \"ffight\"\r\narcade_ffightj3 = \"ffight\"\r\narcade_ffightj4 = \"ffight\"\r\narcade_ffightjh = \"ffight\"\r\narcade_ffightu = \"ffight\"\r\narcade_ffightu1 = \"ffight\"\r\narcade_ffightu2 = \"ffight\"\r\narcade_ffightua = \"ffight\"\r\narcade_ffightub = \"ffight\"\r\narcade_ffightuc = \"ffight\"\r\narcade_ffreveng = \"ffreveng\"\r\narcade_fghtatck = \"fghtatck\"\r\narcade_fghtbskt = \"fghtbskt\"\r\narcade_fghthist = \"fghthist\"\r\narcade_fghthista = \"fghthist\"\r\narcade_fghthistb = \"fghthist\"\r\narcade_fghthistj = \"fghthist\"\r\narcade_fghthistja = \"fghthist\"\r\narcade_fghthistjb = \"fghthist\"\r\narcade_fghthistu = \"fghthist\"\r\narcade_fghthistua = \"fghthist\"\r\narcade_fghthistub = \"fghthist\"\r\narcade_fghthistuc = \"fghthist\"\r\narcade_fgtlayer = \"fgtlayer\"\r\narcade_fhawk = \"fhawk\"\r\narcade_fhawkj = \"fhawk\"\r\narcade_fhboxers = \"fhboxers\"\r\narcade_fieldday = \"fieldday\"\r\narcade_fightfev = \"fightfev\"\r\narcade_fightfeva = \"fightfev\"\r\narcade_fightfva = \"fightfev\"\r\narcade_fightrol = \"fightrol\"\r\narcade_finalap2 = \"finalap2\"\r\narcade_finalap2j = \"finalap2\"\r\narcade_finalap3 = \"finalap3\"\r\narcade_finalap3a = \"finalap3\"\r\narcade_finalap3bl = \"finalap3\"\r\narcade_finalap3j = \"finalap3\"\r\narcade_finalap3jc = \"finalap3\"\r\narcade_finalapc = \"finallap\"\r\narcade_finalapd = \"finallap\"\r\narcade_finalb = \"finalb\"\r\narcade_finalbj = \"finalb\"\r\narcade_finalbny = \"vanilla\"\r\narcade_finalbu = \"finalb\"\r\narcade_finalizb = \"finalizr\"\r\narcade_finalizr = \"finalizr\"\r\narcade_finalizrb = \"finalizr\"\r\narcade_finallap = \"finallap\"\r\narcade_finallapc = \"finallap\"\r\narcade_finallapd = \"finallap\"\r\narcade_finallapjb = \"finallap\"\r\narcade_finallapjc = \"finallap\"\r\narcade_finalp2j = \"finalap2\"\r\narcade_finalp3a = \"finalap3\"\r\narcade_finalttr = \"finalttr\"\r\narcade_findlove = \"findlove\"\r\narcade_findout = \"findout\"\r\narcade_finehour = \"finehour\"\r\narcade_finlapjb = \"finallap\"\r\narcade_finlapjc = \"finallap\"\r\narcade_finlarch = \"sleague\"\r\narcade_firebarr = \"airass\"\r\narcade_firebatl = \"firebatl\"\r\narcade_firehawk = \"spec2k\"\r\narcade_fireone = \"fireone\"\r\narcade_fireshrk = \"fireshrk\"\r\narcade_fireshrka = \"fireshrk\"\r\narcade_fireshrkd = \"fireshrk\"\r\narcade_fireshrkdh = \"fireshrk\"\r\narcade_firetpbl = \"firetrap\"\r\narcade_firetrap = \"firetrap\"\r\narcade_firetrapa = \"firetrap\"\r\narcade_firetrapbl = \"firetrap\"\r\narcade_firetrapj = \"firetrap\"\r\narcade_firetrk = \"firetrk\"\r\narcade_fitegol2 = \"fitegolf\"\r\narcade_fitegolf = \"fitegolf\"\r\narcade_fitegolf2 = \"fitegolf\"\r\narcade_fitegolfu = \"fitegolf\"\r\narcade_fitfight = \"fitfight\"\r\narcade_fitter = \"roundup\"\r\narcade_fitterbl = \"roundup\"\r\narcade_fixeighb = \"fixeight\"\r\narcade_fixeight = \"fixeight\"\r\narcade_fixeightj = \"fixeight\"\r\narcade_fixeighttw = \"fixeight\"\r\narcade_fixeighttwt = \"fixeight\"\r\narcade_fjbuster = \"shogwarr\"\r\narcade_flagrall = \"flagrall\"\r\narcade_flashgal = \"flashgal\"\r\narcade_flashgala = \"flashgal\"\r\narcade_flashgalk = \"flashgal\"\r\narcade_flicky = \"flicky\"\r\narcade_flickya = \"flicky\"\r\narcade_flickyg = \"flicky\"\r\narcade_flickyo = \"flicky\"\r\narcade_flickys1 = \"flicky\"\r\narcade_flickys2 = \"flicky\"\r\narcade_flickys2g = \"flicky\"\r\narcade_flipshot = \"flipshot\"\r\narcade_flipull = \"plotting\"\r\narcade_flkatck = \"mx5000\"\r\narcade_flkatcka = \"mx5000\"\r\narcade_flower = \"flower\"\r\narcade_flowerj = \"flower\"\r\narcade_flstory = \"flstory\"\r\narcade_flstoryj = \"flstory\"\r\narcade_flyball = \"flyball\"\r\narcade_flyboy = \"flyboy\"\r\narcade_flyboyb = \"flyboy\"\r\narcade_flytiger = \"flytiger\"\r\narcade_flytigera = \"flytiger\"\r\narcade_fncywld = \"fncywld\"\r\narcade_fnkyfish = \"fnkyfish\"\r\narcade_fnshark = \"fshark\"\r\narcade_foodf = \"foodf\"\r\narcade_foodf1 = \"foodf\"\r\narcade_foodf2 = \"foodf\"\r\narcade_foodfc = \"foodf\"\r\narcade_footchmp = \"footchmp\"\r\narcade_forcebrk = \"brkthru\"\r\narcade_forgottn = \"forgottn\"\r\narcade_forgottna = \"forgottn\"\r\narcade_forgottnu = \"forgottn\"\r\narcade_forgottnua = \"forgottn\"\r\narcade_forgottnuaa = \"forgottn\"\r\narcade_forgottnuc = \"forgottn\"\r\narcade_forgottnue = \"forgottn\"\r\narcade_formatz = \"formatz\"\r\narcade_fourtrax = \"fourtrax\"\r\narcade_fourtraxa = \"fourtrax\"\r\narcade_fpoint = \"fpoint\"\r\narcade_fpoint1 = \"fpoint\"\r\narcade_fpoint1d = \"fpoint\"\r\narcade_fpointbj = \"fpoint\"\r\narcade_fpointbl = \"fpoint\"\r\narcade_fpointd = \"fpoint\"\r\narcade_freekckb = \"freekick\"\r\narcade_freekick = \"freekick\"\r\narcade_freekicka = \"freekick\"\r\narcade_freekickb1 = \"freekick\"\r\narcade_freekickb3 = \"freekick\"\r\narcade_freeze = \"freeze\"\r\narcade_frenzy = \"frenzy\"\r\narcade_friskyt = \"friskyt\"\r\narcade_friskyta = \"friskyt\"\r\narcade_friskytb = \"friskyt\"\r\narcade_frogf = \"frogger\"\r\narcade_frogg = \"frogger\"\r\narcade_frogger = \"frogger\"\r\narcade_froggermc = \"frogger\"\r\narcade_froggers = \"frogger\"\r\narcade_froggers1 = \"frogger\"\r\narcade_froggers2 = \"frogger\"\r\narcade_froggers3 = \"frogger\"\r\narcade_froggrmc = \"frogger\"\r\narcade_froggrs = \"frogger\"\r\narcade_frogs = \"frogs\"\r\narcade_frogseg1 = \"frogger\"\r\narcade_frogseg2 = \"frogger\"\r\narcade_froman2b = \"froman2b\"\r\narcade_fromanc2 = \"fromanc2\"\r\narcade_fromanc4 = \"fromanc4\"\r\narcade_fromance = \"fromance\"\r\narcade_fromancr = \"fromancr\"\r\narcade_frontlin = \"frontlin\"\r\narcade_fround = \"fround\"\r\narcade_froundl = \"fround\"\r\narcade_fshark = \"fshark\"\r\narcade_fsharkbt = \"fshark\"\r\narcade_fsoccer = \"fsoccer\"\r\narcade_fsoccerb = \"fsoccer\"\r\narcade_fsoccerba = \"fsoccer\"\r\narcade_fsoccerj = \"fsoccer\"\r\narcade_fstarfrc = \"fstarfrc\"\r\narcade_fstarfrcj = \"fstarfrc\"\r\narcade_fswords = \"samsho3\"\r\narcade_ftimpcta = \"ftimpcta\"\r\narcade_ftsoccer = \"ftsoccer\"\r\narcade_fullthrl = \"topspeed\"\r\narcade_funcube2 = \"funcube2\"\r\narcade_funcube4 = \"funcube4\"\r\narcade_funkybee = \"funkybee\"\r\narcade_funkybeeb = \"funkybee\"\r\narcade_funkyjet = \"funkyjet\"\r\narcade_funkyjeta = \"funkyjet\"\r\narcade_funkyjetj = \"funkyjet\"\r\narcade_funnymou = \"suprmous\"\r\narcade_funybubl = \"funybubl\"\r\narcade_funybublc = \"funybubl\"\r\narcade_futspy = \"futspy\"\r\narcade_fx = \"srdmissn\"\r\narcade_fxa = \"srdmissn\"\r\narcade_ga2 = \"ga2\"\r\narcade_ga2j = \"ga2\"\r\narcade_gaia = \"gaia\"\r\narcade_gaialast = \"gaialast\"\r\narcade_gaiapols = \"gaiapols\"\r\narcade_gaiapolsj = \"gaiapols\"\r\narcade_gaiapolsu = \"gaiapols\"\r\narcade_gaiden = \"shadoww\"\r\narcade_gakupara = \"gakupara\"\r\narcade_gakusai = \"gakusai\"\r\narcade_gakusai2 = \"gakusai2\"\r\narcade_gal10ren = \"gal10ren\"\r\narcade_galag88b = \"galaga88\"\r\narcade_galag88j = \"galaga88\"\r\narcade_galaga = \"galaga\"\r\narcade_galaga3 = \"gaplus\"\r\narcade_galaga3a = \"gaplus\"\r\narcade_galaga3b = \"gaplus\"\r\narcade_galaga3c = \"gaplus\"\r\narcade_galaga3m = \"gaplus\"\r\narcade_galaga88 = \"galaga88\"\r\narcade_galaga88a = \"galaga88\"\r\narcade_galaga88j = \"galaga88\"\r\narcade_galagamf = \"galaga\"\r\narcade_galagamk = \"galaga\"\r\narcade_galagamw = \"galaga\"\r\narcade_galagao = \"galaga\"\r\narcade_galap1 = \"galaxian\"\r\narcade_galap4 = \"galaxian\"\r\narcade_galapx = \"galaxian\"\r\narcade_galaxbsf = \"galaxian\"\r\narcade_galaxiaj = \"galaxian\"\r\narcade_galaxian = \"galaxian\"\r\narcade_galaxiana = \"galaxian\"\r\narcade_galaxianbl = \"galaxian\"\r\narcade_galaxiani = \"galaxian\"\r\narcade_galaxianm = \"galaxian\"\r\narcade_galaxianmo = \"galaxian\"\r\narcade_galaxiant = \"galaxian\"\r\narcade_galaxrcgg = \"galaxian\"\r\narcade_galaxrf = \"galaxian\"\r\narcade_galaxrfgg = \"galaxian\"\r\narcade_galaxyfg = \"galaxyfg\"\r\narcade_galaxygn = \"galaxygn\"\r\narcade_galemp = \"uniwars\"\r\narcade_galhustl = \"pgalvip\"\r\narcade_galivan = \"galivan\"\r\narcade_galivan2 = \"galivan\"\r\narcade_galivan3 = \"galivan\"\r\narcade_galkaika = \"galkaika\"\r\narcade_galkoku = \"galkoku\"\r\narcade_gallag = \"galaga\"\r\narcade_gallop = \"cosmccop\"\r\narcade_galmedes = \"galmedes\"\r\narcade_galmidw = \"galaxian\"\r\narcade_galmidwo = \"galaxian\"\r\narcade_galpandx = \"galpandx\"\r\narcade_galpani2 = \"galpani2\"\r\narcade_galpani4 = \"galpani4\"\r\narcade_galpani4k = \"galpani4\"\r\narcade_galpanib = \"galpanic\"\r\narcade_galpanic = \"galpanic\"\r\narcade_galpanidx = \"galpani4\"\r\narcade_galpanis = \"galpanis\"\r\narcade_galpanisj = \"galpanis\"\r\narcade_galpanisk = \"galpanis\"\r\narcade_galpans2 = \"galpans2\"\r\narcade_galpans2a = \"galpans2\"\r\narcade_galpans2j = \"galpans2\"\r\narcade_galpans3 = \"galpans3\"\r\narcade_galpansu = \"galpans2\"\r\narcade_galspnbl = \"galspnbl\"\r\narcade_galturbo = \"galaxian\"\r\narcade_galxwar2 = \"galxwars\"\r\narcade_galxwars = \"galxwars\"\r\narcade_galxwart = \"galxwars\"\r\narcade_gametngk = \"gametngk\"\r\narcade_ganbare = \"ganbare\"\r\narcade_gangonta = \"prtytime\"\r\narcade_gangwarb = \"gangwars\"\r\narcade_gangwars = \"gangwars\"\r\narcade_gangwarsb = \"gangwars\"\r\narcade_gangwarsj = \"gangwars\"\r\narcade_gangwarsu = \"gangwars\"\r\narcade_ganryu = \"ganryu\"\r\narcade_gaplus = \"gaplus\"\r\narcade_gaplusa = \"gaplus\"\r\narcade_gaplusd = \"gaplus\"\r\narcade_gapluso = \"gaplus\"\r\narcade_gaplust = \"gaplus\"\r\narcade_gardia = \"gardia\"\r\narcade_gardiab = \"gardia\"\r\narcade_gardiaj = \"gardia\"\r\narcade_garogun = \"garogun\"\r\narcade_garou = \"garou\"\r\narcade_garoubl = \"garou\"\r\narcade_garouh = \"garou\"\r\narcade_garouha = \"garou\"\r\narcade_garouo = \"garou\"\r\narcade_garoup = \"garou\"\r\narcade_garuka = \"devstors\"\r\narcade_garyoret = \"garyoret\"\r\narcade_gatedom1 = \"darkseal\"\r\narcade_gatedoom = \"darkseal\"\r\narcade_gatedoom1 = \"darkseal\"\r\narcade_gatsbee = \"galaga\"\r\narcade_gaun22p1 = \"gaunt2\"\r\narcade_gaun22pg = \"gaunt2\"\r\narcade_gaun2pg1 = \"gauntlet\"\r\narcade_gaun2pj2 = \"gauntlet\"\r\narcade_gaun2pr3 = \"gauntlet\"\r\narcade_gaunt2 = \"gaunt2\"\r\narcade_gaunt22p = \"gaunt2\"\r\narcade_gaunt22p1 = \"gaunt2\"\r\narcade_gaunt22pg = \"gaunt2\"\r\narcade_gaunt2g = \"gaunt2\"\r\narcade_gaunt2p = \"gauntlet\"\r\narcade_gaunt2pg = \"gauntlet\"\r\narcade_gaunt2pj = \"gauntlet\"\r\narcade_gauntg = \"gauntlet\"\r\narcade_gauntgr3 = \"gauntlet\"\r\narcade_gauntgr6 = \"gauntlet\"\r\narcade_gauntgr8 = \"gauntlet\"\r\narcade_gauntj = \"gauntlet\"\r\narcade_gauntj12 = \"gauntlet\"\r\narcade_gauntlet = \"gauntlet\"\r\narcade_gauntlet2p = \"gauntlet\"\r\narcade_gauntlet2pg = \"gauntlet\"\r\narcade_gauntlet2pg1 = \"gauntlet\"\r\narcade_gauntlet2pj = \"gauntlet\"\r\narcade_gauntlet2pj2 = \"gauntlet\"\r\narcade_gauntlet2pr3 = \"gauntlet\"\r\narcade_gauntletg = \"gauntlet\"\r\narcade_gauntletgr3 = \"gauntlet\"\r\narcade_gauntletgr6 = \"gauntlet\"\r\narcade_gauntletgr8 = \"gauntlet\"\r\narcade_gauntletj = \"gauntlet\"\r\narcade_gauntletj12 = \"gauntlet\"\r\narcade_gauntletr1 = \"gauntlet\"\r\narcade_gauntletr2 = \"gauntlet\"\r\narcade_gauntletr4 = \"gauntlet\"\r\narcade_gauntletr5 = \"gauntlet\"\r\narcade_gauntletr7 = \"gauntlet\"\r\narcade_gauntletr9 = \"gauntlet\"\r\narcade_gauntlets = \"gauntlet\"\r\narcade_gauntr1 = \"gauntlet\"\r\narcade_gauntr2 = \"gauntlet\"\r\narcade_gauntr4 = \"gauntlet\"\r\narcade_gauntr5 = \"gauntlet\"\r\narcade_gauntr7 = \"gauntlet\"\r\narcade_gauntr9 = \"gauntlet\"\r\narcade_gaunts = \"gauntlet\"\r\narcade_gaxeduel = \"gaxeduel\"\r\narcade_gberet = \"gberet\"\r\narcade_gberetb = \"gberet\"\r\narcade_gblchmp = \"kaiserkn\"\r\narcade_gbusters = \"gbusters\"\r\narcade_gbustersa = \"gbusters\"\r\narcade_gcpinbal = \"gcpinbal\"\r\narcade_gdarius = \"gdarius\"\r\narcade_gdarius2 = \"gdarius\"\r\narcade_gdfs = \"gdfs\"\r\narcade_geebee = \"geebee\"\r\narcade_geebeea = \"geebee\"\r\narcade_geebeeb = \"geebee\"\r\narcade_geebeeg = \"geebee\"\r\narcade_gekiretu = \"gekiretu\"\r\narcade_gekiridn = \"gekiridn\"\r\narcade_gekiridnj = \"gekiridn\"\r\narcade_gekirido = \"gekirido\"\r\narcade_gemini = \"gemini\"\r\narcade_geminib = \"gemini\"\r\narcade_genix = \"genix\"\r\narcade_genpeitd = \"genpeitd\"\r\narcade_gensitou = \"prehisle\"\r\narcade_geostorm = \"gunforc2\"\r\narcade_getstar = \"getstar\"\r\narcade_getstarb = \"getstar\"\r\narcade_getstarj = \"getstar\"\r\narcade_gfire2 = \"gfire2\"\r\narcade_gforce2 = \"gforce2\"\r\narcade_gforce2j = \"gforce2\"\r\narcade_gforce2ja = \"gforce2\"\r\narcade_gforce2sd = \"gforce2\"\r\narcade_gg_5in1fun = \"gg_5in1fun\"\r\narcade_gg_aaharima = \"gg_aaharima\"\r\narcade_gg_addfam = \"gg_addfam\"\r\narcade_gg_advbatmr = \"gg_advbatmr\"\r\narcade_gg_aerialas = \"gg_aerialas\"\r\narcade_gg_aerialasj = \"gg_aerialas\"\r\narcade_gg_agassi = \"gg_agassi\"\r\narcade_gg_aladdin = \"gg_aladdin\"\r\narcade_gg_aladdinj = \"gg_aladdin\"\r\narcade_gg_aladdinp1 = \"gg_aladdin\"\r\narcade_gg_aladdinp2 = \"gg_aladdin\"\r\narcade_gg_aladdinp3 = \"gg_aladdin\"\r\narcade_gg_alexkidd = \"gg_alexkidd\"\r\narcade_gg_alien3 = \"gg_alien3\"\r\narcade_gg_alien3j = \"gg_alien3\"\r\narcade_gg_aliensyn = \"gg_aliensyn\"\r\narcade_gg_aliensynj = \"gg_aliensyn\"\r\narcade_gg_arcadecl = \"gg_arcadecl\"\r\narcade_gg_archrivl = \"gg_archrivl\"\r\narcade_gg_arena = \"gg_arena\"\r\narcade_gg_ariel = \"gg_ariel\"\r\narcade_gg_arliel = \"gg_crystalw\"\r\narcade_gg_astergre = \"gg_astergre\"\r\narcade_gg_astergrep1 = \"gg_astergre\"\r\narcade_gg_astergrep2 = \"gg_astergre\"\r\narcade_gg_astergrep3 = \"gg_astergre\"\r\narcade_gg_astergrep4 = \"gg_astergre\"\r\narcade_gg_astergrep5 = \"gg_astergre\"\r\narcade_gg_astergreu = \"gg_astergre\"\r\narcade_gg_astermis = \"gg_astermis\"\r\narcade_gg_axbattlr = \"gg_axbattlr\"\r\narcade_gg_axbattlrj = \"gg_axbattlr\"\r\narcade_gg_axbattlrp = \"gg_axbattlr\"\r\narcade_gg_bakubaku = \"gg_bakubaku\"\r\narcade_gg_bakubakuj = \"gg_bakubaku\"\r\narcade_gg_bakubakuu = \"gg_bakubaku\"\r\narcade_gg_bam = \"gg_bam\"\r\narcade_gg_barbie = \"gg_barbie\"\r\narcade_gg_bartman = \"gg_bartman\"\r\narcade_gg_bartvssm = \"gg_bartvssm\"\r\narcade_gg_bartvswd = \"gg_bartvswd\"\r\narcade_gg_batmanf = \"gg_batmanf\"\r\narcade_gg_batmanrn = \"gg_batmanrn\"\r\narcade_gg_batterup = \"gg_batterup\"\r\narcade_gg_beavis = \"gg_beavis\"\r\narcade_gg_beavisp = \"gg_beavis\"\r\narcade_gg_berens = \"gg_berens\"\r\narcade_gg_berensp01 = \"gg_berens\"\r\narcade_gg_berensp02 = \"gg_berens\"\r\narcade_gg_berensp03 = \"gg_berens\"\r\narcade_gg_berensp04 = \"gg_berens\"\r\narcade_gg_berensp05 = \"gg_berens\"\r\narcade_gg_berensp06 = \"gg_berens\"\r\narcade_gg_berensp07 = \"gg_berens\"\r\narcade_gg_berensp08 = \"gg_berens\"\r\narcade_gg_berensp09 = \"gg_berens\"\r\narcade_gg_berensp10 = \"gg_berens\"\r\narcade_gg_berensp11 = \"gg_berens\"\r\narcade_gg_berensp12 = \"gg_berens\"\r\narcade_gg_berensp13 = \"gg_berens\"\r\narcade_gg_berensp14 = \"gg_berens\"\r\narcade_gg_berensp15 = \"gg_berens\"\r\narcade_gg_berensp16 = \"gg_berens\"\r\narcade_gg_berensp17 = \"gg_berens\"\r\narcade_gg_berlin = \"gg_berlin\"\r\narcade_gg_bighurt = \"gg_bighurt\"\r\narcade_gg_bonkers = \"gg_bonkers\"\r\narcade_gg_bonkersp01 = \"gg_bonkers\"\r\narcade_gg_bonkersp02 = \"gg_bonkers\"\r\narcade_gg_bonkersp03 = \"gg_bonkers\"\r\narcade_gg_bonkersp04 = \"gg_bonkers\"\r\narcade_gg_bonkersp05 = \"gg_bonkers\"\r\narcade_gg_bonkersp06 = \"gg_bonkers\"\r\narcade_gg_bonkersp07 = \"gg_bonkers\"\r\narcade_gg_bonkersp08 = \"gg_bonkers\"\r\narcade_gg_bonkersp09 = \"gg_bonkers\"\r\narcade_gg_bonkersp10 = \"gg_bonkers\"\r\narcade_gg_bonkersp11 = \"gg_bonkers\"\r\narcade_gg_bonkersp12 = \"gg_bonkers\"\r\narcade_gg_bonkersp13 = \"gg_bonkers\"\r\narcade_gg_bship = \"gg_bship\"\r\narcade_gg_btoads = \"gg_btoads\"\r\narcade_gg_btoadsu = \"gg_btoads\"\r\narcade_gg_bublbobl = \"gg_bublbobl\"\r\narcade_gg_bugsbun = \"gg_bugsbun\"\r\narcade_gg_busterb = \"gg_busterb\"\r\narcade_gg_busterf = \"gg_busterf\"\r\narcade_gg_caesars = \"gg_caesars\"\r\narcade_gg_captaven = \"gg_captaven\"\r\narcade_gg_carlicen = \"gg_carlicen\"\r\narcade_gg_casinofn = \"gg_casinofn\"\r\narcade_gg_castlill = \"gg_castlill\"\r\narcade_gg_castlillj = \"gg_castlill\"\r\narcade_gg_chakan = \"gg_chakan\"\r\narcade_gg_champhck = \"gg_champhck\"\r\narcade_gg_chasehq = \"gg_chasehq\"\r\narcade_gg_chasehqj = \"gg_chasehq\"\r\narcade_gg_cheese = \"gg_cheese\"\r\narcade_gg_chessmst = \"gg_chessmst\"\r\narcade_gg_chicago = \"gg_chicago\"\r\narcade_gg_chicagop01 = \"gg_chicago\"\r\narcade_gg_chicagop02 = \"gg_chicago\"\r\narcade_gg_chicagop03 = \"gg_chicago\"\r\narcade_gg_chicagop04 = \"gg_chicago\"\r\narcade_gg_chicagop05 = \"gg_chicago\"\r\narcade_gg_chicagop06 = \"gg_chicago\"\r\narcade_gg_chicagop07 = \"gg_chicago\"\r\narcade_gg_chicagop08 = \"gg_chicago\"\r\narcade_gg_chicagop09 = \"gg_chicago\"\r\narcade_gg_chicagop10 = \"gg_chicago\"\r\narcade_gg_chicagop11 = \"gg_chicago\"\r\narcade_gg_chicagop12 = \"gg_chicago\"\r\narcade_gg_chicagop13 = \"gg_chicago\"\r\narcade_gg_chicagop14 = \"gg_chicago\"\r\narcade_gg_chicagop15 = \"gg_chicago\"\r\narcade_gg_chicagop16 = \"gg_chicago\"\r\narcade_gg_chicagop17 = \"gg_chicago\"\r\narcade_gg_chicagop18 = \"gg_chicago\"\r\narcade_gg_chicagop19 = \"gg_chicago\"\r\narcade_gg_chicagop20 = \"gg_chicago\"\r\narcade_gg_chicagop21 = \"gg_chicago\"\r\narcade_gg_chicagop22 = \"gg_chicago\"\r\narcade_gg_chicagop23 = \"gg_chicago\"\r\narcade_gg_chicagop24 = \"gg_chicago\"\r\narcade_gg_choplft3 = \"gg_choplft3\"\r\narcade_gg_chuckrck = \"gg_chuckrck\"\r\narcade_gg_chuckrckp = \"gg_chuckrck\"\r\narcade_gg_chukrck2 = \"gg_chukrck2\"\r\narcade_gg_chukrck2u = \"gg_chukrck2\"\r\narcade_gg_cj = \"gg_cj\"\r\narcade_gg_cliffh = \"gg_cliffh\"\r\narcade_gg_clutchit = \"gg_clutchit\"\r\narcade_gg_cocakid = \"gg_cocakid\"\r\narcade_gg_columns = \"gg_columns\"\r\narcade_gg_columnsj = \"gg_columns\"\r\narcade_gg_columnsj1 = \"gg_columns\"\r\narcade_gg_coolspot = \"gg_coolspot\"\r\narcade_gg_coolspotu = \"gg_coolspot\"\r\narcade_gg_cosmic = \"gg_cosmic\"\r\narcade_gg_crashdum = \"gg_crashdum\"\r\narcade_gg_crayon = \"gg_crayon\"\r\narcade_gg_crazyfac = \"gg_crazyfac\"\r\narcade_gg_crystalw = \"gg_crystalw\"\r\narcade_gg_cutthr = \"gg_cutthr\"\r\narcade_gg_cutthrp = \"gg_cutthr\"\r\narcade_gg_daffy = \"gg_daffy\"\r\narcade_gg_daisenrg = \"gg_daisenrg\"\r\narcade_gg_dcrystal = \"gg_dcrystal\"\r\narcade_gg_dcrystalj = \"gg_dcrystal\"\r\narcade_gg_ddanpei = \"gg_ddanpei\"\r\narcade_gg_ddragon = \"gg_ddragon\"\r\narcade_gg_ddragonp = \"gg_ddragon\"\r\narcade_gg_deepduck = \"gg_deepduck\"\r\narcade_gg_defoasis = \"gg_defoasis\"\r\narcade_gg_defoasisp = \"gg_defoasis\"\r\narcade_gg_desert = \"gg_desert\"\r\narcade_gg_desertu = \"gg_desert\"\r\narcade_gg_devilish = \"gg_devilish\"\r\narcade_gg_devilishj = \"gg_devilish\"\r\narcade_gg_devilishu = \"gg_devilish\"\r\narcade_gg_dhead = \"gg_dhead\"\r\narcade_gg_dheadj = \"gg_dhead\"\r\narcade_gg_dheadp1 = \"gg_dhead\"\r\narcade_gg_dheadp2 = \"gg_dhead\"\r\narcade_gg_dheadp3 = \"gg_dhead\"\r\narcade_gg_donald42 = \"gg_deepduck\"\r\narcade_gg_donaldld = \"gg_luckydim\"\r\narcade_gg_donaldmw = \"gg_donaldmw\"\r\narcade_gg_doraemon = \"gg_doraemon\"\r\narcade_gg_dracula = \"gg_dracula\"\r\narcade_gg_draculau = \"gg_dracula\"\r\narcade_gg_dragon = \"gg_dragon\"\r\narcade_gg_dragonu = \"gg_dragon\"\r\narcade_gg_drfrankn = \"gg_drfrankn\"\r\narcade_gg_dropzone = \"gg_dropzone\"\r\narcade_gg_drrobotn = \"gg_drrobotn\"\r\narcade_gg_dstrike = \"gg_dstrike\"\r\narcade_gg_dstrikeu = \"gg_dstrike\"\r\narcade_gg_dunkkids = \"gg_dunkkids\"\r\narcade_gg_ecco = \"gg_ecco\"\r\narcade_gg_ecco2 = \"gg_ecco2\"\r\narcade_gg_ecco2j = \"gg_ecco2\"\r\narcade_gg_eccoj = \"gg_ecco\"\r\narcade_gg_ejim = \"gg_ejim\"\r\narcade_gg_ejimu = \"gg_ejim\"\r\narcade_gg_ernieeg = \"gg_ernieeg\"\r\narcade_gg_eternleg = \"gg_eternleg\"\r\narcade_gg_evander = \"gg_evander\"\r\narcade_gg_excdizzy = \"gg_excdizzy\"\r\narcade_gg_excdizzyp = \"gg_excdizzy\"\r\narcade_gg_f1 = \"gg_f1\"\r\narcade_gg_f15se = \"gg_f15se\"\r\narcade_gg_f1wce = \"gg_f1wce\"\r\narcade_gg_faceball = \"gg_faceball\"\r\narcade_gg_factoryp = \"gg_factoryp\"\r\narcade_gg_fantdizz = \"gg_fantdizz\"\r\narcade_gg_fantzone = \"gg_fantzone\"\r\narcade_gg_fantzoneu = \"gg_fantzone\"\r\narcade_gg_fatfursp = \"gg_fatfursp\"\r\narcade_gg_fatfurspu = \"gg_fatfursp\"\r\narcade_gg_fifa = \"gg_fifa\"\r\narcade_gg_fifa96 = \"gg_fifa96\"\r\narcade_gg_fifaj = \"gg_fifa\"\r\narcade_gg_foreman = \"gg_foreman\"\r\narcade_gg_fray = \"gg_fray\"\r\narcade_gg_fredcoup = \"gg_fredcoup\"\r\narcade_gg_fredcoupj = \"gg_fredcoup\"\r\narcade_gg_frogger = \"gg_frogger\"\r\narcade_gg_galaga2 = \"gg_galaga2\"\r\narcade_gg_galaga91 = \"gg_galaga2\"\r\narcade_gg_gamble = \"gg_gamble\"\r\narcade_gg_gambler = \"gg_gambler\"\r\narcade_gg_garfield = \"gg_garfield\"\r\narcade_gg_garousp = \"gg_fatfursp\"\r\narcade_gg_gearstad = \"gg_batterup\"\r\narcade_gg_gearstah = \"gg_gearstah\"\r\narcade_gg_gearwork = \"gg_gearwork\"\r\narcade_gg_georgeko = \"gg_georgeko\"\r\narcade_gg_ggaleste = \"gg_ggaleste\"\r\narcade_gg_ggdora = \"gg_ggdora\"\r\narcade_gg_ggorby = \"gg_factoryp\"\r\narcade_gg_ggport = \"gg_ggport\"\r\narcade_gg_ggport1 = \"gg_ggport1\"\r\narcade_gg_gloc = \"gg_gloc\"\r\narcade_gg_glocj = \"gg_gloc\"\r\narcade_gg_glocj1 = \"gg_gloc\"\r\narcade_gg_godzilla = \"gg_godzilla\"\r\narcade_gg_gprider = \"gg_gprider\"\r\narcade_gg_gpriderj = \"gg_gprider\"\r\narcade_gg_gpriderp = \"gg_gprider\"\r\narcade_gg_greendog = \"gg_greendog\"\r\narcade_gg_griffin = \"gg_griffin\"\r\narcade_gg_gunstar = \"gg_gunstar\"\r\narcade_gg_halleyw = \"gg_halleyw\"\r\narcade_gg_halleywj = \"gg_halleyw\"\r\narcade_gg_headbust = \"gg_headbust\"\r\narcade_gg_heavyw = \"gg_heavyw\"\r\narcade_gg_homea = \"gg_homea\"\r\narcade_gg_hook = \"gg_hook\"\r\narcade_gg_hooku = \"gg_hook\"\r\narcade_gg_hulk = \"gg_hulk\"\r\narcade_gg_hurrican = \"gg_hurrican\"\r\narcade_gg_hyokkohj = \"gg_hyokkohj\"\r\narcade_gg_hypyak92 = \"gg_hypyak92\"\r\narcade_gg_ichirgg = \"gg_ichirgg\"\r\narcade_gg_indycrus = \"gg_indycrus\"\r\narcade_gg_inudais = \"gg_inudais\"\r\narcade_gg_ironman = \"gg_ironman\"\r\narcade_gg_ironman1 = \"gg_ironman\"\r\narcade_gg_itchy = \"gg_itchy\"\r\narcade_gg_jangpun2 = \"gg_jangpun2\"\r\narcade_gg_jb007 = \"gg_jb007\"\r\narcade_gg_jdredd = \"gg_jdredd\"\r\narcade_gg_jeopards = \"gg_jeopards\"\r\narcade_gg_jeopardy = \"gg_jeopardy\"\r\narcade_gg_jleagu94 = \"gg_jleagu94\"\r\narcade_gg_jleague = \"gg_jleague\"\r\narcade_gg_joemont = \"gg_joemont\"\r\narcade_gg_joemontj = \"gg_joemont\"\r\narcade_gg_jpark = \"gg_jpark\"\r\narcade_gg_jparkj = \"gg_jpark\"\r\narcade_gg_jpond3 = \"gg_jpond3\"\r\narcade_gg_jstrike = \"gg_jstrike\"\r\narcade_gg_junction = \"gg_junction\"\r\narcade_gg_junctionj = \"gg_junction\"\r\narcade_gg_jungle = \"gg_jungle\"\r\narcade_gg_jungleu = \"gg_jungle\"\r\narcade_gg_kawasaki = \"gg_kawasaki\"\r\narcade_gg_kickrush = \"gg_tengenwc\"\r\narcade_gg_kineticc = \"gg_kineticc\"\r\narcade_gg_klax = \"gg_klax\"\r\narcade_gg_krustyfh = \"gg_krustyfh\"\r\narcade_gg_kunichan = \"gg_kunichan\"\r\narcade_gg_kunichn2 = \"gg_kunichn2\"\r\narcade_gg_landill = \"gg_landill\"\r\narcade_gg_landillj = \"gg_landill\"\r\narcade_gg_lastact = \"gg_lastact\"\r\narcade_gg_lastbibl = \"gg_lastbibl\"\r\narcade_gg_lastbibs = \"gg_lastbibs\"\r\narcade_gg_lastbibse = \"gg_lastbibs\"\r\narcade_gg_legndill = \"gg_legndill\"\r\narcade_gg_legndillj = \"gg_legndill\"\r\narcade_gg_legndillp1 = \"gg_legndill\"\r\narcade_gg_legndillp2 = \"gg_legndill\"\r\narcade_gg_legndillp3 = \"gg_legndill\"\r\narcade_gg_legndillp4 = \"gg_legndill\"\r\narcade_gg_legndillp5 = \"gg_legndill\"\r\narcade_gg_legndillp6 = \"gg_legndill\"\r\narcade_gg_lemming2 = \"gg_lemming2\"\r\narcade_gg_lemmings = \"gg_lemmings\"\r\narcade_gg_lemmingsp = \"gg_lemmings\"\r\narcade_gg_lionking = \"gg_lionking\"\r\narcade_gg_lionkingj = \"gg_lionking\"\r\narcade_gg_lionkingp1 = \"gg_lionking\"\r\narcade_gg_lionkingp2 = \"gg_lionking\"\r\narcade_gg_lionkingp3 = \"gg_lionking\"\r\narcade_gg_lionkingp4 = \"gg_lionking\"\r\narcade_gg_lionkingp5 = \"gg_lionking\"\r\narcade_gg_lionkingp6 = \"gg_lionking\"\r\narcade_gg_lionkingp7 = \"gg_lionking\"\r\narcade_gg_lionkingp8 = \"gg_lionking\"\r\narcade_gg_lionkingp9 = \"gg_lionking\"\r\narcade_gg_lionkingu = \"gg_lionking\"\r\narcade_gg_lostwrld = \"gg_lostwrld\"\r\narcade_gg_luckydim = \"gg_luckydim\"\r\narcade_gg_lunar = \"gg_lunar\"\r\narcade_gg_lunare = \"gg_lunar\"\r\narcade_gg_madden95 = \"gg_madden95\"\r\narcade_gg_madden96 = \"gg_madden96\"\r\narcade_gg_madoumn2 = \"gg_madoumn2\"\r\narcade_gg_madoumn3 = \"gg_madoumn3\"\r\narcade_gg_madoumn3a = \"gg_madoumn3\"\r\narcade_gg_madoumna = \"gg_madoumna\"\r\narcade_gg_madoumon = \"gg_madoumon\"\r\narcade_gg_madoumone = \"gg_madoumon\"\r\narcade_gg_magiclpp = \"gg_magiclpp\"\r\narcade_gg_majors = \"gg_majors\"\r\narcade_gg_mappy = \"gg_mappy\"\r\narcade_gg_marble = \"gg_marble\"\r\narcade_gg_marko = \"gg_marko\"\r\narcade_gg_mastdark = \"gg_mastdark\"\r\narcade_gg_megaman = \"gg_megaman\"\r\narcade_gg_mickeyuc = \"gg_mickeyuc\"\r\narcade_gg_mickmack = \"gg_mickmack\"\r\narcade_gg_micromac = \"gg_micromac\"\r\narcade_gg_micromc2 = \"gg_micromc2\"\r\narcade_gg_mk = \"gg_mk\"\r\narcade_gg_mk2 = \"gg_mk2\"\r\narcade_gg_mk3 = \"gg_mk3\"\r\narcade_gg_mkj = \"gg_mk\"\r\narcade_gg_mlbpa = \"gg_mlbpa\"\r\narcade_gg_mmpr = \"gg_mmpr\"\r\narcade_gg_mmprp = \"gg_mmpr\"\r\narcade_gg_mmprtm = \"gg_mmprtm\"\r\narcade_gg_mmprtmp = \"gg_mmprtm\"\r\narcade_gg_moldoran = \"gg_moldoran\"\r\narcade_gg_monstwar = \"gg_monstwar\"\r\narcade_gg_mspacman = \"gg_mspacman\"\r\narcade_gg_mtaruru = \"gg_mtaruru\"\r\narcade_gg_mworld2 = \"gg_wboydtrp\"\r\narcade_gg_nazopuyo = \"gg_nazopuyo\"\r\narcade_gg_nazopuyo1 = \"gg_nazopuyo\"\r\narcade_gg_nazpuyo2 = \"gg_nazpuyo2\"\r\narcade_gg_nazpyoar = \"gg_nazpyoar\"\r\narcade_gg_nazpyoarp = \"gg_nazpyoar\"\r\narcade_gg_nbaact = \"gg_nbaact\"\r\narcade_gg_nbaactp01 = \"gg_nbaact\"\r\narcade_gg_nbaactp02 = \"gg_nbaact\"\r\narcade_gg_nbaactp03 = \"gg_nbaact\"\r\narcade_gg_nbaactp04 = \"gg_nbaact\"\r\narcade_gg_nbaactp05 = \"gg_nbaact\"\r\narcade_gg_nbaactp06 = \"gg_nbaact\"\r\narcade_gg_nbaactp07 = \"gg_nbaact\"\r\narcade_gg_nbaactp08 = \"gg_nbaact\"\r\narcade_gg_nbaactp09 = \"gg_nbaact\"\r\narcade_gg_nbaactp10 = \"gg_nbaact\"\r\narcade_gg_nbaactp11 = \"gg_nbaact\"\r\narcade_gg_nbaactp12 = \"gg_nbaact\"\r\narcade_gg_nbaactp13 = \"gg_nbaact\"\r\narcade_gg_nbaactp14 = \"gg_nbaact\"\r\narcade_gg_nbaactp15 = \"gg_nbaact\"\r\narcade_gg_nbaactp16 = \"gg_nbaact\"\r\narcade_gg_nbaactp17 = \"gg_nbaact\"\r\narcade_gg_nbaactp18 = \"gg_nbaact\"\r\narcade_gg_nbaactp19 = \"gg_nbaact\"\r\narcade_gg_nbaactp20 = \"gg_nbaact\"\r\narcade_gg_nbaactp21 = \"gg_nbaact\"\r\narcade_gg_nbaactp22 = \"gg_nbaact\"\r\narcade_gg_nbaactp23 = \"gg_nbaact\"\r\narcade_gg_nbaactp24 = \"gg_nbaact\"\r\narcade_gg_nbaactp25 = \"gg_nbaact\"\r\narcade_gg_nbaactp26 = \"gg_nbaact\"\r\narcade_gg_nbaactp27 = \"gg_nbaact\"\r\narcade_gg_nbaactp28 = \"gg_nbaact\"\r\narcade_gg_nbaactp29 = \"gg_nbaact\"\r\narcade_gg_nbaactp30 = \"gg_nbaact\"\r\narcade_gg_nbajam = \"gg_nbajam\"\r\narcade_gg_nbajam1 = \"gg_nbajam\"\r\narcade_gg_nbajamj = \"gg_nbajam\"\r\narcade_gg_nbajamte = \"gg_nbajamte\"\r\narcade_gg_nekodais = \"gg_nekodais\"\r\narcade_gg_nfl95 = \"gg_nfl95\"\r\narcade_gg_nfl95p01 = \"gg_nfl95\"\r\narcade_gg_nfl95p02 = \"gg_nfl95\"\r\narcade_gg_nfl95p03 = \"gg_nfl95\"\r\narcade_gg_nfl95p04 = \"gg_nfl95\"\r\narcade_gg_nfl95p05 = \"gg_nfl95\"\r\narcade_gg_nfl95p06 = \"gg_nfl95\"\r\narcade_gg_nfl95p07 = \"gg_nfl95\"\r\narcade_gg_nfl95p08 = \"gg_nfl95\"\r\narcade_gg_nfl95p09 = \"gg_nfl95\"\r\narcade_gg_nfl95p10 = \"gg_nfl95\"\r\narcade_gg_nfl95p11 = \"gg_nfl95\"\r\narcade_gg_nfl95p12 = \"gg_nfl95\"\r\narcade_gg_nfl95p13 = \"gg_nfl95\"\r\narcade_gg_nflqb = \"gg_nflqb\"\r\narcade_gg_nflqb96 = \"gg_nflqb96\"\r\narcade_gg_ngaiden = \"gg_ngaiden\"\r\narcade_gg_ngaidenj = \"gg_ngaiden\"\r\narcade_gg_nhl = \"gg_nhl\"\r\narcade_gg_nhlas = \"gg_nhlas\"\r\narcade_gg_nhlasp01 = \"gg_nhlas\"\r\narcade_gg_nhlasp02 = \"gg_nhlas\"\r\narcade_gg_nhlasp03 = \"gg_nhlas\"\r\narcade_gg_nhlasp04 = \"gg_nhlas\"\r\narcade_gg_nhlasp05 = \"gg_nhlas\"\r\narcade_gg_nhlasp06 = \"gg_nhlas\"\r\narcade_gg_nhlasp07 = \"gg_nhlas\"\r\narcade_gg_nhlasp08 = \"gg_nhlas\"\r\narcade_gg_nhlasp09 = \"gg_nhlas\"\r\narcade_gg_nhlasp10 = \"gg_nhlas\"\r\narcade_gg_nhlasp11 = \"gg_nhlas\"\r\narcade_gg_nhlasp12 = \"gg_nhlas\"\r\narcade_gg_nhlasp13 = \"gg_nhlas\"\r\narcade_gg_nhlasp14 = \"gg_nhlas\"\r\narcade_gg_nhlasp15 = \"gg_nhlas\"\r\narcade_gg_nhlasp16 = \"gg_nhlas\"\r\narcade_gg_nhlasp17 = \"gg_nhlas\"\r\narcade_gg_ninku = \"gg_ninku\"\r\narcade_gg_ninku2 = \"gg_ninku2\"\r\narcade_gg_ninkug = \"gg_ninkug\"\r\narcade_gg_nomowsb = \"gg_nomowsb\"\r\narcade_gg_olympgld = \"gg_olympgld\"\r\narcade_gg_olympglda = \"gg_olympgld\"\r\narcade_gg_ottifant = \"gg_ottifant\"\r\narcade_gg_outrneur = \"gg_outrneur\"\r\narcade_gg_outrneuru = \"gg_outrneur\"\r\narcade_gg_outrun = \"gg_outrun\"\r\narcade_gg_outrunj = \"gg_outrun\"\r\narcade_gg_pacattak = \"gg_pacattak\"\r\narcade_gg_pacintim = \"gg_pacintim\"\r\narcade_gg_pacman = \"gg_pacman\"\r\narcade_gg_pacmanj = \"gg_pacman\"\r\narcade_gg_panzer = \"gg_panzer\"\r\narcade_gg_paperbo2 = \"gg_paperbo2\"\r\narcade_gg_paperboy = \"gg_paperboy\"\r\narcade_gg_pbdreams = \"gg_pbdreams\"\r\narcade_gg_pbobble = \"gg_bam\"\r\narcade_gg_pdrive = \"gg_pdrive\"\r\narcade_gg_pengo = \"gg_pengo\"\r\narcade_gg_pengoj = \"gg_pengo\"\r\narcade_gg_pga96 = \"gg_pga96\"\r\narcade_gg_pgatour = \"gg_pgatour\"\r\narcade_gg_pgatour2 = \"gg_pgatour2\"\r\narcade_gg_pgatourt = \"gg_pgatourt\"\r\narcade_gg_phantom = \"gg_phantom\"\r\narcade_gg_pocketj = \"gg_pocketj\"\r\narcade_gg_pokerfbj = \"gg_pokerfbj\"\r\narcade_gg_pokerfg = \"gg_pokerfg\"\r\narcade_gg_pokerfp = \"gg_pokerfp\"\r\narcade_gg_pokerfs = \"gg_pokerfs\"\r\narcade_gg_popbreak = \"gg_popbreak\"\r\narcade_gg_popeye = \"gg_popeye\"\r\narcade_gg_ppersia = \"gg_ppersia\"\r\narcade_gg_ppersiau = \"gg_ppersia\"\r\narcade_gg_predatr2 = \"gg_predatr2\"\r\narcade_gg_primal = \"gg_primal\"\r\narcade_gg_proyak91 = \"gg_proyak91\"\r\narcade_gg_proyak94 = \"gg_proyak94\"\r\narcade_gg_proyakgg = \"gg_proyakgg\"\r\narcade_gg_proyaktl = \"gg_proyaktl\"\r\narcade_gg_pstaradv = \"gg_pstaradv\"\r\narcade_gg_pstargdn = \"gg_pstargdn\"\r\narcade_gg_pstargdne = \"gg_pstargdn\"\r\narcade_gg_pstrike2 = \"gg_pstrike2\"\r\narcade_gg_psychicw = \"gg_psychicw\"\r\narcade_gg_psychicwj = \"gg_psychicw\"\r\narcade_gg_puttputt = \"gg_puttputt\"\r\narcade_gg_puttputtj = \"gg_puttputt\"\r\narcade_gg_puyopuy2 = \"gg_puyopuy2\"\r\narcade_gg_puyopuyo = \"gg_puyopuyo\"\r\narcade_gg_quizgear = \"gg_quizgear\"\r\narcade_gg_rastan = \"gg_rastan\"\r\narcade_gg_rayeart2 = \"gg_rayeart2\"\r\narcade_gg_rayearth = \"gg_rayearth\"\r\narcade_gg_rbibb94 = \"gg_rbibb94\"\r\narcade_gg_rcgp = \"gg_rcgp\"\r\narcade_gg_revenged = \"gg_wboy\"\r\narcade_gg_riddick = \"gg_riddick\"\r\narcade_gg_riddickj = \"gg_riddick\"\r\narcade_gg_riserobo = \"gg_riserobo\"\r\narcade_gg_ristar = \"gg_ristar\"\r\narcade_gg_ristarp1 = \"gg_ristar\"\r\narcade_gg_ristarp2 = \"gg_ristar\"\r\narcade_gg_ristarp3 = \"gg_ristar\"\r\narcade_gg_ristarp4 = \"gg_ristar\"\r\narcade_gg_ristarp5 = \"gg_ristar\"\r\narcade_gg_roadrash = \"gg_roadrash\"\r\narcade_gg_roadrashu = \"gg_roadrash\"\r\narcade_gg_robocod = \"gg_robocod\"\r\narcade_gg_robocodu = \"gg_robocod\"\r\narcade_gg_robocop3 = \"gg_robocop3\"\r\narcade_gg_roboterm = \"gg_roboterm\"\r\narcade_gg_royalstn = \"gg_royalstn\"\r\narcade_gg_royalstne = \"gg_royalstn\"\r\narcade_gg_ryukyu = \"gg_solitarp\"\r\narcade_gg_sailorms = \"gg_sailorms\"\r\narcade_gg_sainttal = \"gg_sainttal\"\r\narcade_gg_sampras = \"gg_sampras\"\r\narcade_gg_samsho = \"gg_samsho\"\r\narcade_gg_samspir = \"gg_samsho\"\r\narcade_gg_sbtank = \"gg_sbtank\"\r\narcade_gg_scratchg = \"gg_scratchg\"\r\narcade_gg_scratchgj = \"gg_scratchg\"\r\narcade_gg_sdgundam = \"gg_sdgundam\"\r\narcade_gg_sega4in1 = \"gg_sega4in1\"\r\narcade_gg_sega4in1p = \"gg_sega4in1\"\r\narcade_gg_sensible = \"gg_sensible\"\r\narcade_gg_shadam = \"gg_defoasis\"\r\narcade_gg_shangh2 = \"gg_shangh2\"\r\narcade_gg_shangh2a = \"gg_shangh2\"\r\narcade_gg_shaqfu = \"gg_shaqfu\"\r\narcade_gg_sharrier = \"gg_sharrier\"\r\narcade_gg_shavnyak = \"gg_shavnyak\"\r\narcade_gg_shero = \"gg_shero\"\r\narcade_gg_sheroa = \"gg_shero\"\r\narcade_gg_shikinjo = \"gg_shikinjo\"\r\narcade_gg_shinfrc2 = \"gg_shinfrc2\"\r\narcade_gg_shinfrc2p1 = \"gg_shinfrc2\"\r\narcade_gg_shinfrc2p2 = \"gg_shinfrc2\"\r\narcade_gg_shinfrc2p3 = \"gg_shinfrc2\"\r\narcade_gg_shinfrc2p4 = \"gg_shinfrc2\"\r\narcade_gg_shinfrcg = \"gg_shinfrcg\"\r\narcade_gg_shinfrg2 = \"gg_shinfrc2\"\r\narcade_gg_shinfrgf = \"gg_shinfrgf\"\r\narcade_gg_shinfrgfe = \"gg_shinfrgf\"\r\narcade_gg_shinobi = \"gg_shinobi\"\r\narcade_gg_shinobi2 = \"gg_shinobi2\"\r\narcade_gg_shinobij = \"gg_shinobi\"\r\narcade_gg_sidepock = \"gg_sidepock\"\r\narcade_gg_skickoff = \"gg_skickoff\"\r\narcade_gg_skweek = \"gg_slider\"\r\narcade_gg_slamdunk = \"gg_slamdunk\"\r\narcade_gg_slider = \"gg_slider\"\r\narcade_gg_smashtv = \"gg_smashtv\"\r\narcade_gg_smgp = \"gg_smgp\"\r\narcade_gg_smgp2 = \"gg_smgp2\"\r\narcade_gg_smgp2j = \"gg_smgp2\"\r\narcade_gg_smgp2p = \"gg_smgp2\"\r\narcade_gg_smgpj = \"gg_smgp\"\r\narcade_gg_smomo3 = \"gg_smomo3\"\r\narcade_gg_smurfs = \"gg_smurfs\"\r\narcade_gg_smurfs2 = \"gg_smurfs2\"\r\narcade_gg_sokoban = \"gg_sokoban\"\r\narcade_gg_solitair = \"gg_solitair\"\r\narcade_gg_solitarp = \"gg_solitarp\"\r\narcade_gg_sonic = \"gg_sonic\"\r\narcade_gg_sonic2 = \"gg_sonic2\"\r\narcade_gg_sonic2d = \"gg_sonic2\"\r\narcade_gg_sonicbls = \"gg_sonicbls\"\r\narcade_gg_sonicblsp1 = \"gg_sonicbls\"\r\narcade_gg_sonicblsp2 = \"gg_sonicbls\"\r\narcade_gg_sonicblsp3 = \"gg_sonicbls\"\r\narcade_gg_sonicblsp4 = \"gg_sonicbls\"\r\narcade_gg_sonicblsp5 = \"gg_sonicbls\"\r\narcade_gg_sonicblsp6 = \"gg_sonicbls\"\r\narcade_gg_sonicc = \"gg_sonicc\"\r\narcade_gg_sonicdr = \"gg_sonicdr\"\r\narcade_gg_sonicdr2 = \"gg_sonicdr2\"\r\narcade_gg_sonicdrs = \"gg_sonicdr\"\r\narcade_gg_sonicj = \"gg_sonic\"\r\narcade_gg_soniclab = \"gg_soniclab\"\r\narcade_gg_sonicp = \"gg_sonic\"\r\narcade_gg_sonictl2 = \"gg_sonictri\"\r\narcade_gg_sonictls = \"gg_sonicc\"\r\narcade_gg_sonictlss = \"gg_sonicc\"\r\narcade_gg_sonictri = \"gg_sonictri\"\r\narcade_gg_sonictrip = \"gg_sonictri\"\r\narcade_gg_sor = \"gg_sor\"\r\narcade_gg_sor2 = \"gg_sor2\"\r\narcade_gg_spidermn = \"gg_spidermn\"\r\narcade_gg_spidking = \"gg_spidking\"\r\narcade_gg_spidxmen = \"gg_spidxmen\"\r\narcade_gg_spirou = \"gg_spirou\"\r\narcade_gg_sportill = \"gg_sportill\"\r\narcade_gg_sporttrv = \"gg_sporttrv\"\r\narcade_gg_sporttrvp01 = \"gg_sprtrvce\"\r\narcade_gg_sporttrvp02 = \"gg_sprtrvce\"\r\narcade_gg_sporttrvp03 = \"gg_sprtrvce\"\r\narcade_gg_sporttrvp04 = \"gg_sprtrvce\"\r\narcade_gg_sporttrvp05 = \"gg_sporttrv\"\r\narcade_gg_sporttrvp06 = \"gg_sporttrv\"\r\narcade_gg_sporttrvp07 = \"gg_sporttrv\"\r\narcade_gg_sporttrvp08 = \"gg_sporttrv\"\r\narcade_gg_sporttrvp09 = \"gg_sporttrv\"\r\narcade_gg_sporttrvp10 = \"gg_sporttrv\"\r\narcade_gg_sporttrvp11 = \"gg_sporttrv\"\r\narcade_gg_sporttrvp12 = \"gg_sporttrv\"\r\narcade_gg_sprtrvce = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep01 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep02 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep03 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep04 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep05 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep06 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep07 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep08 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep09 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep10 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep11 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep12 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep13 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep14 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep15 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep16 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep17 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep18 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep19 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep20 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep21 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep22 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep23 = \"gg_sprtrvce\"\r\narcade_gg_sprtrvcep24 = \"gg_sprtrvce\"\r\narcade_gg_ssinv = \"gg_ssinv\"\r\narcade_gg_sslucifr = \"gg_sslucifr\"\r\narcade_gg_sspin = \"gg_sspin\"\r\narcade_gg_sspinp01 = \"gg_sspin\"\r\narcade_gg_sspinp02 = \"gg_sspin\"\r\narcade_gg_sspinp03 = \"gg_sspin\"\r\narcade_gg_sspinp04 = \"gg_sspin\"\r\narcade_gg_sspinp05 = \"gg_sspin\"\r\narcade_gg_sspinp06 = \"gg_sspin\"\r\narcade_gg_sspinp07 = \"gg_sspin\"\r\narcade_gg_sspinp08 = \"gg_sspin\"\r\narcade_gg_sspinp09 = \"gg_sspin\"\r\narcade_gg_sspinp10 = \"gg_sspin\"\r\narcade_gg_sspinp11 = \"gg_sspin\"\r\narcade_gg_sspinp12 = \"gg_sspin\"\r\narcade_gg_sspinp13 = \"gg_sspin\"\r\narcade_gg_sspinp14 = \"gg_sspin\"\r\narcade_gg_sspinp15 = \"gg_sspin\"\r\narcade_gg_sspinp16 = \"gg_sspin\"\r\narcade_gg_sspinp17 = \"gg_sspin\"\r\narcade_gg_sspinp18 = \"gg_sspin\"\r\narcade_gg_sspinp19 = \"gg_sspin\"\r\narcade_gg_sspinp20 = \"gg_sspin\"\r\narcade_gg_stargate = \"gg_stargate\"\r\narcade_gg_starwars = \"gg_starwars\"\r\narcade_gg_starwarsu = \"gg_starwars\"\r\narcade_gg_stetris = \"gg_stetris\"\r\narcade_gg_stgbeyn = \"gg_stgbeyn\"\r\narcade_gg_stng = \"gg_stng\"\r\narcade_gg_striderr = \"gg_striderr\"\r\narcade_gg_striker = \"gg_striker\"\r\narcade_gg_supercol = \"gg_supercol\"\r\narcade_gg_supercolj = \"gg_supercol\"\r\narcade_gg_supercolp1 = \"gg_supercol\"\r\narcade_gg_supercolp2 = \"gg_supercol\"\r\narcade_gg_supercolp3 = \"gg_supercol\"\r\narcade_gg_supercolp4 = \"gg_supercol\"\r\narcade_gg_supercolp5 = \"gg_supercol\"\r\narcade_gg_supercolp6 = \"gg_supercol\"\r\narcade_gg_supercolp7 = \"gg_supercol\"\r\narcade_gg_superman = \"gg_superman\"\r\narcade_gg_supermanp = \"gg_superman\"\r\narcade_gg_superoff = \"gg_superoff\"\r\narcade_gg_supgolf = \"gg_supgolf\"\r\narcade_gg_supgolfj = \"gg_supgolf\"\r\narcade_gg_suprjedi = \"gg_suprjedi\"\r\narcade_gg_surfninj = \"gg_surfninj\"\r\narcade_gg_sylvan = \"gg_sylvan\"\r\narcade_gg_sylvane = \"gg_sylvan\"\r\narcade_gg_t2ag = \"gg_t2ag\"\r\narcade_gg_t2agj = \"gg_t2ag\"\r\narcade_gg_tailsadv = \"gg_tailsadv\"\r\narcade_gg_tailskyp = \"gg_tailskyp\"\r\narcade_gg_taisnmj = \"gg_taisnmj\"\r\narcade_gg_taisnmj2 = \"gg_taisnmj2\"\r\narcade_gg_talespin = \"gg_talespin\"\r\narcade_gg_tamalymp = \"gg_tamalymp\"\r\narcade_gg_tantr = \"gg_tantr\"\r\narcade_gg_tarot = \"gg_tarot\"\r\narcade_gg_tarzan = \"gg_tarzan\"\r\narcade_gg_tazmania = \"gg_tazmania\"\r\narcade_gg_tazmars = \"gg_tazmars\"\r\narcade_gg_tazmarsp01 = \"gg_tazmars\"\r\narcade_gg_tazmarsp02 = \"gg_tazmars\"\r\narcade_gg_tazmarsp03 = \"gg_tazmars\"\r\narcade_gg_tazmarsp04 = \"gg_tazmars\"\r\narcade_gg_tazmarsp05 = \"gg_tazmars\"\r\narcade_gg_tazmarsp06 = \"gg_tazmars\"\r\narcade_gg_tazmarsp07 = \"gg_tazmars\"\r\narcade_gg_tazmarsp08 = \"gg_tazmars\"\r\narcade_gg_tazmarsp09 = \"gg_tazmars\"\r\narcade_gg_tazmarsp10 = \"gg_tazmars\"\r\narcade_gg_tazmarsp11 = \"gg_tazmars\"\r\narcade_gg_tazmarsp12 = \"gg_tazmars\"\r\narcade_gg_tazmarsp13 = \"gg_tazmars\"\r\narcade_gg_tazmarsp14 = \"gg_tazmars\"\r\narcade_gg_tempojr = \"gg_tempojr\"\r\narcade_gg_tempojrp1 = \"gg_tempojr\"\r\narcade_gg_tempojrp2 = \"gg_tempojr\"\r\narcade_gg_tempojrp3 = \"gg_tempojr\"\r\narcade_gg_tempojrp4 = \"gg_tempojr\"\r\narcade_gg_tempojrp5 = \"gg_tempojr\"\r\narcade_gg_tempojrp6 = \"gg_tempojr\"\r\narcade_gg_tempojrp7 = \"gg_tempojr\"\r\narcade_gg_tempojrp8 = \"gg_tempojr\"\r\narcade_gg_tempojrp9 = \"gg_tempojr\"\r\narcade_gg_tengenwc = \"gg_tengenwc\"\r\narcade_gg_term2 = \"gg_term2\"\r\narcade_gg_termntr = \"gg_termntr\"\r\narcade_gg_tesserae = \"gg_tesserae\"\r\narcade_gg_tintin = \"gg_tintin\"\r\narcade_gg_tomjermv = \"gg_tomjermv\"\r\narcade_gg_tomjermvj = \"gg_tomjermv\"\r\narcade_gg_torarete = \"gg_torarete\"\r\narcade_gg_truelies = \"gg_truelies\"\r\narcade_gg_ultsoccr = \"gg_ultsoccr\"\r\narcade_gg_ustrike = \"gg_ustrike\"\r\narcade_gg_vampire = \"gg_mastdark\"\r\narcade_gg_vfa = \"gg_vfa\"\r\narcade_gg_vfmini = \"gg_vfa\"\r\narcade_gg_vrtroop = \"gg_vrtroop\"\r\narcade_gg_wagyan = \"gg_wagyan\"\r\narcade_gg_wagyana = \"gg_wagyan\"\r\narcade_gg_wakevamp = \"gg_mastdark\"\r\narcade_gg_wboy = \"gg_wboy\"\r\narcade_gg_wboydtrp = \"gg_wboydtrp\"\r\narcade_gg_wboydtrpp = \"gg_wboydtrp\"\r\narcade_gg_wboyj = \"gg_wboy\"\r\narcade_gg_wclead = \"gg_wclead\"\r\narcade_gg_wcup94 = \"gg_wcup94\"\r\narcade_gg_wderby = \"gg_wderby\"\r\narcade_gg_wheelof = \"gg_wheelof\"\r\narcade_gg_wildsnake = \"gg_wildsnake\"\r\narcade_gg_wimbled = \"gg_wimbled\"\r\narcade_gg_wintol = \"gg_wintol\"\r\narcade_gg_wintolj = \"gg_wintol\"\r\narcade_gg_wizard = \"gg_wizard\"\r\narcade_gg_wolfchld = \"gg_wolfchld\"\r\narcade_gg_woodypop = \"gg_woodypop\"\r\narcade_gg_woodypop1 = \"gg_woodypop\"\r\narcade_gg_wwfraw = \"gg_wwfraw\"\r\narcade_gg_wwfsteel = \"gg_wwfsteel\"\r\narcade_gg_xmen = \"gg_xmen\"\r\narcade_gg_xmengl = \"gg_xmengl\"\r\narcade_gg_xmenglp1 = \"gg_xmengl\"\r\narcade_gg_xmenglp2 = \"gg_xmengl\"\r\narcade_gg_xmenglp3 = \"gg_xmengl\"\r\narcade_gg_xmenmojo = \"gg_xmenmojo\"\r\narcade_gg_xmenmojop1 = \"gg_xmenmojo\"\r\narcade_gg_xmenmojop2 = \"gg_xmenmojo\"\r\narcade_gg_xmenmojop3 = \"gg_xmenmojo\"\r\narcade_gg_xmenmojop4 = \"gg_xmenmojo\"\r\narcade_gg_xmenmojop5 = \"gg_xmenmojo\"\r\narcade_gg_xmenmojop6 = \"gg_xmenmojo\"\r\narcade_gg_xmenmojop7 = \"gg_xmenmojo\"\r\narcade_gg_yaiba = \"gg_yaiba\"\r\narcade_gg_yogibear = \"gg_yogibear\"\r\narcade_gg_yuyu = \"gg_yuyu\"\r\narcade_gg_yuyu2 = \"gg_yuyu2\"\r\narcade_gg_zangear = \"gg_zangear\"\r\narcade_gg_zenki = \"gg_zenki\"\r\narcade_gg_zool = \"gg_zool\"\r\narcade_gg_zoolj = \"gg_zool\"\r\narcade_gg_zoolu = \"gg_zool\"\r\narcade_gg_zoop = \"gg_zoop\"\r\narcade_gg_zoopp = \"gg_zoop\"\r\narcade_gghost = \"gghost\"\r\narcade_ggreats2 = \"opengolf\"\r\narcade_gground = \"gground\"\r\narcade_ghostb = \"ghostb\"\r\narcade_ghostb2a = \"ghostb\"\r\narcade_ghostb3 = \"ghostb\"\r\narcade_ghostb3a = \"ghostb\"\r\narcade_ghostbi = \"ghostbi\"\r\narcade_ghostlop = \"ghostlop\"\r\narcade_ghostmun = \"puckman\"\r\narcade_ghouls = \"ghouls\"\r\narcade_ghoulsu = \"ghouls\"\r\narcade_ghox = \"ghox\"\r\narcade_ghoxj = \"ghox\"\r\narcade_ghunter = \"deadang\"\r\narcade_gigaman2 = \"megaman2\"\r\narcade_gigandes = \"gigandes\"\r\narcade_gigandesa = \"gigandes\"\r\narcade_gigas = \"gigas\"\r\narcade_gigasb = \"gigas\"\r\narcade_gigasm2 = \"gigasm2\"\r\narcade_gigasm2b = \"gigasm2\"\r\narcade_gigawing = \"gigawing\"\r\narcade_gigawinga = \"gigawing\"\r\narcade_gigawingb = \"gigawing\"\r\narcade_gigawingd = \"gigawing\"\r\narcade_gigawingh = \"gigawing\"\r\narcade_gigawingj = \"gigawing\"\r\narcade_gigawingjd = \"gigawing\"\r\narcade_gijoe = \"gijoe\"\r\narcade_gijoea = \"gijoe\"\r\narcade_gijoeea = \"gijoe\"\r\narcade_gijoej = \"gijoe\"\r\narcade_gijoeu = \"gijoe\"\r\narcade_gimeabrk = \"gimeabrk\"\r\narcade_ginganin = \"ginganin\"\r\narcade_ginganina = \"ginganin\"\r\narcade_ginkun = \"ginkun\"\r\narcade_gionbana = \"gionbana\"\r\narcade_gladiatr = \"gladiatr\"\r\narcade_glass = \"glass\"\r\narcade_glass10 = \"glass\"\r\narcade_glass10a = \"glass\"\r\narcade_glasskr = \"glass\"\r\narcade_glfgreat = \"glfgreat\"\r\narcade_glfgretj = \"glfgreat\"\r\narcade_gloc = \"gloc\"\r\narcade_glocr360 = \"gloc\"\r\narcade_glocu = \"gloc\"\r\narcade_glprac2j = \"glpracr2\"\r\narcade_glprac2l = \"glpracr2\"\r\narcade_glpracr = \"glpracr\"\r\narcade_glpracr2 = \"glpracr2\"\r\narcade_gmahou = \"dimahoo\"\r\narcade_gmgalax = \"gmgalax\"\r\narcade_gmissile = \"gmissile\"\r\narcade_gnbarich = \"gnbarich\"\r\narcade_gng = \"gng\"\r\narcade_gnga = \"gng\"\r\narcade_gngbl = \"gng\"\r\narcade_gngbla = \"gng\"\r\narcade_gngblita = \"gng\"\r\narcade_gngc = \"gng\"\r\narcade_gngprot = \"gng\"\r\narcade_gngt = \"gng\"\r\narcade_goal92 = \"cupsoc\"\r\narcade_goalx3 = \"goalx3\"\r\narcade_godzilla = \"godzilla\"\r\narcade_gogold = \"recordbr\"\r\narcade_gogomile = \"gogomile\"\r\narcade_gogomileo = \"gogomile\"\r\narcade_gogomilj = \"gogomile\"\r\narcade_goindol = \"goindol\"\r\narcade_goindolj = \"goindol\"\r\narcade_goindolu = \"goindol\"\r\narcade_gokuparo = \"gokuparo\"\r\narcade_goldbug = \"goldbug\"\r\narcade_goldmedb = \"goldmedl\"\r\narcade_goldmedl = \"goldmedl\"\r\narcade_goldmedla = \"goldmedl\"\r\narcade_goldmedlb = \"goldmedl\"\r\narcade_goldnabl = \"goldnaxe\"\r\narcade_goldnaxa = \"goldnaxe\"\r\narcade_goldnaxb = \"goldnaxe\"\r\narcade_goldnaxc = \"goldnaxe\"\r\narcade_goldnaxe = \"goldnaxe\"\r\narcade_goldnaxe1 = \"goldnaxe\"\r\narcade_goldnaxe1d = \"goldnaxe\"\r\narcade_goldnaxe2 = \"goldnaxe\"\r\narcade_goldnaxe3 = \"goldnaxe\"\r\narcade_goldnaxe3d = \"goldnaxe\"\r\narcade_goldnaxej = \"goldnaxe\"\r\narcade_goldnaxejd = \"goldnaxe\"\r\narcade_goldnaxeu = \"goldnaxe\"\r\narcade_goldnaxeud = \"goldnaxe\"\r\narcade_goldnaxj = \"goldnaxe\"\r\narcade_golgo13 = \"golgo13\"\r\narcade_gollygho = \"gollygho\"\r\narcade_gomoku = \"gomoku\"\r\narcade_gondo = \"gondo\"\r\narcade_goonies = \"goonies\"\r\narcade_gorf = \"gorf\"\r\narcade_gorfpgm1 = \"gorf\"\r\narcade_gorkans = \"mrtnt\"\r\narcade_gotcha = \"gotcha\"\r\narcade_gotya = \"thehand\"\r\narcade_gowcaizr = \"gowcaizr\"\r\narcade_gpilots = \"gpilots\"\r\narcade_gpilotsh = \"gpilots\"\r\narcade_gprider = \"gprider\"\r\narcade_gpriderj = \"gprider\"\r\narcade_gpriderjs = \"gprider\"\r\narcade_gpriders = \"gprider\"\r\narcade_gprideru = \"gprider\"\r\narcade_gpriderus = \"gprider\"\r\narcade_gradius = \"nemesis\"\r\narcade_gradius2 = \"vulcan\"\r\narcade_gradius2a = \"vulcan\"\r\narcade_gradius2b = \"vulcan\"\r\narcade_gradius3 = \"gradius3\"\r\narcade_gradius3a = \"gradius3\"\r\narcade_gradius3j = \"gradius3\"\r\narcade_gradius3js = \"gradius3\"\r\narcade_grasspin = \"grasspin\"\r\narcade_gratia = \"gratia\"\r\narcade_gratiaa = \"gratia\"\r\narcade_gravitar = \"gravitar\"\r\narcade_gravitr2 = \"gravitar\"\r\narcade_gravp = \"gravitar\"\r\narcade_grchamp = \"grchamp\"\r\narcade_grdforce = \"grdforce\"\r\narcade_grdian = \"grdian\"\r\narcade_grdians = \"grdians\"\r\narcade_grdius2a = \"vulcan\"\r\narcade_grdius2b = \"vulcan\"\r\narcade_grdius3a = \"gradius3\"\r\narcade_grdius3e = \"gradius3\"\r\narcade_grdnstrm = \"grdnstrm\"\r\narcade_grdnstrmg = \"grdnstrm\"\r\narcade_grdnstrmj = \"grdnstrm\"\r\narcade_grdnstrmk = \"grdnstrm\"\r\narcade_grdnstrmv = \"grdnstrm\"\r\narcade_greatgun = \"greatgun\"\r\narcade_greenber = \"greenber\"\r\narcade_grescue = \"lrescue\"\r\narcade_gridiron = \"gridiron\"\r\narcade_gridlee = \"gridlee\"\r\narcade_griffon = \"phoenix\"\r\narcade_grindsta = \"vfive\"\r\narcade_grindstm = \"grindstm\"\r\narcade_grindstma = \"grindstm\"\r\narcade_grndtour = \"grndtour\"\r\narcade_grobda = \"grobda\"\r\narcade_grobda2 = \"grobda\"\r\narcade_grobda3 = \"grobda\"\r\narcade_groovef = \"groovef\"\r\narcade_groundfx = \"groundfx\"\r\narcade_growl = \"growl\"\r\narcade_growla = \"growl\"\r\narcade_growlu = \"growl\"\r\narcade_grtwall = \"grtwall\"\r\narcade_grudge = \"grudge\"\r\narcade_gryzor = \"contra\"\r\narcade_gryzor1 = \"contra\"\r\narcade_gseeker = \"gseeker\"\r\narcade_gseekerj = \"gseeker\"\r\narcade_gseekeru = \"gseeker\"\r\narcade_gslgr94u = \"gslgr94u\"\r\narcade_gstrik2 = \"gstrik2\"\r\narcade_gstrik2j = \"gstrik2\"\r\narcade_gstriker = \"gstriker\"\r\narcade_gsword = \"gsword\"\r\narcade_gteikob2 = \"uniwars\"\r\narcade_gteikokb = \"uniwars\"\r\narcade_gteikoku = \"uniwars\"\r\narcade_gteikokub = \"uniwars\"\r\narcade_gteikokub2 = \"uniwars\"\r\narcade_gtg = \"gtg\"\r\narcade_gtg2 = \"gtg2\"\r\narcade_gtg2j = \"gtg2\"\r\narcade_gtg2t = \"gtg2\"\r\narcade_gtmr = \"gtmr\"\r\narcade_gtmr2 = \"gtmr2\"\r\narcade_gtmr2a = \"gtmr2\"\r\narcade_gtmr2u = \"gtmr2\"\r\narcade_gtmra = \"gtmr\"\r\narcade_gtmrb = \"gtmr\"\r\narcade_gtmre = \"gtmr\"\r\narcade_gtmro = \"gtmr\"\r\narcade_gtmrusa = \"gtmr\"\r\narcade_guardian = \"guardian\"\r\narcade_guiness = \"strnskil\"\r\narcade_gulfstr2 = \"gulfstrm\"\r\narcade_gulfstrm = \"gulfstrm\"\r\narcade_gulfstrma = \"gulfstrm\"\r\narcade_gulfstrmb = \"gulfstrm\"\r\narcade_gulfstrmk = \"gulfstrm\"\r\narcade_gulfstrmm = \"gulfstrm\"\r\narcade_gulfwar2 = \"gulfwar2\"\r\narcade_gulfwar2a = \"gulfwar2\"\r\narcade_gumbo = \"gumbo\"\r\narcade_gunball = \"nitrobal\"\r\narcade_gunbird = \"gunbird\"\r\narcade_gunbird2 = \"gunbird2\"\r\narcade_gunbird2a = \"gunbird2\"\r\narcade_gunbirdj = \"gunbird\"\r\narcade_gunbirdk = \"gunbird\"\r\narcade_gunbulet = \"ptblank\"\r\narcade_gunbustr = \"gunbustr\"\r\narcade_gundamex = \"gundamex\"\r\narcade_gundeala = \"gundealr\"\r\narcade_gundealr = \"gundealr\"\r\narcade_gundealt = \"gundealr\"\r\narcade_gundhara = \"gundhara\"\r\narcade_gundharac = \"gundhara\"\r\narcade_gundl94 = \"gundl94\"\r\narcade_gunfight = \"gunfight\"\r\narcade_gunforc2 = \"gunforc2\"\r\narcade_gunforce = \"gunforce\"\r\narcade_gunforcej = \"gunforce\"\r\narcade_gunforceu = \"gunforce\"\r\narcade_gunforcj = \"gunforce\"\r\narcade_gunforcu = \"gunforce\"\r\narcade_gunfronj = \"gunfront\"\r\narcade_gunfront = \"gunfront\"\r\narcade_gunfrontj = \"gunfront\"\r\narcade_gunhohki = \"mysticri\"\r\narcade_gunlock = \"gunlock\"\r\narcade_gunmast = \"gunmast\"\r\narcade_gunnail = \"gunnail\"\r\narcade_gunsmoka = \"gunsmoke\"\r\narcade_gunsmoke = \"gunsmoke\"\r\narcade_gunsmokeb = \"gunsmoke\"\r\narcade_gunsmokej = \"gunsmoke\"\r\narcade_gunsmokeu = \"gunsmoke\"\r\narcade_gunsmokeua = \"gunsmoke\"\r\narcade_gunsmokeub = \"gunsmoke\"\r\narcade_gunsmokj = \"gunsmoke\"\r\narcade_gunsmoku = \"gunsmoke\"\r\narcade_gururin = \"gururin\"\r\narcade_gussun = \"riskchal\"\r\narcade_gutangtn = \"locomotn\"\r\narcade_gutsn = \"gutsn\"\r\narcade_guwange = \"guwange\"\r\narcade_guwanges = \"guwange\"\r\narcade_guzzler = \"guzzler\"\r\narcade_gwar = \"gwar\"\r\narcade_gwara = \"gwar\"\r\narcade_gwarb = \"gwar\"\r\narcade_gwarj = \"gwar\"\r\narcade_gwarrior = \"gwarrior\"\r\narcade_gwingj = \"gigawing\"\r\narcade_gypsyjug = \"gypsyjug\"\r\narcade_gyrodine = \"gyrodine\"\r\narcade_gyrodinet = \"gyrodine\"\r\narcade_gyruss = \"gyruss\"\r\narcade_gyrussb = \"gyruss\"\r\narcade_gyrussce = \"gyruss\"\r\narcade_hachamf = \"hachamf\"\r\narcade_hachamfb = \"hachamf\"\r\narcade_hachoo = \"hachoo\"\r\narcade_hal21 = \"hal21\"\r\narcade_hal21j = \"hal21\"\r\narcade_halfway = \"progear\"\r\narcade_halleycj = \"halleys\"\r\narcade_halleys = \"halleys\"\r\narcade_halleysc = \"halleys\"\r\narcade_hamaway = \"hamaway\"\r\narcade_hanaawas = \"hanaawas\"\r\narcade_hanagumi = \"hanagumi\"\r\narcade_hanakanz = \"hanakanz\"\r\narcade_hanamai = \"hanamai\"\r\narcade_hanamomo = \"hanamomo\"\r\narcade_hanaoji = \"hanaoji\"\r\narcade_hanaroku = \"hanaroku\"\r\narcade_hangly = \"puckman\"\r\narcade_hangly2 = \"puckman\"\r\narcade_hangly3 = \"puckman\"\r\narcade_hangon = \"hangon\"\r\narcade_hangon1 = \"hangon\"\r\narcade_hangon2 = \"hangon\"\r\narcade_hangonjr = \"hangonjr\"\r\narcade_hangzo = \"hangzo\"\r\narcade_happy6 = \"happy6\"\r\narcade_happy6101 = \"happy6\"\r\narcade_harddrb5 = \"harddriv\"\r\narcade_harddrb6 = \"harddriv\"\r\narcade_harddrc1 = \"harddriv\"\r\narcade_harddrcb = \"harddriv\"\r\narcade_harddrcg = \"harddriv\"\r\narcade_harddrg4 = \"harddriv\"\r\narcade_harddriv = \"harddriv\"\r\narcade_harddrj6 = \"harddriv\"\r\narcade_harddrv1 = \"harddriv\"\r\narcade_harddrv2 = \"harddriv\"\r\narcade_harddrv3 = \"harddriv\"\r\narcade_harddrvb = \"harddriv\"\r\narcade_harddrvc = \"harddriv\"\r\narcade_harddrvg = \"harddriv\"\r\narcade_harddrvj = \"harddriv\"\r\narcade_harddunj = \"harddunk\"\r\narcade_harddunk = \"harddunk\"\r\narcade_hardhat = \"hardhat\"\r\narcade_hardhea2 = \"hardhea2\"\r\narcade_hardhead = \"hardhead\"\r\narcade_hardhedb = \"hardhead\"\r\narcade_hardyard = \"hardyard\"\r\narcade_hardyd10 = \"hardyard\"\r\narcade_hasamu = \"hasamu\"\r\narcade_hatena = \"hatena\"\r\narcade_hatris = \"hatris\"\r\narcade_hatrisj = \"hatris\"\r\narcade_hattrick = \"hattrick\"\r\narcade_hayaosi1 = \"hayaosi1\"\r\narcade_hbarrel = \"hbarrel\"\r\narcade_hbarrelw = \"hbarrel\"\r\narcade_hcastle = \"hcastle\"\r\narcade_hcastlee = \"hcastle\"\r\narcade_hcastlej = \"hcastle\"\r\narcade_hcastlek = \"hcastle\"\r\narcade_hcastleo = \"hcastle\"\r\narcade_hcastljo = \"hcastle\"\r\narcade_hcrash = \"hcrash\"\r\narcade_hcrashc = \"hcrash\"\r\narcade_hdrivaip = \"hdrivair\"\r\narcade_hdrivair = \"hdrivair\"\r\narcade_headon = \"headon\"\r\narcade_headon1 = \"headon\"\r\narcade_headon2 = \"headon2\"\r\narcade_headon2s = \"headon2\"\r\narcade_headonb = \"headon\"\r\narcade_headonmz = \"headon\"\r\narcade_headonn = \"headon\"\r\narcade_headons = \"headon\"\r\narcade_headonsa = \"headon\"\r\narcade_heartatk = \"heartatk\"\r\narcade_heatbrl = \"heatbrl\"\r\narcade_heatbrlo = \"heatbrl\"\r\narcade_heatbrlu = \"heatbrl\"\r\narcade_heberpop = \"heberpop\"\r\narcade_hedpanic = \"hedpanic\"\r\narcade_hedpanica = \"hedpanic\"\r\narcade_hedpanicf = \"hedpanic\"\r\narcade_hedpanico = \"hedpanic\"\r\narcade_heiankyo = \"heiankyo\"\r\narcade_helifira = \"helifire\"\r\narcade_helifire = \"helifire\"\r\narcade_hellfir1 = \"hellfire\"\r\narcade_hellfire = \"hellfire\"\r\narcade_herbiedk = \"huncholy\"\r\narcade_hero = \"hero\"\r\narcade_herodk = \"hero\"\r\narcade_herodku = \"hero\"\r\narcade_heuksun = \"heuksun\"\r\narcade_hexa = \"hexa\"\r\narcade_hexion = \"hexion\"\r\narcade_hexionb = \"hexion\"\r\narcade_hexpool = \"racknrol\"\r\narcade_hexpoola = \"racknrol\"\r\narcade_hgkairak = \"hgkairak\"\r\narcade_hharry = \"hharry\"\r\narcade_hharryu = \"hharry\"\r\narcade_hidnctch = \"hidnctch\"\r\narcade_higemaru = \"higemaru\"\r\narcade_hiimpact = \"hiimpact\"\r\narcade_himesiki = \"himesiki\"\r\narcade_hipoly = \"trackfld\"\r\narcade_hippodrm = \"hippodrm\"\r\narcade_hiryuken = \"shangkid\"\r\narcade_hishouza = \"fshark\"\r\narcade_histryma = \"histryma\"\r\narcade_hitice = \"hitice\"\r\narcade_hiticej = \"hitice\"\r\narcade_hitme = \"hitme\"\r\narcade_hitnmis2 = \"hitnmiss\"\r\narcade_hitnmiss = \"hitnmiss\"\r\narcade_hmcompm2 = \"hmcompm2\"\r\narcade_hmcompmx = \"bmcompmx\"\r\narcade_hnayayoi = \"hnayayoi\"\r\narcade_hncholms = \"huncholy\"\r\narcade_hnfubuki = \"hnayayoi\"\r\narcade_hnkochou = \"hanamai\"\r\narcade_hnoridur = \"hnoridur\"\r\narcade_hoccer = \"hoccer\"\r\narcade_hoccer2 = \"hoccer\"\r\narcade_hocrash = \"headon\"\r\narcade_hogalley = \"hogalley\"\r\narcade_holeland = \"holeland\"\r\narcade_holo = \"holo\"\r\narcade_homerun = \"homerun\"\r\narcade_homo = \"goindol\"\r\narcade_honeydol = \"honeydol\"\r\narcade_hook = \"hook\"\r\narcade_hookj = \"hook\"\r\narcade_hooku = \"hook\"\r\narcade_hoops95 = \"hoops96\"\r\narcade_hoops96 = \"hoops96\"\r\narcade_hopmappy = \"hopmappy\"\r\narcade_hopprobo = \"hopprobo\"\r\narcade_horekid = \"horekid\"\r\narcade_horekidb = \"horekid\"\r\narcade_horizon = \"horizon\"\r\narcade_horshoes = \"horshoes\"\r\narcade_hotbubl = \"bubl2000\"\r\narcade_hotbubla = \"bubl2000\"\r\narcade_hotchase = \"hotchase\"\r\narcade_hotdebut = \"hotdebut\"\r\narcade_hotdogst = \"hotdogst\"\r\narcade_hotgm4ev = \"hotgm4ev\"\r\narcade_hotgmck = \"hotgmck\"\r\narcade_hotgmck3 = \"hotgmck3\"\r\narcade_hotgmcki = \"hotgmcki\"\r\narcade_hotmind = \"hotmind\"\r\narcade_hotpinbl = \"hotpinbl\"\r\narcade_hotrod = \"hotrod\"\r\narcade_hotshock = \"hotshock\"\r\narcade_hotshockb = \"hotshock\"\r\narcade_hotsmash = \"hotsmash\"\r\narcade_hourouki = \"hourouki\"\r\narcade_housemn2 = \"housemn2\"\r\narcade_housemnq = \"housemnq\"\r\narcade_hpolym84 = \"hyperspt\"\r\narcade_hpuncher = \"fround\"\r\narcade_hsf2 = \"hsf2\"\r\narcade_hsf2a = \"hsf2\"\r\narcade_hsf2d = \"hsf2\"\r\narcade_hsf2da = \"hsf2\"\r\narcade_hsf2j = \"hsf2\"\r\narcade_hsf2j1 = \"hsf2\"\r\narcade_hstenn10 = \"hstennis\"\r\narcade_hstennis = \"hstennis\"\r\narcade_htchctch = \"htchctch\"\r\narcade_hthero = \"footchmp\"\r\narcade_hthero93 = \"cupfinal\"\r\narcade_hthero93u = \"cupfinal\"\r\narcade_hthero94 = \"intcup94\"\r\narcade_hthero95 = \"pwrgoal\"\r\narcade_hthero95u = \"pwrgoal\"\r\narcade_hthro95u = \"pwrgoal\"\r\narcade_hunchbak = \"hunchbak\"\r\narcade_hunchbkd = \"hunchbak\"\r\narcade_hunchbkg = \"hunchbak\"\r\narcade_hunchbks = \"hunchbak\"\r\narcade_huncholy = \"huncholy\"\r\narcade_hustle = \"hustle\"\r\narcade_hustler = \"hustler\"\r\narcade_hustlerb = \"hustler\"\r\narcade_hvoltage = \"hvoltage\"\r\narcade_hvymetal = \"hvymetal\"\r\narcade_hvysmsh = \"hvysmsh\"\r\narcade_hvysmsha = \"hvysmsh\"\r\narcade_hvysmshj = \"hvysmsh\"\r\narcade_hvyunit = \"hvyunit\"\r\narcade_hvyunitj = \"hvyunit\"\r\narcade_hvyunitjo = \"hvyunit\"\r\narcade_hvyunitu = \"hvyunit\"\r\narcade_hwchamp = \"hwchamp\"\r\narcade_hwchampj = \"hwchamp\"\r\narcade_hwchampjd = \"hwchamp\"\r\narcade_hwrace = \"hwrace\"\r\narcade_hydra = \"hydra\"\r\narcade_hydrap = \"hydra\"\r\narcade_hydrap2 = \"hydra\"\r\narcade_hyhoo = \"hyhoo\"\r\narcade_hyhoo2 = \"hyhoo2\"\r\narcade_hyouban = \"galkoku\"\r\narcade_hyperpac = \"hyperpac\"\r\narcade_hyperpacb = \"hyperpac\"\r\narcade_hyperpcb = \"hyperpac\"\r\narcade_hyperspt = \"hyperspt\"\r\narcade_hypersptb = \"hyperspt\"\r\narcade_hyprdelj = \"hyprduel\"\r\narcade_hyprduel = \"hyprduel\"\r\narcade_hypreac2 = \"hypreac2\"\r\narcade_hypreact = \"hypreact\"\r\narcade_hyprolyb = \"trackfld\"\r\narcade_hyprolym = \"trackfld\"\r\narcade_hyprolymb = \"trackfld\"\r\narcade_hyprolymba = \"trackfld\"\r\narcade_hypsptsp = \"88games\"\r\narcade_iceclimb = \"iceclimb\"\r\narcade_iceclmbj = \"iceclimb\"\r\narcade_iceclmrj = \"iceclmrj\"\r\narcade_ichidant = \"ichidant\"\r\narcade_ichidntb = \"ichidant\"\r\narcade_ichidnte = \"ichidant\"\r\narcade_idhimitu = \"idhimitu\"\r\narcade_idolmj = \"idolmj\"\r\narcade_idsoccer = \"idsoccer\"\r\narcade_iemoto = \"iemoto\"\r\narcade_iganinju = \"kazan\"\r\narcade_igmo = \"igmo\"\r\narcade_ikari = \"ikari\"\r\narcade_ikari3 = \"ikari3\"\r\narcade_ikari3j = \"ikari3\"\r\narcade_ikari3k = \"ikari3\"\r\narcade_ikari3nr = \"ikari3\"\r\narcade_ikari3u = \"ikari3\"\r\narcade_ikaria = \"ikari\"\r\narcade_ikarijp = \"ikari\"\r\narcade_ikarijpb = \"ikari\"\r\narcade_ikarinc = \"ikari\"\r\narcade_ikariram = \"ikari\"\r\narcade_ikki = \"ikki\"\r\narcade_imago = \"imago\"\r\narcade_imagoa = \"imago\"\r\narcade_imekura = \"imekura\"\r\narcade_imgfight = \"imgfight\"\r\narcade_imgfightj = \"imgfight\"\r\narcade_imsorry = \"imsorry\"\r\narcade_imsorryj = \"imsorry\"\r\narcade_indyheat = \"indyheat\"\r\narcade_indytem2 = \"indytemp\"\r\narcade_indytem3 = \"indytemp\"\r\narcade_indytem4 = \"indytemp\"\r\narcade_indytemd = \"indytemp\"\r\narcade_indytemp = \"indytemp\"\r\narcade_inferno = \"inferno\"\r\narcade_insector = \"insector\"\r\narcade_insectx = \"insectx\"\r\narcade_insectxj = \"insectx\"\r\narcade_intcup94 = \"intcup94\"\r\narcade_inthunt = \"inthunt\"\r\narcade_inthuntu = \"inthunt\"\r\narcade_intrepi2 = \"intrepid\"\r\narcade_intrepid = \"intrepid\"\r\narcade_intrepid2 = \"intrepid\"\r\narcade_intrepidb = \"intrepid\"\r\narcade_intrepidb2 = \"intrepid\"\r\narcade_intrepidb3 = \"intrepid\"\r\narcade_introdon = \"introdon\"\r\narcade_inttoote = \"jockeyc\"\r\narcade_inttootea = \"jockeyc\"\r\narcade_inufuku = \"inufuku\"\r\narcade_invad2ct = \"invad2ct\"\r\narcade_invaddlx = \"invadpt2\"\r\narcade_invaderl = \"invaders\"\r\narcade_invaders = \"invaders\"\r\narcade_invadpt2 = \"invadpt2\"\r\narcade_invds = \"invds\"\r\narcade_invho2 = \"invho2\"\r\narcade_invinco = \"invinco\"\r\narcade_invrvnga = \"invrvnge\"\r\narcade_invrvnge = \"invrvnge\"\r\narcade_inyourfa = \"inyourfa\"\r\narcade_ipminvad = \"ipminvad\"\r\narcade_iqblock = \"iqblock\"\r\narcade_irobot = \"irobot\"\r\narcade_ironclad = \"ironclad\"\r\narcade_ironclado = \"ironclad\"\r\narcade_ironhors = \"ironhors\"\r\narcade_irrmaze = \"irrmaze\"\r\narcade_isgsm = \"isgsm\"\r\narcade_itaten = \"itaten\"\r\narcade_ixion = \"ixion\"\r\narcade_jack = \"jack\"\r\narcade_jack2 = \"jack\"\r\narcade_jack3 = \"jack\"\r\narcade_jackal = \"jackal\"\r\narcade_jackalbl = \"jackal\"\r\narcade_jackalj = \"jackal\"\r\narcade_jackalr = \"jackal\"\r\narcade_jackrab2 = \"jackrabt\"\r\narcade_jackrabs = \"jackrabt\"\r\narcade_jackrabt = \"jackrabt\"\r\narcade_jailbrek = \"jailbrek\"\r\narcade_jailbrekb = \"jailbrek\"\r\narcade_jajamaru = \"jajamaru\"\r\narcade_janjans1 = \"janjans1\"\r\narcade_janjans2 = \"janjans2\"\r\narcade_janshin = \"janshin\"\r\narcade_jchan = \"jchan\"\r\narcade_jchan2 = \"jchan2\"\r\narcade_jcross = \"jcross\"\r\narcade_jdredd = \"jdredd\"\r\narcade_jdreddb = \"jdredd\"\r\narcade_jdreddp = \"jdreddp\"\r\narcade_jedi = \"jedi\"\r\narcade_jgakuen = \"rvschool\"\r\narcade_jigkmgri = \"bonzeadv\"\r\narcade_jigkmgria = \"bonzeadv\"\r\narcade_jitsupro = \"jitsupro\"\r\narcade_jjack = \"jjack\"\r\narcade_jjparad2 = \"jjparad2\"\r\narcade_jjparads = \"jjparads\"\r\narcade_jjsquawk = \"jjsquawk\"\r\narcade_jjsquawkb = \"jjsquawk\"\r\narcade_jjsquawkb2 = \"jjsquawk\"\r\narcade_jjsquawko = \"jjsquawk\"\r\narcade_jleague = \"svf\"\r\narcade_jockeyc = \"jockeyc\"\r\narcade_jockeygp = \"jockeygp\"\r\narcade_jockeygpa = \"jockeygp\"\r\narcade_joemac = \"cninja\"\r\narcade_joemacr = \"joemacr\"\r\narcade_joemacra = \"joemacr\"\r\narcade_joemacrj = \"joemacr\"\r\narcade_jogakuen = \"jogakuen\"\r\narcade_joinem = \"joinem\"\r\narcade_jojo = \"jojo\"\r\narcade_jojoba = \"jojoba\"\r\narcade_jojoban = \"jojoba\"\r\narcade_jojobane = \"jojoba\"\r\narcade_jojobaner1 = \"jojoba\"\r\narcade_jojobanr1 = \"jojoba\"\r\narcade_jojobar1 = \"jojoba\"\r\narcade_jojoj = \"jojo\"\r\narcade_jojojr1 = \"jojo\"\r\narcade_jojojr2 = \"jojo\"\r\narcade_jojon = \"jojo\"\r\narcade_jojonr1 = \"jojo\"\r\narcade_jojonr2 = \"jojo\"\r\narcade_jojor1 = \"jojo\"\r\narcade_jojor2 = \"jojo\"\r\narcade_josvolly = \"josvolly\"\r\narcade_journey = \"journey\"\r\narcade_joust = \"joust\"\r\narcade_joust2 = \"joust2\"\r\narcade_joustr = \"joust\"\r\narcade_joustwr = \"joust\"\r\narcade_joyfulr = \"joyfulr\"\r\narcade_joyjoy = \"joyjoy\"\r\narcade_joyman = \"puckman\"\r\narcade_jpark = \"jpark\"\r\narcade_jpopnics = \"jpopnics\"\r\narcade_jrking = \"dkongjr\"\r\narcade_jrpacman = \"jrpacman\"\r\narcade_jrpacmanf = \"jrpacman\"\r\narcade_jsk = \"jsk\"\r\narcade_jspecter = \"invaders\"\r\narcade_jspectr2 = \"invaders\"\r\narcade_jt104 = \"ninjakd2\"\r\narcade_juju = \"toki\"\r\narcade_jujub = \"toki\"\r\narcade_jujuba = \"toki\"\r\narcade_jumpbug = \"jumpbug\"\r\narcade_jumpbugb = \"jumpbug\"\r\narcade_jumpcoas = \"jumpcoas\"\r\narcade_jumpcoast = \"jumpcoas\"\r\narcade_jumping = \"rbisland\"\r\narcade_jumpinga = \"rbisland\"\r\narcade_jumpingi = \"rbisland\"\r\narcade_jumpkids = \"jumpkids\"\r\narcade_jumpkun = \"jumpkun\"\r\narcade_jumppop = \"jumppop\"\r\narcade_jumppope = \"jumppop\"\r\narcade_jumpshot = \"jumpshot\"\r\narcade_jumpshotp = \"jumpshot\"\r\narcade_jungleh = \"junglek\"\r\narcade_junglek = \"junglek\"\r\narcade_jungler = \"jungler\"\r\narcade_junglers = \"jungler\"\r\narcade_junglhbr = \"junglek\"\r\narcade_junglkj2 = \"junglek\"\r\narcade_junofrst = \"junofrst\"\r\narcade_junofrstg = \"junofrst\"\r\narcade_junofstg = \"junofrst\"\r\narcade_jyangoku = \"jyangoku\"\r\narcade_jyuohki = \"altbeast\"\r\narcade_kabukikl = \"kabukikl\"\r\narcade_kabukiz = \"kabukiz\"\r\narcade_kabukizj = \"kabukiz\"\r\narcade_kageki = \"kageki\"\r\narcade_kagekih = \"kageki\"\r\narcade_kagekij = \"kageki\"\r\narcade_kagekiu = \"kageki\"\r\narcade_kaguya = \"kaguya\"\r\narcade_kaiserkj = \"kaiserkn\"\r\narcade_kaiserkn = \"kaiserkn\"\r\narcade_kaiserknj = \"kaiserkn\"\r\narcade_kaitei = \"kaitei\"\r\narcade_kaiteids = \"inthunt\"\r\narcade_kaitein = \"kaitei\"\r\narcade_kakumei = \"kakumei\"\r\narcade_kakumei2 = \"kakumei2\"\r\narcade_kamakazi3 = \"galaxian\"\r\narcade_kamenrid = \"kamenrid\"\r\narcade_kamikaze = \"astinvad\"\r\narcade_kamikcab = \"kamikcab\"\r\narcade_kanatuen = \"kanatuen\"\r\narcade_kangaroa = \"kangaroo\"\r\narcade_kangarob = \"kangaroo\"\r\narcade_kangaroo = \"kangaroo\"\r\narcade_kangarooa = \"kangaroo\"\r\narcade_kangaroob = \"kangaroo\"\r\narcade_kaos = \"kaos\"\r\narcade_karatblu = \"karatblz\"\r\narcade_karatblz = \"karatblz\"\r\narcade_karatblza = \"karatblz\"\r\narcade_karatblzj = \"karatblz\"\r\narcade_karatblzu = \"karatblz\"\r\narcade_karatedo = \"kchamp\"\r\narcade_karatevs = \"kchamp\"\r\narcade_karatour = \"karatour\"\r\narcade_karatourj = \"karatour\"\r\narcade_karianx = \"karianx\"\r\narcade_karnov = \"karnov\"\r\narcade_karnova = \"karnov\"\r\narcade_karnovj = \"karnov\"\r\narcade_karnovr = \"karnovr\"\r\narcade_kazan = \"kazan\"\r\narcade_kbash = \"kbash\"\r\narcade_kbash2 = \"kbash2\"\r\narcade_kbashk = \"kbash\"\r\narcade_kchamp = \"kchamp\"\r\narcade_kchampvs = \"kchamp\"\r\narcade_kchampvs2 = \"kchamp\"\r\narcade_keithlcy = \"keithlcy\"\r\narcade_kengo = \"ltswords\"\r\narcade_kengoa = \"ltswords\"\r\narcade_kenseim = \"kenseim\"\r\narcade_keroppi = \"keroppi\"\r\narcade_keroppij = \"keroppi\"\r\narcade_ket = \"ket\"\r\narcade_ket1 = \"ket\"\r\narcade_keta = \"ket\"\r\narcade_ketarr = \"ket\"\r\narcade_ketarr10 = \"ket\"\r\narcade_ketarr15 = \"ket\"\r\narcade_ketarr151 = \"ket\"\r\narcade_ketarrf = \"ket\"\r\narcade_ketarrs15 = \"ket\"\r\narcade_ketarrs151 = \"ket\"\r\narcade_ketb = \"ket\"\r\narcade_ketbl = \"ket\"\r\narcade_kf10thep = \"kof2002\"\r\narcade_kf2k1pa = \"kof2001\"\r\narcade_kf2k1pls = \"kof2001\"\r\narcade_kf2k2mp = \"kof2002\"\r\narcade_kf2k2mp2 = \"kof2002\"\r\narcade_kf2k2pla = \"kof2002\"\r\narcade_kf2k2plb = \"kof2002\"\r\narcade_kf2k2plc = \"kof2002\"\r\narcade_kf2k2pls = \"kof2002\"\r\narcade_kf2k2ps2 = \"kof2002\"\r\narcade_kf2k3bl = \"kof2003\"\r\narcade_kf2k3bla = \"kof2003\"\r\narcade_kf2k3pcb = \"kf2k3pcb\"\r\narcade_kf2k3pl = \"kof2003\"\r\narcade_kf2k3upl = \"kof2003\"\r\narcade_kf2k4pls = \"kof2002\"\r\narcade_kf2k5uni = \"kof2002\"\r\narcade_kftgoal = \"wpksoc\"\r\narcade_kick = \"kick\"\r\narcade_kicka = \"kick\"\r\narcade_kickboy = \"kickboy\"\r\narcade_kicker = \"kicker\"\r\narcade_kickgoal = \"kickgoal\"\r\narcade_kicknrun = \"kicknrun\"\r\narcade_kickoff = \"kickoff\"\r\narcade_kickridr = \"kickridr\"\r\narcade_kidniki = \"kidniki\"\r\narcade_kidnikiu = \"kidniki\"\r\narcade_kikaioh = \"techromn\"\r\narcade_kikcubic = \"kikcubic\"\r\narcade_kikcubicb = \"kikcubic\"\r\narcade_kikikai = \"kikikai\"\r\narcade_kikstart = \"kikstart\"\r\narcade_killbld = \"killbld\"\r\narcade_killbld104 = \"killbld\"\r\narcade_killbldp = \"killbldp\"\r\narcade_killcom = \"killcom\"\r\narcade_kingbalj = \"kingball\"\r\narcade_kingball = \"kingball\"\r\narcade_kingballj = \"kingball\"\r\narcade_kingdmgp = \"kingdmgp\"\r\narcade_kingofb = \"kingofb\"\r\narcade_kinst = \"kinst\"\r\narcade_kinst2 = \"kinst2\"\r\narcade_kirameki = \"kirameki\"\r\narcade_kirarast = \"kirarast\"\r\narcade_kittenk = \"kittenk\"\r\narcade_kiwame = \"kiwame\"\r\narcade_kiwames = \"kiwames\"\r\narcade_kizuna = \"kizuna\"\r\narcade_klax = \"klax\"\r\narcade_klax2 = \"klax\"\r\narcade_klax3 = \"klax\"\r\narcade_klaxd = \"klax\"\r\narcade_klaxj = \"klax\"\r\narcade_klaxp1 = \"klax\"\r\narcade_klaxp2 = \"klax\"\r\narcade_knckhead = \"knckhead\"\r\narcade_knckhedj = \"knckhead\"\r\narcade_kncljoe = \"kncljoe\"\r\narcade_kncljoea = \"kncljoe\"\r\narcade_knights = \"knights\"\r\narcade_knightsb = \"knights\"\r\narcade_knightsb2 = \"knights\"\r\narcade_knightsb3 = \"knights\"\r\narcade_knightsb4 = \"knights\"\r\narcade_knightsh = \"knights\"\r\narcade_knightsh2 = \"knights\"\r\narcade_knightsj = \"knights\"\r\narcade_knightsja = \"knights\"\r\narcade_knightsu = \"knights\"\r\narcade_knockout = \"triplep\"\r\narcade_kod = \"kod\"\r\narcade_kodb = \"kod\"\r\narcade_kodda = \"kod\"\r\narcade_kodh = \"kod\"\r\narcade_kodj = \"kod\"\r\narcade_kodja = \"kod\"\r\narcade_kodr1 = \"kod\"\r\narcade_kodr2 = \"kod\"\r\narcade_kodu = \"kod\"\r\narcade_kodure = \"kodure\"\r\narcade_kof10th = \"kof2002\"\r\narcade_kof2000 = \"kof2000\"\r\narcade_kof2000n = \"kof2000\"\r\narcade_kof2000ps2 = \"kof2000\"\r\narcade_kof2001 = \"kof2001\"\r\narcade_kof2001h = \"kof2001\"\r\narcade_kof2002 = \"kof2002\"\r\narcade_kof2002b = \"kof2002\"\r\narcade_kof2003 = \"kof2003\"\r\narcade_kof2003d = \"kof2003d\"\r\narcade_kof2003h = \"kof2003\"\r\narcade_kof2k2omg = \"kof2002\"\r\narcade_kof2k2omg8 = \"kof2002\"\r\narcade_kof2k2omg9 = \"kof2002\"\r\narcade_kof2k2omg9b = \"kof2002\"\r\narcade_kof2k4se = \"kof2002\"\r\narcade_kof94 = \"kof94\"\r\narcade_kof95 = \"kof95\"\r\narcade_kof95a = \"kof95\"\r\narcade_kof95h = \"kof95\"\r\narcade_kof96 = \"kof96\"\r\narcade_kof96a = \"kof96\"\r\narcade_kof96ae = \"kof96\"\r\narcade_kof96ae20 = \"kof96\"\r\narcade_kof96cn = \"kof96\"\r\narcade_kof96ep = \"kof96\"\r\narcade_kof96h = \"kof96\"\r\narcade_kof97 = \"kof97\"\r\narcade_kof97a = \"kof97\"\r\narcade_kof97cn = \"kof97\"\r\narcade_kof97h = \"kof97\"\r\narcade_kof97k = \"kof97\"\r\narcade_kof97oro = \"kof97\"\r\narcade_kof97pla = \"kof97\"\r\narcade_kof97pls = \"kof97\"\r\narcade_kof97xt = \"kof97\"\r\narcade_kof98 = \"kof98\"\r\narcade_kof98a = \"kof98\"\r\narcade_kof98ae = \"kof98\"\r\narcade_kof98ae2016 = \"kof98\"\r\narcade_kof98cb = \"kof98\"\r\narcade_kof98h = \"kof98\"\r\narcade_kof98k = \"kof98\"\r\narcade_kof98ka = \"kof98\"\r\narcade_kof98mix = \"kof98\"\r\narcade_kof98n = \"kof98\"\r\narcade_kof99 = \"kof99\"\r\narcade_kof99a = \"kof99\"\r\narcade_kof99ae = \"kof99\"\r\narcade_kof99e = \"kof99\"\r\narcade_kof99h = \"kof99\"\r\narcade_kof99k = \"kof99\"\r\narcade_kof99ka = \"kof99\"\r\narcade_kof99n = \"kof99\"\r\narcade_kof99p = \"kof99\"\r\narcade_kog = \"kof97\"\r\narcade_kogplus = \"kof97\"\r\narcade_koikois2 = \"koikois2\"\r\narcade_koinomp = \"koinomp\"\r\narcade_konami88 = \"88games\"\r\narcade_konamigt = \"konamigt\"\r\narcade_kong = \"kong\"\r\narcade_kontest = \"kontest\"\r\narcade_kopunch = \"kopunch\"\r\narcade_korinai = \"korinai\"\r\narcade_korokoro = \"korokoro\"\r\narcade_korosuke = \"crush\"\r\narcade_koshien = \"koshien\"\r\narcade_kotm = \"kotm\"\r\narcade_kotm2 = \"kotm2\"\r\narcade_kotm2a = \"kotm2\"\r\narcade_kotm2p = \"kotm2\"\r\narcade_kotmh = \"kotm\"\r\narcade_kouyakyu = \"kouyakyu\"\r\narcade_kov = \"kov\"\r\narcade_kov111 = \"kov\"\r\narcade_kov114 = \"kov\"\r\narcade_kov115 = \"kov\"\r\narcade_kov2 = \"kov2\"\r\narcade_kov2100 = \"kov2\"\r\narcade_kov2101 = \"kov2\"\r\narcade_kov2102 = \"kov2\"\r\narcade_kov2103 = \"kov2\"\r\narcade_kov2104 = \"kov2\"\r\narcade_kov2106 = \"kov2\"\r\narcade_kov2p = \"kov2p\"\r\narcade_kov2p202 = \"kov2p\"\r\narcade_kov2p204 = \"kov2p\"\r\narcade_kovassg = \"kovshp\"\r\narcade_kovlsjb = \"kovshp\"\r\narcade_kovlsjba = \"kovshp\"\r\narcade_kovlsqh = \"kovshp\"\r\narcade_kovlsqh2 = \"kovshp\"\r\narcade_kovlsqh2d = \"kovshp\"\r\narcade_kovlsqhd = \"kovshp\"\r\narcade_kovplus = \"kovplus\"\r\narcade_kovplusa = \"kovplus\"\r\narcade_kovqhsgs = \"kovsh\"\r\narcade_kovqhsgsa = \"kovsh\"\r\narcade_kovsgqyz = \"kovplus\"\r\narcade_kovsgqyza = \"kovplus\"\r\narcade_kovsgqyzb = \"kovplus\"\r\narcade_kovsgqyzc = \"kovplus\"\r\narcade_kovsh = \"kovsh\"\r\narcade_kovsh100 = \"kovsh\"\r\narcade_kovsh101 = \"kovsh\"\r\narcade_kovsh102 = \"kovsh\"\r\narcade_kovsh103 = \"kovsh\"\r\narcade_kovshb = \"kovsh\"\r\narcade_kovshp = \"kovshp\"\r\narcade_kovshpa = \"kovshp\"\r\narcade_kovshxas = \"kovshp\"\r\narcade_kovytzy = \"kovytzy\"\r\narcade_kozure = \"kozure\"\r\narcade_kram = \"kram\"\r\narcade_kram2 = \"kram\"\r\narcade_kram3 = \"kram\"\r\narcade_kroozr = \"kroozr\"\r\narcade_krull = \"krull\"\r\narcade_krzybowl = \"krzybowl\"\r\narcade_ksayakyu = \"ksayakyu\"\r\narcade_ktiger = \"twincobr\"\r\narcade_ktiger2 = \"tcobra2\"\r\narcade_kuhga = \"vaportra\"\r\narcade_kungfub = \"kungfum\"\r\narcade_kungfub2 = \"kungfum\"\r\narcade_kungfub3 = \"kungfum\"\r\narcade_kungfud = \"kungfum\"\r\narcade_kungfum = \"kungfum\"\r\narcade_kungfumd = \"kungfum\"\r\narcade_kungfut = \"kungfut\"\r\narcade_kungfuta = \"kungfut\"\r\narcade_kuniokub = \"renegade\"\r\narcade_kuniokun = \"renegade\"\r\narcade_kuniokunb = \"renegade\"\r\narcade_kurikina = \"kurikint\"\r\narcade_kurikinj = \"kurikint\"\r\narcade_kurikint = \"kurikint\"\r\narcade_kurikinta = \"kurikint\"\r\narcade_kurikintj = \"kurikint\"\r\narcade_kurikintu = \"kurikint\"\r\narcade_kurikinu = \"kurikint\"\r\narcade_kyros = \"kyros\"\r\narcade_kyrosj = \"kyros\"\r\narcade_kyukaidk = \"kyukaidk\"\r\narcade_kyukaidko = \"kyukaidk\"\r\narcade_kyukaido = \"kyukaidk\"\r\narcade_kyustrkr = \"kyustrkr\"\r\narcade_labyrunk = \"tricktrp\"\r\narcade_labyrunr = \"tricktrp\"\r\narcade_labyrunrk = \"tricktrp\"\r\narcade_ladybug = \"ladybug\"\r\narcade_ladybugb = \"ladybug\"\r\narcade_ladybugb2 = \"ladybug\"\r\narcade_ladybugg = \"ladybug\"\r\narcade_ladyfrog = \"ladyfrog\"\r\narcade_ladygolf = \"ladygolf\"\r\narcade_ladykill = \"ladykill\"\r\narcade_ladymstr = \"ladymstr\"\r\narcade_ladymstr2 = \"ladymstr\"\r\narcade_lagirl = \"plgirls\"\r\narcade_lagunar = \"lagunar\"\r\narcade_landbrk = \"landbrk\"\r\narcade_landmakr = \"landmakr\"\r\narcade_landmakrp = \"landmakr\"\r\narcade_landmkrp = \"landmakr\"\r\narcade_lans2004 = \"shocktr2\"\r\narcade_laser = \"spclaser\"\r\narcade_lasso = \"lasso\"\r\narcade_lastblad = \"lastblad\"\r\narcade_lastblada = \"lastblad\"\r\narcade_lastbladh = \"lastblad\"\r\narcade_lastbld2 = \"lastbld2\"\r\narcade_lastbld2eh = \"lastbld2\"\r\narcade_lastblda = \"lastblad\"\r\narcade_lastday = \"lastday\"\r\narcade_lastdaya = \"lastday\"\r\narcade_lastduel = \"lastduel\"\r\narcade_lastduelb = \"lastduel\"\r\narcade_lastduelj = \"lastduel\"\r\narcade_lastduelo = \"lastduel\"\r\narcade_lastfero = \"lastfort\"\r\narcade_lastfort = \"lastfort\"\r\narcade_lastforte = \"lastfort\"\r\narcade_lastfortea = \"lastfort\"\r\narcade_lastfortg = \"lastfort\"\r\narcade_lastfortk = \"lastfort\"\r\narcade_lasthope = \"lasthope\"\r\narcade_lastkm = \"lastkm\"\r\narcade_lastmisn = \"lastmisn\"\r\narcade_lastmisnj = \"lastmisn\"\r\narcade_lastmisno = \"lastmisn\"\r\narcade_lastmsnj = \"lastmisn\"\r\narcade_lastmsno = \"lastmisn\"\r\narcade_lastsold = \"lastblad\"\r\narcade_lastsurv = \"lastsurv\"\r\narcade_lastsurvd = \"lastsurv\"\r\narcade_lazercmd = \"lazercmd\"\r\narcade_lbowling = \"lbowling\"\r\narcade_ldrun = \"ldrun\"\r\narcade_ldrun2 = \"ldrun2\"\r\narcade_ldrun3 = \"ldrun3\"\r\narcade_ldrun3j = \"ldrun3\"\r\narcade_ldrun3jp = \"ldrun3\"\r\narcade_ldrun4 = \"ldrun4\"\r\narcade_ldruna = \"ldrun\"\r\narcade_le2 = \"le2\"\r\narcade_le2u = \"le2\"\r\narcade_leaguemn = \"nbbatman\"\r\narcade_leds2011 = \"leds2011\"\r\narcade_leds2011u = \"leds2011\"\r\narcade_ledstorm = \"madgear\"\r\narcade_legend = \"legend\"\r\narcade_legendos = \"legendos\"\r\narcade_legion = \"legion\"\r\narcade_legionj = \"legion\"\r\narcade_legionjb = \"legion\"\r\narcade_legionna = \"legionna\"\r\narcade_legionnu = \"legionna\"\r\narcade_legiono = \"legion\"\r\narcade_legofair = \"chopper\"\r\narcade_lemmings = \"lemmings\"\r\narcade_lemnangl = \"lemnangl\"\r\narcade_leprechn = \"leprechn\"\r\narcade_lethalen = \"lethalen\"\r\narcade_lethaleneaa = \"lethalen\"\r\narcade_lethaleneab = \"lethalen\"\r\narcade_lethaleneae = \"lethalen\"\r\narcade_lethalenj = \"lethalen\"\r\narcade_lethalenua = \"lethalen\"\r\narcade_lethalenub = \"lethalen\"\r\narcade_lethalenux = \"lethalen\"\r\narcade_lethalj = \"lethalj\"\r\narcade_lethalth = \"lethalth\"\r\narcade_levers = \"levers\"\r\narcade_lghost = \"lghost\"\r\narcade_lghostd = \"lghost\"\r\narcade_lghostu = \"lghost\"\r\narcade_lghostud = \"lghost\"\r\narcade_lgtnfght = \"lgtnfght\"\r\narcade_lgtnfghta = \"lgtnfght\"\r\narcade_lgtnfghtu = \"lgtnfght\"\r\narcade_lhcdb = \"lhcdb\"\r\narcade_liberat2 = \"liberatr\"\r\narcade_liberatb = \"liberate\"\r\narcade_liberate = \"liberate\"\r\narcade_liberatr = \"liberatr\"\r\narcade_liblrabl = \"liblrabl\"\r\narcade_lifefrce = \"salamand\"\r\narcade_lifefrcej = \"salamand\"\r\narcade_lifefrcj = \"salamand\"\r\narcade_lightbr = \"lightbr\"\r\narcade_lightbrj = \"lightbr\"\r\narcade_liquidk = \"liquidk\"\r\narcade_liquidku = \"liquidk\"\r\narcade_lithero = \"kidniki\"\r\narcade_livequiz = \"livequiz\"\r\narcade_lizwiz = \"lizwiz\"\r\narcade_lkage = \"lkage\"\r\narcade_lkageb = \"lkage\"\r\narcade_lkageb2 = \"lkage\"\r\narcade_lkageb3 = \"lkage\"\r\narcade_lkageo = \"lkage\"\r\narcade_lkageoo = \"lkage\"\r\narcade_llander = \"llander\"\r\narcade_llander1 = \"llander\"\r\narcade_lnc = \"lnc\"\r\narcade_lockload = \"lockload\"\r\narcade_lockonph = \"lockonph\"\r\narcade_locoboot = \"locomotn\"\r\narcade_locomotn = \"locomotn\"\r\narcade_loderdfa = \"loderndf\"\r\narcade_loderndf = \"loderndf\"\r\narcade_loderndfa = \"loderndf\"\r\narcade_loffire = \"loffire\"\r\narcade_loffired = \"loffire\"\r\narcade_loffirej = \"loffire\"\r\narcade_loffirejd = \"loffire\"\r\narcade_loffireu = \"loffire\"\r\narcade_loffireud = \"loffire\"\r\narcade_logger = \"logger\"\r\narcade_logicpr2 = \"logicpr2\"\r\narcade_logicpro = \"logicpro\"\r\narcade_loht = \"loht\"\r\narcade_lohtb = \"loht\"\r\narcade_lohtb2 = \"loht\"\r\narcade_lohtj = \"loht\"\r\narcade_lomakai = \"lomakai\"\r\narcade_looper = \"changes\"\r\narcade_looping = \"looping\"\r\narcade_loopinga = \"looping\"\r\narcade_lordgun = \"lordgun\"\r\narcade_lordofk = \"astyanax\"\r\narcade_losttmbh = \"losttomb\"\r\narcade_losttomb = \"losttomb\"\r\narcade_losttombh = \"losttomb\"\r\narcade_lostwrld = \"forgottn\"\r\narcade_lostwrldo = \"forgottn\"\r\narcade_lotlot = \"lotlot\"\r\narcade_lottofun = \"lottofun\"\r\narcade_loverboy = \"loverboy\"\r\narcade_lrescue = \"lrescue\"\r\narcade_lresort = \"lresort\"\r\narcade_lresortp = \"lresort\"\r\narcade_lsasquad = \"lsasquad\"\r\narcade_lstduela = \"lastduel\"\r\narcade_lstduelb = \"lastduel\"\r\narcade_ltcasin2 = \"ltcasin2\"\r\narcade_ltcasino = \"ltcasino\"\r\narcade_ltorb1 = \"ltorb1\"\r\narcade_ltswords = \"ltswords\"\r\narcade_luckywld = \"luckywld\"\r\narcade_luckywldj = \"luckywld\"\r\narcade_luctoday = \"luctoday\"\r\narcade_lunarba1 = \"gravitar\"\r\narcade_lunarbat = \"gravitar\"\r\narcade_lupin3 = \"lupin3\"\r\narcade_lvgirl94 = \"lvgirl94\"\r\narcade_lwings = \"lwings\"\r\narcade_lwings2 = \"lwings\"\r\narcade_lwingsb = \"lwings\"\r\narcade_lwingsj = \"lwings\"\r\narcade_lwingsja = \"lwings\"\r\narcade_lwingsjp = \"lwings\"\r\narcade_m4 = \"m4\"\r\narcade_m660 = \"m660\"\r\narcade_m660b = \"m660\"\r\narcade_m660j = \"m660\"\r\narcade_m79amb = \"m79amb\"\r\narcade_mace = \"mace\"\r\narcade_mach3 = \"mach3\"\r\narcade_mach9 = \"vulgus\"\r\narcade_machbrkr = \"machbrkr\"\r\narcade_machomou = \"machomou\"\r\narcade_machridj = \"machridr\"\r\narcade_machridr = \"machridr\"\r\narcade_macross = \"macross\"\r\narcade_macross2 = \"macross2\"\r\narcade_macross2g = \"macross2\"\r\narcade_macross2k = \"macross2\"\r\narcade_macrossp = \"macrossp\"\r\narcade_madalien = \"madalien\"\r\narcade_madcrash = \"madcrash\"\r\narcade_madcrush = \"madcrash\"\r\narcade_maddonna = \"maddonna\"\r\narcade_maddonnb = \"maddonna\"\r\narcade_madgear = \"madgear\"\r\narcade_madgearj = \"madgear\"\r\narcade_madmotor = \"madmotor\"\r\narcade_madshark = \"madshark\"\r\narcade_magdrop = \"chainrec\"\r\narcade_magdrop2 = \"magdrop2\"\r\narcade_magdrop3 = \"magdrop3\"\r\narcade_magdropp = \"chainrec\"\r\narcade_magicbub = \"magicbub\"\r\narcade_magicbuba = \"magicbub\"\r\narcade_magicbubb = \"magicbub\"\r\narcade_magix = \"magix\"\r\narcade_magixb = \"magix\"\r\narcade_maglord = \"maglord\"\r\narcade_maglordh = \"maglord\"\r\narcade_magmax = \"magmax\"\r\narcade_magspot = \"magspot\"\r\narcade_magspot2 = \"magspot2\"\r\narcade_magworm = \"centiped\"\r\narcade_mahmajn = \"mahmajn\"\r\narcade_mahmajn2 = \"mahmajn2\"\r\narcade_mahoudai = \"sstriker\"\r\narcade_mahretsu = \"mahretsu\"\r\narcade_maiko = \"maiko\"\r\narcade_mainev2p = \"mainevt\"\r\narcade_mainevt = \"mainevt\"\r\narcade_mainevt2p = \"mainevt\"\r\narcade_mainevto = \"mainevt\"\r\narcade_mainsnk = \"mainsnk\"\r\narcade_majest12 = \"ssi\"\r\narcade_majest12j = \"ssi\"\r\narcade_majest12u = \"ssi\"\r\narcade_majs101b = \"majs101b\"\r\narcade_majtitl2 = \"majtitl2\"\r\narcade_majtitl2a = \"majtitl2\"\r\narcade_majtitl2b = \"majtitl2\"\r\narcade_majtitl2j = \"majtitl2\"\r\narcade_majtitle = \"majtitle\"\r\narcade_majtitlej = \"majtitle\"\r\narcade_majuu = \"devilw\"\r\narcade_makaiden = \"lomakai\"\r\narcade_makaimuc = \"gng\"\r\narcade_makaimug = \"gng\"\r\narcade_makaimur = \"gng\"\r\narcade_makaimurc = \"gng\"\r\narcade_makaimurg = \"gng\"\r\narcade_maketrax = \"crush\"\r\narcade_maketrxb = \"crush\"\r\narcade_makyosen = \"gondo\"\r\narcade_malzak = \"malzak\"\r\narcade_mangchi = \"mangchi\"\r\narcade_manhatan = \"jailbrek\"\r\narcade_maniach = \"maniach\"\r\narcade_maniach2 = \"maniach\"\r\narcade_maniacsp = \"maniacsq\"\r\narcade_maniacsq = \"maniacsq\"\r\narcade_maniacsqa = \"maniacsq\"\r\narcade_maniacsqu = \"maniacsq\"\r\narcade_manybloc = \"manybloc\"\r\narcade_mappy = \"mappy\"\r\narcade_mappyj = \"mappy\"\r\narcade_marble = \"marble\"\r\narcade_marble2 = \"marble\"\r\narcade_marble3 = \"marble\"\r\narcade_marble4 = \"marble\"\r\narcade_marineb = \"marineb\"\r\narcade_marinedt = \"marinedt\"\r\narcade_mariner = \"mariner\"\r\narcade_mario = \"mario\"\r\narcade_marioe = \"mario\"\r\narcade_mariof = \"mario\"\r\narcade_marioj = \"mario\"\r\narcade_mariojp = \"mario\"\r\narcade_marioo = \"mario\"\r\narcade_markham = \"markham\"\r\narcade_mars = \"mars\"\r\narcade_martmast = \"martmast\"\r\narcade_martmastc = \"martmast\"\r\narcade_martmastc102 = \"martmast\"\r\narcade_martmastc103 = \"martmast\"\r\narcade_martmasttw = \"martmast\"\r\narcade_maruchan = \"maruchan\"\r\narcade_marukin = \"marukin\"\r\narcade_marukodq = \"marukodq\"\r\narcade_marvins = \"marvins\"\r\narcade_marvland = \"marvland\"\r\narcade_marvlandj = \"marvland\"\r\narcade_marvlanj = \"marvland\"\r\narcade_masao = \"mario\"\r\narcade_mastboyo = \"mastboyo\"\r\narcade_masterw = \"masterw\"\r\narcade_masterwj = \"masterw\"\r\narcade_masterwu = \"masterw\"\r\narcade_mastkin = \"mastkin\"\r\narcade_matchit = \"sichuan2\"\r\narcade_matchit2 = \"matchit2\"\r\narcade_matmania = \"matmania\"\r\narcade_matrim = \"matrim\"\r\narcade_matrimbl = \"matrim\"\r\narcade_mausuke = \"mausuke\"\r\narcade_maxf_102 = \"maxforce\"\r\narcade_maxforce = \"maxforce\"\r\narcade_maxrpm = \"maxrpm\"\r\narcade_maya = \"maya\"\r\narcade_mayday = \"mayday\"\r\narcade_maydaya = \"mayday\"\r\narcade_maydayb = \"mayday\"\r\narcade_mayhem = \"mayhem\"\r\narcade_mayumi = \"mayumi\"\r\narcade_maze = \"maze\"\r\narcade_mazerbla = \"mazerbla\"\r\narcade_mazinger = \"mazinger\"\r\narcade_mazingerj = \"mazinger\"\r\narcade_mblkjack = \"hitme\"\r\narcade_mbombdje = \"mbombrd\"\r\narcade_mbomberj = \"slammast\"\r\narcade_mbombrd = \"mbombrd\"\r\narcade_mbombrda = \"mbombrd\"\r\narcade_mbombrdh = \"mbombrd\"\r\narcade_mbombrdj = \"mbombrd\"\r\narcade_mbombrdu = \"mbombrd\"\r\narcade_mbrush = \"crush\"\r\narcade_mcatadv = \"mcatadv\"\r\narcade_mcatadvj = \"mcatadv\"\r\narcade_mchampdx = \"mchampdx\"\r\narcade_mchampdxa = \"mchampdx\"\r\narcade_mcnpshnt = \"mcnpshnt\"\r\narcade_mcontest = \"mcontest\"\r\narcade_md_12in1 = \"md_12in1\"\r\narcade_md_13mahjan = \"md_13mahjan\"\r\narcade_md_16ton = \"md_16ton\"\r\narcade_md_16tongnk = \"md_16ton\"\r\narcade_md_16zhan = \"md_16zhan\"\r\narcade_md_2020bb = \"md_2020bb\"\r\narcade_md_2020bbj = \"md_2020bb\"\r\narcade_md_2psymmac = \"md_2psymmac\"\r\narcade_md_3in1fwt = \"md_3in1fwt\"\r\narcade_md_3in1rmb = \"md_3in1rmb\"\r\narcade_md_3ninja = \"md_3ninja\"\r\narcade_md_4in1pb = \"md_4in1pb\"\r\narcade_md_688atsub = \"md_688atsub\"\r\narcade_md_6pak = \"md_6pak\"\r\narcade_md_aaahhrm = \"md_aaahhrm\"\r\narcade_md_aaahhrmu = \"md_aaahhrm\"\r\narcade_md_aaharima = \"md_aaharima\"\r\narcade_md_aburner2 = \"md_aburner2\"\r\narcade_md_aburner2j = \"md_aburner2\"\r\narcade_md_action52 = \"md_action52\"\r\narcade_md_action52a = \"md_action52\"\r\narcade_md_addfam = \"md_addfam\"\r\narcade_md_addfamp1 = \"md_addfam\"\r\narcade_md_addfamp2 = \"md_addfam\"\r\narcade_md_addfamv = \"md_addfamv\"\r\narcade_md_advbatr = \"md_advbatr\"\r\narcade_md_advbatrp01 = \"md_advbatr\"\r\narcade_md_advbatrp02 = \"md_advbatr\"\r\narcade_md_advbatrp03 = \"md_advbatr\"\r\narcade_md_advbatrp04 = \"md_advbatr\"\r\narcade_md_advbatrp05 = \"md_advbatr\"\r\narcade_md_advbatrp06 = \"md_advbatr\"\r\narcade_md_advbatrp07 = \"md_advbatr\"\r\narcade_md_advbatrp08 = \"md_advbatr\"\r\narcade_md_advbatrp09 = \"md_advbatr\"\r\narcade_md_advbatrp10 = \"md_advbatr\"\r\narcade_md_advbatrp11 = \"md_advbatr\"\r\narcade_md_advbatrp12 = \"md_advbatr\"\r\narcade_md_advbatru = \"md_advbatr\"\r\narcade_md_advdaisn = \"md_advdaisn\"\r\narcade_md_adveboy = \"md_adveboy\"\r\narcade_md_aero = \"md_aero\"\r\narcade_md_aero2 = \"md_aero2\"\r\narcade_md_aero2u = \"md_aero2\"\r\narcade_md_aerobiz = \"md_aerobiz\"\r\narcade_md_aerobizs = \"md_aerobizs\"\r\narcade_md_aeroblst = \"md_airbustr\"\r\narcade_md_aerop = \"md_aero\"\r\narcade_md_aerou = \"md_aero\"\r\narcade_md_agassi = \"md_agassi\"\r\narcade_md_agassiu = \"md_agassi\"\r\narcade_md_agassiup = \"md_agassi\"\r\narcade_md_airbustr = \"md_airbustr\"\r\narcade_md_airdiver = \"md_airdiver\"\r\narcade_md_airdiverj = \"md_airdiver\"\r\narcade_md_airmanag = \"md_aerobiz\"\r\narcade_md_airmang2 = \"md_aerobizs\"\r\narcade_md_akumajo = \"md_cvania\"\r\narcade_md_aladdin = \"md_aladdin\"\r\narcade_md_aladdin2 = \"md_aladdin2\"\r\narcade_md_aladdinj = \"md_aladdin\"\r\narcade_md_aladdinu = \"md_aladdin\"\r\narcade_md_aladdinup = \"md_aladdin\"\r\narcade_md_alexkidd = \"md_alexkidd\"\r\narcade_md_alexkidd1 = \"md_alexkidd\"\r\narcade_md_alexkiddj = \"md_alexkidd\"\r\narcade_md_alexkiddk = \"md_alexkidd\"\r\narcade_md_alexkiddu = \"md_alexkidd\"\r\narcade_md_alien3 = \"md_alien3\"\r\narcade_md_alien3a = \"md_alien3\"\r\narcade_md_aliensol = \"md_aliensol\"\r\narcade_md_aliensolj = \"md_aliensol\"\r\narcade_md_alisiad = \"md_alisiad\"\r\narcade_md_alisiadj = \"md_alisiad\"\r\narcade_md_alisiadu = \"md_alisiad\"\r\narcade_md_altbeast = \"md_altbeast\"\r\narcade_md_amaznten = \"md_amaznten\"\r\narcade_md_amerglad = \"md_amerglad\"\r\narcade_md_andretti = \"md_andretti\"\r\narcade_md_animania = \"md_animania\"\r\narcade_md_animaniau = \"md_animania\"\r\narcade_md_anotherw = \"md_anotherw\"\r\narcade_md_aof = \"md_aof\"\r\narcade_md_aofp = \"md_aof\"\r\narcade_md_aofu = \"md_aof\"\r\narcade_md_aqrenk = \"md_aqrenk\"\r\narcade_md_aquagame = \"md_aquagame\"\r\narcade_md_ar = \"md_ar\"\r\narcade_md_arcadecl = \"md_arcadecl\"\r\narcade_md_arcadegh = \"md_arcadegh\"\r\narcade_md_arcadeghu = \"md_arcadegh\"\r\narcade_md_archrivl = \"md_archrivl\"\r\narcade_md_arcus = \"md_arcus\"\r\narcade_md_arcusj = \"md_arcus\"\r\narcade_md_aresshmd = \"md_aresshmd\"\r\narcade_md_ariel = \"md_ariel\"\r\narcade_md_arnoldp = \"md_arnoldp\"\r\narcade_md_arrow = \"md_arrow\"\r\narcade_md_arrowp = \"md_arrow\"\r\narcade_md_artalive = \"md_artalive\"\r\narcade_md_arttool = \"md_arttool\"\r\narcade_md_asscreed = \"md_dlair\"\r\narcade_md_astergre = \"md_astergre\"\r\narcade_md_astergreu = \"md_astergre\"\r\narcade_md_asterpg = \"md_asterpg\"\r\narcade_md_asterpgp = \"md_asterpg\"\r\narcade_md_astorm = \"md_astorm\"\r\narcade_md_atomrobo = \"md_atomrobo\"\r\narcade_md_atomroboj = \"md_atomrobo\"\r\narcade_md_atomrun = \"md_atomrun\"\r\narcade_md_atomrunu = \"md_atomrun\"\r\narcade_md_atptour = \"md_atptour\"\r\narcade_md_atptourp1 = \"md_atptour\"\r\narcade_md_atptourp2 = \"md_atptour\"\r\narcade_md_atptourp3 = \"md_atptour\"\r\narcade_md_atptourp4 = \"md_atptour\"\r\narcade_md_atptourp5 = \"md_atptour\"\r\narcade_md_atptourp6 = \"md_atptour\"\r\narcade_md_atptourp7 = \"md_atptour\"\r\narcade_md_atptouru = \"md_atptour\"\r\narcade_md_austrarl = \"md_austrarl\"\r\narcade_md_avatar = \"md_jimpower\"\r\narcade_md_awepossm = \"md_awepossm\"\r\narcade_md_awepossmp = \"md_awepossm\"\r\narcade_md_aworg = \"md_aworg\"\r\narcade_md_awspro = \"md_awspro\"\r\narcade_md_babyboom = \"md_babyboom\"\r\narcade_md_babyboom1 = \"md_babyboom\"\r\narcade_md_babyboom2 = \"md_babyboom\"\r\narcade_md_babyd = \"md_babyd\"\r\narcade_md_babydo = \"md_babyd\"\r\narcade_md_backtof3 = \"md_backtof3\"\r\narcade_md_backtof3u = \"md_backtof3\"\r\narcade_md_badomen = \"md_devilish\"\r\narcade_md_bahamuts = \"md_bahamuts\"\r\narcade_md_balljack = \"md_balljack\"\r\narcade_md_ballz3d = \"md_ballz3d\"\r\narcade_md_barbiesm = \"md_barbiesm\"\r\narcade_md_barbvac = \"md_barbvac\"\r\narcade_md_barkley = \"md_barkley\"\r\narcade_md_barkley2 = \"md_barkley2\"\r\narcade_md_barkley2p = \"md_barkley2\"\r\narcade_md_barney = \"md_barney\"\r\narcade_md_bartnigh = \"md_bartnigh\"\r\narcade_md_bartvssm = \"md_bartvssm\"\r\narcade_md_bartvssm1 = \"md_bartvssm\"\r\narcade_md_barver = \"md_barver\"\r\narcade_md_bassmc = \"md_bassmc\"\r\narcade_md_bassmpro = \"md_bassmpro\"\r\narcade_md_batman = \"md_batman\"\r\narcade_md_batmanf = \"md_batmanf\"\r\narcade_md_batmanj = \"md_batman\"\r\narcade_md_batmanrj = \"md_batmanrj\"\r\narcade_md_batmanrn = \"md_batmanrn\"\r\narcade_md_batmanu = \"md_batman\"\r\narcade_md_battlems = \"md_battlems\"\r\narcade_md_battlesq = \"md_battlesq\"\r\narcade_md_battlyui = \"md_battlyui\"\r\narcade_md_battlyuie = \"md_battlyui\"\r\narcade_md_bcdverifier = \"md_bcdverifier\"\r\narcade_md_beast = \"md_beast\"\r\narcade_md_beast2 = \"md_beast2\"\r\narcade_md_beastbal = \"md_beastbal\"\r\narcade_md_beastj = \"md_beast\"\r\narcade_md_beastw = \"md_beastw\"\r\narcade_md_beastwj = \"md_beastw\"\r\narcade_md_beauty = \"md_beauty\"\r\narcade_md_beautyrb = \"md_beautyrb\"\r\narcade_md_beavis = \"md_beavis\"\r\narcade_md_beavisu = \"md_beavis\"\r\narcade_md_beavisup = \"md_beavis\"\r\narcade_md_ben10 = \"md_ben10\"\r\narcade_md_berens = \"md_berens\"\r\narcade_md_berensp01 = \"md_berens\"\r\narcade_md_berensp02 = \"md_berens\"\r\narcade_md_berensp03 = \"md_berens\"\r\narcade_md_berensp04 = \"md_berens\"\r\narcade_md_berensp05 = \"md_berens\"\r\narcade_md_berensp06 = \"md_berens\"\r\narcade_md_berensp07 = \"md_berens\"\r\narcade_md_berensp08 = \"md_berens\"\r\narcade_md_berensp09 = \"md_berens\"\r\narcade_md_berensp10 = \"md_berens\"\r\narcade_md_berensp11 = \"md_berens\"\r\narcade_md_berensp12 = \"md_berens\"\r\narcade_md_berensp13 = \"md_berens\"\r\narcade_md_berensp14 = \"md_berens\"\r\narcade_md_berensp15 = \"md_berens\"\r\narcade_md_berensp16 = \"md_berens\"\r\narcade_md_berensp17 = \"md_berens\"\r\narcade_md_berensp18 = \"md_berens\"\r\narcade_md_berensp19 = \"md_berens\"\r\narcade_md_berensp20 = \"md_berens\"\r\narcade_md_bestof = \"md_bestof\"\r\narcade_md_bestofp = \"md_bestof\"\r\narcade_md_beyoasis = \"md_thor\"\r\narcade_md_beyoasisp = \"md_thor\"\r\narcade_md_beyondzt = \"md_beyondzt\"\r\narcade_md_bibleadv = \"md_bibleadv\"\r\narcade_md_bigfd = \"md_bigfd\"\r\narcade_md_bighurt = \"md_bighurt\"\r\narcade_md_billwl95 = \"md_billwl95\"\r\narcade_md_billwlsh = \"md_billwlsh\"\r\narcade_md_bimini = \"md_bimini\"\r\narcade_md_biohazrb = \"md_biohazrb\"\r\narcade_md_biohazrbp = \"md_biohazrb\"\r\narcade_md_bk2p = \"md_sor2\"\r\narcade_md_bk3 = \"md_sor3\"\r\narcade_md_bk3p = \"md_sor3\"\r\narcade_md_bladeven = \"md_bladeven\"\r\narcade_md_blockb = \"md_blockb\"\r\narcade_md_blockout = \"md_blockout\"\r\narcade_md_bloodsht = \"md_bloodsht\"\r\narcade_md_bluealma = \"md_bluealma\"\r\narcade_md_bmaster2 = \"md_bmaster2\"\r\narcade_md_bmaster2p = \"md_bmaster2\"\r\narcade_md_bnzabros = \"md_bnzabros\"\r\narcade_md_bnzabros1 = \"md_bnzabros\"\r\narcade_md_bnzabrosu = \"md_bnzabros\"\r\narcade_md_bob = \"md_bob\"\r\narcade_md_bobc206 = \"md_bobc206\"\r\narcade_md_bobp = \"md_bob\"\r\narcade_md_bodyco = \"md_bodyco\"\r\narcade_md_bodycob = \"md_bodyco\"\r\narcade_md_bodycop = \"md_bodyco\"\r\narcade_md_bodycop2 = \"md_bodyco\"\r\narcade_md_bodycop3 = \"md_bodyco\"\r\narcade_md_bodycop4 = \"md_bodyco\"\r\narcade_md_bodycop5 = \"md_bodyco\"\r\narcade_md_bomber = \"md_bomber\"\r\narcade_md_bomboy = \"md_bomboy\"\r\narcade_md_bonkers = \"md_bonkers\"\r\narcade_md_bonkersp1 = \"md_bonkers\"\r\narcade_md_bonkersp2 = \"md_bonkers\"\r\narcade_md_bonkersp3 = \"md_bonkers\"\r\narcade_md_bonkersp4 = \"md_bonkers\"\r\narcade_md_bonkersp5 = \"md_bonkers\"\r\narcade_md_booger = \"md_booger\"\r\narcade_md_boogeru = \"md_booger\"\r\narcade_md_boogie = \"md_champbwl\"\r\narcade_md_boxinglg = \"md_boxinglg\"\r\narcade_md_bretth = \"md_bretth\"\r\narcade_md_brianl96 = \"md_brianl96\"\r\narcade_md_brianl96a = \"md_brianl96\"\r\narcade_md_brianlar = \"md_brianlar\"\r\narcade_md_brianlar1 = \"md_brianlar\"\r\narcade_md_brutal = \"md_brutal\"\r\narcade_md_brutalu = \"md_brutal\"\r\narcade_md_bsteam3 = \"md_tecmocup\"\r\narcade_md_btech = \"md_btech\"\r\narcade_md_btlmania = \"md_troubsht\"\r\narcade_md_btlmanid = \"md_btlmanid\"\r\narcade_md_btlmanide = \"md_btlmanid\"\r\narcade_md_btoads = \"md_btoads\"\r\narcade_md_btoadsdd = \"md_btoadsdd\"\r\narcade_md_bubba = \"md_bubba\"\r\narcade_md_bubbap = \"md_bubba\"\r\narcade_md_bubbau = \"md_bubba\"\r\narcade_md_bubblesq = \"md_bubblesq\"\r\narcade_md_bubblesqu = \"md_bubblesq\"\r\narcade_md_bubsy = \"md_bubsy\"\r\narcade_md_bubsy2 = \"md_bubsy2\"\r\narcade_md_buckrog = \"md_buckrog\"\r\narcade_md_budokan = \"md_budokan\"\r\narcade_md_budokanu = \"md_budokan\"\r\narcade_md_bugsbun = \"md_bugsbun\"\r\narcade_md_bugsbunu = \"md_bugsbun\"\r\narcade_md_bugslife = \"md_bugslife\"\r\narcade_md_bugslifea = \"md_bugslife\"\r\narcade_md_bullvsbl = \"md_bullvsbl\"\r\narcade_md_bullvsblj = \"md_bullvsbl\"\r\narcade_md_bullvsblj1 = \"md_bullvsbl\"\r\narcade_md_bullvsla = \"md_bullvsla\"\r\narcade_md_bullvslaj = \"md_bullvsla\"\r\narcade_md_burnforc = \"md_burnforc\"\r\narcade_md_burnforcj = \"md_burnforc\"\r\narcade_md_burnforcu = \"md_burnforc\"\r\narcade_md_cadash = \"md_cadash\"\r\narcade_md_caesar = \"md_warrior\"\r\narcade_md_caesar2 = \"md_warrior2\"\r\narcade_md_caesars = \"md_caesars\"\r\narcade_md_cal50 = \"md_cal50\"\r\narcade_md_calgames = \"md_calgames\"\r\narcade_md_calripkn = \"md_calripkn\"\r\narcade_md_captaven = \"md_captaven\"\r\narcade_md_captavenu = \"md_captaven\"\r\narcade_md_captavenup = \"md_captaven\"\r\narcade_md_captlang = \"md_havoc\"\r\narcade_md_captplan = \"md_captplan\"\r\narcade_md_captplanu = \"md_captplan\"\r\narcade_md_carmntim = \"md_carmntim\"\r\narcade_md_carmntimb = \"md_carmntim\"\r\narcade_md_carmnwld = \"md_carmnwld\"\r\narcade_md_carmnwldb = \"md_carmnwld\"\r\narcade_md_cars = \"md_sskid\"\r\narcade_md_cars2 = \"md_cproam\"\r\narcade_md_castlill = \"md_castlill\"\r\narcade_md_castlillj = \"md_castlill\"\r\narcade_md_centur = \"md_centur\"\r\narcade_md_cfodder = \"md_cfodder\"\r\narcade_md_chakan = \"md_chakan\"\r\narcade_md_champbwl = \"md_champbwl\"\r\narcade_md_champool = \"md_champool\"\r\narcade_md_champwcs = \"md_champwcs\"\r\narcade_md_chaosen2 = \"md_chaosen2\"\r\narcade_md_chaoseng = \"md_chaoseng\"\r\narcade_md_chase = \"md_chase\"\r\narcade_md_chasehq2 = \"md_chasehq2\"\r\narcade_md_chavez2 = \"md_boxinglg\"\r\narcade_md_cheese = \"md_cheese\"\r\narcade_md_chelnov = \"md_atomrun\"\r\narcade_md_chess = \"md_chess\"\r\narcade_md_chessa = \"md_chess\"\r\narcade_md_chessb = \"md_chess\"\r\narcade_md_chester = \"md_chester\"\r\narcade_md_chesterw = \"md_chesterw\"\r\narcade_md_chibim = \"md_chibim\"\r\narcade_md_chichi = \"md_chichi\"\r\narcade_md_chiki = \"md_chiki\"\r\narcade_md_chikij = \"md_chiki\"\r\narcade_md_chinesec = \"md_chinesec\"\r\narcade_md_chinf3 = \"md_chinf3\"\r\narcade_md_chinf3a = \"md_chinf3\"\r\narcade_md_chuckrck = \"md_chuckrck\"\r\narcade_md_chuckrcku = \"md_chuckrck\"\r\narcade_md_chukrck2 = \"md_chukrck2\"\r\narcade_md_chukrck2j = \"md_chukrck2\"\r\narcade_md_chukrck2u = \"md_chukrck2\"\r\narcade_md_chukrck2up = \"md_chukrck2\"\r\narcade_md_cjfuweng = \"md_cjfuweng\"\r\narcade_md_classicc = \"md_classicc\"\r\narcade_md_clayfght = \"md_clayfght\"\r\narcade_md_clayfghtu = \"md_clayfght\"\r\narcade_md_cliffh = \"md_cliffh\"\r\narcade_md_cliffhp = \"md_cliffh\"\r\narcade_md_cliffhu = \"md_cliffh\"\r\narcade_md_clue = \"md_clue\"\r\narcade_md_coachk = \"md_coachk\"\r\narcade_md_colleg96 = \"md_colleg96\"\r\narcade_md_colleg97 = \"md_colleg97\"\r\narcade_md_collnc = \"md_collnc\"\r\narcade_md_collnc2 = \"md_collnc2\"\r\narcade_md_collncp01 = \"md_collnc\"\r\narcade_md_collncp02 = \"md_collnc\"\r\narcade_md_collncp03 = \"md_collnc\"\r\narcade_md_collncp04 = \"md_collnc\"\r\narcade_md_collncp05 = \"md_collnc\"\r\narcade_md_collncp06 = \"md_collnc\"\r\narcade_md_collncp07 = \"md_collnc\"\r\narcade_md_collncp08 = \"md_collnc\"\r\narcade_md_collncp09 = \"md_collnc\"\r\narcade_md_collncp10 = \"md_collnc\"\r\narcade_md_collncp11 = \"md_collnc\"\r\narcade_md_collncp12 = \"md_collnc\"\r\narcade_md_collncp13 = \"md_collnc\"\r\narcade_md_collncp14 = \"md_collnc\"\r\narcade_md_collncp15 = \"md_collnc\"\r\narcade_md_collncp16 = \"md_collnc\"\r\narcade_md_collncp17 = \"md_collnc\"\r\narcade_md_collncp18 = \"md_collnc\"\r\narcade_md_collncp19 = \"md_collnc\"\r\narcade_md_collslam = \"md_collslam\"\r\narcade_md_columns = \"md_columns\"\r\narcade_md_columns1 = \"md_columns\"\r\narcade_md_columns3 = \"md_columns3\"\r\narcade_md_columns3j = \"md_columns3\"\r\narcade_md_combat = \"md_combat\"\r\narcade_md_combatca = \"md_combatca\"\r\narcade_md_comix = \"md_comix\"\r\narcade_md_comixj = \"md_comix\"\r\narcade_md_comixkp = \"md_comix\"\r\narcade_md_comixp = \"md_comix\"\r\narcade_md_comixsc = \"md_comix\"\r\narcade_md_comixu = \"md_comix\"\r\narcade_md_comixup = \"md_comix\"\r\narcade_md_comixup01 = \"md_comix\"\r\narcade_md_comixup02 = \"md_comix\"\r\narcade_md_comixup03 = \"md_comix\"\r\narcade_md_comixup04 = \"md_comix\"\r\narcade_md_comixup05 = \"md_comix\"\r\narcade_md_comixup06 = \"md_comix\"\r\narcade_md_comixup07 = \"md_comix\"\r\narcade_md_comixup08 = \"md_comix\"\r\narcade_md_comixup09 = \"md_comix\"\r\narcade_md_comixup10 = \"md_comix\"\r\narcade_md_commands = \"md_commands\"\r\narcade_md_commconq = \"md_commconq\"\r\narcade_md_congo = \"md_congo\"\r\narcade_md_contra = \"md_contra\"\r\narcade_md_contraj = \"md_contra\"\r\narcade_md_coolspot = \"md_coolspot\"\r\narcade_md_coolspotj = \"md_coolspot\"\r\narcade_md_coolspotu = \"md_coolspot\"\r\narcade_md_coolspotup = \"md_coolspot\"\r\narcade_md_corporat = \"md_corporat\"\r\narcade_md_cosmic = \"md_cosmic\"\r\narcade_md_cperils = \"md_cperils\"\r\narcade_md_cproam = \"md_cproam\"\r\narcade_md_crash = \"md_zero\"\r\narcade_md_crashdum = \"md_crashdum\"\r\narcade_md_crashdump = \"md_crashdum\"\r\narcade_md_crayon = \"md_crayon\"\r\narcade_md_crkdown = \"md_crkdown\"\r\narcade_md_crkdown1 = \"md_crkdown\"\r\narcade_md_crkdownu = \"md_crkdown\"\r\narcade_md_crudeb = \"md_twocrude\"\r\narcade_md_crueball = \"md_crueball\"\r\narcade_md_crueballj = \"md_crueball\"\r\narcade_md_crusader = \"md_soleil\"\r\narcade_md_crying = \"md_biohazrb\"\r\narcade_md_crystlpt = \"md_crystlpt\"\r\narcade_md_crystlptp01 = \"md_crystlpt\"\r\narcade_md_crystlptp02 = \"md_crystlpt\"\r\narcade_md_crystlptp03 = \"md_crystlpt\"\r\narcade_md_crystlptp04 = \"md_crystlpt\"\r\narcade_md_crystlptp05 = \"md_crystlpt\"\r\narcade_md_crystlptp06 = \"md_crystlpt\"\r\narcade_md_crystlptp07 = \"md_crystlpt\"\r\narcade_md_crystlptp08 = \"md_crystlpt\"\r\narcade_md_crystlptp09 = \"md_crystlpt\"\r\narcade_md_crystlptp10 = \"md_crystlpt\"\r\narcade_md_crystlptp11 = \"md_crystlpt\"\r\narcade_md_crystlptp12 = \"md_crystlpt\"\r\narcade_md_crystlptp13 = \"md_crystlpt\"\r\narcade_md_crystlptp14 = \"md_crystlpt\"\r\narcade_md_crystlptp15 = \"md_crystlpt\"\r\narcade_md_cstrike = \"md_lethalen\"\r\narcade_md_curse = \"md_curse\"\r\narcade_md_cutiesuz = \"md_cutiesuz\"\r\narcade_md_cutthr = \"md_cutthr\"\r\narcade_md_cutthrp = \"md_cutthr\"\r\narcade_md_cvania = \"md_cvania\"\r\narcade_md_cvaniap = \"md_cvania\"\r\narcade_md_cvaniau = \"md_cvania\"\r\narcade_md_cyberbal = \"md_cyberbal\"\r\narcade_md_cybercop = \"md_corporat\"\r\narcade_md_cyborgj = \"md_cyborgj\"\r\narcade_md_cyborgjp = \"md_cyborgj\"\r\narcade_md_daffy = \"md_daffy\"\r\narcade_md_daffyp = \"md_daffy\"\r\narcade_md_dahnagb = \"md_dahnam\"\r\narcade_md_dahnam = \"md_dahnam\"\r\narcade_md_dahnamk = \"md_dahnam\"\r\narcade_md_daikok2 = \"md_newhoriz\"\r\narcade_md_daikokai = \"md_unchartd\"\r\narcade_md_daimakai = \"md_ghouls\"\r\narcade_md_dangseed = \"md_dangseed\"\r\narcade_md_darius2 = \"md_sagaia\"\r\narcade_md_darkcast = \"md_darkcast\"\r\narcade_md_darwin = \"md_darwin\"\r\narcade_md_dashdes = \"md_dashdes\"\r\narcade_md_dashdesp1 = \"md_dashdes\"\r\narcade_md_dashdesp2 = \"md_dashdes\"\r\narcade_md_daviscp2 = \"md_daviscp2\"\r\narcade_md_daviscp2a = \"md_daviscp2\"\r\narcade_md_daviscup = \"md_daviscup\"\r\narcade_md_daviscupa = \"md_daviscup\"\r\narcade_md_dazexmas = \"md_dazexmas\"\r\narcade_md_dazexmasp = \"md_dazexmas\"\r\narcade_md_dbz = \"md_dbz\"\r\narcade_md_dbzf = \"md_dbz\"\r\narcade_md_ddanpei = \"md_ddanpei\"\r\narcade_md_ddragon = \"md_ddragon\"\r\narcade_md_ddragon2 = \"md_ddragon2\"\r\narcade_md_ddragon3 = \"md_ddragon3\"\r\narcade_md_ddragon5 = \"md_ddragon5\"\r\narcade_md_ddribble = \"md_hyperdnk\"\r\narcade_md_ddwares = \"md_ddwares\"\r\narcade_md_deadlymv = \"md_deadlymv\"\r\narcade_md_deathcal = \"md_deathcal\"\r\narcade_md_deathdl = \"md_deathdl\"\r\narcade_md_deathret = \"md_deathret\"\r\narcade_md_decapatt = \"md_decapatt\"\r\narcade_md_deerhunt = \"md_deerhunt\"\r\narcade_md_demoman = \"md_demoman\"\r\narcade_md_demomanp = \"md_demoman\"\r\narcade_md_desrtdem = \"md_desrtdem\"\r\narcade_md_desrtdemp1 = \"md_desrtdem\"\r\narcade_md_desrtdemp2 = \"md_desrtdem\"\r\narcade_md_desrtdemp3 = \"md_desrtdem\"\r\narcade_md_desrtdemp4 = \"md_desrtdem\"\r\narcade_md_desrtdemp5 = \"md_desrtdem\"\r\narcade_md_desrtdemp6 = \"md_desrtdem\"\r\narcade_md_desrtdemp7 = \"md_desrtdem\"\r\narcade_md_desrtdemp8 = \"md_desrtdem\"\r\narcade_md_desrtdemp9 = \"md_desrtdem\"\r\narcade_md_devilish = \"md_devilish\"\r\narcade_md_devlcrsh = \"md_dfury\"\r\narcade_md_dfury = \"md_dfury\"\r\narcade_md_dhead = \"md_dhead\"\r\narcade_md_dheade = \"md_dhead\"\r\narcade_md_dheadj = \"md_dhead\"\r\narcade_md_dheadjp = \"md_dhead\"\r\narcade_md_dheadp1 = \"md_dhead\"\r\narcade_md_dheadp2 = \"md_dhead\"\r\narcade_md_dheadp3 = \"md_dhead\"\r\narcade_md_diablo = \"md_fatallab\"\r\narcade_md_dialqo = \"md_dialqo\"\r\narcade_md_dicktr = \"md_dicktr\"\r\narcade_md_dickvitl = \"md_dickvitl\"\r\narcade_md_dinho98 = \"md_issdx\"\r\narcade_md_dinodini = \"md_dinodini\"\r\narcade_md_dinohire = \"md_dinohire\"\r\narcade_md_dinohirep1 = \"md_dinohire\"\r\narcade_md_dinohirep2 = \"md_dinohire\"\r\narcade_md_dinohirep3 = \"md_dinohire\"\r\narcade_md_dinoland = \"md_dinoland\"\r\narcade_md_dinolandj = \"md_dinoland\"\r\narcade_md_dinotale = \"md_dinotale\"\r\narcade_md_disneycl = \"md_disneycl\"\r\narcade_md_ditkapf = \"md_ditkapf\"\r\narcade_md_ditkapf1 = \"md_ditkapf\"\r\narcade_md_divine = \"md_divine\"\r\narcade_md_djboy = \"md_djboy\"\r\narcade_md_djboyj = \"md_djboy\"\r\narcade_md_djboyu = \"md_djboy\"\r\narcade_md_dlair = \"md_dlair\"\r\narcade_md_dokidoki = \"md_dokidoki\"\r\narcade_md_dokidokignk = \"md_dokidoki\"\r\narcade_md_domino = \"md_domino\"\r\narcade_md_dominus = \"md_dominus\"\r\narcade_md_dongguri = \"md_drrobotn\"\r\narcade_md_doomtrop = \"md_doomtrop\"\r\narcade_md_doraemon = \"md_doraemon\"\r\narcade_md_doublecl = \"md_doublecl\"\r\narcade_md_dracula = \"md_dracula\"\r\narcade_md_draculau = \"md_dracula\"\r\narcade_md_dragnrev = \"md_dragnrev\"\r\narcade_md_dragnrevj = \"md_dragnrev\"\r\narcade_md_dragon = \"md_dragon\"\r\narcade_md_dragonu = \"md_dragon\"\r\narcade_md_draxos = \"md_riskyw\"\r\narcade_md_dreamteam = \"md_teamusa\"\r\narcade_md_drrobotn = \"md_drrobotn\"\r\narcade_md_drrobotnu = \"md_drrobotn\"\r\narcade_md_drrobotnup = \"md_drrobotn\"\r\narcade_md_drsc = \"md_drsc\"\r\narcade_md_drscj = \"md_drsc\"\r\narcade_md_dslayed = \"md_dslayed\"\r\narcade_md_dslayed2 = \"md_dslayed2\"\r\narcade_md_dstrike = \"md_dstrike\"\r\narcade_md_dstrikej = \"md_dstrike\"\r\narcade_md_dukenk3d = \"md_dukenk3d\"\r\narcade_md_dukenk3da = \"md_dukenk3d\"\r\narcade_md_dune2 = \"md_dune2\"\r\narcade_md_dune2g = \"md_dune2\"\r\narcade_md_duneu = \"md_dune2\"\r\narcade_md_dynabr = \"md_dynabr\"\r\narcade_md_dynabr2 = \"md_dynabr2\"\r\narcade_md_dynabr2sp = \"md_dynabr2\"\r\narcade_md_dynduke = \"md_dynduke\"\r\narcade_md_dynduke1 = \"md_dynduke\"\r\narcade_md_dynoblaz = \"md_dynoblaz\"\r\narcade_md_eahockey = \"md_eahockey\"\r\narcade_md_eahockeyj = \"md_eahockey\"\r\narcade_md_earnest = \"md_earnest\"\r\narcade_md_earthdef = \"md_earthdef\"\r\narcade_md_easports = \"md_easports\"\r\narcade_md_ecco = \"md_ecco\"\r\narcade_md_ecco2 = \"md_ecco2\"\r\narcade_md_ecco2j = \"md_ecco2\"\r\narcade_md_ecco2p = \"md_ecco2\"\r\narcade_md_ecco2p1 = \"md_ecco2\"\r\narcade_md_ecco2p2 = \"md_ecco2\"\r\narcade_md_ecco2px11 = \"md_ecco2\"\r\narcade_md_ecco2u = \"md_ecco2\"\r\narcade_md_eccoj = \"md_ecco\"\r\narcade_md_eccojr = \"md_eccojr\"\r\narcade_md_eccojr1 = \"md_eccojr\"\r\narcade_md_ejim = \"md_ejim\"\r\narcade_md_ejim2 = \"md_ejim2\"\r\narcade_md_ejim2u = \"md_ejim2\"\r\narcade_md_ejimu = \"md_ejim\"\r\narcade_md_elemast = \"md_elemast\"\r\narcade_md_elemastj = \"md_elemast\"\r\narcade_md_elimdown = \"md_elimdown\"\r\narcade_md_elit95 = \"md_elit95\"\r\narcade_md_elit96 = \"md_elit96\"\r\narcade_md_elviento = \"md_elviento\"\r\narcade_md_elvientoj = \"md_elviento\"\r\narcade_md_empsteel = \"md_empsteel\"\r\narcade_md_espnbb = \"md_espnbb\"\r\narcade_md_espnhn = \"md_espnhn\"\r\narcade_md_espnhnp = \"md_espnhn\"\r\narcade_md_espnnfl = \"md_espnnfl\"\r\narcade_md_espnnflp = \"md_espnnfl\"\r\narcade_md_espnsped = \"md_espnsped\"\r\narcade_md_espnspedp = \"md_espnsped\"\r\narcade_md_eswat = \"md_eswat\"\r\narcade_md_eswatj = \"md_eswat\"\r\narcade_md_eternalc = \"md_eternalc\"\r\narcade_md_eternalcj = \"md_eternalc\"\r\narcade_md_eternalcjp = \"md_eternalc\"\r\narcade_md_eternalcp = \"md_eternalc\"\r\narcade_md_eternalcu = \"md_eternalc\"\r\narcade_md_Euro2004 = \"md_issdx\"\r\narcade_md_euroclub = \"md_euroclub\"\r\narcade_md_eurosens = \"md_opeurope\"\r\narcade_md_evander = \"md_evander\"\r\narcade_md_excelart = \"md_excelart\"\r\narcade_md_exile = \"md_exile\"\r\narcade_md_exilej = \"md_exile\"\r\narcade_md_exmutant = \"md_exmutant\"\r\narcade_md_exodus = \"md_exodus\"\r\narcade_md_exosquad = \"md_exosquad\"\r\narcade_md_exosquadu = \"md_exosquad\"\r\narcade_md_exosquadup = \"md_exosquad\"\r\narcade_md_exranza = \"md_rangerx\"\r\narcade_md_exranzap = \"md_rangerx\"\r\narcade_md_f1 = \"md_f1\"\r\narcade_md_f117 = \"md_f117\"\r\narcade_md_f117j = \"md_f117\"\r\narcade_md_f15se2 = \"md_f15se2\"\r\narcade_md_f15se2u = \"md_f15se2\"\r\narcade_md_f15se2up = \"md_f15se2\"\r\narcade_md_f1circus = \"md_f1circus\"\r\narcade_md_f1heromd = \"md_f1heromd\"\r\narcade_md_f1wc = \"md_f1wc\"\r\narcade_md_f1wcp = \"md_f1wc\"\r\narcade_md_f22 = \"md_f22\"\r\narcade_md_f22a = \"md_f22\"\r\narcade_md_f22j = \"md_f22\"\r\narcade_md_f22p = \"md_f22\"\r\narcade_md_faerytal = \"md_faerytal\"\r\narcade_md_famfeud = \"md_famfeud\"\r\narcade_md_fantasia = \"md_fantasia\"\r\narcade_md_fantasia1 = \"md_fantasia\"\r\narcade_md_fantdizz = \"md_fantdizz\"\r\narcade_md_fantdizz1 = \"md_fantdizz\"\r\narcade_md_fastest1 = \"md_fastest1\"\r\narcade_md_fastfur5 = \"md_combatca\"\r\narcade_md_fatallab = \"md_fatallab\"\r\narcade_md_fatalrew = \"md_fatalrew\"\r\narcade_md_fatalsmarties = \"md_fatalsmarties\"\r\narcade_md_fatfury = \"md_fatfury\"\r\narcade_md_fatfury2 = \"md_fatfury2\"\r\narcade_md_fatfuryu = \"md_fatfury\"\r\narcade_md_fatman = \"md_slaughtr\"\r\narcade_md_fengkuan = \"md_fengkuan\"\r\narcade_md_fengshen = \"md_fengshen\"\r\narcade_md_fengshena = \"md_fengshen\"\r\narcade_md_ferias = \"md_ferias\"\r\narcade_md_ferrari = \"md_ferrari\"\r\narcade_md_ferrarip = \"md_ferrari\"\r\narcade_md_ferrariu = \"md_ferrari\"\r\narcade_md_feverpit = \"md_feverpit\"\r\narcade_md_fidodido = \"md_fidodido\"\r\narcade_md_fifa = \"md_fifa\"\r\narcade_md_fifa2k = \"md_fifa97\"\r\narcade_md_fifa2k10 = \"md_fifa\"\r\narcade_md_fifa2k2 = \"md_wcs2\"\r\narcade_md_fifa2k3 = \"md_fifa95\"\r\narcade_md_fifa95 = \"md_fifa95\"\r\narcade_md_fifa95k = \"md_fifa95\"\r\narcade_md_fifa96 = \"md_fifa96\"\r\narcade_md_fifa97 = \"md_fifa97\"\r\narcade_md_fifa98 = \"md_fifa98\"\r\narcade_md_fifa99 = \"md_fifa96\"\r\narcade_md_fightmas = \"md_fightmas\"\r\narcade_md_fightmasj = \"md_fightmas\"\r\narcade_md_finalb = \"md_jbdougko\"\r\narcade_md_firemust = \"md_firemust\"\r\narcade_md_fireshrk = \"md_fireshrk\"\r\narcade_md_fireshrku = \"md_fireshrk\"\r\narcade_md_fireshrku1 = \"md_fireshrk\"\r\narcade_md_fixitfelixjr = \"md_fixitfelixjr\"\r\narcade_md_flashb = \"md_flashb\"\r\narcade_md_flashbj = \"md_flashb\"\r\narcade_md_flashbu = \"md_flashb\"\r\narcade_md_flashbu1 = \"md_flashb\"\r\narcade_md_flashp = \"md_flashp\"\r\narcade_md_flicky = \"md_flicky\"\r\narcade_md_flink = \"md_flink\"\r\narcade_md_flint = \"md_flint\"\r\narcade_md_flintj = \"md_flint\"\r\narcade_md_flintu = \"md_flint\"\r\narcade_md_flux = \"md_flux\"\r\narcade_md_foreman = \"md_foreman\"\r\narcade_md_forgottn = \"md_forgottn\"\r\narcade_md_forgottn1 = \"md_forgottn\"\r\narcade_md_formula1 = \"md_f1\"\r\narcade_md_franken = \"md_franken\"\r\narcade_md_frogger = \"md_frogger\"\r\narcade_md_funcar = \"md_funcar\"\r\narcade_md_funngame = \"md_funngame\"\r\narcade_md_funngameu = \"md_funngame\"\r\narcade_md_funnywld = \"md_funnywld\"\r\narcade_md_futbol = \"md_fifa95\"\r\narcade_md_fzone = \"md_fzone\"\r\narcade_md_gadget = \"md_gadget\"\r\narcade_md_gaiares = \"md_gaiares\"\r\narcade_md_galahad = \"md_galahad\"\r\narcade_md_gambler = \"md_gambler\"\r\narcade_md_gamenko = \"md_gamenko\"\r\narcade_md_gameto = \"md_gameto\"\r\narcade_md_garfield = \"md_garfield\"\r\narcade_md_gargoyle = \"md_gargoyle\"\r\narcade_md_garou = \"md_fatfury\"\r\narcade_md_garou2 = \"md_fatfury2\"\r\narcade_md_gauntlt4 = \"md_gauntlt4\"\r\narcade_md_gauntlt4a = \"md_gauntlt4\"\r\narcade_md_gauntlt4j = \"md_gauntlt4\"\r\narcade_md_gemfire = \"md_gemfire\"\r\narcade_md_gems = \"md_gems\"\r\narcade_md_genchaos = \"md_genchaos\"\r\narcade_md_genchaosj = \"md_genchaos\"\r\narcade_md_genchohi = \"md_genghis2\"\r\narcade_md_genelost = \"md_genelost\"\r\narcade_md_genghis2 = \"md_genghis2\"\r\narcade_md_georgeko = \"md_georgeko\"\r\narcade_md_georgekou = \"md_georgeko\"\r\narcade_md_gforce2 = \"md_gforce2\"\r\narcade_md_gforce2a = \"md_gforce2\"\r\narcade_md_ggenie = \"md_ggenie\"\r\narcade_md_ggenie1 = \"md_ggenie\"\r\narcade_md_gground = \"md_gground\"\r\narcade_md_gground1p = \"md_gground\"\r\narcade_md_ghostbst = \"md_ghostbst\"\r\narcade_md_ghostbst1 = \"md_ghostbst\"\r\narcade_md_ghouls = \"md_ghouls\"\r\narcade_md_ghouls1 = \"md_ghouls\"\r\narcade_md_ghw = \"md_ghw\"\r\narcade_md_ghwj = \"md_ghw\"\r\narcade_md_ghwu = \"md_ghw\"\r\narcade_md_gleylanc = \"md_gleylanc\"\r\narcade_md_gleylance = \"md_gleylanc\"\r\narcade_md_gloc = \"md_gloc\"\r\narcade_md_glocp = \"md_gloc\"\r\narcade_md_gods = \"md_gods\"\r\narcade_md_godsj = \"md_gods\"\r\narcade_md_godsu = \"md_gods\"\r\narcade_md_godsup = \"md_gods\"\r\narcade_md_golden10 = \"md_golden10\"\r\narcade_md_goldnax2 = \"md_goldnax2\"\r\narcade_md_goldnax2p = \"md_goldnax2\"\r\narcade_md_goldnax3 = \"md_goldnax3\"\r\narcade_md_goldnax3nc = \"md_goldnax3\"\r\narcade_md_goldnaxe = \"md_goldnaxe\"\r\narcade_md_goldnaxe1 = \"md_goldnaxe\"\r\narcade_md_gomora = \"md_gomora\"\r\narcade_md_goofy = \"md_goofy\"\r\narcade_md_gouketsu = \"md_gouketsu\"\r\narcade_md_granada = \"md_granada\"\r\narcade_md_granada1 = \"md_granada\"\r\narcade_md_grandsl = \"md_grandsl\"\r\narcade_md_grandslj = \"md_grandsl\"\r\narcade_md_greatcirj = \"md_mickeycm\"\r\narcade_md_greendog = \"md_greendog\"\r\narcade_md_grindst = \"md_grindst\"\r\narcade_md_growl = \"md_growl\"\r\narcade_md_gt5 = \"md_funcar\"\r\narcade_md_gunship = \"md_gunship\"\r\narcade_md_gunstar = \"md_gunstar\"\r\narcade_md_gunstarj = \"md_gunstar\"\r\narcade_md_gunstarjs = \"md_gunstar\"\r\narcade_md_gunstaru = \"md_gunstar\"\r\narcade_md_gynoug = \"md_gynoug\"\r\narcade_md_gynougj = \"md_gynoug\"\r\narcade_md_hardbal3 = \"md_hardbal3\"\r\narcade_md_hardball = \"md_hardball\"\r\narcade_md_hardbl94 = \"md_hardbl94\"\r\narcade_md_hardbl95 = \"md_hardbl95\"\r\narcade_md_harddriv = \"md_harddriv\"\r\narcade_md_haunting = \"md_haunting\"\r\narcade_md_havoc = \"md_havoc\"\r\narcade_md_havocu = \"md_havoc\"\r\narcade_md_headon = \"md_feverpit\"\r\narcade_md_heavynov = \"md_heavynov\"\r\narcade_md_heitao = \"md_heitao\"\r\narcade_md_hellfire = \"md_hellfire\"\r\narcade_md_hellfirej = \"md_hellfire\"\r\narcade_md_hellfireu = \"md_hellfire\"\r\narcade_md_hercules = \"md_dahnam\"\r\narcade_md_herculs2 = \"md_herculs2\"\r\narcade_md_herzog = \"md_herzog\"\r\narcade_md_herzogj = \"md_herzog\"\r\narcade_md_hitice = \"md_hitice\"\r\narcade_md_hokuto = \"md_lastbtle\"\r\narcade_md_homea = \"md_homea\"\r\narcade_md_homea2 = \"md_homea2\"\r\narcade_md_homeap = \"md_homea\"\r\narcade_md_hook = \"md_hook\"\r\narcade_md_hooku = \"md_hook\"\r\narcade_md_hpotter = \"md_hpotter\"\r\narcade_md_hpotter2 = \"md_mickmack\"\r\narcade_md_huamul = \"md_huamul\"\r\narcade_md_huanle = \"md_huanle\"\r\narcade_md_hulk = \"md_hulk\"\r\narcade_md_humans = \"md_humans\"\r\narcade_md_hurrican = \"md_hurrican\"\r\narcade_md_hvyunit = \"md_hvyunit\"\r\narcade_md_hybridf = \"md_hybridf\"\r\narcade_md_hybridfp = \"md_hybridf\"\r\narcade_md_hyokkohj = \"md_hyokkohj\"\r\narcade_md_hyperdnk = \"md_hyperdnk\"\r\narcade_md_hyperdnkj = \"md_hyperdnk\"\r\narcade_md_hyperdnkjp = \"md_hyperdnk\"\r\narcade_md_hyperm = \"md_hyperm\"\r\narcade_md_hypermgnk = \"md_hyperm\"\r\narcade_md_iceage = \"md_awepossm\"\r\narcade_md_iceage3 = \"md_chuckrck\"\r\narcade_md_iceage4 = \"md_chuckrck\"\r\narcade_md_ichir = \"md_ichir\"\r\narcade_md_imgitt = \"md_imgitt\"\r\narcade_md_immortal = \"md_immortal\"\r\narcade_md_immortalj = \"md_immortal\"\r\narcade_md_incredib = \"md_tick\"\r\narcade_md_indycrus = \"md_indycrus\"\r\narcade_md_indycrusu = \"md_indycrus\"\r\narcade_md_indyrus = \"md_rickdang\"\r\narcade_md_insectx = \"md_insectx\"\r\narcade_md_insectxj = \"md_insectx\"\r\narcade_md_instch = \"md_instch\"\r\narcade_md_instchp1 = \"md_instch\"\r\narcade_md_instchp2 = \"md_instch\"\r\narcade_md_instchp3 = \"md_instch\"\r\narcade_md_instchp4 = \"md_instch\"\r\narcade_md_instchp5 = \"md_instch\"\r\narcade_md_instchp6 = \"md_instch\"\r\narcade_md_instchp7 = \"md_instch\"\r\narcade_md_instchp8 = \"md_instch\"\r\narcade_md_instchp9 = \"md_instch\"\r\narcade_md_intrugby = \"md_intrugby\"\r\narcade_md_iraqwar = \"md_iraqwar\"\r\narcade_md_iraqwara = \"md_iraqwar\"\r\narcade_md_ishido = \"md_ishido\"\r\narcade_md_issdx = \"md_issdx\"\r\narcade_md_issdxrne = \"md_issdx\"\r\narcade_md_itcame = \"md_itcame\"\r\narcade_md_itchy = \"md_itchy\"\r\narcade_md_izzyqst = \"md_izzyqst\"\r\narcade_md_jammit = \"md_jammit\"\r\narcade_md_janout = \"md_janout\"\r\narcade_md_jantei = \"md_jantei\"\r\narcade_md_jb007 = \"md_jb007\"\r\narcade_md_jb007j = \"md_jb007\"\r\narcade_md_jb007u = \"md_jb007\"\r\narcade_md_jbdougko = \"md_jbdougko\"\r\narcade_md_jdredd = \"md_jdredd\"\r\narcade_md_jdreddp1 = \"md_jdredd\"\r\narcade_md_jdreddp2 = \"md_jdredd\"\r\narcade_md_jellyboy = \"md_jellyboy\"\r\narcade_md_jennifct = \"md_grandsl\"\r\narcade_md_jeopardd = \"md_jeopardd\"\r\narcade_md_jeopards = \"md_jeopards\"\r\narcade_md_jeopardy = \"md_jeopardy\"\r\narcade_md_jewelms = \"md_jewelms\"\r\narcade_md_jewelmsj = \"md_jewelms\"\r\narcade_md_jimmywws = \"md_jimmywws\"\r\narcade_md_jimpower = \"md_jimpower\"\r\narcade_md_jiujim = \"md_jiujim\"\r\narcade_md_jlcs = \"md_euroclub\"\r\narcade_md_jleague = \"md_jleague\"\r\narcade_md_jlps = \"md_jlps\"\r\narcade_md_jlps2 = \"md_jlps2\"\r\narcade_md_jlpsa = \"md_jlps\"\r\narcade_md_jlpsp = \"md_jlpsp\"\r\narcade_md_joemac = \"md_joemac\"\r\narcade_md_joemont = \"md_joemont\"\r\narcade_md_joemont2 = \"md_joemont2\"\r\narcade_md_joemont2a = \"md_joemont2\"\r\narcade_md_jordanb = \"md_jordanb\"\r\narcade_md_jordanb1 = \"md_jordanb\"\r\narcade_md_jordanbj = \"md_jordanb\"\r\narcade_md_joshua = \"md_joshua\"\r\narcade_md_jpark = \"md_jpark\"\r\narcade_md_jparkj = \"md_jpark\"\r\narcade_md_jparkre = \"md_jparkre\"\r\narcade_md_jparkrep1 = \"md_jparkre\"\r\narcade_md_jparkrep2 = \"md_jparkre\"\r\narcade_md_jparkrep3 = \"md_jparkre\"\r\narcade_md_jparkrep4 = \"md_jparkre\"\r\narcade_md_jparkrep5 = \"md_jparkre\"\r\narcade_md_jparkrep6 = \"md_jparkre\"\r\narcade_md_jparkrep7 = \"md_jparkre\"\r\narcade_md_jparkrep8 = \"md_jparkre\"\r\narcade_md_jparkrep9 = \"md_jparkre\"\r\narcade_md_jparku = \"md_jpark\"\r\narcade_md_jparkup = \"md_jpark\"\r\narcade_md_jpond = \"md_jpond\"\r\narcade_md_jpond3 = \"md_jpond3\"\r\narcade_md_jstrike = \"md_jstrike\"\r\narcade_md_jstrikej = \"md_jstrike\"\r\narcade_md_jstrikep = \"md_jstrike\"\r\narcade_md_junction = \"md_junction\"\r\narcade_md_jungle = \"md_jungle\"\r\narcade_md_jungleu = \"md_jungle\"\r\narcade_md_junker = \"md_outr2019\"\r\narcade_md_juuouki = \"md_altbeast\"\r\narcade_md_juuouki1 = \"md_altbeast\"\r\narcade_md_kageki = \"md_kageki\"\r\narcade_md_kagekij = \"md_kageki\"\r\narcade_md_kawasaki = \"md_kawasaki\"\r\narcade_md_kawasakip = \"md_kawasaki\"\r\narcade_md_kfpanda2 = \"md_brutal\"\r\narcade_md_kickbox = \"md_bestof\"\r\narcade_md_kickoff3 = \"md_kickoff3\"\r\narcade_md_kidcham = \"md_kidcham\"\r\narcade_md_kidchamj = \"md_kidcham\"\r\narcade_md_killshow = \"md_fatalrew\"\r\narcade_md_kingcol = \"md_kingcol\"\r\narcade_md_kingcole = \"md_kingcol\"\r\narcade_md_kingsal = \"md_kingsal\"\r\narcade_md_kingsalj = \"md_kingsal\"\r\narcade_md_kingsbty = \"md_kingsbty\"\r\narcade_md_kishiden = \"md_kishiden\"\r\narcade_md_kissshot = \"md_kissshot\"\r\narcade_md_klax = \"md_klax\"\r\narcade_md_klaxj = \"md_klax\"\r\narcade_md_knucklp = \"md_knucklp\"\r\narcade_md_kof2k = \"md_kof98\"\r\narcade_md_kof98 = \"md_kof98\"\r\narcade_md_kof98a = \"md_kof98\"\r\narcade_md_kof99 = \"md_kof99\"\r\narcade_md_kof99a = \"md_kof99\"\r\narcade_md_kolobok = \"md_kolobok\"\r\narcade_md_koteteik = \"md_empsteel\"\r\narcade_md_kotm = \"md_kotm\"\r\narcade_md_kotm2 = \"md_kotm2\"\r\narcade_md_kotmj = \"md_kotm\"\r\narcade_md_kotmu = \"md_kotm\"\r\narcade_md_krusty = \"md_krusty\"\r\narcade_md_krusty1 = \"md_krusty\"\r\narcade_md_ktesonic = \"md_sonic\"\r\narcade_md_ktiger = \"md_twincobr\"\r\narcade_md_kujaku2 = \"md_mystdef\"\r\narcade_md_kuuga = \"md_vaportr\"\r\narcade_md_kuzyaeo = \"md_chukrck2\"\r\narcade_md_kuzyamd = \"md_chukrck2\"\r\narcade_md_kyukaidk = \"md_kyukaidk\"\r\narcade_md_labdeath = \"md_fatallab\"\r\narcade_md_labdeathgnk = \"md_fatallab\"\r\narcade_md_lakers = \"md_lakers\"\r\narcade_md_landstlk = \"md_landstlk\"\r\narcade_md_landstlkf = \"md_landstlk\"\r\narcade_md_landstlkg = \"md_landstlk\"\r\narcade_md_landstlkj = \"md_landstlk\"\r\narcade_md_landstlku = \"md_landstlk\"\r\narcade_md_landstlkup = \"md_landstlk\"\r\narcade_md_langris2 = \"md_langris2\"\r\narcade_md_langris2a = \"md_langris2\"\r\narcade_md_langris2b = \"md_langris2\"\r\narcade_md_langris2e = \"md_langris2\"\r\narcade_md_langriss = \"md_warsong\"\r\narcade_md_laruss95 = \"md_laruss95\"\r\narcade_md_larussa = \"md_larussa\"\r\narcade_md_lasorda = \"md_suprleag\"\r\narcade_md_lastact = \"md_lastact\"\r\narcade_md_lastbtle = \"md_lastbtle\"\r\narcade_md_lawnmowr = \"md_lawnmowr\"\r\narcade_md_le2 = \"md_le2\"\r\narcade_md_le2u = \"md_le2\"\r\narcade_md_legobatman = \"md_legobatman\"\r\narcade_md_lemming2 = \"md_lemming2\"\r\narcade_md_lemming2u = \"md_lemming2\"\r\narcade_md_lemmings = \"md_lemmings\"\r\narcade_md_lemmingsju = \"md_lemmings\"\r\narcade_md_lemmingsju1 = \"md_lemmings\"\r\narcade_md_lethalen = \"md_lethalen\"\r\narcade_md_lethalenj = \"md_lethalen\"\r\narcade_md_lethalenu = \"md_lethalen\"\r\narcade_md_leynos = \"md_trgearth\"\r\narcade_md_lhx = \"md_lhx\"\r\narcade_md_lhxj = \"md_lhx\"\r\narcade_md_liberty = \"md_liberty\"\r\narcade_md_lightc = \"md_lightc\"\r\narcade_md_lightcj = \"md_lightc\"\r\narcade_md_lightck = \"md_lightc\"\r\narcade_md_lightcp = \"md_lightc\"\r\narcade_md_lightcu = \"md_lightc\"\r\narcade_md_lightfor = \"md_tf4\"\r\narcade_md_lionkin2 = \"md_lionkin2\"\r\narcade_md_lionkin2a = \"md_lionkin2\"\r\narcade_md_lionkin3 = \"md_lionkin3\"\r\narcade_md_lionkin3a = \"md_lionkin3\"\r\narcade_md_lionkin3b = \"md_lionkin3\"\r\narcade_md_lionking = \"md_lionking\"\r\narcade_md_lobo = \"md_lobo\"\r\narcade_md_long = \"md_long\"\r\narcade_md_lordmon = \"md_lordmon\"\r\narcade_md_lostvik = \"md_lostvik\"\r\narcade_md_lostvikp = \"md_lostvik\"\r\narcade_md_lostviku = \"md_lostvik\"\r\narcade_md_lostwrld = \"md_lostwrld\"\r\narcade_md_lotr = \"md_strmlord\"\r\narcade_md_lotrgs = \"md_lotrgs\"\r\narcade_md_lotus2 = \"md_lotus2\"\r\narcade_md_lotus2p = \"md_lotus2\"\r\narcade_md_lotust = \"md_lotust\"\r\narcade_md_m1abrams = \"md_m1abrams\"\r\narcade_md_madagopp = \"md_magichat\"\r\narcade_md_madagsc3 = \"md_dinotale\"\r\narcade_md_madd93ce = \"md_madd93ce\"\r\narcade_md_madden = \"md_madden\"\r\narcade_md_madden92 = \"md_madden92\"\r\narcade_md_madden93 = \"md_madden93\"\r\narcade_md_madden94 = \"md_madden94\"\r\narcade_md_madden95 = \"md_madden95\"\r\narcade_md_madden96 = \"md_madden96\"\r\narcade_md_madden97 = \"md_madden97\"\r\narcade_md_madden98 = \"md_madden98\"\r\narcade_md_maddenj = \"md_madden\"\r\narcade_md_madoumon = \"md_madoumon\"\r\narcade_md_mafia = \"md_dicktr\"\r\narcade_md_magichat = \"md_magichat\"\r\narcade_md_magist16 = \"md_magist16\"\r\narcade_md_mahjongc = \"md_mahjongc\"\r\narcade_md_majian = \"md_majian\"\r\narcade_md_majiana = \"md_majian\"\r\narcade_md_mamono = \"md_mamono\"\r\narcade_md_manover = \"md_manover\"\r\narcade_md_mansell = \"md_mansell\"\r\narcade_md_mansellu = \"md_mansell\"\r\narcade_md_maouren = \"md_mysticf\"\r\narcade_md_maqiao = \"md_maqiao\"\r\narcade_md_marble = \"md_marble\"\r\narcade_md_mario3 = \"md_mario3\"\r\narcade_md_mario4 = \"md_mario4\"\r\narcade_md_mariolh = \"md_mariolh\"\r\narcade_md_marko = \"md_marko\"\r\narcade_md_markop = \"md_marko\"\r\narcade_md_markou = \"md_marko\"\r\narcade_md_marsup = \"md_marsup\"\r\narcade_md_marsupu = \"md_marsup\"\r\narcade_md_marvland = \"md_talmit\"\r\narcade_md_marvlandj = \"md_talmit\"\r\narcade_md_masiaka = \"md_masiaka\"\r\narcade_md_masterm = \"md_masterm\"\r\narcade_md_mastermj = \"md_masterm\"\r\narcade_md_maten = \"md_maten\"\r\narcade_md_mathblst = \"md_mathblst\"\r\narcade_md_mauimall = \"md_mauimall\"\r\narcade_md_mauimallb = \"md_mauimall\"\r\narcade_md_mazinsaga = \"md_mazinwar\"\r\narcade_md_mazinsagj = \"md_mazinwar\"\r\narcade_md_mazinsagu = \"md_mazinwar\"\r\narcade_md_mazinwar = \"md_mazinwar\"\r\narcade_md_mbubble = \"md_mbubble\"\r\narcade_md_mcdonald = \"md_mcdonald\"\r\narcade_md_mcdonaldj = \"md_mcdonald\"\r\narcade_md_mcdonaldjp = \"md_mcdonald\"\r\narcade_md_mcdonaldu = \"md_mcdonald\"\r\narcade_md_medalc = \"md_medalc\"\r\narcade_md_megabm8 = \"md_megabm8\"\r\narcade_md_megabomb = \"md_megabomb\"\r\narcade_md_megabombu = \"md_megabomb\"\r\narcade_md_megaga1 = \"md_megaga1\"\r\narcade_md_megaga10 = \"md_megaga10\"\r\narcade_md_megaga2 = \"md_megaga2\"\r\narcade_md_megaga3 = \"md_megaga3\"\r\narcade_md_megaga61 = \"md_megaga61\"\r\narcade_md_megaga62 = \"md_megaga62\"\r\narcade_md_megaga63 = \"md_megaga63\"\r\narcade_md_megalo = \"md_megalo\"\r\narcade_md_megalo1 = \"md_megalo\"\r\narcade_md_megalof = \"md_megalo\"\r\narcade_md_megaloj = \"md_megalo\"\r\narcade_md_megaman = \"md_megaman\"\r\narcade_md_megamind = \"md_megamind\"\r\narcade_md_meganet = \"md_meganet\"\r\narcade_md_meganser = \"md_meganser\"\r\narcade_md_megapanl = \"md_megapanl\"\r\narcade_md_megaqbert11 = \"md_megaqbert11\"\r\narcade_md_megaswiv = \"md_megaswiv\"\r\narcade_md_megaswivb = \"md_megaswiv\"\r\narcade_md_megatrax = \"md_quadchal\"\r\narcade_md_megaturr = \"md_megaturr\"\r\narcade_md_megaturru = \"md_megaturr\"\r\narcade_md_menacer = \"md_menacer\"\r\narcade_md_menghu = \"md_menghu\"\r\narcade_md_mercs = \"md_mercs\"\r\narcade_md_metalfng = \"md_metalfng\"\r\narcade_md_mevo = \"md_sonic\"\r\narcade_md_mfpool = \"md_mfpool\"\r\narcade_md_mgs = \"md_crkdown\"\r\narcade_md_mickeycm = \"md_mickeycm\"\r\narcade_md_mickeyuc = \"md_mickeyuc\"\r\narcade_md_mickmack = \"md_mickmack\"\r\narcade_md_mickmacku = \"md_mickmack\"\r\narcade_md_mickmackup = \"md_mickmack\"\r\narcade_md_microm96 = \"md_microm96\"\r\narcade_md_microm96a = \"md_microm96\"\r\narcade_md_micromac = \"md_micromac\"\r\narcade_md_micromaca = \"md_micromac\"\r\narcade_md_micromacb = \"md_micromac\"\r\narcade_md_micromacc = \"md_micromac\"\r\narcade_md_micromc2 = \"md_micromc2\"\r\narcade_md_micromc2a = \"md_micromc2\"\r\narcade_md_micromm = \"md_micromm\"\r\narcade_md_midres = \"md_midres\"\r\narcade_md_midresj = \"md_midres\"\r\narcade_md_mig29 = \"md_mig29\"\r\narcade_md_mig29j = \"md_mig29\"\r\narcade_md_mig29u = \"md_mig29\"\r\narcade_md_mightmag = \"md_mightmag\"\r\narcade_md_mightmax = \"md_mightmax\"\r\narcade_md_mightmaxu = \"md_mightmax\"\r\narcade_md_mightmg3 = \"md_mightmg3\"\r\narcade_md_miniplanets = \"md_miniplanets\"\r\narcade_md_miracle9 = \"md_miracle9\"\r\narcade_md_miraclep = \"md_miraclep\"\r\narcade_md_mk = \"md_mk\"\r\narcade_md_mk2 = \"md_mk2\"\r\narcade_md_mk2wu = \"md_mk2\"\r\narcade_md_mk3 = \"md_mk3\"\r\narcade_md_mk3m = \"md_mk3\"\r\narcade_md_mk3u = \"md_mk3\"\r\narcade_md_mk5 = \"md_mk5\"\r\narcade_md_mk5a = \"md_mk5\"\r\narcade_md_mka = \"md_mk\"\r\narcade_md_mkr = \"md_umk3t\"\r\narcade_md_mlbpa = \"md_mlbpa\"\r\narcade_md_mlfootb = \"md_mlfootb\"\r\narcade_md_mlfootbj = \"md_mlfootb\"\r\narcade_md_mlhockey = \"md_mlhockey\"\r\narcade_md_mmania = \"md_mmania\"\r\narcade_md_mmaniaj = \"md_mmania\"\r\narcade_md_mmaniau = \"md_mmania\"\r\narcade_md_mmaniaup = \"md_mmania\"\r\narcade_md_mmpr = \"md_mmpr\"\r\narcade_md_mmprfe = \"md_mmprfe\"\r\narcade_md_mmprp1 = \"md_mmpr\"\r\narcade_md_mmprp2 = \"md_mmpr\"\r\narcade_md_mmprp3 = \"md_mmpr\"\r\narcade_md_mmprp4 = \"md_mmpr\"\r\narcade_md_mmprp5 = \"md_mmpr\"\r\narcade_md_mmprp6 = \"md_mmpr\"\r\narcade_md_mmprtm = \"md_mmprtm\"\r\narcade_md_mmprtmp1 = \"md_mmprtm\"\r\narcade_md_mmprtmp2 = \"md_mmprtm\"\r\narcade_md_mmprtmp3 = \"md_mmprtm\"\r\narcade_md_mmprtmp4 = \"md_mmprtm\"\r\narcade_md_mmprtmu = \"md_mmprtm\"\r\narcade_md_mmpru = \"md_mmpr\"\r\narcade_md_monopoly = \"md_monopoly\"\r\narcade_md_monopolyp = \"md_monopoly\"\r\narcade_md_monstinc = \"md_decapatt\"\r\narcade_md_mrnutz = \"md_mrnutz\"\r\narcade_md_mrnutz2 = \"md_mrnutz2\"\r\narcade_md_msb = \"md_msb\"\r\narcade_md_msbp01 = \"md_msb\"\r\narcade_md_msbp02 = \"md_msb\"\r\narcade_md_msbp03 = \"md_msb\"\r\narcade_md_msbp04 = \"md_msb\"\r\narcade_md_msbp05 = \"md_msb\"\r\narcade_md_msbp06 = \"md_msb\"\r\narcade_md_msbp07 = \"md_msb\"\r\narcade_md_msbp08 = \"md_msb\"\r\narcade_md_msbp09 = \"md_msb\"\r\narcade_md_msbp10 = \"md_msb\"\r\narcade_md_msbp11 = \"md_msb\"\r\narcade_md_msbp12 = \"md_msb\"\r\narcade_md_msonichd = \"md_sonic\"\r\narcade_md_mspacman = \"md_mspacman\"\r\narcade_md_mspacmanpir = \"md_mspacman\"\r\narcade_md_mtaruru = \"md_mtaruru\"\r\narcade_md_muhammad = \"md_muhammad\"\r\narcade_md_muhammadu = \"md_muhammad\"\r\narcade_md_muhammadup = \"md_muhammad\"\r\narcade_md_musha = \"md_musha\"\r\narcade_md_mushaj = \"md_musha\"\r\narcade_md_mvpbb = \"md_mvpbb\"\r\narcade_md_mwalk = \"md_mwalk\"\r\narcade_md_mwalk1 = \"md_mwalk\"\r\narcade_md_mweapon = \"md_mweapon\"\r\narcade_md_mworld4 = \"md_mworld4\"\r\narcade_md_mworld4eng = \"md_mworld4\"\r\narcade_md_mworld4eng2 = \"md_mworld4\"\r\narcade_md_mystdef = \"md_mystdef\"\r\narcade_md_mystdefa = \"md_mystdef\"\r\narcade_md_mysticf = \"md_mysticf\"\r\narcade_md_n3dgaugu = \"md_n3dgaugu\"\r\narcade_md_n3dgdevi = \"md_n3dgdevi\"\r\narcade_md_n3dgpebb = \"md_pebble\"\r\narcade_md_n3dgwaia = \"md_n3dgwaia\"\r\narcade_md_nadia = \"md_nadia\"\r\narcade_md_nadiae = \"md_nadia\"\r\narcade_md_nakaf1gp = \"md_nakaf1gp\"\r\narcade_md_nakaf1sl = \"md_nakaf1sl\"\r\narcade_md_narnia3 = \"md_galahad\"\r\narcade_md_naruto = \"md_3ninja\"\r\narcade_md_nba2k = \"md_nbaact\"\r\narcade_md_nba2k5 = \"md_nbaact95\"\r\narcade_md_nbaact = \"md_nbaact\"\r\narcade_md_nbaact95 = \"md_nbaact95\"\r\narcade_md_nbaact95p01 = \"md_nbaact95\"\r\narcade_md_nbaact95p02 = \"md_nbaact95\"\r\narcade_md_nbaact95p03 = \"md_nbaact95\"\r\narcade_md_nbaact95p04 = \"md_nbaact95\"\r\narcade_md_nbaact95p05 = \"md_nbaact95\"\r\narcade_md_nbaact95p06 = \"md_nbaact95\"\r\narcade_md_nbaact95p07 = \"md_nbaact95\"\r\narcade_md_nbaact95p08 = \"md_nbaact95\"\r\narcade_md_nbaact95p09 = \"md_nbaact95\"\r\narcade_md_nbaact95p10 = \"md_nbaact95\"\r\narcade_md_nbaact95p11 = \"md_nbaact95\"\r\narcade_md_nbaact95p12 = \"md_nbaact95\"\r\narcade_md_nbaact95p13 = \"md_nbaact95\"\r\narcade_md_nbaact95p14 = \"md_nbaact95\"\r\narcade_md_nbaact95p15 = \"md_nbaact95\"\r\narcade_md_nbaact95p16 = \"md_nbaact95\"\r\narcade_md_nbaact95p17 = \"md_nbaact95\"\r\narcade_md_nbaact95p18 = \"md_nbaact95\"\r\narcade_md_nbaact95p19 = \"md_nbaact95\"\r\narcade_md_nbaact95p20 = \"md_nbaact95\"\r\narcade_md_nbaact95p21 = \"md_nbaact95\"\r\narcade_md_nbaact95p22 = \"md_nbaact95\"\r\narcade_md_nbaact95p23 = \"md_nbaact95\"\r\narcade_md_nbaact95p24 = \"md_nbaact95\"\r\narcade_md_nbaact95p25 = \"md_nbaact95\"\r\narcade_md_nbaactp1 = \"md_nbaact\"\r\narcade_md_nbaactp2 = \"md_nbaact\"\r\narcade_md_nbaactp3 = \"md_nbaact\"\r\narcade_md_nbaallst = \"md_nbaallst\"\r\narcade_md_nbahang = \"md_nbahang\"\r\narcade_md_nbahangu = \"md_nbahang\"\r\narcade_md_nbajam = \"md_nbajam\"\r\narcade_md_nbajam1 = \"md_nbajam\"\r\narcade_md_nbajamj = \"md_nbajam\"\r\narcade_md_nbajamjp = \"md_nbajam\"\r\narcade_md_nbajamte = \"md_nbajamte\"\r\narcade_md_nbajamtef = \"md_nbajamte\"\r\narcade_md_nbaliv95 = \"md_nbaliv95\"\r\narcade_md_nbaliv95k = \"md_nbaliv95\"\r\narcade_md_nbaliv96 = \"md_nbaliv96\"\r\narcade_md_nbaliv97 = \"md_nbaliv97\"\r\narcade_md_nbaliv98 = \"md_nbaliv98\"\r\narcade_md_nbapro94 = \"md_nbapro94\"\r\narcade_md_nbashow = \"md_nbashow\"\r\narcade_md_nbashowp = \"md_nbashow\"\r\narcade_md_ncaabask = \"md_ncaabask\"\r\narcade_md_ncaafoot = \"md_ncaafoot\"\r\narcade_md_ncirc = \"md_ncirc\"\r\narcade_md_ncirc1 = \"md_ncirc\"\r\narcade_md_ncircp = \"md_ncirc\"\r\narcade_md_neksoccr = \"md_neksoccr\"\r\narcade_md_nemo = \"md_jpond\"\r\narcade_md_newhoriz = \"md_newhoriz\"\r\narcade_md_newmanh = \"md_newmanh\"\r\narcade_md_nfl94 = \"md_nfl94\"\r\narcade_md_nfl94j = \"md_nfl94\"\r\narcade_md_nfl95 = \"md_nfl95\"\r\narcade_md_nfl95p01 = \"md_nfl95\"\r\narcade_md_nfl95p02 = \"md_nfl95\"\r\narcade_md_nfl95p03 = \"md_nfl95\"\r\narcade_md_nfl95p04 = \"md_nfl95\"\r\narcade_md_nfl95p05 = \"md_nfl95\"\r\narcade_md_nfl95p06 = \"md_nfl95\"\r\narcade_md_nfl95p07 = \"md_nfl95\"\r\narcade_md_nfl95p08 = \"md_nfl95\"\r\narcade_md_nfl95p09 = \"md_nfl95\"\r\narcade_md_nfl95p10 = \"md_nfl95\"\r\narcade_md_nfl95p11 = \"md_nfl95\"\r\narcade_md_nfl95p12 = \"md_nfl95\"\r\narcade_md_nfl95p13 = \"md_nfl95\"\r\narcade_md_nfl95p14 = \"md_nfl95\"\r\narcade_md_nfl95p15 = \"md_nfl95\"\r\narcade_md_nfl95p16 = \"md_nfl95\"\r\narcade_md_nfl95p17 = \"md_nfl95\"\r\narcade_md_nfl95p18 = \"md_nfl95\"\r\narcade_md_nfl95p19 = \"md_nfl95\"\r\narcade_md_nfl95p20 = \"md_nfl95\"\r\narcade_md_nfl95p21 = \"md_nfl95\"\r\narcade_md_nfl98 = \"md_nfl98\"\r\narcade_md_nflqb = \"md_nflqb\"\r\narcade_md_nflqb96 = \"md_nflqb96\"\r\narcade_md_nflsport = \"md_nflsport\"\r\narcade_md_nfsu = \"md_toutrun\"\r\narcade_md_ngaiden = \"md_ngaiden\"\r\narcade_md_nhktaidr = \"md_nhktaidr\"\r\narcade_md_nhl = \"md_nhl\"\r\narcade_md_nhl94 = \"md_nhl94\"\r\narcade_md_nhl95 = \"md_nhl95\"\r\narcade_md_nhl96 = \"md_nhl96\"\r\narcade_md_nhl97 = \"md_nhl97\"\r\narcade_md_nhl98 = \"md_nhl98\"\r\narcade_md_nhlas = \"md_nhlas\"\r\narcade_md_nhlasp01 = \"md_nhlas\"\r\narcade_md_nhlasp02 = \"md_nhlas\"\r\narcade_md_nhlasp03 = \"md_nhlas\"\r\narcade_md_nhlasp04 = \"md_nhlas\"\r\narcade_md_nhlasp05 = \"md_nhlas\"\r\narcade_md_nhlasp06 = \"md_nhlas\"\r\narcade_md_nhlasp07 = \"md_nhlas\"\r\narcade_md_nhlasp08 = \"md_nhlas\"\r\narcade_md_nhlasp09 = \"md_nhlas\"\r\narcade_md_nhlasp10 = \"md_nhlas\"\r\narcade_md_nhlasp11 = \"md_nhlas\"\r\narcade_md_nhlasp12 = \"md_nhlas\"\r\narcade_md_nhlasp13 = \"md_nhlas\"\r\narcade_md_nhlasp14 = \"md_nhlas\"\r\narcade_md_nhlasp15 = \"md_nhlas\"\r\narcade_md_nhlasp16 = \"md_nhlas\"\r\narcade_md_nhlpa2k3 = \"md_nhl98\"\r\narcade_md_nhlpa93 = \"md_nhlpa93\"\r\narcade_md_nhlpa93a = \"md_nhlpa93\"\r\narcade_md_nicklaus = \"md_nicklaus\"\r\narcade_md_nikkan = \"md_nikkan\"\r\narcade_md_ninjab = \"md_ninjab\"\r\narcade_md_nobuamb = \"md_nobuamb\"\r\narcade_md_nobubufu = \"md_nobubufu\"\r\narcade_md_nobuhao = \"md_nobuhao\"\r\narcade_md_nobuzenk = \"md_nobuamb\"\r\narcade_md_noescape = \"md_noescape\"\r\narcade_md_normy = \"md_normy\"\r\narcade_md_ohmummy = \"md_ohmummy\"\r\narcade_md_olympgld = \"md_olympgld\"\r\narcade_md_olympgldj = \"md_olympgld\"\r\narcade_md_olympgldu = \"md_olympgld\"\r\narcade_md_olympgldu1 = \"md_olympgld\"\r\narcade_md_olympsum = \"md_olympsum\"\r\narcade_md_ondal = \"md_mystdef\"\r\narcade_md_onslau = \"md_onslau\"\r\narcade_md_ootw = \"md_anotherw\"\r\narcade_md_ootwp = \"md_anotherw\"\r\narcade_md_ooze = \"md_ooze\"\r\narcade_md_oozeju = \"md_ooze\"\r\narcade_md_oozep01 = \"md_ooze\"\r\narcade_md_oozep02 = \"md_ooze\"\r\narcade_md_oozep03 = \"md_ooze\"\r\narcade_md_oozep04 = \"md_ooze\"\r\narcade_md_oozep05 = \"md_ooze\"\r\narcade_md_oozep06 = \"md_ooze\"\r\narcade_md_oozep07 = \"md_ooze\"\r\narcade_md_opensea = \"md_rolo\"\r\narcade_md_opensea3 = \"md_rolo\"\r\narcade_md_opeurope = \"md_opeurope\"\r\narcade_md_orunners = \"md_orunners\"\r\narcade_md_orunnersj = \"md_orunners\"\r\narcade_md_osomatsu = \"md_osomatsu\"\r\narcade_md_ottifant = \"md_ottifant\"\r\narcade_md_ottifantg = \"md_ottifant\"\r\narcade_md_outlandr = \"md_outlandr\"\r\narcade_md_outlandru = \"md_outlandr\"\r\narcade_md_outr2019 = \"md_outr2019\"\r\narcade_md_outr2019j = \"md_outr2019\"\r\narcade_md_outr2019u = \"md_outr2019\"\r\narcade_md_outr2019up = \"md_outr2019\"\r\narcade_md_outrun = \"md_outrun\"\r\narcade_md_outrunj = \"md_outrun\"\r\narcade_md_pacattak = \"md_pacpanic\"\r\narcade_md_pachinko = \"md_pachinko\"\r\narcade_md_pacman2 = \"md_pacman2\"\r\narcade_md_pacmania = \"md_pacmania\"\r\narcade_md_pacpanic = \"md_pacpanic\"\r\narcade_md_paddle = \"md_paddle\"\r\narcade_md_paddlegnk = \"md_paddle\"\r\narcade_md_pagemstr = \"md_pagemstr\"\r\narcade_md_pagemstru = \"md_pagemstr\"\r\narcade_md_pagemstrup = \"md_pagemstr\"\r\narcade_md_paperbo2 = \"md_paperbo2\"\r\narcade_md_paperboy = \"md_paperboy\"\r\narcade_md_paperboyj = \"md_paperboy\"\r\narcade_md_papicommandomd = \"md_papicommandomd\"\r\narcade_md_par = \"md_par\"\r\narcade_md_par2 = \"md_par2\"\r\narcade_md_par2a = \"md_par2\"\r\narcade_md_partyq = \"md_partyq\"\r\narcade_md_patlabor = \"md_patlabor\"\r\narcade_md_patriley = \"md_srealbas\"\r\narcade_md_pcarib = \"md_unchartd\"\r\narcade_md_pcarib2 = \"md_pcarib2\"\r\narcade_md_pcotton = \"md_pcotton\"\r\narcade_md_pdrive = \"md_pdrive\"\r\narcade_md_pebble = \"md_pebble\"\r\narcade_md_pebbleu = \"md_pebble\"\r\narcade_md_pele = \"md_pele\"\r\narcade_md_pele2 = \"md_pele2\"\r\narcade_md_pga = \"md_pga\"\r\narcade_md_pga2 = \"md_pga2\"\r\narcade_md_pga2a = \"md_pga2\"\r\narcade_md_pga2j = \"md_pga2\"\r\narcade_md_pga3 = \"md_pga3\"\r\narcade_md_pga96 = \"md_pga96\"\r\narcade_md_pgaa = \"md_pga\"\r\narcade_md_pgaeuro = \"md_pgaeuro\"\r\narcade_md_phantom = \"md_phantom\"\r\narcade_md_phantomu = \"md_phantom\"\r\narcade_md_phelios = \"md_phelios\"\r\narcade_md_pheliosj = \"md_phelios\"\r\narcade_md_pheliosu = \"md_phelios\"\r\narcade_md_pigskinf = \"md_pigskinf\"\r\narcade_md_pink = \"md_pink\"\r\narcade_md_pinkp = \"md_pink\"\r\narcade_md_pinoc = \"md_pinoc\"\r\narcade_md_pinocu = \"md_pinoc\"\r\narcade_md_piratedw = \"md_piratedw\"\r\narcade_md_piratedw1 = \"md_piratedw\"\r\narcade_md_pirates = \"md_pirates\"\r\narcade_md_piratesp = \"md_pirates\"\r\narcade_md_pitfall = \"md_pitfall\"\r\narcade_md_pitfallu = \"md_pitfall\"\r\narcade_md_pitfight = \"md_pitfight\"\r\narcade_md_pitfight1 = \"md_pitfight\"\r\narcade_md_pmonger = \"md_pmonger\"\r\narcade_md_pmongerj = \"md_pmonger\"\r\narcade_md_pocahont = \"md_pocahont\"\r\narcade_md_pocahontu = \"md_pocahont\"\r\narcade_md_pokecd = \"md_pokecd\"\r\narcade_md_pokecda = \"md_pokecd\"\r\narcade_md_pokemon = \"md_pokemon\"\r\narcade_md_pokemon2 = \"md_pokemon2\"\r\narcade_md_pokemona = \"md_pokemon\"\r\narcade_md_pokestad = \"md_pokestad\"\r\narcade_md_populous = \"md_populous\"\r\narcade_md_populousj = \"md_populous\"\r\narcade_md_populousu = \"md_populous\"\r\narcade_md_powerath = \"md_deadlymv\"\r\narcade_md_powerbal = \"md_powerbal\"\r\narcade_md_ppengo = \"md_ppengo\"\r\narcade_md_ppersia = \"md_ppersia\"\r\narcade_md_ppersia2 = \"md_ppersia2\"\r\narcade_md_ppersiap = \"md_ppersia\"\r\narcade_md_ppersiap1 = \"md_ppersia\"\r\narcade_md_ppersiau = \"md_ppersia\"\r\narcade_md_predatr2 = \"md_predatr2\"\r\narcade_md_premierm = \"md_premierm\"\r\narcade_md_premrm97 = \"md_premrm97\"\r\narcade_md_primal = \"md_primal\"\r\narcade_md_primetim = \"md_primetim\"\r\narcade_md_probot = \"md_contra\"\r\narcade_md_proqb = \"md_proqb\"\r\narcade_md_prostrfs = \"md_prostrfs\"\r\narcade_md_proyakyu = \"md_proyakyu\"\r\narcade_md_ps2aa = \"md_ps2aa\"\r\narcade_md_ps2aae = \"md_ps2aa\"\r\narcade_md_ps2ab = \"md_ps2ab\"\r\narcade_md_ps2abe = \"md_ps2ab\"\r\narcade_md_ps2ac = \"md_ps2ac\"\r\narcade_md_ps2ace = \"md_ps2ac\"\r\narcade_md_ps2ad = \"md_ps2ad\"\r\narcade_md_ps2ade = \"md_ps2ad\"\r\narcade_md_ps2ae = \"md_ps2ae\"\r\narcade_md_ps2aee = \"md_ps2ae\"\r\narcade_md_ps2af = \"md_ps2af\"\r\narcade_md_ps2afe = \"md_ps2af\"\r\narcade_md_ps2ag = \"md_ps2ag\"\r\narcade_md_ps2age = \"md_ps2ag\"\r\narcade_md_ps2ah = \"md_ps2ah\"\r\narcade_md_ps2ahe = \"md_ps2ah\"\r\narcade_md_psolar = \"md_psolar\"\r\narcade_md_pstar2 = \"md_pstar2\"\r\narcade_md_pstar2a = \"md_pstar2\"\r\narcade_md_pstar2br = \"md_pstar2\"\r\narcade_md_pstar2j = \"md_pstar2\"\r\narcade_md_pstar3 = \"md_pstar3\"\r\narcade_md_pstar3br = \"md_pstar3\"\r\narcade_md_pstar3j = \"md_pstar3\"\r\narcade_md_pstar4 = \"md_pstar4\"\r\narcade_md_pstar4j = \"md_pstar4\"\r\narcade_md_pstar4p1 = \"md_pstar4\"\r\narcade_md_pstar4p2 = \"md_pstar4\"\r\narcade_md_pstar4p3 = \"md_pstar4\"\r\narcade_md_pstar4p4 = \"md_pstar4\"\r\narcade_md_pstar4p5 = \"md_pstar4\"\r\narcade_md_pstar4u = \"md_pstar4\"\r\narcade_md_psycho = \"md_psycho\"\r\narcade_md_psycho1 = \"md_psycho\"\r\narcade_md_psyoblad = \"md_psyoblad\"\r\narcade_md_psyoblade = \"md_psyoblad\"\r\narcade_md_pto = \"md_pto\"\r\narcade_md_puggsy = \"md_puggsy\"\r\narcade_md_puggsyp = \"md_puggsy\"\r\narcade_md_puggsyu = \"md_puggsy\"\r\narcade_md_pulseman = \"md_pulseman\"\r\narcade_md_pulsemane = \"md_pulseman\"\r\narcade_md_punisher = \"md_punisher\"\r\narcade_md_punisheru = \"md_punisher\"\r\narcade_md_putter = \"md_putter\"\r\narcade_md_puttergnk = \"md_putter\"\r\narcade_md_puyopuy2 = \"md_puyopuy2\"\r\narcade_md_puyopuy2a = \"md_puyopuy2\"\r\narcade_md_puyopuyo = \"md_puyopuyo\"\r\narcade_md_pyramid = \"md_pyramid\"\r\narcade_md_pyramid2 = \"md_pyramid2\"\r\narcade_md_pyramid3 = \"md_pyramid3\"\r\narcade_md_pyramidgnk = \"md_pyramid\"\r\narcade_md_pyramids = \"md_pyramids\"\r\narcade_md_qpoker = \"md_qpoker\"\r\narcade_md_quacksht = \"md_quacksht\"\r\narcade_md_quacksht1 = \"md_quacksht\"\r\narcade_md_quadchal = \"md_quadchal\"\r\narcade_md_racedriv = \"md_racedriv\"\r\narcade_md_radicasf = \"md_radicasf\"\r\narcade_md_radicav1 = \"md_radicav1\"\r\narcade_md_radrex = \"md_radrex\"\r\narcade_md_radrexu = \"md_radrex\"\r\narcade_md_ragnacen = \"md_soleil\"\r\narcade_md_ragnacenk = \"md_soleil\"\r\narcade_md_ragnacenp = \"md_soleil\"\r\narcade_md_raiden = \"md_raiden\"\r\narcade_md_rambo3 = \"md_rambo3\"\r\narcade_md_rambo3a = \"md_rambo3\"\r\narcade_md_rampart = \"md_rampart\"\r\narcade_md_rampartj = \"md_rampart\"\r\narcade_md_rangerx = \"md_rangerx\"\r\narcade_md_rangerxu = \"md_rangerx\"\r\narcade_md_ransei = \"md_ransei\"\r\narcade_md_rastan2 = \"md_rastan2\"\r\narcade_md_rastan2j = \"md_rastan2\"\r\narcade_md_rbibb3 = \"md_rbibb3\"\r\narcade_md_rbibb4 = \"md_rbibb4\"\r\narcade_md_rbibb4j = \"md_rbibb4\"\r\narcade_md_rbibb4p = \"md_rbibb4\"\r\narcade_md_rbibb93 = \"md_rbibb93\"\r\narcade_md_rbibb94 = \"md_rbibb94\"\r\narcade_md_rbisland = \"md_rbisland\"\r\narcade_md_redcliff = \"md_redcliff\"\r\narcade_md_redcliffa = \"md_redcliff\"\r\narcade_md_redzone = \"md_redzone\"\r\narcade_md_renstim = \"md_renstim\"\r\narcade_md_renstimu = \"md_renstim\"\r\narcade_md_renstimup = \"md_renstim\"\r\narcade_md_renthero = \"md_renthero\"\r\narcade_md_rentheroe = \"md_renthero\"\r\narcade_md_resq = \"md_resq\"\r\narcade_md_revshin = \"md_revshin\"\r\narcade_md_revshin1 = \"md_revshin\"\r\narcade_md_revshin2 = \"md_revshin\"\r\narcade_md_revx = \"md_revx\"\r\narcade_md_rhl2k7 = \"md_nhlpa93\"\r\narcade_md_rickdang = \"md_rickdang\"\r\narcade_md_riddle = \"md_riddle\"\r\narcade_md_ringspow = \"md_ringspow\"\r\narcade_md_riserobo = \"md_riserobo\"\r\narcade_md_risk = \"md_risk\"\r\narcade_md_riskyw = \"md_riskyw\"\r\narcade_md_ristar = \"md_ristar\"\r\narcade_md_ristar1 = \"md_ristar\"\r\narcade_md_ristarj = \"md_ristar\"\r\narcade_md_ristarp1 = \"md_ristar\"\r\narcade_md_ristarp2 = \"md_ristar\"\r\narcade_md_ristarp3 = \"md_ristar\"\r\narcade_md_ristarp4 = \"md_ristar\"\r\narcade_md_rnrracin = \"md_rnrracin\"\r\narcade_md_rnrracinh = \"md_rnrracin\"\r\narcade_md_rnrracinu = \"md_rnrracin\"\r\narcade_md_roadblst = \"md_roadblst\"\r\narcade_md_roadblstj = \"md_roadblst\"\r\narcade_md_roadrash = \"md_roadrash\"\r\narcade_md_robocod = \"md_robocod\"\r\narcade_md_robocodj = \"md_robocod\"\r\narcade_md_robocop3 = \"md_robocop3\"\r\narcade_md_robotbat = \"md_robotbat\"\r\narcade_md_roboterm = \"md_roboterm\"\r\narcade_md_robotermj = \"md_roboterm\"\r\narcade_md_robotermp = \"md_roboterm\"\r\narcade_md_robotermp1 = \"md_roboterm\"\r\narcade_md_robotermu = \"md_roboterm\"\r\narcade_md_robowrek = \"md_robowrek\"\r\narcade_md_rocket = \"md_rocket\"\r\narcade_md_rocketj = \"md_rocket\"\r\narcade_md_rocketu = \"md_rocket\"\r\narcade_md_rockman = \"md_megaman\"\r\narcade_md_rockman1 = \"md_megaman\"\r\narcade_md_rockmnx3 = \"md_rockmnx3\"\r\narcade_md_rockybw = \"md_rockybw\"\r\narcade_md_rolo = \"md_rolo\"\r\narcade_md_roman3k2 = \"md_roman3k2\"\r\narcade_md_roman3k3 = \"md_roman3k3\"\r\narcade_md_royalbld = \"md_gemfire\"\r\narcade_md_rrash2 = \"md_rrash2\"\r\narcade_md_rrash2a = \"md_rrash2\"\r\narcade_md_rrash2j = \"md_rrash2\"\r\narcade_md_rrash3 = \"md_rrash3\"\r\narcade_md_rrash3p = \"md_rrash3\"\r\narcade_md_rsbt = \"md_rsbt\"\r\narcade_md_rsbtp1 = \"md_rsbt\"\r\narcade_md_rsbtp2 = \"md_rsbt\"\r\narcade_md_rsbtp3 = \"md_rsbt\"\r\narcade_md_rsbtp4 = \"md_rsbt\"\r\narcade_md_rsbtp5 = \"md_rsbt\"\r\narcade_md_rsbtp6 = \"md_rsbt\"\r\narcade_md_rsbtp7 = \"md_rsbt\"\r\narcade_md_rthun2 = \"md_rthun2\"\r\narcade_md_rthun2j = \"md_rthun2\"\r\narcade_md_rthun2u = \"md_rthun2\"\r\narcade_md_rthun3 = \"md_rthun3\"\r\narcade_md_rugbywc = \"md_rugbywc\"\r\narcade_md_runark = \"md_growl\"\r\narcade_md_ryukoken = \"md_aof\"\r\narcade_md_s15in1 = \"md_s15in1\"\r\narcade_md_s19in1 = \"md_s19in1\"\r\narcade_md_s2delta = \"md_sonic2\"\r\narcade_md_s2rpt1 = \"md_sonic2\"\r\narcade_md_s2smtp = \"md_sonic2\"\r\narcade_md_s3comp = \"md_s3comp\"\r\narcade_md_s3ktc = \"md_s3ktc\"\r\narcade_md_sagaia = \"md_sagaia\"\r\narcade_md_sailormn = \"md_sailormn\"\r\narcade_md_sailormne = \"md_sailormn\"\r\narcade_md_samesame = \"md_fireshrk\"\r\narcade_md_sampra96 = \"md_sampra96\"\r\narcade_md_sampras = \"md_sampras\"\r\narcade_md_sampras1 = \"md_sampras\"\r\narcade_md_sampras2 = \"md_sampras\"\r\narcade_md_samsho = \"md_samsho\"\r\narcade_md_samshou = \"md_samsho\"\r\narcade_md_samspir = \"md_samsho\"\r\narcade_md_sangoku2 = \"md_roman3k2\"\r\narcade_md_sangoku3 = \"md_roman3k3\"\r\narcade_md_sangoret = \"md_sangoret\"\r\narcade_md_sanguo = \"md_sangoret\"\r\narcade_md_sanguo5 = \"md_sanguo5\"\r\narcade_md_sansan = \"md_sansan\"\r\narcade_md_sbash = \"md_sonic2\"\r\narcade_md_sboom = \"md_sonic2\"\r\narcade_md_sbship = \"md_sbship\"\r\narcade_md_sbtank = \"md_sbtank\"\r\narcade_md_scheroes = \"md_sonic2\"\r\narcade_md_scooby = \"md_scooby\"\r\narcade_md_scrabble = \"md_scrabble\"\r\narcade_md_scrack = \"md_scrack\"\r\narcade_md_sdkong99 = \"md_sdkong99\"\r\narcade_md_sdkong99a = \"md_sdkong99\"\r\narcade_md_sdmilha2 = \"md_sdmilha2\"\r\narcade_md_sdmilha2a = \"md_sdmilha2\"\r\narcade_md_sdmilhao = \"md_sdmilhao\"\r\narcade_md_sdvalis = \"md_sydvalis\"\r\narcade_md_seaquest = \"md_seaquest\"\r\narcade_md_seaquestu = \"md_seaquest\"\r\narcade_md_seconds = \"md_seconds\"\r\narcade_md_segachd = \"md_segachd\"\r\narcade_md_segachnl = \"md_segachnl\"\r\narcade_md_segachnla = \"md_segachnl\"\r\narcade_md_segasprt = \"md_segasprt\"\r\narcade_md_segatop = \"md_segatop\"\r\narcade_md_sensibie = \"md_sensibie\"\r\narcade_md_sensible = \"md_sensible\"\r\narcade_md_sensiblep = \"md_sensible\"\r\narcade_md_sesame = \"md_sesame\"\r\narcade_md_sf2 = \"md_sf2\"\r\narcade_md_sf2ics = \"md_sf2\"\r\narcade_md_sf2j = \"md_sf2\"\r\narcade_md_sf2pir = \"md_sf2\"\r\narcade_md_sf2u = \"md_sf2\"\r\narcade_md_sfzone = \"md_sfzone\"\r\narcade_md_sfzonej = \"md_sfzone\"\r\narcade_md_shadow = \"md_shadow\"\r\narcade_md_shadowrn = \"md_shadowrn\"\r\narcade_md_shadowrnj = \"md_shadowrn\"\r\narcade_md_shadowrnp1 = \"md_shadowrn\"\r\narcade_md_shadowrnp2 = \"md_shadowrn\"\r\narcade_md_shadowrnp3 = \"md_shadowrn\"\r\narcade_md_shadowrnp4 = \"md_shadowrn\"\r\narcade_md_shanewar = \"md_shanewar\"\r\narcade_md_shangh2 = \"md_shangh2\"\r\narcade_md_shangh2p = \"md_shangh2\"\r\narcade_md_shangh2p1 = \"md_shangh2\"\r\narcade_md_shangh3 = \"md_shangh3\"\r\narcade_md_shangon = \"md_shangon\"\r\narcade_md_shangon1 = \"md_shangon\"\r\narcade_md_shaqfu = \"md_shaqfu\"\r\narcade_md_sharrier = \"md_sharrier\"\r\narcade_md_sharrierj = \"md_sharrier\"\r\narcade_md_shdancer = \"md_shdancer\"\r\narcade_md_shijie = \"md_shijie\"\r\narcade_md_shikinjo = \"md_shikinjo\"\r\narcade_md_shimpact = \"md_shimpact\"\r\narcade_md_shindark = \"md_shindark\"\r\narcade_md_shindarkbr = \"md_shindark\"\r\narcade_md_shindarkj = \"md_shindark\"\r\narcade_md_shinfrc2 = \"md_shinfrc2\"\r\narcade_md_shinfrc2j = \"md_shinfrc2\"\r\narcade_md_shinfrc2p1 = \"md_shinfrc2\"\r\narcade_md_shinfrc2p2 = \"md_shinfrc2\"\r\narcade_md_shinfrc2t = \"md_shinfrc2\"\r\narcade_md_shinfrc2u = \"md_shinfrc2\"\r\narcade_md_shinfrce = \"md_shinfrce\"\r\narcade_md_shinfrcej = \"md_shinfrce\"\r\narcade_md_shinfrcep = \"md_shinfrce\"\r\narcade_md_shinobi3 = \"md_shinobi3\"\r\narcade_md_shinobi3u = \"md_shinobi3\"\r\narcade_md_shinobi3umj = \"md_shinobi3\"\r\narcade_md_ship = \"md_ship\"\r\narcade_md_shiten = \"md_shadow\"\r\narcade_md_shougi = \"md_shougi\"\r\narcade_md_shoveit = \"md_shoveit\"\r\narcade_md_shrek = \"md_yogibear\"\r\narcade_md_shrek2 = \"md_ottifant\"\r\narcade_md_shuihu = \"md_shuihu\"\r\narcade_md_shuihuzh = \"md_shuihuzh\"\r\narcade_md_shuramon = \"md_shuramon\"\r\narcade_md_sidepock = \"md_sidepock\"\r\narcade_md_sidepockj = \"md_sidepock\"\r\narcade_md_sidepocku = \"md_sidepock\"\r\narcade_md_sinv90 = \"md_sinv91\"\r\narcade_md_sinv91 = \"md_sinv91\"\r\narcade_md_sk = \"md_sk\"\r\narcade_md_skelkrew = \"md_skelkrew\"\r\narcade_md_skelkrewu = \"md_skelkrew\"\r\narcade_md_skickoff = \"md_skickoff\"\r\narcade_md_skitchin = \"md_skitchin\"\r\narcade_md_skkong99 = \"md_sdkong99\"\r\narcade_md_skp01 = \"md_sk\"\r\narcade_md_skp02 = \"md_sk\"\r\narcade_md_skp03 = \"md_sk\"\r\narcade_md_skp04 = \"md_sk\"\r\narcade_md_skp05 = \"md_sk\"\r\narcade_md_skp06 = \"md_sk\"\r\narcade_md_skp07 = \"md_sk\"\r\narcade_md_skp08 = \"md_sk\"\r\narcade_md_skp09 = \"md_sk\"\r\narcade_md_skp10 = \"md_sk\"\r\narcade_md_skp11 = \"md_sk\"\r\narcade_md_skp12 = \"md_sk\"\r\narcade_md_sks1 = \"md_sks1\"\r\narcade_md_sks2 = \"md_sks2\"\r\narcade_md_sks3 = \"md_sks3\"\r\narcade_md_slamdunk = \"md_slamdunk\"\r\narcade_md_slammast = \"md_slammast\"\r\narcade_md_slammastu = \"md_slammast\"\r\narcade_md_slamshaq = \"md_slamshaq\"\r\narcade_md_slapfigh = \"md_slapfigh\"\r\narcade_md_slaughtr = \"md_slaughtr\"\r\narcade_md_slimew = \"md_slimew\"\r\narcade_md_slimewj = \"md_slimew\"\r\narcade_md_smario2 = \"md_smario2\"\r\narcade_md_smario2a = \"md_smario2\"\r\narcade_md_smario64 = \"md_smario64\"\r\narcade_md_smario64h = \"md_smario64\"\r\narcade_md_smasters = \"md_arnoldp\"\r\narcade_md_smb = \"md_smb\"\r\narcade_md_smb4md = \"md_smb4md\"\r\narcade_md_smba = \"md_smb\"\r\narcade_md_smbb = \"md_smb\"\r\narcade_md_smbbc = \"md_smbbc\"\r\narcade_md_smgp = \"md_smgp\"\r\narcade_md_smgp2 = \"md_smgp2\"\r\narcade_md_smgp2u = \"md_smgp2\"\r\narcade_md_smgpa = \"md_smgp\"\r\narcade_md_smgpj = \"md_smgp\"\r\narcade_md_smgpu = \"md_smgp\"\r\narcade_md_smsbrawl = \"md_smsbrawl\"\r\narcade_md_smurfs = \"md_smurfs\"\r\narcade_md_smurfstw = \"md_smurfstw\"\r\narcade_md_snakernr = \"md_snakernr\"\r\narcade_md_sndtool = \"md_sndtool\"\r\narcade_md_snezkoro = \"md_mickmack\"\r\narcade_md_snowbros = \"md_snowbros\"\r\narcade_md_socket = \"md_socket\"\r\narcade_md_sokoban = \"md_shoveit\"\r\narcade_md_soldeace = \"md_soldeace\"\r\narcade_md_soldfort = \"md_chaoseng\"\r\narcade_md_soleil = \"md_soleil\"\r\narcade_md_soleilf = \"md_soleil\"\r\narcade_md_soleilg = \"md_soleil\"\r\narcade_md_soleils = \"md_soleil\"\r\narcade_md_somarita = \"md_sonic\"\r\narcade_md_sonic = \"md_sonic\"\r\narcade_md_sonic2 = \"md_sonic2\"\r\narcade_md_sonic2a = \"md_sonic2\"\r\narcade_md_sonic2b = \"md_sonic2\"\r\narcade_md_sonic2brc = \"md_sonic2\"\r\narcade_md_sonic2c = \"md_sonic2\"\r\narcade_md_sonic2p1 = \"md_sonic2\"\r\narcade_md_sonic2p2 = \"md_sonic2\"\r\narcade_md_sonic2p3 = \"md_sonic2\"\r\narcade_md_sonic2p4 = \"md_sonic2\"\r\narcade_md_sonic2p5 = \"md_sonic2\"\r\narcade_md_sonic2p6 = \"md_sonic2\"\r\narcade_md_sonic2p7 = \"md_sonic2\"\r\narcade_md_sonic2p8 = \"md_sonic2\"\r\narcade_md_sonic3 = \"md_sonic3\"\r\narcade_md_sonic31 = \"md_sonic31\"\r\narcade_md_sonic3c = \"md_sonic3c\"\r\narcade_md_sonic3ca = \"md_sonic3ca\"\r\narcade_md_sonic3d = \"md_sonic3d\"\r\narcade_md_sonic3ddx = \"md_sonic3d\"\r\narcade_md_sonic3dp1 = \"md_sonic3d\"\r\narcade_md_sonic3dp2 = \"md_sonic3d\"\r\narcade_md_sonic3dp3 = \"md_sonic3d\"\r\narcade_md_sonic3dp4 = \"md_sonic3d\"\r\narcade_md_sonic3dp5 = \"md_sonic3d\"\r\narcade_md_sonic3dp6 = \"md_sonic3d\"\r\narcade_md_sonic3dp7 = \"md_sonic3d\"\r\narcade_md_sonic3dp8 = \"md_sonic3d\"\r\narcade_md_sonic3j = \"md_sonic3\"\r\narcade_md_sonic3pir = \"md_sonic3\"\r\narcade_md_sonic3u = \"md_sonic3\"\r\narcade_md_soniccmp = \"md_soniccmp\"\r\narcade_md_soniccmp1 = \"md_soniccmp\"\r\narcade_md_sonicer = \"md_sonicer\"\r\narcade_md_sonicj = \"md_sonic\"\r\narcade_md_sonicjam = \"md_sonicjam\"\r\narcade_md_sonicjam1 = \"md_sonicjam\"\r\narcade_md_sonicjam2 = \"md_sonicjam\"\r\narcade_md_sonicmmix = \"md_sonic\"\r\narcade_md_sonicpir = \"md_sonic\"\r\narcade_md_sonicppu = \"md_sonic\"\r\narcade_md_sonictlw = \"md_sonic\"\r\narcade_md_sonicwa = \"md_sonic\"\r\narcade_md_sor = \"md_sor\"\r\narcade_md_sor2 = \"md_sor2\"\r\narcade_md_sor2bk3b = \"md_sor2\"\r\narcade_md_sor2tmnt = \"md_sor2\"\r\narcade_md_sor2u = \"md_sor2\"\r\narcade_md_sor2upw = \"md_sor2\"\r\narcade_md_sor2usw = \"md_sor2\"\r\narcade_md_sor3 = \"md_sor3\"\r\narcade_md_sor3bk3p = \"md_sor3\"\r\narcade_md_sor3ex = \"md_sor3\"\r\narcade_md_sor3k = \"md_sor3\"\r\narcade_md_sor3p1 = \"md_sor3\"\r\narcade_md_sor3p2 = \"md_sor3\"\r\narcade_md_sor3p3 = \"md_sor3\"\r\narcade_md_sor3p4 = \"md_sor3\"\r\narcade_md_sor3p5 = \"md_sor3\"\r\narcade_md_sor3u = \"md_sor3\"\r\narcade_md_sor3up01 = \"md_sor3\"\r\narcade_md_sor3up02 = \"md_sor3\"\r\narcade_md_sor3up03 = \"md_sor3\"\r\narcade_md_sor3up04 = \"md_sor3\"\r\narcade_md_sor3up05 = \"md_sor3\"\r\narcade_md_sor3up06 = \"md_sor3\"\r\narcade_md_sor3up07 = \"md_sor3\"\r\narcade_md_sor3up08 = \"md_sor3\"\r\narcade_md_sor3up09 = \"md_sor3\"\r\narcade_md_sor3up10 = \"md_sor3\"\r\narcade_md_sora = \"md_sor\"\r\narcade_md_sorcer = \"md_sorcer\"\r\narcade_md_sorcerk = \"md_sorcerk\"\r\narcade_md_sorcerk1 = \"md_sorcerk\"\r\narcade_md_sorcerkj = \"md_sorcerk\"\r\narcade_md_soulblad = \"md_soulblad\"\r\narcade_md_soulblada = \"md_soulblad\"\r\narcade_md_souledge = \"md_souledge\"\r\narcade_md_souledgea = \"md_souledge\"\r\narcade_md_southia = \"md_sonic\"\r\narcade_md_spacebob = \"md_bob\"\r\narcade_md_sparkstr = \"md_sparkstr\"\r\narcade_md_sparkstrj = \"md_sparkstr\"\r\narcade_md_sparkstru = \"md_sparkstr\"\r\narcade_md_speedbl2 = \"md_speedbl2\"\r\narcade_md_speedbl2j = \"md_speedbl2\"\r\narcade_md_speedbl2u = \"md_speedbl2\"\r\narcade_md_spidermn = \"md_spidermn\"\r\narcade_md_spidermnp1 = \"md_spidermn\"\r\narcade_md_spidermnp2 = \"md_spidermn\"\r\narcade_md_spidking = \"md_spidking\"\r\narcade_md_spidmaxc = \"md_spidmaxc\"\r\narcade_md_spidxmen = \"md_spidxmen\"\r\narcade_md_spiritwf = \"md_spiritwf\"\r\narcade_md_spirou = \"md_spirou\"\r\narcade_md_splatth2 = \"md_splatth2\"\r\narcade_md_splatth2j = \"md_splatth2\"\r\narcade_md_splatth2u = \"md_splatth2\"\r\narcade_md_splatth3 = \"md_splatth3\"\r\narcade_md_splatth3j = \"md_splatth3\"\r\narcade_md_spongbob = \"md_coolspot\"\r\narcade_md_sportg = \"md_sportg\"\r\narcade_md_sporttbb = \"md_sporttbb\"\r\narcade_md_spotgo = \"md_spotgo\"\r\narcade_md_spotgou = \"md_spotgo\"\r\narcade_md_spykids4 = \"md_dinotale\"\r\narcade_md_squirrel = \"md_squirrel\"\r\narcade_md_sracer = \"md_sracer\"\r\narcade_md_srealbas = \"md_srealbas\"\r\narcade_md_srealbasj = \"md_srealbas\"\r\narcade_md_srobowrs = \"md_trgearth\"\r\narcade_md_ssf2 = \"md_ssf2\"\r\narcade_md_ssf2ics = \"md_ssf2\"\r\narcade_md_ssf2j = \"md_ssf2\"\r\narcade_md_ssf2u = \"md_ssf2\"\r\narcade_md_sskid = \"md_sskid\"\r\narcade_md_sskidp = \"md_sskid\"\r\narcade_md_ssmart = \"md_ssmart\"\r\narcade_md_ssmashtv = \"md_ssmashtv\"\r\narcade_md_sspin = \"md_sspin\"\r\narcade_md_sspinj = \"md_sspin\"\r\narcade_md_sspinp = \"md_sspin\"\r\narcade_md_sspinu = \"md_sspin\"\r\narcade_md_sspinua = \"md_sspin\"\r\narcade_md_ssriders = \"md_ssriders\"\r\narcade_md_ssridersu = \"md_ssriders\"\r\narcade_md_ssword = \"md_ssword\"\r\narcade_md_sswordj = \"md_ssword\"\r\narcade_md_starchaser = \"md_starchaser\"\r\narcade_md_starcrus = \"md_starcrus\"\r\narcade_md_starcruse = \"md_starcrus\"\r\narcade_md_starctrl = \"md_starctrl\"\r\narcade_md_starfl = \"md_starfl\"\r\narcade_md_starfl1 = \"md_starfl\"\r\narcade_md_stargate = \"md_stargate\"\r\narcade_md_stargatep = \"md_stargate\"\r\narcade_md_starjedi = \"md_wolfchld\"\r\narcade_md_starwars = \"md_elimdown\"\r\narcade_md_stblad = \"md_stblad\"\r\narcade_md_stbladj = \"md_stblad\"\r\narcade_md_stds9 = \"md_stds9\"\r\narcade_md_stds9u = \"md_stds9\"\r\narcade_md_steelemp = \"md_empsteel\"\r\narcade_md_steeltal = \"md_steeltal\"\r\narcade_md_steeltalj = \"md_steeltal\"\r\narcade_md_steeltalp = \"md_steeltal\"\r\narcade_md_stonprot = \"md_stonprot\"\r\narcade_md_strider = \"md_strider\"\r\narcade_md_strider2 = \"md_strider2\"\r\narcade_md_strider2u = \"md_strider2\"\r\narcade_md_striderj = \"md_strider\"\r\narcade_md_striker = \"md_striker\"\r\narcade_md_strikerp = \"md_striker\"\r\narcade_md_strmlord = \"md_strmlord\"\r\narcade_md_strmlordj = \"md_strmlord\"\r\narcade_md_sttng = \"md_sttng\"\r\narcade_md_sttnga = \"md_sttng\"\r\narcade_md_sttngp01 = \"md_sttng\"\r\narcade_md_sttngp02 = \"md_sttng\"\r\narcade_md_sttngp03 = \"md_sttng\"\r\narcade_md_sttngp04 = \"md_sttng\"\r\narcade_md_sttngp05 = \"md_sttng\"\r\narcade_md_sttngp06 = \"md_sttng\"\r\narcade_md_subterr = \"md_subterr\"\r\narcade_md_subterrj = \"md_subterr\"\r\narcade_md_subterrp1 = \"md_subterr\"\r\narcade_md_subterrp2 = \"md_subterr\"\r\narcade_md_subterrp3 = \"md_subterr\"\r\narcade_md_subterru = \"md_subterr\"\r\narcade_md_summer = \"md_summer\"\r\narcade_md_supdaisn = \"md_supdaisn\"\r\narcade_md_supdaisna = \"md_supdaisn\"\r\narcade_md_superair = \"md_xfire\"\r\narcade_md_superhq = \"md_chasehq2\"\r\narcade_md_superman = \"md_superman\"\r\narcade_md_supermanp = \"md_superman\"\r\narcade_md_supermanu = \"md_superman\"\r\narcade_md_superoff = \"md_superoff\"\r\narcade_md_suphydl = \"md_suphydl\"\r\narcade_md_suphydlj = \"md_suphydl\"\r\narcade_md_suphydlu = \"md_suphydl\"\r\narcade_md_supmagic = \"md_supmagic\"\r\narcade_md_suprbubl = \"md_suprbubl\"\r\narcade_md_suprleag = \"md_suprleag\"\r\narcade_md_suprleagj = \"md_suprleag\"\r\narcade_md_supshin = \"md_revshin\"\r\narcade_md_supshin2 = \"md_shinobi3\"\r\narcade_md_supshin2p1 = \"md_shinobi3\"\r\narcade_md_supshin2p2 = \"md_shinobi3\"\r\narcade_md_surging = \"md_surging\"\r\narcade_md_svolley = \"md_svolley\"\r\narcade_md_svolley1 = \"md_svolley\"\r\narcade_md_svolleyj = \"md_svolley\"\r\narcade_md_swamp = \"md_swamp\"\r\narcade_md_swordsod = \"md_swordsod\"\r\narcade_md_swordsodj = \"md_swordsod\"\r\narcade_md_sydvalis = \"md_sydvalis\"\r\narcade_md_sylvestr = \"md_sylvestr\"\r\narcade_md_sylvestru = \"md_sylvestr\"\r\narcade_md_syndicat = \"md_syndicat\"\r\narcade_md_t2ag = \"md_t2ag\"\r\narcade_md_t2agj = \"md_t2ag\"\r\narcade_md_t2agp = \"md_t2ag\"\r\narcade_md_t3ag = \"md_t2ag\"\r\narcade_md_taikoris = \"md_taikoris\"\r\narcade_md_taiwan = \"md_taiwan\"\r\narcade_md_talespin = \"md_talespin\"\r\narcade_md_talmit = \"md_talmit\"\r\narcade_md_tank2011 = \"md_tank2011\"\r\narcade_md_tantr = \"md_tantr\"\r\narcade_md_taskfhex = \"md_taskfhex\"\r\narcade_md_taskfhexj = \"md_taskfhex\"\r\narcade_md_tazmania = \"md_tazmania\"\r\narcade_md_tazmars = \"md_tazmars\"\r\narcade_md_tazmarsp01 = \"md_tazmars\"\r\narcade_md_tazmarsp02 = \"md_tazmars\"\r\narcade_md_tazmarsp03 = \"md_tazmars\"\r\narcade_md_tazmarsp04 = \"md_tazmars\"\r\narcade_md_tazmarsp05 = \"md_tazmars\"\r\narcade_md_tazmarsp06 = \"md_tazmars\"\r\narcade_md_tazmarsp07 = \"md_tazmars\"\r\narcade_md_tazmarsp08 = \"md_tazmars\"\r\narcade_md_tazmarsp09 = \"md_tazmars\"\r\narcade_md_tazmarsp10 = \"md_tazmars\"\r\narcade_md_tazmarsp11 = \"md_tazmars\"\r\narcade_md_tazmarsu = \"md_tazmars\"\r\narcade_md_tbolt2 = \"md_tbolt2\"\r\narcade_md_tbolt2a = \"md_tbolt2a\"\r\narcade_md_tc2000 = \"md_tc2000\"\r\narcade_md_td2 = \"md_td2\"\r\narcade_md_teamusa = \"md_teamusa\"\r\narcade_md_technocl = \"md_technocl\"\r\narcade_md_tecmobb = \"md_tecmobb\"\r\narcade_md_tecmocup = \"md_tecmocup\"\r\narcade_md_tecmohck = \"md_tecmohck\"\r\narcade_md_tecmonba = \"md_tecmonba\"\r\narcade_md_tecmonbaj = \"md_tecmonba\"\r\narcade_md_tecmosb2 = \"md_tecmosb2\"\r\narcade_md_tecmosb2j = \"md_tecmosb2\"\r\narcade_md_tecmosb3 = \"md_tecmosb3\"\r\narcade_md_tecmosbw = \"md_tecmosbw\"\r\narcade_md_tecmosbwa = \"md_tecmosbw\"\r\narcade_md_tecmosbwj = \"md_tecmosbw\"\r\narcade_md_tecmow92 = \"md_tecmow92\"\r\narcade_md_tecmowc = \"md_tecmowc\"\r\narcade_md_tecnocop = \"md_tecnocop\"\r\narcade_md_teddyboy = \"md_teddyboy\"\r\narcade_md_teiketsu = \"md_pto\"\r\narcade_md_tekkn3sp = \"md_tekkn3sp\"\r\narcade_md_telebrad = \"md_telebrad\"\r\narcade_md_telmah = \"md_telmah\"\r\narcade_md_telstad = \"md_telstad\"\r\narcade_md_term2 = \"md_term2\"\r\narcade_md_termintr = \"md_termintr\"\r\narcade_md_termintru = \"md_termintr\"\r\narcade_md_tetris = \"md_tetris\"\r\narcade_md_tetris1 = \"md_tetris1\"\r\narcade_md_tf2 = \"md_tf2\"\r\narcade_md_tf2j = \"md_tf2\"\r\narcade_md_tf3 = \"md_tf3\"\r\narcade_md_tf4 = \"md_tf4\"\r\narcade_md_tf4j = \"md_tf4\"\r\narcade_md_tfox = \"md_tfox\"\r\narcade_md_tfoxj = \"md_tfox\"\r\narcade_md_tgunii = \"md_tgunii\"\r\narcade_md_themeprk = \"md_themeprk\"\r\narcade_md_thomas = \"md_thomas\"\r\narcade_md_thor = \"md_thor\"\r\narcade_md_thorf = \"md_thor\"\r\narcade_md_thorg = \"md_thor\"\r\narcade_md_thorj = \"md_thor\"\r\narcade_md_thorjp = \"md_thor\"\r\narcade_md_thork = \"md_thor\"\r\narcade_md_thorp1 = \"md_thor\"\r\narcade_md_thorp2 = \"md_thor\"\r\narcade_md_thors = \"md_thor\"\r\narcade_md_tick = \"md_tick\"\r\narcade_md_timedom = \"md_socket\"\r\narcade_md_timekill = \"md_timekill\"\r\narcade_md_timekillu = \"md_timekill\"\r\narcade_md_tinhead = \"md_tinhead\"\r\narcade_md_tintin = \"md_tintin\"\r\narcade_md_tmhthh = \"md_tmhthh\"\r\narcade_md_tmhttf = \"md_tmhttf\"\r\narcade_md_tmnthh = \"md_tmhthh\"\r\narcade_md_tmntru = \"md_tmntru\"\r\narcade_md_tmntshj = \"md_tmhthh\"\r\narcade_md_tmnttficb = \"md_tmhttf\"\r\narcade_md_tmnttfj = \"md_tmhttf\"\r\narcade_md_tmnttfu = \"md_tmhttf\"\r\narcade_md_tnnbass = \"md_tnnbass\"\r\narcade_md_tnnout = \"md_tnnout\"\r\narcade_md_tnzs = \"md_tnzs\"\r\narcade_md_toejam = \"md_toejam\"\r\narcade_md_toejam2 = \"md_toejam2\"\r\narcade_md_toejam2g = \"md_toejam2\"\r\narcade_md_toejam2j = \"md_toejam2\"\r\narcade_md_toejam2u = \"md_toejam2\"\r\narcade_md_toejama = \"md_toejam\"\r\narcade_md_toki = \"md_toki\"\r\narcade_md_toki1 = \"md_toki\"\r\narcade_md_tomjerry = \"md_tomjerry\"\r\narcade_md_tomjerry1 = \"md_tomjerry\"\r\narcade_md_topf2k5 = \"md_topf2k5\"\r\narcade_md_topfight = \"md_topfight\"\r\narcade_md_topgear2 = \"md_topgear2\"\r\narcade_md_topgolf = \"md_topgolf\"\r\narcade_md_topgolf2 = \"md_chichi\"\r\narcade_md_totlfoot = \"md_totlfoot\"\r\narcade_md_toughman = \"md_toughman\"\r\narcade_md_toutrun = \"md_toutrun\"\r\narcade_md_toxicc = \"md_toxicc\"\r\narcade_md_toys = \"md_toys\"\r\narcade_md_toystory = \"md_toystory\"\r\narcade_md_toystoryu = \"md_toystory\"\r\narcade_md_tplay96 = \"md_tplay96\"\r\narcade_md_tplaygld = \"md_tplaygld\"\r\narcade_md_tplayglda = \"md_tplaygld\"\r\narcade_md_tpwres = \"md_tpwres\"\r\narcade_md_trampter = \"md_trampter\"\r\narcade_md_transf3 = \"md_mazinwar\"\r\narcade_md_traysia = \"md_traysia\"\r\narcade_md_traysiaj = \"md_traysia\"\r\narcade_md_trgearth = \"md_trgearth\"\r\narcade_md_troubsht = \"md_troubsht\"\r\narcade_md_troyaik = \"md_troyaik\"\r\narcade_md_truco96 = \"md_truco96\"\r\narcade_md_truelies = \"md_truelies\"\r\narcade_md_truxton = \"md_truxton\"\r\narcade_md_tsfss = \"md_sonic\"\r\narcade_md_ttacme = \"md_ttacme\"\r\narcade_md_ttacmeu = \"md_ttacme\"\r\narcade_md_ttoon3 = \"md_ttoon3\"\r\narcade_md_ttoonbht = \"md_ttoonbht\"\r\narcade_md_ttoonbhtk = \"md_ttoonbht\"\r\narcade_md_ttoonbhtu = \"md_ttoonbht\"\r\narcade_md_tunshi = \"md_tunshi\"\r\narcade_md_tunshi1 = \"md_tunshi\"\r\narcade_md_turmamon = \"md_wboymw\"\r\narcade_md_turrican = \"md_turrican\"\r\narcade_md_turricanf = \"md_turrican\"\r\narcade_md_twincobr = \"md_twincobr\"\r\narcade_md_twinhawk = \"md_twinhawk\"\r\narcade_md_twinklet = \"md_twinklet\"\r\narcade_md_twinklete = \"md_twinklet\"\r\narcade_md_twistedf = \"md_crueball\"\r\narcade_md_twocrude = \"md_twocrude\"\r\narcade_md_twocrudeu = \"md_twocrude\"\r\narcade_md_twotribe = \"md_twotribe\"\r\narcade_md_tyrant = \"md_megalo\"\r\narcade_md_ultqix = \"md_ultqix\"\r\narcade_md_ultraman = \"md_ultraman\"\r\narcade_md_ultsoccr = \"md_ultsoccr\"\r\narcade_md_ultsoccrp = \"md_ultsoccr\"\r\narcade_md_umk3 = \"md_umk3\"\r\narcade_md_umk3h = \"md_umk3\"\r\narcade_md_umk3mh = \"md_umk3\"\r\narcade_md_umk3t = \"md_umk3t\"\r\narcade_md_umk3u = \"md_umk3\"\r\narcade_md_unchartd = \"md_unchartd\"\r\narcade_md_undead = \"md_undead\"\r\narcade_md_undeade = \"md_undead\"\r\narcade_md_univsold = \"md_univsold\"\r\narcade_md_unknown2 = \"md_unknown2\"\r\narcade_md_unnecess = \"md_unnecess\"\r\narcade_md_ustrike = \"md_ustrike\"\r\narcade_md_uwol = \"md_uwol\"\r\narcade_md_uzukeo = \"md_uzukeo\"\r\narcade_md_valis = \"md_valis\"\r\narcade_md_valis3 = \"md_valis3\"\r\narcade_md_valis3j = \"md_valis3\"\r\narcade_md_valisj = \"md_valis\"\r\narcade_md_vaportr = \"md_vaportr\"\r\narcade_md_vbart = \"md_vbart\"\r\narcade_md_vecman = \"md_vecman\"\r\narcade_md_vecman2 = \"md_vecman2\"\r\narcade_md_vecman2p1 = \"md_vecman2\"\r\narcade_md_vecman2p2 = \"md_vecman2\"\r\narcade_md_vecman2p3 = \"md_vecman2\"\r\narcade_md_vecman2p4 = \"md_vecman2\"\r\narcade_md_vecman2p5 = \"md_vecman2\"\r\narcade_md_vecman2p6 = \"md_vecman2\"\r\narcade_md_vecmanp1 = \"md_vecman\"\r\narcade_md_vecmanp2 = \"md_vecman\"\r\narcade_md_vecmanp3 = \"md_vecman\"\r\narcade_md_venom = \"md_venom\"\r\narcade_md_vermil = \"md_vermil\"\r\narcade_md_vermilj = \"md_vermil\"\r\narcade_md_verytex = \"md_verytex\"\r\narcade_md_vf2 = \"md_vf2\"\r\narcade_md_vf2k = \"md_vf2\"\r\narcade_md_vf2p1 = \"md_vf2\"\r\narcade_md_vf2p2 = \"md_vf2\"\r\narcade_md_vf2p3 = \"md_vf2\"\r\narcade_md_vf2p4 = \"md_vf2\"\r\narcade_md_vf2p5 = \"md_vf2\"\r\narcade_md_vf2tek = \"md_vf2tek\"\r\narcade_md_vfive = \"md_grindst\"\r\narcade_md_viewpoin = \"md_viewpoin\"\r\narcade_md_viewpoinp = \"md_viewpoin\"\r\narcade_md_virak = \"md_virak\"\r\narcade_md_vixen357 = \"md_vixen357\"\r\narcade_md_vixen357e = \"md_vixen357\"\r\narcade_md_volfied = \"md_ultqix\"\r\narcade_md_vpinball = \"md_vpinball\"\r\narcade_md_vr = \"md_vr\"\r\narcade_md_vrj = \"md_vr\"\r\narcade_md_vrtroop = \"md_vrtroop\"\r\narcade_md_vru = \"md_vr\"\r\narcade_md_wackyrac = \"md_wackyrac\"\r\narcade_md_waldo = \"md_waldo\"\r\narcade_md_waniwani = \"md_waniwani\"\r\narcade_md_wardner = \"md_wardner\"\r\narcade_md_wardnerj = \"md_wardner\"\r\narcade_md_wario3 = \"md_puggsy\"\r\narcade_md_warlock = \"md_warlock\"\r\narcade_md_warlockp = \"md_warlock\"\r\narcade_md_warpsped = \"md_warpsped\"\r\narcade_md_warrior = \"md_warrior\"\r\narcade_md_warrior2 = \"md_warrior2\"\r\narcade_md_warsong = \"md_warsong\"\r\narcade_md_waterwld = \"md_waterwld\"\r\narcade_md_wayneg = \"md_wayneg\"\r\narcade_md_waynewld = \"md_waynewld\"\r\narcade_md_wboy3 = \"md_wboy3\"\r\narcade_md_wboy5 = \"md_wboymw\"\r\narcade_md_wboymw = \"md_wboymw\"\r\narcade_md_wclead = \"md_wclead\"\r\narcade_md_wcleadu = \"md_wclead\"\r\narcade_md_wcs = \"md_wcup90\"\r\narcade_md_wcs2 = \"md_wcs2\"\r\narcade_md_wcs2p01 = \"md_wcs2\"\r\narcade_md_wcs2p02 = \"md_wcs2\"\r\narcade_md_wcs2p03 = \"md_wcs2\"\r\narcade_md_wcs2p04 = \"md_wcs2\"\r\narcade_md_wcs2p05 = \"md_wcs2\"\r\narcade_md_wcs2p06 = \"md_wcs2\"\r\narcade_md_wcs2p07 = \"md_wcs2\"\r\narcade_md_wcs2p08 = \"md_wcs2\"\r\narcade_md_wcs2p09 = \"md_wcs2\"\r\narcade_md_wcs2p10 = \"md_wcs2\"\r\narcade_md_wcs2p11 = \"md_wcs2\"\r\narcade_md_wcs2p12 = \"md_wcs2\"\r\narcade_md_wcs2p13 = \"md_wcs2\"\r\narcade_md_wcs2p14 = \"md_wcs2\"\r\narcade_md_wcs2p15 = \"md_wcs2\"\r\narcade_md_wcs2p16 = \"md_wcs2\"\r\narcade_md_wcs2p17 = \"md_wcs2\"\r\narcade_md_wcs2p18 = \"md_wcs2\"\r\narcade_md_wcs2u = \"md_wcs2\"\r\narcade_md_wcs2up = \"md_wcs2\"\r\narcade_md_wcsa = \"md_wcup90\"\r\narcade_md_wcsb = \"md_wcup90\"\r\narcade_md_wcup90 = \"md_wcup90\"\r\narcade_md_wcup94 = \"md_wcup94\"\r\narcade_md_weaponld = \"md_weaponld\"\r\narcade_md_wh = \"md_wh\"\r\narcade_md_whacacri = \"md_whacacri\"\r\narcade_md_wheelfor = \"md_wheelfor\"\r\narcade_md_whiprush = \"md_whiprush\"\r\narcade_md_whiprushj = \"md_whiprush\"\r\narcade_md_whj = \"md_wh\"\r\narcade_md_whjp1 = \"md_wh\"\r\narcade_md_whjp2 = \"md_wh\"\r\narcade_md_whjp3 = \"md_wh\"\r\narcade_md_whjp4 = \"md_wh\"\r\narcade_md_whjp5 = \"md_wh\"\r\narcade_md_whp01 = \"md_wh\"\r\narcade_md_whp02 = \"md_wh\"\r\narcade_md_whp03 = \"md_wh\"\r\narcade_md_whp04 = \"md_wh\"\r\narcade_md_whp05 = \"md_wh\"\r\narcade_md_whp06 = \"md_wh\"\r\narcade_md_whp07 = \"md_wh\"\r\narcade_md_whp08 = \"md_wh\"\r\narcade_md_whp09 = \"md_wh\"\r\narcade_md_whp10 = \"md_wh\"\r\narcade_md_whp11 = \"md_wh\"\r\narcade_md_whp12 = \"md_wh\"\r\narcade_md_whp13 = \"md_wh\"\r\narcade_md_wildsnak = \"md_wildsnak\"\r\narcade_md_wimbled = \"md_wimbled\"\r\narcade_md_wimbledj = \"md_wimbled\"\r\narcade_md_wimbledu = \"md_wimbled\"\r\narcade_md_wimbledup = \"md_wimbled\"\r\narcade_md_wingswor = \"md_gynoug\"\r\narcade_md_wintchal = \"md_wintchal\"\r\narcade_md_wintchal1 = \"md_wintchal\"\r\narcade_md_wintchalp = \"md_wintchal\"\r\narcade_md_wintol = \"md_wintol\"\r\narcade_md_wintolj = \"md_wintol\"\r\narcade_md_wintolu = \"md_wintol\"\r\narcade_md_winx = \"md_valis\"\r\narcade_md_winx3d = \"md_valis3\"\r\narcade_md_wiznliz = \"md_wiznliz\"\r\narcade_md_wiznlizu = \"md_wiznliz\"\r\narcade_md_wolfchld = \"md_wolfchld\"\r\narcade_md_wolverin = \"md_wolverin\"\r\narcade_md_wondlib = \"md_wondlib\"\r\narcade_md_worldill = \"md_worldill\"\r\narcade_md_worldillj = \"md_worldill\"\r\narcade_md_worldilljp = \"md_worldill\"\r\narcade_md_worldillu = \"md_worldill\"\r\narcade_md_worldts = \"md_euroclub\"\r\narcade_md_worms = \"md_worms\"\r\narcade_md_wormsp = \"md_worms\"\r\narcade_md_wrestwar = \"md_wrestwar\"\r\narcade_md_wrestwarp = \"md_wrestwar\"\r\narcade_md_wrstball = \"md_powerbal\"\r\narcade_md_wsb = \"md_wsb\"\r\narcade_md_wsb95 = \"md_wsb95\"\r\narcade_md_wsb95p01 = \"md_wsb95\"\r\narcade_md_wsb95p02 = \"md_wsb95\"\r\narcade_md_wsb95p03 = \"md_wsb95\"\r\narcade_md_wsb95p04 = \"md_wsb95\"\r\narcade_md_wsb95p05 = \"md_wsb95\"\r\narcade_md_wsb95p06 = \"md_wsb95\"\r\narcade_md_wsb95p07 = \"md_wsb95\"\r\narcade_md_wsb95p08 = \"md_wsb95\"\r\narcade_md_wsb95p09 = \"md_wsb95\"\r\narcade_md_wsb95p10 = \"md_wsb95\"\r\narcade_md_wsb95p11 = \"md_wsb95\"\r\narcade_md_wsb95p12 = \"md_wsb95\"\r\narcade_md_wsb95p13 = \"md_wsb95\"\r\narcade_md_wsb95p14 = \"md_wsb95\"\r\narcade_md_wsb95p15 = \"md_wsb95\"\r\narcade_md_wsb95p16 = \"md_wsb95\"\r\narcade_md_wsb95p17 = \"md_wsb95\"\r\narcade_md_wsb95p18 = \"md_wsb95\"\r\narcade_md_wsb95p19 = \"md_wsb95\"\r\narcade_md_wsb95p20 = \"md_wsb95\"\r\narcade_md_wsb95p21 = \"md_wsb95\"\r\narcade_md_wsb95p22 = \"md_wsb95\"\r\narcade_md_wsb95p23 = \"md_wsb95\"\r\narcade_md_wsb96 = \"md_wsb96\"\r\narcade_md_wsb98 = \"md_wsb98\"\r\narcade_md_wsbp01 = \"md_wsb\"\r\narcade_md_wsbp02 = \"md_wsb\"\r\narcade_md_wsbp03 = \"md_wsb\"\r\narcade_md_wsbp04 = \"md_wsb\"\r\narcade_md_wsbp05 = \"md_wsb\"\r\narcade_md_wsbp06 = \"md_wsb\"\r\narcade_md_wsbp07 = \"md_wsb\"\r\narcade_md_wsbp08 = \"md_wsb\"\r\narcade_md_wsbp09 = \"md_wsb\"\r\narcade_md_wsbp10 = \"md_wsb\"\r\narcade_md_wukong = \"md_wukong\"\r\narcade_md_wwfag = \"md_wwfag\"\r\narcade_md_wwfagp = \"md_wwfag\"\r\narcade_md_wwfraw = \"md_wwfraw\"\r\narcade_md_wwfroyal = \"md_wwfroyal\"\r\narcade_md_wwfsup = \"md_wwfsup\"\r\narcade_md_wworlds = \"md_wworlds\"\r\narcade_md_wworldsp1 = \"md_wworlds\"\r\narcade_md_wworldsp2 = \"md_wworlds\"\r\narcade_md_wworldsp3 = \"md_wworlds\"\r\narcade_md_xdr = \"md_xdr\"\r\narcade_md_xenon2 = \"md_xenon2\"\r\narcade_md_xfire = \"md_xfire\"\r\narcade_md_xiaomo = \"md_xiaomo\"\r\narcade_md_xinqig = \"md_xinqig\"\r\narcade_md_xinqig1 = \"md_xinqig\"\r\narcade_md_xmen = \"md_xmen\"\r\narcade_md_xmen2 = \"md_xmen2\"\r\narcade_md_xmen2p01 = \"md_xmen2\"\r\narcade_md_xmen2p02 = \"md_xmen2\"\r\narcade_md_xmen2p03 = \"md_xmen2\"\r\narcade_md_xmen2p04 = \"md_xmen2\"\r\narcade_md_xmen2p05 = \"md_xmen2\"\r\narcade_md_xmen2p06 = \"md_xmen2\"\r\narcade_md_xmen2p07 = \"md_xmen2\"\r\narcade_md_xmen2p08 = \"md_xmen2\"\r\narcade_md_xmen2p09 = \"md_xmen2\"\r\narcade_md_xmen2p10 = \"md_xmen2\"\r\narcade_md_xmen2p11 = \"md_xmen2\"\r\narcade_md_xmen2p12 = \"md_xmen2\"\r\narcade_md_xmen2p13 = \"md_xmen2\"\r\narcade_md_xmen2p14 = \"md_xmen2\"\r\narcade_md_xmen2p15 = \"md_xmen2\"\r\narcade_md_xmen2p16 = \"md_xmen2\"\r\narcade_md_xmen2p17 = \"md_xmen2\"\r\narcade_md_xmen2p18 = \"md_xmen2\"\r\narcade_md_xmen2p19 = \"md_xmen2\"\r\narcade_md_xmenu = \"md_xmen\"\r\narcade_md_xperts = \"md_xperts\"\r\narcade_md_xpertsp = \"md_xperts\"\r\narcade_md_yangji = \"md_yangji\"\r\narcade_md_yasech = \"md_yasech\"\r\narcade_md_yogibear = \"md_yogibear\"\r\narcade_md_youngind = \"md_youngind\"\r\narcade_md_ys3 = \"md_ys3\"\r\narcade_md_ys3j = \"md_ys3\"\r\narcade_md_ysonic2 = \"md_sonic2\"\r\narcade_md_yuyug = \"md_yuyug\"\r\narcade_md_yuyumt = \"md_yuyusf\"\r\narcade_md_yuyumte = \"md_yuyusf\"\r\narcade_md_yuyusf = \"md_yuyusf\"\r\narcade_md_zanyasha = \"md_zanyasha\"\r\narcade_md_zanygolf = \"md_zanygolf\"\r\narcade_md_zanygolf1 = \"md_zanygolf\"\r\narcade_md_zero = \"md_zero\"\r\narcade_md_zerotol = \"md_zerotol\"\r\narcade_md_zerou = \"md_zero\"\r\narcade_md_zerowing = \"md_zerowing\"\r\narcade_md_zerowingj = \"md_zerowing\"\r\narcade_md_zhuogu = \"md_zhuogu\"\r\narcade_md_zombhigh = \"md_zombhigh\"\r\narcade_md_zombies = \"md_zombies\"\r\narcade_md_zombiesu = \"md_zombies\"\r\narcade_md_zool = \"md_zool\"\r\narcade_md_zoolu = \"md_zool\"\r\narcade_md_zoom = \"md_zoom\"\r\narcade_md_zoop = \"md_zoop\"\r\narcade_md_zoopu = \"md_zoop\"\r\narcade_md_zouzou = \"md_rolo\"\r\narcade_mdhorse = \"mdhorse\"\r\narcade_mechatt = \"mechatt\"\r\narcade_mechattj = \"mechatt\"\r\narcade_mechattu = \"mechatt\"\r\narcade_mechattu1 = \"mechatt\"\r\narcade_medlanes = \"medlanes\"\r\narcade_megab = \"megab\"\r\narcade_megabj = \"megab\"\r\narcade_megablst = \"megablst\"\r\narcade_megablstj = \"megablst\"\r\narcade_megablstu = \"megablst\"\r\narcade_megadon = \"megadon\"\r\narcade_megaforc = \"starforc\"\r\narcade_megaman = \"megaman\"\r\narcade_megaman2 = \"megaman2\"\r\narcade_megaman2a = \"megaman2\"\r\narcade_megaman2h = \"megaman2\"\r\narcade_megamana = \"megaman\"\r\narcade_megamn2a = \"megaman2\"\r\narcade_megamn2d = \"megaman2\"\r\narcade_megatack = \"megatack\"\r\narcade_megaznik = \"megazone\"\r\narcade_megazone = \"megazone\"\r\narcade_megazonea = \"megazone\"\r\narcade_megazoneb = \"megazone\"\r\narcade_megazoneh = \"megazone\"\r\narcade_megazonei = \"megazone\"\r\narcade_megazonej = \"megazone\"\r\narcade_meijinsn = \"meijinsn\"\r\narcade_meikyuh = \"ghostb\"\r\narcade_meikyuha = \"ghostb\"\r\narcade_meosism = \"meosism\"\r\narcade_mercenario = \"commando\"\r\narcade_mercs = \"mercs\"\r\narcade_mercsj = \"mercs\"\r\narcade_mercsu = \"mercs\"\r\narcade_mercsua = \"mercs\"\r\narcade_mercsur1 = \"mercs\"\r\narcade_merlinmm = \"merlinmm\"\r\narcade_mermaid = \"mermaid\"\r\narcade_metafox = \"metafox\"\r\narcade_metalb = \"metalb\"\r\narcade_metalbj = \"metalb\"\r\narcade_metamrph = \"metamrph\"\r\narcade_metamrpha = \"metamrph\"\r\narcade_metamrphe = \"metamrph\"\r\narcade_metamrphj = \"metamrph\"\r\narcade_metamrphu = \"metamrph\"\r\narcade_metamrpj = \"metamrph\"\r\narcade_meteor = \"spcforce\"\r\narcade_metlclsh = \"metlclsh\"\r\narcade_metlfrzr = \"metlfrzr\"\r\narcade_metlhawk = \"metlhawk\"\r\narcade_metlhawkj = \"metlhawk\"\r\narcade_metlsavr = \"metlsavr\"\r\narcade_metmqstr = \"metmqstr\"\r\narcade_metrocra = \"metrocrs\"\r\narcade_metrocrs = \"metrocrs\"\r\narcade_metrocrsa = \"metrocrs\"\r\narcade_mexico86 = \"kicknrun\"\r\narcade_mfunclub = \"mfunclub\"\r\narcade_mgakuen = \"mgakuen\"\r\narcade_mgakuen2 = \"mgakuen2\"\r\narcade_mgcldate = \"mgcldate\"\r\narcade_mgcldtea = \"mgcldate\"\r\narcade_mgcrystj = \"mgcrystl\"\r\narcade_mgcrystl = \"mgcrystl\"\r\narcade_mgcrystlj = \"mgcrystl\"\r\narcade_mgcrystlo = \"mgcrystl\"\r\narcade_mgmen89 = \"mgmen89\"\r\narcade_mhavoc = \"mhavoc\"\r\narcade_mhavoc2 = \"mhavoc\"\r\narcade_mhavocp = \"mhavoc\"\r\narcade_mhavocrv = \"mhavoc\"\r\narcade_mhgaiden = \"mhgaiden\"\r\narcade_mia = \"mia\"\r\narcade_mia2 = \"mia\"\r\narcade_miaj = \"mia\"\r\narcade_midres = \"midres\"\r\narcade_midresbj = \"midres\"\r\narcade_midresj = \"midres\"\r\narcade_midresu = \"midres\"\r\narcade_miexchng = \"miexchng\"\r\narcade_mightguy = \"mightguy\"\r\narcade_mightybj = \"mightybj\"\r\narcade_mikie = \"mikie\"\r\narcade_mikiehs = \"mikie\"\r\narcade_mikiej = \"mikie\"\r\narcade_milliped = \"milliped\"\r\narcade_millpac = \"centiped\"\r\narcade_mimonkey = \"mimonkey\"\r\narcade_mimonsco = \"mimonkey\"\r\narcade_mimonscr = \"mimonkey\"\r\narcade_mimonscra = \"mimonkey\"\r\narcade_minasan = \"minasan\"\r\narcade_minefld = \"minefld\"\r\narcade_mineswpr = \"mineswpr\"\r\narcade_minferno = \"minferno\"\r\narcade_minigol2 = \"minigolf\"\r\narcade_minigolf = \"minigolf\"\r\narcade_minivadr = \"minivadr\"\r\narcade_mirax = \"mirax\"\r\narcade_miraxa = \"mirax\"\r\narcade_mirninja = \"mirninja\"\r\narcade_missb2 = \"bublbobl\"\r\narcade_missile = \"missile\"\r\narcade_missile2 = \"missile\"\r\narcade_missmw96 = \"missw96\"\r\narcade_missw02 = \"missw02\"\r\narcade_missw96 = \"missw96\"\r\narcade_missw96a = \"missw96\"\r\narcade_missw96b = \"missw96\"\r\narcade_missw96c = \"missw96\"\r\narcade_mizubaku = \"liquidk\"\r\narcade_mj4simai = \"mj4simai\"\r\narcade_mjanbari = \"mjanbari\"\r\narcade_mjangels = \"mjangels\"\r\narcade_mjcamera = \"mjcamera\"\r\narcade_mjclinic = \"mjclinic\"\r\narcade_mjderngr = \"mjderngr\"\r\narcade_mjdialq2 = \"mjdialq2\"\r\narcade_mjdiplob = \"mjdiplob\"\r\narcade_mjegolf = \"mjegolf\"\r\narcade_mjfocus = \"mjfocus\"\r\narcade_mjfocusm = \"mjfocus\"\r\narcade_mjfriday = \"mjfriday\"\r\narcade_mjgottsu = \"mjgottsu\"\r\narcade_mjgtaste = \"mjgtaste\"\r\narcade_mjhokite = \"mjhokite\"\r\narcade_mjifb = \"mjifb\"\r\narcade_mjikaga = \"mjikaga\"\r\narcade_mjkinjas = \"mjkinjas\"\r\narcade_mjkjidai = \"mjkjidai\"\r\narcade_mjkoiura = \"mjkoiura\"\r\narcade_mjkojink = \"mjkojink\"\r\narcade_mjlaman = \"mjlaman\"\r\narcade_mjleague = \"mjleague\"\r\narcade_mjlstory = \"mjlstory\"\r\narcade_mjnanpaa = \"mjnanpas\"\r\narcade_mjnanpas = \"mjnanpas\"\r\narcade_mjnanpau = \"mjnanpas\"\r\narcade_mjnatsu = \"mjnatsu\"\r\narcade_mjnquesb = \"mjnquest\"\r\narcade_mjnquest = \"mjnquest\"\r\narcade_mjnquestb = \"mjnquest\"\r\narcade_mjsikakb = \"mjsikaku\"\r\narcade_mjsikaku = \"mjsikaku\"\r\narcade_mjsister = \"mjsister\"\r\narcade_mjuraden = \"mjuraden\"\r\narcade_mjyougo = \"mjyougo\"\r\narcade_mjyuugi = \"mjyuugi\"\r\narcade_mjyuugia = \"mjyuugi\"\r\narcade_mjzoomin = \"mjzoomin\"\r\narcade_mk = \"mk\"\r\narcade_mk2 = \"mk2\"\r\narcade_mk2chal = \"mk2\"\r\narcade_mk2r14 = \"mk2\"\r\narcade_mk2r21 = \"mk2\"\r\narcade_mk2r32 = \"mk2\"\r\narcade_mk2r42 = \"mk2\"\r\narcade_mk2r91 = \"mk2\"\r\narcade_mk3 = \"mk3\"\r\narcade_mk3r10 = \"mk3\"\r\narcade_mk3r20 = \"mk3\"\r\narcade_mkeibaou = \"mkeibaou\"\r\narcade_mkla1 = \"mk\"\r\narcade_mkla2 = \"mk\"\r\narcade_mkla3 = \"mk\"\r\narcade_mkla4 = \"mk\"\r\narcade_mkprot9 = \"mk\"\r\narcade_mkr4 = \"mk\"\r\narcade_mladyhtr = \"mladyhtr\"\r\narcade_mltiwars = \"uniwars\"\r\narcade_mmagic = \"mmagic\"\r\narcade_mmancp2u = \"megaman\"\r\narcade_mmancp2ur1 = \"megaman\"\r\narcade_mmatrix = \"mmatrix\"\r\narcade_mmatrixd = \"mmatrix\"\r\narcade_mmatrixj = \"mmatrix\"\r\narcade_mmaulers = \"mmaulers\"\r\narcade_mmaze = \"mmaze\"\r\narcade_mmaze2 = \"mmaze\"\r\narcade_mmcamera = \"mjcamera\"\r\narcade_mmehyou = \"mmehyou\"\r\narcade_mmonkey = \"mmonkey\"\r\narcade_mmpanic = \"mmpanic\"\r\narcade_mnchmobl = \"joyfulr\"\r\narcade_mnight = \"mnight\"\r\narcade_mnightj = \"mnight\"\r\narcade_moegonta = \"ladykill\"\r\narcade_mofflott = \"mofflott\"\r\narcade_moguchan = \"moguchan\"\r\narcade_mogura = \"mogura\"\r\narcade_mole = \"mole\"\r\narcade_momoko = \"momoko\"\r\narcade_momokob = \"momoko\"\r\narcade_momokoe = \"momoko\"\r\narcade_monkelf = \"avspirit\"\r\narcade_monkeyd = \"ckong\"\r\narcade_monsterb = \"monsterb\"\r\narcade_monsterz = \"monsterz\"\r\narcade_montecar = \"montecar\"\r\narcade_monymony = \"monymony\"\r\narcade_moo = \"moo\"\r\narcade_moobl = \"moo\"\r\narcade_moomesa = \"moomesa\"\r\narcade_moomesaaab = \"moomesa\"\r\narcade_moomesabl = \"moomesa\"\r\narcade_moomesauab = \"moomesa\"\r\narcade_moomesauac = \"moomesa\"\r\narcade_moonal2 = \"moonal2\"\r\narcade_moonal2b = \"moonal2\"\r\narcade_moonaln = \"galaxian\"\r\narcade_moonbase = \"invadpt2\"\r\narcade_mooncmw = \"mooncrst\"\r\narcade_mooncptc = \"mooncrst\"\r\narcade_mooncreg = \"mooncrst\"\r\narcade_mooncrgx = \"mooncrst\"\r\narcade_mooncrs2 = \"mooncrst\"\r\narcade_mooncrs3 = \"mooncrst\"\r\narcade_mooncrs4 = \"mooncrst\"\r\narcade_mooncrsa = \"mooncrst\"\r\narcade_mooncrsb = \"mooncrst\"\r\narcade_mooncrsg = \"mooncrst\"\r\narcade_mooncrsl = \"mooncrst\"\r\narcade_mooncrst = \"mooncrst\"\r\narcade_mooncrstg = \"mooncrst\"\r\narcade_mooncrsto = \"mooncrst\"\r\narcade_mooncrstso = \"mooncrst\"\r\narcade_mooncrstu = \"mooncrst\"\r\narcade_mooncrstuk = \"mooncrst\"\r\narcade_mooncrstuku = \"mooncrst\"\r\narcade_mooncrsu = \"mooncrst\"\r\narcade_moonqsr = \"moonqsr\"\r\narcade_moonwalk = \"moonwalk\"\r\narcade_moonwar = \"moonwar\"\r\narcade_moonwara = \"moonwar\"\r\narcade_moonwlka = \"moonwalk\"\r\narcade_moonwlkb = \"moonwalk\"\r\narcade_mooua = \"moo\"\r\narcade_moremore = \"moremore\"\r\narcade_moremorp = \"moremorp\"\r\narcade_mosaic = \"mosaic\"\r\narcade_mosaica = \"mosaic\"\r\narcade_moshougi = \"moshougi\"\r\narcade_mosyougi = \"mosyougi\"\r\narcade_motofren = \"motofren\"\r\narcade_motorace = \"travrusa\"\r\narcade_motos = \"motos\"\r\narcade_mototour = \"travrusa\"\r\narcade_mouja = \"mouja\"\r\narcade_mouser = \"mouser\"\r\narcade_mouserc = \"mouser\"\r\narcade_mp_gaxe2 = \"mp_gaxe2\"\r\narcade_mp_sonic = \"mp_sonic\"\r\narcade_mpang = \"mpang\"\r\narcade_mpangj = \"mpang\"\r\narcade_mpangjd = \"mpang\"\r\narcade_mpangr1 = \"mpang\"\r\narcade_mpangu = \"mpang\"\r\narcade_mpatrol = \"mpatrol\"\r\narcade_mpatrolw = \"mpatrol\"\r\narcade_mplanets = \"mplanets\"\r\narcade_mplanetsuk = \"mplanets\"\r\narcade_mplanuk = \"mplanets\"\r\narcade_mrdo = \"mrdo\"\r\narcade_mrdofix = \"mrdo\"\r\narcade_mrdot = \"mrdo\"\r\narcade_mrdoy = \"mrdo\"\r\narcade_mrdrillr = \"mrdrillr\"\r\narcade_mrdrilr2 = \"mrdrilr2\"\r\narcade_mrdu = \"mrdo\"\r\narcade_mrflea = \"mrflea\"\r\narcade_mrgoemon = \"mrgoemon\"\r\narcade_mrheli = \"bchopper\"\r\narcade_mrjong = \"mrjong\"\r\narcade_mrkougar = \"mrkougar\"\r\narcade_mrkougar2 = \"mrkougar\"\r\narcade_mrkougb = \"mrkougar\"\r\narcade_mrkougb2 = \"mrkougar\"\r\narcade_mrkougr2 = \"mrkougar\"\r\narcade_mrlo = \"mrdo\"\r\narcade_mrokumei = \"mrokumei\"\r\narcade_mrtnt = \"mrtnt\"\r\narcade_mrviking = \"mrviking\"\r\narcade_mrvikingj = \"mrviking\"\r\narcade_mrvikngj = \"mrviking\"\r\narcade_ms4plus = \"mslug4\"\r\narcade_ms5pcb = \"ms5pcb\"\r\narcade_ms5plus = \"mslug5\"\r\narcade_msbingo = \"msbingo\"\r\narcade_mschamp = \"mspacman\"\r\narcade_mschamps = \"mspacman\"\r\narcade_mscoutm = \"mscoutm\"\r\narcade_msgogo = \"msgogo\"\r\narcade_msgunda1 = \"msgundam\"\r\narcade_msgundam = \"msgundam\"\r\narcade_msgundam1 = \"msgundam\"\r\narcade_msh = \"msh\"\r\narcade_msha = \"msh\"\r\narcade_mshb = \"msh\"\r\narcade_mshbr1 = \"msh\"\r\narcade_msheartb = \"mspacman\"\r\narcade_mshh = \"msh\"\r\narcade_mshj = \"msh\"\r\narcade_mshjr1 = \"msh\"\r\narcade_mshu = \"msh\"\r\narcade_mshud = \"msh\"\r\narcade_mshuttle = \"mshuttle\"\r\narcade_mshuttle2 = \"mshuttle\"\r\narcade_mshuttlea = \"mshuttle\"\r\narcade_mshuttlej = \"mshuttle\"\r\narcade_mshuttlej2 = \"mshuttle\"\r\narcade_mshuttlj = \"mshuttle\"\r\narcade_mshvsf = \"mshvsf\"\r\narcade_mshvsfa = \"mshvsf\"\r\narcade_mshvsfa1 = \"mshvsf\"\r\narcade_mshvsfb = \"mshvsf\"\r\narcade_mshvsfb1 = \"mshvsf\"\r\narcade_mshvsfh = \"mshvsf\"\r\narcade_mshvsfj = \"mshvsf\"\r\narcade_mshvsfj1 = \"mshvsf\"\r\narcade_mshvsfj2 = \"mshvsf\"\r\narcade_mshvsfu = \"mshvsf\"\r\narcade_mshvsfu1 = \"mshvsf\"\r\narcade_mshvsfu1d = \"mshvsf\"\r\narcade_msisaac = \"msisaac\"\r\narcade_msjiken = \"msjiken\"\r\narcade_mslider = \"mslider\"\r\narcade_mslug = \"mslug\"\r\narcade_mslug2 = \"mslug2\"\r\narcade_mslug2t = \"mslug2\"\r\narcade_mslug3 = \"mslug3\"\r\narcade_mslug3b6 = \"mslug3\"\r\narcade_mslug3h = \"mslug3\"\r\narcade_mslug3n = \"mslug3\"\r\narcade_mslug3v = \"mslug3\"\r\narcade_mslug4 = \"mslug4\"\r\narcade_mslug4h = \"mslug4\"\r\narcade_mslug5 = \"mslug5\"\r\narcade_mslug5b = \"mslug5\"\r\narcade_mslug5h = \"mslug5\"\r\narcade_mslug5w = \"mslug5\"\r\narcade_mslugx = \"mslugx\"\r\narcade_mspacmab = \"mspacman\"\r\narcade_mspacman = \"mspacman\"\r\narcade_mspacmanbcc = \"mspacman\"\r\narcade_mspacmanbg = \"mspacman\"\r\narcade_mspacmanbgd = \"mspacman\"\r\narcade_mspacmanbhe = \"mspacman\"\r\narcade_mspacmanblt = \"mspacman\"\r\narcade_mspacmat = \"mspacman\"\r\narcade_mspacmbe = \"mspacman\"\r\narcade_mspacmnf = \"mspacman\"\r\narcade_mspacpls = \"mspacman\"\r\narcade_mspuzzle = \"mspuzzle\"\r\narcade_mspuzzleg = \"gumbo\"\r\narcade_mspuzzlen = \"mspuzzle\"\r\narcade_mstadium = \"bottom9\"\r\narcade_mstworld = \"mstworld\"\r\narcade_msword = \"msword\"\r\narcade_mswordj = \"msword\"\r\narcade_mswordr1 = \"msword\"\r\narcade_mswordu = \"msword\"\r\narcade_msx_007tld = \"msx_007tld\"\r\narcade_msx_10yard = \"msx_10yard\"\r\narcade_msx_10yarda = \"msx_10yard\"\r\narcade_msx_180 = \"msx_180\"\r\narcade_msx_1942 = \"msx_1942\"\r\narcade_msx_1942a = \"msx_1942\"\r\narcade_msx_1942k = \"msx_1942\"\r\narcade_msx_3dragon = \"msx_3dragon\"\r\narcade_msx_a1spirit = \"msx_f1spirit\"\r\narcade_msx_aaargh = \"msx_aaargh\"\r\narcade_msx_abadcrim = \"msx_abadcrim\"\r\narcade_msx_abusimbel = \"msx_abusimbel\"\r\narcade_msx_actman = \"msx_actman\"\r\narcade_msx_actmana = \"msx_actman\"\r\narcade_msx_addictbl = \"msx_addictbl\"\r\narcade_msx_adel = \"msx_adel\"\r\narcade_msx_ae = \"msx_ae\"\r\narcade_msx_afteroids = \"msx_afteroids\"\r\narcade_msx_albatros = \"msx_albatros\"\r\narcade_msx_albatrosa = \"msx_albatros\"\r\narcade_msx_alehop = \"msx_alehop\"\r\narcade_msx_alibaba = \"msx_alibaba\"\r\narcade_msx_alibabaa = \"msx_alibaba\"\r\narcade_msx_alibabab = \"msx_alibaba\"\r\narcade_msx_alien8 = \"msx_alien8\"\r\narcade_msx_alien8h = \"msx_alien8\"\r\narcade_msx_aliens = \"msx_aliens\"\r\narcade_msx_aliensa = \"msx_aliens\"\r\narcade_msx_aliensb = \"msx_aliens\"\r\narcade_msx_alphablaster = \"msx_alphablaster\"\r\narcade_msx_alpineski = \"msx_alpineski\"\r\narcade_msx_alteredbeast = \"msx_alteredbeast\"\r\narcade_msx_alterego = \"msx_alterego\"\r\narcade_msx_amc = \"msx_amc\"\r\narcade_msx_amomundo = \"msx_amomundo\"\r\narcade_msx_amotopuf = \"msx_amotopuf\"\r\narcade_msx_amtrucka = \"msx_amtrucka\"\r\narcade_msx_amurisus = \"msx_amurisus\"\r\narcade_msx_anaza = \"msx_anaza\"\r\narcade_msx_angelo = \"msx_angelo\"\r\narcade_msx_angeloa = \"msx_angelo\"\r\narcade_msx_antarct = \"msx_antarct\"\r\narcade_msx_antarcta = \"msx_antarct\"\r\narcade_msx_antarctj = \"msx_antarct\"\r\narcade_msx_antarctk = \"msx_antarct\"\r\narcade_msx_anty = \"msx_anty\"\r\narcade_msx_antya = \"msx_anty\"\r\narcade_msx_apeman = \"msx_apeman\"\r\narcade_msx_aquasos = \"msx_aquasos\"\r\narcade_msx_aquatack = \"msx_aquatack\"\r\narcade_msx_aramo = \"msx_aramo\"\r\narcade_msx_arkanoid = \"msx_arkanoid\"\r\narcade_msx_arkanoida = \"msx_arkanoid\"\r\narcade_msx_arkanoidj = \"msx_arkanoid\"\r\narcade_msx_arkanoidja = \"msx_arkanoid\"\r\narcade_msx_arkanoidk = \"msx_arkanoid\"\r\narcade_msx_armymove = \"msx_armymove\"\r\narcade_msx_aroid = \"msx_aroid\"\r\narcade_msx_aroida = \"msx_aroid\"\r\narcade_msx_astrobls = \"msx_astrobls\"\r\narcade_msx_astroplm = \"msx_astroplm\"\r\narcade_msx_athland = \"msx_athland\"\r\narcade_msx_athlanda = \"msx_athland\"\r\narcade_msx_athlandp = \"msx_athland\"\r\narcade_msx_athlball = \"msx_athlball\"\r\narcade_msx_atsarias = \"msx_atsarias\"\r\narcade_msx_awmonty = \"msx_awmonty\"\r\narcade_msx_backgamj = \"msx_backgamj\"\r\narcade_msx_backgamja = \"msx_backgamj\"\r\narcade_msx_backtof = \"msx_backtof\"\r\narcade_msx_backtofa = \"msx_backtof\"\r\narcade_msx_baduk = \"msx_baduk\"\r\narcade_msx_balance = \"msx_balance\"\r\narcade_msx_balance1 = \"msx_balance\"\r\narcade_msx_balance2 = \"msx_balance\"\r\narcade_msx_ballblzr = \"msx_ballblzr\"\r\narcade_msx_balloonpunch = \"msx_balloonpunch\"\r\narcade_msx_banana = \"msx_banana\"\r\narcade_msx_bankp = \"msx_bankp\"\r\narcade_msx_bankpa = \"msx_bankp\"\r\narcade_msx_bankpk = \"msx_bankp\"\r\narcade_msx_barb = \"msx_barb\"\r\narcade_msx_barb2 = \"msx_barb2\"\r\narcade_msx_barnstrm = \"msx_barnstrm\"\r\narcade_msx_batman = \"msx_batman\"\r\narcade_msx_batman10 = \"msx_batman\"\r\narcade_msx_batmanmv = \"msx_batmanmv\"\r\narcade_msx_battlex = \"msx_battlex\"\r\narcade_msx_bcquest = \"msx_bcquest\"\r\narcade_msx_bcquesta = \"msx_bcquest\"\r\narcade_msx_bdash = \"msx_bdash\"\r\narcade_msx_bdash2 = \"msx_bdash2\"\r\narcade_msx_beachead = \"msx_beachead\"\r\narcade_msx_beamridr = \"msx_beamridr\"\r\narcade_msx_becky = \"msx_becky\"\r\narcade_msx_beckya = \"msx_becky\"\r\narcade_msx_beckyb = \"msx_becky\"\r\narcade_msx_beeflowr = \"msx_beeflowr\"\r\narcade_msx_beeflowra = \"msx_beeflowr\"\r\narcade_msx_beeflowrb = \"msx_beeflowr\"\r\narcade_msx_bestwarr = \"msx_bestwarr\"\r\narcade_msx_betiled = \"msx_betiled\"\r\narcade_msx_binarylnd = \"msx_binarylnd\"\r\narcade_msx_bitlogic = \"msx_bitlogic\"\r\narcade_msx_blackbeard = \"msx_blackbeard\"\r\narcade_msx_blagger = \"msx_blagger\"\r\narcade_msx_blaggerenh = \"msx_blaggerenh\"\r\narcade_msx_blckony2 = \"msx_blckony2\"\r\narcade_msx_blckonyx = \"msx_blckonyx\"\r\narcade_msx_blockhol = \"msx_blockhol\"\r\narcade_msx_blockrun = \"msx_blockrun\"\r\narcade_msx_bloody = \"msx_bloody\"\r\narcade_msx_blowup = \"msx_blowup\"\r\narcade_msx_bmxsim = \"msx_bmxsim\"\r\narcade_msx_boggy84 = \"msx_boggy84\"\r\narcade_msx_boggy84a = \"msx_boggy84\"\r\narcade_msx_boggy84b = \"msx_boggy84\"\r\narcade_msx_boing2 = \"msx_boing2\"\r\narcade_msx_bokosuka = \"msx_bokosuka\"\r\narcade_msx_bokosukaa = \"msx_bokosuka\"\r\narcade_msx_bold = \"msx_bold\"\r\narcade_msx_bombking = \"msx_bombking\"\r\narcade_msx_bombman = \"msx_bombman\"\r\narcade_msx_bombmank1 = \"msx_bombman\"\r\narcade_msx_bombmank2 = \"msx_bombman\"\r\narcade_msx_bombmnsp = \"msx_bombmnsp\"\r\narcade_msx_boogie = \"msx_boogie\"\r\narcade_msx_boogie1 = \"msx_boogie\"\r\narcade_msx_boogie2 = \"msx_boogie\"\r\narcade_msx_boomrang = \"msx_boomrang\"\r\narcade_msx_boomranga = \"msx_boomrang\"\r\narcade_msx_booty = \"msx_booty\"\r\narcade_msx_bop = \"msx_bop\"\r\narcade_msx_borfes = \"msx_borfes\"\r\narcade_msx_bosco = \"msx_bosco\"\r\narcade_msx_boscoa = \"msx_bosco\"\r\narcade_msx_boscob = \"msx_bosco\"\r\narcade_msx_bounce = \"msx_bounce\"\r\narcade_msx_bounder = \"msx_bounder\"\r\narcade_msx_bousousos = \"msx_bousousos\"\r\narcade_msx_bousousosa = \"msx_bousousos\"\r\narcade_msx_breaker = \"msx_breaker\"\r\narcade_msx_breakinj = \"msx_breakinj\"\r\narcade_msx_breakout = \"msx_breakout\"\r\narcade_msx_breakoutt = \"msx_breakoutt\"\r\narcade_msx_britishbob = \"msx_britishbob\"\r\narcade_msx_bronx = \"msx_bronx\"\r\narcade_msx_brosadv = \"msx_brosadv\"\r\narcade_msx_brosadva = \"msx_brosadv\"\r\narcade_msx_brucelee = \"msx_brucelee\"\r\narcade_msx_btanuki = \"msx_btanuki\"\r\narcade_msx_btanukia = \"msx_btanuki\"\r\narcade_msx_btanukib = \"msx_btanuki\"\r\narcade_msx_btime = \"msx_btime\"\r\narcade_msx_bubbler = \"msx_bubbler\"\r\narcade_msx_buckrog = \"msx_buckrog\"\r\narcade_msx_bullmigt = \"msx_bullmigt\"\r\narcade_msx_bumpy = \"msx_bumpy\"\r\narcade_msx_butampan = \"msx_butampan\"\r\narcade_msx_butampana = \"msx_butampan\"\r\narcade_msx_butampanb = \"msx_butampan\"\r\narcade_msx_buzzoff = \"msx_buzzoff\"\r\narcade_msx_cabbagep = \"msx_cabbagep\"\r\narcade_msx_cabbagepa = \"msx_cabbagep\"\r\narcade_msx_cabbagepk = \"msx_cabbagep\"\r\narcade_msx_camelotw = \"msx_camelotw\"\r\narcade_msx_candoon = \"msx_candoon\"\r\narcade_msx_candoona = \"msx_candoon\"\r\narcade_msx_cannonbl = \"msx_cannonbl\"\r\narcade_msx_cannonbla = \"msx_cannonbl\"\r\narcade_msx_cannonfgt = \"msx_cannonfgt\"\r\narcade_msx_cannont = \"msx_cannont\"\r\narcade_msx_caos = \"msx_caos\"\r\narcade_msx_captchef = \"msx_captchef\"\r\narcade_msx_carfight = \"msx_carfight\"\r\narcade_msx_carjamb = \"msx_carjamb\"\r\narcade_msx_carjamba = \"msx_carjamb\"\r\narcade_msx_carrace = \"msx_carrace\"\r\narcade_msx_carracea = \"msx_carrace\"\r\narcade_msx_carraceb = \"msx_carrace\"\r\narcade_msx_castle = \"msx_castle\"\r\narcade_msx_castlek = \"msx_castle\"\r\narcade_msx_castlex = \"msx_castlex\"\r\narcade_msx_castlexa = \"msx_castlex\"\r\narcade_msx_caverns = \"msx_caverns\"\r\narcade_msx_cbilliar = \"msx_cbilliar\"\r\narcade_msx_chackn = \"msx_chackn\"\r\narcade_msx_chackna = \"msx_chackn\"\r\narcade_msx_champbox = \"msx_champbox\"\r\narcade_msx_champice = \"msx_champice\"\r\narcade_msx_champken = \"msx_champken\"\r\narcade_msx_champkena = \"msx_champken\"\r\narcade_msx_champpwr = \"msx_champpwr\"\r\narcade_msx_champpwra = \"msx_champpwr\"\r\narcade_msx_champpwrb = \"msx_champpwr\"\r\narcade_msx_champscr = \"msx_champscr\"\r\narcade_msx_chess = \"msx_chess\"\r\narcade_msx_chicken = \"msx_chicken\"\r\narcade_msx_chickfighter = \"msx_chickfighter\"\r\narcade_msx_chiller = \"msx_chiller\"\r\narcade_msx_chima = \"msx_chima\"\r\narcade_msx_choplift = \"msx_choplift\"\r\narcade_msx_choplifta = \"msx_choplift\"\r\narcade_msx_chopliftb = \"msx_choplift\"\r\narcade_msx_chopper1 = \"msx_chopper1\"\r\narcade_msx_choroq = \"msx_choroq\"\r\narcade_msx_choroqa = \"msx_choroq\"\r\narcade_msx_choroqk = \"msx_choroq\"\r\narcade_msx_chubbygristle = \"msx_chubbygristle\"\r\narcade_msx_chuckie = \"msx_chuckie\"\r\narcade_msx_chuheib1 = \"msx_chuheib1\"\r\narcade_msx_circusc = \"msx_circusc\"\r\narcade_msx_citycon = \"msx_citycon\"\r\narcade_msx_citycona = \"msx_citycon\"\r\narcade_msx_clapton2 = \"msx_clapton2\"\r\narcade_msx_clapton2a = \"msx_clapton2\"\r\narcade_msx_cloderun = \"msx_cloderun\"\r\narcade_msx_cnyumon = \"msx_cnyumon\"\r\narcade_msx_coastrac = \"msx_coastrac\"\r\narcade_msx_coastraca = \"msx_coastrac\"\r\narcade_msx_coastracb = \"msx_coastrac\"\r\narcade_msx_colball = \"msx_colball\"\r\narcade_msx_colballa = \"msx_colball\"\r\narcade_msx_colballb = \"msx_colball\"\r\narcade_msx_colony = \"msx_colony\"\r\narcade_msx_colt36 = \"msx_colt36\"\r\narcade_msx_cometail = \"msx_cometail\"\r\narcade_msx_comicbak = \"msx_comicbak\"\r\narcade_msx_comicbaka = \"msx_comicbak\"\r\narcade_msx_comicbakb = \"msx_comicbak\"\r\narcade_msx_condori = \"msx_condori\"\r\narcade_msx_condoria = \"msx_condori\"\r\narcade_msx_condorib = \"msx_condori\"\r\narcade_msx_confused = \"msx_confused\"\r\narcade_msx_congobongo = \"msx_congobongo\"\r\narcade_msx_corsarios = \"msx_corsarios\"\r\narcade_msx_cosanost = \"msx_cosanost\"\r\narcade_msx_cosmo = \"msx_cosmo\"\r\narcade_msx_cosmoa = \"msx_cosmo\"\r\narcade_msx_cosmoexp = \"msx_cosmoexp\"\r\narcade_msx_cosmoexpa = \"msx_cosmoexp\"\r\narcade_msx_cow = \"msx_cow\"\r\narcade_msx_cpachi = \"msx_cpachi\"\r\narcade_msx_craze = \"msx_craze\"\r\narcade_msx_crazy = \"msx_crazy\"\r\narcade_msx_crazybul = \"msx_crazybul\"\r\narcade_msx_crazycar = \"msx_crazycar\"\r\narcade_msx_crazytrn = \"msx_crazytrn\"\r\narcade_msx_crazytrna = \"msx_crazytrn\"\r\narcade_msx_crossblm = \"msx_crossblm\"\r\narcade_msx_crusader = \"msx_crusader\"\r\narcade_msx_crusadera = \"msx_crusader\"\r\narcade_msx_crusaderb = \"msx_crusader\"\r\narcade_msx_crusaderk = \"msx_crusader\"\r\narcade_msx_csainz = \"msx_csainz\"\r\narcade_msx_csheriff = \"msx_csheriff\"\r\narcade_msx_cso = \"msx_cso\"\r\narcade_msx_csok = \"msx_cso\"\r\narcade_msx_ctrueno = \"msx_ctrueno\"\r\narcade_msx_cyberbig = \"msx_cyberbig\"\r\narcade_msx_cyberun = \"msx_cyberun\"\r\narcade_msx_cyborgz = \"msx_cyborgz\"\r\narcade_msx_daidasso = \"msx_daidasso\"\r\narcade_msx_daiva4 = \"msx_daiva4\"\r\narcade_msx_dambustr = \"msx_dambustr\"\r\narcade_msx_dambustra = \"msx_dambustr\"\r\narcade_msx_dangerx4 = \"msx_dangerx4\"\r\narcade_msx_dangerx4a = \"msx_dangerx4\"\r\narcade_msx_dangerx4b = \"msx_dangerx4\"\r\narcade_msx_dawnpatr = \"msx_dawnpatr\"\r\narcade_msx_dcrystal = \"msx_dcrystal\"\r\narcade_msx_dday = \"msx_dday\"\r\narcade_msx_ddaya = \"msx_dday\"\r\narcade_msx_ddayb = \"msx_dday\"\r\narcade_msx_ddayc = \"msx_dday\"\r\narcade_msx_ddayk = \"msx_dday\"\r\narcade_msx_ddragon = \"msx_ddragon\"\r\narcade_msx_deathwish3 = \"msx_deathwish3\"\r\narcade_msx_decathln = \"msx_decathln\"\r\narcade_msx_deepdng = \"msx_deepdng\"\r\narcade_msx_deepdng2 = \"msx_deepdng2\"\r\narcade_msx_deepdun = \"msx_deepdun\"\r\narcade_msx_demoncrystl = \"msx_demoncrystl\"\r\narcade_msx_demonia = \"msx_demonia\"\r\narcade_msx_desolatr = \"msx_desolatr\"\r\narcade_msx_destroyr = \"msx_destroyr\"\r\narcade_msx_devilhvn = \"msx_devilhvn\"\r\narcade_msx_digdug = \"msx_digdug\"\r\narcade_msx_digduga = \"msx_digdug\"\r\narcade_msx_dinosour = \"msx_dinosour\"\r\narcade_msx_dipdip = \"msx_dipdip\"\r\narcade_msx_discwarr = \"msx_discwarr\"\r\narcade_msx_dngnhntr = \"msx_dngnhntr\"\r\narcade_msx_dninja = \"msx_dninja\"\r\narcade_msx_dogfight = \"msx_dogfight\"\r\narcade_msx_dokidoki = \"msx_dokidoki\"\r\narcade_msx_dokidokia = \"msx_dokidoki\"\r\narcade_msx_dooly = \"msx_dooly\"\r\narcade_msx_doordoor = \"msx_doordoor\"\r\narcade_msx_dorodon = \"msx_dorodon\"\r\narcade_msx_dota = \"msx_dota\"\r\narcade_msx_dotaa = \"msx_dota\"\r\narcade_msx_dquest = \"msx_dquest\"\r\narcade_msx_dquest2 = \"msx_dquest2\"\r\narcade_msx_dquest2a = \"msx_dquest\"\r\narcade_msx_drainer = \"msx_drainer\"\r\narcade_msx_drgnatck = \"msx_drgnatck\"\r\narcade_msx_drgnatcka = \"msx_drgnatck\"\r\narcade_msx_drillertnk = \"msx_drillertnk\"\r\narcade_msx_drome = \"msx_drome\"\r\narcade_msx_druaga = \"msx_druaga\"\r\narcade_msx_dskeiba = \"msx_dskeiba\"\r\narcade_msx_dslayer = \"msx_dslayer\"\r\narcade_msx_dslayer4 = \"msx_dslayer4\"\r\narcade_msx_dunkshot = \"msx_dunkshot\"\r\narcade_msx_dunkshota = \"msx_dunkshot\"\r\narcade_msx_dynabowl = \"msx_dynabowl\"\r\narcade_msx_dynadan = \"msx_dynadan\"\r\narcade_msx_eagle5 = \"msx_eagle5\"\r\narcade_msx_eaglefgt = \"msx_eaglefgt\"\r\narcade_msx_eaglefgta = \"msx_eaglefgt\"\r\narcade_msx_eatblue = \"msx_eatblue\"\r\narcade_msx_eatit = \"msx_eatit\"\r\narcade_msx_eggerlnd = \"msx_eggerlnd\"\r\narcade_msx_elevator = \"msx_elevator\"\r\narcade_msx_empcity = \"msx_empcity\"\r\narcade_msx_empcitya = \"msx_empcity\"\r\narcade_msx_exainnov = \"msx_exainnov\"\r\narcade_msx_exainnov1 = \"msx_exainnov\"\r\narcade_msx_exchangr = \"msx_exchangr\"\r\narcade_msx_exchangra = \"msx_exchangr\"\r\narcade_msx_exerion = \"msx_exerion\"\r\narcade_msx_exerion2 = \"msx_exerion2\"\r\narcade_msx_exerion2a = \"msx_exerion2\"\r\narcade_msx_exeriona = \"msx_exerion\"\r\narcade_msx_exerionb = \"msx_exerion\"\r\narcade_msx_exerionk = \"msx_exerion\"\r\narcade_msx_exoidez = \"msx_exoidez\"\r\narcade_msx_exoidez5 = \"msx_exoidez5\"\r\narcade_msx_exoidez5k = \"msx_exoidez5\"\r\narcade_msx_exoideza = \"msx_exoidez\"\r\narcade_msx_exoidezb = \"msx_exoidez\"\r\narcade_msx_extermin = \"msx_extermin\"\r\narcade_msx_f1spirit = \"msx_f1spirit\"\r\narcade_msx_f1spirita = \"msx_f1spirit\"\r\narcade_msx_f1spiritk = \"msx_f1spirit\"\r\narcade_msx_factory = \"msx_factory\"\r\narcade_msx_fairy = \"msx_fairy\"\r\narcade_msx_fantzone = \"msx_fantzone\"\r\narcade_msx_fantzonek = \"msx_fantzone\"\r\narcade_msx_fatetris = \"msx_fatetris\"\r\narcade_msx_fatetrisa = \"msx_fatetris\"\r\narcade_msx_fatetrisb = \"msx_fatetris\"\r\narcade_msx_fathom = \"msx_fathom\"\r\narcade_msx_feud = \"msx_feud\"\r\narcade_msx_ffruit = \"msx_ffruit\"\r\narcade_msx_findkeep = \"msx_findkeep\"\r\narcade_msx_firehawk = \"msx_firehawk\"\r\narcade_msx_fireresc = \"msx_fireresc\"\r\narcade_msx_fireresca = \"msx_fireresc\"\r\narcade_msx_fjustice = \"msx_fjustice\"\r\narcade_msx_fjusticea = \"msx_fjustice\"\r\narcade_msx_fjusticeb = \"msx_fjustice\"\r\narcade_msx_flappy = \"msx_flappy\"\r\narcade_msx_flappy85 = \"msx_flappy85\"\r\narcade_msx_flappya = \"msx_flappy\"\r\narcade_msx_flashgor = \"msx_flashgor\"\r\narcade_msx_flicky = \"msx_flicky\"\r\narcade_msx_flideck = \"msx_flideck\"\r\narcade_msx_flidecka = \"msx_flideck\"\r\narcade_msx_flipper = \"msx_flipper\"\r\narcade_msx_flippera = \"msx_flipper\"\r\narcade_msx_flstory = \"msx_flstory\"\r\narcade_msx_flstorya = \"msx_flstory\"\r\narcade_msx_formatz = \"msx_formatz\"\r\narcade_msx_formatza = \"msx_formatz\"\r\narcade_msx_fpoint = \"msx_fpoint\"\r\narcade_msx_fpointa = \"msx_fpoint\"\r\narcade_msx_frogger = \"msx_frogger\"\r\narcade_msx_froggera = \"msx_frogger\"\r\narcade_msx_frontlin = \"msx_frontlin\"\r\narcade_msx_frontlina = \"msx_frontlin\"\r\narcade_msx_frontlinb = \"msx_frontlin\"\r\narcade_msx_fruitpanic = \"msx_fruitpanic\"\r\narcade_msx_fruitsrc = \"msx_fruitsrc\"\r\narcade_msx_fruitsrca = \"msx_fruitsrc\"\r\narcade_msx_fsim = \"msx_fsim\"\r\narcade_msx_fsplash = \"msx_fsplash\"\r\narcade_msx_funmouse = \"msx_funmouse\"\r\narcade_msx_fzone = \"msx_fzone\"\r\narcade_msx_fzonek = \"msx_fzone\"\r\narcade_msx_gabalin = \"msx_gabalin\"\r\narcade_msx_gabalina = \"msx_gabalin\"\r\narcade_msx_galaga = \"msx_galaga\"\r\narcade_msx_galaxia = \"msx_galaxia\"\r\narcade_msx_galaxian = \"msx_galaxian\"\r\narcade_msx_galaxiana = \"msx_galaxian\"\r\narcade_msx_galaxianb = \"msx_galaxian\"\r\narcade_msx_galforce = \"msx_galforce\"\r\narcade_msx_galforcea = \"msx_galforce\"\r\narcade_msx_gambler = \"msx_gambler\"\r\narcade_msx_gameover = \"msx_gameover\"\r\narcade_msx_gameovr2 = \"msx_gameovr2\"\r\narcade_msx_gangman = \"msx_gangman\"\r\narcade_msx_gangmanj = \"msx_gangman\"\r\narcade_msx_gauntlet = \"msx_gauntlet\"\r\narcade_msx_gberet = \"msx_gberet\"\r\narcade_msx_gbereta = \"msx_gberet\"\r\narcade_msx_gberetk = \"msx_gberet\"\r\narcade_msx_genesis = \"msx_genesis\"\r\narcade_msx_ggeftsdp = \"msx_ggeftsdp\"\r\narcade_msx_ghost = \"msx_ghost\"\r\narcade_msx_ghostbs2 = \"msx_ghostbs2\"\r\narcade_msx_ghostbst = \"msx_ghostbst\"\r\narcade_msx_glass = \"msx_glass\"\r\narcade_msx_glider = \"msx_glider\"\r\narcade_msx_glidera = \"msx_glider\"\r\narcade_msx_godzikun = \"msx_godzikun\"\r\narcade_msx_godzikuna = \"msx_godzikun\"\r\narcade_msx_godzilla = \"msx_godzilla\"\r\narcade_msx_godzillaa = \"msx_godzilla\"\r\narcade_msx_gokiburi = \"msx_gokiburi\"\r\narcade_msx_golfgame = \"msx_golfgame\"\r\narcade_msx_golvell = \"msx_golvell\"\r\narcade_msx_gommy = \"msx_gommy\"\r\narcade_msx_gomokuna = \"msx_gomokuna\"\r\narcade_msx_gomokunaa = \"msx_gomokuna\"\r\narcade_msx_gonzzalezz = \"msx_gonzzalezz\"\r\narcade_msx_goody = \"msx_goody\"\r\narcade_msx_goonies = \"msx_goonies\"\r\narcade_msx_gooniesa = \"msx_goonies\"\r\narcade_msx_gooniesb = \"msx_goonies\"\r\narcade_msx_gpworld = \"msx_gpworld\"\r\narcade_msx_gradius = \"msx_gradius\"\r\narcade_msx_gradius2 = \"msx_gradius2\"\r\narcade_msx_gradius2a = \"msx_gradius2\"\r\narcade_msx_gradius2d = \"msx_gradius2\"\r\narcade_msx_gradius2p = \"msx_gradius2\"\r\narcade_msx_gradiusa = \"msx_gradius\"\r\narcade_msx_gridtrap = \"msx_gridtrap\"\r\narcade_msx_gridwars = \"msx_gridwars\"\r\narcade_msx_griel = \"msx_griel\"\r\narcade_msx_grielex = \"msx_griel\"\r\narcade_msx_grogrev = \"msx_grogrev\"\r\narcade_msx_grogreva = \"msx_grogrev\"\r\narcade_msx_guardic = \"msx_guardic\"\r\narcade_msx_guardica = \"msx_guardic\"\r\narcade_msx_gulkave = \"msx_gulkave\"\r\narcade_msx_gulkavea = \"msx_gulkave\"\r\narcade_msx_gulkavek = \"msx_gulkave\"\r\narcade_msx_gundam = \"msx_gundam\"\r\narcade_msx_gundama = \"msx_gundam\"\r\narcade_msx_gundamk = \"msx_gundam\"\r\narcade_msx_gunfrght = \"msx_gunfrght\"\r\narcade_msx_gunfrghta = \"msx_gunfrght\"\r\narcade_msx_gunsmoke = \"msx_gunsmoke\"\r\narcade_msx_guttblst = \"msx_guttblst\"\r\narcade_msx_gyroadv = \"msx_gyroadv\"\r\narcade_msx_gyrodine = \"msx_gyrodine\"\r\narcade_msx_gyrodinek = \"msx_gyrodine\"\r\narcade_msx_gyruss = \"msx_gyruss\"\r\narcade_msx_habilit = \"msx_habilit\"\r\narcade_msx_hades = \"msx_hades\"\r\narcade_msx_hadesa = \"msx_hades\"\r\narcade_msx_hammboy = \"msx_hammboy\"\r\narcade_msx_hangon = \"msx_hangon\"\r\narcade_msx_hangona = \"msx_hangon\"\r\narcade_msx_hangonb = \"msx_hangon\"\r\narcade_msx_happyfret = \"msx_happyfret\"\r\narcade_msx_harapeko = \"msx_harapeko\"\r\narcade_msx_hardboil = \"msx_hardboil\"\r\narcade_msx_headheels = \"msx_headheels\"\r\narcade_msx_heatseek = \"msx_heatseek\"\r\narcade_msx_heist = \"msx_heist\"\r\narcade_msx_helitank = \"msx_helitank\"\r\narcade_msx_hercules = \"msx_hercules\"\r\narcade_msx_hero = \"msx_hero\"\r\narcade_msx_heroesarena = \"msx_heroesarena\"\r\narcade_msx_hfox = \"msx_hfox\"\r\narcade_msx_hhouse = \"msx_hhouse\"\r\narcade_msx_highway = \"msx_highway\"\r\narcade_msx_highwayen = \"msx_highwayen\"\r\narcade_msx_highwayk = \"msx_highway\"\r\narcade_msx_hitsuji = \"msx_hitsuji\"\r\narcade_msx_hnchback = \"msx_hnchback\"\r\narcade_msx_holein1 = \"msx_holein1\"\r\narcade_msx_holein1a = \"msx_holein1\"\r\narcade_msx_holein1b = \"msx_holein1\"\r\narcade_msx_holein1c = \"msx_holein1\"\r\narcade_msx_holein1p = \"msx_holein1p\"\r\narcade_msx_holein1pa = \"msx_holein1p\"\r\narcade_msx_hopper = \"msx_hopper\"\r\narcade_msx_hostages = \"msx_hostages\"\r\narcade_msx_hotshoe = \"msx_hotshoe\"\r\narcade_msx_hundra = \"msx_hundra\"\r\narcade_msx_hustle = \"msx_hustle\"\r\narcade_msx_hustlea = \"msx_hustle\"\r\narcade_msx_hustler = \"msx_konbill\"\r\narcade_msx_hustlera = \"msx_konbill\"\r\narcade_msx_hydlide = \"msx_hydlide\"\r\narcade_msx_hydlide2 = \"msx_hydlide2\"\r\narcade_msx_hydlide2a = \"msx_hydlide2\"\r\narcade_msx_hydlide3 = \"msx_hydlide3\"\r\narcade_msx_hype = \"msx_hype\"\r\narcade_msx_hyperol1 = \"msx_trackfld\"\r\narcade_msx_hyperol1k = \"msx_trackfld\"\r\narcade_msx_hyperol2 = \"msx_trackfl2\"\r\narcade_msx_hypersp2 = \"msx_hypersp2\"\r\narcade_msx_hypersp2k = \"msx_hypersp2\"\r\narcade_msx_hypersp3 = \"msx_hypersp3\"\r\narcade_msx_hypersp3a = \"msx_hypersp3\"\r\narcade_msx_hypersp3b = \"msx_hypersp3\"\r\narcade_msx_hyperspt = \"msx_hyperspt\"\r\narcade_msx_hyperspta = \"msx_hyperspt\"\r\narcade_msx_hyperviper = \"msx_hyperviper\"\r\narcade_msx_hyprally = \"msx_hyprally\"\r\narcade_msx_hyprallya = \"msx_hyprally\"\r\narcade_msx_hyprallyb = \"msx_hyprally\"\r\narcade_msx_hyprallyc = \"msx_hyprally\"\r\narcade_msx_icebreak = \"msx_icebreak\"\r\narcade_msx_iceking = \"msx_iceking\"\r\narcade_msx_iceworld = \"msx_iceworld\"\r\narcade_msx_iganinp2 = \"msx_iganinp2\"\r\narcade_msx_iganinpo = \"msx_iganinpo\"\r\narcade_msx_ik = \"msx_ik\"\r\narcade_msx_ilevan = \"msx_ilevan\"\r\narcade_msx_inca = \"msx_inca\"\r\narcade_msx_indianb = \"msx_indianb\"\r\narcade_msx_indy = \"msx_indy\"\r\narcade_msx_infernalminer = \"msx_infernalminer\"\r\narcade_msx_inspecteurz = \"msx_inspecteurz\"\r\narcade_msx_invasion = \"msx_invasion\"\r\narcade_msx_invazm = \"msx_invazm\"\r\narcade_msx_invrevenge = \"msx_invrevenge\"\r\narcade_msx_issun = \"msx_issun\"\r\narcade_msx_issuna = \"msx_issun\"\r\narcade_msx_issunh = \"msx_issun\"\r\narcade_msx_jackcity = \"msx_jackcity\"\r\narcade_msx_jagur = \"msx_jagur\"\r\narcade_msx_jagura = \"msx_jagur\"\r\narcade_msx_jaws = \"msx_jaws\"\r\narcade_msx_jetfight = \"msx_jetfight\"\r\narcade_msx_jetpac = \"msx_jetpac\"\r\narcade_msx_jetsetw = \"msx_jetsetw\"\r\narcade_msx_jetsetwa = \"msx_jetsetw\"\r\narcade_msx_jinj2 = \"msx_jinj2\"\r\narcade_msx_joeblade = \"msx_joeblade\"\r\narcade_msx_jpwinkle = \"msx_jpwinkle\"\r\narcade_msx_jpwinklek = \"msx_jpwinkle\"\r\narcade_msx_jrabbit = \"msx_jrabbit\"\r\narcade_msx_jump = \"msx_jump\"\r\narcade_msx_jumpcstr = \"msx_jumpcstr\"\r\narcade_msx_jumping = \"msx_jumping\"\r\narcade_msx_jumpjack = \"msx_jumpjack\"\r\narcade_msx_jumpland = \"msx_jumpland\"\r\narcade_msx_jungwarr = \"msx_jungwarr\"\r\narcade_msx_junofrst = \"msx_junofrst\"\r\narcade_msx_karamaru = \"msx_karamaru\"\r\narcade_msx_keykaper = \"msx_keykaper\"\r\narcade_msx_khazzad = \"msx_khazzad\"\r\narcade_msx_kickit = \"msx_kickit\"\r\narcade_msx_kickita = \"msx_kickit\"\r\narcade_msx_killmice = \"msx_killmice\"\r\narcade_msx_kingball = \"msx_kingball\"\r\narcade_msx_kingballa = \"msx_kingball\"\r\narcade_msx_kingkngt = \"msx_kingkngt\"\r\narcade_msx_kingkngta = \"msx_kingkngt\"\r\narcade_msx_kingkngtb = \"msx_kingkngt\"\r\narcade_msx_kingleon = \"msx_kingleon\"\r\narcade_msx_kingval = \"msx_kingval\"\r\narcade_msx_kingval2 = \"msx_kingval2\"\r\narcade_msx_kingvala = \"msx_kingval\"\r\narcade_msx_kingvalb = \"msx_kingval\"\r\narcade_msx_kingvalc = \"msx_kingval\"\r\narcade_msx_kingvald = \"msx_kingval\"\r\narcade_msx_kinnikum = \"msx_kinnikum\"\r\narcade_msx_kinnikuma = \"msx_kinnikum\"\r\narcade_msx_kinnikumk = \"msx_kinnikum\"\r\narcade_msx_klax = \"msx_klax\"\r\narcade_msx_knightlr = \"msx_knightlr\"\r\narcade_msx_knightm2 = \"msx_knightm2\"\r\narcade_msx_knightm2k = \"msx_knightm2\"\r\narcade_msx_knightm3 = \"msx_knightm3\"\r\narcade_msx_knightmr = \"msx_knightmr\"\r\narcade_msx_knightmra = \"msx_knightmr\"\r\narcade_msx_knightmrb = \"msx_knightmr\"\r\narcade_msx_knightmrk = \"msx_knightmr\"\r\narcade_msx_knithers = \"msx_knithers\"\r\narcade_msx_knucklej = \"msx_knucklej\"\r\narcade_msx_kobashi = \"msx_kobashi\"\r\narcade_msx_koedoli = \"msx_koedoli\"\r\narcade_msx_konbball = \"msx_konbball\"\r\narcade_msx_konbballa = \"msx_konbball\"\r\narcade_msx_konbill = \"msx_konbill\"\r\narcade_msx_konboxin = \"msx_konboxin\"\r\narcade_msx_konboxina = \"msx_konboxin\"\r\narcade_msx_konboxinb = \"msx_konboxin\"\r\narcade_msx_koneko = \"msx_koneko\"\r\narcade_msx_konfootb = \"msx_konfootb\"\r\narcade_msx_konfootba = \"msx_konfootb\"\r\narcade_msx_konfootbb = \"msx_konfootb\"\r\narcade_msx_kongolf = \"msx_kongolf\"\r\narcade_msx_kongolfa = \"msx_kongolf\"\r\narcade_msx_kongolfb = \"msx_kongolf\"\r\narcade_msx_konsoccr = \"msx_konfootb\"\r\narcade_msx_konsoccra = \"msx_konfootb\"\r\narcade_msx_konsoccrb = \"msx_konfootb\"\r\narcade_msx_konsoccrc = \"msx_konfootb\"\r\narcade_msx_kontenn = \"msx_kontenn\"\r\narcade_msx_kontenna = \"msx_kontenn\"\r\narcade_msx_kontennk = \"msx_kontenn\"\r\narcade_msx_krakout = \"msx_krakout\"\r\narcade_msx_kungfum = \"msx_kungfum\"\r\narcade_msx_kungfuma = \"msx_kungfum\"\r\narcade_msx_kungfumb = \"msx_kungfum\"\r\narcade_msx_kungfut = \"msx_kungfut\"\r\narcade_msx_kungfuta = \"msx_kungfut\"\r\narcade_msx_kungfutk = \"msx_kungfut\"\r\narcade_msx_lacorona = \"msx_lacorona\"\r\narcade_msx_laptick2 = \"msx_laptick2\"\r\narcade_msx_lastmission = \"msx_lastmission\"\r\narcade_msx_lazyjones = \"msx_lazyjones\"\r\narcade_msx_ldrun = \"msx_ldrun\"\r\narcade_msx_ldrun2 = \"msx_ldrun2\"\r\narcade_msx_ldruna = \"msx_ldrun\"\r\narcade_msx_legendk = \"msx_legendk\"\r\narcade_msx_legendka = \"msx_legendk\"\r\narcade_msx_legkage = \"msx_legkage\"\r\narcade_msx_lic2kill = \"msx_lic2kill\"\r\narcade_msx_lifefastln = \"msx_lifefastln\"\r\narcade_msx_livingstone = \"msx_livingstone\"\r\narcade_msx_livingstone2 = \"msx_livingstone2\"\r\narcade_msx_lordover = \"msx_lordover\"\r\narcade_msx_lorna = \"msx_lorna\"\r\narcade_msx_lotlot = \"msx_lotlot\"\r\narcade_msx_lotusf3 = \"msx_lotusf3\"\r\narcade_msx_lunarbal = \"msx_lunarbal\"\r\narcade_msx_m36 = \"msx_m36\"\r\narcade_msx_macross = \"msx_macross\"\r\narcade_msx_macrossa = \"msx_macross\"\r\narcade_msx_magical = \"msx_magical\"\r\narcade_msx_magtree = \"msx_magtree\"\r\narcade_msx_magtreea = \"msx_magtree\"\r\narcade_msx_malaika12 = \"msx_malaika12\"\r\narcade_msx_malaikapq13 = \"msx_malaikapq13\"\r\narcade_msx_manes = \"msx_manes\"\r\narcade_msx_manesa = \"msx_manes\"\r\narcade_msx_manesb = \"msx_manes\"\r\narcade_msx_manicminer = \"msx_manicminer\"\r\narcade_msx_mappy = \"msx_mappy\"\r\narcade_msx_mappya = \"msx_mappy\"\r\narcade_msx_mappyb = \"msx_mappy\"\r\narcade_msx_marchen = \"msx_marchen\"\r\narcade_msx_marinbat = \"msx_marinbat\"\r\narcade_msx_mars2 = \"msx_mars2\"\r\narcade_msx_martianoids = \"msx_martianoids\"\r\narcade_msx_mask2 = \"msx_mask2\"\r\narcade_msx_mask3 = \"msx_mask3\"\r\narcade_msx_mastlamp = \"msx_mastlamp\"\r\narcade_msx_maxima = \"msx_maxima\"\r\narcade_msx_mayhem = \"msx_mayhem\"\r\narcade_msx_mdroid = \"msx_mdroid\"\r\narcade_msx_mecha8 = \"msx_mecha8\"\r\narcade_msx_megalsos = \"msx_megalsos\"\r\narcade_msx_megalsosa = \"msx_megalsos\"\r\narcade_msx_megalsosb = \"msx_megalsos\"\r\narcade_msx_megamit = \"msx_megamit\"\r\narcade_msx_megamita = \"msx_megamit\"\r\narcade_msx_meganova = \"msx_meganova\"\r\narcade_msx_meikyusha = \"msx_meikyusha\"\r\narcade_msx_menace = \"msx_menace\"\r\narcade_msx_mgunjoe = \"msx_mgunjoe\"\r\narcade_msx_midbros = \"msx_midbros\"\r\narcade_msx_midbrosa = \"msx_midbros\"\r\narcade_msx_midbuild = \"msx_midbuild\"\r\narcade_msx_midway = \"msx_midway\"\r\narcade_msx_mikie = \"msx_mikie\"\r\narcade_msx_milkrace = \"msx_milkrace\"\r\narcade_msx_mirai = \"msx_mirai\"\r\narcade_msx_mitsumgt = \"msx_mitsumgt\"\r\narcade_msx_mjdojo = \"msx_mjdojo\"\r\narcade_msx_mkidwiz = \"msx_mkidwiz\"\r\narcade_msx_mkidwiza = \"msx_mkidwiz\"\r\narcade_msx_mkidwizb = \"msx_mkidwiz\"\r\narcade_msx_mnstfair = \"msx_mnstfair\"\r\narcade_msx_moaihiho = \"msx_moaihiho\"\r\narcade_msx_moaihihok = \"msx_moaihiho\"\r\narcade_msx_mokarima = \"msx_mokarima\"\r\narcade_msx_molemol = \"msx_molemol\"\r\narcade_msx_molemol2 = \"msx_molemol2\"\r\narcade_msx_monkeyac = \"msx_monkeyac\"\r\narcade_msx_monkeyaca = \"msx_monkeyac\"\r\narcade_msx_monkeyacb = \"msx_monkeyac\"\r\narcade_msx_monkeyacc = \"msx_monkeyac\"\r\narcade_msx_monsterhunter = \"msx_monsterhunter\"\r\narcade_msx_montanajohn = \"msx_montanajohn\"\r\narcade_msx_moonridr = \"msx_starbugg\"\r\narcade_msx_moonswep = \"msx_moonswep\"\r\narcade_msx_mopirang = \"msx_mopirang\"\r\narcade_msx_mopiranga = \"msx_mopirang\"\r\narcade_msx_mopirangb = \"msx_mopirang\"\r\narcade_msx_mopirangc = \"msx_mopirang\"\r\narcade_msx_mopirangd = \"msx_mopirang\"\r\narcade_msx_mopirangk = \"msx_mopirang\"\r\narcade_msx_moritaot = \"msx_moritaot\"\r\narcade_msx_mortadelo = \"msx_mortadelo\"\r\narcade_msx_mortadelo2 = \"msx_mortadelo2\"\r\narcade_msx_mosquiton = \"msx_mosquiton\"\r\narcade_msx_mouser = \"msx_mouser\"\r\narcade_msx_mpatrol = \"msx_mpatrol\"\r\narcade_msx_mpatrolk = \"msx_mpatrol\"\r\narcade_msx_mrchin = \"msx_mrchin\"\r\narcade_msx_mrchink = \"msx_mrchin\"\r\narcade_msx_mrcrack = \"msx_mrcrack\"\r\narcade_msx_mrdo = \"msx_mrdo\"\r\narcade_msx_mrdok = \"msx_mrdo\"\r\narcade_msx_mrdovsun = \"msx_mrdovsun\"\r\narcade_msx_mrdowild = \"msx_mrdowild\"\r\narcade_msx_mrdowildh = \"msx_mrdowild\"\r\narcade_msx_mrmole = \"msx_mrmole\"\r\narcade_msx_mrwong = \"msx_mrwong\"\r\narcade_msx_msx = \"msx_msx\"\r\narcade_msx_msxbasic = \"msx_msxbasic\"\r\narcade_msx_msxbbal2 = \"msx_msxbbal2\"\r\narcade_msx_msxbball = \"msx_msxbball\"\r\narcade_msx_msxbballa = \"msx_msxbball\"\r\narcade_msx_msxrugby = \"msx_msxrugby\"\r\narcade_msx_msxsoccr = \"msx_msxsoccr\"\r\narcade_msx_msxsoccra = \"msx_msxsoccr\"\r\narcade_msx_msxsoccrk = \"msx_msxsoccr\"\r\narcade_msx_mtanks = \"msx_mtanks\"\r\narcade_msx_mumonty = \"msx_mumonty\"\r\narcade_msx_mundoper = \"msx_mundoper\"\r\narcade_msx_mythos = \"msx_mythos\"\r\narcade_msx_namake = \"msx_namake\"\r\narcade_msx_nausicaa = \"msx_nausicaa\"\r\narcade_msx_navymove = \"msx_navymove\"\r\narcade_msx_nayade = \"msx_nayade\"\r\narcade_msx_nemesis3 = \"msx_nemesis3\"\r\narcade_msx_nemesis3a = \"msx_nemesis3\"\r\narcade_msx_nemesis3b = \"msx_nemesis3\"\r\narcade_msx_nightcity = \"msx_nightcity\"\r\narcade_msx_nightshd = \"msx_nightshd\"\r\narcade_msx_ninja2 = \"msx_iganinp2\"\r\narcade_msx_ninjajaj = \"msx_ninjajaj\"\r\narcade_msx_ninjajajk = \"msx_ninjajaj\"\r\narcade_msx_ninjakag = \"msx_ninjakag\"\r\narcade_msx_ninjakaga = \"msx_ninjakag\"\r\narcade_msx_ninjakmb = \"msx_ninjakmb\"\r\narcade_msx_ninjakun = \"msx_ninjakun\"\r\narcade_msx_ninjapri = \"msx_ninjapri\"\r\narcade_msx_ninjapria = \"msx_ninjapri\"\r\narcade_msx_ninjasav = \"msx_ninjasav\"\r\narcade_msx_nipper = \"msx_nipper\"\r\narcade_msx_nipper2 = \"msx_nipper2\"\r\narcade_msx_nkoshien = \"msx_nkoshien\"\r\narcade_msx_nutsmilk = \"msx_nutsmilk\"\r\narcade_msx_obliter = \"msx_obliter\"\r\narcade_msx_oilswell = \"msx_oilswell\"\r\narcade_msx_oilswella = \"msx_oilswell\"\r\narcade_msx_omacfarm = \"msx_omacfarm\"\r\narcade_msx_opwolf = \"msx_opwolf\"\r\narcade_msx_othello = \"msx_othello\"\r\narcade_msx_outroyd = \"msx_outroyd\"\r\narcade_msx_oyotango = \"msx_oyotango\"\r\narcade_msx_pachicom = \"msx_pachicom\"\r\narcade_msx_pachicomk = \"msx_pachicom\"\r\narcade_msx_pachiufo = \"msx_pachiufo\"\r\narcade_msx_pacman = \"msx_pacman\"\r\narcade_msx_pacmana = \"msx_pacman\"\r\narcade_msx_pacmanb = \"msx_pacman\"\r\narcade_msx_pacmania = \"msx_pacmania\"\r\narcade_msx_paipanic = \"msx_paipanic\"\r\narcade_msx_pairs = \"msx_pairs\"\r\narcade_msx_pairsa = \"msx_pairs\"\r\narcade_msx_panther = \"msx_panther\"\r\narcade_msx_parodius = \"msx_parodius\"\r\narcade_msx_parodiusa = \"msx_parodius\"\r\narcade_msx_parodiuse = \"msx_parodius\"\r\narcade_msx_pastfind = \"msx_pastfind\"\r\narcade_msx_payload = \"msx_payload\"\r\narcade_msx_peetan = \"msx_peetan\"\r\narcade_msx_pegasus = \"msx_pegasus\"\r\narcade_msx_pengadv = \"msx_pengadv\"\r\narcade_msx_pengadvk1 = \"msx_pengadv\"\r\narcade_msx_pengadvk2 = \"msx_pengadv\"\r\narcade_msx_pengmind = \"msx_pengmind\"\r\narcade_msx_penguincafe = \"msx_penguincafe\"\r\narcade_msx_penguinw = \"msx_penguinw\"\r\narcade_msx_penguinwk = \"msx_penguinw\"\r\narcade_msx_pentagram = \"msx_pentagram\"\r\narcade_msx_perezthemouse = \"msx_perezthemouse\"\r\narcade_msx_perspective = \"msx_perspective\"\r\narcade_msx_pharaoh = \"msx_pharaoh\"\r\narcade_msx_picopico = \"msx_picopico\"\r\narcade_msx_picot = \"msx_picot\"\r\narcade_msx_pillbox = \"msx_pillbox\"\r\narcade_msx_pillboxa = \"msx_pillbox\"\r\narcade_msx_pinblast = \"msx_pinblast\"\r\narcade_msx_pineappl = \"msx_pineappl\"\r\narcade_msx_pineappla = \"msx_pineappl\"\r\narcade_msx_pingpong = \"msx_pingpong\"\r\narcade_msx_pingponga = \"msx_pingpong\"\r\narcade_msx_pingpongb = \"msx_pingpong\"\r\narcade_msx_pingpongc = \"msx_pingpong\"\r\narcade_msx_pingpongk = \"msx_pingpong\"\r\narcade_msx_pinkychs = \"msx_pinkychs\"\r\narcade_msx_pipi = \"msx_pipi\"\r\narcade_msx_pippols = \"msx_pippols\"\r\narcade_msx_pippolsa = \"msx_pippols\"\r\narcade_msx_pippolsb = \"msx_pippols\"\r\narcade_msx_pippolsc = \"msx_pippols\"\r\narcade_msx_pitfall = \"msx_pitfall\"\r\narcade_msx_pitfall2 = \"msx_pitfall2\"\r\narcade_msx_pitfall2a = \"msx_pitfall2\"\r\narcade_msx_pitfalla = \"msx_pitfall\"\r\narcade_msx_pitfallb = \"msx_pitfall\"\r\narcade_msx_pjoe = \"msx_pjoe\"\r\narcade_msx_playball = \"msx_playball\"\r\narcade_msx_podero = \"msx_podero\"\r\narcade_msx_policest = \"msx_policest\"\r\narcade_msx_policesta = \"msx_policest\"\r\narcade_msx_polstar = \"msx_polstar\"\r\narcade_msx_pooyan = \"msx_pooyan\"\r\narcade_msx_poppaq = \"msx_poppaq\"\r\narcade_msx_poppaqk = \"msx_poppaq\"\r\narcade_msx_prettykngdm = \"msx_prettykngdm\"\r\narcade_msx_pricemag = \"msx_pricemag\"\r\narcade_msx_princessquest = \"msx_princessquest\"\r\narcade_msx_profbb = \"msx_profbb\"\r\narcade_msx_protectr = \"msx_protectr\"\r\narcade_msx_psyched = \"msx_psyched\"\r\narcade_msx_psychpig = \"msx_psychpig\"\r\narcade_msx_punchy = \"msx_punchy\"\r\narcade_msx_puznic = \"msx_puznic\"\r\narcade_msx_puzpanic = \"msx_puzpanic\"\r\narcade_msx_pyramidw = \"msx_pyramidw\"\r\narcade_msx_qbert = \"msx_qbert\"\r\narcade_msx_qberta = \"msx_qbert\"\r\narcade_msx_quebert = \"msx_quebert\"\r\narcade_msx_queenglf = \"msx_queenglf\"\r\narcade_msx_queenglfa = \"msx_queenglf\"\r\narcade_msx_queenglfb = \"msx_queenglf\"\r\narcade_msx_raidbung = \"msx_raidbung\"\r\narcade_msx_rallyx = \"msx_rallyx\"\r\narcade_msx_rallyxa = \"msx_rallyx\"\r\narcade_msx_rallyxb = \"msx_rallyx\"\r\narcade_msx_rallyxk = \"msx_rallyx\"\r\narcade_msx_ram = \"msx_ram\"\r\narcade_msx_rambo = \"msx_rambo\"\r\narcade_msx_rambo3 = \"msx_rambo3\"\r\narcade_msx_ramboa = \"msx_rambo\"\r\narcade_msx_rambob = \"msx_rambo\"\r\narcade_msx_ramboc = \"msx_rambo\"\r\narcade_msx_raththa = \"msx_raththa\"\r\narcade_msx_realtenn = \"msx_realtenn\"\r\narcade_msx_redzone = \"msx_redzone\"\r\narcade_msx_redzonea = \"msx_redzone\"\r\narcade_msx_relics = \"msx_relics\"\r\narcade_msx_renegad3 = \"msx_renegad3\"\r\narcade_msx_rescatl = \"msx_rescatl\"\r\narcade_msx_risedung = \"msx_risedung\"\r\narcade_msx_risedunga = \"msx_risedung\"\r\narcade_msx_riveraid = \"msx_riveraid\"\r\narcade_msx_riyadh = \"msx_riyadh\"\r\narcade_msx_roadfght = \"msx_roadfght\"\r\narcade_msx_roadfghta = \"msx_roadfght\"\r\narcade_msx_robocop = \"msx_robocop\"\r\narcade_msx_robofrog = \"msx_robofrog\"\r\narcade_msx_robofroga = \"msx_robofrog\"\r\narcade_msx_robotwar = \"msx_robotwar\"\r\narcade_msx_roboy = \"msx_roboy\"\r\narcade_msx_rockbolt = \"msx_rockbolt\"\r\narcade_msx_rocknroller = \"msx_rocknroller\"\r\narcade_msx_rockroll = \"msx_rockroll\"\r\narcade_msx_rogerrub = \"msx_rogerrub\"\r\narcade_msx_rogerruba = \"msx_rogerrub\"\r\narcade_msx_rollerbl = \"msx_rollerbl\"\r\narcade_msx_rollerbla = \"msx_rollerbl\"\r\narcade_msx_romancia = \"msx_romancia\"\r\narcade_msx_rotors = \"msx_rotors\"\r\narcade_msx_rtype = \"msx_rtype\"\r\narcade_msx_rtypea = \"msx_rtype\"\r\narcade_msx_runner = \"msx_runner\"\r\narcade_msx_salamand = \"msx_salamand\"\r\narcade_msx_salamandk = \"msx_salamand\"\r\narcade_msx_sasa = \"msx_sasa\"\r\narcade_msx_sasaa = \"msx_sasa\"\r\narcade_msx_satan = \"msx_satan\"\r\narcade_msx_saurus = \"msx_saurus\"\r\narcade_msx_sbillard = \"msx_sbillard\"\r\narcade_msx_sbioman4 = \"msx_sbioman4\"\r\narcade_msx_sboy1 = \"msx_sboy1\"\r\narcade_msx_sboy2 = \"msx_sboy2\"\r\narcade_msx_sboy2a = \"msx_sboy2\"\r\narcade_msx_sboy3 = \"msx_sboy3\"\r\narcade_msx_sboy3a = \"msx_sboy3\"\r\narcade_msx_sbracer = \"msx_sbracer\"\r\narcade_msx_scarlet7 = \"msx_scarlet7\"\r\narcade_msx_scentipede = \"msx_scentipede\"\r\narcade_msx_scifi = \"msx_scifi\"\r\narcade_msx_scion = \"msx_scion\"\r\narcade_msx_scobra = \"msx_scobra\"\r\narcade_msx_scobraa = \"msx_scobra\"\r\narcade_msx_scramegg = \"msx_scramegg\"\r\narcade_msx_seahuntr = \"msx_seahuntr\"\r\narcade_msx_seaking = \"msx_seaking\"\r\narcade_msx_searchformum = \"msx_searchformum\"\r\narcade_msx_seicorobocop = \"msx_seicorobocop\"\r\narcade_msx_seikacho = \"msx_seikacho\"\r\narcade_msx_seikachoa = \"msx_seikacho\"\r\narcade_msx_seikachok = \"msx_seikacho\"\r\narcade_msx_seleniak = \"msx_seleniak\"\r\narcade_msx_senjokam = \"msx_senjokam\"\r\narcade_msx_senjyo = \"msx_senjyo\"\r\narcade_msx_senjyoa = \"msx_senjyo\"\r\narcade_msx_sewersam = \"msx_sewersam\"\r\narcade_msx_sharkh = \"msx_sharkh\"\r\narcade_msx_shmup11 = \"msx_shmup11\"\r\narcade_msx_shnax = \"msx_shnax\"\r\narcade_msx_shogun = \"msx_shogun\"\r\narcade_msx_shouganai11 = \"msx_shouganai11\"\r\narcade_msx_shoutmat = \"msx_shoutmat\"\r\narcade_msx_showjumph = \"msx_showjumph\"\r\narcade_msx_sideral = \"msx_sideral\"\r\narcade_msx_sinbad = \"msx_sinbad\"\r\narcade_msx_sinkking = \"msx_sinkking\"\r\narcade_msx_skateair = \"msx_skateair\"\r\narcade_msx_skicomm = \"msx_skicomm\"\r\narcade_msx_skicommk1 = \"msx_skicomm\"\r\narcade_msx_skicommk2 = \"msx_skicomm\"\r\narcade_msx_skooter = \"msx_skooter\"\r\narcade_msx_skootera = \"msx_skooter\"\r\narcade_msx_skulexil = \"msx_skulexil\"\r\narcade_msx_skydiver = \"msx_skydiver\"\r\narcade_msx_skygaldo = \"msx_skygaldo\"\r\narcade_msx_skyjag = \"msx_skyjag\"\r\narcade_msx_skyjagk = \"msx_skyjag\"\r\narcade_msx_slaydock = \"msx_slaydock\"\r\narcade_msx_slaydockk = \"msx_slaydock\"\r\narcade_msx_smackwac = \"msx_smackwac\"\r\narcade_msx_smzoom = \"msx_smzoom\"\r\narcade_msx_snakeit = \"msx_snakeit\"\r\narcade_msx_sofia = \"msx_sofia\"\r\narcade_msx_sokoban = \"msx_sokoban\"\r\narcade_msx_sokobana = \"msx_sokoban\"\r\narcade_msx_sokobanb = \"msx_sokoban\"\r\narcade_msx_sokobank = \"msx_sokoban\"\r\narcade_msx_sorcery = \"msx_sorcery\"\r\narcade_msx_spacecmp = \"msx_spacecmp\"\r\narcade_msx_spacecmpa = \"msx_spacecmp\"\r\narcade_msx_spaceinv = \"msx_spaceinv\"\r\narcade_msx_spacemouse = \"msx_spacemouse\"\r\narcade_msx_spacetrb = \"msx_spacetrb\"\r\narcade_msx_spacewlk = \"msx_spacewlk\"\r\narcade_msx_spacmaze = \"msx_spacmaze\"\r\narcade_msx_spacmazea = \"msx_spacmaze\"\r\narcade_msx_spacmazeb = \"msx_spacmaze\"\r\narcade_msx_sparkie = \"msx_sparkie\"\r\narcade_msx_spelunkr = \"msx_spelunkr\"\r\narcade_msx_spelunkra = \"msx_spelunkr\"\r\narcade_msx_spenguin = \"msx_spenguin\"\r\narcade_msx_spider = \"msx_spider\"\r\narcade_msx_splash = \"msx_splash\"\r\narcade_msx_spooksl = \"msx_spooksl\"\r\narcade_msx_spyvssp2 = \"msx_spyvssp2\"\r\narcade_msx_squardan = \"msx_squardan\"\r\narcade_msx_squishem = \"msx_squishem\"\r\narcade_msx_squishema = \"msx_squishem\"\r\narcade_msx_srescue = \"msx_srescue\"\r\narcade_msx_sshadow = \"msx_sshadow\"\r\narcade_msx_staravng = \"msx_staravng\"\r\narcade_msx_starblaz = \"msx_starblaz\"\r\narcade_msx_starblaza = \"msx_starblaz\"\r\narcade_msx_starblazb = \"msx_starblaz\"\r\narcade_msx_starbugg = \"msx_starbugg\"\r\narcade_msx_starfrce = \"msx_starfrce\"\r\narcade_msx_starfrcea = \"msx_starfrce\"\r\narcade_msx_starquak = \"msx_starquak\"\r\narcade_msx_starship = \"msx_starship\"\r\narcade_msx_starshipa = \"msx_starship\"\r\narcade_msx_starsold = \"msx_starsold\"\r\narcade_msx_starsolda = \"msx_starsold\"\r\narcade_msx_stepper = \"msx_stepper\"\r\narcade_msx_stepup = \"msx_stepup\"\r\narcade_msx_stepupa = \"msx_stepup\"\r\narcade_msx_stepupk = \"msx_stepup\"\r\narcade_msx_stonewis = \"msx_stonewis\"\r\narcade_msx_stranglp = \"msx_stranglp\"\r\narcade_msx_stratos2 = \"msx_stratos2\"\r\narcade_msx_straycat = \"msx_straycat\"\r\narcade_msx_strtmast = \"msx_strtmast\"\r\narcade_msx_subacuatic = \"msx_subacuatic\"\r\narcade_msx_suparobo = \"msx_suparobo\"\r\narcade_msx_supdrink = \"msx_supdrink\"\r\narcade_msx_supercol = \"msx_supercol\"\r\narcade_msx_superglf = \"msx_superglf\"\r\narcade_msx_superxf = \"msx_superxf\"\r\narcade_msx_suppachi = \"msx_suppachi\"\r\narcade_msx_supsnake = \"msx_supsnake\"\r\narcade_msx_supsnakea = \"msx_supsnake\"\r\narcade_msx_supsnakeb = \"msx_supsnake\"\r\narcade_msx_supsoccr = \"msx_supsoccr\"\r\narcade_msx_suptenn = \"msx_suptenn\"\r\narcade_msx_suptrip = \"msx_suptrip\"\r\narcade_msx_suthir = \"msx_suthir\"\r\narcade_msx_suwanggi = \"msx_suwanggi\"\r\narcade_msx_sweetacr = \"msx_sweetacr\"\r\narcade_msx_sweetacra = \"msx_sweetacr\"\r\narcade_msx_swing = \"msx_swing\"\r\narcade_msx_swinga = \"msx_swing\"\r\narcade_msx_takameij = \"msx_takameij\"\r\narcade_msx_takameija = \"msx_takameij\"\r\narcade_msx_takameijk1 = \"msx_takameij\"\r\narcade_msx_takameijk2 = \"msx_takameij\"\r\narcade_msx_takeru = \"msx_takeru\"\r\narcade_msx_tankbatt = \"msx_tankbatt\"\r\narcade_msx_tantan = \"msx_tantan\"\r\narcade_msx_tatica = \"msx_tatica\"\r\narcade_msx_tawarakn = \"msx_tawarakn\"\r\narcade_msx_tawarakna = \"msx_tawarakn\"\r\narcade_msx_tawaraknb = \"msx_tawarakn\"\r\narcade_msx_tbirds1a = \"msx_tbirds1a\"\r\narcade_msx_tbirdst1b = \"msx_tbirds1a\"\r\narcade_msx_tbirdst2a = \"msx_tbirds1a\"\r\narcade_msx_tbirdst2b = \"msx_tbirds1a\"\r\narcade_msx_tearnile = \"msx_tearnile\"\r\narcade_msx_telebunn = \"msx_telebunn\"\r\narcade_msx_telebunna = \"msx_telebunn\"\r\narcade_msx_temptations = \"msx_temptations\"\r\narcade_msx_tensaird = \"msx_tensaird\"\r\narcade_msx_tension = \"msx_tension\"\r\narcade_msx_teodoro = \"msx_teodoro\"\r\narcade_msx_terminus = \"msx_terminus\"\r\narcade_msx_terramex = \"msx_terramex\"\r\narcade_msx_tetrahor = \"msx_tetrahor\"\r\narcade_msx_tetrahora = \"msx_tetrahor\"\r\narcade_msx_tetris = \"msx_tetris\"\r\narcade_msx_tetris2 = \"msx_tetris2\"\r\narcade_msx_tetrisa = \"msx_tetris\"\r\narcade_msx_tetsuman = \"msx_tetsuman\"\r\narcade_msx_tetsumana = \"msx_tetsuman\"\r\narcade_msx_thecure = \"msx_thecure\"\r\narcade_msx_theghost = \"msx_theghost\"\r\narcade_msx_theseus = \"msx_theseus\"\r\narcade_msx_theseusa = \"msx_theseus\"\r\narcade_msx_theseusk = \"msx_theseus\"\r\narcade_msx_thexder = \"msx_thexder\"\r\narcade_msx_thexdera = \"msx_thexder\"\r\narcade_msx_thexderb = \"msx_thexder\"\r\narcade_msx_thndbolt = \"msx_thndbolt\"\r\narcade_msx_thndbolta = \"msx_thndbolt\"\r\narcade_msx_thndboltb = \"msx_thndbolt\"\r\narcade_msx_thndrbal = \"msx_thndrbal\"\r\narcade_msx_thndrbala = \"msx_thndrbal\"\r\narcade_msx_timebomb = \"msx_timebomb\"\r\narcade_msx_timeplt = \"msx_timeplt\"\r\narcade_msx_timeplta = \"msx_timeplt\"\r\narcade_msx_timetrax = \"msx_timetrax\"\r\narcade_msx_titanic = \"msx_titanic\"\r\narcade_msx_titipang = \"msx_titipang\"\r\narcade_msx_togk = \"msx_togk\"\r\narcade_msx_toobin = \"msx_toobin\"\r\narcade_msx_toprollr = \"msx_toprollr\"\r\narcade_msx_topzip = \"msx_topzip\"\r\narcade_msx_trackfl2 = \"msx_trackfl2\"\r\narcade_msx_trackfld = \"msx_trackfld\"\r\narcade_msx_traffic = \"msx_traffic\"\r\narcade_msx_traffica = \"msx_traffic\"\r\narcade_msx_trailblz = \"msx_trailblz\"\r\narcade_msx_transball = \"msx_transball\"\r\narcade_msx_trantor = \"msx_trantor\"\r\narcade_msx_trialski = \"msx_trialski\"\r\narcade_msx_triton = \"msx_triton\"\r\narcade_msx_tuma7 = \"msx_tuma7\"\r\narcade_msx_turboat = \"msx_turboat\"\r\narcade_msx_turbogirl = \"msx_turbogirl\"\r\narcade_msx_turmoil = \"msx_turmoil\"\r\narcade_msx_turmoilk = \"msx_turmoil\"\r\narcade_msx_tvirus = \"msx_tvirus\"\r\narcade_msx_twinbee = \"msx_twinbee\"\r\narcade_msx_twinbeea = \"msx_twinbee\"\r\narcade_msx_twinbeeb = \"msx_twinbee\"\r\narcade_msx_twinbeec = \"msx_twinbee\"\r\narcade_msx_twinhamm = \"msx_twinhamm\"\r\narcade_msx_txupi = \"msx_txupi\"\r\narcade_msx_tzr = \"msx_tzr\"\r\narcade_msx_ultraman = \"msx_ultraman\"\r\narcade_msx_undergnd = \"msx_undergnd\"\r\narcade_msx_univunk = \"msx_univunk\"\r\narcade_msx_unleashed = \"msx_unleashed\"\r\narcade_msx_uridium = \"msx_uridium\"\r\narcade_msx_valis = \"msx_valis\"\r\narcade_msx_valisk = \"msx_valis\"\r\narcade_msx_valkyr = \"msx_valkyr\"\r\narcade_msx_vaxol = \"msx_vaxol\"\r\narcade_msx_vesikauhu = \"msx_vesikauhu\"\r\narcade_msx_vestron = \"msx_vestron\"\r\narcade_msx_vigilant = \"msx_vigilant\"\r\narcade_msx_voidrun = \"msx_voidrun\"\r\narcade_msx_volguard = \"msx_volguard\"\r\narcade_msx_vortraid = \"msx_vortraid\"\r\narcade_msx_wampcola = \"msx_wampcola\"\r\narcade_msx_warpwarp = \"msx_warpwarp\"\r\narcade_msx_warroid = \"msx_warroid\"\r\narcade_msx_warroida = \"msx_warroid\"\r\narcade_msx_waterdrv = \"msx_waterdrv\"\r\narcade_msx_wbells = \"msx_wbells\"\r\narcade_msx_wbellsa = \"msx_wbells\"\r\narcade_msx_wecleman = \"msx_wecleman\"\r\narcade_msx_whodares = \"msx_whodares\"\r\narcade_msx_whopper = \"msx_whopper\"\r\narcade_msx_wingman2 = \"msx_wingman2\"\r\narcade_msx_wingwarr = \"msx_wingwarr\"\r\narcade_msx_winthawk = \"msx_winthawk\"\r\narcade_msx_wizlair = \"msx_wizlair\"\r\narcade_msx_wondkid = \"msx_wondkid\"\r\narcade_msx_wonsiin = \"msx_wonsiin\"\r\narcade_msx_wrangler = \"msx_wrangler\"\r\narcade_msx_wreck = \"msx_wreck\"\r\narcade_msx_wrldopen = \"msx_wrldopen\"\r\narcade_msx_wrldopenk = \"msx_wrldopen\"\r\narcade_msx_xanadu = \"msx_xanadu\"\r\narcade_msx_xenon = \"msx_xenon\"\r\narcade_msx_xyzolog = \"msx_xyzolog\"\r\narcade_msx_xyzologa = \"msx_xyzolog\"\r\narcade_msx_yakyukyo = \"msx_yakyukyo\"\r\narcade_msx_yellowsb = \"msx_yellowsb\"\r\narcade_msx_yiear = \"msx_yiear\"\r\narcade_msx_yiear2 = \"msx_yiear2\"\r\narcade_msx_yiear2a = \"msx_yiear2\"\r\narcade_msx_yiear2b = \"msx_yiear2\"\r\narcade_msx_yieara = \"msx_yiear\"\r\narcade_msx_yieark = \"msx_yiear\"\r\narcade_msx_youkaiya = \"msx_youkaiya\"\r\narcade_msx_zaider = \"msx_zaider\"\r\narcade_msx_zaidera = \"msx_zaider\"\r\narcade_msx_zambeze = \"msx_zambeze\"\r\narcade_msx_zanac = \"msx_zanac\"\r\narcade_msx_zanac2 = \"msx_zanac2\"\r\narcade_msx_zanac2a = \"msx_zanac2\"\r\narcade_msx_zanaca = \"msx_zanac\"\r\narcade_msx_zaxxon = \"msx_zaxxon\"\r\narcade_msx_zaxxona = \"msx_zaxxon\"\r\narcade_msx_zaxxones = \"msx_zaxxones\"\r\narcade_msx_zenji = \"msx_zenji\"\r\narcade_msx_zexasltd = \"msx_zexasltd\"\r\narcade_msx_zexasltda = \"msx_zexasltd\"\r\narcade_msx_zexasltdb = \"msx_zexasltd\"\r\narcade_msx_zombieinc12 = \"msx_zombieinc12\"\r\narcade_msx_zombienear11 = \"msx_zombienear11\"\r\narcade_msx_zona0 = \"msx_zona0\"\r\narcade_msx_zoom909 = \"msx_zoom909\"\r\narcade_msx_zoom909k = \"msx_zoom909\"\r\narcade_mt_aftrb = \"mt_aftrb\"\r\narcade_mt_astro = \"mt_astro\"\r\narcade_mt_bbros = \"mt_bbros\"\r\narcade_mt_beast = \"mt_beast\"\r\narcade_mt_eswat = \"mt_eswat\"\r\narcade_mt_fshrk = \"mt_fshrk\"\r\narcade_mt_gaxe = \"mt_gaxe\"\r\narcade_mt_gaxe2 = \"mt_gaxe2\"\r\narcade_mt_ggolf = \"mt_ggolf\"\r\narcade_mt_gng = \"mt_gng\"\r\narcade_mt_gsocr = \"mt_gsocr\"\r\narcade_mt_kcham = \"mt_kcham\"\r\narcade_mt_lastb = \"mt_lastb\"\r\narcade_mt_mwalk = \"mt_mwalk\"\r\narcade_mt_mystd = \"mt_mystd\"\r\narcade_mt_parlg = \"mt_parlg\"\r\narcade_mt_revsh = \"mt_revsh\"\r\narcade_mt_shar2 = \"mt_shar2\"\r\narcade_mt_shnbi = \"mt_shnbi\"\r\narcade_mt_smgp = \"mt_smgp\"\r\narcade_mt_sonic = \"mt_sonic\"\r\narcade_mt_stbld = \"mt_stbld\"\r\narcade_mt_tetri = \"mt_tetri\"\r\narcade_mt_tfor2 = \"mt_tfor2\"\r\narcade_mt_tgolf = \"mt_tgolf\"\r\narcade_mt_tlbba = \"mt_tlbba\"\r\narcade_mt_wcsoc = \"mt_wcsoc\"\r\narcade_mtlchamp = \"mtlchamp\"\r\narcade_mtlchamp1 = \"mtlchamp\"\r\narcade_mtlchampa = \"mtlchamp\"\r\narcade_mtlchampj = \"mtlchamp\"\r\narcade_mtlchampu = \"mtlchamp\"\r\narcade_mtlchampu1 = \"mtlchamp\"\r\narcade_mtlchmpj = \"mtlchamp\"\r\narcade_mtrap = \"mtrap\"\r\narcade_mtrap3 = \"mtrap\"\r\narcade_mtrap4 = \"mtrap\"\r\narcade_mtwins = \"mtwins\"\r\narcade_mugsmash = \"mugsmash\"\r\narcade_multchmp = \"multchmp\"\r\narcade_multchmpa = \"multchmp\"\r\narcade_multchmpk = \"multchmp\"\r\narcade_multi96 = \"twinadv\"\r\narcade_mustache = \"mustache\"\r\narcade_mustachei = \"mustache\"\r\narcade_mustang = \"mustang\"\r\narcade_mustangb = \"mustang\"\r\narcade_mustangb2 = \"mustang\"\r\narcade_mustangs = \"mustang\"\r\narcade_mutantf = \"mutantf\"\r\narcade_mutantf2 = \"mutantf\"\r\narcade_mutantf3 = \"mutantf\"\r\narcade_mutantf4 = \"mutantf\"\r\narcade_mutantfa = \"mutantf\"\r\narcade_mutantwarr = \"altbeast\"\r\narcade_mutnat = \"mutnat\"\r\narcade_mvp = \"mvp\"\r\narcade_mvpd = \"mvp\"\r\narcade_mvpj = \"mvp\"\r\narcade_mvpjd = \"mvp\"\r\narcade_mvsc = \"mvsc\"\r\narcade_mvsca = \"mvsc\"\r\narcade_mvscar1 = \"mvsc\"\r\narcade_mvscb = \"mvsc\"\r\narcade_mvsch = \"mvsc\"\r\narcade_mvscj = \"mvsc\"\r\narcade_mvscjr1 = \"mvsc\"\r\narcade_mvscjsing = \"mvsc\"\r\narcade_mvscr1 = \"mvsc\"\r\narcade_mvscu = \"mvsc\"\r\narcade_mvscud = \"mvsc\"\r\narcade_mvscur1 = \"mvsc\"\r\narcade_mwalk = \"mwalk\"\r\narcade_mwalkbl2 = \"mwalk\"\r\narcade_mwalkd = \"mwalk\"\r\narcade_mwalkj = \"mwalk\"\r\narcade_mwalkjd = \"mwalk\"\r\narcade_mwalku = \"mwalk\"\r\narcade_mwalkud = \"mwalk\"\r\narcade_mwarr = \"mwarr\"\r\narcade_mx5000 = \"mx5000\"\r\narcade_myangel = \"myangel\"\r\narcade_myangel2 = \"myangel2\"\r\narcade_myangel3 = \"myangel3\"\r\narcade_myfairld = \"myfairld\"\r\narcade_myhero = \"myhero\"\r\narcade_myherobl = \"myhero\"\r\narcade_myherok = \"myhero\"\r\narcade_myqbert = \"qbert\"\r\narcade_mysticm = \"mysticm\"\r\narcade_mysticri = \"mysticri\"\r\narcade_mysticrib = \"mysticri\"\r\narcade_myststno = \"mystston\"\r\narcade_mystston = \"mystston\"\r\narcade_myststono = \"mystston\"\r\narcade_myststonoi = \"mystston\"\r\narcade_mystwarr = \"mystwarr\"\r\narcade_mystwarra = \"mystwarr\"\r\narcade_mystwarraa = \"mystwarr\"\r\narcade_mystwarrj = \"mystwarr\"\r\narcade_mystwarru = \"mystwarr\"\r\narcade_mystwaru = \"mystwarr\"\r\narcade_nam1975 = \"nam1975\"\r\narcade_nametune = \"nametune\"\r\narcade_naname = \"naname\"\r\narcade_narc = \"narc\"\r\narcade_narc3 = \"narc\"\r\narcade_nastar = \"nastar\"\r\narcade_nastarw = \"nastar\"\r\narcade_natodef = \"natodef\"\r\narcade_natodefa = \"natodef\"\r\narcade_natsuiro = \"mjnatsu\"\r\narcade_naughtya = \"naughtyb\"\r\narcade_naughtyb = \"naughtyb\"\r\narcade_naughtyba = \"naughtyb\"\r\narcade_naughtybc = \"naughtyb\"\r\narcade_naughtyc = \"naughtyb\"\r\narcade_navalone = \"navalone\"\r\narcade_navarone = \"navarone\"\r\narcade_nbahangt = \"nbahangt\"\r\narcade_nbajam = \"nbajam\"\r\narcade_nbajamex = \"nbajamex\"\r\narcade_nbajamr2 = \"nbajam\"\r\narcade_nbajamt1 = \"nbajam\"\r\narcade_nbajamt2 = \"nbajam\"\r\narcade_nbajamt3 = \"nbajam\"\r\narcade_nbajamte = \"nbajam\"\r\narcade_nbamaxht = \"nbahangt\"\r\narcade_nbbatman = \"nbbatman\"\r\narcade_nbbatmanu = \"nbbatman\"\r\narcade_ncombat = \"ncombat\"\r\narcade_ncombath = \"ncombat\"\r\narcade_ncommand = \"ncommand\"\r\narcade_ncv1 = \"ncv1\"\r\narcade_ncv1j = \"ncv1\"\r\narcade_ncv1j2 = \"ncv1\"\r\narcade_ncv2 = \"ncv2\"\r\narcade_ncv2j = \"ncv2\"\r\narcade_nebulbee = \"galaga\"\r\narcade_nebulray = \"nebulray\"\r\narcade_nebulryj = \"nebulray\"\r\narcade_neckneck = \"neckneck\"\r\narcade_nekkyoku = \"nekkyoku\"\r\narcade_nemesis = \"nemesis\"\r\narcade_nemesisuk = \"nemesis\"\r\narcade_nemesuk = \"nemesis\"\r\narcade_nemo = \"nemo\"\r\narcade_nemoj = \"nemo\"\r\narcade_nemor1 = \"nemo\"\r\narcade_neo2500 = \"neo2500\"\r\narcade_neo3ddmo = \"neo3ddmo\"\r\narcade_neobattl = \"neobattl\"\r\narcade_neobombe = \"neobombe\"\r\narcade_neocdz = \"neocdz\"\r\narcade_neocstlv = \"neocstlv\"\r\narcade_neocup98 = \"neocup98\"\r\narcade_neodemo = \"neodemo\"\r\narcade_neodrift = \"neodrift\"\r\narcade_neogalag = \"neogalag\"\r\narcade_neogalaga = \"neogalag\"\r\narcade_neogeo = \"neogeo\"\r\narcade_neomrdo = \"neomrdo\"\r\narcade_neonopon = \"neonopon\"\r\narcade_neopong = \"neopong\"\r\narcade_neoponga = \"neopong\"\r\narcade_neoprimo = \"neoprimo\"\r\narcade_neotet = \"neotet\"\r\narcade_neothndr = \"neothndr\"\r\narcade_neoww2 = \"neoww2\"\r\narcade_nettoqc = \"nettoqc\"\r\narcade_netwars = \"netwars\"\r\narcade_newapunk = \"bbmanw\"\r\narcade_newfant = \"newfant\"\r\narcade_newfanta = \"newfant\"\r\narcade_newpuc2 = \"puckman\"\r\narcade_newpuc2b = \"puckman\"\r\narcade_newpuckx = \"puckman\"\r\narcade_news = \"news\"\r\narcade_newsa = \"news\"\r\narcade_newsin7 = \"newsin7\"\r\narcade_nextfase = \"phoenix\"\r\narcade_ngem2k = \"ngem2k\"\r\narcade_ngfrog = \"ngfrog\"\r\narcade_ngftdemo = \"ngftdemo\"\r\narcade_ngpgal = \"ngpgal\"\r\narcade_nibbler = \"nibbler\"\r\narcade_nibbler6 = \"nibbler\"\r\narcade_nibbler7 = \"nibbler\"\r\narcade_nibbler8 = \"nibbler\"\r\narcade_nibblera = \"nibbler\"\r\narcade_nibblero = \"nibbler\"\r\narcade_nibblerp = \"nibbler\"\r\narcade_nightstr = \"nightstr\"\r\narcade_nightstrj = \"nightstr\"\r\narcade_nightstru = \"nightstr\"\r\narcade_ninclown = \"ninclown\"\r\narcade_ninja = \"seganinj\"\r\narcade_ninjak = \"ninjak\"\r\narcade_ninjak2a = \"ninjakd2\"\r\narcade_ninjak2b = \"ninjakd2\"\r\narcade_ninjakd2 = \"ninjakd2\"\r\narcade_ninjakd2a = \"ninjakd2\"\r\narcade_ninjakd2b = \"ninjakd2\"\r\narcade_ninjakd2c = \"ninjakd2\"\r\narcade_ninjakj = \"ninjak\"\r\narcade_ninjaku = \"ninjak\"\r\narcade_ninjakun = \"ninjakun\"\r\narcade_ninjamas = \"ninjamas\"\r\narcade_ninjaw = \"ninjaw\"\r\narcade_ninjaw1 = \"ninjaw\"\r\narcade_ninjawj = \"ninjaw\"\r\narcade_ninjawu = \"ninjaw\"\r\narcade_ninjemak = \"ninjemak\"\r\narcade_nitd = \"nitd\"\r\narcade_nitdbl = \"nitd\"\r\narcade_nitedrvr = \"nitedrvr\"\r\narcade_nitrobal = \"nitrobal\"\r\narcade_nitrobala = \"nitrobal\"\r\narcade_niyanpai = \"niyanpai\"\r\narcade_nkdodgeb = \"spdodgeb\"\r\narcade_nmaster = \"metmqstr\"\r\narcade_nmg5 = \"nmg5\"\r\narcade_nmg5a = \"nmg5\"\r\narcade_nmg5e = \"nmg5\"\r\narcade_nmk004 = \"nmk004\"\r\narcade_nmouse = \"nmouse\"\r\narcade_nmouseb = \"nmouse\"\r\narcade_nmsengen = \"nmsengen\"\r\narcade_nndmseal = \"nndmseal\"\r\narcade_nndmseala = \"nndmseal\"\r\narcade_nob = \"nob\"\r\narcade_nobb = \"nob\"\r\narcade_noboranb = \"noboranb\"\r\narcade_nomnlnd = \"nomnlnd\"\r\narcade_nomnlndg = \"nomnlnd\"\r\narcade_nost = \"nost\"\r\narcade_nostj = \"nost\"\r\narcade_nostk = \"nost\"\r\narcade_nouryoku = \"nouryoku\"\r\narcade_nov2001u = \"nova2001\"\r\narcade_nova2001 = \"nova2001\"\r\narcade_nova2001h = \"nova2001\"\r\narcade_nova2001u = \"nova2001\"\r\narcade_nprinces = \"seganinj\"\r\narcade_nprincesb = \"seganinj\"\r\narcade_nprinceso = \"seganinj\"\r\narcade_nprincesu = \"seganinj\"\r\narcade_nprincsb = \"seganinj\"\r\narcade_nprincso = \"seganinj\"\r\narcade_nprincsu = \"seganinj\"\r\narcade_nrallyx = \"nrallyx\"\r\narcade_nslasher = \"nslasher\"\r\narcade_nslasherj = \"nslasher\"\r\narcade_nslashers = \"nslasher\"\r\narcade_nslasheru = \"nslasher\"\r\narcade_nspirit = \"nspirit\"\r\narcade_nspiritj = \"nspirit\"\r\narcade_nss_actr = \"nss_actr\"\r\narcade_nss_adam = \"nss_adam\"\r\narcade_nss_aten = \"nss_aten\"\r\narcade_nss_con3 = \"nss_con3\"\r\narcade_nss_fzer = \"nss_fzer\"\r\narcade_nss_lwep = \"nss_lwep\"\r\narcade_nss_ncaa = \"nss_ncaa\"\r\narcade_nss_rob3 = \"nss_rob3\"\r\narcade_nss_skin = \"nss_skin\"\r\narcade_nss_smw = \"nss_smw\"\r\narcade_nss_ssoc = \"nss_ssoc\"\r\narcade_nss_sten = \"nss_sten\"\r\narcade_nstocker = \"nstocker\"\r\narcade_nsub = \"nsub\"\r\narcade_ntopstar = \"ntopstar\"\r\narcade_numanath = \"numanath\"\r\narcade_numanatj = \"numanath\"\r\narcade_nunchaku = \"ladymstr\"\r\narcade_nwarr = \"nwarr\"\r\narcade_nwarra = \"nwarr\"\r\narcade_nwarrb = \"nwarr\"\r\narcade_nwarrh = \"nwarr\"\r\narcade_nwarru = \"nwarr\"\r\narcade_nwarrud = \"nwarr\"\r\narcade_nyanpani = \"kittenk\"\r\narcade_nycaptor = \"nycaptor\"\r\narcade_nyny = \"nyny\"\r\narcade_nynyg = \"nyny\"\r\narcade_nzeroteam = \"zeroteam\"\r\narcade_nzeroteama = \"zeroteam\"\r\narcade_oedfight = \"bloodwar\"\r\narcade_offensiv = \"scramble\"\r\narcade_offroad = \"offroad\"\r\narcade_offroadc = \"offroadc\"\r\narcade_offroadt = \"offroadt\"\r\narcade_offtwalc = \"offtwall\"\r\narcade_offtwall = \"offtwall\"\r\narcade_ogonsiro = \"gladiatr\"\r\narcade_ohmygod = \"ohmygod\"\r\narcade_oigas = \"gigasb\"\r\narcade_oisipuzl = \"oisipuzl\"\r\narcade_ojanko2 = \"ojanko2\"\r\narcade_ojankoc = \"ojankoc\"\r\narcade_ojankohs = \"ojankohs\"\r\narcade_ojankoy = \"ojankoy\"\r\narcade_ojousan = \"ojousan\"\r\narcade_olds = \"olds\"\r\narcade_olds100 = \"olds\"\r\narcade_olds100a = \"olds\"\r\narcade_olds103t = \"olds\"\r\narcade_oldsplus = \"oldsplus\"\r\narcade_olibochu = \"olibochu\"\r\narcade_olysoc92 = \"cupsoc\"\r\narcade_omega = \"omega\"\r\narcade_omegab = \"theend\"\r\narcade_omegaf = \"omegaf\"\r\narcade_omegafs = \"omegaf\"\r\narcade_omegrace = \"omegrace\"\r\narcade_omni = \"pisces\"\r\narcade_oneshot = \"oneshot\"\r\narcade_onetwo = \"onetwo\"\r\narcade_onetwoe = \"onetwo\"\r\narcade_onna34ra = \"onna34ro\"\r\narcade_onna34ro = \"onna34ro\"\r\narcade_onna34roa = \"onna34ro\"\r\narcade_opaopa = \"opaopa\"\r\narcade_opaopan = \"opaopa\"\r\narcade_opengolf = \"opengolf\"\r\narcade_openice = \"openice\"\r\narcade_opwolf = \"opwolf\"\r\narcade_opwolf3 = \"opwolf3\"\r\narcade_opwolf3u = \"opwolf3\"\r\narcade_opwolfa = \"opwolf\"\r\narcade_opwolfb = \"opwolf\"\r\narcade_opwolfj = \"opwolf\"\r\narcade_opwolfjsc = \"opwolf\"\r\narcade_opwolfu = \"opwolf\"\r\narcade_orangec = \"orangec\"\r\narcade_orbit = \"orbit\"\r\narcade_orbitron = \"orbitron\"\r\narcade_orbs = \"orbs\"\r\narcade_ordyne = \"ordyne\"\r\narcade_ordynej = \"ordyne\"\r\narcade_ordyneje = \"ordyne\"\r\narcade_orius = \"xexex\"\r\narcade_orlegend = \"orlegend\"\r\narcade_orlegend105k = \"orlegend\"\r\narcade_orlegend111c = \"orlegend\"\r\narcade_orlegend111k = \"orlegend\"\r\narcade_orlegend111t = \"orlegend\"\r\narcade_orlegendc = \"orlegend\"\r\narcade_orlegendca = \"orlegend\"\r\narcade_orlegende = \"orlegend\"\r\narcade_orlegndc = \"orlegend\"\r\narcade_orlegnde = \"orlegend\"\r\narcade_orunners = \"orunners\"\r\narcade_oscar = \"oscar\"\r\narcade_oscarj = \"oscar\"\r\narcade_oscarj0 = \"oscar\"\r\narcade_oscarj1 = \"oscar\"\r\narcade_oscarj2 = \"oscar\"\r\narcade_oscaru = \"oscar\"\r\narcade_osman = \"osman\"\r\narcade_otatidai = \"otatidai\"\r\narcade_othellos = \"othellos\"\r\narcade_othldrby = \"othldrby\"\r\narcade_othunder = \"othunder\"\r\narcade_othunderj = \"othunder\"\r\narcade_othunderjsc = \"othunder\"\r\narcade_othundero = \"othunder\"\r\narcade_othunderu = \"othunder\"\r\narcade_othunderuo = \"othunder\"\r\narcade_othundu = \"othunder\"\r\narcade_otonano = \"otonano\"\r\narcade_otwalls = \"otwalls\"\r\narcade_outfxesj = \"outfxies\"\r\narcade_outfxies = \"outfxies\"\r\narcade_outline = \"radarzon\"\r\narcade_outrun = \"outrun\"\r\narcade_outruna = \"outrun\"\r\narcade_outrunb = \"outrun\"\r\narcade_outrundx = \"outrun\"\r\narcade_outrundxa = \"outrun\"\r\narcade_outrundxeh = \"outrun\"\r\narcade_outrundxj = \"outrun\"\r\narcade_outruneh = \"outrun\"\r\narcade_outrunra = \"outrun\"\r\narcade_outzone = \"outzone\"\r\narcade_outzonea = \"outzone\"\r\narcade_outzoneb = \"outzone\"\r\narcade_outzonec = \"outzone\"\r\narcade_outzonecv = \"outzone\"\r\narcade_outzoneh = \"outzone\"\r\narcade_overdriv = \"overdriv\"\r\narcade_overtop = \"overtop\"\r\narcade_ozmawar2 = \"ozmawars\"\r\narcade_ozmawars = \"ozmawars\"\r\narcade_ozmawars2 = \"ozmawars\"\r\narcade_ozon1 = \"ozon1\"\r\narcade_p47 = \"p47\"\r\narcade_p47aces = \"p47aces\"\r\narcade_p47j = \"p47\"\r\narcade_p47je = \"p47\"\r\narcade_pacapp = \"pacapp\"\r\narcade_pacgal = \"mspacman\"\r\narcade_pacheart = \"puckman\"\r\narcade_pachiten = \"pachiten\"\r\narcade_packbang = \"packbang\"\r\narcade_packetman = \"puckman\"\r\narcade_pacland = \"pacland\"\r\narcade_pacland2 = \"pacland\"\r\narcade_pacland3 = \"pacland\"\r\narcade_paclandj = \"pacland\"\r\narcade_paclandjo = \"pacland\"\r\narcade_paclandjo2 = \"pacland\"\r\narcade_paclandm = \"pacland\"\r\narcade_paclandm2 = \"pacland\"\r\narcade_pacman = \"puckman\"\r\narcade_pacmanbl = \"puckman\"\r\narcade_pacmanbla = \"puckman\"\r\narcade_pacmanf = \"puckman\"\r\narcade_pacmania = \"pacmania\"\r\narcade_pacmaniaj = \"pacmania\"\r\narcade_pacmaniao = \"pacmania\"\r\narcade_pacmanij = \"pacmania\"\r\narcade_pacmanpe = \"puckman\"\r\narcade_pacmanso = \"puckman\"\r\narcade_pacmansp = \"puckman\"\r\narcade_pacmanvg = \"puckman\"\r\narcade_pacmod = \"puckman\"\r\narcade_pacnchmp = \"pacnpal\"\r\narcade_pacnpal = \"pacnpal\"\r\narcade_pacnpal2 = \"pacnpal\"\r\narcade_pacominv = \"beaminv\"\r\narcade_pacplus = \"pacplus\"\r\narcade_pacuman = \"puckman\"\r\narcade_paddle2 = \"arkanoid\"\r\narcade_paddlema = \"paddlema\"\r\narcade_paintrlr = \"crush\"\r\narcade_pairlove = \"pairlove\"\r\narcade_pairs = \"pairs\"\r\narcade_pairsa = \"pairs\"\r\narcade_pairsten = \"pairsten\"\r\narcade_pajaroes = \"uniwars\"\r\narcade_palamed = \"palamed\"\r\narcade_palamedj = \"palamed\"\r\narcade_pandoras = \"pandoras\"\r\narcade_pang = \"pang\"\r\narcade_pang3 = \"pang3\"\r\narcade_pang3b = \"pang3\"\r\narcade_pang3b2 = \"pang3\"\r\narcade_pang3b3 = \"pang3\"\r\narcade_pang3j = \"pang3\"\r\narcade_pang3r1 = \"pang3\"\r\narcade_pang3r1a = \"pang3\"\r\narcade_pangb = \"pang\"\r\narcade_pangb2 = \"pang\"\r\narcade_pangbold = \"pang\"\r\narcade_pangbold2 = \"pang\"\r\narcade_pangbold3 = \"pang\"\r\narcade_pangpang = \"pangpang\"\r\narcade_pangpomm = \"pangpoms\"\r\narcade_pangpoms = \"pangpoms\"\r\narcade_pangpomsm = \"pangpoms\"\r\narcade_panic = \"panic\"\r\narcade_panic2 = \"panic\"\r\narcade_panic3 = \"panic\"\r\narcade_panicbom = \"panicbom\"\r\narcade_panicger = \"panic\"\r\narcade_panich = \"panic\"\r\narcade_panicstr = \"panicstr\"\r\narcade_paperboy = \"paperboy\"\r\narcade_paperbr1 = \"paperboy\"\r\narcade_paperbr2 = \"paperboy\"\r\narcade_paprazzi = \"paprazzi\"\r\narcade_paradise = \"paradise\"\r\narcade_parodisj = \"parodius\"\r\narcade_parodius = \"parodius\"\r\narcade_parodiusa = \"parodius\"\r\narcade_parodiuse = \"parodius\"\r\narcade_parodiusj = \"parodius\"\r\narcade_pass = \"pass\"\r\narcade_passht4b = \"passsht\"\r\narcade_passsht = \"passsht\"\r\narcade_passsht16a = \"passsht\"\r\narcade_passshta = \"passsht\"\r\narcade_passshtad = \"passsht\"\r\narcade_passshtb = \"passsht\"\r\narcade_passshtd = \"passsht\"\r\narcade_passshtj = \"passsht\"\r\narcade_passshtjd = \"passsht\"\r\narcade_pastelgl = \"pastelgl\"\r\narcade_patapata = \"patapata\"\r\narcade_patimono = \"patimono\"\r\narcade_pbactio2 = \"pbaction\"\r\narcade_pbaction = \"pbaction\"\r\narcade_pballoon = \"pballoon\"\r\narcade_pballoonr = \"pballoon\"\r\narcade_pbancho = \"pbancho\"\r\narcade_pbillian = \"pbillian\"\r\narcade_pbillrd = \"pbillrd\"\r\narcade_pbillrds = \"pbillrd\"\r\narcade_pbillrdsa = \"pbillrd\"\r\narcade_pblbeach = \"pblbeach\"\r\narcade_pbobbl2j = \"pbobble2\"\r\narcade_pbobbl2n = \"pbobbl2n\"\r\narcade_pbobbl2u = \"pbobble2\"\r\narcade_pbobbl2x = \"pbobble2\"\r\narcade_pbobbl3j = \"pbobble3\"\r\narcade_pbobbl3u = \"pbobble3\"\r\narcade_pbobbl4j = \"pbobble4\"\r\narcade_pbobbl4u = \"pbobble4\"\r\narcade_pbobble = \"pbobble\"\r\narcade_pbobble2 = \"pbobble2\"\r\narcade_pbobble2j = \"pbobble2\"\r\narcade_pbobble2o = \"pbobble2\"\r\narcade_pbobble2u = \"pbobble2\"\r\narcade_pbobble2x = \"pbobble2\"\r\narcade_pbobble3 = \"pbobble3\"\r\narcade_pbobble3j = \"pbobble3\"\r\narcade_pbobble3u = \"pbobble3\"\r\narcade_pbobble4 = \"pbobble4\"\r\narcade_pbobble4j = \"pbobble4\"\r\narcade_pbobble4u = \"pbobble4\"\r\narcade_pbobblen = \"pbobblen\"\r\narcade_pbobblenb = \"pbobblen\"\r\narcade_pbobblna = \"pbobblen\"\r\narcade_pc_1942 = \"pc_1942\"\r\narcade_pc_bball = \"pc_bball\"\r\narcade_pc_bfght = \"pc_bfght\"\r\narcade_pc_bstar = \"pc_bstar\"\r\narcade_pc_cntra = \"pc_cntra\"\r\narcade_pc_cshwk = \"pc_cshwk\"\r\narcade_pc_cvnia = \"pc_cvnia\"\r\narcade_pc_dbldr = \"pc_dbldr\"\r\narcade_pc_ddrgn = \"pc_ddrgn\"\r\narcade_pc_drmro = \"pc_drmro\"\r\narcade_pc_duckh = \"pc_duckh\"\r\narcade_pc_ebike = \"pc_ebike\"\r\narcade_pc_ftqst = \"pc_ftqst\"\r\narcade_pc_gntlt = \"pc_gntlt\"\r\narcade_pc_golf = \"pc_golf\"\r\narcade_pc_goons = \"pc_goons\"\r\narcade_pc_grdue = \"pc_grdus\"\r\narcade_pc_grdus = \"pc_grdus\"\r\narcade_pc_hgaly = \"pc_hgaly\"\r\narcade_pc_kngfu = \"pc_kngfu\"\r\narcade_pc_mario = \"pc_mario\"\r\narcade_pc_miket = \"pc_miket\"\r\narcade_pc_mman3 = \"pc_mman3\"\r\narcade_pc_moglf = \"pc_moglf\"\r\narcade_pc_mtoid = \"pc_mtoid\"\r\narcade_pc_ngai2 = \"pc_ngai2\"\r\narcade_pc_ngai3 = \"pc_ngai3\"\r\narcade_pc_ngaid = \"pc_ngaid\"\r\narcade_pc_pinbt = \"pc_pinbt\"\r\narcade_pc_pwbld = \"pc_pwbld\"\r\narcade_pc_pwrst = \"pc_pwrst\"\r\narcade_pc_radr2 = \"pc_radr2\"\r\narcade_pc_radrc = \"pc_radrc\"\r\narcade_pc_rcpam = \"pc_rcpam\"\r\narcade_pc_rkats = \"pc_rkats\"\r\narcade_pc_rnatk = \"pc_rnatk\"\r\narcade_pc_rrngr = \"pc_rrngr\"\r\narcade_pc_rygar = \"pc_rygar\"\r\narcade_pc_sjetm = \"pc_sjetm\"\r\narcade_pc_smb = \"pc_smb\"\r\narcade_pc_smb2 = \"pc_smb2\"\r\narcade_pc_smb3 = \"pc_smb3\"\r\narcade_pc_suprc = \"pc_suprc\"\r\narcade_pc_tbowl = \"pc_tbowl\"\r\narcade_pc_tenis = \"pc_tenis\"\r\narcade_pc_tkfld = \"pc_tkfld\"\r\narcade_pc_tmnt = \"pc_tmnt\"\r\narcade_pc_tmnt2 = \"pc_tmnt2\"\r\narcade_pc_trjan = \"pc_trjan\"\r\narcade_pc_vball = \"pc_vball\"\r\narcade_pc_wcup = \"pc_wcup\"\r\narcade_pc_wgnmn = \"pc_wgnmn\"\r\narcade_pc_ynoid = \"pc_ynoid\"\r\narcade_pce_1943kai = \"pce_1943kai\"\r\narcade_pce_21emon = \"pce_21emon\"\r\narcade_pce_aburner2 = \"pce_aburner2\"\r\narcade_pce_acrush = \"pce_acrush\"\r\narcade_pce_advislnd = \"pce_advislnd\"\r\narcade_pce_aeroblst = \"pce_aeroblst\"\r\narcade_pce_alice = \"pce_alice\"\r\narcade_pce_ankoku = \"pce_ankoku\"\r\narcade_pce_aoiblink = \"pce_aoiblink\"\r\narcade_pce_appgateb = \"pce_appgateb\"\r\narcade_pce_armedf = \"pce_armedf\"\r\narcade_pce_arttool = \"pce_arttool\"\r\narcade_pce_atomrobo = \"pce_atomrobo\"\r\narcade_pce_avpoker = \"pce_avpoker\"\r\narcade_pce_baibai = \"pce_baibai\"\r\narcade_pce_ballistx = \"pce_ballistx\"\r\narcade_pce_baribari = \"pce_baribari\"\r\narcade_pce_barunba = \"pce_barunba\"\r\narcade_pce_batloder = \"pce_batloder\"\r\narcade_pce_batman = \"pce_batman\"\r\narcade_pce_beball = \"pce_beball\"\r\narcade_pce_benkei = \"pce_benkei\"\r\narcade_pce_benkei1 = \"pce_benkei\"\r\narcade_pce_bikkuri = \"pce_bikkuri\"\r\narcade_pce_bikkuri1 = \"pce_bikkuri\"\r\narcade_pce_blodia = \"pce_blodia\"\r\narcade_pce_blodwolf = \"pce_blodwolf\"\r\narcade_pce_bodycon2 = \"pce_bodycon2\"\r\narcade_pce_bombman = \"pce_bombman\"\r\narcade_pce_bombmn93 = \"pce_bombmn93\"\r\narcade_pce_bombmn93s = \"pce_bombmn93\"\r\narcade_pce_bombmn94 = \"pce_bombmn94\"\r\narcade_pce_bombmnub = \"pce_bombmnub\"\r\narcade_pce_bravoman = \"pce_bravoman\"\r\narcade_pce_breakin = \"pce_breakin\"\r\narcade_pce_bubblegm = \"pce_bubblegm\"\r\narcade_pce_bullfght = \"pce_bullfght\"\r\narcade_pce_burnangl = \"pce_burnangl\"\r\narcade_pce_cadash = \"pce_cadash\"\r\narcade_pce_cdsys = \"pce_cdsys\"\r\narcade_pce_cdsysa = \"pce_cdsys\"\r\narcade_pce_cdsysb = \"pce_cdsys\"\r\narcade_pce_champwrs = \"pce_champwrs\"\r\narcade_pce_chasehq = \"pce_chasehq\"\r\narcade_pce_chibim = \"pce_chibim\"\r\narcade_pce_chikuden = \"pce_chikuden\"\r\narcade_pce_chikuden1 = \"pce_chikuden\"\r\narcade_pce_chukatai = \"pce_chukatai\"\r\narcade_pce_circusld = \"pce_circusld\"\r\narcade_pce_cityhunt = \"pce_cityhunt\"\r\narcade_pce_columns = \"pce_columns\"\r\narcade_pce_contranes = \"pce_contranes\"\r\narcade_pce_coryoon = \"pce_coryoon\"\r\narcade_pce_coryoon1 = \"pce_coryoon\"\r\narcade_pce_cyberdod = \"pce_cyberdod\"\r\narcade_pce_cyberx = \"pce_cyberx\"\r\narcade_pce_cybrcore = \"pce_cybrcore\"\r\narcade_pce_cyknight = \"pce_cyknight\"\r\narcade_pce_daisenpu = \"pce_daisenpu\"\r\narcade_pce_dariusa = \"pce_dariusa\"\r\narcade_pce_dariusp = \"pce_dariusp\"\r\narcade_pce_ddanpei = \"pce_ddanpei\"\r\narcade_pce_ddungw = \"pce_ddungw\"\r\narcade_pce_deadmoon = \"pce_deadmoon\"\r\narcade_pce_deepblue = \"pce_deepblue\"\r\narcade_pce_devlcrsh = \"pce_devlcrsh\"\r\narcade_pce_diehard = \"pce_diehard\"\r\narcade_pce_digichmp = \"pce_digichmp\"\r\narcade_pce_donaturl = \"pce_donaturl\"\r\narcade_pce_dondoko = \"pce_dondoko\"\r\narcade_pce_dorams = \"pce_dorams\"\r\narcade_pce_dorandn = \"pce_dorandn\"\r\narcade_pce_download = \"pce_download\"\r\narcade_pce_download1 = \"pce_download\"\r\narcade_pce_dragnegg = \"pce_dragnegg\"\r\narcade_pce_droprock = \"pce_droprock\"\r\narcade_pce_droprock1 = \"pce_droprock\"\r\narcade_pce_druaga = \"pce_druaga\"\r\narcade_pce_dsaber = \"pce_dsaber\"\r\narcade_pce_dsaber1 = \"pce_dsaber\"\r\narcade_pce_dspirit = \"pce_dspirit\"\r\narcade_pce_dungexpl = \"pce_dungexpl\"\r\narcade_pce_energy = \"pce_energy\"\r\narcade_pce_etercity = \"pce_etercity\"\r\narcade_pce_f1circ91 = \"pce_f1circ91\"\r\narcade_pce_f1circ92 = \"pce_f1circ92\"\r\narcade_pce_f1circus = \"pce_f1circus\"\r\narcade_pce_f1circus1 = \"pce_f1circus\"\r\narcade_pce_f1dream = \"pce_f1dream\"\r\narcade_pce_f1pilot = \"pce_f1pilot\"\r\narcade_pce_f1tb = \"pce_f1tb\"\r\narcade_pce_fantzone = \"pce_fantzone\"\r\narcade_pce_fightrun = \"pce_fightrun\"\r\narcade_pce_finallap = \"pce_finallap\"\r\narcade_pce_finalmt = \"pce_finalmt\"\r\narcade_pce_finalsol = \"pce_finalsol\"\r\narcade_pce_finalsols = \"pce_finalsol\"\r\narcade_pce_finlblst = \"pce_finlblst\"\r\narcade_pce_fireprow = \"pce_fireprow\"\r\narcade_pce_fireprw2 = \"pce_fireprw2\"\r\narcade_pce_fireprw3 = \"pce_fireprw3\"\r\narcade_pce_fsoccer = \"pce_fsoccer\"\r\narcade_pce_fsoccr90 = \"pce_fsoccr90\"\r\narcade_pce_gaiamons = \"pce_gaiamons\"\r\narcade_pce_gaiflame = \"pce_gaiflame\"\r\narcade_pce_galaga88 = \"pce_galaga88\"\r\narcade_pce_ganbgolf = \"pce_ganbgolf\"\r\narcade_pce_gecd = \"pce_gecd\"\r\narcade_pce_gekisboy = \"pce_gekisboy\"\r\narcade_pce_genjitsu = \"pce_genjitsu\"\r\narcade_pce_genpei = \"pce_genpei\"\r\narcade_pce_genpemak = \"pce_genpemak\"\r\narcade_pce_gomola = \"pce_gomola\"\r\narcade_pce_gradius = \"pce_gradius\"\r\narcade_pce_gunhed = \"pce_gunhed\"\r\narcade_pce_gunhedht = \"pce_gunhedht\"\r\narcade_pce_hanataka = \"pce_hanataka\"\r\narcade_pce_haniirod = \"pce_haniirod\"\r\narcade_pce_haniisky = \"pce_haniisky\"\r\narcade_pce_hatris = \"pce_hatris\"\r\narcade_pce_hitice = \"pce_hitice\"\r\narcade_pce_hvyunit = \"pce_hvyunit\"\r\narcade_pce_idolhana = \"pce_idolhana\"\r\narcade_pce_imagefgt = \"pce_imagefgt\"\r\narcade_pce_jchan = \"pce_jchan\"\r\narcade_pce_jigomegu = \"pce_jigomegu\"\r\narcade_pce_jinmu = \"pce_jinmu\"\r\narcade_pce_jinmu1 = \"pce_jinmu\"\r\narcade_pce_jleag11 = \"pce_jleag11\"\r\narcade_pce_juuouki = \"pce_juuouki\"\r\narcade_pce_juuouki1 = \"pce_juuouki\"\r\narcade_pce_katochan = \"pce_katochan\"\r\narcade_pce_kattobi = \"pce_kattobi\"\r\narcade_pce_kickball = \"pce_kickball\"\r\narcade_pce_kikikai = \"pce_kikikai\"\r\narcade_pce_kingcasn = \"pce_kingcasn\"\r\narcade_pce_klax = \"pce_klax\"\r\narcade_pce_knightrs = \"pce_knightrs\"\r\narcade_pce_ktiger = \"pce_ktiger\"\r\narcade_pce_kungfu = \"pce_kungfu\"\r\narcade_pce_kyukyom2 = \"pce_kyukyom2\"\r\narcade_pce_kyukyomj = \"pce_kyukyomj\"\r\narcade_pce_ladyswrd = \"pce_ladyswrd\"\r\narcade_pce_ladyswrd1 = \"pce_ladyswrd\"\r\narcade_pce_ldrun = \"pce_ldrun\"\r\narcade_pce_loht = \"pce_loht\"\r\narcade_pce_lostsunh = \"pce_lostsunh\"\r\narcade_pce_magchase = \"pce_magchase\"\r\narcade_pce_makaihak = \"pce_makaihak\"\r\narcade_pce_makaipri = \"pce_makaipri\"\r\narcade_pce_makyoden = \"pce_makyoden\"\r\narcade_pce_maniacpw = \"pce_maniacpw\"\r\narcade_pce_marchen = \"pce_marchen\"\r\narcade_pce_mesopot = \"pce_mesopot\"\r\narcade_pce_metlstok = \"pce_metlstok\"\r\narcade_pce_mikkoku = \"pce_mikkoku\"\r\narcade_pce_mizubaku = \"pce_mizubaku\"\r\narcade_pce_mjgakmld = \"pce_mjgakmld\"\r\narcade_pce_mjgakmld1 = \"pce_mjgakmld\"\r\narcade_pce_mjgakuen = \"pce_mjgakuen\"\r\narcade_pce_mjgokusp = \"pce_mjgokusp\"\r\narcade_pce_mjkaiser = \"pce_mjkaiser\"\r\narcade_pce_mjwars = \"pce_mjwars\"\r\narcade_pce_mnstprow = \"pce_mnstprow\"\r\narcade_pce_momo2 = \"pce_momo2\"\r\narcade_pce_momogdn = \"pce_momogdn\"\r\narcade_pce_momoktsg = \"pce_momoktsg\"\r\narcade_pce_momotrbo = \"pce_momotrbo\"\r\narcade_pce_moritash = \"pce_moritash\"\r\narcade_pce_motoroad = \"pce_motoroad\"\r\narcade_pce_motorod2 = \"pce_motorod2\"\r\narcade_pce_motorod2a = \"pce_motorod2\"\r\narcade_pce_mrheli = \"pce_mrheli\"\r\narcade_pce_mrheli1 = \"pce_mrheli\"\r\narcade_pce_naxopen = \"pce_naxopen\"\r\narcade_pce_naxstad = \"pce_naxstad\"\r\narcade_pce_nazomasq = \"pce_nazomasq\"\r\narcade_pce_necromcr = \"pce_necromcr\"\r\narcade_pce_necros = \"pce_necros\"\r\narcade_pce_nectaris = \"pce_nectaris\"\r\narcade_pce_nekdodge = \"pce_nekdodge\"\r\narcade_pce_neksoccr = \"pce_neksoccr\"\r\narcade_pce_neutopi2 = \"pce_neutopi2\"\r\narcade_pce_neutopia = \"pce_neutopia\"\r\narcade_pce_nhktaidr = \"pce_nhktaidr\"\r\narcade_pce_nicklaus = \"pce_nicklaus\"\r\narcade_pce_nikopun = \"pce_nikopun\"\r\narcade_pce_ninjawar = \"pce_ninjawar\"\r\narcade_pce_nryukend = \"pce_nryukend\"\r\narcade_pce_oboccha = \"pce_oboccha\"\r\narcade_pce_opwolf = \"pce_opwolf\"\r\narcade_pce_ordyne = \"pce_ordyne\"\r\narcade_pce_outlive = \"pce_outlive\"\r\narcade_pce_outrun = \"pce_outrun\"\r\narcade_pce_override = \"pce_override\"\r\narcade_pce_p47 = \"pce_p47\"\r\narcade_pce_pachikun = \"pce_pachikun\"\r\narcade_pce_pacland = \"pce_pacland\"\r\narcade_pce_paranoia = \"pce_paranoia\"\r\narcade_pce_parasol = \"pce_parasol\"\r\narcade_pce_parodius = \"pce_parodius\"\r\narcade_pce_pcdenj = \"pce_pcdenj\"\r\narcade_pce_pcdenja = \"pce_pcdenj\"\r\narcade_pce_pcgenj = \"pce_pcgenj\"\r\narcade_pce_pcgenj2 = \"pce_pcgenj2\"\r\narcade_pce_pcgenj3 = \"pce_pcgenj3\"\r\narcade_pce_pcgenj3t = \"pce_pcgenj3t\"\r\narcade_pce_pcgenja = \"pce_pcgenj\"\r\narcade_pce_pcpachi = \"pce_pcpachi\"\r\narcade_pce_pdrift = \"pce_pdrift\"\r\narcade_pce_pdrift1 = \"pce_pdrift\"\r\narcade_pce_pgolf = \"pce_pgolf\"\r\narcade_pce_pleag2 = \"pce_pleag2\"\r\narcade_pce_pleag3 = \"pce_pleag3\"\r\narcade_pce_pleag4 = \"pce_pleag4\"\r\narcade_pce_pleag5 = \"pce_pleag5\"\r\narcade_pce_pleag93 = \"pce_pleag93\"\r\narcade_pce_pleagas = \"pce_pleagas\"\r\narcade_pce_pleague = \"pce_pleague\"\r\narcade_pce_populous = \"pce_populous\"\r\narcade_pce_populous1 = \"pce_populous\"\r\narcade_pce_power11 = \"pce_power11\"\r\narcade_pce_powergat = \"pce_powergat\"\r\narcade_pce_proyak = \"pce_proyak\"\r\narcade_pce_proyak89 = \"pce_proyak89\"\r\narcade_pce_proyak90 = \"pce_proyak90\"\r\narcade_pce_proyak91 = \"pce_proyak91\"\r\narcade_pce_psports = \"pce_psports\"\r\narcade_pce_psychas = \"pce_psychas\"\r\narcade_pce_ptennis = \"pce_ptennis\"\r\narcade_pce_ptennwc = \"pce_ptennwc\"\r\narcade_pce_puzzlboy = \"pce_puzzlboy\"\r\narcade_pce_puzznic = \"pce_puzznic\"\r\narcade_pce_quizts = \"pce_quizts\"\r\narcade_pce_rabiolep = \"pce_rabiolep\"\r\narcade_pce_racindam = \"pce_racindam\"\r\narcade_pce_raiden = \"pce_raiden\"\r\narcade_pce_rastan2 = \"pce_rastan2\"\r\narcade_pce_reflectron = \"pce_reflectron\"\r\narcade_pce_rockon = \"pce_rockon\"\r\narcade_pce_rtypep1 = \"pce_rtypep1\"\r\narcade_pce_rtypep2 = \"pce_rtypep2\"\r\narcade_pce_ryukyu = \"pce_ryukyu\"\r\narcade_pce_sadaki7 = \"pce_sadaki7\"\r\narcade_pce_saigonin = \"pce_saigonin\"\r\narcade_pce_salamand = \"pce_salamand\"\r\narcade_pce_santatlantean = \"pce_santatlantean\"\r\narcade_pce_scdsys = \"pce_scdsys\"\r\narcade_pce_sci = \"pce_sci\"\r\narcade_pce_sdragon = \"pce_sdragon\"\r\narcade_pce_sekigaha = \"pce_sekigaha\"\r\narcade_pce_sengokmj = \"pce_sengokmj\"\r\narcade_pce_sf2ce = \"pce_sf2ce\"\r\narcade_pce_shanghai = \"pce_shanghai\"\r\narcade_pce_sharrier = \"pce_sharrier\"\r\narcade_pce_shingen = \"pce_shingen\"\r\narcade_pce_shingen1 = \"pce_shingen\"\r\narcade_pce_shinobi = \"pce_shinobi\"\r\narcade_pce_shiryo = \"pce_shiryo\"\r\narcade_pce_shogisi = \"pce_shogisi\"\r\narcade_pce_shogism = \"pce_shogism\"\r\narcade_pce_shubibi = \"pce_shubibi\"\r\narcade_pce_shubibi2 = \"pce_shubibi2\"\r\narcade_pce_sidearms = \"pce_sidearms\"\r\narcade_pce_silentd = \"pce_silentd\"\r\narcade_pce_sindibad = \"pce_sindibad\"\r\narcade_pce_skweek = \"pce_skweek\"\r\narcade_pce_smcrush = \"pce_smcrush\"\r\narcade_pce_smomo = \"pce_smomo\"\r\narcade_pce_smomo2 = \"pce_smomo2\"\r\narcade_pce_sokoban = \"pce_sokoban\"\r\narcade_pce_soldblad = \"pce_soldblad\"\r\narcade_pce_soldblas = \"pce_soldblas\"\r\narcade_pce_sonson2 = \"pce_sonson2\"\r\narcade_pce_spaceinv = \"pce_spaceinv\"\r\narcade_pce_spinpair = \"pce_spinpair\"\r\narcade_pce_spirwave = \"pce_spirwave\"\r\narcade_pce_splatth = \"pce_splatth\"\r\narcade_pce_sssoldr = \"pce_sssoldr\"\r\narcade_pce_stratego = \"pce_stratego\"\r\narcade_pce_stripf2 = \"pce_stripf2\"\r\narcade_pce_susano = \"pce_susano\"\r\narcade_pce_svolley = \"pce_svolley\"\r\narcade_pce_takameib = \"pce_takameib\"\r\narcade_pce_tatsujin = \"pce_tatsujin\"\r\narcade_pce_tatsujinp = \"pce_tatsujin\"\r\narcade_pce_tatsunok = \"pce_tatsunok\"\r\narcade_pce_tblade = \"pce_tblade\"\r\narcade_pce_tennokoe = \"pce_tennokoe\"\r\narcade_pce_terracr2 = \"pce_terracr2\"\r\narcade_pce_timcrus2 = \"pce_timcrus2\"\r\narcade_pce_titan = \"pce_titan\"\r\narcade_pce_tnzs = \"pce_tnzs\"\r\narcade_pce_toiletk = \"pce_toiletk\"\r\narcade_pce_toramich = \"pce_toramich\"\r\narcade_pce_toyshopb = \"pce_toyshopb\"\r\narcade_pce_tricky = \"pce_tricky\"\r\narcade_pce_tsuppari = \"pce_tsuppari\"\r\narcade_pce_tvbasket = \"pce_tvbasket\"\r\narcade_pce_tvfootbl = \"pce_tvfootbl\"\r\narcade_pce_tvhockey = \"pce_tvhockey\"\r\narcade_pce_twinbee = \"pce_twinbee\"\r\narcade_pce_usaprobs = \"pce_usaprobs\"\r\narcade_pce_valkyrie = \"pce_valkyrie\"\r\narcade_pce_veigues = \"pce_veigues\"\r\narcade_pce_victoryr = \"pce_victoryr\"\r\narcade_pce_vigilant = \"pce_vigilant\"\r\narcade_pce_violents = \"pce_violents\"\r\narcade_pce_volfied = \"pce_volfied\"\r\narcade_pce_waiwaimj = \"pce_waiwaimj\"\r\narcade_pce_wallaby = \"pce_wallaby\"\r\narcade_pce_wataru = \"pce_wataru\"\r\narcade_pce_wbeach = \"pce_wbeach\"\r\narcade_pce_wcircuit = \"pce_wcircuit\"\r\narcade_pce_winshot = \"pce_winshot\"\r\narcade_pce_wjockey = \"pce_wjockey\"\r\narcade_pce_wonderm = \"pce_wonderm\"\r\narcade_pce_wring = \"pce_wring\"\r\narcade_pce_xevious = \"pce_xevious\"\r\narcade_pce_xserd = \"pce_xserd\"\r\narcade_pce_xwiber = \"pce_xwiber\"\r\narcade_pce_youkaid = \"pce_youkaid\"\r\narcade_pce_yuyu = \"pce_yuyu\"\r\narcade_pce_zero4c = \"pce_zero4c\"\r\narcade_pce_zero4ca = \"pce_zero4c\"\r\narcade_pce_zipang = \"pce_zipang\"\r\narcade_pcktgal = \"pcktgal\"\r\narcade_pcktgal2 = \"pcktgal\"\r\narcade_pcktgalb = \"pcktgal\"\r\narcade_pclubj = \"pclubj\"\r\narcade_pclubjv2 = \"pclubj\"\r\narcade_pclubjv4 = \"pclubj\"\r\narcade_pclubjv5 = \"pclubj\"\r\narcade_pclubys = \"pclubys\"\r\narcade_pclubysa = \"pclubys\"\r\narcade_pdrift = \"pdrift\"\r\narcade_pdrifta = \"pdrift\"\r\narcade_pdrifte = \"pdrift\"\r\narcade_pdriftj = \"pdrift\"\r\narcade_peekaboo = \"peekaboo\"\r\narcade_peekaboou = \"peekaboo\"\r\narcade_peepshow = \"mjfocus\"\r\narcade_peggle = \"peggle\"\r\narcade_pegglet = \"peggle\"\r\narcade_penbros = \"penbros\"\r\narcade_pengadvb = \"pengadvb\"\r\narcade_pengo = \"pengo\"\r\narcade_pengo2 = \"pengo\"\r\narcade_pengo2u = \"pengo\"\r\narcade_pengo3u = \"pengo\"\r\narcade_pengo4 = \"pengo\"\r\narcade_pengo5 = \"pengo\"\r\narcade_pengob = \"pengo\"\r\narcade_penta = \"pengo\"\r\narcade_pepper2 = \"pepper2\"\r\narcade_percuss = \"percuss\"\r\narcade_perestro = \"perestro\"\r\narcade_perfrman = \"perfrman\"\r\narcade_perfrmanu = \"perfrman\"\r\narcade_perfrmau = \"perfrman\"\r\narcade_pestplce = \"mario\"\r\narcade_peterpak = \"peterpak\"\r\narcade_pettanp = \"pettanp\"\r\narcade_pfghtj = \"sgemf\"\r\narcade_pgalvip = \"pgalvip\"\r\narcade_pgalvipa = \"pgalvip\"\r\narcade_pgear = \"armwar\"\r\narcade_pgearr1 = \"armwar\"\r\narcade_pgemeni = \"pgemeni\"\r\narcade_pgm = \"pgm\"\r\narcade_pgm3in1 = \"pgm3in1\"\r\narcade_pgmdemo = \"pgmdemo\"\r\narcade_pgmfrog = \"pgmfrog\"\r\narcade_pgoal = \"pgoal\"\r\narcade_phantasm = \"avspirit\"\r\narcade_phantom2 = \"phantom2\"\r\narcade_phantoma = \"spectar\"\r\narcade_phelios = \"phelios\"\r\narcade_pheliosj = \"phelios\"\r\narcade_phoenix = \"phoenix\"\r\narcade_phoenix2 = \"phoenix\"\r\narcade_phoenix3 = \"phoenix\"\r\narcade_phoenixa = \"phoenix\"\r\narcade_phoenixass = \"phoenix\"\r\narcade_phoenixb = \"phoenix\"\r\narcade_phoenixc = \"phoenix\"\r\narcade_phoenixc2 = \"phoenix\"\r\narcade_phoenixc3 = \"phoenix\"\r\narcade_phoenixc4 = \"phoenix\"\r\narcade_phoenixdal = \"phoenix\"\r\narcade_phoenixi = \"phoenix\"\r\narcade_phoenixj = \"phoenix\"\r\narcade_phoenixs = \"phoenix\"\r\narcade_phoenixt = \"phoenix\"\r\narcade_phoenxp2 = \"phoenix\"\r\narcade_photof = \"wwjgtin\"\r\narcade_photoy2k = \"photoy2k\"\r\narcade_photoy2k102 = \"photoy2k\"\r\narcade_photoy2k104 = \"photoy2k\"\r\narcade_phozon = \"phozon\"\r\narcade_phozons = \"phozon\"\r\narcade_pickin = \"pickin\"\r\narcade_pignewt = \"pignewt\"\r\narcade_pignewta = \"pignewt\"\r\narcade_pigout = \"pigout\"\r\narcade_pigouta = \"pigout\"\r\narcade_pigskin = \"pigskin\"\r\narcade_pinbo = \"pinbo\"\r\narcade_pinbos = \"pinbo\"\r\narcade_pingpong = \"pingpong\"\r\narcade_pipedrm = \"pipedrm\"\r\narcade_pipedrmj = \"pipedrm\"\r\narcade_pipedrmt = \"pipedrm\"\r\narcade_pipedrmu = \"pipedrm\"\r\narcade_pipibibi = \"pipibibs\"\r\narcade_pipibibs = \"pipibibs\"\r\narcade_pipibibsa = \"pipibibs\"\r\narcade_pipibibsp = \"pipibibs\"\r\narcade_piranha = \"puckman\"\r\narcade_piranhah = \"puckman\"\r\narcade_piranhao = \"puckman\"\r\narcade_pirates = \"pirates\"\r\narcade_piratesb = \"pirates\"\r\narcade_piratpet = \"junglek\"\r\narcade_pisces = \"pisces\"\r\narcade_piscesb = \"pisces\"\r\narcade_pistoldm = \"pistoldm\"\r\narcade_pitfall2 = \"pitfall2\"\r\narcade_pitfall2a = \"pitfall2\"\r\narcade_pitfall2u = \"pitfall2\"\r\narcade_pitfallu = \"pitfall2\"\r\narcade_pitfigh3 = \"pitfight\"\r\narcade_pitfighb = \"pitfight\"\r\narcade_pitfighj = \"pitfight\"\r\narcade_pitfight = \"pitfight\"\r\narcade_pitnrun = \"pitnrun\"\r\narcade_pitnruna = \"pitnrun\"\r\narcade_pkladiel = \"pkladies\"\r\narcade_pkladies = \"pkladies\"\r\narcade_pkladiesl = \"pkladies\"\r\narcade_pkladiesla = \"pkladies\"\r\narcade_pkscram = \"pkscram\"\r\narcade_pktgaldj = \"pktgaldx\"\r\narcade_pktgaldx = \"pktgaldx\"\r\narcade_pktgaldxb = \"pktgaldx\"\r\narcade_pktgaldxj = \"pktgaldx\"\r\narcade_pkunwar = \"pkunwar\"\r\narcade_pkunwarj = \"pkunwar\"\r\narcade_platoon = \"platoon\"\r\narcade_playball = \"playball\"\r\narcade_plctr13b = \"policetr\"\r\narcade_plegends = \"plegends\"\r\narcade_plegendsj = \"plegends\"\r\narcade_pleiadbl = \"pleiads\"\r\narcade_pleiadce = \"pleiads\"\r\narcade_pleiads = \"pleiads\"\r\narcade_pleiadsb2 = \"pleiads\"\r\narcade_pleiadsi = \"pleiads\"\r\narcade_pleiadsn = \"pleiads\"\r\narcade_pleiadss = \"pleiads\"\r\narcade_plgirls = \"plgirls\"\r\narcade_plgirls2 = \"plgirls2\"\r\narcade_plgirls2b = \"plgirls2\"\r\narcade_plotting = \"plotting\"\r\narcade_plottinga = \"plotting\"\r\narcade_plottingb = \"plotting\"\r\narcade_plottingu = \"plotting\"\r\narcade_plumppop = \"plumppop\"\r\narcade_plusalph = \"plusalph\"\r\narcade_plygonet = \"plygonet\"\r\narcade_pnickj = \"pnickj\"\r\narcade_pnicku = \"pnickj\"\r\narcade_pnyaa = \"pnyaa\"\r\narcade_pnyaaa = \"pnyaa\"\r\narcade_poitto = \"poitto\"\r\narcade_poknight = \"poknight\"\r\narcade_pokonyan = \"pokonyan\"\r\narcade_polaris = \"polaris\"\r\narcade_polarisa = \"polaris\"\r\narcade_polepos = \"polepos\"\r\narcade_polepos1 = \"polepos\"\r\narcade_polepos2 = \"polepos2\"\r\narcade_poleposa = \"polepos\"\r\narcade_poleps2a = \"polepos2\"\r\narcade_poleps2b = \"polepos2\"\r\narcade_policeto = \"policetr\"\r\narcade_policetr = \"policetr\"\r\narcade_pollux = \"pollux\"\r\narcade_polluxa = \"pollux\"\r\narcade_polluxa2 = \"pollux\"\r\narcade_polluxn = \"pollux\"\r\narcade_polyplay = \"polyplay\"\r\narcade_pompingw = \"pang\"\r\narcade_ponchin = \"ponchin\"\r\narcade_ponchina = \"ponchin\"\r\narcade_ponpoko = \"ponpoko\"\r\narcade_ponpokov = \"ponpoko\"\r\narcade_poolshrk = \"poolshrk\"\r\narcade_pootan = \"pooyan\"\r\narcade_pooyan = \"pooyan\"\r\narcade_pooyans = \"pooyan\"\r\narcade_popbingo = \"popbingo\"\r\narcade_popbounc = \"popbounc\"\r\narcade_popeye = \"popeye\"\r\narcade_popeyebl = \"popeye\"\r\narcade_popeyef = \"popeye\"\r\narcade_popeyej = \"popeye\"\r\narcade_popeyejo = \"popeye\"\r\narcade_popeyeman = \"puckman\"\r\narcade_popeyeu = \"popeye\"\r\narcade_popflama = \"popflame\"\r\narcade_popflamb = \"popflame\"\r\narcade_popflame = \"popflame\"\r\narcade_popflamea = \"popflame\"\r\narcade_popflameb = \"popflame\"\r\narcade_popflamen = \"popflame\"\r\narcade_popnpop = \"popnpop\"\r\narcade_popnpopj = \"popnpop\"\r\narcade_popnpopu = \"popnpop\"\r\narcade_popper = \"popper\"\r\narcade_popspops = \"popspops\"\r\narcade_porky = \"porky\"\r\narcade_porter = \"dockman\"\r\narcade_portman = \"dockman\"\r\narcade_portmanj = \"dockman\"\r\narcade_portrait = \"portrait\"\r\narcade_potogold = \"leprechn\"\r\narcade_potopoto = \"potopoto\"\r\narcade_poundfor = \"poundfor\"\r\narcade_poundforj = \"poundfor\"\r\narcade_poundforu = \"poundfor\"\r\narcade_poundfou = \"poundfor\"\r\narcade_pow = \"pow\"\r\narcade_powerdrv = \"powerdrv\"\r\narcade_powerina = \"powerins\"\r\narcade_powerins = \"powerins\"\r\narcade_powerinsa = \"powerins\"\r\narcade_powerinsb = \"powerins\"\r\narcade_powerinsj = \"powerins\"\r\narcade_powj = \"pow\"\r\narcade_powrplay = \"powrplay\"\r\narcade_ppan = \"hook\"\r\narcade_ppchamp = \"gotcha\"\r\narcade_pprobe = \"pprobe\"\r\narcade_prehisle = \"prehisle\"\r\narcade_prehisleb = \"prehisle\"\r\narcade_prehislek = \"prehisle\"\r\narcade_prehisleu = \"prehisle\"\r\narcade_prehislu = \"prehisle\"\r\narcade_preisle2 = \"preisle2\"\r\narcade_prikura = \"prikura\"\r\narcade_primella = \"gundl94\"\r\narcade_primglex = \"primglex\"\r\narcade_primrag2 = \"primrag2\"\r\narcade_primraga = \"primrage\"\r\narcade_primrage = \"primrage\"\r\narcade_prmrsocj = \"prmrsocr\"\r\narcade_prmrsocr = \"prmrsocr\"\r\narcade_prmtmfgo = \"trstar\"\r\narcade_prmtmfgt = \"trstar\"\r\narcade_prmtmfgto = \"trstar\"\r\narcade_profpac = \"profpac\"\r\narcade_progear = \"progear\"\r\narcade_progeara = \"progear\"\r\narcade_progearj = \"progear\"\r\narcade_progearjbl = \"progear\"\r\narcade_progearjd = \"progear\"\r\narcade_progearud = \"progear\"\r\narcade_progolf = \"progolf\"\r\narcade_progolfa = \"progolf\"\r\narcade_progress = \"progress\"\r\narcade_propcycl = \"propcycl\"\r\narcade_prosoccr = \"prosoccr\"\r\narcade_prosport = \"prosport\"\r\narcade_prtytime = \"prtytime\"\r\narcade_psailor1 = \"psailor1\"\r\narcade_psailor2 = \"psailor2\"\r\narcade_psoldier = \"ssoldier\"\r\narcade_pspikes = \"pspikes\"\r\narcade_pspikes2 = \"pspikes2\"\r\narcade_pspikesk = \"pspikes\"\r\narcade_pspikesu = \"pspikes\"\r\narcade_pstadium = \"pstadium\"\r\narcade_psurge = \"psurge\"\r\narcade_psychic5 = \"psychic5\"\r\narcade_psychic5j = \"psychic5\"\r\narcade_psychos = \"psychos\"\r\narcade_psychosj = \"psychos\"\r\narcade_psyforce = \"psyforce\"\r\narcade_ptblank = \"ptblank\"\r\narcade_pturn = \"pturn\"\r\narcade_puchicar = \"puchicar\"\r\narcade_puchicarj = \"puchicar\"\r\narcade_puckman = \"puckman\"\r\narcade_puckmana = \"puckman\"\r\narcade_puckmanb = \"puckman\"\r\narcade_puckmanf = \"puckman\"\r\narcade_puckmanh = \"puckman\"\r\narcade_puckmod = \"puckman\"\r\narcade_puckpkmn = \"puckpkmn\"\r\narcade_pulirula = \"pulirula\"\r\narcade_pulirulaj = \"pulirula\"\r\narcade_pulirulj = \"pulirula\"\r\narcade_pulsar = \"pulsar\"\r\narcade_pulstar = \"pulstar\"\r\narcade_punchita = \"punchout\"\r\narcade_punchout = \"punchout\"\r\narcade_punchouta = \"punchout\"\r\narcade_punchoutj = \"punchout\"\r\narcade_punipic = \"punisher\"\r\narcade_punipic2 = \"punisher\"\r\narcade_punipic3 = \"punisher\"\r\narcade_punisher = \"punisher\"\r\narcade_punisherb = \"punisher\"\r\narcade_punisherbz = \"punisher\"\r\narcade_punisherh = \"punisher\"\r\narcade_punisherj = \"punisher\"\r\narcade_punisheru = \"punisher\"\r\narcade_punishrj = \"punisher\"\r\narcade_punishru = \"punisher\"\r\narcade_punkshot = \"punkshot\"\r\narcade_punkshot2 = \"punkshot\"\r\narcade_punkshotj = \"punkshot\"\r\narcade_punksht2 = \"punkshot\"\r\narcade_punkshtj = \"punkshot\"\r\narcade_pururun = \"pururun\"\r\narcade_pushman = \"pushman\"\r\narcade_pushmana = \"pushman\"\r\narcade_pushmans = \"pushman\"\r\narcade_puyopuy2 = \"puyopuy2\"\r\narcade_puyopuya = \"puyopuyo\"\r\narcade_puyopuyb = \"puyopuyo\"\r\narcade_puyopuyo = \"puyopuyo\"\r\narcade_puyosun = \"puyosun\"\r\narcade_puzlclub = \"puzlclub\"\r\narcade_puzldama = \"puzldama\"\r\narcade_puzloopj = \"puzzloop\"\r\narcade_puzloopu = \"puzzloop\"\r\narcade_puzlstar = \"puzlstar\"\r\narcade_puzzldpr = \"puzzledp\"\r\narcade_puzzledp = \"puzzledp\"\r\narcade_puzzli = \"puzzli\"\r\narcade_puzzli2 = \"puzzli2\"\r\narcade_puzzli2s = \"puzzli2\"\r\narcade_puzzloop = \"puzzloop\"\r\narcade_puzzloopa = \"puzzloop\"\r\narcade_puzzloope = \"puzzloop\"\r\narcade_puzzloopj = \"puzzloop\"\r\narcade_puzzloopk = \"puzzloop\"\r\narcade_puzzloopu = \"puzzloop\"\r\narcade_puzzlove = \"puzzlove\"\r\narcade_puzzlovek = \"puzzlove\"\r\narcade_puzznic = \"puzznic\"\r\narcade_puzznicb = \"puzznic\"\r\narcade_puzznicba = \"puzznic\"\r\narcade_puzznici = \"puzznic\"\r\narcade_puzznicj = \"puzznic\"\r\narcade_puzznicu = \"puzznic\"\r\narcade_pwheelsj = \"dblaxle\"\r\narcade_pwrgoal = \"pwrgoal\"\r\narcade_pwrinst2 = \"pwrinst2\"\r\narcade_pwrinst2j = \"pwrinst2\"\r\narcade_py2k2 = \"py2k2\"\r\narcade_pyros = \"wardner\"\r\narcade_pzlbowl = \"pzlbowl\"\r\narcade_pzlbreak = \"pzlbreak\"\r\narcade_pzloop2 = \"pzloop2\"\r\narcade_pzloop2j = \"pzloop2\"\r\narcade_pzloop2jr1 = \"pzloop2\"\r\narcade_qad = \"qad\"\r\narcade_qadj = \"qad\"\r\narcade_qadjr = \"qad\"\r\narcade_qbert = \"qbert\"\r\narcade_qberta = \"qbert\"\r\narcade_qbertj = \"qbert\"\r\narcade_qbertjp = \"qbert\"\r\narcade_qbertqub = \"qbertqub\"\r\narcade_qberttst = \"qbert\"\r\narcade_qcrayon = \"qcrayon\"\r\narcade_qcrayon2 = \"qcrayon2\"\r\narcade_qgakumon = \"qgakumon\"\r\narcade_qgh = \"qgh\"\r\narcade_qix = \"qix\"\r\narcade_qix2 = \"qix\"\r\narcade_qixa = \"qix\"\r\narcade_qixb = \"qix\"\r\narcade_qjinsei = \"qjinsei\"\r\narcade_qmhayaku = \"qmhayaku\"\r\narcade_qndream = \"qndream\"\r\narcade_qrouka = \"qrouka\"\r\narcade_qsangoku = \"qsangoku\"\r\narcade_qsww = \"qsww\"\r\narcade_qtheater = \"qtheater\"\r\narcade_qtono1 = \"qtono1\"\r\narcade_qtono2 = \"qtono2\"\r\narcade_qtono2j = \"qtono2j\"\r\narcade_qtorimon = \"qtorimon\"\r\narcade_quantum = \"quantum\"\r\narcade_quantum1 = \"quantum\"\r\narcade_quantump = \"quantum\"\r\narcade_quarterb = \"quarterb\"\r\narcade_quartet = \"quartet\"\r\narcade_quartet2 = \"quartet\"\r\narcade_quartet2a = \"quartet\"\r\narcade_quarteta = \"quartet\"\r\narcade_quartetj = \"quartet\"\r\narcade_quarth = \"blockhl\"\r\narcade_quartrba = \"quarterb\"\r\narcade_quartt2j = \"quartet\"\r\narcade_quester = \"quester\"\r\narcade_questers = \"quester\"\r\narcade_quiz18k = \"quiz18k\"\r\narcade_quiz365 = \"quiz365\"\r\narcade_quizchq = \"quizchq\"\r\narcade_quizchql = \"quizchq\"\r\narcade_quizdai2 = \"quizdai2\"\r\narcade_quizdais = \"quizdais\"\r\narcade_quizdaisk = \"quizdais\"\r\narcade_quizdna = \"quizdna\"\r\narcade_quizf1 = \"quizf1\"\r\narcade_quizhq = \"quizhq\"\r\narcade_quizhuhu = \"quizhuhu\"\r\narcade_quizkof = \"quizkof\"\r\narcade_quizkofk = \"quizkof\"\r\narcade_quizmeku = \"quizmeku\"\r\narcade_quizmoon = \"quizmoon\"\r\narcade_quizo = \"quizo\"\r\narcade_quizoa = \"quizo\"\r\narcade_quizpani = \"quizpani\"\r\narcade_quiztou = \"quiztou\"\r\narcade_quiztvqq = \"quiztvqq\"\r\narcade_qwak = \"qwak\"\r\narcade_qzchikyu = \"qzchikyu\"\r\narcade_qzkklgy2 = \"qzkklgy2\"\r\narcade_qzkklogy = \"qzkklogy\"\r\narcade_qzquest = \"qzquest\"\r\narcade_qzshowby = \"qzshowby\"\r\narcade_r2dtank = \"r2dtank\"\r\narcade_r2dx_v33 = \"r2dx_v33\"\r\narcade_r2dx_v33_r2 = \"r2dx_v33\"\r\narcade_rabbit = \"rabbit\"\r\narcade_rabiolep = \"rabiolep\"\r\narcade_racedcb4 = \"racedriv\"\r\narcade_racedcg4 = \"racedriv\"\r\narcade_racedrb1 = \"racedriv\"\r\narcade_racedrb4 = \"racedriv\"\r\narcade_racedrc1 = \"racedriv\"\r\narcade_racedrc2 = \"racedriv\"\r\narcade_racedrc4 = \"racedriv\"\r\narcade_racedrcb = \"racedriv\"\r\narcade_racedrcg = \"racedriv\"\r\narcade_racedrg1 = \"racedriv\"\r\narcade_racedrg4 = \"racedriv\"\r\narcade_racedriv = \"racedriv\"\r\narcade_racedrv1 = \"racedriv\"\r\narcade_racedrv2 = \"racedriv\"\r\narcade_racedrv3 = \"racedriv\"\r\narcade_racedrv4 = \"racedriv\"\r\narcade_racedrvb = \"racedriv\"\r\narcade_racedrvc = \"racedriv\"\r\narcade_racedrvg = \"racedriv\"\r\narcade_rachero = \"rachero\"\r\narcade_racherod = \"rachero\"\r\narcade_racinfrc = \"racinfrc\"\r\narcade_racingb = \"racingb\"\r\narcade_racingbj = \"racingb\"\r\narcade_rackemup = \"rackemup\"\r\narcade_racknrol = \"racknrol\"\r\narcade_racoon = \"racoon\"\r\narcade_radarscp = \"radarscp\"\r\narcade_radarscp1 = \"radarscp\"\r\narcade_radarzn1 = \"radarzon\"\r\narcade_radarznt = \"radarzon\"\r\narcade_radarzon = \"radarzon\"\r\narcade_radm = \"radm\"\r\narcade_radr = \"radr\"\r\narcade_radrad = \"radrad\"\r\narcade_radradj = \"radrad\"\r\narcade_raflesia = \"raflesia\"\r\narcade_ragnagrd = \"ragnagrd\"\r\narcade_ragtime = \"boogwing\"\r\narcade_ragtimea = \"boogwing\"\r\narcade_raiden = \"raiden\"\r\narcade_raiden2 = \"raiden2\"\r\narcade_raiden2dx = \"raiden2\"\r\narcade_raiden2e = \"raiden2\"\r\narcade_raiden2ea = \"raiden2\"\r\narcade_raiden2eg = \"raiden2\"\r\narcade_raiden2eu = \"raiden2\"\r\narcade_raiden2eua = \"raiden2\"\r\narcade_raiden2f = \"raiden2\"\r\narcade_raiden2g = \"raiden2\"\r\narcade_raiden2hk = \"raiden2\"\r\narcade_raiden2i = \"raiden2\"\r\narcade_raiden2j = \"raiden2\"\r\narcade_raiden2nl = \"raiden2\"\r\narcade_raiden2sw = \"raiden2\"\r\narcade_raiden2u = \"raiden2\"\r\narcade_raidena = \"raiden\"\r\narcade_raidenb = \"raiden\"\r\narcade_raidendx = \"raidendx\"\r\narcade_raidendxa1 = \"raidendx\"\r\narcade_raidendxa2 = \"raidendx\"\r\narcade_raidendxch = \"raidendx\"\r\narcade_raidendxg = \"raidendx\"\r\narcade_raidendxj = \"raidendx\"\r\narcade_raidendxk = \"raidendx\"\r\narcade_raidendxnl = \"raidendx\"\r\narcade_raidendxu = \"raidendx\"\r\narcade_raidenk = \"raiden\"\r\narcade_raidenkb = \"raiden\"\r\narcade_raident = \"raiden\"\r\narcade_raidenu = \"raiden\"\r\narcade_raidenua = \"raiden\"\r\narcade_raiders5 = \"raiders5\"\r\narcade_raiders5t = \"raiders5\"\r\narcade_raidrs5t = \"raiders5\"\r\narcade_raiga = \"stratof\"\r\narcade_raimais = \"raimais\"\r\narcade_raimaisj = \"raimais\"\r\narcade_raimaisjo = \"raimais\"\r\narcade_rainbow = \"rainbow\"\r\narcade_rainbowe = \"rainbow\"\r\narcade_rainbowo = \"rainbow\"\r\narcade_rallybik = \"rallybik\"\r\narcade_rallys = \"spectar\"\r\narcade_rallyx = \"rallyx\"\r\narcade_rallyxa = \"rallyx\"\r\narcade_rallyxm = \"rallyx\"\r\narcade_rallyxmr = \"rallyx\"\r\narcade_rambo3 = \"rambo3\"\r\narcade_rambo3a = \"rambo3\"\r\narcade_rambo3ae = \"rambo3\"\r\narcade_rambo3p = \"rambo3\"\r\narcade_rambo3u = \"rambo3\"\r\narcade_rampage = \"rampage\"\r\narcade_rampage2 = \"rampage\"\r\narcade_rampart = \"rampart\"\r\narcade_rampartj = \"rampart\"\r\narcade_ramprt2p = \"rampart\"\r\narcade_raphero = \"arcadian\"\r\narcade_rascot = \"rascot\"\r\narcade_rastan = \"rastan\"\r\narcade_rastana = \"rastan\"\r\narcade_rastanb = \"rastan\"\r\narcade_rastanu = \"rastan\"\r\narcade_rastanu2 = \"rastan\"\r\narcade_rastanua = \"rastan\"\r\narcade_rastanub = \"rastan\"\r\narcade_rastsag2 = \"nastar\"\r\narcade_rastsaga = \"rastan\"\r\narcade_rastsagaa = \"rastan\"\r\narcade_rastsagab = \"rastan\"\r\narcade_raveracw = \"raveracw\"\r\narcade_rayforce = \"gunlock\"\r\narcade_rayforcej = \"gunlock\"\r\narcade_rayforcj = \"gunlock\"\r\narcade_raystorm = \"raystorm\"\r\narcade_razmataz = \"razmataz\"\r\narcade_rbff1 = \"rbff1\"\r\narcade_rbff1a = \"rbff1\"\r\narcade_rbff1k = \"rbff1\"\r\narcade_rbff2 = \"rbff2\"\r\narcade_rbff2a = \"rbff2\"\r\narcade_rbff2h = \"rbff2\"\r\narcade_rbff2k = \"rbff2\"\r\narcade_rbffspec = \"rbffspec\"\r\narcade_rbffspeck = \"rbffspec\"\r\narcade_rbibb = \"rbibb\"\r\narcade_rbibba = \"rbibb\"\r\narcade_rbisland = \"rbisland\"\r\narcade_rbislande = \"rbislande\"\r\narcade_rbislando = \"rbisland\"\r\narcade_rbtapper = \"tapper\"\r\narcade_rchase = \"rchase\"\r\narcade_rchasej = \"rchase\"\r\narcade_rckman2j = \"megaman2\"\r\narcade_rdaction = \"ninjakd2\"\r\narcade_reactor = \"reactor\"\r\narcade_reaktor = \"reaktor\"\r\narcade_realbrk = \"realbrk\"\r\narcade_recalh = \"recalh\"\r\narcade_recordbr = \"recordbr\"\r\narcade_redalert = \"redalert\"\r\narcade_redbaron = \"redbaron\"\r\narcade_redclash = \"redclash\"\r\narcade_redclask = \"redclash\"\r\narcade_redearth = \"redearth\"\r\narcade_redearthr1 = \"redearth\"\r\narcade_redfoxwp2 = \"grdnstrm\"\r\narcade_redfoxwp2a = \"grdnstrm\"\r\narcade_redhawk = \"stagger1\"\r\narcade_redhawkb = \"stagger1\"\r\narcade_redhawke = \"stagger1\"\r\narcade_redhawkg = \"stagger1\"\r\narcade_redhawki = \"stagger1\"\r\narcade_redhawkk = \"stagger1\"\r\narcade_redlin2p = \"redlin2p\"\r\narcade_redrobin = \"redrobin\"\r\narcade_redufo = \"redufo\"\r\narcade_redufob = \"redufo\"\r\narcade_regulus = \"regulus\"\r\narcade_reguluso = \"regulus\"\r\narcade_regulusu = \"regulus\"\r\narcade_reikaids = \"reikaids\"\r\narcade_relief = \"relief\"\r\narcade_relief2 = \"relief\"\r\narcade_renaiclb = \"renaiclb\"\r\narcade_renegade = \"renegade\"\r\narcade_repulse = \"repulse\"\r\narcade_rescraid = \"rescraid\"\r\narcade_rescrdsa = \"rescraid\"\r\narcade_rescue = \"rescue\"\r\narcade_retofin1 = \"retofinv\"\r\narcade_retofin2 = \"retofinv\"\r\narcade_retofinv = \"retofinv\"\r\narcade_retofinvb = \"retofinv\"\r\narcade_retofinvb1 = \"retofinv\"\r\narcade_retofinvb2 = \"retofinv\"\r\narcade_retofinvb3 = \"retofinv\"\r\narcade_revenger = \"revngr84\"\r\narcade_revngr84 = \"revngr84\"\r\narcade_revx = \"revx\"\r\narcade_rezon = \"rezon\"\r\narcade_rezont = \"rezon\"\r\narcade_rf2 = \"konamigt\"\r\narcade_ribbit = \"ribbit\"\r\narcade_ridefgtj = \"ridingf\"\r\narcade_ridefgtu = \"ridingf\"\r\narcade_ridger2j = \"ridger2j\"\r\narcade_ridgeraj = \"ridgeraj\"\r\narcade_ridhero = \"ridhero\"\r\narcade_ridheroh = \"ridhero\"\r\narcade_ridingf = \"ridingf\"\r\narcade_ridingfj = \"ridingf\"\r\narcade_ridingfu = \"ridingf\"\r\narcade_ridleofp = \"ridleofp\"\r\narcade_rimrck12 = \"rimrockn\"\r\narcade_rimrck16 = \"rimrockn\"\r\narcade_rimrck20 = \"rimrockn\"\r\narcade_rimrockn = \"rimrockn\"\r\narcade_ringdest = \"ringdest\"\r\narcade_ringdesta = \"ringdest\"\r\narcade_ringdesth = \"ringdest\"\r\narcade_ringdstd = \"ringdest\"\r\narcade_ringfgt = \"vsgongf\"\r\narcade_ringfgt2 = \"vsgongf\"\r\narcade_ringkin2 = \"kingofb\"\r\narcade_ringkin3 = \"kingofb\"\r\narcade_ringking = \"kingofb\"\r\narcade_ringohja = \"mainevt\"\r\narcade_ringrage = \"ringrage\"\r\narcade_ringragej = \"ringrage\"\r\narcade_ringrageu = \"ringrage\"\r\narcade_ringragj = \"ringrage\"\r\narcade_ringragu = \"ringrage\"\r\narcade_riot = \"riot\"\r\narcade_riotcity = \"riotcity\"\r\narcade_ripcord = \"ripcord\"\r\narcade_ripoff = \"ripoff\"\r\narcade_riskchal = \"riskchal\"\r\narcade_rittam = \"rodland\"\r\narcade_rjammer = \"rjammer\"\r\narcade_rmancp2j = \"megaman\"\r\narcade_rmhaihai = \"rmhaihai\"\r\narcade_rmhaihib = \"rmhaihai\"\r\narcade_rmhaijin = \"rmhaijin\"\r\narcade_rmhaisei = \"rmhaisei\"\r\narcade_rmpgwt = \"rmpgwt\"\r\narcade_rmpgwt11 = \"rmpgwt\"\r\narcade_roadblc1 = \"roadblst\"\r\narcade_roadblcg = \"roadblst\"\r\narcade_roadblg1 = \"roadblst\"\r\narcade_roadblg2 = \"roadblst\"\r\narcade_roadbls1 = \"roadblst\"\r\narcade_roadbls2 = \"roadblst\"\r\narcade_roadbls3 = \"roadblst\"\r\narcade_roadblsc = \"roadblst\"\r\narcade_roadblsg = \"roadblst\"\r\narcade_roadblst = \"roadblst\"\r\narcade_roadf = \"roadf\"\r\narcade_roadf2 = \"roadf\"\r\narcade_roadf3 = \"roadf\"\r\narcade_roadriot = \"roadriot\"\r\narcade_roadrun1 = \"roadrunn\"\r\narcade_roadrun2 = \"roadrunn\"\r\narcade_roadrunn = \"roadrunn\"\r\narcade_robby = \"robby\"\r\narcade_roboarma = \"roboarmy\"\r\narcade_roboarmy = \"roboarmy\"\r\narcade_robocop = \"robocop\"\r\narcade_robocop2 = \"robocop2\"\r\narcade_robocop2j = \"robocop2\"\r\narcade_robocop2u = \"robocop2\"\r\narcade_robocop2ua = \"robocop2\"\r\narcade_robocopb = \"robocop\"\r\narcade_robocopb2 = \"robocop\"\r\narcade_robocopi = \"robocopi\"\r\narcade_robocopj = \"robocop\"\r\narcade_robocopu = \"robocop\"\r\narcade_robocopu0 = \"robocop\"\r\narcade_robocopw = \"robocop\"\r\narcade_robocp2j = \"robocop2\"\r\narcade_robocp2u = \"robocop2\"\r\narcade_robocpu0 = \"robocop\"\r\narcade_robokid = \"robokid\"\r\narcade_robokidj = \"robokid\"\r\narcade_robokidj2 = \"robokid\"\r\narcade_robokidj3 = \"robokid\"\r\narcade_robotbwl = \"robotbwl\"\r\narcade_robotron = \"robotron\"\r\narcade_robotryo = \"robotron\"\r\narcade_robowres = \"robowres\"\r\narcade_rockclim = \"rockclim\"\r\narcade_rockduck = \"rockduck\"\r\narcade_rockman2j = \"megaman2\"\r\narcade_rockmanj = \"megaman\"\r\narcade_rockn = \"rockn\"\r\narcade_rockn2 = \"rockn2\"\r\narcade_rockn3 = \"rockn3\"\r\narcade_rockn4 = \"rockn4\"\r\narcade_rockna = \"rockn\"\r\narcade_rockrage = \"rockrage\"\r\narcade_rockragea = \"rockrage\"\r\narcade_rockragej = \"rockrage\"\r\narcade_rockragj = \"rockrage\"\r\narcade_rocktris = \"rocktris\"\r\narcade_rocktrv2 = \"rocktrv2\"\r\narcade_rocnrope = \"rocnrope\"\r\narcade_rocnropek = \"rocnrope\"\r\narcade_rocnropk = \"rocnrope\"\r\narcade_rodland = \"rodland\"\r\narcade_rodlanda = \"rodland\"\r\narcade_rodlandj = \"rodland\"\r\narcade_rodlandjb = \"rodland\"\r\narcade_rodlndjb = \"rodland\"\r\narcade_rohga = \"rohga\"\r\narcade_rohga1 = \"rohga\"\r\narcade_rohga2 = \"rohga\"\r\narcade_rohgah = \"rohga\"\r\narcade_rohgau = \"rohga\"\r\narcade_roishtar = \"roishtar\"\r\narcade_rolcrush = \"rolcrush\"\r\narcade_rolcrusha = \"rolcrush\"\r\narcade_roldfrga = \"roldfrog\"\r\narcade_roldfrog = \"roldfrog\"\r\narcade_rollace = \"fightrol\"\r\narcade_rollace2 = \"fightrol\"\r\narcade_rollerg = \"rollerg\"\r\narcade_rollergj = \"rollerg\"\r\narcade_rollingc = \"rollingc\"\r\narcade_rompers = \"rompers\"\r\narcade_romperso = \"rompers\"\r\narcade_rongrong = \"rongrong\"\r\narcade_ropeman = \"rocnrope\"\r\narcade_rotaryf = \"rotaryf\"\r\narcade_rotd = \"rotd\"\r\narcade_rotdh = \"rotd\"\r\narcade_rougien = \"rougien\"\r\narcade_roundup = \"roundup\"\r\narcade_route16 = \"route16\"\r\narcade_route16a = \"route16\"\r\narcade_route16b = \"route16\"\r\narcade_route16bl = \"route16\"\r\narcade_route16c = \"route16\"\r\narcade_routex = \"route16\"\r\narcade_royalmah = \"royalmah\"\r\narcade_rpatrol = \"rpatrol\"\r\narcade_rpatrolb = \"rpatrol\"\r\narcade_rpunch = \"rabiolep\"\r\narcade_rranger = \"rranger\"\r\narcade_rrreveng = \"rrreveng\"\r\narcade_rrrevenp = \"rrreveng\"\r\narcade_rsgun = \"rsgun\"\r\narcade_rshark = \"rshark\"\r\narcade_rthun2 = \"rthun2\"\r\narcade_rthun2j = \"rthun2\"\r\narcade_rthunder = \"rthunder\"\r\narcade_rthunder0 = \"rthunder\"\r\narcade_rthunder1 = \"rthunder\"\r\narcade_rthunder2 = \"rthunder\"\r\narcade_rthundera = \"rthunder\"\r\narcade_rthundro = \"rthunder\"\r\narcade_rtriv = \"rtriv\"\r\narcade_rtype = \"rtype\"\r\narcade_rtype2 = \"rtype2\"\r\narcade_rtype2j = \"rtype2\"\r\narcade_rtype2jc = \"rtype2\"\r\narcade_rtypeb = \"rtype\"\r\narcade_rtypej = \"rtype\"\r\narcade_rtypejp = \"rtype\"\r\narcade_rtypelej = \"rtypeleo\"\r\narcade_rtypeleo = \"rtypeleo\"\r\narcade_rtypeleoj = \"rtypeleo\"\r\narcade_rtypepj = \"rtype\"\r\narcade_rtypeu = \"rtype\"\r\narcade_rugrats = \"wiping\"\r\narcade_rumba = \"rumba\"\r\narcade_runark = \"growl\"\r\narcade_runaway = \"runaway\"\r\narcade_rundeep = \"thedeep\"\r\narcade_rungun = \"rungun\"\r\narcade_rungun2 = \"rungun2\"\r\narcade_rungunu = \"rungun\"\r\narcade_rushatck = \"gberet\"\r\narcade_rushcrsh = \"srumbler\"\r\narcade_rushhero = \"rushhero\"\r\narcade_rvschool = \"rvschool\"\r\narcade_rygar = \"rygar\"\r\narcade_rygar2 = \"rygar\"\r\narcade_rygar3 = \"rygar\"\r\narcade_rygarb = \"rygar\"\r\narcade_rygarj = \"rygar\"\r\narcade_ryorioh = \"ryorioh\"\r\narcade_ryouran = \"ryouran\"\r\narcade_ryujin = \"ryujin\"\r\narcade_ryukendn = \"shadoww\"\r\narcade_ryukendna = \"shadoww\"\r\narcade_ryukyu = \"ryukyu\"\r\narcade_ryukyud = \"ryukyu\"\r\narcade_s1945 = \"s1945\"\r\narcade_s1945a = \"s1945\"\r\narcade_s1945ii = \"s1945ii\"\r\narcade_s1945iii = \"s1945iii\"\r\narcade_s1945j = \"s1945\"\r\narcade_s1945jn = \"s1945\"\r\narcade_s1945k = \"s1945\"\r\narcade_s1945p = \"s1945p\"\r\narcade_sabotenb = \"sabotenb\"\r\narcade_sabotenba = \"sabotenb\"\r\narcade_sabotnba = \"sabotenb\"\r\narcade_sadari = \"sadari\"\r\narcade_safari = \"safari\"\r\narcade_safaria = \"safari\"\r\narcade_safarir = \"safarir\"\r\narcade_safarirj = \"safarir\"\r\narcade_sailormn = \"sailormn\"\r\narcade_sailormnh = \"sailormn\"\r\narcade_sailormnj = \"sailormn\"\r\narcade_sailormnk = \"sailormn\"\r\narcade_sailormnn = \"sailormn\"\r\narcade_sailormnnh = \"sailormn\"\r\narcade_sailormnnj = \"sailormn\"\r\narcade_sailormnnk = \"sailormn\"\r\narcade_sailormnnt = \"sailormn\"\r\narcade_sailormnnu = \"sailormn\"\r\narcade_sailormno = \"sailormn\"\r\narcade_sailormnoh = \"sailormn\"\r\narcade_sailormnoj = \"sailormn\"\r\narcade_sailormnok = \"sailormn\"\r\narcade_sailormnot = \"sailormn\"\r\narcade_sailormnou = \"sailormn\"\r\narcade_sailormnt = \"sailormn\"\r\narcade_sailormnu = \"sailormn\"\r\narcade_sailormo = \"sailormn\"\r\narcade_sailorwr = \"sailorws\"\r\narcade_sailorws = \"sailorws\"\r\narcade_saiyugb1 = \"chinagat\"\r\narcade_saiyugb2 = \"chinagat\"\r\narcade_saiyugou = \"chinagat\"\r\narcade_saiyugoub1 = \"chinagat\"\r\narcade_saiyugoub2 = \"chinagat\"\r\narcade_salamand = \"salamand\"\r\narcade_salamandj = \"salamand\"\r\narcade_salamanj = \"salamand\"\r\narcade_salmndr2 = \"salmndr2\"\r\narcade_samesam2 = \"fireshrk\"\r\narcade_samesame = \"fireshrk\"\r\narcade_samesame2 = \"fireshrk\"\r\narcade_samesamenh = \"fireshrk\"\r\narcade_samsh5sp = \"samsh5sp\"\r\narcade_samsh5sph = \"samsh5sp\"\r\narcade_samsh5spho = \"samsh5sp\"\r\narcade_samsho = \"samsho\"\r\narcade_samsho2 = \"samsho2\"\r\narcade_samsho2k = \"samsho2\"\r\narcade_samsho2ka = \"samsho2\"\r\narcade_samsho3 = \"samsho3\"\r\narcade_samsho3h = \"samsho3\"\r\narcade_samsho4 = \"samsho4\"\r\narcade_samsho4k = \"samsho4\"\r\narcade_samsho5 = \"samsho5\"\r\narcade_samsho5a = \"samsho5\"\r\narcade_samsho5b = \"samsho5\"\r\narcade_samsho5h = \"samsho5\"\r\narcade_samsho5x = \"samsho5\"\r\narcade_samshoa = \"samsho\"\r\narcade_samshoh = \"samsho\"\r\narcade_samurai = \"samurai\"\r\narcade_samuraia = \"samuraia\"\r\narcade_sandor = \"sandor\"\r\narcade_sandscrp = \"sandscrp\"\r\narcade_sandscrpa = \"sandscrp\"\r\narcade_sandscrpb = \"sandscrp\"\r\narcade_sarge = \"sarge\"\r\narcade_sarukani = \"vblokbrk\"\r\narcade_sassisu = \"sassisu\"\r\narcade_sasuke = \"sasuke\"\r\narcade_satansat = \"satansat\"\r\narcade_satansata = \"satansat\"\r\narcade_satansatind = \"satansat\"\r\narcade_sathena = \"athena\"\r\narcade_saturn = \"saturn\"\r\narcade_saturnzi = \"saturnzi\"\r\narcade_sauro = \"sauro\"\r\narcade_saurob = \"sauro\"\r\narcade_saurop = \"sauro\"\r\narcade_saurorr = \"sauro\"\r\narcade_savagere = \"savagere\"\r\narcade_savgbees = \"exedexes\"\r\narcade_sbagman = \"sbagman\"\r\narcade_sbagmans = \"sbagman\"\r\narcade_sbasebal = \"sbasebal\"\r\narcade_sbasebalj = \"sbasebal\"\r\narcade_sbasketb = \"sbasketb\"\r\narcade_sbaskete = \"sbasketb\"\r\narcade_sbasketg = \"sbasketb\"\r\narcade_sbasketh = \"sbasketb\"\r\narcade_sbasketo = \"sbasketb\"\r\narcade_sbasketu = \"sbasketb\"\r\narcade_sbbros = \"spang\"\r\narcade_sbdk = \"superbik\"\r\narcade_sbishi = \"sbishi\"\r\narcade_sbishik = \"sbishi\"\r\narcade_sbishika = \"sbishi\"\r\narcade_sbm = \"sbm\"\r\narcade_sbmj = \"sbm\"\r\narcade_sboblbob = \"bublbobl\"\r\narcade_sboblbobl = \"bublbobl\"\r\narcade_sboblbobla = \"bublbobl\"\r\narcade_sboblboblb = \"bublbobl\"\r\narcade_sboblboblc = \"bublbobl\"\r\narcade_sboblbobld = \"bublbobl\"\r\narcade_sbomber = \"sbomber\"\r\narcade_sbombera = \"sbomber\"\r\narcade_sbomberb = \"sbomberb\"\r\narcade_sbowling = \"sbowling\"\r\narcade_sbp = \"sbp\"\r\narcade_sbrkout = \"sbrkout\"\r\narcade_sbsgomo = \"bioship\"\r\narcade_sbugger = \"sbugger\"\r\narcade_scandal = \"scandal\"\r\narcade_scandalm = \"scandal\"\r\narcade_scessjoe = \"scessjoe\"\r\narcade_scfinals = \"scfinals\"\r\narcade_scfinalso = \"scfinals\"\r\narcade_schaser = \"schaser\"\r\narcade_schasrcv = \"schaser\"\r\narcade_schmeisr = \"schmeisr\"\r\narcade_sci = \"sci\"\r\narcade_scia = \"sci\"\r\narcade_scij = \"sci\"\r\narcade_scinegro = \"sci\"\r\narcade_scion = \"scion\"\r\narcade_scionc = \"scion\"\r\narcade_sciu = \"sci\"\r\narcade_scobra = \"scobra\"\r\narcade_scobrab = \"scobra\"\r\narcade_scobrae = \"scobra\"\r\narcade_scobrag = \"scobra\"\r\narcade_scobras = \"scobra\"\r\narcade_scobrase = \"scobra\"\r\narcade_scontra = \"scontra\"\r\narcade_scontraj = \"scontra\"\r\narcade_scorpion = \"scorpion\"\r\narcade_scorpiona = \"scorpion\"\r\narcade_scorpionb = \"scorpion\"\r\narcade_scorpionmc = \"scorpion\"\r\narcade_scorpnmc = \"scorpnmc\"\r\narcade_scotrsht = \"scotrsht\"\r\narcade_scramb2 = \"scramble\"\r\narcade_scramblb = \"scramble\"\r\narcade_scramble = \"scramble\"\r\narcade_scramblebb = \"scramble\"\r\narcade_scramblebf = \"scramble\"\r\narcade_scrambler = \"scramble\"\r\narcade_scrambles = \"scramble\"\r\narcade_scrambls = \"scramble\"\r\narcade_scrambp = \"scramble\"\r\narcade_scramce = \"scramble\"\r\narcade_scrampt = \"scramble\"\r\narcade_scramrf = \"scramble\"\r\narcade_scregg = \"scregg\"\r\narcade_screwloo = \"screwloo\"\r\narcade_scross = \"scross\"\r\narcade_sctionza = \"sectionz\"\r\narcade_scudhamm = \"scudhamm\"\r\narcade_sdfight = \"sdfight\"\r\narcade_sdgndmps = \"sdgndmps\"\r\narcade_sdgndmrb = \"sdgndmrb\"\r\narcade_sdi = \"sdi\"\r\narcade_sdia = \"sdi\"\r\narcade_sdib = \"sdi\"\r\narcade_sdibl = \"sdi\"\r\narcade_sdibl2 = \"sdi\"\r\narcade_sdibl3 = \"sdi\"\r\narcade_sdibl4 = \"sdi\"\r\narcade_sdibl5 = \"sdi\"\r\narcade_sdibl6 = \"sdi\"\r\narcade_sdioj = \"sdi\"\r\narcade_sdodgeb = \"sdodgeb\"\r\narcade_sdtennis = \"sdtennis\"\r\narcade_sdungeon = \"sdungeon\"\r\narcade_seabass = \"seabass\"\r\narcade_searchar = \"searchar\"\r\narcade_searcharj = \"searchar\"\r\narcade_searcharu = \"searchar\"\r\narcade_searchey = \"searchey\"\r\narcade_searcheya = \"searchey\"\r\narcade_searchp2 = \"searchp2\"\r\narcade_seawolf = \"seawolf\"\r\narcade_seawolf2 = \"seawolf2\"\r\narcade_secolove = \"secolove\"\r\narcade_secretab = \"slyspy\"\r\narcade_secretag = \"secretag\"\r\narcade_secretagj = \"secretag\"\r\narcade_sectionz = \"sectionz\"\r\narcade_sectionza = \"sectionz\"\r\narcade_sectrzon = \"seicross\"\r\narcade_seganinj = \"seganinj\"\r\narcade_seganinja = \"seganinj\"\r\narcade_seganinju = \"seganinj\"\r\narcade_seganinu = \"seganinj\"\r\narcade_seicross = \"seicross\"\r\narcade_seiha = \"seiha\"\r\narcade_seiham = \"seiha\"\r\narcade_selfeena = \"selfeena\"\r\narcade_semibase = \"semibase\"\r\narcade_sengekij = \"sengekis\"\r\narcade_sengekis = \"sengekis\"\r\narcade_sengekisj = \"sengekis\"\r\narcade_sengokh = \"sengoku\"\r\narcade_sengokmj = \"sengokmj\"\r\narcade_sengoku = \"sengoku\"\r\narcade_sengoku2 = \"sengoku2\"\r\narcade_sengoku3 = \"sengoku3\"\r\narcade_sengoku3s = \"sengoku3\"\r\narcade_sengokuh = \"sengoku\"\r\narcade_senjyo = \"senjyo\"\r\narcade_senknow = \"senknow\"\r\narcade_sentetst = \"sentetst\"\r\narcade_sercharu = \"searchar\"\r\narcade_setaroul = \"setaroul\"\r\narcade_sexyparo = \"sexyparo\"\r\narcade_sf = \"sf\"\r\narcade_sf1 = \"sf1\"\r\narcade_sf1jp = \"sf1\"\r\narcade_sf1p = \"sf1\"\r\narcade_sf1us = \"sf1\"\r\narcade_sf2 = \"sf2\"\r\narcade_sf2acc = \"sf2ce\"\r\narcade_sf2acca = \"sf2ce\"\r\narcade_sf2accp2 = \"sf2ce\"\r\narcade_sf2amf = \"sf2ce\"\r\narcade_sf2amf2 = \"sf2ce\"\r\narcade_sf2amf3 = \"sf2ce\"\r\narcade_sf2amf4 = \"sf2ce\"\r\narcade_sf2amf5 = \"sf2ce\"\r\narcade_sf2amf6 = \"sf2ce\"\r\narcade_sf2amf7 = \"sf2ce\"\r\narcade_sf2amf8 = \"sf2ce\"\r\narcade_sf2b = \"sf2\"\r\narcade_sf2b2 = \"sf2\"\r\narcade_sf2b3 = \"sf2\"\r\narcade_sf2b4 = \"sf2\"\r\narcade_sf2bhh = \"sf2ce\"\r\narcade_sf2ce = \"sf2ce\"\r\narcade_sf2ceb = \"sf2ce\"\r\narcade_sf2cebltw = \"sf2ce\"\r\narcade_sf2cebr = \"sf2ce\"\r\narcade_sf2ceea = \"sf2ce\"\r\narcade_sf2ceeab2 = \"sf2ce\"\r\narcade_sf2ceeab3 = \"sf2ce\"\r\narcade_sf2ceeab4 = \"sf2ce\"\r\narcade_sf2ceeab5 = \"sf2ce\"\r\narcade_sf2ceeabl = \"sf2ce\"\r\narcade_sf2ceh = \"sf2ce\"\r\narcade_sf2cej = \"sf2ce\"\r\narcade_sf2ceja = \"sf2ce\"\r\narcade_sf2cejab2 = \"sf2ce\"\r\narcade_sf2cejabl = \"sf2ce\"\r\narcade_sf2cejb = \"sf2ce\"\r\narcade_sf2cejc = \"sf2ce\"\r\narcade_sf2cet = \"sf2ce\"\r\narcade_sf2ceua = \"sf2ce\"\r\narcade_sf2ceuab10 = \"sf2ce\"\r\narcade_sf2ceuab2 = \"sf2ce\"\r\narcade_sf2ceuab3 = \"sf2ce\"\r\narcade_sf2ceuab4 = \"sf2ce\"\r\narcade_sf2ceuab5 = \"sf2ce\"\r\narcade_sf2ceuab6 = \"sf2ce\"\r\narcade_sf2ceuab7 = \"sf2ce\"\r\narcade_sf2ceuab8 = \"sf2ce\"\r\narcade_sf2ceuab9 = \"sf2ce\"\r\narcade_sf2ceuabl = \"sf2ce\"\r\narcade_sf2ceub = \"sf2ce\"\r\narcade_sf2ceuc = \"sf2ce\"\r\narcade_sf2ceucbl = \"sf2ce\"\r\narcade_sf2ceupl = \"sf2ce\"\r\narcade_sf2dkot2 = \"sf2ce\"\r\narcade_sf2dongb = \"sf2ce\"\r\narcade_sf2eb = \"sf2\"\r\narcade_sf2ebbl = \"sf2\"\r\narcade_sf2ebbl2 = \"sf2\"\r\narcade_sf2ebbl3 = \"sf2\"\r\narcade_sf2ed = \"sf2\"\r\narcade_sf2ee = \"sf2\"\r\narcade_sf2em = \"sf2\"\r\narcade_sf2hf = \"sf2hf\"\r\narcade_sf2hfj = \"sf2hf\"\r\narcade_sf2hfjb = \"sf2hf\"\r\narcade_sf2hfjb2 = \"sf2hf\"\r\narcade_sf2hfu = \"sf2hf\"\r\narcade_sf2hfub = \"sf2hf\"\r\narcade_sf2j = \"sf2\"\r\narcade_sf2j17 = \"sf2\"\r\narcade_sf2ja = \"sf2\"\r\narcade_sf2jc = \"sf2\"\r\narcade_sf2jf = \"sf2\"\r\narcade_sf2jh = \"sf2\"\r\narcade_sf2jl = \"sf2\"\r\narcade_sf2jla = \"sf2\"\r\narcade_sf2koryu = \"sf2ce\"\r\narcade_sf2koryu2 = \"sf2ce\"\r\narcade_sf2koryu3 = \"sf2ce\"\r\narcade_sf2level = \"sf2ce\"\r\narcade_sf2m1 = \"sf2ce\"\r\narcade_sf2m2 = \"sf2ce\"\r\narcade_sf2m3 = \"sf2ce\"\r\narcade_sf2m4 = \"sf2ce\"\r\narcade_sf2m5 = \"sf2ce\"\r\narcade_sf2m6 = \"sf2ce\"\r\narcade_sf2m7 = \"sf2ce\"\r\narcade_sf2md = \"sf2ce\"\r\narcade_sf2mdt = \"sf2ce\"\r\narcade_sf2mdta = \"sf2ce\"\r\narcade_sf2mdtb = \"sf2ce\"\r\narcade_sf2mdtc = \"sf2ce\"\r\narcade_sf2mega = \"sf2ce\"\r\narcade_sf2mega2 = \"sf2ce\"\r\narcade_sf2qp1 = \"sf2\"\r\narcade_sf2qp2 = \"sf2\"\r\narcade_sf2rb = \"sf2ce\"\r\narcade_sf2rb2 = \"sf2ce\"\r\narcade_sf2rb3 = \"sf2ce\"\r\narcade_sf2rb4 = \"sf2ce\"\r\narcade_sf2rb5 = \"sf2ce\"\r\narcade_sf2rb6 = \"sf2ce\"\r\narcade_sf2red = \"sf2ce\"\r\narcade_sf2red2 = \"sf2ce\"\r\narcade_sf2rules = \"sf2\"\r\narcade_sf2sl73a = \"sf2ce\"\r\narcade_sf2stt = \"sf2\"\r\narcade_sf2t = \"sf2ce\"\r\narcade_sf2thndr = \"sf2\"\r\narcade_sf2thndr2 = \"sf2\"\r\narcade_sf2tj = \"sf2ce\"\r\narcade_sf2tlona = \"sf2ce\"\r\narcade_sf2tlonb = \"sf2ce\"\r\narcade_sf2tlonc = \"sf2ce\"\r\narcade_sf2ua = \"sf2\"\r\narcade_sf2ub = \"sf2\"\r\narcade_sf2uc = \"sf2\"\r\narcade_sf2ud = \"sf2\"\r\narcade_sf2ue = \"sf2\"\r\narcade_sf2uf = \"sf2\"\r\narcade_sf2ug = \"sf2\"\r\narcade_sf2ui = \"sf2\"\r\narcade_sf2uk = \"sf2\"\r\narcade_sf2v004 = \"sf2ce\"\r\narcade_sf2v0042 = \"sf2ce\"\r\narcade_sf2v0043 = \"sf2ce\"\r\narcade_sf2yyc = \"sf2ce\"\r\narcade_sf2yyc2 = \"sf2ce\"\r\narcade_sfa = \"sfa\"\r\narcade_sfa2 = \"sfa2\"\r\narcade_sfa2u = \"sfa2\"\r\narcade_sfa2ur1 = \"sfa2\"\r\narcade_sfa3 = \"sfa3\"\r\narcade_sfa3b = \"sfa3\"\r\narcade_sfa3h = \"sfa3\"\r\narcade_sfa3hr1 = \"sfa3\"\r\narcade_sfa3r1 = \"sfa3\"\r\narcade_sfa3u = \"sfa3\"\r\narcade_sfa3ud = \"sfa3\"\r\narcade_sfa3ur1 = \"sfa3\"\r\narcade_sfa3us = \"sfa3\"\r\narcade_sfach = \"sfzch\"\r\narcade_sfad = \"sfa\"\r\narcade_sfan = \"sf\"\r\narcade_sfar1 = \"sfa\"\r\narcade_sfar2 = \"sfa\"\r\narcade_sfar3 = \"sfa\"\r\narcade_sfau = \"sfa\"\r\narcade_sfaud = \"sfa\"\r\narcade_sfchamp = \"sfchamp\"\r\narcade_sfeverbw = \"spacefev\"\r\narcade_sfex = \"sfex\"\r\narcade_sfex2 = \"sfex2\"\r\narcade_sfex2p = \"sfex2\"\r\narcade_sfexj = \"sfex\"\r\narcade_sfexp = \"sfexp\"\r\narcade_sfexpj = \"sfexp\"\r\narcade_sfiii = \"sfiii\"\r\narcade_sfiii2 = \"sfiii2\"\r\narcade_sfiii2j = \"sfiii2\"\r\narcade_sfiii2n = \"sfiii2\"\r\narcade_sfiii3 = \"sfiii3\"\r\narcade_sfiii3j = \"sfiii3\"\r\narcade_sfiii3jr1 = \"sfiii3\"\r\narcade_sfiii3n = \"sfiii3\"\r\narcade_sfiii3nr1 = \"sfiii3\"\r\narcade_sfiii3r1 = \"sfiii3\"\r\narcade_sfiii3u = \"sfiii3\"\r\narcade_sfiii3ur1 = \"sfiii3\"\r\narcade_sfiiia = \"sfiii\"\r\narcade_sfiiih = \"sfiii\"\r\narcade_sfiiij = \"sfiii\"\r\narcade_sfiiin = \"sfiii\"\r\narcade_sfiiina = \"sfiii\"\r\narcade_sfiiiu = \"sfiii\"\r\narcade_sfish2 = \"sfish2\"\r\narcade_sfish2j = \"sfish2\"\r\narcade_sfj = \"sf\"\r\narcade_sfjan = \"sf\"\r\narcade_sflush = \"sflush\"\r\narcade_sfootbal = \"sfootbal\"\r\narcade_sformula = \"tail2nos\"\r\narcade_sfp = \"sf\"\r\narcade_sfposeid = \"sfposeid\"\r\narcade_sfrush = \"sfrush\"\r\narcade_sftm = \"sftm\"\r\narcade_sftm110 = \"sftm\"\r\narcade_sftm111 = \"sftm\"\r\narcade_sftmj = \"sftm\"\r\narcade_sfua = \"sf\"\r\narcade_sfw = \"sf\"\r\narcade_sfx = \"sfx\"\r\narcade_sfz2a = \"sfa2\"\r\narcade_sfz2aa = \"sfa2\"\r\narcade_sfz2ab = \"sfa2\"\r\narcade_sfz2ad = \"sfa2\"\r\narcade_sfz2ah = \"sfa2\"\r\narcade_sfz2aj = \"sfa2\"\r\narcade_sfz2al = \"sfz2al\"\r\narcade_sfz2alb = \"sfz2al\"\r\narcade_sfz2ald = \"sfz2al\"\r\narcade_sfz2alh = \"sfz2al\"\r\narcade_sfz2alj = \"sfz2al\"\r\narcade_sfz2b = \"sfa2\"\r\narcade_sfz2br1 = \"sfa2\"\r\narcade_sfz2h = \"sfa2\"\r\narcade_sfz2j = \"sfa2\"\r\narcade_sfz2jd = \"sfa2\"\r\narcade_sfz2jr1 = \"sfa2\"\r\narcade_sfz2n = \"sfa2\"\r\narcade_sfz3a = \"sfa3\"\r\narcade_sfz3ar1 = \"sfa3\"\r\narcade_sfz3j = \"sfa3\"\r\narcade_sfz3jr1 = \"sfa3\"\r\narcade_sfz3jr2 = \"sfa3\"\r\narcade_sfz3jr2d = \"sfa3\"\r\narcade_sfza = \"sfa\"\r\narcade_sfzach = \"sfzch\"\r\narcade_sfzar1 = \"sfa\"\r\narcade_sfzb = \"sfa\"\r\narcade_sfzbch = \"sfzch\"\r\narcade_sfzbr1 = \"sfa\"\r\narcade_sfzch = \"sfzch\"\r\narcade_sfzech = \"sfzch\"\r\narcade_sfzh = \"sfa\"\r\narcade_sfzhch = \"sfzch\"\r\narcade_sfzhr1 = \"sfa\"\r\narcade_sfzj = \"sfa\"\r\narcade_sfzjr1 = \"sfa\"\r\narcade_sfzjr2 = \"sfa\"\r\narcade_sg1k_3ninmj = \"sg1k_mahjong\"\r\narcade_sg1k_3ninmjt = \"sg1k_mahjong\"\r\narcade_sg1k_bankp = \"sg1k_bankp\"\r\narcade_sg1k_bilidada = \"sg1k_bankp\"\r\narcade_sg1k_blckonyx = \"sg1k_blckonyx\"\r\narcade_sg1k_bombjack = \"sg1k_bombjack\"\r\narcade_sg1k_bombjackk1 = \"sg1k_bombjack\"\r\narcade_sg1k_bombjackk2 = \"sg1k_bombjack\"\r\narcade_sg1k_bombjackt1 = \"sg1k_bombjack\"\r\narcade_sg1k_bombjackt2 = \"sg1k_bombjack\"\r\narcade_sg1k_bombmnsp = \"sg1k_bombmnsp\"\r\narcade_sg1k_bordrlin = \"sg1k_bordrlin\"\r\narcade_sg1k_cabkids = \"sg1k_cabkids\"\r\narcade_sg1k_castle = \"sg1k_castle\"\r\narcade_sg1k_castlet = \"sg1k_castle\"\r\narcade_sg1k_chackn = \"sg1k_chackn\"\r\narcade_sg1k_chaldrby = \"sg1k_chaldrby\"\r\narcade_sg1k_chaldrbya = \"sg1k_chaldrby\"\r\narcade_sg1k_chaldrbyb = \"sg1k_chaldrby\"\r\narcade_sg1k_champbas = \"sg1k_champbas\"\r\narcade_sg1k_champbasa = \"sg1k_champbas\"\r\narcade_sg1k_champbast = \"sg1k_champbas\"\r\narcade_sg1k_champbil = \"sg1k_champbil\"\r\narcade_sg1k_champbox = \"sg1k_champbox\"\r\narcade_sg1k_champbox1 = \"sg1k_champbox\"\r\narcade_sg1k_champboxt = \"sg1k_champbox\"\r\narcade_sg1k_champglf = \"sg1k_champglf\"\r\narcade_sg1k_champglf1 = \"sg1k_champglf\"\r\narcade_sg1k_champglfk = \"sg1k_champglf\"\r\narcade_sg1k_champice = \"sg1k_champice\"\r\narcade_sg1k_champicek = \"sg1k_champice\"\r\narcade_sg1k_champicet = \"sg1k_champice\"\r\narcade_sg1k_champken = \"sg1k_champken\"\r\narcade_sg1k_champkent = \"sg1k_champken\"\r\narcade_sg1k_champpwr = \"sg1k_champpwr\"\r\narcade_sg1k_champscr = \"sg1k_champscr\"\r\narcade_sg1k_champscrt = \"sg1k_champscr\"\r\narcade_sg1k_champtns = \"sg1k_champtns\"\r\narcade_sg1k_choplift = \"sg1k_choplift\"\r\narcade_sg1k_chopliftk = \"sg1k_choplift\"\r\narcade_sg1k_chopliftp = \"sg1k_choplift\"\r\narcade_sg1k_chopliftt = \"sg1k_choplift\"\r\narcade_sg1k_circusc = \"sg1k_circusc\"\r\narcade_sg1k_circusck = \"sg1k_circusc\"\r\narcade_sg1k_cloderun = \"sg1k_cloderun\"\r\narcade_sg1k_cloderunt = \"sg1k_cloderun\"\r\narcade_sg1k_congo = \"sg1k_congo\"\r\narcade_sg1k_congoa = \"sg1k_congo\"\r\narcade_sg1k_congob = \"sg1k_congo\"\r\narcade_sg1k_congot = \"sg1k_congo\"\r\narcade_sg1k_cso = \"sg1k_cso\"\r\narcade_sg1k_csot = \"sg1k_cso\"\r\narcade_sg1k_dacike = \"sg1k_dacike\"\r\narcade_sg1k_dayu = \"sg1k_chackn\"\r\narcade_sg1k_dokidoki = \"sg1k_dokidoki\"\r\narcade_sg1k_dragwang = \"sg1k_dragwang\"\r\narcade_sg1k_dragwang1 = \"sg1k_dragwang\"\r\narcade_sg1k_drol = \"sg1k_drol\"\r\narcade_sg1k_drolk = \"sg1k_drol\"\r\narcade_sg1k_drolt = \"sg1k_drol\"\r\narcade_sg1k_elevator = \"sg1k_elevator\"\r\narcade_sg1k_elevatort = \"sg1k_elevator\"\r\narcade_sg1k_exerion = \"sg1k_exerion\"\r\narcade_sg1k_exerionk = \"sg1k_exerion\"\r\narcade_sg1k_exeriont = \"sg1k_exerion\"\r\narcade_sg1k_faguiqib = \"sg1k_pitfall2\"\r\narcade_sg1k_faguiqiba = \"sg1k_pitfall2\"\r\narcade_sg1k_feilang = \"sg1k_choplift\"\r\narcade_sg1k_feilanga = \"sg1k_choplift\"\r\narcade_sg1k_flicky = \"sg1k_flicky\"\r\narcade_sg1k_flickya = \"sg1k_flicky\"\r\narcade_sg1k_flickyt = \"sg1k_flicky\"\r\narcade_sg1k_galaga = \"sg1k_segagala\"\r\narcade_sg1k_girlgard = \"sg1k_girlgard\"\r\narcade_sg1k_girlgardt = \"sg1k_girlgard\"\r\narcade_sg1k_golgo13 = \"sg1k_golgo13\"\r\narcade_sg1k_gpworld = \"sg1k_gpworld\"\r\narcade_sg1k_gpworlda = \"sg1k_gpworld\"\r\narcade_sg1k_gpworldt = \"sg1k_gpworld\"\r\narcade_sg1k_gulkave = \"sg1k_gulkave\"\r\narcade_sg1k_gulkavek = \"sg1k_gulkave\"\r\narcade_sg1k_guzzler = \"sg1k_guzzler\"\r\narcade_sg1k_guzzlert = \"sg1k_guzzler\"\r\narcade_sg1k_hangon2 = \"sg1k_hangon2\"\r\narcade_sg1k_hangon2t1 = \"sg1k_hangon2\"\r\narcade_sg1k_hangon2t2 = \"sg1k_hangon2\"\r\narcade_sg1k_heibaiqi = \"sg1k_othello\"\r\narcade_sg1k_hero = \"sg1k_hero\"\r\narcade_sg1k_herot = \"sg1k_hero\"\r\narcade_sg1k_homemj = \"sg1k_mahjong\"\r\narcade_sg1k_homemj1 = \"sg1k_mahjong\"\r\narcade_sg1k_homemjt = \"sg1k_mahjong\"\r\narcade_sg1k_huohuli = \"sg1k_zoom909\"\r\narcade_sg1k_huojiche = \"sg1k_roadfght\"\r\narcade_sg1k_hustle = \"sg1k_hustle\"\r\narcade_sg1k_hypersp2 = \"sg1k_hypersp2\"\r\narcade_sg1k_hyperspt = \"sg1k_hyperspt\"\r\narcade_sg1k_hypersptk = \"sg1k_hyperspt\"\r\narcade_sg1k_hypersptt = \"sg1k_hyperspt\"\r\narcade_sg1k_iq = \"sg1k_sokoban\"\r\narcade_sg1k_jb007 = \"sg1k_jb007\"\r\narcade_sg1k_jb007a = \"sg1k_jb007\"\r\narcade_sg1k_jb007t = \"sg1k_jb007\"\r\narcade_sg1k_jingwumn = \"sg1k_dragwang\"\r\narcade_sg1k_jingwumna = \"sg1k_dragwang\"\r\narcade_sg1k_jinzita = \"sg1k_jinzita\"\r\narcade_sg1k_ldrun = \"sg1k_ldrun\"\r\narcade_sg1k_ldrunk = \"sg1k_ldrun\"\r\narcade_sg1k_ldrunt = \"sg1k_ldrun\"\r\narcade_sg1k_m2cp = \"sg1k_m2cp\"\r\narcade_sg1k_magtree = \"sg1k_magtree\"\r\narcade_sg1k_mahjong = \"sg1k_mahjong\"\r\narcade_sg1k_mahjonga = \"sg1k_mahjong\"\r\narcade_sg1k_mahjongt = \"sg1k_mahjong\"\r\narcade_sg1k_matchpg = \"sg1k_matchpg\"\r\narcade_sg1k_matchpga = \"sg1k_matchpg\"\r\narcade_sg1k_matchpgt = \"sg1k_matchpg\"\r\narcade_sg1k_mkidwiz = \"sg1k_mkidwiz\"\r\narcade_sg1k_monacogp = \"sg1k_monacogp\"\r\narcade_sg1k_monacogpa = \"sg1k_monacogp\"\r\narcade_sg1k_monacogpb = \"sg1k_monacogp\"\r\narcade_sg1k_monacogpt = \"sg1k_monacogp\"\r\narcade_sg1k_motianda = \"sg1k_rocknbol\"\r\narcade_sg1k_moyuchua = \"sg1k_moyuchua\"\r\narcade_sg1k_music = \"sg1k_music\"\r\narcade_sg1k_musicj = \"sg1k_musicj\"\r\narcade_sg1k_ninjapri = \"sg1k_ninjapri\"\r\narcade_sg1k_ninjaprit = \"sg1k_ninjapri\"\r\narcade_sg1k_nsub = \"sg1k_nsub\"\r\narcade_sg1k_nsuba = \"sg1k_nsub\"\r\narcade_sg1k_nsubb = \"sg1k_nsub\"\r\narcade_sg1k_nsubt = \"sg1k_nsub\"\r\narcade_sg1k_orguss = \"sg1k_orguss\"\r\narcade_sg1k_othello = \"sg1k_othello\"\r\narcade_sg1k_pacar = \"sg1k_pacar\"\r\narcade_sg1k_pacara = \"sg1k_pacar\"\r\narcade_sg1k_pacart = \"sg1k_pacar\"\r\narcade_sg1k_pachink2 = \"sg1k_pachink2\"\r\narcade_sg1k_pachink2t = \"sg1k_pachink2\"\r\narcade_sg1k_pachinko = \"sg1k_pachinko\"\r\narcade_sg1k_pingpong = \"sg1k_pingpong\"\r\narcade_sg1k_pitfall2 = \"sg1k_pitfall2\"\r\narcade_sg1k_pitfall2a = \"sg1k_pitfall2\"\r\narcade_sg1k_popflame = \"sg1k_popflame\"\r\narcade_sg1k_popflamet = \"sg1k_popflame\"\r\narcade_sg1k_qbert = \"sg1k_qbert\"\r\narcade_sg1k_qie = \"sg1k_dokidoki\"\r\narcade_sg1k_rallyx = \"sg1k_rallyx\"\r\narcade_sg1k_roadfght = \"sg1k_roadfght\"\r\narcade_sg1k_rocknbol = \"sg1k_rocknbol\"\r\narcade_sg1k_safarihu = \"sg1k_safarihu\"\r\narcade_sg1k_safarihut = \"sg1k_safarihu\"\r\narcade_sg1k_safarirc = \"sg1k_safarirc\"\r\narcade_sg1k_safarircj = \"sg1k_safarirc\"\r\narcade_sg1k_safarirct = \"sg1k_safarirc\"\r\narcade_sg1k_segaflip = \"sg1k_segaflip\"\r\narcade_sg1k_segaflipa = \"sg1k_segaflip\"\r\narcade_sg1k_segaflipt = \"sg1k_segaflip\"\r\narcade_sg1k_segagala = \"sg1k_segagala\"\r\narcade_sg1k_segagala1 = \"sg1k_segagala\"\r\narcade_sg1k_serizawa = \"sg1k_serizawa\"\r\narcade_sg1k_shinnyus = \"sg1k_shinnyus\"\r\narcade_sg1k_shinnyust = \"sg1k_shinnyus\"\r\narcade_sg1k_sindbadm = \"sg1k_sindbadm\"\r\narcade_sg1k_sindbadmt = \"sg1k_sindbadm\"\r\narcade_sg1k_sokoban = \"sg1k_sokoban\"\r\narcade_sg1k_sokobank = \"sg1k_sokoban\"\r\narcade_sg1k_sokobant = \"sg1k_sokoban\"\r\narcade_sg1k_spacearm = \"sg1k_spacearm\"\r\narcade_sg1k_spacearma = \"sg1k_spacearm\"\r\narcade_sg1k_spacearmb = \"sg1k_spacearm\"\r\narcade_sg1k_spaceinv = \"sg1k_spaceinv\"\r\narcade_sg1k_spaceinvt = \"sg1k_spaceinv\"\r\narcade_sg1k_spacemnt = \"sg1k_spacemnt\"\r\narcade_sg1k_spacesla = \"sg1k_spacesla\"\r\narcade_sg1k_starfrce = \"sg1k_starfrce\"\r\narcade_sg1k_starfrcet = \"sg1k_starfrce\"\r\narcade_sg1k_starfrceta = \"sg1k_starfrce\"\r\narcade_sg1k_starjack = \"sg1k_starjack\"\r\narcade_sg1k_starjack1 = \"sg1k_starjack\"\r\narcade_sg1k_starjack2 = \"sg1k_starjack\"\r\narcade_sg1k_starjackt = \"sg1k_starjack\"\r\narcade_sg1k_supertnk = \"sg1k_supertnk\"\r\narcade_sg1k_supertnkk = \"sg1k_supertnk\"\r\narcade_sg1k_supertnkt = \"sg1k_supertnk\"\r\narcade_sg1k_superuwol = \"sg1k_superuwol\"\r\narcade_sg1k_sxpao = \"sg1k_sxpao\"\r\narcade_sg1k_terebioe = \"sg1k_terebioe\"\r\narcade_sg1k_wboy = \"sg1k_wboy\"\r\narcade_sg1k_wboya = \"sg1k_wboy\"\r\narcade_sg1k_wboyt = \"sg1k_wboy\"\r\narcade_sg1k_yamato = \"sg1k_yamato\"\r\narcade_sg1k_yamatoa = \"sg1k_yamato\"\r\narcade_sg1k_yamatot = \"sg1k_yamato\"\r\narcade_sg1k_yiear = \"sg1k_yiear\"\r\narcade_sg1k_zaxxon = \"sg1k_zaxxon\"\r\narcade_sg1k_zaxxont = \"sg1k_zaxxon\"\r\narcade_sg1k_zippyrac = \"sg1k_zippyrac\"\r\narcade_sg1k_zippyract = \"sg1k_zippyrac\"\r\narcade_sg1k_zoom909 = \"sg1k_zoom909\"\r\narcade_sg2j = \"sg2j\"\r\narcade_sgemf = \"sgemf\"\r\narcade_sgemfa = \"sgemf\"\r\narcade_sgemfd = \"sgemf\"\r\narcade_sgemfh = \"sgemf\"\r\narcade_sgladiat = \"sgladiat\"\r\narcade_sgmast = \"sgmast\"\r\narcade_sgunner = \"sgunner\"\r\narcade_sgunner2 = \"sgunner2\"\r\narcade_sgunner2j = \"sgunner2\"\r\narcade_sgunnerj = \"sgunner\"\r\narcade_sgunnr2j = \"sgunner2\"\r\narcade_sgx_1941 = \"sgx_1941\"\r\narcade_sgx_aldynes = \"sgx_aldynes\"\r\narcade_sgx_battlace = \"sgx_battlace\"\r\narcade_sgx_daimakai = \"sgx_daimakai\"\r\narcade_sgx_daimakai1 = \"sgx_daimakai\"\r\narcade_sgx_daimakaid = \"sgx_daimakai\"\r\narcade_sgx_granzort = \"sgx_granzort\"\r\narcade_sgyxz = \"wof\"\r\narcade_shackled = \"shackled\"\r\narcade_shadfrce = \"shadfrce\"\r\narcade_shadfrcej = \"shadfrce\"\r\narcade_shadfrceu = \"shadfrce\"\r\narcade_shadowld = \"shadowld\"\r\narcade_shadoww = \"shadoww\"\r\narcade_shadowwa = \"shadoww\"\r\narcade_shangha2 = \"shangha2\"\r\narcade_shangha3 = \"shangha3\"\r\narcade_shanghai = \"shanghai\"\r\narcade_shangkid = \"shangkid\"\r\narcade_shangon = \"shangon\"\r\narcade_shangon1 = \"shangon\"\r\narcade_shangon2 = \"shangon\"\r\narcade_shangon3 = \"shangon\"\r\narcade_shangon3d = \"shangon\"\r\narcade_shangonb = \"shangon\"\r\narcade_shangonho = \"shangon\"\r\narcade_shangonle = \"shangon\"\r\narcade_shangonrb = \"shangon\"\r\narcade_shangonrb2 = \"shangon\"\r\narcade_shangonro = \"shangon\"\r\narcade_shanhigw = \"shanhigw\"\r\narcade_shaolinb = \"kicker\"\r\narcade_shaolins = \"kicker\"\r\narcade_sharkatt = \"sharkatt\"\r\narcade_sharrier = \"sharrier\"\r\narcade_sharrier1 = \"sharrier\"\r\narcade_shdancbl = \"shdancer\"\r\narcade_shdancer = \"shdancer\"\r\narcade_shdancer1 = \"shdancer\"\r\narcade_shdancerj = \"shdancer\"\r\narcade_shdancrb = \"shdancer\"\r\narcade_shdancrj = \"shdancer\"\r\narcade_sheriff = \"sheriff\"\r\narcade_shienryu = \"shienryu\"\r\narcade_shimpacp = \"shimpact\"\r\narcade_shimpact = \"shimpact\"\r\narcade_shinfz = \"shinfz\"\r\narcade_shinobi = \"shinobi\"\r\narcade_shinobi1 = \"shinobi\"\r\narcade_shinobi1d = \"shinobi\"\r\narcade_shinobi2 = \"shinobi\"\r\narcade_shinobi2d = \"shinobi\"\r\narcade_shinobi3 = \"shinobi\"\r\narcade_shinobi4 = \"shinobi\"\r\narcade_shinobi5 = \"shinobi\"\r\narcade_shinobia = \"shinobi\"\r\narcade_shinobib = \"shinobi\"\r\narcade_shinobl = \"shinobi\"\r\narcade_shinoblb = \"shinobi\"\r\narcade_shinobls = \"shinobi\"\r\narcade_shippumd = \"kingdmgp\"\r\narcade_shiryu2 = \"strider2\"\r\narcade_shisen = \"sichuan2\"\r\narcade_shisen2 = \"matchit2\"\r\narcade_shocking = \"shocking\"\r\narcade_shocktr2 = \"shocktr2\"\r\narcade_shocktra = \"shocktro\"\r\narcade_shocktro = \"shocktro\"\r\narcade_shocktroa = \"shocktro\"\r\narcade_shogwarr = \"shogwarr\"\r\narcade_shogwarrk = \"shogwarr\"\r\narcade_shogwarru = \"shogwarr\"\r\narcade_shollow = \"shollow\"\r\narcade_shollow2 = \"shollow\"\r\narcade_shootbul = \"shootbul\"\r\narcade_shootgal = \"shootgal\"\r\narcade_shootoub = \"shootout\"\r\narcade_shootouj = \"shootout\"\r\narcade_shootout = \"shootout\"\r\narcade_shootoutb = \"shootout\"\r\narcade_shootoutj = \"shootout\"\r\narcade_shougi = \"shougi\"\r\narcade_shougi2 = \"shougi\"\r\narcade_showdown = \"showdown\"\r\narcade_shrike = \"shrike\"\r\narcade_shtngmst = \"shtngmst\"\r\narcade_shtrider = \"shtrider\"\r\narcade_shtridera = \"shtrider\"\r\narcade_shtriderb = \"shtrider\"\r\narcade_shuffle = \"shuffle\"\r\narcade_shufshot = \"shufshot\"\r\narcade_shuuz = \"shuuz\"\r\narcade_shuuz2 = \"shuuz\"\r\narcade_sia2650 = \"sia2650\"\r\narcade_sichuan2 = \"sichuan2\"\r\narcade_sichuana = \"sichuan2\"\r\narcade_sicv = \"invaders\"\r\narcade_sidearjp = \"sidearms\"\r\narcade_sidearmr = \"sidearms\"\r\narcade_sidearms = \"sidearms\"\r\narcade_sidearmsj = \"sidearms\"\r\narcade_sidearmsu = \"sidearms\"\r\narcade_sidearmsur1 = \"sidearms\"\r\narcade_sidepckt = \"sidepckt\"\r\narcade_sidepcktb = \"sidepckt\"\r\narcade_sidepcktb2 = \"sidepckt\"\r\narcade_sidepcktj = \"sidepckt\"\r\narcade_sidepctb = \"sidepckt\"\r\narcade_sidepctj = \"sidepckt\"\r\narcade_sidetrac = \"sidetrac\"\r\narcade_silentd = \"silentd\"\r\narcade_silentdj = \"silentd\"\r\narcade_silentdu = \"silentd\"\r\narcade_silkroad = \"silkroad\"\r\narcade_silkroada = \"silkroad\"\r\narcade_silkworm = \"silkworm\"\r\narcade_silkwormb = \"silkworm\"\r\narcade_silkwormj = \"silkworm\"\r\narcade_silkwormp = \"silkworm\"\r\narcade_silkwrm2 = \"silkworm\"\r\narcade_silvland = \"rpatrol\"\r\narcade_silvmil = \"silvmil\"\r\narcade_simps2pa = \"simpsons\"\r\narcade_simps2pj = \"simpsons\"\r\narcade_simpsn2p = \"simpsons\"\r\narcade_simpsons = \"simpsons\"\r\narcade_simpsons2p = \"simpsons\"\r\narcade_simpsons2p2 = \"simpsons\"\r\narcade_simpsons2p3 = \"simpsons\"\r\narcade_simpsons2pa = \"simpsons\"\r\narcade_simpsons2pj = \"simpsons\"\r\narcade_simpsons4pa = \"simpsons\"\r\narcade_sindbadm = \"sindbadm\"\r\narcade_sinista1 = \"sinistar\"\r\narcade_sinista2 = \"sinistar\"\r\narcade_sinistar = \"sinistar\"\r\narcade_sinvasn = \"commando\"\r\narcade_sinvasnb = \"commando\"\r\narcade_sinvemag = \"invaders\"\r\narcade_sinvzen = \"invaders\"\r\narcade_sisv = \"invaders\"\r\narcade_sisv1 = \"invaders\"\r\narcade_sisv2 = \"invaders\"\r\narcade_sisv3 = \"invaders\"\r\narcade_sitv = \"invaders\"\r\narcade_sitv1 = \"invaders\"\r\narcade_sjryuko = \"sjryuko\"\r\narcade_sjryuko1 = \"sjryuko\"\r\narcade_skelagon = \"sfx\"\r\narcade_skingam2 = \"majtitl2\"\r\narcade_skingame = \"majtitl2\"\r\narcade_skingame2 = \"majtitl2\"\r\narcade_skns = \"skns\"\r\narcade_skullfng = \"skullfng\"\r\narcade_skullfnga = \"skullfng\"\r\narcade_skullfngj = \"skullfng\"\r\narcade_skullxb1 = \"skullxbo\"\r\narcade_skullxb2 = \"skullxbo\"\r\narcade_skullxb3 = \"skullxbo\"\r\narcade_skullxb4 = \"skullxbo\"\r\narcade_skullxbo = \"skullxbo\"\r\narcade_skyadvnj = \"skyadvnt\"\r\narcade_skyadvnt = \"skyadvnt\"\r\narcade_skyadvntj = \"skyadvnt\"\r\narcade_skyadvntu = \"skyadvnt\"\r\narcade_skyadvnu = \"skyadvnt\"\r\narcade_skyalert = \"skyalert\"\r\narcade_skyarmy = \"skyarmy\"\r\narcade_skybase = \"skybase\"\r\narcade_skybump = \"skybump\"\r\narcade_skychut = \"skychut\"\r\narcade_skydiver = \"skydiver\"\r\narcade_skyfox = \"skyfox\"\r\narcade_skykid = \"skykid\"\r\narcade_skykidd = \"skykid\"\r\narcade_skykiddo = \"skykiddx\"\r\narcade_skykiddx = \"skykiddx\"\r\narcade_skykiddxo = \"skykiddx\"\r\narcade_skykido = \"skykid\"\r\narcade_skykids = \"skykid\"\r\narcade_skylancr = \"skylancr\"\r\narcade_skylancre = \"skylancr\"\r\narcade_skyraid = \"skyraid\"\r\narcade_skyraidr = \"uniwars\"\r\narcade_skyrobo = \"skyrobo\"\r\narcade_skyshark = \"fshark\"\r\narcade_skysharka = \"fshark\"\r\narcade_skyskipr = \"skyskipr\"\r\narcade_skysmash = \"skysmash\"\r\narcade_skysoldr = \"skysoldr\"\r\narcade_skysoldrbl = \"skysoldr\"\r\narcade_skywolf = \"airwolf\"\r\narcade_skywolf2 = \"airwolf\"\r\narcade_skywolf3 = \"airwolf\"\r\narcade_slamdnk2 = \"rungun2\"\r\narcade_slammasa = \"slammast\"\r\narcade_slammash = \"slammast\"\r\narcade_slammast = \"slammast\"\r\narcade_slammastu = \"slammast\"\r\narcade_slammasu = \"slammast\"\r\narcade_slampic = \"slammast\"\r\narcade_slapbtjp = \"slapfigh\"\r\narcade_slapbtuk = \"slapfigh\"\r\narcade_slapfigh = \"alcon\"\r\narcade_slapfighb1 = \"alcon\"\r\narcade_slapfighb2 = \"alcon\"\r\narcade_slapfighb3 = \"alcon\"\r\narcade_slapshot = \"slapshot\"\r\narcade_slapshtr = \"slapshtr\"\r\narcade_sleague = \"sleague\"\r\narcade_sliksh17 = \"slikshot\"\r\narcade_slikshot = \"slikshot\"\r\narcade_slipstrm = \"slipstrm\"\r\narcade_slither = \"slither\"\r\narcade_slithera = \"slither\"\r\narcade_slmdunkj = \"rungun\"\r\narcade_slyspy = \"secretag\"\r\narcade_slyspy2 = \"secretag\"\r\narcade_slyspy3 = \"secretag\"\r\narcade_smashtv = \"smashtv\"\r\narcade_smashtv4 = \"smashtv\"\r\narcade_smashtv5 = \"smashtv\"\r\narcade_smashtv6 = \"smashtv\"\r\narcade_smbomb = \"ringdest\"\r\narcade_smbombr1 = \"ringdest\"\r\narcade_smgolf = \"smgolf\"\r\narcade_smgolfb = \"smgolf\"\r\narcade_smgolfj = \"smgolf\"\r\narcade_smgp = \"smgp\"\r\narcade_smgp5 = \"smgp\"\r\narcade_smgp5d = \"smgp\"\r\narcade_smgp6 = \"smgp\"\r\narcade_smgp6d = \"smgp\"\r\narcade_smgpd = \"smgp\"\r\narcade_smgpj = \"smgp\"\r\narcade_smgpja = \"smgp\"\r\narcade_smgpjd = \"smgp\"\r\narcade_smgpu = \"smgp\"\r\narcade_smgpu1 = \"smgp\"\r\narcade_smgpu1d = \"smgp\"\r\narcade_smgpu2 = \"smgp\"\r\narcade_smgpu2d = \"smgp\"\r\narcade_smgpud = \"smgp\"\r\narcade_smooncrs = \"mooncrst\"\r\narcade_sms_20em1 = \"sms_20em1\"\r\narcade_sms_3dragon = \"sms_3dragon\"\r\narcade_sms_4pak = \"sms_4pak\"\r\narcade_sms_94swc = \"sms_94swc\"\r\narcade_sms_aburner = \"sms_aburner\"\r\narcade_sms_aceoface = \"sms_aceoface\"\r\narcade_sms_actionfg = \"sms_actionfg\"\r\narcade_sms_actionfg1 = \"sms_actionfg\"\r\narcade_sms_addfam = \"sms_addfam\"\r\narcade_sms_aerialas = \"sms_aerialas\"\r\narcade_sms_aerialasu = \"sms_aerialas\"\r\narcade_sms_agassi = \"sms_agassi\"\r\narcade_sms_agidooly = \"sms_dinodool\"\r\narcade_sms_airresc = \"sms_airresc\"\r\narcade_sms_akrr102e = \"sms_alexkidd\"\r\narcade_sms_aladdin = \"sms_aladdin\"\r\narcade_sms_aleste = \"sms_pstrike\"\r\narcade_sms_alesteiigg2sms = \"sms_alesteiigg2sms\"\r\narcade_sms_alexbmx = \"sms_alexbmx\"\r\narcade_sms_alexhitw = \"sms_alexhitw\"\r\narcade_sms_alexkidd = \"sms_alexkidd\"\r\narcade_sms_alexkidd1 = \"sms_alexkidd\"\r\narcade_sms_alexkidd2 = \"sms_alexkidd2\"\r\narcade_sms_alexkiddb = \"sms_alexkidd\"\r\narcade_sms_alexkiddj = \"sms_alexkidd\"\r\narcade_sms_alexlost = \"sms_alexlost\"\r\narcade_sms_alexshin = \"sms_alexshin\"\r\narcade_sms_alf = \"sms_alf\"\r\narcade_sms_alibaba = \"sms_alibaba\"\r\narcade_sms_alien3 = \"sms_alien3\"\r\narcade_sms_aliensyn = \"sms_aliensyn\"\r\narcade_sms_aliensynj = \"sms_aliensyn\"\r\narcade_sms_aliensynp = \"sms_aliensyn\"\r\narcade_sms_altbeast = \"sms_altbeast\"\r\narcade_sms_ameribb = \"sms_ameribb\"\r\narcade_sms_ameripf = \"sms_ameripf\"\r\narcade_sms_anmitsu = \"sms_alexhitw\"\r\narcade_sms_arcadesh = \"sms_arcadesh\"\r\narcade_sms_argosnj = \"sms_argosnj\"\r\narcade_sms_argosnj1 = \"sms_argosnj\"\r\narcade_sms_ariel = \"sms_ariel\"\r\narcade_sms_ashura = \"sms_secret\"\r\narcade_sms_assaultc = \"sms_assaultc\"\r\narcade_sms_assaultc1 = \"sms_assaultc\"\r\narcade_sms_astergre = \"sms_astergre\"\r\narcade_sms_asterix = \"sms_asterix\"\r\narcade_sms_asterix1 = \"sms_asterix\"\r\narcade_sms_astermis = \"sms_astermis\"\r\narcade_sms_astorm = \"sms_astorm\"\r\narcade_sms_astrofl = \"sms_transbot\"\r\narcade_sms_astrofl1 = \"sms_transbot\"\r\narcade_sms_astropit = \"sms_astropit\"\r\narcade_sms_astrow = \"sms_astrow\"\r\narcade_sms_aztecadv = \"sms_aztecadv\"\r\narcade_sms_backtof2 = \"sms_backtof2\"\r\narcade_sms_backtof3 = \"sms_backtof3\"\r\narcade_sms_bakabon = \"sms_bakabon\"\r\narcade_sms_bakubaku = \"sms_bakubaku\"\r\narcade_sms_bankp = \"sms_bankp\"\r\narcade_sms_bankpc = \"sms_bankp\"\r\narcade_sms_baraburu10 = \"sms_baraburu10\"\r\narcade_sms_bartvssm = \"sms_bartvssm\"\r\narcade_sms_bartvsw = \"sms_bartvsw\"\r\narcade_sms_basketn = \"sms_basketn\"\r\narcade_sms_batmanrn = \"sms_batmanrn\"\r\narcade_sms_battleor = \"sms_battleor\"\r\narcade_sms_beast = \"sms_beast\"\r\narcade_sms_blackblt = \"sms_blackblt\"\r\narcade_sms_bladeag = \"sms_bladeag\"\r\narcade_sms_bladeag1 = \"sms_bladeag\"\r\narcade_sms_blockhol = \"sms_blockhol\"\r\narcade_sms_bmaniacs = \"sms_bmaniacs\"\r\narcade_sms_bnzabros = \"sms_bnzabros\"\r\narcade_sms_bombraid = \"sms_bombraid\"\r\narcade_sms_bonkers = \"sms_bonkers\"\r\narcade_sms_borgman = \"sms_cyborgh\"\r\narcade_sms_borgmanp = \"sms_cyborgh\"\r\narcade_sms_brucelee10 = \"sms_brucelee10\"\r\narcade_sms_bublbobl = \"sms_bublbobl\"\r\narcade_sms_bublbokc = \"sms_bublbobl\"\r\narcade_sms_bublboky = \"sms_bublbobl\"\r\narcade_sms_buggyrun = \"sms_buggyrun\"\r\narcade_sms_calgame2 = \"sms_calgame2\"\r\narcade_sms_calgame2b = \"sms_calgame2\"\r\narcade_sms_calgames = \"sms_calgames\"\r\narcade_sms_captsilv = \"sms_captsilv\"\r\narcade_sms_captsilvu = \"sms_captsilv\"\r\narcade_sms_carmnwld = \"sms_carmnwld\"\r\narcade_sms_carmnwldb = \"sms_carmnwld\"\r\narcade_sms_casino = \"sms_casino\"\r\narcade_sms_castelo = \"sms_castelo\"\r\narcade_sms_castlill = \"sms_castlill\"\r\narcade_sms_castlills = \"sms_castlill\"\r\narcade_sms_castlillu = \"sms_castlill\"\r\narcade_sms_champeur = \"sms_champeur\"\r\narcade_sms_champhck = \"sms_champhck\"\r\narcade_sms_chapolim = \"sms_ghosth\"\r\narcade_sms_chasehq = \"sms_chasehq\"\r\narcade_sms_cheese = \"sms_cheese\"\r\narcade_sms_choplift = \"sms_choplift\"\r\narcade_sms_chopliftj = \"sms_choplift\"\r\narcade_sms_chopliftp = \"sms_choplift\"\r\narcade_sms_chuckrck = \"sms_chuckrck\"\r\narcade_sms_chukrck2 = \"sms_chukrck2\"\r\narcade_sms_chukrck2b = \"sms_chukrck2\"\r\narcade_sms_circuit = \"sms_worldgp\"\r\narcade_sms_cloudmst = \"sms_cloudmst\"\r\narcade_sms_colors = \"sms_colors\"\r\narcade_sms_columns = \"sms_columns\"\r\narcade_sms_columnsp = \"sms_columns\"\r\narcade_sms_comical = \"sms_comical\"\r\narcade_sms_comicalk = \"sms_comical\"\r\narcade_sms_comicaltw = \"sms_comical\"\r\narcade_sms_comicbak = \"sms_comicbak\"\r\narcade_sms_coolspot = \"sms_coolspot\"\r\narcade_sms_cosmic = \"sms_cosmic\"\r\narcade_sms_crashdum = \"sms_crashdum\"\r\narcade_sms_cso = \"sms_cso\"\r\narcade_sms_cybers = \"sms_cybers\"\r\narcade_sms_cybersp = \"sms_cybers\"\r\narcade_sms_cyborgh = \"sms_cyborgh\"\r\narcade_sms_cyborgz = \"sms_cyborgz\"\r\narcade_sms_daffy = \"sms_daffy\"\r\narcade_sms_dallye = \"sms_dallye\"\r\narcade_sms_danan = \"sms_danan\"\r\narcade_sms_darc10 = \"sms_darc10\"\r\narcade_sms_datastorm10 = \"sms_datastorm10\"\r\narcade_sms_dcrystal = \"sms_dcrystal\"\r\narcade_sms_ddragon = \"sms_ddragon\"\r\narcade_sms_ddragonk = \"sms_ddragon\"\r\narcade_sms_ddux = \"sms_ddux\"\r\narcade_sms_deadang = \"sms_deadang\"\r\narcade_sms_deepduck = \"sms_deepduck\"\r\narcade_sms_desert = \"sms_desert\"\r\narcade_sms_dhead = \"sms_dhead\"\r\narcade_sms_dicktr = \"sms_dicktr\"\r\narcade_sms_dinobash = \"sms_dinobash\"\r\narcade_sms_dinodool = \"sms_dinodool\"\r\narcade_sms_dokidoki = \"sms_pengland\"\r\narcade_sms_dokidokip = \"sms_pengland\"\r\narcade_sms_doublhwk = \"sms_doublhwk\"\r\narcade_sms_doublhwkp = \"sms_doublhwk\"\r\narcade_sms_doubltgt = \"sms_quartet\"\r\narcade_sms_dracula = \"sms_dracula\"\r\narcade_sms_dragon = \"sms_dragon\"\r\narcade_sms_drhello = \"sms_drhello\"\r\narcade_sms_drrobotn = \"sms_drrobotn\"\r\narcade_sms_dstrike = \"sms_dstrike\"\r\narcade_sms_dumpmats = \"sms_prowres\"\r\narcade_sms_dynduke = \"sms_dynduke\"\r\narcade_sms_eagles5 = \"sms_eagles5\"\r\narcade_sms_ecco = \"sms_ecco\"\r\narcade_sms_ecco2 = \"sms_ecco2\"\r\narcade_sms_ejim = \"sms_ejim\"\r\narcade_sms_enduro = \"sms_enduro\"\r\narcade_sms_enduroj = \"sms_enduro\"\r\narcade_sms_eswatc = \"sms_eswatc\"\r\narcade_sms_eswatc1 = \"sms_eswatc\"\r\narcade_sms_exainnov = \"sms_exainnov\"\r\narcade_sms_excdizzy = \"sms_excdizzy\"\r\narcade_sms_f1 = \"sms_f1\"\r\narcade_sms_f16falc = \"sms_f16fight\"\r\narcade_sms_f16falcc = \"sms_f16fight\"\r\narcade_sms_f16falcjc = \"sms_f16fight\"\r\narcade_sms_f16falctw = \"sms_f16fight\"\r\narcade_sms_f16fight = \"sms_f16fight\"\r\narcade_sms_f16fightc = \"sms_f16fight\"\r\narcade_sms_f1spirit = \"sms_f1spirit\"\r\narcade_sms_family = \"sms_parlour\"\r\narcade_sms_fantdizz = \"sms_fantdizz\"\r\narcade_sms_fantzon2 = \"sms_fantzon2\"\r\narcade_sms_fantzon2j = \"sms_fantzon2\"\r\narcade_sms_fantzone = \"sms_fantzone\"\r\narcade_sms_fantzone1 = \"sms_fantzone\"\r\narcade_sms_fantzonej = \"sms_fantzone\"\r\narcade_sms_fantzonetw = \"sms_fantzone\"\r\narcade_sms_fantzonm = \"sms_fantzonm\"\r\narcade_sms_fatetris = \"sms_fatetris\"\r\narcade_sms_felipe = \"sms_teddyboy\"\r\narcade_sms_ferias = \"sms_ferias\"\r\narcade_sms_fifa = \"sms_fifa\"\r\narcade_sms_finalbb = \"sms_bublbobl\"\r\narcade_sms_fireforg = \"sms_fireforg\"\r\narcade_sms_fireice = \"sms_fireice\"\r\narcade_sms_flash = \"sms_flash\"\r\narcade_sms_flint = \"sms_flint\"\r\narcade_sms_forgottn = \"sms_forgottn\"\r\narcade_sms_fpoint = \"sms_fpoint\"\r\narcade_sms_gaegujan = \"sms_gaegujan\"\r\narcade_sms_galactpr = \"sms_galactpr\"\r\narcade_sms_galaxian = \"sms_galaxian\"\r\narcade_sms_gamebox = \"sms_gamebox\"\r\narcade_sms_gangster = \"sms_gangster\"\r\narcade_sms_gauntlet = \"sms_gauntlet\"\r\narcade_sms_gaxewarr = \"sms_gaxewarr\"\r\narcade_sms_georgeko = \"sms_georgeko\"\r\narcade_sms_gerald = \"sms_teddyboy\"\r\narcade_sms_gforce = \"sms_gforce\"\r\narcade_sms_gforceu = \"sms_gforce\"\r\narcade_sms_gground = \"sms_gground\"\r\narcade_sms_ggroundp = \"sms_gground\"\r\narcade_sms_ghostbst = \"sms_ghostbst\"\r\narcade_sms_ghosth = \"sms_ghosth\"\r\narcade_sms_ghosthc = \"sms_ghosth\"\r\narcade_sms_ghosthcp = \"sms_ghosth\"\r\narcade_sms_ghosthj = \"sms_ghosth\"\r\narcade_sms_ghosthj1 = \"sms_ghosth\"\r\narcade_sms_ghosthk = \"sms_ghosth\"\r\narcade_sms_ghouls = \"sms_ghouls\"\r\narcade_sms_ghoulsd = \"sms_ghouls\"\r\narcade_sms_globald = \"sms_globald\"\r\narcade_sms_globaldp = \"sms_globald\"\r\narcade_sms_gloc = \"sms_gloc\"\r\narcade_sms_goldnaxe = \"sms_goldnaxe\"\r\narcade_sms_golfaman = \"sms_golfaman\"\r\narcade_sms_golfamanp = \"sms_golfaman\"\r\narcade_sms_golvell = \"sms_golvell\"\r\narcade_sms_gprider = \"sms_gprider\"\r\narcade_sms_greatbas = \"sms_greatbas\"\r\narcade_sms_greatbasj = \"sms_greatbas\"\r\narcade_sms_greatbasj1 = \"sms_greatbas\"\r\narcade_sms_greatbsk = \"sms_greatbsk\"\r\narcade_sms_greatftb = \"sms_greatftb\"\r\narcade_sms_greatglf = \"sms_greatglf\"\r\narcade_sms_greatglf1 = \"sms_greatglf\"\r\narcade_sms_greatglfp = \"sms_greatglf\"\r\narcade_sms_greatglj = \"sms_greatglj\"\r\narcade_sms_greatglk = \"sms_greatglj\"\r\narcade_sms_greatice = \"sms_greatice\"\r\narcade_sms_greatscr = \"sms_greatscr\"\r\narcade_sms_greatscrc = \"sms_greatscr\"\r\narcade_sms_greatscrj = \"sms_greatscr\"\r\narcade_sms_greatscrtw = \"sms_greatscr\"\r\narcade_sms_greattns = \"sms_stennis\"\r\narcade_sms_greatvol = \"sms_greatvol\"\r\narcade_sms_greatvolj = \"sms_greatvol\"\r\narcade_sms_gunsmoke = \"sms_gunsmoke\"\r\narcade_sms_hajafuin = \"sms_miracle\"\r\narcade_sms_hangon = \"sms_hangon\"\r\narcade_sms_hangonaw = \"sms_hangonaw\"\r\narcade_sms_hangonc = \"sms_hangon\"\r\narcade_sms_hangonj = \"sms_hangon\"\r\narcade_sms_hangonsh = \"sms_hangonsh\"\r\narcade_sms_hangonshp = \"sms_hangonsh\"\r\narcade_sms_heavyw = \"sms_heavyw\"\r\narcade_sms_herolanc = \"sms_herolanc\"\r\narcade_sms_hicom3a = \"sms_hicom3a\"\r\narcade_sms_hicom3b = \"sms_hicom3a\"\r\narcade_sms_hicom3c = \"sms_hicom3a\"\r\narcade_sms_hicom3d = \"sms_hicom3a\"\r\narcade_sms_hicom3e = \"sms_hicom3a\"\r\narcade_sms_hicom3f = \"sms_hicom3a\"\r\narcade_sms_hicom8a = \"sms_hicom3a\"\r\narcade_sms_hicom8b = \"sms_hicom3a\"\r\narcade_sms_hicom8c = \"sms_hicom3a\"\r\narcade_sms_highsc = \"sms_highsc\"\r\narcade_sms_hokuto = \"sms_blackblt\"\r\narcade_sms_hokutotw = \"sms_blackblt\"\r\narcade_sms_homea = \"sms_homea\"\r\narcade_sms_hongkildong = \"sms_hongkildong\"\r\narcade_sms_hook = \"sms_hook\"\r\narcade_sms_hoshiw = \"sms_hoshiw\"\r\narcade_sms_hulk = \"sms_hulk\"\r\narcade_sms_hwaran = \"sms_kenseid\"\r\narcade_sms_impmiss = \"sms_impmiss\"\r\narcade_sms_impmissp = \"sms_impmiss\"\r\narcade_sms_indycrus = \"sms_indycrus\"\r\narcade_sms_indycrusp = \"sms_indycrus\"\r\narcade_sms_janggun = \"sms_janggun\"\r\narcade_sms_jangpun3 = \"sms_jangpun3\"\r\narcade_sms_jb007 = \"sms_jb007\"\r\narcade_sms_jb007b = \"sms_jb007\"\r\narcade_sms_jbdougko = \"sms_heavyw\"\r\narcade_sms_jbdougkop = \"sms_heavyw\"\r\narcade_sms_joemont = \"sms_joemont\"\r\narcade_sms_jpark = \"sms_jpark\"\r\narcade_sms_jungle = \"sms_jungle\"\r\narcade_sms_kenseid = \"sms_kenseid\"\r\narcade_sms_kenseidj = \"sms_kenseid\"\r\narcade_sms_kingball = \"sms_kingball\"\r\narcade_sms_kingqst = \"sms_kingqst\"\r\narcade_sms_kingqstp = \"sms_kingqst\"\r\narcade_sms_klax = \"sms_klax\"\r\narcade_sms_knightm2 = \"sms_knightm2\"\r\narcade_sms_krustyfh = \"sms_krustyfh\"\r\narcade_sms_kujaku = \"sms_spellcst\"\r\narcade_sms_kungfuk = \"sms_kungfuk\"\r\narcade_sms_lambo = \"sms_lambo\"\r\narcade_sms_landill = \"sms_landill\"\r\narcade_sms_legndill = \"sms_legndill\"\r\narcade_sms_lemming2 = \"sms_lemming2\"\r\narcade_sms_lemmings = \"sms_lemmings\"\r\narcade_sms_lemmingsp = \"sms_lemmings\"\r\narcade_sms_lghost = \"sms_lghost\"\r\narcade_sms_lionking = \"sms_lionking\"\r\narcade_sms_loffire = \"sms_loffire\"\r\narcade_sms_lordswrd = \"sms_lordswrd\"\r\narcade_sms_lordswrdj = \"sms_lordswrd\"\r\narcade_sms_loretta = \"sms_loretta\"\r\narcade_sms_lostraider101 = \"sms_lostraider101\"\r\narcade_sms_luckydim = \"sms_luckydim\"\r\narcade_sms_luckydimp = \"sms_luckydim\"\r\narcade_sms_makairet = \"sms_kungfuk\"\r\narcade_sms_maougolv = \"sms_golvell\"\r\narcade_sms_maougolvp = \"sms_golvell\"\r\narcade_sms_marble = \"sms_marble\"\r\narcade_sms_marksman = \"sms_marksman\"\r\narcade_sms_marksmanu = \"sms_marksman\"\r\narcade_sms_mastcomb = \"sms_mastcomb\"\r\narcade_sms_mastdark = \"sms_mastdark\"\r\narcade_sms_mazehunt = \"sms_mazehunt\"\r\narcade_sms_mazewalk = \"sms_mazehunt\"\r\narcade_sms_megumi = \"sms_megumi\"\r\narcade_sms_mercs = \"sms_mercs\"\r\narcade_sms_mickeyuc = \"sms_mickeyuc\"\r\narcade_sms_mickmack = \"sms_mickmack\"\r\narcade_sms_micromac = \"sms_micromac\"\r\narcade_sms_miracle = \"sms_miracle\"\r\narcade_sms_miraclep = \"sms_miracle\"\r\narcade_sms_missil3d = \"sms_missil3d\"\r\narcade_sms_mjsengok = \"sms_mjsengok\"\r\narcade_sms_mjsengokp = \"sms_mjsengok\"\r\narcade_sms_mk = \"sms_mk\"\r\narcade_sms_mk2 = \"sms_mk2\"\r\narcade_sms_mk3 = \"sms_mk3\"\r\narcade_sms_moggym100 = \"sms_moggym100\"\r\narcade_sms_monica = \"sms_wboymlnd\"\r\narcade_sms_monopoly = \"sms_monopoly\"\r\narcade_sms_monopolyp = \"sms_monopoly\"\r\narcade_sms_monopolyu = \"sms_monopoly\"\r\narcade_sms_montezum = \"sms_montezum\"\r\narcade_sms_montezump = \"sms_montezum\"\r\narcade_sms_mopirang = \"sms_mopirang\"\r\narcade_sms_mspacman = \"sms_mspacman\"\r\narcade_sms_mwalk = \"sms_mwalk\"\r\narcade_sms_mwalkp = \"sms_mwalk\"\r\narcade_sms_myhero = \"sms_myhero\"\r\narcade_sms_myheroc = \"sms_myhero\"\r\narcade_sms_nbajam = \"sms_nbajam\"\r\narcade_sms_nekkyu = \"sms_nekkyu\"\r\narcade_sms_nemesis = \"sms_nemesis\"\r\narcade_sms_nemesis2 = \"sms_nemesis2\"\r\narcade_sms_newbogl2 = \"sms_bublbobl\"\r\narcade_sms_ngaiden = \"sms_ngaiden\"\r\narcade_sms_ngaidenp = \"sms_ngaiden\"\r\narcade_sms_ninja = \"sms_ninja\"\r\narcade_sms_ninjaj = \"sms_ninja\"\r\narcade_sms_olympgld = \"sms_olympgld\"\r\narcade_sms_olympgldk = \"sms_olympgld\"\r\narcade_sms_opaopa = \"sms_fantzonm\"\r\narcade_sms_opwolf = \"sms_opwolf\"\r\narcade_sms_ottifant = \"sms_ottifant\"\r\narcade_sms_outrneur = \"sms_outrneur\"\r\narcade_sms_outrun = \"sms_outrun\"\r\narcade_sms_outrun3d = \"sms_outrun3d\"\r\narcade_sms_pacmania = \"sms_pacmania\"\r\narcade_sms_paperboy = \"sms_paperboy\"\r\narcade_sms_paperboyu = \"sms_paperboy\"\r\narcade_sms_parlour = \"sms_parlour\"\r\narcade_sms_patriley = \"sms_patriley\"\r\narcade_sms_pengadv = \"sms_pengadv\"\r\narcade_sms_pengland = \"sms_pengland\"\r\narcade_sms_pgatour = \"sms_pgatour\"\r\narcade_sms_pitfight = \"sms_pitfight\"\r\narcade_sms_pitfightb = \"sms_pitfight\"\r\narcade_sms_pitpot = \"sms_pitpot\"\r\narcade_sms_pitpot1 = \"sms_pitpot\"\r\narcade_sms_pooyan = \"sms_pooyan\"\r\narcade_sms_populous = \"sms_populous\"\r\narcade_sms_poseidon = \"sms_poseidon\"\r\narcade_sms_ppersia = \"sms_ppersia\"\r\narcade_sms_predatr2 = \"sms_predatr2\"\r\narcade_sms_predatr2b = \"sms_predatr2\"\r\narcade_sms_prowres = \"sms_prowres\"\r\narcade_sms_proyakyu = \"sms_proyakyu\"\r\narcade_sms_pstar = \"sms_pstar\"\r\narcade_sms_pstar1 = \"sms_pstar\"\r\narcade_sms_pstarb = \"sms_pstar\"\r\narcade_sms_pstarj = \"sms_pstar\"\r\narcade_sms_pstarjmd = \"sms_pstar\"\r\narcade_sms_pstark = \"sms_pstar\"\r\narcade_sms_pstrike = \"sms_pstrike\"\r\narcade_sms_pstrike2 = \"sms_pstrike2\"\r\narcade_sms_psychicw = \"sms_psychicw\"\r\narcade_sms_psychof = \"sms_psychof\"\r\narcade_sms_punpun = \"sms_punpun\"\r\narcade_sms_puttputt = \"sms_puttputt\"\r\narcade_sms_puttputtp = \"sms_puttputt\"\r\narcade_sms_puznic = \"sms_puznic\"\r\narcade_sms_quartet = \"sms_quartet\"\r\narcade_sms_rambo2 = \"sms_secret\"\r\narcade_sms_rambo3 = \"sms_rambo3\"\r\narcade_sms_rampage = \"sms_rampage\"\r\narcade_sms_rampart = \"sms_rampart\"\r\narcade_sms_rastan = \"sms_rastan\"\r\narcade_sms_rbisland = \"sms_rbisland\"\r\narcade_sms_rbislandb = \"sms_rbisland\"\r\narcade_sms_rcgp = \"sms_rcgp\"\r\narcade_sms_rcgpp = \"sms_rcgp\"\r\narcade_sms_regjacks = \"sms_ameribb\"\r\narcade_sms_renegade = \"sms_renegade\"\r\narcade_sms_rescuems = \"sms_rescuems\"\r\narcade_sms_roadfght = \"sms_roadfght\"\r\narcade_sms_roadrash = \"sms_roadrash\"\r\narcade_sms_robocod = \"sms_robocod\"\r\narcade_sms_robocop = \"sms_robocop\"\r\narcade_sms_robocop3 = \"sms_robocop3\"\r\narcade_sms_roboterm = \"sms_roboterm\"\r\narcade_sms_rocky = \"sms_rocky\"\r\narcade_sms_rtype = \"sms_rtype\"\r\narcade_sms_rtypep = \"sms_rtype\"\r\narcade_sms_running = \"sms_running\"\r\narcade_sms_sagaia = \"sms_sagaia\"\r\narcade_sms_sangoku3 = \"sms_sangoku3\"\r\narcade_sms_sapomestr = \"sms_kungfuk\"\r\narcade_sms_saposos = \"sms_astrow\"\r\narcade_sms_sapoxule = \"sms_psychof\"\r\narcade_sms_satell7 = \"sms_satell7\"\r\narcade_sms_satell7a = \"sms_satell7\"\r\narcade_sms_sbioman1 = \"sms_sbioman1\"\r\narcade_sms_sboy1 = \"sms_sboy1\"\r\narcade_sms_sboy2 = \"sms_sboy2\"\r\narcade_sms_sboy3 = \"sms_sboy3\"\r\narcade_sms_sboy4 = \"sms_sboy4\"\r\narcade_sms_sci = \"sms_sci\"\r\narcade_sms_scip = \"sms_sci\"\r\narcade_sms_sdi = \"sms_globald\"\r\narcade_sms_sdmilhao = \"sms_sdmilhao\"\r\narcade_sms_secret = \"sms_secret\"\r\narcade_sms_segachss = \"sms_segachss\"\r\narcade_sms_segagfx = \"sms_segagfx\"\r\narcade_sms_segawtg = \"sms_segawtg\"\r\narcade_sms_seishun = \"sms_myhero\"\r\narcade_sms_seishun1 = \"sms_myhero\"\r\narcade_sms_sensible = \"sms_sensible\"\r\narcade_sms_sf2 = \"sms_sf2\"\r\narcade_sms_shanghai = \"sms_shanghai\"\r\narcade_sms_shanghaip = \"sms_shanghai\"\r\narcade_sms_sharr3d = \"sms_sharr3d\"\r\narcade_sms_sharr3dj = \"sms_sharr3d\"\r\narcade_sms_sharrier = \"sms_sharrier\"\r\narcade_sms_sharrierju = \"sms_sharrier\"\r\narcade_sms_shavnyak = \"sms_shavnyak\"\r\narcade_sms_shdancer = \"sms_shdancer\"\r\narcade_sms_shinobi = \"sms_shinobi\"\r\narcade_sms_shinobij = \"sms_shinobi\"\r\narcade_sms_shooting = \"sms_shooting\"\r\narcade_sms_silvervalley = \"sms_silvervalley\"\r\narcade_sms_sitio = \"sms_sitio\"\r\narcade_sms_skickoff = \"sms_skickoff\"\r\narcade_sms_skyjag = \"sms_skyjag\"\r\narcade_sms_slapshot = \"sms_slapshot\"\r\narcade_sms_slapshota = \"sms_slapshot\"\r\narcade_sms_slapshotb = \"sms_slapshot\"\r\narcade_sms_slapshotp = \"sms_slapshot\"\r\narcade_sms_smashtv = \"sms_smashtv\"\r\narcade_sms_smgp = \"sms_smgp\"\r\narcade_sms_smgp2 = \"sms_smgp2\"\r\narcade_sms_smgpp1 = \"sms_smgp\"\r\narcade_sms_smgpp2 = \"sms_smgp\"\r\narcade_sms_smgpu = \"sms_smgp\"\r\narcade_sms_sms3samp = \"sms_sms3samp\"\r\narcade_sms_smurfs = \"sms_smurfs\"\r\narcade_sms_smurfs2 = \"sms_smurfs2\"\r\narcade_sms_smurfs2p = \"sms_smurfs2\"\r\narcade_sms_sn_ateam = \"sms_sn_ateam\"\r\narcade_sms_sn_lwep3 = \"sms_sn_lwep3\"\r\narcade_sms_solomon = \"sms_solomon\"\r\narcade_sms_sonic = \"sms_sonic\"\r\narcade_sms_sonic2 = \"sms_sonic2\"\r\narcade_sms_sonic2a = \"sms_sonic2\"\r\narcade_sms_sonicbls = \"sms_sonicbls\"\r\narcade_sms_sonicc = \"sms_sonicc\"\r\narcade_sms_sonicedu = \"sms_sonicedu\"\r\narcade_sms_sonicfm102 = \"sms_sonic\"\r\narcade_sms_sor = \"sms_sor\"\r\narcade_sms_sor2 = \"sms_sor2\"\r\narcade_sms_spacegun = \"sms_spacegun\"\r\narcade_sms_speedbl = \"sms_speedbl\"\r\narcade_sms_speedbl2 = \"sms_speedbl2\"\r\narcade_sms_speedblv = \"sms_speedblv\"\r\narcade_sms_spellcst = \"sms_spellcst\"\r\narcade_sms_spidermn = \"sms_spidermn\"\r\narcade_sms_spidking = \"sms_spidking\"\r\narcade_sms_sportsft = \"sms_sportsft\"\r\narcade_sms_sportssc = \"sms_worldsoc\"\r\narcade_sms_spyvsspy = \"sms_spyvsspy\"\r\narcade_sms_spyvsspyc = \"sms_spyvsspy\"\r\narcade_sms_spyvsspyj = \"sms_spyvsspy\"\r\narcade_sms_spyvsspyj1 = \"sms_spyvsspy\"\r\narcade_sms_spyvsspyk = \"sms_spyvsspy\"\r\narcade_sms_spyvsspys = \"sms_spyvsspy\"\r\narcade_sms_spyvsspytw = \"sms_spyvsspy\"\r\narcade_sms_ssinv = \"sms_ssinv\"\r\narcade_sms_sspin = \"sms_sspin\"\r\narcade_sms_sspirits = \"sms_sspirits\"\r\narcade_sms_starwars = \"sms_starwars\"\r\narcade_sms_stennis = \"sms_stennis\"\r\narcade_sms_stennisc = \"sms_stennis\"\r\narcade_sms_strider = \"sms_strider\"\r\narcade_sms_strider2 = \"sms_strider2\"\r\narcade_sms_striderd = \"sms_strider\"\r\narcade_sms_strtmast = \"sms_strtmast\"\r\narcade_sms_submarin = \"sms_submarin\"\r\narcade_sms_suhocheo = \"sms_suhocheo\"\r\narcade_sms_sukeban = \"sms_sukeban\"\r\narcade_sms_sumgames = \"sms_sumgames\"\r\narcade_sms_sumgamesp = \"sms_sumgames\"\r\narcade_sms_superark = \"sms_woodypop\"\r\narcade_sms_superman = \"sms_superman\"\r\narcade_sms_superoff = \"sms_superoff\"\r\narcade_sms_superrac = \"sms_superrac\"\r\narcade_sms_supgolf = \"sms_golfaman\"\r\narcade_sms_suprbskt = \"sms_suprbskt\"\r\narcade_sms_suprbubl = \"sms_bublbobl\"\r\narcade_sms_t2ag = \"sms_t2ag\"\r\narcade_sms_tazmania = \"sms_tazmania\"\r\narcade_sms_tazmaniap = \"sms_tazmania\"\r\narcade_sms_tazmars = \"sms_tazmars\"\r\narcade_sms_tblade = \"sms_tblade\"\r\narcade_sms_tbladej = \"sms_tblade\"\r\narcade_sms_tecmow92 = \"sms_tecmow92\"\r\narcade_sms_tecmow93 = \"sms_tecmow93\"\r\narcade_sms_teddyboy = \"sms_teddyboy\"\r\narcade_sms_teddyboyc = \"sms_teddyboy\"\r\narcade_sms_teddyboyj = \"sms_teddyboy\"\r\narcade_sms_teddyboyj1 = \"sms_teddyboy\"\r\narcade_sms_teddyboyjp = \"sms_teddyboy\"\r\narcade_sms_tennis = \"sms_tennis\"\r\narcade_sms_term2 = \"sms_term2\"\r\narcade_sms_termntr = \"sms_termntr\"\r\narcade_sms_termntrb = \"sms_termntr\"\r\narcade_sms_timesold = \"sms_timesold\"\r\narcade_sms_tnzs = \"sms_tnzs\"\r\narcade_sms_tomjermv = \"sms_tomjermv\"\r\narcade_sms_tomjerry = \"sms_tomjermv\"\r\narcade_sms_totowld3 = \"sms_totowld3\"\r\narcade_sms_transbot = \"sms_transbot\"\r\narcade_sms_transbotc = \"sms_transbot\"\r\narcade_sms_transbotp = \"sms_transbot\"\r\narcade_sms_treinam = \"sms_treinam\"\r\narcade_sms_trivial = \"sms_trivial\"\r\narcade_sms_ttoriui = \"sms_myhero\"\r\narcade_sms_turmamon = \"sms_wboy3\"\r\narcade_sms_tvcolos = \"sms_asterix\"\r\narcade_sms_ultima4 = \"sms_ultima4\"\r\narcade_sms_ultima4p = \"sms_ultima4\"\r\narcade_sms_ultsoccr = \"sms_ultsoccr\"\r\narcade_sms_vampire = \"sms_mastdark\"\r\narcade_sms_vfa = \"sms_vfa\"\r\narcade_sms_vigilant = \"sms_vigilant\"\r\narcade_sms_WaimanuSMS = \"sms_WaimanuSMS\"\r\narcade_sms_wanted = \"sms_wanted\"\r\narcade_sms_wboy = \"sms_wboy\"\r\narcade_sms_wboy3 = \"sms_wboy3\"\r\narcade_sms_wboya = \"sms_wboy\"\r\narcade_sms_wboymlnd = \"sms_wboymlnd\"\r\narcade_sms_wboymlnda = \"sms_wboymlnd\"\r\narcade_sms_wboymlndj = \"sms_wboymlnd\"\r\narcade_sms_wboymlndp = \"sms_wboymlnd\"\r\narcade_sms_wboymwld = \"sms_wboymwld\"\r\narcade_sms_wboymwldp = \"sms_wboymwld\"\r\narcade_sms_wclead = \"sms_wclead\"\r\narcade_sms_wcup90 = \"sms_wcup90\"\r\narcade_sms_wcup90d = \"sms_wcup90\"\r\narcade_sms_wcup94 = \"sms_wcup94\"\r\narcade_sms_wekainvaders10 = \"sms_wekainvaders10\"\r\narcade_sms_wimbled = \"sms_wimbled\"\r\narcade_sms_wimbled2 = \"sms_wimbled2\"\r\narcade_sms_wintol = \"sms_wintol\"\r\narcade_sms_wintolb = \"sms_wintol\"\r\narcade_sms_wldgames = \"sms_wldgames\"\r\narcade_sms_wldgamesp = \"sms_wldgames\"\r\narcade_sms_wolfchld = \"sms_wolfchld\"\r\narcade_sms_wonsiin = \"sms_wonsiin\"\r\narcade_sms_woodypop = \"sms_woodypop\"\r\narcade_sms_worldgp = \"sms_worldgp\"\r\narcade_sms_worldgpp = \"sms_worldgp\"\r\narcade_sms_worldgpu = \"sms_worldgp\"\r\narcade_sms_worldsoc = \"sms_worldsoc\"\r\narcade_sms_wpayton = \"sms_ameripf\"\r\narcade_sms_wwfsteel = \"sms_wwfsteel\"\r\narcade_sms_xenon2 = \"sms_xenon2\"\r\narcade_sms_xenon2v = \"sms_xenon2\"\r\narcade_sms_xevious = \"sms_xevious\"\r\narcade_sms_xmenmojo = \"sms_xmenmojo\"\r\narcade_sms_xyzolog = \"sms_xyzolog\"\r\narcade_sms_ys = \"sms_ys\"\r\narcade_sms_ysd = \"sms_ys\"\r\narcade_sms_ysj = \"sms_ys\"\r\narcade_sms_zaxxon3d = \"sms_zaxxon3d\"\r\narcade_sms_zaxxon3dp = \"sms_zaxxon3d\"\r\narcade_sms_zillion = \"sms_zillion\"\r\narcade_sms_zillion2 = \"sms_zillion2\"\r\narcade_sms_zilliona = \"sms_zillion\"\r\narcade_sms_zillionb = \"sms_zillion\"\r\narcade_sms_zool = \"sms_zool\"\r\narcade_smw = \"smw\"\r\narcade_smwa = \"smwa\"\r\narcade_smwj = \"smwj\"\r\narcade_smwu = \"smwu\"\r\narcade_snakepit = \"snakepit\"\r\narcade_snakjack = \"snakjack\"\r\narcade_snapjack = \"snapjack\"\r\narcade_snapper = \"snapper\"\r\narcade_sncwgltd = \"sncwgltd\"\r\narcade_sngkace = \"samuraia\"\r\narcade_sngkacea = \"samuraia\"\r\narcade_snowbalt = \"snowboar\"\r\narcade_snowboar = \"snowboar\"\r\narcade_snowboara = \"snowboar\"\r\narcade_snowbro2 = \"snowbro2\"\r\narcade_snowbro3 = \"snowbro3\"\r\narcade_snowbroa = \"snowbros\"\r\narcade_snowbrob = \"snowbros\"\r\narcade_snowbroj = \"snowbros\"\r\narcade_snowbros = \"snowbros\"\r\narcade_snowbrosa = \"snowbros\"\r\narcade_snowbrosb = \"snowbros\"\r\narcade_snowbrosc = \"snowbros\"\r\narcade_snowbrosd = \"snowbros\"\r\narcade_snowbrosj = \"snowbros\"\r\narcade_snowbroswb = \"snowbros\"\r\narcade_socbrawl = \"socbrawl\"\r\narcade_socbrawlh = \"socbrawl\"\r\narcade_soccer = \"soccer\"\r\narcade_soccerss = \"soccerss\"\r\narcade_sokonuke = \"sokonuke\"\r\narcade_sokyugrt = \"sokyugrt\"\r\narcade_solarfox = \"solarfox\"\r\narcade_solarq = \"solarq\"\r\narcade_solarwar = \"xsleena\"\r\narcade_soldam = \"soldam\"\r\narcade_soldamj = \"soldam\"\r\narcade_soldivid = \"soldivid\"\r\narcade_soldividk = \"soldivid\"\r\narcade_solfight = \"ozmawars\"\r\narcade_solfigtr = \"solfigtr\"\r\narcade_solomon = \"solomon\"\r\narcade_solomonj = \"solomon\"\r\narcade_solrwarr = \"xsleena\"\r\narcade_solvalou = \"solvalou\"\r\narcade_sonic = \"sonic\"\r\narcade_sonicbom = \"sonicbom\"\r\narcade_sonicbomd = \"sonicbom\"\r\narcade_sonicp = \"sonic\"\r\narcade_sonicwi = \"aerofgt\"\r\narcade_sonicwi2 = \"sonicwi2\"\r\narcade_sonicwi3 = \"sonicwi3\"\r\narcade_sonofphx = \"repulse\"\r\narcade_sonson = \"sonson\"\r\narcade_sonsonj = \"sonson\"\r\narcade_sos = \"sos\"\r\narcade_sotsugyo = \"sotsugyo\"\r\narcade_soukobdx = \"boxyboy\"\r\narcade_soulclbr = \"soulclbr\"\r\narcade_souledga = \"souledge\"\r\narcade_souledgb = \"souledge\"\r\narcade_souledge = \"souledge\"\r\narcade_spacbat2 = \"uniwars\"\r\narcade_spacbatt = \"uniwars\"\r\narcade_spacbeam = \"spacbeam\"\r\narcade_spacduel = \"spacduel\"\r\narcade_spaceat2 = \"invaders\"\r\narcade_spaceatt = \"invaders\"\r\narcade_spacebrd = \"spacefb\"\r\narcade_spacecho = \"speakres\"\r\narcade_spacecho2 = \"speakres\"\r\narcade_spacecr = \"spacecr\"\r\narcade_spacedem = \"spacefb\"\r\narcade_spacedx = \"spacedx\"\r\narcade_spacedxj = \"spacedx\"\r\narcade_spacedxo = \"spacedx\"\r\narcade_spacefb = \"spacefb\"\r\narcade_spacefbb = \"spacefb\"\r\narcade_spacefbg = \"spacefb\"\r\narcade_spacefev = \"spacefev\"\r\narcade_spacefrt = \"spacefrt\"\r\narcade_spacegun = \"spacegun\"\r\narcade_spacegunj = \"spacegun\"\r\narcade_spacegunu = \"spacegun\"\r\narcade_spaceint = \"spaceint\"\r\narcade_spacempr = \"uniwars\"\r\narcade_spaceod = \"spaceod\"\r\narcade_spaceph = \"ozmawars\"\r\narcade_spaceplt = \"timeplt\"\r\narcade_spaceskr = \"spaceskr\"\r\narcade_spacetrk = \"spacetrk\"\r\narcade_spacetrkc = \"spacetrk\"\r\narcade_spacewar = \"spacewar\"\r\narcade_spacewr3 = \"invaders\"\r\narcade_spacezap = \"spacezap\"\r\narcade_spacfura = \"spacfury\"\r\narcade_spacfury = \"spacfury\"\r\narcade_spang = \"spang\"\r\narcade_spangj = \"spang\"\r\narcade_sparkman = \"sparkman\"\r\narcade_sparkz = \"sparkz\"\r\narcade_spartanx = \"kungfum\"\r\narcade_spatter = \"spatter\"\r\narcade_spbactn = \"spbactn\"\r\narcade_spbactnj = \"spbactn\"\r\narcade_spcdrag = \"mooncrst\"\r\narcade_spcdraga = \"mooncrst\"\r\narcade_spceking = \"invaders\"\r\narcade_spcenctr = \"spcenctr\"\r\narcade_spcewarl = \"spclaser\"\r\narcade_spcewars = \"invaders\"\r\narcade_spcforc2 = \"spcforce\"\r\narcade_spcforce = \"spcforce\"\r\narcade_spcfrcii = \"spcfrcii\"\r\narcade_spcinv95 = \"spcinv95\"\r\narcade_spcinv95u = \"spcinv95\"\r\narcade_spcinvdj = \"spacedx\"\r\narcade_spcking2 = \"spcking2\"\r\narcade_spclaser = \"spclaser\"\r\narcade_spclforc = \"spclforc\"\r\narcade_spclorda = \"spclords\"\r\narcade_spclords = \"spclords\"\r\narcade_spcnv95u = \"spcinv95\"\r\narcade_spcpostn = \"spcpostn\"\r\narcade_spctbird = \"mooncrst\"\r\narcade_spdball = \"spdball\"\r\narcade_spdbuggy = \"spdbuggy\"\r\narcade_spdcoin = \"spdcoin\"\r\narcade_spdodgeb = \"spdodgeb\"\r\narcade_speakres = \"speakres\"\r\narcade_speakresb = \"speakres\"\r\narcade_spec2k = \"spec2k\"\r\narcade_spec2kh = \"spec2k\"\r\narcade_spectar = \"spectar\"\r\narcade_spectar1 = \"spectar\"\r\narcade_speedatk = \"speedatk\"\r\narcade_speedbal = \"speedbal\"\r\narcade_speedfrk = \"speedfrk\"\r\narcade_speedspn = \"speedspn\"\r\narcade_spelnkrj = \"spelunkr\"\r\narcade_spelunk2 = \"spelunk2\"\r\narcade_spelunkr = \"spelunkr\"\r\narcade_spelunkrj = \"spelunkr\"\r\narcade_spf2t = \"spf2t\"\r\narcade_spf2ta = \"spf2t\"\r\narcade_spf2td = \"spf2t\"\r\narcade_spf2th = \"spf2t\"\r\narcade_spf2tu = \"spf2t\"\r\narcade_spf2xj = \"spf2t\"\r\narcade_spf2xjd = \"spf2t\"\r\narcade_spidermi = \"spidermi\"\r\narcade_spiders = \"spiders\"\r\narcade_spiders2 = \"spiders\"\r\narcade_spidey = \"spidey\"\r\narcade_spideyj = \"spidey\"\r\narcade_spiero = \"dorunrun\"\r\narcade_spiker = \"spiker\"\r\narcade_spinlbrj = \"spinlbrk\"\r\narcade_spinlbrk = \"spinlbrk\"\r\narcade_spinlbrkj = \"spinlbrk\"\r\narcade_spinlbrku = \"spinlbrk\"\r\narcade_spinlbru = \"spinlbrk\"\r\narcade_spinmast = \"spinmast\"\r\narcade_splash = \"splash\"\r\narcade_splat = \"splat\"\r\narcade_splatter = \"splatter\"\r\narcade_splatter2 = \"splatter\"\r\narcade_splatterj = \"splatter\"\r\narcade_splndrbt = \"splndrbt\"\r\narcade_spnchotj = \"spnchout\"\r\narcade_spnchout = \"spnchout\"\r\narcade_spnchouta = \"spnchout\"\r\narcade_spnchoutj = \"spnchout\"\r\narcade_spool3 = \"pcktgal\"\r\narcade_spool3i = \"pcktgal\"\r\narcade_sprcros2 = \"sprcros2\"\r\narcade_sprcros2a = \"sprcros2\"\r\narcade_sprglbpg = \"suprglob\"\r\narcade_sprglobp = \"suprglob\"\r\narcade_springer = \"springer\"\r\narcade_sprint1 = \"sprint1\"\r\narcade_sprint2 = \"sprint1\"\r\narcade_sprint2a = \"sprint1\"\r\narcade_sprint4 = \"sprint4\"\r\narcade_sprint4a = \"sprint4\"\r\narcade_sprint8 = \"sprint8\"\r\narcade_sprint8a = \"sprint8\"\r\narcade_sprtmtch = \"drgpunch\"\r\narcade_sptrekct = \"spacetrk\"\r\narcade_spy = \"spy\"\r\narcade_spyhnt2a = \"spyhunt2\"\r\narcade_spyhunt = \"spyhunt\"\r\narcade_spyhunt2 = \"spyhunt2\"\r\narcade_spyu = \"spy\"\r\narcade_sqbert = \"sqbert\"\r\narcade_sqixbl = \"superqix\"\r\narcade_squash = \"squash\"\r\narcade_sraider = \"sraider\"\r\narcade_sranger = \"sranger\"\r\narcade_srangerb = \"rranger\"\r\narcade_srangerw = \"rranger\"\r\narcade_srdarwin = \"srdarwin\"\r\narcade_srdarwinj = \"srdarwin\"\r\narcade_srdarwnj = \"srdarwin\"\r\narcade_srdmissn = \"srdmissn\"\r\narcade_srmp2 = \"srmp2\"\r\narcade_srmp3 = \"srmp3\"\r\narcade_srmp4 = \"srmp4\"\r\narcade_srmp4o = \"srmp4\"\r\narcade_srmp7 = \"srmp7\"\r\narcade_srumbler = \"srumbler\"\r\narcade_srumbler2 = \"srumbler\"\r\narcade_srumbler3 = \"srumbler\"\r\narcade_srumblr2 = \"srumbler\"\r\narcade_ssanchan = \"spatter\"\r\narcade_sscandal = \"myhero\"\r\narcade_ssf2 = \"ssf2\"\r\narcade_ssf2a = \"ssf2\"\r\narcade_ssf2ar1 = \"ssf2\"\r\narcade_ssf2d = \"ssf2\"\r\narcade_ssf2h = \"ssf2\"\r\narcade_ssf2j = \"ssf2\"\r\narcade_ssf2jr1 = \"ssf2\"\r\narcade_ssf2jr2 = \"ssf2\"\r\narcade_ssf2r1 = \"ssf2\"\r\narcade_ssf2t = \"ssf2t\"\r\narcade_ssf2ta = \"ssf2t\"\r\narcade_ssf2tad = \"ssf2t\"\r\narcade_ssf2tb = \"ssf2\"\r\narcade_ssf2tba = \"ssf2\"\r\narcade_ssf2tbd = \"ssf2\"\r\narcade_ssf2tbh = \"ssf2\"\r\narcade_ssf2tbj = \"ssf2\"\r\narcade_ssf2tbj1 = \"ssf2\"\r\narcade_ssf2tbr1 = \"ssf2\"\r\narcade_ssf2td = \"ssf2t\"\r\narcade_ssf2th = \"ssf2t\"\r\narcade_ssf2tu = \"ssf2t\"\r\narcade_ssf2tur1 = \"ssf2t\"\r\narcade_ssf2u = \"ssf2\"\r\narcade_ssf2ud = \"ssf2\"\r\narcade_ssf2xj = \"ssf2t\"\r\narcade_ssf2xjr1 = \"ssf2t\"\r\narcade_ssf2xjr1d = \"ssf2t\"\r\narcade_ssf2xjr1r = \"ssf2t\"\r\narcade_sshangha = \"sshangha\"\r\narcade_sshanghb = \"sshangha\"\r\narcade_sshooter = \"sshooter\"\r\narcade_sshot137 = \"shufshot\"\r\narcade_ssi = \"ssi\"\r\narcade_ssideki = \"ssideki\"\r\narcade_ssideki2 = \"ssideki2\"\r\narcade_ssideki3 = \"ssideki3\"\r\narcade_ssideki4 = \"ssideki4\"\r\narcade_sslam = \"sslam\"\r\narcade_ssmissin = \"ssmissin\"\r\narcade_ssoldier = \"ssoldier\"\r\narcade_ssonicbr = \"ssonicbr\"\r\narcade_ssozumo = \"ssozumo\"\r\narcade_sspacaho = \"sspacaho\"\r\narcade_sspacat2 = \"sspaceat\"\r\narcade_sspacatc = \"sspaceat\"\r\narcade_sspaceat = \"sspaceat\"\r\narcade_sspaceat2 = \"sspaceat\"\r\narcade_sspaceat3 = \"sspaceat\"\r\narcade_sspaceatc = \"sspaceat\"\r\narcade_sspeedr = \"sspeedr\"\r\narcade_sspirits = \"sspirits\"\r\narcade_sspring1 = \"ssprint\"\r\narcade_ssprint = \"ssprint\"\r\narcade_ssprint1 = \"ssprint\"\r\narcade_ssprint3 = \"ssprint\"\r\narcade_ssprintf = \"ssprint\"\r\narcade_ssprintg = \"ssprint\"\r\narcade_ssprints = \"ssprint\"\r\narcade_ssrdrabd = \"ssriders\"\r\narcade_ssrdrebc = \"ssriders\"\r\narcade_ssrdrebd = \"ssriders\"\r\narcade_ssrdrjbd = \"ssriders\"\r\narcade_ssrdruac = \"ssriders\"\r\narcade_ssrdrubc = \"ssriders\"\r\narcade_ssrdruda = \"ssriders\"\r\narcade_ssriders = \"ssriders\"\r\narcade_ssridersabd = \"ssriders\"\r\narcade_ssridersadd = \"ssriders\"\r\narcade_ssridersb = \"ssriders\"\r\narcade_ssriderseaa = \"ssriders\"\r\narcade_ssridersebc = \"ssriders\"\r\narcade_ssridersebd = \"ssriders\"\r\narcade_ssridersjac = \"ssriders\"\r\narcade_ssridersjad = \"ssriders\"\r\narcade_ssridersjbd = \"ssriders\"\r\narcade_ssridersuab = \"ssriders\"\r\narcade_ssridersuac = \"ssriders\"\r\narcade_ssridersubc = \"ssriders\"\r\narcade_ssridersuda = \"ssriders\"\r\narcade_ssrj = \"ssrj\"\r\narcade_sss = \"sss\"\r\narcade_sstarcrs = \"mooncrst\"\r\narcade_sstingry = \"sstingry\"\r\narcade_sstrangr = \"sstrangr\"\r\narcade_sstrangr2 = \"sstrangr\"\r\narcade_sstrike = \"sstrike\"\r\narcade_sstriker = \"sstriker\"\r\narcade_sstrikerk = \"sstriker\"\r\narcade_sstrngr2 = \"sstrngr2\"\r\narcade_stactics = \"stactics\"\r\narcade_stadhero = \"stadhero\"\r\narcade_stadhr96 = \"stadhr96\"\r\narcade_stadhr96j = \"stadhr96\"\r\narcade_stadhr96u = \"stadhr96\"\r\narcade_stagger1 = \"stagger1\"\r\narcade_stakwin = \"stakwin\"\r\narcade_stakwin2 = \"stakwin2\"\r\narcade_starblad = \"starblad\"\r\narcade_starcas = \"starcas\"\r\narcade_starcas1 = \"starcas\"\r\narcade_starcase = \"starcas\"\r\narcade_starcasp = \"starcas\"\r\narcade_starcrus = \"starcrus\"\r\narcade_starfght = \"galaxian\"\r\narcade_starfgmc = \"mooncrst\"\r\narcade_starfigh = \"starfigh\"\r\narcade_starfira = \"starfire\"\r\narcade_starfire = \"starfire\"\r\narcade_starforc = \"starforc\"\r\narcade_starfore = \"starforc\"\r\narcade_stargate = \"stargate\"\r\narcade_starglad = \"starglad\"\r\narcade_stargrds = \"stargrds\"\r\narcade_starhawk = \"starhawk\"\r\narcade_starjack = \"starjack\"\r\narcade_starjacks = \"starjack\"\r\narcade_starjacs = \"starjack\"\r\narcade_starlstr = \"starlstr\"\r\narcade_starrkr = \"brdrline\"\r\narcade_starshp1 = \"starshp1\"\r\narcade_starshpp = \"starshp1\"\r\narcade_starswep = \"starswep\"\r\narcade_startrek = \"startrek\"\r\narcade_startrks = \"startrks\"\r\narcade_starw = \"galxwars\"\r\narcade_starwar1 = \"starwars\"\r\narcade_starwars = \"starwars\"\r\narcade_statriv2 = \"statriv2\"\r\narcade_stdragon = \"stdragon\"\r\narcade_stdragona = \"stdragon\"\r\narcade_stdragonb = \"stdragon\"\r\narcade_steelta1 = \"steeltal\"\r\narcade_steeltag = \"steeltal\"\r\narcade_steeltal = \"steeltal\"\r\narcade_steeltap = \"steeltal\"\r\narcade_stellcas = \"starcas\"\r\narcade_stera = \"mooncrst\"\r\narcade_stfight = \"empcity\"\r\narcade_stg = \"stg\"\r\narcade_stinger = \"stinger\"\r\narcade_stinger2 = \"stinger\"\r\narcade_stkclmns = \"stkclmns\"\r\narcade_stlforce = \"stlforce\"\r\narcade_stmblade = \"stmblade\"\r\narcade_stmbladej = \"stmblade\"\r\narcade_stocker = \"stocker\"\r\narcade_stoffy = \"stoffy\"\r\narcade_stompin = \"stompin\"\r\narcade_stoneage = \"cninja\"\r\narcade_stoneba2 = \"stonebal\"\r\narcade_stonebal = \"stonebal\"\r\narcade_storming = \"lsasquad\"\r\narcade_strahl = \"strahl\"\r\narcade_strahla = \"strahl\"\r\narcade_stratab = \"stratab\"\r\narcade_stratab1 = \"stratab\"\r\narcade_stratgys = \"stratgyx\"\r\narcade_stratgyx = \"stratgyx\"\r\narcade_stratof = \"stratof\"\r\narcade_stratvox = \"speakres\"\r\narcade_stratvoxb = \"speakres\"\r\narcade_streakng = \"streakng\"\r\narcade_streaknga = \"streakng\"\r\narcade_streets1 = \"streetsm\"\r\narcade_streetsj = \"streetsm\"\r\narcade_streetsm = \"streetsm\"\r\narcade_streetsm1 = \"streetsm\"\r\narcade_streetsmj = \"streetsm\"\r\narcade_streetsmw = \"streetsm\"\r\narcade_streetsw = \"streetsm\"\r\narcade_strfbomb = \"scramble\"\r\narcade_strhoop = \"strhoop\"\r\narcade_strider = \"strider\"\r\narcade_strider2 = \"strider2\"\r\narcade_striderj = \"strider\"\r\narcade_striderjr = \"strider\"\r\narcade_striderua = \"strider\"\r\narcade_strideruc = \"strider\"\r\narcade_stridr2a = \"strider2\"\r\narcade_stridrja = \"strider\"\r\narcade_stridrua = \"strider\"\r\narcade_striv = \"striv\"\r\narcade_strivf = \"striv\"\r\narcade_strkfgtr = \"strkfgtr\"\r\narcade_strkfgtrj = \"strkfgtr\"\r\narcade_strkforc = \"strkforc\"\r\narcade_strkzone = \"strkzone\"\r\narcade_strnskil = \"strnskil\"\r\narcade_strongx = \"stratgyx\"\r\narcade_strtheat = \"strtheat\"\r\narcade_strvmstr = \"strvmstr\"\r\narcade_stunrn2e = \"stunrun\"\r\narcade_stunrn3e = \"stunrun\"\r\narcade_stunrun = \"stunrun\"\r\narcade_stunrun0 = \"stunrun\"\r\narcade_stunrun2 = \"stunrun\"\r\narcade_stunrun3 = \"stunrun\"\r\narcade_stunrun4 = \"stunrun\"\r\narcade_stunrun5 = \"stunrun\"\r\narcade_stunrune = \"stunrun\"\r\narcade_stunrunj = \"stunrun\"\r\narcade_stunrunp = \"stunrun\"\r\narcade_sub = \"sub\"\r\narcade_subhunt = \"depthch\"\r\narcade_subroc3d = \"subroc3d\"\r\narcade_subs = \"subs\"\r\narcade_sucasino = \"sucasino\"\r\narcade_suikoenb = \"suikoenb\"\r\narcade_sunaq = \"sunaq\"\r\narcade_sundance = \"sundance\"\r\narcade_sunsetbl = \"ssriders\"\r\narcade_supbtime = \"supbtime\"\r\narcade_supbtimea = \"supbtime\"\r\narcade_supbtimej = \"supbtime\"\r\narcade_supbtimj = \"supbtime\"\r\narcade_supcrash = \"headon\"\r\narcade_supdrapo = \"supdrapo\"\r\narcade_superbar = \"wiggie\"\r\narcade_superbik = \"superbik\"\r\narcade_superbon = \"superbon\"\r\narcade_superbug = \"superbug\"\r\narcade_superchs = \"superchs\"\r\narcade_superchsj = \"superchs\"\r\narcade_superchsu = \"superchs\"\r\narcade_superg = \"galaxian\"\r\narcade_supergx = \"galaxian\"\r\narcade_superinv = \"invaders\"\r\narcade_superman = \"superman\"\r\narcade_supermanj = \"superman\"\r\narcade_supermanu = \"superman\"\r\narcade_superpac = \"superpac\"\r\narcade_superpacm = \"superpac\"\r\narcade_superpcm = \"superpac\"\r\narcade_superqix = \"superqix\"\r\narcade_superspy = \"superspy\"\r\narcade_superten = \"superten\"\r\narcade_supertnk = \"supertnk\"\r\narcade_supertr2 = \"supertr2\"\r\narcade_superx = \"superx\"\r\narcade_superxm = \"superx\"\r\narcade_supmodel = \"supmodel\"\r\narcade_suprglob = \"suprglob\"\r\narcade_suprheli = \"scobra\"\r\narcade_suprleag = \"suprleag\"\r\narcade_suprloco = \"suprloco\"\r\narcade_suprlocoo = \"suprloco\"\r\narcade_suprmatk = \"missile\"\r\narcade_suprmous = \"suprmous\"\r\narcade_suprmrio = \"suprmrio\"\r\narcade_suprridr = \"suprridr\"\r\narcade_suprslam = \"suprslam\"\r\narcade_suprtrio = \"suprtrio\"\r\narcade_supxevs = \"supxevs\"\r\narcade_suratk = \"suratk\"\r\narcade_suratka = \"suratk\"\r\narcade_suratkj = \"suratk\"\r\narcade_surpratk = \"surpratk\"\r\narcade_survarts = \"survarts\"\r\narcade_survartsj = \"survarts\"\r\narcade_survartsu = \"survarts\"\r\narcade_survival = \"survival\"\r\narcade_sutapper = \"tapper\"\r\narcade_suzuk8h2 = \"suzuk8h2\"\r\narcade_suzuk8h2j = \"suzuk8h2\"\r\narcade_suzuk8hj = \"suzuka8h\"\r\narcade_suzuka8h = \"suzuka8h\"\r\narcade_suzuka8hj = \"suzuka8h\"\r\narcade_suzume = \"suzume\"\r\narcade_svc = \"svc\"\r\narcade_svcboot = \"svc\"\r\narcade_svcpcb = \"svcpcb\"\r\narcade_svcpcba = \"svcpcb\"\r\narcade_svcplus = \"svc\"\r\narcade_svcplusa = \"svc\"\r\narcade_svcsplus = \"svc\"\r\narcade_svf = \"svf\"\r\narcade_svg = \"svg\"\r\narcade_svgpcb = \"svg\"\r\narcade_svgtw = \"svg\"\r\narcade_svolley = \"svolley\"\r\narcade_svolleyk = \"svolley\"\r\narcade_svolleyu = \"svolley\"\r\narcade_svolly91 = \"pspikes\"\r\narcade_svs = \"svf\"\r\narcade_swarm = \"galaxian\"\r\narcade_swat = \"swat\"\r\narcade_swatpolc = \"swatpolc\"\r\narcade_swcourt = \"swcourt\"\r\narcade_swimmer = \"swimmer\"\r\narcade_swimmera = \"swimmer\"\r\narcade_swimmerb = \"swimmer\"\r\narcade_sws = \"sws\"\r\narcade_sws92 = \"sws92\"\r\narcade_sws92g = \"sws92\"\r\narcade_sws93 = \"sws93\"\r\narcade_sws95 = \"sws95\"\r\narcade_sws96 = \"sws96\"\r\narcade_sws97 = \"sws97\"\r\narcade_sws99 = \"sws99\"\r\narcade_sxevious = \"xevious\"\r\narcade_sxyreac2 = \"sxyreac2\"\r\narcade_sxyreact = \"sxyreact\"\r\narcade_syscheck = \"syscheck\"\r\narcade_syvalion = \"syvalion\"\r\narcade_syvalionp = \"syvalion\"\r\narcade_syvalionu = \"syvalion\"\r\narcade_syvalionw = \"syvalion\"\r\narcade_szaxxon = \"szaxxon\"\r\narcade_tacscan = \"tacscan\"\r\narcade_tactcan2 = \"tactcian\"\r\narcade_tactcian = \"tactcian\"\r\narcade_tactcian2 = \"tactcian\"\r\narcade_tagteam = \"bigprowr\"\r\narcade_tail2nos = \"tail2nos\"\r\narcade_tailg = \"tailg\"\r\narcade_tangtang = \"tangtang\"\r\narcade_tankbatt = \"tankbatt\"\r\narcade_tankbust = \"tankbust\"\r\narcade_tankfrce = \"tankfrce\"\r\narcade_tankfrce4 = \"tankfrce\"\r\narcade_tankfrcej = \"tankfrce\"\r\narcade_tankfrcj = \"tankfrce\"\r\narcade_tantr = \"tantr\"\r\narcade_tantrbl = \"tantr\"\r\narcade_tantrbl2 = \"tantr\"\r\narcade_taotaida = \"taotaido\"\r\narcade_taotaido = \"taotaido\"\r\narcade_taotaidoa = \"taotaido\"\r\narcade_tapper = \"tapper\"\r\narcade_tappera = \"tapper\"\r\narcade_targ = \"targ\"\r\narcade_targc = \"targ\"\r\narcade_targeth = \"targeth\"\r\narcade_tattass = \"tattass\"\r\narcade_tattassa = \"tattass\"\r\narcade_taxidrvr = \"taxidrvr\"\r\narcade_tazmani2 = \"tazmania\"\r\narcade_tazmania = \"tazmania\"\r\narcade_tazzmang = \"tazmania\"\r\narcade_tazzmang2 = \"tazmania\"\r\narcade_tbowl = \"tbowl\"\r\narcade_tbowla = \"tbowl\"\r\narcade_tbowlj = \"tbowl\"\r\narcade_tbowlp = \"tbowl\"\r\narcade_tbyahhoo = \"tbyahhoo\"\r\narcade_tceptor = \"tceptor\"\r\narcade_tceptor2 = \"tceptor\"\r\narcade_tcobra2 = \"tcobra2\"\r\narcade_tcobra2u = \"tcobra2\"\r\narcade_tdfever = \"tdfever\"\r\narcade_tdfever2 = \"tdfever\"\r\narcade_tdfeverj = \"tdfever\"\r\narcade_tdpgal = \"tdpgal\"\r\narcade_tdragon = \"tdragon\"\r\narcade_tdragon1 = \"tdragon\"\r\narcade_tdragon2 = \"tdragon2\"\r\narcade_tdragon2a = \"tdragon2\"\r\narcade_tdragon3h = \"tdragon2\"\r\narcade_tdragonb = \"tdragon\"\r\narcade_teamqb = \"teamqb\"\r\narcade_teamqb2 = \"teamqb\"\r\narcade_techromn = \"techromn\"\r\narcade_teddybb = \"teddybb\"\r\narcade_teddybbo = \"teddybb\"\r\narcade_teddybbobl = \"teddybb\"\r\narcade_teedoff = \"teedoff\"\r\narcade_teetert = \"teetert\"\r\narcade_tehkanwc = \"tehkanwc\"\r\narcade_tekipaki = \"tekipaki\"\r\narcade_tekipakit = \"tekipaki\"\r\narcade_tekken = \"tekken\"\r\narcade_tekken2 = \"tekken2\"\r\narcade_tekken2a = \"tekken2\"\r\narcade_tekken2b = \"tekken2\"\r\narcade_tekken3 = \"tekken3\"\r\narcade_tekkena = \"tekken\"\r\narcade_tekkenb = \"tekken\"\r\narcade_tekkentt = \"tekkentt\"\r\narcade_teljan = \"teljan\"\r\narcade_telmahjn = \"telmahjn\"\r\narcade_tempest = \"tempest\"\r\narcade_tempest1 = \"tempest\"\r\narcade_tempest2 = \"tempest\"\r\narcade_tempest3 = \"tempest\"\r\narcade_temptube = \"tempest\"\r\narcade_tengai = \"tengai\"\r\narcade_tengaij = \"tengai\"\r\narcade_teplus2j = \"tetrisp2\"\r\narcade_term2 = \"term2\"\r\narcade_term2la1 = \"term2\"\r\narcade_term2la2 = \"term2\"\r\narcade_terracra = \"terracre\"\r\narcade_terracrb = \"terracre\"\r\narcade_terracre = \"terracre\"\r\narcade_terracrea = \"terracre\"\r\narcade_terracren = \"terracre\"\r\narcade_terracreo = \"terracre\"\r\narcade_terraf = \"terraf\"\r\narcade_terrafb = \"terraf\"\r\narcade_terrafj = \"terraf\"\r\narcade_terrafjb = \"terraf\"\r\narcade_terrafu = \"terraf\"\r\narcade_tetrbx = \"tetrbx\"\r\narcade_tetris = \"tetris\"\r\narcade_tetris1 = \"tetris\"\r\narcade_tetris1d = \"tetris\"\r\narcade_tetris2 = \"tetris\"\r\narcade_tetris2d = \"tetris\"\r\narcade_tetris3 = \"tetris\"\r\narcade_tetris3d = \"tetris\"\r\narcade_tetrisa = \"tetris\"\r\narcade_tetrisbl = \"tetris\"\r\narcade_tetrisd = \"tetris\"\r\narcade_tetrisp = \"tetrisp\"\r\narcade_tetrisp2 = \"tetrisp2\"\r\narcade_tetrisp2j = \"tetrisp2\"\r\narcade_tetrisp2ja = \"tetrisp2\"\r\narcade_tetrisse = \"tetrisse\"\r\narcade_tetrist = \"tetris\"\r\narcade_tetrista = \"tetris\"\r\narcade_tetristh = \"tetris\"\r\narcade_tetrsark = \"tetrsark\"\r\narcade_tfrceac = \"tfrceac\"\r\narcade_tfrceacb = \"tfrceac\"\r\narcade_tfrceacj = \"tfrceac\"\r\narcade_tg_acrush = \"tg_acrush\"\r\narcade_tg_advislnd = \"tg_advislnd\"\r\narcade_tg_aeroblst = \"tg_aeroblst\"\r\narcade_tg_airzonk = \"tg_airzonk\"\r\narcade_tg_ballistx = \"tg_ballistx\"\r\narcade_tg_batlroyl = \"tg_batlroyl\"\r\narcade_tg_blazlazr = \"tg_blazlazr\"\r\narcade_tg_blodwolf = \"tg_blodwolf\"\r\narcade_tg_bombman = \"tg_bombman\"\r\narcade_tg_bombmn93 = \"tg_bombmn93\"\r\narcade_tg_bonk = \"tg_bonk\"\r\narcade_tg_bonk2 = \"tg_bonk2\"\r\narcade_tg_bonk3 = \"tg_bonk3\"\r\narcade_tg_boxyboy = \"tg_boxyboy\"\r\narcade_tg_bravoman = \"tg_bravoman\"\r\narcade_tg_cadash = \"tg_cadash\"\r\narcade_tg_cdsys = \"tg_cdsys\"\r\narcade_tg_chasehq = \"tg_chasehq\"\r\narcade_tg_chewman = \"tg_chewman\"\r\narcade_tg_chinawar = \"tg_chinawar\"\r\narcade_tg_cratermz = \"tg_cratermz\"\r\narcade_tg_cybrcore = \"tg_cybrcore\"\r\narcade_tg_darkwing = \"tg_darkwing\"\r\narcade_tg_daviscup = \"tg_daviscup\"\r\narcade_tg_ddungw = \"tg_ddungw\"\r\narcade_tg_deadmoon = \"tg_deadmoon\"\r\narcade_tg_deepblue = \"tg_deepblue\"\r\narcade_tg_devlcrsh = \"tg_devlcrsh\"\r\narcade_tg_dragcrse = \"tg_dragcrse\"\r\narcade_tg_dropoff = \"tg_dropoff\"\r\narcade_tg_dspirit = \"tg_dspirit\"\r\narcade_tg_dungexpl = \"tg_dungexpl\"\r\narcade_tg_falcon = \"tg_falcon\"\r\narcade_tg_fantzone = \"tg_fantzone\"\r\narcade_tg_finallap = \"tg_finallap\"\r\narcade_tg_forevbox = \"tg_forevbox\"\r\narcade_tg_galaga90 = \"tg_galaga90\"\r\narcade_tg_ghostman = \"tg_ghostman\"\r\narcade_tg_griffon = \"tg_griffon\"\r\narcade_tg_gunboat = \"tg_gunboat\"\r\narcade_tg_hitice = \"tg_hitice\"\r\narcade_tg_impossam = \"tg_impossam\"\r\narcade_tg_jchan = \"tg_jchan\"\r\narcade_tg_jjnjeff = \"tg_jjnjeff\"\r\narcade_tg_keithcor = \"tg_keithcor\"\r\narcade_tg_kingcasn = \"tg_kingcasn\"\r\narcade_tg_klax = \"tg_klax\"\r\narcade_tg_legaxe = \"tg_legaxe\"\r\narcade_tg_legaxe2 = \"tg_legaxe2\"\r\narcade_tg_loht = \"tg_loht\"\r\narcade_tg_magchase = \"tg_magchase\"\r\narcade_tg_miltrymd = \"tg_miltrymd\"\r\narcade_tg_motoroad = \"tg_motoroad\"\r\narcade_tg_neutopi2 = \"tg_neutopi2\"\r\narcade_tg_neutopia = \"tg_neutopia\"\r\narcade_tg_nicklaus = \"tg_nicklaus\"\r\narcade_tg_nightcr = \"tg_nightcr\"\r\narcade_tg_nspirit = \"tg_nspirit\"\r\narcade_tg_ordyne = \"tg_ordyne\"\r\narcade_tg_pacland = \"tg_pacland\"\r\narcade_tg_panzakb = \"tg_panzakb\"\r\narcade_tg_parasol = \"tg_parasol\"\r\narcade_tg_pgolf = \"tg_pgolf\"\r\narcade_tg_psychos = \"tg_psychos\"\r\narcade_tg_raiden = \"tg_raiden\"\r\narcade_tg_rtype = \"tg_rtype\"\r\narcade_tg_samuraig = \"tg_samuraig\"\r\narcade_tg_scdsys = \"tg_scdsys\"\r\narcade_tg_sharrier = \"tg_sharrier\"\r\narcade_tg_shockman = \"tg_shockman\"\r\narcade_tg_sidearms = \"tg_sidearms\"\r\narcade_tg_silentd = \"tg_silentd\"\r\narcade_tg_sinistrn = \"tg_sinistrn\"\r\narcade_tg_soldblad = \"tg_soldblad\"\r\narcade_tg_somerass = \"tg_somerass\"\r\narcade_tg_splatth = \"tg_splatth\"\r\narcade_tg_sssoldr = \"tg_sssoldr\"\r\narcade_tg_svolley = \"tg_svolley\"\r\narcade_tg_taknhoop = \"tg_taknhoop\"\r\narcade_tg_talespin = \"tg_talespin\"\r\narcade_tg_tigerrod = \"tg_tigerrod\"\r\narcade_tg_timcrus = \"tg_timcrus\"\r\narcade_tg_timeball = \"tg_timeball\"\r\narcade_tg_tricky = \"tg_tricky\"\r\narcade_tg_turrican = \"tg_turrican\"\r\narcade_tg_tvbasket = \"tg_tvbasket\"\r\narcade_tg_tvfootbl = \"tg_tvfootbl\"\r\narcade_tg_tvhockey = \"tg_tvhockey\"\r\narcade_tg_veigues = \"tg_veigues\"\r\narcade_tg_victoryr = \"tg_victoryr\"\r\narcade_tg_vigilant = \"tg_vigilant\"\r\narcade_tg_wbeach = \"tg_wbeach\"\r\narcade_tg_wcbasebl = \"tg_wcbasebl\"\r\narcade_tg_wctennis = \"tg_wctennis\"\r\narcade_tg_wscomp = \"tg_wscomp\"\r\narcade_tg_yobro = \"tg_yobro\"\r\narcade_tgm2 = \"tgm2\"\r\narcade_tgm2p = \"tgm2\"\r\narcade_tgmj = \"tgmj\"\r\narcade_tgtball = \"tgtball\"\r\narcade_tharierj = \"tharrier\"\r\narcade_tharrier = \"tharrier\"\r\narcade_tharrieru = \"tharrier\"\r\narcade_thedeep = \"thedeep\"\r\narcade_theend = \"theend\"\r\narcade_theends = \"theend\"\r\narcade_theglad = \"theglad\"\r\narcade_theglad100 = \"theglad\"\r\narcade_theglad101 = \"theglad\"\r\narcade_thegladpcb = \"theglad\"\r\narcade_theglob = \"suprglob\"\r\narcade_theglob2 = \"suprglob\"\r\narcade_theglob3 = \"suprglob\"\r\narcade_theglobp = \"suprglob\"\r\narcade_thehand = \"thehand\"\r\narcade_thehustj = \"thehustl\"\r\narcade_thehustl = \"rackemup\"\r\narcade_thehustlj = \"rackemup\"\r\narcade_themj = \"themj\"\r\narcade_thepit = \"thepit\"\r\narcade_thepitj = \"thepit\"\r\narcade_thepitm = \"thepit\"\r\narcade_thepitu1 = \"thepit\"\r\narcade_thepitu2 = \"thepit\"\r\narcade_theroes = \"theroes\"\r\narcade_thetogyu = \"bullfgt\"\r\narcade_thief = \"thief\"\r\narcade_thndblst = \"lethalth\"\r\narcade_thnderxj = \"thunderx\"\r\narcade_thndfoxj = \"thundfox\"\r\narcade_thndfoxu = \"thundfox\"\r\narcade_thndrbdj = \"thndrbld\"\r\narcade_thndrbld = \"thndrbld\"\r\narcade_thndrbld1 = \"thndrbld\"\r\narcade_thndrbldd = \"thndrbld\"\r\narcade_thndrx2 = \"thndrx2\"\r\narcade_thndrx2a = \"thndrx2\"\r\narcade_thndrx2j = \"thndrx2\"\r\narcade_thndzone = \"thndzone\"\r\narcade_thndzone4 = \"thndzone\"\r\narcade_thndzonea = \"thndzone\"\r\narcade_thndzonej = \"thndzone\"\r\narcade_thoop = \"thoop\"\r\narcade_thoop2 = \"thoop2\"\r\narcade_thoop2a = \"thoop2\"\r\narcade_thunderj = \"thunderj\"\r\narcade_thunderl = \"thunderl\"\r\narcade_thunderx = \"thunderx\"\r\narcade_thunderxa = \"thunderx\"\r\narcade_thunderxb = \"thunderx\"\r\narcade_thunderxj = \"thunderx\"\r\narcade_thundfox = \"thundfox\"\r\narcade_thundfoxj = \"thundfox\"\r\narcade_thundfoxu = \"thundfox\"\r\narcade_thunt = \"sandor\"\r\narcade_tickee = \"tickee\"\r\narcade_tigerh = \"tigerh\"\r\narcade_tigerh2 = \"tigerh\"\r\narcade_tigerhb1 = \"tigerh\"\r\narcade_tigerhb2 = \"tigerh\"\r\narcade_tigerhb3 = \"tigerh\"\r\narcade_tigerhj = \"tigerh\"\r\narcade_tigeroad = \"tigeroad\"\r\narcade_tigeroadb = \"tigeroad\"\r\narcade_tigeroadb2 = \"tigeroad\"\r\narcade_tigeroadu = \"tigeroad\"\r\narcade_timber = \"timber\"\r\narcade_timecrsa = \"timecrsa\"\r\narcade_timefgtr = \"timefgtr\"\r\narcade_timek131 = \"timekill\"\r\narcade_timekill = \"timekill\"\r\narcade_timelimt = \"timelimt\"\r\narcade_timeplt = \"timeplt\"\r\narcade_timeplta = \"timeplt\"\r\narcade_timepltc = \"timeplt\"\r\narcade_timescan = \"timescan\"\r\narcade_timescan1 = \"timescan\"\r\narcade_timesol1 = \"timesold\"\r\narcade_timesold = \"timesold\"\r\narcade_timesold1 = \"timesold\"\r\narcade_timesupd = \"timesupd\"\r\narcade_timetunl = \"timetunl\"\r\narcade_timscanr = \"timscanr\"\r\narcade_tinklpit = \"tinklpit\"\r\narcade_tinstar = \"tinstar\"\r\narcade_tinv2650 = \"sia2650\"\r\narcade_tiptop = \"congo\"\r\narcade_titlef = \"titlef\"\r\narcade_tjumpman = \"tjumpman\"\r\narcade_tkdensho = \"tkdensho\"\r\narcade_tkdenshoa = \"tkdensho\"\r\narcade_tkmmpzdm = \"tkmmpzdm\"\r\narcade_tknight = \"wildfang\"\r\narcade_tkoboxng = \"tkoboxng\"\r\narcade_tmek = \"tmek\"\r\narcade_tmekprot = \"tmek\"\r\narcade_tmht = \"tmnt\"\r\narcade_tmht22pe = \"tmnt2\"\r\narcade_tmht24pe = \"tmnt2\"\r\narcade_tmht2p = \"tmnt\"\r\narcade_tmht2pa = \"tmnt\"\r\narcade_tmhta = \"tmnt\"\r\narcade_tmhtb = \"tmnt\"\r\narcade_tmmjprd = \"tmmjprd\"\r\narcade_tmnt = \"tmnt\"\r\narcade_tmnt2 = \"tmnt2\"\r\narcade_tmnt22p = \"tmnt2\"\r\narcade_tmnt22pu = \"tmnt2\"\r\narcade_tmnt2a = \"tmnt2\"\r\narcade_tmnt2pj = \"tmnt\"\r\narcade_tmnt2po = \"tmnt\"\r\narcade_tmnta = \"tmnt\"\r\narcade_tmnti = \"tmnti\"\r\narcade_tmntia = \"tmnti\"\r\narcade_tmntj = \"tmnt\"\r\narcade_tmntu = \"tmnt\"\r\narcade_tmntua = \"tmnt\"\r\narcade_tmntub = \"tmnt\"\r\narcade_tndrcade = \"tndrcade\"\r\narcade_tndrcadej = \"tndrcade\"\r\narcade_tndrcadj = \"tndrcade\"\r\narcade_tnexspce = \"tnexspce\"\r\narcade_tnextspc = \"tnextspc\"\r\narcade_tnextspc2 = \"tnextspc\"\r\narcade_tnextspcj = \"tnextspc\"\r\narcade_tnk3 = \"tnk3\"\r\narcade_tnk3j = \"tnk3\"\r\narcade_tnzs = \"tnzs\"\r\narcade_tnzs2 = \"tnzs\"\r\narcade_tnzsb = \"tnzs\"\r\narcade_tnzsj = \"tnzs\"\r\narcade_tnzsjo = \"tnzs\"\r\narcade_tnzso = \"tnzs\"\r\narcade_tnzsoa = \"tnzs\"\r\narcade_tnzsop = \"tnzs\"\r\narcade_tnzsuo = \"tnzs\"\r\narcade_todruaga = \"todruaga\"\r\narcade_todruagao = \"todruaga\"\r\narcade_todruagas = \"todruaga\"\r\narcade_todruago = \"todruaga\"\r\narcade_toffy = \"toffy\"\r\narcade_toggle = \"toggle\"\r\narcade_toki = \"toki\"\r\narcade_tokia = \"toki\"\r\narcade_tokib = \"toki\"\r\narcade_tokij = \"toki\"\r\narcade_tokimbsj = \"tokyogal\"\r\narcade_tokio = \"tokio\"\r\narcade_tokiob = \"tokio\"\r\narcade_tokioo = \"tokio\"\r\narcade_tokiou = \"tokio\"\r\narcade_tokip = \"toki\"\r\narcade_tokisens = \"tokisens\"\r\narcade_tokiu = \"toki\"\r\narcade_tokiua = \"toki\"\r\narcade_tokkae = \"tokkae\"\r\narcade_tokyogal = \"tokyogal\"\r\narcade_tomahaw5 = \"tomahawk\"\r\narcade_tomahawk = \"tomahawk\"\r\narcade_tondemo = \"tondemo\"\r\narcade_tontonb = \"tontonb\"\r\narcade_toobin = \"toobin\"\r\narcade_toobin1 = \"toobin\"\r\narcade_toobin2 = \"toobin\"\r\narcade_toobin2e = \"toobin\"\r\narcade_toobine = \"toobin\"\r\narcade_toobing = \"toobin\"\r\narcade_topgun = \"topgun\"\r\narcade_topgunbl = \"jackal\"\r\narcade_topgunr = \"jackal\"\r\narcade_tophuntr = \"tophuntr\"\r\narcade_tophuntrh = \"tophuntr\"\r\narcade_topland = \"topland\"\r\narcade_toppyrap = \"toppyrap\"\r\narcade_topracer = \"polepos\"\r\narcade_topsecex = \"topsecex\"\r\narcade_topsecrt = \"bionicc\"\r\narcade_topspedu = \"topspeed\"\r\narcade_topspeed = \"topspeed\"\r\narcade_topspeedu = \"topspeed\"\r\narcade_toramich = \"tigeroad\"\r\narcade_toratora = \"toratora\"\r\narcade_toride2g = \"toride2g\"\r\narcade_toride2gg = \"toride2g\"\r\narcade_toride2gk = \"toride2g\"\r\narcade_toride2j = \"toride2g\"\r\narcade_tornbase = \"tornbase\"\r\narcade_toryumon = \"toryumon\"\r\narcade_totc = \"totc\"\r\narcade_totcarn = \"totcarn\"\r\narcade_totcarnp = \"totcarn\"\r\narcade_toto = \"toto\"\r\narcade_touchgo = \"touchgo\"\r\narcade_touchgoe = \"touchgo\"\r\narcade_touchgok = \"touchgo\"\r\narcade_touchgon = \"touchgo\"\r\narcade_tourtab2 = \"tourtabl\"\r\narcade_tourtabl = \"tourtabl\"\r\narcade_toutrun = \"toutrun\"\r\narcade_toutrun1 = \"toutrun\"\r\narcade_toutrun2 = \"toutrun\"\r\narcade_toutrun2d = \"toutrun\"\r\narcade_toutrun3 = \"toutrun\"\r\narcade_toutrun3d = \"toutrun\"\r\narcade_toutruna = \"toutrun\"\r\narcade_toutrund = \"toutrun\"\r\narcade_toutrunj = \"toutrun\"\r\narcade_toutrunj1 = \"toutrun\"\r\narcade_toutrunj1d = \"toutrun\"\r\narcade_toutrunjd = \"toutrun\"\r\narcade_toypop = \"toypop\"\r\narcade_tp2m32 = \"tetrisp2\"\r\narcade_tp84 = \"tp84\"\r\narcade_tp84a = \"tp84\"\r\narcade_tp84b = \"tp84\"\r\narcade_tpgolf = \"tpgolf\"\r\narcade_trackflc = \"trackfld\"\r\narcade_trackfld = \"trackfld\"\r\narcade_trackfldc = \"trackfld\"\r\narcade_trackfldnz = \"trackfld\"\r\narcade_trally = \"trally\"\r\narcade_tranqgun = \"tranqgun\"\r\narcade_transfrm = \"transfrm\"\r\narcade_travrusa = \"travrusa\"\r\narcade_travrusab = \"travrusa\"\r\narcade_trckydoc = \"trckydoc\"\r\narcade_trckydoca = \"trckydoc\"\r\narcade_treahunt = \"jack\"\r\narcade_tricktrp = \"tricktrp\"\r\narcade_trigon = \"lgtnfght\"\r\narcade_trikitri = \"loverboy\"\r\narcade_triothep = \"triothep\"\r\narcade_triothepj = \"triothep\"\r\narcade_triplep = \"triplep\"\r\narcade_triplepa = \"triplep\"\r\narcade_triplew1 = \"triplew1\"\r\narcade_triplew2 = \"triplew2\"\r\narcade_triplfun = \"oisipuzl\"\r\narcade_triplhnt = \"triplhnt\"\r\narcade_tripool = \"tripool\"\r\narcade_tripoola = \"tripool\"\r\narcade_trisport = \"trisport\"\r\narcade_triviabb = \"triviabb\"\r\narcade_triviag1 = \"triviag1\"\r\narcade_triviag2 = \"triviag2\"\r\narcade_triviasp = \"triviasp\"\r\narcade_triviayp = \"triviayp\"\r\narcade_trivquiz = \"trivquiz\"\r\narcade_troangel = \"troangel\"\r\narcade_trog = \"trog\"\r\narcade_trog3 = \"trog\"\r\narcade_trogp = \"trog\"\r\narcade_trogpa6 = \"trog\"\r\narcade_trojan = \"trojan\"\r\narcade_trojana = \"trojan\"\r\narcade_trojanb = \"trojan\"\r\narcade_trojanj = \"trojan\"\r\narcade_trojanr = \"trojan\"\r\narcade_tron = \"tron\"\r\narcade_tron2 = \"tron\"\r\narcade_trophyh = \"trophyh\"\r\narcade_trstar = \"trstar\"\r\narcade_trstarj = \"trstar\"\r\narcade_trstaro = \"trstar\"\r\narcade_trstaroj = \"trstar\"\r\narcade_truco = \"truco\"\r\narcade_truxton = \"truxton\"\r\narcade_truxton2 = \"truxton2\"\r\narcade_trvgns = \"trvmstr\"\r\narcade_trvmstr = \"trvmstr\"\r\narcade_trvmstra = \"trvmstr\"\r\narcade_trvmstrb = \"trvmstr\"\r\narcade_trvmstrc = \"trvmstr\"\r\narcade_tryout = \"tryout\"\r\narcade_ts2 = \"ts2\"\r\narcade_ts2j = \"ts2\"\r\narcade_tsamura2 = \"tsamurai\"\r\narcade_tsamurai = \"tsamurai\"\r\narcade_tsamurai2 = \"tsamurai\"\r\narcade_tsamuraih = \"tsamurai\"\r\narcade_tshingen = \"tshingen\"\r\narcade_tshingena = \"tshingen\"\r\narcade_tshingna = \"tshingen\"\r\narcade_tshoot = \"tshoot\"\r\narcade_tst_galx = \"galaxian\"\r\narcade_tst_invd = \"invaders\"\r\narcade_tstrike = \"tstrike\"\r\narcade_ttfitter = \"roundup\"\r\narcade_ttmahjng = \"ttmahjng\"\r\narcade_tturf = \"tturf\"\r\narcade_tturfbl = \"tturf\"\r\narcade_tturfu = \"tturf\"\r\narcade_tubeit = \"cachat\"\r\narcade_tubep = \"tubep\"\r\narcade_tugboat = \"tugboat\"\r\narcade_tumbleb = \"tumblep\"\r\narcade_tumbleb2 = \"tumblep\"\r\narcade_tumblep = \"tumblep\"\r\narcade_tumblep2 = \"tumblep\"\r\narcade_tumblepb = \"tumblep\"\r\narcade_tumblepj = \"tumblep\"\r\narcade_tunhunt = \"tunhunt\"\r\narcade_tunhuntc = \"tunhunt\"\r\narcade_turbo = \"turbo\"\r\narcade_turboa = \"turbo\"\r\narcade_turbob = \"turbo\"\r\narcade_turbofrc = \"turbofrc\"\r\narcade_turbotag = \"turbotag\"\r\narcade_turfmast = \"turfmast\"\r\narcade_turkhunt = \"turkhunt\"\r\narcade_turpin = \"turtles\"\r\narcade_turpins = \"turtles\"\r\narcade_turtles = \"turtles\"\r\narcade_turtship = \"turtship\"\r\narcade_turtshipj = \"turtship\"\r\narcade_turtshipk = \"turtship\"\r\narcade_turtshipkn = \"turtship\"\r\narcade_turtshipko = \"turtship\"\r\narcade_tutankhm = \"tutankhm\"\r\narcade_tutankhms = \"tutankhm\"\r\narcade_tutankst = \"tutankhm\"\r\narcade_twcup90 = \"twcup90\"\r\narcade_twcup90a = \"twcup90\"\r\narcade_twcup90b = \"twcup90\"\r\narcade_twcup90b1 = \"twcup90\"\r\narcade_twcup90b2 = \"twcup90\"\r\narcade_twcup90b3 = \"twcup90\"\r\narcade_twcup90b4 = \"twcup90\"\r\narcade_twcup90ba = \"twcup90\"\r\narcade_twcup90t = \"twcup90\"\r\narcade_twcup98 = \"twcup98\"\r\narcade_twinactn = \"twinactn\"\r\narcade_twinadv = \"twinadv\"\r\narcade_twinadvk = \"twinadv\"\r\narcade_twinbee = \"twinbee\"\r\narcade_twinbrat = \"twinbrat\"\r\narcade_twinbrata = \"twinbrat\"\r\narcade_twinbratb = \"twinbrat\"\r\narcade_twincobr = \"twincobr\"\r\narcade_twincobru = \"twincobr\"\r\narcade_twincobu = \"twincobr\"\r\narcade_twineag2 = \"twineag2\"\r\narcade_twineagl = \"twineagl\"\r\narcade_twinfalc = \"twinfalc\"\r\narcade_twinhawk = \"twinhawk\"\r\narcade_twinhawku = \"twinhawk\"\r\narcade_twinhwku = \"twinhawk\"\r\narcade_twinkle = \"twinkle\"\r\narcade_twinqix = \"twinqix\"\r\narcade_twinspri = \"twinspri\"\r\narcade_twocrude = \"cbuster\"\r\narcade_twocrudea = \"cbuster\"\r\narcade_twotiger = \"twotiger\"\r\narcade_twotigra = \"twotiger\"\r\narcade_tws96 = \"tws96\"\r\narcade_twsoc96 = \"twsoc96\"\r\narcade_typhoon = \"ajax\"\r\narcade_uballoon = \"uballoon\"\r\narcade_uccops = \"uccops\"\r\narcade_uccopsar = \"uccops\"\r\narcade_uccopsj = \"uccops\"\r\narcade_uccopsu = \"uccops\"\r\narcade_uchuuai = \"uchuuai\"\r\narcade_uecology = \"ecofghtr\"\r\narcade_ufosensi = \"ufosensi\"\r\narcade_ultennis = \"ultennis\"\r\narcade_ultraman = \"ultraman\"\r\narcade_ultramhm = \"ultramhm\"\r\narcade_ultratnk = \"ultratnk\"\r\narcade_ultrax = \"ultrax\"\r\narcade_ultraxg = \"ultrax\"\r\narcade_umanclub = \"umanclub\"\r\narcade_umk3 = \"mk3\"\r\narcade_umk3r11 = \"mk3\"\r\narcade_unclepoo = \"unclepoo\"\r\narcade_undoukai = \"fieldday\"\r\narcade_undrfire = \"undrfire\"\r\narcade_undrfirj = \"undrfire\"\r\narcade_undrfiru = \"undrfire\"\r\narcade_uniwars = \"uniwars\"\r\narcade_uniwarsa = \"uniwars\"\r\narcade_unkpacg = \"unkpacg\"\r\narcade_unsquad = \"unsquad\"\r\narcade_untoucha = \"untoucha\"\r\narcade_uopoko = \"uopoko\"\r\narcade_uopokoj = \"uopoko\"\r\narcade_upndown = \"upndown\"\r\narcade_upndownu = \"upndown\"\r\narcade_usclssic = \"usclssic\"\r\narcade_usg182 = \"usgames\"\r\narcade_usg185 = \"usgames\"\r\narcade_usg187c = \"usgames\"\r\narcade_usg252 = \"usg252\"\r\narcade_usg32 = \"usg32\"\r\narcade_usg82 = \"superten\"\r\narcade_usg83 = \"usg83\"\r\narcade_usg83x = \"superten\"\r\narcade_usgames = \"usgames\"\r\narcade_usvsthem = \"usvsthem\"\r\narcade_utoukond = \"utoukond\"\r\narcade_valkyrie = \"valkyrie\"\r\narcade_valtric = \"valtric\"\r\narcade_vamphalf = \"vamphalf\"\r\narcade_vampj = \"dstlk\"\r\narcade_vampja = \"dstlk\"\r\narcade_vampjr1 = \"dstlk\"\r\narcade_vandyjal = \"vandyke\"\r\narcade_vandyke = \"vandyke\"\r\narcade_vandykeb = \"vandyke\"\r\narcade_vandykejal = \"vandyke\"\r\narcade_vandykejal2 = \"vandyke\"\r\narcade_vangrd2 = \"vangrd2\"\r\narcade_vangrdce = \"vanguard\"\r\narcade_vanguard = \"vanguard\"\r\narcade_vanguardc = \"vanguard\"\r\narcade_vanguardj = \"vanguard\"\r\narcade_vanilla = \"vanilla\"\r\narcade_vanvan = \"vanvan\"\r\narcade_vanvanb = \"vanvan\"\r\narcade_vanvank = \"vanvan\"\r\narcade_vaportra = \"vaportra\"\r\narcade_vaportra3 = \"vaportra\"\r\narcade_vaportrau = \"vaportra\"\r\narcade_vaportru = \"vaportra\"\r\narcade_varth = \"varth\"\r\narcade_varthb = \"varth\"\r\narcade_varthj = \"varth\"\r\narcade_varthjr = \"varth\"\r\narcade_varthr1 = \"varth\"\r\narcade_varthu = \"varth\"\r\narcade_vasara = \"vasara\"\r\narcade_vasara2 = \"vasara2\"\r\narcade_vasara2a = \"vasara2\"\r\narcade_vastar = \"vastar\"\r\narcade_vastar2 = \"vastar\"\r\narcade_vastar3 = \"vastar\"\r\narcade_vastar4 = \"vastar\"\r\narcade_vautour = \"phoenix\"\r\narcade_vautourz = \"phoenix\"\r\narcade_vautourza = \"phoenix\"\r\narcade_vball = \"vball\"\r\narcade_vball2pj = \"vball\"\r\narcade_vball2pjb = \"vball\"\r\narcade_vballb = \"vball\"\r\narcade_vblokbrk = \"vblokbrk\"\r\narcade_vblokbrka = \"vblokbrk\"\r\narcade_vbowl = \"vbowl\"\r\narcade_vbowlj = \"vbowl\"\r\narcade_vcircle = \"vcircle\"\r\narcade_vendet2p = \"vendetta\"\r\narcade_vendetao = \"vendetta\"\r\narcade_vendetas = \"vendetta\"\r\narcade_vendetta = \"vendetta\"\r\narcade_vendetta2pd = \"vendetta\"\r\narcade_vendetta2peba = \"vendetta\"\r\narcade_vendetta2pp = \"vendetta\"\r\narcade_vendetta2pu = \"vendetta\"\r\narcade_vendetta2pun = \"vendetta\"\r\narcade_vendetta2pw = \"vendetta\"\r\narcade_vendettan = \"vendetta\"\r\narcade_vendettar = \"vendetta\"\r\narcade_vendettaz = \"vendetta\"\r\narcade_vendettj = \"vendetta\"\r\narcade_vendtaso = \"vendetta\"\r\narcade_venture = \"venture\"\r\narcade_venture2 = \"venture\"\r\narcade_venture4 = \"venture\"\r\narcade_venus = \"gyruss\"\r\narcade_vf = \"vf\"\r\narcade_vfive = \"grindstm\"\r\narcade_vfkids = \"vfkids\"\r\narcade_vfremix = \"vfremix\"\r\narcade_vgoalsca = \"vgoalsoc\"\r\narcade_vgoalsoc = \"vgoalsoc\"\r\narcade_vhunt2 = \"vhunt2\"\r\narcade_vhunt2d = \"vhunt2\"\r\narcade_vhunt2r1 = \"vhunt2\"\r\narcade_vhuntj = \"nwarr\"\r\narcade_vhuntjr1 = \"nwarr\"\r\narcade_vhuntjr1s = \"nwarr\"\r\narcade_vhuntjr2 = \"nwarr\"\r\narcade_victlapw = \"victlapw\"\r\narcade_victnine = \"victnine\"\r\narcade_victorba = \"victory\"\r\narcade_victory = \"victory\"\r\narcade_victroad = \"victroad\"\r\narcade_videopin = \"videopin\"\r\narcade_viewpoin = \"viewpoin\"\r\narcade_vigilant = \"vigilant\"\r\narcade_vigilanta = \"vigilant\"\r\narcade_vigilantb = \"vigilant\"\r\narcade_vigilantbl = \"vigilant\"\r\narcade_vigilantc = \"vigilant\"\r\narcade_vigilantd = \"vigilant\"\r\narcade_vigilantg = \"vigilant\"\r\narcade_vigilanto = \"vigilant\"\r\narcade_vigilntj = \"vigilant\"\r\narcade_vigilntu = \"vigilant\"\r\narcade_vimana = \"vimana\"\r\narcade_vimana1 = \"vimana\"\r\narcade_vimanan = \"vimana\"\r\narcade_vindc2r1 = \"vindctr2\"\r\narcade_vindc2r2 = \"vindctr2\"\r\narcade_vindctr2 = \"vindctr2\"\r\narcade_vindice3 = \"vindictr\"\r\narcade_vindice4 = \"vindictr\"\r\narcade_vindict1 = \"vindictr\"\r\narcade_vindict2 = \"vindictr\"\r\narcade_vindict4 = \"vindictr\"\r\narcade_vindicte = \"vindictr\"\r\narcade_vindictg = \"vindictr\"\r\narcade_vindictr = \"vindictr\"\r\narcade_viofight = \"viofight\"\r\narcade_viofightj = \"viofight\"\r\narcade_viofightu = \"viofight\"\r\narcade_viostorm = \"viostorm\"\r\narcade_viostorma = \"viostorm\"\r\narcade_viostormab = \"viostorm\"\r\narcade_viostormeb = \"viostorm\"\r\narcade_viostormj = \"viostorm\"\r\narcade_viostormu = \"viostorm\"\r\narcade_viostormub = \"viostorm\"\r\narcade_viostrma = \"viostorm\"\r\narcade_viostrmj = \"viostorm\"\r\narcade_viostrmu = \"viostorm\"\r\narcade_vipclub = \"orangec\"\r\narcade_viper = \"viper\"\r\narcade_vitaminc = \"vitaminc\"\r\narcade_vliner = \"vliner\"\r\narcade_vlinero = \"vliner\"\r\narcade_vmahjong = \"vmahjong\"\r\narcade_vmetal = \"vmetal\"\r\narcade_vmetaln = \"vmetal\"\r\narcade_volfied = \"volfied\"\r\narcade_volfiedj = \"volfied\"\r\narcade_volfiedjo = \"volfied\"\r\narcade_volfiedu = \"volfied\"\r\narcade_vpool = \"hustler\"\r\narcade_vsav = \"vsav\"\r\narcade_vsav2 = \"vsav2\"\r\narcade_vsav2d = \"vsav2\"\r\narcade_vsava = \"vsav\"\r\narcade_vsavd = \"vsav\"\r\narcade_vsavh = \"vsav\"\r\narcade_vsavj = \"vsav\"\r\narcade_vsavu = \"vsav\"\r\narcade_vsbbalja = \"vsbball\"\r\narcade_vsbbaljb = \"vsbball\"\r\narcade_vsbball = \"vsbball\"\r\narcade_vsbballj = \"vsbball\"\r\narcade_vsfdf = \"vsfdf\"\r\narcade_vsgongf = \"vsgongf\"\r\narcade_vsgradus = \"vsgradus\"\r\narcade_vsgshoe = \"vsgshoe\"\r\narcade_vshoot = \"vshoot\"\r\narcade_vsmahjng = \"vsmahjng\"\r\narcade_vsnetscr = \"vsnetscr\"\r\narcade_vspinbal = \"vspinbal\"\r\narcade_vspinblj = \"vspinbal\"\r\narcade_vsskykid = \"vsskykid\"\r\narcade_vsslalom = \"vsslalom\"\r\narcade_vssoccer = \"vssoccer\"\r\narcade_vstennis = \"vstennis\"\r\narcade_vstetris = \"vstetris\"\r\narcade_vsyard = \"yard\"\r\narcade_vsyard2 = \"yard\"\r\narcade_vulcan = \"vulcan\"\r\narcade_vulcana = \"vulcan\"\r\narcade_vulcanb = \"vulcan\"\r\narcade_vulgus = \"vulgus\"\r\narcade_vulgus2 = \"vulgus\"\r\narcade_vulgusa = \"vulgus\"\r\narcade_vulgusj = \"vulgus\"\r\narcade_wacko = \"wacko\"\r\narcade_wakuwak7 = \"wakuwak7\"\r\narcade_wallc = \"wallc\"\r\narcade_wallca = \"wallc\"\r\narcade_wallst = \"wallst\"\r\narcade_wanted = \"wanted\"\r\narcade_wardner = \"wardner\"\r\narcade_wardnerj = \"wardner\"\r\narcade_wargods = \"wargods\"\r\narcade_warlords = \"warlords\"\r\narcade_warofbug = \"warofbug\"\r\narcade_warofbugg = \"warofbug\"\r\narcade_warofbugu = \"warofbug\"\r\narcade_warpsped = \"warpsped\"\r\narcade_warpwar2 = \"warpwarp\"\r\narcade_warpwarp = \"warpwarp\"\r\narcade_warpwarpr = \"warpwarp\"\r\narcade_warpwarpr2 = \"warpwarp\"\r\narcade_warpwarr = \"warpwarp\"\r\narcade_warrior = \"warrior\"\r\narcade_warriorb = \"warriorb\"\r\narcade_warzard = \"redearth\"\r\narcade_warzardr1 = \"redearth\"\r\narcade_waterski = \"waterski\"\r\narcade_watrball = \"watrball\"\r\narcade_wb3 = \"wb3\"\r\narcade_wb31 = \"wb3\"\r\narcade_wb31d = \"wb3\"\r\narcade_wb32 = \"wb3\"\r\narcade_wb32d = \"wb3\"\r\narcade_wb33 = \"wb3\"\r\narcade_wb33d = \"wb3\"\r\narcade_wb34 = \"wb3\"\r\narcade_wb34d = \"wb3\"\r\narcade_wb35 = \"wb3\"\r\narcade_wb35d = \"wb3\"\r\narcade_wb3a = \"wb3\"\r\narcade_wb3bbl = \"wb3\"\r\narcade_wb3bl = \"wb3\"\r\narcade_wbdeluxe = \"wboy\"\r\narcade_wbeachvl = \"wbeachvl\"\r\narcade_wbml = \"wbml\"\r\narcade_wbmlb = \"wbml\"\r\narcade_wbmljb = \"wbml\"\r\narcade_wbmljo = \"wbml\"\r\narcade_wbmlvc = \"wbml\"\r\narcade_wboy = \"wboy\"\r\narcade_wboy2 = \"wboy\"\r\narcade_wboy2u = \"wboy\"\r\narcade_wboy3 = \"wboy\"\r\narcade_wboy4 = \"wboy\"\r\narcade_wboy5 = \"wboy\"\r\narcade_wboyo = \"wboy\"\r\narcade_wboyu = \"wboy\"\r\narcade_wc90 = \"wc90\"\r\narcade_wc90a = \"wc90\"\r\narcade_wc90b = \"wc90\"\r\narcade_wc90t = \"wc90\"\r\narcade_wcbowl = \"wcbowl\"\r\narcade_wcbwl12 = \"wcbowl\"\r\narcade_wcbwl161 = \"wcbowl\"\r\narcade_wcbwl165 = \"wcbowl\"\r\narcade_wcvol95 = \"wcvol95\"\r\narcade_wcvol95x = \"wcvol95\"\r\narcade_wecleman = \"wecleman\"\r\narcade_welltris = \"welltris\"\r\narcade_welltrisj = \"welltris\"\r\narcade_weststry = \"bloodbro\"\r\narcade_weststrya = \"bloodbro\"\r\narcade_wexpresb = \"exprraid\"\r\narcade_wexpresc = \"exprraid\"\r\narcade_wexpress = \"exprraid\"\r\narcade_wfortuna = \"wfortune\"\r\narcade_wfortune = \"wfortune\"\r\narcade_wg3dh = \"wg3dh\"\r\narcade_wgp = \"wgp\"\r\narcade_wgp2 = \"wgp\"\r\narcade_wgpj = \"wgp\"\r\narcade_wgpjoy = \"wgp\"\r\narcade_wgpjoya = \"wgp\"\r\narcade_wh1 = \"wh1\"\r\narcade_wh1h = \"wh1\"\r\narcade_wh1ha = \"wh1\"\r\narcade_wh2 = \"wh2\"\r\narcade_wh2j = \"wh2j\"\r\narcade_wh2ja = \"wh2j\"\r\narcade_wheelrun = \"wheelrun\"\r\narcade_whizquiz = \"whizquiz\"\r\narcade_whizz = \"twinfalc\"\r\narcade_whodunit = \"whodunit\"\r\narcade_whoopee = \"pipibibs\"\r\narcade_whp = \"whp\"\r\narcade_wiggie = \"wiggie\"\r\narcade_wildfang = \"wildfang\"\r\narcade_willow = \"willow\"\r\narcade_willowj = \"willow\"\r\narcade_willowje = \"willow\"\r\narcade_willowu = \"willow\"\r\narcade_willowuo = \"willow\"\r\narcade_wilytowr = \"wilytowr\"\r\narcade_wingforc = \"wingforc\"\r\narcade_winrun91 = \"winrun91\"\r\narcade_winspike = \"winspike\"\r\narcade_wintbob = \"snowbros\"\r\narcade_winterht = \"winterht\"\r\narcade_wiping = \"wiping\"\r\narcade_wiseguy = \"yamyam\"\r\narcade_wits = \"wits\"\r\narcade_wiz = \"wiz\"\r\narcade_wizdfire = \"wizdfire\"\r\narcade_wizdfireu = \"wizdfire\"\r\narcade_wizt = \"wiz\"\r\narcade_wizta = \"wiz\"\r\narcade_wizzquiz = \"wizzquiz\"\r\narcade_wizzquiza = \"wizzquiz\"\r\narcade_wjammers = \"wjammers\"\r\narcade_wldcourt = \"wldcourt\"\r\narcade_wlstar = \"wlstar\"\r\narcade_wmatch = \"wmatch\"\r\narcade_wndrmomo = \"wndrmomo\"\r\narcade_wndrplnt = \"wndrplnt\"\r\narcade_wof = \"wof\"\r\narcade_wof3js = \"wof\"\r\narcade_wof3jsa = \"wof\"\r\narcade_wof3sj = \"wof\"\r\narcade_wof3sja = \"wof\"\r\narcade_wofa = \"wof\"\r\narcade_wofah = \"wof\"\r\narcade_wofaha = \"wof\"\r\narcade_wofahb = \"wof\"\r\narcade_wofb = \"wof\"\r\narcade_wofch = \"wofch\"\r\narcade_wofchdx = \"wofch\"\r\narcade_woffr = \"wof\"\r\narcade_wofh = \"wof\"\r\narcade_wofha = \"wof\"\r\narcade_wofhfh = \"wof\"\r\narcade_wofj = \"wof\"\r\narcade_wofjh = \"wof\"\r\narcade_wofr1 = \"wof\"\r\narcade_wofsj = \"wof\"\r\narcade_wofsja = \"wof\"\r\narcade_wofsjb = \"wof\"\r\narcade_wofsjc = \"wof\"\r\narcade_wofu = \"wof\"\r\narcade_wolffang = \"rohga\"\r\narcade_wolfpack = \"wolfpack\"\r\narcade_wonder3 = \"3wonders\"\r\narcade_wondl96 = \"wondl96\"\r\narcade_wondstck = \"wondstck\"\r\narcade_wondstcka = \"wondstck\"\r\narcade_woodpeca = \"woodpeck\"\r\narcade_woodpeck = \"woodpeck\"\r\narcade_worldc94 = \"worldc94\"\r\narcade_worldwar = \"worldwar\"\r\narcade_wotw = \"wotw\"\r\narcade_wow = \"wow\"\r\narcade_wownfant = \"wownfant\"\r\narcade_wpksoc = \"wpksoc\"\r\narcade_wrally = \"wrally\"\r\narcade_wrally2 = \"wrally2\"\r\narcade_wrally2a = \"wrally2\"\r\narcade_wrallya = \"wrally\"\r\narcade_wrallyat = \"wrally\"\r\narcade_wrallyb = \"wrally\"\r\narcade_wrecking = \"wrecking\"\r\narcade_wrestwar = \"wrestwar\"\r\narcade_wrestwar1 = \"wrestwar\"\r\narcade_wrestwar1d = \"wrestwar\"\r\narcade_wrestwar2 = \"wrestwar\"\r\narcade_wrestwar2d = \"wrestwar\"\r\narcade_wrofaero = \"wrofaero\"\r\narcade_ws = \"ws\"\r\narcade_ws89 = \"ws\"\r\narcade_ws90 = \"ws\"\r\narcade_wschamp = \"wschamp\"\r\narcade_wschampa = \"wschamp\"\r\narcade_wschampb = \"wschamp\"\r\narcade_wseries = \"wseries\"\r\narcade_wsf = \"wsf\"\r\narcade_wtennis = \"wtennis\"\r\narcade_wwallyj = \"wwallyj\"\r\narcade_wwallyja = \"wwallyj\"\r\narcade_wwallyjad = \"wwallyj\"\r\narcade_wwallyjd = \"wwallyj\"\r\narcade_wwester1 = \"wwestern\"\r\narcade_wwestern = \"wwestern\"\r\narcade_wwfmania = \"wwfmania\"\r\narcade_wwfsstar = \"wwfsstar\"\r\narcade_wwfsstarb = \"wwfsstar\"\r\narcade_wwfsstarj = \"wwfsstar\"\r\narcade_wwfsstaru4 = \"wwfsstar\"\r\narcade_wwfsstaru6 = \"wwfsstar\"\r\narcade_wwfsstaru7 = \"wwfsstar\"\r\narcade_wwfwfest = \"wwfwfest\"\r\narcade_wwfwfestb = \"wwfwfest\"\r\narcade_wwfwfestj = \"wwfwfest\"\r\narcade_wwfwfestk = \"wwfwfest\"\r\narcade_wwfwfestu = \"wwfwfest\"\r\narcade_wwfwfsta = \"wwfwfest\"\r\narcade_wwfwfstj = \"wwfwfest\"\r\narcade_wwjgtin = \"wwjgtin\"\r\narcade_wyvernf0 = \"wyvernf0\"\r\narcade_xday2 = \"xday2\"\r\narcade_xenophob = \"xenophob\"\r\narcade_xevi3dg = \"xevi3dg\"\r\narcade_xevios = \"xevious\"\r\narcade_xevious = \"xevious\"\r\narcade_xeviousa = \"xevious\"\r\narcade_xeviousb = \"xevious\"\r\narcade_xeviousc = \"xevious\"\r\narcade_xexex = \"xexex\"\r\narcade_xexexa = \"xexex\"\r\narcade_xexexj = \"xexex\"\r\narcade_xfiles = \"xfiles\"\r\narcade_xmcota = \"xmcota\"\r\narcade_xmcotaa = \"xmcota\"\r\narcade_xmcotaar1 = \"xmcota\"\r\narcade_xmcotab = \"xmcota\"\r\narcade_xmcotah = \"xmcota\"\r\narcade_xmcotahr1 = \"xmcota\"\r\narcade_xmcotaj = \"xmcota\"\r\narcade_xmcotaj1 = \"xmcota\"\r\narcade_xmcotaj2 = \"xmcota\"\r\narcade_xmcotaj3 = \"xmcota\"\r\narcade_xmcotajr = \"xmcota\"\r\narcade_xmcotar1 = \"xmcota\"\r\narcade_xmcotar1d = \"xmcota\"\r\narcade_xmcotau = \"xmcota\"\r\narcade_xmen = \"xmen\"\r\narcade_xmen2p = \"xmen\"\r\narcade_xmen2pa = \"xmen\"\r\narcade_xmen2pe = \"xmen\"\r\narcade_xmen2pj = \"xmen\"\r\narcade_xmen2pu = \"xmen\"\r\narcade_xmen6p = \"xmen\"\r\narcade_xmen6pu = \"xmen\"\r\narcade_xmena = \"xmen\"\r\narcade_xmenaa = \"xmen\"\r\narcade_xmene = \"xmen\"\r\narcade_xmenj = \"xmen\"\r\narcade_xmultipl = \"xmultipl\"\r\narcade_xmultiplm72 = \"xmultipl\"\r\narcade_xmvsf = \"xmvsf\"\r\narcade_xmvsfa = \"xmvsf\"\r\narcade_xmvsfar1 = \"xmvsf\"\r\narcade_xmvsfar2 = \"xmvsf\"\r\narcade_xmvsfar3 = \"xmvsf\"\r\narcade_xmvsfb = \"xmvsf\"\r\narcade_xmvsfh = \"xmvsf\"\r\narcade_xmvsfj = \"xmvsf\"\r\narcade_xmvsfjr1 = \"xmvsf\"\r\narcade_xmvsfjr2 = \"xmvsf\"\r\narcade_xmvsfjr3 = \"xmvsf\"\r\narcade_xmvsfr1 = \"xmvsf\"\r\narcade_xmvsfu = \"xmvsf\"\r\narcade_xmvsfu1d = \"xmvsf\"\r\narcade_xmvsfur1 = \"xmvsf\"\r\narcade_xmvsfur2 = \"xmvsf\"\r\narcade_xorworld = \"xorworld\"\r\narcade_xsedae = \"xsedae\"\r\narcade_xsleena = \"xsleena\"\r\narcade_xsleenab = \"xsleena\"\r\narcade_xsleenaba = \"xsleena\"\r\narcade_xsleenaj = \"xsleena\"\r\narcade_xxmissio = \"xxmissio\"\r\narcade_xybots = \"xybots\"\r\narcade_xybots0 = \"xybots\"\r\narcade_xybots1 = \"xybots\"\r\narcade_xybotsf = \"xybots\"\r\narcade_xybotsg = \"xybots\"\r\narcade_xyonix = \"xyonix\"\r\narcade_yamagchi = \"yamagchi\"\r\narcade_yamato = \"yamato\"\r\narcade_yamato2 = \"yamato\"\r\narcade_yamyam = \"yamyam\"\r\narcade_yanchamr = \"kidniki\"\r\narcade_yankeedo = \"mrdo\"\r\narcade_yard = \"yard\"\r\narcade_yarunara = \"yarunara\"\r\narcade_yesnoj = \"yesnoj\"\r\narcade_yiear = \"yiear\"\r\narcade_yiear2 = \"yiear\"\r\narcade_yieartf = \"yiear\"\r\narcade_ym2608 = \"ym2608\"\r\narcade_yokaidko = \"shadowld\"\r\narcade_yosakdon = \"yosakdon\"\r\narcade_youjyudn = \"youjyudn\"\r\narcade_youkaidk = \"shadowld\"\r\narcade_youkaidk1 = \"shadowld\"\r\narcade_youkaidk2 = \"shadowld\"\r\narcade_youma = \"ninjemak\"\r\narcade_youma2 = \"ninjemak\"\r\narcade_youmab = \"ninjemak\"\r\narcade_youmab2 = \"ninjemak\"\r\narcade_yukiwo = \"masterw\"\r\narcade_yumefuda = \"yumefuda\"\r\narcade_yuyugogo = \"yuyugogo\"\r\narcade_zaryavos = \"zaryavos\"\r\narcade_zarzon = \"satansat\"\r\narcade_zaviga = \"zaviga\"\r\narcade_zavigaj = \"zaviga\"\r\narcade_zaxxon = \"zaxxon\"\r\narcade_zaxxon2 = \"zaxxon\"\r\narcade_zaxxon3 = \"zaxxon\"\r\narcade_zaxxonb = \"zaxxon\"\r\narcade_zaxxonj = \"zaxxon\"\r\narcade_zedblade = \"zedblade\"\r\narcade_zektor = \"zektor\"\r\narcade_zerohour = \"zerohour\"\r\narcade_zeropnt = \"zeropnt\"\r\narcade_zeropnt2 = \"zeropnt2\"\r\narcade_zeropnta = \"zeropnt\"\r\narcade_zeropntj = \"zeropnt\"\r\narcade_zeroteam = \"zeroteam\"\r\narcade_zeroteama = \"zeroteam\"\r\narcade_zeroteamb = \"zeroteam\"\r\narcade_zeroteamc = \"zeroteam\"\r\narcade_zeroteamd = \"zeroteam\"\r\narcade_zeroteams = \"zeroteam\"\r\narcade_zeroteamsr = \"zeroteam\"\r\narcade_zerotime = \"galaxian\"\r\narcade_zerotimed = \"galaxian\"\r\narcade_zerotm2k = \"zeroteam\"\r\narcade_zerowing = \"zerowing\"\r\narcade_zerozone = \"zerozone\"\r\narcade_zigzag = \"zigzag\"\r\narcade_zigzag2 = \"zigzag\"\r\narcade_zigzagb = \"zigzagb\"\r\narcade_zigzagb2 = \"zigzagb\"\r\narcade_zingzip = \"zingzip\"\r\narcade_zintrckb = \"zintrckb\"\r\narcade_zintrkcd = \"zintrckb\"\r\narcade_zipzap = \"zipzap\"\r\narcade_znpwfv = \"znpwfv\"\r\narcade_zoar = \"zoar\"\r\narcade_zodiack = \"zodiack\"\r\narcade_zombraid = \"zombraid\"\r\narcade_zookeep = \"zookeep\"\r\narcade_zookeep2 = \"zookeep\"\r\narcade_zookeep3 = \"zookeep\"\r\narcade_zunkyou = \"zunkyou\"\r\narcade_zupapa = \"zupapa\"\r\narcade_zwackery = \"zwackery\"\r\narcade_zzyzzyx2 = \"zzyzzyxx\"\r\narcade_zzyzzyxx = \"zzyzzyxx\"\r\narcade_zzyzzyxx2 = \"zzyzzyxx\"\r\narcade_tengaijs = \"tengai\"\r\narcade_dinoxa = \"dino\"\r\narcade_dinowszh = \"dino\"\r\narcade_dinotfzn = \"dino\"\r\narcade_dinoslicews = \"dino\"\r\narcade_dinolbws = \"dino\"\r\narcade_dino2015ws = \"dino\"\r\narcade_dino2011ws = \"dino\"\r\narcade_kov2ppws2016 = \"kov2p\"\r\narcade_kov2pfwly = \"kov2p\"\r\narcade_killbldqy = \"killbld\"\r\narcade_nbbatmanx2x = \"nbbatman\"\r\narcade_kovshpwsb = \"kovshp\"\r\narcade_kovshptx = \"kovshp\"\r\narcade_kovshptplscs = \"kovshp\"\r\narcade_kovshpqszltw = \"kovshp\"\r\narcade_kovshpd19 = \"kovshp\"\r\narcade_kovshpd3tw = \"kovshp\"\r\narcade_kovshp1v4x = \"kovshp\"\r\narcade_kf2k1bs = \"kof2001\"\r\narcade_kovytzyftxq = \"kov\"\r\narcade_kovshwsgl = \"kovsh\"\r\narcade_kovshsjcs = \"kovsh\"\r\narcade_kovshpdx = \"kovshp\"\r\narcade_kovshpd3x = \"kovshp\"\r\narcade_kovshp1v4s = \"kovshp\"\r\narcade_kovshp1v4 = \"kovshp\"\r\narcade_kovplus2012st = \"kovplus\"\r\narcade_kovplus2012m = \"kovplus\"\r\narcade_kovplus2012em = \"kovplus\"\r\narcade_kovplus2012dw = \"kovplus\"\r\narcade_kov2ppws = \"kov3p\"\r\narcade_kov2pplus = \"kov2p\"\r\narcade_orlegndcmm = \"orlegnd\"\r\narcade_oldsplushmf = \"oldsplus\"\r\narcade_kovshpqszltw = \"kovshp\"\r\narcade_kovshpqszl = \"kovshp\"\r\narcade_kovshpd3tw = \"kovshp\"\r\narcade_kovshpd3 = \"kovshp\"\r\narcade_kovshpb = \"kovshp\"\r\narcade_kovplusxt = \"kovplus\"\r\narcade_kovplusdszl = \"kovplus\"\r\narcade_kovplusdjjz = \"kovplus\"\r\narcade_kov2pfwll = \"kov2p\"\r\narcade_snowbrosbs = \"snowbros\"\r\narcade_olds100asrp = \"olds100a\"\r\narcade_olds100aem2016 = \"olds100a\"\r\narcade_kov2pjlcq = \"kov2p\"\r\narcade_kof99rpg = \"kof99\"\r\narcade_kof97rugal = \"kof97\"\r\narcade_mslug3sd = \"mslug3\"\r\narcade_mslug2dg = \"mslug2\"\r\narcade_mslug2gs = \"mslug2\"\r\narcade_mslugdg = \"mslug\"\r\narcade_mslug4sp = \"mslug4\"\r\narcade_mslug4lw = \"mslug4\"\r\narcade_mslug4ammor = \"mslug4\"\r\narcade_mslug4d = \"mslug4\"\r\narcade_avspp = \"avsp\"\r\narcade_mslug3n6zp = \"mslug3\"\r\narcade_mslug3nzj = \"mslug3\"\r\narcade_mslug3v2 = \"mslug3\"\r\narcade_mslug3ntk = \"mslug3\"\r\narcade_mslug3eb = \"mslug3\"\r\narcade_mslug3ngw = \"mslug3\"\r\narcade_mslug3nsj = \"mslug3\"\r\narcade_mslug3nd = \"mslug3\"\r\narcade_mslug5g = \"mslug5\"\r\narcade_punisherly = \"punisher\"\r\narcade_punisherhr = \"punisher\"\r\narcade_punisherdw = \"punisher\"\r\narcade_punisherbs = \"punisher\"\r\narcade_punisher1v2 = \"punisher\"\r\narcade_mslug5dzh = \"mslug5\"\r\narcade_mslug5dg3 = \"mslug5\"\r\narcade_mslug5dg2 = \"mslug5\"\r\narcade_mslug5d = \"mslug5\"\r\narcade_mslug5wn = \"mslug5\"\r\narcade_ms5f = \"mslug5\"\r\narcade_kovshpb = \"kovsh\"\r\narcade_kovshpd19 = \"kovsh\"\r\narcade_olds100aem2015 = \"olds100a\"\r\narcade_kovplus2017 = \"kovplus\"\r\narcade_kov2pmess = \"kov2p\"\r\narcade_olds100aem = \"olds100a\"\r\narcade_mslug2r = \"mslug2\"\r\narcade_mslug2p = \"mslug2\"\r\narcade_mslug2h = \"mslug2\"\r\narcade_mslug2ct = \"mslug2\"\r\narcade_mslugxplus = \"mslugx\"\r\narcade_mslugxjdkj = \"mslugx\"\r\narcade_mslugxh = \"mslugx\"\r\narcade_mslugxeb = \"mslugx\"\r\narcade_mslugxc2 = \"mslugx\"\r\narcade_mslugxc1 = \"mslugx\"\r\narcade_kof97ru = \"kof97\"\r\narcade_kof98eckp = \"kof98\"\r\narcade_kovshpwsb = \"kovsh\"\r\narcade_kovshptplscs = \"kovsh\"\r\narcade_kov8 = \"kovplus\"\r\narcade_kovshp1v4xtw = \"kovsh\"\r\narcade_kovshp1v4x = \"kovsh\"\r\narcade_nbbatmanx2x = \"nbbatman\"\r\narcade_wofdr = \"wof\"\r\narcade_knightsp = \"knights\"\r\narcade_knightsc = \"knights\"\r\narcade_ddtodp = \"ddtod\"\r\narcade_ddsoma4pp = \"ddsom\"\r\narcade_grdianssy = \"grdians\"\r\narcade_grdiansplus = \"grdians\"\r\narcade_dinoyz = \"dino\"\r\narcade_dinoplus = \"dino\"\r\narcade_dinodw = \"dino\"\r\narcade_dino1v3 = \"dino\"\r\narcade_captcommr1v4 = \"captcomm\"\r\narcade_captcommp = \"captcomm\"\r\narcade_ffight1v2 = \"ffight\"\r\narcade_ffightj2u = \"ffight\"\r\narcade_wofzl = \"wof\"\r\narcade_wofmz = \"wof\"\r\narcade_wofdwp = \"wof\"\r\narcade_wof3m = \"wof\"\r\narcade_wof1v3 = \"wof\"\r\narcade_koddw = \"kod\"\r\narcade_kodbs = \"kod\"\r\narcade_kod1v3 = \"kod\"\r\narcade_kof98eck = \"kof98\"\r\narcade_kof97orh = \"kof97\"\r\narcade_nbbatmanx2 = \"nbbatman\"\r\narcade_nbbatmanbh = \"nbbatman\"\r\narcade_nbbatman1v4 = \"nbbatman\"\r\narcade_hookxr = \"hook\"\r\narcade_hookx2 = \"hook\"\r\narcade_hookus = \"hook\"\r\narcade_hookj1v4 = \"hook\"\r\narcade_kof97p = \"kof97\"\r\narcade_kof97u = \"kof97\"\r\narcade_wofdr = \"wof\"\r\narcade_olds100aylzx = \"olds100a\"\r\narcade_mslug4dr = \"mslug4\"\r\narcade_mslug3n6p = \"mslug3\"\r\narcade_mslug3c = \"mslug3\"\r\narcade_kovytzyp = \"kovytzy\"\r\narcade_kovshzlzymy = \"kovsh\"\r\narcade_kovshpqxzqj = \"kovshp\"\r\narcade_kovshp1v4xtw = \"kovshp\"\r\narcade_kovshp1v4x = \"kovshp\"\r\narcade_kof2knd = \"kof2000\"\r\narcade_kof02ic = \"kof2002\"\r\narcade_kf2k1cm = \"kof2001\"\r\narcade_kf2k1bs = \"kof2001\"\r\narcade_kof2000t = \"kof2000\"\r\narcade_kof2000p = \"kof2000\"\r\narcade_kof99pr = \"kof99\"\r\narcade_kof99ae = \"kof99\"\r\narcade_kof96p = \"kof96\"\r\narcade_kof96c = \"kof96\"\r\narcade_kof96ae20 = \"kof96\"\r\narcade_kof94p = \"kof94\"\r\narcade_kof97ys = \"kof97\"\r\narcade_kof97xlb = \"kof97\"\r\narcade_kof97tsb = \"kof97\"\r\narcade_kof97plss20 = \"kof97\"\r\narcade_kof97m = \"kof97\"\r\narcade_kof97c = \"kof97\"\r\narcade_mslug2r = \"mslug2\"\r\narcade_kof97st = \"kof97\"\r\narcade_kof99t = \"kof99\"\r\narcade_kof99nd = \"kof99\"\r\narcade_olds100afybh = \"olds100a\"\r\narcade_kovshzlzywj = \"kovsh\"\r\narcade_kovshzlzyjz = \"kovsh\"\r\narcade_kovshzlzy = \"kovsh\"\r\narcade_kovplusxb2wj = \"kovplus\"\r\narcade_kovplusxb2ds = \"kovplus\"\r\narcade_kovplusxb2 = \"kovplus\"\r\narcade_kovplusxb1 = \"kovplus\"\r\narcade_kf2k2tt = \"kof2002\"\r\narcade_kof2k2c2 = \"kof2002\"\r\narcade_wofchdx = \"wofch\"\r\narcade_captcommr1dw = \"captcomm\"\r\narcade_wofjps = \"wof\"\r\narcade_dinows2019 = \"dino\"\r\narcade_wofr19 = \"wof\"\r\narcade_kof97sw2s = \"kof97\"\r\narcade_kof97sw2 = \"kof97\"\r\narcade_kof98eckp = \"kof98\"\r\narcade_kof98eck = \"kof98\"\r\narcade_kf2k2mp3s = \"kof2002\"\r\narcade_kf2k2mp3 = \"kof2002\"\r\narcade_olds100adsgl = \"olds100a\"\r\narcade_kovshpqxzqj = \"kovshp\"\r\narcade_kovshpp19 = \"kovshp\"\r\narcade_kovshpqxzq = \"kovshp\"\r\narcade_kovshp1v4x = \"kovshp\"\r\narcade_kovshp1v4x = \"kovshp\"\r\narcade_kov2pswcq = \"kov2p\"\r\narcade_kov2pcthl = \"kov2p\"\r\narcade_mslug5dg3 = \"mslug5\"\r\narcade_mslug5dg2 = \"mslug5\"\r\narcade_mslug4dr = \"mslug4\"\r\narcade_wofdr = \"wof\"\r\narcade_captcommpzs = \"captcomm\"\r\narcade_captcommpwx = \"captcomm\"\r\narcade_captcommpjy = \"captcomm\"\r\narcade_captcommr1bs = \"captcomm\"\r\narcade_captcommrds = \"captcomm\"\r\narcade_dinoxzb = \"dino\"\r\narcade_dinowtw = \"dino\"\r\narcade_dinowj = \"dino\"\r\narcade_dinojps = \"dino\"\r\narcade_dinojds = \"dino\"\r\narcade_mslug3g = \"mslug3\"\r\narcade_mslug3c = \"mslug3\"\r\narcade_grdianslbs = \"grdians\"\r\narcade_kof97orh = \"kof97\"\r\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/configs/buttonmapping.cfg",
    "content": "kcub1 kcuf1 kcuu1 kcud1 0x0a 0x20 knp kpp knp kpp\nleft right up down a b x y l r\n# First line contains mapped curses capability names (https://pubs.opengroup.org/onlinepubs/7908799/xcurses/terminfo.html) or hex values starting with '0x'\n# Second line contains corresponding buttons (from /tmp/joypads/<joypad>.cfg)\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/configs/dimensions.conf",
    "content": "3840x2160\n2560x1440\n1920x1080\n1280x720\n720x480\n768x576\n1680x1050\n1440x900\n1280x1024\n1280x960\n1280x800\n1024x768\n800x600\n640x480\n320x240\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/configs/emuelec.conf",
    "content": "## ------------ A - EmuELEC configuration ------------ #\n## Enable SSH at boot\nee_ssh.enabled=1\n\n## Enable Bluetooth at boot\nee_bluetooth.enabled=1\n\n## Use maxperf, enable max settings for GPU and performance governer, this setting can be set globally, per platform or per game on the ES menu\nglobal.maxperf=1\n\n## Auto shutdown timer (in minutes, 0 is OFF)\nee_auto_shutdown_timeout=0\n\n## Auto shutdown will persist between reboots as long as ee_auto_shutdown_timeout is > 0 (0 = one time or 1 = persistent)\nee_auto_shutdown_persistent=0\n\n## Always show boot video\n#ee_bootvideo.enabled=0\n\n## Which type of splash loading,\n## 0, Default - Legacy option, will load the default splash.\t\n## 1, Custom - Select your own image/video! set in ee_customsplash=\n## 2, Random - automatically selects video/image from the defined path by default /storage/roms/splash/random set in ee_randomsplashpath=\n## 3, Scraped media - This option will read your platform gamelist.xml for a predefined tag and use any media you have scraped. set in ee_scrapedsplashpath=\nee_splashloading=3\n\n## Show a custom splash image/video\nee_customsplash=\n\n## Which type of splash exit.\nee_splashexit=0\n\n## Enable custom exit splash image/video\nee_customexitsplash=\n\n## Random splash loading path\nee_randomsplashpath=/storage/roms/splash/random\n\n## Scraped section to show as splash, accepted values image,thumbnail,video,marquee, fanart or random. leave empty for default\nee_scrapedsplashpath=random\n\n## Duration of loading splash\nee_splash_loading_duration=0\n\n## Duration of exit splash\nee_splash_exit_duration=0\n\n## Splash loading platforms and roms\n## Enable Platform/Rom loading: Legacy option, will look for a file in /storage/splash/{platform}/{rom_name}.png if not found it will look for /storage/splash/{platform}/launching.png\nee_splash_loading_platform_roms=1\n\n## Set video mode\nee_videomode=1080p60hz\n\n## What to start at boot Emulationstation or Retroarch\nee_boot=Emulationstation\n\n## Always show Retroarch FPS\nglobal.showFPS=0\n\n## Enable retroarch bezels\nglobal.bezel=0\n\n## Enable splash screens\nee_splash.enabled=1\n\n## set to 1 if you have long loading times after quitting a game, you will lose sound mixing in ES, this only affects S905 devices as all others use alsa.\n#ee_alsa.always=0\n\n## Force splash screens to display for X seconds\n#ee_splash.delay=0\n\n## Some external HDDs take longer to mount than ES to load, if your external ROMS do not mount in time, increase this timer. If you have multiple external drives to scan, you must set this according to the slowest drive, as eemount will not rescan external drives as long as at least 1 external drive that provides ROMs is found.\n#ee_load.delay=0\n\n## Mount handler. There're two existing mount handler: eemount (newer and the default, written in C) and mount_romfs.sh (older, written in Bash), and you can write your own. Since it's called in a bash script (emuelec_autostart.sh), setting it to : can disable the whole mounting logic (which is not suggested) if you want to squeeze every last second of booting time.\n#ee_mount.handler=eemount\n\n## Retry mounting this many times, note this is retry, not try, actual try count will +1 (and it can't be disabled even you set it to -1, you must set ee_mount.handler=: if you don't want eemount to work at all). The retry count only affects external drive scanning and does not affect systemd mount units scanning at all.\nee_mount.retry=1\n\n# Audio device to use, comment for auto, other options 0,0 (default) 0,1 (for some AV outputs)\n#ee_audio_device=auto\n\n# Use emuelec.conf from roms folder (/storage/roms)? 0 or 1  (default 0)\n#ee_romconf_enable=0\n\n# Enable Advance mame auto gamepad configuration 1,0 (default 1)\nadvmame_auto_gamepad=1\ndolphin_auto_gamepad=1\nflycast_auto_gamepad=1\nmupen64plus_auto_gamepad=1\nadvmame_invert_axis=0\n\n# Enable Advance mame config buttom remapping 1,0 (default 0)\nadvmame_joy_remap=1\n\nAdvanceMame.joy_btns=input a button,input b button,input x button,input y button,input r button,input l button,input r2 button,input l2 button\n\nAdvanceMame.joy_btn_indexes=1,2\nAdvanceMame.joy_btn_names=mk,sf\n\nAdvanceMame.joy_btn_order0=0 1 2 3 4 5 6 7\nAdvanceMame.joy_btn_order1=3 4 2 1 0 5 6 7\nAdvanceMame.joy_btn_order2=3 2 5 1 0 4 6 7\n\n# OdroidGoAdvance Brightness Level\nbrightness.level=100\n\n## EmulationStation menu style\n## default -> default all options menu\n## none -> no menu except the game search menu\n## bartop -> less menu, only needed for bartops\n#system.es.menu=default\n\n# ------------ B - Network ------------ #\n## Set system hostname\nsystem.hostname=EMUELEC\n## Activate wifi (0,1)\nwifi.enabled=0\n## Wifi SSID (string)\n#wifi.ssid=\n## Wifi KEY (string)\n## after rebooting the \"new key\" is replace by a hidden value \"enc:xxxxx\"\n## you can edit the \"enc:xxxxx\" value to replace by a clear value, it will be updated again at the following reboot\n## Escape your special chars (# ; $) with a backslash : $ => \\$\n#wifi.key=\n\n# secondary wifi (not configurable via the user interface)\n#wifi2.ssid=new ssid\n#wifi2.key=new key\n\n# third wifi (not configurable via the user interface)\n#wifi3.ssid=new ssid\n#wifi3.key=new key\n\n# ------------ C - Audio ------------ #\n## Set the audio device (auto, hdmi, jack, speakers, headphones) mostly for OdroidGoAdvance\naudio.device=auto\n## Set system volume (0..100)\naudio.volume=100\n## Enable or disable system sounds in ES (0,1)\naudio.bgmusic=1\n## Custom menu scroll sound (.ogg-file)\nee_menuscrollsound=\n\n\n# -------------- D - Controllers ----------------- #\n# Enable support for standard bluetooth controllers\ncontrollers.bluetooth.enabled=1\n\n# ------------ F - Language and keyboard ------------ #\n## Set the language of the system (fr_FR,en_US,en_GB,de_DE,pt_BR,es_ES,it_IT,eu_ES,tr_TR,zh_CN)\nsystem.language=en_US\n## Set you local time\n## Select your timezone from : ls /usr/share/zoneinfo/ (string)\nsystem.timezone=America/Mexico_City\n\n# ------------ G - UPDATES ------------ #\n## Automatically check for updates at start (0,1)\nupdates.enabled=1\n# default : stable ; set to beta to get the next version currently being tested.\nupdates.type=stable\n\n\n# ------------ H - HERE IT IS - GLOBAL EMULATOR CONFIGURATION ------------ #\n## The global value will be used for all emulators, except if the value\n## is redefined in the emulator\n\n## Retroarch menu driver, ozone (default), rgui or xmb \n#global.retroarch.menu_driver=\n\n## Shader set\n## Automatically select shaders for all systems\n## (none, retro, scanlines)\n#global.shaderset=none\n\n## Once enabled, your screen will be cropped, and you will have a pixel perfect image (0,1)\n#global.integerscale=0\n\n## Set gpslp shader for all emulators (prefer shadersets above). Absolute path (string)\n#global.shaders=\n\n## Set ratio for all emulators (auto,4/3,16/9,16/10,custom)\n#global.ratio=4/3\n\n## Set smooth for all emulators (0,1)\n#global.smooth=1\n\n## Set rewind for all emulators (0,1)\n#global.rewind=1\n\n## Set autosave/load savestate for all emulators (0,1)\n#global.autosave=0\n\n## Set runahead frames for all emulators (0,1,2,3,4,5,6)\nglobal.runahead=0\n\n## Set secondinstance for runahead for all emulators (0,1)\nglobal.secondinstance=0\n\n## Enable retroarchievements (0,1)\n## Set your www.retroachievements.org username/password\n## Escape your special chars (# ; $) with a backslash : $ => \\$\nglobal.retroachievements=0\nglobal.retroachievements.hardcore=0\nglobal.retroachievements.leaderboards=0\nglobal.retroachievements.verbose=0\nglobal.retroachievements.screenshot=0\nglobal.retroachievements.username=\nglobal.retroachievements.password=\n\n## Enable RetroArch AI game translation service\n#global.ai_service_enabled=0\n#global.ai_service_url=\n#global.ai_target_lang=\n\n## Netplay\n#global.netplay=0\n#global.netplay.port=55435\n#global.netplay_public_announce=1\nglobal.netplay.nickname=EmuElec Player\n\n# scrapper\n# Comma seperated order to prefer images, s=snapshot, b=boxart, f=fanart, a=banner, l=logo, 3b=3D boxart\n#scrapper.style=s,b,f,a,l,3b\n\n## Configurations generated by Emulationstation\naudio.display_titles=1\naudio.display_titles_time=10\naudio.persystem=0\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/configs/emuoptions.conf",
    "content": "# THIS FILE IS NO LONGER USED, USE emuelec.conf INSTEAD\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/configs/gptokeyb/fallout.gptk",
    "content": "back = esc\r\nstart = enter\r\nguide = enter\r\na = mouse_right\r\nb = mouse_left\r\nx = i\r\ny = s\r\nl1 = b\r\nl2 = home\r\nl3 = mouse_right\r\nr1 = s\r\nr2 = end\r\nr3 = shift\r\nup = c\r\ndown = space\r\nleft = a\r\nright = space\r\nleft_analog_up = mouse_movement_up\r\nleft_analog_down = mouse_movement_down\r\nleft_analog_left = mouse_movement_left\r\nleft_analog_right = mouse_movement_right\r\nright_analog_up = up\r\nright_analog_down = down\r\nright_analog_left = left\r\nright_analog_right = right\r\nmouse_scale = 4000\r\nmouse_delay = 16\r\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/configs/gptokeyb/sorr.gptk",
    "content": "back = esc\nstart = enter\nguide = enter\n# Special\nx = x \n# Attack\nb = c\n# Jump\na = v\n# Series\ny = a\n# Combo\nl1 = s\n# back attack\nl2 = d\n# Police\nr1 = b\nup = up\ndown = down\nleft = left\nright = right\nleft_analog_up = up\nleft_analog_down = down\nleft_analog_left = left\nleft_analog_right = right\nright_analog_up = up\nright_analog_down = down\nright_analog_left = left\nright_analog_right = right\n# Unused in game but made available in case of remap\nr2 = y\nr3 = e\nl3 = z\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/configs/jslisten.cfg",
    "content": "[Generic]\nprogram=\"\"\nbutton1=\nbutton2=\nee_evdev=\"auto\"\n\n# ******** Do not edit anything above this line, in fact not even this comment! ********\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/configs/pico-8/sdl_controllers.txt",
    "content": "// add SDL2 game controller mappings to this file\n19000000010000000100000001010000,odroidgo2_joypad,a:b1,b:b0,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,dpdown:b7,dpleft:b8,dpright:b9,dpup:b6,leftx:a0,lefty:a1,guide:b10,leftstick:b12,lefttrigger:b11,rightstick:b13,righttrigger:b14,start:b15,platform:Linux,\n19000000010000000200000011000000,odroidgo2_joypad_v11\",a:b1,b:b0,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,leftx:a0,lefty:a1,guide:b12,leftstick:b14,lefttrigger:b13,rightstick:b15,righttrigger:b16,start:b17,platform:Linux,\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/configs/tz",
    "content": "Africa/Abidjan\nAfrica/Accra\nAfrica/Addis_Ababa\nAfrica/Algiers\nAfrica/Asmara\nAfrica/Asmera\nAfrica/Bamako\nAfrica/Bangui\nAfrica/Banjul\nAfrica/Bissau\nAfrica/Blantyre\nAfrica/Brazzaville\nAfrica/Bujumbura\nAfrica/Cairo\nAfrica/Casablanca\nAfrica/Ceuta\nAfrica/Conakry\nAfrica/Dakar\nAfrica/Dar_es_Salaam\nAfrica/Djibouti\nAfrica/Douala\nAfrica/El_Aaiun\nAfrica/Freetown\nAfrica/Gaborone\nAfrica/Harare\nAfrica/Johannesburg\nAfrica/Juba\nAfrica/Kampala\nAfrica/Khartoum\nAfrica/Kigali\nAfrica/Kinshasa\nAfrica/Lagos\nAfrica/Libreville\nAfrica/Lome\nAfrica/Luanda\nAfrica/Lubumbashi\nAfrica/Lusaka\nAfrica/Malabo\nAfrica/Maputo\nAfrica/Maseru\nAfrica/Mbabane\nAfrica/Mogadishu\nAfrica/Monrovia\nAfrica/Nairobi\nAfrica/Ndjamena\nAfrica/Niamey\nAfrica/Nouakchott\nAfrica/Ouagadougou\nAfrica/Porto-Novo\nAfrica/Sao_Tome\nAfrica/Timbuktu\nAfrica/Tripoli\nAfrica/Tunis\nAfrica/Windhoek\nAmerica/Adak\nAmerica/Anchorage\nAmerica/Anguilla\nAmerica/Antigua\nAmerica/Araguaina\nAmerica/Argentina/Buenos_Aires\nAmerica/Argentina/Catamarca\nAmerica/Argentina/ComodRivadavia\nAmerica/Argentina/Cordoba\nAmerica/Argentina/Jujuy\nAmerica/Argentina/La_Rioja\nAmerica/Argentina/Mendoza\nAmerica/Argentina/Rio_Gallegos\nAmerica/Argentina/Salta\nAmerica/Argentina/San_Juan\nAmerica/Argentina/San_Luis\nAmerica/Argentina/Tucuman\nAmerica/Argentina/Ushuaia\nAmerica/Aruba\nAmerica/Asuncion\nAmerica/Atikokan\nAmerica/Atka\nAmerica/Bahia\nAmerica/Bahia_Banderas\nAmerica/Barbados\nAmerica/Belem\nAmerica/Belize\nAmerica/Blanc-Sablon\nAmerica/Boa_Vista\nAmerica/Bogota\nAmerica/Boise\nAmerica/Buenos_Aires\nAmerica/Cambridge_Bay\nAmerica/Campo_Grande\nAmerica/Cancun\nAmerica/Caracas\nAmerica/Catamarca\nAmerica/Cayenne\nAmerica/Cayman\nAmerica/Chicago\nAmerica/Chihuahua\nAmerica/Coral_Harbour\nAmerica/Cordoba\nAmerica/Costa_Rica\nAmerica/Creston\nAmerica/Cuiaba\nAmerica/Curacao\nAmerica/Danmarkshavn\nAmerica/Dawson\nAmerica/Dawson_Creek\nAmerica/Denver\nAmerica/Detroit\nAmerica/Dominica\nAmerica/Edmonton\nAmerica/Eirunepe\nAmerica/El_Salvador\nAmerica/Ensenada\nAmerica/Fort_Nelson\nAmerica/Fort_Wayne\nAmerica/Fortaleza\nAmerica/Glace_Bay\nAmerica/Godthab\nAmerica/Goose_Bay\nAmerica/Grand_Turk\nAmerica/Grenada\nAmerica/Guadeloupe\nAmerica/Guatemala\nAmerica/Guayaquil\nAmerica/Guyana\nAmerica/Halifax\nAmerica/Havana\nAmerica/Hermosillo\nAmerica/Indiana/Indianapolis\nAmerica/Indiana/Knox\nAmerica/Indiana/Marengo\nAmerica/Indiana/Petersburg\nAmerica/Indiana/Tell_City\nAmerica/Indiana/Vevay\nAmerica/Indiana/Vincennes\nAmerica/Indiana/Winamac\nAmerica/Indianapolis\nAmerica/Inuvik\nAmerica/Iqaluit\nAmerica/Jamaica\nAmerica/Jujuy\nAmerica/Juneau\nAmerica/Kentucky/Louisville\nAmerica/Kentucky/Monticello\nAmerica/Knox_IN\nAmerica/Kralendijk\nAmerica/La_Paz\nAmerica/Lima\nAmerica/Los_Angeles\nAmerica/Louisville\nAmerica/Lower_Princes\nAmerica/Maceio\nAmerica/Managua\nAmerica/Manaus\nAmerica/Marigot\nAmerica/Martinique\nAmerica/Matamoros\nAmerica/Mazatlan\nAmerica/Mendoza\nAmerica/Menominee\nAmerica/Merida\nAmerica/Metlakatla\nAmerica/Mexico_City\nAmerica/Miquelon\nAmerica/Moncton\nAmerica/Monterrey\nAmerica/Montevideo\nAmerica/Montreal\nAmerica/Montserrat\nAmerica/Nassau\nAmerica/New_York\nAmerica/Nipigon\nAmerica/Nome\nAmerica/Noronha\nAmerica/North_Dakota/Beulah\nAmerica/North_Dakota/Center\nAmerica/North_Dakota/New_Salem\nAmerica/Ojinaga\nAmerica/Panama\nAmerica/Pangnirtung\nAmerica/Paramaribo\nAmerica/Phoenix\nAmerica/Port-au-Prince\nAmerica/Port_of_Spain\nAmerica/Porto_Acre\nAmerica/Porto_Velho\nAmerica/Puerto_Rico\nAmerica/Punta_Arenas\nAmerica/Rainy_River\nAmerica/Rankin_Inlet\nAmerica/Recife\nAmerica/Regina\nAmerica/Resolute\nAmerica/Rio_Branco\nAmerica/Rosario\nAmerica/Santa_Isabel\nAmerica/Santarem\nAmerica/Santiago\nAmerica/Santo_Domingo\nAmerica/Sao_Paulo\nAmerica/Scoresbysund\nAmerica/Shiprock\nAmerica/Sitka\nAmerica/St_Barthelemy\nAmerica/St_Johns\nAmerica/St_Kitts\nAmerica/St_Lucia\nAmerica/St_Thomas\nAmerica/St_Vincent\nAmerica/Swift_Current\nAmerica/Tegucigalpa\nAmerica/Thule\nAmerica/Thunder_Bay\nAmerica/Tijuana\nAmerica/Toronto\nAmerica/Tortola\nAmerica/Vancouver\nAmerica/Virgin\nAmerica/Whitehorse\nAmerica/Winnipeg\nAmerica/Yakutat\nAmerica/Yellowknife\nAntarctica/Casey\nAntarctica/Davis\nAntarctica/DumontDUrville\nAntarctica/Macquarie\nAntarctica/Mawson\nAntarctica/McMurdo\nAntarctica/Palmer\nAntarctica/Rothera\nAntarctica/South_Pole\nAntarctica/Syowa\nAntarctica/Troll\nAntarctica/Vostok\nArctic/Longyearbyen\nAsia/Aden\nAsia/Almaty\nAsia/Amman\nAsia/Anadyr\nAsia/Aqtau\nAsia/Aqtobe\nAsia/Ashgabat\nAsia/Ashkhabad\nAsia/Atyrau\nAsia/Baghdad\nAsia/Bahrain\nAsia/Baku\nAsia/Bangkok\nAsia/Barnaul\nAsia/Beirut\nAsia/Bishkek\nAsia/Brunei\nAsia/Calcutta\nAsia/Chita\nAsia/Choibalsan\nAsia/Chongqing\nAsia/Chungking\nAsia/Colombo\nAsia/Dacca\nAsia/Damascus\nAsia/Dhaka\nAsia/Dili\nAsia/Dubai\nAsia/Dushanbe\nAsia/Famagusta\nAsia/Gaza\nAsia/Harbin\nAsia/Hebron\nAsia/Ho_Chi_Minh\nAsia/Hong_Kong\nAsia/Hovd\nAsia/Irkutsk\nAsia/Istanbul\nAsia/Jakarta\nAsia/Jayapura\nAsia/Jerusalem\nAsia/Kabul\nAsia/Kamchatka\nAsia/Karachi\nAsia/Kashgar\nAsia/Kathmandu\nAsia/Katmandu\nAsia/Khandyga\nAsia/Kolkata\nAsia/Krasnoyarsk\nAsia/Kuala_Lumpur\nAsia/Kuching\nAsia/Kuwait\nAsia/Macao\nAsia/Macau\nAsia/Magadan\nAsia/Makassar\nAsia/Manila\nAsia/Muscat\nAsia/Nicosia\nAsia/Novokuznetsk\nAsia/Novosibirsk\nAsia/Omsk\nAsia/Oral\nAsia/Phnom_Penh\nAsia/Pontianak\nAsia/Pyongyang\nAsia/Qatar\nAsia/Qostanay\nAsia/Qyzylorda\nAsia/Rangoon\nAsia/Riyadh\nAsia/Saigon\nAsia/Sakhalin\nAsia/Samarkand\nAsia/Seoul\nAsia/Shanghai\nAsia/Singapore\nAsia/Srednekolymsk\nAsia/Taipei\nAsia/Tashkent\nAsia/Tbilisi\nAsia/Tehran\nAsia/Tel_Aviv\nAsia/Thimbu\nAsia/Thimphu\nAsia/Tokyo\nAsia/Tomsk\nAsia/Ujung_Pandang\nAsia/Ulaanbaatar\nAsia/Ulan_Bator\nAsia/Urumqi\nAsia/Ust-Nera\nAsia/Vientiane\nAsia/Vladivostok\nAsia/Yakutsk\nAsia/Yangon\nAsia/Yekaterinburg\nAsia/Yerevan\nAtlantic/Azores\nAtlantic/Bermuda\nAtlantic/Canary\nAtlantic/Cape_Verde\nAtlantic/Faeroe\nAtlantic/Faroe\nAtlantic/Jan_Mayen\nAtlantic/Madeira\nAtlantic/Reykjavik\nAtlantic/South_Georgia\nAtlantic/St_Helena\nAtlantic/Stanley\nAustralia/ACT\nAustralia/Adelaide\nAustralia/Brisbane\nAustralia/Broken_Hill\nAustralia/Canberra\nAustralia/Currie\nAustralia/Darwin\nAustralia/Eucla\nAustralia/Hobart\nAustralia/LHI\nAustralia/Lindeman\nAustralia/Lord_Howe\nAustralia/Melbourne\nAustralia/NSW\nAustralia/North\nAustralia/Perth\nAustralia/Queensland\nAustralia/South\nAustralia/Sydney\nAustralia/Tasmania\nAustralia/Victoria\nAustralia/West\nAustralia/Yancowinna\nBrazil/Acre\nBrazil/DeNoronha\nBrazil/East\nBrazil/West\nCET\nCST6CDT\nCanada/Atlantic\nCanada/Central\nCanada/Eastern\nCanada/Mountain\nCanada/Newfoundland\nCanada/Pacific\nCanada/Saskatchewan\nCanada/Yukon\nChile/Continental\nChile/EasterIsland\nCuba\nEET\nEST\nEST5EDT\nEgypt\nEire\nEtc/GMT\nEtc/GMT+0\nEtc/GMT+1\nEtc/GMT+10\nEtc/GMT+11\nEtc/GMT+12\nEtc/GMT+2\nEtc/GMT+3\nEtc/GMT+4\nEtc/GMT+5\nEtc/GMT+6\nEtc/GMT+7\nEtc/GMT+8\nEtc/GMT+9\nEtc/GMT-0\nEtc/GMT-1\nEtc/GMT-10\nEtc/GMT-11\nEtc/GMT-12\nEtc/GMT-13\nEtc/GMT-14\nEtc/GMT-2\nEtc/GMT-3\nEtc/GMT-4\nEtc/GMT-5\nEtc/GMT-6\nEtc/GMT-7\nEtc/GMT-8\nEtc/GMT-9\nEtc/GMT0\nEtc/Greenwich\nEtc/UCT\nEtc/UTC\nEtc/Universal\nEtc/Zulu\nEurope/Amsterdam\nEurope/Andorra\nEurope/Astrakhan\nEurope/Athens\nEurope/Belfast\nEurope/Belgrade\nEurope/Berlin\nEurope/Bratislava\nEurope/Brussels\nEurope/Bucharest\nEurope/Budapest\nEurope/Busingen\nEurope/Chisinau\nEurope/Copenhagen\nEurope/Dublin\nEurope/Gibraltar\nEurope/Guernsey\nEurope/Helsinki\nEurope/Isle_of_Man\nEurope/Istanbul\nEurope/Jersey\nEurope/Kaliningrad\nEurope/Kiev\nEurope/Kirov\nEurope/Lisbon\nEurope/Ljubljana\nEurope/London\nEurope/Luxembourg\nEurope/Madrid\nEurope/Malta\nEurope/Mariehamn\nEurope/Minsk\nEurope/Monaco\nEurope/Moscow\nEurope/Nicosia\nEurope/Oslo\nEurope/Paris\nEurope/Podgorica\nEurope/Prague\nEurope/Riga\nEurope/Rome\nEurope/Samara\nEurope/San_Marino\nEurope/Sarajevo\nEurope/Saratov\nEurope/Simferopol\nEurope/Skopje\nEurope/Sofia\nEurope/Stockholm\nEurope/Tallinn\nEurope/Tirane\nEurope/Tiraspol\nEurope/Ulyanovsk\nEurope/Uzhgorod\nEurope/Vaduz\nEurope/Vatican\nEurope/Vienna\nEurope/Vilnius\nEurope/Volgograd\nEurope/Warsaw\nEurope/Zagreb\nEurope/Zaporozhye\nEurope/Zurich\nGB\nGB-Eire\nGMT\nGMT+0\nGMT-0\nGMT0\nGreenwich\nHST\nHongkong\nIceland\nIndian/Antananarivo\nIndian/Chagos\nIndian/Christmas\nIndian/Cocos\nIndian/Comoro\nIndian/Kerguelen\nIndian/Mahe\nIndian/Maldives\nIndian/Mauritius\nIndian/Mayotte\nIndian/Reunion\nIran\nIsrael\nJamaica\nJapan\nKwajalein\nLibya\nMET\nMST\nMST7MDT\nMexico/BajaNorte\nMexico/BajaSur\nMexico/General\nNZ\nNZ-CHAT\nNavajo\nPRC\nPST8PDT\nPacific/Apia\nPacific/Auckland\nPacific/Bougainville\nPacific/Chatham\nPacific/Chuuk\nPacific/Easter\nPacific/Efate\nPacific/Enderbury\nPacific/Fakaofo\nPacific/Fiji\nPacific/Funafuti\nPacific/Galapagos\nPacific/Gambier\nPacific/Guadalcanal\nPacific/Guam\nPacific/Honolulu\nPacific/Johnston\nPacific/Kiritimati\nPacific/Kosrae\nPacific/Kwajalein\nPacific/Majuro\nPacific/Marquesas\nPacific/Midway\nPacific/Nauru\nPacific/Niue\nPacific/Norfolk\nPacific/Noumea\nPacific/Pago_Pago\nPacific/Palau\nPacific/Pitcairn\nPacific/Pohnpei\nPacific/Ponape\nPacific/Port_Moresby\nPacific/Rarotonga\nPacific/Saipan\nPacific/Samoa\nPacific/Tahiti\nPacific/Tarawa\nPacific/Tongatapu\nPacific/Truk\nPacific/Wake\nPacific/Wallis\nPacific/Yap\nPoland\nPortugal\nROC\nROK\nSingapore\nTurkey\nUCT\nUS/Alaska\nUS/Aleutian\nUS/Arizona\nUS/Central\nUS/East-Indiana\nUS/Eastern\nUS/Hawaii\nUS/Indiana-Starke\nUS/Michigan\nUS/Mountain\nUS/Pacific\nUS/Pacific-New\nUS/Samoa\nUTC\nUniversal\nW-SU\nWET\nZulu\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/lib/put_user_libs_here",
    "content": "Place user libs here, they will take priority over /usr\n\nPlease take care of the added libraries by yourself and remember to clean/update them if neccessary for each update as they may be outdated and break some programs"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/lib32/put_32b_user_libs_here",
    "content": "Place 32bit user libs here, they will take priority over /usr\n\nPlease take care of the added libraries by yourself and remember to clean/update them if neccessary for each update as they may be outdated and break some programs"
  },
  {
    "path": "packages/sx05re/emuelec/config/emuelec/scripts/put_user_scripts_here",
    "content": "pleace user scripts here, they will show up in \"Setup\" section in ES\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emulationstation/scripts/es_env.sh",
    "content": "HOME=/storage\n#LD_LIBRARY_PATH=/emuelec/lib:/usr/lib:/usr/lib/pulseaudio\nPATH=/emuelec/scripts:/emuelec/bin:/usr/bin:/usr/sbin:/storage/.config/emulationstation/scripts:/usr/bin/batocera\n#SDL_AUDIODRIVER=alsa\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emulationstation/scripts/inputconfiguration.sh",
    "content": "#!/usr/bin/bash\n\n# This file is part of The RetroPie Project\n#\n# The RetroPie Project is the legal property of its developers, whose names are\n# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.\n#\n# See the LICENSE.md file at the top-level directory of this distribution and\n# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md\n#\n\n## @file scriptmodules/supplementary/emulationstation/inputconfiguration.sh\n## @brief input configuration script\n## @copyright GPLv3\n## @details\n## @par global variables\n##\n## There are 3 global variables which are set to the current device being processed\n##\n## `DEVICE_TYPE` = device type is currently either joystick, keyboard or cec\n## `DEVICE_NAME` = name of the device\n## `DEVICE_GUID` = SDL2 joystick GUID of the device (-1 for keyboard, -2 for cec)\n##\n## @par Interface functions\n##\n## each input configuration module can have an optional function\n## `check_<filename without extension>`. If this function returns 1, the module is\n## skipped. This can be used to skip input configurations in some cases - eg\n## to skip configuration when an existing config file is not installed.\n##\n## There are 3 main interface functions for each of the input types (joystick/keyboard)\n##\n## function `onstart_<filename without extension>_<inputtype>()`\n## is run at the start of the input configuration\n##\n## function `onend_<filename without extension>_<inputtype>()`\n## is run at the end of the input configuration\n##\n## Returns:\n##   None\n##\n## function map_<filename without extension>_<inputtype>()\n## is run for each of the inputs - with the following arguments\n##\n## Arguments:\n## * ${1} - input name is one of the following\n##  * up, down, left, right\n##  * a, b, x, y\n##  * leftshoulder, rightshoulder, lefttrigger, righttrigger\n##  * leftthumb. rightthumb\n##  * start, select\n##  * leftanalogup, leftanalogdown, leftanalogleft, leftanalogright\n##  * rightanalogup, rightanalogdown, rightanalogleft, rightanalogright\n## * ${2} - input type is button, axis or hat for joysticks, key for keyboard and button for cec.\n## * ${3} - button id of the input for a joystick, SDL2 keycode for a keyboard, or button id for cec.\n## * ${4} - value of the joystick input or 1 for keyboard and cec.\n##\n## Returns:\n##   None\n# Modified 2019 by Shanti Gilbert for EmuELEC/CoreELEC (https//www.coreelec.org)\n\nfunction inputconfiguration() {\n\n    local es_conf=\"${home}/.emulationstation/es_temporaryinput.cfg\"\n    declare -A mapping\n\n    # check if we have the temporary input file\n    [[ ! -f \"${es_conf}\" ]] && return\n\n# EmuELEC: ES is doing something weird to es_temp so we try to clean it up\nif cat \"${es_conf}\" | grep \"<></>\"; then\n\tsed -i '3d;4d;5d' \"${es_conf}\"\nfi \n# EmuELEC\n\n    local line\n    while read line; do\n        if [[ -n \"${line}\" ]]; then\n            local input=(${line})\n            mapping[\"${input[0]}\"]=${input[@]:1}\n        fi\n    done < <(xmlstarlet sel --text -t -m \"/inputList/inputConfig/input\"  -v \"concat(@name,' ',@type,' ',@id,' ',@value)\" -n \"${es_conf}\")\n\n    local inputscriptdir=$(dirname \"${0}\")\n    local inputscriptdir=$(cd \"${inputscriptdir}\" && pwd)\n\n    DEVICE_TYPE=$(xmlstarlet sel --text -t -v \"/inputList/inputConfig/@type\" \"${es_conf}\")\n    DEVICE_NAME=$(xmlstarlet sel --text -t -v \"/inputList/inputConfig/@deviceName\" \"${es_conf}\")\n    DEVICE_GUID=$(xmlstarlet sel --text -t -v \"/inputList/inputConfig/@deviceGUID\" \"${es_conf}\")\n\n    echo \"Input type is '${DEVICE_TYPE}'.\"\n\n    local module\n    # call all configuration modules with the\n    for module in $(find \"${inputscriptdir}/configscripts/\" -maxdepth 1 -name \"*.sh\" | sort); do\n\n        source \"${module}\"  # register functions from emulatorconfigs folder\n        local module_id=${module##*/}\n        local module_id=${module_id%.sh}\n\n        local funcname=\"check_${module_id}\"\n        # call check_module to check if we should run it\n        if fn_exists \"${funcname}\"; then\n            \"${funcname}\" || continue\n        fi\n\n        echo \"Configuring '${module_id}'\"\n\n        # at the start, the onstart_module function is called.\n        funcname=\"onstart_${module_id}_${DEVICE_TYPE}\"\n        fn_exists \"${funcname}\" && \"${funcname}\"\n\n        local input_name\n        # loop through all buttons and use corresponding config function if it exists\n        for input_name in \"${!mapping[@]}\"; do\n            funcname=\"map_${module_id}_${DEVICE_TYPE}\"\n\n            if fn_exists \"${funcname}\"; then\n                local params=(${mapping[${input_name}]})\n                local input_type=${params[0]}\n                local input_id=${params[1]}\n                local input_value=${params[2]}\n\n                \"${funcname}\" \"${input_name}\" \"${input_type}\" \"${input_id}\" \"${input_value}\"\n            fi\n        done\n\n        # at the end, the onend_module function is called\n        funcname=\"onend_${module_id}_${DEVICE_TYPE}\"\n        fn_exists \"${funcname}\" && \"${funcname}\"\n\n    done\n\n}\n\nfunction fn_exists() {\n    declare -f \"${1}\" > /dev/null\n    return $?\n}\n\nfunction sdl1_map() {\n    # check if sdl1_map already exists\n    [[ -v sdl1_map[@] ]] && return\n\n    # SDL codes from https://wiki.libsdl.org/SDLKeycodeLookup mapped to /usr/include/SDL/SDL_keysym.h\n    declare -Ag sdl1_map\n    local i\n    for i in {0..127}; do\n        sdl1_map[\"${i}\"]=\"${i}\"\n    done\n\n    sdl1_map[\"1073741881\"]=\"301\" # SDLK SDLK_CAPSLOCK\n    sdl1_map[\"1073741882\"]=\"282\" # SDLK SDLK_F1\n    sdl1_map[\"1073741883\"]=\"283\" # SDLK SDLK_F2\n    sdl1_map[\"1073741884\"]=\"284\" # SDLK SDLK_F3\n    sdl1_map[\"1073741885\"]=\"285\" # SDLK SDLK_F4\n    sdl1_map[\"1073741886\"]=\"286\" # SDLK SDLK_F5\n    sdl1_map[\"1073741887\"]=\"287\" # SDLK SDLK_F6\n    sdl1_map[\"1073741888\"]=\"288\" # SDLK SDLK_F7\n    sdl1_map[\"1073741889\"]=\"289\" # SDLK SDLK_F8\n    sdl1_map[\"1073741890\"]=\"290\" # SDLK SDLK_F9\n    sdl1_map[\"1073741891\"]=\"291\" # SDLK SDLK_F10\n    sdl1_map[\"1073741892\"]=\"292\" # SDLK SDLK_F11\n    sdl1_map[\"1073741893\"]=\"293\" # SDLK SDLK_F12\n    sdl1_map[\"1073741894\"]=\"316\" # SDLK SDLK_PRINTSCREEN\n    sdl1_map[\"1073741895\"]=\"302\" # SDLK SDLK_SCROLLLOCK\n    sdl1_map[\"1073741896\"]=\"19\"  # SDLK SDLK_PAUSE\n    sdl1_map[\"1073741897\"]=\"277\" # SDLK SDLK_INSERT\n    sdl1_map[\"1073741898\"]=\"278\" # SDLK SDLK_HOME\n    sdl1_map[\"1073741899\"]=\"280\" # SDLK SDLK_PAGEUP\n    sdl1_map[\"1073741901\"]=\"279\" # SDLK SDLK_END\n    sdl1_map[\"1073741902\"]=\"281\" # SDLK SDLK_PAGEDOWN\n    sdl1_map[\"1073741903\"]=\"275\" # SDLK SDLK_RIGHT\n    sdl1_map[\"1073741904\"]=\"276\" # SDLK SDLK_LEFT\n    sdl1_map[\"1073741905\"]=\"274\" # SDLK SDLK_DOWN\n    sdl1_map[\"1073741906\"]=\"273\" # SDLK SDLK_UP\n    sdl1_map[\"1073741908\"]=\"267\" # SDLK SDLK_KP_DIVIDE\n    sdl1_map[\"1073741909\"]=\"268\" # SDLK SDLK_KP_MULTIPLY\n    sdl1_map[\"1073741910\"]=\"269\" # SDLK SDLK_KP_MINUS\n    sdl1_map[\"1073741911\"]=\"270\" # SDLK SDLK_KP_PLUS\n    sdl1_map[\"1073741912\"]=\"271\" # SDLK SDLK_KP_ENTER\n    sdl1_map[\"1073741913\"]=\"257\" # SDLK SDLK_KP_1\n    sdl1_map[\"1073741914\"]=\"258\" # SDLK SDLK_KP_2\n    sdl1_map[\"1073741915\"]=\"259\" # SDLK SDLK_KP_3\n    sdl1_map[\"1073741916\"]=\"260\" # SDLK SDLK_KP_4\n    sdl1_map[\"1073741917\"]=\"261\" # SDLK SDLK_KP_5\n    sdl1_map[\"1073741918\"]=\"262\" # SDLK SDLK_KP_6\n    sdl1_map[\"1073741919\"]=\"263\" # SDLK SDLK_KP_7\n    sdl1_map[\"1073741920\"]=\"264\" # SDLK SDLK_KP_8\n    sdl1_map[\"1073741921\"]=\"265\" # SDLK SDLK_KP_9\n    sdl1_map[\"1073741922\"]=\"256\" # SDLK SDLK_KP_0\n    sdl1_map[\"1073741923\"]=\"266\" # SDLK SDLK_KP_PERIOD\n    sdl1_map[\"1073741926\"]=\"320\" # SDLK SDLK_POWER\n    sdl1_map[\"1073741927\"]=\"272\" # SDLK SDLK_KP_EQUALS\n    sdl1_map[\"1073741928\"]=\"294\" # SDLK SDLK_F13\n    sdl1_map[\"1073741929\"]=\"295\" # SDLK SDLK_F14\n    sdl1_map[\"1073741930\"]=\"296\" # SDLK SDLK_F15\n    sdl1_map[\"1073741941\"]=\"315\" # SDLK SDLK_HELP\n    sdl1_map[\"1073741942\"]=\"319\" # SDLK SDLK_MENU\n    sdl1_map[\"1073741946\"]=\"322\" # SDLK SDLK_UNDO\n    sdl1_map[\"1073741978\"]=\"317\" # SDLK SDLK_SYSREQ\n    sdl1_map[\"1073742048\"]=\"306\" # SDLK SDLK_LCTRL\n    sdl1_map[\"1073742049\"]=\"304\" # SDLK SDLK_LSHIFT\n    sdl1_map[\"1073742050\"]=\"308\" # SDLK SDLK_LALT\n    sdl1_map[\"1073742051\"]=\"311\" # SDLK SDLK_LGUI\n    sdl1_map[\"1073742052\"]=\"305\" # SDLK SDLK_RCTRL\n    sdl1_map[\"1073742053\"]=\"303\" # SDLK SDLK_RSHIFT\n    sdl1_map[\"1073742054\"]=\"307\" # SDLK SDLK_RALT\n    sdl1_map[\"1073742055\"]=\"312\" # SDLK SDLK_RGUI\n    sdl1_map[\"1073742081\"]=\"313\" # SDLK SDLK_MODE\n}\n\n###### main ######\n\nhome=\"/storage\"\n\nrootdir=\"/storage\"\nconfigdir=\"${rootdir}/.config\"\n\nsource \"/usr/bin/scripts/scriptmodules/inifuncs.sh\"\n\ngetAutoConf \"disable\" || inputconfiguration\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emulationstation/scripts/pixel.sh",
    "content": "#!/bin/bash\n\nfbdev=/dev/fb0 ;   width=1280 ; bpp=4\ncolor=\"\\x00\\x00\\x00\\x00\" #black colored\n\nfunction pixel()\n{  xx=${1} ; yy=${2}\n   printf \"${color}\" | dd bs=${bpp} seek=$((${yy} * ${width} + ${xx})) \\\n                        of=${fbdev} &>/dev/null\n}\nx=0 ; y=0 ; clear\nfor i in {1..500}; do\n   pixel $((x++)) $((y++))\ndone\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emulationstation/scripts/setvolume.sh",
    "content": "#!/bin/bash\n\n# Argument ${1} is the program name ${2} is the volume value (without \"%\")\n\nCURRENTVOL=$(pactl list sink-inputs | grep ${1} -B 20 | grep \"front-left:\" | cut -d \"/\" -f 2)\npactl set-sink-input-volume $(pactl list sink-inputs | grep ${1} -B 20 | grep \"#\" | cut -d \\# -f 2) \"${2}\"%\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/emulationstation/scripts/wifi.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Helper script to activate/desactivate WLAN from command line\n\n# Usage :\n# wifi connect <ssid> <passphrase>\n# wifi disconnect <ssid> \n# wifi scan\n# wifi status\n\n#####################################################\n\n# downloaded from : https://jira.automotivelinux.org/secure/attachment/10300/wifi\n\n### global vars ###\n\nCONNMAN=/usr/bin/connmanctl\n\nscript=$(basename \"${0}\")\nconfigpath=/storage/.cache/connman # connman config directory\nssid=\"\" \t# ssid of wifi network to reach\npassphrase=\"\" \t# passphrase of wifi network to reach\nservice=\"\"\t# service identifier of the network service to reach\nfullservice=\"\"\t# <ssid><service>\n\nfunction error() {\n\techo ERROR: \"$@\" >&2\n\tcat << EOF >&2\nUsage:\n\t${script} connect <ssid> [passphrase]\n\t${script} disconnect [ssid]\n\t${script} scan\n\t${script} status\nEOF\n\texit 1\n}\n\nfunction wifi_enable() {\n\tcommand=$(${CONNMAN} technologies | grep -A 4 wifi | sed -n '4p')\n\n\tif [[ ${command} == *True ]]; then\n\t\techo \">>> Wifi is already enabled ... Ok\"\n\telse\n\t\techo \">>> Enabling wifi ...\"\n\t\tcommand=$(${CONNMAN} enable wifi)\n\t\tif [[ ${command} == Enabled* ]]; then\n\t\t\techo ${command}\n\t\telse\n\t\t\techo \">>> Cannot enable wifi !\"\n\t\t\texit 1\n\t\tfi\n\tfi\n}\n\nfunction wifi_disable() {\n\t${CONNMAN} disable wifi\n}\n\nfunction wifi_scan() {\n\techo -e \"\\n>>> Scanning for available wifi networks...\"\n\t${CONNMAN} scan wifi\n}\n\nfunction wifi_connected() {\n\tcommand=$(${CONNMAN} technologies | grep -A 4 wifi | sed -n '5p')\n\n\tif [[ ${command} == *True ]];then\n\t\techo -e \"\\n>>> Already connected to a wifi network\"\n\t\treturn 0\n\tfi\n\treturn 1\n}\n\nfunction wifi_status() {\n\techo -e \"\\n>>> Wifi status:\"\n\t${CONNMAN} technologies | grep -A 4 wifi\n\techo -e \"\\n>>> Available SSIDs:\"\n\t${CONNMAN} services | grep wifi_\n}\n\nfunction wifi_config() {\n\techo -e \"\\n>>> Setting up wifi connection...\"\n\n\tretries=5\n\n\twhile [ 1 ]; do\n\t\t${CONNMAN} scan wifi\n\t\techo -e \"\\n>>> Available SSIDs:\"\n\t\t${CONNMAN} services | grep wifi_\n\n\t\tfullservice=$(${CONNMAN} services | cut -c 5- | sed 's/ \\+ /:/g' | grep \"${ssid}:\")\n\t\tif [[ -n ${fullservice} ]]; then\n\t\t\tbreak\n\t\tfi\n\n\t\tretries=$(( retries - 1 ))\n\t\tif [[ ${retries} -gt 0 ]]; then\n\t\t\techo \"waiting for ${ssid} to appear...\"\n\t\t\tsleep 5\n\t\t\tcontinue\n\t\tfi\n\t\techo \"Target ssid not found !\"\n\t\texit 1\n\tdone\n\n\tssid=$(echo \"${fullservice}\" | awk -F: '{print ${1}}')\n\tservice=$(echo \"${fullservice}\" | awk -F: '{print ${2}}')\n\n\techo \"Target ssid found - config is :\"\n\techo \"SSID       : ${ssid}\"\n\techo \"Service Id : ${service}\"\n\techo \"Passphrase : ${passphrase}\"\n\n\tcat <<EOF >\"${configpath}/${ssid}.config\"\n[service_${service}]\nName = ${ssid}\nType = wifi\nPassphrase = ${passphrase}\nEOF\n\techo \"Configuration written\"\n}\n\nfunction wifi_connect() {\n\techo -e \"\\n>>> Performing connection ...\"\n\toutput=$(${CONNMAN} connect ${service})\n\n\tif [[ ${output} == Connected* ]];then\n\t\techo \"...Ok.\"\n\t\techo ${output}\n\telse\n\t\techo \"...connection failed !\"\n\t\techo ${output}\n\n\t\twifi_disconnect \n\t\techo \"Check your SSID or your passphrase\"\n\t\t#read -n 1 -s -r -p \"Press any key to continue\"\n\t\texit 1\n\tfi\n}\n\nfunction wifi_disconnect() {\n\n\tif [[ -z \"${ssid}\" ]]; then\n\t\t${CONNMAN} services | cut -c5- | sed 's/ \\+ /:/g' | ( while read line; do\n\t\t\tssid=$(cut -f1 -d':' <<<${line})\n\t\t\tserv=$(cut -f2 -d':' <<<${line})\n\t\t\tif [[ \"${serv}\" =~ ^wifi_  && -f \"${configpath}/${ssid}.config\" ]]; then\n\t\t\t\techo \"Disconnecting ${serv}\"\n\t\t\t\t${CONNMAN} disconnect ${serv}\n\t\t\t\techo \"Cleaning config ${ssid}.config\"\n\t\t\t\trm -rf \"${configpath}/${ssid}.config\"\n\t\t\tfi\n\t\tdone )\n\t\treturn 0\n\tfi\n\n\tservice=$(${CONNMAN} services | cut -c 5- | sed 's/ \\+ /:/g' | grep \"^${ssid}:\" | awk -F: '{print ${2}}')\n\tif [[ -z \"${service}\" ]]; then\n\t\techo \"... unknown service\"\n\t\trm -rf \"${configpath}/${ssid}.config\" # clear config in all cases\n\t\treturn 1\n\tfi\n\n\toutput=$(${CONNMAN} disconnect ${service})\n\trm -rf \"${configpath}/${ssid}.config\" # clear config in all cases\n\tif [[ ${output} == Disconnected* ]];then\n\t\techo \"...Ok.\"\n\t\techo ${output}\n\telse\n\t\techo \"...disconnection failed !\"\n\t\techo ${output}\n\t\treturn 1\n\tfi\n}\n\n\n# changes made by emuELEC \n\nCOPTION=${1}\nCSSID=${2}\nCPASS=${3}\n\nif [ -z \"${CSSID}\" ]; then\n# check for a file named wifi.txt on /storage/.config or /flash\n# read the content ssid:password and pass it as parameters to the script\n\n\tif [ -f \"/storage/.config/wifi.txt\" ]; then\n\t\tstr=$(cat /storage/.config/wifi.txt)\n\telif [ -f \"/flash/wifi.txt\" ]; then\n\t\tstr=$(cat /flash/wifi.txt)\n\telse\n\t\techo \"no wifi.txt found. Make sure you create one in /storage/.config/wifi.txt and add your ssid:password inside\"\n\t\t#read -n 1 -s -r -p \"Press any key to continue\"\n\tfi\n\n\tIFS=':' # space is set as delimiter\n\tread -ra WIFI <<< \"${str}\" # str is read into an array as tokens separated by IFS\n\nfi\n\n[ -z \"${COPTION}\" ] && COPTION=\"connect\"\n[ -z \"${CSSID}\" ] && CSSID=${WIFI[0]}\n[ -z \"${CPASS}\" ] && CPASS=${WIFI[1]}\n\nif wifi_connected; then\n    ssid=${CSSID}\n\twifi_disconnect\n\techo \"WiFi disconnected\"\n\t#read -n 1 -s -r -p \"Press any key to continue\"\n\texit 0\nfi \n\ncase ${COPTION} in\n\tconnect)\n\t\tssid=${CSSID}\n\t\tpassphrase=${CPASS}\n\t\t[ -z \"${ssid}\" ] && error \"No ssid defined !\"\n\t    wifi_disconnect\n\t\twifi_enable\n\t\twifi_connected && exit 0\n\t\twifi_config\n\t\twifi_connect\n\t\t;;\n\tdisconnect)\n\t\tssid=${CSSID}\n\t\twifi_disconnect\n\t\twifi_disable\n\t\t;;\n\tscan)\n\t\twifi_enable\n\t\twifi_scan\n\t\twifi_status\n\t\t;;\n\tstatus)\n\t\twifi_status\n\t\t;;\n\tconnected)\n\t\twifi_connected && exit 0\n\t\texit 1\n\t\t;;\n\t*)\n\t\terror \"Command line doesn't have any option !\"\nesac\n\n\n#read -n 1 -s -r -p \"Press any key to continue\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/profile.d/99-emuelec_functions.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# you can insert any functions you want to be loaded at boot here\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/retroarch/config/DuckStation/DuckStation.opt",
    "content": "duckstation_GPU.Renderer = \"Software\"\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/retroarch/config/MAME/MAME.opt",
    "content": "mame_alternate_renderer = \"disabled\"\nmame_altres = \"640x480\"\nmame_auto_save = \"disabled\"\nmame_autoloadfastforward = \"disabled\"\nmame_boot_to_bios = \"disabled\"\nmame_boot_to_osd = \"disabled\"\nmame_buttons_profiles = \"disabled\"\nmame_cheats_enable = \"disabled\"\nmame_cpu_overclock = \"default\"\nmame_joystick_deadzone = \"0.15\"\nmame_joystick_saturation = \"0.85\"\nmame_joystick_threshold = \"0.30\"\nmame_lightgun_mode = \"none\"\nmame_lightgun_offscreen_mode = \"free\"\nmame_mame_4way_enable = \"disabled\"\nmame_mame_paths_enable = \"enabled\"\nmame_media_type = \"rom\"\nmame_mouse_enable = \"enabled\"\nmame_read_config = \"enabled\"\nmame_rotation_mode = \"libretro\"\nmame_saves = \"game\"\nmame_softlists_auto_media = \"enabled\"\nmame_softlists_enable = \"enabled\"\nmame_thread_mode = \"enabled\"\nmame_throttle = \"disabled\"\nmame_write_config = \"enabled\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/retroarch/config/Mupen64Plus-Next GLES2/Mupen64Plus-Next GLES2.opt",
    "content": "mupen64plus-169screensize = \"640x360\"\nmupen64plus-43screensize = \"640x480\"\nmupen64plus-alt-map = \"False\"\nmupen64plus-aspect = \"4:3\"\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/retroarch/config/Neko Project II/Neko_Project_II.opt",
    "content": "np2_BEEP_vol = \"3\"\nnp2_clk_base = \"2.4576 MHz\"\nnp2_clk_mult = \"14\"\nnp2_ExMemory = \"8\"\nnp2_GUI_controller = \"MOUSE\"\nnp2_GUIJOY_PAS = \"3\"\nnp2_jast_snd = \"ON\"\nnp2_model = \"VX\"\nnp2_Seek_Snd = \"OFF\"\nnp2_Seek_Vol = \"80\"\nnp2_skipline = \"Full 255 lines\"\nnp2_SNDboard = \"PC9801-86 + Chibi-Oto\"\nnp2_volume_A = \"64\"\nnp2_volume_F = \"64\"\nnp2_volume_P = \"64\"\nnp2_volume_R = \"64\"\nnp2_volume_S = \"64\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/retroarch/config/Neko Project II kai/Neko_Project_II_kai.opt",
    "content": "np2kai_118ROM = \"ON\"\nnp2kai_BEEP_vol = \"3\"\nnp2kai_CLGD_en = \"OFF\"\nnp2kai_CLGD_fc = \"OFF\"\nnp2kai_CLGD_type = \"PC-9821Xe10,Xa7e,Xb10 built-in\"\nnp2kai_clk_base = \"2.4576 MHz\"\nnp2kai_clk_mult = \"20\"\nnp2kai_cpu_feature = \"Intel Pentium\"\nnp2kai_drive = \"FDD2\"\nnp2kai_ExMemory = \"16\"\nnp2kai_FastMC = \"ON\"\nnp2kai_gdc = \"uPD7220\"\nnp2kai_inputmouse = \"ON\"\nnp2kai_jast_snd = \"ON\"\nnp2kai_joymode = \"Arrows 3button\"\nnp2kai_joynp2menu = \"L2\"\nnp2kai_keyboard = \"Ja\"\nnp2kai_lcd = \"OFF\"\nnp2kai_model = \"PC-9801VX\"\nnp2kai_PCI_bios32 = \"OFF\"\nnp2kai_PCI_en = \"OFF\"\nnp2kai_PCI_type = \"Intel 82434LX\"\nnp2kai_PEGC = \"ON\"\nnp2kai_realpal = \"OFF\"\nnp2kai_Seek_Snd = \"OFF\"\nnp2kai_Seek_Vol = \"0\"\nnp2kai_skipline = \"Full 255 lines\"\nnp2kai_SNDboard = \"PC9801-86 + Mate-X PCM(B460) + Sound Blaster 16\"\nnp2kai_stick2mouse = \"R-stick\"\nnp2kai_stick2mouse_shift = \"R1\"\nnp2kai_usecdecc = \"ON\"\nnp2kai_usefmgen = \"fmgen\"\nnp2kai_uselasthddmount = \"OFF\"\nnp2kai_vf1 = \"OFF\"\nnp2kai_volume_A = \"64\"\nnp2kai_volume_C = \"128\"\nnp2kai_volume_F = \"64\"\nnp2kai_volume_M = \"100\"\nnp2kai_volume_P = \"92\"\nnp2kai_volume_R = \"64\"\nnp2kai_volume_S = \"28\"\nnp2kai_xroll = \"ON\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/retroarch/config/SwanStation/SwanStation.opt",
    "content": "duckstation_GPU.Renderer = \"Software\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/retroarch/config/remappings/Flycast/Flycast.rmp",
    "content": "input_player1_analog_dpad_mode = \"0\"\ninput_player2_analog_dpad_mode = \"0\"\ninput_player3_analog_dpad_mode = \"0\"\ninput_player4_analog_dpad_mode = \"0\"\ninput_player5_analog_dpad_mode = \"0\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/retroarch/config/remappings/Mupen64Plus/Mupen64Plus.rmp",
    "content": "input_player1_analog_dpad_mode = \"0\"\ninput_player2_analog_dpad_mode = \"0\"\ninput_player3_analog_dpad_mode = \"0\"\ninput_player4_analog_dpad_mode = \"0\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/retroarch/config/remappings/Mupen64Plus GLES2/Mupen64Plus GLES2.rmp",
    "content": "input_player1_analog_dpad_mode = \"0\"\ninput_player2_analog_dpad_mode = \"0\"\ninput_player3_analog_dpad_mode = \"0\"\ninput_player4_analog_dpad_mode = \"0\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/retroarch/config/remappings/Mupen64Plus-Next/Mupen64Plus-Next.rmp",
    "content": "input_player1_analog_dpad_mode = \"0\"\ninput_player2_analog_dpad_mode = \"0\"\ninput_player3_analog_dpad_mode = \"0\"\ninput_player4_analog_dpad_mode = \"0\"\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/retroarch/config/remappings/Mupen64Plus-Next GLES2/Mupen64Plus-Next GLES2.rmp",
    "content": "input_player1_analog_dpad_mode = \"0\"\ninput_player2_analog_dpad_mode = \"0\"\ninput_player3_analog_dpad_mode = \"0\"\ninput_player4_analog_dpad_mode = \"0\"\ninput_player5_analog_dpad_mode = \"0\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/retroarch/config/remappings/ParaLLEl N64/ParaLLEl N64.rmp",
    "content": "input_player1_analog_dpad_mode = \"0\"\ninput_player2_analog_dpad_mode = \"0\"\ninput_player3_analog_dpad_mode = \"0\"\ninput_player4_analog_dpad_mode = \"0\"\ninput_player5_analog_dpad_mode = \"0\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/retroarch/retroarch-core-options.cfg",
    "content": "reicast_threaded_rendering = \"enabled\"\nparallel-n64-gfxplugin = \"rice\"\nparallel-n64-gfxplugin-accuracy = \"high\"\nparallel-n64-screensize = \"320x240\"\nmame2003-plus_analog = \"digital\"\npx68k_save_fdd_path = \"disabled\"\npx68k_save_hdd_path = \"disabled\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/system.d/storage-roms.mount.sample",
    "content": "[Unit]\nDescription=Mounting EmuELEC ROMS on samba\nRequires=network-online.service\nAfter=network-online.service\nBefore=emustation.service\n\n[Mount]\nWhat=//DOMAIN_OR_IP/roms/\nWhere=/storage/roms\n# The following option might not be required if your CIFS/SAMBA share is shared publicly without requiring any credentials) \n# NOTE: if you are using windows 10 and have problems accessing your shares try adding ,vers=3.0 after the password\nOptions=username=YOURUSERNAME,password=YOURPASSWORD\n# NOTE 2: You could also try this if you are using a guest account and can't mount: \n#Options=rw,vers=3.0,iocharset=utf8,username=guest\nType=cifs\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/sx05re/emuelec/config/system.d/storage-roms.mount.sample.nfs",
    "content": "# This is a sample service script to mount NFS shares.\n# Please read carefully the comments in this file. For production usage\n# you can remove all comments (lines beginning with \"#\") from this file.\n\n[Unit]\n# The description should be used to explain what this servicefile is for\nDescription=test nfs mount script\n\n# if we do network mounts like here we *require* 'network-online.service'\n# which checks if the network is online\nRequires=network-online.service\n\n# our scripts must start *after* 'network-online.service', on timeout and if\n# 'network-online.service' fails we can not mount and this scripts fails too\nAfter=network-online.service\n\n# usually we mount networks shares because we want they avaible *before* XBMC starts.\n# so XBMC has access to this mounts from beginning. Note: this slows down the boot!\nBefore=emustation.service\n\n\n[Mount]\n# The share we want mount\nWhat=192.168.0.31:/roms\n\n# Where we want mount this share\nWhere=/storage/roms\n\n# Any options you usually use with the \"-o\" parameter in the mount command\nOptions=\n\n# filesystem type\nType=nfs\n\n\n[Install]\n# The target is used by 'systemctl enable <name_of_this_file.mount>' to link\n# this service to a runlevel for starting on boot. usually 'multi-user.target'\n# is ok here.\nWantedBy=multi-user.target\n\n# Important:\n# this file must be renamed to <mountpoint>.mount where <mountpoint>, is the FULL path\n# where the share will be mounted but slashes \"/\" MUST BE REPLACED with dashes \"-\" with .mount\n# as extension.\n# This means, if we want mount to \"/storage/roms\" (see above \"Where=/storage/roms\")\n# then this file must be renamed to 'storage-roms.mount' and can be enabled via ssh with the\n# command 'systemctl enable storage-roms.mount'\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/8BitDo SN30 pro.cfg",
    "content": "input_device = \"8BitDo SN30 pro\"\ninput_driver = \"udev\"\ninput_vendor_id = \"1406\"\ninput_product_id = \"8201\"\ninput_r_y_plus_axis = \"+3\"\ninput_l3_btn = \"10\"\ninput_r_x_minus_axis = \"-2\"\ninput_l_btn = \"4\"\ninput_load_state_btn = \"4\"\ninput_start_btn = \"9\"\ninput_exit_emulator_btn = \"9\"\ninput_l_y_minus_axis = \"-1\"\ninput_up_btn = \"h0up\"\ninput_volume_up_btn = \"h0up\"\ninput_r_y_minus_axis = \"-3\"\ninput_a_btn = \"1\"\ninput_b_btn = \"0\"\ninput_reset_btn = \"0\"\ninput_enable_hotkey_btn = \"13\"\ninput_down_btn = \"h0down\"\ninput_volume_down_btn = \"h0down\"\ninput_l_x_plus_axis = \"+0\"\ninput_l_y_plus_axis = \"+1\"\ninput_r_btn = \"5\"\ninput_save_state_btn = \"5\"\ninput_r2_btn = \"7\"\ninput_hold_fast_forward_btn = \"7\"\ninput_r3_btn = \"11\"\ninput_fps_toggle_btn = \"11\"\ninput_right_btn = \"h0right\"\ninput_state_slot_increase_btn = \"h0right\"\ninput_x_btn = \"3\"\ninput_menu_toggle_btn = \"3\"\ninput_select_btn = \"8\"\ninput_l_x_minus_axis = \"-0\"\ninput_y_btn = \"2\"\ninput_left_btn = \"h0left\"\ninput_state_slot_decrease_btn = \"h0left\"\ninput_r_x_plus_axis = \"+2\"\ninput_l2_btn = \"6\"\ninput_rewind_btn = \"6\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/GO-Advance Gamepad (rev 1.1).cfg",
    "content": "input_device = \"GO-Advance Gamepad (rev 1.1)\"\ninput_driver = \"udev\"\ninput_l3_btn = \"13\"\ninput_l_btn = \"4\"\ninput_load_state_btn = \"4\"\ninput_start_btn = \"17\"\ninput_exit_emulator_btn = \"17\"\ninput_l_y_minus_axis = \"-1\"\ninput_up_btn = \"8\"\ninput_volume_up_btn = \"8\"\ninput_a_btn = \"1\"\ninput_b_btn = \"0\"\ninput_reset_btn = \"0\"\ninput_enable_hotkey_btn = \"12\"\ninput_down_btn = \"9\"\ninput_volume_down_btn = \"9\"\ninput_l_x_plus_axis = \"+0\"\ninput_l_y_plus_axis = \"+1\"\ninput_r_btn = \"5\"\ninput_save_state_btn = \"5\"\ninput_r2_btn = \"7\"\ninput_toggle_fast_forward_btn = \"7\"\ninput_r3_btn = \"16\"\ninput_fps_toggle_btn = \"16\"\ninput_right_btn = \"11\"\ninput_state_slot_increase_btn = \"11\"\ninput_x_btn = \"2\"\ninput_menu_toggle_btn = \"2\"\ninput_select_btn = \"12\"\ninput_l_x_minus_axis = \"-0\"\ninput_y_btn = \"3\"\ninput_left_btn = \"10\"\ninput_state_slot_decrease_btn = \"10\"\ninput_l2_btn = \"6\"\ninput_rewind_btn = \"6\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/GO-Advance Gamepad (rev 1.1)_vertical.cfg",
    "content": "input_device = \"GO-Advance Gamepad (rev 1.1)\"\ninput_driver = \"udev\"\ninput_l3_btn = \"13\"\ninput_l_btn = \"4\"\ninput_load_state_btn = \"4\"\ninput_start_btn = \"17\"\ninput_exit_emulator_btn = \"17\"\ninput_l_y_minus_axis = \"+0\"\ninput_up_btn = \"11\"\ninput_volume_up_btn = \"8\"\ninput_a_btn = \"1\"\ninput_b_btn = \"0\"\ninput_reset_btn = \"0\"\ninput_enable_hotkey_btn = \"12\"\ninput_down_btn = \"10\"\ninput_volume_down_btn = \"9\"\ninput_l_x_plus_axis = \"+1\"\ninput_l_y_plus_axis = \"-0\"\ninput_r_btn = \"5\"\ninput_save_state_btn = \"5\"\ninput_r2_btn = \"7\"\ninput_toggle_fast_forward_btn = \"7\"\ninput_r3_btn = \"16\"\ninput_fps_toggle_btn = \"16\"\ninput_right_btn = \"9\"\ninput_state_slot_increase_btn = \"11\"\ninput_x_btn = \"2\"\ninput_menu_toggle_btn = \"2\"\ninput_select_btn = \"12\"\ninput_l_x_minus_axis = \"-1\"\ninput_y_btn = \"3\"\ninput_left_btn = \"8\"\ninput_state_slot_decrease_btn = \"10\"\ninput_l2_btn = \"6\"\ninput_rewind_btn = \"6\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/GO-Advance Gamepad.cfg",
    "content": "input_device = \"GO-Advance Gamepad\"\ninput_driver = \"udev\"\ninput_l3_btn = \"12\"\ninput_l_btn = \"4\"\ninput_load_state_btn = \"4\"\ninput_start_btn = \"15\"\ninput_exit_emulator_btn = \"15\"\ninput_l_y_minus_axis = \"-1\"\ninput_up_btn = \"6\"\ninput_volume_up_btn = \"6\"\ninput_a_btn = \"1\"\ninput_b_btn = \"0\"\ninput_reset_btn = \"0\"\ninput_enable_hotkey_btn = \"10\"\ninput_down_btn = \"7\"\ninput_volume_down_btn = \"7\"\ninput_l_x_plus_axis = \"+0\"\ninput_l_y_plus_axis = \"+1\"\ninput_r_btn = \"5\"\ninput_save_state_btn = \"5\"\ninput_r2_btn = \"14\"\ninput_toggle_fast_forward_btn = \"14\"\ninput_r3_btn = \"13\"\ninput_fps_toggle_btn = \"13\"\ninput_right_btn = \"9\"\ninput_state_slot_increase_btn = \"9\"\ninput_x_btn = \"2\"\ninput_menu_toggle_btn = \"2\"\ninput_select_btn = \"10\"\ninput_l_x_minus_axis = \"-0\"\ninput_y_btn = \"3\"\ninput_left_btn = \"8\"\ninput_state_slot_decrease_btn = \"8\"\ninput_l2_btn = \"11\"\ninput_rewind_btn = \"11\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/GO-Advance Gamepad_vertical.cfg",
    "content": "input_device = \"GO-Advance Gamepad\"\ninput_driver = \"udev\"\ninput_l3_btn = \"12\"\ninput_l_btn = \"4\"\ninput_load_state_btn = \"4\"\ninput_start_btn = \"15\"\ninput_exit_emulator_btn = \"15\"\ninput_l_y_minus_axis = \"+0\"\ninput_up_btn = \"9\"\ninput_volume_up_btn = \"6\"\ninput_a_btn = \"1\"\ninput_b_btn = \"0\"\ninput_reset_btn = \"0\"\ninput_enable_hotkey_btn = \"10\"\ninput_down_btn = \"8\"\ninput_volume_down_btn = \"7\"\ninput_l_x_plus_axis = \"+1\"\ninput_l_y_plus_axis = \"-0\"\ninput_r_btn = \"5\"\ninput_save_state_btn = \"5\"\ninput_r2_btn = \"14\"\ninput_toggle_fast_forward_btn = \"14\"\ninput_r3_btn = \"13\"\ninput_fps_toggle_btn = \"13\"\ninput_right_btn = \"7\"\ninput_state_slot_increase_btn = \"9\"\ninput_x_btn = \"2\"\ninput_menu_toggle_btn = \"2\"\ninput_select_btn = \"10\"\ninput_l_x_minus_axis = \"-1\"\ninput_y_btn = \"3\"\ninput_left_btn = \"6\"\ninput_state_slot_decrease_btn = \"8\"\ninput_l2_btn = \"11\"\ninput_rewind_btn = \"11\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/GO-Super Gamepad.cfg",
    "content": "input_device = \"GO-Super Gamepad\"\ninput_driver = \"udev\"\ninput_vendor_id = \"0\"\ninput_product_id = \"0\"\ninput_r_y_plus_axis = \"+3\"\ninput_l3_btn = \"14\"\ninput_r_x_minus_axis = \"-2\"\ninput_l_btn = \"4\"\ninput_load_state_btn = \"4\"\ninput_start_btn = \"13\"\ninput_exit_emulator_btn = \"13\"\ninput_l_y_minus_axis = \"-1\"\ninput_up_btn = \"8\"\ninput_volume_up_btn = \"8\"\ninput_r_y_minus_axis = \"-3\"\ninput_a_btn = \"1\"\ninput_b_btn = \"0\"\ninput_reset_btn = \"0\"\ninput_enable_hotkey_btn = \"15\"\ninput_down_btn = \"9\"\ninput_volume_down_btn = \"9\"\ninput_l_x_plus_axis = \"+0\"\ninput_l_y_plus_axis = \"+1\"\ninput_r_btn = \"5\"\ninput_save_state_btn = \"5\"\ninput_r2_btn = \"7\"\ninput_toggle_fast_forward_btn = \"7\"\ninput_r3_btn = \"17\"\ninput_fps_toggle_btn = \"17\"\ninput_right_btn = \"11\"\ninput_state_slot_increase_btn = \"11\"\ninput_x_btn = \"2\"\ninput_menu_toggle_btn = \"2\"\ninput_select_btn = \"12\"\ninput_l_x_minus_axis = \"-0\"\ninput_y_btn = \"3\"\ninput_left_btn = \"10\"\ninput_state_slot_decrease_btn = \"10\"\ninput_r_x_plus_axis = \"+2\"\ninput_l2_btn = \"6\"\ninput_rewind_btn = \"6\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/GO-Super Gamepad_vertical.cfg",
    "content": "input_device = \"GO-Super Gamepad\"\ninput_driver = \"udev\"\ninput_vendor_id = \"0\"\ninput_product_id = \"0\"\ninput_r_y_plus_axis = \"-0\"\ninput_r_y_minus_axis = \"+0\"\ninput_r_x_minus_axis = \"+1\"\ninput_r_x_plus_axis = \"-1\"\ninput_l_x_plus_axis = \"-3\"\ninput_l_y_plus_axis = \"+2\"\ninput_l_y_minus_axis = \"-2\"\ninput_l_x_minus_axis = \"+3\"\ninput_l3_btn = \"14\"\ninput_l_btn = \"4\"\ninput_load_state_btn = \"4\"\ninput_start_btn = \"13\"\ninput_exit_emulator_btn = \"13\"\ninput_up_btn = \"8\"\ninput_volume_up_btn = \"8\"\ninput_a_btn = \"2\"\ninput_b_btn = \"1\"\ninput_reset_btn = \"0\"\ninput_enable_hotkey_btn = \"15\"\ninput_down_btn = \"9\"\ninput_volume_down_btn = \"9\"\ninput_r_btn = \"5\"\ninput_save_state_btn = \"5\"\ninput_r2_btn = \"7\"\ninput_toggle_fast_forward_btn = \"7\"\ninput_r3_btn = \"17\"\ninput_fps_toggle_btn = \"17\"\ninput_right_btn = \"11\"\ninput_state_slot_increase_btn = \"11\"\ninput_x_btn = \"3\"\ninput_menu_toggle_btn = \"2\"\ninput_select_btn = \"12\"\ninput_y_btn = \"0\"\ninput_left_btn = \"10\"\ninput_state_slot_decrease_btn = \"10\"\ninput_l2_btn = \"6\"\ninput_rewind_btn = \"6\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/GZ RX CO.,LTD. RX Gamepad.cfg",
    "content": "input_device = \"GZ RX CO.,LTD. RX Gamepad\"\ninput_driver = \"udev\"\ninput_l_btn = \"3\"\ninput_load_state_btn = \"3\"\ninput_start_btn = \"9\"\ninput_exit_emulator_btn = \"9\"\ninput_up_btn = \"h0up\"\ninput_volume_up_btn_btn = \"h0up\"\ninput_a_btn = \"4\"\ninput_b_btn = \"0\"\ninput_reset_btn = \"0\"\ninput_enable_hotkey_btn = \"11\"\ninput_down_btn = \"h0down\"\ninput_volume_down_btn_btn = \"h0down\"\ninput_r_btn = \"6\"\ninput_save_state_btn = \"6\"\ninput_right_btn = \"h0right\"\ninput_state_slot_increase_btn = \"h0right\"\ninput_x_btn = \"1\"\ninput_menu_toggle_btn = \"1\"\ninput_select_btn = \"10\"\ninput_y_btn = \"2\"\ninput_left_btn = \"h0left\"\ninput_state_slot_decrease_btn = \"h0left\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/Google LLC Stadia Controller rev. A.cfg",
    "content": "input_device = \"Google LLC Stadia Controller rev. A\"\ninput_driver = \"udev\"\ninput_vendor_id = \"6353\"\ninput_product_id = \"37888\"\ninput_r_y_plus_axis = \"+3\"\ninput_l3_btn = \"9\"\ninput_r_x_minus_axis = \"-2\"\ninput_l_btn = \"4\"\ninput_load_state_btn = \"4\"\ninput_start_btn = \"7\"\ninput_exit_emulator_btn = \"7\"\ninput_l_y_minus_axis = \"-1\"\ninput_up_btn = \"h0up\"\ninput_volume_up_btn = \"h0up\"\ninput_r_y_minus_axis = \"-3\"\ninput_a_btn = \"1\"\ninput_b_btn = \"0\"\ninput_reset_btn = \"0\"\ninput_enable_hotkey_btn = \"8\"\ninput_down_btn = \"h0down\"\ninput_volume_down_btn = \"h0down\"\ninput_l_x_plus_axis = \"+0\"\ninput_l_y_plus_axis = \"+1\"\ninput_r_btn = \"5\"\ninput_save_state_btn = \"5\"\ninput_r2_btn = \"13\"\ninput_toggle_fast_forward_btn = \"13\"\ninput_r3_btn = \"10\"\ninput_fps_toggle_btn = \"10\"\ninput_right_btn = \"h0right\"\ninput_state_slot_increase_btn = \"h0right\"\ninput_x_btn = \"3\"\ninput_menu_toggle_btn = \"3\"\ninput_select_btn = \"6\"\ninput_l_x_minus_axis = \"-0\"\ninput_y_btn = \"2\"\ninput_left_btn = \"h0left\"\ninput_state_slot_decrease_btn = \"h0left\"\ninput_r_x_plus_axis = \"+2\"\ninput_l2_btn = \"14\"\ninput_rewind_btn = \"14\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/HORI CO.,LTD. HORIPAD S.cfg",
    "content": "input_device = \"HORI CO.,LTD. HORIPAD S\"\ninput_driver = \"udev\"\ninput_vendor_id = \"3853\"\ninput_product_id = \"193\"\ninput_r_y_plus_axis = \"+3\"\ninput_l3_btn = \"10\"\ninput_r_x_minus_axis = \"-2\"\ninput_l_btn = \"4\"\ninput_load_state_btn = \"4\"\ninput_start_btn = \"9\"\ninput_exit_emulator_btn = \"9\"\ninput_l_y_minus_axis = \"-1\"\ninput_up_btn = \"h0up\"\ninput_volume_up_btn = \"h0up\"\ninput_r_y_minus_axis = \"-3\"\ninput_a_btn = \"2\"\ninput_b_btn = \"1\"\ninput_reset_btn = \"1\"\ninput_enable_hotkey_btn = \"13\"\ninput_down_btn = \"h0down\"\ninput_volume_down_btn = \"h0down\"\ninput_l_x_plus_axis = \"+0\"\ninput_l_y_plus_axis = \"+1\"\ninput_r_btn = \"5\"\ninput_save_state_btn = \"5\"\ninput_r2_btn = \"7\"\ninput_toggle_fast_forward_btn = \"7\"\ninput_r3_btn = \"11\"\ninput_fps_toggle_btn = \"11\"\ninput_right_btn = \"h0right\"\ninput_state_slot_increase_btn = \"h0right\"\ninput_x_btn = \"3\"\ninput_menu_toggle_btn = \"3\"\ninput_select_btn = \"8\"\ninput_l_x_minus_axis = \"-0\"\ninput_y_btn = \"0\"\ninput_left_btn = \"h0left\"\ninput_state_slot_decrease_btn = \"h0left\"\ninput_r_x_plus_axis = \"+2\"\ninput_l2_btn = \"6\"\ninput_rewind_btn = \"6\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/Logitech Gamepad F310.cfg",
    "content": "input_device = \"Logitech Gamepad F310\"\ninput_driver = \"udev\"\ninput_r_y_plus_axis = \"+4\"\ninput_l3_btn = \"9\"\ninput_r_x_minus_axis = \"-3\"\ninput_l_btn = \"4\"\ninput_load_state_btn = \"4\"\ninput_start_btn = \"7\"\ninput_exit_emulator_btn = \"7\"\ninput_l_y_minus_axis = \"-1\"\ninput_up_btn = \"h0up\"\ninput_volume_up_btn = \"h0up\"\ninput_r_y_minus_axis = \"-4\"\ninput_a_btn = \"1\"\ninput_b_btn = \"0\"\ninput_reset_btn = \"0\"\ninput_enable_hotkey_btn = \"8\"\ninput_down_btn = \"h0down\"\ninput_volume_down_btn = \"h0down\"\ninput_l_x_plus_axis = \"+0\"\ninput_l_y_plus_axis = \"+1\"\ninput_r_btn = \"5\"\ninput_save_state_btn = \"5\"\ninput_r2_axis = \"+5\"\ninput_toggle_fast_forward_axis = \"+5\"\ninput_r3_btn = \"10\"\ninput_fps_toggle_btn = \"10\"\ninput_right_btn = \"h0right\"\ninput_state_slot_increase_btn = \"h0right\"\ninput_x_btn = \"3\"\ninput_menu_toggle_btn = \"3\"\ninput_select_btn = \"6\"\ninput_l_x_minus_axis = \"-0\"\ninput_y_btn = \"2\"\ninput_left_btn = \"h0left\"\ninput_state_slot_decrease_btn = \"h0left\"\ninput_r_x_plus_axis = \"+3\"\ninput_l2_axis = \"+2\"\ninput_rewind_axis = \"+2\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/PlayGame PS2.cfg",
    "content": "input_device - \"PlayGame PS2-like Controller\"\ninput_driver = \"udev\"\ninput_vendor_id = \"2064\"\ninput_product_id = \"1\"\ninput_r_y_plus_axis = \"+2\"\ninput_l3_btn = \"10\"\ninput_r_x_minus_axis = \"-3\"\ninput_l_btn = \"4\"\ninput_load_state_btn = \"4\"\ninput_start_btn = \"9\"\ninput_exit_emulator_btn = \"9\"\ninput_l_y_minus_axis = \"-1\"\ninput_up_btn = \"h0up\"\ninput_volume_up_btn = \"h0up\"\ninput_r_y_minus_axis = \"-2\"\ninput_a_btn = \"1\"\ninput_b_btn = \"2\"\ninput_reset_btn = \"2\"\ninput_enable_hotkey_btn = \"8\"\ninput_down_btn = \"h0down\"\ninput_volume_down_btn = \"h0down\"\ninput_l_x_plus_axis = \"+0\"\ninput_l_y_plus_axis = \"+1\"\ninput_r_btn = \"5\"\ninput_save_state_btn = \"5\"\ninput_r2_btn = \"7\"\ninput_hold_fast_forward_btn = \"7\"\ninput_r3_btn = \"11\"\ninput_fps_toggle_btn = \"11\"\ninput_right_btn = \"h0right\"\ninput_state_slot_increase_btn = \"h0right\"\ninput_x_btn = \"0\"\ninput_menu_toggle_btn = \"0\"\ninput_select_btn = \"8\"\ninput_l_x_minus_axis = \"-0\"\ninput_y_btn = \"3\"\ninput_left_btn = \"h0left\"\ninput_state_slot_decrease_btn = \"h0left\"\ninput_r_x_plus_axis = \"+3\"\ninput_l2_btn = \"6\"\ninput_rewind_btn = \"6\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/Sony Interactive Entertainment Wireless Controller.cfg",
    "content": "input_device = \"Sony Interactive Entertainment Wireless Controller\"\ninput_driver = \"udev\"\ninput_r_y_plus_axis = \"+5\"\ninput_l3_btn = \"10\"\ninput_r_x_minus_axis = \"-2\"\ninput_l_btn = \"4\"\ninput_load_state_btn = \"4\"\ninput_start_btn = \"9\"\ninput_exit_emulator_btn = \"9\"\ninput_l_y_minus_axis = \"-1\"\ninput_up_btn = \"h0up\"\ninput_volume_up_btn_btn = \"h0up\"\ninput_r_y_minus_axis = \"-5\"\ninput_a_btn = \"2\"\ninput_b_btn = \"1\"\ninput_reset_btn = \"1\"\ninput_enable_hotkey_btn = \"12\"\ninput_down_btn = \"h0down\"\ninput_volume_down_btn_btn = \"h0down\"\ninput_l_x_plus_axis = \"+0\"\ninput_l_y_plus_axis = \"+1\"\ninput_r_btn = \"5\"\ninput_save_state_btn = \"5\"\ninput_r2_btn = \"7\"\ninput_toggle_fast_forward_btn = \"7\"\ninput_r3_btn = \"11\"\ninput_fps_toggle_btn = \"11\"\ninput_right_btn = \"h0right\"\ninput_state_slot_increase_btn = \"h0right\"\ninput_x_btn = \"3\"\ninput_menu_toggle_btn = \"3\"\ninput_select_btn = \"8\"\ninput_l_x_minus_axis = \"-0\"\ninput_y_btn = \"0\"\ninput_left_btn = \"h0left\"\ninput_state_slot_decrease_btn = \"h0left\"\ninput_r_x_plus_axis = \"+2\"\ninput_l2_btn = \"6\"\ninput_rewind_btn = \"6\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/Sony PLAYSTATION(R)3 Controller.cfg",
    "content": "input_device = \"Sony PLAYSTATION(R)3 Controller\"\ninput_driver = \"udev\"\ninput_vendor_id = \"1356\"\ninput_product_id = \"616\"\ninput_r_y_plus_axis = \"+4\"\ninput_left_btn = \"15\"\ninput_state_slot_decrease_btn = \"15\"\ninput_r_x_minus_axis = \"-3\"\ninput_right_btn = \"16\"\ninput_state_slot_increase_btn = \"16\"\ninput_r_btn = \"5\"\ninput_save_state_btn = \"5\"\ninput_down_btn = \"14\"\ninput_volume_down_btn = \"14\"\ninput_r_y_minus_axis = \"-4\"\ninput_l_btn = \"4\"\ninput_load_state_btn = \"4\"\ninput_r_x_plus_axis = \"+3\"\ninput_y_btn = \"3\"\ninput_x_btn = \"2\"\ninput_menu_toggle_btn = \"2\"\ninput_b_btn = \"0\"\ninput_reset_btn = \"0\"\ninput_a_btn = \"1\"\ninput_up_btn = \"13\"\ninput_volume_up_btn = \"13\"\ninput_select_btn = \"8\"\ninput_l3_btn = \"11\"\ninput_start_btn = \"9\"\ninput_exit_emulator_btn = \"9\"\ninput_l_x_plus_axis = \"+0\"\ninput_l_y_minus_axis = \"-1\"\ninput_enable_hotkey_btn = \"8\"\ninput_l2_axis = \"+2\"\ninput_rewind_axis = \"+2\"\ninput_r2_axis = \"+5\"\ninput_toggle_fast_forward_axis = \"+5\"\ninput_l_y_plus_axis = \"+1\"\ninput_r3_btn = \"12\"\ninput_fps_toggle_btn = \"12\"\ninput_l_x_minus_axis = \"-0\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/Xbox 360 Controller.cfg",
    "content": "input_device = \"Xbox 360 Controller\"\ninput_driver = \"udev\"\ninput_vendor_id = \"1118\"\ninput_product_id = \"654\"\ninput_r_y_plus_axis = \"+4\"\ninput_left_btn = \"h0left\"\ninput_state_slot_decrease_btn = \"h0left\"\ninput_r_x_minus_axis = \"-3\"\ninput_right_btn = \"h0right\"\ninput_state_slot_increase_btn = \"h0right\"\ninput_r_btn = \"5\"\ninput_save_state_btn = \"5\"\ninput_down_btn = \"h0down\"\ninput_volume_down_btn = \"h0down\"\ninput_r_y_minus_axis = \"-4\"\ninput_l_btn = \"4\"\ninput_load_state_btn = \"4\"\ninput_r_x_plus_axis = \"+3\"\ninput_y_btn = \"2\"\ninput_x_btn = \"3\"\ninput_menu_toggle_btn = \"3\"\ninput_b_btn = \"0\"\ninput_reset_btn = \"0\"\ninput_a_btn = \"1\"\ninput_up_btn = \"h0up\"\ninput_volume_up_btn = \"h0up\"\ninput_select_btn = \"6\"\ninput_l3_btn = \"9\"\ninput_start_btn = \"7\"\ninput_exit_emulator_btn = \"7\"\ninput_l_x_plus_axis = \"+0\"\ninput_l_y_minus_axis = \"-1\"\ninput_enable_hotkey_btn = \"8\"\ninput_l2_axis = \"+2\"\ninput_rewind_axis = \"+2\"\ninput_r2_axis = \"+5\"\ninput_toggle_fast_forward_axis = \"+5\"\ninput_l_y_plus_axis = \"+1\"\ninput_r3_btn = \"10\"\ninput_fps_toggle_btn = \"10\"\ninput_l_x_minus_axis = \"-0\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/gameforce_gamepad.cfg",
    "content": "# GameForce Handheld\n# Configuration for the built-in controller.\n#\n# How to: https://gameforce.fun/pages/how-to-use\n\n### Controls\n\n# General\ninput_driver = \"udev\"\ninput_device = \"gameforce_gamepad\"\ninput_device_display_name=\"GameForce Handheld Controller\"\ninput_vendor_id = \"3\"\ninput_product_id = \"3\"\n\n# D-Pad\ninput_up_btn = \"10\"\ninput_down_btn = \"11\"\ninput_left_btn = \"12\"\ninput_right_btn = \"13\"\n\n# Face buttons\ninput_a_btn = \"1\"\ninput_b_btn = \"0\"\ninput_x_btn = \"2\"\ninput_y_btn = \"3\"\n\n# Shoulders & triggers\ninput_l_btn = \"4\"\ninput_r_btn = \"5\"\ninput_l2_btn = \"6\"\ninput_r2_btn = \"7\"\n\n# Analog sticks\ninput_l_y_minus_axis = \"-0\"\ninput_l_y_plus_axis = \"+0\"\ninput_l_x_minus_axis = \"-1\"\ninput_l_x_plus_axis = \"+1\"\ninput_r_y_minus_axis = \"-2\"\ninput_r_y_plus_axis = \"+2\"\ninput_r_x_minus_axis = \"-3\"\ninput_r_x_plus_axis = \"+3\"\n\n# Bottom row\ninput_l3_btn = \"14\"\ninput_r3_btn = \"15\"\ninput_select_btn = \"8\"\ninput_start_btn = \"9\"\n\n# Hotkey actions\ninput_enable_hotkey_btn = \"16\"\ninput_reset_btn = \"0\"\ninput_menu_toggle_btn = \"2\"\ninput_exit_emulator_btn = \"9\"\n\ninput_load_state_btn = \"4\"\ninput_save_state_btn = \"5\"\ninput_rewind_btn = \"6\"\ninput_toggle_fast_forward_btn = \"7\"\ninput_volume_up_btn = \"10\"\ninput_volume_down_btn = \"11\"\ninput_state_slot_decrease_btn = \"12\"\ninput_state_slot_increase_btn = \"13\"\ninput_fps_toggle_btn = \"15\"\n\n### Labels\n\n# D-Pad\ninput_up_btn_label = \"D-Pad Up\"\ninput_down_btn_label = \"D-Pad Down\"\ninput_left_btn_label = \"D-Pad Left\"\ninput_right_btn_label = \"D-Pad Right\"\n\n# Face buttons\ninput_a_btn_label = \"A\"\ninput_b_btn_label = \"B\"\ninput_x_btn_label = \"X\"\ninput_y_btn_label = \"Y\"\n\n# Shoulders & triggers\ninput_l_btn_label = \"L1\"\ninput_r_btn_label = \"R1\"\ninput_l2_btn_label = \"L2\"\ninput_r2_btn_label = \"R2\"\n\n# Analog sticks\ninput_l_y_minus_axis_label = \"Left Analog Up\"\ninput_l_y_plus_axis_label = \"Left Analog Down\"\ninput_l_x_minus_axis_label = \"Left Analog Left\"\ninput_l_x_plus_axis_label = \"Left Analog Right\"\ninput_r_y_minus_axis_label = \"Right Analog Up\"\ninput_r_y_plus_axis_label = \"Right Analog Down\"\ninput_r_x_minus_axis_label = \"Right Analog Left\"\ninput_r_x_plus_axis_label = \"Right Analog Right\"\n\n# Bottom row\ninput_l3_btn_label = \"G1\"\ninput_r3_btn_label = \"G2\"\ninput_start_btn_label = \"Start\"\ninput_select_btn_label = \"Select\"\n\n# Hotkey actions\ninput_enable_hotkey_btn_label = \"HK\"\ninput_reset_btn_label = \"B\"\ninput_menu_toggle_btn_label = \"X\"\ninput_exit_emulator_btn_label = \"Start\"\n\ninput_load_state_btn_label = \"L1\"\ninput_save_state_btn_label = \"R1\"\ninput_rewind_btn_label = \"L2\"\ninput_toggle_fast_forward_btn_label = \"R2\"\ninput_volume_up_btn_label = \"D-Pad Up\"\ninput_volume_down_btn_label = \"D-Pad Down\"\ninput_state_slot_decrease_btn_label = \"D-Pad Left\"\ninput_state_slot_increase_btn_label = \"D-Pad Right\"\ninput_fps_toggle_btn_label = \"G2\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/gamepads/iNNEXT SNES.cfg",
    "content": "input_device = \"iNNEXT SNES Retro USB Controller\"\ninput_driver = \"udev\"\ninput_vendor_id = \"121\"\ninput_product_id = \"17\"\ninput_l_btn = \"4\"\ninput_load_state_btn = \"4\"\ninput_start_btn = \"9\"\ninput_exit_emulator_btn = \"9\"\ninput_up_axis = \"-1\"\ninput_volume_up_axis = \"-1\"\ninput_a_btn = \"1\"\ninput_b_btn = \"2\"\ninput_reset_btn = \"2\"\ninput_enable_hotkey_btn = \"8\"\ninput_down_axis = \"+1\"\ninput_volume_down_axis = \"+1\"\ninput_r_btn = \"5\"\ninput_save_state_btn = \"5\"\ninput_right_axis = \"+0\"\ninput_state_slot_increase_axis = \"+0\"\ninput_x_btn = \"0\"\ninput_menu_toggle_btn = \"0\"\ninput_select_btn = \"8\"\ninput_y_btn = \"3\"\ninput_left_axis = \"-0\"\ninput_state_slot_decrease_axis = \"-0\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/overlay/bezels/default.cfg",
    "content": "overlays = 1\noverlay0_overlay = EmuELEC-1080.png\noverlay0_full_screen = true\noverlay0_descs = 0\n"
  },
  {
    "path": "packages/sx05re/emuelec/overlay/emuelec/scanlines_single_1920x1080.cfg",
    "content": "overlays = 1\n\noverlay0_overlay = scanlines_single_1920x1080.png\n\noverlay0_full_screen = true\n\noverlay0_descs = 0\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"emuelec\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES} emuelec-emulationstation retroarch\"\nPKG_SECTION=\"emuelec\"\nPKG_LONGDESC=\"EmuELEC Meta Package\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_EXPERIMENTAL=\"nestopiaCV quasi88 xmil np2kai hypseus-singe yabasanshiroSA_1_11 yabasanshiroSA_1_5 fbneoSA same_cdi ikemen-go\" \nPKG_EMUS=\"${LIBRETRO_CORES} desmume melonds advancemame PPSSPPSDL amiberry amiberry-lite hatarisa openbor dosbox-staging mupen64plus-nx mupen64plus-nx-alt scummvmsa stellasa solarus dosbox-pure pcsx_rearmed ecwolf potator freej2me duckstation flycastsa fmsx-libretro jzintv mupen64plussa xroar x16 simcoupe ti99sim oricutron eka2l1 bigpemu biginstinct\"\nPKG_DEPENDS_TARGET+=\" emuelec-tools ${PKG_EMUS} ${PKG_EXPERIMENTAL}\"\n\n\n# These packages are only meant for S922x, S905x2 and A311D devices as they run poorly on S905\" \nif [ \"${DEVICE}\" == \"Amlogic-ng\" ] || [ \"${DEVICE}\" == \"Amlogic-no\" ] || [ \"${DEVICE}\" == \"RK356x\" ] || [ \"${DEVICE}\" == \"OdroidM1\" ]; then\n\tPKG_DEPENDS_TARGET+=\" ${LIBRETRO_S922X_CORES}\"\nfi\n\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\tPKG_DEPENDS_TARGET+=\" kmscon odroidgoa-utils\"\n    \n  #we disable some cores that are not working or work poorly on OGA\n\tfor discore in duckstation mesen-s virtualjaguar quicknes MC; do\n\t\tPKG_DEPENDS_TARGET=$(echo ${PKG_DEPENDS_TARGET} | sed \"s|${discore} | |\")\n\tdone\n\tPKG_DEPENDS_TARGET+=\" yabasanshiro\"\nelse\n\tPKG_DEPENDS_TARGET+=\" fbterm\"\nfi\n\n# These cores do not work, or are not needed on aarch64, this package needs cleanup :) \nif [ \"${ARCH}\" == \"aarch64\" ]; then\n  for discore in quicknes parallel-n64 pcsx_rearmed; do\n\t\tPKG_DEPENDS_TARGET=$(echo ${PKG_DEPENDS_TARGET} | sed \"s|${discore}| |\")\n\tdone\n\n  PKG_DEPENDS_TARGET+=\" swanstation \\\n                        lib32-essential \\\n                        lib32-retroarch \\\n                        emuelec-32bit-info \\\n                        lib32-flycast \\\n                        lib32-mupen64plus \\\n                        lib32-pcsx_rearmed \\\n                        lib32-uae4arm \\\n                        lib32-parallel-n64 \\\n                        lib32-bennugd-monolithic \\\n                        lib32-droidports \\\n                        lib32-box86 \\\n                        lib32-libusb\"\n\n  if [ \"${DEVICE}\" == \"Amlogic-ng\" ] || [ \"${DEVICE}\" == \"Amlogic-no\" ] || [ \"${DEVICE}\" == \"RK356x\" ] || [ \"${DEVICE}\" == \"OdroidM1\" ]; then\n    PKG_DEPENDS_TARGET+=\" dolphinSA\"\n  fi\n\n  if [ \"${DEVICE}\" == \"Amlogic-old\" ]; then\n    #we disable some cores that are not working or work poorly on Amlogic-old\n    for discore in yabasanshiroSA_1_11 yabasanshiroSA_1_5 yabasanshiro same_cdi duckstation; do\n      PKG_DEPENDS_TARGET=$(echo ${PKG_DEPENDS_TARGET} | sed \"s|${discore} | |\")\n    done\n  fi\nfi\n\n# We make sure MAME is the last package from EE to be built.\nif [ \"${DEVICE}\" == \"Amlogic-ng\" ] || [ \"${DEVICE}\" == \"Amlogic-no\" ] || [ \"${DEVICE}\" == \"RK356x\" ] || [ \"${DEVICE}\" == \"OdroidM1\" ]; then\n\tPKG_DEPENDS_TARGET+=\" mame\"\nfi\n\n# These packages do not yet compile for OdroidM1\nif [ \"${DEVICE}\" == \"RK356x\" ] || [ \"${DEVICE}\" == \"OdroidM1\" ]; then\n for discore in flycast-dojo; do\n\t\tPKG_DEPENDS_TARGET=$(echo ${PKG_DEPENDS_TARGET} | sed \"s|${discore}| |\")\n\tdone\nfi\n\nmakeinstall_target() {\n\n\tmkdir -p ${INSTALL}/usr/bin\n\tcp -rf ${PKG_DIR}/bin ${INSTALL}/usr\n\n\tmkdir -p ${INSTALL}/usr/config/\n  cp -rf ${PKG_DIR}/config/* ${INSTALL}/usr/config/\n  ln -sf /storage/.config/emuelec ${INSTALL}/emuelec\n\n  # Added for compatibility with portmaster\n  ln -sf /storage/roms ${INSTALL}/roms\n  ln -sf /storage/roms/ports/PortMaster ${INSTALL}/PortMaster\n  mkdir -p ${INSTALL}/usr/bin/ports\n  touch ${INSTALL}/usr/bin/ports/.ports_here\n\n  find ${INSTALL}/usr/config/emuelec/ -type f -exec chmod o+x {} \\;\n\n\tmkdir -p ${INSTALL}/usr/config/emuelec/logs\n\tln -sf /var/log ${INSTALL}/usr/config/emuelec/logs/var-log\n\n  # leave for compatibility\n  if [ \"${DEVICE}\" == \"Amlogic-old\" ]; then\n    echo \"s905\" > ${INSTALL}/ee_s905\n  fi\n\n\n  echo \"${DEVICE}\" > ${INSTALL}/ee_arch\n  \n  mkdir -p ${INSTALL}/usr/share/retroarch-overlays\n  cp -r ${PKG_DIR}/overlay/* ${INSTALL}/usr/share/retroarch-overlays\n  \n  mkdir -p ${INSTALL}/usr/share/common-shaders\n  cp -r ${PKG_DIR}/shaders/* ${INSTALL}/usr/share/common-shaders\n    \n  mkdir -p ${INSTALL}/usr/share/libretro-database\n  touch ${INSTALL}/usr/share/libretro-database/dummy\n}\n\npost_install() {\n  for i in borders effects gamepads ipad keyboards misc; do\n    rm -rf \"${INSTALL}/usr/share/retroarch-overlays/${i}\"\n  done\n\n  mkdir -p ${INSTALL}/etc/retroarch-joypad-autoconfig\n  cp -r ${PKG_DIR}/gamepads/* ${INSTALL}/etc/retroarch-joypad-autoconfig\n\n  # link default.target to emuelec.target\n  ln -sf emuelec.target ${INSTALL}/usr/lib/systemd/system/default.target\n  enable_service emuelec-autostart.service\n  enable_service emuelec-disable_small_cores.service\n  enable_service emuelec-reboot.service\n  enable_service emuelec-shutdown.service\n\n\n  # Remove scripts from OdroidGoAdvance build\n  if [[ ${DEVICE} == \"OdroidGoAdvance\" || \"${DEVICE}\" == \"GameForce\" ]]; then \n    for i in \"wifi\" \"sselphs_scraper\" \"skyscraper\" \"system_info\"; do \n    xmlstarlet ed -L -P -d \"/gameList/game[name='${i}']\" ${INSTALL}/usr/bin/scripts/setup/gamelist.xml\n    rm \"${INSTALL}/usr/bin/scripts/setup/${i}.sh\"\n    done\n  fi \n\n  # For automatic updates we use the buildate\n\tdate +\"%m%d%Y\" > ${INSTALL}/usr/buildate\n\t\n\tln -sf /storage/roms ${INSTALL}/roms\n\t\n  # We make sure all files in /usr/bin are executables\n\tfind ${INSTALL}/usr/bin -type f -exec chmod +x {} \\;\n} \n"
  },
  {
    "path": "packages/sx05re/emuelec/profile.d/99-emuelec.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nexport LD_LIBRARY_PATH=\"/emuelec/lib:/emuelec/lib32:${LD_LIBRARY_PATH}\"\nexport PATH=\"/emuelec/scripts:/emuelec/bin:/usr/bin/batocera:/storage/roms/bios/jdk/bin/:${PATH}\"\nexport JAVA_HOME=\"/storage/roms/bios/jdk/bin/java\"\n\nexport SDL_GAMECONTROLLERCONFIG_FILE=\"/storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt\"\nexport EMUELEC=\"【ツ】\"\n\nEE_DIR=\"/storage/.config/emuelec\"\nEE_CONF=\"${EE_DIR}/configs/emuelec.conf\"\nES_CONF=\"/storage/.emulationstation/es_settings.cfg\"\nEE_DEVICE=$(cat /ee_arch)\nEE_LOG=\"/emuelec/logs/emuelec.log\"\nRA_CONF=\"/storage/.config/retroarch/retroarch.cfg\"\nRR_CONF=\"/emuelec/configs/retrorun.cfg\"\n\nset_ra_setting() {\n\tees -s \"${1}\" -v \"${2}\"\n}\n\nget_ra_setting() {\n\tees -r \"${1}\"\n}\n\nset_rr_setting() {\n\tees -s \"${1}\" -v \"${2}\" -o ${RR_CONF}\n}\n\nget_rr_setting() {\n\tees -r \"${1}\" -o ${RR_CONF}\n}\n\nshutdown() {\n\techo \"enabling small cores\"\n\t/usr/bin/emuelec-utils small-cores enable\n\tcommand shutdown $@\n}\n\nreboot() {\n\techo \"enabling small cores\"\n\t/usr/bin/emuelec-utils small-cores enable\n\tcommand reboot $@\n}\n\nget_resolution() {\n# This will return the current video resolution\n  echo $( fbset | grep geometry | cut -d$' ' -f2-3 )\n}\n\naml_ver() {\n# Returns the Amlogic SOC version\nif grep -q \"Gxl\" /proc/device-tree/compatible; then\n echo \"Amlogic\"\nelif grep -q \"s4\" /proc/device-tree/compatible; then\n echo \"Amlogic-no\"\nelse\n echo \"Amlogic-ng\"\nfi\n}\n\nif [ \"${EE_DEVICE}\" == \"Amlogic-ng\" ]; then\n    EE_DEVICE=$(aml_ver)\nfi\n\nget_config_value() {\n# Argument ${1} is the config file name.\n# Argument ${2} is the config name for the value you want.\n# Returns config value for the specified name.\n# Example: get_config_value \"/flash/config.ini\" \"hdmimode\"\n\nCFG_FILE=\"${1}\"\nCFG_NAME=\"${2}\"\n\n[[ ! -s \"${CFG_FILE}\" ]] && return\n\nCFG_PAT=\"^${CFG_NAME}='(.*)'\"\nCFG_TMP=$(cat \"${CFG_FILE}\" | grep -oE \"${CFG_PAT}\")\nCFG_TMP=\"${CFG_TMP##*=}\"\nif [ ! -z \"${CFG_TMP}\" ]; then\n  # Strips the config value of single and double quotes.\n  CFG_VAL=$(echo ${CFG_TMP} | sed -e \"s/^['\\\"]//\" -e \"s/['\\\"]$//\")\n  echo ${CFG_VAL}\nfi\n\n}\n\nget_ee_setting() {\n# Argument ${1} is the setting name, EmuELEC settings alway start with ee_ e.g. ee_novideo\n# Usage: get_ee_setting setting [platform] [rom]\n# Only the setting argument is required \n# Priority is: GAME, PLATFORM, GLOBAL, EE_SETTING if at any point one returns 0 it means its dissabled, if it returns empty it will continue onto the next one. \n\nSETTING=\"${1}\"\nPLATFORM=\"${2}\"\nROM=\"${3}\"\n\nEES=$(ees -e -r \"${SETTING}\" -p \"${PLATFORM}\" -m \"${ROM}\")\n\techo \"${EES}\"\n}\n\nset_ee_setting() {\n# argument ${1} is the setting name e.g. nes.integerscale. ${2} is the value, e.g \"1\"\nees -e -s \"${1}\" -v \"${2}\"\n}\n\nset_audio() { \n# sets up audio output, options are, default, alsa or pulseaudio\nif [ \"${1}\" == \"default\" ]; then\n\tif [ \"${EE_DEVICE}\" == \"Amlogic-old\" ] || [[ $(tr -d '\\0' </proc/device-tree/coreelec-dt-id) == *\"gxl_\"* ]] ; then\n\t[ \"$(get_ee_setting ee_alsa.always)\" == 1 ] && AUDIO=\"alsa\" || AUDIO=\"pulseaudio\" \n\telse\n\t\tAUDIO=\"alsa\"\n\tfi\nelse\n\tAUDIO=${1}\nfi\nrr_audio.sh ${AUDIO}\n}\n\nget_es_setting() { \n# Returns the value of the requested Emulationstation setting in es_settings.cfg\n\techo $(sed -n \"s|\\s*<${1} name=\\\"${2}\\\" value=\\\"\\(.*\\)\\\" />|\\1|p\" ${ES_CONF})\n}\n\ninit_game() {\n\techo 1 > /tmp/game.running\n}\n\nend_game() {\n\trm /tmp/game.running\n}\n\ninit_port() {\n# Initialize port settings, this gets called by the ports scripts, or should.\n# ${1} is the binary to kill\n# ${2} is the kill signal to send\n\nif pgrep gptokeyb -f; then\n        killall gptokeyb\nfi\n\nlocal VIRTUAL_KB\nGPTOKEYB=$(get_ee_setting \"gptokeyb\" \"ports\" \"${1}\")\n[[ -z \"${GPTOKEYB}\" ]] && GPTOKEYB=${4}\n[[ ! -z \"${4}\" ]] && VIRTUAL_KB=$(emuelec-utils set_gptokeyb \"ports\" \"${GPTOKEYB}\")\n\nif [ \"${3}\" ]; then\n    gptokeyb 1 ${1} ${VIRTUAL_KB} -killsignal ${3} &\nelse\n    gptokeyb 1 ${1} ${VIRTUAL_KB} &\nfi\n\nset_audio ${2}\ncat /etc/motd > \"${EE_LOG}\"\n\nemuelec-utils init_app_video \"ports\" \"${1}\"\n\n}\n\nend_port() {\n# End the port execution and set/kill anything that is needed\nset_audio default\n\nemuelec-utils end_app_video\n\nkill_video_controls\n\n# for some reason head sometimes does not exit\nkillall head\n}\n\n# maxperf and normpef are used to change gov to performance or return to ondemand\t\nmaxperf() {\n\tif [ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${EE_DEVICE}\" == \"GameForce\" ]; then\n\t\techo performance > /sys/devices/platform/ff400000.gpu/devfreq/ff400000.gpu/governor\n\t\techo performance > /sys/devices/platform/dmc/devfreq/dmc/governor\n\t\techo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor\n\telse\n\t\techo \"performance\" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor\n\t\techo \"performance\" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor\n\t\techo 5 > /sys/class/mpgpu/cur_freq\n\tfi\n}\n\nnormperf() {\n\tif [ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${EE_DEVICE}\" == \"GameForce\" ]; then\n\t\techo simple_ondemand > /sys/devices/platform/ff400000.gpu/devfreq/ff400000.gpu/governor\n\t\techo dmc_ondemand > /sys/devices/platform/dmc/devfreq/dmc/governor\n\t\techo interactive > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor\n\telse\n\t\techo \"ondemand\" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor\n\t\techo \"ondemand\" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor\n\t\techo 1 > /sys/class/mpgpu/cur_freq\n\tfi\t\n}\n\nee_check_bios() {\n# Checks that all required bios files are present, will error out if anything is missing. \nPLATFORM=\"${1}\"\nCORE=\"${2}\"\nEMULATOR=\"${3}\"\nROMNAME=\"${4}\"\nLOG=\"${5}\"\n\nif [[ -z \"${LOG}\" ]]; then\n\tLOG=\"${EE_LOG}\"\nfi\n\nMISSINGBIOS=\"$(batocera-systems --strictfilter ${PLATFORM})\"\nif [ \"$?\" == \"2\" ]; then\n\n# formating so it looks nice :)\nPLATFORMNAME=\"${MISSINGBIOS##*>}\"  # read from -P onwards\nPLATFORMNAME=\"${PLATFORMNAME%%MISSING*}\"  # until a space is found\nPLATFORMNAME=$(echo ${PLATFORMNAME} | sed -e 's/\\\\n//g')\n\nif [[ -f \"${LOG}\" ]]; then\n    echo \"${CORE} ${EMULATOR} ${ROMNAME}\" >> ${LOG}\n    echo \"${PLATFORMNAME} missing BIOS - Could not find all BIOS: \" >> ${LOG}\n    echo \"please make sure you copied the files into the corresponding folder \" >> ${LOG}\n    echo \"${MISSINGBIOS}\" >> ${LOG}\nfi\n    text_viewer -w -e -t \"Error! ${2}\" -f 24 ${LOG}\n    return 1\nelse \n    return 0\nfi\n}\n\nee_console() {\n# enable or disable the terminal console\ncase \"${1}\" in\n    \"enable\")   \n        echo 0 > /sys/class/vtconsole/vtcon1/bind\n        echo 1 > /sys/class/vtconsole/vtcon1/bind\n        clear /dev/tty0\n    ;;\n    \"disable\")\n        clear /dev/tty0\n        echo 0 > /sys/class/vtconsole/vtcon1/bind\n    ;;\nesac\n}\n\n\noga_ver() { \nDEVICE=$(tr -d '\\0' < /proc/device-tree/compatible)\n\ncase \"${DEVICE}\" in\n    *\"odroidgo3-linux\"*)\n        echo \"OGS\"\n    ;;\n    *\"odroidgo2-linux-v11\"*)\n        echo \"OGABE\"\n    ;;\n    *\"odroidgo2-linuxrockchip\"*)\n        echo \"OGA\"\n    ;;\n    *\"gameforce\"*)\n        echo \"GF\"\n    ;;\nesac\n}\n\nset_video_controls() {\n#gptokeyb is supposed to be presetup for video controls (keyboard) but this might need to be rechecked\n    gptokeyb & > /dev/null 2>&1\n}\n\nkill_video_controls() {\n    killall gptokeyb > /dev/null 2>&1\n}\n\ndot_delete() {\n# We hates MAC hidden files\nfind \"/storage/roms\" \\( -name \".DS_Store\" -o -name \"._.DS_Store\" -o -name \"._*\" \\) -type f -delete\n\n}\n\ninstall_java() {\n# ${1} is optional but you can define the package name, e.g install_java zulu21.32.17-ca-jdk21.0.2\nJDKINSTALLED=\"yes\"\nJDKDEST=\"/storage/roms/bios/jdk\"\n[[ -z \"${1}\" ]] && JDKNAME=\"zulu21.32.17-ca-jdk21.0.2\" || JDKNAME=\"${1}\"\n\nCDN=\"https://cdn.azul.com/zulu/bin\"\n\n# Alternate just for reference\n#CDN=\"https://cdn.azul.com/zulu-embedded/bin\"\n\nOLDVERSION=\"$(cat ${JDKDEST}/eeversion 2>/dev/null)\"\nif [ \"${JDKNAME}\" != \"${OLDVERSION}\" ]; then\n   JDKINSTALLED=\"no\"\n   rm -rf \"${JDKDEST}\"\nfi\n\nmkdir -p \"${JDKDEST}\"\n\nif [ \"${JDKINSTALLED}\" == \"no\" ]; then\necho -e \"GET http://google.com HTTP/1.0\\n\\n\" | nc google.com 80 > /dev/null 2>&1\nif [ $? -ne 0 ]; then\n    echo \"No internet connection, exiting...\" > /dev/console\n    text_viewer -e -w -t \"No Internet!\" -m \"You need to be connected to the internet to download the JDK\\nNo internet connection, exiting...\";\n    exit 1 #No internet\nfi\n\ncat >> /tmp/java_install.rc <<EOF\n    echo \"Downloading JDK please be patient...\"\n    cd ${JDKDEST}/..\n    wget \"${CDN}/${JDKNAME}-linux_aarch64.tar.gz\"\n    echo \"Inflating JDK please be patient...\"\n    tar xvfz ${JDKNAME}-linux_aarch64.tar.gz ${JDKNAME}-linux_aarch64/lib\n    tar xvfz ${JDKNAME}-linux_aarch64.tar.gz ${JDKNAME}-linux_aarch64/bin\n    tar xvfz ${JDKNAME}-linux_aarch64.tar.gz ${JDKNAME}-linux_aarch64/conf\n    rm ${JDKNAME}-linux_aarch64/lib/*.zip\n    mv ${JDKNAME}-linux_aarch64/* ${JDKDEST}\n    rm -rf ${JDKNAME}-linux_aarch64*\n    \n    for del in jmods include demo legal man DISCLAIMER LICENSE readme.txt release Welcome.html; do\n        rm -rf ${JDKDEST}/\\${del}\n    done\n    echo \"${JDKNAME}\" > \"${JDKDEST}/eeversion\"\nEOF\n\n    chmod +x /tmp/java_install.rc\n    progressor --log \"/emuelec/logs/jdk_install.log\" --title \"Installing JDK, please wait...\" \"/tmp/java_install.rc\" --font \"dummy.ttf\"\n    rm /tmp/java_install.rc\nfi\n}\n\nplayvideolink() {\n        [[ -z \"${1}\" ]] && echo \"provide the link.\" && return\n        local VIDEO_FILE=\"/tmp/video/video.m3u\"\n        mkdir -p /tmp/video\n        echo \"${1}\" > \"${VIDEO_FILE}\"\n        playvideo.sh \"${VIDEO_FILE}\" mpv\n        rm \"${VIDEO_FILE}\"\n}\n\n# do not edit below this line\n# reads other config files from /storage/.config/profile.d\n  for config in /storage/.config/profile.d/*; do\n    if [ -f \"${config}\" ] ; then\n      . ${config}\n    fi\ndone\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/crt/crt-nes-mini.glslp",
    "content": "shaders = 1\n\nshader0 = shaders/crt-nes-mini.glsl\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/crt/crt-pi-vertical.glslp",
    "content": "shaders = \"1\"\nshader0 = \"shaders/crt-pi-vertical.glsl\"\nfilter_linear0 = \"true\"\nwrap_mode0 = \"clamp_to_border\"\nmipmap_input0 = \"false\"\nalias0 = \"\"\nfloat_framebuffer0 = \"false\"\nsrgb_framebuffer0 = \"false\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/crt/crt-pi.glslp",
    "content": "shaders = \"1\"\nshader0 = \"shaders/crt-pi.glsl\"\nfilter_linear0 = \"true\"\nwrap_mode0 = \"clamp_to_border\"\nmipmap_input0 = \"false\"\nalias0 = \"\"\nfloat_framebuffer0 = \"false\"\nsrgb_framebuffer0 = \"false\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/crt/fakelottes.glslp",
    "content": "shaders = 1\n\nshader0 = shaders/fakelottes.glsl\nfilter_linear0 = true"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/crt/scanline.glslp",
    "content": "shaders = 1\n\nshader0 = shaders/scanlines.glsl\nfilter_linear0 = true"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/crt/shaders/crt-nes-mini.glsl",
    "content": "// Parameter lines go here:\n#pragma parameter SCANTHICK \"Scanline Thickness\" 2.0 2.0 4.0 2.0\n#pragma parameter INTENSITY \"Scanline Intensity\" 0.15 0.0 1.0 0.01\n#pragma parameter BRIGHTBOOST \"Luminance Boost\" 0.15 0.0 1.0 0.01\n\n#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING out\n#define COMPAT_ATTRIBUTE in\n#define COMPAT_TEXTURE texture\n#else\n#define COMPAT_VARYING varying \n#define COMPAT_ATTRIBUTE attribute \n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nCOMPAT_ATTRIBUTE vec4 VertexCoord;\nCOMPAT_ATTRIBUTE vec4 COLOR;\nCOMPAT_ATTRIBUTE vec4 TexCoord;\nCOMPAT_VARYING vec4 COL0;\nCOMPAT_VARYING vec4 TEX0;\n\nvec4 _oPosition1; \nuniform mat4 MVPMatrix;\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\n\nvoid main()\n{\n    gl_Position = MVPMatrix * VertexCoord;\n    COL0 = COLOR;\n    TEX0.xy = TexCoord.xy * 1.00001;\n}\n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING in\n#define COMPAT_TEXTURE texture\nout vec4 FragColor;\n#else\n#define COMPAT_VARYING varying\n#define FragColor gl_FragColor\n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\nuniform sampler2D Texture;\nCOMPAT_VARYING vec4 TEX0;\n\n// compatibility #defines\n#define Source Texture\n#define vTexCoord TEX0.xy\n\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define OutputSize vec4(OutputSize, 1.0 / OutputSize)\n\n#ifdef PARAMETER_UNIFORM\n// All parameter floats need to have COMPAT_PRECISION in front of them\nuniform COMPAT_PRECISION float SCANTHICK;\nuniform COMPAT_PRECISION float INTENSITY;\nuniform COMPAT_PRECISION float BRIGHTBOOST;\n#else\n#define SCANTHICK 2.0\n#define INTENSITY 0.15\n#define BRIGHTBOOST 0.15\n#endif\n\nvoid main()\n{\n    vec3 texel = COMPAT_TEXTURE(Texture, TEX0.xy).rgb;\n    vec3 pixelHigh = ((1.0 + BRIGHTBOOST) - (0.2 * texel)) * texel;\n    vec3 pixelLow  = ((1.0 - INTENSITY) + (0.1 * texel)) * texel;\n    float selectY = mod(TEX0.y * SCANTHICK * TextureSize.y, 2.0);\n    float selectHigh = step(1.0, selectY);\n    float selectLow = 1.0 - selectHigh;\n    vec3 pixelColor = (selectLow * pixelLow) + (selectHigh * pixelHigh);\n\n    FragColor = vec4(pixelColor, 1.0);\n} \n#endif\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/crt/shaders/crt-pi-vertical.glsl",
    "content": "/*\n    crt-pi-vertical - A Raspberry Pi friendly CRT shader.\n\n    For use with portrait mode games on landscape mode screens (or landscape mode games on portrait mode sreens).\n \n    Copyright (C) 2015-2016 davej\n\n    This program is free software; you can redistribute it and/or modify it\n    under the terms of the GNU General Public License as published by the Free\n    Software Foundation; either version 2 of the License, or (at your option)\n    any later version.\n\n\nNotes:\n\nThis shader is designed to work well on Raspberry Pi GPUs (i.e. 1080P @ 60Hz on a game with a 4:3 aspect ratio). It pushes the Pi's GPU hard and enabling some features will slow it down so that it is no longer able to match 1080P @ 60Hz. You will need to overclock your Pi to the fastest setting in raspi-config to get the best results from this shader: 'Pi2' for Pi2 and 'Turbo' for original Pi and Pi Zero. Note: Pi2s are slower at running the shader than other Pis, this seems to be down to Pi2s lower maximum memory speed. Pi2s don't quite manage 1080P @ 60Hz - they drop about 1 in 1000 frames. You probably won't notice this, but if you do, try enabling FAKE_GAMMA.\n\nSCANLINES enables scanlines. You'll almost certainly want to use it with MULTISAMPLE to reduce moire effects. SCANLINE_WEIGHT defines how wide scanlines are (it is an inverse value so a higher number = thinner lines). SCANLINE_GAP_BRIGHTNESS defines how dark the gaps between the scan lines are. Darker gaps between scan lines make moire effects more likely.\n\nGAMMA enables gamma correction using the values in INPUT_GAMMA and OUTPUT_GAMMA. FAKE_GAMMA causes it to ignore the values in INPUT_GAMMA and OUTPUT_GAMMA and approximate gamma correction in a way which is faster than true gamma whilst still looking better than having none. You must have GAMMA defined to enable FAKE_GAMMA.\n\nCURVATURE distorts the screen by CURVATURE_X and CURVATURE_Y. Curvature slows things down a lot.\n\nBy default the shader uses linear blending horizontally. If you find this too blury, enable SHARPER.\n\nBLOOM_FACTOR controls the increase in width for bright scanlines.\n\nMASK_TYPE defines what, if any, shadow mask to use. MASK_BRIGHTNESS defines how much the mask type darkens the screen.\n\n*/\n\n#pragma parameter CURVATURE_X \"Screen curvature - horizontal\" 0.10 0.0 1.0 0.01\n#pragma parameter CURVATURE_Y \"Screen curvature - vertical\" 0.15 0.0 1.0 0.01\n#pragma parameter MASK_BRIGHTNESS \"Mask brightness\" 0.70 0.0 1.0 0.01\n#pragma parameter SCANLINE_WEIGHT \"Scanline weight\" 6.0 0.0 15.0 0.1\n#pragma parameter SCANLINE_GAP_BRIGHTNESS \"Scanline gap brightness\" 0.12 0.0 1.0 0.01\n#pragma parameter BLOOM_FACTOR \"Bloom factor\" 1.5 0.0 5.0 0.01\n#pragma parameter INPUT_GAMMA \"Input gamma\" 2.4 0.0 5.0 0.01\n#pragma parameter OUTPUT_GAMMA \"Output gamma\" 2.2 0.0 5.0 0.01\n\n// Haven't put these as parameters as it would slow the code down.\n#define SCANLINES\n#define MULTISAMPLE\n#define GAMMA\n//#define FAKE_GAMMA\n//#define CURVATURE\n//#define SHARPER\n// MASK_TYPE: 0 = none, 1 = green/magenta, 2 = trinitron(ish)\n#define MASK_TYPE 1\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\nprecision mediump float;\n#else\n#define COMPAT_PRECISION\n#endif\n\n#ifdef PARAMETER_UNIFORM\nuniform COMPAT_PRECISION float CURVATURE_X;\nuniform COMPAT_PRECISION float CURVATURE_Y;\nuniform COMPAT_PRECISION float MASK_BRIGHTNESS;\nuniform COMPAT_PRECISION float SCANLINE_WEIGHT;\nuniform COMPAT_PRECISION float SCANLINE_GAP_BRIGHTNESS;\nuniform COMPAT_PRECISION float BLOOM_FACTOR;\nuniform COMPAT_PRECISION float INPUT_GAMMA;\nuniform COMPAT_PRECISION float OUTPUT_GAMMA;\n#else\n#define CURVATURE_X 0.10\n#define CURVATURE_Y 0.25\n#define MASK_BRIGHTNESS 0.70\n#define SCANLINE_WEIGHT 6.0\n#define SCANLINE_GAP_BRIGHTNESS 0.12\n#define BLOOM_FACTOR 1.5\n#define INPUT_GAMMA 2.4\n#define OUTPUT_GAMMA 2.2\n#endif\n\n/* COMPATIBILITY\n   - GLSL compilers\n*/\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\n\nuniform vec2 TextureSize;\n#if defined(CURVATURE)\nvarying COMPAT_PRECISION vec2 screenScale;\n#endif\nvarying COMPAT_PRECISION vec2 TEX0;\nvarying COMPAT_PRECISION float filterWidth;\n\n#if defined(VERTEX)\nuniform mat4 MVPMatrix;\nattribute vec4 VertexCoord;\nattribute vec2 TexCoord;\nuniform vec2 InputSize;\nuniform vec2 OutputSize;\n\nvoid main()\n{\n#if defined(CURVATURE)\n\tscreenScale = TextureSize / InputSize;\n#endif\n\tfilterWidth = (InputSize.y / OutputSize.y) / 3.0;\n\tTEX0 = TexCoord;\n\tgl_Position = MVPMatrix * VertexCoord;\n}\n#elif defined(FRAGMENT)\n\nuniform sampler2D Texture;\n\n#if defined(CURVATURE)\nvec2 CURVATURE_DISTORTION = vec2(CURVATURE_X, CURVATURE_Y);\n// Barrel distortion shrinks the display area a bit, this will allow us to counteract that.\nvec2 barrelScale = 1.0 - (0.23 * CURVATURE_DISTORTION);\n\nvec2 Distort(vec2 coord)\n{\n\tcoord *= screenScale;\n\tcoord -= vec2(0.5);\n\tfloat rsq = coord.x * coord.x + coord.y * coord.y;\n\tcoord += coord * (CURVATURE_DISTORTION * rsq);\n\tcoord *= barrelScale;\n\tif (abs(coord.x) >= 0.5 || abs(coord.y) >= 0.5)\n\t\tcoord = vec2(-1.0);\t\t// If out of bounds, return an invalid value.\n\telse\n\t{\n\t\tcoord += vec2(0.5);\n\t\tcoord /= screenScale;\n\t}\n\n\treturn coord;\n}\n#endif\n\nfloat CalcScanLineWeight(float dist)\n{\n\treturn max(1.0-dist*dist*SCANLINE_WEIGHT, SCANLINE_GAP_BRIGHTNESS);\n}\n\nfloat CalcScanLine(float dy)\n{\n\tfloat scanLineWeight = CalcScanLineWeight(dy);\n#if defined(MULTISAMPLE)\n\tscanLineWeight += CalcScanLineWeight(dy-filterWidth);\n\tscanLineWeight += CalcScanLineWeight(dy+filterWidth);\n\tscanLineWeight *= 0.3333333;\n#endif\n\treturn scanLineWeight;\n}\n\nvoid main()\n{\n#if defined(CURVATURE)\n\tvec2 texcoord = Distort(TEX0);\n\tif (texcoord.x < 0.0)\n\t\tgl_FragColor = vec4(0.0);\n\telse\n#else\n\tvec2 texcoord = TEX0;\n#endif\n\t{\n\t\tvec2 texcoordInPixels = texcoord * TextureSize;\n#if defined(SHARPER)\n\t\tvec2 tempCoord = floor(texcoordInPixels) + 0.5;\n\t\tvec2 coord = tempCoord / TextureSize;\n\t\tvec2 deltas = texcoordInPixels - tempCoord;\n\t\tfloat scanLineWeight = CalcScanLine(deltas.y);\n\t\tvec2 signs = sign(deltas);\n\t\tdeltas.x *= 2.0;\n\t\tdeltas = deltas * deltas;\n\t\tdeltas.y = deltas.y * deltas.y;\n\t\tdeltas.x *= 0.5;\n\t\tdeltas.y *= 8.0;\n\t\tdeltas /= TextureSize;\n\t\tdeltas *= signs;\n\t\tvec2 tc = coord + deltas;\n#else\n\t\tfloat tempY = floor(texcoordInPixels.y) + 0.5;\n\t\tfloat yCoord = tempY / TextureSize.y;\n\t\tfloat dy = texcoordInPixels.y - tempY;\n\t\tfloat scanLineWeight = CalcScanLine(dy);\n\t\tfloat signY = sign(dy);\n\t\tdy = dy * dy;\n\t\tdy = dy * dy;\n\t\tdy *= 8.0;\n\t\tdy /= TextureSize.y;\n\t\tdy *= signY;\n\t\tvec2 tc = vec2(texcoord.x, yCoord + dy);\n#endif\n\n\t\tvec3 colour = texture2D(Texture, tc).rgb;\n\n#if defined(SCANLINES)\n#if defined(GAMMA)\n#if defined(FAKE_GAMMA)\n\t\tcolour = colour * colour;\n#else\n\t\tcolour = pow(colour, vec3(INPUT_GAMMA));\n#endif\n#endif\n\t\tscanLineWeight *= BLOOM_FACTOR;\n\t\tcolour *= scanLineWeight;\n\n#if defined(GAMMA)\n#if defined(FAKE_GAMMA)\n\t\tcolour = sqrt(colour);\n#else\n\t\tcolour = pow(colour, vec3(1.0/OUTPUT_GAMMA));\n#endif\n#endif\n#endif\n#if MASK_TYPE == 0\n\t\tgl_FragColor = vec4(colour, 1.0);\n#else\n#if MASK_TYPE == 1\n\t\tfloat whichMask = fract(gl_FragCoord.y * 0.5);\n\t\tvec3 mask;\n\t\tif (whichMask < 0.5)\n\t\t\tmask = vec3(MASK_BRIGHTNESS, 1.0, MASK_BRIGHTNESS);\n\t\telse\n\t\t\tmask = vec3(1.0, MASK_BRIGHTNESS, 1.0);\n#elif MASK_TYPE == 2\n\t\tfloat whichMask = fract(gl_FragCoord.y * 0.3333333);\n\t\tvec3 mask = vec3(MASK_BRIGHTNESS, MASK_BRIGHTNESS, MASK_BRIGHTNESS);\n\t\tif (whichMask < 0.3333333)\n\t\t\tmask.x = 1.0;\n\t\telse if (whichMask < 0.6666666)\n\t\t\tmask.y = 1.0;\n\t\telse\n\t\t\tmask.z = 1.0;\n#endif\n\n\t\tgl_FragColor = vec4(colour * mask, 1.0);\n#endif\n\t}\n}\n#endif\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/crt/shaders/crt-pi.glsl",
    "content": "/*\n    crt-pi - A Raspberry Pi friendly CRT shader.\n\n    Copyright (C) 2015-2016 davej\n\n    This program is free software; you can redistribute it and/or modify it\n    under the terms of the GNU General Public License as published by the Free\n    Software Foundation; either version 2 of the License, or (at your option)\n    any later version.\n\n\nNotes:\n\nThis shader is designed to work well on Raspberry Pi GPUs (i.e. 1080P @ 60Hz on a game with a 4:3 aspect ratio). It pushes the Pi's GPU hard and enabling some features will slow it down so that it is no longer able to match 1080P @ 60Hz. You will need to overclock your Pi to the fastest setting in raspi-config to get the best results from this shader: 'Pi2' for Pi2 and 'Turbo' for original Pi and Pi Zero. Note: Pi2s are slower at running the shader than other Pis, this seems to be down to Pi2s lower maximum memory speed. Pi2s don't quite manage 1080P @ 60Hz - they drop about 1 in 1000 frames. You probably won't notice this, but if you do, try enabling FAKE_GAMMA.\n\nSCANLINES enables scanlines. You'll almost certainly want to use it with MULTISAMPLE to reduce moire effects. SCANLINE_WEIGHT defines how wide scanlines are (it is an inverse value so a higher number = thinner lines). SCANLINE_GAP_BRIGHTNESS defines how dark the gaps between the scan lines are. Darker gaps between scan lines make moire effects more likely.\n\nGAMMA enables gamma correction using the values in INPUT_GAMMA and OUTPUT_GAMMA. FAKE_GAMMA causes it to ignore the values in INPUT_GAMMA and OUTPUT_GAMMA and approximate gamma correction in a way which is faster than true gamma whilst still looking better than having none. You must have GAMMA defined to enable FAKE_GAMMA.\n\nCURVATURE distorts the screen by CURVATURE_X and CURVATURE_Y. Curvature slows things down a lot.\n\nBy default the shader uses linear blending horizontally. If you find this too blury, enable SHARPER.\n\nBLOOM_FACTOR controls the increase in width for bright scanlines.\n\nMASK_TYPE defines what, if any, shadow mask to use. MASK_BRIGHTNESS defines how much the mask type darkens the screen.\n\n*/\n\n#pragma parameter CURVATURE_X \"Screen curvature - horizontal\" 0.10 0.0 1.0 0.01\n#pragma parameter CURVATURE_Y \"Screen curvature - vertical\" 0.15 0.0 1.0 0.01\n#pragma parameter MASK_BRIGHTNESS \"Mask brightness\" 0.70 0.0 1.0 0.01\n#pragma parameter SCANLINE_WEIGHT \"Scanline weight\" 6.0 0.0 15.0 0.1\n#pragma parameter SCANLINE_GAP_BRIGHTNESS \"Scanline gap brightness\" 0.12 0.0 1.0 0.01\n#pragma parameter BLOOM_FACTOR \"Bloom factor\" 1.5 0.0 5.0 0.01\n#pragma parameter INPUT_GAMMA \"Input gamma\" 2.4 0.0 5.0 0.01\n#pragma parameter OUTPUT_GAMMA \"Output gamma\" 2.2 0.0 5.0 0.01\n\n// Haven't put these as parameters as it would slow the code down.\n#define SCANLINES\n#define MULTISAMPLE\n#define GAMMA\n//#define FAKE_GAMMA\n//#define CURVATURE\n//#define SHARPER\n// MASK_TYPE: 0 = none, 1 = green/magenta, 2 = trinitron(ish)\n#define MASK_TYPE 1\n\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\nprecision mediump float;\n#else\n#define COMPAT_PRECISION\n#endif\n\n#ifdef PARAMETER_UNIFORM\nuniform COMPAT_PRECISION float CURVATURE_X;\nuniform COMPAT_PRECISION float CURVATURE_Y;\nuniform COMPAT_PRECISION float MASK_BRIGHTNESS;\nuniform COMPAT_PRECISION float SCANLINE_WEIGHT;\nuniform COMPAT_PRECISION float SCANLINE_GAP_BRIGHTNESS;\nuniform COMPAT_PRECISION float BLOOM_FACTOR;\nuniform COMPAT_PRECISION float INPUT_GAMMA;\nuniform COMPAT_PRECISION float OUTPUT_GAMMA;\n#else\n#define CURVATURE_X 0.10\n#define CURVATURE_Y 0.25\n#define MASK_BRIGHTNESS 0.70\n#define SCANLINE_WEIGHT 6.0\n#define SCANLINE_GAP_BRIGHTNESS 0.12\n#define BLOOM_FACTOR 1.5\n#define INPUT_GAMMA 2.4\n#define OUTPUT_GAMMA 2.2\n#endif\n\n/* COMPATIBILITY\n   - GLSL compilers\n*/\n\nuniform vec2 TextureSize;\n#if defined(CURVATURE)\nvarying vec2 screenScale;\n#endif\nvarying vec2 TEX0;\nvarying float filterWidth;\n\n#if defined(VERTEX)\nuniform mat4 MVPMatrix;\nattribute vec4 VertexCoord;\nattribute vec2 TexCoord;\nuniform vec2 InputSize;\nuniform vec2 OutputSize;\n\nvoid main()\n{\n#if defined(CURVATURE)\n\tscreenScale = TextureSize / InputSize;\n#endif\n\tfilterWidth = (InputSize.y / OutputSize.y) / 3.0;\n\tTEX0 = TexCoord;\n\tgl_Position = MVPMatrix * VertexCoord;\n}\n#elif defined(FRAGMENT)\n\nuniform sampler2D Texture;\n\n#if defined(CURVATURE)\nvec2 CURVATURE_DISTORTION = vec2(CURVATURE_X, CURVATURE_Y);\n// Barrel distortion shrinks the display area a bit, this will allow us to counteract that.\nvec2 barrelScale = 1.0 - (0.23 * CURVATURE_DISTORTION);\n\nvec2 Distort(vec2 coord)\n{\n\tcoord *= screenScale;\n\tcoord -= vec2(0.5);\n\tfloat rsq = coord.x * coord.x + coord.y * coord.y;\n\tcoord += coord * (CURVATURE_DISTORTION * rsq);\n\tcoord *= barrelScale;\n\tif (abs(coord.x) >= 0.5 || abs(coord.y) >= 0.5)\n\t\tcoord = vec2(-1.0);\t\t// If out of bounds, return an invalid value.\n\telse\n\t{\n\t\tcoord += vec2(0.5);\n\t\tcoord /= screenScale;\n\t}\n\n\treturn coord;\n}\n#endif\n\nfloat CalcScanLineWeight(float dist)\n{\n\treturn max(1.0-dist*dist*SCANLINE_WEIGHT, SCANLINE_GAP_BRIGHTNESS);\n}\n\nfloat CalcScanLine(float dy)\n{\n\tfloat scanLineWeight = CalcScanLineWeight(dy);\n#if defined(MULTISAMPLE)\n\tscanLineWeight += CalcScanLineWeight(dy-filterWidth);\n\tscanLineWeight += CalcScanLineWeight(dy+filterWidth);\n\tscanLineWeight *= 0.3333333;\n#endif\n\treturn scanLineWeight;\n}\n\nvoid main()\n{\n#if defined(CURVATURE)\n\tvec2 texcoord = Distort(TEX0);\n\tif (texcoord.x < 0.0)\n\t\tgl_FragColor = vec4(0.0);\n\telse\n#else\n\tvec2 texcoord = TEX0;\n#endif\n\t{\n\t\tvec2 texcoordInPixels = texcoord * TextureSize;\n#if defined(SHARPER)\n\t\tvec2 tempCoord = floor(texcoordInPixels) + 0.5;\n\t\tvec2 coord = tempCoord / TextureSize;\n\t\tvec2 deltas = texcoordInPixels - tempCoord;\n\t\tfloat scanLineWeight = CalcScanLine(deltas.y);\n\t\tvec2 signs = sign(deltas);\n\t\tdeltas.x *= 2.0;\n\t\tdeltas = deltas * deltas;\n\t\tdeltas.y = deltas.y * deltas.y;\n\t\tdeltas.x *= 0.5;\n\t\tdeltas.y *= 8.0;\n\t\tdeltas /= TextureSize;\n\t\tdeltas *= signs;\n\t\tvec2 tc = coord + deltas;\n#else\n\t\tfloat tempY = floor(texcoordInPixels.y) + 0.5;\n\t\tfloat yCoord = tempY / TextureSize.y;\n\t\tfloat dy = texcoordInPixels.y - tempY;\n\t\tfloat scanLineWeight = CalcScanLine(dy);\n\t\tfloat signY = sign(dy);\n\t\tdy = dy * dy;\n\t\tdy = dy * dy;\n\t\tdy *= 8.0;\n\t\tdy /= TextureSize.y;\n\t\tdy *= signY;\n\t\tvec2 tc = vec2(texcoord.x, yCoord + dy);\n#endif\n\n\t\tvec3 colour = texture2D(Texture, tc).rgb;\n\n#if defined(SCANLINES)\n#if defined(GAMMA)\n#if defined(FAKE_GAMMA)\n\t\tcolour = colour * colour;\n#else\n\t\tcolour = pow(colour, vec3(INPUT_GAMMA));\n#endif\n#endif\n\t\tscanLineWeight *= BLOOM_FACTOR;\n\t\tcolour *= scanLineWeight;\n\n#if defined(GAMMA)\n#if defined(FAKE_GAMMA)\n\t\tcolour = sqrt(colour);\n#else\n\t\tcolour = pow(colour, vec3(1.0/OUTPUT_GAMMA));\n#endif\n#endif\n#endif\n#if MASK_TYPE == 0\n\t\tgl_FragColor = vec4(colour, 1.0);\n#else\n#if MASK_TYPE == 1\n\t\tfloat whichMask = fract(gl_FragCoord.x * 0.5);\n\t\tvec3 mask;\n\t\tif (whichMask < 0.5)\n\t\t\tmask = vec3(MASK_BRIGHTNESS, 1.0, MASK_BRIGHTNESS);\n\t\telse\n\t\t\tmask = vec3(1.0, MASK_BRIGHTNESS, 1.0);\n#elif MASK_TYPE == 2\n\t\tfloat whichMask = fract(gl_FragCoord.x * 0.3333333);\n\t\tvec3 mask = vec3(MASK_BRIGHTNESS, MASK_BRIGHTNESS, MASK_BRIGHTNESS);\n\t\tif (whichMask < 0.3333333)\n\t\t\tmask.x = 1.0;\n\t\telse if (whichMask < 0.6666666)\n\t\t\tmask.y = 1.0;\n\t\telse\n\t\t\tmask.z = 1.0;\n#endif\n\n\t\tgl_FragColor = vec4(colour * mask, 1.0);\n#endif\n\t}\n}\n#endif\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/crt/shaders/fakelottes.glsl",
    "content": "// Simple scanlines with curvature and mask effects lifted from crt-lottes\n// by hunterk\n\n////////////////////////////////////////////////////////////////////\n////////////////////////////  SETTINGS  ////////////////////////////\n/////  comment these lines to disable effects and gain speed  //////\n////////////////////////////////////////////////////////////////////\n\n//#define MASK // fancy, expensive phosphor mask effect\n#define CURVATURE // applies barrel distortion to the screen\n#define SCANLINES  // applies horizontal scanline effect\n//#define ROTATE_SCANLINES // for TATE games; also disables the mask effects, which look bad with it\n//#define EXTRA_MASKS // disable these if you need extra registers freed up\n\n////////////////////////////////////////////////////////////////////\n//////////////////////////  END SETTINGS  //////////////////////////\n////////////////////////////////////////////////////////////////////\n\n///////////////////////  Runtime Parameters  ///////////////////////\n#pragma parameter shadowMask \"shadowMask\" 1.0 0.0 4.0 1.0\n#pragma parameter SCANLINE_SINE_COMP_B \"Scanline Intensity\" 0.40 0.0 1.0 0.05\n#pragma parameter warpX \"warpX\" 0.031 0.0 0.125 0.01\n#pragma parameter warpY \"warpY\" 0.041 0.0 0.125 0.01\n#pragma parameter maskDark \"maskDark\" 0.5 0.0 2.0 0.1\n#pragma parameter maskLight \"maskLight\" 1.5 0.0 2.0 0.1\n#pragma parameter crt_gamma \"CRT Gamma\" 2.5 1.0 4.0 0.05\n#pragma parameter monitor_gamma \"Monitor Gamma\" 2.2 1.0 4.0 0.05\n#pragma parameter SCANLINE_SINE_COMP_A \"Scanline Sine Comp A\" 0.0 0.0 0.10 0.01\n#pragma parameter SCANLINE_BASE_BRIGHTNESS \"Scanline Base Brightness\" 0.95 0.0 1.0 0.01\n\n// prevent stupid behavior\n#if defined ROTATE_SCANLINES && !defined SCANLINES\n\t#define SCANLINES\n#endif\n\n#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING out\n#define COMPAT_ATTRIBUTE in\n#define COMPAT_TEXTURE texture\n#else\n#define COMPAT_VARYING varying \n#define COMPAT_ATTRIBUTE attribute \n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nCOMPAT_ATTRIBUTE vec4 VertexCoord;\nCOMPAT_ATTRIBUTE vec4 COLOR;\nCOMPAT_ATTRIBUTE vec4 TexCoord;\nCOMPAT_VARYING vec4 COL0;\nCOMPAT_VARYING vec4 TEX0;\n\nvec4 _oPosition1; \nuniform mat4 MVPMatrix;\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\n\n// compatibility #defines\n#define vTexCoord TEX0.xy\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define OutSize vec4(OutputSize, 1.0 / OutputSize)\n\n#ifdef PARAMETER_UNIFORM\nuniform COMPAT_PRECISION float WHATEVER;\n#else\n#define WHATEVER 0.0\n#endif\n\nvoid main()\n{\n    gl_Position = MVPMatrix * VertexCoord;\n    TEX0.xy = TexCoord.xy;\n}\n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING in\n#define COMPAT_TEXTURE texture\nout vec4 FragColor;\n#else\n#define COMPAT_VARYING varying\n#define FragColor gl_FragColor\n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\nuniform sampler2D Texture;\nCOMPAT_VARYING vec4 TEX0;\n\n// compatibility #defines\n#define Source Texture\n#define vTexCoord TEX0.xy\n\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define OutSize vec4(OutputSize, 1.0 / OutputSize)\n\n#ifdef PARAMETER_UNIFORM\nuniform COMPAT_PRECISION float SCANLINE_BASE_BRIGHTNESS;\nuniform COMPAT_PRECISION float SCANLINE_SINE_COMP_A;\nuniform COMPAT_PRECISION float SCANLINE_SINE_COMP_B;\nuniform COMPAT_PRECISION float warpX;\nuniform COMPAT_PRECISION float warpY;\nuniform COMPAT_PRECISION float maskDark;\nuniform COMPAT_PRECISION float maskLight;\nuniform COMPAT_PRECISION float shadowMask;\nuniform COMPAT_PRECISION float crt_gamma;\nuniform COMPAT_PRECISION float monitor_gamma;\n#else\n#define SCANLINE_BASE_BRIGHTNESS 0.95\n#define SCANLINE_SINE_COMP_A 0.0\n#define SCANLINE_SINE_COMP_B 0.40\n#define warpX 0.031\n#define warpY 0.041\n#define maskDark 0.5\n#define maskLight 1.5\n#define shadowMask 1.0\n#define crt_gamma 2.5\n#define monitor_gamma 2.2\n#endif\n\nvec4 scanline(vec2 coord, vec4 frame)\n{\n#if defined SCANLINES\n\tvec2 omega = vec2(3.1415 * OutputSize.x, 2.0 * 3.1415 * TextureSize.y);\n\tvec2 sine_comp = vec2(SCANLINE_SINE_COMP_A, SCANLINE_SINE_COMP_B);\n\tvec3 res = frame.xyz;\n\t#ifdef ROTATE_SCANLINES\n\t\tsine_comp = sine_comp.yx;\n\t\tomega = omega.yx;\n\t#endif\n\tvec3 scanline = res * (SCANLINE_BASE_BRIGHTNESS + dot(sine_comp * sin(coord * omega), vec2(1.0, 1.0)));\n\n\treturn vec4(scanline.x, scanline.y, scanline.z, 1.0);\n#else\n\treturn frame;\n#endif\n}\n\n#ifdef CURVATURE\n// Distortion of scanlines, and end of screen alpha.\nvec2 Warp(vec2 pos)\n{\n    pos  = pos*2.0-1.0;    \n    pos *= vec2(1.0 + (pos.y*pos.y)*warpX, 1.0 + (pos.x*pos.x)*warpY);\n    \n    return pos*0.5 + 0.5;\n}\n#endif\n\n#if defined MASK && !defined ROTATE_SCANLINES\n\t// Shadow mask.\n\tvec4 Mask(vec2 pos)\n\t{\n\t\tvec3 mask = vec3(maskDark, maskDark, maskDark);\n\t  \n\t\t// Very compressed TV style shadow mask.\n\t\tif (shadowMask == 1.0) \n\t\t{\n\t\t\tfloat line = maskLight;\n\t\t\tfloat odd = 0.0;\n\t\t\t\n\t\t\tif (fract(pos.x*0.166666666) < 0.5) odd = 1.0;\n\t\t\tif (fract((pos.y + odd) * 0.5) < 0.5) line = maskDark;  \n\t\t\t\n\t\t\tpos.x = fract(pos.x*0.333333333);\n\n\t\t\tif      (pos.x < 0.333) mask.r = maskLight;\n\t\t\telse if (pos.x < 0.666) mask.g = maskLight;\n\t\t\telse                    mask.b = maskLight;\n\t\t\tmask*=line;  \n\t\t} \n\n\t\t// Aperture-grille.\n\t\telse if (shadowMask == 2.0) \n\t\t{\n\t\t\tpos.x = fract(pos.x*0.333333333);\n\n\t\t\tif      (pos.x < 0.333) mask.r = maskLight;\n\t\t\telse if (pos.x < 0.666) mask.g = maskLight;\n\t\t\telse                    mask.b = maskLight;\n\t\t} \n\t#ifdef EXTRA_MASKS\n\t\t// These can cause moire with curvature and scanlines\n\t\t// so they're an easy target for freeing up registers\n\t\t\n\t\t// Stretched VGA style shadow mask (same as prior shaders).\n\t\telse if (shadowMask == 3.0) \n\t\t{\n\t\t\tpos.x += pos.y*3.0;\n\t\t\tpos.x  = fract(pos.x*0.166666666);\n\n\t\t\tif      (pos.x < 0.333) mask.r = maskLight;\n\t\t\telse if (pos.x < 0.666) mask.g = maskLight;\n\t\t\telse                    mask.b = maskLight;\n\t\t}\n\n\t\t// VGA style shadow mask.\n\t\telse if (shadowMask == 4.0) \n\t\t{\n\t\t\tpos.xy  = floor(pos.xy*vec2(1.0, 0.5));\n\t\t\tpos.x  += pos.y*3.0;\n\t\t\tpos.x   = fract(pos.x*0.166666666);\n\n\t\t\tif      (pos.x < 0.333) mask.r = maskLight;\n\t\t\telse if (pos.x < 0.666) mask.g = maskLight;\n\t\t\telse                    mask.b = maskLight;\n\t\t}\n\t#endif\n\t\t\n\t\telse mask = vec3(1.,1.,1.);\n\n\t\treturn vec4(mask, 1.0);\n\t}\n#endif\n\nvoid main()\n{\n#ifdef CURVATURE\n\tvec2 pos = Warp(TEX0.xy*(TextureSize.xy/InputSize.xy))*(InputSize.xy/TextureSize.xy);\n#else\n\tvec2 pos = TEX0.xy;\n#endif\n\n#if defined MASK && !defined ROTATE_SCANLINES\n\t// mask effects look bad unless applied in linear gamma space\n\tvec4 in_gamma = vec4(monitor_gamma, monitor_gamma, monitor_gamma, 1.0);\n\tvec4 out_gamma = vec4(1.0 / crt_gamma, 1.0 / crt_gamma, 1.0 / crt_gamma, 1.0);\n\tvec4 res = pow(COMPAT_TEXTURE(Source, pos), in_gamma);\n#else\n\tvec4 res = COMPAT_TEXTURE(Source, pos);\n#endif\n\n#if defined MASK && !defined ROTATE_SCANLINES\n\t// apply the mask; looks bad with vert scanlines so make them mutually exclusive\n\tres *= Mask(gl_FragCoord.xy * 1.0001);\n#endif\n\n#if defined CURVATURE && defined GL_ES\n\t// hacky clamp fix for GLES\n    vec2 bordertest = (pos);\n    if ( bordertest.x > 0.0001 && bordertest.x < 0.9999 && bordertest.y > 0.0001 && bordertest.y < 0.9999)\n        res = res;\n    else\n        res = vec4(0.,0.,0.,0.);\n#endif\n\n#if defined MASK && !defined ROTATE_SCANLINES\n\t// re-apply the gamma curve for the mask path\n    FragColor = pow(scanline(pos, res), out_gamma);\n#else\n\tFragColor = scanline(pos, res);\n#endif\n} \n#endif\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/crt/shaders/scanlines.glsl",
    "content": "// Parameter lines go here:\n#pragma parameter SCANLINE_BASE_BRIGHTNESS \"Scanline Base Brightness\" 0.95 0.0 1.0 0.01\n#pragma parameter SCANLINE_SINE_COMP_A \"Scanline Sine Comp A\" 0.0 0.0 0.10 0.01\n#pragma parameter SCANLINE_SINE_COMP_B \"Scanline Sine Comp B\" 0.15 0.0 1.0 0.05\n\n#define pi 3.141592654\n\n#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING out\n#define COMPAT_ATTRIBUTE in\n#define COMPAT_TEXTURE texture\n#else\n#define COMPAT_VARYING varying \n#define COMPAT_ATTRIBUTE attribute \n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nCOMPAT_ATTRIBUTE vec4 VertexCoord;\nCOMPAT_ATTRIBUTE vec4 COLOR;\nCOMPAT_ATTRIBUTE vec4 TexCoord;\nCOMPAT_VARYING vec4 COL0;\nCOMPAT_VARYING vec4 TEX0;\nCOMPAT_VARYING vec2 omega;\n\nvec4 _oPosition1; \nuniform mat4 MVPMatrix;\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\n\nvoid main()\n{\n    gl_Position = MVPMatrix * VertexCoord;\n    COL0 = COLOR;\n    TEX0.xy = TexCoord.xy;\n\tomega = vec2(pi * OutputSize.x, 2.0 * pi * TextureSize.y);\n}\n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING in\n#define COMPAT_TEXTURE texture\nout vec4 FragColor;\n#else\n#define COMPAT_VARYING varying\n#define FragColor gl_FragColor\n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nuniform COMPAT_PRECISION int FrameDirection;\nuniform COMPAT_PRECISION int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\nuniform sampler2D Texture;\nCOMPAT_VARYING vec4 TEX0;\nCOMPAT_VARYING vec2 omega;\n\n// compatibility #defines\n#define Source Texture\n#define vTexCoord TEX0.xy\n\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define OutputSize vec4(OutputSize, 1.0 / OutputSize)\n\n#ifdef PARAMETER_UNIFORM\n// All parameter floats need to have COMPAT_PRECISION in front of them\nuniform COMPAT_PRECISION float SCANLINE_BASE_BRIGHTNESS;\nuniform COMPAT_PRECISION float SCANLINE_SINE_COMP_A;\nuniform COMPAT_PRECISION float SCANLINE_SINE_COMP_B;\n#else\n#define SCANLINE_BASE_BRIGHTNESS 0.95\n#define SCANLINE_SINE_COMP_A 0.0\n#define SCANLINE_SINE_COMP_B 0.15\n#endif\n\nvoid main()\n{\n   vec2 sine_comp = vec2(SCANLINE_SINE_COMP_A, SCANLINE_SINE_COMP_B);\n   vec3 res = COMPAT_TEXTURE(Source, vTexCoord).xyz;\n   vec3 scanline = res * (SCANLINE_BASE_BRIGHTNESS + dot(sine_comp * sin(vTexCoord * omega), vec2(1.0, 1.0)));\n   FragColor = vec4(scanline.x, scanline.y, scanline.z, 1.0);\n} \n#endif\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/crt/shaders/zfast_crt.glsl",
    "content": "/*\r\n    zfast_crt_standard - A simple, fast CRT shader.\r\n\r\n    Copyright (C) 2017 Greg Hogan (SoltanGris42)\r\n\r\n    This program is free software; you can redistribute it and/or modify it\r\n    under the terms of the GNU General Public License as published by the Free\r\n    Software Foundation; either version 2 of the License, or (at your option)\r\n    any later version.\r\n\r\n\r\nNotes:  This shader does scaling with a weighted linear filter for adjustable\r\n\tsharpness on the x and y axes based on the algorithm by Inigo Quilez here:\r\n\thttp://http://www.iquilezles.org/www/articles/texture/texture.htm\r\n\tbut modified to be somewhat sharper.  Then a scanline effect that varies\r\n\tbased on pixel brighness is applied along with a monochrome aperture mask.\r\n\tThis shader runs at 60fps on the Raspberry Pi 3 hardware at 2mpix/s\r\n\tresolutions (1920x1080 or 1600x1200).\r\n*/\r\n\r\n//For testing compilation \r\n//#define FRAGMENT\r\n//#define VERTEX\r\n\r\n//This can't be an option without slowing the shader down\r\n//Comment this out for a coarser 3 pixel mask...which is currently broken\r\n//on SNES Classic Edition due to Mali 400 gpu precision\r\n#define FINEMASK\r\n//Some drivers don't return black with texture coordinates out of bounds\r\n//SNES Classic is too slow to black these areas out when using fullscreen\r\n//overlays.  But you can uncomment the below to black them out if necessary\r\n//#define BLACK_OUT_BORDER\r\n\r\n// Parameter lines go here:\r\n#pragma parameter BLURSCALEX \"Blur Amount X-Axis\" 0.30 0.0 1.0 0.05\r\n#pragma parameter LOWLUMSCAN \"Scanline Darkness - Low\" 6.0 0.0 10.0 0.5\r\n#pragma parameter HILUMSCAN \"Scanline Darkness - High\" 8.0 0.0 50.0 1.0\r\n#pragma parameter BRIGHTBOOST \"Dark Pixel Brightness Boost\" 1.25 0.5 1.5 0.05\r\n#pragma parameter MASK_DARK \"Mask Effect Amount\" 0.25 0.0 1.0 0.05\r\n#pragma parameter MASK_FADE \"Mask/Scanline Fade\" 0.8 0.0 1.0 0.05\r\n\r\n#if defined(VERTEX)\r\n\r\n#if __VERSION__ >= 130\r\n#define COMPAT_VARYING out\r\n#define COMPAT_ATTRIBUTE in\r\n#define COMPAT_TEXTURE texture\r\n#else\r\n#define COMPAT_VARYING varying \r\n#define COMPAT_ATTRIBUTE attribute \r\n#define COMPAT_TEXTURE texture2D\r\n#endif\r\n\r\n#ifdef GL_ES\r\n#define COMPAT_PRECISION mediump\r\n#else\r\n#define COMPAT_PRECISION\r\n#endif\r\n\r\nCOMPAT_ATTRIBUTE vec4 VertexCoord;\r\nCOMPAT_ATTRIBUTE vec4 COLOR;\r\nCOMPAT_ATTRIBUTE vec4 TexCoord;\r\nCOMPAT_VARYING vec4 COL0;\r\nCOMPAT_VARYING vec4 TEX0;\r\nCOMPAT_VARYING float maskFade;\r\nCOMPAT_VARYING vec2 invDims;\r\n\r\nvec4 _oPosition1; \r\nuniform mat4 MVPMatrix;\r\nuniform COMPAT_PRECISION int FrameDirection;\r\nuniform COMPAT_PRECISION int FrameCount;\r\nuniform COMPAT_PRECISION vec2 OutputSize;\r\nuniform COMPAT_PRECISION vec2 TextureSize;\r\nuniform COMPAT_PRECISION vec2 InputSize;\r\n\r\n// compatibility #defines\r\n#define vTexCoord TEX0.xy\r\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\r\n#define OutSize vec4(OutputSize, 1.0 / OutputSize)\r\n\r\n#ifdef PARAMETER_UNIFORM\r\n// All parameter floats need to have COMPAT_PRECISION in front of them\r\nuniform COMPAT_PRECISION float BLURSCALEX;\r\n//uniform COMPAT_PRECISION float BLURSCALEY;\r\nuniform COMPAT_PRECISION float LOWLUMSCAN;\r\nuniform COMPAT_PRECISION float HILUMSCAN;\r\nuniform COMPAT_PRECISION float BRIGHTBOOST;\r\nuniform COMPAT_PRECISION float MASK_DARK;\r\nuniform COMPAT_PRECISION float MASK_FADE;\r\n#else\r\n#define BLURSCALEX 0.45\r\n//#define BLURSCALEY 0.20\r\n#define LOWLUMSCAN 5.0\r\n#define HILUMSCAN 10.0\r\n#define BRIGHTBOOST 1.25\r\n#define MASK_DARK 0.25\r\n#define MASK_FADE 0.8\r\n#endif\r\n\r\nvoid main()\r\n{\r\n    gl_Position = MVPMatrix * VertexCoord;\r\n\t\r\n\tTEX0.xy = (TexCoord.xy);\r\n\tmaskFade = 0.3333*MASK_FADE;\r\n\tinvDims = 1.0/TextureSize.xy;\r\n}\r\n\r\n#elif defined(FRAGMENT)\r\n\r\n#ifdef GL_ES\r\n#ifdef GL_FRAGMENT_PRECISION_HIGH\r\nprecision highp float;\r\n#else\r\nprecision mediump float;\r\n#endif\r\n#define COMPAT_PRECISION mediump\r\n#else\r\n#define COMPAT_PRECISION\r\n#endif\r\n\r\n#if __VERSION__ >= 130\r\n#define COMPAT_VARYING in\r\n#define COMPAT_TEXTURE texture\r\nout COMPAT_PRECISION vec4 FragColor;\r\n#else\r\n#define COMPAT_VARYING varying\r\n#define FragColor gl_FragColor\r\n#define COMPAT_TEXTURE texture2D\r\n#endif\r\n\r\nuniform COMPAT_PRECISION int FrameDirection;\r\nuniform COMPAT_PRECISION int FrameCount;\r\nuniform COMPAT_PRECISION vec2 OutputSize;\r\nuniform COMPAT_PRECISION vec2 TextureSize;\r\nuniform COMPAT_PRECISION vec2 InputSize;\r\nuniform sampler2D Texture;\r\nCOMPAT_VARYING vec4 TEX0;\r\nCOMPAT_VARYING float maskFade;\r\nCOMPAT_VARYING vec2 invDims;\r\n\r\n// compatibility #defines\r\n#define Source Texture\r\n#define vTexCoord TEX0.xy\r\n#define texture(c, d) COMPAT_TEXTURE(c, d)\r\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\r\n#define OutSize vec4(OutputSize, 1.0 / OutputSize)\r\n\r\n#ifdef PARAMETER_UNIFORM\r\n// All parameter floats need to have COMPAT_PRECISION in front of them\r\nuniform COMPAT_PRECISION float BLURSCALEX;\r\n//uniform COMPAT_PRECISION float BLURSCALEY;\r\nuniform COMPAT_PRECISION float LOWLUMSCAN;\r\nuniform COMPAT_PRECISION float HILUMSCAN;\r\nuniform COMPAT_PRECISION float BRIGHTBOOST;\r\nuniform COMPAT_PRECISION float MASK_DARK;\r\nuniform COMPAT_PRECISION float MASK_FADE;\r\n#else\r\n#define BLURSCALEX 0.45\r\n//#define BLURSCALEY 0.20\r\n#define LOWLUMSCAN 5.0\r\n#define HILUMSCAN 10.0\r\n#define BRIGHTBOOST 1.25\r\n#define MASK_DARK 0.25\r\n#define MASK_FADE 0.8\r\n#endif\r\n\r\nvoid main()\r\n{\r\n\r\n\t//This is just like \"Quilez Scaling\" but sharper\r\n\tCOMPAT_PRECISION vec2 p = vTexCoord * TextureSize;\r\n\tCOMPAT_PRECISION vec2 i = floor(p) + 0.50;\r\n\tCOMPAT_PRECISION vec2 f = p - i;\r\n\tp = (i + 4.0*f*f*f)*invDims;\r\n\tp.x = mix( p.x , vTexCoord.x, BLURSCALEX);\r\n\tCOMPAT_PRECISION float Y = f.y*f.y;\r\n\tCOMPAT_PRECISION float YY = Y*Y;\r\n\t\r\n#if defined(FINEMASK) \r\n\tCOMPAT_PRECISION float whichmask = fract( gl_FragCoord.x*-0.4999);\r\n\tCOMPAT_PRECISION float mask = 1.0 + float(whichmask < 0.5) * -MASK_DARK;\r\n#else\r\n\tCOMPAT_PRECISION float whichmask = fract(gl_FragCoord.x * -0.3333);\r\n\tCOMPAT_PRECISION float mask = 1.0 + float(whichmask <= 0.33333) * -MASK_DARK;\r\n#endif\r\n\tCOMPAT_PRECISION vec3 colour = COMPAT_TEXTURE(Source, p).rgb;\r\n\t\r\n\tCOMPAT_PRECISION float scanLineWeight = (BRIGHTBOOST - LOWLUMSCAN*(Y - 2.05*YY));\r\n\tCOMPAT_PRECISION float scanLineWeightB = 1.0 - HILUMSCAN*(YY-2.8*YY*Y);\t\r\n\t\r\n#if defined(BLACK_OUT_BORDER)\r\n\tcolour.rgb*=float(tc.x > 0.0)*float(tc.y > 0.0); //why doesn't the driver do the right thing?\r\n#endif\r\n\r\n\tFragColor.rgb = colour.rgb*mix(scanLineWeight*mask, scanLineWeightB, dot(colour.rgb,vec3(maskFade)));\r\n\t\r\n} \r\n#endif"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/crt/zfast-crt.glslp",
    "content": "shaders = 1\n\nshader0 = shaders/zfast_crt.glsl\nfilter_linear0 = true"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/kurg/kurg-ROPi-scanlines-3x.glsl",
    "content": "#if defined(VERTEX)\n\n\nattribute vec4 VertexCoord;\nattribute vec4 TexCoord;\nvarying vec4 TEX0;\nuniform mat4 MVPMatrix;\n\nvoid main() {\n  gl_Position = VertexCoord.x*MVPMatrix[0] + VertexCoord.y*MVPMatrix[1] + VertexCoord.z*MVPMatrix[2] + VertexCoord.w*MVPMatrix[3];\n  TEX0.xy = TexCoord.xy;\n} \n\n\n#elif defined(FRAGMENT)\n\n\nprecision mediump float;\n\nuniform sampler2D Texture;\nvarying vec4 TEX0;\nuniform vec2 TextureSize;\n\nvoid main() {\n\n  vec3 col;\n  float x = TEX0.x * TextureSize.x;\n  float y = floor(gl_FragCoord.y / 3.0) + 0.5;\n  float ymod = mod(gl_FragCoord.y, 3.0);\n  vec2 f0 = vec2(x, y);\n  vec2 uv0 = f0 / TextureSize.xy;\n  vec3 t0 = texture2D(Texture, uv0).xyz;\n  if (ymod > 2.0) {\n    vec2 f1 = vec2(x, y + 1.0);\n    vec2 uv1 = f1 / TextureSize.xy;\n    vec3 t1 = texture2D(Texture, uv1).xyz;\n    col = (t0 + t1) / 2.0 * 0.6;\n  } else {\n    col = t0;\n  } \n\n  gl_FragColor = vec4( col, 1.0 );\n\n}\n\n\n#endif\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/kurg/kurg-ROPi-scanlines-3x.glslp",
    "content": "shaders = 1\nshader0 = kurg-ROPi-scanlines-3x.glsl\n\nfilter_linear0 = true\n\nscale_type_x0 = \"viewport\"\nscale_x0 = \"1.000000\"\nscale_type_y0 = \"viewport\"\nscale_y0 = \"1.000000\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/kurg/kurg-ROPi-scanlines-3x_v2.glsl",
    "content": "#if defined(VERTEX)\n\n\nattribute vec4 VertexCoord;\nattribute vec4 TexCoord;\nvarying vec4 TEX0;\nuniform mat4 MVPMatrix;\n\nvoid main() {\n  gl_Position = MVPMatrix * VertexCoord;\n  TEX0.xy = TexCoord.xy;\n}\n\n\n#elif defined(FRAGMENT)\n\n\nprecision mediump float;\n\nuniform sampler2D Texture;\nvarying vec4 TEX0;\nuniform vec2 TextureSize;\nuniform vec2 InputSize;\n\nvoid main() {\n  vec3 col;\n  if (InputSize.y > 220.0 && InputSize.y < 242.0) {\n    float x = TEX0.x;\n    float y = TEX0.y + (0.25 / TextureSize.y);\n    col = texture2D(Texture, vec2(x, y)).xyz;\n      float texel_y = TEX0.y * TextureSize.y * 3.0;\n    float ymod = mod(texel_y, 3.0);\n    if (ymod >= 1.5) {\n      col = col * 0.6;\n    }\n  } else {\n    col = texture2D(Texture, TEX0.xy).xyz;\n  }\n\n  gl_FragColor = vec4( col, 1.0 );\n\n}\n\n\n#endif\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/kurg/kurg-ROPi-scanlines-3x_v2.glslp",
    "content": "shaders = 1\nshader0 = kurg-ROPi-scanlines-3x_v2.glsl\n\nfilter_linear0 = true\n\nscale_type_x0 = \"viewport\"\nscale_x0 = \"1.000000\"\nscale_type_y0 = \"viewport\"\nscale_y0 = \"1.000000\"\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/kurg/kurg_scanlines_source.glsl",
    "content": "#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING out\n#define COMPAT_ATTRIBUTE in\n#define COMPAT_TEXTURE texture\n#else\n#define COMPAT_VARYING varying \n#define COMPAT_ATTRIBUTE attribute \n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\nCOMPAT_VARYING     float _frame_rotation;\n\nstruct input_dummy {\n    vec2 _video_size;\n    vec2 _texture_size;\n    vec2 _output_dummy_size;\n    float _frame_count;\n    float _frame_direction;\n    float _frame_rotation;\n};\n\nCOMPAT_ATTRIBUTE vec4 VertexCoord;\nCOMPAT_ATTRIBUTE vec4 COLOR;\nCOMPAT_VARYING vec4 COL0;\nCOMPAT_ATTRIBUTE vec4 TexCoord;\nCOMPAT_VARYING vec4 TEX0;\n \nuniform mat4 MVPMatrix;\nuniform int FrameDirection;\nuniform int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\n\nvoid main() {\n  gl_Position = VertexCoord.x*MVPMatrix[0] + VertexCoord.y*MVPMatrix[1] + VertexCoord.z*MVPMatrix[2] + VertexCoord.w*MVPMatrix[3];\n  TEX0.xy = TexCoord.xy;\n} \n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING in\n#define COMPAT_TEXTURE texture\nout vec4 FragColor;\n#else\n#define COMPAT_VARYING varying\n#define FragColor gl_FragColor\n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\nCOMPAT_VARYING     float _frame_rotation;\n\nstruct input_dummy {\n    vec2 _video_size;\n    vec2 _texture_size;\n    vec2 _output_dummy_size;\n    float _frame_count;\n    float _frame_direction;\n    float _frame_rotation;\n};\n\nfloat _TMP2;\nfloat _TMP1;\nuniform sampler2D Texture;\ninput_dummy _IN1;\nCOMPAT_VARYING vec4 TEX0;\n \nuniform int FrameDirection;\nuniform int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\n\nvoid main() {\n  vec4 _res;\n\n  _res = COMPAT_TEXTURE(Texture, TEX0.xy);\n\n  _TMP1 = TEX0.y*TextureSize.y;\n  _TMP2 = fract(_TMP1);\n  if (_TMP2 < 0.5) { \n    FragColor = _res;\n  } else {\n    //FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n    FragColor = _res * 0.5;\n    //FragColor = _res * 0.8;\n  }\n\n\n}\n\n\n#endif\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/kurg/kurg_scanlines_source_nearest.glslp",
    "content": "shaders = 1\nshader0 = kurg_scanlines_source.glsl\n\nfilter_linear0 = false\n#filter_linear0 = true\n\nscale_type_x0 = \"source\"\nscale_x0 = \"1.000000\"\nscale_type_y0 = \"source\"\nscale_y0 = \"3.000000\"\n\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/sharp/shaders/sharp-bilinear-scanlines.glsl",
    "content": "/*\n   Author: rsn8887 (based on TheMaister)\n   License: Public domain\n\n   This is an integer prescale filter that should be combined\n   with a bilinear hardware filtering (GL_BILINEAR filter or some such) to achieve\n   a smooth scaling result with minimum blur. This is good for pixelgraphics\n   that are scaled by non-integer factors.\n   \n   The prescale factor and texel coordinates are precalculated\n   in the vertex shader for speed.\n*/\n\n// Parameter lines go here:\n#pragma parameter SCANLINE_BASE_BRIGHTNESS \"Scanline Base Brightness\" 0.60 0.0 1.0 0.01\n#pragma parameter SCANLINE_HORIZONTAL_MODULATION \"Scanline Horizontal Modulation\" 0.0 0.0 2.00 0.01\n#pragma parameter SCANLINE_VERTICAL_MODULATION \"Scanline Vertical Modulation\" 0.75 0.0 2.0 0.01\n\n#define pi 3.141592654\n\n#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING out\n#define COMPAT_ATTRIBUTE in\n#define COMPAT_TEXTURE texture\n#else\n#define COMPAT_VARYING varying \n#define COMPAT_ATTRIBUTE attribute \n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nCOMPAT_ATTRIBUTE vec4 VertexCoord;\nCOMPAT_ATTRIBUTE vec4 COLOR;\nCOMPAT_ATTRIBUTE vec4 TexCoord;\nCOMPAT_VARYING vec4 COL0;\nCOMPAT_VARYING vec4 TEX0;\nCOMPAT_VARYING vec2 omega;\n\nuniform mat4 MVPMatrix;\nuniform int FrameDirection;\nuniform int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\n\n// vertex compatibility #defines\n#define vTexCoord TEX0.xy\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define outsize vec4(OutputSize, 1.0 / OutputSize)\n\nCOMPAT_VARYING vec2 precalc_texel;\nCOMPAT_VARYING vec2 precalc_scale;\n\nvoid main()\n{\n    gl_Position = MVPMatrix * VertexCoord;\n    COL0 = COLOR;\n    TEX0.xy = TexCoord.xy;\n    omega = vec2(pi * OutputSize.x, 2.0 * pi * TextureSize.y);\n\n    precalc_texel = vTexCoord * SourceSize.xy;\n    precalc_scale = max(floor(outsize.xy / InputSize.xy), vec2(1.0, 1.0));\n}\n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING in\n#define COMPAT_TEXTURE texture\nout vec4 FragColor;\n#else\n#define COMPAT_VARYING varying\n#define FragColor gl_FragColor\n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nuniform int FrameDirection;\nuniform int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\nuniform sampler2D Texture;\nCOMPAT_VARYING vec4 TEX0;\nCOMPAT_VARYING vec2 omega;\n\n// fragment compatibility #defines\n#define Source Texture\n#define vTexCoord TEX0.xy\n#define texture(c, d) COMPAT_TEXTURE(c, d)\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define outsize vec4(OutputSize, 1.0 / OutputSize)\n\n#ifdef PARAMETER_UNIFORM\n// All parameter floats need to have COMPAT_PRECISION in front of them\nuniform COMPAT_PRECISION float SCANLINE_BASE_BRIGHTNESS;\nuniform COMPAT_PRECISION float SCANLINE_HORIZONTAL_MODULATION;\nuniform COMPAT_PRECISION float SCANLINE_VERTICAL_MODULATION;\n#else\n#define SCANLINE_BASE_BRIGHTNESS 0.60\n#define SCANLINE_HORIZONTAL_MODULATION 0.0\n#define SCANLINE_VERTICAL_MODULATION 0.75\n#endif\n\nCOMPAT_VARYING vec2 precalc_texel;\nCOMPAT_VARYING vec2 precalc_scale;\n\nvoid main()\n{\n   vec2 texel = precalc_texel;\n   vec2 scale = precalc_scale;\n\n   vec2 texel_floored = floor(texel);\n   vec2 s = fract(texel);\n   vec2 region_range = 0.5 - 0.5 / scale;\n\n   // Figure out where in the texel to sample to get correct pre-scaled bilinear.\n   // Uses the hardware bilinear interpolator to avoid having to sample 4 times manually.\n\n   vec2 center_dist = s - 0.5;\n   vec2 f = (center_dist - clamp(center_dist, -region_range, region_range)) * scale + 0.5;\n\n   vec2 mod_texel = texel_floored + f;\n\n   vec3 res = texture(Source, mod_texel / SourceSize.xy).xyz;\n\n   // thick scanlines (thickness pre-calculated in vertex shader based on source resolution)\n   vec2 sine_comp = vec2(SCANLINE_HORIZONTAL_MODULATION, SCANLINE_VERTICAL_MODULATION);\n\n   vec3 scanline = res * (SCANLINE_BASE_BRIGHTNESS + dot(sine_comp * sin(vTexCoord * omega), vec2(1.0, 1.0)));\n   FragColor = vec4(scanline.rgb, 1.0);\n} \n#endif\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/sharp/shaders/sharp-bilinear-simple.glsl",
    "content": "/*\n   Author: rsn8887 (based on TheMaister)\n   License: Public domain\n\n   This is an integer prescale filter that should be combined\n   with a bilinear hardware filtering (GL_BILINEAR filter or some such) to achieve\n   a smooth scaling result with minimum blur. This is good for pixelgraphics\n   that are scaled by non-integer factors.\n   \n   The prescale factor and texel coordinates are precalculated\n   in the vertex shader for speed.\n*/\n\n#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING out\n#define COMPAT_ATTRIBUTE in\n#define COMPAT_TEXTURE texture\n#else\n#define COMPAT_VARYING varying \n#define COMPAT_ATTRIBUTE attribute \n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nCOMPAT_ATTRIBUTE vec4 VertexCoord;\nCOMPAT_ATTRIBUTE vec4 COLOR;\nCOMPAT_ATTRIBUTE vec4 TexCoord;\nCOMPAT_VARYING vec4 COL0;\nCOMPAT_VARYING vec4 TEX0;\n\nuniform mat4 MVPMatrix;\nuniform int FrameDirection;\nuniform int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\n\n// vertex compatibility #defines\n#define vTexCoord TEX0.xy\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define outsize vec4(OutputSize, 1.0 / OutputSize)\n\nCOMPAT_VARYING vec2 precalc_texel;\nCOMPAT_VARYING vec2 precalc_scale;\n\nvoid main()\n{\n    gl_Position = MVPMatrix * VertexCoord;\n    COL0 = COLOR;\n    TEX0.xy = TexCoord.xy;\n\n    precalc_texel = vTexCoord * SourceSize.xy;\n    precalc_scale = max(floor(outsize.xy / InputSize.xy), vec2(1.0, 1.0));\n}\n\n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING in\n#define COMPAT_TEXTURE texture\nout vec4 FragColor;\n#else\n#define COMPAT_VARYING varying\n#define FragColor gl_FragColor\n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\n\nuniform int FrameDirection;\nuniform int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\nuniform sampler2D Texture;\nCOMPAT_VARYING vec4 TEX0;\n\n// fragment compatibility #defines\n#define Source Texture\n#define vTexCoord TEX0.xy\n#define texture(c, d) COMPAT_TEXTURE(c, d)\n#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize\n#define outsize vec4(OutputSize, 1.0 / OutputSize)\n\nCOMPAT_VARYING vec2 precalc_texel;\nCOMPAT_VARYING vec2 precalc_scale;\n\nvoid main()\n{\n   vec2 texel = precalc_texel;\n   vec2 scale = precalc_scale;\n\n   vec2 texel_floored = floor(texel);\n   vec2 s = fract(texel);\n   vec2 region_range = 0.5 - 0.5 / scale;\n\n   // Figure out where in the texel to sample to get correct pre-scaled bilinear.\n   // Uses the hardware bilinear interpolator to avoid having to sample 4 times manually.\n\n   vec2 center_dist = s - 0.5;\n   vec2 f = (center_dist - clamp(center_dist, -region_range, region_range)) * scale + 0.5;\n\n   vec2 mod_texel = texel_floored + f;\n\n   FragColor = vec4(texture(Source, mod_texel / SourceSize.xy).rgb, 1.0);\n} \n#endif\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/sharp/shaders/stock.glsl",
    "content": "// GLSL shader autogenerated by cg2glsl.py.\n#if defined(VERTEX)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING out\n#define COMPAT_ATTRIBUTE in\n#define COMPAT_TEXTURE texture\n#else\n#define COMPAT_VARYING varying\n#define COMPAT_ATTRIBUTE attribute\n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\nCOMPAT_VARYING     float _frame_rotation;\nCOMPAT_VARYING     vec4 _color1;\nstruct output_dummy {\n    vec4 _color1;\n};\nstruct input_dummy {\n    vec2 _video_size;\n    vec2 _texture_size;\n    vec2 _output_dummy_size;\n    float _frame_count;\n    float _frame_direction;\n    float _frame_rotation;\n};\nvec4 _oPosition1;\nvec4 _r0005;\nCOMPAT_ATTRIBUTE vec4 VertexCoord;\nCOMPAT_ATTRIBUTE vec4 COLOR;\nCOMPAT_ATTRIBUTE vec4 TexCoord;\nCOMPAT_VARYING vec4 COL0;\nCOMPAT_VARYING vec4 TEX0;\n \nuniform mat4 MVPMatrix;\nuniform int FrameDirection;\nuniform int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\nvoid main()\n{\n    vec4 _oColor;\n    vec2 _otexCoord;\n    _r0005 = VertexCoord.x*MVPMatrix[0];\n    _r0005 = _r0005 + VertexCoord.y*MVPMatrix[1];\n    _r0005 = _r0005 + VertexCoord.z*MVPMatrix[2];\n    _r0005 = _r0005 + VertexCoord.w*MVPMatrix[3];\n    _oPosition1 = _r0005;\n    _oColor = COLOR;\n    _otexCoord = TexCoord.xy;\n    gl_Position = _r0005;\n    COL0 = COLOR;\n    TEX0.xy = TexCoord.xy;\n} \n#elif defined(FRAGMENT)\n\n#if __VERSION__ >= 130\n#define COMPAT_VARYING in\n#define COMPAT_TEXTURE texture\nout vec4 FragColor;\n#else\n#define COMPAT_VARYING varying\n#define FragColor gl_FragColor\n#define COMPAT_TEXTURE texture2D\n#endif\n\n#ifdef GL_ES\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define COMPAT_PRECISION mediump\n#else\n#define COMPAT_PRECISION\n#endif\nCOMPAT_VARYING     float _frame_rotation;\nCOMPAT_VARYING     vec4 _color;\nstruct output_dummy {\n    vec4 _color;\n};\nstruct input_dummy {\n    vec2 _video_size;\n    vec2 _texture_size;\n    vec2 _output_dummy_size;\n    float _frame_count;\n    float _frame_direction;\n    float _frame_rotation;\n};\nuniform sampler2D Texture;\nCOMPAT_VARYING vec4 TEX0;\n \nuniform int FrameDirection;\nuniform int FrameCount;\nuniform COMPAT_PRECISION vec2 OutputSize;\nuniform COMPAT_PRECISION vec2 TextureSize;\nuniform COMPAT_PRECISION vec2 InputSize;\nvoid main()\n{\n    output_dummy _OUT;\n    _OUT._color = COMPAT_TEXTURE(Texture, TEX0.xy);\n    FragColor = _OUT._color;\n    return;\n} \n#endif\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/sharp/sharp-bilinear-2x-prescale.glslp",
    "content": "shaders = 2\nshader0 = shaders/stock.glsl\nfilter_linear0 = false\nscale_type0 = source\nscale0 = 2.0\nshader1 = shaders/stock.glsl\nfilter_linear1 = true"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/sharp/sharp-bilinear-scanlines.glslp",
    "content": "shaders = 1\n\nshader0 = shaders/sharp-bilinear-scanlines.glsl\nfilter_linear0 = true\n"
  },
  {
    "path": "packages/sx05re/emuelec/shaders/sharp/sharp-bilinear-simple.glslp",
    "content": "shaders = 1\n\nshader0 = shaders/sharp-bilinear-simple.glsl\nfilter_linear0 = true"
  },
  {
    "path": "packages/sx05re/emuelec/system.d/emuelec-autostart.service",
    "content": "[Unit]\nDescription=emuelec user autostart script\nBefore=emulationstation.service\nAfter=graphical.target\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStart=-/bin/bash -c \". /etc/profile; exec /bin/bash /usr/bin/emuelec_autostart.sh\"\nRemainAfterExit=yes\n\n[Install]\nWantedBy=emuelec.target\n"
  },
  {
    "path": "packages/sx05re/emuelec/system.d/emuelec-disable_small_cores.service",
    "content": "[Unit]\nDescription=emuelec disable small cores service\nBefore=emulationstation.service\nAfter=graphical.target\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/emuelec-utils small-cores disable\nRemainAfterExit=true\nExecStop=/usr/bin/emuelec-utils small-cores enable\n\n[Install]\nWantedBy=emuelec.target\n"
  },
  {
    "path": "packages/sx05re/emuelec/system.d/emuelec-reboot.service",
    "content": "[Unit]\nDescription=EmuELEC reboot script\nAfter=emustation.service\nBefore=systemd-reboot.service\nDefaultDependencies=no\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStart=-/bin/sh -c \". /etc/profile; exec /bin/sh /storage/.config/shutdown.sh reboot\"\nRemainAfterExit=yes\n\n[Install]\nWantedBy=reboot.target\n"
  },
  {
    "path": "packages/sx05re/emuelec/system.d/emuelec-shutdown.service",
    "content": "[Unit]\nDescription=EmuELEC poweroff script\nAfter=emustation.service\nBefore=systemd-poweroff.service\nDefaultDependencies=no\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStart=-/bin/sh -c \". /etc/profile; exec /bin/sh /storage/.config/shutdown.sh poweroff\"\nRemainAfterExit=yes\n\n[Install]\nWantedBy=poweroff.target\n"
  },
  {
    "path": "packages/sx05re/emuelec/system.d/emuelec.target",
    "content": "[Unit]\nDescription=emuelec\nRequires=multi-user.target graphical.target\nAfter=graphical.target\n#Requires=basic.target\n#After=basic.target\nConflicts=rescue.target\nAllowIsolate=yes\n\n[Install]\nAlias=default.target\n"
  },
  {
    "path": "packages/sx05re/emuelec/tmpfiles.d/emuelec-dirs.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nd    /storage/roms/3do                  0777 root root - -\nd    /storage/roms/BGM                  0777 root root - -\nd    /storage/roms/amiga                0777 root root - -\nd    /storage/roms/amigacd32            0777 root root - -\nd    /storage/roms/amstradcpc           0777 root root - -\nd    /storage/roms/amstradgx4000        0777 root root - -\nd    /storage/roms/apple                0777 root root - -\nd    /storage/roms/arcade               0777 root root - -\nd    /storage/roms/atari2600            0777 root root - -\nd    /storage/roms/atari5200            0777 root root - -\nd    /storage/roms/atari7800            0777 root root - -\nd    /storage/roms/atari800             0777 root root - -\nd    /storage/roms/atarilynx            0777 root root - -\nd    /storage/roms/atarijaguar          0777 root root - -\nd    /storage/roms/atarist              0777 root root - -\nd    /storage/roms/atomiswave           0777 root root - -\nd    /storage/roms/bezels               0777 root root - -\nd    /storage/roms/bios                 0777 root root - -\nd    /storage/roms/bios/dc/textures     0777 root root - -\nd    /storage/roms/bios/dc/texdump      0777 root root - -\nd    /storage/roms/bios/dc/data         0777 root root - -\nd    /storage/roms/bios/mame            0777 root root - -\nd    /storage/roms/c128                 0777 root root - -\nd    /storage/roms/c16                  0777 root root - -\nd    /storage/roms/c64                  0777 root root - -\nd    /storage/roms/capcom               0777 root root - -\nd    /storage/roms/capcom               0777 root root - -\nd    /storage/roms/coleco               0777 root root - -\nd    /storage/roms/cps1                 0777 root root - -\nd    /storage/roms/cps2                 0777 root root - -\nd    /storage/roms/cps3                 0777 root root - -\nd    /storage/roms/daphne               0777 root root - -\nd    /storage/roms/daphne/roms          0777 root root - -\nd    /storage/roms/daphne/sound         0777 root root - -\nd    /storage/roms/downloads            0777 root root - -\nd    /storage/roms/dreamcast            0777 root root - -\nd    /storage/roms/easyrpg              0777 root root - -\nd    /storage/roms/famicom              0777 root root - -\nd    /storage/roms/fbneo                0777 root root - -\nd    /storage/roms/fbneo/coleco         0777 root root - -\nd    /storage/roms/fbneo/chf            0777 root root - -\nd    /storage/roms/fbneo/gamegear       0777 root root - -\nd    /storage/roms/fbneo/fds            0777 root root - -\nd    /storage/roms/fbneo/megadriv       0777 root root - -\nd    /storage/roms/fbneo/megadrive      0777 root root - -\nd    /storage/roms/fbneo/genesis        0777 root root - -\nd    /storage/roms/fbneo/neocd          0777 root root - -\nd    /storage/roms/fbneo/negp           0777 root root - -\nd    /storage/roms/fbneo/nes            0777 root root - -\nd    /storage/roms/fbneo/msx            0777 root root - -\nd    /storage/roms/fbneo/pce            0777 root root - -\nd    /storage/roms/fbneo/sg1000         0777 root root - -\nd    /storage/roms/fbneo/spectrum       0777 root root - -\nd    /storage/roms/fbneo/sgx            0777 root root - -\nd    /storage/roms/fbneo/sms            0777 root root - -\nd    /storage/roms/fbneo/tg16           0777 root root - -\nd    /storage/roms/fds                  0777 root root - -\nd    /storage/roms/fmtownsux            0777 root root - -\nd    /storage/roms/freej2me             0777 root root - -\nd    /storage/roms/gameandwatch         0777 root root - -\nd    /storage/roms/gamegear             0777 root root - -\nd    /storage/roms/gamegearh            0777 root root - -\nd    /storage/roms/gb                   0777 root root - -\nd    /storage/roms/gba                  0777 root root - -\nd    /storage/roms/gbah                 0777 root root - -\nd    /storage/roms/gbc                  0777 root root - -\nd    /storage/roms/gbch                 0777 root root - -\nd    /storage/roms/gbh                  0777 root root - -\nd    /storage/roms/genesis              0777 root root - -\nd    /storage/roms/genh                 0777 root root - -\nd    /storage/roms/gw                   0777 root root - -\nd    /storage/roms/intellivision        0777 root root - -\nd    /storage/roms/mame                 0777 root root - -\nd    /storage/roms/mastersystem         0777 root root - -\nd    /storage/roms/megadrive            0777 root root - -\nd    /storage/roms/megadrive-japan      0777 root root - -\nd    /storage/roms/megaduck             0777 root root - -\nd    /storage/roms/mplayer              0777 root root - -\nd    /storage/roms/mplayer/retroarch    0777 root root - -\nd    /storage/roms/msx                  0777 root root - -\nd    /storage/roms/msx2                 0777 root root - -\nd    /storage/roms/n64                  0777 root root - -\nd    /storage/roms/naomi                0777 root root - -\nd    /storage/roms/nds                  0777 root root - -\nd    /storage/roms/neocd                0777 root root - -\nd    /storage/roms/neogeo               0777 root root - -\nd    /storage/roms/nes                  0777 root root - -\nd    /storage/roms/nesh                 0777 root root - -\nd    /storage/roms/ngp                  0777 root root - -\nd    /storage/roms/ngpc                 0777 root root - -\nd    /storage/roms/odyssey2             0777 root root - -\nd    /storage/roms/openbor              0777 root root - -\nd    /storage/roms/pc                   0777 root root - -\nd    /storage/roms/pc98                 0777 root root - -\nd    /storage/roms/pcengine             0777 root root - -\nd    /storage/roms/pcenginecd           0777 root root - -\nd    /storage/roms/pcfx                 0777 root root - -\nd    /storage/roms/pgm2                 0777 root root - -\nd    /storage/roms/pico-8               0777 root root - -\nd    /storage/roms/pokemini             0777 root root - -\nd    /storage/roms/ports                0777 root root - -\nd    /storage/roms/ports/ecwolf         0777 root root - -\nd    /storage/roms/ikemen         \t\t0777 root root - -\nd    /storage/roms/psp                  0777 root root - -\nd    /storage/roms/pspminis             0777 root root - -\nd    /storage/roms/psx                  0777 root root - -\nd    /storage/roms/psx/textures         0777 root root - -\nd    /storage/roms/saturn               0777 root root - -\nd    /storage/roms/savestates           0777 root root - -\nd    /storage/roms/sc-3000              0777 root root - -\nd    /storage/roms/screenshots          0777 root root - -\nd    /storage/roms/scummvm              0777 root root - -\nd    /storage/roms/sega32x              0777 root root - -\nd    /storage/roms/segacd               0777 root root - -\nd    /storage/roms/sfc                  0777 root root - -\nd    /storage/roms/sg-1000              0777 root root - -\nd    /storage/roms/supergrafx           0777 root root - -\nd    /storage/roms/snes                 0777 root root - -\nd    /storage/roms/snesh                0777 root root - -\nd    /storage/roms/snesmsu1             0777 root root - -\nd    /storage/roms/megadrivemsu         0777 root root - -\nd    /storage/roms/solarus              0777 root root - -\nd    /storage/roms/splash               0777 root root - -\nd    /storage/roms/supervision          0777 root root - -\nd    /storage/roms/tg16                 0777 root root - -\nd    /storage/roms/tg16cd               0777 root root - -\nd    /storage/roms/tic-80               0777 root root - -\nd    /storage/roms/uzebox               0777 root root - -\nd    /storage/roms/vectrex              0777 root root - -\nd    /storage/roms/vic20                0777 root root - -\nd    /storage/roms/videopac             0777 root root - -\nd    /storage/roms/virtualboy           0777 root root - -\nd    /storage/roms/wonderswan           0777 root root - -\nd    /storage/roms/wonderswancolor      0777 root root - -\nd    /storage/roms/x1                   0777 root root - -\nd    /storage/roms/x68000               0777 root root - -\nd    /storage/roms/zx81                 0777 root root - -\nd    /storage/roms/zxspectrum           0777 root root - -\nd    /tmp/cache\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/config/es_features.cfg",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<features>\n  <emulator name=\"libretro\" features=\"ratio, smooth, shaders, pixel_perfect, decoration, latency_reduction, game_translation, nativevideo, rotation\">\n    <cores>\n      <core name=\"2048\" features=\"netplay, rewind, autosave\" />\n      <core name=\"81\" features=\"netplay, rewind, autosave\" />\n\t  <core name=\"arduous\" features=\"netplay, rewind, autosave\" />\n      <core name=\"atari800\" features=\"netplay, rewind, autosave\" />\n      <core name=\"b2\" features=\"netplay, rewind, autosave\" />\n      <core name=\"bk_libretro\" features=\"netplay, rewind, autosave\" />\n      <core name=\"bluemsx\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"cannonball\" features=\"netplay, rewind, autosave\" />\n      <core name=\"cap32\" features=\"netplay, rewind, autosave\" />\n\t  <core name=\"clownmdemu\" features=\"netplay, rewind, autosave\" />\n      <core name=\"crocods\" features=\"netplay, rewind, autosave\" />\n      <core name=\"daphne\" features=\"netplay, rewind, autosave\" />\n\t  <core name=\"dice\" features=\"netplay, rewind, autosave\" />\n      <core name=\"dinothawr\" features=\"netplay, rewind, autosave\" />\n      <core name=\"dosbox_pure\" features=\"netplay, rewind, autosave\" />\n      <core name=\"dosbox_svn\" features=\"netplay, rewind, autosave\" />\n\t  <core name=\"emuscv\" features=\"netplay, rewind, autosave\" />\n\t  <core name=\"ep128emu\" features=\"netplay, rewind, autosave\" />\n      <core name=\"fbalpha2012\" features=\"netplay, rewind, autosave, vertical\" />\n      <core name=\"fbneo\" features=\"netplay, rewind, autosave, vertical, cheevos\" />\n      <core name=\"fceumm\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"flycast\" features=\"netplay, rewind, autosave, vertical\" />\n\t  <core name=\"freechaf\" features=\"netplay, rewind, autosave\" />\n      <core name=\"freeintv\" features=\"netplay, rewind, autosave\" />\n      <core name=\"fuse\" features=\"netplay, rewind, autosave\" />\n      <core name=\"gambatte\" features=\"colorization, netplay, rewind, autosave, cheevos\" />\n      <core name=\"gearboy\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"gearsystem\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"genesis_plus_gx\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"genesis_plus_gx_wide\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"gme\" features=\"netplay, rewind, autosave\" />\n      <core name=\"gpsp\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"gw\" features=\"netplay, rewind, autosave\" />\n      <core name=\"handy\" features=\"netplay, rewind, autosave, cheevos, vertical\" />\n      <core name=\"hatari\" features=\"netplay, rewind, autosave\" />\n\t  <core name=\"jaxe\" features=\"netplay, rewind, autosave\" />\n\t  <core name=\"jollycv\" features=\"netplay, rewind, autosave\" />\n\t  <core name=\"lowresnx\" features=\"netplay, rewind, autosave\" />\n\t  <core name=\"m2000\" features=\"netplay, rewind, autosave\" />\n      <core name=\"mame\" features=\"netplay, rewind, autosave, cheevos, vertical\" />\n      <core name=\"mame2003_plus\" features=\"netplay, rewind, autosave, vertical\" />\n      <core name=\"mame2010\" features=\"netplay, rewind, autosave, vertical\" />\n      <core name=\"mame2016\" features=\"netplay, rewind, autosave, vertical\" />\n      <core name=\"mednafen_lynx\" features=\"netplay, rewind, autosave, cheevos, vertical\" />\n      <core name=\"mednafen_ngp\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"mednafen_pce_fast\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"mednafen_pcfx\" features=\"netplay, rewind, autosave\" />\n      <core name=\"mednafen_supergrafx\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"mednafen_vb\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"mednafen_wswan\" features=\"netplay, rewind, autosave, cheevos, vertical\" />\n      <core name=\"mesen\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"mesen-s\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"mgba\" features=\"netplay, rewind, autosave, cheevos\" />\n\t  <core name=\"minivmac\" features=\"netplay, rewind, autosave\" />\n      <core name=\"mrboom\" features=\"netplay, rewind, autosave\" />\n\t  <core name=\"mojozork\" features=\"netplay, rewind, autosave\" />\n      <core name=\"mupen64plus_next\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"nekop2\" features=\"netplay, rewind, autosave, midi\" />\n      <core name=\"neocd\" features=\"netplay, rewind, autosave, vertical\" />\n      <core name=\"nestopiaCV\" features=\"netplay, rewind, autosave\" />\n      <core name=\"nestopia\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"np2kai\" features=\"netplay, rewind, autosave, midi\" />\n      <core name=\"nxengine\" features=\"netplay, rewind, autosave\" />\n      <core name=\"o2em\" features=\"netplay, rewind, autosave\" />\n      <core name=\"opera\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"parallel_n64\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"pcsx_rearmed\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"pcsx_rearmed_32b\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"swanstation\" features=\"netplay, rewind, autosave\" />\n      <core name=\"duckstation\" features=\"netplay, rewind, autosave\" />\n      <core name=\"picodrive\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"pokemini\" features=\"netplay, rewind, autosave\" />\n      <core name=\"ppsspp\" features=\"netplay, rewind, autosave\" />\n      <core name=\"prboom\" features=\"netplay, rewind, autosave\" />\n      <core name=\"prosystem\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"puae\" features=\"netplay, rewind, autosave\" />\n      <core name=\"puae2021\" features=\"netplay, rewind, autosave\" />\n      <core name=\"px68k\" features=\"netplay, rewind, autosave, midi\" />\n      <core name=\"quasi88\" features=\"netplay, rewind, autosave\" />\n      <core name=\"quicknes\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"reminiscence\" features=\"netplay, rewind, autosave\" />\n      <core name=\"sameboy\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"scummvm\" features=\"netplay, rewind, autosave\" />\n      <core name=\"snes9x2002\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"snes9x2005_plus\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"snes9x2010\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"snes9x\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"stella\" features=\"netplay, rewind, autosave, cheevos\" />\n\t  <core name=\"mednafen_supafaust\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"tgbdual\" features=\"netplay, rewind, autosave\" />\n\t  <core name=\"theodore\" features=\"netplay, rewind, autosave\" />\n      <core name=\"tyrquake\" features=\"netplay, rewind, autosave\" />\n      <core name=\"uae4arm\" features=\"netplay, rewind, autosave\" />\n      <core name=\"uzem\" features=\"netplay, rewind, autosave\" />\n      <core name=\"vba_next\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"vbam\" features=\"netplay, rewind, autosave, cheevos\" />\n      <core name=\"vecx\" features=\"netplay, rewind, autosave, cheevos, vertical\" />\n      <core name=\"vice_x128\" features=\"netplay, rewind, autosave\" />\n      <core name=\"vice_x64\" features=\"netplay, rewind, autosave\" />\n      <core name=\"vice_xplus4\" features=\"netplay, rewind, autosave\" />\n      <core name=\"vice_xvic\" features=\"netplay, rewind, autosave\" />\n\t  <core name=\"vircon32\" features=\"netplay, rewind, autosave\" />\n      <core name=\"virtualjaguar\" features=\"netplay, rewind, autosave, cheevos\" />\n\t  <core name=\"wasm4\" features=\"netplay, rewind, autosave\" />\n      <core name=\"x1\" features=\"netplay, rewind, autosave\" />\n      <core name=\"xrick\" features=\"netplay, rewind, autosave\" />\n      <core name=\"yabasanshiro\" features=\"netplay, rewind, autosave\" />\n    </cores>\n  </emulator>\n  <emulator name=\"OPENBOR\" features=\"nativevideo, gptokeyb\" />\n  <emulator name=\"flycastsa\" features=\"nativevideo\" />\n  <emulator name=\"flycastsa_dojo\" features=\"nativevideo\" />\n  <emulator name=\"dolphin\" features=\"nativevideo\" />\n  <emulator name=\"AMIBERRY\" features=\"nativevideo\" />\n  <emulator name=\"DOSBOXSDL2\" features=\"nativevideo\" />\n  <emulator name=\"DOSBOX-X\" features=\"nativevideo\" />\n  <emulator name=\"HYPSEUS\" features=\"nativevideo\" />\n  <emulator name=\"PPSSPPSDL\" features=\"nativevideo\" />\n  <emulator name=\"Solarus\" features=\"nativevideo\" />\n  <emulator name=\"ECWolf\" features=\"nativevideo\" />\n  <emulator name=\"gmloader\" features=\"nativevideo\" />\n  <emulator name=\"AdvanceMame\" features=\"nativevideo,joybtnremap\" />\n  <emulator name=\"STELLASA\" features=\"nativevideo\" />\n  <emulator name=\"HATARISA\" features=\"nativevideo\" />\n  <emulator name=\"yabasanshiro\" features=\"nativevideo, hlebios\" />\n  <emulator name=\"Duckstation\" features=\"nativevideo\" />\n  <emulator name=\"FBNEOSA\" features=\"nativevideo\" />\n  <emulator name=\"ports\" features=\"nativevideo, gptokeyb\" />\n  <emulator name=\"SCUMMVMSA\" features=\"nativevideo\" />\n  <emulator name=\"retrorun\" features=\"nativevideo, rotation\" />\n  <emulator name=\"ikemen\" features=\"nativevideo\" />\n  <emulator name=\"samcoupe\" features=\"nativevideo\" />\n  <emulator name=\"ti99sim\" features=\"nativevideo\" />\n  <emulator name=\"xroar\" features=\"nativevideo\" />\n  <emulator name=\"x16\" features=\"nativevideo\" />\n  <emulator name=\"oricutron\" features=\"nativevideo\" />\n  <emulator name=\"eka2l1\" features=\"nativevideo\" />\n  <emulator name=\"bigpemu\" features=\"nativevideo\" />\n  <emulator name=\"biginstinct\" features=\"nativevideo\" />\n</features>\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/config/es_input.cfg",
    "content": "<?xml version=\"1.0\"?>\n<inputList>\n  <inputAction type=\"onfinish\">\n    <command>bash /storage/.emulationstation/scripts/inputconfiguration.sh</command>\n  </inputAction>\n<inputConfig type=\"joystick\" deviceName=\"Sony PLAYSTATION(R)3 Controller\" deviceGUID=\"030000004c0500006802000011810000\">\n    <input name=\"a\" type=\"button\" id=\"1\" value=\"1\" />\n    <input name=\"b\" type=\"button\" id=\"0\" value=\"1\" />\n    <input name=\"down\" type=\"button\" id=\"14\" value=\"1\" />\n    <input name=\"hotkeyenable\" type=\"button\" id=\"10\" value=\"1\" />\n    <input name=\"left\" type=\"button\" id=\"15\" value=\"1\" />\n    <input name=\"leftanalogdown\" type=\"axis\" id=\"1\" value=\"1\" />\n    <input name=\"leftanalogleft\" type=\"axis\" id=\"0\" value=\"-1\" />\n    <input name=\"leftanalogright\" type=\"axis\" id=\"0\" value=\"1\" />\n    <input name=\"leftanalogup\" type=\"axis\" id=\"1\" value=\"-1\" />\n    <input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\" />\n    <input name=\"leftthumb\" type=\"button\" id=\"11\" value=\"1\" />\n    <input name=\"lefttrigger\" type=\"button\" id=\"6\" value=\"1\" />\n    <input name=\"right\" type=\"button\" id=\"16\" value=\"1\" />\n    <input name=\"rightanalogdown\" type=\"axis\" id=\"4\" value=\"1\" />\n    <input name=\"rightanalogleft\" type=\"axis\" id=\"3\" value=\"-1\" />\n    <input name=\"rightanalogright\" type=\"axis\" id=\"3\" value=\"1\" />\n    <input name=\"rightanalogup\" type=\"axis\" id=\"4\" value=\"-1\" />\n    <input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\" />\n    <input name=\"rightthumb\" type=\"button\" id=\"12\" value=\"1\" />\n    <input name=\"righttrigger\" type=\"button\" id=\"7\" value=\"1\" />\n    <input name=\"select\" type=\"button\" id=\"8\" value=\"1\" />\n    <input name=\"start\" type=\"button\" id=\"9\" value=\"1\" />\n    <input name=\"up\" type=\"button\" id=\"13\" value=\"1\" />\n    <input name=\"x\" type=\"button\" id=\"2\" value=\"1\" />\n    <input name=\"y\" type=\"button\" id=\"3\" value=\"1\" />\n</inputConfig>\n<inputConfig type=\"joystick\" deviceName=\"GZ RX CO.,LTD. RX Gamepad\">\n    <input name=\"start\" type=\"button\" id=\"9\" value=\"1\"/>\n    <input name=\"up\" type=\"hat\" id=\"0\" value=\"1\"/>\n    <input name=\"a\" type=\"button\" id=\"4\" value=\"1\"/>\n    <input name=\"b\" type=\"button\" id=\"0\" value=\"1\"/>\n    <input name=\"hotkeyenable\" type=\"button\" id=\"11\" value=\"1\"/>\n    <input name=\"down\" type=\"hat\" id=\"0\" value=\"4\"/>\n    <input name=\"right\" type=\"hat\" id=\"0\" value=\"2\"/>\n    <input name=\"x\" type=\"button\" id=\"1\" value=\"1\"/>\n    <input name=\"select\" type=\"button\" id=\"10\" value=\"1\"/>\n    <input name=\"y\" type=\"button\" id=\"2\" value=\"1\"/>\n    <input name=\"left\" type=\"hat\" id=\"0\" value=\"8\"/>\n    <input name=\"rightanalogright\" type=\"button\" id=\"9\" value=\"1\"/>\n    <input name=\"lefttrigger\" type=\"button\" id=\"3\" value=\"1\"/>\n    <input name=\"righttrigger\" type=\"button\" id=\"6\" value=\"1\"/>\n  </inputConfig>\n  <inputConfig type=\"joystick\" deviceName=\"Sony Interactive Entertainment Wireless Controller\" deviceGUID=\"030000004c050000cc09000011010000\">\n    <input name=\"rightanalogdown\" type=\"axis\" id=\"5\" value=\"1\"/>\n    <input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\"/>\n    <input name=\"start\" type=\"button\" id=\"9\" value=\"1\"/>\n    <input name=\"leftanalogup\" type=\"axis\" id=\"1\" value=\"-1\"/>\n    <input name=\"up\" type=\"hat\" id=\"0\" value=\"1\"/>\n    <input name=\"a\" type=\"button\" id=\"2\" value=\"1\"/>\n    <input name=\"b\" type=\"button\" id=\"1\" value=\"1\"/>\n    <input name=\"hotkeyenable\" type=\"button\" id=\"12\" value=\"1\"/>\n    <input name=\"down\" type=\"hat\" id=\"0\" value=\"4\"/>\n    <input name=\"leftanalogright\" type=\"axis\" id=\"0\" value=\"1\"/>\n    <input name=\"leftanalogdown\" type=\"axis\" id=\"1\" value=\"1\"/>\n    <input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\"/>\n    <input name=\"righttrigger\" type=\"button\" id=\"7\" value=\"1\"/>\n    <input name=\"right\" type=\"hat\" id=\"0\" value=\"2\"/>\n    <input name=\"x\" type=\"button\" id=\"3\" value=\"1\"/>\n    <input name=\"select\" type=\"button\" id=\"8\" value=\"1\"/>\n    <input name=\"leftanalogleft\" type=\"axis\" id=\"0\" value=\"-1\"/>\n    <input name=\"y\" type=\"button\" id=\"0\" value=\"1\"/>\n    <input name=\"left\" type=\"hat\" id=\"0\" value=\"8\"/>\n    <input name=\"rightanalogright\" type=\"axis\" id=\"2\" value=\"1\"/>\n    <input name=\"lefttrigger\" type=\"button\" id=\"6\" value=\"1\"/>\n    <input name=\"rightanalogleft\" type=\"axis\" id=\"2\" value=\"-1\"/>\n    <input name=\"rightanalogup\" type=\"axis\" id=\"5\" value=\"-1\"/>\n  </inputConfig>\n    <inputConfig type=\"joystick\" deviceName=\"GO-Advance Gamepad\" deviceGUID=\"190000004b4800000010000000010000\">\n    <input name=\"a\" type=\"button\" id=\"1\" value=\"1\"/>\n    <input name=\"b\" type=\"button\" id=\"0\" value=\"1\"/>\n    <input name=\"down\" type=\"button\" id=\"7\" value=\"1\"/>\n    <input name=\"hotkeyenable\" type=\"button\" id=\"10\" value=\"1\"/>\n    <input name=\"left\" type=\"button\" id=\"8\" value=\"1\"/>\n    <input name=\"leftanalogdown\" type=\"axis\" id=\"1\" value=\"1\"/>\n    <input name=\"leftanalogleft\" type=\"axis\" id=\"0\" value=\"-1\"/>\n    <input name=\"leftanalogright\" type=\"axis\" id=\"0\" value=\"1\"/>\n    <input name=\"leftanalogup\" type=\"axis\" id=\"1\" value=\"-1\"/>\n    <input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\"/>\n    <input name=\"leftthumb\" type=\"button\" id=\"12\" value=\"1\"/>\n    <input name=\"lefttrigger\" type=\"button\" id=\"11\" value=\"1\"/>\n    <input name=\"right\" type=\"button\" id=\"9\" value=\"1\"/>\n    <input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\"/>\n    <input name=\"rightthumb\" type=\"button\" id=\"13\" value=\"1\"/>\n    <input name=\"righttrigger\" type=\"button\" id=\"14\" value=\"1\"/>\n    <input name=\"select\" type=\"button\" id=\"10\" value=\"1\"/>\n    <input name=\"start\" type=\"button\" id=\"15\" value=\"1\"/>\n    <input name=\"up\" type=\"button\" id=\"6\" value=\"1\"/>\n    <input name=\"x\" type=\"button\" id=\"2\" value=\"1\"/>\n    <input name=\"y\" type=\"button\" id=\"3\" value=\"1\"/>\n  </inputConfig>\n  <inputConfig type=\"joystick\" deviceName=\"Logitech Gamepad F310\" deviceGUID=\"030000006d0400001dc2000014400000\">\n    <input name=\"a\" type=\"button\" id=\"1\" value=\"1\"/>\n    <input name=\"b\" type=\"button\" id=\"0\" value=\"1\"/>\n    <input name=\"down\" type=\"hat\" id=\"0\" value=\"4\"/>\n    <input name=\"hotkeyenable\" type=\"button\" id=\"8\" value=\"1\"/>\n    <input name=\"left\" type=\"hat\" id=\"0\" value=\"8\"/>\n    <input name=\"leftanalogdown\" type=\"axis\" id=\"1\" value=\"1\"/>\n    <input name=\"leftanalogleft\" type=\"axis\" id=\"0\" value=\"-1\"/>\n    <input name=\"leftanalogright\" type=\"axis\" id=\"0\" value=\"1\"/>\n    <input name=\"leftanalogup\" type=\"axis\" id=\"1\" value=\"-1\"/>\n    <input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\"/>\n    <input name=\"leftthumb\" type=\"button\" id=\"9\" value=\"1\"/>\n    <input name=\"lefttrigger\" type=\"axis\" id=\"2\" value=\"1\"/>\n    <input name=\"right\" type=\"hat\" id=\"0\" value=\"2\"/>\n    <input name=\"rightanalogdown\" type=\"axis\" id=\"4\" value=\"1\"/>\n    <input name=\"rightanalogleft\" type=\"axis\" id=\"3\" value=\"-1\"/>\n    <input name=\"rightanalogright\" type=\"axis\" id=\"3\" value=\"1\"/>\n    <input name=\"rightanalogup\" type=\"axis\" id=\"4\" value=\"-1\"/>\n    <input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\"/>\n    <input name=\"rightthumb\" type=\"button\" id=\"10\" value=\"1\"/>\n    <input name=\"righttrigger\" type=\"axis\" id=\"5\" value=\"1\"/>\n    <input name=\"select\" type=\"button\" id=\"6\" value=\"1\"/>\n    <input name=\"start\" type=\"button\" id=\"7\" value=\"1\"/>\n    <input name=\"up\" type=\"hat\" id=\"0\" value=\"1\"/>\n    <input name=\"x\" type=\"button\" id=\"3\" value=\"1\"/>\n    <input name=\"y\" type=\"button\" id=\"2\" value=\"1\"/>\n  </inputConfig>\n  <inputConfig type=\"joystick\" deviceName=\"GO-Advance Gamepad (rev 1.1)\" deviceGUID=\"190000004b4800000010000001010000\">\n    <input name=\"a\" type=\"button\" id=\"1\" value=\"1\"/>\n    <input name=\"b\" type=\"button\" id=\"0\" value=\"1\"/>\n    <input name=\"down\" type=\"button\" id=\"9\" value=\"1\"/>\n    <input name=\"hotkeyenable\" type=\"button\" id=\"12\" value=\"1\"/>\n    <input name=\"left\" type=\"button\" id=\"10\" value=\"1\"/>\n    <input name=\"leftanalogdown\" type=\"axis\" id=\"1\" value=\"1\"/>\n    <input name=\"leftanalogleft\" type=\"axis\" id=\"0\" value=\"-1\"/>\n    <input name=\"leftanalogright\" type=\"axis\" id=\"0\" value=\"1\"/>\n    <input name=\"leftanalogup\" type=\"axis\" id=\"1\" value=\"-1\"/>\n    <input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\"/>\n    <input name=\"leftthumb\" type=\"button\" id=\"13\" value=\"1\"/>\n    <input name=\"lefttrigger\" type=\"button\" id=\"6\" value=\"1\"/>\n    <input name=\"right\" type=\"button\" id=\"11\" value=\"1\"/>\n    <input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\"/>\n    <input name=\"rightthumb\" type=\"button\" id=\"16\" value=\"1\"/>\n    <input name=\"righttrigger\" type=\"button\" id=\"7\" value=\"1\"/>\n    <input name=\"select\" type=\"button\" id=\"12\" value=\"1\"/>\n    <input name=\"start\" type=\"button\" id=\"17\" value=\"1\"/>\n    <input name=\"up\" type=\"button\" id=\"8\" value=\"1\"/>\n    <input name=\"x\" type=\"button\" id=\"2\" value=\"1\"/>\n    <input name=\"y\" type=\"button\" id=\"3\" value=\"1\"/>\n  </inputConfig>\n  <inputConfig type=\"joystick\" deviceName=\"HORI CO.,LTD. HORIPAD S\" deviceGUID=\"030000000d0f0000c100000011010000\">\n    <input name=\"a\" type=\"button\" id=\"2\" value=\"1\"/>\n    <input name=\"b\" type=\"button\" id=\"1\" value=\"1\"/>\n    <input name=\"down\" type=\"hat\" id=\"0\" value=\"4\"/>\n    <input name=\"hotkeyenable\" type=\"button\" id=\"13\" value=\"1\"/>\n    <input name=\"left\" type=\"hat\" id=\"0\" value=\"8\"/>\n    <input name=\"leftanalogdown\" type=\"axis\" id=\"1\" value=\"1\"/>\n    <input name=\"leftanalogleft\" type=\"axis\" id=\"0\" value=\"-1\"/>\n    <input name=\"leftanalogright\" type=\"axis\" id=\"0\" value=\"1\"/>\n    <input name=\"leftanalogup\" type=\"axis\" id=\"1\" value=\"-1\"/>\n    <input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\"/>\n    <input name=\"leftthumb\" type=\"button\" id=\"10\" value=\"1\"/>\n    <input name=\"lefttrigger\" type=\"button\" id=\"6\" value=\"1\"/>\n    <input name=\"right\" type=\"hat\" id=\"0\" value=\"2\"/>\n    <input name=\"rightanalogdown\" type=\"axis\" id=\"3\" value=\"1\"/>\n    <input name=\"rightanalogleft\" type=\"axis\" id=\"2\" value=\"-1\"/>\n    <input name=\"rightanalogright\" type=\"axis\" id=\"2\" value=\"1\"/>\n    <input name=\"rightanalogup\" type=\"axis\" id=\"3\" value=\"-1\"/>\n    <input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\"/>\n    <input name=\"rightthumb\" type=\"button\" id=\"11\" value=\"1\"/>\n    <input name=\"righttrigger\" type=\"button\" id=\"7\" value=\"1\"/>\n    <input name=\"select\" type=\"button\" id=\"8\" value=\"1\"/>\n    <input name=\"start\" type=\"button\" id=\"9\" value=\"1\"/>\n    <input name=\"up\" type=\"hat\" id=\"0\" value=\"1\"/>\n    <input name=\"x\" type=\"button\" id=\"3\" value=\"1\"/>\n    <input name=\"y\" type=\"button\" id=\"0\" value=\"1\"/>\n  </inputConfig>\n  <inputConfig type=\"joystick\" deviceName=\"gameforce_gamepad\" deviceGUID=\"19000000030000000300000002030000\">\n    <input name=\"a\" type=\"button\" id=\"1\" value=\"1\"/>\n    <input name=\"b\" type=\"button\" id=\"0\" value=\"1\"/>\n    <input name=\"down\" type=\"button\" id=\"11\" value=\"1\"/>\n    <input name=\"hotkeyenable\" type=\"button\" id=\"16\" value=\"1\"/>\n    <input name=\"left\" type=\"button\" id=\"12\" value=\"1\"/>\n    <input name=\"leftanalogdown\" type=\"axis\" id=\"0\" value=\"1\"/>\n    <input name=\"leftanalogleft\" type=\"axis\" id=\"1\" value=\"-1\"/>\n    <input name=\"leftanalogright\" type=\"axis\" id=\"1\" value=\"1\"/>\n    <input name=\"leftanalogup\" type=\"axis\" id=\"0\" value=\"-1\"/>\n    <input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\"/>\n    <input name=\"leftthumb\" type=\"button\" id=\"14\" value=\"1\"/>\n    <input name=\"lefttrigger\" type=\"button\" id=\"6\" value=\"1\"/>\n    <input name=\"right\" type=\"button\" id=\"13\" value=\"1\"/>\n    <input name=\"rightanalogdown\" type=\"axis\" id=\"2\" value=\"1\"/>\n    <input name=\"rightanalogleft\" type=\"axis\" id=\"3\" value=\"-1\"/>\n    <input name=\"rightanalogright\" type=\"axis\" id=\"3\" value=\"1\"/>\n    <input name=\"rightanalogup\" type=\"axis\" id=\"2\" value=\"-1\"/>\n    <input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\"/>\n    <input name=\"rightthumb\" type=\"button\" id=\"15\" value=\"1\"/>\n    <input name=\"righttrigger\" type=\"button\" id=\"7\" value=\"1\"/>\n    <input name=\"select\" type=\"button\" id=\"8\" value=\"1\"/>\n    <input name=\"start\" type=\"button\" id=\"9\" value=\"1\"/>\n    <input name=\"up\" type=\"button\" id=\"10\" value=\"1\"/>\n    <input name=\"x\" type=\"button\" id=\"2\" value=\"1\"/>\n    <input name=\"y\" type=\"button\" id=\"3\" value=\"1\"/>\n  </inputConfig>\n  <inputConfig type=\"joystick\" deviceName=\"GO-Super Gamepad\" deviceGUID=\"190000004b4800000011000000010000\">\n    <input name=\"a\" type=\"button\" id=\"1\" value=\"1\"/>\n    <input name=\"b\" type=\"button\" id=\"0\" value=\"1\"/>\n    <input name=\"down\" type=\"button\" id=\"9\" value=\"1\"/>\n    <input name=\"hotkeyenable\" type=\"button\" id=\"15\" value=\"1\"/>\n    <input name=\"left\" type=\"button\" id=\"10\" value=\"1\"/>\n    <input name=\"leftanalogdown\" type=\"axis\" id=\"1\" value=\"1\"/>\n    <input name=\"leftanalogleft\" type=\"axis\" id=\"0\" value=\"-1\"/>\n    <input name=\"leftanalogright\" type=\"axis\" id=\"0\" value=\"1\"/>\n    <input name=\"leftanalogup\" type=\"axis\" id=\"1\" value=\"-1\"/>\n    <input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\"/>\n    <input name=\"leftthumb\" type=\"button\" id=\"14\" value=\"1\"/>\n    <input name=\"lefttrigger\" type=\"button\" id=\"6\" value=\"1\"/>\n    <input name=\"right\" type=\"button\" id=\"11\" value=\"1\"/>\n    <input name=\"rightanalogdown\" type=\"axis\" id=\"3\" value=\"1\"/>\n    <input name=\"rightanalogleft\" type=\"axis\" id=\"2\" value=\"-1\"/>\n    <input name=\"rightanalogright\" type=\"axis\" id=\"2\" value=\"1\"/>\n    <input name=\"rightanalogup\" type=\"axis\" id=\"3\" value=\"-1\"/>\n    <input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\"/>\n    <input name=\"rightthumb\" type=\"button\" id=\"17\" value=\"1\"/>\n    <input name=\"righttrigger\" type=\"button\" id=\"7\" value=\"1\"/>\n    <input name=\"select\" type=\"button\" id=\"12\" value=\"1\"/>\n    <input name=\"start\" type=\"button\" id=\"13\" value=\"1\"/>\n    <input name=\"up\" type=\"button\" id=\"8\" value=\"1\"/>\n    <input name=\"x\" type=\"button\" id=\"2\" value=\"1\"/>\n    <input name=\"y\" type=\"button\" id=\"3\" value=\"1\"/>\n  </inputConfig>\n  <inputConfig type=\"joystick\" deviceName=\"Microsoft X-Box 360 pad\" deviceGUID=\"030000005e0400008e02000010010000\">\n    <input name=\"a\" type=\"button\" id=\"1\" value=\"1\" />           \n    <input name=\"b\" type=\"button\" id=\"0\" value=\"1\" />           \n    <input name=\"down\" type=\"hat\" id=\"0\" value=\"4\" />            \n    <input name=\"hotkeyenable\" type=\"button\" id=\"8\" value=\"1\" /> \n    <input name=\"left\" type=\"hat\" id=\"0\" value=\"8\" />            \n    <input name=\"leftanalogdown\" type=\"axis\" id=\"1\" value=\"1\" /> \n    <input name=\"leftanalogleft\" type=\"axis\" id=\"0\" value=\"-1\" />\n    <input name=\"leftanalogright\" type=\"axis\" id=\"0\" value=\"1\" />\n    <input name=\"leftanalogup\" type=\"axis\" id=\"1\" value=\"-1\" />  \n    <input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\" />\n    <input name=\"leftthumb\" type=\"button\" id=\"9\" value=\"1\" />    \n    <input name=\"lefttrigger\" type=\"axis\" id=\"2\" value=\"1\" />     \n    <input name=\"right\" type=\"hat\" id=\"0\" value=\"2\" />            \n    <input name=\"rightanalogdown\" type=\"axis\" id=\"4\" value=\"1\" /> \n    <input name=\"rightanalogleft\" type=\"axis\" id=\"3\" value=\"-1\" />\n    <input name=\"rightanalogright\" type=\"axis\" id=\"3\" value=\"1\" />\n    <input name=\"rightanalogup\" type=\"axis\" id=\"4\" value=\"-1\" />  \n    <input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\" />\n    <input name=\"rightthumb\" type=\"button\" id=\"10\" value=\"1\" /> \n    <input name=\"righttrigger\" type=\"axis\" id=\"5\" value=\"1\" />\n    <input name=\"select\" type=\"button\" id=\"6\" value=\"1\" />\n    <input name=\"start\" type=\"button\" id=\"7\" value=\"1\" />\n    <input name=\"up\" type=\"hat\" id=\"0\" value=\"1\" />   \n    <input name=\"x\" type=\"button\" id=\"3\" value=\"1\" /> \n    <input name=\"y\" type=\"button\" id=\"2\" value=\"1\" />\n  </inputConfig> \n  <inputConfig type=\"joystick\" deviceName=\"Google LLC Stadia Controller rev. A\" deviceGUID=\"03000000d11800000094000011010000\">\n    <input name=\"a\" type=\"button\" id=\"1\" value=\"1\" />\n    <input name=\"b\" type=\"button\" id=\"0\" value=\"1\" />\n    <input name=\"down\" type=\"hat\" id=\"0\" value=\"4\" />\n    <input name=\"hotkeyenable\" type=\"button\" id=\"8\" value=\"1\" />\n    <input name=\"left\" type=\"hat\" id=\"0\" value=\"8\" />\n    <input name=\"leftanalogdown\" type=\"axis\" id=\"1\" value=\"1\" />\n    <input name=\"leftanalogleft\" type=\"axis\" id=\"0\" value=\"-1\" />\n    <input name=\"leftanalogright\" type=\"axis\" id=\"0\" value=\"1\" />\n    <input name=\"leftanalogup\" type=\"axis\" id=\"1\" value=\"-1\" />\n    <input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\" />\n    <input name=\"leftthumb\" type=\"button\" id=\"9\" value=\"1\" />\n    <input name=\"lefttrigger\" type=\"button\" id=\"14\" value=\"1\" />\n    <input name=\"right\" type=\"hat\" id=\"0\" value=\"2\" />\n    <input name=\"rightanalogdown\" type=\"axis\" id=\"3\" value=\"1\" />\n    <input name=\"rightanalogleft\" type=\"axis\" id=\"2\" value=\"-1\" />\n    <input name=\"rightanalogright\" type=\"axis\" id=\"2\" value=\"1\" />\n    <input name=\"rightanalogup\" type=\"axis\" id=\"3\" value=\"-1\" />\n    <input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\" />\n    <input name=\"rightthumb\" type=\"button\" id=\"10\" value=\"1\" />\n    <input name=\"righttrigger\" type=\"button\" id=\"13\" value=\"1\" />\n    <input name=\"select\" type=\"button\" id=\"6\" value=\"1\" />\n    <input name=\"start\" type=\"button\" id=\"7\" value=\"1\" />\n    <input name=\"up\" type=\"hat\" id=\"0\" value=\"1\" />\n    <input name=\"x\" type=\"button\" id=\"3\" value=\"1\" />\n    <input name=\"y\" type=\"button\" id=\"2\" value=\"1\" />\n  </inputConfig>\n\t<inputConfig type=\"joystick\" deviceName=\"iNNEXT SNES Retro USB Controller\" deviceGUID=\"03000000790000001100000010010000\">\n\t\t<input name=\"a\" type=\"button\" id=\"1\" value=\"1\" />\n\t\t<input name=\"b\" type=\"button\" id=\"2\" value=\"1\" />\n\t\t<input name=\"down\" type=\"axis\" id=\"1\" value=\"1\" />\n\t\t<input name=\"hotkeyenable\" type=\"button\" id=\"8\" value=\"1\" />\n\t\t<input name=\"left\" type=\"axis\" id=\"0\" value=\"-1\" />\n\t\t<input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\" />\n\t\t<input name=\"right\" type=\"axis\" id=\"0\" value=\"1\" />\n\t\t<input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\" />\n\t\t<input name=\"select\" type=\"button\" id=\"8\" value=\"1\" />\n\t\t<input name=\"start\" type=\"button\" id=\"9\" value=\"1\" />\n\t\t<input name=\"up\" type=\"axis\" id=\"1\" value=\"-1\" />\n\t\t<input name=\"x\" type=\"button\" id=\"0\" value=\"1\" />\n\t\t<input name=\"y\" type=\"button\" id=\"3\" value=\"1\" />\n\t</inputConfig>\n\t<inputConfig type=\"joystick\" deviceName=\"PlayGame PS2-like Controller\" deviceGUID=\"03000000100800000100000010010000\">\n\t\t<input name=\"a\" type=\"button\" id=\"1\" value=\"1\" />\n\t\t<input name=\"b\" type=\"button\" id=\"2\" value=\"1\" />\n\t\t<input name=\"down\" type=\"hat\" id=\"0\" value=\"4\" />\n\t\t<input name=\"hotkeyenable\" type=\"button\" id=\"8\" value=\"1\" />\n\t\t<input name=\"left\" type=\"hat\" id=\"0\" value=\"8\" />\n\t\t<input name=\"leftanalogdown\" type=\"axis\" id=\"1\" value=\"1\" />\n\t\t<input name=\"leftanalogleft\" type=\"axis\" id=\"0\" value=\"-1\" />\n\t\t<input name=\"leftanalogright\" type=\"axis\" id=\"0\" value=\"1\" />\n\t\t<input name=\"leftanalogup\" type=\"axis\" id=\"1\" value=\"-1\" />\n\t\t<input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\" />\n\t\t<input name=\"leftthumb\" type=\"button\" id=\"10\" value=\"1\" />\n\t\t<input name=\"lefttrigger\" type=\"button\" id=\"6\" value=\"1\" />\n\t\t<input name=\"right\" type=\"hat\" id=\"0\" value=\"2\" />\n\t\t<input name=\"rightanalogdown\" type=\"axis\" id=\"2\" value=\"1\" />\n\t\t<input name=\"rightanalogleft\" type=\"axis\" id=\"3\" value=\"-1\" />\n\t\t<input name=\"rightanalogright\" type=\"axis\" id=\"3\" value=\"1\" />\n\t\t<input name=\"rightanalogup\" type=\"axis\" id=\"2\" value=\"-1\" />\n\t\t<input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\" />\n\t\t<input name=\"rightthumb\" type=\"button\" id=\"11\" value=\"1\" />\n\t\t<input name=\"righttrigger\" type=\"button\" id=\"7\" value=\"1\" />\n\t\t<input name=\"select\" type=\"button\" id=\"8\" value=\"1\" />\n\t\t<input name=\"start\" type=\"button\" id=\"9\" value=\"1\" />\n\t\t<input name=\"up\" type=\"hat\" id=\"0\" value=\"1\" />\n\t\t<input name=\"x\" type=\"button\" id=\"0\" value=\"1\" />\n\t\t<input name=\"y\" type=\"button\" id=\"3\" value=\"1\" />\n\t</inputConfig>\n\t<inputConfig type=\"joystick\" deviceName=\"8BitDo SN30 pro\" deviceGUID=\"050000007e0500000920000001000000\">\n\t\t<input name=\"a\" type=\"button\" id=\"1\" value=\"1\" />\n\t\t<input name=\"b\" type=\"button\" id=\"0\" value=\"1\" />\n\t\t<input name=\"down\" type=\"hat\" id=\"0\" value=\"4\" />\n\t\t<input name=\"hotkeyenable\" type=\"button\" id=\"13\" value=\"1\" />\n\t\t<input name=\"left\" type=\"hat\" id=\"0\" value=\"8\" />\n\t\t<input name=\"leftanalogdown\" type=\"axis\" id=\"1\" value=\"1\" />\n\t\t<input name=\"leftanalogleft\" type=\"axis\" id=\"0\" value=\"-1\" />\n\t\t<input name=\"leftanalogright\" type=\"axis\" id=\"0\" value=\"1\" />\n\t\t<input name=\"leftanalogup\" type=\"axis\" id=\"1\" value=\"-1\" />\n\t\t<input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\" />\n\t\t<input name=\"leftthumb\" type=\"button\" id=\"10\" value=\"1\" />\n\t\t<input name=\"lefttrigger\" type=\"button\" id=\"6\" value=\"1\" />\n\t\t<input name=\"right\" type=\"hat\" id=\"0\" value=\"2\" />\n\t\t<input name=\"rightanalogdown\" type=\"axis\" id=\"3\" value=\"1\" />\n\t\t<input name=\"rightanalogleft\" type=\"axis\" id=\"2\" value=\"-1\" />\n\t\t<input name=\"rightanalogright\" type=\"axis\" id=\"2\" value=\"1\" />\n\t\t<input name=\"rightanalogup\" type=\"axis\" id=\"3\" value=\"-1\" />\n\t\t<input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\" />\n\t\t<input name=\"rightthumb\" type=\"button\" id=\"11\" value=\"1\" />\n\t\t<input name=\"righttrigger\" type=\"button\" id=\"7\" value=\"1\" />\n\t\t<input name=\"select\" type=\"button\" id=\"8\" value=\"1\" />\n\t\t<input name=\"start\" type=\"button\" id=\"9\" value=\"1\" />\n\t\t<input name=\"up\" type=\"hat\" id=\"0\" value=\"1\" />\n\t\t<input name=\"x\" type=\"button\" id=\"3\" value=\"1\" />\n\t\t<input name=\"y\" type=\"button\" id=\"2\" value=\"1\" />\n\t</inputConfig>\n\t<inputConfig type=\"joystick\" deviceName=\"Xbox 360 Controller\" deviceGUID=\"030003f05e0400008e02000010010000\">\n\t\t<input name=\"a\" type=\"button\" id=\"1\" value=\"1\" />\n\t\t<input name=\"b\" type=\"button\" id=\"0\" value=\"1\" />\n\t\t<input name=\"down\" type=\"hat\" id=\"0\" value=\"4\" />\n\t\t<input name=\"hotkeyenable\" type=\"button\" id=\"8\" value=\"1\" />\n\t\t<input name=\"left\" type=\"hat\" id=\"0\" value=\"8\" />\n\t\t<input name=\"leftanalogdown\" type=\"axis\" id=\"1\" value=\"1\" />\n\t\t<input name=\"leftanalogleft\" type=\"axis\" id=\"0\" value=\"-1\" />\n\t\t<input name=\"leftanalogright\" type=\"axis\" id=\"0\" value=\"1\" />\n\t\t<input name=\"leftanalogup\" type=\"axis\" id=\"1\" value=\"-1\" />\n\t\t<input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\" />\n\t\t<input name=\"leftthumb\" type=\"button\" id=\"9\" value=\"1\" />\n\t\t<input name=\"lefttrigger\" type=\"axis\" id=\"2\" value=\"1\" />\n\t\t<input name=\"right\" type=\"hat\" id=\"0\" value=\"2\" />\n\t\t<input name=\"rightanalogdown\" type=\"axis\" id=\"4\" value=\"1\" />\n\t\t<input name=\"rightanalogleft\" type=\"axis\" id=\"3\" value=\"-1\" />\n\t\t<input name=\"rightanalogright\" type=\"axis\" id=\"3\" value=\"1\" />\n\t\t<input name=\"rightanalogup\" type=\"axis\" id=\"4\" value=\"-1\" />\n\t\t<input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\" />\n\t\t<input name=\"rightthumb\" type=\"button\" id=\"10\" value=\"1\" />\n\t\t<input name=\"righttrigger\" type=\"axis\" id=\"5\" value=\"1\" />\n\t\t<input name=\"select\" type=\"button\" id=\"6\" value=\"1\" />\n\t\t<input name=\"start\" type=\"button\" id=\"7\" value=\"1\" />\n\t\t<input name=\"up\" type=\"hat\" id=\"0\" value=\"1\" />\n\t\t<input name=\"x\" type=\"button\" id=\"3\" value=\"1\" />\n\t\t<input name=\"y\" type=\"button\" id=\"2\" value=\"1\" />\n\t</inputConfig>\n</inputList>\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/config/es_settings.cfg",
    "content": "<?xml version=\"1.0\"?>\n<config>\n\t<bool name=\"FavoritesFirst\" value=\"true\" />\n\t<bool name=\"ScrapeBezel\" value=\"true\" />\n\t<bool name=\"ScrapeFanart\" value=\"true\" />\n\t<bool name=\"ScrapeManual\" value=\"true\" />\n\t<bool name=\"ScrapeMap\" value=\"true\" />\n\t<bool name=\"ScrapeVideos\" value=\"true\" />\n    <bool name=\"UseCustomCollectionsSystem\" value=\"false\" />\n\t<string name=\"Scraper\" value=\"ScreenScraper\" />\n\t<string name=\"ScrapperImageSrc\" value=\"ss\" />\n\t<string name=\"ScrapperLogoSrc\" value=\"wheel\" />\n\t<string name=\"ScrapperThumbSrc\" value=\"box-2D\" />\n\t<string name=\"SlideshowScreenSaverImageDir\" value=\"/storage/roms/screenshots\" />\n\t<string name=\"SlideshowScreenSaverImageFilter\" value=\".png,.jpg,.pbm\" />\n\t<string name=\"SlideshowScreenSaverVideoDir\" value=\"/storage/roms/mplayer\" />\n\t<string name=\"SlideshowScreenSaverVideoFilter\" value=\".mp4,.avi,.wmv,.flv,.mov,.mpg\" />\n\t<string name=\"SortSystems\" value=\"manufacturer\" />\n\t<string name=\"ThemeSet\" value=\"Crystal\" />\n\t<string name=\"ThemeSystemView\" value=\"panel\" />\n\t<string name=\"TransitionStyle\" value=\"fade &amp; slide\" />\n\t<string name=\"UIMode\" value=\"Full\" />\n\t<string name=\"UIMode_passkey\" value=\"aaaba\" />\n</config>\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/config/es_systems.json",
    "content": "{\n  \"systems\": [\n    {\n      \"name\": \"imageviewer\",\n      \"fullname\": \"Screenshots\",\n      \"manufacturer\": \"EmuELEC\",\n      \"path\": \"/storage/roms/screenshots\",\n      \"platform\": \"ignore\",\n      \"theme\": \"imageviewer\",\n      \"command\": \"ignore\",\n      \"extensions\": [\n        \".jpg\",\n        \".pbm\",\n        \".png\"\n      ]\n    },\n    {\n      \"name\": \"amstradgx4000\",\n      \"fullname\": \"Amstrad GX4000\",\n      \"manufacturer\": \"Amstrad\",\n      \"release\": \"1990\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/amstradgx4000\",\n      \"platform\": \"gx4000\",\n      \"theme\": \"gx4000\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".cdt\",\n        \".cpr\",\n        \".dsk\",\n        \".m3u\",\n        \".sna\",\n        \".tap\",\n        \".voc\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"cap32\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"amstradcpc\",\n      \"fullname\": \"Amstrad CPC\",\n      \"manufacturer\": \"Amstrad\",\n      \"release\": \"1984\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/amstradcpc\",\n      \"platform\": \"amstradcpc\",\n      \"theme\": \"amstradcpc\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".cdt\",\n        \".dsk\",\n        \".m3u\",\n        \".sna\",\n        \".tap\",\n        \".voc\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"cap32\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"arcade\",\n      \"fullname\": \"Arcade\",\n      \"manufacturer\": \"Arcade\",\n      \"hardware\": \"arcade\",\n      \"path\": \"/storage/roms/arcade\",\n      \"platform\": \"arcade\",\n      \"theme\": \"arcade\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".cmd\",\n\t\t\".bighard\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"AdvanceMame\",\n          \"cores\": [\n            {\n              \"name\": \"AdvanceMame\"\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame2003_plus\",\n              \"default\": true\n            },\n            {\n              \"name\": \"mame2010\"\n            },\n            {\n              \"name\": \"fbneo\"\n            },\n            {\n              \"name\": \"fbalpha2012\"\n            },\n            {\n              \"name\": \"mame\"\n            }\n          ]\n        },\n        {\n          \"name\": \"FBNEOSA\",\n          \"cores\": [\n            {\n              \"name\": \"FbneoSA\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"mame\",\n      \"fullname\": \"Arcade MAME\",\n      \"manufacturer\": \"Arcade\",\n      \"hardware\": \"arcade\",\n      \"path\": \"/storage/roms/mame\",\n      \"platform\": \"arcade\",\n      \"theme\": \"mame\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".cmd\",\n\t\t\".bighard\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"AdvanceMame\",\n          \"cores\": [\n            {\n              \"name\": \"AdvanceMame\",\n              \"default\": true\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame2003_plus\"\n            },\n            {\n              \"name\": \"mame2010\"\n            },\n            {\n              \"name\": \"fbneo\"\n            },\n            {\n              \"name\": \"fbalpha2012\"\n            },\n            {\n              \"name\": \"mame\"\n            }\n          ]\n        },\n        {\n          \"name\": \"FBNEOSA\",\n          \"cores\": [\n            {\n              \"name\": \"FbneoSA\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"fmtowns\",\n      \"fullname\": \"FM Towns\",\n      \"manufacturer\": \"Fujitsu\",\n      \"release\": \"1989\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/fmtownsux\",\n      \"platform\": \"fmtowns\",\n      \"theme\": \"fmtowns\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".cmd\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"apple2\",\n      \"fullname\": \"Apple 2\",\n      \"manufacturer\": \"Apple\",\n      \"release\": \"1977\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/apple\",\n      \"platform\": \"apple2\",\n      \"theme\": \"apple2\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".cmd\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"pgm2\",\n      \"fullname\": \"PolyGame Master\",\n      \"manufacturer\": \"IGS\",\n      \"release\": \"2007\",\n      \"hardware\": \"arcade\",\n      \"path\": \"/storage/roms/pgm2\",\n      \"platform\": \"pgm2\",\n      \"theme\": \"pgm2\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"atari2600\",\n      \"fullname\": \"Atari 2600\",\n      \"manufacturer\": \"Atari\",\n      \"release\": \"1977\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/atari2600\",\n      \"platform\": \"atari2600\",\n      \"theme\": \"atari2600\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".a26\",\n        \".bin\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"STELLASA\",\n          \"cores\": [\n            {\n              \"name\": \"STELLASA\",\n              \"default\": true\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"stella\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"atari5200\",\n      \"fullname\": \"Atari 5200\",\n      \"manufacturer\": \"Atari\",\n      \"release\": \"1982\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/atari5200\",\n      \"platform\": \"atari5200\",\n      \"theme\": \"atari5200\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".a52\",\n        \".atr\",\n        \".atx\",\n        \".bin\",\n        \".cas\",\n        \".cdm\",\n        \".rom\",\n        \".xex\",\n        \".xfd\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"a5200\",\n              \"default\": true\n            },\n            {\n              \"name\": \"atari800\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"atari7800\",\n      \"fullname\": \"Atari 7800\",\n      \"manufacturer\": \"Atari\",\n      \"release\": \"1986\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/atari7800\",\n      \"platform\": \"atari7800\",\n      \"theme\": \"atari7800\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".a78\",\n        \".bin\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"prosystem\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"atari800\",\n      \"fullname\": \"Atari 800\",\n      \"manufacturer\": \"Atari\",\n      \"release\": \"1979\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/atari800\",\n      \"platform\": \"atari800\",\n      \"theme\": \"atari800\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".a52\",\n        \".atr\",\n        \".atx\",\n        \".bas\",\n        \".bin\",\n        \".car\",\n        \".cas\",\n        \".cdm\",\n        \".rom\",\n        \".xex\",\n        \".xfd\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"atari800\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"atarilynx\",\n      \"fullname\": \"Atari Lynx\",\n      \"manufacturer\": \"Atari\",\n      \"release\": \"1989\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/atarilynx\",\n      \"platform\": \"atarilynx\",\n      \"theme\": \"atarilynx\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".lnx\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"handy\",\n              \"default\": true\n            },\n            {\n              \"name\": \"mednafen_lynx\"\n            },\n            {\n              \"name\": \"gearlynx\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"atarist\",\n      \"fullname\": \"Atari ST\",\n      \"manufacturer\": \"Atari\",\n      \"release\": \"1985\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/atarist\",\n      \"platform\": \"atarist\",\n      \"theme\": \"atarist\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".dim\",\n        \".ipf\",\n        \".m3u\",\n        \".msa\",\n        \".st\",\n        \".stx\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"HATARISA\",\n          \"cores\": [\n            {\n              \"name\": \"HATARISA\"\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"hatari\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"atarijaguar\",\n      \"fullname\": \"Atari Jaguar\",\n      \"manufacturer\": \"Atari\",\n      \"release\": \"1993\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/atarijaguar\",\n      \"platform\": \"atarijaguar\",\n      \"theme\": \"atarijaguar\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".j64\",\n        \".jag\",\n        \".zip\"\n      ],\n      \"emulators\": [\n\t  {\n          \"name\": \"bigpemu\",\n          \"cores\": [\n            {\n              \"name\": \"bigpemu\",\n\t\t\t  \"default\": true\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"virtualjaguar\"\n              \n            }\n          ]\n        }\n      ]\n    },\n\t {\n      \"name\": \"atarijaguarcd\",\n      \"fullname\": \"Atari Jaguar CD\",\n      \"manufacturer\": \"Atari\",\n      \"release\": \"1993\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/atarijaguarcd\",\n      \"platform\": \"atarijaguarcd\",\n      \"theme\": \"atarijaguarcd\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".j64\",\n        \".jag\",\n\t\t\".cdi\",\n\t\t\".cue\",\n\t\t\".cof\",\n\t\t\".rom\",\n\t\t\".abs\",\n\t\t\".bigpimg\",\n\t\t\".zip\"\n      ],\n      \"emulators\": [\n\t  {\n          \"name\": \"bigpemu\",\n          \"cores\": [\n            {\n              \"name\": \"bigpemu\",\n\t\t\t  \"default\": true\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"virtualjaguar\"\n              \n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"wonderswan\",\n      \"fullname\": \"Bandai Wonderswan\",\n      \"manufacturer\": \"Bandai\",\n      \"release\": \"1999\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/wonderswan\",\n      \"platform\": \"wonderswan\",\n      \"theme\": \"wonderswan\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".ws\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mednafen_wswan\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"wonderswancolor\",\n      \"fullname\": \"Bandai Wonderswan Color\",\n      \"manufacturer\": \"Bandai\",\n      \"release\": \"2000\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/wonderswancolor\",\n      \"platform\": \"wonderswancolor\",\n      \"theme\": \"wonderswancolor\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".wsc\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mednafen_wswan\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"cps1\",\n      \"fullname\": \"Capcom PlaySystem 1\",\n      \"manufacturer\": \"Capcom\",\n      \"release\": \"1988\",\n      \"hardware\": \"arcade\",\n      \"path\": \"/storage/roms/cps1\",\n      \"platform\": \"arcade\",\n      \"theme\": \"cps1\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"AdvanceMame\",\n          \"cores\": [\n            {\n              \"name\": \"AdvanceMame\"\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame2003_plus\"\n            },\n            {\n              \"name\": \"mame2010\"\n            },\n            {\n              \"name\": \"fbneo\",\n              \"default\": true\n            },\n            {\n              \"name\": \"fbalpha2012\"\n            },\n            {\n              \"name\": \"mame\"\n            }\n          ]\n        },\n        {\n          \"name\": \"FBNEOSA\",\n          \"cores\": [\n            {\n              \"name\": \"FbneoSA\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"cps2\",\n      \"fullname\": \"Capcom PlaySystem 2\",\n      \"manufacturer\": \"Capcom\",\n      \"release\": \"1993\",\n      \"hardware\": \"arcade\",\n      \"path\": \"/storage/roms/cps2\",\n      \"platform\": \"arcade\",\n      \"theme\": \"cps2\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"AdvanceMame\",\n          \"cores\": [\n            {\n              \"name\": \"AdvanceMame\"\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame2003_plus\"\n            },\n            {\n              \"name\": \"mame2010\"\n            },\n            {\n              \"name\": \"fbneo\",\n              \"default\": true\n            },\n            {\n              \"name\": \"fbalpha2012\"\n            },\n            {\n              \"name\": \"mame\"\n            }\n          ]\n        },\n        {\n          \"name\": \"FBNEOSA\",\n          \"cores\": [\n            {\n              \"name\": \"FbneoSA\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"cps3\",\n      \"fullname\": \"Capcom PlaySystem 3\",\n      \"manufacturer\": \"Capcom\",\n      \"release\": \"1996\",\n      \"hardware\": \"arcade\",\n      \"path\": \"/storage/roms/cps3\",\n      \"platform\": \"arcade\",\n      \"theme\": \"cps3\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"AdvanceMame\",\n          \"cores\": [\n            {\n              \"name\": \"AdvanceMame\"\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame2003_plus\"\n            },\n            {\n              \"name\": \"mame2010\"\n            },\n            {\n              \"name\": \"fbneo\",\n              \"default\": true\n            },\n            {\n              \"name\": \"fbalpha2012\"\n            },\n            {\n              \"name\": \"mame\"\n            }\n          ]\n        },\n        {\n          \"name\": \"FBNEOSA\",\n          \"cores\": [\n            {\n              \"name\": \"FbneoSA\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"colecovision\",\n      \"fullname\": \"ColecoVision\",\n      \"manufacturer\": \"Coleco\",\n      \"release\": \"1982\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/coleco\",\n      \"platform\": \"colecovision\",\n      \"theme\": \"colecovision\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".col\",\n        \".rom\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"bluemsx\",\n              \"default\": true\n            },\n            {\n              \"name\": \"gearcoleco\"\n            },\n\t\t\t{\n              \"name\": \"jollycv\"\n            }\n                   ]\n        }\n      ]\n    },\n    {\n      \"name\": \"c128\",\n      \"fullname\": \"Commodore 128\",\n      \"manufacturer\": \"Commodore\",\n      \"release\": \"1985\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/c128\",\n      \"platform\": \"c128\",\n      \"theme\": \"c128\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".crt\",\n        \".d64\",\n        \".g64\",\n        \".m3u\",\n        \".prg\",\n        \".t64\",\n        \".x64\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"vice_x128\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"c64\",\n      \"fullname\": \"Commodore 64\",\n      \"manufacturer\": \"Commodore\",\n      \"release\": \"1982\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/c64\",\n      \"platform\": \"c64\",\n      \"theme\": \"c64\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".crt\",\n        \".d64\",\n        \".m3u\",\n        \".prg\",\n        \".t64\",\n        \".tap\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"vice_x64\",\n              \"default\": true\n            },\n            {\n              \"name\": \"vice_x64sc\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"amiga\",\n      \"fullname\": \"Commodore Amiga\",\n      \"manufacturer\": \"Commodore\",\n      \"release\": \"1985\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/amiga\",\n      \"platform\": \"amiga\",\n      \"theme\": \"amiga\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".adf\",\n        \".adz\",\n        \".dms\",\n        \".hdf\",\n        \".ipf\",\n        \".lha\",\n        \".m3u\",\n        \".uae\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"AMIBERRY\",\n          \"cores\": [\n            {\n              \"name\": \"AMIBERRY-LITE\",\n              \"incompatible\": [\".m3u\"]\n            },\n            {\n              \"name\": \"AMIBERRY\",              \n              \"incompatible\": [\".m3u\"]\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"puae\",\n              \"default\": true\n            },\n            {\n              \"name\": \"puae2021\"\n            },\n            {\n              \"name\": \"uae4arm_32b\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"amigacd32\",\n      \"fullname\": \"Commodore Amiga CD 32\",\n      \"manufacturer\": \"Commodore\",\n      \"release\": \"1994\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/amigacd32\",\n      \"platform\": \"amigacd32\",\n      \"theme\": \"amigacd32\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".chd\",\n        \".cue\",\n        \".hdf\",\n        \".iso\",\n        \".lha\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"AMIBERRY\",\n          \"cores\": [\n            {\n              \"name\": \"AMIBERRY-LITE\",\n              \"incompatible\": [\".m3u\"]\n            },\n            {\n              \"name\": \"AMIBERRY\",              \n              \"incompatible\": [\".m3u\"]\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"puae\",\n              \"default\": true\n            },\n            {\n              \"name\": \"puae2021\"\n            },\n            {\n              \"name\": \"uae4arm_32b\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"c16\",\n      \"fullname\": \"Commodore Plus4\",\n      \"manufacturer\": \"Commodore\",\n      \"release\": \"1984\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/c16\",\n      \"platform\": \"c16\",\n      \"theme\": \"c16\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".d64\",\n        \".g64\",\n        \".prg\",\n        \".t64\",\n        \".x64\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"vice_xplus4\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"vic20\",\n      \"fullname\": \"Commodore Vic 20\",\n      \"manufacturer\": \"Commodore\",\n      \"release\": \"1980\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/vic20\",\n      \"platform\": \"vic20\",\n      \"theme\": \"vic20\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".d64\",\n        \".g64\",\n        \".t64\",\n        \".x64\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"vice_xvic\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"pc\",\n      \"fullname\": \"DOS x86\",\n      \"manufacturer\": \"Microsoft\",\n      \"release\": \"1981\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/pc\",\n      \"platform\": \"pc\",\n      \"theme\": \"pc\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".bat\",\n        \".com\",\n        \".exe\",\n        \".sh\",\n        \".zip\",\n        \".iso\",\n        \".cue\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"DOSBOXSDL2\",\n          \"cores\": [\n            {\n              \"name\": \"DOSBOXSDL2\"\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"dosbox_pure\",\n              \"default\": true\n            },\n            {\n              \"name\": \"dosbox_svn\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"pc-9800\",\n      \"fullname\": \"NEC PC-9800\",\n      \"manufacturer\": \"NEC\",\n      \"release\": \"1983\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/pc98\",\n      \"platform\": \"pc98\",\n      \"theme\": \"pc98\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".2hd\",\n        \".88d\",\n        \".98d\",\n        \".d88\",\n        \".d98\",\n        \".dup\",\n        \".fdd\",\n        \".fdi\",\n        \".hdd\",\n        \".hdi\",\n        \".hdm\",\n        \".hdn\",\n        \".nhd\",\n        \".tfd\",\n        \".thd\",\n        \".xdf\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"np2kai\",\n              \"default\": true\n            },\n            {\n              \"name\": \"nekop2\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"daphne\",\n      \"fullname\": \"Daphne\",\n      \"manufacturer\": \"Arcade\",\n      \"release\": \"1982\",\n      \"hardware\": \"arcade\",\n      \"path\": \"/storage/roms/daphne\",\n      \"platform\": \"daphne\",\n      \"theme\": \"daphne\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".daphne\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"HYPSEUS\",\n          \"cores\": [\n            {\n              \"name\": \"HYPSEUS\",\n              \"default\": true\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"daphne\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"wii\",\n      \"fullname\": \"Nintendo Wii\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"2006\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/wii\",\n      \"platform\": \"wii\",\n      \"theme\": \"wii\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".ciso\",\n        \".gcm\",\n        \".gcz\",\n        \".iso\",\n        \".rvz\",\n        \".wad\",\n        \".wbfs\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"dolphin\",\n          \"cores\": [\n            {\n              \"name\": \"dolphin\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"gamecube\",\n      \"fullname\": \"Nintendo GameCube\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"2001\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/gamecube\",\n      \"platform\": \"gc\",\n      \"theme\": \"gc\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".ciso\",\n        \".gcm\",\n        \".gcz\",\n        \".iso\",\n        \".rvz\",\n        \".wbfs\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"dolphin\",\n          \"cores\": [\n            {\n              \"name\": \"dolphin\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"fbn\",\n      \"fullname\": \"Final Burn Neo\",\n      \"manufacturer\": \"Arcade\",\n      \"hardware\": \"arcade\",\n      \"path\": \"/storage/roms/fbneo\",\n      \"platform\": \"arcade\",\n      \"theme\": \"fbn\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n\t\t\".bighard\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"fbneo\",\n              \"default\": true\n            },\n            {\n              \"name\": \"mame2003_plus\"\n            },\n            {\n              \"name\": \"fbalpha2012\"\n            }\n          ]\n        },\n        {\n          \"name\": \"FBNEOSA\",\n          \"cores\": [\n            {\n              \"name\": \"FbneoSA\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"msx\",\n      \"fullname\": \"MSX\",\n      \"manufacturer\": \"Microsoft\",\n      \"release\": \"1983\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/msx\",\n      \"platform\": \"msx\",\n      \"theme\": \"msx\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".cas\",\n        \".dsk\",\n        \".m3u\",\n        \".mx1\",\n        \".mx2\",\n        \".rom\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"bluemsx\",\n              \"default\": true\n            },\n            {\n              \"name\": \"fmsx\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"msx2\",\n      \"fullname\": \"MSX2\",\n      \"manufacturer\": \"Microsoft\",\n      \"release\": \"1985\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/msx2\",\n      \"platform\": \"msx\",\n      \"theme\": \"msx2\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".cas\",\n        \".dsk\",\n        \".m3u\",\n        \".mx1\",\n        \".mx2\",\n        \".rom\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"bluemsx\",\n              \"default\": true\n            },\n            {\n              \"name\": \"fmsx\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"odyssey2\",\n      \"fullname\": \"Magnavox Odyssey 2\",\n      \"manufacturer\": \"Magnavox - Philips\",\n      \"release\": \"1979\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/odyssey2\",\n      \"platform\": \"odyssey2\",\n      \"theme\": \"odyssey2\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"o2em\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"intellivision\",\n      \"fullname\": \"Mattel Intellivision\",\n      \"manufacturer\": \"Mattel\",\n      \"release\": \"1979\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/intellivision\",\n      \"platform\": \"intellivision\",\n      \"theme\": \"intellivision\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".int\",\n        \".rom\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"freeintv\",\n              \"default\": true\n            }\n          ]\n        },\n        {\n          \"name\": \"jzintv\",\n          \"cores\": [\n            {\n              \"name\": \"jzintv\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"mplayer\",\n      \"fullname\": \"Media Player\",\n      \"manufacturer\": \"EmuELEC\",\n      \"release\": \"2020\",\n      \"path\": \"/storage/roms/mplayer\",\n      \"platform\": \"mplayer\",\n      \"theme\": \"mplayer\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".3g2\",\n        \".3gp\",\n        \".aac\",\n        \".ac3\",\n        \".aiff\",\n        \".asf\",\n        \".avi\",\n        \".divx\",\n        \".dts\",\n        \".f4f\",\n        \".f4v\",\n        \".flac\",\n        \".flv\",\n        \".hevc\",\n        \".m2p\",\n        \".m2ts\",\n        \".m3u\",\n        \".m4a\",\n        \".mkv\",\n        \".mov\",\n        \".mp3\",\n        \".mp4\",\n        \".mpeg\",\n        \".mpg\",\n        \".mxf\",\n        \".ogg\",\n        \".ogm\",\n        \".ogv\",\n        \".opus\",\n        \".pcm\",\n        \".pls\",\n        \".ps\",\n        \".rm\",\n        \".sh\",\n        \".swf\",\n        \".ts\",\n        \".twi\",\n        \".vob\",\n        \".wav\",\n        \".webm\",\n        \".wma\",\n        \".wmv\",\n        \".ytb\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"mpv\",\n          \"cores\": [\n            {\n              \"name\": \"mpv\"\n            }\n          ]\n        },\n        {\n          \"name\": \"ffplay\",\n          \"cores\": [\n            {\n              \"name\": \"ffplay\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"vectrex\",\n      \"fullname\": \"Milton Bradley Vectrex\",\n      \"manufacturer\": \"Milton Bradley\",\n      \"release\": \"1982\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/vectrex\",\n      \"platform\": \"vectrex\",\n      \"theme\": \"vectrex\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".gam\",\n        \".vec\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"vecx\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"pcengine\",\n      \"fullname\": \"NEC PC-Engine\",\n      \"manufacturer\": \"NEC\",\n      \"release\": \"1987\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/pcengine\",\n      \"platform\": \"pcengine\",\n      \"theme\": \"pcengine\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".pce\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mednafen_pce_fast\",\n              \"default\": true\n            },\n            {\n              \"name\": \"mednafen_supergrafx\"\n            },\n            {\n              \"name\": \"geargrafx\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"pcenginecd\",\n      \"fullname\": \"NEC PC-Engine CD\",\n      \"manufacturer\": \"NEC\",\n      \"release\": \"1988\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/pcenginecd\",\n      \"platform\": \"pcenginecd\",\n      \"theme\": \"pce-cd\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".ccd\",\n        \".chd\",\n        \".cue\",\n        \".img\",\n        \".iso\",\n        \".pce\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mednafen_pce_fast\",\n              \"default\": true\n            },\n            {\n              \"name\": \"mednafen_supergrafx\"\n            },\n            {\n              \"name\": \"geargrafx\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"pcfx\",\n      \"fullname\": \"NEC PC-FX\",\n      \"manufacturer\": \"NEC\",\n      \"release\": \"1994\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/pcfx\",\n      \"platform\": \"pcfx\",\n      \"theme\": \"pcfx\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".ccd\",\n        \".chd\",\n        \".cue\",\n        \".toc\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mednafen_pcfx\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"supergrafx\",\n      \"fullname\": \"NEC Super Grafx\",\n      \"manufacturer\": \"NEC\",\n      \"release\": \"1989\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/supergrafx\",\n      \"platform\": \"supergrafx\",\n      \"theme\": \"supergrafx\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".ccd\",\n        \".chd\",\n        \".cue\",\n        \".pce\",\n        \".sgx\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mednafen_supergrafx\",\n              \"default\": true\n            },\n            {\n              \"name\": \"mednafen_pce_fast\"\n            },\n            {\n              \"name\": \"geargrafx\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"tg16\",\n      \"fullname\": \"NEC TurboGrafx 16\",\n      \"manufacturer\": \"NEC\",\n      \"release\": \"1989\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/tg16\",\n      \"platform\": \"pcengine\",\n      \"theme\": \"tg16\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".pce\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mednafen_pce_fast\",\n              \"default\": true\n            },\n            {\n              \"name\": \"mednafen_supergrafx\"\n            },\n            {\n              \"name\": \"geargrafx\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"tg16cd\",\n      \"fullname\": \"NEC TurboGrafx 16-CD\",\n      \"manufacturer\": \"NEC\",\n      \"release\": \"1989\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/tg16cd\",\n      \"platform\": \"pcenginecd\",\n      \"theme\": \"tg16cd\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".ccd\",\n        \".chd\",\n        \".cue\",\n        \".img\",\n        \".iso\",\n        \".pce\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mednafen_pce_fast\",\n              \"default\": true\n            },\n            {\n              \"name\": \"mednafen_supergrafx\"\n            },\n            {\n              \"name\": \"geargrafx\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"n64\",\n      \"fullname\": \"Nintendo 64\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"1996\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/n64\",\n      \"platform\": \"n64\",\n      \"theme\": \"n64\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".n64\",\n        \".v64\",\n        \".z64\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mupen64plus_next\",\n              \"default\": true\n            },\n            {\n              \"name\": \"mupen64plus_next_alt\"\n            },\n            {\n              \"name\": \"mupen64plus_32b\"\n            },\n            {\n              \"name\": \"parallel_n64_32b\"\n            }\n          ]\n        },\n        {\n          \"name\": \"mupen64plussa\",\n          \"cores\": [\n            {\n              \"name\": \"rice\"\n            },\n            {\n              \"name\": \"glide64mk2\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"nds\",\n      \"fullname\": \"Nintendo DS\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"2004\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/nds\",\n      \"platform\": \"nds\",\n      \"theme\": \"nds\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".nds\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"melonds\",\n              \"default\": true\n            },\n            {\n              \"name\": \"desmume\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"nes\",\n      \"fullname\": \"Nintendo Entertainment System\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"1985\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/nes\",\n      \"platform\": \"nes\",\n      \"theme\": \"nes\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".nes\",\n        \".nesm\",\n        \".unf\",\n        \".unif\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"nestopia\",\n              \"default\": true\n            },\n            {\n              \"name\": \"fceumm\"\n            },\n            {\n              \"name\": \"fceumm_mod\"\n            },\n            {\n              \"name\": \"mesen\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"nesh\",\n      \"fullname\": \"Nintendo Entertainment System Hacks\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"1985\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/nesh\",\n      \"platform\": \"nes\",\n      \"theme\": \"nesh\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".nes\",\n        \".nesm\",\n        \".unf\",\n        \".unif\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"nestopia\",\n              \"default\": true\n            },\n            {\n              \"name\": \"fceumm\"\n            },\n            {\n              \"name\": \"fceumm_mod\"\n            },\n            {\n              \"name\": \"mesen\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"famicom\",\n      \"fullname\": \"Nintendo Famicom\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"1983\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/famicom\",\n      \"platform\": \"nes\",\n      \"theme\": \"famicom\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".nes\",\n        \".nesm\",\n        \".unf\",\n        \".unif\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"nestopia\",\n              \"default\": true\n            },\n            {\n              \"name\": \"fceumm\"\n            },\n            {\n              \"name\": \"fceumm_mod\"\n            },\n            {\n              \"name\": \"mesen\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"fds\",\n      \"fullname\": \"Nintendo Famicom Disk System\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"1986\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/fds\",\n      \"platform\": \"fds\",\n      \"theme\": \"fds\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".fds\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"nestopia\",\n              \"default\": true\n            },\n            {\n              \"name\": \"fceumm\"\n            },\n            {\n              \"name\": \"fceumm_mod\"\n            },\n            {\n              \"name\": \"mesen\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"gb\",\n      \"fullname\": \"Nintendo Game Boy\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"1989\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/gb\",\n      \"platform\": \"gb\",\n      \"theme\": \"gb\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".gb\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"gambatte\",\n              \"default\": true\n            },\n            {\n              \"name\": \"gearboy\"\n            },\n            {\n              \"name\": \"sameboy\"\n            },\n            {\n              \"name\": \"tgbdual\"\n            },\n            {\n              \"name\": \"mgba\"\n            },\n            {\n              \"name\": \"vbam\"\n            },\n            {\n              \"name\": \"vba_next\"\n            },\n            {\n              \"name\": \"mesen-s\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"gba\",\n      \"fullname\": \"Nintendo Game Boy Advance\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"2001\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/gba\",\n      \"platform\": \"gba\",\n      \"theme\": \"gba\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".gba\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mgba\",\n              \"default\": true\n            },\n            {\n              \"name\": \"gpsp\"\n            },\n            {\n              \"name\": \"vbam\"\n            },\n            {\n              \"name\": \"vba_next\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"gbah\",\n      \"fullname\": \"Nintendo Game Boy Advance hacks\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"2001\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/gbah\",\n      \"platform\": \"gba\",\n      \"theme\": \"gbah\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".gba\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mgba\",\n              \"default\": true\n            },\n            {\n              \"name\": \"gpsp\"\n            },\n            {\n              \"name\": \"vbam\"\n            },\n            {\n              \"name\": \"vba_next\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"gbc\",\n      \"fullname\": \"Nintendo Game Boy Color\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"1998\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/gbc\",\n      \"platform\": \"gbc\",\n      \"theme\": \"gbc\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".gb\",\n        \".gbc\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"gambatte\",\n              \"default\": true\n            },\n            {\n              \"name\": \"gearboy\"\n            },\n            {\n              \"name\": \"sameboy\"\n            },\n            {\n              \"name\": \"tgbdual\"\n            },\n            {\n              \"name\": \"mgba\"\n            },\n            {\n              \"name\": \"vbam\"\n            },\n            {\n              \"name\": \"vba_next\"\n            },\n            {\n              \"name\": \"mesen-s\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"gbch\",\n      \"fullname\": \"Nintendo Game Boy Color Hacks\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"1998\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/gbch\",\n      \"platform\": \"gbc\",\n      \"theme\": \"gbch\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".gb\",\n        \".gbc\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"gambatte\",\n              \"default\": true\n            },\n            {\n              \"name\": \"gearboy\"\n            },\n            {\n              \"name\": \"sameboy\"\n            },\n            {\n              \"name\": \"tgbdual\"\n            },\n            {\n              \"name\": \"mgba\"\n            },\n            {\n              \"name\": \"vbam\"\n            },\n            {\n              \"name\": \"vba_next\"\n            },\n            {\n              \"name\": \"mesen-s\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"gbh\",\n      \"fullname\": \"Nintendo Game Boy Hacks\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"1989\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/gbh\",\n      \"platform\": \"gb\",\n      \"theme\": \"gbh\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".gb\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"gambatte\",\n              \"default\": true\n            },\n            {\n              \"name\": \"gearboy\"\n            },\n            {\n              \"name\": \"sameboy\"\n            },\n            {\n              \"name\": \"tgbdual\"\n            },\n            {\n              \"name\": \"mgba\"\n            },\n            {\n              \"name\": \"vbam\"\n            },\n            {\n              \"name\": \"vba_next\"\n            },\n            {\n              \"name\": \"mesen-s\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"gameandwatch\",\n      \"fullname\": \"Nintendo Game and Watch\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"1980\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/gameandwatch\",\n      \"platform\": \"gameandwatch\",\n      \"theme\": \"gameandwatch\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".mgw\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"gw\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"sfc\",\n      \"fullname\": \"Nintendo Super Famicom\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"1990\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/sfc\",\n      \"platform\": \"snes\",\n      \"theme\": \"sfc\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bs\",\n        \".bsx\",\n        \".dx2\",\n        \".fig\",\n        \".gd3\",\n        \".gd7\",\n        \".sfc\",\n        \".smc\",\n        \".st\",\n        \".swc\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"snes9x\",\n              \"default\": true\n            },\n            {\n              \"name\": \"snes9x2010\"\n            },\n            {\n              \"name\": \"snes9x2002\"\n            },\n            {\n              \"name\": \"snes9x2005_plus\"\n            },\n            {\n              \"name\": \"mesen-s\"\n            },\n            {\n              \"name\": \"mednafen_supafaust\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"snes\",\n      \"fullname\": \"Nintendo Super Nintendo\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"1991\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/snes\",\n      \"platform\": \"snes\",\n      \"theme\": \"snes\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bs\",\n        \".bsx\",\n        \".dx2\",\n        \".fig\",\n        \".gd3\",\n        \".gd7\",\n        \".sfc\",\n        \".smc\",\n        \".st\",\n        \".swc\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"snes9x\",\n              \"default\": true\n            },\n            {\n              \"name\": \"snes9x2010\"\n            },\n            {\n              \"name\": \"snes9x2002\"\n            },\n            {\n              \"name\": \"snes9x2005_plus\"\n            },\n            {\n              \"name\": \"mesen-s\"\n            },\n            {\n              \"name\": \"mednafen_supafaust\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"snesh\",\n      \"fullname\": \"Nintendo Super Nintendo Hacks\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"1991\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/snesh\",\n      \"platform\": \"snes\",\n      \"theme\": \"snesh\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bs\",\n        \".bsx\",\n        \".dx2\",\n        \".fig\",\n        \".gd3\",\n        \".gd7\",\n        \".sfc\",\n        \".smc\",\n        \".st\",\n        \".swc\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"snes9x\",\n              \"default\": true\n            },\n            {\n              \"name\": \"snes9x2010\"\n            },\n            {\n              \"name\": \"snes9x2002\"\n            },\n            {\n              \"name\": \"snes9x2005_plus\"\n            },\n            {\n              \"name\": \"mesen-s\"\n            },\n            {\n              \"name\": \"mednafen_supafaust\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"snesmsu1\",\n      \"fullname\": \"Near's Super Nintendo MSU1\",\n      \"manufacturer\": \"Nintendo - Near\",\n      \"release\": \"2012\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/snesmsu1\",\n      \"platform\": \"snes\",\n      \"theme\": \"snesmsu1\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bs\",\n        \".bsx\",\n        \".dx2\",\n        \".fig\",\n        \".gd3\",\n        \".gd7\",\n        \".sfc\",\n        \".smc\",\n        \".st\",\n        \".swc\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"snes9x\",\n              \"default\": true\n            },\n            {\n              \"name\": \"mednafen_supafaust\"\n            },\n            {\n              \"name\": \"mesen-s\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"sufami\",\n      \"fullname\": \"SuFami Turbo\",\n      \"manufacturer\": \"Bandai\",\n      \"release\": \"1996\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/sufami\",\n      \"platform\": \"snes\",\n      \"theme\": \"sufami\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".st\",\n        \".fig\",\n        \".bs\",\n        \".smc\",\n        \".sfc\",\n        \".zip\",\n        \".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"snes9x\",\n              \"default\": true\n            },\n            {\n              \"name\": \"mesen-s\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"satellaview\",\n      \"fullname\": \"Satellaview\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"1995\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/satellaview\",\n      \"platform\": \"snes\",\n      \"theme\": \"satellaview\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".st\",\n        \".fig\",\n        \".bs\",\n        \".smc\",\n        \".sfc\",\n        \".zip\",\n        \".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"snes9x\",\n              \"default\": true\n            },\n            {\n              \"name\": \"mesen-s\"\n            }\n          ]\n        }\n      ]\n     },\n    {\n      \"name\": \"virtualboy\",\n      \"fullname\": \"Nintendo Virtual Boy\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"1995\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/virtualboy\",\n      \"platform\": \"virtualboy\",\n      \"theme\": \"virtualboy\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".vb\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mednafen_vb\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"philips-cdi\",\n      \"fullname\": \"Philips CDI\",\n      \"manufacturer\": \"Philips\",\n      \"release\": \"1990\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/cdi\",\n      \"platform\": \"cdi\",\n      \"theme\": \"cdi\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".chd\",\n        \".iso\",\n        \".cue\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"same_cdi\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"pokemini\",\n      \"fullname\": \"Pokemon Mini\",\n      \"manufacturer\": \"Nintendo\",\n      \"release\": \"2001\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/pokemini\",\n      \"platform\": \"pokemini\",\n      \"theme\": \"pokemini\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".min\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"pokemini\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"openbor\",\n      \"fullname\": \"OpenBOR\",\n      \"manufacturer\": \"Ports\",\n      \"release\": \"2008\",\n      \"hardware\": \"port\",\n      \"path\": \"/storage/roms/openbor\",\n      \"platform\": \"openbor\",\n      \"theme\": \"openbor\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".pak\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"OPENBOR\",\n          \"cores\": [\n            {\n              \"name\": \"OpenBOR\",\n              \"default\": true\n            },\n            {\n              \"name\": \"OpenBORff\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"videopac\",\n      \"fullname\": \"Philips VideoPac\",\n      \"manufacturer\": \"Magnavox - Philips\",\n      \"release\": \"1978\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/videopac\",\n      \"platform\": \"videopac\",\n      \"theme\": \"videopac\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".bin\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"o2em\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"3do\",\n      \"fullname\": \"Panasonic 3DO\",\n      \"manufacturer\": \"Panasonic\",\n      \"release\": \"1993\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/3do\",\n      \"platform\": \"3do\",\n      \"theme\": \"3do\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".chd\",\n        \".cue\",\n        \".iso\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"opera\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"ports\",\n      \"fullname\": \"Ports\",\n      \"manufacturer\": \"Ports\",\n      \"release\": \"Varies\",\n      \"hardware\": \"port\",\n      \"path\": \"/storage/roms/ports_scripts\",\n      \"platform\": \"ports\",\n      \"theme\": \"ports\",\n      \"command\": \"emuelecRunApp.sh %ROM% -P%SYSTEM% --core=%CORE% --emulator=%EMULATOR% --controllers=\\\"%CONTROLLERSCONFIG%\\\"\",\n      \"extensions\": [\n        \".sh\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"ports\",\n          \"cores\": [\n            {\n              \"name\": \"ports\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"neogeo\",\n      \"fullname\": \"SNK Neo-Geo\",\n      \"manufacturer\": \"SNK\",\n      \"release\": \"1990\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/neogeo\",\n      \"platform\": \"neogeo\",\n      \"theme\": \"neogeo\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".neo\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"fbneo\",\n              \"default\": true\n            },\n            {\n              \"name\": \"mame2003_plus\"\n            },\n            {\n              \"name\": \"fbalpha2012\"\n            },\n            {\n              \"name\": \"geolith\"\n            }\n          ]\n        },\n        {\n          \"name\": \"FBNEOSA\",\n          \"cores\": [\n            {\n              \"name\": \"FbneoSA\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"neocd\",\n      \"fullname\": \"SNK Neo-Geo CD\",\n      \"manufacturer\": \"SNK\",\n      \"release\": \"1990\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/neocd\",\n      \"platform\": \"neogeocd\",\n      \"theme\": \"neogeocd\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".chd\",\n        \".cue\",\n        \".iso\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"neocd\",\n              \"default\": true\n            },\n            {\n              \"name\": \"fbneo\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"ngp\",\n      \"fullname\": \"SNK Neo-Geo Pocket\",\n      \"manufacturer\": \"SNK\",\n      \"release\": \"1998\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/ngp\",\n      \"platform\": \"ngp\",\n      \"theme\": \"ngp\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".ngp\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mednafen_ngp\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"ngpc\",\n      \"fullname\": \"SNK Neo-Geo Pocket Color\",\n      \"manufacturer\": \"SNK\",\n      \"release\": \"1999\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/ngpc\",\n      \"platform\": \"ngpc\",\n      \"theme\": \"ngpc\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".ngc\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mednafen_ngp\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"scummvm\",\n      \"fullname\": \"ScummVM\",\n      \"manufacturer\": \"LucasArts\",\n      \"release\": \"1987\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/scummvm\",\n      \"platform\": \"pc\",\n      \"theme\": \"scummvm\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".scummvm\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"SCUMMVMSA\",\n          \"cores\": [\n            {\n              \"name\": \"SCUMMVMSA\",\n              \"default\": true\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"scummvm\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"sega32x\",\n      \"fullname\": \"Sega 32X\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1991\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/sega32x\",\n      \"platform\": \"sega32x\",\n      \"theme\": \"sega32x\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".32x\",\n        \".7z\",\n        \".bin\",\n        \".md\",\n        \".smd\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"picodrive\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"segacd\",\n      \"fullname\": \"Sega CD\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1991\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/segacd\",\n      \"platform\": \"segacd\",\n      \"theme\": \"segacd\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".chd\",\n        \".cue\",\n        \".iso\",\n        \".m3u\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"genesis_plus_gx\",\n              \"default\": true\n            },\n            {\n              \"name\": \"picodrive\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"dreamcast\",\n      \"fullname\": \"Sega Dreamcast\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1998\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/dreamcast\",\n      \"platform\": \"dreamcast\",\n      \"theme\": \"dreamcast\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".cdi\",\n        \".chd\",\n        \".gdi\",\n        \".m3u\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"flycast\",\n              \"default\": true\n            },\n            {\n              \"name\": \"flycast_32b\"\n            }\n          ]\n        },\n        {\n          \"name\": \"flycastsa\",\n          \"cores\": [\n            {\n              \"name\": \"flycastsa\"\n            }\n          ]\n        },\n        {\n          \"name\": \"flycast_dojo\",\n          \"cores\": [\n            {\n              \"name\": \"flycast_dojo\"\n            }\n          ]\n        },\n        {\n          \"name\": \"retrorun\",\n          \"cores\": [\n            {\n              \"name\": \"flycast\"\n            },\n            {\n              \"name\": \"flycast_32b\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"atomiswave\",\n      \"fullname\": \"Atomiswave\",\n      \"manufacturer\": \"Sammy\",\n      \"release\": \"2003\",\n      \"hardware\": \"arcade\",\n      \"path\": \"/storage/roms/atomiswave\",\n      \"platform\": \"atomiswave\",\n      \"theme\": \"atomiswave\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".dat\",\n        \".lst\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"flycast\",\n              \"default\": true\n            },\n            {\n              \"name\": \"flycast_32b\"\n            }\n          ]\n        },\n        {\n          \"name\": \"flycastsa\",\n          \"cores\": [\n            {\n              \"name\": \"flycastsa\"\n            }\n          ]\n        },\n        {\n          \"name\": \"flycast_dojo\",\n          \"cores\": [\n            {\n              \"name\": \"flycast_dojo\"\n            }\n          ]\n        },\n        {\n          \"name\": \"retrorun\",\n          \"cores\": [\n            {\n              \"name\": \"flycast\"\n            },\n            {\n              \"name\": \"flycast_32b\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"gamegear\",\n      \"fullname\": \"Sega Game Gear\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1990\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/gamegear\",\n      \"platform\": \"gamegear\",\n      \"theme\": \"gamegear\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".gg\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"gearsystem\",\n              \"default\": true\n            },\n            {\n              \"name\": \"genesis_plus_gx\"\n            },\n            {\n              \"name\": \"picodrive\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"ggh\",\n      \"fullname\": \"Sega Game Gear Hacks\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1990\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/gamegearh\",\n      \"platform\": \"gamegear\",\n      \"theme\": \"ggh\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".gg\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"gearsystem\",\n              \"default\": true\n            },\n            {\n              \"name\": \"genesis_plus_gx\"\n            },\n            {\n              \"name\": \"picodrive\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"genesis\",\n      \"fullname\": \"Sega Genesis\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1989\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/genesis\",\n      \"platform\": \"genesis\",\n      \"theme\": \"genesis\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".68k\",\n        \".7z\",\n        \".bin\",\n        \".gen\",\n        \".md\",\n        \".sg\",\n        \".sgd\",\n        \".smd\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"genesis_plus_gx\",\n              \"default\": true\n            },\n            {\n              \"name\": \"genesis_plus_gx_cart_special\"\n            },\n            {\n              \"name\": \"genesis_plus_gx_wide\"\n            },\n\t\t\t{\n              \"name\": \"clownmdemu\"\n            },\n            {\n              \"name\": \"picodrive\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"genh\",\n      \"fullname\": \"Sega Genesis Hacks\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1989\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/genh\",\n      \"platform\": \"genesis\",\n      \"theme\": \"genh\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".68k\",\n        \".7z\",\n        \".bin\",\n        \".gen\",\n        \".md\",\n        \".sg\",\n        \".sgd\",\n        \".smd\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"genesis_plus_gx\",\n              \"default\": true\n            },\n            {\n              \"name\": \"genesis_plus_gx_wide\"\n            },\n            {\n              \"name\": \"genesis_plus_gx_cart_special\"\n            },\n\t\t\t{\n              \"name\": \"clownmdemu\"\n            },\n            {\n              \"name\": \"picodrive\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"mastersystem\",\n      \"fullname\": \"Sega Master System\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1985\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/mastersystem\",\n      \"platform\": \"mastersystem\",\n      \"theme\": \"mastersystem\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".sms\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"gearsystem\",\n              \"default\": true\n            },\n            {\n              \"name\": \"genesis_plus_gx\"\n            },\n\t\t\t{\n              \"name\": \"clownmdemu\"\n            },\n            {\n              \"name\": \"picodrive\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"megadrive\",\n      \"fullname\": \"Sega Mega Drive\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1990\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/megadrive\",\n      \"platform\": \"megadrive\",\n      \"theme\": \"megadrive\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".68k\",\n        \".7z\",\n        \".bin\",\n        \".gen\",\n        \".md\",\n        \".sg\",\n        \".sgd\",\n        \".smd\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"genesis_plus_gx\",\n              \"default\": true\n            },\n            {\n              \"name\": \"genesis_plus_gx_cart_special\"\n            },\n\t\t\t{\n              \"name\": \"clownmdemu\"\n            },\n            {\n              \"name\": \"genesis_plus_gx_wide\"\n            },\n            {\n              \"name\": \"picodrive\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"megadrivemsu\",\n      \"fullname\": \"Sega Mega Drive MSU\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1990\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/megadrivemsu\",\n      \"platform\": \"megadrive\",\n      \"theme\": \"megadrivemsu\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".gen\",\n        \".md\",\n        \".sg\",\n        \".smd\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"genesis_plus_gx_wide\",\n              \"default\": true\n            },\n\t\t\t{\n              \"name\": \"clownmdemu\"\n            },\n            {\n              \"name\": \"genesis_plus_gx\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"megadrive-japan\",\n      \"fullname\": \"Sega Mega Drive Japan\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1988\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/megadrive-japan\",\n      \"platform\": \"megadrive\",\n      \"theme\": \"megadrive-japan\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".68k\",\n        \".7z\",\n        \".bin\",\n        \".gen\",\n        \".md\",\n        \".sg\",\n        \".sgd\",\n        \".smd\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"genesis_plus_gx\",\n              \"default\": true\n            },\n            {\n              \"name\": \"genesis_plus_gx_wide\"\n            },\n\t\t\t{\n              \"name\": \"clownmdemu\"\n            },\n            {\n              \"name\": \"genesis_plus_gx_cart_special\"\n            },\n            {\n              \"name\": \"picodrive\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"megaduck\",\n      \"fullname\": \"MegaDuck\",\n      \"manufacturer\": \"Welback Holdings\",\n      \"release\": \"1993\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/megaduck\",\n      \"platform\": \"megaduck\",\n      \"theme\": \"megaduck\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"sameduck\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"naomi\",\n      \"fullname\": \"Sega Naomi\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1998\",\n      \"hardware\": \"arcade\",\n      \"path\": \"/storage/roms/naomi\",\n      \"platform\": \"naomi\",\n      \"theme\": \"naomi\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".dat\",\n        \".lst\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"flycast\",\n              \"default\": true\n            },\n            {\n              \"name\": \"flycast_32b\"\n            }\n          ]\n        },\n        {\n          \"name\": \"flycastsa\",\n          \"cores\": [\n            {\n              \"name\": \"flycastsa\"\n            }\n          ]\n        },\n        {\n          \"name\": \"flycast_dojo\",\n          \"cores\": [\n            {\n              \"name\": \"flycast_dojo\"\n            }\n          ]\n        },\n        {\n          \"name\": \"retrorun\",\n          \"cores\": [\n            {\n              \"name\": \"flycast\"\n            },\n            {\n              \"name\": \"flycast_32b\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"sc-3000\",\n      \"fullname\": \"Sega SC-3000\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1983\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/sc-3000\",\n      \"platform\": \"sc-3000\",\n      \"theme\": \"sc-3000\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".sg\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"bluemsx\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"sg-1000\",\n      \"fullname\": \"Sega SG-1000\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1983\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/sg-1000\",\n      \"platform\": \"sg-1000\",\n      \"theme\": \"sg-1000\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".sg\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"gearsystem\",\n              \"default\": true\n            },\n            {\n              \"name\": \"genesis_plus_gx\"\n            },\n            {\n              \"name\": \"picodrive\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"saturn\",\n      \"fullname\": \"Sega Saturn\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1994\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/saturn\",\n      \"platform\": \"saturn\",\n      \"theme\": \"saturn\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".bin\",\n        \".chd\",\n        \".cue\",\n        \".iso\",\n        \".mds\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"yabasanshiro\"\n            },\n            {\n              \"name\": \"mednafen_saturn\"\n            }\n          ]\n        },\n        {\n          \"name\": \"yabasanshiro\",\n          \"cores\": [\n            {\n              \"name\": \"yabasanshiroSA\"\n            },\n            {\n              \"name\": \"yabasanshiroSA1_5\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"setup\",\n      \"fullname\": \"Setup\",\n      \"manufacturer\": \"EmuELEC\",\n      \"release\": \"2017\",\n      \"hardware\": \"Amlogic\",\n      \"path\": \"/usr/bin/scripts/setup\",\n      \"platform\": \"setup\",\n      \"theme\": \"setup\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".sh\"\n      ]\n    },\n    {\n      \"name\": \"ikemen\",\n      \"fullname\": \"ikemen\",\n      \"manufacturer\": \"Ports\",\n      \"release\": \"2021\",\n      \"hardware\": \"port\",\n      \"path\": \"/storage/roms/ikemen\",\n      \"platform\": \"ikemen\",\n      \"theme\": \"ikemen\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".exe\",\n        \".ikemen\",\n        \".pc\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"ikemen\",\n          \"cores\": [\n            {\n              \"name\": \"ikemen\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"x68000\",\n      \"fullname\": \"Sharp X68000\",\n      \"manufacturer\": \"Sharp\",\n      \"release\": \"1987\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/x68000\",\n      \"platform\": \"x68000\",\n      \"theme\": \"x68000\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".2hd\",\n        \".7z\",\n        \".88d\",\n        \".cmd\",\n        \".d88\",\n        \".dim\",\n        \".dup\",\n        \".hdf\",\n        \".hdm\",\n        \".img\",\n        \".m3u\",\n        \".xdf\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"px68k\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"x1\",\n      \"fullname\": \"Sharp X1\",\n      \"manufacturer\": \"Sharp\",\n      \"release\": \"1982\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/x1\",\n      \"platform\": \"x1\",\n      \"theme\": \"sharpx1\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".2d\",\n        \".2hd\",\n        \".7z\",\n        \".88d\",\n        \".cmd\",\n        \".d88\",\n        \".dup\",\n        \".dx1\",\n        \".hdm\",\n        \".tap\",\n        \".tfd\",\n        \".xdf\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"x1\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"zxspectrum\",\n      \"fullname\": \"Sinclair ZX Spectrum\",\n      \"manufacturer\": \"Sinclair\",\n      \"release\": \"1982\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/zxspectrum\",\n      \"platform\": \"zxspectrum\",\n      \"theme\": \"zxspectrum\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".rzx\",\n        \".scl\",\n        \".tap\",\n        \".trd\",\n        \".tzx\",\n        \".z80\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"fuse\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"zx81\",\n      \"fullname\": \"Sinclair ZX81\",\n      \"manufacturer\": \"Sinclair\",\n      \"release\": \"1981\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/zx81\",\n      \"platform\": \"zx81\",\n      \"theme\": \"zx81\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".p\",\n        \".tzx\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"81\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"psx\",\n      \"fullname\": \"Sony Playstation\",\n      \"manufacturer\": \"Sony\",\n      \"release\": \"1994\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/psx\",\n      \"platform\": \"psx\",\n      \"theme\": \"psx\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".cbn\",\n        \".ccd\",\n        \".chd\",\n        \".cue\",\n        \".img\",\n        \".iso\",\n        \".m3u\",\n        \".mdf\",\n        \".pbp\",\n        \".toc\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"pcsx_rearmed_32b\",\n              \"default\": true\n            },\n            {\n              \"name\": \"pcsx_rearmed\"\n            },\n            {\n              \"name\": \"swanstation\"\n            }\n          ]\n        },\n        {\n          \"name\": \"Duckstation\",\n          \"cores\": [\n            {\n              \"name\": \"duckstation\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"psp\",\n      \"fullname\": \"Sony Playstation Portable\",\n      \"manufacturer\": \"Sony\",\n      \"release\": \"2004\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/psp\",\n      \"platform\": \"psp\",\n      \"theme\": \"psp\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".cso\",\n        \".iso\",\n        \".pbp\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"PPSSPPSDL\",\n          \"cores\": [\n            {\n              \"name\": \"PPSSPPSDL\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"pspminis\",\n      \"fullname\": \"Sony Playstation Portable Minis\",\n      \"manufacturer\": \"Sony\",\n      \"release\": \"2004\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/pspminis\",\n      \"platform\": \"psp\",\n      \"theme\": \"pspminis\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".cso\",\n        \".iso\",\n        \".pbp\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"PPSSPPSDL\",\n          \"cores\": [\n            {\n              \"name\": \"PPSSPPSDL\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"ngage\",\n      \"fullname\": \"Nokia N-Gage\",\n      \"manufacturer\": \"Nokia\",\n      \"release\": \"2003\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/ngage\",\n      \"platform\": \"ngage\",\n      \"theme\": \"ngage\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".ngage\",\n\t\t\".symbian\",\n\t\t\".zip\",\n        \".sis\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"eka2l1\",\n          \"cores\": [\n            {\n              \"name\": \"eka2l1\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"uzebox\",\n      \"fullname\": \"uzebox\",\n      \"manufacturer\": \"belogic\",\n      \"release\": \"2008\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/uzebox\",\n      \"platform\": \"uzebox\",\n      \"theme\": \"uzebox\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".hex\",\n        \".uze\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"uzem\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"solarus\",\n      \"fullname\": \"Solarus\",\n      \"manufacturer\": \"Solarus\",\n      \"release\": \"2006\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/solarus\",\n      \"platform\": \"solarus\",\n      \"theme\": \"solarus\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".solarus\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"Solarus\",\n          \"cores\": [\n            {\n              \"name\": \"solarus\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"pico8\",\n      \"fullname\": \"PICO-8 fantasy console\",\n      \"manufacturer\": \"Lexaloffle\",\n      \"release\": \"2015\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/pico-8\",\n      \"platform\": \"pico8\",\n      \"theme\": \"pico8\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".p8\",\n        \".png\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"Pico-8\",\n          \"cores\": [\n            {\n              \"name\": \"Pico-8\",\n              \"default\": true\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"fake08\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"prboom\",\n      \"fullname\": \"Doom\",\n      \"manufacturer\": \"id\",\n      \"release\": \"1993\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/ports/doom\",\n      \"platform\": \"pc\",\n      \"theme\": \"prboom\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".doom\",\n        \".iwad\",\n        \".pwad\",\n        \".wad\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"prboom\"\n            }\n          ]\n        },\n        {\n          \"name\": \"Chocolate-Doom\",\n          \"cores\": [\n            {\n              \"name\": \"Chocolate-Doom\",\n              \"default\": true\n            }\n          ]\n        },\n        {\n          \"name\": \"LZDoom\",\n          \"cores\": [\n            {\n              \"name\": \"LZDoom\"\n            }\n          ]\n        },\n        {\n          \"name\": \"GZDoom\",\n          \"cores\": [\n            {\n              \"name\": \"GZDoom\"\n            }\n          ]\n        }\n      ]\n    },\n\t{\n  \"name\": \"samcoupe\",\n  \"fullname\": \"SAM Coupé\",\n  \"manufacturer\": \"Miles Gordon Technology\",\n  \"release\": \"1989\",\n  \"hardware\": \"computer\",\n  \"path\": \"/storage/roms/samcoupe\",\n  \"platform\": \"samcoupe\",\n  \"theme\": \"samcoupe\",\n  \"command\": \"default\",\n  \"extensions\": [\n    \".dsk\",\n    \".cpm\",\n    \".sad\",\n    \".mgt\",\n    \".sdf\",\n    \".td0\",\n    \".sbt\",\n    \".zip\"\n  ],\n  \"emulators\": [\n    {\n      \"name\": \"simcoupe\",\n      \"cores\": [\n        {\n          \"name\": \"simcoupe\",\n          \"default\": true\n        }\n      ]\n    }\n  ]\n},\n\n    {\n      \"name\": \"tic-80\",\n      \"fullname\": \"TIC-80\",\n      \"manufacturer\": \"Nesbox\",\n      \"release\": \"2017\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/tic-80\",\n      \"platform\": \"tic80\",\n      \"theme\": \"tic-80\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".tic\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"tic80\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"easyrpg\",\n      \"fullname\": \"EasyRPG\",\n      \"manufacturer\": \"EasyRPG\",\n      \"release\": \"2003\",\n      \"hardware\": \"ports\",\n      \"path\": \"/storage/roms/easyrpg\",\n      \"platform\": \"easyrpg\",\n      \"theme\": \"easyrpg\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".ldb\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"easyrpg\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"ecwolf\",\n      \"fullname\": \"Wolfenstein 3D\",\n      \"manufacturer\": \"id\",\n      \"release\": \"1992\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/ports/ecwolf/games\",\n      \"platform\": \"pc\",\n      \"theme\": \"ecwolf\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".ecwolf\",\n        \".n3d\",\n        \".sd2\",\n        \".sd3\",\n        \".sod\",\n        \".wl6\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"ECWolf\",\n          \"cores\": [\n            {\n              \"name\": \"ecwolf\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"supervision\",\n      \"fullname\": \"Supervision\",\n      \"manufacturer\": \"watara\",\n      \"release\": \"1992\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/supervision\",\n      \"platform\": \"supervision\",\n      \"theme\": \"supervision\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".7z\",\n        \".bin\",\n        \".sv\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"potator\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"freej2me\",\n      \"fullname\": \"Java Games\",\n      \"manufacturer\": \"freej2me\",\n      \"release\": \"2017\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/freej2me\",\n      \"platform\": \"freej2me\",\n      \"theme\": \"freej2me\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".jar\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"freej2me\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"gmloader\",\n      \"fullname\": \"Gamemaker Loader\",\n      \"manufacturer\": \"gmloader\",\n      \"release\": \"2021\",\n      \"hardware\": \"port\",\n      \"path\": \"/storage/roms/ports/gmloader\",\n      \"platform\": \"gmloader\",\n      \"theme\": \"gmloader\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".apk\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"gmloader\",\n          \"cores\": [\n            {\n              \"name\": \"gmloader\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"karaoke\",\n      \"fullname\": \"Karaoke\",\n      \"manufacturer\": \"Karaoke\",\n      \"release\": \"2000\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/karaoke\",\n      \"platform\": \"karaoke\",\n      \"theme\": \"karaoke\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".cdg\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"pocketcdg\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t\n\t{\n      \"name\": \"channelf\",\n      \"fullname\": \"Channel F\",\n      \"manufacturer\": \"Fairchild\",\n      \"release\": \"1976\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/channelf\",\n      \"platform\": \"channelf\",\n      \"theme\": \"channelf\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".bin\",\n\t\t\".zip\",\n\t\t\".rom\",\n\t\t\".chf\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"freechaf\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"arduboy\",\n      \"fullname\": \"Arduboy\",\n      \"manufacturer\": \"Kevin Bates\",\n      \"release\": \"2015\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/arduboy\",\n      \"platform\": \"arduboy\",\n      \"theme\": \"arduboy\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".hex\",\n\t\t\".zip\",\n\t\t\".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"arduous\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"wasm4\",\n      \"fullname\": \"Wasm-4\",\n      \"manufacturer\": \"Aduros\",\n      \"release\": \"2021\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/wasm4\",\n      \"platform\": \"wasm4\",\n      \"theme\": \"wasm4\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".wasm\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"wasm4\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"bbc\",\n      \"fullname\": \"BBC Micro\",\n      \"manufacturer\": \"Acorn Electronics\",\n      \"release\": \"1981\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/bbc\",\n      \"platform\": \"bbc\",\n      \"theme\": \"bbc\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".mfi\",\n\t\t\".dfi\",\n\t\t\"hfe\",\n\t\t\".mfm\",\n\t\t\".td0\",\n\t\t\".imd\",\n\t\t\".d77\",\n\t\t\".d88\",\n\t\t\".ldd\",\n\t\t\".cqm\",\n\t\t\".cqi\",\n\t\t\".dsk\",\n\t\t\".ima\",\n\t\t\".img\",\n\t\t\".ufi\",\n\t\t\".360\",\n\t\t\".ipf\",\n\t\t\".ssd\",\n\t\t\".bbc\",\n\t\t\".dsd\",\n\t\t\".adf\",\n\t\t\".ads\",\n\t\t\".adm\",\n\t\t\".adl\",\n\t\t\".fsd\",\n\t\t\".wav\",\n\t\t\".tap\",\n\t\t\".bin\",\n\t\t\".zip\",\n\t\t\".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            },\n\t\t\t{\n              \"name\": \"b2\"\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"m2000\",\n      \"fullname\": \"Philips P2000T\",\n      \"manufacturer\": \"Philips\",\n      \"release\": \"1980\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/p2000t\",\n      \"platform\": \"m2000\",\n      \"theme\": \"p2000t\",\n      \"command\": \"default\",\n      \"extensions\": [\n\t\t\".cas\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"m2000\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"macintosh\",\n      \"fullname\": \"Macintosh\",\n      \"manufacturer\": \"Apple\",\n      \"release\": \"1984\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/macintosh\",\n      \"platform\": \"macintosh\",\n      \"theme\": \"macintosh\",\n      \"command\": \"default\",\n      \"extensions\": [\n\t\t\".dsk\",\n\t\t\".zip\",\n\t\t\".7z\",\n\t\t\".mfi\",\n\t\t\".dfi\",\n\t\t\".hfe\",\n\t\t\".mfm\",\n\t\t\".td0\",\n\t\t\".imd\",\n\t\t\".d77\",\n\t\t\".d88\",\n\t\t\".1dd\",\n\t\t\".cqm\",\n\t\t\".cqi\",\n\t\t\".dsk\",\n\t\t\".ima\",\n\t\t\".img\",\n\t\t\".ufi\",\n\t\t\".ipf\",\n\t\t\".dc42\",\n\t\t\".woz\",\n\t\t\".2mg\",\n\t\t\".360\",\n\t\t\".chd\",\n\t\t\".cue\",\n\t\t\".toc\",\n\t\t\".nrg\",\n\t\t\".gdi\",\n\t\t\".iso\",\n\t\t\".cdr\",\n\t\t\".hd\",\n\t\t\".hdv\",\n\t\t\".2mg\",\n\t\t\".hdi\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            },\n\t\t\t{\n              \"name\": \"minivmac\"\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"theodore\",\n      \"fullname\": \"Thomson - MO/TO\",\n      \"manufacturer\": \"Thomson\",\n      \"release\": \"1984\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/thomson\",\n      \"platform\": \"thomson\",\n      \"theme\": \"thomson\",\n      \"command\": \"default\",\n      \"extensions\": [\n\t\t\".fd\",\n\t\t\".sap\",\n\t\t\".k7\",\n\t\t\".m7\",\n\t\t\".m5\",\n\t\t\".rom\",\n\t\t\".zip\"\t\t\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"theodore\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"vircon32\",\n      \"fullname\": \"Vircon32\",\n      \"manufacturer\": \"Carra\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/vircon32\",\n      \"platform\": \"vircon32\",\n      \"theme\": \"vircon32\",\n      \"command\": \"default\",\n      \"extensions\": [\n\t\t\".v32\",\n\t\t\".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"vircon32\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"scv\",\n      \"fullname\": \"Super Cassette Vision\",\n      \"manufacturer\": \"Epoch Co.\",\n      \"release\": \"1984\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/scv\",\n      \"platform\": \"scv\",\n      \"theme\": \"scv\",\n      \"command\": \"default\",\n      \"extensions\": [\n\t\t\".bin\",\n\t\t\".0\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"emuscv\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"astrocde\",\n      \"fullname\": \"Bally Astrocade\",\n      \"manufacturer\": \"Bally Manufacturing\",\n      \"release\": \"1978\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/astrocde\",\n      \"platform\": \"astrocde\",\n      \"theme\": \"astrocde\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".bin\",\n\t\t\".zip\",\n\t\t\".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"arcadia\",\n      \"fullname\": \"Arcadia 2001\",\n      \"manufacturer\": \"Emerson\",\n      \"release\": \"1982\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/arcadia\",\n      \"platform\": \"arcadia\",\n      \"theme\": \"arcadia\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".cmd\",\n\t\t\".zip\",\n\t\t\".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"crvision\",\n      \"fullname\": \"CreatiVision\",\n      \"manufacturer\": \"VTech\",\n      \"release\": \"1982\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/crvision\",\n      \"platform\": \"crvision\",\n      \"theme\": \"crvision\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".cmd\",\n\t\t\".bin\",\n\t\t\".rom\",\n\t\t\".zip\",\n\t\t\".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            },\n\t\t\t{\n              \"name\": \"jollycv\"\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"gmaster\",\n      \"fullname\": \"Game Master\",\n      \"manufacturer\": \"Hartung\",\n      \"release\": \"1990\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/gmaster\",\n      \"platform\": \"gmaster\",\n      \"theme\": \"gmaster\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".cmd\",\n\t\t\".bin\",\n\t\t\".zip\",\n\t\t\".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"archimedes\",\n      \"fullname\": \"Archimede\",\n      \"manufacturer\": \"Acorn Computers\",\n      \"release\": \"1987\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/archimedes\",\n      \"platform\": \"archimedes\",\n      \"theme\": \"archimedes\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".cmd\",\n\t\t\".mfi\",\n\t\t\".dfi\",\n\t\t\".hfe\",\n\t\t\".mfm\",\n\t\t\".td0\",\n\t\t\".imd\",\n\t\t\".d77\",\n\t\t\".d88\",\n\t\t\".ldd\",\n\t\t\".cqm\",\n\t\t\".cqi\",\n\t\t\".dsk\",\n\t\t\".ima\",\n\t\t\".img\",\n\t\t\".ufi\",\n\t\t\".360\",\n\t\t\".ipf\",\n\t\t\".adf\",\n\t\t\".apd\",\n\t\t\".jfd\",\n\t\t\".asd\",\n\t\t\".adm\",\n\t\t\".adl\",\n\t\t\".ssd\",\n\t\t\".bbc\",\n\t\t\".dsd\",\n\t\t\".st\",\n\t\t\".msa\",\n\t\t\".chd\",\t\t\n\t\t\".zip\",\n\t\t\".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"electron\",\n      \"fullname\": \"Electron\",\n      \"manufacturer\": \"Acorn Computers\",\n      \"release\": \"1983\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/electron\",\n      \"platform\": \"electron\",\n      \"theme\": \"electron\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".cmd\",\n\t\t\".bin\",\n\t\t\".zip\",\n\t\t\".wav\",\n\t\t\".csw\",\n\t\t\".uef\",\n\t\t\".mfi\",\n\t\t\".dfi\",\n\t\t\".hfe\",\n\t\t\".mfm\",\n\t\t\".td0\",\n\t\t\".imd\",\n\t\t\".d77\",\n\t\t\".d88\",\n\t\t\".ldd\",\n\t\t\".cqm\",\n\t\t\".cqi\",\n\t\t\".dsk\",\n\t\t\".ssd\",\n\t\t\".bbc\",\n\t\t\".img\",\n\t\t\".dsd\",\n\t\t\".adf\",\n\t\t\".ads\",\n\t\t\".adm\",\n\t\t\".adl\",\n\t\t\".rom\",\n\t\t\".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"pc88\",\n      \"fullname\": \"NEC PC-8800\",\n      \"manufacturer\": \"NEC\",\n      \"release\": \"1981\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/pc88\",\n      \"platform\": \"pc88\",\n      \"theme\": \"pc88\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".d88\",\n\t\t\".u88\",\n\t\t\".m3u\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"quasi88\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"apfm1000\",\n      \"fullname\": \"APF-MP1000\",\n      \"manufacturer\": \"APF Electronics\",\n      \"release\": \"1978\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/apfm1000\",\n      \"platform\": \"apfm1000\",\n      \"theme\": \"apfm1000\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".bin\",\n\t\t\".zip\",\n\t\t\".7z\",\n\t\t\".cmd\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"gamecom\",\n      \"fullname\": \"Game.com\",\n      \"manufacturer\": \"Tiger Electronics\",\n      \"release\": \"1997\",\n      \"hardware\": \"portable\",\n      \"path\": \"/storage/roms/gamecom\",\n      \"platform\": \"gamecom\",\n      \"theme\": \"gamecom\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".bin\",\n\t\t\".tgc\",\n\t\t\".zip\",\n\t\t\".7z\",\n\t\t\".cmd\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"vc4000\",\n      \"fullname\": \"Interton Video Computer 4000\",\n      \"manufacturer\": \"Interton\",\n      \"release\": \"1978\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/vc4000\",\n      \"platform\": \"vc4000\",\n      \"theme\": \"vc4000\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".bin\",\n\t\t\".rom\",\n\t\t\".pgm\",\n\t\t\".tvc\",\n\t\t\".zip\",\n\t\t\".7z\",\n\t\t\".cmd\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"advision\",\n      \"fullname\": \"Adventure Vision\",\n      \"manufacturer\": \"Entex Industries\",\n      \"release\": \"1982\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/advision\",\n      \"platform\": \"advision\",\n      \"theme\": \"advision\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".bin\",\n\t\t\".zip\",\n\t\t\".7z\",\n\t\t\".cmd\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"vsmile\",\n      \"fullname\": \"V.Smile\",\n      \"manufacturer\": \"Vtech\",\n      \"release\": \"2005\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/vsmile\",\n      \"platform\": \"vsmile\",\n      \"theme\": \"vsmile\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".u1\",\n\t\t\".u3\",\n\t\t\".bin\",\n\t\t\".zip\",\n\t\t\".7z\",\n\t\t\".cmd\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"socrates\",\n      \"fullname\": \"Socrates\",\n      \"manufacturer\": \"Vtech\",\n      \"release\": \"1988\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/socrates\",\n      \"platform\": \"socrates\",\n      \"theme\": \"socrates\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".bin\",\n\t\t\".zip\",\n\t\t\".7z\",\n\t\t\".cmd\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n\t\t\"name\": \"ti99\",\n\t\t\"fullname\": \"Texas Instruments TI-99/4A\",\n\t\t\"manufacturer\": \"Texas Instruments\",\n\t\t\"release\": \"1979\",\n\t\t\"hardware\": \"computer\",\n\t\t\"path\": \"/storage/roms/ti99\",\n\t\t\"platform\": \"ti99\",\n\t\t\"theme\": \"ti99\",\n\t\t\"command\": \"default\",\n\t\t\"extensions\": [\n\t\t\t\".rpk\",\n\t\t\t\".wav\",\n\t\t\t\".zip\",\n\t\t\t\".7z\",\n\t\t\t\".ctg\",\n\t\t\t\".cmd\"\n\t\t],\n\t\t\"emulators\": [\n\t\t\t{\n\t\t\t\"name\": \"libretro\",\n\t\t\t\"cores\": [\n\t\t\t\t{\n\t\t\t\t\"name\": \"mame\",\n\t\t\t\t\"default\": true\n\t\t\t\t}\n\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\"name\": \"ti99sim\",\n\t\t\t\"cores\": [\n\t\t\t\t{\n\t\t\t\t\"name\": \"ti99sim\"\n\t\t\t\t}\n\t\t\t]\n\t\t\t}\n\t\t]\n\t},\n\n\t{\n      \"name\": \"multivision\",\n      \"fullname\": \"Othello Multivision\",\n      \"manufacturer\": \"Tsukuda Original\",\n      \"release\": \"1983\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/multivision\",\n      \"platform\": \"multivision\",\n      \"theme\": \"multivision\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".bin\",\n\t\t\".sg\",\n\t\t\".zip\",\n\t\t\".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"picodrive\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"tutor\",\n      \"fullname\": \"Tomy Tutor\",\n      \"manufacturer\": \"Tomy\",\n      \"release\": \"1983\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/tutor\",\n      \"platform\": \"tutor\",\n      \"theme\": \"tutor\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".bin\",\n\t\t\".wav\",\n\t\t\".zip\",\n\t\t\".7z\",\n\t\t\".cmd\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"pico8\",\n      \"fullname\": \"Sega Pico\",\n      \"manufacturer\": \"Sega\",\n      \"release\": \"1993\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/pico\",\n      \"platform\": \"pico\",\n      \"theme\": \"pico\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".bin\",\n\t\t\".md\",\n\t\t\".zip\",\n\t\t\".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"genesis_plus_gx\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"zmachine\",\n      \"fullname\": \"Z-Machine\",\n      \"manufacturer\": \"\",\n      \"release\": \"\",\n      \"hardware\": \"\",\n      \"path\": \"/storage/roms/zmachine\",\n      \"platform\": \"zmachine\",\n      \"theme\": \"zmachine\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".dat\",\n\t\t\".zip\",\n\t\t\".z1\",\n\t\t\".z2\",\n\t\t\".z3\",\n\t\t\".z4\",\n\t\t\".z5\",\n\t\t\".z6\",\n\t\t\".z7\",\n\t\t\".z8\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mojozork\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"chip8\",\n      \"fullname\": \"CHIP-8\",\n      \"manufacturer\": \"Joseph Weisbecker\",\n      \"release\": \"1978\",\n      \"hardware\": \"console\",\n      \"path\": \"/storage/roms/chip8\",\n      \"platform\": \"chip8\",\n      \"theme\": \"chip8\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".ch8\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"jaxe\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"fm7\",\n      \"fullname\": \"Fujitsu Micro 7\",\n      \"manufacturer\": \"Fujitsu\",\n      \"release\": \"1982\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/fm7\",\n      \"platform\": \"fm7\",\n      \"theme\": \"fm7\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".wav\",\n\t\t\".t77\",\n\t\t\".mfi\",\n\t\t\".dfi\",\n\t\t\".hfe\",\n\t\t\".mfm\",\n\t\t\".td0\",\n\t\t\".imd\",\n\t\t\".d77\",\n\t\t\".d88\",\n\t\t\".1dd\",\n\t\t\".cqm\",\n\t\t\".cqi\",\n\t\t\".dsk\",\n\t\t\".zip\",\n\t\t\".7z\",\n\t\t\".cmd\"\n\t\t\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    },\n\t{\n      \"name\": \"dragon32\",\n      \"fullname\": \"Dragon 32\",\n      \"manufacturer\": \"Dragon Data\",\n      \"release\": \"1982\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/dragon32\",\n      \"platform\": \"dragon32\",\n      \"theme\": \"dragon32\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".cas\",\n        \".wav\",\n        \".k7\",\n        \".vdk\",\n        \".jvc\",\n        \".dsk\",\n        \".cmd\",\n        \".zip\",\n        \".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"xroar\",\n          \"cores\": [\n            {\n              \"name\": \"xroar\",\n              \"default\": true\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"dragon64\",\n      \"fullname\": \"Dragon 64\",\n      \"manufacturer\": \"Dragon Data\",\n      \"release\": \"1983\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/dragon64\",\n      \"platform\": \"dragon64\",\n      \"theme\": \"dragon64\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".cas\",\n        \".wav\",\n        \".k7\",\n        \".vdk\",\n        \".jvc\",\n        \".dsk\",\n        \".cmd\",\n        \".zip\",\n        \".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"xroar\",\n          \"cores\": [\n            {\n              \"name\": \"xroar\",\n              \"default\": true\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"coco\",\n      \"fullname\": \"TRS-80 CoCo\",\n      \"manufacturer\": \"Tandy\",\n      \"release\": \"1980\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/coco\",\n      \"platform\": \"coco\",\n      \"theme\": \"coco\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".cas\",\n        \".wav\",\n        \".k7\",\n        \".vdk\",\n        \".jvc\",\n        \".dsk\",\n        \".cmd\",\n        \".zip\",\n        \".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"xroar\",\n          \"cores\": [\n            {\n              \"name\": \"xroar\",\n              \"default\": true\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"coco3\",\n      \"fullname\": \"TRS-80 CoCo 3\",\n      \"manufacturer\": \"Tandy\",\n      \"release\": \"1986\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/coco3\",\n      \"platform\": \"coco3\",\n      \"theme\": \"coco3\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".cas\",\n        \".wav\",\n        \".k7\",\n        \".vdk\",\n        \".jvc\",\n        \".dsk\",\n        \".cmd\",\n        \".zip\",\n        \".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"xroar\",\n          \"cores\": [\n            {\n              \"name\": \"xroar\",\n              \"default\": true\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"name\": \"mc10\",\n      \"fullname\": \"Tandy MC-10\",\n      \"manufacturer\": \"Tandy\",\n      \"release\": \"1983\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/mc10\",\n      \"platform\": \"mc10\",\n      \"theme\": \"mc10\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".c10\",\n        \".k7\",\n        \".cmd\",\n        \".zip\",\n        \".7z\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"xroar\",\n          \"cores\": [\n            {\n              \"name\": \"xroar\",\n              \"default\": true\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\"\n            }\n          ]\n        }\n      ]\n    },\n\t{\n\t  \"name\": \"oricutron\",\n      \"fullname\": \"Oric Atmos\",\n      \"manufacturer\": \"Tangerine Computer Systems\",\n      \"release\": \"1984\",\n      \"hardware\": \"computer\",\n      \"path\": \"/storage/roms/oricatmos\",\n      \"platform\": \"oricatmos\",\n      \"theme\": \"oricatmos\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".tap\",\n        \".dsk\",\n        \".cmd\",\n        \".zip\"\n\t\t\t\t\t],\n      \"emulators\": [\n        {\n          \"name\": \"oricutron\",\n          \"cores\": [\n            {\n              \"name\": \"oricutron\",\n              \"default\": true\n            }\n          ]\n        },\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"mame\"\n            }\n          ]\n        }\n      ]\n    },\n\t{\n\t\"name\": \"x16\",\n\t\"fullname\": \"Commander X16\",\n\t\"manufacturer\": \"X16Community\",\n\t\"release\": \"2020\",\n\t\"hardware\": \"computer\",\n\t\"path\": \"/storage/roms/x16\",\n\t\"platform\": \"x16\",\n\t\"theme\": \"x16\",\n\t\"command\": \"default\",\n\t\"extensions\": [\n    \".prg\",\n    \".bas\",\n    \".img\",\n    \".crt\"\n\t],\n\t\"emulators\": [\n    {\n      \"name\": \"x16emu\",\n      \"cores\": [\n\t\t\t{\n          \"name\": \"x16emu\",\n          \"default\": true\n\t\t\t}\n\t\t]\n\t\t}\n\t]\n\t},\n\t{\n\t\"name\": \"dice\",\n\t\"fullname\": \"Discrete Integrated Circuit Emulator\",\n\t\"manufacturer\": \"\",\n\t\"release\": \"2008\",\n\t\"hardware\": \"computer\",\n\t\"path\": \"/storage/roms/dice\",\n\t\"platform\": \"dice\",\n\t\"theme\": \"dice\",\n\t\"command\": \"default\",\n\t\"extensions\": [\n    \".zip\",\n    \".dmy\"\n\t],\n\t\"emulators\": [\n    {\n      \"name\": \"libretro\",\n      \"cores\": [\n\t\t\t{\n          \"name\": \"dice\",\n          \"default\": true\n\t\t\t}\n\t\t]\n\t\t}\n\t]\n\t},\n\t{\n\t\"name\": \"lowresnx\",\n\t\"fullname\": \"Lowres NX\",\n\t\"manufacturer\": \"\",\n\t\"release\": \"\",\n\t\"hardware\": \"computer\",\n\t\"path\": \"/storage/roms/lowresnx\",\n\t\"platform\": \"lowresnx\",\n\t\"theme\": \"lowresnx\",\n\t\"command\": \"default\",\n\t\"extensions\": [\n    \".nx\",\n\t\".zip\",\n\t\".7z.\"\n\t],\n\t\"emulators\": [\n    {\n      \"name\": \"libretro\",\n      \"cores\": [\n\t\t\t{\n          \"name\": \"lowresnx\",\n          \"default\": true\n\t\t\t}\n\t\t]\n\t\t}\n\t]\n\t},\n    {\n      \"name\": \"bk\",\n      \"fullname\": \"Electronika\",\n      \"path\": \"/storage/roms/bk\",\n      \"platform\": \"bk\",\n      \"theme\": \"bk\",\n      \"command\": \"default\",\n      \"extensions\": [\n        \".bin\",\n        \".zip\"\n      ],\n      \"emulators\": [\n        {\n          \"name\": \"libretro\",\n          \"cores\": [\n            {\n              \"name\": \"bk\",\n              \"default\": true\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/config/resources/services/index.html",
    "content": "<!DOCTYPE html>\r\n<html lang='fr'>\r\n<head>\t\t\t\r\n\t<title>EmuELEC-EmulationStation Web services</title>\r\n\t<link rel=\"shortcut icon\" href=\"favicon.png\">\r\n\t<link href=\"main.css\" rel=\"stylesheet\">\r\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n</head>\r\n<body>\r\n\t<div class=\"container\">\r\n\t\t<div id=\"notificationBanner\" class=\"notification-banner\" style=\"display: none;\">\r\n\t\t\t<span id=\"notificationText\"></span>\r\n\t\t\t<button onclick=\"document.getElementById('notificationBanner').style.display='none'\" style=\"background: none; border: none; color: white; font-size: 20px; cursor: pointer; padding: 0 10px;\">×</button>\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"header\">\r\n\t\t\t<div class=\"header-left\">\r\n\t\t\t\t<img src=\"favicon.png\" alt=\"ES\">\r\n\t\t\t\t<h1>EmuELEC-EmulationStation Web Services</h1>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"status-bar\">\r\n\t\t\t\t<div class=\"status-item\">\r\n\t\t\t\t\t<div class=\"status-dot\"></div>\r\n\t\t\t\t\t<span id=\"statusText\">Ready</span>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"status-item\" id=\"runningGame\" style=\"display: none;\">\r\n\t\t\t\t\tPlaying: <span id=\"runningGameText\">None</span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"toolbar\">\r\n\t\t\t<button class=\"btn btn-primary\" onclick=\"app.showView('games')\">Games</button>\r\n\t\t\t<button class=\"btn btn-primary\" onclick=\"app.showView('config')\">Config Editor</button>\r\n\t\t\t<button class=\"btn btn-primary\" onclick=\"app.showView('tools')\">Tools</button>\r\n\t\t\t<button class=\"btn btn-secondary\" onclick=\"app.showMessageBox()\">Send Message To Box</button>\r\n\t\t\t<button class=\"btn btn-secondary\" onclick=\"app.showNotification()\">Send Notification To Box</button>\r\n\t\t\t<button class=\"btn btn-warning\" onclick=\"app.killEmulator()\">Kill Emulator</button>\r\n\t\t\t<button class=\"btn btn-warning\" onclick=\"app.reloadGames()\">Reload ES Games</button>\r\n\t\t\t<button class=\"btn btn-danger\" onclick=\"app.quit()\">Restart ES</button>\r\n\t\t\t<button class=\"btn btn-danger\" onclick=\"app.restart()\">Restart System</button>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"main-content\" id=\"gamesView\">\r\n\t\t\t<div class=\"sidebar\">\r\n\t\t\t\t<h3>Systems</h3>\r\n\t\t\t\t<div id=\"systemList\"></div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"content-area\">\r\n\t\t\t\t<div class=\"search-bar\">\r\n\t\t\t\t\t<div style=\"display: flex; gap: 15px; align-items: center; flex-wrap: wrap;\">\r\n\t\t\t\t\t\t<input type=\"text\" class=\"search-input\" id=\"searchInput\" placeholder=\"Search games...\" onkeyup=\"app.filterGames()\" style=\"flex: 1; min-width: 200px;\">\r\n\t\t\t\t\t\t<button class=\"btn btn-primary\" onclick=\"app.scrapeSystem()\" style=\"white-space: nowrap;\">Scrape System</button>\r\n\t\t\t\t\t\t<select id=\"filterField\" class=\"search-input\" style=\"flex: 0 0 200px;\" onchange=\"app.filterGames()\">\r\n\t\t\t\t\t\t\t<option value=\"\">Filter by: None</option>\r\n\t\t\t\t\t\t\t<option value=\"favorite\">Filter by: Favorite</option>\r\n\t\t\t\t\t\t\t<option value=\"notscraped\">Filter by: Not Scraped</option>\r\n\t\t\t\t\t\t\t<option value=\"hascheevos\">Filter by: Has Cheevos</option>\r\n\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t<label style=\"display: flex; align-items: center; gap: 5px; white-space: nowrap; cursor: pointer;\">\r\n\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"invertFilter\" onchange=\"app.filterGames()\" style=\"cursor: pointer;\">\r\n\t\t\t\t\t\t\t<span style=\"font-size: 14px;\">Invert</span>\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t<select id=\"sortField\" class=\"search-input\" style=\"flex: 0 0 200px;\" onchange=\"app.sortGames()\">\r\n\t\t\t\t\t\t\t<option value=\"favorite\">Sort by: Favorite</option>\r\n\t\t\t\t\t\t\t<option value=\"name\">Sort by: Name</option>\r\n\t\t\t\t\t\t\t<option value=\"rating\">Sort by: Rating</option>\r\n\t\t\t\t\t\t\t<option value=\"releasedate\">Sort by: Release Date</option>\r\n\t\t\t\t\t\t\t<option value=\"developer\">Sort by: Developer</option>\r\n\t\t\t\t\t\t\t<option value=\"publisher\">Sort by: Publisher</option>\r\n\t\t\t\t\t\t\t<option value=\"genre\">Sort by: Genre</option>\r\n\t\t\t\t\t\t\t<option value=\"family\">Sort by: Family</option>\r\n\t\t\t\t\t\t\t<option value=\"players\">Sort by: Players</option>\r\n\t\t\t\t\t\t\t<option value=\"playcount\">Sort by: Play Count</option>\r\n\t\t\t\t\t\t\t<option value=\"lastplayed\">Sort by: Last Played</option>\r\n\t\t\t\t\t\t\t<option value=\"gametime\">Sort by: Game Time</option>\r\n\t\t\t\t\t\t\t<option value=\"region\">Sort by: Region</option>\r\n\t\t\t\t\t\t\t<option value=\"lang\">Sort by: Language</option>\r\n\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t<select id=\"sortOrder\" class=\"search-input\" style=\"flex: 0 0 120px;\" onchange=\"app.sortGames()\">\r\n\t\t\t\t\t\t\t<option value=\"desc\">Descending</option>\r\n\t\t\t\t\t\t\t<option value=\"asc\">Ascending</option>\r\n\t\t\t\t\t\t</select>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div class=\"games-grid\" id=\"gamesContainer\">\r\n\t\t\t\t\t<div class=\"loading\">\r\n\t\t\t\t\t\t<div class=\"spinner\"></div>\r\n\t\t\t\t\t\t<p>Select a system to view games</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"main-content\" id=\"configView\" style=\"display: none;\">\r\n\t\t\t<div class=\"sidebar\">\r\n\t\t\t\t<h3>Config Files</h3>\r\n\t\t\t\t<div style=\"padding: 10px 20px;\">\r\n\t\t\t\t\t<button class=\"btn btn-primary\" style=\"width: 100%; margin-bottom: 10px;\" onclick=\"app.loadConfigList()\">Refresh</button>\r\n\t\t\t\t\t<button class=\"btn btn-secondary\" style=\"width: 100%;\" onclick=\"app.createNewConfigFile()\">New File</button>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div id=\"configList\"></div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"content-area\">\r\n\t\t\t\t<div id=\"configEditorContainer\" class=\"games-grid\">\r\n\t\t\t\t\t<div class=\"empty-state\">\r\n\t\t\t\t\t\t<div class=\"empty-state-icon\">[ ]</div>\r\n\t\t\t\t\t\t<h3>Select a config file to edit</h3>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"main-content\" id=\"toolsView\" style=\"display: none;\">\r\n\t\t\t<div class=\"content-area\" style=\"width: 100%;\">\r\n\t\t\t\t<div class=\"games-grid\">\r\n\t\t\t\t\t<div class=\"tools-section\">\r\n\t\t\t\t\t\t<h2>System Tools</h2>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"tool-card\">\r\n\t\t\t\t\t\t\t<h3>Add/Update System</h3>\r\n\t\t\t\t\t\t\t<p>Add a new system or update an existing one in es_systems.cfg.</p>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<div style=\"background: #f1f5f9; padding: 15px; border-radius: 8px; margin-bottom: 15px; border-left: 4px solid #667eea;\">\r\n\t\t\t\t\t\t\t\t<strong style=\"color: #334155;\">Default run command:</strong><br>\r\n\t\t\t\t\t\t\t\t<code style=\"background: white; padding: 8px; display: block; margin-top: 8px; border-radius: 4px; font-size: 12px; color: #334155; word-break: break-all;\">emuelecRunEmu.sh %ROM% -P%SYSTEM% --core=%CORE% --emulator=%EMULATOR% --controllers=\"%CONTROLLERSCONFIG%\"</code>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<label class=\"tool-label\">System XML:</label>\r\n\t\t\t\t\t\t\t<textarea id=\"addSystemXML\" class=\"tool-textarea\" style=\"height: 300px;\" placeholder=\"<system>\r\n  <name>systemname</name>\r\n  <fullname>System Name</fullname>\r\n  <path>/storage/roms/systemname</path>\r\n  <extension>.zip .ZIP</extension>\r\n  <command>emuelecRunEmu.sh %ROM%</command>\r\n  <platform>systemname</platform>\r\n  <theme>systemname</theme>\r\n</system>\"></textarea>\r\n\t\t\t\t\t\t\t<button class=\"btn btn-primary\" onclick=\"app.addSystem()\">Add/Update System</button>\r\n\t\t\t\t\t\t\t<div id=\"addSystemResult\" class=\"tool-result\"></div>\r\n\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t<div class=\"tool-card\">\r\n\t\t\t\t\t\t\t<h3>Remove System</h3>\r\n\t\t\t\t\t\t\t<p>Remove a system from es_systems.cfg. This does NOT delete ROM files.</p>\r\n\t\t\t\t\t\t\t<label class=\"tool-label\">Select System:</label>\r\n\t\t\t\t\t\t\t<select id=\"removeSystemSelect\" class=\"tool-input\">\r\n\t\t\t\t\t\t\t\t<option value=\"\">-- Select a system --</option>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t<button class=\"btn btn-danger\" onclick=\"app.removeSystem()\">Remove System</button>\r\n\t\t\t\t\t\t\t<div id=\"removeSystemResult\" class=\"tool-result\"></div>\r\n\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t<div class=\"tool-card\">\r\n\t\t\t\t\t\t\t<h3>Add/Update Emulator or Core</h3>\r\n\t\t\t\t\t\t\t<p>Add an emulator with cores to a system, or update an existing one.</p>\r\n\t\t\t\t\t\t\t<label class=\"tool-label\">Select System:</label>\r\n\t\t\t\t\t\t\t<select id=\"addEmulatorSystem\" class=\"tool-input\">\r\n\t\t\t\t\t\t\t\t<option value=\"\">-- Select a system --</option>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t<label class=\"tool-label\">Emulator XML:</label>\r\n\t\t\t\t\t\t\t<textarea id=\"addEmulatorXML\" class=\"tool-textarea\" style=\"height: 200px;\" placeholder='<emulator name=\"libretro\">\r\n  <cores>\r\n    <core default=\"true\">corename</core>\r\n    <core>another_core</core>\r\n  </cores>\r\n</emulator>'></textarea>\r\n\t\t\t\t\t\t\t<button class=\"btn btn-primary\" onclick=\"app.addEmulator()\">Add/Update Emulator</button>\r\n\t\t\t\t\t\t\t<div id=\"addEmulatorResult\" class=\"tool-result\"></div>\r\n\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t<div class=\"tool-card\">\r\n\t\t\t\t\t\t\t<h3>Remove Emulator</h3>\r\n\t\t\t\t\t\t\t<p>Remove an emulator and all its cores from a system.</p>\r\n\t\t\t\t\t\t\t<label class=\"tool-label\">Select System:</label>\r\n\t\t\t\t\t\t\t<select id=\"removeEmulatorSystem\" class=\"tool-input\">\r\n\t\t\t\t\t\t\t\t<option value=\"\">-- Select a system --</option>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t<label class=\"tool-label\">Emulator Name:</label>\r\n\t\t\t\t\t\t\t<input type=\"text\" id=\"removeEmulatorName\" placeholder=\"e.g., libretro\" class=\"tool-input\">\r\n\t\t\t\t\t\t\t<button class=\"btn btn-danger\" onclick=\"app.removeEmulator()\">Remove Emulator</button>\r\n\t\t\t\t\t\t\t<div id=\"removeEmulatorResult\" class=\"tool-result\"></div>\r\n\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t<div class=\"tool-card\">\r\n\t\t\t\t\t\t\t<h3>Add Games</h3>\r\n\t\t\t\t\t\t\t<p>Import games to a system using gamelist.xml format. This will add new games or update existing ones.</p>\r\n\t\t\t\t\t\t\t<label class=\"tool-label\">Select System:</label>\r\n\t\t\t\t\t\t\t<select id=\"addGamesSystem\" class=\"tool-input\">\r\n\t\t\t\t\t\t\t\t<option value=\"\">-- Select a system --</option>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t<label class=\"tool-label\">Gamelist XML:</label>\r\n\t\t\t\t\t\t\t<textarea id=\"addGamesXML\" class=\"tool-textarea\" style=\"height: 200px;\" placeholder=\"<?xml version=&quot;1.0&quot;?>\r\n<gameList>\r\n    <game>\r\n        <path>./MyGame.zip</path>\r\n        <name>My Game</name>\r\n        <desc>Description here</desc>\r\n        <rating>0.8</rating>\r\n        <developer>Developer</developer>\r\n        <genre>Action</genre>\r\n    </game>\r\n</gameList>\"></textarea>\r\n\t\t\t\t\t\t\t<button class=\"btn btn-primary\" onclick=\"app.addGames()\">Add Games</button>\r\n\t\t\t\t\t\t\t<div id=\"addGamesResult\" class=\"tool-result\"></div>\r\n\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t<div class=\"tool-card\">\r\n\t\t\t\t\t\t\t<h3>Remove Games</h3>\r\n\t\t\t\t\t\t\t<p>Remove games from a system. This will delete the ROM files and remove them from gamelists.</p>\r\n\t\t\t\t\t\t\t<label class=\"tool-label\">Select System:</label>\r\n\t\t\t\t\t\t\t<select id=\"removeGamesSystem\" class=\"tool-input\">\r\n\t\t\t\t\t\t\t\t<option value=\"\">-- Select a system --</option>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t<label class=\"tool-label\">Gamelist XML (with games to remove):</label>\r\n\t\t\t\t\t\t\t<textarea id=\"removeGamesXML\" class=\"tool-textarea\" style=\"height: 200px;\" placeholder=\"<?xml version=&quot;1.0&quot;?>\r\n<gameList>\r\n    <game>\r\n        <path>./GameToRemove.zip</path>\r\n    </game>\r\n</gameList>\"></textarea>\r\n\t\t\t\t\t\t\t<button class=\"btn btn-danger\" onclick=\"app.removeGames()\">Remove Games (Deletes Files!)</button>\r\n\t\t\t\t\t\t\t<div id=\"removeGamesResult\" class=\"tool-result\"></div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<div class=\"modal\" id=\"gameModal\">\r\n\t\t<div class=\"modal-content\">\r\n\t\t\t<div class=\"modal-header\">\r\n\t\t\t\t<h2 class=\"modal-title\" id=\"modalTitle\">Game Details</h2>\r\n\t\t\t\t<button class=\"modal-close\" onclick=\"app.closeModal()\">&#10005;</button>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"modal-body\" id=\"modalBody\"></div>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<script src=\"main.js\"></script>\r\n</body>\r\n</html>\r\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/config/resources/services/main.css",
    "content": "* {\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\nbody {\r\n\tfont-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;\r\n\tbackground: linear-gradient(135deg, #764ba2 0%, #222655 100%);\r\n\tcolor: #333;\r\n\theight: 100vh;\r\n\toverflow: hidden;\r\n}\r\n\r\n.container {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\theight: 100vh;\r\n\tmax-width: 1800px;\r\n\tmargin: 0 auto;\r\n\tbackground: rgba(255, 255, 255, 0.95);\r\n\tbox-shadow: 0 0 50px rgba(0, 0, 0, 0.3);\r\n}\r\n\r\n.header {\r\n\tbackground: linear-gradient(135deg, #764ba2 0%, #222655 100%);\r\n\tcolor: white;\r\n\tpadding: 20px 30px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: space-between;\r\n\tbox-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.header-left {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tgap: 15px;\r\n}\r\n\r\n.header-left img {\r\n\theight: 32px;\r\n}\r\n\r\n.header-left h1 {\r\n\tfont-size: 24px;\r\n\tfont-weight: 600;\r\n}\r\n\r\n.status-bar {\r\n\tdisplay: flex;\r\n\tgap: 20px;\r\n\tfont-size: 14px;\r\n}\r\n\r\n.status-item {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tgap: 8px;\r\n\tbackground: rgba(255, 255, 255, 0.2);\r\n\tpadding: 6px 12px;\r\n\tborder-radius: 6px;\r\n}\r\n\r\n.status-dot {\r\n\twidth: 8px;\r\n\theight: 8px;\r\n\tborder-radius: 50%;\r\n\tbackground: #4ade80;\r\n\tanimation: pulse 2s infinite;\r\n}\r\n\r\n@keyframes pulse {\r\n\t0%, 100% { opacity: 1; }\r\n\t50% { opacity: 0.5; }\r\n}\r\n\r\n.toolbar {\r\n\tbackground: #51447d;\r\n\tpadding: 15px 30px;\r\n\tborder-bottom: 1px solid #e2e8f0;\r\n\tdisplay: flex;\r\n\tgap: 10px;\r\n\tflex-wrap: wrap;\r\n}\r\n\r\n.btn {\r\n\tpadding: 10px 20px;\r\n\tborder: none;\r\n\tborder-radius: 8px;\r\n\tcursor: pointer;\r\n\tfont-size: 14px;\r\n\tfont-weight: 500;\r\n\ttransition: all 0.2s;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tgap: 8px;\r\n}\r\n\r\n.btn:hover {\r\n\ttransform: translateY(-2px);\r\n\tbox-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\r\n}\r\n\r\n.btn-primary {\r\n\tbackground: #667eea;\r\n\tcolor: white;\r\n}\r\n\r\n.btn-danger {\r\n\tbackground: #ef4444;\r\n\tcolor: white;\r\n}\r\n\r\n.btn-warning {\r\n\tbackground: #f59e0b;\r\n\tcolor: white;\r\n}\r\n\r\n.btn-secondary {\r\n\tbackground: #64748b;\r\n\tcolor: white;\r\n}\r\n\r\n.main-content {\r\n\tdisplay: flex;\r\n\tflex: 1;\r\n\toverflow: hidden;\r\n}\r\n\r\n.sidebar {\r\n\twidth: 280px;\r\n\tbackground: #1e293b;\r\n\tcolor: white;\r\n\toverflow-y: auto;\r\n\tborder-right: 1px solid #334155;\r\n}\r\n\r\n.sidebar h3 {\r\n\tpadding: 20px;\r\n\tfont-size: 14px;\r\n\ttext-transform: uppercase;\r\n\tletter-spacing: 1px;\r\n\tcolor: #94a3b8;\r\n}\r\n\r\n.system-item {\r\n\tpadding: 15px 20px;\r\n\tcursor: pointer;\r\n\ttransition: all 0.2s;\r\n\tborder-left: 3px solid transparent;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tgap: 12px;\r\n}\r\n\r\n.system-item:hover {\r\n\tbackground: #334155;\r\n\tborder-left-color: #667eea;\r\n}\r\n\r\n.system-item.active {\r\n\tbackground: #334155;\r\n\tborder-left-color: #667eea;\r\n}\r\n\r\n.system-item img {\r\n\theight: 24px;\r\n\tmax-width: 60px;\r\n\tobject-fit: contain;\r\n}\r\n\r\n.system-info {\r\n\tflex: 1;\r\n}\r\n\r\n.system-name {\r\n\tfont-weight: 500;\r\n\tfont-size: 14px;\r\n}\r\n\r\n.system-count {\r\n\tfont-size: 12px;\r\n\tcolor: #94a3b8;\r\n\tmargin-top: 2px;\r\n}\r\n\r\n.content-area {\r\n\tflex: 1;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\toverflow: hidden;\r\n}\r\n\r\n.search-bar {\r\n\tpadding: 20px 30px;\r\n\tbackground: white;\r\n\tborder-bottom: 1px solid #e2e8f0;\r\n}\r\n\r\n.search-input {\r\n\twidth: 100%;\r\n\tpadding: 12px 20px;\r\n\tborder: 2px solid #e2e8f0;\r\n\tborder-radius: 8px;\r\n\tfont-size: 14px;\r\n\ttransition: all 0.2s;\r\n}\r\n\r\n.search-input:focus {\r\n\toutline: none;\r\n\tborder-color: #667eea;\r\n}\r\n\r\n.games-grid {\r\n\tflex: 1;\r\n\toverflow-y: auto;\r\n\tpadding: 30px;\r\n}\r\n\r\n.grid {\r\n\tdisplay: grid;\r\n\tgrid-template-columns: repeat(auto-fill, minmax(280px, 1fr));\r\n\tgap: 24px;\r\n}\r\n\r\n.game-card {\r\n\tbackground: white;\r\n\tborder-radius: 12px;\r\n\toverflow: hidden;\r\n\tbox-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\r\n\ttransition: all 0.3s;\r\n\tcursor: pointer;\r\n}\r\n\r\n.game-card:hover {\r\n\ttransform: translateY(-4px);\r\n\tbox-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);\r\n}\r\n\r\n.game-image {\r\n\twidth: 100%;\r\n\theight: 200px;\r\n\tbackground: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tposition: relative;\r\n\toverflow: hidden;\r\n}\r\n\r\n.game-image img {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tobject-fit: cover;\r\n}\r\n\r\n.game-image-placeholder {\r\n\tfont-size: 48px;\r\n\tcolor: rgba(255, 255, 255, 0.5);\r\n}\r\n\r\n.game-info {\r\n\tpadding: 16px;\r\n}\r\n\r\n.game-name {\r\n\tfont-weight: 600;\r\n\tfont-size: 16px;\r\n\tmargin-bottom: 8px;\r\n\twhite-space: nowrap;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.game-desc {\r\n\tfont-size: 13px;\r\n\tcolor: #64748b;\r\n\tline-height: 1.5;\r\n\tdisplay: -webkit-box;\r\n\t-webkit-line-clamp: 3;\r\n\t-webkit-box-orient: vertical;\r\n\toverflow: hidden;\r\n\tmargin-bottom: 8px;\r\n}\r\n\r\n.game-meta {\r\n\tfont-size: 11px;\r\n\tcolor: #94a3b8;\r\n\tline-height: 1.4;\r\n\tpadding-top: 8px;\r\n\tborder-top: 1px solid #e2e8f0;\r\n}\r\n\r\n.game-actions {\r\n\tpadding: 12px 16px;\r\n\tborder-top: 1px solid #e2e8f0;\r\n\tdisplay: grid;\r\n\tgrid-template-columns: 1fr auto 1fr auto;\r\n\tgap: 8px;\r\n}\r\n\r\n.game-btn {\r\n\tpadding: 8px 12px;\r\n\tborder: none;\r\n\tborder-radius: 6px;\r\n\tcursor: pointer;\r\n\tfont-size: 12px;\r\n\tfont-weight: 500;\r\n\ttransition: all 0.2s;\r\n}\r\n\r\n.game-btn:hover {\r\n\topacity: 0.9;\r\n}\r\n\r\n.game-btn-play {\r\n\tbackground: #667eea;\r\n\tcolor: white;\r\n}\r\n\r\n.game-btn-info {\r\n\tbackground: #e2e8f0;\r\n\tcolor: #334155;\r\n}\r\n\r\n.game-btn-favorite {\r\n\tbackground: white;\r\n\tborder: 2px solid #94a3b8;\r\n\tcolor: #94a3b8;\r\n\tfont-size: 16px;\r\n\tpadding: 4px 8px;\r\n}\r\n\r\n.game-btn-scrape {\r\n\tbackground: #64748b;\r\n\tcolor: white;\r\n}\r\n\r\n.modal {\r\n\tdisplay: none;\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\tbackground: rgba(0, 0, 0, 0.7);\r\n\tz-index: 1000;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.modal.active {\r\n\tdisplay: flex;\r\n}\r\n\r\n.modal-content {\r\n\tbackground: white;\r\n\tborder-radius: 16px;\r\n\twidth: 90%;\r\n\tmax-width: 800px;\r\n\tmax-height: 90vh;\r\n\toverflow-y: auto;\r\n\tbox-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);\r\n}\r\n\r\n.modal-header {\r\n\tpadding: 24px;\r\n\tborder-bottom: 1px solid #e2e8f0;\r\n\tdisplay: flex;\r\n\tjustify-content: space-between;\r\n\talign-items: center;\r\n}\r\n\r\n.modal-title {\r\n\tfont-size: 20px;\r\n\tfont-weight: 600;\r\n}\r\n\r\n.modal-close {\r\n\tbackground: none;\r\n\tborder: none;\r\n\tfont-size: 24px;\r\n\tcursor: pointer;\r\n\tcolor: #64748b;\r\n\tpadding: 0;\r\n\twidth: 32px;\r\n\theight: 32px;\r\n\tborder-radius: 6px;\r\n\ttransition: all 0.2s;\r\n}\r\n\r\n.modal-close:hover {\r\n\tbackground: #f1f5f9;\r\n}\r\n\r\n.modal-body {\r\n\tpadding: 24px;\r\n}\r\n\r\n.loading {\r\n\ttext-align: center;\r\n\tpadding: 60px 30px;\r\n\tcolor: #64748b;\r\n}\r\n\r\n.spinner {\r\n\twidth: 48px;\r\n\theight: 48px;\r\n\tborder: 4px solid #e2e8f0;\r\n\tborder-top-color: #667eea;\r\n\tborder-radius: 50%;\r\n\tanimation: spin 1s linear infinite;\r\n\tmargin: 0 auto 20px;\r\n}\r\n\r\n@keyframes spin {\r\n\tto { transform: rotate(360deg); }\r\n}\r\n\r\n.empty-state {\r\n\ttext-align: center;\r\n\tpadding: 60px 30px;\r\n\tcolor: #64748b;\r\n}\r\n\r\n.empty-state-icon {\r\n\tfont-size: 64px;\r\n\tmargin-bottom: 16px;\r\n\topacity: 0.3;\r\n}\r\n\r\n::-webkit-scrollbar {\r\n\twidth: 10px;\r\n\theight: 10px;\r\n}\r\n\r\n::-webkit-scrollbar-track {\r\n\tbackground: #f1f5f9;\r\n}\r\n\r\n::-webkit-scrollbar-thumb {\r\n\tbackground: #cbd5e1;\r\n\tborder-radius: 5px;\r\n}\r\n\r\n::-webkit-scrollbar-thumb:hover {\r\n\tbackground: #94a3b8;\r\n}\r\n\r\n.tabs {\r\n\tdisplay: flex;\r\n\tgap: 4px;\r\n\tborder-bottom: 1px solid #e2e8f0;\r\n\tmargin-bottom: 20px;\r\n}\r\n\r\n.tab {\r\n\tpadding: 12px 20px;\r\n\tbackground: none;\r\n\tborder: none;\r\n\tcursor: pointer;\r\n\tfont-size: 14px;\r\n\tfont-weight: 500;\r\n\tcolor: #64748b;\r\n\tborder-bottom: 2px solid transparent;\r\n\ttransition: all 0.2s;\r\n}\r\n\r\n.tab:hover {\r\n\tcolor: #334155;\r\n}\r\n\r\n.tab.active {\r\n\tcolor: #667eea;\r\n\tborder-bottom-color: #667eea;\r\n}\r\n\r\n.form-group {\r\n\tmargin-bottom: 20px;\r\n}\r\n\r\n.form-label {\r\n\tdisplay: block;\r\n\tfont-size: 14px;\r\n\tfont-weight: 500;\r\n\tmargin-bottom: 8px;\r\n\tcolor: #334155;\r\n}\r\n\r\n.form-input, .form-textarea {\r\n\twidth: 100%;\r\n\tpadding: 10px 14px;\r\n\tborder: 2px solid #e2e8f0;\r\n\tborder-radius: 8px;\r\n\tfont-size: 14px;\r\n\ttransition: all 0.2s;\r\n}\r\n\r\n.form-textarea {\r\n\tresize: vertical;\r\n\tmin-height: 100px;\r\n}\r\n\r\n.form-input:focus, .form-textarea:focus {\r\n\toutline: none;\r\n\tborder-color: #667eea;\r\n}\r\n\r\n.media-grid {\r\n\tdisplay: grid;\r\n\tgrid-template-columns: repeat(auto-fill, minmax(150px, 1fr));\r\n\tgap: 12px;\r\n\tmargin-top: 12px;\r\n}\r\n\r\n.media-item {\r\n\taspect-ratio: 1;\r\n\tbackground: #f1f5f9;\r\n\tborder-radius: 8px;\r\n\toverflow: hidden;\r\n\tposition: relative;\r\n}\r\n\r\n.media-item img {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tobject-fit: cover;\r\n}\r\n\r\n.config-editor {\r\n\tpadding: 30px;\r\n\theight: 100%;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n}\r\n\r\n.config-editor-header {\r\n\tdisplay: flex;\r\n\tjustify-content: space-between;\r\n\talign-items: center;\r\n\tmargin-bottom: 20px;\r\n\tpadding-bottom: 15px;\r\n\tborder-bottom: 2px solid #e2e8f0;\r\n}\r\n\r\n.config-editor-title {\r\n\tfont-size: 20px;\r\n\tfont-weight: 600;\r\n\tcolor: #1e293b;\r\n}\r\n\r\n.config-editor-actions {\r\n\tdisplay: flex;\r\n\tgap: 10px;\r\n}\r\n\r\n.config-textarea {\r\n\tflex: 1;\r\n\twidth: 100%;\r\n\tpadding: 15px;\r\n\tborder: 2px solid #e2e8f0;\r\n\tborder-radius: 8px;\r\n\tfont-family: 'Courier New', monospace;\r\n\tfont-size: 13px;\r\n\tline-height: 1.5;\r\n\tresize: none;\r\n}\r\n\r\n.config-textarea:focus {\r\n\toutline: none;\r\n\tborder-color: #667eea;\r\n}\r\n\r\n.breadcrumb {\r\n\tpadding: 15px 20px;\r\n\tbackground: #f8fafc;\r\n\tborder-bottom: 1px solid #e2e8f0;\r\n\tfont-size: 14px;\r\n\tcolor: #64748b;\r\n}\r\n\r\n.breadcrumb a {\r\n\tcolor: #667eea;\r\n\ttext-decoration: none;\r\n\tcursor: pointer;\r\n}\r\n\r\n.breadcrumb a:hover {\r\n\ttext-decoration: underline;\r\n}\r\n\r\n.file-list-item {\r\n\tpadding: 12px 20px;\r\n\tcursor: pointer;\r\n\ttransition: all 0.2s;\r\n\tborder-left: 3px solid transparent;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tgap: 10px;\r\n}\r\n\r\n.file-list-item:hover {\r\n\tbackground: #334155;\r\n\tborder-left-color: #667eea;\r\n}\r\n\r\n.file-icon {\r\n\tfont-size: 16px;\r\n\twidth: 20px;\r\n}\r\n\r\n.file-name {\r\n\tflex: 1;\r\n\tfont-size: 13px;\r\n}\r\n\r\n.tools-section {\r\n\tmax-width: 1200px;\r\n\tmargin: 0 auto;\r\n}\r\n\r\n.tools-section h2 {\r\n\tcolor: #334155;\r\n\tmargin-bottom: 30px;\r\n}\r\n\r\n.tool-card {\r\n\tbackground: white;\r\n\tpadding: 30px;\r\n\tborder-radius: 12px;\r\n\tmargin-bottom: 30px;\r\n\tbox-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.tool-card h3 {\r\n\tcolor: #334155;\r\n\tmargin-bottom: 15px;\r\n}\r\n\r\n.tool-card p {\r\n\tcolor: #64748b;\r\n\tmargin-bottom: 15px;\r\n}\r\n\r\n.tool-input {\r\n\twidth: 100%;\r\n\tpadding: 10px;\r\n\tbackground: white;\r\n\tcolor: #334155;\r\n\tborder: 2px solid #e2e8f0;\r\n\tborder-radius: 8px;\r\n\tfont-size: 14px;\r\n\tmargin-bottom: 15px;\r\n}\r\n\r\n.tool-input:focus {\r\n\toutline: none;\r\n\tborder-color: #667eea;\r\n}\r\n\r\n.tool-textarea {\r\n\twidth: 100%;\r\n\tpadding: 15px;\r\n\tbackground: white;\r\n\tcolor: #334155;\r\n\tborder: 2px solid #e2e8f0;\r\n\tborder-radius: 8px;\r\n\tfont-family: monospace;\r\n\tfont-size: 12px;\r\n\tmargin-bottom: 15px;\r\n\tresize: vertical;\r\n}\r\n\r\n.tool-textarea:focus {\r\n\toutline: none;\r\n\tborder-color: #667eea;\r\n}\r\n\r\n.tool-result {\r\n\tmargin-top: 15px;\r\n\tpadding: 15px;\r\n\tbackground: #f1f5f9;\r\n\tborder-radius: 8px;\r\n\tcolor: #334155;\r\n\tdisplay: none;\r\n}\r\n\r\n.tool-label {\r\n\tdisplay: block;\r\n\tcolor: #334155;\r\n\tmargin-bottom: 8px;\r\n\tfont-weight: 500;\r\n}\r\n\r\n.notification-banner {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tright: 0;\r\n\tpadding: 15px 20px;\r\n\tz-index: 10000;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: space-between;\r\n\tbox-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);\r\n\tanimation: slideDown 0.3s ease;\r\n}\r\n\r\n@keyframes slideDown {\r\n\tfrom {\r\n\t\ttransform: translateY(-100%);\r\n\t}\r\n\tto {\r\n\t\ttransform: translateY(0);\r\n\t}\r\n}\r\n\r\n.notification-success {\r\n\tbackground: #10b981;\r\n\tcolor: white;\r\n}\r\n\r\n.notification-error {\r\n\tbackground: #ef4444;\r\n\tcolor: white;\r\n}\r\n\r\n.notification-info {\r\n\tbackground: #3b82f6;\r\n\tcolor: white;\r\n}\r\n\r\n/* Mobile Responsive Styles */\r\n@media (max-width: 768px) {\r\n\t.header {\r\n\t\tflex-direction: column;\r\n\t\tpadding: 15px;\r\n\t\tgap: 10px;\r\n\t}\r\n\r\n\t.header-left h1 {\r\n\t\tfont-size: 18px;\r\n\t}\r\n\r\n\t.status-bar {\r\n\t\tflex-wrap: wrap;\r\n\t\tgap: 10px;\r\n\t\tfont-size: 12px;\r\n\t}\r\n\r\n\t.toolbar {\r\n\t\tpadding: 10px;\r\n\t\tgap: 5px;\r\n\t}\r\n\r\n\t.btn {\r\n\t\tpadding: 8px 12px;\r\n\t\tfont-size: 12px;\r\n\t}\r\n\r\n\t.main-content {\r\n\t\tflex-direction: column;\r\n\t}\r\n\r\n\t.sidebar {\r\n\t\twidth: 100%;\r\n\t\tmax-height: 200px;\r\n\t\tborder-right: none;\r\n\t\tborder-bottom: 1px solid #334155;\r\n\t}\r\n\r\n\t.search-bar > div {\r\n\t\tflex-direction: column;\r\n\t\tgap: 10px;\r\n\t}\r\n\r\n\t.search-bar select,\r\n\t.search-bar button {\r\n\t\twidth: 100% !important;\r\n\t\tflex: none !important;\r\n\t}\r\n\r\n\t.grid {\r\n\t\tgrid-template-columns: 1fr;\r\n\t\tgap: 16px;\r\n\t}\r\n\r\n\t.game-card {\r\n\t\tmax-width: 100%;\r\n\t}\r\n\r\n\t.game-actions {\r\n\t\tgrid-template-columns: 1fr 1fr;\r\n\t\tgrid-template-rows: 1fr 1fr;\r\n\t\tgap: 6px;\r\n\t}\r\n\r\n\t.game-btn {\r\n\t\tfont-size: 11px;\r\n\t\tpadding: 8px 6px;\r\n\t}\r\n\r\n\t.modal-content {\r\n\t\twidth: 95%;\r\n\t\tmax-height: 80vh;\r\n\t}\r\n\r\n\t.tools-section {\r\n\t\tpadding: 0 15px;\r\n\t}\r\n\r\n\t.tool-card {\r\n\t\tpadding: 20px 15px;\r\n\t}\r\n\r\n\t.config-editor {\r\n\t\tpadding: 15px;\r\n\t}\r\n\r\n\t.config-editor-header {\r\n\t\tflex-direction: column;\r\n\t\talign-items: flex-start;\r\n\t\tgap: 10px;\r\n\t}\r\n\r\n\t.config-editor-actions {\r\n\t\twidth: 100%;\r\n\t\tflex-direction: column;\r\n\t}\r\n\r\n\t.config-editor-actions .btn {\r\n\t\twidth: 100%;\r\n\t}\r\n}\r\n\r\n@media (max-width: 480px) {\r\n\t.header-left h1 {\r\n\t\tfont-size: 16px;\r\n\t}\r\n\r\n\t.header-left img {\r\n\t\theight: 24px;\r\n\t}\r\n\r\n\t.btn {\r\n\t\tpadding: 6px 10px;\r\n\t\tfont-size: 11px;\r\n\t}\r\n\r\n\t.system-item {\r\n\t\tpadding: 10px 15px;\r\n\t}\r\n\r\n\t.system-name {\r\n\t\tfont-size: 13px;\r\n\t}\r\n\r\n\t.games-grid {\r\n\t\tpadding: 15px;\r\n\t}\r\n\r\n\t.game-name {\r\n\t\tfont-size: 14px;\r\n\t}\r\n\r\n\t.game-desc {\r\n\t\tfont-size: 12px;\r\n\t}\r\n\r\n\t.tool-card h3 {\r\n\t\tfont-size: 16px;\r\n\t}\r\n\r\n\t.tool-textarea {\r\n\t\tfont-size: 11px;\r\n\t}\r\n}\r\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/config/resources/services/main.js",
    "content": "var app = {\n\tcurrentSystem: null,\n\tallGames: [],\n\tsystems: [],\n\tcurrentGameDetail: null,\n\tcurrentView: 'games',\n\tcurrentConfigPath: '',\n\tconfigContent: '',\n\tscrapingInProgress: false,\n\tscrapingCheckInterval: null,\n\n\tinit: function() {\n\t\tthis.loadSystems();\n\t\tthis.updateStatus();\n\t\tvar self = this;\n\t\tsetInterval(function() { self.updateStatus(); }, 5000);\n\t\tthis.populateSystemSelects();\n\t},\n\n\trequest: function(method, endpoint, body, contentType) {\n\t\tvar xhr = new XMLHttpRequest();\n\t\txhr.open(method, endpoint, false);\n\t\t\n\t\tif (body && contentType) {\n\t\t\txhr.setRequestHeader('Content-Type', contentType);\n\t\t}\n\t\t\n\t\ttry {\n\t\t\txhr.send(body || null);\n\t\t\treturn xhr;\n\t\t} catch (error) {\n\t\t\tconsole.error('Request failed:', error);\n\t\t\tthis.showNotificationBanner('Request failed: ' + error.message, 'error');\n\t\t\treturn null;\n\t\t}\n\t},\n\n\tloadSystems: function() {\n\t\tvar xhr = this.request('GET', '/systems');\n\t\tif (xhr && xhr.status === 200) {\n\t\t\tvar systems = JSON.parse(xhr.responseText);\n\t\t\tthis.systems = systems;\n\t\t\tthis.displaySystems(systems);\n\t\t}\n\t},\n\n\tdisplaySystems: function(systems) {\n\t\tvar html = '';\n\t\tfor (var i = 0; i < systems.length; i++) {\n\t\t\tvar s = systems[i];\n\t\t\tif (s.visible === 'true') {\n\t\t\t\thtml += '<div class=\"system-item\" onclick=\"app.selectSystem(\\'' + s.name + '\\')\">';\n\t\t\t\tif (s.logo) {\n\t\t\t\t\thtml += '<img src=\"' + s.logo + '\" alt=\"' + s.fullname + '\">';\n\t\t\t\t} else {\n\t\t\t\t\thtml += '<span>[ ]</span>';\n\t\t\t\t}\n\t\t\t\thtml += '<div class=\"system-info\">';\n\t\t\t\thtml += '<div class=\"system-name\">' + s.fullname + '</div>';\n\t\t\t\thtml += '<div class=\"system-count\">' + (s.totalGames || 0) + ' games</div>';\n\t\t\t\thtml += '</div></div>';\n\t\t\t}\n\t\t}\n\t\tdocument.getElementById('systemList').innerHTML = html;\n\t},\n\n\tselectSystem: function(systemName) {\n\t\tthis.currentSystem = systemName;\n\t\tvar items = document.querySelectorAll('.system-item');\n\t\tfor (var i = 0; i < items.length; i++) {\n\t\t\titems[i].classList.remove('active');\n\t\t}\n\t\tif (event.target.closest) {\n\t\t\tevent.target.closest('.system-item').classList.add('active');\n\t\t}\n\n\t\tdocument.getElementById('gamesContainer').innerHTML = '<div class=\"loading\"><div class=\"spinner\"></div><p>Loading games...</p></div>';\n\n\t\tvar xhr = this.request('GET', '/systems/' + systemName + '/games');\n\t\tif (xhr && xhr.status === 200) {\n\t\t\tvar games = JSON.parse(xhr.responseText);\n\t\t\tthis.allGames = games;\n\t\t\tthis.filterGames(); // Apply current filters instead of directly sorting\n\t\t}\n\t},\n\n\tdisplayGames: function(games) {\n\t\tif (games.length === 0) {\n\t\t\tdocument.getElementById('gamesContainer').innerHTML = \n\t\t\t\t'<div class=\"empty-state\">' +\n\t\t\t\t'<div class=\"empty-state-icon\">[ ]</div>' +\n\t\t\t\t'<h3>No games found</h3>' +\n\t\t\t\t'</div>';\n\t\t\treturn;\n\t\t}\n\n\t\tvar html = '<div class=\"grid\">';\n\t\tfor (var i = 0; i < games.length; i++) {\n\t\t\tvar g = games[i];\n\t\t\tvar escapedPath = g.path.replace(/'/g, \"\\\\'\");\n\t\t\tvar isFavorite = g.favorite === 'true' || g.favorite === true;\n\t\t\tvar heartIcon = isFavorite ? '&#10084;' : '&#9825;';\n\t\t\tvar heartColor = isFavorite ? '#ef4444' : '#94a3b8';\n\t\t\t\n\t\t\thtml += '<div class=\"game-card\">';\n\t\t\thtml += '<div class=\"game-image\">';\n\t\t\tif (g.image) {\n\t\t\t\thtml += '<img src=\"' + g.image + '\" alt=\"' + g.name + '\" loading=\"lazy\">';\n\t\t\t} else {\n\t\t\t\thtml += '<div class=\"game-image-placeholder\">*</div>';\n\t\t\t}\n\t\t\thtml += '</div>';\n\t\t\thtml += '<div class=\"game-info\">';\n\t\t\thtml += '<div class=\"game-name\" title=\"' + g.name + '\">' + g.name + '</div>';\n\t\t\tif (g.desc) {\n\t\t\t\thtml += '<div class=\"game-desc\">' + g.desc + '</div>';\n\t\t\t}\n\t\t\t\n\t\t\t// Add metadata info\n\t\t\tvar metaInfo = [];\n\t\t\t\n\t\t\t// Year\n\t\t\tif (g.releasedate) {\n\t\t\t\tvar year = g.releasedate.substring(0, 4);\n\t\t\t\tmetaInfo.push('Year: ' + year);\n\t\t\t}\n\t\t\t\n\t\t\t// Developer/Publisher\n\t\t\tvar devPub = [];\n\t\t\tif (g.developer) devPub.push(g.developer);\n\t\t\tif (g.publisher) devPub.push(g.publisher);\n\t\t\tif (devPub.length > 0) {\n\t\t\t\tmetaInfo.push('By: ' + devPub.join('/'));\n\t\t\t}\n\t\t\t\n\t\t\t// Platform\n\t\t\tif (this.currentSystem) {\n\t\t\t\tvar systemName = '';\n\t\t\t\tfor (var j = 0; j < this.systems.length; j++) {\n\t\t\t\t\tif (this.systems[j].name === this.currentSystem) {\n\t\t\t\t\t\tsystemName = this.systems[j].fullname;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (systemName) {\n\t\t\t\t\tmetaInfo.push('Platform: ' + systemName);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Genre\n\t\t\tif (g.genre) {\n\t\t\t\tmetaInfo.push('Genre: ' + g.genre);\n\t\t\t}\n\t\t\t\n\t\t\t// Play count\n\t\t\tif (g.playcount) {\n\t\t\t\tmetaInfo.push('Play count: ' + g.playcount);\n\t\t\t}\n\t\t\t\n\t\t\t// Cheevos\n\t\t\tvar hasCheevos = (g.cheevosHash && g.cheevosHash !== '') && (g.cheevosId && g.cheevosId !== '');\n\t\t\tmetaInfo.push('Cheevos: ' + (hasCheevos ? 'Yes' : 'No'));\n\t\t\t\n\t\t\tif (metaInfo.length > 0) {\n\t\t\t\thtml += '<div class=\"game-meta\">' + metaInfo.join(' | ') + '</div>';\n\t\t\t}\n\t\t\t\n\t\t\thtml += '</div>';\n\t\t\thtml += '<div class=\"game-actions\">';\n\t\t\thtml += '<button class=\"game-btn game-btn-play\" onclick=\"app.launchGame(\\'' + escapedPath + '\\')\">Play</button>';\n\t\t\thtml += '<button class=\"game-btn game-btn-favorite\" onclick=\"app.toggleFavorite(\\'' + escapedPath + '\\')\" style=\"background: white; border: 2px solid ' + heartColor + '; color: ' + heartColor + ';\">' + heartIcon + '</button>';\n\t\t\thtml += '<button class=\"game-btn game-btn-info\" onclick=\"app.showGameDetails(\\'' + escapedPath + '\\')\">Info</button>';\n\t\t\thtml += '<button class=\"game-btn game-btn-scrape\" onclick=\"app.scrapeGame(\\'' + escapedPath + '\\')\">Scrape</button>';\n\t\t\thtml += '</div></div>';\n\t\t}\n\t\thtml += '</div>';\n\t\tdocument.getElementById('gamesContainer').innerHTML = html;\n\t},\n\n\tfilterGames: function() {\n\t\tvar searchInput = document.getElementById('searchInput');\n\t\tvar filterFieldSelect = document.getElementById('filterField');\n\t\tvar invertFilterCheckbox = document.getElementById('invertFilter');\n\t\t\n\t\t// If elements don't exist yet, just sort and display all games\n\t\tif (!searchInput || !filterFieldSelect || !invertFilterCheckbox) {\n\t\t\tthis.sortAndDisplayGames(this.allGames);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tvar search = searchInput.value.toLowerCase();\n\t\tvar filterField = filterFieldSelect.value;\n\t\tvar invertFilter = invertFilterCheckbox.checked;\n\t\tvar filtered = [];\n\t\t\n\t\tfor (var i = 0; i < this.allGames.length; i++) {\n\t\t\tvar g = this.allGames[i];\n\t\t\t\n\t\t\t// Apply search filter\n\t\t\tvar matchesSearch = !search || \n\t\t\t\tg.name.toLowerCase().indexOf(search) !== -1 || \n\t\t\t\t(g.desc && g.desc.toLowerCase().indexOf(search) !== -1);\n\t\t\t\n\t\t\tif (!matchesSearch) continue;\n\t\t\t\n\t\t\t// Apply metadata filter\n\t\t\tvar matchesFilter = true;\n\t\t\t\n\t\t\tif (filterField) {\n\t\t\t\tif (filterField === 'notscraped') {\n\t\t\t\t\t// Game is \"not scraped\" if it lacks both image and video\n\t\t\t\t\tvar hasImage = g.image && g.image !== '';\n\t\t\t\t\tvar hasVideo = g.video && g.video !== '';\n\t\t\t\t\tmatchesFilter = !hasImage && !hasVideo;\n\t\t\t\t} else if (filterField === 'favorite') {\n\t\t\t\t\t// Special handling for favorite - check if it's true\n\t\t\t\t\tmatchesFilter = (g.favorite === 'true' || g.favorite === true);\n\t\t\t\t} else if (filterField === 'hascheevos') {\n\t\t\t\t\t// Check if both cheevosHash and cheevosId are filled\n\t\t\t\t\tvar hasCheevosHash = g.cheevosHash && g.cheevosHash !== '';\n\t\t\t\t\tvar hasCheevosId = g.cheevosId && g.cheevosId !== '';\n\t\t\t\t\tmatchesFilter = hasCheevosHash && hasCheevosId;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Invert filter if checkbox is checked\n\t\t\t\tif (invertFilter) {\n\t\t\t\t\tmatchesFilter = !matchesFilter;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (matchesFilter) {\n\t\t\t\tfiltered.push(g);\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.sortAndDisplayGames(filtered);\n\t},\n\n\tsortGames: function() {\n\t\tthis.filterGames();\n\t},\n\n\tsortAndDisplayGames: function(games) {\n\t\tvar sortField = document.getElementById('sortField').value;\n\t\tvar sortOrder = document.getElementById('sortOrder').value;\n\t\t\n\t\tgames.sort(function(a, b) {\n\t\t\tvar aVal = a[sortField];\n\t\t\tvar bVal = b[sortField];\n\t\t\t\n\t\t\tif (aVal === undefined) aVal = '';\n\t\t\tif (bVal === undefined) bVal = '';\n\t\t\t\n\t\t\tif (sortField === 'rating' || sortField === 'playcount' || sortField === 'gametime' || sortField === 'players') {\n\t\t\t\taVal = parseFloat(aVal) || 0;\n\t\t\t\tbVal = parseFloat(bVal) || 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (sortField === 'favorite') {\n\t\t\t\taVal = (aVal === 'true' || aVal === true) ? 1 : 0;\n\t\t\t\tbVal = (bVal === 'true' || bVal === true) ? 1 : 0;\n\t\t\t}\n\t\t\t\n\t\t\tvar comparison = 0;\n\t\t\tif (aVal > bVal) comparison = 1;\n\t\t\telse if (aVal < bVal) comparison = -1;\n\t\t\t\n\t\t\treturn sortOrder === 'desc' ? -comparison : comparison;\n\t\t});\n\t\t\n\t\tthis.displayGames(games);\n\t},\n\n\ttoggleFavorite: function(gamePath) {\n\t\tvar game = null;\n\t\tfor (var i = 0; i < this.allGames.length; i++) {\n\t\t\tif (this.allGames[i].path === gamePath) {\n\t\t\t\tgame = this.allGames[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!game) return;\n\t\t\n\t\tvar isFavorite = game.favorite === 'true' || game.favorite === true;\n\t\tvar newFavorite = !isFavorite;\n\t\t\n\t\tvar gameJson = JSON.stringify({\n\t\t\tfavorite: newFavorite.toString()\n\t\t});\n\t\t\n\t\tvar xhr = this.request('POST', '/systems/' + this.currentSystem + '/games/' + game.id, gameJson, 'application/json');\n\t\t\n\t\tif (xhr && xhr.status === 200) {\n\t\t\tgame.favorite = newFavorite.toString();\n\t\t\tthis.filterGames();\n\t\t\tthis.showNotificationBanner(newFavorite ? 'Added to favorites' : 'Removed from favorites', 'success');\n\t\t} else {\n\t\t\tthis.showNotificationBanner('Failed to update favorite status', 'error');\n\t\t}\n\t},\n\n\tscrapeGame: function(gamePath) {\n\t\tvar game = null;\n\t\tfor (var i = 0; i < this.allGames.length; i++) {\n\t\t\tif (this.allGames[i].path === gamePath) {\n\t\t\t\tgame = this.allGames[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!game) return;\n\t\t\n\t\tif (!confirm('Scrape metadata and media for: ' + game.name + '?')) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tvar xhr = this.request('POST', '/scrape/' + this.currentSystem, game.path, 'text/plain');\n\t\t\n\t\tif (xhr && xhr.status === 200) {\n\t\t\tthis.showNotificationBanner('Scraping started for ' + game.name, 'info');\n\t\t\tthis.startScrapingMonitor();\n\t\t} else if (xhr && xhr.status === 409) {\n\t\t\tthis.showNotificationBanner('Scraper is already running. Please wait for it to finish.', 'error');\n\t\t} else if (xhr && xhr.status === 404) {\n\t\t\tthis.showNotificationBanner('Game not found.', 'error');\n\t\t} else {\n\t\t\tthis.showNotificationBanner('Failed to start scraping', 'error');\n\t\t}\n\t},\n\n\tscrapeSystem: function() {\n\t\tif (!this.currentSystem) {\n\t\t\tthis.showNotificationBanner('Please select a system first', 'error');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!confirm('Scrape all games in ' + this.currentSystem + '?\\n\\nThis may take a long time depending on the number of games.')) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tvar xhr = this.request('POST', '/scrape/' + this.currentSystem);\n\t\t\n\t\tif (xhr && xhr.status === 200) {\n\t\t\tthis.showNotificationBanner('System scraping started. Monitoring progress...', 'info');\n\t\t\tthis.startScrapingMonitor();\n\t\t} else if (xhr && xhr.status === 409) {\n\t\t\tthis.showNotificationBanner('Scraper is already running. Please wait for it to finish.', 'error');\n\t\t} else {\n\t\t\tthis.showNotificationBanner('Failed to start system scraping', 'error');\n\t\t}\n\t},\n\n\tstartScrapingMonitor: function() {\n\t\tif (this.scrapingInProgress) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthis.scrapingInProgress = true;\n\t\tdocument.getElementById('statusText').textContent = 'Scraping...';\n\t\t\n\t\tvar self = this;\n\t\tthis.scrapingCheckInterval = setInterval(function() {\n\t\t\tself.checkScrapingStatus();\n\t\t}, 2000);\n\t},\n\n\tcheckScrapingStatus: function() {\n\t\tvar xhr = this.request('GET', '/isIdle');\n\t\t\n\t\tif (xhr && xhr.status === 200) {\n\t\t\ttry {\n\t\t\t\tvar isIdle = JSON.parse(xhr.responseText);\n\t\t\t\t\n\t\t\t\tif (isIdle[0] === true) {\n\t\t\t\t\tthis.stopScrapingMonitor();\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t if (confirm('Scraping completed!\\n\\nWould you like to reload the games list to see the updated metadata?')) {\n\t\t\t\t\t\tvar currentSys = this.currentSystem;\n\t\t\t\t\t\tthis.reloadGames();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Reload the current system view after a delay to allow ES to process\n\t\t\t\t\t\tif (currentSys) {\n\t\t\t\t\t\t\tvar self = this;\n\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\tself.selectSystem(currentSys);\n\t\t\t\t\t\t\t}, 2000);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t*/ \n\t\t\t\t\t\n\t\t\t\t\tthis.showNotificationBanner('Scraping completed! Click \"Reload Games\" to see the updated metadata.', 'success');\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error('Failed to parse isIdle response:', e);\n\t\t\t}\n\t\t}\n\t},\n\n\tstopScrapingMonitor: function() {\n\t\tif (this.scrapingCheckInterval) {\n\t\t\tclearInterval(this.scrapingCheckInterval);\n\t\t\tthis.scrapingCheckInterval = null;\n\t\t}\n\t\tthis.scrapingInProgress = false;\n\t\tdocument.getElementById('statusText').textContent = 'Ready';\n\t},\n\n\treloadCurrentSystem: function() {\n\t\tif (this.currentSystem) {\n\t\t\tvar systemName = this.currentSystem;\n\t\t\tthis.currentSystem = null;\n\t\t\tthis.selectSystem(systemName);\n\t\t\t// selectSystem now calls filterGames() which will apply current filters\n\t\t}\n\t},\n\n\tlaunchGame: function(gamePath) {\n\t\tvar xhr = this.request('POST', '/launch', gamePath, 'text/plain');\n\t\tif (xhr && xhr.status === 200) {\n\t\t\tthis.showNotificationBanner('Game launched!', 'success');\n\t\t\tthis.updateStatus();\n\t\t} else {\n\t\t\tthis.showNotificationBanner('Failed to launch game', 'error');\n\t\t}\n\t},\n\n\tshowGameDetails: function(gamePath) {\n\t\tvar game = null;\n\t\tfor (var i = 0; i < this.allGames.length; i++) {\n\t\t\tif (this.allGames[i].path === gamePath) {\n\t\t\t\tgame = this.allGames[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!game) return;\n\n\t\tthis.currentGameDetail = game;\n\n\t\tvar modalBody = '<div class=\"tabs\">' +\n\t\t\t'<button class=\"tab active\" onclick=\"app.showTab(\\'info\\')\">Info</button>' +\n\t\t\t'<button class=\"tab\" onclick=\"app.showTab(\\'media\\')\">Media</button>' +\n\t\t\t'</div><div id=\"tabContent\"></div>';\n\n\t\tdocument.getElementById('modalTitle').textContent = game.name;\n\t\tdocument.getElementById('modalBody').innerHTML = modalBody;\n\t\tdocument.getElementById('gameModal').classList.add('active');\n\t\t\n\t\tthis.showInfoTab();\n\t},\n\n\tshowTab: function(tab) {\n\t\tvar tabs = document.querySelectorAll('.tab');\n\t\tfor (var i = 0; i < tabs.length; i++) {\n\t\t\ttabs[i].classList.remove('active');\n\t\t}\n\t\tevent.target.classList.add('active');\n\n\t\tvar tabContent = document.getElementById('tabContent');\n\t\tif (tab === 'media') {\n\t\t\tthis.showMediaTab();\n\t\t} else {\n\t\t\tthis.showInfoTab();\n\t\t}\n\t},\n\n\tshowInfoTab: function() {\n\t\tvar game = this.currentGameDetail;\n\t\tif (!game) return;\n\n\t\tvar html = '<div class=\"form-group\">' +\n\t\t\t'<label class=\"form-label\">Name</label>' +\n\t\t\t'<input type=\"text\" class=\"form-input\" value=\"' + game.name + '\" readonly>' +\n\t\t\t'</div>' +\n\t\t\t'<div class=\"form-group\">' +\n\t\t\t'<label class=\"form-label\">Path</label>' +\n\t\t\t'<input type=\"text\" class=\"form-input\" value=\"' + game.path + '\" readonly>' +\n\t\t\t'</div>';\n\t\t\n\t\tif (game.desc) {\n\t\t\thtml += '<div class=\"form-group\">' +\n\t\t\t\t'<label class=\"form-label\">Description</label>' +\n\t\t\t\t'<textarea class=\"form-textarea\" readonly>' + game.desc + '</textarea>' +\n\t\t\t\t'</div>';\n\t\t}\n\t\tif (game.developer) {\n\t\t\thtml += '<div class=\"form-group\">' +\n\t\t\t\t'<label class=\"form-label\">Developer</label>' +\n\t\t\t\t'<input type=\"text\" class=\"form-input\" value=\"' + game.developer + '\" readonly>' +\n\t\t\t\t'</div>';\n\t\t}\n\t\tif (game.publisher) {\n\t\t\thtml += '<div class=\"form-group\">' +\n\t\t\t\t'<label class=\"form-label\">Publisher</label>' +\n\t\t\t\t'<input type=\"text\" class=\"form-input\" value=\"' + game.publisher + '\" readonly>' +\n\t\t\t\t'</div>';\n\t\t}\n\t\tif (game.releasedate) {\n\t\t\thtml += '<div class=\"form-group\">' +\n\t\t\t\t'<label class=\"form-label\">Release Date</label>' +\n\t\t\t\t'<input type=\"text\" class=\"form-input\" value=\"' + game.releasedate + '\" readonly>' +\n\t\t\t\t'</div>';\n\t\t}\n\t\tif (game.genre) {\n\t\t\thtml += '<div class=\"form-group\">' +\n\t\t\t\t'<label class=\"form-label\">Genre</label>' +\n\t\t\t\t'<input type=\"text\" class=\"form-input\" value=\"' + game.genre + '\" readonly>' +\n\t\t\t\t'</div>';\n\t\t}\n\t\tif (game.players) {\n\t\t\thtml += '<div class=\"form-group\">' +\n\t\t\t\t'<label class=\"form-label\">Players</label>' +\n\t\t\t\t'<input type=\"text\" class=\"form-input\" value=\"' + game.players + '\" readonly>' +\n\t\t\t\t'</div>';\n\t\t}\n\t\tif (game.playcount) {\n\t\t\thtml += '<div class=\"form-group\">' +\n\t\t\t\t'<label class=\"form-label\">Play Count</label>' +\n\t\t\t\t'<input type=\"text\" class=\"form-input\" value=\"' + game.playcount + '\" readonly>' +\n\t\t\t\t'</div>';\n\t\t}\n\t\tif (game.rating) {\n\t\t\thtml += '<div class=\"form-group\">' +\n\t\t\t\t'<label class=\"form-label\">Rating</label>' +\n\t\t\t\t'<input type=\"text\" class=\"form-input\" value=\"' + game.rating + '\" readonly>' +\n\t\t\t\t'</div>';\n\t\t}\n\n\t\tdocument.getElementById('tabContent').innerHTML = html;\n\t},\n\n\tshowMediaTab: function() {\n\t\tvar game = this.currentGameDetail;\n\t\tif (!game) return;\n\n\t\tvar mediaTypes = [\n\t\t\t{ key: 'image', label: 'Image' },\n\t\t\t{ key: 'thumbnail', label: 'Thumbnail' },\n\t\t\t{ key: 'marquee', label: 'Marquee' },\n\t\t\t{ key: 'fanart', label: 'Fan Art' },\n\t\t\t{ key: 'boxback', label: 'Box Back' },\n\t\t\t{ key: 'video', label: 'Video' },\n\t\t\t{ key: 'manual', label: 'Manual' }\n\t\t];\n\n\t\tvar html = '<div class=\"media-grid\">';\n\t\t\n\t\tfor (var i = 0; i < mediaTypes.length; i++) {\n\t\t\tvar media = mediaTypes[i];\n\t\t\tif (game[media.key]) {\n\t\t\t\thtml += '<div class=\"media-item\">';\n\t\t\t\tif (media.key === 'video') {\n\t\t\t\t\thtml += '<video controls style=\"width:100%;height:100%;object-fit:cover;\">' +\n\t\t\t\t\t\t'<source src=\"' + game[media.key] + '\" type=\"video/mp4\">' +\n\t\t\t\t\t\t'Video not supported' +\n\t\t\t\t\t\t'</video>';\n\t\t\t\t} else if (media.key === 'manual') {\n\t\t\t\t\thtml += '<div style=\"display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:10px;\">' +\n\t\t\t\t\t\t'<div style=\"font-size:24px;margin-bottom:8px;\">PDF</div>' +\n\t\t\t\t\t\t'<a href=\"' + game[media.key] + '\" target=\"_blank\" style=\"color:#84849f;text-decoration:none;font-size:12px;\">View Manual</a>' +\n\t\t\t\t\t\t'</div>';\n\t\t\t\t} else {\n\t\t\t\t\thtml += '<img src=\"' + game[media.key] + '\" alt=\"' + media.label + '\" loading=\"lazy\">';\n\t\t\t\t}\n\t\t\t\thtml += '<div style=\"position:absolute;bottom:0;left:0;right:0;background:rgba(0,0,0,0.7);color:white;padding:8px;font-size:12px;text-align:center;\">' + \n\t\t\t\t\tmedia.label + '</div>';\n\t\t\t\thtml += '</div>';\n\t\t\t}\n\t\t}\n\t\t\n\t\thtml += '</div>';\n\n\t\tif (html === '<div class=\"media-grid\"></div>') {\n\t\t\thtml = '<div class=\"empty-state\"><div class=\"empty-state-icon\">[ ]</div><h3>No media available</h3></div>';\n\t\t}\n\n\t\tdocument.getElementById('tabContent').innerHTML = html;\n\t},\n\n\tcloseModal: function() {\n\t\tdocument.getElementById('gameModal').classList.remove('active');\n\t},\n\n\tshowNotificationBanner: function(message, type) {\n\t\tvar banner = document.getElementById('notificationBanner');\n\t\tvar notificationText = document.getElementById('notificationText');\n\t\t\n\t\tif (!banner || !notificationText) {\n\t\t\tconsole.error('Notification banner elements not found');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Remove existing type classes\n\t\tbanner.className = 'notification-banner';\n\t\t\n\t\t// Add type-specific class\n\t\tif (type === 'success') {\n\t\t\tbanner.classList.add('notification-success');\n\t\t} else if (type === 'error') {\n\t\t\tbanner.classList.add('notification-error');\n\t\t} else if (type === 'info') {\n\t\t\tbanner.classList.add('notification-info');\n\t\t}\n\t\t\n\t\tnotificationText.textContent = message;\n\t\tbanner.style.display = 'flex';\n\t\t\n\t\t// Auto-hide after 5 seconds\n\t\tsetTimeout(function() {\n\t\t\tbanner.style.display = 'none';\n\t\t}, 5000);\n\t},\n/*\n\nshowNotificationBanner: function(message, type) {\n\t// Create banner if it doesn't exist\n\tvar banner = document.getElementById('notificationBanner');\n\tif (!banner) {\n\t\tbanner = document.createElement('div');\n\t\tbanner.id = 'notificationBanner';\n\t\tbanner.style.cssText = 'position:fixed;top:20px;right:20px;padding:15px 20px;border-radius:8px;' +\n\t\t\t'color:white;font-size:14px;z-index:10000;box-shadow:0 4px 6px rgba(0,0,0,0.3);' +\n\t\t\t'transition:opacity 0.3s ease;max-width:400px;';\n\t\tdocument.body.appendChild(banner);\n\t}\n\t\n\t// Set color based on type\n\tvar bgColor;\n\tif (type === 'success') {\n\t\tbgColor = '#10b981'; // green\n\t} else if (type === 'error') {\n\t\tbgColor = '#ef4444'; // red\n\t} else if (type === 'info') {\n\t\tbgColor = '#3b82f6'; // blue\n\t} else {\n\t\tbgColor = '#6b7280'; // gray\n\t}\n\t\n\tbanner.style.backgroundColor = bgColor;\n\tbanner.textContent = message;\n\tbanner.style.opacity = '1';\n\tbanner.style.display = 'block';\n\t\n\t// Auto-hide after 3 seconds\n\tsetTimeout(function() {\n\t\tbanner.style.opacity = '0';\n\t\tsetTimeout(function() {\n\t\t\tbanner.style.display = 'none';\n\t\t}, 500);\n\t}, 5000);\n},\n*/\n\n\tupdateStatus: function() {\n\t\tvar xhr = this.request('GET', '/runningGame');\n\t\tif (xhr && xhr.status === 200) {\n\t\t\tvar text = xhr.responseText;\n\t\t\tvar runningDiv = document.getElementById('runningGame');\n\t\t\tvar runningText = document.getElementById('runningGameText');\n\t\t\t\n\t\t\tif (text && text !== 'null' && text !== '') {\n\t\t\t\ttry {\n\t\t\t\t\tvar gameData = JSON.parse(text);\n\t\t\t\t\tvar displayText = gameData.name;\n\t\t\t\t\tif (gameData.systemName) {\n\t\t\t\t\t\tdisplayText += ', System: ' + gameData.systemName.toUpperCase();\n\t\t\t\t\t}\n\t\t\t\t\trunningDiv.style.display = 'flex';\n\t\t\t\t\trunningText.textContent = displayText;\n\t\t\t\t\tdocument.getElementById('statusText').textContent = 'Playing';\n\t\t\t\t} catch (e) {\n\t\t\t\t\trunningDiv.style.display = 'flex';\n\t\t\t\t\trunningText.textContent = text;\n\t\t\t\t\tdocument.getElementById('statusText').textContent = 'Playing';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\trunningDiv.style.display = 'none';\n\t\t\t\tdocument.getElementById('statusText').textContent = 'Ready';\n\t\t\t}\n\t\t}\n\t},\n\n\treloadGames: function() {\n\t\tif (confirm('Reload all game lists?')) {\n\t\t\tthis.request('GET', '/reloadgames');\n\t\t\tthis.showNotificationBanner('Games reloaded!', 'success');\n\t\t\tthis.loadSystems();\n\t\t}\n\t},\n\n\tkillEmulator: function() {\n\t\tif (confirm('Kill the running emulator?')) {\n\t\t\tthis.request('GET', '/emukill');\n\t\t\tthis.showNotificationBanner('Emulator killed!', 'success');\n\t\t\tthis.updateStatus();\n\t\t}\n\t},\n\n\trestart: function() {\n\t\tif (confirm('Restart EmulationStation?')) {\n\t\t\tthis.request('GET', '/restart');\n\t\t}\n\t},\n\n\tquit: function() {\n\t\tif (confirm('Quit EmulationStation?')) {\n\t\t\tthis.request('GET', '/quit');\n\t\t}\n\t},\n\n\tshowMessageBox: function() {\n\t\tvar message = prompt('Enter message to display:');\n\t\tif (message) {\n\t\t\tthis.request('POST', '/messagebox', message, 'text/plain');\n\t\t}\n\t},\n\n\tshowNotification: function() {\n\t\tvar message = prompt('Enter notification text:');\n\t\tif (message) {\n\t\t\tthis.request('POST', '/notify', message, 'text/plain');\n\t\t}\n\t},\n\n\tshowView: function(view) {\n\t\tthis.currentView = view;\n\t\t\n\t\tdocument.getElementById('gamesView').style.display = 'none';\n\t\tdocument.getElementById('configView').style.display = 'none';\n\t\tdocument.getElementById('toolsView').style.display = 'none';\n\t\t\n\t\tif (view === 'games') {\n\t\t\tdocument.getElementById('gamesView').style.display = 'flex';\n\t\t} else if (view === 'config') {\n\t\t\tdocument.getElementById('configView').style.display = 'flex';\n\t\t\tthis.loadConfigList();\n\t\t} else if (view === 'tools') {\n\t\t\tdocument.getElementById('toolsView').style.display = 'flex';\n\t\t}\n\t},\n\n\tloadConfigList: function(subpath) {\n\t\tthis.currentConfigPath = subpath || '';\n\t\tvar endpoint = '/config' + (subpath ? '/' + subpath : '');\n\t\t\n\t\tvar xhr = this.request('GET', endpoint);\n\t\tif (xhr && xhr.status === 200) {\n\t\t\ttry {\n\t\t\t\tvar items = JSON.parse(xhr.responseText);\n\t\t\t\tthis.displayConfigList(items);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error('Failed to parse config list:', e);\n\t\t\t}\n\t\t}\n\t},\n\n\tdisplayConfigList: function(items) {\n\t\titems.sort(function(a, b) {\n\t\t\tif (a.isDirectory && !b.isDirectory) return -1;\n\t\t\tif (!a.isDirectory && b.isDirectory) return 1;\n\t\t\treturn a.name.localeCompare(b.name);\n\t\t});\n\t\t\n\t\tvar html = '';\n\t\t\n\t\tif (this.currentConfigPath) {\n\t\t\tvar parentPath = this.currentConfigPath.split('/').slice(0, -1).join('/');\n\t\t\thtml += '<div class=\"file-list-item\" onclick=\"app.loadConfigList(\\'' + parentPath + '\\')\">';\n\t\t\thtml += '<span class=\"file-icon\">&lt;</span>';\n\t\t\thtml += '<span class=\"file-name\">..</span>';\n\t\t\thtml += '</div>';\n\t\t}\n\t\t\n\t\tfor (var i = 0; i < items.length; i++) {\n\t\t\tvar item = items[i];\n\t\t\tvar icon = item.isDirectory ? '&#128193;' : '&#128196;';\n\t\t\tvar onclick = item.isDirectory \n\t\t\t\t? 'app.loadConfigList(\\'' + item.path + '\\')' \n\t\t\t\t: 'app.loadConfigFile(\\'' + item.path + '\\')';\n\t\t\t\n\t\t\thtml += '<div class=\"file-list-item\" onclick=\"' + onclick + '\">';\n\t\t\thtml += '<span class=\"file-icon\">' + icon + '</span>';\n\t\t\thtml += '<span class=\"file-name\">' + item.name + '</span>';\n\t\t\thtml += '</div>';\n\t\t}\n\t\t\n\t\tdocument.getElementById('configList').innerHTML = html;\n\t},\n\n\tloadConfigFile: function(filepath) {\n\t\tvar xhr = this.request('GET', '/config/' + filepath);\n\t\tif (xhr && xhr.status === 200) {\n\t\t\tthis.configContent = xhr.responseText;\n\t\t\tthis.displayConfigEditor(filepath);\n\t\t}\n\t},\n\n\tdisplayConfigEditor: function(filepath) {\n\t\tvar breadcrumb = filepath.split('/').join(' / ');\n\t\t\n\t\tvar html = '<div class=\"config-editor\">';\n\t\thtml += '<div class=\"config-editor-header\">';\n\t\thtml += '<div class=\"config-editor-title\">' + filepath + '</div>';\n\t\thtml += '<div class=\"config-editor-actions\">';\n\t\thtml += '<button class=\"btn btn-primary\" onclick=\"app.saveConfigFile(\\'' + filepath + '\\')\">Save</button>';\n\t\thtml += '<button class=\"btn btn-danger\" onclick=\"app.deleteConfigFile(\\'' + filepath + '\\')\">Delete</button>';\n\t\thtml += '<button class=\"btn btn-secondary\" onclick=\"app.closeConfigEditor()\">Close</button>';\n\t\thtml += '</div></div>';\n\t\thtml += '<textarea class=\"config-textarea\" id=\"configTextarea\">' + this.escapeHtml(this.configContent) + '</textarea>';\n\t\thtml += '</div>';\n\t\t\n\t\tdocument.getElementById('configEditorContainer').innerHTML = html;\n\t},\n\n\tsaveConfigFile: function(filepath) {\n\t\tvar content = document.getElementById('configTextarea').value;\n\t\tvar xhr = this.request('POST', '/config/' + filepath, content, 'text/plain');\n\t\t\n\t\tif (xhr && xhr.status === 200) {\n\t\t\tthis.showNotificationBanner('File saved successfully!', 'success');\n\t\t\tthis.configContent = content;\n\t\t} else {\n\t\t\tthis.showNotificationBanner('Failed to save file', 'error');\n\t\t}\n\t},\n\n\tdeleteConfigFile: function(filepath) {\n\t\tif (!confirm('Are you sure you want to delete this file?\\n\\n' + filepath + '\\n\\nA backup will be created.')) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tvar xhr = new XMLHttpRequest();\n\t\txhr.open('DELETE', '/config/' + filepath, false);\n\t\txhr.send();\n\t\t\n\t\tif (xhr.status === 200) {\n\t\t\tthis.showNotificationBanner('File deleted! Backup saved as .deleted', 'success');\n\t\t\tthis.closeConfigEditor();\n\t\t\tthis.loadConfigList(this.currentConfigPath);\n\t\t} else {\n\t\t\tthis.showNotificationBanner('Failed to delete file', 'error');\n\t\t}\n\t},\n\n\tcloseConfigEditor: function() {\n\t\tdocument.getElementById('configEditorContainer').innerHTML = \n\t\t\t'<div class=\"empty-state\">' +\n\t\t\t'<div class=\"empty-state-icon\">[ ]</div>' +\n\t\t\t'<h3>Select a config file to edit</h3>' +\n\t\t\t'</div>';\n\t},\n\n\tcreateNewConfigFile: function() {\n\t\tvar filename = prompt('Enter filename:');\n\t\tif (!filename) return;\n\t\t\n\t\tvar filepath = this.currentConfigPath ? this.currentConfigPath + '/' + filename : filename;\n\t\t\n\t\tthis.configContent = '';\n\t\tthis.displayConfigEditor(filepath);\n\t},\n\n\tescapeHtml: function(text) {\n\t\tvar map = {\n\t\t\t'&': '&amp;',\n\t\t\t'<': '&lt;',\n\t\t\t'>': '&gt;',\n\t\t\t'\"': '&quot;',\n\t\t\t\"'\": '&#039;'\n\t\t};\n\t\treturn text.replace(/[&<>\"']/g, function(m) { return map[m]; });\n\t},\n\n\tpopulateSystemSelects: function() {\n\t\tvar self = this;\n\t\tsetTimeout(function() {\n\t\t\tif (self.systems.length === 0) return;\n\t\t\t\n\t\t\tvar html = '<option value=\"\">-- Select a system --</option>';\n\t\t\tfor (var i = 0; i < self.systems.length; i++) {\n\t\t\t\tvar s = self.systems[i];\n\t\t\t\tif (s.visible === 'true') {\n\t\t\t\t\thtml += '<option value=\"' + s.name + '\">' + s.fullname + '</option>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdocument.getElementById('addGamesSystem').innerHTML = html;\n\t\t\tdocument.getElementById('removeGamesSystem').innerHTML = html;\n\t\t\tdocument.getElementById('removeSystemSelect').innerHTML = html;\n\t\t\tdocument.getElementById('addEmulatorSystem').innerHTML = html;\n\t\t\tdocument.getElementById('removeEmulatorSystem').innerHTML = html;\n\t\t}, 1000);\n\t},\n\n\taddGames: function() {\n\t\tvar system = document.getElementById('addGamesSystem').value;\n\t\tvar xml = document.getElementById('addGamesXML').value;\n\t\tvar result = document.getElementById('addGamesResult');\n\t\t\n\t\tif (!system) {\n\t\t\tresult.textContent = 'Error: Please select a system';\n\t\t\tresult.style.display = 'block';\n\t\t\tresult.style.color = '#848484';\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!xml.trim()) {\n\t\t\tresult.textContent = 'Error: Please enter gamelist XML';\n\t\t\tresult.style.display = 'block';\n\t\t\tresult.style.color = '#848484';\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tvar xhr = this.request('POST', '/addgames/' + system, xml, 'application/xml');\n\t\t\n\t\tif (xhr) {\n\t\t\tif (xhr.status === 200) {\n\t\t\t\tresult.textContent = 'Success! Games added/updated. The system will be refreshed.';\n\t\t\t\tresult.style.color = '#84849f';\n\t\t\t\tdocument.getElementById('addGamesXML').value = '';\n\t\t\t} else if (xhr.status === 201) {\n\t\t\t\tresult.textContent = 'Games added but system not loaded. Click \"Reload Games\" to see them.';\n\t\t\t\tresult.style.color = '#b4b1c2';\n\t\t\t} else if (xhr.status === 204) {\n\t\t\t\tresult.textContent = 'No games were added or updated. Check your XML format.';\n\t\t\t\tresult.style.color = '#848484';\n\t\t\t} else if (xhr.status === 404) {\n\t\t\t\tresult.textContent = 'Error: System not found';\n\t\t\t\tresult.style.color = '#848484';\n\t\t\t} else {\n\t\t\t\tresult.textContent = 'Error: ' + xhr.responseText;\n\t\t\t\tresult.style.color = '#848484';\n\t\t\t}\n\t\t\tresult.style.display = 'block';\n\t\t}\n\t},\n\n\tremoveGames: function() {\n\t\tvar system = document.getElementById('removeGamesSystem').value;\n\t\tvar xml = document.getElementById('removeGamesXML').value;\n\t\tvar result = document.getElementById('removeGamesResult');\n\t\t\n\t\tif (!system) {\n\t\t\tresult.textContent = 'Error: Please select a system';\n\t\t\tresult.style.display = 'block';\n\t\t\tresult.style.color = '#848484';\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!xml.trim()) {\n\t\t\tresult.textContent = 'Error: Please enter gamelist XML';\n\t\t\tresult.style.display = 'block';\n\t\t\tresult.style.color = '#848484';\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!confirm('WARNING: This will DELETE the ROM files from disk!\\n\\nAre you sure you want to remove these games?')) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tvar xhr = this.request('POST', '/removegames/' + system, xml, 'application/xml');\n\t\t\n\t\tif (xhr) {\n\t\t\tif (xhr.status === 200) {\n\t\t\t\tresult.textContent = 'Success! Games removed and files deleted.';\n\t\t\t\tresult.style.color = '#84849f';\n\t\t\t\tdocument.getElementById('removeGamesXML').value = '';\n\t\t\t} else if (xhr.status === 204) {\n\t\t\t\tresult.textContent = 'No games were removed. Check your XML format.';\n\t\t\t\tresult.style.color = '#848484';\n\t\t\t} else if (xhr.status === 404) {\n\t\t\t\tresult.textContent = 'Error: System not found';\n\t\t\t\tresult.style.color = '#848484';\n\t\t\t} else {\n\t\t\t\tresult.textContent = 'Error: ' + xhr.responseText;\n\t\t\t\tresult.style.color = '#848484';\n\t\t\t}\n\t\t\tresult.style.display = 'block';\n\t\t}\n\t},\n\n\taddSystem: function() {\n\t\tvar xml = document.getElementById('addSystemXML').value;\n\t\tvar result = document.getElementById('addSystemResult');\n\t\t\n\t\tif (!xml.trim()) {\n\t\t\tresult.textContent = 'Error: Please enter system XML';\n\t\t\tresult.style.display = 'block';\n\t\t\tresult.style.color = '#848484';\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Check if <command> tag exists, if not add default\n\t\tif (xml.indexOf('<command>') === -1) {\n\t\t\tvar defaultCommand = '<command>emuelecRunEmu.sh %ROM% -P%SYSTEM% --core=%CORE% --emulator=%EMULATOR% --controllers=\"%CONTROLLERSCONFIG%\"</command>';\n\t\t\t\n\t\t\t// Find where to insert (before closing </system> or </s> tag)\n\t\t\tvar insertPos = xml.lastIndexOf('</system>');\n\t\t\tif (insertPos === -1) {\n\t\t\t\tinsertPos = xml.lastIndexOf('</s>');\n\t\t\t}\n\t\t\t\n\t\t\tif (insertPos !== -1) {\n\t\t\t\txml = xml.substring(0, insertPos) + '  ' + defaultCommand + '\\n' + xml.substring(insertPos);\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar xhr = this.request('POST', '/addsystem', xml, 'application/xml');\n\t\t\n\t\tif (xhr) {\n\t\t\tif (xhr.status === 200) {\n\t\t\t\tresult.textContent = 'Success! System added/updated. Systems will reload.';\n\t\t\t\tresult.style.color = '#84849f';\n\t\t\t\tdocument.getElementById('addSystemXML').value = '';\n\t\t\t\t\n\t\t\t\tvar self = this;\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tself.loadSystems();\n\t\t\t\t\tself.populateSystemSelects();\n\t\t\t\t}, 2000);\n\t\t\t} else if (xhr.status === 404) {\n\t\t\t\tresult.textContent = 'Error: es_systems.cfg not found';\n\t\t\t\tresult.style.color = '#848484';\n\t\t\t} else {\n\t\t\t\tresult.textContent = 'Error: ' + xhr.responseText;\n\t\t\t\tresult.style.color = '#848484';\n\t\t\t}\n\t\t\tresult.style.display = 'block';\n\t\t}\n\t},\n\n\tremoveSystem: function() {\n\t\tvar system = document.getElementById('removeSystemSelect').value;\n\t\tvar result = document.getElementById('removeSystemResult');\n\t\t\n\t\tif (!system) {\n\t\t\tresult.textContent = 'Error: Please select a system';\n\t\t\tresult.style.display = 'block';\n\t\t\tresult.style.color = '#848484';\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!confirm('Are you sure you want to remove the system: ' + system + '?\\n\\nThis will NOT delete ROM files.')) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tvar xhr = this.request('POST', '/removesystem/' + system);\n\t\t\n\t\tif (xhr) {\n\t\t\tif (xhr.status === 200) {\n\t\t\t\tresult.textContent = 'Success! System removed. Systems will reload.';\n\t\t\t\tresult.style.color = '#84849f';\n\t\t\t\tdocument.getElementById('removeSystemSelect').value = '';\n\t\t\t\t\n\t\t\t\tvar self = this;\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tself.loadSystems();\n\t\t\t\t\tself.populateSystemSelects();\n\t\t\t\t}, 2000);\n\t\t\t} else if (xhr.status === 404) {\n\t\t\t\tresult.textContent = 'Error: System or es_systems.cfg not found';\n\t\t\t\tresult.style.color = '#848484';\n\t\t\t} else {\n\t\t\t\tresult.textContent = 'Error: ' + xhr.responseText;\n\t\t\t\tresult.style.color = '#848484';\n\t\t\t}\n\t\t\tresult.style.display = 'block';\n\t\t}\n\t},\n\n\taddEmulator: function() {\n\t\tvar system = document.getElementById('addEmulatorSystem').value;\n\t\tvar xml = document.getElementById('addEmulatorXML').value;\n\t\tvar result = document.getElementById('addEmulatorResult');\n\t\t\n\t\tif (!system) {\n\t\t\tresult.textContent = 'Error: Please select a system';\n\t\t\tresult.style.display = 'block';\n\t\t\tresult.style.color = '#848484';\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!xml.trim()) {\n\t\t\tresult.textContent = 'Error: Please enter emulator XML';\n\t\t\tresult.style.display = 'block';\n\t\t\tresult.style.color = '#848484';\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tvar xhr = this.request('POST', '/system/' + system + '/addemulator', xml, 'application/xml');\n\t\t\n\t\tif (xhr) {\n\t\t\tif (xhr.status === 200) {\n\t\t\t\tresult.textContent = 'Success! Emulator added/updated. Systems will reload.';\n\t\t\t\tresult.style.color = '#84849f';\n\t\t\t\tdocument.getElementById('addEmulatorXML').value = '';\n\t\t\t} else if (xhr.status === 404) {\n\t\t\t\tresult.textContent = 'Error: System or es_systems.cfg not found';\n\t\t\t\tresult.style.color = '#848484';\n\t\t\t} else {\n\t\t\t\tresult.textContent = 'Error: ' + xhr.responseText;\n\t\t\t\tresult.style.color = '#848484';\n\t\t\t}\n\t\t\tresult.style.display = 'block';\n\t\t}\n\t},\n\n\tremoveEmulator: function() {\n\t\tvar system = document.getElementById('removeEmulatorSystem').value;\n\t\tvar emulator = document.getElementById('removeEmulatorName').value;\n\t\tvar result = document.getElementById('removeEmulatorResult');\n\t\t\n\t\tif (!system) {\n\t\t\tresult.textContent = 'Error: Please select a system';\n\t\t\tresult.style.display = 'block';\n\t\t\tresult.style.color = '#848484';\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!emulator.trim()) {\n\t\t\tresult.textContent = 'Error: Please enter emulator name';\n\t\t\tresult.style.display = 'block';\n\t\t\tresult.style.color = '#848484';\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!confirm('Are you sure you want to remove the emulator: ' + emulator + ' from ' + system + '?')) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tvar xhr = this.request('POST', '/system/' + system + '/removeemulator/' + emulator);\n\t\t\n\t\tif (xhr) {\n\t\t\tif (xhr.status === 200) {\n\t\t\t\tresult.textContent = 'Success! Emulator removed. Systems will reload.';\n\t\t\t\tresult.style.color = '#84849f';\n\t\t\t\tdocument.getElementById('removeEmulatorName').value = '';\n\t\t\t} else if (xhr.status === 404) {\n\t\t\t\tresult.textContent = 'Error: System, emulator, or es_systems.cfg not found';\n\t\t\t\tresult.style.color = '#848484';\n\t\t\t} else {\n\t\t\t\tresult.textContent = 'Error: ' + xhr.responseText;\n\t\t\t\tresult.style.color = '#848484';\n\t\t\t}\n\t\t\tresult.style.display = 'block';\n\t\t}\n\t}\n};\n\napp.init();\n\nwindow.onclick = function(event) {\n\tvar modal = document.getElementById('gameModal');\n\tif (event.target === modal) {\n\t\tapp.closeModal();\n\t}\n};\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/config/scripts/combined/example.sh.example",
    "content": "#!/bin/bash\n\n## This is an example combined script for all events that ES triggers\n## options separated with , are secondary arguments e.g (arg1; arg2; arg3)\n## options separated with ; are single argument to choose from e.g (arg1, arg1, arg1)\n#\n# start\n# game-start (rom, basename, name)\n# game-end\n# system-selected (name)\n# game-selected (system-name, game-path, name)\n# screensaver-start (screensaver_behavior)\n# screensaver-stop\n# theme-changed (new-theme, old-theme)\n# sleep\n# wake\n# config-changed\n# controls-changed\n# settings-changed\n# quit (and any one of these as second argument: restart; reboot; shutdown; nand; retroarch)\n\n\n. /etc/profile\n\nEVENT=${1}\nshift\n\nevent_start() {\n    echo \"Started ES\"\n    }\n\nevent_game_start() {\n    echo \"Started game rom: ${1} basename ${2} name ${3}\"\n    }\n\nevent_screensaver_start() {\n    echo \"Starting Screen saver ${1}\"\n    }\n\nevent_quit(){\n    case \"${1}\" in\n    \"restart\")\n\techo \"Restarting!\"\n\t;;\t\n    \"reboot\")\n    echo \"Rebooting!\"\n    ;;\n    \"shutdown\")\n    echo \"Shutting down!\"\n    ;;\n    *)\n    echo \"Just quitting!\"\n\t\t;;\n\t\tesac\n}\n\ncase \"${EVENT}\" in\n    \"start\")\n\tevent_start\n\t;;\n    \"game-start\")\n\tevent_game_start ${1} ${2} ${3}\n\t;;\n    \"screensaver-start\")\n    event_screensaver_start ${1}\n\t;;\n    \"quit\")\n    event_quit ${1} ${2} ${3}\n\t;;\n    # and so and and so fort\n    *)\n\texit 1\nesac\n\n## You could also do something like this:\n\n# event_${1} ${2} ${3} ${4}\n\n## To call the event directly, but you need error checking.\n\nexit 0\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/config/scripts/configscripts/gamecontrollerdb.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# based on https://github.com/RetroPie/RetroPie-Setup/blob/master/scriptmodules/supplementary/emulationstation/configscripts/retroarch.sh\n\nTMPCONF=$(mktemp)\n\nfunction onstart_gamecontrollerdb_joystick() {\n    echo -ne \"${DEVICE_GUID},${DEVICE_NAME},\" > \"${TMPCONF}\"\n}\n\nfunction map_gamecontrollerdb_joystick() {\n    local input_name=\"${1}\"\n    local input_type=\"${2}\"\n    local input_id=\"${3}\"\n    local input_value=\"${4}\"\n\n    local keys\n\n    case \"${input_name}\" in\n        up)\n            keys=(\"dpup\")\n            ;;\n        down)\n            keys=(\"dpdown\")\n            ;;\n        left)\n            keys=(\"dpleft\")\n            ;;\n        right)\n            keys=(\"dpright\")\n            ;;\n        a)\n            keys=(\"a\")\n            ;;\n        b)\n            keys=(\"b\")\n            ;;\n        x)\n            keys=(\"x\")\n            ;;\n        y)\n            keys=(\"y\")\n            ;;\n        leftshoulder)\n            keys=(\"leftshoulder\")\n            ;;\n        rightshoulder)\n            keys=(\"rightshoulder\")\n            ;;\n        lefttrigger)\n            keys=(\"lefttrigger\")\n            ;;\n        righttrigger)\n            keys=(\"righttrigger\")\n            ;;\n        leftthumb)\n            keys=(\"leftstick\")\n            ;;\n        rightthumb)\n            keys=(\"rightstick\")\n            ;;\n        start)\n            keys=(\"start\")\n            ;;\n        select)\n            keys=(\"back\")\n            ;;\n        leftanalogleft)\n            keys=(\"leftx\")\n            ;;\n        leftanalogup)\n            keys=(\"lefty\")\n            ;;\n        rightanalogleft)\n            keys=(\"rightx\")\n            ;;\n        rightanalogup)\n            keys=(\"righty\")\n            ;;\n        hotkeyenable)\n            keys=(\"guide\")\n            ;;\n    esac\n    \n    local key\n    local value\n    local type\n    for key in \"${keys[@]}\"; do\n        case \"${input_type}\" in\n            hat)\n                type=\"h\"\n                value=\"${input_id}.${input_value}\"\n                ;;\n            axis)\n                type=\"a\"\n                value=\"${input_id}\"\n                ;;\n            button)\n                type=\"b\"\n                value=\"${input_id}\"\n                ;;\n        esac\n        key+=\":${type}${value}\"\n    done\n\nif [ ! -z \"${key}\" ]; then\n    echo -en \"${key},\" >> \"${TMPCONF}\"\nfi\n\n}\n\nfunction onend_gamecontrollerdb_joystick() {\n    SDL_GAMECONTROLLERCONFIG_FILE=\"/storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt\"\n    \n    CONF=$(cat \"${TMPCONF}\")\n\n    if grep -q \"${DEVICE_GUID}\" \"${SDL_GAMECONTROLLERCONFIG_FILE}\"; then\n        # If DEVICE_GUID exists, replace the existing entry\n        sed -i \"/${DEVICE_GUID}/c ${CONF}platform:Linux,\" \"${SDL_GAMECONTROLLERCONFIG_FILE}\"\n    else\n        sed -i \"5i ${CONF}platform:Linux,\" \"${SDL_GAMECONTROLLERCONFIG_FILE}\"\n    fi\n\n    # Cleanup\n    rm -f \"${TMPCONF}\" > /dev/null 2>&1\n}\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/config/scripts/configscripts/retroarch.sh",
    "content": "#!/usr/bin/env bash\n\n# This file is part of The RetroPie Project\n#\n# The RetroPie Project is the legal property of its developers, whose names are\n# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.\n#\n# See the LICENSE.md file at the top-level directory of this distribution and\n# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md\n#\n# Modified 2019 by Shanti Gilbert for EmuELEC/CoreELEC (https//www.coreelec.org)\n\n# Function to find udev device name using /proc/bus/input/devices from a SDL GUID\nget_udev_name_from_guid() {\n    local guid=\"$1\"\n\n    if [[ ! \"$guid\" =~ ^[0-9A-Fa-f]{32}$ ]]; then\n        echo \"Invalid GUID format\" >&2\n        return 1\n    fi\n\n    guid=${guid,,}  # lowercase for safety\n\n    # Helper: swap endian (little → big)\n    swap_endian() {\n        echo \"$1\" | sed 's/\\(..\\)\\(..\\)/\\2\\1/'\n    }\n\n    # Extract relevant fields (note: byte order)\n    local bus_le=${guid:0:4}\n    local vendor_le=${guid:8:4}\n    local product_le=${guid:16:4}\n    local version_le=${guid:24:4}\n\n    local bus=$(swap_endian \"$bus_le\")\n    local vendor=$(swap_endian \"$vendor_le\")\n    local product=$(swap_endian \"$product_le\")\n    local version=$(swap_endian \"$version_le\")\n\n    # Find the block starting with I: that matches all three fields\n    local name\n    name=$(sed -n \"/I:.*Bus=${bus}.*Vendor=${vendor}.*Product=${product}/,/^$/p\" /proc/bus/input/devices \\\n        | sed -n 's/^N: Name=\"\\([^\"]*\\)\"/\\1/p' \\\n        | head -n1)\n\n    if [[ -n \"$name\" ]]; then\n        echo \"$name\"\n    else\n    #fall back to ES name \n        echo \"${DEVICE_NAME}\"\n    fi\n}\n\n\nfunction onstart_retroarch_joystick() {\n    iniConfig \" = \" '\"' \"${configdir}/retroarch/retroarch.cfg\"\n    iniGet \"input_joypad_driver\"\n    local input_joypad_driver=\"${ini_value}\"\n    if [[ -z \"${input_joypad_driver}\" ]]; then\n        input_joypad_driver=\"udev\"\n    fi\n\n    _retroarch_select_hotkey=1\n\n    _atebitdo_hack=0\n    getAutoConf \"8bitdo_hack\" && _atebitdo_hack=1\n\n    iniConfig \" = \" \"\\\"\" \"/tmp/tempconfig.cfg\"\n\n    v=${DEVICE_GUID:8:8}\n    part1=$(echo ${v:6:2}${v:4:2}${v:2:2}${v:0:2})\n    v=${DEVICE_GUID:16:8}\n    part2=$(echo ${v:6:2}${v:4:2}${v:2:2}${v:0:2})\n   \n    input_vendor=$(echo $((16#${part1:4})))\n    input_product=$(echo $((16#${part2:4})))\n\n    RA_DEVICE_NAME=$(get_udev_name_from_guid \"${DEVICE_GUID}\")\n    iniSet \"input_device\" \"${RA_DEVICE_NAME}\"\n    iniSet \"input_driver\" \"${input_joypad_driver}\"\n    iniSet \"input_vendor_id\" \"${input_vendor}\"\n    iniSet \"input_product_id\" \"${input_product}\"\n\n    \n}\n\nfunction onstart_retroarch_keyboard() {\n    iniConfig \" = \" '\"' \"${configdir}/retroarch/retroarch.cfg\"\n\n    _retroarch_select_hotkey=1\n\n    declare -Ag retroarchkeymap\n    # SDL codes from https://wiki.libsdl.org/SDLKeycodeLookup\n    retroarchkeymap[\"1073741904\"]=\"left\"\n    retroarchkeymap[\"1073741903\"]=\"right\"\n    retroarchkeymap[\"1073741906\"]=\"up\"\n    retroarchkeymap[\"1073741905\"]=\"down\"\n    retroarchkeymap[\"13\"]=\"enter\"\n    retroarchkeymap[\"1073741912\"]=\"kp_enter\"\n    retroarchkeymap[\"9\"]=\"tab\"\n    retroarchkeymap[\"1073741897\"]=\"insert\"\n    retroarchkeymap[\"127\"]=\"del\"\n    retroarchkeymap[\"1073741901\"]=\"end\"\n    retroarchkeymap[\"1073741898\"]=\"home\"\n    retroarchkeymap[\"1073742053\"]=\"rshift\"\n    retroarchkeymap[\"1073742049\"]=\"shift\"\n    retroarchkeymap[\"1073742048\"]=\"ctrl\"\n    retroarchkeymap[\"1073742050\"]=\"alt\"\n    retroarchkeymap[\"32\"]=\"space\"\n    retroarchkeymap[\"27\"]=\"escape\"\n    retroarchkeymap[\"43\"]=\"add\"\n    retroarchkeymap[\"45\"]=\"subtract\"\n    retroarchkeymap[\"1073741911\"]=\"kp_plus\"\n    retroarchkeymap[\"1073741910\"]=\"kp_minus\"\n    retroarchkeymap[\"1073741882\"]=\"f1\"\n    retroarchkeymap[\"1073741883\"]=\"f2\"\n    retroarchkeymap[\"1073741884\"]=\"f3\"\n    retroarchkeymap[\"1073741885\"]=\"f4\"\n    retroarchkeymap[\"1073741886\"]=\"f5\"\n    retroarchkeymap[\"1073741887\"]=\"f6\"\n    retroarchkeymap[\"1073741888\"]=\"f7\"\n    retroarchkeymap[\"1073741889\"]=\"f8\"\n    retroarchkeymap[\"1073741890\"]=\"f9\"\n    retroarchkeymap[\"1073741891\"]=\"f10\"\n    retroarchkeymap[\"1073741892\"]=\"f11\"\n    retroarchkeymap[\"1073741893\"]=\"f12\"\n    retroarchkeymap[\"48\"]=\"num0\"\n    retroarchkeymap[\"49\"]=\"num1\"\n    retroarchkeymap[\"50\"]=\"num2\"\n    retroarchkeymap[\"51\"]=\"num3\"\n    retroarchkeymap[\"52\"]=\"num4\"\n    retroarchkeymap[\"53\"]=\"num5\"\n    retroarchkeymap[\"54\"]=\"num6\"\n    retroarchkeymap[\"55\"]=\"num7\"\n    retroarchkeymap[\"56\"]=\"num8\"\n    retroarchkeymap[\"57\"]=\"num9\"\n    retroarchkeymap[\"1073741899\"]=\"pageup\"\n    retroarchkeymap[\"1073741902\"]=\"pagedown\"\n    retroarchkeymap[\"1073741922\"]=\"keypad0\"\n    retroarchkeymap[\"1073741913\"]=\"keypad1\"\n    retroarchkeymap[\"1073741914\"]=\"keypad2\"\n    retroarchkeymap[\"1073741915\"]=\"keypad3\"\n    retroarchkeymap[\"1073741916\"]=\"keypad4\"\n    retroarchkeymap[\"1073741917\"]=\"keypad5\"\n    retroarchkeymap[\"1073741918\"]=\"keypad6\"\n    retroarchkeymap[\"1073741919\"]=\"keypad7\"\n    retroarchkeymap[\"1073741920\"]=\"keypad8\"\n    retroarchkeymap[\"1073741921\"]=\"keypad9\"\n    retroarchkeymap[\"46\"]=\"period\"\n    retroarchkeymap[\"1073741881\"]=\"capslock\"\n    retroarchkeymap[\"1073741907\"]=\"numlock\"\n    retroarchkeymap[\"8\"]=\"backspace\"\n    retroarchkeymap[\"42\"]=\"multiply\"\n    retroarchkeymap[\"47\"]=\"divide\"\n    retroarchkeymap[\"1073741894\"]=\"print_screen\"\n    retroarchkeymap[\"1073741895\"]=\"scroll_lock\"\n    retroarchkeymap[\"96\"]=\"backquote\"\n    retroarchkeymap[\"1073741896\"]=\"pause\"\n    retroarchkeymap[\"39\"]=\"quote\"\n    retroarchkeymap[\"44\"]=\"comma\"\n    retroarchkeymap[\"45\"]=\"minus\"\n    retroarchkeymap[\"47\"]=\"slash\"\n    retroarchkeymap[\"59\"]=\"semicolon\"\n    retroarchkeymap[\"61\"]=\"equals\"\n    retroarchkeymap[\"91\"]=\"leftbracket\"\n    retroarchkeymap[\"92\"]=\"backslash\"\n    retroarchkeymap[\"93\"]=\"rightbracket\"\n    retroarchkeymap[\"1073741923\"]=\"kp_period\"\n    retroarchkeymap[\"1073741927\"]=\"kp_equals\"\n    retroarchkeymap[\"1073742052\"]=\"rctrl\"\n    retroarchkeymap[\"1073742054\"]=\"ralt\"\n    retroarchkeymap[\"97\"]=\"a\"\n    retroarchkeymap[\"98\"]=\"b\"\n    retroarchkeymap[\"99\"]=\"c\"\n    retroarchkeymap[\"100\"]=\"d\"\n    retroarchkeymap[\"101\"]=\"e\"\n    retroarchkeymap[\"102\"]=\"f\"\n    retroarchkeymap[\"103\"]=\"g\"\n    retroarchkeymap[\"104\"]=\"h\"\n    retroarchkeymap[\"105\"]=\"i\"\n    retroarchkeymap[\"106\"]=\"j\"\n    retroarchkeymap[\"107\"]=\"k\"\n    retroarchkeymap[\"108\"]=\"l\"\n    retroarchkeymap[\"109\"]=\"m\"\n    retroarchkeymap[\"110\"]=\"n\"\n    retroarchkeymap[\"111\"]=\"o\"\n    retroarchkeymap[\"112\"]=\"p\"\n    retroarchkeymap[\"113\"]=\"q\"\n    retroarchkeymap[\"114\"]=\"r\"\n    retroarchkeymap[\"115\"]=\"s\"\n    retroarchkeymap[\"116\"]=\"t\"\n    retroarchkeymap[\"117\"]=\"u\"\n    retroarchkeymap[\"118\"]=\"v\"\n    retroarchkeymap[\"119\"]=\"w\"\n    retroarchkeymap[\"120\"]=\"x\"\n    retroarchkeymap[\"121\"]=\"y\"\n    retroarchkeymap[\"122\"]=\"z\"\n\n    # special case for disabled hotkey\n    retroarchkeymap[\"0\"]=\"nul\"\n}\n\nfunction map_retroarch_joystick() {\n    local input_name=\"${1}\"\n    local input_type=\"${2}\"\n    local input_id=\"${3}\"\n    local input_value=\"${4}\"\n\n    local keys\n    case \"${input_name}\" in\n        up)\n            keys=(\"input_up\" \"input_volume_up\")\n            ;;\n        down)\n            keys=(\"input_down\" \"input_volume_down\")\n            ;;\n        left)\n            keys=(\"input_left\" \"input_state_slot_decrease\")\n            ;;\n        right)\n            keys=(\"input_right\" \"input_state_slot_increase\")\n            ;;\n        a)\n            keys=(\"input_a\")\n            ;;\n        b)\n            keys=(\"input_b\" \"input_reset\")\n            ;;\n        x)\n            keys=(\"input_x\" \"input_menu_toggle\")\n            ;;\n        y)\n            keys=(\"input_y\")\n            ;;\n        leftbottom|leftshoulder)\n            keys=(\"input_l\" \"input_load_state\")\n            ;;\n        rightbottom|rightshoulder)\n            keys=(\"input_r\" \"input_save_state\")\n            ;;\n        lefttop|lefttrigger)\n            keys=(\"input_l2\" \"input_rewind\")\n            ;;\n        righttop|righttrigger)\n            keys=(\"input_r2\" \"input_toggle_fast_forward\")\n            ;;\n        leftthumb)\n            keys=(\"input_l3\")\n            ;;\n        rightthumb)\n            keys=(\"input_r3\" \"input_fps_toggle\")\n            ;;\n        start)\n            keys=(\"input_start\" \"input_exit_emulator\")\n            ;;\n        select)\n            keys=(\"input_select\")\n            ;;\n        leftanalogleft)\n            keys=(\"input_l_x_minus\")\n            ;;\n        leftanalogright)\n            keys=(\"input_l_x_plus\")\n            ;;\n        leftanalogup)\n            keys=(\"input_l_y_minus\")\n            ;;\n        leftanalogdown)\n            keys=(\"input_l_y_plus\")\n            ;;\n        rightanalogleft)\n            keys=(\"input_r_x_minus\")\n            ;;\n        rightanalogright)\n            keys=(\"input_r_x_plus\")\n            ;;\n        rightanalogup)\n            keys=(\"input_r_y_minus\")\n            ;;\n        rightanalogdown)\n            keys=(\"input_r_y_plus\")\n            ;;\n        hotkeyenable)\n            keys=(\"input_enable_hotkey\")\n            _retroarch_select_hotkey=0\n            if [[ \"${input_type}\" == \"key\" && \"${input_id}\" == \"0\" ]]; then\n                return\n            fi\n            ;;\n        *)\n            return\n            ;;\n    esac\n\n    local key\n    local value\n    local type\n    for key in \"${keys[@]}\"; do\n        case \"${input_type}\" in\n            hat)\n                type=\"btn\"\n                value=\"h${input_id}${input_name}\"\n                ;;\n            axis)\n                type=\"axis\"\n                if [[ \"${input_value}\" == \"1\" ]]; then\n                    value=\"+${input_id}\"\n                else\n                    value=\"-${input_id}\"\n                fi\n                ;;\n            *)\n                type=\"btn\"\n                value=\"${input_id}\"\n\n                # workaround for mismatched controller mappings\n                iniGet \"input_driver\"\n                if [[ \"${ini_value}\" == \"udev\" ]]; then\n                    case \"${RA_DEVICE_NAME}\" in\n                        \"8Bitdo FC30\"*|\"8Bitdo NES30\"*|\"8Bitdo SFC30\"*|\"8Bitdo SNES30\"*|\"8Bitdo Zero\"*)\n                            if [[ \"$_atebitdo_hack\" -eq 1 ]]; then\n                                value=\"$((input_id+11))\"\n                            fi\n                            ;;\n                    esac\n                fi\n                ;;\n        esac\n        if [[ \"${input_name}\" == \"select\" && \"$_retroarch_select_hotkey\" -eq 1 ]]; then\n            _retroarch_select_type=\"${type}\"\n        fi\n        key+=\"_${type}\"\n        iniSet \"${key}\" \"${value}\"\n    done\n}\n\nfunction map_retroarch_keyboard() {\n    local input_name=\"${1}\"\n    local input_type=\"${2}\"\n    local input_id=\"${3}\"\n    local input_value=\"${4}\"\n\n    local key\n    case \"${input_name}\" in\n        up)\n            keys=(\"input_player1_up\")\n            ;;\n        down)\n            keys=(\"input_player1_down\")\n            ;;\n        left)\n            keys=(\"input_player1_left\" \"input_state_slot_decrease\")\n            ;;\n        right)\n            keys=(\"input_player1_right\" \"input_state_slot_increase\")\n            ;;\n        a)\n            keys=(\"input_player1_a\")\n            ;;\n        b)\n            keys=(\"input_player1_b\" \"input_reset\")\n            ;;\n        x)\n            keys=(\"input_player1_x\" \"input_menu_toggle\")\n            ;;\n        y)\n            keys=(\"input_player1_y\")\n            ;;\n        leftbottom|leftshoulder)\n            keys=(\"input_player1_l\")\n            ;;\n        rightbottom|rightshoulder)\n            keys=(\"input_player1_r\")\n            ;;\n        lefttop|lefttrigger)\n            keys=(\"input_player1_l2\")\n            ;;\n        righttop|righttrigger)\n            keys=(\"input_player1_r2\")\n            ;;\n        leftthumb)\n            keys=(\"input_player1_l3\")\n            ;;\n        rightthumb)\n            keys=(\"input_player1_r3\")\n            ;;\n        start)\n            keys=(\"input_player1_start\" \"input_exit_emulator\")\n            ;;\n        select)\n            keys=(\"input_player1_select\")\n            ;;\n        hotkeyenable)\n            keys=(\"input_enable_hotkey\")\n            _retroarch_select_hotkey=0\n            ;;\n        *)\n            return\n            ;;\n    esac\n\n    for key in \"${keys[@]}\"; do\n        iniSet \"${key}\" \"${retroarchkeymap[${input_id}]}\"\n    done\n}\n\nfunction onend_retroarch_joystick() {\n    # if $_retroarch_select_hotkey is set here, then there was no hotkeyenable button\n    # in the configuration, so we should use the select button as hotkey enable if set\n    if [[ \"$_retroarch_select_hotkey\" -eq 1 ]]; then\n        iniGet \"input_select_${_retroarch_select_type}\"\n        [[ -n \"${ini_value}\" ]] && iniSet \"input_enable_hotkey_${_retroarch_select_type}\" \"${ini_value}\"\n    fi\n\n    # hotkey sanity check\n    # remove hotkeys if there is no hotkey enable button\n    if ! grep -q \"input_enable_hotkey\" /tmp/tempconfig.cfg; then\n        local key\n        for key in input_toggle_fast_forward input_rewind input_fps_toggle input_volume_up input_volume_down input_state_slot_decrease input_state_slot_increase input_reset input_menu_toggle input_load_state input_save_state input_exit_emulator; do\n            sed -i \"/${key}/d\" /tmp/tempconfig.cfg\n        done\n    fi\n\n    # disable any auto configs for the same device to avoid duplicates\n    local file\n    local dir=\"/tmp/joypads\"\n    while read -r file; do\n        mv \"${file}\" \"${file}.bak\" > /dev/null 2>&1\n    done < <(grep -Fl \"\\\"${RA_DEVICE_NAME}\\\"\" \"${dir}/\"*.cfg 2>/dev/null)\n\n\t\tfor file in /tmp/joypads/*.*; do\n\t\t\ttxt=$( cat \"$file\" | grep -E -c \"^input_vendor_id = \\\"${input_vendor}\\\"$|^input_product_id = \\\"${input_product}\\\"$\" )\n\t\t\t[[ \"${txt}\" == \"2\" ]] && mv \"${file}\" \"${file}.bak\" > /dev/null 2>&1\n\t\tdone\n\n    # sanitise filename\n    file=\"${RA_DEVICE_NAME//[\\?\\<\\>\\\\\\/:\\*\\|]/}.cfg\"\n\n    if [[ -f \"${dir}/${file}\" ]]; then\n        mv \"${dir}/${file}\" \"${dir}/${file}.bak\"\n    fi\n    sed -i '/^[[:space:]]*$/d' \"/tmp/tempconfig.cfg\"\n    mv \"/tmp/tempconfig.cfg\" \"${dir}/${file}\"\n}\n\nfunction onend_retroarch_keyboard() {\n    if [[ \"$_retroarch_select_hotkey\" -eq 1 ]]; then\n        iniGet \"input_player1_select\"\n        iniSet \"input_enable_hotkey\" \"${ini_value}\"\n    fi\n\n    # hotkey sanity check\n    # remove hotkeys if there is no hotkey enable button\n    iniGet \"input_enable_hotkey\"\n    if [[ -z \"${ini_value}\" || \"${ini_value}\" == \"nul\" ]]; then\n        iniSet \"input_state_slot_decrease\" \"\"\n        iniSet \"input_state_slot_increase\" \"\"\n        iniSet \"input_reset\" \"\"\n        iniSet \"input_menu_toggle\" \"f1\"\n        iniSet \"input_load_state\" \"\"\n        iniSet \"input_save_state\" \"\"\n        iniSet \"input_exit_emulator\" \"escape\"\n        iniSet \"input_shader_next\" \"\"\n        iniSet \"input_shader_prev\" \"\"\n        iniSet \"input_rewind\" \"\"\n        iniSet \"input_toggle_fast_forward\" \"\"\n        iniSet \"input_rewind\" \"\"\n        iniSet \"input_fps_toggle\" \"\"\n        iniSet \"input_volume_up\" \"\"\n        iniSet \"input_volume_down\" \"\"\n    fi\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/config/scripts/say/01-say.sh",
    "content": "#!/bin/bash\n\n#file=$(mktemp)\n#espeak -w ${file}.wav \"${1}\"\n#aplay ${file}.wav\n#rm ${file}.wav\nkillall aplay\nkillall espeak\nespeak \"${1}\" --stdout | aplay\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/depends/fping/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"fping\"\nPKG_VERSION=\"5.0\"\nPKG_SHA256=\"ed38c0b9b64686a05d1b3bc1d66066114a492e04e44eef1821d43b1263cd57b8\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://fping.org/\"\nPKG_URL=\"http://fping.org/dist/fping-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_TOOLCHAIN=\"auto\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--sbindir=/usr/bin\"\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/generate_es_systems.py",
    "content": "import argparse\r\nimport json\r\nimport xml.etree.ElementTree as ET\r\nfrom xml.dom import minidom\r\n\r\ndef json_to_es_xml(json_file, output_file, sort_key=None):\r\n    with open(json_file, 'r', encoding='utf-8') as f:\r\n        data = json.load(f)\r\n\r\n    systems = data.get('systems', [])\r\n\r\n    if sort_key:\r\n        systems.sort(key=lambda s: (s.get(sort_key) or s.get('name', '')).lower())\r\n\r\n    root = ET.Element('systemList')\r\n\r\n    for sys in systems:\r\n        system_el = ET.SubElement(root, 'system')\r\n\r\n        for key in ['name', 'fullname', 'manufacturer', 'release', 'hardware', 'path', 'platform', 'theme']:\r\n                if key in sys:\r\n                    ET.SubElement(system_el, key).text = str(sys[key])\r\n                \r\n            # Handle command separately to allow \"default\" shorthand\r\n        if 'command' in sys:\r\n            if sys['command'] == \"default\":\r\n                command_value = 'emuelecRunEmu.sh %ROM% -P%SYSTEM% --core=%CORE% --emulator=%EMULATOR% --controllers=\"%CONTROLLERSCONFIG%\"'\r\n            else:\r\n                command_value = sys['command']\r\n            ET.SubElement(system_el, 'command').text = command_value\r\n\r\n        if 'extensions' in sys:\r\n            ext_set = set()\r\n            for ext in sys['extensions']:\r\n                ext_set.add(ext.lower())\r\n                ext_set.add(ext.upper())\r\n            ET.SubElement(system_el, 'extension').text = ' '.join(sorted(ext_set, key=str.lower))\r\n\r\n        if 'emulators' in sys and sys['emulators']:\r\n            emulators_el = ET.SubElement(system_el, 'emulators')\r\n            default_set = False\r\n\r\n            for emulator in sys['emulators']:\r\n                emu_el = ET.SubElement(emulators_el, 'emulator', {'name': emulator['name']})\r\n                cores_el = ET.SubElement(emu_el, 'cores')\r\n\r\n                for core in emulator.get('cores', []):\r\n                    core_attrs = {}\r\n\r\n                    # Handle default core\r\n                    if core.get('default', False):\r\n                        if not default_set:\r\n                            core_attrs['default'] = 'true'\r\n                            default_set = True\r\n                        else:\r\n                            print(\r\n                                f\"Warning: Multiple default cores found in system '{sys.get('name')}'. \"\r\n                                f\"Ignoring '{core['name']}' in emulator '{emulator['name']}'\"\r\n                            )\r\n\r\n                    # Handle incompatible extensions\r\n                    if 'incompatible' in core:\r\n                        if isinstance(core['incompatible'], list):\r\n                            core_attrs['incompatible_extensions'] = ' '.join(core['incompatible'])\r\n                        else:\r\n                            print(f\"'incompatible' should be a list in core '{core['name']}'\")\r\n\r\n                    ET.SubElement(cores_el, 'core', core_attrs).text = core['name']\r\n\r\n    # Pretty-print the XML\r\n    xml_str = ET.tostring(root, encoding='utf-8')\r\n    pretty_xml = minidom.parseString(xml_str).toprettyxml(indent=\"    \")\r\n\r\n    # Fix declaration and insert comment\r\n    lines = pretty_xml.splitlines()\r\n    lines[0] = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'\r\n\r\n    comment = ('<!-- This is the EmulationStation Systems configuration file.\\n'\r\n               'All systems must be contained within the <systemList> tag.\\n'\r\n\t\t\t   'This file will be replaced on any new update of EmuELEC-->')\r\n\r\n    final_lines = [lines[0], comment] + lines[1:]\r\n    final_xml = '\\n'.join(final_lines) + '\\n'\r\n\r\n    with open(output_file, 'w', encoding='utf-8') as f:\r\n        f.write(final_xml)\r\n\r\n    print(f\"JSON to EmulationStation es_systems written to {output_file}\")\r\n\r\n\r\ndef es_xml_to_json(xml_file, output_file):\r\n    tree = ET.parse(xml_file)\r\n    root = tree.getroot()\r\n\r\n    systems = []\r\n\r\n    for system_el in root.findall('system'):\r\n        system = {}\r\n\r\n        for key in ['name', 'fullname', 'manufacturer', 'release', 'hardware', 'path', 'platform', 'theme', 'command']:\r\n            el = system_el.find(key)\r\n            if el is not None and el.text:\r\n                system[key] = el.text.strip()\r\n\r\n        ext_el = system_el.find('extension')\r\n        if ext_el is not None and ext_el.text:\r\n            raw_exts = ext_el.text.strip().split()\r\n            # Deduplicate and keep only lowercase\r\n            lower_exts = sorted(set(ext.lower() for ext in raw_exts))\r\n            system['extensions'] = lower_exts\r\n\r\n\r\n        emulators = []\r\n        default_set = False\r\n        emulators_el = system_el.find('emulators')\r\n        if emulators_el is not None:\r\n            for emulator_el in emulators_el.findall('emulator'):\r\n                emulator = {'name': emulator_el.attrib.get('name'), 'cores': []}\r\n                cores_el = emulator_el.find('cores')\r\n                if cores_el is not None:\r\n                    for core_el in cores_el.findall('core'):\r\n                        core_name = core_el.text.strip()\r\n                        core_obj = {'name': core_name}\r\n\r\n                        if core_el.attrib.get('default') == 'true':\r\n                            if not default_set:\r\n                                core_obj['default'] = True\r\n                                default_set = True\r\n                            else:\r\n                                print(\r\n                                    f\"Warning: Multiple default cores in system '{system.get('name')}', \"\r\n                                    f\"ignoring default on core '{core_name}' in emulator '{emulator['name']}'\"\r\n                                )\r\n\r\n                        # Handle incompatible extensions\r\n                        incompat = core_el.attrib.get('incompatible_extensions')\r\n                        if incompat:\r\n                            core_obj['incompatible'] = incompat.split()\r\n\r\n                        emulator['cores'].append(core_obj)\r\n                emulators.append(emulator)\r\n\r\n        if emulators:\r\n            system['emulators'] = emulators\r\n\r\n        systems.append(system)\r\n\r\n    with open(output_file, 'w', encoding='utf-8') as f:\r\n        json.dump({'systems': systems}, f, indent=2)\r\n\r\n    print(f\"EmulationStation es_systems to JSON written to {output_file}\")\r\n\r\n\r\ndef main():\r\n    parser = argparse.ArgumentParser(description=\"Convert between JSON and EmulationStation es_systems.cfg.\")\r\n    parser.add_argument('-r', '--reverse', action='store_true', help=\"Convert from EmulationStation es_systems to JSON (default is JSON to EmulationStation es_systems)\")\r\n    parser.add_argument('-i', '--input', help=\"Input file path\")\r\n    parser.add_argument('-b', '--order-by', help=\"Sort systems by this field (only used in JSON to EmulationStation es_systems)\")\r\n    parser.add_argument('-o', '--output', help=\"Output file path\")\r\n\r\n    args = parser.parse_args()\r\n\r\n    if args.reverse:\r\n        input_file = args.input or 'es_systems.cfg'\r\n        output_file = args.output or 'es_systems.json'\r\n        es_xml_to_json(input_file, output_file)\r\n    else:\r\n        input_file = args.input or 'es_systems.json'\r\n        output_file = args.output or 'es_systems.cfg'\r\n        json_to_es_xml(input_file, output_file, sort_key=args.order_by)\r\n\r\nif __name__ == \"__main__\":\r\n    main()\r\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"emuelec-emulationstation\"\nPKG_VERSION=\"3de652c69481de5fad2178ceebb9470950b3e683\"\nPKG_GIT_CLONE_BRANCH=\"EmuELEC\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/EmuELEC/emuelec-emulationstation\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 freetype freeimage vlc rapidjson ${OPENGLES} SDL2_mixer fping p7zip espeak\"\nPKG_SECTION=\"emuelec\"\nPKG_SHORTDESC=\"Emulationstation emulator frontend\"\nPKG_BUILD_FLAGS=\"-gold\"\nGET_HANDLER_SUPPORT=\"git\"\n\n\nif [[ ${DEVICE} == \"OdroidGoAdvance\"  ]] || [[ ${DEVICE} == \"GameForce\"  ]]; then \n\tPKG_PATCH_DIRS=\"Rockchip/HH\"\nfi\n\nif [[ ${DEVICE} == \"OdroidM1\"  ]] || [[ ${DEVICE} == \"RK356x\"  ]]; then \n\tPKG_PATCH_DIRS=\"Rockchip\"\nfi\n\n# themes for Emulationstation\nPKG_DEPENDS_TARGET=\"${PKG_DEPENDS_TARGET} Crystal\"\n\npre_configure_target() {\n\n# build directly in ${PKG_BUILD} to avoid Python3 errors\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n\nPKG_CMAKE_OPTS_TARGET=\" -DENABLE_EMUELEC=1 -DDISABLE_KODI=1 -DENABLE_FILEMANAGER=1 -DGLES2=1 -DENABLE_TTS=1\"\n\n# Read api_keys.txt if it exist to add the required keys for cheevos, thegamesdb and screenscrapper. You need to get your own API keys. \n# File should be in this format\n# -DSCREENSCRAPER_DEV_LOGIN=devid=<devusername>&devpassword=<devpassword> \n# -DGAMESDB_APIKEY=<gamesdbapikey>\n# -DCHEEVOS_DEV_LOGIN=z=<yourusername>&y=<yourapikey>\n# and it should be placed next to this file\n\nif [ -f ${PKG_DIR}/api_keys.txt ]; then\nwhile IFS=\"\" read -r p || [ -n \"${p}\" ]\ndo\n  PKG_CMAKE_OPTS_TARGET+=\" ${p}\"\ndone < ${PKG_DIR}/api_keys.txt\nfi\n\nif [[ ${DEVICE} == \"GameForce\" ]]; then\nPKG_CMAKE_OPTS_TARGET+=\" -DENABLE_GAMEFORCE=1\"\nfi\n\nif [[ ${DEVICE} == \"OdroidGoAdvance\"  ]]; then\nPKG_CMAKE_OPTS_TARGET+=\" -DODROIDGOA=1\"\nfi\n\n}\n\nmakeinstall_target() {\n\n\tmkdir -p ${INSTALL}/usr/config/emuelec/configs/locale/i18n/charmaps\n\tcp -rf ${PKG_BUILD}/locale/lang/* ${INSTALL}/usr/config/emuelec/configs/locale/\n\tcp -PR \"$(get_build_dir glibc)/localedata/charmaps/UTF-8\" ${INSTALL}/usr/config/emuelec/configs/locale/i18n/charmaps/UTF-8\n\t\n\tmkdir -p ${INSTALL}/usr/lib\n\tln -sf /storage/.config/emuelec/configs/locale ${INSTALL}/usr/lib/locale\n\t\n\tmkdir -p ${INSTALL}/usr/config/emulationstation/resources\n    cp -rf ${PKG_BUILD}/resources/* ${INSTALL}/usr/config/emulationstation/resources/\n    \n    mkdir -p ${INSTALL}/usr/bin\n    ln -sf /storage/.config/emulationstation/resources ${INSTALL}/usr/bin/resources\n    cp -rf ${PKG_BUILD}/emulationstation ${INSTALL}/usr/bin\n    cp -PR \"$(get_build_dir glibc)/.${TARGET_NAME}/locale/localedef\" ${INSTALL}/usr/bin\n\n\tmkdir -p ${INSTALL}/etc/emulationstation/\n\tln -sf /storage/.config/emulationstation/themes ${INSTALL}/etc/emulationstation/\n   \n\tmkdir -p ${INSTALL}/usr/config/emulationstation\n\tcp -rf ${PKG_DIR}/config/scripts ${INSTALL}/usr/config/emulationstation\n\tcp -rf ${PKG_DIR}/config/*.cfg ${INSTALL}/usr/config/emulationstation\n\tcp -rf ${PKG_DIR}/config/resources ${INSTALL}/usr/config/emulationstation/\n\n\t# Generate es_systems.cfg from json\n\tpython3 ${PKG_DIR}/generate_es_systems.py -i ${PKG_DIR}/config/es_systems.json -o ${INSTALL}/usr/config/emulationstation/es_systems.cfg -b manufacturer\n\n\tchmod +x ${INSTALL}/usr/config/emulationstation/scripts/*\n\tchmod +x ${INSTALL}/usr/config/emulationstation/scripts/configscripts/*\n\tfind ${INSTALL}/usr/config/emulationstation/scripts/ -type f -exec chmod o+x {} \\; \n\t\n\t# Vertical Games are only supported in the OdroidGoAdvance\n    if [[ ${DEVICE} != \"OdroidGoAdvance\" ]]; then\n        sed -i \"s|, vertical||g\" \"${INSTALL}/usr/config/emulationstation/es_features.cfg\"\n    fi\n\t\n\t# Amlogic project has an issue with mixed audio\n    if [[ \"${DEVICE}\" == \"Amlogic-old\" ]]; then\n        sed -i \"s|</config>|\t<bool name=\\\"StopMusicOnScreenSaver\\\" value=\\\"false\\\" />\\n</config>|g\" \"${INSTALL}/usr/config/emulationstation/es_settings.cfg\"\n    fi\n\n    if [[ \"${DEVICE}\" == \"OdroidGoAdvance\" ]] || [[ \"${DEVICE}\" == \"GameForce\" ]]; then\n        sed -i \"s|<\\/config>|\t<string name=\\\"GamelistViewStyle\\\" value=\\\"Small Screen\\\" />\\n<\\/config>|g\" \"${INSTALL}/usr/config/emulationstation/es_settings.cfg\"\n        sed -i \"s|value=\\\"panel\\\" />|value=\\\"small panel\\\" />|g\" \"${INSTALL}/usr/config/emulationstation/es_settings.cfg\"\n    fi\n    \n    if  [[ \"${DEVICE}\" == \"GameForce\" ]]; then\n    \tmkdir -p ${INSTALL}/usr/config/emulationstation/themesettings\n        sed -i \"s|<\\/config>|\t<string name=\\\"subset.ratio\\\" value=\\\"43\\\" />\\n<\\/config>|g\" \"${INSTALL}/usr/config/emulationstation/es_settings.cfg\"\n        echo \"subset.ratio=43\" > ${INSTALL}/usr/config/emulationstation/themesettings/Crystal.cfg\n    fi\n\n# Remove unused cores\nCORESFILE=\"${INSTALL}/usr/config/emulationstation/es_systems.cfg\"\n\nif [[ \"${DEVICE}\" != \"Amlogic-ng\" || \"${DEVICE}\" != \"Amlogic-ne\" || \"${DEVICE}\" != \"Amlogic-no\" ]]; then\n    if [[ ${DEVICE} == \"OdroidGoAdvance\" || \"${DEVICE}\" == \"GameForce\" ]]; then\n        remove_cores=\"mesen-s quicknes mame2016 mesen\"\n    elif [ \"${DEVICE}\" == \"Amlogic-old\" ]; then\n        remove_cores=\"mesen-s quicknes mame2016 mesen yabasanshiroSA yabasanshiro\"\n        xmlstarlet ed -L -P -d \"/systemList/system[name='saturn']\" ${CORESFILE}\n        xmlstarlet ed -L -P -d \"/systemList/system[name='philips-cdi']\" ${CORESFILE}\n        xmlstarlet ed -L -P -d \"/systemList/system/emulators/emulator[@name='Duckstation']\" ${CORESFILE}\n    fi\n    \n    for discore in ${remove_cores}; do\n        sed -i \"s|<core>${discore}</core>||g\" ${CORESFILE}\n        sed -i '/^[[:space:]]*$/d' ${CORESFILE}\n    done\nfi\n\n# Remove Retrorun For unsupported devices\nif [[ ${DEVICE} != \"OdroidGoAdvance\" ]] && [[ \"${DEVICE}\" != \"GameForce\" ]]; then\n\txmlstarlet ed -L -P -d \"/systemList/system/emulators/emulator[@name='retrorun']\" ${CORESFILE}\nelse\n\t# remove duckstation for the OGA/GF\n\txmlstarlet ed -L -P -d \"/systemList/system/emulators/emulator[@name='Duckstation']\" ${CORESFILE}\n\n\t# set parallel_n64_32b as default for handhelds\n\tsed -i \"s|<core default=\\\"true\\\">mupen64plus_next</core>|<core>mupen64plus_next</core>|g\" ${CORESFILE}\n\tsed -i \"s|<core>parallel_n64_32b</core>|<core default=\\\"true\\\">parallel_n64_32b</core>|g\" ${CORESFILE}\nfi\n\n}\n\npost_install() {  \n\tenable_service emustation.service\n\tmkdir -p ${INSTALL}/usr/share\n\tln -sf /storage/.config/emuelec/configs/locale ${INSTALL}/usr/share/locale\n\tmkdir -p ${INSTALL}/usr/bin/batocera/\n\tln -sf /usr/bin/7zr ${INSTALL}/usr/bin/batocera/7zr\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/patches/Rockchip/HH/emuelec-emulationstation-oga-fixes.patch",
    "content": "--- a/es-app/src/guis/GuiMenu.cpp\n+++ b/es-app/src/guis/GuiMenu.cpp\n@@ -1561,7 +1561,7 @@\n \t}\n #endif\n \n-#ifdef BATOCERA\n+#if defined(ENABLE_GAMEFORCE) || defined(ODROIDGOA)\n \ts->addGroup(_(\"HARDWARE\"));\n #endif\n \n--- a/es-core/src/Settings.cpp\n+++ b/es-core/src/Settings.cpp\n@@ -181,7 +181,7 @@\n \n \t// Audio out device for volume control\n \t#if defined _RPI_ || defined _ENABLEEMUELEC\n-\t\tmStringMap[\"AudioDevice\"] = \"PCM\";\n+\t\tmStringMap[\"AudioDevice\"] = \"Playback\";\n \t#else\n \t\tmStringMap[\"AudioDevice\"] = \"Master\";\n \t#endif\n--- a/es-app/src/FileData.cpp\n+++ b/es-app/src/FileData.cpp\n@@ -741,10 +741,12 @@\n \tVolumeControl::getInstance()->deinit();\n \n \tbool hideWindow = Settings::getInstance()->getBool(\"HideWindow\");\n+/*\n #ifdef _ENABLEEMUELEC\n \t// attempts to fix screen tearing issue, we always need hideWindow to false\n \thideWindow = false;\n #endif\n+*/\n \twindow->deinit(hideWindow);\n \t\n \tconst std::string rom = Utils::FileSystem::getEscapedPath(getPath());\n--- a/es-core/src/InputManager.cpp\n+++ b/es-core/src/InputManager.cpp\n@@ -587,15 +587,6 @@\n \t\tif (ev.key.repeat)\n \t\t\treturn false;\n \n-#ifdef _ENABLEEMUELEC\n-\t\t/* use the POWER KEY to turn off EmuELEC, specially useful for GTKING-PRO and Odroid Go Advance*/\n-        if(ev.key.keysym.sym == SDLK_POWER) {\n-\t\t\tScripting::fireEvent(\"quit\", \"shutdown\");\n-\t\t\tUtils::Platform::quitES(Utils::Platform::QuitMode::SHUTDOWN);\n-\t\t\t/*LOG(LogError) << \"no quit?\";*/\n-\t\t\treturn false;\n-\t\t}\n-#endif\n \n #if !WIN32\n \t\tif (ev.key.keysym.sym == SDLK_F4)\n@@ -607,11 +598,11 @@\n \t\t}\n #endif\n \n-\t\twindow->input(getInputConfigByDevice(DEVICE_KEYBOARD), Input(DEVICE_KEYBOARD, TYPE_KEY, ev.key.keysym.sym, 1, false));\n+\t\tif(ev.key.keysym.sym != SDLK_POWER) window->input(getInputConfigByDevice(DEVICE_KEYBOARD), Input(DEVICE_KEYBOARD, TYPE_KEY, ev.key.keysym.sym, 1, false));\n \t\treturn true;\n \n \tcase SDL_KEYUP:\n-\t\twindow->input(getInputConfigByDevice(DEVICE_KEYBOARD), Input(DEVICE_KEYBOARD, TYPE_KEY, ev.key.keysym.sym, 0, false));\n+\t\tif(ev.key.keysym.sym != SDLK_POWER) window->input(getInputConfigByDevice(DEVICE_KEYBOARD), Input(DEVICE_KEYBOARD, TYPE_KEY, ev.key.keysym.sym, 0, false));\n \t\treturn true;\n \n \tcase SDL_TEXTINPUT:\n\n--- a/es-app/src/views/ViewController.cpp\n+++ b/es-app/src/views/ViewController.cpp\n@@ -527,11 +527,9 @@\n #ifdef _ENABLEEMUELEC\n /* Detect unconfigured keyboad as well */\n         if(config->isConfigured() == false) {\n-\t\t\tif(input.type == TYPE_BUTTON || input.type == TYPE_KEY) {\n-\t\t\t\tif(input.id != SDLK_POWER) {\n+\t\t\tif(input.type == TYPE_BUTTON) {\n \t    mWindow->pushGui(new GuiDetectDevice(mWindow, false, NULL));\n \t    return true;\n-\t}\n \t  }\n         }\n #else\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/patches/Rockchip/emuelec-emulationstation-window-fix-rockchip.patch",
    "content": "--- a/es-app/src/FileData.cpp\n+++ b/es-app/src/FileData.cpp\n@@ -741,10 +741,12 @@\n \tVolumeControl::getInstance()->deinit();\n \n \tbool hideWindow = Settings::getInstance()->getBool(\"HideWindow\");\n+/*\n #ifdef _ENABLEEMUELEC\n \t// attempts to fix screen tearing issue, we always need hideWindow to false\n \thideWindow = false;\n #endif\n+*/\n \twindow->deinit(hideWindow);\n \t\n \tconst std::string rom = Utils::FileSystem::getEscapedPath(getPath());\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/system.d/emustation.service",
    "content": "[Unit]\nDescription=EmulationStation emulator frontend\nConditionPathExists=/var/lock/start.games\n\n[Service]\nEnvironment=HOME=/storage\nEnvironmentFile=/storage/.config/emulationstation/scripts/es_env.sh\nExecStartPre=emustation-config\nExecStartPre=/usr/bin/killes.sh\nExecStart=/bin/bash -c 'emulationstation $(cat /emuelec/configs/ES_ARGS)'\nKillMode=process\nTimeoutStopSec=3\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=emuelec.target\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/themes/Crystal/Crystal-Collections/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"Crystal-Collections\"\nPKG_VERSION=\"ac3311290ecf19a272535d2a9566ec58b8fdd3e8\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/dm2912/Crystal-Collections\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec\"\nPKG_SHORTDESC=\"Crystal Dynamic Collections for use on the Crystal Theme\"\nPKG_TOOLCHAIN=\"manual\"\nGET_HANDLER_SUPPORT=\"git\"\n\nmake_target() {\n  : not\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/config/emulationstation/collections\n  cp -r *.xcc ${INSTALL}/usr/config/emulationstation/collections\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/themes/Crystal/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"Crystal\"\nPKG_VERSION=\"0e3c9e15768517cb80926850345a90fb24bd20f2\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/dm2912/Crystal\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain Crystal-Collections\"\nPKG_SECTION=\"emuelec\"\nPKG_SHORTDESC=\"Crystal theme for EMUELEC by Dim (dm2912)\"\nPKG_TOOLCHAIN=\"manual\"\nGET_HANDLER_SUPPORT=\"git\"\n\nmake_target() {\n  : not\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/config/emulationstation/themes/Crystal\n    cp -r * ${INSTALL}/usr/config/emulationstation/themes/Crystal\n    rm -rf ${INSTALL}/usr/config/emulationstation/themes/Crystal/screens.png\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-emulationstation/themes/es-theme-EmuELEC-carbon/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"es-theme-EmuELEC-carbon\"\nPKG_VERSION=\"381e539bd1d7e86d87e2ba679e95ddca6888ddd2\"\nPKG_SHA256=\"18ed2aebd4e3776a42bfa89a489ac45b4c338c86dcef5ff8cd123e7bd7cc0ae2\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/EmuELEC/es-theme-EmuELEC-carbon\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec\"\nPKG_SHORTDESC=\"The EmulationStation theme Carbon Fabrice Caruso's fork with changes for EmuELEC by drixplm\"\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"no\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  : not\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/config/emulationstation/themes/es-theme-EmuELEC-carbon\n    cp -r * ${INSTALL}/usr/config/emulationstation/themes/es-theme-EmuELEC-carbon\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/VVVVVV/config/saves/settings.vvv",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Settings>\n    <!-- Settings (duplicated from unlock.vvv) -->\n    <Data>\n        <fullscreen>1</fullscreen>\n        <stretch>2</stretch>\n    </Data>\n</Settings>\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/VVVVVV/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"VVVVVV\"\nPKG_VERSION=\"f27374d92e7af762d7bfc0d1f36e9a84ffd3d634\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"CUSTOM\"\nPKG_SITE=\"https://github.com/TerryCavanagh/VVVVVV\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_mixer\"\nPKG_SHORTDESC=\"VVVVVV License: https://github.com/TerryCavanagh/VVVVVV/blob/master/LICENSE.md\"\nPKG_LONGDESC=\"VVVVVV is a platform game all about exploring one simple mechanical idea - what if you reversed gravity instead of jumping?\"\nPKG_TOOLCHAIN=\"cmake\"\n\nif [ \"${DEVICE}\" == \"Amlogic-ogu\" ]; then\n# OGU uses SDL 2.0.22 which is not compatible with newer versions of VVVVVV\nPKG_VERSION=\"67d350de05850067e7bc976a9a370dcff28df62b\"\nfi\n\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\nPKG_PATCH_DIRS=\"OdroidGoAdvance\"\nfi\n\nPKG_CMAKE_OPTS_TARGET=\" desktop_version\"\n\npre_configure_target() {\nsed -i \"s/fullscreen = false/fullscreen = true/\" \"${PKG_BUILD}/desktop_version/src/Screen.cpp\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp VVVVVV ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/VVVVVV/patches/VVVVVV-01-bios_path.patch",
    "content": "--- a/desktop_version/src/FileSystemUtils.cpp\n+++ b/desktop_version/src/FileSystemUtils.cpp\n@@ -150,7 +150,7 @@\n     else\n     {\n         SDL_snprintf(output, sizeof(output), \"%s%s\",\n-            basePath,\n+            \"/storage/roms/ports/VVVVVV/\",\n             \"data.zip\"\n         );\n     }\n@@ -173,7 +173,7 @@\n         goto end;\n     }\n \n-    SDL_snprintf(output, sizeof(output), \"%s%s\", basePath, \"gamecontrollerdb.txt\");\n+    SDL_snprintf(output, sizeof(output), \"%s%s\", \"/storage/.config/SDL-GameControllerDB/\", \"gamecontrollerdb.txt\");\n     if (SDL_GameControllerAddMappingsFromFile(output) < 0)\n     {\n         vlog_info(\"gamecontrollerdb.txt not found!\");\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/abuse/config/gptokeyb/abuse.gptk",
    "content": "back = esc\nstart = enter\nguide = enter\na = x\nb = z\nx = c\ny = a\nl1 = shift\nl2 = home\nl3 = mouse_left\nr1 = s\nr2 = end\nr3 = mouse_right\nup = up\ndown = down\nleft = left\nright = right\nleft_analog_up = up\nleft_analog_down = down\nleft_analog_left = left\nleft_analog_right = right\nright_analog_up = mouse_movement_\nright_analog_down = mouse_movement_down\nright_analog_left = mouse_movement_left\nright_analog_right = mouse_movement_right\ndeadzone_y = 2100\ndeadzone_x = 1900\ndeadzone_triggers = 3000\nmouse_scale = 512\nmouse_delay = 16\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/abuse/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"abuse\"\nPKG_VERSION=\"9d1f66f57377859bae10e28eabebea0b9c750490\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/Xenoveritas/abuse\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_mixer libepoxy\"\nPKG_LONGDESC=\"Abuse SDL port originally from Crack-Dot-Com and released into the public domain\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"cmake\"\n\nPKG_CMAKE_OPTS_TARGET=\" -DCMAKE_BUILD_TYPE=Release\"\n\npre_configure_target() {\n\tif [ ! -e ${SOURCES}/${PKG_NAME}/abuse-0.8.tar.gz ]; then\n\t\twget http://abuse.zoy.org/raw-attachment/wiki/download/abuse-0.8.tar.gz -P ${SOURCES}/${PKG_NAME}\n\tfi\n\n\ttar -xf ${SOURCES}/${PKG_NAME}/abuse-0.8.tar.gz -C ${SOURCES}/${PKG_NAME}/\n\trm -rf ${PKG_BUILD}/data/{music,sfx}\n\tmv ${SOURCES}/${PKG_NAME}/abuse-0.8/data/music ${PKG_BUILD}/data\n\tmv ${SOURCES}/${PKG_NAME}/abuse-0.8/data/sfx ${PKG_BUILD}/data\n\trm -rf ${SOURCES}/${PKG_NAME}/abuse-0.8/\n}\n\npost_makeinstall_target() {\t\n\tmkdir -p ${INSTALL}/usr/config/emuelec/configs/\n\tcp -rf ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/augustus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"augustus\"\nPKG_VERSION=\"8a136244e8edf87e7b061d6da3fb36457e1d6f03\"\nPKG_SHA256=\"49bb5fdd6e2ba11821fe02a4678283d393aab0dff6bc8cb62fd577b5848df345\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/Keriew/augustus\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_LONGDESC=\"An open source re-implementation of Caesar III\"\nPKG_TOOLCHAIN=\"cmake-make\"\n\npre_configure_target() {\n# Just setting the version\nsed -i \"s|unknown development version|Version: ${PKG_VERSION:0:7} - ${DISTRO}|g\" ${PKG_BUILD}/CMakeLists.txt\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/augustus/patches/01-augustus-EmuELEC-fixes.patch",
    "content": "--- a/src/platform/joystick.c\n+++ b/src/platform/joystick.c\n@@ -103,7 +103,7 @@\n #if defined(__vita__) || defined(__SWITCH__)\n     return 1;\n #else\n-    return 0;\n+    return 1;\n #endif\n }\n \n--- a/src/platform/vita/vita.h\n+++ b/src/platform/vita/vita.h\n@@ -25,3 +25,10 @@\n \n #endif // __vita__\n #endif // PLATFORM_VITA_H\n+\n+// We are not compiling for vita, but vita.h header is used widely we can set our options for EmuELEC here\n+// We force the software use of cursor so that it is shown.\n+#define PLATFORM_USE_SOFTWARE_CURSOR\n+\n+// Fix for misaligned textures: https://github.com/Keriew/augustus/issues/645\n+// echo \"#define MAX_TEXTURE_SIZE 1024\" >> ${PKG_BUILD}/src/platform/vita/vita.h\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/bennugd-monolithic/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"bennugd-monolithic\"\nPKG_VERSION=\"60ee3389efcf9b402d66035e87f33d17d70cbd83\"\nPKG_ARCH=\"arm\"\nPKG_SITE=\"https://github.com/christianhaitian/bennugd-monolithic\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain libvorbisidec SDL2 SDL2_mixer libpng tre\"\nPKG_SHORTDESC=\"Use for executing bennugd games like Streets of Rage Remake \"\nPKG_TOOLCHAIN=\"cmake-make\"\n\n\nchainfile=\"cmake-aarch64-libreelec-linux-gnueabi.conf\"\n\nif [ ${ARCH} == \"arm\" ]; then\n\tchainfile=\"cmake-${TARGET_NAME}.conf\"\nfi\n\npre_configure_target() {\nPKG_CMAKE_SCRIPT=\"${PKG_BUILD}/projects/cmake/bgdc/CMakeLists.txt\"\ncd ${PKG_BUILD}/projects/cmake/bgdc/\ncmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN}/etc/${chainfile} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=MinSizeRel ${PKG_CMAKE_SCRIPT}\nmake\n\nPKG_CMAKE_SCRIPT=\"${PKG_BUILD}/projects/cmake/bgdi/CMakeLists.txt\"\ncd ${PKG_BUILD}/projects/cmake/bgdi/\ncmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN}/etc/${chainfile} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=MinSizeRel ${PKG_CMAKE_SCRIPT}\nmake\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp ${PKG_BUILD}/projects/cmake/bgdi/bgdi ${INSTALL}/usr/bin\ncp ${PKG_BUILD}/projects/cmake/bgdc/bgdc ${INSTALL}/usr/bin\n} \n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/bennugd-monolithic/tre/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"tre\"\nPKG_VERSION=\"6092368aabdd0dbb0fbceb2766a37b98e0ff6911\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/laurikari/tre\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\"The approximate regex matching library and agrep command line tool.\"\nPKG_TOOLCHAIN=\"autotools\"\n\npre_configure_target() {\nsed -i \"s|AM_GNU_GETTEXT_VERSION(0.17)|AM_GNU_GETTEXT_REQUIRE_VERSION(0.17)|\" ${PKG_BUILD}/configure.ac\n}\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/bermuda/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"bermuda\"\nPKG_VERSION=\"cf6bdb68d53a1618967da565a44c931b15daf791\"\nPKG_SHA256=\"5e71a82c38a9496baea8a20d6463630f848aa20db9db90de0cccb4e68e159851\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Unspecified\"\nPKG_SITE=\"https://github.com/cyxx/bermuda\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_mixer SDL2_image\"\nPKG_LONGDESC=\"Bermuda Syndrome engine reimplementation (Emscripten, libretro, SDL) \"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target(){\nsed -i \"s|sdl2-config|${SYSROOT_PREFIX}/usr/bin/sdl2-config|g\" ${PKG_BUILD}/Makefile\n}\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp bs ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/broguece/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"broguece\"\nPKG_VERSION=\"dfd321ed82b104ed141323baefc6fef1c7b60315\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"AGPL3\"\nPKG_SITE=\"https://github.com/tmewett/BrogueCE\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_image\"\nPKG_LONGDESC=\"Brogue: Community Edition - a community-lead fork of the much-loved minimalist roguelike game\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"make\"\n\n\npre_configure_target() {\n\tsed -i \"s|#include <SDL_image.h>|#include <SDL2/SDL_image.h>|\" ${PKG_BUILD}/src/platform/tiles.c ${PKG_BUILD}/src/platform/sdl2-platform.c\n}\n\nmakeinstall_target() {\n\tmkdir -p ${INSTALL}/usr/bin\n\tcp -rf ${PKG_BUILD}/bin/assets ${INSTALL}/usr/bin\n\tcp -rf ${PKG_BUILD}/bin/brogue ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/bstone/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"bstone\"\nPKG_VERSION=\"ca0c1a02abcf2513b1871a09f786162abb41caec\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/bibendovsky/bstone\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_SHORTDESC=\"Unofficial source port for Blake Stone series \"\nPKG_TOOLCHAIN=\"cmake\"\n\nPKG_CMAKE_OPTS_TARGET=\" -DCMAKE_BUILD_TYPE=Release\"\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp -rf ${PKG_BUILD}/.${TARGET_NAME}/src/bstone/bstone ${INSTALL}/usr/bin/bstone\ncp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin/\n} \n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/bstone/scripts/bstone.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nDATADIR=\"/storage/roms/ports/bstone/aog\"\n\nif [ \"${1}\" == \"ps\" ]; then \n    DATADIR=\"/storage/roms/ports/bstone/ps\"\nfi\n\nCONFIGFOLDER=\"/storage/.config/emuelec/configs/bstone\"\nPORTNAME=\"bstone\"\nGPTOKEYB_CONFIG=\"/emuelec/configs/gptokeyb/default.gptk\"\n\n[[ -e \"/emuelec/configs/gptokeyb/bstone.gptk\" ]] && GPTOKEYB_CONFIG=\"/emuelec/configs/gptokeyb/bstone.gptk\"\n\ngptokeyb -c \"${GPTOKEYB_CONFIG}\" &\n\nmkdir -p \"${CONFIGFOLDER}\"\ncd \"${CONFIGFOLDER}\"\n\nif [ \"${EE_DEVICE}\" == \"Amlogic-ng\" ]; then \n    params=\"--vid_renderer software --vid_width 1920 --vid_height 1080 --vid_is_widescreen 1\"\nelse\n    params=\"--vid_renderer auto-detect\"\n    case $(oga_ver) in\n        \"OGS\")\n            params+=\" --vid_width 854 --vid_height 480 --vid_is_widescreen 1\"\n        ;;\n        \"OGA\")\n            params+=\" --vid_width 480 --vid_height 320 --vid_is_widescreen 1\"\n        ;;\n        \"GF\")\n            params+=\" --vid_width 640 --vid_height 480 --vid_is_widescreen 0\"\n        ;;\n    esac\nfi\n\nbstone --profile_dir \"${CONFIGFOLDER}\" --data_dir \"${DATADIR}\" ${params}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/ccleste/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"ccleste\"\nPKG_VERSION=\"261d96f15af430b8111abc7a5250229246654f52\"\nPKG_SITE=\"https://github.com/lemon32767/ccleste\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_mixer\"\nPKG_SHORTDESC=\"Celeste Classic C source port for 3DS and PC.\"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\n sed -i \"s|=sdl2-config|=${SYSROOT_PREFIX}/usr/bin/sdl2-config|g\" Makefile\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/ccleste\n  cp ${PKG_BUILD}/ccleste ${INSTALL}/usr/bin\n  cp -rf ${PKG_BUILD}/data ${INSTALL}/usr/config/emuelec/configs/ccleste\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/cdogs-sdl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"cdogs-sdl\"\nPKG_VERSION=\"c337d85e16fdd36cdaf455e5779ecbdfc0300c6f\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/cxong/cdogs-sdl\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 python3-protobuf:host\"\nPKG_SHORTDESC=\"Classic overhead run-and-gun game\"\nPKG_TOOLCHAIN=\"cmake-make\"\n\npre_configure_target() {\nsed -i \"s|-Werror|-Wno-error|\" ${PKG_BUILD}/CMakeLists.txt\nPKG_CMAKE_OPTS_TARGET=\" -DCDOGS_DATA_DIR=/storage/roms/ports/cdogs-sdl/ -DBUILD_EDITOR=OFF -DCMAKE_BUILD_TYPE=Release\"\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp -rf ${PKG_BUILD}/.${TARGET_NAME}/src/cdogs-sdl ${INSTALL}/usr/bin\ncp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n} \n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/cdogs-sdl/scripts/cdogs-sdl.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nDATAFILE=\"C-Dogs.SDL-1.5.0-Linux.tar.gz\"\nDATA=\"https://github.com/cxong/cdogs-sdl/releases/download/1.5.0/${DATAFILE}\"\nCONFIGFOLDER=\"/storage/roms/ports/cdogs-sdl\"\nPORTNAME=\"Cdogs-sdl\"\nFLAGS=\"\"\n\nmkdir -p \"${CONFIGFOLDER}\"\ncd \"${CONFIGFOLDER}\"\n\nif [ ! -e \"${CONFIGFOLDER}/data/ammo.json\" ]; then\n    text_viewer -y -w -f 24 -t \"Data does not exists!\" -m \"It seems this is the first time you are launching ${PORTNAME} or the data folder does not exists\\n\\nData is about 35 MB total, and you need to be connected to the internet\\n\\n\\nDownload and continue?\"\n        if [[ $? == 21 ]]; then\n            ee_console enable\n            clear > /dev/tty0\n            cat /etc/motd > /dev/tty0\n            echo \"Downloading ${PORTNAME} data, please wait...\" > /dev/tty0\n            wget \"${DATA}\" -q --show-progress > /dev/tty0 2>&1\n            echo \"Installing ${PORTNAME} data, please wait...\" > /dev/tty0\n            tar -xvf \"${DATAFILE}\" -C \"${CONFIGFOLDER}\" > /dev/tty0\n            mv C-Dogs.SDL-1.5.0-Linux/* \"${CONFIGFOLDER}\"\n            rm -rf C-Dogs.SDL-1.5.0-Linux bin share > /dev/tty0 2>&1\n            rm \"${DATAFILE}\" > /dev/tty0 2>&1\n            echo \"Starting ${PORTNAME} for the first time, please wait...\" > /dev/tty0\n            ee_console disable\n            cd \"${CONFIGFOLDER}\"\n            cdogs-sdl ${FLAGS} > /emuelec/logs/emuelec.log 2>&1\n        else\n            exit 0\n        fi\nelse\n    cdogs-sdl ${FLAGS} > /emuelec/logs/emuelec.log 2>&1\nfi\n\nkillall gptokeyb &\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/celeste/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"celeste\"\nPKG_VERSION=\"1.0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\"Script file to run celeste (itch.io linux version)\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp celeste.sh ${INSTALL}/usr/bin\nmkdir -p ${INSTALL}/usr/config/emuelec/configs\ncp celeste.tar.xz ${INSTALL}/usr/config/emuelec/configs\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/celeste/sources/celeste.sh",
    "content": "#!/bin/bash\n\n. /etc/profile\n\ndirectory=\"/storage/roms\"\n\ngamedir=\"/$directory/ports/celeste\"\ngameassembly=\"Celeste.exe\"\n\n# Untar port files\nif [[ ! -f \"${gamedir}/celeste-repacker\" ]]; then\ntar -xf \"/emuelec/configs/celeste.tar.xz\" -C \"$directory/ports\"\nfi\n\n# check if required fmodengine files are installed\nif [[ -f \"${gamedir}/fmodstudioapi20216linux.tar.gz\" ]] && [[ ! -f \"${gamedir}/libs/libfmod.so.13\" ]]; then\n    mkdir -p \"/emuelec/configs/fmod/\"\n    tar -xvf \"${gamedir}/fmodstudioapi20216linux.tar.gz\" -C \"/emuelec/configs/fmod/\"\n    cd \"/emuelec/configs/fmod/\"\n    tar -xvf \"fmodstudioapi20216linux.tar.gz\"\n    cp fmodstudioapi20216linux/api/core/lib/arm64/libfmod.so.13.16 \"${gamedir}/libs/libfmod.so.13\"\n    cp fmodstudioapi20216linux/api/studio/lib/arm64/libfmodstudio.so.13.16 \"${gamedir}/libs/libfmodstudio.so.13\"\n    rm -rf \"/emuelec/configs/fmod/\"\nfi\n\n# Double check if required fmod files are installed, because why not. \nif [[ ! -f \"${gamedir}/libs/libfmod.so.13\" ]] || [[ ! -f \"${gamedir}/libs/libfmodstudio.so.13\" ]]; then\n    text_viewer -e -w -t \"ERROR!\" -f 24 -m \"Fmod does not exist on ${gamedir}/libs\\n\\nYou need to provide the fmodengine files from https://www.fmod.com/ then copy the file fmodstudioapi20216linux.tar.gz to ${gamedir}\"\n    exit 0\nfi\n\n# check if required game files are installed\nif [[ ! -f \"${gamedir}/gamedata/${gameassembly}\" ]]; then\n    text_viewer -e -w -t \"ERROR!\" -f 24 -m \"Celeste Game Data does not exist on ${gamedir}/gamedata\\n\\nYou need to provide your own game data from your copy of the game\"\n    exit 0\nfi\n\ncd \"$gamedir/gamedata\"\n\n# Setup mono\nmonodir=\"/emuelec/mono\"\nmonofile=\"$directory/ports/mono-6.12.0.122-aarch64.squashfs\"\n\nif [ ! -e \"${monofile}\" ]; then\nmonourl=\"https://github.com/PortsMaster/PortMaster-Hosting/releases/download/large-files/mono-6.12.0.122-aarch64.squashfs\"\n    text_viewer -y -w -f 24 -t \"MONO does not exists!\" -m \"It seems this is the first time you are launching Celeste or the MONO file does not exists\\n\\nMONO is about 260 MB, and you need to be connected to the internet\\n\\nIMPORTANT: THIS IS NOT THE GAME DATA! YOU STILL NEED TO PROVIDE THIS FROM YOUR COPY OF THE ITCH.IO VERSION OF THE GAME!\\n\\nDownload and continue?\"\n        if [[ $? == 21 ]]; then\n            ee_console enable\n            wget \"${monourl}\" -O \"${monofile}\" -q --show-progress > /dev/tty0 2>&1\n            ee_console disable\n        else\n            exit 0\n        fi\nelse\n    mkdir -p \"$monodir\"\n    umount \"$monofile\" || true\n    mount \"$monofile\" \"$monodir\"\nfi\n\n# Setup savedir\nexport XDG_DATA_HOME=/emuelec/configs\nif [ ! -L ${XDG_DATA_HOME}/Celeste ]; then\nrm -rf ${XDG_DATA_HOME}/Celeste\nmkdir -p ${XDG_DATA_HOME}/Celeste\nln -sfv \"${gamedir}/savedata\" ${XDG_DATA_HOME}/Celeste\nfi\n\n# Remove all the dependencies in favour of system libs - e.g. the included \n# newer version of FNA with patcher included\nrm -f System*.dll mscorlib.dll FNA.dll Mono.*.dll\ncp $gamedir/libs/Celeste.exe.config $gamedir/gamedata\n\n# Setup path and other environment variables\nexport FNA_PATCH=\"$gamedir/dlls/CelestePatches.dll\"\nexport MONO_PATH=\"$gamedir/dlls\"\nexport LD_LIBRARY_PATH=\"$gamedir/libs\":\"${monodir}/lib\":$LD_LIBRARY_PATH\nexport PATH=\"$monodir/bin\":\"$PATH\"\nexport FNA3D_OPENGL_FORCE_ES3=1\nexport FNA3D_OPENGL_FORCE_VBO_DISCARD=1\n\n# For Amlogic-NG we can use the textures at full size so skip the conversion\n[[ \"${EE_DEVICE}\" == \"Amlogic-ng\" ]] && touch \"$gamedir/.astc_done\"\n\n# Compress all textures with ASTC codec, bringing massive vram gains\nif [[ ! -f \"$gamedir/.astc_done\" ]]; then\n\techo \"Optimizing textures...\" >> /dev/tty0\n\t\"$gamedir/celeste-repacker\" \"$gamedir/gamedata/Content/Graphics/\" --install >> /dev/tty0\n\tif [ $? -eq 0 ]; then\n\t\ttouch \"$gamedir/.astc_done\"\n\tfi\nfi\n\n# first_time_setup\nmono Celeste.exe\nkill -9 $(pidof gptokeyb)\numount \"$monodir\"\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/chocolate-doom/config/chocolate-doom.cfg",
    "content": "video_driver                  \"\"\nwindow_position               \"\"\nfullscreen                    1\naspect_ratio_correct          1\ninteger_scaling               0\nvga_porch_flash               0\nwindow_width                  800\nwindow_height                 600\nfullscreen_width              0\nfullscreen_height             0\nforce_software_renderer       0\nmax_scaling_buffer_pixels     16000000\nstartup_delay                 1000\nshow_endoom                   1\nshow_diskicon                 1\npng_screenshots               0\nsnd_samplerate                44100\nsnd_cachesize                 67108864\nsnd_maxslicetime_ms           28\nsnd_pitchshift                0\nsnd_musiccmd                  \"\"\nsnd_dmxoption                 \"\"\nopl_io_port                   0x388\nuse_libsamplerate             0\nlibsamplerate_scale           0.650000\nautoload_path                 \"\"\nmusic_pack_path               \"/storage/.local/share/chocolate-doom/music-packs\"\ntimidity_cfg_path             \"/storage/.config/timidity/timidity.cfg\"\ngus_patch_path                \"\"\ngus_ram_kb                    1024\nvanilla_savegame_limit        1\nvanilla_demo_limit            1\nvanilla_keyboard_mapping      1\nplayer_name                   \"EmuELEC Demon\"\ngrabmouse                     1\nnovert                        0\nmouse_acceleration            2.000000\nmouse_threshold               10\nmouseb_strafeleft             -1\nmouseb_straferight            -1\nmouseb_use                    -1\nmouseb_backward               -1\nmouseb_prevweapon             -1\nmouseb_nextweapon             -1\ndclick_use                    1\njoystick_guid                 \"050000007e0500000920000001000000\"\njoystick_index                0\njoystick_x_axis               131328\njoystick_x_invert             0\njoystick_y_axis               131584\njoystick_y_invert             0\njoystick_strafe_axis          -1\njoystick_strafe_invert        0\njoystick_look_axis            -1\njoystick_look_invert          0\njoystick_physical_button0     0\njoystick_physical_button1     1\njoystick_physical_button2     5\njoystick_physical_button3     4\njoystick_physical_button4     4\njoystick_physical_button5     5\njoystick_physical_button6     6\njoystick_physical_button7     7\njoystick_physical_button8     8\njoystick_physical_button9     9\njoystick_physical_button10    10\njoyb_strafeleft               -1\njoyb_straferight              -1\njoyb_menu_activate            -1\njoyb_toggle_automap           -1\njoyb_prevweapon               -1\njoyb_nextweapon               -1\nkey_pause                     69\nkey_menu_activate             1\nkey_menu_up                   72\nkey_menu_down                 80\nkey_menu_left                 75\nkey_menu_right                77\nkey_menu_back                 14\nkey_menu_forward              28\nkey_menu_confirm              21\nkey_menu_abort                49\nkey_menu_help                 59\nkey_menu_save                 60\nkey_menu_load                 61\nkey_menu_volume               62\nkey_menu_detail               63\nkey_menu_qsave                64\nkey_menu_endgame              65\nkey_menu_messages             66\nkey_menu_qload                67\nkey_menu_quit                 68\nkey_menu_gamma                87\nkey_spy                       88\nkey_menu_incscreen            13\nkey_menu_decscreen            12\nkey_menu_screenshot           0\nkey_map_toggle                15\nkey_map_north                 72\nkey_map_south                 80\nkey_map_east                  77\nkey_map_west                  75\nkey_map_zoomin                13\nkey_map_zoomout               12\nkey_map_maxzoom               11\nkey_map_follow                33\nkey_map_grid                  34\nkey_map_mark                  50\nkey_map_clearmark             46\nkey_weapon1                   2\nkey_weapon2                   3\nkey_weapon3                   4\nkey_weapon4                   5\nkey_weapon5                   6\nkey_weapon6                   7\nkey_weapon7                   8\nkey_weapon8                   9\nkey_prevweapon                0\nkey_nextweapon                0\nkey_message_refresh           28\nkey_demo_quit                 16\nkey_multi_msg                 20\nkey_multi_msgplayer1          34\nkey_multi_msgplayer2          23\nkey_multi_msgplayer3          48\nkey_multi_msgplayer4          19\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/chocolate-doom/config/default.cfg",
    "content": "mouse_sensitivity             5\nsfx_volume                    8\nmusic_volume                  8\nshow_messages                 1\nkey_right                     77\nkey_left                      75\nkey_up                        72\nkey_down                      80\nkey_strafeleft                51\nkey_straferight               52\nkey_fire                      29\nkey_use                       57\nkey_strafe                    56\nkey_speed                     54\nuse_mouse                     1\nmouseb_fire                   0\nmouseb_strafe                 1\nmouseb_forward                2\nuse_joystick                  1\njoyb_fire                     0\njoyb_strafe                   2\njoyb_use                      1\njoyb_speed                    3\nscreenblocks                  9\ndetaillevel                   0\nsnd_channels                  8\nsnd_musicdevice               8\nsnd_sfxdevice                 3\nsnd_sbport                    0\nsnd_sbirq                     0\nsnd_sbdma                     0\nsnd_mport                     0\nusegamma                      0\nchatmacro0                    \"No\"\nchatmacro1                    \"I'm ready to kick butt!\"\nchatmacro2                    \"I'm OK.\"\nchatmacro3                    \"I'm not looking too good!\"\nchatmacro4                    \"Help!\"\nchatmacro5                    \"You suck!\"\nchatmacro6                    \"Next time, scumbag...\"\nchatmacro7                    \"Come here!\"\nchatmacro8                    \"I'll take care of it.\"\nchatmacro9                    \"Yes\"\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/chocolate-doom/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"chocolate-doom\"\nPKG_VERSION=\"72d9e9318c4ccc61dab29bb9cc30bc8a9a93266d\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/chocolate-doom/chocolate-doom\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_LONGDESC=\"Chocolate Doom is a Doom source port that is minimalist and historically accurate.\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"auto\"\n\npre_configure_target() {\nsed -i \"s|./convert-font|${PKG_BUILD}/textscreen/fonts/convert-font|g\" ${PKG_BUILD}/textscreen/fonts/Makefile.am\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cd ${PKG_BUILD}\n  cp .${TARGET_NAME}/src/chocolate-* ${INSTALL}/usr/bin\n  cp .${TARGET_NAME}/src/midiread ${INSTALL}/usr/bin\n  cp .${TARGET_NAME}/src/mus2mid ${INSTALL}/usr/bin\n  \n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/chocolate-doom\n  cp ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/chocolate-doom\n  \n  mkdir -p ${INSTALL}/usr/bin\n  cp ${PKG_DIR}/scripts/*  ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/chocolate-doom/scripts/chocodoom.sh",
    "content": "#!/usr/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n. /etc/profile\n\nRUN_DIR=\"/storage/roms/ports/doom\"\nCONFIG_DIR=\"/emuelec/configs/chocolate-doom\"\nLOCALCONFIG=\"/storage/.local/share/chocolate-doom\"\n\nparams=\" --savedir ${CONFIG_DIR}\"\n\nif [ ! -L \"${LOCALCONFIG}\" ]; then \n[[ -d \"${LOCALCONFIG}\" ]] && rm -rf \"${LOCALCONFIG}\"\nln -sf \"${CONFIG_DIR}\" \"${LOCALCONFIG}\"\nfi\n\nGUID=$(echo \"${2}\" | grep -Ewo '[[:xdigit:]]{32}' | head -n1)\n# echo \"Will use controller with ${GUID}\"\n# Try to set up gamepad\nsed -i \"s|joystick_guid.*|joystick_guid                 \\\"${GUID}\\\"|\" \"${CONFIG_DIR}/chocolate-doom.cfg\"\n\n# EXT can be wad, WAD, iwad, IWAD, pwad, PWAD or choco\nFILE=$(basename -- \"${1}\")\nEXT=${1#*.}\n\n# If its not a simple wad (extension .doom) read the file and parse the data\nif [ ${EXT} == \"doom\" ]; then\n    while IFS== read -r key value; do\n\tif [ \"${key}\" == \"GAMETYPE\" ]; then\n\t    case ${value} in\n\t\t\"doom\"|\"DOOM\")\n\t\t    PROGRAM=\"chocolate-doom\"\n\t\t;;\n\t\t\"heretic\"|\"HERETIC\")\n\t\t    PROGRAM=\"chocolate-heretic\"\n\t\t;;\n\t\t\"hexen\"|\"HEXEN\")\n\t\t    PROGRAM=\"chocolate-hexen\"\n\t\t;;\n\t\t\"strife\"|\"STRIFE\")\n\t\t    PROGRAM=\"chocolate-strife\"\n\t\t;;\n\t\t*)\n\t\t    PROGRAM=\"chocolate-doom\"\n\t\t;;\n\t    esac\n\tfi\n\n        if [ \"${key}\" == \"SUBDIR\" ]; then\n\t    RUN_DIR=\"/storage/roms/ports/doom/${value}\"\n        fi\n\n        if [ \"${key}\" == \"PARAMS\" ]; then\n            params+=\" ${value}\"\n        fi\n    done < <(<\"${1}\" tr -d '\\r'; echo;)\nelse\n    PROGRAM=\"chocolate-doom\"\n    params+=\" -iwad ${1}\"\nfi\n\ncd \"${RUN_DIR}\"\n# Do not overwrite log messages already written by emuelecRunEmu.sh\n/usr/bin/${PROGRAM} ${params} >>/emuelec/logs/emuelec.log 2>&1\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/commander-genius/config/cgenius.cfg",
    "content": "[Audio]\nchannels = 2\nformat = 32784\nmusicvol = 128\nrate = 44100\nsndblaster = true\nsoundvol = 75\n\n[Bound]\ndown = 130\nleft = 140\nright = 180\nspeed = 5\nup = 50\n\n[FileHandling]\nSearchPath1 = ${HOME}/.CommanderGenius\nSearchPath2 = /storage/roms/ports/cgenius\nSearchPath3 = \nSearchPath4 = \n\n[Game]\nhud = true\nkeystack = false\nlevel_replayability = false\nmodern_style = true\npking = true\nrise_bonus = true\nshowfps = false\nspecialfx = true\n\n[Video]\nOGLfilter = best\nOpenGL = true\nShowCursor = true\nTiltedScreen = false\nVirtPad = false\naspect = 16:9\nfilter = 1\nfps = 60\nfullscreen = true\ngameHeight = 480\ngameWidth = 640\nheight = 1080\nscale = 1\nscaletype = scale4x\nvsync = true\nwidth = 1920\n\n[input0]\nAnalog = false\nBack = Joy0-B6\nCamlead = Joy0-B8\nDown = Joy0-A1+\nFire = Joy0-B1\nHelp = Joy0-B9\nJump = Joy0-B0\nLeft = Joy0-A0-\nLower-Left = Key 1073741901 (End)\nLower-Right = Key 1073741902 (PageDown)\nPogo = Joy0-B3\nRight = Joy0-A0+\nRun = Joy0-B2\nStatus = Joy0-B7\nTwoButtonFiring = false\nUp = Joy0-A1-\nUpper-Left = Key 1073741898 (Home)\nUpper-Right = Key 1073741899 (PageUp)\n\n[input1]\nAnalog = false\nBack = Key 27 (Escape)\nCamlead = Key 99 (C)\nDown = Key 1073741905 (Down)\nFire = Key 32 (Space)\nHelp = Key 1073741882 (F1)\nJump = Key 1073742048 (Left Ctrl)\nLeft = Key 1073741904 (Left)\nLower-Left = Key 1073741901 (End)\nLower-Right = Key 1073741902 (PageDown)\nPogo = Key 1073742050 (Left Alt)\nRight = Key 1073741903 (Right)\nRun = Key 1073742049 (Left Shift)\nStatus = Key 13 (Return)\nTwoButtonFiring = false\nUp = Key 1073741906 (Up)\nUpper-Left = Key 1073741898 (Home)\nUpper-Right = Key 1073741899 (PageUp)\n\n[input2]\nAnalog = false\nBack = Key 27 (Escape)\nCamlead = Key 99 (C)\nDown = Key 1073741905 (Down)\nFire = Key 32 (Space)\nHelp = Key 1073741882 (F1)\nJump = Key 1073742048 (Left Ctrl)\nLeft = Key 1073741904 (Left)\nLower-Left = Key 1073741901 (End)\nLower-Right = Key 1073741902 (PageDown)\nPogo = Key 1073742050 (Left Alt)\nRight = Key 1073741903 (Right)\nRun = Key 1073742049 (Left Shift)\nStatus = Key 13 (Return)\nTwoButtonFiring = false\nUp = Key 1073741906 (Up)\nUpper-Left = Key 1073741898 (Home)\nUpper-Right = Key 1073741899 (PageUp)\n\n[input3]\nAnalog = false\nBack = Key 27 (Escape)\nCamlead = Key 99 (C)\nDown = Key 1073741905 (Down)\nFire = Key 32 (Space)\nHelp = Key 1073741882 (F1)\nJump = Key 1073742048 (Left Ctrl)\nLeft = Key 1073741904 (Left)\nLower-Left = Key 1073741901 (End)\nLower-Right = Key 1073741902 (PageDown)\nPogo = Key 1073742050 (Left Alt)\nRight = Key 1073741903 (Right)\nRun = Key 1073742049 (Left Shift)\nStatus = Key 13 (Return)\nTwoButtonFiring = false\nUp = Key 1073741906 (Up)\nUpper-Left = Key 1073741898 (Home)\nUpper-Right = Key 1073741899 (PageUp)\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/commander-genius/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"commander-genius\"\nPKG_VERSION=\"6f7e67ad07323416f798046d62be8e10e856d62a\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://gitlab.com/Dringgstein/Commander-Genius\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain boost Python3 SDL2 SDL2_image SDL2_mixer\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Modern Interpreter for the Commander Keen Games (Vorticon and Galaxy Games)\"\nPKG_TOOLCHAIN=\"cmake\"\nGET_HANDLER_SUPPORT=\"git\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DUSE_SDL2=ON -DBUILD_TARGET=LINUX -DCMAKE_BUILD_TYPE=Release -DUSE_OPENGL=OFF -DDOWNLOADER=OFF -DNOTYPESAVE=ON\"\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/CommanderGenius\ncp -rf ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/CommanderGenius/\ncp -rf ${PKG_BUILD}/vfsroot/* ${INSTALL}/usr/config/emuelec/configs/CommanderGenius/\n\nmkdir -p ${INSTALL}/usr/bin\ncp -rf ${PKG_BUILD}/.${TARGET_NAME}/src/CGeniusExe ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/commander-genius/patches/commander-genius-02-show-emuelec-rom-path.patch",
    "content": "--- a/src/engine/CGameLauncher.cpp\n+++ b/src/engine/CGameLauncher.cpp\n@@ -217,9 +217,7 @@ bool CGameLauncher::setupMenu()\n \n         ss << \"No games detected!\\n\";\n         ss << \"You can copy some into:\\n\";\n-        ss << \"\\\"\" << searchPathGames << \"\\\",\\n\";\n-        ss << \"or download using \\\"+ More\\\" button\\n\";\n-        ss << \"on the next page.\\n\";\n+        ss << \"\\\"/storage/roms/ports/cgenius/games\\\",\\n\";\n \n         std::string msg(ss.str());\n \n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/devilutionX/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"devilutionX\"\nPKG_VERSION=\"c31836eab89b01b9b93124c636086ed2963b55c0\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"unlicense\"\nPKG_SITE=\"https://github.com/diasurgical/devilutionX\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_mixer SDL2_ttf\"\nPKG_LONGDESC=\"Diablo build for modern operating systems \"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_BUILD_FLAGS=\"-lto\"\n\npre_configure_target() {\nPKG_CMAKE_OPTS_TARGET=\" -DCMAKE_BUILD_TYPE=\"Release\" -DDEVILUTIONX_STATIC_CXX_STDLIB=OFF -DDISABLE_ZERO_TIER=ON -DBUILD_TESTING=OFF -DBUILD_ASSETS_MPQ=OFF -DDEBUG=OFF -DPREFILL_PLAYER_NAME=ON -DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF\"\n\nsed -i \"s|\\\"assets\\\"\\ DIRECTORY_SEPARATOR_STR|\\\"assets_dvx\\\"\\ DIRECTORY_SEPARATOR_STR|\" ${PKG_BUILD}/Source/utils/paths.cpp\n}\n\nmakeinstall_target() { \nmkdir -p ${INSTALL}/usr/bin/assets_dvx\ncp -rf ${PKG_BUILD}/.${TARGET_NAME}/devilutionx ${INSTALL}/usr/bin\ncp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\ncp -rf ${PKG_BUILD}/.${TARGET_NAME}/assets/* ${INSTALL}/usr/bin/assets_dvx/\n\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/devilution/langs\nmv ${INSTALL}/usr/bin/assets_dvx/*.gmo ${INSTALL}/usr/config/emuelec/configs/devilution/langs\n\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/devilutionX/patches/DevilutionX-fix-mouse.patch",
    "content": "--- a/Source/controls/plrctrls.cpp\n+++ b/Source/controls/plrctrls.cpp\n@@ -1284,6 +1284,8 @@ void HandleRightStickMotion()\n \t\tif (now - lastMouseSetTick > 0) {\r\n \t\t\tSetCursorPos(x, y);\r\n \t\t\tlastMouseSetTick = now;\r\n+\t\t\tMousePosition.x = x;\r\n+\t\t\tMousePosition.y = y;\r\n \t\t}\r\n \t}\r\n }\r\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/devilutionX/scripts/devilutionx.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nDIABLOPATH=\"/storage/.local/share/diasurgical/devilution\"\nDIABLOROMPATH=\"/storage/roms/ports/diablo\"\n\nEELANG=$(echo ${LANG} | cut -d= -f2 | cut -d_ -f1)\n\nif [ \"${EELANG}\" == \"en\" ]; then\n    LANG=\"\"\nfi\n\nmkdir -p ${DIABLOPATH}\n\nif [ -e ${DIABLOPATH}/diablo.ini ]; then\n    sed -i \"s|Code=.*|Code=${EELANG}|g\" ${DIABLOPATH}/diablo.ini\nfi\n\nif [ -e ${DIABLOROMPATH}/diabdat.mpq ]; then\n    if [ ! -L ${DIABLOPATH}/diabdat.mpq ]; then\n        ln -sf ${DIABLOROMPATH}/diabdat.mpq ${DIABLOPATH}/diabdat.mpq\n    fi\nelse\n    exit 21\nfi\n\nif [ \"${1}\" == \"hellfire\" ]; then\n    for hell in diabdat hellfire hfmonk hfmusic hfvoice; do\n        if [ -e ${DIABLOROMPATH}/${hell}.mpq ]; then\n            if [ ! -L ${DIABLOPATH}/${hell}.mpq ]; then\n                ln -sf ${DIABLOROMPATH}/${hell}.mpq ${DIABLOPATH}/${hell}.mpq\n            fi\n        else\n            exit 21\n        fi\n    done\nelse\nPARAMS=\" --diablo\"\nfi \n\ndevilutionx --verbose ${PARAMS}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/eduke/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"eduke\"\nPKG_VERSION=\"8d79c372acdb00155c75f3b6ca914b852d689b0d\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL2 + BUILDLIC\"\nPKG_SITE=\"https://eduke32.com\"\nPKG_URL=\"https://voidpoint.io/terminx/eduke32.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_mixer timidity flac\"\nPKG_LONGDESC=\"EDuke32 is an awesome, free homebrew game engine and source port of the classic PC first person shooter Duke Nukem 3D\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"make\"\n\nexport GIT_SSL_NO_VERIFY=1\n\npre_configure_target() {\nexport ARCH=${ARCH}\nsed -i \"s|sdl2-config|${SYSROOT_PREFIX}/usr/bin/sdl2-config|\" Common.mak\nsed -i \"s|-latomic|#|\" Common.mak\nPKG_MAKE_OPTS_TARGET=\" duke3d LTO=1 SDL_TARGET=2 NOASM=1 HAVE_GTK2=0 POLYMER=1 USE_OPENGL=0 RELEASE=1 OPTLEVEL=3\"\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp -rf eduke32 ${INSTALL}/usr/bin\ncp ${PKG_DIR}/scripts/eduke.sh ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/eduke/patches/eduke-04-recast-function.patch",
    "content": "Index: source/duke3d/src/astub.cpp\n===================================================================\n--- a/source/duke3d/src/astub.cpp\t(revision 8090)\n+++ b/source/duke3d/src/astub.cpp\t(working copy)\n@@ -4291,7 +4291,7 @@\n     i = (i&0x4)+((i>>4)&3);\n     i = eitherSHIFT ? prev3[i] : next3[i];\n     message(\"Sector %d %s flip %d deg%s\", sectnum, typestr[search],\n-            klabs(orient[i])%360, orient[i] < 0 ? \" mirrored\":\"\");\n+            (int)klabs(orient[i])%360, orient[i] < 0 ? \" mirrored\":\"\");\n     i = (i&0x4)+((i&3)<<4);\n     *stat &= ~0x34;\n     *stat |= i;\nIndex: source/duke3d/src/player.cpp\n===================================================================\n--- a/source/duke3d/src/player.cpp\t(revision 8090)\n+++ b/source/duke3d/src/player.cpp\t(working copy)\n@@ -1666,7 +1666,7 @@\n \n     for (bssize_t i=0; i < pPlayer->numloogs; i++)\n     {\n-        int const rotAng = klabs(sintable[((loogCounter + i) << 5) & 2047]) >> 5;\n+        int const rotAng = (int)klabs(sintable[((loogCounter + i) << 5) & 2047]) >> 5;\n         int const rotZoom  = 4096 + ((loogCounter + i) << 9);\n         int const rotX     = (-fix16_to_int(g_player[screenpeek].input->q16avel) >> 1) + (sintable[((loogCounter + i) << 6) & 2047] >> 10);\n \n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/eduke/patches/eduke-05-fix-emuelec-compile.patch",
    "content": "--- a/Common.mak\n+++ b/Common.mak\n@@ -188,8 +188,8 @@\n     CCFULLPATH = $(DEVKITPPC)/bin/$(CC)\n endif\n \n-CC := $(CROSS)gcc$(CROSS_SUFFIX)\n-CXX := $(CROSS)g++$(CROSS_SUFFIX)\n+# CC := $(CROSS)gcc$(CROSS_SUFFIX)\n+# CXX := $(CROSS)g++$(CROSS_SUFFIX)\n \n ifeq ($(PLATFORM),DARWIN)\n     CC := $(CROSS)clang$(CROSS_SUFFIX)\n@@ -201,12 +201,12 @@\n L_CC := $(CC)\n L_CXX := $(CXX)\n \n-AR := $(CROSS)ar$(CROSS_SUFFIX)\n-RC := $(CROSS)windres$(CROSS_SUFFIX)\n-RANLIB := $(CROSS)ranlib$(CROSS_SUFFIX)\n-STRIP := $(CROSS)strip$(CROSS_SUFFIX)\n-\n-AS := nasm\n+# AR := $(CROSS)ar$(CROSS_SUFFIX)\n+# RC := $(CROSS)windres$(CROSS_SUFFIX)\n+# RANLIB := $(CROSS)ranlib$(CROSS_SUFFIX)\n+# STRIP := $(CROSS)strip$(CROSS_SUFFIX)\n+\n+# AS := nasm\n \n # LuaJIT standalone interpreter executable:\n LUAJIT := luajit$(HOSTEXESUFFIX)\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/eduke/scripts/eduke.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nDUKEDIR=\"/storage/.config/eduke32\"\nDUKECFG=\"${DUKEDIR}/eduke32.cfg\"\n\nmkdir -p \"${DUKEDIR}\"\nif [ ! -f \"${DUKECFG}\" ]; then\n# We only do these changes if the cfg file does not already exists, if it exists we asume the user has created it outside this script\n# Only for handheld devices, SBCs already handle this gratefully\n               \n    if [ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${EE_DEVICE}\" == \"GameForce\" ]; then\n        touch \"${DUKECFG}\"\n    \n        case \"$(oga_ver)\" in\n            \"OGA\" | \"OGABE\")\n                echo \"ScreenDisplay = 0\" > \"${DUKECFG}\"\n                echo \"ScreenHeight = 320\" >> \"${DUKECFG}\"\n                echo \"ScreenMode = 0\" >> \"${DUKECFG}\"\n                echo \"ScreenWidth = 480\" >> \"${DUKECFG}\"\n                echo \"MaxRefreshFreq = 0\" >> \"${DUKECFG}\"\n            ;;\n            \"GF\")\n                echo \"ScreenDisplay = 0\" > \"${DUKECFG}\"\n                echo \"ScreenHeight = 480\" >> \"${DUKECFG}\"\n                echo \"ScreenMode = 0\" >> \"${DUKECFG}\"\n                echo \"ScreenWidth = 640\" >> \"${DUKECFG}\"\n                echo \"MaxRefreshFreq = 0\" >> \"${DUKECFG}\"\n            ;;\n            \"OGS\")\n                echo \"ScreenDisplay = 0\" > \"${DUKECFG}\"\n                echo \"ScreenHeight = 480\" >> \"${DUKECFG}\"\n                echo \"ScreenMode = 0\" >> \"${DUKECFG}\"\n                echo \"ScreenWidth = 854\" >> \"${DUKECFG}\"\n                echo \"MaxRefreshFreq = 0\" >> \"${DUKECFG}\"\n            ;;\n        esac\n    fi\nfi\n\nif [ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${EE_DEVICE}\" == \"GameForce\" ]; then\n    # Eduke does not run if there is less that x ammount of memory so we need to enable swap on devices with 1GB of RAM\n    SWAP_FILE=\"/storage/.config/swap.conf\"\n    if [ ! -f \"${SWAP_FILE}\" ]; then\n        cp /etc/swap.conf \"${SWAP_FILE}\"\n    fi\n\n    # We could potentially use /tmp/swap as the swap file by changing this: SWAPFILE=\"${HOME}/.cache/swapfile\" in \"${SWAP_FILE}\" but not sure of the consequences\n    # It needs at LEAST 300mb of swap, pretty greedy\n    sed -i 's/SWAPFILESIZE=.*/SWAPFILESIZE=\"300\"/' \"${SWAP_FILE}\"\n    sed -i 's/SWAP_ENABLED=.*/SWAP_ENABLED=\"yes\"/' \"${SWAP_FILE}\"\n    /usr/lib/coreelec/mount-swap create\n    /usr/lib/coreelec/mount-swap mount\nfi \n\ncd /storage/roms/ports/eduke\neduke32 -j /storage/roms/ports/eduke > /emuelec/logs/emuelec.log 2>&1\n\nif [ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${EE_DEVICE}\" == \"GameForce\" ]; then\n    /usr/lib/coreelec/mount-swap unmount\n    rm -rf ${HOME}/.cache/swapfile\n    sed -i 's/SWAP_ENABLED=.*/SWAP_ENABLED=\"no\"/' \"${SWAP_FILE}\"\nfi\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/falloutce1/config/fallout.cfg",
    "content": "[debug]\nmode=environment\noutput_map_data_info=0\nshow_load_info=0\nshow_script_messages=0\nshow_tile_num=0\n\n[preferences]\nbrightness=1.000000\ncombat_difficulty=1\ncombat_looks=1\ncombat_messages=1\ncombat_speed=0\ncombat_taunts=1\ngame_difficulty=2\nitem_highlight=1\nlanguage_filter=0\nmouse_sensitivity=1.000000\nplayer_speed=0\nplayer_speedup=0\nrunning=0\nrunning_burning_guy=1\nsubtitles=1\ntarget_highlight=2\ntext_base_delay=3.500000\ntext_line_delay=1.000000\nviolence_level=3\n\n[sound]\ncache_size=448\ndevice=-1\ndma=-1\ninitialize=1\nirq=-1\nmaster_volume=22281\nmusic=1\nmusic_path1=/storage/roms/ports/falloutce1/data/sound/music/\nmusic_path2=/storage/roms/ports/falloutce1/sound/music/\nmusic_volume=22281\nport=-1\nsndfx_volume=22281\nsounds=1\nspeech=1\nspeech_volume=22281\n\n[system]\nart_cache_size=8\ncolor_cycling=1\ncritter_dat=/storage/roms/ports/falloutce1/critter.dat\ncritter_patches=/storage/roms/ports/falloutce1/data\ncycle_speed_factor=1\nexecutable=game\nfree_space=20480\nhashing=1\ninterrupt_walk=1\nlanguage=english\nmaster_dat=/storage/roms/ports/falloutce1/master.dat\nmaster_patches=/storage/roms/ports/falloutce1/data\nscroll_lock=0\nsplash=3\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/falloutce1/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"falloutce1\"\nPKG_VERSION=\"bc5a9273304e53f06a7cdac5d12c856cc418e137\"\nPKG_GIT_CLONE_BRANCH=\"patch-1\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/glebm/fallout1-ce\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_LONGDESC=\"Game port of Fallout using SDL2\"\nPKG_TOOLCHAIN=\"cmake\"\nGET_HANDLER_SUPPORT=\"git\"\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp ${PKG_BUILD}/.${TARGET_NAME}/fallout-ce ${INSTALL}/usr/bin\ncp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/falloutce1\ncp ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/falloutce1\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/falloutce1/scripts/falloutce1.sh",
    "content": "\nif ! test -f /storage/roms/ports/falloutce1/fallout.cfg; then\n  cp /usr/config/emuelec/configs/falloutce1/fallout.cfg /storage/roms/ports/falloutce1/\nfi\n\nfallout-ce > /emuelec/logs/emuelec.log 2>&1\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/falloutce2/config/fallout2.cfg",
    "content": "[debug]\nmode=environment\noutput_map_data_info=0\nshow_load_info=0\nshow_script_messages=0\nshow_tile_num=0\n\n[mapper]\ndefault_f8_as_game=1\nfix_map_inventory=0\nfix_map_objects=0\nignore_rebuild_errors=0\nlibrarian=0\noverride_librarian=0\nrebuild_protos=0\nrun_mapper_as_game=0\nsave_text_maps=0\nshow_pid_numbers=0\nsort_script_list=0\nuse_art_not_protos=0\n\n[preferences]\nbrightness=1.000000\ncombat_difficulty=1\ncombat_looks=0\ncombat_messages=1\ncombat_speed=0\ncombat_taunts=1\ngame_difficulty=1\nitem_highlight=1\nlanguage_filter=0\nmouse_sensitivity=1.000000\nplayer_speed=0\nrunning=0\nrunning_burning_guy=1\nsubtitles=1\ntarget_highlight=2\ntext_base_delay=6.000000\ntext_line_delay=2.000000\nviolence_level=3\n\n[sound]\ncache_size=448\ndebug=0\ndebug_sfxc=1\ndevice=-1\ndma=-1\ninitialize=1\nirq=-1\nmaster_volume=22281\nmusic=1\nmusic_path1=/storage/roms/ports/falloutce2/data/sound/music/\nmusic_path2=/storage/roms/ports/falloutce2/sound/music/\nmusic_volume=22281\nport=-1\nsndfx_volume=22281\nsounds=1\nspeech=1\nspeech_volume=22281\n\n[system]\nart_cache_size=8\ncolor_cycling=1\ncritter_dat=/storage/roms/ports/falloutce2/critter.dat\ncritter_patches=/storage/roms/ports/falloutce2/data\ncycle_speed_factor=1\nexecutable=game\nfree_space=20480\nhashing=1\ninterrupt_walk=1\nlanguage=english\nmaster_dat=/storage/roms/ports/falloutce2/master.dat\nmaster_patches=/storage/roms/ports/falloutce2/data\nscroll_lock=0\nsplash=3\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/falloutce2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"falloutce2\"\nPKG_VERSION=\"ec0685ea19dd636e38d81fd8695290b3b4b5cc22\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/alexbatalov/fallout2-ce\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_LONGDESC=\"Game port of Fallout 2 using SDL2\"\nPKG_TOOLCHAIN=\"cmake\"\nGET_HANDLER_SUPPORT=\"git\"\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp ${PKG_BUILD}/.${TARGET_NAME}/fallout2-ce ${INSTALL}/usr/bin\ncp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/falloutce2\ncp ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/falloutce2\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/falloutce2/scripts/falloutce2.sh",
    "content": "\nif ! test -f /storage/roms/ports/falloutce2/fallout2.cfg; then\n  cp /usr/config/emuelec/configs/falloutce2/fallout2.cfg /storage/roms/ports/falloutce2/\nfi\n\nfallout2-ce > /emuelec/logs/emuelec.log 2>&1\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/fheroes2/config/fheroes2.cfg",
    "content": "# fheroes2 configuration file (saved by version 0.9.7)\n\n# video mode (game resolution)\nvideomode = 800x600\n\n# music: original, expansion, external\nmusic = external\n\n# sound volume: 0 - 10\nsound volume = 6\n\n# music volume: 0 - 10\nmusic volume = 6\n\n# run in fullscreen mode: on/off (use F4 key to switch between modes)\nfullscreen = on\n\n# print debug messages (only for development, see src/engine/logging.h for possible values)\ndebug = 5460\n\n# heroes movement speed: 1 - 10\nheroes speed = 5\n\n# AI movement speed: 0 - 10\nai speed = 5\n\n# battle speed: 1 - 10\nbattle speed = 4\n\n# scroll speed: 1 - 4\nscroll speed = 2\n\n# show battle grid: on/off\nbattle grid = on\n\n# show battle shadow movement: on/off\nbattle shadow movement = on\n\n# show battle shadow cursor: on/off\nbattle shadow cursor = on\n\n# auto resolve battles: on/off\nauto resolve battles = off\n\n# auto combat spell casting: on/off\nauto spell casting = on\n\n# game language (an empty value means English)\nlang = \n\n# controller pointer speed: 0 - 100\ncontroller pointer speed = 30\n\n# first time game run (show additional hints): on/off\nfirst time game run = on\n\n# show game intro (splash screen and video): on/off\nshow game intro = on\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/fheroes2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"fheroes2\"\nPKG_VERSION=\"35ca4c915be00098547d5050412a325dd55cfd7f\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/ihhub/fheroes2\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_SHORTDESC=\"Free Heroes of Might and Magic II (fheroes2) is a recreation of HoMM2 game engine.\"\nPKG_TOOLCHAIN=\"cmake\"\n\nPKG_CMAKE_OPTS_TARGET=\" -DENABLE_RELEASE=ON -DUSE_SDL_VERSION=SDL2 -DENABLE_IMAGE=ON -DCMAKE_BUILD_TYPE=Release\"\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/share/fheroes2/files/data\nmkdir -p ${INSTALL}/usr/bin\nmkdir -p ${INSTALL}/usr/config/fheroes2\n\ncp ${PKG_BUILD}/files/data/resurrection.h2d ${INSTALL}/usr/share/fheroes2/files/data \ncp ${PKG_BUILD}/.${TARGET_NAME}/fheroes2 ${INSTALL}/usr/bin\ncp ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\ncp ${PKG_DIR}/config/* ${INSTALL}/usr/config/fheroes2\n\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/fheroes2/patches/fheroes2-01-init-game-controller-unconditionally.patch",
    "content": "From ff48479612dc8f64b27d0579700f96eb72623dd6 Mon Sep 17 00:00:00 2001\nFrom: 7Ji <pugokushin@gmail.com>\nDate: Wed, 10 Aug 2022 14:24:00 +0800\nSubject: [PATCH] fheroes2: init game controller unconditionally\n\n---\n src/fheroes2/game/fheroes2.cpp | 7 ++-----\n 1 file changed, 2 insertions(+), 5 deletions(-)\n\ndiff --git a/src/fheroes2/game/fheroes2.cpp b/src/fheroes2/game/fheroes2.cpp\nindex d1a03c95..7d277b13 100644\n--- a/src/fheroes2/game/fheroes2.cpp\n+++ b/src/fheroes2/game/fheroes2.cpp\n@@ -239,11 +239,8 @@ int main( int argc, char ** argv )\n         }\n \n         std::set<fheroes2::SystemInitializationComponent> coreComponents{ fheroes2::SystemInitializationComponent::Audio,\n-                                                                          fheroes2::SystemInitializationComponent::Video };\n-\n-#if defined( TARGET_PS_VITA ) || defined( TARGET_NINTENDO_SWITCH )\n-        coreComponents.emplace( fheroes2::SystemInitializationComponent::GameController );\n-#endif\n+                                                                          fheroes2::SystemInitializationComponent::Video,\n+                                                                          fheroes2::SystemInitializationComponent::GameController };\n \n         const fheroes2::CoreInitializer coreInitializer( coreComponents );\n \n-- \n2.37.1\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/fheroes2/scripts/fheroes2.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nDATAFILE=\"h2demo.zip\"\nDATA=\"https://archive.org/download/HeroesofMightandMagicIITheSuccessionWars_1020/${DATAFILE}\"\nCONFIGFOLDER=\"/storage/roms/ports/fheroes2\"\nPORTNAME=\"Free Heroes of Might and Magic II\"\nFLAGS=\"\"\n\nmkdir -p \"${CONFIGFOLDER}\"\ncd \"${CONFIGFOLDER}\"\n\nif [ ! -e \"${CONFIGFOLDER}/data/HEROES2.AGG\" ]; then\n    text_viewer -y -w -f 24 -t \"Data does not exists!\" -m \"It seems this is the first time you are launching ${PORTNAME} or the data folder does not exists\\n\\nDemo data is about 20 MB total, and you need to be connected to the internet\\n\\n\\nDownload demo and continue?\"\n        if [[ $? == 21 ]]; then\n            ee_console enable\n            clear > /dev/tty0\n            cat /etc/motd > /dev/tty0\n            echo \"Downloading ${PORTNAME} data, please wait...\" > /dev/tty0\n            wget \"${DATA}\" -q --show-progress > /dev/tty0 2>&1\n            echo \"Installing ${PORTNAME} data, please wait...\" > /dev/tty0\n            unzip -o \"${DATAFILE}\" -d \"${CONFIGFOLDER}/zip\" > /dev/tty0\n            mv \"${CONFIGFOLDER}/zip/DATA\" \"${CONFIGFOLDER}/data\" > /dev/tty0 2>&1\n            mv \"${CONFIGFOLDER}/zip/MAPS\" \"${CONFIGFOLDER}/maps\" > /dev/tty0 2>&1\n            rm \"${DATAFILE}\" > /dev/tty0 2>&1\n            rm -rf \"${CONFIGFOLDER}/zip\" > /dev/tty0 2>&1\n            echo \"Starting ${PORTNAME} for the first time, please wait...\" > /dev/tty0\n            ee_console disable\n            cd \"${CONFIGFOLDER}\"\n            fheroes2 ${FLAGS} > /emuelec/logs/emuelec.log 2>&1\n        else\n            exit 0\n        fi\nelse\n    fheroes2 ${FLAGS} > /emuelec/logs/emuelec.log 2>&1\nfi\n\nkillall gptokeyb &\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/gzdoom/config/N2/gzdoom.ini",
    "content": "# This file was generated by GZDoom g4.8pre-1891-g425cc72b1 on 2024-03-01 12:26:54\n# These are the directories to automatically search for IWADs.\n# Each directory should be on a separate line, preceded by Path=\n[IWADSearch.Directories]\nPath=.\nPath=$DOOMWADDIR\nPath=/storage/.config/gzdoom\nPath=/storage/roms/ports/doom\nPath=/storage/roms/ports/doom-mods\n\n# These are the directories to search for wads added with the -file\n# command line parameter, if they cannot be found with the path\n# as-is. Layout is the same as for IWADSearch.Directories\n[FileSearch.Directories]\nPath=/storage/.config/gzdoom\nPath=/storage/roms/ports/doom\nPath=/storage/roms/ports/doom-mods\nPath=$DOOMWADDIR\n\n# These are the directories to search for soundfonts that let listed in the menu.\n# Layout is the same as for IWADSearch.Directories\n[SoundfontSearch.Directories]\nPath=/storage/.config/gzdoom/soundfonts\nPath=/storage/.config/gzdoom/fm_banks\n\n# Files to automatically execute when running the corresponding game.\n# Each file should be on its own line, preceded by Path=\n\n[Doom.AutoExec]\nPath=/storage/.config/gzdoom/autoexec.cfg\n\n[Heretic.AutoExec]\nPath=/storage/.config/gzdoom/autoexec.cfg\n\n[Hexen.AutoExec]\nPath=/storage/.config/gzdoom/autoexec.cfg\n\n[Strife.AutoExec]\nPath=/storage/.config/gzdoom/autoexec.cfg\n\n[Chex.AutoExec]\nPath=/storage/.config/gzdoom/autoexec.cfg\n\n# WAD files to always load. These are loaded after the IWAD but before\n# any files added with -file. Place each file on its own line, preceded\n# by Path=\n[Global.Autoload]\n\n# Wad files to automatically load depending on the game and IWAD you are\n# playing.  You may have have files that are loaded for all similar IWADs\n# (the game) and files that are only loaded for particular IWADs. For example,\n# any files listed under 'doom.Autoload' will be loaded for any version of Doom,\n# but files listed under 'doom.doom2.Autoload' will only load when you are\n# playing a Doom 2 based game (doom2.wad, tnt.wad or plutonia.wad), and files listed under\n# 'doom.doom2.commercial.Autoload' only when playing doom2.wad.\n\n[doom.Autoload]\n\n[doom.id.Autoload]\n\n[doom.id.doom2.Autoload]\n\n[doom.id.doom2.commercial.Autoload]\n\n[doom.id.doom2.commercial.french.Autoload]\n\n[doom.id.doom2.commercial.xbox.Autoload]\n\n[doom.id.doom2.unity.Autoload]\n\n[doom.id.doom2.bfg.Autoload]\n\n[doom.id.doom2.plutonia.Autoload]\n\n[doom.id.doom2.plutonia.unity.Autoload]\n\n[doom.id.doom2.tnt.Autoload]\n\n[doom.id.doom2.tnt.unity.Autoload]\n\n[doom.id.doom1.Autoload]\n\n[doom.id.doom1.registered.Autoload]\n\n[doom.id.doom1.ultimate.Autoload]\n\n[doom.id.doom1.ultimate.xbox.Autoload]\n\n[doom.id.wadsmoosh.Autoload]\n\n[doom.id.doom1.unity.Autoload]\n\n[doom.id.doom1.bfg.Autoload]\n\n[doom.freedoom.Autoload]\n\n[doom.freedoom.demo.Autoload]\n\n[doom.freedoom.phase1.Autoload]\n\n[doom.freedoom.phase2.Autoload]\n\n[doom.freedoom.freedm.Autoload]\n\n[heretic.Autoload]\n\n[heretic.heretic.Autoload]\n\n[heretic.shadow.Autoload]\n\n[blasphemer.Autoload]\n\n[hexen.Autoload]\n\n[hexen.deathkings.Autoload]\n\n[hexen.hexen.Autoload]\n\n[strife.Autoload]\n\n[strife.strife.Autoload]\n\n[strife.veteran.Autoload]\n\n[chex.Autoload]\n\n[chex.chex1.Autoload]\n\n[chex.chex3.Autoload]\n\n[urbanbrawl.Autoload]\n\n[hacx.Autoload]\n\n[hacx.hacx1.Autoload]\n\n[hacx.hacx2.Autoload]\n\n[harmony.Autoload]\n\n[square.Autoload]\n\n[square.squareware.Autoload]\n\n[square.square.Autoload]\n\n[delaweare.Autoload]\n\n[woolball.Autoload]\n\n[woolball.rotwb.Autoload]\n\n[LastRun]\nVersion=225\n\n[GlobalSettings]\nI_FriendlyWindowTitle=1\nadl_chips_count=6\nadl_emulator_id=0\nadl_fullpan=true\nadl_run_at_pcm_rate=false\nadl_volume_model=0\nautoloadbrightmaps=false\nautoloadlights=false\nautoloadwidescreen=true\nautosavecount=4\nautosavenum=1\nchase_dist=90\nchase_height=-8\ncl_capfps=false\ncl_defaultconfiguration=0\ncl_noprediction=false\ncl_oldfreelooklimit=false\ncl_predict_lerpscale=0.05\ncl_predict_lerpthreshold=2\ncl_predict_specials=true\ncl_run=true\ncl_scaleweaponfov=1\ncl_waitforsave=true\ncon_4bitansi=false\ncon_buffersize=-1\ncon_ctrl_d=\ncon_notifylines=4\ncon_printansi=true\ndefaultiwad=\ndemo_compress=true\ndeveloper=0\ndisableautoload=false\ndisableautosave=0\nenablescriptscreenshot=false\nfluid_chorus=true\nfluid_chorus_depth=8\nfluid_chorus_level=1\nfluid_chorus_speed=0.3\nfluid_chorus_type=0\nfluid_chorus_voices=3\nfluid_gain=1\nfluid_interp=1\nfluid_lib=\nfluid_patchset=gzdoom\nfluid_reverb=true\nfluid_reverb_damping=0.23\nfluid_reverb_level=0.57\nfluid_reverb_roomsize=0.61\nfluid_reverb_width=0.76\nfluid_samplerate=0\nfluid_threads=4\nfluid_voices=128\nfreelook=true\ngl_billboard_faces_camera=false\ngl_billboard_mode=0\ngl_billboard_particles=true\ngl_cachenodes=true\ngl_cachetime=0.6\ngl_debug=false\ngl_debug_breakpoint=false\ngl_debug_level=0\ngl_distfog=70\ngl_dither_bpc=0\ngl_enhanced_nv_stealth=3\ngl_es=true\ngl_finishbeforeswap=false\ngl_fxaa=0\ngl_lens=false\ngl_lens_chromatic=1.12\ngl_lens_k=-0.12\ngl_lens_kcube=0.1\ngl_light_particles=true\ngl_light_shadowmap=false\ngl_light_sprites=true\ngl_lights=true\ngl_mask_sprite_threshold=0.5\ngl_mask_threshold=0.5\ngl_mirror_envmap=true\ngl_multisample=1\ngl_multithread=true\ngl_no_skyclear=false\ngl_particles_style=2\ngl_pipeline_depth=0\ngl_plane_reflection=true\ngl_satformula=1\ngl_seamless=false\ngl_shadowmap_filter=1\ngl_shadowmap_quality=512\ngl_sort_textures=false\ngl_sprite_blend=false\ngl_ssao=0\ngl_ssao_portals=1\ngl_ssao_strength=0.7\ngl_texture_filter=0\ngl_texture_filter_anisotropic=8\ngl_texture_hqresize_maxinputsize=512\ngl_texture_hqresize_mt_height=4\ngl_texture_hqresize_mt_width=16\ngl_texture_hqresize_multithread=true\ngl_texture_hqresize_targets=7\ngl_texture_hqresizemode=0\ngl_texture_hqresizemult=1\ngl_usecolorblending=true\ngme_stereodepth=0\ngus_memsize=0\ngus_patchdir=\nhw_force_cambbpref=false\ni_discordrpc=false\ni_pauseinbackground=true\ni_soundinbackground=false\ninter_subtitles=false\ninvertmouse=false\ninvertmousex=false\nlanguage=auto\nlongsavemessages=false\nlookstrafe=false\nm_blockcontrollers=false\nm_cleanscale=false\nm_forward=1\nm_pitch=1\nm_sensitivity_x=2\nm_sensitivity_y=2\nm_show_backbutton=0\nm_showinputgrid=0\nm_side=2\nm_simpleoptions=false\nm_use_mouse=2\nm_yaw=1\nmap_point_coordinates=true\nmidi_config=gzdoom\nmidi_dmxgus=false\nmidi_voices=32\nmod_autochip=false\nmod_autochip_scan_threshold=12\nmod_autochip_size_force=100\nmod_autochip_size_scan=500\nmod_dumb_mastervolume=1\nmod_interp=2\nmod_samplerate=0\nmod_volramp=2\nmouse_capturemode=1\nmus_calcgain=true\nmus_enabled=true\nmus_usereplaygain=false\nnointerscrollabort=false\nnomonsterinterpolation=false\nopl_core=0\nopl_fullpan=true\nopl_numchips=2\nopn_chips_count=8\nopn_emulator_id=1\nopn_fullpan=true\nopn_run_at_pcm_rate=false\nos_isanyof=true\npng_gamma=0\npng_level=5\nqueryiwad=true\nquicksavenum=-1\nquicksaverotation=true\nquicksaverotationcount=4\nr_actorspriteshadow=1\nr_actorspriteshadowalpha=0.5\nr_actorspriteshadowdist=1500\nr_actorspriteshadowfadeheight=0\nr_blendmethod=false\nr_dynlights=false\nr_fakecontrast=1\nr_fullbrightignoresectorcolor=true\nr_fuzzscale=true\nr_line_distance_cull=8000\nr_linearsky=false\nr_magfilter=false\nr_minfilter=true\nr_mipmap=false\nr_mirror_recursions=2\nr_models=true\nr_multithreaded=1\nr_noaccel=false\nr_quakeintensity=1\nr_skipmats=false\nr_sprite_distance_cull=4000\nr_spriteadjust=2\nr_ticstability=true\nsave_dir=\nsave_formatted=false\nsaveloadconfirmation=true\nsavestatistics=0\nscreenshot_dir=\nscreenshot_quiet=false\nscreenshot_type=png\nshow_messages=true\nshowendoom=0\nsnd_aldevice=Default\nsnd_alresampler=Default\nsnd_backend=openal\nsnd_buffersize=0\nsnd_channels=128\nsnd_efx=false\nsnd_enabled=true\nsnd_hrtf=0\nsnd_mastervolume=1\nsnd_mididevice=-5\nsnd_midiprecache=false\nsnd_musicvolume=0.5\nsnd_samplerate=0\nsnd_sfxvolume=1\nsnd_streambuffersize=64\nsnd_waterreverb=true\nstatfile=zdoomstat.txt\nstoresavepic=true\nstrictdecorate=false\ntelezoom=true\ntimidity_channel_pressure=false\ntimidity_chorus=0\ntimidity_config=gzdoom\ntimidity_drum_effect=false\ntimidity_drum_power=1\ntimidity_key_adjust=0\ntimidity_lpf_def=1\ntimidity_min_sustain_time=5000\ntimidity_modulation_envelope=true\ntimidity_modulation_wheel=true\ntimidity_overlap_voice_allow=true\ntimidity_pan_delay=false\ntimidity_portamento=true\ntimidity_reverb=0\ntimidity_reverb_level=0\ntimidity_surround_chorus=false\ntimidity_temper_control=true\ntimidity_tempo_adjust=1\nturnspeedsprintfast=1280\nturnspeedsprintslow=320\nturnspeedwalkfast=640\nturnspeedwalkslow=320\nuse_joystick=true\nuse_mouse=false\nvid_activeinbackground=false\nvid_adapter=0\nvid_aspect=0\nvid_brightness=0.15\nvid_contrast=1.2\nvid_cropaspect=true\nvid_defheight=450\nvid_defwidth=800\nvid_fullscreen=true\nvid_gamma=1.25\nvid_hdr=false\nvid_maxfps=200\nvid_preferbackend=2\nvid_rendermode=4\nvid_saturation=1\nvid_scale_customheight=200\nvid_scale_custompixelaspect=1\nvid_scale_customwidth=320\nvid_scale_linear=false\nvid_scalefactor=1\nvid_scalemode=0\nvid_sdl_render_driver=\nvid_vsync=false\nvr_hunits_per_meter=41\nvr_ipd=0.062\nvr_mode=0\nvr_screendist=0.8\nvr_swap_eyes=false\nwildmidi_config=\nwildmidi_enhanced_resampling=true\nwildmidi_reverb=false\nwin_h=384\nwin_maximized=false\nwin_w=512\nwin_x=-1\nwin_y=-1\nxbrz_centerdirectionbias=4\nxbrz_colorformat=0\nxbrz_dominantdirectionthreshold=3.6\nxbrz_equalcolortolerance=30\nxbrz_luminanceweight=1\nxbrz_steepdirectionthreshold=2.2\n\n[GlobalSettings.Unknown]\nGamma=1.4999995231628418\nbgamma=1\nggamma=1\nm_filter=false\nmus_gainoffset=0\nrgamma=1\n\n[Doom.Player]\nautoaim=35\nclassicflight=false\ncolor=40 cf 00\ncolorset=0\nfov=90\nfviewbob=true\ngender=male\nmovebob=0.25\nname=Player\nneverswitchonpickup=false\nplayerclass=Fighter\nskin=base\nstillbob=0\nteam=255\nvertspread=false\nwbobfire=0\nwbobspeed=1\nwi_noautostartmap=false\n\n[Doom.ConsoleVariables]\naddrocketexplosion=false\nadl_bank=14\nadl_custom_bank=\nadl_use_custom_bank=false\nallcheats=false\nam_backcolor=6c 54 40\nam_cdwallcolor=4c 38 20\nam_colorset=0\nam_customcolors=true\nam_drawmapback=1\nam_efwallcolor=66 55 55\nam_emptyspacemargin=0\nam_fdwallcolor=88 70 58\nam_followplayer=true\nam_gridcolor=8b 5a 2b\nam_interlevelcolor=ff 00 00\nam_intralevelcolor=00 00 ff\nam_linealpha=1\nam_lineantialiasing=0\nam_linethickness=1\nam_lockedcolor=00 78 00\nam_map_secrets=1\nam_markcolor=2\nam_markfont=AMMNUMx\nam_notseencolor=6c 6c 6c\nam_ovcdwallcolor=00 88 44\nam_ovefwallcolor=00 88 44\nam_overlay=0\nam_ovfdwallcolor=00 88 44\nam_ovinterlevelcolor=ff ff 00\nam_ovlockedcolor=00 88 44\nam_ovotherwallscolor=00 88 44\nam_ovportalcolor=00 40 22\nam_ovsecretsectorcolor=00 ff ff\nam_ovsecretwallcolor=00 88 44\nam_ovspecialwallcolor=ff ff ff\nam_ovtelecolor=ff ff 00\nam_ovthingcolor=e8 88 00\nam_ovthingcolor_citem=e8 88 00\nam_ovthingcolor_friend=e8 88 00\nam_ovthingcolor_item=e8 88 00\nam_ovthingcolor_monster=e8 88 00\nam_ovthingcolor_ncmonster=e8 88 00\nam_ovunexploredsecretcolor=00 ff ff\nam_ovunseencolor=00 22 6e\nam_ovwallcolor=00 ff 00\nam_ovyourcolor=fc e8 d8\nam_portalcolor=40 40 40\nam_portaloverlay=true\nam_rotate=0\nam_secretsectorcolor=ff 00 ff\nam_secretwallcolor=00 00 00\nam_showcluster=false\nam_showepisode=false\nam_showgrid=false\nam_showitems=true\nam_showkeys=true\nam_showkeys_always=false\nam_showmaplabel=2\nam_showmonsters=true\nam_showsecrets=true\nam_showthingsprites=0\nam_showtime=true\nam_showtotaltime=false\nam_showtriggerlines=0\nam_specialwallcolor=ff ff ff\nam_textured=false\nam_thingcolor=fc fc fc\nam_thingcolor_citem=fc fc fc\nam_thingcolor_friend=fc fc fc\nam_thingcolor_item=fc fc fc\nam_thingcolor_monster=fc fc fc\nam_thingcolor_ncmonster=fc fc fc\nam_thingrenderstyles=true\nam_tswallcolor=88 88 88\nam_unexploredsecretcolor=ff 00 ff\nam_wallcolor=2c 18 08\nam_xhaircolor=80 80 80\nam_yourcolor=fc e8 d8\nam_zoomdir=0\nblood_fade_scalar=1\nchat_substitution=false\nchatmacro0=No\nchatmacro1=I'm ready to kick butt!\nchatmacro2=I'm OK.\nchatmacro3=I'm not looking too good!\nchatmacro4=Help!\nchatmacro5=You suck!\nchatmacro6=Next time, scumbag...\nchatmacro7=Come here!\nchatmacro8=I'll take care of it.\nchatmacro9=Yes\ncl_bbannounce=false\ncl_bloodsplats=true\ncl_bloodtype=1\ncl_custominvulmapcolor1=00 00 1a\ncl_custominvulmapcolor2=a6 a6 7a\ncl_customizeinvulmap=false\ncl_doautoaim=false\ncl_gfxlocalization=3\ncl_maxdecals=1024\ncl_missiledecals=true\ncl_nointros=false\ncl_pufftype=2\ncl_rockettrails=3\ncl_showmultikills=true\ncl_showsecretmessage=true\ncl_showsprees=true\ncl_spreaddecals=true\nclassic_scaling_factor=1\nclassic_scaling_pixelaspect=1.2\ncompatmode=0\ncon_alpha=0.75\ncon_centernotify=true\ncon_midtime=3\ncon_notablist=false\ncon_notifytime=3\ncon_pulsetext=false\ncon_scale=0\ncon_scaletext=0\ncrosshair=5\ncrosshaircolor=ff 00 00\ncrosshairforce=false\ncrosshairgrow=false\ncrosshairhealth=1\ncrosshairon=true\ncrosshairscale=0.6\ndehload=0\ndimamount=-1\ndimcolor=ff d7 00\ndisplaynametags=0\ndlg_musicvolume=1\ndlg_vgafont=false\ngl_aalines=false\ngl_bandedswlight=false\ngl_bloom=false\ngl_bloom_amount=1.4\ngl_brightfog=false\ngl_coronas=true\ngl_enhanced_nightvision=false\ngl_exposure_base=0.35\ngl_exposure_min=0.35\ngl_exposure_scale=1.3\ngl_exposure_speed=0.05\ngl_fogmode=1\ngl_fuzztype=6\ngl_interpolate_model_frames=true\ngl_light_models=true\ngl_lightadditivesurfaces=false\ngl_lightmode=1\ngl_menu_blur=-1\ngl_paltonemap_powtable=2\ngl_paltonemap_reverselookup=true\ngl_precache=false\ngl_scale_viewport=true\ngl_sclipfactor=1.8\ngl_sclipthreshold=10\ngl_spriteclip=1\ngl_tonemap=0\ngl_weaponlight=8\nhud_althud=true\nhud_althud_forceinternal=false\nhud_althudscale=0\nhud_ammo_order=1\nhud_ammo_red=25\nhud_ammo_yellow=50\nhud_armor_green=100\nhud_armor_red=25\nhud_armor_yellow=50\nhud_aspectscale=false\nhud_berserk_health=true\nhud_health_green=100\nhud_health_red=25\nhud_health_yellow=50\nhud_oldscale=true\nhud_scale=0\nhud_scalefactor=1\nhud_showammo=2\nhud_showangles=false\nhud_showitems=false\nhud_showlag=0\nhud_showmonsters=true\nhud_showscore=false\nhud_showsecrets=true\nhud_showstats=false\nhud_showtime=1\nhud_showtimestat=0\nhud_showweapons=true\nhud_swaphealtharmor=false\nhud_timecolor=5\nhudcolor_ltim=8\nhudcolor_statnames=6\nhudcolor_stats=3\nhudcolor_time=6\nhudcolor_titl=10\nhudcolor_ttim=5\nhudcolor_xyco=3\ninter_classic_scaling=true\nlog_vgafont=false\nlookspring=true\nm_quickexit=false\nmsg=0\nmsg0color=6\nmsg1color=5\nmsg2color=2\nmsg3color=3\nmsg4color=3\nmsgmidcolor=5\nmsgmidcolor2=4\nnametagcolor=5\nnocheats=false\nopn_custom_bank=\nopn_use_custom_bank=false\npaletteflash=0\npickup_fade_scalar=1\nr_deathcamera=false\nr_drawfuzz=2\nr_maxparticles=4000\nr_portal_recursions=4\nr_rail_smartspiral=false\nr_rail_spiralsparsity=1\nr_rail_trailsparsity=1\nr_skymode=2\nr_vanillatrans=0\nsb_cooperative_enable=true\nsb_cooperative_headingcolor=6\nsb_cooperative_otherplayercolor=2\nsb_cooperative_yourplayercolor=3\nsb_deathmatch_enable=true\nsb_deathmatch_headingcolor=6\nsb_deathmatch_otherplayercolor=2\nsb_deathmatch_yourplayercolor=3\nsb_teamdeathmatch_enable=true\nsb_teamdeathmatch_headingcolor=6\nscreenblocks=11\nsetslotstrict=true\nshow_obituaries=true\nsnd_menuvolume=0.6\nsnd_pitched=false\nst_oldouch=false\nst_scale=-1\ntranssouls=0.75\nui_screenborder_classic_scaling=true\nuiscale=2\nunderwater_fade_scalar=1\nvid_allowtrueultrawide=1\nvid_cursor=None\nvid_nopalsubstitutions=false\nwi_cleantextscale=false\nwi_percents=true\nwi_showtotaltime=true\nwipetype=2\n\n[Doom.LocalServerInfo]\ncompatflags=0\ncompatflags2=0\nforcewater=false\nmaxviewpitch=90\nsv_corpsequeuesize=64\nsv_disableautohealth=false\nsv_dropstyle=0\nsv_portal_recursions=4\nsv_smartaim=0\n\n[Doom.ConfigOnlyVariables]\n\n[Doom.UnknownConsoleVariables]\n\n[Doom.ConsoleAliases]\n\n[Doom.Bindings]\nJoy2=+use\nJoy3=+jump\nJoy4=+speed\nJoy5=centerview\nJoy6=+attack\nJoy7=weapprev\nJoy8=weapnext\nJoy9=togglemap\nJoy10=menu_main\nJoy11=pause\nPOV1Up=+forward\nPOV1Right=+right\nPOV1Down=+back\nPOV1Left=+left\n\n[Doom.DoubleBindings]\n\n[Doom.AutomapBindings]\nMWheelUp=am_zoom 1.2\nMWheelDown=am_zoom -1.2\nJoy5=+am_zoomout\nJoy6=+am_zoomin\n\n[Joy:JS:0]\nAxis0deadzone=0.5\nAxis0scale=0.9\nAxis1deadzone=0.5\nAxis1scale=0.9\nAxis2deadzone=0.5\nAxis2scale=0.3\nAxis3deadzone=0.9\nAxis3scale=0.9\nAxis4deadzone=0.5\nAxis4scale=0.3\nAxis5deadzone=0.25\nAxis6deadzone=0.25\nAxis7deadzone=0.25\n\n[Joy:JS:1]\nAxis0deadzone=0.500001\nAxis1deadzone=0.500001\nAxis2deadzone=0.500001\nAxis3deadzone=0.500001\n\n[Doom.Player.Mod]\nm8f_class_as_tag=0\nm8f_ts_alm_dead_cr=true\nm8f_ts_alt_hp_color=false\nm8f_ts_bar_log_scale=false\nm8f_ts_bot_offset=0\nm8f_ts_cr_0=6\nm8f_ts_cr_1=6\nm8f_ts_cr_10=1\nm8f_ts_cr_11=21\nm8f_ts_cr_2=6\nm8f_ts_cr_3=8\nm8f_ts_cr_4=8\nm8f_ts_cr_5=8\nm8f_ts_cr_6=5\nm8f_ts_cr_7=5\nm8f_ts_cr_8=5\nm8f_ts_cr_9=1\nm8f_ts_cr_alm_dead=12\nm8f_ts_cr_font=MM2SFNTO\nm8f_ts_cr_opacity=1\nm8f_ts_cross_bottom=\nm8f_ts_cross_offset=0\nm8f_ts_cross_only_tg=false\nm8f_ts_cross_scale=1\nm8f_ts_cross_top=\nm8f_ts_crosshair=> <\nm8f_ts_crosshair_on=false\nm8f_ts_def_cl_tag_wk=9\nm8f_ts_def_color_crs=3\nm8f_ts_def_color_tag=9\nm8f_ts_empty_pip=-\nm8f_ts_enabled=true\nm8f_ts_font=MM2SFNTO\nm8f_ts_frame_scale=1\nm8f_ts_frame_size=1\nm8f_ts_frame_style=0\nm8f_ts_friendly_target=false\nm8f_ts_green_color=3\nm8f_ts_has_target=false\nm8f_ts_hide_in_dark=false\nm8f_ts_hit_color=6\nm8f_ts_hit_confirm=true\nm8f_ts_length_mult=1\nm8f_ts_light_level=120\nm8f_ts_min_health=0\nm8f_ts_named_confirm=false\nm8f_ts_no_cross_on_1=false\nm8f_ts_on_target=0\nm8f_ts_opacity=1\nm8f_ts_pip=#\nm8f_ts_red_color=6\nm8f_ts_show_bar=true\nm8f_ts_show_champion=true\nm8f_ts_show_confirm=false\nm8f_ts_show_corpses=false\nm8f_ts_show_dormant=false\nm8f_ts_show_friends=true\nm8f_ts_show_hidden=true\nm8f_ts_show_idle=true\nm8f_ts_show_info=false\nm8f_ts_show_name=true\nm8f_ts_show_name_tag=false\nm8f_ts_show_numbers=0\nm8f_ts_show_objects=1\nm8f_ts_step_mult=1\nm8f_ts_text_scale=1\nm8f_ts_top_offset=0\nm8f_ts_x_adjustment=0\nm8f_ts_y=0.02\nm8f_ts_y_offset=0\nts_extra_character=❤\n\n[Doom.LocalServerInfo.Mod]\n\n[Doom.ConfigOnlyVariables.Mod]\n\n[Doom.m8f_ts_Controls.Bindings]\n\n[Doom.m8f_ts_Controls.DoubleBindings]\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/gzdoom/config/OGA/gzdoom.ini",
    "content": "# This file was generated by GZDoom g4.8pre-1891-g425cc72b1 on 2024-02-29 20:44:38\n# These are the directories to automatically search for IWADs.\n# Each directory should be on a separate line, preceded by Path=\n[IWADSearch.Directories]\nPath=.\nPath=$DOOMWADDIR\nPath=/storage/.config/gzdoom\nPath=/storage/roms/ports/doom\nPath=/storage/roms/ports/doom-mods\n\n# These are the directories to search for wads added with the -file\n# command line parameter, if they cannot be found with the path\n# as-is. Layout is the same as for IWADSearch.Directories\n[FileSearch.Directories]\nPath=/storage/.config/gzdoom\nPath=/storage/roms/ports/doom\nPath=/storage/roms/ports/doom-mods\nPath=$DOOMWADDIR\n\n# These are the directories to search for soundfonts that let listed in the menu.\n# Layout is the same as for IWADSearch.Directories\n[SoundfontSearch.Directories]\nPath=/storage/.config/gzdoom/soundfonts\nPath=/storage/.config/gzdoom/fm_banks\n\n# Files to automatically execute when running the corresponding game.\n# Each file should be on its own line, preceded by Path=\n\n[Doom.AutoExec]\nPath=/storage/.config/gzdoom/autoexec.cfg\n\n[Heretic.AutoExec]\nPath=/storage/.config/gzdoom/autoexec.cfg\n\n[Hexen.AutoExec]\nPath=/storage/.config/gzdoom/autoexec.cfg\n\n[Strife.AutoExec]\nPath=/storage/.config/gzdoom/autoexec.cfg\n\n[Chex.AutoExec]\nPath=/storage/.config/gzdoom/autoexec.cfg\n\n# WAD files to always load. These are loaded after the IWAD but before\n# any files added with -file. Place each file on its own line, preceded\n# by Path=\n[Global.Autoload]\n\n# Wad files to automatically load depending on the game and IWAD you are\n# playing.  You may have have files that are loaded for all similar IWADs\n# (the game) and files that are only loaded for particular IWADs. For example,\n# any files listed under 'doom.Autoload' will be loaded for any version of Doom,\n# but files listed under 'doom.doom2.Autoload' will only load when you are\n# playing a Doom 2 based game (doom2.wad, tnt.wad or plutonia.wad), and files listed under\n# 'doom.doom2.commercial.Autoload' only when playing doom2.wad.\n\n[doom.Autoload]\n\n[doom.id.Autoload]\n\n[doom.id.doom2.Autoload]\n\n[doom.id.doom2.commercial.Autoload]\n\n[doom.id.doom2.commercial.french.Autoload]\n\n[doom.id.doom2.commercial.xbox.Autoload]\n\n[doom.id.doom2.unity.Autoload]\n\n[doom.id.doom2.bfg.Autoload]\n\n[doom.id.doom2.plutonia.Autoload]\n\n[doom.id.doom2.plutonia.unity.Autoload]\n\n[doom.id.doom2.tnt.Autoload]\n\n[doom.id.doom2.tnt.unity.Autoload]\n\n[doom.id.doom1.Autoload]\n\n[doom.id.doom1.registered.Autoload]\n\n[doom.id.doom1.ultimate.Autoload]\n\n[doom.id.doom1.ultimate.xbox.Autoload]\n\n[doom.id.wadsmoosh.Autoload]\n\n[doom.id.doom1.unity.Autoload]\n\n[doom.id.doom1.bfg.Autoload]\n\n[doom.freedoom.Autoload]\n\n[doom.freedoom.demo.Autoload]\n\n[doom.freedoom.phase1.Autoload]\n\n[doom.freedoom.phase2.Autoload]\n\n[doom.freedoom.freedm.Autoload]\n\n[heretic.Autoload]\n\n[heretic.heretic.Autoload]\n\n[heretic.shadow.Autoload]\n\n[blasphemer.Autoload]\n\n[hexen.Autoload]\n\n[hexen.deathkings.Autoload]\n\n[hexen.hexen.Autoload]\n\n[strife.Autoload]\n\n[strife.strife.Autoload]\n\n[strife.veteran.Autoload]\n\n[chex.Autoload]\n\n[chex.chex1.Autoload]\n\n[chex.chex3.Autoload]\n\n[urbanbrawl.Autoload]\n\n[hacx.Autoload]\n\n[hacx.hacx1.Autoload]\n\n[hacx.hacx2.Autoload]\n\n[harmony.Autoload]\n\n[square.Autoload]\n\n[square.squareware.Autoload]\n\n[square.square.Autoload]\n\n[delaweare.Autoload]\n\n[woolball.Autoload]\n\n[woolball.rotwb.Autoload]\n\n[LastRun]\nVersion=225\n\n[GlobalSettings]\nI_FriendlyWindowTitle=1\nadl_chips_count=6\nadl_emulator_id=0\nadl_fullpan=true\nadl_run_at_pcm_rate=false\nadl_volume_model=0\nautoloadbrightmaps=false\nautoloadlights=false\nautoloadwidescreen=true\nautosavecount=4\nautosavenum=1\nchase_dist=90\nchase_height=-8\ncl_capfps=false\ncl_defaultconfiguration=0\ncl_noprediction=false\ncl_oldfreelooklimit=false\ncl_predict_lerpscale=0.05\ncl_predict_lerpthreshold=2\ncl_predict_specials=true\ncl_run=true\ncl_scaleweaponfov=1\ncl_waitforsave=true\ncon_4bitansi=false\ncon_buffersize=-1\ncon_ctrl_d=\ncon_notifylines=4\ncon_printansi=true\ndefaultiwad=\ndemo_compress=true\ndeveloper=0\ndisableautoload=false\ndisableautosave=0\nenablescriptscreenshot=false\nfluid_chorus=true\nfluid_chorus_depth=8\nfluid_chorus_level=1\nfluid_chorus_speed=0.3\nfluid_chorus_type=0\nfluid_chorus_voices=3\nfluid_gain=1\nfluid_interp=1\nfluid_lib=\nfluid_patchset=gzdoom\nfluid_reverb=true\nfluid_reverb_damping=0.23\nfluid_reverb_level=0.57\nfluid_reverb_roomsize=0.61\nfluid_reverb_width=0.76\nfluid_samplerate=0\nfluid_threads=4\nfluid_voices=128\nfreelook=true\ngl_billboard_faces_camera=false\ngl_billboard_mode=0\ngl_billboard_particles=true\ngl_cachenodes=true\ngl_cachetime=0.6\ngl_debug=false\ngl_debug_breakpoint=false\ngl_debug_level=0\ngl_distfog=70\ngl_dither_bpc=0\ngl_enhanced_nv_stealth=3\ngl_es=true\ngl_finishbeforeswap=false\ngl_fxaa=0\ngl_lens=false\ngl_lens_chromatic=1.12\ngl_lens_k=-0.12\ngl_lens_kcube=0.1\ngl_light_particles=true\ngl_light_shadowmap=false\ngl_light_sprites=true\ngl_lights=true\ngl_mask_sprite_threshold=0.5\ngl_mask_threshold=0.5\ngl_mirror_envmap=true\ngl_multisample=1\ngl_multithread=true\ngl_no_skyclear=false\ngl_particles_style=2\ngl_pipeline_depth=0\ngl_plane_reflection=true\ngl_satformula=1\ngl_seamless=false\ngl_shadowmap_filter=1\ngl_shadowmap_quality=512\ngl_sort_textures=false\ngl_sprite_blend=false\ngl_ssao=0\ngl_ssao_portals=1\ngl_ssao_strength=0.7\ngl_texture_filter=0\ngl_texture_filter_anisotropic=8\ngl_texture_hqresize_maxinputsize=512\ngl_texture_hqresize_mt_height=4\ngl_texture_hqresize_mt_width=16\ngl_texture_hqresize_multithread=true\ngl_texture_hqresize_targets=7\ngl_texture_hqresizemode=0\ngl_texture_hqresizemult=1\ngl_usecolorblending=true\ngme_stereodepth=0\ngus_memsize=0\ngus_patchdir=\nhw_force_cambbpref=false\ni_discordrpc=false\ni_pauseinbackground=true\ni_soundinbackground=false\ninter_subtitles=false\ninvertmouse=false\ninvertmousex=false\nlanguage=auto\nlongsavemessages=false\nlookstrafe=false\nm_blockcontrollers=false\nm_cleanscale=false\nm_forward=1\nm_pitch=1\nm_sensitivity_x=2\nm_sensitivity_y=2\nm_show_backbutton=0\nm_showinputgrid=0\nm_side=2\nm_simpleoptions=false\nm_use_mouse=2\nm_yaw=1\nmap_point_coordinates=true\nmidi_config=gzdoom\nmidi_dmxgus=false\nmidi_voices=32\nmod_autochip=false\nmod_autochip_scan_threshold=12\nmod_autochip_size_force=100\nmod_autochip_size_scan=500\nmod_dumb_mastervolume=1\nmod_interp=2\nmod_samplerate=0\nmod_volramp=2\nmouse_capturemode=1\nmus_calcgain=true\nmus_enabled=true\nmus_usereplaygain=false\nnointerscrollabort=false\nnomonsterinterpolation=false\nopl_core=0\nopl_fullpan=true\nopl_numchips=2\nopn_chips_count=8\nopn_emulator_id=1\nopn_fullpan=true\nopn_run_at_pcm_rate=false\nos_isanyof=true\npng_gamma=0\npng_level=5\nqueryiwad=true\nquicksavenum=-1\nquicksaverotation=true\nquicksaverotationcount=4\nr_actorspriteshadow=1\nr_actorspriteshadowalpha=0.5\nr_actorspriteshadowdist=1500\nr_actorspriteshadowfadeheight=0\nr_blendmethod=false\nr_dynlights=false\nr_fakecontrast=1\nr_fullbrightignoresectorcolor=true\nr_fuzzscale=true\nr_line_distance_cull=8000\nr_linearsky=false\nr_magfilter=false\nr_minfilter=true\nr_mipmap=false\nr_mirror_recursions=2\nr_models=true\nr_multithreaded=1\nr_noaccel=false\nr_quakeintensity=1\nr_skipmats=false\nr_sprite_distance_cull=4000\nr_spriteadjust=2\nr_ticstability=true\nsave_dir=\nsave_formatted=false\nsaveloadconfirmation=true\nsavestatistics=0\nscreenshot_dir=\nscreenshot_quiet=false\nscreenshot_type=png\nshow_messages=true\nshowendoom=0\nsnd_aldevice=Default\nsnd_alresampler=Default\nsnd_backend=openal\nsnd_buffersize=0\nsnd_channels=128\nsnd_efx=false\nsnd_enabled=true\nsnd_hrtf=0\nsnd_mastervolume=1\nsnd_mididevice=-5\nsnd_midiprecache=false\nsnd_musicvolume=0.5\nsnd_samplerate=0\nsnd_sfxvolume=1\nsnd_streambuffersize=64\nsnd_waterreverb=true\nstatfile=zdoomstat.txt\nstoresavepic=true\nstrictdecorate=false\ntelezoom=true\ntimidity_channel_pressure=false\ntimidity_chorus=0\ntimidity_config=gzdoom\ntimidity_drum_effect=false\ntimidity_drum_power=1\ntimidity_key_adjust=0\ntimidity_lpf_def=1\ntimidity_min_sustain_time=5000\ntimidity_modulation_envelope=true\ntimidity_modulation_wheel=true\ntimidity_overlap_voice_allow=true\ntimidity_pan_delay=false\ntimidity_portamento=true\ntimidity_reverb=0\ntimidity_reverb_level=0\ntimidity_surround_chorus=false\ntimidity_temper_control=true\ntimidity_tempo_adjust=1\nturnspeedsprintfast=1280\nturnspeedsprintslow=320\nturnspeedwalkfast=640\nturnspeedwalkslow=320\nuse_joystick=true\nuse_mouse=false\nvid_activeinbackground=false\nvid_adapter=0\nvid_aspect=0\nvid_brightness=0.15\nvid_contrast=1.2\nvid_cropaspect=true\nvid_defheight=450\nvid_defwidth=800\nvid_fullscreen=true\nvid_gamma=1.25\nvid_hdr=false\nvid_maxfps=200\nvid_preferbackend=2\nvid_rendermode=4\nvid_saturation=1\nvid_scale_customheight=200\nvid_scale_custompixelaspect=1\nvid_scale_customwidth=320\nvid_scale_linear=false\nvid_scalefactor=1\nvid_scalemode=0\nvid_sdl_render_driver=\nvid_vsync=false\nvr_hunits_per_meter=41\nvr_ipd=0.062\nvr_mode=0\nvr_screendist=0.8\nvr_swap_eyes=false\nwildmidi_config=\nwildmidi_enhanced_resampling=true\nwildmidi_reverb=false\nwin_h=384\nwin_maximized=false\nwin_w=512\nwin_x=-1\nwin_y=-1\nxbrz_centerdirectionbias=4\nxbrz_colorformat=0\nxbrz_dominantdirectionthreshold=3.6\nxbrz_equalcolortolerance=30\nxbrz_luminanceweight=1\nxbrz_steepdirectionthreshold=2.2\n\n[GlobalSettings.Unknown]\nGamma=1.4999995231628418\nbgamma=1\nggamma=1\nm_filter=false\nmus_gainoffset=0\nrgamma=1\n\n[Doom.Player]\nautoaim=35\nclassicflight=false\ncolor=40 cf 00\ncolorset=0\nfov=90\nfviewbob=true\ngender=male\nmovebob=0.25\nname=Player\nneverswitchonpickup=false\nplayerclass=Fighter\nskin=base\nstillbob=0\nteam=255\nvertspread=false\nwbobfire=0\nwbobspeed=1\nwi_noautostartmap=false\n\n[Doom.ConsoleVariables]\naddrocketexplosion=false\nadl_bank=14\nadl_custom_bank=\nadl_use_custom_bank=false\nallcheats=false\nam_backcolor=6c 54 40\nam_cdwallcolor=4c 38 20\nam_colorset=0\nam_customcolors=true\nam_drawmapback=1\nam_efwallcolor=66 55 55\nam_emptyspacemargin=0\nam_fdwallcolor=88 70 58\nam_followplayer=true\nam_gridcolor=8b 5a 2b\nam_interlevelcolor=ff 00 00\nam_intralevelcolor=00 00 ff\nam_linealpha=1\nam_lineantialiasing=0\nam_linethickness=1\nam_lockedcolor=00 78 00\nam_map_secrets=1\nam_markcolor=2\nam_markfont=AMMNUMx\nam_notseencolor=6c 6c 6c\nam_ovcdwallcolor=00 88 44\nam_ovefwallcolor=00 88 44\nam_overlay=0\nam_ovfdwallcolor=00 88 44\nam_ovinterlevelcolor=ff ff 00\nam_ovlockedcolor=00 88 44\nam_ovotherwallscolor=00 88 44\nam_ovportalcolor=00 40 22\nam_ovsecretsectorcolor=00 ff ff\nam_ovsecretwallcolor=00 88 44\nam_ovspecialwallcolor=ff ff ff\nam_ovtelecolor=ff ff 00\nam_ovthingcolor=e8 88 00\nam_ovthingcolor_citem=e8 88 00\nam_ovthingcolor_friend=e8 88 00\nam_ovthingcolor_item=e8 88 00\nam_ovthingcolor_monster=e8 88 00\nam_ovthingcolor_ncmonster=e8 88 00\nam_ovunexploredsecretcolor=00 ff ff\nam_ovunseencolor=00 22 6e\nam_ovwallcolor=00 ff 00\nam_ovyourcolor=fc e8 d8\nam_portalcolor=40 40 40\nam_portaloverlay=true\nam_rotate=0\nam_secretsectorcolor=ff 00 ff\nam_secretwallcolor=00 00 00\nam_showcluster=false\nam_showepisode=false\nam_showgrid=false\nam_showitems=true\nam_showkeys=true\nam_showkeys_always=false\nam_showmaplabel=2\nam_showmonsters=true\nam_showsecrets=true\nam_showthingsprites=0\nam_showtime=true\nam_showtotaltime=false\nam_showtriggerlines=0\nam_specialwallcolor=ff ff ff\nam_textured=false\nam_thingcolor=fc fc fc\nam_thingcolor_citem=fc fc fc\nam_thingcolor_friend=fc fc fc\nam_thingcolor_item=fc fc fc\nam_thingcolor_monster=fc fc fc\nam_thingcolor_ncmonster=fc fc fc\nam_thingrenderstyles=true\nam_tswallcolor=88 88 88\nam_unexploredsecretcolor=ff 00 ff\nam_wallcolor=2c 18 08\nam_xhaircolor=80 80 80\nam_yourcolor=fc e8 d8\nam_zoomdir=0\nblood_fade_scalar=1\nchat_substitution=false\nchatmacro0=No\nchatmacro1=I'm ready to kick butt!\nchatmacro2=I'm OK.\nchatmacro3=I'm not looking too good!\nchatmacro4=Help!\nchatmacro5=You suck!\nchatmacro6=Next time, scumbag...\nchatmacro7=Come here!\nchatmacro8=I'll take care of it.\nchatmacro9=Yes\ncl_bbannounce=false\ncl_bloodsplats=true\ncl_bloodtype=1\ncl_custominvulmapcolor1=00 00 1a\ncl_custominvulmapcolor2=a6 a6 7a\ncl_customizeinvulmap=false\ncl_doautoaim=false\ncl_gfxlocalization=3\ncl_maxdecals=1024\ncl_missiledecals=true\ncl_nointros=false\ncl_pufftype=2\ncl_rockettrails=3\ncl_showmultikills=true\ncl_showsecretmessage=true\ncl_showsprees=true\ncl_spreaddecals=true\nclassic_scaling_factor=1\nclassic_scaling_pixelaspect=1.2\ncompatmode=0\ncon_alpha=0.75\ncon_centernotify=true\ncon_midtime=3\ncon_notablist=false\ncon_notifytime=3\ncon_pulsetext=false\ncon_scale=0\ncon_scaletext=0\ncrosshair=5\ncrosshaircolor=ff 00 00\ncrosshairforce=false\ncrosshairgrow=false\ncrosshairhealth=1\ncrosshairon=true\ncrosshairscale=0.6\ndehload=0\ndimamount=-1\ndimcolor=ff d7 00\ndisplaynametags=0\ndlg_musicvolume=1\ndlg_vgafont=false\ngl_aalines=false\ngl_bandedswlight=false\ngl_bloom=false\ngl_bloom_amount=1.4\ngl_brightfog=false\ngl_coronas=true\ngl_enhanced_nightvision=false\ngl_exposure_base=0.35\ngl_exposure_min=0.35\ngl_exposure_scale=1.3\ngl_exposure_speed=0.05\ngl_fogmode=1\ngl_fuzztype=6\ngl_interpolate_model_frames=true\ngl_light_models=true\ngl_lightadditivesurfaces=false\ngl_lightmode=1\ngl_menu_blur=-1\ngl_paltonemap_powtable=2\ngl_paltonemap_reverselookup=true\ngl_precache=false\ngl_scale_viewport=true\ngl_sclipfactor=1.8\ngl_sclipthreshold=10\ngl_spriteclip=1\ngl_tonemap=0\ngl_weaponlight=8\nhud_althud=true\nhud_althud_forceinternal=false\nhud_althudscale=0\nhud_ammo_order=1\nhud_ammo_red=25\nhud_ammo_yellow=50\nhud_armor_green=100\nhud_armor_red=25\nhud_armor_yellow=50\nhud_aspectscale=false\nhud_berserk_health=true\nhud_health_green=100\nhud_health_red=25\nhud_health_yellow=50\nhud_oldscale=true\nhud_scale=0\nhud_scalefactor=1\nhud_showammo=2\nhud_showangles=false\nhud_showitems=false\nhud_showlag=0\nhud_showmonsters=true\nhud_showscore=false\nhud_showsecrets=true\nhud_showstats=false\nhud_showtime=1\nhud_showtimestat=0\nhud_showweapons=true\nhud_swaphealtharmor=false\nhud_timecolor=5\nhudcolor_ltim=8\nhudcolor_statnames=6\nhudcolor_stats=3\nhudcolor_time=6\nhudcolor_titl=10\nhudcolor_ttim=5\nhudcolor_xyco=3\ninter_classic_scaling=true\nlog_vgafont=false\nlookspring=true\nm_quickexit=false\nmsg=0\nmsg0color=6\nmsg1color=5\nmsg2color=2\nmsg3color=3\nmsg4color=3\nmsgmidcolor=5\nmsgmidcolor2=4\nnametagcolor=5\nnocheats=false\nopn_custom_bank=\nopn_use_custom_bank=false\npaletteflash=0\npickup_fade_scalar=1\nr_deathcamera=false\nr_drawfuzz=2\nr_maxparticles=4000\nr_portal_recursions=4\nr_rail_smartspiral=false\nr_rail_spiralsparsity=1\nr_rail_trailsparsity=1\nr_skymode=2\nr_vanillatrans=0\nsb_cooperative_enable=true\nsb_cooperative_headingcolor=6\nsb_cooperative_otherplayercolor=2\nsb_cooperative_yourplayercolor=3\nsb_deathmatch_enable=true\nsb_deathmatch_headingcolor=6\nsb_deathmatch_otherplayercolor=2\nsb_deathmatch_yourplayercolor=3\nsb_teamdeathmatch_enable=true\nsb_teamdeathmatch_headingcolor=6\nscreenblocks=11\nsetslotstrict=true\nshow_obituaries=true\nsnd_menuvolume=0.6\nsnd_pitched=false\nst_oldouch=false\nst_scale=-1\ntranssouls=0.75\nui_screenborder_classic_scaling=true\nuiscale=2\nunderwater_fade_scalar=1\nvid_allowtrueultrawide=1\nvid_cursor=None\nvid_nopalsubstitutions=false\nwi_cleantextscale=false\nwi_percents=true\nwi_showtotaltime=true\nwipetype=2\n\n[Doom.LocalServerInfo]\ncompatflags=0\ncompatflags2=0\nforcewater=false\nmaxviewpitch=90\nsv_corpsequeuesize=64\nsv_disableautohealth=false\nsv_dropstyle=0\nsv_portal_recursions=4\nsv_smartaim=0\n\n[Doom.ConfigOnlyVariables]\n\n[Doom.UnknownConsoleVariables]\n\n[Doom.ConsoleAliases]\n\n[Doom.Bindings]\nJoy1=invuse\nJoy2=+use\nJoy3=+jump\nJoy5=turn180\nJoy6=+attack\nJoy7=weapprev\nJoy8=weapnext\nJoy9=+forward\nJoy10=+back\nJoy13=togglemap\nJoy14=menu_main\nJoy11=+left\nJoy12=+right\nJoy16=pause\nJoy17=toggle cl_run\n\n[Doom.DoubleBindings]\n\n[Doom.AutomapBindings]\nMWheelUp=am_zoom 1.2\nMWheelDown=am_zoom -1.2\nJoy5=+am_zoomout\nJoy6=+am_zoomin\n\n[Joy:JS:0]\nAxis0deadzone=0.500001\nAxis0scale=1.5\nAxis1deadzone=0.500001\nAxis1scale=3\nAxis2deadzone=0.500001\nAxis2scale=1.3\nAxis2map=0\nAxis3deadzone=0.500001\nAxis3scale=0.2\nAxis3map=1\n\n[Joy:JS:1]\nAxis0deadzone=0.500001\nAxis1deadzone=0.500001\nAxis2deadzone=0.500001\nAxis3deadzone=0.500001\n\n[Doom.Player.Mod]\nm8f_class_as_tag=0\nm8f_ts_alm_dead_cr=true\nm8f_ts_alt_hp_color=false\nm8f_ts_bar_log_scale=false\nm8f_ts_bot_offset=0\nm8f_ts_cr_0=6\nm8f_ts_cr_1=6\nm8f_ts_cr_10=1\nm8f_ts_cr_11=21\nm8f_ts_cr_2=6\nm8f_ts_cr_3=8\nm8f_ts_cr_4=8\nm8f_ts_cr_5=8\nm8f_ts_cr_6=5\nm8f_ts_cr_7=5\nm8f_ts_cr_8=5\nm8f_ts_cr_9=1\nm8f_ts_cr_alm_dead=12\nm8f_ts_cr_font=MM2SFNTO\nm8f_ts_cr_opacity=1\nm8f_ts_cross_bottom=\nm8f_ts_cross_offset=0\nm8f_ts_cross_only_tg=false\nm8f_ts_cross_scale=1\nm8f_ts_cross_top=\nm8f_ts_crosshair=> <\nm8f_ts_crosshair_on=false\nm8f_ts_def_cl_tag_wk=9\nm8f_ts_def_color_crs=3\nm8f_ts_def_color_tag=9\nm8f_ts_empty_pip=-\nm8f_ts_enabled=true\nm8f_ts_font=MM2SFNTO\nm8f_ts_frame_scale=1\nm8f_ts_frame_size=1\nm8f_ts_frame_style=0\nm8f_ts_friendly_target=false\nm8f_ts_green_color=3\nm8f_ts_has_target=false\nm8f_ts_hide_in_dark=false\nm8f_ts_hit_color=6\nm8f_ts_hit_confirm=true\nm8f_ts_length_mult=1\nm8f_ts_light_level=120\nm8f_ts_min_health=0\nm8f_ts_named_confirm=false\nm8f_ts_no_cross_on_1=false\nm8f_ts_on_target=0\nm8f_ts_opacity=1\nm8f_ts_pip=#\nm8f_ts_red_color=6\nm8f_ts_show_bar=true\nm8f_ts_show_champion=true\nm8f_ts_show_confirm=false\nm8f_ts_show_corpses=false\nm8f_ts_show_dormant=false\nm8f_ts_show_friends=true\nm8f_ts_show_hidden=true\nm8f_ts_show_idle=true\nm8f_ts_show_info=false\nm8f_ts_show_name=true\nm8f_ts_show_name_tag=false\nm8f_ts_show_numbers=0\nm8f_ts_show_objects=1\nm8f_ts_step_mult=1\nm8f_ts_text_scale=1\nm8f_ts_top_offset=0\nm8f_ts_x_adjustment=0\nm8f_ts_y=0.02\nm8f_ts_y_offset=0\nts_extra_character=❤\n\n[Doom.LocalServerInfo.Mod]\n\n[Doom.ConfigOnlyVariables.Mod]\n\n[Doom.m8f_ts_Controls.Bindings]\n\n[Doom.m8f_ts_Controls.DoubleBindings]\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/gzdoom/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present AmberELEC (https://github.com/AmberELEC)\n# Copyright (C) 2024-present EmuELEC (https://github.com/EmuELEC)\n\nPKG_NAME=\"gzdoom\"\nPKG_VERSION=\"71c40432e5e893c629a1c9c76a523a0ab22bd56a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/ZDoom/gzdoom\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_GIT_CLONE_BRANCH=\"g4.12\"\nPKG_DEPENDS_HOST=\"toolchain SDL2:host zmusic:host libwebp:host\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 gzdoom:host zmusic libwebp\"\nPKG_LONGDESC=\"GZDoom is a modder-friendly OpenGL and Vulkan source port based on the DOOM engine\"\nPKG_TOOLCHAIN=\"cmake-make\"\n\npre_build_host() {\n  HOST_CMAKE_OPTS=\"\"\n}\n\nmake_host() {\n  cmake . -DNO_GTK=ON\n  make\n}\n\nmakeinstall_host() {\n: #no\n}\n\npre_configure_host(){\nPKG_CMAKE_OPTS_HOST=\" -DZMUSIC_LIBRARIES=$(get_build_dir zmusic)/build_host/source/libzmusic.so \\\n                      -DZMUSIC_INCLUDE_DIR=$(get_build_dir zmusic)/include \\\n                      -DCMAKE_BUILD_TYPE=Release \\\n                      -DCMAKE_RULE_MESSAGES=OFF \\\n                      -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON\"\n}\n\npre_configure_target() {\nPKG_CMAKE_OPTS_TARGET=\" -DNO_GTK=ON \\\n                        -DFORCE_CROSSCOMPILE=ON \\\n                        -DIMPORT_EXECUTABLES=${PKG_BUILD}/.${HOST_NAME}/ImportExecutables.cmake \\\n                        -DCMAKE_BUILD_TYPE=Release \\\n                        -DCMAKE_RULE_MESSAGES=OFF \\\n                        -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\n                        -DHAVE_GLES2=ON \\\n                        -DHAVE_VULKAN=OFF \\\n                        -DZMUSIC_LIBRARIES=$(get_build_dir zmusic)/build_target/source/libzmusic.so -DZMUSIC_INCLUDE_DIR=$(get_build_dir zmusic)/include\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp ${PKG_DIR}/scripts/gzdoom.sh ${INSTALL}/usr/bin/\n  cp ${PKG_BUILD}/.${TARGET_NAME}/gzdoom ${INSTALL}/usr/bin\n\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/gzdoom\n  if [ \"$DEVICE\" == \"OdroidGoAdvance\" ] || [ \"$DEVICE\" == \"GameForce\" ]; then\n    cp ${PKG_DIR}/config/OGA/* ${INSTALL}/usr/config/emuelec/configs/gzdoom\n  else\n    cp ${PKG_DIR}/config/N2/* ${INSTALL}/usr/config/emuelec/configs/gzdoom\n  fi\n  cp ${PKG_BUILD}/.${TARGET_NAME}/*.pk3 ${INSTALL}/usr/config/emuelec/configs/gzdoom\n  cp -r ${PKG_BUILD}/.${TARGET_NAME}/soundfonts ${INSTALL}/usr/config/emuelec/configs/gzdoom\n  cp -r ${PKG_BUILD}/.${TARGET_NAME}/fm_banks ${INSTALL}/usr/config/emuelec/configs/gzdoom\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/gzdoom/patches/000-fix-build.patch",
    "content": "diff --git a/specs/udmf_zdoom.txt b/specs/udmf_zdoom.txt\nindex ebc831d57..f2d7974a8 100644\n--- a/specs/udmf_zdoom.txt\n+++ b/specs/udmf_zdoom.txt\n@@ -218,6 +218,9 @@ Note: All <bool> fields default to false unless mentioned otherwise.\n \t  useowncolors_bottom = <bool>; // Set to 1 to use the colors set in the sidedef. Default is using the colors from the owning sector.\n \t  uppercolor_bottom = <int>;    // Material color of the top of the lower tier.\n \t  lowercolor_bottom = <int>;    // Material color of the bottom of the lower tier. (Hardware rendering only.)\n+\t  colorscalefactor_top = <float>  // scales the material color by the given factor.  Default is 1.\n+\t  colorscalefactor_mid = <float>  // scales the material color by the given factor.  Default is 1.\n+\t  colorscalefactor_bottom = <float>  // scales the material color by the given factor.  Default is 1.\n \n       useowncoloradd_top = <bool>;  // Controls where the advanced colorization properties are taken from.\n       useowncoloradd_mid = <bool>;  // 0: From the containing sector, 1: from the given part of the linedef itself\ndiff --git a/src/common/console/keydef.h b/src/common/console/keydef.h\nindex 108806774..971ab398f 100644\n--- a/src/common/console/keydef.h\n+++ b/src/common/console/keydef.h\n@@ -75,8 +75,13 @@ enum EKeyCodes\n \tKEY_JOY6,\n \tKEY_JOY7,\n \tKEY_JOY8,\n-\tKEY_JOY14\t\t\t= KEY_FIRSTJOYBUTTON+13,\n-\tKEY_JOY15\t\t\t= KEY_FIRSTJOYBUTTON+14,\n+\tKEY_JOY9,\n+\tKEY_JOY10,\n+\tKEY_JOY11,\n+\tKEY_JOY12,\n+\tKEY_JOY13,\n+\tKEY_JOY14,\n+\tKEY_JOY15,\n \tKEY_LASTJOYBUTTON\t\t= 0x187,\n \tKEY_JOYPOV1_UP\t\t\t= 0x188,\n \tKEY_JOYPOV1_RIGHT\t\t= 0x189,\ndiff --git a/src/common/menu/menu.cpp b/src/common/menu/menu.cpp\nindex 448b196a1..62f4819aa 100644\n--- a/src/common/menu/menu.cpp\n+++ b/src/common/menu/menu.cpp\n@@ -687,15 +687,12 @@ bool M_Responder (event_t *ev)\n \t\t\tch = ev->data1;\n \t\t\tswitch (ch)\n \t\t\t{\n-\t\t\tcase KEY_JOY1:\n-\t\t\tcase KEY_JOY3:\n-\t\t\tcase KEY_JOY15:\n+\t\t\tcase KEY_JOY2:\n \t\t\tcase KEY_PAD_A:\n \t\t\t\tmkey = MKEY_Enter;\n \t\t\t\tbreak;\n \n-\t\t\tcase KEY_JOY2:\n-\t\t\tcase KEY_JOY14:\n+\t\t\tcase KEY_JOY1:\n \t\t\tcase KEY_PAD_B:\n \t\t\t\tmkey = MKEY_Back;\n \t\t\t\tbreak;\n@@ -719,6 +716,7 @@ bool M_Responder (event_t *ev)\n \t\t\tcase KEY_PAD_LTHUMB_UP:\n \t\t\tcase KEY_JOYAXIS2MINUS:\n \t\t\tcase KEY_JOYPOV1_UP:\n+\t\t\tcase KEY_JOY9:\n \t\t\t\tmkey = MKEY_Up;\n \t\t\t\tbreak;\n \n@@ -726,6 +724,7 @@ bool M_Responder (event_t *ev)\n \t\t\tcase KEY_PAD_LTHUMB_DOWN:\n \t\t\tcase KEY_JOYAXIS2PLUS:\n \t\t\tcase KEY_JOYPOV1_DOWN:\n+\t\t\tcase KEY_JOY10:\n \t\t\t\tmkey = MKEY_Down;\n \t\t\t\tbreak;\n \n@@ -733,6 +732,7 @@ bool M_Responder (event_t *ev)\n \t\t\tcase KEY_PAD_LTHUMB_LEFT:\n \t\t\tcase KEY_JOYAXIS1MINUS:\n \t\t\tcase KEY_JOYPOV1_LEFT:\n+\t\t\tcase KEY_JOY11:\n \t\t\t\tmkey = MKEY_Left;\n \t\t\t\tbreak;\n \n@@ -740,6 +740,7 @@ bool M_Responder (event_t *ev)\n \t\t\tcase KEY_PAD_LTHUMB_RIGHT:\n \t\t\tcase KEY_JOYAXIS1PLUS:\n \t\t\tcase KEY_JOYPOV1_RIGHT:\n+\t\t\tcase KEY_JOY12:\n \t\t\t\tmkey = MKEY_Right;\n \t\t\t\tbreak;\n \t\t\t}\ndiff --git a/src/common/platform/posix/sdl/i_gui.cpp b/src/common/platform/posix/sdl/i_gui.cpp\nindex 9290f063f..62df74a35 100644\n--- a/src/common/platform/posix/sdl/i_gui.cpp\n+++ b/src/common/platform/posix/sdl/i_gui.cpp\n@@ -68,7 +68,7 @@ bool I_SetCursor(FGameTexture *cursorpic)\n \t\t\tSDL_FreeCursor (cursor);\n \t\tcursor = SDL_CreateColorCursor (cursorSurface, 0, 0);\n \t\tSDL_SetCursor (cursor);\n-\t\tSDL_ShowCursor(SDL_ENABLE);\n+\t\tSDL_ShowCursor(SDL_DISABLE);\n \t}\n \telse\n \t{\ndiff --git a/src/gamedata/doomfont.h b/src/gamedata/doomfont.h\nindex fedeb513c..23b2c0759 100644\n--- a/src/gamedata/doomfont.h\n+++ b/src/gamedata/doomfont.h\n@@ -57,6 +57,6 @@ void InitDoomFonts()\n \t}\n \telse if (fileSystem.CheckNumForName(\"STCFN033\", FileSys::ns_graphics) >= 0)\n \t{\n-\t\tOriginalSmallFont = new FFont(\"OriginalSmallFont\", \"STCFN%.3d\", \"defsmallfont\", HU_FONTSTART, HU_FONTSIZE, HU_FONTSTART, -1, -1, false, true, true);\n+\t\tOriginalSmallFont = new FFont(\"OriginalSmallFont\", \"STCFN%.3d\", \"defsmallfont\", HU_FONTSTART, HU_FONTSIZE, HU_FONTSTART, -1, -1, false, true);\n \t}\n\ndiff --git a/wadsrc/static/language.def b/wadsrc/static/language.def\nindex da8ddfb4a..a0e3cc60d 100644\n--- a/wadsrc/static/language.def\n+++ b/wadsrc/static/language.def\n@@ -99,6 +99,9 @@ STARTUP3 = \"\";\n STARTUP4 = \"\";\n STARTUP5 = \"\";\n \n+// Engine strings\n+CNTRLMNU_OPEN_MAIN\t\t\t\t= \"Open Main Menu\";\n+\n // Placeholder definitions for strings that are in the game content table where the labels are needed even when that file is not loaded.\n \n // Level names\n\ndiff --git a/src/common/rendering/gles/gles_system.cpp b/src/common/rendering/gles/gles_system.cpp\nindex d9bedafdd..2b02dfcd8 100644\n--- a/src/common/rendering/gles/gles_system.cpp\n+++ b/src/common/rendering/gles/gles_system.cpp\n@@ -208,6 +208,7 @@ namespace OpenGLESRenderer\n \t\t\tgles.npotAvailable = CheckExtension(\"GL_OES_texture_npot\");\n \t\t\tgles.depthClampAvailable = CheckExtension(\"GL_EXT_depth_clamp\");\n \t\t\tgles.anistropicFilterAvailable = CheckExtension(\"GL_EXT_texture_filter_anisotropic\");\n+\t\t\tgles.useMappedBuffers = true;\n \t\t}\n \t\telse if (gles.glesMode == GLES_MODE_OGL2)\n \t\t{\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/gzdoom/scripts/gzdoom.sh",
    "content": "#!/usr/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present EmuELEC (https://github.com/EmuELEC)\n\n. /etc/profile\n\nRUN_DIR=\"/storage/roms/ports/doom\"\nCONFIG_DIR=\"/emuelec/configs/gzdoom\"\nHOMECONFIG=\"/storage/.config/gzdoom\"\n\n# Check for newer pk3 files\nSHASUMSRC=$(sha256sum \"/usr/config/emuelec/configs/gzdoom/gzdoom.pk3\" | awk '{print $1}')\nSHASUMDST=$(sha256sum \"${CONFIG_DIR}/gzdoom.pk3\" | awk '{print $1}')\n\nif [ $SHASUMSRC != $SHASUMDST ]; then\n  cp /usr/config/emuelec/configs/gzdoom/*.pk3 ${CONFIG_DIR}\nfi\n\nif [ ! -L \"${HOMECONFIG}\" ]; then\n[[ -d \"${HOMECONFIG}\" ]] && rm -rf \"${HOMECONFIG}\"\nln -sf \"${CONFIG_DIR}\" \"${HOMECONFIG}\"\nfi\n\nparams=\" -savedir ${CONFIG_DIR}\"\n\n# EXT can be wad, WAD, iwad, IWAD, pwad, PWAD or doom\nEXT=${1#*.}\n\n# If its not a simple wad (extension .choco) read the file and parse the data\nif [ \"${EXT}\" == \"doom\" ]; then\n    while IFS== read -r key value; do\n        if [ \"${key}\" == \"SUBDIR\" ]; then\n            RUN_DIR=\"/storage/roms/ports/doom/${value}\"\n        fi\n\n        if [ \"${key}\" == \"PARAMS\" ]; then\n            params+=\" ${value}\"\n        fi\n    done < <(<\"${1}\" tr -d '\\r'; echo;)\nelse\n    params+=\" -iwad ${1}\"\nfi\n\ncd \"${RUN_DIR}\"\n# Do not overwrite log messages already written by emuelecRunEmu.sh\n/usr/bin/gzdoom ${params} >>/emuelec/logs/emuelec.log 2>&1\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/gzdoom/zmusic/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present AmberELEC (https://github.com/AmberELEC)\n# Copyright (C) 2024-present EmuELEC (https://github.com/EmuELEC)\n\nPKG_NAME=\"zmusic\"\nPKG_VERSION=\"7476a189755d2665b24a58182640752b82b3a66d\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/ZDoom/ZMusic\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_HOST=\"toolchain:host glib:host\"\nPKG_DEPENDS_TARGET=\"toolchain zmusic:host\"\nPKG_LONGDESC=\"GZDoom's music system as a standalone library\"\nPKG_TOOLCHAIN=\"cmake-make\"\n\npre_build_host() {\n  HOST_CMAKE_OPTS=\"\"\n}\n\nmake_host() {\n  mkdir ${PKG_BUILD}/build_host\n  cd ${PKG_BUILD}/build_host\n  cmake -DCMAKE_BUILD_TYPE=Release ..\n  cmake --build .\n}\n\nmake_target() {\n  mkdir ${PKG_BUILD}/build_target\n  cd ${PKG_BUILD}/build_target\n  cmake -DCMAKE_BUILD_TYPE=Release ..\n  cmake --build .\n}\n\nmakeinstall_host() {\n: #no\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib\n  cp -f ${PKG_BUILD}/build_target/source/libzmusic* ${INSTALL}/usr/lib/\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/hodesdl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n#https://github.com/MaximLopez/HeartOfDarkness-SDL\"\n\nPKG_NAME=\"hodesdl\"\nPKG_VERSION=\"59f3c466923c6b8d49e29176ff697a91165e7efc\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/usineur/hode\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_LONGDESC=\"Game port of 'Heart of Darkness' using SDL2\"\nPKG_TOOLCHAIN=\"cmake\"\nGET_HANDLER_SUPPORT=\"git\"\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp ${PKG_BUILD}/.${TARGET_NAME}/hode ${INSTALL}/usr/bin\ncp ${PKG_BUILD}/hode.ini ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/hodesdl/sources/hode.ini",
    "content": "\n[engine]\n\n# disable animations playback\ndisable_paf=false\n\n# disable monsters handling code\ndisable_mst=false\n\n# disable sound handling code\ndisable_sss=false\n\n# maximum number of active sounds (original engine sets to 10 if a slow CPU or low memory is detected)\nmax_active_sounds=16\n\n# 0:easy 1:normal 2:hard\ndifficulty=1\n\n# frame duration in milliseconds (original is 80ms, eg. 12.5hz)\nframe_duration=80\n\n# display splash screen when loading data files\nloading_screen=true\n\n\n[display]\n\n# scaling factor for game graphics (base resolution is 256x192)\nscale_factor=3\n\n# scaling algorithm for game graphics ('xbr' or 'nearest')\nscale_algorithm=nearest\n\n# gamma correction\ngamma=1.0\n\n# fullscreen display\nfullscreen=false\n\n# widescreen (16:9)\nwidescreen=false\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/hurrican/config/gptokeyb/hurrican.gptk",
    "content": "back = esc\nstart = enter\nguide = enter\n# Jump\na = leftalt \n# Shoot\nb = leftctrl\n# Grenade\nx = rightctrl\n# Powerline\ny = space\n# Ligthing\nl1 = leftshift\n# Grenade\nl2 = rightctrl\n# cycle Weapons\nr1 = enter\n# Shockwave\nr2 = rightshift\nup = up\ndown = down\nleft = left\nright = right\nleft_analog_up = up\nleft_analog_down = down\nleft_analog_left = left\nleft_analog_right = right\nright_analog_up = up\nright_analog_down = down\nright_analog_left = left\nright_analog_right = right\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/hurrican/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"hurrican\"\nPKG_VERSION=\"3f4bfd340730c0dc4443dd35e4d9a310ecf612ad\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/drfiemost/Hurrican\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_mixer libepoxy\"\nPKG_LONGDESC=\"A fork of Hurrican, freeware jump and shoot game created by Poke53280, with SDL2 enabled by default, support for libopenmpt and CRT simulation \"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"cmake\"\n\nPKG_CMAKE_OPTS_TARGET=\" ./Hurrican -DCMAKE_BUILD_TYPE=Release -DRENDERER=GLES2\"\n\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\tPKG_CMAKE_OPTS_TARGET+=\" -DDEFAULT_SCREENBPP=16\"\nfi\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp hurrican ${INSTALL}/usr/bin\ncp \"${PKG_DIR}/scripts/hurrican.sh\" ${INSTALL}/usr/bin\n\nmkdir -p ${INSTALL}/usr/config/emuelec/configs\ncp -rf ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/hurrican/scripts/hurrican.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nDATA=\"https://github.com/drfiemost/Hurrican/archive/refs/heads/master.zip\"\nDATAFOLDER=\"/storage/roms/ports/hurrican/data\"\nCONFIGFOLDER=\"/storage/roms/ports/hurrican\"\n\nmkdir -p \"${DATAFOLDER}\"\nmkdir -p \"${CONFIGFOLDER}/lang\"\ncd \"${CONFIGFOLDER}\"\n\nif [ \"${EE_DEVICE}\" != \"Amlogic-ng\" ]; then \n    gptokeyb -c /emuelec/configs/gptokeyb/hurrican.gptk &\n    FLAGS=\" --depth 16\"\nfi\n\nif [ ! -e \"${DATAFOLDER}/levels/levellist.dat\" ]; then\n    text_viewer -y -w -f 24 -t \"Data does not exists!\" -m \"It seems this is the first time you are launching Hurrican or the data folder does not exists\\n\\nData is about 95 MB total, and you need to be connected to the internet\\n\\n\\nDownload and continue?\"\n        if [[ $? == 21 ]]; then\n            ee_console enable\n            clear > /dev/tty0\n            cat /etc/motd > /dev/tty0\n            echo \"Downloading Hurrican data, please wait...\" > /dev/tty0\n            rm -rf \"${DATAFOLDER}\"\n            rm -rf \"/storage/roms/ports/hurrican/lang\"\n            wget \"${DATA}\" -q --show-progress > /dev/tty0 2>&1\n            echo \"Installing Hurrican data, please wait...\" > /dev/tty0\n            unzip \"master.zip\" \"Hurrican-master/Hurrican/data/*\" -d \"${CONFIGFOLDER}\"\n            unzip \"master.zip\" \"Hurrican-master/Hurrican/lang/*.lng\" -d \"${CONFIGFOLDER}\"\n            mv \"Hurrican-master/Hurrican/data\" \"${CONFIGFOLDER}\"\n            mv \"Hurrican-master/Hurrican/lang\" \"${CONFIGFOLDER}\"\n            rm -rf \"Hurrican-master\" > /dev/tty0 2>&1\n            rm \"master.zip\" > /dev/tty0 2>&1\n            ee_console disable\n            cd \"${CONFIGFOLDER}\"\n            hurrican ${FLAGS} > /emuelec/logs/emuelec.log 2>&1\n        else\n            exit 0\n        fi\nelse\n    hurrican ${FLAGS} > /emuelec/logs/emuelec.log 2>&1\nfi\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/hydracastlelabyrinth/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"hydracastlelabyrinth\"\nPKG_VERSION=\"a4000681a20cd6639183cf72a722f4c2daf30cc7\"\nPKG_SHA256=\"1f6408bf1cc4dbf67846ddad3a031a40f1d65a23924a75055e940f63abe6c9ec\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"https://github.com/ptitSeb/hydracastlelabyrinth\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_mixer libogg timidity\"\nPKG_LONGDESC=\"A port to Linux (and OpenPandora / DragonBox Pyra / ODroid / PocketCHIP / GameShell / AmigaOS4 / MorphOS / Emscripten) of Hydra Castle Labyrinth (a \"metroidvania\" kind of game). Status: Working.\"\nPKG_TOOLCHAIN=\"cmake-make\"\n\npre_configure_target() {\nPKG_CMAKE_OPTS_TARGET=\" -DUSE_SDL2=ON -DSDL2_INCLUDE_DIRS=${SYSROOT_PREFIX}/usr/include/SDL2 -DSDL2_LIBRARIES=${SYSROOT_PREFIX}/usr/lib\"\nLDFLAGS=\"${LDFLAGS} -lSDL2\"\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp ${PKG_BUILD}/.${TARGET_NAME}/hcl ${INSTALL}/usr/bin\n\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/hcl/data\ncp -r ${PKG_BUILD}/data/* ${INSTALL}/usr/config/emuelec/configs/hcl/data\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/hydracastlelabyrinth/patches/01-change-back-to-guide.patch",
    "content": "--- a/src/sdl2/input.c\n+++ b/src/sdl2/input.c\n@@ -165,7 +165,7 @@\n \t\tcase SDL_CONTROLLER_BUTTON_Y: \tjFaceUp = w; break;\n \t\tcase SDL_CONTROLLER_BUTTON_LEFTSHOULDER: jL = w; break;\n \t\tcase SDL_CONTROLLER_BUTTON_RIGHTSHOULDER: jR = w; break;\n-\t\tcase SDL_CONTROLLER_BUTTON_BACK: jSelect = w; break;\n+\t\tcase SDL_CONTROLLER_BUTTON_GUIDE: jSelect = w; break;\n \t\tcase SDL_CONTROLLER_BUTTON_START: jStart = w; break;\n \t\tcase SDL_CONTROLLER_BUTTON_DPAD_UP: jUp = w; break;\n \t\tcase SDL_CONTROLLER_BUTTON_DPAD_DOWN: jDown = w; break;\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/lzdoom/config/lzdoom.ini",
    "content": "# This file was generated by LZDoom 3.87c-37-g9fcde1723 on 2021-03-23 23:13:52\n# These are the directories to automatically search for IWADs.\n# Each directory should be on a separate line, preceded by Path=\n[IWADSearch.Directories]\nPath=.\nPath=$DOOMWADDIR\nPath=/emuelec/configs/lzdoom\nPath=/usr/local/share/doom\nPath=/usr/local/share/games/doom\nPath=/usr/share/doom\nPath=/usr/share/games/doom\nPath=/storage/roms/doom\nPath=/storage/roms/doom-mods\n\n# These are the directories to search for wads added with the -file\n# command line parameter, if they cannot be found with the path\n# as-is. Layout is the same as for IWADSearch.Directories\n[FileSearch.Directories]\nPath=/emuelec/configs/lzdoom\nPath=/usr/local/share/\nPath=/usr/local/share/doom\nPath=/usr/local/share/games/doom\nPath=/usr/share/doom\nPath=/usr/share/games/doom\nPath=/storage/roms/doom\nPath=$DOOMWADDIR\nPath=/storage/roms/doom-mods\n\n# These are the directories to search for soundfonts that let listed in the menu.\n# Layout is the same as for IWADSearch.Directories\n[SoundfontSearch.Directories]\nPath=/emuelec/configs/lzdoom/soundfonts\nPath=/emuelec/configs/lzdoom/fm_banks\nPath=/usr/local/share/doom/soundfonts\nPath=/usr/local/share/doom/fm_banks\nPath=/usr/local/share/games/doom/soundfonts\nPath=/usr/local/share/games/doom/fm_banks\nPath=/usr/share/doom/soundfonts\nPath=/usr/share/doom/fm_banks\nPath=/usr/share/games/doom/soundfonts\nPath=/usr/share/games/doom/fm_banks\n\n# Files to automatically execute when running the corresponding game.\n# Each file should be on its own line, preceded by Path=\n\n[Doom.AutoExec]\nPath=/emuelec/configs/lzdoom/autoexec.cfg\n\n[Heretic.AutoExec]\nPath=/emuelec/configs/lzdoom/autoexec.cfg\n\n[Hexen.AutoExec]\nPath=/emuelec/configs/lzdoom/autoexec.cfg\n\n[Strife.AutoExec]\nPath=/emuelec/configs/lzdoom/autoexec.cfg\n\n[Chex.AutoExec]\nPath=/emuelec/configs/lzdoom/autoexec.cfg\n\n# WAD files to always load. These are loaded after the IWAD but before\n# any files added with -file. Place each file on its own line, preceded\n# by Path=\n[Global.Autoload]\n\n# Wad files to automatically load depending on the game and IWAD you are\n# playing.  You may have have files that are loaded for all similar IWADs\n# (the game) and files that are only loaded for particular IWADs. For example,\n# any files listed under 'doom.Autoload' will be loaded for any version of Doom,\n# but files listed under 'doom.doom2.Autoload' will only load when you are\n# playing a Doom 2 based game (doom2.wad, tnt.wad or plutonia.wad), and files listed under\n# 'doom.doom2.commercial.Autoload' only when playing doom2.wad.\n\n[doom.Autoload]\n\n[doom.id.Autoload]\n\n[doom.id.doom2.Autoload]\n\n[doom.id.doom2.nerve.Autoload]\n\n[doom.id.doom2.commercial.Autoload]\n\n[doom.id.doom2.commercial.french.Autoload]\n\n[doom.id.doom2.commercial.xbox.Autoload]\n\n[doom.id.doom2.unity.Autoload]\n\n[doom.id.doom2.bfg.Autoload]\n\n[doom.id.doom1.Autoload]\n\n[doom.id.doom1.sigil.Autoload]\n\n[doom.id.doom2.plutonia.Autoload]\n\n[doom.id.doom2.plutonia.unity.Autoload]\n\n[doom.id.doom2.tnt.Autoload]\n\n[doom.id.doom2.tnt.unity.Autoload]\n\n[doom.id.doom1.registered.Autoload]\n\n[doom.id.doom1.ultimate.Autoload]\n\n[doom.id.doom1.ultimate.xbox.Autoload]\n\n[doom.id.doom2.wadsmoosh.Autoload]\n\n[doom.id.doom1.unity.Autoload]\n\n[doom.id.doom1.bfg.Autoload]\n\n[doom.freedoom.Autoload]\n\n[doom.freedoom.demo.Autoload]\n\n[doom.freedoom.phase1.Autoload]\n\n[doom.freedoom.phase2.Autoload]\n\n[doom.freedoom.freedm.Autoload]\n\n[heretic.Autoload]\n\n[heretic.heretic.Autoload]\n\n[heretic.shadow.Autoload]\n\n[blasphemer.Autoload]\n\n[hexen.Autoload]\n\n[hexen.deathkings.Autoload]\n\n[hexen.hexen.Autoload]\n\n[strife.Autoload]\n\n[strife.strife.Autoload]\n\n[strife.veteran.Autoload]\n\n[chex.Autoload]\n\n[chex.chex1.Autoload]\n\n[chex.chex3.Autoload]\n\n[urbanbrawl.Autoload]\n\n[hacx.Autoload]\n\n[hacx.hacx1.Autoload]\n\n[hacx.hacx2.Autoload]\n\n[harmony.Autoload]\n\n[square.Autoload]\n\n[square.squareware.Autoload]\n\n[square.square.Autoload]\n\n[delaweare.Autoload]\n\n[woolball.Autoload]\n\n[woolball.rotwb.Autoload]\n\n[LastRun]\nVersion=221\n\n[GlobalSettings]\nGamma=1.4999995231628418\nI_FriendlyWindowTitle=true\nadl_bank=14\nadl_chips_count=6\nadl_custom_bank=\nadl_emulator_id=0\nadl_fullpan=true\nadl_run_at_pcm_rate=false\nadl_use_custom_bank=false\nadl_volume_model=0\nautoloadbrightmaps=false\nautoloadconpics=true\nautoloadlights=false\nautoloadwidescreen=true\nautosavecount=4\nautosavenum=1\nbgamma=1\nchase_dist=90\nchase_height=-8\nchat_self=false\ncl_capfps=false\ncl_noprediction=false\ncl_oldfreelooklimit=false\ncl_predict_lerpscale=0.05000000074505806\ncl_predict_lerpthreshold=2\ncl_predict_specials=true\ncl_run=false\ncl_waitforsave=true\ncon_buffersize=-1\ncon_ctrl_d=\ncon_notifylines=4\ndefaultiwad=DOOM Shareware\ndemo_compress=true\ndeveloper=0\ndisableautoload=false\ndisableautosave=0\nenablescriptscreenshot=false\nfluid_chorus=true\nfluid_chorus_depth=8\nfluid_chorus_level=1\nfluid_chorus_speed=0.30000001192092896\nfluid_chorus_type=0\nfluid_chorus_voices=3\nfluid_gain=1\nfluid_interp=1\nfluid_lib=\nfluid_patchset=lzdoom\nfluid_reverb=true\nfluid_reverb_damping=0.23000000417232513\nfluid_reverb_level=0.5699999928474426\nfluid_reverb_roomsize=0.6100000143051147\nfluid_reverb_width=0.7599999904632568\nfluid_samplerate=0\nfluid_threads=4\nfluid_voices=128\nfreelook=true\nfullscreen=true\nggamma=1\ngl_billboard_faces_camera=false\ngl_billboard_mode=0\ngl_billboard_particles=true\ngl_cachenodes=true\ngl_cachetime=0.6000000238418579\ngl_debug=false\ngl_debug_breakpoint=false\ngl_debug_level=0\ngl_distfog=70\ngl_dither_bpc=0\ngl_enhanced_nv_stealth=3\ngl_es=false\ngl_finishbeforeswap=false\ngl_fxaa=0\ngl_legacy_mode=false\ngl_lens=false\ngl_lens_chromatic=1.1200000047683716\ngl_lens_k=-0.11999999731779099\ngl_lens_kcube=0.10000000149011612\ngl_light_particles=true\ngl_light_shadowmap=false\ngl_light_sprites=true\ngl_lights=true\ngl_lights_additive=false\ngl_lights_checkside=true\ngl_line_distance_cull=8000\ngl_mask_sprite_threshold=0.5\ngl_mask_threshold=0.5\ngl_mirror_envmap=true\ngl_mirrors=true\ngl_multisample=1\ngl_no_skyclear=false\ngl_particles_style=2\ngl_plane_reflection=true\ngl_render_precise=false\ngl_renderbuffers=true\ngl_riskymodernpath=false\ngl_satformula=1\ngl_seamless=false\ngl_shadowmap_filter=1\ngl_shadowmap_quality=512\ngl_sort_textures=false\ngl_sprite_blend=false\ngl_sprite_distance_cull=4000\ngl_ssao=0\ngl_ssao_portals=1\ngl_ssao_strength=0.699999988079071\ngl_texture_filter=0\ngl_texture_filter_anisotropic=8\ngl_texture_format=0\ngl_texture_hqresize_maxinputsize=512\ngl_texture_hqresize_mt_height=4\ngl_texture_hqresize_mt_width=16\ngl_texture_hqresize_multithread=true\ngl_texture_hqresize_targets=7\ngl_texture_hqresizemode=0\ngl_texture_hqresizemult=1\ngl_texture_useshaders=true\ngl_usecolorblending=true\ngl_usefb=false\ngme_stereodepth=0\ngus_memsize=0\ngus_patchdir=\ni_soundinbackground=false\ninter_subtitles=false\ninvertmouse=false\ninvertmousex=false\njoy_background=true\nk_modern=1\nlanguage=auto\nlongsavemessages=true\nlookstrafe=false\nm_blockcontrollers=false\nm_filter=false\nm_forward=1\nm_noprescale=false\nm_pitch=1\nm_show_backbutton=0\nm_showinputgrid=0\nm_side=2\nm_use_mouse=2\nm_yaw=1\nmap_point_coordinates=true\nmidi_config=lzdoom\nmidi_dmxgus=false\nmidi_voices=32\nmin_sustain_time=5000\nmod_autochip=false\nmod_autochip_scan_threshold=12\nmod_autochip_size_force=100\nmod_autochip_size_scan=500\nmod_dumb_mastervolume=1\nmod_interp=2\nmod_samplerate=0\nmod_volramp=2\nmouse_capturemode=1\nmouse_sensitivity=1.5\nnointerscrollabort=false\nnomonsterinterpolation=false\noldsaveorder=false\nopl_core=0\nopl_fullpan=true\nopl_numchips=2\nopn_chips_count=8\nopn_custom_bank=\nopn_emulator_id=0\nopn_fullpan=true\nopn_run_at_pcm_rate=false\nopn_use_custom_bank=false\npng_gamma=0\npng_level=5\nqueryiwad=true\nquicksavenum=-1\nquicksaverotation=false\nquicksaverotationcount=4\nr_blendmethod=false\nr_dynlights=false\nr_fakecontrast=1\nr_fullbrightignoresectorcolor=true\nr_fuzzscale=true\nr_line_distance_cull=8000\nr_linearsky=false\nr_magfilter=false\nr_minfilter=true\nr_mipmap=false\nr_mirror_recursions=2\nr_models=true\nr_models_carmack=false\nr_multithreaded=1\nr_polyrenderer=false\nr_quakeintensity=1\nr_sprite_distance_cull=4000\nr_ticstability=true\nrgamma=1\nsave_dir=\nsave_formatted=false\nsaveloadconfirmation=true\nsavestatistics=0\nscreenshot_dir=\nscreenshot_quiet=false\nscreenshot_type=png\nshow_messages=true\nshowendoom=0\nsnd_aldevice=Default\nsnd_alresampler=Default\nsnd_backend=openal\nsnd_buffersize=0\nsnd_channels=128\nsnd_efx=false\nsnd_hrtf=0\nsnd_mastervolume=1\nsnd_mididevice=-5\nsnd_midiprecache=false\nsnd_musicvolume=0.5\nsnd_samplerate=0\nsnd_sfxvolume=1\nsnd_streambuffersize=64\nsnd_waterreverb=true\nstatfile=zdoomstat.txt\nstoresavepic=true\nstrictdecorate=false\nswtruecolor=true\ntelezoom=true\ntimidity_channel_pressure=false\ntimidity_chorus=0\ntimidity_config=lzdoom\ntimidity_drum_effect=false\ntimidity_drum_power=1\ntimidity_key_adjust=0\ntimidity_lpf_def=1\ntimidity_modulation_envelope=true\ntimidity_modulation_wheel=true\ntimidity_overlap_voice_allow=true\ntimidity_pan_delay=false\ntimidity_portamento=true\ntimidity_reverb=0\ntimidity_reverb_level=0\ntimidity_surround_chorus=false\ntimidity_temper_control=true\ntimidity_tempo_adjust=1\nturnspeedsprintfast=1280\nturnspeedsprintslow=320\nturnspeedwalkfast=640\nturnspeedwalkslow=320\nuse_joystick=true\nuse_mouse=false\nvid_activeinbackground=false\nvid_adapter=0\nvid_aspect=0\nvid_brightness=0\nvid_contrast=1\nvid_cropaspect=false\nvid_defbits=24\nvid_defheight=450\nvid_defwidth=800\nvid_displaybits=32\nvid_forcesurface=false\nvid_glswfb=false\nvid_hdr=false\nvid_hwaalines=true\nvid_hwgamma=2\nvid_maxfps=200\nvid_refreshrate=0\nvid_renderer=0\nvid_saturation=1\nvid_scalefactor=1\nvid_scalemode=0\nvid_vsync=false\nvid_winscale=1\nvr_enable_quadbuffered=false\nvr_hunits_per_meter=41\nvr_ipd=0.06199999898672104\nvr_screendist=0.800000011920929\nwildmidi_config=\nwildmidi_enhanced_resampling=true\nwildmidi_reverb=false\nxbrz_centerdirectionbias=4\nxbrz_colorformat=0\nxbrz_dominantdirectionthreshold=3.5999999046325684\nxbrz_equalcolortolerance=30\nxbrz_luminanceweight=1\nxbrz_steepdirectionthreshold=2.200000047683716\n\n[GlobalSettings.Unknown]\n\n[Doom.Player]\nautoaim=35\nclassicflight=false\ncolor=40 cf 00\ncolorset=0\nfov=90\ngender=male\nmovebob=0.25\nname=Player\nneverswitchonpickup=false\nplayerclass=Fighter\nskin=base\nstillbob=0\nteam=255\nwbobfire=0\nwbobspeed=1\nwi_noautostartmap=false\n\n[Doom.ConsoleVariables]\naddrocketexplosion=false\nallcheats=false\nam_backcolor=6c 54 40\nam_cdwallcolor=4c 38 20\nam_colorset=0\nam_customcolors=true\nam_drawmapback=1\nam_efwallcolor=66 55 55\nam_emptyspacemargin=0\nam_fdwallcolor=88 70 58\nam_followplayer=true\nam_gridcolor=8b 5a 2b\nam_interlevelcolor=ff 00 00\nam_intralevelcolor=00 00 ff\nam_lockedcolor=00 78 00\nam_map_secrets=1\nam_markcolor=2\nam_markfont=AMMNUMx\nam_notseencolor=6c 6c 6c\nam_ovcdwallcolor=00 88 44\nam_ovefwallcolor=00 88 44\nam_overlay=0\nam_ovfdwallcolor=00 88 44\nam_ovinterlevelcolor=ff ff 00\nam_ovlockedcolor=00 88 44\nam_ovotherwallscolor=00 88 44\nam_ovportalcolor=00 40 22\nam_ovsecretsectorcolor=00 ff ff\nam_ovsecretwallcolor=00 88 44\nam_ovspecialwallcolor=ff ff ff\nam_ovtelecolor=ff ff 00\nam_ovthingcolor=e8 88 00\nam_ovthingcolor_citem=e8 88 00\nam_ovthingcolor_friend=e8 88 00\nam_ovthingcolor_item=e8 88 00\nam_ovthingcolor_monster=e8 88 00\nam_ovthingcolor_ncmonster=e8 88 00\nam_ovunexploredsecretcolor=00 ff ff\nam_ovunseencolor=00 22 6e\nam_ovwallcolor=00 ff 00\nam_ovyourcolor=fc e8 d8\nam_portalcolor=40 40 40\nam_portaloverlay=true\nam_rotate=0\nam_secretsectorcolor=ff 00 ff\nam_secretwallcolor=00 00 00\nam_showitems=false\nam_showkeys=true\nam_showkeys_always=false\nam_showmaplabel=2\nam_showmonsters=true\nam_showsecrets=true\nam_showthingsprites=0\nam_showtime=true\nam_showtotaltime=false\nam_showtriggerlines=0\nam_specialwallcolor=ff ff ff\nam_textured=false\nam_thingcolor=fc fc fc\nam_thingcolor_citem=fc fc fc\nam_thingcolor_friend=fc fc fc\nam_thingcolor_item=fc fc fc\nam_thingcolor_monster=fc fc fc\nam_thingcolor_ncmonster=fc fc fc\nam_thingrenderstyles=true\nam_tswallcolor=88 88 88\nam_unexploredsecretcolor=ff 00 ff\nam_wallcolor=2c 18 08\nam_xhaircolor=80 80 80\nam_yourcolor=fc e8 d8\nblood_fade_scalar=1\nchat_substitution=false\nchatmacro0=No\nchatmacro1=I'm ready to kick butt!\nchatmacro2=I'm OK.\nchatmacro3=I'm not looking too good!\nchatmacro4=Help!\nchatmacro5=You suck!\nchatmacro6=Next time, scumbag...\nchatmacro7=Come here!\nchatmacro8=I'll take care of it.\nchatmacro9=Yes\ncl_bbannounce=false\ncl_bloodsplats=true\ncl_bloodtype=0\ncl_custominvulmapcolor1=00 00 1a\ncl_custominvulmapcolor2=a6 a6 7a\ncl_customizeinvulmap=false\ncl_doautoaim=false\ncl_maxdecals=1024\ncl_missiledecals=true\ncl_pufftype=0\ncl_rockettrails=1\ncl_showmultikills=true\ncl_showsecretmessage=true\ncl_showsprees=true\ncl_spreaddecals=true\ncompatmode=0\ncon_alpha=0.75\ncon_centernotify=false\ncon_midtime=3\ncon_notablist=false\ncon_notifytime=3\ncon_scale=0\ncon_scaletext=0\ncrosshair=0\ncrosshaircolor=ff 00 00\ncrosshairforce=false\ncrosshairgrow=false\ncrosshairhealth=1\ncrosshairon=true\ncrosshairscale=1\ndehload=0\ndimamount=-1\ndimcolor=ff d7 00\ndisplaynametags=0\ndlg_musicvolume=1\ngl_aalines=false\ngl_bandedswlight=false\ngl_bloom=false\ngl_bloom_amount=1.399999976158142\ngl_bloom_kernel_size=7\ngl_brightfog=false\ngl_enhanced_nightvision=false\ngl_exposure_base=0.3499999940395355\ngl_exposure_min=0.3499999940395355\ngl_exposure_scale=1.2999999523162842\ngl_exposure_speed=0.05000000074505806\ngl_fogmode=1\ngl_fuzztype=6\ngl_interpolate_model_frames=true\ngl_light_models=true\ngl_lightadditivesurfaces=false\ngl_lightmode=8\ngl_menu_blur=-1\ngl_paltonemap_powtable=2\ngl_paltonemap_reverselookup=true\ngl_precache=false\ngl_scale_viewport=true\ngl_sclipfactor=1.7999999523162842\ngl_sclipthreshold=10\ngl_spriteclip=1\ngl_texture_usehires=true\ngl_tonemap=0\ngl_weaponlight=8\nhud_althud=false\nhud_althud_forceinternal=false\nhud_althudscale=0\nhud_ammo_order=0\nhud_ammo_red=25\nhud_ammo_yellow=50\nhud_armor_green=100\nhud_armor_red=25\nhud_armor_yellow=50\nhud_aspectscale=false\nhud_berserk_health=true\nhud_health_green=100\nhud_health_red=25\nhud_health_yellow=50\nhud_scale=0\nhud_showammo=2\nhud_showangles=false\nhud_showitems=false\nhud_showlag=0\nhud_showmonsters=true\nhud_showscore=false\nhud_showsecrets=true\nhud_showstats=false\nhud_showtime=0\nhud_showweapons=true\nhud_timecolor=5\nhudcolor_ltim=8\nhudcolor_statnames=6\nhudcolor_stats=3\nhudcolor_time=6\nhudcolor_titl=10\nhudcolor_ttim=5\nhudcolor_xyco=3\nlookspring=true\nm_quickexit=false\nmenu_screenratios=-1\nmsg=0\nmsg0color=6\nmsg1color=5\nmsg2color=2\nmsg3color=3\nmsg4color=3\nmsgmidcolor=5\nmsgmidcolor2=4\nnametagcolor=5\nnocheats=false\nos_isanyof=true\npaletteflash=0\npickup_fade_scalar=1\nr_deathcamera=false\nr_drawfuzz=1\nr_highlight_portals=false\nr_maxparticles=4000\nr_portal_recursions=4\nr_rail_smartspiral=false\nr_rail_spiralsparsity=1\nr_rail_trailsparsity=1\nr_shadercolormaps=true\nr_skymode=2\nr_vanillatrans=0\nsb_cooperative_enable=true\nsb_cooperative_headingcolor=6\nsb_cooperative_otherplayercolor=2\nsb_cooperative_yourplayercolor=3\nsb_deathmatch_enable=true\nsb_deathmatch_headingcolor=6\nsb_deathmatch_otherplayercolor=2\nsb_deathmatch_yourplayercolor=3\nsb_teamdeathmatch_enable=true\nsb_teamdeathmatch_headingcolor=6\nscreenblocks=11\nsetslotstrict=true\nshow_obituaries=true\nsnd_menuvolume=0.6000000238418579\nsnd_pitched=false\nst_oldouch=false\nst_scale=-1\ntranssouls=0.75\nuiscale=0\nunderwater_fade_scalar=1\nvid_cursor=-\nvid_nopalsubstitutions=false\nwi_percents=true\nwi_showtotaltime=true\nwipetype=1\n\n[Doom.LocalServerInfo]\ncompatflags=0\ncompatflags2=0\nforcewater=false\nmaxviewpitch=90\nsv_alwaystally=0\nsv_corpsequeuesize=64\nsv_disableautohealth=false\nsv_dropstyle=0\nsv_portal_recursions=4\nsv_smartaim=0\n\n[Doom.ConfigOnlyVariables]\n\n[Doom.UnknownConsoleVariables]\n\n[Doom.ConsoleAliases]\n\n[Doom.Bindings]\n1=slot 1\n2=slot 2\n3=slot 3\n4=slot 4\n5=slot 5\n6=slot 6\n7=slot 7\n8=slot 8\n9=slot 9\n0=slot 0\n`=toggleconsole\nJoy1=invuse\nJoy2=+use\nJoy3=+jump\nJoy5=+speed\nJoy6=+attack\nJoy7=weapprev\nJoy8=weapnext\nJoy9=toggle cl_run\nJoy10=centerview\nPOV1Up=+forward\nPOV1Right=+moveright\nPOV1Down=+back\nPOV1Left=+moveleft\nJoy13=togglemap\nJoy14=menu_main\n\n[Doom.DoubleBindings]\n\n[Doom.AutomapBindings]\n0=am_gobig\n-=+am_zoomout\nEquals=+am_zoomin\nP=am_toggletexture\nF=am_togglefollow\nG=am_togglegrid\nC=am_clearmarks\nM=am_setmark\nKP-=+am_zoomout\nKP+=+am_zoomin\nUpArrow=+am_panup\nLeftArrow=+am_panleft\nRightArrow=+am_panright\nDownArrow=+am_pandown\nMWheelUp=am_zoom 1.2\nMWheelDown=am_zoom -1.2\n\n[Joy:JS:0]\nSensitivity=1.2\nAxis0deadzone=0.500001\nAxis0scale=0.6\nAxis0map=0\nAxis1deadzone=0.500001\nAxis1scale=0.6\nAxis2deadzone=0.500001\nAxis2scale=0.6\nAxis2map=3\nAxis3deadzone=0.500001\nAxis3scale=0.6\nAxis3map=1\n\n[Strife.Player]\nautoaim=35\nclassicflight=false\ncolor=40 cf 00\ncolorset=0\nfov=90\ngender=male\nmovebob=0.25\nname=Player\nneverswitchonpickup=false\nplayerclass=Fighter\nskin=base\nstillbob=0\nteam=255\nwbobfire=0\nwbobspeed=1\nwi_noautostartmap=false\n\n[Strife.ConsoleVariables]\naddrocketexplosion=false\nallcheats=false\nam_backcolor=6c 54 40\nam_cdwallcolor=4c 38 20\nam_colorset=0\nam_customcolors=true\nam_drawmapback=1\nam_efwallcolor=66 55 55\nam_emptyspacemargin=0\nam_fdwallcolor=88 70 58\nam_followplayer=true\nam_gridcolor=8b 5a 2b\nam_interlevelcolor=ff 00 00\nam_intralevelcolor=00 00 ff\nam_lockedcolor=00 78 00\nam_map_secrets=1\nam_markcolor=2\nam_markfont=AMMNUMx\nam_notseencolor=6c 6c 6c\nam_ovcdwallcolor=00 88 44\nam_ovefwallcolor=00 88 44\nam_overlay=0\nam_ovfdwallcolor=00 88 44\nam_ovinterlevelcolor=ff ff 00\nam_ovlockedcolor=00 88 44\nam_ovotherwallscolor=00 88 44\nam_ovportalcolor=00 40 22\nam_ovsecretsectorcolor=00 ff ff\nam_ovsecretwallcolor=00 88 44\nam_ovspecialwallcolor=ff ff ff\nam_ovtelecolor=ff ff 00\nam_ovthingcolor=e8 88 00\nam_ovthingcolor_citem=e8 88 00\nam_ovthingcolor_friend=e8 88 00\nam_ovthingcolor_item=e8 88 00\nam_ovthingcolor_monster=e8 88 00\nam_ovthingcolor_ncmonster=e8 88 00\nam_ovunexploredsecretcolor=00 ff ff\nam_ovunseencolor=00 22 6e\nam_ovwallcolor=00 ff 00\nam_ovyourcolor=fc e8 d8\nam_portalcolor=40 40 40\nam_portaloverlay=true\nam_rotate=0\nam_secretsectorcolor=ff 00 ff\nam_secretwallcolor=00 00 00\nam_showitems=false\nam_showkeys=true\nam_showkeys_always=false\nam_showmaplabel=2\nam_showmonsters=true\nam_showsecrets=true\nam_showthingsprites=0\nam_showtime=true\nam_showtotaltime=false\nam_showtriggerlines=0\nam_specialwallcolor=ff ff ff\nam_textured=false\nam_thingcolor=fc fc fc\nam_thingcolor_citem=fc fc fc\nam_thingcolor_friend=fc fc fc\nam_thingcolor_item=fc fc fc\nam_thingcolor_monster=fc fc fc\nam_thingcolor_ncmonster=fc fc fc\nam_thingrenderstyles=true\nam_tswallcolor=88 88 88\nam_unexploredsecretcolor=ff 00 ff\nam_wallcolor=2c 18 08\nam_xhaircolor=80 80 80\nam_yourcolor=fc e8 d8\nblood_fade_scalar=1\nchat_substitution=false\nchatmacro0=No\nchatmacro1=I'm ready to kick butt!\nchatmacro2=I'm OK.\nchatmacro3=I'm  not looking too good!\nchatmacro4=Help!\nchatmacro5=You suck!\nchatmacro6=Next time, scumbag...\nchatmacro7=Come here!\nchatmacro8=I'll take care of it.\nchatmacro9=Yes\ncl_bbannounce=false\ncl_bloodsplats=true\ncl_bloodtype=0\ncl_custominvulmapcolor1=00 00 1a\ncl_custominvulmapcolor2=a6 a6 7a\ncl_customizeinvulmap=false\ncl_doautoaim=false\ncl_maxdecals=1024\ncl_missiledecals=true\ncl_pufftype=0\ncl_rockettrails=1\ncl_showmultikills=true\ncl_showsecretmessage=true\ncl_showsprees=true\ncl_spreaddecals=true\ncompatmode=0\ncon_alpha=0.75\ncon_centernotify=false\ncon_midtime=3\ncon_notablist=false\ncon_notifytime=3\ncon_scale=0\ncon_scaletext=0\ncrosshair=0\ncrosshaircolor=ff 00 00\ncrosshairforce=false\ncrosshairgrow=false\ncrosshairhealth=1\ncrosshairon=true\ncrosshairscale=1\ndehload=0\ndimamount=-1\ndimcolor=ff d7 00\ndisplaynametags=0\ndlg_musicvolume=1\ngl_aalines=false\ngl_bandedswlight=false\ngl_bloom=false\ngl_bloom_amount=1.399999976158142\ngl_bloom_kernel_size=7\ngl_brightfog=false\ngl_enhanced_nightvision=false\ngl_exposure_base=0.3499999940395355\ngl_exposure_min=0.3499999940395355\ngl_exposure_scale=1.2999999523162842\ngl_exposure_speed=0.05000000074505806\ngl_fogmode=1\ngl_fuzztype=6\ngl_interpolate_model_frames=true\ngl_light_models=true\ngl_lightadditivesurfaces=false\ngl_lightmode=3\ngl_menu_blur=-1\ngl_paltonemap_powtable=2\ngl_paltonemap_reverselookup=true\ngl_precache=false\ngl_scale_viewport=true\ngl_sclipfactor=1.7999999523162842\ngl_sclipthreshold=10\ngl_spriteclip=1\ngl_texture_usehires=true\ngl_tonemap=0\ngl_weaponlight=8\nhud_althud=false\nhud_althud_forceinternal=false\nhud_althudscale=0\nhud_ammo_order=0\nhud_ammo_red=25\nhud_ammo_yellow=50\nhud_armor_green=100\nhud_armor_red=25\nhud_armor_yellow=50\nhud_aspectscale=false\nhud_berserk_health=true\nhud_health_green=100\nhud_health_red=25\nhud_health_yellow=50\nhud_scale=0\nhud_showammo=2\nhud_showangles=false\nhud_showitems=false\nhud_showlag=0\nhud_showmonsters=true\nhud_showscore=false\nhud_showsecrets=true\nhud_showstats=false\nhud_showtime=0\nhud_showweapons=true\nhud_timecolor=5\nhudcolor_ltim=8\nhudcolor_statnames=6\nhudcolor_stats=3\nhudcolor_time=6\nhudcolor_titl=10\nhudcolor_ttim=5\nhudcolor_xyco=3\nlookspring=true\nm_quickexit=false\nmenu_screenratios=-1\nmsg=0\nmsg0color=6\nmsg1color=5\nmsg2color=2\nmsg3color=3\nmsg4color=3\nmsgmidcolor=5\nmsgmidcolor2=4\nnametagcolor=5\nnocheats=false\nos_isanyof=true\npaletteflash=0\npickup_fade_scalar=1\nr_deathcamera=false\nr_drawfuzz=1\nr_highlight_portals=false\nr_maxparticles=4000\nr_portal_recursions=4\nr_rail_smartspiral=false\nr_rail_spiralsparsity=1\nr_rail_trailsparsity=1\nr_shadercolormaps=true\nr_skymode=2\nr_vanillatrans=0\nsb_cooperative_enable=true\nsb_cooperative_headingcolor=6\nsb_cooperative_otherplayercolor=2\nsb_cooperative_yourplayercolor=3\nsb_deathmatch_enable=true\nsb_deathmatch_headingcolor=6\nsb_deathmatch_otherplayercolor=2\nsb_deathmatch_yourplayercolor=3\nsb_teamdeathmatch_enable=true\nsb_teamdeathmatch_headingcolor=6\nscreenblocks=10\nsetslotstrict=true\nshow_obituaries=true\nsnd_menuvolume=0.6000000238418579\nsnd_pitched=false\nst_oldouch=false\nst_scale=-1\ntranssouls=0.75\nuiscale=0\nunderwater_fade_scalar=1\nvid_cursor=-\nvid_nopalsubstitutions=false\nwi_percents=true\nwi_showtotaltime=true\nwipetype=1\n\n[Strife.LocalServerInfo]\ncompatflags=0\ncompatflags2=0\nforcewater=false\nmaxviewpitch=90\nsv_alwaystally=0\nsv_corpsequeuesize=64\nsv_disableautohealth=false\nsv_dropstyle=0\nsv_portal_recursions=4\nsv_smartaim=0\n\n[Strife.ConfigOnlyVariables]\n\n[Strife.UnknownConsoleVariables]\n\n[Strife.ConsoleAliases]\n\n[Strife.Bindings]\n1=slot 1\n2=slot 2\n3=slot 3\n4=slot 4\n5=slot 5\n6=slot 6\n7=slot 7\n8=slot 8\n9=slot 9\n0=slot 0\nT=messagemode\n`=toggleconsole\nJoy1=invuse\nJoy2=+use\nJoy3=+jump\nJoy4=invnext\nJoy5=+speed\nJoy6=+attack\nJoy7=menu_main\nJoy8=togglemap\nJoy9=toggle cl_run\nJoy10=centerview\nJoy11=weapprev\nJoy12=weapnext\nJoy14=showpop 3\nJoy15=showpop 2\nJoy16=showpop 1\nPOV1Up=+forward\nPOV1Right=+moveright\nPOV1Down=+back\nPOV1Left=+moveleft\n\n[Strife.DoubleBindings]\n\n[Strife.AutomapBindings]\n0=am_gobig\n-=+am_zoomout\nEquals=+am_zoomin\nP=am_toggletexture\nF=am_togglefollow\nG=am_togglegrid\nC=am_clearmarks\nM=am_setmark\nKP-=+am_zoomout\nKP+=+am_zoomin\nUpArrow=+am_panup\nLeftArrow=+am_panleft\nRightArrow=+am_panright\nDownArrow=+am_pandown\nMWheelUp=am_zoom 1.2\nMWheelDown=am_zoom -1.2\n\n[Hexen.Player]\nautoaim=35\nclassicflight=false\ncolor=40 cf 00\ncolorset=0\nfov=90\ngender=male\nmovebob=0.25\nname=Player\nneverswitchonpickup=false\nplayerclass=Fighter\nskin=base\nstillbob=0\nteam=255\nwbobfire=0\nwbobspeed=1\nwi_noautostartmap=false\n\n[Hexen.ConsoleVariables]\naddrocketexplosion=false\nallcheats=false\nam_backcolor=6c 54 40\nam_cdwallcolor=73 43 23\nam_colorset=0\nam_customcolors=true\nam_drawmapback=1\nam_efwallcolor=66 55 55\nam_emptyspacemargin=0\nam_fdwallcolor=d0 b0 85\nam_followplayer=true\nam_gridcolor=8b 5a 2b\nam_interlevelcolor=ff 00 00\nam_intralevelcolor=00 00 ff\nam_lockedcolor=00 78 00\nam_map_secrets=1\nam_markcolor=2\nam_markfont=AMMNUMx\nam_notseencolor=6c 6c 6c\nam_ovcdwallcolor=00 88 44\nam_ovefwallcolor=00 88 44\nam_overlay=0\nam_ovfdwallcolor=00 88 44\nam_ovinterlevelcolor=ff ff 00\nam_ovlockedcolor=00 88 44\nam_ovotherwallscolor=00 88 44\nam_ovportalcolor=00 40 22\nam_ovsecretsectorcolor=00 ff ff\nam_ovsecretwallcolor=00 88 44\nam_ovspecialwallcolor=ff ff ff\nam_ovtelecolor=ff ff 00\nam_ovthingcolor=e8 88 00\nam_ovthingcolor_citem=e8 88 00\nam_ovthingcolor_friend=e8 88 00\nam_ovthingcolor_item=e8 88 00\nam_ovthingcolor_monster=e8 88 00\nam_ovthingcolor_ncmonster=e8 88 00\nam_ovunexploredsecretcolor=00 ff ff\nam_ovunseencolor=00 22 6e\nam_ovwallcolor=00 ff 00\nam_ovyourcolor=fc e8 d8\nam_portalcolor=40 40 40\nam_portaloverlay=true\nam_rotate=0\nam_secretsectorcolor=ff 00 ff\nam_secretwallcolor=00 00 00\nam_showitems=false\nam_showkeys=true\nam_showkeys_always=false\nam_showmaplabel=2\nam_showmonsters=true\nam_showsecrets=true\nam_showthingsprites=0\nam_showtime=true\nam_showtotaltime=false\nam_showtriggerlines=0\nam_specialwallcolor=ff ff ff\nam_textured=false\nam_thingcolor=fc fc fc\nam_thingcolor_citem=fc fc fc\nam_thingcolor_friend=fc fc fc\nam_thingcolor_item=fc fc fc\nam_thingcolor_monster=fc fc fc\nam_thingcolor_ncmonster=fc fc fc\nam_thingrenderstyles=true\nam_tswallcolor=88 88 88\nam_unexploredsecretcolor=ff 00 ff\nam_wallcolor=54 3b 17\nam_xhaircolor=80 80 80\nam_yourcolor=fc e8 d8\nblood_fade_scalar=1\nchat_substitution=false\nchatmacro0=No\nchatmacro1=I'm ready to kick butt!\nchatmacro2=I'm OK.\nchatmacro3=I'm not looking too good!\nchatmacro4=Help!\nchatmacro5=You suck!\nchatmacro6=Next time, scumbag...\nchatmacro7=Come here!\nchatmacro8=I'll take care of it.\nchatmacro9=Yes\ncl_bbannounce=false\ncl_bloodsplats=true\ncl_bloodtype=0\ncl_custominvulmapcolor1=00 00 1a\ncl_custominvulmapcolor2=a6 a6 7a\ncl_customizeinvulmap=false\ncl_doautoaim=false\ncl_maxdecals=1024\ncl_missiledecals=true\ncl_pufftype=0\ncl_rockettrails=1\ncl_showmultikills=true\ncl_showsecretmessage=true\ncl_showsprees=true\ncl_spreaddecals=true\ncompatmode=0\ncon_alpha=0.75\ncon_centernotify=true\ncon_midtime=3\ncon_notablist=false\ncon_notifytime=3\ncon_scale=0\ncon_scaletext=0\ncrosshair=0\ncrosshaircolor=ff 00 00\ncrosshairforce=false\ncrosshairgrow=false\ncrosshairhealth=1\ncrosshairon=true\ncrosshairscale=1\ndehload=0\ndimamount=-1\ndimcolor=ff d7 00\ndisplaynametags=0\ndlg_musicvolume=1\ngl_aalines=false\ngl_bandedswlight=false\ngl_bloom=false\ngl_bloom_amount=1.399999976158142\ngl_bloom_kernel_size=7\ngl_brightfog=false\ngl_enhanced_nightvision=false\ngl_exposure_base=0.3499999940395355\ngl_exposure_min=0.3499999940395355\ngl_exposure_scale=1.2999999523162842\ngl_exposure_speed=0.05000000074505806\ngl_fogmode=1\ngl_fuzztype=6\ngl_interpolate_model_frames=true\ngl_light_models=true\ngl_lightadditivesurfaces=false\ngl_lightmode=3\ngl_menu_blur=-1\ngl_paltonemap_powtable=2\ngl_paltonemap_reverselookup=true\ngl_precache=false\ngl_scale_viewport=true\ngl_sclipfactor=1.7999999523162842\ngl_sclipthreshold=10\ngl_spriteclip=1\ngl_texture_usehires=true\ngl_tonemap=0\ngl_weaponlight=8\nhud_althud=false\nhud_althud_forceinternal=false\nhud_althudscale=0\nhud_ammo_order=0\nhud_ammo_red=25\nhud_ammo_yellow=50\nhud_armor_green=100\nhud_armor_red=25\nhud_armor_yellow=50\nhud_aspectscale=false\nhud_berserk_health=true\nhud_health_green=100\nhud_health_red=25\nhud_health_yellow=50\nhud_scale=0\nhud_showammo=2\nhud_showangles=false\nhud_showitems=false\nhud_showlag=0\nhud_showmonsters=true\nhud_showscore=false\nhud_showsecrets=true\nhud_showstats=false\nhud_showtime=0\nhud_showweapons=true\nhud_timecolor=5\nhudcolor_ltim=8\nhudcolor_statnames=6\nhudcolor_stats=3\nhudcolor_time=6\nhudcolor_titl=10\nhudcolor_ttim=5\nhudcolor_xyco=3\nlookspring=true\nm_quickexit=false\nmenu_screenratios=-1\nmsg=0\nmsg0color=9\nmsg1color=5\nmsg2color=2\nmsg3color=3\nmsg4color=3\nmsgmidcolor=9\nmsgmidcolor2=10\nnametagcolor=5\nnocheats=false\nos_isanyof=true\npaletteflash=0\npickup_fade_scalar=1\nr_deathcamera=false\nr_drawfuzz=1\nr_highlight_portals=false\nr_maxparticles=4000\nr_portal_recursions=4\nr_rail_smartspiral=false\nr_rail_spiralsparsity=1\nr_rail_trailsparsity=1\nr_shadercolormaps=true\nr_skymode=2\nr_vanillatrans=0\nsb_cooperative_enable=true\nsb_cooperative_headingcolor=6\nsb_cooperative_otherplayercolor=2\nsb_cooperative_yourplayercolor=3\nsb_deathmatch_enable=true\nsb_deathmatch_headingcolor=6\nsb_deathmatch_otherplayercolor=2\nsb_deathmatch_yourplayercolor=3\nsb_teamdeathmatch_enable=true\nsb_teamdeathmatch_headingcolor=6\nscreenblocks=11\nsetslotstrict=true\nshow_obituaries=true\nsnd_menuvolume=0.6000000238418579\nsnd_pitched=true\nst_oldouch=false\nst_scale=-1\ntranssouls=0.75\nuiscale=2\nunderwater_fade_scalar=1\nvid_cursor=-\nvid_nopalsubstitutions=false\nwi_percents=false\nwi_showtotaltime=true\nwipetype=1\n\n[Hexen.LocalServerInfo]\ncompatflags=0\ncompatflags2=0\nforcewater=false\nmaxviewpitch=90\nsv_alwaystally=0\nsv_corpsequeuesize=64\nsv_disableautohealth=false\nsv_dropstyle=0\nsv_portal_recursions=4\nsv_smartaim=0\n\n[Hexen.ConfigOnlyVariables]\n\n[Hexen.UnknownConsoleVariables]\n\n[Hexen.ConsoleAliases]\n\n[Hexen.Bindings]\n5=use ArtiInvulnerability2\n6=use ArtiPork\n7=use ArtiTeleportOther\n8=use ArtiTeleport\n9=use ArtiBlastRadius\n0=useflechette\nT=messagemode\n\\=use ArtiHealth\nJoy1=invuse\nJoy2=+use\nJoy3=+jump\nJoy4=invnext\nJoy5=+speed\nJoy6=+attack\nJoy7=menu_main\nJoy8=togglemap\nJoy9=toggle cl_run\nJoy10=centerview\nJoy11=weapprev\nJoy12=weapnext\nJoy14=showpop 3\nJoy15=showpop 2\nJoy16=showpop 1\nPOV1Up=+forward\nPOV1Right=+moveright\nPOV1Down=+back\nPOV1Left=+moveleft\n\n[Hexen.DoubleBindings]\n\n[Hexen.AutomapBindings]\n0=am_gobig\n-=+am_zoomout\nEquals=+am_zoomin\nP=am_toggletexture\nF=am_togglefollow\nG=am_togglegrid\nC=am_clearmarks\nM=am_setmark\nKP-=+am_zoomout\nKP+=+am_zoomin\nUpArrow=+am_panup\nLeftArrow=+am_panleft\nRightArrow=+am_panright\nDownArrow=+am_pandown\nMWheelUp=am_zoom 1.2\nMWheelDown=am_zoom -1.2\n\n[Doom.Player.Mod]\nb_flashlighthpos=0\nb_flashlightlowq=0\nb_flashlightmode=0\nb_flashlightvpos=18\nbd_bloodamount=2\nbd_disablebloodyscreen=0\nbd_enablesprint=0\nbd_lowgraphicsmode=0\nbd_morebloodmist=0\nbd_sbartype=1\ncl_step_delaymul=1\ncl_step_volmul=7\n\n[Doom.LocalServerInfo.Mod]\nbd_classicmonsters=0\nbd_disablecrueltybonus=0\nbd_disabledecorations=0\nbd_disabledemonspheres=0\nbd_disablefriendlymarines=0\nbd_disablemapenhancements=0\nbd_disablenewenemies=0\nbd_disablenewguns=0\nbd_disablescanner=0\nbd_disablewaterripples2=1\nbd_footstepsounds=1\nbd_infinitecasings=0\nbd_rocketbackblast=1\nbd_shootablerocketammo=0\nbd_voxeldec=1\nflashlight_color=ff ff ff\nflashlight_inner=13\nflashlight_intensity=235\nflashlight_location=0\nflashlight_outer=18\ngmota_nomusic=0\nisrunningzandronum=1\nzdoombrutalblood=2\nzdoombrutaljanitor=0\n\n[Doom.ConfigOnlyVariables.Mod]\n\n[Doom.GMOTAactionkeys.Bindings]\n\n[Doom.GMOTAactionkeys.DoubleBindings]\n\n[UrbanBrawl.AutoExec]\nPath=/storage/.config/lzdoom/autoexec.cfg\n\n[UrbanBrawl.Player]\nautoaim=35\nclassicflight=false\ncolor=40 cf 00\ncolorset=0\nfov=90\ngender=male\nmovebob=0.25\nname=Player\nneverswitchonpickup=false\nplayerclass=Fighter\nskin=base\nstillbob=0\nteam=255\nwbobfire=0\nwbobspeed=1\nwi_noautostartmap=false\n\n[UrbanBrawl.ConsoleVariables]\naddrocketexplosion=false\nallcheats=false\nam_backcolor=6c 54 40\nam_cdwallcolor=4c 38 20\nam_colorset=0\nam_customcolors=true\nam_drawmapback=1\nam_efwallcolor=66 55 55\nam_emptyspacemargin=0\nam_fdwallcolor=88 70 58\nam_followplayer=true\nam_gridcolor=8b 5a 2b\nam_interlevelcolor=ff 00 00\nam_intralevelcolor=00 00 ff\nam_lockedcolor=00 78 00\nam_map_secrets=1\nam_markcolor=2\nam_markfont=AMMNUMx\nam_notseencolor=6c 6c 6c\nam_ovcdwallcolor=00 88 44\nam_ovefwallcolor=00 88 44\nam_overlay=0\nam_ovfdwallcolor=00 88 44\nam_ovinterlevelcolor=ff ff 00\nam_ovlockedcolor=00 88 44\nam_ovotherwallscolor=00 88 44\nam_ovportalcolor=00 40 22\nam_ovsecretsectorcolor=00 ff ff\nam_ovsecretwallcolor=00 88 44\nam_ovspecialwallcolor=ff ff ff\nam_ovtelecolor=ff ff 00\nam_ovthingcolor=e8 88 00\nam_ovthingcolor_citem=e8 88 00\nam_ovthingcolor_friend=e8 88 00\nam_ovthingcolor_item=e8 88 00\nam_ovthingcolor_monster=e8 88 00\nam_ovthingcolor_ncmonster=e8 88 00\nam_ovunexploredsecretcolor=00 ff ff\nam_ovunseencolor=00 22 6e\nam_ovwallcolor=00 ff 00\nam_ovyourcolor=fc e8 d8\nam_portalcolor=40 40 40\nam_portaloverlay=true\nam_rotate=0\nam_secretsectorcolor=ff 00 ff\nam_secretwallcolor=00 00 00\nam_showitems=false\nam_showkeys=true\nam_showkeys_always=false\nam_showmaplabel=2\nam_showmonsters=true\nam_showsecrets=true\nam_showthingsprites=0\nam_showtime=true\nam_showtotaltime=false\nam_showtriggerlines=0\nam_specialwallcolor=ff ff ff\nam_textured=false\nam_thingcolor=fc fc fc\nam_thingcolor_citem=fc fc fc\nam_thingcolor_friend=fc fc fc\nam_thingcolor_item=fc fc fc\nam_thingcolor_monster=fc fc fc\nam_thingcolor_ncmonster=fc fc fc\nam_thingrenderstyles=true\nam_tswallcolor=88 88 88\nam_unexploredsecretcolor=ff 00 ff\nam_wallcolor=2c 18 08\nam_xhaircolor=80 80 80\nam_yourcolor=fc e8 d8\nblood_fade_scalar=1\nchat_substitution=false\nchatmacro0=No\nchatmacro1=I'm ready to kick butt!\nchatmacro2=I'm OK.\nchatmacro3=I'm not looking too good!\nchatmacro4=Help!\nchatmacro5=You suck!\nchatmacro6=Next time, scumbag...\nchatmacro7=Come here!\nchatmacro8=I'll take care of it.\nchatmacro9=Yes\ncl_bbannounce=false\ncl_bloodsplats=true\ncl_bloodtype=0\ncl_custominvulmapcolor1=00 00 1a\ncl_custominvulmapcolor2=a6 a6 7a\ncl_customizeinvulmap=false\ncl_doautoaim=false\ncl_maxdecals=1024\ncl_missiledecals=true\ncl_pufftype=0\ncl_rockettrails=1\ncl_showmultikills=true\ncl_showsecretmessage=true\ncl_showsprees=true\ncl_spreaddecals=true\ncompatmode=0\ncon_alpha=0.75\ncon_centernotify=false\ncon_midtime=3\ncon_notablist=false\ncon_notifytime=3\ncon_scale=0\ncon_scaletext=0\ncrosshair=0\ncrosshaircolor=ff 00 00\ncrosshairforce=false\ncrosshairgrow=false\ncrosshairhealth=1\ncrosshairon=true\ncrosshairscale=1\ndehload=0\ndimamount=-1\ndimcolor=ff d7 00\ndisplaynametags=0\ndlg_musicvolume=1\ngl_aalines=false\ngl_bandedswlight=false\ngl_bloom=false\ngl_bloom_amount=1.399999976158142\ngl_bloom_kernel_size=7\ngl_brightfog=false\ngl_enhanced_nightvision=false\ngl_exposure_base=0.3499999940395355\ngl_exposure_min=0.3499999940395355\ngl_exposure_scale=1.2999999523162842\ngl_exposure_speed=0.05000000074505806\ngl_fogmode=1\ngl_fuzztype=6\ngl_interpolate_model_frames=true\ngl_light_models=true\ngl_lightadditivesurfaces=false\ngl_lightmode=8\ngl_menu_blur=-1\ngl_paltonemap_powtable=2\ngl_paltonemap_reverselookup=true\ngl_precache=false\ngl_scale_viewport=true\ngl_sclipfactor=1.7999999523162842\ngl_sclipthreshold=10\ngl_spriteclip=1\ngl_texture_usehires=true\ngl_tonemap=0\ngl_weaponlight=8\nhud_althud=false\nhud_althud_forceinternal=false\nhud_althudscale=0\nhud_ammo_order=0\nhud_ammo_red=25\nhud_ammo_yellow=50\nhud_armor_green=100\nhud_armor_red=25\nhud_armor_yellow=50\nhud_aspectscale=false\nhud_berserk_health=true\nhud_health_green=100\nhud_health_red=25\nhud_health_yellow=50\nhud_scale=0\nhud_showammo=2\nhud_showangles=false\nhud_showitems=false\nhud_showlag=0\nhud_showmonsters=true\nhud_showscore=false\nhud_showsecrets=true\nhud_showstats=false\nhud_showtime=0\nhud_showweapons=true\nhud_timecolor=5\nhudcolor_ltim=8\nhudcolor_statnames=6\nhudcolor_stats=3\nhudcolor_time=6\nhudcolor_titl=10\nhudcolor_ttim=5\nhudcolor_xyco=3\nlookspring=true\nm_quickexit=false\nmenu_screenratios=-1\nmsg=0\nmsg0color=6\nmsg1color=5\nmsg2color=2\nmsg3color=3\nmsg4color=3\nmsgmidcolor=5\nmsgmidcolor2=4\nnametagcolor=5\nnocheats=false\nos_isanyof=true\npaletteflash=0\npickup_fade_scalar=1\nr_deathcamera=false\nr_drawfuzz=1\nr_highlight_portals=false\nr_maxparticles=4000\nr_portal_recursions=4\nr_rail_smartspiral=false\nr_rail_spiralsparsity=1\nr_rail_trailsparsity=1\nr_shadercolormaps=true\nr_skymode=2\nr_vanillatrans=0\nsb_cooperative_enable=true\nsb_cooperative_headingcolor=6\nsb_cooperative_otherplayercolor=2\nsb_cooperative_yourplayercolor=3\nsb_deathmatch_enable=true\nsb_deathmatch_headingcolor=6\nsb_deathmatch_otherplayercolor=2\nsb_deathmatch_yourplayercolor=3\nsb_teamdeathmatch_enable=true\nsb_teamdeathmatch_headingcolor=6\nscreenblocks=10\nshow_obituaries=true\nsnd_menuvolume=0.6000000238418579\nsnd_pitched=false\nst_oldouch=false\nst_scale=-1\ntranssouls=0.75\nuiscale=0\nunderwater_fade_scalar=1\nvid_cursor=-\nvid_nopalsubstitutions=false\nwi_percents=true\nwi_showtotaltime=true\nwipetype=1\n\n[UrbanBrawl.LocalServerInfo]\ncompatflags=0\ncompatflags2=0\nforcewater=false\nmaxviewpitch=90\nsv_corpsequeuesize=64\nsv_disableautohealth=false\nsv_dropstyle=0\nsv_portal_recursions=4\nsv_smartaim=0\n\n[UrbanBrawl.ConfigOnlyVariables]\n\n[UrbanBrawl.UnknownConsoleVariables]\n\n[UrbanBrawl.ConsoleAliases]\n\n[UrbanBrawl.spdivk_keysection.Bindings]\nZ=ad2_drop\n\n[UrbanBrawl.spdivk_keysection.DoubleBindings]\n\n[UrbanBrawl.Bindings]\n1=slot 1\n2=slot 2\n3=slot 3\n4=slot 4\n5=slot 5\n6=slot 6\n7=slot 7\n8=slot 8\n9=slot 9\n0=slot 0\n-=sizedown\nEquals=sizeup\nTab=togglemap\nW=+forward\nE=+jump\nT=messagemode\nLeftBracket=invprev\nRightBracket=invnext\nA=+moveleft\nS=+back\nD=+moveright\n`=toggleconsole\nShift=+speed\n\\=+showscores\nX=crouch\nSpace=+use\nCapsLock=toggle cl_run\nF1=menu_help\nF2=menu_save\nF3=menu_load\nF4=menu_options\nF5=menu_display\nF6=quicksave\nF7=menu_endgame\nF8=togglemessages\nF9=quickload\nF10=menu_quit\nF11=bumpgamma\nF12=spynext\nSysRq=screenshot\nPause=pause\nHome=land\nPgUp=+moveup\nEnd=centerview\nPgDn=+lookup\nIns=+movedown\nDel=+lookdown\nMouse1=+attack\nMouse2=+altattack\nMouse3=invuse\nMWheelUp=weapprev\nMWheelDown=weapnext\nMWheelRight=invnext\nMWheelLeft=invprev\nDPadUp=togglemap\nDPadDown=invuse\nDPadLeft=invprev\nDPadRight=invnext\nPad_Start=pause\nPad_Back=menu_main\nLThumb=crouch\nLShoulder=weapprev\nRShoulder=weapnext\nLTrigger=+altattack\nRTrigger=+attack\nPad_A=+use\nPad_Y=+jump\n\n[UrbanBrawl.DoubleBindings]\n\n[UrbanBrawl.AutomapBindings]\n0=am_gobig\n-=+am_zoomout\nEquals=+am_zoomin\nP=am_toggletexture\nF=am_togglefollow\nG=am_togglegrid\nC=am_clearmarks\nM=am_setmark\nKP-=+am_zoomout\nKP+=+am_zoomin\nUpArrow=+am_panup\nLeftArrow=+am_panleft\nRightArrow=+am_panright\nDownArrow=+am_pandown\nMWheelUp=am_zoom 1.2\nMWheelDown=am_zoom -1.2\n\n[Chex.Player]\nautoaim=35\nclassicflight=false\ncolor=40 cf 00\ncolorset=0\nfov=90\ngender=male\nmovebob=0.25\nname=Player\nneverswitchonpickup=false\nplayerclass=Fighter\nskin=base\nstillbob=0\nteam=255\nwbobfire=0\nwbobspeed=1\nwi_noautostartmap=false\n\n[Chex.ConsoleVariables]\naddrocketexplosion=false\nallcheats=false\nam_backcolor=6c 54 40\nam_cdwallcolor=4c 38 20\nam_colorset=0\nam_customcolors=true\nam_drawmapback=1\nam_efwallcolor=66 55 55\nam_emptyspacemargin=0\nam_fdwallcolor=88 70 58\nam_followplayer=true\nam_gridcolor=8b 5a 2b\nam_interlevelcolor=ff 00 00\nam_intralevelcolor=00 00 ff\nam_lockedcolor=00 78 00\nam_map_secrets=1\nam_markcolor=2\nam_markfont=AMMNUMx\nam_notseencolor=6c 6c 6c\nam_ovcdwallcolor=00 88 44\nam_ovefwallcolor=00 88 44\nam_overlay=0\nam_ovfdwallcolor=00 88 44\nam_ovinterlevelcolor=ff ff 00\nam_ovlockedcolor=00 88 44\nam_ovotherwallscolor=00 88 44\nam_ovportalcolor=00 40 22\nam_ovsecretsectorcolor=00 ff ff\nam_ovsecretwallcolor=00 88 44\nam_ovspecialwallcolor=ff ff ff\nam_ovtelecolor=ff ff 00\nam_ovthingcolor=e8 88 00\nam_ovthingcolor_citem=e8 88 00\nam_ovthingcolor_friend=e8 88 00\nam_ovthingcolor_item=e8 88 00\nam_ovthingcolor_monster=e8 88 00\nam_ovthingcolor_ncmonster=e8 88 00\nam_ovunexploredsecretcolor=00 ff ff\nam_ovunseencolor=00 22 6e\nam_ovwallcolor=00 ff 00\nam_ovyourcolor=fc e8 d8\nam_portalcolor=40 40 40\nam_portaloverlay=true\nam_rotate=0\nam_secretsectorcolor=ff 00 ff\nam_secretwallcolor=00 00 00\nam_showitems=false\nam_showkeys=true\nam_showkeys_always=false\nam_showmaplabel=2\nam_showmonsters=true\nam_showsecrets=true\nam_showthingsprites=0\nam_showtime=true\nam_showtotaltime=false\nam_showtriggerlines=0\nam_specialwallcolor=ff ff ff\nam_textured=false\nam_thingcolor=fc fc fc\nam_thingcolor_citem=fc fc fc\nam_thingcolor_friend=fc fc fc\nam_thingcolor_item=fc fc fc\nam_thingcolor_monster=fc fc fc\nam_thingcolor_ncmonster=fc fc fc\nam_thingrenderstyles=true\nam_tswallcolor=88 88 88\nam_unexploredsecretcolor=ff 00 ff\nam_wallcolor=2c 18 08\nam_xhaircolor=80 80 80\nam_yourcolor=fc e8 d8\nblood_fade_scalar=1\nchat_substitution=false\nchatmacro0=No\nchatmacro1=I'm ready to kick butt!\nchatmacro2=I'm OK.\nchatmacro3=I'm not looking too good!\nchatmacro4=Help!\nchatmacro5=You suck!\nchatmacro6=Next time, scumbag...\nchatmacro7=Come here!\nchatmacro8=I'll take care of it.\nchatmacro9=Yes\ncl_bbannounce=false\ncl_bloodsplats=true\ncl_bloodtype=0\ncl_custominvulmapcolor1=00 00 1a\ncl_custominvulmapcolor2=a6 a6 7a\ncl_customizeinvulmap=false\ncl_doautoaim=false\ncl_maxdecals=1024\ncl_missiledecals=true\ncl_pufftype=0\ncl_rockettrails=1\ncl_showmultikills=true\ncl_showsecretmessage=true\ncl_showsprees=true\ncl_spreaddecals=true\ncompatmode=0\ncon_alpha=0.75\ncon_centernotify=false\ncon_midtime=3\ncon_notablist=false\ncon_notifytime=3\ncon_scale=0\ncon_scaletext=0\ncrosshair=0\ncrosshaircolor=ff 00 00\ncrosshairforce=false\ncrosshairgrow=false\ncrosshairhealth=1\ncrosshairon=true\ncrosshairscale=1\ndehload=0\ndimamount=-1\ndimcolor=ff d7 00\ndisplaynametags=0\ndlg_musicvolume=1\ngl_aalines=false\ngl_bandedswlight=false\ngl_bloom=false\ngl_bloom_amount=1.399999976158142\ngl_bloom_kernel_size=7\ngl_brightfog=false\ngl_enhanced_nightvision=false\ngl_exposure_base=0.3499999940395355\ngl_exposure_min=0.3499999940395355\ngl_exposure_scale=1.2999999523162842\ngl_exposure_speed=0.05000000074505806\ngl_fogmode=1\ngl_fuzztype=6\ngl_interpolate_model_frames=true\ngl_light_models=true\ngl_lightadditivesurfaces=false\ngl_lightmode=3\ngl_menu_blur=-1\ngl_paltonemap_powtable=2\ngl_paltonemap_reverselookup=true\ngl_precache=false\ngl_scale_viewport=true\ngl_sclipfactor=1.7999999523162842\ngl_sclipthreshold=10\ngl_spriteclip=1\ngl_texture_usehires=true\ngl_tonemap=0\ngl_weaponlight=8\nhud_althud=false\nhud_althud_forceinternal=false\nhud_althudscale=0\nhud_ammo_order=0\nhud_ammo_red=25\nhud_ammo_yellow=50\nhud_armor_green=100\nhud_armor_red=25\nhud_armor_yellow=50\nhud_aspectscale=false\nhud_berserk_health=true\nhud_health_green=100\nhud_health_red=25\nhud_health_yellow=50\nhud_scale=0\nhud_showammo=2\nhud_showangles=false\nhud_showitems=false\nhud_showlag=0\nhud_showmonsters=true\nhud_showscore=false\nhud_showsecrets=true\nhud_showstats=false\nhud_showtime=0\nhud_showweapons=true\nhud_timecolor=5\nhudcolor_ltim=8\nhudcolor_statnames=6\nhudcolor_stats=3\nhudcolor_time=6\nhudcolor_titl=10\nhudcolor_ttim=5\nhudcolor_xyco=3\nlookspring=true\nm_quickexit=true\nmenu_screenratios=-1\nmsg=0\nmsg0color=6\nmsg1color=5\nmsg2color=2\nmsg3color=3\nmsg4color=3\nmsgmidcolor=5\nmsgmidcolor2=4\nnametagcolor=5\nnocheats=false\nos_isanyof=true\npaletteflash=0\npickup_fade_scalar=1\nr_deathcamera=false\nr_drawfuzz=1\nr_highlight_portals=false\nr_maxparticles=4000\nr_portal_recursions=4\nr_rail_smartspiral=false\nr_rail_spiralsparsity=1\nr_rail_trailsparsity=1\nr_shadercolormaps=true\nr_skymode=2\nr_vanillatrans=0\nsb_cooperative_enable=true\nsb_cooperative_headingcolor=6\nsb_cooperative_otherplayercolor=2\nsb_cooperative_yourplayercolor=3\nsb_deathmatch_enable=true\nsb_deathmatch_headingcolor=6\nsb_deathmatch_otherplayercolor=2\nsb_deathmatch_yourplayercolor=3\nsb_teamdeathmatch_enable=true\nsb_teamdeathmatch_headingcolor=6\nscreenblocks=11\nsetslotstrict=true\nshow_obituaries=true\nsnd_menuvolume=0.3999999761581421\nsnd_pitched=false\nst_oldouch=false\nst_scale=-1\ntranssouls=0.75\nuiscale=0\nunderwater_fade_scalar=1\nvid_cursor=-\nvid_nopalsubstitutions=false\nwi_percents=true\nwi_showtotaltime=true\nwipetype=1\n\n[Chex.LocalServerInfo]\ncompatflags=0\ncompatflags2=0\nforcewater=false\nmaxviewpitch=90\nsv_alwaystally=0\nsv_corpsequeuesize=64\nsv_disableautohealth=false\nsv_dropstyle=0\nsv_portal_recursions=4\nsv_smartaim=0\n\n[Chex.ConfigOnlyVariables]\n\n[Chex.UnknownConsoleVariables]\n\n[Chex.ConsoleAliases]\n\n[Chex.Bindings]\n1=slot 1\n2=slot 2\n3=slot 3\n4=slot 4\n5=slot 5\n6=slot 6\n7=slot 7\n8=slot 8\n9=slot 9\n0=slot 0\nT=messagemode\n`=toggleconsole\nJoy1=invuse\nJoy2=+use\nJoy3=+jump\nJoy4=invnext\nJoy5=+speed\nJoy6=+attack\nJoy7=menu_main\nJoy8=togglemap\nJoy9=toggle cl_run\nJoy10=centerview\nJoy11=weapprev\nJoy12=weapnext\nJoy14=showpop 3\nJoy15=showpop 2\nJoy16=showpop 1\nPOV1Up=+forward\nPOV1Right=+moveright\nPOV1Down=+back\nPOV1Left=+moveleft\n\n[Chex.DoubleBindings]\n\n[Chex.AutomapBindings]\n0=am_gobig\n-=+am_zoomout\nEquals=+am_zoomin\nP=am_toggletexture\nF=am_togglefollow\nG=am_togglegrid\nC=am_clearmarks\nM=am_setmark\nKP-=+am_zoomout\nKP+=+am_zoomin\nUpArrow=+am_panup\nLeftArrow=+am_panleft\nRightArrow=+am_panright\nDownArrow=+am_pandown\nMWheelUp=am_zoom 1.2\nMWheelDown=am_zoom -1.2\n\n[Hexen.Player.Mod]\nWoC_AutoPetLeash=true\nWoC_Dam_fontclass=DamNumFontGameDefault\nWoC_Dam_physics=0\nWoC_Dam_translation=DamDefault\nWoC_Dam_usetypes=true\nWoC_DamageIndicator=true\nWoC_EnemyFloatingHealthBar=true\nWoC_EnemyHealthBar=true\nWoC_FloatingHealthBar=true\nWoC_GoreLevel=0\nWoC_HPBars_FullBright=false\nWoC_HPBars_Offset=0.10000000149011612\nWoC_HPBars_RenderStyle=true\nWoC_HPBars_Scale=0.30000001192092896\nWoC_MajorPotion=0.6600000262260437\nWoC_MinorPotion=1\nWoC_MysticUrn=0.25\nWoC_NormalPotion=0.75\nWoC_PlayerDamageDisplay=true\nWoC_RandomSkills=false\nWoC_RandomStats=false\nWoC_SupremePotion=0.5\n\n[Hexen.LocalServerInfo.Mod]\nWoC_AgilitySpeedMult=1\nWoC_Dam_enabled=true\nWoC_Dam_shootable=false\nWoC_Dam_spray=0\nWoC_Director=false\nWoC_DisableAwards=false\nWoC_DisableKillingSpree=false\nWoC_ExpDeath=1\nWoC_ExpDeathAmount=33\nWoC_ExpMult=100\nWoC_GoldDeath=true\nWoC_GoldDeathAmount=50\nWoC_HPBars_Enable=true\nWoC_MaxJump=12\nWoC_MaxLevel=160\nWoC_MaxSpeed=200\nWoC_MinLevel=1\nWoC_ServerDisableHealthBar=false\nWoC_SetMonstersOnce=true\nWoC_SpeedMult=1\nWoC_WeaponStart=false\n\n[Hexen.ConfigOnlyVariables.Mod]\n\n[Hexen.WOCKeysection.Bindings]\nJoy16=viewStats\nJoy2=abil1\nJoy13=abil2\nJoy14=abil3\nJoy15=abil4\n\n[Hexen.WOCKeysection.DoubleBindings]\n\n[Hexen.woc_weaponsection.Bindings]\n\n[Hexen.woc_weaponsection.DoubleBindings]\n\n[Hexen.woc_artifacts.Bindings]\n\n[Hexen.woc_artifacts.DoubleBindings]\n\n[Hexen.woc_flasks.Bindings]\n\n[Hexen.woc_flasks.DoubleBindings]\n\n[Heretic.Player]\nautoaim=35\nclassicflight=false\ncolor=3f 60 40\ncolorset=0\nfov=90\ngender=male\nmovebob=0.25\nname=Player\nneverswitchonpickup=false\nplayerclass=Fighter\nskin=base\nstillbob=0\nteam=255\nwbobfire=0\nwbobspeed=1\nwi_noautostartmap=false\n\n[Heretic.ConsoleVariables]\naddrocketexplosion=false\nallcheats=false\nam_backcolor=6c 54 40\nam_cdwallcolor=73 43 23\nam_colorset=0\nam_customcolors=true\nam_drawmapback=1\nam_efwallcolor=66 55 55\nam_emptyspacemargin=0\nam_fdwallcolor=d0 b0 85\nam_followplayer=true\nam_gridcolor=8b 5a 2b\nam_interlevelcolor=ff 00 00\nam_intralevelcolor=00 00 ff\nam_lockedcolor=00 78 00\nam_map_secrets=1\nam_markcolor=2\nam_markfont=AMMNUMx\nam_notseencolor=6c 6c 6c\nam_ovcdwallcolor=00 88 44\nam_ovefwallcolor=00 88 44\nam_overlay=0\nam_ovfdwallcolor=00 88 44\nam_ovinterlevelcolor=ff ff 00\nam_ovlockedcolor=00 88 44\nam_ovotherwallscolor=00 88 44\nam_ovportalcolor=00 40 22\nam_ovsecretsectorcolor=00 ff ff\nam_ovsecretwallcolor=00 88 44\nam_ovspecialwallcolor=ff ff ff\nam_ovtelecolor=ff ff 00\nam_ovthingcolor=e8 88 00\nam_ovthingcolor_citem=e8 88 00\nam_ovthingcolor_friend=e8 88 00\nam_ovthingcolor_item=e8 88 00\nam_ovthingcolor_monster=e8 88 00\nam_ovthingcolor_ncmonster=e8 88 00\nam_ovunexploredsecretcolor=00 ff ff\nam_ovunseencolor=00 22 6e\nam_ovwallcolor=00 ff 00\nam_ovyourcolor=fc e8 d8\nam_portalcolor=40 40 40\nam_portaloverlay=true\nam_rotate=0\nam_secretsectorcolor=ff 00 ff\nam_secretwallcolor=00 00 00\nam_showitems=false\nam_showkeys=true\nam_showkeys_always=false\nam_showmaplabel=2\nam_showmonsters=true\nam_showsecrets=true\nam_showthingsprites=0\nam_showtime=true\nam_showtotaltime=false\nam_showtriggerlines=0\nam_specialwallcolor=ff ff ff\nam_textured=false\nam_thingcolor=fc fc fc\nam_thingcolor_citem=fc fc fc\nam_thingcolor_friend=fc fc fc\nam_thingcolor_item=fc fc fc\nam_thingcolor_monster=fc fc fc\nam_thingcolor_ncmonster=fc fc fc\nam_thingrenderstyles=true\nam_tswallcolor=88 88 88\nam_unexploredsecretcolor=ff 00 ff\nam_wallcolor=54 3b 17\nam_xhaircolor=80 80 80\nam_yourcolor=fc e8 d8\nblood_fade_scalar=1\nchat_substitution=false\nchatmacro0=No\nchatmacro1=I'm ready to kick butt!\nchatmacro2=I'm OK.\nchatmacro3=I'm not looking too good!\nchatmacro4=Help!\nchatmacro5=You suck!\nchatmacro6=Next time, scumbag...\nchatmacro7=Come here!\nchatmacro8=I'll take care of it.\nchatmacro9=Yes\ncl_bbannounce=false\ncl_bloodsplats=true\ncl_bloodtype=1\ncl_custominvulmapcolor1=00 00 1a\ncl_custominvulmapcolor2=a6 a6 7a\ncl_customizeinvulmap=false\ncl_doautoaim=false\ncl_maxdecals=1024\ncl_missiledecals=true\ncl_pufftype=2\ncl_rockettrails=3\ncl_showmultikills=true\ncl_showsecretmessage=true\ncl_showsprees=true\ncl_spreaddecals=true\ncompatmode=0\ncon_alpha=0.75\ncon_centernotify=true\ncon_midtime=3\ncon_notablist=false\ncon_notifytime=3\ncon_scale=0\ncon_scaletext=0\ncrosshair=0\ncrosshaircolor=ff 00 00\ncrosshairforce=false\ncrosshairgrow=false\ncrosshairhealth=1\ncrosshairon=true\ncrosshairscale=1\ndehload=0\ndimamount=-1\ndimcolor=ff d7 00\ndisplaynametags=0\ndlg_musicvolume=1\ngl_aalines=false\ngl_bandedswlight=false\ngl_bloom=false\ngl_bloom_amount=1.399999976158142\ngl_bloom_kernel_size=7\ngl_brightfog=false\ngl_enhanced_nightvision=false\ngl_exposure_base=0.3499999940395355\ngl_exposure_min=0.3499999940395355\ngl_exposure_scale=1.2999999523162842\ngl_exposure_speed=0.05000000074505806\ngl_fogmode=1\ngl_fuzztype=6\ngl_interpolate_model_frames=true\ngl_light_models=true\ngl_lightadditivesurfaces=false\ngl_lightmode=3\ngl_menu_blur=-1\ngl_paltonemap_powtable=2\ngl_paltonemap_reverselookup=true\ngl_precache=false\ngl_scale_viewport=true\ngl_sclipfactor=1.7999999523162842\ngl_sclipthreshold=10\ngl_spriteclip=1\ngl_texture_usehires=true\ngl_tonemap=0\ngl_weaponlight=8\nhud_althud=false\nhud_althud_forceinternal=false\nhud_althudscale=0\nhud_ammo_order=0\nhud_ammo_red=25\nhud_ammo_yellow=50\nhud_armor_green=100\nhud_armor_red=25\nhud_armor_yellow=50\nhud_aspectscale=false\nhud_berserk_health=true\nhud_health_green=100\nhud_health_red=25\nhud_health_yellow=50\nhud_scale=0\nhud_showammo=2\nhud_showangles=false\nhud_showitems=false\nhud_showlag=0\nhud_showmonsters=true\nhud_showscore=false\nhud_showsecrets=true\nhud_showstats=false\nhud_showtime=0\nhud_showweapons=true\nhud_timecolor=5\nhudcolor_ltim=8\nhudcolor_statnames=6\nhudcolor_stats=3\nhudcolor_time=6\nhudcolor_titl=10\nhudcolor_ttim=5\nhudcolor_xyco=3\nlookspring=true\nm_quickexit=false\nmenu_screenratios=-1\nmsg=0\nmsg0color=9\nmsg1color=5\nmsg2color=2\nmsg3color=3\nmsg4color=3\nmsgmidcolor=9\nmsgmidcolor2=10\nnametagcolor=5\nnocheats=false\nos_isanyof=true\npaletteflash=0\npickup_fade_scalar=1\nr_deathcamera=true\nr_drawfuzz=1\nr_highlight_portals=false\nr_maxparticles=4000\nr_portal_recursions=4\nr_rail_smartspiral=false\nr_rail_spiralsparsity=1\nr_rail_trailsparsity=1\nr_shadercolormaps=true\nr_skymode=2\nr_vanillatrans=0\nsb_cooperative_enable=true\nsb_cooperative_headingcolor=6\nsb_cooperative_otherplayercolor=2\nsb_cooperative_yourplayercolor=3\nsb_deathmatch_enable=true\nsb_deathmatch_headingcolor=6\nsb_deathmatch_otherplayercolor=2\nsb_deathmatch_yourplayercolor=3\nsb_teamdeathmatch_enable=true\nsb_teamdeathmatch_headingcolor=6\nscreenblocks=11\nsetslotstrict=true\nshow_obituaries=true\nsnd_menuvolume=0.6000000238418579\nsnd_pitched=true\nst_oldouch=false\nst_scale=-1\ntranssouls=0.75\nuiscale=0\nunderwater_fade_scalar=1\nvid_cursor=-\nvid_nopalsubstitutions=false\nwi_percents=false\nwi_showtotaltime=true\nwipetype=1\n\n[Heretic.LocalServerInfo]\ncompatflags=0\ncompatflags2=0\nforcewater=false\nmaxviewpitch=90\nsv_alwaystally=0\nsv_corpsequeuesize=64\nsv_disableautohealth=false\nsv_dropstyle=0\nsv_portal_recursions=4\nsv_smartaim=0\n\n[Heretic.ConfigOnlyVariables]\n\n[Heretic.UnknownConsoleVariables]\n\n[Heretic.ConsoleAliases]\n\n[Heretic.Bindings]\n1=slot 1\n2=slot 2\n3=slot 3\n4=slot 4\n5=slot 5\n6=slot 6\n7=slot 7\n8=slot 8\n9=slot 9\n0=slot 0\nBackspace=use ArtiTomeOfPower\nT=messagemode\n`=toggleconsole\nJoy1=invuse\nJoy2=+use\nJoy3=+jump\nJoy4=invnext\nJoy5=+speed\nJoy6=+attack\nJoy7=menu_main\nJoy8=togglemap\nJoy9=toggle cl_run\nJoy10=centerview\nJoy11=weapprev\nJoy12=weapnext\nJoy14=showpop 3\nJoy15=showpop 2\nJoy16=showpop 1\nPOV1Up=+forward\nPOV1Right=+moveright\nPOV1Down=+back\nPOV1Left=+moveleft\n\n[Heretic.DoubleBindings]\n\n[Heretic.AutomapBindings]\n0=am_gobig\n-=+am_zoomout\nEquals=+am_zoomin\nP=am_toggletexture\nF=am_togglefollow\nG=am_togglegrid\nC=am_clearmarks\nM=am_setmark\nKP-=+am_zoomout\nKP+=+am_zoomin\nUpArrow=+am_panup\nLeftArrow=+am_panleft\nRightArrow=+am_panright\nDownArrow=+am_pandown\nMWheelUp=am_zoom 1.2\nMWheelDown=am_zoom -1.2\n\n[Doom.SteveFlashlightKeySection.Bindings]\nF=toggleflashlight_bind\n\n[Doom.SteveFlashlightKeySection.DoubleBindings]\n\n[Doom.options.Bindings]\nY=rdrone\nZ=tflare\nT=pturret\nMouse3=isight\nM=MusicPlay\nB=MuteTracker\nP=rain\nK=death\n\n[Doom.options.DoubleBindings]\n\n[Doom.BrutalDoomActions.Bindings]\nQ=kickem\nR=reload\nF=flashlightswitch\nG=grenadetoss\n\n[Doom.BrutalDoomActions.DoubleBindings]\n\n[Doom.BrutalDoomInteractions.Bindings]\nH=brutaltaunt\nV=wave1\nN=wave2\nJ=advtaunt\nK=oneliner\nX=dual\nO=selectammodrop\n\n[Doom.BrutalDoomInteractions.DoubleBindings]\n\n[Doom.BrutalDoomAdvMoves.Bindings]\n\n[Doom.BrutalDoomAdvMoves.DoubleBindings]\n\n[Doom.CODBO_Active.Bindings]\nB=knife\nKP8=grenade\nJoy1=invuse\n\n[Doom.CODBO_Active.DoubleBindings]\n\n[Doom.CODBO_Advanced.Bindings]\nM=Scopeselection\nP=WeaponLookselection\n\n[Doom.CODBO_Advanced.DoubleBindings]\n\n[Doom.CODBO_EQ.Bindings]\nKP1=use Medicalkit_COD\nKP2=use TacticalInsertion\nKP3=use BeaconHand\nKP4=use ClaymoreHand\nKP5=use C4Hand\n\n[Doom.CODBO_EQ.DoubleBindings]\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/lzdoom/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"lzdoom\"\nPKG_VERSION=\"a9baed86e5226ff4511fa54ca50af5f1e283eb6e\" # version 3.88b\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/drfrag666/gzdoom\"\nPKG_GIT_CLONE_BRANCH=\"g3.3mgw\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 lzdoom:host\"\nPKG_SHORTDESC=\"LZDoom\"\nPKG_LONGDESC=\"ZDoom is a family of enhanced ports of the Doom engine for running on modern operating systems. It runs on Windows, Linux, and OS X, and adds new features not found in the games as originally published by id Software.\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"cmake-make\"\nPKG_DEPENDS_HOST=\"toolchain:host SDL2:host\"\n\npre_build_host() {\nHOST_CMAKE_OPTS=\"\"\n}\n\nmake_host() {\n  cmake . -DNO_GTK=ON\n  make\n}\n\nmakeinstall_host() {\n: #no\n}\n\npre_configure_target() {\nPKG_CMAKE_OPTS_TARGET=\" -DNO_GTK=ON \\\n                        -DFORCE_CROSSCOMPILE=ON \\\n                        -DIMPORT_EXECUTABLES=${PKG_BUILD}/.${HOST_NAME}/ImportExecutables.cmake\n                        -DCMAKE_BUILD_TYPE=Release\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cd ${PKG_BUILD}\n  cp .${TARGET_NAME}/lzdoom ${INSTALL}/usr/bin\n\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/lzdoom\n  cp ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/lzdoom\n  cp .${TARGET_NAME}/*.pk3 ${INSTALL}/usr/config/emuelec/configs/lzdoom\n  cp -r .${TARGET_NAME}/soundfonts ${INSTALL}/usr/config/emuelec/configs/lzdoom\n\n  mkdir -p ${INSTALL}/usr/bin\n  cp ${PKG_DIR}/scripts/*  ${INSTALL}/usr/bin\n}\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/lzdoom/scripts/lzdoom.sh",
    "content": "#!/usr/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n. /etc/profile\n\nRUN_DIR=\"/storage/roms/ports/doom\"\nCONFIG_DIR=\"/emuelec/configs/lzdoom\"\nHOMECONFIG=\"/storage/.config/lzdoom\"\n\nif [ /usr/config/emuelec/configs/lzdoom/lzdoom.pk3 -nt ${CONFIG_DIR}/lzdoom.pk3 ]; then\n    cp /usr/config/emuelec/configs/lzdoom/*.pk3 ${CONFIG_DIR}\nfi\n\nif [ ! -L \"${HOMECONFIG}\" ]; then\n[[ -d \"${HOMECONFIG}\" ]] && rm -rf \"${HOMECONFIG}\"\nln -sf \"${CONFIG_DIR}\" \"${HOMECONFIG}\"\nfi\n\nparams=\" -savedir ${CONFIG_DIR}\"\n\n# EXT can be wad, WAD, iwad, IWAD, pwad, PWAD or doom\nEXT=${1#*.}\n\n# If its not a simple wad (extension .choco) read the file and parse the data\nif [ \"${EXT}\" == \"doom\" ]; then\n    while IFS== read -r key value; do\n        if [ \"${key}\" == \"SUBDIR\" ]; then\n            RUN_DIR=\"/storage/roms/ports/doom/${value}\"\n        fi\n\n        if [ \"${key}\" == \"PARAMS\" ]; then\n            params+=\" ${value}\"\n        fi\n    done < <(<\"${1}\" tr -d '\\r'; echo;)\nelse\n    params+=\" -iwad ${1}\"\nfi\n\ncd \"${RUN_DIR}\"\n# Do not overwrite log messages already written by emuelecRunEmu.sh\n/usr/bin/lzdoom ${params} >>/emuelec/logs/emuelec.log 2>&1\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/openjazz/package.mk",
    "content": "PKG_NAME=\"openjazz\"\nPKG_VERSION=\"a34e79dba5756000ad3796efae61a57be4a46496\"\nPKG_SHA256=\"fe76aca99a319ee70c1eaeec17a935880c7a73f02e42ac1917e581062ea38e67\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL-2.0-or-later\"\nPKG_SITE=\"http://www.alister.eu/jazz/oj/\"\nPKG_URL=\"https://github.com/sana2dang/openjazz/archive/${PKG_VERSION}.tar.gz\"\nPKG_SHORTDESC=\"OpenJazz for OGA\"\nPKG_LONGDESC=\"a free, open-source version of the classic Jazz Jackrabbit™ games.\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_TOOLCHAIN=\"auto\"\n\npre_configure_target() {\n  sed -i \"s|sdl2-config|${SYSROOT_PREFIX}/usr/bin/sdl2-config|g\" Makefile\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp ${PKG_BUILD}/OpenJazz ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/opentyrian/config/opentyrian.cfg",
    "content": "section 'joystick' 'odroidgo2_joypad_v11'\n\titem 'analog' 'yes'\n\titem 'sensitivity' '5'\n\titem 'threshold' '5'\n\tlist 'up' 'AX 2-'\n\tlist 'up' 'BTN 9'\n\tlist 'right' 'AX 1+'\n\tlist 'right' 'BTN 12'\n\tlist 'down' 'AX 2+'\n\tlist 'down' 'BTN 10'\n\tlist 'left' 'AX 1-'\n\tlist 'left' 'BTN 11'\n\tlist 'fire' 'BTN 1'\n\tlist 'change fire' 'BTN 2'\n\tlist 'left sidekick' 'BTN 3'\n\tlist 'right sidekick' 'BTN 4'\n\tlist 'menu' 'BTN 5'\n\tlist 'pause' 'BTN 6'\n\nsection 'joystick' 'odroidgo2_joypad'\n\titem 'analog' 'yes'\n\titem 'sensitivity' '5'\n\titem 'threshold' '5'\n\tlist 'up' 'AX 2-'\n\tlist 'up' 'BTN 9'\n\tlist 'right' 'AX 1+'\n\tlist 'right' 'BTN 12'\n\tlist 'down' 'AX 2+'\n\tlist 'down' 'BTN 10'\n\tlist 'left' 'AX 1-'\n\tlist 'left' 'BTN 11'\n\tlist 'fire' 'BTN 1'\n\tlist 'change fire' 'BTN 2'\n\tlist 'left sidekick' 'BTN 3'\n\tlist 'right sidekick' 'BTN 4'\n\tlist 'menu' 'BTN 5'\n\tlist 'pause' 'BTN 6'\n\nsection 'joystick' 'gameforce_gamepad'\n\titem 'analog' 'yes'\n\titem 'sensitivity' '5'\n\titem 'threshold' '5'\n\tlist 'up' 'BTN 11'\n\tlist 'up' 'AX 1-'\n\tlist 'right' 'AX 2+'\n\tlist 'right' 'BTN 14'\n\tlist 'down' 'BTN 12'\n\tlist 'down' 'AX 1+'\n\tlist 'left' 'AX 2-'\n\tlist 'left' 'BTN 13'\n\tlist 'fire' 'BTN 1'\n\tlist 'change fire' 'BTN 2'\n\tlist 'left sidekick' 'BTN 5'\n\tlist 'right sidekick' 'BTN 6'\n\tlist 'menu' 'BTN 10'\n\tlist 'pause' 'BTN 9'\n\nsection 'video'\n\titem 'fullscreen' '0'\n\titem 'scaler' 'Scale2x'\n\titem 'scaling_mode' 'Fit 4:3'\n\nsection 'keyboard'\n\titem 'up' 'Up'\n\titem 'down' 'Down'\n\titem 'left' 'Left'\n\titem 'right' 'Right'\n\titem 'fire' 'Space'\n\titem 'change fire' 'Return'\n\titem 'left sidekick' 'Left Ctrl'\n\titem 'right sidekick' 'Left Alt'\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/opentyrian/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"opentyrian\"\nPKG_VERSION=\"9750f8cfab738d0ea08ccb8d8752b95f5c09df07\"\nPKG_SHA256=\"f9cd08210df3990c0bc3ac9241694bd6c58e0ddec4716b6e74a7cc655637e5a0\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"https://github.com/opentyrian/opentyrian\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_net\"\nPKG_LONGDESC=\"An open-source port of the DOS shoot-em-up Tyrian.\"\nPKG_TOOLCHAIN=\"make\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp opentyrian ${INSTALL}/usr/bin\n  \n  mkdir -p ${INSTALL}/usr/config/opentyrian\n  cp -r ${PKG_DIR}/config/* ${INSTALL}/usr/config/opentyrian\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"emuelec-ports\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain Jinja2:host pyyaml pyyaml:host\"\nPKG_SECTION=\"emuelec\"\nPKG_SHORTDESC=\"EmuELEC Ports Meta Package\"\nPKG_TOOLCHAIN=\"manual\"\n\n\nPKG_DEPENDS_TARGET+=\" commander-genius \\\n                devilutionX \\\n                sdlpop \\\n                VVVVVV \\\n                opentyrian \\\n                bermuda \\\n                hodesdl \\\n                hydracastlelabyrinth \\\n                eduke \\\n                rigelengine \\\n                sonic2013 \\\n                soniccd \\\n                supertux \\\n                supertuxkart \\\n                chocolate-doom \\\n                lzdoom \\\n                gzdoom \\\n                supermariowar \\\n                bstone \\\n                hurrican \\\n                cdogs-sdl \\\n                abuse \\\n                fheroes2 \\\n                augustus \\\n                xash3d \\\n                sonicmania \\\n                shovelknight \\\n                tmntsr \\\n                falloutce1 \\\n                falloutce2 \\\n                ccleste \\\n                celeste\"\n\namlogicports=\"\"\nhhports=\" openjazz\"\n\nif [ \"${DEVICE}\" == \"Amlogic\"* ]; then\n\tPKG_DEPENDS_TARGET+=\"${amlogicports}\"\nfi\n\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\tPKG_DEPENDS_TARGET+=\"${hhports}\"\nfi\n\n\nmake_target() {\nmkdir -p ${PKG_BUILD}/scripts\npython3 port_builder.py ports.yaml scripts\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin/ports\ncp -rf ${PKG_BUILD}/scripts/* ${INSTALL}/usr/bin/ports\n\n# Remove duplicate newlines just to be tidy\nfor file in \"${INSTALL}/usr/bin/ports/*.sh\"; do\nsed  -i '$!N; /^\\(.*\\)\\n\\1$/!P; D' ${file}\ndone\n\n# Remove empty lines from gamelist.xml\nsed -i '/^$/d' ${INSTALL}/usr/bin/ports/gamelist.xml\n\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/rigelengine/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Nikolai Wuttke (https://github.com/lethal-guitar)\n\nPKG_NAME=\"rigelengine\"\nPKG_VERSION=\"f05996f9b3ad3b3ea5bb818e49e7977636746343\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/lethal-guitar/RigelEngine\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_mixer boost\"\nPKG_LONGDESC=\"A modern re-implementation of the classic DOS game Duke Nukem II\"\nPKG_CMAKE_OPTS_TARGET=\"-DCMAKE_BUILD_TYPE=Release -DUSE_GL_ES=ON -DWARNINGS_AS_ERRORS=OFF\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"cmake\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp ./src/RigelEngine ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/sdlpop/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"sdlpop\"\nPKG_VERSION=\"bb0c6f3da464106b5fc931925fcf338f6c4939b9\"\nPKG_SHA256=\"e2d7f80397a3f8b730c4255416c43107cd34b59541dd67610597045fbb7d2b6c\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL3\"\nPKG_SITE=\"https://github.com/NagyD/SDLPoP\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_image\"\nPKG_SHORTDESC=\"Prince of Persia SDL\"\nPKG_LONGDESC=\"An open-source port of Prince of Persia, based on the disassembly of the DOS version.\"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\nsed -i \"s/start_fullscreen = false/start_fullscreen = true/\" \"${PKG_BUILD}/SDLPoP.ini\"\nsed -i \"s/enable_info_screen = true;/enable_info_screen = false;/\" \"${PKG_BUILD}/SDLPoP.ini\"\n}\n\nmake_target() {\n\tcd ${PKG_BUILD}/src/\n\tmkdir -p build\n\tcd build/\n\tcmake ..\n\tmake CC=cc\n}\n\nmakeinstall_target() {\n\tmkdir -p ${INSTALL}/usr/config/emuelec/configs/SDLPoP\n\tmkdir -p ${INSTALL}/usr/bin\n\tcp -r ${PKG_BUILD}/* ${INSTALL}/usr/config/emuelec/configs/SDLPoP/\n\tmv \"${INSTALL}/usr/config/emuelec/configs/SDLPoP/prince\" \"${INSTALL}/usr/bin/\"\n\trm -rf ${INSTALL}/usr/config/emuelec/configs/SDLPoP/src\n\trm -rf ${INSTALL}/usr/config/emuelec/configs/SDLPoP/.gitignore\n\trm -rf ${INSTALL}/usr/config/emuelec/configs/SDLPoP/.editorconfig\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/sdlpop/patches/001-addsdlgamecontrollerdb.patch",
    "content": "--- a/src/seg009.c\n+++ b/src/seg009.c\n@@ -801,6 +801,13 @@\n \t\t\tif (sdl_controller_ == NULL) {\n \t\t\t\tis_joyst_mode = 0;\n \t\t\t} else {\n+\t\t\t\tSDL_GameControllerAddMappingsFromFile(\"gamecontrollerdb.txt\"); //char* output;\n+\t\t\t\t//strcpy(output, \"/storage/.config/SDL-GameControllerDB/\");\n+\t\t\t\t//strcpy(output, \"gamecontrollerdb.txt\");\n+\t\t\t\t//if (SDL_GameControllerAddMappingsFromFile(output) < 0)\n+\t\t\t\t//{\n+\t\t\t\t//\t\t\t\tprintf(\"gamecontrollerdb.txt not found!\\n\");\n+\t\t\t\t//}\n \t\t\t\tis_joyst_mode = 1;\n \t\t\t}\n \t\t}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/shovelknight/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"shovelknight\"\nPKG_VERSION=\"1.0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\"Script file to run Shovel Knight\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp shovelknight.sh ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/shovelknight/sources/shovelknight.sh",
    "content": "#!/bin/bash\n\ncd /storage/roms/ports/shovelknight/64\n\nexport LIBGL_NOBANNER=1\nexport LIBGL_ES=2\nexport LIBGL_GL=21\nexport LIBGL_FB=4\nexport BOX64_LOG=0\nexport BOX64_LD_LIBRARY_PATH=/emuelec/bin/box64/lib/\nexport BOX64_DYNAREC=1\nexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/emuelec/bin/box64/lib/\nfbfix $( emuelec-utils getmainfb )\n/emuelec/bin/box64/box64 ShovelKnight\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/sonic2013/config/settings.ini",
    "content": "[Dev]\nDataFile=Data.rsdk\n\n[Window]\n; Determines if the window will be fullscreen or not\nFullScreen=true\n; Determines if the window will be borderless or not\nBorderless=false\n; Determines if VSync will be active or not\nVSync=true\n; How big the window will be\nWindowScale=2\n; How wide the base screen will be in pixels\nScreenWidth=424\n; Determines the target FPS\nRefreshRate=60\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/sonic2013/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"sonic2013\"\nPKG_VERSION=\"bff61dff624ee986ace719583b00baab22a40d52\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/Rubberduckycooly/Sonic-1-2-2013-Decompilation\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_SHORTDESC=\"Sonic 1/2 (2013) Decompilation\"\nPKG_TOOLCHAIN=\"make\"\nPKG_EE_UPDATE=\"no\"\n\npre_configure_target() {\n# Add missing -lstdc++fs\nsed -i \"s|pthread|pthread -lstdc++fs|\" ${PKG_BUILD}/Makefile\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp bin/RSDKv4 ${INSTALL}/usr/bin/sonic2013\n\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/sonic\ncp ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/sonic\n} \n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/soniccd/config/settings.ini",
    "content": "\n[Dev]\n; Enable this flag to activate dev menu via the ESC key\nDevMenu=true\n; Enable this flag to activate features used for debugging the engine (may result in slightly slower game speed)\nEngineDebugMode=false\n; Sets the starting category ID\nStartingCategory=0\n; Sets the starting scene ID\nStartingScene=0\n; Determines how fast the game will be when fastforwarding is active\nFastForwardSpeed=8\n; Determines if the game will try to use the steam directory for the game if it can locate it (windows only)\nUseSteamDir=true\n; Determines if applicable rendering modes (such as 3D floor from special stages) will render in \"High Quality\" mode or standard mode\nUseHQModes=true\n; Determines what RSDK file will be loaded\nDataFile=Data.rsdk\n\n[Game]\n; Sets the game language (0 = EN, 1 = FR, 2 = IT, 3 = DE, 4 = ES, 5 = JP)\nLanguage=0\n; Sets the game's spindash style (-1 = let save file decide, 0 = S2, 1 = CD)\nOriginalControls=-1\n; Determines if the game should hide the touch controls UI\nDisableTouchControls=false\n\n[Window]\n; Determines if the window will be fullscreen or not\nFullScreen=true\n; Determines if the window will be borderless or not\nBorderless=false\n; Determines if VSync will be active or not\nVSync=true\n; Determines what scaling is used. 0 is nearest neighbour, 1 is integer scale, 2 is sharp bilinear, and 3 is regular bilinear.\n; Note: Not all scaling options work correctly on certain platforms, as they don't support bilinear filtering.\nScalingMode=2\n; How big the window will be\nWindowScale=2\n; How wide the base screen will be in pixels\nScreenWidth=424\n; Determines the target FPS\nRefreshRate=60\n; Determines the dim timer in seconds, set to -1 to disable dimming\nDimLimit=300\n\n[Audio]\nBGMVolume=1.000000\nSFXVolume=1.000000\n\n[Keyboard 1]\n; Keyboard Mappings for P1 (Based on: https://wiki.libsdl.org/SDL_Scancode)\nUp=82\nDown=81\nLeft=80\nRight=79\nA=29\nB=27\nC=6\nStart=40\n\n[Controller 1]\n; Controller Mappings for P1 (Based on: https://wiki.libsdl.org/SDL_GameControllerButton)\n; Extra buttons can be mapped with the following IDs:\n; CONTROLLER_BUTTON_ZL             = 16\n; CONTROLLER_BUTTON_ZR             = 17\n; CONTROLLER_BUTTON_LSTICK_UP      = 18\n; CONTROLLER_BUTTON_LSTICK_DOWN    = 19\n; CONTROLLER_BUTTON_LSTICK_LEFT    = 20\n; CONTROLLER_BUTTON_LSTICK_RIGHT   = 21\n; CONTROLLER_BUTTON_RSTICK_UP      = 22\n; CONTROLLER_BUTTON_RSTICK_DOWN    = 23\n; CONTROLLER_BUTTON_RSTICK_LEFT    = 24\n; CONTROLLER_BUTTON_RSTICK_RIGHT   = 25\nUp=11\nDown=12\nLeft=13\nRight=14\nA=0\nB=1\nC=2\nStart=6\n; Deadzones, 0.0-1.0\nLStickDeadzone=0.300000\nRStickDeadzone=0.300000\nLTriggerDeadzone=0.300000\nRTriggerDeadzone=0.300000\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/soniccd/libtheora/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"libtheora\"\nPKG_VERSION=\"1.1.1\"\nPKG_SHA256=\"\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"BSD-3-Clause\"\nPKG_SITE=\"http://downloads.xiph.org/releases/theora\"\nPKG_URL=\"${PKG_SITE}/libtheora-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libogg libvorbis\"\nPKG_SHORTDESC=\"Theora is a free and open video compression format from the Xiph.org Foundation.\"\nPKG_TOOLCHAIN=\"auto\"\n\npre_configure_target() {\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-oggtest \\\n\t--disable-vorbistest \\\n\t--disable-sdltest \\\n\t--disable-examples \\\n\t--disable-spec\"\n}\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/soniccd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"soniccd\"\nPKG_VERSION=\"4650327a4959321c8d28b89693abbda41fa69e6e\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/Rubberduckycooly/Sonic-CD-11-Decompilation\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 libtheora\"\nPKG_SHORTDESC=\"A Full Decompilation of Sonic CD 2011\"\nPKG_TOOLCHAIN=\"cmake\"\nPKG_EE_UPDATE=\"no\"\n\npre_configure_target() {\nPKG_CMAKE_OPTS_TARGET=\"-DRETRO_SDL_VERSION=2 -DRETRO_USE_HW_RENDER=OFF\"\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp  ${PKG_BUILD}/.${TARGET_NAME}/RSDKv3 ${INSTALL}/usr/bin/soniccd\n\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/sonic\ncp ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/sonic\n} \n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/sonicmania/config/Settings.ini",
    "content": "; Retro Engine Config File\n\n[Game]\nlanguage=0\ndevMenu=y\nusername=Emuelec\n\n[Video]\n; NB: Fullscreen Resolution can be explicitly set with values fsWidth and fsHeight\n; If not listed, fullscreen will just use the desktop resolution\nwindowed=n\nborder=n\nexclusiveFS=y\nvsync=y\ntripleBuffering=n\nwinWidth=424\nwinHeight=240\nrefreshRate=60\nshaderSupport=y\nscreenShader=0\n; Maximum width the screen will be allowed to be. A value of 0 will disable the maximum width\nmaxPixWidth=424\n\n[Audio]\nstreamsEnabled=y\nstreamVolume=1.000000\nsfxVolume=1.000000\n\n[Keyboard Map 1]\nup=0x26\ndown=0x28\nleft=0x25\nright=0x27\nbuttonA=0x41\nbuttonB=0x53\nbuttonC=0x44\nbuttonX=0x51\nbuttonY=0x57\nbuttonZ=0x45\nstart=0xd\nselect=0x9\n\n[Keyboard Map 2]\nup=0x68\ndown=0x65\nleft=0x64\nright=0x66\nbuttonA=0x4a\nbuttonB=0x4a\nbuttonC=0x0\nbuttonX=0x55\nbuttonY=0x49\nbuttonZ=0x0\nstart=0xdb\nselect=0xdd\n\n[Keyboard Map 3]\nup=0x0\ndown=0x0\nleft=0x0\nright=0x0\nbuttonA=0x0\nbuttonB=0x0\nbuttonC=0x0\nbuttonX=0x0\nbuttonY=0x0\nbuttonZ=0x0\nstart=0x0\nselect=0x0\n\n[Keyboard Map 4]\nup=0x0\ndown=0x0\nleft=0x0\nright=0x0\nbuttonA=0x0\nbuttonB=0x0\nbuttonC=0x0\nbuttonX=0x0\nbuttonY=0x0\nbuttonZ=0x0\nstart=0x0\nselect=0x0\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/sonicmania/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"sonicmania\"\nPKG_VERSION=\"f2120842a15a5721d88907bf98edee670c10f79d\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/Rubberduckycooly/Sonic-Mania-Decompilation\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 portaudio\"\nPKG_SHORTDESC=\"Sonic Mania Decompilation\"\nPKG_TOOLCHAIN=\"cmake\"\n\npre_configure_target() {\nPKG_CMAKE_OPTS_TARGET=\"-DRETRO_SUBSYSTEM=SDL2\"\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin/sonic_mania\necho \"${PKG_BUILD}\"\ncp ${PKG_BUILD}/.${TARGET_NAME}/dependencies/RSDKv5/RSDKv5U ${INSTALL}/usr/bin/sonicmania\ncp ${PKG_BUILD}/.${TARGET_NAME}/dependencies/RSDKv5/libGame.so ${INSTALL}/usr/bin/sonic_mania/Game.so\n\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/sonicmania\ncp ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/sonicmania\n} \n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/sources/gamelist.xml.j2",
    "content": "<?xml version=\"1.0\"?>\n<gameList>\n{% for game, data in games %}\n  <game>\n    <path>./{{ game }}.sh</path>\n    <name>{{ game }}</name>\n    <desc>{{ data.description }}</desc>\n    <image>./images/screenshots/{{ game | lower | replace(' ', '_') | replace('.', '_') }}-screenshot.jpg</image>\n    <thumbnail>./images/icons/{{ game | lower | replace(' ', '_') | replace('.', '_') }}-icon.png</thumbnail>\n    <marquee>./images/logos/{{ game | lower | replace(' ', '_') | replace('.', '_') }}-logo.png</marquee>\n    <video>./videos/{{ game | lower | replace(' ', '_') | replace('.', '_') }}.mp4</video>\n    <rating>{{ data.rating }}</rating>\n    <releasedate>{{ data.release_date }}</releasedate>\n    <developer>{{ data.developer }}</developer>\n    <publisher>{{ data.publisher }}</publisher>\n  </game>\n{% endfor %}\n</gameList>\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/sources/port.sh.j2",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n{% if data.init_port %}\nPORT=\"{{ data.port_exe }}\"\n# init_port binary audio(alsa. pulseaudio, default)\ninit_port \"${PORT}\" \"{{ data.audio }}\" \"{{ data.killsignal }}\" \"{{ data.vkb }}\"\n{% endif %}\n\n{% for command in data.commands %}\n{{ command }}\n{% endfor %}\nret_error=$?\n{% for command in data.commands_end %}\n{{ command }}\n{% endfor %}\n\n{% if data.check_bios %}\n[[ \"$ret_error\" != 0 ]] && ee_check_bios \"{{ data.check_bios }}\"\n{% endif %}\n\n{% if data.init_port %}\nend_port\n{% endif %}\n\nexit $ret_error\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/sources/port_builder.py",
    "content": "#!/usr/bin/env python\n\nimport jinja2\nimport yaml\n\nfrom os import environ, getcwd, path\nfrom sys import argv\n\ndef meets_requirements(data):\n    if not \"requires\" in data:\n        # No specific requirements\n        return True\n\n    for supported_setup in data[\"requires\"]:\n        acceptable = True\n        for key, value in supported_setup.items():\n            if environ.get(key) != value:\n                acceptable = False\n                break\n\n        if acceptable:\n            return True\n\n    return False\n\n\nyaml_file = argv[1]\ntry:\n    output_location = argv[2]\nexcept IndexError:\n    output_location = getcwd() \n\ntemplateLoader = jinja2.FileSystemLoader(searchpath=\".\")\ntemplateEnv = jinja2.Environment(loader=templateLoader)\nport_template = templateEnv.get_template(\"port.sh.j2\")\ngamelist_template = templateEnv.get_template(\"gamelist.xml.j2\")\n\nwith open(yaml_file) as ports_file:\n    ports = yaml.load(ports_file, Loader=yaml.SafeLoader)\n\nsupported_ports = [port for port in ports.items() if meets_requirements(port[1])]\n\nfor name, data in supported_ports:\n    # Create port script\n    with open(path.join(output_location, \"{}.sh\".format(name)), \"w\") as port_file:\n        port_file.write(port_template.render(name=name, data=data))\n        ports_file.close()\n\n# Create gamelist.xml\nwith open(path.join(output_location, \"gamelist.xml\"), \"w\") as gamelist_file:\n    gamelist_file.write(gamelist_template.render(games=supported_ports))\n    gamelist_file.close()\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/sources/ports.yaml",
    "content": "2048:\n  description: 2048 is a single-player sliding block puzzle game designed by Italian web developer Gabriele Cirulli. The game's objective is to slide numbered tiles on a grid to combine them to create a tile with the number 2048. However, one can continue to play the game after reaching the goal, creating tiles with larger numbers.\n  rating: 1.0\n  release_date: 20100111T000000\n  developer: Gabriele Cirulli - Higor Euripedes\n  publisher: Public Domain\n\n  commands:\n    - /usr/bin/emuelecRunEmu.sh \"\" -Pports \"${2}\" -C2048 \"-SC${0}\"\n\nAbuse:\n  description: Abuse is a dark 2D side-scrolling platform game developed by Crack dot Com in 1995. It features beautiful lighting, realistic animation and nasty alien-like creatures to destroy. It is now maintained by Sam Hocevar in an attempt to prevent it from vanishing from the Internet.\n  rating: 1.0\n  release_date: 1995\n  developer: Crack dot Com\n  publisher: Crack dot Com\n\n  init_port: true\n  port_exe: \"abuse\"\n  vkb: \"abuse\"\n  audio: \"alsa\"\n  commands:\n    - abuse >> $EE_LOG 2>&1\n\nBermuda Syndrome:\n  description: Bermuda Syndrome is a PC game developed by Century Interactive and published by BMG Interactive in 1995. The game is similar in gameplay and appearance to the classic Flashback from 1992. The player controls the main character from a third person sidescrolling perspective.\n  rating: 1.0\n  release_date: 19950129T000000\n  developer: Century Interactive\n  publisher: BMG Interactive\n\n  init_port: true\n  port_exe: \"bs\"\n  audio: \"alsa\"\n  commands:\n    - cd /storage/roms/ports/bermuda/\n    - ${PORT} --datapath=/storage/roms/ports/bermuda/ --fullscreen --widescreen=4:3 >> $EE_LOG 2>&1\n\nBlake Stone:\n  description: \"Blake Stone: Aliens of Gold is a first-person shooter for DOS created by JAM Productions and published by Apogee Software in 1993.\"\n  rating: 1.0\n  release_date: 1993\n  developer: Apogee\n  publisher: Apogee\n\n  init_port: true\n  port_exe: \"bstone\"\n  audio: \"alsa\"\n  commands:\n    - bstone.sh >> $EE_LOG 2>&1\n\nBlake Stone Planet Strike:\n  description: \"Blake Stone: Planet Strike is a first-person shooter video game, the sequel to Blake Stone: Aliens of Gold, made by JAM Productions and released for DOS on October 28, 1994, by Apogee Software.\"\n  rating: 1.0\n  release_date: 1994\n  developer: Apogee\n  publisher: Apogee\n\n  init_port: true\n  port_exe: \"bstone\"\n  audio: \"alsa\"\n  commands:\n    - bstone.sh ps >> $EE_LOG 2>&1\n\nCannonball:\n  description: \"This is an arcade-perfect port of SEGA's seminal arcade racer. Features include: Pixel-perfect 240p video. 60 FPS gameplay. Continuous mode (play all 15 tracks in one go).\"\n  rating: 0.8\n  release_date: 20140101T000000\n  developer: Chris White, Yu Suzuki\n  publisher: non-commercial\n\n  check_bios: Cannonball\n  commands:\n    - /usr/bin/emuelecRunEmu.sh \"/storage/roms/ports/cannonball/\" -Pports \"${2}\" -Ccannonball \"-SC${0}\"\n\nCave Story:\n  description: A platform-adventure video game released in 2004 for Windows PCs. It was developed over five years by Japanese developer Daisuke \"Pixel\" Amaya in his free time. Cave Story features 2D platform mechanics.\n  rating: 0.9\n  release_date: 20041220T000000\n  developer: Studio Pixel\n  publisher: GPLv3\n\n  check_bios: CaveStory\n  commands:\n    - /usr/bin/emuelecRunEmu.sh \"/storage/roms/ports/CaveStory/Doukutsu.exe\" -Pports \"${2}\" -Cnxengine \"-SC${0}\"\n\nCdogs-sdl:\n  description: C-Dogs SDL is a classic overhead run-and-gun game, supporting up to 4 players in co-op and deathmatch modes. Customize your player, choose from many weapons, and blast, slide and slash your way through over 100 user-created campaigns. Have fun!\n  rating: 1.0\n  release_date: 2002\n  developer: Cxong\n  publisher: Cxong\n\n  init_port: true\n  port_exe: \"cdogs-sdl\"\n  audio: \"alsa\"\n  commands:\n    - cdogs-sdl.sh >> $EE_LOG 2>&1\n\nCeleste:\n  description: Help Madeline survive her inner demons on her journey to the top of Celeste Mountain, in this super-tight, hand-crafted platformer from the creators of multiplayer classic TowerFall (itch.io version).\n  rating: 1.0\n  release_date: 2018\n  developer: Extremely OK Games, Ltd., Maddy Makes Games\n  publisher: Maddy Makes Games Inc.\n\n  init_port: true\n  port_exe: \"mono\"\n  audio: \"alsa\"\n  commands:\n    - celeste.sh >> $EE_LOG 2>&1\n\nCeleste Classic:\n  description: Celeste Classic.\n  rating: 1.0\n  release_date: 2016\n  developer: Extremely OK Games, Ltd., Maddy Makes Games\n  publisher: Maddy Makes Games Inc.\n\n  init_port: true\n  port_exe: \"ccleste\"\n  audio: \"alsa\"\n  commands:\n    - cd /emuelec/configs/ccleste\n    - ${PORT} >> $EE_LOG 2>&1\n\nCommander Keen:\n  description: Commander Genius is a software piece that interprets the Commander Keen Invasion of the Vorticons and Galaxy series. As fans and developers we try to implement new features, improve the gameplay and give players an experience that feels like playing the original game but a bit more refreshing.\n  rating: 1.0\n  release_date: 20170326T000000\n  developer: Commander Genius team\n  publisher: non-commercial\n\n  init_port: true\n  port_exe: \"CGeniusExe\"\n  audio: \"alsa\"\n  commands:\n    - '[[ ! -L \"/storage/.CommanderGenius\" ]] && ln -sf /emuelec/configs/CommanderGenius /storage/.CommanderGenius'\n    - cd /storage/roms/ports/cgenius\n    - /usr/bin/${PORT} >> $EE_LOG 2>&1\n\nDiablo:\n  description: Diablo build for modern operating systems - Diablo is an action role-playing hack and slash video game developed by Blizzard North and released by Blizzard Entertainment in early January 1997.\n  rating: 1.0\n  release_date: 19970101T000000\n  developer: DevilutionX - Blizzard\n  publisher: Public Domain\n\n  check_bios: Diablo\n  init_port: true\n  port_exe: \"devilutionx\"\n  audio: \"pulseaudio\"\n  commands:\n    - devilutionx.sh >> $EE_LOG 2>&1\n\nDiablo Hellfire:\n  description: Hellfire is the expansion pack for the video game Diablo, developed by Synergistic Software, a Sierra division, and published by Sierra On-Line in 1997. Despite the objections of Blizzard Entertainment, the Hellfire expansion was produced, permitted by Davidson & Associates, their parent company at the time.\n  rating: 1.0\n  release_date: 19971124T000000\n  developer: DevilutionX - Blizzard - Synergistic Software\n  publisher: Blizzard\n\n  check_bios: Hellfire\n  init_port: true\n  port_exe: \"devilutionx\"\n  audio: \"pulseaudio\"\n  commands:\n    - devilutionx.sh hellfire >> $EE_LOG 2>&1\n\nDinothawr:\n  description: Dinothawr is a block pushing puzzle game on slippery surfaces. Our hero is a dinosaur whose friends are trapped in ice. Through puzzles it is your task to free the dinos from their ice prison.\n  rating: 0.8\n  release_date: 20130220T000000\n  developer: Themaister, Agnes Heyer\n  publisher: non-commercial\n\n  check_bios: Dinothawr\n  commands:\n    - /usr/bin/emuelecRunEmu.sh \"/storage/roms/ports/dinothawr/dinothawr.game\" -Pports \"${2}\" -Cdinothawr \"-SC${0}\"\n\nDoom:\n  description: Players assume the role of a space marine fighting his way through hordes of invading demons through the 9 levels of Hell.\n  rating: 0.8\n  release_date: 19931210T000000\n  developer: id Software\n  publisher: GT Interactive\n\n  check_bios: DOOM1\n  commands:\n    - /usr/bin/emuelecRunEmu.sh \"/storage/roms/ports/doom/doom1.wad\" -Pports \"${2}\" -Cprboom \"-SC${0}\"\n\nDoom 2:\n  description: A first-person shooter video game, the second title of id Software's Doom franchise. It was originally released for MS-DOS computers in 1994 and Macintosh computers in 1995.\n  rating: 0.9\n  release_date: 19941010T000000\n  developer: id Software\n  publisher: GT Interactive\n\n  check_bios: DOOM2\n  commands:\n    - /usr/bin/emuelecRunEmu.sh \"/storage/roms/ports/doom2/doom2.wad\" -Pports \"${2}\" -Cprboom \"-SC${0}\"\n\nDuke Nukem:\n  description: Duke Nukem 3D is a first-person shooter video game developed by 3D Realms. It is a sequel to the platform games Duke Nukem and Duke Nukem II, published by 3D Realms. Duke Nukem 3D features the adventures of the titular Duke Nukem, voiced by Jon St. John, who fights against an alien invasion on Earth.\n  rating: 1.0\n  release_date: 19960129T000000\n  developer: 3D Realms\n  publisher: FormGen\n\n  init_port: true\n  port_exe: \"eduke32\"\n  audio: \"alsa\"\n  check_bios: eduke32\n  commands:\n    - cd /storage/roms/ports/eduke\n    - eduke.sh >> $EE_LOG 2>&1\n\nFallout:\n  description: \"Fallout: A Post Nuclear Role Playing Game. In a mid-22nd century post-apocalyptic and retro-futuristic world, decades after a global nuclear war between the United States and China, the Vault Dweller, inhabits the underground nuclear shelter Vault 13.\"\n  rating: 0.9\n  release_date: 19971007T000000\n  developer: Interplay Productions\n  publisher: Interplay Productions\n\n  init_port: true\n  port_exe: \"fallout-ce\"\n  vkb: \"fallout\"\n  audio: \"alsa\"\n  commands:\n    - cd /storage/roms/ports/falloutce1\n    - falloutce1.sh >> $EE_LOG 2>&1\n\nFallout 2:\n  description: Fallout 2 is a sequel to Fallout, featuring similar graphics and game mechanics. The game story takes place in 2241, 80 years after the events of Fallout and 164 years after the atomic war which reduced the vast majority of the world to a nuclear wasteland. The player assumes the role of The Chosen One, the grandchild of the first game protagonist, and undertakes a quest to save their small village on the West Coast of the United States.\n  rating: 0.9\n  release_date: 19980930T000000\n  developer: Black Isle Studios\n  publisher: Interplay Productions\n\n  init_port: true\n  port_exe: \"fallout2-ce\"\n  vkb: \"fallout\"\n  audio: \"alsa\"\n  commands:\n    - cd /storage/roms/ports/falloutce2\n    - falloutce2.sh >> $EE_LOG 2>&1\n\nFlashback:\n  description: REminiscence is a game engine recreation of the 1992/1993 action adventure game Flashback. It is the spiritual successor of Another World/Out Of This World and it distinguishes itself with rotoscoped graphics, and polygonal cutscenes.\n  rating: 0.8\n  release_date: 20180114T000000\n  developer: Gregory Montoir, Stuart Carnie\n  publisher: GPLv3\n\n  check_bios: REminiscence\n  commands:\n    - /usr/bin/emuelecRunEmu.sh \"/storage/roms/ports/reminiscence\" -Pports \"${2}\" -Creminiscence \"-SC${0}\"\n\nHalf-Life:\n  description: Half-Life is a 1998 first-person shooter (FPS) game developed by Valve and published by Sierra Studios for Windows. It was Valve's debut product and the first game in the Half-Life series. Players assume the role of Gordon Freeman, a scientist who must escape the Black Mesa Research Facility after it is invaded by aliens. The gameplay consists of combat, exploration, and puzzle-solving.\n  rating: 1.0\n  release_date: 1998\n  developer: Valve\n  publisher: Sierra Studios\n\n  init_port: true\n  port_exe: \"xash3d\"\n  audio: \"alsa\"\n  commands:\n    - xash3d.sh >> $EE_LOG 2>&1\n\nHeart of Darkness:\n  description: Hode is a reimplementation of the engine used by the game \"Heart of Darkness\" developed by Amazing Studio. Heart of Darkness is a cinematic platformer in the vein of Eric Chahi's previous game Another World. The player controls Andy, who faces various dangers in search of his dog, Whisky. The player progresses through the game's linear storyline by navigating various environments and solving puzzles, all whilst attempting to keep Andy from being killed by evil shadows.\n  rating: 0.9\n  release_date: 19980704T000000\n  developer: Amazing Studio\n  publisher: Infogrames Interplay\n\n  init_port: true\n  port_exe: \"hode\"\n  audio: \"alsa\"\n  commands:\n    - ${PORT} --datapath=/storage/roms/ports/hode/ --savepath=/storage/roms/ports/hode/ >> $EE_LOG 2>&1\n\nHeroes of Might and Magic II:\n  description: \"Heroes of Might and Magic II: The Succession Wars is a turn-based strategy video game developed by Jon Van Caneghem through New World Computing and published in 1996 by the 3DO Company.\"\n  rating: 1.0\n  release_date: 1996\n  developer: New World Computing\n  publisher: The 3DO Company\n\n  init_port: true\n  port_exe: \"fheroes2\"\n  audio: \"alsa\"\n  commands:\n    - fheroes2.sh >> $EE_LOG 2>&1\n\nHurrican:\n  description: Freeware jump and shoot game created by Poke53280, based on the Turrican game series by Manfred Trenz.\n  rating: 1.0\n  release_date: 2001\n  developer: Poke53280\n  publisher: Hurrican Team\n\n  init_port: true\n  port_exe: \"hurrican\"\n  vkb: \"hurrican\"\n  audio: \"alsa\"\n  commands:\n    - hurrican.sh >> $EE_LOG 2>&1\n\nHydra Castle Labyrinth:\n  description: Hydra Castle Labyrinth (a \"metroidvania\" kind of game).\n  rating: 1.0\n  release_date: 20110129T000000\n  developer: ptitSeb\n  publisher: Nicalis, Inc.\n\n  init_port: true\n  port_exe: \"hcl\"\n  audio: \"alsa\"\n  commands:\n    - cd /emuelec/configs/hcl/\n    - ${PORT} -d >> $EE_LOG 2>&1\n\nMr. Boom:\n  description: Mr. Boom is an up to 8 player Bomberman clone. The goal of the game is to bomb away your enemies and other players.\n  rating: 0.8\n  release_date: 19990225T000000\n  developer: Remdy Software\n  publisher: non-commercial\n\n  commands:\n    - /usr/bin/emuelecRunEmu.sh \"\" -Pports \"${2}\" -Cmrboom \"-SC${0}\"\n\nOpenJazz:\n  description: OpenJazz is a free, open-source version of the classic Jazz Jackrabbit game. Jazz Jackrabbit is a PC platform game. Produced by Epic Games (then Epic MegaGames), it was first released in 1994.\n  rating: 1.0\n  release_date: 20210516T000000\n  developer: sana2dang, AlisterT\n  publisher: non-commercial\n\n  requires:\n    - DEVICE: OdroidGoAdvance\n    - DEVICE: GameForce\n\n  init_port: true\n  port_exe: \"OpenJazz\"\n  audio: \"alsa\"\n  commands:\n    - ${PORT} --Datadir /storage/roms/ports/openjazz >> $EE_LOG 2>&1\n\nOpenTyrian:\n  description: OpenTyrian is an open-source port of the \"cult\" arcade-style vertical scrolling shooter called \"Tyrian\". Original game was developed by World Tree Games Productions and published in 1995 by Epic MegaGames.\n  rating: 1.0\n  release_date: 1995\n  developer: World Tree Games\n  publisher: Epic MegaGames\n\n  check_bios: OpenTyrian\n  init_port: true\n  port_exe: \"opentyrian\"\n  audio: \"alsa\"\n  commands:\n    - '## on \"Amlogic\" project we need to remove asound.conf or else OpenTyrian will have no sound.'\n    - '[[ \"$EE_DEVICE\" == \"Amlogic\" ]] && mv /storage/.config/asound.conf /storage/.config/asound2.conf'\n    - ${PORT} -t /storage/roms/ports/opentyrian >> $EE_LOG 2>&1\n  commands_end:\n    - '[[ \"$EE_DEVICE\" == \"Amlogic\" ]] && mv /storage/.config/asound2.conf /storage/.config/asound.conf'\n\nPrince of Persia:\n  description: SDLPoP is an open-source port of Prince of Persia that runs natively on Windows and Linux. It is based on a disassembly of the DOS version.\n  rating: 1.0\n  release_date: 20110111T000000\n  developer: Dávid Nagy\n  publisher: non-commercial\n\n  init_port: true\n  port_exe: \"prince\"\n  audio: \"alsa\"\n  commands:\n    - '[[ ! -f \"/storage/.config/emuelec/configs/SDLPoP/SDLPoP.cfg\" ]] && touch \"/storage/.config/emuelec/configs/SDLPoP/SDLPoP.cfg\"'\n    - '# SDLPop will complain about a missing data and config files by showing a nice blank screen after the intro'\n    - cd /storage/.config/emuelec/configs/SDLPoP\n    - ${PORT} >> $EE_LOG 2>&1\n\nQuake:\n  description: Players must find their way through various maze-like, medieval environments while battling a variety of monsters using an array of weaponry.\n  rating: 0.8\n  release_date: 19960622T000000\n  developer: id Software\n  publisher: GT Interactive\n\n  check_bios: Quake\n  commands:\n    - /usr/bin/emuelecRunEmu.sh \"/storage/roms/ports/quake/id1/pak0.pak\" -Pports \"${2}\" -Ctyrquake \"-SC${0}\"\n\nRick Dangerous:\n  description: Way before Lara Croft, back in the 1980's and early 1990's, Rick Dangerous was the Indiana Jones of computer games, running away from rolling rocks, avoiding traps, from South America to a futuristic missile base via Egypt and the Schwarzendumpf castle. Xrick is a clone of Rick Dangerous, known to run on Linux, Windows, BeOs, Amiga, QNX, all sorts of gaming consoles.\n  rating: 0.8\n  release_date: 20170326T000000\n  developer: BigOrno\n  publisher: non-commercial\n\n  check_bios: RickDangerous\n  commands:\n    - /usr/bin/emuelecRunEmu.sh \"/storage/roms/ports/xrick/data.zip\" -Pports \"${2}\" -Cxrick \"-SC${0}\"\n\nRigelEngine:\n  description: RigelEngine is an open-source recreation of the 2D side-scroller Duke Nukem II, originally released by Apogee in 1993.\n  rating: 1.0\n  release_date: 1993\n  developer: Apogee Software\n  publisher: Apogee Software\n\n  init_port: true\n  port_exe: \"RigelEngine\"\n  audio: \"alsa\"\n  check_bios: RigelEngine\n  commands:\n    - ${PORT} /storage/roms/ports/rigelengine >> $EE_LOG 2>&1\n\nShovel Knight:\n  description: Shovel Knight is a 2D side-scrolling platform game developed and published by Yacht Club Games.\n  rating: 1.0\n  release_date: 2014\n  developer: Yacht Club Games\n  publisher: Yacht Club Games\n\n  init_port: true\n  port_exe: \"ShovelKnight\"\n  audio: \"alsa\"\n  commands:\n    - shovelknight.sh >> $EE_LOG 2>&1\n\nSonic 1:\n  description: Sonic the Hedgehog is a platform game developed by Sonic Team and published by Sega for the Sega Genesis home video game console. It was released in North America in June 1991 and in PAL regions and Japan the following month.\n  rating: 1.0\n  release_date: 1991\n  developer: SEGA\n  publisher: SEGA\n\n  init_port: true\n  port_exe: \"sonic2013\"\n  audio: \"alsa\"\n  check_bios: sonic1\n  commands:\n    - '[ ! -e \"/storage/roms/ports/sonic1/settings.ini\" ] && cp \"/emuelec/configs/sonic/settings.ini\" \"/storage/roms/ports/sonic1/settings.ini\"'\n    - cd /storage/roms/ports/sonic1/\n    - ${PORT} >> $EE_LOG 2>&1\n\nSonic 2:\n  description: Sonic the Hedgehog 2 is a 1992 platform game developed and published by Sega for the Sega Genesis. It is the second main entry in the Sonic the Hedgehog series, and introduced Sonic's sidekick, Miles \"Tails\" Prower, controllable by a second player.\n  rating: 1.0\n  release_date: 1992\n  developer: SEGA\n  publisher: SEGA\n\n  init_port: true\n  port_exe: \"sonic2013\"\n  audio: \"alsa\"\n  check_bios: sonic2\n  commands:\n    - '[ ! -e \"/storage/roms/ports/sonic2/settings.ini\" ] && cp \"/emuelec/configs/sonic/settings.ini\" \"/storage/roms/ports/sonic2/settings.ini\"'\n    - cd /storage/roms/ports/sonic2/\n    - ${PORT} >> $EE_LOG 2>&1\n\nSonic CD:\n  description: Sonic the Hedgehog CD is a 1993 platform game for the Sega CD. The story follows Sonic the Hedgehog as he attempts to save an extraterrestrial body, Little Planet, from Doctor Robotnik.\n  rating: 1.0\n  release_date: 1993\n  developer: SEGA\n  publisher: SEGA\n\n  init_port: true\n  port_exe: \"soniccd\"\n  audio: \"alsa\"\n  check_bios: soniccd\n  commands:\n    - '[ ! -e \"/storage/roms/ports/soniccd/settings.ini\" ] && cp \"/emuelec/configs/sonic/settings.ini\" \"/storage/roms/ports/soniccd/settings.ini\"'\n    - cd /storage/roms/ports/soniccd/\n    - ${PORT} >> $EE_LOG 2>&1\n\nSonic Mania:\n  description: Sonic Mania is a 2017 platform game published by Sega. Produced in commemoration of the Sonic the Hedgehog series' 25th anniversary, Sonic Mania pays homage to the original Sega Genesis Sonic games, featuring speedy side-scrolling gameplay.\n  rating: 1.0\n  release_date: 2017 \n  developer: SEGA\n  publisher: SEGA\n\n  init_port: true\n  port_exe: \"sonicmania\"\n  audio: \"alsa\"\n  check_bios: sonicmania\n  commands:\n    - '[ ! -e \"/storage/roms/ports/sonicmania/Settings.ini\" ] && cp \"/emuelec/configs/sonicmania/Settings.ini\" \"/storage/roms/ports/sonicmania/Settings.ini\"'\n    - '[ ! -e \"/storage/roms/ports/sonicmania/Game.so\" ] && cp \"/usr/bin/sonic_mania/Game.so\" \"/storage/roms/ports/sonicmania/Game.so\"'\n    - cd /storage/roms/ports/sonicmania/\n    - ${PORT} >> $EE_LOG 2>&1\n\nSorr:\n  description: Streets of Rage Remake is a remastered version of the MegaDrive classic. There are more than 60 different enemies, you can choose among 16 characters, choose your favourite one and kick asses out there. It's even better than the original one. More characters, more levels, more actions, more finals,... Amazing.\n  rating: 1.0\n  release_date: 2011\n  developer: BomberGames\n  publisher: BomberGames\n\n  init_port: true\n  port_exe: \"bgdi\"\n  vkb: \"sorr\"\n  audio: \"alsa\"\n  commands:\n    - cd /storage/roms/ports/sorr\n    - '[[ ! -e \"/storage/roms/ports/sorr/SorR.dat\" ]] && end_port && exit 21'\n    - bgdi \"/storage/roms/ports/sorr/SorR.dat\" >> $EE_LOG 2>&1\n\nSupermariowar:\n  description: A fan-made multiplayer Super Mario Bros. style deathmatch game.\n  rating: 0.8\n  release_date: 2006\n  developer: Michael Schaffer, Florian Hufsky, Supermariowar Team\n  publisher: Supermariowar Team\n\n  init_port: true\n  port_exe: \"smw\"\n  audio: \"alsa\"\n  commands:\n    - run_smw.sh >> $EE_LOG 2>&1\n\nSuperTux:\n  description: SuperTux is a free and open-source two-dimensional platform video game published under the GNU General Public License. The game was inspired by Nintendo's Super Mario Bros. series; instead of Mario, the hero in the game is Tux, the official mascot of the Linux kernel.\n  rating: 1.0\n  release_date: 2004\n  developer: SuperTux Development Team\n  publisher: Pelya, SuperTux Development Team\n  \n  init_port: true\n  port_exe: \"supertux2\"\n  audio: \"alsa\"\n  commands:\n    - run_supertux.sh >> $EE_LOG 2>&1\n\nSuperTuxKart:\n  description: SuperTuxKart is a free and open-source kart racing game, distributed under the terms of the GNU General Public License, version 3. It features mascots of various open-source projects.\n  rating: 1.0\n  release_date: 2007\n  developer: SuperTuxKart Team\n  publisher: SuperTuxKart Team\n\n  init_port: true\n  port_exe: \"supertuxkart\"\n  audio: \"alsa\"\n  commands:\n    - run_supertuxkart.sh >> $EE_LOG 2>&1\n\nTMNTSR:\n  description: \"Teenage Mutant Ninja Turtles: Shredder's Revenge is a beat'em up game developed by Tribute Games and published by Dotemu.\"\n  rating: 1.0\n  release_date: 2022\n  developer: Tribute Games\n  publisher: Dotemu\n\n  init_port: true\n  port_exe: \"mono\"\n  audio: \"alsa\"\n  commands:\n    - tmntsr.sh >> $EE_LOG 2>&1\n\nVVVVVV:\n  description: VVVVVV is a platform game all about exploring one simple mechanical idea - what if you reversed gravity instead of jumping? The game is designed not to artificially gate your progress. In VVVVVV there are no locks, no power-ups, no switches, nothing to stop you progressing except the challenges themselves.\n  rating: 1.0\n  release_date: 20100111T000000\n  developer: Terry Cavanagh, Simon Roth, Nicalis\n  publisher: non-commercial\n\n  init_port: true\n  port_exe: \"VVVVVV\"\n  audio: \"alsa\"\n  check_bios: VVVVVV\n  commands:\n    - '# VVVVVV will complain about a missing gamecontrollerdb.txt unless we switch to this folder first'\n    - cd /storage/.config/SDL-GameControllerDB/\n    - ${PORT} >> $EE_LOG 2>&1\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/supermariowar/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"supermariowar\"\nPKG_VERSION=\"ed60ed45e296ff88a8883cbc51f5bf5aed880636\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/mmatyas/supermariowar\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_image SDL2_mixer\"\nPKG_SHORTDESC=\"A fan-made multiplayer Super Mario Bros. style deathmatch game \"\nPKG_TOOLCHAIN=\"cmake\"\n\nPKG_CMAKE_OPTS_TARGET=\" -DUSE_PNG_SAVE=ON -DSDL2_FORCE_GLES=ON\"\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp ${PKG_BUILD}/.${TARGET_NAME}/smw* ${INSTALL}/usr/bin\ncp ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n} \n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/supermariowar/patches/supermariowar-emuelec-001-config-path.patch",
    "content": "--- a/src/common/path.cpp\n+++ b/src/common/path.cpp\n@@ -48,8 +48,8 @@\n     return result;\n \n #else // catch-all for Linux-based systems\n-    std::string result(\".smw/\");\n-    char* folder = getenv(\"HOME\");\n+    std::string result(\"smw/\");\n+    char* folder = \"/emuelec/configs\";\n     if (folder)\n         result = std::string(folder) + \"/\" + result;\n     return result;\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/supermariowar/scripts/run_smw.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n# Modified 2024-present DiegroSan (github)\n\n# Source predefined functions and variables\n. /etc/profile\n\nDATA=\"https://github.com/mmatyas/supermariowar-data/archive/da13a367e5a41c59d59f8c0a7fb8248a2f72750c.zip\"\nDATAFILE=$(basename \"$DATA\")\nDATANAME=$(basename \"$DATA\" .zip)\nDATAFOLDER=\"/storage/roms/ports/smw/data\"\nCONFIGFOLDER=\"/emuelec/configs/smw\"\n\nmkdir -p \"${DATAFOLDER}\"\nmkdir -p \"${CONFIGFOLDER}\"\ncd \"${DATAFOLDER}\"\n\ngptokeyb &\nif [ ! -f \"${CONFIGFOLDER}/nofakekeyb\" ]; then \n    touch \"${CONFIGFOLDER}/nofakekeyb\"\nfi\n\nif [ ! -e \"${DATAFOLDER}/worlds/Big JM_Mixed River.txt\" ]; then\n    text_viewer -y -w -f 24 -t \"Data does not exists!\" -m \"It seems this is the first time you are launching Super Mario War or the data folder does not exists\\n\\nData is about 30 MB total, and you need to be connected to the internet\\n\\nKeep in mind the first time you run the game a fake keyboard is set, you need to set up your controller/gamepad and restart the game.\\n\\nDownload and continue?\"\n        if [[ $? == 21 ]]; then\n            ee_console enable\n            wget \"${DATA}\" -q --show-progress > /dev/tty0 2>&1\n            unzip \"${DATAFILE}\" > /dev/tty0\n            mv \"${DATAFOLDER}/supermariowar-data-${DATANAME}\"/* \"${DATAFOLDER}/\" > /dev/tty0\n            rm -rf \"${DATAFOLDER}/supermariowar-data-${DATANAME}\" > /dev/tty0 2>&1\n            rm \"${DATAFOLDER}/${DATAFILE}\" > /dev/tty0 2>&1\n            rm \"imgui.ini\" > /dev/tty0 2>&1\n            ee_console disable\n            cd \"${DATAFOLDER}/..\"\n            smw --datadir \"${DATAFOLDER}\" > /emuelec/logs/emuelec.log 2>&1\n        else\n            exit 0\n        fi\nelse\n    smw --datadir \"${DATAFOLDER}\" > /emuelec/logs/emuelec.log 2>&1\nfi\n\nkillall gptokeyb &\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/supertux/config/config",
    "content": "(supertux-config\n  (profile 1)\n  (show_fps #f)\n  (show_player_pos #f)\n  (show_controller #f)\n  (developer #f)\n  (confirmation_dialog #f)\n  (pause_on_focusloss #t)\n  (custom_mouse_cursor #t)\n  (integrations\n    (hide_editor_levelnames #f)\n  )\n  (video\n    (fullscreen #t)\n    (video \"auto\")\n    (vsync #t)\n    (fullscreen_width 1920)\n    (fullscreen_height 1080)\n    (fullscreen_refresh_rate 0)\n    (window_width 1920)\n    (window_height 1080)\n    (window_resizable #f)\n    (aspect_width 0)\n    (aspect_height 0)\n    (magnification 0)\n  )\n)\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/supertux/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"supertux\"\nPKG_VERSION=\"37cddf24a4abfdec7931a84afd9e87fb8ea18767\" #v0.6.3\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/SuperTux/supertux\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 boost\"\nPKG_LONGDESC=\"Run and jump through multiple worlds, fighting off enemies by jumping on them, bumping them from below or tossing objects at them, grabbing power-ups and other stuff on the way.\"\n\npre_configure_target() {\nPKG_CMAKE_OPTS_TARGET+=\" -DENABLE_OPENGL=ON -DENABLE_OPENGLES2=ON -DBUILD_DOCUMENTATION=OFF -DENABLE_DISCORD=Off -DCMAKE_BUILD_TYPE=Release -DIS_SUPERTUX_RELEASE=ON -DBoost_NO_BOOST_CMAKE=ON\" \n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp ${PKG_BUILD}/.${TARGET_NAME}/supertux2 ${INSTALL}/usr/bin/\ncp ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/supertux2\ncp ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/supertux2\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/supertux/scripts/run_supertux.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# This variable has to match the version on package.mk\nVERSION=\"0.6.3\"\n\nDATA=\"https://github.com/SuperTux/supertux/archive/refs/tags/v${VERSION}.zip\"\nDATAFOLDER=\"/storage/roms/ports/supertux\"\nCONFIGFOLDER=\"/emuelec/configs/supertux2\"\n\nif [ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${EE_DEVICE}\" == \"GameForce\" ]; then\nOGAVER=$(oga_ver)\ncase \"${OGAVER}\" in\n    \"OGA\")\n        sed -i \"s|(fullscreen_width .*|(fullscreen_width 480)|\" ${CONFIGFOLDER}/config\n        sed -i \"s|(fullscreen_height .*|(fullscreen_height 320)|\" ${CONFIGFOLDER}/config\n        sed -i \"s|(fullscreen_refresh_rate .*|(fullscreen_refresh_rate 60)|\" ${CONFIGFOLDER}/config\n        sed -i \"s|(window_width .*|(window_width 480)|\" ${CONFIGFOLDER}/config\n        sed -i \"s|(window_height .*|(window_height 320)|\" ${CONFIGFOLDER}/config\n    ;;\n    \"OGS\")\n        sed -i \"s|(fullscreen_width .*|(fullscreen_width 854)|\" ${CONFIGFOLDER}/config\n        sed -i \"s|(fullscreen_height .*|(fullscreen_height 480)|\" ${CONFIGFOLDER}/config\n        sed -i \"s|(fullscreen_refresh_rate .*|(fullscreen_refresh_rate 60)|\" ${CONFIGFOLDER}/config\n        sed -i \"s|(window_width .*|(window_width 854)|\" ${CONFIGFOLDER}/config\n        sed -i \"s|(window_height .*|(window_height 480)|\" ${CONFIGFOLDER}/config\n    ;;\n    \"GF\")\n        sed -i \"s|(fullscreen_width .*|(fullscreen_width 640)|\" ${CONFIGFOLDER}/config\n        sed -i \"s|(fullscreen_height .*|(fullscreen_height 480)|\" ${CONFIGFOLDER}/config\n        sed -i \"s|(fullscreen_refresh_rate .*|(fullscreen_refresh_rate 60)|\" ${CONFIGFOLDER}/config\n        sed -i \"s|(window_width .*|(window_width 640)|\" ${CONFIGFOLDER}/config\n        sed -i \"s|(window_height .*|(window_height 480)|\" ${CONFIGFOLDER}/config\n    ;;\nesac\nfi\n\nmkdir -p \"${DATAFOLDER}\"\ncd \"${DATAFOLDER}\"\n\nif [ ! -e \"${DATAFOLDER}/credits.stxt\" ]; then\n    text_viewer -y -w -f 24 -t \"Data does not exists!\" -m \"It seems this is the first time you are launching Super Tux or the data folder does not exists\\n\\nData is about 200 MB total, and you need to be connected to the internet\\n\\nDownload and continue?\"\n        if [[ $? == 21 ]]; then\n            ee_console enable\n            rm -rf ${DATAFOLDER}/*\n            wget \"${DATA}\" -O \"${VERSION}.zip\" -q --show-progress > /dev/tty0 2>&1\n            unzip \"${VERSION}.zip\" > /dev/tty0\n            mv supertux-${VERSION}/data/* \"${DATAFOLDER}\" > /dev/tty0\n            rm -rf \"supertux-${VERSION}\"\n            rm \"${VERSION}.zip\"\n            rm \"imgui.ini\"\n            mv ${DATAFOLDER}/levels/misc/menu.stl.in ${DATAFOLDER}/levels/misc/menu.stl\n            sed -i \"s|@LOGO_FILE@|logo_final.sprite|g\" ${DATAFOLDER}/levels/misc/menu.stl\n            ee_console disable\n           SUPERTUX2_DATA_DIR=\"${DATAFOLDER}\" supertux2\n        else\n            exit 0\n        fi\nelse\n    SUPERTUX2_DATA_DIR=\"${DATAFOLDER}\" SUPERTUX2_USER_DIR=\"${CONFIGFOLDER}\" supertux2\nfi\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/supertuxkart/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"supertuxkart\"\nPKG_VERSION=\"fab79150111944c9e33396db68eb5de84f2efeaa\"\nPKG_SHA256=\"c2b0d7781331e1bd717f2eeaf9f5ca56f314d4bb5136a8dd9c6fe45777d31022\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/supertuxkart/stk-code\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 harfbuzz\"\nPKG_LONGDESC=\"SuperTuxKart is a free kart racing game. It focuses on fun and not on realistic kart physics. Instructions can be found on the in-game help page.\"\n\npre_configure_target() {\nPKG_CMAKE_OPTS_TARGET+=\" -DNO_SHADERC=on -DBUILD_RECORDER=0 -DUSE_WIIUSE=OFF -DCHECK_ASSETS=off -DCMAKE_BUILD_TYPE=Release\"\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp ${PKG_BUILD}/.${TARGET_NAME}/bin/supertuxkart ${INSTALL}/usr/bin/\ncp ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/supertuxkart/scripts/run_supertuxkart.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# This variable has to match the version on package.mk\nVERSION=\"1.4\"\n\nASSETS=\"https://github.com/supertuxkart/stk-assets-mobile/releases/download/${VERSION}/stk-assets.zip\"\nDATA=\"https://github.com/supertuxkart/stk-code/archive/refs/tags/${VERSION}.zip\"\nDATAFOLDER=\"/storage/roms/ports/supertuxkart\"\n\nmkdir -p \"${DATAFOLDER}\"\ncd \"${DATAFOLDER}\"\n\nif [ ! -e \"${DATAFOLDER}/data/stk_config.xml\" ]; then\n    text_viewer -y -w -f 24 -t \"Data does not exists!\" -m \"It seems this is the first time you are launching Super Tux Kart or the data folder does not exists\\n\\nData is about 250 MB total, and you need to be connected to the internet\\n\\nDownload and continue?\"\n        if [[ $? == 21 ]]; then\n            ee_console enable\n            wget \"${DATA}\" -q --show-progress > /dev/tty0 2>&1\n            unzip \"${VERSION}.zip\" > /dev/tty0\n            rm -rf \"${DATAFOLDER}/data\"\n            mv \"stk-code-${VERSION}/data\" \"${DATAFOLDER}\" > /dev/tty0\n            rm -rf \"stk-code-${VERSION}\"\n            wget \"${ASSETS}\" -q --show-progress > /dev/tty0 2>&1\n            unzip \"stk-assets.zip\" -d data > /dev/tty0\n            rm \"stk-assets.zip\"\n            rm \"${VERSION}.zip\"\n            ee_console disable\n            mkdir -p /storage/.config/supertuxkart/config-0.10\n            [[ ! -f \"${DATAFOLDER}/data/supertuxkart.git\" ]] && touch \"${DATAFOLDER}/data/supertuxkart.git\"\n            \ncat > /storage/.config/supertuxkart/config-0.10/players.xml << EOF\n<?xml version=\"1.0\"?>\n<players version=\"1\" >\n    <current player=\"EmuELEC\"/>\n    <player name=\"EmuELEC\" guest=\"false\" use-frequency=\"0\"\n            icon-filename=\"1.png\"\n            unique-id=\"1\" saved-session=\"false\"\n            saved-user=\"0\" saved-token=\"\"\n            last-online-name=\"\" last-was-online=\"false\"\n            remember-password=\"false\"\n            default-kart-color=\"0\">\n    </player>\n</players>            \nEOF\n            SUPERTUXKART_DATADIR=\"${DATAFOLDER}\" supertuxkart\n        else\n            exit 0\n        fi\nelse\n    SUPERTUXKART_DATADIR=\"${DATAFOLDER}\" supertuxkart\nfi\n\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/tmntsr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"tmntsr\"\nPKG_VERSION=\"1.0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain progressor\"\nPKG_SHORTDESC=\"Script file to run teenage mutant ninja turtles shredder's revenge\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp tmntsr.sh ${INSTALL}/usr/bin\nmkdir -p ${INSTALL}/usr/config/emuelec/configs\ncp tmntsr.tar.xz ${INSTALL}/usr/config/emuelec/configs\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/tmntsr/sources/tmntsr.sh",
    "content": "#!/bin/bash\n\n. /etc/profile\n\ndirectory=\"/storage/roms\"\n\nexport gameassembly=\"TMNT.exe\"\nexport gamedir=\"/$directory/ports/tmntsr\"\n\n# Untar port files\nif [[ ! -f \"${gamedir}/MMLoader.exe\" ]]; then\ntar -xf \"/emuelec/configs/tmntsr.tar.xz\" -C \"$directory/ports\"\nfi\n\n# check if required files are installed\nif [[ ! -f \"${gamedir}/gamedata/${gameassembly}\" ]]; then\n    text_viewer -e -w -t \"ERROR!\" -f 24 -m \"TMNT:SR Game Data does not exist on ${gamedir}/gamedata\\n\\nYou need to provide your own game data from your copy of the game\"\n    exit 0\nfi\n\ncd \"$gamedir/gamedata\"\n\n# Setup mono\nmonodir=\"/emuelec/mono\"\nmonofile=\"$directory/ports/mono-6.12.0.122-aarch64.squashfs\"\n\nif [ ! -e \"${monofile}\" ]; then\nmonourl=\"https://github.com/PortsMaster/PortMaster-Hosting/releases/download/large-files/mono-6.12.0.122-aarch64.squashfs\"\n    text_viewer -y -w -f 24 -t \"MONO does not exists!\" -m \"It seems this is the first time you are launching TMNT:SR or the MONO file does not exists\\n\\nMONO is about 260 MB, and you need to be connected to the internet\\n\\nIMPORTANT: THIS IS NOT THE GAME DATA! YOU STILL NEED TO PROVIDE THIS FROM YOUR COPY OF TMNT:SR\\n\\nDownload and continue?\"\n        if [[ $? == 21 ]]; then\n            ee_console enable\n            wget \"${monourl}\" -O \"${monofile}\" -q --show-progress > /dev/tty0 2>&1\n            ee_console disable\n        else\n            exit 0\n        fi\nelse\n    mkdir -p \"$monodir\"\n    umount \"$monofile\" || true\n    mount \"$monofile\" \"$monodir\"\nfi\n\n\n# Remove all the dependencies in favour of system libs - e.g. the included \nrm -f System*.dll mscorlib.dll FNA.dll Mono.*.dll\n\n# Setup path and other environment variables\n# export FNA_PATCH=\"$gamedir/dlls/PanzerPaladinPatches.dll\"\nexport MONO_IOMAP=all\nexport XDG_DATA_HOME=/emuelec/configs\nexport MONO_PATH=\"$gamedir/dlls\":\"$gamedir/gamedata\":\"$gamedir/monomod\"\nexport LD_LIBRARY_PATH=\"$gamedir/libs\":\"$monodir/lib\":\"$LD_LIBRARY_PATH\"\nexport PATH=\"$monodir/bin\":\"$PATH\"\n\n# Setup savedir\nif [ ! -L ${XDG_DATA_HOME}/Tribute\\ Games/TMNT ]; then\nrm -rf ${XDG_DATA_HOME}/Tribute\\ Games/TMNT\nmkdir -p ${XDG_DATA_HOME}/Tribute\\ Games/\nln -sfv \"${gamedir}/savedata\" ${XDG_DATA_HOME}/Tribute\\ Games/TMNT\nfi\n\n# Configure the renderpath\nexport FNA3D_FORCE_DRIVER=OpenGL\nexport FNA3D_OPENGL_FORCE_ES3=1\nexport FNA3D_OPENGL_FORCE_VBO_DISCARD=1\nexport FNA_SDL2_FORCE_BASE_PATH=0\n\nsha1sum -c \"${gamedir}/gamedata/.ver_checksum\"\nif [ $? -ne 0 ]; then\n\techo \"Checksum fail or unpatched binary found, patching game...\" |& tee /dev/tty0\n\trm -f \"${gamedir}/gamedata/.astc_done\"\n\trm -f \"${gamedir}/gamedata/.patch_done\"\nfi\n\nif [[ ! -f \"${gamedir}/gamedata/.astc_done\" ]] || [[ ! -f \"${gamedir}/gamedata/.patch_done\" ]]; then\n\tchmod +x ../repack.src ../utils/*\n\tprogressor \\\n\t\t--log \"../repack.log\" \\\n\t\t--font \"../FiraCode-Regular.ttf\" \\\n\t\t--title \"First Time Setup\" \\\n\t\t../repack.src\n\n\t[[ $? != 0 ]] && exit -1\nfi\n\n# Fix for a goof on previous on the previous patcher...\nif [[ -f \"${gamedir}/gamedata/MONOMODDED_ParisEngine.dll.so\" ]]; then\n\tmv \"${gamedir}/gamedata/MONOMODDED_ParisEngine.dll.so\" \"${gamedir}/gamedata/ParisEngine.dll.so\"\n\tmv \"${gamedir}/gamedata/MONOMODDED_${gameassembly}.so\" \"${gamedir}/gamedata/${gameassembly}.so\"\nfi\n\nprintf \"\\033c\" > /dev/tty0\necho \"Loading... Please Wait.\" > /dev/tty0\n\nmono --ffast-math -O=all ../MMLoader.exe MONOMODDED_${gameassembly} |& tee ${gamedir}/log.txt\nkill -9 $(pidof gptokeyb)\numount \"$monodir\"\n\n# Disable console\nprintf \"\\033c\" >> /dev/tty1\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/xash3d/files/config.cfg",
    "content": "//=======================================================================\n//\t\t\tCopyright XashXT Group & Flying With Gauss 2022 (C)\n//\t\t\tconfig.cfg - archive of cvars\n//=======================================================================\nunbindall\nbind TAB \"+showscores\"\nbind MODE \"escape\"\nbind ESCAPE \"escape\"\nbind ' \"+moveup\"\nbind , \"+moveleft\"\nbind . \"+moveright\"\nbind / \"+movedown\"\nbind 1 \"slot1\"\nbind 2 \"slot2\"\nbind 3 \"slot3\"\nbind 4 \"slot4\"\nbind 5 \"slot5\"\nbind SEMICOLON \"+mlook\"\nbind ` \"toggleconsole\"\nbind a \"+moveleft\"\nbind c \"+movedown\"\nbind d \"+moveright\"\nbind e \"+use\"\nbind k \"+voicerecord\"\nbind q \"lastinv\"\nbind r \"+reload\"\nbind s \"+back\"\nbind t \"impulse 201\"\nbind u \"messagemode2\"\nbind v \"+moveup\"\nbind w \"+forward\"\nbind y \"messagemode\"\nbind ~ \"toggleconsole\"\nbind UPARROW \"+forward\"\nbind DOWNARROW \"+back\"\nbind LEFTARROW \"+left\"\nbind RIGHTARROW \"+right\"\nbind ALT \"+strafe\"\nbind CTRL \"+duck\"\nbind F5 \"snapshot\"\nbind F6 \"save quick\"\nbind F7 \"load quick\"\nbind F10 \"quit\"\nbind INS \"+klook\"\nbind PGDN \"+lookdown\"\nbind PGUP \"+lookup\"\nbind END \"force_centerview\"\nbind LTRIGGER \"+attack2\"\nbind RTRIGGER \"+attack\"\nbind A_BUTTON \"+jump\"\nbind B_BUTTON \"impulse 100\"\nbind X_BUTTON \"+use\"\nbind Y_BUTTON \"+reload\"\nbind L1_BUTTON \"invprev\"\nbind R1_BUTTON \"invnext\"\nbind BACK \"quit\"\nbind START \"pause\"\nbind STICK2 \"+duck\"\nbind STICK1 \"+speed\"\nbind PAUSE \"pause\"\nMP3Volume \"1.0\"\nallow_levelshots \"0\"\nambient_fade \"1000\"\nambient_level \"0.3\"\nbottomcolor \"6\"\nbrightness \"1.000000\"\ncl_allow_download \"1\"\ncl_allow_upload \"1\"\ncl_autowepswitch \"1\"\ncl_backspeed \"400\"\ncl_bmodelinterp \"1\"\ncl_charset \"utf-8\"\ncl_clockreset \"0.1\"\ncl_cmdbackup \"10\"\ncl_cmdrate \"60\"\ncl_dlmax \"1200\"\ncl_download_ingame \"1\"\ncl_envshot_size \"256\"\ncl_filterstuffcmd \"0\"\ncl_fixtimerate \"7.5\"\ncl_forwardspeed \"400\"\ncl_himodels \"0.000000\"\ncl_laddermode \"2\"\ncl_lc \"1\"\ncl_lightstyle_lerping \"0\"\ncl_logocolor \"orange\"\ncl_logofile \"lambda\"\ncl_lw \"1\"\ncl_nopred \"0\"\ncl_nosmooth \"0\"\ncl_righthand \"0\"\ncl_scoreboard_bg \"1\"\ncl_showerror \"0\"\ncl_showevents \"0\"\ncl_showfps \"1\"\ncl_showpacketloss \"0\"\ncl_showpos \"0\"\ncl_sidespeed \"400\"\ncl_smoothtime \"0.1\"\ncl_test_bandwidth \"1\"\ncl_trace_messages \"0\"\ncl_updaterate \"20\"\ncl_upmax \"1200\"\ncl_viewbob \"0\"\ncl_vsmoothing \"0.05\"\ncmd_scripting \"0\"\ncon_charset \"cp1251\"\ncon_color \"240 180 24\"\ncon_fontnum \"-1\"\ncon_fontscale \"1.0\"\ncon_fontsize \"1\"\ncon_mapfilter \"1\"\ncon_notifytime \"3\"\ncrosshair \"1\"\ndefault_fov \"90\"\ndirect \"1\"\ndsp_coeff_table \"0\"\ndsp_off \"0\"\nex_interp \"0.1\"\nfps_max \"72\"\ngamma \"2.500000\"\ngl_clear \"0\"\ngl_vbo \"0\"\ngl_vbo_dlightmode \"1\"\ngl_vsync \"0\"\nhpk_maxsize \"0\"\nhttp_autoremove \"1\"\nhttp_maxconnections \"4\"\nhttp_timeout \"45\"\nhttp_useragent \"xash3d\"\nhud_capturemouse \"1\"\nhud_centerid \"0\"\nhud_classautokill \"1\"\nhud_deathnotice_time \"6\"\nhud_draw \"1\"\nhud_fastswitch \"0\"\nhud_scale \"0\"\nhud_takesshots \"0\"\nhud_textmode \"0\"\nhud_utf8 \"0\"\njoy_axis_binding \"sfpyrl\"\njoy_enable \"1\"\njoy_forward \"1.0\"\njoy_forward_deadzone \"0\"\njoy_forward_key_threshold \"24576\"\njoy_lt_threshold \"16384\"\njoy_pitch \"100.0\"\njoy_pitch_deadzone \"0\"\njoy_rt_threshold \"16384\"\njoy_side \"1.0\"\njoy_side_deadzone \"0\"\njoy_side_key_threshold \"24576\"\njoy_yaw \"100.0\"\njoy_yaw_deadzone \"0\"\njoystick \"0.000000\"\nkey_rotate \"0\"\nlastdemo \"\"\nlightgamma \"1\"\nlook_filter \"0\"\nlookspring \"0\"\nlookstrafe \"0\"\nm_forward \"1\"\nm_ignore \"0\"\nm_pitch \"0.022000\"\nm_rawinput \"1\"\nm_side \"0.8\"\nm_yaw \"0.022\"\nmenu_mp_firsttime \"1\"\nmodel \"gordon\"\nmp_decals \"300\"\nname \"Player\"\nnet_graph \"0\"\nnet_graphheight \"64\"\nnet_graphpos \"1\"\nnet_graphsolid \"1\"\nnet_graphwidth \"192\"\nnet_scale \"5\"\nnet_speeds \"0\"\nosk_enable \"0\"\nr_adjust_fov \"1\"\nr_decals \"4096\"\nr_detailtextures \"1\"\nr_dynamic \"1\"\nr_lighting_modulate \"0.6\"\nr_showtree \"0\"\nr_speeds \"0\"\nr_sprite_lerping \"1\"\nr_sprite_lighting \"1\"\nr_studiocache \"1\"\nrate \"2500.000000\"\nroom_hires \"2\"\ns_combine_sounds \"0\"\ns_lerping \"0\"\ns_samplecount \"0\"\ns_show \"0\"\ns_warn_late_precache \"0\"\nscr_conspeed \"600\"\nsensitivity \"3.100000\"\nsleeptime \"1\"\nsnd_mute_losefocus \"1\"\nsuitvolume \"0.250000\"\nsv_aim \"1\"\nsv_allow_PhysX \"1\"\nsv_allow_joystick \"1\"\nsv_allow_mouse \"1\"\nsv_allow_noinputdevices \"1\"\nsv_allow_touch \"1\"\nsv_allow_vr \"1\"\nsv_background_freeze \"1\"\nsv_check_errors \"0\"\nsv_enttools_enable \"0\"\nsv_enttools_maxfire \"5\"\nsv_log_onefile \"0\"\nsv_log_singleplayer \"0\"\nsv_maxupdaterate \"60.0\"\nsv_minupdaterate \"25.0\"\nsv_precache_meshes \"1\"\nsv_reconnect_limit \"3\"\nsv_rollangle \"0\"\nsv_voiceenable \"1\"\nsv_voicequality \"3\"\ntopcolor \"30\"\ntouch_config_file \"touch.cfg\"\ntouch_emulate \"0\"\ntouch_enable \"0\"\nui_borderclip \"0\"\nui_language \"english\"\nui_renderworld \"0\"\nui_show_window_stack \"0\"\nui_showmodels \"0\"\nvibration_enable \"1\"\nvibration_length \"1.0\"\nviewsize \"120.000000\"\nvoice_avggain \"0.5\"\nvoice_enable \"1\"\nvoice_maxgain \"5.0\"\nvoice_scale \"1.0\"\nvolume \"0.800000\"\nzoom_sensitivity_ratio \"1.2\"\n+mlook\n+jlook\nexec userconfig.cfg\n// end of config.cfg\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/xash3d/files/xash3d.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nXHAS3D_LIBS=\"/usr/lib/xash3d/valve\"\n\n# Exports for xash3d\nexport XASH3D_BASEDIR=/storage/roms/ports/half-life\nexport XASH3D_VALVEDIR=${XASH3D_BASEDIR}/valve\n\n\n# Check if the valve dir exists\nif [ ! -x \"${XASH3D_VALVEDIR}\" ]; then\n  text_viewer -e -w -t \"ERROR!\" -f 24 -m \"You need to copy the Half-Life valve folder to ${XASH3D_BASEDIR}!\"\n  exit 0\nfi\n\nif [ ! -e ${XASH3D_VALVEDIR}/emuelec.config.done ]; then\n cp -rf ${XHAS3D_LIBS}/* ${XASH3D_VALVEDIR}/\n cp -rf /usr/emuelec/configs/hl/config.cfg  ${XASH3D_VALVEDIR}/config.cfg\n touch ${XASH3D_VALVEDIR}/emuelec.config.done\nfi\n\n# Change to binary folder and run HL\ncd /usr/bin/xash3d/usr\n./xash3d -ref gles2 -console &> /emuelec/logs/xash3d.log\nkillall gptokeyb\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/xash3d/hlsdk-portable/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019 Trond Haugland (github.com/escalade)\n# Copyright (C) 2022-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"hlsdk-portable\"\nPKG_VERSION=\"895b28d0379f8902051d2b733029fc6a0fa9989c\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/FWGS/hlsdk-portable\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Portable Half-Life SDK. GoldSource and Xash3D. Crossplatform.\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"-lto -gold\"\n\nmakeinstall_target() {\n  # Seems to be needed for some reason\n  #if [ \"${ARCH}\" = \"arm\" ]; then\n  #  CPPFLAGS+=\"-D__ARM_ARCH_7__\"\n  #fi\n\n  # Compile xash3d\n  cd ${PKG_BUILD}\n  ARGS=\"--build-type=release \\\n\t--64bits\"\n  ./waf configure ${ARGS}\n  ./waf build -v\n  ./waf install --destdir=${INSTALL}/usr/lib/xash3d\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/xash3d/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019 Trond Haugland (github.com/escalade)\n# Copyright (C) 2022-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"xash3d\"\nPKG_VERSION=\"b59ba5a1275e052626cea9577da32c634ae5527c\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/FWGS/xash3d-fwgs\"\nPKG_URL=\"https://github.com/FWGS/xash3d-fwgs.git\"\nPKG_DEPENDS_TARGET=\"toolchain hlsdk-portable SDL2\"\nPKG_LONGDESC=\"Xash3D FWGS engine. Rebooted fork since big Xash3D 0.99\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"-lto\"\n\nmakeinstall_target() {\n\ncd ${PKG_BUILD}\n  ARGS=\"--build-type=release \\\n\t--prefix=/usr \\\n\t--sdl2=${PKG_ORIG_SYSROOT_PREFIX}/usr \\\n\t--64bits \\\n\t--disable-gl \\\n\t--enable-gles2\"\n  ./waf configure ${ARGS}\n  ./waf build -v\n  ./waf install --destdir=${INSTALL}/usr/bin/xash3d\n\n  mkdir -p ${INSTALL}/usr/lib/xash3d/valve\n  mkdir -p ${INSTALL}/usr/emuelec/configs/hl\n  wget -q -O ${INSTALL}/usr/lib/xash3d/valve/extras.pak https://github.com/FWGS/xash-extras/releases/download/v0.19.2/extras.pak\n  cp ${PKG_DIR}/files/xash3d.sh ${INSTALL}/usr/bin/\n  cp ${PKG_DIR}/files/config.cfg ${INSTALL}/usr/emuelec/configs/hl\n}\n"
  },
  {
    "path": "packages/sx05re/emuelec-ports/xash3d/tmpfiles.d/xash3d.conf",
    "content": "d /storage/roms/half-life/valve 0775 root root - -\n"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/NPEG00023.ini",
    "content": "_S NPEG-00023\n_G GoW CoO [EUR-PSN]\n_C0 60 FPS [Fixed]\n_L 0xE00E003C 0x10003800\n_L 0xE00D166F 0x0001F690//vblank\n_L 0x10003800 0x0000003C\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2C166F\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2C166F\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0000\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0010\n_L 0x2001A31C 0x0A200E01//Jump\n_L 0x2001A320 0x34040000//FPS\n_L 0x2001A324 0x00000000\n_C0 30 FPS [Fixed]\n_L 0xE00E001E 0x10003800\n_L 0xE00D166F 0x0001F690//vblank\n_L 0x10003800 0x0000001E\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2C166F\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2C166F\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0000\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0010\n_L 0x2001A31C 0x0A200E01//Jump\n_L 0x2001A320 0x34040001//FPS\n_L 0x2001A324 0x00000000\n_C0 Unlimited FPS [Default]\n_L 0xE0040E01 0x0001A31C\n_L 0x2001A31C 0x8FBF0000\n_L 0x2001A320 0x03E00008\n_L 0x2001A324 0x27BD0010\n_L 0x10003800 0x00000000"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/NPEG00044.ini",
    "content": "_S NPEG-00044\n_G GoW GoS [EUR-MULTI5-PSN]\n_C0 60 FPS [Fixed]\n_L 0xE00E003C 0x10003800\n_L 0xE00DE14D 0x000205DC//vblank\n_L 0x10003800 0x0000003C\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2FE14D\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2FE14D\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0000\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0010\n_L 0x2001B10C 0x0A200E01//Jump\n_L 0x2001B110 0x34040000//FPS\n_L 0x2001B114 0x00000000\n_C0 30 FPS [Fixed]\n_L 0xE00E001E 0x10003800\n_L 0xE00DE14D 0x000205DC//vblank\n_L 0x10003800 0x0000001E\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2FE14D\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2FE14D\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0000\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0010\n_L 0x2001B10C 0x0A200E01//Jump\n_L 0x2001B110 0x34040001//FPS\n_L 0x2001B114 0x00000000\n_C0 Unlimited FPS [Default]\n_L 0xE0040E01 0x1001B10C\n_L 0x2001B10C 0x8FBF0000\n_L 0x2001B110 0x03E00008\n_L 0x2001B114 0x27BD0010\n_L 0x10003800 0x00000000"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/NPUG80325.ini",
    "content": "_S NPUG-80325\n_G GoW CoO [USA-PSN]\n_C1 60 FPS [Fixed]\n_L 0xE00E003C 0x10003800\n_L 0xE00D1671 0x0001F690//vblank\n_L 0x10003800 0x0000003C\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2C1671\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2C1671\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0000\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0010\n_L 0x2001A31C 0x0A200E01//Jump\n_L 0x2001A320 0x34040000//FPS\n_L 0x2001A324 0x00000000\n_C0 30 FPS [Fixed]\n_L 0xE00E001E 0x10003800\n_L 0xE00D1671 0x0001F690//vblank\n_L 0x10003800 0x0000001E\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2C1671\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2C1671\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0000\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0010\n_L 0x2001A31C 0x0A200E01//Jump\n_L 0x2001A320 0x34040001//FPS\n_L 0x2001A324 0x00000000\n_C0 Unlimited FPS [Default]\n_L 0xE0040E01 0x0001A31C\n_L 0x2001A31C 0x8FBF0000\n_L 0x2001A320 0x03E00008\n_L 0x2001A324 0x27BD0010\n_L 0x10003800 0x00000000"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/UCES00019.ini",
    "content": "_S UCES-00019\n_G Pursuit Force [EUR]\n_C0 60 FPS v2\n_L 0x20188038 0x0A262017//FPS\n_L 0x2016F308 0x3C043F00//GAMEPLAYSPEED\n_L 0x2016F388 0x3C044270//MENUSPEED\n_C0 30 FPS v2 [Default]\n_L 0x20188038 0x10800008//FPS\n_L 0x2016F308 0x3C043F80//GAMEPLAYSPEED\n_L 0x2016F388 0x3C0441F0//MENUSPEED"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/UCES00842.ini",
    "content": "_S UCES-00842\n_G GoW CoO [EUR]\n_C0 60 FPS [Fixed]\n_L 0xE00E003C 0x10003800\n_L 0xE00D0200 0x0001A378//Jump-0x10\n_L 0x10003800 0x0000003C\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2C16F9\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2C16F9\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0010\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0020\n_L 0x2001A388 0x0A200E01//Jump\n_L 0x2001A38C 0x34040000//FPS\n_L 0x2001A390 0x00000000\n_C0 30 FPS [Fixed]\n_L 0xE00E001E 0x10003800\n_L 0xE00D0200 0x0001A378//Jump-0x10\n_L 0x10003800 0x0000001E\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2C16F9\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2C16F9\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0010\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0020\n_L 0x2001A388 0x0A200E01//Jump\n_L 0x2001A38C 0x34040001//FPS\n_L 0x2001A390 0x00000000\n_C0 Unlimited FPS [Default]\n_L 0xE0040E01 0x0001A388\n_L 0x2001A388 0x8FBF0010\n_L 0x2001A38C 0x03E00008\n_L 0x2001A390 0x27BD0020\n_L 0x10003800 0x00000000"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/UCES01184.ini",
    "content": "_S UCES-01184\n_G Resistance: Retribution [EUR]\n_C0 60FPS v2 [No Vsync]\n_L 0xE0030001 0x10003600\n_L 0xE0020003 0x0047F150\n_L 0x2047F158 0x34020001\n_L 0x20003600 0x00000001\n_C0 60FPS v2 [Default]\n_L 0xE0030002 0x10003600\n_L 0xE0020003 0x0047F150\n_L 0x2047F158 0x0E31EDB7\n_L 0x20003600 0x00000002\n_C0 30FPS v2\n_L 0xE00A0003 0x10003600\n_L 0xE0090003 0x0047F150\n_L 0x2047F158 0x0E200D81//Jal\n_L 0x20003600 0x00000003\n_L 0x20003604 0x03E0D821\n_L 0x20003608 0x0E3674AD//Vb\n_L 0x2000360C 0x00000000\n_L 0x20003610 0x0E3674AD//Vb\n_L 0x20003614 0x00000000\n_L 0x20003618 0x03600008\n_L 0x2000361C 0x34020001"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/UCES01401.ini",
    "content": "_S UCES-01401\n_G GoW GoS [EUR-MULTI5-UMD]\n_C0 60 FPS [Fixed]\n_L 0xE00E003C 0x10003800\n_L 0xE00DE13C 0x000205DC//vblank\n_L 0x10003800 0x0000003C\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2FE13C\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2FE13C\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0000\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0010\n_L 0x2001B10C 0x0A200E01//Jump\n_L 0x2001B110 0x34040000//FPS\n_L 0x2001B114 0x00000000\n_C0 30 FPS [Fixed]\n_L 0xE00E001E 0x10003800\n_L 0xE00DE13C 0x000205DC//vblank\n_L 0x10003800 0x0000001E\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2FE13C\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2FE13C\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0000\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0010\n_L 0x2001B10C 0x0A200E01//Jump\n_L 0x2001B110 0x34040001//FPS\n_L 0x2001B114 0x00000000\n_C0 Unlimited FPS [Default]\n_L 0xE0040E01 0x1001B10C\n_L 0x2001B10C 0x8FBF0000\n_L 0x2001B110 0x03E00008\n_L 0x2001B114 0x27BD0010\n_L 0x10003800 0x00000000"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/UCES01473.ini",
    "content": "_S UCES-01473\n_G GoW GoS [EUR-MULTI3-UMD]\n_C0 60 FPS [Fixed]\n_L 0xE00E003C 0x10003800\n_L 0xE00DE173 0x000205DC//vblank\n_L 0x10003800 0x0000003C\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2FE173\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2FE173\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0000\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0010\n_L 0x2001B10C 0x0A200E01//Jump\n_L 0x2001B110 0x34040000//FPS\n_L 0x2001B114 0x00000000\n_C0 30 FPS [Fixed]\n_L 0xE00E001E 0x10003800\n_L 0xE00DE173 0x000205DC//vblank\n_L 0x10003800 0x0000001E\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2FE173\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2FE173\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0000\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0010\n_L 0x2001B10C 0x0A200E01//Jump\n_L 0x2001B110 0x34040001//FPS\n_L 0x2001B114 0x00000000\n_C0 Unlimited FPS [Default]\n_L 0xE0040E01 0x1001B10C\n_L 0x2001B10C 0x8FBF0000\n_L 0x2001B110 0x03E00008\n_L 0x2001B114 0x27BD0010\n_L 0x10003800 0x00000000"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/UCUS98640.ini",
    "content": "_S UCUS-98640\n_G Pursuit Force [USA]\n_C0 60 FPS v2\n_L 0x201AC008 0x0A26B00B//FPS\n_L 0x20193928 0x3C043F00//GAMEPLAYSPEED\n_L 0x201939A8 0x3C044270//MENUSPEED\n_C0 30 FPS v2 [Default]\n_L 0x201AC008 0x10800008//FPS\n_L 0x20193928 0x3C043F80//GAMEPLAYSPEED\n_L 0x201939A8 0x3C0441F0//MENUSPEED"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/UCUS98653.ini",
    "content": "_S UCUS-98653\n_G GoW CoO [USA]\n_C0 60 FPS [Fixed]\n_L 0xE00E003C 0x10003800\n_L 0xE00D0200 0x0001A378//Jump-0x10\n_L 0x10003800 0x0000003C\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2C16F9\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2C16F9\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0010\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0020\n_L 0x2001A388 0x0A200E01//Jump\n_L 0x2001A38C 0x34040000//FPS\n_L 0x2001A390 0x00000000\n_C0 30 FPS [Fixed]\n_L 0xE00E001E 0x10003800\n_L 0xE00D0200 0x0001A378//Jump-0x10\n_L 0x10003800 0x0000001E\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2C16F9\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2C16F9\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0010\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0020\n_L 0x2001A388 0x0A200E01//Jump\n_L 0x2001A38C 0x34040001//FPS\n_L 0x2001A390 0x00000000\n_C0 Unlimited FPS [Default]\n_L 0xE0040E01 0x0001A388\n_L 0x2001A388 0x8FBF0010\n_L 0x2001A38C 0x03E00008\n_L 0x2001A390 0x27BD0020\n_L 0x10003800 0x00000000"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/UCUS98668.ini",
    "content": "_S UCUS-98668\n_G Resistance: Retribution [USA]\n_C0 60FPS v2 [No Vsync]\n_L 0xE0030001 0x10003600\n_L 0xE0020003 0x0047F150\n_L 0x2047F158 0x34020001\n_L 0x20003600 0x00000001\n_C0 60FPS v2 [Default]\n_L 0xE0030002 0x10003600\n_L 0xE0020003 0x0047F150\n_L 0x2047F158 0x0E31EDB7\n_L 0x20003600 0x00000002\n_C0 30FPS v2\n_L 0xE00A0003 0x10003600\n_L 0xE0090003 0x0047F150\n_L 0x2047F158 0x0E200D81//Jal\n_L 0x20003600 0x00000003\n_L 0x20003604 0x03E0D821\n_L 0x20003608 0x0E3674AD//Vb\n_L 0x2000360C 0x00000000\n_L 0x20003610 0x0E3674AD//Vb\n_L 0x20003614 0x00000000\n_L 0x20003618 0x03600008\n_L 0x2000361C 0x34020001"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/UCUS98737.ini",
    "content": "_S UCUS-98737\n_G GoW GoS [USA-UMD]\n_C1 60 FPS [Fixed]\n_L 0xE00E003C 0x10003800\n_L 0xE00DDC67 0x000205DC//vblank\n_L 0x10003800 0x0000003C\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2FDC67\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2FDC67\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0000\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0010\n_L 0x2001B10C 0x0A200E01//Jump\n_L 0x2001B110 0x34040000//FPS\n_L 0x2001B114 0x00000000\n_C0 30 FPS [Fixed]\n_L 0xE00E001E 0x10003800\n_L 0xE00DDC67 0x000205DC//vblank\n_L 0x10003800 0x0000001E\n_L 0x20003804 0x10800003\n_L 0x20003808 0x00000000\n_L 0x2000380C 0x0E2FDC67\n_L 0x20003810 0x00000000\n_L 0x20003814 0x0E2FDC67\n_L 0x20003818 0x00000000\n_L 0x2000381C 0x8FBF0000\n_L 0x20003820 0x03E00008\n_L 0x20003824 0x27BD0010\n_L 0x2001B10C 0x0A200E01//Jump\n_L 0x2001B110 0x34040001//FPS\n_L 0x2001B114 0x00000000\n_C0 Unlimited FPS [Default]\n_L 0xE0040E01 0x1001B10C\n_L 0x2001B10C 0x8FBF0000\n_L 0x2001B110 0x03E00008\n_L 0x2001B114 0x27BD0010\n_L 0x10003800 0x00000000"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULES00033.ini",
    "content": "_S ULES-00033\n_G Tony Hawk's Underground 2: Remix [EUR-ENG]\n_C0 60 FPS\n_L 0xE0021080 0x0005F61A\n_L 0x2005F618 0x10000017\n_L 0x2000C190 0x00000000\n_C0 30 FPS [Default]\n_L 0xE0021000 0x0005F61A\n_L 0x2005F618 0x10800017//Vblank\n_L 0x2000C190 0x1480FFEE//CtrlBuff"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULES00034.ini",
    "content": "ULES-00034\n_G Tony Hawk's Underground 2: Remix [EUR-FR]\n_C0 60 FPS\n_L 0xE0021080 0x0005F61A\n_L 0x2005F618 0x10000017\n_L 0x2000C190 0x00000000\n_C0 30 FPS [Default]\n_L 0xE0021000 0x0005F61A\n_L 0x2005F618 0x10800017//Vblank\n_L 0x2000C190 0x1480FFEE//CtrlBuff"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULES00035.ini",
    "content": "_S ULES-00035\n_G Tony Hawk's Underground 2: Remix [EUR-GER]\n_C0 60 FPS\n_L 0xE0021080 0x0005F61A\n_L 0x2005F618 0x10000017\n_L 0x2000C190 0x00000000\n_C0 30 FPS [Default]\n_L 0xE0021000 0x0005F61A\n_L 0x2005F618 0x10800017//Vblank\n_L 0x2000C190 0x1480FFEE//CtrlBuff"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULES00125.ini",
    "content": "_S ULES-00125\n_G Burnout Legends [EUR-v2.00]\n_C1 60 FPS v3\n_L 0xE0020003 0x000555D0//conditional\n_L 0x200555D0 0x00000000//FPS,1\n_L 0x2024A7FC 0x3C043F00//Speed,EnableBeforeIngame\n_L 0xE0010100 0x10441740//Condit,normalGame\n_L 0x2000F380 0x14800003//FPS,2\n_L 0xE0010100 0x00441740//Condit,crashMode\n_L 0x2000F380 0x16200003//FPS,2\n_C0 30 FPS v3 [Default]\n_L 0xE0030000 0x000555D0//conditional\n_L 0x200555D0 0x14A00003//FPS,1\n_L 0x2024A7FC 0x3C043F80//Speed,EnableBeforeIngame\n_L 0x2000F380 0x14800003//FPS,2"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULES00483.ini",
    "content": "_S ULES-00483\n_G The Warriors [EUR]\n_C0 60 FPS\n_L 0xE001FFF6 0x003B4D84\n_L 0x203B4D84 0x00000000\n_C0 30 FPS [Default]\n_L 0x203B4D84 0x1440FFF6"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULES00625.ini",
    "content": "_S ULES-00625\n_G Tony Hawk's Project 8 [EUR-ENG]\n_C0 60 FPS\n_L 0xE0021080 0x00096E16\n_L 0x20096E14 0x10000017\n_L 0x20011C28 0x00000000\n_C0 30 FPS [Default]\n_L 0xE0021000 0x00096E16\n_L 0x20096E14 0x10800017//Vblank\n_L 0x20011C28 0x1480FFEE//CtrlBuff"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULES00626.ini",
    "content": "_S ULES-00626\n_G Tony Hawk's Project 8 [EUR-Multi5]\n_C0 60 FPS\n_L 0xE0021080 0x00096E16\n_L 0x20096E14 0x10000017\n_L 0x20011C28 0x00000000\n_C0 30 FPS [Default]\n_L 0xE0021000 0x00096E16\n_L 0x20096E14 0x10800017//Vblank\n_L 0x20011C28 0x1480FFEE//CtrlBuff"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULES00703.ini",
    "content": "_S ULES-00703\n_G Burnout Dominator [EUR][MULTI5]\n_C0 60 FPS v2\n_L 0xE004001A 0x0002574C\n_L 0x2002574C 0x00000000//FPS\n_L 0x201A0360 0x00000000//WritesSpeed1\n_L 0x204F08BC 0x3C888888//Speed1\n_L 0x2019AE98 0x3C043F00//Speed2,EnableBeforeIngameOnly\n_C0 30 FPS v2 [Default]\n_L 0xE0040000 0x0002574C\n_L 0x2002574C 0x14A0001A//FPS\n_L 0x201A0360 0x089A0360//WritesSpeed1\n_L 0x204F08BC 0x3D088888//Speed1\n_L 0x2019AE98 0x3C043F80//Speed2,EnableBeforeIngameOnly"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULES00968.ini",
    "content": "_S ULES-00968\n_G FlatOut - Head On [EUR]\n_C0 60 FPS\n_L 0x006FC1F0 0x00000000\n_C0 30 FPS [Default]\n_L 0x006FC1F0 0x00000001"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULES00981.ini",
    "content": "_S ULES-00981\n_G Star Wars - The Force Unleashed [EUR-Multi3]\n_C0 60FPS [Fixed]\n_L 0xE0050002 0x004408B4\n_L 0x204408B4 0x00000000//value\n_L 0x202B8B2C 0x00000000\n_L 0x203BB968 0x00000000\n_L 0x202B9130 0x00000000\n_L 0x203BC2F0 0x00000000\n_C0 30FPS [Fixed]\n_L 0xE0050000 0x004408B4\n_L 0x204408B4 0x00000002//value\n_L 0x202B8B2C 0x00000000\n_L 0x203BB968 0x00000000\n_L 0x202B9130 0x00000000\n_L 0x203BC2F0 0x00000000\n_C0 30/60FPS [Default]\n_L 0xE0040000 0x002B8B2C\n_L 0x202B8B2C 0xAC9308B4//30\n_L 0x203BB968 0xAC8608B4//30\n_L 0x202B9130 0xAC8008B4//60\n_L 0x203BC2F0 0xAC8008B4//60\n_S ULES-00981\n_G Star Wars - The Force Unleashed [EUR-Multi3]\n_C0 Red overlay FIX\n_L 0xE001ADAE 0x003E9712\n_L 0x203E9710 0xADA00000\n_C0 Red overlay NO-FIX [Default]\n_L 0xE001ADA0 0x003E9712\n_L 0x203E9710 0xADAE0000"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULES00982.ini",
    "content": "_S ULES-00982\n_G Star Wars - The Force Unleashed [EUR-Multi2]\n_C0 60FPS [Fixed]\n_L 0xE0050002 0x00440A84\n_L 0x20440A84 0x00000000//value\n_L 0x202B8B2C 0x00000000\n_L 0x203BB964 0x00000000\n_L 0x202B9130 0x00000000\n_L 0x203BC2EC 0x00000000\n_C0 30FPS [Fixed]\n_L 0xE0050000 0x00440A84\n_L 0x20440A84 0x00000002//value\n_L 0x202B8B2C 0x00000000\n_L 0x203BB964 0x00000000\n_L 0x202B9130 0x00000000\n_L 0x203BC2EC 0x00000000\n_C0 30/60FPS [Default]\n_L 0xE0040000 0x002B8B2C\n_L 0x202B8B2C 0xAC930A84//30\n_L 0x203BB964 0xAC860A84//30\n_L 0x202B9130 0xAC800A84//60\n_L 0x203BC2EC 0xAC800A84//60\n_S ULES-00982\n_G Star Wars - The Force Unleashed [EUR-Multi2]\n_C0 Red overlay FIX\n_L 0xE001ADAE 0x003E9882\n_L 0x203E9880 0xADA00000\n_C0 Red overlay NO-FIX [Default]\n_L 0xE001ADA0 0x003E9882\n_L 0x203E9880 0xADAE0000"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULES01214.ini",
    "content": "_S ULES-01214\n_G Star Wars Battlefront - Elite Squadron [EUR]\n_C0 60 FPS\n_L 0x20456718 0x42700000\n_C0 45 FPS\n_L 0x20456718 0x42340000\n_C0 40 FPS\n_L 0x20456718 0x42200000\n_C0 30 FPS\n_L 0x20456718 0x41F00000\n_C0 20 FPS [Default]"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULES01402.ini",
    "content": "_S ULES-01402\n_G Split/Second - Velocity [EUR]\n_C0 60 FPS\n_L 0x0018A790 0x00000001\n_C0 30 FPS [Default]\n_L 0x0018A790 0x00000002\n_C0 20 FPS\n_L 0x0018A790 0x00000003"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULES01406.ini",
    "content": "_S ULES-01406\n_G Toy Story 3 [EUR][MULTI2]\n_C0 60 FPS\n_L 0x202E7934 0x00000000\n_C0 30 FPS [Default]\n_L 0x202E7934 0x1080FFFB"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULUS00125.ini",
    "content": "_S ULUS-00125 / ULES-00125\n_G Burnout Legends [USA-v2.00]\n_C1 60 FPS v3\n_L 0xE0020003 0x000555D0//conditional\n_L 0x200555D0 0x00000000//FPS,1\n_L 0x2024A7FC 0x3C043F00//Speed,EnableBeforeIngame\n_L 0xE0010100 0x10441740//Condit,normalGame\n_L 0x2000F380 0x14800003//FPS,2\n_L 0xE0010100 0x00441740//Condit,crashMode\n_L 0x2000F380 0x16200003//FPS,2\n_C0 30 FPS v3 [Default]\n_L 0xE0030000 0x000555D0//conditional\n_L 0x200555D0 0x14A00003//FPS,1\n_L 0x2024A7FC 0x3C043F80//Speed,EnableBeforeIngame\n_L 0x2000F380 0x14800003//FPS,2"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULUS10014.ini",
    "content": "_S ULUS-10014\n_G Tony Hawk's Underground 2: Remix [USA]\n_C1 60 FPS\n_L 0xE0021080 0x0005F642\n_L 0x2005F640 0x10000017\n_L 0x2000C190 0x00000000\n_C0 30 FPS [Default]\n_L 0xE0021000 0x0005F642\n_L 0x2005F640 0x10800017//Vblank\n_L 0x2000C190 0x1480FFEE//CtrlBuff"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULUS10189.ini",
    "content": "_S ULUS-10189\n_G Snoopy vs the Red Baron [USA]\n_C1 60 FPS\n_L 0xE0010000 0x1023F394\n_L 0x204C6940 0x3F000000\n_L 0x0023F394 0x00000000\n_C0 30 FPS [Default]\n_L 0x204C6940 0x3F800000\n_L 0x0023F394 0x00000001"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULUS10197.ini",
    "content": "_S ULUS-10197\n_G Tony Hawk's Project 8 [USA-UMDv1.0]\n_C0 60 FPS\n_L 0xE0021080 0x00097156\n_L 0x20097154 0x10000017\n_L 0x20011C28 0x00000000\n_C0 30 FPS [Default]\n_L 0xE0021000 0x00097156\n_L 0x20097154 0x10800017//Vblank\n_L 0x20011C28 0x1480FFEE//CtrlBuff"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULUS10213.ini",
    "content": "_S ULUS-10213\n_G The Warriors [USA]\n_C1 60 FPS\n_L 0xE001FFF6 0x003B517C\n_L 0x203B517C 0x00000000\n_C0 30 FPS [Default]\n_L 0x203B517C 0x1440FFF6"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULUS10236.ini",
    "content": "_S ULUS-10236\n_G Burnout Dominator [USA]\n_C0 60 FPS v2\n_L 0xE004001A 0x0002574C\n_L 0x2002574C 0x00000000//FPS\n_L 0x201A0358 0x00000000//WritesSpeed1\n_L 0x204F08BC 0x3C888888//Speed1\n_L 0x2019AE90 0x3C043F00//Speed2,EnableBeforeIngameOnly\n_C0 30 FPS v2 [Default]\n_L 0xE0040000 0x0002574C\n_L 0x2002574C 0x14A0001A//FPS\n_L 0x201A0358 0xE60C0034//WritesSpeed1\n_L 0x204F08BC 0x3D088888//Speed1\n_L 0x2019AE90 0x3C043F80//Speed2,EnableBeforeIngameOnly"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULUS10328.ini",
    "content": "_S ULUS-10328\n_G FlatOut - Head On [USA]\n_C0 60 FPS\n_L 0x006FC0F0 0x00000000\n_C0 30 FPS [Default]\n_L 0x006FC0F0 0x00000001"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULUS10345.ini",
    "content": "_S ULUS-10345\n_G Star Wars - The Force Unleashed [USA]\n_C0 60FPS [Fixed]\n_L 0xE0050002 0x00440664\n_L 0x20440664 0x00000000//value\n_L 0x202B8A14 0x00000000\n_L 0x203BB714 0x00000000\n_L 0x202B9018 0x00000000\n_L 0x203BC09C 0x00000000\n_C0 30FPS [Fixed]\n_L 0xE0050000 0x00440664\n_L 0x20440664 0x00000002//value\n_L 0x202B8A14 0x00000000\n_L 0x203BB714 0x00000000\n_L 0x202B9018 0x00000000\n_L 0x203BC09C 0x00000000\n_C0 30/60FPS [Default]\n_L 0xE0040000 0x002B8A14\n_L 0x202B8A14 0xAC930664//30\n_L 0x203BB714 0xAC860664//30\n_L 0x202B9018 0xAC800664//60\n_L 0x203BC09C 0xAC800664//60\n_S ULUS-10345\n_G Star Wars - The Force Unleashed [USA]\n_C0 Red overlay FIX\n_L 0xE001ADAE 0x003E94BE\n_L 0x203E94BC 0xADA00000\n_C0 Red overlay NO-FIX [Default]\n_L 0xE001ADA0 0x003E94BE\n_L 0x203E94BC 0xADAE0000"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULUS10390.ini",
    "content": "_S ULUS-10390\n_G Star Wars Battlefront - Elite Squadron [USA]\n_C0 60 FPS\n_L 0x20456598 0x42700000\n_C0 45 FPS\n_L 0x20456598 0x42340000\n_C0 40 FPS\n_L 0x20456598 0x42200000\n_C0 30 FPS\n_L 0x20456598 0x41F00000\n_C0 20 FPS [Default]\n_L 0x20456598 0x41A00000"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/Cheats/ULUS10507.ini",
    "content": "_S ULUS-10507\n_G Toy Story 3 [USA]\n_C1 60 FPS\n_L 0x202E77CC 0x00000000\n_C0 30 FPS [Default]\n_L 0x202E77CC 0x1080FFFB"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/NPUG80325_ppsspp.ini",
    "content": "﻿# Game config for NPUG80325 - God of War: Chains of Olympus\n[General]\nForceLagSync2 = False\nNumWorkerThreads = 8\nAutoLoadSaveState = 0\nEnableCheats = True\nCwCheatRefreshRate = 77\nScreenshotsAsPNG = False\nStateSlot = 0\nEnableStateUndo = True\nRewindFlipFrequency = 0\nAutoSaveSymbolMap = False\nCacheFullIsoInRam = False\nPauseWhenMinimized = False\nDumpDecryptedEboots = False\nMemStickInserted = True\n[CPU]\nCPUCore = 1\nSeparateSASThread = True\nSeparateIOThread = True\nIOTimingMethod = 0\nFastMemoryAccess = True\nFuncReplacements = True\nPreloadFunctions = False\nJitDisableFlags = 0x00000000\nCPUSpeed = 666\n[Graphics]\nEnableCardboardVR = False\nCardboardScreenSize = 50\nCardboardXShift = 0\nCardboardYShift = 0\nShowFPSCounter = 2\nRenderingMode = 1\nSoftwareRenderer = False\nHardwareTransform = True\nSoftwareSkinning = True\nTextureFiltering = 3\nBufferFiltering = 1\nInternalResolution = 1\nHighQualityDepth = 1\nFrameSkip = 1\nFrameSkipType = 1\nAutoFrameSkip = True\nFrameRate = 0\nFrameRate2 = -1\nAnisotropyLevel = 0\nVertexDecCache = True\nTextureBackoffCache = True\nTextureSecondaryCache = False\nSmallDisplayZoomType = 2\nSmallDisplayOffsetX = 0.500000\nSmallDisplayOffsetY = 0.500000\nSmallDisplayZoomLevel = 1.000000\nImmersiveMode = False\nSustainedPerformanceMode = False\nReplaceTextures = True\nSaveNewTextures = False\nIgnoreTextureFilenames = True\nTexScalingLevel = 1\nTexScalingType = 0\nTexDeposterize = False\nTexHardwareScaling = False\nVSyncInterval = False\nBloomHack = 0\nSplineBezierQuality = 1\nHardwareTessellation = False\nPostShader = Off\nMemBlockTransferGPU = True\nDisableSlowFramebufEffects = True\nFragmentTestCache = True\n[Sound]\nEnable = True\nAudioBackend = 0\nAudioLatency = 1\nExtraAudioBuffering = False\nSoundSpeedHack = False\nAudioResampler = False\nGlobalVolume = 10\nAltSpeedVolume = -1\nAudioDevice = \nAutoAudioDevice = False\n[Control]\nHapticFeedback = False\nShowTouchCross = True\nShowTouchCircle = True\nShowTouchSquare = True\nShowTouchTriangle = True\nComboKey0Mapping = 0\nComboKey1Mapping = 0\nComboKey2Mapping = 0\nComboKey3Mapping = 0\nComboKey4Mapping = 0\nShowTouchControls = False\nDisableDpadDiagonals = False\nGamepadOnlyFocused = False\nTouchButtonStyle = 1\nTouchButtonOpacity = 65\nTouchButtonHideSeconds = 20\nAutoCenterTouchAnalog = False\nActionButtonSpacing2 = 1.000000\nActionButtonCenterX = 0.937500\nActionButtonCenterY = 0.900000\nActionButtonScale = 1.150000\nDPadX = 0.074479\nDPadY = 0.760000\nDPadScale = 1.150000\nShowTouchDpad = True\nDPadSpacing = 1.000000\nStartKeyX = 0.559896\nStartKeyY = 0.942500\nStartKeyScale = 1.150000\nShowTouchStart = True\nSelectKeyX = 0.500000\nSelectKeyY = 0.942500\nSelectKeyScale = 1.150000\nShowTouchSelect = True\nUnthrottleKeyX = 0.440104\nUnthrottleKeyY = 0.942500\nUnthrottleKeyScale = 1.150000\nShowTouchUnthrottle = True\nLKeyX = 0.035937\nLKeyY = 0.635833\nLKeyScale = 1.150000\nShowTouchLTrigger = True\nRKeyX = 0.964063\nRKeyY = 0.635833\nRKeyScale = 1.150000\nShowTouchRTrigger = True\nAnalogStickX = 0.074479\nAnalogStickY = 0.923333\nAnalogStickScale = 1.150000\nShowAnalogStick = True\nRightAnalogStickX = 0.906250\nRightAnalogStickY = 0.872222\nRightAnalogStickScale = 1.150000\nShowRightAnalogStick = False\nfcombo0X = 0.571875\nfcombo0Y = 0.500000\ncomboKeyScale0 = 1.150000\nShowComboKey0 = False\nfcombo1X = 0.631771\nfcombo1Y = 0.500000\ncomboKeyScale1 = 1.150000\nShowComboKey1 = False\nfcombo2X = 0.691667\nfcombo2Y = 0.500000\ncomboKeyScale2 = 1.150000\nShowComboKey2 = False\nfcombo3X = 0.571875\nfcombo3Y = 0.333333\ncomboKeyScale3 = 1.150000\nShowComboKey3 = False\nfcombo4X = 0.631771\nfcombo4Y = 0.333333\ncomboKeyScale4 = 1.150000\nShowComboKey4 = False\nSpeed1KeyX = 0.440104\nSpeed1KeyY = 0.885000\nSpeed1KeyScale = 1.150000\nShowSpeed1Key = False\nSpeed2KeyX = 0.500000\nSpeed2KeyY = 0.885000\nSpeed2KeyScale = 1.150000\nShowSpeed2Key = False\nXInputAnalogSensitivity = 1.000000\nAnalogLimiterDeadzone = 0.600000\nUseMouse = False\nMapMouse = False\nConfineMap = False\nMouseSensitivity = 0.100000\nMouseSmoothing = 0.900000\n[Network]\nEnableWlan = False\nEnableAdhocServer = False\n[SystemParam]\nPSPModel = 0\nPSPFirmwareVersion = 660\nNickName = PPSSPP\nproAdhocServer = black-seraph.com\nMacAddress = 4e:7a:78:d9:49:32\nPortOffset = 0\nLanguage = 1\nTimeFormat = 1\nDateFormat = 1\nTimeZone = 0\nDayLightSavings = False\nButtonPreference = 1\nLockParentalLevel = 0\nWlanAdhocChannel = 0\nWlanPowerSave = False\nEncryptSave = True\n[ControlMapping]\nUp = 1-19,10-19\nDown = 1-20,10-20\nLeft = 1-21,10-21\nRight = 1-22,10-22\nCircle = 1-52,10-190\nCross = 1-54,10-189\nSquare = 1-29,10-191\nTriangle = 1-47,10-188\nStart = 1-62,10-197\nSelect = 1-66,10-196\nL = 1-45,10-193\nR = 1-51,10-192\nAn.Up = 1-37,10-4003\nAn.Down = 1-39,10-4002\nAn.Left = 1-38,10-4001\nAn.Right = 1-40,10-4000\nAnalog limiter = 1-60\nRapidFire = 1-59\nUnthrottle = 1-61\nSpeedToggle = 1-68\nPause = 1-111\nRewind = 1-67\n"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/UCES00422_ppsspp.ini",
    "content": "﻿# Game config for UCES00422 - RIDGE RACER 2\n[General]\nForceLagSync2 = False\nNumWorkerThreads = 6\nAutoLoadSaveState = 0\nEnableCheats = False\nCwCheatRefreshRate = 77\nScreenshotsAsPNG = False\nStateSlot = 0\nEnableStateUndo = True\nRewindFlipFrequency = 0\nAutoSaveSymbolMap = False\nCacheFullIsoInRam = False\nPauseWhenMinimized = False\nDumpDecryptedEboots = False\nMemStickInserted = True\n[CPU]\nCPUCore = 1\nSeparateSASThread = True\nSeparateIOThread = True\nIOTimingMethod = 0\nFastMemoryAccess = True\nFuncReplacements = True\nPreloadFunctions = False\nJitDisableFlags = 0x00000000\nCPUSpeed = 333\n[Graphics]\nShowFPSCounter = 2\nRenderingMode = 1\nSoftwareRenderer = False\nHardwareTransform = True\nSoftwareSkinning = True\nTextureFiltering = 2\nBufferFiltering = 1\nInternalResolution = 1\nHighQualityDepth = 1\nFrameSkip = 0\nFrameSkipType = 1\nAutoFrameSkip = False\nFrameRate = 0\nFrameRate2 = -1\nAnisotropyLevel = 0\nVertexDecCache = True\nTextureBackoffCache = True\nTextureSecondaryCache = False\nSmallDisplayZoomType = 2\nSmallDisplayOffsetX = 0.500000\nSmallDisplayOffsetY = 0.500000\nSmallDisplayZoomLevel = 1.000000\nImmersiveMode = False\nSustainedPerformanceMode = False\nReplaceTextures = True\nSaveNewTextures = False\nIgnoreTextureFilenames = False\nTexScalingLevel = 1\nTexScalingType = 0\nTexDeposterize = False\nVSyncInterval = False\nBloomHack = 0\nSplineBezierQuality = 1\nHardwareTessellation = False\nPostShader = Off\nMemBlockTransferGPU = True\nDisableSlowFramebufEffects = True\nFragmentTestCache = True\n[Sound]\nEnable = True\nAudioBackend = 0\nAudioLatency = 1\nExtraAudioBuffering = False\nSoundSpeedHack = False\nAudioResampler = False\nGlobalVolume = 10\nAltSpeedVolume = -1\nAudioDevice = \nAutoAudioDevice = False\n[Control]\nHapticFeedback = False\nShowTouchCross = True\nShowTouchCircle = True\nShowTouchSquare = True\nShowTouchTriangle = True\nComboKey0Mapping = 0\nComboKey1Mapping = 0\nComboKey2Mapping = 0\nComboKey3Mapping = 0\nComboKey4Mapping = 0\nShowTouchControls = False\nDisableDpadDiagonals = False\nGamepadOnlyFocused = False\nTouchButtonStyle = 1\nTouchButtonOpacity = 65\nTouchButtonHideSeconds = 20\nAutoCenterTouchAnalog = False\nActionButtonSpacing2 = 1.000000\nActionButtonCenterX = 0.906250\nActionButtonCenterY = 0.833333\nActionButtonScale = 1.150000\nDPadX = 0.111719\nDPadY = 0.600000\nDPadScale = 1.150000\nShowTouchDpad = True\nDPadSpacing = 1.000000\nStartKeyX = 0.589844\nStartKeyY = 0.904167\nStartKeyScale = 1.150000\nShowTouchStart = True\nSelectKeyX = 0.500000\nSelectKeyY = 0.904167\nSelectKeyScale = 1.150000\nShowTouchSelect = True\nUnthrottleKeyX = 0.410156\nUnthrottleKeyY = 0.904167\nUnthrottleKeyScale = 1.150000\nShowTouchUnthrottle = True\nLKeyX = 0.053906\nLKeyY = 0.393056\nLKeyScale = 1.150000\nShowTouchLTrigger = True\nRKeyX = 0.946094\nRKeyY = 0.393056\nRKeyScale = 1.150000\nShowTouchRTrigger = True\nAnalogStickX = 0.111719\nAnalogStickY = 0.872222\nAnalogStickScale = 1.150000\nShowAnalogStick = True\nRightAnalogStickX = 0.906250\nRightAnalogStickY = 0.872222\nRightAnalogStickScale = 1.150000\nShowRightAnalogStick = False\nfcombo0X = 0.607813\nfcombo0Y = 0.500000\ncomboKeyScale0 = 1.150000\nShowComboKey0 = False\nfcombo1X = 0.697656\nfcombo1Y = 0.500000\ncomboKeyScale1 = 1.150000\nShowComboKey1 = False\nfcombo2X = 0.787500\nfcombo2Y = 0.500000\ncomboKeyScale2 = 1.150000\nShowComboKey2 = False\nfcombo3X = 0.607813\nfcombo3Y = 0.333333\ncomboKeyScale3 = 1.150000\nShowComboKey3 = False\nfcombo4X = 0.697656\nfcombo4Y = 0.333333\ncomboKeyScale4 = 1.150000\nShowComboKey4 = False\nSpeed1KeyX = 0.410156\nSpeed1KeyY = 0.808333\nSpeed1KeyScale = 1.150000\nShowSpeed1Key = False\nSpeed2KeyX = 0.500000\nSpeed2KeyY = 0.808333\nSpeed2KeyScale = 1.150000\nShowSpeed2Key = False\nXInputAnalogSensitivity = 1.000000\nAnalogLimiterDeadzone = 0.600000\nUseMouse = False\nMapMouse = False\nConfineMap = False\nMouseSensitivity = 0.100000\nMouseSmoothing = 0.900000\n[Network]\nEnableWlan = False\nEnableAdhocServer = False\n[SystemParam]\nPSPModel = 0\nPSPFirmwareVersion = 660\nNickName = PPSSPP\nproAdhocServer = black-seraph.com\nMacAddress = 07:26:4f:78:37:24\nPortOffset = 0\nLanguage = 1\nTimeFormat = 1\nDateFormat = 1\nTimeZone = 0\nDayLightSavings = False\nButtonPreference = 1\nLockParentalLevel = 0\nWlanAdhocChannel = 0\nWlanPowerSave = False\nEncryptSave = True\n[ControlMapping]\nUp = 1-19,10-19\nDown = 1-20,10-20\nLeft = 1-21,10-21\nRight = 1-22,10-22\nCircle = 1-52,10-190\nCross = 1-54,10-189\nSquare = 1-29,10-191\nTriangle = 1-47,10-188\nStart = 1-62,10-197\nSelect = 1-66,10-196\nL = 1-45,10-193\nR = 1-51,10-192\nAn.Up = 1-37,10-4003\nAn.Down = 1-39,10-4002\nAn.Left = 1-38,10-4001\nAn.Right = 1-40,10-4000\nAnalog limiter = 1-60\nRapidFire = 1-59\nUnthrottle = 1-61\nSpeedToggle = 1-68\nPause = 1-111\nRewind = 1-67\n"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/UCUS98737_ppsspp.ini",
    "content": "﻿# Game config for UCUS98737 - God of War®: Ghost of Sparta\n[General]\nForceLagSync2 = False\nNumWorkerThreads = 8\nAutoLoadSaveState = 0\nEnableCheats = True\nCwCheatRefreshRate = 77\nScreenshotsAsPNG = False\nStateSlot = 0\nEnableStateUndo = True\nRewindFlipFrequency = 0\nAutoSaveSymbolMap = False\nCacheFullIsoInRam = False\nPauseWhenMinimized = False\nDumpDecryptedEboots = False\nMemStickInserted = True\n[CPU]\nCPUCore = 1\nSeparateSASThread = True\nSeparateIOThread = True\nIOTimingMethod = 0\nFastMemoryAccess = True\nFuncReplacements = True\nPreloadFunctions = False\nJitDisableFlags = 0x00000000\nCPUSpeed = 666\n[Graphics]\nEnableCardboardVR = False\nCardboardScreenSize = 50\nCardboardXShift = 0\nCardboardYShift = 0\nShowFPSCounter = 2\nRenderingMode = 1\nSoftwareRenderer = False\nHardwareTransform = True\nSoftwareSkinning = True\nTextureFiltering = 3\nBufferFiltering = 1\nInternalResolution = 1\nHighQualityDepth = 1\nFrameSkip = 1\nFrameSkipType = 1\nAutoFrameSkip = True\nFrameRate = 0\nFrameRate2 = -1\nAnisotropyLevel = 0\nVertexDecCache = True\nTextureBackoffCache = True\nTextureSecondaryCache = False\nSmallDisplayZoomType = 2\nSmallDisplayOffsetX = 0.500000\nSmallDisplayOffsetY = 0.500000\nSmallDisplayZoomLevel = 1.000000\nImmersiveMode = False\nSustainedPerformanceMode = False\nReplaceTextures = True\nSaveNewTextures = False\nIgnoreTextureFilenames = True\nTexScalingLevel = 1\nTexScalingType = 0\nTexDeposterize = False\nTexHardwareScaling = False\nVSyncInterval = False\nBloomHack = 0\nSplineBezierQuality = 1\nHardwareTessellation = False\nPostShader = Off\nMemBlockTransferGPU = True\nDisableSlowFramebufEffects = True\nFragmentTestCache = True\n[Sound]\nEnable = True\nAudioBackend = 0\nAudioLatency = 1\nExtraAudioBuffering = False\nSoundSpeedHack = False\nAudioResampler = False\nGlobalVolume = 10\nAltSpeedVolume = -1\nAudioDevice = \nAutoAudioDevice = False\n[Control]\nHapticFeedback = False\nShowTouchCross = True\nShowTouchCircle = True\nShowTouchSquare = True\nShowTouchTriangle = True\nComboKey0Mapping = 0\nComboKey1Mapping = 0\nComboKey2Mapping = 0\nComboKey3Mapping = 0\nComboKey4Mapping = 0\nShowTouchControls = False\nDisableDpadDiagonals = False\nGamepadOnlyFocused = False\nTouchButtonStyle = 1\nTouchButtonOpacity = 65\nTouchButtonHideSeconds = 20\nAutoCenterTouchAnalog = False\nActionButtonSpacing2 = 1.000000\nActionButtonCenterX = 0.937500\nActionButtonCenterY = 0.900000\nActionButtonScale = 1.150000\nDPadX = 0.074479\nDPadY = 0.760000\nDPadScale = 1.150000\nShowTouchDpad = True\nDPadSpacing = 1.000000\nStartKeyX = 0.559896\nStartKeyY = 0.942500\nStartKeyScale = 1.150000\nShowTouchStart = True\nSelectKeyX = 0.500000\nSelectKeyY = 0.942500\nSelectKeyScale = 1.150000\nShowTouchSelect = True\nUnthrottleKeyX = 0.440104\nUnthrottleKeyY = 0.942500\nUnthrottleKeyScale = 1.150000\nShowTouchUnthrottle = True\nLKeyX = 0.035937\nLKeyY = 0.635833\nLKeyScale = 1.150000\nShowTouchLTrigger = True\nRKeyX = 0.964063\nRKeyY = 0.635833\nRKeyScale = 1.150000\nShowTouchRTrigger = True\nAnalogStickX = 0.074479\nAnalogStickY = 0.923333\nAnalogStickScale = 1.150000\nShowAnalogStick = True\nRightAnalogStickX = 0.906250\nRightAnalogStickY = 0.872222\nRightAnalogStickScale = 1.150000\nShowRightAnalogStick = False\nfcombo0X = 0.571875\nfcombo0Y = 0.500000\ncomboKeyScale0 = 1.150000\nShowComboKey0 = False\nfcombo1X = 0.631771\nfcombo1Y = 0.500000\ncomboKeyScale1 = 1.150000\nShowComboKey1 = False\nfcombo2X = 0.691667\nfcombo2Y = 0.500000\ncomboKeyScale2 = 1.150000\nShowComboKey2 = False\nfcombo3X = 0.571875\nfcombo3Y = 0.333333\ncomboKeyScale3 = 1.150000\nShowComboKey3 = False\nfcombo4X = 0.631771\nfcombo4Y = 0.333333\ncomboKeyScale4 = 1.150000\nShowComboKey4 = False\nSpeed1KeyX = 0.440104\nSpeed1KeyY = 0.885000\nSpeed1KeyScale = 1.150000\nShowSpeed1Key = False\nSpeed2KeyX = 0.500000\nSpeed2KeyY = 0.885000\nSpeed2KeyScale = 1.150000\nShowSpeed2Key = False\nXInputAnalogSensitivity = 1.000000\nAnalogLimiterDeadzone = 0.600000\nUseMouse = False\nMapMouse = False\nConfineMap = False\nMouseSensitivity = 0.100000\nMouseSmoothing = 0.900000\n[Network]\nEnableWlan = False\nEnableAdhocServer = False\n[SystemParam]\nPSPModel = 0\nPSPFirmwareVersion = 660\nNickName = PPSSPP\nproAdhocServer = black-seraph.com\nMacAddress = 4e:7a:78:d9:49:32\nPortOffset = 0\nLanguage = 1\nTimeFormat = 1\nDateFormat = 1\nTimeZone = 0\nDayLightSavings = False\nButtonPreference = 1\nLockParentalLevel = 0\nWlanAdhocChannel = 0\nWlanPowerSave = False\nEncryptSave = True\n[ControlMapping]\nUp = 1-19,10-19\nDown = 1-20,10-20\nLeft = 1-21,10-21\nRight = 1-22,10-22\nCircle = 1-52,10-190\nCross = 1-54,10-189\nSquare = 1-29,10-191\nTriangle = 1-47,10-188\nStart = 1-62,10-197\nSelect = 1-66,10-196\nL = 1-45,10-193\nR = 1-51,10-192\nAn.Up = 1-37,10-4003\nAn.Down = 1-39,10-4002\nAn.Left = 1-38,10-4001\nAn.Right = 1-40,10-4000\nAnalog limiter = 1-60\nRapidFire = 1-59\nUnthrottle = 1-61\nSpeedToggle = 1-68\nPause = 1-111\nRewind = 1-67\n"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/ULUS10001_ppsspp.ini",
    "content": "﻿# Game config for ULUS10001 - RIDGE RACER\n[General]\nForceLagSync2 = False\nNumWorkerThreads = 6\nAutoLoadSaveState = 0\nEnableCheats = False\nCwCheatRefreshRate = 77\nScreenshotsAsPNG = False\nStateSlot = 0\nEnableStateUndo = True\nRewindFlipFrequency = 0\nAutoSaveSymbolMap = False\nCacheFullIsoInRam = False\nPauseWhenMinimized = False\nDumpDecryptedEboots = False\nMemStickInserted = True\n[CPU]\nCPUCore = 1\nSeparateSASThread = True\nSeparateIOThread = True\nIOTimingMethod = 0\nFastMemoryAccess = True\nFuncReplacements = True\nPreloadFunctions = False\nJitDisableFlags = 0x00000000\nCPUSpeed = 333\n[Graphics]\nShowFPSCounter = 2\nRenderingMode = 1\nSoftwareRenderer = False\nHardwareTransform = True\nSoftwareSkinning = True\nTextureFiltering = 2\nBufferFiltering = 1\nInternalResolution = 1\nHighQualityDepth = 1\nFrameSkip = 0\nFrameSkipType = 1\nAutoFrameSkip = False\nFrameRate = 0\nFrameRate2 = -1\nAnisotropyLevel = 0\nVertexDecCache = True\nTextureBackoffCache = True\nTextureSecondaryCache = False\nSmallDisplayZoomType = 2\nSmallDisplayOffsetX = 0.500000\nSmallDisplayOffsetY = 0.500000\nSmallDisplayZoomLevel = 1.000000\nImmersiveMode = False\nSustainedPerformanceMode = False\nReplaceTextures = True\nSaveNewTextures = False\nIgnoreTextureFilenames = False\nTexScalingLevel = 1\nTexScalingType = 0\nTexDeposterize = False\nTexHardwareScaling = False\nVSyncInterval = False\nBloomHack = 0\nSplineBezierQuality = 1\nHardwareTessellation = False\nPostShader = Off\nMemBlockTransferGPU = True\nDisableSlowFramebufEffects = True\nFragmentTestCache = True\n[Sound]\nEnable = True\nAudioBackend = 0\nAudioLatency = 1\nExtraAudioBuffering = False\nSoundSpeedHack = False\nAudioResampler = False\nGlobalVolume = 10\nAltSpeedVolume = -1\nAudioDevice = \nAutoAudioDevice = False\n[Control]\nHapticFeedback = False\nShowTouchCross = True\nShowTouchCircle = True\nShowTouchSquare = True\nShowTouchTriangle = True\nComboKey0Mapping = 0\nComboKey1Mapping = 0\nComboKey2Mapping = 0\nComboKey3Mapping = 0\nComboKey4Mapping = 0\nShowTouchControls = False\nDisableDpadDiagonals = False\nGamepadOnlyFocused = False\nTouchButtonStyle = 1\nTouchButtonOpacity = 65\nTouchButtonHideSeconds = 20\nAutoCenterTouchAnalog = False\nActionButtonSpacing2 = 1.000000\nActionButtonCenterX = 0.906250\nActionButtonCenterY = 0.833333\nActionButtonScale = 1.150000\nDPadX = 0.111719\nDPadY = 0.600000\nDPadScale = 1.150000\nShowTouchDpad = True\nDPadSpacing = 1.000000\nStartKeyX = 0.589844\nStartKeyY = 0.904167\nStartKeyScale = 1.150000\nShowTouchStart = True\nSelectKeyX = 0.500000\nSelectKeyY = 0.904167\nSelectKeyScale = 1.150000\nShowTouchSelect = True\nUnthrottleKeyX = 0.410156\nUnthrottleKeyY = 0.904167\nUnthrottleKeyScale = 1.150000\nShowTouchUnthrottle = True\nLKeyX = 0.053906\nLKeyY = 0.393056\nLKeyScale = 1.150000\nShowTouchLTrigger = True\nRKeyX = 0.946094\nRKeyY = 0.393056\nRKeyScale = 1.150000\nShowTouchRTrigger = True\nAnalogStickX = 0.111719\nAnalogStickY = 0.872222\nAnalogStickScale = 1.150000\nShowAnalogStick = True\nRightAnalogStickX = 0.906250\nRightAnalogStickY = 0.872222\nRightAnalogStickScale = 1.150000\nShowRightAnalogStick = False\nfcombo0X = 0.607813\nfcombo0Y = 0.500000\ncomboKeyScale0 = 1.150000\nShowComboKey0 = False\nfcombo1X = 0.697656\nfcombo1Y = 0.500000\ncomboKeyScale1 = 1.150000\nShowComboKey1 = False\nfcombo2X = 0.787500\nfcombo2Y = 0.500000\ncomboKeyScale2 = 1.150000\nShowComboKey2 = False\nfcombo3X = 0.607813\nfcombo3Y = 0.333333\ncomboKeyScale3 = 1.150000\nShowComboKey3 = False\nfcombo4X = 0.697656\nfcombo4Y = 0.333333\ncomboKeyScale4 = 1.150000\nShowComboKey4 = False\nSpeed1KeyX = 0.410156\nSpeed1KeyY = 0.808333\nSpeed1KeyScale = 1.150000\nShowSpeed1Key = False\nSpeed2KeyX = 0.500000\nSpeed2KeyY = 0.808333\nSpeed2KeyScale = 1.150000\nShowSpeed2Key = False\nXInputAnalogSensitivity = 1.000000\nAnalogLimiterDeadzone = 0.600000\nUseMouse = False\nMapMouse = False\nConfineMap = False\nMouseSensitivity = 0.100000\nMouseSmoothing = 0.900000\n[Network]\nEnableWlan = False\nEnableAdhocServer = False\n[SystemParam]\nPSPModel = 0\nPSPFirmwareVersion = 660\nNickName = PPSSPP\nproAdhocServer = black-seraph.com\nMacAddress = 07:26:4f:78:37:24\nPortOffset = 0\nLanguage = 1\nTimeFormat = 1\nDateFormat = 1\nTimeZone = 0\nDayLightSavings = False\nButtonPreference = 1\nLockParentalLevel = 0\nWlanAdhocChannel = 0\nWlanPowerSave = False\nEncryptSave = True\n[ControlMapping]\nUp = 1-19,10-19\nDown = 1-20,10-20\nLeft = 1-21,10-21\nRight = 1-22,10-22\nCircle = 1-52,10-190\nCross = 1-54,10-189\nSquare = 1-29,10-191\nTriangle = 1-47,10-188\nStart = 1-62,10-197\nSelect = 1-66,10-196\nL = 1-45,10-193\nR = 1-51,10-192\nAn.Up = 1-37,10-4003\nAn.Down = 1-39,10-4002\nAn.Left = 1-38,10-4001\nAn.Right = 1-40,10-4000\nAnalog limiter = 1-60\nRapidFire = 1-59\nUnthrottle = 1-61\nSpeedToggle = 1-68\nPause = 1-111\nRewind = 1-67\n"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/ULUS10064_ppsspp.ini",
    "content": "﻿[General]\nForceLagSync = False\nNumWorkerThreads = 8\nAutoLoadSaveState = 0\nEnableCheats = True\nCwCheatRefreshRate = 77\nScreenshotsAsPNG = False\nStateSlot = 0\nEnableStateUndo = True\nRewindFlipFrequency = 0\nAutoSaveSymbolMap = False\nCacheFullIsoInRam = False\nPauseWhenMinimized = False\nDumpDecryptedEboots = False\nMemStickInserted = True\n[CPU]\nCPUCore = 1\nSeparateSASThread = True\nSeparateIOThread = True\nIOTimingMethod = 0\nFastMemoryAccess = True\nFuncReplacements = True\nPreloadFunctions = False\nCPUSpeed = 666\n[Graphics]\nEnableCardboard = False\nCardboardScreenSize = 50\nCardboardXShift = 0\nCardboardYShift = 0\nShowFPSCounter = 2\nRenderingMode = 0\nSoftwareRenderer = False\nHardwareTransform = True\nSoftwareSkinning = True\nTextureFiltering = 2\nBufferFiltering = 1\nInternalResolution = 2\nHighQualityDepth = 1\nFrameSkip = 0\nFrameSkipType = 1\nAutoFrameSkip = False\nFrameRate = 0\nFrameRate2 = -1\nForceMaxEmulatedFPS = 60\nAnisotropyLevel = 0\nVertexDecCache = True\nTextureBackoffCache = True\nTextureSecondaryCache = False\nSmallDisplayZoomType = 2\nSmallDisplayOffsetX = 0.500000\nSmallDisplayOffsetY = 0.500000\nSmallDisplayZoomLevel = 1.000000\nImmersiveMode = False\nSustainedPerformanceMode = False\nTrueColor = True\nReplaceTextures = True\nSaveNewTextures = False\nTexScalingLevel = 1\nTexScalingType = 0\nTexDeposterize = False\nVSyncInterval = False\nDisableStencilTest = False\nBloomHack = 0\nTimerHack = False\nSplineBezierQuality = 1\nHardwareTessellation = False\nPostShader = Off\nMemBlockTransferGPU = True\nDisableSlowFramebufEffects = True\nFragmentTestCache = True\n[Sound]\nEnable = True\nAudioBackend = 0\nAudioLatency = 1\nExtraAudioBuffering = False\nSoundSpeedHack = False\nAudioResampler = False\nGlobalVolume = 10\nAltSpeedVolume = -1\nAudioDevice = \nAutoAudioDevice = False\n[Control]\nHapticFeedback = False\nShowTouchCross = True\nShowTouchCircle = True\nShowTouchSquare = True\nShowTouchTriangle = True\nComboKey0Mapping = 0\nComboKey1Mapping = 0\nComboKey2Mapping = 0\nComboKey3Mapping = 0\nComboKey4Mapping = 0\nShowTouchControls = False\nDisableDpadDiagonals = False\nGamepadOnlyFocused = False\nTouchButtonStyle = 1\nTouchButtonOpacity = 65\nTouchButtonHideSeconds = 20\nAutoCenterTouchAnalog = False\nActionButtonSpacing2 = 1.000000\nActionButtonCenterX = 0.937500\nActionButtonCenterY = 0.900000\nActionButtonScale = 1.150000\nDPadX = 0.074479\nDPadY = 0.760000\nDPadScale = 1.150000\nShowTouchDpad = True\nDPadSpacing = 1.000000\nStartKeyX = 0.559896\nStartKeyY = 0.942500\nStartKeyScale = 1.150000\nShowTouchStart = True\nSelectKeyX = 0.500000\nSelectKeyY = 0.942500\nSelectKeyScale = 1.150000\nShowTouchSelect = True\nUnthrottleKeyX = 0.440104\nUnthrottleKeyY = 0.942500\nUnthrottleKeyScale = 1.150000\nShowTouchUnthrottle = True\nLKeyX = 0.035937\nLKeyY = 0.635833\nLKeyScale = 1.150000\nShowTouchLTrigger = True\nRKeyX = 0.964063\nRKeyY = 0.635833\nRKeyScale = 1.150000\nShowTouchRTrigger = True\nAnalogStickX = 0.074479\nAnalogStickY = 0.923333\nAnalogStickScale = 1.150000\nShowAnalogStick = True\nfcombo0X = 0.571875\nfcombo0Y = 0.500000\ncomboKeyScale0 = 1.150000\nShowComboKey0 = False\nfcombo1X = 0.631771\nfcombo1Y = 0.500000\ncomboKeyScale1 = 1.150000\nShowComboKey1 = False\nfcombo2X = 0.691667\nfcombo2Y = 0.500000\ncomboKeyScale2 = 1.150000\nShowComboKey2 = False\nfcombo3X = 0.571875\nfcombo3Y = 0.333333\ncomboKeyScale3 = 1.150000\nShowComboKey3 = False\nfcombo4X = 0.631771\nfcombo4Y = 0.333333\ncomboKeyScale4 = 1.150000\nShowComboKey4 = False\nSpeed1KeyX = 0.440104\nSpeed1KeyY = 0.885000\nSpeed1KeyScale = 1.150000\nShowSpeed1Key = False\nSpeed2KeyX = 0.500000\nSpeed2KeyY = 0.885000\nSpeed2KeyScale = 1.150000\nShowSpeed2Key = False\nXInputAnalogSensitivity = 1.000000\nAnalogLimiterDeadzone = 0.600000\nUseMouse = False\nMapMouse = False\nConfineMap = False\nMouseSensitivity = 0.100000\nMouseSmoothing = 0.900000\n[Network]\nEnableWlan = False\nEnableAdhocServer = False\n[SystemParam]\nPSPModel = 0\nPSPFirmwareVersion = 660\nNickName = PPSSPP\nproAdhocServer = black-seraph.com\nMacAddress = 4e:7a:78:d9:49:32\nPortOffset = 0\nLanguage = 1\nTimeFormat = 1\nDateFormat = 1\nTimeZone = 0\nDayLightSavings = False\nButtonPreference = 1\nLockParentalLevel = 0\nWlanAdhocChannel = 0\nWlanPowerSave = False\nEncryptSave = True\n[Debugger]\n[JIT]\n[Upgrade]\n[Theme]\n[ControlMapping]\nUp = 1-19,10-19\nDown = 1-20,10-20\nLeft = 1-21,10-21\nRight = 1-22,10-22\nCircle = 1-52,10-190\nCross = 1-54,10-189\nSquare = 1-29,10-191\nTriangle = 1-47,10-188\nStart = 1-62,10-197\nSelect = 1-66,10-196\nL = 1-45,10-194\nR = 1-51,10-195\nAn.Up = 1-37,10-4003\nAn.Down = 1-39,10-4002\nAn.Left = 1-38,10-4001\nAn.Right = 1-40,10-4000\nAnalog limiter = 1-60\nRapidFire = 1-59\nUnthrottle = 1-61\nSpeedToggle = 1-68\nPause = 1-111\nRewind = 1-67\n"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/controls.ini",
    "content": "﻿[ControlMapping]\nUp = 1-19,10-19\nDown = 1-20,10-20\nLeft = 1-21,10-21\nRight = 1-22,10-22\nCircle = 1-54,10-189\nCross = 1-52,10-190\nSquare = 1-47,10-188\nTriangle = 1-29,10-191\nStart = 1-62,10-197\nSelect = 1-66,10-196\nL = 1-45,10-193\nR = 1-51,10-192\nAn.Up = 1-37,10-4003\nAn.Down = 1-39,10-4002\nAn.Left = 1-38,10-4001\nAn.Right = 1-40,10-4000\nAnalog limiter = 1-60\nRapidFire = 1-59\nUnthrottle = 1-61\nSpeedToggle = 1-68\nPause = 1-111\nRewind = 1-67\n"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/config/PSP/SYSTEM/ppsspp.ini",
    "content": "﻿[General]\nFirstRun = False\nRunCount = 1\nEnable Logging = False\nAutoRun = True\nBrowse = False\nIgnoreBadMemAccess = True\nCurrentDirectory = /storage/roms/psp\nShowDebuggerOnLoad = False\nCheckForNewVersion = False\nLanguage = en_US\nForceLagSync = False\nDiscordPresence = False\nNumWorkerThreads = 8\nAutoLoadSaveState = 0\nEnableCheats = True\nCwCheatRefreshRate = 77\nScreenshotsAsPNG = False\nUseFFV1 = False\nDumpFrames = False\nDumpAudio = False\nSaveLoadResetsAVdumping = False\nStateSlot = 0\nEnableStateUndo = True\nRewindFlipFrequency = 0\nGridView1 = True\nGridView2 = True\nGridView3 = False\nComboMode = 0\nReportingHost = default\nAutoSaveSymbolMap = False\nCacheFullIsoInRam = False\nRemoteISOPort = 0\nLastRemoteISOServer = \nLastRemoteISOPort = 0\nRemoteISOManualConfig = False\nRemoteShareOnStartup = False\nRemoteISOSubdir = /\nRemoteDebuggerOnStartup = False\nInternalScreenRotation = 1\nPauseWhenMinimized = False\nDumpDecryptedEboots = False\nMemStickInserted = True\nForceLagSync2 = False\n[CPU]\nCPUCore = 1\nSeparateSASThread = True\nSeparateIOThread = True\nIOTimingMethod = 0\nFastMemoryAccess = True\nFuncReplacements = True\nHideSlowWarnings = False\nHideStateWarnings = False\nPreloadFunctions = False\nCPUSpeed = 666\nJitDisableFlags = 0x00000000\n[Graphics]\nEnableCardboard = False\nCardboardScreenSize = 50\nCardboardXShift = 0\nCardboardYShift = 0\nShowFPSCounter = 2\nGraphicsBackend = 0\nFailedGraphicsBackends = \nVulkanDevice = \nRenderingMode = 1\nSoftwareRenderer = False\nHardwareTransform = True\nSoftwareSkinning = True\nTextureFiltering = 3\nBufferFiltering = 1\nInternalResolution = 2\nAndroidHwScale = 1\nHighQualityDepth = 1\nFrameSkip = 1\nFrameSkipType = 1\nAutoFrameSkip = True\nFrameRate = 0\nFrameRate2 = -1\nFrameSkipUnthrottle = True\nForceMaxEmulatedFPS = 60\nAnisotropyLevel = 0\nVertexDecCache = True\nTextureBackoffCache = True\nTextureSecondaryCache = False\nFullScreen = False\nFullScreenMulti = False\nSmallDisplayZoomType = 2\nSmallDisplayOffsetX = 0.500000\nSmallDisplayOffsetY = 0.500000\nSmallDisplayZoomLevel = 1.000000\nImmersiveMode = False\nSustainedPerformanceMode = False\nTrueColor = True\nReplaceTextures = True\nSaveNewTextures = False\nIgnoreTextureFilenames = True\nTexScalingLevel = 1\nTexScalingType = 0\nTexDeposterize = False\nVSyncInterval = False\nDisableStencilTest = False\nBloomHack = 0\nTimerHack = False\nSplineBezierQuality = 1\nHardwareTessellation = False\nPostShader = Off\nMemBlockTransferGPU = True\nDisableSlowFramebufEffects = True\nFragmentTestCache = True\nLogFrameDrops = False\n[Sound]\nEnable = True\nAudioBackend = 0\nAudioLatency = 1\nExtraAudioBuffering = False\nSoundSpeedHack = False\nAudioResampler = False\nGlobalVolume = 10\nAltSpeedVolume = -1\nAudioDevice = \nAutoAudioDevice = False\n[Control]\nHapticFeedback = False\nShowTouchCross = True\nShowTouchCircle = True\nShowTouchSquare = True\nShowTouchTriangle = True\nComboKey0Mapping = 0\nComboKey1Mapping = 0\nComboKey2Mapping = 0\nComboKey3Mapping = 0\nComboKey4Mapping = 0\nShowTouchPause = False\nShowTouchControls = False\nDisableDpadDiagonals = False\nGamepadOnlyFocused = False\nTouchButtonStyle = 1\nTouchButtonOpacity = 65\nTouchButtonHideSeconds = 20\nAutoCenterTouchAnalog = False\nActionButtonSpacing2 = 1.000000\nActionButtonCenterX = 0.937500\nActionButtonCenterY = 0.900000\nActionButtonScale = 1.150000\nDPadX = 0.074479\nDPadY = 0.760000\nDPadScale = 1.150000\nShowTouchDpad = True\nDPadSpacing = 1.000000\nStartKeyX = 0.559896\nStartKeyY = 0.942500\nStartKeyScale = 1.150000\nShowTouchStart = True\nSelectKeyX = 0.500000\nSelectKeyY = 0.942500\nSelectKeyScale = 1.150000\nShowTouchSelect = True\nUnthrottleKeyX = 0.440104\nUnthrottleKeyY = 0.942500\nUnthrottleKeyScale = 1.150000\nShowTouchUnthrottle = True\nLKeyX = 0.035937\nLKeyY = 0.635833\nLKeyScale = 1.150000\nShowTouchLTrigger = True\nRKeyX = 0.964063\nRKeyY = 0.635833\nRKeyScale = 1.150000\nShowTouchRTrigger = True\nAnalogStickX = 0.074479\nAnalogStickY = 0.923333\nAnalogStickScale = 1.150000\nShowAnalogStick = True\nfcombo0X = 0.571875\nfcombo0Y = 0.500000\ncomboKeyScale0 = 1.150000\nShowComboKey0 = False\nfcombo1X = 0.631771\nfcombo1Y = 0.500000\ncomboKeyScale1 = 1.150000\nShowComboKey1 = False\nfcombo2X = 0.691667\nfcombo2Y = 0.500000\ncomboKeyScale2 = 1.150000\nShowComboKey2 = False\nfcombo3X = 0.571875\nfcombo3Y = 0.333333\ncomboKeyScale3 = 1.150000\nShowComboKey3 = False\nfcombo4X = 0.631771\nfcombo4Y = 0.333333\ncomboKeyScale4 = 1.150000\nShowComboKey4 = False\nSpeed1KeyX = 0.440104\nSpeed1KeyY = 0.885000\nSpeed1KeyScale = 1.150000\nShowSpeed1Key = False\nSpeed2KeyX = 0.500000\nSpeed2KeyY = 0.885000\nSpeed2KeyScale = 1.150000\nShowSpeed2Key = False\nXInputAnalogSensitivity = 1.000000\nAnalogLimiterDeadzone = 0.600000\nUseMouse = False\nMapMouse = False\nConfineMap = False\nMouseSensitivity = 0.100000\nMouseSmoothing = 0.900000\n[Network]\nEnableWlan = False\nEnableAdhocServer = False\n[SystemParam]\nPSPModel = 0\nPSPFirmwareVersion = 660\nNickName = PPSSPP\nproAdhocServer = black-seraph.com\nMacAddress = 4e:7a:78:d9:49:32\nPortOffset = 0\nLanguage = 1\nTimeFormat = 1\nDateFormat = 1\nTimeZone = 0\nDayLightSavings = False\nButtonPreference = 1\nLockParentalLevel = 0\nWlanAdhocChannel = 0\nWlanPowerSave = False\nEncryptSave = True\nSavedataUpgradeVersion = True\n[Debugger]\nDisasmWindowX = -1\nDisasmWindowY = -1\nDisasmWindowW = -1\nDisasmWindowH = -1\nGEWindowX = -1\nGEWindowY = -1\nGEWindowW = -1\nGEWindowH = -1\nConsoleWindowX = -1\nConsoleWindowY = -1\nFontWidth = 8\nFontHeight = 12\nDisplayStatusBar = True\nShowBottomTabTitles = True\nShowDeveloperMenu = False\nSkipDeadbeefFilling = False\nFuncHashMap = False\n[JIT]\n[Upgrade]\nUpgradeMessage = \nUpgradeVersion = \nDismissedVersion = \n[Theme]\nItemStyleFg = 0xffffffff\nItemStyleBg = 0x55000000\nItemFocusedStyleFg = 0xffffffff\nItemFocusedStyleBg = 0xffedc24c\nItemDownStyleFg = 0xffffffff\nItemDownStyleBg = 0xffbd9939\nItemDisabledStyleFg = 0x80eeeeee\nItemDisabledStyleBg = 0x55e0d4af\nItemHighlightedStyleFg = 0xffffffff\nItemHighlightedStyleBg = 0x55bdbb39\nButtonStyleFg = 0xffffffff\nButtonStyleBg = 0x55000000\nButtonFocusedStyleFg = 0xffffffff\nButtonFocusedStyleBg = 0xffedc24c\nButtonDownStyleFg = 0xffffffff\nButtonDownStyleBg = 0xffbd9939\nButtonDisabledStyleFg = 0x80eeeeee\nButtonDisabledStyleBg = 0x55e0d4af\nButtonHighlightedStyleFg = 0xffffffff\nButtonHighlightedStyleBg = 0x55bdbb39\nHeaderStyleFg = 0xffffffff\nInfoStyleFg = 0xffffffff\nInfoStyleBg = 0x00000000\nPopupTitleStyleFg = 0xffe3be59\nPopupStyleFg = 0xffffffff\nPopupStyleBg = 0xff303030\n[Recent]\nMaxRecent = 30\nFileName0 = \n[PinnedPaths]\n[Log]\nSYSTEMEnabled = True\nSYSTEMLevel = 4\nBOOTEnabled = True\nBOOTLevel = 4\nCOMMONEnabled = True\nCOMMONLevel = 4\nCPUEnabled = True\nCPULevel = 4\nFILESYSEnabled = True\nFILESYSLevel = 4\nG3DEnabled = True\nG3DLevel = 4\nHLEEnabled = True\nHLELevel = 4\nJITEnabled = True\nJITLevel = 4\nLOADEREnabled = True\nLOADERLevel = 4\nMEEnabled = True\nMELevel = 4\nMEMMAPEnabled = True\nMEMMAPLevel = 4\nSASMIXEnabled = True\nSASMIXLevel = 4\nSAVESTATEEnabled = True\nSAVESTATELevel = 4\nFRAMEBUFEnabled = True\nFRAMEBUFLevel = 4\nSCEAUDIOEnabled = True\nSCEAUDIOLevel = 4\nSCECTRLEnabled = True\nSCECTRLLevel = 4\nSCEDISPEnabled = True\nSCEDISPLevel = 4\nSCEFONTEnabled = True\nSCEFONTLevel = 4\nSCEGEEnabled = True\nSCEGELevel = 4\nSCEINTCEnabled = True\nSCEINTCLevel = 4\nSCEIOEnabled = True\nSCEIOLevel = 4\nSCEKERNELEnabled = True\nSCEKERNELLevel = 4\nSCEMODULEEnabled = True\nSCEMODULELevel = 4\nSCENETEnabled = True\nSCENETLevel = 4\nSCERTCEnabled = True\nSCERTCLevel = 4\nSCESASEnabled = True\nSCESASLevel = 4\nSCEUTILEnabled = True\nSCEUTILLevel = 4\nSCEMISCEnabled = True\nSCEMISCLevel = 4\n"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"PPSSPPSDL\"\nPKG_VERSION=\"f8261ae7ff93baa30f94214965547ed0f124da14\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MAME\"\nPKG_SITE=\"https://github.com/hrydgard/ppsspp\"\nPKG_URL=\"https://github.com/hrydgard/ppsspp.git\"\nPKG_DEPENDS_TARGET=\"toolchain ffmpeg libzip libpng SDL2 zlib zip\"\nPKG_SHORTDESC=\"PPSSPPDL\"\nPKG_LONGDESC=\"PPSSPP Standalone\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_BUILD_FLAGS=\"-lto\"\n\n\nPKG_CMAKE_OPTS_TARGET+=\"-DUSE_SYSTEM_FFMPEG=ON \\\n                        -DUSING_FBDEV=ON \\\n                        -DUSING_EGL=OFF \\\n                        -DUSING_GLES2=ON \\\n                        -DUSING_X11_VULKAN=OFF \\\n                        -DUSE_DISCORD=OFF\"\n\nif [ ${ARCH} == \"aarch64\" ]; then\nPKG_CMAKE_OPTS_TARGET+=\" -DARM64=ON\"\nelse\nPKG_CMAKE_OPTS_TARGET+=\" -DARMV7=ON\"\nfi\n\n\npre_configure_target() {\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\tsed -i \"s|include_directories(/usr/include/drm)|include_directories(${SYSROOT_PREFIX}/usr/include/drm)|\" ${PKG_BUILD}/CMakeLists.txt\nfi\n}\n\npre_make_target() {\n  # fix cross compiling\n  find ${PKG_BUILD} -name flags.make -exec sed -i \"s:isystem :I:g\" \\{} \\;\n  find ${PKG_BUILD} -name build.ninja -exec sed -i \"s:isystem :I:g\" \\{} \\;\n}\n\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/*.sh ${INSTALL}/usr/bin\n    cp `find . -name \"PPSSPPSDL\" | xargs echo` ${INSTALL}/usr/bin/PPSSPPSDL\n    ln -sf /storage/.config/ppsspp/assets ${INSTALL}/usr/bin/assets\n    mkdir -p ${INSTALL}/usr/config/ppsspp/\n    cp -r `find . -name \"assets\" | xargs echo` ${INSTALL}/usr/config/ppsspp/\n    \n    cp -rf ${PKG_DIR}/config/* ${INSTALL}/usr/config/ppsspp/\n    \n    rm ${INSTALL}/usr/config/ppsspp/assets/gamecontrollerdb.txt\n    ln -sf /storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt ${INSTALL}/usr/config/ppsspp/assets/gamecontrollerdb.txt\n    \n# redirect some of PSP folders to /storage/roms to keep all the saves and custom files\n   mkdir -p \"${INSTALL}/usr/config/ppsspp/PSP\"    \n   \nfor dir in Cheats PPSSPP_STATE SAVEDATA TEXTURES; do\n\t\tln -sf \"/storage/roms/savestates/PPSSPPSDL/PSP/${dir}\" \"${INSTALL}/usr/config/ppsspp/PSP/${dir}\"\ndone\n} \n"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/patches/PPSSPPSDL-05-fix-fmv-stutter.patch",
    "content": "--- a/Core/HW/MediaEngine.cpp\t2024-09-27 22:09:20.909587100 +0200\n+++ b/Core/HW/MediaEngine.cpp\t2024-09-27 22:15:31.844356931 +0200\n@@ -303,7 +303,7 @@\n \tav_dict_free(&open_opt);\n \n \tbool usedFFMPEGFindStreamInfo = false;\n-\tif (!SetupStreams() || PSP_CoreParameter().compat.flags().UseFFMPEGFindStreamInfo) {\n+\tif (true) {\n \t\t// Fallback to old behavior.  Reads too much and corrupts when game doesn't read fast enough.\n \t\t// SetupStreams sometimes work for newer FFmpeg 3.1+ now, but sometimes framerate is missing.\n \t\tWARN_LOG_REPORT_ONCE(setupStreams, Log::ME, \"Failed to read valid video stream data from header\");\n"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/patches/emuelec-paths.patch",
    "content": "--- a/Core/System.cpp\n+++ b/Core/System.cpp\n@@ -599,13 +599,13 @@\n \tcase DIRECTORY_PSP:\n \t\treturn pspDirectory;\n \tcase DIRECTORY_CHEATS:\n-\t\treturn pspDirectory / \"Cheats\";\n+\t\treturn Path(\"/storage/roms/savestates/PPSSPPSDL/PSP/Cheats/\");\n \tcase DIRECTORY_GAME:\n-\t\treturn pspDirectory / \"GAME\";\n+\t\treturn Path(\"/storage/roms/savestates/PPSSPPSDL/PSP/GAME/\");\n \tcase DIRECTORY_SAVEDATA:\n-\t\treturn pspDirectory / \"SAVEDATA\";\n+\t\treturn Path(\"/storage/roms/savestates/PPSSPPSDL/PSP/SAVEDATA\");\n \tcase DIRECTORY_SCREENSHOT:\n-\t\treturn pspDirectory / \"SCREENSHOT\";\n+\t\treturn Path(\"/storage/roms/screenshots\");\n \tcase DIRECTORY_SYSTEM:\n \t\treturn pspDirectory / \"SYSTEM\";\n \tcase DIRECTORY_PAUTH:\n@@ -615,7 +615,7 @@\n \tcase DIRECTORY_DUMP:\n \t\treturn pspDirectory / \"SYSTEM/DUMP\";\n \tcase DIRECTORY_SAVESTATE:\n-\t\treturn pspDirectory / \"PPSSPP_STATE\";\n+\t\treturn Path(\"/storage/roms/savestates/PPSSPPSDL/PSP/PPSSPP_STATE/\");\n \tcase DIRECTORY_CACHE:\n \t\treturn pspDirectory / \"SYSTEM/CACHE\";\n \tcase DIRECTORY_TEXTURES:\n@@ -630,7 +630,7 @@\n \tcase DIRECTORY_VIDEO:\n \t\treturn pspDirectory / \"VIDEO\";\n \tcase DIRECTORY_AUDIO:\n-\t\treturn pspDirectory / \"AUDIO\";\n+\t\treturn Path(\"/storage/roms/savestates/PPSSPPSDL/PSP/AUDIO/\");\n \tcase DIRECTORY_CUSTOM_SHADERS:\n \t\treturn pspDirectory / \"shaders\";\n \n"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/scripts/ppsspp.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n. /etc/profile\n\nROMSPPSSPPFOLDER=/storage/roms/savestates/PPSSPPSDL/PSP\nPPSSPPFOLDER=/storage/.config/ppsspp/PSP/\nAUTOGP=$(get_ee_setting ppssppsdl_auto_gamepad)\nCHEEVOS=$(get_ee_setting global.retroachievements)\n\n\nif [[ \"${AUTOGP}\" == \"1\" ]]; then\n\tset_ppsspp_joy.sh\nfi\n\nif [[ \"${CHEEVOS}\" == \"1\" ]]; then\n\tppssppcheevos.sh\nfi\n\n# Make sure we have the correct symlinks\nfor dir in Cheats PPSSPP_STATE SAVEDATA TEXTURES; do\n    mkdir -p \"${ROMSPPSSPPFOLDER}\"\n    \n   if [ ! -L /storage/.config/ppsspp/PSP/${dir} ]; then\n\t\tcp -rf /storage/.config/ppsspp/PSP/${dir}/. ${ROMSPPSSPPFOLDER}/${dir}/\n\t\trm -rf /storage/.config/ppsspp/PSP/${dir}\n\t\tln -sf ${ROMSPPSSPPFOLDER}/${dir} /storage/.config/ppsspp/PSP/${dir}\n    fi\ndone\n\nif [ ! -s \"${ROMSPPSSPPFOLDER}/Cheats/cheat.db\" ];then \n\tmkdir -p \"${ROMSPPSSPPFOLDER}/Cheats/\"\n\tcp -rf /usr/config/ppsspp/PSP/SYSTEM/Cheats/. \"${ROMSPPSSPPFOLDER}/Cheats/\" \n\n\tCHEAT_DB_VERSION=\"06d4d6148b66109005f7d51c37e8344f0bc042cc\"\n\tcurl -sLo \"${ROMSPPSSPPFOLDER}/Cheats/cheat.db\" -f \"https://raw.githubusercontent.com/Saramagrean/CWCheat-Database-Plus-/${CHEAT_DB_VERSION}/cheat.db\" || true\nfi\n\nARG=${1//[\\\\]/}\nexport SDL_AUDIODRIVER=alsa          \nPPSSPPSDL --fullscreen \"${ARG}\"\n"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/scripts/ppssppcheevos.sh",
    "content": "#! /bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Hector Calvarro (https://github.com/kelvfimer)\n#Script for setting up cheevos on duckstation emuelec. it extracts the data from emuelec.conf and it constructs the entries in seetings.ini if [Cheevos] or Enabled = True or Enable = False are not presented\n\n# Source predefined functions and variables\n. /etc/profile\n\nPPSSPP_ACHIEVEMENTS=\"/storage/.config/ppsspp/PSP/SYSTEM/ppsspp_retroachievements.dat\"\nPPSSPP_INI=\"/storage/.config/ppsspp/PSP/SYSTEM/ppsspp.ini\"\n\n#Extract username and password from emuelec.conf\nusername=$(get_ee_setting \"global.retroachievements.username\")\npassword=$(get_ee_setting \"global.retroachievements.password\")\ntoken=$(grep \"cheevos_token\" /storage/.config/retroarch/retroarch.cfg | cut -d'\"' -f2)\n\n#Variables for checking if [Cheevos] or enabled true or false are presente.\nzcheevos=$(grep -Fx \"[Achievements]\" ${PPSSPP_INI})\ndatets=$(date +%s%N | cut -b1-13)\n\n\n# Test the token if empty exit 1. // I don't think we should exit, it should continue but not enable cheevos\nif [[ -z \"${token}\" || \"${token}\" == *'\"Success\":false'* ]]\nthen\n      token=\"\"\n      zcheevos=\"\"\nfi\n\necho \"${token}\" > ${PPSSPP_ACHIEVEMENTS}\n\nif ([ -z \"${zcheevos}\" ])\nthen\n    echo -e \"[Achievements]\\nAchievementsEnable = True\\nAchievementsUserName = ${username}\\n\" >> ${PPSSPP_INI}\nelse\n    # Verificar y actualizar AchievementsUserName si es necesario\n    if ! grep -q \"^AchievementsUserName = \" ${PPSSPP_INI}; then\n        sed -i \"/^\\[Achievements\\]/a AchievementsUserName = ${username}\" ${PPSSPP_INI}\n    else\n        sed -i \"/^\\[Achievements\\]/,/^\\[/{s/^AchievementsUserName = .*/AchievementsUserName = ${username}/;}\" ${PPSSPP_INI}\n    fi\nfi\n"
  },
  {
    "path": "packages/sx05re/emulators/PPSSPPSDL/scripts/set_ppsspp_joy.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# Configure ADVMAME players based on ES settings\nCONFIG_DIR=\"/storage/.config/ppsspp/PSP/SYSTEM\"\nCONFIG=${CONFIG_DIR}/controls.ini\n#CONFIG2=${CONFIG_DIR}/controls.ini\n\nCONFIG_TMP=/tmp/jc/ppsspp.tmp\n\n\nsource joy_common.sh \"ppsspp\" \"fixed_order\"\n\ndeclare -A GC_PPSSPP_VALUES=(\n  [h0.1]=\"10-19\" #Up\n  [h0.4]=\"10-20\" #Down\n  [h0.8]=\"10-21\" #Left\n  [h0.2]=\"10-22\" #Right\n  [b0]=\"10-190\"\n  [b1]=\"10-189\"\n  [b2]=\"10-188\"\n  [b3]=\"10-191\"\n  [b4]=\"10-193\"\n  [b5]=\"10-192\"\n  [b6]=\"10-196\"\n  [b7]=\"10-197\"\n  [b8]=\"10-196\" # back\n  [b9]=\"10-197\" # start\n  [b10]=\"\" # usually home.\n  [b11]=\"10-106\" #leftstick\n  [b12]=\"10-107\" #rightstick\n  [b13]=\"10-19\" # up\n  [b14]=\"10-20\" # down\n  [b15]=\"10-21\" # left\n  [b16]=\"10-22\" # right\n  [a0-0]=\"10-4001\"\n  [a0-1]=\"10-4000\"\n  [a1-0]=\"10-4003\"\n  [a1-1]=\"10-4002\"\n  [a2]=\"10-4010\" #lefttrigger\n\t[a3]=\"10-4011\" #righttrigger\n\t[a4]=\"10-4010\" #lefttrigger\n  [a5]=\"10-4011\" #righttrigger\n)\n\ndeclare -A KB_PPSSPP_VALUES=(\n  [h0.1]=\"1-19\" #Up\n  [h0.4]=\"1-20\" #Down\n  [h0.8]=\"1-21\" #Left\n  [h0.2]=\"1-22\" #Right\n\n  [b0]=\"1-52\"\n  [b1]=\"1-54\"\n  [b2]=\"1-47\"\n  [b3]=\"1-29\"\n  [b4]=\"1-45\"\n  [b5]=\"1-51\"\n  [b6]=\"1-66\"\n  [b7]=\"1-62\"\n\n  [a0-0]=\"1-38\"\n  [a0-1]=\"1-40\"\n  [a1-0]=\"1-37\"\n  [a1-1]=\"1-39\"\n)\n\ndeclare -A GC_PPSSPP_BUTTONS=(\n  [dpleft]=\"Left\"\n  [dpright]=\"Right\"\n  [dpup]=\"Up\"\n  [dpdown]=\"Down\"\n  [x]=\"Triangle\"\n  [y]=\"Square\"\n  [a]=\"Circle\"\n  [b]=\"Cross\"\n  [back]=\"Select\"\n  [start]=\"Start\"\n  [leftshoulder]=\"L\"\n  [rightshoulder]=\"R\"\n  [leftx-0]=\"An.Left\"\n  [leftx-1]=\"An.Right\"\n  [lefty-0]=\"An.Up\"\n  [lefty-1]=\"An.Down\"\n)\n\n# Cleans all the inputs for the gamepad with name ${GAMEPAD} and player ${1}\nclean_pad() {\n  [[ \"${1}\" != \"1\" ]] && return\n  [[ -f \"${CONFIG_TMP}\" ]] && rm \"${CONFIG_TMP}\"\n  [[ ! -f \"${CONFIG}\" ]] && return\n\tgrep -m 1 \"Analog limiter =\" ${CONFIG} >> ${CONFIG_TMP}\n\tgrep -m 1 \"RapidFire =\" ${CONFIG} >> ${CONFIG_TMP}\n\tgrep -m 1 \"Unthrottle =\" ${CONFIG} >> ${CONFIG_TMP}\n\tgrep -m 1 \"SpeedToggle =\" ${CONFIG} >> ${CONFIG_TMP}\n\tgrep -m 1 \"Pause =\" ${CONFIG} >> ${CONFIG_TMP}\n\tgrep -m 1 \"Pause (no menu) =\" ${CONFIG} >> ${CONFIG_TMP}\n\tgrep -m 1 \"Rewind =\" ${CONFIG} >> ${CONFIG_TMP}\n\tgrep -m 1 \"Toggle Debugger =\" ${CONFIG} >> ${CONFIG_TMP}\n\trm ${CONFIG}\n}\n\n# Sets pad depending on parameters.\n# ${1} = Player Number\n# ${2} = js[0-7]\n# ${3} = Device GUID\n# ${4} = Device Name\n\nset_pad() {\n  [[ \"${1}\" != \"1\" ]] && return\n\n  local DEVICE_GUID=${3}\n\n  echo \"DEVICE_GUID=${DEVICE_GUID}\"\n\n  local GC_CONFIG=\"${5}\"\n  echo \"GC_CONFIG=${GC_CONFIG}\"\n  [[ -z ${GC_CONFIG} ]] && return\n\n  local GC_MAP=$(echo ${GC_CONFIG} | cut -d',' -f3-)\n\n  local L_VAL=\n  local R_VAL=\n\n  set -f\n  local GC_ARRAY=(${GC_MAP//,/ })\n  for index in \"${!GC_ARRAY[@]}\"\n  do\n      local REC=${GC_ARRAY[${index}]}\n      local BUTTON_INDEX=$(echo ${REC} | cut -d \":\" -f 1)\n      local TVAL=$(echo ${REC} | cut -d \":\" -f 2)\n      local BUTTON_VAL=${TVAL:1}\n      local GC_INDEX=\"${GC_PPSSPP_BUTTONS[${BUTTON_INDEX}]}\"\n      local BTN_TYPE=${TVAL:0:1}\n      local VAL=\"${GC_PPSSPP_VALUES[${TVAL}]}\"\n      local KBVAL=\"${KB_PPSSPP_VALUES[${TVAL}]}\"\n\n      local RECORD\n      # CREATE BUTTON MAPS (inlcuding hats).\n      if [[ ! -z \"${GC_INDEX}\" ]]; then\n        if [[ \"${BTN_TYPE}\" == \"b\"  || \"${BTN_TYPE}\" == \"h\" ]]; then\n          if [[ ! -z \"${VAL}\" ]]; then\n            [[ ! -z \"${KBVAL}\" ]] && echo \"${GC_INDEX} = ${KBVAL},${VAL}\" >> ${CONFIG_TMP}\n            [[ -z \"${KBVAL}\" ]] && echo \"${GC_INDEX} = ${VAL}\" >> ${CONFIG_TMP}\n          fi\n        fi\n      fi\n#      if [[ \"${BTN_TYPE}\" == \"a\" ]]; then\n#        echo \"BINDEX=${BUTTON_INDEX}\"\n#        [[ \"${BUTTON_INDEX}\" == \"lefttrigger\" ]] && L_VAL=${VAL} && echo \"LVAL=${VAL}\"\n#        [[ \"${BUTTON_INDEX}\" == \"righttrigger\" ]] && R_VAL=${VAL} && echo \"RVAL=${VAL}\"\n#      fi\n\n      # Create Axis Maps\n      case ${BUTTON_INDEX} in\n        leftx|lefty)\n          GC_INDEX=\"${GC_PPSSPP_BUTTONS[${BUTTON_INDEX}-0]}\"\n          VAL=\"${GC_PPSSPP_VALUES[${TVAL}-0]}\"\n          KBVAL=\"${KB_PPSSPP_VALUES[${TVAL}-0]}\"\n          echo \"${GC_INDEX} = ${KBVAL},${VAL}\" >> ${CONFIG_TMP}\n\n          GC_INDEX=\"${GC_PPSSPP_BUTTONS[${BUTTON_INDEX}-1]}\"\n          VAL=\"${GC_PPSSPP_VALUES[${TVAL}-1]}\"\n          KBVAL=\"${KB_PPSSPP_VALUES[${TVAL}-1]}\"\n          echo \"${GC_INDEX} = ${KBVAL},${VAL}\" >> ${CONFIG_TMP}\n          ;;\n      esac\n  done\n\n#  [[ ! -z \"${L_VAL}\" ]] && sed -i -r \"s|L = (.*)|L = \\1,${L_VAL}|g\" \"${CONFIG_TMP}\"\n#  [[ ! -z \"${R_VAL}\" ]] && sed -i -r \"s|R = (.*)|R = \\1,${R_VAL}|g\" \"${CONFIG_TMP}\"\n\n  echo \"[ControlMapping]\" > ${CONFIG}\n  cat \"${CONFIG_TMP}\" | sort >> ${CONFIG}\n  rm \"${CONFIG_TMP}\"\n}\n\njc_get_players\n"
  },
  {
    "path": "packages/sx05re/emulators/advancemame/bin/advmame.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n. /etc/profile\n\nCONFIG_DIR=\"/emuelec/configs/advmame\"\nexport DISPLAY=:0\n\nif [ -L \"${CONFIG_DIR}\" ]; then\n rm \"${CONFIG_DIR}\"\nfi\n\nif [ ! -d \"${CONFIG_DIR}\" ]; then\n mkdir -p \"${CONFIG_DIR}\"\n cp -rf /usr/config/emuelec/configs/advmame/* \"${CONFIG_DIR}/\"\nfi\n\nif [ ! -L \"/storage/.advance\" ]; then\n    cp -rf /storage/.advance/* ${CONFIG_DIR}/\n    rm -rf /storage/.advance\n    ln -sf ${CONFIG_DIR} /storage/.advance\nfi\n\nif [[ \"${1}\" = \"arcade\" ]]; then\nsed -i \"s|/roms/mame|/roms/arcade|g\" ${CONFIG_DIR}/advmame.rc\n else\nsed -i \"s|/roms/arcade|/roms/mame|g\" ${CONFIG_DIR}/advmame.rc\nfi\n\nif [ \"${EE_DEVICE}\" != \"OdroidGoAdvance\" ] && [ \"${EE_DEVICE}\" != \"GameForce\" ]; then\n    unset DISPLAY\n    MODE=`get_resolution`;\n    sed -i '/device_video_modeline/d' ${CONFIG_DIR}/advmame.rc\n\n# NOTE - Multiples should go first.\n    case \"${MODE}\" in\n        1280*1024)\n            echo \"device_video_modeline 1280x1024_60.00 108.88 1280 1360 1496 1712 1024 1025 1028 1060 +hsync +vsync\" >> ${CONFIG_DIR}/advmame.rc\n        ;;\n        1024*768)\n            echo \"device_video_modeline 1024x768_60.00 64.11 1024 1080 1184 1344 768 769 772 795 +hsync +vsync\" >> ${CONFIG_DIR}/advmame.rc\n        ;;\n        800*600)\n            echo \"device_video_modeline 800x600_60.00 38.22 800 832 912 1024 600 601 604 622 +hsync +vsync\" >> ${CONFIG_DIR}/advmame.rc\n        ;;\n        640*480)\n            echo \"device_video_modeline 640x480_60.00 23.86 640 656 720 800 480 481 484 497 +hsync +vsync\" >> ${CONFIG_DIR}/advmame.rc\n        ;;\n        *480)\n            echo \"device_video_modeline 720x480 15.246 720 762 834 968 480 484 491 525 +hsync +vsync\" >> ${CONFIG_DIR}/advmame.rc\n        ;;\n        *720)\n            echo \"device_video_modeline 1280x720-60 91.517 1280 1440 1531 1691 720 810 812 902 +hsync +vsync\" >> ${CONFIG_DIR}/advmame.rc\n        ;;\n        *1080)\n            echo \"device_video_modeline 1920x1080_60.00 153.234 1920 1968 2121 2168 1080 1127 1130 1178 +hsync +vsync\" >> ${CONFIG_DIR}/advmame.rc\n        ;;\n\n    esac\nfi\n\nPLATFORM=${1}\nROMNAME=\"$(basename ${2})\"\nAUTOGP=$(get_ee_setting advmame_auto_gamepad)\n\n# Hack - Set the crash stack size to 0 to prevent program doing a large dump of poo.\nCRASH_STACK_SIZE=$( ulimit -c )\n\n[[ \"${AUTOGP}\" != \"0\" ]] && set_advmame_joy.sh \"${PLATFORM}\" \"${ROMNAME}\"\n\n# Hack - Revert crash stack size so it can poo nicely.\nulimit -c ${CRASH_STACK_SIZE}\n\nemuelec-utils blank_buffer\n\nARG=$(echo basename ${2} | sed 's/\\.[^.]*$//')\nARG=\"$(echo ${2} | sed 's=.*/==;s/\\.[^.]*$//')\"\nSDL_AUDIODRIVER=alsa advmame ${ARG} -quiet\n\nemuelec-utils blank_buffer\n"
  },
  {
    "path": "packages/sx05re/emulators/advancemame/bin/set_advmame_joy.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present Joshua L (https://github.com/Langerz82)\n\n# 08/01/23 - Joshua L - Fixed a couple of issues.\n\n# Source predefined functions and variables\n. /etc/profile\n\n# Configure ADVMAME players based on ES settings\nCONFIG_DIR=\"/storage/.advance\"\nCONFIG=\"${CONFIG_DIR}/advmame.rc\"\nES_FEATURES=\"/storage/.config/emulationstation/es_features.cfg\"\n\nsource joy_common.sh \"advmame\"\n\nPLATFORM=${1}\nROMNAME=${2}\n\n\nBTN_CFG=\"0 1 2 3 4 5 6 7\"\n\nBTN_H0=$(advj | grep -B 1 -E \"^joy 0 .*\" | grep sticks: | sed \"s|sticks:\\ ||\" | tr -d ' ')\n\ndeclare -A ADVMAME_VALUES=(\n  [\"b0\"]=\"button1\"\n  [\"b1\"]=\"button2\"\n  [\"b2\"]=\"button3\"\n  [\"b3\"]=\"button4\"\n  [\"b4\"]=\"button5\"\n  [\"b5\"]=\"button6\"\n  [\"b6\"]=\"button7\"\n  [\"b7\"]=\"button8\"\n  [\"b8\"]=\"button9\"\n  [\"b9\"]=\"button10\"\n  [\"b10\"]=\"button11\"\n  [\"b11\"]=\"button12\"\n  [\"b12\"]=\"button13\"\n  [\"b13\"]=\"button14\"\n  [\"b14\"]=\"button15\"\n  [\"b15\"]=\"button16\"\n  [\"b16\"]=\"button17\"\n  [\"b17\"]=\"button18\"\n  [\"h0.1\"]=\"stick${BTN_H0},y,up\"\n  [\"h0.4\"]=\"stick${BTN_H0},y,down\"\n  [\"h0.8\"]=\"stick${BTN_H0},x,left\"\n  [\"h0.2\"]=\"stick${BTN_H0},x,right\"\n  [\"a0,1\"]=\"stick,y,up\"\n  [\"a0,2\"]=\"stick,y,down\"\n  [\"a1,1\"]=\"stick,x,left\"\n  [\"a1,2\"]=\"stick,x,right\"\n  [\"a2,1\"]=\"stick2,x,left\"\n  [\"a2,2\"]=\"stick2,x,right\"\n  [\"a3,1\"]=\"stick3,y,up\"\n  [\"a3,2\"]=\"stick3,y,down\"\n  [\"a4,1\"]=\"stick2,x,left\"\n  [\"a4,2\"]=\"stick2,x,right\"\n  [\"a5,1\"]=\"stick3,y,up\"\n  [\"a5,2\"]=\"stick3,y,down\"\n)\n\ndeclare GC_ORDER=(\n  \"b\"\n  \"a\"\n  \"y\"\n  \"x\"\n\t\"leftshoulder\"\n  \"rightshoulder\"\n  \"righttrigger\"\n  \"lefttrigger\"\n)\n\ndeclare -A GC_NAMES=()\n\nget_button_cfg() {\n\tlocal BTN_INDEX=$(get_ee_setting \"joy_btn_index\" \"${PLATFORM}\" \"${ROMNAME}\")\n  if [[ ! -z ${BTN_INDEX} ]]; then\n\t\tlocal BTN_SETTING=\"AdvanceMame.joy_btn_order.${BTN_INDEX}\"\n    local BTN_CFG_TMP=\"$(get_ee_setting ${BTN_SETTING})\"\n\t\t[[ ! -z ${BTN_CFG_TMP} ]] && BTN_CFG=\"${BTN_CFG_TMP}\"\n\tfi\n\techo \"${BTN_CFG}\"\n}\n\n\nclean_pad() {\n\tsed -i \"/device_joystick.*/d\" ${CONFIG}\n\tsed -i \"/input_map\\[p${1}_.*/d\" ${CONFIG}\n\tsed -i \"/input_map\\[coin${1}.*/d\" ${CONFIG}\n\tsed -i \"/input_map\\[start${1}.*/d\" ${CONFIG}\n\n  if [[ \"${1}\" == \"1\" ]]; then\n    sed -i '/input_map\\[ui_[[:alpha:]]*\\].*/d' ${CONFIG}\n  fi\n\techo \"device_joystick raw\" >> ${CONFIG}\n}\n\n\n# Sets pad depending on parameters ${GAMEPAD} = name ${1} = player\nset_pad(){\n  local P_INDEX=$(( ${1} - 1 ))\n  local DEVICE_GUID=${3}\n  local JOY_NAME=\"${4}\"\n\n  local GC_CONFIG=\"${5}\"\n  echo \"GC_CONFIG=${GC_CONFIG}\"\n  [[ -z ${GC_CONFIG} ]] && return\n\n  local GAMEPAD=\"$(advj | grep \"'${JOY_NAME}'\" | cut -d\"'\" -f2 | head -n 1 )\"\n  [[ -z \"${GAMEPAD}\" ]] && return\n\n  BTN_H0=$(advj | grep -B 1 -E \"^joy ${P_INDEX}.*\" | grep sticks: | sed \"s|sticks:\\ ||\" | tr -d ' ')\n  ADVMAME_VALUES[\"h0.1\"]=\"stick${BTN_H0},y,up\"\n  ADVMAME_VALUES[\"h0.4\"]=\"stick${BTN_H0},y,down\"\n  ADVMAME_VALUES[\"h0.8\"]=\"stick${BTN_H0},x,left\"\n  ADVMAME_VALUES[\"h0.2\"]=\"stick${BTN_H0},x,right\"\n\n  ADVMAME_VALUES[\"a0,1\"]=\"stick,y,up\"\n  ADVMAME_VALUES[\"a0,2\"]=\"stick,y,down\"\n  ADVMAME_VALUES[\"a1,1\"]=\"stick,x,left\"\n  ADVMAME_VALUES[\"a1,2\"]=\"stick,x,right\"\n\nlocal INVERT_AXIS=$(get_ee_setting \"advmame_invert_axis\")\n  if [[ ${INVERT_AXIS} == 1 ]]; then\n      ADVMAME_VALUES[\"a1,1\"]=\"stick,y,up\"\n      ADVMAME_VALUES[\"a1,2\"]=\"stick,y,down\"\n      ADVMAME_VALUES[\"a0,1\"]=\"stick,x,left\"\n      ADVMAME_VALUES[\"a0,2\"]=\"stick,x,right\"\n    fi\n\n  local NAME_NUM=\"${GC_NAMES[${GAMEPAD}]}\"\n  if [[ -z \"NAME_NUM\" ]]; then\n    GC_NAMES[${GAMEPAD}]=1\n  else\n    GC_NAMES[${GAMEPAD}]=$(( NAME_NUM+1 ))\n  fi\n\t[[ \"${GC_NAMES[${GAMEPAD}]}\" -gt \"1\" ]] && GAMEPAD=\"${GAMEPAD}_${GC_NAMES[${GAMEPAD}]}\"\n#  GAMEPAD=0\n\n  local GC_MAP=$(echo ${GC_CONFIG} | cut -d',' -f3-)\n\n  declare DIRS=()\n  declare -A DIR_INDEX=(\n    [dpup]=\"0\"\n    [dpdown]=\"1\"\n    [dpleft]=\"2\"\n    [dpright]=\"3\"\n    [leftx]=\"0,1\"\n    [lefty]=\"2,3\"\n  )\n  local ADD_HAT=$(get_ee_setting advmame_add_hat)\n  local i=1\n  set -f\n  local GC_ARRAY=(${GC_MAP//,/ })\n  declare -A GC_ASSOC=()\n  for index in \"${!GC_ARRAY[@]}\"\n  do\n      local REC=${GC_ARRAY[${index}]}\n      local GC_INDEX=$(echo ${REC} | cut -d \":\" -f 1)\n      [[ ${GC_INDEX} == \"\" || ${GC_INDEX} == \"platform\" ]] && continue\n\n      local TVAL=$(echo ${REC} | cut -d \":\" -f 2)\n      GC_ASSOC[\"${GC_INDEX}\"]=${TVAL}\n\n      [[ \" ${GC_ORDER[*]} \" == *\" ${GC_INDEX} \"* ]] && continue\n      local BUTTON_VAL=${TVAL:1}\n      local BTN_TYPE=${TVAL:0:1}\n      local VAL=\"${ADVMAME_VALUES[${TVAL}]}\"\n      local I=\"${DIR_INDEX[${GC_INDEX}]}\"\n      local DIR=\"${DIRS[${I}]}\"\n\n      # Create Axis Maps\n      case ${GC_INDEX} in\n        dpup|dpdown|dpleft|dpright)\n          [[ ! -z \"${DIR}\" ]] && DIR+=\" or \"\n    \t\t  if [[ \"${BTN_TYPE}\" == \"a\" ]]; then\n      \t\t\tlocal direction\n      \t\t\tcase ${GC_INDEX} in\n      \t\t\t\tdpleft|dpup)\n      \t\t\t\t\tdirection=1\n      \t\t\t\t\t;;\n      \t\t\t\tdpright|dpdown)\n      \t\t\t\t\tdirection=2\n      \t\t\t\t\t;;\n      \t\t\tesac\n      \t\t\tVAL=\"${ADVMAME_VALUES[${TVAL},${direction}]}\"\n      \t\t\tDIR+=\"joystick_digital[${GAMEPAD},${VAL}]\"\n      \t\t\tDIRS[\"${I}\"]=\"${DIR}\"\n    \t\t  else\n      \t\t\t[[ \"${BTN_TYPE}\" == \"b\" ]] && DIR+=\"joystick_button[${GAMEPAD},${VAL}]\"\n      \t\t\t[[ \"${BTN_TYPE}\" == \"h\" ]] && DIR+=\"joystick_digital[${GAMEPAD},${VAL}]\"\n      \t\t\tDIRS[\"${I}\"]=\"${DIR}\"\n    \t\t  fi\n          ;;\n        leftx|lefty)\n          for i in {1..2}; do\n            I=$(echo \"${DIR_INDEX[${GC_INDEX}]}\" | cut -d, -f \"${i}\")\n            DIR=\"${DIRS[${I}]}\"\n            [[ ! -z \"${DIR}\" ]] && DIR+=\" or \"\n            VAL=\"${ADVMAME_VALUES[${TVAL},${i}]}\"\n            DIR+=\"joystick_digital[${GAMEPAD},${VAL}]\"\n            DIRS[\"${I}\"]=${DIR}\n          done\n          ;;\n        start)\n          echo \"input_map[start${1}] joystick_button[${GAMEPAD},${VAL}]\" >> ${CONFIG}\n          ;;\n        back)\n          echo \"input_map[coin${1}] joystick_button[${GAMEPAD},${VAL}]\" >> ${CONFIG}\n          ;;\n      esac\n  done\n\n  declare -i i=1\n  for bi in ${BTN_CFG}; do\n    local button=\"${GC_ORDER[${bi}]}\"\n    [[ -z \"${button}\" ]] && continue\n    button=\"${GC_ASSOC[${button}]}\"\n\n    local BTN_TYPE=\"${button:0:1}\"\n    if [[ \"${BTN_TYPE}\" == \"a\" ]]; then\n      local STR=\"input_map[p${1}_button${i}]\"\n      for j in {1..2}; do\n        local VAL=\"${ADVMAME_VALUES[${button},${j}]}\"\n        STR+=\" joystick_digital[${GAMEPAD},${VAL}]\"\n      done\n      echo \"${STR}\" >> ${CONFIG}\n    elif [[ \"${BTN_TYPE}\" == \"b\" ]]; then\n      local VAL=\"${ADVMAME_VALUES[${button}]}\"\n      echo \"input_map[p${1}_button${i}] joystick_button[${GAMEPAD},${VAL}]\" >> ${CONFIG}\n    fi\n    (( i++ ))\n  done\n\n  echo \"input_map[p${1}_up] ${DIRS[0]}\" >> ${CONFIG}\n  echo \"input_map[p${1}_down] ${DIRS[1]}\" >> ${CONFIG}\n  echo \"input_map[p${1}_left] ${DIRS[2]}\" >> ${CONFIG}\n  echo \"input_map[p${1}_right] ${DIRS[3]}\" >> ${CONFIG}\n\n  # Menu should only be set to player 1\n  if [[ \"${1}\" == \"1\" ]]; then\n  #echo \"Setting menu buttons for player 1\" #debug\n    echo \"input_map[ui_up] keyboard[0,up] or keyboard[1,up] or ${DIRS[0]}\" >> ${CONFIG}\n    echo \"input_map[ui_down] keyboard[0,down] or keyboard[1,down] or ${DIRS[1]}\" >> ${CONFIG}\n    echo \"input_map[ui_left] keyboard[0,left] or keyboard[1,left] or ${DIRS[2]}\" >> ${CONFIG}\n    echo \"input_map[ui_right] keyboard[0,right] or keyboard[1,right] or ${DIRS[3]}\" >> ${CONFIG}\n\n    local button=\"${GC_ASSOC[b]}\"\n    local VAL=\"${ADVMAME_VALUES[${button}]}\"\n    if [ ! -z \"${VAL}\" ]; then\n      echo \"input_map[ui_select] keyboard[0,enter] or keyboard[1,enter] or joystick_button[${GAMEPAD},${VAL}]\" >> ${CONFIG}\n    fi\n\n    local record=\"input_map[ui_cancel] keyboard[0,backspace] or keyboard[1,backspace]\"\n    button=\"${GC_ASSOC[leftstick]}\"\n    if [[ ! -z \"${button}\" ]]; then\n      VAL=\"${ADVMAME_VALUES[${button}]}\"\n      if [ ! -z \"${VAL}\" ]; then\n        record=\"${record} or joystick_button[${GAMEPAD},${VAL}]\"\n      fi\n    fi\n    echo \"${record}\"  >> ${CONFIG}\n\n    VAL=\"\"\n    button=\"${GC_ASSOC[rightstick]}\"\n    if [[ ! -z \"${button}\" ]]; then\n      VAL=\"${ADVMAME_VALUES[${button}]}\"\n    elif [[ \"${GC_ASSOC[guide]}\" != \"${GC_ASSOC[back]}\" ]]; then\n      button=\"${GC_ASSOC[guide]}\"\n      VAL=\"${ADVMAME_VALUES[${button}]}\"\n    fi\n\n    record=\"input_map[ui_configure] keyboard[1,tab] or keyboard[0,tab]\"\n    if [ ! -z \"${VAL}\" ]; then\n      record=\"${record} or joystick_button[${GAMEPAD},${VAL}]\"\n    fi\n    echo \"${record}\" >> ${CONFIG}\n  fi\n}\n\nADVMAME_REGEX=\"<emulator.*name=\\\"AdvanceMame\\\" +features=.*[ ,\\\"]joybtnremap[ ,\\\"].*/>\"\nADVMAME_REMAP=$(cat \"${ES_FEATURES}\" | grep -E \"${ADVMAME_REGEX}\")\n[[ ! -z \"${ADVMAME_REMAP}\" ]] && BTN_CFG=$(get_button_cfg)\necho \"BTN_CFG=${BTN_CFG}\"\n\njc_get_players\n"
  },
  {
    "path": "packages/sx05re/emulators/advancemame/config/advmame.rc",
    "content": "device_alsa_device sdl\ndevice_color_bgr15 no\ndevice_color_bgr8 no\ndir_artwork /storage/roms/mame/artwork\ndir_diff /storage/roms/mame/diff\ndir_hi /storage/roms/mame/hi\ndir_image /storage/roms/mame/image\ndir_inp /storage/roms/mame/inp\ndir_memcard /storage/roms/mame/memcard\ndir_nvram /storage/roms/mame/nvram\ndir_rom /storage/roms/mame\ndir_sample /storage/roms/bios/advmame/samples\ndir_snap /storage/roms/mame/snap\ndir_sta /storage/roms/mame/nvram\nrecord_sound no\nrecord_video no\nsound_latency 0.10\nsound_normalize no\ndisplay_rgbeffect scan2horz\ndisplay_vsync no\ndevice_video_clock 10-180 / 30-80 / 50-70\n#device_video_modeline ATSC-720-60p 73.44 1280 1312 1368 1632 720 722 728 728 +hsync +vsync\n#device_video_modeline 1280x720-60 91.517 1280 1440 1531 1691 720 810 812 902 +hsync +vsync\ndevice_video_modeline 1920x1080_60.00 153.234 1920 1968 2121 2168 1080 1127 1130 1178 +hsync +vsync\n# WARNING: auto gamepad needs device_joystick to be set to raw\ndevice_joystick raw\ninput_map[ui_select] keyboard[0,enter] or keyboard[1,enter]\n\n"
  },
  {
    "path": "packages/sx05re/emulators/advancemame/config/advmame.rc_gf",
    "content": "dir_artwork /storage/roms/mame/artwork\ndir_diff /storage/roms/mame/diff\ndir_hi /storage/roms/mame/hi\ndir_image /storage/roms/mame/image\ndir_inp /storage/roms/mame/inp\ndir_memcard /storage/roms/mame/memcard\ndir_nvram /storage/roms/mame/nvram\ndir_rom /storage/roms/mame\ndir_sample /storage/roms/bios/advmame/samples\ndir_snap /storage/roms/mame/snap\ndir_sta /storage/roms/mame/nvram\nrecord_sound no\nrecord_video no\nsound_latency 0.10\nsound_normalize no\ndevice_video_clock 10-180 / 30-80 / 50-70\ndisplay_mode 640x480x16\ndisplay_resizeeffect none\ndisplay_magnify 1\ndisplay_resize none\ndisplay_vsync no\ndevice_keyboard sdl\ndevice_joystick raw\nmisc_smp no\nmisc_quiet yes\ndevice_alsa_device sdl\ninput_map[coin1] joystick_button[gameforcegamepad,button9]\ninput_map[start1] joystick_button[gameforcegamepad,button10]\ninput_map[p1_button1] joystick_button[gameforcegamepad,button2]\ninput_map[p1_button2] joystick_button[gameforcegamepad,button1]\ninput_map[p1_button3] joystick_button[gameforcegamepad,button3]\ninput_map[p1_button4] joystick_button[gameforcegamepad,button4]\ninput_map[p1_button5] joystick_button[gameforcegamepad,button6]\ninput_map[p1_button6] joystick_button[gameforcegamepad,button5]\ninput_map[p1_button7] joystick_button[gameforcegamepad,button8]\ninput_map[p1_button8] joystick_button[gameforcegamepad,button7]\ninput_map[p1_up] joystick_button[gameforcegamepad,button11] or joystick_digital[gameforcegamepad,stick,x,up]\ninput_map[ui_up] joystick_button[gameforcegamepad,button11] or joystick_digital[gameforcegamepad,stick,x,up]\ninput_map[p1_down] joystick_button[gameforcegamepad,button12] or joystick_digital[gameforcegamepad,stick,x,down]\ninput_map[ui_down] joystick_button[gameforcegamepad,button12] or joystick_digital[gameforcegamepad,stick,x,down]\ninput_map[p1_right] joystick_button[gameforcegamepad,button14] or joystick_digital[gameforcegamepad,stick,y,right]\ninput_map[ui_right] joystick_button[gameforcegamepad,button14] or joystick_digital[gameforcegamepad,stick,y,right]\ninput_map[p1_left] joystick_button[gameforcegamepad,button13] or joystick_digital[gameforcegamepad,stick,y,left]\ninput_map[ui_left] joystick_button[gameforcegamepad,button13] or joystick_digital[gameforcegamepad,stick,y,left]\ninput_map[ui_select] keyboard[0,enter] or keyboard[1,enter] or joystick_button[gameforcegamepad,button2]\ninput_map[ui_cancel] keyboard[0,backspace] or keyboard[1,backspace] or joystick_button[gameforcegamepad,button16]\ninput_map[ui_configure] keyboard[1,tab] or keyboard[0,tab] or joystick_button[gameforcegamepad,button15]\n"
  },
  {
    "path": "packages/sx05re/emulators/advancemame/config/advmame.rc_oga",
    "content": "dir_artwork /storage/roms/mame/artwork\ndir_diff /storage/roms/mame/diff\ndir_hi /storage/roms/mame/hi\ndir_image /storage/roms/mame/image\ndir_inp /storage/roms/mame/inp\ndir_memcard /storage/roms/mame/memcard\ndir_nvram /storage/roms/mame/nvram\ndir_rom /storage/roms/mame\ndir_sample /storage/roms/bios/advmame/samples\ndir_snap /storage/roms/mame/snap\ndir_sta /storage/roms/mame/nvram\ndevice_joystick raw\ndevice_keyboard sdl\nmisc_smp no\ndisplay_magnifysize 320\ndisplay_resize none\ndisplay_resizeeffect none\nmisc_quiet yes\nsound_mode mono\ndevice_alsa_device sdl\ndevice_color_bgr15 no\ndevice_color_bgr8 no\nrecord_sound no\nrecord_video no\nsound_latency 0.10\nsound_normalize no\ndevice_video_clock 10-180 / 30-80 / 50-70\ndisplay_mode 320x224x32\n"
  },
  {
    "path": "packages/sx05re/emulators/advancemame/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"advancemame\"\nPKG_VERSION=\"6a34ec0ec3fd74535ae559304ceb6c7ce63acff5\"\nPKG_SHA256=\"d6211711e1e46a3b3bae9bcf4bb8491c90cfc84e104044b6f18eb118fa0e7cf2\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MAME\"\nPKG_SITE=\"https://github.com/amadvance/advancemame\"\nPKG_URL=\"https://github.com/amadvance/advancemame/archive/${PKG_VERSION}.tar.gz\"\nPKG_SOURCE_DIR=\"advancemame-${PKG_VERSION}*\"\nPKG_DEPENDS_TARGET=\"toolchain freetype slang alsa SDL2\"\nPKG_SECTION=\"emuelec/mod\"\nPKG_SHORTDESC=\"A MAME and MESS port with an advanced video support for Arcade Monitors, TVs, and PC Monitors \"\nPKG_LONGDESC=\"A MAME and MESS port with an advanced video support for Arcade Monitors, TVs, and PC Monitors \"\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"yes\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"-parallel\"\n\npre_configure_target() {\nexport CFLAGS=`echo ${CFLAGS} | sed -e \"s|-O.|-O3|g\"`\nsed -i \"s|#include <slang.h>|#include <${SYSROOT_PREFIX}/usr/include/slang.h>|\" ${PKG_BUILD}/configure.ac\n}\n\npre_make_target() {\nVERSION=\"EmuELEC-v$(cat ${ROOT}/packages/sx05re/emuelec/config/EE_VERSION)-${PKG_VERSION:0:7}\"\necho ${VERSION} > ${PKG_BUILD}/.version\n}\n\nmake_target() {\ncd ${PKG_BUILD}\n./autogen.sh\n./configure --prefix=/usr --datadir=/usr/share/ --datarootdir=/usr/share/ --host=${TARGET_NAME} --enable-fb --enable-freetype --with-freetype-prefix=${SYSROOT_PREFIX}/usr/ --enable-slang\nmake mame\nmake j\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/advmame\nmkdir -p ${INSTALL}/usr/bin\n\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ]; then\n   cp -r ${PKG_DIR}/config/advmame.rc_oga ${INSTALL}/usr/config/emuelec/configs/advmame/advmame.rc\nelif [ \"${DEVICE}\" == \"GameForce\" ]; then\n   cp -r ${PKG_DIR}/config/advmame.rc_gf ${INSTALL}/usr/config/emuelec/configs/advmame/advmame.rc\nelse\n   cp -r ${PKG_DIR}/config/advmame.rc ${INSTALL}/usr/config/emuelec/configs/advmame/advmame.rc\nfi\n\ncp -r ${PKG_DIR}/bin/* ${INSTALL}/usr/bin\nchmod +x ${INSTALL}/usr/bin/*\n\ncp -r ${PKG_BUILD}/obj/mame/linux/blend/advmame ${INSTALL}/usr/bin\ncp -r ${PKG_BUILD}/obj/j/linux/blend/advj ${INSTALL}/usr/bin\ncp -r ${PKG_BUILD}/support/category.ini ${INSTALL}/usr/config/emuelec/configs/advmame\ncp -r ${PKG_BUILD}/support/sysinfo.dat ${INSTALL}/usr/config/emuelec/configs/advmame\ncp -r ${PKG_BUILD}/support/history.dat ${INSTALL}/usr/config/emuelec/configs/advmame\ncp -r ${PKG_BUILD}/support/hiscore.dat ${INSTALL}/usr/config/emuelec/configs/advmame\ncp -r ${PKG_BUILD}/support/event.dat ${INSTALL}/usr/config/emuelec/configs/advmame\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/advancemame/patches/advancemame-002-fix-vfb.patch",
    "content": "--- a/advance/linux/vfb.c\t2018-03-10 10:38:17.000000000 -0600\n+++ b/advance/linux/vfb.c\t2018-03-10 13:55:40.977788463 -0600\n@@ -859,6 +859,7 @@\n \t}\n \n \t/* set the preferred bit depth */\n+/*\n \tswitch (fb_state.varinfo.bits_per_pixel) {\n \tcase 16:\n \t\tif ((fb_state.flags & VIDEO_DRIVER_FLAGS_MODE_BGR16) != 0)\n@@ -873,6 +874,9 @@\n \t\t\tfb_state.flags |= VIDEO_DRIVER_FLAGS_DEFAULT_BGR32;\n \t\tbreak;\n \t}\n+*/\n+/* force 16bit for EmuELEC */\n+\t\t\tfb_state.flags |= VIDEO_DRIVER_FLAGS_DEFAULT_BGR16;\n \n \tlog_std((\"video:fb: size %ux%u\\n\", target_size_x(), target_size_y()));\n \tlog_std((\"video:fb: aspect %ux%u\\n\", target_aspect_x(), target_aspect_y()));\n"
  },
  {
    "path": "packages/sx05re/emulators/advancemame/patches/advancemame-999-modify-advj.patch",
    "content": "--- a/advance/j/j.c\n+++ b/advance/j/j.c\n@@ -34,6 +34,7 @@\n \t\t\tstrcpy(name, DEVICE_NONAME);\n \t\tif (joystickb_device_desc_get(i, desc) != 0)\n \t\t\tstrcpy(desc, DEVICE_NONAME);\n+\t\tprintf(\"sticks: %i \\n\", joystickb_state.driver_current->stick_count_get(i));\n \n \t\tprintf(\"joy %d '%s' '%s', controls %d, buttons %d, ball axes %d\\n\", i, name, desc, joystickb_stick_count_get(i), joystickb_button_count_get(i), joystickb_rel_count_get(i));\n \t\tfor (j = 0; j < joystickb_stick_count_get(i); ++j) {\n@@ -214,6 +215,7 @@\n \tconst char* section_map[1];\n \tadv_bool opt_log;\n \tadv_bool opt_logsync;\n+\tint idriver = 1;\n \n \topt_log = 0;\n \topt_logsync = 0;\n@@ -224,22 +226,28 @@\n \t\tgoto err_conf;\n \n \tjoystickb_reg(context, 1);\n-\tjoystickb_reg_driver_all(context);\n \n \tif (conf_input_args_load(context, 0, \"\", &argc, argv, error_callback, 0) != 0)\n \t\tgoto err_os;\n \n \tfor (i = 1; i < argc; ++i) {\n-\t\tif (target_option_compare(argv[i], \"log\")) {\n-\t\t\topt_log = 1;\n-\t\t} else if (target_option_compare(argv[i], \"logsync\")) {\n-\t\t\topt_logsync = 1;\n+\t\tif (target_option_compare(argv[i], \"event\")) {\n+\t\t\tidriver = 3;\n+\t\t} else if (target_option_compare(argv[i], \"sdl\")) {\n+\t\t\tidriver = 2;\n \t\t} else {\n-\t\t\tfprintf(stderr, \"Unknown argument '%s'\\n\", argv[1]);\n-\t\t\tgoto err_os;\n-\t\t}\n-\t}\n-\n+\t\t\tidriver = 1;\n+\t\t}\n+\t}\n+\n+    if (idriver == 2) {\n+        joystickb_reg_driver(context, &joystickb_sdl_driver);\n+    } else if (idriver == 3) {\n+        joystickb_reg_driver(context, &joystickb_event_driver);\n+    } else {\n+        joystickb_reg_driver(context, &joystickb_raw_driver);\n+    }\n+        \n \tif (opt_log || opt_logsync) {\n \t\tconst char* log = \"advj.log\";\n \t\tremove(log);\n@@ -263,8 +271,8 @@\n \t}\n \n \tprobe();\n-\tcalibrate();\n-\trun();\n+\t/* calibrate();\n+\trun();*/\n \n \tjoystickb_done();\n \tos_inner_done();\n"
  },
  {
    "path": "packages/sx05re/emulators/advancemame/patches/advancemame-fix-slang.patch",
    "content": "--- a/configure.ac\t2025-04-16 09:30:03.284454900 +0200\n+++ b/configure.ac\t2025-04-16 22:31:02.634757319 +0200\n@@ -732,38 +732,27 @@\n \t[ac_lib_slang=auto]\n )\n if test $ac_lib_slang = auto; then\n-\tPKG_CHECK_MODULES([SLANG], [slang], [ac_lib_slang=yes], [ac_lib_slang=no])\n-\tif test $ac_lib_slang = yes; then\n-\t\tac_save_CFLAGS=\"$CFLAGS\"\n-\t\tac_save_LIBS=\"$LIBS\"\n-\t\tCFLAGS=\"SLANG_CFLAGS $CFLAGS\"\n-\t\tLIBS=\"$SLANG_LIBS $LIBS\"\n-                AC_MSG_CHECKING([for linking slang])\n-                AC_LINK_IFELSE([AC_LANG_PROGRAM([[\n-\t\t\t\t#include <slang.h>\n-\t\t\t]], [[\n-\t\t\t\tif (SLang_init_tty(-1, 0, 0) < 0) {\n-\t\t\t\t\tperror(\"SLang_init_tty\");\n-\t\t\t\t\treturn 1;\n-\t\t\t\t}\n-\n-\t\t\t\tSLang_reset_tty();\n-\t\t\t\treturn 0;\n-\t\t\t]])],[ac_lib_slang=yes],[ac_lib_slang=no])\n-\t\tAC_MSG_RESULT([$ac_lib_slang])\n-\t\tCFLAGS=\"$ac_save_CFLAGS\"\n-\t\tLIBS=\"$ac_save_LIBS\"\n-        fi\n+\tAC_CHECK_LIB(\n+\t\t[slang],\n+\t\t[SLang_init_tty],\n+\t\t[ac_lib_slang=yes],\n+\t\t[ac_lib_slang=no],\n+\t\t[]\n+\t)\n elif test $ac_lib_slang = yes; then\n-\tPKG_CHECK_MODULES([SLANG], [slang], [], AC_MSG_ERROR([the slang library is missing]))\n+\tAC_CHECK_LIB(\n+\t\t[slang],\n+\t\t[SLang_init_tty],\n+\t\t[],\n+\t\t[AC_MSG_ERROR([the sLang library is missing])],\n+\t\t[]\n+\t)\n fi\n if test $ac_lib_slang = yes; then\n-\tAC_CHECK_HEADERS([slang.h slang/slang.h], [break])\n-\tac_lib_video=\"$ac_lib_video slang\"\n-\tac_lib_text_flag=yes\n+ \tAC_CHECK_HEADERS([slang.h slang/slang.h], [break])\n+ \tac_lib_video=\"$ac_lib_video slang\"\n+ \tac_lib_text_flag=yes\n fi\n-AC_SUBST([SLANGCFLAGS],[$SLANG_CFLAGS])\n-AC_SUBST([SLANGLIBS],[$SLANG_LIBS])\n AC_SUBST([CONF_LIB_SLANG],[$ac_lib_slang])\n \n \n@@ -775,34 +764,27 @@\n \t[ac_lib_ncurses=auto]\n )\n if test $ac_lib_ncurses = auto; then\n-\tPKG_CHECK_MODULES([NCURSES], [ncurses], [ac_lib_ncurses=yes], [ac_lib_ncurses=no])\n-\tif test $ac_lib_ncurses = yes; then\n-\t\tac_save_CFLAGS=\"$CFLAGS\"\n-\t\tac_save_LIBS=\"$LIBS\"\n-\t\tCFLAGS=\"$NCURSES_CFLAGS $CFLAGS\"\n-\t\tLIBS=\"$NCURSES_LIBS $LIBS\"\n-\t\tAC_MSG_CHECKING([for linking ncurses])\n-\t\tAC_LINK_IFELSE([AC_LANG_PROGRAM([[\n-\t\t\t\t#include <ncurses.h>\n-\t\t\t]], [[\n-\t\t\t\tinitscr();\n-\t\t\t\tnoecho();\n-\t\t\t\tcurs_set(FALSE);\n-\t\t\t\tendwin();\n-\t\t\t]])],[ac_lib_ncurses=yes],[ac_lib_ncurses=no])\n-                AC_MSG_RESULT([$ac_lib_ncurses])\n-                CFLAGS=\"$ac_save_CFLAGS\"\n-                LIBS=\"$ac_save_LIBS\"\n-        fi\n+\tAC_CHECK_LIB(\n+\t\t[ncurses],\n+\t\t[endwin],\n+\t\t[ac_lib_ncurses=yes],\n+\t\t[ac_lib_ncurses=no],\n+\t\t[]\n+\t)\n elif test $ac_lib_ncurses = yes; then\n-\tPKG_CHECK_MODULES([NCURSES], [ncurses], [], AC_MSG_ERROR([the ncurses library is missing]))\n+\tAC_CHECK_LIB(\n+\t\t[ncurses],\n+\t\t[endwin],\n+\t\t[],\n+\t\t[AC_MSG_ERROR([the sLang library is missing])],\n+\t\t[]\n+\t)\n fi\n if test $ac_lib_ncurses = yes; then\n-\tac_lib_video=\"$ac_lib_video ncurses\"\n-\tac_lib_text_flag=yes\n+ \tac_lib_video=\"$ac_lib_video ncurses\"\n+ \tac_lib_text_flag=yes\n fi\n-AC_SUBST([NCURSESCFLAGS],[$NCURSES_CFLAGS])\n-AC_SUBST([NCURSESLIBS],[$NCURSES_LIBS])\n+\n AC_SUBST([CONF_LIB_NCURSES],[$ac_lib_ncurses])\n \n \n"
  },
  {
    "path": "packages/sx05re/emulators/advancemame/patches/advancemame-fix-vfb-fps.patch",
    "content": "diff --git a/advance/linux/vfb.c b/advance/linux/vfb.c\nindex c25bca05..7886f78c 100644\n--- a/advance/linux/vfb.c\n+++ b/advance/linux/vfb.c\n@@ -1707,7 +1707,7 @@ static adv_error fb_wait_vsync_ext(void)\n \tif (ioctl(fb_state.fd, FBIO_WAITFORVSYNC, 0) != 0) {\n \t\tlog_std((\"WARNING:video:fb: ioctl(FBIO_WAITFORVSYNC) failed\\n\"));\n \t\t/* it may be not supported, it isn't an error */\n-\t\treturn -1;\n+\t\treturn -2;\n \t}\n \n \treturn 0;\n@@ -1727,7 +1727,7 @@ static adv_error fb_wait_vsync_api(void)\n \tif (ioctl(fb_state.fd, FBIOGET_VBLANK, &blank) != 0) {\n \t\tlog_std((\"WARNING:video:fb: ioctl(FBIOGET_VBLANK) failed\\n\"));\n \t\t/* it may be not supported, it isn't an error */\n-\t\treturn -1;\n+\t\treturn -2;\n \t}\n \n \tif ((blank.flags & FB_VBLANK_HAVE_COUNT) != 0) {\n@@ -1803,9 +1803,13 @@ static adv_error fb_wait_vsync_vga(void)\n \n void fb_wait_vsync(void)\n {\n+\tadv_error res = 0;\n \tswitch (fb_state.wait) {\n-\tcase fb_wait_ext:\n-\t\tif (fb_wait_vsync_ext() != 0) {\n+\tcase fb_wait_ext: \n+\t\tres = fb_wait_vsync_ext();\n+\t\tif (res != 0) {\n+\t\t\tif (res == -2)\n+\t\t\t\tbreak;\n \t\t\t++fb_state.wait_error;\n \t\t\tif (fb_state.wait_error > WAIT_ERROR_MAX)\n \t\t\t\tfb_state.wait = fb_wait_none;\n@@ -1814,7 +1818,10 @@ void fb_wait_vsync(void)\n \t\t}\n \t\tbreak;\n \tcase fb_wait_api:\n-\t\tif (fb_wait_vsync_api() != 0) {\n+\t\tres = fb_wait_vsync_api();\n+\t\tif (res != 0) {\n+\t\t\tif (res == -2)\n+\t\t\t\tbreak;\n \t\t\t++fb_state.wait_error;\n \t\t\tif (fb_state.wait_error > WAIT_ERROR_MAX)\n \t\t\t\tfb_state.wait = fb_wait_none;\n@@ -1834,18 +1841,21 @@ void fb_wait_vsync(void)\n \t\tbreak;\n #endif\n \tcase fb_wait_detect:\n-\t\tif (fb_wait_vsync_ext() == 0) {\n+\t\tres = fb_wait_vsync_ext();\n+\t\tif (res == 0) {\n \t\t\tfb_state.wait = fb_wait_ext;\n \t\t\tfb_state.wait_error = 0;\n-\t\t} else if (fb_wait_vsync_api() == 0) {\n+\t\t} else if ((res = fb_wait_vsync_api()) && res == 0) {\n \t\t\tfb_state.wait = fb_wait_api;\n \t\t\tfb_state.wait_error = 0;\n #ifdef __i386__\n-\t\t} else if (fb_wait_vsync_vga() == 0) {\n+\t\t} else if ((res = fb_wait_vsync_vga()) && res == 0) {\n \t\t\tfb_state.wait = fb_wait_vga;\n \t\t\tfb_state.wait_error = 0;\n #endif\n \t\t} else {\n+\t\t\tif (res==-2)\n+\t\t\t\tbreak;\n \t\t\t++fb_state.wait_error;\n \t\t\tif (fb_state.wait_error > WAIT_ERROR_MAX)\n \t\t\t\tfb_state.wait = fb_wait_none;\ndiff --git a/src/mame.c b/src/mame.c\nindex 2d7eb97a..b37f5924 100644\n--- a/src/mame.c\n+++ b/src/mame.c\n@@ -229,6 +229,7 @@ const char *memory_region_names[REGION_MAX] =\n \t\"REGION_PLDS\"\n };\n \n+_globals globals;\n \n /***************************************************************************\n     PROTOTYPES\n@@ -303,6 +304,14 @@ int run_game(int game)\n \t\t\t/* then finish setting up our local machine */\n \t\t\tinit_machine();\n \n+\t\t\tprintf(\"globals.fps_fixed: %f\",globals.fps_fixed);\n+\t\t\tif (globals.fps_fixed > 0.0 && Machine->refresh_rate != globals.fps_fixed) {\n+\t\t\t\t*(globals.sound_fps) = globals.fps_fixed;\n+\t\t\t\t*(globals.fps_speed_factor) *= Machine->refresh_rate / globals.fps_fixed;\n+\t\t\t\t*(globals.sound_speed) = globals.fps_fixed / Machine->refresh_rate;\n+\t\t\t\tMachine->refresh_rate = globals.fps_fixed;\n+\t\t\t}\n+\n \t\t\t/* load the configuration settings and NVRAM */\n \t\t\tsettingsloaded = config_load_settings();\n \t\t\tnvram_load();\ndiff --git a/src/mame.h b/src/mame.h\nindex 2b920a1b..a47751a8 100644\n--- a/src/mame.h\n+++ b/src/mame.h\n@@ -182,6 +182,13 @@ struct ImageFile\n };\n #endif /* MESS */\n \n+typedef struct __globals _globals;\n+struct __globals {\n+\tdouble fps_fixed;\n+\tdouble* fps_speed_factor;\n+\tdouble* sound_speed;\n+\tdouble* sound_fps;\n+};\n \n /* The host platform should fill these fields with the preferences specified in the GUI */\n /* or on the commandline. */"
  },
  {
    "path": "packages/sx05re/emulators/advancemame/patches/advancemame-return-0-on-terminate.patch",
    "content": "--- a/advance/linux/target.c\n+++ b/advance/linux/target.c\n@@ -1099,7 +1099,7 @@\n \t\texit(EXIT_FAILURE);\n \t} else if (signum == SIGTERM) {\n \t\tfprintf(stderr, \"Terminated\\n\\r\");\n-\t\texit(EXIT_FAILURE);\n+\t\texit(0);\n \t} else if (signum == SIGALRM) {\n \t\tfprintf(stderr, \"Alarm\\n\\r\");\n \t\texit(EXIT_FAILURE);\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry/config/conf/AmigaA1200-default.uae",
    "content": "config_description=UAE Amiga 1200/ Amiga CD32 default configuration\nconfig_hardware=true\nconfig_host=true\nconfig_version=3.6.0\nrtg_nocustom=true\na1000ram=false\nsynchronize_clock=yes\nsound_auto=yes\npandora.jump=-1\npandora.autofire_button=3\npandora.button2=1\npandora.button1=2\npandora.move_y=0\npandora.move_x=0\npandora.custom_r=0\npandora.custom_l=0\npandora.custom_y=0\npandora.custom_x=0\npandora.custom_b=0\npandora.custom_a=0\npandora.custom_right=0\npandora.custom_left=0\npandora.custom_down=0\npandora.custom_up=0\npandora.custom_dpad=0\npandora.custom_controls=0\npandora.tap_delay=10\npandora.stylus_offset=0\npandora.joy_port=0\npandora.joy_conf=0\npandora.cpu_speed=600\npandora.hardfile_path=/storage/.config/amiberry/\npandora.floppy_path=/storage/.config/amiberry/disks/\npandora.rom_path=/storage/.config/amiberry/kickstarts/\namiberry.rom_path=/storage/.config/amiberry/kickstarts/\namiberry.floppy_path=/storage/.config/amiberry/disks/\namiberry.hardfile_path=/storage/.config/amiberry/\namiberry.cd_path=/storage/.config/amiberry/cd32/\n; \n; *** Controller/Input Configuration\n; \njoyport0=mouse\njoyport0_autofire=none\njoyport0_friendlyname=Mouse\njoyport0_name=MOUSE0\n; \njoyport1=joy1\njoyport1_autofire=normal\njoyport1_friendlyname=Logitech Gamepad F310\njoyport1_name=JOY1\n; \njoyport2=joy0\njoyport2_autofire=normal\njoyport2_friendlyname=Keyboard as Joystick [Default]\njoyport2_name=JOY0\n; \n; \n; \ninput.joymouse_speed_analog=2\ninput.joymouse_speed_digital=10\ninput.joymouse_deadzone=33\ninput.joystick_deadzone=33\ninput.analog_joystick_multiplier=15\ninput.analog_joystick_offset=-1\ninput.mouse_speed=100\ninput.autofire_speed=2496\nkbd_lang=us\n; \n; *** Host-Specific\n; \namiberry.vertical_offset=0\namiberry.hide_idle_led=0\namiberry.gfx_correct_aspect=1\namiberry.kbd_led_num=-1\namiberry.kbd_led_scr=-1\namiberry.scaling_method=-1\namiberry.use_analogue_remap=false\namiberry.use_retroarch_quit=true\namiberry.use_retroarch_menu=true\namiberry.use_retroarch_reset=false\n; \n; *** Common / Paths\n; \nuse_gui=no\nkickstart_rom_file=$(FILE_PATH)/kick40068.A1200\nkickstart_ext_rom_file=\nide_mb_rom_file=:ENABLED\nflash_file=\ncart_file=\n; \n; *** Floppy Drives\n; \n;floppy0=\n;floppy1=\n;floppy2=\n;floppy3=\nnr_floppies=4\nfloppy_speed=100\n; \n; *** Hard Drives\n; \n; \n; *** CD / CD32\n; \ncd_speed=100\n; \n; *** Display / Screen Setup\n; \ngfx_framerate=0\ngfx_width=640\ngfx_height=256\ngfx_refreshrate=50\ngfx_refreshrate_rtg=50\ngfx_lores=false\ngfx_resolution=hires\ngfx_linemode=none\ngfx_fullscreen_amiga=true\ngfx_fullscreen_picasso=true\nntsc=false\n; \n; *** CPU options\n; \ncpu_speed=real\ncpu_type=68ec020\ncpu_model=68020\ncpu_compatible=false\ncpu_24bit_addressing=true\nfpu_strict=false\ncompfpu=true\ncachesize=0\nfinegrain_cpu_speed=1024\n; \n; *** Memory\n; \nchipmem_size=4\nz3mapping=real\nfastmem_size=0\na3000mem_size=0\nmbresmem_size=0\nz3mem_size=0\nz3mem_start=0x40000000\nbogomem_size=0\nrtg_modes=0x502\n; \n; *** Chipset\n; \nchipset=aga\nchipset_refreshrate=50.000000\ncollision_level=playfields\nchipset_compatible=Generic\nrtc=MSM6242B\nimmediate_blits=false\nfast_copper=true\n; \n; *** Sound Options\n; \nsound_output=exact\nsound_channels=stereo\nsound_stereo_separation=7\nsound_stereo_mixing_delay=0\nsound_frequency=44100\nsound_interpol=none\nsound_filter=off\nsound_filter_type=standard\nsound_volume_cd=20\n; \n; *** Misc. Options\n; \nbsdsocket_emu=false\n\ngfx_center_vertical=smart\ngfx_center_horizontal=smart\ngfx_center_vertical=smart\ngfx_center_horizontal=smart\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry/config/conf/AmigaA500-default.uae",
    "content": "config_description=UAE Amiga 500 default configuration\nconfig_hardware=true\nconfig_host=true\nconfig_version=8.0.0\nconfig_hardware_path=\nconfig_host_path=\nconfig_all_path=\namiberry.rom_path=./\namiberry.floppy_path=./\namiberry.hardfile_path=./\n; host-specific\namiberry.middle_mouse=true\namiberry.active_priority=2\namiberry.soundcard=0\namiberry.soundcardname=AML-AUGESOUND, \n; common\nuse_gui=no\nuse_debugger=false\nkickstart_rom_file=/storage/roms/bios/amiga-os-130.rom\nkickstart_rom_file_id=C4F0F55F,KS ROM v1.3 (A500,A1000,A2000)\nkickstart_ext_rom_file=\nflash_file=\ncart_file=\nrtc_file=\nkickshifter=false\nscsidevice_disable=false\nfloppy_volume=33\nfloppy1=\nfloppy1type=-1\nfloppy2=\nfloppy3=\nnr_floppies=1\nfloppy_speed=100\ncd_speed=100\nparallel_on_demand=false\nserial_on_demand=false\nserial_hardware_ctsrts=true\nserial_status=true\nserial_direct=false\nscsi=false\nuaeserial=false\nsana2=false\nsound_output=exact\nsound_channels=stereo\nsound_stereo_separation=7\nsound_stereo_mixing_delay=0\nsound_max_buff=8192\nsound_frequency=44100\nsound_interpol=anti\nsound_filter=emulated\nsound_filter_type=standard\nsound_volume=0\nsound_volume_paula=0\nsound_volume_cd=0\nsound_volume_ahi=0\nsound_volume_midi=0\nsound_volume_genlock=0\nsound_auto=false\nsound_stereo_swap_paula=false\nsound_stereo_swap_ahi=false\ncomp_trustbyte=direct\ncomp_trustword=direct\ncomp_trustlong=direct\ncomp_trustnaddr=direct\ncomp_nf=true\ncomp_constjump=true\ncomp_flushmode=soft\ncomp_catchfault=true\ncachesize=0\njoyport0=mouse\njoyport0autofire=none\njoyportfriendlyname0=System mouse\njoyportname0=MOUSE0\njoyport1=joy0\njoyport1autofire=none\njoyportfriendlyname1=Wireless Controller\njoyportname1=JOY0\njoyport1_amiberry_custom_none_a=\njoyport1_amiberry_custom_none_b=\njoyport1_amiberry_custom_none_x=\njoyport1_amiberry_custom_none_y=\njoyport1_amiberry_custom_none_back=\njoyport1_amiberry_custom_none_guide=\njoyport1_amiberry_custom_none_start=\njoyport1_amiberry_custom_none_leftstick=\njoyport1_amiberry_custom_none_rightstick=\njoyport1_amiberry_custom_none_leftshoulder=\njoyport1_amiberry_custom_none_rightshoulder=\njoyport1_amiberry_custom_none_dpup=\njoyport1_amiberry_custom_none_dpdown=\njoyport1_amiberry_custom_none_dpleft=\njoyport1_amiberry_custom_none_dpright=\njoyport1_amiberry_custom_none_misc1=\njoyport1_amiberry_custom_none_paddle1=\njoyport1_amiberry_custom_none_paddle2=\njoyport1_amiberry_custom_none_paddle3=\njoyport1_amiberry_custom_none_paddle4=\njoyport1_amiberry_custom_none_touchpad=\njoyport1_amiberry_custom_axis_none_leftx=\njoyport1_amiberry_custom_axis_none_lefty=\njoyport1_amiberry_custom_axis_none_rightx=\njoyport1_amiberry_custom_axis_none_righty=\njoyport1_amiberry_custom_axis_none_lefttrigger=\njoyport1_amiberry_custom_axis_none_righttrigger=\njoyport1_amiberry_custom_hotkey_a=\njoyport1_amiberry_custom_hotkey_b=\njoyport1_amiberry_custom_hotkey_x=\njoyport1_amiberry_custom_hotkey_y=\njoyport1_amiberry_custom_hotkey_back=\njoyport1_amiberry_custom_hotkey_guide=\njoyport1_amiberry_custom_hotkey_start=\njoyport1_amiberry_custom_hotkey_leftstick=\njoyport1_amiberry_custom_hotkey_rightstick=\njoyport1_amiberry_custom_hotkey_leftshoulder=\njoyport1_amiberry_custom_hotkey_rightshoulder=\njoyport1_amiberry_custom_hotkey_dpup=\njoyport1_amiberry_custom_hotkey_dpdown=\njoyport1_amiberry_custom_hotkey_dpleft=\njoyport1_amiberry_custom_hotkey_dpright=\njoyport1_amiberry_custom_hotkey_misc1=\njoyport1_amiberry_custom_hotkey_paddle1=\njoyport1_amiberry_custom_hotkey_paddle2=\njoyport1_amiberry_custom_hotkey_paddle3=\njoyport1_amiberry_custom_hotkey_paddle4=\njoyport1_amiberry_custom_hotkey_touchpad=\njoyport1_amiberry_custom_axis_hotkey_leftx=\njoyport1_amiberry_custom_axis_hotkey_lefty=\njoyport1_amiberry_custom_axis_hotkey_rightx=\njoyport1_amiberry_custom_axis_hotkey_righty=\njoyport1_amiberry_custom_axis_hotkey_lefttrigger=\njoyport1_amiberry_custom_axis_hotkey_righttrigger=\nbsdsocket_emu=false\nsynchronize_clock=false\nmaprom=0x0\nparallel_postscript_emulation=false\nparallel_postscript_detection=false\nghostscript_parameters=\nparallel_autoflush=5\ngfx_display=0\ngfx_display_rtg=0\ngfx_framerate=1\ngfx_width=720\ngfx_height=568\ngfx_x_windowed=0\ngfx_y_windowed=0\ngfx_width_windowed=720\ngfx_height_windowed=568\ngfx_width_fullscreen=800\ngfx_height_fullscreen=600\ngfx_refreshrate=0\ngfx_autoresolution=0\ngfx_autoresolution_vga=true\ngfx_backbuffers=2\ngfx_backbuffers_rtg=1\ngfx_vsync=false\ngfx_vsyncmode=normal\ngfx_vsync_picasso=false\ngfx_vsyncmode_picasso=normal\ngfx_lores=false\ngfx_resolution=hires\ngfx_lores_mode=normal\ngfx_flickerfixer=false\ngfx_linemode=double2\ngfx_fullscreen_amiga=fullwindow\ngfx_fullscreen_picasso=fullwindow\ngfx_center_horizontal=none\ngfx_center_vertical=none\ngfx_colour_mode=32bit\ngfx_blacker_than_black=false\ngfx_api=sdl2\ngfx_api_options=hardware\nimmediate_blits=false\nntsc=false\ngenlock=false\nchipset=ocs\nchipset_refreshrate=49.920410\ncollision_level=full\nchipset_compatible=A500\ndisplay_optimizations=full\nrtc=MSM6242B\nresetwarning=false\ncia_todbug=true\nfastmem_size=0\ndebugmem_start=0x0\ndebugmem_size=0\nmem25bit_size=0\na3000mem_size=0\nmbresmem_size=0\nz3mem_size=0\nz3mem_start=0x40000000\nbogomem_size=2\ngfxcard_hardware_vblank=false\ngfxcard_hardware_sprite=false\ngfxcard_multithread=false\nchipmem_size=1\ncpu_speed=real\ncpu_throttle=0.0\ncpu_type=68000\ncpu_model=68000\ncpu_compatible=true\ncpu_24bit_addressing=true\ncpu_data_cache=false\ncpu_multiplier=2\ncpu_cycle_exact=true\ncpu_memory_cycle_exact=true\nblitter_cycle_exact=true\ncycle_exact=true\nfpu_strict=false\nrtg_nocustom=true\nrtg_modes=0x112\nrtg_noautomodes=false\ndebug_mem=false\nlog_illegal_mem=false\nkbd_lang=us\ninput.config=0\ninput.joymouse_speed_analog=100\ninput.joymouse_speed_digital=10\ninput.joymouse_deadzone=33\ninput.joystick_deadzone=33\ninput.analog_joystick_multiplier=18\ninput.analog_joystick_offset=-5\ninput.mouse_speed=100\ninput.autofire_speed=600\ninput.autoswitch=true\n; *** WHDLoad Booter. Options\nwhdload_filename=\nwhdload_game_name=\nwhdload_uuid=\nwhdload_slave_default=\nwhdload_slave_libraries=false\nwhdload_slave=\nwhdload_slave_data_path=\nwhdload_custom1=0\nwhdload_custom2=0\nwhdload_custom3=0\nwhdload_custom4=0\nwhdload_custom5=0\nwhdload_custom=\nwhdload_buttonwait=false\nwhdload_showsplash=true\nwhdload_writecache=false\nwhdload_quit_on_exit=false\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry/config/conf/amiberry.conf",
    "content": "Quickstart=1\nread_config_descriptions=yes\nwrite_logfile=no\ndefault_line_mode=1\nrctrl_as_ramiga=no\ngui_joystick_control=yes\ndefault_multithreaded_drawing=yes\ninput_default_mouse_speed=100\ninput_keyboard_as_joystick_stop_keypresses=no\ndefault_open_gui_key=F12\ndefault_quit_key=\ndefault_ar_key=Pause\ndefault_fullscreen_toggle_key=\nrotation_angle=0\ndefault_horizontal_centering=no\ndefault_vertical_centering=no\ndefault_scaling_method=-1\ndefault_gfx_autoresolution=0\ndefault_frameskip=no\ndefault_correct_aspect_ratio=yes\ndefault_auto_crop=no\ndefault_width=720\ndefault_height=568\ndefault_fullscreen_mode=1\ndefault_stereo_separation=7\ndefault_sound_frequency=44100\ndefault_sound_buffer=8192\ndefault_sound_pull=yes\ndefault_joystick_deadzone=33\ndefault_retroarch_quit=yes\ndefault_retroarch_menu=yes\ndefault_retroarch_reset=no\ndefault_retroarch_vkbd=no\ndefault_controller1=joy1\ndefault_controller2=joy2\ndefault_controller3=\ndefault_controller4=\ndefault_mouse1=mouse\ndefault_mouse2=joy0\ndefault_whd_buttonwait=no\ndefault_whd_showsplash=yes\ndefault_whd_configdelay=0\ndefault_whd_writecache=no\ndefault_whd_quit_on_exit=no\nuse_jst_instead_of_whd=no\ndisable_shutdown_button=yes\nallow_display_settings_from_xml=yes\ndefault_soundcard=0\ndefault_vkbd_enabled=no\ndefault_vkbd_hires=no\ndefault_vkbd_exit=no\ndefault_vkbd_language=US\ndefault_vkbd_style=Original\ndefault_vkbd_transparency=0\ndefault_vkbd_toggle=guide\ngui_theme=Default.theme\nconfig_path=/storage/.config/amiberry/conf/\ncontrollers_path=/storage/.config/amiberry/controller/\nretroarch_config=/storage/.config/retroarch/retroarch.cfg\nwhdboot_path=/storage/.config/amiberry/whdboot/\nwhdload_arch_path=/storage/.config/amiberry/lha/\nfloppy_path=/storage/.config/amiberry/floppies/\nharddrive_path=/storage/.config/amiberry/harddrives/\ncdrom_path=/storage/.config/amiberry/cdroms/\nlogfile_path=/storage/.config/amiberry/amiberry.log\nrom_path=/storage/.config/amiberry/kickstarts/\nrp9_path=/storage/.config/amiberry/rp9/\nfloppy_sounds_dir=/storage/.config/amiberry/data/floppy_sounds/\nsaveimage_dir=/storage/.config/amiberry/\nsavestate_dir=/storage/.config/amiberry/savestates/\nscreenshot_dir=/storage/.config/amiberry/screenshots/\nripper_path=/storage/.config/amiberry/ripper/\ninputrecordings_dir=/storage/.config/amiberry/inputrecordings/\nnvram_dir=/storage/.config/amiberry/nvram/\nplugins_dir=/storage/.config/amiberry/plugins\nvideo_dir=/storage/.config/amiberry/videos/\nthemes_path=/storage/.config/amiberry/themes/\nMRUDiskList=1\nMRUCDList=0\nMRUWHDLoadList=0\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry/libenet/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2025-present EmuELEC (https://github.com/emuelec)\n\nPKG_NAME=\"libenet\"\nPKG_VERSION=\"8be2368a8001f28db44e81d5939de5e613025023\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/lsalzman/enet\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"ENet reliable UDP networking library\"\nPKG_TOOLCHAIN=\"auto\"\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry/libportmidi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2025-present EmuELEC (https://github.com/emuelec)\n\nPKG_NAME=\"libportmidi\"\nPKG_VERSION=\"7e978e1ef5bf199ad9ea43e3d224cd3f19cb2077\"\nPKG_LICENSE=\"other\"\nPKG_SITE=\"https://github.com/PortMidi/portmidi\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain alsa\"\nPKG_LONGDESC=\"portmidi is a cross-platform MIDI input/output library\"\nPKG_TOOLCHAIN=\"auto\"\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry/libserialport/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2025-present EmuELEC (https://github.com/emuelec)\n\nPKG_NAME=\"libserialport\"\nPKG_VERSION=\"21b3dfe5f68c205be4086469335fd2fc2ce11ed2\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/sigrokproject/libserialport\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"libserialport is a minimal, cross-platform shared library written in C that is intended to take care of the OS-specific details when writing software that uses serial ports.\"\nPKG_TOOLCHAIN=\"configure\"\n\npre_configure_target() {\n  ${PKG_BUILD}/autogen.sh\n}\n\n\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)\n\nPKG_NAME=\"amiberry\"\nPKG_VERSION=\"452783ae8c94a67984b664e9b24f0b99ad163dcd\"\nPKG_ARCH=\"aarch64 arm\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/BlitterStudio/amiberry\"\nPKG_URL=\"https://github.com/BlitterStudio/amiberry.git\"\nPKG_DEPENDS_TARGET=\"toolchain linux libpcap libenet glibc bzip2 zlib SDL2 SDL2_image SDL2_ttf capsimg freetype libxml2 flac libogg mpg123-compat libpng libmpeg2 libportmidi libserialport\"\nPKG_LONGDESC=\"Amiberry is an optimized Amiga emulator for ARM-based boards.\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"cmake\"\nPKG_EE_UPDATE=no\n\nPKG_BUILD_FLAGS=\"-O3 -fno-strict-aliasing -fomit-frame-pointer -ffast-math\"\n\npre_configure_target() {\n  PKG_CMAKE_OPTS_TARGET=\"-DUSE_OPENGL=OFF -DCMAKE_BUILD_TYPE=Release -DUSE_UAENET_PCAP=ON\"\n}\n\nmakeinstall_target() {\n  # Create directories\n  mkdir -p ${INSTALL}/usr/bin\n  mkdir -p ${INSTALL}/usr/lib\n  mkdir -p ${INSTALL}/usr/config/amiberry\n  # mkdir -p ${INSTALL}/usr/config/amiberry/controller\n\n  # Copy ressources\n  cp -a ${PKG_DIR}/config/*           ${INSTALL}/usr/config/amiberry/\n  cp -a data                          ${INSTALL}/usr/config/amiberry/\n  cp -a roms                          ${INSTALL}/usr/config/amiberry/\n  mkdir -p savestates                 ${INSTALL}/usr/config/amiberry/\n  mkdir -p screenshots                ${INSTALL}/usr/config/amiberry/\n  cp -a whdboot                       ${INSTALL}/usr/config/amiberry/\n  ln -s /storage/roms/bios \t\t\t  ${INSTALL}/usr/config/amiberry/kickstarts\n  mkdir -p\t\t\t\t\t\t\t  ${INSTALL}/usr/config/amiberry/plugins\n  cp ${PKG_BUILD}/.${TARGET_NAME}/external/floppybridge/libfloppybridge.so ${INSTALL}/usr/config/amiberry/plugins/\n  cp ${PKG_BUILD}/.${TARGET_NAME}/external/capsimage/*.so ${INSTALL}/usr/config/amiberry/plugins/\n\n  # Create links to Retroarch controller files\n  # ln -s /usr/share/retroarch/autoconfig/udev/8Bitdo_Pro_SF30_BT_B.cfg \"${INSTALL}/usr/config/amiberry/controller/8Bitdo SF30 Pro.cfg\"\n  ln -s \"/tmp/joypads\" \"${INSTALL}/usr/config/amiberry/controller\"\n\n  # Copy binary, scripts & link libcapsimg\n  cp -a amiberry* ${INSTALL}/usr/bin/amiberry\n  cp -a ${PKG_DIR}/scripts/*          ${INSTALL}/usr/bin\n  \n  \n  UAE=\"${INSTALL}/usr/config/amiberry/conf/*.uae\"\n  for i in ${UAE}; do echo -e \"gfx_center_vertical=smart\\ngfx_center_horizontal=smart\" >> ${i}; done\n\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry/patches/001-default_fullscreen.patch",
    "content": "--- a/src/include/options.h\t2024-03-13 19:51:07.175899314 +0100\n+++ b/src/include/options.h\t2024-03-13 19:51:30.872392451 +0100\n@@ -1244,7 +1244,7 @@\n \tbool default_auto_crop = false;\n \tint default_width = 720;\n \tint default_height = 568;\n-\tint default_fullscreen_mode = 0;\n+\tint default_fullscreen_mode = 1;\n \tint default_stereo_separation = 7;\n \tint default_sound_buffer = 8192;\n \tbool default_sound_pull = true;\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry/patches/002-paths.patch",
    "content": "diff '--color=auto' -uri amiberry-v7.1.0-orig/src/osdep/amiberry.cpp amiberry-v7.1.0/src/osdep/amiberry.cpp\n--- amiberry-v7.1.0-orig/src/osdep/amiberry.cpp\t2025-07-09 14:01:05.000000000 -0700\n+++ amiberry-v7.1.0/src/osdep/amiberry.cpp\t2025-07-23 09:30:24.737904046 -0700\n@@ -4398,8 +4398,10 @@\n \t\tif (!my_existsdir(xdg_config_home.c_str()))\n \t\t\tmy_mkdir(xdg_config_home.c_str());\n \n-\t\tamiberry_conf_file = xdg_config_home + \"/amiberry.conf\";\n-\t\tamiberry_ini_file = xdg_config_home + \"/amiberry.ini\";\n+\t\t//amiberry_conf_file = xdg_config_home + \"/amiberry.conf\";\n+\t\t//amiberry_ini_file = xdg_config_home + \"/amiberry.ini\";\n+\t\tamiberry_conf_file = std::string(\"/storage/.config/amiberry/conf/amiberry.conf\");\n+\t\tamiberry_ini_file = std::string(\"/storage/.config/amiberry/conf/amiberry.ini\");\n \t}\n \treturn my_existsfile2(amiberry_conf_file.c_str());\n }\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry/patches/003-use_udev_gamepad_name.patch",
    "content": "--- a/src/osdep/retroarch.cpp\n+++ b/src/osdep/retroarch.cpp\n@@ -71,7 +71,22 @@\n \n \t\tif (param[0] != 'h') // check it isn't some kind of hat starting 'h' (so if D-pad uses buttons)\n \t\t{\n-\t\t\tbutton = abs(std::stoi(param));\n+\t\t\ttry\n+\t\t\t{\n+\t\t\t\tbutton = abs(std::stoi(param));\n+\t\t\t}\n+\t\t\tcatch (const std::invalid_argument& e)\n+\t\t\t{\n+\t\t\t\twrite_log(\"Invalid argument in stoi for param='%s' in setting='%s' (line: %s)\", \n+\t\t\t\tparam.c_str(), find_setting.c_str(), line.c_str());\n+\t\t\t\tbutton = -1; // fallback\n+\t\t\t}\n+\t\t\tcatch (const std::out_of_range& e)\n+\t\t\t{\n+\t\t\t\twrite_log(\"Out of range in stoi for param='%s' in setting='%s' (line: %s)\", \n+\t\t\t\tparam.c_str(), find_setting.c_str(), line.c_str());\n+\t\t\t\tbutton = -1;\n+\t\t\t}\n \t\t}\n \n \t\tif (option == find_setting)\n--- a/src/osdep/amiberry_input.cpp\n+++ b/src/osdep/amiberry_input.cpp\n--- <unnamed>\n+++ <unnamed>\n@@ -1,6 +1,8 @@\n #include <cstdio>\n #include <cstring>\n #include <cstdlib>\n+#include <fstream>\n+#include <sstream>\n \n #include \"sysdeps.h\"\n #include \"options.h\"\n@@ -1073,6 +1075,54 @@\n \treturn num_joystick;\n }\n \n+std::string get_udev_name_from_proc(SDL_Joystick* joystick)\n+{\n+\tconst char* joystick_path = SDL_JoystickPath(joystick);\n+\tif (joystick_path == nullptr)\n+\t\treturn \"\";\n+\t\n+\t// Extract the event number from the path (e.g., \"/dev/input/event5\" -> \"event5\")\n+\tconst char* last_slash = strrchr(joystick_path, '/');\n+\tif (last_slash == nullptr)\n+\t\treturn \"\";\n+\t\n+\tstd::string event_name = std::string(last_slash + 1);\n+\t\n+\t// Parse /proc/bus/input/devices to find the matching device\n+\tstd::ifstream devices_file(\"/proc/bus/input/devices\");\n+\tif (!devices_file.is_open())\n+\t\treturn \"\";\n+\t\n+\tstd::string line;\n+\tstd::string current_name;\n+\tbool found_device = false;\n+\t\n+\twhile (std::getline(devices_file, line))\n+\t{\n+\t\t// Look for Name line (e.g., N: Name=\"Microsoft X-Box 360 pad\")\n+\t\tif (line.substr(0, 3) == \"N: \")\n+\t\t{\n+\t\t\tsize_t start = line.find('\"');\n+\t\t\tsize_t end = line.rfind('\"');\n+\t\t\tif (start != std::string::npos && end != std::string::npos && end > start)\n+\t\t\t\tcurrent_name = line.substr(start + 1, end - start - 1);\n+\t\t}\n+\t\t// Look for Handlers line containing our event device\n+\t\telse if (line.substr(0, 3) == \"H: \" && line.find(event_name) != std::string::npos)\n+\t\t{\n+\t\t\tfound_device = true;\n+\t\t\tbreak;\n+\t\t}\n+\t\t// Empty line indicates new device section\n+\t\telse if (line.empty())\n+\t\t{\n+\t\t\tcurrent_name.clear();\n+\t\t}\n+\t}\n+\t\n+\treturn found_device ? current_name : \"\";\n+}\n+\n // Helper functions\n void open_as_game_controller(struct didata* did, const int i)\n {\n@@ -1098,6 +1148,9 @@\n \t\tdid->joystick_name.assign(SDL_JoystickNameForIndex(i));\n \telse\n \t\tdid->joystick_name = \"\";\n+\n+\t// Get UDEV name from /proc/bus/input/devices\n+\tdid->udev_name = get_udev_name_from_proc(did->joystick);\n \n \tif (!did->controller_name.empty())\n \t\tdid->name = did->controller_name;\n@@ -1210,8 +1263,19 @@\n \t}\n \n \tconst std::string retroarch_file = get_retroarch_file();\n-\tconst bool retroarch_config_exists = !retroarch_config_file.empty() && my_existsfile2(retroarch_config_file.c_str());\n+\tbool retroarch_config_exists = !retroarch_config_file.empty() && my_existsfile2(retroarch_config_file.c_str());\n+\n+\tif (!retroarch_config_exists && !did->udev_name.empty())\n+\t{\n+\t\tconst auto sanitized_name = sanitize_retroarch_name(did->udev_name);\n+\t\tretroarch_config_file = controllers + sanitized_name + \".cfg\";\n+\t\twrite_log(\"Joystick udev name: '%s', sanitized to: '%s'\\n\", did->joystick_name.c_str(), sanitized_name.c_str());\n+\t\twrite_log(\"Checking for Retroarch cfg file using udev: '%s'\\n\", retroarch_config_file.c_str());\n+\t}\n+\t\n+\tretroarch_config_exists = !retroarch_config_file.empty() && my_existsfile2(retroarch_config_file.c_str());\n \tconst bool retroarch_file_exists = my_existsfile2(retroarch_file.c_str());\n+\t\n \n \tif (retroarch_config_exists || retroarch_file_exists)\n \t{\n\n--- a/src/osdep/amiberry_input.h\n+++ b/src/osdep/amiberry_input.h\n@@ -49,6 +49,7 @@\n \tint type{};\n \tint acquired{};\n \tstd::string name{};\n+\tstd::string udev_name{};\n \tstd::string controller_name{};\n \tstd::string joystick_name{};\n \n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry/patches/fix_fbdev_window.patch",
    "content": "From dd65698e9919d4df13d305e2bfe91b044611b201 Mon Sep 17 00:00:00 2001\nFrom: Adventurous Programmer <47227694+Diegrosan@users.noreply.github.com>\nDate: Sat, 11 Oct 2025 22:37:01 -0300\nSubject: [PATCH] Update main_window.cpp\n\n---\n src/osdep/gui/main_window.cpp | 154 ++++++++++++++++++++++++++++------\n 1 file changed, 127 insertions(+), 27 deletions(-)\n\ndiff --git a/src/osdep/gui/main_window.cpp b/src/osdep/gui/main_window.cpp\nindex d6ba1f258..141e29331 100644\n--- a/src/osdep/gui/main_window.cpp\n+++ b/src/osdep/gui/main_window.cpp\n@@ -26,6 +26,9 @@\n #include \"inputdevice.h\"\n #include \"xwin.h\"\n \n+static bool fbdev_detected = false;\n+static bool reusing_amiga_resources = false; \n+\n bool ctrl_state = false, shift_state = false, alt_state = false, win_state = false;\n int last_x = 0;\n int last_y = 0;\n@@ -246,6 +249,12 @@ void update_gui_screen()\n {\n \tconst AmigaMonitor* mon = &AMonitors[0];\n \n+\tif (!gui_texture || !gui_screen || !mon->gui_renderer)\n+\t{\n+\t\twrite_log(\"WARNING: update_gui_screen called with null pointers!\\n\");\n+\t\treturn;\n+\t}\n+\n \tSDL_UpdateTexture(gui_texture, nullptr, gui_screen->pixels, gui_screen->pitch);\n \tif (amiberry_options.rotation_angle == 0 || amiberry_options.rotation_angle == 180)\n \t\tgui_renderQuad = { 0, 0, gui_screen->w, gui_screen->h };\n@@ -259,23 +268,70 @@ void update_gui_screen()\n \t\tshow_screen(0, 0);\n }\n \n+\n void amiberry_gui_init()\n {\n \tAmigaMonitor* mon = &AMonitors[0];\n \tsdl_video_driver = SDL_GetCurrentVideoDriver();\n \n-\tif (sdl_video_driver != nullptr && strcmpi(sdl_video_driver, \"KMSDRM\") == 0)\n+\twrite_log(\"=== GUI INIT START ===\\n\");\n+\twrite_log(\"SDL Video Driver: %s\\n\", sdl_video_driver ? sdl_video_driver : \"NULL\");\n+\twrite_log(\"amiga_window exists: %s\\n\", mon->amiga_window ? \"YES\" : \"NO\");\n+\twrite_log(\"amiga_renderer exists: %s\\n\", mon->amiga_renderer ? \"YES\" : \"NO\");\n+\twrite_log(\"gui_window exists: %s\\n\", mon->gui_window ? \"YES\" : \"NO\");\n+\twrite_log(\"gui_renderer exists: %s\\n\", mon->gui_renderer ? \"YES\" : \"NO\");\n+\n+\treusing_amiga_resources = false;  // Reset\n+\n+\tif (sdl_video_driver != nullptr)\n \t{\n-\t\tkmsdrm_detected = true;\n-\t\tif (!mon->gui_window && mon->amiga_window)\n+\t\tif (strcmpi(sdl_video_driver, \"KMSDRM\") == 0)\n+\t\t{\n+\t\t\twrite_log(\"KMSDRM detected\\n\");\n+\t\t\tkmsdrm_detected = true;\n+\t\t\tfbdev_detected = false;\n+\t\t\t\n+\t\t\tif (!mon->gui_window && mon->amiga_window)\n+\t\t\t{\n+\t\t\t\tmon->gui_window = mon->amiga_window;\n+\t\t\t\treusing_amiga_resources = true;\n+\t\t\t\twrite_log(\"Reusing amiga_window for GUI (KMSDRM)\\n\");\n+\t\t\t}\n+\t\t\tif (!mon->gui_renderer && mon->amiga_renderer)\n+\t\t\t{\n+\t\t\t\tmon->gui_renderer = mon->amiga_renderer;\n+\t\t\t\treusing_amiga_resources = true;\n+\t\t\t\twrite_log(\"Reusing amiga_renderer for GUI (KMSDRM)\\n\");\n+\t\t\t}\n+\t\t}\n+\t\telse if (strcmpi(sdl_video_driver, \"fbdev\") == 0 || \n+\t\t         strstr(sdl_video_driver, \"mali\") != nullptr)\n \t\t{\n-\t\t\tmon->gui_window = mon->amiga_window;\n+\t\t\twrite_log(\"fbdev/mali detected\\n\");\n+\t\t\tfbdev_detected = true;\n+\t\t\tkmsdrm_detected = true;  // Para compatibilidade\n+\t\t\t\n+\t\t\tif (!mon->gui_window && mon->amiga_window)\n+\t\t\t{\n+\t\t\t\tmon->gui_window = mon->amiga_window;\n+\t\t\t\treusing_amiga_resources = true;\n+\t\t\t\twrite_log(\"Reusing amiga_window for GUI (fbdev)\\n\");\n+\t\t\t}\n+\t\t\tif (!mon->gui_renderer && mon->amiga_renderer)\n+\t\t\t{\n+\t\t\t\tmon->gui_renderer = mon->amiga_renderer;\n+\t\t\t\treusing_amiga_resources = true;\n+\t\t\t\twrite_log(\"Reusing amiga_renderer for GUI (fbdev)\\n\");\n+\t\t\t}\n \t\t}\n-\t\tif (!mon->gui_renderer && mon->amiga_renderer)\n+\t\telse\n \t\t{\n-\t\t\tmon->gui_renderer = mon->amiga_renderer;\n+\t\t\twrite_log(\"Standard video driver: %s\\n\", sdl_video_driver);\n+\t\t\tkmsdrm_detected = false;\n+\t\t\tfbdev_detected = false;\n \t\t}\n \t}\n+\t\n \tSDL_GetCurrentDisplayMode(0, &sdl_mode);\n \n \t//-------------------------------------------------\n@@ -285,23 +341,22 @@ void amiberry_gui_init()\n \t{\n \t\tgui_screen = SDL_CreateRGBSurface(0, GUI_WIDTH, GUI_HEIGHT, 16, 0, 0, 0, 0);\n \t\tcheck_error_sdl(gui_screen == nullptr, \"Unable to create GUI surface:\");\n+\t\twrite_log(\"GUI surface created\\n\");\n \t}\n \n \tif (!mon->gui_window)\n \t{\n-\t\twrite_log(\"Creating Amiberry GUI window...\\n\");\n+\t\twrite_log(\"Creating new Amiberry GUI window...\\n\");\n \t\tregqueryint(nullptr, _T(\"GUIPosX\"), &gui_window_rect.x);\n \t\tregqueryint(nullptr, _T(\"GUIPosY\"), &gui_window_rect.y);\n \n         Uint32 mode;\n \t\tif (!kmsdrm_detected)\n \t\t{\n-\t\t\t// Only enable Windowed mode if we're running under x11\n \t\t\tmode = SDL_WINDOW_RESIZABLE;\n \t\t}\n \t\telse\n \t\t{\n-\t\t\t// otherwise go for Full-window\n \t\t\tmode = SDL_WINDOW_FULLSCREEN_DESKTOP;\n \t\t}\n \n@@ -311,7 +366,6 @@ void amiberry_gui_init()\n             mode |= SDL_WINDOW_HIDDEN;\n         else\n             mode |= SDL_WINDOW_SHOWN;\n-\t\t// Set Window allow high DPI by default\n \t\tmode |= SDL_WINDOW_ALLOW_HIGHDPI;\n \n         if (amiberry_options.rotation_angle == 0 || amiberry_options.rotation_angle == 180)\n@@ -333,6 +387,7 @@ void amiberry_gui_init()\n \t\t\t\tmode);\n         }\n         check_error_sdl(mon->gui_window == nullptr, \"Unable to create window:\");\n+\t\twrite_log(\"New GUI window created\\n\");\n \n \t\tauto* const icon_surface = IMG_Load(prefix_with_data_path(\"amiberry.png\").c_str());\n \t\tif (icon_surface != nullptr)\n@@ -341,16 +396,23 @@ void amiberry_gui_init()\n \t\t\tSDL_FreeSurface(icon_surface);\n \t\t}\n \t}\n-\telse if (kmsdrm_detected)\n+\telse\n \t{\n-\t\tSDL_SetWindowSize(mon->gui_window, GUI_WIDTH, GUI_HEIGHT);\n+\t\twrite_log(\"Using existing window for GUI\\n\");\n \t}\n \n \tif (mon->gui_renderer == nullptr)\n \t{\n+\t\twrite_log(\"Creating new GUI renderer...\\n\");\n \t\tmon->gui_renderer = SDL_CreateRenderer(mon->gui_window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);\n \t\tcheck_error_sdl(mon->gui_renderer == nullptr, \"Unable to create a renderer:\");\n+\t\twrite_log(\"New GUI renderer created\\n\");\n+\t}\n+\telse\n+\t{\n+\t\twrite_log(\"Using existing renderer for GUI\\n\");\n \t}\n+\t\n \tDPIHandler::set_render_scale(mon->gui_renderer);\n \n \tgui_texture = SDL_CreateTexture(mon->gui_renderer, gui_screen->format->format, SDL_TEXTUREACCESS_STREAMING, gui_screen->w,\n@@ -364,31 +426,34 @@ void amiberry_gui_init()\n \n \tSDL_SetRelativeMouseMode(SDL_FALSE);\n \tSDL_ShowCursor(SDL_ENABLE);\n-\n \tSDL_RaiseWindow(mon->gui_window);\n \n \t//-------------------------------------------------\n \t// Create helpers for GUI framework\n \t//-------------------------------------------------\n-\n \tgui_imageLoader = new gcn::SDLImageLoader();\n \tgui_imageLoader->setRenderer(mon->gui_renderer);\n-\n-\t// The ImageLoader in use is static and must be set to be\n-\t// able to load images\n \tgcn::Image::setImageLoader(gui_imageLoader);\n+\t\n \tgui_graphics = new gcn::SDLGraphics();\n-\t// Set the target for the graphics object to be the screen.\n-\t// In other words, we will draw to the screen.\n-\t// Note, any surface will do, it doesn't have to be the screen.\n \tgui_graphics->setTarget(gui_screen);\n+\t\n \tgui_input = new gcn::SDLInput();\n+\t\n+\twrite_log(\"=== GUI INIT COMPLETE ===\\n\");\n+\twrite_log(\"Reusing amiga resources: %s\\n\", reusing_amiga_resources ? \"YES\" : \"NO\");\n }\n \n void amiberry_gui_halt()\n {\n \tAmigaMonitor* mon = &AMonitors[0];\n \n+\twrite_log(\"=== GUI HALT START ===\\n\");\n+\twrite_log(\"Reusing amiga resources: %s\\n\", reusing_amiga_resources ? \"YES\" : \"NO\");\n+\twrite_log(\"fbdev_detected: %s\\n\", fbdev_detected ? \"YES\" : \"NO\");\n+\twrite_log(\"kmsdrm_detected: %s\\n\", kmsdrm_detected ? \"YES\" : \"NO\");\n+\n+\t// Clear GUI helpers\n \tdelete gui_imageLoader;\n \tgui_imageLoader = nullptr;\n \tdelete gui_input;\n@@ -396,30 +461,65 @@ void amiberry_gui_halt()\n \tdelete gui_graphics;\n \tgui_graphics = nullptr;\n \n+\t// Clear GUI surface\n \tif (gui_screen != nullptr)\n \t{\n \t\tSDL_FreeSurface(gui_screen);\n \t\tgui_screen = nullptr;\n+\t\twrite_log(\"GUI screen freed\\n\");\n \t}\n+\t\n+\t// Clear GUI texture\n \tif (gui_texture != nullptr)\n \t{\n \t\tSDL_DestroyTexture(gui_texture);\n \t\tgui_texture = nullptr;\n+\t\twrite_log(\"GUI texture destroyed\\n\");\n \t}\n-\tif (mon->gui_renderer && !kmsdrm_detected)\n+\t\n+\t// CRITICAL: Deciding what to do with renderer and window\n+\tif (reusing_amiga_resources)\n \t{\n-\t\tSDL_DestroyRenderer(mon->gui_renderer);\n+\t\t\n+\t\twrite_log(\"Releasing (not destroying) renderer and window - they belong to emulation\\n\");\n+\t\t\n+\t\t// IMPORTANT: Reset logical size for the game\n+\t\tif (mon->gui_renderer)\n+\t\t{\n+\t\t\tSDL_RenderClear(mon->gui_renderer);\n+\t\t\tSDL_RenderPresent(mon->gui_renderer);\n+\t\t}\n+\t\t\n+\t\t// DO NOT destroy, just \"release\" the pointers\n \t\tmon->gui_renderer = nullptr;\n+\t\tmon->gui_window = nullptr;\n \t}\n+\telse\n+\t{\n+\t\t// created own resources, we destroy normally\n+\t\twrite_log(\"Destroying GUI-owned renderer and window\\n\");\n+\t\t\n+\t\tif (mon->gui_renderer)\n+\t\t{\n+\t\t\tSDL_DestroyRenderer(mon->gui_renderer);\n+\t\t\tmon->gui_renderer = nullptr;\n+\t\t\twrite_log(\"GUI renderer destroyed\\n\");\n+\t\t}\n \n-\tif (mon->gui_window && !kmsdrm_detected) {\n-\t\tregsetint(nullptr, _T(\"GUIPosX\"), gui_window_rect.x);\n-\t\tregsetint(nullptr, _T(\"GUIPosY\"), gui_window_rect.y);\n-\t\tSDL_DestroyWindow(mon->gui_window);\n-\t\tmon->gui_window = nullptr;\n+\t\tif (mon->gui_window)\n+\t\t{\n+\t\t\tregsetint(nullptr, _T(\"GUIPosX\"), gui_window_rect.x);\n+\t\t\tregsetint(nullptr, _T(\"GUIPosY\"), gui_window_rect.y);\n+\t\t\tSDL_DestroyWindow(mon->gui_window);\n+\t\t\tmon->gui_window = nullptr;\n+\t\t\twrite_log(\"GUI window destroyed\\n\");\n+\t\t}\n \t}\n+\t\n+\twrite_log(\"=== GUI HALT COMPLETE ===\\n\");\n }\n \n+\n void check_input()\n {\n \tconst AmigaMonitor* mon = &AMonitors[0];\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry/scripts/amiberry.start",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) originally created by Escalade (https://github.com/escalade)\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n# Copyright (C) 2025-present Langerz82 (https://github.com/Langerz82), worstcase_scenario (https://github.com/worstcase-scenario)\n\n. /etc/profile\n\nAMIBERRY_EXE=amiberry\n[[ \"${2}\" == \"AMIBERRY-LITE\" ]] && AMIBERRY_EXE=amiberry-lite\n\n# Core paths\nAMIBERRY_DIR=/storage/.config/${AMIBERRY_EXE}\nAMIBERRY_CONFIG_DIR=\"${AMIBERRY_DIR}/conf\"\nAMIBERRY_TMP_DIR=/tmp/emulation/${AMIBERRY_EXE}\nAMIBERRY_TMP_CONFIG=\"${AMIBERRY_TMP_DIR}/.${AMIBERRY_EXE}_conf.uae\"\nAMIBERRY_LOG=/emuelec/logs/${AMIBERRY_EXE}.log\nMAX_DRIVES=4\ni=0\n\necho \"EmuELEC ${AMIBERRY_EXE} Log\" > \"${AMIBERRY_LOG}\"\necho \"Trying to boot this game: ${TARGET_FILE}\" >> \"${AMIBERRY_LOG}\"\n\n# Force SDL audio backend\nexport SDL_AUDIODRIVER=alsa\n\n# Amiberry loads assets relative to its working directory\ncd \"${AMIBERRY_DIR}\"\n\n# Prepare a clean temp dir\nif [ -d \"${AMIBERRY_TMP_DIR}\" ]; then\n  echo \"Clean up old working directory.\" >> \"${AMIBERRY_LOG}\"\n  rm -rf \"${AMIBERRY_TMP_DIR}\"\nfi\nmkdir -p \"${AMIBERRY_TMP_DIR}\"\n\n###############################################################################\n# Helper: detect machine model (A500 / A1200 / CD32)\n# Result is later passed to --model if no config template exists\n###############################################################################\nAMIBERRY_SET_MODEL() {\n  local MODEL=A500\n\n  # Heuristic for A1200 / AGA\n  if [ \"$(echo \"${TARGET_FILE}\" | grep -e 'AGA' | wc -l)\" -eq 1 ] \\\n  || [ \"$(echo \"${AMIBERRY_TMP_DIR}\"/* | grep -e 'AGA' | wc -l)\" -eq 1 ] \\\n  || [[ \"${TARGET_FILE}\" = */amiga1200/* ]]; then\n    MODEL=A1200\n\n  # Heuristic for CD32\n  elif [ \"$(echo \"${TARGET_FILE}\" | grep -e 'CD32' | wc -l)\" -eq 1 ] \\\n  || [ \"$(echo \"${AMIBERRY_TMP_DIR}\"/* | grep -e 'CD32' | wc -l)\" -eq 1 ] \\\n  || [[ \"${TARGET_FILE}\" = */cd32/* ]] \\\n  || [[ \"${TARGET_FILE}\" = */amigacd32/* ]]; then\n    MODEL=CD32\n  fi\n\n  echo \"${MODEL}\"\n}\n\n###############################################################################\n# Helper: pick a base config (.uae) for that model\n# Returns either '-f /tmp/.../.amiberry-lite_conf.uae' or an empty string\n###############################################################################\nAMIBERRY_SET_CONF() {\n  local CONF_MODEL=\"${1}\"\n  local CONFIG_FILE=\"${AMIBERRY_CONFIG_DIR}/Amiga${CONF_MODEL}-custom.uae\"\n\n  if [ -f \"${CONFIG_FILE}\" ]; then\n    cp \"${CONFIG_FILE}\" \"${AMIBERRY_TMP_CONFIG}\"\n    echo \"-f ${AMIBERRY_TMP_CONFIG}\"\n    return\n  fi\n\n  CONFIG_FILE=\"${AMIBERRY_CONFIG_DIR}/custom.uae\"\n  if [ -f \"${CONFIG_FILE}\" ]; then\n    cp \"${CONFIG_FILE}\" \"${AMIBERRY_TMP_CONFIG}\"\n    echo \"-f ${AMIBERRY_TMP_CONFIG}\"\n    return\n  fi\n\n  # no template available\n  echo \"\"\n}\n\n###############################################################################\n# Helper: build Amiberry arg string\n# Example:\n#   \"--model CD32 -G <extra> --log\"\n# or \"-f /tmp/.../.amiberry-lite_conf.uae --log\"\n###############################################################################\nAMIBERRY_GET_ARGS() {\n  local MODEL\n  MODEL=\"$( AMIBERRY_SET_MODEL \"${1}\" )\"\n\n  local CONF_ARG\n  CONF_ARG=\"$( AMIBERRY_SET_CONF \"${MODEL}\" )\"\n\n  if [[ -z \"${CONF_ARG}\" ]]; then\n    # fall back to explicit model if no template .uae exists\n    CONF_ARG=\"--model ${MODEL}\"\n  fi\n\n  echo ${CONF_ARG} -G ${AMIBERRY_ADD_ARGS} --log\n}\n\nTARGET_FILE=\"${1}\"\n\n# extra args from caller if any\nAMIBERRY_ADD_ARGS=\"${3}\"\n\n###############################################################################\n# CASE 1: .zip\n# - WHDLoad-in-zip (lha/slave content)  -> --autoload\n# - multi-floppy zip                    -> mount as DF0/DF1/DF2/DF3\n###############################################################################\nif echo \"${TARGET_FILE}\" | grep -qi .zip ; then\n  unzip -j -q -o \"${TARGET_FILE}\" -d \"${AMIBERRY_TMP_DIR}\"\n\n  # crude WHDLoad-in-zip detection: .nfo plus *.slave content\n  if [ -f \"${AMIBERRY_TMP_DIR}\"/*.*nfo ] && [ -f \"${AMIBERRY_TMP_DIR}\"/*/*.*lave ]; then\n    echo \"Loading a WHDLoad (.zip) file\" >> \"${AMIBERRY_LOG}\"\n\n    AMIBERRY_ARGS=\"$( AMIBERRY_GET_ARGS \"${TARGET_FILE}\" )\"\n\n    ${AMIBERRY_EXE} ${AMIBERRY_ARGS} --autoload \"${TARGET_FILE}\" >> \"${AMIBERRY_LOG}\" 2>&1\n  else\n    echo \"Loading a .zip file with floppy images\" >> \"${AMIBERRY_LOG}\"\n\n    AMIBERRY_ARGS=\"$( AMIBERRY_GET_ARGS \"${TARGET_FILE}\" )\"\n\n    FLOPPY_ARG=()\n    i=0\n    for FILE in \"${AMIBERRY_TMP_DIR}\"/*; do\n      FLOPPY_ARG+=(-${i} \"${FILE}\")\n      [[ \"${FILE}\" = *.cue ]] && CUE_FILE=${FILE} && break\n      if [ `echo ${TARGET_FILE} | grep -i -e .chd -e .cue -e .iso -e .bin | wc -l` -eq 1 ]; then\n        CD_FILE=${FILE}\n      fi\n      i=$((i+1))\n      if [ ${i} -eq ${MAX_DRIVES} ]; then\n        break\n      fi\n    done\n\n    if [[ ! -z ${CUE_FILE} ]]; then\n      ${AMIBERRY_EXE} ${AMIBERRY_ARGS} --cdimage \"${CUE_FILE}\" >> \"${AMIBERRY_LOG}\" 2>&1\n    elif [[ ! -z ${CD_FILE} ]]; then\n      ${AMIBERRY_EXE} ${AMIBERRY_ARGS} --autoload \"${CD_FILE}\" >> \"${AMIBERRY_LOG}\" 2>&1\n    else\n      ${AMIBERRY_EXE} ${AMIBERRY_ARGS} \"${FLOPPY_ARG[@]}\" >> \"${AMIBERRY_LOG}\" 2>&1\n    fi\n  fi\n\n###############################################################################\n# CASE 2: .lha (WHDLoad install)\n# -> just --autoload\n###############################################################################\nelif echo \"${TARGET_FILE}\" | grep -qi .lha ; then\n  echo \"Loading a WHDLoad (.lha) file\" >> \"${AMIBERRY_LOG}\"\n\n  AMIBERRY_ARGS=\"$( AMIBERRY_GET_ARGS \"${TARGET_FILE}\" )\"\n\n  ${AMIBERRY_EXE} ${AMIBERRY_ARGS} --autoload \"${TARGET_FILE}\" >> \"${AMIBERRY_LOG}\" 2>&1\n\n###############################################################################\n# CASE 3: .uae (explicit Amiberry config)\n###############################################################################\nelif echo \"${TARGET_FILE}\" | grep -qi .uae ; then\n  echo \"Loading a .uae file\" >> \"${AMIBERRY_LOG}\"\n\n  AMIBERRY_ARGS=\"$( AMIBERRY_GET_ARGS \"${TARGET_FILE}\" )\"\n\n  ${AMIBERRY_EXE} ${AMIBERRY_ARGS} -f \"${TARGET_FILE}\" >> \"${AMIBERRY_LOG}\" 2>&1\n\n###############################################################################\n# CASE 4: .hdf (hardfile / HDD image)\n# We build a temp config that mounts the .hdf as DH0 and boots from it\n# We force model A1200 in this path\n###############################################################################\nelif echo \"${TARGET_FILE}\" | grep -qi .hdf ; then\n  echo \"Loading a hardfile (.hdf)\" >> \"${AMIBERRY_LOG}\"\n\n  # try A1200 template first, then custom.uae\n  BASE_CFG=\"${AMIBERRY_CONFIG_DIR}/AmigaA1200-custom.uae\"\n  if [ ! -f \"${BASE_CFG}\" ]; then\n    BASE_CFG=\"${AMIBERRY_CONFIG_DIR}/custom.uae\"\n  fi\n  if [ -f \"${BASE_CFG}\" ]; then\n    cp \"${BASE_CFG}\" \"${AMIBERRY_TMP_CONFIG}\"\n  else\n    : > \"${AMIBERRY_TMP_CONFIG}\"\n  fi\n\n  # append HDD mapping\n  cat >> \"${AMIBERRY_TMP_CONFIG}\" <<EOF\nuse_gui=no\nhardfile2=rw,DH0:${TARGET_FILE},0,0,0,512,0,\nboot_priority=1\nEOF\n\n  # run forced as A1200, no --autoload here\n  ${AMIBERRY_EXE} --model A1200 -G --log ${AMIBERRY_ADD_ARGS} -f \"${AMIBERRY_TMP_CONFIG}\" >> \"${AMIBERRY_LOG}\" 2>&1\n\n###############################################################################\n# CASE 5: CD / CD32 images (.chd .cue .iso .bin)\n# This is the critical amigacd32 path\n# We call --autoload so Amiberry mounts it as CD drive instead of DF0\n# AMIBERRY_GET_ARGS will set --model CD32 if the path matches amigacd32\n###############################################################################\nelif echo \"${TARGET_FILE}\" | grep -qi -e .cue ; then\n  echo \"Loading a CD or CD32 image file\" >> \"${AMIBERRY_LOG}\"\n\n  AMIBERRY_ARGS=\"$( AMIBERRY_GET_ARGS \"${TARGET_FILE}\" )\"\n\n  ${AMIBERRY_EXE} ${AMIBERRY_ARGS} --cdimage \"${TARGET_FILE}\" >> \"${AMIBERRY_LOG}\" 2>&1\n\nelif echo \"${TARGET_FILE}\" | grep -qi -e .chd -e .iso -e .bin ; then\n  echo \"Loading a CD or CD32 image file\" >> \"${AMIBERRY_LOG}\"\n\n  AMIBERRY_ARGS=\"$( AMIBERRY_GET_ARGS \"${TARGET_FILE}\" )\"\n\n  ${AMIBERRY_EXE} ${AMIBERRY_ARGS} --autoload \"${TARGET_FILE}\" >> \"${AMIBERRY_LOG}\" 2>&1\n\n###############################################################################\n# CASE 6: default floppy images (.adf .adz .ipf etc)\n# We mount the file as DF0 using -0\n###############################################################################\nelse\n  echo \"Loading a single floppy image (.adf or .adz or .ipf)\" >> \"${AMIBERRY_LOG}\"\n\n  AMIBERRY_ARGS=\"$( AMIBERRY_GET_ARGS \"${TARGET_FILE}\" )\"\n\n  ${AMIBERRY_EXE} ${AMIBERRY_ARGS} -0 \"${TARGET_FILE}\" >> \"${AMIBERRY_LOG}\" 2>&1\nfi\n\n# cleanup temp dir\nrm -rf \"${AMIBERRY_TMP_DIR}\"\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry-lite/config/conf/AmigaA1200-default.uae",
    "content": "config_description=UAE Amiga 1200/ Amiga CD32 default configuration\nconfig_hardware=true\nconfig_host=true\nconfig_version=3.6.0\nrtg_nocustom=true\na1000ram=false\nsynchronize_clock=yes\nsound_auto=yes\npandora.jump=-1\npandora.autofire_button=3\npandora.button2=1\npandora.button1=2\npandora.move_y=0\npandora.move_x=0\npandora.custom_r=0\npandora.custom_l=0\npandora.custom_y=0\npandora.custom_x=0\npandora.custom_b=0\npandora.custom_a=0\npandora.custom_right=0\npandora.custom_left=0\npandora.custom_down=0\npandora.custom_up=0\npandora.custom_dpad=0\npandora.custom_controls=0\npandora.tap_delay=10\npandora.stylus_offset=0\npandora.joy_port=0\npandora.joy_conf=0\npandora.cpu_speed=600\npandora.hardfile_path=/storage/.config/amiberry-lite/\npandora.floppy_path=/storage/.config/amiberry-lite/disks/\npandora.rom_path=/storage/.config/amiberry-lite/kickstarts/\namiberry.rom_path=/storage/.config/amiberry-lite/kickstarts/\namiberry.floppy_path=/storage/.config/amiberry-lite/disks/\namiberry.hardfile_path=/storage/.config/amiberry-lite/\namiberry.cd_path=/storage/.config/amiberry-lite/cd32/\n; \n; *** Controller/Input Configuration\n; \njoyport0=mouse\njoyport0_autofire=none\njoyport0_friendlyname=Mouse\njoyport0_name=MOUSE0\n; \njoyport1=joy1\njoyport1_autofire=normal\njoyport1_friendlyname=Logitech Gamepad F310\njoyport1_name=JOY1\n; \njoyport2=joy0\njoyport2_autofire=normal\njoyport2_friendlyname=Keyboard as Joystick [Default]\njoyport2_name=JOY0\n; \n; \n; \ninput.joymouse_speed_analog=2\ninput.joymouse_speed_digital=10\ninput.joymouse_deadzone=33\ninput.joystick_deadzone=33\ninput.analog_joystick_multiplier=15\ninput.analog_joystick_offset=-1\ninput.mouse_speed=100\ninput.autofire_speed=2496\nkbd_lang=us\n; \n; *** Host-Specific\n; \namiberry.vertical_offset=0\namiberry.hide_idle_led=0\namiberry.gfx_correct_aspect=1\namiberry.kbd_led_num=-1\namiberry.kbd_led_scr=-1\namiberry.scaling_method=-1\namiberry.use_analogue_remap=false\namiberry.use_retroarch_quit=true\namiberry.use_retroarch_menu=true\namiberry.use_retroarch_reset=false\n; \n; *** Common / Paths\n; \nuse_gui=no\nkickstart_rom_file=$(FILE_PATH)/kick40068.A1200\nkickstart_ext_rom_file=\nide_mb_rom_file=:ENABLED\nflash_file=\ncart_file=\n; \n; *** Floppy Drives\n; \n;floppy0=\n;floppy1=\n;floppy2=\n;floppy3=\nnr_floppies=4\nfloppy_speed=100\n; \n; *** Hard Drives\n; \n; \n; *** CD / CD32\n; \ncd_speed=100\n; \n; *** Display / Screen Setup\n; \ngfx_framerate=0\ngfx_width=640\ngfx_height=256\ngfx_refreshrate=50\ngfx_refreshrate_rtg=50\ngfx_lores=false\ngfx_resolution=hires\ngfx_linemode=none\ngfx_fullscreen_amiga=true\ngfx_fullscreen_picasso=true\nntsc=false\n; \n; *** CPU options\n; \ncpu_speed=real\ncpu_type=68ec020\ncpu_model=68020\ncpu_compatible=false\ncpu_24bit_addressing=true\nfpu_strict=false\ncompfpu=true\ncachesize=0\nfinegrain_cpu_speed=1024\n; \n; *** Memory\n; \nchipmem_size=4\nz3mapping=real\nfastmem_size=0\na3000mem_size=0\nmbresmem_size=0\nz3mem_size=0\nz3mem_start=0x40000000\nbogomem_size=0\nrtg_modes=0x502\n; \n; *** Chipset\n; \nchipset=aga\nchipset_refreshrate=50.000000\ncollision_level=playfields\nchipset_compatible=Generic\nrtc=MSM6242B\nimmediate_blits=false\nfast_copper=true\n; \n; *** Sound Options\n; \nsound_output=exact\nsound_channels=stereo\nsound_stereo_separation=7\nsound_stereo_mixing_delay=0\nsound_frequency=44100\nsound_interpol=none\nsound_filter=off\nsound_filter_type=standard\nsound_volume_cd=20\n; \n; *** Misc. Options\n; \nbsdsocket_emu=false\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry-lite/config/conf/AmigaA500-default.uae",
    "content": "config_description=UAE Amiga 500 default configuration\nconfig_hardware=true\nconfig_host=true\nconfig_version=8.0.0\nconfig_hardware_path=\nconfig_host_path=\nconfig_all_path=\namiberry.rom_path=./\namiberry.floppy_path=./\namiberry.hardfile_path=./\n; host-specific\namiberry.middle_mouse=true\namiberry.active_priority=2\namiberry.soundcard=0\namiberry.soundcardname=AML-AUGESOUND, \n; common\nuse_gui=no\nuse_debugger=false\nkickstart_rom_file=/storage/roms/bios/amiga-os-130.rom\nkickstart_rom_file_id=C4F0F55F,KS ROM v1.3 (A500,A1000,A2000)\nkickstart_ext_rom_file=\nflash_file=\ncart_file=\nrtc_file=\nkickshifter=false\nscsidevice_disable=false\nfloppy_volume=33\nfloppy0=\nfloppy1=\nfloppy1type=-1\nfloppy2=\nfloppy3=\nnr_floppies=1\nfloppy_speed=100\ncd_speed=100\nparallel_on_demand=false\nserial_on_demand=false\nserial_hardware_ctsrts=true\nserial_status=true\nserial_direct=false\nscsi=false\nuaeserial=false\nsana2=false\nsound_output=exact\nsound_channels=stereo\nsound_stereo_separation=7\nsound_stereo_mixing_delay=0\nsound_max_buff=8192\nsound_frequency=44100\nsound_interpol=anti\nsound_filter=emulated\nsound_filter_type=standard\nsound_volume=0\nsound_volume_paula=0\nsound_volume_cd=0\nsound_volume_ahi=0\nsound_volume_midi=0\nsound_volume_genlock=0\nsound_auto=false\nsound_stereo_swap_paula=false\nsound_stereo_swap_ahi=false\ncomp_trustbyte=direct\ncomp_trustword=direct\ncomp_trustlong=direct\ncomp_trustnaddr=direct\ncomp_nf=true\ncomp_constjump=true\ncomp_flushmode=soft\ncomp_catchfault=true\ncachesize=0\njoyport0=mouse\njoyport0autofire=none\njoyportfriendlyname0=System mouse\njoyportname0=MOUSE0\njoyport1=joy0\njoyport1autofire=none\njoyportfriendlyname1=Wireless Controller\njoyportname1=JOY0\njoyport1_amiberry_custom_none_a=\njoyport1_amiberry_custom_none_b=\njoyport1_amiberry_custom_none_x=\njoyport1_amiberry_custom_none_y=\njoyport1_amiberry_custom_none_back=\njoyport1_amiberry_custom_none_guide=\njoyport1_amiberry_custom_none_start=\njoyport1_amiberry_custom_none_leftstick=\njoyport1_amiberry_custom_none_rightstick=\njoyport1_amiberry_custom_none_leftshoulder=\njoyport1_amiberry_custom_none_rightshoulder=\njoyport1_amiberry_custom_none_dpup=\njoyport1_amiberry_custom_none_dpdown=\njoyport1_amiberry_custom_none_dpleft=\njoyport1_amiberry_custom_none_dpright=\njoyport1_amiberry_custom_none_misc1=\njoyport1_amiberry_custom_none_paddle1=\njoyport1_amiberry_custom_none_paddle2=\njoyport1_amiberry_custom_none_paddle3=\njoyport1_amiberry_custom_none_paddle4=\njoyport1_amiberry_custom_none_touchpad=\njoyport1_amiberry_custom_axis_none_leftx=\njoyport1_amiberry_custom_axis_none_lefty=\njoyport1_amiberry_custom_axis_none_rightx=\njoyport1_amiberry_custom_axis_none_righty=\njoyport1_amiberry_custom_axis_none_lefttrigger=\njoyport1_amiberry_custom_axis_none_righttrigger=\njoyport1_amiberry_custom_hotkey_a=\njoyport1_amiberry_custom_hotkey_b=\njoyport1_amiberry_custom_hotkey_x=\njoyport1_amiberry_custom_hotkey_y=\njoyport1_amiberry_custom_hotkey_back=\njoyport1_amiberry_custom_hotkey_guide=\njoyport1_amiberry_custom_hotkey_start=\njoyport1_amiberry_custom_hotkey_leftstick=\njoyport1_amiberry_custom_hotkey_rightstick=\njoyport1_amiberry_custom_hotkey_leftshoulder=\njoyport1_amiberry_custom_hotkey_rightshoulder=\njoyport1_amiberry_custom_hotkey_dpup=\njoyport1_amiberry_custom_hotkey_dpdown=\njoyport1_amiberry_custom_hotkey_dpleft=\njoyport1_amiberry_custom_hotkey_dpright=\njoyport1_amiberry_custom_hotkey_misc1=\njoyport1_amiberry_custom_hotkey_paddle1=\njoyport1_amiberry_custom_hotkey_paddle2=\njoyport1_amiberry_custom_hotkey_paddle3=\njoyport1_amiberry_custom_hotkey_paddle4=\njoyport1_amiberry_custom_hotkey_touchpad=\njoyport1_amiberry_custom_axis_hotkey_leftx=\njoyport1_amiberry_custom_axis_hotkey_lefty=\njoyport1_amiberry_custom_axis_hotkey_rightx=\njoyport1_amiberry_custom_axis_hotkey_righty=\njoyport1_amiberry_custom_axis_hotkey_lefttrigger=\njoyport1_amiberry_custom_axis_hotkey_righttrigger=\nbsdsocket_emu=false\nsynchronize_clock=false\nmaprom=0x0\nparallel_postscript_emulation=false\nparallel_postscript_detection=false\nghostscript_parameters=\nparallel_autoflush=5\ngfx_display=0\ngfx_display_rtg=0\ngfx_framerate=1\ngfx_width=720\ngfx_height=568\ngfx_x_windowed=0\ngfx_y_windowed=0\ngfx_width_windowed=720\ngfx_height_windowed=568\ngfx_width_fullscreen=800\ngfx_height_fullscreen=600\ngfx_refreshrate=0\ngfx_autoresolution=0\ngfx_autoresolution_vga=true\ngfx_backbuffers=2\ngfx_backbuffers_rtg=1\ngfx_vsync=false\ngfx_vsyncmode=normal\ngfx_vsync_picasso=false\ngfx_vsyncmode_picasso=normal\ngfx_lores=false\ngfx_resolution=hires\ngfx_lores_mode=normal\ngfx_flickerfixer=false\ngfx_linemode=double2\ngfx_fullscreen_amiga=fullwindow\ngfx_fullscreen_picasso=fullwindow\ngfx_center_horizontal=none\ngfx_center_vertical=none\ngfx_colour_mode=32bit\ngfx_blacker_than_black=false\ngfx_api=sdl2\ngfx_api_options=hardware\nimmediate_blits=false\nntsc=false\ngenlock=false\nchipset=ocs\nchipset_refreshrate=49.920410\ncollision_level=full\nchipset_compatible=A500\ndisplay_optimizations=full\nrtc=MSM6242B\nresetwarning=false\ncia_todbug=true\nfastmem_size=0\ndebugmem_start=0x0\ndebugmem_size=0\nmem25bit_size=0\na3000mem_size=0\nmbresmem_size=0\nz3mem_size=0\nz3mem_start=0x40000000\nbogomem_size=2\ngfxcard_hardware_vblank=false\ngfxcard_hardware_sprite=false\ngfxcard_multithread=false\nchipmem_size=1\ncpu_speed=real\ncpu_throttle=0.0\ncpu_type=68000\ncpu_model=68000\ncpu_compatible=true\ncpu_24bit_addressing=true\ncpu_data_cache=false\ncpu_multiplier=2\ncpu_cycle_exact=true\ncpu_memory_cycle_exact=true\nblitter_cycle_exact=true\ncycle_exact=true\nfpu_strict=false\nrtg_nocustom=true\nrtg_modes=0x112\nrtg_noautomodes=false\ndebug_mem=false\nlog_illegal_mem=false\nkbd_lang=us\ninput.config=0\ninput.joymouse_speed_analog=100\ninput.joymouse_speed_digital=10\ninput.joymouse_deadzone=33\ninput.joystick_deadzone=33\ninput.analog_joystick_multiplier=18\ninput.analog_joystick_offset=-5\ninput.mouse_speed=100\ninput.autofire_speed=600\ninput.autoswitch=true\n; *** WHDLoad Booter. Options\nwhdload_filename=\nwhdload_game_name=\nwhdload_uuid=\nwhdload_slave_default=\nwhdload_slave_libraries=false\nwhdload_slave=\nwhdload_slave_data_path=\nwhdload_custom1=0\nwhdload_custom2=0\nwhdload_custom3=0\nwhdload_custom4=0\nwhdload_custom5=0\nwhdload_custom=\nwhdload_buttonwait=false\nwhdload_showsplash=true\nwhdload_writecache=false\nwhdload_quit_on_exit=false\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry-lite/config/conf/adfdir.conf",
    "content": "path=/storage/roms/amiga/\nconfig_path=/storage/.config/amiberry/conf/\ncontrollers_path=/storage/.config/amiberry/controller/\nretroarch_config=/storage/.config/retroarch/retroarch.cfg\nrom_path=/storage/.config/amiberry/kickstarts/\nROMs=6\nROMName=KS ROM v1.2 (A500,A1000,A2000) rev 33.180 (256k) [315093-01]\nROMPath=/storage/.config/amiberry/kickstarts/kick33180.A500.rom\nROMType=256\nROMName=KS ROM v1.3 (A500,A1000,A2000) rev 34.5 (256k) [315093-02]\nROMPath=/storage/.config/amiberry/kickstarts/kick34005.A500.rom\nROMType=256\nROMName=KS ROM v2.04 (A500+) rev 37.175 (512k) [390979-01]\nROMPath=/storage/.config/amiberry/kickstarts/kick37175.A500.rom\nROMType=256\nROMName=KS ROM v3.0 (A1200) rev 39.106 (512k) [391523-01/391524-01]\nROMPath=/storage/.config/amiberry/kickstarts/kick39106.A1200.rom\nROMType=256\nROMName=KS ROM v3.1 (A1200) rev 40.68 (512k) [391773-01/391774-01]\nROMPath=/storage/.config/amiberry/kickstarts/kick40068.A1200.rom\nROMType=256\nROMName=KS ROM v3.1 (A4000) rev 40.68 (512k)\nROMPath=/storage/.config/amiberry/kickstarts/kick40068.A4000.rom\nROMType=256\nMRUDiskList=1\nDiskfile=\nMRUCDList=0\nQuickstart=1\nread_config_descriptions=yes\nswap_win_alt_keys=no\ngui_joystick_control=yes\nuse_sdl2_render_thread=no\ninput_default_mouse_speed=100\ninput_keyboard_as_joystick_stop_keypresses=no\ndefault_open_gui_key=F12\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry-lite/config/conf/amiberry-lite.conf",
    "content": "Quickstart=1\nread_config_descriptions=yes\nwrite_logfile=yes\ndefault_line_mode=1\nrctrl_as_ramiga=no\ngui_joystick_control=yes\ndefault_multithreaded_drawing=yes\ninput_default_mouse_speed=100\ninput_keyboard_as_joystick_stop_keypresses=no\ndefault_open_gui_key=F12\ndefault_quit_key=\ndefault_ar_key=Pause\ndefault_fullscreen_toggle_key=\nrotation_angle=0\ndefault_horizontal_centering=no\ndefault_vertical_centering=no\ndefault_scaling_method=-1\ndefault_gfx_autoresolution=0\ndefault_frameskip=no\ndefault_correct_aspect_ratio=yes\ndefault_auto_crop=no\ndefault_width=720\ndefault_height=568\ndefault_fullscreen_mode=1\ndefault_stereo_separation=7\ndefault_sound_frequency=44100\ndefault_sound_buffer=8192\ndefault_sound_pull=yes\ndefault_joystick_deadzone=33\ndefault_retroarch_quit=yes\ndefault_retroarch_menu=yes\ndefault_retroarch_reset=no\ndefault_retroarch_vkbd=no\ndefault_controller1=joy1\ndefault_controller2=joy2\ndefault_controller3=\ndefault_controller4=\ndefault_mouse1=mouse\ndefault_mouse2=joy0\ndefault_whd_buttonwait=no\ndefault_whd_showsplash=yes\ndefault_whd_configdelay=0\ndefault_whd_writecache=no\ndefault_whd_quit_on_exit=no\nuse_jst_instead_of_whd=no\ndisable_shutdown_button=no\nallow_display_settings_from_xml=yes\ndefault_soundcard=0\ndefault_vkbd_enabled=no\ndefault_vkbd_hires=no\ndefault_vkbd_exit=no\ndefault_vkbd_language=US\ndefault_vkbd_style=Original\ndefault_vkbd_transparency=0\ndefault_vkbd_toggle=guide\ngui_theme=Default.theme\nconfig_path=/storage/.config/amiberry-lite/conf/\ncontrollers_path=/storage/.config/amiberry-lite/controller/\nretroarch_config=/storage/.config/retroarch/retroarch.cfg\nwhdboot_path=/storage/.config/amiberry-lite/whdboot/\nwhdload_arch_path=/storage/.config/amiberry-lite/lha/\nfloppy_path=/storage/.config/amiberry-lite/floppies/\nharddrive_path=/storage/.config/amiberry-lite/harddrives/\ncdrom_path=/storage/.config/amiberry-lite/cdroms/\nlogfile_path=/storage/.config/amiberry-lite/amiberry.log\nrom_path=/storage/.config/amiberry/kickstarts/\nrp9_path=/storage/.config/amiberry-lite/rp9/\nfloppy_sounds_dir=/storage/.config/amiberry-lite/data/floppy_sounds/\nsaveimage_dir=/storage/.config/amiberry-lite/savestates/\nsavestate_dir=/storage/.config/amiberry-lite/savestates/\nscreenshot_dir=/storage/.config/amiberry-lite/screenshots/\nripper_path=/storage/.config/amiberry-lite/ripper/\ninputrecordings_dir=/storage/.config/amiberry-lite/inputrecordings/\nnvram_dir=/storage/.config/amiberry-lite/nvram/\nplugins_dir=/storage/.config/amiberry-lite/plugins\nvideo_dir=/storage/.config/amiberry-lite/videos/\nthemes_path=/storage/.config/amiberry-lite/themes/\nMRUDiskList=5\nDiskfile=\nMRUCDList=1\nCDfile=\nMRUWHDLoadList=1\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry-lite/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)\n\nPKG_NAME=\"amiberry-lite\"\nPKG_VERSION=\"e535218c72071b9579debad0d30ae99390d681c3\"\nPKG_ARCH=\"aarch64 arm\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/BlitterStudio/amiberry-lite\"\nPKG_URL=\"https://github.com/BlitterStudio/amiberry-lite.git\"\nPKG_DEPENDS_TARGET=\"toolchain linux libpcap glibc bzip2 zlib SDL2 SDL2_image SDL2_ttf capsimg freetype libxml2 flac libogg mpg123-compat libpng libmpeg2 libportmidi libserialport libenet\"\nPKG_LONGDESC=\"Amiberry is an optimized Amiga emulator for ARM-based boards.\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"cmake\"\nPKG_EE_UPDATE=no\n\nPKG_BUILD_FLAGS=\"-O3 -fno-strict-aliasing -fomit-frame-pointer -ffast-math\"\n\npre_configure_target() {\n  PKG_CMAKE_OPTS_TARGET=\"-DUSE_OPENGL=OFF -DCMAKE_BUILD_TYPE=Release -DUSE_UAENET_PCAP=OFF\"\n}\n\nmakeinstall_target() {\n  # Create directories\n  mkdir -p ${INSTALL}/usr/bin\n  mkdir -p ${INSTALL}/usr/lib\n  mkdir -p ${INSTALL}/usr/config/amiberry-lite\n  # mkdir -p ${INSTALL}/usr/config/amiberry-lite/controller\n\n  # Copy ressources\n  cp -a ${PKG_DIR}/config/*           ${INSTALL}/usr/config/amiberry-lite/\n  cp -a data                          ${INSTALL}/usr/config/amiberry-lite/\n  cp -a roms                          ${INSTALL}/usr/config/amiberry-lite/\n  mkdir -p savestates                 ${INSTALL}/usr/config/amiberry-lite/\n  mkdir -p screenshots                ${INSTALL}/usr/config/amiberry-lite/\n  cp -a whdboot                       ${INSTALL}/usr/config/amiberry-lite/\n  ln -s /storage/roms/bios \t\t\t  ${INSTALL}/usr/config/amiberry-lite/kickstarts\n  mkdir -p\t\t\t\t\t\t\t  ${INSTALL}/usr/config/amiberry-lite/plugins\n  cp ${PKG_BUILD}/.${TARGET_NAME}/external/floppybridge/libfloppybridge.so ${INSTALL}/usr/config/amiberry-lite/plugins/\n  cp ${PKG_BUILD}/.${TARGET_NAME}/external/capsimage/*.so ${INSTALL}/usr/config/amiberry-lite/plugins/\n\n  # Create links to Retroarch controller files\n  # ln -s /usr/share/retroarch/autoconfig/udev/8Bitdo_Pro_SF30_BT_B.cfg \"${INSTALL}/usr/config/amiberry-lite/controller/8Bitdo SF30 Pro.cfg\"\n  ln -s \"/tmp/joypads\" \"${INSTALL}/usr/config/amiberry-lite/controller\"\n\n  # Copy binary, scripts & link libcapsimg\n  cp -a amiberry* ${INSTALL}/usr/bin/amiberry-lite\n    \n  UAE=\"${INSTALL}/usr/config/amiberry-lite/conf/*.uae\"\n  for i in ${UAE}; do echo -e \"gfx_center_vertical=smart\\ngfx_center_horizontal=smart\" >> ${i}; done\n\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry-lite/patches/001-default_fullscreen.patch",
    "content": "--- a/src/include/options.h\t2024-03-13 19:51:07.175899314 +0100\n+++ b/src/include/options.h\t2024-03-13 19:51:30.872392451 +0100\n@@ -1244,7 +1244,7 @@\n \tbool default_auto_crop = false;\n \tint default_width = 720;\n \tint default_height = 568;\n-\tint default_fullscreen_mode = 0;\n+\tint default_fullscreen_mode = 1;\n \tint default_stereo_separation = 7;\n \tint default_sound_buffer = 8192;\n \tbool default_sound_pull = true;\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry-lite/patches/002-paths.patch",
    "content": "--- a/src/osdep/amiberry.cpp\n+++ b/src/osdep/amiberry.cpp\n@@ -4429,8 +4429,10 @@\n \t\tif (!my_existsdir(xdg_config_home.c_str()))\n \t\t\tmy_mkdir(xdg_config_home.c_str());\n \n-\t\tamiberry_conf_file = xdg_config_home + \"/amiberry.conf\";\n-\t\tamiberry_ini_file = xdg_config_home + \"/amiberry.ini\";\n+\t\t//amiberry_conf_file = xdg_config_home + \"/amiberry.conf\";\n+\t\tamiberry_conf_file = \"/storage/.config/amiberry-lite/conf/amiberry-lite.conf\";\n+\t\t//amiberry_ini_file = xdg_config_home + \"/amiberry.ini\";\n+\t\tamiberry_ini_file = \"/storage/.config/amiberry-lite/conf/amiberry-lite.ini\";\n \t}\n \treturn my_existsfile2(amiberry_conf_file.c_str());\n }\n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry-lite/patches/003-use_udev_gamepad_name.patch",
    "content": "--- a/src/osdep/retroarch.cpp\n+++ b/src/osdep/retroarch.cpp\n@@ -71,7 +71,22 @@\n \n \t\tif (param[0] != 'h') // check it isn't some kind of hat starting 'h' (so if D-pad uses buttons)\n \t\t{\n-\t\t\tbutton = abs(std::stoi(param));\n+\t\t\ttry\n+\t\t\t{\n+\t\t\t\tbutton = abs(std::stoi(param));\n+\t\t\t}\n+\t\t\tcatch (const std::invalid_argument& e)\n+\t\t\t{\n+\t\t\t\twrite_log(\"Invalid argument in stoi for param='%s' in setting='%s' (line: %s)\", \n+\t\t\t\tparam.c_str(), find_setting.c_str(), line.c_str());\n+\t\t\t\tbutton = -1; // fallback\n+\t\t\t}\n+\t\t\tcatch (const std::out_of_range& e)\n+\t\t\t{\n+\t\t\t\twrite_log(\"Out of range in stoi for param='%s' in setting='%s' (line: %s)\", \n+\t\t\t\tparam.c_str(), find_setting.c_str(), line.c_str());\n+\t\t\t\tbutton = -1;\n+\t\t\t}\n \t\t}\n \n \t\tif (option == find_setting)\n--- a/src/osdep/amiberry_input.cpp\n+++ b/src/osdep/amiberry_input.cpp\n--- <unnamed>\n+++ <unnamed>\n@@ -1,6 +1,8 @@\n #include <cstdio>\n #include <cstring>\n #include <cstdlib>\n+#include <fstream>\n+#include <sstream>\n \n #include \"sysdeps.h\"\n #include \"options.h\"\n@@ -1073,6 +1075,54 @@\n \treturn num_joystick;\n }\n \n+std::string get_udev_name_from_proc(SDL_Joystick* joystick)\n+{\n+\tconst char* joystick_path = SDL_JoystickPath(joystick);\n+\tif (joystick_path == nullptr)\n+\t\treturn \"\";\n+\t\n+\t// Extract the event number from the path (e.g., \"/dev/input/event5\" -> \"event5\")\n+\tconst char* last_slash = strrchr(joystick_path, '/');\n+\tif (last_slash == nullptr)\n+\t\treturn \"\";\n+\t\n+\tstd::string event_name = std::string(last_slash + 1);\n+\t\n+\t// Parse /proc/bus/input/devices to find the matching device\n+\tstd::ifstream devices_file(\"/proc/bus/input/devices\");\n+\tif (!devices_file.is_open())\n+\t\treturn \"\";\n+\t\n+\tstd::string line;\n+\tstd::string current_name;\n+\tbool found_device = false;\n+\t\n+\twhile (std::getline(devices_file, line))\n+\t{\n+\t\t// Look for Name line (e.g., N: Name=\"Microsoft X-Box 360 pad\")\n+\t\tif (line.substr(0, 3) == \"N: \")\n+\t\t{\n+\t\t\tsize_t start = line.find('\"');\n+\t\t\tsize_t end = line.rfind('\"');\n+\t\t\tif (start != std::string::npos && end != std::string::npos && end > start)\n+\t\t\t\tcurrent_name = line.substr(start + 1, end - start - 1);\n+\t\t}\n+\t\t// Look for Handlers line containing our event device\n+\t\telse if (line.substr(0, 3) == \"H: \" && line.find(event_name) != std::string::npos)\n+\t\t{\n+\t\t\tfound_device = true;\n+\t\t\tbreak;\n+\t\t}\n+\t\t// Empty line indicates new device section\n+\t\telse if (line.empty())\n+\t\t{\n+\t\t\tcurrent_name.clear();\n+\t\t}\n+\t}\n+\t\n+\treturn found_device ? current_name : \"\";\n+}\n+\n // Helper functions\n void open_as_game_controller(struct didata* did, const int i)\n {\n@@ -1098,6 +1148,9 @@\n \t\tdid->joystick_name.assign(SDL_JoystickNameForIndex(i));\n \telse\n \t\tdid->joystick_name = \"\";\n+\n+\t// Get UDEV name from /proc/bus/input/devices\n+\tdid->udev_name = get_udev_name_from_proc(did->joystick);\n \n \tif (!did->controller_name.empty())\n \t\tdid->name = did->controller_name;\n@@ -1210,8 +1263,19 @@\n \t}\n \n \tconst std::string retroarch_file = get_retroarch_file();\n-\tconst bool retroarch_config_exists = !retroarch_config_file.empty() && my_existsfile2(retroarch_config_file.c_str());\n+\tbool retroarch_config_exists = !retroarch_config_file.empty() && my_existsfile2(retroarch_config_file.c_str());\n+\n+\tif (!retroarch_config_exists && !did->udev_name.empty())\n+\t{\n+\t\tconst auto sanitized_name = sanitize_retroarch_name(did->udev_name);\n+\t\tretroarch_config_file = controllers + sanitized_name + \".cfg\";\n+\t\twrite_log(\"Joystick udev name: '%s', sanitized to: '%s'\\n\", did->joystick_name.c_str(), sanitized_name.c_str());\n+\t\twrite_log(\"Checking for Retroarch cfg file using udev: '%s'\\n\", retroarch_config_file.c_str());\n+\t}\n+\t\n+\tretroarch_config_exists = !retroarch_config_file.empty() && my_existsfile2(retroarch_config_file.c_str());\n \tconst bool retroarch_file_exists = my_existsfile2(retroarch_file.c_str());\n+\t\n \n \tif (retroarch_config_exists || retroarch_file_exists)\n \t{\n\n--- a/src/osdep/amiberry_input.h\n+++ b/src/osdep/amiberry_input.h\n@@ -49,6 +49,7 @@\n \tint type{};\n \tint acquired{};\n \tstd::string name{};\n+\tstd::string udev_name{};\n \tstd::string controller_name{};\n \tstd::string joystick_name{};\n \n"
  },
  {
    "path": "packages/sx05re/emulators/amiberry-lite/patches/fix_fbdev_window.patch",
    "content": "From 4a2a96134121d857099461ac27de15a848baaece Mon Sep 17 00:00:00 2001\nFrom: Adventurous Programmer <47227694+Diegrosan@users.noreply.github.com>\nDate: Mon, 13 Oct 2025 22:25:33 -0300\nSubject: [PATCH] Update main_window.cpp\n\n---\n src/osdep/gui/main_window.cpp | 369 +++++++++++++++++++++++++++-------\n 1 file changed, 291 insertions(+), 78 deletions(-)\n\ndiff --git a/src/osdep/gui/main_window.cpp b/src/osdep/gui/main_window.cpp\nindex b464a011..ae0ea703 100644\n--- a/src/osdep/gui/main_window.cpp\n+++ b/src/osdep/gui/main_window.cpp\n@@ -26,6 +26,15 @@\n #include \"inputdevice.h\"\n #include \"xwin.h\"\n \n+static bool fbdev_detected = false;\n+static bool reusing_amiga_resources = false;\n+\n+static gcn::Widget* widget_before_modal = nullptr;\n+static int gui_top_children_count = -1;\n+static int frames_after_modal = 0;\n+static bool waiting_for_modal_close = false;\n+static int frames_waiting_for_close = 0;\n+\n bool ctrl_state = false, shift_state = false, alt_state = false, win_state = false;\n int last_x = 0;\n int last_y = 0;\n@@ -246,6 +255,12 @@ void update_gui_screen()\n {\n \tconst AmigaMonitor* mon = &AMonitors[0];\n \n+\tif (!gui_texture || !gui_screen || !mon->gui_renderer)\n+\t{\n+\t\twrite_log(\"WARNING: update_gui_screen called with null pointers!\\n\");\n+\t\treturn;\n+\t}\n+\n \tSDL_UpdateTexture(gui_texture, nullptr, gui_screen->pixels, gui_screen->pitch);\n \tif (amiberry_options.rotation_angle == 0 || amiberry_options.rotation_angle == 180)\n \t\tgui_renderQuad = { 0, 0, gui_screen->w, gui_screen->h };\n@@ -259,23 +274,70 @@ void update_gui_screen()\n \t\tshow_screen(0, 0);\n }\n \n+\n void amiberry_gui_init()\n {\n \tAmigaMonitor* mon = &AMonitors[0];\n \tsdl_video_driver = SDL_GetCurrentVideoDriver();\n \n-\tif (sdl_video_driver != nullptr && strcmpi(sdl_video_driver, \"KMSDRM\") == 0)\n+\twrite_log(\"=== GUI INIT START ===\\n\");\n+\twrite_log(\"SDL Video Driver: %s\\n\", sdl_video_driver ? sdl_video_driver : \"NULL\");\n+\twrite_log(\"amiga_window exists: %s\\n\", mon->amiga_window ? \"YES\" : \"NO\");\n+\twrite_log(\"amiga_renderer exists: %s\\n\", mon->amiga_renderer ? \"YES\" : \"NO\");\n+\twrite_log(\"gui_window exists: %s\\n\", mon->gui_window ? \"YES\" : \"NO\");\n+\twrite_log(\"gui_renderer exists: %s\\n\", mon->gui_renderer ? \"YES\" : \"NO\");\n+\n+\treusing_amiga_resources = false;  // Reset\n+\n+\tif (sdl_video_driver != nullptr)\n \t{\n-\t\tkmsdrm_detected = true;\n-\t\tif (!mon->gui_window && mon->amiga_window)\n+\t\tif (strcmpi(sdl_video_driver, \"KMSDRM\") == 0)\n \t\t{\n-\t\t\tmon->gui_window = mon->amiga_window;\n+\t\t\twrite_log(\"KMSDRM detected\\n\");\n+\t\t\tkmsdrm_detected = true;\n+\t\t\tfbdev_detected = false;\n+\t\t\t\n+\t\t\tif (!mon->gui_window && mon->amiga_window)\n+\t\t\t{\n+\t\t\t\tmon->gui_window = mon->amiga_window;\n+\t\t\t\treusing_amiga_resources = true;\n+\t\t\t\twrite_log(\"Reusing amiga_window for GUI (KMSDRM)\\n\");\n+\t\t\t}\n+\t\t\tif (!mon->gui_renderer && mon->amiga_renderer)\n+\t\t\t{\n+\t\t\t\tmon->gui_renderer = mon->amiga_renderer;\n+\t\t\t\treusing_amiga_resources = true;\n+\t\t\t\twrite_log(\"Reusing amiga_renderer for GUI (KMSDRM)\\n\");\n+\t\t\t}\n \t\t}\n-\t\tif (!mon->gui_renderer && mon->amiga_renderer)\n+\t\telse if (strcmpi(sdl_video_driver, \"fbdev\") == 0 || \n+\t\t         strstr(sdl_video_driver, \"mali\") != nullptr)\n \t\t{\n-\t\t\tmon->gui_renderer = mon->amiga_renderer;\n+\t\t\twrite_log(\"fbdev/mali detected\\n\");\n+\t\t\tfbdev_detected = true;\n+\t\t\tkmsdrm_detected = true;  // Para compatibilidade\n+\t\t\t\n+\t\t\tif (!mon->gui_window && mon->amiga_window)\n+\t\t\t{\n+\t\t\t\tmon->gui_window = mon->amiga_window;\n+\t\t\t\treusing_amiga_resources = true;\n+\t\t\t\twrite_log(\"Reusing amiga_window for GUI (fbdev)\\n\");\n+\t\t\t}\n+\t\t\tif (!mon->gui_renderer && mon->amiga_renderer)\n+\t\t\t{\n+\t\t\t\tmon->gui_renderer = mon->amiga_renderer;\n+\t\t\t\treusing_amiga_resources = true;\n+\t\t\t\twrite_log(\"Reusing amiga_renderer for GUI (fbdev)\\n\");\n+\t\t\t}\n+\t\t}\n+\t\telse\n+\t\t{\n+\t\t\twrite_log(\"Standard video driver: %s\\n\", sdl_video_driver);\n+\t\t\tkmsdrm_detected = false;\n+\t\t\tfbdev_detected = false;\n \t\t}\n \t}\n+\t\n \tSDL_GetCurrentDisplayMode(0, &sdl_mode);\n \n \t//-------------------------------------------------\n@@ -285,23 +347,22 @@ void amiberry_gui_init()\n \t{\n \t\tgui_screen = SDL_CreateRGBSurface(0, GUI_WIDTH, GUI_HEIGHT, 16, 0, 0, 0, 0);\n \t\tcheck_error_sdl(gui_screen == nullptr, \"Unable to create GUI surface:\");\n+\t\twrite_log(\"GUI surface created\\n\");\n \t}\n \n \tif (!mon->gui_window)\n \t{\n-\t\twrite_log(\"Creating Amiberry GUI window...\\n\");\n+\t\twrite_log(\"Creating new Amiberry GUI window...\\n\");\n \t\tregqueryint(nullptr, _T(\"GUIPosX\"), &gui_window_rect.x);\n \t\tregqueryint(nullptr, _T(\"GUIPosY\"), &gui_window_rect.y);\n \n         Uint32 mode;\n \t\tif (!kmsdrm_detected)\n \t\t{\n-\t\t\t// Only enable Windowed mode if we're running under x11\n \t\t\tmode = SDL_WINDOW_RESIZABLE;\n \t\t}\n \t\telse\n \t\t{\n-\t\t\t// otherwise go for Full-window\n \t\t\tmode = SDL_WINDOW_FULLSCREEN_DESKTOP;\n \t\t}\n \n@@ -311,14 +372,13 @@ void amiberry_gui_init()\n             mode |= SDL_WINDOW_HIDDEN;\n         else\n             mode |= SDL_WINDOW_SHOWN;\n-\t\t// Set Window allow high DPI by default\n \t\tmode |= SDL_WINDOW_ALLOW_HIGHDPI;\n \n         if (amiberry_options.rotation_angle == 0 || amiberry_options.rotation_angle == 180)\n         {\n \t\t\tmon->gui_window = SDL_CreateWindow(\"Amiberry GUI\",\n-\t\t\t\tgui_window_rect.x != 0 ? gui_window_rect.x : SDL_WINDOWPOS_CENTERED,\n-\t\t\t\tgui_window_rect.y != 0 ? gui_window_rect.y : SDL_WINDOWPOS_CENTERED,\n+\t\t\t\tgui_window_rect.x,\n+\t\t\t\tgui_window_rect.y,\n \t\t\t\tgui_window_rect.w,\n \t\t\t\tgui_window_rect.h,\n \t\t\t\tmode);\n@@ -326,13 +386,14 @@ void amiberry_gui_init()\n         else\n         {\n \t\t\tmon->gui_window = SDL_CreateWindow(\"Amiberry GUI\",\n-\t\t\t\tgui_window_rect.y != 0 ? gui_window_rect.y : SDL_WINDOWPOS_CENTERED,\n-\t\t\t\tgui_window_rect.x != 0 ? gui_window_rect.x : SDL_WINDOWPOS_CENTERED,\n+\t\t\t\tgui_window_rect.y,\n+\t\t\t\tgui_window_rect.x,\n \t\t\t\tgui_window_rect.h,\n \t\t\t\tgui_window_rect.w,\n \t\t\t\tmode);\n         }\n         check_error_sdl(mon->gui_window == nullptr, \"Unable to create window:\");\n+\t\twrite_log(\"New GUI window created\\n\");\n \n \t\tauto* const icon_surface = IMG_Load(prefix_with_data_path(\"amiberry.png\").c_str());\n \t\tif (icon_surface != nullptr)\n@@ -341,16 +402,23 @@ void amiberry_gui_init()\n \t\t\tSDL_FreeSurface(icon_surface);\n \t\t}\n \t}\n-\telse if (kmsdrm_detected)\n+\telse\n \t{\n-\t\tSDL_SetWindowSize(mon->gui_window, GUI_WIDTH, GUI_HEIGHT);\n+\t\twrite_log(\"Using existing window for GUI\\n\");\n \t}\n \n \tif (mon->gui_renderer == nullptr)\n \t{\n+\t\twrite_log(\"Creating new GUI renderer...\\n\");\n \t\tmon->gui_renderer = SDL_CreateRenderer(mon->gui_window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);\n \t\tcheck_error_sdl(mon->gui_renderer == nullptr, \"Unable to create a renderer:\");\n+\t\twrite_log(\"New GUI renderer created\\n\");\n+\t}\n+\telse\n+\t{\n+\t\twrite_log(\"Using existing renderer for GUI\\n\");\n \t}\n+\t\n \tDPIHandler::set_render_scale(mon->gui_renderer);\n \n \tgui_texture = SDL_CreateTexture(mon->gui_renderer, gui_screen->format->format, SDL_TEXTUREACCESS_STREAMING, gui_screen->w,\n@@ -364,31 +432,34 @@ void amiberry_gui_init()\n \n \tSDL_SetRelativeMouseMode(SDL_FALSE);\n \tSDL_ShowCursor(SDL_ENABLE);\n-\n \tSDL_RaiseWindow(mon->gui_window);\n \n \t//-------------------------------------------------\n \t// Create helpers for GUI framework\n \t//-------------------------------------------------\n-\n \tgui_imageLoader = new gcn::SDLImageLoader();\n \tgui_imageLoader->setRenderer(mon->gui_renderer);\n-\n-\t// The ImageLoader in use is static and must be set to be\n-\t// able to load images\n \tgcn::Image::setImageLoader(gui_imageLoader);\n+\t\n \tgui_graphics = new gcn::SDLGraphics();\n-\t// Set the target for the graphics object to be the screen.\n-\t// In other words, we will draw to the screen.\n-\t// Note, any surface will do, it doesn't have to be the screen.\n \tgui_graphics->setTarget(gui_screen);\n+\t\n \tgui_input = new gcn::SDLInput();\n+\t\n+\twrite_log(\"=== GUI INIT COMPLETE ===\\n\");\n+\twrite_log(\"Reusing amiga resources: %s\\n\", reusing_amiga_resources ? \"YES\" : \"NO\");\n }\n \n void amiberry_gui_halt()\n {\n \tAmigaMonitor* mon = &AMonitors[0];\n \n+\twrite_log(\"=== GUI HALT START ===\\n\");\n+\twrite_log(\"Reusing amiga resources: %s\\n\", reusing_amiga_resources ? \"YES\" : \"NO\");\n+\twrite_log(\"fbdev_detected: %s\\n\", fbdev_detected ? \"YES\" : \"NO\");\n+\twrite_log(\"kmsdrm_detected: %s\\n\", kmsdrm_detected ? \"YES\" : \"NO\");\n+\n+\t// Clear GUI helpers\n \tdelete gui_imageLoader;\n \tgui_imageLoader = nullptr;\n \tdelete gui_input;\n@@ -396,30 +467,135 @@ void amiberry_gui_halt()\n \tdelete gui_graphics;\n \tgui_graphics = nullptr;\n \n+\t// Clear GUI surface\n \tif (gui_screen != nullptr)\n \t{\n \t\tSDL_FreeSurface(gui_screen);\n \t\tgui_screen = nullptr;\n+\t\twrite_log(\"GUI screen freed\\n\");\n \t}\n+\t\n+\t// Clear GUI texture\n \tif (gui_texture != nullptr)\n \t{\n \t\tSDL_DestroyTexture(gui_texture);\n \t\tgui_texture = nullptr;\n+\t\twrite_log(\"GUI texture destroyed\\n\");\n \t}\n-\tif (mon->gui_renderer && !kmsdrm_detected)\n+\t\n+\t// CRITICAL: Deciding what to do with renderer and window\n+\tif (reusing_amiga_resources)\n \t{\n-\t\tSDL_DestroyRenderer(mon->gui_renderer);\n+\t\t\n+\t\twrite_log(\"Releasing (not destroying) renderer and window - they belong to emulation\\n\");\n+\t\t\n+\t\t// IMPORTANT: Reset logical size for the game\n+\t\tif (mon->gui_renderer)\n+\t\t{\n+\t\t\tSDL_RenderClear(mon->gui_renderer);\n+\t\t\tSDL_RenderPresent(mon->gui_renderer);\n+\t\t}\n+\t\t\n+\t\t// DO NOT destroy, just \"release\" the pointers\n \t\tmon->gui_renderer = nullptr;\n+\t\tmon->gui_window = nullptr;\n \t}\n+\telse\n+\t{\n+\t\t// created own resources, we destroy normally\n+\t\twrite_log(\"Destroying GUI-owned renderer and window\\n\");\n+\t\t\n+\t\tif (mon->gui_renderer)\n+\t\t{\n+\t\t\tSDL_DestroyRenderer(mon->gui_renderer);\n+\t\t\tmon->gui_renderer = nullptr;\n+\t\t\twrite_log(\"GUI renderer destroyed\\n\");\n+\t\t}\n \n-\tif (mon->gui_window && !kmsdrm_detected) {\n-\t\tregsetint(nullptr, _T(\"GUIPosX\"), gui_window_rect.x);\n-\t\tregsetint(nullptr, _T(\"GUIPosY\"), gui_window_rect.y);\n-\t\tSDL_DestroyWindow(mon->gui_window);\n-\t\tmon->gui_window = nullptr;\n+\t\tif (mon->gui_window)\n+\t\t{\n+\t\t\tregsetint(nullptr, _T(\"GUIPosX\"), gui_window_rect.x);\n+\t\t\tregsetint(nullptr, _T(\"GUIPosY\"), gui_window_rect.y);\n+\t\t\tSDL_DestroyWindow(mon->gui_window);\n+\t\t\tmon->gui_window = nullptr;\n+\t\t\twrite_log(\"GUI window destroyed\\n\");\n+\t\t}\n \t}\n+\t\n+\twrite_log(\"=== GUI HALT COMPLETE ===\\n\");\n }\n \n+\n+\n+// ============================================================\n+// ADICIONE ESTAS FUNÇÕES AUXILIARES \n+// (antes da função check_input)\n+// ============================================================\n+\n+void restore_input_after_modal()\n+{\n+\tconst AmigaMonitor* mon = &AMonitors[0];\n+\t\n+\twrite_log(\"=== MODAL CLOSED - Restoring input ===\\n\");\n+\t\n+\t// Limpar TODOS os eventos pendentes da fila\n+\tSDL_Event event;\n+\tint cleared = 0;\n+\twhile (SDL_PollEvent(&event))\n+\t{\n+\t\tcleared++;\n+\t}\n+\twrite_log(\"Cleared %d pending events\\n\", cleared);\n+\t\n+\t// Resetar todos os estados\n+\tctrl_state = false;\n+\tshift_state = false;\n+\talt_state = false;\n+\twin_state = false;\n+\tlast_x = 0;\n+\tlast_y = 0;\n+\t\n+\t// Garantir que mouse está visível e configurado\n+\tSDL_SetRelativeMouseMode(SDL_FALSE);\n+\tSDL_ShowCursor(SDL_ENABLE);\n+\t\n+\t// Elevar e focar a janela GUI\n+\tif (mon->gui_window)\n+\t{\n+\t\tSDL_RaiseWindow(mon->gui_window);\n+\t\tSDL_SetWindowInputFocus(mon->gui_window);\n+\t\twrite_log(\"Window raised and focused\\n\");\n+\t}\n+\t\n+\t// Pequeno delay para estabilizar\n+\tSDL_Delay(50);\n+\t\n+\t// Limpar eventos novamente após o delay\n+\twhile (SDL_PollEvent(&event)) { }\n+\t\n+\t// Restaurar foco no widget ou no painel ativo\n+\tif (widget_before_modal && widget_before_modal->isVisible())\n+\t{\n+\t\twidget_before_modal->requestFocus();\n+\t\twrite_log(\"Focus restored to saved widget\\n\");\n+\t}\n+\telse if (categories[last_active_panel].selector)\n+\t{\n+\t\tcategories[last_active_panel].selector->requestFocus();\n+\t\twrite_log(\"Focus restored to panel selector\\n\");\n+\t}\n+\t\n+\twidget_before_modal = nullptr;\n+\tframes_after_modal = 5; // Aguardar alguns frames\n+\t\n+\twrite_log(\"=== Input restoration complete ===\\n\");\n+}\n+\n+\n+// ============================================================\n+// SUBSTITUA A FUNÇÃO check_input() COMPLETA POR ESTA VERSÃO\n+// ============================================================\n+\n void check_input()\n {\n \tconst AmigaMonitor* mon = &AMonitors[0];\n@@ -428,8 +604,67 @@ void check_input()\n \tdidata* did = &di_joystick[0];\n \tdidata* existing_did;\n \t\n+\t// Detectar mudanças no número de widgets filhos (indica modal abrindo/fechando)\n+\tif (uae_gui && gui_top)\n+\t{\n+\t\tconst auto& children = gui_top->getChildren();\n+\t\tint current_count = children.size();\n+\t\t\n+\t\t// Primeira vez - apenas inicializar\n+\t\tif (gui_top_children_count == -1)\n+\t\t{\n+\t\t\tgui_top_children_count = current_count;\n+\t\t\twrite_log(\"GUI initialized with %d children\\n\", current_count);\n+\t\t}\n+\t\t// Se número de filhos aumentou significativamente, modal abriu\n+\t\telse if (current_count > gui_top_children_count + 1)\n+\t\t{\n+\t\t\twrite_log(\"Child count increased from %d to %d - MODAL OPENED\\n\", \n+\t\t\t          gui_top_children_count, current_count);\n+\t\t\t\n+\t\t\t// Salvar widget com foco\n+\t\t\tfocusHdl = gui_top->_getFocusHandler();\n+\t\t\tif (focusHdl)\n+\t\t\t{\n+\t\t\t\twidget_before_modal = focusHdl->getFocused();\n+\t\t\t\twrite_log(\"Saved focus widget before modal\\n\");\n+\t\t\t}\n+\t\t\twaiting_for_modal_close = true;\n+\t\t}\n+\t\t// Se estava esperando modal fechar E o número diminuiu\n+\t\telse if (waiting_for_modal_close && current_count < gui_top_children_count)\n+\t\t{\n+\t\t\twrite_log(\"Child count decreased from %d to %d - MODAL CLOSED\\n\", \n+\t\t\t          gui_top_children_count, current_count);\n+\t\t\trestore_input_after_modal();\n+\t\t\twaiting_for_modal_close = false;\n+\t\t}\n+\t\t\n+\t\tgui_top_children_count = current_count;\n+\t}\n+\t\n+\t// Se estamos em período de estabilização após modal, decrementar\n+\tif (frames_after_modal > 0)\n+\t{\n+\t\tframes_after_modal--;\n+\t\tif (frames_after_modal == 0)\n+\t\t{\n+\t\t\twrite_log(\"Stabilization period finished\\n\");\n+\t\t}\n+\t}\n+\t\n \twhile (SDL_PollEvent(&gui_event))\n \t{\n+\t\t// Durante estabilização, descartar eventos de entrada do joystick/teclado\n+\t\tif (frames_after_modal > 0 && \n+\t\t    (gui_event.type == SDL_KEYDOWN || \n+\t\t     gui_event.type == SDL_JOYBUTTONDOWN ||\n+\t\t     gui_event.type == SDL_JOYHATMOTION))\n+\t\t{\n+\t\t\twrite_log(\"Discarding input during stabilization\\n\");\n+\t\t\tcontinue;\n+\t\t}\n+\t\t\n \t\tswitch (gui_event.type)\n \t\t{\n \t\tcase SDL_WINDOWEVENT:\n@@ -445,6 +680,16 @@ void check_input()\n \t\t\t\t\tgui_window_rect.w = gui_event.window.data1;\n \t\t\t\t\tgui_window_rect.h = gui_event.window.data2;\n \t\t\t\t\tbreak;\n+\t\t\t\tcase SDL_WINDOWEVENT_FOCUS_GAINED:\n+\t\t\t\t\twrite_log(\"Window focus gained\\n\");\n+\t\t\t\t\tif (mon->gui_window)\n+\t\t\t\t\t{\n+\t\t\t\t\t\tSDL_SetWindowInputFocus(mon->gui_window);\n+\t\t\t\t\t}\n+\t\t\t\t\tbreak;\n+\t\t\t\tcase SDL_WINDOWEVENT_FOCUS_LOST:\n+\t\t\t\t\twrite_log(\"Window focus lost\\n\");\n+\t\t\t\t\tbreak;\n \t\t\t\tdefault: \n \t\t\t\t\tbreak;\n \t\t\t\t}\n@@ -454,15 +699,11 @@ void check_input()\n \t\t\n \t\tcase SDL_QUIT:\n \t\t\tgot_event = 1;\n-\t\t\t//-------------------------------------------------\n-\t\t\t// Quit entire program\n-\t\t\t//-------------------------------------------------\n \t\t\tuae_quit();\n \t\t\tgui_running = false;\n \t\t\tbreak;\n \n \t\tcase SDL_JOYDEVICEADDED:\n-\t\t\t// Check if we need to re-import joysticks\n \t\t\texisting_did = &di_joystick[gui_event.jdevice.which];\n \t\t\tif (existing_did->guid.empty())\n \t\t\t{\n@@ -472,6 +713,7 @@ void check_input()\n \t\t\t\tRefreshPanelInput();\n \t\t\t}\n \t\t\treturn;\n+\t\t\t\n \t\tcase SDL_JOYDEVICEREMOVED:\n \t\t\twrite_log(\"GUI: SDL2 Controller/Joystick removed, re-running import joysticks...\\n\");\n \t\t\tif (inputdevice_devicechange(&currprefs))\n@@ -495,16 +737,10 @@ void check_input()\n \t\t\t\t{\n \t\t\t\t\tif (emulating && cmdStart->isEnabled())\n \t\t\t\t\t{\n-\t\t\t\t\t\t//------------------------------------------------\n-\t\t\t\t\t\t// Continue emulation\n-\t\t\t\t\t\t//------------------------------------------------\n \t\t\t\t\t\tgui_running = false;\n \t\t\t\t\t}\n \t\t\t\t\telse\n \t\t\t\t\t{\n-\t\t\t\t\t\t//------------------------------------------------\n-\t\t\t\t\t\t// First start of emulator -> reset Amiga\n-\t\t\t\t\t\t//------------------------------------------------\n \t\t\t\t\t\tuae_reset(0, 1);\n \t\t\t\t\t\tgui_running = false;\n \t\t\t\t\t}\n@@ -512,18 +748,17 @@ void check_input()\n \t\t\t\telse if (SDL_JoystickGetButton(gui_joystick, did->mapping.button[SDL_CONTROLLER_BUTTON_DPAD_UP]) || hat & SDL_HAT_UP)\n \t\t\t\t{\n \t\t\t\t\tif (handle_navigation(DIRECTION_UP))\n-\t\t\t\t\t\tcontinue; // Don't change value when enter Slider -> don't send event to control\n+\t\t\t\t\t\tcontinue;\n \t\t\t\t\tPushFakeKey(SDLK_UP);\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\telse if (SDL_JoystickGetButton(gui_joystick, did->mapping.button[SDL_CONTROLLER_BUTTON_DPAD_DOWN]) || hat & SDL_HAT_DOWN)\n \t\t\t\t{\n \t\t\t\t\tif (handle_navigation(DIRECTION_DOWN))\n-\t\t\t\t\t\tcontinue; // Don't change value when enter Slider -> don't send event to control\n+\t\t\t\t\t\tcontinue;\n \t\t\t\t\tPushFakeKey(SDLK_DOWN);\n \t\t\t\t\tbreak;\n \t\t\t\t}\n-\n \t\t\t\telse if ((did->mapping.is_retroarch || !did->is_controller)\n \t\t\t\t\t&& SDL_JoystickGetButton(gui_joystick, did->mapping.button[SDL_CONTROLLER_BUTTON_LEFTSHOULDER])\n \t\t\t\t\t|| SDL_GameControllerGetButton(did->controller,\n@@ -544,18 +779,17 @@ void check_input()\n \t\t\t\t\t\tPushFakeKey(SDLK_DOWN);\n \t\t\t\t\t}\n \t\t\t\t}\n-\n \t\t\t\telse if (SDL_JoystickGetButton(gui_joystick, did->mapping.button[SDL_CONTROLLER_BUTTON_DPAD_RIGHT]) || hat & SDL_HAT_RIGHT)\n \t\t\t\t{\n \t\t\t\t\tif (handle_navigation(DIRECTION_RIGHT))\n-\t\t\t\t\t\tcontinue; // Don't change value when enter Slider -> don't send event to control\n+\t\t\t\t\t\tcontinue;\n \t\t\t\t\tPushFakeKey(SDLK_RIGHT);\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\telse if (SDL_JoystickGetButton(gui_joystick, did->mapping.button[SDL_CONTROLLER_BUTTON_DPAD_LEFT]) || hat & SDL_HAT_LEFT)\n \t\t\t\t{\n \t\t\t\t\tif (handle_navigation(DIRECTION_LEFT))\n-\t\t\t\t\t\tcontinue; // Don't change value when enter Slider -> don't send event to control\n+\t\t\t\t\t\tcontinue;\n \t\t\t\t\tPushFakeKey(SDLK_LEFT);\n \t\t\t\t\tbreak;\n \t\t\t\t}\n@@ -570,22 +804,18 @@ void check_input()\n \t\t\t\t\tPushFakeKey(SDLK_RETURN);\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n-\n \t\t\t\telse if (SDL_JoystickGetButton(gui_joystick, did->mapping.quit_button) &&\n \t\t\t\t\tSDL_JoystickGetButton(gui_joystick, did->mapping.hotkey_button))\n \t\t\t\t{\n-\t\t\t\t\t// use the HOTKEY button\n \t\t\t\t\tuae_quit();\n \t\t\t\t\tgui_running = false;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n-\n \t\t\t\telse if ((did->mapping.is_retroarch || !did->is_controller)\n \t\t\t\t\t&& SDL_JoystickGetButton(gui_joystick, did->mapping.button[SDL_CONTROLLER_BUTTON_GUIDE])\n \t\t\t\t\t|| SDL_GameControllerGetButton(did->controller,\n \t\t\t\t\t\tstatic_cast<SDL_GameControllerButton>(did->mapping.button[SDL_CONTROLLER_BUTTON_GUIDE])))\n \t\t\t\t{\n-\t\t\t\t\t// use the HOTKEY button\n \t\t\t\t\tgui_running = false;\n \t\t\t\t}\n \t\t\t}\n@@ -601,14 +831,14 @@ void check_input()\n \t\t\t\t\t{\n \t\t\t\t\t\tlast_x = 1;\n \t\t\t\t\t\tif (handle_navigation(DIRECTION_RIGHT))\n-\t\t\t\t\t\t\tcontinue; // Don't change value when enter Slider -> don't send event to control\n+\t\t\t\t\t\t\tcontinue;\n \t\t\t\t\t\tPushFakeKey(SDLK_RIGHT);\n \t\t\t\t\t}\n \t\t\t\t\telse if (gui_event.jaxis.value < -joystick_dead_zone && last_x != -1)\n \t\t\t\t\t{\n \t\t\t\t\t\tlast_x = -1;\n \t\t\t\t\t\tif (handle_navigation(DIRECTION_LEFT))\n-\t\t\t\t\t\t\tcontinue; // Don't change value when enter Slider -> don't send event to control\n+\t\t\t\t\t\t\tcontinue;\n \t\t\t\t\t\tPushFakeKey(SDLK_LEFT);\n \t\t\t\t\t}\n \t\t\t\t\telse if (gui_event.jaxis.value > -joystick_dead_zone && gui_event.jaxis.value < joystick_dead_zone)\n@@ -622,14 +852,14 @@ void check_input()\n \t\t\t\t\t{\n \t\t\t\t\t\tlast_y = -1;\n \t\t\t\t\t\tif (handle_navigation(DIRECTION_UP))\n-\t\t\t\t\t\t\tcontinue; // Don't change value when enter Slider -> don't send event to control\n+\t\t\t\t\t\t\tcontinue;\n \t\t\t\t\t\tPushFakeKey(SDLK_UP);\n \t\t\t\t\t}\n \t\t\t\t\telse if (gui_event.jaxis.value > joystick_dead_zone && last_y != 1)\n \t\t\t\t\t{\n \t\t\t\t\t\tlast_y = 1;\n \t\t\t\t\t\tif (handle_navigation(DIRECTION_DOWN))\n-\t\t\t\t\t\t\tcontinue; // Don't change value when enter Slider -> don't send event to control\n+\t\t\t\t\t\t\tcontinue;\n \t\t\t\t\t\tPushFakeKey(SDLK_DOWN);\n \t\t\t\t\t}\n \t\t\t\t\telse if (gui_event.jaxis.value > -joystick_dead_zone && gui_event.jaxis.value < joystick_dead_zone)\n@@ -673,16 +903,10 @@ void check_input()\n \t\t\t\t{\n \t\t\t\t\tif (emulating && cmdStart->isEnabled())\n \t\t\t\t\t{\n-\t\t\t\t\t\t//------------------------------------------------\n-\t\t\t\t\t\t// Continue emulation\n-\t\t\t\t\t\t//------------------------------------------------\n \t\t\t\t\t\tgui_running = false;\n \t\t\t\t\t}\n \t\t\t\t\telse\n \t\t\t\t\t{\n-\t\t\t\t\t\t//------------------------------------------------\n-\t\t\t\t\t\t// First start of emulator -> reset Amiga\n-\t\t\t\t\t\t//------------------------------------------------\n \t\t\t\t\t\tuae_reset(0, 1);\n \t\t\t\t\t\tgui_running = false;\n \t\t\t\t\t}\n@@ -693,14 +917,10 @@ void check_input()\n \t\t\t\tswitch (gui_event.key.keysym.sym)\n \t\t\t\t{\n \t\t\t\tcase SDLK_q:\n-\t\t\t\t\t//-------------------------------------------------\n-\t\t\t\t\t// Quit entire program via Q on keyboard\n-\t\t\t\t\t//-------------------------------------------------\n \t\t\t\t\tfocusHdl = gui_top->_getFocusHandler();\n \t\t\t\t\tactiveWidget = focusHdl->getFocused();\n \t\t\t\t\tif (dynamic_cast<gcn::TextField*>(activeWidget) == nullptr)\n \t\t\t\t\t{\n-\t\t\t\t\t\t// ...but only if we are not in a Textfield...\n \t\t\t\t\t\tuae_quit();\n \t\t\t\t\t\tgui_running = false;\n \t\t\t\t\t}\n@@ -713,32 +933,29 @@ void check_input()\n \n \t\t\t\tcase VK_Green:\n \t\t\t\tcase VK_Blue:\n-\t\t\t\t\t//------------------------------------------------\n-\t\t\t\t\t// Simulate press of enter when 'X' pressed\n-\t\t\t\t\t//------------------------------------------------\n \t\t\t\t\tgui_event.key.keysym.sym = SDLK_RETURN;\n-\t\t\t\t\tgui_input->pushInput(gui_event); // Fire key down\n-\t\t\t\t\tgui_event.type = SDL_KEYUP; // and the key up\n+\t\t\t\t\tgui_input->pushInput(gui_event);\n+\t\t\t\t\tgui_event.type = SDL_KEYUP;\n \t\t\t\t\tbreak;\n \n \t\t\t\tcase VK_UP:\n \t\t\t\t\tif (handle_navigation(DIRECTION_UP))\n-\t\t\t\t\t\tcontinue; // Don't change value when enter ComboBox -> don't send event to control\n+\t\t\t\t\t\tcontinue;\n \t\t\t\t\tbreak;\n \n \t\t\t\tcase VK_DOWN:\n \t\t\t\t\tif (handle_navigation(DIRECTION_DOWN))\n-\t\t\t\t\t\tcontinue; // Don't change value when enter ComboBox -> don't send event to control\n+\t\t\t\t\t\tcontinue;\n \t\t\t\t\tbreak;\n \n \t\t\t\tcase VK_LEFT:\n \t\t\t\t\tif (handle_navigation(DIRECTION_LEFT))\n-\t\t\t\t\t\tcontinue; // Don't change value when enter Slider -> don't send event to control\n+\t\t\t\t\t\tcontinue;\n \t\t\t\t\tbreak;\n \n \t\t\t\tcase VK_RIGHT:\n \t\t\t\t\tif (handle_navigation(DIRECTION_RIGHT))\n-\t\t\t\t\t\tcontinue; // Don't change value when enter Slider -> don't send event to control\n+\t\t\t\t\t\tcontinue;\n \t\t\t\t\tbreak;\n \n \t\t\t\tcase SDLK_F1:\n@@ -822,12 +1039,8 @@ void check_input()\n \t\n \tif (got_event)\n \t{\n-\t\t// Now we let the Gui object perform its logic.\n \t\tuae_gui->logic();\n-\n \t\tSDL_RenderClear(mon->gui_renderer);\n-\n-\t\t// Now we let the Gui object draw itself.\n \t\tuae_gui->draw();\n \t\tupdate_gui_screen();\n \t}\n"
  },
  {
    "path": "packages/sx05re/emulators/atari800sa/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"atari800sa\"\nPKG_VERSION=\"fcb6e799734c749f9e326640f4d506abf854e95c\"\nPKG_SHA256=\"e96cc007ab9115fe69f9e914813c7c3a5381885033f1ed4c35f21624bbb365c3\"\nPKG_SITE=\"https://github.com/atari800/atari800\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_SHORTDESC=\"Atari 8-bit computer and 5200 console emulator\"\nPKG_TOOLCHAIN=\"configure\"\n\npre_configure_target() {\n  ${PKG_BUILD}/autogen.sh\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/biginstinct/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present EmuELEC Team (https://github.com/EmuELEC/EmuELEC)\n\nPKG_NAME=\"biginstinct\"\nPKG_VERSION=\"10\"\nPKG_SHA256=\"5c29befbabefa6f65c60149de670e382101a315f41a20cdd2e738d59268c1629\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"Proprietary\"\nPKG_SITE=\"https://www.richwhitehouse.com/ki\"\nPKG_URL=\"https://www.richwhitehouse.com/ki/builds/BigInstinct_LinuxARM64_v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec/emulators\"\nPKG_SHORTDESC=\"BigInstinct - Killer Instinct Arcade Emulator\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin/biginstinct\n  cp -rv ${PKG_BUILD}/* ${INSTALL}/usr/bin/biginstinct/\n  chmod +x ${INSTALL}/usr/bin/biginstinct/biginstinct\n\n  cp -f ${PKG_DIR}/scripts/biginstinctstart.sh ${INSTALL}/usr/bin/biginstinctstart.sh\n  chmod +x ${INSTALL}/usr/bin/biginstinctstart.sh\n}"
  },
  {
    "path": "packages/sx05re/emulators/biginstinct/scripts/biginstinctstart.sh",
    "content": "#!/bin/bash\n# Create libOpenGL.so.0 symlink in /tmp (filesystem is read-only)\nif [ ! -f /tmp/libOpenGL.so.0 ]; then\n  ln -sf /usr/lib/libGL.so.1 /tmp/libOpenGL.so.0\nfi\n\n# Add /tmp first so libOpenGL.so.0 symlink is found before other paths\nexport LD_LIBRARY_PATH=/tmp:/usr/lib:/emuelec/lib:$LD_LIBRARY_PATH\n# Fix GL rendering issues on Mali GPU\nexport LIBGL_NOTEST=1\n# Change to biginstinct directory\ncd /usr/bin/biginstinct\n# Launch biginstinct with all arguments\n./biginstinct \"$@\""
  },
  {
    "path": "packages/sx05re/emulators/bigpemu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present EmuELEC Team (https://github.com/EmuELEC/EmuELEC)\n\nPKG_NAME=\"bigpemu\"\nPKG_VERSION=\"122\"\nPKG_SHA256=\"afacd7254baa5d2858146651e1e2b7f7cc7beb7f0ea65cdc62a87c296170f646\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"Proprietary\"\nPKG_SITE=\"https://www.richwhitehouse.com/jaguar\"\nPKG_URL=\"https://www.richwhitehouse.com/jaguar/builds/BigPEmu_LinuxARM64_v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec/emulators\"\nPKG_SHORTDESC=\"BigPEmu - Atari Jaguar Emulator\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin/bigpemu\n  cp -rv ${PKG_BUILD}/* ${INSTALL}/usr/bin/bigpemu/\n  chmod +x ${INSTALL}/usr/bin/bigpemu/bigpemu\n\n  cp -f ${PKG_DIR}/scripts/bigpemustart.sh ${INSTALL}/usr/bin/bigpemustart.sh\n  chmod +x ${INSTALL}/usr/bin/bigpemustart.sh\n}"
  },
  {
    "path": "packages/sx05re/emulators/bigpemu/scripts/bigpemustart.sh",
    "content": "#!/bin/bash\n# Create libOpenGL.so.0 symlink in /tmp (filesystem is read-only)\nif [ ! -f /tmp/libOpenGL.so.0 ]; then\n  ln -sf /usr/lib/libGL.so.1 /tmp/libOpenGL.so.0\nfi\n\n# Add /tmp first so libOpenGL.so.0 symlink is found before other paths\nexport LD_LIBRARY_PATH=/tmp:/usr/lib:/emuelec/lib:$LD_LIBRARY_PATH\n# Fix GL rendering issues on Mali GPU\nexport LIBGL_NOTEST=1\n# Change to BigPEmu directory\ncd /usr/bin/bigpemu\n# Launch BigPEmu with all arguments\n./bigpemu \"$@\""
  },
  {
    "path": "packages/sx05re/emulators/box64/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"box64\"\nPKG_VERSION=\"448ee01f44b0aabb5c39d5c73edf8f8b6a051fe4\"\n\n# amlogic-old uses older linux headers not compatible with newer versions\n[ \"${DEVICE}\" == \"Amlogic-old\" ] && PKG_VERSION=\"6392550208eadf07419692920acc2955bb844af7\"\n\nPKG_REV=\"1\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/ptitSeb/box64\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain gl4es\"\nPKG_LONGDESC=\"Box64 - Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices\"\nPKG_TOOLCHAIN=\"cmake\"\n\nif [[ \"${DEVICE}\" == \"Amlogic\"* ]]; then\n\tPKG_CMAKE_OPTS_TARGET=\" -DODROIDN2=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo\"\nelse\n\tPKG_CMAKE_OPTS_TARGET=\" -DRK3326=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo\"\nfi\n\npre_configure_target() {\n# https://github.com/ptitSeb/box64/issues/256\nif ! grep -q \"as-needed\" ${PKG_BUILD}/CMakeLists.txt; then\n\tsed -i \"s|as-need|as-needed|g\" ${PKG_BUILD}/CMakeLists.txt\nfi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/config/emuelec/bin/box64/lib\n  cp ${PKG_BUILD}/x64lib/* ${INSTALL}/usr/config/emuelec/bin/box64/lib\n  cp ${PKG_BUILD}/.${TARGET_NAME}/box64 ${INSTALL}/usr/config/emuelec/bin/box64/\n  \n  mkdir -p ${INSTALL}/etc/binfmt.d\n  ln -sf /emuelec/configs/box64.conf ${INSTALL}/etc/binfmt.d/box64.conf\n \n}\n"
  },
  {
    "path": "packages/sx05re/emulators/box86/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"box86\"\nPKG_VERSION=\"fa14e0ab1417303455ca3b716a5ad545fb132d4a\"\nPKG_SHA256=\"2fa0d9aa2856275ce04a912b7aefa9232260a3b4187d26c9e8ca408b40cd045d\"\nPKG_REV=\"1\"\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/ptitSeb/box86\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gl4es\"\nPKG_LONGDESC=\"Box86 - Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices\"\nPKG_TOOLCHAIN=\"cmake\"\n\nif [[ \"${DEVICE}\" == \"Amlogic\"* ]]; then\n\tPKG_CMAKE_OPTS_TARGET=\" -DRK3399=ON -DCMAKE_BUILD_TYPE=Release\"\nelse\n\tPKG_CMAKE_OPTS_TARGET=\" -DGOA_CLONE=ON -DCMAKE_BUILD_TYPE=Release\"\nfi\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/config/emuelec/bin/box86/lib\n  cp ${PKG_BUILD}/x86lib/* ${INSTALL}/usr/config/emuelec/bin/box86/lib\n  cp ${PKG_BUILD}/.${TARGET_NAME}/box86 ${INSTALL}/usr/config/emuelec/bin/box86/\n  \n  mkdir -p ${INSTALL}/etc/binfmt.d\n  ln -sf /emuelec/configs/box86.conf ${INSTALL}/etc/binfmt.d/box86.conf\n \n}\n"
  },
  {
    "path": "packages/sx05re/emulators/dolphinSA/config/Dolphin.ini",
    "content": "[General]\nLastFilename = \nShowLag = False\nShowFrameCount = False\nISOPaths = 1\nRecursiveISOPaths = False\nNANDRootPath = \nWirelessMac = \n[Interface]\nConfirmStop = True\nUsePanicHandlers = True\nOnScreenDisplayMessages = True\nHideCursor = False\nAutoHideCursor = False\nMainWindowPosX = 403\nMainWindowPosY = 148\nMainWindowWidth = 800\nMainWindowHeight = 600\nLanguage = 0\nShowToolbar = True\nShowStatusbar = True\nShowLogWindow = False\nShowLogConfigWindow = False\nExtendedFPSInfo = False\nThemeName40 = Clean Blue\nPauseOnFocusLost = False\n[Display]\nFullscreenResolution = Auto\nFullscreen = True\nRenderToMain = False\nRenderWindowXPos = -1\nRenderWindowYPos = -1\nRenderWindowWidth = 640\nRenderWindowHeight = 480\nRenderWindowAutoSize = False\nKeepWindowOnTop = False\nProgressiveScan = False\nPAL60 = True\nDisableScreenSaver = True\nForceNTSCJ = False\n[GameList]\nListDrives = False\nListWad = True\nListElfDol = True\nListWii = True\nListGC = True\nListJap = True\nListPal = True\nListUsa = True\nListAustralia = True\nListFrance = True\nListGermany = True\nListItaly = True\nListKorea = True\nListNetherlands = True\nListRussia = True\nListSpain = True\nListTaiwan = True\nListWorld = True\nListUnknown = True\nListSort = 3\nListSortSecondary = 0\nColorCompressed = True\nColumnPlatform = True\nColumnBanner = True\nColumnNotes = True\nColumnFileName = False\nColumnID = False\nColumnRegion = True\nColumnSize = True\nColumnState = True\n[Core]\nHLE_BS2 = False\nTimingVariance = 32\nCPUCore = 4\nFastmem = True\nCPUThread = True\nDSPHLE = True\nSkipIdle = False\nSyncOnSkipIdle = False\nSyncGPU = False\nSyncGpuMaxDistance = 200000\nSyncGpuMinDistance = -200000\nSyncGpuOverclock = 1.00000000\nFPRF = False\nAccurateNaNs = False\nDefaultISO = \nDVDRoot = \nApploader = \nEnableCheats = True\nSelectedLanguage = 0\nOverrideGCLang = False\nDPL2Decoder = False\nLatency = 2\nMemcardAPath = \nMemcardBPath = \nAgpCartAPath = \nAgpCartBPath = \nSlotA = 1\nSlotB = 255\nSerialPort1 = 255\nBBA_MAC = \nSIDevice0 = 6\nAdapterRumble0 = True\nSimulateKonga0 = False\nSIDevice1 = 6\nAdapterRumble1 = True\nSimulateKonga1 = False\nSIDevice2 = 0\nAdapterRumble2 = True\nSimulateKonga2 = False\nSIDevice3 = 0\nAdapterRumble3 = True\nSimulateKonga3 = False\nWiiSDCard = False\nWiiKeyboard = False\nWiimoteContinuousScanning = False\nWiimoteEnableSpeaker = False\nRunCompareServer = False\nRunCompareClient = False\nEmulationSpeed = 1.00000000\nFrameSkip = 0x00000003\nOverclock = 4.00000000\nOverclockEnable = False\nGFXBackend = OGL\nGPUDeterminismMode = auto\nPerfMapDir = \n[Movie]\nPauseMovie = False\nAuthor = \nDumpFrames = False\nDumpFramesSilent = False\nShowInputDisplay = False\n[DSP]\nEnableJIT = True\nDumpAudio = False\nDumpUCode = False\nBackend = ALSA\nVolume = 100\nCaptureLog = False\n[Input]\nBackgroundInput = False\n[FifoPlayer]\nLoopReplay = True\n[Analytics]\nID = 5082f0c30a7e422b1220107f69d6c108\nEnabled = False\nPermissionAsked = True\n"
  },
  {
    "path": "packages/sx05re/emulators/dolphinSA/config/GCPadNew.ini",
    "content": "[GCPad1]\nDevice = SDL/0/HORI CO.,LTD. HORIPAD S\nButtons/A = `Button 2`\nButtons/B = `Button 1`\nButtons/X = `Button 3`\nButtons/Y = `Button 0`\nButtons/Z = `Button 4`\nButtons/Start = `Button 9`\nMain Stick/Up = `Axis 1-`\nMain Stick/Down = `Axis 1+`\nMain Stick/Left = `Axis 0-`\nMain Stick/Right = `Axis 0+`\nMain Stick/Modifier = Shift_L\nMain Stick/Modifier/Range = 50.000000000000000\nC-Stick/Up = `Axis 1-`\nC-Stick/Down = K\nC-Stick/Left = J\nC-Stick/Right = L\nC-Stick/Modifier = Control_L\nC-Stick/Modifier/Range = 50.000000000000000\nTriggers/L = Q\nTriggers/R = W\nD-Pad/Up = `Hat 0 N`\nD-Pad/Down = `Hat 0 S`\nD-Pad/Left = `Hat 0 W`\nD-Pad/Right = `Hat 0 E`\n[GCPad2]\nDevice = evdev/0/HORI CO.,LTD. HORIPAD S\nButtons/A = `Button 2`\nButtons/B = `Button 1`\nButtons/X = `Button 3`\nButtons/Y = `Button 0`\nButtons/Z = `Button 13`\nButtons/Start = `Button 9`\nButtons/Mic = `Button 8`\nMain Stick/Up = `Axis 1-`\nMain Stick/Down = `Axis 1+`\nMain Stick/Left = `Axis 0-`\nMain Stick/Right = `Axis 0+`\nC-Stick/Up = `Axis 3-`\nC-Stick/Down = `Axis 3+`\nC-Stick/Left = `Axis 2-`\nC-Stick/Right = `Axis 2+`\nTriggers/L = `Button 4`\nTriggers/R = `Button 5`\nTriggers/L-Analog = `Button 6`\nTriggers/R-Analog = `Button 7`\nD-Pad/Up = `Axis 5-`\nD-Pad/Down = `Axis 5+`\nD-Pad/Left = `Axis 4-`\nD-Pad/Right = `Axis 4+`\n"
  },
  {
    "path": "packages/sx05re/emulators/dolphinSA/config/GFX.ini",
    "content": "[Hardware]\nVSync = False\nAdapter = 0\n[Settings]\nAspectRatio = 2\nCrop = False\nwideScreenHack = False\nUseXFB = False\nUseRealXFB = False\nSafeTextureCacheColorSamples = 128\nShowFPS = True\nLogRenderTimeToFile = False\nOverlayStats = False\nOverlayProjStats = False\nDumpTextures = False\nHiresTextures = False\nConvertHiresTextures = False\nCacheHiresTextures = False\nDumpEFBTarget = False\nFreeLook = False\nUseFFV1 = False\nEnablePixelLighting = False\nFastDepthCalc = True\nMSAA = 0\nSSAA = False\nEFBScale = 1\nTexFmtOverlayEnable = False\nTexFmtOverlayCenter = False\nWireframe = False\nDisableFog = False\nEnableShaderDebugging = False\nBorderlessFullscreen = False\nSWZComploc = True\nSWZFreeze = True\nSWDumpObjects = False\nSWDumpTevStages = False\nSWDumpTevTexFetches = False\nSWDrawStart = 0\nSWDrawEnd = 100000\n[Enhancements]\nForceFiltering = False\nMaxAnisotropy = 0\nPostProcessingShader = \n[Stereoscopy]\nStereoMode = 0\nStereoDepth = 20\nStereoConvergencePercentage = 100\nStereoSwapEyes = False\n[Hacks]\nEFBAccessEnable = False\nBBoxEnable = False\nForceProgressive = True\nEFBToTextureEnable = True\nEFBScaledCopy = False\nEFBEmulateFormatChanges = False\n"
  },
  {
    "path": "packages/sx05re/emulators/dolphinSA/config/Logger.ini",
    "content": "[LogWindow]\nx = 400\ny = 600\npos = 2\n[Options]\nFont = 0\nWrapLines = False\n"
  },
  {
    "path": "packages/sx05re/emulators/dolphinSA/config/WiimoteNew.ini",
    "content": "[Wiimote1]\nDevice = evdev/0/Logitech Gamepad F310\nExtension = Classic\nSource = 1\nClassic/Buttons/A = `Button 1`\nClassic/Buttons/B = `Button 0`\nClassic/Buttons/X = `Button 3`\nClassic/Buttons/Y = `Button 2`\nClassic/Buttons/ZL = `Button 9`\nClassic/Buttons/ZR = `Button 10`\nClassic/Buttons/- = `Button 6`\nClassic/Buttons/+ = `Button 7`\nClassic/Buttons/Home = `Button 8`\nClassic/Left Stick/Up = `Axis 1-`\nClassic/Left Stick/Down = `Axis 1+`\nClassic/Left Stick/Left = `Axis 0-`\nClassic/Left Stick/Right = `Axis 0+`\nClassic/Right Stick/Up = `Axis 4-`\nClassic/Right Stick/Down = `Axis 4+`\nClassic/Right Stick/Left = `Axis 3-`\nClassic/Right Stick/Right = `Axis 3+`\nClassic/Triggers/L = `Button 4`\nClassic/Triggers/R = `Button 5`\nClassic/Triggers/L-Analog = `Axis 2-+`\nClassic/Triggers/R-Analog = `Axis 5-+`\nClassic/D-Pad/Up = `Axis 7-`\nClassic/D-Pad/Down = `Axis 7+`\nClassic/D-Pad/Left = `Axis 6-`\nClassic/D-Pad/Right = `Axis 6+`\n[Wiimote2]\nSource = 0\n[Wiimote3]\nSource = 0\n[Wiimote4]\nSource = 0\n[BalanceBoard]\nSource = 0\n"
  },
  {
    "path": "packages/sx05re/emulators/dolphinSA/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"dolphinSA\"\nPKG_VERSION=\"3c4d4fcd09173ea070dc812ab5d64ca3a3af5f29\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/dolphin-emu/dolphin\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain qt-everywhere libevdev\"\nPKG_LONGDESC=\"Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements. \"\nPKG_BUILD_FLAGS=\"lto\"\n\n# Configure CMake for LTO with BFD linker\nPKG_CMAKE_OPTS_TARGET=\" -DENABLE_LTO=ON \\\n                        -DCMAKE_EXE_LINKER_FLAGS='-fuse-ld=bfd' \\\n                        -DCMAKE_SHARED_LINKER_FLAGS='-fuse-ld=bfd' \\\n                        -DDISTRIBUTOR='EmuELEC' \\\n                        -DBUILD_SHARED_LIBS=OFF \\\n                        -DTHREADS_PTHREAD_ARG=OFF \\\n                        -DENABLE_FBDEV=ON \\\n                        -DENABLE_EGL=ON \\\n                        -DENABLE_X11=OFF \\\n                        -DENABLE_NOGUI=ON \\\n                        -DUSE_DISCORD_PRESENCE=OFF \\\n                        -DENABLE_QT=OFF \\\n                        -DCMAKE_BUILD_TYPE=Release\"\n\nmakeinstall_target() {\nexport CXXFLAGS=\"`echo ${CXXFLAGS} | sed -e \"s|-O.|-O3|g\"`\"\nmkdir -p ${INSTALL}/usr/bin\ncp -rf ${PKG_BUILD}/.${TARGET_NAME}/Binaries/dolphin-emu-nogui ${INSTALL}/usr/bin\ncp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/dolphin-emu\ncp -rf ${PKG_BUILD}/Data/Sys/* ${INSTALL}/usr/config/emuelec/configs/dolphin-emu\ncp -rf ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/dolphin-emu\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/dolphinSA/patches/000-hotkeys.patch",
    "content": "diff --git a/Source/Core/Core/HW/GCPadEmu.cpp b/Source/Core/Core/HW/GCPadEmu.cpp\nindex fbbcbc630e..9dc3641bfc 100644\n--- a/Source/Core/Core/HW/GCPadEmu.cpp\n+++ b/Source/Core/Core/HW/GCPadEmu.cpp\n@@ -26,6 +26,7 @@ static const u16 button_bitmasks[] = {\n     PAD_BUTTON_Y,\n     PAD_TRIGGER_Z,\n     PAD_BUTTON_START,\n+    PAD_BUTTON_HOTKEY,\n     0  // MIC HAX\n };\n \n@@ -50,6 +51,9 @@ GCPad::GCPad(const unsigned int index) : m_index(index)\n   // i18n: The START/PAUSE button on GameCube controllers\n   m_buttons->AddInput(Translatability::Translate, START_BUTTON, _trans(\"START\"));\n \n+  // Hotkey Button\n+  m_buttons->AddInput(Translatability::Translate, HOTKEY_BUTTON, _trans(\"HOTKEY\"));\n+\n   // sticks\n   groups.emplace_back(m_main_stick = new ControllerEmu::OctagonAnalogStick(\n                           MAIN_STICK_GROUP, _trans(\"Control Stick\"), MAIN_STICK_GATE_RADIUS));\ndiff --git a/Source/Core/Core/HW/GCPadEmu.h b/Source/Core/Core/HW/GCPadEmu.h\nindex 2555ee05b1..c2230a606a 100644\n--- a/Source/Core/Core/HW/GCPadEmu.h\n+++ b/Source/Core/Core/HW/GCPadEmu.h\n@@ -68,6 +68,7 @@ public:\n   static constexpr const char* Y_BUTTON = \"Y\";\n   static constexpr const char* Z_BUTTON = \"Z\";\n   static constexpr const char* START_BUTTON = \"Start\";\n+  static constexpr const char* HOTKEY_BUTTON = \"Hotkey\";\n \n   // i18n: The left trigger button (labeled L on real controllers)\n   static constexpr const char* L_DIGITAL = _trans(\"L\");\ndiff --git a/Source/Core/DolphinNoGUI/PlatformFBDev.cpp b/Source/Core/DolphinNoGUI/PlatformFBDev.cpp\nindex 53312bfa08..c166c06c40 100644\n--- a/Source/Core/DolphinNoGUI/PlatformFBDev.cpp\n+++ b/Source/Core/DolphinNoGUI/PlatformFBDev.cpp\n@@ -11,6 +11,14 @@\n #include \"Core/State.h\"\n #include \"Core/System.h\"\n \n+#include \"Core/HW/GCPad.h\"\n+#include \"InputCommon/GCPadStatus.h\"\n+#include <fmt/format.h>\n+#include \"Core/Config/GraphicsSettings.h\"\n+#include \"Core/Config/MainSettings.h\"\n+#include \"VideoCommon/VideoConfig.h\"\n+#include \"VideoCommon/OnScreenDisplay.h\"\n+\n #include <climits>\n #include <cstdio>\n #include <thread>\n@@ -78,9 +85,111 @@ void PlatformFBDev::MainLoop()\n {\n   while (IsRunning())\n   {\n+\t\tstatic int hotkey = 0;\n+\t\tstatic int slot = 0;\n+\t\tstatic int fps = 0;\n+\t\tstatic int aspect = 0;\n+\t\tstatic int fforward = 0;\n+\t\tstatic int ires = 0;\n+\n     UpdateRunningFlag();\n     Core::HostDispatchJobs(Core::System::GetInstance());\n \n+\t\tif(Pad::IsInitialized()) {\n+\t\t  GCPadStatus x = Pad::GetStatus(0);\n+\n+\t\t  if( (x.button & PAD_BUTTON_HOTKEY) == PAD_BUTTON_HOTKEY) { // hotkey pressed\n+\t\t   if(hotkey == 1) {\n+\t\t     hotkey = 2;\n+\t\t   }\n+\t\t  } else {\n+\t\t   hotkey = 1; // assure hotkey is released between actions\n+\t\t  }\n+\n+\t\t  if(hotkey == 2) { // hotkey pressed\n+\t\t   if( (x.button & PAD_BUTTON_START) == PAD_BUTTON_START) {\n+\t\t     RequestShutdown();\n+\t\t     hotkey = 0;\n+\t\t   }\n+\n+\t\t   if( (x.button & PAD_TRIGGER_L) == PAD_TRIGGER_L) {\n+\t\t     State::Load(Core::System::GetInstance(), slot);\n+\t\t     hotkey = 0;\n+\t\t   }\n+\t\t   if( (x.button & PAD_TRIGGER_R) == PAD_TRIGGER_R) {\n+\t\t     State::Save(Core::System::GetInstance(), slot);\n+\t\t     hotkey = 0;\n+\t\t   }\n+\t\t   if( (x.button & PAD_BUTTON_DOWN) == PAD_BUTTON_DOWN) {\n+\t\t     if(slot > 0) slot--;\n+\t\t     Core::DisplayMessage(fmt::format(\"Slot {} selected\", slot), 4000);\n+\t\t     hotkey = 0;\n+\t\t   }\n+\t\t   if( (x.button & PAD_BUTTON_UP) == PAD_BUTTON_UP) {\n+\t\t     if(slot < 10) slot++;\n+\t\t     Core::DisplayMessage(fmt::format(\"Slot {} selected\", slot), 4000);\n+\t\t     hotkey = 0;\n+\t\t   }\n+\t\t   if( (x.button & PAD_BUTTON_A) == PAD_BUTTON_A) {\n+\t\t     Core::SaveScreenShot();\n+\t\t     hotkey = 0;\n+\t\t   }\n+\t\t   if( (x.button & PAD_BUTTON_Y) == PAD_BUTTON_Y) {\n+\t\t     if(fps == 0) {\n+\t\t       Config::SetCurrent(Config::GFX_SHOW_FPS, true);\n+\t\t       fps = 1;\n+\t\t     } else {\n+\t\t       Config::SetCurrent(Config::GFX_SHOW_FPS, false);\n+\t\t       fps = 0;\n+\t\t     }\n+\t\t     hotkey = 0;\n+\t\t   }\n+\t\t   if( (x.button & PAD_BUTTON_X) == PAD_BUTTON_X) {\n+\t\t     if(aspect == 0) {\n+\t\t       Config::SetCurrent(Config::GFX_ASPECT_RATIO, AspectMode::Stretch);\n+\t\t       aspect = 1;\n+\t\t     } else {\n+\t\t       Config::SetCurrent(Config::GFX_ASPECT_RATIO, AspectMode::Auto);\n+\t\t       aspect = 0;\n+\t\t     }\n+\t\t     hotkey = 0;\n+\t\t   }\n+\t\t   if( (x.button & PAD_BUTTON_B) == PAD_BUTTON_B) {\n+\t\t     if(ires == 2) {\n+\t\t       Config::SetCurrent(Config::GFX_EFB_SCALE, 4);\n+\t\t       OSD::AddMessage(\"Internal Resolution: 720P\");\n+\t\t       ires = 4;\n+\t\t     }\n+\t\t     else if(ires == 4) {\n+\t\t       Config::SetCurrent(Config::GFX_EFB_SCALE, 6);\n+\t\t       OSD::AddMessage(\"Internal Resolution: 1080P\");\n+\t\t       ires = 6;\n+\t\t     } else {\n+\t\t       Config::SetCurrent(Config::GFX_EFB_SCALE, 2);\n+\t\t       OSD::AddMessage(\"Internal Resolution: 480P\");\n+\t\t       ires = 2;\n+\t\t     }\n+\t\t     hotkey = 0;\n+\t\t   }\n+\t\t   if( (x.button & PAD_TRIGGER_Z) == PAD_TRIGGER_Z) {\n+\t\t    if(fforward == 0) {\n+\t\t      auto speed = Config::Get(Config::MAIN_EMULATION_SPEED) + 1.0;\n+\t\t      speed = (speed >= 0.95 && speed <= 1.05) ? 1.0 : speed;\n+\t\t      Config::SetCurrent(Config::MAIN_EMULATION_SPEED, speed);\n+\t\t      OSD::AddMessage(\"Fast Forward: ON\");\n+\t\t      fforward = 1;\n+\t\t    } else {\n+\t\t      auto speed = Config::Get(Config::MAIN_EMULATION_SPEED) - 1.0;\n+\t\t      speed = (speed <= 0 || (speed >= 0.95 && speed <= 1.05)) ? 1.0 : speed;\n+\t\t      Config::SetCurrent(Config::MAIN_EMULATION_SPEED, speed);\n+\t\t      OSD::AddMessage(\"Fast Forward: OFF\");\n+\t\t      fforward = 0;\n+\t\t    }\n+\t\t    hotkey = 0;\n+\t\t\t }\n+\t\t }\n+\t\t}\n+\n     // TODO: Is this sleep appropriate?\n     std::this_thread::sleep_for(std::chrono::milliseconds(1));\n   }\ndiff --git a/Source/Core/InputCommon/GCPadStatus.h b/Source/Core/InputCommon/GCPadStatus.h\nindex 74849e5594..029ade5824 100644\n--- a/Source/Core/InputCommon/GCPadStatus.h\n+++ b/Source/Core/InputCommon/GCPadStatus.h\n@@ -26,6 +26,7 @@ enum PadButton\n   PAD_BUTTON_X = 0x0400,\n   PAD_BUTTON_Y = 0x0800,\n   PAD_BUTTON_START = 0x1000,\n+  PAD_BUTTON_HOTKEY = 0x2000,\n };\n \n struct GCPadStatus"
  },
  {
    "path": "packages/sx05re/emulators/dolphinSA/patches/001-padorder.patch",
    "content": "diff --git a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp\nindex 6df37b4..64ade4a 100644\n--- a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp\n+++ b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp\n@@ -392,6 +392,65 @@ void Init()\n   StartHotplugThread();\n }\n \n+struct joypad_udev_entry\n+{\n+   const char *devnode;\n+   struct udev_device *dev;\n+};\n+\n+int isNumber(const char *s) {\n+  int n;\n+\n+  if(strlen(s) == 0) {\n+    return 0;\n+  }\n+\n+  for(n=0; n<strlen(s); n++) {\n+    if(!(s[n] == '0' || s[n] == '1' || s[n] == '2' || s[n] == '3' || s[n] == '4' ||\n+\t s[n] == '5' || s[n] == '6' || s[n] == '7' || s[n] == '8' || s[n] == '9'))\n+      return 0;\n+  }\n+  return 1;\n+}\n+\n+// compare /dev/input/eventX and /dev/input/eventY where X and Y are numbers\n+int strcmp_events(const char* x, const char* y) {\n+\n+  // find a common string\n+  int n, common, is_number;\n+  int a, b;\n+\n+  n=0;\n+  while(x[n] == y[n] && x[n] != '\\0' && y[n] != '\\0') {\n+    n++;\n+  }\n+  common = n;\n+\n+  // check if remaining string is a number\n+  is_number = 1;\n+  if(isNumber(x+common) == 0) is_number = 0;\n+  if(isNumber(y+common) == 0) is_number = 0;\n+\n+  if(is_number == 1) {\n+    a = atoi(x+common);\n+    b = atoi(y+common);\n+\n+    if(a == b) return  0;\n+    if(a < b)  return -1;\n+    return 1;\n+  } else {\n+    return strcmp(x, y);\n+  }\n+}\n+\n+/* Used for sorting devnodes to appear in the correct order */\n+static int sort_devnodes(const void *a, const void *b)\n+{\n+  const struct joypad_udev_entry *aa = (const struct joypad_udev_entry *) a;\n+  const struct joypad_udev_entry *bb = (const struct joypad_udev_entry *) b;\n+   return strcmp_events(aa->devnode, bb->devnode);\n+}\n+\n // Only call this when ControllerInterface::m_devices_population_mutex is locked\n void PopulateDevices()\n {\n@@ -404,6 +463,10 @@ void PopulateDevices()\n   // We use udev to iterate over all /dev/input/event* devices.\n   // Note: the Linux kernel is currently limited to just 32 event devices. If\n   // this ever changes, hopefully udev will take care of this.\n+  unsigned sorted_count = 0;\n+  struct joypad_udev_entry sorted[64];\n+  const char* devnode;\n+  int i;\n \n   udev* const udev = udev_new();\n   ASSERT_MSG(CONTROLLERINTERFACE, udev != nullptr, \"Couldn't initialize libudev.\");\n@@ -422,11 +485,25 @@ void PopulateDevices()\n \n     udev_device* dev = udev_device_new_from_syspath(udev, path);\n \n-    if (const char* devnode = udev_device_get_devnode(dev))\n-      AddDeviceNode(devnode);\n-\n-    udev_device_unref(dev);\n+    devnode = udev_device_get_devnode(dev);\n+    if (devnode != NULL && sorted_count < 64) {\n+      sorted[sorted_count].devnode = devnode;\n+      sorted[sorted_count].dev     = dev;\n+      sorted_count++;\n+    } else {\n+      udev_device_unref(dev);\n+    }\n   }\n+\n+  /* Sort the udev entries by devnode name so that they are\n+   * created in the proper order */\n+   qsort(sorted, sorted_count, sizeof(struct joypad_udev_entry), sort_devnodes);\n+\n+   for (i = 0; i < sorted_count; i++) {\n+     AddDeviceNode(sorted[i].devnode);\n+     udev_device_unref(sorted[i].dev);\n+   }\n+\n   udev_enumerate_unref(enumerate);\n   udev_unref(udev);\n }\n"
  },
  {
    "path": "packages/sx05re/emulators/dolphinSA/patches/002-savestat-names.patch",
    "content": "diff --git a/Source/Core/Core/BootManager.cpp b/Source/Core/Core/BootManager.cpp\nindex 52a3ec910f..fb18a04835 100644\n--- a/Source/Core/Core/BootManager.cpp\n+++ b/Source/Core/Core/BootManager.cpp\n@@ -66,6 +66,11 @@ bool BootCore(Core::System& system, std::unique_ptr<BootParameters> boot,\n   if (!StartUp.SetPathsAndGameMetadata(system, *boot))\n     return false;\n \n+  if (std::holds_alternative<BootParameters::Disc>(boot->parameters))\n+  {\n+    StartUp.SetBaseSaveState(PathToFileName(std::get<BootParameters::Disc>(boot->parameters).path));\n+  }\n+\n   // Movie settings\n   auto& movie = system.GetMovie();\n   if (movie.IsPlayingInput() && movie.IsConfigSaved())\ndiff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp\nindex a284cbe266..cec815e678 100644\n--- a/Source/Core/Core/ConfigManager.cpp\n+++ b/Source/Core/Core/ConfigManager.cpp\n@@ -142,6 +142,10 @@ void SConfig::SetRunningGameMetadata(const std::string& game_id)\n   SetRunningGameMetadata(game_id, \"\", 0, 0, DiscIO::Region::Unknown);\n }\n \n+void SConfig::SetBaseSaveState(const std::string& base_save_state) {\n+  m_base_save_state = base_save_state;\n+}\n+\n void SConfig::SetRunningGameMetadata(const std::string& game_id, const std::string& gametdb_id,\n                                      u64 title_id, u16 revision, DiscIO::Region region)\n {\ndiff --git a/Source/Core/Core/ConfigManager.h b/Source/Core/Core/ConfigManager.h\nindex 999cc9f86c..dd649a037a 100644\n--- a/Source/Core/Core/ConfigManager.h\n+++ b/Source/Core/Core/ConfigManager.h\n@@ -61,6 +61,8 @@ struct SConfig\n   // TODO: remove this as soon as the ticket view hack in IOS/ES/Views is dropped.\n   bool m_disc_booted_from_game_list = false;\n \n+  const std::string& GetBaseSaveState() const { return m_base_save_state; }\n+  void SetBaseSaveState(const std::string& base_save_state);\n   const std::string& GetGameID() const { return m_game_id; }\n   const std::string& GetGameTDBID() const { return m_gametdb_id; }\n   const std::string& GetTitleName() const { return m_title_name; }\n@@ -115,6 +117,7 @@ private:\n \n   static SConfig* m_Instance;\n \n+  std::string m_base_save_state;\n   std::string m_game_id;\n   std::string m_gametdb_id;\n   std::string m_title_name;\ndiff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp\nindex fe20d74ea4..4094351533 100644\n--- a/Source/Core/Core/State.cpp\n+++ b/Source/Core/Core/State.cpp\n@@ -293,7 +293,38 @@ static std::string SystemTimeAsDoubleToString(double time)\n   return fmt::format(std::locale{\"\"}, \"{:%x %X}\", *local_time);\n }\n \n-static std::string MakeStateFilename(int number);\n+static std::string MakeStateFilename_partdirectory(int number)\n+{\n+  return File::GetUserPath(D_STATESAVES_IDX);\n+}\n+\n+static std::string MakeStateFilename_partfileID(int number)\n+{\n+  return fmt::format(\"{}.s{:02d}\", SConfig::GetInstance().GetGameID(), number);\n+}\n+\n+static std::string MakeStateFilename_partfileName(int number)\n+{\n+  std::string basesavestate = SConfig::GetInstance().GetBaseSaveState();\n+  if(basesavestate == \"\") return \"\";\n+  return fmt::format(\"{}.s{:02d}\", basesavestate, number);\n+}\n+\n+static std::string MakeStateFilename(bool useId, int number)\n+{\n+  // if the useId flag is set : if the file with name exits, returns it, otherwise, if the file with id exists, returns it, otherwise, return the file with name\n+  // => priority with the file with name.\n+  // if the game is not loaded from a file (disk), use the gameId\n+  std::string filePartName = MakeStateFilename_partfileName(number);\n+  std::string fileWithName = fmt::format(\"{}{}\", MakeStateFilename_partdirectory(number), filePartName);\n+  if (File::Exists(fileWithName) && filePartName != \"\")\n+    return fileWithName;\n+  std::string fileWithId = fmt::format(\"{}{}\", MakeStateFilename_partdirectory(number), MakeStateFilename_partfileID(number));\n+  if (File::Exists(fileWithId) && useId)\n+    return fileWithId;\n+  if(filePartName == \"\") return fileWithId;\n+  return fileWithName;\n+}\n \n static std::vector<SlotWithTimestamp> GetUsedSlotsWithTimestamp()\n {\n@@ -301,7 +332,7 @@ static std::vector<SlotWithTimestamp> GetUsedSlotsWithTimestamp()\n   StateHeader header;\n   for (int i = 1; i <= (int)NUM_STATES; i++)\n   {\n-    std::string filename = MakeStateFilename(i);\n+    std::string filename = MakeStateFilename(true, i);\n     if (File::Exists(filename))\n     {\n       if (ReadHeader(filename, header))\n@@ -645,7 +676,7 @@ bool ReadHeader(const std::string& filename, StateHeader& header)\n \n std::string GetInfoStringOfSlot(int slot, bool translate)\n {\n-  std::string filename = MakeStateFilename(slot);\n+  std::string filename = MakeStateFilename(true, slot);\n   if (!File::Exists(filename))\n     return translate ? Common::GetStringT(\"Empty\") : \"Empty\";\n \n@@ -659,7 +690,7 @@ std::string GetInfoStringOfSlot(int slot, bool translate)\n u64 GetUnixTimeOfSlot(int slot)\n {\n   State::StateHeader header;\n-  if (!ReadHeader(MakeStateFilename(slot), header))\n+  if (!ReadHeader(MakeStateFilename(true, slot), header))\n     return 0;\n \n   constexpr u64 MS_PER_SEC = 1000;\n@@ -977,12 +1008,13 @@ static std::string MakeStateFilename(int number)\n \n void Save(Core::System& system, int slot, bool wait)\n {\n-  SaveAs(system, MakeStateFilename(slot), wait);\n+\tstd::string savePath = MakeStateFilename(false, slot);\n+\tSaveAs(system, savePath, wait);\t\n }\n \n void Load(Core::System& system, int slot)\n {\n-  LoadAs(system, MakeStateFilename(slot));\n+\tLoadAs(system, MakeStateFilename(true, slot));\n }\n \n void LoadLastSaved(Core::System& system, int i)"
  },
  {
    "path": "packages/sx05re/emulators/dolphinSA/scripts/dolphin.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n. /etc/profile\n\nCONFIG_DIR=\"/storage/.local/share/dolphin-emu\"\n\nif [ -d \"${CONFIG_DIR}\" ]; then\n\trm -rf \"${CONFIG_DIR}\"\nfi\n\nmkdir -p /storage/.local/share/\n\nif [ ! -L \"${CONFIG_DIR}\" ]; then\n ln -sf \"/emuelec/configs/dolphin-emu\" \"${CONFIG_DIR}\"\nfi\n\nmkdir -p /storage/roms/dolphin/dolphin-emu/StateSaves\n\nAUTOGP=$(get_ee_setting dolphin_auto_gamepad)\nif [[ \"${AUTOGP}\" != \"0\" ]]; then\n\tset_dolphin_joy.sh\nfi\n\nfbfix $( emuelec-utils getmainfb )\nXDG_CONFIG_HOME=/emuelec/configs XDG_DATA_HOME=/storage/roms/dolphin /usr/bin/dolphin-emu-nogui -p fbdev \"${1}\"\n"
  },
  {
    "path": "packages/sx05re/emulators/dolphinSA/scripts/set_dolphin_joy.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# Configure ADVMAME players based on ES settings\nCONFIG_DIR=\"/storage/.config/emuelec/configs/dolphin-emu\"\nCONFIG=${CONFIG_DIR}/GCPadNew.ini\nWII_CONFIG=${CONFIG_DIR}/WiimoteNew.ini\nMAIN_CONFIG=${CONFIG_DIR}/Dolphin.ini\nCONFIG_TMP=/tmp/jc/GCPadNew.tmp\nWII_CONFIG_TMP=/tmp/jc/WiimoteNew.tmp\n\nsource joy_common.sh \"dolphin\"\n\nBTN_H0=$(get_ee_setting dolphin_btn_h0)\n[[ -z \"${BTN_H0}\" ]] && BTN_H0=6\n\nH0_AXIS1=$(( BTN_H0+0 ))\nH0_AXIS2=$(( BTN_H0+1 ))\n\ndeclare -A GC_DOLPHIN_VALUES=(\n[h0.1]=\"Hat 0 N\"\n[h0.4]=\"Hat 0 S\"\n[h0.8]=\"Hat 0 W\"\n[h0.2]=\"Hat 0 E\"\n[b0]=\"Button 0\"\n[b1]=\"Button 1\"\n[b2]=\"Button 2\"\n[b3]=\"Button 3\"\n[b4]=\"Button 4\"\n[b5]=\"Button 5\"\n[b6]=\"Button 6\"\n[b7]=\"Button 7\"\n[b8]=\"Button 8\"\n[b9]=\"Button 9\"\n[b10]=\"Button 10\"\n[b11]=\"Button 11\"\n[b12]=\"Button 12\"\n[b13]=\"Button 13\"\n[b14]=\"Button 14\"\n[b15]=\"Button 15\"\n[b16]=\"Button 16\"\n)\n\ndeclare -A GC_DOLPHIN_BUTTONS=(\n  [dpleft]=\"D-Pad/Left\"\n  [dpright]=\"D-Pad/Right\"\n  [dpup]=\"D-Pad/Up\"\n  [dpdown]=\"D-Pad/Down\"\n  [x]=\"Buttons/Y\"\n  [y]=\"Buttons/X\"\n  [a]=\"Buttons/B\"\n  [b]=\"Buttons/A\"\n  [lefttrigger]=\"Triggers/L\"\n  [righttrigger]=\"Triggers/R\"\n  [start]=\"Buttons/Start\"\n  [rightshoulder]=\"Buttons/Z\"\n  [guide]=\"Buttons/Hotkey\"\n)\n\ndeclare -A WII_DOLPHIN_BUTTONS=(\n  [dpleft]=\"D-Pad/Left\"\n  [dpright]=\"D-Pad/Right\"\n  [dpup]=\"D-Pad/Up\"\n  [dpdown]=\"D-Pad/Down\"\n  [x]=\"Buttons/Y\"\n  [y]=\"Buttons/X\"\n  [a]=\"Buttons/B\"\n  [b]=\"Buttons/A\"\n  [leftshoulder]=\"Triggers/L\"\n  [rightshoulder]=\"Triggers/R\"\n  [back]=\"Buttons/-\"\n  [start]=\"Buttons/+\"\n  [lefttrigger]=\"Buttons/L-Analog\"\n  [righttrigger]=\"Buttons/R-Analog\"\n  [guide]=\"Buttons/Home\"\n  [leftstick]=\"Buttons/ZL\"\n  [rightstick]=\"Buttons/ZR\"\n)\n\nBTN_SWAP_XY=$(get_ee_setting dolphin_joy_swap_xy)\nif [[ \"${BTN_SWAP_XY}\" == \"1\" ]]; then\n  GC_DOLPHIN_BUTTONS[x]=\"Buttons/X\"\n  GC_DOLPHIN_BUTTONS[y]=\"Buttons/Y\"\nfi\nBTN_SWAP_AB=$(get_ee_setting dolphin_joy_swap_ab)\nif [[ \"${BTN_SWAP_AB}\" == \"1\" ]]; then\n  GC_DOLPHIN_BUTTONS[a]=\"Buttons/A\"\n  GC_DOLPHIN_BUTTONS[b]=\"Buttons/B\"\nfi\n\ndeclare -A WII_DOLPHIN_STICKS=(\n  [\"leftx,0\"]=\"Left Stick/Left\"\n  [\"leftx,1\"]=\"Left Stick/Right\"\n  [\"lefty,0\"]=\"Left Stick/Up\"\n  [\"lefty,1\"]=\"Left Stick/Down\"\n  [\"rightx,0\"]=\"Right Stick/Left\"\n  [\"rightx,1\"]=\"Right Stick/Right\"\n  [\"righty,0\"]=\"Right Stick/Up\"\n  [\"righty,1\"]=\"Right Stick/Down\"\n)\n\ndeclare -A GC_DOLPHIN_STICKS=(\n  [\"leftx,0\"]=\"Main Stick/Left\"\n  [\"leftx,1\"]=\"Main Stick/Right\"\n  [\"lefty,0\"]=\"Main Stick/Up\"\n  [\"lefty,1\"]=\"Main Stick/Down\"\n  [\"rightx,0\"]=\"C-Stick/Left\"\n  [\"rightx,1\"]=\"C-Stick/Right\"\n  [\"righty,0\"]=\"C-Stick/Up\"\n  [\"righty,1\"]=\"C-Stick/Down\"\n)\n\n# Declare an associative array to store ID counts\ndeclare -A id_counts=()\n\n# Function to add or increment an ID\nadd_or_increment_id() {\n    local id=$1\n\n    # Check if the ID already exists as a key in the associative array\n    if [[ -v id_counts[\"${id}\"] ]]; then\n        # If present, increment its value (count)\n        (( id_counts[\"${id}\"]++ ))\n    else\n        # If not present, add it to the array and set the count to 1\n        id_counts[\"$id\"]=0\n    fi\n}\n\n# Cleans all the inputs for the gamepad with name ${GAMEPAD} and player ${1}\nclean_pad() {\n\n  declare -a params=(\".*Stick\\/Modifier\\/Range\" \".*Stick\\/Dead\\ Zone\")\n  jc_wipe_config_sub_heading \"${CONFIG}\" \"[GCPad${1}]\" \"${CONFIG_TMP}\" \"${params[@]}\"\n\n  jc_wipe_config_sub_heading \"${WII_CONFIG}\" \"[Wiimote${1}]\" \"${WII_CONFIG_TMP}\"\n  echo \"[Wiimote${1}]\" >> ${WII_CONFIG}\n  echo \"Source = 0\" >> ${WII_CONFIG}\n}\n\n# Sets pad depending on parameters.\n# ${1} = Player Number\n# ${2} = js[0-7]\n# ${3} = Device GUID\n# ${4} = Device Name\n\nset_pad() {\n  local DEVICE_GUID=${3}\n  local JOY_NAME=\"${4}\"\n\n  echo \"DEVICE_GUID=${DEVICE_GUID}\"\n\n  local GC_CONFIG=\"${5}\"\n  echo \"GC_CONFIG=${GC_CONFIG}\"\n  [[ -z ${GC_CONFIG} ]] && return\n\n  sed -i \"/\\[Wiimote${1}\\]/,+1 d\" ${WII_CONFIG}\n\n  local GC_MAP=$(echo ${GC_CONFIG} | cut -d',' -f3-)\n\n  echo \"[GCPad${1}]\" >> ${CONFIG}\n\n  add_or_increment_id \"${JOY_NAME}\"\n  local JOY_INDEX=${id_counts[${JOY_NAME}]}\n  echo \"Device = evdev/${JOY_INDEX}/${JOY_NAME}\" >> ${CONFIG}\n\n  echo \"[Wiimote${1}]\" >> ${WII_CONFIG}\n  echo \"Device = evdev/${JOY_INDEX}/${JOY_NAME}\" >> ${WII_CONFIG}\n  echo \"Extension = Classic\" >> ${WII_CONFIG}\n  echo \"Source = 1\" >> ${WII_CONFIG}\n\n  set -f\n  local GC_ARRAY=(${GC_MAP//,/ })\n  for index in \"${!GC_ARRAY[@]}\"\n  do\n      local REC=${GC_ARRAY[${index}]}\n      local BUTTON_INDEX=$(echo ${REC} | cut -d \":\" -f 1)\n      local TVAL=$(echo ${REC} | cut -d \":\" -f 2)\n      local BUTTON_VAL=${TVAL:1}\n      local BTN_TYPE=${TVAL:0:1}\n      local VAL=\"${GC_DOLPHIN_VALUES[${TVAL}]}\"\n\n      # CREATE BUTTON MAPS (inlcuding hats).\n      local GC_INDEX=\"${GC_DOLPHIN_BUTTONS[${BUTTON_INDEX}]}\"\n      if [[ ! -z \"${GC_INDEX}\" ]]; then\n        if [[ \"${BTN_TYPE}\" == \"b\"  || \"${BTN_TYPE}\" == \"h\" ]]; then\n          [[ ! -z \"${VAL}\" ]] && echo \"${GC_INDEX} = \\`${VAL}\\`\" >> ${CONFIG_TMP}\n        fi\n        if [[ \"${BTN_TYPE}\" == \"a\" ]]; then\n          echo \"${GC_INDEX} = \\`Axis ${BUTTON_VAL}+\\`\" >> ${CONFIG_TMP}\n        fi\n      fi\n\n      # Wii CREATE BUTTON MAPS (inlcuding hats).\n      local WII_INDEX=\"${WII_DOLPHIN_BUTTONS[${BUTTON_INDEX}]}\"\n      if [[ ! -z \"${WII_INDEX}\" ]]; then\n        if [[ \"${BTN_TYPE}\" == \"b\"  || \"${BTN_TYPE}\" == \"h\" ]]; then\n          [[ ! -z \"${VAL}\" ]] && echo \"Classic/${WII_INDEX} = \\`${VAL}\\`\" >> ${WII_CONFIG_TMP}\n        fi\n        if [[ \"${BTN_TYPE}\" == \"a\" ]]; then\n          echo \"Classic/${WII_INDEX} = \\`Axis ${BUTTON_VAL}-+\\`\" >> ${WII_CONFIG_TMP}\n        fi\n      fi\n\n      # Create Axis Maps\n      case ${BUTTON_INDEX} in\n        leftx|lefty|rightx|righty)\n          GC_INDEX=\"${GC_DOLPHIN_STICKS[${BUTTON_INDEX},0]}\"\n          echo \"${GC_INDEX} = \\`Axis ${BUTTON_VAL}-\\`\" >> ${CONFIG_TMP}\n          GC_INDEX=\"${GC_DOLPHIN_STICKS[${BUTTON_INDEX},1]}\"\n          echo \"${GC_INDEX} = \\`Axis ${BUTTON_VAL}+\\`\" >> ${CONFIG_TMP}\n          ;;\n      esac\n\n      # Wii Create Axis Maps\n      case ${BUTTON_INDEX} in\n        leftx|lefty|rightx|righty)\n          WII_INDEX=\"${WII_DOLPHIN_STICKS[${BUTTON_INDEX},0]}\"\n          echo \"Classic/${WII_INDEX} = \\`Axis ${BUTTON_VAL}-\\`\" >> ${WII_CONFIG_TMP}\n          WII_INDEX=\"${WII_DOLPHIN_STICKS[${BUTTON_INDEX},1]}\"\n          echo \"Classic/${WII_INDEX} = \\`Axis ${BUTTON_VAL}+\\`\" >> ${WII_CONFIG_TMP}\n          ;;\n      esac\n  done\n\n  local JOYSTICK=\"Main Stick\"\n  local GC_RECORD\n  GC_RECORD=$(cat ${CONFIG_TMP} | grep -E \"^${JOYSTICK}/Modifier *= *(.*)$\")\n  [[ -z \"${GC_RECORD}\" ]] && echo \"${JOYSTICK}/Modifier = Shift_L\" >> ${CONFIG_TMP}\n  GC_RECORD=$(cat ${CONFIG_TMP} | grep -E \"^${JOYSTICK}/Modifier/Range *= *(.*)$\")\n  [[ -z \"${GC_RECORD}\" ]] && echo \"${JOYSTICK}/Modifier/Range = 50.000000000000000\" >> ${CONFIG_TMP}\n  GC_RECORD=$(cat ${CONFIG_TMP} | grep -E \"^${JOYSTICK}/Dead Zone *= *(.*)$\")\n  [[ -z \"${GC_RECORD}\" ]] && echo \"${JOYSTICK}/Dead Zone = 25.000000000000000\" >> ${CONFIG_TMP}\n\n  JOYSTICK=\"C-Stick\"\n  GC_RECORD=$(cat ${CONFIG_TMP} | grep -E \"^${JOYSTICK}/Modifier *= *(.*)$\")\n  [[ -z \"${GC_RECORD}\" ]] && echo \"${JOYSTICK}/Modifier = Control_L\" >> ${CONFIG_TMP}\n  GC_RECORD=$(cat ${CONFIG_TMP} | grep -E \"^${JOYSTICK}/Modifier/Range *= *(.*)$\")\n  [[ -z \"${GC_RECORD}\" ]] && echo \"${JOYSTICK}/Modifier/Range = 50.000000000000000\" >> ${CONFIG_TMP}\n  GC_RECORD=$(cat ${CONFIG_TMP} | grep -E \"^${JOYSTICK}/Dead Zone *= *(.*)$\")\n  [[ -z \"${GC_RECORD}\" ]] && echo \"${JOYSTICK}/Dead Zone = 25.000000000000000\" >> ${CONFIG_TMP}\n\n  cat \"${CONFIG_TMP}\" | sort >> ${CONFIG}\n\n  RUMBLE=$(get_ee_setting ee_rumble_strength)\n  [[ -z \"${RUMBLE}\" ]] && RUMBLE=0\n  echo \"Rumble/Motor = `Strong`|`Weak`\" >> ${CONFIG}\n  echo \"Rumble/Motor/Range = ${RUMBLE}\" >> ${CONFIG}\n\n  rm \"${CONFIG_TMP}\"\n\n  cat \"${WII_CONFIG_TMP}\" | sort >> ${WII_CONFIG}\n  echo \"Rumble/Motor = `Strong`|`Weak`\" >> ${WII_CONFIG}\n  echo \"Rumble/Motor/Range = ${RUMBLE}\" >> ${WII_CONFIG}\n\n  rm \"${WII_CONFIG_TMP}\"\n}\n\ninit_config() {\n  local SIDevices=$( cat \"${MAIN_CONFIG}\" | grep -E \"^SIDevice[0-9] *= *[^6]$\")\n  [[ -z \"${SIDevices}\" ]] && return\n\n  declare -i LN=$( cat \"${MAIN_CONFIG}\" | grep -n -E \"SIDevice[0-9] *= *[0-9]\" | cut -d: -f1 | head -1 )\n  [[ \"${LN}\" == \"0\" ]] && LN=$( cat \"${MAIN_CONFIG}\" | grep -n \"\\[Core\\]\" | cut -d: -f1 | head -1 )\n  if [ ${LN} -ne 0 ]; then\n    sed -i '/SIDevice[0-9] *\\= *[0-9]/d' \"${MAIN_CONFIG}\"\n    sed -i \"${LN} i SIDevice0=6\\nSIDevice1=6\\nSIDevice2=6\\nSIDevice3=6\" \"${MAIN_CONFIG}\"\n  fi\n}\n\ninit_config\n\njc_get_players\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-sdl2/config/dosbox-SDL2-MT32.conf",
    "content": "# This is the configuration file for DOSBox SDL2. (Please use the latest version of DOSBox)\n# Lines starting with a # are comment lines and are ignored by DOSBox.\n# They are used to (briefly) document the effect of each option.\n\n[sdl]\n#       fullscreen: Start dosbox directly in fullscreen. (Press ALT-Enter to go back)\n#            vsync: Sync to Vblank IF supported by the output device and renderer (if relevant).\n#                   It can reduce screen flickering, but it can also result in a slow DOSBox.\n#   fullresolution: What resolution to use for fullscreen: original, desktop or a fixed size (e.g. 1024x768).\n#                     Using your monitor's native resolution with aspect=true might give the best results.\n#                     If you end up with small window on a large screen, try an output different from surface.\n# windowresolution: Scale the window to this size IF the output device supports hardware scaling.\n#                     (output=surface does not!)\n#           output: What video system to use for output.\n#                   Possible values: surface, texture, texturenb, opengl, openglnb.\n#        gl.shader: What set of GLSL shaders to use with an OpenGL output. Keep empty if this is not desired.\n#                     Note that in case it is used, the respective shader files must be found in the \"shaders\" subdirectory\n#                     relatively to where the default DOSBox configuration fiel is stored. For shader file naming convention,\n#                     suppose that you have a pair of shader files ready: mysample.vert and mysample.frag.\n#                     Then shader=mysample should be set.\n#                   \n# texture.renderer: Choose a renderer driver if output=texture or output=texturenb. Use output=auto for an automatic choice.\n#                   Possible values: auto, opengl, software.\n#         autolock: Mouse will automatically lock, if you click on the screen. (Press CTRL-F10 to unlock)\n#      sensitivity: Mouse sensitivity.\n#      waitonerror: Wait before closing the console if dosbox has an error.\n#         priority: Priority levels for dosbox. Second entry behind the comma is for when dosbox is not focused/minimized.\n#                     pause is only valid for the second entry.\n#                   Possible values: lowest, lower, normal, higher, highest, pause.\n#       mapperfile: File used to load/save the key/event mappings from. Resetmapper only works with the default value.\n\nfullscreen=true\n# Note that VSYNC is be very demanding\nvsync=false\nfullresolution=0x0\nwindowresolution=original\noutput=texture\n# Place shaders in /storage/.config/dosbox/shaders\ngl.shader=crt-easymode\ntexture.renderer=auto\nautolock=true\nsensitivity=100\nwaitonerror=true\npriority=highest,highest\n# Input mapper file is looked for in the same directory as the specified conf\nmapperfile=example.map\n\n[dosbox]\n# language: Select another language file.\n#  machine: The type of machine DOSBox tries to emulate.\n#           Possible values: hercules, cga, tandy, pcjr, ega, vgaonly, svga_s3, svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe.\n# captures: Directory where things like wave, midi, screenshot get captured.\n#  memsize: Amount of memory DOSBox has in megabytes.\n#             This value is best left at its default to avoid problems with some games,\n#             though few games might require a higher value.\n#             There is generally no speed advantage when raising this value.\n\nlanguage=\nmachine=svga_s3\ncaptures=capture\nmemsize=16\n\n[render]\n# frameskip: How many frames DOSBox skips before drawing one.\n#    aspect: Do aspect correction, if your output method doesn't support scaling this can slow things down!.\n#    scaler: Scaler used to enlarge/enhance low resolution modes. If 'forced' is appended,\n#            then the scaler will be used even if the result might not be desired.\n#            Possible values: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, hq2x, hq3x, 2xsai, super2xsai, supereagle, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x.\n\nframeskip=0\naspect=true\nscaler=none\n\n[cpu]\n#      core: CPU Core used in emulation. auto will switch to dynamic if available and\n#            appropriate.\n#            Possible values: auto, dynamic, normal, simple.\n#   cputype: CPU Type used in emulation. auto is the fastest choice.\n#            Possible values: auto, 386, 386_slow, 486_slow, pentium_slow, 386_prefetch.\n#    cycles: Amount of instructions DOSBox tries to emulate each millisecond.\n#            Setting this value too high results in sound dropouts and lags.\n#            Cycles can be set in 3 ways:\n#              'auto'          tries to guess what a game needs.\n#                              It usually works, but can fail for certain games.\n#              'fixed #number' will set a fixed amount of cycles. This is what you usually\n#                              need if 'auto' fails (Example: fixed 4000).\n#              'max'           will allocate as much cycles as your computer is able to\n#                              handle.\n#            Possible values: auto, fixed, max.\n#   cycleup: Amount of cycles to decrease/increase with keycombos.(CTRL-F11/CTRL-F12)\n# cycledown: Setting it lower than 100 will be a percentage.\n\ncore=auto\ncputype=auto\ncycles=auto\ncycleup=10\ncycledown=20\n\n[mixer]\n#   nosound: Enable silent mode, sound is still emulated though.\n#      rate: Mixer sample rate, setting any device's rate higher than this will probably lower their sound quality.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n# blocksize: Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged.\n#            Possible values: 1024, 2048, 4096, 8192, 512, 256.\n# prebuffer: How many milliseconds of data to keep on top of the blocksize.\n\nnosound=false\nrate=44100\nblocksize=1024\nprebuffer=20\n\n[midi]\n#              mpu401: Type of MPU-401 to emulate.\n#                      Possible values: intelligent, uart, none.\n#          mididevice: Device that will receive the MIDI data from MPU-401.\n#                      Possible values: default, win32, alsa, oss, coreaudio, coremidi, mt32, none.\n#          midiconfig: Special configuration options for the device driver. This is usually the id of the device you want to use.\n#                        or in the case of coreaudio, you can specify a soundfont here.\n#                        When using a Roland MT-32 rev. 0 as midi output device, some games may require a delay in order to prevent 'buffer overflow' issues.\n#                        In that case, add 'delaysysex', for example: midiconfig=2 delaysysex\n#                        See the README/Manual for more details.\n#         mt32.romdir: Name of the directory where MT-32 Control and PCM ROM files can be found. Emulation requires these files to work.\n#                        Accepted file names are as follows:\n#                          MT32_CONTROL.ROM or CM32L_CONTROL.ROM - control ROM file.\n#                          MT32_PCM.ROM or CM32L_PCM.ROM - PCM ROM file.\n# mt32.reverse.stereo: Reverse stereo channels for MT-32 output\n#        mt32.verbose: MT-32 debug logging\n#         mt32.thread: MT-32 rendering in separate thread\n#          mt32.chunk: Minimum milliseconds of data to render at once.\n#                      Increasing this value reduces rendering overhead which may improve performance but also increases audio lag.\n#                      Valid for rendering in separate thread only.\n#                      Possible values: 2, 3, 16, 99, 100.\n#      mt32.prebuffer: How many milliseconds of data to render ahead.\n#                      Increasing this value may help to avoid underruns but also increases audio lag.\n#                      Cannot be set less than or equal to mt32.chunk value.\n#                      Valid for rendering in separate thread only.\n#                      Possible values: 3, 4, 32, 199, 200.\n#       mt32.partials: The maximum number of partials playing simultaneously.\n#                      Possible values: 8, 9, 32, 255, 256.\n#            mt32.dac: MT-32 DAC input emulation mode\n#                      Nice = 0 - default\n#                      Produces samples at double the volume, without tricks.\n#                      Higher quality than the real devices\n#                      \n#                      Pure = 1\n#                      Produces samples that exactly match the bits output from the emulated LA32.\n#                      Nicer overdrive characteristics than the DAC hacks (it simply clips samples within range)\n#                      Much less likely to overdrive than any other mode.\n#                      Half the volume of any of the other modes.\n#                      Perfect for developers while debugging :)\n#                      \n#                      GENERATION1 = 2\n#                      Re-orders the LA32 output bits as in early generation MT-32s (according to Wikipedia).\n#                      Bit order at DAC (where each number represents the original LA32 output bit number, and XX means the bit is always low):\n#                      15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 XX\n#                      \n#                      GENERATION2 = 3\n#                      Re-orders the LA32 output bits as in later generations (personally confirmed on my CM-32L - KG).\n#                      Bit order at DAC (where each number represents the original LA32 output bit number):\n#                      15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 14\n#                      Possible values: 0, 1, 2, 3.\n#         mt32.analog: MT-32 analogue output emulation mode\n#                      Digital = 0\n#                      Only digital path is emulated. The output samples correspond to the digital output signal appeared at the DAC entrance.\n#                      Fastest mode.\n#                      \n#                      Coarse = 1\n#                      Coarse emulation of LPF circuit. High frequencies are boosted, sample rate remains unchanged.\n#                      A bit better sounding but also a bit slower.\n#                      \n#                      Accurate = 2 - default\n#                      Finer emulation of LPF circuit. Output signal is upsampled to 48 kHz to allow emulation of audible mirror spectra above 16 kHz,\n#                      which is passed through the LPF circuit without significant attenuation.\n#                      Sounding is closer to the analog output from real hardware but also slower than the modes 0 and 1.\n#                      \n#                      Oversampled = 3\n#                      Same as the default mode 2 but the output signal is 2x oversampled, i.e. the output sample rate is 96 kHz.\n#                      Even slower than all the other modes but better retains highest frequencies while further resampled in DOSBox mixer.\n#                      Possible values: 0, 1, 2, 3.\n#    mt32.reverb.mode: MT-32 reverb mode\n#                      Possible values: 0, 1, 2, 3, auto.\n#    mt32.reverb.time: MT-32 reverb decaying time\n#                      Possible values: 0, 1, 2, 3, 4, 5, 6, 7.\n#   mt32.reverb.level: MT-32 reverb level\n#                      Possible values: 0, 1, 2, 3, 4, 5, 6, 7.\n\nmpu401=intelligent\nmididevice=mt32\nmidiconfig=\n# Place MT-32 roms here\nmt32.romdir=/storage/roms/bios\nmt32.reverse.stereo=false\nmt32.verbose=false\nmt32.thread=false\nmt32.chunk=16\nmt32.prebuffer=32\nmt32.partials=32\nmt32.dac=0\nmt32.analog=2\nmt32.reverb.mode=auto\nmt32.reverb.time=5\nmt32.reverb.level=3\n\n[sblaster]\n#  sbtype: Type of Soundblaster to emulate. gb is Gameblaster.\n#          Possible values: sb1, sb2, sbpro1, sbpro2, sb16, gb, none.\n#  sbbase: The IO address of the soundblaster.\n#          Possible values: 220, 240, 260, 280, 2a0, 2c0, 2e0, 300.\n#     irq: The IRQ number of the soundblaster.\n#          Possible values: 7, 5, 3, 9, 10, 11, 12.\n#     dma: The DMA number of the soundblaster.\n#          Possible values: 1, 5, 0, 3, 6, 7.\n#    hdma: The High DMA number of the soundblaster.\n#          Possible values: 1, 5, 0, 3, 6, 7.\n# sbmixer: Allow the soundblaster mixer to modify the DOSBox mixer.\n# oplmode: Type of OPL emulation. On 'auto' the mode is determined by sblaster type. All OPL modes are Adlib-compatible, except for 'cms'.\n#          Possible values: auto, cms, opl2, dualopl2, opl3, opl3gold, none.\n#  oplemu: Provider for the OPL emulation. compat might provide better quality (see oplrate as well).\n#          Possible values: default, compat, fast.\n# oplrate: Sample rate of OPL music emulation. Use 49716 for highest quality (set the mixer rate accordingly).\n#          Possible values: 44100, 49716, 48000, 32000, 22050, 16000, 11025, 8000.\n\nsbtype=sb16\nsbbase=220\nirq=7\ndma=1\nhdma=5\nsbmixer=true\noplmode=auto\noplemu=default\noplrate=44100\n\n[gus]\n#      gus: Enable the Gravis Ultrasound emulation.\n#  gusrate: Sample rate of Ultrasound emulation.\n#           Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#  gusbase: The IO base address of the Gravis Ultrasound.\n#           Possible values: 240, 220, 260, 280, 2a0, 2c0, 2e0, 300.\n#   gusirq: The IRQ number of the Gravis Ultrasound.\n#           Possible values: 5, 3, 7, 9, 10, 11, 12.\n#   gusdma: The DMA channel of the Gravis Ultrasound.\n#           Possible values: 3, 0, 1, 5, 6, 7.\n# ultradir: Path to Ultrasound directory. In this directory\n#           there should be a MIDI directory that contains\n#           the patch files for GUS playback. Patch sets used\n#           with Timidity should work fine.\n\ngus=true\ngusrate=44100\ngusbase=240\ngusirq=5\ngusdma=3\n# Place GUS files in /storage/roms/dos/ULTRASND\nultradir=C:\\ULTRASND\n\n[speaker]\n# pcspeaker: Enable PC-Speaker emulation.\n#    pcrate: Sample rate of the PC-Speaker sound generation.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#     tandy: Enable Tandy Sound System emulation. For 'auto', emulation is present only if machine is set to 'tandy'.\n#            Possible values: auto, on, off.\n# tandyrate: Sample rate of the Tandy 3-Voice generation.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#    disney: Enable Disney Sound Source emulation. (Covox Voice Master and Speech Thing compatible).\n\npcspeaker=true\npcrate=44100\ntandy=auto\ntandyrate=44100\ndisney=true\n\n[joystick]\n# joysticktype: Type of joystick to emulate: auto (default), none,\n#               2axis (supports two joysticks),\n#               4axis (supports one joystick, first joystick used),\n#               4axis_2 (supports one joystick, second joystick used),\n#               fcs (Thrustmaster), ch (CH Flightstick).\n#               none disables joystick emulation.\n#               auto chooses emulation depending on real joystick(s).\n#               (Remember to reset dosbox's mapperfile if you saved it earlier)\n#               Possible values: auto, 2axis, 4axis, 4axis_2, fcs, ch, none.\n#        timed: enable timed intervals for axis. Experiment with this option, if your joystick drifts (away).\n#     autofire: continuously fires as long as you keep the button pressed.\n#       swap34: swap the 3rd and the 4th axis. can be useful for certain joysticks.\n#   buttonwrap: enable button wrapping at the number of emulated buttons.\n\njoysticktype=fcs\ntimed=true\nautofire=false\nswap34=false\nbuttonwrap=false\n\n[serial]\n# serial1: set type of device connected to com port.\n#          Can be disabled, dummy, modem, nullmodem, directserial.\n#          Additional parameters must be in the same line in the form of\n#          parameter:value. Parameter for all types is irq (optional).\n#          for directserial: realport (required), rxdelay (optional).\n#                           (realport:COM1 realport:ttyS0).\n#          for modem: listenport (optional).\n#          for nullmodem: server, rxdelay, txdelay, telnet, usedtr,\n#                         transparent, port, inhsocket (all optional).\n#          Example: serial1=modem listenport:5000\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial2: see serial1\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial3: see serial1\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial4: see serial1\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n\nserial1=dummy\nserial2=dummy\nserial3=disabled\nserial4=disabled\n\n[dos]\n#            xms: Enable XMS support.\n#            ems: Enable EMS support. The default (=true) provides the best\n#                 compatibility but certain applications may run better with\n#                 other choices, or require EMS support to be disabled (=false)\n#                 to work at all.\n#                 Possible values: true, emsboard, emm386, false.\n#            umb: Enable UMB support.\n# keyboardlayout: Language code of the keyboard layout (or none).\n\nxms=true\nems=true\numb=true\nkeyboardlayout=auto\n\n[ipx]\n# ipx: Enable ipx over UDP/IP emulation.\n\nipx=false\n\n[autoexec]\n# Lines in this section will be run at startup.\n\nmount c /storage/roms/dos\nc:\ncd example\nexample.exe\n#exit\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-sdl2/config/dosbox-SDL2.conf",
    "content": "# This is the configuration file for DOSBox SDL2. (Please use the latest version of DOSBox)\n# Lines starting with a # are comment lines and are ignored by DOSBox.\n# They are used to (briefly) document the effect of each option.\n\n[sdl]\n#       fullscreen: Start dosbox directly in fullscreen. (Press ALT-Enter to go back)\n#            vsync: Sync to Vblank IF supported by the output device and renderer (if relevant).\n#                   It can reduce screen flickering, but it can also result in a slow DOSBox.\n#   fullresolution: What resolution to use for fullscreen: original, desktop or a fixed size (e.g. 1024x768).\n#                     Using your monitor's native resolution with aspect=true might give the best results.\n#                     If you end up with small window on a large screen, try an output different from surface.\n# windowresolution: Scale the window to this size IF the output device supports hardware scaling.\n#                     (output=surface does not!)\n#           output: What video system to use for output.\n#                   Possible values: surface, texture, texturenb, opengl, openglnb.\n#        gl.shader: What set of GLSL shaders to use with an OpenGL output. Keep empty if this is not desired.\n#                     Note that in case it is used, the respective shader files must be found in the \"shaders\" subdirectory\n#                     relatively to where the default DOSBox configuration fiel is stored. For shader file naming convention,\n#                     suppose that you have a pair of shader files ready: mysample.vert and mysample.frag.\n#                     Then shader=mysample should be set.\n#                   \n# texture.renderer: Choose a renderer driver if output=texture or output=texturenb. Use output=auto for an automatic choice.\n#                   Possible values: auto, opengl, software.\n#         autolock: Mouse will automatically lock, if you click on the screen. (Press CTRL-F10 to unlock)\n#      sensitivity: Mouse sensitivity.\n#      waitonerror: Wait before closing the console if dosbox has an error.\n#         priority: Priority levels for dosbox. Second entry behind the comma is for when dosbox is not focused/minimized.\n#                     pause is only valid for the second entry.\n#                   Possible values: lowest, lower, normal, higher, highest, pause.\n#       mapperfile: File used to load/save the key/event mappings from. Resetmapper only works with the default value.\n\nfullscreen=true\n# Note that VSYNC is be very demanding\nvsync=false\nfullresolution=0x0\nwindowresolution=original\noutput=texture\n# Place shaders in /storage/.config/dosbox/shaders\ngl.shader=crt-easymode\ntexture.renderer=auto\nautolock=true\nsensitivity=100\nwaitonerror=true\npriority=highest,highest\n# Input mapper file is looked for in the same directory as the specified conf\nmapperfile=example.map\n\n[dosbox]\n# language: Select another language file.\n#  machine: The type of machine DOSBox tries to emulate.\n#           Possible values: hercules, cga, tandy, pcjr, ega, vgaonly, svga_s3, svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe.\n# captures: Directory where things like wave, midi, screenshot get captured.\n#  memsize: Amount of memory DOSBox has in megabytes.\n#             This value is best left at its default to avoid problems with some games,\n#             though few games might require a higher value.\n#             There is generally no speed advantage when raising this value.\n\nlanguage=\nmachine=svga_s3\ncaptures=capture\nmemsize=16\n\n[render]\n# frameskip: How many frames DOSBox skips before drawing one.\n#    aspect: Do aspect correction, if your output method doesn't support scaling this can slow things down!.\n#    scaler: Scaler used to enlarge/enhance low resolution modes. If 'forced' is appended,\n#            then the scaler will be used even if the result might not be desired.\n#            Possible values: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, hq2x, hq3x, 2xsai, super2xsai, supereagle, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x.\n\nframeskip=0\naspect=true\nscaler=none\n\n[cpu]\n#      core: CPU Core used in emulation. auto will switch to dynamic if available and\n#            appropriate.\n#            Possible values: auto, dynamic, normal, simple.\n#   cputype: CPU Type used in emulation. auto is the fastest choice.\n#            Possible values: auto, 386, 386_slow, 486_slow, pentium_slow, 386_prefetch.\n#    cycles: Amount of instructions DOSBox tries to emulate each millisecond.\n#            Setting this value too high results in sound dropouts and lags.\n#            Cycles can be set in 3 ways:\n#              'auto'          tries to guess what a game needs.\n#                              It usually works, but can fail for certain games.\n#              'fixed #number' will set a fixed amount of cycles. This is what you usually\n#                              need if 'auto' fails (Example: fixed 4000).\n#              'max'           will allocate as much cycles as your computer is able to\n#                              handle.\n#            Possible values: auto, fixed, max.\n#   cycleup: Amount of cycles to decrease/increase with keycombos.(CTRL-F11/CTRL-F12)\n# cycledown: Setting it lower than 100 will be a percentage.\n\ncore=auto\ncputype=auto\ncycles=auto\ncycleup=10\ncycledown=20\n\n[mixer]\n#   nosound: Enable silent mode, sound is still emulated though.\n#      rate: Mixer sample rate, setting any device's rate higher than this will probably lower their sound quality.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n# blocksize: Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged.\n#            Possible values: 1024, 2048, 4096, 8192, 512, 256.\n# prebuffer: How many milliseconds of data to keep on top of the blocksize.\n\nnosound=false\nrate=44100\nblocksize=1024\nprebuffer=20\n\n[midi]\n#              mpu401: Type of MPU-401 to emulate.\n#                      Possible values: intelligent, uart, none.\n#          mididevice: Device that will receive the MIDI data from MPU-401.\n#                      Possible values: default, win32, alsa, oss, coreaudio, coremidi, mt32, none.\n#          midiconfig: Special configuration options for the device driver. This is usually the id of the device you want to use.\n#                        or in the case of coreaudio, you can specify a soundfont here.\n#                        When using a Roland MT-32 rev. 0 as midi output device, some games may require a delay in order to prevent 'buffer overflow' issues.\n#                        In that case, add 'delaysysex', for example: midiconfig=2 delaysysex\n#                        See the README/Manual for more details.\n#         mt32.romdir: Name of the directory where MT-32 Control and PCM ROM files can be found. Emulation requires these files to work.\n#                        Accepted file names are as follows:\n#                          MT32_CONTROL.ROM or CM32L_CONTROL.ROM - control ROM file.\n#                          MT32_PCM.ROM or CM32L_PCM.ROM - PCM ROM file.\n# mt32.reverse.stereo: Reverse stereo channels for MT-32 output\n#        mt32.verbose: MT-32 debug logging\n#         mt32.thread: MT-32 rendering in separate thread\n#          mt32.chunk: Minimum milliseconds of data to render at once.\n#                      Increasing this value reduces rendering overhead which may improve performance but also increases audio lag.\n#                      Valid for rendering in separate thread only.\n#                      Possible values: 2, 3, 16, 99, 100.\n#      mt32.prebuffer: How many milliseconds of data to render ahead.\n#                      Increasing this value may help to avoid underruns but also increases audio lag.\n#                      Cannot be set less than or equal to mt32.chunk value.\n#                      Valid for rendering in separate thread only.\n#                      Possible values: 3, 4, 32, 199, 200.\n#       mt32.partials: The maximum number of partials playing simultaneously.\n#                      Possible values: 8, 9, 32, 255, 256.\n#            mt32.dac: MT-32 DAC input emulation mode\n#                      Nice = 0 - default\n#                      Produces samples at double the volume, without tricks.\n#                      Higher quality than the real devices\n#                      \n#                      Pure = 1\n#                      Produces samples that exactly match the bits output from the emulated LA32.\n#                      Nicer overdrive characteristics than the DAC hacks (it simply clips samples within range)\n#                      Much less likely to overdrive than any other mode.\n#                      Half the volume of any of the other modes.\n#                      Perfect for developers while debugging :)\n#                      \n#                      GENERATION1 = 2\n#                      Re-orders the LA32 output bits as in early generation MT-32s (according to Wikipedia).\n#                      Bit order at DAC (where each number represents the original LA32 output bit number, and XX means the bit is always low):\n#                      15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 XX\n#                      \n#                      GENERATION2 = 3\n#                      Re-orders the LA32 output bits as in later generations (personally confirmed on my CM-32L - KG).\n#                      Bit order at DAC (where each number represents the original LA32 output bit number):\n#                      15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 14\n#                      Possible values: 0, 1, 2, 3.\n#         mt32.analog: MT-32 analogue output emulation mode\n#                      Digital = 0\n#                      Only digital path is emulated. The output samples correspond to the digital output signal appeared at the DAC entrance.\n#                      Fastest mode.\n#                      \n#                      Coarse = 1\n#                      Coarse emulation of LPF circuit. High frequencies are boosted, sample rate remains unchanged.\n#                      A bit better sounding but also a bit slower.\n#                      \n#                      Accurate = 2 - default\n#                      Finer emulation of LPF circuit. Output signal is upsampled to 48 kHz to allow emulation of audible mirror spectra above 16 kHz,\n#                      which is passed through the LPF circuit without significant attenuation.\n#                      Sounding is closer to the analog output from real hardware but also slower than the modes 0 and 1.\n#                      \n#                      Oversampled = 3\n#                      Same as the default mode 2 but the output signal is 2x oversampled, i.e. the output sample rate is 96 kHz.\n#                      Even slower than all the other modes but better retains highest frequencies while further resampled in DOSBox mixer.\n#                      Possible values: 0, 1, 2, 3.\n#    mt32.reverb.mode: MT-32 reverb mode\n#                      Possible values: 0, 1, 2, 3, auto.\n#    mt32.reverb.time: MT-32 reverb decaying time\n#                      Possible values: 0, 1, 2, 3, 4, 5, 6, 7.\n#   mt32.reverb.level: MT-32 reverb level\n#                      Possible values: 0, 1, 2, 3, 4, 5, 6, 7.\n\nmpu401=intelligent\n# FluidSynth Software Synthesizer\nmididevice=fluidsynth\nfluid.driver=pulseaudio\nfluid.soundfont=/usr/share/soundfonts/GeneralUser.sf2\n\n[sblaster]\n#  sbtype: Type of Soundblaster to emulate. gb is Gameblaster.\n#          Possible values: sb1, sb2, sbpro1, sbpro2, sb16, gb, none.\n#  sbbase: The IO address of the soundblaster.\n#          Possible values: 220, 240, 260, 280, 2a0, 2c0, 2e0, 300.\n#     irq: The IRQ number of the soundblaster.\n#          Possible values: 7, 5, 3, 9, 10, 11, 12.\n#     dma: The DMA number of the soundblaster.\n#          Possible values: 1, 5, 0, 3, 6, 7.\n#    hdma: The High DMA number of the soundblaster.\n#          Possible values: 1, 5, 0, 3, 6, 7.\n# sbmixer: Allow the soundblaster mixer to modify the DOSBox mixer.\n# oplmode: Type of OPL emulation. On 'auto' the mode is determined by sblaster type. All OPL modes are Adlib-compatible, except for 'cms'.\n#          Possible values: auto, cms, opl2, dualopl2, opl3, opl3gold, none.\n#  oplemu: Provider for the OPL emulation. compat might provide better quality (see oplrate as well).\n#          Possible values: default, compat, fast.\n# oplrate: Sample rate of OPL music emulation. Use 49716 for highest quality (set the mixer rate accordingly).\n#          Possible values: 44100, 49716, 48000, 32000, 22050, 16000, 11025, 8000.\n\nsbtype=sb16\nsbbase=220\nirq=7\ndma=1\nhdma=5\nsbmixer=true\noplmode=auto\noplemu=default\noplrate=44100\n\n[gus]\n#      gus: Enable the Gravis Ultrasound emulation.\n#  gusrate: Sample rate of Ultrasound emulation.\n#           Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#  gusbase: The IO base address of the Gravis Ultrasound.\n#           Possible values: 240, 220, 260, 280, 2a0, 2c0, 2e0, 300.\n#   gusirq: The IRQ number of the Gravis Ultrasound.\n#           Possible values: 5, 3, 7, 9, 10, 11, 12.\n#   gusdma: The DMA channel of the Gravis Ultrasound.\n#           Possible values: 3, 0, 1, 5, 6, 7.\n# ultradir: Path to Ultrasound directory. In this directory\n#           there should be a MIDI directory that contains\n#           the patch files for GUS playback. Patch sets used\n#           with Timidity should work fine.\n\ngus=true\ngusrate=44100\ngusbase=240\ngusirq=5\ngusdma=3\n# Place GUS files in /storage/roms/dos/ULTRASND\nultradir=C:\\ULTRASND\n\n[speaker]\n# pcspeaker: Enable PC-Speaker emulation.\n#    pcrate: Sample rate of the PC-Speaker sound generation.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#     tandy: Enable Tandy Sound System emulation. For 'auto', emulation is present only if machine is set to 'tandy'.\n#            Possible values: auto, on, off.\n# tandyrate: Sample rate of the Tandy 3-Voice generation.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#    disney: Enable Disney Sound Source emulation. (Covox Voice Master and Speech Thing compatible).\n\npcspeaker=true\npcrate=44100\ntandy=auto\ntandyrate=44100\ndisney=true\n\n[joystick]\n# joysticktype: Type of joystick to emulate: auto (default), none,\n#               2axis (supports two joysticks),\n#               4axis (supports one joystick, first joystick used),\n#               4axis_2 (supports one joystick, second joystick used),\n#               fcs (Thrustmaster), ch (CH Flightstick).\n#               none disables joystick emulation.\n#               auto chooses emulation depending on real joystick(s).\n#               (Remember to reset dosbox's mapperfile if you saved it earlier)\n#               Possible values: auto, 2axis, 4axis, 4axis_2, fcs, ch, none.\n#        timed: enable timed intervals for axis. Experiment with this option, if your joystick drifts (away).\n#     autofire: continuously fires as long as you keep the button pressed.\n#       swap34: swap the 3rd and the 4th axis. can be useful for certain joysticks.\n#   buttonwrap: enable button wrapping at the number of emulated buttons.\n\njoysticktype=fcs\ntimed=true\nautofire=false\nswap34=false\nbuttonwrap=false\n\n[serial]\n# serial1: set type of device connected to com port.\n#          Can be disabled, dummy, modem, nullmodem, directserial.\n#          Additional parameters must be in the same line in the form of\n#          parameter:value. Parameter for all types is irq (optional).\n#          for directserial: realport (required), rxdelay (optional).\n#                           (realport:COM1 realport:ttyS0).\n#          for modem: listenport (optional).\n#          for nullmodem: server, rxdelay, txdelay, telnet, usedtr,\n#                         transparent, port, inhsocket (all optional).\n#          Example: serial1=modem listenport:5000\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial2: see serial1\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial3: see serial1\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial4: see serial1\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n\nserial1=dummy\nserial2=dummy\nserial3=disabled\nserial4=disabled\n\n[dos]\n#            xms: Enable XMS support.\n#            ems: Enable EMS support. The default (=true) provides the best\n#                 compatibility but certain applications may run better with\n#                 other choices, or require EMS support to be disabled (=false)\n#                 to work at all.\n#                 Possible values: true, emsboard, emm386, false.\n#            umb: Enable UMB support.\n# keyboardlayout: Language code of the keyboard layout (or none).\n\nxms=true\nems=true\numb=true\nkeyboardlayout=auto\n\n[ipx]\n# ipx: Enable ipx over UDP/IP emulation.\n\nipx=false\n\n[autoexec]\n# Lines in this section will be run at startup.\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-sdl2/config/dosbox-SVN.conf",
    "content": "# This is the configuration file for DOSBox SVN. (Please use the latest version of DOSBox)\n# Lines starting with a # are comment lines and are ignored by DOSBox.\n# They are used to (briefly) document the effect of each option.\n\n[sdl]\n#       fullscreen: Start dosbox directly in fullscreen. (Press ALT-Enter to go back)\n#            vsync: Sync to Vblank IF supported by the output device and renderer (if relevant).\n#                     It can reduce screen flickering, but it can also result in a slow DOSBox.\n#   fullresolution: What resolution to use for fullscreen: original, desktop or a fixed size (e.g. 1024x768).\n#                     Using your monitor's native resolution with aspect=true might give the best results.\n#                     If you end up with small window on a large screen, try an output different from surface.On Windows 10 with display scaling (Scale and layout) set to a value above 100%, it is recommended\n#                     to use a lower full/windowresolution, in order to avoid window size problems.\n# windowresolution: Scale the window to this size IF the output device supports hardware scaling.\n#                     (output=surface does not!)\n#           output: What video system to use for output.\n#                     Possible values: surface, texture, texturenb.\n#        gl.shader: What set of GLSL shaders to use with an OpenGL output. Keep empty if this is not desired.\n#                       Note that in case it is used, the respective shader files must be found in the \"shaders\" subdirectory\n#                       relatively to where the default DOSBox configuration fiel is stored. For shader file naming convention,\n#                       suppose that you have a pair of shader files ready: mysample.vert and mysample.frag.\n#                       Then shader=mysample should be set.\n#                     \n# texture.renderer: Choose a renderer driver if output=texture or output=texturenb. Use output=auto for an automatic choice.\n#                     Possible values: auto, opengl, software.\n#         autolock: Mouse will automatically lock, if you click on the screen. (Press CTRL-F10 to unlock)\n#      sensitivity: Mouse sensitivity. The optional second parameter specifies vertical sensitivity (e.g. 100,-50).\n#      waitonerror: Wait before closing the console if dosbox has an error.\n#         priority: Priority levels for dosbox. Second entry behind the comma is for when dosbox is not focused/minimized.\n#                     pause is only valid for the second entry.\n#                     Possible values: lowest, lower, normal, higher, highest, pause.\n#       mapperfile: File used to load/save the key/event mappings from. Resetmapper only works with the default value.\n\nfullscreen       = true\nvsync            = false\nfullresolution   = 0x0\nwindowresolution = original\noutput           = texturenb\ngl.shader        = \ntexture.renderer = auto\nautolock         = true\nsensitivity      = 100\nwaitonerror      = true\npriority         = higher,normal\nmapperfile       = mapper-sdl2-SVN.map\n\n[dosbox]\n# language: Select another language file.\n#  machine: The type of machine DOSBox tries to emulate.\n#             Possible values: hercules, cga, tandy, pcjr, ega, vgaonly, svga_s3, svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe.\n# captures: Directory where things like wave, midi, screenshot get captured.\n#  memsize: Amount of memory DOSBox has in megabytes.\n#             This value is best left at its default to avoid problems with some games,\n#             though few games might require a higher value.\n#             There is generally no speed advantage when raising this value.\n\nlanguage = \nmachine  = svga_s3\ncaptures = capture\nmemsize  = 16\n\n[render]\n# frameskip: How many frames DOSBox skips before drawing one.\n#    aspect: Do aspect correction, if your output method doesn't support scaling this can slow things down!\n#    scaler: Scaler used to enlarge/enhance low resolution modes. If 'forced' is appended,\n#              then the scaler will be used even if the result might not be desired.\n#              To fit a scaler in the resolution used at full screen may require a border or side bars,\n#              to fill the screen entirely, depending on your hardware, a different scaler/fullresolution might work.\n#              Possible values: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, hq2x, hq3x, 2xsai, super2xsai, supereagle, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x.\n\nframeskip = 0\naspect    = true\nscaler    = none\n\n[cpu]\n#      core: CPU Core used in emulation. auto will switch to dynamic if available and\n#              appropriate.\n#              Possible values: auto, dynamic, normal, simple.\n#   cputype: CPU Type used in emulation. auto is the fastest choice.\n#              Possible values: auto, 386, 386_slow, 486_slow, pentium_slow, 386_prefetch.\n#    cycles: Amount of instructions DOSBox tries to emulate each millisecond.\n#              Setting this value too high results in sound dropouts and lags.\n#              Cycles can be set in 3 ways:\n#                'auto'          tries to guess what a game needs.\n#                                It usually works, but can fail for certain games.\n#                'fixed #number' will set a fixed amount of cycles. This is what you usually\n#                                need if 'auto' fails (Example: fixed 4000).\n#                'max'           will allocate as much cycles as your computer is able to\n#                                handle.\n#              Possible values: auto, fixed, max.\n#   cycleup: Amount of cycles to decrease/increase with keycombos.(CTRL-F11/CTRL-F12)\n# cycledown: Setting it lower than 100 will be a percentage.\n\ncore      = auto\ncputype   = auto\ncycles    = auto\ncycleup   = 10\ncycledown = 20\n\n[mixer]\n#   nosound: Enable silent mode, sound is still emulated though.\n#      rate: Mixer sample rate, setting any device's rate higher than this will probably lower their sound quality.\n#              Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n# blocksize: Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged.\n#              Possible values: 1024, 2048, 4096, 8192, 512, 256.\n# prebuffer: How many milliseconds of data to keep on top of the blocksize.\n\nnosound   = false\nrate      = 44100\nblocksize = 1024\nprebuffer = 25\n\n[midi]\n#                mpu401: Type of MPU-401 to emulate.\n#                          Possible values: intelligent, uart, none.\n#            mididevice: Device that will receive the MIDI data from MPU-401.\n#                          Possible values: default, win32, alsa, oss, coreaudio, coremidi, fluidsynth, mt32, none.\n#            midiconfig: Special configuration options for the device driver. This is usually the id or part of the name of the device you want to use (find the id/name with mixer/listmidi).\n#                          Or in the case of coreaudio, you can specify a soundfont here.\n#                          When using a Roland MT-32 rev. 0 as midi output device, some games may require a delay in order to prevent 'buffer overflow' issues.\n#                          In that case, add 'delaysysex', for example: midiconfig=2 delaysysex\n#                          See the README/Manual for more details.\n#          fluid.driver: Driver to use with Fluidsynth, not needed under Windows. Available drivers depend on what Fluidsynth was compiled with\n#                          Possible values: pulseaudio, alsa, oss, coreaudio, dsound, portaudio, sndman, jack, file, default.\n#       fluid.soundfont: Soundfont to use with Fluidsynth. One must be specified.\n#      fluid.samplerate: Sample rate to use with Fluidsynth.\n#            fluid.gain: Fluidsynth gain.\n#       fluid.polyphony: Fluidsynth polyphony.\n#           fluid.cores: Fluidsynth CPU cores to use, default.\n#         fluid.periods: Fluidsynth periods.\n#      fluid.periodsize: Fluidsynth period size.\n#          fluid.reverb: Fluidsynth use reverb.\n#                          Possible values: no, yes.\n#          fluid.chorus: Fluidsynth use chorus.\n#                          Possible values: no, yes.\n# fluid.reverb,roomsize: Fluidsynth reverb room size.\n#  fluid.reverb.damping: Fluidsynth reverb damping.\n#    fluid.reverb.width: Fluidsynth reverb width.\n#    fluid.reverb.level: Fluidsynth reverb level.\n#   fluid.chorus.number: Fluidsynth chorus voices\n#    fluid.chorus.level: Fluidsynth chorus level.\n#    fluid.chorus.speed: Fluidsynth chorus speed.\n#    fluid.chorus.depth: Fluidsynth chorus depth.\n#     fluid.chorus.type: Fluidsynth chorus type. 0 is sine wave, 1 is triangle wave.\n#                          Possible values: 0, 1.\n#           mt32.romdir: Name of the directory where MT-32 Control and PCM ROM files can be found. Emulation requires these files to work.\n#                            Accepted file names are as follows:\n#                              MT32_CONTROL.ROM or CM32L_CONTROL.ROM - control ROM file.\n#                              MT32_PCM.ROM or CM32L_PCM.ROM - PCM ROM file.\n#   mt32.reverse.stereo: Reverse stereo channels for MT-32 output\n#          mt32.verbose: MT-32 debug logging\n#           mt32.thread: MT-32 rendering in separate thread\n#            mt32.chunk: Minimum milliseconds of data to render at once.\n#                          Increasing this value reduces rendering overhead which may improve performance but also increases audio lag.\n#                          Valid for rendering in separate thread only.\n#                          Possible values: 2, 3, 16, 99, 100.\n#        mt32.prebuffer: How many milliseconds of data to render ahead.\n#                          Increasing this value may help to avoid underruns but also increases audio lag.\n#                          Cannot be set less than or equal to mt32.chunk value.\n#                          Valid for rendering in separate thread only.\n#                          Possible values: 3, 4, 32, 199, 200.\n#         mt32.partials: The maximum number of partials playing simultaneously.\n#                          Possible values: 8, 9, 32, 255, 256.\n#              mt32.dac: MT-32 DAC input emulation mode\n#                          Nice = 0 - default\n#                          Produces samples at double the volume, without tricks.\n#                          Higher quality than the real devices\n#                          \n#                          Pure = 1\n#                          Produces samples that exactly match the bits output from the emulated LA32.\n#                          Nicer overdrive characteristics than the DAC hacks (it simply clips samples within range)\n#                          Much less likely to overdrive than any other mode.\n#                          Half the volume of any of the other modes.\n#                          Perfect for developers while debugging :)\n#                          \n#                          GENERATION1 = 2\n#                          Re-orders the LA32 output bits as in early generation MT-32s (according to Wikipedia).\n#                          Bit order at DAC (where each number represents the original LA32 output bit number, and XX means the bit is always low):\n#                          15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 XX\n#                          \n#                          GENERATION2 = 3\n#                          Re-orders the LA32 output bits as in later generations (personally confirmed on my CM-32L - KG).\n#                          Bit order at DAC (where each number represents the original LA32 output bit number):\n#                          15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 14\n#                          Possible values: 0, 1, 2, 3.\n#           mt32.analog: MT-32 analogue output emulation mode\n#                          Digital = 0\n#                          Only digital path is emulated. The output samples correspond to the digital output signal appeared at the DAC entrance.\n#                          Fastest mode.\n#                          \n#                          Coarse = 1\n#                          Coarse emulation of LPF circuit. High frequencies are boosted, sample rate remains unchanged.\n#                          A bit better sounding but also a bit slower.\n#                          \n#                          Accurate = 2 - default\n#                          Finer emulation of LPF circuit. Output signal is upsampled to 48 kHz to allow emulation of audible mirror spectra above 16 kHz,\n#                          which is passed through the LPF circuit without significant attenuation.\n#                          Sounding is closer to the analog output from real hardware but also slower than the modes 0 and 1.\n#                          \n#                          Oversampled = 3\n#                          Same as the default mode 2 but the output signal is 2x oversampled, i.e. the output sample rate is 96 kHz.\n#                          Even slower than all the other modes but better retains highest frequencies while further resampled in DOSBox mixer.\n#                          Possible values: 0, 1, 2, 3.\n#      mt32.reverb.mode: MT-32 reverb mode\n#                          Possible values: 0, 1, 2, 3, auto.\n#      mt32.reverb.time: MT-32 reverb decaying time\n#                          Possible values: 0, 1, 2, 3, 4, 5, 6, 7.\n#     mt32.reverb.level: MT-32 reverb level\n#                          Possible values: 0, 1, 2, 3, 4, 5, 6, 7.\n\nmpu401 = intelligent\n# FluidSynth Software Synthesizer\nmididevice = fluidsynth\nfluid.driver = pulseaudio\nfluid.soundfont = /usr/share/soundfonts/GeneralUser.sf2\n\n[sblaster]\n#  sbtype: Type of Soundblaster to emulate. gb is Gameblaster.\n#            Possible values: sb1, sb2, sbpro1, sbpro2, sb16, gb, none.\n#  sbbase: The IO address of the soundblaster.\n#            Possible values: 220, 240, 260, 280, 2a0, 2c0, 2e0, 300.\n#     irq: The IRQ number of the soundblaster.\n#            Possible values: 7, 5, 3, 9, 10, 11, 12.\n#     dma: The DMA number of the soundblaster.\n#            Possible values: 1, 5, 0, 3, 6, 7.\n#    hdma: The High DMA number of the soundblaster.\n#            Possible values: 1, 5, 0, 3, 6, 7.\n# sbmixer: Allow the soundblaster mixer to modify the DOSBox mixer.\n# oplmode: Type of OPL emulation. On 'auto' the mode is determined by sblaster type. All OPL modes are Adlib-compatible, except for 'cms'.\n#            Possible values: auto, cms, opl2, dualopl2, opl3, opl3gold, none.\n#  oplemu: Provider for the OPL emulation. compat might provide better quality (see oplrate as well).\n#            Possible values: default, compat, fast, mame.\n# oplrate: Sample rate of OPL music emulation. Use 49716 for highest quality (set the mixer rate accordingly).\n#            Possible values: 44100, 49716, 48000, 32000, 22050, 16000, 11025, 8000.\n\nsbtype  = sb16\nsbbase  = 220\nirq     = 7\ndma     = 1\nhdma    = 5\nsbmixer = true\noplmode = auto\noplemu  = default\noplrate = 44100\n\n[gus]\n#      gus: Enable the Gravis Ultrasound emulation.\n#  gusrate: Sample rate of Ultrasound emulation.\n#             Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#  gusbase: The IO base address of the Gravis Ultrasound.\n#             Possible values: 240, 220, 260, 280, 2a0, 2c0, 2e0, 300.\n#   gusirq: The IRQ number of the Gravis Ultrasound.\n#             Possible values: 5, 3, 7, 9, 10, 11, 12.\n#   gusdma: The DMA channel of the Gravis Ultrasound.\n#             Possible values: 3, 0, 1, 5, 6, 7.\n# ultradir: Path to Ultrasound directory. In this directory\n#             there should be a MIDI directory that contains\n#             the patch files for GUS playback. Patch sets used\n#             with Timidity should work fine.\n\ngus      = false\ngusrate  = 44100\ngusbase  = 240\ngusirq   = 5\ngusdma   = 3\nultradir = C:\\ULTRASND\n\n[speaker]\n# pcspeaker: Enable PC-Speaker emulation.\n#    pcrate: Sample rate of the PC-Speaker sound generation.\n#              Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#     tandy: Enable Tandy Sound System emulation. For 'auto', emulation is present only if machine is set to 'tandy'.\n#              Possible values: auto, on, off.\n# tandyrate: Sample rate of the Tandy 3-Voice generation.\n#              Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#    disney: Enable Disney Sound Source emulation. (Covox Voice Master and Speech Thing compatible).\n\npcspeaker = true\npcrate    = 44100\ntandy     = auto\ntandyrate = 44100\ndisney    = true\n\n[joystick]\n#  joysticktype: Type of joystick to emulate: auto (default), none,\n#                  2axis (supports two joysticks),\n#                  4axis (supports one joystick, first joystick used),\n#                  4axis_2 (supports one joystick, second joystick used),\n#                  fcs (Thrustmaster), ch (CH Flightstick).\n#                  none disables joystick emulation.\n#                  auto chooses emulation depending on real joystick(s).\n#                  (Remember to reset dosbox's mapperfile if you saved it earlier)\n#                  Possible values: auto, 2axis, 4axis, 4axis_2, fcs, ch, none.\n#         timed: enable timed intervals for axis. Experiment with this option, if your joystick drifts (away).\n#      autofire: continuously fires as long as you keep the button pressed.\n#        swap34: swap the 3rd and the 4th axis. Can be useful for certain joysticks.\n#    buttonwrap: enable button wrapping at the number of emulated buttons.\n# circularinput: enable translation of circular input to square output.\n#                  Try enabling this if your left analog stick can only move in a circle.\n#      deadzone: the percentage of motion to ignore. 100 turns the stick into a digital one.\n\njoysticktype  = auto\ntimed         = true\nautofire      = false\nswap34        = false\nbuttonwrap    = false\ncircularinput = false\ndeadzone      = 10\n\n[serial]\n# serial1: set type of device connected to com port.\n#            Can be disabled, dummy, modem, nullmodem, directserial.\n#            Additional parameters must be in the same line in the form of\n#            parameter:value. Parameter for all types is irq (optional).\n#            for directserial: realport (required), rxdelay (optional).\n#                             (realport:COM1 realport:ttyS0).\n#            for modem: listenport (optional).\n#            for nullmodem: server, rxdelay, txdelay, telnet, usedtr,\n#                           transparent, port, inhsocket (all optional).\n#            Example: serial1=modem listenport:5000\n#            Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial2: see serial1\n#            Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial3: see serial1\n#            Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial4: see serial1\n#            Possible values: dummy, disabled, modem, nullmodem, directserial.\n\nserial1 = dummy\nserial2 = dummy\nserial3 = disabled\nserial4 = disabled\n\n[dos]\n#            xms: Enable XMS support.\n#            ems: Enable EMS support. The default (=true) provides the best\n#                   compatibility but certain applications may run better with\n#                   other choices, or require EMS support to be disabled (=false)\n#                   to work at all.\n#                   Possible values: true, emsboard, emm386, false.\n#            umb: Enable UMB support.\n# keyboardlayout: Language code of the keyboard layout (or none).\n\nxms            = true\nems            = true\numb            = true\nkeyboardlayout = auto\n\n[ipx]\n# ipx: Enable ipx over UDP/IP emulation.\n\nipx = false\n\n[autoexec]\n# Lines in this section will be run at startup.\n# You can put your MOUNT lines here.\n\n\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-sdl2/config/games/+ Scan DOSBox Games.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2020-present Sylvia van Os (https://github.com/TheLastProject)\n\nEE_DEVICE=$(cat /ee_arch)\n\nsource /usr/bin/env.sh\nrp_registerAllModules\n\njoy2keyStart\n\nfunction restart_confirm() {\n    if dialog --ascii-lines --yesno \"DOSBox scan completed, any found games will appear next time you restart Emulationstation, do you want to restart it now?\"  22 76 >/dev/tty; then\n        systemctl restart emustation\n    fi\n\n    if [ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ]; then\n        killall kmscon\n    fi\n}\n\nfunction create_launcher() {\n    launcher_name=\"${1} (${2})\"\n\n    dos_dirname=\"${1:0:6}~1\"\n\n    mkdir -p \"/storage/roms/pc/${launcher_name}\"\n    cp /storage/.config/dosbox/dosbox-SDL2.conf \"/storage/roms/pc/${launcher_name}\"\n    echo \"mount c /storage/roms/pcdata\" >> \"/storage/roms/pc/${launcher_name}/dosbox-SDL2.conf\"\n    echo \"c:\" >> \"/storage/roms/pc/${launcher_name}/dosbox-SDL2.conf\"\n    echo \"cd ${dos_dirname}\" >> \"/storage/roms/pc/${launcher_name}/dosbox-SDL2.conf\"\n    echo \"${2}\" >> \"/storage/roms/pc/${launcher_name}/dosbox-SDL2.conf\"\n    echo \"exit\" >> \"/storage/roms/pc/${launcher_name}/dosbox-SDL2.conf\"\n\n    touch \"/storage/roms/pc/${launcher_name}/${launcher_name}.bat\"\n}\n\nfor data_dir in /storage/roms/pcdata/*; do\n    if [ -d \"${data_dir}\" ]; then\n        for executable in $(find \"${data_dir}\" -iname \"*.exe\"); do\n            executable_case=\"$(basename ${executable} | tr '[:lower:]' '[:upper:]')\"\n            case \"${executable_case}\" in\n                \"SETUP.EXE\" | \"INSTALL.EXE\" | \"INSTALLER.EXE\")\n                    ;;\n                *)\n                    create_launcher \"$(basename ${data_dir})\" \"$(basename ${executable})\"\n                    ;;\n            esac\n        done\n    fi\ndone\nrestart_confirm\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-sdl2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)\n\nPKG_NAME=\"dosbox-sdl2\"\nPKG_VERSION=\"0dd982477bff268c10558004dd1671e183b1a10f\"\nPKG_SHA256=\"2737817cd45889b21a4cef1e5fbd0782ffb5972f29bd3eaf7c3b8cc99cd9bac0\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/moralrecordings/dosbox\"\nPKG_URL=\"https://github.com/moralrecordings/dosbox/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux glibc glib systemd dbus alsa-lib SDL2 SDL2_net SDL_sound libpng zlib libvorbis flac libogg fluidsynth-git munt\"\nPKG_LONGDESC=\"This is an enhanced fork of DOSBox. It is currently in sync with revision 4156.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+lto\"\n\npre_configure_target() {\n\nif [ ${ARCH} == \"arm\" ]; then \n\tEE_ARCH=\"armv7l\"\nelse\n\tEE_ARCH=${ARCH}\nfi\n\n  # Clean up build directory\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n\n  PKG_CONFIGURE_OPTS_TARGET=\"--prefix=/usr \\\n                             --enable-core-inline \\\n                             --enable-dynrec \\\n                             --enable-unaligned_memory \\\n                             --with-sdl-prefix=${SYSROOT_PREFIX}/usr\"\n\n   PKG_CONFIGURE_OPTS_TARGET+=\" --host=${EE_ARCH}\"\n\n}\n\npre_make_target() {\n  # Define DOSBox version\n  sed -e \"s/SVN/SDL2/\" -i ${PKG_BUILD}/config.h\n}\n\npost_makeinstall_target() {\n  # Create config directory & install config\n  mkdir -p ${INSTALL}/usr/config/dosbox\n  cp -a ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin/\n  cp -a ${PKG_DIR}/config/*  ${INSTALL}/usr/config/dosbox/\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-sdl2/patches/dosbox-sdl2.995.01-add-mt32emu-MIDI-device.patch",
    "content": "diff --git b/configure.ac a/configure.ac\nindex f393457e41..b14d3e9ad3 100644\n--- b/configure.ac\n+++ a/configure.ac\n@@ -421,6 +421,16 @@ if test x$have_wordexp_h = xyes ; then\n   AC_DEFINE(C_WORDEXP,1)\n fi\n \n+AH_TEMPLATE(C_MUNT,[define to 1 if you have munt lib])\n+AC_CHECK_LIB(mt32emu, main, have_mt32emu_lib=yes, have_mt32emu_lib=no, )\n+if test x$have_mt32emu_lib = xyes ; then\n+   LIBS=\"$LIBS -lmt32emu\"\n+   AC_DEFINE(C_MUNT,1)\n+   AC_MSG_RESULT(yes)\n+else\n+\tAC_MSG_WARN([Can't find munt, Roland MIDI device emulation disabled.])\n+fi\n+\n AH_TEMPLATE(C_OPENGL,[Define to 1 to use opengl display output support])\n AC_CHECK_LIB(GL, main, have_gl_lib=yes, have_gl_lib=no , )\n AC_CHECK_LIB(opengl32, main, have_opengl32_lib=yes,have_opengl32_lib=no , )\ndiff --git b/src/dosbox.cpp a/src/dosbox.cpp\nindex 485f6a7958..18688a8e00 100644\n--- b/src/dosbox.cpp\n+++ a/src/dosbox.cpp\n@@ -500,6 +500,9 @@ void DOSBOX_Init(void) {\n \t\t\"coremidi\",\n #ifdef C_FLUIDSYNTH\n \t\t\"fluidsynth\",\n+#endif\n+#ifdef C_MUNT\n+\t\t\"mt32\",\n #endif\n \t\t\"none\",\n \t\t0\n@@ -587,6 +590,10 @@ void DOSBOX_Init(void) {\n \tPint->Set_help(\"Fluidsynth chorus type. 0 is sine wave, 1 is triangle wave.\");\n #endif\n \n+#ifdef C_MUNT\n+#include \"mt32options.h\"\n+#endif\n+\n #if C_DEBUG\n \tsecprop=control->AddSection_prop(\"debug\",&DEBUG_Init);\n #endif\ndiff --git b/src/gui/Makefile.am a/src/gui/Makefile.am\nindex 3fed5e68ae..eb994d86b8 100644\n--- b/src/gui/Makefile.am\n+++ a/src/gui/Makefile.am\n@@ -7,5 +7,6 @@ libgui_a_SOURCES = sdlmain.cpp sdl_mapper.cpp dosbox_logo.h \\\n \trender_templates_sai.h render_templates_hq.h \\\n \trender_templates_hq2x.h render_templates_hq3x.h \\\n \tmidi.cpp midi_win32.h midi_oss.h midi_coreaudio.h midi_alsa.h \\\n-\tmidi_coremidi.h sdl_gui.cpp dosbox_splash.h\n+\tmidi_coremidi.h midi_mt32.h midi_mt32.cpp sdl_gui.cpp \\\n+\tdosbox_splash.h\n \ndiff --git b/src/gui/midi.cpp a/src/gui/midi.cpp\nindex 16cdae2cb5..bed8b7f6bd 100644\n--- b/src/gui/midi.cpp\n+++ a/src/gui/midi.cpp\n@@ -95,6 +95,11 @@ MidiHandler Midi_none;\n \n #endif\n \n+#ifdef C_MUNT\n+#include \"midi_mt32.h\"\n+static MidiHandler_mt32 &Midi_mt32 = MidiHandler_mt32::GetInstance();\n+#endif\n+\n DB_Midi midi;\n \n void MIDI_RawOutByte(Bit8u data) {\ndiff --git b/src/gui/midi_mt32.cpp a/src/gui/midi_mt32.cpp\nnew file mode 100644\nindex 0000000000..d7beafba0b\n--- /dev/null\n+++ a/src/gui/midi_mt32.cpp\n@@ -0,0 +1,283 @@\n+#include \"config.h\"\n+#ifdef C_MUNT\n+\n+#include \"SDL_thread.h\"\n+#include \"SDL_endian.h\"\n+#include \"control.h\"\n+\n+#ifndef DOSBOX_MIDI_H\n+#include \"midi.h\"\n+#endif\n+\n+#ifdef C_WORDEXP\n+#include <wordexp.h>\n+#endif\n+\n+#include \"midi_mt32.h\"\n+\n+static const Bitu MILLIS_PER_SECOND = 1000;\n+\n+MidiHandler_mt32 &MidiHandler_mt32::GetInstance() {\n+\tstatic MidiHandler_mt32 midiHandler_mt32;\n+\treturn midiHandler_mt32;\n+}\n+\n+const char *MidiHandler_mt32::GetName(void) {\n+\treturn \"mt32\";\n+}\n+\n+bool MidiHandler_mt32::Open(const char *conf) {\n+\tSection_prop *section = static_cast<Section_prop *>(control->GetSection(\"midi\"));\n+\tconst char *romDir = section->Get_string(\"mt32.romdir\");\n+\tif (romDir == NULL) romDir = \"./\"; // Paranoid NULL-check, should never happen\n+\tsize_t romDirLen = strlen(romDir);\n+\tbool addPathSeparator = false;\n+\tif (romDirLen < 1) {\n+\t\tromDir = \"./\";\n+\t} else if (4080 < romDirLen) {\n+\t\tLOG_MSG(\"MT32: mt32.romdir is too long, using the current dir.\");\n+\t\tromDir = \"./\";\n+\t} else {\n+\t\tchar lastChar = romDir[strlen(romDir) - 1];\n+\t\taddPathSeparator = lastChar != '/' && lastChar != '\\\\';\n+\t}\n+\n+\tchar pathName[4096];\n+\tMT32Emu::FileStream controlROMFile;\n+\tMT32Emu::FileStream pcmROMFile;\n+\n+\tmakeROMPathName(pathName, romDir, \"CM32L_CONTROL.ROM\", addPathSeparator);\n+\tif (!controlROMFile.open(pathName)) {\n+\t\tmakeROMPathName(pathName, romDir, \"MT32_CONTROL.ROM\", addPathSeparator);\n+\t\tif (!controlROMFile.open(pathName)) {\n+\t\t\tLOG_MSG(\"MT32: Control ROM file not found\");\n+\t\t\treturn false;\n+\t\t}\n+\t}\n+\tmakeROMPathName(pathName, romDir, \"CM32L_PCM.ROM\", addPathSeparator);\n+\tif (!pcmROMFile.open(pathName)) {\n+\t\tmakeROMPathName(pathName, romDir, \"MT32_PCM.ROM\", addPathSeparator);\n+\t\tif (!pcmROMFile.open(pathName)) {\n+\t\t\tLOG_MSG(\"MT32: PCM ROM file not found\");\n+\t\t\treturn false;\n+\t\t}\n+\t}\n+\tconst MT32Emu::ROMImage *controlROMImage = MT32Emu::ROMImage::makeROMImage(&controlROMFile);\n+\tconst MT32Emu::ROMImage *pcmROMImage = MT32Emu::ROMImage::makeROMImage(&pcmROMFile);\n+\n+\tMT32Emu::AnalogOutputMode analogOutputMode = (MT32Emu::AnalogOutputMode)section->Get_int(\"mt32.analog\");\n+\n+\tsynth = new MT32Emu::Synth(&reportHandler);\n+\tif (!synth->open(*controlROMImage, *pcmROMImage, section->Get_int(\"mt32.partials\"), analogOutputMode)) {\n+\t\tdelete synth;\n+\t\tsynth = NULL;\n+\t\tLOG_MSG(\"MT32: Error initialising emulation\");\n+\t\treturn false;\n+\t}\n+\tMT32Emu::ROMImage::freeROMImage(controlROMImage);\n+\tMT32Emu::ROMImage::freeROMImage(pcmROMImage);\n+\n+\tif (strcmp(section->Get_string(\"mt32.reverb.mode\"), \"auto\") != 0) {\n+\t\tBit8u reverbsysex[] = {0x10, 0x00, 0x01, 0x00, 0x05, 0x03};\n+\t\treverbsysex[3] = (Bit8u)atoi(section->Get_string(\"mt32.reverb.mode\"));\n+\t\treverbsysex[4] = (Bit8u)section->Get_int(\"mt32.reverb.time\");\n+\t\treverbsysex[5] = (Bit8u)section->Get_int(\"mt32.reverb.level\");\n+\t\tsynth->writeSysex(16, reverbsysex, 6);\n+\t\tsynth->setReverbOverridden(true);\n+\t}\n+\n+\tsynth->setDACInputMode((MT32Emu::DACInputMode)section->Get_int(\"mt32.dac\"));\n+\n+\tsynth->setReversedStereoEnabled(section->Get_bool(\"mt32.reverse.stereo\"));\n+\tnoise = section->Get_bool(\"mt32.verbose\");\n+\trenderInThread = section->Get_bool(\"mt32.thread\");\n+\n+\tif (noise) LOG_MSG(\"MT32: Set maximum number of partials %d\", synth->getPartialCount());\n+\tif (noise) LOG_MSG(\"MT32: Adding mixer channel at sample rate %d\", synth->getStereoOutputSampleRate());\n+\tchan = MIXER_AddChannel(mixerCallBack, synth->getStereoOutputSampleRate(), \"MT32\");\n+\tif (renderInThread) {\n+\t\tstopProcessing = false;\n+\t\tplayPos = 0;\n+\t\tsampleRateRatio = MT32Emu::SAMPLE_RATE / (double)synth->getStereoOutputSampleRate();\n+\t\tint chunkSize = section->Get_int(\"mt32.chunk\");\n+\t\tminimumRenderFrames = (chunkSize * synth->getStereoOutputSampleRate()) / MILLIS_PER_SECOND;\n+\t\tint latency = section->Get_int(\"mt32.prebuffer\");\n+\t\tif (latency <= chunkSize) {\n+\t\t\tlatency = 2 * chunkSize;\n+\t\t\tLOG_MSG(\"MT32: chunk length must be less than prebuffer length, prebuffer length reset to %i ms.\", latency);\n+\t\t}\n+\t\tframesPerAudioBuffer = (latency * synth->getStereoOutputSampleRate()) / MILLIS_PER_SECOND;\n+\t\taudioBufferSize = framesPerAudioBuffer << 1;\n+\t\taudioBuffer = new Bit16s[audioBufferSize];\n+\t\tsynth->render(audioBuffer, framesPerAudioBuffer - 1);\n+\t\trenderPos = (framesPerAudioBuffer - 1) << 1;\n+\t\tplayedBuffers = 1;\n+\t\tlock = SDL_CreateMutex();\n+\t\tframesInBufferChanged = SDL_CreateCond();\n+\t\tthread = SDL_CreateThread(processingThread, NULL, NULL);\n+\t}\n+\tchan->Enable(true);\n+\n+\topen = true;\n+\treturn true;\n+}\n+\n+void MidiHandler_mt32::Close(void) {\n+\tif (!open) return;\n+\tchan->Enable(false);\n+\tif (renderInThread) {\n+\t\tstopProcessing = true;\n+\t\tSDL_LockMutex(lock);\n+\t\tSDL_CondSignal(framesInBufferChanged);\n+\t\tSDL_UnlockMutex(lock);\n+\t\tSDL_WaitThread(thread, NULL);\n+\t\tthread = NULL;\n+\t\tSDL_DestroyMutex(lock);\n+\t\tlock = NULL;\n+\t\tSDL_DestroyCond(framesInBufferChanged);\n+\t\tframesInBufferChanged = NULL;\n+\t\tdelete[] audioBuffer;\n+\t\taudioBuffer = NULL;\n+\t}\n+\tMIXER_DelChannel(chan);\n+\tchan = NULL;\n+\tsynth->close();\n+\tdelete synth;\n+\tsynth = NULL;\n+\topen = false;\n+}\n+\n+void MidiHandler_mt32::PlayMsg(Bit8u *msg) {\n+\tif (renderInThread) {\n+\t\tsynth->playMsg(SDL_SwapLE32(*(Bit32u *)msg), getMidiEventTimestamp());\n+\t} else {\n+\t\tsynth->playMsg(SDL_SwapLE32(*(Bit32u *)msg));\n+\t}\n+}\n+\n+void MidiHandler_mt32::PlaySysex(Bit8u *sysex, Bitu len) {\n+\tif (renderInThread) {\n+\t\tsynth->playSysex(sysex, len, getMidiEventTimestamp());\n+\t} else {\n+\t\tsynth->playSysex(sysex, len);\n+\t}\n+}\n+\n+void MidiHandler_mt32::mixerCallBack(Bitu len) {\n+\tMidiHandler_mt32::GetInstance().handleMixerCallBack(len);\n+}\n+\n+int MidiHandler_mt32::processingThread(void *) {\n+\tMidiHandler_mt32::GetInstance().renderingLoop();\n+\treturn 0;\n+}\n+\n+void MidiHandler_mt32::makeROMPathName(char pathName[], const char romDir[], const char fileName[], bool addPathSeparator) {\n+\n+#ifdef C_WORDEXP\n+\twordexp_t p;\n+\twordexp(romDir, &p, 0);\n+\tstrcpy(pathName, p.we_wordv[0]);\n+\twordfree(&p);\n+#else\n+\tstrcpy(pathName, romDir);\n+#endif\n+\n+\tif (addPathSeparator) {\n+\t\tstrcat(pathName, \"/\");\n+\t}\n+\tstrcat(pathName, fileName);\n+}\n+\n+MidiHandler_mt32::MidiHandler_mt32() : open(false), chan(NULL), synth(NULL), thread(NULL) {\n+}\n+\n+MidiHandler_mt32::~MidiHandler_mt32() {\n+\tClose();\n+}\n+\n+void MidiHandler_mt32::handleMixerCallBack(Bitu len) {\n+\tif (renderInThread) {\n+\t\twhile (renderPos == playPos) {\n+\t\t\tSDL_LockMutex(lock);\n+\t\t\tSDL_CondWait(framesInBufferChanged, lock);\n+\t\t\tSDL_UnlockMutex(lock);\n+\t\t\tif (stopProcessing) return;\n+\t\t}\n+\t\tBitu renderPosSnap = renderPos;\n+\t\tBitu playPosSnap = playPos;\n+\t\tBitu samplesReady = (renderPosSnap < playPosSnap) ? audioBufferSize - playPosSnap : renderPosSnap - playPosSnap;\n+\t\tif (len > (samplesReady >> 1)) {\n+\t\t\tlen = samplesReady >> 1;\n+\t\t}\n+\t\tchan->AddSamples_s16(len, audioBuffer + playPosSnap);\n+\t\tplayPosSnap += (len << 1);\n+\t\twhile (audioBufferSize <= playPosSnap) {\n+\t\t\tplayPosSnap -= audioBufferSize;\n+\t\t\tplayedBuffers++;\n+\t\t}\n+\t\tplayPos = playPosSnap;\n+\t\trenderPosSnap = renderPos;\n+\t\tconst Bitu samplesFree = (renderPosSnap < playPosSnap) ? playPosSnap - renderPosSnap : audioBufferSize + playPosSnap - renderPosSnap;\n+\t\tif (minimumRenderFrames <= (samplesFree >> 1)) {\n+\t\t\tSDL_LockMutex(lock);\n+\t\t\tSDL_CondSignal(framesInBufferChanged);\n+\t\t\tSDL_UnlockMutex(lock);\n+\t\t}\n+\t} else {\n+\t\tsynth->render((Bit16s *)MixTemp, len);\n+\t\tchan->AddSamples_s16(len, (Bit16s *)MixTemp);\n+\t}\n+}\n+\n+void MidiHandler_mt32::renderingLoop() {\n+\twhile (!stopProcessing) {\n+\t\tconst Bitu renderPosSnap = renderPos;\n+\t\tconst Bitu playPosSnap = playPos;\n+\t\tBitu samplesToRender;\n+\t\tif (renderPosSnap < playPosSnap) {\n+\t\t\tsamplesToRender = playPosSnap - renderPosSnap - 2;\n+\t\t} else {\n+\t\t\tsamplesToRender = audioBufferSize - renderPosSnap;\n+\t\t\tif (playPosSnap == 0) samplesToRender -= 2;\n+\t\t}\n+\t\tBitu framesToRender = samplesToRender >> 1;\n+\t\tif ((framesToRender == 0) || ((framesToRender < minimumRenderFrames) && (renderPosSnap < playPosSnap))) {\n+\t\t\tSDL_LockMutex(lock);\n+\t\t\tSDL_CondWait(framesInBufferChanged, lock);\n+\t\t\tSDL_UnlockMutex(lock);\n+\t\t} else {\n+\t\t\tsynth->render(audioBuffer + renderPosSnap, framesToRender);\n+\t\t\trenderPos = (renderPosSnap + samplesToRender) % audioBufferSize;\n+\t\t\tif (renderPosSnap == playPos) {\n+\t\t\t\tSDL_LockMutex(lock);\n+\t\t\t\tSDL_CondSignal(framesInBufferChanged);\n+\t\t\t\tSDL_UnlockMutex(lock);\n+\t\t\t}\n+\t\t}\n+\t}\n+}\n+\n+void MidiHandler_mt32::MT32ReportHandler::onErrorControlROM() {\n+\tLOG_MSG(\"MT32: Couldn't open Control ROM file\");\n+}\n+\n+void MidiHandler_mt32::MT32ReportHandler::onErrorPCMROM() {\n+\tLOG_MSG(\"MT32: Couldn't open PCM ROM file\");\n+}\n+\n+void MidiHandler_mt32::MT32ReportHandler::showLCDMessage(const char *message) {\n+\tLOG_MSG(\"MT32: LCD-Message: %s\", message);\n+}\n+\n+void MidiHandler_mt32::MT32ReportHandler::printDebug(const char *fmt, va_list list) {\n+\tMidiHandler_mt32 &midiHandler_mt32 = MidiHandler_mt32::GetInstance();\n+\tif (midiHandler_mt32.noise) {\n+\t\tchar s[1024];\n+\t\tstrcpy(s, \"MT32: \");\n+\t\tvsnprintf(s + 6, 1017, fmt, list);\n+\t\tLOG_MSG(s);\n+\t}\n+}\n+\n+#endif // C_MUNT\ndiff --git b/src/gui/midi_mt32.h a/src/gui/midi_mt32.h\nnew file mode 100644\nindex 0000000000..5ceabe7400\n--- /dev/null\n+++ a/src/gui/midi_mt32.h\n@@ -0,0 +1,57 @@\n+#ifndef DOSBOX_MIDI_MT32_H\n+#define DOSBOX_MIDI_MT32_H\n+\n+#include \"mixer.h\"\n+#include <mt32emu/mt32emu.h>\n+\n+struct SDL_Thread;\n+\n+class MidiHandler_mt32 : public MidiHandler {\n+public:\n+\tstatic MidiHandler_mt32 &GetInstance(void);\n+\n+\tconst char *GetName(void);\n+\tbool Open(const char *conf);\n+\tvoid Close(void);\n+\tvoid PlayMsg(Bit8u *msg);\n+\tvoid PlaySysex(Bit8u *sysex, Bitu len);\n+\n+private:\n+\tMixerChannel *chan;\n+\tMT32Emu::Synth *synth;\n+\tSDL_Thread *thread;\n+\tSDL_mutex *lock;\n+\tSDL_cond *framesInBufferChanged;\n+\tBit16s *audioBuffer;\n+\tBitu audioBufferSize;\n+\tBitu framesPerAudioBuffer;\n+\tBitu minimumRenderFrames;\n+\tdouble sampleRateRatio;\n+\tvolatile Bitu renderPos, playPos, playedBuffers;\n+\tvolatile bool stopProcessing;\n+\tbool open, noise, renderInThread;\n+\n+\tclass MT32ReportHandler : public MT32Emu::ReportHandler {\n+\tprotected:\n+\t\tvirtual void onErrorControlROM();\n+\t\tvirtual void onErrorPCMROM();\n+\t\tvirtual void showLCDMessage(const char *message);\n+\t\tvirtual void printDebug(const char *fmt, va_list list);\n+\t} reportHandler;\n+\n+\tstatic void mixerCallBack(Bitu len);\n+\tstatic int processingThread(void *);\n+\tstatic void makeROMPathName(char pathName[], const char romDir[], const char fileName[], bool addPathSeparator);\n+\n+\tMidiHandler_mt32();\n+\t~MidiHandler_mt32();\n+\n+\tBit32u inline getMidiEventTimestamp() {\n+\t\treturn Bit32u((playedBuffers * framesPerAudioBuffer + (playPos >> 1)) * sampleRateRatio);\n+\t}\n+\n+\tvoid handleMixerCallBack(Bitu len);\n+\tvoid renderingLoop();\n+};\n+\n+#endif /* DOSBOX_MIDI_MT32_H */\ndiff --git b/src/mt32options.h a/src/mt32options.h\nnew file mode 100644\nindex 0000000000..85082157a8\n--- /dev/null\n+++ a/src/mt32options.h\n@@ -0,0 +1,98 @@\n+Pstring = secprop->Add_string(\"mt32.romdir\",Property::Changeable::WhenIdle,\"\");\n+Pstring->Set_help(\"Name of the directory where MT-32 Control and PCM ROM files can be found. Emulation requires these files to work.\\n\"\n+\t\"  Accepted file names are as follows:\\n\"\n+\t\"    MT32_CONTROL.ROM or CM32L_CONTROL.ROM - control ROM file.\\n\"\n+\t\"    MT32_PCM.ROM or CM32L_PCM.ROM - PCM ROM file.\");\n+\n+Pbool = secprop->Add_bool(\"mt32.reverse.stereo\",Property::Changeable::WhenIdle,false);\n+Pbool->Set_help(\"Reverse stereo channels for MT-32 output\");\n+\n+Pbool = secprop->Add_bool(\"mt32.verbose\",Property::Changeable::WhenIdle,false);\n+Pbool->Set_help(\"MT-32 debug logging\");\n+\n+Pbool = secprop->Add_bool(\"mt32.thread\",Property::Changeable::WhenIdle,false);\n+Pbool->Set_help(\"MT-32 rendering in separate thread\");\n+\n+const char *mt32chunk[] = {\"2\", \"3\", \"16\", \"99\", \"100\",0};\n+Pint = secprop->Add_int(\"mt32.chunk\",Property::Changeable::WhenIdle,16);\n+Pint->Set_values(mt32chunk);\n+Pint->SetMinMax(2,100);\n+Pint->Set_help(\"Minimum milliseconds of data to render at once.\\n\"\n+\t\"Increasing this value reduces rendering overhead which may improve performance but also increases audio lag.\\n\"\n+\t\"Valid for rendering in separate thread only.\");\n+\n+const char *mt32prebuffer[] = {\"3\", \"4\", \"32\", \"199\", \"200\",0};\n+Pint = secprop->Add_int(\"mt32.prebuffer\",Property::Changeable::WhenIdle,32);\n+Pint->Set_values(mt32prebuffer);\n+Pint->SetMinMax(3,200);\n+Pint->Set_help(\"How many milliseconds of data to render ahead.\\n\"\n+\t\"Increasing this value may help to avoid underruns but also increases audio lag.\\n\"\n+\t\"Cannot be set less than or equal to mt32.chunk value.\\n\"\n+\t\"Valid for rendering in separate thread only.\");\n+\n+const char *mt32partials[] = {\"8\", \"9\", \"32\", \"255\", \"256\",0};\n+Pint = secprop->Add_int(\"mt32.partials\",Property::Changeable::WhenIdle,32);\n+Pint->Set_values(mt32partials);\n+Pint->SetMinMax(8,256);\n+Pint->Set_help(\"The maximum number of partials playing simultaneously.\");\n+\n+const char *mt32DACModes[] = {\"0\", \"1\", \"2\", \"3\",0};\n+Pint = secprop->Add_int(\"mt32.dac\",Property::Changeable::WhenIdle,0);\n+Pint->Set_values(mt32DACModes);\n+Pint->Set_help(\"MT-32 DAC input emulation mode\\n\"\n+\t\"Nice = 0 - default\\n\"\n+\t\"Produces samples at double the volume, without tricks.\\n\"\n+\t\"Higher quality than the real devices\\n\\n\"\n+\n+\t\"Pure = 1\\n\"\n+\t\"Produces samples that exactly match the bits output from the emulated LA32.\\n\"\n+\t\"Nicer overdrive characteristics than the DAC hacks (it simply clips samples within range)\\n\"\n+\t\"Much less likely to overdrive than any other mode.\\n\"\n+\t\"Half the volume of any of the other modes.\\n\"\n+\t\"Perfect for developers while debugging :)\\n\\n\"\n+\n+\t\"GENERATION1 = 2\\n\"\n+\t\"Re-orders the LA32 output bits as in early generation MT-32s (according to Wikipedia).\\n\"\n+\t\"Bit order at DAC (where each number represents the original LA32 output bit number, and XX means the bit is always low):\\n\"\n+\t\"15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 XX\\n\\n\"\n+\n+\t\"GENERATION2 = 3\\n\"\n+\t\"Re-orders the LA32 output bits as in later generations (personally confirmed on my CM-32L - KG).\\n\"\n+\t\"Bit order at DAC (where each number represents the original LA32 output bit number):\\n\"\n+\t\"15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 14\");\n+\n+const char *mt32analogModes[] = {\"0\", \"1\", \"2\", \"3\",0};\n+Pint = secprop->Add_int(\"mt32.analog\",Property::Changeable::WhenIdle,2);\n+Pint->Set_values(mt32analogModes);\n+Pint->Set_help(\"MT-32 analogue output emulation mode\\n\"\n+\t\"Digital = 0\\n\"\n+\t\"Only digital path is emulated. The output samples correspond to the digital output signal appeared at the DAC entrance.\\n\"\n+\t\"Fastest mode.\\n\\n\"\n+\n+\t\"Coarse = 1\\n\"\n+\t\"Coarse emulation of LPF circuit. High frequencies are boosted, sample rate remains unchanged.\\n\"\n+\t\"A bit better sounding but also a bit slower.\\n\\n\"\n+\n+\t\"Accurate = 2 - default\\n\"\n+\t\"Finer emulation of LPF circuit. Output signal is upsampled to 48 kHz to allow emulation of audible mirror spectra above 16 kHz,\\n\"\n+\t\"which is passed through the LPF circuit without significant attenuation.\\n\"\n+\t\"Sounding is closer to the analog output from real hardware but also slower than the modes 0 and 1.\\n\\n\"\n+\n+\t\"Oversampled = 3\\n\"\n+\t\"Same as the default mode 2 but the output signal is 2x oversampled, i.e. the output sample rate is 96 kHz.\\n\"\n+\t\"Even slower than all the other modes but better retains highest frequencies while further resampled in DOSBox mixer.\");\n+\n+const char *mt32reverbModes[] = {\"0\", \"1\", \"2\", \"3\", \"auto\",0};\n+Pstring = secprop->Add_string(\"mt32.reverb.mode\",Property::Changeable::WhenIdle,\"auto\");\n+Pstring->Set_values(mt32reverbModes);\n+Pstring->Set_help(\"MT-32 reverb mode\");\n+\n+const char *mt32reverbTimes[] = {\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\",0};\n+Pint = secprop->Add_int(\"mt32.reverb.time\",Property::Changeable::WhenIdle,5);\n+Pint->Set_values(mt32reverbTimes);\n+Pint->Set_help(\"MT-32 reverb decaying time\");\n+\n+const char *mt32reverbLevels[] = {\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\",0};\n+Pint = secprop->Add_int(\"mt32.reverb.level\",Property::Changeable::WhenIdle,3);\n+Pint->Set_values(mt32reverbLevels);\n+Pint->Set_help(\"MT-32 reverb level\");\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-sdl2/scripts/dosbox.start",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)\n\n# Source predefined functions and variables\n. /etc/profile\n\nset_audio pulseaudio\n\n# Set common variables\nRR_DOSBOX_HOME=/storage/.dosbox\nRR_DOSBOX_HOME_CONFIG=/storage/.config/dosbox\n\n# Create symlink to config dir\nif [ ! -L ${RR_DOSBOX_HOME} ]; then\n  if [ -d ${RR_DOSBOX_HOME} ]; then\n    cp -rf ${RR_DOSBOX_HOME} ${RR_DOSBOX_HOME_CONFIG}\n    rm -rf ${RR_DOSBOX_HOME}\n  fi\n  ln -sf ${RR_DOSBOX_HOME_CONFIG} ${RR_DOSBOX_HOME}\nfi\n\n# Run the emulator\ndosbox \"$@\" > /emuelec/logs/dosbox.log 2>&1\n\nset_audio default\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-staging/config/dosbox-staging.conf",
    "content": "# This is the configuration file for dosbox-staging (0.79.0).\n# Lines starting with a '#' character are comments.\n\n[sdl]\n#          fullscreen: Start directly in fullscreen.\n#                      Run INTRO and see Special Keys for window control hotkeys.\n#             display: Number of display to use; values depend on OS and user settings.\n#      fullresolution: What resolution to use for fullscreen: 'original', 'desktop'\n#                      or a fixed size (e.g. 1024x768).\n#    windowresolution: Set window size when running in windowed mode:\n#                        default:   Select the best option based on your\n#                                   environment and other settings.\n#                        small, medium, or large (or s, m, l):\n#                                   Size the window relative to the desktop.\n#                        <custom>:  Scale the window to the given dimensions in\n#                                   WxH format. For example: 1024x768.\n#                                   Scaling is not performed for output=surface.\n# viewport_resolution: Set the viewport size (drawable area) within the window/screen:\n#                        fit:       Fit the viewport to the available window/screen (default).\n#                        <custom>:  Limit the viewport within to a custom resolution or percentage of\n#                                   the desktop. Specified in WxH, N%, N.M%. Examples: 960x720 or 50%\n#     window_position: Set initial window position when running in windowed mode:\n#                        auto:      Let the window manager decide the position.\n#                        <custom>:  Set window position in X,Y format. For example: 250,100\n#                                   0,0 is the top-left corner of the screen.\n#  window_decorations: Controls whether to display window decorations in windowed mode.\n#        transparency: Set the transparency of the DOSBox Staging screen.\n#                      From 0 (no transparency) to 90 (high transparency).\n#           host_rate: Set the host's refresh rate:\n#                        auto:      Use SDI rates, or VRR rates when fullscreen on a high-refresh display.\n#                        sdi:       Use serial device interface (SDI) rates, without further adjustment.\n#                        vrr:       Deduct 3 Hz from the reported rate (best-practice for VRR displays).\n#                        <custom>:  Specify a custom rate as a whole or decimal value greater than 23.000.\n#               vsync: Synchronize with display refresh rate if supported. This can\n#                      reduce flickering and tearing, but may also impact performance.\n#          vsync_skip: Number of microseconds to allow rendering to block before skipping the next frame. 0 disables this and will always render.\n#   presentation_mode: Optionally select the frame presentation mode:\n#                        auto:  Intelligently time and drop frames to prevent\n#                               emulation stalls, based on host and DOS frame rates.\n#                        cfr:   Always present DOS frames at a constant frame rate.\n#                        vfr:   Always present changed DOS frames at a variable frame rate.\n#                      Possible values: auto, cfr, vfr.\n#              output: What video system to use for output.\n#                      Possible values: surface, texture, texturenb, texturepp.\n#    texture_renderer: Choose a renderer driver when using a texture output mode.\n#                      Use texture_renderer=auto for an automatic choice.\n#                      Possible values: auto, opengles2, software.\n#       capture_mouse: Choose a mouse control method:\n#                         onclick:        Capture the mouse when clicking any button in the window.\n#                         onstart:        Capture the mouse immediately on start.\n#                         seamless:       Let the mouse move seamlessly; captures only with middle-click or hotkey.\n#                         nomouse:        Hide the mouse and don't send input to the game.\n#                      Choose how middle-clicks are handled (second parameter):\n#                         middlegame:     Middle-clicks are sent to the game.\n#                         middlerelease:  Middle-click will release the captured mouse, and also capture when seamless.\n#                      Defaults (if not present or incorrect): seamless middlerelease\n#                      Possible values: seamless, onclick, onstart, nomouse.\n#         sensitivity: Mouse sensitivity. The optional second parameter specifies vertical sensitivity (e.g. 100,-50).\n#     raw_mouse_input: Enable this setting to bypass your operating system's mouse\n#                      acceleration and sensitivity settings. This works in\n#                      fullscreen or when the mouse is captured in window mode.\n#         waitonerror: Wait before closing the console if dosbox has an error.\n#            priority: Priority levels for dosbox. Second entry behind the comma is for when dosbox is not focused/minimized.\n#                      pause is only valid for the second entry. auto disables priority levels and uses OS defaults\n#                      Possible values: auto, lowest, lower, normal, higher, highest, pause.\n#          mapperfile: File used to load/save the key/event mappings from.\n#                      Resetmapper only works with the default value.\n#         screensaver: Use 'allow' or 'block' to override the SDL_VIDEO_ALLOW_SCREENSAVER\n#                      environment variable (which usually blocks the OS screensaver\n#                      while the emulator is running).\n#                      Possible values: auto, allow, block.\n\nfullscreen          = true\ndisplay             = 0\nfullresolution      = desktop\nwindowresolution    = default\nviewport_resolution = fit\nwindow_position     = auto\nwindow_decorations  = true\ntransparency        = 0\nhost_rate           = auto\nvsync               = false\nvsync_skip          = 7000\npresentation_mode   = auto\noutput              = texture\ntexture_renderer    = auto\ncapture_mouse       = seamless middlerelease\nsensitivity         = 100\nraw_mouse_input     = false\nwaitonerror         = true\npriority            = auto,auto\nmapperfile          = mapper-sdl2-0.79.0.map\nscreensaver         = auto\n\n[dosbox]\n#          language: Select a language to use: de, en, es, fr, it, pl, and ru\n#                    Notes: This setting will override the 'LANG' environment, if set.\n#                           The 'resources/translations' directory bundled with the executable holds\n#                           these files. Please keep it along-side the executable to support this feature.\n#           machine: The type of machine DOSBox tries to emulate.\n#                    Possible values: hercules, cga, cga_mono, tandy, pcjr, ega, vgaonly, svga_s3, svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe.\n#          captures: Directory where things like wave, midi, screenshot get captured.\n#           memsize: Amount of memory DOSBox has in megabytes.\n#                    This value is best left at its default to avoid problems with some games,\n#                    though few games might require a higher value.\n#                    There is generally no speed advantage when raising this value.\n#          vmemsize: Video memory in MiB (1-8) or KiB (256 to 8192). 'auto' uses the default per video adapter.\n#                    Possible values: auto, 1, 2, 4, 8, 256, 512, 1024, 2048, 4096, 8192.\n#          dos_rate: Customize the emulated video mode's frame rate, in Hz:\n#                    default:  The DOS video mode determines the rate (recommended).\n#                    host:     Match the DOS rate to the host rate (see 'host_rate' setting).\n#                    <value>:  Sets the rate to an exact value, between 24.000 and 1000.000 (Hz).\n#                    We recommend the 'default' rate; otherwise test and set on a per-game basis.\n#        vesa_modes: Controls the selection of VESA 1.2 and 2.0 modes offered:\n#                      compatible   A tailored selection that maximizes game compatibility.\n#                                   This is recommended along with 4 or 8 MB of video memory.\n#                      all          Offers all modes for a given video memory size, however\n#                                   some games may not use them properly (flickering) or may need\n#                                   more system memory (mem = ) to use them.\n#                    Possible values: compatible, all.\n#        speed_mods: Permit changes known to improve performance. Currently no games are known\n#                    to be affected by this. Please file a bug with the project if you find a\n#                    game that fails when this is set to true so we will list them here.\n#  autoexec_section: How autoexec sections are handled from multiple config files.\n#                    join      : combines them into one big section (legacy behavior).\n#                    overwrite : use the last one encountered, like other conf settings.\n#                    Possible values: join, overwrite.\n# startup_verbosity: Controls verbosity prior to displaying the program:\n#                    Verbosity   | Splash | Welcome | Early stdout\n#                    high        |  yes   |   yes   |    yes\n#                    medium      |  no    |   yes   |    yes\n#                    low         |  no    |   no    |    yes\n#                    quiet       |  no    |   no    |    no\n#                    splash_only |  yes   |   no    |    no\n#                    auto        | 'low' if exec or dir is passed, otherwise 'high'\n#                    Possible values: auto, high, medium, low, splash_only, quiet.\n\nlanguage          = \nmachine           = svga_s3\ncaptures          = capture\nmemsize           = 16\nvmemsize          = auto\ndos_rate          = default\nvesa_modes        = compatible\nspeed_mods        = true\nautoexec_section  = join\nstartup_verbosity = auto\n\n[render]\n#          frameskip: How many frames DOSBox skips before drawing one.\n#             aspect: Scales the vertical resolution to produce a 4:3 display aspect\n#                     ratio, matching that of the original standard-definition monitors\n#                     for which the majority of DOS games were designed. This setting\n#                     only affects video modes that use non-square pixels, such as\n#                     320x200 or 640x400; where as square-pixel modes, such as 640x480\n#                     and 800x600, will be displayed as-is.\n# monochrome_palette: Select default palette for monochrome display.\n#                     Works only when emulating hercules or cga_mono.\n#                     You can also cycle through available colours using F11.\n#                     Possible values: white, paperwhite, green, amber.\n#             scaler: Scaler used to enlarge/enhance low resolution modes.\n#                     If 'forced' is appended, then the scaler will be used even if\n#                     the result might not be desired.\n#                     Note that some scalers may use black borders to fit the image\n#                     within your configured display resolution. If this is\n#                     undesirable, try either a different scaler or enabling\n#                     fullresolution output.\n#                     Possible values: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, hq2x, hq3x, 2xsai, super2xsai, supereagle, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x.\n\nframeskip          = 0\naspect             = true\nmonochrome_palette = white\nscaler             = none\n\n[composite]\n#   composite: Enable composite mode on start. 'auto' lets the program decide.\n#              Note: Fine-tune the settings below (ie: hue) using the composite hotkeys.\n#                    Then read the new settings from your console and enter them here.\n#              Possible values: auto, on, off.\n#         era: Era of composite technology. When 'auto', PCjr uses new and CGA/Tandy use old.\n#              Possible values: auto, old, new.\n#         hue: Appearance of RGB palette. For example, adjust until sky is blue.\n#  saturation: Intensity of colors, from washed out to vivid.\n#    contrast: Ratio between the dark and light area.\n#  brightness: Luminosity of the image, from dark to light.\n# convergence: Convergence of subpixel elements, from blurry to sharp (CGA and Tandy-only).\n\ncomposite   = auto\nera         = auto\nhue         = 0\nsaturation  = 100\ncontrast    = 100\nbrightness  = 0\nconvergence = 0\n\n[cpu]\n#      core: CPU Core used in emulation. auto will switch to dynamic if available and\n#            appropriate.\n#            Possible values: auto, dynamic, normal, simple.\n#   cputype: CPU Type used in emulation. auto is the fastest choice.\n#            Possible values: auto, 386, 386_slow, 486_slow, pentium_slow, 386_prefetch.\n#    cycles: Number of instructions DOSBox tries to emulate each millisecond.\n#            Setting this value too high results in sound dropouts and lags.\n#            Cycles can be set in 3 ways:\n#              'auto'          tries to guess what a game needs.\n#                              It usually works, but can fail for certain games.\n#              'fixed #number' will set a fixed number of cycles. This is what you usually\n#                              need if 'auto' fails (Example: fixed 4000).\n#              'max'           will allocate as much cycles as your computer is able to\n#                              handle.\n#            Possible values: auto, fixed, max.\n#   cycleup: Number of cycles added or subtracted with speed control hotkeys.\n#            Run INTRO and see Special Keys for list of hotkeys.\n# cycledown: Setting it lower than 100 will be a percentage.\n\ncore      = auto\ncputype   = auto\ncycles    = auto\ncycleup   = 10\ncycledown = 20\n\n[mixer]\n#   nosound: Enable silent mode, sound is still emulated though.\n#      rate: Mixer sample rate, setting any device's rate higher than this will probably lower their sound quality.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n# blocksize: Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged.\n#            Possible values: 1024, 2048, 4096, 8192, 512, 256, 128.\n# prebuffer: How many milliseconds of data to keep on top of the blocksize.\n# negotiate: Let the system audio driver negotiate (possibly) better rate and blocksize settings.\n\nnosound   = false\nrate      = 48000\nblocksize = 512\nprebuffer = 20\nnegotiate = true\n\n[midi]\n# mididevice: Device that will receive the MIDI data (from the emulated MIDI\n#             interface - MPU-401). Choose one of the following:\n#             'fluidsynth', to use the built-in MIDI synthesizer. See the\n#                    [fluidsynth] section for detailed configuration.\n#             'mt32', to use the built-in Roland MT-32 synthesizer.\n#                    See the [mt32] section for detailed configuration.\n#             'auto', to use the first working external MIDI player. This\n#                    might be a software synthesizer or physical device.\n#             Possible values: auto, oss, alsa, fluidsynth, mt32, none.\n# midiconfig: Configuration options for the selected MIDI interface.\n#             This is usually the id or name of the MIDI synthesizer you want\n#             to use (find the id/name with DOS command 'mixer /listmidi').\n#             - This option has no effect when using the built-in synthesizers\n#               (mididevice = fluidsynth or mt32).\n#             - When using ALSA, use Linux command 'aconnect -l' to list open\n#               MIDI ports, and select one (for example 'midiconfig=14:0'\n#               for sequencer client 14, port 0).\n#             - If you're using a physical Roland MT-32 with revision 0 PCB,\n#               the hardware may require a delay in order to prevent its\n#               buffer from overflowing. In that case, add 'delaysysex',\n#               for example: 'midiconfig=2 delaysysex'.\n#             See the README/Manual for more details.\n#     mpu401: Type of MPU-401 to emulate.\n#             Possible values: intelligent, uart, none.\n\nmididevice = auto\nmidiconfig = \nmpu401     = intelligent\n\n[fluidsynth]\n# soundfont: Path to a SoundFont file in .sf2 format. You can use an\n#            absolute or relative path, or the name of an .sf2 inside\n#            the 'soundfonts' directory within your DOSBox configuration\n#            directory.\n#            An optional percentage will scale the SoundFont's volume.\n#            For example: 'soundfont.sf2 50' will attenuate it by 50 percent.\n#            The scaling percentage can range from 1 to 500.\n#    chorus: Chorus effect: 'auto', 'on', 'off', or custom values.\n#            When using custom values:\n#              All five must be provided in-order and space-separated.\n#              They are: voice-count level speed depth modulation-wave, where:\n#              - voice-count is an integer from 0 to 99.\n#              - level is a decimal from 0.0 to 10.0\n#              - speed is a decimal, measured in Hz, from 0.1 to 5.0\n#              - depth is a decimal from 0.0 to 21.0\n#              - modulation-wave is either 'sine' or 'triangle'\n#              For example: chorus = 3 1.2 0.3 8.0 sine\n#    reverb: Reverb effect: 'auto', 'on', 'off', or custom values.\n#            When using custom values:\n#              All four must be provided in-order and space-separated.\n#              They are: room-size damping width level, where:\n#              - room-size is a decimal from 0.0 to 1.0\n#              - damping is a decimal from 0.0 to 1.0\n#              - width is a decimal from 0.0 to 100.0\n#              - level is a decimal from 0.0 to 1.0\n#              For example: reverb = 0.61 0.23 0.76 0.56\n\nsoundfont = default.sf2\nchorus    = auto\nreverb    = auto\n\n[mt32]\n#  model: Model of synthesizer to use.\n#         'auto' picks the first model with available ROMs, in order as listed.\n#         'cm32l' and 'mt32' pick the first model of their type, in the order listed.\n#         'mt32_old' and 'mt32_new' are aliases for 1.07 and 2.04, respectively.\n#         Possible values: auto, cm32l, cm32l_102, cm32l_100, mt32, mt32_old, mt32_107, mt32_106, mt32_105, mt32_104, mt32_bluer, mt32_new, mt32_204.\n# romdir: The directory containing ROMs for one or more models.\n#         The directory can be absolute or relative, or leave it blank to\n#         use the 'mt32-roms' directory in your DOSBox configuration\n#         directory. Other common system locations will be checked as well.\n#         ROM files inside this directory may include any of the following:\n#           - MT32_CONTROL.ROM and MT32_PCM.ROM, for the 'mt32' model.\n#           - CM32L_CONTROL.ROM and CM32L_PCM.ROM, for the 'cm32l' model.\n#           - Unzipped MAME MT-32 and CM-32L ROMs, for the versioned models.\n\nmodel  = auto\nromdir = \n\n[sblaster]\n#   sbtype: Type of Sound Blaster to emulate. 'gb' is Game Blaster.\n#           Possible values: sb1, sb2, sbpro1, sbpro2, sb16, gb, none.\n#   sbbase: The IO address of the Sound Blaster.\n#           Possible values: 220, 240, 260, 280, 2a0, 2c0, 2e0, 300.\n#      irq: The IRQ number of the Sound Blaster.\n#           Possible values: 7, 5, 3, 9, 10, 11, 12.\n#      dma: The DMA number of the Sound Blaster.\n#           Possible values: 1, 5, 0, 3, 6, 7.\n#     hdma: The High DMA number of the Sound Blaster.\n#           Possible values: 1, 5, 0, 3, 6, 7.\n#  sbmixer: Allow the Sound Blaster mixer to modify the DOSBox mixer.\n# sbwarmup: Silence initial DMA audio after card power-on, in milliseconds.\n#           This mitigates pops heard when starting many SB-based games.\n#           Reduce this if you notice intial playback is missing audio.\n#  oplmode: Type of OPL emulation. On 'auto' the mode is determined by 'sbtype'.\n#           All OPL modes are AdLib-compatible, except for 'cms'.\n#           Possible values: auto, cms, opl2, dualopl2, opl3, opl3gold, none.\n#   oplemu: Provider for the OPL emulation. 'compat' provides better quality,\n#           'nuked' is the default and most accurate (but the most CPU-intensive).\n#           Possible values: default, compat, fast, mame, nuked.\n\nsbtype   = sb16\nsbbase   = 220\nirq      = 7\ndma      = 1\nhdma     = 5\nsbmixer  = true\nsbwarmup = 100\noplmode  = auto\noplemu   = default\n\n[gus]\n#      gus: Enable Gravis UltraSound emulation.\n#  gusbase: The IO base address of the Gravis UltraSound.\n#           Possible values: 240, 220, 260, 280, 2a0, 2c0, 2e0, 300.\n#   gusirq: The IRQ number of the Gravis UltraSound.\n#           Possible values: 5, 3, 7, 9, 10, 11, 12.\n#   gusdma: The DMA channel of the Gravis UltraSound.\n#           Possible values: 3, 0, 1, 5, 6, 7.\n# ultradir: Path to UltraSound directory. In this directory\n#           there should be a MIDI directory that contains\n#           the patch files for GUS playback. Patch sets used\n#           with Timidity should work fine.\n\ngus      = false\ngusbase  = 240\ngusirq   = 5\ngusdma   = 3\nultradir = C:\\ULTRASND\n\n[innovation]\n#   sidmodel: Model of chip to emulate in the Innovation SSI-2001 card:\n#              - auto:  Selects the 6581 chip.\n#              - 6581:  The original chip, known for its bassy and rich character.\n#              - 8580:  A later revision that more closely matched the SID specification.\n#                       It fixed the 6581's DC bias and is less prone to distortion.\n#                       The 8580 is an option on reproduction cards, like the DuoSID.\n#              - none:  Disables the card.\n#             Possible values: auto, 6581, 8580, none.\n#   sidclock: The SID chip's clock frequency, which is jumperable on reproduction cards.\n#              - default: uses 0.895 MHz, per the original SSI-2001 card.\n#              - c64ntsc: uses 1.023 MHz, per NTSC Commodore PCs and the DuoSID.\n#              - c64pal:  uses 0.985 MHz, per PAL Commodore PCs and the DuoSID.\n#              - hardsid: uses 1.000 MHz, available on the DuoSID.\n#             Possible values: default, c64ntsc, c64pal, hardsid.\n#    sidport: The IO port address of the Innovation SSI-2001.\n#             Possible values: 240, 260, 280, 2a0, 2c0.\n# 6581filter: The SID's analog filtering meant that each chip was physically unique.\n#             Adjusts the 6581's filtering strength as a percent from 0 to 100.\n# 8580filter: Adjusts the 8580's filtering strength as a percent from 0 to 100.\n\nsidmodel   = none\nsidclock   = default\nsidport    = 280\n6581filter = 50\n8580filter = 50\n\n[speaker]\n#   pcspeaker: Enable PC-Speaker emulation.\n#      pcrate: Sample rate of the PC-Speaker sound generation.\n# zero_offset: Neutralizes and prevents the PC speaker's DC-offset from harming other sources.\n#              'auto' enables this for non-Windows systems and disables it on Windows.\n#              If your OS performs its own DC-offset correction, then set this to 'false'.\n#              Possible values: auto, true, false.\n#       tandy: Enable Tandy Sound System emulation. For 'auto', emulation is present only if machine is set to 'tandy'.\n#              Possible values: auto, on, off.\n#   tandyrate: Sample rate of the Tandy 3-Voice generation.\n#              Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#      disney: Enable Disney Sound Source emulation. (Covox Voice Master and Speech Thing compatible).\n#    ps1audio: Enable IBM PS/1 Audio emulation.\n\npcspeaker   = true\npcrate      = 18939\nzero_offset = auto\ntandy       = auto\ntandyrate   = 44100\ndisney      = true\nps1audio    = false\n\n[joystick]\n#  joysticktype: Type of joystick to emulate: auto (default),\n#                auto     : Detect and use any joystick(s), if possible.,\n#                2axis    : Support up to two joysticks.\n#                4axis    : Support the first joystick only.\n#                4axis_2  : Support the second joystick only.\n#                fcs      : Support a Thrustmaster-type joystick.\n#                ch       : Support a CH Flightstick-type joystick.\n#                hidden   : Prevent DOS from seeing the joystick(s), but enable them for mapping.\n#                disabled : Fully disable joysticks: won't be polled, mapped, or visible in DOS.\n#                (Remember to reset DOSBox's mapperfile if you saved it earlier)\n#                Possible values: auto, 2axis, 4axis, 4axis_2, fcs, ch, hidden, disabled.\n#         timed: enable timed intervals for axis. Experiment with this option, if your joystick drifts (away).\n#      autofire: continuously fires as long as you keep the button pressed.\n#        swap34: swap the 3rd and the 4th axis. Can be useful for certain joysticks.\n#    buttonwrap: enable button wrapping at the number of emulated buttons.\n# circularinput: enable translation of circular input to square output.\n#                Try enabling this if your left analog stick can only move in a circle.\n#      deadzone: the percentage of motion to ignore. 100 turns the stick into a digital one.\n\njoysticktype  = auto\ntimed         = true\nautofire      = false\nswap34        = false\nbuttonwrap    = false\ncircularinput = false\ndeadzone      = 10\n\n[serial]\n#       serial1: set type of device connected to com port.\n#                Can be disabled, dummy, modem, nullmodem, directserial.\n#                Additional parameters must be in the same line in the form of\n#                parameter:value. Parameter for all types is irq (optional).\n#                for directserial: realport (required), rxdelay (optional).\n#                                 (realport:COM1 realport:ttyS0).\n#                for modem: listenport sock (all optional).\n#                for nullmodem: server, rxdelay, txdelay, telnet, usedtr,\n#                               transparent, port, inhsocket, sock (all optional).\n#                SOCK parameter specifies the protocol to be used by both sides\n#                     of the conection. 0 for TCP and 1 for ENet reliable UDP.\n#                Example: serial1=modem listenport:5000 sock:1\n#                Possible values: dummy, disabled, modem, nullmodem, directserial.\n#       serial2: see serial1\n#                Possible values: dummy, disabled, modem, nullmodem, directserial.\n#       serial3: see serial1\n#                Possible values: dummy, disabled, modem, nullmodem, directserial.\n#       serial4: see serial1\n#                Possible values: dummy, disabled, modem, nullmodem, directserial.\n# phonebookfile: File used to map fake phone numbers to addresses.\n\nserial1       = dummy\nserial2       = dummy\nserial3       = disabled\nserial4       = disabled\nphonebookfile = phonebook.txt\n\n[dos]\n#            xms: Enable XMS support.\n#            ems: Enable EMS support. The default (=true) provides the best\n#                 compatibility but certain applications may run better with\n#                 other choices, or require EMS support to be disabled (=false)\n#                 to work at all.\n#                 Possible values: true, emsboard, emm386, false.\n#            umb: Enable UMB support.\n#            ver: Set DOS version (5.0 by default). Specify as major.minor format.\n#                 A single number is treated as the major version.\n#                 Common settings are 3.3, 5.0, 6.22, and 7.1.\n#        country: Set DOS country code which will affect country-specific\n#                 information such as date, time, and decimal formats.\n#                 If set to 0, the country code corresponding to the\n#                 selected keyboard layout will be used.\n# keyboardlayout: Language code of the keyboard layout (or none).\n\nxms            = true\nems            = true\numb            = true\nver            = 5.0\ncountry        = 0\nkeyboardlayout = auto\n\n[ipx]\n# ipx: Enable ipx over UDP/IP emulation.\n\nipx = false\n\n[ethernet]\n#            ne2000: Enable emulation of a Novell NE2000 network card on a software-based\n#                    network (using libslirp) with properties as follows:\n#                     - 255.255.255.0 : Subnet mask of the 10.0.2.0 virtual LAN.\n#                     - 10.0.2.2      : IP of the gateway and DHCP service.\n#                     - 10.0.2.3      : IP of the virtual DNS server.\n#                     - 10.0.2.15     : First IP provided by DHCP, your IP!\n#                    Note: Inside DOS, setting this up requires an NE2000 packet driver,\n#                          DHCP client, and TCP/IP stack. You might need port-forwarding\n#                          from the host into the DOS guest, and from your router to your\n#                          host when acting as the server for multiplayer games.\n#           nicbase: The base address of the NE2000 card.\n#                    Note: Addresses 220 and 240 might not be available as they're assigned\n#                          to the Sound Blaster and Gravis UltraSound by default.\n#                    Possible values: 200, 220, 240, 260, 280, 2c0, 300, 320, 340, 360.\n#            nicirq: The interrupt used by the NE2000 card.\n#                    Note: IRQs 3 and 5 might not be available as they're assigned\n#                          to 'serial2' and the Gravis UltraSound by default.\n#                    Possible values: 3, 4, 5, 9, 10, 11, 12, 14, 15.\n#           macaddr: The MAC address of the NE2000 card.\n# tcp_port_forwards: Forwards one or more TCP ports from the host into the DOS guest.\n#                    The format is:\n#                      port1  port2  port3 ... (e.g., 21 80 443)\n#                      This will forward FTP, HTTP, and HTTPS into the DOS guest.\n#                    If the ports are privileged on the host, a mapping can be used\n#                      host:guest  ..., (e.g., 8021:21 8080:80)\n#                      This will forward ports 8021 and 8080 to FTP and HTTP in the guest\n#                    A range of adjacent ports can be abbreviated with a dash:\n#                      start-end ... (e.g., 27910-27960)\n#                      This will forward ports 27910 to 27960 into the DOS guest.\n#                    Mappings and ranges can be combined, too:\n#                      hstart-hend:gstart-gend ..., (e.g, 8040-8080:20-60)\n#                      This forwards ports 8040 to 8080 into 20 to 60 in the guest\n#                    Notes:\n#                      - If mapped ranges differ, the shorter range is extended to fit.\n#                      - If conflicting host ports are given, only the first one is setup.\n#                      - If conflicting guest ports are given, the latter rule takes precedent.\n# udp_port_forwards: Forwards one or more UDP ports from the host into the DOS guest.\n#                    The format is the same as for TCP port forwards.\n\nne2000            = true\nnicbase           = 300\nnicirq            = 3\nmacaddr           = AC:DE:48:88:99:AA\ntcp_port_forwards = \nudp_port_forwards = \n\n[autoexec]\n# Lines in this section will be run at startup.\n# You can put your MOUNT lines here.\n\n\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-staging/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"dosbox-staging\"\nPKG_VERSION=\"3f67c91dd6a998cc091f24d2200e2b99cf37fb18\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/dosbox-staging/dosbox-staging\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain linux meson:host glibc glib systemd dbus alsa-lib SDL2 SDL2_net SDL_sound libpng zlib libvorbis flac libogg fluidsynth-git munt opusfile\"\nPKG_LONGDESC=\"DOS/x86 emulator focusing on ease of use \"\nPKG_BUILD_FLAGS=\"+lto\"\n\n## For some reason my build PC needs this to download fluidsynth \n# sudo apt install ca-certificates\n# sudo update-ca-certificates --fresh\n\n## And this to locate them\nexport SSL_CERT_DIR=/etc/ssl/certs\n\npre_configure_target() {\nPKG_MESON_OPTS_TARGET=\" -Duse_opengl=false\"\nsed -i \"s|C_MANYMOUSE') == true)|C_MANYMOUSE') == false)|\" ${PKG_BUILD}/meson.build\nsed -i \"s|C_MANYMOUSE', true)|C_MANYMOUSE', false)|\" ${PKG_BUILD}/meson.build\n}\n\npost_makeinstall_target () {\n\tmkdir -p ${INSTALL}/usr/config/dosbox\n\tcp -a ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin/\n\tcp -a ${PKG_DIR}/config/*  ${INSTALL}/usr/config/dosbox/\n\tcp -a ${PKG_BUILD}/contrib/resources/*  ${INSTALL}/usr/config/dosbox/\n\trm -rf ${INSTALL}/usr/share\n\tfind ${INSTALL}/usr/config/dosbox -name \"meson.build\" -exec rm -rf {} \\;\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-staging/scripts/dosbox.start",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)\n\n# Source predefined functions and variables\n. /etc/profile\n\nset_audio pulseaudio\n\n# Set common variables\nRR_DOSBOX_HOME=/storage/.dosbox\nRR_DOSBOX_HOME_CONFIG=/storage/.config/dosbox\n\n# Create symlink to config dir\nif [ ! -L ${RR_DOSBOX_HOME} ]; then\n  if [ -d ${RR_DOSBOX_HOME} ]; then\n    cp -rf ${RR_DOSBOX_HOME} ${RR_DOSBOX_HOME_CONFIG}\n    rm -rf ${RR_DOSBOX_HOME}\n  fi\n  ln -sf ${RR_DOSBOX_HOME_CONFIG} ${RR_DOSBOX_HOME}\nfi\n\n# Run the emulator\ndosbox \"$@\" > /emuelec/logs/dosbox.log 2>&1\n\nset_audio default\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-x/config/dosbox-x-SDL2-MT32.conf",
    "content": "# This is the configuration file for DOSBox SDL2. (Please use the latest version of DOSBox)\n# Lines starting with a # are comment lines and are ignored by DOSBox.\n# They are used to (briefly) document the effect of each option.\n\n[sdl]\n#       fullscreen: Start dosbox directly in fullscreen. (Press ALT-Enter to go back)\n#            vsync: Sync to Vblank IF supported by the output device and renderer (if relevant).\n#                   It can reduce screen flickering, but it can also result in a slow DOSBox.\n#   fullresolution: What resolution to use for fullscreen: original, desktop or a fixed size (e.g. 1024x768).\n#                     Using your monitor's native resolution with aspect=true might give the best results.\n#                     If you end up with small window on a large screen, try an output different from surface.\n# windowresolution: Scale the window to this size IF the output device supports hardware scaling.\n#                     (output=surface does not!)\n#           output: What video system to use for output.\n#                   Possible values: surface, texture, texturenb, opengl, openglnb.\n#        gl.shader: What set of GLSL shaders to use with an OpenGL output. Keep empty if this is not desired.\n#                     Note that in case it is used, the respective shader files must be found in the \"shaders\" subdirectory\n#                     relatively to where the default DOSBox configuration fiel is stored. For shader file naming convention,\n#                     suppose that you have a pair of shader files ready: mysample.vert and mysample.frag.\n#                     Then shader=mysample should be set.\n#                   \n# texture.renderer: Choose a renderer driver if output=texture or output=texturenb. Use output=auto for an automatic choice.\n#                   Possible values: auto, opengl, software.\n#         autolock: Mouse will automatically lock, if you click on the screen. (Press CTRL-F10 to unlock)\n#      sensitivity: Mouse sensitivity.\n#      waitonerror: Wait before closing the console if dosbox has an error.\n#         priority: Priority levels for dosbox. Second entry behind the comma is for when dosbox is not focused/minimized.\n#                     pause is only valid for the second entry.\n#                   Possible values: lowest, lower, normal, higher, highest, pause.\n#       mapperfile: File used to load/save the key/event mappings from. Resetmapper only works with the default value.\n\nfullscreen=true\n# Note that VSYNC is be very demanding\nvsync=false\nfullresolution=0x0\nwindowresolution=original\noutput=texture\n# Place shaders in /storage/.config/dosbox/shaders\ngl.shader=crt-easymode\ntexture.renderer=auto\nautolock=true\nsensitivity=100\nwaitonerror=true\npriority=highest,highest\n# Input mapper file is looked for in the same directory as the specified conf\nmapperfile=example.map\n\n[dosbox]\n# language: Select another language file.\n#  machine: The type of machine DOSBox tries to emulate.\n#           Possible values: hercules, cga, tandy, pcjr, ega, vgaonly, svga_s3, svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe.\n# captures: Directory where things like wave, midi, screenshot get captured.\n#  memsize: Amount of memory DOSBox has in megabytes.\n#             This value is best left at its default to avoid problems with some games,\n#             though few games might require a higher value.\n#             There is generally no speed advantage when raising this value.\n\nlanguage=\nmachine=svga_s3\ncaptures=capture\nmemsize=16\n\n[render]\n# frameskip: How many frames DOSBox skips before drawing one.\n#    aspect: Do aspect correction, if your output method doesn't support scaling this can slow things down!.\n#    scaler: Scaler used to enlarge/enhance low resolution modes. If 'forced' is appended,\n#            then the scaler will be used even if the result might not be desired.\n#            Possible values: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, hq2x, hq3x, 2xsai, super2xsai, supereagle, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x.\n\nframeskip=0\naspect=true\nscaler=none\n\n[cpu]\n#      core: CPU Core used in emulation. auto will switch to dynamic if available and\n#            appropriate.\n#            Possible values: auto, dynamic, normal, simple.\n#   cputype: CPU Type used in emulation. auto is the fastest choice.\n#            Possible values: auto, 386, 386_slow, 486_slow, pentium_slow, 386_prefetch.\n#    cycles: Amount of instructions DOSBox tries to emulate each millisecond.\n#            Setting this value too high results in sound dropouts and lags.\n#            Cycles can be set in 3 ways:\n#              'auto'          tries to guess what a game needs.\n#                              It usually works, but can fail for certain games.\n#              'fixed #number' will set a fixed amount of cycles. This is what you usually\n#                              need if 'auto' fails (Example: fixed 4000).\n#              'max'           will allocate as much cycles as your computer is able to\n#                              handle.\n#            Possible values: auto, fixed, max.\n#   cycleup: Amount of cycles to decrease/increase with keycombos.(CTRL-F11/CTRL-F12)\n# cycledown: Setting it lower than 100 will be a percentage.\n\ncore=auto\ncputype=auto\ncycles=auto\ncycleup=10\ncycledown=20\n\n[mixer]\n#   nosound: Enable silent mode, sound is still emulated though.\n#      rate: Mixer sample rate, setting any device's rate higher than this will probably lower their sound quality.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n# blocksize: Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged.\n#            Possible values: 1024, 2048, 4096, 8192, 512, 256.\n# prebuffer: How many milliseconds of data to keep on top of the blocksize.\n\nnosound=false\nrate=44100\nblocksize=1024\nprebuffer=20\n\n[midi]\n#              mpu401: Type of MPU-401 to emulate.\n#                      Possible values: intelligent, uart, none.\n#          mididevice: Device that will receive the MIDI data from MPU-401.\n#                      Possible values: default, win32, alsa, oss, coreaudio, coremidi, mt32, none.\n#          midiconfig: Special configuration options for the device driver. This is usually the id of the device you want to use.\n#                        or in the case of coreaudio, you can specify a soundfont here.\n#                        When using a Roland MT-32 rev. 0 as midi output device, some games may require a delay in order to prevent 'buffer overflow' issues.\n#                        In that case, add 'delaysysex', for example: midiconfig=2 delaysysex\n#                        See the README/Manual for more details.\n#         mt32.romdir: Name of the directory where MT-32 Control and PCM ROM files can be found. Emulation requires these files to work.\n#                        Accepted file names are as follows:\n#                          MT32_CONTROL.ROM or CM32L_CONTROL.ROM - control ROM file.\n#                          MT32_PCM.ROM or CM32L_PCM.ROM - PCM ROM file.\n# mt32.reverse.stereo: Reverse stereo channels for MT-32 output\n#        mt32.verbose: MT-32 debug logging\n#         mt32.thread: MT-32 rendering in separate thread\n#          mt32.chunk: Minimum milliseconds of data to render at once.\n#                      Increasing this value reduces rendering overhead which may improve performance but also increases audio lag.\n#                      Valid for rendering in separate thread only.\n#                      Possible values: 2, 3, 16, 99, 100.\n#      mt32.prebuffer: How many milliseconds of data to render ahead.\n#                      Increasing this value may help to avoid underruns but also increases audio lag.\n#                      Cannot be set less than or equal to mt32.chunk value.\n#                      Valid for rendering in separate thread only.\n#                      Possible values: 3, 4, 32, 199, 200.\n#       mt32.partials: The maximum number of partials playing simultaneously.\n#                      Possible values: 8, 9, 32, 255, 256.\n#            mt32.dac: MT-32 DAC input emulation mode\n#                      Nice = 0 - default\n#                      Produces samples at double the volume, without tricks.\n#                      Higher quality than the real devices\n#                      \n#                      Pure = 1\n#                      Produces samples that exactly match the bits output from the emulated LA32.\n#                      Nicer overdrive characteristics than the DAC hacks (it simply clips samples within range)\n#                      Much less likely to overdrive than any other mode.\n#                      Half the volume of any of the other modes.\n#                      Perfect for developers while debugging :)\n#                      \n#                      GENERATION1 = 2\n#                      Re-orders the LA32 output bits as in early generation MT-32s (according to Wikipedia).\n#                      Bit order at DAC (where each number represents the original LA32 output bit number, and XX means the bit is always low):\n#                      15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 XX\n#                      \n#                      GENERATION2 = 3\n#                      Re-orders the LA32 output bits as in later generations (personally confirmed on my CM-32L - KG).\n#                      Bit order at DAC (where each number represents the original LA32 output bit number):\n#                      15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 14\n#                      Possible values: 0, 1, 2, 3.\n#         mt32.analog: MT-32 analogue output emulation mode\n#                      Digital = 0\n#                      Only digital path is emulated. The output samples correspond to the digital output signal appeared at the DAC entrance.\n#                      Fastest mode.\n#                      \n#                      Coarse = 1\n#                      Coarse emulation of LPF circuit. High frequencies are boosted, sample rate remains unchanged.\n#                      A bit better sounding but also a bit slower.\n#                      \n#                      Accurate = 2 - default\n#                      Finer emulation of LPF circuit. Output signal is upsampled to 48 kHz to allow emulation of audible mirror spectra above 16 kHz,\n#                      which is passed through the LPF circuit without significant attenuation.\n#                      Sounding is closer to the analog output from real hardware but also slower than the modes 0 and 1.\n#                      \n#                      Oversampled = 3\n#                      Same as the default mode 2 but the output signal is 2x oversampled, i.e. the output sample rate is 96 kHz.\n#                      Even slower than all the other modes but better retains highest frequencies while further resampled in DOSBox mixer.\n#                      Possible values: 0, 1, 2, 3.\n#    mt32.reverb.mode: MT-32 reverb mode\n#                      Possible values: 0, 1, 2, 3, auto.\n#    mt32.reverb.time: MT-32 reverb decaying time\n#                      Possible values: 0, 1, 2, 3, 4, 5, 6, 7.\n#   mt32.reverb.level: MT-32 reverb level\n#                      Possible values: 0, 1, 2, 3, 4, 5, 6, 7.\n\nmpu401=intelligent\nmididevice=mt32\nmidiconfig=\n# Place MT-32 roms here\nmt32.romdir=/storage/roms/bios\nmt32.reverse.stereo=false\nmt32.verbose=false\nmt32.thread=false\nmt32.chunk=16\nmt32.prebuffer=32\nmt32.partials=32\nmt32.dac=0\nmt32.analog=2\nmt32.reverb.mode=auto\nmt32.reverb.time=5\nmt32.reverb.level=3\n\n[sblaster]\n#  sbtype: Type of Soundblaster to emulate. gb is Gameblaster.\n#          Possible values: sb1, sb2, sbpro1, sbpro2, sb16, gb, none.\n#  sbbase: The IO address of the soundblaster.\n#          Possible values: 220, 240, 260, 280, 2a0, 2c0, 2e0, 300.\n#     irq: The IRQ number of the soundblaster.\n#          Possible values: 7, 5, 3, 9, 10, 11, 12.\n#     dma: The DMA number of the soundblaster.\n#          Possible values: 1, 5, 0, 3, 6, 7.\n#    hdma: The High DMA number of the soundblaster.\n#          Possible values: 1, 5, 0, 3, 6, 7.\n# sbmixer: Allow the soundblaster mixer to modify the DOSBox mixer.\n# oplmode: Type of OPL emulation. On 'auto' the mode is determined by sblaster type. All OPL modes are Adlib-compatible, except for 'cms'.\n#          Possible values: auto, cms, opl2, dualopl2, opl3, opl3gold, none.\n#  oplemu: Provider for the OPL emulation. compat might provide better quality (see oplrate as well).\n#          Possible values: default, compat, fast.\n# oplrate: Sample rate of OPL music emulation. Use 49716 for highest quality (set the mixer rate accordingly).\n#          Possible values: 44100, 49716, 48000, 32000, 22050, 16000, 11025, 8000.\n\nsbtype=sb16\nsbbase=220\nirq=7\ndma=1\nhdma=5\nsbmixer=true\noplmode=auto\noplemu=default\noplrate=44100\n\n[gus]\n#      gus: Enable the Gravis Ultrasound emulation.\n#  gusrate: Sample rate of Ultrasound emulation.\n#           Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#  gusbase: The IO base address of the Gravis Ultrasound.\n#           Possible values: 240, 220, 260, 280, 2a0, 2c0, 2e0, 300.\n#   gusirq: The IRQ number of the Gravis Ultrasound.\n#           Possible values: 5, 3, 7, 9, 10, 11, 12.\n#   gusdma: The DMA channel of the Gravis Ultrasound.\n#           Possible values: 3, 0, 1, 5, 6, 7.\n# ultradir: Path to Ultrasound directory. In this directory\n#           there should be a MIDI directory that contains\n#           the patch files for GUS playback. Patch sets used\n#           with Timidity should work fine.\n\ngus=true\ngusrate=44100\ngusbase=240\ngusirq=5\ngusdma=3\n# Place GUS files in /storage/roms/dos/ULTRASND\nultradir=C:\\ULTRASND\n\n[speaker]\n# pcspeaker: Enable PC-Speaker emulation.\n#    pcrate: Sample rate of the PC-Speaker sound generation.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#     tandy: Enable Tandy Sound System emulation. For 'auto', emulation is present only if machine is set to 'tandy'.\n#            Possible values: auto, on, off.\n# tandyrate: Sample rate of the Tandy 3-Voice generation.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#    disney: Enable Disney Sound Source emulation. (Covox Voice Master and Speech Thing compatible).\n\npcspeaker=true\npcrate=44100\ntandy=auto\ntandyrate=44100\ndisney=true\n\n[joystick]\n# joysticktype: Type of joystick to emulate: auto (default), none,\n#               2axis (supports two joysticks),\n#               4axis (supports one joystick, first joystick used),\n#               4axis_2 (supports one joystick, second joystick used),\n#               fcs (Thrustmaster), ch (CH Flightstick).\n#               none disables joystick emulation.\n#               auto chooses emulation depending on real joystick(s).\n#               (Remember to reset dosbox's mapperfile if you saved it earlier)\n#               Possible values: auto, 2axis, 4axis, 4axis_2, fcs, ch, none.\n#        timed: enable timed intervals for axis. Experiment with this option, if your joystick drifts (away).\n#     autofire: continuously fires as long as you keep the button pressed.\n#       swap34: swap the 3rd and the 4th axis. can be useful for certain joysticks.\n#   buttonwrap: enable button wrapping at the number of emulated buttons.\n\njoysticktype=fcs\ntimed=true\nautofire=false\nswap34=false\nbuttonwrap=false\n\n[serial]\n# serial1: set type of device connected to com port.\n#          Can be disabled, dummy, modem, nullmodem, directserial.\n#          Additional parameters must be in the same line in the form of\n#          parameter:value. Parameter for all types is irq (optional).\n#          for directserial: realport (required), rxdelay (optional).\n#                           (realport:COM1 realport:ttyS0).\n#          for modem: listenport (optional).\n#          for nullmodem: server, rxdelay, txdelay, telnet, usedtr,\n#                         transparent, port, inhsocket (all optional).\n#          Example: serial1=modem listenport:5000\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial2: see serial1\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial3: see serial1\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial4: see serial1\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n\nserial1=dummy\nserial2=dummy\nserial3=disabled\nserial4=disabled\n\n[dos]\n#            xms: Enable XMS support.\n#            ems: Enable EMS support. The default (=true) provides the best\n#                 compatibility but certain applications may run better with\n#                 other choices, or require EMS support to be disabled (=false)\n#                 to work at all.\n#                 Possible values: true, emsboard, emm386, false.\n#            umb: Enable UMB support.\n# keyboardlayout: Language code of the keyboard layout (or none).\n\nxms=true\nems=true\numb=true\nkeyboardlayout=auto\n\n[ipx]\n# ipx: Enable ipx over UDP/IP emulation.\n\nipx=false\n\n[autoexec]\n# Lines in this section will be run at startup.\n\nmount c /storage/roms/dos\nc:\ncd example\nexample.exe\n#exit\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-x/config/dosbox-x-SDL2.conf",
    "content": "# This is the configuration file for DOSBox SDL2. (Please use the latest version of DOSBox)\n# Lines starting with a # are comment lines and are ignored by DOSBox.\n# They are used to (briefly) document the effect of each option.\n\n[sdl]\n#       fullscreen: Start dosbox directly in fullscreen. (Press ALT-Enter to go back)\n#            vsync: Sync to Vblank IF supported by the output device and renderer (if relevant).\n#                   It can reduce screen flickering, but it can also result in a slow DOSBox.\n#   fullresolution: What resolution to use for fullscreen: original, desktop or a fixed size (e.g. 1024x768).\n#                     Using your monitor's native resolution with aspect=true might give the best results.\n#                     If you end up with small window on a large screen, try an output different from surface.\n# windowresolution: Scale the window to this size IF the output device supports hardware scaling.\n#                     (output=surface does not!)\n#           output: What video system to use for output.\n#                   Possible values: surface, texture, texturenb, opengl, openglnb.\n#        gl.shader: What set of GLSL shaders to use with an OpenGL output. Keep empty if this is not desired.\n#                     Note that in case it is used, the respective shader files must be found in the \"shaders\" subdirectory\n#                     relatively to where the default DOSBox configuration fiel is stored. For shader file naming convention,\n#                     suppose that you have a pair of shader files ready: mysample.vert and mysample.frag.\n#                     Then shader=mysample should be set.\n#                   \n# texture.renderer: Choose a renderer driver if output=texture or output=texturenb. Use output=auto for an automatic choice.\n#                   Possible values: auto, opengl, software.\n#         autolock: Mouse will automatically lock, if you click on the screen. (Press CTRL-F10 to unlock)\n#      sensitivity: Mouse sensitivity.\n#      waitonerror: Wait before closing the console if dosbox has an error.\n#         priority: Priority levels for dosbox. Second entry behind the comma is for when dosbox is not focused/minimized.\n#                     pause is only valid for the second entry.\n#                   Possible values: lowest, lower, normal, higher, highest, pause.\n#       mapperfile: File used to load/save the key/event mappings from. Resetmapper only works with the default value.\n\nfullscreen=true\n# Note that VSYNC is be very demanding\nvsync=false\nfullresolution=0x0\nwindowresolution=original\noutput=texture\n# Place shaders in /storage/.config/dosbox/shaders\ngl.shader=crt-easymode\ntexture.renderer=auto\nautolock=true\nsensitivity=100\nwaitonerror=true\npriority=highest,highest\n# Input mapper file is looked for in the same directory as the specified conf\nmapperfile=example.map\n\n[dosbox]\n# language: Select another language file.\n#  machine: The type of machine DOSBox tries to emulate.\n#           Possible values: hercules, cga, tandy, pcjr, ega, vgaonly, svga_s3, svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe.\n# captures: Directory where things like wave, midi, screenshot get captured.\n#  memsize: Amount of memory DOSBox has in megabytes.\n#             This value is best left at its default to avoid problems with some games,\n#             though few games might require a higher value.\n#             There is generally no speed advantage when raising this value.\n\nlanguage=\nmachine=svga_s3\ncaptures=capture\nmemsize=16\n\n[render]\n# frameskip: How many frames DOSBox skips before drawing one.\n#    aspect: Do aspect correction, if your output method doesn't support scaling this can slow things down!.\n#    scaler: Scaler used to enlarge/enhance low resolution modes. If 'forced' is appended,\n#            then the scaler will be used even if the result might not be desired.\n#            Possible values: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, hq2x, hq3x, 2xsai, super2xsai, supereagle, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x.\n\nframeskip=0\naspect=true\nscaler=none\n\n[cpu]\n#      core: CPU Core used in emulation. auto will switch to dynamic if available and\n#            appropriate.\n#            Possible values: auto, dynamic, normal, simple.\n#   cputype: CPU Type used in emulation. auto is the fastest choice.\n#            Possible values: auto, 386, 386_slow, 486_slow, pentium_slow, 386_prefetch.\n#    cycles: Amount of instructions DOSBox tries to emulate each millisecond.\n#            Setting this value too high results in sound dropouts and lags.\n#            Cycles can be set in 3 ways:\n#              'auto'          tries to guess what a game needs.\n#                              It usually works, but can fail for certain games.\n#              'fixed #number' will set a fixed amount of cycles. This is what you usually\n#                              need if 'auto' fails (Example: fixed 4000).\n#              'max'           will allocate as much cycles as your computer is able to\n#                              handle.\n#            Possible values: auto, fixed, max.\n#   cycleup: Amount of cycles to decrease/increase with keycombos.(CTRL-F11/CTRL-F12)\n# cycledown: Setting it lower than 100 will be a percentage.\n\ncore=auto\ncputype=auto\ncycles=auto\ncycleup=10\ncycledown=20\n\n[mixer]\n#   nosound: Enable silent mode, sound is still emulated though.\n#      rate: Mixer sample rate, setting any device's rate higher than this will probably lower their sound quality.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n# blocksize: Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged.\n#            Possible values: 1024, 2048, 4096, 8192, 512, 256.\n# prebuffer: How many milliseconds of data to keep on top of the blocksize.\n\nnosound=false\nrate=44100\nblocksize=1024\nprebuffer=20\n\n[midi]\n#              mpu401: Type of MPU-401 to emulate.\n#                      Possible values: intelligent, uart, none.\n#          mididevice: Device that will receive the MIDI data from MPU-401.\n#                      Possible values: default, win32, alsa, oss, coreaudio, coremidi, mt32, none.\n#          midiconfig: Special configuration options for the device driver. This is usually the id of the device you want to use.\n#                        or in the case of coreaudio, you can specify a soundfont here.\n#                        When using a Roland MT-32 rev. 0 as midi output device, some games may require a delay in order to prevent 'buffer overflow' issues.\n#                        In that case, add 'delaysysex', for example: midiconfig=2 delaysysex\n#                        See the README/Manual for more details.\n#         mt32.romdir: Name of the directory where MT-32 Control and PCM ROM files can be found. Emulation requires these files to work.\n#                        Accepted file names are as follows:\n#                          MT32_CONTROL.ROM or CM32L_CONTROL.ROM - control ROM file.\n#                          MT32_PCM.ROM or CM32L_PCM.ROM - PCM ROM file.\n# mt32.reverse.stereo: Reverse stereo channels for MT-32 output\n#        mt32.verbose: MT-32 debug logging\n#         mt32.thread: MT-32 rendering in separate thread\n#          mt32.chunk: Minimum milliseconds of data to render at once.\n#                      Increasing this value reduces rendering overhead which may improve performance but also increases audio lag.\n#                      Valid for rendering in separate thread only.\n#                      Possible values: 2, 3, 16, 99, 100.\n#      mt32.prebuffer: How many milliseconds of data to render ahead.\n#                      Increasing this value may help to avoid underruns but also increases audio lag.\n#                      Cannot be set less than or equal to mt32.chunk value.\n#                      Valid for rendering in separate thread only.\n#                      Possible values: 3, 4, 32, 199, 200.\n#       mt32.partials: The maximum number of partials playing simultaneously.\n#                      Possible values: 8, 9, 32, 255, 256.\n#            mt32.dac: MT-32 DAC input emulation mode\n#                      Nice = 0 - default\n#                      Produces samples at double the volume, without tricks.\n#                      Higher quality than the real devices\n#                      \n#                      Pure = 1\n#                      Produces samples that exactly match the bits output from the emulated LA32.\n#                      Nicer overdrive characteristics than the DAC hacks (it simply clips samples within range)\n#                      Much less likely to overdrive than any other mode.\n#                      Half the volume of any of the other modes.\n#                      Perfect for developers while debugging :)\n#                      \n#                      GENERATION1 = 2\n#                      Re-orders the LA32 output bits as in early generation MT-32s (according to Wikipedia).\n#                      Bit order at DAC (where each number represents the original LA32 output bit number, and XX means the bit is always low):\n#                      15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 XX\n#                      \n#                      GENERATION2 = 3\n#                      Re-orders the LA32 output bits as in later generations (personally confirmed on my CM-32L - KG).\n#                      Bit order at DAC (where each number represents the original LA32 output bit number):\n#                      15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 14\n#                      Possible values: 0, 1, 2, 3.\n#         mt32.analog: MT-32 analogue output emulation mode\n#                      Digital = 0\n#                      Only digital path is emulated. The output samples correspond to the digital output signal appeared at the DAC entrance.\n#                      Fastest mode.\n#                      \n#                      Coarse = 1\n#                      Coarse emulation of LPF circuit. High frequencies are boosted, sample rate remains unchanged.\n#                      A bit better sounding but also a bit slower.\n#                      \n#                      Accurate = 2 - default\n#                      Finer emulation of LPF circuit. Output signal is upsampled to 48 kHz to allow emulation of audible mirror spectra above 16 kHz,\n#                      which is passed through the LPF circuit without significant attenuation.\n#                      Sounding is closer to the analog output from real hardware but also slower than the modes 0 and 1.\n#                      \n#                      Oversampled = 3\n#                      Same as the default mode 2 but the output signal is 2x oversampled, i.e. the output sample rate is 96 kHz.\n#                      Even slower than all the other modes but better retains highest frequencies while further resampled in DOSBox mixer.\n#                      Possible values: 0, 1, 2, 3.\n#    mt32.reverb.mode: MT-32 reverb mode\n#                      Possible values: 0, 1, 2, 3, auto.\n#    mt32.reverb.time: MT-32 reverb decaying time\n#                      Possible values: 0, 1, 2, 3, 4, 5, 6, 7.\n#   mt32.reverb.level: MT-32 reverb level\n#                      Possible values: 0, 1, 2, 3, 4, 5, 6, 7.\n\nmpu401=intelligent\n# FluidSynth Software Synthesizer\nmididevice=fluidsynth\nfluid.driver=pulseaudio\nfluid.soundfont=/usr/share/soundfonts/GeneralUser.sf2\n\n[sblaster]\n#  sbtype: Type of Soundblaster to emulate. gb is Gameblaster.\n#          Possible values: sb1, sb2, sbpro1, sbpro2, sb16, gb, none.\n#  sbbase: The IO address of the soundblaster.\n#          Possible values: 220, 240, 260, 280, 2a0, 2c0, 2e0, 300.\n#     irq: The IRQ number of the soundblaster.\n#          Possible values: 7, 5, 3, 9, 10, 11, 12.\n#     dma: The DMA number of the soundblaster.\n#          Possible values: 1, 5, 0, 3, 6, 7.\n#    hdma: The High DMA number of the soundblaster.\n#          Possible values: 1, 5, 0, 3, 6, 7.\n# sbmixer: Allow the soundblaster mixer to modify the DOSBox mixer.\n# oplmode: Type of OPL emulation. On 'auto' the mode is determined by sblaster type. All OPL modes are Adlib-compatible, except for 'cms'.\n#          Possible values: auto, cms, opl2, dualopl2, opl3, opl3gold, none.\n#  oplemu: Provider for the OPL emulation. compat might provide better quality (see oplrate as well).\n#          Possible values: default, compat, fast.\n# oplrate: Sample rate of OPL music emulation. Use 49716 for highest quality (set the mixer rate accordingly).\n#          Possible values: 44100, 49716, 48000, 32000, 22050, 16000, 11025, 8000.\n\nsbtype=sb16\nsbbase=220\nirq=7\ndma=1\nhdma=5\nsbmixer=true\noplmode=auto\noplemu=default\noplrate=44100\n\n[gus]\n#      gus: Enable the Gravis Ultrasound emulation.\n#  gusrate: Sample rate of Ultrasound emulation.\n#           Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#  gusbase: The IO base address of the Gravis Ultrasound.\n#           Possible values: 240, 220, 260, 280, 2a0, 2c0, 2e0, 300.\n#   gusirq: The IRQ number of the Gravis Ultrasound.\n#           Possible values: 5, 3, 7, 9, 10, 11, 12.\n#   gusdma: The DMA channel of the Gravis Ultrasound.\n#           Possible values: 3, 0, 1, 5, 6, 7.\n# ultradir: Path to Ultrasound directory. In this directory\n#           there should be a MIDI directory that contains\n#           the patch files for GUS playback. Patch sets used\n#           with Timidity should work fine.\n\ngus=true\ngusrate=44100\ngusbase=240\ngusirq=5\ngusdma=3\n# Place GUS files in /storage/roms/dos/ULTRASND\nultradir=C:\\ULTRASND\n\n[speaker]\n# pcspeaker: Enable PC-Speaker emulation.\n#    pcrate: Sample rate of the PC-Speaker sound generation.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#     tandy: Enable Tandy Sound System emulation. For 'auto', emulation is present only if machine is set to 'tandy'.\n#            Possible values: auto, on, off.\n# tandyrate: Sample rate of the Tandy 3-Voice generation.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#    disney: Enable Disney Sound Source emulation. (Covox Voice Master and Speech Thing compatible).\n\npcspeaker=true\npcrate=44100\ntandy=auto\ntandyrate=44100\ndisney=true\n\n[joystick]\n# joysticktype: Type of joystick to emulate: auto (default), none,\n#               2axis (supports two joysticks),\n#               4axis (supports one joystick, first joystick used),\n#               4axis_2 (supports one joystick, second joystick used),\n#               fcs (Thrustmaster), ch (CH Flightstick).\n#               none disables joystick emulation.\n#               auto chooses emulation depending on real joystick(s).\n#               (Remember to reset dosbox's mapperfile if you saved it earlier)\n#               Possible values: auto, 2axis, 4axis, 4axis_2, fcs, ch, none.\n#        timed: enable timed intervals for axis. Experiment with this option, if your joystick drifts (away).\n#     autofire: continuously fires as long as you keep the button pressed.\n#       swap34: swap the 3rd and the 4th axis. can be useful for certain joysticks.\n#   buttonwrap: enable button wrapping at the number of emulated buttons.\n\njoysticktype=fcs\ntimed=true\nautofire=false\nswap34=false\nbuttonwrap=false\n\n[serial]\n# serial1: set type of device connected to com port.\n#          Can be disabled, dummy, modem, nullmodem, directserial.\n#          Additional parameters must be in the same line in the form of\n#          parameter:value. Parameter for all types is irq (optional).\n#          for directserial: realport (required), rxdelay (optional).\n#                           (realport:COM1 realport:ttyS0).\n#          for modem: listenport (optional).\n#          for nullmodem: server, rxdelay, txdelay, telnet, usedtr,\n#                         transparent, port, inhsocket (all optional).\n#          Example: serial1=modem listenport:5000\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial2: see serial1\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial3: see serial1\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial4: see serial1\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n\nserial1=dummy\nserial2=dummy\nserial3=disabled\nserial4=disabled\n\n[dos]\n#            xms: Enable XMS support.\n#            ems: Enable EMS support. The default (=true) provides the best\n#                 compatibility but certain applications may run better with\n#                 other choices, or require EMS support to be disabled (=false)\n#                 to work at all.\n#                 Possible values: true, emsboard, emm386, false.\n#            umb: Enable UMB support.\n# keyboardlayout: Language code of the keyboard layout (or none).\n\nxms=true\nems=true\numb=true\nkeyboardlayout=auto\n\n[ipx]\n# ipx: Enable ipx over UDP/IP emulation.\n\nipx=false\n\n[autoexec]\n# Lines in this section will be run at startup.\n\nmount c /storage/roms/pc\nc:\n@echo off\necho ########################################################\necho #             DOSBox SDL2 default config               #\necho ########################################################\necho.\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-x/config/dosbox-x-SVN.conf",
    "content": "# This is the configuration file for DOSBox SVN. (Please use the latest version of DOSBox)\n# Lines starting with a # are comment lines and are ignored by DOSBox.\n# They are used to (briefly) document the effect of each option.\n\n[sdl]\n#       fullscreen: Start dosbox directly in fullscreen. (Press ALT-Enter to go back)\n#            vsync: Sync to Vblank IF supported by the output device and renderer (if relevant).\n#                     It can reduce screen flickering, but it can also result in a slow DOSBox.\n#   fullresolution: What resolution to use for fullscreen: original, desktop or a fixed size (e.g. 1024x768).\n#                     Using your monitor's native resolution with aspect=true might give the best results.\n#                     If you end up with small window on a large screen, try an output different from surface.On Windows 10 with display scaling (Scale and layout) set to a value above 100%, it is recommended\n#                     to use a lower full/windowresolution, in order to avoid window size problems.\n# windowresolution: Scale the window to this size IF the output device supports hardware scaling.\n#                     (output=surface does not!)\n#           output: What video system to use for output.\n#                     Possible values: surface, texture, texturenb.\n#        gl.shader: What set of GLSL shaders to use with an OpenGL output. Keep empty if this is not desired.\n#                       Note that in case it is used, the respective shader files must be found in the \"shaders\" subdirectory\n#                       relatively to where the default DOSBox configuration fiel is stored. For shader file naming convention,\n#                       suppose that you have a pair of shader files ready: mysample.vert and mysample.frag.\n#                       Then shader=mysample should be set.\n#                     \n# texture.renderer: Choose a renderer driver if output=texture or output=texturenb. Use output=auto for an automatic choice.\n#                     Possible values: auto, opengl, software.\n#         autolock: Mouse will automatically lock, if you click on the screen. (Press CTRL-F10 to unlock)\n#      sensitivity: Mouse sensitivity. The optional second parameter specifies vertical sensitivity (e.g. 100,-50).\n#      waitonerror: Wait before closing the console if dosbox has an error.\n#         priority: Priority levels for dosbox. Second entry behind the comma is for when dosbox is not focused/minimized.\n#                     pause is only valid for the second entry.\n#                     Possible values: lowest, lower, normal, higher, highest, pause.\n#       mapperfile: File used to load/save the key/event mappings from. Resetmapper only works with the default value.\n\nfullscreen       = true\nvsync            = false\nfullresolution   = 0x0\nwindowresolution = original\noutput           = texturenb\ngl.shader        = \ntexture.renderer = auto\nautolock         = true\nsensitivity      = 100\nwaitonerror      = true\npriority         = higher,normal\nmapperfile       = mapper-sdl2-SVN.map\n\n[dosbox]\n# language: Select another language file.\n#  machine: The type of machine DOSBox tries to emulate.\n#             Possible values: hercules, cga, tandy, pcjr, ega, vgaonly, svga_s3, svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe.\n# captures: Directory where things like wave, midi, screenshot get captured.\n#  memsize: Amount of memory DOSBox has in megabytes.\n#             This value is best left at its default to avoid problems with some games,\n#             though few games might require a higher value.\n#             There is generally no speed advantage when raising this value.\n\nlanguage = \nmachine  = svga_s3\ncaptures = capture\nmemsize  = 16\n\n[render]\n# frameskip: How many frames DOSBox skips before drawing one.\n#    aspect: Do aspect correction, if your output method doesn't support scaling this can slow things down!\n#    scaler: Scaler used to enlarge/enhance low resolution modes. If 'forced' is appended,\n#              then the scaler will be used even if the result might not be desired.\n#              To fit a scaler in the resolution used at full screen may require a border or side bars,\n#              to fill the screen entirely, depending on your hardware, a different scaler/fullresolution might work.\n#              Possible values: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, hq2x, hq3x, 2xsai, super2xsai, supereagle, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x.\n\nframeskip = 0\naspect    = true\nscaler    = none\n\n[cpu]\n#      core: CPU Core used in emulation. auto will switch to dynamic if available and\n#              appropriate.\n#              Possible values: auto, dynamic, normal, simple.\n#   cputype: CPU Type used in emulation. auto is the fastest choice.\n#              Possible values: auto, 386, 386_slow, 486_slow, pentium_slow, 386_prefetch.\n#    cycles: Amount of instructions DOSBox tries to emulate each millisecond.\n#              Setting this value too high results in sound dropouts and lags.\n#              Cycles can be set in 3 ways:\n#                'auto'          tries to guess what a game needs.\n#                                It usually works, but can fail for certain games.\n#                'fixed #number' will set a fixed amount of cycles. This is what you usually\n#                                need if 'auto' fails (Example: fixed 4000).\n#                'max'           will allocate as much cycles as your computer is able to\n#                                handle.\n#              Possible values: auto, fixed, max.\n#   cycleup: Amount of cycles to decrease/increase with keycombos.(CTRL-F11/CTRL-F12)\n# cycledown: Setting it lower than 100 will be a percentage.\n\ncore      = auto\ncputype   = auto\ncycles    = auto\ncycleup   = 10\ncycledown = 20\n\n[mixer]\n#   nosound: Enable silent mode, sound is still emulated though.\n#      rate: Mixer sample rate, setting any device's rate higher than this will probably lower their sound quality.\n#              Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n# blocksize: Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged.\n#              Possible values: 1024, 2048, 4096, 8192, 512, 256.\n# prebuffer: How many milliseconds of data to keep on top of the blocksize.\n\nnosound   = false\nrate      = 44100\nblocksize = 1024\nprebuffer = 25\n\n[midi]\n#                mpu401: Type of MPU-401 to emulate.\n#                          Possible values: intelligent, uart, none.\n#            mididevice: Device that will receive the MIDI data from MPU-401.\n#                          Possible values: default, win32, alsa, oss, coreaudio, coremidi, fluidsynth, mt32, none.\n#            midiconfig: Special configuration options for the device driver. This is usually the id or part of the name of the device you want to use (find the id/name with mixer/listmidi).\n#                          Or in the case of coreaudio, you can specify a soundfont here.\n#                          When using a Roland MT-32 rev. 0 as midi output device, some games may require a delay in order to prevent 'buffer overflow' issues.\n#                          In that case, add 'delaysysex', for example: midiconfig=2 delaysysex\n#                          See the README/Manual for more details.\n#          fluid.driver: Driver to use with Fluidsynth, not needed under Windows. Available drivers depend on what Fluidsynth was compiled with\n#                          Possible values: pulseaudio, alsa, oss, coreaudio, dsound, portaudio, sndman, jack, file, default.\n#       fluid.soundfont: Soundfont to use with Fluidsynth. One must be specified.\n#      fluid.samplerate: Sample rate to use with Fluidsynth.\n#            fluid.gain: Fluidsynth gain.\n#       fluid.polyphony: Fluidsynth polyphony.\n#           fluid.cores: Fluidsynth CPU cores to use, default.\n#         fluid.periods: Fluidsynth periods.\n#      fluid.periodsize: Fluidsynth period size.\n#          fluid.reverb: Fluidsynth use reverb.\n#                          Possible values: no, yes.\n#          fluid.chorus: Fluidsynth use chorus.\n#                          Possible values: no, yes.\n# fluid.reverb,roomsize: Fluidsynth reverb room size.\n#  fluid.reverb.damping: Fluidsynth reverb damping.\n#    fluid.reverb.width: Fluidsynth reverb width.\n#    fluid.reverb.level: Fluidsynth reverb level.\n#   fluid.chorus.number: Fluidsynth chorus voices\n#    fluid.chorus.level: Fluidsynth chorus level.\n#    fluid.chorus.speed: Fluidsynth chorus speed.\n#    fluid.chorus.depth: Fluidsynth chorus depth.\n#     fluid.chorus.type: Fluidsynth chorus type. 0 is sine wave, 1 is triangle wave.\n#                          Possible values: 0, 1.\n#           mt32.romdir: Name of the directory where MT-32 Control and PCM ROM files can be found. Emulation requires these files to work.\n#                            Accepted file names are as follows:\n#                              MT32_CONTROL.ROM or CM32L_CONTROL.ROM - control ROM file.\n#                              MT32_PCM.ROM or CM32L_PCM.ROM - PCM ROM file.\n#   mt32.reverse.stereo: Reverse stereo channels for MT-32 output\n#          mt32.verbose: MT-32 debug logging\n#           mt32.thread: MT-32 rendering in separate thread\n#            mt32.chunk: Minimum milliseconds of data to render at once.\n#                          Increasing this value reduces rendering overhead which may improve performance but also increases audio lag.\n#                          Valid for rendering in separate thread only.\n#                          Possible values: 2, 3, 16, 99, 100.\n#        mt32.prebuffer: How many milliseconds of data to render ahead.\n#                          Increasing this value may help to avoid underruns but also increases audio lag.\n#                          Cannot be set less than or equal to mt32.chunk value.\n#                          Valid for rendering in separate thread only.\n#                          Possible values: 3, 4, 32, 199, 200.\n#         mt32.partials: The maximum number of partials playing simultaneously.\n#                          Possible values: 8, 9, 32, 255, 256.\n#              mt32.dac: MT-32 DAC input emulation mode\n#                          Nice = 0 - default\n#                          Produces samples at double the volume, without tricks.\n#                          Higher quality than the real devices\n#                          \n#                          Pure = 1\n#                          Produces samples that exactly match the bits output from the emulated LA32.\n#                          Nicer overdrive characteristics than the DAC hacks (it simply clips samples within range)\n#                          Much less likely to overdrive than any other mode.\n#                          Half the volume of any of the other modes.\n#                          Perfect for developers while debugging :)\n#                          \n#                          GENERATION1 = 2\n#                          Re-orders the LA32 output bits as in early generation MT-32s (according to Wikipedia).\n#                          Bit order at DAC (where each number represents the original LA32 output bit number, and XX means the bit is always low):\n#                          15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 XX\n#                          \n#                          GENERATION2 = 3\n#                          Re-orders the LA32 output bits as in later generations (personally confirmed on my CM-32L - KG).\n#                          Bit order at DAC (where each number represents the original LA32 output bit number):\n#                          15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 14\n#                          Possible values: 0, 1, 2, 3.\n#           mt32.analog: MT-32 analogue output emulation mode\n#                          Digital = 0\n#                          Only digital path is emulated. The output samples correspond to the digital output signal appeared at the DAC entrance.\n#                          Fastest mode.\n#                          \n#                          Coarse = 1\n#                          Coarse emulation of LPF circuit. High frequencies are boosted, sample rate remains unchanged.\n#                          A bit better sounding but also a bit slower.\n#                          \n#                          Accurate = 2 - default\n#                          Finer emulation of LPF circuit. Output signal is upsampled to 48 kHz to allow emulation of audible mirror spectra above 16 kHz,\n#                          which is passed through the LPF circuit without significant attenuation.\n#                          Sounding is closer to the analog output from real hardware but also slower than the modes 0 and 1.\n#                          \n#                          Oversampled = 3\n#                          Same as the default mode 2 but the output signal is 2x oversampled, i.e. the output sample rate is 96 kHz.\n#                          Even slower than all the other modes but better retains highest frequencies while further resampled in DOSBox mixer.\n#                          Possible values: 0, 1, 2, 3.\n#      mt32.reverb.mode: MT-32 reverb mode\n#                          Possible values: 0, 1, 2, 3, auto.\n#      mt32.reverb.time: MT-32 reverb decaying time\n#                          Possible values: 0, 1, 2, 3, 4, 5, 6, 7.\n#     mt32.reverb.level: MT-32 reverb level\n#                          Possible values: 0, 1, 2, 3, 4, 5, 6, 7.\n\nmpu401 = intelligent\n# FluidSynth Software Synthesizer\nmididevice = fluidsynth\nfluid.driver = pulseaudio\nfluid.soundfont = /usr/share/soundfonts/GeneralUser.sf2\n\n[sblaster]\n#  sbtype: Type of Soundblaster to emulate. gb is Gameblaster.\n#            Possible values: sb1, sb2, sbpro1, sbpro2, sb16, gb, none.\n#  sbbase: The IO address of the soundblaster.\n#            Possible values: 220, 240, 260, 280, 2a0, 2c0, 2e0, 300.\n#     irq: The IRQ number of the soundblaster.\n#            Possible values: 7, 5, 3, 9, 10, 11, 12.\n#     dma: The DMA number of the soundblaster.\n#            Possible values: 1, 5, 0, 3, 6, 7.\n#    hdma: The High DMA number of the soundblaster.\n#            Possible values: 1, 5, 0, 3, 6, 7.\n# sbmixer: Allow the soundblaster mixer to modify the DOSBox mixer.\n# oplmode: Type of OPL emulation. On 'auto' the mode is determined by sblaster type. All OPL modes are Adlib-compatible, except for 'cms'.\n#            Possible values: auto, cms, opl2, dualopl2, opl3, opl3gold, none.\n#  oplemu: Provider for the OPL emulation. compat might provide better quality (see oplrate as well).\n#            Possible values: default, compat, fast, mame.\n# oplrate: Sample rate of OPL music emulation. Use 49716 for highest quality (set the mixer rate accordingly).\n#            Possible values: 44100, 49716, 48000, 32000, 22050, 16000, 11025, 8000.\n\nsbtype  = sb16\nsbbase  = 220\nirq     = 7\ndma     = 1\nhdma    = 5\nsbmixer = true\noplmode = auto\noplemu  = default\noplrate = 44100\n\n[gus]\n#      gus: Enable the Gravis Ultrasound emulation.\n#  gusrate: Sample rate of Ultrasound emulation.\n#             Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#  gusbase: The IO base address of the Gravis Ultrasound.\n#             Possible values: 240, 220, 260, 280, 2a0, 2c0, 2e0, 300.\n#   gusirq: The IRQ number of the Gravis Ultrasound.\n#             Possible values: 5, 3, 7, 9, 10, 11, 12.\n#   gusdma: The DMA channel of the Gravis Ultrasound.\n#             Possible values: 3, 0, 1, 5, 6, 7.\n# ultradir: Path to Ultrasound directory. In this directory\n#             there should be a MIDI directory that contains\n#             the patch files for GUS playback. Patch sets used\n#             with Timidity should work fine.\n\ngus      = false\ngusrate  = 44100\ngusbase  = 240\ngusirq   = 5\ngusdma   = 3\nultradir = C:\\ULTRASND\n\n[speaker]\n# pcspeaker: Enable PC-Speaker emulation.\n#    pcrate: Sample rate of the PC-Speaker sound generation.\n#              Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#     tandy: Enable Tandy Sound System emulation. For 'auto', emulation is present only if machine is set to 'tandy'.\n#              Possible values: auto, on, off.\n# tandyrate: Sample rate of the Tandy 3-Voice generation.\n#              Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#    disney: Enable Disney Sound Source emulation. (Covox Voice Master and Speech Thing compatible).\n\npcspeaker = true\npcrate    = 44100\ntandy     = auto\ntandyrate = 44100\ndisney    = true\n\n[joystick]\n#  joysticktype: Type of joystick to emulate: auto (default), none,\n#                  2axis (supports two joysticks),\n#                  4axis (supports one joystick, first joystick used),\n#                  4axis_2 (supports one joystick, second joystick used),\n#                  fcs (Thrustmaster), ch (CH Flightstick).\n#                  none disables joystick emulation.\n#                  auto chooses emulation depending on real joystick(s).\n#                  (Remember to reset dosbox's mapperfile if you saved it earlier)\n#                  Possible values: auto, 2axis, 4axis, 4axis_2, fcs, ch, none.\n#         timed: enable timed intervals for axis. Experiment with this option, if your joystick drifts (away).\n#      autofire: continuously fires as long as you keep the button pressed.\n#        swap34: swap the 3rd and the 4th axis. Can be useful for certain joysticks.\n#    buttonwrap: enable button wrapping at the number of emulated buttons.\n# circularinput: enable translation of circular input to square output.\n#                  Try enabling this if your left analog stick can only move in a circle.\n#      deadzone: the percentage of motion to ignore. 100 turns the stick into a digital one.\n\njoysticktype  = auto\ntimed         = true\nautofire      = false\nswap34        = false\nbuttonwrap    = false\ncircularinput = false\ndeadzone      = 10\n\n[serial]\n# serial1: set type of device connected to com port.\n#            Can be disabled, dummy, modem, nullmodem, directserial.\n#            Additional parameters must be in the same line in the form of\n#            parameter:value. Parameter for all types is irq (optional).\n#            for directserial: realport (required), rxdelay (optional).\n#                             (realport:COM1 realport:ttyS0).\n#            for modem: listenport (optional).\n#            for nullmodem: server, rxdelay, txdelay, telnet, usedtr,\n#                           transparent, port, inhsocket (all optional).\n#            Example: serial1=modem listenport:5000\n#            Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial2: see serial1\n#            Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial3: see serial1\n#            Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial4: see serial1\n#            Possible values: dummy, disabled, modem, nullmodem, directserial.\n\nserial1 = dummy\nserial2 = dummy\nserial3 = disabled\nserial4 = disabled\n\n[dos]\n#            xms: Enable XMS support.\n#            ems: Enable EMS support. The default (=true) provides the best\n#                   compatibility but certain applications may run better with\n#                   other choices, or require EMS support to be disabled (=false)\n#                   to work at all.\n#                   Possible values: true, emsboard, emm386, false.\n#            umb: Enable UMB support.\n# keyboardlayout: Language code of the keyboard layout (or none).\n\nxms            = true\nems            = true\numb            = true\nkeyboardlayout = auto\n\n[ipx]\n# ipx: Enable ipx over UDP/IP emulation.\n\nipx = false\n\n[autoexec]\n# Lines in this section will be run at startup.\n# You can put your MOUNT lines here.\n\n\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-x/config/dosbox-x.conf",
    "content": "# This is the configuration file for DOSBox SDL2. (Please use the latest version of DOSBox)\n# Lines starting with a # are comment lines and are ignored by DOSBox.\n# They are used to (briefly) document the effect of each option.\n\n[sdl]\n#       fullscreen: Start dosbox directly in fullscreen. (Press ALT-Enter to go back)\n#            vsync: Sync to Vblank IF supported by the output device and renderer (if relevant).\n#                   It can reduce screen flickering, but it can also result in a slow DOSBox.\n#   fullresolution: What resolution to use for fullscreen: original, desktop or a fixed size (e.g. 1024x768).\n#                     Using your monitor's native resolution with aspect=true might give the best results.\n#                     If you end up with small window on a large screen, try an output different from surface.\n# windowresolution: Scale the window to this size IF the output device supports hardware scaling.\n#                     (output=surface does not!)\n#           output: What video system to use for output.\n#                   Possible values: surface, texture, texturenb, opengl, openglnb.\n#        gl.shader: What set of GLSL shaders to use with an OpenGL output. Keep empty if this is not desired.\n#                     Note that in case it is used, the respective shader files must be found in the \"shaders\" subdirectory\n#                     relatively to where the default DOSBox configuration fiel is stored. For shader file naming convention,\n#                     suppose that you have a pair of shader files ready: mysample.vert and mysample.frag.\n#                     Then shader=mysample should be set.\n#                   \n# texture.renderer: Choose a renderer driver if output=texture or output=texturenb. Use output=auto for an automatic choice.\n#                   Possible values: auto, opengl, software.\n#         autolock: Mouse will automatically lock, if you click on the screen. (Press CTRL-F10 to unlock)\n#      sensitivity: Mouse sensitivity.\n#      waitonerror: Wait before closing the console if dosbox has an error.\n#         priority: Priority levels for dosbox. Second entry behind the comma is for when dosbox is not focused/minimized.\n#                     pause is only valid for the second entry.\n#                   Possible values: lowest, lower, normal, higher, highest, pause.\n#       mapperfile: File used to load/save the key/event mappings from. Resetmapper only works with the default value.\n\nfullscreen=true\n# Note that VSYNC is be very demanding\nvsync=false\nfullresolution=0x0\nwindowresolution=original\noutput=texture\n# Place shaders in /storage/.config/dosbox/shaders\ngl.shader=crt-easymode\ntexture.renderer=auto\nautolock=true\nsensitivity=100\nwaitonerror=true\npriority=highest,highest\n# Input mapper file is looked for in the same directory as the specified conf\nmapperfile=example.map\n\n[dosbox]\n# language: Select another language file.\n#  machine: The type of machine DOSBox tries to emulate.\n#           Possible values: hercules, cga, tandy, pcjr, ega, vgaonly, svga_s3, svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe.\n# captures: Directory where things like wave, midi, screenshot get captured.\n#  memsize: Amount of memory DOSBox has in megabytes.\n#             This value is best left at its default to avoid problems with some games,\n#             though few games might require a higher value.\n#             There is generally no speed advantage when raising this value.\n\nlanguage=\nmachine=svga_s3\ncaptures=capture\nmemsize=16\n\n[render]\n# frameskip: How many frames DOSBox skips before drawing one.\n#    aspect: Do aspect correction, if your output method doesn't support scaling this can slow things down!.\n#    scaler: Scaler used to enlarge/enhance low resolution modes. If 'forced' is appended,\n#            then the scaler will be used even if the result might not be desired.\n#            Possible values: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, hq2x, hq3x, 2xsai, super2xsai, supereagle, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x.\n\nframeskip=0\naspect=true\nscaler=none\n\n[cpu]\n#      core: CPU Core used in emulation. auto will switch to dynamic if available and\n#            appropriate.\n#            Possible values: auto, dynamic, normal, simple.\n#   cputype: CPU Type used in emulation. auto is the fastest choice.\n#            Possible values: auto, 386, 386_slow, 486_slow, pentium_slow, 386_prefetch.\n#    cycles: Amount of instructions DOSBox tries to emulate each millisecond.\n#            Setting this value too high results in sound dropouts and lags.\n#            Cycles can be set in 3 ways:\n#              'auto'          tries to guess what a game needs.\n#                              It usually works, but can fail for certain games.\n#              'fixed #number' will set a fixed amount of cycles. This is what you usually\n#                              need if 'auto' fails (Example: fixed 4000).\n#              'max'           will allocate as much cycles as your computer is able to\n#                              handle.\n#            Possible values: auto, fixed, max.\n#   cycleup: Amount of cycles to decrease/increase with keycombos.(CTRL-F11/CTRL-F12)\n# cycledown: Setting it lower than 100 will be a percentage.\n\ncore=auto\ncputype=auto\ncycles=auto\ncycleup=10\ncycledown=20\n\n[mixer]\n#   nosound: Enable silent mode, sound is still emulated though.\n#      rate: Mixer sample rate, setting any device's rate higher than this will probably lower their sound quality.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n# blocksize: Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged.\n#            Possible values: 1024, 2048, 4096, 8192, 512, 256.\n# prebuffer: How many milliseconds of data to keep on top of the blocksize.\n\nnosound=false\nrate=44100\nblocksize=1024\nprebuffer=20\n\n[midi]\n#              mpu401: Type of MPU-401 to emulate.\n#                      Possible values: intelligent, uart, none.\n#          mididevice: Device that will receive the MIDI data from MPU-401.\n#                      Possible values: default, win32, alsa, oss, coreaudio, coremidi, mt32, none.\n#          midiconfig: Special configuration options for the device driver. This is usually the id of the device you want to use.\n#                        or in the case of coreaudio, you can specify a soundfont here.\n#                        When using a Roland MT-32 rev. 0 as midi output device, some games may require a delay in order to prevent 'buffer overflow' issues.\n#                        In that case, add 'delaysysex', for example: midiconfig=2 delaysysex\n#                        See the README/Manual for more details.\n#         mt32.romdir: Name of the directory where MT-32 Control and PCM ROM files can be found. Emulation requires these files to work.\n#                        Accepted file names are as follows:\n#                          MT32_CONTROL.ROM or CM32L_CONTROL.ROM - control ROM file.\n#                          MT32_PCM.ROM or CM32L_PCM.ROM - PCM ROM file.\n# mt32.reverse.stereo: Reverse stereo channels for MT-32 output\n#        mt32.verbose: MT-32 debug logging\n#         mt32.thread: MT-32 rendering in separate thread\n#          mt32.chunk: Minimum milliseconds of data to render at once.\n#                      Increasing this value reduces rendering overhead which may improve performance but also increases audio lag.\n#                      Valid for rendering in separate thread only.\n#                      Possible values: 2, 3, 16, 99, 100.\n#      mt32.prebuffer: How many milliseconds of data to render ahead.\n#                      Increasing this value may help to avoid underruns but also increases audio lag.\n#                      Cannot be set less than or equal to mt32.chunk value.\n#                      Valid for rendering in separate thread only.\n#                      Possible values: 3, 4, 32, 199, 200.\n#       mt32.partials: The maximum number of partials playing simultaneously.\n#                      Possible values: 8, 9, 32, 255, 256.\n#            mt32.dac: MT-32 DAC input emulation mode\n#                      Nice = 0 - default\n#                      Produces samples at double the volume, without tricks.\n#                      Higher quality than the real devices\n#                      \n#                      Pure = 1\n#                      Produces samples that exactly match the bits output from the emulated LA32.\n#                      Nicer overdrive characteristics than the DAC hacks (it simply clips samples within range)\n#                      Much less likely to overdrive than any other mode.\n#                      Half the volume of any of the other modes.\n#                      Perfect for developers while debugging :)\n#                      \n#                      GENERATION1 = 2\n#                      Re-orders the LA32 output bits as in early generation MT-32s (according to Wikipedia).\n#                      Bit order at DAC (where each number represents the original LA32 output bit number, and XX means the bit is always low):\n#                      15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 XX\n#                      \n#                      GENERATION2 = 3\n#                      Re-orders the LA32 output bits as in later generations (personally confirmed on my CM-32L - KG).\n#                      Bit order at DAC (where each number represents the original LA32 output bit number):\n#                      15 13 12 11 10 09 08 07 06 05 04 03 02 01 00 14\n#                      Possible values: 0, 1, 2, 3.\n#         mt32.analog: MT-32 analogue output emulation mode\n#                      Digital = 0\n#                      Only digital path is emulated. The output samples correspond to the digital output signal appeared at the DAC entrance.\n#                      Fastest mode.\n#                      \n#                      Coarse = 1\n#                      Coarse emulation of LPF circuit. High frequencies are boosted, sample rate remains unchanged.\n#                      A bit better sounding but also a bit slower.\n#                      \n#                      Accurate = 2 - default\n#                      Finer emulation of LPF circuit. Output signal is upsampled to 48 kHz to allow emulation of audible mirror spectra above 16 kHz,\n#                      which is passed through the LPF circuit without significant attenuation.\n#                      Sounding is closer to the analog output from real hardware but also slower than the modes 0 and 1.\n#                      \n#                      Oversampled = 3\n#                      Same as the default mode 2 but the output signal is 2x oversampled, i.e. the output sample rate is 96 kHz.\n#                      Even slower than all the other modes but better retains highest frequencies while further resampled in DOSBox mixer.\n#                      Possible values: 0, 1, 2, 3.\n#    mt32.reverb.mode: MT-32 reverb mode\n#                      Possible values: 0, 1, 2, 3, auto.\n#    mt32.reverb.time: MT-32 reverb decaying time\n#                      Possible values: 0, 1, 2, 3, 4, 5, 6, 7.\n#   mt32.reverb.level: MT-32 reverb level\n#                      Possible values: 0, 1, 2, 3, 4, 5, 6, 7.\n\nmpu401=intelligent\n# FluidSynth Software Synthesizer\nmididevice=fluidsynth\nfluid.driver=pulseaudio\nfluid.soundfont=/usr/share/soundfonts/GeneralUser.sf2\n\n[sblaster]\n#  sbtype: Type of Soundblaster to emulate. gb is Gameblaster.\n#          Possible values: sb1, sb2, sbpro1, sbpro2, sb16, gb, none.\n#  sbbase: The IO address of the soundblaster.\n#          Possible values: 220, 240, 260, 280, 2a0, 2c0, 2e0, 300.\n#     irq: The IRQ number of the soundblaster.\n#          Possible values: 7, 5, 3, 9, 10, 11, 12.\n#     dma: The DMA number of the soundblaster.\n#          Possible values: 1, 5, 0, 3, 6, 7.\n#    hdma: The High DMA number of the soundblaster.\n#          Possible values: 1, 5, 0, 3, 6, 7.\n# sbmixer: Allow the soundblaster mixer to modify the DOSBox mixer.\n# oplmode: Type of OPL emulation. On 'auto' the mode is determined by sblaster type. All OPL modes are Adlib-compatible, except for 'cms'.\n#          Possible values: auto, cms, opl2, dualopl2, opl3, opl3gold, none.\n#  oplemu: Provider for the OPL emulation. compat might provide better quality (see oplrate as well).\n#          Possible values: default, compat, fast.\n# oplrate: Sample rate of OPL music emulation. Use 49716 for highest quality (set the mixer rate accordingly).\n#          Possible values: 44100, 49716, 48000, 32000, 22050, 16000, 11025, 8000.\n\nsbtype=sb16\nsbbase=220\nirq=7\ndma=1\nhdma=5\nsbmixer=true\noplmode=auto\noplemu=default\noplrate=44100\n\n[gus]\n#      gus: Enable the Gravis Ultrasound emulation.\n#  gusrate: Sample rate of Ultrasound emulation.\n#           Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#  gusbase: The IO base address of the Gravis Ultrasound.\n#           Possible values: 240, 220, 260, 280, 2a0, 2c0, 2e0, 300.\n#   gusirq: The IRQ number of the Gravis Ultrasound.\n#           Possible values: 5, 3, 7, 9, 10, 11, 12.\n#   gusdma: The DMA channel of the Gravis Ultrasound.\n#           Possible values: 3, 0, 1, 5, 6, 7.\n# ultradir: Path to Ultrasound directory. In this directory\n#           there should be a MIDI directory that contains\n#           the patch files for GUS playback. Patch sets used\n#           with Timidity should work fine.\n\ngus=true\ngusrate=44100\ngusbase=240\ngusirq=5\ngusdma=3\n# Place GUS files in /storage/roms/dos/ULTRASND\nultradir=C:\\ULTRASND\n\n[speaker]\n# pcspeaker: Enable PC-Speaker emulation.\n#    pcrate: Sample rate of the PC-Speaker sound generation.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#     tandy: Enable Tandy Sound System emulation. For 'auto', emulation is present only if machine is set to 'tandy'.\n#            Possible values: auto, on, off.\n# tandyrate: Sample rate of the Tandy 3-Voice generation.\n#            Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.\n#    disney: Enable Disney Sound Source emulation. (Covox Voice Master and Speech Thing compatible).\n\npcspeaker=true\npcrate=44100\ntandy=auto\ntandyrate=44100\ndisney=true\n\n[joystick]\n# joysticktype: Type of joystick to emulate: auto (default), none,\n#               2axis (supports two joysticks),\n#               4axis (supports one joystick, first joystick used),\n#               4axis_2 (supports one joystick, second joystick used),\n#               fcs (Thrustmaster), ch (CH Flightstick).\n#               none disables joystick emulation.\n#               auto chooses emulation depending on real joystick(s).\n#               (Remember to reset dosbox's mapperfile if you saved it earlier)\n#               Possible values: auto, 2axis, 4axis, 4axis_2, fcs, ch, none.\n#        timed: enable timed intervals for axis. Experiment with this option, if your joystick drifts (away).\n#     autofire: continuously fires as long as you keep the button pressed.\n#       swap34: swap the 3rd and the 4th axis. can be useful for certain joysticks.\n#   buttonwrap: enable button wrapping at the number of emulated buttons.\n\njoysticktype=fcs\ntimed=true\nautofire=false\nswap34=false\nbuttonwrap=false\n\n[serial]\n# serial1: set type of device connected to com port.\n#          Can be disabled, dummy, modem, nullmodem, directserial.\n#          Additional parameters must be in the same line in the form of\n#          parameter:value. Parameter for all types is irq (optional).\n#          for directserial: realport (required), rxdelay (optional).\n#                           (realport:COM1 realport:ttyS0).\n#          for modem: listenport (optional).\n#          for nullmodem: server, rxdelay, txdelay, telnet, usedtr,\n#                         transparent, port, inhsocket (all optional).\n#          Example: serial1=modem listenport:5000\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial2: see serial1\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial3: see serial1\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n# serial4: see serial1\n#          Possible values: dummy, disabled, modem, nullmodem, directserial.\n\nserial1=dummy\nserial2=dummy\nserial3=disabled\nserial4=disabled\n\n[dos]\n#            xms: Enable XMS support.\n#            ems: Enable EMS support. The default (=true) provides the best\n#                 compatibility but certain applications may run better with\n#                 other choices, or require EMS support to be disabled (=false)\n#                 to work at all.\n#                 Possible values: true, emsboard, emm386, false.\n#            umb: Enable UMB support.\n# keyboardlayout: Language code of the keyboard layout (or none).\n\nxms=true\nems=true\numb=true\nkeyboardlayout=auto\n\n[ipx]\n# ipx: Enable ipx over UDP/IP emulation.\n\nipx=false\n\n[autoexec]\n# Lines in this section will be run at startup.\n\nmount c /storage/roms/pc\nc:\n@echo off\necho ########################################################\necho #             DOSBox SDL2 default config               #\necho ########################################################\necho.\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-x/include/gpio.h",
    "content": "/*\n * <linux/gpio.h> - userspace ABI for the GPIO character devices\n *\n * Copyright (C) 2016 Linus Walleij\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 as published by\n * the Free Software Foundation.\n */\n#ifndef _GPIO_H_\n#define _GPIO_H_\n\n#include <linux/ioctl.h>\n#include <linux/types.h>\n\n/**\n * struct gpiochip_info - Information about a certain GPIO chip\n * @name: the Linux kernel name of this GPIO chip\n * @label: a functional name for this GPIO chip, such as a product\n * number, may be NULL\n * @lines: number of GPIO lines on this chip\n */\nstruct gpiochip_info {\n\tchar name[32];\n\tchar label[32];\n\t__u32 lines;\n};\n\n/* Informational flags */\n#define GPIOLINE_FLAG_KERNEL\t\t(1UL << 0) /* Line used by the kernel */\n#define GPIOLINE_FLAG_IS_OUT\t\t(1UL << 1)\n#define GPIOLINE_FLAG_ACTIVE_LOW\t(1UL << 2)\n#define GPIOLINE_FLAG_OPEN_DRAIN\t(1UL << 3)\n#define GPIOLINE_FLAG_OPEN_SOURCE\t(1UL << 4)\n\n/**\n * struct gpioline_info - Information about a certain GPIO line\n * @line_offset: the local offset on this GPIO device, fill this in when\n * requesting the line information from the kernel\n * @flags: various flags for this line\n * @name: the name of this GPIO line, such as the output pin of the line on the\n * chip, a rail or a pin header name on a board, as specified by the gpio\n * chip, may be NULL\n * @consumer: a functional name for the consumer of this GPIO line as set by\n * whatever is using it, will be NULL if there is no current user but may\n * also be NULL if the consumer doesn't set this up\n */\nstruct gpioline_info {\n\t__u32 line_offset;\n\t__u32 flags;\n\tchar name[32];\n\tchar consumer[32];\n};\n\n/* Maximum number of requested handles */\n#define GPIOHANDLES_MAX 64\n\n/* Linerequest flags */\n#define GPIOHANDLE_REQUEST_INPUT\t(1UL << 0)\n#define GPIOHANDLE_REQUEST_OUTPUT\t(1UL << 1)\n#define GPIOHANDLE_REQUEST_ACTIVE_LOW\t(1UL << 2)\n#define GPIOHANDLE_REQUEST_OPEN_DRAIN\t(1UL << 3)\n#define GPIOHANDLE_REQUEST_OPEN_SOURCE\t(1UL << 4)\n\n/**\n * struct gpiohandle_request - Information about a GPIO handle request\n * @lineoffsets: an array desired lines, specified by offset index for the\n * associated GPIO device\n * @flags: desired flags for the desired GPIO lines, such as\n * GPIOHANDLE_REQUEST_OUTPUT, GPIOHANDLE_REQUEST_ACTIVE_LOW etc, OR:ed\n * together. Note that even if multiple lines are requested, the same flags\n * must be applicable to all of them, if you want lines with individual\n * flags set, request them one by one. It is possible to select\n * a batch of input or output lines, but they must all have the same\n * characteristics, i.e. all inputs or all outputs, all active low etc\n * @default_values: if the GPIOHANDLE_REQUEST_OUTPUT is set for a requested\n * line, this specifies the default output value, should be 0 (low) or\n * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)\n * @consumer_label: a desired consumer label for the selected GPIO line(s)\n * such as \"my-bitbanged-relay\"\n * @lines: number of lines requested in this request, i.e. the number of\n * valid fields in the above arrays, set to 1 to request a single line\n * @fd: if successful this field will contain a valid anonymous file handle\n * after a GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value\n * means error\n */\nstruct gpiohandle_request {\n\t__u32 lineoffsets[GPIOHANDLES_MAX];\n\t__u32 flags;\n\t__u8 default_values[GPIOHANDLES_MAX];\n\tchar consumer_label[32];\n\t__u32 lines;\n\tint fd;\n};\n\n/**\n * struct gpiohandle_data - Information of values on a GPIO handle\n * @values: when getting the state of lines this contains the current\n * state of a line, when setting the state of lines these should contain\n * the desired target state\n */\nstruct gpiohandle_data {\n\t__u8 values[GPIOHANDLES_MAX];\n};\n\n#define GPIOHANDLE_GET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x08, struct gpiohandle_data)\n#define GPIOHANDLE_SET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x09, struct gpiohandle_data)\n\n/* Eventrequest flags */\n#define GPIOEVENT_REQUEST_RISING_EDGE\t(1UL << 0)\n#define GPIOEVENT_REQUEST_FALLING_EDGE\t(1UL << 1)\n#define GPIOEVENT_REQUEST_BOTH_EDGES\t((1UL << 0) | (1UL << 1))\n\n/**\n * struct gpioevent_request - Information about a GPIO event request\n * @lineoffset: the desired line to subscribe to events from, specified by\n * offset index for the associated GPIO device\n * @handleflags: desired handle flags for the desired GPIO line, such as\n * GPIOHANDLE_REQUEST_ACTIVE_LOW or GPIOHANDLE_REQUEST_OPEN_DRAIN\n * @eventflags: desired flags for the desired GPIO event line, such as\n * GPIOEVENT_REQUEST_RISING_EDGE or GPIOEVENT_REQUEST_FALLING_EDGE\n * @consumer_label: a desired consumer label for the selected GPIO line(s)\n * such as \"my-listener\"\n * @fd: if successful this field will contain a valid anonymous file handle\n * after a GPIO_GET_LINEEVENT_IOCTL operation, zero or negative value\n * means error\n */\nstruct gpioevent_request {\n\t__u32 lineoffset;\n\t__u32 handleflags;\n\t__u32 eventflags;\n\tchar consumer_label[32];\n\tint fd;\n};\n\n/**\n * GPIO event types\n */\n#define GPIOEVENT_EVENT_RISING_EDGE 0x01\n#define GPIOEVENT_EVENT_FALLING_EDGE 0x02\n\n/**\n * struct gpioevent_data - The actual event being pushed to userspace\n * @timestamp: best estimate of time of event occurrence, in nanoseconds\n * @id: event identifier\n */\nstruct gpioevent_data {\n\t__u64 timestamp;\n\t__u32 id;\n};\n\n#define GPIO_GET_CHIPINFO_IOCTL _IOR(0xB4, 0x01, struct gpiochip_info)\n#define GPIO_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x02, struct gpioline_info)\n#define GPIO_GET_LINEHANDLE_IOCTL _IOWR(0xB4, 0x03, struct gpiohandle_request)\n#define GPIO_GET_LINEEVENT_IOCTL _IOWR(0xB4, 0x04, struct gpioevent_request)\n\n#endif /* _GPIO_H_ */\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-x/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"dosbox-x\"\n\nif [[ \"${DEVICE}\" == \"Amlogic-old\" ]]; then\nPKG_VERSION=\"286e859e08b60a04c0b4c2bc952432122c957a9c\"\nPKG_SHA256=\"1a44710e38b05f67e76da74f46bbea4bb8b73ed4a28044575dfa24765bc65d7c\"\nelse\nPKG_VERSION=\"5e7f129f43683a0dd5a797d29b962a429d9bd0a7\"\nPKG_SHA256=\"edf31acd6310157a6617f9f25e2c99a39f40bcdffa6da3aeb78a0ed3db5655dc\"\nfi\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/joncampbell123/dosbox-x\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux glibc glib systemd dbus alsa-lib SDL2 SDL2_net SDL_sound libpng zlib libvorbis flac libogg fluidsynth-git munt\"\nPKG_LONGDESC=\"DOSBox-X fork of the DOSBox project.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+lto\"\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n\n  PKG_CONFIGURE_OPTS_TARGET=\"--prefix=/usr \\\n                             --enable-core-inline \\\n                             --enable-dynrec \\\n                             --enable-unaligned_memory \\\n                             --disable-sdl \\\n\t\t\t\t\t\t\t --enable-sdl2 \\\n\t\t\t\t\t\t\t --enable-mt32 \\\n                             --with-sdl2-prefix=${SYSROOT_PREFIX}/usr\"\n}\n\npre_make_target() {\n  # Define DOSBox version\n  sed -e \"s/SVN/SDL2/\" -i ${PKG_BUILD}/config.h\n\nif [[ \"${DEVICE}\" == \"GameForce\" ]] || [[ \"${DEVICE}\" == \"OdroidGoAdvance\" ]] ; then\n\t\tcp ${PKG_DIR}/include/gpio.h ${SYSROOT_PREFIX}/usr/include/linux\nfi\n \t\n}\n\npost_makeinstall_target() {\n  # Create config directory & install config\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/dosbox-x/\n  cp -a ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin/\n  cp -a ${PKG_DIR}/config/*  ${INSTALL}/usr/config/emuelec/configs/dosbox-x/\n  \nif [[ \"${DEVICE}\" == \"GameForce\" ]] || [[ \"${DEVICE}\" == \"OdroidGoAdvance\" ]] ; then\n\techo ${TOOLCHAIN}/${TARGET_NAME}/sysroot/usr/include/linux/gpio.h\n\trm ${TOOLCHAIN}/${TARGET_NAME}/sysroot/usr/include/linux/gpio.h\nfi\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-x/patches/000-arm_configure.patch",
    "content": "diff --git a/configure.ac b/configure.ac\nindex 407d553..e15473b 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -249,6 +249,12 @@ dnl The target cpu checks for dynamic cores\n AH_TEMPLATE(C_TARGETCPU,[The type of cpu this target has])\n AC_MSG_CHECKING(for target cpu type) \n case \"$host_cpu\" in\n+  arm)\n+    AC_DEFINE(C_TARGETCPU,ARMV7LE)\n+    AC_MSG_RESULT(ARMv7 Little Endian)\n+    c_targetcpu=\"arm\"\n+    c_unalignedmemory=yes\n+    ;;\n   x86_64 | amd64)\n     AC_DEFINE(C_TARGETCPU,X86_64)\n     AC_MSG_RESULT(x86-64 bit compatible)\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-x/patches/001-sdl-config.patch",
    "content": "diff --git a/acinclude.m4 b/acinclude.m4\nindex 9b85f7f..a2c7117 100644\n--- a/acinclude.m4\n+++ b/acinclude.m4\n@@ -14,35 +14,12 @@\r\n \r\n   SDL2_CONFIG=no\r\n   if test x$enable_sdl2enable = xyes ; then\r\n-    if test x$sdl2_exec_prefix != x ; then\r\n-      sdl2_args=\"$sdl2_args --exec-prefix=$sdl2_exec_prefix\"\r\n-      if test x${SDL2_CONFIG+set} != xset ; then\r\n-        SDL2_CONFIG=$sdl2_exec_prefix/bin/sdl2-config\r\n-      fi\r\n-    fi\r\n-    if test x$sdl2_prefix != x ; then\r\n-      sdl2_args=\"$sdl2_args --prefix=$sdl2_prefix\"\r\n-      if test x${SDL2_CONFIG+set} != xset ; then\r\n-        SDL2_CONFIG=$sdl2_prefix/bin/sdl2-config\r\n-      fi\r\n-    fi\r\n-\r\n-    if test -x vs/sdl2/linux-host/bin/sdl2-config ; then\r\n-      SDL2_CONFIG=vs/sdl2/linux-host/bin/sdl2-config\r\n-      PATH=vs/sdl2/linux-host/bin:$PATH\r\n-    fi\r\n+  SDL2_CONFIG=$sdl2_prefix/bin/sdl2-config\r\n \r\n     AC_PATH_PROG(SDL2_CONFIG, sdl2-config, no)\r\n-    min_sdl2_version=ifelse([$1], ,0.11.0,$1)\r\n-    AC_MSG_CHECKING(for SDL2 - version >= $min_sdl2_version)\r\n-    no_sdl2=\"\"\r\n-    if test \"$SDL2_CONFIG\" = \"no\" ; then\r\n-      no_sdl2=yes\r\n-    else\r\n-      SDL2_CFLAGS=`$SDL2_CONFIG $sdl2conf_args --cflags`\r\n-      SDL2_LIBS=`$SDL2_CONFIG $sdl2conf_args --libs`\r\n-      AC_DEFINE(C_SDL2,1)\r\n-    fi\r\n+    SDL2_CFLAGS=`$SDL2_CONFIG $sdl2conf_args --cflags`\r\n+    SDL2_LIBS=`$SDL2_CONFIG $sdl2conf_args --libs`\r\n+    AC_DEFINE(C_SDL2,1)\r\n   fi\r\n \r\n   AC_SUBST(SDL2_CFLAGS)\r\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-x/patches/003-dosboxconf.patch",
    "content": "diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp\nindex ec6ba7b..f689b3c 100644\n--- a/src/gui/sdlmain.cpp\n+++ b/src/gui/sdlmain.cpp\n@@ -947,7 +947,7 @@\n #elif defined(HAIKU)\n #define DEFAULT_CONFIG_FILE \"~/config/settings/dosbox-x/dosbox-x.conf\"\n #else /*linux freebsd*/\n-# define DEFAULT_CONFIG_FILE            \"/.dosboxrc\"\n+# define DEFAULT_CONFIG_FILE            \"/dosbox-x.conf\"\n #endif\n \n #if C_SET_PRIORITY\ndiff --git a/src/misc/cross.cpp b/src/misc/cross.cpp\nindex 05a5893..74daf41 100644\n--- a/src/misc/cross.cpp\n+++ b/src/misc/cross.cpp\n@@ -88,7 +88,7 @@\n #elif defined(LINUX)\n \tconst char *xdg_data_home = getenv(\"XDG_DATA_HOME\");\n \tconst std::string data_home = xdg_data_home && xdg_data_home[0] == '/' ? xdg_data_home: \"~/.local/share\";\n-\tin = data_home + \"/dosbox-x\";\n+\tin = \"/storage/.config/emuelec/configs/dosbox-x\";\n \tResolveHomedir(in);\n \n \t// Let's check if the above exists, otherwise use RESDIR\n@@ -112,14 +112,14 @@\n \tin = \"~/Library/Preferences\";\n \tResolveHomedir(in);\n #elif defined(HAIKU)\n-\tin = \"~/config/settings/dosbox-x\";\n+\tin = \"/storage/.config/emuelec/configs/dosbox-x\";\n \tResolveHomedir(in);\n #elif defined(RISCOS)\n \tin = \"/<Choices$Write>/DosBox-X\";\n #elif !defined(HX_DOS)\n \tconst char *xdg_conf_home = getenv(\"XDG_CONFIG_HOME\");\n \tconst std::string conf_home = xdg_conf_home && xdg_conf_home[0] == '/' ? xdg_conf_home: \"~/.config\";\n-\tin = conf_home + \"/dosbox-x\";\n+\tin = \"/storage/.config/emuelec/configs/dosbox-x\";\n \tResolveHomedir(in);\n #endif\n \t//LOG_MSG(\"Config dir: %s\", in.c_str());\n@@ -147,7 +147,7 @@\n \tResolveHomedir(in);\n \t//Don't create it. Assume it exists\n #elif defined(HAIKU)\n-\tin = \"~/config/settings/dosbox-x\";\n+\tin = \"/storage/.config/emuelec/configs/dosbox-x\";\n \tResolveHomedir(in);\n \tmkdir(in.c_str(),0700);\n #elif defined(RISCOS)\n@@ -156,7 +156,7 @@\n #elif !defined(HX_DOS)\n \tconst char *xdg_conf_home = getenv(\"XDG_CONFIG_HOME\");\n \tconst std::string conf_home = xdg_conf_home && xdg_conf_home[0] == '/' ? xdg_conf_home: \"~/.config\";\n-\tin = conf_home + \"/dosbox-x\";\n+\tin = \"/storage/.config/emuelec/configs/dosbox-x\";\n \tResolveHomedir(in);\n \tmkdir(in.c_str(),0700);\n #endif\n"
  },
  {
    "path": "packages/sx05re/emulators/dosbox-x/scripts/dosbox-x.start",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)\n\n# Source predefined functions and variables\n. /etc/profile\n\nset_audio pulseaudio\n\n# Set common variables\nRR_DOSBOX_HOME=/storage/.dosbox\nRR_DOSBOX_HOME_CONFIG=/storage/.config/emuelec/configs/dosbox-x\n\n# Create symlink to config dir\nif [ ! -L ${RR_DOSBOX_HOME} ]; then\n  if [ -d ${RR_DOSBOX_HOME} ]; then\n    cp -rf ${RR_DOSBOX_HOME} ${RR_DOSBOX_HOME_CONFIG}\n    rm -rf ${RR_DOSBOX_HOME}\n  fi\n  ln -sf ${RR_DOSBOX_HOME_CONFIG} ${RR_DOSBOX_HOME}\nfi\n\n# Run the emulator\nARG=\"$(echo $1 | sed 's=.*/==;s/\\.[^.]*$//')\" \n\ndosbox-x -c \"${ARG}\" > /emuelec/logs/dosbox-x.log 2>&1\n\nset_audio default\n"
  },
  {
    "path": "packages/sx05re/emulators/droidports/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"droidports\"\nPKG_VERSION=\"9e43646b43ca3bf80a50edfc1a212d2c702b617d\"\nPKG_ARCH=\"arm\"\nPKG_SITE=\"https://github.com/JohnnyonFlame/droidports\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_image openal-soft bzip2 libzip libpng\"\nPKG_LONGDESC=\"A repository for experimenting with elf loading and in-place patching of android native libraries on non-android operating systems.\"\nPKG_TOOLCHAIN=\"cmake\"\n\npre_configure_target() {\n\tPKG_CMAKE_OPTS_TARGET=\" -DCMAKE_BUILD_TYPE=Release -DPLATFORM=linux -DPORT=gmloader -DUSE_BUILTIN_FREETYPE=ON\"\n}\n\nmakeinstall_target() {\n\tmkdir -p ${INSTALL}/usr/bin\n\tcp ${PKG_BUILD}/.${TARGET_NAME}/gmloader ${INSTALL}/usr/bin\n\tcp ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n\tmkdir -p ${INSTALL}/usr/config/emuelec/configs/gmloader\n\tcp ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/gmloader\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/droidports/patches/01-EmuELEC-set-save-path.patch",
    "content": "--- a/ports/gmloader/libyoyo.c\n+++ b/ports/gmloader/libyoyo.c\n@@ -172,7 +172,7 @@\n     //TODO:: Update psvita sdk and use the newlib mkdir.\n #ifndef PLATFORM_VITA\n     // For linux targets\n-\tsnprintf(platform_savedir, sizeof(platform_savedir), \"%s/.config/%s/\", getenv(\"HOME\"), gamename);\n+\tsnprintf(platform_savedir, sizeof(platform_savedir), \"%s/.config/gmloader/%s/\", getenv(\"HOME\"), gamename);\n \twarning(\"Saving to folder %s.\\n\", platform_savedir);\n \n     char mkdir_cmd[PATH_MAX];\n"
  },
  {
    "path": "packages/sx05re/emulators/droidports/scripts/gmloader.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n[ ! -e \"/storage/roms/ports/gmloader/libc++_shared.so\" ] && cp \"/usr/config/emuelec/configs/gmloader/libc++_shared.so\" \"/storage/roms/ports/gmloader/libc++_shared.so\"\n\ncd /storage/roms/ports/gmloader\ngmloader \"${1}\"\n"
  },
  {
    "path": "packages/sx05re/emulators/duckstation/config/settings.ini",
    "content": "[Main]\nSettingsVersion = 3\nStartFullscreen = true\n\n[BIOS]\nSearchDirectory = /storage/roms/bios\nPathNTSCU = \nPathNTSCJ = \nPathPAL = \nPatchTTYEnable = false\nPatchFastBoot = true\n\n[Controller1]\nType = AnalogController\nButtonUp = Controller0/Button11\nButtonDown = Controller0/Button12\nButtonLeft = Controller0/Button13\nButtonRight = Controller0/Button14\nButtonSelect = Controller0/Button4\nButtonStart = Controller0/Button6\nButtonTriangle = Controller0/Button3\nButtonCross = Controller0/Button0\nButtonSquare = Controller0/Button2\nButtonCircle = Controller0/Button1\nButtonL1 = Controller0/Button9\nButtonL2 = Controller0/+Axis4\nButtonR1 = Controller0/Button10\nButtonR2 = Controller0/+Axis5\nButtonL3 = Controller0/Button7\nButtonR3 = Controller0/Button8\nAxisLeftX = Controller0/Axis0\nAxisLeftY = Controller0/Axis1\nAxisRightX = Controller0/Axis2\nAxisRightY = Controller0/Axis3\nButtonAnalog = Controller0/Button5\n\n[Hotkeys]\nOpenQuickMenu = Controller0/Button5\n\n[Logging]\nLogLevel = Error\nLogFilter = \nLogToConsole = false\nLogToDebug = false\nLogToWindow = false\nLogToFile = false\n\n[Display]\nShowFPS = true\nShowVPS = true\nShowSpeed = true\n\n[Audio]\nBackend = SDL\n"
  },
  {
    "path": "packages/sx05re/emulators/duckstation/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"duckstation\"\nPKG_VERSION=\"fd3507c16d098fb32806c281caaefb205946da8a\"\n#PKG_VERSION=\"35f272b336667cffd35d149d9da6f85e958ddfa2\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/stenzek/duckstation\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 nasm:host ${OPENGLES} libevdev\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Fast PlayStation 1 emulator for x86-64/AArch32/AArch64 \"\nPKG_TOOLCHAIN=\"cmake\"\n\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\tEXTRA_OPTS+=\" -DUSE_DRMKMS=ON -DUSE_FBDEV=OFF -DUSE_MALI=OFF\"\nelse\n\tEXTRA_OPTS+=\" -DUSE_DRMKMS=OFF -DUSE_FBDEV=ON -DUSE_MALI=ON\"\nfi\n\npre_configure_target() {\n\tPKG_CMAKE_OPTS_TARGET+=\" -DANDROID=OFF \\\n\t                         -DENABLE_DISCORD_PRESENCE=OFF \\\n\t                         -DUSE_X11=OFF \\\n                             -DBUILD_LIBRETRO_CORE=OFF \\\n\t\t\t\t             -DBUILD_GO2_FRONTEND=OFF \\\n\t                         -DBUILD_QT_FRONTEND=OFF \\\n\t                         -DBUILD_NOGUI_FRONTEND=ON \\\n\t                         -DCMAKE_BUILD_TYPE=Release \\\n\t                         -DBUILD_SHARED_LIBS=OFF \\\n\t                         -DUSE_SDL2=ON \\\n\t                         -DENABLE_CHEEVOS=ON \\\n\t                         -DHAVE_EGL=ON \\\n\t                         ${EXTRA_OPTS}\"\n\nif [ \"${DEVICE}\" == \"Amlogic-old\" ]; then\n\tcp -rf $(get_build_dir libevdev)/include/linux/linux/input-event-codes.h ${SYSROOT_PREFIX}/usr/include/linux/\nfi\n\n}\n\npost_make_target() {\nif [ \"${DEVICE}\" == \"Amlogic-old\" ]; then\n  rm ${SYSROOT_PREFIX}/usr/include/linux/input-event-codes.h\nfi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp -rf ${PKG_BUILD}/.${TARGET_NAME}/bin/duckstation-nogui ${INSTALL}/usr/bin\n  cp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n  \n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/duckstation\n  cp -rf ${PKG_BUILD}/.${TARGET_NAME}/bin/* ${INSTALL}/usr/config/emuelec/configs/duckstation\n  cp -rf ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/duckstation\n  rm -rf ${INSTALL}/usr/config/emuelec/configs/duckstation/database/gamecontrollerdb.txt\n  ln -sf /storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt ${INSTALL}/usr/config/emuelec/configs/duckstation/database/gamecontrollerdb.txt\n  \n  rm -rf ${INSTALL}/usr/config/emuelec/configs/duckstation/duckstation-nogui\n  rm -rf ${INSTALL}/usr/config/emuelec/configs/duckstation/common-tests\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/duckstation/patches/000-fix-cmake.patch",
    "content": "diff -u -r /home/romain/duckstation/CMakeLists.txt ./CMakeLists.txt\n--- /home/romain/duckstation/CMakeLists.txt\t2021-02-13 00:29:48.693304818 +0100\n+++ ./CMakeLists.txt\t2021-02-13 00:52:42.082500283 +0100\n@@ -35,6 +35,7 @@\n endif()\n if(LINUX OR ANDROID)\n   option(USE_EGL \"Support EGL OpenGL context creation\" ON)\n+  option(USE_MALI \"Link with libmali for EGL support\" OFF)\n endif()\n if(LINUX AND NOT ANDROID)\n   option(USE_DRMKMS \"Support DRM/KMS display and contexts\" OFF)\n@@ -254,7 +254,7 @@\n elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL \"aarch64\" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL \"arm64\")\n   set(CPU_ARCH \"aarch64\")\n elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL \"arm\" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL \"armv7-a\" OR\n-       ${CMAKE_SYSTEM_PROCESSOR} STREQUAL \"armv7l\")\n+       ${CMAKE_SYSTEM_PROCESSOR} STREQUAL \"armv7l\" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL \"armv8l\")\n   set(CPU_ARCH \"aarch32\")\n   if(ANDROID)\n     # Force ARM mode, since apparently ANDROID_ARM_MODE isn't working..\ndiff -u -r /home/romain/duckstation/CMakeModules/FindEGL.cmake ./CMakeModules/FindEGL.cmake\n--- /home/romain/duckstation/CMakeModules/FindEGL.cmake\t2021-02-13 00:29:48.693304818 +0100\n+++ ./CMakeModules/FindEGL.cmake\t2021-02-13 00:45:35.564462969 +0100\n@@ -86,6 +86,17 @@\n         ${PKG_EGL_LIBRARY_DIRS}\n )\n \n+if(USE_MALI)\n+pkg_check_modules(PKG_MALI QUIET mali)\n+find_library(MALI_LIBRARY\n+    NAMES\n+        mali\n+    HINTS\n+        ${PKG_MALI_LIBRARY_DIRS}\n+)\n+endif()\n+\n+\n # NB: We do *not* use the version information from pkg-config, as that\n #     is the implementation version (eg: the Mesa version)\n if(EGL_INCLUDE_DIR)\n@@ -117,7 +128,11 @@\n \n cmake_push_check_state(RESET)\n list(APPEND CMAKE_REQUIRED_LIBRARIES \"${EGL_LIBRARY}\")\n+if(USE_MALI)\n+list(APPEND CMAKE_REQUIRED_LIBRARIES \"${MALI_LIBRARY}\")\n+endif()\n list(APPEND CMAKE_REQUIRED_INCLUDES \"${EGL_INCLUDE_DIR}\")\n+list(APPEND CMAKE_REQUIRED_DEFINITIONS \"-DEGL_NO_X11 -DUSE_X11=NO\")\n \n check_cxx_source_compiles(\"\n #include <EGL/egl.h>\n@@ -161,7 +176,11 @@\n mark_as_advanced(EGL_LIBRARY EGL_INCLUDE_DIR HAVE_EGL)\n \n # compatibility variables\n+if (USE_MALI)\n+set(EGL_LIBRARIES ${EGL_LIBRARY} ${MALI_LIBRARY})\n+else()\n set(EGL_LIBRARIES ${EGL_LIBRARY})\n+endif()\n set(EGL_INCLUDE_DIRS ${EGL_INCLUDE_DIR})\n set(EGL_VERSION_STRING ${EGL_VERSION})\n \nSeulement dans ./CMakeModules: FindEGL.cmake.orig\ndiff -u -r /home/romain/duckstation/dep/glad/CMakeLists.txt ./dep/glad/CMakeLists.txt\n--- /home/romain/duckstation/dep/glad/CMakeLists.txt\t2021-02-13 00:29:48.765302377 +0100\n+++ ./dep/glad/CMakeLists.txt\t2021-02-13 00:42:20.848512028 +0100\n@@ -17,8 +17,9 @@\n   target_sources(glad PRIVATE src/glad_wgl.c)\n else()\n   if(USE_EGL)\n+    target_compile_definitions(glad PRIVATE -DEGL_NO_X11)\n     target_sources(glad PRIVATE src/glad_egl.c)\n-    target_link_libraries(glad PRIVATE EGL::EGL)\n+    target_link_libraries(glad PRIVATE EGL)\n   endif()\n   if(USE_X11)\n     target_sources(glad PRIVATE src/glad_glx.c)\ndiff -u -r /home/romain/duckstation/src/common/CMakeLists.txt ./src/common/CMakeLists.txt\n--- /home/romain/duckstation/src/common/CMakeLists.txt\t2021-02-13 00:29:48.885298307 +0100\n+++ ./src/common/CMakeLists.txt\t2021-02-13 00:42:20.848512028 +0100\n@@ -175,12 +175,13 @@\n     )\n   endif()\n   if(USE_DRMKMS)\n+    target_compile_definitions(common PRIVATE \"-DEGL_NO_X11=1\")\n     target_compile_definitions(common PRIVATE \"-DUSE_GBM=1\")\n     target_sources(common PRIVATE\n       gl/context_egl_gbm.cpp\n       gl/context_egl_gbm.h\n     )\n-    target_link_libraries(common PUBLIC GBM::GBM)\n+    target_link_libraries(common PUBLIC gbm EGL)\n   endif()\n endif()\n \ndiff -u -r /home/romain/duckstation/src/duckstation-nogui/CMakeLists.txt ./src/duckstation-nogui/CMakeLists.txt\n--- /home/romain/duckstation/src/duckstation-nogui/CMakeLists.txt\t2021-02-13 00:29:48.901297765 +0100\n+++ ./src/duckstation-nogui/CMakeLists.txt\t2021-02-13 00:56:19.913224314 +0100\n@@ -29,6 +29,10 @@\n   target_compile_definitions(duckstation-nogui PRIVATE \"-DUSE_LIBEVDEV=1\")\n   target_include_directories(duckstation-nogui PRIVATE ${LIBEVDEV_INCLUDE_DIRS})\n   target_link_libraries(duckstation-nogui PRIVATE ${LIBEVDEV_LIBRARIES})\n+if (USE_MALI)\n+  target_link_libraries(duckstation-nogui PRIVATE ${MALI_LIBRARY})\n+endif()\n+\n endif()\n \n if(WIN32)\n"
  },
  {
    "path": "packages/sx05re/emulators/duckstation/patches/001-path-program.patch",
    "content": "diff --git a/src/common/file_system.cpp b/src/common/file_system.cpp\nindex 6a24732..a287703 100644\n--- a/src/common/file_system.cpp\n+++ b/src/common/file_system.cpp\n@@ -1179,6 +1179,8 @@ bool FileSystem::DeleteDirectory(const char* Path, bool Recursive)\n \n std::string GetProgramPath()\n {\n+  return \"/emuelec/configs/duckstation\";\n+\n   std::wstring buffer;\n   buffer.resize(MAX_PATH);\n \n@@ -1549,6 +1551,8 @@ bool DeleteDirectory(const char* Path, bool Recursive)\n \n std::string GetProgramPath()\n {\n+  return \"/emuelec/configs/duckstation\";\n+\n #if defined(__linux__)\n   static const char* exeFileName = \"/proc/self/exe\";\n \n"
  },
  {
    "path": "packages/sx05re/emulators/duckstation/patches/002-path-getdirectory.patch",
    "content": "diff --git a/src/common/file_system.cpp b/src/common/file_system.cpp\nindex ceb2f08..0fa5a04 100644\n--- a/src/common/file_system.cpp\n+++ b/src/common/file_system.cpp\n@@ -683,6 +683,9 @@ std::string GetDisplayNameFromPath(const std::string_view& path)\n \n std::string_view GetPathDirectory(const std::string_view& path)\n {\n+\n+  return \"/emuelec/configs/duckstation\";\n+\n   std::string::size_type pos = GetLastSeperatorPosition(path, false);\n   if (pos == std::string_view::npos)\n     return {};\n"
  },
  {
    "path": "packages/sx05re/emulators/duckstation/patches/003-path-language.patch",
    "content": "diff --git a/src/duckstation-qt/qthostinterface.cpp b/src/duckstation-qt/qthostinterface.cpp\nindex 8052278..4f338d7 100644\n--- a/src/duckstation-qt/qthostinterface.cpp\n+++ b/src/duckstation-qt/qthostinterface.cpp\n@@ -137,7 +137,7 @@ void QtHostInterface::installTranslator()\n   const QString language(QString::fromStdString(GetStringSettingValue(\"Main\", \"Language\", \"en\")));\n \n   // install the base qt translation first\n-  const QString base_dir(QStringLiteral(\"%1/translations\").arg(qApp->applicationDirPath()));\n+  const QString base_dir(QStringLiteral(\"%1/translations\").arg(\"/emuelec/configs/duckstation\"));\n   const QString base_path(QStringLiteral(\"%1/qtbase_%2.qm\").arg(base_dir).arg(language));\n   if (QFile::exists(base_path))\n   {\n"
  },
  {
    "path": "packages/sx05re/emulators/duckstation/patches/006-maxbuttons.patch",
    "content": "diff --git a/src/frontend-common/controller_interface.h b/src/frontend-common/controller_interface.h\nindex f97d0f6..563b5f4 100644\n--- a/src/frontend-common/sdl_controller_interface.h\n+++ b/src/frontend-common/sdl_controller_interface.h\n@@ -46,7 +46,7 @@\n   enum : int\n   {\n     MAX_NUM_AXES = 7,\n-    MAX_NUM_BUTTONS = 16,\n+    MAX_NUM_BUTTONS = 256,\n   };\n \n   struct ControllerData\n"
  },
  {
    "path": "packages/sx05re/emulators/duckstation/scripts/duckstation.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n. /etc/profile\n\nLOCAL_CONFIG=\"/storage/.local/share\"\nCONFIG_DIR=\"/emuelec/configs/duckstation\"\n\nmkdir -p \"${LOCAL_CONFIG}\"\n\nif [ ! -d \"${CONFIG_DIR}\" ]; then\n    mkdir -p \"${CONFIG_DIR}\"\n\tcp -rf \"/usr/config/emuelec/configs/duckstation/*\" \"${CONFIG_DIR}\"\nfi\n\n# If texture folder exists and not symlink, remove it and create symlink to textures folder in /storage/roms/psx/textures to enable texture replacement\nif [ ! -L \"${CONFIG_DIR}/textures\" ]; then\n    rm -r \"${CONFIG_DIR}/textures\"\n    ln -s /storage/roms/psx/textures \"${CONFIG_DIR}\"\nfi\n\nif [ ! -L \"${LOCAL_CONFIG}/duckstation\" ]; then\n\trm -rf \"${LOCAL_CONFIG}/duckstation\"\n    ln -sf \"${CONFIG_DIR}\" \"${LOCAL_CONFIG}\"\nfi\n\nAUTOGP=$(get_ee_setting duckstation_auto_gamepad)\nif [[ \"${AUTOGP}\" == \"1\" ]]; then\n\tset_duckstation_joy.sh\nfi\n\nduckstationcheevos.sh\n\n\nif [[ \"${1}\" == *\"duckstation_gui.pbp\"* ]]; then\n    duckstation-nogui -fullscreen\nelse\n    duckstation-nogui -fullscreen -settings \"${CONFIG_DIR}/settings.ini\" -- \"${1}\" > /dev/null 2>&1\nfi\n"
  },
  {
    "path": "packages/sx05re/emulators/duckstation/scripts/duckstationcheevos.sh",
    "content": "#! /bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Hector Calvarro (https://github.com/kelvfimer)\n#Script for setting up cheevos on duckstation emuelec. it extracts the data from emuelec.conf and it constructs the entries in seetings.ini if [Cheevos] or Enabled = True or Enable = False are not presented\n\n. /etc/profile\n\n# Extract username, password, and token\nusername=$(get_ee_setting \"global.retroachievements.username\")\npassword=$(get_ee_setting \"global.retroachievements.password\")\ntoken=$(grep \"cheevos_token\" /storage/.config/retroarch/retroarch.cfg | cut -d'\"' -f2)\n\n# Path to DuckStation settings.ini\nDUCK_INI=\"/storage/.config/emuelec/configs/duckstation/settings.ini\"\n\n# Get current date in milliseconds for LoginTimestamp\ndatets=$(date +%s%N | cut -b1-13)\n\n# Check if the [Cheevos] section exists in the settings file\nzcheevos=$(grep -Fx \"[Cheevos]\" ${DUCK_INI})\n\n# If the token is empty or invalid, do not proceed with enabling Cheevos\nif [[ -z \"${token}\" || \"${token}\" == *'\"Success\":false'* ]]; then\n    token=\"\"\n    zcheevos=\"\"  # Remove the Cheevos section if token is invalid\nfi\n\n# Check if the [Cheevos] section is present, and add it if not\nif [[ -z \"${zcheevos}\" ]]; then\n    # Add [Cheevos] section if not present\n    {\n        echo -e \"[Cheevos]\"\n        echo \"Enabled = true\"\n        echo \"Username = ${username}\"\n        echo \"Token = ${token}\"\n        echo \"LoginTimestamp = ${datets}\"\n    } >> \"${DUCK_INI}\"\nelse\n    # If [Cheevos] section is present, update specific fields as needed\n\n    # Update the Username field\n    if grep -q \"^Username = \" \"${DUCK_INI}\"; then\n        sed -i \"/^\\[Cheevos\\]/,/^\\[/{s/^Username = .*/Username = ${username}/;}\" \"${DUCK_INI}\"\n    else\n        sed -i \"/^\\[Cheevos\\]/a Username = ${username}\" \"${DUCK_INI}\"\n    fi\n\n    # Update the Token field\n    if grep -q \"^Token = \" \"${DUCK_INI}\"; then\n        sed -i \"/^\\[Cheevos\\]/,/^\\[/{s/^Token = .*/Token = ${token}/;}\" \"${DUCK_INI}\"\n    else\n        sed -i \"/^\\[Cheevos\\]/a Token = ${token}\" \"${DUCK_INI}\"\n    fi\n\n    # Update the LoginTimestamp field\n    sed -i \"/^\\[Cheevos\\]/,/^\\[/{s/^LoginTimestamp = .*/LoginTimestamp = ${datets}/;}\" \"${DUCK_INI}\"\nfi\n"
  },
  {
    "path": "packages/sx05re/emulators/duckstation/scripts/set_duckstation_joy.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2026-present Shanti Gilbert (https://github.com/shantigilbert)\n# 27/2/2026 modifications pmsobrado (https://github.com/pmsobrado)\n# 01/3/2026 minor modifications - Langerz82 (https://github.com/Langerz82)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# duckstationjoy.sh - Convert SDL GameControllerDB mappings to DuckStation INI format\n# Usage: duckstationjoy.sh [OPTIONS] guid1 [guid2] [guid3] [guid4]\n\nsource joy_common.sh \"duckstation\"\n\nOUTPUT_FILE=\"/emuelec/configs/duckstation/settings.ini\"\nLAST_GUIDE_BUTTON=\"\"\n\n# SDL_GameControllerButton enum values\ndeclare -A SDL_BUTTON_ENUM=(\n    [a]=0 [b]=1 [x]=2 [y]=3\n    [back]=4 [select]=4 [guide]=5 [hotkeyenable]=5 [start]=6\n    [leftstick]=7 [leftthumb]=7\n    [rightstick]=8 [rightthumb]=8\n    [leftshoulder]=9 [rightshoulder]=10\n    [dpup]=11 [dpdown]=12 [dpleft]=13 [dpright]=14\n)\n\n# DuckStation button names - Xbox/Standard layout\ndeclare -A DUCKSTATION_BUTTONS=(\n    [a]=\"ButtonCross\" [b]=\"ButtonCircle\" [x]=\"ButtonSquare\" [y]=\"ButtonTriangle\"\n    [dpup]=\"ButtonUp\" [dpdown]=\"ButtonDown\" [dpleft]=\"ButtonLeft\" [dpright]=\"ButtonRight\"\n    [leftshoulder]=\"ButtonL1\" [rightshoulder]=\"ButtonR1\"\n    [leftstick]=\"ButtonL3\" [leftthumb]=\"ButtonL3\"\n    [rightstick]=\"ButtonR3\" [rightthumb]=\"ButtonR3\"\n    [start]=\"ButtonStart\" [back]=\"ButtonSelect\" [select]=\"ButtonSelect\"\n)\n\n# DuckStation button names - Nintendo layout (A/B and X/Y swapped)\ndeclare -A NINTENDO_LAYOUT_BUTTONS=(\n    [a]=\"ButtonCircle\" [b]=\"ButtonCross\" [x]=\"ButtonTriangle\" [y]=\"ButtonSquare\"\n    [dpup]=\"ButtonUp\" [dpdown]=\"ButtonDown\" [dpleft]=\"ButtonLeft\" [dpright]=\"ButtonRight\"\n    [leftshoulder]=\"ButtonL1\" [rightshoulder]=\"ButtonR1\"\n    [leftstick]=\"ButtonL3\" [leftthumb]=\"ButtonL3\"\n    [rightstick]=\"ButtonR3\" [rightthumb]=\"ButtonR3\"\n    [start]=\"ButtonStart\" [back]=\"ButtonSelect\" [select]=\"ButtonSelect\"\n)\n\n# DuckStation axis names\ndeclare -A DUCKSTATION_AXES=(\n    [leftx]=\"AxisLeftX\" [lefty]=\"AxisLeftY\"\n    [rightx]=\"AxisRightX\" [righty]=\"AxisRightY\"\n)\n\n# Generate DuckStation config for one controller\ngenerate_config() {\n    local controller_num=\"$1\"\n    local controller_order=\"$3\"\n    local mapping=\"$2\"\n    LAST_GUIDE_BUTTON=\"\"\n    \n    [ -z \"$mapping\" ] && return 1\n    \n    # Parse mapping: guid,name,key:value,key:value,...\n    IFS=',' read -ra PARTS <<< \"$mapping\"\n    local controller_name=\"${PARTS[1]}\"\n    \n    # Choose button mapping based on controller type\n    local -n BUTTON_MAP\n        BUTTON_MAP=NINTENDO_LAYOUT_BUTTONS\n#        BUTTON_MAP=DUCKSTATION_BUTTONS\n    \n    echo \"[Controller${controller_order}]\"\n    echo \"Type = AnalogController\"\n    echo \"AnalogDPadInDigitalMode = true\"\n    \n    local guide_button=\"\"\n    \n    # Process each mapping element (skip first 2: guid and name)\n    for ((i=2; i<${#PARTS[@]}; i++)); do\n        local part=\"${PARTS[i]}\"\n        \n        # Skip metadata\n        [[ \"$part\" =~ ^(platform|crc|sdk): ]] && continue\n        \n        IFS=':' read -r key value <<< \"$part\"\n        \n        # Handle buttons\n        if [[ \"$value\" =~ ^b([0-9]+)$ ]]; then\n            # Triggers mapped as buttons -> convert to axes\n            if [ \"$key\" = \"lefttrigger\" ]; then\n                echo \"ButtonL2 = Controller${controller_num}/+Axis4\"\n            elif [ \"$key\" = \"righttrigger\" ]; then\n                echo \"ButtonR2 = Controller${controller_num}/+Axis5\"\n            else\n                local enum_value=\"${SDL_BUTTON_ENUM[$key]}\"\n                local duck_name=\"${BUTTON_MAP[$key]}\"\n                \n                if [ -n \"$enum_value\" ] && [ -n \"$duck_name\" ]; then\n                    echo \"$duck_name = Controller${controller_num}/Button${enum_value}\"\n                fi\n                \n                # Track guide/back button for hotkeys (prefer back)\n                if [ \"$key\" = \"guide\" ]; then\n                    guide_button=\"$enum_value\"\n                    LAST_GUIDE_BUTTON=\"$enum_value\"\n                elif ([ \"$key\" = \"back\" ] || [ \"$key\" = \"select\" ]) && [ -z \"$guide_button\" ]; then\n                    guide_button=\"$enum_value\"\n                    LAST_GUIDE_BUTTON=\"$enum_value\"\n                fi\n            fi\n        \n        # Handle axes\n        elif [[ \"$value\" =~ ^a([0-9]+)$ ]]; then\n            local axis_num=\"${BASH_REMATCH[1]}\"\n            \n            if [ \"$key\" = \"lefttrigger\" ]; then\n                echo \"ButtonL2 = Controller${controller_num}/+Axis${axis_num}\"\n            elif [ \"$key\" = \"righttrigger\" ]; then\n                echo \"ButtonR2 = Controller${controller_num}/+Axis${axis_num}\"\n            else\n                local duck_name=\"${DUCKSTATION_AXES[$key]}\"\n                [ -n \"$duck_name\" ] && echo \"$duck_name = Controller${controller_num}/Axis${axis_num}\"\n            fi\n        \n        # Handle hats (D-pad)\n        elif [[ \"$value\" =~ ^h([0-9]+)\\.([0-9]+)$ ]]; then\n            local enum_value=\"${SDL_BUTTON_ENUM[$key]}\"\n            local duck_name=\"${BUTTON_MAP[$key]}\"\n            \n            if [ -n \"$enum_value\" ] && [ -n \"$duck_name\" ]; then\n                echo \"$duck_name = Controller${controller_num}/Button${enum_value}\"\n            fi\n        fi\n    done\n\n    RUMBLE=$(get_ee_setting ee_rumble_strength)\n    [[ -z \"${RUMBLE}\" ]] && RUMBLE=0\n    [[ \"${RUMBLE}\" -gt \"0\" ]] && echo \"Rumble = Controller${controller_num}\"\n}\n\n# Merge controller configs into existing settings.ini\nmerge_controller_configs() {\n\n    # Extract total indexes (before the -- separator)\n    local player_order=()\n    while [ \"$1\" != \"--\" ]; do\n        player_order+=(\"$1\")\n        shift\n    done\n    shift\n\n    local maincontroller=\"$1\"\n    shift\n\n    local settings_file=\"$1\"\n    shift\n    \n    # Extract guide buttons (before the -- separator)\n    local guide_buttons=()\n    while [ \"$1\" != \"--\" ]; do\n        guide_buttons+=(\"$1\")\n        shift\n    done\n    shift\n    \n    local temp_configs=(\"$@\")\n    local temp_output=$(mktemp)\n    local current_section=\"\"\n    local skip_section=false\n    \n    # Build list of controller sections we're replacing\n    local controller_sections=()\n    for i in \"${!temp_configs[@]}\"; do\n        controller_sections+=(\"[Controller$(( ${player_order[i]} + 1 ))\")\n    done\n    \n    # Read existing settings.ini, skip controller and hotkey sections we're replacing\n    while IFS= read -r line || [ -n \"$line\" ]; do\n        if [[ \"$line\" =~ ^\\[.*\\]$ ]]; then\n            current_section=\"$line\"\n            skip_section=false\n            \n            # Skip controller sections we're replacing\n            for section in \"${controller_sections[@]}\"; do\n                [ \"$current_section\" = \"$section\" ] && skip_section=true && break\n            done\n            \n            # Skip old [Hotkeys] section\n            [ \"$current_section\" = \"[Hotkeys]\" ] && skip_section=true\n            \n            [ \"$skip_section\" = false ] && echo \"$line\" >> \"$temp_output\"\n        elif [ \"$skip_section\" = false ]; then\n            echo \"$line\" >> \"$temp_output\"\n        fi\n    done < \"$settings_file\"\n    \n    # Append new controller configurations\n    for i in \"${!temp_configs[@]}\"; do\n        if (( i != 0 )); then\n            echo -e \"\\n\" >> \"$temp_output\"\n        fi\n        cat \"${temp_configs[$i]}\" >> \"$temp_output\"\n    done\n    \n    # Add single [Hotkeys] section\n    echo -e \"\\n\" >> \"$temp_output\"\n    echo \"[Hotkeys]\" >> \"$temp_output\"\n    \n    [ -n \"${guide_buttons[0]}\" ] && echo \"OpenQuickMenu = Controller${maincontroller}/Button${guide_buttons[0]}\" >> \"$temp_output\"\n    mv \"$temp_output\" \"$settings_file\"\n}\n\n# Main script\nmain() {\n    local guids=()\n\n    # Capture GUIDs into a variable\n    detected_guids=$(gamepad_info 2>/dev/null | grep -oP '^[0-9a-f]{32}' | head -n4)\n\n    # Use mapfile to convert the result into an array\n    mapfile -t guids <<< \"$detected_guids\"\n\n    # Find settings file\n    local settings_file=\"\"\n    settings_file=\"$OUTPUT_FILE\"\n\n    # Generate controller configs\n    local temp_configs=()\n    local guide_buttons=()\n\n    local player_order=($( jc_get_order_indexes 8 \"${guids[@]}\"))\n\n    for i in {1..8}; do\n        jc_wipe_config_sub_heading \"${settings_file}\" \"[Controller${i}]\"\n    done\n\n    for i in \"${!guids[@]}\"; do\n        local guid=\"${guids[$i]}\"\n        local mapping=$(gamepad_info 2>/dev/null | grep \"^$guid\" | head -n1)\n        \n        if [ -z \"$mapping\" ]; then\n            echo \"Warning: No mapping found for GUID: $guid\" >&2\n            continue\n        fi\n\n        local temp_file=$(mktemp)\n        local order=$(( ${player_order[i]} + 1 ))\n        generate_config \"$i\" \"$mapping\" \"$order\" > \"$temp_file\"\n        temp_configs+=(\"$temp_file\")\n        guide_buttons+=(\"$LAST_GUIDE_BUTTON\")\n    done\n    \n    [ ${#temp_configs[@]} -eq 0 ] && echo \"Error: No valid configurations generated\" >&2 && exit 1\n    \n    merge_controller_configs \"${player_order[@]}\" -- \"${player_order[0]}\" \"$settings_file\" \"${guide_buttons[@]}\" -- \"${temp_configs[@]}\"\n    # Cleanup\n    rm -f \"${temp_configs[@]}\"\n}\n\nmain \"$@\"\n"
  },
  {
    "path": "packages/sx05re/emulators/ecwolf/config/ecwolf.cfg",
    "content": "BaseDataPaths = \".;$PROGDIR;/storage/roms/ports/ecwolf;/storage/roms/ports/ecwolf/spear;/storage/roms/ports/ecwolf/ark\";\nFullScreenWidth = 640;\nFullScreenHeight = 480;\nWindowedScreenWidth = 640;\nWindowedScreenHeight = 480;\n"
  },
  {
    "path": "packages/sx05re/emulators/ecwolf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"ecwolf\"\nPKG_VERSION=\"601d5b2a0f12b7491205d311ca462c3fcf6ada21\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/ECWolfEngine/ECWolf\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_mixer SDL2_net ecwolf:host\"\nPKG_DEPENDS_HOST=\"SDL2:host SDL2_mixer:host SDL2_net:host\"\nPKG_LONGDESC=\"ECWolf is a port of the Wolfenstein 3D engine based of Wolf4SDL. It combines the original Wolfenstein 3D engine with the user experience of ZDoom to create the most user and mod author friendly Wolf3D source port.\"\nPKG_TOOLCHAIN=\"cmake-make\"\n\npre_build_host() {\nHOST_CMAKE_OPTS=\"\"\n}\n\nmake_host() {\n  cmake . -DNO_GTK=ON -DSDL2_mixer_LIBRARIES=${TOOLCHAIN}/lib/libSDL2_mixer.so -DSDL2_mixer_INCLUDE_DIRS=${TOOLCHAIN}/include/SDL2\n  make\n}\n\nmakeinstall_host() {\n: #no \n}\n\npre_configure_target() {\nPKG_CMAKE_OPTS_TARGET=\" -DNO_GTK=ON \\\n\t\t\t\t\t\t-DFORCE_CROSSCOMPILE=ON \\\n\t\t\t\t\t\t-DIMPORT_EXECUTABLES=${PKG_BUILD}/.${HOST_NAME}/ImportExecutables.cmake\t\t\t\t\t\t\n\t\t\t\t\t\t-DCMAKE_BUILD_TYPE=Release\"\n\n cd ${PKG_BUILD}/deps/gdtoa\n ${HOST_CC} -o rithchk arithchk.c -Wall -Wextra\n ./rithchk > ${PKG_BUILD}/deps/gdtoa/arith.h\n\n ${HOST_CC} -o qnan qnan.c -Wall -Wextra\n ./qnan > ${PKG_BUILD}/deps/gdtoa/gd_qnan.h\n cd ${PKG_BUILD}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp ${PKG_BUILD}/ecwolf ${INSTALL}/usr/bin/ecwolf\n  cp ${PKG_DIR}/scripts/ecwolf.sh ${INSTALL}/usr/bin/ecwolf.sh\n  \n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/ecwolf\n  cp ${PKG_BUILD}/ecwolf.pk3 ${INSTALL}/usr/config/emuelec/configs/ecwolf/ecwolf.pk3\n  cp ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/ecwolf/\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/ecwolf/patches/ecwolf-001-add-video-modes.patch",
    "content": "--- a/src/sdlvideo.cpp\t2021-03-11 13:47:06.522533113 -0600\n+++ a/src/sdlvideo.cpp\t2021-03-11 13:49:59.262707940 -0600\n@@ -388,6 +388,7 @@\n \t{ 400, 225 },\t// 16:9\r\n \t{ 400, 300 },\r\n \t{ 480, 270 },\t// 16:9\r\n+   { 480, 320 },\t// 3:2\r\n \t{ 480, 360 },\r\n \t{ 512, 288 },\t// 16:9\r\n \t{ 512, 384 },\r\n@@ -402,6 +403,7 @@\n \t{ 800, 500 },\t// 16:10\r\n \t{ 800, 600 },\r\n \t{ 848, 480 },\t// 16:9\r\n+   { 854, 480 },\t// 16:9\r\n \t{ 960, 600 },\t// 16:10\r\n \t{ 960, 720 },\r\n \t{ 1024, 576 },\t// 16:9\r\n"
  },
  {
    "path": "packages/sx05re/emulators/ecwolf/patches/ecwolf-002-add-exit-menu.patch",
    "content": "diff --git a/src/wl_play.cpp b/src/wl_play.cpp\nindex 551f0fb..afd0d38 100644\n--- a/src/wl_play.cpp\n+++ b/src/wl_play.cpp\n@@ -101,6 +101,7 @@ ControlScheme controlScheme[] =\n \t{ bt_automap,\t\t\t\"Automap\",\t\t-1,\t\t\t-1,\t\t\t\t-1, CS_AxisDigital, 0 },\r\n \t{ bt_showstatusbar,\t\t\"Show Status\",\t-1,\t\t\tsc_Tab,\t\t\t-1,\tCS_AxisDigital, 0 },\r\n \t{ bt_pause,\t\t\t\t\"Pause\",\t\t-1,\t\t\tsc_Pause,\t\t-1, CS_AxisDigital, 0 },\r\n+\t{ bt_esc,                       \"Escape Game\",          -1,                     sc_Escape,              -1, CS_AxisDigital, 0 },\r\n \r\n \t// End of List\r\n \t{ bt_nobutton,\t\t\tNULL, -1, -1, -1, CS_AxisDigital, 0 }\r\n"
  },
  {
    "path": "packages/sx05re/emulators/ecwolf/scripts/ecwolf.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n. /etc/profile\n\n# We cd into this directory before starting ecwolf\nRUN_DIR=\"/emuelec/configs/ecwolf\"\nCONFIG_DIR=\"/emuelec/configs/ecwolf\"\nCONFIG_FILE=\"${CONFIG_DIR}/ecwolf.cfg\"\n\nparams=\" --config ${CONFIG_FILE} --savedir ${CONFIG_DIR}\"\n\ncase $(oga_ver) in\n    \"OGS\")\n        params+=\" --res 854 480 --fullscreen --aspect 16:9\"\n    ;;\n    \"OGA\")\n        params+=\" --res 480 320 --fullscreen --aspect 3:2\"\n    ;;\n    \"GF\")\n        params+=\" --res 640 480 --fullscreen --aspect 4:3\"\n    ;;\n    *)\n        params+=\" --fullscreen --aspect 16:9\"\n    ;;\nesac\n\n# data can be SD2 SD3 SOD WL6 or N3D and it's passed as the ROM\nDATA=${1#*.}\n\n# If its a mod (extension .ecwolf) read the file and parse the data\nif [ ${DATA} == \"ecwolf\" ]; then\n    while IFS== read -r key value; do\n        if [ \"${key}\" == \"SUBDIR\" ]; then\n\t    RUN_DIR=\"/storage/roms/ports/ecwolf/${value}\"\n\t    # ecwolf does not work without ecwolf.pk3 in the current directory\n\t    # so we have to copy it there if it not already exists\n\t    if [ ! -f ${RUN_DIR}/ecwolf.pk3 ]; then\n\t\tcp ${CONFIG_DIR}/ecwolf.pk3 ${RUN_DIR}\n\t    fi\n        fi\n\n        if [ \"${key}\" == \"PARAMS\" ]; then\n            params+=\" ${value}\"\n        fi\n    done < <(<\"${1}\" tr -d '\\r'; echo;)\nelse\n    params+=\" --data ${DATA}\"\nfi\n\n# There are mods which have the same files as the original games, so you have\n# to put them in subdirectories. ecwolf on the other side has no command line\n# parameter to switch to such a subdir, so you have to cd into that dir first.\ncd \"${RUN_DIR}\"\n# Do not overwrite log messages already written by emuelecRunEmu.sh\necwolf ${params} >> /emuelec/logs/emuelec.log 2>&1\n\n"
  },
  {
    "path": "packages/sx05re/emulators/eka2l1/config/eka.gptk",
    "content": "# EKA2L1 gptokeyb configuration.\n\n# I N S T R U C T I O N S :\n#\n# The correct filepath for this file is: /storage/.config/eka2l1/gptk/eka.gptk\n#\n#-----------------------------------------------------------------------------------------------------------------------\n#\n# EKA2L1 gptokeyb configuration.\n#\n# Keyboard bindings in eka2l1:\n#   Arrow Keys  -> D-pad\n#   Enter       -> OK / Select\n#   F1 / F2     -> Left / Right Softkey\n#   F3 / F4     -> Green (Call) / Red (End)\n#   Backspace   -> Backspace\n#   Escape      -> End key\n\nback  = escape\nstart = backspace\n\na = enter\nb = f4\ny = f3\n\nl1 = f1\nr1 = f2\n\nup = up\ndown = down\nleft = left\nright = right\n\nleft_analog_up = up\nleft_analog_down = down\nleft_analog_left = left\nleft_analog_right = right"
  },
  {
    "path": "packages/sx05re/emulators/eka2l1/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\nPKG_NAME=\"eka2l1\"\nPKG_VERSION=\"d2e7abb191bf41ffa1413100154590e0930aebfa\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/AveyondFly/EKA2L1\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_GIT_CLONE_BRANCH=\"master\"\nPKG_GIT_SUBMODULES=\"yes\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 freetype zlib\"\nPKG_SECTION=\"emuelec/emulators\"\nPKG_SHORTDESC=\"Symbian OS / N-Gage emulator for aarch64 Linux\"\nPKG_TOOLCHAIN=\"cmake\"\nPKG_BUILD_FLAGS=\"-lto\"\n\nPKG_CMAKE_OPTS_TARGET=\"\n  -DCMAKE_BUILD_TYPE=Release\n  -DEKA2L1_BUILD_TESTS=OFF\n  -DEKA2L1_BUILD_SDL2_FRONTEND=ON\n\"\n\npre_configure_target() {\n  sed -i '/add_subdirectory(qt)/d' ${PKG_BUILD}/src/emu/CMakeLists.txt\n  sed -i '/target_include_directories(buildvm/d' ${PKG_BUILD}/src/external/CMakeLists.txt\n  sed -i '/add_subdirectory(programs)/d' ${PKG_BUILD}/src/external/mbedtls/CMakeLists.txt\n  sed -i '/add_subdirectory(tests)/d' ${PKG_BUILD}/src/external/mbedtls/CMakeLists.txt\n  echo \"// stub\" > ${PKG_BUILD}/src/emu/drivers/src/graphics/backend/context_glx.cpp\n  echo \"// stub\" > ${PKG_BUILD}/src/emu/drivers/src/graphics/backend/vulkan/graphics_vulkan.cpp\n\n  cat > ${PKG_BUILD}/src/external/ffmpeg/CMakeLists.txt << 'EOF'\nif (NOT DEFINED FFMPEG_CORE_NAME)\n    set(FFMPEG_CORE_NAME ffmpeg)\nendif()\nadd_library(${FFMPEG_CORE_NAME} INTERFACE)\ntarget_include_directories(${FFMPEG_CORE_NAME} INTERFACE \"${CMAKE_CURRENT_SOURCE_DIR}/include\")\ntarget_link_libraries(${FFMPEG_CORE_NAME} INTERFACE avformat avcodec avutil swscale swresample z)\nEOF\n}\n\nmake_target() {\n  BUILD_DIR=\"${PKG_BUILD}/.aarch64-libreelec-linux-gnu\"\n  LUAJIT_SRC=\"${PKG_BUILD}/src/external/luajit/src\"\n  LUAJIT_CMAKE_BUILD=\"${BUILD_DIR}/src/external/luajit-cmake\"\n  MINILUA_BIN=\"${LUAJIT_CMAKE_BUILD}/minilua/minilua\"\n  BUILDVM_BIN=\"${LUAJIT_CMAKE_BUILD}/buildvm/buildvm\"\n\n  cd \"${BUILD_DIR}\"\n\n  ninja minilua || true\n  gcc \"${LUAJIT_SRC}/host/minilua.c\" -o \"${MINILUA_BIN}\" -lm\n  ninja -t restat\n\n  ninja buildvm || true\n  gcc \\\n    -I\"${LUAJIT_SRC}\" \\\n    -I\"${LUAJIT_CMAKE_BUILD}\" \\\n    -DLUAJIT_TARGET=LUAJIT_ARCH_arm64 \\\n    -DLJ_ARCH_HASFPU=1 \\\n    -DLJ_ABI_SOFTFP=0 \\\n    -DLUAJIT_NUMMODE=2 \\\n    \"${LUAJIT_SRC}/host/buildvm.c\" \\\n    \"${LUAJIT_SRC}/host/buildvm_asm.c\" \\\n    \"${LUAJIT_SRC}/host/buildvm_fold.c\" \\\n    \"${LUAJIT_SRC}/host/buildvm_lib.c\" \\\n    \"${LUAJIT_SRC}/host/buildvm_peobj.c\" \\\n    -o \"${BUILDVM_BIN}\" -lm\n  ninja -t restat\n\n  ninja ${NINJA_OPTS} ${PKG_MAKE_OPTS_TARGET}\n}\n\nmakeinstall_target() {\n  BUILD_DIR=\"${PKG_BUILD}/.aarch64-libreelec-linux-gnu\"\n\n  mkdir -p \"${INSTALL}/usr/bin/eka2l1\"\n  cp -a \"${BUILD_DIR}/bin/.\" \"${INSTALL}/usr/bin/eka2l1/\"\n  chmod +x \"${INSTALL}/usr/bin/eka2l1/eka2l1_sdl2\"\n\n  cp \"${PKG_DIR}/scripts/ekastart.sh\" \"${INSTALL}/usr/bin/ekastart.sh\"\n  chmod +x \"${INSTALL}/usr/bin/ekastart.sh\"\n\n  mkdir -p \"${INSTALL}/usr/config/emuelec/configs/eka2l1/gptk\"\n  cp -f \"${PKG_DIR}/config/eka.gptk\" \"${INSTALL}/usr/config/emuelec/configs/eka2l1/gptk/eka.gptk\"\n}"
  },
  {
    "path": "packages/sx05re/emulators/eka2l1/scripts/ekastart.sh",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2026-present worstcase_scenario (https://github.com/worstcase-scenario)\n\n. /etc/profile\n\n# ---------------------------------------------------------------------\n# Paths / defaults\n# ---------------------------------------------------------------------\nEKA_EXE=\"/usr/bin/eka2l1/eka2l1_sdl2\"\nEKA_CONFIG_DIR=\"/storage/.config/eka2l1\"\nEKA_DATA_DIR=\"${EKA_CONFIG_DIR}/data\"\nEKA_DRIVES_DIR=\"${EKA_DATA_DIR}/drives\"\nEKA_E_DIR=\"${EKA_DRIVES_DIR}/e\"\nEKA_GPTK=\"/storage/.config/emuelec/configs/eka2l1/gptk/eka.gptk\"\nEKA_LOG=\"/emuelec/logs/eka2l1.log\"\n\nEKA_DEVICE_NGAGE1=\"${EKA_DEVICE_NGAGE1:-NEM-4}\"\nEKA_DEVICE_NGAGE1_ALT=\"${EKA_DEVICE_NGAGE1_ALT:-RH-29}\"\nEKA_DEVICE_NGAGE2=\"${EKA_DEVICE_NGAGE2:-RM-409}\"\n\nROMFILE=\"$1\"\nLAUNCH_MODE=\"games\"\nAPP_RUN=\"\"\nDEVICE_CODE=\"${EKA_DEVICE_NGAGE2}\"\nCLASSIC_NGAGE=0\nCLEANUP_DONE=0\n\nmkdir -p \"$(dirname \"${EKA_LOG}\")\"\necho \"EmuELEC eka2l1 Log\" > \"${EKA_LOG}\"\n\nlog() { echo \"$*\" >> \"${EKA_LOG}\"; }\n\ndevice_installed() {\n  local dev=\"$1\"\n  [ -z \"${dev}\" ] && return 1\n  \"${EKA_EXE}\" --listdevices 2>/dev/null | grep -Fq \"(${dev})\"\n}\n\nselect_ngage1_device() {\n  if device_installed \"${EKA_DEVICE_NGAGE1}\"; then\n    echo \"${EKA_DEVICE_NGAGE1}\"\n  elif device_installed \"${EKA_DEVICE_NGAGE1_ALT}\"; then\n    echo \"${EKA_DEVICE_NGAGE1_ALT}\"\n  else\n    echo \"${EKA_DEVICE_NGAGE1}\"\n  fi\n}\n\n# ---------------------------------------------------------------------\n# N-Gage 1 app name lookup table\n# Key: lowercase game folder name (without .ngage)\n# Value: exact --run name for eka2l1\n# ---------------------------------------------------------------------\nget_run_name() {\n  local key\n  key=\"$(echo \"$1\" | tr '[:upper:]' '[:lower:]')\"\n  case \"${key}\" in\n    \"ashen\")                                    echo \"Ashen\" ;;\n    \"asphalt: urban gt 2\"|\"asphalt urban gt 2\") echo \"Asphalt 2\" ;;\n    \"asphalt: urban gt\"|\"asphalt urban gt\")     echo \"Asphalt\" ;;\n    \"atari masterpieces vol. 1\"|\"atari masterpieces vol 1\") echo \"Atari MP Vol I\" ;;\n    \"atari masterpieces vol. ii\"|\"atari masterpieces vol ii\") echo \"Atari MP Vol II\" ;;\n    \"bomberman\")                                echo \"Bomberman\" ;;\n    \"call of duty\")                             echo \"CallofDuty\" ;;\n    \"catan\")                                    echo \"Catan\" ;;\n    \"civilization\")                             echo \"Civilization\" ;;\n    \"colin mcrae rally 2005\")                   echo \"colin mcrae rally 2005\" ;;\n    \"crash nitro kart\")                         echo \"CrashNitroKart\" ;;\n    \"fifa football 2005\"|\"fifa 2005\")           echo \"FIFA 2005\" ;;\n    \"fifa soccer 2004\"|\"fifa 2004\")             echo \"FIFA 2004\" ;;\n    \"glimmerati\")                               echo \"Glimmerati\" ;;\n    \"high seize\")                               echo \"High Seize\" ;;\n    \"mlb slam!\"|\"mlb slam\")                     echo \"MLB Slam!\" ;;\n    \"marcel desailly pro soccer\")               echo \"MarcelDesaillyProSoccer\" ;;\n    \"mile high pinball\")                        echo \"Mile High\" ;;\n    \"motogp\")                                   echo \"MotoGP\" ;;\n    \"ncaa football 2004\")                       echo \"NCAA®\" ;;\n    \"one\")                                      echo \"ONE\" ;;\n    \"operation shadow\")                         echo \"Operation Shadow\" ;;\n    \"pandemonium!\")                             echo \"Pandemonium\" ;;\n    \"pathway to glory\")                         echo \"Pathway to Glory\" ;;\n    \"pathway to glory: ikusa islands\"|\"ikusa islands\") echo \"Ikusa Islands\" ;;\n    \"payload\")                                  echo \"Payload\" ;;\n    \"pocket kingdom: own the world\"|\"pocket kingdom\") echo \"PKingdom\" ;;\n    \"puyo pop\")                                 echo \"Puyo Pop\" ;;\n    \"puzzle bobble vs\")                         echo \"PuzzleBobbleVS\" ;;\n    \"rayman 3\")                                 echo \"Rayman 3\" ;;\n    \"red faction\")                              echo \"RedFaction\" ;;\n    \"requiem of hell\")                          echo \"Requiem of Hell\" ;;\n    \"rifts: promise of power\"|\"rifts\")          echo \"RIFTS\" ;;\n    \"ssx: out of bounds\"|\"ssx out of bounds\"|\"ssx\") echo \"SSX\" ;;\n    \"sega rally championship\")                  echo \"SegaRally\" ;;\n    \"snakes\")                                   echo \"Snakes\" ;;\n    \"sonicn\")                                   echo \"SonicN\" ;;\n    \"spider-man 2\"|\"spiderman 2\")               echo \"SM 2\" ;;\n    \"super monkey ball\")                        echo \"supermonkeyball\" ;;\n    \"system rush\")                              echo \"System Rush\" ;;\n    \"the elder scrolls travels: shadowkey\"|\"shadowkey\") echo \"Elder Scrolls\" ;;\n    \"the king of fighters: extreme\"|\"kof extreme\") echo \"KOF EXTREME\" ;;\n    \"the roots: gates of chaos\"|\"the roots\")    echo \"The Roots\" ;;\n    \"the sims: bustin' out\"|\"the sims bustin out\") echo \"The Sims Bustin' Out\" ;;\n    \"tiger woods pga tour 2004\")                echo \"TW 2004\" ;;\n    \"tom clancy's ghost recon: jungle storm\"|\"ghost recon\") echo \"GhostRecon\" ;;\n    \"tom clancy's splinter cell: chaos theory\") echo \"SplinterCell\" ;;\n    \"tom clancy's splinter cell: team stealth action\"|\"splinter cell\") echo \"Splinter Cell\" ;;\n    \"tomb raider: starring lara croft\"|\"tomb raider\") echo \"Tomb Raider\" ;;\n    \"tony hawk's pro skater\")                   echo \"Tony Hawk's Pro Skater\" ;;\n    \"virtua cop\")                               echo \"Virtua Cop\" ;;\n    \"virtua tennis\")                            echo \"virtuatennis\" ;;\n    \"wwe: aftershock\"|\"wwe aftershock\"|\"wwe\")   echo \"WWE\" ;;\n    \"warhammer 40,000: glory in death\"|\"warhammer 40000\") echo \"WH40K\" ;;\n    \"worms: world party\"|\"worms world party\")   echo \"WWP\" ;;\n    \"x-men legends ii: rise of apocalypse\"|\"x-men legends ii\") echo \"XMLII\" ;;\n    \"x-men legends\")                            echo \"XMen™\" ;;\n    \"xanadu next\")                              echo \"XanaduNEXT\" ;;\n    *) echo \"\" ;;\n  esac\n}\n\nCLASSIC_APP_DST=\"\"\nCLASSIC_APP_SRC=\"\"\n\nsave_classic_state() {\n  [ -z \"${CLASSIC_APP_DST}\" ] && return\n  [ ! -d \"${CLASSIC_APP_DST}\" ] && return\n  [ -z \"${CLASSIC_APP_SRC}\" ] && return\n\n  log \"Syncing saves back to: ${CLASSIC_APP_SRC}\"\n\n  find \"${CLASSIC_APP_DST}\" -type f | while read -r DST_FILE; do\n    REL=\"${DST_FILE#${CLASSIC_APP_DST}/}\"\n    SRC_FILE=\"${CLASSIC_APP_SRC}/${REL}\"\n    if [ ! -f \"${SRC_FILE}\" ] || [ \"${DST_FILE}\" -nt \"${SRC_FILE}\" ]; then\n      mkdir -p \"$(dirname \"${SRC_FILE}\")\"\n      cp -a \"${DST_FILE}\" \"${SRC_FILE}\"\n      log \"  Saved: ${REL}\"\n    fi\n  done\n}\n\ncleanup() {\n  [ \"${CLEANUP_DONE}\" = \"1\" ] && return\n  CLEANUP_DONE=1\n\n  save_classic_state\n\n  if [ -n \"${CLASSIC_APP_DST}\" ] && [ -d \"${CLASSIC_APP_DST}\" ]; then\n    log \"Removing ${CLASSIC_APP_DST} from e:/system/apps/\"\n    rm -rf \"${CLASSIC_APP_DST}\"\n  fi\n\n  killall -9 gptokeyb 2>/dev/null\n}\ntrap cleanup EXIT INT TERM HUP\n\n# ---------------------------------------------------------------------\n# Sanity check\n# ---------------------------------------------------------------------\nif [ ! -d \"${EKA_DATA_DIR}\" ]; then\n  log \"ERROR: eka2l1 not set up. Please run EKA_INSTALL first.\"\n  exit 1\nfi\n\nmkdir -p \"${EKA_DRIVES_DIR}\" \"${EKA_E_DIR}\"\n\n# ---------------------------------------------------------------------\n# Detect launch mode\n# ---------------------------------------------------------------------\nif [ -n \"${ROMFILE}\" ]; then\n  if [ -f \"${ROMFILE}\" ]; then\n    case \"${ROMFILE##*.}\" in\n      uid|UID)\n        APP_UID=\"$(tr -d '\\r\\n[:space:]' < \"${ROMFILE}\")\"\n        if [ -n \"${APP_UID}\" ]; then\n          case \"${APP_UID}\" in 0x*|0X*) ;; *) APP_UID=\"0x${APP_UID}\" ;; esac\n          LAUNCH_MODE=\"uid\"\n          DEVICE_CODE=\"$(select_ngage1_device)\"\n          log \"UID launcher: ${APP_UID}\"\n          log \"UID device selected: ${DEVICE_CODE}\"\n        fi\n        ;;\n    esac\n  elif [ -d \"${ROMFILE}\" ]; then\n    case \"${ROMFILE}\" in\n      *.ngage|*.NGAGE)\n        CLASSIC_NGAGE=1\n        LAUNCH_MODE=\"classic\"\n        DEVICE_CODE=\"$(select_ngage1_device)\"\n        log \"Classic N-Gage device selected: ${DEVICE_CODE}\"\n\n        GAME_FOLDER=\"$(basename \"${ROMFILE}\")\"\n        GAME_ID=\"${GAME_FOLDER%.ngage}\"\n        GAME_ID=\"${GAME_ID%.NGAGE}\"\n\n        SIDECAR=\"${ROMFILE%/}.name\"\n        if [ -f \"${SIDECAR}\" ]; then\n          APP_RUN=\"$(tr -d '\\r\\n' < \"${SIDECAR}\")\"\n          log \"App name from sidecar: ${APP_RUN}\"\n        else\n          APP_RUN=\"$(get_run_name \"${GAME_ID}\")\"\n          if [ -z \"${APP_RUN}\" ]; then\n            APP_RUN=\"$(echo \"${GAME_ID}\" | sed 's/\\b\\(.\\)/\\u\\1/g')\"\n            log \"App name from folder (fallback): ${APP_RUN}\"\n          else\n            log \"App name from lookup table: ${APP_RUN}\"\n          fi\n        fi\n\n        APP_FOLDER=\"$(ls \"${ROMFILE}/system/apps/\" 2>/dev/null | head -1)\"\n        if [ -n \"${APP_FOLDER}\" ]; then\n          SRC=\"${ROMFILE}/system/apps/${APP_FOLDER}\"\n          DST=\"${EKA_E_DIR}/system/apps/${APP_FOLDER}\"\n          log \"Installing ${APP_FOLDER} into e:/system/apps/\"\n          mkdir -p \"${EKA_E_DIR}/system/apps\"\n          rm -rf \"${DST}\"\n          cp -a \"${SRC}\" \"${DST}\"\n          CLASSIC_APP_DST=\"${DST}\"\n          CLASSIC_APP_SRC=\"${SRC}\"\n        else\n          log \"ERROR: No app folder found in ${ROMFILE}/system/apps/\"\n          exit 1\n        fi\n        ;;\n    esac\n  fi\nfi\n\n# ---------------------------------------------------------------------\n# gptokeyb\n# ---------------------------------------------------------------------\nkillall -9 gptokeyb 2>/dev/null\ngptokeyb 1 eka2l1_sdl2 -c \"${EKA_GPTK}\" &\nsleep 1\n\ncd \"${EKA_CONFIG_DIR}\" || exit 1\n\n# ---------------------------------------------------------------------\n# Launch\n# ---------------------------------------------------------------------\nif [ \"${LAUNCH_MODE}\" = \"uid\" ]; then\n  log \"Launching UID ${APP_UID} on ${DEVICE_CODE}\"\n  CUBEB_BACKEND=alsa \"${EKA_EXE}\" --device \"${DEVICE_CODE}\" --app \"${APP_UID}\" >> \"${EKA_LOG}\" 2>&1\n\nelif [ \"${LAUNCH_MODE}\" = \"classic\" ]; then\n  log \"Launching classic N-Gage: --run \\\"${APP_RUN}\\\" on ${DEVICE_CODE}\"\n  CUBEB_BACKEND=alsa \"${EKA_EXE}\" --device \"${DEVICE_CODE}\" --run \"${APP_RUN}\" >> \"${EKA_LOG}\" 2>&1\n\nelse\n  log \"Launching N-Gage 2.0 Games app on ${DEVICE_CODE}\"\n  CUBEB_BACKEND=alsa \"${EKA_EXE}\" --device \"${DEVICE_CODE}\" --app Games >> \"${EKA_LOG}\" 2>&1\nfi"
  },
  {
    "path": "packages/sx05re/emulators/fbneoSA/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"fbneoSA\"\nPKG_VERSION=\"47f12dd9296d4297b1d3daec3e91c4d3d2c0f80a\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"Custom\"\nPKG_SITE=\"https://github.com/finalburnneo/FBNeo\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 gl4es\"\nPKG_LONGDESC=\"https://github.com/finalburnneo/FBNeo/blob/master/src/license.txt\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_MAKE_OPTS_TARGET=\" sdl2 RELEASEBUILD=1\"\n\npre_configure_target() {\nsed -i \"s|\\`sdl2-config|\\`${SYSROOT_PREFIX}/usr/bin/sdl2-config|g\" makefile.sdl2\nsed -i \"s|objdir\t= obj/|objdir\t= ${PKG_BUILD}/obj/|\" makefile.sdl2\nsed -i \"s|srcdir\t= src/|srcdir\t= ${PKG_BUILD}/src/|\" makefile.sdl2\nsed -i \"s|CC\t= gcc|#CC\t= gcc|\" makefile.sdl2\nexport LDFLAGS+=\" -L$(get_install_dir gl4es)/usr/lib\"\nunset MAKELEVEL\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp -rf ${PKG_BUILD}/fbneo ${INSTALL}/usr/bin\ncp -rf ${PKG_BUILD}/src/license.txt ${INSTALL}/usr/bin/fbneo_license.txt\ncp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/fbneoSA/patches/fbneoSA-EmuELEC-rom-path.patch",
    "content": "--- a/src/burner/sdl/drv.cpp\t2022-01-22 01:27:13.278967632 -0600\n+++ b/src/burner/sdl/drv.cpp\t2022-01-22 01:24:57.509794634 -0600\n@@ -3,7 +3,7 @@\n #include \"neocdlist.h\"\r\n int bDrvOkay = 0;                       // 1 if the Driver has been initted okay, and it's okay to use the BurnDrv functions\r\n \r\n-char szAppRomPaths[DIRS_MAX][MAX_PATH] = { { \"/usr/local/share/roms/\" }, { \"roms/\" }, };\r\n+char szAppRomPaths[DIRS_MAX][MAX_PATH] = { { \"/storage/roms/mame/\" }, { \"/storage/roms/fbneo/\" }, { \"/storage/roms/neogeo/\" }, };\r\n \r\n static bool bSaveRAM = false;\r\n \r\n"
  },
  {
    "path": "packages/sx05re/emulators/fbneoSA/scripts/fbneo.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nadd_player_hat() \n{\n    local pl=${1}\n    local pf=\"/storage/.local/share/fbneo/config/p${pl}defaults.ini\"\n\n    if [ ! -f \"${pf}\" ]; then\n      echo \"version 0x100003\" > ${pf}\n      echo \"macro \\\"P${pl} Up\\\" switch 0x4012\" >> ${pf}\n      echo \"macro \\\"P${pl} Down\\\" switch 0x4013\" >> ${pf}\n      echo \"macro \\\"P${pl} Left\\\" switch 0x4010\" >> ${pf}\n      echo \"macro \\\"P${pl} Right\\\" switch 0x4011\" >> ${pf}\n    fi\n}\n\nmkdir -p /emuelec/configs/fbneo/config\nmkdir -p /storage/.local/share\n\nif [ -d \"/storage/.local/share/fbneo/\" ]; then\n    mv -f /storage/.local/share/fbneo/* /emuelec/configs/fbneo\n    rm -rf /storage/.local/share/fbneo\n    ln -sf /emuelec/configs/fbneo /storage/.local/share/fbneo\nfi\n\nif [ ! -L \"/storage/.local/share/fbneo\" ]; then\n    ln -sf /emuelec/configs/fbneo /storage/.local/share/fbneo\nfi\n\nadd_player_hat 1\nadd_player_hat 2\nadd_player_hat 3\nadd_player_hat 4\n\n# TODO: Allow settings from ES \n#case \"$@\" in\n#EXTRAOPTS=\n\nif [ \"${2}\" == \"NCD\" ]; then\n    echo . > /dev/null\n    #EXTRAOPTS=CDOPTS?\nfi\n\nROM=$(basename -- \"${1}\")\nROM=\"${ROM%.*}\"\nDIR=$(dirname ${1})\n\nsed -i \"s|szAppRomPaths\\[0\\].*|szAppRomPaths\\[0\\] ${DIR}/|\" /emuelec/configs/fbneo/config/fbneo.ini\n\nexport LIBGL_NOBANNER=1\nexport LIBGL_SILENTSTUB=1\n\nfbfix $( emuelec-utils getmainfb )\nfbneo -joy -fullscreen \"${ROM}\" ${EXTRAOPTS} >> /emuelec/logs/emuelec.log 2>&1\n"
  },
  {
    "path": "packages/sx05re/emulators/flycast-dojo/config/emu.cfg",
    "content": "[Dolphin Blue]\nconfig.aica.LimitFPS = yes\nconfig.pvr.AutoSkipFrame = 2\nconfig.rend.Resolution = 480\n\n[alsa]\ndevice = auto\n\n[audio]\nbackend = auto\n\n[config]\nBoxartDisplayMode = yes\nDebug.GDBEnabled = no\nDebug.GDBPort = 3263\nDebug.GDBWaitForConnection = no\nDebug.SerialConsoleEnabled = no\nDebug.SerialPTY = no\nDreamcast.AutoLoadState = no\nDreamcast.AutoSaveState = no\nDreamcast.Broadcast = 0\nDreamcast.Cable = 3\nDreamcast.ContentPath = /storage/roms/atomiswave;/storage/roms/dreamcast;/storage/roms/naomi\nDreamcast.ForceWindowsCE = no\nDreamcast.FullMMU = no\nDreamcast.HideLegacyNaomiRoms = no\nDreamcast.Language = 1\nDreamcast.Region = 1\nDreamcast.SavestateSlot = 0\nDynarec.Enabled = yes\nDynarec.idleskip = yes\nFastGDRomLoad = yes\nFetchBoxart = yes\nForceFreePlay = yes\nProfiler.DrawGUI = no\nProfiler.Enabled = no\nProfiler.FrameWarningTime = 0.018182\nProfiler.OutputTTY = no\nRecSlotFile = 0\nSOCDResolution = 1\nShowEjectDisk = no\nUploadCrashLogs = yes\nUseReios = no\naica.AutoLatency = yes\naica.BufferSize = 1014\naica.DSPEnabled = no\naica.LimitFPS = yes\naica.Volume = 100\npvr.AutoSkipFrame = 2\npvr.MaxThreads = 2\npvr.rend = 0\nrend.AnisotropicFiltering = 1\nrend.CrossHairColor1 = 0\nrend.CrossHairColor2 = 0\nrend.CrossHairColor3 = 0\nrend.CrossHairColor4 = 0\nrend.CustomTextures = no\nrend.DelayFrameSwapping = no\nrend.DumpTextures = no\nrend.DupeFrames = yes\nrend.EmulateFramebuffer = no\nrend.ExtraDepthScale = 1.000000\nrend.FixUpscaleBleedingEdge = yes\nrend.FixedFrequency = 0\nrend.FixedFrequencyThreadSleep = no\nrend.FloatVMUs = no\nrend.Fog = yes\nrend.MaxFilteredTextureSize = 256\nrend.ModifierVolumes = yes\nrend.NativeDepthInterpolation = no\nrend.PerPixelLayers = 16\nrend.PerStripSorting = yes\nrend.PixelBufferSize = 536870912\nrend.RenderToTextureBuffer = no\nrend.Resolution = 480\nrend.Rotate90 = no\nrend.ScreenStretching = 100\nrend.ShowFPS = yes\nrend.SuperWideScreen = no\nrend.TextureFiltering = 0\nrend.TextureUpscale = 1\nrend.ThreadedRendering = yes\nrend.TranslucentPolygonDepthMask = no\nrend.UseMipmaps = yes\nrend.WideScreen = no\nrend.WidescreenGameHacks = no\nrend.vsync = no\nta.skip = 0\n\n[dojo]\nActAsServer = yes\nBufferAutoResume = yes\nCopyMissingSharedMem = yes\nCustomOutputStreamTxt = no\nDebug = 8\nDefaultRelayPort = 8001\nDelay = 0\nDojoProtoCall = \nEnable = no\nEnableBackfill = yes\nEnableLobby = no\nEnableMatchCode = yes\nEnableMemRestore = no\nEnablePlayerNameOverlay = yes\nEnableSessionQuickLoad = no\nEnableTrainingLua = yes\nFirstTo = 0\nForceRealBios = no\nGameName = \nHideKey = no\nHideRandomInputSlot = yes\nHostJoinSelect = no\nIgnoreNetSave = no\nLaunchReplay = no\nLobbyMulticastAddress = 224.1.10.1\nLobbyMulticastPort = 52001\nMatchCode = \nMatchmakingServerAddress = match.dojo.ooo\nMatchmakingServerPort = 52001\nMultiOutputStreamTxt = no\nMultiOutputStreamTxtIdx = 4\nMultiOutputStreamTxtMax = 4\nNetCustomVmu = no\nNetSaveBase = https://github.com/blueminder/flycast-netplay-savestates/raw/main/\nNetStartVerifyRoms = no\nNetplayMethod = GGPO\nNumBackFrames = 3\nOpponentName = Opponent\nOutputStreamTxt = no\nPacketsPerFrame = 3\nPlayerName = Player\nPlayerSwitched = no\nQuark = \nReceiving = no\nRecordMatches = no\nRecordOnFirstInput = no\nRelay = no\nRelayAddressHistory = us-west-1.match.dojo.ooo;us-east-1.match.dojo.ooo;chl-1.match.dojo.ooo;bra-1.match.dojo.ooo;esp-1.match.dojo.ooo;fin-1.match.dojo.ooo;kor-1.match.dojo.ooo;aus-1.match.dojo.ooo;match.dojo.ooo\nRelayKey = \nReplayFilename = \nRxFrameBuffer = 1800\nServerIP = 127.0.0.1\nServerPort = 6000\nServiceTransmitOnly = yes\nShowInputDisplay = yes\nShowPlaybackControls = yes\nShowPublicIP = no\nShowReplayInputDisplay = no\nShowTrainingGameOverlay = yes\nSpectateKey = \nSpectating = no\nSpectatorIP = match.dojo.ooo\nSpectatorPort = 7000\nTestGame = no\nTraining = no\nTransmitScore = no\nTransmitting = yes\nUpdateChannel = stable\nUseAnimeInputNotation = no\n\n[input]\nEnableDiagonalCorrection = no\nEnableMouseCaptureToggle = 0\nMouseSensitivity = 100\nVirtualGamepadVibration = 20\ndevice1 = 0\ndevice1.1 = 1\ndevice1.2 = 3\ndevice2 = 0\ndevice2.1 = 1\ndevice2.2 = 3\ndevice3 = 10\ndevice3.1 = 10\ndevice3.2 = 10\ndevice4 = 10\ndevice4.1 = 10\ndevice4.2 = 10\nmaple_sdl_joystick_0 = 0\nmaple_sdl_keyboard = 0\nmaple_sdl_mouse = 0\n\n[network]\nActAsServer = no\nDNS = 46.101.91.123\nEmulateBBA = no\nEnable = no\nEnableUPnP = yes\nEnableWinFWPolicy = yes\nGGPO = no\nGGPOAnalogAxes = 0\nGGPOChat = no\nGGPOChatTimeout = 10\nGGPOChatTimeoutToggle = no\nGGPOChatTimeoutToggleSend = no\nGGPODelay = 0\nGGPOPort = 19713\nGGPORemotePort = 19713\nLocalPort = 37391\nNetworkOutput = no\nStats = yes\nserver = \n\n[validate]\nOpenGlChecks = no\n\n[window]\nfullscreen = yes\nheight = 480\nleft = 536805376\nmaximized = no\ntop = 536805376\nwidth = 640\n\n"
  },
  {
    "path": "packages/sx05re/emulators/flycast-dojo/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2025-present DiegroSan (https://github.com/Diegrosan)\n\nPKG_NAME=\"flycast-dojo\"\nPKG_VERSION=\"d0e47e572b1e7b355e88bda8308c89d0c5156cbf\" #6.53+\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/blueminder/flycast-dojo\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES} alsa SDL2 libzip zip asio vksdl \"\nPKG_LONGDESC=\"flycast-dojo is a multiplatform Sega Dreamcast, Naomi and Atomiswave emulator\"\nPKG_TOOLCHAIN=\"cmake\"\nPKG_GIT_CLONE_BRANCH=\"master\"\n\nPKG_CMAKE_OPTS_TARGET+=\" -DTHREAD_SANITIZER_AVAILABLE_EXITCODE=1\"\nPKG_CMAKE_OPTS_TARGET+=\" -DADDRESS_SANITIZER_AVAILABLE_EXITCODE=1\"\nPKG_CMAKE_OPTS_TARGET+=\" -DALL_SANITIZERS_AVAILABLE_EXITCODE=1\"\nPKG_CMAKE_OPTS_TARGET+=\" -DUSE_GLES=ON -DUSE_VULKAN=OFF -DUSE_HOST_SDL=ON -DENABLE_CTEST=OFF -DTEST_AUTOMATION=OFF -DASAN=OFF \"\n\nif [ \"${ARCH}\" == \"arm\" ]; then\n    PKG_PATCH_DIRS=\"arm\"\nfi\n\npre_configure_target() {\n  export CXXFLAGS=\"${CXXFLAGS} -Wno-error=array-bounds -Wswitch -Wsign-compare -I$(get_install_dir asio)/usr/include\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  mkdir -p ${INSTALL}/usr/config/flycast-dojo\n  \n  cp -r ${PKG_DIR}/config/* ${INSTALL}/usr/config/flycast-dojo\n  \n  cp \"${PKG_BUILD}/.${TARGET_NAME}/flycast-dojo\" \"${INSTALL}/usr/bin/flycastdojo\"\n  cp ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n\n  chmod +x ${INSTALL}/usr/bin/flycastdojo.sh\n\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/flycast-dojo/patches/03-sdl.patch",
    "content": "--- a/core/sdl/sdl.cpp\t2024-06-02 19:45:15.598400200 +0200\n+++ b/core/sdl/sdl.cpp\t2024-06-02 19:49:41.074683700 +0200\n@@ -200,6 +200,11 @@\n #endif\n \t\tstd::string db = get_readonly_data_path(\"gamecontrollerdb.txt\");\n \t\tint rv = SDL_GameControllerAddMappingsFromFile(db.c_str());\n+\t\tif (rv < 0 && (nowide::getenv(\"SDL_GAMECONTROLLERCONFIG_FILE\") != NULL))\n+\t\t{\n+\t\t\tdb = (std::string) nowide::getenv(\"SDL_GAMECONTROLLERCONFIG_FILE\");\n+\t\t\trv = SDL_GameControllerAddMappingsFromFile(db.c_str());\n+\t\t}\n \t\tif (rv < 0)\n \t\t{\n \t\t\tdb = get_readonly_config_path(\"gamecontrollerdb.txt\");\n"
  },
  {
    "path": "packages/sx05re/emulators/flycast-dojo/patches/arm/01-EmuELEC-fix-arm-compile.patch",
    "content": "--- a/core/linux/posix_vmem.cpp\n+++ b/core/linux/posix_vmem.cpp\n@@ -361,7 +361,8 @@\n static void CacheFlush(void* code, void* pEnd)\n {\n #if !defined(__ANDROID__)\n-\t__clear_cache((void*)code, pEnd);\n+\t//__clear_cache((void*)code, pEnd);\n+    __builtin___clear_cache((char *)code, (char *)pEnd);\n #else // defined(__ANDROID__)\n \tvoid* start=code;\n \tsize_t size=(u8*)pEnd-(u8*)start+4;\n--- a/core/hw/arm7/arm7_rec_arm32.cpp\n+++ b/core/hw/arm7/arm7_rec_arm32.cpp\n@@ -59,9 +59,9 @@\n \tr5, r6, r7, r9, r10, r11\n };\n \n-class Arm32ArmRegAlloc : public ArmRegAlloc<alloc_regs.size(), Arm32ArmRegAlloc>\n-{\n-\tusing super = ArmRegAlloc<alloc_regs.size(), Arm32ArmRegAlloc>;\n+class Arm32ArmRegAlloc : public ArmRegAlloc<6, Arm32ArmRegAlloc>\n+{\n+\tusing super = ArmRegAlloc<6, Arm32ArmRegAlloc>;\n \n \tvoid LoadReg(int host_reg, Arm7Reg armreg, ArmOp::Condition cc = ArmOp::AL)\n \t{\n\n"
  },
  {
    "path": "packages/sx05re/emulators/flycast-dojo/scripts/flycastdojo.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2025-present DiegroSan (https://github.com/Diegrosan)\n\n. /etc/profile\n\nvirtual_keyboard &\nVK_PID=$!\n\nLOCAL_DATA=\"/storage/roms/bios/dc_dojo\"\nLOCAL_HOME=\"/storage/.local/share/flycast-dojo\"\nMAP=\"/storage/.config/flycast-dojo/mappings\"\n\nmkdir -p \"/storage/.local/share/\"\nmkdir -p \"${LOCAL_DATA}\"\n\nif [ ! -d \"/storage/.config/flycast-dojo\" ]; then\n    mkdir -p \"/storage/.config/flycast-dojo\"\n    cp -r \"/usr/config/flycast-dojo\" \"/storage/.config/\"\nfi\n\nif [ ! -f \"/storage/.config/flycast-dojo/emu.cfg\" ]; then\n    mkdir -p \"/storage/.config/flycast-dojo\"\n    cp -f \"/usr/config/flycast-dojo/emu.cfg\" \"/storage/.config/flycast-dojo/emu.cfg\"\nfi\n\nif [ ! -L \"${LOCAL_HOME}\" ]; then\n    rm -rf \"${LOCAL_HOME}\"\n    ln -sf \"${LOCAL_DATA}\" \"${LOCAL_HOME}\"\nfi\n\nPLAYER=$(get_ee_setting global.netplay.nickname)\n[ -z \"${PLAYER}\" ] && PLAYER=\"PLAYER\"\nPLAYER=\"${PLAYER// /_}\"\n\n#AUTOGP=$(get_ee_setting flycast_auto_gamepad)\n#if [[ \"${AUTOGP}\" != \"0\" ]]; then\n#    mkdir -p \"${MAP}\"\n#    set_flycastdojo_joy.sh\n#fi\n\n#Here is a way I found to access the menu more easily without needing a specific file, being able to access any_name.iso\n#The file must be smaller than 1 kb which can be a renamed clean text block\nif [ \"$(wc -c < \"$1\")\" -lt $((1 * 1024)) ]; then\n    flycastdojo -config dojo:PlayerName=${PLAYER} -config network:GGPO=yes \"\"\nelse\n    flycastdojo -config network:GGPO=no -config dojo:PlayerName=${PLAYER} \"$1\"\nfi\n\nkill $VK_PID\n\n"
  },
  {
    "path": "packages/sx05re/emulators/flycastsa/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"flycastsa\"\nPKG_VERSION=\"bf2bd7efed41e9f3367a764c2d90fcaa9c38a1f9\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/flyinghead/flycast\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES} alsa SDL2 libzip zip\"\nPKG_LONGDESC=\"Flycast is a multiplatform Sega Dreamcast, Naomi and Atomiswave emulator\"\nPKG_TOOLCHAIN=\"cmake\"\nPKG_GIT_CLONE_BRANCH=\"master\"\n\n\nif [ \"${ARCH}\" == \"arm\" ]; then\n\tPKG_PATCH_DIRS=\"arm\"\nfi\n\npre_configure_target() {\nexport CXXFLAGS=\"${CXXFLAGS} -Wno-error=array-bounds\"\nPKG_CMAKE_OPTS_TARGET+=\"-DUSE_GLES=ON -DUSE_VULKAN=OFF -DUSE_HOST_SDL=ON\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp ${PKG_BUILD}/.${TARGET_NAME}/flycast ${INSTALL}/usr/bin/flycast\n  cp ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n\n\tchmod +x ${INSTALL}/usr/bin/flycast.sh\n\tchmod +x ${INSTALL}/usr/bin/set_flycast_joy.sh\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/flycastsa/patches/03-sdl.patch",
    "content": "--- a/core/sdl/sdl.cpp\t2024-06-02 19:45:15.598400200 +0200\n+++ b/core/sdl/sdl.cpp\t2024-06-02 19:49:41.074683700 +0200\n@@ -200,6 +200,11 @@\n #endif\n \t\tstd::string db = get_readonly_data_path(\"gamecontrollerdb.txt\");\n \t\tint rv = SDL_GameControllerAddMappingsFromFile(db.c_str());\n+\t\tif (rv < 0 && (nowide::getenv(\"SDL_GAMECONTROLLERCONFIG_FILE\") != NULL))\n+\t\t{\n+\t\t\tdb = (std::string) nowide::getenv(\"SDL_GAMECONTROLLERCONFIG_FILE\");\n+\t\t\trv = SDL_GameControllerAddMappingsFromFile(db.c_str());\n+\t\t}\n \t\tif (rv < 0)\n \t\t{\n \t\t\tdb = get_readonly_config_path(\"gamecontrollerdb.txt\");\n"
  },
  {
    "path": "packages/sx05re/emulators/flycastsa/patches/arm/01-EmuELEC-fix-arm-compile.patch",
    "content": "--- a/core/linux/posix_vmem.cpp\n+++ b/core/linux/posix_vmem.cpp\n@@ -361,7 +361,8 @@\n static void CacheFlush(void* code, void* pEnd)\n {\n #if !defined(__ANDROID__)\n-\t__clear_cache((void*)code, pEnd);\n+\t//__clear_cache((void*)code, pEnd);\n+    __builtin___clear_cache((char *)code, (char *)pEnd);\n #else // defined(__ANDROID__)\n \tvoid* start=code;\n \tsize_t size=(u8*)pEnd-(u8*)start+4;\n--- a/core/hw/arm7/arm7_rec_arm32.cpp\n+++ b/core/hw/arm7/arm7_rec_arm32.cpp\n@@ -59,9 +59,9 @@\n \tr5, r6, r7, r9, r10, r11\n };\n \n-class Arm32ArmRegAlloc : public ArmRegAlloc<alloc_regs.size(), Arm32ArmRegAlloc>\n-{\n-\tusing super = ArmRegAlloc<alloc_regs.size(), Arm32ArmRegAlloc>;\n+class Arm32ArmRegAlloc : public ArmRegAlloc<6, Arm32ArmRegAlloc>\n+{\n+\tusing super = ArmRegAlloc<6, Arm32ArmRegAlloc>;\n \n \tvoid LoadReg(int host_reg, Arm7Reg armreg, ArmOp::Condition cc = ArmOp::AL)\n \t{\n\n"
  },
  {
    "path": "packages/sx05re/emulators/flycastsa/scripts/flycast.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nmkdir -p \"/storage/.local/share/\"\n\nif [ ! -L \"/storage/.local/share/flycast\" ]; then\n    mkdir -p \"/storage/roms/bios/dc\"\n    rm -rf \"/storage/.local/share/flycast\"\n    ln -sf \"/storage/roms/bios/dc\" \"/storage/.local/share/flycast\"\nfi\n\nAUTOGP=$(get_ee_setting flycast_auto_gamepad)\nif [[ \"${AUTOGP}\" != \"0\" ]]; then\n  mkdir -p \"/storage/.config/flycast/mappings\"\n  set_flycast_joy.sh\nfi\n\nflycastcheevos.sh\n\nflycast \"${1}\"\n"
  },
  {
    "path": "packages/sx05re/emulators/flycastsa/scripts/flycastcheevos.sh",
    "content": "#! /bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Hector Calvarro (https://github.com/kelvfimer)\n# Script for setting up cheevos on duckstation emuelec. it extracts the data from emuelec.conf and it constructs the entries in settings.ini if [Cheevos] or Enabled = True or Enable = False are not presented\n\n. /etc/profile\n\nFLYCAST_CFG=\"/storage/.config/flycast/emu.cfg\"\n\n# Extract username and password from emuelec.conf\nusername=$(get_ee_setting \"global.retroachievements.username\")\npassword=$(get_ee_setting \"global.retroachievements.password\")\ntoken=$(grep \"cheevos_token\" /storage/.config/retroarch/retroarch.cfg | cut -d'\"' -f2)\n\n# Variables for checking if [Cheevos] or enabled true or false are present.\nzcheevos=$(grep -Fx \"[achievements]\" ${FLYCAST_CFG})\n\n\n# Test the token if empty exit 1. // I don't think we should exit, it should continue but not enable cheevos\nif [[ -z \"${token}\" || \"${token}\" == *'\"Success\":false'* ]]\nthen\n      token=\"\"\n      zcheevos=\"\"\nfi\n\nif [ -z \"${zcheevos}\" ]; then\n    # Añadir la sección [achievements] con los valores\n    sed -i \"\\$a [achievements]\\nEnabled = yes\\nUserName = ${username}\\nToken = ${token}\" ${FLYCAST_CFG}\nelse\n    # Verificar y actualizar UserName y Token si es necesario\n    if ! grep -q \"^UserName = \" ${FLYCAST_CFG}; then\n        sed -i \"/^\\[achievements\\]/a UserName = ${username}\" ${FLYCAST_CFG}\n    else\n        sed -i \"/^\\[achievements\\]/,/^\\[/{s/^UserName = .*/UserName = ${username}/;}\" ${FLYCAST_CFG}\n    fi\n\n    if ! grep -q \"^Token = \" ${FLYCAST_CFG}; then\n        sed -i \"/^\\[achievements\\]/a Token = ${token}\" ${FLYCAST_CFG}\n    else\n        sed -i \"/^\\[achievements\\]/,/^\\[/{s/^Token = .*/Token = ${token}/;}\" ${FLYCAST_CFG}\n    fi\nfi\n"
  },
  {
    "path": "packages/sx05re/emulators/flycastsa/scripts/set_flycast_joy.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nCONFIG_DIR=\"/storage/.config/flycast\"\nEMU_FILE=\"${CONFIG_DIR}/emu.cfg\"\nMAPPING_DIR=\"${CONFIG_DIR}/mappings\"\n\nsource joy_common.sh \"flycast\"\n\nCONFIG_TMP_A=\"/tmp/jc/SDLflycastA.tmp\"\nCONFIG_TMP_D=\"/tmp/jc/SDLflycastD.tmp\"\nCONFIG_TMP_E=\"/tmp/jc/SDLflycastE.tmp\"\n\nBTN_H0=$(get_ee_setting flycast_btn_h0)\n[[ -z \"${BTN_H0}\" ]] && BTN_H0=255\n\ndeclare -A FLYCAST_D_INDEXES=(\n  [h0.1]=$(( BTN_H0+1 ))\n  [h0.4]=$(( BTN_H0+2 ))\n  [h0.8]=$(( BTN_H0+3 ))\n  [h0.2]=$(( BTN_H0+4 ))\n)\n\ndeclare -A FLYCAST_D_BUTTONS=(\n  [x]=\"btn_y\"\n  [y]=\"btn_x\"\n  [a]=\"btn_b\"\n  [b]=\"btn_a\"\n  [leftshoulder]=\"btn_c\"\n  [rightshoulder]=\"btn_d\"\n  [lefttrigger]=\"btn_trigger_left\"\n  [righttrigger]=\"btn_trigger_right\"\n  [back]=\"btn_menu\"\n  [start]=\"btn_start\"\n  [guide]=\"btn_escape\"\n  [rightstick]=\"btn_fforward\"\n  [dpup]=\"btn_dpad1_up\"\n  [dpdown]=\"btn_dpad1_down\"\n  [dpleft]=\"btn_dpad1_left\"\n  [dpright]=\"btn_dpad1_right\"\n  [leftx]=\"axis_x\"\n  [lefty]=\"axis_y\"\n  [rightx]=\"axis_right_x\"\n  [righty]=\"axis_right_y\"\n)\n\nBTN_SWAP_XY=$(get_ee_setting flycast_joy_swap_xy)\nif [[ \"${BTN_SWAP_XY}\" == \"1\" ]]; then\n  FLYCAST_D_BUTTONS[x]=\"btn_x\"\n  FLYCAST_D_BUTTONS[y]=\"btn_y\"\nfi\n\nBTN_SWAP_AB=$(get_ee_setting flycast_joy_swap_ab)\nif [[ \"${BTN_SWAP_AB}\" == \"1\" ]]; then\n  FLYCAST_D_BUTTONS[a]=\"btn_a\"\n  FLYCAST_D_BUTTONS[b]=\"btn_b\"\nfi\n\ndeclare -A STICK_DIRECTIONS=(\n  [axis_x,neg]=\"btn_analog_left\"  [axis_x,pos]=\"btn_analog_right\"\n  [axis_y,neg]=\"btn_analog_up\"    [axis_y,pos]=\"btn_analog_down\"\n  [axis_right_x,neg]=\"axis2_left\" [axis_right_x,pos]=\"axis2_right\"\n  [axis_right_y,neg]=\"axis2_up\"   [axis_right_y,pos]=\"axis2_down\"\n)\n\n\n# Cleans all the inputs for the gamepad with name ${GAMEPAD} and player ${1}\nclean_pad() {\n  #echo \"Cleaning pad ${1} ${2}\" #debug\n  [[ -f \"${CONFIG_TMP_A}\" ]] && rm \"${CONFIG_TMP_A}\"\n  [[ -f \"${CONFIG_TMP_D}\" ]] && rm \"${CONFIG_TMP_D}\"\n  [[ -f \"${CONFIG_TMP_E}\" ]] && rm \"${CONFIG_TMP_E}\"\n  sed -i \"s/device${1}\\.2.*/device${1}.2 = 10/g\" \"${EMU_FILE}\"\n  sed -i \"s/device${1}\\.1.*/device${1}.1 = 10/g\" \"${EMU_FILE}\"\n  sed -i \"s/device${1} .*/device${1} = 10/g\" \"${EMU_FILE}\"\n  local i=$(( ${1} - 1 ))\n  sed -i \"s/maple_sdl_joystick_${i}.*/maple_sdl_joystick_${i} = -1/g\" \"${EMU_FILE}\"\n}\n\n# Sets pad depending on parameters.\n# ${1} = Player Number\n# ${2} = js[0-7]\n# ${3} = Device GUID\n# ${4} = Device Name\n\nset_pad() {\n  echo \"set_pad params: ${1} ${2} ${3} ${4}\"\n  local JOY_NAME=\"${4}\"\n  local ORDER=${7}\n  local i=$(( ${1} - 1 ))\n\n  # Vars to dinamically set triggers\n  local L_TR_AXIS=\"\"\n  local R_TR_AXIS=\"\"\n\n  sed -i \"s/device${1} .*/device${1} = 0/g\" \"${EMU_FILE}\"\n\n\n  local device1=1\n  local RUMBLE=$(get_ee_setting ee_rumble_strength)\n  [[ -z \"${RUMBLE}\" ]] && RUMBLE=0\n  [[ \"${RUMBLE}\" -gt \"0\" ]] && device1=3\n\n  sed -i \"s/device${1}\\.1.*/device${1}.1 = ${device1}/g\" \"${EMU_FILE}\"\n  sed -i \"s/device${1}\\.2.*/device${1}.2 = 1/g\" \"${EMU_FILE}\"\n  sed -i \"s/maple_sdl_joystick_${i}.*/maple_sdl_joystick_${i} = ${ORDER}/g\" \"${EMU_FILE}\"\n\n  local CONFIG=\"${MAPPING_DIR}/SDL_${JOY_NAME}.cfg\"\n  [[ -f \"${CONFIG}\" ]] && rm \"${CONFIG}\"\n\n  > \"${CONFIG_TMP_A}\"; > \"${CONFIG_TMP_D}\"; > \"${CONFIG_TMP_E}\"\n\n  local GC_CONFIG=\"${5}\"\n  [[ -z ${GC_CONFIG} ]] && return\n  local GC_MAP=$(echo ${GC_CONFIG} | cut -d',' -f3-)\n  set -f\n  local GC_ARRAY=(${GC_MAP//,/ })\n\n  local B_COUNT_A=0\n  local B_COUNT_D=0\n\n  for REC in \"${GC_ARRAY[@]}\"; do\n      local KEY=$(echo ${REC} | cut -d \":\" -f 1)\n      local TVAL=$(echo ${REC} | cut -d \":\" -f 2)\n      local TYPE=${TVAL:0:1}\n      local NUM=${TVAL:1}\n      local ACTION=${FLYCAST_D_BUTTONS[${KEY}]}\n\n      [[ -z \"${ACTION}\" ]] && continue\n\n      if [[ \"${TYPE}\" == \"a\" ]]; then\n          # ANALOG SECTION\n          if [[ \"${KEY}\" == \"leftx\" || \"${KEY}\" == \"lefty\" || \"${KEY}\" == \"rightx\" || \"${KEY}\" == \"righty\" ]]; then\n              echo \"bind$((B_COUNT_A++)) = ${NUM}-:${STICK_DIRECTIONS[${ACTION},neg]}\" >> \"${CONFIG_TMP_A}\"\n              echo \"bind$((B_COUNT_A++)) = ${NUM}+:${STICK_DIRECTIONS[${ACTION},pos]}\" >> \"${CONFIG_TMP_A}\"\n          else\n              # ITS ANALOG TRIGGER\n              echo \"bind$((B_COUNT_A++)) = ${NUM}+:${ACTION}\" >> \"${CONFIG_TMP_A}\"\n              # SAVE IDS FOR LATER\n              [[ \"${KEY}\" == \"lefttrigger\" ]] && L_TR_AXIS=\"${NUM}\"\n              [[ \"${KEY}\" == \"righttrigger\" ]] && R_TR_AXIS=\"${NUM}\"\n          fi\n\n      elif [[ \"${TYPE}\" == \"b\" || \"${TYPE}\" == \"h\" ]]; then\n          # DIGITAL SECTION\n          local FINAL_NUM=${NUM}\n          [[ \"${TYPE}\" == \"h\" ]] && FINAL_NUM=${FLYCAST_D_INDEXES[${TVAL}]}\n\n          echo \"bind$((B_COUNT_D++)) = ${FINAL_NUM}:${ACTION}\" >> \"${CONFIG_TMP_D}\"\n      fi\n  done\n\n  echo \"[analog]\" > \"${CONFIG}\"\n  cat \"${CONFIG_TMP_A}\" | sort >> \"${CONFIG}\"\n\n  echo -e \"\\n[digital]\" >> \"${CONFIG}\"\n  cat \"${CONFIG_TMP_D}\" | sort >> \"${CONFIG}\"\n\n  echo -e \"\\n[emulator]\" >> \"${CONFIG}\"\n  echo \"mapping_name = ${JOY_NAME}\" >> \"${CONFIG}\"\n  echo \"version = 4\" >> \"${CONFIG}\"\n  echo \"rumble_power = ${RUMBLE}\" >> \"${CONFIG}\"\n\n  if [[ ! -z \"${L_TR_AXIS}\" && ! -z \"${R_TR_AXIS}\" ]]; then\n      echo \"triggers = ${L_TR_AXIS},${R_TR_AXIS}\" >> \"${CONFIG}\"\n  fi\n\n  cat \"${CONFIG_TMP_E}\" | sort -u >> \"${CONFIG}\"\n\n  rm \"${CONFIG_TMP_A}\" \"${CONFIG_TMP_D}\" \"${CONFIG_TMP_E}\"\n}\n\ninit_config() {\n  mkdir -p \"/storage/.config/flycast/mappings\"\n\n  # Adjust the emulator config file to load sdl controller files.\n  if [[ ! -f \"${EMU_FILE}\" ]]; then\n    echo \"[input]\" >> \"${EMU_FILE}\"\n\n    local SDL_JOYSTICK=\"maple_sdl_joystick_0 = 0\\nmaple_sdl_joystick_1 = 1\\nmaple_sdl_joystick_2 = 2\\nmaple_sdl_joystick_3 = 3\\n\"\n    echo -e \"${SDL_JOYSTICK}\" >> \"${EMU_FILE}\"\n\n    for i in {1..4}; do\n      echo -e \"device${i} = 0\\ndevice${i}.1 = 1\\ndevice{$i}.2 = 1\\n\" >> \"${EMU_FILE}\"\n    done\n\n    return\n  fi\n\n  local RUMBLE=$(get_ee_setting ee_rumble_strength)\n  [[ -z \"${RUMBLE}\" ]] && RUMBLE=0\n\n  jc_set_record \"${EMU_FILE}\" \"\\[input\\]\" \"VirtualGamepadVibration\" \"${RUMBLE}\"\n}\n\n\ninit_config\n\njc_get_players\n"
  },
  {
    "path": "packages/sx05re/emulators/hatarisa/config/conf/Atari-ST-default.cfg",
    "content": "[Log]\nsLogFileName = stderr\nsTraceFileName = stderr\nnTextLogLevel = 3\nnAlertDlgLogLevel = 1\nbConfirmQuit = FALSE\nbNatFeats = FALSE\nbConsoleWindow = FALSE\n\n[Debugger]\nnNumberBase = 10\nnSymbolLines = -1\nnMemdumpLines = -1\nnDisasmLines = -1\nnExceptionDebugMask = 515\nnDisasmOptions = 15\nbDisasmUAE = FALSE\nbSymbolsResident = FALSE\nbMatchAllSymbols = FALSE\n\n[Screen]\nnMonitorType = 1\nnFrameSkips = 5\nbFullScreen = TRUE\nbKeepResolution = TRUE\nbResizable = TRUE\nbAllowOverscan = TRUE\nnSpec512Threshold = 1\nnForceBpp = 0\nbAspectCorrect = TRUE\nbUseExtVdiResolutions = FALSE\nnVdiWidth = 640\nnVdiHeight = 480\nnVdiColors = 2\nbMouseWarp = TRUE\nbShowStatusbar = FALSE\nbShowDriveLed = FALSE\nbCrop = FALSE\nbForceMax = FALSE\nnMaxWidth = 832\nnMaxHeight = 588\nbUseSdlRenderer = TRUE\nnRenderScaleQuality = 0\nbUseVsync = TRUE\n\n[Joystick0]\nnJoystickMode = 0\nbEnableAutoFire = FALSE\nbEnableJumpOnFire2 = FALSE\nnJoyId = 0\nkUp = Up\nkDown = Down\nkLeft = Left\nkRight = Right\nkFire = Right Ctrl\n\n[Joystick1]\nnJoystickMode = 1\nbEnableAutoFire = FALSE\nbEnableJumpOnFire2 = FALSE\nnJoyId = 0\nkUp = Up\nkDown = Down\nkLeft = Left\nkRight = Right\nkFire = Right Ctrl\n\n[Joystick2]\nnJoystickMode = 0\nbEnableAutoFire = FALSE\nbEnableJumpOnFire2 = FALSE\nnJoyId = 0\nkUp = Up\nkDown = Down\nkLeft = Left\nkRight = Right\nkFire = Right Ctrl\n\n[Joystick3]\nnJoystickMode = 0\nbEnableAutoFire = FALSE\nbEnableJumpOnFire2 = FALSE\nnJoyId = 0\nkUp = Up\nkDown = Down\nkLeft = Left\nkRight = Right\nkFire = Right Ctrl\n\n[Joystick4]\nnJoystickMode = 0\nbEnableAutoFire = FALSE\nbEnableJumpOnFire2 = FALSE\nnJoyId = 0\nkUp = Up\nkDown = Down\nkLeft = Left\nkRight = Right\nkFire = Right Ctrl\n\n[Joystick5]\nnJoystickMode = 0\nbEnableAutoFire = FALSE\nbEnableJumpOnFire2 = FALSE\nnJoyId = 0\nkUp = Up\nkDown = Down\nkLeft = Left\nkRight = Right\nkFire = Right Ctrl\n\n[Keyboard]\nbDisableKeyRepeat = FALSE\nnKeymapType = 0\nszMappingFileName =\n\n[KeyShortcutsWithMod]\nkOptions = O\nkFullScreen = F\nkBorders = B\nkMouseMode = M\nkColdReset = C\nkWarmReset = R\nkScreenShot = G\nkBossKey = I\nkCursorEmu = J\nkFastForward = X\nkRecAnim = A\nkRecSound = Y\nkSound = S\nkPause =\nkDebugger = Pause\nkQuit = Q\nkLoadMem = L\nkSaveMem = K\nkInsertDiskA = D\nkSwitchJoy0 = F1\nkSwitchJoy1 = F2\nkSwitchPadA = F3\nkSwitchPadB = F4\n\n[KeyShortcutsWithoutMod]\nkOptions = F12\nkFullScreen = F11\nkBorders =\nkMouseMode =\nkColdReset =\nkWarmReset =\nkScreenShot =\nkBossKey =\nkCursorEmu =\nkFastForward =\nkRecAnim =\nkRecSound =\nkSound =\nkPause = Pause\nkDebugger =\nkQuit =\nkLoadMem =\nkSaveMem =\nkInsertDiskA =\nkSwitchJoy0 =\nkSwitchJoy1 =\nkSwitchPadA =\nkSwitchPadB =\n\n[Sound]\nbEnableMicrophone = TRUE\nbEnableSound = TRUE\nbEnableSoundSync = FALSE\nnPlaybackFreq = 44100\nnSdlAudioBufferSize = 0\nszYMCaptureFileName = /storage/.hatari/hatari.wav\nYmVolumeMixing = 2\n\n[Memory]\nnMemorySize = 1024\nnTTRamSize = 0\nbAutoSave = FALSE\nszMemoryCaptureFileName = /storage/.config/hatari/hatari.sav\nszAutoSaveFileName = /storage/.config/hatari/auto.sav\n\n[HardDisk]\nnGemdosDrive = 0\nbBootFromHardDisk = FALSE\nbUseHardDiskDirectory = FALSE\nszHardDiskDirectory = /storage/.hatari\nnGemdosCase = 0\nnWriteProtection = 0\nbFilenameConversion = FALSE\nbGemdosHostTime = FALSE\nbUseHardDiskImage = FALSE\nszHardDiskImage = /storage/.hatari\nbUseIdeMasterHardDiskImage = FALSE\nbUseIdeSlaveHardDiskImage = FALSE\nszIdeMasterHardDiskImage = /storage/.hatari\nszIdeSlaveHardDiskImage = /storage/.hatari\n\n[ROM]\nszTosImageFileName = /storage/roms/bios/tos.img\nbPatchTos = TRUE\nszCartridgeImageFileName =\n\n[RS232]\nbEnableRS232 = FALSE\nszOutFileName = /dev/modem\nszInFileName = /dev/modem\n\n[Printer]\nbEnablePrinting = FALSE\nszPrintToFileName = /storage/.config/hatari/hatari.prn\n\n[Midi]\nbEnableMidi = FALSE\nsMidiInFileName = /dev/snd/midiC1D0\nsMidiOutFileName = /dev/snd/midiC1D0\nsMidiInPortName = Off\nsMidiOutPortName = Off\n\n[System]\nnCpuLevel = 0\nnCpuFreq = 8\nbCompatibleCpu = TRUE\nnModelType = 0\nbBlitter = FALSE\nnDSPType = 0\nbPatchTimerD = FALSE\nbFastBoot = FALSE\nbFastForward = FALSE\nbAddressSpace24 = TRUE\nbCycleExactCpu = TRUE\nn_FPUType = 0\nbSoftFloatFPU = FALSE\nbMMU = FALSE\nVideoTiming = 3\n\n[Video]\nAviRecordVcodec = 2\nAviRecordFps = 0\nAviRecordFile = /storage/.hatari/hatari.avi\n\n[Floppy]\nbAutoInsertDiskB = TRUE\nFastFloppy = TRUE\nEnableDriveA = TRUE\nDriveA_NumberOfHeads = 2\nEnableDriveB = TRUE\nDriveB_NumberOfHeads = 2\nnWriteProtection = 0\nszDiskImageDirectory = /storage/roms/atarist\nszDiskAZipPath =\nszDiskBZipPath =\n"
  },
  {
    "path": "packages/sx05re/emulators/hatarisa/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n\nPKG_NAME=\"hatarisa\"\n#PKG_VERSION=\"e1e274a0a47b4f0675505143a4c535700d16f9bd\"\nPKG_VERSION=\"fda67f05188a925535fefc1b0ef24eb044a029d2\"\n#PKG_SHA256=\"a46e6456c4d725e8118fd536284e51f8e467f60b8141491be38101c36278d763\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/hatari/hatari\"\nPKG_URL=\"https://github.com/hatari/hatari/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux glibc systemd alsa-lib SDL2 portaudio zlib capsimg libpng\"\nPKG_LONGDESC=\"Hatari is an Atari ST/STE/TT/Falcon emulator\"\n\n\npre_configure_target() {\n  PKG_CMAKE_OPTS_TARGET=\"-DCMAKE_SKIP_RPATH=ON \\\n                         -DDATADIR=\"/usr/config/hatari\" \\\n                         -DBIN2DATADIR=\"../../storage/.config/hatari\" \\\n                         -DCAPSIMAGE_INCLUDE_DIR=${PKG_BUILD}/src/include \\\n                         -DCAPSIMAGE_LIBRARY=${PKG_BUILD}/libcapsimage.so.5.1\"\n\n  # copy IPF Support Library include files\n  mkdir -p ${PKG_BUILD}/src/includes/caps/\n  cp -R $(get_build_dir capsimg)/LibIPF/* ${PKG_BUILD}/src/includes/caps/\n  cp -R $(get_build_dir capsimg)/Core/CommonTypes.h ${PKG_BUILD}/src/includes/caps/\n  cp -R $(get_install_dir capsimg)/usr/lib/libcapsimage.so.5.1 ${PKG_BUILD}/\n\n  # add library search path for loading libcapsimage library\n  LDFLAGS=\"${LDFLAGS} -Wl,-rpath='${PKG_BUILD}'\"\n}\n\nmakeinstall_target() {\n  # create directories\n  mkdir -p ${INSTALL}/usr/bin\n  mkdir -p ${INSTALL}/usr/config/hatari\n\n  # copy config files  \n  touch ${INSTALL}/usr/config/hatari/hatari.nvram\n  cp -R ${PKG_DIR}/config/* ${INSTALL}/usr/config/hatari\n\n  # copy binary & start script\n  cp src/hatari ${INSTALL}/usr/bin\n  cp -R ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin/\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/hatarisa/portaudio/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n\nPKG_NAME=\"portaudio\"\nPKG_VERSION=\"64d1bf913433d7a2835526b80a93487d5038cb8e\"\nPKG_SHA256=\"c33e48217a844cca3b66ab88571b90beefb8fcb6967177951d4dc283587bf834\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://portaudio.com\"\nPKG_URL=\"https://github.com/zhang-ray/portaudio/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib\"\nPKG_LONGDESC=\"PortAudio is a free, cross-platform, open-source, audio I/O library.\"\n"
  },
  {
    "path": "packages/sx05re/emulators/hatarisa/scripts/hatari.start",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n\n. /etc/profile\n\n# Set some common variables\nHATARI_DIR_HOME=/storage/.hatari\nHATARI_DIR=/storage/.config/hatari\nHATARI_CONFIG_DIR=$HATARI_DIR/conf\nHATARI_TMP_DIR=/tmp/hatari\nHATARI_TMP_CONFIG=\"$HATARI_TMP_DIR\"/.hatari-temp.cfg\nHATARI_LOG=\"/emuelec/logs/hatari.log\"\nMAX_DRIVES=2\ni=0\n\nexport SDL_AUDIODRIVER=alsa\n\n# create symlink to hatari config dir\nif [ ! -L $HATARI_DIR_HOME ]; then\n  rm -rf $HATARI_DIR_HOME\n  ln -s $HATARI_DIR $HATARI_DIR_HOME\nfi\n\n# Which file should hatari load?\necho \"Trying to boot this game:\" \"$1\" >> $HATARI_LOG\n\n# Create a clean working directory\nif [ -d \"$HATARI_TMP_DIR\" ]; then\n  echo \"Clean up old working directory.\" >> $HATARI_LOG\n  rm -rf \"$HATARI_TMP_DIR\"\nfi\nmkdir -p \"$HATARI_TMP_DIR\"\n\n# copy default config file to tmp\ncp $HATARI_CONFIG_DIR/Atari-ST-default.cfg \"$HATARI_TMP_CONFIG\"\n\n# Check if we are loading a .zip file\nif [ `echo $1 | grep -i .zip | wc -l` -eq 1 ]; then\n\n  #unpack the zip file\n  unzip -q -o \"$1\" -d \"$HATARI_TMP_DIR\"\n\n  # Assign files to floppy 1 & 2\n  for FILE in \"$HATARI_TMP_DIR\"/*\n  do\n    i=$(($i+1))\n    case \"$i\" in\n    1)\n      ARGS=\"\\nszDiskAFileName = \"$FILE\"\"\n      ;;\n    2)\n      ARGS=\"$ARGS\\nszDiskBFileName = \"$FILE\"\"\n      ;;\n    esac\n\n    # This emulator supports 2 floppies max\n    if [ $i -eq $MAX_DRIVES ]; then\n      break;\n    fi\n  done\n\n    # Add game files as floppy 1 & 2 to .hatari-temp.cfg & start hatari\n    echo -e $ARGS >> \"$HATARI_TMP_CONFIG\"\n    echo -e \"\\nAssigned floppy drives:\" $ARGS \"\\n\" >> \"$HATARI_LOG\"\n    hatari --configfile \"$HATARI_TMP_CONFIG\" >> $HATARI_LOG 2>&1\n\n# Check for .cfg config file\nelif [ `echo $1 | grep -i .cfg | wc -l` -eq 1 ]; then\n  hatari --configfile \"$1\" >> $HATARI_LOG 2>&1\n# All other files\nelse\n  hatari --configfile \"$HATARI_TMP_CONFIG\" --disk-a \"$1\" >> $HATARI_LOG 2>&1\nfi\n# Remove temporary dir\nrm -rf \"$HATARI_TMP_DIR\"\n"
  },
  {
    "path": "packages/sx05re/emulators/hypseus-singe/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"hypseus-singe\"\nPKG_VERSION=\"8397498bccd5dd8afc55b2200d533d66e17be56f\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL3\"\nPKG_SITE=\"https://github.com/DirtBagXon/hypseus-singe\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 libvorbis SDL2_ttf SDL2_image\"\nPKG_LONGDESC=\"Hypseus is a fork of Daphne. A program that lets one play the original versions of many laserdisc arcade games on one's PC.\"\nPKG_TOOLCHAIN=\"cmake\"\nGET_HANDLER_SUPPORT=\"git\"\n\nPKG_CMAKE_OPTS_TARGET=\" ./src\"\n\npre_configure_target() {\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/hypseus\nln -fs /storage/roms/daphne/roms ${INSTALL}/usr/config/emuelec/configs/hypseus/roms\nln -fs /usr/share/daphne/sound ${INSTALL}/usr/config/emuelec/configs/hypseus/sound\nln -fs /usr/share/daphne/fonts ${INSTALL}/usr/config/emuelec/configs/hypseus/fonts\nln -fs /usr/share/daphne/pics ${INSTALL}/usr/config/emuelec/configs/hypseus/pics\n}\n\npost_makeinstall_target() {\ncp -rf ${PKG_BUILD}/doc/hypinput.ini ${INSTALL}/usr/config/emuelec/configs/hypseus/hypinput.ini\ncp -rf ${PKG_BUILD}/doc/hypinput_gamepad.ini ${INSTALL}/usr/config/emuelec/configs/hypseus/hypinput_gamepad.ini\nln -fs /storage/.config/emuelec/configs/hypseus/hypinput.ini ${INSTALL}/usr/share/daphne/hypinput.ini\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/hypseus-singe/patches/hypseus-singe-001-buildfix.patch",
    "content": "--- a/src/CMakeLists.txt\t2021-06-07 19:12:18.646828485 +0200\n+++ b/src/CMakeLists.txt\t2021-06-07 19:13:56.113491528 +0200\n@@ -52,15 +52,13 @@\n include(GetGitRevisionDescription)\n include(InstallRequiredSystemLibraries)\n include(FindPkgConfig)\n-include(ExternalProject)\n-include(BuildLibMPEG2)\n \n use_cxx11( )\n \n PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)\n PKG_SEARCH_MODULE(SDL2_TTF REQUIRED SDL2_ttf)\n PKG_SEARCH_MODULE(SDL2_MIXER REQUIRED SDL2_mixer)\n-build_libmpeg2( )\n+PKG_SEARCH_MODULE(MPEG2 REQUIRED libmpeg2)\n \n message(STATUS \"Target: ${CMAKE_SYSTEM_NAME} ${CMAKE_TARGET_ARCHITECTURES}\")\n \n@@ -114,7 +112,6 @@\n add_subdirectory(video)\n add_subdirectory(vldp)\n \n-add_dependencies( vldp libmpeg2 )\n add_dependencies( ldp-out vldp )\n add_dependencies( game vldp )\n add_dependencies( sound vldp )\n@@ -162,3 +159,5 @@\n set(CPACK_PACKAGE_VERSION_PATCH \"${VER_PATCH}\")\n \n include(CPack)\n+install(TARGETS hypseus DESTINATION bin)\n+install(DIRECTORY ../pics ../fonts ../sound DESTINATION /usr/share/daphne)\ndiff --git a/src/vldp/vldp.h b/src/vldp/vldp.h\nindex a59c723..3c986dc 100644\n--- a/src/vldp/vldp.h\n+++ b/src/vldp/vldp.h\n@@ -34,6 +34,8 @@ extern \"C\" {\n // Ubuntu Linux complains with plain <SDL.h>\n #include <SDL2/SDL.h> // only used for threading\n \n+#include <mpeg2dec/mpeg2.h>\n+\n struct yuv_buf {\n     uint8_t *Y;     // Y channel\n     uint8_t *U;     // U channel\ndiff --git a/src/vldp/vldp_internal.h b/src/vldp/vldp_internal.h\nindex cd046fe..67cea2d 100644\n--- a/src/vldp/vldp_internal.h\n+++ b/src/vldp/vldp_internal.h\n@@ -27,7 +27,6 @@\n \n #include \"vldp.h\" // for the VLDP_BOOL definition and SDL.h\n \n-#include <mpeg2.h>\n \n // this is which version of the .dat file format we are using\n #define DAT_VERSION 2\n \n--- a/src/manymouse/CMakeLists.txt\n+++ b/src/manymouse/CMakeLists.txt\n@@ -1,7 +1,8 @@\n+\n+\n set( LIB_SOURCES\n     manymouse.c linux_evdev.c macosx_hidmanager.c\n     macosx_hidutilities.c windows_wminput.c\n-    x11_xinput2.c\n )\n \n set( LIB_HEADERS\n"
  },
  {
    "path": "packages/sx05re/emulators/hypseus-singe/patches/hypseus-singe-002-headersfix.patch",
    "content": "diff --git a/src/game/singe.cpp b/src/game/singe.cpp\nindex b6506b8..fb2af4e 100644\n--- a/src/game/singe.cpp\n+++ b/src/game/singe.cpp\n@@ -28,6 +28,8 @@\n \n #include \"singe.h\"\n #include \"singe/singe_interface.h\"\n+#include <plog/Log.h>\n+#include <ctime>\n \n // Win32 doesn't use strcasecmp, it uses stricmp (lame)\n #ifdef WIN32\n"
  },
  {
    "path": "packages/sx05re/emulators/hypseus-singe/patches/manymouse.patch",
    "content": "--- a/src/manymouse/manymouse.c\t2025-08-06 13:57:11.365331700 +0200\n+++ b/src/manymouse/manymouse.c\t2025-08-06 13:58:27.190043892 +0200\n@@ -15,7 +15,6 @@\n \n extern const ManyMouseDriver *ManyMouseDriver_windows;\n extern const ManyMouseDriver *ManyMouseDriver_evdev;\n-extern const ManyMouseDriver *ManyMouseDriver_xinput2;\n extern const ManyMouseDriver *ManyMouseDriver_hidmanager;\n extern const ManyMouseDriver *ManyMouseDriver_hidutilities;\n \n@@ -33,7 +32,6 @@\n static const ManyMouseDriver **mice_drivers[] =\n {\n     &ManyMouseDriver_evdev,\n-    &ManyMouseDriver_xinput2,\n     &ManyMouseDriver_windows,\n     &ManyMouseDriver_hidmanager,\n     &ManyMouseDriver_hidutilities\n"
  },
  {
    "path": "packages/sx05re/emulators/ikemen-go/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2025-present DiegroSan (https://github.com/Diegrosan)\n# Thank you very much, leonkasovan, for the Port (aarch64/arm64 port) SDL ikemen-go\n#\n\nPKG_NAME=\"ikemen-go\"\nPKG_VERSION=\"86bd3bf7b378eb31239624c698b295d399f96873\"\nPKG_GIT_CLONE_BRANCH=\"SDL2\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\" \nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/leonkasovan/Ikemen-GO\"\nPKG_URL=\"https://github.com/leonkasovan/Ikemen-GO.git\"\nPKG_DEPENDS_TARGET=\"toolchain go:host go SDL2 ${OPENGLES} openal-soft sdlgamepadmap\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_SHORTDESC=\"Open-source fighting game engine\"\nPKG_LONGDESC=\"Ikemen GO is an open-source fighting game engine.\"\nPKG_IS_TARGET=y\nGET_HANDLER_SUPPORT=\"git\"\n\npre_configure_target() {\n\n    export GOOS=linux \n    export GOARCH=arm64 \n    export CGO_ENABLED=1\n    \n    export CGO_CFLAGS=\"$CFLAGS -w -DGL_GLEXT_PROTOTYPES $(pkg-config --cflags sdl2)\"\n    export CGO_CXXFLAGS=\"$CXXFLAGS -w -DGL_GLEXT_PROTOTYPES\"\n    export CGO_LDFLAGS=\"$LDFLAGS -lGLESv2 -lEGL $(pkg-config --libs sdl2)\"\n    \n    export GOPATH=\"$PKG_BUILD/.gopath\"\n    export GOROOT=\"$(get_build_dir go)\"\n    export PATH=\"$GOROOT/bin:$PATH\"\n    \n    export PKG_CONFIG_PATH=\"$SYSROOT_PREFIX/usr/lib/pkgconfig:$SYSROOT_PREFIX/usr/share/pkgconfig\"\n}\n\npre_make_target() {\n    # Garantir que as dependências estejam atualizadas / Ensure dependencies are up to date\n    go mod tidy\n    chmod -R 775 \"${PKG_BUILD}/.gopath\"\n}\n\nmake_target() {\n    cd \"$PKG_BUILD\"\n    chmod a+x build/build.sh\n    cd ./build && ./build.sh pi4\n    chmod -R 775 \"${PKG_BUILD}/.gopath\"\n}\n\nmakeinstall_target() {\n    \n    mkdir -p \"$INSTALL/usr/bin\"\n    mkdir -p \"$INSTALL/usr/share/ikemen_go\"\n\t\n\t# Copy alsa config\n\tmkdir -p ${INSTALL}/usr/config\n\tcp -rf ${PKG_DIR}/src/asound-ikemen.conf ${INSTALL}/usr/config/\n\t\n    cp -f \"$PKG_DIR/src/Ikemen_Go.sh\" \"$INSTALL/usr/bin/Ikemen_Go.sh\"\n    cp \"$PKG_BUILD/bin/Ikemen_Go_\"* \"$INSTALL/usr/bin/Ikemen_Go\"\n    \n    # Copiar recursos / Copy resources\n    cp -rf \"$PKG_BUILD/data\" \"$INSTALL/usr/share/ikemen_go\"\n    cp -rf \"$PKG_BUILD/external\" \"$INSTALL/usr/share/ikemen_go\"\n    cp -rf \"$PKG_BUILD/font\" \"$INSTALL/usr/share/ikemen_go\"\n    \n\n    chmod +x \"$INSTALL/usr/bin/Ikemen_Go.sh\"\n    chmod +x \"$INSTALL/usr/bin/Ikemen_Go\"\n    \n}\n\n"
  },
  {
    "path": "packages/sx05re/emulators/ikemen-go/patches/0001-enhance_joystick_and_game_controller_support.patch",
    "content": "From 49df807e8c646e6d06543b8787f0090848d4a7bf Mon Sep 17 00:00:00 2001\nFrom: Adventurous Programmer <47227694+Diegrosan@users.noreply.github.com>\nDate: Wed, 22 Oct 2025 14:48:17 -0300\nSubject: [PATCH] Enhance input handling with game controller support\n\nAdded support for game controllers in the input handling system, including common mappings and loading from an external database.\n---\n src/input_sdl.go | 363 +++++++++++++++++++++++++++++++++--------------\n 1 file changed, 253 insertions(+), 110 deletions(-)\n\ndiff --git a/src/input_sdl.go b/src/input_sdl.go\nindex 409b41790..8bdc12b95 100644\n--- a/src/input_sdl.go\n+++ b/src/input_sdl.go\n@@ -1,11 +1,14 @@\n //go:build sdl\n+// +build sdl\n \n package main\n \n import (\n \t\"fmt\"\n+\t\"os\"\n \t\"runtime\"\n \t\"strconv\"\n+\t\"strings\"\n \n \tsdl \"github.com/veandco/go-sdl2/sdl\"\n )\n@@ -13,7 +16,10 @@ import (\n const MAX_JOYSTICK_COUNT = 4\n \n type Input struct {\n-\tjoysticks [MAX_JOYSTICK_COUNT]*sdl.Joystick\n+\tjoysticks        [MAX_JOYSTICK_COUNT]*sdl.Joystick\n+\tgameControllers  [MAX_JOYSTICK_COUNT]*sdl.GameController\n+\tuseGameController [MAX_JOYSTICK_COUNT]bool\n+\tdeviceIndex      [MAX_JOYSTICK_COUNT]int32\n }\n \n type Key = sdl.Keycode\n@@ -154,6 +160,76 @@ func init() {\n \tfor k, v := range KeyToStringLUT {\n \t\tStringToKeyLUT[v] = k\n \t}\n+\t\n+\tif err := sdl.InitSubSystem(sdl.INIT_GAMECONTROLLER); err != nil {\n+\t\tfmt.Printf(\"[init] Failed to initialize GameController: %v\\n\", err)\n+\t}\n+\t\n+\tAddCommonMappings()\n+\tLoadGameControllerDB()\n+}\n+\n+func AddCommonMappings() {\n+\tfmt.Printf(\"[AddCommonMappings] Loading built-in controller mappings...\\n\")\n+\t\n+\tcommonMappings := []string{\n+\t\t\"030000005e0400008e02000014010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n+\t\t\"030000005e040000ea02000001030000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,\",\n+\t\t\"030000004c050000c405000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n+\t\t\"030000004c050000e60c000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,\",\n+\t\t\"030000007e0500000920000001000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,\",\n+\t\t\"03000000790000001100000000000000,Generic USB Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,\",\n+\t}\n+\t\n+\tcount := 0\n+\tfor _, mapping := range commonMappings {\n+\t\tif sdl.GameControllerAddMapping(mapping) >= 0 {\n+\t\t\tcount++\n+\t\t}\n+\t}\n+\t\n+\tfmt.Printf(\"[AddCommonMappings] Loaded %d built-in mappings (will be overridden by gamecontrollerdb.txt if present)\\n\", count)\n+}\n+\n+func LoadGameControllerDB() {\n+\tenvPath := os.Getenv(\"SDL_GAMECONTROLLERCONFIG_FILE\")\n+\t\n+\tif envPath == \"\" {\n+\t\tfmt.Printf(\"[LoadGameControllerDB] SDL_GAMECONTROLLERCONFIG_FILE environment variable not set\\n\")\n+\t\tfmt.Printf(\"[LoadGameControllerDB] Using built-in mappings as fallback\\n\")\n+\t\treturn\n+\t}\n+\t\n+\tfmt.Printf(\"[LoadGameControllerDB] Searching for gamecontrollerdb.txt in:\\n\")\n+\tfmt.Printf(\"[LoadGameControllerDB]   - %s (SDL_GAMECONTROLLERCONFIG_FILE env variable)\\n\", envPath)\n+\t\n+\tif _, err := os.Stat(envPath); err != nil {\n+\t\tfmt.Printf(\"[LoadGameControllerDB] File not found: %s\\n\", envPath)\n+\t\tfmt.Printf(\"[LoadGameControllerDB] Using built-in mappings as fallback\\n\")\n+\t\treturn\n+\t}\n+\t\n+\tdata, err := os.ReadFile(envPath)\n+\tif err != nil {\n+\t\tfmt.Printf(\"[LoadGameControllerDB] Failed to read file: %v\\n\", err)\n+\t\tfmt.Printf(\"[LoadGameControllerDB] Using built-in mappings as fallback\\n\")\n+\t\treturn\n+\t}\n+\t\n+\tlines := strings.Split(string(data), \"\\n\")\n+\tcount := 0\n+\tfor _, line := range lines {\n+\t\tline = strings.TrimSpace(line)\n+\t\tif len(line) == 0 || strings.HasPrefix(line, \"#\") {\n+\t\t\tcontinue\n+\t\t}\n+\t\tif sdl.GameControllerAddMapping(line) >= 0 {\n+\t\t\tcount++\n+\t\t}\n+\t}\n+\t\n+\tfmt.Printf(\"[LoadGameControllerDB] Loaded %d mappings from: %s\\n\", count, envPath)\n+\tfmt.Printf(\"[LoadGameControllerDB] External database has PRIORITY over built-in mappings\\n\")\n }\n \n func StringToKey(s string) sdl.Keycode {\n@@ -170,7 +246,6 @@ func KeyToString(k sdl.Keycode) string {\n \treturn \"\"\n }\n \n-// to be fix: doesn't work toggle Full Screen\n func NewModifierKey(ctrl, alt, shift bool) (mod ModifierKey) {\n \tif ctrl {\n \t\tmod |= sdl.KMOD_CTRL\n@@ -194,29 +269,48 @@ func (input *Input) IsJoystickPresent(joy int) bool {\n \tif joy < 0 || joy >= len(input.joysticks) {\n \t\treturn false\n \t}\n-\treturn input.joysticks[joy].Attached()\n+\tif input.gameControllers[joy] != nil {\n+\t\treturn true\n+\t}\n+\tif input.joysticks[joy] != nil {\n+\t\treturn input.joysticks[joy].Attached()\n+\t}\n+\treturn false\n }\n \n func (input *Input) GetJoystickName(joy int) string {\n \tif joy < 0 || joy >= len(input.joysticks) {\n \t\treturn \"\"\n \t}\n-\treturn input.joysticks[joy].Name()\n+\tif input.gameControllers[joy] != nil {\n+\t\treturn input.gameControllers[joy].Name()\n+\t}\n+\tif input.joysticks[joy] != nil {\n+\t\treturn input.joysticks[joy].Name()\n+\t}\n+\treturn \"\"\n }\n \n func (input *Input) GetJoystickAxis(joy int, axis int) int16 {\n \tif joy < 0 || joy >= len(input.joysticks) {\n \t\treturn 0\n \t}\n-\treturn input.joysticks[joy].Axis(axis)\n+\tif input.joysticks[joy] != nil {\n+\t\treturn input.joysticks[joy].Axis(axis)\n+\t}\n+\treturn 0\n }\n \n func (input *Input) GetJoystickAxes(joy int) []int16 {\n \tif joy < 0 || joy >= len(input.joysticks) {\n \t\treturn []int16{}\n \t}\n-\taxes := make([]int16, input.joysticks[joy].NumAxes())\n-\tfor i := range axes {\n+\tif input.joysticks[joy] == nil {\n+\t\treturn []int16{}\n+\t}\n+\tnumAxes := input.joysticks[joy].NumAxes()\n+\taxes := make([]int16, numAxes)\n+\tfor i := 0; i < numAxes; i++ {\n \t\taxes[i] = input.joysticks[joy].Axis(i)\n \t}\n \treturn axes\n@@ -226,8 +320,12 @@ func (input *Input) GetJoystickButtons(joy int) []byte {\n \tif joy < 0 || joy >= len(input.joysticks) {\n \t\treturn []byte{}\n \t}\n-\tbuttons := make([]byte, input.joysticks[joy].NumButtons())\n-\tfor i := range buttons {\n+\tif input.joysticks[joy] == nil {\n+\t\treturn []byte{}\n+\t}\n+\tnumButtons := input.joysticks[joy].NumButtons()\n+\tbuttons := make([]byte, numButtons)\n+\tfor i := 0; i < numButtons; i++ {\n \t\tbuttons[i] = input.joysticks[joy].Button(i)\n \t}\n \treturn buttons\n@@ -237,13 +335,26 @@ func (input *Input) GetJoystickHats(joy int) []byte {\n \tif joy < 0 || joy >= len(input.joysticks) {\n \t\treturn []byte{}\n \t}\n-\thats := make([]byte, input.joysticks[joy].NumHats())\n-\tfor i := range hats {\n+\tif input.joysticks[joy] == nil {\n+\t\treturn []byte{}\n+\t}\n+\tnumHats := input.joysticks[joy].NumHats()\n+\thats := make([]byte, numHats)\n+\tfor i := 0; i < numHats; i++ {\n \t\thats[i] = input.joysticks[joy].Hat(i)\n \t}\n \treturn hats\n }\n \n+func getAxisValue(value int16, sensitivity int16) int16 {\n+\tif value > sensitivity {\n+\t\treturn value\n+\t} else if value < -sensitivity {\n+\t\treturn value\n+\t}\n+\treturn 0\n+}\n+\n func JoystickState(joy, button int) bool {\n \tif joy < 0 {\n \t\treturn sys.keyState[Key(button)]\n@@ -251,81 +362,101 @@ func JoystickState(joy, button int) bool {\n \tif joy >= input.GetMaxJoystickCount() {\n \t\treturn false\n \t}\n+\t\n \tjs := input.joysticks[joy]\n-\tif button >= js.NumButtons() { // only check for Hats or \"axis for dpad\" (max_button,max_button+1,max_button+2,max_button+3)\n-\t\tif js.NumAxes() >= 2 { // check axes for dpad\n-\t\t\tswitch button { // check HAT0, AXIS1, AXIS2\n-\t\t\tcase sys.joystickConfig[joy].dU: // Up\n-\t\t\t\treturn (js.Axis(1) < -sys.controllerStickSensitivitySDL) || ((js.Hat(0) & 1) != 0)\n-\t\t\tcase sys.joystickConfig[joy].dR: // Right\n-\t\t\t\treturn (js.Axis(0) > sys.controllerStickSensitivitySDL) || ((js.Hat(0) & 2) != 0)\n-\t\t\tcase sys.joystickConfig[joy].dD: // Down\n-\t\t\t\treturn (js.Axis(1) > sys.controllerStickSensitivitySDL) || ((js.Hat(0) & 4) != 0)\n-\t\t\tcase sys.joystickConfig[joy].dL: // Left\n-\t\t\t\treturn (js.Axis(0) < -sys.controllerStickSensitivitySDL) || ((js.Hat(0) & 8) != 0)\n-\t\t\tdefault: // invalid button code if > max_button+3\n-\t\t\t\treturn false\n-\t\t\t}\n-\t\t} else {\n-\t\t\tswitch button { // check HAT0 only\n-\t\t\tcase sys.joystickConfig[joy].dU: // Up\n-\t\t\t\treturn js.Hat(0)&1 != 0\n-\t\t\tcase sys.joystickConfig[joy].dR: // Right\n-\t\t\t\treturn js.Hat(0)&2 != 0\n-\t\t\tcase sys.joystickConfig[joy].dD: // Down\n-\t\t\t\treturn js.Hat(0)&4 != 0\n-\t\t\tcase sys.joystickConfig[joy].dL: // Left\n-\t\t\t\treturn js.Hat(0)&8 != 0\n-\t\t\tdefault: // invalid button code if > max_button+3\n-\t\t\t\treturn false\n+\tif js == nil {\n+\t\treturn false\n+\t}\n+\t\n+\tisDpadButton := button == sys.joystickConfig[joy].dU ||\n+\t\tbutton == sys.joystickConfig[joy].dR ||\n+\t\tbutton == sys.joystickConfig[joy].dD ||\n+\t\tbutton == sys.joystickConfig[joy].dL\n+\t\n+\tif isDpadButton {\n+\t\tif js.NumHats() > 0 {\n+\t\t\thatValue := js.Hat(0)\n+\t\t\tswitch button {\n+\t\t\tcase sys.joystickConfig[joy].dU:\n+\t\t\t\tif hatValue&sdl.HAT_UP != 0 {\n+\t\t\t\t\treturn true\n+\t\t\t\t}\n+\t\t\tcase sys.joystickConfig[joy].dR:\n+\t\t\t\tif hatValue&sdl.HAT_RIGHT != 0 {\n+\t\t\t\t\treturn true\n+\t\t\t\t}\n+\t\t\tcase sys.joystickConfig[joy].dD:\n+\t\t\t\tif hatValue&sdl.HAT_DOWN != 0 {\n+\t\t\t\t\treturn true\n+\t\t\t\t}\n+\t\t\tcase sys.joystickConfig[joy].dL:\n+\t\t\t\tif hatValue&sdl.HAT_LEFT != 0 {\n+\t\t\t\t\treturn true\n+\t\t\t\t}\n \t\t\t}\n \t\t}\n-\t} else if button >= 0 { // Check for button code (0,1,2,...,10,11,max_button-1)\n+\t\t\n \t\tif js.NumAxes() >= 2 {\n-\t\t\tswitch button { // check BUTTON, AXIS1, AXIS2\n-\t\t\tcase sys.joystickConfig[joy].dU: // Up: check axis, d.pad(hat), button\n-\t\t\t\treturn (js.Axis(1) < -sys.controllerStickSensitivitySDL) || (js.Button(button) != 0)\n-\t\t\tcase sys.joystickConfig[joy].dR: // Right: check axis and d.pad(hat), button\n-\t\t\t\treturn (js.Axis(0) > sys.controllerStickSensitivitySDL) || (js.Button(button) != 0)\n-\t\t\tcase sys.joystickConfig[joy].dD: // Down: check axis and d.pad(hat), button\n-\t\t\t\treturn (js.Axis(1) > sys.controllerStickSensitivitySDL) || (js.Button(button) != 0)\n-\t\t\tcase sys.joystickConfig[joy].dL: // Left: check axis and d.pad(hat), button\n-\t\t\t\treturn (js.Axis(0) < -sys.controllerStickSensitivitySDL) || (js.Button(button) != 0)\n-\t\t\tdefault: // Other (normal) button\n-\t\t\t\t// if js.Button(button) != 0 {\n-\t\t\t\t// \tfmt.Printf(\"[default] input.joysticks[%v].Button(%v)=%v\\n\", joy, button, js.Button(button))\n-\t\t\t\t// }\n-\t\t\t\treturn js.Button(button) != 0\n+\t\t\taxis0 := getAxisValue(js.Axis(0), sys.controllerStickSensitivitySDL)\n+\t\t\taxis1 := getAxisValue(js.Axis(1), sys.controllerStickSensitivitySDL)\n+\t\t\t\n+\t\t\tswitch button {\n+\t\t\tcase sys.joystickConfig[joy].dU:\n+\t\t\t\tif axis1 < 0 {\n+\t\t\t\t\treturn true\n+\t\t\t\t}\n+\t\t\tcase sys.joystickConfig[joy].dR:\n+\t\t\t\tif axis0 > 0 {\n+\t\t\t\t\treturn true\n+\t\t\t\t}\n+\t\t\tcase sys.joystickConfig[joy].dD:\n+\t\t\t\tif axis1 > 0 {\n+\t\t\t\t\treturn true\n+\t\t\t\t}\n+\t\t\tcase sys.joystickConfig[joy].dL:\n+\t\t\t\tif axis0 < 0 {\n+\t\t\t\t\treturn true\n+\t\t\t\t}\n \t\t\t}\n-\t\t} else { // check BUTTON only\n+\t\t}\n+\t\t\n+\t\tif button >= 0 && button < js.NumButtons() {\n \t\t\treturn js.Button(button) != 0\n \t\t}\n-\n-\t} else { // Check for Axis code, button is negatif (-1,-2,...,-10,-11,...)\n+\t\t\n+\t\treturn false\n+\t}\n+\t\n+\tif button >= 0 && button < js.NumButtons() {\n+\t\treturn js.Button(button) != 0\n+\t}\n+\t\n+\tif button < 0 {\n \t\tvar axis int\n-\t\tif button&1 == 0 {\n+\t\tisPositive := (button & 1) == 0\n+\t\t\n+\t\tif isPositive {\n \t\t\taxis = (-button - 1) / 2\n \t\t} else {\n \t\t\taxis = -button / 2\n \t\t}\n-\t\tif js.NumAxes() > axis {\n-\t\t\tvalue := js.Axis(axis)\n-\t\t\tif button&1 == 0 {\n-\t\t\t\treturn value > sys.controllerStickSensitivitySDL\n+\t\t\n+\t\tif axis < js.NumAxes() {\n+\t\t\tvalue := getAxisValue(js.Axis(axis), sys.controllerStickSensitivitySDL)\n+\t\t\tif isPositive {\n+\t\t\t\treturn value > 0\n \t\t\t} else {\n-\t\t\t\treturn -value > sys.controllerStickSensitivitySDL\n+\t\t\t\treturn value < 0\n \t\t\t}\n-\t\t} else {\n-\t\t\treturn false\n \t\t}\n-\t\treturn false\n \t}\n+\t\n+\treturn false\n }\n \n-// Reads controllers and converts inputs to letters for later processing\n func (ir *InputReader) LocalInput(in int) (bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool) {\n \tvar U, D, L, R, a, b, c, x, y, z, s, d, w, m bool\n-\t// Keyboard\n+\t\n \tif in < len(sys.keyConfig) {\n \t\tjoy := sys.keyConfig[in].Joy\n \t\tif joy == -1 {\n@@ -345,12 +476,12 @@ func (ir *InputReader) LocalInput(in int) (bool, bool, bool, bool, bool, bool, b\n \t\t\tm = sys.keyConfig[in].m()\n \t\t}\n \t}\n-\t// Joystick\n+\t\n \tif in < len(sys.joystickConfig) {\n \t\tsdl.JoystickUpdate()\n \t\tjoyS := sys.joystickConfig[in].Joy\n \t\tif joyS >= 0 {\n-\t\t\tU = U || sys.joystickConfig[in].U() // Does not override keyboard\n+\t\t\tU = U || sys.joystickConfig[in].U()\n \t\t\tD = D || sys.joystickConfig[in].D()\n \t\t\tL = L || sys.joystickConfig[in].L()\n \t\t\tR = R || sys.joystickConfig[in].R()\n@@ -366,61 +497,73 @@ func (ir *InputReader) LocalInput(in int) (bool, bool, bool, bool, bool, bool, b\n \t\t\tm = m || sys.joystickConfig[in].m()\n \t\t}\n \t}\n-\t// Button assist is checked locally so the sent inputs are already processed\n+\t\n \tif sys.inputButtonAssist {\n \t\ta, b, c, x, y, z, s, d, w = ir.ButtonAssistCheck(a, b, c, x, y, z, s, d, w)\n \t}\n+\t\n \treturn U, D, L, R, a, b, c, x, y, z, s, d, w, m\n }\n \n func checkAxisForDpad(joy int, axes *[]int16, base int) string {\n-\tvar s string\n-\tif (*axes)[0] > sys.controllerStickSensitivitySDL { // right\n-\t\ts = strconv.Itoa(2 + base)\n-\t\tfmt.Printf(\"[input_sdl.go][checkAxisForDpad] AXIS for DPAD RIGHT joy=%v s: %v\\n\", joy, s)\n-\t} else if -(*axes)[0] > sys.controllerStickSensitivitySDL { // left\n-\t\ts = strconv.Itoa(1 + base)\n-\t\tfmt.Printf(\"[input_sdl.go][checkAxisForDpad] AXIS for DPAD LEFT joy=%v s: %v\\n\", joy, s)\n-\t}\n-\tif (*axes)[1] > sys.controllerStickSensitivitySDL { // down\n-\t\ts = strconv.Itoa(3 + base)\n-\t\tfmt.Printf(\"[input_sdl.go][checkAxisForDpad] AXIS for DPAD DOWN joy=%v s: %v\\n\", joy, s)\n-\t} else if -(*axes)[1] > sys.controllerStickSensitivitySDL { // up\n-\t\ts = strconv.Itoa(base)\n-\t\tfmt.Printf(\"[input_sdl.go][checkAxisForDpad] AXIS  for DPAD UP joy=%v s: %v\\n\", joy, s)\n-\t}\n-\treturn s\n+\tif len(*axes) < 2 {\n+\t\treturn \"\"\n+\t}\n+\t\n+\taxis0 := getAxisValue((*axes)[0], sys.controllerStickSensitivitySDL)\n+\taxis1 := getAxisValue((*axes)[1], sys.controllerStickSensitivitySDL)\n+\t\n+\tif axis0 > 0 {\n+\t\treturn strconv.Itoa(2 + base)\n+\t} else if axis0 < 0 {\n+\t\treturn strconv.Itoa(1 + base)\n+\t}\n+\t\n+\tif axis1 > 0 {\n+\t\treturn strconv.Itoa(3 + base)\n+\t} else if axis1 < 0 {\n+\t\treturn strconv.Itoa(base)\n+\t}\n+\t\n+\treturn \"\"\n }\n \n func checkAxisForTrigger(joy int, axes *[]int16) string {\n-\tvar s string = \"\"\n+\tname := input.GetJoystickName(joy) + \".\" + runtime.GOOS + \".\" + runtime.GOARCH + \".sdl\"\n+\t\n+\trestingTriggers := map[string][]int{\n+\t\t\"XInput Gamepad (GLFW).windows.amd64.sdl\":     {4, 5},\n+\t\t\"PS4 Controller.windows.amd64.sdl\":            {4, 5},\n+\t\t\"Steam Virtual Gamepad.linux.amd64.glfw\":      {2, 5},\n+\t\t\"Steam Deck Controller.linux.amd64.sdl\":       {2, 5},\n+\t\t\"PS3 Controller.linux.amd64.sdl\":              {2, 5},\n+\t\t\"Logitech Dual Action.linux.amd64.sdl\":        {2, 5},\n+\t\t\"Gamepad.linux.arm64.sdl\":                     {4, 5},\n+\t}\n+\t\n+\texceptions := restingTriggers[name]\n+\t\n \tfor i := range *axes {\n-\t\tif (*axes)[i] < -sys.controllerStickSensitivitySDL {\n-\t\t\tname := input.GetJoystickName(joy) + \".\" + runtime.GOOS + \".\" + runtime.GOARCH + \".sdl\"\n-\t\t\tif (i == 4 || i == 5) && name == \"XInput Gamepad (GLFW).windows.amd64.sdl\" {\n-\t\t\t\t// do nothing\n-\t\t\t} else if (i == 4 || i == 5) && name == \"PS4 Controller.windows.amd64.sdl\" {\n-\t\t\t\t// do nothing\n-\t\t\t} else if (i == 2 || i == 5) && name == \"Steam Virtual Gamepad.linux.amd64.glfw\" {\n-\t\t\t\t// do nothing\n-\t\t\t} else if (i == 2 || i == 5) && name == \"Steam Deck Controller.linux.amd64.sdl\" {\n-\t\t\t\t// do nothing\n-\t\t\t} else if (i == 2 || i == 5) && name == \"PS3 Controller.linux.amd64.sdl\" {\n-\t\t\t\t// do nothing\n-\t\t\t} else if (i == 2 || i == 5) && name == \"Logitech Dual Action.linux.amd64.sdl\" {\n-\t\t\t\t// do nothing\n-\t\t\t} else if (i == 4 || i == 5) && name == \"Gamepad.linux.arm64.sdl\" {\n-\t\t\t\t// do nothing\n-\t\t\t} else {\n-\t\t\t\ts = strconv.Itoa(-i*2 - 1)\n-\t\t\t\tfmt.Printf(\"[input_sdl.go][checkAxisForTrigger] 1.AXIS joy=%v i=%v s:%v axes[i]=%v\\n\", joy, i, s, (*axes)[i])\n+\t\tvalue := getAxisValue((*axes)[i], sys.controllerStickSensitivitySDL)\n+\t\t\n+\t\tisException := false\n+\t\tfor _, ex := range exceptions {\n+\t\t\tif i == ex && value < 0 {\n+\t\t\t\tisException = true\n \t\t\t\tbreak\n \t\t\t}\n-\t\t} else if (*axes)[i] > sys.controllerStickSensitivitySDL {\n-\t\t\ts = strconv.Itoa(-i*2 - 2)\n-\t\t\tfmt.Printf(\"[input_sdl.go][checkAxisForTrigger] 2.AXIS joy=%v i=%v s:%v axes[i]=%v\\n\", joy, i, s, (*axes)[i])\n-\t\t\tbreak\n+\t\t}\n+\t\t\n+\t\tif isException {\n+\t\t\tcontinue\n+\t\t}\n+\t\t\n+\t\tif value < 0 {\n+\t\t\treturn strconv.Itoa(-i*2 - 1)\n+\t\t} else if value > 0 {\n+\t\t\treturn strconv.Itoa(-i*2 - 2)\n \t\t}\n \t}\n-\treturn s\n+\t\n+\treturn \"\"\n }\n"
  },
  {
    "path": "packages/sx05re/emulators/ikemen-go/sdlgamepadmap/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2025-present Diegrosan (https://github.com/Diegrosan)\n#\n\nPKG_NAME=\"sdlgamepadmap\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"1\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2_ttf SDL2\"\nPKG_LONGDESC=\"joystick map for ikemen-go\"\nPKG_TOOLCHAIN=\"manual\"\n\nconfigure_target() {\n  mkdir -p ${PKG_BUILD}\n  cp -rf ${PKG_DIR}/src/* ${PKG_BUILD}/\n}\n\nmake_target() {\n ${CC} -s -O3 -o sdl_gamepadmap sdl_gamepadmap.c -lSDL2 -lSDL2_ttf -ljson-c -lm\n}\n\nmakeinstall_target() {\n    mkdir -p \"$INSTALL/usr/bin\"\n\tcp -f \"$PKG_BUILD/sdl_gamepadmap\" \"$INSTALL/usr/bin/sdl_gamepadmap\"\n    chmod +x \"$INSTALL/usr/bin/sdl_gamepadmap\"\n}\n\n"
  },
  {
    "path": "packages/sx05re/emulators/ikemen-go/sdlgamepadmap/src/sdl_gamepadmap.c",
    "content": "#include <SDL2/SDL.h>\n#include <SDL2/SDL_ttf.h>\n#include <json-c/json.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\nconst char *button_names[] = {\n    \"Up\", \"Down\", \"Left\", \"Right\",\n    \"A\", \"B\", \"C\", \"X\", \"Y\", \"Z\",\n    \"Start\", \"L\", \"R\", \"Menu\"\n};\n\n#define NUM_BUTTONS (sizeof(button_names) / sizeof(button_names[0]))\n\n#define COLOR_BG_R 15\n#define COLOR_BG_G 23\n#define COLOR_BG_B 42\n#define COLOR_PRIMARY_R 59\n#define COLOR_PRIMARY_G 130\n#define COLOR_PRIMARY_B 246\n#define COLOR_SUCCESS_R 16\n#define COLOR_SUCCESS_G 185\n#define COLOR_SUCCESS_B 129\n#define COLOR_TEXT_R 255\n#define COLOR_TEXT_G 255\n#define COLOR_TEXT_B 255\n#define COLOR_ARROW_R 59\n#define COLOR_ARROW_G 130\n#define COLOR_ARROW_B 246\n\ntypedef struct {\n    SDL_Renderer *ren;\n    TTF_Font *font_large;\n    TTF_Font *font_medium;\n    TTF_Font *font_small;\n    int screen_w;\n    int screen_h;\n} UI_Context;\n\nvoid drawText(UI_Context *ui, const char *text, int x, int y, TTF_Font *font, SDL_Color color) {\n    SDL_Surface *surf = TTF_RenderUTF8_Blended(font, text, color);\n    if (!surf) return;\n    SDL_Texture *tex = SDL_CreateTextureFromSurface(ui->ren, surf);\n    SDL_Rect dest = {x, y, surf->w, surf->h};\n    SDL_RenderCopy(ui->ren, tex, NULL, &dest);\n    SDL_FreeSurface(surf);\n    SDL_DestroyTexture(tex);\n}\n\nvoid drawTextCentered(UI_Context *ui, const char *text, int y, TTF_Font *font, SDL_Color color) {\n    SDL_Surface *surf = TTF_RenderUTF8_Blended(font, text, color);\n    if (!surf) return;\n    SDL_Texture *tex = SDL_CreateTextureFromSurface(ui->ren, surf);\n    int x = (ui->screen_w - surf->w) / 2;\n    SDL_Rect dest = {x, y, surf->w, surf->h};\n    SDL_RenderCopy(ui->ren, tex, NULL, &dest);\n    SDL_FreeSurface(surf);\n    SDL_DestroyTexture(tex);\n}\n\nvoid drawRoundedRect(SDL_Renderer *ren, int x, int y, int w, int h, int r, int g, int b, int a) {\n    SDL_SetRenderDrawColor(ren, r, g, b, a);\n    SDL_Rect rect = {x + 4, y, w - 8, h};\n    SDL_RenderFillRect(ren, &rect);\n    rect = (SDL_Rect){x, y + 4, w, h - 8};\n    SDL_RenderFillRect(ren, &rect);\n    for (int i = 0; i < 4; i++) {\n        SDL_Rect corner = {x + i, y + i, w - i * 2, h - i * 2};\n        SDL_RenderDrawRect(ren, &corner);\n    }\n}\n\nvoid drawArrow(SDL_Renderer *ren, int x, int y, int size, int direction) {\n    SDL_SetRenderDrawColor(ren, COLOR_ARROW_R, COLOR_ARROW_G, COLOR_ARROW_B, 255);\n    SDL_Point points[4];\n    switch (direction) {\n        case 0:\n            points[0] = (SDL_Point){x, y - size / 2};\n            points[1] = (SDL_Point){x - size / 2, y + size / 2};\n            points[2] = (SDL_Point){x, y + size / 4};\n            points[3] = (SDL_Point){x + size / 2, y + size / 2};\n            break;\n        case 1:\n            points[0] = (SDL_Point){x, y + size / 2};\n            points[1] = (SDL_Point){x - size / 2, y - size / 2};\n            points[2] = (SDL_Point){x, y - size / 4};\n            points[3] = (SDL_Point){x + size / 2, y - size / 2};\n            break;\n        case 2:\n            points[0] = (SDL_Point){x - size / 2, y};\n            points[1] = (SDL_Point){x + size / 2, y - size / 2};\n            points[2] = (SDL_Point){x + size / 4, y};\n            points[3] = (SDL_Point){x + size / 2, y + size / 2};\n            break;\n        case 3:\n            points[0] = (SDL_Point){x + size / 2, y};\n            points[1] = (SDL_Point){x - size / 2, y - size / 2};\n            points[2] = (SDL_Point){x - size / 4, y};\n            points[3] = (SDL_Point){x - size / 2, y + size / 2};\n            break;\n    }\n    for (int i = 0; i < 4; i++) {\n        SDL_RenderDrawLine(ren, points[i].x, points[i].y, points[(i + 1) % 4].x, points[(i + 1) % 4].y);\n    }\n    SDL_RenderDrawLines(ren, points, 4);\n}\n\nvoid drawButton(UI_Context *ui, const char *name, int x, int y, int pressed, int is_arrow, int arrow_dir) {\n    int w = 100, h = 100;\n    drawRoundedRect(ui->ren, x + 4, y + 4, w, h, 0, 0, 0, 80);\n    if (pressed) {\n        drawRoundedRect(ui->ren, x, y, w, h, COLOR_SUCCESS_R, COLOR_SUCCESS_G, COLOR_SUCCESS_B, 255);\n    } else {\n        drawRoundedRect(ui->ren, x, y, w, h, 50, 50, 60, 255);\n    }\n    SDL_SetRenderDrawColor(ui->ren, COLOR_PRIMARY_R, COLOR_PRIMARY_G, COLOR_PRIMARY_B, 255);\n    for (int i = 0; i < 3; i++) {\n        SDL_Rect border = {x + i, y + i, w - i * 2, h - i * 2};\n        SDL_RenderDrawRect(ui->ren, &border);\n    }\n    if (is_arrow) {\n        drawArrow(ui->ren, x + w / 2, y + h / 2, 40, arrow_dir);\n    } else {\n        SDL_Color color = {COLOR_TEXT_R, COLOR_TEXT_G, COLOR_TEXT_B, 255};\n        SDL_Surface *surf = TTF_RenderUTF8_Blended(ui->font_medium, name, color);\n        if (surf) {\n            SDL_Texture *tex = SDL_CreateTextureFromSurface(ui->ren, surf);\n            int tx = x + (w - surf->w) / 2;\n            int ty = y + (h - surf->h) / 2;\n            SDL_Rect dest = {tx, ty, surf->w, surf->h};\n            SDL_RenderCopy(ui->ren, tex, NULL, &dest);\n            SDL_FreeSurface(surf);\n            SDL_DestroyTexture(tex);\n        }\n    }\n}\nvoid drawGamepadLayout(UI_Context *ui, int current_button, int pressed_buttons[NUM_BUTTONS]) {\n    int cx = ui->screen_w / 2;\n    int cy = ui->screen_h / 2 + 80;\n    int spacing = 120;\n    int dpad_x = cx - 350;\n    int dpad_y = cy - 60;\n\n    drawButton(ui, \"Up\", dpad_x, dpad_y - spacing, pressed_buttons[0], 1, 0);\n    drawButton(ui, \"Down\", dpad_x, dpad_y + spacing, pressed_buttons[1], 1, 1);\n    drawButton(ui, \"Left\", dpad_x - spacing, dpad_y, pressed_buttons[2], 1, 2);\n    drawButton(ui, \"Right\", dpad_x + spacing, dpad_y, pressed_buttons[3], 1, 3);\n\n    int action_x = cx + 350;\n    int action_y = cy - 60;\n    drawButton(ui, \"X\", action_x, action_y - spacing, pressed_buttons[7], 0, 0);\n    drawButton(ui, \"Y\", action_x - spacing, action_y, pressed_buttons[8], 0, 0);\n    drawButton(ui, \"A\", action_x, action_y + spacing, pressed_buttons[4], 0, 0);\n    drawButton(ui, \"B\", action_x + spacing, action_y, pressed_buttons[5], 0, 0);\n\n    drawButton(ui, \"L\", cx - 250, cy - 250, pressed_buttons[11], 0, 0);\n    drawButton(ui, \"R\", cx + 150, cy - 250, pressed_buttons[12], 0, 0);\n\n    drawButton(ui, \"Select\", cx - 130, cy + 200, pressed_buttons[13], 0, 0);\n    drawButton(ui, \"Start\", cx + 30, cy + 200, pressed_buttons[10], 0, 0);\n\n    drawButton(ui, \"C\", cx - 110, cy - 60, pressed_buttons[6], 0, 0);\n    drawButton(ui, \"Z\", cx + 110, cy - 60, pressed_buttons[9], 0, 0);\n}\n\nvoid saveMapping(const char *path, int js_id, char button_values[NUM_BUTTONS][8]) {\n    struct json_object *root = json_object_from_file(path);\n    if (!root) root = json_object_new_object();\n\n    struct json_object *jarr = json_object_object_get(root, \"JoystickConfig\");\n    if (!jarr) {\n        jarr = json_object_new_array();\n        json_object_object_add(root, \"JoystickConfig\", jarr);\n    }\n\n    struct json_object *entry = json_object_new_object();\n    json_object_object_add(entry, \"Joystick\", json_object_new_int(js_id));\n\n    struct json_object *btns = json_object_new_array();\n    for (int i = 0; i < NUM_BUTTONS; i++) {\n        json_object_array_add(btns, json_object_new_string(button_values[i]));\n    }\n    json_object_object_add(entry, \"Buttons\", btns);\n\n    while (json_object_array_length(jarr) <= js_id)\n        json_object_array_add(jarr, json_object_new_object());\n\n    json_object_array_put_idx(jarr, js_id, entry);\n    json_object_to_file_ext(path, root, JSON_C_TO_STRING_PRETTY);\n    json_object_put(root);\n}\n\nint main(int argc, char *argv[]) {\n    if (argc < 2) {\n        printf(\"Usage: %s <path_to_config.json>\\n\", argv[0]);\n        return 1;\n    }\n\n    const char *CONFIG_PATH = argv[1];\n\n    if (SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO) < 0) {\n        printf(\"Error initializing SDL: %s\\n\", SDL_GetError());\n        return 1;\n    }\n\n    if (TTF_Init() < 0) {\n        printf(\"Error initializing TTF: %s\\n\", TTF_GetError());\n        return 1;\n    }\n\n    SDL_DisplayMode dm;\n    SDL_GetCurrentDisplayMode(0, &dm);\n    int screen_w = dm.w * 0.8;\n    int screen_h = dm.h * 0.8;\n\n    SDL_Window *win = SDL_CreateWindow(\"Gamepad Mapper Pro\",\n        SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,\n        screen_w, screen_h, SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE);\n    SDL_Renderer *ren = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);\n\n    UI_Context ui = {\n        .ren = ren,\n        .font_large = TTF_OpenFont(\"/usr/share/fonts/liberation/LiberationSans-Bold.ttf\", 48),\n        .font_medium = TTF_OpenFont(\"/usr/share/fonts/liberation/LiberationSans-Regular.ttf\", 28),\n        .font_small = TTF_OpenFont(\"/usr/share/fonts/liberation/LiberationSans-Regular.ttf\", 20),\n        .screen_w = screen_w,\n        .screen_h = screen_h\n    };\n\n    if (!ui.font_large || !ui.font_medium || !ui.font_small) {\n        printf(\"Error loading fonts. Make sure Liberation Sans is installed.\\n\");\n        return 1;\n    }\n\n    int num_joysticks = SDL_NumJoysticks();\n    if (num_joysticks < 1) {\n        printf(\"No joystick detected!\\n\");\n        return 0;\n    }\n\n    SDL_Joystick *joysticks[4] = {NULL};\n    int device_index[4] = {-1, -1, -1, -1};\n\n    for (int i = 0; i < num_joysticks && i < 4; i++) {\n        joysticks[i] = SDL_JoystickOpen(i);\n        if (joysticks[i]) {\n            SDL_JoystickID instance_id = SDL_JoystickInstanceID(joysticks[i]);\n            device_index[instance_id] = i;\n            printf(\"Joystick %d opened - Instance ID: %d - Name: %s\\n\",\n                   i, instance_id, SDL_JoystickName(joysticks[i]));\n        }\n    }\n\n    int js_id = -1;\n    int device_id = -1;\n    Uint32 first_press_time = 0;\n    int detecting_instance_id = -1;\n\n    while (js_id == -1) {\n        SDL_Event e;\n        while (SDL_PollEvent(&e)) {\n            if (e.type == SDL_JOYBUTTONDOWN ||\n                (e.type == SDL_JOYAXISMOTION && abs(e.jaxis.value) > 16000)) {\n\n                int current_instance_id = (e.type == SDL_JOYBUTTONDOWN) ? e.jbutton.which : e.jaxis.which;\n\n                if (detecting_instance_id == -1) {\n                    detecting_instance_id = current_instance_id;\n                    first_press_time = SDL_GetTicks();\n                } else if (detecting_instance_id == current_instance_id) {\n                    if (SDL_GetTicks() - first_press_time >= 5000) {\n                        js_id = current_instance_id;\n                        device_id = device_index[current_instance_id];\n                        break;\n                    }\n                } else {\n                    detecting_instance_id = current_instance_id;\n                    first_press_time = SDL_GetTicks();\n                }\n            } else if (e.type == SDL_QUIT) {\n                for (int i = 0; i < 4; i++) {\n                    if (joysticks[i]) SDL_JoystickClose(joysticks[i]);\n                }\n                SDL_Quit();\n                return 0;\n            }\n        }\n\n        SDL_SetRenderDrawColor(ren, COLOR_BG_R, COLOR_BG_G, COLOR_BG_B, 255);\n        SDL_RenderClear(ren);\n\n        SDL_Color white = {255, 255, 255, 255};\n        SDL_Color yellow = {255, 230, 100, 255};\n\n        drawTextCentered(&ui, \"Press any button\", screen_h / 2 - 100, ui.font_large, white);\n        drawTextCentered(&ui, \"on the controller to map\", screen_h / 2 - 40, ui.font_medium, white);\n\n        if (detecting_instance_id != -1) {\n            Uint32 elapsed = SDL_GetTicks() - first_press_time;\n            float progress = (float)elapsed / 5000.0f;\n            if (progress > 1.0f) progress = 1.0f;\n\n            int detecting_device = device_index[detecting_instance_id];\n            char msg[64];\n            snprintf(msg, sizeof(msg), \"Detecting Joystick %d (/dev/input/js%d)\",\n                     detecting_device, detecting_device);\n            drawTextCentered(&ui, msg, screen_h / 2 + 40, ui.font_medium, yellow);\n\n            int bar_w = 400;\n            int bar_h = 30;\n            int bar_x = (screen_w - bar_w) / 2;\n            int bar_y = screen_h / 2 + 100;\n\n            drawRoundedRect(ren, bar_x, bar_y, bar_w, bar_h, 40, 40, 50, 255);\n\n            int fill_w = (int)(bar_w * progress);\n            if (fill_w > 0) {\n                drawRoundedRect(ren, bar_x, bar_y, fill_w, bar_h,\n                    COLOR_SUCCESS_R, COLOR_SUCCESS_G, COLOR_SUCCESS_B, 255);\n            }\n\n            float remaining = 5.0f - (elapsed / 1000.0f);\n            if (remaining < 0) remaining = 0;\n            snprintf(msg, sizeof(msg), \"%.1f seconds\", remaining);\n            drawTextCentered(&ui, msg, bar_y + bar_h + 20, ui.font_small, white);\n        } else {\n            drawTextCentered(&ui, \"Hold for 5 seconds\",\n                screen_h / 2 + 40, ui.font_small, white);\n        }\n\n        SDL_RenderPresent(ren);\n        SDL_Delay(16);\n    }\n\n    SDL_Joystick *target = joysticks[device_id];\n    printf(\"\\n✓ Selected controller: Joystick %d (/dev/input/js%d)\\n\", device_id, device_id);\n    printf(\"  Name: %s\\n\\n\", SDL_JoystickName(target));\n\n    for (int i = 0; i < 4; i++) {\n        if (joysticks[i] && i != device_id) SDL_JoystickClose(joysticks[i]);\n    }\n\n    char button_values[NUM_BUTTONS][8];\n    int pressed_buttons[NUM_BUTTONS] = {0};\n    memset(button_values, 0, sizeof(button_values));\n\n    for (int i = 0; i < NUM_BUTTONS; i++) {\n        int mapped = 0;\n        while (!mapped) {\n            SDL_Event e;\n            while (SDL_PollEvent(&e)) {\n                if (e.type == SDL_JOYBUTTONDOWN) {\n                    snprintf(button_values[i], sizeof(button_values[i]), \"%d\", e.jbutton.button);\n                    pressed_buttons[i] = 1;\n                    mapped = 1;\n                } else if (e.type == SDL_JOYAXISMOTION && abs(e.jaxis.value) > 16000) {\n                    snprintf(button_values[i], sizeof(button_values[i]), \"%s%d\",\n                             (e.jaxis.value < 0 ? \"-\" : \"\"), e.jaxis.axis);\n                    pressed_buttons[i] = 1;\n                    mapped = 1;\n                } else if (e.type == SDL_QUIT) {\n                    SDL_Quit();\n                    return 0;\n                }\n            }\n\n            SDL_SetRenderDrawColor(ren, COLOR_BG_R, COLOR_BG_G, COLOR_BG_B, 255);\n            SDL_RenderClear(ren);\n\n            SDL_Color white = {255, 255, 255, 255};\n            SDL_Color yellow = {255, 230, 100, 255};\n\n            char instruction[64];\n            snprintf(instruction, sizeof(instruction), \"Press: %s\", button_names[i]);\n            drawTextCentered(&ui, instruction, 50, ui.font_large, yellow);\n\n            char progress[32];\n            snprintf(progress, sizeof(progress), \"Button %d of %d\", i + 1, NUM_BUTTONS);\n            drawTextCentered(&ui, progress, 120, ui.font_small, white);\n\n            drawGamepadLayout(&ui, i, pressed_buttons);\n\n            SDL_RenderPresent(ren);\n            SDL_Delay(16);\n        }\n        SDL_Delay(200);\n    }\n\n    saveMapping(CONFIG_PATH, device_id, button_values);\n\n    SDL_SetRenderDrawColor(ren, COLOR_BG_R, COLOR_BG_G, COLOR_BG_B, 255);\n    SDL_RenderClear(ren);\n    SDL_Color green = {COLOR_SUCCESS_R, COLOR_SUCCESS_G, COLOR_SUCCESS_B, 255};\n\n    char success_msg[128];\n    snprintf(success_msg, sizeof(success_msg), \"✓ Configuration Saved! (Joystick %d)\", device_id);\n    drawTextCentered(&ui, success_msg, screen_h / 2, ui.font_large, green);\n\n    SDL_RenderPresent(ren);\n    SDL_Delay(2500);\n\n    printf(\"✓ Mapping saved successfully at: %s\\n\", CONFIG_PATH);\n    printf(\"  Joystick ID: %d (/dev/input/js%d)\\n\", device_id, device_id);\n\n    TTF_CloseFont(ui.font_large);\n    TTF_CloseFont(ui.font_medium);\n    TTF_CloseFont(ui.font_small);\n    SDL_JoystickClose(target);\n    SDL_DestroyRenderer(ren);\n    SDL_DestroyWindow(win);\n    TTF_Quit();\n    SDL_Quit();\n    return 0;\n}\n\n"
  },
  {
    "path": "packages/sx05re/emulators/ikemen-go/src/Ikemen_Go.sh",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2025-present DiegroSan (https://github.com/Diegrosan)\n#\n\n. /etc/profile\n\nIKEMEN_ALSA_CONF=/storage/.config/asound-ikemen.conf\nALSA_CONF=/storage/.config/asound.conf\n    \n    mv ${ALSA_CONF} ${ALSA_CONF}.tmp\n    cp ${IKEMEN_ALSA_CONF} ${ALSA_CONF}\n\nLOGSDIR=\"/emuelec/logs\"\nLOGFILE=\"$LOGSDIR/ikemen.log\"\nSHARED=\"/usr/share/ikemen_go\"\nCONFIGDIRHOME=\"/tmp/ikemen\"\n\n# Language log Configuration by DiegroSan\nconfig_file=\"/storage/.config/emuelec/configs/emuelec.conf\"\n\nlanguage_value=$(grep '^system.language=' \"$config_file\" | cut -d'=' -f2)\n\nif [ \"$language_value\" = \"pt_BR\" ]; then\n    MESSAGE_001=\"Erro: Nenhum arquivo foi passado como argumento.\"\n    MESSAGE_002=\"Nome do jogo:\"\n    MESSAGE_003=\"Diretório de Temporário:\"\n    MESSAGE_004=\"Diretório do arquivo:\"\n    MESSAGE_005=\"Aliando dependências do Ikemen_Go:\"\n    MESSAGE_006=\"Links simbólicos criados com sucesso.\"\n    MESSAGE_007=\"Erro ao criar links simbólicos.\"\n    MESSAGE_008=\"Verificação dos arquivos do Ikemen_Go\"\n    MESSAGE_009=\"error gamecontrollerdb\"\n    MESSAGE_010=\"error saving gamepadmap configuration\"\n    MESSAGE_011=\"Falha ao copiar $file\"\n    MESSAGE_012=\"Falha ao copiar diretório external\"\n    MESSAGE_013=\"Falha ao copiar arquivos de fonte\"\n    MESSAGE_014=\"Arquivo de configuração não encontrado:\"\n    MESSAGE_015=\"Sem permissão de escrita em:\"\n    MESSAGE_016=\"Executável Ikemen_Go não encontrado ou sem permissão de execução\"\nelif [ \"$language_value\" = \"es_ES\" ]; then\n    MESSAGE_001=\"Error: No se pasó ningún archivo como argumento.\"\n    MESSAGE_002=\"Nombre del juego:\"\n    MESSAGE_003=\"Directorio temporal:\"\n    MESSAGE_004=\"Directorio del archivo:\"\n    MESSAGE_005=\"Alineando dependencias do Ikemen_Go:\"\n    MESSAGE_006=\"Enlaces simbólicos creados con éxito.\"\n    MESSAGE_007=\"Error al crear enlaces simbólicos.\"\n    MESSAGE_008=\"Verificación de los archivos de Ikemen_Go\"\n    MESSAGE_009=\"error gamecontrollerdb\"\n    MESSAGE_010=\"error saving gamepadmap configuration\"\n    MESSAGE_011=\"Error al copiar $file\"\n    MESSAGE_012=\"Error al copiar el directorio external\"\n    MESSAGE_013=\"Error al copiar archivos de fuente\"\n    MESSAGE_014=\"Archivo de configuración no encontrado:\"\n    MESSAGE_015=\"Sin permiso de escritura en:\"\n    MESSAGE_016=\"Ejecutable Ikemen_Go no encontrado o sin permiso de ejecución\"\nelif [ \"$language_value\" = \"zh_CN\" ]; then\n    MESSAGE_001=\"错误：没有文件作为参数传递。\"\n    MESSAGE_002=\"游戏名称：\"\n    MESSAGE_003=\"临时目录：\"\n    MESSAGE_004=\"文件目录：\"\n    MESSAGE_005=\"对齐文件依赖关系：\"\n    MESSAGE_006=\"符号链接创建成功。\"\n    MESSAGE_007=\"创建符号链接时出错。\"\n    MESSAGE_008=\"验证Ikemen_Go文件\"\n    MESSAGE_009=\"error gamecontrollerdb\"\n    MESSAGE_010=\"error saving gamepadmap configuration\"\n    MESSAGE_011=\"复制失败 $file\"\n    MESSAGE_012=\"复制external目录失败\"\n    MESSAGE_013=\"复制字体文件失败\"\n    MESSAGE_014=\"未找到配置文件：\"\n    MESSAGE_015=\"没有写入权限：\"\n    MESSAGE_016=\"找不到Ikemen_Go可执行文件或没有执行权限\"\nelse\n    MESSAGE_001=\"Error: No file was passed as an argument.\"\n    MESSAGE_002=\"Game name:\"\n    MESSAGE_003=\"Temp Directory:\"\n    MESSAGE_004=\"File directory:\"\n    MESSAGE_005=\"Aligning Ikemen_Go dependencies:\"\n    MESSAGE_006=\"Symbolic links created successfully.\"\n    MESSAGE_007=\"Error creating symbolic links.\"\n    MESSAGE_008=\"Verifying Ikemen_Go files\"\n    MESSAGE_009=\"error gamecontrollerdb\"\n    MESSAGE_010=\"error saving gamepadmap configuration\"\n    MESSAGE_011=\"Failed to copy $file\"\n    MESSAGE_012=\"Failed to copy external directory\"\n    MESSAGE_013=\"Failed to copy font files\"\n    MESSAGE_014=\"Configuration file not found:\"\n    MESSAGE_015=\"No write permission in:\"\n    MESSAGE_016=\"Ikemen_Go executable not found or no execution permission\"\nfi\n\nlog() {\n    echo \"$(date '+%Y-%m-%d %H:%M:%S') - $1\" >> \"$LOGFILE\"\n}\n\nif [ ! -f \"$config_file\" ]; then\n    log \"$MESSAGE_014 $config_file\"\n    exit 1\nfi\n\nmkdir -p \"$CONFIGDIRHOME\"\nmkdir -p \"$LOGSDIR\"\nrm -f \"$LOGFILE\"\n\n#killall gptokeyb 2>/dev/null\n\n[ -z \"$1\" ] && { log \"$MESSAGE_001\"; exit 1; }\n\nOB=\"$1\"\nGAME=$(basename \"${OB%.*}\")\nCONFIGDIR=\"$CONFIGDIRHOME/$GAME\"\nIKEMEN=$(dirname \"$OB\")\n\nlog \"$MESSAGE_002 $GAME\"\nlog \"$MESSAGE_003 $CONFIGDIR\"\n\nif [ ! -w \"$CONFIGDIRHOME\" ]; then\n    log \"$MESSAGE_015 $CONFIGDIRHOME\"\n    exit 1\nfi\n\nrm -rf \"$CONFIGDIRHOME\"/*\nmkdir -p \"$CONFIGDIR\"\n\nlog \"$MESSAGE_004 $IKEMEN\"\n\n# Required files\nfiles=(\n    \"action.zss\"\n    \"common.const\"\n    \"functions.zss\"\n    \"system.base.def\"\n    \"common.air\"\n    \"common1.cns.zss\"\n    \"guardbreak.zss\"\n    \"tag.zss\"\n    \"common.cmd\"\n    \"dizzy.zss\"\n    \"score.zss\"\n    \"training.zss\"\n)\n\n# Create data directory if it doesn't exist\nmkdir -p \"$IKEMEN/data\"\n# Create save directory\nmkdir -p \"$IKEMEN/save\"\n\n# Check and copy required files\nfor file in \"${files[@]}\"; do\n    if [ ! -f \"$IKEMEN/data/$file\" ]; then\n        cp \"$SHARED/data/$file\" \"$IKEMEN/data/$file\" 2>/dev/null || log \"$MESSAGE_011\"\n    fi\ndone\n\n# Handle external directory\nif [ ! -d \"$IKEMEN/external\" ]; then\n    cp -r \"$SHARED/external\" \"$IKEMEN/\" 2>/dev/null || log \"$MESSAGE_012\"\nfi\n\n# Handle font directory\nmkdir -p \"$IKEMEN/font\"\ncp -r \"$SHARED/font/\"* \"$IKEMEN/font/\" 2>/dev/null || log \"$MESSAGE_013\"\n\nlog \"$MESSAGE_005 $IKEMEN\"\n\n# Create symbolic links\nln -sf \"$IKEMEN\"/* \"$CONFIGDIR/\"\n\nGAMEMAP=$(get_ee_setting ee_ikemen.enabled)\nif [[ ${GAMEMAP} != 0 ]]; then\ngamepadmap \"${IKEMEN}/save/config.json\"  2>/dev/null || log \"$MESSAGE_010\"\nfi\n\nif [ $? -eq 0 ]; then\n    log \"$MESSAGE_006\"\nelse\n    log \"$MESSAGE_007\"\n    exit 1\nfi\n\ncd \"$CONFIGDIR\" || exit 1\n\n# Verifying included the game assets\nlog \"$MESSAGE_008\"\nIkemen_Go -audit >> \"$LOGFILE\" 2>&1\nexec nice -n -20 Ikemen_Go\n\n# restore asound.conf\n    rm ${ALSA_CONF}\n    mv ${ALSA_CONF}.tmp ${ALSA_CONF}\n"
  },
  {
    "path": "packages/sx05re/emulators/ikemen-go/src/asound-ikemen.conf",
    "content": "pcm.!default {\n\ttype plug\n\tslave.pcm \"dmixer\"\n}\n\npcm.dmixer  {\n\ttype dmix\n\tipc_key 1024\n\tslave {\n\t    pcm \"hw:0,0\"\n\t    period_time 0\n\t    period_size 1024\n\t    buffer_size 4096\n\t    rate 44100\n\t}\n\tbindings {\n\t    0 0\n\t    1 1\n\t}\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/jzintv/config/jzintv_keyb.hack",
    "content": "; -----------------------------------------------------------------------------------------\nMAP 0      ; keymap 0 (default keymap)\n; -----------------------------------------------------------------------------------------\n\n; ***** Joystick #0 - Left Controller *****\n; ** Side Buttons and Numeric Keypad **\nJS0_BTN_00 PD0L_A_T\nJS0_BTN_01 PD0L_A_L\nJS0_BTN_02 PD0L_A_R\nJS0_BTN_03 PD0L_KP1\nJS0_BTN_04 PD0L_KP2\nJS0_BTN_05 PD0L_KP3\nJS0_BTN_06 PD0L_KP4\nJS0_BTN_07 PD0L_KP5\nJS0_BTN_08 PD0L_KP6\nJS0_BTN_09 PD0L_KP7\nJS0_BTN_10 PD0L_KP8\nJS0_BTN_11 PD0L_KP9\nJS0_BTN_12 PD0L_KPC\nJS0_BTN_13 PD0L_KP0\nJS0_BTN_07 PD0L_KPE\n\n\n; ** Direction Disc **\nJS0_HAT0_N      PD0L_J_N\nJS0_HAT0_NNE    PD0L_J_NNE\nJS0_HAT0_NE     PD0L_J_NE\nJS0_HAT0_ENE    PD0L_J_ENE\nJS0_HAT0_E      PD0L_J_E\nJS0_HAT0_ESE    PD0L_J_ESE\nJS0_HAT0_SE     PD0L_J_SE\nJS0_HAT0_SSE    PD0L_J_SSE\nJS0_HAT0_S      PD0L_J_S\nJS0_HAT0_SSW    PD0L_J_SSW\nJS0_HAT0_SW     PD0L_J_SW\nJS0_HAT0_WSW    PD0L_J_WSW\nJS0_HAT0_W      PD0L_J_W\nJS0_HAT0_WNW    PD0L_J_WNW\nJS0_HAT0_NW     PD0L_J_NW\nJS0_HAT0_NNW    PD0L_J_NNW\n\n; ***** Joystick #1 - Right Controller *****\n; ** Side Buttons and Numeric Keypad **\nJS1_BTN_00 PD0R_A_T\nJS1_BTN_01 PD0R_A_L\nJS1_BTN_02 PD0R_A_R\nJS1_BTN_03 PD0R_KP1\nJS1_BTN_04 PD0R_KP2\nJS1_BTN_05 PD0R_KP3\nJS1_BTN_06 PD0R_KP4\nJS1_BTN_07 PD0R_KP5\nJS1_BTN_08 PD0R_KP6\nJS1_BTN_09 PD0R_KP7\nJS1_BTN_10 PD0R_KP8\nJS1_BTN_11 PD0R_KP9\nJS1_BTN_12 PD0R_KPC\nJS1_BTN_13 PD0R_KP0\nJS1_BTN_14 PD0R_KPE\n\n\n; ** Direction Disc **\nJS1_N      PD0R_J_N\nJS1_NNE    PD0R_J_NNE\nJS1_NE     PD0R_J_NE\nJS1_ENE    PD0R_J_ENE\nJS1_E      PD0R_J_E\nJS1_ESE    PD0R_J_ESE\nJS1_SE     PD0R_J_SE\nJS1_SSE    PD0R_J_SSE\nJS1_S      PD0R_J_S\nJS1_SSW    PD0R_J_SSW\nJS1_SW     PD0R_J_SW\nJS1_WSW    PD0R_J_WSW\nJS1_W      PD0R_J_W\nJS1_WNW    PD0R_J_WNW\nJS1_NW     PD0R_J_NW\nJS1_NNW    PD0R_J_NNW\n"
  },
  {
    "path": "packages/sx05re/emulators/jzintv/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"jzintv\"\nPKG_VERSION=\"20200712\"\nPKG_LICENSE=\"FOSS\"\nPKG_SITE=\"http://spatula-city.org/~im14u2c/intv\"\nPKG_URL=\"${PKG_SITE}/dl/jzintv-${PKG_VERSION}-src.zip\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_mixer SDL2_net\"\nPKG_LONGDESC=\"Joe Zbiciak Intellivision Emulator\"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\nsed -i \"s|sdl2-config|${SYSROOT_PREFIX}/usr/bin/sdl2-config|g\" src/Makefile\nPKG_MAKE_OPTS_TARGET=\"-C src/ -f Makefile GNU_READLINE=0 \"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp bin/jzintv ${INSTALL}/usr/bin\n  cp ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n  \n  mkdir -p ${INSTALL}/usr/config/emuelec/configs\n  cp -rf ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/jzintv/patches/01-emuelec-only-build-emu.patch",
    "content": "--- a/src/Makefile\n+++ b/src/Makefile\n@@ -40,7 +40,7 @@\n \n # Get SDL2 related build flags.\n SDL2_CFLAGS := $(shell sdl2-config --cflags) -DUSE_SDL2\n-SDL2_LFLAGS := $(shell sdl2-config --static-libs || sdl2-config --libs)\n+SDL2_LFLAGS := $(shell sdl2-config --libs)\n \n # Override these in a .mak file. See buidlcfg/00-compiler*.txt for examples.\n #\n@@ -115,8 +115,8 @@\n $(PROG_SDL2): $(OBJS) $(OBJS_SDL1)\n \t$(CXX) -o $(PROG_SDL2) $(OBJS) $(OBJS_SDL2) $(CFLAGS) $(SDL2_LFLAGS) $(LFLAGS) $(RL_LFLAGS)\n \n-$(PROG_NULL): $(OBJS) $(OBJS_NULL)\n-\t$(CXX) -o $(PROG_NULL) $(OBJS) $(OBJS_NULL) $(CFLAGS) $(SLFLAGS) $(RL_LFLAGS)\n+# $(PROG_NULL): $(OBJS) $(OBJS_NULL)\n+#\t$(CXX) -o $(PROG_NULL) $(OBJS) $(OBJS_NULL) $(CFLAGS) $(SLFLAGS) $(RL_LFLAGS)\n \n clean:\n \t$(RM) $(OBJS) \n@@ -150,4 +150,4 @@\n ## Makefile.common includes all the subMakefiles and such\n ##############################################################################\n include Makefile.common\n-build: jzIntv SDK-1600\n+build: jzIntv\n\n"
  },
  {
    "path": "packages/sx05re/emulators/jzintv/scripts/jzintv.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n\n[ -n \"$1\" ] || exit 1\nIN=\"$1\"\n\n# Resolution -> \"-z WxH,32\"\nMODE=\"$(get_resolution 2>/dev/null || echo '640 480')\"\ncase \"$MODE\" in\n  *x*) W=\"${MODE%x*}\"; H=\"${MODE#*x}\";;\n  *) set -- $MODE; W=\"$1\"; H=\"$2\";;\nesac\ncase \"$W\" in *[!0-9]*|'') W=640;; esac\ncase \"$H\" in *[!0-9]*|'') H=480;; esac\n[ \"$W\" -lt 320 ] 2>/dev/null && W=640\n[ \"$H\" -lt 200 ] 2>/dev/null && H=480\nRES=\"${W}x${H},32\"\n\n# ZIP -> pick first valid cart\nTMP=\"\"\ntrap '[ -n \"$TMP\" ] && rm -rf \"$TMP\"' EXIT\nROM=\"$IN\"\ncase \"$IN\" in\n  *.zip|*.ZIP|*.Zip)\n    TMP=\"$(mktemp -d)\"\n    if command -v unzip >/dev/null 2>&1; then\n      unzip -o -qq \"$IN\" -d \"$TMP\"\n    elif command -v bsdtar >/dev/null 2>&1; then\n      bsdtar -xf \"$IN\" -C \"$TMP\"\n    else\n      echo \"Need unzip or bsdtar\" >&2\n      exit 1\n    fi\n    ROM=\"$(find \"$TMP\" -type f \\( -iname '*.cfg' -o -iname '*.rom' -o -iname '*.cc3' -o -iname '*.bin' -o -iname '*.int' -o -iname '*.itv' \\) | head -n1)\"\n    [ -n \"$ROM\" ] || { echo \"No cart file in ZIP\" >&2; exit 1; }\n    ;;\nesac\n\n# Optional keyboard hack\nKBD=\"/emuelec/configs/jzintv_keyb.hack\"\n[ -f \"$KBD\" ] && KBD_OPT=\"--kbdhackfile $KBD\" || KBD_OPT=\"\"\n\nexec jzintv -f1 -z \"$RES\" -p /storage/roms/bios/ \"$ROM\" $KBD_OPT\n"
  },
  {
    "path": "packages/sx05re/emulators/mesen2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"mesen2\"\nPKG_VERSION=\"fabc9a62174f8734a113df6d244f5539ef6b8fcf\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/SourMesen/Mesen2\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_mixer SDL2_net\"\nPKG_LONGDESC=\"ECWolf is a port of the Wolfenstein 3D engine based of Wolf4SDL. It combines the original Wolfenstein 3D engine with the user experience of ZDoom to create the most user and mod author friendly Wolf3D source port.\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\nexport PUBLISHFLAGS=\"-r linux-arm64 --no-self-contained false -p:PublishSingleFile=true -p:PublishReadyToRun=true\"\nUSE_GCC=true MESENPLATFORM=linux-arm64 make\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/mesen2/sources/makefile",
    "content": "#Welcome to what must be the most terrible makefile ever (but hey, it works)\n#Both clang & gcc work fine - clang seems to output faster code\n#.NET 6 (and its dev tools) must be installed to compile the UI.\n#The emulation core also requires SDL2.\n#Run \"make\" to build, \"make run\" to run\n\nMESENFLAGS=\n\nifeq ($(USE_GCC),true)\n\tCXX := g++\n\tCC := gcc\n\tPROFILE_GEN_FLAG := -fprofile-generate\n\tPROFILE_USE_FLAG := -fprofile-use\nelse\n\tCXX := clang++\n\tCC := clang\n\tPROFILE_GEN_FLAG := -fprofile-instr-generate=$(CURDIR)/PGOHelper/pgo.profraw\n\tPROFILE_USE_FLAG := -fprofile-instr-use=$(CURDIR)/PGOHelper/pgo.profdata\nendif\n\nSDL2LIB := $(shell sdl2-config --libs)\nSDL2INC := $(shell sdl2-config --cflags)\n\nLINKCHECKUNRESOLVED := -Wl,-z,defs\n\nLINKOPTIONS :=\nMESENOS :=\nUNAME_S := $(shell uname -s)\n\nifeq ($(UNAME_S),Linux)\n\tMESENOS := linux\n\tSHAREDLIB := MesenCore.so\nendif\n\nifeq ($(UNAME_S),Darwin)\n\tMESENOS := osx\n\tSHAREDLIB := MesenCore.dylib\n\tLTO := false\n\tSTATICLINK := false\n\tLINKCHECKUNRESOLVED :=\nendif\n\nMESENFLAGS += -m64\n\nMACHINE := $(shell uname -m)\nifeq ($(MACHINE),x86_64)\n\tMESENPLATFORM := $(MESENOS)-x64\nendif\nifneq ($(filter %86,$(MACHINE)),)\n\tMESENPLATFORM := $(MESENOS)-x64\nendif\n# TODO: this returns `aarch64` on one of my machines...\nifneq ($(filter arm%,$(MACHINE)),)\n\tMESENPLATFORM := $(MESENOS)-arm64\nendif\nifeq ($(MACHINE),aarch64)\n\tMESENPLATFORM := $(MESENOS)-arm64\n\tifeq ($(USE_GCC),true)\n\t\t#don't set -m64 on arm64 for gcc (unrecognized option)\n\t\tMESENFLAGS=\n\tendif\nendif\n\nDEBUG ?= 0\n\nifeq ($(DEBUG),0)\n\tMESENFLAGS += -O3\n\tifneq ($(LTO),false)\n\t\tMESENFLAGS += -DHAVE_LTO\n\t\tifneq ($(USE_GCC),true)\n\t\t\tMESENFLAGS += -flto=thin\n\t\telse\n\t\t\tMESENFLAGS += -flto=auto\n\t\tendif\n\tendif\nelse\n\tMESENFLAGS += -O0 -g\n\t# Note: if compiling with a sanitizer, you will likely need to `LD_PRELOAD` the library `libMesenCore.so` will be linked against.\n\tifneq ($(SANITIZER),)\n\t\tifeq ($(SANITIZER),address)\n\t\t\t# Currently, `-fsanitize=address` is not supported together with `-fsanitize=thread`\n\t\t\tMESENFLAGS += -fsanitize=address\n\t\telse ifeq ($(SANITIZER),thread)\n\t\t\t# Currently, `-fsanitize=address` is not supported together with `-fsanitize=thread`\n\t\t\tMESENFLAGS += -fsanitize=thread\n\t\telse\n$(warning Unrecognised $$(SANITIZER) value: $(SANITIZER))\n\t\tendif\n\t\t# `-Wl,-z,defs` is incompatible with the sanitizers in a shared lib, unless the sanitizer libs are linked dynamically; hence `-shared-libsan` (not the default for Clang).\n\t\t# It seems impossible to link dynamically against two sanitizers at the same time, but that might be a Clang limitation.\n\t\tifneq ($(USE_GCC),true)\n\t\t\tMESENFLAGS += -shared-libsan\n\t\tendif\n\tendif\nendif\n\nifeq ($(PGO),profile)\n\tMESENFLAGS += ${PROFILE_GEN_FLAG}\nendif\n\nifeq ($(PGO),optimize)\n\tMESENFLAGS += ${PROFILE_USE_FLAG}\nendif\n\nifneq ($(STATICLINK),false)\n\tLINKOPTIONS += -static-libgcc -static-libstdc++ \nendif\n\nifeq ($(MESENOS),osx)\n\tLINKOPTIONS += -framework Foundation -framework Cocoa -framework GameController -framework CoreHaptics -Wl,-rpath,/opt/local/lib\nendif\n\nCXXFLAGS = -fPIC -Wall --std=c++17 $(MESENFLAGS) $(SDL2INC) -I $(realpath ./) -I $(realpath ./Core) -I $(realpath ./Utilities) -I $(realpath ./Sdl) -I $(realpath ./Linux) -I $(realpath ./MacOS)\nOBJCXXFLAGS = $(CXXFLAGS)\nCFLAGS = -fPIC -Wall $(MESENFLAGS)\n\nOBJFOLDER := obj.$(MESENPLATFORM)\nDEBUGFOLDER := bin/$(MESENPLATFORM)/Debug\nRELEASEFOLDER := bin/$(MESENPLATFORM)/Release\nifeq ($(DEBUG), 0)\n\tOUTFOLDER = $(RELEASEFOLDER)\n\tBUILD_TYPE := Release\n\tOPTIMIZEUI := -p:OptimizeUi=true\nelse\n\tOUTFOLDER = $(DEBUGFOLDER)\n\tBUILD_TYPE := Debug\n\tOPTIMIZEUI :=\nendif\n\n\nifeq ($(USE_AOT),true)\n\tPUBLISHFLAGS ?=  -r $(MESENPLATFORM) -p:PublishSingleFile=false -p:PublishAot=true -p:SelfContained=true\nelse\n\tPUBLISHFLAGS ?=  -r $(MESENPLATFORM) --no-self-contained true -p:PublishSingleFile=true\nendif\n\n\nCORESRC := $(shell find Core -name '*.cpp')\nCOREOBJ := $(CORESRC:.cpp=.o)\n\nUTILSRC := $(shell find Utilities -name '*.cpp' -o -name '*.c')\nUTILOBJ := $(addsuffix .o,$(basename $(UTILSRC)))\n\nSDLSRC := $(shell find Sdl -name '*.cpp')\nSDLOBJ := $(SDLSRC:.cpp=.o)\n\nSEVENZIPSRC := $(shell find SevenZip -name '*.c')\nSEVENZIPOBJ := $(SEVENZIPSRC:.c=.o)\n\nLUASRC := $(shell find Lua -name '*.c')\nLUAOBJ := $(LUASRC:.c=.o)\n\nifeq ($(MESENOS),linux)\n\tLINUXSRC := $(shell find Linux -name '*.cpp')\nelse\n\tLINUXSRC :=\nendif\nLINUXOBJ := $(LINUXSRC:.cpp=.o)\n\nifeq ($(MESENOS),osx)\n\tMACOSSRC := $(shell find MacOS -name '*.mm')\nelse\n\tMACOSSRC :=\nendif\nMACOSOBJ := $(MACOSSRC:.mm=.o)\n\nDLLSRC := $(shell find InteropDLL -name '*.cpp')\nDLLOBJ := $(DLLSRC:.cpp=.o)\n\nifeq ($(SYSTEM_LIBEVDEV), true)\n\tLIBEVDEVLIB := $(shell pkg-config --libs libevdev)\n\tLIBEVDEVINC := $(shell pkg-config --cflags libevdev)\nelse\n\tLIBEVDEVSRC := $(shell find Linux/libevdev -name '*.c')\n\tLIBEVDEVOBJ := $(LIBEVDEVSRC:.c=.o)\n\tLIBEVDEVINC := -I../\nendif\n\nifeq ($(MESENOS),linux)\n\tX11LIB := -lX11\nelse\n\tX11LIB :=\nendif\n\nFSLIB := -lstdc++fs\n\nifeq ($(MESENOS),osx)\n\tLIBEVDEVOBJ := \n\tLIBEVDEVINC := \n\tLIBEVDEVSRC := \n\tFSLIB := \n\tifeq ($(USE_AOT),true)\n\t\tPUBLISHFLAGS := -t:BundleApp -p:UseAppHost=true -p:RuntimeIdentifier=$(MESENPLATFORM) -p:PublishSingleFile=false -p:PublishAot=true -p:SelfContained=true\n\telse\n\t\tPUBLISHFLAGS := -t:BundleApp -p:UseAppHost=true -p:RuntimeIdentifier=$(MESENPLATFORM) -p:SelfContained=true -p:PublishSingleFile=false -p:PublishReadyToRun=false\n\tendif\nendif\n\nall: ui\n\nui: InteropDLL/$(OBJFOLDER)/$(SHAREDLIB)\n\tmkdir -p $(OUTFOLDER)/Dependencies\n\trm -fr $(OUTFOLDER)/Dependencies/*\n\tcp InteropDLL/$(OBJFOLDER)/$(SHAREDLIB) $(OUTFOLDER)/$(SHAREDLIB)\n\t#Called twice because the first call copies native libraries to the bin folder which need to be included in Dependencies.zip\n\t#Don't run with AOT flags the first time to reduce build duration\n\tcd UI && ~/.dotnet/dotnet publish -c $(BUILD_TYPE) $(OPTIMIZEUI) -r $(MESENPLATFORM)\n\tcd UI && ~/.dotnet/dotnet publish -c $(BUILD_TYPE) $(OPTIMIZEUI) $(PUBLISHFLAGS)\n\ncore: InteropDLL/$(OBJFOLDER)/$(SHAREDLIB)\n\npgohelper: InteropDLL/$(OBJFOLDER)/$(SHAREDLIB)\n\tmkdir -p PGOHelper/$(OBJFOLDER) && cd PGOHelper/$(OBJFOLDER) && $(CXX) $(CXXFLAGS) $(LINKCHECKUNRESOLVED) -o pgohelper ../PGOHelper.cpp ../../bin/pgohelperlib.so -pthread $(FSLIB) $(SDL2LIB) $(LIBEVDEVLIB) $(X11LIB)\n\n%.o: %.c\n\t$(CC) $(CFLAGS) -c $< -o $@\n\t\n%.o: %.cpp\n\t$(CXX) $(CXXFLAGS) -c $< -o $@\n\n%.o: %.mm\n\t$(CXX) $(OBJCXXFLAGS) -c $< -o $@\n\nInteropDLL/$(OBJFOLDER)/$(SHAREDLIB): $(SEVENZIPOBJ) $(LUAOBJ) $(UTILOBJ) $(COREOBJ) $(SDLOBJ) $(LIBEVDEVOBJ) $(LINUXOBJ) $(DLLOBJ) $(MACOSOBJ)\n\tmkdir -p bin\n\tmkdir -p InteropDLL/$(OBJFOLDER)\n\t$(CXX) $(CXXFLAGS) $(LINKOPTIONS) $(LINKCHECKUNRESOLVED) -shared -o $(SHAREDLIB) $(DLLOBJ) $(SEVENZIPOBJ) $(LUAOBJ) $(LINUXOBJ) $(MACOSOBJ) $(LIBEVDEVOBJ) $(UTILOBJ) $(SDLOBJ) $(COREOBJ) $(SDL2INC) -pthread $(FSLIB) $(SDL2LIB) $(LIBEVDEVLIB) $(X11LIB)\n\tcp $(SHAREDLIB) bin/pgohelperlib.so\n\tmv $(SHAREDLIB) InteropDLL/$(OBJFOLDER)\n\npgo:\n\t./buildPGO.sh\n\nrun:\n\t$(OUTFOLDER)/$(MESENPLATFORM)/publish/Mesen\n\nclean:\n\trm -r -f $(COREOBJ)\n\trm -r -f $(UTILOBJ)\n\trm -r -f $(LINUXOBJ) $(LIBEVDEVOBJ)\n\trm -r -f $(SDLOBJ)\n\trm -r -f $(SEVENZIPOBJ)\n\trm -r -f $(LUAOBJ)\n\trm -r -f $(MACOSOBJ)\n\trm -r -f $(DLLOBJ)\n"
  },
  {
    "path": "packages/sx05re/emulators/mupen64plussa/mupen64plussa-audio-sdl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"mupen64plussa-audio-sdl\"\nPKG_VERSION=\"af6af5b1fd4fdb435c836be15371dd047f395c4d\"\nPKG_SHA256=\"265ccdd56736f9cb4144196ad6673d2728a8ebd1e7b9c4280a632c3a343be261\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/mupen64plus/mupen64plus-audio-sdl\"\nPKG_URL=\"https://github.com/mupen64plus/mupen64plus-audio-sdl/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES} libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core\"\nPKG_SHORTDESC=\"mupen64plus-audio-sdl\"\nPKG_LONGDESC=\"Mupen64Plus Standalone Audio SDL\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_MAKE_OPTS_TARGET+=\"USE_GLES=1\"\n\nmake_target() {\n  export HOST_CPU=aarch64\n  export APIDIR=$(get_install_dir mupen64plussa-core)/usr/local/include/mupen64plus\n  export USE_GLES=1\n  export SDL_CFLAGS=\"-I${SYSROOT_PREFIX}/usr/include/SDL2 -D_REENTRANT\"\n  export SDL_LDLIBS=\"-lSDL2_net -lSDL2\"\n  export CROSS_COMPILE=\"${TARGET_PREFIX}\"\n  export V=1\n  export VC=0\n  BINUTILS=\"$(get_build_dir binutils)/.${TARGET_NAME}\"\n  make -C projects/unix clean\n  make -C projects/unix all ${PKG_MAKE_OPTS_TARGET}\n}\n\nmakeinstall_target() {\n  UPREFIX=${INSTALL}/usr/local\n  ULIBDIR=${UPREFIX}/lib\n  UPLUGINDIR=${ULIBDIR}/mupen64plus\n  mkdir -p ${UPLUGINDIR}\n  cp ${PKG_BUILD}/projects/unix/mupen64plus-audio-sdl.so ${UPLUGINDIR}\n  #${STRIP} ${UPLUGINDIR}/mupen64plus-audio-sdl.so\n  chmod 0644 ${UPLUGINDIR}/mupen64plus-audio-sdl.so\n}\n\n"
  },
  {
    "path": "packages/sx05re/emulators/mupen64plussa/mupen64plussa-core/config/mupen64plus.cfg",
    "content": "# Mupen64Plus Configuration File\n# This file is automatically read and written by the Mupen64Plus Core library\n\n[64DD]\n\n# Filename of the 64DD IPL ROM\nIPL-ROM = \"\"\n# Filename of the disk to load into Disk Drive\nDisk = \"\"\n\n\n[Audio-SDL]\n\n# Mupen64Plus SDL Audio Plugin config parameter version number\nVersion = 1.000000\n# Frequency which is used if rom doesn't want to change it\nDEFAULT_FREQUENCY = 33600\n# Swaps left and right channels\nSWAP_CHANNELS = False\n# Size of primary buffer in output samples. This is where audio is loaded after it's extracted from n64's memory.\nPRIMARY_BUFFER_SIZE = 16384\n# Fullness level target for Primary audio buffer, in equivalent output samples. This value must be larger than the SECONDARY_BUFFER_SIZE. Decreasing this value will reduce audio latency but requires a faster PC to avoid choppiness. Increasing this will increase audio latency but reduce the chance of drop-outs.\nPRIMARY_BUFFER_TARGET = 2048\n# Size of secondary buffer in output samples. This is SDL's hardware buffer. The SDL documentation states that this should be a power of two between 512 and 8192.\nSECONDARY_BUFFER_SIZE = 1024\n# Audio resampling algorithm. src-sinc-best-quality, src-sinc-medium-quality, src-sinc-fastest, src-zero-order-hold, src-linear, speex-fixed-{10-0}, trivial\nRESAMPLE = \"trivial\"\n# Volume control type: 1 = SDL (only affects Mupen64Plus output)  2 = OSS mixer (adjusts master PC volume)\nVOLUME_CONTROL_TYPE = 1\n# Percentage change each time the volume is increased or decreased\nVOLUME_ADJUST = 5\n# Default volume when a game is started.  Only used if VOLUME_CONTROL_TYPE is 1\nVOLUME_DEFAULT = 100\n# Synchronize Video/Audio\nAUDIO_SYNC = False\n\n\n[Core]\n\n# Mupen64Plus Core config parameter set version number.  Please don't change this version number.\nVersion = 1.010000\n# Draw on-screen display if True, otherwise don't draw OSD\nOnScreenDisplay = True\n# Use Pure Interpreter if 0, Cached Interpreter if 1, or Dynamic Recompiler if 2 or more\nR4300Emulator = 2\n# Disable compiled jump commands in dynamic recompiler (should be set to False)\nNoCompiledJump = False\n# Disable 4MB expansion RAM pack. May be necessary for some games\nDisableExtraMem = False\n# Increment the save state slot after each save operation\nAutoStateSlotIncrement = False\n# Activate the R4300 debugger when ROM execution begins, if core was built with Debugger support\nEnableDebugger = False\n# Save state slot (0-9) to use when saving/loading the emulator state\nCurrentStateSlot = 0\n# Path to directory where screenshots are saved. If this is blank, the default value of ${UserDataPath}/screenshot will be used\nScreenshotPath = \"/storage/roms/n64\"\n# Path to directory where emulator save states (snapshots) are saved. If this is blank, the default value of ${UserDataPath}/save will be used\nSaveStatePath = \"/storage/roms/n64\"\n# Path to directory where SRAM/EEPROM data (in-game saves) are stored. If this is blank, the default value of ${UserDataPath}/save will be used\nSaveSRAMPath = \"/storage/roms/n64\"\n# Path to a directory to search when looking for shared data files\nSharedDataPath = \"/storage/roms/gamedata/mupen64plussa\"\n# Force number of cycles per emulated instruction\nCountPerOp = 0\n# Randomize PI/SI Interrupt Timing\nRandomizeInterrupt = True\n# Duration of SI DMA (-1: use per game settings)\nSiDmaDuration = -1\n# Gameboy Camera Video Capture backend\nGbCameraVideoCaptureBackend1 = \"\"\n# Disk Save Format (0: Full Disk Copy (*.ndr/*.d6r), 1: RAM Area Only (*.ram))\nSaveDiskFormat = 1\n\n\n[CoreEvents]\n\n# Mupen64Plus CoreEvents config parameter set version number.  Please don't change this version number.\nVersion = 1.000000\n# SDL keysym for stopping the emulator\nKbd Mapping Stop = 27\n# SDL keysym for switching between fullscreen/windowed modes\nKbd Mapping Fullscreen = 0\n# SDL keysym for saving the emulator state\nKbd Mapping Save State = 286\n# SDL keysym for loading the emulator state\nKbd Mapping Load State = 288\n# SDL keysym for advancing the save state slot\nKbd Mapping Increment Slot = 0\n# SDL keysym for resetting the emulator\nKbd Mapping Reset = 290\n# SDL keysym for slowing down the emulator\nKbd Mapping Speed Down = 291\n# SDL keysym for speeding up the emulator\nKbd Mapping Speed Up = 292\n# SDL keysym for taking a screenshot\nKbd Mapping Screenshot = 293\n# SDL keysym for pausing the emulator\nKbd Mapping Pause = 112\n# SDL keysym for muting/unmuting the sound\nKbd Mapping Mute = 109\n# SDL keysym for increasing the volume\nKbd Mapping Increase Volume = 93\n# SDL keysym for decreasing the volume\nKbd Mapping Decrease Volume = 91\n# SDL keysym for temporarily going really fast\nKbd Mapping Fast Forward = 102\n# SDL keysym for advancing by one frame when paused\nKbd Mapping Frame Advance = 47\n# SDL keysym for pressing the game shark button\nKbd Mapping Gameshark = 103\n# Joystick event string for stopping the emulator\nJoy Mapping Stop = \"J0B7/B6\"\n# Joystick event string for switching between fullscreen/windowed modes\nJoy Mapping Fullscreen = \"\"\n# Joystick event string for saving the emulator state\nJoy Mapping Save State = \"J0B7/B5\"\n# Joystick event string for loading the emulator state\nJoy Mapping Load State = \"J0B7/B4\"\n# Joystick event string for advancing the save state slot\nJoy Mapping Increment Slot = \"\"\n# Joystick event string for resetting the emulator\nJoy Mapping Reset = \"\"\n# Joystick event string for slowing down the emulator\nJoy Mapping Speed Down = \"\"\n# Joystick event string for speeding up the emulator\nJoy Mapping Speed Up = \"\"\n# Joystick event string for taking a screenshot\nJoy Mapping Screenshot = \"\"\n# Joystick event string for pausing the emulator\nJoy Mapping Pause = \"J0B7/B0\"\n# Joystick event string for muting/unmuting the sound\nJoy Mapping Mute = \"\"\n# Joystick event string for increasing the volume\nJoy Mapping Increase Volume = \"\"\n# Joystick event string for decreasing the volume\nJoy Mapping Decrease Volume = \"\"\n# Joystick event string for fast-forward\nJoy Mapping Fast Forward = \"\"\n# Joystick event string for advancing by one frame when paused\nJoy Mapping Frame Advance = \"\"\n# Joystick event string for pressing the game shark button\nJoy Mapping Gameshark = \"\"\n# SDL keysym for save slot 0\nKbd Mapping Slot 0 = 48\n# SDL keysym for save slot 1\nKbd Mapping Slot 1 = 49\n# SDL keysym for save slot 2\nKbd Mapping Slot 2 = 50\n# SDL keysym for save slot 3\nKbd Mapping Slot 3 = 51\n# SDL keysym for save slot 4\nKbd Mapping Slot 4 = 52\n# SDL keysym for save slot 5\nKbd Mapping Slot 5 = 53\n# SDL keysym for save slot 6\nKbd Mapping Slot 6 = 54\n# SDL keysym for save slot 7\nKbd Mapping Slot 7 = 55\n# SDL keysym for save slot 8\nKbd Mapping Slot 8 = 56\n# SDL keysym for save slot 9\nKbd Mapping Slot 9 = 57\n\n\n[Input-SDL-Control1]\n\n# Mupen64Plus SDL Input Plugin config parameter version number.  Please don't change this version number.\nversion = 2.000000\n# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic\nmode = 2\n# Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number\ndevice = 0\n# SDL joystick name (or Keyboard)\nname = \"OpenSimHardware OSH PB Controller\"\n# Specifies whether this controller is 'plugged in' to the simulated N64\nplugged = True\n# Specifies which type of expansion pak is in the controller: 1=None, 2=Mem pak, 4=Transfer pak, 5=Rumble pak\nplugin = 2\n# If True, then mouse buttons may be used with this controller\nmouse = False\n# Scaling factor for mouse movements.  For X, Y axes.\nMouseSensitivity = \"2.00,2.00\"\n# The minimum absolute value of the SDL analog joystick axis to move the N64 controller axis value from 0.  For X, Y axes.\nAnalogDeadzone = \"0,0\"\n# An absolute value of the SDL joystick axis >= AnalogPeak will saturate the N64 controller axis value (at 80).  For X, Y axes. For each axis, this must be greater than the corresponding AnalogDeadzone value\nAnalogPeak = \"32768,32768\"\n# Digital button configuration mappings\nDPad R = \"hat(0 Right)\"\nDPad L = \"hat(0 Left)\"\nDPad D = \"hat(0 Down)\"\nDPad U = \"hat(0 Up)\"\nStart = \"button(6)\"\nZ Trig = \"button(9)\"\nB Button = \"button(3)\"\nA Button = \"button(1)\"\nC Button R = \"button(11)\"\nC Button L = \"button(2)\"\nC Button D = \"button(0)\"\nC Button U = \"button(10)\"\nR Trig = \"button(5)\"\nL Trig = \"button(4)\"\nMempak switch = \"\"\nRumblepak switch = \"\"\n# Analog axis configuration mappings\nX Axis = \"axis(0+,0-)\"\nY Axis = \"axis(1+,1-)\"\n\n\n[Input-SDL-Control2]\n\n# Mupen64Plus SDL Input Plugin config parameter version number.  Please don't change this version number.\nversion = 2.000000\n# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic\nmode = 2\n# Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number\ndevice = -1\n# SDL joystick name (or Keyboard)\nname = \"\"\n# Specifies whether this controller is 'plugged in' to the simulated N64\nplugged = False\n# Specifies which type of expansion pak is in the controller: 1=None, 2=Mem pak, 4=Transfer pak, 5=Rumble pak\nplugin = 2\n# If True, then mouse buttons may be used with this controller\nmouse = False\n# Scaling factor for mouse movements.  For X, Y axes.\nMouseSensitivity = \"2.00,2.00\"\n# The minimum absolute value of the SDL analog joystick axis to move the N64 controller axis value from 0.  For X, Y axes.\nAnalogDeadzone = \"4096,4096\"\n# An absolute value of the SDL joystick axis >= AnalogPeak will saturate the N64 controller axis value (at 80).  For X, Y axes. For each axis, this must be greater than the corresponding AnalogDeadzone value\nAnalogPeak = \"32768,32768\"\n# Digital button configuration mappings\nDPad R = \"\"\nDPad L = \"\"\nDPad D = \"\"\nDPad U = \"\"\nStart = \"\"\nZ Trig = \"\"\nB Button = \"\"\nA Button = \"\"\nC Button R = \"\"\nC Button L = \"\"\nC Button D = \"\"\nC Button U = \"\"\nR Trig = \"\"\nL Trig = \"\"\nMempak switch = \"\"\nRumblepak switch = \"\"\n# Analog axis configuration mappings\nX Axis = \"\"\nY Axis = \"\"\n\n\n[Input-SDL-Control3]\n\n# Mupen64Plus SDL Input Plugin config parameter version number.  Please don't change this version number.\nversion = 2.000000\n# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic\nmode = 2\n# Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number\ndevice = -1\n# SDL joystick name (or Keyboard)\nname = \"\"\n# Specifies whether this controller is 'plugged in' to the simulated N64\nplugged = False\n# Specifies which type of expansion pak is in the controller: 1=None, 2=Mem pak, 4=Transfer pak, 5=Rumble pak\nplugin = 2\n# If True, then mouse buttons may be used with this controller\nmouse = False\n# Scaling factor for mouse movements.  For X, Y axes.\nMouseSensitivity = \"2.00,2.00\"\n# The minimum absolute value of the SDL analog joystick axis to move the N64 controller axis value from 0.  For X, Y axes.\nAnalogDeadzone = \"4096,4096\"\n# An absolute value of the SDL joystick axis >= AnalogPeak will saturate the N64 controller axis value (at 80).  For X, Y axes. For each axis, this must be greater than the corresponding AnalogDeadzone value\nAnalogPeak = \"32768,32768\"\n# Digital button configuration mappings\nDPad R = \"\"\nDPad L = \"\"\nDPad D = \"\"\nDPad U = \"\"\nStart = \"\"\nZ Trig = \"\"\nB Button = \"\"\nA Button = \"\"\nC Button R = \"\"\nC Button L = \"\"\nC Button D = \"\"\nC Button U = \"\"\nR Trig = \"\"\nL Trig = \"\"\nMempak switch = \"\"\nRumblepak switch = \"\"\n# Analog axis configuration mappings\nX Axis = \"\"\nY Axis = \"\"\n\n\n[Input-SDL-Control4]\n\n# Mupen64Plus SDL Input Plugin config parameter version number.  Please don't change this version number.\nversion = 2.000000\n# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic\nmode = 2\n# Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number\ndevice = -1\n# SDL joystick name (or Keyboard)\nname = \"\"\n# Specifies whether this controller is 'plugged in' to the simulated N64\nplugged = False\n# Specifies which type of expansion pak is in the controller: 1=None, 2=Mem pak, 4=Transfer pak, 5=Rumble pak\nplugin = 2\n# If True, then mouse buttons may be used with this controller\nmouse = False\n# Scaling factor for mouse movements.  For X, Y axes.\nMouseSensitivity = \"2.00,2.00\"\n# The minimum absolute value of the SDL analog joystick axis to move the N64 controller axis value from 0.  For X, Y axes.\nAnalogDeadzone = \"4096,4096\"\n# An absolute value of the SDL joystick axis >= AnalogPeak will saturate the N64 controller axis value (at 80).  For X, Y axes. For each axis, this must be greater than the corresponding AnalogDeadzone value\nAnalogPeak = \"32768,32768\"\n# Digital button configuration mappings\nDPad R = \"\"\nDPad L = \"\"\nDPad D = \"\"\nDPad U = \"\"\nStart = \"\"\nZ Trig = \"\"\nB Button = \"\"\nA Button = \"\"\nC Button R = \"\"\nC Button L = \"\"\nC Button D = \"\"\nC Button U = \"\"\nR Trig = \"\"\nL Trig = \"\"\nMempak switch = \"\"\nRumblepak switch = \"\"\n# Analog axis configuration mappings\nX Axis = \"\"\nY Axis = \"\"\n\n\n[Rsp-HLE]\n\n# Mupen64Plus RSP HLE Plugin config parameter version number\nVersion = 1.000000\n# Path to a RSP plugin which will be used when encountering an unknown ucode.You can disable this by letting an empty string.\nRspFallback = \"\"\n# Send display lists to the graphics plugin\nDisplayListToGraphicsPlugin = True\n# Send audio lists to the audio plugin\nAudioListToAudioPlugin = False\n\n\n[Transferpak]\n\n# Filename of the GB ROM to load into transferpak 1\nGB-rom-1 = \"\"\n# Filename of the GB RAM to load into transferpak 1\nGB-ram-1 = \"\"\n# Filename of the GB ROM to load into transferpak 2\nGB-rom-2 = \"\"\n# Filename of the GB RAM to load into transferpak 2\nGB-ram-2 = \"\"\n# Filename of the GB ROM to load into transferpak 3\nGB-rom-3 = \"\"\n# Filename of the GB RAM to load into transferpak 3\nGB-ram-3 = \"\"\n# Filename of the GB ROM to load into transferpak 4\nGB-rom-4 = \"\"\n# Filename of the GB RAM to load into transferpak 4\nGB-ram-4 = \"\"\n\n\n[UI-Console]\n\n# Mupen64Plus UI-Console config parameter set version number.  Please don't change this version number.\nVersion = 1.000000\n# Directory in which to search for plugins\nPluginDir = \"/usr/local/lib/mupen64plus\"\n# Filename of video plugin\nVideoPlugin = \"mupen64plus-video-rice\"\n# Filename of audio plugin\nAudioPlugin = \"mupen64plus-audio-sdl.so\"\n# Filename of input plugin\nInputPlugin = \"mupen64plus-input-sdl.so\"\n# Filename of RSP plugin\nRspPlugin = \"mupen64plus-rsp-hle.so\"\n\n\n[Video-General]\n\n# Width of output window or fullscreen width\nScreenWidth = 1920\n# Height of output window or fullscreen height\nScreenHeight = 1080\n# Use fullscreen mode if True, or windowed mode if False\nFullscreen = True\n# If true, activate the SDL_GL_SWAP_CONTROL attribute\nVerticalSync = True\n# Rotate screen contents: 0=0 degree, 1=90 degree, 2 = 180 degree, 3=270 degree\nRotate = 0\n\n\n[Video-Glide64mk2]\n\n# Enable full-scene anti-aliasing by setting this to a value greater than 1\nwrpAntiAliasing = 0\n# Card ID\ncard_id = 0\n# If true, use polygon offset values specified below\nforce_polygon_offset = False\n# Specifies a scale factor that is used to create a variable depth offset for each polygon\npolygon_offset_factor = 0.000000\n# Is multiplied by an implementation-specific value to create a constant depth offset\npolygon_offset_units = 0.000000\n# Vertical sync\nvsync = True\n# TODO:ssformat\nssformat = False\n# Display performance stats (add together desired flags): 1=FPS counter, 2=VI/s counter, 4=% speed, 8=FPS transparent\nshow_fps = 0\n# Clock enabled\nclock = False\n# Clock is 24-hour\nclock_24_hr = True\n# Wrapper resolution\nwrpResolution = 0\n# Wrapper VRAM\nwrpVRAM = 0\n# Wrapper FBO\nwrpFBO = True\n# Wrapper Anisotropic Filtering\nwrpAnisotropic = True\n# Texture Enhancement: Smooth/Sharpen Filters\nghq_fltr = 0\n# Texture Compression: 0 for S3TC, 1 for FXT1\nghq_cmpr = 0\n# Texture Enhancement: More filters\nghq_enht = 0\n# Hi-res texture pack format (0 for none, 1 for Rice)\nghq_hirs = 1\n# Compress texture cache with S3TC or FXT1\nghq_enht_cmpr = False\n# Tile textures (saves memory but could cause issues)\nghq_enht_tile = 0\n# Force 16bpp textures (saves ram but lower quality)\nghq_enht_f16bpp = False\n# Compress texture cache\nghq_enht_gz = True\n# Don't enhance textures for backgrounds\nghq_enht_nobg = False\n# Enable S3TC and FXT1 compression\nghq_hirs_cmpr = False\n# Tile hi-res textures (saves memory but could cause issues)\nghq_hirs_tile = False\n# Force 16bpp hi-res textures (saves ram but lower quality)\nghq_hirs_f16bpp = False\n# Compress hi-res texture cache\nghq_hirs_gz = True\n# Alternative CRC calculation -- emulates Rice bug\nghq_hirs_altcrc = True\n# Save tex cache to disk\nghq_cache_save = True\n# Texture Cache Size (MB)\nghq_cache_size = 128\n# Use full alpha channel -- could cause issues for some tex packs\nghq_hirs_let_texartists_fly = False\n# Dump textures\nghq_hirs_dump = False\n# Alternate texture size method: -1=Game default, 0=disable. 1=enable\nalt_tex_size = -1\n# Use first SETTILESIZE only: -1=Game default, 0=disable. 1=enable\nuse_sts1_only = -1\n# Use spheric mapping only: -1=Game default, 0=disable. 1=enable\nforce_calc_sphere = -1\n# Force positive viewport: -1=Game default, 0=disable. 1=enable\ncorrect_viewport = -1\n# Force texrect size to integral value: -1=Game default, 0=disable. 1=enable\nincrease_texrect_edge = -1\n# Reduce fillrect size by 1: -1=Game default, 0=disable. 1=enable\ndecrease_fillrect_edge = -1\n# Enable perspective texture correction emulation: -1=Game default, 0=disable. 1=enable\ntexture_correction = -1\n# Set special scale for PAL games: -1=Game default, 0=disable. 1=enable\npal230 = -1\n# 3DFX Dithered alpha emulation mode: -1=Game default, >=0=dithered alpha emulation mode\nstipple_mode = -1\n# 3DFX Dithered alpha pattern: -1=Game default, >=0=pattern used for dithered alpha emulation\nstipple_pattern = -1\n# Check microcode each frame: -1=Game default, 0=disable. 1=enable\nforce_microcheck = -1\n# Force 0xb5 command to be quad, not line 3D: -1=Game default, 0=disable. 1=enable\nforce_quad3d = -1\n# Enable near z clipping: -1=Game default, 0=disable. 1=enable\nclip_zmin = -1\n# Enable far plane clipping: -1=Game default, 0=disable. 1=enable\nclip_zmax = -1\n# Use fast CRC algorithm: -1=Game default, 0=disable. 1=enable\nfast_crc = -1\n# Adjust screen aspect for wide screen mode: -1=Game default, 0=disable. 1=enable\nadjust_aspect = -1\n# Force strict check in Depth buffer test: -1=Game default, 0=disable. 1=enable\nzmode_compare_less = -1\n# Apply alpha dither regardless of alpha_dither_mode: -1=Game default, 0=disable. 1=enable\nold_style_adither = -1\n# Scale vertex z value before writing to depth buffer: -1=Game default, 0=disable. 1=enable\nn64_z_scale = -1\n# Fast texrect rendering with hwfbe: -1=Game default, 0=disable. 1=enable\noptimize_texrect = -1\n# Do not copy auxiliary frame buffers: -1=Game default, 0=disable. 1=enable\nignore_aux_copy = -1\n# Clear auxiliary texture frame buffers: -1=Game default, 0=disable. 1=enable\nhires_buf_clear = -1\n# Read alpha from framebuffer: -1=Game default, 0=disable. 1=enable\nfb_read_alpha = -1\n# Handle unchanged fb: -1=Game default, 0=disable. 1=enable\nuseless_is_useless = -1\n# Set frambuffer CRC mode: -1=Game default, 0=disable CRC, 1=fast CRC, 2=safe CRC\nfb_crc_mode = -1\n# Filtering mode: -1=Game default, 0=automatic, 1=force bilinear, 2=force point sampled\nfiltering = -1\n# Fog: -1=Game default, 0=disable. 1=enable\nfog = -1\n# Buffer clear on every frame: -1=Game default, 0=disable. 1=enable\nbuff_clear = -1\n# Buffer swapping method: -1=Game default, 0=swap buffers when vertical interrupt has occurred, 1=swap buffers when set of conditions is satisfied. Prevents flicker on some games, 2=mix of first two methods\nswapmode = -1\n# Aspect ratio: -1=Game default, 0=Force 4:3, 1=Force 16:9, 2=Stretch, 3=Original\naspect = -1\n# LOD calculation: -1=Game default, 0=disable. 1=fast, 2=precise\nlodmode = -1\n# Smart framebuffer: -1=Game default, 0=disable. 1=enable\nfb_smart = -1\n# Hardware frame buffer emulation: -1=Game default, 0=disable. 1=enable\nfb_hires = -1\n# Read framebuffer every frame (may be slow use only for effects that need it e.g. Banjo Kazooie, DK64 transitions): -1=Game default, 0=disable. 1=enable\nfb_read_always = -1\n# Render N64 frame buffer as texture: -1=Game default, 0=disable, 1=mode1, 2=mode2\nread_back_to_screen = -1\n# Show images written directly by CPU: -1=Game default, 0=disable. 1=enable\ndetect_cpu_write = -1\n# Get frame buffer info: -1=Game default, 0=disable. 1=enable\nfb_get_info = -1\n# Enable software depth render: -1=Game default, 0=disable. 1=enable\nfb_render = -1\n# If true, skip up to maxframeskip frames to maintain clock schedule; if false, skip exactly maxframeskip frames\nautoframeskip = False\n# If autoframeskip is true, skip up to this many frames to maintain clock schedule; if autoframeskip is false, skip exactly this many frames\nmaxframeskip = 0\n\n\n[Video-Rice]\n\n# Mupen64Plus Rice Video Plugin config parameter version number\nVersion = 1\n# Frame Buffer Emulation (0=ROM default, 1=disable)\nFrameBufferSetting = 0\n# Frequency to write back the frame buffer (0=every frame, 1=every other frame, etc)\nFrameBufferWriteBackControl = 0\n# Render-to-texture emulation (0=none, 1=ignore, 2=normal, 3=write back, 4=write back and reload)\nRenderToTexture = 0\n# Control when the screen will be updated (0=ROM default, 1=VI origin update, 2=VI origin change, 3=CI change, 4=first CI change, 5=first primitive draw, 6=before screen clear, 7=after screen drawn)\nScreenUpdateSetting = 4\n# Force to use normal alpha blender\nNormalAlphaBlender = False\n# Use a faster algorithm to speed up texture loading and CRC computation\nFastTextureLoading = False\n# Use different texture coordinate clamping code\nAccurateTextureMapping = True\n# Force emulated frame buffers to be in N64 native resolution\nInN64Resolution = False\n# Try to reduce Video RAM usage (should never be used)\nSaveVRAM = False\n# Enable this option to have better render-to-texture quality\nDoubleSizeForSmallTxtrBuf = False\n# Force to use normal color combiner\nDefaultCombinerDisable = False\n# Enable game-specific settings from INI file\nEnableHacks = True\n# If enabled, graphics will be drawn in WinFrame mode instead of solid and texture mode\nWinFrameMode = False\n# N64 Texture Memory Full Emulation (may fix some games, may break others)\nFullTMEMEmulation = False\n# Enable vertex clipper for fog operations\nOpenGLVertexClipper = False\n# Enable/Disable SSE optimizations for capable CPUs\nEnableSSE = True\n# If this option is enabled, the plugin will skip every other frame\nSkipFrame = False\n# If enabled, texture enhancement will be done only for TxtRect ucode\nTexRectOnly = False\n# If enabled, texture enhancement will be done only for textures width+height<=128\nSmallTextureOnly = False\n# Select hi-resolution textures based only on the CRC and ignore format+size information (Glide64 compatibility)\nLoadHiResCRCOnly = True\n# Enable hi-resolution texture file loading\nLoadHiResTextures = False\n# Enable texture dumping\nDumpTexturesToFiles = False\n# Display On-screen FPS\nShowFPS = False\n# Use Mipmapping? 0=no, 1=nearest, 2=bilinear, 3=trilinear\nMipmapping = 2\n# Enable, Disable fog generation (0=Disable, 1=Enable)\nFogMethod = 1\n# Force to use texture filtering or not (0=auto: n64 choose, 1=force no filtering, 2=force filtering)\nForceTextureFilter = 0\n# Primary texture enhancement filter (0=None, 1=2X, 2=2XSAI, 3=HQ2X, 4=LQ2X, 5=HQ4X, 6=Sharpen, 7=Sharpen More, 8=External, 9=Mirrored)\nTextureEnhancement = 0\n# Secondary texture enhancement filter (0 = none, 1-4 = filtered)\nTextureEnhancementControl = 0\n# Color bit depth to use for textures (0=default, 1=32 bits, 2=16 bits)\nTextureQuality = 0\n# Z-buffer depth (only 16 or 32)\nOpenGLDepthBufferSetting = 16\n# Enable/Disable MultiSampling (0=off, 2,4,8,16=quality)\nMultiSampling = 0\n# Color bit depth for rendering window (0=32 bits, 1=16 bits)\nColorQuality = 1\n# OpenGL level to support (0=auto, 1=OGL_FRAGMENT_PROGRAM)\nOpenGLRenderSetting = 0\n# Enable/Disable Anisotropic Filtering for Mipmapping (0=no filtering, 2-16=quality). This is uneffective if Mipmapping is 0. If the given value is to high to be supported by your graphic card, the value will be the highest value your graphic card can support. Better result with Trilinear filtering\nAnisotropicFiltering = 0\n# If true, use polygon offset values specified below\nForcePolygonOffset = False\n# Specifies a scale factor that is used to create a variable depth offset for each polygon\nPolygonOffsetFactor = 0.000000\n# Is multiplied by an implementation-specific value to create a constant depth offset\nPolygonOffsetUnits = 0.000000\n\n"
  },
  {
    "path": "packages/sx05re/emulators/mupen64plussa/mupen64plussa-core/m64p.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present Shanti Gilbert (https://github.com/shantigilbert)\n#\n# 2025 to the present DiegroSan (https://github.com/Diegrosan)\n# Multithreading used for faster extraction.\n# Simultaneous execution of set_mupen64_joy.sh and 7za\n# Add suport 64DD...\n\n# Source predefined functions and variables\n. /etc/profile\n\nCONFIGDIR=\"/emuelec/configs/mupen64plussa\"\nSAVEDIR=\"/storage/roms/savestates/mupen64plussa\"\nBIOSDIR=\"/storage/roms/bios/Mupen64plus\"\n\nmkdir -p ${CONFIGDIR}\nmkdir -p ${SAVEDIR}\n\n# Setup configs\nfor files in /usr/local/share/mupen64plus/*; do\n    dest_file=\"${CONFIGDIR}/$(basename \"$files\")\"\n    [[ -f \"$dest_file\" ]] || cp \"$files\" \"$dest_file\"\ndone\n\nFILE=\"$1\"\n\nGAMEDIR=$(dirname \"${FILE}\")\n\nextract_archive() {\n    mkdir -p /tmp/mupen64plus\n    rm -rf /tmp/mupen64plus/*\n\n    7za x -mmt=on -y \"$FILE\" -o/tmp/mupen64plus >/dev/null 2>&1\n    find /tmp/mupen64plus -maxdepth 1 \\( -name \"*.z64\" -o -name \"*.n64\" -o -name \"*.v64\" -o -name \"*.bin\" -o -name \"*.rom\" \\) | head -n1\n}\n\nsetup_gamepad() {\n    AUTOGP=$(get_ee_setting mupen64plus_auto_gamepad)\n    [[ \"$AUTOGP\" != \"0\" ]] && set_mupen64_joy.sh\n}\n\nEXT=\"${FILE##*.}\"\nif [[ \"$EXT\" == \"zip\" || \"$EXT\" == \"7z\" ]]; then\n    setup_gamepad &\n    pad_pid=$!\n    \n    EXTRACTED_ROM=$(extract_archive)\n    \n    wait $pad_pid\n    \n    if [[ -n \"$EXTRACTED_ROM\" ]]; then\n        FILE=\"$EXTRACTED_ROM\"\n    else\n        echo \"Error: No valid ROM found in compressed file.\"\n        exit 1\n    fi\nelse\n    setup_gamepad\nfi\n\nGAMENAME=$(basename \"${FILE%.*}\")\n\nIPLROM=\"${BIOSDIR}/N64DD IPLROM (J).n64\"\n[ ! -f \"${IPLROM}\" ] && IPLROM=\"${BIOSDIR}/IPL.n64\"\n\nif [ -f \"${GAMEDIR}/${GAMENAME}.ndd\" ] && [ -f \"${IPLROM}\" ]; then\n    RENMODE=\"1\"\n    SETMEMORY=\"DisableExtraMem[Core]=False\"\n    DDDISK=\"${GAMEDIR}/${GAMENAME}.ndd\"\nelse\n    RENMODE=\"2\"\n    SETMEMORY=\"DisableExtraMem[Core]=True\"\n    IPLROM=\"\"\n    DDDISK=\"\"\nfi\n\n# Get resolution\ncase \"$(oga_ver)\" in\n    \"OGA\"*) RES_W=\"480\"; RES_H=\"320\" ;;\n    \"OGS\")  RES_W=\"854\"; RES_H=\"480\" ;;\n    \"GF\")   RES_W=\"640\"; RES_H=\"480\" ;;\n    *)      read -r RES_W RES_H <<< \"$(echo $(get_resolution))\" ;;\nesac\n\nRES=\"${RES_W}x${RES_H}\"\necho \"RESOLUTION=$RES\"\n\n#RES=\"800x400\" #test\n#echo \" --emumode \"${RENMODE}\" --set \"${SETMEMORY}\" --dd-ipl-rom \"${IPLROM}\" --dd-disk \"${DDDISK}\" \"${FILE}\"\"\n\n# Launch emulator\ncase \"$2\" in\n    \"m64p_gl64mk2\")\n        mupen64plus --fullscreen --resolution \"$RES\" --emumode \"${RENMODE}\" --set \"${SETMEMORY}\" --configdir \"$CONFIGDIR\" --datadir \"$CONFIGDIR\" --savestate \"$SAVEDIR\" --gfx mupen64plus-video-glide64mk2.so --dd-ipl-rom \"${IPLROM}\" --dd-disk \"${DDDISK}\" \"${FILE}\" ;;\n    *)\n        mupen64plus --fullscreen --resolution \"$RES\" --emumode \"${RENMODE}\" --set \"${SETMEMORY}\" --configdir \"$CONFIGDIR\" --datadir \"$CONFIGDIR\" --savestate \"$SAVEDIR\" --gfx mupen64plus-video-rice.so --dd-ipl-rom \"${IPLROM}\" --dd-disk \"${DDDISK}\" \"${FILE}\" ;;\nesac\n\n# Cleanup\nrm -rf /tmp/mupen64plus/*\n\n"
  },
  {
    "path": "packages/sx05re/emulators/mupen64plussa/mupen64plussa-core/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"mupen64plussa-core\"\nPKG_VERSION=\"57828d930280554c7400bb2bcf1e46c7f2ee8373\"\nPKG_SHA256=\"3446b6f6d7df3d57d792ed9d46354e4a22f0cc843efffa0343cab523ab525c3a\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/mupen64plus/mupen64plus-core\"\nPKG_URL=\"https://github.com/mupen64plus/mupen64plus-core/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES} boost libpng SDL2 SDL2_net zlib freetype nasm:host\"\nPKG_SHORTDESC=\"mupen64plus\"\nPKG_LONGDESC=\"Mupen64Plus Standalone\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_MAKE_OPTS_TARGET+=\"USE_GLES=1\"\n\nmake_target() {\n  export HOST_CPU=aarch64\n  export USE_GLES=1\n  export SDL_CFLAGS=\"-I${SYSROOT_PREFIX}/usr/include/SDL2 -D_REENTRANT\"\n  export SDL_LDLIBS=\"-lSDL2_net -lSDL2\"\n  export CROSS_COMPILE=\"${TARGET_PREFIX}\"\n  export V=1\n  export VC=0\n  BINUTILS=\"$(get_build_dir binutils)/.${TAGET_NAME}\"\n  make -C projects/unix clean\n  make -C projects/unix all ${PKG_MAKE_OPTS_TARGET}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/local/lib\n  cp ${PKG_BUILD}/projects/unix/libmupen64plus.so.2.0.0 ${INSTALL}/usr/local/lib\n  chmod 644 ${INSTALL}/usr/local/lib/libmupen64plus.so.2.0.0\n  cp ${PKG_BUILD}/projects/unix/libmupen64plus.so.2 ${INSTALL}/usr/local/lib\n  mkdir -p ${INSTALL}/usr/local/share/mupen64plus\n  cp ${PKG_BUILD}/data/* ${INSTALL}/usr/local/share/mupen64plus\n  chmod 0644 ${INSTALL}/usr/local/share/mupen64plus/*\n  mkdir -p ${INSTALL}/usr/local/include/mupen64plus\n  cp ${PKG_BUILD}/src/api/m64p_*.h ${INSTALL}/usr/local/include/mupen64plus\n  chmod 0644 ${INSTALL}/usr/local/include/mupen64plus/*\n\n  cp ${PKG_DIR}/config/mupen64plus.cfg ${INSTALL}/usr/local/share/mupen64plus/mupen64plus.cfg\n  \n  chmod 644 ${INSTALL}/usr/local/share/mupen64plus/mupen64plus.cfg\n  mkdir -p ${INSTALL}/usr/bin\n  cp ${PKG_DIR}/m64p.sh ${INSTALL}/usr/bin\n  chmod 755 ${INSTALL}/usr/bin/m64p.sh\n\tcp ${PKG_DIR}/set_mupen64_joy.sh ${INSTALL}/usr/bin\n  chmod 755 ${INSTALL}/usr/bin/set_mupen64_joy.sh\n}\n\n"
  },
  {
    "path": "packages/sx05re/emulators/mupen64plussa/mupen64plussa-core/set_mupen64_joy.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Joshua L (https://github.com/Langerz82)\n# Optimized application 2x faster 2025-present DiegroSan\n\n# Source predefined functions and variables\n. /etc/profile\n\n# Configure Mupen64Plus players based on GameControllerDB\nCONFIG_DIR=\"/storage/.config/emuelec/configs/mupen64plussa\"\nCONFIG=\"${CONFIG_DIR}/mupen64plus.cfg\"\nCONFIG_TMP=\"/tmp/jc/mupen64.tmp\"\n\nsource joy_common.sh \"mupen64plus\"\n\nBTN_H0=$(get_ee_setting mupen_btn_h0)\nBTN_H0=${BTN_H0:-0}\n\ndeclare -A GC_MUPEN64_VALUES=(\n    [h0.1]=\"hat(${BTN_H0} Up)\"\n    [h0.4]=\"hat(${BTN_H0} Down)\"\n    [h0.8]=\"hat(${BTN_H0} Left)\"\n    [h0.2]=\"hat(${BTN_H0} Right)\"\n    [b0]=\"button(0)\"\n    [b1]=\"button(1)\"\n    [b2]=\"button(2)\"\n    [b3]=\"button(3)\"\n    [b4]=\"button(4)\"\n    [b5]=\"button(5)\"\n    [b6]=\"button(6)\"\n    [b7]=\"button(7)\"\n    [b8]=\"button(8)\"\n    [b9]=\"button(9)\"\n    [b10]=\"button(10)\"\n    [b11]=\"button(11)\"\n    [b12]=\"button(12)\"\n    [b13]=\"button(13)\"\n    [b14]=\"button(14)\"\n    [b15]=\"button(15)\"\n    [b16]=\"button(16)\"\n)\n\ndeclare -A GC_MUPEN64_BUTTONS=(\n    [dpleft]=\"DPad L\"\n    [dpright]=\"DPad R\"\n    [dpup]=\"DPad U\"\n    [dpdown]=\"DPad D\"\n    [a]=\"B Button\"\n    [b]=\"A Button\"\n    [righttrigger]=\"Z Trig\"\n    [start]=\"Start\"\n    [leftshoulder]=\"L Trig\"\n    [rightshoulder]=\"R Trig\"\n    [leftx]=\"X Axis\"\n    [lefty]=\"Y Axis\"\n    [rightx,0]=\"C Button L\"\n    [rightx,1]=\"C Button R\"\n    [righty,0]=\"C Button U\"\n    [righty,1]=\"C Button D\"\n)\n\nBTN_SWAP_AB=$(get_ee_setting mupen64_joy_swap_ab)\nif [[ \"${BTN_SWAP_AB}\" == \"1\" ]]; then\n    GC_MUPEN64_BUTTONS[a]=\"A Button\"\n    GC_MUPEN64_BUTTONS[b]=\"B Button\"\nfi\n\ndeclare -A GC_MUPEN64_STICKS=(\n    [\"leftx\"]=\"axis(%d-,%d+)\"\n    [\"lefty\"]=\"axis(%d-,%d+)\"\n    [\"rightx,0\"]=\"axis(%d-)\"\n    [\"rightx,1\"]=\"axis(%d+)\"\n    [\"righty,0\"]=\"axis(%d-)\"\n    [\"righty,1\"]=\"axis(%d+)\"\n)\n\nclean_pad() {\n    [[ -f \"${CONFIG_TMP}\" ]] && rm \"${CONFIG_TMP}\"\n    [[ ! -f \"${CONFIG}\" ]] && return\n    \n    local GC_REGEX=\"\\[Input-SDL-Control${1}\\]\"\n    local in_section=0\n    local temp_file=$(mktemp)\n    \n    while IFS= read -r line; do\n        if [[ \"$line\" =~ \\[.*\\] ]]; then\n            if [[ \"$line\" =~ $GC_REGEX ]]; then\n                in_section=1\n                # Keep AnalogPeak and AnalogDeadZone if they exist\n                grep -E \"^AnalogPeak|^AnalogDeadZone\" \"${CONFIG}\" | head -2 >> \"${CONFIG_TMP}\"\n            else\n                in_section=0\n            fi\n        fi\n    \n        if (( !in_section )); then\n            echo \"$line\" >> \"$temp_file\"\n        fi\n    done < \"${CONFIG}\"\n    \n    mv \"$temp_file\" \"${CONFIG}\"\n    rm -f \"$temp_file\"\n}\n\nset_pad() {\n    local PLAYER=${1}\n    local JSI=${2}\n    local DEVICE_GUID=${3}\n    local JOY_NAME=\"${4}\"\n    local RUMBLEPAK_SWITCH=\"\\\"\\\"\"\n\n    local GC_CONFIG=\"${5}\"\n    [[ -z ${GC_CONFIG} ]] && return\n\n    local GC_MAP=$(cut -d',' -f3- <<< \"${GC_CONFIG}\")\n    IFS=',' read -ra GC_ARRAY <<< \"${GC_MAP}\"\n\n    for REC in \"${GC_ARRAY[@]}\"; do\n        local BUTTON_INDEX=$(cut -d \":\" -f 1 <<< \"${REC}\")\n        local TVAL=$(cut -d \":\" -f 2 <<< \"${REC}\")\n        local BUTTON_VAL=${TVAL:1}\n        local GC_INDEX=\"${GC_MUPEN64_BUTTONS[${BUTTON_INDEX}]}\"\n        local BTN_TYPE=${TVAL:0:1}\n        local VAL=\"${GC_MUPEN64_VALUES[${TVAL}]}\"\n\n        case ${BUTTON_INDEX} in\n            rightstick)\n                RUMBLEPAK_SWITCH=\"\\\"button(${BUTTON_VAL})\\\"\"\n                ;;\n            leftx|lefty)\n                printf \"%s = axis(%d-,%d+)\\n\" \"${GC_INDEX}\" \"${BUTTON_VAL}\" \"${BUTTON_VAL}\" >> \"${CONFIG_TMP}\"\n                ;;\n            rightx|righty)\n                printf \"%s = axis(%d-)\\n\" \"${GC_MUPEN64_BUTTONS[${BUTTON_INDEX},0]}\" \"${BUTTON_VAL}\" >> \"${CONFIG_TMP}\"\n                printf \"%s = axis(%d+)\\n\" \"${GC_MUPEN64_BUTTONS[${BUTTON_INDEX},1]}\" \"${BUTTON_VAL}\" >> \"${CONFIG_TMP}\"\n                ;;\n            *)\n                if [[ -n \"${GC_INDEX}\" ]]; then\n                    case \"${BTN_TYPE}\" in\n                        b|h) [[ -n \"${VAL}\" ]] && echo \"${GC_INDEX} = ${VAL}\" >> \"${CONFIG_TMP}\" ;;\n                        a) printf \"%s = axis(%d+)\\n\" \"${GC_INDEX}\" \"${BUTTON_VAL}\" >> \"${CONFIG_TMP}\" ;;\n                    esac\n                fi\n                ;;\n        esac\n    done\n\n    {\n        printf \"[Input-SDL-Control%s]\\n\" \"${1}\"\n        echo \"version = 2.000000\"\n        echo \"mode = 0\"\n        echo \"device = $(( PLAYER - 1 ))\"\n        echo \"name = \\\"${JOY_NAME}\\\"\"\n        echo \"plugged = True\"\n        echo \"plugin = 5\"\n        echo \"mouse = False\"\n        echo \"Mempak switch = \\\"\\\"\"\n        echo \"Rumblepak switch = ${RUMBLEPAK_SWITCH}\"\n    } >> \"${CONFIG}\"\n\n    # Add default values if they don't exist\n    grep -q \"^AnalogPeak\" \"${CONFIG_TMP}\" || echo \"AnalogPeak = \\\"32768,32768\\\"\" >> \"${CONFIG_TMP}\"\n    grep -q \"^AnalogDeadzone\" \"${CONFIG_TMP}\" || echo \"AnalogDeadzone = \\\"4096,4096\\\"\" >> \"${CONFIG_TMP}\"\n\n    sort \"${CONFIG_TMP}\" >> \"${CONFIG}\"\n\tprintf \"\\n\\n\" >> \"${CONFIG}\"\n    rm -f \"${CONFIG_TMP}\"\n}\n\njc_get_players\n"
  },
  {
    "path": "packages/sx05re/emulators/mupen64plussa/mupen64plussa-input-sdl/config/InputAutoCfg.ini",
    "content": "; InputAutoCfg.ini for Mupen64Plus SDL Input plugin for RGB10\n\n[Keyboard]\nplugged = True\nmouse = False\nDPad R = key(100)\nDPad L = key(97)\nDPad D = key(115)\nDPad U = key(119)\nStart = key(13)\nZ Trig = key(122)\nB Button = key(306)\nA Button = key(304)\nC Button R = key(108)\nC Button L = key(106)\nC Button D = key(107)\nC Button U = key(105)\nR Trig = key(99)\nL Trig = key(120)\nMempak switch = key(44)\nRumblepak switch = key(46)\nX Axis = key(276,275)\nY Axis = key(273,274)\n\n[Austgame PS to USB convert cable]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(8)\nZ Trig = button(4)\nB Button = button(3)\nA Button = button(2)\nC Button R = button(1)\nC Button L = button(0)\nC Button D = button(5)\nC Button U = axis(3-)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[BDA Pro Ex]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = axis(4+)\nDPad L = axis(4-)\nDPad D = axis(5+)\nDPad U = axis(5-)\nStart = button(9)\nZ Trig = button(7)\nB Button = button(2)\nA Button = button(1)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = key(44)\nRumblepak switch = key(46)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; Boom Smart Joy Converter\n[HID 6666:0667]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = button(13)\nDPad L = button(15)\nDPad D = button(14)\nDPad U = button(12)\nStart = button(11)\nZ Trig = button(10)\nB Button = button(4)\nA Button = button(5)\nC Button R = button(1)\nC Button L = button(3)\nC Button D = button(2)\nC Button U = button(0)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch = key(109)\nRumblepak switch = key(114)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Cyborg V.3 Rumble Pad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = axis(4+)\nDPad L = axis(4-)\nDPad D = axis(5+)\nDPad U = axis(5-)\nStart = button(12)\nZ Trig = button(7)\nB Button = button(0)\nA Button = button(1)\nC Button R = button(8) axis(2+)\nC Button L = button(3) axis(2-)\nC Button D = button(2) axis(3+)\nC Button U = button(9) axis(3-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[DragonRise Inc. Generic USB Joystick]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = key(275) axis(0+)\nDPad L = key(276) axis(0-)\nDPad D = key(274) axis(1+)\nDPad U = key(273) axis(1-)\nStart = button(9)\nZ Trig = button(4)\nB Button = button(3)\nA Button = button(2)\nC Button R = button(7) axis(3+)\nC Button L = button(6) axis(3-)\nC Button D = button(1) axis(4+)\nC Button U = button(0) axis(4-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+) \n\n; FuSa is a homebrew program which allows a PSP to be used as a gamepad\n[FuSa FuSa GamePad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R =\nDPad L =\nDPad D =\nDPad U =\nStart = button(7)\nZ Trig = button(4)\nB Button = button(2)\nA Button = button(0)\nC Button R = hat(0 Right)\nC Button L = hat(0 Left)\nC Button D = hat(0 Down)\nC Button U = hat(0 Up)\nR Trig = button(5)\nL Trig = button(3)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; \"Super Joy Box 13\" USB adaptor for a Gamecube controller\n[GameCube to USB box 1]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(7)\nZ Trig = button(6)\nB Button = button(1)\nA Button = button(0)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3-)\nC Button U = axis(3+)\nR Trig = axis(5+)\nL Trig = axis(4+)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Gasia Co.,Ltd PS(R) Gamepad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = key(275) axis(0+) hat(0 Right)\nDPad L = key(276) axis(0-) hat(0 Left)\nDPad D = key(274) axis(1+) hat(0 Down)\nDPad U = key(273) axis(1-) hat(0 Up)\nStart = button(9)\nZ Trig = button(6)\nB Button = button(3)\nA Button = button(2)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = button(1)\nRumblepak switch = button(0)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; raphnet technologies USB converter (http://www.raphnet-tech.com/)\n[GC/N64_USB]\n[GC/N64 to USB, v2.9]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = button(13)\nDPad L = button(12)\nDPad D = button(11)\nDPad U = button(10)\nStart = button(3)\nZ Trig = button(2)\nB Button = button(1)\nA Button = button(0)\nC Button R = button(7)\nC Button L = button(6)\nC Button D = button(5)\nC Button U = button(4)\nR Trig = button(9)\nL Trig = button(8)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; raphnet technologies USB converter, v3 series (http://www.raphnet-tech.com/)\n[raphnet technologies GC/N64 to USB]\n[raphnet technologies N64 to USB]\n[raphnet technologies Dual N64 to USB]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = button(13)\nDPad L = button(12)\nDPad D = button(11)\nDPad U = button(10)\nStart = button(3)\nZ Trig = button(2)\nB Button = button(1)\nA Button = button(0)\nC Button R = button(9)\nC Button L = button(8)\nC Button D = button(7)\nC Button U = button(6)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; Retrolink N64 USB clone \n[Generic   USB  Joystick]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = axis(5+)\nDPad L = axis(5-)\nDPad D = axis(6+)\nDPad U = axis(6-)\nStart = button(9)\nZ Trig = button(7)\nB Button = button(8)\nA Button = button(6)\nC Button R = button(1)\nC Button L = button(3)\nC Button D = button(2)\nC Button U = button(0)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = key(109)\nRumblepak switch = key(114)\nY Axis = axis(1-,1+)\nX Axis = axis(0-,0+)\n\n; gioteck VX2PS3-21 RF Wireless Controller \n[Goodbetterbest Ltd PC USB Controller]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nMempak switch = button(7)\nRumblepak switch =\nC Button D = button(1) axis(3+)\nC Button L = axis(2-)\nZ Trig = button(6)\nStart = button(9)\nY Axis = axis(1-,1+)\nDPad U = hat(0 Up)\nC Button U = button(0) axis(3-)\nA Button = button(2)\nDPad D = hat(0 Down)\nX Axis = axis(0-,0+)\nR Trig = button(5)\nDPad R = hat(0 Right)\nB Button = button(3)\nDPad L = hat(0 Left)\nC Button R = axis(2+)\nL Trig = button(4)\n\n[GreenAsia Inc. USB Joystick]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(1)\nB Button = button(3)\nA Button = button(2)\nC Button R = axis(3+)\nC Button L = axis(3-)\nC Button D = axis(2+)\nC Button U = axis(2-)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[GS gamepad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(7)\nB Button = button(2)\nA Button = button(0)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Guillemot Corporation DA Leader]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(12)\nZ Trig = button(11)\nB Button = button(1)\nA Button = button(3)\nC Button R = button(6)\nC Button L = button(4)\nC Button D = button(7)\nC Button U = button(5)\nR Trig = button(2)\nL Trig = button(0)\nMempak switch = key(44)\nRumblepak switch = key(46)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[ipega media gamepad controller]\nplugged = True\nmouse = False\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(11)\nZ Trig = button(6)\nB Button = button(3)\nA Button = button(0)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = axis(4+)\nL Trig = axis(5+)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[ipega gamepad controller]\nplugged = True\nmouse = False\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(2)\nB Button = button(0)\nA Button = button(1)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Jess Tech Dual Analog Pad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(7)\nB Button = button(0)\nA Button = button(2)\nC Button R = axis(3+)\nC Button L = axis(3-)\nC Button D = axis(2+)\nC Button U = axis(2-)\nR Trig = button(6)\nL Trig = button(4)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Win32: Colour Rumble Pad]\n[Jess Tech Colour Rumble Pad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(4)\nB Button = button(0)\nA Button = button(2)\nC Button R = axis(3+)\nC Button L = axis(3-)\nC Button D = axis(2+)\nC Button U = axis(2-)\nR Trig = button(7)\nL Trig = button(5)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Jess Tech USB 4-Axis 12-Button Gamepad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(4)\nZ Trig = button(5)\nB Button = button(8)\nA Button = button(9)\nC Button R = button(1)\nC Button L = button(3)\nC Button D = button(2)\nC Button U = button(0)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Jess Technology Co., Ltd. USB Game Controllers]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = axis(0+)\nDPad L = axis(0-)\nDPad D = axis(1+)\nDPad U = axis(1-)\nStart = button(9)\nZ Trig = button(3)\nB Button = button(0)\nA Button = button(2)\nC Button R = axis(5+)\nC Button L = axis(5-)\nC Button D = axis(2+)\nC Button U = axis(2-)\nR Trig = button(6)\nL Trig = button(4)\nMempak switch = button(7)\nRumblepak switch = button(5)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; X-box controllers and compatible clones\n[Logitech Chillstream Controller]\n[Logic3 Controller]\n[HORIPAD ONE]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(7)\nZ Trig = axis(2+)\nB Button = button(2)\nA Button = button(0)\nC Button R = axis(3+)\nC Button L = axis(3-)\nC Button D = axis(4+)\nC Button U = axis(4-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = button(6)\nRumblepak switch = button(8)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Logitech Cordless Rumblepad 2]\n[Logitech Cordless RumblePad 2]\n[Logitech RumblePad 2 USB]\n[Logitech Dual Action]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = axis(4+) hat(0 Right)\nDPad L = axis(4-) hat(0 Left)\nDPad D = axis(5+) hat(0 Down)\nDPad U = axis(5-) hat(0 Up)\nStart = button(9)\nZ Trig = button(6)\nB Button = button(0)\nA Button = button(1)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = button(8)\nRumblepak switch = button(7)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Logitech Gamepad F310]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(7)\nZ Trig = button(5)\nB Button = button(2)\nA Button = button(0)\nC Button R = axis(3+)\nC Button L = axis(3-)\nC Button D = axis(4+)\nC Button U = axis(4-)\nR Trig = axis(5-)\nL Trig = axis(2-)\nMempak switch = button(1)\nRumblepak switch = button(3)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Logitech Gamepad F710]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(7)\nZ Trig = axis(2+)\nB Button = button(0)\nA Button = button(1)\nC Button R = axis(3+)\nC Button L = axis(3-)\nC Button D = axis(4+)\nC Button U = axis(4-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = button(6)\nRumblepak switch = axis(5+)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Logitech Logitech(R) Precision(TM) Gamepad]\n[Gravis GamePad Pro USB]\nplugged = True\nmouse = False\nAnalogDeadzone = 100,100\nAnalogPeak = 32768,32768\nDPad R = axis(0+)\nDPad L = axis(0-)\nDPad D = axis(1+)\nDpad U = axis(1-)\nStart = button(9)\nZ Trig = button(6)\nB Button = button(5)\nA Button = button(4)\nC Button R = button(2)\nC Button L = button(0)\nC Button D = button(1)\nC Button U = button(3)\nR Trig = button(7)\nL Trig = button(8)\nMempack switch =\nRumblepak Switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Logitech WingMan Action Pad]\n[Logitech Inc WingMan RumblePad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = button(13)\nDPad L = button(15)\nDPad D = button(14)\nDPad U = button(12)\nStart = button(8)\nZ Trig = button(6)\nB Button = button(3)\nA Button = button(0)\nC Button R = button(2)\nC Button L = button(4)\nC Button D = button(1)\nC Button U = button(5)\nR Trig = button(7)\nL Trig =\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Mayflash GC Controller Adapter 4-Port]\n; Mayflash Gamecube 4-Port Controller Adapter (for PC & Wii U USB) - With one Gamecube gamepad(s) connected\n; this is a 4-port USB device. The ports from left to right are p1, p2, p3, p4.\n; This is configured for Toki no Ocarina, therefore the L trig represents the Z trig and vice versa\nplugged = True\nmouse = False\nAnalogDeadzone = 128,128\nAnalogPeak = 28000,28000\nDPad R = hat(4 Right)\nDPad L = hat(4 Left)\nDPad D = hat(4 Down)\nDPad U = hat(4 Up)\nStart = button(36)\n; L Trig is mapped to Z\nZ Trig = axis(12+)\nB Button = button(8)\nA Button = button(4)\nC Button R = axis(20+)\nC Button L = axis(20-)\nC Button D = axis(8+)\nC Button U = axis(8-)\nR Trig = axis(16+)\nL Trig = button(28)\nMempak switch =\nRumblepak switch =\nY Axis = axis(0-,0+)\nX Axis = axis(4-,4+)\n\n[Mega World Thrustmaster dual analog 3.2]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(8)\nB Button = button(1)\nA Button = button(0)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(6)\nL Trig = button(4)\nMempak switch = button(5)\nRumblepak switch = button(7)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Mega World USB Game Controllers]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(7)\nB Button = button(0)\nA Button = button(2)\nC Button R = axis(3+)\nC Button L = axis(3-)\nC Button D = axis(2+)\nC Button U = axis(2-)\nR Trig = button(6)\nL Trig = button(4)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[MP-8866 Dual USB Joypad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(8)\nZ Trig = button(6)\nB Button = button(3)\nA Button = button(2)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(7)\nL Trig = button(4)\nMempak switch = button(10)\nRumblepak switch = button(11)\nY Axis = axis(1-,1+)\nX Axis = axis(0-,0+)\n\n; Nes30 Pro Controller\n; NB - this maps Z trigger to button Y\n; Select, L2 and R2 are unmapped\n[Bluetooth Wireless Controller   ]\n[8Bitdo NES30 Pro]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = axis(6+)\nDPad L = axis(6-)\nDPad D = axis(7+)\nDPad U = axis(7-)\nStart = button(11)\nZ Trig = button(4)\nB Button = button(1)\nA Button = button(0)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Linux: Microsoft X-Box 360 pad]\n[Linux: Xbox 360 Wireless Receiver (XBOX)]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(7)\nZ Trig = axis(2+)\nB Button = button(2)\nA Button = button(0)\nC Button R = axis(3+,24000)\nC Button L = axis(3-,24000) button(3)\nC Button D = axis(4+,24000) button(1)\nC Button U = axis(4-,24000)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; Multilaser PS2 Generic Controller JS030\n[Linux: Microntek USB Joystick]\n[Win32: USB Network Joystick]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(6)\nB Button = button(3)\nA Button = button(2)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Microsoft X-Box 360 pad]\n[Microsoft X-Box One pad]\n[Win32: Controller (XBOX 360 For Windows)]\n[Win32: XBOX 360 For Windows (Controller)]\n[Win32: XBOX 360 For Windows]\n[Xbox 360 Wireless Receiver]\n[Linux: Xbox Gamepad (userspace driver)]\n[Afterglow Gamepad for Xbox 360]\n[Controller (Xbox One For Windows)]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(7)\nZ Trig = axis(2+)\nB Button = button(2)\nA Button = button(0)\nC Button R = axis(4+,24000)\nC Button L = axis(4-,24000)\nC Button D = axis(3+,24000)\nC Button U = axis(3-,24000)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n# mappings for use with the TattieBogle driver under OSX, given in googlecode.com issue #630\n[OSX: Wireless 360 Controller]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = button(3)\nDPad L = button(2)\nDPad D = button(0)\nDPad U = button(1)\nStart = button(4)\nZ Trig = axis(5+)\nB Button = button(13)\nA Button = button(11)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(9)\nL Trig = button(8)\nMempak switch = \"\"\nRumblepak switch = \"\"\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n# For Xbox One controllers in Bluetooth mode\n[Xbox Wireless Controller]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(11)\nZ Trig = button(7)\nB Button = button(1)\nA Button = button(0)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = axis(4+)\nL Trig = axis(5+)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n# from the Google Group, with the tattiebogle driver 0.15 beta 3 under El Capitan 10.11.1\n[OSX: Xbox 360 Wired Controller]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = button(14)\nDPad L = button(13)\nDPad D = button(12)\nDPad U = button(11)\nStart = button(8)\nZ Trig = axis(2+)\nB Button = button(2)\nA Button = button(0)\nC Button R = axis(3+)\nC Button L = axis(3-)\nC Button D = axis(4+)\nC Button U = axis(4-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = \"\"\nRumblepak switch = \"\"\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; ACRUX Gamepad (USB ID: 1a34:0802), a Xbox 360 controller clone aviable under\n; various brands (e.g. techsolo TG-30)\n[USB GAMEPAD 8116]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = axis(4-)\nB Button = button(2)\nA Button = button(0)\nC Button R = axis(3+)\nC Button L = axis(3-) button(3)\nC Button D = axis(2+) button(1)\nC Button U = axis(2-)\nR Trig = button(5) axis(4+)\nL Trig = button(4)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[XInput: Microsoft X-Box 360 pad]\n[XInput: Controller (XBOX 360 For Windows)]\n[XInput: XBOX 360 For Windows (Controller)]\n[XInput: XBOX 360 For Windows]\n[XInput: Xbox 360 Wireless Receiver]\n[XInput: XInput Controller #]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(7)\nZ Trig = axis(2+)\nB Button = button(2)\nA Button = button(0)\nC Button R = axis(3+)\nC Button L = axis(3-) button(3)\nC Button D = axis(4+) button(1)\nC Button U = axis(4-)\nR Trig = button(5) axis(5+)\nL Trig = button(4)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n;Snakebyte PS3-style USB controller\n[MY-POWER CO.,LTD. 2In1 USB Joystick]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(7)\nB Button = button(2)\nA Button = button(1)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[N64 controller]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(0)\nB Button = button(2)\nA Button = button(1)\nC Button R = button(4)\nC Button L = button(5)\nC Button D = button(3)\nC Button U = button(6)\nR Trig = button(8)\nL Trig = button(7)\nMempak switch = key(109)\nRumblepak switch = key(114)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Nintendo Wiimote Classic]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = button(23)\nDPad L = button(22)\nDPad D = button(21)\nDPad U = button(20)\nStart = button(17)\nZ Trig = button(24)\nB Button = button(14)\nA Button = button(13)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(25)\nL Trig = button(26)\nMempak switch = button(16)\nRumblepak switch = button(15)\nX Axis = axis(4-,4+)\nY Axis = axis(5-,5+)\n\n[Nintendo Wii Remote Pro Controller]\nplugged = True\nmouse = False\nAnalogDeadzone = 2000,2000\nAnalogPeak = 17000,17000\nDPad R = button(16)\nDPad L = button(15)\nDPad D = button(14)\nDPad U = button(13)\nStart = button(9)\nZ Trig = button(6)\nB Button = button(0)\nA Button = button(1)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[OUYA Game Controller]\nplugged = True\nmouse = False\nMempak switch =\nRumblepak switch =\nDPad U = button(8)\nDPad D = button(9)\nDPad L = button(10)\nDPad R = button(11)\nStart = button(7)\nZ Trig = button(12)\nA Button = button(0)\nB Button = button(1)\nC Button U = axis(4-)\nC Button D = axis(4+)\nC Button L = axis(3-)\nC Button R = axis(3+)\nL Trig = button(4)\nR Trig = button(5)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[PC Game Controller]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(8)\nB Button = button(4)\nA Button = button(5)\nC Button R = button(1)\nC Button L = button(3)\nC Button D = button(2)\nC Button U = button(0)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch = key(109)\nRumblepak switch = key(114)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; Nintendo Switch Pro Controller\n[Pro Controller]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = axis(4+)\nDPad L = axis(4-)\nDPad D = axis(5+)\nDPad U = axis(5-)\nStart = button(9)\nZ Trig = button(6)\nB Button = button(0)\nA Button = button(1)\nC Button R = axis(2-)\nC Button L = axis(2+)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(7)\nL Trig = button(4)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; Playfect PS3 controller (cheap clone of the Sony DualShock 3 controller)\n[PS3/PC WirelessGamePad]\nplugged = True\nmouse = False\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(4)\nB Button = button(3)\nA Button = button(2)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(5)\nL Trig = button(6)\nMempak switch = key(109)\nRumblepak switch = key(114)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; this is also the MayFlash / HuiJia adapter\n[PS/SS/N64 Joypad to USB BOX]\nplugged=True\nmouse=False\nAnalogDeadzone=1024,1024\nAnalogPeak=11000,11000\nDPad R=hat(0 right)\nDPad L=hat(0 left)\nDPad U=hat(0 up)\nDPad D=hat(0 down)\nStart=button(8)\nZ Trig=button(9)\nB Button=button(2)\nA Button=button(1)\nC Button R=axis(2-)\nC Button L=axis(2+)\nC Button U=axis(3-)\nC Button D=axis(3+)\nR Trig=button(7)\nL Trig=button(5)\nX Axis=axis(0-,0+)\nY Axis=axis(1-,1+)\n\n[Rock Candy Gamepad for PS3]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(7)\nB Button = button(0)\nA Button = button(2)\nC Button R = axis(3+)\nC Button L = axis(3-)\nC Button D = axis(2+)\nC Button U = axis(2-)\nR Trig = button(6)\nL Trig = button(4)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[PLAYSTATION(R)3 Controller]\n[Sony PLAYSTATION(R)3 Controller]\n[SHENGHIC 2009/0708ZXW-V1Inc. PLAYSTATION(R)3Conteroller]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = button(5)\nDPad L = button(7)\nDPad D = button(6)\nDPad U = button(4)\nStart = button(3)\nZ Trig = button(10)\nB Button = button(15)\nA Button = button(14)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(11)\nL Trig = button(8)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Sony Computer Entertainment Wireless Controller]\n[Sony Interactive Entertainment Wireless Controller]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = axis(3+)\nB Button = button(0)\nA Button = button(1)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(5+)\nC Button U = axis(5-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; Sony DS4 connected via Bluetooth advertises itself as \"Wireless Controller\"\n[Wireless Controller]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\n; L2, change to 7 for R2\nZ Trig = button(6)\nB Button = button(0)\nA Button = button(1)\nC Button R = axis(3+)\nC Button L = axis(3-)\nC Button D = axis(4+)\nC Button U = axis(4-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[SAITEK P880]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(10)\nZ Trig = button(3)\nB Button = button(0)\nA Button = button(2)\nC Button R = button(5) axis(3+)\nC Button L = button(1) axis(3-)\nC Button D = button(9) axis(2+)\nC Button U = button(4) axis(2-)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Saitek P990 Dual Analog Pad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(5)\nZ Trig = button(4)\nB Button = button(0)\nA Button = button(1)\nC Button R = button(8) axis(3+)\nC Button L = button(3) axis(3-)\nC Button D = button(2) axis(2+)\nC Button U = button(9) axis(2-)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch = button(11)\nRumblepak switch = button(10)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Saitek P2900 Wireless Pad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = axis(4+)\nDPad L = axis(4-)\nDPad D = axis(5+)\nDPad U = axis(5-)\nStart = button(6)\nZ Trig = button(7)\nB Button = button(0)\nA Button = button(1)\nC Button R = button(8) axis(3+)\nC Button L = button(3) axis(3-)\nC Button D = button(2) axis(2+)\nC Button U = button(9) axis(2-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = button(11)\nRumblepak switch = axis(10+)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Saitek PLC Cyborg Force Rumble Pad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(8)\nB Button = button(0)\nA Button = button(2)\nC Button R = button(5) axis(3+)\nC Button L = button(1) axis(3-)\nC Button D = button(3) axis(2+)\nC Button U = button(4) axis(2-)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch = button(11)\nRumblepak switch = axis(10+)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[ShanWan USB WirelessGamepad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = axis(0+)\nDPad L = axis(0-)\nDPad D = axis(1+)\nDPad U = axis(1-)\nStart = button(9)\nZ Trig = button(8)\nB Button = button(3)\nA Button = button(2)\nC Button R = button(7)\nC Button L = button(6)\nC Button D = button(1)\nC Button U = button(0)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = key(109)\nRumblepak switch = key(114)\nY Axis = axis(1-,1+)\nX Axis = axis(0-,0+)\n\n[SZMY-POWER CO.,LTD. GAMEPAD 3 TURBO]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(6)\nB Button = button(0)\nA Button = button(1)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = key(44)\nRumblepak switch = key(46)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Thrustmaster Dual Trigger 3-in-1]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(3)\nB Button = button(0)\nA Button = button(1)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(5+)\nC Button U = axis(5-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = button(6)\nRumblepak switch = button(7)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[THRUSTMASTER Firestorm Dual Power 2]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(5)\nZ Trig = button(8)\nB Button = button(1)\nA Button = button(0)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(6)\nL Trig = button(4)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Thrustmaster T Mini Wireless]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat (0 Right)\nDPad L = hat (0 Left)\nDPad D = hat (0 Down)\nDPad U = hat (0 Up)\nStart = button(9)\nZ Trig = button(5)\nB Button = button(0)\nA Button = button(1)\nC Button R = Axis = axis(2+)\nC Button L = Axis = axis(2-)\nC Button D = Axis = axis(3+)\nC Button U = Axis = axis(3-)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Twin USB Joystick]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(4)\nB Button = button(6)\nA Button = button(7)\nC Button R = button(1)\nC Button L = button(3)\nC Button D = button(2)\nC Button U = button(0)\nR Trig = button(5)\nL Trig = button(11)\nMempak switch =\nRumblepak switch =\nY Axis = axis(1-,1+)\nX Axis = axis(0-,0+)\n\n[Twin USB Vibration Gamepad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(7)\nB Button = button(0)\nA Button = button(2)\nC Button R = axis(3+)\nC Button L = axis(3-)\nC Button D = axis(2+)\nC Button U = axis(2-)\nR Trig = button(6)\nL Trig = button(4)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n;Twin USB PS-controller lookalike, branded \"POWER PAD\".\n;The controller closest to the USB-plug is Player 1.\n[Twin USB Gamepad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(4)\nB Button = button(3)\nA Button = button(2)\nC Button R = axis(3+)\nC Button L = axis(3-)\nC Button D = axis(2+)\nC Button U = axis(2-)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch =\nRumblepak switch =\nY Axis = axis(1-,1+)\nX Axis = axis(0-,0+)\n\n[Wii U GameCube Adapter Port 1]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = button(11)\nDPad L = button(10)\nDPad D = button(9)\nDPad U = button(8)\nStart = button(7)\nZ Trig = button(4)\nB Button = button(3)\nA Button = button(0)\nC Button R = axis(3+)\nC Button L = axis(3-)\nC Button D = axis(4+)\nC Button U = axis(4-)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[TigerGame XBOX+PS2+GC Game Controller Adapter]\n[WiseGroup.,Ltd TigerGame XBOX+PS2+GC Game Controller Adapter]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = button(9)\nDPad L = button(8)\nDPad D = button(10)\nDPad U = button(11)\nStart = button(7)\nZ Trig = button(6)\nB Button = button(1)\nA Button = button(0)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = axis(4+)\nL Trig = axis(5+)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Wish Technologies Adaptoid]\n[Adaptoid]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = button(13)\nDPad L = button(12)\nDPad D = button(11)\nDPad U = button(10)\nStart = button(8)\nZ Trig = button(9)\nB Button = button(3)\nA Button = button(0)\nC Button R = button(2)\nC Button L = button(4)\nC Button D = button(1)\nC Button U = button(5)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; X-box controllers and compatible clones\n[Microsoft X-Box pad v1 (US)]\n[Microsoft X-Box pad v2 (US)]\n[Microsoft X-Box pad (Japan)]\n[Microsoft Xbox Controller S]\n[Thrustmaster, Inc. Controller]\n[Logitech Xbox Cordless Controller]\n[Logitech Compact Controller for Xbox]\n[Mad Catz Controller (unverified)]\n[InterAct 'PowerPad Pro' X-Box pad (Germany)]\n[Mad Catz Control Pad]\n[Mad Catz LumiCON]\n[Mad Catz Control Pad Pro]\n[Mad Catz MicroCON]\n[Mad Catz Lynx Wireless Controller]\n[Zeroplus Xbox Controller]\n[Pelican Eclipse PL-2023]\n[Zeroplus Xbox Controller]\n[Radica Gamester Controller]\n[Radica Games Jtech Controller]\n[Logic3 Freebird wireless Controller]\n[Eclipse wireless Controller]\n[Edge wireless Controller]\n[SmartJoy Frag Xpad/PS2 adaptor]\n[Joytech Advanced Controller]\n[BigBen XBMiniPad Controller]\n[Joytech Wireless Advanced Controller]\n[Chinese-made Xbox Controller]\n[Generic X-Box pad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(7)\nZ Trig = axis(2+)\nB Button = button(2)\nA Button = button(0)\nC Button R = axis(3+)\nC Button L = axis(3-) button(3)\nC Button D = axis(4+) button(1)\nC Button U = axis(4-)\nR Trig = button(5) axis(5+)\nL Trig = button(4)\nMempak switch = button(9)\nRumblepak switch = button(10)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[OSX: USB GamePad]\n; this is a 2-port USB device.  The Right port is controller #1, the Left port is #2\n; this is the \"MayFlash\" adapter, aka HuiJia.  The OSX driver seems to have a\n; different button mapping\nplugged = True\nmouse = False\nAnalogDeadzone = 2500,2500\nAnalogPeak = 20000,20000\nDPad R = button(13)\nDPad L = button(15)\nDPad D = button(14)\nDPad U = button(12)\nStart = button(9)\nZ Trig = button(8)\nB Button = button(2)\nA Button = button(1)\nC Button R = axis(1-)\nC Button L = axis(1+)\nC Button D = axis(0+)\nC Button U = axis(0-)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch = key(109)\nRumblepak switch = key(114)\nX Axis = axis(2-,2+)\nY Axis = axis(3-,3+)\n__NextController:\nplugged = True\nmouse = False\nAnalogDeadzone = 2500,2500\nAnalogPeak = 20000,20000\nDPad R = button(29)\nDPad L = button(31)\nDPad D = button(30)\nDPad U = button(28)\nStart = button(25)\nZ Trig = button(24)\nB Button = button(18)\nA Button = button(17)\nC Button R = axis(5-)\nC Button L = axis(5+)\nC Button D = axis(4+)\nC Button U = axis(4-)\nR Trig = button(23)\nL Trig = button(22)\nMempak switch = key(109)\nRumblepak switch = key(114)\nX Axis = axis(6-,6+)\nY Axis = axis(7-,7+)\n\n[Linux: HuiJia USB GamePad]\nplugged = True\nmouse = False\nAnalogDeadzone = 100,100\nAnalogPeak = 20000,20000\nDPad R = button(13)\nDPad L = button(15)\nDPad D = button(14)\nDPad U = button(12)\nStart = button(8)\nZ Trig = button(9)\nB Button = button(2)\nA Button = button(1)\nC Button R = axis(3-)\nC Button L = axis(3+)\nC Button D = axis(2+)\nC Button U = axis(2-)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch = key(109)\nRumblepak switch = key(114)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; Mayflash N64 Controller Adapter (for PC USB) - With two N64 gamepads connected\n; this is a 2-port USB device. The Right port is controller #1, the Left port is #2\n[Win32: USB GamePad]\nplugged = True\nmouse = False\nAnalogDeadzone = 1024,1024\nAnalogPeak = 12288,12288\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(8)\nZ Trig = button(9)\nB Button = button(2)\nA Button = button(1)\nC Button R = axis(3-)\nC Button L = axis(3+)\nC Button D = axis(2+)\nC Button U = axis(2-)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch = key(109)\nRumblepak switch = key(114)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; MayFlash PC048 adapter\n[PS/SS/N64 Joypad to USB BOX]\nplugged = True\nmouse = False\nAnalogDeadzone = 1024,1024\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(8)\nZ Trig = button(9)\nB Button = button(2)\nA Button = button(1)\nC Button R = axis(2-)\nC Button L = axis(2+)\nC Button D = axis(3+)\nC Button U = axis(3-)\nR Trig = button(7)\nL Trig = button(5)\nMempak switch =\nRumblepak switch =\nY Axis = axis(1-,1+)\nX Axis = axis(0-,0+)\n\n; Asikgame - Super Dual Box (with two PS2 gamepads connected)\n; this is a 2-port USB device. The Right port is controller #1, the Left port is #2\n[USB Human(2p) Interface Device]\nplugged = True\nmouse = False\nDPad R= axis(2+)\nDPad L= axis(2-)\nDPad D= axis(5+)\nDPad U= axis(5-)\nStart= button(0)\nZ Trig= button(1)\nB Button= button(3)\nA Button= button(2)\nC Button R= hat(0 Right)\nC Button L= hat(0 Left)\nC Button D= hat(0 Down)\nC Button U= hat(0 Up)\nR Trig= button(5)\nL Trig= button(4)\nMempak switch= button(9)\nRumblepak switch= button(8)\nY Axis= axis(1-,1+)\nX Axis= axis(0-,0+)\n__NextController:\nplugged = True\nmouse = False\nDPad R= axis(6+)\nDPad L= axis(6-)\nDPad D= axis(7+)\nDPad U= axis(7-)\nStart= button(12)\nZ Trig= button(13)\nB Button= button(15)\nA Button= button(14)\nC Button R= hat(1 Right)\nC Button L= hat(1 Left)\nC Button D= hat(1 Down)\nC Button U= hat(1 Up)\nR Trig= button(17)\nL Trig= button(16)\nMempak switch= button(21)\nRumblepak switch= button(20)\nY Axis= axis(4-,4+)\nX Axis= axis(3-,3+)\n\n[Microsoft SideWinder Game Pad Pro USB version 1.0]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = key(275)\nDPad L = key(276)\nDPad D = key(274)\nDPad U = key(273)\nStart = button(8)\nZ Trig = button(6)\nB Button = button(0)\nA Button = button(3)\nC Button R = button(2)\nC Button L = button(4)\nC Button D = button(1)\nC Button U = button(5)\nR Trig = button(7)\nL Trig = button(6)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[USB,2-axis 8-button gamepad]\n[USB Gamepad ]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = axis(0+)\nDPad L = axis(0-)\nDPad D = axis(1+)\nDPad U = axis(1-)\nStart = button(7)\nZ Trig = button(6)\nB Button = button(1)\nA Button = button(0)\nC Button R = button(2)\nC Button L = button(3)\nC Button D = button(99)\nC Button U = button(99)\nR Trig = button(4)\nL Trig = button(5)\nMempak switch = key(109)\nRumblepak switch = key(114)\nY Axis = axis(1-,1+)\nX Axis = axis(0-,0+)\n\n; RetroUSB \"USB N64 RetroPort\"\n[N64 ]\nplugged = True\nmouse = False\nAnalogDeadzone = 2048,2048\nAnalogPeak = 18432,18432\nDPad R = button(0)\nDPad L = button(1)\nDPad D = button(2)\nDPad U = button(3)\nStart = button(4)\nZ Trig = button(5)\nB Button = button(6)\nA Button = button(7)\nC Button R = button(8)\nC Button L = button(9)\nC Button D = button(10)\nC Button U = button(11)\nR Trig = button(12)\nL Trig = button(13)\nMempak switch = \nRumblepak switch = \nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[Jess Tech GGE909 PC Recoil Pad]\nplugged = True\nmouse = False\nAnalogDeadzone = 4096,4096\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(9)\nZ Trig = button(7)\nB Button = button(0)\nA Button = button(2)\nC Button R = axis(3+)\nC Button L = axis(3-)\nC Button D = axis(2+)\nC Button U = axis(2-)\nR Trig = button(6)\nL Trig = button(4)\nMempak switch = button(10)\nRumblepak switch = button(11)\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n[8BITDO NES30]\nplugged = True\nmouse = False\nDPad R = key(3)\nDPad L = key(2)\nDPad D = key(5)\nDPad U = key(0)\nStart = key(22)\nZ Trig = key(21)\nB Button = key(12)\nA Button = key(11)\nC Button R = key(3)\nC Button L = key(2)\nC Button D = key(5)\nC Button U = key(0)\nR Trig = key(99)\nL Trig = key(120)\nMempak switch = key(44)\nRumblepak switch = key(46)\nX Axis = key(276,275)\nY Axis = key(273,274)\n\n; Xiaomi Bluetooth Controller\n[小米蓝牙手柄]\nplugged = True\nmouse = False\nAnalogDeadzone = 0,0\nAnalogPeak = 32768,32768\nDPad R = axis(8+)\nDPad L = axis(8-)\nDPad D = axis(9+)\nDPad U = axis(9-)\nStart = button(11)\nZ Trig = button(6)\nB Button = button(3)\nA Button = button(0)\nC Button R = axis(2+)\nC Button L = axis(2-)\nC Button D = axis(5+)\nC Button U = axis(5-)\nR Trig = button(7)\nL Trig = button(8)\nMempak switch =\nRumblepak switch =\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; ODROID Go Advance Gamepad\n[odroidgo2_joypad]\nplugged = True\nmouse = False\nAnalogDeadzone = 0,0\nAnalogPeak = 32768,32768\nDPad R = button(11)\nDPad L = button(10)\nDPad D = button(9)\nDPad U = button(8)\nStart = button(17)\nZ Trig = button(12)\nB Button = button(3)\nA Button = button(0)\nC Button R = button(15)\nC Button L = button(2)\nC Button D = button(1)\nC Button U = button(14)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = \nRumblepak switch = \n# Analog axis configuration mappings\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)\n\n; RG351P Gamepad\n[OpenSimHardware OSH PB Controller]\nplugged = True\nmouse = False\nAnalogDeadzone = 0,0\nAnalogPeak = 32768,32768\nDPad R = hat(0 Right)\nDPad L = hat(0 Left)\nDPad D = hat(0 Down)\nDPad U = hat(0 Up)\nStart = button(6)\nZ Trig = button(9)\nB Button = button(3)\nA Button = button(1)\nC Button R = button(11)\nC Button L = button(2)\nC Button D = button(0)\nC Button U = button(10)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = \nRumblepak switch = \n# Analog axis configuration mappings\nX Axis = axis(0+,0-)\nY Axis = axis(1+,1-)\n\n; RG351MP Gamepad\n[GO-Super Gamepad]\nplugged = True\nmouse = False\nAnalogDeadzone = 0,0\nAnalogPeak = 32768,32768\nDPad R = button(11)\nDPad L = button(10)\nDPad D = button(9)\nDPad U = button(8)\nStart = button(13)\nZ Trig = button(15)\nB Button = button(3)\nA Button = button(0)\nC Button R = button(7)\nC Button L = button(2)\nC Button D = button(1)\nC Button U = button(6)\nR Trig = button(5)\nL Trig = button(4)\nMempak switch = \nRumblepak switch = \n# Analog axis configuration mappings\nX Axis = axis(0-,0+)\nY Axis = axis(1-,1+)"
  },
  {
    "path": "packages/sx05re/emulators/mupen64plussa/mupen64plussa-input-sdl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"mupen64plussa-input-sdl\"\nPKG_VERSION=\"5e20c6f87b73a07c92148cc4d11f9dfb3b0b0f15\"\nPKG_SHA256=\"113558329487f8fba6c6fe361a1ff5863d0e3088c26dde6f1a4eb6c599762917\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/mupen64plus/mupen64plus-input-sdl\"\nPKG_URL=\"https://github.com/mupen64plus/mupen64plus-input-sdl/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES} libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core\"\nPKG_SHORTDESC=\"mupen64plus-input-sdl\"\nPKG_LONGDESC=\"Mupen64Plus Standalone Input SDL\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_MAKE_OPTS_TARGET+=\"USE_GLES=1\"\n\nmake_target() {\n  export HOST_CPU=aarch64\n  export APIDIR=$(get_install_dir mupen64plussa-core)/usr/local/include/mupen64plus\n  export USE_GLES=1\n  export SDL_CFLAGS=\"-I${SYSROOT_PREFIX}/usr/include/SDL2 -D_REENTRANT\"\n  export SDL_LDLIBS=\"-lSDL2_net -lSDL2\"\n  export CROSS_COMPILE=\"${TARGET_PREFIX}\"\n  export V=1\n  export VC=0\n  BINUTILS=\"$(get_build_dir binutils)/.${TARGET_NAME}\"\n  make -C projects/unix clean\n  make -C projects/unix all ${PKG_MAKE_OPTS_TARGET}\n}\n\nmakeinstall_target() {\n  UPREFIX=${INSTALL}/usr/local\n  ULIBDIR=${UPREFIX}/lib\n  USHAREDIR=${UPREFIX}/share/mupen64plus\n  UPLUGINDIR=${ULIBDIR}/mupen64plus\n  mkdir -p ${UPLUGINDIR}\n  cp ${PKG_BUILD}/projects/unix/mupen64plus-input-sdl.so ${UPLUGINDIR}\n  #${STRIP} ${UPLUGINDIR}/mupen64plus-input-sdl.so\n  chmod 0644 ${UPLUGINDIR}/mupen64plus-input-sdl.so\n  mkdir -p ${USHAREDIR}\n  cp ${PKG_DIR}/config/InputAutoCfg.ini ${USHAREDIR}\n  chmod 644 ${USHAREDIR}/InputAutoCfg.ini\n}\n\n"
  },
  {
    "path": "packages/sx05re/emulators/mupen64plussa/mupen64plussa-rsp-hle/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"mupen64plussa-rsp-hle\"\nPKG_VERSION=\"88093cb43499eff53d343653cddcae2132af17ef\"\nPKG_SHA256=\"ca2f2c583b73f37d4c1e02a0b4e665275126e6e4cfda2e367087e879f0fd73e2\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/mupen64plus/mupen64plus-rsp-hle\"\nPKG_URL=\"https://github.com/mupen64plus/mupen64plus-rsp-hle/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES} libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core\"\nPKG_SHORTDESC=\"mupen64plus-rsp-hle\"\nPKG_LONGDESC=\"Mupen64Plus Standalone RSP HLE\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_MAKE_OPTS_TARGET+=\"USE_GLES=1\"\n\nmake_target() {\n  export HOST_CPU=aarch64\n  export APIDIR=$(get_install_dir mupen64plussa-core)/usr/local/include/mupen64plus\n  export USE_GLES=1\n  export SDL_CFLAGS=\"-I${SYSROOT_PREFIX}/usr/include/SDL2 -D_REENTRANT\"\n  export SDL_LDLIBS=\"-lSDL2_net -lSDL2\"\n  export CROSS_COMPILE=\"${TARGET_PREFIX}\"\n  export V=1\n  export VC=0\n  BINUTILS=\"$(get_build_dir binutils)/.${TARGET_NAME}\"\n  make -C projects/unix clean\n  make -C projects/unix all ${PKG_MAKE_OPTS_TARGET}\n}\n\nmakeinstall_target() {\n  UPREFIX=${INSTALL}/usr/local\n  ULIBDIR=${UPREFIX}/lib\n  UPLUGINDIR=${ULIBDIR}/mupen64plus\n  mkdir -p ${UPLUGINDIR}\n  cp ${PKG_BUILD}/projects/unix/mupen64plus-rsp-hle.so ${UPLUGINDIR}\n  #${STRIP} ${UPLUGINDIR}/mupen64plus-rsp-hle.so\n  chmod 0644 ${UPLUGINDIR}/mupen64plus-rsp-hle.so\n}\n\n"
  },
  {
    "path": "packages/sx05re/emulators/mupen64plussa/mupen64plussa-ui-console/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"mupen64plussa-ui-console\"\nPKG_VERSION=\"32e27344214946f0dce3cd2b4fff152a3538bd8f\"\nPKG_SHA256=\"7d4a0a71545caec19d007f34038cffaee36b75d27de615cd4e175bb5ab2e227d\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/mupen64plus/mupen64plus-ui-console\"\nPKG_URL=\"https://github.com/mupen64plus/mupen64plus-ui-console/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES} libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core\"\nPKG_SHORTDESC=\"mupen64plus-ui-console\"\nPKG_LONGDESC=\"Mupen64Plus Standalone Console\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_MAKE_OPTS_TARGET+=\"USE_GLES=1\"\n\nmake_target() {\n  export HOST_CPU=aarch64\n  export APIDIR=$(get_install_dir mupen64plussa-core)/usr/local/include/mupen64plus\n  export USE_GLES=1\n  export SDL_CFLAGS=\"-I${SYSROOT_PREFIX}/usr/include/SDL2 -D_REENTRANT\"\n  export SDL_LDLIBS=\"-lSDL2_net -lSDL2\"\n  export CROSS_COMPILE=\"${TARGET_PREFIX}\"\n  export V=1\n  export VC=0\n  BINUTILS=\"$(get_build_dir binutils)/.${TARGET_NAME}\"\n  make -C projects/unix clean\n  make -C projects/unix all ${PKG_MAKE_OPTS_TARGET}\n}\n\nmakeinstall_target() {\n  UPREFIX=${INSTALL}/usr/local\n  ULIBDIR=${UPREFIX}/lib\n  UBINDIR=${INSTALL}/usr/bin\n  UMANDIR=${UPREFIX}/share/man\n  UAPPSDIR=${UPREFIX}/share/applications\n  UICONSDIR=${UPREFIX}/share/icons/hicolor\n  mkdir -p ${UBINDIR}\n  cp ${PKG_BUILD}/projects/unix/mupen64plus ${UBINDIR}\n  #${STRIP} ${UBINDIR}/mupen64plus\n  chmod 0755 ${UBINDIR}/mupen64plus\n  mkdir -p ${UMANDIR}/man6\n  cp ${PKG_BUILD}/doc/mupen64plus.6 ${UMANDIR}/man6\n  chmod 0644 ${UMANDIR}/man6/mupen64plus.6\n  mkdir -p ${UAPPSDIR}\n  cp ${PKG_BUILD}/data/mupen64plus.desktop ${UAPPSDIR}\n  chmod 0644 ${UAPPSDIR}/mupen64plus.desktop\n  mkdir -p ${UICONSDIR}/48x48/apps\n  cp ${PKG_BUILD}/data/icons/48x48/apps/mupen64plus.png ${UICONSDIR}/48x48/apps\n  chmod 0644 ${UICONSDIR}/48x48/apps/mupen64plus.png\n  mkdir -p ${UICONSDIR}/scalable/apps\n  cp ${PKG_BUILD}/data/icons/scalable/apps/mupen64plus.svg ${UICONSDIR}/scalable/apps\n  chmod 0644 ${UICONSDIR}/scalable/apps/mupen64plus.svg\n}\n\n"
  },
  {
    "path": "packages/sx05re/emulators/mupen64plussa/mupen64plussa-video-glide64mk2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"mupen64plussa-video-glide64mk2\"\nPKG_VERSION=\"5ac60b38e2c9d9dea3c21fd341b03799841b0b5f\"\nPKG_SHA256=\"715a4d92f38672225ccf670edbec974816870d061e5ccdf4bc70a49cdccde8d2\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/mupen64plus/mupen64plus-video-glide64mk2\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES} boost libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core\"\nPKG_SHORTDESC=\"mupen64plus-video-glide64mk2\"\nPKG_LONGDESC=\"Mupen64Plus Standalone Glide64 Video Driver\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_MAKE_OPTS_TARGET+=\"USE_GLES=1\"\n\nmake_target() {\n  export HOST_CPU=aarch64\n  export APIDIR=$(get_install_dir mupen64plussa-core)/usr/local/include/mupen64plus\n  export USE_GLES=1\n  export SDL_CFLAGS=\"-I${SYSROOT_PREFIX}/usr/include/SDL2 -D_REENTRANT\"\n  export SDL_LDLIBS=\"-lSDL2_net -lSDL2\"\n  export CROSS_COMPILE=\"${TARGET_PREFIX}\"\n  export V=1\n  export VC=0\n  BINUTILS=\"$(get_build_dir binutils)/.${TARGET_NAME}\"\n  make -C projects/unix clean\n  make -C projects/unix all ${PKG_MAKE_OPTS_TARGET}\n}\n\nmakeinstall_target() {\n  UPREFIX=${INSTALL}/usr/local\n  ULIBDIR=${UPREFIX}/lib\n  USHAREDIR=${UPREFIX}/share/mupen64plus\n  UPLUGINDIR=${ULIBDIR}/mupen64plus\n  mkdir -p ${UPLUGINDIR}\n  cp ${PKG_BUILD}/projects/unix/mupen64plus-video-glide64mk2.so ${UPLUGINDIR}\n  #${STRIP} ${UPLUGINDIR}/mupen64plus-video-glide64mk2.so\n  chmod 0644 ${UPLUGINDIR}/mupen64plus-video-glide64mk2.so\n  mkdir -p ${USHAREDIR}\n  cp ${PKG_BUILD}/data/Glide64mk2.ini ${USHAREDIR}\n  chmod 0644 ${USHAREDIR}/Glide64mk2.ini\n}\n\n"
  },
  {
    "path": "packages/sx05re/emulators/mupen64plussa/mupen64plussa-video-rice/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"mupen64plussa-video-rice\"\nPKG_VERSION=\"3da7d800989717111da5992a50a8ac410cac038f\"\nPKG_SHA256=\"4a7d1ac05a0dc82f071afdef747b4a7876140e580e2d6c8b5306865cfb069c43\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/mupen64plus/mupen64plus-video-rice\"\nPKG_URL=\"https://github.com/mupen64plus/mupen64plus-video-rice/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES} libpng SDL2 SDL2_net zlib freetype nasm:host mupen64plussa-core\"\nPKG_SHORTDESC=\"mupen64plus-video-rice\"\nPKG_LONGDESC=\"Mupen64Plus Standalone Rice Video Driver\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_MAKE_OPTS_TARGET+=\"USE_GLES=1\"\n\nmake_target() {\n  export HOST_CPU=aarch64\n  export APIDIR=$(get_install_dir mupen64plussa-core)/usr/local/include/mupen64plus\n  export USE_GLES=1\n  export SDL_CFLAGS=\"-I${SYSROOT_PREFIX}/usr/include/SDL2 -D_REENTRANT\"\n  export SDL_LDLIBS=\"-lSDL2_net -lSDL2\"\n  export CROSS_COMPILE=\"${TARGET_PREFIX}\"\n  export V=1\n  export VC=0\n  BINUTILS=\"$(get_build_dir binutils)/.${TARGET_NAME}\"\n  make -C projects/unix clean\n  make -C projects/unix all ${PKG_MAKE_OPTS_TARGET}\n}\n\nmakeinstall_target() {\n  UPREFIX=${INSTALL}/usr/local\n  ULIBDIR=${UPREFIX}/lib\n  USHAREDIR=${UPREFIX}/share/mupen64plus\n  UPLUGINDIR=${ULIBDIR}/mupen64plus\n  mkdir -p ${UPLUGINDIR}\n  cp ${PKG_BUILD}/projects/unix/mupen64plus-video-rice.so ${UPLUGINDIR}\n  #${STRIP} ${UPLUGINDIR}/mupen64plus-video-rice.so\n  chmod 0644 ${UPLUGINDIR}/mupen64plus-video-rice.so\n  mkdir -p ${USHAREDIR}\n  cp ${PKG_BUILD}/data/RiceVideoLinux.ini ${USHAREDIR}\n  chmod 0644 ${USHAREDIR}/RiceVideoLinux.ini\n}\n\n"
  },
  {
    "path": "packages/sx05re/emulators/mupen64plussa/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mupen64plussa\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://mupen64plus.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain mupen64plussa-core mupen64plussa-ui-console mupen64plussa-audio-sdl mupen64plussa-input-sdl mupen64plussa-rsp-hle mupen64plussa-video-rice mupen64plussa-video-glide64mk2\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"Meta package for installing the different Mupen64Plus standalone modules\"\n"
  },
  {
    "path": "packages/sx05re/emulators/openbor/config/gptokeyb/openbor.gptk",
    "content": "back = esc\nstart = enter\nguide = enter\na = d\nb = a\nx = s\ny = f\nl1 = z\nl2 = home\nl3 = mouse_right\nr1 = x\nr2 = end\nr3 = shift\nup = up\ndown = down\nleft = left\nright = right\nright_analog_up = mouse_movement_up\nright_analog_down = mouse_movement_down\nright_analog_left = mouse_movement_left\nright_analog_right = mouse_movement_right\nleft_analog_up = up\nleft_analog_down = down\nleft_analog_left = left\nleft_analog_right = right\ndeadzone_y = 2100\ndeadzone_x = 1900\ndeadzone_triggers = 3000\nmouse_scale = 512\nmouse_delay = 16\n"
  },
  {
    "path": "packages/sx05re/emulators/openbor/openborff/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"openborff\"\nPKG_VERSION=\"3c14ffc37c984a5aebc7a3fb6133b47484d43bd2\"\nPKG_SHA256=\"275ba0593027053cfd9df0586868e1471b71153858dc0b42429938db07eba74c\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/gonzalomvp/openbor\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 libogg libvorbisidec libvpx libpng\"\nPKG_SHORTDESC=\"OpenBOR is the ultimate 2D side scrolling engine for beat em' ups, shooters, and more! \"\nPKG_LONGDESC=\"OpenBOR is the ultimate 2D side scrolling engine for beat em' ups, shooters, and more! \"\nPKG_TOOLCHAIN=\"make\"\n\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\nPKG_PATCH_DIRS=\"OdroidGoAdvance\"\nfi\n\n\nif [[ \"${ARCH}\" == \"arm\" ]]; then\n\tPKG_PATCH_DIRS=\"${ARCH}\"\nelse\n\tPKG_PATCH_DIRS=\"emuelec-aarch64\"\nfi\n\npre_configure_target() {\n  PKG_MAKE_OPTS_TARGET=\"BUILD_LINUX_${ARCH}=1 \\\n                        -C ${PKG_BUILD}/engine \\\n                        SDKPATH=\\\"${SYSROOT_PREFIX}\\\" \\\n                        PREFIX=${TARGET_NAME}\"\n}\n\npre_make_target() {\ncd ${PKG_BUILD}/engine\n./version.sh\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp `find . -name \"OpenBOR.elf\" | xargs echo` ${INSTALL}/usr/bin/OpenBORff\n    chmod +x ${INSTALL}/usr/bin/*\n    mkdir -p ${INSTALL}/usr/config/emuelec/configs/openbor\n\tcp ${PKG_DIR}/config/master.cfg ${INSTALL}/usr/config/emuelec/configs/openbor/masterff.cfg\n   } \n"
  },
  {
    "path": "packages/sx05re/emulators/openbor/openborff/patches/emuelec-aarch64/openborff-01-addplatform_fixes.patch",
    "content": "From 5d057e7b6b350e2faa75c041d0081fb2963e980d Mon Sep 17 00:00:00 2001\nFrom: 5schatten <supervisedthinking@gmail.com>\nDate: Sat, 12 Oct 2019 19:24:14 +0200\nSubject: [PATCH] engine/Makefile: updated platform\n\n---\n engine/Makefile | 48 +++++++++++++++++++++++++++++++++++++++++++++++-\n 1 file changed, 47 insertions(+), 1 deletion(-)\n\ndiff --git a/engine/Makefile b/engine/Makefile\nindex 8b0f9a65..6e8198e0 100644\n--- a/engine/Makefile\n+++ b/engine/Makefile\n@@ -95,6 +95,31 @@\n BUILD_DEBUG     = 1\n endif\n endif\n+\n+ifdef BUILD_LINUX_aarch64\n+TARGET \t        = $(VERSION_NAME).elf\n+TARGET_FINAL    = $(VERSION_NAME)\n+TARGET_PLATFORM = LINUX\n+BUILD_LINUX     = 1\n+BUILD_SDL       = 1\n+BUILD_GFX       = 1\n+BUILD_PTHREAD   = 1\n+BUILD_SDL_IO    = 1\n+BUILD_VORBIS    = 1\n+BUILD_WEBM      = 1\n+BUILDING        = 1\n+INCLUDES        = $(SDKPATH)/usr/include \\\n+                  $(SDKPATH)/usr/include/SDL2\n+OBJTYPE         = elf\n+LIBRARIES       = $(SDKPATH)/usr/lib\n+# Workaround for GCC 9\n+CFLAGS          += -Wno-error=address -Wno-error=format-overflow -Wno-error=stringop-truncation -Wno-error=implicit-function-declaration -Wno-error=unused-variable -Wno-error=unused-label\n+\n+ifeq ($(BUILD_LINUX_aarch64), 0)\n+BUILD_DEBUG     = 1\n+endif\n+endif\n+\n \n ifdef BUILD_DARWIN\n TARGET          = $(VERSION_NAME).elf\n@@ -208,7 +233,7 @@\n STRIP \t        = strip$(EXTENSION) $(TARGET) -o $(TARGET_FINAL)\n endif\n ifdef BUILD_LINUX\n-STRIP \t        = strip $(TARGET) -o $(TARGET_FINAL)\n+STRIP \t        = cp $(TARGET) $(TARGET_FINAL)\n endif\n ifdef BUILD_DARWIN\n STRIP           = $(PREFIX)strip $(TARGET) -o $(TARGET_FINAL)\n\n--- a/engine/openbor.h\n+++ b/engine/openbor.h\n@@ -1902,7 +1902,7 @@\n     struct animlist *next;\n };\n typedef struct animlist s_anim_list;\n-s_anim_list *anim_list;\n+extern s_anim_list *anim_list;\n \n typedef struct\n {\n@@ -2248,7 +2248,7 @@\n     int clearcount;\n     int selectcol;\n } s_modelcache;\n-s_modelcache *model_cache;\n+extern s_modelcache *model_cache;\n \n // Caskey, Damon V.\n // 2013-12-08\n--- a/engine/openbor.c\n+++ b/engine/openbor.c\n@@ -45,6 +45,9 @@\n //when there are more entities than this, those with lower priority will be erased\n int spawnoverride = 999999;\n int maxentities = 999999;\n+\n+s_modelcache *model_cache;\n+s_anim_list *anim_list;\n \n int\tglobal_model = -1;\n #define global_model_scripts ((global_model>=0 && model_cache[global_model].model)?model_cache[global_model].model->scripts:NULL)\n@@ -2424,7 +2427,7 @@\n     savedata.logo = 0;\n     savedata.uselog = 1;\n     savedata.debuginfo = 0;\n-    savedata.fullscreen = 0;\n+    savedata.fullscreen = 1;\n     #ifdef RASPBERRY\n     savedata.fullscreen = 1;\n     #endif\n"
  },
  {
    "path": "packages/sx05re/emulators/openbor/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"openbor\"\n#PKG_VERSION=\"18.1.2024 / 08d79c23dc29f6e788d41aa76d828ee553344337\"\nPKG_VERSION=\"f71c4fd95f9bbf101a758a3e82832f31be00d1cf\"\n#PKG_SHA256=\"5857160fa876556cd744bcd03eadc99e00acab64\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/DCurrent/openbor\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 libogg libvorbisidec libvpx libpng openborff\"\nPKG_SHORTDESC=\"OpenBOR is the ultimate 2D side scrolling engine for beat em' ups, shooters, and more! \"\nPKG_LONGDESC=\"OpenBOR is the ultimate 2D side scrolling engine for beat em' ups, shooters, and more! \"\nPKG_TOOLCHAIN=\"make\"\n\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\nPKG_PATCH_DIRS=\"OdroidGoAdvance\"\nfi\n\n\nif [[ \"${ARCH}\" == \"arm\" ]]; then\n\tPKG_PATCH_DIRS=\"${ARCH}\"\nelse\n\tPKG_PATCH_DIRS=\"emuelec-aarch64\"\nfi\n\n\npre_configure_target() {\n  PKG_MAKE_OPTS_TARGET=\"BUILD_LINUX_${ARCH}=1 \\\n                        -C ${PKG_BUILD}/engine \\\n                        SDKPATH=\"${SYSROOT_PREFIX}\"\n                        PREFIX=${TARGET_NAME}\"\n}\n\npre_make_target() {\ncd ${PKG_BUILD}/engine\nchmod +x ./version.sh\n./version.sh\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp `find . -name \"OpenBOR.elf\" | xargs echo` ${INSTALL}/usr/bin/OpenBOR\n    cp ${PKG_DIR}/scripts/*.sh ${INSTALL}/usr/bin\n    chmod +x ${INSTALL}/usr/bin/*\n\n    mkdir -p ${INSTALL}/usr/config/emuelec/configs/openbor\n\t\tcp ${PKG_DIR}/config/master.cfg ${INSTALL}/usr/config/emuelec/configs/openbor/master.cfg\n\n\t\tmkdir -p ${INSTALL}/usr/config/emuelec/configs/gptokeyb\n\t\tcp -rf ${PKG_DIR}/config/gptokeyb/* ${INSTALL}/usr/config/emuelec/configs/gptokeyb\n   } \n"
  },
  {
    "path": "packages/sx05re/emulators/openbor/patches/002openbor-defaultfs.patch",
    "content": "--- a/engine/openbor.c\n+++ b/engine/openbor.c\n@@ -2639,7 +2639,7 @@\n     savedata.logo = 1;\n     savedata.uselog = 1;\n     savedata.debuginfo = 0;\n-    savedata.fullscreen = 0;\n+    savedata.fullscreen = 1;\n     savedata.fpslimit = 1; // default to vsync\n \n \t#if WII\n"
  },
  {
    "path": "packages/sx05re/emulators/openbor/patches/007-version.patch",
    "content": "diff --git a/engine/version.sh b/engine/version.sh\nindex 44bb1a6..f38197f 100755\n--- a/engine/version.sh\n+++ b/engine/version.sh\n@@ -32,8 +32,8 @@\n     # get commit hash, 7 chars in length is enough, and still work when supply as URL on github.com\n     VERSION_COMMIT=`git rev-parse HEAD | cut -c -7`\n   else # manually add build number if missing\n-\techo \"Missing version build, please add it manually and press ENTER: \"; read -r VERSION_BUILD\n-\techo \"Missing version commit, please add it manually and press ENTER: \"; read -r VERSION_COMMIT\n+\tVERSION_BUILD=openbor\n+\tVERSION_COMMIT=openbor\n   if [ -z $VERSION_BUILD ]; then VERSION_BUILD=0; fi\n   if [ -z $VERSION_COMMIT ]; then VERSION_COMMIT=\"0000000\"; fi\n \techo \"VERSION_BUILD is set to: $VERSION_BUILD\"\n"
  },
  {
    "path": "packages/sx05re/emulators/openbor/patches/arm/openbor-02-addplatform.patch",
    "content": "From 5d057e7b6b350e2faa75c041d0081fb2963e980d Mon Sep 17 00:00:00 2001\nFrom: 5schatten <supervisedthinking@gmail.com>\nDate: Sat, 12 Oct 2019 19:24:14 +0200\nSubject: [PATCH] engine/Makefile: updated platform\n\n---\n engine/Makefile | 48 +++++++++++++++++++++++++++++++++++++++++++++++-\n 1 file changed, 47 insertions(+), 1 deletion(-)\n\ndiff --git a/engine/Makefile b/engine/Makefile\nindex 8b0f9a65..6e8198e0 100644\n--- a/engine/Makefile\n+++ b/engine/Makefile\n@@ -103,6 +103,52 @@ BUILD_DEBUG     = 1\n endif\n endif\n \n+ifdef BUILD_LINUX_x86_64\n+TARGET \t        = $(VERSION_NAME).elf\n+TARGET_FINAL    = $(VERSION_NAME)\n+TARGET_PLATFORM = LINUX\n+BUILD_SDL       = 1\n+BUILD_GFX       = 1\n+BUILD_PTHREAD   = 1\n+BUILD_SDL_IO    = 1\n+BUILD_OPENGL    = 1\n+BUILD_LOADGL    = 1\n+BUILD_VORBIS    = 1\n+BUILD_WEBM      = 1\n+BUILDING        = 1\n+YASM \t          = nasm\n+OBJTYPE         = elf\n+INCLUDES        = $(SDKPATH)/usr/include \\\n+                  $(SDKPATH)/usr/include/SDL2\n+TARGET_ARCH     = amd64\n+BUILD_AMD64     = 1\n+ARCHFLAGS       = -m64\n+LIBRARIES       = $(SDKPATH)/usr/lib\n+CFLAGS          += -DAMD64\n+# Workaround for GCC 9\n+CFLAGS          += -Wno-error=format-overflow -Wno-error=stringop-truncation\n+endif\n+\n+ifdef BUILD_LINUX_arm\n+TARGET \t        = $(VERSION_NAME).elf\n+TARGET_FINAL    = $(VERSION_NAME)\n+TARGET_PLATFORM = LINUX\n+BUILD_LINUX     = 1\n+BUILD_SDL       = 1\n+BUILD_GFX       = 1\n+BUILD_PTHREAD   = 1\n+BUILD_SDL_IO    = 1\n+BUILD_VORBIS    = 1\n+BUILD_WEBM      = 1\n+BUILDING        = 1\n+INCLUDES        = $(SDKPATH)/usr/include \\\n+                  $(SDKPATH)/usr/include/SDL2\n+OBJTYPE         = elf\n+LIBRARIES       = $(SDKPATH)/usr/lib\n+# Workaround for GCC 9\n+CFLAGS          += -Wno-error=format-overflow -Wno-error=stringop-truncation -Wno-error=implicit-function-declaration -Wno-error=unused-variable -Wno-error=unused-label\n+endif\n+\n ifdef BUILD_DARWIN\n TARGET          = $(VERSION_NAME).elf\n TARGET_FINAL    = $(VERSION_NAME)\n@@ -195,7 +241,7 @@ ifdef BUILD_WIN\n STRIP \t        = $(WINDEV)/$(PREFIX)strip$(EXTENSION) $(TARGET) -o $(TARGET_FINAL)\n endif\n ifdef BUILD_LINUX\n-STRIP \t        = $(LNXDEV)/$(PREFIX)strip $(TARGET) -o $(TARGET_FINAL)\n+STRIP \t        = $(PREFIX)-strip $(TARGET) -o $(TARGET_FINAL)\n endif\n ifdef BUILD_DARWIN\n STRIP           = $(PREFIX)strip $(TARGET) -o $(TARGET_FINAL)\n"
  },
  {
    "path": "packages/sx05re/emulators/openbor/patches/emuelec-aarch64/openbor-02-addplatform.patch",
    "content": "From 5d057e7b6b350e2faa75c041d0081fb2963e980d Mon Sep 17 00:00:00 2001\nFrom: 5schatten <supervisedthinking@gmail.com>\nDate: Sat, 12 Oct 2019 19:24:14 +0200\nSubject: [PATCH] engine/Makefile: updated platform\n\n---\n engine/Makefile | 48 +++++++++++++++++++++++++++++++++++++++++++++++-\n 1 file changed, 47 insertions(+), 1 deletion(-)\n\ndiff --git a/engine/Makefile b/engine/Makefile\nindex 8b0f9a65..6e8198e0 100644\n--- a/engine/Makefile\n+++ b/engine/Makefile\n@@ -103,6 +103,52 @@ BUILD_DEBUG     = 1\n endif\n endif\n \n+ifdef BUILD_LINUX_x86_64\n+TARGET \t        = $(VERSION_NAME).elf\n+TARGET_FINAL    = $(VERSION_NAME)\n+TARGET_PLATFORM = LINUX\n+BUILD_SDL       = 1\n+BUILD_GFX       = 1\n+BUILD_PTHREAD   = 1\n+BUILD_SDL_IO    = 1\n+BUILD_OPENGL    = 1\n+BUILD_LOADGL    = 1\n+BUILD_VORBIS    = 1\n+BUILD_WEBM      = 1\n+BUILDING        = 1\n+YASM \t          = nasm\n+OBJTYPE         = elf\n+INCLUDES        = $(SDKPATH)/usr/include \\\n+                  $(SDKPATH)/usr/include/SDL2\n+TARGET_ARCH     = amd64\n+BUILD_AMD64     = 1\n+ARCHFLAGS       = -m64\n+LIBRARIES       = $(SDKPATH)/usr/lib\n+CFLAGS          += -DAMD64\n+# Workaround for GCC 9\n+CFLAGS          += -Wno-error=format-overflow -Wno-error=stringop-truncation\n+endif\n+\n+ifdef BUILD_LINUX_aarch64\n+TARGET \t        = $(VERSION_NAME).elf\n+TARGET_FINAL    = $(VERSION_NAME)\n+TARGET_PLATFORM = LINUX\n+BUILD_LINUX     = 1\n+BUILD_SDL       = 1\n+BUILD_GFX       = 1\n+BUILD_PTHREAD   = 1\n+BUILD_SDL_IO    = 1\n+BUILD_VORBIS    = 1\n+BUILD_WEBM      = 1\n+BUILDING        = 1\n+INCLUDES        = $(SDKPATH)/usr/include \\\n+                  $(SDKPATH)/usr/include/SDL2\n+OBJTYPE         = elf\n+LIBRARIES       = $(SDKPATH)/usr/lib\n+# Workaround for GCC 9\n+CFLAGS          += -Wno-error=address -Wno-error=format-overflow -Wno-error=stringop-truncation -Wno-error=implicit-function-declaration -Wno-error=unused-variable -Wno-error=unused-label\n+endif\n+\n ifdef BUILD_DARWIN\n TARGET          = $(VERSION_NAME).elf\n TARGET_FINAL    = $(VERSION_NAME)\n@@ -195,7 +241,7 @@ ifdef BUILD_WIN\n STRIP \t        = $(WINDEV)/$(PREFIX)strip$(EXTENSION) $(TARGET) -o $(TARGET_FINAL)\n endif\n ifdef BUILD_LINUX\n-STRIP \t        = $(LNXDEV)/$(PREFIX)strip $(TARGET) -o $(TARGET_FINAL)\n+STRIP \t        = $(PREFIX)-strip $(TARGET) -o $(TARGET_FINAL)\n endif\n ifdef BUILD_DARWIN\n STRIP           = $(PREFIX)strip $(TARGET) -o $(TARGET_FINAL)\n"
  },
  {
    "path": "packages/sx05re/emulators/openbor/scripts/openbor.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# OpenBOR only works with Pak files, if you have an extracted game you will need to create a pak first.\n\nOB=${2}\n[[ -z ${OB} ]] && OB=OpenBOR\n\npakname=$(basename \"${1}\")\npakname=\"${pakname%.*}\"\n\nCONFIGDIR=\"/emuelec/configs/openbor\"\nPAKS=\"${CONFIGDIR}/Paks\"\nSAVES=\"${CONFIGDIR}/Saves\"\n\n# Make sure the folders exists\n\tmkdir -p \"${PAKS}\"\n\tmkdir -p \"${SAVES}\"\n\n# make a symlink to the pak\n    ln -sf \"${1}\" \"${PAKS}\"\n\n# create symlink to master.cfg\nrm \"${SAVES}/${pakname}.cfg\"\nif [ ${OB} = \"OpenBORff\" ]; then\n     ln -sf \"${CONFIGDIR}/masterff.cfg\" \"${SAVES}/${pakname}.cfg\"\nelse\n     ln -sf \"${CONFIGDIR}/master.cfg\" \"${SAVES}/${pakname}.cfg\"\nfi\n\n# Run OpenBOR in the config folder\n    cd \"${CONFIGDIR}\"\n\tSDL_AUDIODRIVER=alsa ${OB}\n\n# Clear PAKS folder to avoid getting the launcher on nex run\nrm -rf ${PAKS}/*\n"
  },
  {
    "path": "packages/sx05re/emulators/oricutron/config/oricutron.cfg",
    "content": ";\n; Example config file for Oricutron\n;\n\n;                 ----------------------------------\n\n; ROM files. (NOTE: For roms, DO NOT include the \".rom\" file\n; extension. These are added automatically.\n; If a file with the same name, but with a \".sym\" extension\n; is found, symbols will be loaded from it and used in the\n; debugger when the ROM in question is active.\n\n; Filename of Oric Atmos ROM\n;atmosrom = 'roms/basic11b'\n\n; Filename of the Oric-1 ROM\n;oric1rom = 'roms/basic10'\n\n; Filename of the Pravetz 8D ROM\n;pravetzrom = 'roms/pravetzt'\n\n; Filename of ROMs for the telestrat banks\n;telebank0 = ''\n;telebank1 = ''\n;telebank2 = ''\n;telebank3 = ''\n;telebank4 = ''\n;telebank5 = 'roms/teleass'\n;telebank6 = 'roms/hyperbas'\n;telebank7 = 'roms/telmon24'\n\n;                 ----------------------------------\n\n; Filename of the Microdisc ROM\n;mdiscrom = 'roms/microdis'\n\n; Filename of the Byte Drive 500 ROM\n;bd500rom = 'roms/bd500'\n\n; Filename of the Jasmin ROM\n;jasminrom = 'roms/jasmin'\n\n; Filename of the Pravetz 8D disk ROM\n;pravetz8drom = 'roms/8dos'\n;pravetz8drom = 'roms/8dos2'\n\n;                 ----------------------------------\n\n; Type of machine to emulate (atmos, oric1, oric1-16k, telestrat, pravetz)\nmachine = atmos\n\n;                 ----------------------------------\n\n; Type of disk controller (none, microdisc, jasmin, bd500, pravetz)\ndisktype = none\n\n; Write back all changes to disk images (if turned off, you have to press\n; F7 to write changes back to the disk image)\ndiskautosave = yes\n\n;                 ----------------------------------\n\n; Start with this disk in drive 0 (backslash is an escape char to insert\n; quotes, so double backslash is required to insert a backslash. You can use\n; forward slash as a path separator, even on windows.\n;diskimage = 'assets/disks/aigledor.dsk'\n\n;                 ----------------------------------\n\n; Default path for tapes\n;tapepath = 'tapes'\n\n; Default path for atmos/oric-1 disks\n;diskpath = 'disks'\n\n; Default path for telestrat disks\n;telediskpath = 'teledisks'\n\n; Default path for pravetz disks\n;pravdiskpath = 'pravdisks'\npravdiskautoboot = yes\n\n;                 ----------------------------------\n\n; Start with this tape inserted\n;tapeimage = \n\n;                 ----------------------------------\n\n; Start Oricutron in the debugger? (yes/no)\ndebug = no\n\n; Load these symbols into the debugger\n;symbols = 'd:/osdk/my project/build/symbols'\n\n;                 ----------------------------------\n\n; Specifies how ROMDIS disables ROM chip(s)\n; related to BD500/BDDOS\n; rom16 = yes - 64k mode (Default)\n; rom16 = no  - 56k mode\n;rom16 = yes\n\n; Support BD500/DOS70\n; dos70 = no (default)\n;dos70 = no\n\n;                 ----------------------------------\n\n; Initial status bar mode (none, nofps, full)\nstatusbarmode = none\n\n; Render mode (soft, opengl)\nrendermode = opengl\n\n; Show scanlines? (yes/no)\nscanlines = no\n\n; Maintain correct aspect ratio in 50Hz/60Hz modes\naratio = yes\n\n; Horizontal stretch? (yes/no)  <-- opengl only\nhstretch = no\n\n; PAL ghosting? (yes/no)  <-- opengl only\npalghosting = no\n\n; Start fullscreen?\nfullscreen = yes\n\n; Tell SDL to use a hardware surface? (might increase speed in fullscreen, or\n; it might do nothing, or it might make it worse). (software rendering only)\nhwsurface = yes\n\n; Force video display bit depth, either 16 or 32 (on some hardware, 16 can\n; extremely slow, ie. eeepc clones). Normally Oricutron will guess the best\n; one, but if it seems to be slow, try setting this to 16 or 32 to see if\n; it makes a difference. (software rendering only)\n;swdepth = 16\n\n;                 ----------------------------------\n\n; RAM pattern on powerup (0 or 1)\nrampattern = 0\n\n;                 ----------------------------------\n\n; Lightpen (yes/no)\nlightpen = no\n\n; Enable printing to 'printer_out.txt'\n; default enabled\n;printenable = yes\n\n; Filter printed symbols in 'printer_out.txt'\n; select 'no' for raw binary mode\n;printfilter = yes\n\n; Enable audio DC adjustment\n; default enabled\n;dcadjust = yes\n\n; Enable sound loopback\n; default disabled\n;soundloopon = no\n\n; ACIA emulation back-end name:\n;   'none' - no serial present\n;   'loopback' - for testing - all TX data is returned to RX\n;   'modem[:port][:ipv6]' - emulates com port with attached modem,\n;                    only minimal AT command set is supported and\n;                    data is redirected to TCP. Default port is 23 (telnet).\n;                    if :ipv6 is added at the end uses IPv6 instead of IPv4\n;   'com:115200,8,N,1,<device>' - use real or virtual <device> on host as emulated ACIA\n;                   baudrate, data bits, parity and stop bits can be set as needed\n;     ex.:  Windows: 'com:115200,8,N,1,COM1'\n;           Linux:   'com:115200,8,N,1,/dev/ttyUSB0'\nserial = 'none'\n\n; Set serial base address. Default: $31c\nserial_address = $31c\n\n; Joystick interface for Atmos/Oric-1 mode. Telestrat has its own built-in standard.\n; Options are 'none', 'altai', 'pase' or 'ijk'\njoyinterface = ijk\n\n; How to emulate joysticks attached to the above interface\n; Options are 'none', 'kbjoy1', 'kbjoy2', 'sdljoyN' (where n is 0 to 9)\njoystick_a = sdljoy0\njoystick_b = none\n\n; How to emulate joysticks attached to the telestrat\n; Options are 'none', 'kbjoy1', 'kbjoy2', 'sdljoyN', 'mouse'\ntelejoy_a = kbjoy2\ntelejoy_b = none\n\n; Keys to emulate joystick, set 1\n; NOTE: \"fire2\" is only available on telestrat\n; NOTE: \"fire3\" is only available on telestrat (right port)\nkbjoy1_up = 'KP8'\nkbjoy1_down = 'KP2'\nkbjoy1_left = 'KP4'\nkbjoy1_right = 'KP6'\nkbjoy1_fire1 = 'KP_SPACE'\nkbjoy1_fire2 = 'KP_PLUS'\nkbjoy1_fire3 = 'KP_MINUS'\n\n; Keys to emulate joystick, set 2\nkbjoy2_up = 'W'\nkbjoy2_down = 'S'\nkbjoy2_left = 'A'\nkbjoy2_right = 'D'\nkbjoy2_fire1 = 'SPACE'\nkbjoy2_fire2 = 'N'\nkbjoy2_fire3 = 'LALT'\n\n\n; Visual keyboard\nshow_keyboard = no\nsticky_mod_keys = no\n;autoload_keyboard_mapping = 'keymap/my_keymap.kma'\n\n; Disable menu color scheme\n;disable_menuscheme = no\n\n; ch376 chip emulation. This chip can read a usbkey. For more information : http://orix.oric.org\n; only available in telestrat mode\nch376 = no\ntwilighte_board = no\n"
  },
  {
    "path": "packages/sx05re/emulators/oricutron/config/oricutron.gptk",
    "content": "# Oricutron gptokeyb configuration.\r\n\r\n# I N S T R U C T I O N S :\r\n#\r\n# If you have a game with special keys (for example A for UP, Z for down etc.), change the mapping table beneath accordingly\r\n# \r\n# Then SAVE this file under the game's name. For Example: Mr. Wimpy (Europe).gptk\r\n#\r\n# The correct filepath for the game-gptk file is: /storage/.config/emuelec/configs/gptokeyb/oric\r\n#\r\n# For example: /storage/.config/emuelec/configs/gptokeyb/oric/Mr. Wimpy (Europe).gptk\r\n#\r\n# Oricutron will automatically load the respective gptk file when starting the game. \r\n# If no gptk file is found, the emulator will always use \"oricutron.gptk\" in /storage/.config/emuelec/configs/gptokeyb/\r\n#----------------------------------------------------------------------------------------------------------------------------\r\n\r\n# D-Pad mapping to cursor keys\r\nup = up\r\ndown = down\r\nleft = left\r\nright = right\r\n\r\n# Left analog stick mapping to cursor keys\r\n\r\nleft_analog_left = left\r\nleft_analog_right = right\r\nleft_analog_up = up\r\nleft_analog_down = down\r\n\r\n\r\n#Alternative D-Pad mapping\r\n#up = A\r\n#down = Z\r\n#left = <\r\n#right = >\r\n\r\n# Alternative D-Pad mapping\r\n#up = w\r\n#down = s\r\n#left = a  \r\n#right = d\r\n\r\n# Button mappings\r\na = space\r\nb = enter\r\nx = y\r\ny = n\r\nselect = esc\r\nstart = 1\r\n\r\n# Shoulder buttons for common Oric F-keys\r\nl1 = f1\r\nr1 = f2\r\nl2 = f3\r\nr2 = f4\r\n"
  },
  {
    "path": "packages/sx05re/emulators/oricutron/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024\n\nPKG_NAME=\"oricutron\"\nPKG_VERSION=\"a76131d\"\nPKG_REV=\"1\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL-2.0\"\nPKG_SITE=\"https://github.com/pete-gordon/oricutron\"\nPKG_URL=\"$PKG_SITE/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_SECTION=\"emuelec/emulators\"\nPKG_SHORTDESC=\"Oricutron - Oric-1/Atmos/Telestrat emulator\"\nPKG_TOOLCHAIN=\"make\"\n\npre_make_target() {\n  cd \"$PKG_BUILD\"\n\n  sed -i \\\n    -e 's/filereq_gtk/filereq_sdl/g;s/msgbox_gtk/msgbox_sdl/g' \\\n    -e 's/[[:space:]]*\\(gui_x11\\|render_gl\\)\\.o//g;/\\(gui_x11\\|render_gl\\)\\.c/d' \\\n    -e 's/-D__OPENGL_AVAILABLE__//g;s/ -l\\(GL\\|GLU\\|X11\\)//g;s/-m64//g;s| -L/usr/lib64||g' \\\n    -e '/pkg-config.*gtk/d;s/^\\t\\$(CXX)/\\t\\$(CC)/' \\\n    -e 's/msgbox_sdl\\.o/& emuelec_stub.o/' \\\n    Makefile\n\n  cat > emuelec_stub.c <<'EOF'\nvoid clipboard_copy(const char *t){(void)t;}\nchar *clipboard_paste(void){return \"\";}\nvoid init_gui_native(void){}\nvoid shut_gui_native(void){}\nEOF\n}\n\nmake_target() {\n  cd \"$PKG_BUILD\"\n\n  make PLATFORM=linux CC=\"$CC\" CXX=\"$CC\" \\\n    CFLAGS=\"$CFLAGS -I$SYSROOT_PREFIX/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DAUDIO_BUFLEN=1024 -D__CBCOPY__ -D__CBPASTE__ -DAPP_NAME_FULL='\\\"Oricutron\\\"' -DAPP_YEAR='\\\"2024\\\"' -DVERSION_COPYRIGHTS='\\\"Oricutron (c)2024\\\"'\" \\\n    LDFLAGS=\"$LDFLAGS -L$SYSROOT_PREFIX/usr/lib\" \\\n    LIBS=\"-lSDL -lpthread -lm\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp -f ${PKG_BUILD}/oricutron ${INSTALL}/usr/bin/oricutron\n  chmod +x ${INSTALL}/usr/bin/oricutron\n\n  cp -f ${PKG_DIR}/scripts/oricutronstart.sh ${INSTALL}/usr/bin/oricutronstart.sh\n  chmod +x ${INSTALL}/usr/bin/oricutronstart.sh\n\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/oricutron\n  cp -r ${PKG_BUILD}/roms   ${INSTALL}/usr/config/emuelec/configs/oricutron/ 2>/dev/null || :\n  cp -r ${PKG_BUILD}/images ${INSTALL}/usr/config/emuelec/configs/oricutron/ 2>/dev/null || :\n\n  cp -f ${PKG_DIR}/config/oricutron.cfg \\\n    ${INSTALL}/usr/config/emuelec/configs/oricutron/oricutron.cfg\n\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/oricutron/disks\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/oricutron/tapes\n\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/gptokeyb\n  cp -f ${PKG_DIR}/config/oricutron.gptk \\\n    ${INSTALL}/usr/config/emuelec/configs/gptokeyb/oricutron.gptk 2>/dev/null || :\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/oricutron/scripts/oricutronstart.sh",
    "content": "#!/bin/bash\n. /etc/profile\n\nROM=\"$1\"\n\nCONFIG_DIR=\"/storage/.config/emuelec/configs/oricutron\"\nDEFAULT_DIR=\"/usr/config/emuelec/configs/oricutron\"\n\n# Default GPTK\nGPTK_DEFAULT=\"/storage/.config/emuelec/configs/gptokeyb/oricutron.gptk\"\n# Per-ROM GPTK directory (optional)\nGPTK_PERROM_DIR=\"/storage/.config/emuelec/configs/gptokeyb/oric\"\n\nmkdir -p \"${CONFIG_DIR}\"\nmkdir -p \"${GPTK_PERROM_DIR}\"\n\nif [ ! -f \"${CONFIG_DIR}/oricutron.cfg\" ]; then\n  cp -f \"${DEFAULT_DIR}/oricutron.cfg\" \"${CONFIG_DIR}/oricutron.cfg\" 2>/dev/null || :\nfi\n\n[ -d \"${CONFIG_DIR}/roms\" ]   || cp -r \"${DEFAULT_DIR}/roms\"   \"${CONFIG_DIR}/\" 2>/dev/null || :\n[ -d \"${CONFIG_DIR}/images\" ] || cp -r \"${DEFAULT_DIR}/images\" \"${CONFIG_DIR}/\" 2>/dev/null || :\nmkdir -p \"${CONFIG_DIR}\"/{disks,tapes}\n\nif [[ -n \"${ROM}\" && \"${ROM}\" != /* ]]; then\n  ROM=\"$(pwd)/${ROM}\"\nfi\n\n# Pick GPTK config: per-ROM if present, otherwise default\nGPTK_CFG=\"\"\nif [ -n \"${ROM}\" ] && [ -e \"${ROM}\" ]; then\n  ROM_BASENAME=\"$(basename -- \"${ROM}\")\"\n  ROM_STEM=\"${ROM_BASENAME%.*}\"\n  # Prefer exact stem match\n  if [ -f \"${GPTK_PERROM_DIR}/${ROM_STEM}.gptk\" ]; then\n    GPTK_CFG=\"${GPTK_PERROM_DIR}/${ROM_STEM}.gptk\"\n  # Fallback: sanitize to avoid problems with weird chars in filenames\n  else\n    ROM_SAFE=\"$(printf '%s' \"${ROM_STEM}\" | sed 's/[^A-Za-z0-9._-]/_/g')\"\n    if [ -f \"${GPTK_PERROM_DIR}/${ROM_SAFE}.gptk\" ]; then\n      GPTK_CFG=\"${GPTK_PERROM_DIR}/${ROM_SAFE}.gptk\"\n    fi\n  fi\nfi\n\n# If no per-ROM cfg found, use default\nif [ -z \"${GPTK_CFG}\" ] && [ -f \"${GPTK_DEFAULT}\" ]; then\n  GPTK_CFG=\"${GPTK_DEFAULT}\"\nfi\n\nTMP_DIR=\"/tmp/oricutron_$$\"\nmkdir -p \"${TMP_DIR}\"\n\ncp -f /usr/bin/oricutron \"${TMP_DIR}/oricutron\" || exit 1\nchmod +x \"${TMP_DIR}/oricutron\"\n\nln -sf \"${CONFIG_DIR}/roms\"   \"${TMP_DIR}/roms\"\nln -sf \"${CONFIG_DIR}/images\" \"${TMP_DIR}/images\"\nln -sf \"${CONFIG_DIR}/disks\"  \"${TMP_DIR}/disks\"\nln -sf \"${CONFIG_DIR}/tapes\"  \"${TMP_DIR}/tapes\"\n\ncp -f \"${CONFIG_DIR}/oricutron.cfg\" \"${TMP_DIR}/oricutron.cfg\" 2>/dev/null || :\n\ncd \"${TMP_DIR}\" || exit 1\n\nGPTK_PID=\"\"\nif [ -n \"${GPTK_CFG}\" ] && [ -f \"${GPTK_CFG}\" ]; then\n  gptokeyb \"./oricutron\" -c \"${GPTK_CFG}\" &\n  GPTK_PID=$!\nfi\n\nif [ -n \"${ROM}\" ]; then\n  ./oricutron \"${ROM}\"\nelse\n  ./oricutron\nfi\n\n[ -n \"${GPTK_PID}\" ] && kill \"${GPTK_PID}\" 2>/dev/null\n\ncp -f \"${TMP_DIR}/oricutron.cfg\" \"${CONFIG_DIR}/oricutron.cfg\" 2>/dev/null || :\nsync\n\ncd /\nrm -rf \"${TMP_DIR}\"\nexit 0\n"
  },
  {
    "path": "packages/sx05re/emulators/picodrivesa/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"picodrivesa\"\nPKG_VERSION=\"3cd193ed1c7a2ffa94e69334367c64c136de0c7d\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"https://github.com/irixxxx/picodrive\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\"A multi-platform Atari 2600 Emulator\"\nPKG_TOOLCHAIN=\"configure\"\nGET_HANDLER_SUPPORT=\"git\"\n\npre_configure_target() { \nTARGET_CONFIGURE_OPTS=\" --platform=generic\"\ncd ${PKG_BUILD}\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin/skin\ncp -rf ${PKG_BUILD}/PicoDrive ${INSTALL}/usr/bin\ncp -rf ${PKG_BUILD}/skin/* ${INSTALL}/usr/bin/skin/\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/scummvmsa/bin/scummvm.start",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nCONFIG_DIR=\"/storage/.config/scummvm\"\nROM_DIR=\"/storage/roms/scummvm\"\nTMP_DIR=\"/tmp/scummvm\"\nGAME=\"$(echo $2 | sed 's=.*/==;s/\\.[^.]*$//')\" \nRATMPCONF=\"/storage/.config/retroarch/retroarch.cfg\"\n\ncreate_svm(){\n    mkdir -p ${TMP_DIR}\n    scummvm --list-targets | tail -n +3 | cut -d \" \" -f 1 | while read line; do\n    id=($line);\n    [[ -f \"${TMP_DIR}/${id}.scummvm\" ]] && rm \"${TMP_DIR}/${id}.scummvm\"\n    touch \"${TMP_DIR}/${id}.scummvm\"\n    SVMPATH=$(cat ${CONFIG_DIR}/scummvm.ini | sed -n \"/\\[$id\\]/,/\\[/p\" | grep path= | sed \"s|path=||\")\n    echo \"-p \\\"${SVMPATH}\\\" ${id}\" > \"${TMP_DIR}/${id}.scummvm\"\n    echo \"${id} has been added with the path $SVMPATH to ${ROM_DIR}/${id}.scummvm\"\n\tdone \n    cp -rf ${TMP_DIR}/*.scummvm ${ROM_DIR}\n    rm -rf ${TMP_DIR}\n\t}\n\nif [ ! -d \"${CONFIG_DIR}\" ]; then\n mkdir -p ${CONFIG_DIR}\n cp -rf /usr/config/scummvm/* $CONFIG_DIR/\nfi\n\nif [ ! -d \"${ROM_DIR}\" ]; then\n mkdir -p ${ROM_DIR}\nfi\n\nif [ -d \"/storage/.config/scummvm/extra\" ]; then \nEXTRA=\"--extrapath=/storage/.config/scummvm/extra\"\nfi\n\ncase $1 in\n\"sa\") \nset_audio \"fluidsynth\"\nscummvm --fullscreen --joystick=0 $EXTRA \"${GAME}\"\nset_audio \"pulseaudio\"\n;;\n\"libretro\") \nretroarch -L /tmp/cores/scummvm_libretro.so --config ${RATMPCONF} \"${GAME}\"\n;;\n\"add\") \nscummvm --add --path=\"/storage/roms/scummvm\" --recursive\nmkdir -p /storage/roms/bios/\ncp ${CONFIG_DIR}/scummvm.ini /storage/roms/bios/scummvm.ini\n;;\n\"create\") \ncreate_svm\n;;\n\nesac \n"
  },
  {
    "path": "packages/sx05re/emulators/scummvmsa/config/scummvm.ini",
    "content": "[scummvm]\ngui_browser_show_hidden=true\nbrowser_lastpath=/storage/roms/scummvm\ngm_device=fluidsynth\nfullscreen=true\nsoundfont=/storage/.config/fluidsynth/soundfonts/GeneralUser.sf2\nfluidsynth_chorus_speed=30\nfluidsynth_chorus_depth=80\nfluidsynth_reverb_roomsize=20\nfluidsynth_reverb_activate=true\nfluidsynth_reverb_damping=0\nfluidsynth_reverb_width=1\nfluidsynth_misc_interpolation=4th\nfluidsynth_chorus_waveform=sine\nfluidsynth_reverb_level=90\nfluidsynth_chorus_nr=3\nfluidsynth_chorus_level=100\nfluidsynth_chorus_activate=true\n"
  },
  {
    "path": "packages/sx05re/emulators/scummvmsa/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"scummvmsa\"\nPKG_VERSION=\"0d62e946497ec9fc432750734e94a7333db0963c\"\nPKG_SHA256=\"475c50fc5af385db6a0f42db9b051abb871f2c3c6d36822f036803facd5b75a3\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"https://github.com/scummvm/scummvm\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_net freetype fluidsynth-git libmad timidity\"\nPKG_SHORTDESC=\"Script Creation Utility for Maniac Mansion Virtual Machine\"\nPKG_LONGDESC=\"ScummVM is a program which allows you to run certain classic graphical point-and-click adventure games, provided you already have their data files.\"\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n\n  TARGET_CONFIGURE_OPTS=\"--disable-opengl-game \\\n                         --disable-opengl-game-classic \\\n                         --disable-opengl-game-shaders \\\n                         --host=${TARGET_NAME} \\\n                         --backend=sdl \\\n                         --enable-vkeybd \\\n                         --enable-optimizations \\\n                         --opengl-mode=gles2 \\\n                         --with-sdl-prefix=${SYSROOT_PREFIX}/usr \\\n                         --disable-debug \\\n                         --enable-release \\\n                         --enable-engine=xeen \\\n                         --enable-engine=mm \\\n                         --enable-engine=adl,testbed,scumm,scumm_7_8,grim,monkey4,mohawk,myst,riven,sci32,agos2,sword2,drascula,sky,lure,queen,testbed,director,stark \\\n                         --prefix=/usr/local\"\n}\n\nconfigure_target() {\n  cd ${PKG_BUILD}\n  \n  ./configure ${TARGET_CONFIGURE_OPTS}\n}\n\nmake_target() {\n  cd ${PKG_BUILD}\n  \n  make ${PKG_MAKE_OPTS_TARGET} V=1\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/config/scummvm/extra \n  cp -rf ${PKG_DIR}/config/* ${INSTALL}/usr/config/scummvm/\n  cp -rf ${PKG_BUILD}/backends/vkeybd/packs/*.zip ${INSTALL}/usr/config/scummvm/extra\n  mv ${INSTALL}/usr/local/bin ${INSTALL}/usr/\n  cp -rf ${PKG_DIR}/bin/* ${INSTALL}/usr/bin\n  \n  for i in metainfo pixmaps appdata applications doc icons man; do\n    rm -rf \"${INSTALL}/usr/local/share/${i}\"\n  done\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/simcoupe/config/simcoupe.gptk",
    "content": "# Simcoupe gptokeyb configuration.\r\n\r\n# I N S T R U C T I O N S :\r\n#\r\n# If you have a game with special keys (for example A for UP, Z for down etc.), change the mapping table beneath accordingly\r\n# \r\n# Then SAVE this file under the game's name. For Example: Prince of Persia.gptk\r\n#\r\n# The correct filepath for the game-gptk file is: /storage/.config/emuelec/configs/gptokeyb/simcoupe\r\n#\r\n# For example: /storage/.config/emuelec/configs/gptokeyb/simcoupe/Prince of Persia.gptk\r\n#\r\n# Simcoupe will automatically load the respective gptk file when starting the game. \r\n#\r\n# If no gptk file is found, the emulator will always use \"simcoupe.gptk\" in /storage/.config/emuelec/configs/gptokeyb/\r\n#----------------------------------------------------------------------------------------------------------------------------\r\nback = esc\r\nstart = enter\r\nselect = \r\na = enter\r\nb = space\r\nx = space\r\ny = esc\r\n\r\nl1 = f10\r\nl2 =\r\nr1 =\r\nr2 =\r\n\r\nup = up\r\ndown = down\r\nleft = left\r\nright = right\r\n\r\nleft_analog_left = left\r\nleft_analog_right = right\r\nleft_analog_up = up\r\nleft_analog_down = down\r\n"
  },
  {
    "path": "packages/sx05re/emulators/simcoupe/package.mk",
    "content": "PKG_NAME=\"simcoupe\"\nPKG_VERSION=\"1.2\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/simonowen/simcoupe\"\nPKG_URL=\"$PKG_SITE/archive/refs/heads/master.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 zlib libpng\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"emuelec/emulators\"\nPKG_SHORTDESC=\"SimCoupe - SAM Coupe emulator\"\nPKG_LONGDESC=\"SimCoupe is a SAM Coupe emulator for various platforms\"\nPKG_TOOLCHAIN=\"cmake\"\n\npre_configure_target() {\n  PKG_CMAKE_OPTS_TARGET=\"-DCMAKE_BUILD_TYPE=Release\"\n}\n\nmakeinstall_target() {\n  # Binary + Wrapper\n  mkdir -p ${INSTALL}/usr/bin\n  cp -f $PKG_BUILD/.$TARGET_NAME/simcoupe ${INSTALL}/usr/bin/simcoupe\n  chmod +x ${INSTALL}/usr/bin/simcoupe\n\n  cp -f ${PKG_DIR}/scripts/simcoupestart.sh ${INSTALL}/usr/bin/simcoupestart.sh\n  chmod +x ${INSTALL}/usr/bin/simcoupestart.sh\n\n  # SAASound\n  mkdir -p ${INSTALL}/usr/lib\n  cp -f $PKG_BUILD/.$TARGET_NAME/_deps/saasound-build/libSAASound.so* ${INSTALL}/usr/lib/ 2>/dev/null || :\n\n  # ROM resources\n  mkdir -p ${INSTALL}/usr/share/simcoupe\n  cp -f $PKG_BUILD/Resource/*.rom  ${INSTALL}/usr/share/simcoupe/ 2>/dev/null || :\n  cp -f $PKG_BUILD/Resource/*.zx82 ${INSTALL}/usr/share/simcoupe/ 2>/dev/null || :\n  cp -f $PKG_BUILD/Resource/*.bin  ${INSTALL}/usr/share/simcoupe/ 2>/dev/null || :\n\n  # GPTK file\n  if [ -f \"${PKG_DIR}/config/simcoupe.gptk\" ]; then\n    mkdir -p ${INSTALL}/usr/config/emuelec/configs/gptokeyb\n    cp -f \"${PKG_DIR}/config/simcoupe.gptk\" \\\n      \"${INSTALL}/usr/config/emuelec/configs/gptokeyb/simcoupe.gptk\"\n  fi\n\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/simcoupe/scripts/simcoupestart.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present EmuELEC (https://github.com/EmuELEC)\n\n. /etc/profile\n\nROM=\"$1\"\nROMNAME=\"${ROM##*/}\"\nROMBASE=\"${ROMNAME%.*}\"\n\n# Kill old instances\nkillall -9 gptokeyb 2>/dev/null\n\n# Check for game-specific gptk config\nGPTK_GAME=\"/storage/.config/emuelec/configs/gptokeyb/simcoupe/${ROMBASE}.gptk\"\nGPTK_DEFAULT=\"/emuelec/configs/gptokeyb/simcoupe.gptk\"\n\nif [ -f \"$GPTK_GAME\" ]; then\n    GPTK_CONFIG=\"$GPTK_GAME\"\nelse\n    GPTK_CONFIG=\"$GPTK_DEFAULT\"\nfi\n\n# Start gptokeyb with selected config\ngptokeyb 1 simcoupe -c \"$GPTK_CONFIG\" &\n\n# Wait for gptokeyb to initialize\nsleep 1\n\n# Launch SimCoupe\n/usr/bin/simcoupe -rom /storage/roms/bios/samcoupe.rom -fullscreen -disk1 \"$ROM\" -autoboot\n\n# Cleanup\nkillall -9 gptokeyb"
  },
  {
    "path": "packages/sx05re/emulators/solarus/config/pads.ini",
    "content": "down=hat 0 down\nitem2=button 3\nattack=button 0\npause=button 7\nright=hat 0 right\naction=button 1\nitem1=button 2\nup=hat 0 up\nleft=hat 0 left\n"
  },
  {
    "path": "packages/sx05re/emulators/solarus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"solarus\"\nPKG_VERSION=\"cc580fb399f720e241754ecc7817ce5d551d74d0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://gitlab.com/solarus-games/solarus\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain luajit glm libmodplug physfs SDL2 SDL2_ttf\" \nPKG_SHORTDESC=\"Action-RPG/Adventure 2D game engine\"\nPKG_TOOLCHAIN=\"cmake\"\nGET_HANDLER_SUPPORT=\"git\"\n\npre_configure_target() {\nexport LDFLAGS+=\" -ldl\"\nPKG_CMAKE_OPTS_TARGET=\"-DSOLARUS_GL_ES=ON -DSOLARUS_GUI=OFF -DSOLARUS_USE_LUAJIT=ON -DSOLARUS_TESTS=OFF\"\n}\n\npre_makeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/solarus\ncp ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/solarus\n\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/solarus/patches/solarus-001-addFindOpenGles2.patch",
    "content": "From 2bf0e98f17d92fd86ee61be179e3cebe93f75ea7 Mon Sep 17 00:00:00 2001\nFrom: Gleb Mazovetskiy <glex.spb@gmail.com>\nDate: Sun, 3 Jan 2021 12:38:13 +0000\nSubject: [PATCH] Add a basic FindOpenGLES2.cmake\n\nFixes #1324\n---\n cmake/modules/FindOpenGLES2.cmake | 28 ++++++++++++++++++++++++++++\n 1 file changed, 28 insertions(+)\n create mode 100644 cmake/modules/FindOpenGLES2.cmake\n\ndiff --git a/cmake/modules/FindOpenGLES2.cmake b/cmake/modules/FindOpenGLES2.cmake\nnew file mode 100644\nindex 000000000..70fd5e6f0\n--- /dev/null\n+++ b/cmake/modules/FindOpenGLES2.cmake\n@@ -0,0 +1,28 @@\n+# Try to find OpenGLES2. Once done this will define:\n+#     OPENGLES2_FOUND\n+#     OPENGLES2_INCLUDE_DIRS\n+#     OPENGLES2_LIBRARIES\n+#     OPENGLES2_DEFINITIONS\n+\n+find_package(PkgConfig QUIET)\n+\n+pkg_check_modules(PC_OPENGLES2 glesv2)\n+\n+if (PC_OPENGLES2_FOUND)\n+    set(OPENGLES2_DEFINITIONS ${PC_OPENGLES2_CFLAGS_OTHER})\n+endif ()\n+\n+find_path(OPENGLES2_INCLUDE_DIRS NAMES GLES2/gl2.h\n+    HINTS ${PC_OPENGLES2_INCLUDEDIR} ${PC_OPENGLES2_INCLUDE_DIRS}\n+)\n+\n+set(OPENGLES2_NAMES ${OPENGLES2_NAMES} glesv2 GLESv2)\n+find_library(OPENGLES2_LIBRARIES NAMES ${OPENGLES2_NAMES}\n+    HINTS ${PC_OPENGLES2_LIBDIR} ${PC_OPENGLES2_LIBRARY_DIRS}\n+)\n+\n+include(FindPackageHandleStandardArgs)\n+find_package_handle_standard_args(OpenGLES2 REQUIRED_VARS OPENGLES2_INCLUDE_DIRS OPENGLES2_LIBRARIES\n+                                  FOUND_VAR OPENGLES2_FOUND)\n+\n+mark_as_advanced(OPENGLES2_INCLUDE_DIRS OPENGLES2_LIBRARIES)\n-- \n2.27.0\n\n"
  },
  {
    "path": "packages/sx05re/emulators/solarus/patches/solarus-002-pad.patch",
    "content": "diff --git a/include/solarus/core/Savegame.h b/include/solarus/core/Savegame.h\nindex 910d99f..8177ad1 100644\n--- a/include/solarus/core/Savegame.h\n+++ b/include/solarus/core/Savegame.h\n@@ -108,6 +108,7 @@ class SOLARUS_API Savegame: public ExportableToLua {\n     bool is_set(const std::string& key) const;\n     void unset(const std::string& key);\n \n+    bool loadPadFromIni();\n     void set_initial_values();\n     void set_default_keyboard_controls();\n     void set_default_joypad_controls();\ndiff --git a/src/core/Savegame.cpp b/src/core/Savegame.cpp\nindex 29ef124..d6ca5bb 100644\n--- a/src/core/Savegame.cpp\n+++ b/src/core/Savegame.cpp\n@@ -95,6 +95,47 @@ Savegame::Savegame(MainLoop& main_loop, const std::string& file_name):\n   // at this point, but is needed by initialize() when calling item scripts.\n }\n \n+#define                MAX_BUFFER_LEN          512\n+\n+bool Savegame::loadPadFromIni() {\n+  FILE *handle = NULL;\n+  char path[MAX_BUFFER_LEN] = { \"\" };\n+\n+  strcpy(path, \"/emuelec/configs/solarus/pads.ini\");\n+  handle = fopen(path, \"rb\");\n+\n+  if (handle != NULL) {\n+    char line[1024] = \"\";\n+\n+    while (fgets(line, 1024, handle)) {\n+      strtok(line, \"\\n\");\n+\n+      char* pch = strstr(line, \"=\");\n+      if (pch != NULL) {\n+\tchar key[1024] = \"\";\n+\tchar value[1024] = \"\";\n+\n+\tstrncpy(key, line, pch - line);\n+\tstrcpy(value, pch + 1);\n+\n+\tif (strcmp(key, \"action\") == 0) set_string(KEY_JOYPAD_ACTION, value);\n+\tif (strcmp(key, \"attack\") == 0) set_string(KEY_JOYPAD_ATTACK, value);\n+\tif (strcmp(key, \"item1\" ) == 0) set_string(KEY_JOYPAD_ITEM_1, value);\n+\tif (strcmp(key, \"item2\" ) == 0) set_string(KEY_JOYPAD_ITEM_2, value);\n+\tif (strcmp(key, \"pause\" ) == 0) set_string(KEY_JOYPAD_PAUSE,  value);\n+\tif (strcmp(key, \"right\" ) == 0) set_string(KEY_JOYPAD_RIGHT,  value);\n+\tif (strcmp(key, \"up\"    ) == 0) set_string(KEY_JOYPAD_UP,     value);\n+\tif (strcmp(key, \"left\"  ) == 0) set_string(KEY_JOYPAD_LEFT,   value);\n+\tif (strcmp(key, \"down\"  ) == 0) set_string(KEY_JOYPAD_DOWN,   value);\n+      }\n+    }\n+\n+    fclose(handle);\n+    return true;\n+  }\n+  return false;\n+}\n+\n /**\n  * \\brief Initializes the data from the file or from initial values if the file\n  * does not exist.\n@@ -120,6 +161,8 @@ void Savegame::initialize() {\n     import_from_file();\n   }\n \n+  loadPadFromIni(); // set batocera pad config\n+\n   get_equipment().load_items();\n }\n \n"
  },
  {
    "path": "packages/sx05re/emulators/solarus/patches/solarus-003-dirs.patch",
    "content": "diff --git a/cmake/AddDefines.cmake b/cmake/AddDefines.cmake\nindex 6330da7..35e80e3 100644\n--- a/cmake/AddDefines.cmake\n+++ b/cmake/AddDefines.cmake\n@@ -8,16 +8,14 @@ endif()\n \n # Base directory where to write files.\n # If blank it will be set depending on the OS (typically the user's home directory).\n-set(SOLARUS_BASE_WRITE_DIR \"\" CACHE STRING \"Base directory where to write files, if blank it will be set depending on the OS (typically the user's home directory).\")\n-if(SOLARUS_BASE_WRITE_DIR)\n-  add_definitions(-DSOLARUS_BASE_WRITE_DIR=\\\"${SOLARUS_BASE_WRITE_DIR}\\\")\n-endif()\n+set(SOLARUS_BASE_WRITE_DIR \"/emuelec/configs/solarus/saves\" CACHE STRING \"Base directory where to write files, if blank it will be set depending on the OS (typically the user's home directory).\")\n+add_definitions(-DSOLARUS_BASE_WRITE_DIR=\\\"${SOLARUS_BASE_WRITE_DIR}\\\")\n \n # Directory where to write savegames and other files saved by quests.\n if(${CMAKE_SYSTEM_NAME} MATCHES \"Darwin\")\n   set(SOLARUS_INITIAL_WRITE_DIR \"Solarus\")\n else()\n-  set(SOLARUS_INITIAL_WRITE_DIR \".solarus\")\n+  set(SOLARUS_INITIAL_WRITE_DIR \"solarus\")\n endif()\n set(SOLARUS_WRITE_DIR ${SOLARUS_INITIAL_WRITE_DIR} CACHE STRING \"Directory where Solarus savegames are stored, relative to the base write directory.\")\n if(SOLARUS_WRITE_DIR)\n"
  },
  {
    "path": "packages/sx05re/emulators/solarus/scripts/solarus.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n[[ ! -d \"/emuelec/configs/solarus/saves/\" ]] && mkdir -p \"/emuelec/configs/solarus/saves/\"\n\nif [ \"${EE_DEVICE}\" == \"OdroidGoAdvance\" ] || [\"${EE_DEVICE}\" == \"Amlogic-ng\" ] || [ \"${EE_DEVICE}\" == \"GameForce\" ]; then \n    gptokeyb -c /emuelec/configs/gptokeyb/solarus-run.gptk &\n    SDL_GAMECONTROLLERCONFIG_FILE=\"\" solarus-run -fullscreen=yes ${1}\n    killall gptokeyb\nelse\n    solarus-run -fullscreen=yes ${1}\nfi\n\nexit 0\n"
  },
  {
    "path": "packages/sx05re/emulators/stellasa/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"stellasa\"\nPKG_VERSION=\"14df3bc79a43bba078645be4f7c5b0556e5d9a9b\"\nPKG_SHA256=\"2b8cc59a9f8d168c04363926804b1bbb8f65e86946a62ec1ce3de07edbf17a90\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"https://github.com/stella-emu/stella\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_SHORTDESC=\"A multi-platform Atari 2600 Emulator\"\nPKG_TOOLCHAIN=\"configure\"\n\npre_configure_target() { \nTARGET_CONFIGURE_OPTS=\"--host=${TARGET_NAME} --with-sdl-prefix=${SYSROOT_PREFIX}/usr/bin --disable-windowed\"\n}\n\nmake_target() {\ncd ${PKG_BUILD}\nmv ${PKG_BUILD}/.${TARGET_NAME}/* ${PKG_BUILD}\nmake \n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp -rf ${PKG_BUILD}/stella ${INSTALL}/usr/bin\ncp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/stellasa/scripts/stella.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nexport SDL_AUDIODRIVER=alsa          \n/usr/bin/stella \"${1}\"\n"
  },
  {
    "path": "packages/sx05re/emulators/sundog/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"sundog\"\nPKG_VERSION=\"e4b1823ea832aea7aca27e94968665be615c8468\"\nPKG_SHA256=\"5449cdb241a6c2a464fdd42cb8723bc87d1afbeb2f4f1ba3ae0d2d00645d3855\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/laanwj/sundog\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_LONGDESC=\"A port of the Atari ST game SunDog: Frozen Legacy (1984) by FTL software \"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\n  cd src\n  PKG_MAKE_OPTS_TARGET=\" -C ${PKG_BUILD}/src sundog\"\n  sed -i \"s|sdl2-config|${SYSROOT_PREFIX}/usr/bin/sdl2-config|g\" Makefile\n  sed -i \"s|-lreadline|-lreadline -lncurses|g\" Makefile\n}\n\nmakeinstall_target() {\n\tmkdir -p ${INSTALL}/usr/bin\n\tcp ${PKG_BUILD}/src/sundog ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/ti99sim/package.mk",
    "content": "PKG_NAME=\"ti99sim\"\nPKG_VERSION=\"0.16.0\"\nPKG_SHA256=\"14bd72f372fe1a253c3a25bca579d29b5c3e47aff2f22622188dc4023576b159\"\nPKG_LICENSE=\"GPL-3.0\"\nPKG_SITE=\"https://www.mrousseau.org/programs/ti99sim/\"\nPKG_URL=\"https://www.mrousseau.org/programs/ti99sim/archives/ti99sim-${PKG_VERSION}.src.tar.xz\"\n\nPKG_DEPENDS_TARGET=\"toolchain SDL2 openssl\"\nPKG_LONGDESC=\"TI-99/4A Emulator\"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\n  sed -i 's/-march=aarch64/-march=armv8-a/g; s/-march=$(ARCH)/-march=armv8-a/g' \"$PKG_BUILD/rules.mak\" 2>/dev/null || true\n  f=\"$PKG_BUILD/src/core/device-support.cpp\"\n  grep -q '^#include <cstring>' \"$f\" 2>/dev/null || sed -i '/^#include \"cf7+\\.hpp\"$/a #include <cstring>' \"$f\"\n}\n\npre_make_target() { make -C \"$PKG_BUILD/src/core\" CC=\"$CC\" CXX=\"$CXX\" AR=\"$AR\"; }\nmake_target()     { make -C \"$PKG_BUILD/src/sdl\"  CC=\"$CC\" CXX=\"$CXX\" SDL2=1; }\n\nmakeinstall_target() {\n\t\n\tmkdir -p ${INSTALL}/usr/bin\n    cp ${PKG_BUILD}/bin/ti99sim-sdl ${INSTALL}/usr/bin/ti99sim-sdl  \n    chmod +x ${INSTALL}/usr/bin/ti99sim-sdl\n   \n    cp ${PKG_DIR}/scripts/ti99sdlstart.sh ${INSTALL}/usr/bin/ti99sdlstart.sh\n    chmod +x ${INSTALL}/usr/bin/ti99sdlstart.sh\n\t\n\t\t\t\t\t}\n"
  },
  {
    "path": "packages/sx05re/emulators/ti99sim/scripts/ti99sdlstart.sh",
    "content": "#!/bin/bash\n. /etc/profile\n\nROM=\"${1}\"\n\n/usr/bin/ti99sim-sdl --fullscreen --console=/storage/roms/bios/ti-994a.ctg \"${ROM}\""
  },
  {
    "path": "packages/sx05re/emulators/vector06sdl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"vector06sdl\"\nPKG_VERSION=\"5cbd54023df430446e283cb874cac36d71359d73\"\nPKG_SHA256=\"553b018d9a45dc7fb7558583ddf7db12481c29b8ed00a56b22ef41df165ff65a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/svofski/vector06sdl\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain freetype slang alsa\"\nPKG_LONGDESC=\"Opensource Vector-06C emulator in C++\"\n\npre_configure_target() {\nPKG_CMAKE_OPTS_TARGET=\"-DCMAKE_SYSTEM_PROCESSOR=arm -DSDL2_LIBRARY=${SYSROOT_PREFIX}/usr/lib/libSDL2.so -DSDL2_IMAGE_LIBRARY=${SYSROOT_PREFIX}/usr/lib/libSDL2_image.so\"\n#PKG_CONFIGURE_OPTS_TARGET=\" --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-x11 --disable-video-opengl\"\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/vector06sdl/patches/patch.patch",
    "content": "--- a/CMakeLists.txt\n+++ b/CMakeLists.txt\n@@ -7,7 +7,7 @@\n message(\"CMAKE_SYSTEM_NAME is ${CMAKE_SYSTEM_NAME}\")\n \n add_definitions(-Wall)\n-add_definitions(-std=gnu++14)\n+add_definitions(-std=gnu++17)\n add_definitions(-fpermissive)\n add_definitions(-O3)\n #add_definitions(-Rpass=loop-vectorize)\n@@ -45,6 +45,9 @@\n         message(\"Assuming this is Linux on Raspberry Pi\")\n         set(BFDNAME -O elf32-littlearm -B arm)\n         add_definitions(-mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a53 -funsafe-math-optimizations -ftree-vectorize -ftree-vectorizer-verbose=2 -fopt-info-vec)\n+    elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES \"aarch64\")\n+        message(\"Assuming this is aarch64\")\n+        add_definitions(-mcpu=cortex-a53 -funsafe-math-optimizations -ftree-vectorize -ftree-vectorizer-verbose=2 -fopt-info-vec)\n     else()\n         message(\"Looks like it's a desktop Linux on amd64, will use xxd\")\n         set(USE_XXD true) \n@@ -158,7 +161,7 @@\n \n target_link_libraries(v06x ${BOOT_O} ${EXTRA_LIBS})\n \n-set(TEST_SOURCE_FILES test/tests.cpp)\n+#set(TEST_SOURCE_FILES test/tests.cpp)\n include_directories(src)\n-add_executable(tests ${TEST_SOURCE_FILES} boots.o)\n+#add_executable(tests ${TEST_SOURCE_FILES} boots.o)\n \n"
  },
  {
    "path": "packages/sx05re/emulators/viceSA/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"viceSA\"\nPKG_VERSION=\"3.3\"\nPKG_SHA256=\"1a55b38cc988165b077808c07c52a779d181270b28c14b5c9abf4e569137431d\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"https://freefr.dl.sourceforge.net/project/vice-emu/releases\"\nPKG_URL=\"${PKG_SITE}/vice-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_mixer SDL2_ttf xa:host ffmpeg\"\nPKG_LONGDESC=\"VICE is an emulator collection which emulates the C64, the C64-DTV, the C128, the VIC20, practically all PET models, the PLUS4 and the CBM-II (aka C610).\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\" --enable-external-ffmpeg --disable-option-checking --enable-midi --enable-lame --with-zlib --with-jpeg --with-png --enable-x64\"\n\npre_configure_target() {\n\tLDFLAGS=\"${LDFLAGS} -lSDL2\"\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/viceSA/patches/viceSA-001-no-docs.patch",
    "content": "--- a/Makefile.am\n+++ b/Makefile.am\n@@ -6,7 +6,7 @@\n \n # Process this file with automake to produce Makefile.in\n \n-SUBDIRS = src build data man doc\n+SUBDIRS = src build data\n \n # COMMON_EXTRA_DIST is what used to be the EXTRA_DIST, when adding dist\n # files, please add them to the COMMON_EXTRA_DIST list.\n\n"
  },
  {
    "path": "packages/sx05re/emulators/viceSA/xa/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"xa\"\nPKG_VERSION=\"2.3.10\"\nPKG_SHA256=\"867b5b26b6524be8bcfbad8820ab3efe422b3e0cc9775dcb743284778868ba78\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"https://www.floodgap.com/retrotech/xa/dists\"\nPKG_URL=\"${PKG_SITE}/xa-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"xa is a high-speed, two-pass portable cross-assembler. It understands mnemonics and generates code for NMOS 6502s (such as 6502A, 6504, 6507, 6510, 7501, 8500, 8501, 8502 ...), CMOS 6502s (65C02 and Rockwell R65C02) and the 65816. \"\n\nmakeinstall_host() {\n  cp xa ${TOOLCHAIN}/bin/\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/x16/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2025-present Team EmuELEC (https://github.com/EmuELEC)\n\nPKG_NAME=\"x16\"\nPKG_VERSION=\"r49\"\nPKG_SHA256=\"\"\nPKG_LICENSE=\"BSD-2-Clause\"\nPKG_SITE=\"https://github.com/X16Community/x16-emulator\"\nPKG_URL=\"https://github.com/X16Community/x16-emulator/releases/download/${PKG_VERSION}/x16emu_linux-aarch64-${PKG_VERSION}.zip\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_LONGDESC=\"Emulator for the Commander X16 8-bit computer\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  unzip -o ${SOURCES}/${PKG_NAME}/${PKG_SOURCE_NAME} -d ${PKG_BUILD}/\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  mkdir -p ${INSTALL}/usr/share/x16-emulator\n  \n  install -m 0755 ${PKG_BUILD}/x16emu ${INSTALL}/usr/bin/\n  \n  if [ -f ${PKG_BUILD}/rom.bin ]; then\n    install -m 0644 ${PKG_BUILD}/rom.bin ${INSTALL}/usr/share/x16-emulator/\n  fi\n  \n  if [ -f ${PKG_BUILD}/sdcard.img ]; then\n    install -m 0644 ${PKG_BUILD}/sdcard.img ${INSTALL}/usr/share/x16-emulator/\n  fi\n  \n  install -m 0755 ${PKG_DIR}/scripts/x16emustart.sh ${INSTALL}/usr/bin/\n}"
  },
  {
    "path": "packages/sx05re/emulators/x16/scripts/x16emustart.sh",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0\n# Wrapper-script for X16emu\n# Copyright (C) 2025-present worstcase_scenario (https://github.com/worstcase-scenario)\n\nSYSTEM_ROM=\"/usr/share/x16-emulator/rom.bin\"\nUSER_ROM=\"/storage/roms/x16/rom.bin\"\nEMU_BIN=\"/usr/bin/x16emu\"\n\nif [ -f \"${USER_ROM}\" ]; then\n  ROM=\"${USER_ROM}\"\nelif [ -f \"${SYSTEM_ROM}\" ]; then\n  ROM=\"${SYSTEM_ROM}\"\nelse\n  echo \"ERROR: No rom.bin found!\"\n  exit 1\nfi\n\nARGS=(-rom \"${ROM}\" -fullscreen -quality best -scale 2 -joy1 -joy2 -joy3 -joy4)\n\nif [ -n \"$1\" ]; then\n  FILE=\"$1\"\n  EXT=\"${FILE##*.}\"\n\n  case \"${EXT,,}\" in\n    prg|bas)\n      GAME_DIR=\"$(dirname -- \"${FILE}\")\"\n      GAME_BASE=\"$(basename -- \"${FILE}\")\"\n      cd \"${GAME_DIR}\" || exit 1\n      ;;\n  esac\n\n  case \"${EXT,,}\" in\n    prg)\n      ARGS+=(-prg \"${GAME_BASE}\" -run)\n      ;;\n    bas)\n      ARGS+=(-bas \"${GAME_BASE}\" -run)\n      ;;\n    img)\n      ARGS+=(-sdcard \"${FILE}\")\n      ;;\n    crt)\n      ARGS+=(-cart \"${FILE}\")\n      ;;\n  esac\nfi\n\nexec \"${EMU_BIN}\" \"${ARGS[@]}\"\n"
  },
  {
    "path": "packages/sx05re/emulators/xroar/config/xroar.gptk",
    "content": "# XROAR gptokeyb configuration.\n\n# I N S T R U C T I O N S :\n#\n# If you have a game with special keys (for example A for UP, Z for down etc.), change the mapping table beneath accordingly.\n# \n# Then SAVE that modified file under the game's name. For Example: Chuckie Egg Plus (1983)(Burgin, Paul).gptk\n#\n# The correct filepath for the game-gptk file is: /storage/.config/emuelec/configs/xroar/gptk\n#\n# For example: /storage/.config/emuelec/configs/xroar/gptk/Chuckie Egg Plus (1983)(Burgin, Paul).gptk\n#\n# XROAR will automatically load the respective gptk file when starting the game. \n# If no gptk file is found, the emulator will always use \"xroar.gptk\" in /storage/.config/emuelec/configs/xroar/gptk\n#\n#-----------------------------------------------------------------------------------------------------------------------\n#\n# Controller buttons -> keyboard keys\nback  = esc\nstart = enter\n\na = enter\nb = space\nx = 1\ny = 2\n\n# Shoulders/triggers/sticks -> keyboard keys (choose what you want)\nl1 = y\nl2 = n\nl3 = x\nr1 = a\nr2 = z\nr3 = c\n\n# D-pad -> cursor keys\nup = up\ndown = down\nleft = left\nright = right\n\n# Left analog as alternative to D-pad\nleft_analog_up = up\nleft_analog_down = down\nleft_analog_left = left\nleft_analog_right = right\n"
  },
  {
    "path": "packages/sx05re/emulators/xroar/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n\nPKG_NAME=\"xroar\"\nPKG_VERSION=\"2025-07-16\"\nPKG_SHA256=\"25731a74cc9d5888b318c7b6be2dcf981b37cc95138e3dcf4c4d91402544faea\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL-3.0-or-later\"\nPKG_SITE=\"https://github.com/PortsMaster/PortMaster-New\"\nPKG_URL=\"https://github.com/PortsMaster/PortMaster-New/releases/download/2025-07-16_2108/xroar.zip\"\nPKG_SOURCE_NAME=\"xroar.zip\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec/emulators\"\nPKG_SHORTDESC=\"XRoar - Dragon/CoCo Emulator\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  unzip -q ${SOURCES}/${PKG_NAME}/${PKG_SOURCE_NAME} -d ${PKG_BUILD}\n\n  if [ -d \"${PKG_BUILD}/xroar\" ]; then\n    mv ${PKG_BUILD}/xroar/* ${PKG_BUILD}/\n    rmdir ${PKG_BUILD}/xroar\n  fi\n}\n\nmakeinstall_target() {\n\n  mkdir -p ${INSTALL}/usr/bin\n  cp ${PKG_BUILD}/xroar.aarch64 ${INSTALL}/usr/bin/xroar.aarch64\n  chmod +x ${INSTALL}/usr/bin/xroar.aarch64\n\n  cp ${PKG_DIR}/scripts/xroar.sh ${INSTALL}/usr/bin/xroar.sh\n  chmod +x ${INSTALL}/usr/bin/xroar.sh\n\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/xroar\n  cp -r ${PKG_BUILD}/libs.aarch64 ${INSTALL}/usr/config/emuelec/configs/xroar/\n  cp -r ${PKG_BUILD}/gptk ${INSTALL}/usr/config/emuelec/configs/xroar/\n  cp ${PKG_BUILD}/xroar.conf ${INSTALL}/usr/config/emuelec/configs/xroar/\n  cp -r ${PKG_BUILD}/fonts ${INSTALL}/usr/config/emuelec/configs/xroar/\n\n  if [ -f \"${PKG_DIR}/config/xroar.gptk\" ]; then\n    mkdir -p ${INSTALL}/usr/config/emuelec/configs/xroar/gptk\n    cp -f \"${PKG_DIR}/config/xroar.gptk\" \\\n      \"${INSTALL}/usr/config/emuelec/configs/xroar/gptk/xroar.gptk\"\n  fi\n}\n"
  },
  {
    "path": "packages/sx05re/emulators/xroar/scripts/xroar.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present EmuELEC (https://github.com/EmuELEC)\n\n. /etc/profile\n\nROM=\"$1\"\nROMNAME=\"${ROM##*/}\"\nROMBASE=\"${ROMNAME%.*}\"\n\n# Asset directory setup\nASSETDIR=\"/usr/config/emuelec/configs/xroar\"\nexport LD_LIBRARY_PATH=\"${ASSETDIR}/libs.aarch64:${LD_LIBRARY_PATH}\"\n\n# Determine machine type based on ROM path\ncase \"$ROM\" in\n  */dragon32/*) MACHINE=\"dragon32\" ;;\n  */dragon64/*) MACHINE=\"dragon64\" ;;\n  */coco/*)     MACHINE=\"coco\" ;;\n  */coco3/*)    MACHINE=\"coco3\" ;;\n  */mc10/*)     MACHINE=\"mc10\" ;;\n  *)            MACHINE=\"dragon64\" ;;\nesac\n\n# Kill old instances\nkillall -9 gptokeyb 2>/dev/null\n\n# Check for game-specific gptk config\nGPTK_GAME=\"/storage/.config/emuelec/configs/xroar/gptk/${ROMBASE}.gptk\"\nGPTK_DEFAULT=\"/storage/.config/emuelec/configs/xroar/gptk/xroar.gptk\"\n\nif [ -f \"$GPTK_GAME\" ]; then\n    GPTK_CONFIG=\"$GPTK_GAME\"\nelse\n    GPTK_CONFIG=\"$GPTK_DEFAULT\"\nfi\n\n# Start gptokeyb with selected config\ngptokeyb 1 xroar.aarch64 -c \"$GPTK_CONFIG\" &\n\n# Wait for gptokeyb to initialize\nsleep 1\n\n# Launch XRoar\n/usr/bin/xroar.aarch64 -fs -rompath /storage/roms/bios \\\n  -default-machine \"$MACHINE\" \\\n  -run \"$ROM\"\n\n# Cleanup\nkillall -9 gptokeyb 2>/dev/null\n"
  },
  {
    "path": "packages/sx05re/emulators/yabasanshiroSA_1_11/config/input.cfg",
    "content": "<?xml version=\"1.0\"?>\n<inputList>\n\t<inputConfig type=\"joystick\" deviceName=\"Xbox 360 Controller\" deviceGUID=\"030000005e0400008e02000014010000\">\n\t\t<input name=\"a\" type=\"button\" id=\"1\" value=\"1\" />\n\t\t<input name=\"b\" type=\"button\" id=\"0\" value=\"1\" />\n\t\t<input name=\"down\" type=\"hat\" id=\"0\" value=\"4\" />\n\t\t<input name=\"hotkeyenable\" type=\"button\" id=\"8\" value=\"1\" />\n\t\t<input name=\"left\" type=\"hat\" id=\"0\" value=\"8\" />\n\t\t<input name=\"leftanalogdown\" type=\"axis\" id=\"1\" value=\"1\" />\n\t\t<input name=\"leftanalogleft\" type=\"axis\" id=\"0\" value=\"-1\" />\n\t\t<input name=\"leftanalogright\" type=\"axis\" id=\"0\" value=\"1\" />\n\t\t<input name=\"leftanalogup\" type=\"axis\" id=\"1\" value=\"-1\" />\n\t\t<input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\" />\n\t\t<input name=\"leftthumb\" type=\"button\" id=\"9\" value=\"1\" />\n\t\t<input name=\"lefttrigger\" type=\"axis\" id=\"2\" value=\"1\" />\n\t\t<input name=\"right\" type=\"hat\" id=\"0\" value=\"2\" />\n\t\t<input name=\"rightanalogdown\" type=\"axis\" id=\"4\" value=\"1\" />\n\t\t<input name=\"rightanalogleft\" type=\"axis\" id=\"3\" value=\"-1\" />\n\t\t<input name=\"rightanalogright\" type=\"axis\" id=\"3\" value=\"1\" />\n\t\t<input name=\"rightanalogup\" type=\"axis\" id=\"4\" value=\"-1\" />\n\t\t<input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\" />\n\t\t<input name=\"rightthumb\" type=\"button\" id=\"10\" value=\"1\" />\n\t\t<input name=\"righttrigger\" type=\"axis\" id=\"5\" value=\"1\" />\n\t\t<input name=\"select\" type=\"button\" id=\"6\" value=\"1\" />\n\t\t<input name=\"start\" type=\"button\" id=\"7\" value=\"1\" />\n\t\t<input name=\"up\" type=\"hat\" id=\"0\" value=\"1\" />\n\t\t<input name=\"x\" type=\"button\" id=\"3\" value=\"1\" />\n\t\t<input name=\"y\" type=\"button\" id=\"2\" value=\"1\" />\n\t</inputConfig>\n</inputList>\n"
  },
  {
    "path": "packages/sx05re/emulators/yabasanshiroSA_1_11/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2022-present 351ELEC\n# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)\n\nPKG_NAME=\"yabasanshiroSA_1_11\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/sydarn/yabause\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_VERSION=\"a40dace1ae0af3ebd45848549fdf396f40e3930f\"\nPKG_GIT_CLONE_BRANCH=\"pi4-update\"\nPKG_ARCH=\"aarch64\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 boost openal-soft zlib\"\nPKG_LONGDESC=\"Yabause   is a Sega Saturn emulator and took over as  Yaba Sanshiro\"\nPKG_TOOLCHAIN=\"cmake-make\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_BUILD_FLAGS=\"+speed\"\n\npost_unpack() {\n  # use host versions\n  sed -i \"s|COMMAND m68kmake|COMMAND ${PKG_BUILD}/m68kmake_host|\" ${PKG_BUILD}/yabause/src/musashi/CMakeLists.txt\n  sed -i \"s|COMMAND ./bin2c|COMMAND ${PKG_BUILD}/bin2c_host|\" ${PKG_BUILD}/yabause/src/retro_arena/nanogui-sdl/CMakeLists.txt\n}\n\npre_make_target() {\n  # runs on host so make them manually if package is not crosscompile friendly\n  ${HOST_CC} ${PKG_BUILD}/yabause/src/retro_arena/nanogui-sdl/resources/bin2c.c -o ${PKG_BUILD}/bin2c_host\n  ${HOST_CC} ${PKG_BUILD}/yabause/src/musashi/m68kmake.c -o ${PKG_BUILD}/m68kmake_host\n}\n\npre_configure_target() {\n  PKG_CMAKE_OPTS_TARGET=\"${PKG_BUILD}/yabause \"\n\n  #PKG_CMAKE_OPTS_TARGET+=\" -DUSE_EGL=OFF -DUSE_OPENGL=ON\"\n \n\n  case ${ARCH} in\n    aarch64)\n      PKG_CMAKE_OPTS_TARGET+=\" -DYAB_WANT_ARM7=OFF \\\n                               -DYAB_WANT_DYNAREC_DEVMIYAX=ON \\\n                               -DCMAKE_TOOLCHAIN_FILE=${PKG_BUILD}/yabause/src/retro_arena/n2.cmake \\\n                               -DYAB_PORTS=retro_arena\"\n    ;;\n  esac\n\n  #PKG_CMAKE_OPTS_TARGET+=\" -DCMAKE_SYSTEM_PROCESSOR=x86_64\"\n\n  PKG_CMAKE_OPTS_TARGET+=\" -DOPENGL_INCLUDE_DIR=${SYSROOT_PREFIX}/usr/include \\\n                           -DOPENGL_opengl_LIBRARY=${SYSROOT_PREFIX}/usr/lib \\\n                           -DOPENGL_glx_LIBRARY=${SYSROOT_PREFIX}/usr/lib \\\n                           -DLIBPNG_LIB_DIR=${SYSROOT_PREFIX}/usr/lib \\\n                           -Dpng_STATIC_LIBRARIES=${SYSROOT_PREFIX}/usr/lib/libpng16.so \\\n                           -DCMAKE_BUILD_TYPE=Release\"\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp -a ${PKG_BUILD}/src/retro_arena/yabasanshiro ${INSTALL}/usr/bin\ncp -a ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/yabasanshiro\ncp ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/yabasanshiro\n} \n"
  },
  {
    "path": "packages/sx05re/emulators/yabasanshiroSA_1_11/patches/02-yabasanshiroSA-use-system-libpng.patch",
    "content": "--- a/yabause/src/retro_arena/CMakeLists.txt\t2022-01-05 15:44:20.891135756 -0600\n+++ b/yabause/src/retro_arena/CMakeLists.txt\t2022-01-05 15:44:41.738849860 -0600\n@@ -22,7 +22,7 @@\n add_subdirectory(nanogui-sdl)\n \n #include( ../glfw/external_zlib.cmake )\n-include( ${CMAKE_SOURCE_DIR}/CMake/Packages/external_libpng.cmake )\n+#include( ${CMAKE_SOURCE_DIR}/CMake/Packages/external_libpng.cmake )\n \n #------------------------------------------------------------------------------\n # nlohmann/json\n"
  },
  {
    "path": "packages/sx05re/emulators/yabasanshiroSA_1_11/patches/04-yabasanshiroSA-use-paths.patch",
    "content": "diff --git a/yabause/src/retro_arena/InputManager.cpp b/yabause/src/retro_arena/InputManager.cpp\nindex bd806736..c32af4a7 100644\n--- a/yabause/src/retro_arena/InputManager.cpp\n+++ b/yabause/src/retro_arena/InputManager.cpp\n@@ -213,7 +213,7 @@ int mapKeys( const json & configs ){\n \n   if( SDL_NumJoysticks() == 0 ){\n \n-    PADLOG(\"No joy stic is found force to keyboard\\n\");\n+    PADLOG(\"No joystick is found force to keyboard\\n\");\n     padbits = PerPadAdd(&PORTDATA1);\n     if( configs.find(\"player1\") == configs.end() ){\n       return setDefalutSettings(padbits);\n@@ -460,22 +460,22 @@ int getPlayerJsonFromInputConfig( int joy, InputConfig * inputconfig, json & pla\n   }\n \n   Input result;\n-  inputconfig->getInputByName(\"a\", &result);\n+  inputconfig->getInputByName(\"y\", &result);\n   player[guid][\"a\"] ={ { \"type\", input_types[result.type] },{ \"id\", result.id },{ \"value\", result.value } };\n \n   inputconfig->getInputByName(\"b\", &result);\n   player[guid][\"b\"] = { { \"type\", input_types[result.type] },{ \"id\", result.id },{ \"value\", result.value } };\n \n-  inputconfig->getInputByName(\"rightshoulder\", &result);\n+  inputconfig->getInputByName(\"a\", &result);\n   player[guid][\"c\"] = { { \"type\", input_types[result.type] },{ \"id\", result.id },{ \"value\", result.value } } ;\n \n   inputconfig->getInputByName(\"x\", &result);\n   player[guid][\"x\"] = { { \"type\", input_types[result.type] },{ \"id\", result.id },{ \"value\", result.value } };\n \n-  inputconfig->getInputByName(\"y\", &result);\n+  inputconfig->getInputByName(\"leftshoulder\", &result);\n   player[guid][\"y\"] = { { \"type\", input_types[result.type] },{ \"id\", result.id },{ \"value\", result.value } };\n \n-  inputconfig->getInputByName(\"leftshoulder\", &result);\n+  inputconfig->getInputByName(\"rightshoulder\", &result);\n   player[guid][\"z\"] = { { \"type\", input_types[result.type] },{ \"id\", result.id },{ \"value\", result.value } };\n \n   inputconfig->getInputByName(\"lefttrigger\", &result);\n@@ -1209,7 +1209,7 @@ void InputManager::writeDeviceConfig(InputConfig* config)\n std::string InputManager::getConfigPath()\n {\n   std::string path = getenv(\"HOME\");\n-  path += \"/.emulationstation/es_temporaryinput.cfg\";\n+  path = \"/storage/roms/saturn/yabasanshiro/input.cfg\";\n   return path;\n }\n \ndiff --git a/yabause/src/retro_arena/Preference.cpp b/yabause/src/retro_arena/Preference.cpp\nindex 1108c843..49815002 100644\n--- a/yabause/src/retro_arena/Preference.cpp\n+++ b/yabause/src/retro_arena/Preference.cpp\n@@ -17,7 +17,7 @@ Preference::Preference( const std::string & filename ){\n   }\n \n   std::string home_dir = getenv(\"HOME\");\n-  home_dir += \"/.yabasanshiro/\";\n+  home_dir = \"/storage/.config/yabasanshiro/\";\n \n   this->filename = home_dir + input_trace_filename + \".config\";\n \ndiff --git a/yabause/src/retro_arena/main.cpp b/yabause/src/retro_arena/main.cpp\nindex 3b3b581c..dacfee8e 100644\n--- a/yabause/src/retro_arena/main.cpp\n+++ b/yabause/src/retro_arena/main.cpp\n@@ -290,14 +290,14 @@ int main(int argc, char** argv)\n \n   // Inisialize home directory\n   std::string home_dir = getenv(\"HOME\");\n-  home_dir += \"/.yabasanshiro/\";\n+  home_dir = \"/storage/roms/saturn/yabasanshiro/\";\n   struct stat st = {0};\n   if (stat(home_dir.c_str(), &st) == -1) {\n     mkdir(home_dir.c_str(), 0700);\n   }  \n-  std::string bckup_dir = home_dir + \"backup.bin\";\n+  std::string bckup_dir = \"/storage/roms/bios/yabasanshiro/backup.bin\";\n   strcpy( buppath, bckup_dir.c_str() );\n-  strcpy( s_savepath, home_dir.c_str() );\n+  strcpy( s_savepath, \"/storage/roms/savestates/saturn\" );\n   g_keymap_filename = home_dir + \"keymapv2.json\";\n \n   std::string current_exec_name = argv[0]; // Name of the current exec program\n@@ -601,7 +601,7 @@ int main(int argc, char** argv)\n         if( ret == 0 ){\n           char pngname[256];\n           snprintf(pngname,256,\"%s/%s_%d.png\", s_savepath, cdip->itemnum, e.user.code);\n-          fs::copy(tmpfilename, pngname, fs::copy_options::overwrite_existing );\n+          system((std::string(\"cp -f \") + tmpfilename + \" \" + pngname).c_str());\n         }\n         hideMenuScreen();\n       }\n"
  },
  {
    "path": "packages/sx05re/emulators/yabasanshiroSA_1_11/scripts/set_yabasanshiro_joy.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Langerz82 (https://github.com/Langerz82)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# Configure ADVMAME players based on ES settings\nCONFIG_DIR=\"/storage/roms/saturn/yabasanshiro\"\nCONFIG=\"${CONFIG_DIR}/keymapv2.json\"\n\nCONFIG_TMP=/tmp/jc/yabasan.tmp\n\nsource /usr/bin/joy_common.sh \"yabasanshiro\"\n\ndeclare -A GC_VALUES=(\n[h0.1]=\"1\"\n[h0.4]=\"4\"\n[h0.8]=\"8\"\n[h0.2]=\"2\"\n\n[b0]=\"0\"\n[b1]=\"1\"\n[b2]=\"2\"\n[b3]=\"3\"\n[b4]=\"4\"\n[b5]=\"5\"\n[b6]=\"6\"\n[b7]=\"7\"\n[b8]=\"8\"\n[b9]=\"9\"\n[b10]=\"10\"\n[b11]=\"11\"\n[b12]=\"12\"\n[b13]=\"13\"\n[b14]=\"14\"\n[b15]=\"15\"\n[b16]=\"16\"\n\n[a0]=\"0\"\n[a1]=\"1\"\n[a2]=\"2\"\n[a3]=\"3\"\n[a4]=\"4\"\n[a5]=\"5\"\n)\n\ndeclare -A GC_TYPES=(\n[h0.1]=\"hat\"\n[h0.4]=\"hat\"\n[h0.8]=\"hat\"\n[h0.2]=\"hat\"\n\n[b0]=\"button\"\n[b1]=\"button\"\n[b2]=\"button\"\n[b3]=\"button\"\n[b4]=\"button\"\n[b5]=\"button\"\n[b6]=\"button\"\n[b7]=\"button\"\n[b8]=\"button\"\n[b9]=\"button\"\n[b10]=\"button\"\n[b11]=\"button\"\n[b12]=\"button\"\n[b13]=\"button\"\n[b14]=\"button\"\n[b15]=\"button\"\n[b16]=\"button\"\n\n[a0]=\"axis\"\n[a1]=\"axis\"\n[a2]=\"axis\"\n[a3]=\"axis\"\n[a4]=\"axis\"\n[a5]=\"axis\"\n)\n\ndeclare -A GC_BUTTONS=(\n  [dpleft]=\"left\"\n  [dpright]=\"right\"\n  [dpup]=\"up\"\n  [dpdown]=\"down\"\n  [x]=\"y\"\n  [y]=\"x\"\n  [a]=\"b\"\n  [b]=\"a\"\n  [leftshoulder]=\"l\"\n  [rightshoulder]=\"r\"\n  [lefttrigger]=\"z\"\n  [righttrigger]=\"c\"\n  #[leftstick]=\"\"\n  #[rightstick]=\"\"\n  [back]=\"select\"\n  [start]=\"start\"\n  #[guide]=\"\"\n  [leftx0]=\"analogx\"\n  [leftx1]=\"analogy\"\n  [leftx2]=\"analogleft\"\n  [lefty0]=\"analogl\"\n  [lefty1]=\"analogr\"\n  [lefty2]=\"analogright\"\n)\n\n# Cleans all the inputs for the gamepad with name ${GAMEPAD} and player ${1}\nclean_pad() {\n  [[ -f \"${CONFIG_TMP}\" ]] && rm \"${CONFIG_TMP}\"\n}\n\n# Sets pad depending on parameters.\n# ${1} = Player Number\n# ${2} = js[0-7]\n# ${3} = Device GUID\n# ${4} = Device Name\n\nset_pad() {\n  local DEVICE_GUID=${3}\n  local JOY_NAME=\"${4}\"\n\n  echo \"DEVICE_GUID=${DEVICE_GUID}\"\n\n  local GC_CONFIG=\"${5}\"\n  echo \"GC_CONFIG=${GC_CONFIG}\"\n  [[ -z ${GC_CONFIG} ]] && return\n\n  touch \"${CONFIG_TMP}\"\n\n  local GC_MAP=$(echo ${GC_CONFIG} | cut -d',' -f3-)\n\n  [[ \"${1}\" != \"1\" ]] && echo \",\" >> ${CONFIG_TMP}\n\n  declare -i JOY_INDEX=$(( ${1} - 1 ))\n  echo -e \"\\t\\\"${JOY_INDEX}_${JOY_NAME}_${DEVICE_GUID}\\\": {\" >> ${CONFIG_TMP}\n\n  local ADD_ANALOG=0\n\n  local LINE_INSERT=\n  set -f\n  local GC_ARRAY=(${GC_MAP//,/ })\n  for index in \"${!GC_ARRAY[@]}\"\n  do\n      local REC=${GC_ARRAY[${index}]}\n      local BUTTON_INDEX=$(echo ${REC} | cut -d \":\" -f 1)\n      local TVAL=$(echo ${REC} | cut -d \":\" -f 2)\n      local BUTTON_VAL=${TVAL:1}\n      local GC_INDEX=\"${GC_BUTTONS[${BUTTON_INDEX}]}\"\n      local BTN_TYPE=${TVAL:0:1}\n      local VAL=\"${GC_VALUES[${TVAL}]}\"\n      local TYPE=\"${GC_TYPES[${TVAL}]}\"\n\n      # CREATE BUTTON MAPS (inlcuding hats).\n      if [[ ! -z \"${GC_INDEX}\" ]]; then\n        if [[ \"${BTN_TYPE}\" == \"b\" ]]; then\n          [[ ! -z \"${VAL}\" ]] && echo -e \"\\t\\t\\\"${GC_INDEX}\\\": { \\\"id\\\": ${VAL}, \\\"type\\\": \\\"${TYPE}\\\", \\\"value\\\": 1 },\" >> ${CONFIG_TMP}\n        fi\n        if [[ \"${BTN_TYPE}\" == \"h\" ]]; then\n          [[ ! -z \"${VAL}\" ]] && echo -e \"\\t\\t\\\"${GC_INDEX}\\\": { \\\"id\\\": 0, \\\"type\\\": \\\"${TYPE}\\\", \\\"value\\\": ${VAL} },\" >> ${CONFIG_TMP}\n        fi\n        if [[ \"${BTN_TYPE}\" == \"a\" ]]; then\n          case ${BUTTON_INDEX} in\n            leftx|lefty|rightx|righty)\n              ;;\n          esac\n          [[ ! -z \"${VAL}\" ]] && echo -e \"\\t\\t\\\"${GC_INDEX}\\\": { \\\"id\\\": ${VAL}, \\\"type\\\": \\\"${TYPE}\\\", \\\"value\\\": 1 },\" >> ${CONFIG_TMP}\n        fi\n      fi\n      if [[ \"${BTN_TYPE}\" == \"a\" ]]; then\n        case ${BUTTON_INDEX} in\n          leftx|lefty)\n            #ADD_ANALOG=1\n            GC_INDEX=\"${GC_BUTTONS[${BUTTON_INDEX}0]}\"\n            echo -e \"\\t\\t\\\"${GC_INDEX}\\\": { \\\"id\\\": ${VAL}, \\\"type\\\": \\\"${TYPE}\\\", \\\"value\\\": -1 },\" >> ${CONFIG_TMP}\n            GC_INDEX=\"${GC_BUTTONS[${BUTTON_INDEX}1]}\"\n            echo -e \"\\t\\t\\\"${GC_INDEX}\\\": { \\\"id\\\": ${VAL}, \\\"type\\\": \\\"${TYPE}\\\", \\\"value\\\": 1 },\" >> ${CONFIG_TMP}\n            GC_INDEX=\"${GC_BUTTONS[${BUTTON_INDEX}2]}\"\n            echo -e \"\\t\\t\\\"${GC_INDEX}\\\": { \\\"id\\\": ${VAL}, \\\"type\\\": \\\"${TYPE}\\\", \\\"value\\\": 1 },\" >> ${CONFIG_TMP}\n            ;;\n        esac\n      fi      \n  done\n\n  # remove last character\n  sed -i '$ s/.$//' ${CONFIG_TMP}\n\n  echo -e \"\\t},\" >> ${CONFIG_TMP}\n  echo -e \"\\t\\\"player${1}\\\": {\" >> ${CONFIG_TMP}\n  echo -e \"\\t\\t\\\"DeviceID\\\": ${JOY_INDEX},\" >> ${CONFIG_TMP}\n  echo -e \"\\t\\t\\\"deviceGUID\\\": \\\"${DEVICE_GUID}\\\",\" >> ${CONFIG_TMP}\n  echo -e \"\\t\\t\\\"deviceName\\\": \\\"${JOY_NAME}\\\",\" >> ${CONFIG_TMP}\n  echo -e \"\\t\\t\\\"padmode\\\": ${ADD_ANALOG}\" >> ${CONFIG_TMP}\n  echo -e \"\\t}\" >> ${CONFIG_TMP}\n\n  cat \"${CONFIG_TMP}\" >> ${CONFIG}\n\n  rm \"${CONFIG_TMP}\"\n}\n\nrm ${CONFIG}\necho \"{\" >> ${CONFIG}\n\njc_get_players\n\necho \"}\" >> ${CONFIG}\n"
  },
  {
    "path": "packages/sx05re/emulators/yabasanshiroSA_1_11/scripts/yabasanshiro.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nmkdir -p \"/storage/roms/saturn/yabasanshiro/\"\nmkdir -p \"/storage/roms/bios/yabasanshiro/\"\n\nROMNAME=$(basename \"${1}\")\nBIOS=\"\"\n\n# Gamepad Autoconfiguration\nGAMEPAD=$(sdljoytest -skip_loop | grep \"0 name\" | sed \"s|Joystick 0 name ||\")\nGAMEPADCONFIG=$(xmlstarlet sel -t -c \"//inputList/inputConfig[@deviceName=${GAMEPAD}]\" -n /storage/.emulationstation/es_input.cfg)\n\nif [ ! -z \"${GAMEPADCONFIG}\" ]; then\n    echo -e \"<?xml version=\\\"1.0\\\"?>\\n<inputList>\" > \"/storage/roms/saturn/yabasanshiro/input.cfg\"\n    echo \"${GAMEPADCONFIG}\" >> \"/storage/roms/saturn/yabasanshiro/input.cfg\"\n    echo \"</inputList>\" >> \"/storage/roms/saturn/yabasanshiro/input.cfg\"\nfi\n\n# if the auto config was not succesful copy the default just in case.\nif [ ! -e \"/storage/roms/saturn/yabasanshiro/input.cfg\" ]; then\n    cp -rf \"/emuelec/configs/yabasanshiro/input.cfg\" \"/storage/roms/saturn/yabasanshiro/input.cfg\"\nfi\n\nHLEBIOS=$(get_ee_setting hlebios saturn \"${ROMNAME}\")\n\nif [ \"${HLEBIOS}\" != 1 ]; then \n    if [ -e \"/storage/roms/bios/saturn_bios.bin\" ]; then\n        BIOS=\"-b /storage/roms/bios/saturn_bios.bin\"\n    else\n        text_viewer -w -t \"Notice! Yabasanshiro BIOS Missing!\" -f 24 -m \"/storage/roms/bios/saturn_bios.bin was not found!\\n\\nYabasanshiro will continue to load with HLE BIOS\\n\\nTo avoid this message please copy saturn_bios.bin with checksum af5828fdff51384f99b3c4926be27762 to /storage/roms/bios/\\n\\nOr select \\\"USE HLE BIOS\\\" on the emulator options\"\n        BIOS=\"\"\n    fi\nfi\n\n# It should be disabled by default unless the user enables it.\nAUTOGP=$(get_ee_setting yabasanshiro_auto_gamepad)\nif [[ \"${AUTOGP}\" == \"1\" ]]; then\n  cp -f /storage/.emulationstation/es_input.cfg /storage/roms/saturn/yabasanshiro/input.cfg\n  set_yabasanshiro_joy.sh\nfi\n\n# We use { } to avoid SIGUSR signal showing text and messing up with the error handling\n{ yabasanshiro -r 2 -i \"${1}\" ${BIOS}; } > /emuelec/logs/emuelec.log 2>&1\n"
  },
  {
    "path": "packages/sx05re/emulators/yabasanshiroSA_1_5/config/input.cfg",
    "content": "<?xml version=\"1.0\"?>\n<inputList>\n\t<inputConfig type=\"joystick\" deviceName=\"Xbox 360 Controller\" deviceGUID=\"030000005e0400008e02000014010000\">\n\t\t<input name=\"a\" type=\"button\" id=\"1\" value=\"1\" />\n\t\t<input name=\"b\" type=\"button\" id=\"0\" value=\"1\" />\n\t\t<input name=\"down\" type=\"hat\" id=\"0\" value=\"4\" />\n\t\t<input name=\"hotkeyenable\" type=\"button\" id=\"8\" value=\"1\" />\n\t\t<input name=\"left\" type=\"hat\" id=\"0\" value=\"8\" />\n\t\t<input name=\"leftanalogdown\" type=\"axis\" id=\"1\" value=\"1\" />\n\t\t<input name=\"leftanalogleft\" type=\"axis\" id=\"0\" value=\"-1\" />\n\t\t<input name=\"leftanalogright\" type=\"axis\" id=\"0\" value=\"1\" />\n\t\t<input name=\"leftanalogup\" type=\"axis\" id=\"1\" value=\"-1\" />\n\t\t<input name=\"leftshoulder\" type=\"button\" id=\"4\" value=\"1\" />\n\t\t<input name=\"leftthumb\" type=\"button\" id=\"9\" value=\"1\" />\n\t\t<input name=\"lefttrigger\" type=\"axis\" id=\"2\" value=\"1\" />\n\t\t<input name=\"right\" type=\"hat\" id=\"0\" value=\"2\" />\n\t\t<input name=\"rightanalogdown\" type=\"axis\" id=\"4\" value=\"1\" />\n\t\t<input name=\"rightanalogleft\" type=\"axis\" id=\"3\" value=\"-1\" />\n\t\t<input name=\"rightanalogright\" type=\"axis\" id=\"3\" value=\"1\" />\n\t\t<input name=\"rightanalogup\" type=\"axis\" id=\"4\" value=\"-1\" />\n\t\t<input name=\"rightshoulder\" type=\"button\" id=\"5\" value=\"1\" />\n\t\t<input name=\"rightthumb\" type=\"button\" id=\"10\" value=\"1\" />\n\t\t<input name=\"righttrigger\" type=\"axis\" id=\"5\" value=\"1\" />\n\t\t<input name=\"select\" type=\"button\" id=\"6\" value=\"1\" />\n\t\t<input name=\"start\" type=\"button\" id=\"7\" value=\"1\" />\n\t\t<input name=\"up\" type=\"hat\" id=\"0\" value=\"1\" />\n\t\t<input name=\"x\" type=\"button\" id=\"3\" value=\"1\" />\n\t\t<input name=\"y\" type=\"button\" id=\"2\" value=\"1\" />\n\t</inputConfig>\n</inputList>\n"
  },
  {
    "path": "packages/sx05re/emulators/yabasanshiroSA_1_5/package.mk",
    "content": "PKG_NAME=\"yabasanshiroSA_1_5\"\nPKG_VERSION=\"f6f41dd6485c638ab661f3acd2951c9522f34450\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/devmiyax/yabause\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 boost openal-soft ${OPENGLES} zlib\"\nPKG_LONGDESC=\"Yabause is a Sega Saturn emulator and took over as Yaba Sanshiro\"\nPKG_TOOLCHAIN=\"cmake-make\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_GIT_CLONE_BRANCH=\"pi4\"\n#PKG_BUILD_FLAGS=\"+speed\"\n\npost_unpack() {\n  # use host versions\n  sed -i \"s|COMMAND m68kmake|COMMAND ${PKG_BUILD}/m68kmake_host|\" ${PKG_BUILD}/yabause/src/musashi/CMakeLists.txt\n  sed -i \"s|COMMAND ./bin2c|COMMAND ${PKG_BUILD}/bin2c_host|\" ${PKG_BUILD}/yabause/src/retro_arena/nanogui-sdl/CMakeLists.txt\n}\n\npre_make_target() {\n  # runs on host so make them manually if  package is not crosscompile friendly\n  $HOST_CC ${PKG_BUILD}/yabause/src/retro_arena/nanogui-sdl/resources/bin2c.c -o ${PKG_BUILD}/bin2c_host\n  $HOST_CC ${PKG_BUILD}/yabause/src/musashi/m68kmake.c -o ${PKG_BUILD}/m68kmake_host\n}\n\npre_configure_target() {\nPKG_CMAKE_OPTS_TARGET=\"${PKG_BUILD}/yabause \\\n                         -DYAB_PORTS=retro_arena \\\n                         -DYAB_WANT_DYNAREC_DEVMIYAX=ON \\\n                         -DYAB_WANT_ARM7=OFF \\\n                         -DCMAKE_TOOLCHAIN_FILE=${PKG_BUILD}/yabause/src/retro_arena/n2.cmake \\\n                         -DYAB_WANT_VULKAN=OFF \\\n                         -DOPENGL_INCLUDE_DIR=${SYSROOT_PREFIX}/usr/include \\\n                         -DOPENGL_opengl_LIBRARY=${SYSROOT_PREFIX}/usr/lib \\\n                         -DOPENGL_glx_LIBRARY=${SYSROOT_PREFIX}/usr/lib \\\n                         -DLIBPNG_LIB_DIR=${SYSROOT_PREFIX}/usr/lib \\\n                         -Dpng_STATIC_LIBRARIES=${SYSROOT_PREFIX}/usr/lib/libpng16.a \\\n\t\t\t                   -DCMAKE_BUILD_TYPE=Release\"\n                         \nif [[ ${DEVICE} == \"OdroidGoAdvance\" || ${DEVICE} == \"GameForce\" ]]; then\n\tPKG_CMAKE_OPTS_TARGET+=\" -DCMAKE_BUILD_TYPE=Release\"\nfi\n\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp -a ${PKG_BUILD}/src/retro_arena/yabasanshiro ${INSTALL}/usr/bin/yabasanshiro1_5\ncp -a ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/yabasanshiro1_5\ncp ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/yabasanshiro1_5\n} \n"
  },
  {
    "path": "packages/sx05re/emulators/yabasanshiroSA_1_5/patches/01-yabasanshiroSA-EmuELEC-add-missing-include.patch",
    "content": "--- a/yabause/src/threads.h\t2022-01-05 15:41:03.685887385 -0600\n+++ b/yabause/src/threads.h\t2022-01-05 15:43:05.404177636 -0600\n@@ -115,6 +115,8 @@\n \r\n int YabCopyFile(const char * src, const char * dst);\r\n int YabMakeCleanDir( const char * dirname );\r\n+\r\n+#include <core.h>\r\n int YabNanosleep(u64 ns);\r\n \r\n ///////////////////////////////////////////////////////////////////////////\r\n"
  },
  {
    "path": "packages/sx05re/emulators/yabasanshiroSA_1_5/patches/02-yabasanshiroSA-EmuELEC-use-system-libpng.patch",
    "content": "--- a/yabause/src/retro_arena/CMakeLists.txt\t2022-01-05 15:44:20.891135756 -0600\n+++ b/yabause/src/retro_arena/CMakeLists.txt\t2022-01-05 15:44:41.738849860 -0600\n@@ -22,7 +22,7 @@\n add_subdirectory(nanogui-sdl)\n \n #include( ../glfw/external_zlib.cmake )\n-include( ${CMAKE_SOURCE_DIR}/CMake/Packages/external_libpng.cmake )\n+#include( ${CMAKE_SOURCE_DIR}/CMake/Packages/external_libpng.cmake )\n \n #------------------------------------------------------------------------------\n # nlohmann/json\n"
  },
  {
    "path": "packages/sx05re/emulators/yabasanshiroSA_1_5/patches/03-yabasanshiroSA-removegl3ext.patch",
    "content": "--- a/yabause/src/ygl.h\n+++ b/yabause/src/ygl.h\n@@ -50,7 +50,6 @@\n     #include <glsm/glsm.h>\n #elif defined(__ANDROID__)\n     #include <GLES3/gl31.h>\n-    #include <GLES3/gl3ext.h>\n     #include <EGL/egl.h>\n \n \n--- a/yabause/src/nanovg/nanovg_osdcore.c\n+++ b/yabause/src/nanovg/nanovg_osdcore.c\n@@ -36,7 +36,6 @@\n \n #if defined(_OGLES3_)\n #include <GLES3/gl3.h>\n-#include <GLES3/gl3ext.h>\n #else\n #include \"ygl.h\"\n #endif\n"
  },
  {
    "path": "packages/sx05re/emulators/yabasanshiroSA_1_5/patches/04-yabasanshiroSA-use-EmuELEC-paths.patch",
    "content": "--- a/yabause/src/retro_arena/main.cpp\n+++ b/yabause/src/retro_arena/main.cpp\n@@ -286,7 +286,7 @@\n \n   // Inisialize home directory\n   std::string home_dir = getenv(\"HOME\");\n-  home_dir += \"/.yabasanshiro/\";\n+  home_dir = \"/storage/roms/saturn/yabasanshiro1_5/\";\n   struct stat st = {0};\n   if (stat(home_dir.c_str(), &st) == -1) {\n     mkdir(home_dir.c_str(), 0700);\n@@ -597,7 +597,9 @@\n         if( ret == 0 ){\n           char pngname[256];\n           snprintf(pngname,256,\"%s/%s_%d.png\", s_savepath, cdip->itemnum, e.user.code);\n-          fs::copy(tmpfilename, pngname, fs::copy_options::overwrite_existing );\n+          //fs::copy(tmpfilename, pngname, fs::copy_options::overwrite_existing );\n+\n+           system((std::string(\"cp -f \") + tmpfilename + \" \" + pngname).c_str()); \n         }\n         hideMenuScreen();\n       }\n\n--- a/yabause/src/retro_arena/Preference.cpp\n+++ b/yabause/src/retro_arena/Preference.cpp\n@@ -17,7 +17,7 @@\n   }\n \n   std::string home_dir = getenv(\"HOME\");\n-  home_dir += \"/.yabasanshiro/\";\n+  home_dir = \"/storage/roms/saturn/yabasanshiro1_5/\";\n \n   this->filename = home_dir + input_trace_filename + \".config\";\n \n--- a/yabause/src/retro_arena/InputManager.cpp\n+++ b/yabause/src/retro_arena/InputManager.cpp\n@@ -213,7 +213,7 @@\n \n   if( SDL_NumJoysticks() == 0 ){\n \n-    PADLOG(\"No joy stic is found force to keyboard\\n\");\n+    PADLOG(\"No joystick is found force to keyboard\\n\");\n     padbits = PerPadAdd(&PORTDATA1);\n     if( configs.find(\"player1\") == configs.end() ){\n       return setDefalutSettings(padbits);\n@@ -460,22 +460,22 @@\n   }\n \n   Input result;\n-  inputconfig->getInputByName(\"a\", &result);\n+  inputconfig->getInputByName(\"y\", &result);\n   player[guid][\"a\"] ={ { \"type\", input_types[result.type] },{ \"id\", result.id },{ \"value\", result.value } };\n \n   inputconfig->getInputByName(\"b\", &result);\n   player[guid][\"b\"] = { { \"type\", input_types[result.type] },{ \"id\", result.id },{ \"value\", result.value } };\n \n-  inputconfig->getInputByName(\"rightshoulder\", &result);\n+  inputconfig->getInputByName(\"a\", &result);\n   player[guid][\"c\"] = { { \"type\", input_types[result.type] },{ \"id\", result.id },{ \"value\", result.value } } ;\n \n   inputconfig->getInputByName(\"x\", &result);\n   player[guid][\"x\"] = { { \"type\", input_types[result.type] },{ \"id\", result.id },{ \"value\", result.value } };\n \n-  inputconfig->getInputByName(\"y\", &result);\n+  inputconfig->getInputByName(\"leftshoulder\", &result);\n   player[guid][\"y\"] = { { \"type\", input_types[result.type] },{ \"id\", result.id },{ \"value\", result.value } };\n \n-  inputconfig->getInputByName(\"leftshoulder\", &result);\n+  inputconfig->getInputByName(\"rightshoulder\", &result);\n   player[guid][\"z\"] = { { \"type\", input_types[result.type] },{ \"id\", result.id },{ \"value\", result.value } };\n \n   inputconfig->getInputByName(\"lefttrigger\", &result);\n@@ -1209,7 +1209,7 @@\n std::string InputManager::getConfigPath()\n {\n   std::string path = getenv(\"HOME\");\n-  path += \"/.emulationstation/es_temporaryinput.cfg\";\n+  path = \"/storage/roms/saturn/yabasanshiro1_5/input.cfg\";\n   return path;\n }\n \n"
  },
  {
    "path": "packages/sx05re/emulators/yabasanshiroSA_1_5/scripts/set_yabasanshiro_joy.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Langerz82 (https://github.com/Langerz82)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# Configure ADVMAME players based on ES settings\nCONFIG_DIR=\"/storage/roms/saturn/yabasanshiro1_5\"\nCONFIG=\"${CONFIG_DIR}/keymapv2.json\"\n\nCONFIG_TMP=/tmp/jc/yabasan.tmp\n\nsource /usr/bin/joy_common.sh \"yabasanshiro\"\n\ndeclare -A GC_VALUES=(\n[h0.1]=\"1\"\n[h0.4]=\"4\"\n[h0.8]=\"8\"\n[h0.2]=\"2\"\n\n[b0]=\"0\"\n[b1]=\"1\"\n[b2]=\"2\"\n[b3]=\"3\"\n[b4]=\"4\"\n[b5]=\"5\"\n[b6]=\"6\"\n[b7]=\"7\"\n[b8]=\"8\"\n[b9]=\"9\"\n[b10]=\"10\"\n[b11]=\"11\"\n[b12]=\"12\"\n[b13]=\"13\"\n[b14]=\"14\"\n[b15]=\"15\"\n[b16]=\"16\"\n\n[a0]=\"0\"\n[a1]=\"1\"\n[a2]=\"2\"\n[a3]=\"3\"\n[a4]=\"4\"\n[a5]=\"5\"\n)\n\ndeclare -A GC_TYPES=(\n[h0.1]=\"hat\"\n[h0.4]=\"hat\"\n[h0.8]=\"hat\"\n[h0.2]=\"hat\"\n\n[b0]=\"button\"\n[b1]=\"button\"\n[b2]=\"button\"\n[b3]=\"button\"\n[b4]=\"button\"\n[b5]=\"button\"\n[b6]=\"button\"\n[b7]=\"button\"\n[b8]=\"button\"\n[b9]=\"button\"\n[b10]=\"button\"\n[b11]=\"button\"\n[b12]=\"button\"\n[b13]=\"button\"\n[b14]=\"button\"\n[b15]=\"button\"\n[b16]=\"button\"\n\n[a0]=\"axis\"\n[a1]=\"axis\"\n[a2]=\"axis\"\n[a3]=\"axis\"\n[a4]=\"axis\"\n[a5]=\"axis\"\n)\n\ndeclare -A GC_BUTTONS=(\n  [dpleft]=\"left\"\n  [dpright]=\"right\"\n  [dpup]=\"up\"\n  [dpdown]=\"down\"\n  [x]=\"y\"\n  [y]=\"x\"\n  [a]=\"b\"\n  [b]=\"a\"\n  [leftshoulder]=\"z\"\n  [rightshoulder]=\"c\"\n  [lefttrigger]=\"l\"\n  [righttrigger]=\"r\"\n  #[leftstick]=\"\"\n  #[rightstick]=\"\"\n  [back]=\"select\"\n  [start]=\"start\"\n  #[guide]=\"\"\n  [leftx0]=\"analogx\"\n  [leftx1]=\"analogy\"\n  [lefty0]=\"analogl\"\n  [lefty1]=\"analogr\"\n)\n\n# Cleans all the inputs for the gamepad with name ${GAMEPAD} and player ${1}\nclean_pad() {\n  [[ -f \"${CONFIG_TMP}\" ]] && rm \"${CONFIG_TMP}\"\n}\n\n# Sets pad depending on parameters.\n# ${1} = Player Number\n# ${2} = js[0-7]\n# ${3} = Device GUID\n# ${4} = Device Name\n\nset_pad() {\n  local DEVICE_GUID=${3}\n  local JOY_NAME=\"${4}\"\n\n  echo \"DEVICE_GUID=${DEVICE_GUID}\"\n\n  local GC_CONFIG=\"${5}\"\n  echo \"GC_CONFIG=${GC_CONFIG}\"\n  [[ -z ${GC_CONFIG} ]] && return\n\n  touch \"${CONFIG_TMP}\"\n\n  local GC_MAP=$(echo ${GC_CONFIG} | cut -d',' -f3-)\n\n  [[ \"${1}\" != \"1\" ]] && echo \",\" >> ${CONFIG_TMP}\n\n  declare -i JOY_INDEX=$(( ${1} - 1 ))\n  echo -e \"\\t\\\"${JOY_INDEX}_${JOY_NAME}_${DEVICE_GUID}\\\": {\" >> ${CONFIG_TMP}\n\n  local ADD_ANALOG=0\n\n  local LINE_INSERT=\n  set -f\n  local GC_ARRAY=(${GC_MAP//,/ })\n  for index in \"${!GC_ARRAY[@]}\"\n  do\n      local REC=${GC_ARRAY[${index}]}\n      local BUTTON_INDEX=$(echo ${REC} | cut -d \":\" -f 1)\n      local TVAL=$(echo ${REC} | cut -d \":\" -f 2)\n      local BUTTON_VAL=${TVAL:1}\n      local GC_INDEX=\"${GC_BUTTONS[${BUTTON_INDEX}]}\"\n      local BTN_TYPE=${TVAL:0:1}\n      local VAL=\"${GC_VALUES[${TVAL}]}\"\n      local TYPE=\"${GC_TYPES[${TVAL}]}\"\n\n      # CREATE BUTTON MAPS (inlcuding hats).\n      if [[ ! -z \"${GC_INDEX}\" ]]; then\n        if [[ \"${BTN_TYPE}\" == \"b\" ]]; then\n          [[ ! -z \"${VAL}\" ]] && echo -e \"\\t\\t\\\"${GC_INDEX}\\\": { \\\"id\\\": ${VAL}, \\\"type\\\": \\\"${TYPE}\\\", \\\"value\\\": 1 },\" >> ${CONFIG_TMP}\n        fi\n        if [[ \"${BTN_TYPE}\" == \"h\" ]]; then\n          [[ ! -z \"${VAL}\" ]] && echo -e \"\\t\\t\\\"${GC_INDEX}\\\": { \\\"id\\\": 0, \\\"type\\\": \\\"${TYPE}\\\", \\\"value\\\": ${VAL} },\" >> ${CONFIG_TMP}\n        fi\n        if [[ \"${BTN_TYPE}\" == \"a\" ]]; then\n          case ${BUTTON_INDEX} in\n            leftx|rightx|lefty|righty)\n              continue\n              ;;\n          esac\n          [[ ! -z \"${VAL}\" ]] && echo -e \"\\t\\t\\\"${GC_INDEX}\\\": { \\\"id\\\": ${VAL}, \\\"type\\\": \\\"${TYPE}\\\", \\\"value\\\": 1 },\" >> ${CONFIG_TMP}\n        fi\n      fi\n      if [[ \"${BTN_TYPE}\" == \"a\" ]]; then\n        case ${BUTTON_INDEX} in\n          leftx|lefty)\n            #ADD_ANALOG=1\n            GC_INDEX=\"${GC_BUTTONS[${BUTTON_INDEX}0]}\"\n            echo -e \"\\t\\t\\\"${GC_INDEX}\\\": { \\\"id\\\": ${VAL}, \\\"type\\\": \\\"${TYPE}\\\", \\\"value\\\": -1 },\" >> ${CONFIG_TMP}\n            GC_INDEX=\"${GC_BUTTONS[${BUTTON_INDEX}1]}\"\n            echo -e \"\\t\\t\\\"${GC_INDEX}\\\": { \\\"id\\\": ${VAL}, \\\"type\\\": \\\"${TYPE}\\\", \\\"value\\\": 1 },\" >> ${CONFIG_TMP}\n            ;;\n        esac\n      fi      \n  done\n\n  local AXIS=\"$( cat /tmp/sdljoytest.txt | grep \"Joystick ${JOY_INDEX} Axes\" | cut -d' ' -f4 | sed 's/^0*//' )\"\n  if [[ ! -z \"${AXIS}\" ]]; then\n    local AXIS_LEFT=$(( AXIS - 2 ))\n    local AXIS_RIGHT=$(( AXIS - 1 ))\n    echo -e \"\\t\\t\\\"analogleft\\\": { \\\"id\\\": ${AXIS_LEFT}, \\\"type\\\": \\\"axis\\\", \\\"value\\\": 0 },\" >> ${CONFIG_TMP}\n    echo -e \"\\t\\t\\\"analogright\\\": { \\\"id\\\": ${AXIS_RIGHT}, \\\"type\\\": \\\"axis\\\", \\\"value\\\": 0 },\" >> ${CONFIG_TMP}\n  fi\n\n  # remove last character\n  sed -i '$ s/.$//' ${CONFIG_TMP}\n\n  echo -e \"\\t},\" >> ${CONFIG_TMP}\n  echo -e \"\\t\\\"player${1}\\\": {\" >> ${CONFIG_TMP}\n  echo -e \"\\t\\t\\\"DeviceID\\\": ${JOY_INDEX},\" >> ${CONFIG_TMP}\n  echo -e \"\\t\\t\\\"deviceGUID\\\": \\\"${DEVICE_GUID}\\\",\" >> ${CONFIG_TMP}\n  echo -e \"\\t\\t\\\"deviceName\\\": \\\"${JOY_NAME}\\\",\" >> ${CONFIG_TMP}\n  echo -e \"\\t\\t\\\"padmode\\\": ${ADD_ANALOG}\" >> ${CONFIG_TMP}\n  echo -e \"\\t}\" >> ${CONFIG_TMP}\n\n  cat \"${CONFIG_TMP}\" >> ${CONFIG}\n\n  rm \"${CONFIG_TMP}\"\n}\n\nsdljoytest -skip_loop > /tmp/sdljoytest.txt\n\nrm ${CONFIG}\necho \"{\" >> ${CONFIG}\n\njc_get_players\n\necho \"}\" >> ${CONFIG}\n\n"
  },
  {
    "path": "packages/sx05re/emulators/yabasanshiroSA_1_5/scripts/yabasanshiro1_5.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nmkdir -p \"/storage/roms/saturn/yabasanshiro1_5/\"\n\nROMNAME=$(basename \"${1}\")\nBIOS=\"\"\n\n# Gamepad Autoconfiguration\nGAMEPAD=$(sdljoytest -skip_loop | grep \"0 name\" | sed \"s|Joystick 0 name ||\")\nGAMEPADCONFIG=$(xmlstarlet sel -t -c \"//inputList/inputConfig[@deviceName=${GAMEPAD}]\" -n /storage/.emulationstation/es_input.cfg)\n\nif [ ! -z \"${GAMEPADCONFIG}\" ]; then\n    echo -e \"<?xml version=\\\"1.0\\\"?>\\n<inputList>\" > \"/storage/roms/saturn/yabasanshiro1_5/input.cfg\"\n    echo \"${GAMEPADCONFIG}\" >> \"/storage/roms/saturn/yabasanshiro1_5/input.cfg\"\n    echo \"</inputList>\" >> \"/storage/roms/saturn/yabasanshiro1_5/input.cfg\"\nfi\n\n# if the auto config was not succesful copy the default just in case.\nif [ ! -e \"/storage/roms/saturn/yabasanshiro1_5/input.cfg\" ]; then\n    cp -rf \"/emuelec/configs/yabasanshiro1_5/input.cfg\" \"/storage/roms/saturn/yabasanshiro/input.cfg\"\nfi\n\nHLEBIOS=$(get_ee_setting hlebios saturn \"${ROMNAME}\")\n\nif [ \"${HLEBIOS}\" != 1 ]; then \n    if [ -e \"/storage/roms/bios/saturn_bios.bin\" ]; then\n        BIOS=\"-b /storage/roms/bios/saturn_bios.bin\"\n    else\n        text_viewer -w -t \"Notice! Yabasanshiro BIOS Missing!\" -f 24 -m \"/storage/roms/bios/saturn_bios.bin was not found!\\n\\nYabasanshiro will continue to load with HLE BIOS\\n\\nTo avoid this message please copy saturn_bios.bin with checksum af5828fdff51384f99b3c4926be27762 to /storage/roms/bios/\\n\\nOr select \\\"USE HLE BIOS\\\" on the emulator options\"\n        BIOS=\"\"\n    fi\nfi\n\nAUTOGP=$(get_ee_setting yabasanshiro_auto_gamepad)\nif [[ \"${AUTOGP}\" == \"1\" ]]; then\n  cp -f /storage/.emulationstation/es_input.cfg /storage/roms/saturn/yabasanshiro1_5/input.cfg\n  set_yabasanshiro_joy1_5.sh\nfi\n\n# We use { } to avoid SIGUSR signal showing text and messing up with the error handling\n{ yabasanshiro1_5 -r 2 -i \"${1}\" ${BIOS}; } > /emuelec/logs/emuelec.log 2>&1\n"
  },
  {
    "path": "packages/sx05re/libretro/2048/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"2048\"\nPKG_VERSION=\"86e02d3c2dd76858db7370f5df1ccfc33b3abee1\"\nPKG_SHA256=\"1288de5aa6c88b1bf710f62b7bdd9908c72781890bf6c34e8864a5bbeb67bb1d\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/libretro-2048\"\nPKG_URL=\"https://github.com/libretro/libretro-2048/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of 2048 puzzle game to the libretro API.\"\nPKG_LONGDESC=\"Port of 2048 puzzle game to the libretro API.\"\nPKG_TOOLCHAIN=\"make\"\n\n\nPKG_MAKE_OPTS_TARGET=\"-f Makefile.libretro GIT_VERSION=${PKG_VERSION:0:7}\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp 2048_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/81/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"81\"\nPKG_VERSION=\"ffc99f27f092addc9ddd34dd0e3a3d4d1c053cbf\"\nPKG_SHA256=\"3db0e494cbd2afcc511cd7ba0e5eda104871301e26a74254bf4a08356d567181\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/81-libretro\"\nPKG_URL=\"https://github.com/libretro/81-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"A port of the EightyOne ZX81 Emulator to libretro\"\nPKG_LONGDESC=\"A port of the EightyOne ZX81 Emulator to libretro\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp 81_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/a5200/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"a5200\"\nPKG_VERSION=\"526404072821bb2021fab16f8c5dbbca300512c8\"\nPKG_SHA256=\"920d6072d58456a05a80e09efa8b8780a1c7d67ec29500e873c3095321fe799a\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/a5200\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Port of Atari 5200 emulator for GCW0 \"\nPKG_TOOLCHAIN=\"auto\"\n\nPKG_MAKE_OPTS_TARGET=\"platform=rpi4\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp a5200_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/arduous/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present\n\nPKG_NAME=\"arduous\"\nPKG_VERSION=\"50c1e48084f003dee582ed5f4f5c0f59eb30bc4c\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL-3.0-or-later\"\n\nPKG_SITE=\"https://github.com/libretro/arduous\"\nPKG_URL=\"${PKG_SITE}.git\"\n\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec/libretro\"\nPKG_SHORTDESC=\"Arduous libretro core (Arduboy)\"\nPKG_LONGDESC=\"Arduous is a libretro emulator core for the Arduboy.\"\nPKG_TOOLCHAIN=\"cmake\"\n\nmakeinstall_target() {\n  mkdir -p \"${INSTALL}/usr/lib/libretro\"\n\n  if [ -f \"${PKG_BUILD}/.${TARGET_NAME}/arduous_libretro.so\" ]; then\n    cp \"${PKG_BUILD}/.${TARGET_NAME}/arduous_libretro.so\" \"${INSTALL}/usr/lib/libretro/\"\n  else\n    cp \"${PKG_BUILD}/arduous_libretro.so\" \"${INSTALL}/usr/lib/libretro/\"\n  fi\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/atari800/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"atari800\"\nPKG_VERSION=\"6a18cb23cc4a7cecabd9b16143d2d7332ae8d44b\"\nPKG_SHA256=\"0fa8456f611975f80e0edba37a9cb4935918a94d30f6d42f8fa0679e76a9971a\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libretro/libretro-atari800\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"atari800 3.1.0 for libretro/libco WIP\"\nPKG_LONGDESC=\"atari800 3.1.0 for libretro/libco WIP\"\nPKG_TOOLCHAIN=\"auto\"\n\n\nPKG_MAKE_OPTS_TARGET=\"platform=emuelec GIT_VERSION=${PKG_VERSION:0:7}\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp atari800_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/atari800/patches/aarch64/atari800-01-add-emuelec-platform.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -345,6 +345,31 @@\n \tLDFLAGS += -static-libgcc -static-libstdc++\n #######################################\n \n+# (armv8 a35, hard point, neon based) ###\n+# PlayStation Classic\n+else ifeq ($(platform), emuelec)\n+\tTARGET := $(TARGET_NAME)_libretro.so\n+\tfpic := -fPIC\n+    LDFLAGS := -shared -Wl,--version-script=link.T  -Wl,--no-undefined\n+\tCFLAGS += -O2 \\\n+\t -fuse-linker-plugin \\\n+\t-fdata-sections -ffunction-sections -Wl,--gc-sections \\\n+\t-fno-stack-protector -fno-ident -fomit-frame-pointer \\\n+\t-falign-functions=1 -falign-jumps=1 -falign-loops=1 \\\n+\t-fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \\\n+\t-fmerge-all-constants -fno-math-errno \\\n+\t#-marm -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard\n+\tCXXFLAGS += $(CFLAGS)\n+\tCPPFLAGS += $(CFLAGS)\n+\tASFLAGS += $(CFLAGS)\n+\tHAVE_NEON = 1\n+\tCFLAGS += -march=armv8-a\n+\tLDFLAGS += -static-libgcc\n+\tCFLAGS += -DDEFAULT_CFG_NAME=\"\\\"/storage/.config/emuelec/configs/atari800.cfg\\\"\"\n+#######################################\n+\n+\n+\n # emscripten\n else ifeq ($(platform), emscripten)\n \tTARGET := $(TARGET_NAME)_libretro_emscripten.bc\n"
  },
  {
    "path": "packages/sx05re/libretro/atari800/patches/arm/atari800-01-add-emuelec-platform.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -345,6 +345,31 @@\n \tLDFLAGS += -static-libgcc -static-libstdc++\n #######################################\n \n+# (armv8 a35, hard point, neon based) ###\n+# PlayStation Classic\n+else ifeq ($(platform), emuelec)\n+\tTARGET := $(TARGET_NAME)_libretro.so\n+\tfpic := -fPIC\n+    LDFLAGS := -shared -Wl,--version-script=link.T  -Wl,--no-undefined\n+\tCFLAGS += -O2 \\\n+\t -fuse-linker-plugin \\\n+\t-fdata-sections -ffunction-sections -Wl,--gc-sections \\\n+\t-fno-stack-protector -fno-ident -fomit-frame-pointer \\\n+\t-falign-functions=1 -falign-jumps=1 -falign-loops=1 \\\n+\t-fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \\\n+\t-fmerge-all-constants -fno-math-errno \\\n+\t-marm -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard\n+\tCXXFLAGS += $(CFLAGS)\n+\tCPPFLAGS += $(CFLAGS)\n+\tASFLAGS += $(CFLAGS)\n+\tHAVE_NEON = 1\n+\tCFLAGS += -march=armv8-a\n+\tLDFLAGS += -static-libgcc\n+\tCFLAGS += -DDEFAULT_CFG_NAME=\"\\\"/.config/emuelec/configs/atari800.cfg\\\"\"\n+#######################################\n+\n+\n+\n # emscripten\n else ifeq ($(platform), emscripten)\n \tTARGET := $(TARGET_NAME)_libretro_emscripten.bc\n"
  },
  {
    "path": "packages/sx05re/libretro/b2/package.mk",
    "content": "PKG_NAME=\"b2\"\nPKG_VERSION=\"9a00b269\"\nPKG_SHA256=\"\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/zoltanvb/b2-libretro\"\nPKG_URL=\"$PKG_SITE.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"BBC Micro emulator for libretro\"\nPKG_LONGDESC=\"Adaptation of Tom Seddon's b2 emulator for BBC Micro\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_LIBRETRO=\"src/libretro\"\n\npre_make_target() {\n \n  cd ${PKG_BUILD}/${PKG_LIBRETRO}\n}\n\nmake_target() {\n  cd ${PKG_BUILD}/${PKG_LIBRETRO}\n  make GIT_VERSION=${PKG_VERSION}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/${PKG_LIBRETRO}/b2_libretro.so ${INSTALL}/usr/lib/libretro/\n}"
  },
  {
    "path": "packages/sx05re/libretro/beetle-gba/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"beetle-gba\"\nPKG_VERSION=\"6cee80685f735ea6c2373db2622a1f1ee9f39d39\"\nPKG_SHA256=\"33ef14eb0141e98323cc8c3e997f668df348fea7b7bf5a97766c2c91af075fa7\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-gba-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"libretro implementation of Mednafen VBA/GBA. (Game Boy Advance)\"\nPKG_LONGDESC=\"libretro implementation of Mednafen VBA/GBA. (Game Boy Advance)\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mednafen_gba_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/beetle-lynx/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"beetle-lynx\"\nPKG_VERSION=\"efd1797c7aa5a83c354507b1b61ac24222ebaa58\"\nPKG_SHA256=\"51228c6b180bf784020e8b601bc26fe7ce5f813571693eb2e4590d7bf166248c\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-lynx-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"libretro implementation of Mednafen Lynx\"\nPKG_LONGDESC=\"libretro implementation of Mednafen Lynx\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mednafen_lynx_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/beetle-ngp/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"beetle-ngp\"\nPKG_VERSION=\"139fe34c8dfc5585d6ee1793a7902bca79d544de\"\nPKG_SHA256=\"5f0122405b18e0a95f4a5da2ef2f57b4bf1895a691370e65cc19fd5854a50412\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-ngp-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"libretro implementation of Mednafen Neo Geo Pocket.\"\nPKG_LONGDESC=\"libretro implementation of Mednafen Neo Geo Pocket.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mednafen_ngp_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/beetle-pce/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"beetle-pce\"\nPKG_VERSION=\"d5c2b28ee6931ae43a4a79455937693ae8ccc8a1\"\nPKG_SHA256=\"3e2c410fba2abd46c62d5f43f4b8914e459a0927c8c56df48af440890ef403c4\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-pce-fast-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Standalone port of Mednafen PCE Fast to libretro.\"\nPKG_LONGDESC=\"Standalone port of Mednafen PCE Fast to libretro.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mednafen_pce_fast_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/beetle-pcfx/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"beetle-pcfx\"\nPKG_VERSION=\"dd04cef9355286488a1d78ff18c4c848a1575540\"\nPKG_SHA256=\"8f1153206479a25e925981076758698e0c5f6e7f826213b2b3598dc33a7d8ea0\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-pcfx-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"libretro implementation of Mednafen PC-FX.\"\nPKG_LONGDESC=\"libretro implementation of Mednafen PC-FX.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  if [ \"${ARCH}\" == \"i386\" -o \"${ARCH}\" == \"x86_64\" ]; then\n    make platform=unix CC=${CC} CXX=${CXX} AR=${AR}\n  else\n    make platform=armv CC=${CC} CXX=${CXX} AR=${AR}\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mednafen_pcfx_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/beetle-psx-hw/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"beetle-psx-hw\"\nPKG_VERSION=\"b62e2aa1b3ad2d027a06542305e12a52e5f5d4c4\"\nPKG_SHA256=\"a9a36839410c3024a289ea910fe859f1c2bc48c26dfe1d86d5a9acb0a6f148e1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/ZachCook/beetle-psx-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\"Fork of Mednafen PSX\"\nPKG_TOOLCHAIN=\"make\"\nPKG_GIT_CLONE_BRANCH=\"lightrec\"\n\nmake_target() {\n  make HAVE_HW=1\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mednafen_lynx_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/beetle-saturn/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present Team EmuELEC (https://emuelec.org)\n\nPKG_NAME=\"beetle-saturn\"\nPKG_VERSION=\"ccba5265f60f8e64a1984c9d14d383606193ea6a\"\nPKG_SHA256=\"f6d23a233a4b66038d20ba13f7b13666bab258478d9e62a4ebfac6dd8eefe2d8\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/sonninnos/beetle-saturn-libretro/\"\nPKG_URL=\"$PKG_SITE/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\" Standalone  hard fork of Mednafen Saturn to the libretro API.  \"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"+speed\" \nCXXFLAGS=\"-O3 -march=armv8-a+crc+fp+simd -mtune=cortex-a73.cortex-a53 -flto\"\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/lib/libretro\n  cp mednafen_saturn_*.so $INSTALL/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/beetle-saturn/patches/02.patch",
    "content": "--- a/Makefile\t2024-12-20 21:55:50.723084900 +0100\n+++ b/Makefile\t2024-12-20 22:17:50.342798300 +0100\n@@ -446,7 +446,7 @@\n all: $(TARGET)\n \n ifeq ($(DEBUG),0)\n-   FLAGS += -O2 $(EXTRA_GCC_FLAGS)\n+   FLAGS += -O3 $(EXTRA_GCC_FLAGS)\n else\n    FLAGS += -O0 -g\n endif\n"
  },
  {
    "path": "packages/sx05re/libretro/beetle-supergrafx/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"beetle-supergrafx\"\nPKG_VERSION=\"a776133c34ae8da5daf7d9ccb43e3e292e2b07b0\"\nPKG_SHA256=\"f6a2d1cfeb170510eed437f939ae05d717a20b6e23626cff6ebd47f0c84f13ce\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-supergrafx-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Standalone port of Mednafen PCE Fast to libretro.\"\nPKG_LONGDESC=\"Standalone port of Mednafen PCE Fast to libretro.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mednafen_supergrafx_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/beetle-vb/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"beetle-vb\"\nPKG_VERSION=\"8f837ebc077afdd6652efb2827fd8308a07113ca\"\nPKG_SHA256=\"d2733026bde2b8049b8258f68d49954687ab43e2639d6a879c79cca68e91dea6\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-vb-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"libretro implementation of Mednafen VB. (VirtualBoy)\"\nPKG_LONGDESC=\"libretro implementation of Mednafen VB. (VirtualBoy)\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mednafen_vb_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/beetle-wswan/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"beetle-wswan\"\nPKG_VERSION=\"2aeb47d3a58bf0360c686f842d9bb5bd201306fe\"\nPKG_SHA256=\"035c0ebdad6740511cc395199db134d20c29611b830cf11831d6ec8744a33d42\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/beetle-wswan-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"libretro implementation of Mednafen wswan\"\nPKG_LONGDESC=\"libretro implementation of Mednafen wswan\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mednafen_wswan_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/bk/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"bk\"\nPKG_VERSION=\"f95d929c8eca6c85075cd5c56a08aac9c58f3802\"\nPKG_SHA256=\"7ed9976abe5c235061a44884346426509231d1237c9b7ff23e8a7aa6894fcf5d\"\nPKG_LICENSE=\"NTP\"\nPKG_SITE=\"https://github.com/libretro/bk-emulator\"\nPKG_URL=\"https://github.com/libretro/bk-emulator/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nPKG_MAKE_OPTS_TARGET=\"-f Makefile.libretro\"\n\nmakeinstall_target() {\n\n\n  mkdir -p ${INSTALL}/usr/lib/libretro\n\n  wget -O ${INSTALL}/usr/lib/libretro/bk_libretro.info https://raw.githubusercontent.com/libretro/libretro-super/master/dist/info/bk_libretro.info\n\n  cp ${PKG_BUILD}/bk_libretro.so ${INSTALL}/usr/lib/libretro/\n  \n}\n"
  },
  {
    "path": "packages/sx05re/libretro/bluemsx/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"bluemsx\"\nPKG_VERSION=\"3a2855e30c7f39a41064ca36264e9bf9f6170f8e\"\nPKG_SHA256=\"7a0ebdc889c9f069c08ba9a97e2b4c3bb640090268275e6d697b0bf326e570bd\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/blueMSX-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of blueMSX to the libretro API.\"\nPKG_LONGDESC=\"Port of blueMSX to the libretro API.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp bluemsx_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/bnes/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"bnes\"\nPKG_VERSION=\"8e26e89a93bef8eb8992d1921b539dce1792660a\"\nPKG_SHA256=\"c151e1296b8f6c035014dc62919692097feeebb19ae73294f1b9781edf1921b1\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/bnes-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"libretro implementation of bNES/higan. (Nintendo Entertainment System)\"\nPKG_LONGDESC=\"libretro implementation of bNES/higan. (Nintendo Entertainment System)\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp bnes_libretro.so ${INSTALL}/usr/lib/libretro/bnes_libretro.so\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/bsnes_hd/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"bsnes_hd\"\nPKG_VERSION=\"591b7e13b6914beffaa01084e4c0b7a5d9cc0673\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/bsnes\"\nPKG_URL=\"${PKG_SITE}.git\"\n#PKG_GIT_CLONE_BRANCH=\"hd\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\"Super Nintendo (Super Famicom) emulator\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -C bsnes -f GNUmakefile target=\"libretro\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp bsnes/out/bsnes_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/cannonball/package.mk",
    "content": "################################################################################\n#      This file is part of Lakka - http://www.lakka.tv\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"cannonball\"\nPKG_VERSION=\"5137a791d229a5b9c7c089cf1edcce4db3c57d64\"\nPKG_SHA256=\"f066944897cde7bbf3df365ac75c2cc1ef5114059d1a0c51782f12bff5bcfa73\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/cannonball\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Cannonball: An Enhanced OutRun Engine\"\nPKG_LONGDESC=\"Cannonball: An Enhanced OutRun Engine\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp cannonball_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/cap32/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"cap32\"\nPKG_VERSION=\"a5d96c5ebbda3bc89a3bd1c1691a20f5eacc232d\"\nPKG_SHA256=\"c9010df18c86ab98ea77c1960b17ddde381f2ac57120792c266a87b518d0b86b\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/libretro-cap32\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"caprice32 4.2.0 libretro\"\nPKG_LONGDESC=\"caprice32 4.2.0 libretro\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp cap32_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/chaigame/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"chaigame\"\nPKG_VERSION=\"467cd453e3b1761c5c3611746b35e709328a2ced\"\nPKG_SHA256=\"e8c720ae6c7722261d9084548536a66f1c7291232f93ddaa7bc89e2348459c41\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/RobLoach/ChaiGame\"\nPKG_URL=\"https://github.com/RobLoach/ChaiGame/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"ChaiGame: 2D Game Framework\"\nPKG_LONGDESC=\"Framework to create 2D games with ChaiScript.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nconfigure_target() {\n  cd ${PKG_BUILD}\n}\n\nmakeinstall_target() {\n  make install INSTALLDIR=\"${INSTALL}/usr/lib/libretro\"\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/chailove/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"chailove\"\nPKG_VERSION=\"467cd453e3b1761c5c3611746b35e709328a2ced\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/libretro/libretro-chailove\"\nPKG_URL=\"https://github.com/libretro/libretro-chailove.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"ChaiLove: 2D Game Framework\"\nPKG_LONGDESC=\"Framework to create 2D games with ChaiScript.\"\nPKG_TOOLCHAIN=\"make\"\nGET_HANDLER_SUPPORT=\"git\"\n\nconfigure_target() {\n  cd ${PKG_BUILD}\n}\n\nmakeinstall_target() {\n  make install INSTALLDIR=\"${INSTALL}/usr/lib/libretro\"\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/clownmdemu/package.mk",
    "content": "PKG_NAME=\"clownmdemu\"\nPKG_VERSION=\"7591c16337b217006c524727df76670a85efad0f\"\nPKG_SHA256=\"\"\nPKG_LICENSE=\"AGPLv3\"\nPKG_SITE=\"https://github.com/Clownacy/clownmdemu-libretro\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"ClownMDEmu - Sega Mega Drive/Genesis emulator libretro core\"\nPKG_TOOLCHAIN=\"make\"\n\nGET_HANDLER_SUPPORT=\"git\"\n\nPKG_LIBNAME=\"clownmdemu_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\n\nmake_target() {\n  cd ${PKG_BUILD}\n  make GIT_VERSION=1.5\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/${PKG_LIBNAME} ${INSTALL}/usr/lib/libretro/\n}"
  },
  {
    "path": "packages/sx05re/libretro/craft/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"craft\"\nPKG_VERSION=\"675c5b2fc690d2e80f6099f46407bf23827c59d4\"\nPKG_SHA256=\"e6208ba074af0e0789d8d4345ae579dbfd5838be9419558863c6bd60a0d35f6e\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/libretro/Craft\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"A simple Minecraft clone written in C using modern OpenGL (shaders).\"\nPKG_LONGDESC=\"A simple Minecraft clone written in C using modern OpenGL (shaders).\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n}\n\nmake_target() {\n  if [ \"${OPENGLES_SUPPORT}\" = yes ]; then\n    make -f Makefile.libretro FORCE_GLES=1\n  else\n    make -f Makefile.libretro\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp craft_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/crocods/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"crocods\"\nPKG_VERSION=\"a320f6e38af49af84a63f81329a1bdb9322022b4\"\nPKG_SHA256=\"b2fb689f0a2d3d0496ee11330ed0d086d09dcd8cde1bce34f46f8a1db89aabbf\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/libretro/libretro-crocods\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Amstrad CPC emulator\"\nPKG_LONGDESC=\"Amstrad CPC emulator\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp crocods_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/daphne/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"daphne\"\nPKG_VERSION=\"b5481bab34a51369b6749cd95f5f889e43aaa23f\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2+\"\nPKG_SITE=\"https://github.com/libretro/daphne\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\"This is a Daphne core\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"make\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp daphne_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n\n"
  },
  {
    "path": "packages/sx05re/libretro/desmume/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"desmume\"\nPKG_VERSION=\"7f05a8d447b00acd9e0798aee97b4f72eb505ef9\"\nPKG_SHA256=\"2bcbf364f91fcaf533f3b8e1b03a0dae1ebc54df54ee3973c1e0bf79dc32bda6\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/desmume\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux glibc libpcap\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"libretro wrapper for desmume NDS emulator.\"\nPKG_LONGDESC=\"libretro wrapper for desmume NDS emulator.\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\ncd ${PKG_BUILD}/desmume/src/frontend/libretro\nmake CC=${CC} platform=arm64-unix\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/desmume/src/frontend/libretro/desmume_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/desmume/patches/desmume-001-arm64-build-fix.patch",
    "content": "--- a/desmume/src/frontend/libretro/Makefile.libretro\n+++ b/desmume/src/frontend/libretro/Makefile.libretro\n@@ -39,7 +39,16 @@ ifneq (,$(findstring unix,$(platform)))\n       CXX = clang++\n       AR = clang\n    endif\n-\n+   # ARM64\n+   ifneq (,$(findstring arm64,$(platform)))\n+      DESMUME_JIT = 0\n+      DESMUME_JIT_ARM = 0\n+      override TARGET_ARCH := arm64\n+      CXXFLAGS += -DUSE_POSIX_MEMALIGN\n+      CXXFLAGS += -DARM64\n+      DESMUME_OPENGL = 0\n+      DESMUME_OPENGL_CORE = 0\n+   endif\n    # Generic ARM\n    ifneq (,$(findstring armv,$(platform)))\n       DESMUME_JIT_ARM = 1\n"
  },
  {
    "path": "packages/sx05re/libretro/desmume/patches/desmume-002-disable-ogl.patch",
    "content": "--- a/desmume/src/frontend/libretro/Makefile.libretro\t2018-09-09 17:25:30.299207550 +0200\n+++ b/desmume/src/frontend/libretro/Makefile.libretro\t2018-09-09 17:21:15.835543000 +0200\n@@ -75,10 +75,8 @@\n          CXX = g++-x86\n       endif\n    else\n-      LIBS := -lpthread -lGL -lpcap\n-      CXXFLAGS += -DHAVE_OPENGL -std=gnu++11\n-      DESMUME_OPENGL = 1\n-\tDESMUME_OPENGL_CORE = 1\n+      LIBS := -lpthread -lpcap\n+      CXXFLAGS += -std=gnu++11\n    endif\n \n    ifneq (,$(findstring clang,$(platform)))\n"
  },
  {
    "path": "packages/sx05re/libretro/desmume-2015/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"desmume-2015\"\nPKG_VERSION=\"af397ff3d1f208c27f3922cc8f2b8e08884ba893\"\nPKG_SHA256=\"de35962a758dfee9c82c7a2055c62a80a539d602fd4db20bdce6b0619f5e34dd\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/desmume2015\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"libretro wrapper for desmume NDS emulator.\"\nPKG_LONGDESC=\"libretro wrapper for desmume NDS emulator.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    make -C desmume platform=armv LDFLAGS=\"${LDFLAGS} -lpthread\" # DESMUME_JIT_ARM=1\n  elif [ \"${ARCH}\" == \"aarch64\" ]; then\n    make -C desmume platform=arm64-unix LDFLAGS=\"${LDFLAGS} -lpthread\"\n  else\n    make -C desmume LDFLAGS=\"${LDFLAGS} -lpthread\"\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp desmume/desmume2015_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/desmume-2015/patches/desmume-2015-001-arm64-build-fix.patch",
    "content": "diff --git a/desmume/Makefile.libretro b/desmume/Makefile.libretro\nindex 7e8f3d20..b6bbbe18 100644\n--- a/desmume/Makefile.libretro\n+++ b/desmume/Makefile.libretro\n@@ -39,7 +39,16 @@ ifneq (,$(findstring unix,$(platform)))\n       CXX = clang++\n       AR = clang\n    endif\n-\n+   \n+   # ARM64\n+   ifneq (,$(findstring arm64,$(platform)))\n+      DESMUME_JIT = 0\n+      DESMUME_JIT_ARM = 0\n+      override TARGET_ARCH := arm64\n+      CXXFLAGS += -DUSE_POSIX_MEMALIGN\n+      CXXFLAGS += -DARM64\n+   endif\n+   \n    # Generic ARM\n    ifneq (,$(findstring armv,$(platform)))\n       DESMUME_JIT_ARM = 1\n"
  },
  {
    "path": "packages/sx05re/libretro/dice/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024\n\nPKG_NAME=\"dice\"\nPKG_VERSION=\"f41ed433ed90716521b05437c49684c370faa9df\"\n#PKG_SHA256=\"\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/mittonk/dice-libretro\"\nPKG_URL=\"$PKG_SITE/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"DICE - Discrete Integrated Circuit Emulator\"\nPKG_LONGDESC=\"Emulates computer systems that lack any type of CPU, consisting only of discrete logic components. Supports Pong, Breakout and other early arcade games.\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_LIBNAME=\"dice_libretro.so\"\nPKG_LIBPATH=\"$PKG_LIBNAME\"\n\nmake_target() {\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/lib/libretro\n  cp $PKG_LIBPATH $INSTALL/usr/lib/libretro/\n}"
  },
  {
    "path": "packages/sx05re/libretro/dinothawr/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"dinothawr\"\nPKG_VERSION=\"e57e780a963372b89736620d7e3b8608190f7581\"\nPKG_SHA256=\"e969f14628a0b7c49609bc98b5ddf6344b3fa4ad3389de77f59da2d2b6160480\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Non-commercial\"\nPKG_SITE=\"https://github.com/libretro/Dinothawr\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Dinothawr is a block pushing puzzle game on slippery surfaces\"\nPKG_LONGDESC=\"Dinothawr is a block pushing puzzle game on slippery surfaces. Our hero is a dinosaur whose friends are trapped in ice. Through puzzles it is your task to free the dinos from their ice prison.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\nPKG_BUILD_FLAGS=\"-gold\"\n\npre_configure_target() {\n PKG_MAKE_OPTS_TARGET=\"HAVE_NEON=1\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp dinothawr_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/dosbox/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"dosbox\"\nPKG_VERSION=\"b7b24262c282c0caef2368c87323ff8c381b3102\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/dosbox-libretro\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"libretro wrapper for the DOSBox emulator\"\nPKG_LONGDESC=\"An open source DOS emulator for BeOS, Linux, Mac OS X, OS/2, and Windows. Primarily focuses on running DOS Games.\"\nPKG_BUILD_FLAGS=\"-lto\"\nGET_HANDLER_SUPPORT=\"git\"\n\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp dosbox_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/dosbox-pure/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"dosbox-pure\"\nPKG_VERSION=\"fe0bdab8a04eedb912634d89ad8137de75529cff\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/schellingb/dosbox-pure\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain linux glibc glib systemd dbus alsa-lib SDL2 SDL2_net SDL_sound libpng zlib libvorbis flac libogg fluidsynth-git munt opusfile\"\nPKG_LONGDESC=\"DOSBox Pure is a new fork of DOSBox built for RetroArch/Libretro aiming for simplicity and ease of use. \"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"+lto\"\n\n\npre_configure_target() {\n\nif [ \"${DEVICE}\" == \"Amlogic-old\" ]; then\n\tPKG_MAKE_OPTS_TARGET=\" platform=emuelec\"\nelif [ \"${DEVICE}\" == \"Amlogic-ng\" ] || [ \"${DEVICE}\" == \"Amlogic-no\" ] || [\"${DEVICE}\" == \"Amlogic-ogu\" ]; then\n\tPKG_MAKE_OPTS_TARGET=\" platform=emuelec-ng\"\nelse\n\tPKG_MAKE_OPTS_TARGET=\" platform=emuelec-hh\"\nfi\t\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp dosbox_pure_libretro.so ${INSTALL}/usr/lib/libretro/dosbox_pure_libretro.so\n  cp dosbox_pure_libretro.info ${INSTALL}/usr/lib/libretro/dosbox_pure_libretro.info\n  \n}\n"
  },
  {
    "path": "packages/sx05re/libretro/dosbox-pure/patches/dosbox-pure-add-emuelec-platform.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -88,6 +88,30 @@\n LDFLAGS += $(CPUFLAGS) -lpthread -shared\n #LDFLAGS += -static-libstdc++ -static-libgcc #adds 1MB to output\n \n+ifneq (,$(findstring emuelec,$(platform)))\n+OUTNAME := dosbox_pure_libretro.so\n+BUILD    := RELEASE\n+BUILDDIR := release\n+CFLAGS   := -DNDEBUG -O3 -fno-ident\n+LDFLAGS  += -O3 -fno-ident\n+STRIPCMD = $(STRIP) --strip-all\n+CPUFLAGS := -mtune=cortex-a53 -mcpu=cortex-a53 -march=armv8-a+crc+fp+simd\n+   \n+ ifneq (,$(findstring emuelec-hh,$(platform)))\n+   CPUFLAGS := -mtune=cortex-a35 -mcpu=cortex-a35 -march=armv8-a+crc+fp+simd\n+ endif\n+ ifneq (,$(findstring emuelec-ng,$(platform)))\n+   CPUFLAGS := -mtune=cortex-a72.cortex-a53 -mcpu=cortex-a72.cortex-a53 -march=armv8-a+crc+fp+simd\n+ endif\n+\n+CFLAGS  += $(CPUFLAGS) -fpic -fomit-frame-pointer -Wno-psabi -Wno-format\n+LDFLAGS += $(CPUFLAGS) -lpthread -Wl,--gc-sections -shared\n+CXX = $(CC)\n+endif\n+\n+CFLAGS  += -pthread -D__LIBRETRO__ -Iinclude\n+$(info Building $(platform) with $(CPUFLAGS))\n+\n .PHONY: all clean\n all: $(OUTNAME)\n \n"
  },
  {
    "path": "packages/sx05re/libretro/dosbox-svn/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"dosbox-svn\"\nPKG_VERSION=\"53ca2f6303a652d129321cfc521f000cd7ec5531\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/dosbox-svn\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_GIT_CLONE_BRANCH=\"libretro\"\nPKG_DEPENDS_TARGET=\"toolchain sdl12-compat SDL_net\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Upstream port of DOSBox to libretro\"\nPKG_LONGDESC=\"Upstream port of DOSBox to libretro\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"no\"\nPKG_BUILD_FLAGS=\"-lto\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\n  if [ \"${ARCH}\" = \"aarch64\" ]; then \n    make -C libretro target=arm64 WITH_EMBEDDED_SDL=0 WITH_FAKE_SDL=1\n  elif [ \"${ARCH}\" = \"arm\" ]; then\n    make -C libretro target=arm WITH_EMBEDDED_SDL=0 WITH_FAKE_SDL=1\n  elif [ \"${ARCH}\" = \"x86_64\" ]; then\n    make -C libretro target=x86_64 WITH_EMBEDDED_SDL=0\n  elif [ \"${ARCH}\" = \"i386\" ]; then \n    make -C libretro target=x86 WITH_EMBEDDED_SDL=0\n  else\n    make -C libretro WITH_EMBEDDED_SDL=0 WITH_FAKE_SDL=1\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/libretro/dosbox_svn_libretro.so ${INSTALL}/usr/lib/libretro\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/dosbox-svn/patches/dosbox-svn-use-sdl-config.patch",
    "content": "--- a/libretro/Makefile.libretro\t2018-08-15 16:42:50.000000000 +0200\n+++ b/libretro/Makefile.libretro\t2018-08-16 16:22:53.958591362 +0200\n@@ -276,8 +276,8 @@\n \n OBJECTS = $(SOURCES_CXX:.cpp=.o) $(SOURCES_C:.c=.o)\n OBJECT_DEPS = $(OBJECTS:.o=.d)\n-CXXFLAGS += -D__LIBRETRO__ -MMD $(fpic) $(INCFLAGS) $(COMMONFLAGS)\n-CFLAGS += -D__LIBRETRO__ -MMD $(fpic) $(INCFLAGS) $(COMMONFLAGS)\n+CXXFLAGS += -D__LIBRETRO__ -MMD $(fpic) $(INCFLAGS) $(COMMONFLAGS) `sdl-config --cflags`\n+CFLAGS += -D__LIBRETRO__ -MMD $(fpic) $(INCFLAGS) $(COMMONFLAGS) `sdl-config --cflags`\n LDFLAGS += -lm $(fpic)\n \n .PHONY: all\n"
  },
  {
    "path": "packages/sx05re/libretro/duckstation-lr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"duckstation-lr\"\nPKG_VERSION=\"f799f62a\"\nPKG_LICENSE=\"NON-COMMERCIAL\"\nPKG_ARCH=\"aarch64\"\nPKG_SITE=\"https://www.duckstation.org/libretro\"\nPKG_URL=\"${PKG_SITE}/duckstation_libretro_linux_aarch64.zip\"\nPKG_SHORTDESC=\"Fast PlayStation 1 emulator for PC and Android \"\nPKG_TOOLCHAIN=\"manual\"\n\npre_unpack() {\n\tunzip ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.zip -d ${PKG_BUILD}\n}\n\nmakeinstall_target() {\n\tmkdir -p ${INSTALL}/usr/lib/libretro\n\tcp ${PKG_BUILD}/duckstation_libretro.so ${INSTALL}/usr/lib/libretro\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/easyrpg/liblcf/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n#\n#  OpenELEC is free software: you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation, either version 2 of the License, or\n#  (at your option) any later version.\n#\n#  OpenELEC is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.  If not, see <http://www.gnu.org/licenses/>.\n################################################################################\n\nPKG_NAME=\"liblcf\"\nPKG_VERSION=\"01b73de93cf80185fcdf3ffd4737dfdb9111a85e\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/EasyRPG/liblcf\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain expat icu\"\nPKG_SHORTDESC=\"Library to handle RPG Maker 2000/2003 and EasyRPG projects\"\nPKG_AUTORECONF=\"no\"\nPKG_TOOLCHAIN=\"cmake\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DCMAKE_BUILD_TYPE=Release\"\n\npre_make_target() {\n  find ${PKG_BUILD} -name flags.make -exec sed -i \"s:isystem :I:g\" \\{} \\;\n  find ${PKG_BUILD} -name build.ninja -exec sed -i \"s:isystem :I:g\" \\{} \\;\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/easyrpg/libspeexdsp/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"libspeexdsp\"\nPKG_VERSION=\"64cbfa9\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/xiph/speexdsp\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SHORTDESC=\"Speex audio processing library\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"configure\"\n\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"no\"\n\npre_configure_target() {\n  ${PKG_BUILD}/autogen.sh\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/easyrpg/libxmp-lite/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"libxmp-lite\"\nPKG_VERSION=\"4.5.0\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"http://sourceforge.net/projects/xmp\"\nPKG_URL=\"${PKG_SITE}/files/libxmp/${PKG_VERSION}/libxmp-lite-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SHORTDESC=\"Libxmp is a library that renders module files to PCM data.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"no\"\n\nPKG_TOOLCHAIN=\"configure\"\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n}\n\n\n"
  },
  {
    "path": "packages/sx05re/libretro/easyrpg/libxmp-lite/sources/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.7)\n\nproject(xmp-lite VERSION 4.5.0 LANGUAGES C)\n\nadd_library(xmp-lite\n\tinclude/libxmp-lite/xmp.h\n\tsrc/virtual.c\n\tsrc/format.c\n\tsrc/period.c\n\tsrc/player.c\n\tsrc/read_event.c\n\tsrc/dataio.c\n\tsrc/lfo.c\n\tsrc/scan.c\n\tsrc/control.c\n\tsrc/filter.c\n\tsrc/effects.c\n\tsrc/mixer.c\n\tsrc/mix_all.c\n\tsrc/load_helpers.c\n\tsrc/load.c\n\tsrc/hio.c\n\tsrc/smix.c\n\tsrc/memio.c\n\tsrc/md5.c\n\tsrc/misc.c\n\tsrc/loaders/common.c\n\tsrc/loaders/itsex.c\n\tsrc/loaders/sample.c\n\tsrc/loaders/xm_load.c\n\tsrc/loaders/mod_load.c\n\tsrc/loaders/s3m_load.c\n\tsrc/loaders/it_load.c)\n\ntarget_include_directories(xmp-lite PUBLIC\n\t$<BUILD_INTERFACE:include/libxmp-lite src>\n\t$<INSTALL_INTERFACE:include/libxmp-lite>)\n\ntarget_compile_definitions(xmp-lite PRIVATE\n\tLIBXMP_CORE_PLAYER=1\n\tLIBXMP_NO_DEPACKERS=1)\n\n# pkg-config\nset(PACKAGE_TARNAME ${PROJECT_NAME})\nset(prefix \"${CMAKE_INSTALL_PREFIX}\")\nset(exec_prefix \"\\${prefix}\")\nset(libdir \"\\${exec_prefix}/lib\")\nset(includedir \"\\${prefix}/include\")\nconfigure_file(lib${PROJECT_NAME}.pc.in libxmp.pc @ONLY)\n\n# install\ninstall(\n\tTARGETS xmp-lite\n\tARCHIVE DESTINATION lib\n\tLIBRARY DESTINATION lib\n\tRUNTIME DESTINATION bin)\n\ninstall(\n\tFILES include/libxmp-lite/xmp.h\n\tDESTINATION include/libxmp-lite)\n\ninstall(\n\tFILES ${CMAKE_CURRENT_BINARY_DIR}/libxmp.pc\n\tDESTINATION lib/pkgconfig\n)\n"
  },
  {
    "path": "packages/sx05re/libretro/easyrpg/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"easyrpg\"\nPKG_VERSION=\"69aaeb2d8bf17eee565ac3e46a98809a9ebe4df0\"\nPKG_REV=\"2\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/easyrpg/player\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_GIT_CLONE_BRANCH=\"0-7-0-stable\"\nPKG_DEPENDS_TARGET=\"toolchain zlib libfmt liblcf pixman libspeexdsp mpg123-compat libsndfile libvorbis opusfile wildmidi libxmp-lite libpng\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"An unofficial libretro port of the EasyRPG/Player.\"\nPKG_LONGDESC=\"An unofficial libretro port of the EasyRPG/Player.\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"no\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DPLAYER_TARGET_PLATFORM=libretro \\\n                       -DBUILD_SHARED_LIBS=ON \\\n                       -DCMAKE_BUILD_TYPE=Release\"\n\npre_make_target() {\n  find ${PKG_BUILD} -name flags.make -exec sed -i \"s:isystem :I:g\" \\{} \\;\n  find ${PKG_BUILD} -name build.ninja -exec sed -i \"s:isystem :I:g\" \\{} \\;\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/.${TARGET_NAME}/easyrpg_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/easyrpg/patches/easyrpg-disable-manpage-doxygen.patch",
    "content": ""
  },
  {
    "path": "packages/sx05re/libretro/emuscv/package.mk",
    "content": "# SPDX-License-Identifier: GPL-3.0-or-later\n\nPKG_NAME=\"emuscv\"\nPKG_VERSION=\"dfce10df090ce3f5eb23bdbee289702ec1478246\"\nPKG_SHA256=\"\"\nPKG_LICENSE=\"GPL-3.0-or-later\"\nPKG_SITE=\"https://gitlab.com/MaaaX-EmuSCV/libretro-emuscv\"\nPKG_URL=\"${PKG_SITE}.git\"\n\nPKG_ARCH=\"any\"\nPKG_SECTION=\"emuelec/libretro\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 zlib\"\nPKG_SHORTDESC=\"EmuSCV libretro core\"\nPKG_TOOLCHAIN=\"make\"\nPKG_GIT_CLONE_SINGLE=\"yes\"\n\npre_make_target() {\n  export PATH=\"${SYSROOT_PREFIX}/usr/bin:${PATH}\"\n  mkdir -p sys\n  : > sys/io.h\n  sed -i 's|-I/usr/include/SDL2||g' Makefile.libretro\n}\n\nmake_target() {\n  make -f Makefile.libretro platform=unix \\\n    CC=\"${CC}\" CXX=\"${CXX}\" AR=\"${AR}\" RANLIB=\"${RANLIB}\" STRIP=\"${STRIP}\"\n}\n\nmakeinstall_target() {\n  mkdir -p \"${INSTALL}/usr/lib/libretro\"\n  cp emuscv_libretro.so \"${INSTALL}/usr/lib/libretro/\"\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/emux-sms/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"emux-sms\"\nPKG_VERSION=\"640d4bae7d4757f5377dbeb42f2d02763895095c\"\nPKG_SHA256=\"6bacec4fb2d71976e577f267732a70f2da5caa73cbe9ff928794ec6708dd8dc7\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/emux\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Libretro port of Emux\"\nPKG_LONGDESC=\"Emux is a cross-platform emulator project supporting various machines with an architecture inspired by the Linux kernel.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -C libretro -f Makefile.lakka MACHINE=sms\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp libretro/emux_sms_libretro.so ${INSTALL}/usr/lib/libretro/emux_sms_libretro.so\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/emux-sms/patches/emux-sms-01-buildfix.patch",
    "content": "diff -Naur emux.git/libretro/Makefile.lakka emux.patch/libretro/Makefile.lakka\n--- emux.git/libretro/Makefile.lakka\t1970-01-01 01:00:00.000000000 +0100\n+++ emux.patch/libretro/Makefile.lakka\t2016-05-12 08:46:58.338888783 +0200\n@@ -0,0 +1,65 @@\n+HOST_PLATFORM = linux\n+\n+TARGET_PLATFORM = lakka\n+\n+OBJEXT = .o\n+SOEXT  = .so\n+\n+################\n+# Platform setup\n+\n+STATIC_LINKING = 0\n+platform       = unix\n+PLATDEFS       = \n+PLATCFLAGS     = -fpic -fstrict-aliasing\n+PLATCXXFLAGS   = -fpic -fstrict-aliasing\n+PLATLDFLAGS    = -shared -lm -Wl,-version-script=$(BUILD_DIR)/link.T -Wl,-no-undefined\n+PLATLDXFLAGS   = -shared -lm -Wl,-version-script=$(BUILD_DIR)/link.T -Wl,-no-undefined\n+\n+################\n+# libretro setup\n+\n+RETRODEFS     = -D__LIBRETRO__\n+RETROCFLAGS   =\n+RETROCXXFLAGS =\n+RETROLDFLAGS  =\n+RETROLDXFLAGS =\n+\n+#################\n+# Final variables\n+\n+DEFINES  += $(PLATDEFS) $(RETRODEFS)\n+CFLAGS   += $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)\n+CXXFLAGS += $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)\n+LDFLAGS  += $(PLATLDFLAGS) $(RETROLDFLAGS)\n+LDXFLAGS += $(PLATLDXFLAGS) $(RETROLDXFLAGS)\n+\n+########\n+# Tuning\n+\n+ifneq ($(DEBUG),)\n+  CFLAGS   += -O0 -g\n+  CXXFLAGS += -O0 -g\n+else\n+  CFLAGS   += -O3 -DNDEBUG\n+  CXXFLAGS += -O3 -DNDEBUG\n+endif\n+\n+ifneq ($(LOG_PERFORMANCE),)\n+  CFLAGS   += -DLOG_PERFORMANCE\n+  CXXFLAGS += -DLOG_PERFORMANCE\n+endif\n+\n+####################################\n+# Variable setup for Makefile.common\n+\n+CORE_DIR  ?= ..\n+BUILD_DIR ?= .\n+INCLUDES   = \n+\n+include $(BUILD_DIR)/Makefile.common\n+\n+###############\n+# Include rules\n+\n+include $(BUILD_DIR)/Makefile.rules\n"
  },
  {
    "path": "packages/sx05re/libretro/ep128emu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n\n# EmuELEC package for ep128emu libretro core\n\nPKG_NAME=\"ep128emu\"\nPKG_VERSION=\"a9e857e70466f95cfd54b4e5f2b30453b581e822\"\nPKG_LICENSE=\"GPL-2.0-only\"\nPKG_SITE=\"https://github.com/libretro/ep128emu-core\"\nPKG_URL=\"${PKG_SITE}.git\"\n\nPKG_ARCH=\"any\"\nPKG_SECTION=\"emuelec/libretro\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\"Enterprise 64/128 (ep128emu) libretro core\"\nPKG_LONGDESC=\"Libretro core version of ep128emu, emulating Enterprise 64/128, Videoton TVC, Amstrad CPC and ZX Spectrum home computers.\"\nPKG_TOOLCHAIN=\"make\"\nPKG_GIT_CLONE_BRANCH=\"core\"\n\npre_make_target() {\n  :\n}\n\nmake_target() {\n  make -C \"${PKG_BUILD}\" \\\n    CC=\"${CC}\" \\\n    CXX=\"${CXX}\" \\\n    AR=\"${AR}\"\n}\n\nmakeinstall_target() {\n  mkdir -p \"${INSTALL}/usr/lib/libretro\"\n  cp \"${PKG_BUILD}/ep128emu_core_libretro.so\" \\\n     \"${INSTALL}/usr/lib/libretro/\"\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/fake_08/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"fake_08\"\nPKG_VERSION=\"0d26fd59103941e5f95e0ee665c6e0fb8c6b6f03\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/jtothebell/fake-08\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\"A Pico-8 player/emulator for console homebrew\"\n\npre_configure_target() {\n\tPKG_MAKE_OPTS_TARGET=\"-C ${PKG_BUILD}/platform/libretro\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp -v ${PKG_BUILD}/platform/libretro/fake08_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/fbalpha/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"fbalpha\"\nPKG_VERSION=\"0581797db6fdffd826086b053ced4b6b29bb6678\"\nPKG_SHA256=\"96812000a349e413d63bc5ef04ab7a330bb0b4194047c048ed6ec549b8274936\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Non-commercial\"\nPKG_SITE=\"https://github.com/libretro/fbalpha\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of Final Burn Alpha to Libretro (v0.2.97.38).\"\nPKG_LONGDESC=\"Currently, FB Alpha supports games on Capcom CPS-1 and CPS-2 hardware, SNK Neo-Geo hardware, Toaplan hardware, Cave hardware, and various games on miscellaneous hardware. \"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    if [[ \"${TARGET_FPU}\" =~ \"neon\" ]]; then\n      make -f makefile.libretro CC=${CC} CXX=${CXX} HAVE_NEON=1 profile=performance\n    else\n      make -f makefile.libretro CC=${CC} CXX=${CXX} profile=performance\n    fi\n  else\n    make -f makefile.libretro CC=${CC} CXX=${CXX} profile=accuracy\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp fbalpha_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/fbalpha2012/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"fbalpha2012\"\nPKG_VERSION=\"77167cea72e808384c136c8c163a6b4975ce7a84\"\nPKG_SHA256=\"14e19d8f2d9e464960ad504a4efb731ba63253c18be6bbfb33a6d70ce7d95d79\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Non-commercial\"\nPKG_SITE=\"https://github.com/libretro/fbalpha2012\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of Final Burn Alpha 2012 to Libretro\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\n  cd svn-current/trunk\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    make -f makefile.libretro platform=armv CC=${CC} CXX=${CXX}\n  else\n    make -f makefile.libretro CC=${CC} CXX=${CXX}\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp fbalpha2012_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/fbneo/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"fbneo\"\nPKG_VERSION=\"9a5899faba4d0c67d5f4cf56bcd5633d9e6e061d\"\nPKG_SHA256=\"f1fa098ae7f14f0ca652611a5a9a563b21702599760fa4afa153a8848578999f\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Non-commercial\"\nPKG_SITE=\"https://github.com/libretro/FBNeo\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of Final Burn Neo to Libretro (v0.2.97.38).\"\nPKG_LONGDESC=\"Currently, FB neo supports games on Capcom CPS-1 and CPS-2 hardware, SNK Neo-Geo hardware, Toaplan hardware, Cave hardware, and various games on miscellaneous hardware. \"\nPKG_TOOLCHAIN=\"make\"\n\n\npre_configure_target() {\nsed -i \"s|LDFLAGS += -static-libgcc -static-libstdc++|LDFLAGS += -static-libgcc|\"  ./src/burner/libretro/Makefile\n\nPKG_MAKE_OPTS_TARGET=\" -C ./src/burner/libretro USE_CYCLONE=0 profile=performance\"\n\nif [[ \"${TARGET_FPU}\" =~ \"neon\" ]]; then\n\tPKG_MAKE_OPTS_TARGET+=\" HAVE_NEON=1\"\nfi\n\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\tif [ \"${ARCH}\" == \"arm\" ]; then\n\tPKG_MAKE_OPTS_TARGET+=\" platform=classic_armv8_a35\"\n\tfi\nfi\n\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/src/burner/libretro/fbneo_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/fceumm/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"fceumm\"\n#PKG_VERSION=\"449db5de6b56e9d44fc685e1b38399f0b233bd28\"\nPKG_VERSION=\"5cd4a43e16a7f3cd35628d481c347a0a98cfdfa2\"\n#PKG_SHA256=\"5cac184772421ec3cffa19f50737a5fdd481089007d21d79b3e2760f94c8fa87\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/libretro-fceumm\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of FCEUmm / FCEUX to Libretro.\"\nPKG_LONGDESC=\"FCEUX is a Nintendo Entertainment System (NES), Famicom, and Famicom Disk System (FDS) emulator.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp fceumm_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/fceumm-mod/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"fceumm-mod\"\nPKG_VERSION=\"f0ea52190427b136a51da4490e49087fe2ca2abb\"\nPKG_SHA256=\"acfa9de9520db21bd36fd567a8d069970884e60ee021ede05211ad3f5ba9767e\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/Tippek/libretro-fceumm-mod\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of FCEUmm / FCEUX to Libretro.\"\nPKG_LONGDESC=\"FCEUX is a Nintendo Entertainment System (NES), Famicom, and Famicom Disk System (FDS) emulator.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/fceumm_mod_libretro.* ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/flycast/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"flycast\"\nPKG_VERSION=\"$(get_pkg_version flycastsa)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory flycastsa)\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/flyinghead/flycast\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES}\"\nPKG_SHORTDESC=\"Flycast is a multiplatform Sega Dreamcast emulator\"\nPKG_BUILD_FLAGS=\"-lto\"\nPKG_TOOLCHAIN=\"cmake\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DLIBRETRO=ON \\\n                        -DUSE_OPENMP=OFF \\ \n                        -DCMAKE_BUILD_TYPE=Release \\\n                        -DUSE_GLES2=OFF \\\n                        -DUSE_GLES=ON \\\n                        -DUSE_VULKAN=OFF\"\n\npre_make_target() {\n  find ${PKG_BUILD} -name flags.make -exec sed -i \"s:isystem :I:g\" \\{} \\;\n  find ${PKG_BUILD} -name build.ninja -exec sed -i \"s:isystem :I:g\" \\{} \\;\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  if [ \"${ARCH}\" == \"arm\" ]; then\n\tcp flycast_libretro.so ${INSTALL}/usr/lib/libretro/flycast_32b_libretro.so\n  else\n\tcp flycast_libretro.so ${INSTALL}/usr/lib/libretro/\n  fi\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/flycast/patches/Amlogic/flycast-01-buildfix.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -23,20 +23,10 @@\n \n TARGET_NAME   := flycast\n \n-ifeq ($(HAVE_CLANG),1)\n-\tCXX      = ${CC_PREFIX}clang++\n-\tCC       = ${CC_PREFIX}clang\n-\tSHARED   := -fuse-ld=lld\n-else\n-\tCXX      ?= ${CC_PREFIX}g++\n-\tCC       ?= ${CC_PREFIX}gcc\n-\tSHARED   :=\n-endif\n+\n ifeq ($(HAVE_LTCG),1)\n \tSHARED   += -flto\n endif\n-\n-CC_AS    ?= ${CC_PREFIX}as\n \n MFLAGS   := \n ASFLAGS  := \n@@ -1033,7 +1023,7 @@\n PREFIX        ?= /usr/local\n \n ifneq (,$(findstring arm, $(ARCH)))\n-\tCC_AS    = ${CC_PREFIX}gcc #The ngen_arm.S must be compiled with gcc, not as\n+\tCC_AS    = ${CC_PREFIX}${CC} #The ngen_arm.S must be compiled with gcc, not as\n \tASFLAGS  += $(CFLAGS)\n endif\n \n"
  },
  {
    "path": "packages/sx05re/libretro/flycast/patches/Amlogic/flycast-02-set_optim.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -1,3 +1,4 @@\n+SET_OPTIM     := -O3\n DEBUG         := 0\n NO_REND       := 0\n HAVE_GL       := 1\n@@ -861,7 +862,7 @@\n \tifneq (,$(findstring msvc,$(platform)))\n \t\tOPTFLAGS       := -O2\n \telse ifneq ($(platform), classic_armv7_a7)\n-\t\tOPTFLAGS       := -O3\n+\t\tOPTFLAGS       := $(SET_OPTIM)\n \tendif\n \n \tCORE_DEFINES   += -DNDEBUG\n"
  },
  {
    "path": "packages/sx05re/libretro/fmsx-libretro/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"fmsx-libretro\"\nPKG_VERSION=\"fbe4dfc4c3e3f7eb27089def3d663a905b181845\"\nPKG_SHA256=\"6d95d777ccc9f918b97aea223e7d88149f1c4fa54fc6c1a37664b258b2b11456\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"OPEN/NON-COMMERCIAL\"\nPKG_SITE=\"https://github.com/libretro/fmsx-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\"Port of fMSX to the libretro API. \"\nPKG_TOOLCHAIN=\"make\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp fmsx_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/freechaf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# EmuELEC / LibreELEC style package for libretro FreeChaF core\n\nPKG_NAME=\"freechaf\"\nPKG_VERSION=\"cdb8ad6fcecb276761b193650f5ce9ae8b878067\"\nPKG_SHA256=\"\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/FreeChaF\"\nPKG_URL=\"${PKG_SITE}.git\"\n\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec/libretro\"\nPKG_SHORTDESC=\"FreeChaF libretro core (Fairchild Channel F)\"\nPKG_LONGDESC=\"FreeChaF is a libretro emulation core for the Fairchild Channel F / Video Entertainment System.\"\n\nPKG_TOOLCHAIN=\"make\"\nPKG_GIT_CLONE_SINGLE=\"yes\"\nPKG_MAKE_OPTS_TARGET=\"platform=unix\"\n\nmakeinstall_target() {\n  mkdir -p \"${INSTALL}/usr/lib/libretro\"\n  cp \"${PKG_BUILD}/freechaf_libretro.so\" \"${INSTALL}/usr/lib/libretro/\"\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/freeintv/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"freeintv\"\nPKG_VERSION=\"6efc4b8fd4c7423ec1f5ff1913b854529135b565\"\nPKG_SHA256=\"5bb5e060dc1445aad0559136124a4c0235e35810500bacaa073018866dc54653\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/FreeIntv\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"FreeIntv is a libretro emulation core for the Mattel Intellivision.\"\nPKG_LONGDESC=\"FreeIntv is a libretro emulation core for the Mattel Intellivision.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp freeintv_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/freej2me/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"freej2me\"\nPKG_VERSION=\"8b9bc8a19baf26e3d92f88934a64a32f1cbc2795\"\nPKG_SHA256=\"cec467023fed435e10fdb64147d962717aa81c0e43170c22cdebeeddcd7e21db\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/hex007/freej2me\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 libogg libvorbisidec libvpx libpng apache-ant:host\"\nPKG_SHORTDESC=\"A free J2ME emulator with libretro, awt and sdl2 frontends.\"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\n${TOOLCHAIN}/bin/ant\n}\n\nmake_target(){\n\n## SDL2 is not needed for the libretro core and .jar files\n## but in case you need it, here are the commands\n\n#sed -i \"s|g++|${CXX}|g\" ${PKG_BUILD}/src/sdl2/Makefile\n#PKG_MAKE_OPTS_TARGET=\" -C ${PKG_BUILD}/src/sdl2\"\n#make ${PKG_MAKE_OPTS_TARGET}\n#mkdir -p ${INSTALL}/usr/bin\n#cp ${PKG_BUILD}/src/sdl2/sdl_interface ${INSTALL}/usr/bin\n\nPKG_MAKE_OPTS_TARGET=\" -C ${PKG_BUILD}/src/libretro\"\nmake ${PKG_MAKE_OPTS_TARGET}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n    cp `find . -name \"freej2me_libretro.so\" | xargs echo` ${INSTALL}/usr/lib/libretro\n    cp ${PKG_BUILD}/build/freej2me-lr.jar ${INSTALL}/usr/lib/libretro\n  \n  mkdir -p ${INSTALL}/usr/bin\n\tcp ${PKG_DIR}/scripts/*.sh ${INSTALL}/usr/bin\n} \n"
  },
  {
    "path": "packages/sx05re/libretro/freej2me/patches/01-emuelec-paths.patch",
    "content": "--- a/src/javax/microedition/rms/RecordStore.java\n+++ b/src/javax/microedition/rms/RecordStore.java\n@@ -70,8 +70,8 @@\n \n \t\tappname = Mobile.getPlatform().loader.suitename;\n \n-\t\trmsPath = Mobile.getPlatform().dataPath + \"./rms/\"+appname;\n-\t\trmsFile = Mobile.getPlatform().dataPath + \"./rms/\"+appname+\"/\"+recordStoreName;\n+\t\trmsPath = \"/storage/roms/freej2me/freej2me/rms/\"+appname;\n+\t\trmsFile = \"/storage/roms/freej2me/freej2me/rms/\"+appname+\"/\"+recordStoreName;\n \n \t\ttry\n \t\t{\n@@ -244,7 +244,7 @@\n \t{\n \t\ttry\n \t\t{\n-\t\t\tFile fstore = new File(Mobile.getPlatform().dataPath + \"./rms/\"+Mobile.getPlatform().loader.suitename+\"/\"+recordStoreName);\n+            File fstore = new File(\"/storage/roms/freej2me/freej2me/rms/\"+Mobile.getPlatform().loader.suitename+\"/\"+recordStoreName);\n \t\t\tfstore.delete();\n \t\t}\n \t\tcatch (Exception e)\n@@ -347,7 +347,7 @@\n \t\t//System.out.println(\"List Record Stores\");\n \t\tif(rmsPath==null)\n \t\t{\n-\t\t\trmsPath = Mobile.getPlatform().dataPath + \"./rms/\"+Mobile.getPlatform().loader.name;\n+            rmsPath = \"/storage/roms/freej2me/freej2me/rms/\"+Mobile.getPlatform().loader.name;\n \t\t\ttry\n \t\t\t{\n \t\t\t\tFiles.createDirectories(Paths.get(rmsPath));\n"
  },
  {
    "path": "packages/sx05re/libretro/freej2me/scripts/freej2me.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\n. /etc/profile\n\n# Lets check if java is installed and up to date, called from profile\ninstall_java\n\nif [[ -f \"/storage/roms/bios/jdk/eeversion\" ]]; then\n    cp -rf /usr/lib/libretro/freej2me-lr.jar ${HOME}/roms/bios\nelse\n    exit 1\nfi\nexit 0\n"
  },
  {
    "path": "packages/sx05re/libretro/frodo/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"frodo\"\nPKG_VERSION=\"4c1501686ac0a6815d6dc410556029b6577fd7ec\"\nPKG_SHA256=\"6a009da4b9b83c3e0f103bfaeaf7f1dfc388e7488ecef5657c2f4a66d20819b7\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/r-type/frodo-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Frodo - The free portable C64 emulator\"\nPKG_LONGDESC=\"Frodo - The free portable C64 emulator\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  #if [ \"${ARCH}\" == \"arm\" ]; then\n  #  CFLAGS=\"${CFLAGS} -DARM -DALIGN_DWORD -mstructure-size-boundary=32 -mthumb-interwork -falign-functions=16 -marm\"\n  #fi\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp frodo_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/fsuae/package.mk",
    "content": "################################################################################\n#      This file is part of LibreELEC - http://www.libreelec.tv\n#      Copyright (C) 2016 Team LibreELEC\n#\n#  LibreELEC is free software: you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation, either version 2 of the License, or\n#  (at your option) any later version.\n#\n#  LibreELEC is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with LibreELEC.  If not, see <http://www.gnu.org/licenses/>.\n################################################################################\n\nPKG_NAME=\"fsuae\"\nPKG_VERSION=\"06e3030a46a6063aa0f7028c269d972f06c46d5d\"\nPKG_SHA256=\"60c601d537ae416e29f7f30426d41879d6a473e57c548d7de516749091ece8ff\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/libretro-fsuae\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libmpeg2 openal-soft glib\"\nPKG_SECTION=\"emulation\"\nPKG_SHORTDESC=\"FS-UAE amiga emulator libretro core.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"yes\"\nPKG_BUILD_FLAGS=\"-lto\"\n\ncase ${PROJECT} in\n  RPi*)\n    PKG_CONFIGURE_OPTS_TARGET=\"--disable-jit --enable-neon\"\n    ;;\nesac\n\npre_configure_target() {\n  cd ${BUILD}/${PKG_NAME}-${PKG_VERSION}\n  rm -rf .${TARGET_NAME}\n  export ac_cv_func_realloc_0_nonnull=yes\n}\n\nmake_target() {\n  make CC=${HOST_CC} CFLAGS= gen\n  make CC=${CC}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp fsuae_libretro.so ${INSTALL}/usr/lib/libretro/\n  mkdir -p ${INSTALL}/usr/share/fs-uae\n  cp fs-uae.dat ${INSTALL}/usr/share/fs-uae/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/fsuae/patches/fsuae-libretro-001-link-glib.patch",
    "content": "--- a/Makefile.in\t2016-09-16 14:46:15.352407556 +0000\n+++ b/Makefile.in\t2016-09-16 14:46:31.459074122 +0000\n@@ -33,7 +33,7 @@\n    CC = gcc\n    TARGET := $(TARGET_NAME)_libretro.so\n    fpic := -fPIC\n-   LDFLAGS := -lz -lpthread\n+   LDFLAGS := -lz -lpthread -lglib-2.0\n    SHARED := -shared -Wl,--version-script=$(CORE_DIR)/libretro/link.T\n    ifeq ($(USE_JIT), 1)\n       ifeq ($(TARGET_ARCH), x86_64) # JIT => address space 32 bits\n"
  },
  {
    "path": "packages/sx05re/libretro/fuse-libretro/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"fuse-libretro\"\nPKG_VERSION=\"cad85b7b1b864c65734f71aa4a510b6f6536881c\"\nPKG_SHA256=\"6fda1a3ffc0d2faeebe27fae94e5b7790337dd96d1ea29922ad804a425d2852b\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/fuse-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"A port of the Fuse Unix Spectrum Emulator to libretro \"\nPKG_LONGDESC=\"A port of the Fuse Unix Spectrum Emulator to libretro \"\n\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\nif [ \"${DEVICE}\" == \"Amlogic-ng\" ] || [ \"${DEVICE}\" == \"Amlogic-no\" ] || [ \"${DEVICE}\" == \"Amlogic-ogu\" ]; then\n  make -f Makefile.libretro platform=rpi4_64\n else\n  make -f Makefile.libretro platform=rpi3_64 \nfi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp fuse_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/gambatte/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"gambatte\"\nPKG_VERSION=\"b75225203ffea8b65124bb31acb598e91e7f22d9\"\nPKG_SHA256=\"52352417d719221ae2813b3dec8277508319171fe74e35196a9765881fb109bd\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/gambatte-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"libretro implementation of libgambatte\"\nPKG_LONGDESC=\"Gambatte is an open-source Game Boy Color emulator written for fun and made available in the hope that it will be useful.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp gambatte_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/gearboy/package.mk",
    "content": "PKG_NAME=\"gearboy\"\nPKG_VERSION=\"3da04945eb5d34b67267b8aed3cec3d31d9a1999\"\nPKG_SHA256=\"0da08b65d8ceed524d87fe44e92b8e7f0c5164c195b8c38b5b51adae6641eec7\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/drhelius/Gearboy\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Game Boy / Gameboy Color emulator for iOS, Mac, Raspberry Pi, Windows and Linux\"\nPKG_LONGDESC=\"Game Boy / Gameboy Color emulator for iOS, Mac, Raspberry Pi, Windows and Linux\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -C platforms/libretro/\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp platforms/libretro/gearboy_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/gearcoleco/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"gearcoleco\"\nPKG_VERSION=\"b09cd197551c8a4cfd64673c498cfa68c84dc02a\"\nPKG_SHA256=\"ad107b942c271dd366348c9f1970d61187d0269b73910da1487ca99b84eef605\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/drhelius/Gearcoleco\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"libretro\"\nPKG_LONGDESC=\"Gearcoleco is a very accurate cross-platform ColecoVision emulator written in C++\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\n  make -C platforms/libretro/\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp platforms/libretro/gearcoleco_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/geargrafx/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"geargrafx\"\nPKG_VERSION=\"12e994ffcb6d051289d7875d3670fd8fce9c7a62\"\n#PKG_SHA256=\"7918b813b74573e2d91c1d8ea511097897e1c5a3b429008ba48f50fd44630980\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/drhelius/Geargrafx/\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"libretro\"\nPKG_LONGDESC=\"Geargrafz is a very accurate cross-platform Turbografx emulator written in C++\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\n  make -C platforms/libretro/\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp platforms/libretro/geargrafx_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/gearlynx/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"gearlynx\"\nPKG_VERSION=\"9dbb7449d4e35a9240f7091de8856fb9156def48\"\nPKG_SHA256=\"9621f641bddb58a29d5fcb8ba17c1fe2143d3f921e279be5c208b92ebcafe7d2\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/drhelius/Gearlynx/\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"libretro\"\nPKG_LONGDESC=\"Gearlynx is a very accurate cross-platform Atari Lynx emulator written in C++\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\n  make -C platforms/libretro/\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp platforms/libretro/gearlynx_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/gearsystem/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"gearsystem\"\nPKG_VERSION=\"c1592d77ee3ab7f2ae7f4ae78a62b9d17cd75cbb\"\nPKG_SHA256=\"b930097d9efee54f8dd1d6c9151be3f6efb134b0ac3abc0d554ea7ede4f01bb4\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/drhelius/Gearsystem\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Gearsystem is a Sega Master System / Game Gear / SG-1000 emulator written in C++\"\nPKG_LONGDESC=\"Gearsystem is a Sega Master System / Game Gear / SG-1000 emulator written in C++\"\nPKG_TOOLCHAIN=\"make\"\nGET_HANDLER_SUPPORT=\"git\"\n\nmake_target() {\n  make -C platforms/libretro/\n}\n\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp platforms/libretro/gearsystem_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/genesis-plus-gx/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"genesis-plus-gx\"\nPKG_VERSION=\"cecccacf767b1c8e86af3e315223b052a7f81b95\"\nPKG_SHA256=\"8a3fa4dada19046a953f7ed65be9ff0f5eb47e169a917fe6e3616b5cf187acc7\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Non-commercial\"\nPKG_SITE=\"https://github.com/libretro/Genesis-Plus-GX\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"An enhanced port of Genesis Plus for Gamecube/Wii\"\nPKG_LONGDESC=\"Genesis Plus GX is an open-source & portable Sega Mega Drive / Genesis emulator, now also emulating SG-1000, Master System, Game Gear and Sega/Mega CD hardware.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    CFLAGS=\"${CFLAGS} -DALIGN_LONG\"\n  fi\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp genesis_plus_gx_libretro.so ${INSTALL}/usr/lib/libretro/genesis_plus_gx_libretro.so\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/genesis-plus-gx-wide/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"genesis-plus-gx-wide\"\nPKG_VERSION=\"b7d314220d755537aebb7bc1750ac21f764365c4\"\nPKG_SHA256=\"ffbf0ad2c669e03f4400e789a88c4b0c7546115425bfe2ace46bd1070a7774f2\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Non-commercial\"\nPKG_SITE=\"https://github.com/libretro/Genesis-Plus-GX-Wide\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Widescreen modification of Genesis Plus GX\"\nPKG_LONGDESC=\"Genesis Plus GX is an open-source & portable Sega Mega Drive / Genesis emulator, now also emulating SG-1000, Master System, Game Gear and Sega/Mega CD hardware.\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    CFLAGS=\"${CFLAGS} -DALIGN_LONG\"\n  fi\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp genesis_plus_gx_wide_libretro.so ${INSTALL}/usr/lib/libretro/genesis_plus_gx_wide_libretro.so\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/genesis_plus_gx_cart_special/genesis_plus_gx_cart_special.info",
    "content": "# Software Information\ndisplay_name = \"Sega - MS/GG/MD/CD (Genesis Plus GX)\"\nauthors = \"Charles McDonald|Eke-Eke\"\nsupported_extensions = \"mdx|md|smd|gen|bin|cue|iso|sms|bms|gg|sg|68k|sgd|chd|m3u\"\ncorename = \"Genesis Plus GX\"\ncategories = \"Emulator\"\nlicense = \"Non-commercial\"\npermissions = \"\"\ndisplay_version = \"v1.7.4\"\n\n# Hardware Information\nmanufacturer = \"Sega\"\nsystemname = \"Sega 8/16-bit (Various)\"\nsystemid = \"mega_drive\"\n\n# Libretro Features\nsupports_no_game = \"false\"\nsavestate = \"true\"\nsavestate_features = \"deterministic\"\ncheats = \"true\"\ninput_descriptors = \"true\"\nmemory_descriptors = \"true\"\nlibretro_saves = \"true\"\ncore_options = \"true\"\ncore_options_version = \"2.0\"\ndatabase = \"Sega - Game Gear|Sega - Master System - Mark III|Sega - Mega-CD - Sega CD|Sega - Mega Drive - Genesis|Sega - PICO|Sega - SG-1000\"\nhw_render = \"false\"\nneeds_fullpath = \"true\"\ndisk_control = \"true\"\n\n# BIOS / Firmware\nfirmware_count = 12\nfirmware0_desc = \"bios_MD.bin (Mega Drive startup ROM)\"\nfirmware0_path = \"bios_MD.bin\"\nfirmware0_opt = \"true\"\nfirmware1_desc = \"bios_CD_E.bin (MegaCD EU BIOS)\"\nfirmware1_path = \"bios_CD_E.bin\"\nfirmware1_opt = \"true\"\nfirmware2_desc = \"bios_CD_U.bin (SegaCD US BIOS)\"\nfirmware2_path = \"bios_CD_U.bin\"\nfirmware2_opt = \"true\"\nfirmware3_desc = \"bios_CD_J.bin (MegaCD JP BIOS)\"\nfirmware3_path = \"bios_CD_J.bin\"\nfirmware3_opt = \"true\"\nfirmware4_desc = \"bios_E.sms (MasterSystem EU BIOS)\"\nfirmware4_path = \"bios_E.sms\"\nfirmware4_opt = \"true\"\nfirmware5_desc = \"bios_U.sms (MasterSystem US BIOS)\"\nfirmware5_path = \"bios_U.sms\"\nfirmware5_opt = \"true\"\nfirmware6_desc = \"bios_J.sms (MasterSystem JP BIOS)\"\nfirmware6_path = \"bios_J.sms\"\nfirmware6_opt = \"true\"\nfirmware7_desc = \"bios.gg (GameGear BIOS)\"\nfirmware7_path = \"bios.gg\"\nfirmware7_opt = \"true\"\nfirmware8_desc = \"sk.bin (Sonic & Knuckles ROM)\"\nfirmware8_path = \"sk.bin\"\nfirmware8_opt = \"true\"\nfirmware9_desc = \"sk2chip.bin (Sonic & Knuckles UPMEM ROM)\"\nfirmware9_path = \"sk2chip.bin\"\nfirmware9_opt = \"true\"\nfirmware10_desc = \"areplay.bin (Action Replay ROM)\"\nfirmware10_path = \"areplay.bin\"\nfirmware10_opt = \"true\"\nfirmware11_desc = \"ggenie.bin (Game Genie ROM)\"\nfirmware11_path = \"ggenie.bin\"\nfirmware11_opt = \"true\"\nnotes = \"(!) sk2chip.bin (md5): b4e76e416b887f4e7413ba76fa735f16|(!) sk.bin (md5): 4ea493ea4e9f6c9ebfccbdb15110367e\"\n\ndescription = \"A port of the Genesis Plus GX emulator to libretro. Originally designed to run on the Wii console via homebrew, Genesis Plus GX was one of the first cores ported to libretro, and it has always been the first choice for any 8- and 16-bit Sega consoles, from Master System to Game Gear to Genesis/Mega Drive to Sega CD. Only the 32X is not supported. The core is both fast and highly accurate and it benefits from a tight and feature-filled integration with libretro.\"\n"
  },
  {
    "path": "packages/sx05re/libretro/genesis_plus_gx_cart_special/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"genesis_plus_gx_cart_special\"\nPKG_VERSION=\"17c9c5e98cc379b708a081bbf40d939c2481b1e8\"\nPKG_SHA256=\"83b868ef317e2dbad00efbe9ceb867ed6ece6308d646c438ec76fc8dd39d4ad7\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Non-commercial\"\nPKG_SITE=\"https://github.com/libretro/Genesis-Plus-GX\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"An enhanced port of Genesis Plus for Gamecube/Wii\"\nPKG_LONGDESC=\"Genesis Plus GX is an open-source & portable Sega Mega Drive / Genesis emulator, now also emulating SG-1000, Master System, Game Gear and Sega/Mega CD hardware.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    CFLAGS=\"${CFLAGS} -DALIGN_LONG\"\n  fi\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp genesis_plus_gx_libretro.so ${INSTALL}/usr/lib/libretro/${PKG_NAME}_libretro.so\n  cp -f ${PKG_DIR}/genesis_plus_gx_cart_special.info ${INSTALL}/usr/lib/libretro/${PKG_NAME}_libretro.info\n  \n}\n"
  },
  {
    "path": "packages/sx05re/libretro/genesis_plus_gx_cart_special/patches/ae77caee6d249667d3cbdbb1bcdfa8d5186f949b.patch",
    "content": "From ae77caee6d249667d3cbdbb1bcdfa8d5186f949b Mon Sep 17 00:00:00 2001\nFrom: Adventurous Programmer <47227694+Diegrosan@users.noreply.github.com>\nDate: Wed, 9 Jul 2025 20:37:07 -0300\nSubject: [PATCH] por\n\n---\n Makefile.libretro                             |   20 +-\n core/cart_hw/md_cart.c                        |   31 +\n core/cart_hw/md_cart.h                        |    1 +\n core/cart_hw/minimp3.h                        | 1865 +++++++++\n core/cart_hw/minimp3_ex.h                     | 1397 +++++++\n core/cart_hw/paprium.h                        | 2863 ++++++++++++++\n core/cd_hw/cdd.c                              |  155 +-\n core/m68k/m68kcpu.c                           |   14 +\n core/m68k/m68kcpu.h                           |    4 +-\n core/m68k/m68kd.h                             | 1162 ++++++\n core/m68k/m68kops.h                           |   10 +-\n core/m68k/s68kcpu.c                           |   16 +-\n core/m68k/s68kd.h                             | 1153 ++++++\n core/memz80.c                                 |   38 +\n core/sound/blip_buf.c                         |  722 ++--\n core/sound/blip_buf.h                         |   23 +-\n core/sound/blip_lpf.h                         |  313 ++\n core/sound/blip_lpf_192K.h                    |    7 +\n core/sound/blip_lpf_192K_24K.h                |  297 ++\n core/sound/blip_lpf_192K_48K.h                |  297 ++\n core/sound/blip_lpf_192K_96K.h                |  297 ++\n core/sound/blip_lpf_384K.h                    |    8 +\n core/sound/blip_lpf_384K_192K.h               |  591 +++\n core/sound/blip_lpf_384K_24K.h                |  591 +++\n core/sound/blip_lpf_384K_48K.h                |  591 +++\n core/sound/blip_lpf_384K_96K.h                |  591 +++\n core/sound/blip_lpf_48K.h                     |    5 +\n core/sound/blip_lpf_48K_24K.h                 |   77 +\n core/sound/blip_lpf_768K.h                    |    9 +\n core/sound/blip_lpf_768K_192K.h               | 1181 ++++++\n core/sound/blip_lpf_768K_24K.h                | 1181 ++++++\n core/sound/blip_lpf_768K_384K.h               | 1181 ++++++\n core/sound/blip_lpf_768K_48K.h                | 1181 ++++++\n core/sound/blip_lpf_768K_96K.h                | 1181 ++++++\n core/sound/blip_lpf_96K.h                     |    6 +\n core/sound/blip_lpf_96K_24K.h                 |  151 +\n core/sound/blip_lpf_96K_48K.h                 |  151 +\n core/sound/opll.c                             |   11 +-\n core/sound/sound.c                            |    2 +-\n core/sound/ym2413.c                           |    2 +-\n core/sound/ym2612.c                           |    2 +-\n core/sound/ym3438.c                           |   30 +\n core/state.h                                  |    3 +-\n core/system.c                                 |   51 +-\n core/system.h                                 |    4 +-\n core/vdp_ctrl.c                               |  169 +-\n core/vdp_render.c                             |   75 +\n core/z80/z80.c                                |   10 +\n libretro/Makefile.common                      |   14 +-\n libretro/debian/rules                         |    0\n .../deps/libchdr/include/dr_libs/dr_flac.h    | 2210 +----------\n libretro/deps/libchdr/include/libchdr/cdrom.h |    6 +-\n libretro/deps/libchdr/include/libchdr/chd.h   |  204 +-\n .../deps/libchdr/include/libchdr/coretypes.h  |   81 +-\n libretro/deps/libchdr/src/libchdr_cdrom.c     |    7 +-\n libretro/deps/libchdr/src/libchdr_chd.c       |  990 +----\n libretro/deps/libchdr/src/libchdr_flac.c      |   23 +-\n libretro/deps/libchdr/src/libchdr_huffman.c   |   20 +-\n libretro/jni/Android.mk                       |    2 +-\n libretro/libretro.c                           |  107 +-\n libretro/libretro_core_options.h              | 3358 ++++++++++++++---\n libretro/libretro_core_options_intl.h         | 1650 +-------\n 62 files changed, 22768 insertions(+), 5624 deletions(-)\n create mode 100644 core/cart_hw/minimp3.h\n create mode 100644 core/cart_hw/minimp3_ex.h\n create mode 100644 core/cart_hw/paprium.h\n create mode 100644 core/m68k/m68kd.h\n create mode 100644 core/m68k/s68kd.h\n create mode 100644 core/sound/blip_lpf.h\n create mode 100644 core/sound/blip_lpf_192K.h\n create mode 100644 core/sound/blip_lpf_192K_24K.h\n create mode 100644 core/sound/blip_lpf_192K_48K.h\n create mode 100644 core/sound/blip_lpf_192K_96K.h\n create mode 100644 core/sound/blip_lpf_384K.h\n create mode 100644 core/sound/blip_lpf_384K_192K.h\n create mode 100644 core/sound/blip_lpf_384K_24K.h\n create mode 100644 core/sound/blip_lpf_384K_48K.h\n create mode 100644 core/sound/blip_lpf_384K_96K.h\n create mode 100644 core/sound/blip_lpf_48K.h\n create mode 100644 core/sound/blip_lpf_48K_24K.h\n create mode 100644 core/sound/blip_lpf_768K.h\n create mode 100644 core/sound/blip_lpf_768K_192K.h\n create mode 100644 core/sound/blip_lpf_768K_24K.h\n create mode 100644 core/sound/blip_lpf_768K_384K.h\n create mode 100644 core/sound/blip_lpf_768K_48K.h\n create mode 100644 core/sound/blip_lpf_768K_96K.h\n create mode 100644 core/sound/blip_lpf_96K.h\n create mode 100644 core/sound/blip_lpf_96K_24K.h\n create mode 100644 core/sound/blip_lpf_96K_48K.h\n mode change 100755 => 100644 libretro/debian/rules\n\ndiff --git a/Makefile.libretro b/Makefile.libretro\nindex a05ba9e83..0baa912d2 100644\n--- a/Makefile.libretro\n+++ b/Makefile.libretro\n@@ -1,6 +1,7 @@\n DEBUG = 0\n LOGSOUND = 0\n-FRONTEND_SUPPORTS_RGB565 = 1\n+FRONTEND_SUPPORTS_RGB565 = 0\n+FRONTEND_SUPPORTS_RGB888 = 1\n HAVE_CHD = 1\n HAVE_SYS_PARAM = 1\n HOOK_CPU = 0\n@@ -8,6 +9,7 @@ HAVE_CDROM = 0\n USE_PER_SOUND_CHANNELS_CONFIG = 1\n LOW_MEMORY = 0\n MAX_ROM_SIZE = 10485760\n+LTO ?= -flto\n \n CORE_DIR := .\n \n@@ -785,8 +787,8 @@ ifeq ($(platform), emscripten)\n    CFLAGS   += -O3 -DNDEBUG\n    CXXFLAGS += -O3 -DNDEBUG\n else\n-   CFLAGS   += -O2 -DNDEBUG\n-   CXXFLAGS += -O2 -DNDEBUG\n+   CFLAGS   += -O3 -DNDEBUG\n+   CXXFLAGS += -O3 -DNDEBUG\n endif\n endif\n \n@@ -809,7 +811,7 @@ else\n endif\n \n ifeq ($(HAVE_CHD), 1)\n-\tDEFINES += -DUSE_LIBCHDR -D_7ZIP_ST -DZSTD_DISABLE_ASM -DUSE_LIBRETRO_VFS\n+\tDEFINES += -DUSE_LIBCHDR -D_7ZIP_ST -DUSE_LIBRETRO_VFS\n endif\n \n ifeq ($(USE_PER_SOUND_CHANNELS_CONFIG), 1)\n@@ -820,12 +822,15 @@ ifeq ($(LOW_MEMORY), 1)\n DEFINES += -DLOW_MEMORY\n endif\n \n-CFLAGS += $(fpic) $(DEFINES) $(CODE_DEFINES) $(FLAGS)\n-CXXFLAGS += $(fpic) $(DEFINES) $(CODE_DEFINES) $(FLAGS)\n+CFLAGS += $(fpic) $(DEFINES) $(CODE_DEFINES) $(FLAGS) -MMD\n+CXXFLAGS += $(fpic) $(DEFINES) $(CODE_DEFINES) $(FLAGS) -MMD\n \n ifeq ($(FRONTEND_SUPPORTS_RGB565), 1)\n    # if you have a new frontend that supports RGB565\n    BPP_DEFINES = -DUSE_16BPP_RENDERING -DFRONTEND_SUPPORTS_RGB565\n+else ifeq ($(FRONTEND_SUPPORTS_RGB888), 1)\n+   # if you have a new frontend that supports RGB888\n+   BPP_DEFINES = -DUSE_32BPP_RENDERING -DFRONTEND_SUPPORTS_RGB888\n else\n    BPP_DEFINES = -DUSE_15BPP_RENDERING\n endif\n@@ -908,3 +913,6 @@ endif\n \n print-%:\n \t@echo '$*=$($*)'\n+\n+DEPENDS = ${OBJECTS:.o=.d}    # substitutes \".o\" with \".d\"\n+-include ${DEPENDS}           # copies files x.d, y.d, z.d (if they exist)\ndiff --git a/core/cart_hw/md_cart.c b/core/cart_hw/md_cart.c\nindex 766289da1..acb272707 100644\n--- a/core/cart_hw/md_cart.c\n+++ b/core/cart_hw/md_cart.c\n@@ -94,6 +94,8 @@ static void topshooter_w(uint32 address, uint32 data);\n static uint32 tekken_regs_r(uint32 address);\r\n static void tekken_regs_w(uint32 address, uint32 data);\r\n \r\n+#include \"paprium.h\"\r\n+\r\n /* Games that need extra hardware emulation:\r\n   - copy protection device\r\n   - custom ROM banking device\r\n@@ -571,6 +573,15 @@ void md_cart_init(void)\n     /* initialize SPI EEPROM board */\r\n     eeprom_spi_init();\r\n   }\r\n+  else if (strstr(rominfo.product,\"T-574120-00\"))\r\n+  {\r\n+    cart.special |= HW_PAPRIUM;\r\n+\r\n+\tpaprium_init();\r\n+ \r\n+    /* initialize SPI EEPROM board */\r\n+    eeprom_spi_init();\r\n+  }\r\n   else if (strstr(rominfo.ROMType,\"SF\") && strstr(rominfo.product,\"001\"))\r\n   {\r\n     /* SF-001 mapper */\r\n@@ -848,6 +859,12 @@ void md_cart_reset(int hard_reset)\n     megasd_reset();\r\n   }\r\n \r\n+  /* MegaSD hardware */\r\n+  if (cart.special & HW_PAPRIUM)\r\n+  {\r\n+    paprium_reset();\r\n+  }\r\n+\r\n   /* SVP chip */\r\n   if (svp)\r\n   {\r\n@@ -935,6 +952,11 @@ int md_cart_context_save(uint8 *state)\n     bufferptr += megasd_context_save(&state[bufferptr]);\r\n   }\r\n \r\n+  if (cart.special & HW_PAPRIUM)\r\n+  {\r\n+    save_param(&paprium_s, sizeof(paprium_s));\r\n+  }\r\n+\r\n   return bufferptr;\r\n }\r\n \r\n@@ -997,6 +1019,15 @@ int md_cart_context_load(uint8 *state)\n     bufferptr += megasd_context_load(&state[bufferptr]);\r\n   }\r\n \r\n+  if (cart.special & HW_PAPRIUM)\r\n+  {\r\n+    load_param(&paprium_s, sizeof(paprium_s));\r\n+\r\n+\tpaprium_map();\r\n+\r\n+    log_cb(RETRO_LOG_ERROR, \"\\n\\n\\n  ############################\\n\\n\\n\");\r\n+  }\r\n+\r\n   return bufferptr;\r\n }\r\n \r\ndiff --git a/core/cart_hw/md_cart.h b/core/cart_hw/md_cart.h\nindex 58687b9da..36d6d8599 100644\n--- a/core/cart_hw/md_cart.h\n+++ b/core/cart_hw/md_cart.h\n@@ -65,6 +65,7 @@\n #define HW_J_CART   0x04\r\n #define HW_LOCK_ON  0x08\r\n #define HW_MEGASD   0x10\r\n+#define HW_PAPRIUM  0x20\r\n \r\n /* Cartridge extra hardware */\r\n typedef struct\r\ndiff --git a/core/cart_hw/minimp3.h b/core/cart_hw/minimp3.h\nnew file mode 100644\nindex 000000000..3220ae1a8\n--- /dev/null\n+++ b/core/cart_hw/minimp3.h\n@@ -0,0 +1,1865 @@\n+#ifndef MINIMP3_H\n+#define MINIMP3_H\n+/*\n+    https://github.com/lieff/minimp3\n+    To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide.\n+    This software is distributed without any warranty.\n+    See <http://creativecommons.org/publicdomain/zero/1.0/>.\n+*/\n+#include <stdint.h>\n+\n+#define MINIMP3_MAX_SAMPLES_PER_FRAME (1152*2)\n+\n+typedef struct\n+{\n+    int frame_bytes, frame_offset, channels, hz, layer, bitrate_kbps;\n+} mp3dec_frame_info_t;\n+\n+typedef struct\n+{\n+    float mdct_overlap[2][9*32], qmf_state[15*2*32];\n+    int reserv, free_format_bytes;\n+    unsigned char header[4], reserv_buf[511];\n+} mp3dec_t;\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif /* __cplusplus */\n+\n+void mp3dec_init(mp3dec_t *dec);\n+#ifndef MINIMP3_FLOAT_OUTPUT\n+typedef int16_t mp3d_sample_t;\n+#else /* MINIMP3_FLOAT_OUTPUT */\n+typedef float mp3d_sample_t;\n+void mp3dec_f32_to_s16(const float *in, int16_t *out, int num_samples);\n+#endif /* MINIMP3_FLOAT_OUTPUT */\n+int mp3dec_decode_frame(mp3dec_t *dec, const uint8_t *mp3, int mp3_bytes, mp3d_sample_t *pcm, mp3dec_frame_info_t *info);\n+\n+#ifdef __cplusplus\n+}\n+#endif /* __cplusplus */\n+\n+#endif /* MINIMP3_H */\n+#if defined(MINIMP3_IMPLEMENTATION) && !defined(_MINIMP3_IMPLEMENTATION_GUARD)\n+#define _MINIMP3_IMPLEMENTATION_GUARD\n+\n+#include <stdlib.h>\n+#include <string.h>\n+\n+#define MAX_FREE_FORMAT_FRAME_SIZE  2304    /* more than ISO spec's */\n+#ifndef MAX_FRAME_SYNC_MATCHES\n+#define MAX_FRAME_SYNC_MATCHES      10\n+#endif /* MAX_FRAME_SYNC_MATCHES */\n+\n+#define MAX_L3_FRAME_PAYLOAD_BYTES  MAX_FREE_FORMAT_FRAME_SIZE /* MUST be >= 320000/8/32000*1152 = 1440 */\n+\n+#define MAX_BITRESERVOIR_BYTES      511\n+#define SHORT_BLOCK_TYPE            2\n+#define STOP_BLOCK_TYPE             3\n+#define MODE_MONO                   3\n+#define MODE_JOINT_STEREO           1\n+#define HDR_SIZE                    4\n+#define HDR_IS_MONO(h)              (((h[3]) & 0xC0) == 0xC0)\n+#define HDR_IS_MS_STEREO(h)         (((h[3]) & 0xE0) == 0x60)\n+#define HDR_IS_FREE_FORMAT(h)       (((h[2]) & 0xF0) == 0)\n+#define HDR_IS_CRC(h)               (!((h[1]) & 1))\n+#define HDR_TEST_PADDING(h)         ((h[2]) & 0x2)\n+#define HDR_TEST_MPEG1(h)           ((h[1]) & 0x8)\n+#define HDR_TEST_NOT_MPEG25(h)      ((h[1]) & 0x10)\n+#define HDR_TEST_I_STEREO(h)        ((h[3]) & 0x10)\n+#define HDR_TEST_MS_STEREO(h)       ((h[3]) & 0x20)\n+#define HDR_GET_STEREO_MODE(h)      (((h[3]) >> 6) & 3)\n+#define HDR_GET_STEREO_MODE_EXT(h)  (((h[3]) >> 4) & 3)\n+#define HDR_GET_LAYER(h)            (((h[1]) >> 1) & 3)\n+#define HDR_GET_BITRATE(h)          ((h[2]) >> 4)\n+#define HDR_GET_SAMPLE_RATE(h)      (((h[2]) >> 2) & 3)\n+#define HDR_GET_MY_SAMPLE_RATE(h)   (HDR_GET_SAMPLE_RATE(h) + (((h[1] >> 3) & 1) + ((h[1] >> 4) & 1))*3)\n+#define HDR_IS_FRAME_576(h)         ((h[1] & 14) == 2)\n+#define HDR_IS_LAYER_1(h)           ((h[1] & 6) == 6)\n+\n+#define BITS_DEQUANTIZER_OUT        -1\n+#define MAX_SCF                     (255 + BITS_DEQUANTIZER_OUT*4 - 210)\n+#define MAX_SCFI                    ((MAX_SCF + 3) & ~3)\n+\n+#define MINIMP3_MIN(a, b)           ((a) > (b) ? (b) : (a))\n+#define MINIMP3_MAX(a, b)           ((a) < (b) ? (b) : (a))\n+\n+#if !defined(MINIMP3_NO_SIMD)\n+\n+#if !defined(MINIMP3_ONLY_SIMD) && (defined(_M_X64) || defined(__x86_64__) || defined(__aarch64__) || defined(_M_ARM64))\n+/* x64 always have SSE2, arm64 always have neon, no need for generic code */\n+#define MINIMP3_ONLY_SIMD\n+#endif /* SIMD checks... */\n+\n+#if (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))) || ((defined(__i386__) || defined(__x86_64__)) && defined(__SSE2__))\n+#if defined(_MSC_VER)\n+#include <intrin.h>\n+#endif /* defined(_MSC_VER) */\n+#include <immintrin.h>\n+#define HAVE_SSE 1\n+#define HAVE_SIMD 1\n+#define VSTORE _mm_storeu_ps\n+#define VLD _mm_loadu_ps\n+#define VSET _mm_set1_ps\n+#define VADD _mm_add_ps\n+#define VSUB _mm_sub_ps\n+#define VMUL _mm_mul_ps\n+#define VMAC(a, x, y) _mm_add_ps(a, _mm_mul_ps(x, y))\n+#define VMSB(a, x, y) _mm_sub_ps(a, _mm_mul_ps(x, y))\n+#define VMUL_S(x, s)  _mm_mul_ps(x, _mm_set1_ps(s))\n+#define VREV(x) _mm_shuffle_ps(x, x, _MM_SHUFFLE(0, 1, 2, 3))\n+typedef __m128 f4;\n+#if defined(_MSC_VER) || defined(MINIMP3_ONLY_SIMD)\n+#define minimp3_cpuid __cpuid\n+#else /* defined(_MSC_VER) || defined(MINIMP3_ONLY_SIMD) */\n+static __inline__ __attribute__((always_inline)) void minimp3_cpuid(int CPUInfo[], const int InfoType)\n+{\n+#if defined(__PIC__)\n+    __asm__ __volatile__(\n+#if defined(__x86_64__)\n+        \"push %%rbx\\n\"\n+        \"cpuid\\n\"\n+        \"xchgl %%ebx, %1\\n\"\n+        \"pop  %%rbx\\n\"\n+#else /* defined(__x86_64__) */\n+        \"xchgl %%ebx, %1\\n\"\n+        \"cpuid\\n\"\n+        \"xchgl %%ebx, %1\\n\"\n+#endif /* defined(__x86_64__) */\n+        : \"=a\" (CPUInfo[0]), \"=r\" (CPUInfo[1]), \"=c\" (CPUInfo[2]), \"=d\" (CPUInfo[3])\n+        : \"a\" (InfoType));\n+#else /* defined(__PIC__) */\n+    __asm__ __volatile__(\n+        \"cpuid\"\n+        : \"=a\" (CPUInfo[0]), \"=b\" (CPUInfo[1]), \"=c\" (CPUInfo[2]), \"=d\" (CPUInfo[3])\n+        : \"a\" (InfoType));\n+#endif /* defined(__PIC__)*/\n+}\n+#endif /* defined(_MSC_VER) || defined(MINIMP3_ONLY_SIMD) */\n+static int have_simd(void)\n+{\n+#ifdef MINIMP3_ONLY_SIMD\n+    return 1;\n+#else /* MINIMP3_ONLY_SIMD */\n+    static int g_have_simd;\n+    int CPUInfo[4];\n+#ifdef MINIMP3_TEST\n+    static int g_counter;\n+    if (g_counter++ > 100)\n+        return 0;\n+#endif /* MINIMP3_TEST */\n+    if (g_have_simd)\n+        goto end;\n+    minimp3_cpuid(CPUInfo, 0);\n+    g_have_simd = 1;\n+    if (CPUInfo[0] > 0)\n+    {\n+        minimp3_cpuid(CPUInfo, 1);\n+        g_have_simd = (CPUInfo[3] & (1 << 26)) + 1; /* SSE2 */\n+    }\n+end:\n+    return g_have_simd - 1;\n+#endif /* MINIMP3_ONLY_SIMD */\n+}\n+#elif defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)\n+#include <arm_neon.h>\n+#define HAVE_SSE 0\n+#define HAVE_SIMD 1\n+#define VSTORE vst1q_f32\n+#define VLD vld1q_f32\n+#define VSET vmovq_n_f32\n+#define VADD vaddq_f32\n+#define VSUB vsubq_f32\n+#define VMUL vmulq_f32\n+#define VMAC(a, x, y) vmlaq_f32(a, x, y)\n+#define VMSB(a, x, y) vmlsq_f32(a, x, y)\n+#define VMUL_S(x, s)  vmulq_f32(x, vmovq_n_f32(s))\n+#define VREV(x) vcombine_f32(vget_high_f32(vrev64q_f32(x)), vget_low_f32(vrev64q_f32(x)))\n+typedef float32x4_t f4;\n+static int have_simd()\n+{   /* TODO: detect neon for !MINIMP3_ONLY_SIMD */\n+    return 1;\n+}\n+#else /* SIMD checks... */\n+#define HAVE_SSE 0\n+#define HAVE_SIMD 0\n+#ifdef MINIMP3_ONLY_SIMD\n+#error MINIMP3_ONLY_SIMD used, but SSE/NEON not enabled\n+#endif /* MINIMP3_ONLY_SIMD */\n+#endif /* SIMD checks... */\n+#else /* !defined(MINIMP3_NO_SIMD) */\n+#define HAVE_SIMD 0\n+#endif /* !defined(MINIMP3_NO_SIMD) */\n+\n+#if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) && !defined(_M_ARM64)\n+#define HAVE_ARMV6 1\n+static __inline__ __attribute__((always_inline)) int32_t minimp3_clip_int16_arm(int32_t a)\n+{\n+    int32_t x = 0;\n+    __asm__ (\"ssat %0, #16, %1\" : \"=r\"(x) : \"r\"(a));\n+    return x;\n+}\n+#else\n+#define HAVE_ARMV6 0\n+#endif\n+\n+typedef struct\n+{\n+    const uint8_t *buf;\n+    int pos, limit;\n+} bs_t;\n+\n+typedef struct\n+{\n+    float scf[3*64];\n+    uint8_t total_bands, stereo_bands, bitalloc[64], scfcod[64];\n+} L12_scale_info;\n+\n+typedef struct\n+{\n+    uint8_t tab_offset, code_tab_width, band_count;\n+} L12_subband_alloc_t;\n+\n+typedef struct\n+{\n+    const uint8_t *sfbtab;\n+    uint16_t part_23_length, big_values, scalefac_compress;\n+    uint8_t global_gain, block_type, mixed_block_flag, n_long_sfb, n_short_sfb;\n+    uint8_t table_select[3], region_count[3], subblock_gain[3];\n+    uint8_t preflag, scalefac_scale, count1_table, scfsi;\n+} L3_gr_info_t;\n+\n+typedef struct\n+{\n+    bs_t bs;\n+    uint8_t maindata[MAX_BITRESERVOIR_BYTES + MAX_L3_FRAME_PAYLOAD_BYTES];\n+    L3_gr_info_t gr_info[4];\n+    float grbuf[2][576], scf[40], syn[18 + 15][2*32];\n+    uint8_t ist_pos[2][39];\n+} mp3dec_scratch_t;\n+\n+static void bs_init(bs_t *bs, const uint8_t *data, int bytes)\n+{\n+    bs->buf   = data;\n+    bs->pos   = 0;\n+    bs->limit = bytes*8;\n+}\n+\n+static uint32_t get_bits(bs_t *bs, int n)\n+{\n+    uint32_t next, cache = 0, s = bs->pos & 7;\n+    int shl = n + s;\n+    const uint8_t *p = bs->buf + (bs->pos >> 3);\n+    if ((bs->pos += n) > bs->limit)\n+        return 0;\n+    next = *p++ & (255 >> s);\n+    while ((shl -= 8) > 0)\n+    {\n+        cache |= next << shl;\n+        next = *p++;\n+    }\n+    return cache | (next >> -shl);\n+}\n+\n+static int hdr_valid(const uint8_t *h)\n+{\n+    return h[0] == 0xff &&\n+        ((h[1] & 0xF0) == 0xf0 || (h[1] & 0xFE) == 0xe2) &&\n+        (HDR_GET_LAYER(h) != 0) &&\n+        (HDR_GET_BITRATE(h) != 15) &&\n+        (HDR_GET_SAMPLE_RATE(h) != 3);\n+}\n+\n+static int hdr_compare(const uint8_t *h1, const uint8_t *h2)\n+{\n+    return hdr_valid(h2) &&\n+        ((h1[1] ^ h2[1]) & 0xFE) == 0 &&\n+        ((h1[2] ^ h2[2]) & 0x0C) == 0 &&\n+        !(HDR_IS_FREE_FORMAT(h1) ^ HDR_IS_FREE_FORMAT(h2));\n+}\n+\n+static unsigned hdr_bitrate_kbps(const uint8_t *h)\n+{\n+    static const uint8_t halfrate[2][3][15] = {\n+        { { 0,4,8,12,16,20,24,28,32,40,48,56,64,72,80 }, { 0,4,8,12,16,20,24,28,32,40,48,56,64,72,80 }, { 0,16,24,28,32,40,48,56,64,72,80,88,96,112,128 } },\n+        { { 0,16,20,24,28,32,40,48,56,64,80,96,112,128,160 }, { 0,16,24,28,32,40,48,56,64,80,96,112,128,160,192 }, { 0,16,32,48,64,80,96,112,128,144,160,176,192,208,224 } },\n+    };\n+    return 2*halfrate[!!HDR_TEST_MPEG1(h)][HDR_GET_LAYER(h) - 1][HDR_GET_BITRATE(h)];\n+}\n+\n+static unsigned hdr_sample_rate_hz(const uint8_t *h)\n+{\n+    static const unsigned g_hz[3] = { 44100, 48000, 32000 };\n+    return g_hz[HDR_GET_SAMPLE_RATE(h)] >> (int)!HDR_TEST_MPEG1(h) >> (int)!HDR_TEST_NOT_MPEG25(h);\n+}\n+\n+static unsigned hdr_frame_samples(const uint8_t *h)\n+{\n+    return HDR_IS_LAYER_1(h) ? 384 : (1152 >> (int)HDR_IS_FRAME_576(h));\n+}\n+\n+static int hdr_frame_bytes(const uint8_t *h, int free_format_size)\n+{\n+    int frame_bytes = hdr_frame_samples(h)*hdr_bitrate_kbps(h)*125/hdr_sample_rate_hz(h);\n+    if (HDR_IS_LAYER_1(h))\n+    {\n+        frame_bytes &= ~3; /* slot align */\n+    }\n+    return frame_bytes ? frame_bytes : free_format_size;\n+}\n+\n+static int hdr_padding(const uint8_t *h)\n+{\n+    return HDR_TEST_PADDING(h) ? (HDR_IS_LAYER_1(h) ? 4 : 1) : 0;\n+}\n+\n+#ifndef MINIMP3_ONLY_MP3\n+static const L12_subband_alloc_t *L12_subband_alloc_table(const uint8_t *hdr, L12_scale_info *sci)\n+{\n+    const L12_subband_alloc_t *alloc;\n+    int mode = HDR_GET_STEREO_MODE(hdr);\n+    int nbands, stereo_bands = (mode == MODE_MONO) ? 0 : (mode == MODE_JOINT_STEREO) ? (HDR_GET_STEREO_MODE_EXT(hdr) << 2) + 4 : 32;\n+\n+    if (HDR_IS_LAYER_1(hdr))\n+    {\n+        static const L12_subband_alloc_t g_alloc_L1[] = { { 76, 4, 32 } };\n+        alloc = g_alloc_L1;\n+        nbands = 32;\n+    } else if (!HDR_TEST_MPEG1(hdr))\n+    {\n+        static const L12_subband_alloc_t g_alloc_L2M2[] = { { 60, 4, 4 }, { 44, 3, 7 }, { 44, 2, 19 } };\n+        alloc = g_alloc_L2M2;\n+        nbands = 30;\n+    } else\n+    {\n+        static const L12_subband_alloc_t g_alloc_L2M1[] = { { 0, 4, 3 }, { 16, 4, 8 }, { 32, 3, 12 }, { 40, 2, 7 } };\n+        int sample_rate_idx = HDR_GET_SAMPLE_RATE(hdr);\n+        unsigned kbps = hdr_bitrate_kbps(hdr) >> (int)(mode != MODE_MONO);\n+        if (!kbps) /* free-format */\n+        {\n+            kbps = 192;\n+        }\n+\n+        alloc = g_alloc_L2M1;\n+        nbands = 27;\n+        if (kbps < 56)\n+        {\n+            static const L12_subband_alloc_t g_alloc_L2M1_lowrate[] = { { 44, 4, 2 }, { 44, 3, 10 } };\n+            alloc = g_alloc_L2M1_lowrate;\n+            nbands = sample_rate_idx == 2 ? 12 : 8;\n+        } else if (kbps >= 96 && sample_rate_idx != 1)\n+        {\n+            nbands = 30;\n+        }\n+    }\n+\n+    sci->total_bands = (uint8_t)nbands;\n+    sci->stereo_bands = (uint8_t)MINIMP3_MIN(stereo_bands, nbands);\n+\n+    return alloc;\n+}\n+\n+static void L12_read_scalefactors(bs_t *bs, uint8_t *pba, uint8_t *scfcod, int bands, float *scf)\n+{\n+    static const float g_deq_L12[18*3] = {\n+#define DQ(x) 9.53674316e-07f/x, 7.56931807e-07f/x, 6.00777173e-07f/x\n+        DQ(3),DQ(7),DQ(15),DQ(31),DQ(63),DQ(127),DQ(255),DQ(511),DQ(1023),DQ(2047),DQ(4095),DQ(8191),DQ(16383),DQ(32767),DQ(65535),DQ(3),DQ(5),DQ(9)\n+    };\n+    int i, m;\n+    for (i = 0; i < bands; i++)\n+    {\n+        float s = 0;\n+        int ba = *pba++;\n+        int mask = ba ? 4 + ((19 >> scfcod[i]) & 3) : 0;\n+        for (m = 4; m; m >>= 1)\n+        {\n+            if (mask & m)\n+            {\n+                int b = get_bits(bs, 6);\n+                s = g_deq_L12[ba*3 - 6 + b % 3]*(1 << 21 >> b/3);\n+            }\n+            *scf++ = s;\n+        }\n+    }\n+}\n+\n+static void L12_read_scale_info(const uint8_t *hdr, bs_t *bs, L12_scale_info *sci)\n+{\n+    static const uint8_t g_bitalloc_code_tab[] = {\n+        0,17, 3, 4, 5,6,7, 8,9,10,11,12,13,14,15,16,\n+        0,17,18, 3,19,4,5, 6,7, 8, 9,10,11,12,13,16,\n+        0,17,18, 3,19,4,5,16,\n+        0,17,18,16,\n+        0,17,18,19, 4,5,6, 7,8, 9,10,11,12,13,14,15,\n+        0,17,18, 3,19,4,5, 6,7, 8, 9,10,11,12,13,14,\n+        0, 2, 3, 4, 5,6,7, 8,9,10,11,12,13,14,15,16\n+    };\n+    const L12_subband_alloc_t *subband_alloc = L12_subband_alloc_table(hdr, sci);\n+\n+    int i, k = 0, ba_bits = 0;\n+    const uint8_t *ba_code_tab = g_bitalloc_code_tab;\n+\n+    for (i = 0; i < sci->total_bands; i++)\n+    {\n+        uint8_t ba;\n+        if (i == k)\n+        {\n+            k += subband_alloc->band_count;\n+            ba_bits = subband_alloc->code_tab_width;\n+            ba_code_tab = g_bitalloc_code_tab + subband_alloc->tab_offset;\n+            subband_alloc++;\n+        }\n+        ba = ba_code_tab[get_bits(bs, ba_bits)];\n+        sci->bitalloc[2*i] = ba;\n+        if (i < sci->stereo_bands)\n+        {\n+            ba = ba_code_tab[get_bits(bs, ba_bits)];\n+        }\n+        sci->bitalloc[2*i + 1] = sci->stereo_bands ? ba : 0;\n+    }\n+\n+    for (i = 0; i < 2*sci->total_bands; i++)\n+    {\n+        sci->scfcod[i] = sci->bitalloc[i] ? HDR_IS_LAYER_1(hdr) ? 2 : get_bits(bs, 2) : 6;\n+    }\n+\n+    L12_read_scalefactors(bs, sci->bitalloc, sci->scfcod, sci->total_bands*2, sci->scf);\n+\n+    for (i = sci->stereo_bands; i < sci->total_bands; i++)\n+    {\n+        sci->bitalloc[2*i + 1] = 0;\n+    }\n+}\n+\n+static int L12_dequantize_granule(float *grbuf, bs_t *bs, L12_scale_info *sci, int group_size)\n+{\n+    int i, j, k, choff = 576;\n+    for (j = 0; j < 4; j++)\n+    {\n+        float *dst = grbuf + group_size*j;\n+        for (i = 0; i < 2*sci->total_bands; i++)\n+        {\n+            int ba = sci->bitalloc[i];\n+            if (ba != 0)\n+            {\n+                if (ba < 17)\n+                {\n+                    int half = (1 << (ba - 1)) - 1;\n+                    for (k = 0; k < group_size; k++)\n+                    {\n+                        dst[k] = (float)((int)get_bits(bs, ba) - half);\n+                    }\n+                } else\n+                {\n+                    unsigned mod = (2 << (ba - 17)) + 1;    /* 3, 5, 9 */\n+                    unsigned code = get_bits(bs, mod + 2 - (mod >> 3));  /* 5, 7, 10 */\n+                    for (k = 0; k < group_size; k++, code /= mod)\n+                    {\n+                        dst[k] = (float)((int)(code % mod - mod/2));\n+                    }\n+                }\n+            }\n+            dst += choff;\n+            choff = 18 - choff;\n+        }\n+    }\n+    return group_size*4;\n+}\n+\n+static void L12_apply_scf_384(L12_scale_info *sci, const float *scf, float *dst)\n+{\n+    int i, k;\n+    memcpy(dst + 576 + sci->stereo_bands*18, dst + sci->stereo_bands*18, (sci->total_bands - sci->stereo_bands)*18*sizeof(float));\n+    for (i = 0; i < sci->total_bands; i++, dst += 18, scf += 6)\n+    {\n+        for (k = 0; k < 12; k++)\n+        {\n+            dst[k + 0]   *= scf[0];\n+            dst[k + 576] *= scf[3];\n+        }\n+    }\n+}\n+#endif /* MINIMP3_ONLY_MP3 */\n+\n+static int L3_read_side_info(bs_t *bs, L3_gr_info_t *gr, const uint8_t *hdr)\n+{\n+    static const uint8_t g_scf_long[8][23] = {\n+        { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 },\n+        { 12,12,12,12,12,12,16,20,24,28,32,40,48,56,64,76,90,2,2,2,2,2,0 },\n+        { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 },\n+        { 6,6,6,6,6,6,8,10,12,14,16,18,22,26,32,38,46,54,62,70,76,36,0 },\n+        { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 },\n+        { 4,4,4,4,4,4,6,6,8,8,10,12,16,20,24,28,34,42,50,54,76,158,0 },\n+        { 4,4,4,4,4,4,6,6,6,8,10,12,16,18,22,28,34,40,46,54,54,192,0 },\n+        { 4,4,4,4,4,4,6,6,8,10,12,16,20,24,30,38,46,56,68,84,102,26,0 }\n+    };\n+    static const uint8_t g_scf_short[8][40] = {\n+        { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 },\n+        { 8,8,8,8,8,8,8,8,8,12,12,12,16,16,16,20,20,20,24,24,24,28,28,28,36,36,36,2,2,2,2,2,2,2,2,2,26,26,26,0 },\n+        { 4,4,4,4,4,4,4,4,4,6,6,6,6,6,6,8,8,8,10,10,10,14,14,14,18,18,18,26,26,26,32,32,32,42,42,42,18,18,18,0 },\n+        { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,32,32,32,44,44,44,12,12,12,0 },\n+        { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 },\n+        { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,22,22,22,30,30,30,56,56,56,0 },\n+        { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,6,6,6,10,10,10,12,12,12,14,14,14,16,16,16,20,20,20,26,26,26,66,66,66,0 },\n+        { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,12,12,12,16,16,16,20,20,20,26,26,26,34,34,34,42,42,42,12,12,12,0 }\n+    };\n+    static const uint8_t g_scf_mixed[8][40] = {\n+        { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 },\n+        { 12,12,12,4,4,4,8,8,8,12,12,12,16,16,16,20,20,20,24,24,24,28,28,28,36,36,36,2,2,2,2,2,2,2,2,2,26,26,26,0 },\n+        { 6,6,6,6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,14,14,14,18,18,18,26,26,26,32,32,32,42,42,42,18,18,18,0 },\n+        { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,32,32,32,44,44,44,12,12,12,0 },\n+        { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 },\n+        { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,22,22,22,30,30,30,56,56,56,0 },\n+        { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,6,6,6,10,10,10,12,12,12,14,14,14,16,16,16,20,20,20,26,26,26,66,66,66,0 },\n+        { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,8,8,8,12,12,12,16,16,16,20,20,20,26,26,26,34,34,34,42,42,42,12,12,12,0 }\n+    };\n+\n+    unsigned tables, scfsi = 0;\n+    int main_data_begin, part_23_sum = 0;\n+    int sr_idx = HDR_GET_MY_SAMPLE_RATE(hdr); sr_idx -= (sr_idx != 0);\n+    int gr_count = HDR_IS_MONO(hdr) ? 1 : 2;\n+\n+    if (HDR_TEST_MPEG1(hdr))\n+    {\n+        gr_count *= 2;\n+        main_data_begin = get_bits(bs, 9);\n+        scfsi = get_bits(bs, 7 + gr_count);\n+    } else\n+    {\n+        main_data_begin = get_bits(bs, 8 + gr_count) >> gr_count;\n+    }\n+\n+    do\n+    {\n+        if (HDR_IS_MONO(hdr))\n+        {\n+            scfsi <<= 4;\n+        }\n+        gr->part_23_length = (uint16_t)get_bits(bs, 12);\n+        part_23_sum += gr->part_23_length;\n+        gr->big_values = (uint16_t)get_bits(bs,  9);\n+        if (gr->big_values > 288)\n+        {\n+            return -1;\n+        }\n+        gr->global_gain = (uint8_t)get_bits(bs, 8);\n+        gr->scalefac_compress = (uint16_t)get_bits(bs, HDR_TEST_MPEG1(hdr) ? 4 : 9);\n+        gr->sfbtab = g_scf_long[sr_idx];\n+        gr->n_long_sfb  = 22;\n+        gr->n_short_sfb = 0;\n+        if (get_bits(bs, 1))\n+        {\n+            gr->block_type = (uint8_t)get_bits(bs, 2);\n+            if (!gr->block_type)\n+            {\n+                return -1;\n+            }\n+            gr->mixed_block_flag = (uint8_t)get_bits(bs, 1);\n+            gr->region_count[0] = 7;\n+            gr->region_count[1] = 255;\n+            if (gr->block_type == SHORT_BLOCK_TYPE)\n+            {\n+                scfsi &= 0x0F0F;\n+                if (!gr->mixed_block_flag)\n+                {\n+                    gr->region_count[0] = 8;\n+                    gr->sfbtab = g_scf_short[sr_idx];\n+                    gr->n_long_sfb = 0;\n+                    gr->n_short_sfb = 39;\n+                } else\n+                {\n+                    gr->sfbtab = g_scf_mixed[sr_idx];\n+                    gr->n_long_sfb = HDR_TEST_MPEG1(hdr) ? 8 : 6;\n+                    gr->n_short_sfb = 30;\n+                }\n+            }\n+            tables = get_bits(bs, 10);\n+            tables <<= 5;\n+            gr->subblock_gain[0] = (uint8_t)get_bits(bs, 3);\n+            gr->subblock_gain[1] = (uint8_t)get_bits(bs, 3);\n+            gr->subblock_gain[2] = (uint8_t)get_bits(bs, 3);\n+        } else\n+        {\n+            gr->block_type = 0;\n+            gr->mixed_block_flag = 0;\n+            tables = get_bits(bs, 15);\n+            gr->region_count[0] = (uint8_t)get_bits(bs, 4);\n+            gr->region_count[1] = (uint8_t)get_bits(bs, 3);\n+            gr->region_count[2] = 255;\n+        }\n+        gr->table_select[0] = (uint8_t)(tables >> 10);\n+        gr->table_select[1] = (uint8_t)((tables >> 5) & 31);\n+        gr->table_select[2] = (uint8_t)((tables) & 31);\n+        gr->preflag = HDR_TEST_MPEG1(hdr) ? get_bits(bs, 1) : (gr->scalefac_compress >= 500);\n+        gr->scalefac_scale = (uint8_t)get_bits(bs, 1);\n+        gr->count1_table = (uint8_t)get_bits(bs, 1);\n+        gr->scfsi = (uint8_t)((scfsi >> 12) & 15);\n+        scfsi <<= 4;\n+        gr++;\n+    } while(--gr_count);\n+\n+    if (part_23_sum + bs->pos > bs->limit + main_data_begin*8)\n+    {\n+        return -1;\n+    }\n+\n+    return main_data_begin;\n+}\n+\n+static void L3_read_scalefactors(uint8_t *scf, uint8_t *ist_pos, const uint8_t *scf_size, const uint8_t *scf_count, bs_t *bitbuf, int scfsi)\n+{\n+    int i, k;\n+    for (i = 0; i < 4 && scf_count[i]; i++, scfsi *= 2)\n+    {\n+        int cnt = scf_count[i];\n+        if (scfsi & 8)\n+        {\n+            memcpy(scf, ist_pos, cnt);\n+        } else\n+        {\n+            int bits = scf_size[i];\n+            if (!bits)\n+            {\n+                memset(scf, 0, cnt);\n+                memset(ist_pos, 0, cnt);\n+            } else\n+            {\n+                int max_scf = (scfsi < 0) ? (1 << bits) - 1 : -1;\n+                for (k = 0; k < cnt; k++)\n+                {\n+                    int s = get_bits(bitbuf, bits);\n+                    ist_pos[k] = (s == max_scf ? -1 : s);\n+                    scf[k] = s;\n+                }\n+            }\n+        }\n+        ist_pos += cnt;\n+        scf += cnt;\n+    }\n+    scf[0] = scf[1] = scf[2] = 0;\n+}\n+\n+static float L3_ldexp_q2(float y, int exp_q2)\n+{\n+    static const float g_expfrac[4] = { 9.31322575e-10f,7.83145814e-10f,6.58544508e-10f,5.53767716e-10f };\n+    int e;\n+    do\n+    {\n+        e = MINIMP3_MIN(30*4, exp_q2);\n+        y *= g_expfrac[e & 3]*(1 << 30 >> (e >> 2));\n+    } while ((exp_q2 -= e) > 0);\n+    return y;\n+}\n+\n+static void L3_decode_scalefactors(const uint8_t *hdr, uint8_t *ist_pos, bs_t *bs, const L3_gr_info_t *gr, float *scf, int ch)\n+{\n+    static const uint8_t g_scf_partitions[3][28] = {\n+        { 6,5,5, 5,6,5,5,5,6,5, 7,3,11,10,0,0, 7, 7, 7,0, 6, 6,6,3, 8, 8,5,0 },\n+        { 8,9,6,12,6,9,9,9,6,9,12,6,15,18,0,0, 6,15,12,0, 6,12,9,6, 6,18,9,0 },\n+        { 9,9,6,12,9,9,9,9,9,9,12,6,18,18,0,0,12,12,12,0,12, 9,9,6,15,12,9,0 }\n+    };\n+    const uint8_t *scf_partition = g_scf_partitions[!!gr->n_short_sfb + !gr->n_long_sfb];\n+    uint8_t scf_size[4], iscf[40];\n+    int i, scf_shift = gr->scalefac_scale + 1, gain_exp, scfsi = gr->scfsi;\n+    float gain;\n+\n+    if (HDR_TEST_MPEG1(hdr))\n+    {\n+        static const uint8_t g_scfc_decode[16] = { 0,1,2,3, 12,5,6,7, 9,10,11,13, 14,15,18,19 };\n+        int part = g_scfc_decode[gr->scalefac_compress];\n+        scf_size[1] = scf_size[0] = (uint8_t)(part >> 2);\n+        scf_size[3] = scf_size[2] = (uint8_t)(part & 3);\n+    } else\n+    {\n+        static const uint8_t g_mod[6*4] = { 5,5,4,4,5,5,4,1,4,3,1,1,5,6,6,1,4,4,4,1,4,3,1,1 };\n+        int k, modprod, sfc, ist = HDR_TEST_I_STEREO(hdr) && ch;\n+        sfc = gr->scalefac_compress >> ist;\n+        for (k = ist*3*4; sfc >= 0; sfc -= modprod, k += 4)\n+        {\n+            for (modprod = 1, i = 3; i >= 0; i--)\n+            {\n+                scf_size[i] = (uint8_t)(sfc / modprod % g_mod[k + i]);\n+                modprod *= g_mod[k + i];\n+            }\n+        }\n+        scf_partition += k;\n+        scfsi = -16;\n+    }\n+    L3_read_scalefactors(iscf, ist_pos, scf_size, scf_partition, bs, scfsi);\n+\n+    if (gr->n_short_sfb)\n+    {\n+        int sh = 3 - scf_shift;\n+        for (i = 0; i < gr->n_short_sfb; i += 3)\n+        {\n+            iscf[gr->n_long_sfb + i + 0] += gr->subblock_gain[0] << sh;\n+            iscf[gr->n_long_sfb + i + 1] += gr->subblock_gain[1] << sh;\n+            iscf[gr->n_long_sfb + i + 2] += gr->subblock_gain[2] << sh;\n+        }\n+    } else if (gr->preflag)\n+    {\n+        static const uint8_t g_preamp[10] = { 1,1,1,1,2,2,3,3,3,2 };\n+        for (i = 0; i < 10; i++)\n+        {\n+            iscf[11 + i] += g_preamp[i];\n+        }\n+    }\n+\n+    gain_exp = gr->global_gain + BITS_DEQUANTIZER_OUT*4 - 210 - (HDR_IS_MS_STEREO(hdr) ? 2 : 0);\n+    gain = L3_ldexp_q2(1 << (MAX_SCFI/4),  MAX_SCFI - gain_exp);\n+    for (i = 0; i < (int)(gr->n_long_sfb + gr->n_short_sfb); i++)\n+    {\n+        scf[i] = L3_ldexp_q2(gain, iscf[i] << scf_shift);\n+    }\n+}\n+\n+static const float g_pow43[129 + 16] = {\n+    0,-1,-2.519842f,-4.326749f,-6.349604f,-8.549880f,-10.902724f,-13.390518f,-16.000000f,-18.720754f,-21.544347f,-24.463781f,-27.473142f,-30.567351f,-33.741992f,-36.993181f,\n+    0,1,2.519842f,4.326749f,6.349604f,8.549880f,10.902724f,13.390518f,16.000000f,18.720754f,21.544347f,24.463781f,27.473142f,30.567351f,33.741992f,36.993181f,40.317474f,43.711787f,47.173345f,50.699631f,54.288352f,57.937408f,61.644865f,65.408941f,69.227979f,73.100443f,77.024898f,81.000000f,85.024491f,89.097188f,93.216975f,97.382800f,101.593667f,105.848633f,110.146801f,114.487321f,118.869381f,123.292209f,127.755065f,132.257246f,136.798076f,141.376907f,145.993119f,150.646117f,155.335327f,160.060199f,164.820202f,169.614826f,174.443577f,179.305980f,184.201575f,189.129918f,194.090580f,199.083145f,204.107210f,209.162385f,214.248292f,219.364564f,224.510845f,229.686789f,234.892058f,240.126328f,245.389280f,250.680604f,256.000000f,261.347174f,266.721841f,272.123723f,277.552547f,283.008049f,288.489971f,293.998060f,299.532071f,305.091761f,310.676898f,316.287249f,321.922592f,327.582707f,333.267377f,338.976394f,344.709550f,350.466646f,356.247482f,362.051866f,367.879608f,373.730522f,379.604427f,385.501143f,391.420496f,397.362314f,403.326427f,409.312672f,415.320884f,421.350905f,427.402579f,433.475750f,439.570269f,445.685987f,451.822757f,457.980436f,464.158883f,470.357960f,476.577530f,482.817459f,489.077615f,495.357868f,501.658090f,507.978156f,514.317941f,520.677324f,527.056184f,533.454404f,539.871867f,546.308458f,552.764065f,559.238575f,565.731879f,572.243870f,578.774440f,585.323483f,591.890898f,598.476581f,605.080431f,611.702349f,618.342238f,625.000000f,631.675540f,638.368763f,645.079578f\n+};\n+\n+static float L3_pow_43(int x)\n+{\n+    float frac;\n+    int sign, mult = 256;\n+\n+    if (x < 129)\n+    {\n+        return g_pow43[16 + x];\n+    }\n+\n+    if (x < 1024)\n+    {\n+        mult = 16;\n+        x <<= 3;\n+    }\n+\n+    sign = 2*x & 64;\n+    frac = (float)((x & 63) - sign) / ((x & ~63) + sign);\n+    return g_pow43[16 + ((x + sign) >> 6)]*(1.f + frac*((4.f/3) + frac*(2.f/9)))*mult;\n+}\n+\n+static void L3_huffman(float *dst, bs_t *bs, const L3_gr_info_t *gr_info, const float *scf, int layer3gr_limit)\n+{\n+    static const int16_t tabs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n+        785,785,785,785,784,784,784,784,513,513,513,513,513,513,513,513,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,\n+        -255,1313,1298,1282,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,290,288,\n+        -255,1313,1298,1282,769,769,769,769,529,529,529,529,529,529,529,529,528,528,528,528,528,528,528,528,512,512,512,512,512,512,512,512,290,288,\n+        -253,-318,-351,-367,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,819,818,547,547,275,275,275,275,561,560,515,546,289,274,288,258,\n+        -254,-287,1329,1299,1314,1312,1057,1057,1042,1042,1026,1026,784,784,784,784,529,529,529,529,529,529,529,529,769,769,769,769,768,768,768,768,563,560,306,306,291,259,\n+        -252,-413,-477,-542,1298,-575,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-383,-399,1107,1092,1106,1061,849,849,789,789,1104,1091,773,773,1076,1075,341,340,325,309,834,804,577,577,532,532,516,516,832,818,803,816,561,561,531,531,515,546,289,289,288,258,\n+        -252,-429,-493,-559,1057,1057,1042,1042,529,529,529,529,529,529,529,529,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,-382,1077,-415,1106,1061,1104,849,849,789,789,1091,1076,1029,1075,834,834,597,581,340,340,339,324,804,833,532,532,832,772,818,803,817,787,816,771,290,290,290,290,288,258,\n+        -253,-349,-414,-447,-463,1329,1299,-479,1314,1312,1057,1057,1042,1042,1026,1026,785,785,785,785,784,784,784,784,769,769,769,769,768,768,768,768,-319,851,821,-335,836,850,805,849,341,340,325,336,533,533,579,579,564,564,773,832,578,548,563,516,321,276,306,291,304,259,\n+        -251,-572,-733,-830,-863,-879,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,1396,1351,1381,1366,1395,1335,1380,-559,1334,1138,1138,1063,1063,1350,1392,1031,1031,1062,1062,1364,1363,1120,1120,1333,1348,881,881,881,881,375,374,359,373,343,358,341,325,791,791,1123,1122,-703,1105,1045,-719,865,865,790,790,774,774,1104,1029,338,293,323,308,-799,-815,833,788,772,818,803,816,322,292,307,320,561,531,515,546,289,274,288,258,\n+        -251,-525,-605,-685,-765,-831,-846,1298,1057,1057,1312,1282,785,785,785,785,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,1399,1398,1383,1367,1382,1396,1351,-511,1381,1366,1139,1139,1079,1079,1124,1124,1364,1349,1363,1333,882,882,882,882,807,807,807,807,1094,1094,1136,1136,373,341,535,535,881,775,867,822,774,-591,324,338,-671,849,550,550,866,864,609,609,293,336,534,534,789,835,773,-751,834,804,308,307,833,788,832,772,562,562,547,547,305,275,560,515,290,290,\n+        -252,-397,-477,-557,-622,-653,-719,-735,-750,1329,1299,1314,1057,1057,1042,1042,1312,1282,1024,1024,785,785,785,785,784,784,784,784,769,769,769,769,-383,1127,1141,1111,1126,1140,1095,1110,869,869,883,883,1079,1109,882,882,375,374,807,868,838,881,791,-463,867,822,368,263,852,837,836,-543,610,610,550,550,352,336,534,534,865,774,851,821,850,805,593,533,579,564,773,832,578,578,548,548,577,577,307,276,306,291,516,560,259,259,\n+        -250,-2107,-2507,-2764,-2909,-2974,-3007,-3023,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-767,-1052,-1213,-1277,-1358,-1405,-1469,-1535,-1550,-1582,-1614,-1647,-1662,-1694,-1726,-1759,-1774,-1807,-1822,-1854,-1886,1565,-1919,-1935,-1951,-1967,1731,1730,1580,1717,-1983,1729,1564,-1999,1548,-2015,-2031,1715,1595,-2047,1714,-2063,1610,-2079,1609,-2095,1323,1323,1457,1457,1307,1307,1712,1547,1641,1700,1699,1594,1685,1625,1442,1442,1322,1322,-780,-973,-910,1279,1278,1277,1262,1276,1261,1275,1215,1260,1229,-959,974,974,989,989,-943,735,478,478,495,463,506,414,-1039,1003,958,1017,927,942,987,957,431,476,1272,1167,1228,-1183,1256,-1199,895,895,941,941,1242,1227,1212,1135,1014,1014,490,489,503,487,910,1013,985,925,863,894,970,955,1012,847,-1343,831,755,755,984,909,428,366,754,559,-1391,752,486,457,924,997,698,698,983,893,740,740,908,877,739,739,667,667,953,938,497,287,271,271,683,606,590,712,726,574,302,302,738,736,481,286,526,725,605,711,636,724,696,651,589,681,666,710,364,467,573,695,466,466,301,465,379,379,709,604,665,679,316,316,634,633,436,436,464,269,424,394,452,332,438,363,347,408,393,448,331,422,362,407,392,421,346,406,391,376,375,359,1441,1306,-2367,1290,-2383,1337,-2399,-2415,1426,1321,-2431,1411,1336,-2447,-2463,-2479,1169,1169,1049,1049,1424,1289,1412,1352,1319,-2495,1154,1154,1064,1064,1153,1153,416,390,360,404,403,389,344,374,373,343,358,372,327,357,342,311,356,326,1395,1394,1137,1137,1047,1047,1365,1392,1287,1379,1334,1364,1349,1378,1318,1363,792,792,792,792,1152,1152,1032,1032,1121,1121,1046,1046,1120,1120,1030,1030,-2895,1106,1061,1104,849,849,789,789,1091,1076,1029,1090,1060,1075,833,833,309,324,532,532,832,772,818,803,561,561,531,560,515,546,289,274,288,258,\n+        -250,-1179,-1579,-1836,-1996,-2124,-2253,-2333,-2413,-2477,-2542,-2574,-2607,-2622,-2655,1314,1313,1298,1312,1282,785,785,785,785,1040,1040,1025,1025,768,768,768,768,-766,-798,-830,-862,-895,-911,-927,-943,-959,-975,-991,-1007,-1023,-1039,-1055,-1070,1724,1647,-1103,-1119,1631,1767,1662,1738,1708,1723,-1135,1780,1615,1779,1599,1677,1646,1778,1583,-1151,1777,1567,1737,1692,1765,1722,1707,1630,1751,1661,1764,1614,1736,1676,1763,1750,1645,1598,1721,1691,1762,1706,1582,1761,1566,-1167,1749,1629,767,766,751,765,494,494,735,764,719,749,734,763,447,447,748,718,477,506,431,491,446,476,461,505,415,430,475,445,504,399,460,489,414,503,383,474,429,459,502,502,746,752,488,398,501,473,413,472,486,271,480,270,-1439,-1455,1357,-1471,-1487,-1503,1341,1325,-1519,1489,1463,1403,1309,-1535,1372,1448,1418,1476,1356,1462,1387,-1551,1475,1340,1447,1402,1386,-1567,1068,1068,1474,1461,455,380,468,440,395,425,410,454,364,467,466,464,453,269,409,448,268,432,1371,1473,1432,1417,1308,1460,1355,1446,1459,1431,1083,1083,1401,1416,1458,1445,1067,1067,1370,1457,1051,1051,1291,1430,1385,1444,1354,1415,1400,1443,1082,1082,1173,1113,1186,1066,1185,1050,-1967,1158,1128,1172,1097,1171,1081,-1983,1157,1112,416,266,375,400,1170,1142,1127,1065,793,793,1169,1033,1156,1096,1141,1111,1155,1080,1126,1140,898,898,808,808,897,897,792,792,1095,1152,1032,1125,1110,1139,1079,1124,882,807,838,881,853,791,-2319,867,368,263,822,852,837,866,806,865,-2399,851,352,262,534,534,821,836,594,594,549,549,593,593,533,533,848,773,579,579,564,578,548,563,276,276,577,576,306,291,516,560,305,305,275,259,\n+        -251,-892,-2058,-2620,-2828,-2957,-3023,-3039,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,-559,1530,-575,-591,1528,1527,1407,1526,1391,1023,1023,1023,1023,1525,1375,1268,1268,1103,1103,1087,1087,1039,1039,1523,-604,815,815,815,815,510,495,509,479,508,463,507,447,431,505,415,399,-734,-782,1262,-815,1259,1244,-831,1258,1228,-847,-863,1196,-879,1253,987,987,748,-767,493,493,462,477,414,414,686,669,478,446,461,445,474,429,487,458,412,471,1266,1264,1009,1009,799,799,-1019,-1276,-1452,-1581,-1677,-1757,-1821,-1886,-1933,-1997,1257,1257,1483,1468,1512,1422,1497,1406,1467,1496,1421,1510,1134,1134,1225,1225,1466,1451,1374,1405,1252,1252,1358,1480,1164,1164,1251,1251,1238,1238,1389,1465,-1407,1054,1101,-1423,1207,-1439,830,830,1248,1038,1237,1117,1223,1148,1236,1208,411,426,395,410,379,269,1193,1222,1132,1235,1221,1116,976,976,1192,1162,1177,1220,1131,1191,963,963,-1647,961,780,-1663,558,558,994,993,437,408,393,407,829,978,813,797,947,-1743,721,721,377,392,844,950,828,890,706,706,812,859,796,960,948,843,934,874,571,571,-1919,690,555,689,421,346,539,539,944,779,918,873,932,842,903,888,570,570,931,917,674,674,-2575,1562,-2591,1609,-2607,1654,1322,1322,1441,1441,1696,1546,1683,1593,1669,1624,1426,1426,1321,1321,1639,1680,1425,1425,1305,1305,1545,1668,1608,1623,1667,1592,1638,1666,1320,1320,1652,1607,1409,1409,1304,1304,1288,1288,1664,1637,1395,1395,1335,1335,1622,1636,1394,1394,1319,1319,1606,1621,1392,1392,1137,1137,1137,1137,345,390,360,375,404,373,1047,-2751,-2767,-2783,1062,1121,1046,-2799,1077,-2815,1106,1061,789,789,1105,1104,263,355,310,340,325,354,352,262,339,324,1091,1076,1029,1090,1060,1075,833,833,788,788,1088,1028,818,818,803,803,561,561,531,531,816,771,546,546,289,274,288,258,\n+        -253,-317,-381,-446,-478,-509,1279,1279,-811,-1179,-1451,-1756,-1900,-2028,-2189,-2253,-2333,-2414,-2445,-2511,-2526,1313,1298,-2559,1041,1041,1040,1040,1025,1025,1024,1024,1022,1007,1021,991,1020,975,1019,959,687,687,1018,1017,671,671,655,655,1016,1015,639,639,758,758,623,623,757,607,756,591,755,575,754,559,543,543,1009,783,-575,-621,-685,-749,496,-590,750,749,734,748,974,989,1003,958,988,973,1002,942,987,957,972,1001,926,986,941,971,956,1000,910,985,925,999,894,970,-1071,-1087,-1102,1390,-1135,1436,1509,1451,1374,-1151,1405,1358,1480,1420,-1167,1507,1494,1389,1342,1465,1435,1450,1326,1505,1310,1493,1373,1479,1404,1492,1464,1419,428,443,472,397,736,526,464,464,486,457,442,471,484,482,1357,1449,1434,1478,1388,1491,1341,1490,1325,1489,1463,1403,1309,1477,1372,1448,1418,1433,1476,1356,1462,1387,-1439,1475,1340,1447,1402,1474,1324,1461,1371,1473,269,448,1432,1417,1308,1460,-1711,1459,-1727,1441,1099,1099,1446,1386,1431,1401,-1743,1289,1083,1083,1160,1160,1458,1445,1067,1067,1370,1457,1307,1430,1129,1129,1098,1098,268,432,267,416,266,400,-1887,1144,1187,1082,1173,1113,1186,1066,1050,1158,1128,1143,1172,1097,1171,1081,420,391,1157,1112,1170,1142,1127,1065,1169,1049,1156,1096,1141,1111,1155,1080,1126,1154,1064,1153,1140,1095,1048,-2159,1125,1110,1137,-2175,823,823,1139,1138,807,807,384,264,368,263,868,838,853,791,867,822,852,837,866,806,865,790,-2319,851,821,836,352,262,850,805,849,-2399,533,533,835,820,336,261,578,548,563,577,532,532,832,772,562,562,547,547,305,275,560,515,290,290,288,258 };\n+    static const uint8_t tab32[] = { 130,162,193,209,44,28,76,140,9,9,9,9,9,9,9,9,190,254,222,238,126,94,157,157,109,61,173,205 };\n+    static const uint8_t tab33[] = { 252,236,220,204,188,172,156,140,124,108,92,76,60,44,28,12 };\n+    static const int16_t tabindex[2*16] = { 0,32,64,98,0,132,180,218,292,364,426,538,648,746,0,1126,1460,1460,1460,1460,1460,1460,1460,1460,1842,1842,1842,1842,1842,1842,1842,1842 };\n+    static const uint8_t g_linbits[] =  { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,6,8,10,13,4,5,6,7,8,9,11,13 };\n+\n+#define PEEK_BITS(n)  (bs_cache >> (32 - n))\n+#define FLUSH_BITS(n) { bs_cache <<= (n); bs_sh += (n); }\n+#define CHECK_BITS    while (bs_sh >= 0) { bs_cache |= (uint32_t)*bs_next_ptr++ << bs_sh; bs_sh -= 8; }\n+#define BSPOS         ((bs_next_ptr - bs->buf)*8 - 24 + bs_sh)\n+\n+    float one = 0.0f;\n+    int ireg = 0, big_val_cnt = gr_info->big_values;\n+    const uint8_t *sfb = gr_info->sfbtab;\n+    const uint8_t *bs_next_ptr = bs->buf + bs->pos/8;\n+    uint32_t bs_cache = (((bs_next_ptr[0]*256u + bs_next_ptr[1])*256u + bs_next_ptr[2])*256u + bs_next_ptr[3]) << (bs->pos & 7);\n+    int pairs_to_decode, np, bs_sh = (bs->pos & 7) - 8;\n+    bs_next_ptr += 4;\n+\n+    while (big_val_cnt > 0)\n+    {\n+        int tab_num = gr_info->table_select[ireg];\n+        int sfb_cnt = gr_info->region_count[ireg++];\n+        const int16_t *codebook = tabs + tabindex[tab_num];\n+        int linbits = g_linbits[tab_num];\n+        if (linbits)\n+        {\n+            do\n+            {\n+                np = *sfb++ / 2;\n+                pairs_to_decode = MINIMP3_MIN(big_val_cnt, np);\n+                one = *scf++;\n+                do\n+                {\n+                    int j, w = 5;\n+                    int leaf = codebook[PEEK_BITS(w)];\n+                    while (leaf < 0)\n+                    {\n+                        FLUSH_BITS(w);\n+                        w = leaf & 7;\n+                        leaf = codebook[PEEK_BITS(w) - (leaf >> 3)];\n+                    }\n+                    FLUSH_BITS(leaf >> 8);\n+\n+                    for (j = 0; j < 2; j++, dst++, leaf >>= 4)\n+                    {\n+                        int lsb = leaf & 0x0F;\n+                        if (lsb == 15)\n+                        {\n+                            lsb += PEEK_BITS(linbits);\n+                            FLUSH_BITS(linbits);\n+                            CHECK_BITS;\n+                            *dst = one*L3_pow_43(lsb)*((int32_t)bs_cache < 0 ? -1: 1);\n+                        } else\n+                        {\n+                            *dst = g_pow43[16 + lsb - 16*(bs_cache >> 31)]*one;\n+                        }\n+                        FLUSH_BITS(lsb ? 1 : 0);\n+                    }\n+                    CHECK_BITS;\n+                } while (--pairs_to_decode);\n+            } while ((big_val_cnt -= np) > 0 && --sfb_cnt >= 0);\n+        } else\n+        {\n+            do\n+            {\n+                np = *sfb++ / 2;\n+                pairs_to_decode = MINIMP3_MIN(big_val_cnt, np);\n+                one = *scf++;\n+                do\n+                {\n+                    int j, w = 5;\n+                    int leaf = codebook[PEEK_BITS(w)];\n+                    while (leaf < 0)\n+                    {\n+                        FLUSH_BITS(w);\n+                        w = leaf & 7;\n+                        leaf = codebook[PEEK_BITS(w) - (leaf >> 3)];\n+                    }\n+                    FLUSH_BITS(leaf >> 8);\n+\n+                    for (j = 0; j < 2; j++, dst++, leaf >>= 4)\n+                    {\n+                        int lsb = leaf & 0x0F;\n+                        *dst = g_pow43[16 + lsb - 16*(bs_cache >> 31)]*one;\n+                        FLUSH_BITS(lsb ? 1 : 0);\n+                    }\n+                    CHECK_BITS;\n+                } while (--pairs_to_decode);\n+            } while ((big_val_cnt -= np) > 0 && --sfb_cnt >= 0);\n+        }\n+    }\n+\n+    for (np = 1 - big_val_cnt;; dst += 4)\n+    {\n+        const uint8_t *codebook_count1 = (gr_info->count1_table) ? tab33 : tab32;\n+        int leaf = codebook_count1[PEEK_BITS(4)];\n+        if (!(leaf & 8))\n+        {\n+            leaf = codebook_count1[(leaf >> 3) + (bs_cache << 4 >> (32 - (leaf & 3)))];\n+        }\n+        FLUSH_BITS(leaf & 7);\n+        if (BSPOS > layer3gr_limit)\n+        {\n+            break;\n+        }\n+#define RELOAD_SCALEFACTOR  if (!--np) { np = *sfb++/2; if (!np) break; one = *scf++; }\n+#define DEQ_COUNT1(s) if (leaf & (128 >> s)) { dst[s] = ((int32_t)bs_cache < 0) ? -one : one; FLUSH_BITS(1) }\n+        RELOAD_SCALEFACTOR;\n+        DEQ_COUNT1(0);\n+        DEQ_COUNT1(1);\n+        RELOAD_SCALEFACTOR;\n+        DEQ_COUNT1(2);\n+        DEQ_COUNT1(3);\n+        CHECK_BITS;\n+    }\n+\n+    bs->pos = layer3gr_limit;\n+}\n+\n+static void L3_midside_stereo(float *left, int n)\n+{\n+    int i = 0;\n+    float *right = left + 576;\n+#if HAVE_SIMD\n+    if (have_simd())\n+    {\n+        for (; i < n - 3; i += 4)\n+        {\n+            f4 vl = VLD(left + i);\n+            f4 vr = VLD(right + i);\n+            VSTORE(left + i, VADD(vl, vr));\n+            VSTORE(right + i, VSUB(vl, vr));\n+        }\n+#ifdef __GNUC__\n+        /* Workaround for spurious -Waggressive-loop-optimizations warning from gcc.\n+         * For more info see: https://github.com/lieff/minimp3/issues/88\n+         */\n+        if (__builtin_constant_p(n % 4 == 0) && n % 4 == 0)\n+            return;\n+#endif\n+    }\n+#endif /* HAVE_SIMD */\n+    for (; i < n; i++)\n+    {\n+        float a = left[i];\n+        float b = right[i];\n+        left[i] = a + b;\n+        right[i] = a - b;\n+    }\n+}\n+\n+static void L3_intensity_stereo_band(float *left, int n, float kl, float kr)\n+{\n+    int i;\n+    for (i = 0; i < n; i++)\n+    {\n+        left[i + 576] = left[i]*kr;\n+        left[i] = left[i]*kl;\n+    }\n+}\n+\n+static void L3_stereo_top_band(const float *right, const uint8_t *sfb, int nbands, int max_band[3])\n+{\n+    int i, k;\n+\n+    max_band[0] = max_band[1] = max_band[2] = -1;\n+\n+    for (i = 0; i < nbands; i++)\n+    {\n+        for (k = 0; k < sfb[i]; k += 2)\n+        {\n+            if (right[k] != 0 || right[k + 1] != 0)\n+            {\n+                max_band[i % 3] = i;\n+                break;\n+            }\n+        }\n+        right += sfb[i];\n+    }\n+}\n+\n+static void L3_stereo_process(float *left, const uint8_t *ist_pos, const uint8_t *sfb, const uint8_t *hdr, int max_band[3], int mpeg2_sh)\n+{\n+    static const float g_pan[7*2] = { 0,1,0.21132487f,0.78867513f,0.36602540f,0.63397460f,0.5f,0.5f,0.63397460f,0.36602540f,0.78867513f,0.21132487f,1,0 };\n+    unsigned i, max_pos = HDR_TEST_MPEG1(hdr) ? 7 : 64;\n+\n+    for (i = 0; sfb[i]; i++)\n+    {\n+        unsigned ipos = ist_pos[i];\n+        if ((int)i > max_band[i % 3] && ipos < max_pos)\n+        {\n+            float kl, kr, s = HDR_TEST_MS_STEREO(hdr) ? 1.41421356f : 1;\n+            if (HDR_TEST_MPEG1(hdr))\n+            {\n+                kl = g_pan[2*ipos];\n+                kr = g_pan[2*ipos + 1];\n+            } else\n+            {\n+                kl = 1;\n+                kr = L3_ldexp_q2(1, (ipos + 1) >> 1 << mpeg2_sh);\n+                if (ipos & 1)\n+                {\n+                    kl = kr;\n+                    kr = 1;\n+                }\n+            }\n+            L3_intensity_stereo_band(left, sfb[i], kl*s, kr*s);\n+        } else if (HDR_TEST_MS_STEREO(hdr))\n+        {\n+            L3_midside_stereo(left, sfb[i]);\n+        }\n+        left += sfb[i];\n+    }\n+}\n+\n+static void L3_intensity_stereo(float *left, uint8_t *ist_pos, const L3_gr_info_t *gr, const uint8_t *hdr)\n+{\n+    int max_band[3], n_sfb = gr->n_long_sfb + gr->n_short_sfb;\n+    int i, max_blocks = gr->n_short_sfb ? 3 : 1;\n+\n+    L3_stereo_top_band(left + 576, gr->sfbtab, n_sfb, max_band);\n+    if (gr->n_long_sfb)\n+    {\n+        max_band[0] = max_band[1] = max_band[2] = MINIMP3_MAX(MINIMP3_MAX(max_band[0], max_band[1]), max_band[2]);\n+    }\n+    for (i = 0; i < max_blocks; i++)\n+    {\n+        int default_pos = HDR_TEST_MPEG1(hdr) ? 3 : 0;\n+        int itop = n_sfb - max_blocks + i;\n+        int prev = itop - max_blocks;\n+        ist_pos[itop] = max_band[i] >= prev ? default_pos : ist_pos[prev];\n+    }\n+    L3_stereo_process(left, ist_pos, gr->sfbtab, hdr, max_band, gr[1].scalefac_compress & 1);\n+}\n+\n+static void L3_reorder(float *grbuf, float *scratch, const uint8_t *sfb)\n+{\n+    int i, len;\n+    float *src = grbuf, *dst = scratch;\n+\n+    for (;0 != (len = *sfb); sfb += 3, src += 2*len)\n+    {\n+        for (i = 0; i < len; i++, src++)\n+        {\n+            *dst++ = src[0*len];\n+            *dst++ = src[1*len];\n+            *dst++ = src[2*len];\n+        }\n+    }\n+    memcpy(grbuf, scratch, (dst - scratch)*sizeof(float));\n+}\n+\n+static void L3_antialias(float *grbuf, int nbands)\n+{\n+    static const float g_aa[2][8] = {\n+        {0.85749293f,0.88174200f,0.94962865f,0.98331459f,0.99551782f,0.99916056f,0.99989920f,0.99999316f},\n+        {0.51449576f,0.47173197f,0.31337745f,0.18191320f,0.09457419f,0.04096558f,0.01419856f,0.00369997f}\n+    };\n+\n+    for (; nbands > 0; nbands--, grbuf += 18)\n+    {\n+        int i = 0;\n+#if HAVE_SIMD\n+        if (have_simd()) for (; i < 8; i += 4)\n+        {\n+            f4 vu = VLD(grbuf + 18 + i);\n+            f4 vd = VLD(grbuf + 14 - i);\n+            f4 vc0 = VLD(g_aa[0] + i);\n+            f4 vc1 = VLD(g_aa[1] + i);\n+            vd = VREV(vd);\n+            VSTORE(grbuf + 18 + i, VSUB(VMUL(vu, vc0), VMUL(vd, vc1)));\n+            vd = VADD(VMUL(vu, vc1), VMUL(vd, vc0));\n+            VSTORE(grbuf + 14 - i, VREV(vd));\n+        }\n+#endif /* HAVE_SIMD */\n+#ifndef MINIMP3_ONLY_SIMD\n+        for(; i < 8; i++)\n+        {\n+            float u = grbuf[18 + i];\n+            float d = grbuf[17 - i];\n+            grbuf[18 + i] = u*g_aa[0][i] - d*g_aa[1][i];\n+            grbuf[17 - i] = u*g_aa[1][i] + d*g_aa[0][i];\n+        }\n+#endif /* MINIMP3_ONLY_SIMD */\n+    }\n+}\n+\n+static void L3_dct3_9(float *y)\n+{\n+    float s0, s1, s2, s3, s4, s5, s6, s7, s8, t0, t2, t4;\n+\n+    s0 = y[0]; s2 = y[2]; s4 = y[4]; s6 = y[6]; s8 = y[8];\n+    t0 = s0 + s6*0.5f;\n+    s0 -= s6;\n+    t4 = (s4 + s2)*0.93969262f;\n+    t2 = (s8 + s2)*0.76604444f;\n+    s6 = (s4 - s8)*0.17364818f;\n+    s4 += s8 - s2;\n+\n+    s2 = s0 - s4*0.5f;\n+    y[4] = s4 + s0;\n+    s8 = t0 - t2 + s6;\n+    s0 = t0 - t4 + t2;\n+    s4 = t0 + t4 - s6;\n+\n+    s1 = y[1]; s3 = y[3]; s5 = y[5]; s7 = y[7];\n+\n+    s3 *= 0.86602540f;\n+    t0 = (s5 + s1)*0.98480775f;\n+    t4 = (s5 - s7)*0.34202014f;\n+    t2 = (s1 + s7)*0.64278761f;\n+    s1 = (s1 - s5 - s7)*0.86602540f;\n+\n+    s5 = t0 - s3 - t2;\n+    s7 = t4 - s3 - t0;\n+    s3 = t4 + s3 - t2;\n+\n+    y[0] = s4 - s7;\n+    y[1] = s2 + s1;\n+    y[2] = s0 - s3;\n+    y[3] = s8 + s5;\n+    y[5] = s8 - s5;\n+    y[6] = s0 + s3;\n+    y[7] = s2 - s1;\n+    y[8] = s4 + s7;\n+}\n+\n+static void L3_imdct36(float *grbuf, float *overlap, const float *window, int nbands)\n+{\n+    int i, j;\n+    static const float g_twid9[18] = {\n+        0.73727734f,0.79335334f,0.84339145f,0.88701083f,0.92387953f,0.95371695f,0.97629601f,0.99144486f,0.99904822f,0.67559021f,0.60876143f,0.53729961f,0.46174861f,0.38268343f,0.30070580f,0.21643961f,0.13052619f,0.04361938f\n+    };\n+\n+    for (j = 0; j < nbands; j++, grbuf += 18, overlap += 9)\n+    {\n+        float co[9], si[9];\n+        co[0] = -grbuf[0];\n+        si[0] = grbuf[17];\n+        for (i = 0; i < 4; i++)\n+        {\n+            si[8 - 2*i] =   grbuf[4*i + 1] - grbuf[4*i + 2];\n+            co[1 + 2*i] =   grbuf[4*i + 1] + grbuf[4*i + 2];\n+            si[7 - 2*i] =   grbuf[4*i + 4] - grbuf[4*i + 3];\n+            co[2 + 2*i] = -(grbuf[4*i + 3] + grbuf[4*i + 4]);\n+        }\n+        L3_dct3_9(co);\n+        L3_dct3_9(si);\n+\n+        si[1] = -si[1];\n+        si[3] = -si[3];\n+        si[5] = -si[5];\n+        si[7] = -si[7];\n+\n+        i = 0;\n+\n+#if HAVE_SIMD\n+        if (have_simd()) for (; i < 8; i += 4)\n+        {\n+            f4 vovl = VLD(overlap + i);\n+            f4 vc = VLD(co + i);\n+            f4 vs = VLD(si + i);\n+            f4 vr0 = VLD(g_twid9 + i);\n+            f4 vr1 = VLD(g_twid9 + 9 + i);\n+            f4 vw0 = VLD(window + i);\n+            f4 vw1 = VLD(window + 9 + i);\n+            f4 vsum = VADD(VMUL(vc, vr1), VMUL(vs, vr0));\n+            VSTORE(overlap + i, VSUB(VMUL(vc, vr0), VMUL(vs, vr1)));\n+            VSTORE(grbuf + i, VSUB(VMUL(vovl, vw0), VMUL(vsum, vw1)));\n+            vsum = VADD(VMUL(vovl, vw1), VMUL(vsum, vw0));\n+            VSTORE(grbuf + 14 - i, VREV(vsum));\n+        }\n+#endif /* HAVE_SIMD */\n+        for (; i < 9; i++)\n+        {\n+            float ovl  = overlap[i];\n+            float sum  = co[i]*g_twid9[9 + i] + si[i]*g_twid9[0 + i];\n+            overlap[i] = co[i]*g_twid9[0 + i] - si[i]*g_twid9[9 + i];\n+            grbuf[i]      = ovl*window[0 + i] - sum*window[9 + i];\n+            grbuf[17 - i] = ovl*window[9 + i] + sum*window[0 + i];\n+        }\n+    }\n+}\n+\n+static void L3_idct3(float x0, float x1, float x2, float *dst)\n+{\n+    float m1 = x1*0.86602540f;\n+    float a1 = x0 - x2*0.5f;\n+    dst[1] = x0 + x2;\n+    dst[0] = a1 + m1;\n+    dst[2] = a1 - m1;\n+}\n+\n+static void L3_imdct12(float *x, float *dst, float *overlap)\n+{\n+    static const float g_twid3[6] = { 0.79335334f,0.92387953f,0.99144486f, 0.60876143f,0.38268343f,0.13052619f };\n+    float co[3], si[3];\n+    int i;\n+\n+    L3_idct3(-x[0], x[6] + x[3], x[12] + x[9], co);\n+    L3_idct3(x[15], x[12] - x[9], x[6] - x[3], si);\n+    si[1] = -si[1];\n+\n+    for (i = 0; i < 3; i++)\n+    {\n+        float ovl  = overlap[i];\n+        float sum  = co[i]*g_twid3[3 + i] + si[i]*g_twid3[0 + i];\n+        overlap[i] = co[i]*g_twid3[0 + i] - si[i]*g_twid3[3 + i];\n+        dst[i]     = ovl*g_twid3[2 - i] - sum*g_twid3[5 - i];\n+        dst[5 - i] = ovl*g_twid3[5 - i] + sum*g_twid3[2 - i];\n+    }\n+}\n+\n+static void L3_imdct_short(float *grbuf, float *overlap, int nbands)\n+{\n+    for (;nbands > 0; nbands--, overlap += 9, grbuf += 18)\n+    {\n+        float tmp[18];\n+        memcpy(tmp, grbuf, sizeof(tmp));\n+        memcpy(grbuf, overlap, 6*sizeof(float));\n+        L3_imdct12(tmp, grbuf + 6, overlap + 6);\n+        L3_imdct12(tmp + 1, grbuf + 12, overlap + 6);\n+        L3_imdct12(tmp + 2, overlap, overlap + 6);\n+    }\n+}\n+\n+static void L3_change_sign(float *grbuf)\n+{\n+    int b, i;\n+    for (b = 0, grbuf += 18; b < 32; b += 2, grbuf += 36)\n+        for (i = 1; i < 18; i += 2)\n+            grbuf[i] = -grbuf[i];\n+}\n+\n+static void L3_imdct_gr(float *grbuf, float *overlap, unsigned block_type, unsigned n_long_bands)\n+{\n+    static const float g_mdct_window[2][18] = {\n+        { 0.99904822f,0.99144486f,0.97629601f,0.95371695f,0.92387953f,0.88701083f,0.84339145f,0.79335334f,0.73727734f,0.04361938f,0.13052619f,0.21643961f,0.30070580f,0.38268343f,0.46174861f,0.53729961f,0.60876143f,0.67559021f },\n+        { 1,1,1,1,1,1,0.99144486f,0.92387953f,0.79335334f,0,0,0,0,0,0,0.13052619f,0.38268343f,0.60876143f }\n+    };\n+    if (n_long_bands)\n+    {\n+        L3_imdct36(grbuf, overlap, g_mdct_window[0], n_long_bands);\n+        grbuf += 18*n_long_bands;\n+        overlap += 9*n_long_bands;\n+    }\n+    if (block_type == SHORT_BLOCK_TYPE)\n+        L3_imdct_short(grbuf, overlap, 32 - n_long_bands);\n+    else\n+        L3_imdct36(grbuf, overlap, g_mdct_window[block_type == STOP_BLOCK_TYPE], 32 - n_long_bands);\n+}\n+\n+static void L3_save_reservoir(mp3dec_t *h, mp3dec_scratch_t *s)\n+{\n+    int pos = (s->bs.pos + 7)/8u;\n+    int remains = s->bs.limit/8u - pos;\n+    if (remains > MAX_BITRESERVOIR_BYTES)\n+    {\n+        pos += remains - MAX_BITRESERVOIR_BYTES;\n+        remains = MAX_BITRESERVOIR_BYTES;\n+    }\n+    if (remains > 0)\n+    {\n+        memmove(h->reserv_buf, s->maindata + pos, remains);\n+    }\n+    h->reserv = remains;\n+}\n+\n+static int L3_restore_reservoir(mp3dec_t *h, bs_t *bs, mp3dec_scratch_t *s, int main_data_begin)\n+{\n+    int frame_bytes = (bs->limit - bs->pos)/8;\n+    int bytes_have = MINIMP3_MIN(h->reserv, main_data_begin);\n+    memcpy(s->maindata, h->reserv_buf + MINIMP3_MAX(0, h->reserv - main_data_begin), MINIMP3_MIN(h->reserv, main_data_begin));\n+    memcpy(s->maindata + bytes_have, bs->buf + bs->pos/8, frame_bytes);\n+    bs_init(&s->bs, s->maindata, bytes_have + frame_bytes);\n+    return h->reserv >= main_data_begin;\n+}\n+\n+static void L3_decode(mp3dec_t *h, mp3dec_scratch_t *s, L3_gr_info_t *gr_info, int nch)\n+{\n+    int ch;\n+\n+    for (ch = 0; ch < nch; ch++)\n+    {\n+        int layer3gr_limit = s->bs.pos + gr_info[ch].part_23_length;\n+        L3_decode_scalefactors(h->header, s->ist_pos[ch], &s->bs, gr_info + ch, s->scf, ch);\n+        L3_huffman(s->grbuf[ch], &s->bs, gr_info + ch, s->scf, layer3gr_limit);\n+    }\n+\n+    if (HDR_TEST_I_STEREO(h->header))\n+    {\n+        L3_intensity_stereo(s->grbuf[0], s->ist_pos[1], gr_info, h->header);\n+    } else if (HDR_IS_MS_STEREO(h->header))\n+    {\n+        L3_midside_stereo(s->grbuf[0], 576);\n+    }\n+\n+    for (ch = 0; ch < nch; ch++, gr_info++)\n+    {\n+        int aa_bands = 31;\n+        int n_long_bands = (gr_info->mixed_block_flag ? 2 : 0) << (int)(HDR_GET_MY_SAMPLE_RATE(h->header) == 2);\n+\n+        if (gr_info->n_short_sfb)\n+        {\n+            aa_bands = n_long_bands - 1;\n+            L3_reorder(s->grbuf[ch] + n_long_bands*18, s->syn[0], gr_info->sfbtab + gr_info->n_long_sfb);\n+        }\n+\n+        L3_antialias(s->grbuf[ch], aa_bands);\n+        L3_imdct_gr(s->grbuf[ch], h->mdct_overlap[ch], gr_info->block_type, n_long_bands);\n+        L3_change_sign(s->grbuf[ch]);\n+    }\n+}\n+\n+static void mp3d_DCT_II(float *grbuf, int n)\n+{\n+    static const float g_sec[24] = {\n+        10.19000816f,0.50060302f,0.50241929f,3.40760851f,0.50547093f,0.52249861f,2.05778098f,0.51544732f,0.56694406f,1.48416460f,0.53104258f,0.64682180f,1.16943991f,0.55310392f,0.78815460f,0.97256821f,0.58293498f,1.06067765f,0.83934963f,0.62250412f,1.72244716f,0.74453628f,0.67480832f,5.10114861f\n+    };\n+    int i, k = 0;\n+#if HAVE_SIMD\n+    if (have_simd()) for (; k < n; k += 4)\n+    {\n+        f4 t[4][8], *x;\n+        float *y = grbuf + k;\n+\n+        for (x = t[0], i = 0; i < 8; i++, x++)\n+        {\n+            f4 x0 = VLD(&y[i*18]);\n+            f4 x1 = VLD(&y[(15 - i)*18]);\n+            f4 x2 = VLD(&y[(16 + i)*18]);\n+            f4 x3 = VLD(&y[(31 - i)*18]);\n+            f4 t0 = VADD(x0, x3);\n+            f4 t1 = VADD(x1, x2);\n+            f4 t2 = VMUL_S(VSUB(x1, x2), g_sec[3*i + 0]);\n+            f4 t3 = VMUL_S(VSUB(x0, x3), g_sec[3*i + 1]);\n+            x[0] = VADD(t0, t1);\n+            x[8] = VMUL_S(VSUB(t0, t1), g_sec[3*i + 2]);\n+            x[16] = VADD(t3, t2);\n+            x[24] = VMUL_S(VSUB(t3, t2), g_sec[3*i + 2]);\n+        }\n+        for (x = t[0], i = 0; i < 4; i++, x += 8)\n+        {\n+            f4 x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3], x4 = x[4], x5 = x[5], x6 = x[6], x7 = x[7], xt;\n+            xt = VSUB(x0, x7); x0 = VADD(x0, x7);\n+            x7 = VSUB(x1, x6); x1 = VADD(x1, x6);\n+            x6 = VSUB(x2, x5); x2 = VADD(x2, x5);\n+            x5 = VSUB(x3, x4); x3 = VADD(x3, x4);\n+            x4 = VSUB(x0, x3); x0 = VADD(x0, x3);\n+            x3 = VSUB(x1, x2); x1 = VADD(x1, x2);\n+            x[0] = VADD(x0, x1);\n+            x[4] = VMUL_S(VSUB(x0, x1), 0.70710677f);\n+            x5 = VADD(x5, x6);\n+            x6 = VMUL_S(VADD(x6, x7), 0.70710677f);\n+            x7 = VADD(x7, xt);\n+            x3 = VMUL_S(VADD(x3, x4), 0.70710677f);\n+            x5 = VSUB(x5, VMUL_S(x7, 0.198912367f)); /* rotate by PI/8 */\n+            x7 = VADD(x7, VMUL_S(x5, 0.382683432f));\n+            x5 = VSUB(x5, VMUL_S(x7, 0.198912367f));\n+            x0 = VSUB(xt, x6); xt = VADD(xt, x6);\n+            x[1] = VMUL_S(VADD(xt, x7), 0.50979561f);\n+            x[2] = VMUL_S(VADD(x4, x3), 0.54119611f);\n+            x[3] = VMUL_S(VSUB(x0, x5), 0.60134488f);\n+            x[5] = VMUL_S(VADD(x0, x5), 0.89997619f);\n+            x[6] = VMUL_S(VSUB(x4, x3), 1.30656302f);\n+            x[7] = VMUL_S(VSUB(xt, x7), 2.56291556f);\n+        }\n+\n+        if (k > n - 3)\n+        {\n+#if HAVE_SSE\n+#define VSAVE2(i, v) _mm_storel_pi((__m64 *)(void*)&y[i*18], v)\n+#else /* HAVE_SSE */\n+#define VSAVE2(i, v) vst1_f32((float32_t *)&y[i*18],  vget_low_f32(v))\n+#endif /* HAVE_SSE */\n+            for (i = 0; i < 7; i++, y += 4*18)\n+            {\n+                f4 s = VADD(t[3][i], t[3][i + 1]);\n+                VSAVE2(0, t[0][i]);\n+                VSAVE2(1, VADD(t[2][i], s));\n+                VSAVE2(2, VADD(t[1][i], t[1][i + 1]));\n+                VSAVE2(3, VADD(t[2][1 + i], s));\n+            }\n+            VSAVE2(0, t[0][7]);\n+            VSAVE2(1, VADD(t[2][7], t[3][7]));\n+            VSAVE2(2, t[1][7]);\n+            VSAVE2(3, t[3][7]);\n+        } else\n+        {\n+#define VSAVE4(i, v) VSTORE(&y[i*18], v)\n+            for (i = 0; i < 7; i++, y += 4*18)\n+            {\n+                f4 s = VADD(t[3][i], t[3][i + 1]);\n+                VSAVE4(0, t[0][i]);\n+                VSAVE4(1, VADD(t[2][i], s));\n+                VSAVE4(2, VADD(t[1][i], t[1][i + 1]));\n+                VSAVE4(3, VADD(t[2][1 + i], s));\n+            }\n+            VSAVE4(0, t[0][7]);\n+            VSAVE4(1, VADD(t[2][7], t[3][7]));\n+            VSAVE4(2, t[1][7]);\n+            VSAVE4(3, t[3][7]);\n+        }\n+    } else\n+#endif /* HAVE_SIMD */\n+#ifdef MINIMP3_ONLY_SIMD\n+    {} /* for HAVE_SIMD=1, MINIMP3_ONLY_SIMD=1 case we do not need non-intrinsic \"else\" branch */\n+#else /* MINIMP3_ONLY_SIMD */\n+    for (; k < n; k++)\n+    {\n+        float t[4][8], *x, *y = grbuf + k;\n+\n+        for (x = t[0], i = 0; i < 8; i++, x++)\n+        {\n+            float x0 = y[i*18];\n+            float x1 = y[(15 - i)*18];\n+            float x2 = y[(16 + i)*18];\n+            float x3 = y[(31 - i)*18];\n+            float t0 = x0 + x3;\n+            float t1 = x1 + x2;\n+            float t2 = (x1 - x2)*g_sec[3*i + 0];\n+            float t3 = (x0 - x3)*g_sec[3*i + 1];\n+            x[0] = t0 + t1;\n+            x[8] = (t0 - t1)*g_sec[3*i + 2];\n+            x[16] = t3 + t2;\n+            x[24] = (t3 - t2)*g_sec[3*i + 2];\n+        }\n+        for (x = t[0], i = 0; i < 4; i++, x += 8)\n+        {\n+            float x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3], x4 = x[4], x5 = x[5], x6 = x[6], x7 = x[7], xt;\n+            xt = x0 - x7; x0 += x7;\n+            x7 = x1 - x6; x1 += x6;\n+            x6 = x2 - x5; x2 += x5;\n+            x5 = x3 - x4; x3 += x4;\n+            x4 = x0 - x3; x0 += x3;\n+            x3 = x1 - x2; x1 += x2;\n+            x[0] = x0 + x1;\n+            x[4] = (x0 - x1)*0.70710677f;\n+            x5 =  x5 + x6;\n+            x6 = (x6 + x7)*0.70710677f;\n+            x7 =  x7 + xt;\n+            x3 = (x3 + x4)*0.70710677f;\n+            x5 -= x7*0.198912367f;  /* rotate by PI/8 */\n+            x7 += x5*0.382683432f;\n+            x5 -= x7*0.198912367f;\n+            x0 = xt - x6; xt += x6;\n+            x[1] = (xt + x7)*0.50979561f;\n+            x[2] = (x4 + x3)*0.54119611f;\n+            x[3] = (x0 - x5)*0.60134488f;\n+            x[5] = (x0 + x5)*0.89997619f;\n+            x[6] = (x4 - x3)*1.30656302f;\n+            x[7] = (xt - x7)*2.56291556f;\n+\n+        }\n+        for (i = 0; i < 7; i++, y += 4*18)\n+        {\n+            y[0*18] = t[0][i];\n+            y[1*18] = t[2][i] + t[3][i] + t[3][i + 1];\n+            y[2*18] = t[1][i] + t[1][i + 1];\n+            y[3*18] = t[2][i + 1] + t[3][i] + t[3][i + 1];\n+        }\n+        y[0*18] = t[0][7];\n+        y[1*18] = t[2][7] + t[3][7];\n+        y[2*18] = t[1][7];\n+        y[3*18] = t[3][7];\n+    }\n+#endif /* MINIMP3_ONLY_SIMD */\n+}\n+\n+#ifndef MINIMP3_FLOAT_OUTPUT\n+static int16_t mp3d_scale_pcm(float sample)\n+{\n+#if HAVE_ARMV6\n+    int32_t s32 = (int32_t)(sample + .5f);\n+    s32 -= (s32 < 0);\n+    int16_t s = (int16_t)minimp3_clip_int16_arm(s32);\n+#else\n+    if (sample >=  32766.5) return (int16_t) 32767;\n+    if (sample <= -32767.5) return (int16_t)-32768;\n+    int16_t s = (int16_t)(sample + .5f);\n+    s -= (s < 0);   /* away from zero, to be compliant */\n+#endif\n+    return s;\n+}\n+#else /* MINIMP3_FLOAT_OUTPUT */\n+static float mp3d_scale_pcm(float sample)\n+{\n+    return sample*(1.f/32768.f);\n+}\n+#endif /* MINIMP3_FLOAT_OUTPUT */\n+\n+static void mp3d_synth_pair(mp3d_sample_t *pcm, int nch, const float *z)\n+{\n+    float a;\n+    a  = (z[14*64] - z[    0]) * 29;\n+    a += (z[ 1*64] + z[13*64]) * 213;\n+    a += (z[12*64] - z[ 2*64]) * 459;\n+    a += (z[ 3*64] + z[11*64]) * 2037;\n+    a += (z[10*64] - z[ 4*64]) * 5153;\n+    a += (z[ 5*64] + z[ 9*64]) * 6574;\n+    a += (z[ 8*64] - z[ 6*64]) * 37489;\n+    a +=  z[ 7*64]             * 75038;\n+    pcm[0] = mp3d_scale_pcm(a);\n+\n+    z += 2;\n+    a  = z[14*64] * 104;\n+    a += z[12*64] * 1567;\n+    a += z[10*64] * 9727;\n+    a += z[ 8*64] * 64019;\n+    a += z[ 6*64] * -9975;\n+    a += z[ 4*64] * -45;\n+    a += z[ 2*64] * 146;\n+    a += z[ 0*64] * -5;\n+    pcm[16*nch] = mp3d_scale_pcm(a);\n+}\n+\n+static void mp3d_synth(float *xl, mp3d_sample_t *dstl, int nch, float *lins)\n+{\n+    int i;\n+    float *xr = xl + 576*(nch - 1);\n+    mp3d_sample_t *dstr = dstl + (nch - 1);\n+\n+    static const float g_win[] = {\n+        -1,26,-31,208,218,401,-519,2063,2000,4788,-5517,7134,5959,35640,-39336,74992,\n+        -1,24,-35,202,222,347,-581,2080,1952,4425,-5879,7640,5288,33791,-41176,74856,\n+        -1,21,-38,196,225,294,-645,2087,1893,4063,-6237,8092,4561,31947,-43006,74630,\n+        -1,19,-41,190,227,244,-711,2085,1822,3705,-6589,8492,3776,30112,-44821,74313,\n+        -1,17,-45,183,228,197,-779,2075,1739,3351,-6935,8840,2935,28289,-46617,73908,\n+        -1,16,-49,176,228,153,-848,2057,1644,3004,-7271,9139,2037,26482,-48390,73415,\n+        -2,14,-53,169,227,111,-919,2032,1535,2663,-7597,9389,1082,24694,-50137,72835,\n+        -2,13,-58,161,224,72,-991,2001,1414,2330,-7910,9592,70,22929,-51853,72169,\n+        -2,11,-63,154,221,36,-1064,1962,1280,2006,-8209,9750,-998,21189,-53534,71420,\n+        -2,10,-68,147,215,2,-1137,1919,1131,1692,-8491,9863,-2122,19478,-55178,70590,\n+        -3,9,-73,139,208,-29,-1210,1870,970,1388,-8755,9935,-3300,17799,-56778,69679,\n+        -3,8,-79,132,200,-57,-1283,1817,794,1095,-8998,9966,-4533,16155,-58333,68692,\n+        -4,7,-85,125,189,-83,-1356,1759,605,814,-9219,9959,-5818,14548,-59838,67629,\n+        -4,7,-91,117,177,-106,-1428,1698,402,545,-9416,9916,-7154,12980,-61289,66494,\n+        -5,6,-97,111,163,-127,-1498,1634,185,288,-9585,9838,-8540,11455,-62684,65290\n+    };\n+    float *zlin = lins + 15*64;\n+    const float *w = g_win;\n+\n+    zlin[4*15]     = xl[18*16];\n+    zlin[4*15 + 1] = xr[18*16];\n+    zlin[4*15 + 2] = xl[0];\n+    zlin[4*15 + 3] = xr[0];\n+\n+    zlin[4*31]     = xl[1 + 18*16];\n+    zlin[4*31 + 1] = xr[1 + 18*16];\n+    zlin[4*31 + 2] = xl[1];\n+    zlin[4*31 + 3] = xr[1];\n+\n+    mp3d_synth_pair(dstr, nch, lins + 4*15 + 1);\n+    mp3d_synth_pair(dstr + 32*nch, nch, lins + 4*15 + 64 + 1);\n+    mp3d_synth_pair(dstl, nch, lins + 4*15);\n+    mp3d_synth_pair(dstl + 32*nch, nch, lins + 4*15 + 64);\n+\n+#if HAVE_SIMD\n+    if (have_simd()) for (i = 14; i >= 0; i--)\n+    {\n+#define VLOAD(k) f4 w0 = VSET(*w++); f4 w1 = VSET(*w++); f4 vz = VLD(&zlin[4*i - 64*k]); f4 vy = VLD(&zlin[4*i - 64*(15 - k)]);\n+#define V0(k) { VLOAD(k) b =         VADD(VMUL(vz, w1), VMUL(vy, w0)) ; a =         VSUB(VMUL(vz, w0), VMUL(vy, w1));  }\n+#define V1(k) { VLOAD(k) b = VADD(b, VADD(VMUL(vz, w1), VMUL(vy, w0))); a = VADD(a, VSUB(VMUL(vz, w0), VMUL(vy, w1))); }\n+#define V2(k) { VLOAD(k) b = VADD(b, VADD(VMUL(vz, w1), VMUL(vy, w0))); a = VADD(a, VSUB(VMUL(vy, w1), VMUL(vz, w0))); }\n+        f4 a, b;\n+        zlin[4*i]     = xl[18*(31 - i)];\n+        zlin[4*i + 1] = xr[18*(31 - i)];\n+        zlin[4*i + 2] = xl[1 + 18*(31 - i)];\n+        zlin[4*i + 3] = xr[1 + 18*(31 - i)];\n+        zlin[4*i + 64] = xl[1 + 18*(1 + i)];\n+        zlin[4*i + 64 + 1] = xr[1 + 18*(1 + i)];\n+        zlin[4*i - 64 + 2] = xl[18*(1 + i)];\n+        zlin[4*i - 64 + 3] = xr[18*(1 + i)];\n+\n+        V0(0) V2(1) V1(2) V2(3) V1(4) V2(5) V1(6) V2(7)\n+\n+        {\n+#ifndef MINIMP3_FLOAT_OUTPUT\n+#if HAVE_SSE\n+            static const f4 g_max = { 32767.0f, 32767.0f, 32767.0f, 32767.0f };\n+            static const f4 g_min = { -32768.0f, -32768.0f, -32768.0f, -32768.0f };\n+            __m128i pcm8 = _mm_packs_epi32(_mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(a, g_max), g_min)),\n+                                           _mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(b, g_max), g_min)));\n+            dstr[(15 - i)*nch] = _mm_extract_epi16(pcm8, 1);\n+            dstr[(17 + i)*nch] = _mm_extract_epi16(pcm8, 5);\n+            dstl[(15 - i)*nch] = _mm_extract_epi16(pcm8, 0);\n+            dstl[(17 + i)*nch] = _mm_extract_epi16(pcm8, 4);\n+            dstr[(47 - i)*nch] = _mm_extract_epi16(pcm8, 3);\n+            dstr[(49 + i)*nch] = _mm_extract_epi16(pcm8, 7);\n+            dstl[(47 - i)*nch] = _mm_extract_epi16(pcm8, 2);\n+            dstl[(49 + i)*nch] = _mm_extract_epi16(pcm8, 6);\n+#else /* HAVE_SSE */\n+            int16x4_t pcma, pcmb;\n+            a = VADD(a, VSET(0.5f));\n+            b = VADD(b, VSET(0.5f));\n+            pcma = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(a), vreinterpretq_s32_u32(vcltq_f32(a, VSET(0)))));\n+            pcmb = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(b), vreinterpretq_s32_u32(vcltq_f32(b, VSET(0)))));\n+            vst1_lane_s16(dstr + (15 - i)*nch, pcma, 1);\n+            vst1_lane_s16(dstr + (17 + i)*nch, pcmb, 1);\n+            vst1_lane_s16(dstl + (15 - i)*nch, pcma, 0);\n+            vst1_lane_s16(dstl + (17 + i)*nch, pcmb, 0);\n+            vst1_lane_s16(dstr + (47 - i)*nch, pcma, 3);\n+            vst1_lane_s16(dstr + (49 + i)*nch, pcmb, 3);\n+            vst1_lane_s16(dstl + (47 - i)*nch, pcma, 2);\n+            vst1_lane_s16(dstl + (49 + i)*nch, pcmb, 2);\n+#endif /* HAVE_SSE */\n+\n+#else /* MINIMP3_FLOAT_OUTPUT */\n+\n+            static const f4 g_scale = { 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f };\n+            a = VMUL(a, g_scale);\n+            b = VMUL(b, g_scale);\n+#if HAVE_SSE\n+            _mm_store_ss(dstr + (15 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(1, 1, 1, 1)));\n+            _mm_store_ss(dstr + (17 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(1, 1, 1, 1)));\n+            _mm_store_ss(dstl + (15 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(0, 0, 0, 0)));\n+            _mm_store_ss(dstl + (17 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(0, 0, 0, 0)));\n+            _mm_store_ss(dstr + (47 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(3, 3, 3, 3)));\n+            _mm_store_ss(dstr + (49 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(3, 3, 3, 3)));\n+            _mm_store_ss(dstl + (47 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(2, 2, 2, 2)));\n+            _mm_store_ss(dstl + (49 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(2, 2, 2, 2)));\n+#else /* HAVE_SSE */\n+            vst1q_lane_f32(dstr + (15 - i)*nch, a, 1);\n+            vst1q_lane_f32(dstr + (17 + i)*nch, b, 1);\n+            vst1q_lane_f32(dstl + (15 - i)*nch, a, 0);\n+            vst1q_lane_f32(dstl + (17 + i)*nch, b, 0);\n+            vst1q_lane_f32(dstr + (47 - i)*nch, a, 3);\n+            vst1q_lane_f32(dstr + (49 + i)*nch, b, 3);\n+            vst1q_lane_f32(dstl + (47 - i)*nch, a, 2);\n+            vst1q_lane_f32(dstl + (49 + i)*nch, b, 2);\n+#endif /* HAVE_SSE */\n+#endif /* MINIMP3_FLOAT_OUTPUT */\n+        }\n+    } else\n+#endif /* HAVE_SIMD */\n+#ifdef MINIMP3_ONLY_SIMD\n+    {} /* for HAVE_SIMD=1, MINIMP3_ONLY_SIMD=1 case we do not need non-intrinsic \"else\" branch */\n+#else /* MINIMP3_ONLY_SIMD */\n+    for (i = 14; i >= 0; i--)\n+    {\n+#define LOAD(k) float w0 = *w++; float w1 = *w++; float *vz = &zlin[4*i - k*64]; float *vy = &zlin[4*i - (15 - k)*64];\n+#define S0(k) { int j; LOAD(k); for (j = 0; j < 4; j++) b[j]  = vz[j]*w1 + vy[j]*w0, a[j]  = vz[j]*w0 - vy[j]*w1; }\n+#define S1(k) { int j; LOAD(k); for (j = 0; j < 4; j++) b[j] += vz[j]*w1 + vy[j]*w0, a[j] += vz[j]*w0 - vy[j]*w1; }\n+#define S2(k) { int j; LOAD(k); for (j = 0; j < 4; j++) b[j] += vz[j]*w1 + vy[j]*w0, a[j] += vy[j]*w1 - vz[j]*w0; }\n+        float a[4], b[4];\n+\n+        zlin[4*i]     = xl[18*(31 - i)];\n+        zlin[4*i + 1] = xr[18*(31 - i)];\n+        zlin[4*i + 2] = xl[1 + 18*(31 - i)];\n+        zlin[4*i + 3] = xr[1 + 18*(31 - i)];\n+        zlin[4*(i + 16)]   = xl[1 + 18*(1 + i)];\n+        zlin[4*(i + 16) + 1] = xr[1 + 18*(1 + i)];\n+        zlin[4*(i - 16) + 2] = xl[18*(1 + i)];\n+        zlin[4*(i - 16) + 3] = xr[18*(1 + i)];\n+\n+        S0(0) S2(1) S1(2) S2(3) S1(4) S2(5) S1(6) S2(7)\n+\n+        dstr[(15 - i)*nch] = mp3d_scale_pcm(a[1]);\n+        dstr[(17 + i)*nch] = mp3d_scale_pcm(b[1]);\n+        dstl[(15 - i)*nch] = mp3d_scale_pcm(a[0]);\n+        dstl[(17 + i)*nch] = mp3d_scale_pcm(b[0]);\n+        dstr[(47 - i)*nch] = mp3d_scale_pcm(a[3]);\n+        dstr[(49 + i)*nch] = mp3d_scale_pcm(b[3]);\n+        dstl[(47 - i)*nch] = mp3d_scale_pcm(a[2]);\n+        dstl[(49 + i)*nch] = mp3d_scale_pcm(b[2]);\n+    }\n+#endif /* MINIMP3_ONLY_SIMD */\n+}\n+\n+static void mp3d_synth_granule(float *qmf_state, float *grbuf, int nbands, int nch, mp3d_sample_t *pcm, float *lins)\n+{\n+    int i;\n+    for (i = 0; i < nch; i++)\n+    {\n+        mp3d_DCT_II(grbuf + 576*i, nbands);\n+    }\n+\n+    memcpy(lins, qmf_state, sizeof(float)*15*64);\n+\n+    for (i = 0; i < nbands; i += 2)\n+    {\n+        mp3d_synth(grbuf + i, pcm + 32*nch*i, nch, lins + i*64);\n+    }\n+#ifndef MINIMP3_NONSTANDARD_BUT_LOGICAL\n+    if (nch == 1)\n+    {\n+        for (i = 0; i < 15*64; i += 2)\n+        {\n+            qmf_state[i] = lins[nbands*64 + i];\n+        }\n+    } else\n+#endif /* MINIMP3_NONSTANDARD_BUT_LOGICAL */\n+    {\n+        memcpy(qmf_state, lins + nbands*64, sizeof(float)*15*64);\n+    }\n+}\n+\n+static int mp3d_match_frame(const uint8_t *hdr, int mp3_bytes, int frame_bytes)\n+{\n+    int i, nmatch;\n+    for (i = 0, nmatch = 0; nmatch < MAX_FRAME_SYNC_MATCHES; nmatch++)\n+    {\n+        i += hdr_frame_bytes(hdr + i, frame_bytes) + hdr_padding(hdr + i);\n+        if (i + HDR_SIZE > mp3_bytes)\n+            return nmatch > 0;\n+        if (!hdr_compare(hdr, hdr + i))\n+            return 0;\n+    }\n+    return 1;\n+}\n+\n+static int mp3d_find_frame(const uint8_t *mp3, int mp3_bytes, int *free_format_bytes, int *ptr_frame_bytes)\n+{\n+    int i, k;\n+    for (i = 0; i < mp3_bytes - HDR_SIZE; i++, mp3++)\n+    {\n+        if (hdr_valid(mp3))\n+        {\n+            int frame_bytes = hdr_frame_bytes(mp3, *free_format_bytes);\n+            int frame_and_padding = frame_bytes + hdr_padding(mp3);\n+\n+            for (k = HDR_SIZE; !frame_bytes && k < MAX_FREE_FORMAT_FRAME_SIZE && i + 2*k < mp3_bytes - HDR_SIZE; k++)\n+            {\n+                if (hdr_compare(mp3, mp3 + k))\n+                {\n+                    int fb = k - hdr_padding(mp3);\n+                    int nextfb = fb + hdr_padding(mp3 + k);\n+                    if (i + k + nextfb + HDR_SIZE > mp3_bytes || !hdr_compare(mp3, mp3 + k + nextfb))\n+                        continue;\n+                    frame_and_padding = k;\n+                    frame_bytes = fb;\n+                    *free_format_bytes = fb;\n+                }\n+            }\n+            if ((frame_bytes && i + frame_and_padding <= mp3_bytes &&\n+                mp3d_match_frame(mp3, mp3_bytes - i, frame_bytes)) ||\n+                (!i && frame_and_padding == mp3_bytes))\n+            {\n+                *ptr_frame_bytes = frame_and_padding;\n+                return i;\n+            }\n+            *free_format_bytes = 0;\n+        }\n+    }\n+    *ptr_frame_bytes = 0;\n+    return mp3_bytes;\n+}\n+\n+void mp3dec_init(mp3dec_t *dec)\n+{\n+    dec->header[0] = 0;\n+}\n+\n+int mp3dec_decode_frame(mp3dec_t *dec, const uint8_t *mp3, int mp3_bytes, mp3d_sample_t *pcm, mp3dec_frame_info_t *info)\n+{\n+    int i = 0, igr, frame_size = 0, success = 1;\n+    const uint8_t *hdr;\n+    bs_t bs_frame[1];\n+    mp3dec_scratch_t scratch;\n+\n+    if (mp3_bytes > 4 && dec->header[0] == 0xff && hdr_compare(dec->header, mp3))\n+    {\n+        frame_size = hdr_frame_bytes(mp3, dec->free_format_bytes) + hdr_padding(mp3);\n+        if (frame_size != mp3_bytes && (frame_size + HDR_SIZE > mp3_bytes || !hdr_compare(mp3, mp3 + frame_size)))\n+        {\n+            frame_size = 0;\n+        }\n+    }\n+    if (!frame_size)\n+    {\n+        memset(dec, 0, sizeof(mp3dec_t));\n+        i = mp3d_find_frame(mp3, mp3_bytes, &dec->free_format_bytes, &frame_size);\n+        if (!frame_size || i + frame_size > mp3_bytes)\n+        {\n+            info->frame_bytes = i;\n+            return 0;\n+        }\n+    }\n+\n+    hdr = mp3 + i;\n+    memcpy(dec->header, hdr, HDR_SIZE);\n+    info->frame_bytes = i + frame_size;\n+    info->frame_offset = i;\n+    info->channels = HDR_IS_MONO(hdr) ? 1 : 2;\n+    info->hz = hdr_sample_rate_hz(hdr);\n+    info->layer = 4 - HDR_GET_LAYER(hdr);\n+    info->bitrate_kbps = hdr_bitrate_kbps(hdr);\n+\n+    if (!pcm)\n+    {\n+        return hdr_frame_samples(hdr);\n+    }\n+\n+    bs_init(bs_frame, hdr + HDR_SIZE, frame_size - HDR_SIZE);\n+    if (HDR_IS_CRC(hdr))\n+    {\n+        get_bits(bs_frame, 16);\n+    }\n+\n+    if (info->layer == 3)\n+    {\n+        int main_data_begin = L3_read_side_info(bs_frame, scratch.gr_info, hdr);\n+        if (main_data_begin < 0 || bs_frame->pos > bs_frame->limit)\n+        {\n+            mp3dec_init(dec);\n+            return 0;\n+        }\n+        success = L3_restore_reservoir(dec, bs_frame, &scratch, main_data_begin);\n+        if (success)\n+        {\n+            for (igr = 0; igr < (HDR_TEST_MPEG1(hdr) ? 2 : 1); igr++, pcm += 576*info->channels)\n+            {\n+                memset(scratch.grbuf[0], 0, 576*2*sizeof(float));\n+                L3_decode(dec, &scratch, scratch.gr_info + igr*info->channels, info->channels);\n+                mp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 18, info->channels, pcm, scratch.syn[0]);\n+            }\n+        }\n+        L3_save_reservoir(dec, &scratch);\n+    } else\n+    {\n+#ifdef MINIMP3_ONLY_MP3\n+        return 0;\n+#else /* MINIMP3_ONLY_MP3 */\n+        L12_scale_info sci[1];\n+        L12_read_scale_info(hdr, bs_frame, sci);\n+\n+        memset(scratch.grbuf[0], 0, 576*2*sizeof(float));\n+        for (i = 0, igr = 0; igr < 3; igr++)\n+        {\n+            if (12 == (i += L12_dequantize_granule(scratch.grbuf[0] + i, bs_frame, sci, info->layer | 1)))\n+            {\n+                i = 0;\n+                L12_apply_scf_384(sci, sci->scf + igr, scratch.grbuf[0]);\n+                mp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 12, info->channels, pcm, scratch.syn[0]);\n+                memset(scratch.grbuf[0], 0, 576*2*sizeof(float));\n+                pcm += 384*info->channels;\n+            }\n+            if (bs_frame->pos > bs_frame->limit)\n+            {\n+                mp3dec_init(dec);\n+                return 0;\n+            }\n+        }\n+#endif /* MINIMP3_ONLY_MP3 */\n+    }\n+    return success*hdr_frame_samples(dec->header);\n+}\n+\n+#ifdef MINIMP3_FLOAT_OUTPUT\n+void mp3dec_f32_to_s16(const float *in, int16_t *out, int num_samples)\n+{\n+    int i = 0;\n+#if HAVE_SIMD\n+    int aligned_count = num_samples & ~7;\n+    for(; i < aligned_count; i += 8)\n+    {\n+        static const f4 g_scale = { 32768.0f, 32768.0f, 32768.0f, 32768.0f };\n+        f4 a = VMUL(VLD(&in[i  ]), g_scale);\n+        f4 b = VMUL(VLD(&in[i+4]), g_scale);\n+#if HAVE_SSE\n+        static const f4 g_max = { 32767.0f, 32767.0f, 32767.0f, 32767.0f };\n+        static const f4 g_min = { -32768.0f, -32768.0f, -32768.0f, -32768.0f };\n+        __m128i pcm8 = _mm_packs_epi32(_mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(a, g_max), g_min)),\n+                                       _mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(b, g_max), g_min)));\n+        out[i  ] = _mm_extract_epi16(pcm8, 0);\n+        out[i+1] = _mm_extract_epi16(pcm8, 1);\n+        out[i+2] = _mm_extract_epi16(pcm8, 2);\n+        out[i+3] = _mm_extract_epi16(pcm8, 3);\n+        out[i+4] = _mm_extract_epi16(pcm8, 4);\n+        out[i+5] = _mm_extract_epi16(pcm8, 5);\n+        out[i+6] = _mm_extract_epi16(pcm8, 6);\n+        out[i+7] = _mm_extract_epi16(pcm8, 7);\n+#else /* HAVE_SSE */\n+        int16x4_t pcma, pcmb;\n+        a = VADD(a, VSET(0.5f));\n+        b = VADD(b, VSET(0.5f));\n+        pcma = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(a), vreinterpretq_s32_u32(vcltq_f32(a, VSET(0)))));\n+        pcmb = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(b), vreinterpretq_s32_u32(vcltq_f32(b, VSET(0)))));\n+        vst1_lane_s16(out+i  , pcma, 0);\n+        vst1_lane_s16(out+i+1, pcma, 1);\n+        vst1_lane_s16(out+i+2, pcma, 2);\n+        vst1_lane_s16(out+i+3, pcma, 3);\n+        vst1_lane_s16(out+i+4, pcmb, 0);\n+        vst1_lane_s16(out+i+5, pcmb, 1);\n+        vst1_lane_s16(out+i+6, pcmb, 2);\n+        vst1_lane_s16(out+i+7, pcmb, 3);\n+#endif /* HAVE_SSE */\n+    }\n+#endif /* HAVE_SIMD */\n+    for(; i < num_samples; i++)\n+    {\n+        float sample = in[i] * 32768.0f;\n+        if (sample >=  32766.5)\n+            out[i] = (int16_t) 32767;\n+        else if (sample <= -32767.5)\n+            out[i] = (int16_t)-32768;\n+        else\n+        {\n+            int16_t s = (int16_t)(sample + .5f);\n+            s -= (s < 0);   /* away from zero, to be compliant */\n+            out[i] = s;\n+        }\n+    }\n+}\n+#endif /* MINIMP3_FLOAT_OUTPUT */\n+#endif /* MINIMP3_IMPLEMENTATION && !_MINIMP3_IMPLEMENTATION_GUARD */\ndiff --git a/core/cart_hw/minimp3_ex.h b/core/cart_hw/minimp3_ex.h\nnew file mode 100644\nindex 000000000..2871705df\n--- /dev/null\n+++ b/core/cart_hw/minimp3_ex.h\n@@ -0,0 +1,1397 @@\n+#ifndef MINIMP3_EXT_H\n+#define MINIMP3_EXT_H\n+/*\n+    https://github.com/lieff/minimp3\n+    To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide.\n+    This software is distributed without any warranty.\n+    See <http://creativecommons.org/publicdomain/zero/1.0/>.\n+*/\n+#include <stddef.h>\n+#include \"minimp3.h\"\n+\n+/* flags for mp3dec_ex_open_* functions */\n+#define MP3D_SEEK_TO_BYTE   0      /* mp3dec_ex_seek seeks to byte in stream */\n+#define MP3D_SEEK_TO_SAMPLE 1      /* mp3dec_ex_seek precisely seeks to sample using index (created during duration calculation scan or when mp3dec_ex_seek called) */\n+#define MP3D_DO_NOT_SCAN    2      /* do not scan whole stream for duration if vbrtag not found, mp3dec_ex_t::samples will be filled only if mp3dec_ex_t::vbr_tag_found == 1 */\n+#ifdef MINIMP3_ALLOW_MONO_STEREO_TRANSITION\n+#define MP3D_ALLOW_MONO_STEREO_TRANSITION  4\n+#define MP3D_FLAGS_MASK 7\n+#else\n+#define MP3D_FLAGS_MASK 3\n+#endif\n+\n+/* compile-time config */\n+#define MINIMP3_PREDECODE_FRAMES 2 /* frames to pre-decode and skip after seek (to fill internal structures) */\n+/*#define MINIMP3_SEEK_IDX_LINEAR_SEARCH*/ /* define to use linear index search instead of binary search on seek */\n+#define MINIMP3_IO_SIZE (128*1024) /* io buffer size for streaming functions, must be greater than MINIMP3_BUF_SIZE */\n+#define MINIMP3_BUF_SIZE (16*1024) /* buffer which can hold minimum 10 consecutive mp3 frames (~16KB) worst case */\n+/*#define MINIMP3_SCAN_LIMIT (256*1024)*/ /* how many bytes will be scanned to search first valid mp3 frame, to prevent stall on large non-mp3 files */\n+#define MINIMP3_ENABLE_RING 0      /* WIP enable hardware magic ring buffer if available, to make less input buffer memmove(s) in callback IO mode */\n+\n+/* return error codes */\n+#define MP3D_E_PARAM   -1\n+#define MP3D_E_MEMORY  -2\n+#define MP3D_E_IOERROR -3\n+#define MP3D_E_USER    -4  /* can be used to stop processing from callbacks without indicating specific error */\n+#define MP3D_E_DECODE  -5  /* decode error which can't be safely skipped, such as sample rate, layer and channels change */\n+\n+typedef struct\n+{\n+    mp3d_sample_t *buffer;\n+    size_t samples; /* channels included, byte size = samples*sizeof(mp3d_sample_t) */\n+    int channels, hz, layer, avg_bitrate_kbps;\n+} mp3dec_file_info_t;\n+\n+typedef struct\n+{\n+    const uint8_t *buffer;\n+    size_t size;\n+} mp3dec_map_info_t;\n+\n+typedef struct\n+{\n+    uint64_t sample;\n+    uint64_t offset;\n+} mp3dec_frame_t;\n+\n+typedef struct\n+{\n+    mp3dec_frame_t *frames;\n+    size_t num_frames, capacity;\n+} mp3dec_index_t;\n+\n+typedef size_t (*MP3D_READ_CB)(void *buf, size_t size, void *user_data);\n+typedef int (*MP3D_SEEK_CB)(uint64_t position, void *user_data);\n+\n+typedef struct\n+{\n+    MP3D_READ_CB read;\n+    void *read_data;\n+    MP3D_SEEK_CB seek;\n+    void *seek_data;\n+} mp3dec_io_t;\n+\n+typedef struct\n+{\n+    mp3dec_t mp3d;\n+    mp3dec_map_info_t file;\n+    mp3dec_io_t *io;\n+    mp3dec_index_t index;\n+    uint64_t offset, samples, detected_samples, cur_sample, start_offset, end_offset;\n+    mp3dec_frame_info_t info;\n+    mp3d_sample_t buffer[MINIMP3_MAX_SAMPLES_PER_FRAME];\n+    size_t input_consumed, input_filled;\n+    int is_file, flags, vbr_tag_found, indexes_built;\n+    int free_format_bytes;\n+    int buffer_samples, buffer_consumed, to_skip, start_delay;\n+    int last_error;\n+} mp3dec_ex_t;\n+\n+typedef int (*MP3D_ITERATE_CB)(void *user_data, const uint8_t *frame, int frame_size, int free_format_bytes, size_t buf_size, uint64_t offset, mp3dec_frame_info_t *info);\n+typedef int (*MP3D_PROGRESS_CB)(void *user_data, size_t file_size, uint64_t offset, mp3dec_frame_info_t *info);\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/* detect mp3/mpa format */\n+int mp3dec_detect_buf(const uint8_t *buf, size_t buf_size);\n+int mp3dec_detect_cb(mp3dec_io_t *io, uint8_t *buf, size_t buf_size);\n+/* decode whole buffer block */\n+int mp3dec_load_buf(mp3dec_t *dec, const uint8_t *buf, size_t buf_size, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data);\n+int mp3dec_load_cb(mp3dec_t *dec, mp3dec_io_t *io, uint8_t *buf, size_t buf_size, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data);\n+/* iterate through frames */\n+int mp3dec_iterate_buf(const uint8_t *buf, size_t buf_size, MP3D_ITERATE_CB callback, void *user_data);\n+int mp3dec_iterate_cb(mp3dec_io_t *io, uint8_t *buf, size_t buf_size, MP3D_ITERATE_CB callback, void *user_data);\n+/* streaming decoder with seeking capability */\n+int mp3dec_ex_open_buf(mp3dec_ex_t *dec, const uint8_t *buf, size_t buf_size, int flags);\n+int mp3dec_ex_open_cb(mp3dec_ex_t *dec, mp3dec_io_t *io, int flags);\n+void mp3dec_ex_close(mp3dec_ex_t *dec);\n+int mp3dec_ex_seek(mp3dec_ex_t *dec, uint64_t position);\n+size_t mp3dec_ex_read_frame(mp3dec_ex_t *dec, mp3d_sample_t **buf, mp3dec_frame_info_t *frame_info, size_t max_samples);\n+size_t mp3dec_ex_read(mp3dec_ex_t *dec, mp3d_sample_t *buf, size_t samples);\n+#ifndef MINIMP3_NO_STDIO\n+/* stdio versions of file detect, load, iterate and stream */\n+int mp3dec_detect(const char *file_name);\n+int mp3dec_load(mp3dec_t *dec, const char *file_name, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data);\n+int mp3dec_iterate(const char *file_name, MP3D_ITERATE_CB callback, void *user_data);\n+int mp3dec_ex_open(mp3dec_ex_t *dec, const char *file_name, int flags);\n+#ifdef _WIN32\n+int mp3dec_detect_w(const wchar_t *file_name);\n+int mp3dec_load_w(mp3dec_t *dec, const wchar_t *file_name, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data);\n+int mp3dec_iterate_w(const wchar_t *file_name, MP3D_ITERATE_CB callback, void *user_data);\n+int mp3dec_ex_open_w(mp3dec_ex_t *dec, const wchar_t *file_name, int flags);\n+#endif\n+#endif\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+#endif /*MINIMP3_EXT_H*/\n+\n+#if defined(MINIMP3_IMPLEMENTATION) && !defined(_MINIMP3_EX_IMPLEMENTATION_GUARD)\n+#define _MINIMP3_EX_IMPLEMENTATION_GUARD\n+#include <limits.h>\n+#include \"minimp3.h\"\n+\n+static void mp3dec_skip_id3v1(const uint8_t *buf, size_t *pbuf_size)\n+{\n+    size_t buf_size = *pbuf_size;\n+#ifndef MINIMP3_NOSKIP_ID3V1\n+    if (buf_size >= 128 && !memcmp(buf + buf_size - 128, \"TAG\", 3))\n+    {\n+        buf_size -= 128;\n+        if (buf_size >= 227 && !memcmp(buf + buf_size - 227, \"TAG+\", 4))\n+            buf_size -= 227;\n+    }\n+#endif\n+#ifndef MINIMP3_NOSKIP_APEV2\n+    if (buf_size > 32 && !memcmp(buf + buf_size - 32, \"APETAGEX\", 8))\n+    {\n+        buf_size -= 32;\n+        const uint8_t *tag = buf + buf_size + 8 + 4;\n+        uint32_t tag_size = (uint32_t)(tag[3] << 24) | (tag[2] << 16) | (tag[1] << 8) | tag[0];\n+        if (buf_size >= tag_size)\n+            buf_size -= tag_size;\n+    }\n+#endif\n+    *pbuf_size = buf_size;\n+}\n+\n+static size_t mp3dec_skip_id3v2(const uint8_t *buf, size_t buf_size)\n+{\n+#define MINIMP3_ID3_DETECT_SIZE 10\n+#ifndef MINIMP3_NOSKIP_ID3V2\n+    if (buf_size >= MINIMP3_ID3_DETECT_SIZE && !memcmp(buf, \"ID3\", 3) && !((buf[5] & 15) || (buf[6] & 0x80) || (buf[7] & 0x80) || (buf[8] & 0x80) || (buf[9] & 0x80)))\n+    {\n+        size_t id3v2size = (((buf[6] & 0x7f) << 21) | ((buf[7] & 0x7f) << 14) | ((buf[8] & 0x7f) << 7) | (buf[9] & 0x7f)) + 10;\n+        if ((buf[5] & 16))\n+            id3v2size += 10; /* footer */\n+        return id3v2size;\n+    }\n+#endif\n+    return 0;\n+}\n+\n+static void mp3dec_skip_id3(const uint8_t **pbuf, size_t *pbuf_size)\n+{\n+    uint8_t *buf = (uint8_t *)(*pbuf);\n+    size_t buf_size = *pbuf_size;\n+    size_t id3v2size = mp3dec_skip_id3v2(buf, buf_size);\n+    if (id3v2size)\n+    {\n+        if (id3v2size >= buf_size)\n+            id3v2size = buf_size;\n+        buf      += id3v2size;\n+        buf_size -= id3v2size;\n+    }\n+    mp3dec_skip_id3v1(buf, &buf_size);\n+    *pbuf = (const uint8_t *)buf;\n+    *pbuf_size = buf_size;\n+}\n+\n+static int mp3dec_check_vbrtag(const uint8_t *frame, int frame_size, uint32_t *frames, int *delay, int *padding)\n+{\n+    static const char g_xing_tag[4] = { 'X', 'i', 'n', 'g' };\n+    static const char g_info_tag[4] = { 'I', 'n', 'f', 'o' };\n+#define FRAMES_FLAG     1\n+#define BYTES_FLAG      2\n+#define TOC_FLAG        4\n+#define VBR_SCALE_FLAG  8\n+    /* Side info offsets after header:\n+    /                Mono  Stereo\n+    /  MPEG1          17     32\n+    /  MPEG2 & 2.5     9     17*/\n+    bs_t bs[1];\n+    L3_gr_info_t gr_info[4];\n+    bs_init(bs, frame + HDR_SIZE, frame_size - HDR_SIZE);\n+    if (HDR_IS_CRC(frame))\n+        get_bits(bs, 16);\n+    if (L3_read_side_info(bs, gr_info, frame) < 0)\n+        return 0; /* side info corrupted */\n+\n+    const uint8_t *tag = frame + HDR_SIZE + bs->pos/8;\n+    if (memcmp(g_xing_tag, tag, 4) && memcmp(g_info_tag, tag, 4))\n+        return 0;\n+    int flags = tag[7];\n+    if (!((flags & FRAMES_FLAG)))\n+        return -1;\n+    tag += 8;\n+    *frames = (uint32_t)(tag[0] << 24) | (tag[1] << 16) | (tag[2] << 8) | tag[3];\n+    tag += 4;\n+    if (flags & BYTES_FLAG)\n+        tag += 4;\n+    if (flags & TOC_FLAG)\n+        tag += 100;\n+    if (flags & VBR_SCALE_FLAG)\n+        tag += 4;\n+    *delay = *padding = 0;\n+    if (*tag)\n+    {   /* extension, LAME, Lavc, etc. Should be the same structure. */\n+        tag += 21;\n+        if (tag - frame + 14 >= frame_size)\n+            return 0;\n+        *delay   = ((tag[0] << 4) | (tag[1] >> 4)) + (528 + 1);\n+        *padding = (((tag[1] & 0xF) << 8) | tag[2]) - (528 + 1);\n+    }\n+    return 1;\n+}\n+\n+int mp3dec_detect_buf(const uint8_t *buf, size_t buf_size)\n+{\n+    return mp3dec_detect_cb(0, (uint8_t *)buf, buf_size);\n+}\n+\n+int mp3dec_detect_cb(mp3dec_io_t *io, uint8_t *buf, size_t buf_size)\n+{\n+    if (!buf || (size_t)-1 == buf_size || (io && buf_size < MINIMP3_BUF_SIZE))\n+        return MP3D_E_PARAM;\n+    size_t filled = buf_size;\n+    if (io)\n+    {\n+        if (io->seek(0, io->seek_data))\n+            return MP3D_E_IOERROR;\n+        filled = io->read(buf, MINIMP3_ID3_DETECT_SIZE, io->read_data);\n+        if (filled > MINIMP3_ID3_DETECT_SIZE)\n+            return MP3D_E_IOERROR;\n+    }\n+    if (filled < MINIMP3_ID3_DETECT_SIZE)\n+        return MP3D_E_USER; /* too small, can't be mp3/mpa */\n+    if (mp3dec_skip_id3v2(buf, filled))\n+        return 0; /* id3v2 tag is enough evidence */\n+    if (io)\n+    {\n+        size_t readed = io->read(buf + MINIMP3_ID3_DETECT_SIZE, buf_size - MINIMP3_ID3_DETECT_SIZE, io->read_data);\n+        if (readed > (buf_size - MINIMP3_ID3_DETECT_SIZE))\n+            return MP3D_E_IOERROR;\n+        filled += readed;\n+        if (filled < MINIMP3_BUF_SIZE)\n+            mp3dec_skip_id3v1(buf, &filled);\n+    } else\n+    {\n+        mp3dec_skip_id3v1(buf, &filled);\n+        if (filled > MINIMP3_BUF_SIZE)\n+            filled = MINIMP3_BUF_SIZE;\n+    }\n+    int free_format_bytes, frame_size;\n+    mp3d_find_frame(buf, filled, &free_format_bytes, &frame_size);\n+    if (frame_size)\n+        return 0; /* MAX_FRAME_SYNC_MATCHES consecutive frames found */\n+    return MP3D_E_USER;\n+}\n+\n+int mp3dec_load_buf(mp3dec_t *dec, const uint8_t *buf, size_t buf_size, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data)\n+{\n+    return mp3dec_load_cb(dec, 0, (uint8_t *)buf, buf_size, info, progress_cb, user_data);\n+}\n+\n+int mp3dec_load_cb(mp3dec_t *dec, mp3dec_io_t *io, uint8_t *buf, size_t buf_size, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data)\n+{\n+    if (!dec || !buf || !info || (size_t)-1 == buf_size || (io && buf_size < MINIMP3_BUF_SIZE))\n+        return MP3D_E_PARAM;\n+    uint64_t detected_samples = 0;\n+    size_t orig_buf_size = buf_size;\n+    int to_skip = 0;\n+    mp3dec_frame_info_t frame_info;\n+    memset(info, 0, sizeof(*info));\n+    memset(&frame_info, 0, sizeof(frame_info));\n+\n+    /* skip id3 */\n+    size_t filled = 0, consumed = 0;\n+    int eof = 0, ret = 0;\n+    if (io)\n+    {\n+        if (io->seek(0, io->seek_data))\n+            return MP3D_E_IOERROR;\n+        filled = io->read(buf, MINIMP3_ID3_DETECT_SIZE, io->read_data);\n+        if (filled > MINIMP3_ID3_DETECT_SIZE)\n+            return MP3D_E_IOERROR;\n+        if (MINIMP3_ID3_DETECT_SIZE != filled)\n+            return 0;\n+        size_t id3v2size = mp3dec_skip_id3v2(buf, filled);\n+        if (id3v2size)\n+        {\n+            if (io->seek(id3v2size, io->seek_data))\n+                return MP3D_E_IOERROR;\n+            filled = io->read(buf, buf_size, io->read_data);\n+            if (filled > buf_size)\n+                return MP3D_E_IOERROR;\n+        } else\n+        {\n+            size_t readed = io->read(buf + MINIMP3_ID3_DETECT_SIZE, buf_size - MINIMP3_ID3_DETECT_SIZE, io->read_data);\n+            if (readed > (buf_size - MINIMP3_ID3_DETECT_SIZE))\n+                return MP3D_E_IOERROR;\n+            filled += readed;\n+        }\n+        if (filled < MINIMP3_BUF_SIZE)\n+            mp3dec_skip_id3v1(buf, &filled);\n+    } else\n+    {\n+        mp3dec_skip_id3((const uint8_t **)&buf, &buf_size);\n+        if (!buf_size)\n+            return 0;\n+    }\n+    /* try to make allocation size assumption by first frame or vbr tag */\n+    mp3dec_init(dec);\n+    int samples;\n+    do\n+    {\n+        uint32_t frames;\n+        int i, delay, padding, free_format_bytes = 0, frame_size = 0;\n+        const uint8_t *hdr;\n+        if (io)\n+        {\n+            if (!eof && filled - consumed < MINIMP3_BUF_SIZE)\n+            {   /* keep minimum 10 consecutive mp3 frames (~16KB) worst case */\n+                memmove(buf, buf + consumed, filled - consumed);\n+                filled -= consumed;\n+                consumed = 0;\n+                size_t readed = io->read(buf + filled, buf_size - filled, io->read_data);\n+                if (readed > (buf_size - filled))\n+                    return MP3D_E_IOERROR;\n+                if (readed != (buf_size - filled))\n+                    eof = 1;\n+                filled += readed;\n+                if (eof)\n+                    mp3dec_skip_id3v1(buf, &filled);\n+            }\n+            i = mp3d_find_frame(buf + consumed, filled - consumed, &free_format_bytes, &frame_size);\n+            consumed += i;\n+            hdr = buf + consumed;\n+        } else\n+        {\n+            i = mp3d_find_frame(buf, buf_size, &free_format_bytes, &frame_size);\n+            buf      += i;\n+            buf_size -= i;\n+            hdr = buf;\n+        }\n+        if (i && !frame_size)\n+            continue;\n+        if (!frame_size)\n+            return 0;\n+        frame_info.channels = HDR_IS_MONO(hdr) ? 1 : 2;\n+        frame_info.hz = hdr_sample_rate_hz(hdr);\n+        frame_info.layer = 4 - HDR_GET_LAYER(hdr);\n+        frame_info.bitrate_kbps = hdr_bitrate_kbps(hdr);\n+        frame_info.frame_bytes = frame_size;\n+        samples = hdr_frame_samples(hdr)*frame_info.channels;\n+        if (3 != frame_info.layer)\n+            break;\n+        int ret = mp3dec_check_vbrtag(hdr, frame_size, &frames, &delay, &padding);\n+        if (ret > 0)\n+        {\n+            padding *= frame_info.channels;\n+            to_skip = delay*frame_info.channels;\n+            detected_samples = samples*(uint64_t)frames;\n+            if (detected_samples >= (uint64_t)to_skip)\n+                detected_samples -= to_skip;\n+            if (padding > 0 && detected_samples >= (uint64_t)padding)\n+                detected_samples -= padding;\n+            if (!detected_samples)\n+                return 0;\n+        }\n+        if (ret)\n+        {\n+            if (io)\n+            {\n+                consumed += frame_size;\n+            } else\n+            {\n+                buf      += frame_size;\n+                buf_size -= frame_size;\n+            }\n+        }\n+        break;\n+    } while(1);\n+    size_t allocated = MINIMP3_MAX_SAMPLES_PER_FRAME*sizeof(mp3d_sample_t);\n+    if (detected_samples)\n+        allocated += detected_samples*sizeof(mp3d_sample_t);\n+    else\n+        allocated += (buf_size/frame_info.frame_bytes)*samples*sizeof(mp3d_sample_t);\n+    info->buffer = (mp3d_sample_t*)malloc(allocated);\n+    if (!info->buffer)\n+        return MP3D_E_MEMORY;\n+    /* save info */\n+    info->channels = frame_info.channels;\n+    info->hz       = frame_info.hz;\n+    info->layer    = frame_info.layer;\n+    /* decode all frames */\n+    size_t avg_bitrate_kbps = 0, frames = 0;\n+    do\n+    {\n+        if ((allocated - info->samples*sizeof(mp3d_sample_t)) < MINIMP3_MAX_SAMPLES_PER_FRAME*sizeof(mp3d_sample_t))\n+        {\n+            allocated *= 2;\n+            mp3d_sample_t *alloc_buf = (mp3d_sample_t*)realloc(info->buffer, allocated);\n+            if (!alloc_buf)\n+                return MP3D_E_MEMORY;\n+            info->buffer = alloc_buf;\n+        }\n+        if (io)\n+        {\n+            if (!eof && filled - consumed < MINIMP3_BUF_SIZE)\n+            {   /* keep minimum 10 consecutive mp3 frames (~16KB) worst case */\n+                memmove(buf, buf + consumed, filled - consumed);\n+                filled -= consumed;\n+                consumed = 0;\n+                size_t readed = io->read(buf + filled, buf_size - filled, io->read_data);\n+                if (readed != (buf_size - filled))\n+                    eof = 1;\n+                filled += readed;\n+                if (eof)\n+                    mp3dec_skip_id3v1(buf, &filled);\n+            }\n+            samples = mp3dec_decode_frame(dec, buf + consumed, filled - consumed, info->buffer + info->samples, &frame_info);\n+            consumed += frame_info.frame_bytes;\n+        } else\n+        {\n+            samples = mp3dec_decode_frame(dec, buf, MINIMP3_MIN(buf_size, (size_t)INT_MAX), info->buffer + info->samples, &frame_info);\n+            buf      += frame_info.frame_bytes;\n+            buf_size -= frame_info.frame_bytes;\n+        }\n+        if (samples)\n+        {\n+            if (info->hz != frame_info.hz || info->layer != frame_info.layer)\n+            {\n+                ret = MP3D_E_DECODE;\n+                break;\n+            }\n+            if (info->channels && info->channels != frame_info.channels)\n+            {\n+#ifdef MINIMP3_ALLOW_MONO_STEREO_TRANSITION\n+                info->channels = 0; /* mark file with mono-stereo transition */\n+#else\n+                ret = MP3D_E_DECODE;\n+                break;\n+#endif\n+            }\n+            samples *= frame_info.channels;\n+            if (to_skip)\n+            {\n+                size_t skip = MINIMP3_MIN(samples, to_skip);\n+                to_skip -= skip;\n+                samples -= skip;\n+                memmove(info->buffer, info->buffer + skip, samples*sizeof(mp3d_sample_t));\n+            }\n+            info->samples += samples;\n+            avg_bitrate_kbps += frame_info.bitrate_kbps;\n+            frames++;\n+            if (progress_cb)\n+            {\n+                ret = progress_cb(user_data, orig_buf_size, orig_buf_size - buf_size, &frame_info);\n+                if (ret)\n+                    break;\n+            }\n+        }\n+    } while (frame_info.frame_bytes);\n+    if (detected_samples && info->samples > detected_samples)\n+        info->samples = detected_samples; /* cut padding */\n+    /* reallocate to normal buffer size */\n+    if (allocated != info->samples*sizeof(mp3d_sample_t))\n+    {\n+        mp3d_sample_t *alloc_buf = (mp3d_sample_t*)realloc(info->buffer, info->samples*sizeof(mp3d_sample_t));\n+        if (!alloc_buf && info->samples)\n+            return MP3D_E_MEMORY;\n+        info->buffer = alloc_buf;\n+    }\n+    if (frames)\n+        info->avg_bitrate_kbps = avg_bitrate_kbps/frames;\n+    return ret;\n+}\n+\n+int mp3dec_iterate_buf(const uint8_t *buf, size_t buf_size, MP3D_ITERATE_CB callback, void *user_data)\n+{\n+    const uint8_t *orig_buf = buf;\n+    if (!buf || (size_t)-1 == buf_size || !callback)\n+        return MP3D_E_PARAM;\n+    /* skip id3 */\n+    mp3dec_skip_id3(&buf, &buf_size);\n+    if (!buf_size)\n+        return 0;\n+    mp3dec_frame_info_t frame_info;\n+    memset(&frame_info, 0, sizeof(frame_info));\n+    do\n+    {\n+        int free_format_bytes = 0, frame_size = 0, ret;\n+        int i = mp3d_find_frame(buf, buf_size, &free_format_bytes, &frame_size);\n+        buf      += i;\n+        buf_size -= i;\n+        if (i && !frame_size)\n+            continue;\n+        if (!frame_size)\n+            break;\n+        const uint8_t *hdr = buf;\n+        frame_info.channels = HDR_IS_MONO(hdr) ? 1 : 2;\n+        frame_info.hz = hdr_sample_rate_hz(hdr);\n+        frame_info.layer = 4 - HDR_GET_LAYER(hdr);\n+        frame_info.bitrate_kbps = hdr_bitrate_kbps(hdr);\n+        frame_info.frame_bytes = frame_size;\n+\n+        if (callback)\n+        {\n+            if ((ret = callback(user_data, hdr, frame_size, free_format_bytes, buf_size, hdr - orig_buf, &frame_info)))\n+                return ret;\n+        }\n+        buf      += frame_size;\n+        buf_size -= frame_size;\n+    } while (1);\n+    return 0;\n+}\n+\n+int mp3dec_iterate_cb(mp3dec_io_t *io, uint8_t *buf, size_t buf_size, MP3D_ITERATE_CB callback, void *user_data)\n+{\n+    if (!io || !buf || (size_t)-1 == buf_size || buf_size < MINIMP3_BUF_SIZE || !callback)\n+        return MP3D_E_PARAM;\n+    size_t filled = io->read(buf, MINIMP3_ID3_DETECT_SIZE, io->read_data), consumed = 0;\n+    uint64_t readed = 0;\n+    mp3dec_frame_info_t frame_info;\n+    int eof = 0;\n+    memset(&frame_info, 0, sizeof(frame_info));\n+    if (filled > MINIMP3_ID3_DETECT_SIZE)\n+        return MP3D_E_IOERROR;\n+    if (MINIMP3_ID3_DETECT_SIZE != filled)\n+        return 0;\n+    size_t id3v2size = mp3dec_skip_id3v2(buf, filled);\n+    if (id3v2size)\n+    {\n+        if (io->seek(id3v2size, io->seek_data))\n+            return MP3D_E_IOERROR;\n+        filled = io->read(buf, buf_size, io->read_data);\n+        if (filled > buf_size)\n+            return MP3D_E_IOERROR;\n+        readed += id3v2size;\n+    } else\n+    {\n+        size_t readed = io->read(buf + MINIMP3_ID3_DETECT_SIZE, buf_size - MINIMP3_ID3_DETECT_SIZE, io->read_data);\n+        if (readed > (buf_size - MINIMP3_ID3_DETECT_SIZE))\n+            return MP3D_E_IOERROR;\n+        filled += readed;\n+    }\n+    if (filled < MINIMP3_BUF_SIZE)\n+        mp3dec_skip_id3v1(buf, &filled);\n+    do\n+    {\n+        int free_format_bytes = 0, frame_size = 0, ret;\n+        int i = mp3d_find_frame(buf + consumed, filled - consumed, &free_format_bytes, &frame_size);\n+        if (i && !frame_size)\n+        {\n+            consumed += i;\n+            continue;\n+        }\n+        if (!frame_size)\n+            break;\n+        const uint8_t *hdr = buf + consumed + i;\n+        frame_info.channels = HDR_IS_MONO(hdr) ? 1 : 2;\n+        frame_info.hz = hdr_sample_rate_hz(hdr);\n+        frame_info.layer = 4 - HDR_GET_LAYER(hdr);\n+        frame_info.bitrate_kbps = hdr_bitrate_kbps(hdr);\n+        frame_info.frame_bytes = frame_size;\n+\n+        readed += i;\n+        if (callback)\n+        {\n+            if ((ret = callback(user_data, hdr, frame_size, free_format_bytes, filled - consumed, readed, &frame_info)))\n+                return ret;\n+        }\n+        readed += frame_size;\n+        consumed += i + frame_size;\n+        if (!eof && filled - consumed < MINIMP3_BUF_SIZE)\n+        {   /* keep minimum 10 consecutive mp3 frames (~16KB) worst case */\n+            memmove(buf, buf + consumed, filled - consumed);\n+            filled -= consumed;\n+            consumed = 0;\n+            size_t readed = io->read(buf + filled, buf_size - filled, io->read_data);\n+            if (readed > (buf_size - filled))\n+                return MP3D_E_IOERROR;\n+            if (readed != (buf_size - filled))\n+                eof = 1;\n+            filled += readed;\n+            if (eof)\n+                mp3dec_skip_id3v1(buf, &filled);\n+        }\n+    } while (1);\n+    return 0;\n+}\n+\n+static int mp3dec_load_index(void *user_data, const uint8_t *frame, int frame_size, int free_format_bytes, size_t buf_size, uint64_t offset, mp3dec_frame_info_t *info)\n+{\n+    mp3dec_frame_t *idx_frame;\n+    mp3dec_ex_t *dec = (mp3dec_ex_t *)user_data;\n+    if (!dec->index.frames && !dec->start_offset)\n+    {   /* detect VBR tag and try to avoid full scan */\n+        uint32_t frames;\n+        int delay, padding;\n+        dec->info = *info;\n+        dec->start_offset = dec->offset = offset;\n+        dec->end_offset   = offset + buf_size;\n+        dec->free_format_bytes = free_format_bytes; /* should not change */\n+        if (3 == dec->info.layer)\n+        {\n+            int ret = mp3dec_check_vbrtag(frame, frame_size, &frames, &delay, &padding);\n+            if (ret)\n+                dec->start_offset = dec->offset = offset + frame_size;\n+            if (ret > 0)\n+            {\n+                padding *= info->channels;\n+                dec->start_delay = dec->to_skip = delay*info->channels;\n+                dec->samples = hdr_frame_samples(frame)*info->channels*(uint64_t)frames;\n+                if (dec->samples >= (uint64_t)dec->start_delay)\n+                    dec->samples -= dec->start_delay;\n+                if (padding > 0 && dec->samples >= (uint64_t)padding)\n+                    dec->samples -= padding;\n+                dec->detected_samples = dec->samples;\n+                dec->vbr_tag_found = 1;\n+                return MP3D_E_USER;\n+            } else if (ret < 0)\n+                return 0;\n+        }\n+    }\n+    if (dec->flags & MP3D_DO_NOT_SCAN)\n+        return MP3D_E_USER;\n+    if (dec->index.num_frames + 1 > dec->index.capacity)\n+    {\n+        if (!dec->index.capacity)\n+            dec->index.capacity = 4096;\n+        else\n+            dec->index.capacity *= 2;\n+        mp3dec_frame_t *alloc_buf = (mp3dec_frame_t *)realloc((void*)dec->index.frames, sizeof(mp3dec_frame_t)*dec->index.capacity);\n+        if (!alloc_buf)\n+            return MP3D_E_MEMORY;\n+        dec->index.frames = alloc_buf;\n+    }\n+    idx_frame = &dec->index.frames[dec->index.num_frames++];\n+    idx_frame->offset = offset;\n+    idx_frame->sample = dec->samples;\n+    if (!dec->buffer_samples && dec->index.num_frames < 256)\n+    {   /* for some cutted mp3 frames, bit-reservoir not filled and decoding can't be started from first frames */\n+        /* try to decode up to 255 first frames till samples starts to decode */\n+        dec->buffer_samples = mp3dec_decode_frame(&dec->mp3d, frame, MINIMP3_MIN(buf_size, (size_t)INT_MAX), dec->buffer, info);\n+        dec->samples += dec->buffer_samples*info->channels;\n+    } else\n+        dec->samples += hdr_frame_samples(frame)*info->channels;\n+    return 0;\n+}\n+\n+int mp3dec_ex_open_buf(mp3dec_ex_t *dec, const uint8_t *buf, size_t buf_size, int flags)\n+{\n+    if (!dec || !buf || (size_t)-1 == buf_size || (flags & (~MP3D_FLAGS_MASK)))\n+        return MP3D_E_PARAM;\n+    memset(dec, 0, sizeof(*dec));\n+    dec->file.buffer = buf;\n+    dec->file.size   = buf_size;\n+    dec->flags       = flags;\n+    mp3dec_init(&dec->mp3d);\n+    int ret = mp3dec_iterate_buf(dec->file.buffer, dec->file.size, mp3dec_load_index, dec);\n+    if (ret && MP3D_E_USER != ret)\n+        return ret;\n+    mp3dec_init(&dec->mp3d);\n+    dec->buffer_samples = 0;\n+    dec->indexes_built = !(dec->vbr_tag_found || (flags & MP3D_DO_NOT_SCAN));\n+    dec->flags &= (~MP3D_DO_NOT_SCAN);\n+    return 0;\n+}\n+\n+#ifndef MINIMP3_SEEK_IDX_LINEAR_SEARCH\n+static size_t mp3dec_idx_binary_search(mp3dec_index_t *idx, uint64_t position)\n+{\n+    size_t end = idx->num_frames, start = 0, index = 0;\n+    while (start <= end)\n+    {\n+        size_t mid = (start + end) / 2;\n+        if (idx->frames[mid].sample >= position)\n+        {   /* move left side. */\n+            if (idx->frames[mid].sample == position)\n+                return mid;\n+            end = mid - 1;\n+        }  else\n+        {   /* move to right side */\n+            index = mid;\n+            start = mid + 1;\n+            if (start == idx->num_frames)\n+                break;\n+        }\n+    }\n+    return index;\n+}\n+#endif\n+\n+int mp3dec_ex_seek(mp3dec_ex_t *dec, uint64_t position)\n+{\n+    size_t i;\n+    if (!dec)\n+        return MP3D_E_PARAM;\n+    if (!(dec->flags & MP3D_SEEK_TO_SAMPLE))\n+    {\n+        if (dec->io)\n+        {\n+            dec->offset = position;\n+        } else\n+        {\n+            dec->offset = MINIMP3_MIN(position, dec->file.size);\n+        }\n+        dec->cur_sample = 0;\n+        goto do_exit;\n+    }\n+    dec->cur_sample = position;\n+    position += dec->start_delay;\n+    if (0 == position)\n+    {   /* optimize seek to zero, no index needed */\n+seek_zero:\n+        dec->offset  = dec->start_offset;\n+        dec->to_skip = 0;\n+        goto do_exit;\n+    }\n+    if (!dec->indexes_built)\n+    {   /* no index created yet (vbr tag used to calculate track length or MP3D_DO_NOT_SCAN open flag used) */\n+        dec->indexes_built = 1;\n+        dec->samples = 0;\n+        dec->buffer_samples = 0;\n+        if (dec->io)\n+        {\n+            if (dec->io->seek(dec->start_offset, dec->io->seek_data))\n+                return MP3D_E_IOERROR;\n+            int ret = mp3dec_iterate_cb(dec->io, (uint8_t *)dec->file.buffer, dec->file.size, mp3dec_load_index, dec);\n+            if (ret && MP3D_E_USER != ret)\n+                return ret;\n+        } else\n+        {\n+            int ret = mp3dec_iterate_buf(dec->file.buffer + dec->start_offset, dec->file.size - dec->start_offset, mp3dec_load_index, dec);\n+            if (ret && MP3D_E_USER != ret)\n+                return ret;\n+        }\n+        for (i = 0; i < dec->index.num_frames; i++)\n+            dec->index.frames[i].offset += dec->start_offset;\n+        dec->samples = dec->detected_samples;\n+    }\n+    if (!dec->index.frames)\n+        goto seek_zero; /* no frames in file - seek to zero */\n+#ifdef MINIMP3_SEEK_IDX_LINEAR_SEARCH\n+    for (i = 0; i < dec->index.num_frames; i++)\n+    {\n+        if (dec->index.frames[i].sample >= position)\n+            break;\n+    }\n+#else\n+    i = mp3dec_idx_binary_search(&dec->index, position);\n+#endif\n+    if (i)\n+    {\n+        int to_fill_bytes = 511;\n+        int skip_frames = MINIMP3_PREDECODE_FRAMES\n+#ifdef MINIMP3_SEEK_IDX_LINEAR_SEARCH\n+         + ((dec->index.frames[i].sample == position) ? 0 : 1)\n+#endif\n+        ;\n+        i -= MINIMP3_MIN(i, (size_t)skip_frames);\n+        if (3 == dec->info.layer)\n+        {\n+            while (i && to_fill_bytes)\n+            {   /* make sure bit-reservoir is filled when we start decoding */\n+                bs_t bs[1];\n+                L3_gr_info_t gr_info[4];\n+                int frame_bytes, frame_size;\n+                const uint8_t *hdr;\n+                if (dec->io)\n+                {\n+                    hdr = dec->file.buffer;\n+                    if (dec->io->seek(dec->index.frames[i - 1].offset, dec->io->seek_data))\n+                        return MP3D_E_IOERROR;\n+                    size_t readed = dec->io->read((uint8_t *)hdr, HDR_SIZE, dec->io->read_data);\n+                    if (readed != HDR_SIZE)\n+                        return MP3D_E_IOERROR;\n+                    frame_size = hdr_frame_bytes(hdr, dec->free_format_bytes) + hdr_padding(hdr);\n+                    readed = dec->io->read((uint8_t *)hdr + HDR_SIZE, frame_size - HDR_SIZE, dec->io->read_data);\n+                    if (readed != (size_t)(frame_size - HDR_SIZE))\n+                        return MP3D_E_IOERROR;\n+                    bs_init(bs, hdr + HDR_SIZE, frame_size - HDR_SIZE);\n+                } else\n+                {\n+                    hdr = dec->file.buffer + dec->index.frames[i - 1].offset;\n+                    frame_size = hdr_frame_bytes(hdr, dec->free_format_bytes) + hdr_padding(hdr);\n+                    bs_init(bs, hdr + HDR_SIZE, frame_size - HDR_SIZE);\n+                }\n+                if (HDR_IS_CRC(hdr))\n+                    get_bits(bs, 16);\n+                i--;\n+                if (L3_read_side_info(bs, gr_info, hdr) < 0)\n+                    break; /* frame not decodable, we can start from here */\n+                frame_bytes = (bs->limit - bs->pos)/8;\n+                to_fill_bytes -= MINIMP3_MIN(to_fill_bytes, frame_bytes);\n+            }\n+        }\n+    }\n+    dec->offset = dec->index.frames[i].offset;\n+    dec->to_skip = position - dec->index.frames[i].sample;\n+    while ((i + 1) < dec->index.num_frames && !dec->index.frames[i].sample && !dec->index.frames[i + 1].sample)\n+    {   /* skip not decodable first frames */\n+        const uint8_t *hdr;\n+        if (dec->io)\n+        {\n+            hdr = dec->file.buffer;\n+            if (dec->io->seek(dec->index.frames[i].offset, dec->io->seek_data))\n+                return MP3D_E_IOERROR;\n+            size_t readed = dec->io->read((uint8_t *)hdr, HDR_SIZE, dec->io->read_data);\n+            if (readed != HDR_SIZE)\n+                return MP3D_E_IOERROR;\n+        } else\n+            hdr = dec->file.buffer + dec->index.frames[i].offset;\n+        dec->to_skip += hdr_frame_samples(hdr)*dec->info.channels;\n+        i++;\n+    }\n+do_exit:\n+    if (dec->io)\n+    {\n+        if (dec->io->seek(dec->offset, dec->io->seek_data))\n+            return MP3D_E_IOERROR;\n+    }\n+    dec->buffer_samples  = 0;\n+    dec->buffer_consumed = 0;\n+    dec->input_consumed  = 0;\n+    dec->input_filled    = 0;\n+    dec->last_error      = 0;\n+    mp3dec_init(&dec->mp3d);\n+    return 0;\n+}\n+\n+size_t mp3dec_ex_read_frame(mp3dec_ex_t *dec, mp3d_sample_t **buf, mp3dec_frame_info_t *frame_info, size_t max_samples)\n+{\n+    if (!dec || !buf || !frame_info)\n+    {\n+        if (dec)\n+            dec->last_error = MP3D_E_PARAM;\n+        return 0;\n+    }\n+    if (dec->detected_samples && dec->cur_sample >= dec->detected_samples)\n+        return 0; /* at end of stream */\n+    if (dec->last_error)\n+        return 0; /* error eof state, seek can reset it */\n+    *buf = NULL;\n+    uint64_t end_offset = dec->end_offset ? dec->end_offset : dec->file.size;\n+    int eof = 0;\n+    while (dec->buffer_consumed == dec->buffer_samples)\n+    {\n+        const uint8_t *dec_buf;\n+        if (dec->io)\n+        {\n+            if (!eof && (dec->input_filled - dec->input_consumed) < MINIMP3_BUF_SIZE)\n+            {   /* keep minimum 10 consecutive mp3 frames (~16KB) worst case */\n+                memmove((uint8_t*)dec->file.buffer, (uint8_t*)dec->file.buffer + dec->input_consumed, dec->input_filled - dec->input_consumed);\n+                dec->input_filled -= dec->input_consumed;\n+                dec->input_consumed = 0;\n+                size_t readed = dec->io->read((uint8_t*)dec->file.buffer + dec->input_filled, dec->file.size - dec->input_filled, dec->io->read_data);\n+                if (readed > (dec->file.size - dec->input_filled))\n+                {\n+                    dec->last_error = MP3D_E_IOERROR;\n+                    readed = 0;\n+                }\n+                if (readed != (dec->file.size - dec->input_filled))\n+                    eof = 1;\n+                dec->input_filled += readed;\n+                if (eof)\n+                    mp3dec_skip_id3v1((uint8_t*)dec->file.buffer, &dec->input_filled);\n+            }\n+            dec_buf = dec->file.buffer + dec->input_consumed;\n+            if (!(dec->input_filled - dec->input_consumed))\n+                return 0;\n+            dec->buffer_samples = mp3dec_decode_frame(&dec->mp3d, dec_buf, dec->input_filled - dec->input_consumed, dec->buffer, frame_info);\n+            dec->input_consumed += frame_info->frame_bytes;\n+        } else\n+        {\n+            dec_buf = dec->file.buffer + dec->offset;\n+            uint64_t buf_size = end_offset - dec->offset;\n+            if (!buf_size)\n+                return 0;\n+            dec->buffer_samples = mp3dec_decode_frame(&dec->mp3d, dec_buf, MINIMP3_MIN(buf_size, (uint64_t)INT_MAX), dec->buffer, frame_info);\n+        }\n+        dec->buffer_consumed = 0;\n+        if (dec->info.hz != frame_info->hz || dec->info.layer != frame_info->layer)\n+        {\n+return_e_decode:\n+            dec->last_error = MP3D_E_DECODE;\n+            return 0;\n+        }\n+        if (dec->buffer_samples)\n+        {\n+            dec->buffer_samples *= frame_info->channels;\n+            if (dec->to_skip)\n+            {\n+                size_t skip = MINIMP3_MIN(dec->buffer_samples, dec->to_skip);\n+                dec->buffer_consumed += skip;\n+                dec->to_skip -= skip;\n+            }\n+            if (\n+#ifdef MINIMP3_ALLOW_MONO_STEREO_TRANSITION\n+                !(dec->flags & MP3D_ALLOW_MONO_STEREO_TRANSITION) &&\n+#endif\n+                dec->buffer_consumed != dec->buffer_samples && dec->info.channels != frame_info->channels)\n+            {\n+                goto return_e_decode;\n+            }\n+        } else if (dec->to_skip)\n+        {   /* In mp3 decoding not always can start decode from any frame because of bit reservoir,\n+               count skip samples for such frames */\n+            int frame_samples = hdr_frame_samples(dec_buf)*frame_info->channels;\n+            dec->to_skip -= MINIMP3_MIN(frame_samples, dec->to_skip);\n+        }\n+        dec->offset += frame_info->frame_bytes;\n+    }\n+    size_t out_samples = MINIMP3_MIN((size_t)(dec->buffer_samples - dec->buffer_consumed), max_samples);\n+    if (dec->detected_samples)\n+    {   /* count decoded samples to properly cut padding */\n+        if (dec->cur_sample + out_samples >= dec->detected_samples)\n+            out_samples = dec->detected_samples - dec->cur_sample;\n+    }\n+    dec->cur_sample += out_samples;\n+    *buf = dec->buffer + dec->buffer_consumed;\n+    dec->buffer_consumed += out_samples;\n+    return out_samples;\n+}\n+\n+size_t mp3dec_ex_read(mp3dec_ex_t *dec, mp3d_sample_t *buf, size_t samples)\n+{\n+    if (!dec || !buf)\n+    {\n+        if (dec)\n+            dec->last_error = MP3D_E_PARAM;\n+        return 0;\n+    }\n+    mp3dec_frame_info_t frame_info;\n+    memset(&frame_info, 0, sizeof(frame_info));\n+    size_t samples_requested = samples;\n+    while (samples)\n+    {\n+        mp3d_sample_t *buf_frame = NULL;\n+        size_t read_samples = mp3dec_ex_read_frame(dec, &buf_frame, &frame_info, samples);\n+        if (!read_samples)\n+        {\n+            break;\n+        }\n+        memcpy(buf, buf_frame, read_samples * sizeof(mp3d_sample_t));\n+        buf += read_samples;\n+        samples -= read_samples;\n+    }\n+    return samples_requested - samples;\n+}\n+\n+int mp3dec_ex_open_cb(mp3dec_ex_t *dec, mp3dec_io_t *io, int flags)\n+{\n+    if (!dec || !io || (flags & (~MP3D_FLAGS_MASK)))\n+        return MP3D_E_PARAM;\n+    memset(dec, 0, sizeof(*dec));\n+#ifdef MINIMP3_HAVE_RING\n+    int ret;\n+    if (ret = mp3dec_open_ring(&dec->file, MINIMP3_IO_SIZE))\n+        return ret;\n+#else\n+    dec->file.size = MINIMP3_IO_SIZE;\n+    dec->file.buffer = (const uint8_t*)malloc(dec->file.size);\n+    if (!dec->file.buffer)\n+        return MP3D_E_MEMORY;\n+#endif\n+    dec->flags = flags;\n+    dec->io = io;\n+    mp3dec_init(&dec->mp3d);\n+    if (io->seek(0, io->seek_data))\n+        return MP3D_E_IOERROR;\n+    int ret = mp3dec_iterate_cb(io, (uint8_t *)dec->file.buffer, dec->file.size, mp3dec_load_index, dec);\n+    if (ret && MP3D_E_USER != ret)\n+        return ret;\n+    if (dec->io->seek(dec->start_offset, dec->io->seek_data))\n+        return MP3D_E_IOERROR;\n+    mp3dec_init(&dec->mp3d);\n+    dec->buffer_samples = 0;\n+    dec->indexes_built = !(dec->vbr_tag_found || (flags & MP3D_DO_NOT_SCAN));\n+    dec->flags &= (~MP3D_DO_NOT_SCAN);\n+    return 0;\n+}\n+\n+\n+#ifndef MINIMP3_NO_STDIO\n+\n+#if defined(__linux__) || defined(__FreeBSD__)\n+#include <errno.h>\n+#include <sys/mman.h>\n+#include <sys/types.h>\n+#include <sys/stat.h>\n+#include <unistd.h>\n+#include <fcntl.h>\n+#if !defined(_GNU_SOURCE)\n+#include <sys/ipc.h>\n+#include <sys/shm.h>\n+#endif\n+#if !defined(MAP_POPULATE) && defined(__linux__)\n+#define MAP_POPULATE 0x08000\n+#elif !defined(MAP_POPULATE)\n+#define MAP_POPULATE 0\n+#endif\n+\n+static void mp3dec_close_file(mp3dec_map_info_t *map_info)\n+{\n+    if (map_info->buffer && MAP_FAILED != map_info->buffer)\n+        munmap((void *)map_info->buffer, map_info->size);\n+    map_info->buffer = 0;\n+    map_info->size   = 0;\n+}\n+\n+static int mp3dec_open_file(const char *file_name, mp3dec_map_info_t *map_info)\n+{\n+    if (!file_name)\n+        return MP3D_E_PARAM;\n+    int file;\n+    struct stat st;\n+    memset(map_info, 0, sizeof(*map_info));\n+retry_open:\n+    file = open(file_name, O_RDONLY);\n+    if (file < 0 && (errno == EAGAIN || errno == EINTR))\n+        goto retry_open;\n+    if (file < 0 || fstat(file, &st) < 0)\n+    {\n+        close(file);\n+        return MP3D_E_IOERROR;\n+    }\n+\n+    map_info->size = st.st_size;\n+retry_mmap:\n+    map_info->buffer = (const uint8_t *)mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE | MAP_POPULATE, file, 0);\n+    if (MAP_FAILED == map_info->buffer && (errno == EAGAIN || errno == EINTR))\n+        goto retry_mmap;\n+    close(file);\n+    if (MAP_FAILED == map_info->buffer)\n+        return MP3D_E_IOERROR;\n+    return 0;\n+}\n+\n+#if MINIMP3_ENABLE_RING && defined(__linux__) && defined(_GNU_SOURCE)\n+#define MINIMP3_HAVE_RING\n+static void mp3dec_close_ring(mp3dec_map_info_t *map_info)\n+{\n+#if defined(__linux__) && defined(_GNU_SOURCE)\n+    if (map_info->buffer && MAP_FAILED != map_info->buffer)\n+        munmap((void *)map_info->buffer, map_info->size*2);\n+#else\n+    if (map_info->buffer)\n+    {\n+        shmdt(map_info->buffer);\n+        shmdt(map_info->buffer + map_info->size);\n+    }\n+#endif\n+    map_info->buffer = 0;\n+    map_info->size   = 0;\n+}\n+\n+static int mp3dec_open_ring(mp3dec_map_info_t *map_info, size_t size)\n+{\n+    int memfd, page_size;\n+#if defined(__linux__) && defined(_GNU_SOURCE)\n+    void *buffer;\n+    int res;\n+#endif\n+    memset(map_info, 0, sizeof(*map_info));\n+\n+#ifdef _SC_PAGESIZE\n+    page_size = sysconf(_SC_PAGESIZE);\n+#else\n+    page_size = getpagesize();\n+#endif\n+    map_info->size = (size + page_size - 1)/page_size*page_size;\n+\n+#if defined(__linux__) && defined(_GNU_SOURCE)\n+    memfd = memfd_create(\"mp3_ring\", 0);\n+    if (memfd < 0)\n+        return MP3D_E_MEMORY;\n+\n+retry_ftruncate:\n+    res = ftruncate(memfd, map_info->size);\n+    if (res && (errno == EAGAIN || errno == EINTR))\n+        goto retry_ftruncate;\n+    if (res)\n+        goto error;\n+\n+retry_mmap:\n+    map_info->buffer = (const uint8_t *)mmap(NULL, map_info->size*2, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);\n+    if (MAP_FAILED == map_info->buffer && (errno == EAGAIN || errno == EINTR))\n+        goto retry_mmap;\n+    if (MAP_FAILED == map_info->buffer || !map_info->buffer)\n+        goto error;\n+retry_mmap2:\n+    buffer = mmap((void *)map_info->buffer, map_info->size, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, memfd, 0);\n+    if (MAP_FAILED == map_info->buffer && (errno == EAGAIN || errno == EINTR))\n+        goto retry_mmap2;\n+    if (MAP_FAILED == map_info->buffer || buffer != (void *)map_info->buffer)\n+        goto error;\n+retry_mmap3:\n+    buffer = mmap((void *)map_info->buffer + map_info->size, map_info->size, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, memfd, 0);\n+    if (MAP_FAILED == map_info->buffer && (errno == EAGAIN || errno == EINTR))\n+        goto retry_mmap3;\n+    if (MAP_FAILED == map_info->buffer || buffer != (void *)(map_info->buffer + map_info->size))\n+        goto error;\n+\n+    close(memfd);\n+    return 0;\n+error:\n+    close(memfd);\n+    mp3dec_close_ring(map_info);\n+    return MP3D_E_MEMORY;\n+#else\n+    memfd = shmget(IPC_PRIVATE, map_info->size, IPC_CREAT | 0700);\n+    if (memfd < 0)\n+        return MP3D_E_MEMORY;\n+retry_mmap:\n+    map_info->buffer = (const uint8_t *)mmap(NULL, map_info->size*2, PROT_NONE, MAP_PRIVATE, -1, 0);\n+    if (MAP_FAILED == map_info->buffer && (errno == EAGAIN || errno == EINTR))\n+        goto retry_mmap;\n+    if (MAP_FAILED == map_info->buffer)\n+        goto error;\n+    if (map_info->buffer != shmat(memfd, map_info->buffer, 0))\n+        goto error;\n+    if ((map_info->buffer + map_info->size) != shmat(memfd, map_info->buffer + map_info->size, 0))\n+        goto error;\n+    if (shmctl(memfd, IPC_RMID, NULL) < 0)\n+        return MP3D_E_MEMORY;\n+    return 0;\n+error:\n+    shmctl(memfd, IPC_RMID, NULL);\n+    mp3dec_close_ring(map_info);\n+    return MP3D_E_MEMORY;\n+#endif\n+}\n+#endif /*MINIMP3_ENABLE_RING*/\n+#elif defined(_WIN32)\n+#include <windows.h>\n+\n+static void mp3dec_close_file(mp3dec_map_info_t *map_info)\n+{\n+    if (map_info->buffer)\n+        UnmapViewOfFile(map_info->buffer);\n+    map_info->buffer = 0;\n+    map_info->size   = 0;\n+}\n+\n+static int mp3dec_open_file_h(HANDLE file, mp3dec_map_info_t *map_info)\n+{\n+    memset(map_info, 0, sizeof(*map_info));\n+\n+    HANDLE mapping = NULL;\n+    LARGE_INTEGER s;\n+    s.LowPart = GetFileSize(file, (DWORD*)&s.HighPart);\n+    if (s.LowPart == INVALID_FILE_SIZE && GetLastError() != NO_ERROR)\n+        goto error;\n+    map_info->size = s.QuadPart;\n+\n+    mapping = CreateFileMapping(file, NULL, PAGE_READONLY, 0, 0, NULL);\n+    if (!mapping)\n+        goto error;\n+    map_info->buffer = (const uint8_t*)MapViewOfFile(mapping, FILE_MAP_READ, 0, 0, s.QuadPart);\n+    CloseHandle(mapping);\n+    if (!map_info->buffer)\n+        goto error;\n+\n+    CloseHandle(file);\n+    return 0;\n+error:\n+    mp3dec_close_file(map_info);\n+    CloseHandle(file);\n+    return MP3D_E_IOERROR;\n+}\n+\n+static int mp3dec_open_file(const char *file_name, mp3dec_map_info_t *map_info)\n+{\n+    if (!file_name)\n+        return MP3D_E_PARAM;\n+    HANDLE file = CreateFileA(file_name, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);\n+    if (INVALID_HANDLE_VALUE == file)\n+        return MP3D_E_IOERROR;\n+    return mp3dec_open_file_h(file, map_info);\n+}\n+\n+static int mp3dec_open_file_w(const wchar_t *file_name, mp3dec_map_info_t *map_info)\n+{\n+    if (!file_name)\n+        return MP3D_E_PARAM;\n+    HANDLE file = CreateFileW(file_name, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);\n+    if (INVALID_HANDLE_VALUE == file)\n+        return MP3D_E_IOERROR;\n+    return mp3dec_open_file_h(file, map_info);\n+}\n+#else\n+#include <stdio.h>\n+\n+static void mp3dec_close_file(mp3dec_map_info_t *map_info)\n+{\n+    if (map_info->buffer)\n+        free((void *)map_info->buffer);\n+    map_info->buffer = 0;\n+    map_info->size = 0;\n+}\n+\n+static int mp3dec_open_file(const char *file_name, mp3dec_map_info_t *map_info)\n+{\n+    if (!file_name)\n+        return MP3D_E_PARAM;\n+    memset(map_info, 0, sizeof(*map_info));\n+    FILE *file = fopen(file_name, \"rb\");\n+    if (!file)\n+        return MP3D_E_IOERROR;\n+    int res = MP3D_E_IOERROR;\n+    long size = -1;\n+    if (fseek(file, 0, SEEK_END))\n+        goto error;\n+    size = ftell(file);\n+    if (size < 0)\n+        goto error;\n+    map_info->size = (size_t)size;\n+    if (fseek(file, 0, SEEK_SET))\n+        goto error;\n+    map_info->buffer = (uint8_t *)malloc(map_info->size);\n+    if (!map_info->buffer)\n+    {\n+        res = MP3D_E_MEMORY;\n+        goto error;\n+    }\n+    if (fread((void *)map_info->buffer, 1, map_info->size, file) != map_info->size)\n+        goto error;\n+    fclose(file);\n+    return 0;\n+error:\n+    mp3dec_close_file(map_info);\n+    fclose(file);\n+    return res;\n+}\n+#endif\n+\n+static int mp3dec_detect_mapinfo(mp3dec_map_info_t *map_info)\n+{\n+    int ret = mp3dec_detect_buf(map_info->buffer, map_info->size);\n+    mp3dec_close_file(map_info);\n+    return ret;\n+}\n+\n+static int mp3dec_load_mapinfo(mp3dec_t *dec, mp3dec_map_info_t *map_info, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data)\n+{\n+    int ret = mp3dec_load_buf(dec, map_info->buffer, map_info->size, info, progress_cb, user_data);\n+    mp3dec_close_file(map_info);\n+    return ret;\n+}\n+\n+static int mp3dec_iterate_mapinfo(mp3dec_map_info_t *map_info, MP3D_ITERATE_CB callback, void *user_data)\n+{\n+    int ret = mp3dec_iterate_buf(map_info->buffer, map_info->size, callback, user_data);\n+    mp3dec_close_file(map_info);\n+    return ret;\n+}\n+\n+static int mp3dec_ex_open_mapinfo(mp3dec_ex_t *dec, int flags)\n+{\n+    int ret = mp3dec_ex_open_buf(dec, dec->file.buffer, dec->file.size, flags);\n+    dec->is_file = 1;\n+    if (ret)\n+        mp3dec_ex_close(dec);\n+    return ret;\n+}\n+\n+int mp3dec_detect(const char *file_name)\n+{\n+    int ret;\n+    mp3dec_map_info_t map_info;\n+    if ((ret = mp3dec_open_file(file_name, &map_info)))\n+        return ret;\n+    return mp3dec_detect_mapinfo(&map_info);\n+}\n+\n+int mp3dec_load(mp3dec_t *dec, const char *file_name, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data)\n+{\n+    int ret;\n+    mp3dec_map_info_t map_info;\n+    if ((ret = mp3dec_open_file(file_name, &map_info)))\n+        return ret;\n+    return mp3dec_load_mapinfo(dec, &map_info, info, progress_cb, user_data);\n+}\n+\n+int mp3dec_iterate(const char *file_name, MP3D_ITERATE_CB callback, void *user_data)\n+{\n+    int ret;\n+    mp3dec_map_info_t map_info;\n+    if ((ret = mp3dec_open_file(file_name, &map_info)))\n+        return ret;\n+    return mp3dec_iterate_mapinfo(&map_info, callback, user_data);\n+}\n+\n+int mp3dec_ex_open(mp3dec_ex_t *dec, const char *file_name, int flags)\n+{\n+    int ret;\n+    if (!dec)\n+        return MP3D_E_PARAM;\n+    if ((ret = mp3dec_open_file(file_name, &dec->file)))\n+        return ret;\n+    return mp3dec_ex_open_mapinfo(dec, flags);\n+}\n+\n+void mp3dec_ex_close(mp3dec_ex_t *dec)\n+{\n+#ifdef MINIMP3_HAVE_RING\n+    if (dec->io)\n+        mp3dec_close_ring(&dec->file);\n+#else\n+    if (dec->io && dec->file.buffer)\n+        free((void*)dec->file.buffer);\n+#endif\n+    if (dec->is_file)\n+        mp3dec_close_file(&dec->file);\n+    if (dec->index.frames)\n+        free(dec->index.frames);\n+    memset(dec, 0, sizeof(*dec));\n+}\n+\n+#ifdef _WIN32\n+int mp3dec_detect_w(const wchar_t *file_name)\n+{\n+    int ret;\n+    mp3dec_map_info_t map_info;\n+    if ((ret = mp3dec_open_file_w(file_name, &map_info)))\n+        return ret;\n+    return mp3dec_detect_mapinfo(&map_info);\n+}\n+\n+int mp3dec_load_w(mp3dec_t *dec, const wchar_t *file_name, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data)\n+{\n+    int ret;\n+    mp3dec_map_info_t map_info;\n+    if ((ret = mp3dec_open_file_w(file_name, &map_info)))\n+        return ret;\n+    return mp3dec_load_mapinfo(dec, &map_info, info, progress_cb, user_data);\n+}\n+\n+int mp3dec_iterate_w(const wchar_t *file_name, MP3D_ITERATE_CB callback, void *user_data)\n+{\n+    int ret;\n+    mp3dec_map_info_t map_info;\n+    if ((ret = mp3dec_open_file_w(file_name, &map_info)))\n+        return ret;\n+    return mp3dec_iterate_mapinfo(&map_info, callback, user_data);\n+}\n+\n+int mp3dec_ex_open_w(mp3dec_ex_t *dec, const wchar_t *file_name, int flags)\n+{\n+    int ret;\n+    if ((ret = mp3dec_open_file_w(file_name, &dec->file)))\n+        return ret;\n+    return mp3dec_ex_open_mapinfo(dec, flags);\n+}\n+#endif\n+#else /* MINIMP3_NO_STDIO */\n+void mp3dec_ex_close(mp3dec_ex_t *dec)\n+{\n+#ifdef MINIMP3_HAVE_RING\n+    if (dec->io)\n+        mp3dec_close_ring(&dec->file);\n+#else\n+    if (dec->io && dec->file.buffer)\n+        free((void*)dec->file.buffer);\n+#endif\n+    if (dec->index.frames)\n+        free(dec->index.frames);\n+    memset(dec, 0, sizeof(*dec));\n+}\n+#endif\n+\n+#endif /* MINIMP3_IMPLEMENTATION && !_MINIMP3_EX_IMPLEMENTATION_GUARD */\ndiff --git a/core/cart_hw/paprium.h b/core/cart_hw/paprium.h\nnew file mode 100644\nindex 000000000..9acf355ef\n--- /dev/null\n+++ b/core/cart_hw/paprium.h\n@@ -0,0 +1,2863 @@\n+/*\n+Project Little Man\n+*/\n+\n+#ifdef _WIN32\n+#include <windows.h>\n+#include <stdio.h>\n+#endif\n+\n+\n+#define DEBUG_SPRITE 0\n+#define DEBUG_MODE 0\n+#define DEBUG_CHEAT 0\n+\n+\n+#define MINIMP3_IMPLEMENTATION\n+#include \"minimp3_ex.h\"\n+\n+\n+static mp3dec_t paprium_mp3d;\n+static mp3dec_file_info_t paprium_mp3d_info;\n+\n+static mp3dec_t paprium_mp3d_boss1;\n+static mp3dec_file_info_t paprium_mp3d_info_boss1;\n+\n+static mp3dec_t paprium_mp3d_boss2;\n+static mp3dec_file_info_t paprium_mp3d_info_boss2;\n+\n+static mp3dec_t paprium_mp3d_boss3;\n+static mp3dec_file_info_t paprium_mp3d_info_boss3;\n+\n+static mp3dec_t paprium_mp3d_boss4;\n+static mp3dec_file_info_t paprium_mp3d_info_boss4;\n+\n+static int paprium_track_last;\n+extern char g_rom_dir[256];\n+\n+\n+#define PAPRIUM_BOSS1 0x17\n+#define PAPRIUM_BOSS2 0x21\n+#define PAPRIUM_BOSS3 0x22\n+#define PAPRIUM_BOSS4 0x23\n+\n+\n+static int skip_boot1 = 1;\n+\n+\n+extern T_SRAM sram;\n+\n+\n+extern retro_log_printf_t log_cb;\n+static char error_str[1024];\n+static int paprium_cmd_count = 0;\n+\n+#define m68k_read_immediate_16(address) *(uint16 *)(m68k.memory_map[((address)>>16)&0xff].base + ((address) & 0xffff))\n+#define m68k_read_immediate_32(address) (m68k_read_immediate_16(address) << 16) | (m68k_read_immediate_16(address+2))\n+\n+\n+static uint8 paprium_obj_ram[0x80000];\n+static uint8 paprium_wave_ram[0x180000];\n+\n+static int paprium_tmss = 1;\n+int fast_dma_hack = 0;\n+\n+static int paprium_music_ptr;\n+static int paprium_wave_ptr;\n+static int paprium_sfx_ptr;\n+static int paprium_tile_ptr;\n+static int paprium_sprite_ptr;\n+\n+\n+typedef struct paprium_voice_t\n+{\n+\tint volume;\n+\tint panning;\n+\tint flags;\n+\tint type;\n+\n+\tint size;\n+\tint ptr;\n+\tint tick;\n+\n+\tint loop;\n+\tint echo;\n+\tint program;\n+\n+\n+\tint count;\n+\n+\tint time;\n+\n+\tint start;\n+\tint num;\n+\n+\tint decay;\n+\tint decay2;\n+\tint release;\n+\tint sustain;\n+\n+\tint duration;\n+\tint velocity;\n+\tint keyon;\n+\tint key_type;\n+\tint pitch;\n+\tint cents;\n+\tint modulation;\n+} paprium_voice_t;\n+\n+\n+struct paprium_t\n+{\n+\tuint8 ram[0x10000];\n+\tuint8 decoder_ram[0x10000];\n+\tuint8 scaler_ram[0x1000];\n+\tuint8 music_ram[0x8000];\n+\tuint8 exps_ram[14*8];\n+\n+\tpaprium_voice_t sfx[8];\n+\tpaprium_voice_t music[26];\n+\n+\tint music_section, audio_tick, music_segment;\n+\n+\tint out_l, out_r;\n+\tint audio_flags, sfx_volume, music_volume;\n+\n+\tint decoder_mode, decoder_ptr, decoder_size;\n+\tint draw_src, draw_dst;\n+\tint obj[0x31];\n+\n+\tint echo_l[48000/4], echo_r[48000/4];\n+\tint echo_ptr, echo_pan;\n+\n+\tint music_track, mp3_ptr, music_tick;\n+} paprium_s;\n+\n+\n+uint8 paprium_volume_table[256] =\n+{\n+    0x00, 0x03, 0x07, 0x0B, 0x0E, 0x12, 0x15, 0x18, 0x1B, 0x1E, 0x21, 0x24, 0x27, 0x29, 0x2C, 0x2F, \n+    0x31, 0x34, 0x36, 0x38, 0x3B, 0x3D, 0x3F, 0x41, 0x44, 0x46, 0x48, 0x4A, 0x4C, 0x4E, 0x50, 0x51, \n+    0x53, 0x55, 0x57, 0x59, 0x5A, 0x5C, 0x5E, 0x5F, 0x61, 0x63, 0x64, 0x66, 0x67, 0x69, 0x6A, 0x6C, \n+    0x6D, 0x6F, 0x70, 0x72, 0x73, 0x74, 0x76, 0x77, 0x78, 0x7A, 0x7B, 0x7C, 0x7E, 0x7F, 0x80, 0x81, \n+    0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, \n+    0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, \n+    0xA4, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xAF, 0xB0, \n+    0xB1, 0xB2, 0xB3, 0xB3, 0xB4, 0xB5, 0xB6, 0xB6, 0xB7, 0xB8, 0xB9, 0xB9, 0xBA, 0xBB, 0xBC, 0xBC, \n+    0xBD, 0xBE, 0xBE, 0xBF, 0xC0, 0xC1, 0xC1, 0xC2, 0xC3, 0xC3, 0xC4, 0xC5, 0xC5, 0xC6, 0xC7, 0xC7, \n+    0xC8, 0xC9, 0xC9, 0xCA, 0xCA, 0xCB, 0xCC, 0xCC, 0xCD, 0xCE, 0xCE, 0xCF, 0xCF, 0xD0, 0xD1, 0xD1, \n+    0xD2, 0xD2, 0xD3, 0xD3, 0xD4, 0xD5, 0xD5, 0xD6, 0xD6, 0xD7, 0xD7, 0xD8, 0xD9, 0xD9, 0xDA, 0xDA, \n+    0xDB, 0xDB, 0xDC, 0xDC, 0xDD, 0xDD, 0xDE, 0xDF, 0xDF, 0xE0, 0xE0, 0xE1, 0xE1, 0xE2, 0xE2, 0xE3, \n+    0xE3, 0xE4, 0xE4, 0xE5, 0xE5, 0xE6, 0xE6, 0xE7, 0xE7, 0xE8, 0xE8, 0xE9, 0xE9, 0xEA, 0xEA, 0xEA, \n+    0xEB, 0xEB, 0xEC, 0xEC, 0xED, 0xED, 0xEE, 0xEE, 0xEF, 0xEF, 0xF0, 0xF0, 0xF0, 0xF1, 0xF1, 0xF2, \n+    0xF2, 0xF3, 0xF3, 0xF4, 0xF4, 0xF4, 0xF5, 0xF5, 0xF6, 0xF6, 0xF7, 0xF7, 0xF7, 0xF8, 0xF8, 0xF9, \n+    0xF9, 0xF9, 0xFA, 0xFA, 0xFB, 0xFB, 0xFC, 0xFC, 0xFC, 0xFD, 0xFD, 0xFE, 0xFE, 0xFE, 0xFF, 0xFF, \n+};\n+\n+\n+static void paprium_load_mp3(int track, int reload)\n+{\n+\tstatic char name[512];\n+\n+\tpaprium_s.music_track = track;\n+\n+#ifdef _WIN32\n+\tsprintf(error_str, \"%s\\\\paprium\\\\\", g_rom_dir);\n+#else\n+\tsprintf(error_str, \"%s/paprium/\", g_rom_dir);\n+#endif\n+\n+\tswitch(track) {\n+\tcase 0x01: sprintf(name, \"%s02 90's Acid Dub Character Select.mp3\", error_str); break;\n+\tcase 0x02: sprintf(name, \"%s08 90's Dance.mp3\", error_str); break;\n+\tcase 0x03: sprintf(name, \"%s42 1988 Commercial.mp3\", error_str); break;\n+\tcase 0x04: sprintf(name, \"%s05 Asian Chill.mp3\", error_str); break;\n+\tcase 0x05: sprintf(name, \"%s31 Bad Dudes vs Paprium.mp3\", error_str); break;\n+\tcase 0x06: sprintf(name, \"%s43 Blade FM.mp3\", error_str); break;\n+\tcase 0x07: sprintf(name, \"%s03 Bone Crusher.mp3\", error_str); break;\n+\tcase 0x0B: sprintf(name, \"%s26 Club Shuffle.mp3\", error_str); break;\n+\tcase 0x0C: sprintf(name, \"%s23 Continue.mp3\", error_str); break;  /* Continue Fast */\n+\tcase 0x0E: sprintf(name, \"%s07 Cool Groove.mp3\", error_str); break;\n+\tcase 0x0F: sprintf(name, \"%s36 Cyberpunk Ninja.mp3\", error_str); break;\n+\tcase 0x10: sprintf(name, \"%s35 Cyberpunk Funk.mp3\", error_str); break;\n+\tcase 0x11: sprintf(name, \"%s30 Cyber Interlude.mp3\", error_str); break;\n+\tcase 0x12: sprintf(name, \"%s21 Cyborg Invasion.mp3\", error_str); break;\n+\tcase 0x13: sprintf(name, \"%s44 Dark Alley.mp3\", error_str); break;\n+\tcase 0x14: sprintf(name, \"%s29 Dark & Power Mad.mp3\", error_str); break;\n+\tcase 0x15: sprintf(name, \"%s24 Intro.mp3\", error_str); break;  /* Dark Bounce */\n+\tcase 0x16: sprintf(name, \"%s27 Dark Rock.mp3\", error_str); break;\n+\tcase 0x17: sprintf(name, \"%s04 Drumbass Boss.mp3\", error_str); break;\n+\tcase 0x18: sprintf(name, \"%s45 Dubstep Groove.mp3\", error_str); break;\n+\tcase 0x19: sprintf(name, \"%s15 Electro Acid Funk.mp3\", error_str); break;\n+\tcase 0x1B: sprintf(name, \"%s28 Evolve.mp3\", error_str); break;\n+\tcase 0x1C: sprintf(name, \"%s33 Funk Enhanced Mix.mp3\", error_str); break;\n+\tcase 0x1D: sprintf(name, \"%s41 Game Over.mp3\", error_str); break;\n+\tcase 0x1E: sprintf(name, \"%s46 Gothic.mp3\", error_str); break;\n+\tcase 0x20: sprintf(name, \"%s13 Hard Rock.mp3\", error_str); break;\n+\tcase 0x21: sprintf(name, \"%s22 Hardcore BP1.mp3\", error_str); break;\n+\tcase 0x22: sprintf(name, \"%s11 Hardcore BP2.mp3\", error_str); break;\n+\tcase 0x23: sprintf(name, \"%s38 Hardcore BP3.mp3\", error_str); break;\n+\tcase 0x24: sprintf(name, \"%s40 Score.mp3\", error_str); break;  /* High Score */\n+\tcase 0x25: sprintf(name, \"%s47 House.mp3\", error_str); break;\n+\tcase 0x26: sprintf(name, \"%s17 Indie Shuffle.mp3\", error_str); break;\n+\tcase 0x27: sprintf(name, \"%s25 Indie Break Beat.mp3\", error_str); break;\n+\tcase 0x28: sprintf(name, \"%s16 Jazzy Shuffle.mp3\", error_str); break;\n+\tcase 0x2A: sprintf(name, \"%s19 Neo Metal.mp3\", error_str); break;\n+\tcase 0x2B: sprintf(name, \"%s14 Neon Rider.mp3\", error_str); break;\n+\tcase 0x2E: sprintf(name, \"%s09 Retro Beat.mp3\", error_str); break;\n+\tcase 0x2F: sprintf(name, \"%s20 Sadness.mp3\", error_str); break;\n+\tcase 0x31: sprintf(name, \"%s18 Slow Asian Beat.mp3\", error_str); break;\n+\tcase 0x32: sprintf(name, \"%s48 Slow Mood.mp3\", error_str); break;  /* Slow Mood Ext. ? */\n+\tcase 0x33: sprintf(name, \"%s49 Smooth Coords.mp3\", error_str); break;\n+\tcase 0x34: sprintf(name, \"%s10 Spiral.mp3\", error_str); break;\n+\tcase 0x35: sprintf(name, \"%s12 Stage Clear.mp3\", error_str); break;\n+\tcase 0x36: sprintf(name, \"%s32 Summer Breeze.mp3\", error_str); break;\n+\tcase 0x37: sprintf(name, \"%s06 Techno Beats.mp3\", error_str); break;\n+\tcase 0x38: sprintf(name, \"%s50 Tension.mp3\", error_str); break;\n+\tcase 0x39: sprintf(name, \"%s01 Theme of Paprium.mp3\", error_str); break;\n+\tcase 0x3A: sprintf(name, \"%s39 Ending.mp3\", error_str); break;  /* Tough Guy */\n+\tcase 0x3B: sprintf(name, \"%s34 Transe.mp3\", error_str); break;\n+\tcase 0x3C: sprintf(name, \"%s37 Urban.mp3\", error_str); break;\n+\tcase 0x3D: sprintf(name, \"%s51 Water.mp3\", error_str); break;\n+\tcase 0x3E: sprintf(name, \"%s52 Waterfront Beat.mp3\", error_str); break;\n+\tdefault: paprium_s.music_track = 0; return;\n+\t}\n+\n+\tif( reload )\n+\t\tpaprium_s.mp3_ptr = 0;\n+\n+\tpaprium_s.music_tick = 0;\n+\n+\tif( track != PAPRIUM_BOSS1 && track != PAPRIUM_BOSS2 && track != PAPRIUM_BOSS3 && track != PAPRIUM_BOSS4 ) {\n+\t\tif( mp3dec_load(&paprium_mp3d, name, &paprium_mp3d_info, NULL, NULL) ) {\n+\t\t\tpaprium_s.music_track = 0;\n+\t\t\treturn;\n+\t\t}\n+\t}\n+}\n+\n+\n+static void paprium_load_mp3_boss()\n+{\n+\tstatic char name[512];\n+\n+#ifdef _WIN32\n+\tsprintf(error_str, \"%s\\\\paprium\\\\\", g_rom_dir);\n+#else\n+\tsprintf(error_str, \"%s/paprium/\", g_rom_dir);\n+#endif\n+\n+\tsprintf(name, \"%s04 Drumbass Boss.mp3\", error_str);\n+\tmp3dec_load(&paprium_mp3d_boss1, name, &paprium_mp3d_info_boss1, NULL, NULL);\n+\n+\tsprintf(name, \"%s22 Hardcore BP1.mp3\", error_str);\n+\tmp3dec_load(&paprium_mp3d_boss2, name, &paprium_mp3d_info_boss2, NULL, NULL);\n+\n+\tsprintf(name, \"%s11 Hardcore BP2.mp3\", error_str);\n+\tmp3dec_load(&paprium_mp3d_boss3, name, &paprium_mp3d_info_boss3, NULL, NULL);\n+\n+\tsprintf(name, \"%s38 Hardcore BP3.mp3\", error_str);\n+\tmp3dec_load(&paprium_mp3d_boss4, name, &paprium_mp3d_info_boss4, NULL, NULL);\n+}\n+\n+\n+static void paprium_music_sheet()\n+{\n+\tint ch;\n+\tint l = 0, r = 0;\n+\n+\t/* 00-04 = WMMM */\n+\t/* 05, 06, 07 */\n+\tint sections = paprium_s.music_ram[0x09];\n+\t/* 09 */\n+\tint bars = (paprium_s.music_ram[0x0B] ? paprium_s.music_ram[0x0B] : 0x100) + 8;\n+\t/* 0B */\n+\tint cmds = paprium_s.music_ram[0x0D];\n+\t/* 10-29 */\n+\t/* 2A-43 */\n+\t/* 44-5D */\n+\t/* 5E-77 */\n+\t/* 78-97 = title ^ 0xA5 */\n+\t/* 98-B7 = author ^ 0xA5 */\n+\t/* B8-D7 = comment ^ 0xA5 */\n+\n+\n+\tif( paprium_s.music_segment == -1 ) {\n+\t\tpaprium_s.music_track = 0;\n+\t\treturn;\n+\t}\n+\n+\tif( paprium_s.audio_tick < 4 )\n+\t\treturn;\n+\tpaprium_s.audio_tick = 0;\n+\n+\n+#if 0\n+\tsprintf(error_str, \"Music_Sheet %X %X - %X %X\\n\", paprium_s.music_segment, paprium_s.music_section, sections, bars);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\tfor( ch = 0; ch < 26; ch++ ) {\n+\t\tint ptr = *(uint16*)(paprium_s.music_ram + 0xD8 + (ch*sections*2) + (paprium_s.music_segment*2));\n+\t\tint index = paprium_s.music_ram[(ptr + paprium_s.music_section)^1];\n+\t\tint code = 0, arg = 0;\n+\t\tint keyon = 0, duration = 0, freq = -1, volume = 0;\n+\t\tpaprium_voice_t *voice = paprium_s.music + ch;\n+\n+\n+#if 0\n+//if(ch == 0) {\n+{\n+\tsprintf(error_str, \"[%d] Music %X %X %X = %X\\n\", ch, ptr, ptr + paprium_s.music_section, index, (index == 0) ? 0 : ptr + bars + ((index-1)*8) + paprium_s.music_section*2);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+}\n+#endif\n+\n+\n+\t\tif( index == 0 )\n+\t\t\tgoto next;\n+\t\tptr += bars + (index-1) * 8;\n+\n+\n+\t\tfor( int lcv = 0; lcv < cmds; lcv++ ) {\n+\t\t\tcode = *(uint16*)(paprium_s.music_ram + ptr + lcv*2);\n+\t\t\targ = code & 0xFF;\n+\t\t\tcode >>= 8;\n+\n+\n+\t\t\tif( code == 0x00 )\n+\t\t\t\t{} //break;\n+\n+\t\t\telse if( code == 0x01 ) {  /* ?? */\n+\t\t\t\tif( ch >= 11-1 ) keyon = code;\n+\t\t\t\tvoice->volume = 255 - paprium_volume_table[arg];  /* z80 table ? */\n+\t\t\t}\n+\n+\t\t\telse if( code == 0x02 )\n+\t\t\t\tvoice->panning = arg;\n+\n+\t\t\telse if( code == 0x03 ) {\n+\t\t\t\tvoice->volume = 255 - paprium_volume_table[arg];  /* z80 table ? */\n+\t\t\t}\n+\n+\t\t\telse if( code == 0x05 ) {\n+\t\t\t\tvoice->volume = 255 - paprium_volume_table[arg];  /* z80 table ? */\n+\t\t\t}\n+\n+\t\t\t/* velocity */\n+\n+\t\t\telse if( code == 0x08 ) {\n+#if 0\n+\t\t\t\tsprintf(error_str, \"08 - %X %X %X\\n\", ch, ptr, arg);\n+\t\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t\t\t//MessageBoxA(0, error_str, \"---\", 0);\n+#endif\n+\n+\t\t\t\tfreq = arg;\n+\t\t\t}\n+\n+\t\t\telse if( code == 0x0A ) {\n+#if 0\n+\t\t\t\tsprintf(error_str, \"0B - %X %X %X\\n\", ch, ptr, arg);\n+\t\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t\t\t//MessageBoxA(0, error_str, \"---\", 0);\n+#endif\t\t\t\n+\t\t\t\tfreq = 0;  /* faster ? */\n+\t\t\t}\n+\n+\t\t\telse if( code == 0x0B ) {\n+#if 0\n+\t\t\t\tsprintf(error_str, \"0B - %X %X %X\\n\", ch, ptr, arg);\n+\t\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\t\t\t\t//MessageBoxA(0, error_str, \"---\", 0);\n+\t\t\t}\n+\n+\t\t\telse if( code == 0x0C ) {\n+#if 0\n+\t\t\t\tsprintf(error_str, \"0C - %X %X %X\\n\", ch, ptr, arg);\n+\t\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\t\t\t\t//MessageBoxA(0, error_str, \"---\", 0);\n+\t\t\t}\n+\n+\t\t\telse if( code == 0x0E ) {  /* stop ? */\n+\t\t\t\tkeyon = 0;\n+\t\t\t\tvoice->size = 0;\n+\t\t\t}\n+\n+\t\t\telse if( code == 0x0F ) {  /* program */\n+\t\t\t\tvoice->program = arg;\n+\n+\t\t\t\tif( ch < 6 ) {  /* YM */\n+\t\t\t\t}\n+\n+\t\t\t\telse if( ch < 10 ) {  /* PSG */\n+\t\t\t\t}\n+\n+\t\t\t\telse\n+\t\t\t\t{  /* wave */\n+\t\t\t\t}\n+\n+#if DEBUG_MODE\n+\t\t\t\tsprintf(error_str, \"[%d] Sample %X %X\\n\", ch, arg, ptr);\n+\t\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\t\t\t}\n+\t\t}\n+\n+\n+\t\tif( keyon ) {\n+#if 0\n+\t\t\tuint8* ptr = paprium_wave_ram + voice->program*16;\n+\n+\t\t\tvoice->ptr = (*(uint16*)(ptr + 0x00)<<16) + *(uint16*)(ptr + 0x02);\n+\t\t\tvoice->size = (*(uint16*)((paprium_wave_ram + 0x04 + voice->program*16))<<16) + *(uint16*)(paprium_wave_ram + 0x06 + voice->program*16);\n+\t\t\t/* *(uint16*)(paprium_wave_ram + 0x08 + voice->program*16)<<16) + *(uint16*)(paprium_wave_ram + 0x0A + voice->program*16); */\n+\t\t\tvoice->type = *(uint16*)(paprium_wave_ram + 0x0C + voice->program*16) + 1;\n+\t\t\t/* *(uint16*)(paprium_wave_ram + 0x0E + voice->program*16); */\t\t\t\n+\n+\t\t\tvoice->tick = 0;\n+\t\t\tvoice->time = 0;\n+\n+\t\t\tvoice->keyon = keyon;\n+\t\t\tvoice->duration = 65536;\n+\t\t\tvoice->release = 256;\n+#endif\n+\t\t}\n+\n+\t\tif( freq >= 0 ) {\n+\t\t\tvoice->type = freq;\n+\t\t\t//if(ch == 16-1) MessageBoxA(0,\"hit\",\"-\",0);\n+\t\t}\n+\n+next:\n+\t\t*(uint16*)(paprium_s.ram + ch*4 + 0x1B98) = index ? 0xE0 : 0;  /* L */\n+\t\t*(uint16*)(paprium_s.ram + ch*4 + 0x1B9A) = index ? 0xE0 : 0;  /* R */\n+\t}\n+\n+\n+end:\n+\tif( (++paprium_s.music_section) >= bars ) {\n+\t\tpaprium_s.music_section = 0;\n+\n+\t\tif( (++paprium_s.music_segment) >= sections )\n+\t\t\tpaprium_s.music_segment = 0;\n+\t}\n+}\n+\n+\n+static void paprium_music_synth(int *out_l, int *out_r)\n+{\n+\tint ch;\n+\tint l = 0, r = 0;\n+\n+\n+#if 1\n+\tif( paprium_s.music_track ) {\n+\t\tif( paprium_s.music_track == PAPRIUM_BOSS1 ) {\n+\t\t\tl = paprium_mp3d_info_boss1.buffer[paprium_s.mp3_ptr];\n+\t\t\tr = paprium_mp3d_info_boss1.buffer[paprium_s.mp3_ptr];\n+\t\t}\n+\t\telse if( paprium_s.music_track == PAPRIUM_BOSS2 ) {\n+\t\t\tl = paprium_mp3d_info_boss2.buffer[paprium_s.mp3_ptr];\n+\t\t\tr = paprium_mp3d_info_boss2.buffer[paprium_s.mp3_ptr];\n+\t\t}\n+\t\telse if( paprium_s.music_track == PAPRIUM_BOSS3 ) {\n+\t\t\tl = paprium_mp3d_info_boss3.buffer[paprium_s.mp3_ptr];\n+\t\t\tr = paprium_mp3d_info_boss3.buffer[paprium_s.mp3_ptr];\n+\t\t}\n+\t\telse if( paprium_s.music_track == PAPRIUM_BOSS4 ) {\n+\t\t\tl = paprium_mp3d_info_boss4.buffer[paprium_s.mp3_ptr];\n+\t\t\tr = paprium_mp3d_info_boss4.buffer[paprium_s.mp3_ptr];\n+\t\t}\n+\t\telse {\n+\t\t\tl = paprium_mp3d_info.buffer[paprium_s.mp3_ptr];\n+\t\t\tr = paprium_mp3d_info.buffer[paprium_s.mp3_ptr];\n+\t\t}\n+\n+\n+\t\tl = (l * paprium_s.music_volume) / 256;\n+\t\tr = (r * paprium_s.music_volume) / 256;\n+\n+\n+\t\tpaprium_s.music_tick += 0x10000;\n+\t\tif( paprium_s.music_tick >= 0x10000 ) {\n+\t\t\tpaprium_s.music_tick -= 0x10000;\n+\n+\t\t\tpaprium_s.mp3_ptr += 2;\n+\t\t}\n+\n+\n+\t\tif( paprium_s.music_track == PAPRIUM_BOSS1 ) {\n+\t\t\tif( paprium_s.mp3_ptr >= paprium_mp3d_info_boss1.samples)\n+\t\t\t\tpaprium_s.mp3_ptr -= paprium_mp3d_info_boss1.samples;\n+\t\t}\n+\t\telse if( paprium_s.music_track == PAPRIUM_BOSS2 ) {\n+\t\t\tif( paprium_s.mp3_ptr >= paprium_mp3d_info_boss2.samples)\n+\t\t\t\tpaprium_s.mp3_ptr -= paprium_mp3d_info_boss2.samples;\n+\t\t}\n+\t\telse if( paprium_s.music_track == PAPRIUM_BOSS3 ) {\n+\t\t\tif( paprium_s.mp3_ptr >= paprium_mp3d_info_boss3.samples)\n+\t\t\t\tpaprium_s.mp3_ptr -= paprium_mp3d_info_boss3.samples;\n+\t\t}\n+\t\telse if( paprium_s.music_track == PAPRIUM_BOSS4 ) {\n+\t\t\tif( paprium_s.mp3_ptr >= paprium_mp3d_info_boss4.samples)\n+\t\t\t\tpaprium_s.mp3_ptr -= paprium_mp3d_info_boss4.samples;\n+\t\t}\n+\t\telse {\n+\t\t\tif( paprium_s.mp3_ptr >= paprium_mp3d_info.samples)\n+\t\t\t\tpaprium_s.mp3_ptr -= paprium_mp3d_info.samples;\n+\t\t}\n+\t}\n+\n+\t*out_l = l;\n+\t*out_r = r;\n+\n+\treturn;\n+#endif\n+\n+\n+\tfor( ch = 0; ch < 26; ch++ ) {\n+\t\tpaprium_voice_t *voice = paprium_s.music + ch;\n+\t\tconst int _rates[] = {2,4,5,8,9,10};  /* 24000 ?, 12000, 9600, 6000, 5333-?, 4800-? */\n+\n+\t\tint rate = _rates[voice->type] << 16;  /* 16.16 */\n+\t\tint vol = voice->volume;\n+\t\tint pan = voice->panning;\n+\n+\t\tint sample, sample_l, sample_r;\n+\n+\n+\t\t//if( ch < 15-1 || ch > 17-1 ) goto next;\n+\n+#if 0\n+\t\tif( ch == 20 ) {\n+\t\t\tsprintf(error_str, \"[%d] %X %X\\n\", ch, voice->ptr, voice->size);\n+\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t}\n+\t\telse\n+\t\t\tgoto next;\n+#endif\n+\n+\n+\t\tif( ((paprium_s.audio_tick % 4) == 0) && voice->duration) {\n+\t\t\t//voice->duration--;\n+\t\t\tif( voice->duration == 0 ) {\n+\t\t\t\tif( voice->keyon == 1 )  /* hard off */\n+\t\t\t\t\tvoice->size = 0;\n+\t\t\t}\n+\t\t}\n+\n+\n+\t\tif( voice->size == 0 ) goto next;\n+\n+\n+\t\tsample = *(uint8 *)(paprium_wave_ram + (voice->ptr^1));\n+\n+\t\tsample = (((sample & 0xFF) * 65536) / 256) - 32768;\n+\t\tsample = (sample * vol) / 0x300;\n+\n+\t\tsample_l = (sample * ((pan <= 0x80) ? 0x80 : 0x100 - pan)) / 0x80;\n+\t\tsample_r = (sample * ((pan >= 0x80) ? 0x80 : pan)) / 0x80;\n+\n+\t\tl += sample_l;\n+\t\tr += sample_r;\n+\n+\n+\t\tvoice->time++;\n+\t\tvoice->tick += 0x10000;\n+\n+\n+\t\tif( voice->tick >= rate ) {\n+\t\t\tvoice->tick -= rate;\n+\n+\t\t\tvoice->size--;\n+\t\t\tvoice->ptr++;\n+\t\t}\n+\n+\n+next:\n+\t}\n+\n+\n+\t*out_l += l;\n+\t*out_r += r;\n+}\n+\n+\n+static void paprium_sfx_voice(int *out_l, int *out_r)\n+{\n+\tint ch;\n+\tint l = 0, r = 0;\n+\n+\tfor( ch = 0; ch < 8; ch++ ) {\n+\t\tpaprium_voice_t *voice = paprium_s.sfx + ch;\n+\t\tconst int _rates[] = {1,2,4,5,8,9};  /* 48000, 24000, 12000, 9600, 6000, 5333 */\n+\n+\t\tint rate = _rates[voice->type >> 4] << 16;  /* 16.16 */\n+\t\tint depth = voice->type & 0x03;\n+\t\t/* voice->type & 0xC0; */\n+\n+\t\tint vol = voice->volume;\n+\t\tint pan = voice->panning;\n+\n+\t\tint sample, sample_l, sample_r;\n+\n+\n+\t\tif( voice->size == 0 ) goto next;\n+\n+\n+\t\tsample = *(uint8 *)(cart.rom + paprium_sfx_ptr + (voice->ptr^1));\n+\n+\t\tif( depth == 1 )\n+\t\t\tsample = (((sample & 0xFF) * 65536) / 256) - 32768;\n+\n+\t\telse if( depth == 2 ) {\n+\t\t\tif( voice->count == 0 )\n+\t\t\t\tsample >>= 4;\n+\n+\t\t\tsample = (((sample & 0x0F) * 65536) / 16) - 32768;\n+\t\t}\n+\n+\n+\t\tsample = (sample * vol) / 0x400;\n+\n+\t\tsample_l = (sample * ((pan <= 0x80) ? 0x80 : 0x100 - pan)) / 0x80;\n+\t\tsample_r = (sample * ((pan >= 0x80) ? 0x80 : pan)) / 0x80;\n+\n+\t\tl += sample_l;\n+\t\tr += sample_r;\n+\n+\n+\t\tif( voice->flags & 0x4000 ) {  /* echo */\n+\t\t\tif( voice->echo & 1 )\n+\t\t\t\tpaprium_s.echo_l[paprium_s.echo_ptr % (48000/6)] += (sample_l * 33) / 100;\n+\t\t\telse\n+\t\t\t\tpaprium_s.echo_r[paprium_s.echo_ptr % (48000/6)] += (sample_r * 33) / 100;\n+\t\t}\n+\n+\n+\t\tif( voice->flags & 0x100 ) {  /* amplify */\n+\t\t\tl = (l * 125) / 100;\n+\t\t\tr = (r * 125) / 100;\n+\t\t}\n+\n+\t\tvoice->time++;\n+\n+\t\tvoice->tick += 0x10000;\n+\t\tvoice->tick -= (voice->flags & 0x8000) ? 0x800 : 0;  /* tiny pitch */\n+\t\tvoice->tick -= (voice->flags & 0x2000) ? 0x8000 : 0;  /* huge pitch */\n+\n+\n+\t\tif( voice->tick >= rate ) {\n+\t\t\tvoice->tick -= rate;\n+\n+\t\t\tvoice->count++;\n+\t\t\tvoice->size--;\n+\n+\t\t\tif( voice->count >= depth ) {\n+\t\t\t\tvoice->ptr++;\n+\n+\t\t\t\tvoice->count = 0;\n+\t\t\t}\n+\t\t}\n+ \n+\n+next:\n+\t\tif( voice->size == 0 ) {\n+\t\t\tvoice->count = 0;\n+\n+\t\t\tif( voice->loop ) {\n+\t\t\t\tuint8 *sfx = paprium_sfx_ptr + cart.rom;\n+\n+\t\t\t\tvoice->ptr = (*(uint16 *)(sfx + voice->num*8) << 16) | (*(uint16 *)(sfx + voice->num*8 + 2));\n+\t\t\t\tvoice->size = (*(uint8 *)(sfx + voice->num*8 + 4) << 16) | (*(uint16 *)(sfx + voice->num*8 + 6));\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\t*out_l += l;\n+\t*out_r += r;\n+}\n+\n+\n+void paprium_audio(int cycles)\n+{\n+\tint lcv;\n+\tint samples = blip_clocks_needed(snd.blips[3], cycles);\n+\n+\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"Audio frame %X - %X\\n\", samples, cycles);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\tif( paprium_s.music_track != paprium_track_last ) {\n+\t\tpaprium_load_mp3(paprium_s.music_track, 0);\n+\t}\n+\n+\n+\tpaprium_s.audio_tick++;\n+\n+\n+\tfor( lcv = 0; lcv < samples; lcv++ ) {\n+\t\tint l = 0, r = 0;\n+\t\tint ch;\n+\n+\n+\t\tpaprium_s.echo_l[paprium_s.echo_ptr] = 0;\n+\t\tpaprium_s.echo_r[paprium_s.echo_ptr] = 0;\n+\n+\n+\t\tpaprium_music_synth(&l, &r);\n+\t\tpaprium_sfx_voice(&l, &r);\n+\n+\n+\t\tpaprium_s.echo_ptr = (paprium_s.echo_ptr+1) % (48000/6);\n+\n+\t\tl += paprium_s.echo_l[paprium_s.echo_ptr];\n+\t\tr += paprium_s.echo_r[paprium_s.echo_ptr];\n+\n+\n+\t\tl = (l * paprium_s.sfx_volume) / 0x100;\n+\t\tr = (r * paprium_s.sfx_volume) / 0x100;\n+\n+\n+\t\tif( paprium_s.audio_flags & 0x08 ) {  /* gain */\n+\t\t\tl = l * 4 / 2;\n+\t\t\tr = r * 4 / 2;\n+\t\t}\n+\n+\n+\t\tif( l > 32767 ) l = 32767;\n+\t\telse if( l < -32768 ) l = -32768;\n+\n+\t\tif( r > 32767 ) r = 32767;\n+\t\telse if( r < -32768 ) r = -32768;\n+\n+\n+\t\tblip_add_delta_fast(snd.blips[3], lcv, l-paprium_s.out_l, r-paprium_s.out_r);\n+\n+\n+\t\tpaprium_s.out_l = l;\n+\t\tpaprium_s.out_r = r;\n+\t}\n+\n+\n+\tpaprium_music_sheet();\n+\n+\n+#if DEBUG_MODE\n+\tfor( lcv = 0; lcv < 8; lcv++ ) {\n+\t\tif( !paprium_s.sfx[lcv].decay ) continue;\n+\n+\tsprintf(error_str, \"[%d] %d %d %d - %d %d\\n\", lcv, paprium_s.sfx[lcv].loop, paprium_s.sfx[lcv].volume, paprium_s.sfx[lcv].size, paprium_s.sfx[lcv].decay, paprium_s.sfx[lcv].decay2);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\n+\t\tpaprium_s.sfx[lcv].decay2 += paprium_s.sfx[lcv].decay;\n+\t\twhile( paprium_s.sfx[lcv].decay2 >= 2 ) {  /* stage1 intro sound fade-out time ?? 2 seems decent */\n+\t\t\tpaprium_s.sfx[lcv].volume -= 1;\n+\t\t\tif( paprium_s.sfx[lcv].volume < 0 ) paprium_s.sfx[lcv].volume = 0;\n+\n+\t\t\tpaprium_s.sfx[lcv].decay2 -= 2;\n+\t\t}\n+\t}\n+#endif\n+\n+\n+\tblip_end_frame(snd.blips[3], samples);\n+\n+\n+\tpaprium_track_last = paprium_s.music_track;\n+}\n+\n+\n+static void paprium_decoder_lz_rle(uint src, uint8 *dst)\n+{\n+\tint size = 0;\n+\tint len, lz, rle, code;\n+\n+\n+#if 0\n+\tsprintf(error_str, \"LZ-RLE %X\\n\", src);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\twhile(1) {\n+\t\tint type = cart.rom[(src++)^1];\n+\n+\t\tcode = type >> 6;\n+\t\tlen = type & 0x3F;\n+\n+\n+\t\tif( (code == 0) && (len == 0))\n+\t\t\tbreak;\n+\n+\t\telse if( code == 1 )\n+\t\t\trle = cart.rom[(src++)^1];\n+\n+\t\telse if( code == 2 )\n+\t\t\tlz = size - cart.rom[(src++)^1];\n+\n+\n+\t\twhile( len-- > 0 ) {\n+\t\t\tswitch(code) {\n+\t\t\tcase 0: dst[(size++)^1] = cart.rom[(src++)^1]; break;\n+\t\t\tcase 1: dst[(size++)^1] = rle; break;\n+\t\t\tcase 2: dst[(size++)^1] = dst[(lz++)^1]; break;\n+\t\t\tcase 3: dst[(size++)^1] = 0; break;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+#if 0\n+\tsprintf(error_str, \"STOP %X - %X\\n\", src, size);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\tpaprium_s.decoder_size = size;\n+}\n+\n+\n+static void paprium_decoder_lzo(uint src, uint8 *dst)\n+{\n+\tint size = 0;\n+\tint len, lz, raw;\n+\tint state = 0;\n+\n+\n+#if 0\n+\tsprintf(error_str, \"LZO %X\\n\", src);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\twhile(1) {\n+\t\tint code = cart.rom[(src++)^1];\n+\n+\t\tif( code & 0x80 ) goto code_80;\n+\t\tif( code & 0x40 ) goto code_40;\n+\t\tif( code & 0x20 ) goto code_20;\n+\t\tif( code & 0x10 ) goto code_10;\n+\n+\n+code_00:\n+\t\tif( state == 0 ) {\n+\t\t\traw = code & 0x0F;\n+\n+\t\t\tif( raw == 0 ) {\n+\t\t\t\tint extra = 0;\n+\n+\t\t\t\twhile(1) {\n+\t\t\t\t\traw = cart.rom[(src++)^1];\n+\t\t\t\t\tif( raw ) break;\n+\n+\t\t\t\t\textra += 255;\n+\t\t\t\t}\n+\n+\t\t\t\traw += extra;\n+\t\t\t\traw += 15;\n+\t\t\t}\n+\t\t\traw += 3;\n+\n+\t\t\tlen = 0;\n+\t\t\tstate = 4;\n+\t\t\tgoto copy_loop;\n+\t\t}\n+\n+\t\telse if( state < 4 ) {\n+\t\t\traw = code & 0x03;\n+\t\t\tlz = (code >> 2) & 0x03;\n+\n+\t\t\tlz += cart.rom[(src++)^1] << 2;\n+\t\t\tlz += 1;\n+\n+\t\t\tlen = 2;\n+\t\t\tgoto copy_loop;\n+\t\t}\n+\n+\t\telse {\n+\t\t\traw = code & 0x03;\n+\t\t\tlz = (code >> 2) & 0x03;\n+\n+\t\t\tlz += cart.rom[(src++)^1] << 2;\n+\t\t\tlz += 2049;\n+\n+\t\t\tlen = 3;\n+\t\t\tgoto copy_loop;\n+\t\t}\n+\n+\n+code_10:\n+\t\tlen = code & 0x07;\n+\n+\t\tif( len == 0 ) {\n+\t\t\tint extra = 0;\n+\n+\t\t\twhile(1) {\n+\t\t\t\tlen = cart.rom[(src++)^1];\n+\t\t\t\tif( len ) break;\n+\n+\t\t\t\textra += 255;\n+\t\t\t}\n+\n+\t\t\tlen += extra;\n+\t\t\tlen += 7;\n+\t\t}\n+\t\tlen += 2;\n+\n+\n+\t\tlz = ((code >> 3) & 1) << 14;\n+\n+\t\tcode = cart.rom[(src++)^1];\n+\t\traw = code & 0x03;\n+\t\tlz += code >> 2;\n+\n+\t\tlz += cart.rom[(src++)^1] << 6;\n+\t\tlz += 16384;\n+\n+\t\tif( lz == 16384 ) break;\n+\t\tgoto copy_loop;\n+\n+\n+code_20:\n+\t\tlen = code & 0x1F;\n+\n+\t\tif( len == 0 ) {\n+\t\t\tint extra = 0;\n+\n+\t\t\twhile(1) {\n+\t\t\t\tlen = cart.rom[(src++)^1];\n+\t\t\t\tif( len ) break;\n+\n+\t\t\t\textra += 255;\n+\t\t\t}\n+\n+\t\t\tlen += extra;\n+\t\t\tlen += 31;\n+\t\t}\n+\t\tlen += 2;\n+\n+\n+\t\tcode = cart.rom[(src++)^1];\n+\t\traw = code & 0x03;\n+\n+\t\tlz = code >> 2;\n+\t\tlz += cart.rom[(src++)^1] << 6;\n+\t\tlz += 1;\n+\n+\t\tgoto copy_loop;\n+\n+\n+code_40:\n+\t\traw = code & 0x03;\n+\t\tlen = ((code >> 5) & 1) + 3;\n+\t\tlz = (code >> 2) & 0x07;\n+\n+\t\tlz += cart.rom[(src++)^1] << 3;\n+\t\tlz += 1;\n+\n+\t\tgoto copy_loop;\n+\n+\n+code_80:\n+\t\traw = code & 0x03;\n+\t\tlen = ((code >> 5) & 0x03) + 5;\n+\t\tlz = (code >> 2) & 0x07;\n+\n+\t\tlz += cart.rom[(src++)^1] << 3;\n+\t\tlz += 1;\n+\n+\n+copy_loop:\n+\t\tif( len > 0 )\n+\t\t\tstate = raw;\n+\t\telse\n+\t\t\tstate = 4;\n+\n+\t\t\n+\t\tlz = size - lz;\n+\n+\t\twhile(1) {\n+\t\t\tif( len > 0 ) {\n+\t\t\t\tdst[(size++)^1] = dst[(lz++)^1];\n+\t\t\t\tlen--;\n+\t\t\t}\n+\n+\t\t\telse if( raw > 0 ) {\n+\t\t\t\tdst[(size++)^1] = cart.rom[(src++)^1];\n+\t\t\t\traw--;\n+\t\t\t}\n+\n+\t\t\telse\n+\t\t\t\tbreak;\n+\t\t}\t\t\n+\t}\n+\n+\n+#if 0\n+\tsprintf(error_str, \"END %X - %X\\n\", src, size);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\tpaprium_s.decoder_size = size;\n+}\n+\n+\n+static void paprium_decoder_type(int src, uint8 *dst)\n+{\n+\tint type = cart.rom[(src++)^1];\n+\n+\tif( type == 0x80 )\n+\t\tpaprium_decoder_lz_rle(src, dst);\n+\n+\telse if( type == 0x81 )\n+\t\tpaprium_decoder_lzo(src, dst);\n+\n+\telse {\n+#if DEBUG_MODE\n+\t\tsprintf(error_str, \"%X - Decoder_Type %X\\n\", src-1, type);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"paprium_decoder_init\", 0);\n+#endif\n+\t}\n+}\n+\n+\n+static int paprium_decoder(int mode)\n+{\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Decoder %02X -- %04X %04X %04X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\tmode, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\tint offset = *(uint16 *)(paprium_s.ram + 0x1E10);\n+\tint ptr = (*(uint16 *)(paprium_s.ram + 0x1E12) << 16) + *(uint16 *)(paprium_s.ram + 0x1E14);\n+\n+\n+#if DEBUG_MODE\n+\tif( mode != 2 && mode != 7 ) {\n+\t\tsprintf(error_str, \"Mode %X\", mode);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"Decoder_Init\", 0);\n+\t}\n+#endif\n+\n+\n+\tpaprium_decoder_type(ptr, paprium_s.decoder_ram + offset);\n+\n+\n+\tpaprium_s.decoder_mode = mode;\n+\tpaprium_s.decoder_ptr = offset;\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_cmd_count != 3 ) {\n+\t\tsprintf(error_str, \"Decoder %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static int paprium_decoder_copy(int arg)\n+{\n+\t/* *(uint16 *)(paprium_s.ram + 0x1E10); */\n+\tint offset = *(uint16 *)(paprium_s.ram + 0x1E12);\n+\tint size = *(uint16 *)(paprium_s.ram + 0x1E14);\n+\n+\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Decoder_Copy %02X [%X] -- %04X %04X %04X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\targ, paprium_s.decoder_ptr,\n+\t\t*(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+#if DEBUG_MODE\n+\tif( *(uint16 *)(paprium_s.ram + 0x1E10) ) {\n+\t\tsprintf(error_str, \"paprium_decoder 1E10 = %X\", *(uint16 *)(paprium_s.ram + 0x1E10));\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0,error_str,\"decoder\",0);\n+\t}\n+#endif\n+\n+\n+\tpaprium_s.decoder_ptr = offset;\n+\tpaprium_s.decoder_size = size;\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_cmd_count != 3 ) {\n+\t\tsprintf(error_str, \"Decoder_Copy %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_sprite(int index)\n+{\n+\tint lcv, spr_x, spr_y, count;\n+\tint spritePtr, gfxPtr;\n+\n+\tint dmaSize = 0;\n+\tint dmaPtr = *(uint16*) (paprium_s.ram + 0x1F16);\n+\n+\tint spriteCount = *(uint16*) (paprium_s.ram + 0x1F18);\n+\n+\tint anim = *(uint16*) (paprium_s.ram + 0xF80 + index*16);\n+\tint nextAnim = *(uint16*) (paprium_s.ram + 0xF82 + index*16);\n+\tint obj = *(uint16*) (paprium_s.ram + 0xF84 + index*16) & 0x7FFF;\n+\t//*(uint16*) (paprium_s.ram + 0xF86 + index*16);\n+\tint objAttr = *(uint16*) (paprium_s.ram + 0xF88 + index*16);\n+\tint reset = *(uint16*) (paprium_s.ram + 0xF8A + index*16);\n+\tint pos_x = *(uint16*) (paprium_s.ram + 0xF8C + index*16);\n+\tint pos_y = *(uint16*) (paprium_s.ram + 0xF8E + index*16);\n+\n+\tint src = paprium_s.draw_src;\n+\tint vram = paprium_s.draw_dst;\n+\tint flip_h = objAttr & 0x800;\n+\tint animFlags;\n+\n+\n+\tint animPtr = *(uint32*) (paprium_obj_ram + (obj+1)*4);\n+\tint framePtr = paprium_s.obj[index];\n+\n+\n+\tif( index != 0x30 ) {\n+\t\t//return;\n+\t}\n+\n+\n+#if DEBUG_MODE  /* frozen enemy */\n+\t{\n+\t\tint color = -1;\n+\t\tint pri = -1;\n+\n+\t\tif(0) {}\n+\t\telse if( (obj > 0x00 && obj < 0x30) && (anim == 5) ) color = 0;\n+\t\telse if( (obj == 0x0D) && (anim == 3) ) color = 0;\n+\n+\t\tif( color != -1 ) {\n+\t\t\tobjAttr &= ~0x6000;\n+\n+\t\t\tswitch(color) {\n+\t\t\tcase 0: break;\n+\t\t\tcase 1: objAttr += 0x2000; break;\n+\t\t\tcase 2: objAttr += 0x4000; break;\n+\t\t\tcase 3: objAttr += 0x6000; break;\n+\t\t\t}\n+\t\t}\n+\n+\t\tif( pri != -1 ) {\n+\t\t\tobjAttr &= ~0x8000;\n+\n+\t\t\tswitch(pri) {\n+\t\t\tcase 0: break;\n+\t\t\tcase 1: objAttr += 0x8000; break;\n+\t\t\t}\n+\t\t}\n+\t}\n+#endif\n+\n+\n+#if DEBUG_SPRITE\n+\tuint8 *ptr = paprium_s.ram + 0xF80 + index*16;\n+\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Sprite %02X - %04X %04X %04X %04X %04X %04X X=%04X Y=%04X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\tindex,\n+\t\t*(uint16 *)(ptr+0), *(uint16 *)(ptr+2), *(uint16 *)(ptr+4), *(uint16 *)(ptr+6),\n+\t\t*(uint16 *)(ptr+8), *(uint16 *)(ptr+10), *(uint16 *)(ptr+12), *(uint16 *)(ptr+14) );\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+reload:\n+\tif( reset == 1 ) {\n+\t\tframePtr = *(uint32*) (paprium_obj_ram + animPtr + anim*4);\n+\n+\t\t*(uint16*) (paprium_s.ram + 0xF8A + index*16) = 0;\n+\t}\n+\tif( (framePtr == 0) || (framePtr == -1) ) {\n+\t\t*(uint16*) (paprium_s.ram + 0xF80 + index*16) = 0;\n+\t\treturn;\n+\t}\n+\n+\n+\tspritePtr  = paprium_obj_ram[framePtr + 0] << 0;\n+\tspritePtr += paprium_obj_ram[framePtr + 1] << 8;\n+\tspritePtr += paprium_obj_ram[framePtr + 2] << 16;\n+\tanimFlags = paprium_obj_ram[framePtr + 3];\n+\n+\n+#if DEBUG_SPRITE\n+\tsprintf(error_str, \"%X - %X %X %X - %X - %X %X\\n\",\n+\t\t((obj+1) & 0x7FFF)*4,\n+\t\tanimPtr, anim, animPtr + anim*4,\n+\t\tframePtr,\n+\t\tspritePtr, animFlags);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\tif( spritePtr == 0 ) return;\n+\n+\n+\tframePtr += 4; \n+\n+\tif( animFlags < 0x80 ) {\n+\t\tif( nextAnim == 0xFFFF ) {\n+\t\t\tint nextFrame;\n+\n+\t\t\tnextFrame  = paprium_obj_ram[framePtr + 0] << 0;\n+\t\t\tnextFrame += paprium_obj_ram[framePtr + 1] << 8;\n+\t\t\tnextFrame += paprium_obj_ram[framePtr + 2] << 16;\n+\n+\t\t\tframePtr = nextFrame;\n+\t\t}\n+\t\telse if( reset == 0 ) {\n+\t\t\tanim = nextAnim;\n+\t\t\treset = 1;\n+\n+\t\t\tgoto reload;\n+\t\t}\n+\t}\n+\n+\tpaprium_s.obj[index] = framePtr;\n+\n+\n+\tcount = paprium_obj_ram[(spritePtr++)^1];\n+\tint flags2 = paprium_obj_ram[(spritePtr++)^1];\n+\n+\n+#if 0\n+\tsprintf(error_str, \"%d - %X %X %X\\n\", count, src, vram, flags2);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\tspr_x = pos_x;\n+\tspr_y = pos_y;\n+\n+\tfor( lcv = 0; lcv < count; lcv++ ) {\n+\t\tint misc = ((paprium_obj_ram[spritePtr + 3] >> 4) & 0x0F);\n+\t\tint size_x = ((paprium_obj_ram[spritePtr + 3] >> 2) & 0x03) + 1;\n+\t\tint size_y = ((paprium_obj_ram[spritePtr + 3] >> 0) & 0x03) + 1;\n+\t\tint tile = *(uint16*) (paprium_obj_ram + spritePtr + 4);\n+\t\tint tileAttr = *(uint16*) (paprium_obj_ram + spritePtr + 6) & ~0x1FF;\n+\t\tint ofs = *(uint16*) (paprium_obj_ram + spritePtr + 6) & 0x1FF;\n+\n+\t\tint tilePtr = paprium_tile_ptr + tile*4;\n+\t\tint tileSize = size_x * size_y * 0x20;\n+\n+\t\tint sprAttr = 0;\n+\n+\n+\t\tif( !flip_h )\n+\t\t\tspr_x += (int8) paprium_obj_ram[spritePtr + 1];\n+\t\telse\n+\t\t\tspr_x -= (int8) paprium_obj_ram[spritePtr + 1];\n+\n+\t\tspr_y += (int8) paprium_obj_ram[spritePtr + 0];\n+\t\tspritePtr += 8;\n+\n+\n+\t\tif( tile == 0 ) continue;\n+\t\tif( spriteCount >= 94 ) continue;\n+\n+\n+\t\tsprAttr  = (tileAttr & 0x8000) ? 0x8000 : (objAttr & 0x8000);\n+\t\tsprAttr += (tileAttr & 0x6000) ? (tileAttr & 0x6000) : (objAttr & 0x6000);\n+\t\tsprAttr += (tileAttr & 0x1800) ^ (objAttr & 0x1800);\n+\n+\n+\t\tif( (spr_y >= 128) && (spr_y + size_y*8 < 368) ) {\n+\t\t\tif( (!flip_h && ((spr_x + size_x*8 >= 128) && spr_x < 448)) ||\n+\t\t\t\t (flip_h && ((spr_x - size_x*8 < 448) && spr_x >= 128)) ) {\n+\t\t\t\tif( spriteCount < 80 ) {\n+\t\t\t\t\t*(uint16*) (paprium_s.ram + 0xB00 + spriteCount*8) = spr_y & 0x3FF;\n+\t\t\t\t\t*(uint16*) (paprium_s.ram + 0xB02 + spriteCount*8) = ((size_x-1) << 10) + ((size_y-1) << 8) + (spriteCount+1);\n+\t\t\t\t\t*(uint16*) (paprium_s.ram + 0xB04 + spriteCount*8) = sprAttr + ((vram / 0x20) & 0x7FF);\n+\t\t\t\t\t*(uint16*) (paprium_s.ram + 0xB06 + spriteCount*8) = (spr_x - ((!flip_h) ? 0 : size_x*8)) & 0x1FF;\n+\n+#if DEBUG_SPRITE\n+\t\t\t\t\tsprintf(error_str, \"%d / %X %X %X %X\\n\",\n+\t\t\t\t\t\tspriteCount,\n+\t\t\t\t\t\t*(uint16*) (paprium_s.ram + 0xB00 + (spriteCount-0)*8),\n+\t\t\t\t\t\t*(uint16*) (paprium_s.ram + 0xB02 + (spriteCount-0)*8),\n+\t\t\t\t\t\t*(uint16*) (paprium_s.ram + 0xB04 + (spriteCount-0)*8),\n+\t\t\t\t\t\t*(uint16*) (paprium_s.ram + 0xB06 + (spriteCount-0)*8)\n+\t\t\t\t\t);\n+\t\t\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\t\t\t\t}\n+\t\t\t\telse {\n+\t\t\t\t\tif( spriteCount == 80 ) {  /* sprite 0 lock */\n+\t\t\t\t\t\tpaprium_s.ram[0xD7A] = 1;  /* exp.s list */\n+\n+\t\t\t\t\t\tmemcpy(paprium_s.exps_ram, paprium_s.ram + 0xB00, 8);\n+\t\t\t\t\t\tpaprium_s.exps_ram[2] = 14;  /* normal list */\n+\n+\t\t\t\t\t\tspriteCount++;\n+\t\t\t\t\t}\n+\n+\t\t\t\t\t*(uint16*) (paprium_s.exps_ram + 0 + (spriteCount-80)*8) = spr_y & 0x3FF;\n+\t\t\t\t\t*(uint16*) (paprium_s.exps_ram + 2 + (spriteCount-80)*8) = ((size_x-1) << 10) + ((size_y-1) << 8) + ((spriteCount-80)+1);\n+\t\t\t\t\t*(uint16*) (paprium_s.exps_ram + 4 + (spriteCount-80)*8) = sprAttr + ((vram / 0x20) & 0x7FF);\n+\t\t\t\t\t*(uint16*) (paprium_s.exps_ram + 6 + (spriteCount-80)*8) = (spr_x - ((!flip_h) ? 0 : size_x*8)) & 0x1FF;\n+\n+#if DEBUG_SPRITE\n+\t\t\t\t\tsprintf(error_str, \"%d / %X %X %X %X\\n\",\n+\t\t\t\t\t\tspriteCount,\n+\t\t\t\t\t\t*(uint16*) (paprium_s.ram + 0x1F20 + (spriteCount-80)*8),\n+\t\t\t\t\t\t*(uint16*) (paprium_s.ram + 0x1F22 + (spriteCount-80)*8),\n+\t\t\t\t\t\t*(uint16*) (paprium_s.ram + 0x1F24 + (spriteCount-80)*8),\n+\t\t\t\t\t\t*(uint16*) (paprium_s.ram + 0x1F26 + (spriteCount-80)*8)\n+\t\t\t\t\t);\n+\t\t\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\t\t\t\t}\n+\n+\t\t\t\tspriteCount++;\n+\n+#if DEBUG_SPRITE\n+\t\t\t\tsprintf(error_str, \"%d %d / %d %d %X %X / %X %X %X\\n\", spriteCount, count, spr_x, spr_y, tileAttr, objAttr, src, vram, tile);\n+\t\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\t\t\t}\n+\t\t}\n+\n+\n+\n+\t\tint ptr = paprium_tile_ptr + (*(uint16*)(cart.rom + tilePtr) << 16) + *(uint16*)(cart.rom + tilePtr + 2);\n+\t\tstatic uint8 tile_ram[0x10000];\n+\n+\t\tpaprium_decoder_type(ptr, tile_ram);\n+\t\tmemcpy(paprium_s.ram + src, tile_ram + ofs * 0x20, tileSize);\n+\n+\n+\t\t//if( !tiledupe && dmaPtr < dmalimit && vram < vramlimit && tile < tilelimit)\n+\n+\t\t*(uint16*) (paprium_s.ram + 0x1400 + dmaPtr*16) = 0x8F02;\n+\t\t*(uint16*) (paprium_s.ram + 0x1402 + dmaPtr*16) = 0x9300 + ((tileSize >> 1) & 0xFF);\n+\t\t*(uint16*) (paprium_s.ram + 0x1404 + dmaPtr*16) = 0x9500 + ((src >> 1) & 0xFF);\n+\t\t*(uint16*) (paprium_s.ram + 0x1406 + dmaPtr*16) = 0x9400 + ((tileSize >> 9) & 0xFF);\n+\t\t*(uint16*) (paprium_s.ram + 0x1408 + dmaPtr*16) = 0x9700;\n+\t\t*(uint16*) (paprium_s.ram + 0x140A + dmaPtr*16) = 0x9600 + ((src >> 9) & 0xFF);\n+\t\t*(uint16*) (paprium_s.ram + 0x140C + dmaPtr*16) = 0x4000 + (vram & 0x3FFF);\n+\t\t*(uint16*) (paprium_s.ram + 0x140E + dmaPtr*16) = 0x0080 + (vram >> 14);\n+\n+\t\t*(uint16*) (paprium_s.ram + 0x1F16) = ++dmaPtr;\n+\t\t*(uint16*) (paprium_s.ram + 0x1F18) = spriteCount;\n+\n+\n+\t\tsrc += tileSize;\n+\t\tdmaSize += tileSize;\n+\t\tvram += tileSize;\n+\t}\n+\n+\n+\tpaprium_s.draw_src = src;\n+\tpaprium_s.draw_dst = vram;\n+}\n+\n+\n+static void paprium_sprite_init(int arg)\n+{\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Sprite_Init %02X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\targ);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\tmemset(paprium_s.ram + 0x1F20, 0, 14*8);\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_cmd_count != 0 ) {\n+\t\tsprintf(error_str, \">>  Sprite_Init %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_sprite_start(int arg)\n+{\n+#if DEBUG_SPRITE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Sprite_Start %02X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\targ);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\tint count = *(uint16*)(paprium_s.ram + 0x1F18);\n+\n+\t*(uint16*) (paprium_s.ram + 0x1F16) = 0x0001;  /* dma count */\n+\n+\t*(uint16*) (paprium_s.ram + 0x1400) = 0x8f02;\n+\t*(uint16*) (paprium_s.ram + 0x1402) = 0x9340;\n+\t*(uint16*) (paprium_s.ram + 0x1404) = 0x9580;\n+\t*(uint16*) (paprium_s.ram + 0x1406) = 0x9401;\n+\t*(uint16*) (paprium_s.ram + 0x1408) = 0x9700;\n+\t*(uint16*) (paprium_s.ram + 0x140a) = 0x9605;\n+\t*(uint16*) (paprium_s.ram + 0x140c) = 0x7000;\n+\t*(uint16*) (paprium_s.ram + 0x140e) = 0x0083;\n+\n+\n+\tif( count < 80 )\n+\t\tmemcpy(paprium_s.ram + 0x1F20, paprium_s.ram + 0xB00, 14*8);\n+\telse\n+\t\tmemcpy(paprium_s.ram + 0x1F20, paprium_s.exps_ram, 14*8);\n+\n+\n+\tpaprium_s.draw_src = 0x2000;\n+\tpaprium_s.draw_dst = 0x200;\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_cmd_count != 0 ) {\n+\t\tsprintf(error_str, \">>  Sprite_Start %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_sprite_stop(int arg)\n+{\n+#if DEBUG_SPRITE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Sprite_Stop %02X -- %d sprites\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\targ, *(uint16*)(paprium_s.ram + 0x1f18));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\tint count = *(uint16*)(paprium_s.ram + 0x1F18);\n+\n+\tif( count == 0 ) {\n+\t\tmemset(paprium_s.ram + 0xB00, 0, 8);\n+\t\tmemset(paprium_s.exps_ram, 0, 8);\n+\t}\n+\telse if( count <= 80 ) {\n+\t\tpaprium_s.ram[0xB02 + (count-1)*8] = 0;\n+\n+\t\tif( count <= 14 )\n+\t\t\tpaprium_s.exps_ram[2 + (count-1)*8] = 0;\n+\t}\n+\telse\n+\t\tpaprium_s.exps_ram[2 + (count-81)*8] = 0;\n+\n+\n+\tif( arg == 2 )\n+\t\t*(uint16*) (paprium_s.ram + 0x1F1C) = 1;  /* exp.s - force draw */\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_cmd_count != 0 ) {\n+\t\tsprintf(error_str, \">>  Sprite_Stop %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_sprite_pause(int arg)\n+{\n+#if DEBUG_SPRITE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Sprite_Pause %02X -- %d sprites\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\targ, *(uint16*)(paprium_s.ram + 0x1f18));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\tint count = *(uint16*)(paprium_s.ram + 0x1F18);\n+\n+\tif( count == 0 )\n+\t\tmemset(paprium_s.ram + 0xB00, 0, 8);\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_cmd_count != 0 ) {\n+\t\tsprintf(error_str, \">>  Sprite_Pause %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_scaler_init(int arg)\n+{\n+\tint row, col, out;\n+\tstatic uint8 temp[0x800];\n+\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Scaler_Init %02X - %04X %04X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\targ,\n+\t\t*(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\tint ptr = (*(uint16 *)(paprium_s.ram + 0x1E10) << 16) + *(uint16 *)(paprium_s.ram + 0x1E12);\n+\tpaprium_decoder_type(ptr, temp);\n+\n+\n+\tout = 0;\n+\n+\tfor( col = 0; col < 64; col++ ) {\n+\t\tfor( row = 0; row < 64; row++ ) {\n+\t\t\tif( col & 1 )\n+\t\t\t\tpaprium_s.scaler_ram[out] = temp[row*32 + (col/2)^1] & 0x0F;\n+\t\t\telse\n+\t\t\t\tpaprium_s.scaler_ram[out] = temp[row*32 + (col/2)^1] >> 4;\n+\n+\t\t\tout++;\n+\t\t}\n+\t}\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_cmd_count != 2 ) {\n+\t\tsprintf(error_str, \">>  Scaler_Init %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_scaler(int arg)\n+{\n+\tint row, col;\n+\n+\tint left = *(uint16 *)(paprium_s.ram + 0x1E10);\n+\tint right = *(uint16 *)(paprium_s.ram + 0x1E12);\n+\tint scale = *(uint16 *)(paprium_s.ram + 0x1E14);\n+\tint ptr = *(uint16 *)(paprium_s.ram + 0x1E16);\n+\tint step = 64 * 0x10000 / scale;\n+\tint ptr_frac = 0;\n+\n+\n+#if DEBUG_SPRITE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Scaler %02X --  %04X %04X %04X %04X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\targ, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\tfor( col = 0; col < 128; col++ ) {\n+\t\tint base = (col & 4) ? 0x600 : 0x200;\n+\t\tint out = ((col / 8) * 64) + ((col & 2) / 2);\n+\n+\t\tfor( row = 0; row < 64; row += 2 ) {\n+\t\t\tif( (col >= left) && (col < right) ) {\n+\t\t\t\tif(col & 1)\n+\t\t\t\t\tpaprium_s.ram[base + out^1] += paprium_s.scaler_ram[row*64 + ptr] & 0x0F;\n+\t\t\t\telse\n+\t\t\t\t\tpaprium_s.ram[base + out^1] = paprium_s.scaler_ram[row*64 + ptr] << 4;\n+\t\t\t}\n+\t\t\telse if( (col & 1) == 0 )\n+\t\t\t\tpaprium_s.ram[base + out^1] = 0;\n+\n+\t\t\tout += 2;\n+\t\t}\n+\n+\t\tif( (col >= left) && (col < right) && (ptr < 64) ) {\n+\t\t\tptr_frac += 0x10000;\n+\n+\t\t\twhile( ptr_frac >= step ) {\n+\t\t\t\tptr++;\n+\t\t\t\tptr_frac -= step;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_cmd_count != 4 ) {\n+\t\tsprintf(error_str, \">>  Scaler %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_sram_read(int bank)\n+{\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Sram_Read %02X -- %04X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\tbank, *(uint16 *)(paprium_s.ram + 0x1E10));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\tint offset = *(uint16 *)(paprium_s.ram + 0x1E10);\n+\n+\tif( (bank >= 1) && (bank <= 4) )\n+\t\tmemcpy(paprium_s.ram + offset, sram.sram + ((bank-1) * 0x780), 0x780);\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_cmd_count != 1 ) {\n+\t\tsprintf(error_str, \">>  Sram_Read %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_sram_write(int bank)\n+{\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Sram_Write %02X -- %04X %04X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\tbank, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\t/* *(uint16 *)(paprium_s.ram + 0x1E10) */\n+\tint offset = *(uint16 *)(paprium_s.ram + 0x1E12);\n+\n+\tif( (bank >= 1) && (bank <= 4) )\n+\t\tmemcpy(sram.sram + ((bank-1) * 0x780), paprium_s.ram + offset, 0x780);\n+\n+\n+#if DEBUG_MODE\n+\tif( *(uint16 *)(paprium_s.ram + 0x1E10) != 0xBEEF ) {\n+\t\tsprintf(error_str, \">>  SRAM write 1E10 %X\\n\", *(uint16 *)(paprium_s.ram + 0x1E10));\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"sram write\", 0);\n+\t}\n+\n+\tif( paprium_cmd_count != 1 ) {\n+\t\tsprintf(error_str, \">>  Sram_Write %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_mapper(int arg)\n+{\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Mapper %02X -- %04X %04X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\targ, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\tmemcpy(paprium_s.ram + 0x8000, cart.rom + 0x8000, 0x8000);  /* troll */\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_cmd_count != 2 ) {\n+\t\tsprintf(error_str, \">>  Mapper %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_boot(int arg)\n+{\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Boot %02X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\targ);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\tpaprium_music_ptr = (*(uint16*)(paprium_s.ram + 0x1E10) << 16) + *(uint16*)(paprium_s.ram + 0x1E12);\n+\t/* (*(uint16*)(paprium_s.ram + 0x1E14) << 16) + *(uint16*)(paprium_s.ram + 0x1E16); */\n+\tpaprium_wave_ptr = (*(uint16*)(paprium_s.ram + 0x1E18) << 16) + *(uint16*)(paprium_s.ram + 0x1E1A);\n+\t/* (*(uint16*)(paprium_s.ram + 0x1E1C) << 16) + *(uint16*)(paprium_s.ram + 0x1E1E); */\n+\tpaprium_sfx_ptr = (*(uint16*)(paprium_s.ram + 0x1E20) << 16) + *(uint16*)(paprium_s.ram + 0x1E22);\n+\tpaprium_sprite_ptr = (*(uint16*)(paprium_s.ram + 0x1E24) << 16) + *(uint16*)(paprium_s.ram + 0x1E26);\n+\tpaprium_tile_ptr = (*(uint16*)(paprium_s.ram + 0x1E28) << 16) + *(uint16*)(paprium_s.ram + 0x1E2A);\n+\n+\t/* paprium_wave_unpack(paprium_wave_ptr, paprium_wave_ram); */\n+\tpaprium_decoder_type(paprium_sprite_ptr, paprium_obj_ram);\n+\n+\tpaprium_s.decoder_size = 0;\n+\n+\n+#if DEBUG_MODE\n+\tpaprium_cmd_count = 0;\n+#endif\n+}\n+\n+\n+static void paprium_EC(int arg)\n+{\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM EC %02X = %02X %02X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\targ, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+#if DEBUG_MODE\n+\tif( *(uint16 *)(paprium_s.ram + 0x1E10) ) {\n+\t\tsprintf(error_str, \">>  EC %02X\\n\", *(uint16 *)(paprium_s.ram + 0x1E10));\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"ec\", 0);\n+\t}\n+#endif\n+\n+#if DEBUG_MODE\n+\tif( paprium_cmd_count != 2 ) {\n+\t\tsprintf(error_str, \">>  EC %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_music(int track)\n+{\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Music %02X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\ttrack);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\ttrack &= 0x7F;\n+\n+\n+\tint ptr = (*(uint16*)(cart.rom + paprium_music_ptr + track*4)<<16) + (*(uint16*)(cart.rom + paprium_music_ptr + track*4 + 2));\n+\tpaprium_decoder_type(paprium_music_ptr + ptr, paprium_s.music_ram);\n+\tpaprium_s.decoder_size = 0;\n+\n+\n+\tpaprium_s.music_section = 0;\n+\tpaprium_s.music_segment = 0;\n+\tpaprium_s.audio_tick = 0;\n+\n+\n+\tmemset(paprium_s.music, 0, sizeof(paprium_s.music));\n+\tfor( int ch = 0; ch < 26; ch++ ) {\n+\t\tpaprium_voice_t *voice = paprium_s.music + ch;\n+\n+\t\tvoice->panning = 0x80;\n+\t\tvoice->volume = 0x80;\n+\t\tvoice->program = paprium_s.music_ram[0x2A + ch^1];\n+\t}\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_cmd_count != 0 ) {\n+\t\tsprintf(error_str, \">>  Music %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+\n+\n+#if 1\n+\tpaprium_load_mp3(track, 1);\n+#endif\n+}\n+\n+\n+static void paprium_music_volume(int level)\n+{\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Music_Volume %02X -- %04X %04X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\tlevel, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\tpaprium_s.music_volume = level;\n+\t/* *(uint16 *)(paprium_s.ram + 0x1E10); */\n+\t/* *(uint16 *)(paprium_s.ram + 0x1E12); */\n+\n+\n+#if 0\n+\t// stream mp3 / ogg, manage tempo\n+#endif\n+\n+\n+#if DEBUG_MODE\n+\tif(*(uint16 *)(paprium_s.ram + 0x1E10) != 0x80) {\n+\t\tsprintf(error_str, \">>  Music_Volume = %X\\n\", *(uint16 *)(paprium_s.ram + 0x1E10));\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"ooo\", 0);\n+\t}\n+\n+\tif(*(uint16 *)(paprium_s.ram + 0x1E12) != 0x00 && *(uint16 *)(paprium_s.ram + 0x1E12) != 0x08) {\n+\t\tsprintf(error_str, \">>  Music_Volume-2 = %X\\n\", *(uint16 *)(paprium_s.ram + 0x1E12));\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"ooo\", 0);\n+\t}\n+\n+\tif( paprium_cmd_count != 2 ) {\n+\t\tsprintf(error_str, \">>  Music_Volume %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_music_setting(int flag)\n+{\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Music_Setting %02X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\tflag);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\tif( flag == 8 )\n+\t\tpaprium_s.music_segment = -1;\n+\n+\telse if( flag == 0 )\n+\t\tpaprium_s.music_segment = -1;\n+\n+\n+#if DEBUG_MODE\n+\telse {\n+\t\tsprintf(error_str, \">>  Music_Setting = %X\\n\", flag);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"ooo\", 0);\n+\t}\n+#endif\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_cmd_count != 0 ) {\n+\t\tsprintf(error_str, \">>  Music_Setting %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_music_special(int flag)\n+{\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Music_Special %02X = %04X %04X %04X %04X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\tflag, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\tif( flag == 1 ) {\n+\t\t//*(uint16 *)(paprium_s.ram + 0x1E10)\n+\t\t//*(uint16 *)(paprium_s.ram + 0x1E12)\n+\n+#if DEBUG_MODE\n+\t\tif( *(uint16 *)(paprium_s.ram + 0x1E10) != 0x40 ) {\n+\t\t\tsprintf(error_str, \">>  Music_Special_01 %X count\\n\", *(uint16 *)(paprium_s.ram + 0x1E10));\n+\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t\t}\n+\n+\t\tif( *(uint16 *)(paprium_s.ram + 0x1E12) != 0x08 ) {\n+\t\t\tsprintf(error_str, \">>  Music_Special_01-2 %X count\\n\", *(uint16 *)(paprium_s.ram + 0x1E10));\n+\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t\t}\n+\n+\t\tif( paprium_cmd_count != 2 ) {\n+\t\t\tsprintf(error_str, \">>  Music_Special-01 %d count\\n\", paprium_cmd_count);\n+\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t\t}\n+#endif\n+\t}\n+\n+\telse if( flag == 2 ) {\n+\t\t//*(uint16 *)(paprium_s.ram + 0x1E10)  /* 4 = crisis, 0 = normal ? */\n+\n+#if DEBUG_MODE\n+\t\tif( *(uint16 *)(paprium_s.ram + 0x1E10) != 4 && *(uint16 *)(paprium_s.ram + 0x1E10) != 0 ) {\n+\t\t\tsprintf(error_str, \">>  Music_Special_02 %X count\\n\", *(uint16 *)(paprium_s.ram + 0x1E10));\n+\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t\t}\n+\n+\t\tif( paprium_cmd_count != 1 ) {\n+\t\t\tsprintf(error_str, \">>  Music_Special-02 %d count\\n\", paprium_cmd_count);\n+\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t\t}\n+#endif\n+\t}\n+\n+\telse if( flag == 4 ) {\n+\t\t//*(uint16 *)(paprium_s.ram + 0x1E10)  /* 81 = blu pill */\n+\n+#if DEBUG_MODE\n+\t\tif( *(uint16 *)(paprium_s.ram + 0x1E10) != 0x80 && *(uint16 *)(paprium_s.ram + 0x1E10) != 0x81 ) {\n+\t\t\tsprintf(error_str, \">>  Music_Special_04 %X count\\n\", *(uint16 *)(paprium_s.ram + 0x1E10));\n+\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t\t}\n+\n+\t\tif( paprium_cmd_count != 1 ) {\n+\t\t\tsprintf(error_str, \">>  Music_Special-04 %d count\\n\", paprium_cmd_count);\n+\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t\t}\n+#endif\n+\t}\n+\n+\telse if( flag == 6 ) {  /* sax man */\n+\t\t//*(uint16 *)(paprium_s.ram + 0x1E10)\n+\t\t//*(uint16 *)(paprium_s.ram + 0x1E12)\n+\t\t//*(uint16 *)(paprium_s.ram + 0x1E14)\n+\n+#if DEBUG_MODE\n+\t\tif( *(uint16 *)(paprium_s.ram + 0x1E10) != 1 ) {\n+\t\t\tsprintf(error_str, \">>  Music_Special_06 %X count\\n\", *(uint16 *)(paprium_s.ram + 0x1E10));\n+\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t\t}\n+\n+\t\tif( paprium_cmd_count != 3 ) {\n+\t\t\tsprintf(error_str, \">>  Music_Special-06 %d count\\n\", paprium_cmd_count);\n+\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t\t}\n+#endif\n+\t}\n+\n+\telse if( flag == 7 ) {  /* blu pill - stage title */\n+\t\t//*(uint16 *)(paprium_s.ram + 0x1E10)\n+\n+#if DEBUG_MODE\n+\t\tif( *(uint16 *)(paprium_s.ram + 0x1E10) != 0x6C && *(uint16 *)(paprium_s.ram + 0x1E10) != 0xA0 ) {\n+\t\t\tsprintf(error_str, \">>  Music_Special_07 %X count\\n\", *(uint16 *)(paprium_s.ram + 0x1E10));\n+\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t\t}\n+\n+\t\tif( paprium_cmd_count != 1 ) {\n+\t\t\tsprintf(error_str, \">>  Music_Special-06 %d count\\n\", paprium_cmd_count);\n+\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t\t}\n+#endif\n+\t}\n+\n+#if DEBUG_MODE\n+\telse {\n+\t\tsprintf(error_str, \">>  Music special = %X\\n\", flag);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"ooo\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_audio_setting(int flags)\n+{\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Audio_Settings %02X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\tflags);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\tpaprium_s.audio_flags = flags;\n+\n+\tpaprium_s.ram[0x1801] = flags & 0x01;  /* dac */\n+\n+\tpaprium_s.ram[0x1800]  = (flags & 0x01) ? 0x80 : 0x00;  /* dac */\n+\tpaprium_s.ram[0x1800] += (flags & 0x02) ? 0x40 : 0x00;  /* ntsc */\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_cmd_count != 0 ) {\n+\t\tsprintf(error_str, \">>  Audio_Settings %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_sfx_volume(int level)\n+{\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM Sfx_Volume %02X -- %04X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\tlevel, *(uint16 *)(paprium_s.ram + 0x1E10));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\tpaprium_s.sfx_volume = level;\n+\t/* *(uint16 *)(paprium_s.ram + 0x1E10); */\n+\t/* *(uint16 *)(paprium_s.ram + 0x1E12); */\n+\n+\n+#if DEBUG_MODE\n+\tif(*(uint16 *)(paprium_s.ram + 0x1E10) != 0x80) {\n+\t\tsprintf(error_str, \">>  Sfx_Volume-1 = %X\\n\", *(uint16 *)(paprium_s.ram + 0x1E10));\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"ooo\", 0);\n+\t}\n+\n+\tif(*(uint16 *)(paprium_s.ram + 0x1E12) != 0x00 && paprium_cmd_count == 2) {\n+\t\tsprintf(error_str, \">>  Sfx_Volume-2 = %X\\n\", *(uint16 *)(paprium_s.ram + 0x1E12));\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"ooo\", 0);\n+\t}\n+#endif\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_cmd_count != 1 && paprium_cmd_count != 2 ) {\n+\t\tsprintf(error_str, \">>  Sfx_Volume %d count\\n\", paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+}\n+\n+\n+static void paprium_cmd(int data)\n+{\n+\tint cmd = data >> 8;\n+\tint lcv;\n+\tint retaddr;\n+\tint argscnt;\n+\n+\n+\tdata &= 0xFF;\n+\n+\tif( m68k.prev_pc == 0xb4394 ) {\n+\t\tretaddr = m68k_read_immediate_32(m68k.dar[15]+16);\n+\t\targscnt = 4;\n+\t}\n+\telse {\n+\t\tretaddr = m68k_read_immediate_32(m68k.dar[15]+4);\n+\t\targscnt = 0;\n+\t}\n+\n+\n+\n+\tswitch(cmd) {\n+\tcase 0x81:\n+\tcase 0x83:\n+\tcase 0x95:\n+\tcase 0x96:\n+\tcase 0xA4:\n+\tcase 0xA9:\n+\tcase 0xB6:\n+\t\tgoto print_0;\n+\n+\tcase 0xD0:\n+\t\tgoto print_2;\n+\t\tgoto print_5;\n+\n+\tcase 0xE7:  /* T-574120-0 = after demo loop */\n+\t\tgoto print_9;\n+\n+\tcase 0xD5:  /* secret room */\n+\tcase 0xEC:\n+\t\tgoto print_2;\n+\n+\tcase 0x84: paprium_mapper(data); break;\n+\tcase 0x88: paprium_audio_setting(data); break;\n+\tcase 0x8C: paprium_music(data); break;\n+\tcase 0x8D: paprium_music_setting(data); break;\n+\tcase 0xAD: paprium_sprite(data); break;\n+\tcase 0xAE: paprium_sprite_start(data); break;\n+\tcase 0xAF: paprium_sprite_stop(data); break;\n+\tcase 0xB0: paprium_sprite_init(data); break;\n+\tcase 0xB1: paprium_sprite_pause(data); break;\n+\tcase 0xC6: paprium_boot(data); break;\n+\tcase 0xC9: paprium_music_volume(data); break;\n+\tcase 0xCA: paprium_sfx_volume(data); break;\n+\tcase 0xD1: goto sfx_play;\n+\tcase 0xD2: goto sfx_off;\n+\tcase 0xD3: goto sfx_loop;\n+\tcase 0xD6: paprium_music_special(data); break;\n+\tcase 0xDA: paprium_decoder(data); break;\n+\tcase 0xDB: paprium_decoder_copy(data); break;\n+\tcase 0xDF: paprium_sram_read(data); break;\n+\tcase 0xE0: paprium_sram_write(data); break;\n+\t//case 0xF2: paprium_block_viewer(data); break;\n+\tcase 0xF4: paprium_scaler_init(data); break;\n+\tcase 0xF5: paprium_scaler(data); break;\n+\n+\tdefault: goto print_x;\n+\t}\n+\n+\n+done:\n+\t*(uint16*)(paprium_s.ram + 0x1FEA) &= 0x7FFF;\n+\treturn;\n+\n+\n+\n+print_0:\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM %02X %02X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\tcmd, data);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\n+\tif( paprium_cmd_count != 0 ) {\n+\t\tsprintf(error_str, \"%X %d count\\n\", cmd, paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+\tgoto done;\n+\n+\n+print_1:\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM %02X %02X -- %04X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\tcmd, data,\n+\t\t*(uint16 *)(paprium_s.ram + 0x1E10));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\n+\tif( paprium_cmd_count != 1 ) {\n+\t\tsprintf(error_str, \"%X %d count\\n\", cmd, paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+\tgoto done;\n+\n+\n+print_2:\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM %02X %02X -- %04X %04X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\tcmd, data,\n+\t\t*(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\n+\tif( paprium_cmd_count != 2 ) {\n+\t\tsprintf(error_str, \"%X %d count\\n\", cmd, paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+\tgoto done;\n+\n+\n+print_4:\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM %02X %02X -- %04X %04X %04X %04X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\tcmd, data,\n+\t\t*(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\n+\n+\tif( paprium_cmd_count != 4 ) {\n+\t\tsprintf(error_str, \"%X %d count\\n\", cmd, paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+\tgoto done;\n+\n+\n+print_5:\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM %02X %02X -- %04X %04X %04X %04X %04X\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\tcmd, data,\n+\t\t*(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16), *(uint16 *)(paprium_s.ram + 0x1E18));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\n+\tif( paprium_cmd_count != 5 ) {\n+\t\tsprintf(error_str, \"%X %d count\\n\", cmd, paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+\tgoto done;\n+\n+\n+print_9:\n+#if DEBUG_MODE\n+\tsprintf(error_str, \"[%d] [%04X:%04X] DM %02X %02X -- %04X %04X %04X %04X %04X ..\\n\",\n+\t\tv_counter,\n+\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\tcmd, data,\n+\t\t*(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16), *(uint16 *)(paprium_s.ram + 0x1E18));\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\n+\tif( paprium_cmd_count != 9 ) {\n+\t\tsprintf(error_str, \"%X %d count\\n\", cmd, paprium_cmd_count);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\tMessageBoxA(0, error_str, \"count\", 0);\n+\t}\n+#endif\n+\tgoto done;\n+\n+\n+print_x:\n+#if DEBUG_MODE\n+\tif( argscnt == 4 ) {\n+\t\tsprintf(error_str, \"[%d] [%04X:%04X] DM %02X %02X -- %04X %04X %04X %04X\\n\",\n+\t\t\tv_counter,\n+\t\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\t\tcmd, data,\n+\t\t\t*(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16));\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t}\n+\n+\telse {\n+\t\tsprintf(error_str, \"[%d] [%04X:%04X] DM %02X %02X ## %04X %04X %04X %04X\\n\",\n+\t\t\tv_counter,\n+\t\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,\n+\t\t\tcmd, data,\n+\t\t\t*(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16));\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t}\n+\n+\tsprintf(error_str, \"DM %02X %02X\\n\", cmd, data);\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\tMessageBoxA(0, error_str, \"DM\", 0);\n+#endif\n+\tgoto done;\n+\n+\n+sfx_play:\n+\t{\n+\t\tint chan, vol, pan, flags;\n+\t\tint ptr, size, type;\n+\t\tint lcv;\n+\t\tint newch = 0, maxtime = 0;\n+\t\tconst int rates[] = {1,2,4,5,8,9};\n+\t\tuint8 *sfx = paprium_sfx_ptr + cart.rom;\n+\n+\n+#if DEBUG_MODE\n+\t\tsprintf(error_str, \"[%d] [%04X:%04X <== %04X:%04X] DM Sfx_Play %02X -- %04X %04X %04X %04X\\n\",\n+\t\t\tv_counter,\n+\t\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff, (retaddr>>16)&0xffff, retaddr&0xffff,\n+\t\t\tdata, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16));\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\t\tchan = *(uint16 *)(paprium_s.ram + 0x1E10);\n+\t\tvol = *(uint16 *)(paprium_s.ram + 0x1E12);\n+\t\tpan = *(uint16 *)(paprium_s.ram + 0x1E14);\n+\t\tflags = *(uint16 *)(paprium_s.ram + 0x1E16);\n+\n+\n+#if DEBUG_MODE\n+\t\tif(flags & 0x100) {\n+\t\t\tsprintf(error_str, \"Sfx flags %X\\n\", flags);\n+\t\t\t//MessageBoxA(0, error_str, \"Sfx flags\", MB_OK );\t\t\t\n+\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t}  /* stage1 alarm = 8100 */\n+\t\t//else if( flags <= 0x8100 ) {}\n+\t\telse if( flags & 0x8000 ) {}\n+\t\telse if( flags & 0x4000 ) {}\n+\t\telse if( flags & 0x2000 ) {}\n+\t\telse if( flags & 0x800 ) {}\n+\t\t//else if( flags & 0x100 ) {}\n+\t\telse if( flags & 0x400 ) {}\n+\t\telse if( flags == 0 ) {}\n+\t\telse {\n+\t\t\tsprintf(error_str, \"Sfx flags %X\\n\", flags);\n+\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t\t\tMessageBoxA(0, error_str, \"Sfx flags\", MB_OK );\n+\t\t}\n+\n+\n+\t\tif( chan > 0x80 ) MessageBoxA(0, \"Sfx channel\", \"Warn\", MB_OK );\n+#endif\n+\n+\n+\t\tptr = (*(uint16 *)(sfx + data*8) << 16) | (*(uint16 *)(sfx + data*8 + 2));\n+\t\tsize = (*(uint8 *)(sfx + data*8 + 4) << 16) | (*(uint16 *)(sfx + data*8 + 6));\n+\t\ttype = *(uint8 *)(sfx + data*8 + 5);\n+\n+\n+#if DEBUG_MODE\n+\t\tsprintf(error_str, \"%X %X | %X %X %X | %X %X %X\\n\",\n+\t\t\tpaprium_sfx_ptr + data*8, paprium_sfx_ptr + ptr,\n+\t\t\tptr, size, type,\n+\t\t\trates[type >> 4], type & 0x03, type & 0x0C);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\t\tfor( lcv = 0; lcv < 8; lcv++, chan >>= 1 ) {\n+\t\t\tif( (chan & 1) == 0 ) continue;\n+\n+\t\t\tif( paprium_s.sfx[lcv].size ) {\n+\t\t\t\tif( maxtime < paprium_s.sfx[lcv].time ) {\n+\t\t\t\t\tmaxtime = paprium_s.sfx[lcv].time;\n+\t\t\t\t\tnewch = lcv;\n+\t\t\t\t}\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\n+\t\t\tnewch = lcv;\n+\t\t\tbreak;\n+\t\t}\n+\n+\n+\t\tpaprium_s.sfx[newch].volume = vol;\n+\t\tpaprium_s.sfx[newch].panning = pan;\n+\t\tpaprium_s.sfx[newch].type = type;\n+\n+\t\tpaprium_s.sfx[newch].num = data;\n+\t\tpaprium_s.sfx[newch].flags = flags;\n+\n+\t\tpaprium_s.sfx[newch].loop = 0;\n+\t\tpaprium_s.sfx[newch].count = 0;\n+\t\tpaprium_s.sfx[newch].time = 0;\n+\t\tpaprium_s.sfx[newch].tick = 0;\n+\t\tpaprium_s.sfx[newch].decay = 0;\n+\n+\t\tif( flags & 0x4000 )\n+\t\t\tpaprium_s.sfx[newch].echo = (paprium_s.echo_pan++) & 1;\n+\n+\t\tpaprium_s.sfx[newch].ptr = ptr;\n+\t\tpaprium_s.sfx[newch].start = ptr;\n+\t\tpaprium_s.sfx[newch].size = size;\n+\t}\n+\tgoto done;\n+\n+\n+sfx_loop:\n+\t{\n+\t\tint lcv;\n+\n+\n+#if DEBUG_MODE\n+\t\tsprintf(error_str, \"[%d] [%04X:%04X <== %04X:%04X] DM Sfx_Loop %02X -- %04X %04X %04X\\n\",\n+\t\t\tv_counter,\n+\t\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff, (retaddr>>16)&0xffff, retaddr&0xffff,\n+\t\t\tdata, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14));\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\t\tfor( lcv = 0; lcv < 8; lcv++, data >>= 1 ) {\n+\t\t\tif( (data & 1) == 0 ) continue;\n+\n+\t\t\tpaprium_s.sfx[lcv].volume = *(uint16 *)(paprium_s.ram + 0x1E10);\n+\t\t\tpaprium_s.sfx[lcv].panning = *(uint16 *)(paprium_s.ram + 0x1E12);\n+\t\t\tpaprium_s.sfx[lcv].decay = *(uint16 *)(paprium_s.ram + 0x1E14);\n+\n+\t\t\tpaprium_s.sfx[lcv].loop = 1;\n+\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\tgoto done;\n+\n+\n+sfx_off:\n+\t{\n+\t\tint flags;\n+\n+\n+#if DEBUG_MODE\n+\t\tsprintf(error_str, \"[%d] [%04X:%04X <== %04X:%04X] DM Sfx_Off %02X -- %04X\\n\",\n+\t\t\tv_counter,\n+\t\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff, (retaddr>>16)&0xffff, retaddr&0xffff,\n+\t\t\tdata, *(uint16 *)(paprium_s.ram + 0x1E10));\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\n+\t\tflags = *(uint16 *)(paprium_s.ram + 0x1E10);\n+\n+\n+\t\tif(0) {}\n+\t\t//else if( flags == 6 ) {}\n+\t\telse if( flags == 0 ) {}\n+\t\telse {} //MessageBoxA(0, \"Sfx_Off flags\", \"Warn\", MB_OK );\n+\n+\n+\t\tfor( lcv = 0; lcv < 8; lcv++ ) {\n+\t\t\tif( !(data & (1 << lcv) ) ) continue;\n+\n+\t\t\tif( flags == 0 ) {\n+\t\t\t\tpaprium_s.sfx[lcv].size = 0;\n+\t\t\t}\n+\n+\t\t\tpaprium_s.sfx[lcv].decay = flags;\n+\t\t\tpaprium_s.sfx[lcv].loop = 0;\n+\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\tgoto done;\n+}\n+\n+\n+static int paprium_addr_test(uint32 address, int mode)\n+{\n+#if DEBUG_MODE == 0\n+\treturn 0;\n+#endif\n+\n+\n+\tif( address < 0x100 ) return 0;  /* exception table */\n+\n+\tif( skip_boot1 ) {\n+\t\tif( address == 0x14CE ) {\n+\t\t\tskip_boot1 = 0;\n+\t\t}\n+\t\treturn 0;\n+\t}\n+\n+\n+#if DEBUG_MODE\n+\tif( mode == 0 ) {\n+\t\tif( address >= 0x8000 ) return 0;\n+\t}\n+#endif\n+\n+\n+#if DEBUG_MODE\n+\tif( address >= 0x2000 && address < 0x8000 ) return 0;\n+#endif\n+\n+#if DEBUG_MODE\n+\tif( address >= 0x200 && address < 0xb00 ) return 0;\n+#endif\n+\n+#if DEBUG_MODE\n+\tif( address >= 0xb00 && address < 0xf00 ) return 0;\n+\tif( address >= 0x1f20 && address < 0x1f90 ) return 0;  /* exp.s */\n+#endif\n+\n+#if DEBUG_MODE\n+\tif( address >= 0xF80 && address < 0x1290 ) return 0;  /* OBJ list */\n+#endif\n+\n+#if 0\n+\tif( address >= 0x1290 && address < 0x1400 ) {\n+\t\tMessageBoxA(0, \"address\", \"me\", 0);\n+\t\treturn 0;\n+\t}\n+#endif\n+\n+#if 0\n+\tif( address >= 0x1B40 && address < 0x1b90 ) {\n+\t\tMessageBoxA(0, \"address 2\", \"me\", 0);\n+\t\treturn 1;\n+\t}\n+#endif\n+\n+#if 0\n+\tif( address >= 0xd80 && address < 0xf80 ) {\n+\t\tMessageBoxA(0, \"address 3\", \"me\", 0);\n+\t\treturn 1;\n+\t}\n+#endif\n+\n+#if DEBUG_MODE\n+\tif( address >= 0x1400 && address < 0x1800 ) return 0;  /* DMA list */\t\n+#endif\n+\n+#if DEBUG_MODE\n+\tif( address >= 0x1800 && address < 0x1A00 ) return 0;  /* DAC list ?? */\n+#endif\n+\n+#if DEBUG_MODE\n+\tif( address == 0x1F10 ) return 0;  /* DMA size = header [10h] + packet [x words] */\n+\tif( address == 0x1F16 ) return 0;  /* DMA transfer count */\n+\tif( address == 0x1F18 ) return 0;  /* OBJ count */\n+\tif( address == 0x1F12 ) return 0;  /* sprite ram available ??? 0B00 or 1200 */\n+#endif\n+\n+#if DEBUG_MODE\n+\tif( address >= 0x1b98 && address < 0x1c00 ) return 0;  /* soundshock x26 */\n+#endif\n+\n+\n+\tif( address == 0x1FEA ) return 0;  /* DM command */\n+\n+\n+\t//if( address == 0x1FE4 ) return 0;  /* DM ?? */\n+\t//if( address == 0x1FE6 ) return 0;  /* DM ?? */\n+\n+\treturn 1;\n+}\n+\n+\n+static uint32 paprium_r8(uint32 address)\n+{\n+\tint data = paprium_s.ram[address^1];\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_addr_test(address, 0) ) {\n+\t\tsprintf(error_str, \"[%04X:%04X] R8 %04X = %04X\\n\",\n+\t\t\t(m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff, address, data);\n+\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t}\n+#endif\n+\n+\n+\tif( address == 0x1800 )\n+\t\tdata = 0;\n+\n+\telse if( address >= 0x1880 && address < 0x1b00 ) {\n+\t\tdata = rand() % 256;\n+\t\t//paprium_s.ram[address^1] = data;  /* dma blowout if no limit */\n+\t}\n+\n+\n+\treturn data;\n+}\n+\n+\n+static uint32 paprium_r16(uint32 address)\n+{\n+\tint data = 0;\n+\n+\n+\tif( (address == 0xC000) && (paprium_s.decoder_size > 0) ) {\n+#if DEBUG_MODE\n+\t\tsprintf(error_str, \"[%d] Decoder %X %X @ C000\\n\", v_counter, paprium_s.decoder_ptr, paprium_s.decoder_size);\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+#endif\n+\n+\t\tint max, size;\n+\n+\t\tif( paprium_s.decoder_mode == 2 )\n+\t\t\tmax = 0x4000;\n+\n+\t\telse if( paprium_s.decoder_mode == 7 )\n+\t\t\tmax = 0x800;\n+\n+\n+\t\tsize = (paprium_s.decoder_size > max) ? max : paprium_s.decoder_size;\n+\n+\t\tmemcpy(paprium_s.ram + 0xC000, paprium_s.decoder_ram + paprium_s.decoder_ptr, size);\n+\n+\t\tpaprium_s.decoder_ptr += size;\n+\t\tpaprium_s.decoder_size -= size;\n+\t}\n+\n+\n+\tswitch( address ) {\n+\tcase 0x1FE4:\n+\t\tdata = 0xFFFF;\n+\t\tdata &= ~(1<<2);\n+\t\tdata &= ~(1<<6);\n+\t\tbreak;\n+\n+\tcase 0x1FE6:\n+\t\tdata = 0xFFFF;\n+\t\tdata &= ~(1<<14);\n+\t\tdata &= ~(1<<8);  /* sram */\n+\t\tdata &= ~(1<<9);  /* sram */\n+\t\tbreak;\n+\t\n+\tcase 0x1FEA:\n+\t\tdata = 0xFFFF;\n+\t\tdata &= ~(1<<15);\n+\t\tbreak;\n+\n+\tdefault:\n+\t\tdata = *(uint16 *)(paprium_s.ram + address);\n+\t\tbreak;\n+\t}\n+\n+\n+#if DEBUG_MODE\n+\tif( paprium_addr_test(address, 0) ) {\n+\t\tsprintf(error_str, \"[%d] [%04X:%04X] R16 %04X = %04X\\n\",\n+\t\t\tv_counter, (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff, address, data);\n+\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t}\n+#endif\n+\n+\treturn data;\n+}\n+\n+\n+static void paprium_w8(uint32 address, uint32 data)\n+{\n+#if DEBUG_MODE\n+\tif( paprium_addr_test(address, 1) ) {\n+\t\tsprintf(error_str, \"[%d] [%04X:%04X] W8 %04X = %02X\\n\",\n+\t\t\tv_counter, (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff, address, data);\n+\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t}\n+#endif\n+\n+\tpaprium_s.ram[address^1] = data;\n+}\n+\n+\n+static void paprium_w16(uint32 address, uint32 data)\n+{\n+#if DEBUG_MODE\n+\tif( paprium_addr_test(address, 1) ) {\n+\t\tsprintf(error_str, \"[%d] [%04X:%04X] W16 %04X = %04X\\n\",\n+\t\t\tv_counter, (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff, address, data);\n+\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\n+\t}\n+\n+\tif( address >= 0x1E10 && address <= 0x1E30 ) paprium_cmd_count++;\n+#endif\n+\n+\t*(uint16 *)(paprium_s.ram + address) = data;\n+\n+\tif( address == 0x1FEA ) {\n+\t\tpaprium_cmd(data);\n+\n+\t\tpaprium_cmd_count = 0;\n+\t}\n+}\n+\n+\n+static uint32 paprium_io_r8(uint32 address)\n+{\n+\tif( address == 0xA14101 )\n+\t\treturn paprium_tmss;\n+\n+\tctrl_io_read_byte(address);\n+}\n+\n+\n+static void paprium_io_w8(uint32 address, uint32 data)\n+{\n+\tif( address >= 0xA130F3 && address <= 0xA130FF )  /* no bank mapper */\n+\t\treturn;\n+\n+\tif( address == 0xA14101 ) {\n+\t\tpaprium_tmss = data;\n+\t\treturn;\n+\t}\n+\n+\tctrl_io_write_byte(address, data);\n+}\n+\n+\n+static void paprium_map()\n+{\n+    m68k.memory_map[0x00].base    = paprium_s.ram;\n+    m68k.memory_map[0x00].read8   = paprium_r8;\n+    m68k.memory_map[0x00].read16  = paprium_r16;\n+    m68k.memory_map[0x00].write8  = paprium_w8;\n+    m68k.memory_map[0x00].write16 = paprium_w16;\n+\n+\tm68k.memory_map[0xA1].read8  = paprium_io_r8;\n+\tm68k.memory_map[0xA1].write8 = paprium_io_w8;\n+\n+\tzbank_memory_map[0x00].read  = paprium_r8;\n+\tzbank_memory_map[0x00].write = paprium_w8;\n+}\n+\n+\n+static void paprium_init()\n+{\n+\tint ptr;\n+\n+\tpaprium_map();\n+\n+\n+\tmemset(&paprium_s, 0, sizeof(paprium_s));\n+\tmemcpy(paprium_s.ram, cart.rom, 0x10000);\n+\n+\n+#if 1  /* fast loadstate */\n+\tptr = (*(uint16*)(cart.rom + 0xaf77c) << 16) + *(uint16*)(cart.rom + 0xaf77e);\n+\n+\tpaprium_music_ptr = (*(uint16*)(cart.rom + 0x10054)<< 16) + *(uint16*)(cart.rom + 0x10056);\n+\t// (*(uint16*)(cart.rom + 0x10058)<< 16) + *(uint16*)(cart.rom + 0x1005a);\n+\tpaprium_wave_ptr = (*(uint16*)(cart.rom + ptr + 0x774)<< 16) + *(uint16*)(cart.rom + ptr + 0x776);\n+\t// (*(uint16*)(cart.rom + 0x1005c)<< 16) + *(uint16*)(cart.rom + 0x1005e);\n+\tpaprium_sfx_ptr = (*(uint16*)(cart.rom + ptr + 0x778)<< 16) + *(uint16*)(cart.rom + ptr + 0x77a);\n+\tpaprium_sprite_ptr = (*(uint16*)(cart.rom + 0x10014)<< 16) + *(uint16*)(cart.rom + 0x10016);\n+\tpaprium_tile_ptr = (*(uint16*)(cart.rom + ptr + 0x780)<< 16) + *(uint16*)(cart.rom + ptr + 0x782);\n+\n+\tpaprium_decoder_type(paprium_sprite_ptr, paprium_obj_ram);\n+\tpaprium_s.decoder_size = 0;\n+\n+\n+\tif(0) {  /* www.wavpack.com */\n+\t\t/* warn: adding payload after 8MB ROM breaks Mega CD */\n+\n+\t\tFILE *fp;\n+\n+#ifdef _WIN32\n+\t\tsprintf(error_str, \"%s\\\\paprium\\\\paprium.wav\", g_rom_dir);\n+#else\n+\t\tsprintf(error_str, \"%s/paprium/paprium.wav\", g_rom_dir);\n+#endif\n+\n+\t\tfp = fopen(error_str, \"rb\");\n+\t\tif(!fp) {\n+\t\t\t//MessageBoxA(0,\"help\",\"r\",0);\n+\t\t\texit(1);\n+\t\t}\n+\t\tfseek(fp, 0x2C, SEEK_SET);\n+\t\tint size = fread(paprium_wave_ram, 1, 0x180000, fp);\n+\t\tfor(int lcv = 0; lcv < size; lcv +=2 ) {\n+\t\t\tint data = *(uint16*)(paprium_wave_ram + lcv);\n+\t\t\tdata = ((data & 0xFF00) >> 8) + ((data & 0x00FF) << 8);\n+\t\t\t*(uint16*)(paprium_wave_ram + lcv) = data;\n+\t\t}\n+\t\tfclose(fp);\n+\t}\n+\n+\t*(uint16*)(paprium_s.ram + 0x192) = 0x3634;  /* 6-button, multitap */\n+#endif\n+\n+\n+\tpaprium_s.ram[0x1D1D^1] = 0x04;  /* rom ok - dynamic patch */\n+\tpaprium_s.ram[0x1D2C^1] = 0x67;\n+\n+\n+#if 1  /* boot hack */\n+\t*(uint16*) (paprium_s.ram + 0x1560) = 0x4EF9;\n+\t*(uint16*) (paprium_s.ram + 0x1562) = 0x0001;\n+\t*(uint16*) (paprium_s.ram + 0x1564) = 0x0100;\n+#endif\n+\n+\n+\tfast_dma_hack = 1;  /* skip vram management */\n+\n+\n+#if DEBUG_CHEAT  /* cheat - big hurt */\n+\t*(uint16*) (cart.rom + 0x9FE38 + 6) = 0x007F;\t/* Tug */\n+\t*(uint16*) (cart.rom + 0x9FE58 + 6) = 0x007F;\n+\t*(uint16*) (cart.rom + 0x9FF18 + 6) = 0x007F;\n+\t*(uint16*) (cart.rom + 0x9FF38 + 6) = 0x007F;\n+\n+\t*(uint16*) (cart.rom + 0x9FB58 + 6) = 0x007F;\t/* Alex */\n+\t*(uint16*) (cart.rom + 0x9FB78 + 6) = 0x007F;\n+\t*(uint16*) (cart.rom + 0x9FBF8 + 6) = 0x007F;\n+\t*(uint16*) (cart.rom + 0x9FC18 + 6) = 0x007F;\n+\t*(uint16*) (cart.rom + 0x9FCB8 + 6) = 0x007F;\n+\t*(uint16*) (cart.rom + 0x9FCD8 + 6) = 0x007F;\n+\n+\t*(uint16*) (cart.rom + 0x9F758 + 6) = 0x007F;\t/* Dice */\n+\t*(uint16*) (cart.rom + 0x9F778 + 6) = 0x007F;\n+\t*(uint16*) (cart.rom + 0x9F798 + 6) = 0x007F;\n+\t*(uint16*) (cart.rom + 0x9F7B8 + 6) = 0x007F;\n+\t*(uint16*) (cart.rom + 0x9F7D8 + 6) = 0x007F;\n+\t*(uint16*) (cart.rom + 0x9F898 + 6) = 0x007F;\n+#endif\n+\n+\n+#if 1  /* WM text - pre-irq delay */\n+\t*(uint16*)(cart.rom + 0xb9094) = 0x2079;\n+\t*(uint16*)(cart.rom + 0xb9096) = 0x000a;\n+\t*(uint16*)(cart.rom + 0xb9098) = 0xf85c;\n+\n+\t*(uint16*)(cart.rom + 0xb909a) = 0x20bc;\n+\t*(uint16*)(cart.rom + 0xb909c) = 0x0000;\n+\t*(uint16*)(cart.rom + 0xb909e) = 0x0003;\n+\n+\t*(uint16*)(cart.rom + 0xb90a0) = 0x20bc;\n+\t*(uint16*)(cart.rom + 0xb90a2) = 0x0000;\n+\t*(uint16*)(cart.rom + 0xb90a4) = 0x0003;\n+\n+\t*(uint16*)(cart.rom + 0xb90a6) = 0x20bc;\n+\t*(uint16*)(cart.rom + 0xb90a8) = 0x0000;\n+\t*(uint16*)(cart.rom + 0xb90aa) = 0x0003;\n+\n+\t*(uint16*)(cart.rom + 0xb90ac) = 0x20bc;\n+\t*(uint16*)(cart.rom + 0xb90ae) = 0x0000;\n+\t*(uint16*)(cart.rom + 0xb90b0) = 0x0003;\n+\n+\t*(uint16*)(cart.rom + 0xb90b2) = 0x20bc;\n+\t*(uint16*)(cart.rom + 0xb90b4) = 0x0000;\n+\t*(uint16*)(cart.rom + 0xb90b6) = 0x0003;\n+#endif\n+\n+\n+\tsrand((uintptr_t) &ptr);  /* discard time library */\n+\tpaprium_s.echo_pan = rand();\n+\n+\n+\tpaprium_s.music_segment = -1;\n+}\n+\n+\n+static void paprium_reset()\n+{\n+\tpaprium_init();\n+\n+\tmp3dec_init(&paprium_mp3d);\n+\n+\tmp3dec_init(&paprium_mp3d_boss1);\n+\tmp3dec_init(&paprium_mp3d_boss2);\n+\tmp3dec_init(&paprium_mp3d_boss3);\n+\tmp3dec_init(&paprium_mp3d_boss4);\n+\tpaprium_load_mp3_boss();\n+\n+\n+\t//extern int trace_start;\n+\t//trace_start = 1;\n+\tskip_boot1 = 1;\n+}\ndiff --git a/core/cd_hw/cdd.c b/core/cd_hw/cdd.c\nindex 45bc5bf3a..a20338bb4 100644\n--- a/core/cd_hw/cdd.c\n+++ b/core/cd_hw/cdd.c\n@@ -192,7 +192,8 @@ void cdd_init(int samplerate)\n {\n   /* CD-DA is running by default at 44100 Hz */\n   /* Audio stream is resampled to desired rate using Blip Buffer */\n-  blip_set_rates(snd.blips[2], 44100, samplerate);\n+  //blip_set_rates(snd.blips[2], 44100, samplerate);\n+  blip_set_rates(snd.blips[2], 48000, samplerate);\t/* paprium hack */\n }\n \n void cdd_reset(void)\n@@ -1811,82 +1812,6 @@ void cdd_update(void)\n   error(\"LBA = %d (track %d)(latency=%d)\\n\", cdd.lba, cdd.index, cdd.latency);\n #endif\n \n-  /* check if seeking is pending */\n-  if (cdd.pending)\n-  {\n-    /* reset track index */\n-    int index = 0;\n-\n-    /* new LBA position */\n-    int lba = ((scd.regs[0x44>>1].byte.h * 10 + scd.regs[0x44>>1].byte.l) * 60 +\n-               (scd.regs[0x46>>1].byte.h * 10 + scd.regs[0x46>>1].byte.l)) * 75 +\n-               (scd.regs[0x48>>1].byte.h * 10 + scd.regs[0x48>>1].byte.l) - 150;\n-\n-    /* CD drive latency */\n-    if (!cdd.latency)\n-    {\n-      /* Fixes a few games hanging because they expect data to be read with some delay */\n-      /* Wolf Team games (Annet Futatabi, Aisle Lord, Cobra Command, Earnest Evans, Road Avenger & Time Gal) need at least 11 interrupts delay  */\n-      /* Space Adventure Cobra (2nd morgue scene) needs at least 13 interrupts delay (incl. seek time, so 11 is OK) */\n-      /* By default, at least two interrupts latency is required by current emulation model (BIOS hangs otherwise) */\n-      cdd.latency = 2 + 9*config.cd_latency;\n-    }\n-\n-    /* CD drive seek time */\n-    /* max. seek time = 1.5 s = 1.5 x 75 = 112.5 CDD interrupts (rounded to 120) for 270000 sectors max on disc. */\n-    /* Note: This is only a rough approximation since, on real hardware, seek time is much likely not linear and */\n-    /* latency much larger than above value, but this model works fine for Sonic CD (track 26 playback needs to  */\n-    /* be enough delayed to start in sync with intro sequence, as compared with real hardware recording).        */\n-    /* It also works fine for Switch/Panic! intro (at least 30 interrupts are needed while seeking from 00:05:63 */\n-    /* to 24:03:19 in Switch or when seeking from 00:05:60 to 24:06:07 in Panic!). */\n-    if (lba > cdd.lba)\n-    {\n-      cdd.latency += (((lba - cdd.lba) * 120 * config.cd_latency) / 270000);\n-    }\n-    else\n-    {\n-      cdd.latency += (((cdd.lba - lba) * 120 * config.cd_latency) / 270000);\n-    }\n-\n-    /* update current LBA */\n-    cdd.lba = lba;\n-\n-    /* get track index */\n-    while ((cdd.toc.tracks[index].end <= lba) && (index < cdd.toc.last))\n-      index++;\n-\n-    /* audio track ? */\n-    if (cdd.toc.tracks[index].type == TYPE_AUDIO)\n-    {\n-      /* stay within track limits when seeking files */\n-      if (lba < cdd.toc.tracks[index].start)\n-      {\n-        lba = cdd.toc.tracks[index].start;\n-      }\n-\n-      /* seek to current track sector */\n-      cdd_seek_audio(index, lba);\n-    }\n-\n-    /* update current track index */\n-    cdd.index = index;\n-\n-    /* seek to current subcode position */\n-    if (cdd.toc.sub)\n-    {\n-      cdStreamSeek(cdd.toc.sub, lba * 96, SEEK_SET);\n-    }\n-\n-    /* no audio track playing (yet) */\n-    scd.regs[0x36>>1].byte.h = 0x01;\n-\n-    /* update CDD status with pending end status (will be reported to host once seeking has ended) */\n-    cdd.status = cdd.pending;\n-\n-    /* clear pending flag */\n-    cdd.pending = 0;\n-  }\n-\n   /* drive latency */\n   if (cdd.latency > 0)\n   {\n@@ -2034,6 +1959,82 @@ void cdd_update(void)\n       cdd.index = index;\n     }\n   }\n+\n+  /* check if seeking is pending */\n+  if (cdd.pending)\n+  {\n+    /* reset track index */\n+    int index = 0;\n+\n+    /* new LBA position */\n+    int lba = ((scd.regs[0x44>>1].byte.h * 10 + scd.regs[0x44>>1].byte.l) * 60 + \n+               (scd.regs[0x46>>1].byte.h * 10 + scd.regs[0x46>>1].byte.l)) * 75 +\n+               (scd.regs[0x48>>1].byte.h * 10 + scd.regs[0x48>>1].byte.l) - 150;\n+\n+    /* CD drive latency */\n+    if (!cdd.latency)\n+    {\n+      /* Fixes a few games hanging because they expect data to be read with some delay */\n+      /* Wolf Team games (Annet Futatabi, Aisle Lord, Cobra Command, Earnest Evans, Road Avenger & Time Gal) need at least 11 interrupts delay  */\n+      /* Space Adventure Cobra (2nd morgue scene) needs at least 13 interrupts delay (incl. seek time, so 11 is OK) */\n+      /* By default, at least two interrupts latency is required by current emulation model (BIOS hangs otherwise) */\n+      cdd.latency = 2 + 9*config.cd_latency;\n+    }\n+\n+    /* CD drive seek time */\n+    /* max. seek time = 1.5 s = 1.5 x 75 = 112.5 CDD interrupts (rounded to 120) for 270000 sectors max on disc. */\n+    /* Note: This is only a rough approximation since, on real hardware, seek time is much likely not linear and */\n+    /* latency much larger than above value, but this model works fine for Sonic CD (track 26 playback needs to  */\n+    /* be enough delayed to start in sync with intro sequence, as compared with real hardware recording).        */\n+    /* It also works fine for Switch/Panic! intro (at least 30 interrupts are needed while seeking from 00:05:63 */\n+    /* to 24:03:19 in Switch or when seeking from 00:05:60 to 24:06:07 in Panic!). */\n+    if (lba > cdd.lba)\n+    {\n+      cdd.latency += (((lba - cdd.lba) * 120 * config.cd_latency) / 270000);\n+    }\n+    else \n+    {\n+      cdd.latency += (((cdd.lba - lba) * 120 * config.cd_latency) / 270000);\n+    }\n+\n+    /* update current LBA */\n+    cdd.lba = lba;\n+\n+    /* get track index */\n+    while ((cdd.toc.tracks[index].end <= lba) && (index < cdd.toc.last))\n+      index++;\n+\n+    /* audio track ? */\n+    if (cdd.toc.tracks[index].type == TYPE_AUDIO)\n+    {\n+      /* stay within track limits when seeking files */\n+      if (lba < cdd.toc.tracks[index].start) \n+      {\n+        lba = cdd.toc.tracks[index].start;\n+      }\n+\n+      /* seek to current track sector */\n+      cdd_seek_audio(index, lba);\n+    }\n+\n+    /* update current track index */\n+    cdd.index = index;\n+\n+    /* seek to current subcode position */\n+    if (cdd.toc.sub)\n+    {\n+      cdStreamSeek(cdd.toc.sub, lba * 96, SEEK_SET);\n+    }\n+\n+    /* no audio track playing (yet) */\n+    scd.regs[0x36>>1].byte.h = 0x01;\n+\n+    /* update CDD status with pending end status (will be reported to host once seeking has ended) */\n+    cdd.status = cdd.pending;\n+\n+    /* clear pending flag */\n+    cdd.pending = 0;\n+  }\n }\n \n void cdd_process(void)\ndiff --git a/core/m68k/m68kcpu.c b/core/m68k/m68kcpu.c\nindex 5382ce422..237fb1cc1 100644\n--- a/core/m68k/m68kcpu.c\n+++ b/core/m68k/m68kcpu.c\n@@ -2,6 +2,8 @@\n /*                            MAIN 68K CORE                                 */\r\n /* ======================================================================== */\r\n \r\n+#define DEBUG_TRACE 0\r\n+\r\n extern int vdp_68k_irq_ack(int int_level);\r\n \r\n #define m68ki_cpu m68k\r\n@@ -31,6 +33,11 @@ static int irq_latency;\n \r\n m68ki_cpu_core m68k;\r\n \r\n+#if DEBUG_TRACE\r\n+#include <windows.h>\r\n+#include \"m68kd.h\"\r\n+#include \"shared.h\"\r\n+#endif\r\n \r\n /* ======================================================================== */\r\n /* =============================== CALLBACKS ============================== */\r\n@@ -296,6 +303,13 @@ void m68k_run(unsigned int cycles)\n       cpu_hook(HOOK_M68K_E, 0, REG_PC, 0);\r\n #endif\r\n \r\n+#if DEBUG_TRACE\r\n+\t{\r\n+\t\tm68k.prev_pc = m68k.pc;\r\n+\t\ttrace_m68k();\r\n+\t}\r\n+#endif\r\n+\r\n     /* Decode next instruction */\r\n     REG_IR = m68ki_read_imm_16();\r\n \r\ndiff --git a/core/m68k/m68kcpu.h b/core/m68k/m68kcpu.h\nindex 424d68723..3655f91a3 100644\n--- a/core/m68k/m68kcpu.h\n+++ b/core/m68k/m68kcpu.h\n@@ -154,8 +154,8 @@\n   /* We have to do this because the morons at ANSI decided that shifts\r\n      * by >= data size are undefined.\r\n      */\r\n-  #define LSR_32(A, C) ((C) < 32 ? (A) >> (C) : 0)\r\n-  #define LSL_32(A, C) ((C) < 32 ? (A) << (C) : 0)\r\n+  #define LSR_32(A, C) (((C) < 32) ? (A) >> (C) : 0)\r\n+  #define LSL_32(A, C) (((C) < 32) ? (A) << (C) : 0)\r\n #endif /* M68K_INT_GT_32_BIT */\r\n \r\n #if M68K_USE_64_BIT\r\ndiff --git a/core/m68k/m68kd.h b/core/m68k/m68kd.h\nnew file mode 100644\nindex 000000000..4b4424882\n--- /dev/null\n+++ b/core/m68k/m68kd.h\n@@ -0,0 +1,1162 @@\n+//#include <stdio.h>\r\n+\r\n+static FILE *fp_trace_m68k;\r\n+static char map_m68k[0x100 * 0x10000];\r\n+\r\n+\r\n+static char Dbg_Str[64];\r\n+static char Dbg_EA_Str[32];\r\n+static char Dbg_Size_Str[3];\r\n+static char Dbg_Cond_Str[3];\r\n+\r\n+static unsigned short (*Next_Word)();\r\n+static unsigned int (*Next_Long)();\r\n+\r\n+int trace_start;\r\n+\r\n+\r\n+static char *Make_Dbg_EA_Str(int Size, int EA_Num, int Reg_Num)\r\n+{\r\n+\tint i;\r\n+\tDbg_EA_Str[31] = 0;\r\n+\r\n+\tswitch(EA_Num)\r\n+\t{\r\n+\t\tcase 0:\r\n+\t\t\t// 000 rrr  Dr\r\n+\t\t\tsprintf(Dbg_EA_Str, \"D%.1d%c\", Reg_Num, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 1:\r\n+\t\t\t// 001 rrr  Ar\r\n+\t\t\tsprintf(Dbg_EA_Str, \"A%.1d%c\", Reg_Num, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 2:\r\n+\t\t\t// 010 rrr  (Ar)\r\n+\t\t\tsprintf(Dbg_EA_Str, \"(A%.1d)%c\", Reg_Num, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 3:\r\n+\t\t\t// 011 rrr  (Ar)+\r\n+\t\t\tsprintf(Dbg_EA_Str, \"(A%.1d)+%c\", Reg_Num, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 4:\r\n+\t\t\t// 100 rrr  -(Ar)\r\n+\t\t\tsprintf(Dbg_EA_Str, \"-(A%.1d)%c\", Reg_Num, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 5:\r\n+\t\t\t// 101 rrr  d16(Ar)     dddddddd dddddddd\r\n+\t\t\tsprintf(Dbg_EA_Str, \"$%.4X(A%.1d)%c\", Next_Word(), Reg_Num, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 6:\r\n+\t\t\t// 110 rrr  d8(Ar,ix)   aiiizcc0 dddddddd\r\n+\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\tif (i & 0x8000)\r\n+\t\t\t\tsprintf(Dbg_EA_Str, \"$%.2X(A%.1d,A%.1d)%c\", i & 0xFF, Reg_Num, (i >> 12) & 0x7, 0);\r\n+\t\t\telse\r\n+  \t\t\t\tsprintf(Dbg_EA_Str, \"$%.2X(A%.1d,D%.1d)%c\", i & 0xFF, Reg_Num, (i >> 12) & 0x7, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 7:\r\n+\t\t\tswitch(Reg_Num)\r\n+\t\t\t{\r\n+\t\t\t\tcase 0:\r\n+\t\t\t\t\t// 111 000  addr16      dddddddd dddddddd\r\n+\t\t\t\t\tsprintf(Dbg_EA_Str, \"($%.4X)%c\", Next_Word(), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 1:\r\n+\t\t\t\t\t// 111 001  addr32      dddddddd dddddddd ddddddddd dddddddd\r\n+\t\t\t\t\tsprintf(Dbg_EA_Str, \"($%.8X)%c\", Next_Long(), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 2:\r\n+\t\t\t\t\t// 111 010  d16(PC)     dddddddd dddddddd\r\n+\t\t\t\t\tsprintf(Dbg_EA_Str, \"$%.4X(PC)%c\", Next_Word(), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 3:\r\n+\t\t\t\t\t// 111 011  d8(PC,ix)   aiiiz000 dddddddd\r\n+\t\t\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\t\t\tif (i & 0x8000)\r\n+\t\t\t\t\t\tsprintf(Dbg_EA_Str, \"$%.2X(PC,A%.1d)%c\", i & 0xFF, (i >> 12) & 0x7, 0);\r\n+\t\t\t\t\telse\r\n+\t\t\t\t\t\tsprintf(Dbg_EA_Str, \"$%.2X(PC,D%.1d)%c\", i & 0xFF, (i >> 12) & 0x7, 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 4:\r\n+\t\t\t\t\t// 111 100  imm/implied\r\n+\t\t\t\t\tswitch(Size)\r\n+\t\t\t\t\t{\r\n+\t\t\t\t\t\tcase 0:\r\n+\t\t\t\t\t\t\tsprintf(Dbg_EA_Str, \"#$%.2X%c\", Next_Word() & 0xFF, 0);\r\n+\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\tcase 1:\r\n+\t\t\t\t\t\t\tsprintf(Dbg_EA_Str, \"#$%.4X%c\", Next_Word(), 0);\r\n+\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\tcase 2:\r\n+\t\t\t\t\t\t\tsprintf(Dbg_EA_Str, \"#$%.8X%c\", Next_Long(), 0);\r\n+\t\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t}\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\t\t}\r\n+\r\n+\treturn(Dbg_EA_Str);\r\n+}\r\n+\r\n+\r\n+static char *Make_Dbg_Size_Str(int Size)\r\n+{\r\n+\tDbg_Size_Str[2] = 0;\r\n+\tsprintf(Dbg_Size_Str, \".?\");\r\n+\r\n+\tswitch(Size)\r\n+\t{\r\n+\t\tcase 0:\r\n+\t\t\tsprintf(Dbg_Size_Str, \".B\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 1:\r\n+\t\t\tsprintf(Dbg_Size_Str, \".W\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 2:\r\n+\t\t\tsprintf(Dbg_Size_Str, \".L\");\r\n+\t\t\tbreak;\r\n+\t}\r\n+\r\n+\treturn(Dbg_Size_Str);\r\n+}\r\n+\r\n+\r\n+static char *Make_Dbg_Size_Str_2(int Size)\r\n+{\r\n+\tDbg_Size_Str[2] = 0;\r\n+\tsprintf(Dbg_Size_Str, \".?\");\r\n+\r\n+\tswitch(Size)\r\n+\t{\r\n+\t\tcase 0:\r\n+\t\t\tsprintf(Dbg_Size_Str, \".W\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 1:\r\n+\t\t\tsprintf(Dbg_Size_Str, \".L\");\r\n+\t\t\tbreak;\r\n+\t}\r\n+\r\n+\treturn(Dbg_Size_Str);\r\n+}\r\n+\r\n+static char *Make_Dbg_Cond_Str(int Cond)\r\n+{\r\n+\tDbg_Cond_Str[2] = 0;\r\n+\tsprintf(Dbg_Cond_Str, \"??\");\r\n+\r\n+\tswitch(Cond)\r\n+\t{\r\n+\t\tcase 0:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"Tr\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 1:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"Fa\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 2:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"HI\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 3:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"LS\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 4:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"CC\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 5:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"CS\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 6:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"NE\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 7:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"EQ\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 8:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"VC\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 9:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"VS\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 10:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"PL\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 11:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"MI\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 12:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"GE\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 13:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"LT\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 14:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"GT\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 15:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"LE\");\r\n+\t\t\tbreak;\r\n+    }\r\n+\r\n+\treturn(Dbg_Cond_Str);\r\n+}\r\n+\r\n+\r\n+static char *M68KDisasm(unsigned short (*NW)(), unsigned int (*NL)(), unsigned int hook_pc )\r\n+{\r\n+\tint i;\r\n+\tunsigned short OPC;\r\n+\tstatic char Tmp_Str[64];\r\n+\r\n+\tDbg_Str[63] = 0;\r\n+\tTmp_Str[63] = 0;\r\n+\r\n+\tNext_Word = NW;\r\n+\tNext_Long = NL;\r\n+\r\n+\tOPC = Next_Word();\r\n+\r\n+\tsprintf(Dbg_Str, \"Unknown Opcode%c\", 0);\r\n+\r\n+\tswitch(OPC >> 12)\r\n+\t{\r\n+\t\tcase 0:\r\n+\r\n+\t\tif (OPC & 0x100)\r\n+\t\t{\r\n+\t\t\tif ((OPC & 0x038) == 0x8)\r\n+\t\t\t{\r\n+\t\t\t\tif (OPC & 0x080)\r\n+\t\t\t\t\t//MOVEP.z Ds,d16(Ad)\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"MOVEP%-3sD%.1d,#$%.4X(A%.1d)%c\", Make_Dbg_Size_Str_2((OPC & 0x40) >> 6), (OPC & 0xE00) >> 9, Next_Word(), OPC & 0x7, 0);\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//MOVEP.z d16(As),Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"MOVEP%-3s#$%.4X(A%.1d),D%.1d%c\", Make_Dbg_Size_Str_2((OPC & 0x40) >> 6), Next_Word(), OPC & 0x7, (OPC & 0xE00) >> 9, 0);\r\n+\t\t\t}\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tswitch((OPC >> 6) & 0x3)\r\n+\t\t\t\t{\r\n+\t\t\t\t\tcase 0:\r\n+\t\t\t\t\t\t//BTST  Ds,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"BTST    D%.1d,%s%c\", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 1:\r\n+\t\t\t\t\t\t//BCHG  Ds,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"BCHG    D%.1d,%s%c\", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 2:\r\n+\t\t\t\t\t\t//BCLR  Ds,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"BCLR    D%.1d,%s%c\", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 3:\r\n+\t\t\t\t\t\t//BSET  Ds,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"BSET    D%.1d,%s%c\", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\t\t\t}\r\n+\t\t}\r\n+\t\telse\r\n+\t\t{\r\n+\t\t\tswitch((OPC >> 6) & 0x3F)\r\n+\t\t\t{\r\n+\t\t\t\tcase 0:\r\n+\t\t\t\t\t//ORI.B  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ORI.B   #$%.2X,%s%c\", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 1:\r\n+\t\t\t\t\t//ORI.W  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ORI.W   #$%.4X,%s%c\", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 2:\r\n+\t\t\t\t\t//ORI.L  #k,a\r\n+\t\t\t\t\ti = Next_Long();\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ORI.L   #$%.8X,%s%c\", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 8:\r\n+\t\t\t\t\t//ANDI.B  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ANDI.B  #$%.2X,%s%c\", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 9:\r\n+\t\t\t\t\t//ANDI.W  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ANDI.W  #$%.4X,%s%c\", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 10:\r\n+\t\t\t\t\t//ANDI.L  #k,a\r\n+\t\t\t\t\ti = Next_Long();\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ANDI.L  #$%.8X,%s%c\", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 16:\r\n+\t\t\t\t\t//SUBI.B  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SUBI.B  #$%.2X,%s%c\", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 17:\r\n+\t\t\t\t\t//SUBI.W  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SUBI.W  #$%.4X,%s%c\", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 18:\r\n+\t\t\t\t\t//SUBI.L  #k,a\r\n+\t\t\t\t\ti = Next_Long();\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SUBI.L  #$%.8X,%s%c\", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 24:\r\n+\t\t\t\t\t//ADDI.B  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ADDI.B  #$%.2X,%s%c\", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 25:\r\n+\t\t\t\t\t//ADDI.W  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ADDI.W  #$%.4X,%s%c\", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 26:\r\n+\t\t\t\t\t//ADDI.L  #k,a\r\n+\t\t\t\t\ti = Next_Long();\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ADDI.L  #$%.8X,%s%c\", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 32:\r\n+\t\t\t\t\t//BTST  #n,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BTST    #%d,%s%c\", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 33:\r\n+\t\t\t\t\t//BCHG  #n,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BCHG    #%d,%s%c\", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 34:\r\n+\t\t\t\t\t//BCLR  #n,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BCLR    #%d,%s%c\", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 35:\r\n+\t\t\t\t\t//BSET  #n,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BSET    #%d,%s%c\", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 40:\r\n+\t\t\t\t\t//EORI.B  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"EORI.B  #$%.2X,%s%c\", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 41:\r\n+\t\t\t\t\t//EORI.W  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"EORI.W  #$%.4X,%s%c\", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 42:\r\n+\t\t\t\t\t//EORI.L  #k,a\r\n+\t\t\t\t\ti = Next_Long();\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"EORI.L  #$%.8X,%s%c\", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 48:\r\n+\t\t\t\t\t//CMPI.B  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"CMPI.B  #$%.2X,%s%c\", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 49:\r\n+\t\t\t\t\t//CMPI.W  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"CMPI.W  #$%.4X,%s%c\", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 50:\r\n+\t\t\t\t\t//CMPI.L  #k,a\r\n+\t\t\t\t\ti = Next_Long();\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"CMPI.L  #$%.8X,%s%c\", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\t\t}\r\n+\t\tbreak;\r\n+\r\n+\t\tcase 1:\r\n+\t\t\t//MOVE.b  as,ad\r\n+\t\t\tsprintf(Tmp_Str, \"%s%c\", Make_Dbg_EA_Str(0, (OPC >> 3) & 0x7, OPC & 0x7), 0);\r\n+\t\t\tsprintf(Dbg_Str, \"MOVE.b  %s,%s%c\", Tmp_Str, Make_Dbg_EA_Str(0, (OPC >> 6) & 0x7, (OPC >> 9) & 0x7), 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 2:\r\n+\t\t\t//MOVE.l  as,ad\r\n+\t\t\tsprintf(Tmp_Str, \"%s%c\", Make_Dbg_EA_Str(2, (OPC >> 3) & 0x7, OPC & 0x7), 0);\r\n+\t\t\tsprintf(Dbg_Str, \"MOVE.l  %s,%s%c\", Tmp_Str, Make_Dbg_EA_Str(2, (OPC >> 6) & 0x7, (OPC >> 9) & 0x7), 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 3:\r\n+\t\t\t//MOVE.w  as,ad\r\n+\t\t\tsprintf(Tmp_Str, \"%s%c\", Make_Dbg_EA_Str(1, (OPC >> 3) & 0x7, OPC & 0x7), 0);\r\n+\t\t\tsprintf(Dbg_Str, \"MOVE.w  %s,%s%c\", Tmp_Str, Make_Dbg_EA_Str(1, (OPC >> 6) & 0x7, (OPC >> 9) & 0x7), 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 4:\r\n+\t\t\t//SPECIALS ...\r\n+\r\n+\t\t\tif (OPC & 0x100)\r\n+\t\t\t{\r\n+\t\t\t\tif (OPC & 0x40)\r\n+\t\t\t\t\t//LEA  a,Ad\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"LEA     %s,A%.1d%c\", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//CHK.W  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"CHK.W   %s,D%.1d%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t}\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tswitch((OPC >> 6) & 0x3F)\r\n+\t\t\t\t{\r\n+\t\t\t\t\tcase 0:\tcase 1: case 2:\r\n+\t\t\t\t\t\t//NEGX.z  a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"NEGX%-4s%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 3:\r\n+\t\t\t\t\t\t//MOVE  SR,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"MOVE    SR,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 8: case 9: case 10:\r\n+\t\t\t\t\t\t//CLR.z  a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"CLR%-5s%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 16: case 17: case 18:\r\n+\t\t\t\t\t\t//NEG.z  a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"NEG%-5s%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 19:\r\n+\t\t\t\t\t\t//MOVE  a,CCR\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"MOVE    %s,CCR%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 24: case 25: case 26:\r\n+\t\t\t\t\t\t//NOT.z  a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"NOT%-5s%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 27:\r\n+\t\t\t\t\t\t//MOVE  a,SR\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"MOVE    %s,SR%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 32:\r\n+\t\t\t\t\t\t//NBCD  a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"NBCD    %s%c\", Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 33:\r\n+\r\n+\t\t\t\t\t\tif (OPC & 0x38)\r\n+\t\t\t\t\t\t\t//PEA  a\r\n+\t\t\t\t\t\t\tsprintf(Dbg_Str, \"PEA     %s%c\", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\telse\r\n+\t\t\t\t\t\t\t//SWAP.w  Dd\r\n+\t\t\t\t\t\t\tsprintf(Dbg_Str, \"SWAP.w  D%d%c\", OPC & 0x7, 0);\r\n+\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 34: case 35:\r\n+\r\n+\t\t\t\t\t\tif (OPC & 0x38)\r\n+\t\t\t\t\t\t{\r\n+\t\t\t\t\t\t\tint registers_a7_d0 = Next_Word();\r\n+\r\n+\t\t\t\t\t\t\t//MOVEM.z Reg-List,a\r\n+\t\t\t\t\t\t\tsprintf(Dbg_Str, \"MOVEM%-3s{d0-a7}[%02x %02x],%s%c\", Make_Dbg_Size_Str_2((OPC >> 6) & 1),\r\n+\t\t\t\t\t\t\t\tregisters_a7_d0 >> 8, registers_a7_d0 & 0xff,\r\n+\t\t\t\t\t\t\t\tMake_Dbg_EA_Str((OPC >> 6) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\t\t//Next_Word();\r\n+\t\t\t\t\t\t}\r\n+\t\t\t\t\t\telse\r\n+\t\t\t\t\t\t\t//EXT.z  Dd\r\n+\t\t\t\t\t\t\tsprintf(Dbg_Str, \"EXT%-5s%s%c\", Make_Dbg_Size_Str_2((OPC >> 6) & 1), Make_Dbg_EA_Str((OPC >> 6) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 40: case 41: case 42:\r\n+\t\t\t\t\t\t//TST.z a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"TST%-5s%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 0x3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 43:\r\n+\t\t\t\t\t\t//TAS.b a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"TAS.B %s%c\", Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 48: case 49:\r\n+\t\t\t\t\t\t//Bad Opcode\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"Bad Opcode%c\", 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 50: case 51: {\r\n+\t\t\t\t\t\tint registers_d0_a7 = Next_Word();\r\n+\r\n+\t\t\t\t\t\t//MOVEM.z a,Reg-List\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"MOVEM%-3s%s,{a7-d0}[%02x %02x]%c\", Make_Dbg_Size_Str_2((OPC >> 6) & 1), Make_Dbg_EA_Str((OPC >> 6) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7),\r\n+\t\t\t\t\t\t\tregisters_d0_a7 >> 8, registers_d0_a7 & 0xff,\r\n+\t\t\t\t\t\t\t0);\r\n+\t\t\t\t\t\t//Next_Word();\r\n+\t\t\t\t\t\t}\tbreak;\r\n+\r\n+\t\t\t\t\tcase 57:\r\n+\r\n+\t\t\t\t\t\tswitch((OPC >> 3) & 0x7)\r\n+\t\t\t\t\t\t{\r\n+\t\t\t\t\t\t\tcase 0: case 1:\r\n+\t\t\t\t\t\t\t\t//TRAP  #vector\r\n+\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"TRAP    #$%.1X%c\", OPC & 0xF, 0);\r\n+\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\tcase 2:\r\n+\t\t\t\t\t\t\t\t//LINK As,#k16\r\n+\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"LINK    A%.1d,#$%.4X%c\", OPC & 0x7, Next_Word(), 0);\r\n+\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\tcase 3:\r\n+\t\t\t\t\t\t\t\t//ULNK Ad\r\n+\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"ULNK    A%.1d%c\", OPC & 0x7, 0);\r\n+\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\tcase 4:\r\n+\t\t\t\t\t\t\t\t//MOVE As,USP\r\n+\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"MOVE    A%.1d,USP%c\",OPC & 0x7, 0);\r\n+\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\tcase 5:\r\n+\t\t\t\t\t\t\t\t//MOVE USP,Ad\r\n+\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"MOVE    USP,A%.1d%c\",OPC & 0x7, 0);\r\n+\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\tcase 6:\r\n+\r\n+\t\t\t\t\t\t\t\tswitch(OPC & 0x7)\r\n+\t\t\t\t\t\t\t\t{\r\n+\t\t\t\t\t\t\t\t\tcase 0:\r\n+\t\t\t\t\t\t\t\t\t\t//RESET\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"RESET%c\", 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\t\t\tcase 1:\r\n+\t\t\t\t\t\t\t\t\t\t//NOP\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"NOP%c\", 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\t\t\tcase 2:\r\n+\t\t\t\t\t\t\t\t\t\t//STOP #k16\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"STOP    #$%.4X%c\", Next_Word(), 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\t\t\tcase 3:\r\n+\t\t\t\t\t\t\t\t\t\t//RTE\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"RTE%c\", 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\t\t\tcase 4:\r\n+\t\t\t\t\t\t\t\t\t\t//Bad Opcode\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"Bad Opcode%c\", 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\t\t\tcase 5:\r\n+\t\t\t\t\t\t\t\t\t\t//RTS\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"RTS%c\", 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\t\t\tcase 6:\r\n+\t\t\t\t\t\t\t\t\t\t//TRAPV\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"TRAPV%c\", 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\t\t\tcase 7:\r\n+\t\t\t\t\t\t\t\t\t\t//RTR\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"RTR%c\", 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t\t\t\t}\r\n+\t\t\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t\t}\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 58:\r\n+\t\t\t\t\t\t//JSR  a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"JSR     %s%c\", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 59:\r\n+\t\t\t\t\t\t//JMP  a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"JMP     %s%c\", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 5:\r\n+\r\n+\t\t\tif ((OPC & 0xC0) == 0xC0)\r\n+\t\t\t{\r\n+        char offset = OPC & 0xFF;\r\n+\t\t\t\t\r\n+\t\t\t\tif ((OPC & 0x38) == 0x08) {\r\n+\t\t\t\t\tunsigned short word = Next_Word();\r\n+\r\n+\t\t\t\t\t//DBCC  Ds,label\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"DB%-6sD%.1d,#$%.4X [%02X:%04X]%c\", Make_Dbg_Cond_Str((OPC >> 8) & 0xF), OPC & 0x7, word,\r\n+            (hook_pc + 2) >> 16, (hook_pc + 2 + word) & 0xffff, 0);\r\n+\t\t\t\t}\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//STCC.b  a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ST%-6s%s [%02X:%04X]%c\", Make_Dbg_Cond_Str((OPC >> 8) & 0xF), Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7),\r\n+            (hook_pc + 2) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);\r\n+\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tif (OPC & 0x100)\r\n+\t\t\t\t\t//SUBQ.z  #k3,a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SUBQ%-4s#%.1d,%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//ADDQ.z  #k3,a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ADDQ%-4s#%.1d,%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 6:\r\n+\r\n+\t\t\tif (OPC & 0xFF)\r\n+\t\t\t{\r\n+\t\t\t\tint offset = (char) (OPC & 0xFF);\r\n+\r\n+\t\t\t\tif ((OPC & 0xF00) == 0x100)\r\n+\t\t\t\t{\r\n+\t\t\t\t\t//BSR  label\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BSR     #$%.2X [%02X:%04X]%c\", OPC & 0xFF,\r\n+\t\t\t\t\t\t(hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\r\n+\t\t\t\tif (!(OPC & 0xF00))\r\n+\t\t\t\t{\r\n+\t\t\t\t\t//BRA  label\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BRA     #$%.2X [%02X:%04X]%c\", OPC & 0xFF,\r\n+\t\t\t\t\t\t(hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\r\n+\t\t\t\t//BCC  label\r\n+\t\t\t\tsprintf(Dbg_Str, \"B%-7s#$%.2X [%02X:%04X]%c\",\r\n+\t\t\t\t\tMake_Dbg_Cond_Str((OPC >> 8) & 0xF), OPC & 0xFF,\r\n+\t\t\t\t\t(hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);\r\n+\t\t\t}\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tint offset = (short)(Next_Word());\r\n+\r\n+\t\t\t\tif ((OPC & 0xF00) == 0x100)\r\n+\t\t\t\t{\r\n+\t\t\t\t\t//BSR  label\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BSR     #$%.4X [%02X:%04X]%c\", offset,\r\n+\t\t\t\t\t\t(hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\r\n+\t\t\t\tif (!(OPC & 0xF00))\r\n+\t\t\t\t{\r\n+\t\t\t\t\t//BRA  label\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BRA     #$%.4X [%02X:%04X]%c\", offset,\r\n+\t\t\t\t\t\t(hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\r\n+\t\t\t\t//BCC  label\r\n+\t\t\t\tsprintf(Dbg_Str, \"B%-7s#$%.4X [%02X:%04X]%c\",\r\n+\t\t\t\t\tMake_Dbg_Cond_Str((OPC >> 8 ) & 0xF), offset,\r\n+\t\t\t\t\t(hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 7:\r\n+\t\t\t//MOVEQ  #k8,Dd\r\n+\t\t\tsprintf(Dbg_Str, \"MOVEQ   #$%.2X,D%.1d%c\", OPC & 0xFF, (OPC >> 9) & 0x7, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 8:\r\n+\r\n+\t\t\tif (OPC & 0x100)\r\n+  \t\t\t{\r\n+\t\t\t\tif (!(OPC & 0xF8))\r\n+\t\t\t\t{\r\n+\t\t\t\t\t//SBCD  Ds,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SBCD D%.1d,D%.1d%c\", OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\r\n+\t\t\t\tif ((OPC & 0xF8) == 0x8)\r\n+\t\t\t\t{\r\n+\t\t\t\t\t//SBCD  -(As),-(Ad)\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SBCD -(A%.1d),-(A%.1d)%c\", OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\r\n+\t\t\t\tif ((OPC & 0xC0) == 0xC0)\r\n+\t\t\t\t\t//DIVS.w  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"DIVS.W  %s,D%.1d%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//OR.z  Ds,a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"OR%-6sD%.1d;%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t}\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tif ((OPC & 0xC0) == 0xC0)\r\n+\t\t\t\t\t//DIVU.w  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"DIVU.W  %s,D%.1d%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//OR.z  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"OR%-6s%s,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 9:\r\n+\r\n+\t\t\tif ((OPC & 0xC0) == 0xC0)\r\n+\t\t\t\t//SUBA.z  a,Ad\r\n+\t\t\t\tsprintf(Dbg_Str, \"SUBA%-4s%s,A%.1d%c\", Make_Dbg_Size_Str_2((OPC >> 8) & 1), Make_Dbg_EA_Str((OPC >> 8) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tif (OPC & 0x100)\r\n+\t\t\t\t{\r\n+\t\t\t\t\tif (!(OPC & 0x38))\r\n+\t\t\t\t\t{\r\n+\t\t\t\t\t\t//SUBX.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"SUBX%-4sD%.1d,D%.1d%c\",\tMake_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t}\r\n+\r\n+\t\t\t\t\tif ((OPC & 0x38) == 0x8)\r\n+\t\t\t\t\t{\r\n+\t\t\t\t\t\t//SUBX.z  -(As),-(Ad)\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"SUBX%-4s-(A%.1d),-(A%.1d)%c\",\tMake_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t}\r\n+\r\n+\t\t\t\t\t//SUB.z  Ds,a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SUB%-5sD%.1d,%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t}\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//SUB.z  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SUB%-5s%s,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 10:\r\n+\t\t\t//Bad Opcode\r\n+\t\t\tsprintf(Dbg_Str, \"Bad Opcode%c\", 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 11:\r\n+\r\n+\t\t\tif ((OPC & 0xC0) == 0xC0)\r\n+\t\t\t\t//CMPA.z  a,Ad\r\n+\t\t\t\tsprintf(Dbg_Str, \"CMPA%-4s%s,A%.1d%c\", Make_Dbg_Size_Str_2((OPC >> 8) & 1), Make_Dbg_EA_Str((OPC >> 7) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tif (OPC & 0x100)\r\n+\t\t\t\t{\r\n+\t\t\t\t\tif ((OPC & 0x38) == 0x8)\r\n+\t\t\t\t\t{\r\n+\t\t\t\t\t\t//CMPM.z  (As)+,(Ad)+\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"CMPM%-4s(A%.1d)+,(A%.1d)+%c\",\tMake_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t}\r\n+\r\n+\t\t\t\t\t//EOR.z  Ds,a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"EOR%-5sD%.1d,%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t}\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//CMP.z  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"CMP%-5s%s,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 12:\r\n+\r\n+\t\t\tif ((OPC & 0X1F8) == 0x100)\r\n+\t\t\t{\r\n+\t\t\t\t//ABCD Ds,Dd\r\n+\t\t\t\tsprintf(Dbg_Str, \"ABCD    D%.1d,D%.1d%c\", OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\r\n+\t\t\tif ((OPC & 0X1F8) == 0x140)\r\n+\t\t\t{\r\n+\t\t\t\t//EXG.l Ds,Dd\r\n+\t\t\t\tsprintf(Dbg_Str, \"EXG.L   D%.1d,D%.1d%c\", OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\r\n+\t\t\tif ((OPC & 0X1F8) == 0x108)\r\n+\t\t\t{\r\n+\t\t\t\t//ABCD -(As),-(Ad)\r\n+\t\t\t\tsprintf(Dbg_Str, \"ABCD    -(A%.1d),-(A%.1d)%c\", OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\r\n+\t\t\tif ((OPC & 0X1F8) == 0x148)\r\n+\t\t\t{\r\n+\t\t\t\t//EXG.l As,Ad\r\n+\t\t\t\tsprintf(Dbg_Str, \"EXG.L   A%.1d,A%.1d%c\", OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\r\n+\t\t\tif ((OPC & 0X1F8) == 0x188)\r\n+\t\t\t{\r\n+\t\t\t\t//EXG.l As,Dd\r\n+\t\t\t\tsprintf(Dbg_Str, \"EXG.L   A%.1d,D%.1d%c\", OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\r\n+\t\t\tswitch((OPC\t>> 6) & 0x7)\r\n+\t\t\t{\r\n+\t\t\t\tcase 0: case 1: case 2:\r\n+\t\t\t\t\t//AND.z  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"AND%-5s%s,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 3:\r\n+\t\t\t\t\t//MULU.w  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"MULU.W  %s,D%.1d%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 4: case 5: case 6:\r\n+\t\t\t\t\t//AND.z  Ds,a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"AND%-5sD%.1d,%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 7:\r\n+\t\t\t\t\t//MULS.w  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"MULS.W  %s,D%.1d%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 13:\r\n+\r\n+\t\t\tif ((OPC & 0xC0) == 0xC0)\r\n+\t\t\t\t//ADDA.z  a,Ad\r\n+\t\t\t\tsprintf(Dbg_Str, \"ADDA%-4s%s,A%.1d%c\", Make_Dbg_Size_Str_2((OPC >> 8) & 1), Make_Dbg_EA_Str((OPC >> 8) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tif (OPC & 0x100)\r\n+\t\t\t\t{\r\n+\t\t\t\t\tif (!(OPC & 0x38))\r\n+\t\t\t\t\t{\r\n+\t\t\t\t\t\t//ADDX.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ADDX%-4sD%.1d,D%.1d%c\",\tMake_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t}\r\n+\r\n+\t\t\t\t\tif ((OPC & 0x38) == 0x8)\r\n+\t\t\t\t\t{\r\n+\t\t\t\t\t\t//ADDX.z  -(As),-(Ad)\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ADDX%-4s-(A%.1d),-(A%.1d)%c\",\tMake_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t}\r\n+\r\n+\t\t\t\t\t//ADD.z  Ds,a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ADD%-5sD%.1d,%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t}\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//ADD.z  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ADD%-5s%s,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 14:\r\n+\r\n+\t\t\tif ((OPC & 0xC0) == 0xC0)\r\n+\t\t\t{\r\n+\t\t\t\tswitch ((OPC >> 8) & 0x7)\r\n+\t\t\t\t{\r\n+\t\t\t\t\tcase 0:\r\n+\t\t\t\t\t\t//ASR.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ASR.W   #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\r\n+\t\t\t\t\tcase 1:\r\n+\t\t\t\t\t\t//ASL.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ASL.W   #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 2:\r\n+\t\t\t\t\t\t//LSR.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"LSR.W   #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 3:\r\n+\t\t\t\t\t\t//LSL.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"LSL.W   #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 4:\r\n+\t\t\t\t\t\t//ROXR.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROXR.W  #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 5:\r\n+\t\t\t\t\t\t//ROXL.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROXL.W  #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 6:\r\n+\t\t\t\t\t\t//ROR.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROR.W   #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 7:\r\n+\t\t\t\t\t\t//ROL.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROL.W   #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+ \r\n+\t\t\t\t}\r\n+\t\t\t}\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tswitch ((OPC >> 3) & 0x3F)\r\n+\t\t\t\t{\r\n+\t\t\t\t\tcase 0: case 8: case 16:\r\n+\t\t\t\t\t\t//ASR.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ASR%-5s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 1: case 9: case 17:\r\n+\t\t\t\t\t\t//LSR.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"LSR%-5s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 2: case 10: case 18:\r\n+\t\t\t\t\t\t//ROXR.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROXR%-4s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 3: case 11: case 19:\r\n+\t\t\t\t\t\t//ROR.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROR%-5s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 4: case 12: case 20:\r\n+\t\t\t\t\t\t//ASR.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ASR%-5sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 5: case 13: case 21:\r\n+\t\t\t\t\t\t//LSR.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"LSR%-5sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 6: case 14: case 22:\r\n+\t\t\t\t\t\t//ROXR.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROXR%-4sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 7: case 15: case 23:\r\n+\t\t\t\t\t\t//ROR.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROR%-5sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 32: case 40: case 48:\r\n+\t\t\t\t\t\t//ASL.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ASL%-5s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 33: case 41: case 49:\r\n+\t\t\t\t\t\t//LSL.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"LSL%-5s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 34: case 42: case 50:\r\n+\t\t\t\t\t\t//ROXL.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROXL%-4s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 35: case 43: case 51:\r\n+\t\t\t\t\t\t//ROL.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROL%-5s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 36: case 44: case 52:\r\n+\t\t\t\t\t\t//ASL.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ASL%-5sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 37: case 45: case 53:\r\n+\t\t\t\t\t\t//LSL.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"LSL%-5sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 38: case 46: case 54:\r\n+\t\t\t\t\t\t//ROXL.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROXL%-4sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 39: case 47: case 55:\r\n+\t\t\t\t\t\t//ROL.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROL%-5sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t}\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 15:\r\n+\t\t\t//Bad Opcode\r\n+\t\t\tsprintf(Dbg_Str, \"Bad Opcode%c\", 0);\r\n+\t\t\tbreak;\r\n+\t}\r\n+\t\r\n+\treturn(Dbg_Str);\r\n+}\r\n+\r\n+\r\n+static unsigned short Next_Word_T(void)\r\n+{\r\n+\treturn m68ki_read_imm_16();\r\n+}\r\n+\r\n+static unsigned int Next_Long_T(void)\r\n+{\r\n+\treturn m68ki_read_imm_32();\r\n+}\r\n+\r\n+static void trace_m68k()\r\n+{\r\n+\tstatic char String [512];\r\n+\tstatic unsigned int counter = 0;\r\n+\tint real_pc = m68k.pc;\r\n+\r\n+\r\n+\tif( trace_start == 0 ) return;\r\n+\r\n+\r\n+\tcounter++;\r\n+\r\n+\tif( map_m68k[m68k.pc] ) return;\r\n+\tif( m68k.pc == 0x1F00 ) return;  // paprium diasm crash\r\n+\t//if( m68k.pc >= 0xFF0000 ) return;\r\n+\t//if( m68k.pc < 0x10000 ) return;\r\n+\tmap_m68k[m68k.pc] = 1;\r\n+\r\n+\t//if(m68k.pc == 0x84bf6 ) map_m68k[m68k.pc] = 0;\r\n+\r\n+\r\n+\tif( !fp_trace_m68k ) {\r\n+\t\tfp_trace_m68k = fopen(\"trace-m68k.txt\", \"w\");\r\n+\t}\r\n+\r\n+\r\n+\tsprintf( String, \"[%X] %02X:%04X\", counter, m68k.pc >> 16, m68k.pc & 0xffff );\r\n+\tfprintf( fp_trace_m68k, \"%s\", String );\r\n+\r\n+\r\n+\tsprintf( String, \"  %04X %04X  \", m68k_read_immediate_16(m68k.pc), m68k_read_immediate_16(m68k.pc+2) );\r\n+\tfprintf( fp_trace_m68k, \"%s\", String );\r\n+\r\n+\r\n+\tsprintf( String, \"%-33s\", M68KDisasm( Next_Word_T, Next_Long_T, m68k.pc ) );\r\n+\tfprintf( fp_trace_m68k, \"%s\", String );\r\n+\r\n+\r\n+\tsprintf( String, \"A0=%.8X A1=%.8X A2=%.8X \", m68k.dar[8], m68k.dar[9], m68k.dar[10]);\r\n+\tfprintf( fp_trace_m68k, \"%s\", String );\r\n+\r\n+\tsprintf( String, \"A3=%.8X A4=%.8X A5=%.8X \", m68k.dar[11], m68k.dar[12], m68k.dar[13]);\r\n+\tfprintf( fp_trace_m68k, \"%s\", String );\r\n+\r\n+\tsprintf( String, \"A6=%.8X A7=%.8X\", m68k.dar[14], m68k.dar[15]);\r\n+\tfprintf( fp_trace_m68k, \"%s\", String );\r\n+\r\n+\tsprintf( String, \"  \" );\r\n+\tfprintf( fp_trace_m68k, \"%s\", String );\r\n+\r\n+\tsprintf( String, \"D0=%.8X D1=%.8X D2=%.8X \", m68k.dar[0], m68k.dar[1], m68k.dar[2]);\r\n+\tfprintf( fp_trace_m68k, \"%s\", String );\r\n+\r\n+\tsprintf( String, \"D3=%.8X D4=%.8X D5=%.8X \", m68k.dar[3], m68k.dar[4], m68k.dar[5]);\r\n+\tfprintf( fp_trace_m68k, \"%s\", String );\r\n+\r\n+\tsprintf( String, \"D6=%.8X D7=%.8X\", m68k.dar[6], m68k.dar[7]);\r\n+\tfprintf( fp_trace_m68k, \"%s\", String );\r\n+\r\n+\tfprintf( fp_trace_m68k, \"  \");\r\n+\tfprintf( fp_trace_m68k, \"%c\", (m68k.ir & 0x10)?'X':'x' );\r\n+\tfprintf( fp_trace_m68k, \"%c\", (m68k.ir & 0x08)?'N':'n' );\r\n+\tfprintf( fp_trace_m68k, \"%c\", (m68k.ir & 0x04)?'Z':'z' );\r\n+\tfprintf( fp_trace_m68k, \"%c\", (m68k.ir & 0x02)?'V':'v' );\r\n+\tfprintf( fp_trace_m68k, \"%c\", (m68k.ir & 0x01)?'C':'c' );\r\n+\r\n+\tfprintf( fp_trace_m68k, \"\\n\" );\r\n+\tfflush(fp_trace_m68k);\r\n+\r\n+\r\n+#if 0\r\n+\tif( real_pc == 0xb90c2 )\r\n+\t\tMessageBoxA(0,\"debug\",\"0\",0);\r\n+#endif\r\n+\r\n+\tm68k.pc = real_pc;\r\n+}\r\ndiff --git a/core/m68k/m68kops.h b/core/m68k/m68kops.h\nindex 83bd911f4..1a2751a19 100644\n--- a/core/m68k/m68kops.h\n+++ b/core/m68k/m68kops.h\n@@ -3973,7 +3973,7 @@ static void m68k_op_asl_8_r(void)\n     }\r\n \r\n     *r_dst &= 0xffffff00;\r\n-    FLAG_X = FLAG_C = ((shift == 8 ? src & 1 : 0))<<8;\r\n+    FLAG_X = FLAG_C = (((shift == 8) ? src & 1 : 0))<<8;\r\n     FLAG_N = NFLAG_CLEAR;\r\n     FLAG_Z = ZFLAG_SET;\r\n     FLAG_V = (!(src == 0))<<7;\r\n@@ -4010,7 +4010,7 @@ static void m68k_op_asl_16_r(void)\n     }\r\n \r\n     *r_dst &= 0xffff0000;\r\n-    FLAG_X = FLAG_C = ((shift == 16 ? src & 1 : 0))<<8;\r\n+    FLAG_X = FLAG_C = (((shift == 16) ? src & 1 : 0))<<8;\r\n     FLAG_N = NFLAG_CLEAR;\r\n     FLAG_Z = ZFLAG_SET;\r\n     FLAG_V = (!(src == 0))<<7;\r\n@@ -4047,7 +4047,7 @@ static void m68k_op_asl_32_r(void)\n     }\r\n \r\n     *r_dst = 0;\r\n-    FLAG_X = FLAG_C = ((shift == 32 ? src & 1 : 0))<<8;\r\n+    FLAG_X = FLAG_C = (((shift == 32) ? src & 1 : 0))<<8;\r\n     FLAG_N = NFLAG_CLEAR;\r\n     FLAG_Z = ZFLAG_SET;\r\n     FLAG_V = (!(src == 0))<<7;\r\n@@ -9668,7 +9668,7 @@ static void m68k_op_lsr_32_r(void)\n     }\r\n \r\n     *r_dst = 0;\r\n-    FLAG_X = FLAG_C = (shift == 32 ? GET_MSB_32(src)>>23 : 0);\r\n+    FLAG_X = FLAG_C = ((shift == 32) ? GET_MSB_32(src)>>23 : 0);\r\n     FLAG_N = NFLAG_CLEAR;\r\n     FLAG_Z = ZFLAG_SET;\r\n     FLAG_V = VFLAG_CLEAR;\r\n@@ -9940,7 +9940,7 @@ static void m68k_op_lsl_32_r(void)\n     }\r\n \r\n     *r_dst = 0;\r\n-    FLAG_X = FLAG_C = ((shift == 32 ? src & 1 : 0))<<8;\r\n+    FLAG_X = FLAG_C = (((shift == 32) ? src & 1 : 0))<<8;\r\n     FLAG_N = NFLAG_CLEAR;\r\n     FLAG_Z = ZFLAG_SET;\r\n     FLAG_V = VFLAG_CLEAR;\r\ndiff --git a/core/m68k/s68kcpu.c b/core/m68k/s68kcpu.c\nindex ef47850ed..e3375f4df 100644\n--- a/core/m68k/s68kcpu.c\n+++ b/core/m68k/s68kcpu.c\n@@ -2,6 +2,8 @@\n /*                            SUB 68K CORE                                  */\n /* ======================================================================== */\n \n+#define DEBUG_TRACE 0\n+\n extern int scd_68k_irq_ack(int level);\n \n #define m68ki_cpu s68k\n@@ -19,6 +21,10 @@ extern int scd_68k_irq_ack(int level);\n #include \"m68kcpu.h\"\n #include \"m68kops.h\"\n \n+#if DEBUG_TRACE\n+#include \"s68kd.h\"\n+#endif\n+\n /* ======================================================================== */\n /* ================================= DATA ================================= */\n /* ======================================================================== */\n@@ -253,8 +259,14 @@ void s68k_run(unsigned int cycles)\n     /* Set the address space for reads */\n     m68ki_use_data_space() /* auto-disable (see m68kcpu.h) */\n \n-    /* Save current instruction PC */\n-    s68k.prev_pc = REG_PC;\n+\t/* Save current instruction PC */\n+\ts68k.prev_pc = REG_PC;\n+\n+#if DEBUG_TRACE\n+\t{\n+\t\ttrace_s68k();\n+\t}\n+#endif\n \n     /* Decode next instruction */\n     REG_IR = m68ki_read_imm_16();\ndiff --git a/core/m68k/s68kd.h b/core/m68k/s68kd.h\nnew file mode 100644\nindex 000000000..323200807\n--- /dev/null\n+++ b/core/m68k/s68kd.h\n@@ -0,0 +1,1153 @@\n+//#include <stdio.h>\r\n+\r\n+static FILE *fp_trace_s68k;\r\n+static char map_s68k[0x100 * 0x10000];\r\n+\r\n+\r\n+static char Dbg_Str[64];\r\n+static char Dbg_EA_Str[32];\r\n+static char Dbg_Size_Str[3];\r\n+static char Dbg_Cond_Str[3];\r\n+\r\n+static unsigned short (*Next_Word)();\r\n+static unsigned int (*Next_Long)();\r\n+\r\n+extern int trace_start;\r\n+\r\n+\r\n+static char *Make_Dbg_EA_Str(int Size, int EA_Num, int Reg_Num)\r\n+{\r\n+\tint i;\r\n+\tDbg_EA_Str[31] = 0;\r\n+\r\n+\tswitch(EA_Num)\r\n+\t{\r\n+\t\tcase 0:\r\n+\t\t\t// 000 rrr  Dr\r\n+\t\t\tsprintf(Dbg_EA_Str, \"D%.1d%c\", Reg_Num, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 1:\r\n+\t\t\t// 001 rrr  Ar\r\n+\t\t\tsprintf(Dbg_EA_Str, \"A%.1d%c\", Reg_Num, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 2:\r\n+\t\t\t// 010 rrr  (Ar)\r\n+\t\t\tsprintf(Dbg_EA_Str, \"(A%.1d)%c\", Reg_Num, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 3:\r\n+\t\t\t// 011 rrr  (Ar)+\r\n+\t\t\tsprintf(Dbg_EA_Str, \"(A%.1d)+%c\", Reg_Num, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 4:\r\n+\t\t\t// 100 rrr  -(Ar)\r\n+\t\t\tsprintf(Dbg_EA_Str, \"-(A%.1d)%c\", Reg_Num, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 5:\r\n+\t\t\t// 101 rrr  d16(Ar)     dddddddd dddddddd\r\n+\t\t\tsprintf(Dbg_EA_Str, \"$%.4X(A%.1d)%c\", Next_Word(), Reg_Num, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 6:\r\n+\t\t\t// 110 rrr  d8(Ar,ix)   aiiizcc0 dddddddd\r\n+\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\tif (i & 0x8000)\r\n+\t\t\t\tsprintf(Dbg_EA_Str, \"$%.2X(A%.1d,A%.1d)%c\", i & 0xFF, Reg_Num, (i >> 12) & 0x7, 0);\r\n+\t\t\telse\r\n+  \t\t\t\tsprintf(Dbg_EA_Str, \"$%.2X(A%.1d,D%.1d)%c\", i & 0xFF, Reg_Num, (i >> 12) & 0x7, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 7:\r\n+\t\t\tswitch(Reg_Num)\r\n+\t\t\t{\r\n+\t\t\t\tcase 0:\r\n+\t\t\t\t\t// 111 000  addr16      dddddddd dddddddd\r\n+\t\t\t\t\tsprintf(Dbg_EA_Str, \"($%.4X)%c\", Next_Word(), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 1:\r\n+\t\t\t\t\t// 111 001  addr32      dddddddd dddddddd ddddddddd dddddddd\r\n+\t\t\t\t\tsprintf(Dbg_EA_Str, \"($%.8X)%c\", Next_Long(), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 2:\r\n+\t\t\t\t\t// 111 010  d16(PC)     dddddddd dddddddd\r\n+\t\t\t\t\tsprintf(Dbg_EA_Str, \"$%.4X(PC)%c\", Next_Word(), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 3:\r\n+\t\t\t\t\t// 111 011  d8(PC,ix)   aiiiz000 dddddddd\r\n+\t\t\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\t\t\tif (i & 0x8000)\r\n+\t\t\t\t\t\tsprintf(Dbg_EA_Str, \"$%.2X(PC,A%.1d)%c\", i & 0xFF, (i >> 12) & 0x7, 0);\r\n+\t\t\t\t\telse\r\n+\t\t\t\t\t\tsprintf(Dbg_EA_Str, \"$%.2X(PC,D%.1d)%c\", i & 0xFF, (i >> 12) & 0x7, 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 4:\r\n+\t\t\t\t\t// 111 100  imm/implied\r\n+\t\t\t\t\tswitch(Size)\r\n+\t\t\t\t\t{\r\n+\t\t\t\t\t\tcase 0:\r\n+\t\t\t\t\t\t\tsprintf(Dbg_EA_Str, \"#$%.2X%c\", Next_Word() & 0xFF, 0);\r\n+\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\tcase 1:\r\n+\t\t\t\t\t\t\tsprintf(Dbg_EA_Str, \"#$%.4X%c\", Next_Word(), 0);\r\n+\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\tcase 2:\r\n+\t\t\t\t\t\t\tsprintf(Dbg_EA_Str, \"#$%.8X%c\", Next_Long(), 0);\r\n+\t\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t}\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\t\t}\r\n+\r\n+\treturn(Dbg_EA_Str);\r\n+}\r\n+\r\n+\r\n+static char *Make_Dbg_Size_Str(int Size)\r\n+{\r\n+\tDbg_Size_Str[2] = 0;\r\n+\tsprintf(Dbg_Size_Str, \".?\");\r\n+\r\n+\tswitch(Size)\r\n+\t{\r\n+\t\tcase 0:\r\n+\t\t\tsprintf(Dbg_Size_Str, \".B\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 1:\r\n+\t\t\tsprintf(Dbg_Size_Str, \".W\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 2:\r\n+\t\t\tsprintf(Dbg_Size_Str, \".L\");\r\n+\t\t\tbreak;\r\n+\t}\r\n+\r\n+\treturn(Dbg_Size_Str);\r\n+}\r\n+\r\n+\r\n+static char *Make_Dbg_Size_Str_2(int Size)\r\n+{\r\n+\tDbg_Size_Str[2] = 0;\r\n+\tsprintf(Dbg_Size_Str, \".?\");\r\n+\r\n+\tswitch(Size)\r\n+\t{\r\n+\t\tcase 0:\r\n+\t\t\tsprintf(Dbg_Size_Str, \".W\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 1:\r\n+\t\t\tsprintf(Dbg_Size_Str, \".L\");\r\n+\t\t\tbreak;\r\n+\t}\r\n+\r\n+\treturn(Dbg_Size_Str);\r\n+}\r\n+\r\n+static char *Make_Dbg_Cond_Str(int Cond)\r\n+{\r\n+\tDbg_Cond_Str[2] = 0;\r\n+\tsprintf(Dbg_Cond_Str, \"??\");\r\n+\r\n+\tswitch(Cond)\r\n+\t{\r\n+\t\tcase 0:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"Tr\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 1:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"Fa\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 2:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"HI\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 3:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"LS\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 4:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"CC\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 5:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"CS\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 6:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"NE\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 7:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"EQ\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 8:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"VC\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 9:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"VS\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 10:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"PL\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 11:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"MI\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 12:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"GE\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 13:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"LT\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 14:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"GT\");\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 15:\r\n+\t\t\tsprintf(Dbg_Cond_Str, \"LE\");\r\n+\t\t\tbreak;\r\n+    }\r\n+\r\n+\treturn(Dbg_Cond_Str);\r\n+}\r\n+\r\n+\r\n+static char *S68KDisasm(unsigned short (*NW)(), unsigned int (*NL)(), unsigned int hook_pc )\r\n+{\r\n+\tint i;\r\n+\tunsigned short OPC;\r\n+\tstatic char Tmp_Str[64];\r\n+\r\n+\tDbg_Str[63] = 0;\r\n+\tTmp_Str[63] = 0;\r\n+\r\n+\tNext_Word = NW;\r\n+\tNext_Long = NL;\r\n+\r\n+\tOPC = Next_Word();\r\n+\r\n+\tsprintf(Dbg_Str, \"Unknown Opcode%c\", 0);\r\n+\r\n+\tswitch(OPC >> 12)\r\n+\t{\r\n+\t\tcase 0:\r\n+\r\n+\t\tif (OPC & 0x100)\r\n+\t\t{\r\n+\t\t\tif ((OPC & 0x038) == 0x8)\r\n+\t\t\t{\r\n+\t\t\t\tif (OPC & 0x080)\r\n+\t\t\t\t\t//MOVEP.z Ds,d16(Ad)\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"MOVEP%-3sD%.1d,#$%.4X(A%.1d)%c\", Make_Dbg_Size_Str_2((OPC & 0x40) >> 6), (OPC & 0xE00) >> 9, Next_Word(), OPC & 0x7, 0);\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//MOVEP.z d16(As),Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"MOVEP%-3s#$%.4X(A%.1d),D%.1d%c\", Make_Dbg_Size_Str_2((OPC & 0x40) >> 6), Next_Word(), OPC & 0x7, (OPC & 0xE00) >> 9, 0);\r\n+\t\t\t}\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tswitch((OPC >> 6) & 0x3)\r\n+\t\t\t\t{\r\n+\t\t\t\t\tcase 0:\r\n+\t\t\t\t\t\t//BTST  Ds,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"BTST    D%.1d,%s%c\", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 1:\r\n+\t\t\t\t\t\t//BCHG  Ds,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"BCHG    D%.1d,%s%c\", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 2:\r\n+\t\t\t\t\t\t//BCLR  Ds,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"BCLR    D%.1d,%s%c\", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 3:\r\n+\t\t\t\t\t\t//BSET  Ds,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"BSET    D%.1d,%s%c\", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\t\t\t}\r\n+\t\t}\r\n+\t\telse\r\n+\t\t{\r\n+\t\t\tswitch((OPC >> 6) & 0x3F)\r\n+\t\t\t{\r\n+\t\t\t\tcase 0:\r\n+\t\t\t\t\t//ORI.B  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ORI.B   #$%.2X,%s%c\", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 1:\r\n+\t\t\t\t\t//ORI.W  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ORI.W   #$%.4X,%s%c\", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 2:\r\n+\t\t\t\t\t//ORI.L  #k,a\r\n+\t\t\t\t\ti = Next_Long();\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ORI.L   #$%.8X,%s%c\", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 8:\r\n+\t\t\t\t\t//ANDI.B  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ANDI.B  #$%.2X,%s%c\", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 9:\r\n+\t\t\t\t\t//ANDI.W  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ANDI.W  #$%.4X,%s%c\", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 10:\r\n+\t\t\t\t\t//ANDI.L  #k,a\r\n+\t\t\t\t\ti = Next_Long();\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ANDI.L  #$%.8X,%s%c\", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 16:\r\n+\t\t\t\t\t//SUBI.B  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SUBI.B  #$%.2X,%s%c\", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 17:\r\n+\t\t\t\t\t//SUBI.W  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SUBI.W  #$%.4X,%s%c\", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 18:\r\n+\t\t\t\t\t//SUBI.L  #k,a\r\n+\t\t\t\t\ti = Next_Long();\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SUBI.L  #$%.8X,%s%c\", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 24:\r\n+\t\t\t\t\t//ADDI.B  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ADDI.B  #$%.2X,%s%c\", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 25:\r\n+\t\t\t\t\t//ADDI.W  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ADDI.W  #$%.4X,%s%c\", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 26:\r\n+\t\t\t\t\t//ADDI.L  #k,a\r\n+\t\t\t\t\ti = Next_Long();\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ADDI.L  #$%.8X,%s%c\", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 32:\r\n+\t\t\t\t\t//BTST  #n,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BTST    #%d,%s%c\", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 33:\r\n+\t\t\t\t\t//BCHG  #n,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BCHG    #%d,%s%c\", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 34:\r\n+\t\t\t\t\t//BCLR  #n,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BCLR    #%d,%s%c\", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 35:\r\n+\t\t\t\t\t//BSET  #n,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BSET    #%d,%s%c\", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 40:\r\n+\t\t\t\t\t//EORI.B  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"EORI.B  #$%.2X,%s%c\", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 41:\r\n+\t\t\t\t\t//EORI.W  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"EORI.W  #$%.4X,%s%c\", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 42:\r\n+\t\t\t\t\t//EORI.L  #k,a\r\n+\t\t\t\t\ti = Next_Long();\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"EORI.L  #$%.8X,%s%c\", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 48:\r\n+\t\t\t\t\t//CMPI.B  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"CMPI.B  #$%.2X,%s%c\", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 49:\r\n+\t\t\t\t\t//CMPI.W  #k,a\r\n+\t\t\t\t\ti = Next_Word() & 0xFFFF;\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"CMPI.W  #$%.4X,%s%c\", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 50:\r\n+\t\t\t\t\t//CMPI.L  #k,a\r\n+\t\t\t\t\ti = Next_Long();\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"CMPI.L  #$%.8X,%s%c\", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\t\t}\r\n+\t\tbreak;\r\n+\r\n+\t\tcase 1:\r\n+\t\t\t//MOVE.b  as,ad\r\n+\t\t\tsprintf(Tmp_Str, \"%s%c\", Make_Dbg_EA_Str(0, (OPC >> 3) & 0x7, OPC & 0x7), 0);\r\n+\t\t\tsprintf(Dbg_Str, \"MOVE.b  %s,%s%c\", Tmp_Str, Make_Dbg_EA_Str(0, (OPC >> 6) & 0x7, (OPC >> 9) & 0x7), 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 2:\r\n+\t\t\t//MOVE.l  as,ad\r\n+\t\t\tsprintf(Tmp_Str, \"%s%c\", Make_Dbg_EA_Str(2, (OPC >> 3) & 0x7, OPC & 0x7), 0);\r\n+\t\t\tsprintf(Dbg_Str, \"MOVE.l  %s,%s%c\", Tmp_Str, Make_Dbg_EA_Str(2, (OPC >> 6) & 0x7, (OPC >> 9) & 0x7), 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 3:\r\n+\t\t\t//MOVE.w  as,ad\r\n+\t\t\tsprintf(Tmp_Str, \"%s%c\", Make_Dbg_EA_Str(1, (OPC >> 3) & 0x7, OPC & 0x7), 0);\r\n+\t\t\tsprintf(Dbg_Str, \"MOVE.w  %s,%s%c\", Tmp_Str, Make_Dbg_EA_Str(1, (OPC >> 6) & 0x7, (OPC >> 9) & 0x7), 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 4:\r\n+\t\t\t//SPECIALS ...\r\n+\r\n+\t\t\tif (OPC & 0x100)\r\n+\t\t\t{\r\n+\t\t\t\tif (OPC & 0x40)\r\n+\t\t\t\t\t//LEA  a,Ad\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"LEA     %s,A%.1d%c\", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//CHK.W  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"CHK.W   %s,D%.1d%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t}\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tswitch((OPC >> 6) & 0x3F)\r\n+\t\t\t\t{\r\n+\t\t\t\t\tcase 0:\tcase 1: case 2:\r\n+\t\t\t\t\t\t//NEGX.z  a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"NEGX%-4s%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 3:\r\n+\t\t\t\t\t\t//MOVE  SR,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"MOVE    SR,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 8: case 9: case 10:\r\n+\t\t\t\t\t\t//CLR.z  a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"CLR%-5s%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 16: case 17: case 18:\r\n+\t\t\t\t\t\t//NEG.z  a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"NEG%-5s%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 19:\r\n+\t\t\t\t\t\t//MOVE  a,CCR\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"MOVE    %s,CCR%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 24: case 25: case 26:\r\n+\t\t\t\t\t\t//NOT.z  a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"NOT%-5s%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 27:\r\n+\t\t\t\t\t\t//MOVE  a,SR\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"MOVE    %s,SR%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 32:\r\n+\t\t\t\t\t\t//NBCD  a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"NBCD    %s%c\", Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 33:\r\n+\r\n+\t\t\t\t\t\tif (OPC & 0x38)\r\n+\t\t\t\t\t\t\t//PEA  a\r\n+\t\t\t\t\t\t\tsprintf(Dbg_Str, \"PEA     %s%c\", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\telse\r\n+\t\t\t\t\t\t\t//SWAP.w  Dd\r\n+\t\t\t\t\t\t\tsprintf(Dbg_Str, \"SWAP.w  D%d%c\", OPC & 0x7, 0);\r\n+\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 34: case 35:\r\n+\r\n+\t\t\t\t\t\tif (OPC & 0x38)\r\n+\t\t\t\t\t\t{\r\n+\t\t\t\t\t\t\tint registers_a7_d0 = Next_Word();\r\n+\r\n+\t\t\t\t\t\t\t//MOVEM.z Reg-List,a\r\n+\t\t\t\t\t\t\tsprintf(Dbg_Str, \"MOVEM%-3s{d0-a7}[%02x %02x],%s%c\", Make_Dbg_Size_Str_2((OPC >> 6) & 1),\r\n+\t\t\t\t\t\t\t\tregisters_a7_d0 >> 8, registers_a7_d0 & 0xff,\r\n+\t\t\t\t\t\t\t\tMake_Dbg_EA_Str((OPC >> 6) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\t\t//Next_Word();\r\n+\t\t\t\t\t\t}\r\n+\t\t\t\t\t\telse\r\n+\t\t\t\t\t\t\t//EXT.z  Dd\r\n+\t\t\t\t\t\t\tsprintf(Dbg_Str, \"EXT%-5s%s%c\", Make_Dbg_Size_Str_2((OPC >> 6) & 1), Make_Dbg_EA_Str((OPC >> 6) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 40: case 41: case 42:\r\n+\t\t\t\t\t\t//TST.z a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"TST%-5s%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 0x3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 43:\r\n+\t\t\t\t\t\t//TAS.b a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"TAS.B %s%c\", Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 48: case 49:\r\n+\t\t\t\t\t\t//Bad Opcode\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"Bad Opcode%c\", 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 50: case 51: {\r\n+\t\t\t\t\t\tint registers_d0_a7 = Next_Word();\r\n+\r\n+\t\t\t\t\t\t//MOVEM.z a,Reg-List\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"MOVEM%-3s%s,{a7-d0}[%02x %02x]%c\", Make_Dbg_Size_Str_2((OPC >> 6) & 1), Make_Dbg_EA_Str((OPC >> 6) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7),\r\n+\t\t\t\t\t\t\tregisters_d0_a7 >> 8, registers_d0_a7 & 0xff,\r\n+\t\t\t\t\t\t\t0);\r\n+\t\t\t\t\t\t//Next_Word();\r\n+\t\t\t\t\t\t}\tbreak;\r\n+\r\n+\t\t\t\t\tcase 57:\r\n+\r\n+\t\t\t\t\t\tswitch((OPC >> 3) & 0x7)\r\n+\t\t\t\t\t\t{\r\n+\t\t\t\t\t\t\tcase 0: case 1:\r\n+\t\t\t\t\t\t\t\t//TRAP  #vector\r\n+\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"TRAP    #$%.1X%c\", OPC & 0xF, 0);\r\n+\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\tcase 2:\r\n+\t\t\t\t\t\t\t\t//LINK As,#k16\r\n+\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"LINK    A%.1d,#$%.4X%c\", OPC & 0x7, Next_Word(), 0);\r\n+\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\tcase 3:\r\n+\t\t\t\t\t\t\t\t//ULNK Ad\r\n+\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"ULNK    A%.1d%c\", OPC & 0x7, 0);\r\n+\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\tcase 4:\r\n+\t\t\t\t\t\t\t\t//MOVE As,USP\r\n+\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"MOVE    A%.1d,USP%c\",OPC & 0x7, 0);\r\n+\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\tcase 5:\r\n+\t\t\t\t\t\t\t\t//MOVE USP,Ad\r\n+\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"MOVE    USP,A%.1d%c\",OPC & 0x7, 0);\r\n+\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\tcase 6:\r\n+\r\n+\t\t\t\t\t\t\t\tswitch(OPC & 0x7)\r\n+\t\t\t\t\t\t\t\t{\r\n+\t\t\t\t\t\t\t\t\tcase 0:\r\n+\t\t\t\t\t\t\t\t\t\t//RESET\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"RESET%c\", 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\t\t\tcase 1:\r\n+\t\t\t\t\t\t\t\t\t\t//NOP\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"NOP%c\", 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\t\t\tcase 2:\r\n+\t\t\t\t\t\t\t\t\t\t//STOP #k16\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"STOP    #$%.4X%c\", Next_Word(), 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\t\t\tcase 3:\r\n+\t\t\t\t\t\t\t\t\t\t//RTE\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"RTE%c\", 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\t\t\tcase 4:\r\n+\t\t\t\t\t\t\t\t\t\t//Bad Opcode\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"Bad Opcode%c\", 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\t\t\tcase 5:\r\n+\t\t\t\t\t\t\t\t\t\t//RTS\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"RTS%c\", 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\t\t\tcase 6:\r\n+\t\t\t\t\t\t\t\t\t\t//TRAPV\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"TRAPV%c\", 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\t\t\t\t\tcase 7:\r\n+\t\t\t\t\t\t\t\t\t\t//RTR\r\n+\t\t\t\t\t\t\t\t\t\tsprintf(Dbg_Str, \"RTR%c\", 0);\r\n+\t\t\t\t\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t\t\t\t}\r\n+\t\t\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t\t}\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 58:\r\n+\t\t\t\t\t\t//JSR  a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"JSR     %s%c\", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 59:\r\n+\t\t\t\t\t\t//JMP  a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"JMP     %s%c\", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 5:\r\n+\r\n+\t\t\tif ((OPC & 0xC0) == 0xC0)\r\n+\t\t\t{\r\n+        char offset = OPC & 0xFF;\r\n+\t\t\t\t\r\n+\t\t\t\tif ((OPC & 0x38) == 0x08) {\r\n+\t\t\t\t\tunsigned short word = Next_Word();\r\n+\r\n+\t\t\t\t\t//DBCC  Ds,label\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"DB%-6sD%.1d,#$%.4X [%02X:%04X]%c\", Make_Dbg_Cond_Str((OPC >> 8) & 0xF), OPC & 0x7, word,\r\n+            (hook_pc + 2) >> 16, (hook_pc + 2 + word) & 0xffff, 0);\r\n+\t\t\t\t}\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//STCC.b  a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ST%-6s%s [%02X:%04X]%c\", Make_Dbg_Cond_Str((OPC >> 8) & 0xF), Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7),\r\n+            (hook_pc + 2) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);\r\n+\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tif (OPC & 0x100)\r\n+\t\t\t\t\t//SUBQ.z  #k3,a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SUBQ%-4s#%.1d,%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//ADDQ.z  #k3,a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ADDQ%-4s#%.1d,%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 6:\r\n+\r\n+\t\t\tif (OPC & 0xFF)\r\n+\t\t\t{\r\n+\t\t\t\tint offset = (char) (OPC & 0xFF);\r\n+\r\n+\t\t\t\tif ((OPC & 0xF00) == 0x100)\r\n+\t\t\t\t{\r\n+\t\t\t\t\t//BSR  label\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BSR     #$%.2X [%02X:%04X]%c\", OPC & 0xFF,\r\n+\t\t\t\t\t\t(hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\r\n+\t\t\t\tif (!(OPC & 0xF00))\r\n+\t\t\t\t{\r\n+\t\t\t\t\t//BRA  label\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BRA     #$%.2X [%02X:%04X]%c\", OPC & 0xFF,\r\n+\t\t\t\t\t\t(hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\r\n+\t\t\t\t//BCC  label\r\n+\t\t\t\tsprintf(Dbg_Str, \"B%-7s#$%.2X [%02X:%04X]%c\",\r\n+\t\t\t\t\tMake_Dbg_Cond_Str((OPC >> 8) & 0xF), OPC & 0xFF,\r\n+\t\t\t\t\t(hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);\r\n+\t\t\t}\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tint offset = (short)(Next_Word());\r\n+\r\n+\t\t\t\tif ((OPC & 0xF00) == 0x100)\r\n+\t\t\t\t{\r\n+\t\t\t\t\t//BSR  label\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BSR     #$%.4X [%02X:%04X]%c\", offset,\r\n+\t\t\t\t\t\t(hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\r\n+\t\t\t\tif (!(OPC & 0xF00))\r\n+\t\t\t\t{\r\n+\t\t\t\t\t//BRA  label\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"BRA     #$%.4X [%02X:%04X]%c\", offset,\r\n+\t\t\t\t\t\t(hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\r\n+\t\t\t\t//BCC  label\r\n+\t\t\t\tsprintf(Dbg_Str, \"B%-7s#$%.4X [%02X:%04X]%c\",\r\n+\t\t\t\t\tMake_Dbg_Cond_Str((OPC >> 8 ) & 0xF), offset,\r\n+\t\t\t\t\t(hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 7:\r\n+\t\t\t//MOVEQ  #k8,Dd\r\n+\t\t\tsprintf(Dbg_Str, \"MOVEQ   #$%.2X,D%.1d%c\", OPC & 0xFF, (OPC >> 9) & 0x7, 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 8:\r\n+\r\n+\t\t\tif (OPC & 0x100)\r\n+  \t\t\t{\r\n+\t\t\t\tif (!(OPC & 0xF8))\r\n+\t\t\t\t{\r\n+\t\t\t\t\t//SBCD  Ds,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SBCD D%.1d,D%.1d%c\", OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\r\n+\t\t\t\tif ((OPC & 0xF8) == 0x8)\r\n+\t\t\t\t{\r\n+\t\t\t\t\t//SBCD  -(As),-(Ad)\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SBCD -(A%.1d),-(A%.1d)%c\", OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t\t}\r\n+\r\n+\t\t\t\tif ((OPC & 0xC0) == 0xC0)\r\n+\t\t\t\t\t//DIVS.w  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"DIVS.W  %s,D%.1d%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//OR.z  Ds,a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"OR%-6sD%.1d;%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t}\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tif ((OPC & 0xC0) == 0xC0)\r\n+\t\t\t\t\t//DIVU.w  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"DIVU.W  %s,D%.1d%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//OR.z  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"OR%-6s%s,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 9:\r\n+\r\n+\t\t\tif ((OPC & 0xC0) == 0xC0)\r\n+\t\t\t\t//SUBA.z  a,Ad\r\n+\t\t\t\tsprintf(Dbg_Str, \"SUBA%-4s%s,A%.1d%c\", Make_Dbg_Size_Str_2((OPC >> 8) & 1), Make_Dbg_EA_Str((OPC >> 8) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tif (OPC & 0x100)\r\n+\t\t\t\t{\r\n+\t\t\t\t\tif (!(OPC & 0x38))\r\n+\t\t\t\t\t{\r\n+\t\t\t\t\t\t//SUBX.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"SUBX%-4sD%.1d,D%.1d%c\",\tMake_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t}\r\n+\r\n+\t\t\t\t\tif ((OPC & 0x38) == 0x8)\r\n+\t\t\t\t\t{\r\n+\t\t\t\t\t\t//SUBX.z  -(As),-(Ad)\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"SUBX%-4s-(A%.1d),-(A%.1d)%c\",\tMake_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t}\r\n+\r\n+\t\t\t\t\t//SUB.z  Ds,a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SUB%-5sD%.1d,%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t}\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//SUB.z  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"SUB%-5s%s,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 10:\r\n+\t\t\t//Bad Opcode\r\n+\t\t\tsprintf(Dbg_Str, \"Bad Opcode%c\", 0);\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 11:\r\n+\r\n+\t\t\tif ((OPC & 0xC0) == 0xC0)\r\n+\t\t\t\t//CMPA.z  a,Ad\r\n+\t\t\t\tsprintf(Dbg_Str, \"CMPA%-4s%s,A%.1d%c\", Make_Dbg_Size_Str_2((OPC >> 8) & 1), Make_Dbg_EA_Str((OPC >> 7) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tif (OPC & 0x100)\r\n+\t\t\t\t{\r\n+\t\t\t\t\tif ((OPC & 0x38) == 0x8)\r\n+\t\t\t\t\t{\r\n+\t\t\t\t\t\t//CMPM.z  (As)+,(Ad)+\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"CMPM%-4s(A%.1d)+,(A%.1d)+%c\",\tMake_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t}\r\n+\r\n+\t\t\t\t\t//EOR.z  Ds,a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"EOR%-5sD%.1d,%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t}\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//CMP.z  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"CMP%-5s%s,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 12:\r\n+\r\n+\t\t\tif ((OPC & 0X1F8) == 0x100)\r\n+\t\t\t{\r\n+\t\t\t\t//ABCD Ds,Dd\r\n+\t\t\t\tsprintf(Dbg_Str, \"ABCD    D%.1d,D%.1d%c\", OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\r\n+\t\t\tif ((OPC & 0X1F8) == 0x140)\r\n+\t\t\t{\r\n+\t\t\t\t//EXG.l Ds,Dd\r\n+\t\t\t\tsprintf(Dbg_Str, \"EXG.L   D%.1d,D%.1d%c\", OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\r\n+\t\t\tif ((OPC & 0X1F8) == 0x108)\r\n+\t\t\t{\r\n+\t\t\t\t//ABCD -(As),-(Ad)\r\n+\t\t\t\tsprintf(Dbg_Str, \"ABCD    -(A%.1d),-(A%.1d)%c\", OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\r\n+\t\t\tif ((OPC & 0X1F8) == 0x148)\r\n+\t\t\t{\r\n+\t\t\t\t//EXG.l As,Ad\r\n+\t\t\t\tsprintf(Dbg_Str, \"EXG.L   A%.1d,A%.1d%c\", OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\r\n+\t\t\tif ((OPC & 0X1F8) == 0x188)\r\n+\t\t\t{\r\n+\t\t\t\t//EXG.l As,Dd\r\n+\t\t\t\tsprintf(Dbg_Str, \"EXG.L   A%.1d,D%.1d%c\", OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\r\n+\t\t\tswitch((OPC\t>> 6) & 0x7)\r\n+\t\t\t{\r\n+\t\t\t\tcase 0: case 1: case 2:\r\n+\t\t\t\t\t//AND.z  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"AND%-5s%s,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 3:\r\n+\t\t\t\t\t//MULU.w  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"MULU.W  %s,D%.1d%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 4: case 5: case 6:\r\n+\t\t\t\t\t//AND.z  Ds,a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"AND%-5sD%.1d,%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\tcase 7:\r\n+\t\t\t\t\t//MULS.w  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"MULS.W  %s,D%.1d%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\tbreak;\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 13:\r\n+\r\n+\t\t\tif ((OPC & 0xC0) == 0xC0)\r\n+\t\t\t\t//ADDA.z  a,Ad\r\n+\t\t\t\tsprintf(Dbg_Str, \"ADDA%-4s%s,A%.1d%c\", Make_Dbg_Size_Str_2((OPC >> 8) & 1), Make_Dbg_EA_Str((OPC >> 8) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tif (OPC & 0x100)\r\n+\t\t\t\t{\r\n+\t\t\t\t\tif (!(OPC & 0x38))\r\n+\t\t\t\t\t{\r\n+\t\t\t\t\t\t//ADDX.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ADDX%-4sD%.1d,D%.1d%c\",\tMake_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t}\r\n+\r\n+\t\t\t\t\tif ((OPC & 0x38) == 0x8)\r\n+\t\t\t\t\t{\r\n+\t\t\t\t\t\t//ADDX.z  -(As),-(Ad)\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ADDX%-4s-(A%.1d),-(A%.1d)%c\",\tMake_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\t\t\t\t}\r\n+\r\n+\t\t\t\t\t//ADD.z  Ds,a\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ADD%-5sD%.1d,%s%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t}\r\n+\t\t\t\telse\r\n+\t\t\t\t\t//ADD.z  a,Dd\r\n+\t\t\t\t\tsprintf(Dbg_Str, \"ADD%-5s%s,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 14:\r\n+\r\n+\t\t\tif ((OPC & 0xC0) == 0xC0)\r\n+\t\t\t{\r\n+\t\t\t\tswitch ((OPC >> 8) & 0x7)\r\n+\t\t\t\t{\r\n+\t\t\t\t\tcase 0:\r\n+\t\t\t\t\t\t//ASR.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ASR.W   #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\t\r\n+\t\t\t\t\tcase 1:\r\n+\t\t\t\t\t\t//ASL.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ASL.W   #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 2:\r\n+\t\t\t\t\t\t//LSR.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"LSR.W   #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 3:\r\n+\t\t\t\t\t\t//LSL.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"LSL.W   #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 4:\r\n+\t\t\t\t\t\t//ROXR.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROXR.W  #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 5:\r\n+\t\t\t\t\t\t//ROXL.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROXL.W  #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 6:\r\n+\t\t\t\t\t\t//ROR.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROR.W   #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 7:\r\n+\t\t\t\t\t\t//ROL.w  #1,a\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROL.W   #1,%s%c\", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);\r\n+\t\t\t\t\t\tbreak;\r\n+ \r\n+\t\t\t\t}\r\n+\t\t\t}\r\n+\t\t\telse\r\n+\t\t\t{\r\n+\t\t\t\tswitch ((OPC >> 3) & 0x3F)\r\n+\t\t\t\t{\r\n+\t\t\t\t\tcase 0: case 8: case 16:\r\n+\t\t\t\t\t\t//ASR.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ASR%-5s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 1: case 9: case 17:\r\n+\t\t\t\t\t\t//LSR.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"LSR%-5s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 2: case 10: case 18:\r\n+\t\t\t\t\t\t//ROXR.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROXR%-4s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 3: case 11: case 19:\r\n+\t\t\t\t\t\t//ROR.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROR%-5s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 4: case 12: case 20:\r\n+\t\t\t\t\t\t//ASR.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ASR%-5sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 5: case 13: case 21:\r\n+\t\t\t\t\t\t//LSR.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"LSR%-5sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 6: case 14: case 22:\r\n+\t\t\t\t\t\t//ROXR.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROXR%-4sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 7: case 15: case 23:\r\n+\t\t\t\t\t\t//ROR.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROR%-5sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 32: case 40: case 48:\r\n+\t\t\t\t\t\t//ASL.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ASL%-5s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 33: case 41: case 49:\r\n+\t\t\t\t\t\t//LSL.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"LSL%-5s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 34: case 42: case 50:\r\n+\t\t\t\t\t\t//ROXL.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROXL%-4s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 35: case 43: case 51:\r\n+\t\t\t\t\t\t//ROL.z  #k,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROL%-5s#%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 36: case 44: case 52:\r\n+\t\t\t\t\t\t//ASL.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ASL%-5sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 37: case 45: case 53:\r\n+\t\t\t\t\t\t//LSL.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"LSL%-5sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 38: case 46: case 54:\r\n+\t\t\t\t\t\t//ROXL.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROXL%-4sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t\tcase 39: case 47: case 55:\r\n+\t\t\t\t\t\t//ROL.z  Ds,Dd\r\n+\t\t\t\t\t\tsprintf(Dbg_Str, \"ROL%-5sD%.1d,D%.1d%c\", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);\r\n+\t\t\t\t\t\tbreak;\r\n+\r\n+\t\t\t\t}\r\n+\t\t\t}\r\n+\t\t\tbreak;\r\n+\r\n+\t\tcase 15:\r\n+\t\t\t//Bad Opcode\r\n+\t\t\tsprintf(Dbg_Str, \"Bad Opcode%c\", 0);\r\n+\t\t\tbreak;\r\n+\t}\r\n+\t\r\n+\treturn(Dbg_Str);\r\n+}\r\n+\r\n+\r\n+static unsigned short Next_Word_T(void)\r\n+{\r\n+\treturn m68ki_read_imm_16();\r\n+}\r\n+\r\n+static unsigned int Next_Long_T(void)\r\n+{\r\n+\treturn m68ki_read_imm_32();\r\n+}\r\n+\r\n+static void trace_s68k()\r\n+{\r\n+\tstatic char String [512];\r\n+\tint real_pc = s68k.pc;\r\n+\r\n+\r\n+\treturn;\r\n+\tif( trace_start == 0 ) return;\r\n+\r\n+\r\n+\tif( map_s68k[s68k.pc] ) return;\r\n+\tif( s68k.pc == 0x1F00 ) return;  // paprium diasm crash\r\n+\t//if( s68k.pc >= 0xFF0000 ) return;\r\n+\t//if( s68k.pc < 0x10000 ) return;\r\n+\tmap_s68k[s68k.pc] = 1;\r\n+\r\n+\r\n+\tif( !fp_trace_s68k ) {\r\n+\t\tfp_trace_s68k = fopen(\"trace-s68k.txt\", \"w\");\r\n+\t}\r\n+\r\n+\r\n+\tsprintf( String, \"%02X:%04X\", s68k.pc >> 16, s68k.pc & 0xffff );\r\n+\tfprintf( fp_trace_s68k, \"%s\", String );\r\n+\r\n+\r\n+\tsprintf( String, \"  %04X %04X  \", m68k_read_immediate_16(s68k.pc), m68k_read_immediate_16(s68k.pc+2) );\r\n+\tfprintf( fp_trace_s68k, \"%s\", String );\r\n+\r\n+\r\n+\tsprintf( String, \"%-33s\", S68KDisasm( Next_Word_T, Next_Long_T, s68k.pc ) );\r\n+\tfprintf( fp_trace_s68k, \"%s\", String );\r\n+\r\n+\r\n+\tsprintf( String, \"A0=%.8X A1=%.8X A2=%.8X \", s68k.dar[8], s68k.dar[9], s68k.dar[10]);\r\n+\tfprintf( fp_trace_s68k, \"%s\", String );\r\n+\r\n+\tsprintf( String, \"A3=%.8X A4=%.8X A5=%.8X \", s68k.dar[11], s68k.dar[12], s68k.dar[13]);\r\n+\tfprintf( fp_trace_s68k, \"%s\", String );\r\n+\r\n+\tsprintf( String, \"A6=%.8X A7=%.8X\", s68k.dar[14], s68k.dar[15]);\r\n+\tfprintf( fp_trace_s68k, \"%s\", String );\r\n+\r\n+\tsprintf( String, \"  \" );\r\n+\tfprintf( fp_trace_s68k, \"%s\", String );\r\n+\r\n+\tsprintf( String, \"D0=%.8X D1=%.8X D2=%.8X \", s68k.dar[0], s68k.dar[1], s68k.dar[2]);\r\n+\tfprintf( fp_trace_s68k, \"%s\", String );\r\n+\r\n+\tsprintf( String, \"D3=%.8X D4=%.8X D5=%.8X \", s68k.dar[3], s68k.dar[4], s68k.dar[5]);\r\n+\tfprintf( fp_trace_s68k, \"%s\", String );\r\n+\r\n+\tsprintf( String, \"D6=%.8X D7=%.8X\", s68k.dar[6], s68k.dar[7]);\r\n+\tfprintf( fp_trace_s68k, \"%s\", String );\r\n+\r\n+\tfprintf( fp_trace_s68k, \"  \");\r\n+\tfprintf( fp_trace_s68k, \"%c\", (s68k.ir & 0x10)?'X':'x' );\r\n+\tfprintf( fp_trace_s68k, \"%c\", (s68k.ir & 0x08)?'N':'n' );\r\n+\tfprintf( fp_trace_s68k, \"%c\", (s68k.ir & 0x04)?'Z':'z' );\r\n+\tfprintf( fp_trace_s68k, \"%c\", (s68k.ir & 0x02)?'V':'v' );\r\n+\tfprintf( fp_trace_s68k, \"%c\", (s68k.ir & 0x01)?'C':'c' );\r\n+\r\n+\tfprintf( fp_trace_s68k, \"\\n\" );\r\n+\tfflush(fp_trace_s68k);\r\n+\r\n+\r\n+\ts68k.pc = real_pc;\r\n+}\r\ndiff --git a/core/memz80.c b/core/memz80.c\nindex 75e1a20e4..0ea91f599 100644\n--- a/core/memz80.c\n+++ b/core/memz80.c\n@@ -152,6 +152,14 @@ unsigned char z80_memory_r(unsigned int address)\n \r\n       /* read from 68k banked area */\r\n       address = zbank | (address & 0x7FFF);\r\n+\r\n+\tif(0)\r\n+\t{\r\n+\t\tstatic FILE *fp = 0;\r\n+\t\tif(!fp) fp = fopen(\"trace-z80-mem.txt\", \"w\");\r\n+\t\tfprintf(fp, \"%X - %X %X - %X %X %X %X\\n\", address, Z80.pc.w.l, zbank, Z80.af.b.h, Z80.bc.w.l, Z80.de.w.l, Z80.hl.w.l);\r\n+\t}\r\n+\r\n       if (zbank_memory_map[address >> 16].read)\r\n       {\r\n         return (*zbank_memory_map[address >> 16].read)(address);\r\n@@ -164,6 +172,16 @@ unsigned char z80_memory_r(unsigned int address)\n \r\n void z80_memory_w(unsigned int address, unsigned char data)\r\n {\r\n+#if 0\r\n+\tstatic char error_str[512];\r\n+\tsprintf(error_str, \"[%d] Z80 %04X = %X\\n\",\r\n+\t\tv_counter,\r\n+\t\taddress, data\r\n+\t);\r\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\r\n+#endif\r\n+\r\n+\r\n   switch((address >> 13) & 7)\r\n   {\r\n     case 0: /* $0000-$3FFF: Z80 RAM (8K mirrored) */\r\n@@ -175,6 +193,26 @@ void z80_memory_w(unsigned int address, unsigned char data)\n \r\n     case 2: /* $4000-$5FFF: YM2612 */\r\n     {\r\n+#if 0\r\n+if( address == 0x4000 && data != 0x2A && data != 0x2B && data != 0xB6 ) {\r\n+\tstatic char error_str[512];\r\n+\tsprintf(error_str, \"[%d] Z80 %04X = %X\\n\",\r\n+\t\tv_counter,\r\n+\t\taddress, data\r\n+\t);\r\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\r\n+}\r\n+\r\n+if( address == 0x4002 && data != 0x2A && data != 0x2B && data != 0xB6 ) {\r\n+\tstatic char error_str[512];\r\n+\tsprintf(error_str, \"[%d] Z80 %04X = %X\\n\",\r\n+\t\tv_counter,\r\n+\t\taddress, data\r\n+\t);\r\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\r\n+}\r\n+#endif\r\n+\r\n       fm_write(Z80.cycles, address & 3, data);\r\n       return;\r\n     }\r\ndiff --git a/core/sound/blip_buf.c b/core/sound/blip_buf.c\nindex 1a47157d8..f231bbb09 100644\n--- a/core/sound/blip_buf.c\n+++ b/core/sound/blip_buf.c\n@@ -27,62 +27,41 @@ details. You should have received a copy of the GNU Lesser General Public\n License along with this module; if not, write to the Free Software Foundation,\n Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */\n \n-\n-#if defined (BLARGG_TEST) && BLARGG_TEST\n-\t#include \"blargg_test.h\"\n+#ifdef _WIN32\n+#define DEBUG_BLIP\n #endif\n \n-/* Equivalent to ULONG_MAX >= 0xFFFFFFFF00000000.\n-Avoids constants that don't fit in 32 bits. */\n-#if ULONG_MAX/0xFFFFFFFF > 0xFFFFFFFF\n-\ttypedef unsigned long fixed_t;\n-\tenum { pre_shift = 32 };\n+#ifdef DEBUG_BLIP\n+#include <windows.h>\n+#include <stdio.h>\n \n-#elif defined(ULLONG_MAX)\n-\ttypedef unsigned long long fixed_t;\n-\tenum { pre_shift = 32 };\n-\n-#else\n-\ttypedef unsigned fixed_t;\n-\tenum { pre_shift = 0 };\n+void debug_me(char *msg, int x)\n+{\n+\twhile(GetModuleHandle(NULL)) {\n+\t\tif( GetProcAddress(NULL, msg) ) Sleep(1);\n+\t\tSleep (1);\n+\t}\n+}\n+#endif\n \n+#if defined (BLARGG_TEST) && BLARGG_TEST\n+\t#include \"blargg_test.h\"\n #endif\n \n-enum { time_bits = pre_shift + 20 };\n+//#define BLIP_MONO\n \n-static fixed_t const time_unit = (fixed_t) 1 << time_bits;\n+/*\n+YM2612 = 7.67 Mhz NTSC\n+Z80 = 3.579545 MHz\n+Crystal = 53.693175 = 15 x 3.57954 MHz NTSC\n \n-enum { bass_shift  = 9 }; /* affects high-pass filter breakpoint frequency */\n-enum { end_frame_extra = 2 }; /* allows deltas slightly after frame length */\n-\n-enum { half_width  = 8 };\n-enum { buf_extra   = half_width*2 + end_frame_extra };\n-enum { phase_bits  = 5 };\n-enum { phase_count = 1 << phase_bits };\n-enum { delta_bits  = 15 };\n-enum { delta_unit  = 1 << delta_bits };\n-enum { frac_bits = time_bits - pre_shift };\n-enum { phase_shift = frac_bits - phase_bits };\n-\n-/* We could eliminate avail and encode whole samples in offset, but that would\n-limit the total buffered samples to blip_max_frame. That could only be\n-increased by decreasing time_bits, which would reduce resample ratio accuracy.\n+53693175 clock @ 50 == 1073863.5  [2^20.034]\n+32552 pcm\n+44100 cdda\n */\n \n-typedef int buf_t;\n-\n-struct blip_t\n-{\n-\tfixed_t factor;\n-\tfixed_t offset;\n-\tint size;\n-#ifdef BLIP_MONO\n-\tint integrator;\n-#else\n-  int integrator[2];\n-  buf_t* buffer[2];\n-#endif\n-};\n+enum { time_bits = 64-22 };  /* 22.42 -- 768000 * 2^42 = 2EE0 0000 0000 0000*/\n+static fixed_t const time_unit = (fixed_t) 1 << time_bits;\n \n #define BLIP_BUFFER_STATE_BUFFER_SIZE 16\n \n@@ -90,10 +69,10 @@ struct blip_buffer_state_t\n {\n \tfixed_t offset;\n #ifdef BLIP_MONO\n-\tint integrator;\n+\tbuf_t integrator;\n \tbuf_t buffer[BLIP_BUFFER_STATE_BUFFER_SIZE];\n #else\n-\tint integrator[2];\n+\tbuf_t integrator[2];\n \tbuf_t buffer[2][BLIP_BUFFER_STATE_BUFFER_SIZE];\n #endif\n };\n@@ -111,16 +90,18 @@ enum { max_sample = +32767 };\n enum { min_sample = -32768 };\n \n #define CLAMP( n ) \\\n-\t{\\\n-\t\tif ( n > max_sample ) n = max_sample;\\\n-    else if ( n < min_sample) n = min_sample;\\\n-\t}\n+{\\\n+\tif ( n > max_sample ) n = max_sample;\\\n+\telse if ( n < min_sample) n = min_sample;\\\n+}\n+\n+#include \"blip_lpf.h\"\n \n #ifdef BLIP_ASSERT\n static void check_assumptions( void )\n {\n \tint n;\n-\t\n+\n \t#if INT_MAX < 0x7FFFFFFF || UINT_MAX < 0xFFFFFFFF\n \t\t#error \"int must be at least 32 bits\"\n \t#endif\n@@ -146,31 +127,38 @@ blip_t* blip_new( int size )\n #ifdef BLIP_ASSERT\n \tassert( size >= 0 );\n #endif\n-  \n-#ifdef BLIP_MONO\n-\tm = (blip_t*) malloc( sizeof *m + (size + buf_extra) * sizeof (buf_t) );\n-#else\n+\n \tm = (blip_t*) malloc( sizeof *m );\n+\n+#ifdef DEBUG_BLIP\n+\tprintf(\"[blip_new] %d\\n\", size); fflush(stdout);\n #endif\n \n \tif ( m )\n \t{\n-#ifndef BLIP_MONO\n-    m->buffer[0] = (buf_t*) malloc( (size + buf_extra) * sizeof (buf_t));\n-    m->buffer[1] = (buf_t*) malloc( (size + buf_extra) * sizeof (buf_t));\n-    if ((m->buffer[0] == NULL) || (m->buffer[1] == NULL))\n-    {\n-      blip_delete(m);\n-      return 0;\n-    }\n-#endif\n-\t\tm->factor = time_unit / blip_max_ratio;\n+#ifdef BLIP_MONO\n+\t\tm->buffer = (buf_t*) malloc( size * sizeof (buf_t));\n+\t\tif (m->buffer == NULL)\n+\t\t{\n+\t\t\tblip_delete(m);\n+\t\t\treturn 0;\n+\t\t}\n+#else\n+\t\tm->buffer[0] = (buf_t*) malloc( size * sizeof (buf_t));\n+\t\tm->buffer[1] = (buf_t*) malloc( size * sizeof (buf_t));\n+\t\tif ((m->buffer[0] == NULL) || (m->buffer[1] == NULL))\n+\t\t{\n+\t\t\tblip_delete(m);\n+\t\t\treturn 0;\n+\t\t}\n+#endif\n+\t\tm->factor = time_unit;\n \t\tm->size   = size;\n \t\tblip_clear( m );\n #ifdef BLIP_ASSERT\n \t\tcheck_assumptions();\n #endif\n-  }\n+\t}\n \treturn m;\n }\n \n@@ -178,13 +166,16 @@ void blip_delete( blip_t* m )\n {\n \tif ( m != NULL )\n \t{\n-#ifndef BLIP_MONO\n-    if (m->buffer[0] != NULL)\n-      free(m->buffer[0]);\n-    if (m->buffer[1] != NULL)\n-      free(m->buffer[1]);\n+#ifdef BLIP_MONO\n+\t\tif (m->buffer != NULL)\n+\t\t\tfree(m->buffer);\n+#else\n+\t\tif (m->buffer[0] != NULL)\n+\t\t\tfree(m->buffer[0]);\n+\t\tif (m->buffer[1] != NULL)\n+\t\t\tfree(m->buffer[1]);\n #endif\n-    /* Clear fields in case user tries to use after freeing */\n+\t\t/* Clear fields in case user tries to use after freeing */\n \t\tmemset( m, 0, sizeof *m );\n \t\tfree( m );\n \t}\n@@ -192,40 +183,32 @@ void blip_delete( blip_t* m )\n \n void blip_set_rates( blip_t* m, double clock_rate, double sample_rate )\n {\n-\tdouble factor = time_unit * sample_rate / clock_rate;\n-\tm->factor = (fixed_t) factor;\n-\t\n+\tm->factor = (fixed_t) ((double) time_unit * sample_rate / clock_rate);\n+\n+\tm->clock_rate = (int) clock_rate;\n+\tm->sample_rate = (int) sample_rate;\n+\n+#ifdef DEBUG_BLIP\n+\tprintf(\"[blip_set_rates] %d %d %lld\\n\", (int) clock_rate, (int) sample_rate, m->factor); fflush(stdout);\n+#endif\n+\n #ifdef BLIP_ASSERT\n \t/* Fails if clock_rate exceeds maximum, relative to sample_rate */\n \tassert( 0 <= factor - m->factor && factor - m->factor < 1 );\n #endif\n-  \n-/* Avoid requiring math.h. Equivalent to\n-\tm->factor = (int) ceil( factor ) */\n-\tif ( m->factor < factor )\n-\t\tm->factor++;\n-\t\n-\t/* At this point, factor is most likely rounded up, but could still\n-\thave been rounded down in the floating-point calculation. */\n }\n \n void blip_clear( blip_t* m )\n {\n-\t/* We could set offset to 0, factor/2, or factor-1. 0 is suitable if\n-\tfactor is rounded up. factor-1 is suitable if factor is rounded down.\n-\tSince we don't know rounding direction, factor/2 accommodates either,\n-\twith the slight loss of showing an error in half the time. Since for\n-\ta 64-bit factor this is years, the halving isn't a problem. */\n-\n-\tm->offset = m->factor / 2;\n+\tm->offset = 0;\n #ifdef BLIP_MONO\n \tm->integrator = 0;\n-\tmemset( SAMPLES( m ), 0, (m->size + buf_extra) * sizeof (buf_t) );\n+\tmemset( m->buffer, 0, m->size * sizeof (buf_t) );\n #else\n \tm->integrator[0] = 0;\n \tm->integrator[1] = 0;\n-\tmemset( m->buffer[0], 0, (m->size + buf_extra) * sizeof (buf_t) );\n-\tmemset( m->buffer[1], 0, (m->size + buf_extra) * sizeof (buf_t) );\n+\tmemset( m->buffer[0], 0, m->size * sizeof (buf_t) );\n+\tmemset( m->buffer[1], 0, m->size * sizeof (buf_t) );\n #endif\n }\n \n@@ -238,7 +221,12 @@ int blip_clocks_needed( const blip_t* m, int samples )\n \tassert( (samples >= 0) && (((m->offset >> time_bits) + samples) <= m->size) );\n #endif\n \n-  needed = (fixed_t) samples * time_unit;\n+\tneeded = (fixed_t) samples * time_unit;\n+\n+#ifdef DEBUG_BLIP\n+\tprintf(\"[blip_clocks_needed] %d %lld %lld\\n\", samples, time_unit, needed); fflush(stdout);\n+#endif\n+\n \tif ( needed < m->offset )\n \t\treturn 0;\n \n@@ -247,11 +235,19 @@ int blip_clocks_needed( const blip_t* m, int samples )\n \n void blip_end_frame( blip_t* m, unsigned t )\n {\n-\tm->offset += t * m->factor;\n+#ifdef DEBUG_BLIP\n+\t//printf(\"[blip_end_frame] %lld %d %lld\\n\", m->offset, t, m->factor); fflush(stdout);\n+#endif\n+\n+\tm->offset += (fixed_t) t * m->factor;\n+\n+#ifdef DEBUG_BLIP\n+\t//printf(\"[blip_end_frame] %lld %d %lld\\n\", m->offset, t, m->factor); fflush(stdout);\n+#endif\n \n #ifdef BLIP_ASSERT\n \t/* Fails if buffer size was exceeded */\n-  assert( (m->offset >> time_bits) <= m->size );\n+\tassert( (m->offset >> time_bits) <= m->size );\n #endif\n }\n \n@@ -263,12 +259,21 @@ int blip_samples_avail( const blip_t* m )\n static void remove_samples( blip_t* m, int count )\n {\n #ifdef BLIP_MONO\n-\tbuf_t* buf = SAMPLES( m );\n+\tbuf_t* buf = m->buffer;\n #else\n \tbuf_t* buf = m->buffer[0];\n #endif\n-  int remain = (m->offset >> time_bits) + buf_extra - count;\n-  m->offset -= count * time_unit;\n+\n+\tint lpf_taps = blip_lpf_taps(m->sample_rate);\n+\n+\tint remain = (m->offset >> time_bits) - count;\n+\tif( lpf_taps > remain ) remain = lpf_taps;\n+\n+\tm->offset -= count * time_unit;\n+\n+#ifdef DEBUG_BLIP\n+\tprintf(\"[blip_remove_samples] %d %d %d %lld\\n\", remain, lpf_taps, count, m->offset); fflush(stdout);\n+#endif\n \n \tmemmove( &buf [0], &buf [count], remain * sizeof (buf_t) );\n \tmemset( &buf [remain], 0, count * sizeof (buf_t) );\n@@ -281,37 +286,47 @@ static void remove_samples( blip_t* m, int count )\n \n int blip_discard_samples_dirty(blip_t* m, int count)\n {\n+#ifdef BLIP_ASSERT\n \tif (count > (m->offset >> time_bits))\n \t\tcount = m->offset >> time_bits;\n+#endif\n \n \tm->offset -= count * time_unit;\n }\n \n int blip_read_samples( blip_t* m, short out [], int count)\n {\n+#ifdef DEBUG_BLIP\n+\tprintf(\"[blip_read_samples] %d\\n\", count); fflush(stdout);\n+\t//debug_me(\"blip_read_samples\", count);\n+#endif\n+\n #ifdef BLIP_ASSERT\n \tassert( count >= 0 );\n+#endif\n \n-\tif ( count > (m->offset >> time_bits) )\n-\t\tcount = m->offset >> time_bits;\n+\tif ( count > blip_samples_avail(m) )\n+\t\tcount = blip_samples_avail(m);\n \n \tif ( count )\n-#endif\n-  {\n+\t{\n #ifdef BLIP_MONO\n-\t\tbuf_t const* in = SAMPLES( m );\n-\t\tint sum = m->integrator;\n+\t\tbuf_t const* in = m->buffer;\n+\t\tbuf_t sum = m->integrator;\n #else\n \t\tbuf_t const* in = m->buffer[0];\n \t\tbuf_t const* in2 = m->buffer[1];\n-\t\tint sum = m->integrator[0];\n-\t\tint sum2 = m->integrator[1];\n+\t\tbuf_t sum = m->integrator[0];\n+\t\tbuf_t sum2 = m->integrator[1];\n #endif\n \t\tbuf_t const* end = in + count;\n \t\tdo\n \t\t{\n \t\t\t/* Eliminate fraction */\n-\t\t\tint s = ARITH_SHIFT( sum, delta_bits );\n+\t\t\tbuf_t s = ARITH_SHIFT( sum, lpf_frac );\n+#ifdef DEBUG_BLIP\n+\t\t\t//printf(\"%d %d\\n\", sum, s); fflush(stdout);\n+#endif\n \n \t\t\tsum += *in++;\n \n@@ -319,21 +334,15 @@ int blip_read_samples( blip_t* m, short out [], int count)\n \n \t\t\t*out++ = s;\n \n-\t\t\t/* High-pass filter */\n-\t\t\tsum -= s << (delta_bits - bass_shift);\n-\n #ifndef BLIP_MONO\n \t\t\t/* Eliminate fraction */\n-\t\t\ts = ARITH_SHIFT( sum2, delta_bits );\n+\t\t\ts = ARITH_SHIFT( sum2, lpf_frac );\n \n \t\t\tsum2 += *in2++;\n \n \t\t\tCLAMP( s );\n \n \t\t\t*out++ = s;\n-\n-\t\t\t/* High-pass filter */\n-\t\t\tsum2 -= s << (delta_bits - bass_shift);\n #endif\n \t\t}\n \t\twhile ( in != end );\n@@ -350,87 +359,170 @@ int blip_read_samples( blip_t* m, short out [], int count)\n \treturn count;\n }\n \n-int blip_mix_samples( blip_t* m1, blip_t* m2, blip_t* m3, short out [], int count)\n+int blip_mix_samples_2( blip_t* m1, blip_t* m2, short out [], int count)\n {\n #ifdef BLIP_ASSERT\n-  assert( count >= 0 );\n+\tassert( count >= 0 );\n+#endif\n+\n+#ifdef DEBUG_BLIP\n+\tprintf(\"[blip_mix_samples] %d\\n\", count); fflush(stdout);\n+\t//debug_me(\"blip_mix_samples\", count);\n+#endif\n \n-  if ( count > (m1->offset >> time_bits) )\n-    count = m1->offset >> time_bits;\n-  if ( count > (m2->offset >> time_bits) )\n-    count = m2->offset >> time_bits;\n-  if ( count > (m3->offset >> time_bits) )\n-    count = m3->offset >> time_bits;\n+\tif ( count > blip_samples_avail(m1) )\n+\t\tcount = blip_samples_avail(m1);\n+\tif ( count > blip_samples_avail(m2) )\n+\t\tcount = blip_samples_avail(m2);\n \n-  if ( count )\n+#ifdef DEBUG_BLIP\n+\tprintf(\"[blip_mix_samples] %d\\n\", count); fflush(stdout);\n+\t//debug_me(\"blip_mix_samples\", count);\n #endif\n-  {\n-    buf_t const* end;\n-    buf_t const* in[3];\n+\n+\tif ( count )\n+\t{\n+\t\tbuf_t const* end;\n+\t\tbuf_t const* in[2];\n #ifdef BLIP_MONO\n-    int sum = m1->integrator;\n-    in[0] = SAMPLES( m1 );\n-    in[1] = SAMPLES( m2 );\n-    in[2] = SAMPLES( m3 );\n+\t\tbuf_t sum = m1->integrator;\n+\t\tin[0] = m1->buffer;\n+\t\tin[1] = m2->buffer;\n #else\n-    int sum = m1->integrator[0];\n-    int sum2 = m1->integrator[1];\n-    buf_t const* in2[3];\n-    in[0] = m1->buffer[0];\n-    in[1] = m2->buffer[0];\n-    in[2] = m3->buffer[0];\n-    in2[0] = m1->buffer[1];\n-    in2[1] = m2->buffer[1];\n-    in2[2] = m3->buffer[1];\n+\t\tbuf_t sum = m1->integrator[0];\n+\t\tbuf_t sum2 = m1->integrator[1];\n+\t\tbuf_t const* in2[2];\n+\t\tin[0] = m1->buffer[0];\n+\t\tin[1] = m2->buffer[0];\n+\t\tin2[0] = m1->buffer[1];\n+\t\tin2[1] = m2->buffer[1];\n #endif\n \n-    end = in[0] + count;\n-    do\n-    {\n-      /* Eliminate fraction */\n-      int s = ARITH_SHIFT( sum, delta_bits );\n-\n-      sum += *in[0]++;\n-      sum += *in[1]++;\n-      sum += *in[2]++;\n+\t\tend = in[0] + count;\n+\t\tdo\n+\t\t{\n+\t\t\t/* Eliminate fraction */\n+\t\t\tbuf_t s = ARITH_SHIFT( sum, lpf_frac );\n \n-      CLAMP( s );\n+\t\t\tsum += *in[0]++;\n+\t\t\tsum += *in[1]++;\n \n-      *out++ = s;\n+\t\t\tCLAMP( s );\n \n-      /* High-pass filter */\n-      sum -= s << (delta_bits - bass_shift);\n+\t\t\t*out++ = s;\n \n #ifndef BLIP_MONO\n-      /* Eliminate fraction */\n-      s = ARITH_SHIFT( sum2, delta_bits );\n+\t\t\t/* Eliminate fraction */\n+\t\t\ts = ARITH_SHIFT( sum2, lpf_frac );\n+\n+\t\t\tsum2 += *in2[0]++;\n+\t\t\tsum2 += *in2[1]++;\n+\n+\t\t\tCLAMP( s );\n \n-      sum2 += *in2[0]++;\n-      sum2 += *in2[1]++;\n-      sum2 += *in2[2]++;\n+\t\t\t*out++ = s;\n+#endif\n+\t\t}\n+\t\twhile ( in[0] != end );\n+\n+#ifdef BLIP_MONO\n+\t\tm1->integrator = sum;\n+#else\n+\t\tm1->integrator[0] = sum;\n+\t\tm1->integrator[1] = sum2;\n+#endif\n+\t\tremove_samples( m1, count );\n+\t\tremove_samples( m2, count );\n+\t}\n+\n+\treturn count;\n+}\n+\n+int blip_mix_samples( blip_t* m1, blip_t* m2, blip_t* m3, short out [], int count)\n+{\n+#ifdef BLIP_ASSERT\n+\tassert( count >= 0 );\n+#endif\n \n-      CLAMP( s );\n+#ifdef DEBUG_BLIP\n+\tprintf(\"[blip_mix_samples] %d\\n\", count); fflush(stdout);\n+\t//debug_me(\"blip_mix_samples\", count);\n+#endif\n \n-      *out++ = s;\n+\tif ( count > blip_samples_avail(m1) )\n+\t\tcount = blip_samples_avail(m1);\n+\tif ( count > blip_samples_avail(m2) )\n+\t\tcount = blip_samples_avail(m2);\n+\tif ( count > blip_samples_avail(m3) )\n+\t\tcount = blip_samples_avail(m3);\n \n-      /* High-pass filter */\n-      sum2 -= s << (delta_bits - bass_shift);\n+#ifdef DEBUG_BLIP\n+\tprintf(\"[blip_mix_samples] %d\\n\", count); fflush(stdout);\n+\t//debug_me(\"blip_mix_samples\", count);\n #endif\n-    }\n-    while ( in[0] != end );\n \n+\tif ( count )\n+\t{\n+\t\tbuf_t const* end;\n+\t\tbuf_t const* in[3];\n #ifdef BLIP_MONO\n-    m1->integrator = sum;\n+\t\tbuf_t sum = m1->integrator;\n+\t\tin[0] = m1->buffer;\n+\t\tin[1] = m2->buffer;\n+\t\tin[2] = m3->buffer;\n #else\n-    m1->integrator[0] = sum;\n-    m1->integrator[1] = sum2;\n+\t\tbuf_t sum = m1->integrator[0];\n+\t\tbuf_t sum2 = m1->integrator[1];\n+\t\tbuf_t const* in2[3];\n+\t\tin[0] = m1->buffer[0];\n+\t\tin[1] = m2->buffer[0];\n+\t\tin[2] = m3->buffer[0];\n+\t\tin2[0] = m1->buffer[1];\n+\t\tin2[1] = m2->buffer[1];\n+\t\tin2[2] = m3->buffer[1];\n+#endif\n+\n+\t\tend = in[0] + count;\n+\t\tdo\n+\t\t{\n+\t\t\t/* Eliminate fraction */\n+\t\t\tbuf_t s = ARITH_SHIFT( sum, lpf_frac );\n+\n+\t\t\tsum += *in[0]++;\n+\t\t\tsum += *in[1]++;\n+\t\t\tsum += *in[2]++;\n+\n+\t\t\tCLAMP( s );\n+\n+\t\t\t*out++ = s;\n+\n+#ifndef BLIP_MONO\n+\t\t\t/* Eliminate fraction */\n+\t\t\ts = ARITH_SHIFT( sum2, lpf_frac );\n+\n+\t\t\tsum2 += *in2[0]++;\n+\t\t\tsum2 += *in2[1]++;\n+\t\t\tsum2 += *in2[2]++;\n+\n+\t\t\tCLAMP( s );\n+\n+\t\t\t*out++ = s;\n #endif\n-    remove_samples( m1, count );\n-    remove_samples( m2, count );\n-    remove_samples( m3, count );\n-  }\n+\t\t}\n+\t\twhile ( in[0] != end );\n+\n+#ifdef BLIP_MONO\n+\t\tm1->integrator = sum;\n+#else\n+\t\tm1->integrator[0] = sum;\n+\t\tm1->integrator[1] = sum2;\n+#endif\n+\t\tremove_samples( m1, count );\n+\t\tremove_samples( m2, count );\n+\t\tremove_samples( m3, count );\n+\t}\n \n-  return count;\n+\treturn count;\n }\n \n /* Things that didn't help performance on x86:\n@@ -439,271 +531,71 @@ int blip_mix_samples( blip_t* m1, blip_t* m2, blip_t* m3, short out [], int coun\n \trestrict\n */\n \n-/* Sinc_Generator( 0.9, 0.55, 4.5 ) */\n-static short const bl_step [phase_count + 1] [half_width] =\n-{\n-{   43, -115,  350, -488, 1136, -914, 5861,21022},\n-{   44, -118,  348, -473, 1076, -799, 5274,21001},\n-{   45, -121,  344, -454, 1011, -677, 4706,20936},\n-{   46, -122,  336, -431,  942, -549, 4156,20829},\n-{   47, -123,  327, -404,  868, -418, 3629,20679},\n-{   47, -122,  316, -375,  792, -285, 3124,20488},\n-{   47, -120,  303, -344,  714, -151, 2644,20256},\n-{   46, -117,  289, -310,  634,  -17, 2188,19985},\n-{   46, -114,  273, -275,  553,  117, 1758,19675},\n-{   44, -108,  255, -237,  471,  247, 1356,19327},\n-{   43, -103,  237, -199,  390,  373,  981,18944},\n-{   42,  -98,  218, -160,  310,  495,  633,18527},\n-{   40,  -91,  198, -121,  231,  611,  314,18078},\n-{   38,  -84,  178,  -81,  153,  722,   22,17599},\n-{   36,  -76,  157,  -43,   80,  824, -241,17092},\n-{   34,  -68,  135,   -3,    8,  919, -476,16558},\n-{   32,  -61,  115,   34,  -60, 1006, -683,16001},\n-{   29,  -52,   94,   70, -123, 1083, -862,15422},\n-{   27,  -44,   73,  106, -184, 1152,-1015,14824},\n-{   25,  -36,   53,  139, -239, 1211,-1142,14210},\n-{   22,  -27,   34,  170, -290, 1261,-1244,13582},\n-{   20,  -20,   16,  199, -335, 1301,-1322,12942},\n-{   18,  -12,   -3,  226, -375, 1331,-1376,12293},\n-{   15,   -4,  -19,  250, -410, 1351,-1408,11638},\n-{   13,    3,  -35,  272, -439, 1361,-1419,10979},\n-{   11,    9,  -49,  292, -464, 1362,-1410,10319},\n-{    9,   16,  -63,  309, -483, 1354,-1383, 9660},\n-{    7,   22,  -75,  322, -496, 1337,-1339, 9005},\n-{    6,   26,  -85,  333, -504, 1312,-1280, 8355},\n-{    4,   31,  -94,  341, -507, 1278,-1205, 7713},\n-{    3,   35, -102,  347, -506, 1238,-1119, 7082},\n-{    1,   40, -110,  350, -499, 1190,-1021, 6464},\n-{    0,   43, -115,  350, -488, 1136, -914, 5861}\n-};\n-\n-/* Shifting by pre_shift allows calculation using unsigned int rather than\n-possibly-wider fixed_t. On 32-bit platforms, this is likely more efficient.\n-And by having pre_shift 32, a 32-bit platform can easily do the shift by\n-simply ignoring the low half. */\n-\n #ifndef BLIP_MONO\n \n void blip_add_delta( blip_t* m, unsigned time, int delta_l, int delta_r )\n {\n-  if (delta_l | delta_r)\n-  {\n-    unsigned fixed = (unsigned) ((time * m->factor + m->offset) >> pre_shift);\n-    int phase = fixed >> phase_shift & (phase_count - 1);\n-    short const* in  = bl_step [phase];\n-    short const* rev = bl_step [phase_count - phase];\n-    int interp = fixed >> (phase_shift - delta_bits) & (delta_unit - 1);\n-    int pos = fixed >> frac_bits;\n+\tif (!(delta_l | delta_r)) return;\n+\n+\t//debug_me(\"blip_add_delta\", time);\n+\n+\tfixed_t fixed = (fixed_t) (time * m->factor + m->offset);\n+\tint pos = fixed >> time_bits;\n+\n+#ifdef DEBUG_BLIP\n+\t//printf(\"[blip_add_delta] %lld %d %d %d %d\\n\", fixed, pos, time, delta_l, delta_r); fflush(stdout);\n+#endif\n \n #ifdef BLIP_INVERT\n-    buf_t* out_l = m->buffer[1] + pos;\n-    buf_t* out_r = m->buffer[0] + pos;\n+\tbuf_t* out_l = m->buffer[1] + pos;\n+\tbuf_t* out_r = m->buffer[0] + pos;\n #else\n-    buf_t* out_l = m->buffer[0] + pos;\n-    buf_t* out_r = m->buffer[1] + pos;\n+\tbuf_t* out_l = m->buffer[0] + pos;\n+\tbuf_t* out_r = m->buffer[1] + pos;\n #endif\n \n-    int delta;\n-\n #ifdef BLIP_ASSERT\n-    /* Fails if buffer size was exceeded */\n-    assert( pos <= m->size + end_frame_extra );\n-#endif\n-\n-    if (delta_l == delta_r)\n-    {\n-      buf_t out;\n-      delta = (delta_l * interp) >> delta_bits;\n-      delta_l -= delta;\n-      out = in[0]*delta_l + in[half_width+0]*delta;\n-      out_l[0] += out;\n-      out_r[0] += out;\n-      out = in[1]*delta_l + in[half_width+1]*delta;\n-      out_l[1] += out;\n-      out_r[1] += out;\n-      out = in[2]*delta_l + in[half_width+2]*delta;\n-      out_l[2] += out;\n-      out_r[2] += out;\n-      out = in[3]*delta_l + in[half_width+3]*delta;\n-      out_l[3] += out;\n-      out_r[3] += out;\n-      out = in[4]*delta_l + in[half_width+4]*delta;\n-      out_l[4] += out;\n-      out_r[4] += out;\n-      out = in[5]*delta_l + in[half_width+5]*delta;\n-      out_l[5] += out;\n-      out_r[5] += out;\n-      out = in[6]*delta_l + in[half_width+6]*delta;\n-      out_l[6] += out;\n-      out_r[6] += out;\n-      out = in[7]*delta_l + in[half_width+7]*delta;\n-      out_l[7] += out;\n-      out_r[7] += out;\n-      out = rev[7]*delta_l + rev[7-half_width]*delta;\n-      out_l[8] += out;\n-      out_r[8] += out;\n-      out = rev[6]*delta_l + rev[6-half_width]*delta;\n-      out_l[9] += out;\n-      out_r[9] += out;\n-      out = rev[5]*delta_l + rev[5-half_width]*delta;\n-      out_l[10] += out;\n-      out_r[10] += out;\n-      out = rev[4]*delta_l + rev[4-half_width]*delta;\n-      out_l[11] += out;\n-      out_r[11] += out;\n-      out = rev[3]*delta_l + rev[3-half_width]*delta;\n-      out_l[12] += out;\n-      out_r[12] += out;\n-      out = rev[2]*delta_l + rev[2-half_width]*delta;\n-      out_l[13] += out;\n-      out_r[13] += out;\n-      out = rev[1]*delta_l + rev[1-half_width]*delta;\n-      out_l[14] += out;\n-      out_r[14] += out;\n-      out = rev[0]*delta_l + rev[0-half_width]*delta;\n-      out_l[15] += out;\n-      out_r[15] += out;\n-    }\n-    else\n-    {\n-      delta = (delta_l * interp) >> delta_bits;\n-      delta_l -= delta;\n-      out_l [0] += in[0]*delta_l + in[half_width+0]*delta;\n-      out_l [1] += in[1]*delta_l + in[half_width+1]*delta;\n-      out_l [2] += in[2]*delta_l + in[half_width+2]*delta;\n-      out_l [3] += in[3]*delta_l + in[half_width+3]*delta;\n-      out_l [4] += in[4]*delta_l + in[half_width+4]*delta;\n-      out_l [5] += in[5]*delta_l + in[half_width+5]*delta;\n-      out_l [6] += in[6]*delta_l + in[half_width+6]*delta;\n-      out_l [7] += in[7]*delta_l + in[half_width+7]*delta;\n-      out_l [8] += rev[7]*delta_l + rev[7-half_width]*delta;\n-      out_l [9] += rev[6]*delta_l + rev[6-half_width]*delta;\n-      out_l [10] += rev[5]*delta_l + rev[5-half_width]*delta;\n-      out_l [11] += rev[4]*delta_l + rev[4-half_width]*delta;\n-      out_l [12] += rev[3]*delta_l + rev[3-half_width]*delta;\n-      out_l [13] += rev[2]*delta_l + rev[2-half_width]*delta;\n-      out_l [14] += rev[1]*delta_l + rev[1-half_width]*delta;\n-      out_l [15] += rev[0]*delta_l + rev[0-half_width]*delta;\n-\n-      delta = (delta_r * interp) >> delta_bits;\n-      delta_r -= delta;\n-      out_r [0] += in[0]*delta_r + in[half_width+0]*delta;\n-      out_r [1] += in[1]*delta_r + in[half_width+1]*delta;\n-      out_r [2] += in[2]*delta_r + in[half_width+2]*delta;\n-      out_r [3] += in[3]*delta_r + in[half_width+3]*delta;\n-      out_r [4] += in[4]*delta_r + in[half_width+4]*delta;\n-      out_r [5] += in[5]*delta_r + in[half_width+5]*delta;\n-      out_r [6] += in[6]*delta_r + in[half_width+6]*delta;\n-      out_r [7] += in[7]*delta_r + in[half_width+7]*delta;\n-      out_r [8] += rev[7]*delta_r + rev[7-half_width]*delta;\n-      out_r [9] += rev[6]*delta_r + rev[6-half_width]*delta;\n-      out_r [10] += rev[5]*delta_r + rev[5-half_width]*delta;\n-      out_r [11] += rev[4]*delta_r + rev[4-half_width]*delta;\n-      out_r [12] += rev[3]*delta_r + rev[3-half_width]*delta;\n-      out_r [13] += rev[2]*delta_r + rev[2-half_width]*delta;\n-      out_r [14] += rev[1]*delta_r + rev[1-half_width]*delta;\n-      out_r [15] += rev[0]*delta_r + rev[0-half_width]*delta;\n-    }\n-  }\n+\t/* Fails if buffer size was exceeded */\n+\tassert( pos <= m->size );\n+#endif\n+\n+\tblip_lpf_stereo(m->sample_rate, out_l, out_r, delta_l, delta_r);\n }\n \n+\n void blip_add_delta_fast( blip_t* m, unsigned time, int delta_l, int delta_r )\n {\n-  if (delta_l | delta_r)\n-  {\n-    unsigned fixed = (unsigned) ((time * m->factor + m->offset) >> pre_shift);\n-    int interp = fixed >> (frac_bits - delta_bits) & (delta_unit - 1);\n-    int pos = fixed >> frac_bits;\n-\n-#ifdef STEREO_INVERT\n-    buf_t* out_l = m->buffer[1] + pos;\n-    buf_t* out_r = m->buffer[0] + pos;\n-#else\n-    buf_t* out_l = m->buffer[0] + pos;\n-    buf_t* out_r = m->buffer[1] + pos;\n-#endif\n-\n-    int delta = delta_l * interp;\n-\n-#ifdef BLIP_ASSERT\n-    /* Fails if buffer size was exceeded */\n-    assert( pos <= m->size + end_frame_extra );\n-#endif\n-\n-    if (delta_l == delta_r)\n-    {\n-      delta_l = delta_l * delta_unit - delta;\n-      out_l[7] += delta_l;\n-      out_l[8] += delta;\n-      out_r[7] += delta_l;\n-      out_r[8] += delta;\n-    }\n-    else\n-    {\n-      out_l[7] += delta_l * delta_unit - delta;\n-      out_l[8] += delta;\n-      delta = delta_r * interp;\n-      out_r[7] += delta_r * delta_unit - delta;\n-      out_r[8] += delta;\n-    }\n-  }\n+\tblip_add_delta(m, time, delta_l, delta_r);\n }\n \n #else\n \n void blip_add_delta( blip_t* m, unsigned time, int delta )\n {\n-\tunsigned fixed = (unsigned) ((time * m->factor + m->offset) >> pre_shift);\n-\tbuf_t* out = SAMPLES( m ) + (fixed >> frac_bits);\n-\t\n-\tint phase = fixed >> phase_shift & (phase_count - 1);\n-\tshort const* in  = bl_step [phase];\n-\tshort const* rev = bl_step [phase_count - phase];\n-\t\n-\tint interp = fixed >> (phase_shift - delta_bits) & (delta_unit - 1);\n-\tint delta2 = (delta * interp) >> delta_bits;\n-\tdelta -= delta2;\n-\t\n+\tif (!delta) return;\n+\n+\t//debug_me(\"blip_add_delta\", time);\n+\n+\tfixed_t fixed = (fixed_t) (time * m->factor + m->offset);\n+\tint pos = fixed >> time_bits;\n+\n+\tbuf_t* out = m->buffer + pos;\n+\n+#ifdef DEBUG_BLIP\n+\tprintf(\"[blip_add_delta] %lld %d %d %d\\n\", fixed, pos, time, delta); fflush(stdout);\n+#endif\n+\n #ifdef BLIP_ASSERT\n \t/* Fails if buffer size was exceeded */\n-\tassert( out <= &SAMPLES( m ) [m->size + end_frame_extra] );\n+\tassert( pos <= m->size );\n #endif\n \n-\tout [0] += in[0]*delta + in[half_width+0]*delta2;\n-\tout [1] += in[1]*delta + in[half_width+1]*delta2;\n-\tout [2] += in[2]*delta + in[half_width+2]*delta2;\n-\tout [3] += in[3]*delta + in[half_width+3]*delta2;\n-\tout [4] += in[4]*delta + in[half_width+4]*delta2;\n-\tout [5] += in[5]*delta + in[half_width+5]*delta2;\n-\tout [6] += in[6]*delta + in[half_width+6]*delta2;\n-\tout [7] += in[7]*delta + in[half_width+7]*delta2;\n-\t\n-\tin = rev;\n-\tout [ 8] += in[7]*delta + in[7-half_width]*delta2;\n-\tout [ 9] += in[6]*delta + in[6-half_width]*delta2;\n-\tout [10] += in[5]*delta + in[5-half_width]*delta2;\n-\tout [11] += in[4]*delta + in[4-half_width]*delta2;\n-\tout [12] += in[3]*delta + in[3-half_width]*delta2;\n-\tout [13] += in[2]*delta + in[2-half_width]*delta2;\n-\tout [14] += in[1]*delta + in[1-half_width]*delta2;\n-\tout [15] += in[0]*delta + in[0-half_width]*delta2;\n+\tblip_lpf_mono(m->sample_rate, out, delta);\n }\n \n void blip_add_delta_fast( blip_t* m, unsigned time, int delta )\n {\n-\tunsigned fixed = (unsigned) ((time * m->factor + m->offset) >> pre_shift);\n-\tbuf_t* out = SAMPLES( m ) + (fixed >> frac_bits);\n-\t\n-\tint interp = fixed >> (frac_bits - delta_bits) & (delta_unit - 1);\n-\tint delta2 = delta * interp;\n-\t\n-#ifdef BLIP_ASSERT\n-  /* Fails if buffer size was exceeded */\n-\tassert( out <= &SAMPLES( m ) [m->size + end_frame_extra] );\n-#endif\n-  \n-\tout [7] += delta * delta_unit - delta2;\n-\tout [8] += delta2;\n+\tblip_add_delta(m, time, delta);\n }\n #endif\n \n@@ -711,7 +603,7 @@ void blip_save_buffer_state(const blip_t *buf, blip_buffer_state_t *state)\n {\n #ifdef BLIP_MONO\n \tstate->integrator = buf->integrator;\n-\tif (buf->buffer && buf->size >= BLIPSTATE_BUFFER_SIZE)\n+\tif (buf->buffer && buf->size >= BLIP_BUFFER_STATE_BUFFER_SIZE)\n \t{\n \t\tmemcpy(state->buffer, buf->buffer, sizeof(state->buffer));\n \t}\n@@ -732,10 +624,10 @@ void blip_save_buffer_state(const blip_t *buf, blip_buffer_state_t *state)\n void blip_load_buffer_state(blip_t *buf, const blip_buffer_state_t *state)\n {\n #ifdef BLIP_MONO\n-\tstate->integrator = buf->integrator;\n-\tif (buf->buffer && buf->size >= BLIPSTATE_BUFFER_SIZE)\n+\tbuf->integrator = state->integrator;\n+\tif (buf->buffer && buf->size >= BLIP_BUFFER_STATE_BUFFER_SIZE)\n \t{\n-\t\tmemcpy(state->buffer, buf->buffer, sizeof(state->buffer));\n+\t\tmemcpy(buf->buffer, state->buffer, sizeof(state->buffer));\n \t}\n #else\n \tint c;\ndiff --git a/core/sound/blip_buf.h b/core/sound/blip_buf.h\nindex 4383563f3..03032feb5 100644\n--- a/core/sound/blip_buf.h\n+++ b/core/sound/blip_buf.h\n@@ -10,7 +10,23 @@\n \n /** First parameter of most functions is blip_t*, or const blip_t* if nothing\n is changed. */\n-typedef struct blip_t blip_t;\n+typedef unsigned long long fixed_t;\n+typedef signed int buf_t;\n+typedef struct blip_t\n+{\n+\tfixed_t factor;\n+\tfixed_t offset;\n+\tint size;\n+\tint clock_rate;\n+\tint sample_rate;\n+#ifdef BLIP_MONO\n+\tbuf_t integrator;\n+\tbuf_t* buffer;\n+#else\n+\tbuf_t integrator[2];\n+\tbuf_t* buffer[2];\n+#endif\n+} blip_t;\n typedef struct blip_buffer_state_t blip_buffer_state_t;\n \n /** Creates new buffer that can hold at most sample_count samples. Sets rates\n@@ -24,7 +40,7 @@ void blip_set_rates( blip_t*, double clock_rate, double sample_rate );\n \n enum { /** Maximum clock_rate/sample_rate ratio. For a given sample_rate,\n clock_rate must not be greater than sample_rate*blip_max_ratio. */\n-blip_max_ratio = 1 << 20 };\n+blip_max_ratio = 1 << 30 };\n \n /** Clears entire buffer. Afterwards, blip_samples_avail() == 0. */\n void blip_clear( blip_t* );\n@@ -52,7 +68,7 @@ samples available. */\n int blip_clocks_needed( const blip_t*, int sample_count );\n \n enum { /** Maximum number of samples that can be generated from one time frame. */\n-blip_max_frame = 4000 };\n+blip_max_frame = 768000 / 50 };\n \n /** Makes input clocks before clock_duration available for reading as output\n samples. Also begins new time frame at clock_duration, so that clock time 0 in\n@@ -75,6 +91,7 @@ int blip_read_samples( blip_t*, short out [], int count);\n \n /* Same as above function except sample is mixed from three blip buffers source */\n int blip_mix_samples( blip_t* m1, blip_t* m2, blip_t* m3, short out [], int count);\n+int blip_mix_samples_2( blip_t* m1, blip_t* m2, short out [], int count);\n \n /** Frees buffer. No effect if NULL is passed. */\n void blip_delete( blip_t* );\ndiff --git a/core/sound/blip_lpf.h b/core/sound/blip_lpf.h\nnew file mode 100644\nindex 000000000..89cb5654b\n--- /dev/null\n+++ b/core/sound/blip_lpf.h\n@@ -0,0 +1,313 @@\n+/* https://fiiir.com/ */\r\n+\r\n+\r\n+/*\r\n+note: use higher sampling rates for better de-aliasing  [384K, 768K]\r\n+      frontend can do nearest neighbor integer downsampling  [48K target w/ 24K cutoff]\r\n+*/\r\n+\r\n+\r\n+/* 1.16.15 */\r\n+enum { lpf_frac = 15 };\r\n+enum { lpf_scale = 32768 };\r\n+\r\n+\r\n+static int blip_lpf_cutoff = 0;  /* set to nyquist (1/2) of final output sampling rate - 0 = none */\r\n+\r\n+\r\n+#define LPF_TAPS(x) (buf_t) ((double) (x) * (double) (1UL << lpf_frac) * (double) lpf_scale)\r\n+\r\n+\r\n+#include \"blip_lpf_48K.h\"\r\n+#include \"blip_lpf_96K.h\"\r\n+#include \"blip_lpf_192K.h\"\r\n+#include \"blip_lpf_384K.h\"\r\n+#include \"blip_lpf_768K.h\"\r\n+\r\n+\r\n+#ifdef __cplusplus\r\n+extern \"C\" {\r\n+#endif\r\n+\r\n+void set_blip_lowpass(int rate)\r\n+{\r\n+\tblip_lpf_cutoff = rate;\r\n+}\r\n+\r\n+#ifdef __cplusplus\r\n+}\r\n+#endif\r\n+\r\n+\r\n+static int blip_lpf_taps(int sample_rate)\r\n+{\r\n+\tswitch( sample_rate ) {\r\n+\tcase 48000: return blip_lpf_48K_taps;\r\n+\tcase 96000: return blip_lpf_96K_taps;\r\n+\tcase 192000: return blip_lpf_192K_taps;\r\n+\tcase 384000: return blip_lpf_384K_taps;\r\n+\tcase 768000: return blip_lpf_768K_taps;\r\n+\t};\r\n+\r\n+\treturn 0;\r\n+}\r\n+\r\n+\r\n+static void blip_lpf_stereo(int sample_rate, buf_t* out_l, buf_t* out_r, int delta_l, int delta_r)\r\n+{\r\n+\t/* 31-bit * 15-bit = 46-bit >> 15 = 31-bit */\r\n+\r\n+\tif( blip_lpf_cutoff == 24000 ) {\r\n+\t\tswitch( sample_rate ) {\r\n+\t\tcase 48000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_48K_taps; lcv++ ) {\r\n+\t\t\t\tout_l [lcv] += ((signed long long)blip_lpf_48K_24K[lcv] * delta_l) / lpf_scale;\r\n+\t\t\t\tout_r [lcv] += ((signed long long)blip_lpf_48K_24K[lcv] * delta_r) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 96000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_96K_taps; lcv++ ) {\r\n+\t\t\t\tout_l [lcv] += ((signed long long)blip_lpf_96K_24K[lcv] * delta_l) / lpf_scale;\r\n+\t\t\t\tout_r [lcv] += ((signed long long)blip_lpf_96K_24K[lcv] * delta_r) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 192000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_192K_taps; lcv++ ) {\r\n+\t\t\t\tout_l [lcv] += ((signed long long)blip_lpf_192K_24K[lcv] * delta_l) / lpf_scale;\r\n+\t\t\t\tout_r [lcv] += ((signed long long)blip_lpf_192K_24K[lcv] * delta_r) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 384000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {\r\n+\t\t\t\tout_l [lcv] += ((signed long long)blip_lpf_384K_24K[lcv] * delta_l) / lpf_scale;\r\n+\t\t\t\tout_r [lcv] += ((signed long long)blip_lpf_384K_24K[lcv] * delta_r) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 768000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {\r\n+\t\t\t\tout_l [lcv] += ((signed long long)blip_lpf_768K_24K[lcv] * delta_l) / lpf_scale;\r\n+\t\t\t\tout_r [lcv] += ((signed long long)blip_lpf_768K_24K[lcv] * delta_r) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t}\r\n+\r\n+\r\n+\tif( blip_lpf_cutoff == 48000 ) {\r\n+\t\tswitch( sample_rate ) {\r\n+\t\tcase 96000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_96K_taps; lcv++ ) {\r\n+\t\t\t\tout_l [lcv] += ((signed long long)blip_lpf_96K_48K[lcv] * delta_l) / lpf_scale;\r\n+\t\t\t\tout_r [lcv] += ((signed long long)blip_lpf_96K_48K[lcv] * delta_r) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 192000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_192K_taps; lcv++ ) {\r\n+\t\t\t\tout_l [lcv] += ((signed long long)blip_lpf_192K_48K[lcv] * delta_l) / lpf_scale;\r\n+\t\t\t\tout_r [lcv] += ((signed long long)blip_lpf_192K_48K[lcv] * delta_r) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 384000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {\r\n+\t\t\t\tout_l [lcv] += ((signed long long)blip_lpf_384K_48K[lcv] * delta_l) / lpf_scale;\r\n+\t\t\t\tout_r [lcv] += ((signed long long)blip_lpf_384K_48K[lcv] * delta_r) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 768000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {\r\n+\t\t\t\tout_l [lcv] += ((signed long long)blip_lpf_768K_48K[lcv] * delta_l) / lpf_scale;\r\n+\t\t\t\tout_r [lcv] += ((signed long long)blip_lpf_768K_48K[lcv] * delta_r) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t}\r\n+\r\n+\r\n+\tif( blip_lpf_cutoff == 96000 ) {\r\n+\t\tswitch( sample_rate ) {\r\n+\t\tcase 192000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_192K_taps; lcv++ ) {\r\n+\t\t\t\tout_l [lcv] += ((signed long long)blip_lpf_192K_96K[lcv] * delta_l) / lpf_scale;\r\n+\t\t\t\tout_r [lcv] += ((signed long long)blip_lpf_192K_96K[lcv] * delta_r) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 384000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {\r\n+\t\t\t\tout_l [lcv] += ((signed long long)blip_lpf_384K_96K[lcv] * delta_l) / lpf_scale;\r\n+\t\t\t\tout_r [lcv] += ((signed long long)blip_lpf_384K_96K[lcv] * delta_r) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 768000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {\r\n+\t\t\t\tout_l [lcv] += ((signed long long)blip_lpf_768K_96K[lcv] * delta_l) / lpf_scale;\r\n+\t\t\t\tout_r [lcv] += ((signed long long)blip_lpf_768K_96K[lcv] * delta_r) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t}\r\n+\r\n+\r\n+\tif( blip_lpf_cutoff == 192000 ) {\r\n+\t\tswitch( sample_rate ) {\r\n+\t\tcase 384000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {\r\n+\t\t\t\tout_l [lcv] += ((signed long long)blip_lpf_384K_192K[lcv] * delta_l) / lpf_scale;\r\n+\t\t\t\tout_r [lcv] += ((signed long long)blip_lpf_384K_192K[lcv] * delta_r) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 768000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {\r\n+\t\t\t\tout_l [lcv] += ((signed long long)blip_lpf_768K_192K[lcv] * delta_l) / lpf_scale;\r\n+\t\t\t\tout_r [lcv] += ((signed long long)blip_lpf_768K_192K[lcv] * delta_r) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t}\r\n+\r\n+\r\n+\tif( blip_lpf_cutoff == 384000 ) {\r\n+\t\tswitch( sample_rate ) {\r\n+\t\tcase 768000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {\r\n+\t\t\t\tout_l [lcv] += ((signed long long)blip_lpf_768K_384K[lcv] * delta_l) / lpf_scale;\r\n+\t\t\t\tout_r [lcv] += ((signed long long)blip_lpf_768K_384K[lcv] * delta_r) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t}\r\n+\r\n+\r\n+\tout_l [0] += (buf_t) delta_l * (1UL << lpf_frac);\r\n+\tout_r [0] += (buf_t) delta_r * (1UL << lpf_frac);\r\n+}\r\n+\r\n+\r\n+static void blip_lpf_mono(int sample_rate, buf_t* out, int delta)\r\n+{\r\n+\tif( blip_lpf_cutoff == 24000 ) {\r\n+\t\tswitch( sample_rate ) {\r\n+\t\tcase 48000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_48K_taps; lcv++ ) {\r\n+\t\t\t\tout [lcv] += ((signed long long)blip_lpf_48K_24K[lcv] * delta) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 96000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_96K_taps; lcv++ ) {\r\n+\t\t\t\tout [lcv] += ((signed long long)blip_lpf_96K_24K[lcv] * delta) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 192000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_192K_taps; lcv++ ) {\r\n+\t\t\t\tout [lcv] += ((signed long long)blip_lpf_192K_24K[lcv] * delta) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 384000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {\r\n+\t\t\t\tout [lcv] += ((signed long long)blip_lpf_384K_24K[lcv] * delta) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 768000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {\r\n+\t\t\t\tout [lcv] += ((signed long long)blip_lpf_768K_24K[lcv] * delta) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t}\r\n+\r\n+\r\n+\tif( blip_lpf_cutoff == 48000 ) {\r\n+\t\tswitch( sample_rate ) {\r\n+\t\tcase 96000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_96K_taps; lcv++ ) {\r\n+\t\t\t\tout [lcv] += ((signed long long)blip_lpf_96K_48K[lcv] * delta) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 192000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_192K_taps; lcv++ ) {\r\n+\t\t\t\tout [lcv] += ((signed long long)blip_lpf_192K_48K[lcv] * delta) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 384000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {\r\n+\t\t\t\tout [lcv] += ((signed long long)blip_lpf_384K_48K[lcv] * delta) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 768000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {\r\n+\t\t\t\tout [lcv] += ((signed long long)blip_lpf_768K_48K[lcv] * delta) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t}\r\n+\r\n+\r\n+\tif( blip_lpf_cutoff == 96000 ) {\r\n+\t\tswitch( sample_rate ) {\r\n+\t\tcase 192000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_192K_taps; lcv++ ) {\r\n+\t\t\t\tout [lcv] += ((signed long long)blip_lpf_192K_96K[lcv] * delta) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 384000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {\r\n+\t\t\t\tout [lcv] += ((signed long long)blip_lpf_384K_96K[lcv] * delta) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 768000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {\r\n+\t\t\t\tout [lcv] += ((signed long long)blip_lpf_768K_96K[lcv] * delta) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t}\r\n+\r\n+\r\n+\tif( blip_lpf_cutoff == 192000 ) {\r\n+\t\tswitch( sample_rate ) {\r\n+\t\tcase 384000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {\r\n+\t\t\t\tout [lcv] += ((signed long long)blip_lpf_384K_192K[lcv] * delta) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\r\n+\t\tcase 768000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {\r\n+\t\t\t\tout [lcv] += ((signed long long)blip_lpf_768K_192K[lcv] * delta) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t}\r\n+\r\n+\r\n+\tif( blip_lpf_cutoff == 384000 ) {\r\n+\t\tswitch( sample_rate ) {\r\n+\t\tcase 768000:\r\n+\t\t\tfor( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {\r\n+\t\t\t\tout [lcv] += ((signed long long)blip_lpf_768K_384K[lcv] * delta) / lpf_scale;\r\n+\t\t\t}\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t}\r\n+\r\n+\r\n+\tout [0] += (buf_t) delta * (1UL << lpf_frac);\r\n+}\r\ndiff --git a/core/sound/blip_lpf_192K.h b/core/sound/blip_lpf_192K.h\nnew file mode 100644\nindex 000000000..1b923ff45\n--- /dev/null\n+++ b/core/sound/blip_lpf_192K.h\n@@ -0,0 +1,7 @@\n+/* 192K sampling, 2K cutoff, 3K transition */\r\n+enum { blip_lpf_192K_taps = 295 };\r\n+\r\n+\r\n+#include \"blip_lpf_192K_24K.h\"\r\n+#include \"blip_lpf_192K_48K.h\"\r\n+#include \"blip_lpf_192K_96K.h\"\r\ndiff --git a/core/sound/blip_lpf_192K_24K.h b/core/sound/blip_lpf_192K_24K.h\nnew file mode 100644\nindex 000000000..73744dcc7\n--- /dev/null\n+++ b/core/sound/blip_lpf_192K_24K.h\n@@ -0,0 +1,297 @@\n+static buf_t const blip_lpf_192K_24K[blip_lpf_192K_taps] = {\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000088867880174),\r\n+LPF_TAPS(-0.000000238149160989),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000967826707627),\r\n+LPF_TAPS(0.000002293299391840),\r\n+LPF_TAPS(0.000002794151684877),\r\n+LPF_TAPS(0.000001194819042577),\r\n+LPF_TAPS(-0.000002692542847324),\r\n+LPF_TAPS(-0.000007189532013224),\r\n+LPF_TAPS(-0.000009191703997209),\r\n+LPF_TAPS(-0.000005935583389038),\r\n+LPF_TAPS(0.000002786671528697),\r\n+LPF_TAPS(0.000013451394329611),\r\n+LPF_TAPS(0.000019852237874508),\r\n+LPF_TAPS(0.000016344170879499),\r\n+LPF_TAPS(0.000001741335735348),\r\n+LPF_TAPS(-0.000018529842079338),\r\n+LPF_TAPS(-0.000033904623197724),\r\n+LPF_TAPS(-0.000033800086864146),\r\n+LPF_TAPS(-0.000014089712842714),\r\n+LPF_TAPS(0.000018750083838216),\r\n+LPF_TAPS(0.000048910060055138),\r\n+LPF_TAPS(0.000058402235278429),\r\n+LPF_TAPS(0.000037111313024223),\r\n+LPF_TAPS(-0.000009601521922410),\r\n+LPF_TAPS(-0.000060722607418047),\r\n+LPF_TAPS(-0.000088433378276437),\r\n+LPF_TAPS(-0.000072615683850022),\r\n+LPF_TAPS(-0.000013736274648311),\r\n+LPF_TAPS(0.000063565979232706),\r\n+LPF_TAPS(0.000119910156306053),\r\n+LPF_TAPS(0.000120569818801960),\r\n+LPF_TAPS(0.000055611400702006),\r\n+LPF_TAPS(-0.000050408904084663),\r\n+LPF_TAPS(-0.000146329682785647),\r\n+LPF_TAPS(-0.000178286254100790),\r\n+LPF_TAPS(-0.000118882157530363),\r\n+LPF_TAPS(0.000013702800097689),\r\n+LPF_TAPS(0.000158738425916860),\r\n+LPF_TAPS(0.000239731180927390),\r\n+LPF_TAPS(0.000203740441664265),\r\n+LPF_TAPS(0.000053496004603635),\r\n+LPF_TAPS(-0.000146241851067930),\r\n+LPF_TAPS(-0.000295118409098363),\r\n+LPF_TAPS(-0.000306513263908866),\r\n+LPF_TAPS(-0.000156059832555650),\r\n+LPF_TAPS(0.000097038599796698),\r\n+LPF_TAPS(0.000330966493993223),\r\n+LPF_TAPS(0.000418635208448877),\r\n+LPF_TAPS(0.000295095855792692),\r\n+LPF_TAPS(-0.000000000000000005),\r\n+LPF_TAPS(-0.000330777418181525),\r\n+LPF_TAPS(-0.000526021540293030),\r\n+LPF_TAPS(-0.000466220696521015),\r\n+LPF_TAPS(-0.000153270702730086),\r\n+LPF_TAPS(0.000276441517410037),\r\n+LPF_TAPS(0.000609077894058258),\r\n+LPF_TAPS(0.000658065918351398),\r\n+LPF_TAPS(0.000366064286993324),\r\n+LPF_TAPS(-0.000150386402110856),\r\n+LPF_TAPS(-0.000643549484484288),\r\n+LPF_TAPS(-0.000851316283811722),\r\n+LPF_TAPS(-0.000634138612347655),\r\n+LPF_TAPS(-0.000061624390633655),\r\n+LPF_TAPS(0.000602337744180382),\r\n+LPF_TAPS(0.001018581734917155),\r\n+LPF_TAPS(0.000943577962191536),\r\n+LPF_TAPS(0.000367260061047211),\r\n+LPF_TAPS(-0.000458299554997024),\r\n+LPF_TAPS(-0.001125354793155152),\r\n+LPF_TAPS(-0.001269318042621104),\r\n+LPF_TAPS(-0.000764290283324042),\r\n+LPF_TAPS(0.000187905638196626),\r\n+LPF_TAPS(0.001132206574500079),\r\n+LPF_TAPS(0.001574705433974788),\r\n+LPF_TAPS(0.001237569662484544),\r\n+LPF_TAPS(0.000224511362529855),\r\n+LPF_TAPS(-0.000998234344597220),\r\n+LPF_TAPS(-0.001812391534151866),\r\n+LPF_TAPS(-0.001756794170294545),\r\n+LPF_TAPS(-0.000782319104071645),\r\n+LPF_TAPS(0.000685607318862552),\r\n+LPF_TAPS(0.001926735087455666),\r\n+LPF_TAPS(0.002275459232597814),\r\n+LPF_TAPS(0.001472448638347935),\r\n+LPF_TAPS(-0.000164888079687475),\r\n+LPF_TAPS(-0.001857714543905295),\r\n+LPF_TAPS(-0.002731352650618140),\r\n+LPF_TAPS(-0.002262076797697579),\r\n+LPF_TAPS(-0.000579338030693501),\r\n+LPF_TAPS(0.001546150733363754),\r\n+LPF_TAPS(0.003048749090619086),\r\n+LPF_TAPS(0.003096593192501319),\r\n+LPF_TAPS(0.001543084834901600),\r\n+LPF_TAPS(-0.000939837302041592),\r\n+LPF_TAPS(-0.003142245599040471),\r\n+LPF_TAPS(-0.003899170603326770),\r\n+LPF_TAPS(-0.002698408098877719),\r\n+LPF_TAPS(0.000000000000000021),\r\n+LPF_TAPS(0.002921903641535428),\r\n+LPF_TAPS(0.004572008955895946),\r\n+LPF_TAPS(0.003990141163815959),\r\n+LPF_TAPS(0.001292615642227111),\r\n+LPF_TAPS(-0.002299054442402459),\r\n+LPF_TAPS(-0.004998959763464508),\r\n+LPF_TAPS(-0.005334161275829722),\r\n+LPF_TAPS(-0.002932772495491725),\r\n+LPF_TAPS(0.001191775941151652),\r\n+LPF_TAPS(0.005048722557538835),\r\n+LPF_TAPS(0.006617006934658838),\r\n+LPF_TAPS(0.004887582240540398),\r\n+LPF_TAPS(0.000471391820742604),\r\n+LPF_TAPS(-0.004577023938925431),\r\n+LPF_TAPS(-0.007695957214193918),\r\n+LPF_TAPS(-0.007095712754339889),\r\n+LPF_TAPS(-0.002751638823885237),\r\n+LPF_TAPS(0.003424817617303759),\r\n+LPF_TAPS(0.008397388880842557),\r\n+LPF_TAPS(0.009469292790600799),\r\n+LPF_TAPS(0.005707632271462191),\r\n+LPF_TAPS(-0.001406641214315407),\r\n+LPF_TAPS(-0.008508488631453783),\r\n+LPF_TAPS(-0.011898560218317223),\r\n+LPF_TAPS(-0.009418303287613599),\r\n+LPF_TAPS(-0.001724055500589014),\r\n+LPF_TAPS(0.007750487581196339),\r\n+LPF_TAPS(0.014258989316922464),\r\n+LPF_TAPS(0.014039471720665702),\r\n+LPF_TAPS(0.006367554689719202),\r\n+LPF_TAPS(-0.005700613585608971),\r\n+LPF_TAPS(-0.016420333624407701),\r\n+LPF_TAPS(-0.019952098086170714),\r\n+LPF_TAPS(-0.013341186324730379),\r\n+LPF_TAPS(0.001551440842540053),\r\n+LPF_TAPS(0.018256772503679127),\r\n+LPF_TAPS(0.028227518365292050),\r\n+LPF_TAPS(0.024784200946553939),\r\n+LPF_TAPS(0.006795943777113442),\r\n+LPF_TAPS(-0.019657185861938053),\r\n+LPF_TAPS(-0.042666070096388911),\r\n+LPF_TAPS(-0.048683868505890286),\r\n+LPF_TAPS(-0.028025412280222081),\r\n+LPF_TAPS(0.020534526388022348),\r\n+LPF_TAPS(0.088073047119200415),\r\n+LPF_TAPS(0.157675115394035670),\r\n+LPF_TAPS(0.209836886946609902),\r\n+LPF_TAPS(0.229166551041813965),\r\n+LPF_TAPS(0.209836886946609930),\r\n+LPF_TAPS(0.157675115394035670),\r\n+LPF_TAPS(0.088073047119200415),\r\n+LPF_TAPS(0.020534526388022348),\r\n+LPF_TAPS(-0.028025412280222081),\r\n+LPF_TAPS(-0.048683868505890293),\r\n+LPF_TAPS(-0.042666070096388911),\r\n+LPF_TAPS(-0.019657185861938053),\r\n+LPF_TAPS(0.006795943777113443),\r\n+LPF_TAPS(0.024784200946553946),\r\n+LPF_TAPS(0.028227518365292050),\r\n+LPF_TAPS(0.018256772503679127),\r\n+LPF_TAPS(0.001551440842540053),\r\n+LPF_TAPS(-0.013341186324730381),\r\n+LPF_TAPS(-0.019952098086170714),\r\n+LPF_TAPS(-0.016420333624407701),\r\n+LPF_TAPS(-0.005700613585608974),\r\n+LPF_TAPS(0.006367554689719204),\r\n+LPF_TAPS(0.014039471720665702),\r\n+LPF_TAPS(0.014258989316922464),\r\n+LPF_TAPS(0.007750487581196341),\r\n+LPF_TAPS(-0.001724055500589014),\r\n+LPF_TAPS(-0.009418303287613601),\r\n+LPF_TAPS(-0.011898560218317223),\r\n+LPF_TAPS(-0.008508488631453785),\r\n+LPF_TAPS(-0.001406641214315407),\r\n+LPF_TAPS(0.005707632271462193),\r\n+LPF_TAPS(0.009469292790600803),\r\n+LPF_TAPS(0.008397388880842563),\r\n+LPF_TAPS(0.003424817617303759),\r\n+LPF_TAPS(-0.002751638823885237),\r\n+LPF_TAPS(-0.007095712754339889),\r\n+LPF_TAPS(-0.007695957214193918),\r\n+LPF_TAPS(-0.004577023938925433),\r\n+LPF_TAPS(0.000471391820742604),\r\n+LPF_TAPS(0.004887582240540398),\r\n+LPF_TAPS(0.006617006934658838),\r\n+LPF_TAPS(0.005048722557538837),\r\n+LPF_TAPS(0.001191775941151653),\r\n+LPF_TAPS(-0.002932772495491724),\r\n+LPF_TAPS(-0.005334161275829720),\r\n+LPF_TAPS(-0.004998959763464509),\r\n+LPF_TAPS(-0.002299054442402458),\r\n+LPF_TAPS(0.001292615642227111),\r\n+LPF_TAPS(0.003990141163815962),\r\n+LPF_TAPS(0.004572008955895946),\r\n+LPF_TAPS(0.002921903641535427),\r\n+LPF_TAPS(0.000000000000000021),\r\n+LPF_TAPS(-0.002698408098877721),\r\n+LPF_TAPS(-0.003899170603326770),\r\n+LPF_TAPS(-0.003142245599040471),\r\n+LPF_TAPS(-0.000939837302041592),\r\n+LPF_TAPS(0.001543084834901600),\r\n+LPF_TAPS(0.003096593192501320),\r\n+LPF_TAPS(0.003048749090619088),\r\n+LPF_TAPS(0.001546150733363754),\r\n+LPF_TAPS(-0.000579338030693501),\r\n+LPF_TAPS(-0.002262076797697580),\r\n+LPF_TAPS(-0.002731352650618141),\r\n+LPF_TAPS(-0.001857714543905297),\r\n+LPF_TAPS(-0.000164888079687475),\r\n+LPF_TAPS(0.001472448638347934),\r\n+LPF_TAPS(0.002275459232597816),\r\n+LPF_TAPS(0.001926735087455665),\r\n+LPF_TAPS(0.000685607318862552),\r\n+LPF_TAPS(-0.000782319104071646),\r\n+LPF_TAPS(-0.001756794170294546),\r\n+LPF_TAPS(-0.001812391534151866),\r\n+LPF_TAPS(-0.000998234344597222),\r\n+LPF_TAPS(0.000224511362529855),\r\n+LPF_TAPS(0.001237569662484545),\r\n+LPF_TAPS(0.001574705433974788),\r\n+LPF_TAPS(0.001132206574500079),\r\n+LPF_TAPS(0.000187905638196626),\r\n+LPF_TAPS(-0.000764290283324042),\r\n+LPF_TAPS(-0.001269318042621104),\r\n+LPF_TAPS(-0.001125354793155152),\r\n+LPF_TAPS(-0.000458299554997024),\r\n+LPF_TAPS(0.000367260061047211),\r\n+LPF_TAPS(0.000943577962191536),\r\n+LPF_TAPS(0.001018581734917156),\r\n+LPF_TAPS(0.000602337744180382),\r\n+LPF_TAPS(-0.000061624390633655),\r\n+LPF_TAPS(-0.000634138612347655),\r\n+LPF_TAPS(-0.000851316283811722),\r\n+LPF_TAPS(-0.000643549484484288),\r\n+LPF_TAPS(-0.000150386402110857),\r\n+LPF_TAPS(0.000366064286993324),\r\n+LPF_TAPS(0.000658065918351398),\r\n+LPF_TAPS(0.000609077894058259),\r\n+LPF_TAPS(0.000276441517410037),\r\n+LPF_TAPS(-0.000153270702730086),\r\n+LPF_TAPS(-0.000466220696521016),\r\n+LPF_TAPS(-0.000526021540293030),\r\n+LPF_TAPS(-0.000330777418181525),\r\n+LPF_TAPS(-0.000000000000000005),\r\n+LPF_TAPS(0.000295095855792692),\r\n+LPF_TAPS(0.000418635208448877),\r\n+LPF_TAPS(0.000330966493993224),\r\n+LPF_TAPS(0.000097038599796698),\r\n+LPF_TAPS(-0.000156059832555650),\r\n+LPF_TAPS(-0.000306513263908867),\r\n+LPF_TAPS(-0.000295118409098363),\r\n+LPF_TAPS(-0.000146241851067930),\r\n+LPF_TAPS(0.000053496004603635),\r\n+LPF_TAPS(0.000203740441664265),\r\n+LPF_TAPS(0.000239731180927390),\r\n+LPF_TAPS(0.000158738425916860),\r\n+LPF_TAPS(0.000013702800097689),\r\n+LPF_TAPS(-0.000118882157530363),\r\n+LPF_TAPS(-0.000178286254100791),\r\n+LPF_TAPS(-0.000146329682785648),\r\n+LPF_TAPS(-0.000050408904084663),\r\n+LPF_TAPS(0.000055611400702006),\r\n+LPF_TAPS(0.000120569818801959),\r\n+LPF_TAPS(0.000119910156306052),\r\n+LPF_TAPS(0.000063565979232706),\r\n+LPF_TAPS(-0.000013736274648311),\r\n+LPF_TAPS(-0.000072615683850022),\r\n+LPF_TAPS(-0.000088433378276437),\r\n+LPF_TAPS(-0.000060722607418047),\r\n+LPF_TAPS(-0.000009601521922410),\r\n+LPF_TAPS(0.000037111313024223),\r\n+LPF_TAPS(0.000058402235278429),\r\n+LPF_TAPS(0.000048910060055138),\r\n+LPF_TAPS(0.000018750083838216),\r\n+LPF_TAPS(-0.000014089712842714),\r\n+LPF_TAPS(-0.000033800086864146),\r\n+LPF_TAPS(-0.000033904623197724),\r\n+LPF_TAPS(-0.000018529842079338),\r\n+LPF_TAPS(0.000001741335735348),\r\n+LPF_TAPS(0.000016344170879499),\r\n+LPF_TAPS(0.000019852237874508),\r\n+LPF_TAPS(0.000013451394329611),\r\n+LPF_TAPS(0.000002786671528698),\r\n+LPF_TAPS(-0.000005935583389038),\r\n+LPF_TAPS(-0.000009191703997209),\r\n+LPF_TAPS(-0.000007189532013224),\r\n+LPF_TAPS(-0.000002692542847324),\r\n+LPF_TAPS(0.000001194819042577),\r\n+LPF_TAPS(0.000002794151684877),\r\n+LPF_TAPS(0.000002293299391840),\r\n+LPF_TAPS(0.000000967826707627),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000238149160989),\r\n+LPF_TAPS(-0.000000088867880174),\r\n+LPF_TAPS(0.000000000000000000),\r\n+};\r\ndiff --git a/core/sound/blip_lpf_192K_48K.h b/core/sound/blip_lpf_192K_48K.h\nnew file mode 100644\nindex 000000000..38ab936fc\n--- /dev/null\n+++ b/core/sound/blip_lpf_192K_48K.h\n@@ -0,0 +1,297 @@\n+static buf_t const blip_lpf_192K_48K[blip_lpf_192K_taps] = {\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000011699684035),\r\n+LPF_TAPS(-0.000000360416908350),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000001464716937627),\r\n+LPF_TAPS(0.000000301918738577),\r\n+LPF_TAPS(-0.000003295928230852),\r\n+LPF_TAPS(-0.000001194819620067),\r\n+LPF_TAPS(0.000005764676411107),\r\n+LPF_TAPS(0.000002978003106345),\r\n+LPF_TAPS(-0.000008705808898682),\r\n+LPF_TAPS(-0.000005935586257872),\r\n+LPF_TAPS(0.000011876723517204),\r\n+LPF_TAPS(0.000010321622883786),\r\n+LPF_TAPS(-0.000014957735575653),\r\n+LPF_TAPS(-0.000016344178779097),\r\n+LPF_TAPS(0.000017554863172917),\r\n+LPF_TAPS(0.000024148572024212),\r\n+LPF_TAPS(-0.000019205435573849),\r\n+LPF_TAPS(-0.000033800103200680),\r\n+LPF_TAPS(0.000019386927628363),\r\n+LPF_TAPS(0.000045266728576528),\r\n+LPF_TAPS(-0.000017529388978758),\r\n+LPF_TAPS(-0.000058402263505874),\r\n+LPF_TAPS(0.000013031766421880),\r\n+LPF_TAPS(0.000072930834880073),\r\n+LPF_TAPS(-0.000005282309369841),\r\n+LPF_TAPS(-0.000088433421018778),\r\n+LPF_TAPS(-0.000006316897832758),\r\n+LPF_TAPS(0.000104337415082632),\r\n+LPF_TAPS(0.000022321414313687),\r\n+LPF_TAPS(-0.000119910214262005),\r\n+LPF_TAPS(-0.000043212280878318),\r\n+LPF_TAPS(0.000134257862687919),\r\n+LPF_TAPS(0.000069360801474369),\r\n+LPF_TAPS(-0.000146329753510899),\r\n+LPF_TAPS(-0.000100991099262988),\r\n+LPF_TAPS(0.000154930318953823),\r\n+LPF_TAPS(0.000138141528895099),\r\n+LPF_TAPS(-0.000158738502639612),\r\n+LPF_TAPS(-0.000180626266732152),\r\n+LPF_TAPS(0.000156335614993112),\r\n+LPF_TAPS(0.000227998617493814),\r\n+LPF_TAPS(-0.000146241921750728),\r\n+LPF_TAPS(-0.000279517755671161),\r\n+LPF_TAPS(0.000126962012322580),\r\n+LPF_TAPS(0.000334120749962844),\r\n+LPF_TAPS(-0.000097038646698174),\r\n+LPF_TAPS(-0.000390401787033481),\r\n+LPF_TAPS(0.000055114397408641),\r\n+LPF_TAPS(0.000446600506885053),\r\n+LPF_TAPS(-0.000000000000000006),\r\n+LPF_TAPS(-0.000500601278283534),\r\n+LPF_TAPS(-0.000069252083035812),\r\n+LPF_TAPS(0.000549945074130452),\r\n+LPF_TAPS(0.000153270776810127),\r\n+LPF_TAPS(-0.000591855351920665),\r\n+LPF_TAPS(-0.000252288446198623),\r\n+LPF_TAPS(0.000623279005681946),\r\n+LPF_TAPS(0.000366064463922513),\r\n+LPF_TAPS(-0.000640943039114649),\r\n+LPF_TAPS(-0.000493813126218410),\r\n+LPF_TAPS(0.000641427124992022),\r\n+LPF_TAPS(0.000634138918844690),\r\n+LPF_TAPS(-0.000621251676932805),\r\n+LPF_TAPS(-0.000784982210639611),\r\n+LPF_TAPS(0.000576980483533690),\r\n+LPF_TAPS(0.000943578418249327),\r\n+LPF_TAPS(-0.000505336361627272),\r\n+LPF_TAPS(-0.001106433536073574),\r\n+LPF_TAPS(0.000403327697534788),\r\n+LPF_TAPS(0.001269318656118245),\r\n+LPF_TAPS(-0.000268383186665769),\r\n+LPF_TAPS(-0.001427285713983255),\r\n+LPF_TAPS(0.000098491577542187),\r\n+LPF_TAPS(0.001574706195074243),\r\n+LPF_TAPS(0.000107657198890842),\r\n+LPF_TAPS(-0.001705333929525307),\r\n+LPF_TAPS(-0.000350533456054162),\r\n+LPF_TAPS(0.001812392410131702),\r\n+LPF_TAPS(0.000629635873110615),\r\n+LPF_TAPS(-0.001888686304008138),\r\n+LPF_TAPS(-0.000943370501630691),\r\n+LPF_TAPS(0.001926736018700954),\r\n+LPF_TAPS(0.001288944738825755),\r\n+LPF_TAPS(-0.001918933353174580),\r\n+LPF_TAPS(-0.001662280064090690),\r\n+LPF_TAPS(0.001857715441791014),\r\n+LPF_TAPS(0.002057946865741891),\r\n+LPF_TAPS(-0.001735753414692443),\r\n+LPF_TAPS(-0.002469124022221547),\r\n+LPF_TAPS(0.001546151480661884),\r\n+LPF_TAPS(0.002887585040926098),\r\n+LPF_TAPS(-0.001282651517427551),\r\n+LPF_TAPS(-0.003303711492255804),\r\n+LPF_TAPS(0.000939837756291379),\r\n+LPF_TAPS(0.003706533197250494),\r\n+LPF_TAPS(-0.000513335796556813),\r\n+LPF_TAPS(-0.004083793117000289),\r\n+LPF_TAPS(0.000000000000000027),\r\n+LPF_TAPS(0.004422033118268171),\r\n+LPF_TAPS(0.000601916688958754),\r\n+LPF_TAPS(-0.004706694693093308),\r\n+LPF_TAPS(-0.001292616266984692),\r\n+LPF_TAPS(0.004922226186722231),\r\n+LPF_TAPS(0.002070637932581485),\r\n+LPF_TAPS(-0.005052184961159095),\r\n+LPF_TAPS(-0.002932773912983241),\r\n+LPF_TAPS(0.005079318894153638),\r\n+LPF_TAPS(0.003874022945641129),\r\n+LPF_TAPS(-0.004985606189918983),\r\n+LPF_TAPS(-0.004887584602846446),\r\n+LPF_TAPS(0.004752224827174563),\r\n+LPF_TAPS(0.005964896612310225),\r\n+LPF_TAPS(-0.004359411682422675),\r\n+LPF_TAPS(-0.007095716183897575),\r\n+LPF_TAPS(0.003786154007080481),\r\n+LPF_TAPS(0.008268245136622701),\r\n+LPF_TAPS(-0.003009628201892344),\r\n+LPF_TAPS(-0.009469297367376523),\r\n+LPF_TAPS(0.002004254889476187),\r\n+LPF_TAPS(0.010684505952884770),\r\n+LPF_TAPS(-0.000740160397126897),\r\n+LPF_TAPS(-0.011898565969226251),\r\n+LPF_TAPS(-0.000819305919485099),\r\n+LPF_TAPS(0.013095507988590082),\r\n+LPF_TAPS(0.002721610624445016),\r\n+LPF_TAPS(-0.014258996208693293),\r\n+LPF_TAPS(-0.005031753397366375),\r\n+LPF_TAPS(0.015372644321100564),\r\n+LPF_TAPS(0.007843835020286348),\r\n+LPF_TAPS(-0.016420341560817068),\r\n+LPF_TAPS(-0.011301961155043415),\r\n+LPF_TAPS(0.017386580925610604),\r\n+LPF_TAPS(0.015640482853936873),\r\n+LPF_TAPS(-0.018256781327691107),\r\n+LPF_TAPS(-0.021268118905985057),\r\n+LPF_TAPS(0.019017595453519179),\r\n+LPF_TAPS(0.028964140354554850),\r\n+LPF_TAPS(-0.019657195362809188),\r\n+LPF_TAPS(-0.040410641251038312),\r\n+LPF_TAPS(0.020165528350490871),\r\n+LPF_TAPS(0.060001805818588987),\r\n+LPF_TAPS(-0.020534536312936849),\r\n+LPF_TAPS(-0.103889292749747980),\r\n+LPF_TAPS(0.020758332782087250),\r\n+LPF_TAPS(0.317568878837019564),\r\n+LPF_TAPS(0.479166656500229882),\r\n+LPF_TAPS(0.317568878837019619),\r\n+LPF_TAPS(0.020758332782087250),\r\n+LPF_TAPS(-0.103889292749747980),\r\n+LPF_TAPS(-0.020534536312936849),\r\n+LPF_TAPS(0.060001805818588987),\r\n+LPF_TAPS(0.020165528350490871),\r\n+LPF_TAPS(-0.040410641251038312),\r\n+LPF_TAPS(-0.019657195362809188),\r\n+LPF_TAPS(0.028964140354554854),\r\n+LPF_TAPS(0.019017595453519186),\r\n+LPF_TAPS(-0.021268118905985057),\r\n+LPF_TAPS(-0.018256781327691107),\r\n+LPF_TAPS(0.015640482853936873),\r\n+LPF_TAPS(0.017386580925610604),\r\n+LPF_TAPS(-0.011301961155043415),\r\n+LPF_TAPS(-0.016420341560817068),\r\n+LPF_TAPS(0.007843835020286349),\r\n+LPF_TAPS(0.015372644321100568),\r\n+LPF_TAPS(-0.005031753397366375),\r\n+LPF_TAPS(-0.014258996208693293),\r\n+LPF_TAPS(0.002721610624445017),\r\n+LPF_TAPS(0.013095507988590084),\r\n+LPF_TAPS(-0.000819305919485099),\r\n+LPF_TAPS(-0.011898565969226251),\r\n+LPF_TAPS(-0.000740160397126897),\r\n+LPF_TAPS(0.010684505952884775),\r\n+LPF_TAPS(0.002004254889476188),\r\n+LPF_TAPS(-0.009469297367376528),\r\n+LPF_TAPS(-0.003009628201892346),\r\n+LPF_TAPS(0.008268245136622703),\r\n+LPF_TAPS(0.003786154007080481),\r\n+LPF_TAPS(-0.007095716183897575),\r\n+LPF_TAPS(-0.004359411682422675),\r\n+LPF_TAPS(0.005964896612310226),\r\n+LPF_TAPS(0.004752224827174565),\r\n+LPF_TAPS(-0.004887584602846446),\r\n+LPF_TAPS(-0.004985606189918983),\r\n+LPF_TAPS(0.003874022945641131),\r\n+LPF_TAPS(0.005079318894153640),\r\n+LPF_TAPS(-0.002932773912983241),\r\n+LPF_TAPS(-0.005052184961159091),\r\n+LPF_TAPS(0.002070637932581485),\r\n+LPF_TAPS(0.004922226186722231),\r\n+LPF_TAPS(-0.001292616266984692),\r\n+LPF_TAPS(-0.004706694693093311),\r\n+LPF_TAPS(0.000601916688958754),\r\n+LPF_TAPS(0.004422033118268169),\r\n+LPF_TAPS(0.000000000000000027),\r\n+LPF_TAPS(-0.004083793117000291),\r\n+LPF_TAPS(-0.000513335796556813),\r\n+LPF_TAPS(0.003706533197250494),\r\n+LPF_TAPS(0.000939837756291379),\r\n+LPF_TAPS(-0.003303711492255802),\r\n+LPF_TAPS(-0.001282651517427552),\r\n+LPF_TAPS(0.002887585040926099),\r\n+LPF_TAPS(0.001546151480661884),\r\n+LPF_TAPS(-0.002469124022221548),\r\n+LPF_TAPS(-0.001735753414692443),\r\n+LPF_TAPS(0.002057946865741892),\r\n+LPF_TAPS(0.001857715441791016),\r\n+LPF_TAPS(-0.001662280064090690),\r\n+LPF_TAPS(-0.001918933353174579),\r\n+LPF_TAPS(0.001288944738825756),\r\n+LPF_TAPS(0.001926736018700954),\r\n+LPF_TAPS(-0.000943370501630691),\r\n+LPF_TAPS(-0.001888686304008139),\r\n+LPF_TAPS(0.000629635873110615),\r\n+LPF_TAPS(0.001812392410131702),\r\n+LPF_TAPS(-0.000350533456054163),\r\n+LPF_TAPS(-0.001705333929525308),\r\n+LPF_TAPS(0.000107657198890842),\r\n+LPF_TAPS(0.001574706195074243),\r\n+LPF_TAPS(0.000098491577542187),\r\n+LPF_TAPS(-0.001427285713983254),\r\n+LPF_TAPS(-0.000268383186665769),\r\n+LPF_TAPS(0.001269318656118245),\r\n+LPF_TAPS(0.000403327697534788),\r\n+LPF_TAPS(-0.001106433536073575),\r\n+LPF_TAPS(-0.000505336361627273),\r\n+LPF_TAPS(0.000943578418249328),\r\n+LPF_TAPS(0.000576980483533690),\r\n+LPF_TAPS(-0.000784982210639612),\r\n+LPF_TAPS(-0.000621251676932805),\r\n+LPF_TAPS(0.000634138918844690),\r\n+LPF_TAPS(0.000641427124992022),\r\n+LPF_TAPS(-0.000493813126218410),\r\n+LPF_TAPS(-0.000640943039114650),\r\n+LPF_TAPS(0.000366064463922513),\r\n+LPF_TAPS(0.000623279005681946),\r\n+LPF_TAPS(-0.000252288446198623),\r\n+LPF_TAPS(-0.000591855351920666),\r\n+LPF_TAPS(0.000153270776810127),\r\n+LPF_TAPS(0.000549945074130454),\r\n+LPF_TAPS(-0.000069252083035812),\r\n+LPF_TAPS(-0.000500601278283533),\r\n+LPF_TAPS(-0.000000000000000006),\r\n+LPF_TAPS(0.000446600506885053),\r\n+LPF_TAPS(0.000055114397408641),\r\n+LPF_TAPS(-0.000390401787033482),\r\n+LPF_TAPS(-0.000097038646698174),\r\n+LPF_TAPS(0.000334120749962844),\r\n+LPF_TAPS(0.000126962012322581),\r\n+LPF_TAPS(-0.000279517755671162),\r\n+LPF_TAPS(-0.000146241921750728),\r\n+LPF_TAPS(0.000227998617493814),\r\n+LPF_TAPS(0.000156335614993112),\r\n+LPF_TAPS(-0.000180626266732152),\r\n+LPF_TAPS(-0.000158738502639613),\r\n+LPF_TAPS(0.000138141528895099),\r\n+LPF_TAPS(0.000154930318953823),\r\n+LPF_TAPS(-0.000100991099262988),\r\n+LPF_TAPS(-0.000146329753510899),\r\n+LPF_TAPS(0.000069360801474369),\r\n+LPF_TAPS(0.000134257862687919),\r\n+LPF_TAPS(-0.000043212280878318),\r\n+LPF_TAPS(-0.000119910214262005),\r\n+LPF_TAPS(0.000022321414313687),\r\n+LPF_TAPS(0.000104337415082632),\r\n+LPF_TAPS(-0.000006316897832758),\r\n+LPF_TAPS(-0.000088433421018778),\r\n+LPF_TAPS(-0.000005282309369841),\r\n+LPF_TAPS(0.000072930834880073),\r\n+LPF_TAPS(0.000013031766421880),\r\n+LPF_TAPS(-0.000058402263505874),\r\n+LPF_TAPS(-0.000017529388978758),\r\n+LPF_TAPS(0.000045266728576528),\r\n+LPF_TAPS(0.000019386927628363),\r\n+LPF_TAPS(-0.000033800103200680),\r\n+LPF_TAPS(-0.000019205435573849),\r\n+LPF_TAPS(0.000024148572024212),\r\n+LPF_TAPS(0.000017554863172917),\r\n+LPF_TAPS(-0.000016344178779097),\r\n+LPF_TAPS(-0.000014957735575653),\r\n+LPF_TAPS(0.000010321622883786),\r\n+LPF_TAPS(0.000011876723517204),\r\n+LPF_TAPS(-0.000005935586257872),\r\n+LPF_TAPS(-0.000008705808898682),\r\n+LPF_TAPS(0.000002978003106345),\r\n+LPF_TAPS(0.000005764676411107),\r\n+LPF_TAPS(-0.000001194819620067),\r\n+LPF_TAPS(-0.000003295928230852),\r\n+LPF_TAPS(0.000000301918738577),\r\n+LPF_TAPS(0.000001464716937627),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000360416908350),\r\n+LPF_TAPS(-0.000000011699684035),\r\n+LPF_TAPS(0.000000000000000000),\r\n+};\r\ndiff --git a/core/sound/blip_lpf_192K_96K.h b/core/sound/blip_lpf_192K_96K.h\nnew file mode 100644\nindex 000000000..4effb8d2e\n--- /dev/null\n+++ b/core/sound/blip_lpf_192K_96K.h\n@@ -0,0 +1,297 @@\n+static buf_t const blip_lpf_192K_96K[blip_lpf_192K_taps] = {\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000011699684267),\r\n+LPF_TAPS(-0.000000023622972699),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000096002622039),\r\n+LPF_TAPS(-0.000000301918744560),\r\n+LPF_TAPS(0.000000655600900104),\r\n+LPF_TAPS(-0.000001194819643744),\r\n+LPF_TAPS(0.000001956843997497),\r\n+LPF_TAPS(-0.000002978003165359),\r\n+LPF_TAPS(0.000004293229923365),\r\n+LPF_TAPS(-0.000005935586375495),\r\n+LPF_TAPS(0.000007935773099930),\r\n+LPF_TAPS(-0.000010321623088325),\r\n+LPF_TAPS(0.000013117582299463),\r\n+LPF_TAPS(-0.000016344179102984),\r\n+LPF_TAPS(0.000020017485373424),\r\n+LPF_TAPS(-0.000024148572502755),\r\n+LPF_TAPS(0.000028742966123913),\r\n+LPF_TAPS(-0.000033800103870485),\r\n+LPF_TAPS(0.000039312801030250),\r\n+LPF_TAPS(-0.000045266729473564),\r\n+LPF_TAPS(0.000051639915742486),\r\n+LPF_TAPS(-0.000058402264663211),\r\n+LPF_TAPS(0.000065515115283167),\r\n+LPF_TAPS(-0.000072930836325319),\r\n+LPF_TAPS(0.000080592468686167),\r\n+LPF_TAPS(-0.000088433422771234),\r\n+LPF_TAPS(0.000096377238653759),\r\n+LPF_TAPS(-0.000104337417150253),\r\n+LPF_TAPS(0.000112217329923088),\r\n+LPF_TAPS(-0.000119910216638228),\r\n+LPF_TAPS(0.000127299277019925),\r\n+LPF_TAPS(-0.000134257865348465),\r\n+LPF_TAPS(0.000140649794538436),\r\n+LPF_TAPS(-0.000146329756410672),\r\n+LPF_TAPS(0.000151143864130081),\r\n+LPF_TAPS(-0.000154930322024030),\r\n+LPF_TAPS(0.000157520227123526),\r\n+LPF_TAPS(-0.000158738505785284),\r\n+LPF_TAPS(0.000158404987661415),\r\n+LPF_TAPS(-0.000156335618091171),\r\n+LPF_TAPS(0.000152343808703457),\r\n+LPF_TAPS(-0.000146241924648769),\r\n+LPF_TAPS(0.000137842905435367),\r\n+LPF_TAPS(-0.000126962014838557),\r\n+LPF_TAPS(0.000113418713797108),\r\n+LPF_TAPS(-0.000097038648621177),\r\n+LPF_TAPS(0.000077655745226952),\r\n+LPF_TAPS(-0.000055114398500844),\r\n+LPF_TAPS(0.000029271744296376),\r\n+LPF_TAPS(0.000000000000000005),\r\n+LPF_TAPS(-0.000032811141918621),\r\n+LPF_TAPS(0.000069252084408131),\r\n+LPF_TAPS(-0.000109390878791837),\r\n+LPF_TAPS(0.000153270779847421),\r\n+LPF_TAPS(-0.000200907823821846),\r\n+LPF_TAPS(0.000252288451198140),\r\n+LPF_TAPS(-0.000307367196884387),\r\n+LPF_TAPS(0.000366064471176646),\r\n+LPF_TAPS(-0.000428264455346255),\r\n+LPF_TAPS(0.000493813136004140),\r\n+LPF_TAPS(-0.000562516502490292),\r\n+LPF_TAPS(0.000634138931411217),\r\n+LPF_TAPS(-0.000708401782100121),\r\n+LPF_TAPS(0.000784982226195324),\r\n+LPF_TAPS(-0.000863512333713981),\r\n+LPF_TAPS(0.000943578436947906),\r\n+LPF_TAPS(-0.001024720792217768),\r\n+LPF_TAPS(0.001106433557999406),\r\n+LPF_TAPS(-0.001188165106185149),\r\n+LPF_TAPS(0.001269318681271905),\r\n+LPF_TAPS(-0.001349253420085044),\r\n+LPF_TAPS(0.001427285742267313),\r\n+LPF_TAPS(-0.001502691119198399),\r\n+LPF_TAPS(0.001574706226279688),\r\n+LPF_TAPS(-0.001642531480640847),\r\n+LPF_TAPS(0.001705333963319374),\r\n+LPF_TAPS(-0.001762250721854476),\r\n+LPF_TAPS(0.001812392446047311),\r\n+LPF_TAPS(-0.001854847506395012),\r\n+LPF_TAPS(0.001888686341435625),\r\n+LPF_TAPS(-0.001912966176969622),\r\n+LPF_TAPS(0.001926736056882465),\r\n+LPF_TAPS(-0.001929042162111216),\r\n+LPF_TAPS(0.001918933391201516),\r\n+LPF_TAPS(-0.001895467172926061),\r\n+LPF_TAPS(0.001857715478604782),\r\n+LPF_TAPS(-0.001804770999109921),\r\n+LPF_TAPS(0.001735753449089341),\r\n+LPF_TAPS(-0.001649815958715717),\r\n+LPF_TAPS(0.001546151511301517),\r\n+LPF_TAPS(-0.001423999383428101),\r\n+LPF_TAPS(0.001282651542845464),\r\n+LPF_TAPS(-0.001121458958325758),\r\n+LPF_TAPS(0.000939837774915927),\r\n+LPF_TAPS(-0.000737275307646808),\r\n+LPF_TAPS(0.000513335806729532),\r\n+LPF_TAPS(-0.000267665947613575),\r\n+LPF_TAPS(-0.000000000000000021),\r\n+LPF_TAPS(0.000289835368998426),\r\n+LPF_TAPS(-0.000601916700886649),\r\n+LPF_TAPS(0.000936219802489234),\r\n+LPF_TAPS(-0.001292616292599868),\r\n+LPF_TAPS(0.001670870675282795),\r\n+LPF_TAPS(-0.002070637973614653),\r\n+LPF_TAPS(0.002491461954432159),\r\n+LPF_TAPS(-0.002932773971101029),\r\n+LPF_TAPS(0.003393892447508969),\r\n+LPF_TAPS(-0.003874023022411256),\r\n+LPF_TAPS(0.004372259368953546),\r\n+LPF_TAPS(-0.004887584699702088),\r\n+LPF_TAPS(0.005418873962854631),\r\n+LPF_TAPS(-0.005964896730514600),\r\n+LPF_TAPS(0.006524320775035389),\r\n+LPF_TAPS(-0.007095716324511088),\r\n+LPF_TAPS(0.007677560983540607),\r\n+LPF_TAPS(-0.008268245300471832),\r\n+LPF_TAPS(0.008866078957473050),\r\n+LPF_TAPS(-0.009469297555026516),\r\n+LPF_TAPS(0.010076069957823942),\r\n+LPF_TAPS(-0.010684506164616164),\r\n+LPF_TAPS(0.011292665660355927),\r\n+LPF_TAPS(-0.011898566205016293),\r\n+LPF_TAPS(0.012500193009798910),\r\n+LPF_TAPS(-0.013095508248099581),\r\n+LPF_TAPS(0.013682460845602764),\r\n+LPF_TAPS(-0.014258996491259241),\r\n+LPF_TAPS(0.014823067808685773),\r\n+LPF_TAPS(-0.015372644625735333),\r\n+LPF_TAPS(0.015905724278637460),\r\n+LPF_TAPS(-0.016420341886213691),\r\n+LPF_TAPS(0.016914580529250271),\r\n+LPF_TAPS(-0.017386581270154931),\r\n+LPF_TAPS(0.017834552948553309),\r\n+LPF_TAPS(-0.018256781689479799),\r\n+LPF_TAPS(0.018651640062293810),\r\n+LPF_TAPS(-0.019017595830384797),\r\n+LPF_TAPS(0.019353220234126459),\r\n+LPF_TAPS(-0.019657195752349511),\r\n+LPF_TAPS(0.019928323290854689),\r\n+LPF_TAPS(-0.020165528750104574),\r\n+LPF_TAPS(0.020367868928236835),\r\n+LPF_TAPS(-0.020534536719863154),\r\n+LPF_TAPS(0.020664865575759649),\r\n+LPF_TAPS(-0.020758333193448456),\r\n+LPF_TAPS(0.020814564413806608),\r\n+LPF_TAPS(0.979166665295603811),\r\n+LPF_TAPS(0.020814564413806608),\r\n+LPF_TAPS(-0.020758333193448456),\r\n+LPF_TAPS(0.020664865575759649),\r\n+LPF_TAPS(-0.020534536719863154),\r\n+LPF_TAPS(0.020367868928236835),\r\n+LPF_TAPS(-0.020165528750104574),\r\n+LPF_TAPS(0.019928323290854689),\r\n+LPF_TAPS(-0.019657195752349511),\r\n+LPF_TAPS(0.019353220234126459),\r\n+LPF_TAPS(-0.019017595830384801),\r\n+LPF_TAPS(0.018651640062293810),\r\n+LPF_TAPS(-0.018256781689479803),\r\n+LPF_TAPS(0.017834552948553309),\r\n+LPF_TAPS(-0.017386581270154935),\r\n+LPF_TAPS(0.016914580529250271),\r\n+LPF_TAPS(-0.016420341886213691),\r\n+LPF_TAPS(0.015905724278637463),\r\n+LPF_TAPS(-0.015372644625735336),\r\n+LPF_TAPS(0.014823067808685773),\r\n+LPF_TAPS(-0.014258996491259241),\r\n+LPF_TAPS(0.013682460845602765),\r\n+LPF_TAPS(-0.013095508248099583),\r\n+LPF_TAPS(0.012500193009798911),\r\n+LPF_TAPS(-0.011898566205016293),\r\n+LPF_TAPS(0.011292665660355928),\r\n+LPF_TAPS(-0.010684506164616170),\r\n+LPF_TAPS(0.010076069957823945),\r\n+LPF_TAPS(-0.009469297555026519),\r\n+LPF_TAPS(0.008866078957473053),\r\n+LPF_TAPS(-0.008268245300471832),\r\n+LPF_TAPS(0.007677560983540607),\r\n+LPF_TAPS(-0.007095716324511088),\r\n+LPF_TAPS(0.006524320775035389),\r\n+LPF_TAPS(-0.005964896730514602),\r\n+LPF_TAPS(0.005418873962854633),\r\n+LPF_TAPS(-0.004887584699702088),\r\n+LPF_TAPS(0.004372259368953546),\r\n+LPF_TAPS(-0.003874023022411258),\r\n+LPF_TAPS(0.003393892447508970),\r\n+LPF_TAPS(-0.002932773971101028),\r\n+LPF_TAPS(0.002491461954432157),\r\n+LPF_TAPS(-0.002070637973614654),\r\n+LPF_TAPS(0.001670870675282794),\r\n+LPF_TAPS(-0.001292616292599868),\r\n+LPF_TAPS(0.000936219802489234),\r\n+LPF_TAPS(-0.000601916700886649),\r\n+LPF_TAPS(0.000289835368998426),\r\n+LPF_TAPS(-0.000000000000000021),\r\n+LPF_TAPS(-0.000267665947613575),\r\n+LPF_TAPS(0.000513335806729533),\r\n+LPF_TAPS(-0.000737275307646808),\r\n+LPF_TAPS(0.000939837774915926),\r\n+LPF_TAPS(-0.001121458958325758),\r\n+LPF_TAPS(0.001282651542845464),\r\n+LPF_TAPS(-0.001423999383428102),\r\n+LPF_TAPS(0.001546151511301517),\r\n+LPF_TAPS(-0.001649815958715718),\r\n+LPF_TAPS(0.001735753449089341),\r\n+LPF_TAPS(-0.001804770999109922),\r\n+LPF_TAPS(0.001857715478604784),\r\n+LPF_TAPS(-0.001895467172926061),\r\n+LPF_TAPS(0.001918933391201516),\r\n+LPF_TAPS(-0.001929042162111217),\r\n+LPF_TAPS(0.001926736056882465),\r\n+LPF_TAPS(-0.001912966176969622),\r\n+LPF_TAPS(0.001888686341435626),\r\n+LPF_TAPS(-0.001854847506395012),\r\n+LPF_TAPS(0.001812392446047311),\r\n+LPF_TAPS(-0.001762250721854477),\r\n+LPF_TAPS(0.001705333963319375),\r\n+LPF_TAPS(-0.001642531480640848),\r\n+LPF_TAPS(0.001574706226279688),\r\n+LPF_TAPS(-0.001502691119198398),\r\n+LPF_TAPS(0.001427285742267312),\r\n+LPF_TAPS(-0.001349253420085045),\r\n+LPF_TAPS(0.001269318681271905),\r\n+LPF_TAPS(-0.001188165106185149),\r\n+LPF_TAPS(0.001106433557999407),\r\n+LPF_TAPS(-0.001024720792217768),\r\n+LPF_TAPS(0.000943578436947906),\r\n+LPF_TAPS(-0.000863512333713982),\r\n+LPF_TAPS(0.000784982226195325),\r\n+LPF_TAPS(-0.000708401782100121),\r\n+LPF_TAPS(0.000634138931411218),\r\n+LPF_TAPS(-0.000562516502490292),\r\n+LPF_TAPS(0.000493813136004140),\r\n+LPF_TAPS(-0.000428264455346255),\r\n+LPF_TAPS(0.000366064471176646),\r\n+LPF_TAPS(-0.000307367196884387),\r\n+LPF_TAPS(0.000252288451198141),\r\n+LPF_TAPS(-0.000200907823821847),\r\n+LPF_TAPS(0.000153270779847421),\r\n+LPF_TAPS(-0.000109390878791837),\r\n+LPF_TAPS(0.000069252084408131),\r\n+LPF_TAPS(-0.000032811141918621),\r\n+LPF_TAPS(0.000000000000000005),\r\n+LPF_TAPS(0.000029271744296376),\r\n+LPF_TAPS(-0.000055114398500844),\r\n+LPF_TAPS(0.000077655745226952),\r\n+LPF_TAPS(-0.000097038648621177),\r\n+LPF_TAPS(0.000113418713797108),\r\n+LPF_TAPS(-0.000126962014838558),\r\n+LPF_TAPS(0.000137842905435368),\r\n+LPF_TAPS(-0.000146241924648769),\r\n+LPF_TAPS(0.000152343808703457),\r\n+LPF_TAPS(-0.000156335618091171),\r\n+LPF_TAPS(0.000158404987661415),\r\n+LPF_TAPS(-0.000158738505785285),\r\n+LPF_TAPS(0.000157520227123526),\r\n+LPF_TAPS(-0.000154930322024030),\r\n+LPF_TAPS(0.000151143864130082),\r\n+LPF_TAPS(-0.000146329756410672),\r\n+LPF_TAPS(0.000140649794538436),\r\n+LPF_TAPS(-0.000134257865348465),\r\n+LPF_TAPS(0.000127299277019925),\r\n+LPF_TAPS(-0.000119910216638228),\r\n+LPF_TAPS(0.000112217329923088),\r\n+LPF_TAPS(-0.000104337417150253),\r\n+LPF_TAPS(0.000096377238653759),\r\n+LPF_TAPS(-0.000088433422771235),\r\n+LPF_TAPS(0.000080592468686167),\r\n+LPF_TAPS(-0.000072930836325320),\r\n+LPF_TAPS(0.000065515115283168),\r\n+LPF_TAPS(-0.000058402264663211),\r\n+LPF_TAPS(0.000051639915742486),\r\n+LPF_TAPS(-0.000045266729473564),\r\n+LPF_TAPS(0.000039312801030250),\r\n+LPF_TAPS(-0.000033800103870485),\r\n+LPF_TAPS(0.000028742966123913),\r\n+LPF_TAPS(-0.000024148572502755),\r\n+LPF_TAPS(0.000020017485373424),\r\n+LPF_TAPS(-0.000016344179102984),\r\n+LPF_TAPS(0.000013117582299463),\r\n+LPF_TAPS(-0.000010321623088325),\r\n+LPF_TAPS(0.000007935773099930),\r\n+LPF_TAPS(-0.000005935586375495),\r\n+LPF_TAPS(0.000004293229923365),\r\n+LPF_TAPS(-0.000002978003165359),\r\n+LPF_TAPS(0.000001956843997497),\r\n+LPF_TAPS(-0.000001194819643744),\r\n+LPF_TAPS(0.000000655600900104),\r\n+LPF_TAPS(-0.000000301918744560),\r\n+LPF_TAPS(0.000000096002622039),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000023622972699),\r\n+LPF_TAPS(0.000000011699684267),\r\n+LPF_TAPS(0.000000000000000000),\r\n+};\r\ndiff --git a/core/sound/blip_lpf_384K.h b/core/sound/blip_lpf_384K.h\nnew file mode 100644\nindex 000000000..016afa3bc\n--- /dev/null\n+++ b/core/sound/blip_lpf_384K.h\n@@ -0,0 +1,8 @@\n+/* 384K sampling, 2K cutoff, 3K transition */\r\n+enum { blip_lpf_384K_taps = 589 };\r\n+\r\n+\r\n+#include \"blip_lpf_384K_24K.h\"\r\n+#include \"blip_lpf_384K_48K.h\"\r\n+#include \"blip_lpf_384K_96K.h\"\r\n+#include \"blip_lpf_384K_192K.h\"\r\ndiff --git a/core/sound/blip_lpf_384K_192K.h b/core/sound/blip_lpf_384K_192K.h\nnew file mode 100644\nindex 000000000..740906680\n--- /dev/null\n+++ b/core/sound/blip_lpf_384K_192K.h\n@@ -0,0 +1,591 @@\n+static buf_t const blip_lpf_384K_192K[blip_lpf_384K_taps] = {\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000001818683069),\r\n+LPF_TAPS(0.000000005849842142),\r\n+LPF_TAPS(-0.000000009919970318),\r\n+LPF_TAPS(0.000000011811486367),\r\n+LPF_TAPS(-0.000000009268046592),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000018310012110),\r\n+LPF_TAPS(-0.000000048001311091),\r\n+LPF_TAPS(0.000000091429289498),\r\n+LPF_TAPS(-0.000000150959372505),\r\n+LPF_TAPS(0.000000228960831633),\r\n+LPF_TAPS(-0.000000327800450540),\r\n+LPF_TAPS(0.000000449836042893),\r\n+LPF_TAPS(-0.000000597409822761),\r\n+LPF_TAPS(0.000000772841628323),\r\n+LPF_TAPS(-0.000000978422000204),\r\n+LPF_TAPS(0.000001216405116219),\r\n+LPF_TAPS(-0.000001489001584895),\r\n+LPF_TAPS(0.000001798371100741),\r\n+LPF_TAPS(-0.000002146614964877),\r\n+LPF_TAPS(0.000002535768475343),\r\n+LPF_TAPS(-0.000002967793192163),\r\n+LPF_TAPS(0.000003444569082966),\r\n+LPF_TAPS(-0.000003967886555867),\r\n+LPF_TAPS(0.000004539438387109),\r\n+LPF_TAPS(-0.000005160811551841),\r\n+LPF_TAPS(0.000005833478967426),\r\n+LPF_TAPS(-0.000006558791159490),\r\n+LPF_TAPS(0.000007337967862007),\r\n+LPF_TAPS(-0.000008172089563650),\r\n+LPF_TAPS(0.000009062089013671),\r\n+LPF_TAPS(-0.000010008742701603),\r\n+LPF_TAPS(0.000011012662326107),\r\n+LPF_TAPS(-0.000012074286269341),\r\n+LPF_TAPS(0.000013193871094264),\r\n+LPF_TAPS(-0.000014371483083336),\r\n+LPF_TAPS(0.000015606989838136),\r\n+LPF_TAPS(-0.000016900051960385),\r\n+LPF_TAPS(0.000018250114835954),\r\n+LPF_TAPS(-0.000019656400544368),\r\n+LPF_TAPS(0.000021117899917293),\r\n+LPF_TAPS(-0.000022633364770453),\r\n+LPF_TAPS(0.000024201300334306),\r\n+LPF_TAPS(-0.000025819957909655),\r\n+LPF_TAPS(0.000027487327775239),\r\n+LPF_TAPS(-0.000029201132375049),\r\n+LPF_TAPS(0.000030958819813886),\r\n+LPF_TAPS(-0.000032757557690317),\r\n+LPF_TAPS(0.000034594227296746),\r\n+LPF_TAPS(-0.000036465418216909),\r\n+LPF_TAPS(0.000038367423351500),\r\n+LPF_TAPS(-0.000040296234403032),\r\n+LPF_TAPS(0.000042247537851347),\r\n+LPF_TAPS(-0.000044216711451398),\r\n+LPF_TAPS(0.000046198821285030),\r\n+LPF_TAPS(-0.000048188619398569),\r\n+LPF_TAPS(0.000050180542057917),\r\n+LPF_TAPS(-0.000052168708652737),\r\n+LPF_TAPS(0.000054146921281024),\r\n+LPF_TAPS(-0.000056108665045016),\r\n+LPF_TAPS(0.000058047109088909),\r\n+LPF_TAPS(-0.000059955108408308),\r\n+LPF_TAPS(0.000061825206460594),\r\n+LPF_TAPS(-0.000063649638604653),\r\n+LPF_TAPS(0.000065420336397474),\r\n+LPF_TAPS(-0.000067128932774100),\r\n+LPF_TAPS(0.000068766768136256),\r\n+LPF_TAPS(-0.000070324897373838),\r\n+LPF_TAPS(0.000071794097841849),\r\n+LPF_TAPS(-0.000073164878314178),\r\n+LPF_TAPS(0.000074427488933831),\r\n+LPF_TAPS(-0.000075571932177465),\r\n+LPF_TAPS(0.000076587974850560),\r\n+LPF_TAPS(-0.000077465161127258),\r\n+LPF_TAPS(0.000078192826647125),\r\n+LPF_TAPS(-0.000078760113678928),\r\n+LPF_TAPS(0.000079155987359146),\r\n+LPF_TAPS(-0.000079369253010716),\r\n+LPF_TAPS(0.000079388574545169),\r\n+LPF_TAPS(-0.000079202493948537),\r\n+LPF_TAPS(0.000078799451849036),\r\n+LPF_TAPS(-0.000078167809161869),\r\n+LPF_TAPS(0.000077295869803477),\r\n+LPF_TAPS(-0.000076171904465048),\r\n+LPF_TAPS(0.000074784175431958),\r\n+LPF_TAPS(-0.000073120962433157),\r\n+LPF_TAPS(0.000071170589501115),\r\n+LPF_TAPS(-0.000068921452820213),\r\n+LPF_TAPS(0.000066362049538439),\r\n+LPF_TAPS(-0.000063481007513722),\r\n+LPF_TAPS(0.000060267115963468),\r\n+LPF_TAPS(-0.000056709356982912),\r\n+LPF_TAPS(0.000052796937893741),\r\n+LPF_TAPS(-0.000048519324382749),\r\n+LPF_TAPS(0.000043866274386062),\r\n+LPF_TAPS(-0.000038827872671237),\r\n+LPF_TAPS(0.000033394566067721),\r\n+LPF_TAPS(-0.000027557199291414),\r\n+LPF_TAPS(0.000021307051307166),\r\n+LPF_TAPS(-0.000014635872169941),\r\n+LPF_TAPS(0.000007535920281846),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000007978500472509),\r\n+LPF_TAPS(0.000016405570983717),\r\n+LPF_TAPS(-0.000025286541190957),\r\n+LPF_TAPS(0.000034626042255596),\r\n+LPF_TAPS(-0.000044427968552949),\r\n+LPF_TAPS(0.000054695439477278),\r\n+LPF_TAPS(-0.000065430761424673),\r\n+LPF_TAPS(0.000076635390037745),\r\n+LPF_TAPS(-0.000088309892798977),\r\n+LPF_TAPS(0.000100453912060380),\r\n+LPF_TAPS(-0.000113066128598582),\r\n+LPF_TAPS(0.000126144225786715),\r\n+LPF_TAPS(-0.000139684854474777),\r\n+LPF_TAPS(0.000153683598670829),\r\n+LPF_TAPS(-0.000168134942118076),\r\n+LPF_TAPS(0.000183032235860659),\r\n+LPF_TAPS(-0.000198367666893487),\r\n+LPF_TAPS(0.000214132227991698),\r\n+LPF_TAPS(-0.000230315688813067),\r\n+LPF_TAPS(0.000246906568369384),\r\n+LPF_TAPS(-0.000263892108960412),\r\n+LPF_TAPS(0.000281258251663605),\r\n+LPF_TAPS(-0.000298989613472842),\r\n+LPF_TAPS(0.000317069466177310),\r\n+LPF_TAPS(-0.000335479717070287),\r\n+LPF_TAPS(0.000354200891577032),\r\n+LPF_TAPS(-0.000373212117887880),\r\n+LPF_TAPS(0.000392491113681582),\r\n+LPF_TAPS(-0.000412014175020648),\r\n+LPF_TAPS(0.000431756167499303),\r\n+LPF_TAPS(-0.000451690519720436),\r\n+LPF_TAPS(0.000471789219175841),\r\n+LPF_TAPS(-0.000492022810600967),\r\n+LPF_TAPS(0.000512360396871137),\r\n+LPF_TAPS(-0.000532769642503142),\r\n+LPF_TAPS(0.000553216779822719),\r\n+LPF_TAPS(-0.000573666617853055),\r\n+LPF_TAPS(0.000594082553976388),\r\n+LPF_TAPS(-0.000614426588415893),\r\n+LPF_TAPS(0.000634659341580137),\r\n+LPF_TAPS(-0.000654740074307908),\r\n+LPF_TAPS(0.000674626711046154),\r\n+LPF_TAPS(-0.000694275865988328),\r\n+LPF_TAPS(0.000713642872195339),\r\n+LPF_TAPS(-0.000732681813715889),\r\n+LPF_TAPS(0.000751345560716971),\r\n+LPF_TAPS(-0.000769585807629875),\r\n+LPF_TAPS(0.000787353114311179),\r\n+LPF_TAPS(-0.000804596950211894),\r\n+LPF_TAPS(0.000821265741542208),\r\n+LPF_TAPS(-0.000837306921412881),\r\n+LPF_TAPS(0.000852666982928181),\r\n+LPF_TAPS(-0.000867291535198970),\r\n+LPF_TAPS(0.000881125362238082),\r\n+LPF_TAPS(-0.000894112484693921),\r\n+LPF_TAPS(0.000906196224371776),\r\n+LPF_TAPS(-0.000917319271485603),\r\n+LPF_TAPS(0.000927423754577199),\r\n+LPF_TAPS(-0.000936451313033140),\r\n+LPF_TAPS(0.000944343172122700),\r\n+LPF_TAPS(-0.000951040220475200),\r\n+LPF_TAPS(0.000956483089907740),\r\n+LPF_TAPS(-0.000960612237508392),\r\n+LPF_TAPS(0.000963368029874411),\r\n+LPF_TAPS(-0.000964690829398552),\r\n+LPF_TAPS(0.000964521082490530),\r\n+LPF_TAPS(-0.000962799409615877),\r\n+LPF_TAPS(0.000959466697028092),\r\n+LPF_TAPS(-0.000954464190064709),\r\n+LPF_TAPS(0.000947733587872965),\r\n+LPF_TAPS(-0.000939217139425856),\r\n+LPF_TAPS(0.000928857740684234),\r\n+LPF_TAPS(-0.000916599032755621),\r\n+LPF_TAPS(0.000902385500897409),\r\n+LPF_TAPS(-0.000886162574206814),\r\n+LPF_TAPS(0.000867876725835767),\r\n+LPF_TAPS(-0.000847475573567521),\r\n+LPF_TAPS(0.000824907980585085),\r\n+LPF_TAPS(-0.000800124156261971),\r\n+LPF_TAPS(0.000773075756800786),\r\n+LPF_TAPS(-0.000743715985543212),\r\n+LPF_TAPS(0.000711999692773278),\r\n+LPF_TAPS(-0.000677883474834165),\r\n+LPF_TAPS(0.000641325772376801),\r\n+LPF_TAPS(-0.000602286967556684),\r\n+LPF_TAPS(0.000560729479997027),\r\n+LPF_TAPS(-0.000516617861333690),\r\n+LPF_TAPS(0.000469918888156992),\r\n+LPF_TAPS(-0.000420601653169192),\r\n+LPF_TAPS(0.000368637654371840),\r\n+LPF_TAPS(-0.000314000882103524),\r\n+LPF_TAPS(0.000256667903746495),\r\n+LPF_TAPS(-0.000196617945923104),\r\n+LPF_TAPS(0.000133832974005865),\r\n+LPF_TAPS(-0.000068297768767573),\r\n+LPF_TAPS(0.000000000000000002),\r\n+LPF_TAPS(0.000071069703067951),\r\n+LPF_TAPS(-0.000144917684714879),\r\n+LPF_TAPS(0.000221547199195576),\r\n+LPF_TAPS(-0.000300958350891157),\r\n+LPF_TAPS(0.000383148038288760),\r\n+LPF_TAPS(-0.000468109901940947),\r\n+LPF_TAPS(0.000555834276542550),\r\n+LPF_TAPS(-0.000646308147261596),\r\n+LPF_TAPS(0.000739515110453973),\r\n+LPF_TAPS(-0.000835435338884242),\r\n+LPF_TAPS(0.000934045551568285),\r\n+LPF_TAPS(-0.001035318988347563),\r\n+LPF_TAPS(0.001139225389298674),\r\n+LPF_TAPS(-0.001245730979069405),\r\n+LPF_TAPS(0.001354798456232424),\r\n+LPF_TAPS(-0.001466386987732098),\r\n+LPF_TAPS(0.001580452208496668),\r\n+LPF_TAPS(-0.001696946226279024),\r\n+LPF_TAPS(0.001815817631778271),\r\n+LPF_TAPS(-0.001937011514087372),\r\n+LPF_TAPS(0.002060469481503738),\r\n+LPF_TAPS(-0.002186129687729117),\r\n+LPF_TAPS(0.002313926863475365),\r\n+LPF_TAPS(-0.002443792353486666),\r\n+LPF_TAPS(0.002575654158974951),\r\n+LPF_TAPS(-0.002709436985458192),\r\n+LPF_TAPS(0.002845062295982047),\r\n+LPF_TAPS(-0.002982448369694321),\r\n+LPF_TAPS(0.003121510365731584),\r\n+LPF_TAPS(-0.003262160392370767),\r\n+LPF_TAPS(0.003404307581384737),\r\n+LPF_TAPS(-0.003547858167533667),\r\n+LPF_TAPS(0.003692715573114637),\r\n+LPF_TAPS(-0.003838780497481271),\r\n+LPF_TAPS(0.003985951011435366),\r\n+LPF_TAPS(-0.004134122656386202),\r\n+LPF_TAPS(0.004283188548159220),\r\n+LPF_TAPS(-0.004433039485331522),\r\n+LPF_TAPS(0.004583564061959497),\r\n+LPF_TAPS(-0.004734648784556964),\r\n+LPF_TAPS(0.004886178193172272),\r\n+LPF_TAPS(-0.005038034986406997),\r\n+LPF_TAPS(0.005190100150207429),\r\n+LPF_TAPS(-0.005342253090255694),\r\n+LPF_TAPS(0.005494371767777562),\r\n+LPF_TAPS(-0.005646332838577949),\r\n+LPF_TAPS(0.005798011795107618),\r\n+LPF_TAPS(-0.005949283111358818),\r\n+LPF_TAPS(0.006100020390380346),\r\n+LPF_TAPS(-0.006250096514197633),\r\n+LPF_TAPS(0.006399383795917306),\r\n+LPF_TAPS(-0.006547754133790769),\r\n+LPF_TAPS(0.006695079167006964),\r\n+LPF_TAPS(-0.006841230432978989),\r\n+LPF_TAPS(0.006986079525887232),\r\n+LPF_TAPS(-0.007129498256236060),\r\n+LPF_TAPS(0.007271358811179647),\r\n+LPF_TAPS(-0.007411533915368887),\r\n+LPF_TAPS(0.007549896992069969),\r\n+LPF_TAPS(-0.007686322324302492),\r\n+LPF_TAPS(0.007820685215744338),\r\n+LPF_TAPS(-0.007952862151150037),\r\n+LPF_TAPS(0.008082730956027729),\r\n+LPF_TAPS(-0.008210170955320985),\r\n+LPF_TAPS(0.008335063130842599),\r\n+LPF_TAPS(-0.008457290277206927),\r\n+LPF_TAPS(0.008576737156010138),\r\n+LPF_TAPS(-0.008693290648010277),\r\n+LPF_TAPS(0.008806839903059112),\r\n+LPF_TAPS(-0.008917276487542697),\r\n+LPF_TAPS(0.009024494529091247),\r\n+LPF_TAPS(-0.009128390858320101),\r\n+LPF_TAPS(0.009228865147370027),\r\n+LPF_TAPS(-0.009325820045020628),\r\n+LPF_TAPS(0.009419161308151987),\r\n+LPF_TAPS(-0.009508797929338439),\r\n+LPF_TAPS(0.009594642260365112),\r\n+LPF_TAPS(-0.009676610131458962),\r\n+LPF_TAPS(0.009754620966039424),\r\n+LPF_TAPS(-0.009828597890796587),\r\n+LPF_TAPS(0.009898467840912336),\r\n+LPF_TAPS(-0.009964161660250772),\r\n+LPF_TAPS(0.010025614196349649),\r\n+LPF_TAPS(-0.010082764390052302),\r\n+LPF_TAPS(0.010135555359632321),\r\n+LPF_TAPS(-0.010183934479268833),\r\n+LPF_TAPS(0.010227853451738598),\r\n+LPF_TAPS(-0.010267268375206008),\r\n+LPF_TAPS(0.010302139803996540),\r\n+LPF_TAPS(-0.010332432803251270),\r\n+LPF_TAPS(0.010358116997370248),\r\n+LPF_TAPS(-0.010379166612165125),\r\n+LPF_TAPS(0.010395560510646093),\r\n+LPF_TAPS(-0.010407282222386030),\r\n+LPF_TAPS(0.010414319966410993),\r\n+LPF_TAPS(0.989583333419875033),\r\n+LPF_TAPS(0.010414319966410993),\r\n+LPF_TAPS(-0.010407282222386032),\r\n+LPF_TAPS(0.010395560510646093),\r\n+LPF_TAPS(-0.010379166612165125),\r\n+LPF_TAPS(0.010358116997370248),\r\n+LPF_TAPS(-0.010332432803251270),\r\n+LPF_TAPS(0.010302139803996540),\r\n+LPF_TAPS(-0.010267268375206008),\r\n+LPF_TAPS(0.010227853451738598),\r\n+LPF_TAPS(-0.010183934479268833),\r\n+LPF_TAPS(0.010135555359632320),\r\n+LPF_TAPS(-0.010082764390052302),\r\n+LPF_TAPS(0.010025614196349649),\r\n+LPF_TAPS(-0.009964161660250772),\r\n+LPF_TAPS(0.009898467840912336),\r\n+LPF_TAPS(-0.009828597890796587),\r\n+LPF_TAPS(0.009754620966039424),\r\n+LPF_TAPS(-0.009676610131458964),\r\n+LPF_TAPS(0.009594642260365114),\r\n+LPF_TAPS(-0.009508797929338441),\r\n+LPF_TAPS(0.009419161308151989),\r\n+LPF_TAPS(-0.009325820045020628),\r\n+LPF_TAPS(0.009228865147370027),\r\n+LPF_TAPS(-0.009128390858320103),\r\n+LPF_TAPS(0.009024494529091247),\r\n+LPF_TAPS(-0.008917276487542697),\r\n+LPF_TAPS(0.008806839903059114),\r\n+LPF_TAPS(-0.008693290648010277),\r\n+LPF_TAPS(0.008576737156010138),\r\n+LPF_TAPS(-0.008457290277206927),\r\n+LPF_TAPS(0.008335063130842599),\r\n+LPF_TAPS(-0.008210170955320985),\r\n+LPF_TAPS(0.008082730956027731),\r\n+LPF_TAPS(-0.007952862151150038),\r\n+LPF_TAPS(0.007820685215744340),\r\n+LPF_TAPS(-0.007686322324302493),\r\n+LPF_TAPS(0.007549896992069970),\r\n+LPF_TAPS(-0.007411533915368887),\r\n+LPF_TAPS(0.007271358811179648),\r\n+LPF_TAPS(-0.007129498256236060),\r\n+LPF_TAPS(0.006986079525887232),\r\n+LPF_TAPS(-0.006841230432978991),\r\n+LPF_TAPS(0.006695079167006965),\r\n+LPF_TAPS(-0.006547754133790770),\r\n+LPF_TAPS(0.006399383795917307),\r\n+LPF_TAPS(-0.006250096514197633),\r\n+LPF_TAPS(0.006100020390380349),\r\n+LPF_TAPS(-0.005949283111358818),\r\n+LPF_TAPS(0.005798011795107618),\r\n+LPF_TAPS(-0.005646332838577950),\r\n+LPF_TAPS(0.005494371767777562),\r\n+LPF_TAPS(-0.005342253090255696),\r\n+LPF_TAPS(0.005190100150207429),\r\n+LPF_TAPS(-0.005038034986406999),\r\n+LPF_TAPS(0.004886178193172272),\r\n+LPF_TAPS(-0.004734648784556966),\r\n+LPF_TAPS(0.004583564061959497),\r\n+LPF_TAPS(-0.004433039485331523),\r\n+LPF_TAPS(0.004283188548159220),\r\n+LPF_TAPS(-0.004134122656386203),\r\n+LPF_TAPS(0.003985951011435367),\r\n+LPF_TAPS(-0.003838780497481271),\r\n+LPF_TAPS(0.003692715573114637),\r\n+LPF_TAPS(-0.003547858167533667),\r\n+LPF_TAPS(0.003404307581384739),\r\n+LPF_TAPS(-0.003262160392370767),\r\n+LPF_TAPS(0.003121510365731586),\r\n+LPF_TAPS(-0.002982448369694322),\r\n+LPF_TAPS(0.002845062295982047),\r\n+LPF_TAPS(-0.002709436985458192),\r\n+LPF_TAPS(0.002575654158974950),\r\n+LPF_TAPS(-0.002443792353486666),\r\n+LPF_TAPS(0.002313926863475365),\r\n+LPF_TAPS(-0.002186129687729117),\r\n+LPF_TAPS(0.002060469481503738),\r\n+LPF_TAPS(-0.001937011514087373),\r\n+LPF_TAPS(0.001815817631778272),\r\n+LPF_TAPS(-0.001696946226279024),\r\n+LPF_TAPS(0.001580452208496668),\r\n+LPF_TAPS(-0.001466386987732098),\r\n+LPF_TAPS(0.001354798456232424),\r\n+LPF_TAPS(-0.001245730979069404),\r\n+LPF_TAPS(0.001139225389298675),\r\n+LPF_TAPS(-0.001035318988347563),\r\n+LPF_TAPS(0.000934045551568285),\r\n+LPF_TAPS(-0.000835435338884242),\r\n+LPF_TAPS(0.000739515110453974),\r\n+LPF_TAPS(-0.000646308147261596),\r\n+LPF_TAPS(0.000555834276542550),\r\n+LPF_TAPS(-0.000468109901940947),\r\n+LPF_TAPS(0.000383148038288759),\r\n+LPF_TAPS(-0.000300958350891157),\r\n+LPF_TAPS(0.000221547199195576),\r\n+LPF_TAPS(-0.000144917684714879),\r\n+LPF_TAPS(0.000071069703067951),\r\n+LPF_TAPS(0.000000000000000002),\r\n+LPF_TAPS(-0.000068297768767573),\r\n+LPF_TAPS(0.000133832974005865),\r\n+LPF_TAPS(-0.000196617945923104),\r\n+LPF_TAPS(0.000256667903746495),\r\n+LPF_TAPS(-0.000314000882103524),\r\n+LPF_TAPS(0.000368637654371840),\r\n+LPF_TAPS(-0.000420601653169192),\r\n+LPF_TAPS(0.000469918888156992),\r\n+LPF_TAPS(-0.000516617861333690),\r\n+LPF_TAPS(0.000560729479997027),\r\n+LPF_TAPS(-0.000602286967556683),\r\n+LPF_TAPS(0.000641325772376801),\r\n+LPF_TAPS(-0.000677883474834166),\r\n+LPF_TAPS(0.000711999692773278),\r\n+LPF_TAPS(-0.000743715985543212),\r\n+LPF_TAPS(0.000773075756800786),\r\n+LPF_TAPS(-0.000800124156261972),\r\n+LPF_TAPS(0.000824907980585086),\r\n+LPF_TAPS(-0.000847475573567521),\r\n+LPF_TAPS(0.000867876725835767),\r\n+LPF_TAPS(-0.000886162574206813),\r\n+LPF_TAPS(0.000902385500897410),\r\n+LPF_TAPS(-0.000916599032755622),\r\n+LPF_TAPS(0.000928857740684235),\r\n+LPF_TAPS(-0.000939217139425856),\r\n+LPF_TAPS(0.000947733587872965),\r\n+LPF_TAPS(-0.000954464190064709),\r\n+LPF_TAPS(0.000959466697028092),\r\n+LPF_TAPS(-0.000962799409615878),\r\n+LPF_TAPS(0.000964521082490530),\r\n+LPF_TAPS(-0.000964690829398553),\r\n+LPF_TAPS(0.000963368029874411),\r\n+LPF_TAPS(-0.000960612237508392),\r\n+LPF_TAPS(0.000956483089907740),\r\n+LPF_TAPS(-0.000951040220475200),\r\n+LPF_TAPS(0.000944343172122701),\r\n+LPF_TAPS(-0.000936451313033140),\r\n+LPF_TAPS(0.000927423754577199),\r\n+LPF_TAPS(-0.000917319271485603),\r\n+LPF_TAPS(0.000906196224371776),\r\n+LPF_TAPS(-0.000894112484693922),\r\n+LPF_TAPS(0.000881125362238083),\r\n+LPF_TAPS(-0.000867291535198970),\r\n+LPF_TAPS(0.000852666982928181),\r\n+LPF_TAPS(-0.000837306921412881),\r\n+LPF_TAPS(0.000821265741542209),\r\n+LPF_TAPS(-0.000804596950211894),\r\n+LPF_TAPS(0.000787353114311179),\r\n+LPF_TAPS(-0.000769585807629876),\r\n+LPF_TAPS(0.000751345560716971),\r\n+LPF_TAPS(-0.000732681813715889),\r\n+LPF_TAPS(0.000713642872195338),\r\n+LPF_TAPS(-0.000694275865988328),\r\n+LPF_TAPS(0.000674626711046154),\r\n+LPF_TAPS(-0.000654740074307908),\r\n+LPF_TAPS(0.000634659341580137),\r\n+LPF_TAPS(-0.000614426588415894),\r\n+LPF_TAPS(0.000594082553976388),\r\n+LPF_TAPS(-0.000573666617853055),\r\n+LPF_TAPS(0.000553216779822720),\r\n+LPF_TAPS(-0.000532769642503142),\r\n+LPF_TAPS(0.000512360396871137),\r\n+LPF_TAPS(-0.000492022810600967),\r\n+LPF_TAPS(0.000471789219175841),\r\n+LPF_TAPS(-0.000451690519720436),\r\n+LPF_TAPS(0.000431756167499303),\r\n+LPF_TAPS(-0.000412014175020649),\r\n+LPF_TAPS(0.000392491113681583),\r\n+LPF_TAPS(-0.000373212117887881),\r\n+LPF_TAPS(0.000354200891577031),\r\n+LPF_TAPS(-0.000335479717070286),\r\n+LPF_TAPS(0.000317069466177310),\r\n+LPF_TAPS(-0.000298989613472842),\r\n+LPF_TAPS(0.000281258251663605),\r\n+LPF_TAPS(-0.000263892108960412),\r\n+LPF_TAPS(0.000246906568369384),\r\n+LPF_TAPS(-0.000230315688813067),\r\n+LPF_TAPS(0.000214132227991698),\r\n+LPF_TAPS(-0.000198367666893488),\r\n+LPF_TAPS(0.000183032235860659),\r\n+LPF_TAPS(-0.000168134942118076),\r\n+LPF_TAPS(0.000153683598670829),\r\n+LPF_TAPS(-0.000139684854474777),\r\n+LPF_TAPS(0.000126144225786715),\r\n+LPF_TAPS(-0.000113066128598582),\r\n+LPF_TAPS(0.000100453912060380),\r\n+LPF_TAPS(-0.000088309892798977),\r\n+LPF_TAPS(0.000076635390037745),\r\n+LPF_TAPS(-0.000065430761424673),\r\n+LPF_TAPS(0.000054695439477278),\r\n+LPF_TAPS(-0.000044427968552949),\r\n+LPF_TAPS(0.000034626042255596),\r\n+LPF_TAPS(-0.000025286541190957),\r\n+LPF_TAPS(0.000016405570983717),\r\n+LPF_TAPS(-0.000007978500472509),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000007535920281846),\r\n+LPF_TAPS(-0.000014635872169941),\r\n+LPF_TAPS(0.000021307051307166),\r\n+LPF_TAPS(-0.000027557199291414),\r\n+LPF_TAPS(0.000033394566067721),\r\n+LPF_TAPS(-0.000038827872671237),\r\n+LPF_TAPS(0.000043866274386062),\r\n+LPF_TAPS(-0.000048519324382749),\r\n+LPF_TAPS(0.000052796937893741),\r\n+LPF_TAPS(-0.000056709356982912),\r\n+LPF_TAPS(0.000060267115963468),\r\n+LPF_TAPS(-0.000063481007513722),\r\n+LPF_TAPS(0.000066362049538439),\r\n+LPF_TAPS(-0.000068921452820214),\r\n+LPF_TAPS(0.000071170589501115),\r\n+LPF_TAPS(-0.000073120962433157),\r\n+LPF_TAPS(0.000074784175431958),\r\n+LPF_TAPS(-0.000076171904465048),\r\n+LPF_TAPS(0.000077295869803477),\r\n+LPF_TAPS(-0.000078167809161870),\r\n+LPF_TAPS(0.000078799451849036),\r\n+LPF_TAPS(-0.000079202493948537),\r\n+LPF_TAPS(0.000079388574545169),\r\n+LPF_TAPS(-0.000079369253010717),\r\n+LPF_TAPS(0.000079155987359147),\r\n+LPF_TAPS(-0.000078760113678928),\r\n+LPF_TAPS(0.000078192826647125),\r\n+LPF_TAPS(-0.000077465161127258),\r\n+LPF_TAPS(0.000076587974850560),\r\n+LPF_TAPS(-0.000075571932177465),\r\n+LPF_TAPS(0.000074427488933831),\r\n+LPF_TAPS(-0.000073164878314178),\r\n+LPF_TAPS(0.000071794097841849),\r\n+LPF_TAPS(-0.000070324897373838),\r\n+LPF_TAPS(0.000068766768136256),\r\n+LPF_TAPS(-0.000067128932774100),\r\n+LPF_TAPS(0.000065420336397474),\r\n+LPF_TAPS(-0.000063649638604653),\r\n+LPF_TAPS(0.000061825206460594),\r\n+LPF_TAPS(-0.000059955108408308),\r\n+LPF_TAPS(0.000058047109088909),\r\n+LPF_TAPS(-0.000056108665045016),\r\n+LPF_TAPS(0.000054146921281024),\r\n+LPF_TAPS(-0.000052168708652737),\r\n+LPF_TAPS(0.000050180542057917),\r\n+LPF_TAPS(-0.000048188619398569),\r\n+LPF_TAPS(0.000046198821285030),\r\n+LPF_TAPS(-0.000044216711451398),\r\n+LPF_TAPS(0.000042247537851347),\r\n+LPF_TAPS(-0.000040296234403032),\r\n+LPF_TAPS(0.000038367423351500),\r\n+LPF_TAPS(-0.000036465418216909),\r\n+LPF_TAPS(0.000034594227296746),\r\n+LPF_TAPS(-0.000032757557690317),\r\n+LPF_TAPS(0.000030958819813886),\r\n+LPF_TAPS(-0.000029201132375049),\r\n+LPF_TAPS(0.000027487327775239),\r\n+LPF_TAPS(-0.000025819957909655),\r\n+LPF_TAPS(0.000024201300334306),\r\n+LPF_TAPS(-0.000022633364770453),\r\n+LPF_TAPS(0.000021117899917293),\r\n+LPF_TAPS(-0.000019656400544368),\r\n+LPF_TAPS(0.000018250114835954),\r\n+LPF_TAPS(-0.000016900051960385),\r\n+LPF_TAPS(0.000015606989838136),\r\n+LPF_TAPS(-0.000014371483083336),\r\n+LPF_TAPS(0.000013193871094264),\r\n+LPF_TAPS(-0.000012074286269341),\r\n+LPF_TAPS(0.000011012662326106),\r\n+LPF_TAPS(-0.000010008742701603),\r\n+LPF_TAPS(0.000009062089013671),\r\n+LPF_TAPS(-0.000008172089563650),\r\n+LPF_TAPS(0.000007337967862007),\r\n+LPF_TAPS(-0.000006558791159490),\r\n+LPF_TAPS(0.000005833478967426),\r\n+LPF_TAPS(-0.000005160811551841),\r\n+LPF_TAPS(0.000004539438387109),\r\n+LPF_TAPS(-0.000003967886555867),\r\n+LPF_TAPS(0.000003444569082966),\r\n+LPF_TAPS(-0.000002967793192163),\r\n+LPF_TAPS(0.000002535768475343),\r\n+LPF_TAPS(-0.000002146614964877),\r\n+LPF_TAPS(0.000001798371100741),\r\n+LPF_TAPS(-0.000001489001584895),\r\n+LPF_TAPS(0.000001216405116219),\r\n+LPF_TAPS(-0.000000978422000204),\r\n+LPF_TAPS(0.000000772841628323),\r\n+LPF_TAPS(-0.000000597409822761),\r\n+LPF_TAPS(0.000000449836042893),\r\n+LPF_TAPS(-0.000000327800450540),\r\n+LPF_TAPS(0.000000228960831633),\r\n+LPF_TAPS(-0.000000150959372505),\r\n+LPF_TAPS(0.000000091429289498),\r\n+LPF_TAPS(-0.000000048001311091),\r\n+LPF_TAPS(0.000000018310012110),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000009268046592),\r\n+LPF_TAPS(0.000000011811486367),\r\n+LPF_TAPS(-0.000000009919970318),\r\n+LPF_TAPS(0.000000005849842142),\r\n+LPF_TAPS(-0.000000001818683069),\r\n+LPF_TAPS(0.000000000000000000),\r\n+};\r\ndiff --git a/core/sound/blip_lpf_384K_24K.h b/core/sound/blip_lpf_384K_24K.h\nnew file mode 100644\nindex 000000000..4ce080319\n--- /dev/null\n+++ b/core/sound/blip_lpf_384K_24K.h\n@@ -0,0 +1,591 @@\n+static buf_t const blip_lpf_384K_24K[blip_lpf_384K_taps] = {\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000010873062592),\r\n+LPF_TAPS(-0.000000044433940061),\r\n+LPF_TAPS(-0.000000089256106800),\r\n+LPF_TAPS(-0.000000119074580424),\r\n+LPF_TAPS(-0.000000099778720099),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000197123477448),\r\n+LPF_TAPS(0.000000483913353528),\r\n+LPF_TAPS(0.000000822645851364),\r\n+LPF_TAPS(0.000001146649695244),\r\n+LPF_TAPS(0.000001368850624164),\r\n+LPF_TAPS(0.000001397075841614),\r\n+LPF_TAPS(0.000001153882516618),\r\n+LPF_TAPS(0.000000597409520936),\r\n+LPF_TAPS(-0.000000260956550586),\r\n+LPF_TAPS(-0.000001346271422868),\r\n+LPF_TAPS(-0.000002520396942092),\r\n+LPF_TAPS(-0.000003594766004492),\r\n+LPF_TAPS(-0.000004355165268430),\r\n+LPF_TAPS(-0.000004595851995894),\r\n+LPF_TAPS(-0.000004158226808320),\r\n+LPF_TAPS(-0.000002967791692768),\r\n+LPF_TAPS(-0.000001062561235713),\r\n+LPF_TAPS(0.000001393335763527),\r\n+LPF_TAPS(0.000004115402656697),\r\n+LPF_TAPS(0.000006725697160838),\r\n+LPF_TAPS(0.000008799412983442),\r\n+LPF_TAPS(0.000009926118931399),\r\n+LPF_TAPS(0.000009777591229902),\r\n+LPF_TAPS(0.000008172085434929),\r\n+LPF_TAPS(0.000005124222565588),\r\n+LPF_TAPS(0.000000870667867161),\r\n+LPF_TAPS(-0.000004135526887174),\r\n+LPF_TAPS(-0.000009264921034204),\r\n+LPF_TAPS(-0.000013783975093675),\r\n+LPF_TAPS(-0.000016952311588863),\r\n+LPF_TAPS(-0.000018132931135849),\r\n+LPF_TAPS(-0.000016900043422104),\r\n+LPF_TAPS(-0.000013127866291288),\r\n+LPF_TAPS(-0.000007044856417201),\r\n+LPF_TAPS(0.000000758574386669),\r\n+LPF_TAPS(0.000009375041913578),\r\n+LPF_TAPS(0.000017676791840063),\r\n+LPF_TAPS(0.000024455030013144),\r\n+LPF_TAPS(0.000028585852155228),\r\n+LPF_TAPS(0.000029201117621990),\r\n+LPF_TAPS(0.000025839774290033),\r\n+LPF_TAPS(0.000018555656501166),\r\n+LPF_TAPS(0.000007961867914031),\r\n+LPF_TAPS(-0.000004800760958373),\r\n+LPF_TAPS(-0.000018173780752453),\r\n+LPF_TAPS(-0.000030361303691115),\r\n+LPF_TAPS(-0.000039560882481565),\r\n+LPF_TAPS(-0.000044216689112137),\r\n+LPF_TAPS(-0.000043260891228141),\r\n+LPF_TAPS(-0.000036307841903594),\r\n+LPF_TAPS(-0.000023769387926964),\r\n+LPF_TAPS(-0.000006868137320104),\r\n+LPF_TAPS(0.000012461924109274),\r\n+LPF_TAPS(0.000031782989597605),\r\n+LPF_TAPS(0.000048449010849361),\r\n+LPF_TAPS(0.000059955078117661),\r\n+LPF_TAPS(0.000064296035824224),\r\n+LPF_TAPS(0.000060284909365420),\r\n+LPF_TAPS(0.000047783451824105),\r\n+LPF_TAPS(0.000027805700334601),\r\n+LPF_TAPS(0.000002470165554645),\r\n+LPF_TAPS(-0.000025204452027464),\r\n+LPF_TAPS(-0.000051643692406506),\r\n+LPF_TAPS(-0.000073164841349667),\r\n+LPF_TAPS(-0.000086473339538773),\r\n+LPF_TAPS(-0.000089143126997813),\r\n+LPF_TAPS(-0.000080013419130200),\r\n+LPF_TAPS(-0.000059441078730119),\r\n+LPF_TAPS(-0.000029363338982690),\r\n+LPF_TAPS(0.000006851400044803),\r\n+LPF_TAPS(0.000044759314989653),\r\n+LPF_TAPS(0.000079369212911613),\r\n+LPF_TAPS(0.000105782560625035),\r\n+LPF_TAPS(0.000119865590392991),\r\n+LPF_TAPS(0.000118863704413853),\r\n+LPF_TAPS(0.000101870220772043),\r\n+LPF_TAPS(0.000070075546976098),\r\n+LPF_TAPS(0.000026748002286040),\r\n+LPF_TAPS(-0.000023069000488844),\r\n+LPF_TAPS(-0.000073120925490834),\r\n+LPF_TAPS(-0.000116707600123990),\r\n+LPF_TAPS(-0.000147559204462142),\r\n+LPF_TAPS(-0.000160710819459113),\r\n+LPF_TAPS(-0.000153256631864033),\r\n+LPF_TAPS(-0.000124873738820864),\r\n+LPF_TAPS(-0.000078029916231798),\r\n+LPF_TAPS(-0.000017827335238358),\r\n+LPF_TAPS(0.000048519299869729),\r\n+LPF_TAPS(0.000112522168650018),\r\n+LPF_TAPS(0.000165483246898999),\r\n+LPF_TAPS(0.000199650622682477),\r\n+LPF_TAPS(0.000209317604100970),\r\n+LPF_TAPS(0.000191712715464584),\r\n+LPF_TAPS(0.000147547927809313),\r\n+LPF_TAPS(0.000081130848127410),\r\n+LPF_TAPS(-0.000000000000000002),\r\n+LPF_TAPS(-0.000085895615387418),\r\n+LPF_TAPS(-0.000165388708993206),\r\n+LPF_TAPS(-0.000227518646599173),\r\n+LPF_TAPS(-0.000263010769991375),\r\n+LPF_TAPS(-0.000265614219035522),\r\n+LPF_TAPS(-0.000233110348123005),\r\n+LPF_TAPS(-0.000167837621839738),\r\n+LPF_TAPS(-0.000076635351319839),\r\n+LPF_TAPS(0.000029818586580912),\r\n+LPF_TAPS(0.000138220758623487),\r\n+LPF_TAPS(0.000234273533524654),\r\n+LPF_TAPS(0.000304538946849493),\r\n+LPF_TAPS(0.000338278693693145),\r\n+LPF_TAPS(0.000329032958981615),\r\n+LPF_TAPS(0.000275712562297710),\r\n+LPF_TAPS(0.000183032143388698),\r\n+LPF_TAPS(0.000061191338650244),\r\n+LPF_TAPS(-0.000075193201011075),\r\n+LPF_TAPS(-0.000208801555785383),\r\n+LPF_TAPS(-0.000321774742052341),\r\n+LPF_TAPS(-0.000398063601974186),\r\n+LPF_TAPS(-0.000425658141654782),\r\n+LPF_TAPS(-0.000398393435008102),\r\n+LPF_TAPS(-0.000317069305986801),\r\n+LPF_TAPS(-0.000189699387626334),\r\n+LPF_TAPS(-0.000030812195298653),\r\n+LPF_TAPS(0.000140150374400007),\r\n+LPF_TAPS(0.000301168871912543),\r\n+LPF_TAPS(0.000430441762402456),\r\n+LPF_TAPS(0.000509290867158166),\r\n+LPF_TAPS(0.000524795183039878),\r\n+LPF_TAPS(0.000471788980817478),\r\n+LPF_TAPS(0.000353927069933187),\r\n+LPF_TAPS(0.000183630030415289),\r\n+LPF_TAPS(-0.000019137575534522),\r\n+LPF_TAPS(-0.000229149777363345),\r\n+LPF_TAPS(-0.000419009939519924),\r\n+LPF_TAPS(-0.000562677396245674),\r\n+LPF_TAPS(-0.000638981997825178),\r\n+LPF_TAPS(-0.000634659020936191),\r\n+LPF_TAPS(-0.000546478704306668),\r\n+LPF_TAPS(-0.000382145141436608),\r\n+LPF_TAPS(-0.000159787721040352),\r\n+LPF_TAPS(0.000093952819042894),\r\n+LPF_TAPS(0.000347054805369461),\r\n+LPF_TAPS(0.000566103286916117),\r\n+LPF_TAPS(0.000720645397188631),\r\n+LPF_TAPS(0.000787352716522965),\r\n+LPF_TAPS(0.000753430069803305),\r\n+LPF_TAPS(0.000618784830877275),\r\n+LPF_TAPS(0.000396613352761790),\r\n+LPF_TAPS(0.000112255681198712),\r\n+LPF_TAPS(-0.000199607309825992),\r\n+LPF_TAPS(-0.000499117172004200),\r\n+LPF_TAPS(-0.000746270850545457),\r\n+LPF_TAPS(-0.000906195766541403),\r\n+LPF_TAPS(-0.000953979713424516),\r\n+LPF_TAPS(-0.000878397084629140),\r\n+LPF_TAPS(-0.000683990310445222),\r\n+LPF_TAPS(-0.000391159551805093),\r\n+LPF_TAPS(-0.000034162239368962),\r\n+LPF_TAPS(0.000342803659229069),\r\n+LPF_TAPS(0.000690997789610670),\r\n+LPF_TAPS(0.000963367543159580),\r\n+LPF_TAPS(0.001120822949094585),\r\n+LPF_TAPS(0.001137729615627804),\r\n+LPF_TAPS(0.001005861205368310),\r\n+LPF_TAPS(0.000736224318739697),\r\n+LPF_TAPS(0.000358424893452024),\r\n+LPF_TAPS(-0.000082444039795107),\r\n+LPF_TAPS(-0.000531086999098461),\r\n+LPF_TAPS(-0.000928857271404751),\r\n+LPF_TAPS(-0.001221336864993682),\r\n+LPF_TAPS(-0.001365676324503511),\r\n+LPF_TAPS(-0.001336716992459966),\r\n+LPF_TAPS(-0.001131038398181634),\r\n+LPF_TAPS(-0.000768311612478299),\r\n+LPF_TAPS(-0.000289669015175886),\r\n+LPF_TAPS(0.000246817785251053),\r\n+LPF_TAPS(0.000773075366225870),\r\n+LPF_TAPS(0.001219567077567143),\r\n+LPF_TAPS(0.001524374544410374),\r\n+LPF_TAPS(0.001641649248269317),\r\n+LPF_TAPS(0.001548296595337379),\r\n+LPF_TAPS(0.001247941340472507),\r\n+LPF_TAPS(0.000771542416995697),\r\n+LPF_TAPS(0.000174440415894133),\r\n+LPF_TAPS(-0.000469918650743609),\r\n+LPF_TAPS(-0.001078892858232290),\r\n+LPF_TAPS(-0.001571122798593491),\r\n+LPF_TAPS(-0.001877265645783939),\r\n+LPF_TAPS(-0.001949585300513400),\r\n+LPF_TAPS(-0.001769093234844250),\r\n+LPF_TAPS(-0.001349204048643017),\r\n+LPF_TAPS(-0.000735285897155893),\r\n+LPF_TAPS(0.000000000000000010),\r\n+LPF_TAPS(0.000765128221959373),\r\n+LPF_TAPS(0.001460951819905955),\r\n+LPF_TAPS(0.001993397141117926),\r\n+LPF_TAPS(0.002286004476599548),\r\n+LPF_TAPS(0.002290664423330716),\r\n+LPF_TAPS(0.001995070580731165),\r\n+LPF_TAPS(0.001425780490409142),\r\n+LPF_TAPS(0.000646307820732324),\r\n+LPF_TAPS(-0.000249703568309774),\r\n+LPF_TAPS(-0.001149527220523168),\r\n+LPF_TAPS(-0.001935346637858005),\r\n+LPF_TAPS(-0.002499479880257908),\r\n+LPF_TAPS(-0.002758893782458384),\r\n+LPF_TAPS(-0.002667080636341654),\r\n+LPF_TAPS(-0.002221637864557989),\r\n+LPF_TAPS(-0.001466386246880898),\r\n+LPF_TAPS(-0.000487528980025600),\r\n+LPF_TAPS(0.000595887970224335),\r\n+LPF_TAPS(0.001646199390461799),\r\n+LPF_TAPS(0.002524361277280395),\r\n+LPF_TAPS(0.003108080445438140),\r\n+LPF_TAPS(0.003308503465377861),\r\n+LPF_TAPS(0.003083228413154061),\r\n+LPF_TAPS(0.002443791118828701),\r\n+LPF_TAPS(0.001456421929056373),\r\n+LPF_TAPS(0.000235695910232274),\r\n+LPF_TAPS(-0.001068391209347100),\r\n+LPF_TAPS(-0.002288511968112811),\r\n+LPF_TAPS(-0.003261121836683584),\r\n+LPF_TAPS(-0.003847978604827186),\r\n+LPF_TAPS(-0.003955283855420899),\r\n+LPF_TAPS(-0.003547856375077202),\r\n+LPF_TAPS(-0.002656283356645106),\r\n+LPF_TAPS(-0.001375819411131076),\r\n+LPF_TAPS(0.000143179026116892),\r\n+LPF_TAPS(0.001712408807641796),\r\n+LPF_TAPS(0.003128469600049731),\r\n+LPF_TAPS(0.004198694437944632),\r\n+LPF_TAPS(0.004766745086702058),\r\n+LPF_TAPS(0.004734646392507615),\r\n+LPF_TAPS(0.004078247892247627),\r\n+LPF_TAPS(0.002853816134047740),\r\n+LPF_TAPS(0.001194502525004682),\r\n+LPF_TAPS(-0.000703320606742842),\r\n+LPF_TAPS(-0.002602559649764842),\r\n+LPF_TAPS(-0.004254244313217478),\r\n+LPF_TAPS(-0.005429297774939240),\r\n+LPF_TAPS(-0.005949280105649362),\r\n+LPF_TAPS(-0.005712100682603256),\r\n+LPF_TAPS(-0.004709151641029054),\r\n+LPF_TAPS(-0.003031243380414721),\r\n+LPF_TAPS(-0.000862027749786030),\r\n+LPF_TAPS(0.001540873728568918),\r\n+LPF_TAPS(0.003875243788312313),\r\n+LPF_TAPS(0.005830930222998419),\r\n+LPF_TAPS(0.007129494654255819),\r\n+LPF_TAPS(0.007561956900417036),\r\n+LPF_TAPS(0.007019735856192181),\r\n+LPF_TAPS(0.005514495324598487),\r\n+LPF_TAPS(0.003183777342981615),\r\n+LPF_TAPS(0.000280926205451193),\r\n+LPF_TAPS(-0.002850306791123200),\r\n+LPF_TAPS(-0.005814155812879863),\r\n+LPF_TAPS(-0.008210166807360992),\r\n+LPF_TAPS(-0.009684066391535082),\r\n+LPF_TAPS(-0.009976049037200873),\r\n+LPF_TAPS(-0.008960337000324321),\r\n+LPF_TAPS(-0.006670593158430466),\r\n+LPF_TAPS(-0.003307186049262837),\r\n+LPF_TAPS(0.000775720420812459),\r\n+LPF_TAPS(0.005102964497395414),\r\n+LPF_TAPS(0.009128386246455083),\r\n+LPF_TAPS(0.012297147197125468),\r\n+LPF_TAPS(0.014113759174320867),\r\n+LPF_TAPS(0.014208175048013237),\r\n+LPF_TAPS(0.012392100465967349),\r\n+LPF_TAPS(0.008698392373932410),\r\n+LPF_TAPS(0.003397971886552389),\r\n+LPF_TAPS(-0.003009050437933545),\r\n+LPF_TAPS(-0.009828592925171522),\r\n+LPF_TAPS(-0.016231795109683190),\r\n+LPF_TAPS(-0.021333035035610928),\r\n+LPF_TAPS(-0.024279308494577493),\r\n+LPF_TAPS(-0.024341934238586781),\r\n+LPF_TAPS(-0.021000916877291515),\r\n+LPF_TAPS(-0.014012706131845489),\r\n+LPF_TAPS(-0.003453521729232617),\r\n+LPF_TAPS(0.010267263187954912),\r\n+LPF_TAPS(0.026426203927856780),\r\n+LPF_TAPS(0.044036523533624770),\r\n+LPF_TAPS(0.061926377607317312),\r\n+LPF_TAPS(0.078837557650514617),\r\n+LPF_TAPS(0.093535285832901924),\r\n+LPF_TAPS(0.104918443411417636),\r\n+LPF_TAPS(0.112119366971203394),\r\n+LPF_TAPS(0.114583275453318756),\r\n+LPF_TAPS(0.112119366971203394),\r\n+LPF_TAPS(0.104918443411417650),\r\n+LPF_TAPS(0.093535285832901924),\r\n+LPF_TAPS(0.078837557650514617),\r\n+LPF_TAPS(0.061926377607317312),\r\n+LPF_TAPS(0.044036523533624770),\r\n+LPF_TAPS(0.026426203927856780),\r\n+LPF_TAPS(0.010267263187954912),\r\n+LPF_TAPS(-0.003453521729232617),\r\n+LPF_TAPS(-0.014012706131845489),\r\n+LPF_TAPS(-0.021000916877291515),\r\n+LPF_TAPS(-0.024341934238586785),\r\n+LPF_TAPS(-0.024279308494577493),\r\n+LPF_TAPS(-0.021333035035610928),\r\n+LPF_TAPS(-0.016231795109683190),\r\n+LPF_TAPS(-0.009828592925171522),\r\n+LPF_TAPS(-0.003009050437933545),\r\n+LPF_TAPS(0.003397971886552389),\r\n+LPF_TAPS(0.008698392373932410),\r\n+LPF_TAPS(0.012392100465967353),\r\n+LPF_TAPS(0.014208175048013239),\r\n+LPF_TAPS(0.014113759174320867),\r\n+LPF_TAPS(0.012297147197125468),\r\n+LPF_TAPS(0.009128386246455084),\r\n+LPF_TAPS(0.005102964497395414),\r\n+LPF_TAPS(0.000775720420812459),\r\n+LPF_TAPS(-0.003307186049262837),\r\n+LPF_TAPS(-0.006670593158430466),\r\n+LPF_TAPS(-0.008960337000324321),\r\n+LPF_TAPS(-0.009976049037200873),\r\n+LPF_TAPS(-0.009684066391535082),\r\n+LPF_TAPS(-0.008210166807360992),\r\n+LPF_TAPS(-0.005814155812879864),\r\n+LPF_TAPS(-0.002850306791123202),\r\n+LPF_TAPS(0.000280926205451193),\r\n+LPF_TAPS(0.003183777342981615),\r\n+LPF_TAPS(0.005514495324598487),\r\n+LPF_TAPS(0.007019735856192181),\r\n+LPF_TAPS(0.007561956900417038),\r\n+LPF_TAPS(0.007129494654255819),\r\n+LPF_TAPS(0.005830930222998419),\r\n+LPF_TAPS(0.003875243788312314),\r\n+LPF_TAPS(0.001540873728568918),\r\n+LPF_TAPS(-0.000862027749786030),\r\n+LPF_TAPS(-0.003031243380414722),\r\n+LPF_TAPS(-0.004709151641029054),\r\n+LPF_TAPS(-0.005712100682603258),\r\n+LPF_TAPS(-0.005949280105649362),\r\n+LPF_TAPS(-0.005429297774939240),\r\n+LPF_TAPS(-0.004254244313217479),\r\n+LPF_TAPS(-0.002602559649764842),\r\n+LPF_TAPS(-0.000703320606742842),\r\n+LPF_TAPS(0.001194502525004682),\r\n+LPF_TAPS(0.002853816134047741),\r\n+LPF_TAPS(0.004078247892247627),\r\n+LPF_TAPS(0.004734646392507617),\r\n+LPF_TAPS(0.004766745086702059),\r\n+LPF_TAPS(0.004198694437944634),\r\n+LPF_TAPS(0.003128469600049731),\r\n+LPF_TAPS(0.001712408807641796),\r\n+LPF_TAPS(0.000143179026116892),\r\n+LPF_TAPS(-0.001375819411131076),\r\n+LPF_TAPS(-0.002656283356645106),\r\n+LPF_TAPS(-0.003547856375077202),\r\n+LPF_TAPS(-0.003955283855420901),\r\n+LPF_TAPS(-0.003847978604827186),\r\n+LPF_TAPS(-0.003261121836683586),\r\n+LPF_TAPS(-0.002288511968112812),\r\n+LPF_TAPS(-0.001068391209347100),\r\n+LPF_TAPS(0.000235695910232274),\r\n+LPF_TAPS(0.001456421929056373),\r\n+LPF_TAPS(0.002443791118828701),\r\n+LPF_TAPS(0.003083228413154060),\r\n+LPF_TAPS(0.003308503465377862),\r\n+LPF_TAPS(0.003108080445438140),\r\n+LPF_TAPS(0.002524361277280396),\r\n+LPF_TAPS(0.001646199390461799),\r\n+LPF_TAPS(0.000595887970224335),\r\n+LPF_TAPS(-0.000487528980025600),\r\n+LPF_TAPS(-0.001466386246880898),\r\n+LPF_TAPS(-0.002221637864557990),\r\n+LPF_TAPS(-0.002667080636341652),\r\n+LPF_TAPS(-0.002758893782458385),\r\n+LPF_TAPS(-0.002499479880257908),\r\n+LPF_TAPS(-0.001935346637858006),\r\n+LPF_TAPS(-0.001149527220523168),\r\n+LPF_TAPS(-0.000249703568309774),\r\n+LPF_TAPS(0.000646307820732324),\r\n+LPF_TAPS(0.001425780490409142),\r\n+LPF_TAPS(0.001995070580731166),\r\n+LPF_TAPS(0.002290664423330716),\r\n+LPF_TAPS(0.002286004476599548),\r\n+LPF_TAPS(0.001993397141117926),\r\n+LPF_TAPS(0.001460951819905955),\r\n+LPF_TAPS(0.000765128221959373),\r\n+LPF_TAPS(0.000000000000000010),\r\n+LPF_TAPS(-0.000735285897155893),\r\n+LPF_TAPS(-0.001349204048643017),\r\n+LPF_TAPS(-0.001769093234844250),\r\n+LPF_TAPS(-0.001949585300513400),\r\n+LPF_TAPS(-0.001877265645783941),\r\n+LPF_TAPS(-0.001571122798593491),\r\n+LPF_TAPS(-0.001078892858232290),\r\n+LPF_TAPS(-0.000469918650743609),\r\n+LPF_TAPS(0.000174440415894133),\r\n+LPF_TAPS(0.000771542416995697),\r\n+LPF_TAPS(0.001247941340472507),\r\n+LPF_TAPS(0.001548296595337380),\r\n+LPF_TAPS(0.001641649248269319),\r\n+LPF_TAPS(0.001524374544410374),\r\n+LPF_TAPS(0.001219567077567144),\r\n+LPF_TAPS(0.000773075366225870),\r\n+LPF_TAPS(0.000246817785251053),\r\n+LPF_TAPS(-0.000289669015175886),\r\n+LPF_TAPS(-0.000768311612478299),\r\n+LPF_TAPS(-0.001131038398181634),\r\n+LPF_TAPS(-0.001336716992459966),\r\n+LPF_TAPS(-0.001365676324503511),\r\n+LPF_TAPS(-0.001221336864993683),\r\n+LPF_TAPS(-0.000928857271404751),\r\n+LPF_TAPS(-0.000531086999098461),\r\n+LPF_TAPS(-0.000082444039795107),\r\n+LPF_TAPS(0.000358424893452024),\r\n+LPF_TAPS(0.000736224318739697),\r\n+LPF_TAPS(0.001005861205368311),\r\n+LPF_TAPS(0.001137729615627805),\r\n+LPF_TAPS(0.001120822949094585),\r\n+LPF_TAPS(0.000963367543159579),\r\n+LPF_TAPS(0.000690997789610670),\r\n+LPF_TAPS(0.000342803659229069),\r\n+LPF_TAPS(-0.000034162239368962),\r\n+LPF_TAPS(-0.000391159551805093),\r\n+LPF_TAPS(-0.000683990310445222),\r\n+LPF_TAPS(-0.000878397084629141),\r\n+LPF_TAPS(-0.000953979713424516),\r\n+LPF_TAPS(-0.000906195766541403),\r\n+LPF_TAPS(-0.000746270850545458),\r\n+LPF_TAPS(-0.000499117172004201),\r\n+LPF_TAPS(-0.000199607309825992),\r\n+LPF_TAPS(0.000112255681198712),\r\n+LPF_TAPS(0.000396613352761790),\r\n+LPF_TAPS(0.000618784830877275),\r\n+LPF_TAPS(0.000753430069803305),\r\n+LPF_TAPS(0.000787352716522965),\r\n+LPF_TAPS(0.000720645397188631),\r\n+LPF_TAPS(0.000566103286916117),\r\n+LPF_TAPS(0.000347054805369461),\r\n+LPF_TAPS(0.000093952819042894),\r\n+LPF_TAPS(-0.000159787721040352),\r\n+LPF_TAPS(-0.000382145141436609),\r\n+LPF_TAPS(-0.000546478704306668),\r\n+LPF_TAPS(-0.000634659020936191),\r\n+LPF_TAPS(-0.000638981997825179),\r\n+LPF_TAPS(-0.000562677396245674),\r\n+LPF_TAPS(-0.000419009939519924),\r\n+LPF_TAPS(-0.000229149777363346),\r\n+LPF_TAPS(-0.000019137575534522),\r\n+LPF_TAPS(0.000183630030415289),\r\n+LPF_TAPS(0.000353927069933187),\r\n+LPF_TAPS(0.000471788980817478),\r\n+LPF_TAPS(0.000524795183039879),\r\n+LPF_TAPS(0.000509290867158167),\r\n+LPF_TAPS(0.000430441762402456),\r\n+LPF_TAPS(0.000301168871912543),\r\n+LPF_TAPS(0.000140150374400007),\r\n+LPF_TAPS(-0.000030812195298653),\r\n+LPF_TAPS(-0.000189699387626334),\r\n+LPF_TAPS(-0.000317069305986801),\r\n+LPF_TAPS(-0.000398393435008102),\r\n+LPF_TAPS(-0.000425658141654782),\r\n+LPF_TAPS(-0.000398063601974186),\r\n+LPF_TAPS(-0.000321774742052341),\r\n+LPF_TAPS(-0.000208801555785383),\r\n+LPF_TAPS(-0.000075193201011075),\r\n+LPF_TAPS(0.000061191338650244),\r\n+LPF_TAPS(0.000183032143388699),\r\n+LPF_TAPS(0.000275712562297710),\r\n+LPF_TAPS(0.000329032958981615),\r\n+LPF_TAPS(0.000338278693693145),\r\n+LPF_TAPS(0.000304538946849494),\r\n+LPF_TAPS(0.000234273533524654),\r\n+LPF_TAPS(0.000138220758623487),\r\n+LPF_TAPS(0.000029818586580912),\r\n+LPF_TAPS(-0.000076635351319839),\r\n+LPF_TAPS(-0.000167837621839738),\r\n+LPF_TAPS(-0.000233110348123005),\r\n+LPF_TAPS(-0.000265614219035522),\r\n+LPF_TAPS(-0.000263010769991375),\r\n+LPF_TAPS(-0.000227518646599173),\r\n+LPF_TAPS(-0.000165388708993206),\r\n+LPF_TAPS(-0.000085895615387418),\r\n+LPF_TAPS(-0.000000000000000002),\r\n+LPF_TAPS(0.000081130848127410),\r\n+LPF_TAPS(0.000147547927809313),\r\n+LPF_TAPS(0.000191712715464584),\r\n+LPF_TAPS(0.000209317604100970),\r\n+LPF_TAPS(0.000199650622682477),\r\n+LPF_TAPS(0.000165483246899000),\r\n+LPF_TAPS(0.000112522168650018),\r\n+LPF_TAPS(0.000048519299869729),\r\n+LPF_TAPS(-0.000017827335238358),\r\n+LPF_TAPS(-0.000078029916231798),\r\n+LPF_TAPS(-0.000124873738820864),\r\n+LPF_TAPS(-0.000153256631864033),\r\n+LPF_TAPS(-0.000160710819459113),\r\n+LPF_TAPS(-0.000147559204462142),\r\n+LPF_TAPS(-0.000116707600123990),\r\n+LPF_TAPS(-0.000073120925490834),\r\n+LPF_TAPS(-0.000023069000488844),\r\n+LPF_TAPS(0.000026748002286040),\r\n+LPF_TAPS(0.000070075546976099),\r\n+LPF_TAPS(0.000101870220772043),\r\n+LPF_TAPS(0.000118863704413853),\r\n+LPF_TAPS(0.000119865590392991),\r\n+LPF_TAPS(0.000105782560625035),\r\n+LPF_TAPS(0.000079369212911613),\r\n+LPF_TAPS(0.000044759314989653),\r\n+LPF_TAPS(0.000006851400044803),\r\n+LPF_TAPS(-0.000029363338982690),\r\n+LPF_TAPS(-0.000059441078730119),\r\n+LPF_TAPS(-0.000080013419130200),\r\n+LPF_TAPS(-0.000089143126997813),\r\n+LPF_TAPS(-0.000086473339538773),\r\n+LPF_TAPS(-0.000073164841349667),\r\n+LPF_TAPS(-0.000051643692406506),\r\n+LPF_TAPS(-0.000025204452027464),\r\n+LPF_TAPS(0.000002470165554645),\r\n+LPF_TAPS(0.000027805700334601),\r\n+LPF_TAPS(0.000047783451824105),\r\n+LPF_TAPS(0.000060284909365420),\r\n+LPF_TAPS(0.000064296035824224),\r\n+LPF_TAPS(0.000059955078117661),\r\n+LPF_TAPS(0.000048449010849361),\r\n+LPF_TAPS(0.000031782989597605),\r\n+LPF_TAPS(0.000012461924109274),\r\n+LPF_TAPS(-0.000006868137320104),\r\n+LPF_TAPS(-0.000023769387926964),\r\n+LPF_TAPS(-0.000036307841903594),\r\n+LPF_TAPS(-0.000043260891228141),\r\n+LPF_TAPS(-0.000044216689112137),\r\n+LPF_TAPS(-0.000039560882481565),\r\n+LPF_TAPS(-0.000030361303691115),\r\n+LPF_TAPS(-0.000018173780752453),\r\n+LPF_TAPS(-0.000004800760958373),\r\n+LPF_TAPS(0.000007961867914031),\r\n+LPF_TAPS(0.000018555656501166),\r\n+LPF_TAPS(0.000025839774290034),\r\n+LPF_TAPS(0.000029201117621990),\r\n+LPF_TAPS(0.000028585852155228),\r\n+LPF_TAPS(0.000024455030013144),\r\n+LPF_TAPS(0.000017676791840063),\r\n+LPF_TAPS(0.000009375041913578),\r\n+LPF_TAPS(0.000000758574386669),\r\n+LPF_TAPS(-0.000007044856417201),\r\n+LPF_TAPS(-0.000013127866291288),\r\n+LPF_TAPS(-0.000016900043422104),\r\n+LPF_TAPS(-0.000018132931135849),\r\n+LPF_TAPS(-0.000016952311588863),\r\n+LPF_TAPS(-0.000013783975093675),\r\n+LPF_TAPS(-0.000009264921034204),\r\n+LPF_TAPS(-0.000004135526887174),\r\n+LPF_TAPS(0.000000870667867161),\r\n+LPF_TAPS(0.000005124222565588),\r\n+LPF_TAPS(0.000008172085434929),\r\n+LPF_TAPS(0.000009777591229902),\r\n+LPF_TAPS(0.000009926118931399),\r\n+LPF_TAPS(0.000008799412983442),\r\n+LPF_TAPS(0.000006725697160838),\r\n+LPF_TAPS(0.000004115402656697),\r\n+LPF_TAPS(0.000001393335763527),\r\n+LPF_TAPS(-0.000001062561235713),\r\n+LPF_TAPS(-0.000002967791692768),\r\n+LPF_TAPS(-0.000004158226808320),\r\n+LPF_TAPS(-0.000004595851995894),\r\n+LPF_TAPS(-0.000004355165268430),\r\n+LPF_TAPS(-0.000003594766004492),\r\n+LPF_TAPS(-0.000002520396942092),\r\n+LPF_TAPS(-0.000001346271422868),\r\n+LPF_TAPS(-0.000000260956550586),\r\n+LPF_TAPS(0.000000597409520936),\r\n+LPF_TAPS(0.000001153882516618),\r\n+LPF_TAPS(0.000001397075841614),\r\n+LPF_TAPS(0.000001368850624164),\r\n+LPF_TAPS(0.000001146649695244),\r\n+LPF_TAPS(0.000000822645851364),\r\n+LPF_TAPS(0.000000483913353528),\r\n+LPF_TAPS(0.000000197123477448),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000099778720099),\r\n+LPF_TAPS(-0.000000119074580424),\r\n+LPF_TAPS(-0.000000089256106800),\r\n+LPF_TAPS(-0.000000044433940061),\r\n+LPF_TAPS(-0.000000010873062592),\r\n+LPF_TAPS(0.000000000000000000),\r\n+};\r\ndiff --git a/core/sound/blip_lpf_384K_48K.h b/core/sound/blip_lpf_384K_48K.h\nnew file mode 100644\nindex 000000000..5f729dd72\n--- /dev/null\n+++ b/core/sound/blip_lpf_384K_48K.h\n@@ -0,0 +1,591 @@\n+static buf_t const blip_lpf_384K_48K[blip_lpf_384K_taps] = {\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000006503202820),\r\n+LPF_TAPS(-0.000000005849842015),\r\n+LPF_TAPS(-0.000000078233669747),\r\n+LPF_TAPS(-0.000000180208454089),\r\n+LPF_TAPS(-0.000000193635170079),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000382546880181),\r\n+LPF_TAPS(0.000000732358468462),\r\n+LPF_TAPS(0.000000721055467933),\r\n+LPF_TAPS(0.000000150959369216),\r\n+LPF_TAPS(-0.000000818712590339),\r\n+LPF_TAPS(-0.000001647964114635),\r\n+LPF_TAPS(-0.000001682261877696),\r\n+LPF_TAPS(-0.000000597409809747),\r\n+LPF_TAPS(0.000001255026676517),\r\n+LPF_TAPS(0.000002882338204170),\r\n+LPF_TAPS(0.000003145434327730),\r\n+LPF_TAPS(0.000001489001552458),\r\n+LPF_TAPS(-0.000001534929736759),\r\n+LPF_TAPS(-0.000004352904447252),\r\n+LPF_TAPS(-0.000005147636573837),\r\n+LPF_TAPS(-0.000002967793127511),\r\n+LPF_TAPS(0.000001481210903335),\r\n+LPF_TAPS(0.000005938361755751),\r\n+LPF_TAPS(0.000007689232639407),\r\n+LPF_TAPS(0.000005160811439416),\r\n+LPF_TAPS(-0.000000901303542104),\r\n+LPF_TAPS(-0.000007478867784236),\r\n+LPF_TAPS(-0.000010728673861079),\r\n+LPF_TAPS(-0.000008172089385626),\r\n+LPF_TAPS(-0.000000406244457850),\r\n+LPF_TAPS(0.000008777431582245),\r\n+LPF_TAPS(0.000014177858864022),\r\n+LPF_TAPS(0.000012074286006310),\r\n+LPF_TAPS(0.000002644067905706),\r\n+LPF_TAPS(-0.000009602717782315),\r\n+LPF_TAPS(-0.000017898314581276),\r\n+LPF_TAPS(-0.000016900051592227),\r\n+LPF_TAPS(-0.000006007031232565),\r\n+LPF_TAPS(0.000009693463809528),\r\n+LPF_TAPS(0.000021698487437919),\r\n+LPF_TAPS(0.000022633364277399),\r\n+LPF_TAPS(0.000010672062517435),\r\n+LPF_TAPS(-0.000008764694485172),\r\n+LPF_TAPS(-0.000025332465809854),\r\n+LPF_TAPS(-0.000029201131738919),\r\n+LPF_TAPS(-0.000016786881125153),\r\n+LPF_TAPS(0.000006515883207812),\r\n+LPF_TAPS(0.000028500473714422),\r\n+LPF_TAPS(0.000036465417422531),\r\n+LPF_TAPS(0.000024457806196456),\r\n+LPF_TAPS(-0.000002641154683653),\r\n+LPF_TAPS(-0.000030851477633416),\r\n+LPF_TAPS(-0.000044216710488163),\r\n+LPF_TAPS(-0.000033736922293091),\r\n+LPF_TAPS(-0.000003158448914863),\r\n+LPF_TAPS(0.000031988230255699),\r\n+LPF_TAPS(0.000052168707516273),\r\n+LPF_TAPS(0.000044608971706441),\r\n+LPF_TAPS(0.000011160707151486),\r\n+LPF_TAPS(-0.000031475034442276),\r\n+LPF_TAPS(-0.000059955107102222),\r\n+LPF_TAPS(-0.000056978435359620),\r\n+LPF_TAPS(-0.000021606140428787),\r\n+LPF_TAPS(0.000028848446583500),\r\n+LPF_TAPS(0.000067128931311735),\r\n+LPF_TAPS(0.000070657350418120),\r\n+LPF_TAPS(0.000034680400720536),\r\n+LPF_TAPS(-0.000023631050649621),\r\n+LPF_TAPS(-0.000073164876720327),\r\n+LPF_TAPS(-0.000085354486947704),\r\n+LPF_TAPS(-0.000050495549607254),\r\n+LPF_TAPS(0.000015348323840559),\r\n+LPF_TAPS(0.000077465159439725),\r\n+LPF_TAPS(0.000100666562503584),\r\n+LPF_TAPS(0.000069070764414392),\r\n+LPF_TAPS(-0.000003548484364012),\r\n+LPF_TAPS(-0.000079369251281705),\r\n+LPF_TAPS(-0.000116072206993584),\r\n+LPF_TAPS(-0.000090313133322722),\r\n+LPF_TAPS(-0.000012174934625460),\r\n+LPF_TAPS(0.000078167807459032),\r\n+LPF_TAPS(0.000130929395731458),\r\n+LPF_TAPS(0.000113999308692182),\r\n+LPF_TAPS(0.000032158198421559),\r\n+LPF_TAPS(-0.000073120960840263),\r\n+LPF_TAPS(-0.000144477042387634),\r\n+LPF_TAPS(-0.000139758877768490),\r\n+LPF_TAPS(-0.000056640747389047),\r\n+LPF_TAPS(0.000063481006130816),\r\n+LPF_TAPS(0.000155841382823267),\r\n+LPF_TAPS(0.000167060374901225),\r\n+LPF_TAPS(0.000085737572960195),\r\n+LPF_TAPS(-0.000048519323325795),\r\n+LPF_TAPS(-0.000164047684222058),\r\n+LPF_TAPS(-0.000195200893423035),\r\n+LPF_TAPS(-0.000119411479655871),\r\n+LPF_TAPS(0.000027557198691092),\r\n+LPF_TAPS(0.000168037681742167),\r\n+LPF_TAPS(0.000223300253335332),\r\n+LPF_TAPS(0.000157446252670375),\r\n+LPF_TAPS(-0.000000000000000003),\r\n+LPF_TAPS(-0.000166692979005046),\r\n+LPF_TAPS(-0.000250300639021611),\r\n+LPF_TAPS(-0.000199421858038953),\r\n+LPF_TAPS(-0.000034626041501284),\r\n+LPF_TAPS(0.000158864452745100),\r\n+LPF_TAPS(0.000274972536933227),\r\n+LPF_TAPS(0.000244692877132379),\r\n+LPF_TAPS(0.000076635388368275),\r\n+LPF_TAPS(-0.000143407481172504),\r\n+LPF_TAPS(-0.000295927675818274),\r\n+LPF_TAPS(-0.000292371412661462),\r\n+LPF_TAPS(-0.000126144223038756),\r\n+LPF_TAPS(0.000119222576930763),\r\n+LPF_TAPS(0.000311639502691372),\r\n+LPF_TAPS(0.000341315694158472),\r\n+LPF_TAPS(0.000183032231873393),\r\n+LPF_TAPS(-0.000085300757219496),\r\n+LPF_TAPS(-0.000320471519403484),\r\n+LPF_TAPS(-0.000390125553156118),\r\n+LPF_TAPS(-0.000246906562990679),\r\n+LPF_TAPS(0.000040772735080986),\r\n+LPF_TAPS(0.000320713562342054),\r\n+LPF_TAPS(0.000437145829897804),\r\n+LPF_TAPS(0.000317069459270137),\r\n+LPF_TAPS(0.000015039222807827),\r\n+LPF_TAPS(-0.000310625838317288),\r\n+LPF_TAPS(-0.000480478614259649),\r\n+LPF_TAPS(-0.000392491105131392),\r\n+LPF_TAPS(-0.000082568144639632),\r\n+LPF_TAPS(0.000288490241628356),\r\n+LPF_TAPS(0.000518005015648909),\r\n+LPF_TAPS(0.000471789208898184),\r\n+LPF_TAPS(0.000161949468098235),\r\n+LPF_TAPS(-0.000252668180692344),\r\n+LPF_TAPS(-0.000547416904163501),\r\n+LPF_TAPS(-0.000553216767771218),\r\n+LPF_TAPS(-0.000252970126618144),\r\n+LPF_TAPS(0.000201663848670586),\r\n+LPF_TAPS(0.000566258774624573),\r\n+LPF_TAPS(0.000634659327754457),\r\n+LPF_TAPS(0.000355021407836447),\r\n+LPF_TAPS(-0.000134191593268466),\r\n+LPF_TAPS(-0.000571979564666246),\r\n+LPF_TAPS(-0.000713642856649047),\r\n+LPF_TAPS(-0.000467057421066836),\r\n+LPF_TAPS(0.000049245788747453),\r\n+LPF_TAPS(0.000561993918193049),\r\n+LPF_TAPS(0.000787353097159156),\r\n+LPF_TAPS(0.000587560981677088),\r\n+LPF_TAPS(0.000053828599419581),\r\n+LPF_TAPS(-0.000533752038109352),\r\n+LPF_TAPS(-0.000852666964353335),\r\n+LPF_TAPS(-0.000714518621550615),\r\n+LPF_TAPS(-0.000175266727942945),\r\n+LPF_TAPS(0.000484816930467727),\r\n+LPF_TAPS(0.000906196204630836),\r\n+LPF_TAPS(0.000845406263993468),\r\n+LPF_TAPS(0.000314817936404181),\r\n+LPF_TAPS(-0.000412947520140350),\r\n+LPF_TAPS(-0.000944343151550742),\r\n+LPF_TAPS(-0.000977186858435632),\r\n+LPF_TAPS(-0.000471685250588915),\r\n+LPF_TAPS(0.000316185830334019),\r\n+LPF_TAPS(0.000963368008888017),\r\n+LPF_TAPS(0.001106320957296740),\r\n+LPF_TAPS(0.000644472369103502),\r\n+LPF_TAPS(-0.000192946179359307),\r\n+LPF_TAPS(-0.000959466676126703),\r\n+LPF_TAPS(-0.001228790838834765),\r\n+LPF_TAPS(-0.000831140031646361),\r\n+LPF_TAPS(0.000042104172341939),\r\n+LPF_TAPS(0.000928857720449613),\r\n+LPF_TAPS(0.001340138341942271),\r\n+LPF_TAPS(0.001028973432376992),\r\n+LPF_TAPS(0.000136916833243533),\r\n+LPF_TAPS(-0.000867876706929601),\r\n+LPF_TAPS(-0.001435516089365050),\r\n+LPF_TAPS(-0.001234562010518128),\r\n+LPF_TAPS(-0.000344064118248697),\r\n+LPF_TAPS(0.000773075739959831),\r\n+LPF_TAPS(0.001509751243047028),\r\n+LPF_TAPS(0.001443792519769963),\r\n+LPF_TAPS(0.000578581085490012),\r\n+LPF_TAPS(-0.000641325758405910),\r\n+LPF_TAPS(-0.001557420367308325),\r\n+LPF_TAPS(-0.001651855745334937),\r\n+LPF_TAPS(-0.000838941865677717),\r\n+LPF_TAPS(0.000469918877920107),\r\n+LPF_TAPS(0.001572933378730220),\r\n+LPF_TAPS(0.001853266597735595),\r\n+LPF_TAPS(0.001122796740918288),\r\n+LPF_TAPS(-0.000256667898155195),\r\n+LPF_TAPS(-0.001550623938785613),\r\n+LPF_TAPS(-0.002041896557519943),\r\n+LPF_TAPS(-0.001426929605946781),\r\n+LPF_TAPS(0.000000000000000014),\r\n+LPF_TAPS(0.001484842993021157),\r\n+LPF_TAPS(0.002211016558072698),\r\n+LPF_TAPS(0.001747228052000544),\r\n+LPF_TAPS(0.000300958344334903),\r\n+LPF_TAPS(-0.001370051465454246),\r\n+LPF_TAPS(-0.002353347345416942),\r\n+LPF_TAPS(-0.002078665835068547),\r\n+LPF_TAPS(-0.000646308133182089),\r\n+LPF_TAPS(0.001200907349311346),\r\n+LPF_TAPS(0.002461113092179670),\r\n+LPF_TAPS(0.002415296435696646),\r\n+LPF_TAPS(0.001035318965793742),\r\n+LPF_TAPS(-0.000972341540733622),\r\n+LPF_TAPS(-0.002526092479366909),\r\n+LPF_TAPS(-0.002750255061253166),\r\n+LPF_TAPS(-0.001466386955787689),\r\n+LPF_TAPS(0.000679615646265460),\r\n+LPF_TAPS(0.002539659445857668),\r\n+LPF_TAPS(0.003075764667526174),\r\n+LPF_TAPS(0.001937011471890712),\r\n+LPF_TAPS(-0.000318353499249274),\r\n+LPF_TAPS(-0.002492803093762833),\r\n+LPF_TAPS(-0.003383139191049453),\r\n+LPF_TAPS(-0.002443792300250093),\r\n+LPF_TAPS(-0.000115464020033783),\r\n+LPF_TAPS(0.002376112412446640),\r\n+LPF_TAPS(0.003662773859520006),\r\n+LPF_TAPS(0.002982448304723403),\r\n+LPF_TAPS(0.000625554495446453),\r\n+LPF_TAPS(-0.002179705840164981),\r\n+LPF_TAPS(-0.003904107624531098),\r\n+LPF_TAPS(-0.003547858090245656),\r\n+LPF_TAPS(-0.001215458531635024),\r\n+LPF_TAPS(0.001893077002631478),\r\n+LPF_TAPS(0.004095535459895290),\r\n+LPF_TAPS(0.004134122566326785),\r\n+LPF_TAPS(0.001888760328101881),\r\n+LPF_TAPS(-0.001504814100223794),\r\n+LPF_TAPS(-0.004224236740519411),\r\n+LPF_TAPS(-0.004734648681415416),\r\n+LPF_TAPS(-0.002649445068584514),\r\n+LPF_TAPS(0.001002127444257027),\r\n+LPF_TAPS(0.004275866942694263),\r\n+LPF_TAPS(0.005342252973877862),\r\n+LPF_TAPS(0.003502457765705811),\r\n+LPF_TAPS(-0.000370080198385793),\r\n+LPF_TAPS(-0.004234027361415646),\r\n+LPF_TAPS(-0.005949282981757201),\r\n+LPF_TAPS(-0.004454570661594240),\r\n+LPF_TAPS(-0.000409652959545898),\r\n+LPF_TAPS(0.004079369292625890),\r\n+LPF_TAPS(0.006547753991151824),\r\n+LPF_TAPS(0.005515744756444054),\r\n+LPF_TAPS(0.001360805311569260),\r\n+LPF_TAPS(-0.003788080011994879),\r\n+LPF_TAPS(-0.007129498100924165),\r\n+LPF_TAPS(-0.006701322514199400),\r\n+LPF_TAPS(-0.002515876697475453),\r\n+LPF_TAPS(0.003329282790038720),\r\n+LPF_TAPS(0.007686322156860501),\r\n+LPF_TAPS(0.008035696758406874),\r\n+LPF_TAPS(0.003921917508260477),\r\n+LPF_TAPS(-0.002660433522403174),\r\n+LPF_TAPS(-0.008210170776467280),\r\n+LPF_TAPS(-0.009558767162523707),\r\n+LPF_TAPS(-0.005650980574808982),\r\n+LPF_TAPS(0.001718788616915996),\r\n+LPF_TAPS(0.008693290458632130),\r\n+LPF_TAPS(0.011338051552494286),\r\n+LPF_TAPS(0.007820241423214368),\r\n+LPF_TAPS(-0.000404559134412800),\r\n+LPF_TAPS(-0.009128390659463513),\r\n+LPF_TAPS(-0.013493311245838014),\r\n+LPF_TAPS(-0.010634059447887700),\r\n+LPF_TAPS(-0.001455310544204177),\r\n+LPF_TAPS(0.009508797722194937),\r\n+LPF_TAPS(0.016252106569250600),\r\n+LPF_TAPS(0.014482070170325378),\r\n+LPF_TAPS(0.004194617841823830),\r\n+LPF_TAPS(-0.009828597676686424),\r\n+LPF_TAPS(-0.020093993429713325),\r\n+LPF_TAPS(-0.020205320615819689),\r\n+LPF_TAPS(-0.008556973225887702),\r\n+LPF_TAPS(0.010082764170405253),\r\n+LPF_TAPS(0.026208968816161637),\r\n+LPF_TAPS(0.030000902894892705),\r\n+LPF_TAPS(0.016609132395323946),\r\n+LPF_TAPS(-0.010267268151539673),\r\n+LPF_TAPS(-0.038527141888178663),\r\n+LPF_TAPS(-0.051944646349938214),\r\n+LPF_TAPS(-0.037038303614902512),\r\n+LPF_TAPS(0.010379166386061156),\r\n+LPF_TAPS(0.081984403352501831),\r\n+LPF_TAPS(0.158784439342286088),\r\n+LPF_TAPS(0.217583996578812361),\r\n+LPF_TAPS(0.239583328135104134),\r\n+LPF_TAPS(0.217583996578812361),\r\n+LPF_TAPS(0.158784439342286116),\r\n+LPF_TAPS(0.081984403352501831),\r\n+LPF_TAPS(0.010379166386061156),\r\n+LPF_TAPS(-0.037038303614902512),\r\n+LPF_TAPS(-0.051944646349938214),\r\n+LPF_TAPS(-0.038527141888178663),\r\n+LPF_TAPS(-0.010267268151539673),\r\n+LPF_TAPS(0.016609132395323946),\r\n+LPF_TAPS(0.030000902894892705),\r\n+LPF_TAPS(0.026208968816161634),\r\n+LPF_TAPS(0.010082764170405253),\r\n+LPF_TAPS(-0.008556973225887702),\r\n+LPF_TAPS(-0.020205320615819689),\r\n+LPF_TAPS(-0.020093993429713325),\r\n+LPF_TAPS(-0.009828597676686424),\r\n+LPF_TAPS(0.004194617841823830),\r\n+LPF_TAPS(0.014482070170325380),\r\n+LPF_TAPS(0.016252106569250604),\r\n+LPF_TAPS(0.009508797722194940),\r\n+LPF_TAPS(-0.001455310544204177),\r\n+LPF_TAPS(-0.010634059447887700),\r\n+LPF_TAPS(-0.013493311245838014),\r\n+LPF_TAPS(-0.009128390659463513),\r\n+LPF_TAPS(-0.000404559134412800),\r\n+LPF_TAPS(0.007820241423214368),\r\n+LPF_TAPS(0.011338051552494290),\r\n+LPF_TAPS(0.008693290458632130),\r\n+LPF_TAPS(0.001718788616915996),\r\n+LPF_TAPS(-0.005650980574808982),\r\n+LPF_TAPS(-0.009558767162523707),\r\n+LPF_TAPS(-0.008210170776467280),\r\n+LPF_TAPS(-0.002660433522403174),\r\n+LPF_TAPS(0.003921917508260478),\r\n+LPF_TAPS(0.008035696758406876),\r\n+LPF_TAPS(0.007686322156860502),\r\n+LPF_TAPS(0.003329282790038720),\r\n+LPF_TAPS(-0.002515876697475453),\r\n+LPF_TAPS(-0.006701322514199401),\r\n+LPF_TAPS(-0.007129498100924165),\r\n+LPF_TAPS(-0.003788080011994879),\r\n+LPF_TAPS(0.001360805311569260),\r\n+LPF_TAPS(0.005515744756444054),\r\n+LPF_TAPS(0.006547753991151825),\r\n+LPF_TAPS(0.004079369292625891),\r\n+LPF_TAPS(-0.000409652959545898),\r\n+LPF_TAPS(-0.004454570661594242),\r\n+LPF_TAPS(-0.005949282981757201),\r\n+LPF_TAPS(-0.004234027361415646),\r\n+LPF_TAPS(-0.000370080198385794),\r\n+LPF_TAPS(0.003502457765705811),\r\n+LPF_TAPS(0.005342252973877865),\r\n+LPF_TAPS(0.004275866942694263),\r\n+LPF_TAPS(0.001002127444257027),\r\n+LPF_TAPS(-0.002649445068584514),\r\n+LPF_TAPS(-0.004734648681415419),\r\n+LPF_TAPS(-0.004224236740519412),\r\n+LPF_TAPS(-0.001504814100223794),\r\n+LPF_TAPS(0.001888760328101881),\r\n+LPF_TAPS(0.004134122566326786),\r\n+LPF_TAPS(0.004095535459895291),\r\n+LPF_TAPS(0.001893077002631478),\r\n+LPF_TAPS(-0.001215458531635024),\r\n+LPF_TAPS(-0.003547858090245656),\r\n+LPF_TAPS(-0.003904107624531100),\r\n+LPF_TAPS(-0.002179705840164981),\r\n+LPF_TAPS(0.000625554495446453),\r\n+LPF_TAPS(0.002982448304723404),\r\n+LPF_TAPS(0.003662773859520006),\r\n+LPF_TAPS(0.002376112412446641),\r\n+LPF_TAPS(-0.000115464020033783),\r\n+LPF_TAPS(-0.002443792300250093),\r\n+LPF_TAPS(-0.003383139191049452),\r\n+LPF_TAPS(-0.002492803093762834),\r\n+LPF_TAPS(-0.000318353499249274),\r\n+LPF_TAPS(0.001937011471890712),\r\n+LPF_TAPS(0.003075764667526174),\r\n+LPF_TAPS(0.002539659445857669),\r\n+LPF_TAPS(0.000679615646265460),\r\n+LPF_TAPS(-0.001466386955787688),\r\n+LPF_TAPS(-0.002750255061253167),\r\n+LPF_TAPS(-0.002526092479366907),\r\n+LPF_TAPS(-0.000972341540733622),\r\n+LPF_TAPS(0.001035318965793743),\r\n+LPF_TAPS(0.002415296435696647),\r\n+LPF_TAPS(0.002461113092179670),\r\n+LPF_TAPS(0.001200907349311347),\r\n+LPF_TAPS(-0.000646308133182089),\r\n+LPF_TAPS(-0.002078665835068547),\r\n+LPF_TAPS(-0.002353347345416943),\r\n+LPF_TAPS(-0.001370051465454246),\r\n+LPF_TAPS(0.000300958344334903),\r\n+LPF_TAPS(0.001747228052000543),\r\n+LPF_TAPS(0.002211016558072697),\r\n+LPF_TAPS(0.001484842993021157),\r\n+LPF_TAPS(0.000000000000000014),\r\n+LPF_TAPS(-0.001426929605946781),\r\n+LPF_TAPS(-0.002041896557519943),\r\n+LPF_TAPS(-0.001550623938785614),\r\n+LPF_TAPS(-0.000256667898155195),\r\n+LPF_TAPS(0.001122796740918289),\r\n+LPF_TAPS(0.001853266597735596),\r\n+LPF_TAPS(0.001572933378730221),\r\n+LPF_TAPS(0.000469918877920107),\r\n+LPF_TAPS(-0.000838941865677717),\r\n+LPF_TAPS(-0.001651855745334936),\r\n+LPF_TAPS(-0.001557420367308325),\r\n+LPF_TAPS(-0.000641325758405911),\r\n+LPF_TAPS(0.000578581085490013),\r\n+LPF_TAPS(0.001443792519769964),\r\n+LPF_TAPS(0.001509751243047029),\r\n+LPF_TAPS(0.000773075739959831),\r\n+LPF_TAPS(-0.000344064118248697),\r\n+LPF_TAPS(-0.001234562010518129),\r\n+LPF_TAPS(-0.001435516089365050),\r\n+LPF_TAPS(-0.000867876706929602),\r\n+LPF_TAPS(0.000136916833243533),\r\n+LPF_TAPS(0.001028973432376992),\r\n+LPF_TAPS(0.001340138341942272),\r\n+LPF_TAPS(0.000928857720449614),\r\n+LPF_TAPS(0.000042104172341939),\r\n+LPF_TAPS(-0.000831140031646360),\r\n+LPF_TAPS(-0.001228790838834765),\r\n+LPF_TAPS(-0.000959466676126702),\r\n+LPF_TAPS(-0.000192946179359307),\r\n+LPF_TAPS(0.000644472369103502),\r\n+LPF_TAPS(0.001106320957296741),\r\n+LPF_TAPS(0.000963368008888017),\r\n+LPF_TAPS(0.000316185830334019),\r\n+LPF_TAPS(-0.000471685250588915),\r\n+LPF_TAPS(-0.000977186858435632),\r\n+LPF_TAPS(-0.000944343151550742),\r\n+LPF_TAPS(-0.000412947520140350),\r\n+LPF_TAPS(0.000314817936404181),\r\n+LPF_TAPS(0.000845406263993468),\r\n+LPF_TAPS(0.000906196204630836),\r\n+LPF_TAPS(0.000484816930467727),\r\n+LPF_TAPS(-0.000175266727942945),\r\n+LPF_TAPS(-0.000714518621550615),\r\n+LPF_TAPS(-0.000852666964353335),\r\n+LPF_TAPS(-0.000533752038109352),\r\n+LPF_TAPS(0.000053828599419581),\r\n+LPF_TAPS(0.000587560981677089),\r\n+LPF_TAPS(0.000787353097159157),\r\n+LPF_TAPS(0.000561993918193049),\r\n+LPF_TAPS(0.000049245788747453),\r\n+LPF_TAPS(-0.000467057421066836),\r\n+LPF_TAPS(-0.000713642856649046),\r\n+LPF_TAPS(-0.000571979564666246),\r\n+LPF_TAPS(-0.000134191593268466),\r\n+LPF_TAPS(0.000355021407836447),\r\n+LPF_TAPS(0.000634659327754457),\r\n+LPF_TAPS(0.000566258774624574),\r\n+LPF_TAPS(0.000201663848670586),\r\n+LPF_TAPS(-0.000252970126618144),\r\n+LPF_TAPS(-0.000553216767771218),\r\n+LPF_TAPS(-0.000547416904163501),\r\n+LPF_TAPS(-0.000252668180692344),\r\n+LPF_TAPS(0.000161949468098235),\r\n+LPF_TAPS(0.000471789208898184),\r\n+LPF_TAPS(0.000518005015648910),\r\n+LPF_TAPS(0.000288490241628357),\r\n+LPF_TAPS(-0.000082568144639632),\r\n+LPF_TAPS(-0.000392491105131393),\r\n+LPF_TAPS(-0.000480478614259649),\r\n+LPF_TAPS(-0.000310625838317288),\r\n+LPF_TAPS(0.000015039222807827),\r\n+LPF_TAPS(0.000317069459270137),\r\n+LPF_TAPS(0.000437145829897804),\r\n+LPF_TAPS(0.000320713562342054),\r\n+LPF_TAPS(0.000040772735080986),\r\n+LPF_TAPS(-0.000246906562990679),\r\n+LPF_TAPS(-0.000390125553156118),\r\n+LPF_TAPS(-0.000320471519403484),\r\n+LPF_TAPS(-0.000085300757219496),\r\n+LPF_TAPS(0.000183032231873393),\r\n+LPF_TAPS(0.000341315694158471),\r\n+LPF_TAPS(0.000311639502691372),\r\n+LPF_TAPS(0.000119222576930763),\r\n+LPF_TAPS(-0.000126144223038757),\r\n+LPF_TAPS(-0.000292371412661462),\r\n+LPF_TAPS(-0.000295927675818274),\r\n+LPF_TAPS(-0.000143407481172504),\r\n+LPF_TAPS(0.000076635388368275),\r\n+LPF_TAPS(0.000244692877132379),\r\n+LPF_TAPS(0.000274972536933228),\r\n+LPF_TAPS(0.000158864452745100),\r\n+LPF_TAPS(-0.000034626041501284),\r\n+LPF_TAPS(-0.000199421858038954),\r\n+LPF_TAPS(-0.000250300639021611),\r\n+LPF_TAPS(-0.000166692979005046),\r\n+LPF_TAPS(-0.000000000000000003),\r\n+LPF_TAPS(0.000157446252670375),\r\n+LPF_TAPS(0.000223300253335332),\r\n+LPF_TAPS(0.000168037681742168),\r\n+LPF_TAPS(0.000027557198691092),\r\n+LPF_TAPS(-0.000119411479655871),\r\n+LPF_TAPS(-0.000195200893423036),\r\n+LPF_TAPS(-0.000164047684222058),\r\n+LPF_TAPS(-0.000048519323325795),\r\n+LPF_TAPS(0.000085737572960195),\r\n+LPF_TAPS(0.000167060374901225),\r\n+LPF_TAPS(0.000155841382823267),\r\n+LPF_TAPS(0.000063481006130817),\r\n+LPF_TAPS(-0.000056640747389047),\r\n+LPF_TAPS(-0.000139758877768490),\r\n+LPF_TAPS(-0.000144477042387634),\r\n+LPF_TAPS(-0.000073120960840263),\r\n+LPF_TAPS(0.000032158198421559),\r\n+LPF_TAPS(0.000113999308692182),\r\n+LPF_TAPS(0.000130929395731458),\r\n+LPF_TAPS(0.000078167807459032),\r\n+LPF_TAPS(-0.000012174934625460),\r\n+LPF_TAPS(-0.000090313133322722),\r\n+LPF_TAPS(-0.000116072206993584),\r\n+LPF_TAPS(-0.000079369251281705),\r\n+LPF_TAPS(-0.000003548484364012),\r\n+LPF_TAPS(0.000069070764414392),\r\n+LPF_TAPS(0.000100666562503584),\r\n+LPF_TAPS(0.000077465159439725),\r\n+LPF_TAPS(0.000015348323840559),\r\n+LPF_TAPS(-0.000050495549607254),\r\n+LPF_TAPS(-0.000085354486947704),\r\n+LPF_TAPS(-0.000073164876720327),\r\n+LPF_TAPS(-0.000023631050649621),\r\n+LPF_TAPS(0.000034680400720536),\r\n+LPF_TAPS(0.000070657350418119),\r\n+LPF_TAPS(0.000067128931311735),\r\n+LPF_TAPS(0.000028848446583500),\r\n+LPF_TAPS(-0.000021606140428787),\r\n+LPF_TAPS(-0.000056978435359620),\r\n+LPF_TAPS(-0.000059955107102221),\r\n+LPF_TAPS(-0.000031475034442276),\r\n+LPF_TAPS(0.000011160707151486),\r\n+LPF_TAPS(0.000044608971706442),\r\n+LPF_TAPS(0.000052168707516273),\r\n+LPF_TAPS(0.000031988230255699),\r\n+LPF_TAPS(-0.000003158448914863),\r\n+LPF_TAPS(-0.000033736922293091),\r\n+LPF_TAPS(-0.000044216710488163),\r\n+LPF_TAPS(-0.000030851477633416),\r\n+LPF_TAPS(-0.000002641154683653),\r\n+LPF_TAPS(0.000024457806196456),\r\n+LPF_TAPS(0.000036465417422531),\r\n+LPF_TAPS(0.000028500473714422),\r\n+LPF_TAPS(0.000006515883207812),\r\n+LPF_TAPS(-0.000016786881125153),\r\n+LPF_TAPS(-0.000029201131738919),\r\n+LPF_TAPS(-0.000025332465809854),\r\n+LPF_TAPS(-0.000008764694485172),\r\n+LPF_TAPS(0.000010672062517435),\r\n+LPF_TAPS(0.000022633364277399),\r\n+LPF_TAPS(0.000021698487437919),\r\n+LPF_TAPS(0.000009693463809528),\r\n+LPF_TAPS(-0.000006007031232565),\r\n+LPF_TAPS(-0.000016900051592227),\r\n+LPF_TAPS(-0.000017898314581276),\r\n+LPF_TAPS(-0.000009602717782315),\r\n+LPF_TAPS(0.000002644067905706),\r\n+LPF_TAPS(0.000012074286006310),\r\n+LPF_TAPS(0.000014177858864022),\r\n+LPF_TAPS(0.000008777431582245),\r\n+LPF_TAPS(-0.000000406244457850),\r\n+LPF_TAPS(-0.000008172089385626),\r\n+LPF_TAPS(-0.000010728673861079),\r\n+LPF_TAPS(-0.000007478867784236),\r\n+LPF_TAPS(-0.000000901303542104),\r\n+LPF_TAPS(0.000005160811439416),\r\n+LPF_TAPS(0.000007689232639407),\r\n+LPF_TAPS(0.000005938361755751),\r\n+LPF_TAPS(0.000001481210903335),\r\n+LPF_TAPS(-0.000002967793127511),\r\n+LPF_TAPS(-0.000005147636573837),\r\n+LPF_TAPS(-0.000004352904447252),\r\n+LPF_TAPS(-0.000001534929736759),\r\n+LPF_TAPS(0.000001489001552458),\r\n+LPF_TAPS(0.000003145434327730),\r\n+LPF_TAPS(0.000002882338204170),\r\n+LPF_TAPS(0.000001255026676517),\r\n+LPF_TAPS(-0.000000597409809747),\r\n+LPF_TAPS(-0.000001682261877696),\r\n+LPF_TAPS(-0.000001647964114635),\r\n+LPF_TAPS(-0.000000818712590339),\r\n+LPF_TAPS(0.000000150959369216),\r\n+LPF_TAPS(0.000000721055467933),\r\n+LPF_TAPS(0.000000732358468462),\r\n+LPF_TAPS(0.000000382546880181),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000193635170079),\r\n+LPF_TAPS(-0.000000180208454089),\r\n+LPF_TAPS(-0.000000078233669747),\r\n+LPF_TAPS(-0.000000005849842015),\r\n+LPF_TAPS(0.000000006503202820),\r\n+LPF_TAPS(0.000000000000000000),\r\n+};\r\ndiff --git a/core/sound/blip_lpf_384K_96K.h b/core/sound/blip_lpf_384K_96K.h\nnew file mode 100644\nindex 000000000..7bce8e95a\n--- /dev/null\n+++ b/core/sound/blip_lpf_384K_96K.h\n@@ -0,0 +1,591 @@\n+static buf_t const blip_lpf_384K_96K[blip_lpf_384K_taps] = {\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000011015600767),\r\n+LPF_TAPS(0.000000005849842074),\r\n+LPF_TAPS(0.000000100719147701),\r\n+LPF_TAPS(-0.000000011811486228),\r\n+LPF_TAPS(-0.000000283109532916),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000559313003533),\r\n+LPF_TAPS(0.000000048001310528),\r\n+LPF_TAPS(-0.000000928297143806),\r\n+LPF_TAPS(-0.000000150959370735),\r\n+LPF_TAPS(0.000001386795289539),\r\n+LPF_TAPS(0.000000327800446696),\r\n+LPF_TAPS(-0.000001929241549214),\r\n+LPF_TAPS(-0.000000597409815756),\r\n+LPF_TAPS(0.000002547717384186),\r\n+LPF_TAPS(0.000000978421988732),\r\n+LPF_TAPS(-0.000003231910828620),\r\n+LPF_TAPS(-0.000001489001567436),\r\n+LPF_TAPS(0.000003969089552504),\r\n+LPF_TAPS(0.000002146614939706),\r\n+LPF_TAPS(-0.000004744089084507),\r\n+LPF_TAPS(-0.000002967793157365),\r\n+LPF_TAPS(0.000005539317611880),\r\n+LPF_TAPS(0.000003967886509344),\r\n+LPF_TAPS(-0.000006334778858395),\r\n+LPF_TAPS(-0.000005160811491329),\r\n+LPF_TAPS(0.000007108114604907),\r\n+LPF_TAPS(0.000006558791082586),\r\n+LPF_TAPS(-0.000007834668457273),\r\n+LPF_TAPS(-0.000008172089467830),\r\n+LPF_TAPS(0.000008487572479706),\r\n+LPF_TAPS(0.000010008742584247),\r\n+LPF_TAPS(-0.000009037858295623),\r\n+LPF_TAPS(-0.000012074286127767),\r\n+LPF_TAPS(0.000009454594209865),\r\n+LPF_TAPS(0.000014371482914828),\r\n+LPF_TAPS(-0.000009705049823939),\r\n+LPF_TAPS(-0.000016900051762228),\r\n+LPF_TAPS(0.000009754889497821),\r\n+LPF_TAPS(0.000019656400313892),\r\n+LPF_TAPS(-0.000009568395856687),\r\n+LPF_TAPS(-0.000022633364505072),\r\n+LPF_TAPS(0.000009108724348073),\r\n+LPF_TAPS(0.000025819957606911),\r\n+LPF_TAPS(-0.000008338189624081),\r\n+LPF_TAPS(-0.000029201132032658),\r\n+LPF_TAPS(0.000007218584254945),\r\n+LPF_TAPS(0.000032757557306227),\r\n+LPF_TAPS(-0.000005711529975318),\r\n+LPF_TAPS(-0.000036465417789344),\r\n+LPF_TAPS(0.000003778861324781),\r\n+LPF_TAPS(0.000040296233930550),\r\n+LPF_TAPS(-0.000001383041171332),\r\n+LPF_TAPS(-0.000044216710932948),\r\n+LPF_TAPS(-0.000001512392796211),\r\n+LPF_TAPS(0.000048188618833547),\r\n+LPF_TAPS(0.000004942351950558),\r\n+LPF_TAPS(-0.000052168708041048),\r\n+LPF_TAPS(-0.000008939692779225),\r\n+LPF_TAPS(0.000056108664387130),\r\n+LPF_TAPS(0.000013534687376105),\r\n+LPF_TAPS(-0.000059955107705322),\r\n+LPF_TAPS(-0.000018754471123261),\r\n+LPF_TAPS(0.000063649637858348),\r\n+LPF_TAPS(0.000024622470808229),\r\n+LPF_TAPS(-0.000067128931986998),\r\n+LPF_TAPS(-0.000031157816917856),\r\n+LPF_TAPS(0.000070324896549265),\r\n+LPF_TAPS(0.000038374744342056),\r\n+LPF_TAPS(-0.000073164877456309),\r\n+LPF_TAPS(-0.000046281986203924),\r\n+LPF_TAPS(0.000075571931291371),\r\n+LPF_TAPS(0.000054882165999193),\r\n+LPF_TAPS(-0.000077465160218964),\r\n+LPF_TAPS(-0.000064171193671817),\r\n+LPF_TAPS(0.000078760112755455),\r\n+LPF_TAPS(0.000074137671667086),\r\n+LPF_TAPS(-0.000079369252080098),\r\n+LPF_TAPS(-0.000084762317381802),\r\n+LPF_TAPS(0.000079202493019870),\r\n+LPF_TAPS(0.000096017408766624),\r\n+LPF_TAPS(-0.000078167808245341),\r\n+LPF_TAPS(-0.000107866260122152),\r\n+LPF_TAPS(0.000076171903571917),\r\n+LPF_TAPS(0.000120262735361821),\r\n+LPF_TAPS(-0.000073120961575807),\r\n+LPF_TAPS(-0.000133150806184833),\r\n+LPF_TAPS(0.000068921452012099),\r\n+LPF_TAPS(0.000146464162706635),\r\n+LPF_TAPS(-0.000063481006769390),\r\n+LPF_TAPS(-0.000160125884127777),\r\n+LPF_TAPS(0.000056709356317991),\r\n+LPF_TAPS(0.000174048176979626),\r\n+LPF_TAPS(-0.000048519323813871),\r\n+LPF_TAPS(-0.000188132188364734),\r\n+LPF_TAPS(0.000038827872215975),\r\n+LPF_TAPS(0.000202267901407275),\r\n+LPF_TAPS(-0.000027557198968305),\r\n+LPF_TAPS(-0.000216334119842647),\r\n+LPF_TAPS(0.000014635871998353),\r\n+LPF_TAPS(0.000230198548304553),\r\n+LPF_TAPS(0.000000000000000002),\r\n+LPF_TAPS(-0.000243717974411615),\r\n+LPF_TAPS(-0.000016405570791358),\r\n+LPF_TAPS(0.000256738558214805),\r\n+LPF_TAPS(0.000034626041849581),\r\n+LPF_TAPS(-0.000269096233943092),\r\n+LPF_TAPS(-0.000054695438835973),\r\n+LPF_TAPS(0.000280617228280185),\r\n+LPF_TAPS(0.000076635389139154),\r\n+LPF_TAPS(-0.000291118698623548),\r\n+LPF_TAPS(-0.000100453910882524),\r\n+LPF_TAPS(0.000300409493922405),\r\n+LPF_TAPS(0.000126144224307666),\r\n+LPF_TAPS(-0.000308291039769518),\r\n+LPF_TAPS(-0.000153683596868854),\r\n+LPF_TAPS(0.000314558348438531),\r\n+LPF_TAPS(0.000183032233714526),\r\n+LPF_TAPS(-0.000319001153521583),\r\n+LPF_TAPS(-0.000214132225480944),\r\n+LPF_TAPS(0.000321405167739016),\r\n+LPF_TAPS(0.000246906565474358),\r\n+LPF_TAPS(-0.000321553461372830),\r\n+LPF_TAPS(-0.000281258248365758),\r\n+LPF_TAPS(0.000319227957627963),\r\n+LPF_TAPS(0.000317069462459603),\r\n+LPF_TAPS(-0.000314211040060395),\r\n+LPF_TAPS(-0.000354200887423921),\r\n+LPF_TAPS(0.000306287266039554),\r\n+LPF_TAPS(0.000392491109079526),\r\n+LPF_TAPS(-0.000295245179045763),\r\n+LPF_TAPS(-0.000431756162436877),\r\n+LPF_TAPS(0.000280879211452807),\r\n+LPF_TAPS(0.000471789213644001),\r\n+LPF_TAPS(-0.000262991668324403),\r\n+LPF_TAPS(-0.000512360390863583),\r\n+LPF_TAPS(0.000241394781671497),\r\n+LPF_TAPS(0.000553216773336134),\r\n+LPF_TAPS(-0.000215912823589380),\r\n+LPF_TAPS(-0.000594082547010641),\r\n+LPF_TAPS(0.000186384265730750),\r\n+LPF_TAPS(0.000634659334138613),\r\n+LPF_TAPS(-0.000152663971685384),\r\n+LPF_TAPS(-0.000674626703136016),\r\n+LPF_TAPS(0.000114625408040413),\r\n+LPF_TAPS(0.000713642863827721),\r\n+LPF_TAPS(-0.000072162859201040),\r\n+LPF_TAPS(-0.000751345551907282),\r\n+LPF_TAPS(0.000025193630468347),\r\n+LPF_TAPS(0.000787353105079299),\r\n+LPF_TAPS(0.000026339776589673),\r\n+LPF_TAPS(-0.000821265731912697),\r\n+LPF_TAPS(-0.000082467532763677),\r\n+LPF_TAPS(0.000852666972930490),\r\n+LPF_TAPS(0.000143190410299827),\r\n+LPF_TAPS(-0.000881125351906697),\r\n+LPF_TAPS(-0.000208477788977746),\r\n+LPF_TAPS(0.000906196213746451),\r\n+LPF_TAPS(0.000278265755551535),\r\n+LPF_TAPS(-0.000927423743702984),\r\n+LPF_TAPS(-0.000352455312647677),\r\n+LPF_TAPS(0.000944343161050078),\r\n+LPF_TAPS(0.000430910712749655),\r\n+LPF_TAPS(-0.000956483078692794),\r\n+LPF_TAPS(-0.000513457932258434),\r\n+LPF_TAPS(0.000963368018578731),\r\n+LPF_TAPS(0.000599883299797623),\r\n+LPF_TAPS(-0.000964521071181302),\r\n+LPF_TAPS(-0.000689932291924013),\r\n+LPF_TAPS(0.000959466685778196),\r\n+LPF_TAPS(0.000783308508207108),\r\n+LPF_TAPS(-0.000947733576760587),\r\n+LPF_TAPS(-0.000879672836255881),\r\n+LPF_TAPS(0.000928857729793189),\r\n+LPF_TAPS(0.000978642815687279),\r\n+LPF_TAPS(-0.000902385490316769),\r\n+LPF_TAPS(-0.001079792208254300),\r\n+LPF_TAPS(0.000867876715659763),\r\n+LPF_TAPS(0.001182650779375594),\r\n+LPF_TAPS(-0.000824907970912845),\r\n+LPF_TAPS(-0.001286704294128211),\r\n+LPF_TAPS(0.000773075747736378),\r\n+LPF_TAPS(0.001391394728381238),\r\n+LPF_TAPS(-0.000711999684424938),\r\n+LPF_TAPS(-0.001496120693149179),\r\n+LPF_TAPS(0.000641325764857145),\r\n+LPF_TAPS(0.001600238067424449),\r\n+LPF_TAPS(-0.000560729473422399),\r\n+LPF_TAPS(-0.001703060831694894),\r\n+LPF_TAPS(0.000469918882647158),\r\n+LPF_TAPS(0.001803862091048397),\r\n+LPF_TAPS(-0.000368637650049468),\r\n+LPF_TAPS(-0.001901875273189507),\r\n+LPF_TAPS(0.000256667900737123),\r\n+LPF_TAPS(0.001996295482812222),\r\n+LPF_TAPS(-0.000133832972436669),\r\n+LPF_TAPS(-0.002086280989547721),\r\n+LPF_TAPS(-0.000000000000000010),\r\n+LPF_TAPS(0.002170954822083052),\r\n+LPF_TAPS(0.000144917683015615),\r\n+LPF_TAPS(-0.002249406435955790),\r\n+LPF_TAPS(-0.000300958347362256),\r\n+LPF_TAPS(0.002320693416880992),\r\n+LPF_TAPS(0.000468109896452331),\r\n+LPF_TAPS(-0.002383843175141072),\r\n+LPF_TAPS(-0.000646308139683340),\r\n+LPF_TAPS(0.002437854579416513),\r\n+LPF_TAPS(0.000835435329088609),\r\n+LPF_TAPS(-0.002481699470256925),\r\n+LPF_TAPS(-0.001035318976208225),\r\n+LPF_TAPS(0.002514323983937589),\r\n+LPF_TAPS(0.001245730964462881),\r\n+LPF_TAPS(-0.002534649606387051),\r\n+LPF_TAPS(-0.001466386970538345),\r\n+LPF_TAPS(0.002541573863783226),\r\n+LPF_TAPS(0.001696946206381959),\r\n+LPF_TAPS(-0.002533970540751470),\r\n+LPF_TAPS(-0.001937011491375429),\r\n+LPF_TAPS(0.002510689298140439),\r\n+LPF_TAPS(0.002186129662096221),\r\n+LPF_TAPS(-0.002470554539162156),\r\n+LPF_TAPS(-0.002443792324832665),\r\n+LPF_TAPS(0.002412363344034429),\r\n+LPF_TAPS(0.002709436953689394),\r\n+LPF_TAPS(-0.002334882257521798),\r\n+LPF_TAPS(-0.002982448334724418),\r\n+LPF_TAPS(0.002236842668768351),\r\n+LPF_TAPS(0.003262160354121255),\r\n+LPF_TAPS(-0.002116934465646910),\r\n+LPF_TAPS(-0.003547858125934267),\r\n+LPF_TAPS(0.001973797572585516),\r\n+LPF_TAPS(0.003838780452470702),\r\n+LPF_TAPS(-0.001806010886127095),\r\n+LPF_TAPS(-0.004134122607912742),\r\n+LPF_TAPS(0.001612077998994808),\r\n+LPF_TAPS(0.004433039433353184),\r\n+LPF_TAPS(-0.001390408940994410),\r\n+LPF_TAPS(-0.004734648729042185),\r\n+LPF_TAPS(0.001139296949435484),\r\n+LPF_TAPS(0.005038034927334975),\r\n+LPF_TAPS(-0.000856888992736507),\r\n+LPF_TAPS(-0.005342253027616647),\r\n+LPF_TAPS(0.000541148379629372),\r\n+LPF_TAPS(0.005646332772373505),\r\n+LPF_TAPS(-0.000189807251080793),\r\n+LPF_TAPS(-0.005949283041602227),\r\n+LPF_TAPS(-0.000199693988689541),\r\n+LPF_TAPS(0.006250096440913952),\r\n+LPF_TAPS(0.000630284283290779),\r\n+LPF_TAPS(-0.006547754057017011),\r\n+LPF_TAPS(-0.001105362031111897),\r\n+LPF_TAPS(0.006841230352764132),\r\n+LPF_TAPS(0.001628925261767635),\r\n+LPF_TAPS(-0.007129498172641222),\r\n+LPF_TAPS(-0.002205742554827556),\r\n+LPF_TAPS(0.007411533828467142),\r\n+LPF_TAPS(0.002841579981535849),\r\n+LPF_TAPS(-0.007686322234178770),\r\n+LPF_TAPS(-0.003543506329125897),\r\n+LPF_TAPS(0.007952862057901125),\r\n+LPF_TAPS(0.004320309654234472),\r\n+LPF_TAPS(-0.008210170859055036),\r\n+LPF_TAPS(-0.005183075263676913),\r\n+LPF_TAPS(0.008457290178043437),\r\n+LPF_TAPS(0.006146002858099756),\r\n+LPF_TAPS(-0.008693290546079707),\r\n+LPF_TAPS(-0.007227586637919146),\r\n+LPF_TAPS(0.008917276382985836),\r\n+LPF_TAPS(0.008452361402853461),\r\n+LPF_TAPS(-0.009128390751287793),\r\n+LPF_TAPS(-0.009853558917979684),\r\n+LPF_TAPS(0.009325819935673612),\r\n+LPF_TAPS(0.011477281127491516),\r\n+LPF_TAPS(-0.009508797817845869),\r\n+LPF_TAPS(-0.013389307610701225),\r\n+LPF_TAPS(0.009676610017998718),\r\n+LPF_TAPS(0.015686706352215952),\r\n+LPF_TAPS(-0.009828597775554265),\r\n+LPF_TAPS(-0.018518730591539998),\r\n+LPF_TAPS(0.009964161543419017),\r\n+LPF_TAPS(0.022127001789441349),\r\n+LPF_TAPS(-0.010082764271829761),\r\n+LPF_TAPS(-0.026929524287683412),\r\n+LPF_TAPS(0.010183934359860159),\r\n+LPF_TAPS(0.033716713860811466),\r\n+LPF_TAPS(-0.010267268254820187),\r\n+LPF_TAPS(-0.044183467442614553),\r\n+LPF_TAPS(0.010332432682101312),\r\n+LPF_TAPS(0.062738188702308406),\r\n+LPF_TAPS(-0.010379166490467277),\r\n+LPF_TAPS(-0.105547895901716732),\r\n+LPF_TAPS(0.010407282100358520),\r\n+LPF_TAPS(0.318124561856717447),\r\n+LPF_TAPS(0.489583327635681576),\r\n+LPF_TAPS(0.318124561856717447),\r\n+LPF_TAPS(0.010407282100358520),\r\n+LPF_TAPS(-0.105547895901716732),\r\n+LPF_TAPS(-0.010379166490467277),\r\n+LPF_TAPS(0.062738188702308406),\r\n+LPF_TAPS(0.010332432682101312),\r\n+LPF_TAPS(-0.044183467442614553),\r\n+LPF_TAPS(-0.010267268254820187),\r\n+LPF_TAPS(0.033716713860811466),\r\n+LPF_TAPS(0.010183934359860159),\r\n+LPF_TAPS(-0.026929524287683408),\r\n+LPF_TAPS(-0.010082764271829761),\r\n+LPF_TAPS(0.022127001789441349),\r\n+LPF_TAPS(0.009964161543419017),\r\n+LPF_TAPS(-0.018518730591539998),\r\n+LPF_TAPS(-0.009828597775554265),\r\n+LPF_TAPS(0.015686706352215956),\r\n+LPF_TAPS(0.009676610017998718),\r\n+LPF_TAPS(-0.013389307610701227),\r\n+LPF_TAPS(-0.009508797817845869),\r\n+LPF_TAPS(0.011477281127491518),\r\n+LPF_TAPS(0.009325819935673612),\r\n+LPF_TAPS(-0.009853558917979684),\r\n+LPF_TAPS(-0.009128390751287794),\r\n+LPF_TAPS(0.008452361402853461),\r\n+LPF_TAPS(0.008917276382985836),\r\n+LPF_TAPS(-0.007227586637919147),\r\n+LPF_TAPS(-0.008693290546079709),\r\n+LPF_TAPS(0.006146002858099756),\r\n+LPF_TAPS(0.008457290178043437),\r\n+LPF_TAPS(-0.005183075263676913),\r\n+LPF_TAPS(-0.008210170859055036),\r\n+LPF_TAPS(0.004320309654234473),\r\n+LPF_TAPS(0.007952862057901126),\r\n+LPF_TAPS(-0.003543506329125898),\r\n+LPF_TAPS(-0.007686322234178772),\r\n+LPF_TAPS(0.002841579981535850),\r\n+LPF_TAPS(0.007411533828467142),\r\n+LPF_TAPS(-0.002205742554827557),\r\n+LPF_TAPS(-0.007129498172641222),\r\n+LPF_TAPS(0.001628925261767635),\r\n+LPF_TAPS(0.006841230352764133),\r\n+LPF_TAPS(-0.001105362031111897),\r\n+LPF_TAPS(-0.006547754057017012),\r\n+LPF_TAPS(0.000630284283290779),\r\n+LPF_TAPS(0.006250096440913953),\r\n+LPF_TAPS(-0.000199693988689541),\r\n+LPF_TAPS(-0.005949283041602227),\r\n+LPF_TAPS(-0.000189807251080793),\r\n+LPF_TAPS(0.005646332772373506),\r\n+LPF_TAPS(0.000541148379629372),\r\n+LPF_TAPS(-0.005342253027616649),\r\n+LPF_TAPS(-0.000856888992736507),\r\n+LPF_TAPS(0.005038034927334976),\r\n+LPF_TAPS(0.001139296949435484),\r\n+LPF_TAPS(-0.004734648729042187),\r\n+LPF_TAPS(-0.001390408940994411),\r\n+LPF_TAPS(0.004433039433353186),\r\n+LPF_TAPS(0.001612077998994808),\r\n+LPF_TAPS(-0.004134122607912742),\r\n+LPF_TAPS(-0.001806010886127095),\r\n+LPF_TAPS(0.003838780452470702),\r\n+LPF_TAPS(0.001973797572585516),\r\n+LPF_TAPS(-0.003547858125934267),\r\n+LPF_TAPS(-0.002116934465646911),\r\n+LPF_TAPS(0.003262160354121255),\r\n+LPF_TAPS(0.002236842668768352),\r\n+LPF_TAPS(-0.002982448334724419),\r\n+LPF_TAPS(-0.002334882257521798),\r\n+LPF_TAPS(0.002709436953689395),\r\n+LPF_TAPS(0.002412363344034428),\r\n+LPF_TAPS(-0.002443792324832665),\r\n+LPF_TAPS(-0.002470554539162155),\r\n+LPF_TAPS(0.002186129662096221),\r\n+LPF_TAPS(0.002510689298140439),\r\n+LPF_TAPS(-0.001937011491375430),\r\n+LPF_TAPS(-0.002533970540751471),\r\n+LPF_TAPS(0.001696946206381960),\r\n+LPF_TAPS(0.002541573863783227),\r\n+LPF_TAPS(-0.001466386970538345),\r\n+LPF_TAPS(-0.002534649606387052),\r\n+LPF_TAPS(0.001245730964462880),\r\n+LPF_TAPS(0.002514323983937590),\r\n+LPF_TAPS(-0.001035318976208226),\r\n+LPF_TAPS(-0.002481699470256926),\r\n+LPF_TAPS(0.000835435329088609),\r\n+LPF_TAPS(0.002437854579416514),\r\n+LPF_TAPS(-0.000646308139683340),\r\n+LPF_TAPS(-0.002383843175141073),\r\n+LPF_TAPS(0.000468109896452332),\r\n+LPF_TAPS(0.002320693416880992),\r\n+LPF_TAPS(-0.000300958347362256),\r\n+LPF_TAPS(-0.002249406435955789),\r\n+LPF_TAPS(0.000144917683015615),\r\n+LPF_TAPS(0.002170954822083053),\r\n+LPF_TAPS(-0.000000000000000010),\r\n+LPF_TAPS(-0.002086280989547721),\r\n+LPF_TAPS(-0.000133832972436669),\r\n+LPF_TAPS(0.001996295482812222),\r\n+LPF_TAPS(0.000256667900737123),\r\n+LPF_TAPS(-0.001901875273189508),\r\n+LPF_TAPS(-0.000368637650049468),\r\n+LPF_TAPS(0.001803862091048397),\r\n+LPF_TAPS(0.000469918882647158),\r\n+LPF_TAPS(-0.001703060831694895),\r\n+LPF_TAPS(-0.000560729473422398),\r\n+LPF_TAPS(0.001600238067424449),\r\n+LPF_TAPS(0.000641325764857145),\r\n+LPF_TAPS(-0.001496120693149180),\r\n+LPF_TAPS(-0.000711999684424938),\r\n+LPF_TAPS(0.001391394728381239),\r\n+LPF_TAPS(0.000773075747736378),\r\n+LPF_TAPS(-0.001286704294128211),\r\n+LPF_TAPS(-0.000824907970912845),\r\n+LPF_TAPS(0.001182650779375594),\r\n+LPF_TAPS(0.000867876715659763),\r\n+LPF_TAPS(-0.001079792208254300),\r\n+LPF_TAPS(-0.000902385490316769),\r\n+LPF_TAPS(0.000978642815687280),\r\n+LPF_TAPS(0.000928857729793190),\r\n+LPF_TAPS(-0.000879672836255881),\r\n+LPF_TAPS(-0.000947733576760587),\r\n+LPF_TAPS(0.000783308508207108),\r\n+LPF_TAPS(0.000959466685778196),\r\n+LPF_TAPS(-0.000689932291924013),\r\n+LPF_TAPS(-0.000964521071181302),\r\n+LPF_TAPS(0.000599883299797623),\r\n+LPF_TAPS(0.000963368018578730),\r\n+LPF_TAPS(-0.000513457932258434),\r\n+LPF_TAPS(-0.000956483078692794),\r\n+LPF_TAPS(0.000430910712749655),\r\n+LPF_TAPS(0.000944343161050079),\r\n+LPF_TAPS(-0.000352455312647677),\r\n+LPF_TAPS(-0.000927423743702985),\r\n+LPF_TAPS(0.000278265755551534),\r\n+LPF_TAPS(0.000906196213746451),\r\n+LPF_TAPS(-0.000208477788977747),\r\n+LPF_TAPS(-0.000881125351906698),\r\n+LPF_TAPS(0.000143190410299827),\r\n+LPF_TAPS(0.000852666972930490),\r\n+LPF_TAPS(-0.000082467532763677),\r\n+LPF_TAPS(-0.000821265731912697),\r\n+LPF_TAPS(0.000026339776589673),\r\n+LPF_TAPS(0.000787353105079299),\r\n+LPF_TAPS(0.000025193630468347),\r\n+LPF_TAPS(-0.000751345551907282),\r\n+LPF_TAPS(-0.000072162859201040),\r\n+LPF_TAPS(0.000713642863827721),\r\n+LPF_TAPS(0.000114625408040413),\r\n+LPF_TAPS(-0.000674626703136016),\r\n+LPF_TAPS(-0.000152663971685384),\r\n+LPF_TAPS(0.000634659334138613),\r\n+LPF_TAPS(0.000186384265730751),\r\n+LPF_TAPS(-0.000594082547010641),\r\n+LPF_TAPS(-0.000215912823589380),\r\n+LPF_TAPS(0.000553216773336135),\r\n+LPF_TAPS(0.000241394781671497),\r\n+LPF_TAPS(-0.000512360390863583),\r\n+LPF_TAPS(-0.000262991668324403),\r\n+LPF_TAPS(0.000471789213644001),\r\n+LPF_TAPS(0.000280879211452807),\r\n+LPF_TAPS(-0.000431756162436878),\r\n+LPF_TAPS(-0.000295245179045763),\r\n+LPF_TAPS(0.000392491109079526),\r\n+LPF_TAPS(0.000306287266039554),\r\n+LPF_TAPS(-0.000354200887423921),\r\n+LPF_TAPS(-0.000314211040060394),\r\n+LPF_TAPS(0.000317069462459603),\r\n+LPF_TAPS(0.000319227957627964),\r\n+LPF_TAPS(-0.000281258248365758),\r\n+LPF_TAPS(-0.000321553461372831),\r\n+LPF_TAPS(0.000246906565474358),\r\n+LPF_TAPS(0.000321405167739016),\r\n+LPF_TAPS(-0.000214132225480944),\r\n+LPF_TAPS(-0.000319001153521584),\r\n+LPF_TAPS(0.000183032233714526),\r\n+LPF_TAPS(0.000314558348438530),\r\n+LPF_TAPS(-0.000153683596868854),\r\n+LPF_TAPS(-0.000308291039769518),\r\n+LPF_TAPS(0.000126144224307666),\r\n+LPF_TAPS(0.000300409493922405),\r\n+LPF_TAPS(-0.000100453910882524),\r\n+LPF_TAPS(-0.000291118698623548),\r\n+LPF_TAPS(0.000076635389139154),\r\n+LPF_TAPS(0.000280617228280184),\r\n+LPF_TAPS(-0.000054695438835973),\r\n+LPF_TAPS(-0.000269096233943092),\r\n+LPF_TAPS(0.000034626041849581),\r\n+LPF_TAPS(0.000256738558214805),\r\n+LPF_TAPS(-0.000016405570791358),\r\n+LPF_TAPS(-0.000243717974411615),\r\n+LPF_TAPS(0.000000000000000002),\r\n+LPF_TAPS(0.000230198548304554),\r\n+LPF_TAPS(0.000014635871998353),\r\n+LPF_TAPS(-0.000216334119842647),\r\n+LPF_TAPS(-0.000027557198968305),\r\n+LPF_TAPS(0.000202267901407275),\r\n+LPF_TAPS(0.000038827872215975),\r\n+LPF_TAPS(-0.000188132188364734),\r\n+LPF_TAPS(-0.000048519323813871),\r\n+LPF_TAPS(0.000174048176979626),\r\n+LPF_TAPS(0.000056709356317991),\r\n+LPF_TAPS(-0.000160125884127777),\r\n+LPF_TAPS(-0.000063481006769391),\r\n+LPF_TAPS(0.000146464162706635),\r\n+LPF_TAPS(0.000068921452012099),\r\n+LPF_TAPS(-0.000133150806184833),\r\n+LPF_TAPS(-0.000073120961575807),\r\n+LPF_TAPS(0.000120262735361821),\r\n+LPF_TAPS(0.000076171903571917),\r\n+LPF_TAPS(-0.000107866260122152),\r\n+LPF_TAPS(-0.000078167808245341),\r\n+LPF_TAPS(0.000096017408766624),\r\n+LPF_TAPS(0.000079202493019870),\r\n+LPF_TAPS(-0.000084762317381802),\r\n+LPF_TAPS(-0.000079369252080098),\r\n+LPF_TAPS(0.000074137671667086),\r\n+LPF_TAPS(0.000078760112755455),\r\n+LPF_TAPS(-0.000064171193671817),\r\n+LPF_TAPS(-0.000077465160218964),\r\n+LPF_TAPS(0.000054882165999193),\r\n+LPF_TAPS(0.000075571931291371),\r\n+LPF_TAPS(-0.000046281986203924),\r\n+LPF_TAPS(-0.000073164877456309),\r\n+LPF_TAPS(0.000038374744342056),\r\n+LPF_TAPS(0.000070324896549265),\r\n+LPF_TAPS(-0.000031157816917856),\r\n+LPF_TAPS(-0.000067128931986999),\r\n+LPF_TAPS(0.000024622470808229),\r\n+LPF_TAPS(0.000063649637858348),\r\n+LPF_TAPS(-0.000018754471123261),\r\n+LPF_TAPS(-0.000059955107705322),\r\n+LPF_TAPS(0.000013534687376105),\r\n+LPF_TAPS(0.000056108664387130),\r\n+LPF_TAPS(-0.000008939692779225),\r\n+LPF_TAPS(-0.000052168708041048),\r\n+LPF_TAPS(0.000004942351950558),\r\n+LPF_TAPS(0.000048188618833547),\r\n+LPF_TAPS(-0.000001512392796211),\r\n+LPF_TAPS(-0.000044216710932948),\r\n+LPF_TAPS(-0.000001383041171332),\r\n+LPF_TAPS(0.000040296233930550),\r\n+LPF_TAPS(0.000003778861324781),\r\n+LPF_TAPS(-0.000036465417789344),\r\n+LPF_TAPS(-0.000005711529975318),\r\n+LPF_TAPS(0.000032757557306228),\r\n+LPF_TAPS(0.000007218584254945),\r\n+LPF_TAPS(-0.000029201132032658),\r\n+LPF_TAPS(-0.000008338189624081),\r\n+LPF_TAPS(0.000025819957606911),\r\n+LPF_TAPS(0.000009108724348073),\r\n+LPF_TAPS(-0.000022633364505072),\r\n+LPF_TAPS(-0.000009568395856687),\r\n+LPF_TAPS(0.000019656400313892),\r\n+LPF_TAPS(0.000009754889497821),\r\n+LPF_TAPS(-0.000016900051762228),\r\n+LPF_TAPS(-0.000009705049823939),\r\n+LPF_TAPS(0.000014371482914828),\r\n+LPF_TAPS(0.000009454594209865),\r\n+LPF_TAPS(-0.000012074286127767),\r\n+LPF_TAPS(-0.000009037858295623),\r\n+LPF_TAPS(0.000010008742584247),\r\n+LPF_TAPS(0.000008487572479706),\r\n+LPF_TAPS(-0.000008172089467830),\r\n+LPF_TAPS(-0.000007834668457273),\r\n+LPF_TAPS(0.000006558791082586),\r\n+LPF_TAPS(0.000007108114604907),\r\n+LPF_TAPS(-0.000005160811491329),\r\n+LPF_TAPS(-0.000006334778858395),\r\n+LPF_TAPS(0.000003967886509344),\r\n+LPF_TAPS(0.000005539317611880),\r\n+LPF_TAPS(-0.000002967793157365),\r\n+LPF_TAPS(-0.000004744089084507),\r\n+LPF_TAPS(0.000002146614939706),\r\n+LPF_TAPS(0.000003969089552504),\r\n+LPF_TAPS(-0.000001489001567436),\r\n+LPF_TAPS(-0.000003231910828620),\r\n+LPF_TAPS(0.000000978421988732),\r\n+LPF_TAPS(0.000002547717384186),\r\n+LPF_TAPS(-0.000000597409815756),\r\n+LPF_TAPS(-0.000001929241549214),\r\n+LPF_TAPS(0.000000327800446696),\r\n+LPF_TAPS(0.000001386795289539),\r\n+LPF_TAPS(-0.000000150959370735),\r\n+LPF_TAPS(-0.000000928297143806),\r\n+LPF_TAPS(0.000000048001310528),\r\n+LPF_TAPS(0.000000559313003533),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000283109532916),\r\n+LPF_TAPS(-0.000000011811486228),\r\n+LPF_TAPS(0.000000100719147701),\r\n+LPF_TAPS(0.000000005849842074),\r\n+LPF_TAPS(-0.000000011015600767),\r\n+LPF_TAPS(0.000000000000000000),\r\n+};\r\ndiff --git a/core/sound/blip_lpf_48K.h b/core/sound/blip_lpf_48K.h\nnew file mode 100644\nindex 000000000..b6f070d34\n--- /dev/null\n+++ b/core/sound/blip_lpf_48K.h\n@@ -0,0 +1,5 @@\n+/* 48K sampling, 2K cutoff, 3K transition */\r\n+enum { blip_lpf_48K_taps = 75 };\r\n+\r\n+\r\n+#include \"blip_lpf_48K_24K.h\"\r\ndiff --git a/core/sound/blip_lpf_48K_24K.h b/core/sound/blip_lpf_48K_24K.h\nnew file mode 100644\nindex 000000000..cfc55509c\n--- /dev/null\n+++ b/core/sound/blip_lpf_48K_24K.h\n@@ -0,0 +1,77 @@\n+static buf_t const blip_lpf_48K_24K[blip_lpf_48K_taps] = {\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000006172351880734),\r\n+LPF_TAPS(-0.000027967518784738),\r\n+LPF_TAPS(0.000073690439314385),\r\n+LPF_TAPS(-0.000148511866632178),\r\n+LPF_TAPS(0.000252294005948314),\r\n+LPF_TAPS(-0.000377448480600132),\r\n+LPF_TAPS(0.000507171487425029),\r\n+LPF_TAPS(-0.000614507519940712),\r\n+LPF_TAPS(0.000662742722649616),\r\n+LPF_TAPS(-0.000607589638848393),\r\n+LPF_TAPS(0.000401476982379787),\r\n+LPF_TAPS(-0.000000000000000019),\r\n+LPF_TAPS(-0.000629759853592583),\r\n+LPF_TAPS(0.001499729835175342),\r\n+LPF_TAPS(-0.002591217555386272),\r\n+LPF_TAPS(0.003846516360834453),\r\n+LPF_TAPS(-0.005163246483314691),\r\n+LPF_TAPS(0.006392876984000919),\r\n+LPF_TAPS(-0.007344587700569814),\r\n+LPF_TAPS(0.007795122064233218),\r\n+LPF_TAPS(-0.007504593248757817),\r\n+LPF_TAPS(0.006237413639836052),\r\n+LPF_TAPS(-0.003786722276039828),\r\n+LPF_TAPS(0.000000000000000084),\r\n+LPF_TAPS(0.005196903228349641),\r\n+LPF_TAPS(-0.011780261796860798),\r\n+LPF_TAPS(0.019616218693346690),\r\n+LPF_TAPS(-0.028457941223227038),\r\n+LPF_TAPS(0.037953457657094965),\r\n+LPF_TAPS(-0.047664323241449508),\r\n+LPF_TAPS(0.057094042553461788),\r\n+LPF_TAPS(-0.065724003835937739),\r\n+LPF_TAPS(0.073053711370429431),\r\n+LPF_TAPS(-0.078641465941841002),\r\n+LPF_TAPS(0.082141434075137285),\r\n+LPF_TAPS(0.916666347460571185),\r\n+LPF_TAPS(0.082141434075137298),\r\n+LPF_TAPS(-0.078641465941841016),\r\n+LPF_TAPS(0.073053711370429431),\r\n+LPF_TAPS(-0.065724003835937739),\r\n+LPF_TAPS(0.057094042553461788),\r\n+LPF_TAPS(-0.047664323241449522),\r\n+LPF_TAPS(0.037953457657094986),\r\n+LPF_TAPS(-0.028457941223227038),\r\n+LPF_TAPS(0.019616218693346690),\r\n+LPF_TAPS(-0.011780261796860800),\r\n+LPF_TAPS(0.005196903228349641),\r\n+LPF_TAPS(0.000000000000000084),\r\n+LPF_TAPS(-0.003786722276039829),\r\n+LPF_TAPS(0.006237413639836052),\r\n+LPF_TAPS(-0.007504593248757819),\r\n+LPF_TAPS(0.007795122064233216),\r\n+LPF_TAPS(-0.007344587700569819),\r\n+LPF_TAPS(0.006392876984000925),\r\n+LPF_TAPS(-0.005163246483314693),\r\n+LPF_TAPS(0.003846516360834457),\r\n+LPF_TAPS(-0.002591217555386270),\r\n+LPF_TAPS(0.001499729835175344),\r\n+LPF_TAPS(-0.000629759853592583),\r\n+LPF_TAPS(-0.000000000000000019),\r\n+LPF_TAPS(0.000401476982379787),\r\n+LPF_TAPS(-0.000607589638848392),\r\n+LPF_TAPS(0.000662742722649617),\r\n+LPF_TAPS(-0.000614507519940712),\r\n+LPF_TAPS(0.000507171487425029),\r\n+LPF_TAPS(-0.000377448480600133),\r\n+LPF_TAPS(0.000252294005948314),\r\n+LPF_TAPS(-0.000148511866632178),\r\n+LPF_TAPS(0.000073690439314385),\r\n+LPF_TAPS(-0.000027967518784738),\r\n+LPF_TAPS(0.000006172351880734),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000000000000000),\r\n+};\r\ndiff --git a/core/sound/blip_lpf_768K.h b/core/sound/blip_lpf_768K.h\nnew file mode 100644\nindex 000000000..49cf333e4\n--- /dev/null\n+++ b/core/sound/blip_lpf_768K.h\n@@ -0,0 +1,9 @@\n+/* 768K sampling, 2K cutoff, 3K transition */\r\n+enum { blip_lpf_768K_taps = 1179 };\r\n+\r\n+\r\n+#include \"blip_lpf_768K_24K.h\"\r\n+#include \"blip_lpf_768K_48K.h\"\r\n+#include \"blip_lpf_768K_96K.h\"\r\n+#include \"blip_lpf_768K_192K.h\"\r\n+#include \"blip_lpf_768K_384K.h\"\r\ndiff --git a/core/sound/blip_lpf_768K_192K.h b/core/sound/blip_lpf_768K_192K.h\nnew file mode 100644\nindex 000000000..3777532db\n--- /dev/null\n+++ b/core/sound/blip_lpf_768K_192K.h\n@@ -0,0 +1,1181 @@\n+static buf_t const blip_lpf_768K_192K[blip_lpf_768K_taps] = {\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000000270411187),\r\n+LPF_TAPS(0.000000005464226025),\r\n+LPF_TAPS(-0.000000002039181362),\r\n+LPF_TAPS(-0.000000022053172665),\r\n+LPF_TAPS(0.000000004555102289),\r\n+LPF_TAPS(0.000000050015122713),\r\n+LPF_TAPS(-0.000000006729075807),\r\n+LPF_TAPS(-0.000000089535638879),\r\n+LPF_TAPS(0.000000007450379996),\r\n+LPF_TAPS(0.000000140736086864),\r\n+LPF_TAPS(-0.000000005589328078),\r\n+LPF_TAPS(-0.000000203672228149),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000278332885067),\r\n+LPF_TAPS(0.000000010476952729),\r\n+LPF_TAPS(-0.000000364638680968),\r\n+LPF_TAPS(-0.000000027011428462),\r\n+LPF_TAPS(0.000000462440858539),\r\n+LPF_TAPS(0.000000050780922643),\r\n+LPF_TAPS(-0.000000571520179580),\r\n+LPF_TAPS(-0.000000082967500509),\r\n+LPF_TAPS(0.000000691585909819),\r\n+LPF_TAPS(0.000000124754695030),\r\n+LPF_TAPS(-0.000000822274892573),\r\n+LPF_TAPS(-0.000000177324329996),\r\n+LPF_TAPS(0.000000963150715332),\r\n+LPF_TAPS(0.000000241853268333),\r\n+LPF_TAPS(-0.000001113702973585),\r\n+LPF_TAPS(-0.000000319510085909),\r\n+LPF_TAPS(0.000001273346636437),\r\n+LPF_TAPS(0.000000411451671308),\r\n+LPF_TAPS(-0.000001441421518830),\r\n+LPF_TAPS(-0.000000518819752302),\r\n+LPF_TAPS(0.000001617191865353),\r\n+LPF_TAPS(0.000000642737349976),\r\n+LPF_TAPS(-0.000001799846050903),\r\n+LPF_TAPS(-0.000000784305161806),\r\n+LPF_TAPS(0.000001988496403598),\r\n+LPF_TAPS(0.000000944597875235),\r\n+LPF_TAPS(-0.000002182179155572),\r\n+LPF_TAPS(-0.000001124660413670),\r\n+LPF_TAPS(0.000002379854527418),\r\n+LPF_TAPS(0.000001325504117162),\r\n+LPF_TAPS(-0.000002580406952221),\r\n+LPF_TAPS(-0.000001548102860405),\r\n+LPF_TAPS(0.000002782645445234),\r\n+LPF_TAPS(0.000001793389111064),\r\n+LPF_TAPS(-0.000002985304125357),\r\n+LPF_TAPS(-0.000002062249931914),\r\n+LPF_TAPS(0.000003187042894687),\r\n+LPF_TAPS(0.000002355522930638),\r\n+LPF_TAPS(-0.000003386448282433),\r\n+LPF_TAPS(-0.000002673992161604),\r\n+LPF_TAPS(0.000003582034459542),\r\n+LPF_TAPS(0.000003018383984428),\r\n+LPF_TAPS(-0.000003772244430401),\r\n+LPF_TAPS(-0.000003389362884580),\r\n+LPF_TAPS(0.000003955451407915),\r\n+LPF_TAPS(0.000003787527261756),\r\n+LPF_TAPS(-0.000004129960378251),\r\n+LPF_TAPS(-0.000004213405192313),\r\n+LPF_TAPS(0.000004294009861432),\r\n+LPF_TAPS(0.000004667450172476),\r\n+LPF_TAPS(-0.000004445773873841),\r\n+LPF_TAPS(-0.000005150036849619),\r\n+LPF_TAPS(0.000004583364098553),\r\n+LPF_TAPS(0.000005661456749387),\r\n+LPF_TAPS(-0.000004704832269243),\r\n+LPF_TAPS(-0.000006201914006984),\r\n+LPF_TAPS(0.000004808172773150),\r\n+LPF_TAPS(0.000006771521111433),\r\n+LPF_TAPS(-0.000004891325478376),\r\n+LPF_TAPS(-0.000007370294672177),\r\n+LPF_TAPS(0.000004952178790474),\r\n+LPF_TAPS(0.000007998151217884),\r\n+LPF_TAPS(-0.000004988572942947),\r\n+LPF_TAPS(-0.000008654903037807),\r\n+LPF_TAPS(0.000004998303525934),\r\n+LPF_TAPS(0.000009340254076601),\r\n+LPF_TAPS(-0.000004979125256946),\r\n+LPF_TAPS(-0.000010053795893948),\r\n+LPF_TAPS(0.000004928755997066),\r\n+LPF_TAPS(0.000010795003700833),\r\n+LPF_TAPS(-0.000004844881015559),\r\n+LPF_TAPS(-0.000011563232484775),\r\n+LPF_TAPS(0.000004725157505337),\r\n+LPF_TAPS(0.000012357713236772),\r\n+LPF_TAPS(-0.000004567219351147),\r\n+LPF_TAPS(-0.000013177549293115),\r\n+LPF_TAPS(0.000004368682151773),\r\n+LPF_TAPS(0.000014021712805663),\r\n+LPF_TAPS(-0.000004127148496975),\r\n+LPF_TAPS(-0.000014889041354518),\r\n+LPF_TAPS(0.000003840213499109),\r\n+LPF_TAPS(0.000015778234717405),\r\n+LPF_TAPS(-0.000003505470578851),\r\n+LPF_TAPS(-0.000016687851810380),\r\n+LPF_TAPS(0.000003120517503602),\r\n+LPF_TAPS(0.000017616307814767),\r\n+LPF_TAPS(-0.000002682962676418),\r\n+LPF_TAPS(-0.000018561871505499),\r\n+LPF_TAPS(0.000002190431672634),\r\n+LPF_TAPS(0.000019522662796228),\r\n+LPF_TAPS(-0.000001640574020396),\r\n+LPF_TAPS(-0.000020496650516781),\r\n+LPF_TAPS(0.000001031070220591),\r\n+LPF_TAPS(0.000021481650438649),\r\n+LPF_TAPS(-0.000000359639000791),\r\n+LPF_TAPS(-0.000022475323564316),\r\n+LPF_TAPS(-0.000000375955203094),\r\n+LPF_TAPS(0.000023475174696270),\r\n+LPF_TAPS(0.000001177894544622),\r\n+LPF_TAPS(-0.000024478551301565),\r\n+LPF_TAPS(-0.000002048299852131),\r\n+LPF_TAPS(0.000025482642687743),\r\n+LPF_TAPS(0.000002989222510623),\r\n+LPF_TAPS(-0.000026484479505846),\r\n+LPF_TAPS(-0.000004002636150150),\r\n+LPF_TAPS(0.000027480933596112),\r\n+LPF_TAPS(0.000005090428151623),\r\n+LPF_TAPS(-0.000028468718191753),\r\n+LPF_TAPS(-0.000006254390981889),\r\n+LPF_TAPS(0.000029444388495961),\r\n+LPF_TAPS(0.000007496213370957),\r\n+LPF_TAPS(-0.000030404342647009),\r\n+LPF_TAPS(-0.000008817471345155),\r\n+LPF_TAPS(0.000031344823085946),\r\n+LPF_TAPS(0.000010219619130956),\r\n+LPF_TAPS(-0.000032261918340969),\r\n+LPF_TAPS(-0.000011703979945270),\r\n+LPF_TAPS(0.000033151565242131),\r\n+LPF_TAPS(0.000013271736688854),\r\n+LPF_TAPS(-0.000034009551579453),\r\n+LPF_TAPS(-0.000014923922560452),\r\n+LPF_TAPS(0.000034831519217002),\r\n+LPF_TAPS(0.000016661411610296),\r\n+LPF_TAPS(-0.000035612967674835),\r\n+LPF_TAPS(-0.000018484909252414),\r\n+LPF_TAPS(0.000036349258189961),\r\n+LPF_TAPS(0.000020394942756081),\r\n+LPF_TAPS(-0.000037035618266847),\r\n+LPF_TAPS(-0.000022391851737813),\r\n+LPF_TAPS(0.000037667146727081),\r\n+LPF_TAPS(0.000024475778675831),\r\n+LPF_TAPS(-0.000038238819266954),\r\n+LPF_TAPS(-0.000026646659470014),\r\n+LPF_TAPS(0.000038745494530907),\r\n+LPF_TAPS(0.000028904214071107),\r\n+LPF_TAPS(-0.000039181920707691),\r\n+LPF_TAPS(-0.000031247937203481),\r\n+LPF_TAPS(0.000039542742655132),\r\n+LPF_TAPS(0.000033677089206780),\r\n+LPF_TAPS(-0.000039822509558359),\r\n+LPF_TAPS(-0.000036190687022217),\r\n+LPF_TAPS(0.000040015683125125),\r\n+LPF_TAPS(0.000038787495349966),\r\n+LPF_TAPS(-0.000040116646320761),\r\n+LPF_TAPS(-0.000041466018004756),\r\n+LPF_TAPS(0.000040119712644108),\r\n+LPF_TAPS(0.000044224489497212),\r\n+LPF_TAPS(-0.000040019135944408),\r\n+LPF_TAPS(-0.000047060866868922),\r\n+LPF_TAPS(0.000039809120777898),\r\n+LPF_TAPS(0.000049972821809768),\r\n+LPF_TAPS(-0.000039483833301589),\r\n+LPF_TAPS(-0.000052957733086275),\r\n+LPF_TAPS(0.000039037412700123),\r\n+LPF_TAPS(0.000056012679310092),\r\n+LPF_TAPS(-0.000038463983140413),\r\n+LPF_TAPS(-0.000059134432075883),\r\n+LPF_TAPS(0.000037757666247151),\r\n+LPF_TAPS(0.000062319449498186),\r\n+LPF_TAPS(-0.000036912594090979),\r\n+LPF_TAPS(-0.000065563870176755),\r\n+LPF_TAPS(0.000035922922679381),\r\n+LPF_TAPS(0.000068863507619961),\r\n+LPF_TAPS(-0.000034782845939036),\r\n+LPF_TAPS(-0.000072213845155834),\r\n+LPF_TAPS(0.000033486610176828),\r\n+LPF_TAPS(0.000075610031360122),\r\n+LPF_TAPS(-0.000032028529004963),\r\n+LPF_TAPS(-0.000079046876030527),\r\n+LPF_TAPS(0.000030402998714268),\r\n+LPF_TAPS(0.000082518846736081),\r\n+LPF_TAPS(-0.000028604514078264),\r\n+LPF_TAPS(-0.000086020065970184),\r\n+LPF_TAPS(0.000026627684568545),\r\n+LPF_TAPS(0.000089544308935324),\r\n+LPF_TAPS(-0.000024467250961158),\r\n+LPF_TAPS(-0.000093085001987199),\r\n+LPF_TAPS(0.000022118102311547),\r\n+LPF_TAPS(0.000096635221765021),\r\n+LPF_TAPS(-0.000019575293274054),\r\n+LPF_TAPS(-0.000100187695034352),\r\n+LPF_TAPS(0.000016834061741043),\r\n+LPF_TAPS(0.000103734799267992),\r\n+LPF_TAPS(-0.000013889846774370),\r\n+LPF_TAPS(-0.000107268563989415),\r\n+LPF_TAPS(0.000010738306800940),\r\n+LPF_TAPS(0.000110780672902561),\r\n+LPF_TAPS(-0.000007375338042619),\r\n+LPF_TAPS(-0.000114262466830563),\r\n+LPF_TAPS(0.000003797093148942),\r\n+LPF_TAPS(0.000117704947484981),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000121098782085899),\r\n+LPF_TAPS(-0.000004019219354460),\r\n+LPF_TAPS(0.000124434308851991),\r\n+LPF_TAPS(0.000008263529655400),\r\n+LPF_TAPS(-0.000127701543378277),\r\n+LPF_TAPS(-0.000012735563330892),\r\n+LPF_TAPS(0.000130890185917930),\r\n+LPF_TAPS(0.000017437601366372),\r\n+LPF_TAPS(-0.000133989629582932),\r\n+LPF_TAPS(-0.000022371554188088),\r\n+LPF_TAPS(0.000136988969476841),\r\n+LPF_TAPS(0.000027538942599739),\r\n+LPF_TAPS(-0.000139877012771326),\r\n+LPF_TAPS(-0.000032940878813716),\r\n+LPF_TAPS(0.000142642289736313),\r\n+LPF_TAPS(0.000038578047618915),\r\n+LPF_TAPS(-0.000145273065731922),\r\n+LPF_TAPS(-0.000044450687728521),\r\n+LPF_TAPS(0.000147757354168510),\r\n+LPF_TAPS(0.000050558573351575),\r\n+LPF_TAPS(-0.000150082930439164),\r\n+LPF_TAPS(-0.000056900996032834),\r\n+LPF_TAPS(0.000152237346827124),\r\n+LPF_TAPS(0.000063476746806541),\r\n+LPF_TAPS(-0.000154207948388639),\r\n+LPF_TAPS(-0.000070284098709880),\r\n+LPF_TAPS(0.000155981889809562),\r\n+LPF_TAPS(0.000077320789702193),\r\n+LPF_TAPS(-0.000157546153231995),\r\n+LPF_TAPS(-0.000084584006037386),\r\n+LPF_TAPS(0.000158887567045323),\r\n+LPF_TAPS(0.000092070366135805),\r\n+LPF_TAPS(-0.000159992825633266),\r\n+LPF_TAPS(-0.000099775905003113),\r\n+LPF_TAPS(0.000160848510067184),\r\n+LPF_TAPS(0.000107696059243807),\r\n+LPF_TAPS(-0.000161441109732858),\r\n+LPF_TAPS(-0.000115825652715863),\r\n+LPF_TAPS(0.000161757044876159),\r\n+LPF_TAPS(0.000124158882874344),\r\n+LPF_TAPS(-0.000161782690050796),\r\n+LPF_TAPS(-0.000132689307850565),\r\n+LPF_TAPS(0.000161504398448678),\r\n+LPF_TAPS(0.000141409834313202),\r\n+LPF_TAPS(-0.000160908527091470),\r\n+LPF_TAPS(-0.000150312706157744),\r\n+LPF_TAPS(0.000159981462859707),\r\n+LPF_TAPS(0.000159389494069615),\r\n+LPF_TAPS(-0.000158709649333105),\r\n+LPF_TAPS(-0.000168631086005580),\r\n+LPF_TAPS(0.000157079614413859),\r\n+LPF_TAPS(0.000178027678637799),\r\n+LPF_TAPS(-0.000155077998702502),\r\n+LPF_TAPS(-0.000187568769803267),\r\n+LPF_TAPS(0.000152691584593175),\r\n+LPF_TAPS(0.000197243152000898),\r\n+LPF_TAPS(-0.000149907326053507),\r\n+LPF_TAPS(-0.000207038906976828),\r\n+LPF_TAPS(0.000146712379051885),\r\n+LPF_TAPS(0.000216943401437930),\r\n+LPF_TAPS(-0.000143094132592875),\r\n+LPF_TAPS(-0.000226943283931415),\r\n+LPF_TAPS(0.000139040240319026),\r\n+LPF_TAPS(0.000237024482927353),\r\n+LPF_TAPS(-0.000134538652636258),\r\n+LPF_TAPS(-0.000247172206139378),\r\n+LPF_TAPS(0.000129577649317022),\r\n+LPF_TAPS(0.000257370941116722),\r\n+LPF_TAPS(-0.000124145872533844),\r\n+LPF_TAPS(-0.000267604457139195),\r\n+LPF_TAPS(0.000118232360274576),\r\n+LPF_TAPS(0.000277855808445009),\r\n+LPF_TAPS(-0.000111826580088162),\r\n+LPF_TAPS(-0.000288107338818654),\r\n+LPF_TAPS(0.000104918463108302),\r\n+LPF_TAPS(0.000298340687564529),\r\n+LPF_TAPS(-0.000097498438301123),\r\n+LPF_TAPS(-0.000308536796889542),\r\n+LPF_TAPS(0.000089557466881093),\r\n+LPF_TAPS(0.000318675920715468),\r\n+LPF_TAPS(-0.000081087076837988),\r\n+LPF_TAPS(-0.000328737634939617),\r\n+LPF_TAPS(0.000072079397516850),\r\n+LPF_TAPS(0.000338700849159800),\r\n+LPF_TAPS(-0.000062527194191441),\r\n+LPF_TAPS(-0.000348543819876908),\r\n+LPF_TAPS(0.000052423902570022),\r\n+LPF_TAPS(0.000358244165185824),\r\n+LPF_TAPS(-0.000041763663172922),\r\n+LPF_TAPS(-0.000367778880962728),\r\n+LPF_TAPS(0.000030541355518856),\r\n+LPF_TAPS(0.000377124358553825),\r\n+LPF_TAPS(-0.000018752632056849),\r\n+LPF_TAPS(-0.000386256403967828),\r\n+LPF_TAPS(0.000006393951780809),\r\n+LPF_TAPS(0.000395150258571598),\r\n+LPF_TAPS(0.000006537386537703),\r\n+LPF_TAPS(-0.000403780621285212),\r\n+LPF_TAPS(-0.000020043211562898),\r\n+LPF_TAPS(0.000412121672269845),\r\n+LPF_TAPS(0.000034124447118409),\r\n+LPF_TAPS(-0.000420147098098687),\r\n+LPF_TAPS(-0.000048781080485743),\r\n+LPF_TAPS(0.000427830118398051),\r\n+LPF_TAPS(0.000064012131341976),\r\n+LPF_TAPS(-0.000435143513942678),\r\n+LPF_TAPS(-0.000079815621400166),\r\n+LPF_TAPS(0.000442059656186037),\r\n+LPF_TAPS(0.000096188544815881),\r\n+LPF_TAPS(-0.000448550538203314),\r\n+LPF_TAPS(-0.000113126839423332),\r\n+LPF_TAPS(0.000454587807021607),\r\n+LPF_TAPS(0.000130625358861683),\r\n+LPF_TAPS(-0.000460142797308446),\r\n+LPF_TAPS(-0.000148677845653371),\r\n+LPF_TAPS(0.000465186566386890),\r\n+LPF_TAPS(0.000167276905294243),\r\n+LPF_TAPS(-0.000469689930542188),\r\n+LPF_TAPS(-0.000186413981413071),\r\n+LPF_TAPS(0.000473623502581409),\r\n+LPF_TAPS(0.000206079332057869),\r\n+LPF_TAPS(-0.000476957730605114),\r\n+LPF_TAPS(-0.000226262007164247),\r\n+LPF_TAPS(0.000479662937946381),\r\n+LPF_TAPS(0.000246949827258589),\r\n+LPF_TAPS(-0.000481709364229588),\r\n+LPF_TAPS(-0.000268129363447485),\r\n+LPF_TAPS(0.000483067207498627),\r\n+LPF_TAPS(0.000289785918742595),\r\n+LPF_TAPS(-0.000483706667360984),\r\n+LPF_TAPS(-0.000311903510766968),\r\n+LPF_TAPS(0.000483597989091136),\r\n+LPF_TAPS(0.000334464855886926),\r\n+LPF_TAPS(-0.000482711508634332),\r\n+LPF_TAPS(-0.000357451354810840),\r\n+LPF_TAPS(0.000481017698448667),\r\n+LPF_TAPS(0.000380843079692384),\r\n+LPF_TAPS(-0.000478487214120758),\r\n+LPF_TAPS(-0.000404618762773439),\r\n+LPF_TAPS(0.000475090941687849),\r\n+LPF_TAPS(0.000428755786598220),\r\n+LPF_TAPS(-0.000470800045596781),\r\n+LPF_TAPS(-0.000453230175826497),\r\n+LPF_TAPS(0.000465586017227704),\r\n+LPF_TAPS(0.000478016590669961),\r\n+LPF_TAPS(-0.000459420723907908),\r\n+LPF_TAPS(-0.000503088321972070),\r\n+LPF_TAPS(0.000452276458339745),\r\n+LPF_TAPS(0.000528417287947738),\r\n+LPF_TAPS(-0.000444125988363888),\r\n+LPF_TAPS(-0.000553974032593938),\r\n+LPF_TAPS(0.000434942606977188),\r\n+LPF_TAPS(0.000579727725779194),\r\n+LPF_TAPS(-0.000424700182523640),\r\n+LPF_TAPS(-0.000605646165013736),\r\n+LPF_TAPS(0.000413373208973718),\r\n+LPF_TAPS(0.000631695778898094),\r\n+LPF_TAPS(-0.000400936856207481),\r\n+LPF_TAPS(-0.000657841632242460),\r\n+LPF_TAPS(0.000387367020214454),\r\n+LPF_TAPS(0.000684047432843816),\r\n+LPF_TAPS(-0.000372640373122280),\r\n+LPF_TAPS(-0.000710275539901573),\r\n+LPF_TAPS(0.000356734412965341),\r\n+LPF_TAPS(0.000736486974048094),\r\n+LPF_TAPS(-0.000339627513103736),\r\n+LPF_TAPS(-0.000762641428962928),\r\n+LPF_TAPS(0.000321298971202047),\r\n+LPF_TAPS(0.000788697284533992),\r\n+LPF_TAPS(-0.000301729057676401),\r\n+LPF_TAPS(-0.000814611621522312),\r\n+LPF_TAPS(0.000280899063519201),\r\n+LPF_TAPS(0.000840340237680266),\r\n+LPF_TAPS(-0.000258791347409589),\r\n+LPF_TAPS(-0.000865837665265529),\r\n+LPF_TAPS(0.000235389382017556),\r\n+LPF_TAPS(0.000891057189886533),\r\n+LPF_TAPS(-0.000210677799411442),\r\n+LPF_TAPS(-0.000915950870606544),\r\n+LPF_TAPS(0.000184642435476311),\r\n+LPF_TAPS(0.000940469561226123),\r\n+LPF_TAPS(-0.000157270373253856),\r\n+LPF_TAPS(-0.000964562932655105),\r\n+LPF_TAPS(0.000128549985113490),\r\n+LPF_TAPS(0.000988179496276455),\r\n+LPF_TAPS(-0.000098470973665477),\r\n+LPF_TAPS(-0.001011266628194997),\r\n+LPF_TAPS(0.000067024411328462),\r\n+LPF_TAPS(0.001033770594254893),\r\n+LPF_TAPS(-0.000034202778465029),\r\n+LPF_TAPS(-0.001055636575699028),\r\n+LPF_TAPS(0.000000000000000001),\r\n+LPF_TAPS(0.001076808695333126),\r\n+LPF_TAPS(0.000035588519562657),\r\n+LPF_TAPS(-0.001097230044046120),\r\n+LPF_TAPS(-0.000072565862804956),\r\n+LPF_TAPS(0.001116842707526315),\r\n+LPF_TAPS(0.000110933567822261),\r\n+LPF_TAPS(-0.001135587793000342),\r\n+LPF_TAPS(-0.000150691598491106),\r\n+LPF_TAPS(0.001153405455808370),\r\n+LPF_TAPS(0.000191838316651094),\r\n+LPF_TAPS(-0.001170234925614872),\r\n+LPF_TAPS(-0.000234370456275451),\r\n+LPF_TAPS(0.001186014532038874),\r\n+LPF_TAPS(0.000278283099698674),\r\n+LPF_TAPS(-0.001200681729471176),\r\n+LPF_TAPS(-0.000323569655969105),\r\n+LPF_TAPS(0.001214173120828369),\r\n+LPF_TAPS(0.000370221841390830),\r\n+LPF_TAPS(-0.001226424479975013),\r\n+LPF_TAPS(-0.000418229662315629),\r\n+LPF_TAPS(0.001237370772523770),\r\n+LPF_TAPS(0.000467581400242392),\r\n+LPF_TAPS(-0.001246946174701972),\r\n+LPF_TAPS(-0.000518263599278438),\r\n+LPF_TAPS(0.001255084089948550),\r\n+LPF_TAPS(0.000570261056014149),\r\n+LPF_TAPS(-0.001261717162878848),\r\n+LPF_TAPS(-0.000623556811856089),\r\n+LPF_TAPS(0.001266777290225573),\r\n+LPF_TAPS(0.000678132147863779),\r\n+LPF_TAPS(-0.001270195628333515),\r\n+LPF_TAPS(-0.000733966582127434),\r\n+LPF_TAPS(0.001271902596749720),\r\n+LPF_TAPS(0.000791037869722423),\r\n+LPF_TAPS(-0.001271827877412626),\r\n+LPF_TAPS(-0.000849322005271670),\r\n+LPF_TAPS(0.001269900408902514),\r\n+LPF_TAPS(0.000908793228141729),\r\n+LPF_TAPS(-0.001266048375166084),\r\n+LPF_TAPS(-0.000969424030294818),\r\n+LPF_TAPS(0.001260199188078141),\r\n+LPF_TAPS(0.001031185166814938),\r\n+LPF_TAPS(-0.001252279463143894),\r\n+LPF_TAPS(-0.001094045669120904),\r\n+LPF_TAPS(0.001242214987580476),\r\n+LPF_TAPS(0.001157972860874287),\r\n+LPF_TAPS(-0.001229930679943168),\r\n+LPF_TAPS(-0.001222932376587285),\r\n+LPF_TAPS(0.001215350540382264),\r\n+LPF_TAPS(0.001288888182928606),\r\n+LPF_TAPS(-0.001198397590521112),\r\n+LPF_TAPS(-0.001355802602721991),\r\n+LPF_TAPS(0.001178993801846175),\r\n+LPF_TAPS(0.001423636341627361),\r\n+LPF_TAPS(-0.001157060011381363),\r\n+LPF_TAPS(-0.001492348517489139),\r\n+LPF_TAPS(0.001132515823287145),\r\n+LPF_TAPS(0.001561896692331240),\r\n+LPF_TAPS(-0.001105279494874691),\r\n+LPF_TAPS(-0.001632236906974967),\r\n+LPF_TAPS(0.001075267805358061),\r\n+LPF_TAPS(0.001703323718249198),\r\n+LPF_TAPS(-0.001042395905468702),\r\n+LPF_TAPS(-0.001775110238758652),\r\n+LPF_TAPS(0.001006577145840449),\r\n+LPF_TAPS(0.001847548179171371),\r\n+LPF_TAPS(-0.000967722881817869),\r\n+LPF_TAPS(-0.001920587892981246),\r\n+LPF_TAPS(0.000925742252050820),\r\n+LPF_TAPS(0.001994178423696552),\r\n+LPF_TAPS(-0.000880541927906545),\r\n+LPF_TAPS(-0.002068267554402306),\r\n+LPF_TAPS(0.000832025830346419),\r\n+LPF_TAPS(0.002142801859637292),\r\n+LPF_TAPS(-0.000780094810472054),\r\n+LPF_TAPS(-0.002217726759524548),\r\n+LPF_TAPS(0.000724646289434996),\r\n+LPF_TAPS(0.002292986576088003),\r\n+LPF_TAPS(-0.000665573852808821),\r\n+LPF_TAPS(-0.002368524591684551),\r\n+LPF_TAPS(0.000602766793834741),\r\n+LPF_TAPS(0.002444283109475893),\r\n+LPF_TAPS(-0.000536109599146661),\r\n+LPF_TAPS(-0.002520203515861609),\r\n+LPF_TAPS(0.000465481369642675),\r\n+LPF_TAPS(0.002596226344789195),\r\n+LPF_TAPS(-0.000390755168068576),\r\n+LPF_TAPS(-0.002672291343854694),\r\n+LPF_TAPS(0.000311797283586851),\r\n+LPF_TAPS(0.002748337542102629),\r\n+LPF_TAPS(-0.000228466402077559),\r\n+LPF_TAPS(-0.002824303319430995),\r\n+LPF_TAPS(0.000140612669117720),\r\n+LPF_TAPS(0.002900126477503273),\r\n+LPF_TAPS(-0.000048076630447099),\r\n+LPF_TAPS(-0.002975744312066664),\r\n+LPF_TAPS(-0.000049311967813908),\r\n+LPF_TAPS(0.003051093686572026),\r\n+LPF_TAPS(0.000151735539964805),\r\n+LPF_TAPS(-0.003126111106988650),\r\n+LPF_TAPS(-0.000259390206949400),\r\n+LPF_TAPS(0.003200732797703957),\r\n+LPF_TAPS(0.000372487556785411),\r\n+LPF_TAPS(-0.003274894778395678),\r\n+LPF_TAPS(-0.000491256653256188),\r\n+LPF_TAPS(0.003348532941762045),\r\n+LPF_TAPS(0.000615946333320373),\r\n+LPF_TAPS(-0.003421583131992657),\r\n+LPF_TAPS(-0.000746827841480148),\r\n+LPF_TAPS(0.003493981223861782),\r\n+LPF_TAPS(0.000884197858865158),\r\n+LPF_TAPS(-0.003565663202323037),\r\n+LPF_TAPS(-0.001028381996475798),\r\n+LPF_TAPS(0.003636565242483652),\r\n+LPF_TAPS(0.001179738836445650),\r\n+LPF_TAPS(-0.003706623789834758),\r\n+LPF_TAPS(-0.001338664623068026),\r\n+LPF_TAPS(0.003775775640613427),\r\n+LPF_TAPS(0.001505598727615959),\r\n+LPF_TAPS(-0.003843958022170892),\r\n+LPF_TAPS(-0.001681030038931735),\r\n+LPF_TAPS(0.003911108673221020),\r\n+LPF_TAPS(0.001865504466995201),\r\n+LPF_TAPS(-0.003977165923842889),\r\n+LPF_TAPS(-0.002059633791377601),\r\n+LPF_TAPS(0.004042068775110544),\r\n+LPF_TAPS(0.002264106143571020),\r\n+LPF_TAPS(-0.004105756978223527),\r\n+LPF_TAPS(-0.002479698485574325),\r\n+LPF_TAPS(0.004168171113012271),\r\n+LPF_TAPS(0.002707291542161917),\r\n+LPF_TAPS(-0.004229252665692150),\r\n+LPF_TAPS(-0.002947887768313048),\r\n+LPF_TAPS(0.004288944105741360),\r\n+LPF_TAPS(0.003202633096500789),\r\n+LPF_TAPS(-0.004347188961779128),\r\n+LPF_TAPS(-0.003472843425182641),\r\n+LPF_TAPS(0.004403931896320721),\r\n+LPF_TAPS(0.003760037100055920),\r\n+LPF_TAPS(-0.004459118779288241),\r\n+LPF_TAPS(-0.004065975032297385),\r\n+LPF_TAPS(0.004512696760158023),\r\n+LPF_TAPS(0.004392710634902094),\r\n+LPF_TAPS(-0.004564614338625998),\r\n+LPF_TAPS(-0.004742652500755700),\r\n+LPF_TAPS(0.004614821433675697),\r\n+LPF_TAPS(0.005118643785605256),\r\n+LPF_TAPS(-0.004663269450936213),\r\n+LPF_TAPS(-0.005524063733774922),\r\n+LPF_TAPS(0.004709911348218218),\r\n+LPF_TAPS(0.005962958906579988),\r\n+LPF_TAPS(-0.004754701699120422),\r\n+LPF_TAPS(-0.006440214774937782),\r\n+LPF_TAPS(0.004797596754602302),\r\n+LPF_TAPS(0.006961782948076841),\r\n+LPF_TAPS(-0.004838554502419361),\r\n+LPF_TAPS(-0.007534986291718715),\r\n+LPF_TAPS(0.004877534724323964),\r\n+LPF_TAPS(0.008168934978658603),\r\n+LPF_TAPS(-0.004914499050936128),\r\n+LPF_TAPS(-0.008875103569123370),\r\n+LPF_TAPS(0.004949411014192367),\r\n+LPF_TAPS(0.009668146858266438),\r\n+LPF_TAPS(-0.004982236097286190),\r\n+LPF_TAPS(-0.010567078294794799),\r\n+LPF_TAPS(0.005012941782016459),\r\n+LPF_TAPS(0.011597014009338947),\r\n+LPF_TAPS(-0.005041497593463745),\r\n+LPF_TAPS(-0.012791826735496585),\r\n+LPF_TAPS(0.005067875141921109),\r\n+LPF_TAPS(0.014198316217362795),\r\n+LPF_TAPS(-0.005092048162008614),\r\n+LPF_TAPS(-0.015883013513289131),\r\n+LPF_TAPS(0.005113992548904921),\r\n+LPF_TAPS(0.017943788285475964),\r\n+LPF_TAPS(-0.005133686391636841),\r\n+LPF_TAPS(-0.020530741860699774),\r\n+LPF_TAPS(0.005151110003369837),\r\n+LPF_TAPS(0.023886386121836339),\r\n+LPF_TAPS(-0.005166245948648558),\r\n+LPF_TAPS(-0.028429653831338730),\r\n+LPF_TAPS(0.005179079067541477),\r\n+LPF_TAPS(0.034951922612326908),\r\n+LPF_TAPS(-0.005189596496650059),\r\n+LPF_TAPS(-0.045149079900442757),\r\n+LPF_TAPS(0.005197787686945111),\r\n+LPF_TAPS(0.063430543582118512),\r\n+LPF_TAPS(-0.005203644418401950),\r\n+LPF_TAPS(-0.105964364852374607),\r\n+LPF_TAPS(0.005207160811409030),\r\n+LPF_TAPS(0.318263564357176620),\r\n+LPF_TAPS(0.494791666818391318),\r\n+LPF_TAPS(0.318263564357176620),\r\n+LPF_TAPS(0.005207160811409030),\r\n+LPF_TAPS(-0.105964364852374607),\r\n+LPF_TAPS(-0.005203644418401950),\r\n+LPF_TAPS(0.063430543582118512),\r\n+LPF_TAPS(0.005197787686945111),\r\n+LPF_TAPS(-0.045149079900442757),\r\n+LPF_TAPS(-0.005189596496650059),\r\n+LPF_TAPS(0.034951922612326908),\r\n+LPF_TAPS(0.005179079067541477),\r\n+LPF_TAPS(-0.028429653831338730),\r\n+LPF_TAPS(-0.005166245948648558),\r\n+LPF_TAPS(0.023886386121836339),\r\n+LPF_TAPS(0.005151110003369838),\r\n+LPF_TAPS(-0.020530741860699774),\r\n+LPF_TAPS(-0.005133686391636841),\r\n+LPF_TAPS(0.017943788285475964),\r\n+LPF_TAPS(0.005113992548904922),\r\n+LPF_TAPS(-0.015883013513289131),\r\n+LPF_TAPS(-0.005092048162008615),\r\n+LPF_TAPS(0.014198316217362795),\r\n+LPF_TAPS(0.005067875141921110),\r\n+LPF_TAPS(-0.012791826735496585),\r\n+LPF_TAPS(-0.005041497593463745),\r\n+LPF_TAPS(0.011597014009338947),\r\n+LPF_TAPS(0.005012941782016459),\r\n+LPF_TAPS(-0.010567078294794799),\r\n+LPF_TAPS(-0.004982236097286190),\r\n+LPF_TAPS(0.009668146858266438),\r\n+LPF_TAPS(0.004949411014192368),\r\n+LPF_TAPS(-0.008875103569123370),\r\n+LPF_TAPS(-0.004914499050936128),\r\n+LPF_TAPS(0.008168934978658605),\r\n+LPF_TAPS(0.004877534724323964),\r\n+LPF_TAPS(-0.007534986291718715),\r\n+LPF_TAPS(-0.004838554502419361),\r\n+LPF_TAPS(0.006961782948076841),\r\n+LPF_TAPS(0.004797596754602302),\r\n+LPF_TAPS(-0.006440214774937783),\r\n+LPF_TAPS(-0.004754701699120422),\r\n+LPF_TAPS(0.005962958906579988),\r\n+LPF_TAPS(0.004709911348218218),\r\n+LPF_TAPS(-0.005524063733774922),\r\n+LPF_TAPS(-0.004663269450936213),\r\n+LPF_TAPS(0.005118643785605256),\r\n+LPF_TAPS(0.004614821433675698),\r\n+LPF_TAPS(-0.004742652500755700),\r\n+LPF_TAPS(-0.004564614338625999),\r\n+LPF_TAPS(0.004392710634902094),\r\n+LPF_TAPS(0.004512696760158023),\r\n+LPF_TAPS(-0.004065975032297386),\r\n+LPF_TAPS(-0.004459118779288240),\r\n+LPF_TAPS(0.003760037100055921),\r\n+LPF_TAPS(0.004403931896320721),\r\n+LPF_TAPS(-0.003472843425182641),\r\n+LPF_TAPS(-0.004347188961779128),\r\n+LPF_TAPS(0.003202633096500789),\r\n+LPF_TAPS(0.004288944105741361),\r\n+LPF_TAPS(-0.002947887768313048),\r\n+LPF_TAPS(-0.004229252665692151),\r\n+LPF_TAPS(0.002707291542161917),\r\n+LPF_TAPS(0.004168171113012272),\r\n+LPF_TAPS(-0.002479698485574325),\r\n+LPF_TAPS(-0.004105756978223527),\r\n+LPF_TAPS(0.002264106143571020),\r\n+LPF_TAPS(0.004042068775110545),\r\n+LPF_TAPS(-0.002059633791377602),\r\n+LPF_TAPS(-0.003977165923842889),\r\n+LPF_TAPS(0.001865504466995201),\r\n+LPF_TAPS(0.003911108673221020),\r\n+LPF_TAPS(-0.001681030038931735),\r\n+LPF_TAPS(-0.003843958022170892),\r\n+LPF_TAPS(0.001505598727615959),\r\n+LPF_TAPS(0.003775775640613427),\r\n+LPF_TAPS(-0.001338664623068026),\r\n+LPF_TAPS(-0.003706623789834758),\r\n+LPF_TAPS(0.001179738836445650),\r\n+LPF_TAPS(0.003636565242483653),\r\n+LPF_TAPS(-0.001028381996475798),\r\n+LPF_TAPS(-0.003565663202323037),\r\n+LPF_TAPS(0.000884197858865158),\r\n+LPF_TAPS(0.003493981223861783),\r\n+LPF_TAPS(-0.000746827841480148),\r\n+LPF_TAPS(-0.003421583131992658),\r\n+LPF_TAPS(0.000615946333320373),\r\n+LPF_TAPS(0.003348532941762046),\r\n+LPF_TAPS(-0.000491256653256187),\r\n+LPF_TAPS(-0.003274894778395678),\r\n+LPF_TAPS(0.000372487556785411),\r\n+LPF_TAPS(0.003200732797703957),\r\n+LPF_TAPS(-0.000259390206949401),\r\n+LPF_TAPS(-0.003126111106988651),\r\n+LPF_TAPS(0.000151735539964805),\r\n+LPF_TAPS(0.003051093686572026),\r\n+LPF_TAPS(-0.000049311967813908),\r\n+LPF_TAPS(-0.002975744312066664),\r\n+LPF_TAPS(-0.000048076630447099),\r\n+LPF_TAPS(0.002900126477503272),\r\n+LPF_TAPS(0.000140612669117720),\r\n+LPF_TAPS(-0.002824303319430995),\r\n+LPF_TAPS(-0.000228466402077559),\r\n+LPF_TAPS(0.002748337542102630),\r\n+LPF_TAPS(0.000311797283586851),\r\n+LPF_TAPS(-0.002672291343854695),\r\n+LPF_TAPS(-0.000390755168068576),\r\n+LPF_TAPS(0.002596226344789195),\r\n+LPF_TAPS(0.000465481369642675),\r\n+LPF_TAPS(-0.002520203515861609),\r\n+LPF_TAPS(-0.000536109599146661),\r\n+LPF_TAPS(0.002444283109475894),\r\n+LPF_TAPS(0.000602766793834741),\r\n+LPF_TAPS(-0.002368524591684551),\r\n+LPF_TAPS(-0.000665573852808821),\r\n+LPF_TAPS(0.002292986576088003),\r\n+LPF_TAPS(0.000724646289434996),\r\n+LPF_TAPS(-0.002217726759524548),\r\n+LPF_TAPS(-0.000780094810472054),\r\n+LPF_TAPS(0.002142801859637292),\r\n+LPF_TAPS(0.000832025830346418),\r\n+LPF_TAPS(-0.002068267554402307),\r\n+LPF_TAPS(-0.000880541927906545),\r\n+LPF_TAPS(0.001994178423696553),\r\n+LPF_TAPS(0.000925742252050820),\r\n+LPF_TAPS(-0.001920587892981246),\r\n+LPF_TAPS(-0.000967722881817869),\r\n+LPF_TAPS(0.001847548179171371),\r\n+LPF_TAPS(0.001006577145840448),\r\n+LPF_TAPS(-0.001775110238758653),\r\n+LPF_TAPS(-0.001042395905468702),\r\n+LPF_TAPS(0.001703323718249198),\r\n+LPF_TAPS(0.001075267805358061),\r\n+LPF_TAPS(-0.001632236906974967),\r\n+LPF_TAPS(-0.001105279494874691),\r\n+LPF_TAPS(0.001561896692331240),\r\n+LPF_TAPS(0.001132515823287146),\r\n+LPF_TAPS(-0.001492348517489139),\r\n+LPF_TAPS(-0.001157060011381363),\r\n+LPF_TAPS(0.001423636341627361),\r\n+LPF_TAPS(0.001178993801846175),\r\n+LPF_TAPS(-0.001355802602721991),\r\n+LPF_TAPS(-0.001198397590521113),\r\n+LPF_TAPS(0.001288888182928606),\r\n+LPF_TAPS(0.001215350540382264),\r\n+LPF_TAPS(-0.001222932376587285),\r\n+LPF_TAPS(-0.001229930679943168),\r\n+LPF_TAPS(0.001157972860874288),\r\n+LPF_TAPS(0.001242214987580477),\r\n+LPF_TAPS(-0.001094045669120904),\r\n+LPF_TAPS(-0.001252279463143894),\r\n+LPF_TAPS(0.001031185166814938),\r\n+LPF_TAPS(0.001260199188078142),\r\n+LPF_TAPS(-0.000969424030294817),\r\n+LPF_TAPS(-0.001266048375166084),\r\n+LPF_TAPS(0.000908793228141729),\r\n+LPF_TAPS(0.001269900408902515),\r\n+LPF_TAPS(-0.000849322005271671),\r\n+LPF_TAPS(-0.001271827877412626),\r\n+LPF_TAPS(0.000791037869722423),\r\n+LPF_TAPS(0.001271902596749720),\r\n+LPF_TAPS(-0.000733966582127433),\r\n+LPF_TAPS(-0.001270195628333515),\r\n+LPF_TAPS(0.000678132147863779),\r\n+LPF_TAPS(0.001266777290225573),\r\n+LPF_TAPS(-0.000623556811856090),\r\n+LPF_TAPS(-0.001261717162878848),\r\n+LPF_TAPS(0.000570261056014149),\r\n+LPF_TAPS(0.001255084089948549),\r\n+LPF_TAPS(-0.000518263599278438),\r\n+LPF_TAPS(-0.001246946174701972),\r\n+LPF_TAPS(0.000467581400242392),\r\n+LPF_TAPS(0.001237370772523770),\r\n+LPF_TAPS(-0.000418229662315629),\r\n+LPF_TAPS(-0.001226424479975014),\r\n+LPF_TAPS(0.000370221841390830),\r\n+LPF_TAPS(0.001214173120828369),\r\n+LPF_TAPS(-0.000323569655969105),\r\n+LPF_TAPS(-0.001200681729471177),\r\n+LPF_TAPS(0.000278283099698674),\r\n+LPF_TAPS(0.001186014532038875),\r\n+LPF_TAPS(-0.000234370456275451),\r\n+LPF_TAPS(-0.001170234925614872),\r\n+LPF_TAPS(0.000191838316651094),\r\n+LPF_TAPS(0.001153405455808370),\r\n+LPF_TAPS(-0.000150691598491106),\r\n+LPF_TAPS(-0.001135587793000342),\r\n+LPF_TAPS(0.000110933567822261),\r\n+LPF_TAPS(0.001116842707526315),\r\n+LPF_TAPS(-0.000072565862804956),\r\n+LPF_TAPS(-0.001097230044046120),\r\n+LPF_TAPS(0.000035588519562657),\r\n+LPF_TAPS(0.001076808695333126),\r\n+LPF_TAPS(0.000000000000000001),\r\n+LPF_TAPS(-0.001055636575699027),\r\n+LPF_TAPS(-0.000034202778465030),\r\n+LPF_TAPS(0.001033770594254894),\r\n+LPF_TAPS(0.000067024411328462),\r\n+LPF_TAPS(-0.001011266628194997),\r\n+LPF_TAPS(-0.000098470973665477),\r\n+LPF_TAPS(0.000988179496276456),\r\n+LPF_TAPS(0.000128549985113490),\r\n+LPF_TAPS(-0.000964562932655105),\r\n+LPF_TAPS(-0.000157270373253856),\r\n+LPF_TAPS(0.000940469561226123),\r\n+LPF_TAPS(0.000184642435476311),\r\n+LPF_TAPS(-0.000915950870606545),\r\n+LPF_TAPS(-0.000210677799411442),\r\n+LPF_TAPS(0.000891057189886533),\r\n+LPF_TAPS(0.000235389382017556),\r\n+LPF_TAPS(-0.000865837665265529),\r\n+LPF_TAPS(-0.000258791347409589),\r\n+LPF_TAPS(0.000840340237680265),\r\n+LPF_TAPS(0.000280899063519201),\r\n+LPF_TAPS(-0.000814611621522313),\r\n+LPF_TAPS(-0.000301729057676401),\r\n+LPF_TAPS(0.000788697284533992),\r\n+LPF_TAPS(0.000321298971202047),\r\n+LPF_TAPS(-0.000762641428962928),\r\n+LPF_TAPS(-0.000339627513103736),\r\n+LPF_TAPS(0.000736486974048094),\r\n+LPF_TAPS(0.000356734412965341),\r\n+LPF_TAPS(-0.000710275539901574),\r\n+LPF_TAPS(-0.000372640373122280),\r\n+LPF_TAPS(0.000684047432843816),\r\n+LPF_TAPS(0.000387367020214454),\r\n+LPF_TAPS(-0.000657841632242460),\r\n+LPF_TAPS(-0.000400936856207481),\r\n+LPF_TAPS(0.000631695778898094),\r\n+LPF_TAPS(0.000413373208973719),\r\n+LPF_TAPS(-0.000605646165013736),\r\n+LPF_TAPS(-0.000424700182523640),\r\n+LPF_TAPS(0.000579727725779194),\r\n+LPF_TAPS(0.000434942606977188),\r\n+LPF_TAPS(-0.000553974032593938),\r\n+LPF_TAPS(-0.000444125988363888),\r\n+LPF_TAPS(0.000528417287947739),\r\n+LPF_TAPS(0.000452276458339745),\r\n+LPF_TAPS(-0.000503088321972070),\r\n+LPF_TAPS(-0.000459420723907908),\r\n+LPF_TAPS(0.000478016590669961),\r\n+LPF_TAPS(0.000465586017227704),\r\n+LPF_TAPS(-0.000453230175826497),\r\n+LPF_TAPS(-0.000470800045596782),\r\n+LPF_TAPS(0.000428755786598220),\r\n+LPF_TAPS(0.000475090941687848),\r\n+LPF_TAPS(-0.000404618762773439),\r\n+LPF_TAPS(-0.000478487214120758),\r\n+LPF_TAPS(0.000380843079692384),\r\n+LPF_TAPS(0.000481017698448667),\r\n+LPF_TAPS(-0.000357451354810840),\r\n+LPF_TAPS(-0.000482711508634332),\r\n+LPF_TAPS(0.000334464855886926),\r\n+LPF_TAPS(0.000483597989091137),\r\n+LPF_TAPS(-0.000311903510766968),\r\n+LPF_TAPS(-0.000483706667360984),\r\n+LPF_TAPS(0.000289785918742595),\r\n+LPF_TAPS(0.000483067207498627),\r\n+LPF_TAPS(-0.000268129363447485),\r\n+LPF_TAPS(-0.000481709364229587),\r\n+LPF_TAPS(0.000246949827258589),\r\n+LPF_TAPS(0.000479662937946381),\r\n+LPF_TAPS(-0.000226262007164248),\r\n+LPF_TAPS(-0.000476957730605114),\r\n+LPF_TAPS(0.000206079332057869),\r\n+LPF_TAPS(0.000473623502581409),\r\n+LPF_TAPS(-0.000186413981413071),\r\n+LPF_TAPS(-0.000469689930542188),\r\n+LPF_TAPS(0.000167276905294243),\r\n+LPF_TAPS(0.000465186566386891),\r\n+LPF_TAPS(-0.000148677845653371),\r\n+LPF_TAPS(-0.000460142797308446),\r\n+LPF_TAPS(0.000130625358861683),\r\n+LPF_TAPS(0.000454587807021608),\r\n+LPF_TAPS(-0.000113126839423332),\r\n+LPF_TAPS(-0.000448550538203314),\r\n+LPF_TAPS(0.000096188544815881),\r\n+LPF_TAPS(0.000442059656186037),\r\n+LPF_TAPS(-0.000079815621400166),\r\n+LPF_TAPS(-0.000435143513942679),\r\n+LPF_TAPS(0.000064012131341976),\r\n+LPF_TAPS(0.000427830118398051),\r\n+LPF_TAPS(-0.000048781080485743),\r\n+LPF_TAPS(-0.000420147098098687),\r\n+LPF_TAPS(0.000034124447118409),\r\n+LPF_TAPS(0.000412121672269845),\r\n+LPF_TAPS(-0.000020043211562898),\r\n+LPF_TAPS(-0.000403780621285212),\r\n+LPF_TAPS(0.000006537386537703),\r\n+LPF_TAPS(0.000395150258571598),\r\n+LPF_TAPS(0.000006393951780809),\r\n+LPF_TAPS(-0.000386256403967828),\r\n+LPF_TAPS(-0.000018752632056849),\r\n+LPF_TAPS(0.000377124358553826),\r\n+LPF_TAPS(0.000030541355518856),\r\n+LPF_TAPS(-0.000367778880962729),\r\n+LPF_TAPS(-0.000041763663172922),\r\n+LPF_TAPS(0.000358244165185824),\r\n+LPF_TAPS(0.000052423902570022),\r\n+LPF_TAPS(-0.000348543819876908),\r\n+LPF_TAPS(-0.000062527194191441),\r\n+LPF_TAPS(0.000338700849159801),\r\n+LPF_TAPS(0.000072079397516850),\r\n+LPF_TAPS(-0.000328737634939617),\r\n+LPF_TAPS(-0.000081087076837988),\r\n+LPF_TAPS(0.000318675920715468),\r\n+LPF_TAPS(0.000089557466881093),\r\n+LPF_TAPS(-0.000308536796889541),\r\n+LPF_TAPS(-0.000097498438301123),\r\n+LPF_TAPS(0.000298340687564529),\r\n+LPF_TAPS(0.000104918463108302),\r\n+LPF_TAPS(-0.000288107338818654),\r\n+LPF_TAPS(-0.000111826580088162),\r\n+LPF_TAPS(0.000277855808445009),\r\n+LPF_TAPS(0.000118232360274576),\r\n+LPF_TAPS(-0.000267604457139195),\r\n+LPF_TAPS(-0.000124145872533844),\r\n+LPF_TAPS(0.000257370941116722),\r\n+LPF_TAPS(0.000129577649317022),\r\n+LPF_TAPS(-0.000247172206139378),\r\n+LPF_TAPS(-0.000134538652636258),\r\n+LPF_TAPS(0.000237024482927353),\r\n+LPF_TAPS(0.000139040240319026),\r\n+LPF_TAPS(-0.000226943283931415),\r\n+LPF_TAPS(-0.000143094132592875),\r\n+LPF_TAPS(0.000216943401437930),\r\n+LPF_TAPS(0.000146712379051885),\r\n+LPF_TAPS(-0.000207038906976829),\r\n+LPF_TAPS(-0.000149907326053507),\r\n+LPF_TAPS(0.000197243152000898),\r\n+LPF_TAPS(0.000152691584593175),\r\n+LPF_TAPS(-0.000187568769803268),\r\n+LPF_TAPS(-0.000155077998702502),\r\n+LPF_TAPS(0.000178027678637799),\r\n+LPF_TAPS(0.000157079614413860),\r\n+LPF_TAPS(-0.000168631086005580),\r\n+LPF_TAPS(-0.000158709649333105),\r\n+LPF_TAPS(0.000159389494069615),\r\n+LPF_TAPS(0.000159981462859707),\r\n+LPF_TAPS(-0.000150312706157744),\r\n+LPF_TAPS(-0.000160908527091470),\r\n+LPF_TAPS(0.000141409834313202),\r\n+LPF_TAPS(0.000161504398448678),\r\n+LPF_TAPS(-0.000132689307850565),\r\n+LPF_TAPS(-0.000161782690050796),\r\n+LPF_TAPS(0.000124158882874344),\r\n+LPF_TAPS(0.000161757044876159),\r\n+LPF_TAPS(-0.000115825652715863),\r\n+LPF_TAPS(-0.000161441109732857),\r\n+LPF_TAPS(0.000107696059243807),\r\n+LPF_TAPS(0.000160848510067184),\r\n+LPF_TAPS(-0.000099775905003113),\r\n+LPF_TAPS(-0.000159992825633266),\r\n+LPF_TAPS(0.000092070366135805),\r\n+LPF_TAPS(0.000158887567045323),\r\n+LPF_TAPS(-0.000084584006037386),\r\n+LPF_TAPS(-0.000157546153231995),\r\n+LPF_TAPS(0.000077320789702193),\r\n+LPF_TAPS(0.000155981889809561),\r\n+LPF_TAPS(-0.000070284098709880),\r\n+LPF_TAPS(-0.000154207948388639),\r\n+LPF_TAPS(0.000063476746806541),\r\n+LPF_TAPS(0.000152237346827124),\r\n+LPF_TAPS(-0.000056900996032834),\r\n+LPF_TAPS(-0.000150082930439164),\r\n+LPF_TAPS(0.000050558573351575),\r\n+LPF_TAPS(0.000147757354168510),\r\n+LPF_TAPS(-0.000044450687728521),\r\n+LPF_TAPS(-0.000145273065731922),\r\n+LPF_TAPS(0.000038578047618915),\r\n+LPF_TAPS(0.000142642289736313),\r\n+LPF_TAPS(-0.000032940878813716),\r\n+LPF_TAPS(-0.000139877012771326),\r\n+LPF_TAPS(0.000027538942599739),\r\n+LPF_TAPS(0.000136988969476841),\r\n+LPF_TAPS(-0.000022371554188088),\r\n+LPF_TAPS(-0.000133989629582932),\r\n+LPF_TAPS(0.000017437601366372),\r\n+LPF_TAPS(0.000130890185917930),\r\n+LPF_TAPS(-0.000012735563330892),\r\n+LPF_TAPS(-0.000127701543378277),\r\n+LPF_TAPS(0.000008263529655400),\r\n+LPF_TAPS(0.000124434308851991),\r\n+LPF_TAPS(-0.000004019219354460),\r\n+LPF_TAPS(-0.000121098782085899),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000117704947484981),\r\n+LPF_TAPS(0.000003797093148942),\r\n+LPF_TAPS(-0.000114262466830563),\r\n+LPF_TAPS(-0.000007375338042619),\r\n+LPF_TAPS(0.000110780672902561),\r\n+LPF_TAPS(0.000010738306800940),\r\n+LPF_TAPS(-0.000107268563989415),\r\n+LPF_TAPS(-0.000013889846774370),\r\n+LPF_TAPS(0.000103734799267992),\r\n+LPF_TAPS(0.000016834061741043),\r\n+LPF_TAPS(-0.000100187695034353),\r\n+LPF_TAPS(-0.000019575293274054),\r\n+LPF_TAPS(0.000096635221765021),\r\n+LPF_TAPS(0.000022118102311547),\r\n+LPF_TAPS(-0.000093085001987199),\r\n+LPF_TAPS(-0.000024467250961158),\r\n+LPF_TAPS(0.000089544308935324),\r\n+LPF_TAPS(0.000026627684568545),\r\n+LPF_TAPS(-0.000086020065970184),\r\n+LPF_TAPS(-0.000028604514078264),\r\n+LPF_TAPS(0.000082518846736081),\r\n+LPF_TAPS(0.000030402998714268),\r\n+LPF_TAPS(-0.000079046876030527),\r\n+LPF_TAPS(-0.000032028529004963),\r\n+LPF_TAPS(0.000075610031360122),\r\n+LPF_TAPS(0.000033486610176828),\r\n+LPF_TAPS(-0.000072213845155834),\r\n+LPF_TAPS(-0.000034782845939036),\r\n+LPF_TAPS(0.000068863507619961),\r\n+LPF_TAPS(0.000035922922679381),\r\n+LPF_TAPS(-0.000065563870176755),\r\n+LPF_TAPS(-0.000036912594090979),\r\n+LPF_TAPS(0.000062319449498186),\r\n+LPF_TAPS(0.000037757666247151),\r\n+LPF_TAPS(-0.000059134432075883),\r\n+LPF_TAPS(-0.000038463983140413),\r\n+LPF_TAPS(0.000056012679310092),\r\n+LPF_TAPS(0.000039037412700123),\r\n+LPF_TAPS(-0.000052957733086275),\r\n+LPF_TAPS(-0.000039483833301589),\r\n+LPF_TAPS(0.000049972821809768),\r\n+LPF_TAPS(0.000039809120777898),\r\n+LPF_TAPS(-0.000047060866868922),\r\n+LPF_TAPS(-0.000040019135944408),\r\n+LPF_TAPS(0.000044224489497212),\r\n+LPF_TAPS(0.000040119712644108),\r\n+LPF_TAPS(-0.000041466018004756),\r\n+LPF_TAPS(-0.000040116646320761),\r\n+LPF_TAPS(0.000038787495349966),\r\n+LPF_TAPS(0.000040015683125125),\r\n+LPF_TAPS(-0.000036190687022217),\r\n+LPF_TAPS(-0.000039822509558359),\r\n+LPF_TAPS(0.000033677089206780),\r\n+LPF_TAPS(0.000039542742655132),\r\n+LPF_TAPS(-0.000031247937203481),\r\n+LPF_TAPS(-0.000039181920707691),\r\n+LPF_TAPS(0.000028904214071107),\r\n+LPF_TAPS(0.000038745494530907),\r\n+LPF_TAPS(-0.000026646659470014),\r\n+LPF_TAPS(-0.000038238819266954),\r\n+LPF_TAPS(0.000024475778675831),\r\n+LPF_TAPS(0.000037667146727081),\r\n+LPF_TAPS(-0.000022391851737813),\r\n+LPF_TAPS(-0.000037035618266847),\r\n+LPF_TAPS(0.000020394942756081),\r\n+LPF_TAPS(0.000036349258189961),\r\n+LPF_TAPS(-0.000018484909252414),\r\n+LPF_TAPS(-0.000035612967674835),\r\n+LPF_TAPS(0.000016661411610296),\r\n+LPF_TAPS(0.000034831519217002),\r\n+LPF_TAPS(-0.000014923922560452),\r\n+LPF_TAPS(-0.000034009551579453),\r\n+LPF_TAPS(0.000013271736688854),\r\n+LPF_TAPS(0.000033151565242131),\r\n+LPF_TAPS(-0.000011703979945270),\r\n+LPF_TAPS(-0.000032261918340969),\r\n+LPF_TAPS(0.000010219619130956),\r\n+LPF_TAPS(0.000031344823085946),\r\n+LPF_TAPS(-0.000008817471345155),\r\n+LPF_TAPS(-0.000030404342647009),\r\n+LPF_TAPS(0.000007496213370957),\r\n+LPF_TAPS(0.000029444388495961),\r\n+LPF_TAPS(-0.000006254390981889),\r\n+LPF_TAPS(-0.000028468718191753),\r\n+LPF_TAPS(0.000005090428151623),\r\n+LPF_TAPS(0.000027480933596112),\r\n+LPF_TAPS(-0.000004002636150150),\r\n+LPF_TAPS(-0.000026484479505846),\r\n+LPF_TAPS(0.000002989222510623),\r\n+LPF_TAPS(0.000025482642687743),\r\n+LPF_TAPS(-0.000002048299852131),\r\n+LPF_TAPS(-0.000024478551301565),\r\n+LPF_TAPS(0.000001177894544622),\r\n+LPF_TAPS(0.000023475174696270),\r\n+LPF_TAPS(-0.000000375955203094),\r\n+LPF_TAPS(-0.000022475323564316),\r\n+LPF_TAPS(-0.000000359639000791),\r\n+LPF_TAPS(0.000021481650438649),\r\n+LPF_TAPS(0.000001031070220591),\r\n+LPF_TAPS(-0.000020496650516781),\r\n+LPF_TAPS(-0.000001640574020396),\r\n+LPF_TAPS(0.000019522662796228),\r\n+LPF_TAPS(0.000002190431672634),\r\n+LPF_TAPS(-0.000018561871505499),\r\n+LPF_TAPS(-0.000002682962676418),\r\n+LPF_TAPS(0.000017616307814767),\r\n+LPF_TAPS(0.000003120517503602),\r\n+LPF_TAPS(-0.000016687851810380),\r\n+LPF_TAPS(-0.000003505470578851),\r\n+LPF_TAPS(0.000015778234717405),\r\n+LPF_TAPS(0.000003840213499109),\r\n+LPF_TAPS(-0.000014889041354518),\r\n+LPF_TAPS(-0.000004127148496975),\r\n+LPF_TAPS(0.000014021712805663),\r\n+LPF_TAPS(0.000004368682151773),\r\n+LPF_TAPS(-0.000013177549293115),\r\n+LPF_TAPS(-0.000004567219351147),\r\n+LPF_TAPS(0.000012357713236772),\r\n+LPF_TAPS(0.000004725157505337),\r\n+LPF_TAPS(-0.000011563232484775),\r\n+LPF_TAPS(-0.000004844881015559),\r\n+LPF_TAPS(0.000010795003700833),\r\n+LPF_TAPS(0.000004928755997066),\r\n+LPF_TAPS(-0.000010053795893948),\r\n+LPF_TAPS(-0.000004979125256946),\r\n+LPF_TAPS(0.000009340254076601),\r\n+LPF_TAPS(0.000004998303525934),\r\n+LPF_TAPS(-0.000008654903037807),\r\n+LPF_TAPS(-0.000004988572942947),\r\n+LPF_TAPS(0.000007998151217884),\r\n+LPF_TAPS(0.000004952178790474),\r\n+LPF_TAPS(-0.000007370294672177),\r\n+LPF_TAPS(-0.000004891325478376),\r\n+LPF_TAPS(0.000006771521111433),\r\n+LPF_TAPS(0.000004808172773150),\r\n+LPF_TAPS(-0.000006201914006985),\r\n+LPF_TAPS(-0.000004704832269243),\r\n+LPF_TAPS(0.000005661456749387),\r\n+LPF_TAPS(0.000004583364098553),\r\n+LPF_TAPS(-0.000005150036849619),\r\n+LPF_TAPS(-0.000004445773873841),\r\n+LPF_TAPS(0.000004667450172476),\r\n+LPF_TAPS(0.000004294009861432),\r\n+LPF_TAPS(-0.000004213405192313),\r\n+LPF_TAPS(-0.000004129960378251),\r\n+LPF_TAPS(0.000003787527261756),\r\n+LPF_TAPS(0.000003955451407915),\r\n+LPF_TAPS(-0.000003389362884580),\r\n+LPF_TAPS(-0.000003772244430401),\r\n+LPF_TAPS(0.000003018383984428),\r\n+LPF_TAPS(0.000003582034459542),\r\n+LPF_TAPS(-0.000002673992161604),\r\n+LPF_TAPS(-0.000003386448282433),\r\n+LPF_TAPS(0.000002355522930638),\r\n+LPF_TAPS(0.000003187042894687),\r\n+LPF_TAPS(-0.000002062249931914),\r\n+LPF_TAPS(-0.000002985304125357),\r\n+LPF_TAPS(0.000001793389111064),\r\n+LPF_TAPS(0.000002782645445234),\r\n+LPF_TAPS(-0.000001548102860405),\r\n+LPF_TAPS(-0.000002580406952221),\r\n+LPF_TAPS(0.000001325504117162),\r\n+LPF_TAPS(0.000002379854527418),\r\n+LPF_TAPS(-0.000001124660413670),\r\n+LPF_TAPS(-0.000002182179155572),\r\n+LPF_TAPS(0.000000944597875235),\r\n+LPF_TAPS(0.000001988496403598),\r\n+LPF_TAPS(-0.000000784305161806),\r\n+LPF_TAPS(-0.000001799846050903),\r\n+LPF_TAPS(0.000000642737349976),\r\n+LPF_TAPS(0.000001617191865353),\r\n+LPF_TAPS(-0.000000518819752302),\r\n+LPF_TAPS(-0.000001441421518830),\r\n+LPF_TAPS(0.000000411451671308),\r\n+LPF_TAPS(0.000001273346636437),\r\n+LPF_TAPS(-0.000000319510085909),\r\n+LPF_TAPS(-0.000001113702973585),\r\n+LPF_TAPS(0.000000241853268333),\r\n+LPF_TAPS(0.000000963150715332),\r\n+LPF_TAPS(-0.000000177324329996),\r\n+LPF_TAPS(-0.000000822274892573),\r\n+LPF_TAPS(0.000000124754695030),\r\n+LPF_TAPS(0.000000691585909819),\r\n+LPF_TAPS(-0.000000082967500509),\r\n+LPF_TAPS(-0.000000571520179580),\r\n+LPF_TAPS(0.000000050780922643),\r\n+LPF_TAPS(0.000000462440858539),\r\n+LPF_TAPS(-0.000000027011428462),\r\n+LPF_TAPS(-0.000000364638680968),\r\n+LPF_TAPS(0.000000010476952729),\r\n+LPF_TAPS(0.000000278332885067),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000203672228149),\r\n+LPF_TAPS(-0.000000005589328078),\r\n+LPF_TAPS(0.000000140736086864),\r\n+LPF_TAPS(0.000000007450379996),\r\n+LPF_TAPS(-0.000000089535638879),\r\n+LPF_TAPS(-0.000000006729075807),\r\n+LPF_TAPS(0.000000050015122713),\r\n+LPF_TAPS(0.000000004555102289),\r\n+LPF_TAPS(-0.000000022053172665),\r\n+LPF_TAPS(-0.000000002039181362),\r\n+LPF_TAPS(0.000000005464226025),\r\n+LPF_TAPS(0.000000000270411187),\r\n+LPF_TAPS(0.000000000000000000),\r\n+};\r\ndiff --git a/core/sound/blip_lpf_768K_24K.h b/core/sound/blip_lpf_768K_24K.h\nnew file mode 100644\nindex 000000000..53ff7b178\n--- /dev/null\n+++ b/core/sound/blip_lpf_768K_24K.h\n@@ -0,0 +1,1181 @@\n+static buf_t const blip_lpf_768K_24K[blip_lpf_768K_taps] = {\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000001152484340),\r\n+LPF_TAPS(-0.000000005095710178),\r\n+LPF_TAPS(-0.000000012191318007),\r\n+LPF_TAPS(-0.000000022267607829),\r\n+LPF_TAPS(-0.000000034599414872),\r\n+LPF_TAPS(-0.000000047931559441),\r\n+LPF_TAPS(-0.000000060545647801),\r\n+LPF_TAPS(-0.000000070367396870),\r\n+LPF_TAPS(-0.000000075109154481),\r\n+LPF_TAPS(-0.000000072440019472),\r\n+LPF_TAPS(-0.000000060174053095),\r\n+LPF_TAPS(-0.000000036465621112),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000049832918420),\r\n+LPF_TAPS(0.000000112793649081),\r\n+LPF_TAPS(0.000000187687704968),\r\n+LPF_TAPS(0.000000272309003584),\r\n+LPF_TAPS(0.000000363439182757),\r\n+LPF_TAPS(0.000000456907299830),\r\n+LPF_TAPS(0.000000547711411542),\r\n+LPF_TAPS(0.000000630200331088),\r\n+LPF_TAPS(0.000000698310581159),\r\n+LPF_TAPS(0.000000745850363362),\r\n+LPF_TAPS(0.000000766819403203),\r\n+LPF_TAPS(0.000000755750958378),\r\n+LPF_TAPS(0.000000708060236928),\r\n+LPF_TAPS(0.000000620382081976),\r\n+LPF_TAPS(0.000000490880137644),\r\n+LPF_TAPS(0.000000319509882033),\r\n+LPF_TAPS(0.000000108218929585),\r\n+LPF_TAPS(-0.000000138930138694),\r\n+LPF_TAPS(-0.000000415726506026),\r\n+LPF_TAPS(-0.000000713876132379),\r\n+LPF_TAPS(-0.000001023169801964),\r\n+LPF_TAPS(-0.000001331754540171),\r\n+LPF_TAPS(-0.000001626504038801),\r\n+LPF_TAPS(-0.000001893478950466),\r\n+LPF_TAPS(-0.000002118463259581),\r\n+LPF_TAPS(-0.000002287558619334),\r\n+LPF_TAPS(-0.000002387814767604),\r\n+LPF_TAPS(-0.000002407871092248),\r\n+LPF_TAPS(-0.000002338582277506),\r\n+LPF_TAPS(-0.000002173599867573),\r\n+LPF_TAPS(-0.000001909881632425),\r\n+LPF_TAPS(-0.000001548101872579),\r\n+LPF_TAPS(-0.000001092938263905),\r\n+LPF_TAPS(-0.000000553214480790),\r\n+LPF_TAPS(0.000000058117445035),\r\n+LPF_TAPS(0.000000724165411796),\r\n+LPF_TAPS(0.000001424460145696),\r\n+LPF_TAPS(0.000002135489726262),\r\n+LPF_TAPS(0.000002831395534679),\r\n+LPF_TAPS(0.000003484812208163),\r\n+LPF_TAPS(0.000004067827273334),\r\n+LPF_TAPS(0.000004553029819940),\r\n+LPF_TAPS(0.000004914612148722),\r\n+LPF_TAPS(0.000005129484047575),\r\n+LPF_TAPS(0.000005178356448336),\r\n+LPF_TAPS(0.000005046749878656),\r\n+LPF_TAPS(0.000004725883481839),\r\n+LPF_TAPS(0.000004213402503791),\r\n+LPF_TAPS(0.000003513906045182),\r\n+LPF_TAPS(0.000002639242484125),\r\n+LPF_TAPS(0.000001608547155233),\r\n+LPF_TAPS(0.000000448005422616),\r\n+LPF_TAPS(-0.000000809666058306),\r\n+LPF_TAPS(-0.000002126016652791),\r\n+LPF_TAPS(-0.000003457923533233),\r\n+LPF_TAPS(-0.000004758892958091),\r\n+LPF_TAPS(-0.000005980565575676),\r\n+LPF_TAPS(-0.000007074380617936),\r\n+LPF_TAPS(-0.000007993345409950),\r\n+LPF_TAPS(-0.000008693849789841),\r\n+LPF_TAPS(-0.000009137460147870),\r\n+LPF_TAPS(-0.000009292625130319),\r\n+LPF_TAPS(-0.000009136224819149),\r\n+LPF_TAPS(-0.000008654897515219),\r\n+LPF_TAPS(-0.000007846083153315),\r\n+LPF_TAPS(-0.000006718729797308),\r\n+LPF_TAPS(-0.000005293619442137),\r\n+LPF_TAPS(-0.000003603281228946),\r\n+LPF_TAPS(-0.000001691473813720),\r\n+LPF_TAPS(0.000000387766409326),\r\n+LPF_TAPS(0.000002571498736137),\r\n+LPF_TAPS(0.000004789644663852),\r\n+LPF_TAPS(0.000006967103138217),\r\n+LPF_TAPS(0.000009026155308364),\r\n+LPF_TAPS(0.000010889086159912),\r\n+LPF_TAPS(0.000012480939038455),\r\n+LPF_TAPS(0.000013732310264828),\r\n+LPF_TAPS(0.000014582085215692),\r\n+LPF_TAPS(0.000014980014741443),\r\n+LPF_TAPS(0.000014889031854004),\r\n+LPF_TAPS(0.000014287213355241),\r\n+LPF_TAPS(0.000013169299478268),\r\n+LPF_TAPS(0.000011547696530582),\r\n+LPF_TAPS(0.000009452902677324),\r\n+LPF_TAPS(0.000006933314973567),\r\n+LPF_TAPS(0.000004054396015711),\r\n+LPF_TAPS(0.000000897200498571),\r\n+LPF_TAPS(-0.000002443715184290),\r\n+LPF_TAPS(-0.000005862954157649),\r\n+LPF_TAPS(-0.000009247442627863),\r\n+LPF_TAPS(-0.000012480006488093),\r\n+LPF_TAPS(-0.000015443253135853),\r\n+LPF_TAPS(-0.000018023635212619),\r\n+LPF_TAPS(-0.000020115561256850),\r\n+LPF_TAPS(-0.000021625410855532),\r\n+LPF_TAPS(-0.000022475309223088),\r\n+LPF_TAPS(-0.000022606518515204),\r\n+LPF_TAPS(-0.000021982310715217),\r\n+LPF_TAPS(-0.000020590199549203),\r\n+LPF_TAPS(-0.000018443426346149),\r\n+LPF_TAPS(-0.000015581616633170),\r\n+LPF_TAPS(-0.000012070549940901),\r\n+LPF_TAPS(-0.000008001014031039),\r\n+LPF_TAPS(-0.000003486745649395),\r\n+LPF_TAPS(0.000001338508053458),\r\n+LPF_TAPS(0.000006324741191609),\r\n+LPF_TAPS(0.000011310156627793),\r\n+LPF_TAPS(0.000016126223163572),\r\n+LPF_TAPS(0.000020603170792004),\r\n+LPF_TAPS(0.000024575751153583),\r\n+LPF_TAPS(0.000027889074347600),\r\n+LPF_TAPS(0.000030404323246372),\r\n+LPF_TAPS(0.000032004143012902),\r\n+LPF_TAPS(0.000032597506998249),\r\n+LPF_TAPS(0.000032123870727846),\r\n+LPF_TAPS(0.000030556443168657),\r\n+LPF_TAPS(0.000027904428545995),\r\n+LPF_TAPS(0.000024214122051354),\r\n+LPF_TAPS(0.000019568778020638),\r\n+LPF_TAPS(0.000014087208525556),\r\n+LPF_TAPS(0.000007921112588556),\r\n+LPF_TAPS(0.000001251180037771),\r\n+LPF_TAPS(-0.000005717942104500),\r\n+LPF_TAPS(-0.000012763690379575),\r\n+LPF_TAPS(-0.000019652463024142),\r\n+LPF_TAPS(-0.000026147130699873),\r\n+LPF_TAPS(-0.000032014945859340),\r\n+LPF_TAPS(-0.000037035594634876),\r\n+LPF_TAPS(-0.000041009121031896),\r\n+LPF_TAPS(-0.000043763447917918),\r\n+LPF_TAPS(-0.000045161223312182),\r\n+LPF_TAPS(-0.000045105733981406),\r\n+LPF_TAPS(-0.000043545651195518),\r\n+LPF_TAPS(-0.000040478405225530),\r\n+LPF_TAPS(-0.000035952024983577),\r\n+LPF_TAPS(-0.000030065326015535),\r\n+LPF_TAPS(-0.000022966382484504),\r\n+LPF_TAPS(-0.000014849275213654),\r\n+LPF_TAPS(-0.000005949166482728),\r\n+LPF_TAPS(0.000003464188848603),\r\n+LPF_TAPS(0.000013094329200604),\r\n+LPF_TAPS(0.000022627149092650),\r\n+LPF_TAPS(0.000031740871303510),\r\n+LPF_TAPS(0.000040116620722822),\r\n+LPF_TAPS(0.000047449261396865),\r\n+LPF_TAPS(0.000053458137968486),\r\n+LPF_TAPS(0.000057897353992016),\r\n+LPF_TAPS(0.000060565223145184),\r\n+LPF_TAPS(0.000061312545438306),\r\n+LPF_TAPS(0.000060049388991730),\r\n+LPF_TAPS(0.000056750098241436),\r\n+LPF_TAPS(0.000051456300542010),\r\n+LPF_TAPS(0.000044277743665853),\r\n+LPF_TAPS(0.000035390864880425),\r\n+LPF_TAPS(0.000025035066036882),\r\n+LPF_TAPS(0.000013506746083069),\r\n+LPF_TAPS(0.000001151220097359),\r\n+LPF_TAPS(-0.000011647270299523),\r\n+LPF_TAPS(-0.000024477179102611),\r\n+LPF_TAPS(-0.000036912570537509),\r\n+LPF_TAPS(-0.000048526931495632),\r\n+LPF_TAPS(-0.000058907444320778),\r\n+LPF_TAPS(-0.000067669253154571),\r\n+LPF_TAPS(-0.000074469242648514),\r\n+LPF_TAPS(-0.000079018849322365),\r\n+LPF_TAPS(-0.000081095443628076),\r\n+LPF_TAPS(-0.000080551854759354),\r\n+LPF_TAPS(-0.000077323659767323),\r\n+LPF_TAPS(-0.000071433922392276),\r\n+LPF_TAPS(-0.000062995143465779),\r\n+LPF_TAPS(-0.000052208271561396),\r\n+LPF_TAPS(-0.000039358717142457),\r\n+LPF_TAPS(-0.000024809412796150),\r\n+LPF_TAPS(-0.000008991063029236),\r\n+LPF_TAPS(0.000007610173841222),\r\n+LPF_TAPS(0.000024467235348915),\r\n+LPF_TAPS(0.000041028514488886),\r\n+LPF_TAPS(0.000056735534135903),\r\n+LPF_TAPS(0.000071041382131944),\r\n+LPF_TAPS(0.000083429310872019),\r\n+LPF_TAPS(0.000093430882066834),\r\n+LPF_TAPS(0.000100643034423825),\r\n+LPF_TAPS(0.000104743469950318),\r\n+LPF_TAPS(0.000105503793440806),\r\n+LPF_TAPS(0.000102799898754107),\r\n+LPF_TAPS(0.000096619173300672),\r\n+LPF_TAPS(0.000087064186655507),\r\n+LPF_TAPS(0.000074352637674032),\r\n+LPF_TAPS(0.000058813453653570),\r\n+LPF_TAPS(0.000040879061234729),\r\n+LPF_TAPS(0.000021073977816960),\r\n+LPF_TAPS(-0.000000000000000001),\r\n+LPF_TAPS(-0.000021681612386472),\r\n+LPF_TAPS(-0.000043270446012788),\r\n+LPF_TAPS(-0.000064049128813514),\r\n+LPF_TAPS(-0.000083306720698925),\r\n+LPF_TAPS(-0.000100362551675977),\r\n+LPF_TAPS(-0.000114589722882715),\r\n+LPF_TAPS(-0.000125437475434065),\r\n+LPF_TAPS(-0.000132451647778846),\r\n+LPF_TAPS(-0.000135292484671578),\r\n+LPF_TAPS(-0.000133749129170364),\r\n+LPF_TAPS(-0.000127750221693984),\r\n+LPF_TAPS(-0.000117370144655030),\r\n+LPF_TAPS(-0.000102830584276255),\r\n+LPF_TAPS(-0.000084497228924858),\r\n+LPF_TAPS(-0.000062871581095080),\r\n+LPF_TAPS(-0.000038578023002731),\r\n+LPF_TAPS(-0.000012346438291968),\r\n+LPF_TAPS(0.000015009150871958),\r\n+LPF_TAPS(0.000042615326457718),\r\n+LPF_TAPS(0.000069566662877976),\r\n+LPF_TAPS(0.000094954918773381),\r\n+LPF_TAPS(0.000117899107325585),\r\n+LPF_TAPS(0.000137575466160802),\r\n+LPF_TAPS(0.000153246325251039),\r\n+LPF_TAPS(0.000164286881487674),\r\n+LPF_TAPS(0.000170208932309904),\r\n+LPF_TAPS(0.000170680697327237),\r\n+LPF_TAPS(0.000165541964570681),\r\n+LPF_TAPS(0.000154813934042112),\r\n+LPF_TAPS(0.000138703291782455),\r\n+LPF_TAPS(0.000117600228002549),\r\n+LPF_TAPS(0.000092070307386824),\r\n+LPF_TAPS(0.000062840302340481),\r\n+LPF_TAPS(0.000030778304128856),\r\n+LPF_TAPS(-0.000003131374242035),\r\n+LPF_TAPS(-0.000037817802723216),\r\n+LPF_TAPS(-0.000072156677613199),\r\n+LPF_TAPS(-0.000105006191277136),\r\n+LPF_TAPS(-0.000135244402503110),\r\n+LPF_TAPS(-0.000161806903178408),\r\n+LPF_TAPS(-0.000183723536547474),\r\n+LPF_TAPS(-0.000200152922407314),\r\n+LPF_TAPS(-0.000210413586217004),\r\n+LPF_TAPS(-0.000214010571892406),\r\n+LPF_TAPS(-0.000210656540284900),\r\n+LPF_TAPS(-0.000200286513900972),\r\n+LPF_TAPS(-0.000183065618912633),\r\n+LPF_TAPS(-0.000159389392365138),\r\n+LPF_TAPS(-0.000129876459117940),\r\n+LPF_TAPS(-0.000095353632044028),\r\n+LPF_TAPS(-0.000056833742354112),\r\n+LPF_TAPS(-0.000015486756257180),\r\n+LPF_TAPS(0.000027395028900060),\r\n+LPF_TAPS(0.000070436699562965),\r\n+LPF_TAPS(0.000112224154544881),\r\n+LPF_TAPS(0.000151349897149756),\r\n+LPF_TAPS(0.000186459729305847),\r\n+LPF_TAPS(0.000216298820689293),\r\n+LPF_TAPS(0.000239755609570793),\r\n+LPF_TAPS(0.000255902026837354),\r\n+LPF_TAPS(0.000264028620387530),\r\n+LPF_TAPS(0.000263673292235667),\r\n+LPF_TAPS(0.000254642541863430),\r\n+LPF_TAPS(0.000237024331684940),\r\n+LPF_TAPS(0.000211191947516224),\r\n+LPF_TAPS(0.000177798510922227),\r\n+LPF_TAPS(0.000137762102436393),\r\n+LPF_TAPS(0.000092241765277955),\r\n+LPF_TAPS(0.000042604968190238),\r\n+LPF_TAPS(-0.000009612596932831),\r\n+LPF_TAPS(-0.000062753732040099),\r\n+LPF_TAPS(-0.000115091570803501),\r\n+LPF_TAPS(-0.000164884941123817),\r\n+LPF_TAPS(-0.000210435501765685),\r\n+LPF_TAPS(-0.000250144802934651),\r\n+LPF_TAPS(-0.000282569380038599),\r\n+LPF_TAPS(-0.000306472011140359),\r\n+LPF_TAPS(-0.000320867352425224),\r\n+LPF_TAPS(-0.000325060311027916),\r\n+LPF_TAPS(-0.000318675717372279),\r\n+LPF_TAPS(-0.000301678114356434),\r\n+LPF_TAPS(-0.000274380780983162),\r\n+LPF_TAPS(-0.000237443444441768),\r\n+LPF_TAPS(-0.000191858496840385),\r\n+LPF_TAPS(-0.000138925909321826),\r\n+LPF_TAPS(-0.000080217414992324),\r\n+LPF_TAPS(-0.000017530900424471),\r\n+LPF_TAPS(0.000047163708998224),\r\n+LPF_TAPS(0.000111785473930746),\r\n+LPF_TAPS(0.000174208515351682),\r\n+LPF_TAPS(0.000232331068450502),\r\n+LPF_TAPS(0.000284145301110270),\r\n+LPF_TAPS(0.000327805606950321),\r\n+LPF_TAPS(0.000361693082058822),\r\n+LPF_TAPS(0.000384473969581270),\r\n+LPF_TAPS(0.000395150006431077),\r\n+LPF_TAPS(0.000393098828235401),\r\n+LPF_TAPS(0.000378102876452084),\r\n+LPF_TAPS(0.000350365597303463),\r\n+LPF_TAPS(0.000310514115583092),\r\n+LPF_TAPS(0.000259587995509967),\r\n+LPF_TAPS(0.000199014152192461),\r\n+LPF_TAPS(0.000130568436450885),\r\n+LPF_TAPS(0.000056324867689981),\r\n+LPF_TAPS(-0.000021406080919213),\r\n+LPF_TAPS(-0.000100148348209094),\r\n+LPF_TAPS(-0.000177338163410176),\r\n+LPF_TAPS(-0.000250406520562381),\r\n+LPF_TAPS(-0.000316863627940003),\r\n+LPF_TAPS(-0.000374382589341350),\r\n+LPF_TAPS(-0.000420879540010174),\r\n+LPF_TAPS(-0.000454587516954722),\r\n+LPF_TAPS(-0.000474121491579033),\r\n+LPF_TAPS(-0.000478532228889226),\r\n+LPF_TAPS(-0.000467346956149880),\r\n+LPF_TAPS(-0.000440595215956922),\r\n+LPF_TAPS(-0.000398818732858811),\r\n+LPF_TAPS(-0.000343064625195643),\r\n+LPF_TAPS(-0.000274861829143962),\r\n+LPF_TAPS(-0.000196181153047007),\r\n+LPF_TAPS(-0.000109379929089854),\r\n+LPF_TAPS(-0.000017132758053872),\r\n+LPF_TAPS(0.000077649666647308),\r\n+LPF_TAPS(0.000171911234199990),\r\n+LPF_TAPS(0.000262547804955242),\r\n+LPF_TAPS(0.000346508246194215),\r\n+LPF_TAPS(0.000420895864074487),\r\n+LPF_TAPS(0.000483066899259388),\r\n+LPF_TAPS(0.000530722780509705),\r\n+LPF_TAPS(0.000561992966921032),\r\n+LPF_TAPS(0.000575505453295788),\r\n+LPF_TAPS(0.000570442358525909),\r\n+LPF_TAPS(0.000546578454533896),\r\n+LPF_TAPS(0.000504301010739203),\r\n+LPF_TAPS(0.000444609910754149),\r\n+LPF_TAPS(0.000369097626198387),\r\n+LPF_TAPS(0.000279909287382278),\r\n+LPF_TAPS(0.000179683751090833),\r\n+LPF_TAPS(0.000071477210129250),\r\n+LPF_TAPS(-0.000041328503916990),\r\n+LPF_TAPS(-0.000155130224881734),\r\n+LPF_TAPS(-0.000266217192675056),\r\n+LPF_TAPS(-0.000370890684020134),\r\n+LPF_TAPS(-0.000465585720142990),\r\n+LPF_TAPS(-0.000546990891677487),\r\n+LPF_TAPS(-0.000612162321851922),\r\n+LPF_TAPS(-0.000658627900460039),\r\n+LPF_TAPS(-0.000684478162165066),\r\n+LPF_TAPS(-0.000688440548023091),\r\n+LPF_TAPS(-0.000669934269219190),\r\n+LPF_TAPS(-0.000629103573390101),\r\n+LPF_TAPS(-0.000566827879456252),\r\n+LPF_TAPS(-0.000484707976382240),\r\n+LPF_TAPS(-0.000385028251996259),\r\n+LPF_TAPS(-0.000270695705380619),\r\n+LPF_TAPS(-0.000145157274813930),\r\n+LPF_TAPS(-0.000012297757001391),\r\n+LPF_TAPS(0.000123678722798222),\r\n+LPF_TAPS(0.000258380129850500),\r\n+LPF_TAPS(0.000387366773040352),\r\n+LPF_TAPS(0.000506295964894752),\r\n+LPF_TAPS(0.000611066427620510),\r\n+LPF_TAPS(0.000697957698936131),\r\n+LPF_TAPS(0.000763759860442502),\r\n+LPF_TAPS(0.000805889135312000),\r\n+LPF_TAPS(0.000822485276891549),\r\n+LPF_TAPS(0.000812487186081086),\r\n+LPF_TAPS(0.000775683838897867),\r\n+LPF_TAPS(0.000712738357840256),\r\n+LPF_TAPS(0.000625183898955119),\r\n+LPF_TAPS(0.000515390925051658),\r\n+LPF_TAPS(0.000386506365966708),\r\n+LPF_TAPS(0.000242366099243077),\r\n+LPF_TAPS(0.000087383088454098),\r\n+LPF_TAPS(-0.000073585638543570),\r\n+LPF_TAPS(-0.000235389231818504),\r\n+LPF_TAPS(-0.000392745899395397),\r\n+LPF_TAPS(-0.000540413337085645),\r\n+LPF_TAPS(-0.000673361271639362),\r\n+LPF_TAPS(-0.000786940503718210),\r\n+LPF_TAPS(-0.000877042840762386),\r\n+LPF_TAPS(-0.000940246497411816),\r\n+LPF_TAPS(-0.000973941910185252),\r\n+LPF_TAPS(-0.000976433455066244),\r\n+LPF_TAPS(-0.000947013257100458),\r\n+LPF_TAPS(-0.000886004120206203),\r\n+LPF_TAPS(-0.000794769558342508),\r\n+LPF_TAPS(-0.000675689946958247),\r\n+LPF_TAPS(-0.000532104903912070),\r\n+LPF_TAPS(-0.000368223117113155),\r\n+LPF_TAPS(-0.000189001926039628),\r\n+LPF_TAPS(0.000000000000000005),\r\n+LPF_TAPS(0.000192792597451849),\r\n+LPF_TAPS(0.000383141843876918),\r\n+LPF_TAPS(0.000564768905597874),\r\n+LPF_TAPS(0.000731554712944432),\r\n+LPF_TAPS(0.000877743377118140),\r\n+LPF_TAPS(0.000998137770969946),\r\n+LPF_TAPS(0.001088280720886277),\r\n+LPF_TAPS(0.001144615598626183),\r\n+LPF_TAPS(0.001164620653372918),\r\n+LPF_TAPS(0.001146912171496028),\r\n+LPF_TAPS(0.001091312473933286),\r\n+LPF_TAPS(0.000998879831943005),\r\n+LPF_TAPS(0.000871898569131351),\r\n+LPF_TAPS(0.000713828884594515),\r\n+LPF_TAPS(0.000529217238894420),\r\n+LPF_TAPS(0.000323569449503238),\r\n+LPF_TAPS(0.000103189902660546),\r\n+LPF_TAPS(-0.000125008537718581),\r\n+LPF_TAPS(-0.000353718296351377),\r\n+LPF_TAPS(-0.000575468016503558),\r\n+LPF_TAPS(-0.000782863453250455),\r\n+LPF_TAPS(-0.000968830662626959),\r\n+LPF_TAPS(-0.001126853593007360),\r\n+LPF_TAPS(-0.001251198211887599),\r\n+LPF_TAPS(-0.001337115585136943),\r\n+LPF_TAPS(-0.001381016862473527),\r\n+LPF_TAPS(-0.001380613899811274),\r\n+LPF_TAPS(-0.001335020245572579),\r\n+LPF_TAPS(-0.001244808405865867),\r\n+LPF_TAPS(-0.001112020647622544),\r\n+LPF_TAPS(-0.000940132058647822),\r\n+LPF_TAPS(-0.000733966113792357),\r\n+LPF_TAPS(-0.000499564548666700),\r\n+LPF_TAPS(-0.000244014866424895),\r\n+LPF_TAPS(0.000024759750985369),\r\n+LPF_TAPS(0.000298242036610992),\r\n+LPF_TAPS(0.000567586499855441),\r\n+LPF_TAPS(0.000823901383743757),\r\n+LPF_TAPS(0.001058537859482148),\r\n+LPF_TAPS(0.001263377187176217),\r\n+LPF_TAPS(0.001431106452212325),\r\n+LPF_TAPS(0.001555473670218642),\r\n+LPF_TAPS(0.001631513539674637),\r\n+LPF_TAPS(0.001655735900279768),\r\n+LPF_TAPS(0.001626270007586307),\r\n+LPF_TAPS(0.001542959031374493),\r\n+LPF_TAPS(0.001407400689546614),\r\n+LPF_TAPS(0.001222931596249173),\r\n+LPF_TAPS(0.000994554681679378),\r\n+LPF_TAPS(0.000728810876167928),\r\n+LPF_TAPS(0.000433598084332047),\r\n+LPF_TAPS(0.000117942246968937),\r\n+LPF_TAPS(-0.000208273059652547),\r\n+LPF_TAPS(-0.000534610561168048),\r\n+LPF_TAPS(-0.000850407583894923),\r\n+LPF_TAPS(-0.001145118562253254),\r\n+LPF_TAPS(-0.001408660933417868),\r\n+LPF_TAPS(-0.001631753265716173),\r\n+LPF_TAPS(-0.001806234489224940),\r\n+LPF_TAPS(-0.001925353479318096),\r\n+LPF_TAPS(-0.001984018981432122),\r\n+LPF_TAPS(-0.001979000941352422),\r\n+LPF_TAPS(-0.001909075691954721),\r\n+LPF_TAPS(-0.001775109106082625),\r\n+LPF_TAPS(-0.001580073708111861),\r\n+LPF_TAPS(-0.001328997787593093),\r\n+LPF_TAPS(-0.001028846714519885),\r\n+LPF_TAPS(-0.000688338849954788),\r\n+LPF_TAPS(-0.000317700608131232),\r\n+LPF_TAPS(0.000071632713461015),\r\n+LPF_TAPS(0.000467361829414448),\r\n+LPF_TAPS(0.000856703924997078),\r\n+LPF_TAPS(0.001226797152716265),\r\n+LPF_TAPS(0.001565116620653128),\r\n+LPF_TAPS(0.001859888687412874),\r\n+LPF_TAPS(0.002100490149867073),\r\n+LPF_TAPS(0.002277819107241694),\r\n+LPF_TAPS(0.002384624910977274),\r\n+LPF_TAPS(0.002415785652952178),\r\n+LPF_TAPS(0.002368523080358119),\r\n+LPF_TAPS(0.002242546615955572),\r\n+LPF_TAPS(0.002040120257740298),\r\n+LPF_TAPS(0.001766048471616154),\r\n+LPF_TAPS(0.001427579704876770),\r\n+LPF_TAPS(0.001034228760561114),\r\n+LPF_TAPS(0.000597521901801380),\r\n+LPF_TAPS(0.000130671117675938),\r\n+LPF_TAPS(-0.000351813605211574),\r\n+LPF_TAPS(-0.000834562978150250),\r\n+LPF_TAPS(-0.001301825166365410),\r\n+LPF_TAPS(-0.001737966190365439),\r\n+LPF_TAPS(-0.002127978474272729),\r\n+LPF_TAPS(-0.002457981429236488),\r\n+LPF_TAPS(-0.002715697845351253),\r\n+LPF_TAPS(-0.002890890264067375),\r\n+LPF_TAPS(-0.002975742413280810),\r\n+LPF_TAPS(-0.002965172191343571),\r\n+LPF_TAPS(-0.002857064550412904),\r\n+LPF_TAPS(-0.002652414904921744),\r\n+LPF_TAPS(-0.002355376314608072),\r\n+LPF_TAPS(-0.001973206588323283),\r\n+LPF_TAPS(-0.001516114539436932),\r\n+LPF_TAPS(-0.000997007803078406),\r\n+LPF_TAPS(-0.000431147801801422),\r\n+LPF_TAPS(0.000164279480330407),\r\n+LPF_TAPS(0.000770665383479393),\r\n+LPF_TAPS(0.001368539010210255),\r\n+LPF_TAPS(0.001938169916452744),\r\n+LPF_TAPS(0.002460195023751910),\r\n+LPF_TAPS(0.002916250514243055),\r\n+LPF_TAPS(0.003289588836867587),\r\n+LPF_TAPS(0.003565660927117201),\r\n+LPF_TAPS(0.003732644337448212),\r\n+LPF_TAPS(0.003781899186874162),\r\n+LPF_TAPS(0.003708335642353476),\r\n+LPF_TAPS(0.003510678998832139),\r\n+LPF_TAPS(0.003191621268673138),\r\n+LPF_TAPS(0.002757851447814955),\r\n+LPF_TAPS(0.002219960204124247),\r\n+LPF_TAPS(0.001592218530000328),\r\n+LPF_TAPS(0.000892233804429490),\r\n+LPF_TAPS(0.000140490601831083),\r\n+LPF_TAPS(-0.000640212653492852),\r\n+LPF_TAPS(-0.001425416575883931),\r\n+LPF_TAPS(-0.002189725487726716),\r\n+LPF_TAPS(-0.002907583423253569),\r\n+LPF_TAPS(-0.003554078894612804),\r\n+LPF_TAPS(-0.004105754358390497),\r\n+LPF_TAPS(-0.004541395526739372),\r\n+LPF_TAPS(-0.004842775608648294),\r\n+LPF_TAPS(-0.004995330262056102),\r\n+LPF_TAPS(-0.004988740482468818),\r\n+LPF_TAPS(-0.004817402821803838),\r\n+LPF_TAPS(-0.004480769173390059),\r\n+LPF_TAPS(-0.003983541805197440),\r\n+LPF_TAPS(-0.003335713283738389),\r\n+LPF_TAPS(-0.002552445298778380),\r\n+LPF_TAPS(-0.001653785052822236),\r\n+LPF_TAPS(-0.000664222687184143),\r\n+LPF_TAPS(0.000387901961004376),\r\n+LPF_TAPS(0.001471130281711834),\r\n+LPF_TAPS(0.002551736080144651),\r\n+LPF_TAPS(0.003594675595265330),\r\n+LPF_TAPS(0.004564611426001721),\r\n+LPF_TAPS(0.005426982600476230),\r\n+LPF_TAPS(0.006149090924198915),\r\n+LPF_TAPS(0.006701172463119070),\r\n+LPF_TAPS(0.007057422610883705),\r\n+LPF_TAPS(0.007196943686238185),\r\n+LPF_TAPS(0.007104585410053790),\r\n+LPF_TAPS(0.006771650899488136),\r\n+LPF_TAPS(0.006196443940707756),\r\n+LPF_TAPS(0.005384637187795986),\r\n+LPF_TAPS(0.004349445487004629),\r\n+LPF_TAPS(0.003111593624626861),\r\n+LPF_TAPS(0.001699073308000820),\r\n+LPF_TAPS(0.000146689962985106),\r\n+LPF_TAPS(-0.001504594191750185),\r\n+LPF_TAPS(-0.003208508517971278),\r\n+LPF_TAPS(-0.004914495915054737),\r\n+LPF_TAPS(-0.006568885298479145),\r\n+LPF_TAPS(-0.008116186879932121),\r\n+LPF_TAPS(-0.009500478553868536),\r\n+LPF_TAPS(-0.010666848523875708),\r\n+LPF_TAPS(-0.011562857035962059),\r\n+LPF_TAPS(-0.012139978801904341),\r\n+LPF_TAPS(-0.012354987444366434),\r\n+LPF_TAPS(-0.012171244098485332),\r\n+LPF_TAPS(-0.011559854154464340),\r\n+LPF_TAPS(-0.010500658985394174),\r\n+LPF_TAPS(-0.008983033308274631),\r\n+LPF_TAPS(-0.007006463481110434),\r\n+LPF_TAPS(-0.004580887427296669),\r\n+LPF_TAPS(-0.001726782860894111),\r\n+LPF_TAPS(0.001525003094514639),\r\n+LPF_TAPS(0.005133683115894706),\r\n+LPF_TAPS(0.009049211171689249),\r\n+LPF_TAPS(0.013213203073096175),\r\n+LPF_TAPS(0.017560076473553177),\r\n+LPF_TAPS(0.022018384769864386),\r\n+LPF_TAPS(0.026512314046210402),\r\n+LPF_TAPS(0.030963307661350890),\r\n+LPF_TAPS(0.035291779438375498),\r\n+LPF_TAPS(0.039418873780099187),\r\n+LPF_TAPS(0.043268229479278157),\r\n+LPF_TAPS(0.046767703569527926),\r\n+LPF_TAPS(0.049851012287597349),\r\n+LPF_TAPS(0.052459248076485478),\r\n+LPF_TAPS(0.054542234506598564),\r\n+LPF_TAPS(0.056059684953538136),\r\n+LPF_TAPS(0.056982135742987355),\r\n+LPF_TAPS(0.057291630127126743),\r\n+LPF_TAPS(0.056982135742987355),\r\n+LPF_TAPS(0.056059684953538136),\r\n+LPF_TAPS(0.054542234506598564),\r\n+LPF_TAPS(0.052459248076485478),\r\n+LPF_TAPS(0.049851012287597349),\r\n+LPF_TAPS(0.046767703569527926),\r\n+LPF_TAPS(0.043268229479278157),\r\n+LPF_TAPS(0.039418873780099187),\r\n+LPF_TAPS(0.035291779438375505),\r\n+LPF_TAPS(0.030963307661350890),\r\n+LPF_TAPS(0.026512314046210402),\r\n+LPF_TAPS(0.022018384769864386),\r\n+LPF_TAPS(0.017560076473553177),\r\n+LPF_TAPS(0.013213203073096178),\r\n+LPF_TAPS(0.009049211171689249),\r\n+LPF_TAPS(0.005133683115894706),\r\n+LPF_TAPS(0.001525003094514639),\r\n+LPF_TAPS(-0.001726782860894111),\r\n+LPF_TAPS(-0.004580887427296669),\r\n+LPF_TAPS(-0.007006463481110434),\r\n+LPF_TAPS(-0.008983033308274629),\r\n+LPF_TAPS(-0.010500658985394175),\r\n+LPF_TAPS(-0.011559854154464340),\r\n+LPF_TAPS(-0.012171244098485332),\r\n+LPF_TAPS(-0.012354987444366434),\r\n+LPF_TAPS(-0.012139978801904341),\r\n+LPF_TAPS(-0.011562857035962061),\r\n+LPF_TAPS(-0.010666848523875708),\r\n+LPF_TAPS(-0.009500478553868536),\r\n+LPF_TAPS(-0.008116186879932121),\r\n+LPF_TAPS(-0.006568885298479145),\r\n+LPF_TAPS(-0.004914495915054737),\r\n+LPF_TAPS(-0.003208508517971279),\r\n+LPF_TAPS(-0.001504594191750185),\r\n+LPF_TAPS(0.000146689962985106),\r\n+LPF_TAPS(0.001699073308000820),\r\n+LPF_TAPS(0.003111593624626861),\r\n+LPF_TAPS(0.004349445487004629),\r\n+LPF_TAPS(0.005384637187795987),\r\n+LPF_TAPS(0.006196443940707756),\r\n+LPF_TAPS(0.006771650899488136),\r\n+LPF_TAPS(0.007104585410053790),\r\n+LPF_TAPS(0.007196943686238185),\r\n+LPF_TAPS(0.007057422610883705),\r\n+LPF_TAPS(0.006701172463119071),\r\n+LPF_TAPS(0.006149090924198916),\r\n+LPF_TAPS(0.005426982600476230),\r\n+LPF_TAPS(0.004564611426001722),\r\n+LPF_TAPS(0.003594675595265330),\r\n+LPF_TAPS(0.002551736080144652),\r\n+LPF_TAPS(0.001471130281711834),\r\n+LPF_TAPS(0.000387901961004376),\r\n+LPF_TAPS(-0.000664222687184143),\r\n+LPF_TAPS(-0.001653785052822236),\r\n+LPF_TAPS(-0.002552445298778380),\r\n+LPF_TAPS(-0.003335713283738390),\r\n+LPF_TAPS(-0.003983541805197441),\r\n+LPF_TAPS(-0.004480769173390060),\r\n+LPF_TAPS(-0.004817402821803838),\r\n+LPF_TAPS(-0.004988740482468819),\r\n+LPF_TAPS(-0.004995330262056103),\r\n+LPF_TAPS(-0.004842775608648295),\r\n+LPF_TAPS(-0.004541395526739372),\r\n+LPF_TAPS(-0.004105754358390497),\r\n+LPF_TAPS(-0.003554078894612804),\r\n+LPF_TAPS(-0.002907583423253569),\r\n+LPF_TAPS(-0.002189725487726717),\r\n+LPF_TAPS(-0.001425416575883931),\r\n+LPF_TAPS(-0.000640212653492852),\r\n+LPF_TAPS(0.000140490601831083),\r\n+LPF_TAPS(0.000892233804429491),\r\n+LPF_TAPS(0.001592218530000328),\r\n+LPF_TAPS(0.002219960204124247),\r\n+LPF_TAPS(0.002757851447814955),\r\n+LPF_TAPS(0.003191621268673138),\r\n+LPF_TAPS(0.003510678998832139),\r\n+LPF_TAPS(0.003708335642353476),\r\n+LPF_TAPS(0.003781899186874163),\r\n+LPF_TAPS(0.003732644337448212),\r\n+LPF_TAPS(0.003565660927117202),\r\n+LPF_TAPS(0.003289588836867588),\r\n+LPF_TAPS(0.002916250514243056),\r\n+LPF_TAPS(0.002460195023751910),\r\n+LPF_TAPS(0.001938169916452745),\r\n+LPF_TAPS(0.001368539010210255),\r\n+LPF_TAPS(0.000770665383479393),\r\n+LPF_TAPS(0.000164279480330407),\r\n+LPF_TAPS(-0.000431147801801422),\r\n+LPF_TAPS(-0.000997007803078406),\r\n+LPF_TAPS(-0.001516114539436932),\r\n+LPF_TAPS(-0.001973206588323284),\r\n+LPF_TAPS(-0.002355376314608072),\r\n+LPF_TAPS(-0.002652414904921744),\r\n+LPF_TAPS(-0.002857064550412904),\r\n+LPF_TAPS(-0.002965172191343571),\r\n+LPF_TAPS(-0.002975742413280810),\r\n+LPF_TAPS(-0.002890890264067375),\r\n+LPF_TAPS(-0.002715697845351253),\r\n+LPF_TAPS(-0.002457981429236488),\r\n+LPF_TAPS(-0.002127978474272729),\r\n+LPF_TAPS(-0.001737966190365439),\r\n+LPF_TAPS(-0.001301825166365411),\r\n+LPF_TAPS(-0.000834562978150250),\r\n+LPF_TAPS(-0.000351813605211574),\r\n+LPF_TAPS(0.000130671117675938),\r\n+LPF_TAPS(0.000597521901801380),\r\n+LPF_TAPS(0.001034228760561114),\r\n+LPF_TAPS(0.001427579704876769),\r\n+LPF_TAPS(0.001766048471616154),\r\n+LPF_TAPS(0.002040120257740299),\r\n+LPF_TAPS(0.002242546615955573),\r\n+LPF_TAPS(0.002368523080358119),\r\n+LPF_TAPS(0.002415785652952178),\r\n+LPF_TAPS(0.002384624910977274),\r\n+LPF_TAPS(0.002277819107241695),\r\n+LPF_TAPS(0.002100490149867073),\r\n+LPF_TAPS(0.001859888687412874),\r\n+LPF_TAPS(0.001565116620653128),\r\n+LPF_TAPS(0.001226797152716265),\r\n+LPF_TAPS(0.000856703924997079),\r\n+LPF_TAPS(0.000467361829414448),\r\n+LPF_TAPS(0.000071632713461015),\r\n+LPF_TAPS(-0.000317700608131232),\r\n+LPF_TAPS(-0.000688338849954788),\r\n+LPF_TAPS(-0.001028846714519885),\r\n+LPF_TAPS(-0.001328997787593093),\r\n+LPF_TAPS(-0.001580073708111861),\r\n+LPF_TAPS(-0.001775109106082626),\r\n+LPF_TAPS(-0.001909075691954721),\r\n+LPF_TAPS(-0.001979000941352422),\r\n+LPF_TAPS(-0.001984018981432122),\r\n+LPF_TAPS(-0.001925353479318096),\r\n+LPF_TAPS(-0.001806234489224941),\r\n+LPF_TAPS(-0.001631753265716172),\r\n+LPF_TAPS(-0.001408660933417869),\r\n+LPF_TAPS(-0.001145118562253254),\r\n+LPF_TAPS(-0.000850407583894923),\r\n+LPF_TAPS(-0.000534610561168048),\r\n+LPF_TAPS(-0.000208273059652547),\r\n+LPF_TAPS(0.000117942246968937),\r\n+LPF_TAPS(0.000433598084332047),\r\n+LPF_TAPS(0.000728810876167928),\r\n+LPF_TAPS(0.000994554681679379),\r\n+LPF_TAPS(0.001222931596249174),\r\n+LPF_TAPS(0.001407400689546613),\r\n+LPF_TAPS(0.001542959031374494),\r\n+LPF_TAPS(0.001626270007586307),\r\n+LPF_TAPS(0.001655735900279769),\r\n+LPF_TAPS(0.001631513539674637),\r\n+LPF_TAPS(0.001555473670218643),\r\n+LPF_TAPS(0.001431106452212325),\r\n+LPF_TAPS(0.001263377187176217),\r\n+LPF_TAPS(0.001058537859482148),\r\n+LPF_TAPS(0.000823901383743757),\r\n+LPF_TAPS(0.000567586499855442),\r\n+LPF_TAPS(0.000298242036610992),\r\n+LPF_TAPS(0.000024759750985369),\r\n+LPF_TAPS(-0.000244014866424895),\r\n+LPF_TAPS(-0.000499564548666700),\r\n+LPF_TAPS(-0.000733966113792357),\r\n+LPF_TAPS(-0.000940132058647823),\r\n+LPF_TAPS(-0.001112020647622544),\r\n+LPF_TAPS(-0.001244808405865867),\r\n+LPF_TAPS(-0.001335020245572579),\r\n+LPF_TAPS(-0.001380613899811275),\r\n+LPF_TAPS(-0.001381016862473528),\r\n+LPF_TAPS(-0.001337115585136942),\r\n+LPF_TAPS(-0.001251198211887600),\r\n+LPF_TAPS(-0.001126853593007361),\r\n+LPF_TAPS(-0.000968830662626959),\r\n+LPF_TAPS(-0.000782863453250455),\r\n+LPF_TAPS(-0.000575468016503558),\r\n+LPF_TAPS(-0.000353718296351377),\r\n+LPF_TAPS(-0.000125008537718581),\r\n+LPF_TAPS(0.000103189902660546),\r\n+LPF_TAPS(0.000323569449503238),\r\n+LPF_TAPS(0.000529217238894420),\r\n+LPF_TAPS(0.000713828884594515),\r\n+LPF_TAPS(0.000871898569131352),\r\n+LPF_TAPS(0.000998879831943005),\r\n+LPF_TAPS(0.001091312473933286),\r\n+LPF_TAPS(0.001146912171496027),\r\n+LPF_TAPS(0.001164620653372918),\r\n+LPF_TAPS(0.001144615598626185),\r\n+LPF_TAPS(0.001088280720886277),\r\n+LPF_TAPS(0.000998137770969946),\r\n+LPF_TAPS(0.000877743377118140),\r\n+LPF_TAPS(0.000731554712944432),\r\n+LPF_TAPS(0.000564768905597874),\r\n+LPF_TAPS(0.000383141843876918),\r\n+LPF_TAPS(0.000192792597451849),\r\n+LPF_TAPS(0.000000000000000005),\r\n+LPF_TAPS(-0.000189001926039628),\r\n+LPF_TAPS(-0.000368223117113155),\r\n+LPF_TAPS(-0.000532104903912071),\r\n+LPF_TAPS(-0.000675689946958247),\r\n+LPF_TAPS(-0.000794769558342508),\r\n+LPF_TAPS(-0.000886004120206203),\r\n+LPF_TAPS(-0.000947013257100459),\r\n+LPF_TAPS(-0.000976433455066244),\r\n+LPF_TAPS(-0.000973941910185252),\r\n+LPF_TAPS(-0.000940246497411816),\r\n+LPF_TAPS(-0.000877042840762386),\r\n+LPF_TAPS(-0.000786940503718210),\r\n+LPF_TAPS(-0.000673361271639363),\r\n+LPF_TAPS(-0.000540413337085645),\r\n+LPF_TAPS(-0.000392745899395397),\r\n+LPF_TAPS(-0.000235389231818504),\r\n+LPF_TAPS(-0.000073585638543570),\r\n+LPF_TAPS(0.000087383088454098),\r\n+LPF_TAPS(0.000242366099243077),\r\n+LPF_TAPS(0.000386506365966708),\r\n+LPF_TAPS(0.000515390925051659),\r\n+LPF_TAPS(0.000625183898955119),\r\n+LPF_TAPS(0.000712738357840256),\r\n+LPF_TAPS(0.000775683838897867),\r\n+LPF_TAPS(0.000812487186081086),\r\n+LPF_TAPS(0.000822485276891549),\r\n+LPF_TAPS(0.000805889135312000),\r\n+LPF_TAPS(0.000763759860442503),\r\n+LPF_TAPS(0.000697957698936132),\r\n+LPF_TAPS(0.000611066427620510),\r\n+LPF_TAPS(0.000506295964894752),\r\n+LPF_TAPS(0.000387366773040352),\r\n+LPF_TAPS(0.000258380129850500),\r\n+LPF_TAPS(0.000123678722798222),\r\n+LPF_TAPS(-0.000012297757001391),\r\n+LPF_TAPS(-0.000145157274813930),\r\n+LPF_TAPS(-0.000270695705380619),\r\n+LPF_TAPS(-0.000385028251996259),\r\n+LPF_TAPS(-0.000484707976382240),\r\n+LPF_TAPS(-0.000566827879456253),\r\n+LPF_TAPS(-0.000629103573390101),\r\n+LPF_TAPS(-0.000669934269219190),\r\n+LPF_TAPS(-0.000688440548023092),\r\n+LPF_TAPS(-0.000684478162165066),\r\n+LPF_TAPS(-0.000658627900460040),\r\n+LPF_TAPS(-0.000612162321851922),\r\n+LPF_TAPS(-0.000546990891677487),\r\n+LPF_TAPS(-0.000465585720142990),\r\n+LPF_TAPS(-0.000370890684020135),\r\n+LPF_TAPS(-0.000266217192675056),\r\n+LPF_TAPS(-0.000155130224881734),\r\n+LPF_TAPS(-0.000041328503916990),\r\n+LPF_TAPS(0.000071477210129250),\r\n+LPF_TAPS(0.000179683751090833),\r\n+LPF_TAPS(0.000279909287382278),\r\n+LPF_TAPS(0.000369097626198387),\r\n+LPF_TAPS(0.000444609910754149),\r\n+LPF_TAPS(0.000504301010739204),\r\n+LPF_TAPS(0.000546578454533897),\r\n+LPF_TAPS(0.000570442358525909),\r\n+LPF_TAPS(0.000575505453295788),\r\n+LPF_TAPS(0.000561992966921032),\r\n+LPF_TAPS(0.000530722780509705),\r\n+LPF_TAPS(0.000483066899259388),\r\n+LPF_TAPS(0.000420895864074487),\r\n+LPF_TAPS(0.000346508246194215),\r\n+LPF_TAPS(0.000262547804955242),\r\n+LPF_TAPS(0.000171911234199990),\r\n+LPF_TAPS(0.000077649666647308),\r\n+LPF_TAPS(-0.000017132758053872),\r\n+LPF_TAPS(-0.000109379929089854),\r\n+LPF_TAPS(-0.000196181153047007),\r\n+LPF_TAPS(-0.000274861829143962),\r\n+LPF_TAPS(-0.000343064625195643),\r\n+LPF_TAPS(-0.000398818732858811),\r\n+LPF_TAPS(-0.000440595215956923),\r\n+LPF_TAPS(-0.000467346956149880),\r\n+LPF_TAPS(-0.000478532228889226),\r\n+LPF_TAPS(-0.000474121491579033),\r\n+LPF_TAPS(-0.000454587516954723),\r\n+LPF_TAPS(-0.000420879540010174),\r\n+LPF_TAPS(-0.000374382589341350),\r\n+LPF_TAPS(-0.000316863627940004),\r\n+LPF_TAPS(-0.000250406520562381),\r\n+LPF_TAPS(-0.000177338163410176),\r\n+LPF_TAPS(-0.000100148348209094),\r\n+LPF_TAPS(-0.000021406080919213),\r\n+LPF_TAPS(0.000056324867689981),\r\n+LPF_TAPS(0.000130568436450885),\r\n+LPF_TAPS(0.000199014152192461),\r\n+LPF_TAPS(0.000259587995509968),\r\n+LPF_TAPS(0.000310514115583092),\r\n+LPF_TAPS(0.000350365597303463),\r\n+LPF_TAPS(0.000378102876452084),\r\n+LPF_TAPS(0.000393098828235401),\r\n+LPF_TAPS(0.000395150006431077),\r\n+LPF_TAPS(0.000384473969581270),\r\n+LPF_TAPS(0.000361693082058822),\r\n+LPF_TAPS(0.000327805606950321),\r\n+LPF_TAPS(0.000284145301110270),\r\n+LPF_TAPS(0.000232331068450502),\r\n+LPF_TAPS(0.000174208515351682),\r\n+LPF_TAPS(0.000111785473930746),\r\n+LPF_TAPS(0.000047163708998224),\r\n+LPF_TAPS(-0.000017530900424471),\r\n+LPF_TAPS(-0.000080217414992324),\r\n+LPF_TAPS(-0.000138925909321826),\r\n+LPF_TAPS(-0.000191858496840385),\r\n+LPF_TAPS(-0.000237443444441768),\r\n+LPF_TAPS(-0.000274380780983162),\r\n+LPF_TAPS(-0.000301678114356435),\r\n+LPF_TAPS(-0.000318675717372279),\r\n+LPF_TAPS(-0.000325060311027916),\r\n+LPF_TAPS(-0.000320867352425224),\r\n+LPF_TAPS(-0.000306472011140359),\r\n+LPF_TAPS(-0.000282569380038600),\r\n+LPF_TAPS(-0.000250144802934651),\r\n+LPF_TAPS(-0.000210435501765685),\r\n+LPF_TAPS(-0.000164884941123817),\r\n+LPF_TAPS(-0.000115091570803501),\r\n+LPF_TAPS(-0.000062753732040099),\r\n+LPF_TAPS(-0.000009612596932831),\r\n+LPF_TAPS(0.000042604968190238),\r\n+LPF_TAPS(0.000092241765277955),\r\n+LPF_TAPS(0.000137762102436393),\r\n+LPF_TAPS(0.000177798510922227),\r\n+LPF_TAPS(0.000211191947516224),\r\n+LPF_TAPS(0.000237024331684940),\r\n+LPF_TAPS(0.000254642541863430),\r\n+LPF_TAPS(0.000263673292235667),\r\n+LPF_TAPS(0.000264028620387531),\r\n+LPF_TAPS(0.000255902026837354),\r\n+LPF_TAPS(0.000239755609570794),\r\n+LPF_TAPS(0.000216298820689293),\r\n+LPF_TAPS(0.000186459729305847),\r\n+LPF_TAPS(0.000151349897149756),\r\n+LPF_TAPS(0.000112224154544882),\r\n+LPF_TAPS(0.000070436699562966),\r\n+LPF_TAPS(0.000027395028900060),\r\n+LPF_TAPS(-0.000015486756257180),\r\n+LPF_TAPS(-0.000056833742354112),\r\n+LPF_TAPS(-0.000095353632044028),\r\n+LPF_TAPS(-0.000129876459117940),\r\n+LPF_TAPS(-0.000159389392365138),\r\n+LPF_TAPS(-0.000183065618912633),\r\n+LPF_TAPS(-0.000200286513900972),\r\n+LPF_TAPS(-0.000210656540284900),\r\n+LPF_TAPS(-0.000214010571892406),\r\n+LPF_TAPS(-0.000210413586217005),\r\n+LPF_TAPS(-0.000200152922407313),\r\n+LPF_TAPS(-0.000183723536547474),\r\n+LPF_TAPS(-0.000161806903178408),\r\n+LPF_TAPS(-0.000135244402503110),\r\n+LPF_TAPS(-0.000105006191277136),\r\n+LPF_TAPS(-0.000072156677613199),\r\n+LPF_TAPS(-0.000037817802723216),\r\n+LPF_TAPS(-0.000003131374242035),\r\n+LPF_TAPS(0.000030778304128856),\r\n+LPF_TAPS(0.000062840302340481),\r\n+LPF_TAPS(0.000092070307386824),\r\n+LPF_TAPS(0.000117600228002548),\r\n+LPF_TAPS(0.000138703291782456),\r\n+LPF_TAPS(0.000154813934042112),\r\n+LPF_TAPS(0.000165541964570681),\r\n+LPF_TAPS(0.000170680697327237),\r\n+LPF_TAPS(0.000170208932309904),\r\n+LPF_TAPS(0.000164286881487674),\r\n+LPF_TAPS(0.000153246325251040),\r\n+LPF_TAPS(0.000137575466160802),\r\n+LPF_TAPS(0.000117899107325585),\r\n+LPF_TAPS(0.000094954918773381),\r\n+LPF_TAPS(0.000069566662877977),\r\n+LPF_TAPS(0.000042615326457718),\r\n+LPF_TAPS(0.000015009150871958),\r\n+LPF_TAPS(-0.000012346438291968),\r\n+LPF_TAPS(-0.000038578023002731),\r\n+LPF_TAPS(-0.000062871581095080),\r\n+LPF_TAPS(-0.000084497228924858),\r\n+LPF_TAPS(-0.000102830584276255),\r\n+LPF_TAPS(-0.000117370144655030),\r\n+LPF_TAPS(-0.000127750221693984),\r\n+LPF_TAPS(-0.000133749129170364),\r\n+LPF_TAPS(-0.000135292484671579),\r\n+LPF_TAPS(-0.000132451647778846),\r\n+LPF_TAPS(-0.000125437475434065),\r\n+LPF_TAPS(-0.000114589722882715),\r\n+LPF_TAPS(-0.000100362551675977),\r\n+LPF_TAPS(-0.000083306720698925),\r\n+LPF_TAPS(-0.000064049128813514),\r\n+LPF_TAPS(-0.000043270446012788),\r\n+LPF_TAPS(-0.000021681612386472),\r\n+LPF_TAPS(-0.000000000000000001),\r\n+LPF_TAPS(0.000021073977816960),\r\n+LPF_TAPS(0.000040879061234729),\r\n+LPF_TAPS(0.000058813453653570),\r\n+LPF_TAPS(0.000074352637674032),\r\n+LPF_TAPS(0.000087064186655507),\r\n+LPF_TAPS(0.000096619173300672),\r\n+LPF_TAPS(0.000102799898754107),\r\n+LPF_TAPS(0.000105503793440806),\r\n+LPF_TAPS(0.000104743469950318),\r\n+LPF_TAPS(0.000100643034423825),\r\n+LPF_TAPS(0.000093430882066834),\r\n+LPF_TAPS(0.000083429310872019),\r\n+LPF_TAPS(0.000071041382131944),\r\n+LPF_TAPS(0.000056735534135903),\r\n+LPF_TAPS(0.000041028514488886),\r\n+LPF_TAPS(0.000024467235348915),\r\n+LPF_TAPS(0.000007610173841222),\r\n+LPF_TAPS(-0.000008991063029236),\r\n+LPF_TAPS(-0.000024809412796150),\r\n+LPF_TAPS(-0.000039358717142457),\r\n+LPF_TAPS(-0.000052208271561396),\r\n+LPF_TAPS(-0.000062995143465779),\r\n+LPF_TAPS(-0.000071433922392276),\r\n+LPF_TAPS(-0.000077323659767323),\r\n+LPF_TAPS(-0.000080551854759354),\r\n+LPF_TAPS(-0.000081095443628076),\r\n+LPF_TAPS(-0.000079018849322365),\r\n+LPF_TAPS(-0.000074469242648514),\r\n+LPF_TAPS(-0.000067669253154571),\r\n+LPF_TAPS(-0.000058907444320778),\r\n+LPF_TAPS(-0.000048526931495632),\r\n+LPF_TAPS(-0.000036912570537509),\r\n+LPF_TAPS(-0.000024477179102611),\r\n+LPF_TAPS(-0.000011647270299523),\r\n+LPF_TAPS(0.000001151220097359),\r\n+LPF_TAPS(0.000013506746083069),\r\n+LPF_TAPS(0.000025035066036882),\r\n+LPF_TAPS(0.000035390864880425),\r\n+LPF_TAPS(0.000044277743665853),\r\n+LPF_TAPS(0.000051456300542010),\r\n+LPF_TAPS(0.000056750098241436),\r\n+LPF_TAPS(0.000060049388991730),\r\n+LPF_TAPS(0.000061312545438306),\r\n+LPF_TAPS(0.000060565223145184),\r\n+LPF_TAPS(0.000057897353992016),\r\n+LPF_TAPS(0.000053458137968486),\r\n+LPF_TAPS(0.000047449261396865),\r\n+LPF_TAPS(0.000040116620722822),\r\n+LPF_TAPS(0.000031740871303510),\r\n+LPF_TAPS(0.000022627149092650),\r\n+LPF_TAPS(0.000013094329200604),\r\n+LPF_TAPS(0.000003464188848603),\r\n+LPF_TAPS(-0.000005949166482728),\r\n+LPF_TAPS(-0.000014849275213654),\r\n+LPF_TAPS(-0.000022966382484504),\r\n+LPF_TAPS(-0.000030065326015535),\r\n+LPF_TAPS(-0.000035952024983576),\r\n+LPF_TAPS(-0.000040478405225530),\r\n+LPF_TAPS(-0.000043545651195518),\r\n+LPF_TAPS(-0.000045105733981406),\r\n+LPF_TAPS(-0.000045161223312182),\r\n+LPF_TAPS(-0.000043763447917918),\r\n+LPF_TAPS(-0.000041009121031896),\r\n+LPF_TAPS(-0.000037035594634876),\r\n+LPF_TAPS(-0.000032014945859340),\r\n+LPF_TAPS(-0.000026147130699873),\r\n+LPF_TAPS(-0.000019652463024142),\r\n+LPF_TAPS(-0.000012763690379575),\r\n+LPF_TAPS(-0.000005717942104500),\r\n+LPF_TAPS(0.000001251180037771),\r\n+LPF_TAPS(0.000007921112588556),\r\n+LPF_TAPS(0.000014087208525556),\r\n+LPF_TAPS(0.000019568778020638),\r\n+LPF_TAPS(0.000024214122051354),\r\n+LPF_TAPS(0.000027904428545995),\r\n+LPF_TAPS(0.000030556443168657),\r\n+LPF_TAPS(0.000032123870727846),\r\n+LPF_TAPS(0.000032597506998249),\r\n+LPF_TAPS(0.000032004143012902),\r\n+LPF_TAPS(0.000030404323246372),\r\n+LPF_TAPS(0.000027889074347600),\r\n+LPF_TAPS(0.000024575751153583),\r\n+LPF_TAPS(0.000020603170792004),\r\n+LPF_TAPS(0.000016126223163572),\r\n+LPF_TAPS(0.000011310156627793),\r\n+LPF_TAPS(0.000006324741191609),\r\n+LPF_TAPS(0.000001338508053458),\r\n+LPF_TAPS(-0.000003486745649395),\r\n+LPF_TAPS(-0.000008001014031039),\r\n+LPF_TAPS(-0.000012070549940901),\r\n+LPF_TAPS(-0.000015581616633170),\r\n+LPF_TAPS(-0.000018443426346149),\r\n+LPF_TAPS(-0.000020590199549203),\r\n+LPF_TAPS(-0.000021982310715217),\r\n+LPF_TAPS(-0.000022606518515204),\r\n+LPF_TAPS(-0.000022475309223088),\r\n+LPF_TAPS(-0.000021625410855532),\r\n+LPF_TAPS(-0.000020115561256850),\r\n+LPF_TAPS(-0.000018023635212619),\r\n+LPF_TAPS(-0.000015443253135853),\r\n+LPF_TAPS(-0.000012480006488093),\r\n+LPF_TAPS(-0.000009247442627863),\r\n+LPF_TAPS(-0.000005862954157649),\r\n+LPF_TAPS(-0.000002443715184290),\r\n+LPF_TAPS(0.000000897200498571),\r\n+LPF_TAPS(0.000004054396015711),\r\n+LPF_TAPS(0.000006933314973567),\r\n+LPF_TAPS(0.000009452902677324),\r\n+LPF_TAPS(0.000011547696530582),\r\n+LPF_TAPS(0.000013169299478268),\r\n+LPF_TAPS(0.000014287213355241),\r\n+LPF_TAPS(0.000014889031854004),\r\n+LPF_TAPS(0.000014980014741443),\r\n+LPF_TAPS(0.000014582085215692),\r\n+LPF_TAPS(0.000013732310264828),\r\n+LPF_TAPS(0.000012480939038455),\r\n+LPF_TAPS(0.000010889086159912),\r\n+LPF_TAPS(0.000009026155308364),\r\n+LPF_TAPS(0.000006967103138217),\r\n+LPF_TAPS(0.000004789644663852),\r\n+LPF_TAPS(0.000002571498736137),\r\n+LPF_TAPS(0.000000387766409326),\r\n+LPF_TAPS(-0.000001691473813720),\r\n+LPF_TAPS(-0.000003603281228946),\r\n+LPF_TAPS(-0.000005293619442137),\r\n+LPF_TAPS(-0.000006718729797308),\r\n+LPF_TAPS(-0.000007846083153315),\r\n+LPF_TAPS(-0.000008654897515219),\r\n+LPF_TAPS(-0.000009136224819149),\r\n+LPF_TAPS(-0.000009292625130319),\r\n+LPF_TAPS(-0.000009137460147870),\r\n+LPF_TAPS(-0.000008693849789841),\r\n+LPF_TAPS(-0.000007993345409950),\r\n+LPF_TAPS(-0.000007074380617936),\r\n+LPF_TAPS(-0.000005980565575676),\r\n+LPF_TAPS(-0.000004758892958091),\r\n+LPF_TAPS(-0.000003457923533233),\r\n+LPF_TAPS(-0.000002126016652791),\r\n+LPF_TAPS(-0.000000809666058306),\r\n+LPF_TAPS(0.000000448005422616),\r\n+LPF_TAPS(0.000001608547155233),\r\n+LPF_TAPS(0.000002639242484125),\r\n+LPF_TAPS(0.000003513906045182),\r\n+LPF_TAPS(0.000004213402503791),\r\n+LPF_TAPS(0.000004725883481839),\r\n+LPF_TAPS(0.000005046749878656),\r\n+LPF_TAPS(0.000005178356448336),\r\n+LPF_TAPS(0.000005129484047575),\r\n+LPF_TAPS(0.000004914612148722),\r\n+LPF_TAPS(0.000004553029819940),\r\n+LPF_TAPS(0.000004067827273334),\r\n+LPF_TAPS(0.000003484812208163),\r\n+LPF_TAPS(0.000002831395534679),\r\n+LPF_TAPS(0.000002135489726262),\r\n+LPF_TAPS(0.000001424460145696),\r\n+LPF_TAPS(0.000000724165411796),\r\n+LPF_TAPS(0.000000058117445035),\r\n+LPF_TAPS(-0.000000553214480790),\r\n+LPF_TAPS(-0.000001092938263905),\r\n+LPF_TAPS(-0.000001548101872579),\r\n+LPF_TAPS(-0.000001909881632425),\r\n+LPF_TAPS(-0.000002173599867573),\r\n+LPF_TAPS(-0.000002338582277506),\r\n+LPF_TAPS(-0.000002407871092248),\r\n+LPF_TAPS(-0.000002387814767604),\r\n+LPF_TAPS(-0.000002287558619334),\r\n+LPF_TAPS(-0.000002118463259581),\r\n+LPF_TAPS(-0.000001893478950466),\r\n+LPF_TAPS(-0.000001626504038801),\r\n+LPF_TAPS(-0.000001331754540171),\r\n+LPF_TAPS(-0.000001023169801964),\r\n+LPF_TAPS(-0.000000713876132379),\r\n+LPF_TAPS(-0.000000415726506026),\r\n+LPF_TAPS(-0.000000138930138694),\r\n+LPF_TAPS(0.000000108218929585),\r\n+LPF_TAPS(0.000000319509882033),\r\n+LPF_TAPS(0.000000490880137644),\r\n+LPF_TAPS(0.000000620382081976),\r\n+LPF_TAPS(0.000000708060236928),\r\n+LPF_TAPS(0.000000755750958378),\r\n+LPF_TAPS(0.000000766819403203),\r\n+LPF_TAPS(0.000000745850363362),\r\n+LPF_TAPS(0.000000698310581159),\r\n+LPF_TAPS(0.000000630200331088),\r\n+LPF_TAPS(0.000000547711411542),\r\n+LPF_TAPS(0.000000456907299830),\r\n+LPF_TAPS(0.000000363439182757),\r\n+LPF_TAPS(0.000000272309003584),\r\n+LPF_TAPS(0.000000187687704968),\r\n+LPF_TAPS(0.000000112793649081),\r\n+LPF_TAPS(0.000000049832918420),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000036465621112),\r\n+LPF_TAPS(-0.000000060174053095),\r\n+LPF_TAPS(-0.000000072440019472),\r\n+LPF_TAPS(-0.000000075109154481),\r\n+LPF_TAPS(-0.000000070367396870),\r\n+LPF_TAPS(-0.000000060545647801),\r\n+LPF_TAPS(-0.000000047931559441),\r\n+LPF_TAPS(-0.000000034599414872),\r\n+LPF_TAPS(-0.000000022267607829),\r\n+LPF_TAPS(-0.000000012191318007),\r\n+LPF_TAPS(-0.000000005095710178),\r\n+LPF_TAPS(-0.000000001152484340),\r\n+LPF_TAPS(0.000000000000000000),\r\n+};\r\ndiff --git a/core/sound/blip_lpf_768K_384K.h b/core/sound/blip_lpf_768K_384K.h\nnew file mode 100644\nindex 000000000..e198f897e\n--- /dev/null\n+++ b/core/sound/blip_lpf_768K_384K.h\n@@ -0,0 +1,1181 @@\n+static buf_t const blip_lpf_768K_384K[blip_lpf_768K_taps] = {\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000000270411186),\r\n+LPF_TAPS(-0.000000000994249696),\r\n+LPF_TAPS(0.000000002039181362),\r\n+LPF_TAPS(-0.000000003271279145),\r\n+LPF_TAPS(0.000000004555102288),\r\n+LPF_TAPS(-0.000000005753776591),\r\n+LPF_TAPS(0.000000006729075805),\r\n+LPF_TAPS(-0.000000007341504155),\r\n+LPF_TAPS(0.000000007450379994),\r\n+LPF_TAPS(-0.000000006913920594),\r\n+LPF_TAPS(0.000000005589328076),\r\n+LPF_TAPS(-0.000000003332876482),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000004554617657),\r\n+LPF_TAPS(-0.000000010476952726),\r\n+LPF_TAPS(0.000000017913549694),\r\n+LPF_TAPS(-0.000000027011428453),\r\n+LPF_TAPS(0.000000037917990275),\r\n+LPF_TAPS(-0.000000050780922627),\r\n+LPF_TAPS(0.000000065748102820),\r\n+LPF_TAPS(-0.000000082967500483),\r\n+LPF_TAPS(0.000000102587078868),\r\n+LPF_TAPS(-0.000000124754694991),\r\n+LPF_TAPS(0.000000149617998591),\r\n+LPF_TAPS(-0.000000177324329941),\r\n+LPF_TAPS(0.000000208020616472),\r\n+LPF_TAPS(-0.000000241853268257),\r\n+LPF_TAPS(0.000000278968072322),\r\n+LPF_TAPS(-0.000000319510085809),\r\n+LPF_TAPS(0.000000363623527997),\r\n+LPF_TAPS(-0.000000411451671180),\r\n+LPF_TAPS(0.000000463136730412),\r\n+LPF_TAPS(-0.000000518819752139),\r\n+LPF_TAPS(0.000000578640501706),\r\n+LPF_TAPS(-0.000000642737349775),\r\n+LPF_TAPS(0.000000711247157657),\r\n+LPF_TAPS(-0.000000784305161561),\r\n+LPF_TAPS(0.000000862044855799),\r\n+LPF_TAPS(-0.000000944597874939),\r\n+LPF_TAPS(0.000001032093874948),\r\n+LPF_TAPS(-0.000001124660413318),\r\n+LPF_TAPS(0.000001222422828231),\r\n+LPF_TAPS(-0.000001325504116749),\r\n+LPF_TAPS(0.000001434024812076),\r\n+LPF_TAPS(-0.000001548102859921),\r\n+LPF_TAPS(0.000001667853493968),\r\n+LPF_TAPS(-0.000001793389110503),\r\n+LPF_TAPS(0.000001924819142227),\r\n+LPF_TAPS(-0.000002062249931271),\r\n+LPF_TAPS(0.000002205784601466),\r\n+LPF_TAPS(-0.000002355522929902),\r\n+LPF_TAPS(0.000002511561217805),\r\n+LPF_TAPS(-0.000002673992160767),\r\n+LPF_TAPS(0.000002842904718416),\r\n+LPF_TAPS(-0.000003018383983486),\r\n+LPF_TAPS(0.000003200511050424),\r\n+LPF_TAPS(-0.000003389362883522),\r\n+LPF_TAPS(0.000003585012184637),\r\n+LPF_TAPS(-0.000003787527260573),\r\n+LPF_TAPS(0.000003996971890143),\r\n+LPF_TAPS(-0.000004213405190998),\r\n+LPF_TAPS(0.000004436881486255),\r\n+LPF_TAPS(-0.000004667450171018),\r\n+LPF_TAPS(0.000004905155578810),\r\n+LPF_TAPS(-0.000005150036848010),\r\n+LPF_TAPS(0.000005402127788367),\r\n+LPF_TAPS(-0.000005661456747620),\r\n+LPF_TAPS(0.000005928046478342),\r\n+LPF_TAPS(-0.000006201914005048),\r\n+LPF_TAPS(0.000006483070491646),\r\n+LPF_TAPS(-0.000006771521109318),\r\n+LPF_TAPS(0.000007067264904908),\r\n+LPF_TAPS(-0.000007370294669877),\r\n+LPF_TAPS(0.000007680596809926),\r\n+LPF_TAPS(-0.000007998151215387),\r\n+LPF_TAPS(0.000008322931132410),\r\n+LPF_TAPS(-0.000008654903035105),\r\n+LPF_TAPS(0.000008994026498681),\r\n+LPF_TAPS(-0.000009340254073686),\r\n+LPF_TAPS(0.000009693531161449),\r\n+LPF_TAPS(-0.000010053795890810),\r\n+LPF_TAPS(0.000010420978996245),\r\n+LPF_TAPS(-0.000010795003697464),\r\n+LPF_TAPS(0.000011175785580615),\r\n+LPF_TAPS(-0.000011563232481166),\r\n+LPF_TAPS(0.000011957244368585),\r\n+LPF_TAPS(-0.000012357713232915),\r\n+LPF_TAPS(0.000012764522973365),\r\n+LPF_TAPS(-0.000013177549289003),\r\n+LPF_TAPS(0.000013596659571678),\r\n+LPF_TAPS(-0.000014021712801288),\r\n+LPF_TAPS(0.000014452559443468),\r\n+LPF_TAPS(-0.000014889041349871),\r\n+LPF_TAPS(0.000015330991661110),\r\n+LPF_TAPS(-0.000015778234712481),\r\n+LPF_TAPS(0.000016230585942621),\r\n+LPF_TAPS(-0.000016687851805172),\r\n+LPF_TAPS(0.000017149829683597),\r\n+LPF_TAPS(-0.000017616307809269),\r\n+LPF_TAPS(0.000018087065182938),\r\n+LPF_TAPS(-0.000018561871499706),\r\n+LPF_TAPS(0.000019040487077642),\r\n+LPF_TAPS(-0.000019522662790136),\r\n+LPF_TAPS(0.000020008140002136),\r\n+LPF_TAPS(-0.000020496650510385),\r\n+LPF_TAPS(0.000020987916487774),\r\n+LPF_TAPS(-0.000021481650431946),\r\n+LPF_TAPS(0.000021977555118269),\r\n+LPF_TAPS(-0.000022475323557302),\r\n+LPF_TAPS(0.000022974638956881),\r\n+LPF_TAPS(-0.000023475174688944),\r\n+LPF_TAPS(0.000023976594261223),\r\n+LPF_TAPS(-0.000024478551293927),\r\n+LPF_TAPS(0.000024980689501528),\r\n+LPF_TAPS(-0.000025482642679791),\r\n+LPF_TAPS(0.000025984034698155),\r\n+LPF_TAPS(-0.000026484479497582),\r\n+LPF_TAPS(0.000026983581094014),\r\n+LPF_TAPS(-0.000027480933587538),\r\n+LPF_TAPS(0.000027976121177382),\r\n+LPF_TAPS(-0.000028468718182870),\r\n+LPF_TAPS(0.000028958289070426),\r\n+LPF_TAPS(-0.000029444388486774),\r\n+LPF_TAPS(0.000029926561298414),\r\n+LPF_TAPS(-0.000030404342637523),\r\n+LPF_TAPS(0.000030877257954332),\r\n+LPF_TAPS(-0.000031344823076165),\r\n+LPF_TAPS(0.000031806544273172),\r\n+LPF_TAPS(-0.000032261918330903),\r\n+LPF_TAPS(0.000032710432629812),\r\n+LPF_TAPS(-0.000033151565231787),\r\n+LPF_TAPS(0.000033584784973814),\r\n+LPF_TAPS(-0.000034009551568840),\r\n+LPF_TAPS(0.000034425315713993),\r\n+LPF_TAPS(-0.000034831519206137),\r\n+LPF_TAPS(0.000035227595064980),\r\n+LPF_TAPS(-0.000035612967663724),\r\n+LPF_TAPS(0.000035987052867338),\r\n+LPF_TAPS(-0.000036349258178619),\r\n+LPF_TAPS(0.000036698982892007),\r\n+LPF_TAPS(-0.000037035618255292),\r\n+LPF_TAPS(0.000037358547639259),\r\n+LPF_TAPS(-0.000037667146715327),\r\n+LPF_TAPS(0.000037960783641273),\r\n+LPF_TAPS(-0.000038238819255021),\r\n+LPF_TAPS(0.000038500607276709),\r\n+LPF_TAPS(-0.000038745494518822),\r\n+LPF_TAPS(0.000038972821104735),\r\n+LPF_TAPS(-0.000039181920695467),\r\n+LPF_TAPS(0.000039372120724805),\r\n+LPF_TAPS(-0.000039542742642795),\r\n+LPF_TAPS(0.000039693102167627),\r\n+LPF_TAPS(-0.000039822509545943),\r\n+LPF_TAPS(0.000039930269821541),\r\n+LPF_TAPS(-0.000040015683112645),\r\n+LPF_TAPS(0.000040078044897437),\r\n+LPF_TAPS(-0.000040116646308240),\r\n+LPF_TAPS(0.000040130774434075),\r\n+LPF_TAPS(-0.000040119712631595),\r\n+LPF_TAPS(0.000040082740844612),\r\n+LPF_TAPS(-0.000040019135931921),\r\n+LPF_TAPS(0.000039928172003567),\r\n+LPF_TAPS(-0.000039809120765476),\r\n+LPF_TAPS(0.000039661251872419),\r\n+LPF_TAPS(-0.000039483833289280),\r\n+LPF_TAPS(0.000039276131660508),\r\n+LPF_TAPS(-0.000039037412687953),\r\n+LPF_TAPS(0.000038766941516558),\r\n+LPF_TAPS(-0.000038463983128416),\r\n+LPF_TAPS(0.000038127802744662),\r\n+LPF_TAPS(-0.000037757666235375),\r\n+LPF_TAPS(0.000037352840537317),\r\n+LPF_TAPS(-0.000036912594079466),\r\n+LPF_TAPS(0.000036436197216230),\r\n+LPF_TAPS(-0.000035922922668168),\r\n+LPF_TAPS(0.000035372045970431),\r\n+LPF_TAPS(-0.000034782845928194),\r\n+LPF_TAPS(0.000034154605079717),\r\n+LPF_TAPS(-0.000033486610166390),\r\n+LPF_TAPS(0.000032778152609630),\r\n+LPF_TAPS(-0.000032028528994971),\r\n+LPF_TAPS(0.000031237041562635),\r\n+LPF_TAPS(-0.000030402998704811),\r\n+LPF_TAPS(0.000029525715469236),\r\n+LPF_TAPS(-0.000028604514069339),\r\n+LPF_TAPS(0.000027638724400135),\r\n+LPF_TAPS(-0.000026627684560227),\r\n+LPF_TAPS(0.000025570741379770),\r\n+LPF_TAPS(-0.000024467250953544),\r\n+LPF_TAPS(0.000023316579179911),\r\n+LPF_TAPS(-0.000022118102304654),\r\n+LPF_TAPS(0.000020871207469923),\r\n+LPF_TAPS(-0.000019575293267954),\r\n+LPF_TAPS(0.000018229770299364),\r\n+LPF_TAPS(-0.000016834061735821),\r\n+LPF_TAPS(0.000015387603886708),\r\n+LPF_TAPS(-0.000013889846770054),\r\n+LPF_TAPS(0.000012340254686558),\r\n+LPF_TAPS(-0.000010738306797607),\r\n+LPF_TAPS(0.000009083497706100),\r\n+LPF_TAPS(-0.000007375338040335),\r\n+LPF_TAPS(0.000005613355040533),\r\n+LPF_TAPS(-0.000003797093147761),\r\n+LPF_TAPS(0.000001926114595016),\r\n+LPF_TAPS(-0.000000000000000003),\r\n+LPF_TAPS(-0.000001981651040116),\r\n+LPF_TAPS(0.000004019219353176),\r\n+LPF_TAPS(-0.000006113065595237),\r\n+LPF_TAPS(0.000008263529652806),\r\n+LPF_TAPS(-0.000010470930045337),\r\n+LPF_TAPS(0.000012735563326905),\r\n+LPF_TAPS(-0.000015057703488542),\r\n+LPF_TAPS(0.000017437601360918),\r\n+LPF_TAPS(-0.000019875484017872),\r\n+LPF_TAPS(0.000022371554181095),\r\n+LPF_TAPS(-0.000024925989626264),\r\n+LPF_TAPS(0.000027538942591151),\r\n+LPF_TAPS(-0.000030210539185376),\r\n+LPF_TAPS(0.000032940878803412),\r\n+LPF_TAPS(-0.000035730033539605),\r\n+LPF_TAPS(0.000038578047606853),\r\n+LPF_TAPS(-0.000041484936758591),\r\n+LPF_TAPS(0.000044450687714644),\r\n+LPF_TAPS(-0.000047475257591278),\r\n+LPF_TAPS(0.000050558573335760),\r\n+LPF_TAPS(-0.000053700531166021),\r\n+LPF_TAPS(0.000056900996015075),\r\n+LPF_TAPS(-0.000060159800981691),\r\n+LPF_TAPS(0.000063476746786749),\r\n+LPF_TAPS(-0.000066851601235593),\r\n+LPF_TAPS(0.000070284098687913),\r\n+LPF_TAPS(-0.000073773939533842),\r\n+LPF_TAPS(0.000077320789678049),\r\n+LPF_TAPS(-0.000080924280031426),\r\n+LPF_TAPS(0.000084584006010995),\r\n+LPF_TAPS(-0.000088299527048358),\r\n+LPF_TAPS(0.000092070366107026),\r\n+LPF_TAPS(-0.000095896009209253),\r\n+LPF_TAPS(0.000099775904971949),\r\n+LPF_TAPS(-0.000103709464153514),\r\n+LPF_TAPS(0.000107696059210172),\r\n+LPF_TAPS(-0.000111735023863637),\r\n+LPF_TAPS(0.000115825652679693),\r\n+LPF_TAPS(-0.000119967200658306),\r\n+LPF_TAPS(0.000124158882835594),\r\n+LPF_TAPS(-0.000128399873897980),\r\n+LPF_TAPS(0.000132689307809155),\r\n+LPF_TAPS(-0.000137026277449419),\r\n+LPF_TAPS(0.000141409834269035),\r\n+LPF_TAPS(-0.000145838987954894),\r\n+LPF_TAPS(0.000150312706110820),\r\n+LPF_TAPS(-0.000154829913953110),\r\n+LPF_TAPS(0.000159389494019859),\r\n+LPF_TAPS(-0.000163990285895906),\r\n+LPF_TAPS(0.000168631085952943),\r\n+LPF_TAPS(-0.000173310647105377),\r\n+LPF_TAPS(0.000178027678582232),\r\n+LPF_TAPS(-0.000182780845715392),\r\n+LPF_TAPS(0.000187568769744742),\r\n+LPF_TAPS(-0.000192390027639763),\r\n+LPF_TAPS(0.000197243151939321),\r\n+LPF_TAPS(-0.000202126630608231),\r\n+LPF_TAPS(0.000207038906912205),\r\n+LPF_TAPS(-0.000211978379311058),\r\n+LPF_TAPS(0.000216943401370225),\r\n+LPF_TAPS(-0.000221932281691084),\r\n+LPF_TAPS(0.000226943283860568),\r\n+LPF_TAPS(-0.000231974626419998),\r\n+LPF_TAPS(0.000237024482853370),\r\n+LPF_TAPS(-0.000242090981595875),\r\n+LPF_TAPS(0.000247172206062245),\r\n+LPF_TAPS(-0.000252266194695467),\r\n+LPF_TAPS(0.000257370941036386),\r\n+LPF_TAPS(-0.000262484393813786),\r\n+LPF_TAPS(0.000267604457055676),\r\n+LPF_TAPS(-0.000272728990221946),\r\n+LPF_TAPS(0.000277855808358299),\r\n+LPF_TAPS(-0.000282982682271836),\r\n+LPF_TAPS(0.000288107338728734),\r\n+LPF_TAPS(-0.000293227460673635),\r\n+LPF_TAPS(0.000298340687471423),\r\n+LPF_TAPS(-0.000303444615171273),\r\n+LPF_TAPS(0.000308536796793261),\r\n+LPF_TAPS(-0.000313614742637452),\r\n+LPF_TAPS(0.000318675920616005),\r\n+LPF_TAPS(-0.000323717756607956),\r\n+LPF_TAPS(0.000328737634837030),\r\n+LPF_TAPS(-0.000333732898272658),\r\n+LPF_TAPS(0.000338700849054109),\r\n+LPF_TAPS(-0.000343638748937800),\r\n+LPF_TAPS(0.000348543819768130),\r\n+LPF_TAPS(-0.000353413243971537),\r\n+LPF_TAPS(0.000358244165074024),\r\n+LPF_TAPS(-0.000363033688242245),\r\n+LPF_TAPS(0.000367778880847963),\r\n+LPF_TAPS(-0.000372476773056069),\r\n+LPF_TAPS(0.000377124358436137),\r\n+LPF_TAPS(-0.000381718594597412),\r\n+LPF_TAPS(0.000386256403847293),\r\n+LPF_TAPS(-0.000390734673873283),\r\n+LPF_TAPS(0.000395150258448289),\r\n+LPF_TAPS(-0.000399499978159282),\r\n+LPF_TAPS(0.000403780621159213),\r\n+LPF_TAPS(-0.000407988943942102),\r\n+LPF_TAPS(0.000412121672141243),\r\n+LPF_TAPS(-0.000416175501350349),\r\n+LPF_TAPS(0.000420147097967579),\r\n+LPF_TAPS(-0.000424033100062336),\r\n+LPF_TAPS(0.000427830118264552),\r\n+LPF_TAPS(-0.000431534736676509),\r\n+LPF_TAPS(0.000435143513806895),\r\n+LPF_TAPS(-0.000438652983526867),\r\n+LPF_TAPS(0.000442059656048091),\r\n+LPF_TAPS(-0.000445360018922507),\r\n+LPF_TAPS(0.000448550538063360),\r\n+LPF_TAPS(-0.000451627658787709),\r\n+LPF_TAPS(0.000454587806879764),\r\n+LPF_TAPS(-0.000457427389675035),\r\n+LPF_TAPS(0.000460142797164853),\r\n+LPF_TAPS(-0.000462730403121316),\r\n+LPF_TAPS(0.000465186566241766),\r\n+LPF_TAPS(-0.000467507631313145),\r\n+LPF_TAPS(0.000469689930395631),\r\n+LPF_TAPS(-0.000471729784024983),\r\n+LPF_TAPS(0.000473623502433613),\r\n+LPF_TAPS(-0.000475367386790137),\r\n+LPF_TAPS(0.000476957730456324),\r\n+LPF_TAPS(-0.000478390820261935),\r\n+LPF_TAPS(0.000479662937796735),\r\n+LPF_TAPS(-0.000480770360718725),\r\n+LPF_TAPS(0.000481709364079260),\r\n+LPF_TAPS(-0.000482476221663812),\r\n+LPF_TAPS(0.000483067207347903),\r\n+LPF_TAPS(-0.000483478596468587),\r\n+LPF_TAPS(0.000483706667210077),\r\n+LPF_TAPS(-0.000483747702003447),\r\n+LPF_TAPS(0.000483597988940244),\r\n+LPF_TAPS(-0.000483253823198865),\r\n+LPF_TAPS(0.000482711508483713),\r\n+LPF_TAPS(-0.000481967358476406),\r\n+LPF_TAPS(0.000481017698298616),\r\n+LPF_TAPS(-0.000479858865985737),\r\n+LPF_TAPS(0.000478487213971473),\r\n+LPF_TAPS(-0.000476899110581980),\r\n+LPF_TAPS(0.000475090941539597),\r\n+LPF_TAPS(-0.000473059111475377),\r\n+LPF_TAPS(0.000470800045449915),\r\n+LPF_TAPS(-0.000468310190481600),\r\n+LPF_TAPS(0.000465586017082436),\r\n+LPF_TAPS(-0.000462624020799889),\r\n+LPF_TAPS(0.000459420723764587),\r\n+LPF_TAPS(-0.000455972676243683),\r\n+LPF_TAPS(0.000452276458198651),\r\n+LPF_TAPS(-0.000448328680846479),\r\n+LPF_TAPS(0.000444125988225302),\r\n+LPF_TAPS(-0.000439665058761943),\r\n+LPF_TAPS(0.000434942606841526),\r\n+LPF_TAPS(-0.000429955384379064),\r\n+LPF_TAPS(0.000424700182391138),\r\n+LPF_TAPS(-0.000419173832567952),\r\n+LPF_TAPS(0.000413373208844710),\r\n+LPF_TAPS(-0.000407295228971762),\r\n+LPF_TAPS(0.000400936856082419),\r\n+LPF_TAPS(-0.000394295100258801),\r\n+LPF_TAPS(0.000387367020093622),\r\n+LPF_TAPS(-0.000380149724248259),\r\n+LPF_TAPS(0.000372640373005998),\r\n+LPF_TAPS(-0.000364836179819894),\r\n+LPF_TAPS(0.000356734412854055),\r\n+LPF_TAPS(-0.000348332396518861),\r\n+LPF_TAPS(0.000339627512997867),\r\n+LPF_TAPS(-0.000330617203766392),\r\n+LPF_TAPS(0.000321298971101761),\r\n+LPF_TAPS(-0.000311670379583514),\r\n+LPF_TAPS(0.000301729057582259),\r\n+LPF_TAPS(-0.000291472698739046),\r\n+LPF_TAPS(0.000280899063431644),\r\n+LPF_TAPS(-0.000270005980228271),\r\n+LPF_TAPS(0.000258791347328876),\r\n+LPF_TAPS(-0.000247253133991462),\r\n+LPF_TAPS(0.000235389381944138),\r\n+LPF_TAPS(-0.000223198206781637),\r\n+LPF_TAPS(0.000210677799345778),\r\n+LPF_TAPS(-0.000197826427088561),\r\n+LPF_TAPS(0.000184642435418710),\r\n+LPF_TAPS(-0.000171124249029053),\r\n+LPF_TAPS(0.000157270373204788),\r\n+LPF_TAPS(-0.000143079395113615),\r\n+LPF_TAPS(0.000128549985073485),\r\n+LPF_TAPS(-0.000113680897800369),\r\n+LPF_TAPS(0.000098470973634793),\r\n+LPF_TAPS(-0.000082919139745099),\r\n+LPF_TAPS(0.000067024411307639),\r\n+LPF_TAPS(-0.000050785892664286),\r\n+LPF_TAPS(0.000034202778454439),\r\n+LPF_TAPS(-0.000017274354722572),\r\n+LPF_TAPS(0.000000000000000014),\r\n+LPF_TAPS(0.000017620813639447),\r\n+LPF_TAPS(-0.000035588519551489),\r\n+LPF_TAPS(0.000053903455519512),\r\n+LPF_TAPS(-0.000072565862782260),\r\n+LPF_TAPS(0.000091575885089580),\r\n+LPF_TAPS(-0.000110933567787666),\r\n+LPF_TAPS(0.000130638856934091),\r\n+LPF_TAPS(-0.000150691598443988),\r\n+LPF_TAPS(0.000171091537266013),\r\n+LPF_TAPS(-0.000191838316591080),\r\n+LPF_TAPS(0.000212931477093403),\r\n+LPF_TAPS(-0.000234370456202377),\r\n+LPF_TAPS(0.000256154587410179),\r\n+LPF_TAPS(-0.000278283099611775),\r\n+LPF_TAPS(0.000300755116478590),\r\n+LPF_TAPS(-0.000323569655867949),\r\n+LPF_TAPS(0.000346725629267694),\r\n+LPF_TAPS(-0.000370221841275197),\r\n+LPF_TAPS(0.000394056989113803),\r\n+LPF_TAPS(-0.000418229662185097),\r\n+LPF_TAPS(0.000442738341658212),\r\n+LPF_TAPS(-0.000467581400096332),\r\n+LPF_TAPS(0.000492757101121587),\r\n+LPF_TAPS(-0.000518263599116645),\r\n+LPF_TAPS(0.000544098938966130),\r\n+LPF_TAPS(-0.000570261055836143),\r\n+LPF_TAPS(0.000596747774993021),\r\n+LPF_TAPS(-0.000623556811661394),\r\n+LPF_TAPS(0.000650685770922677),\r\n+LPF_TAPS(-0.000678132147652138),\r\n+LPF_TAPS(0.000705893326497600),\r\n+LPF_TAPS(-0.000733966581898311),\r\n+LPF_TAPS(0.000762349078143984),\r\n+LPF_TAPS(-0.000791037869475468),\r\n+LPF_TAPS(0.000820029900226574),\r\n+LPF_TAPS(-0.000849322005006614),\r\n+LPF_TAPS(0.000878910908925097),\r\n+LPF_TAPS(-0.000908793227858092),\r\n+LPF_TAPS(0.000938965468755724),\r\n+LPF_TAPS(-0.000969424029992167),\r\n+LPF_TAPS(0.001000165201758039),\r\n+LPF_TAPS(-0.001031185166493171),\r\n+LPF_TAPS(0.001062479999363495),\r\n+LPF_TAPS(-0.001094045668779393),\r\n+LPF_TAPS(0.001125878036955373),\r\n+LPF_TAPS(-0.001157972860512807),\r\n+LPF_TAPS(0.001190325791125529),\r\n+LPF_TAPS(-0.001222932376205617),\r\n+LPF_TAPS(0.001255788059632947),\r\n+LPF_TAPS(-0.001288888182526336),\r\n+LPF_TAPS(0.001322227984056061),\r\n+LPF_TAPS(-0.001355802602298820),\r\n+LPF_TAPS(0.001389607075134370),\r\n+LPF_TAPS(-0.001423636341183102),\r\n+LPF_TAPS(0.001457885240785600),\r\n+LPF_TAPS(-0.001492348517023386),\r\n+LPF_TAPS(0.001527020816780052),\r\n+LPF_TAPS(-0.001561896691843702),\r\n+LPF_TAPS(0.001596970600050276),\r\n+LPF_TAPS(-0.001632236906465618),\r\n+LPF_TAPS(0.001667689884609320),\r\n+LPF_TAPS(-0.001703323717717588),\r\n+LPF_TAPS(0.001739132500044762),\r\n+LPF_TAPS(-0.001775110238204683),\r\n+LPF_TAPS(0.001811250852550967),\r\n+LPF_TAPS(-0.001847548178594808),\r\n+LPF_TAPS(0.001883995968461036),\r\n+LPF_TAPS(-0.001920587892381849),\r\n+LPF_TAPS(0.001957317540227685),\r\n+LPF_TAPS(-0.001994178423074255),\r\n+LPF_TAPS(0.002031163974806278),\r\n+LPF_TAPS(-0.002068267553756874),\r\n+LPF_TAPS(0.002105482444381715),\r\n+LPF_TAPS(-0.002142801858968588),\r\n+LPF_TAPS(0.002180218939380428),\r\n+LPF_TAPS(-0.002217726758832453),\r\n+LPF_TAPS(0.002255318323702332),\r\n+LPF_TAPS(-0.002292986575372473),\r\n+LPF_TAPS(0.002330724392104569),\r\n+LPF_TAPS(-0.002368524590945418),\r\n+LPF_TAPS(0.002406379929663035),\r\n+LPF_TAPS(-0.002444283108713129),\r\n+LPF_TAPS(0.002482226773234861),\r\n+LPF_TAPS(-0.002520203515075174),\r\n+LPF_TAPS(0.002558205874840951),\r\n+LPF_TAPS(-0.002596226343979004),\r\n+LPF_TAPS(0.002634257366882061),\r\n+LPF_TAPS(-0.002672291343020784),\r\n+LPF_TAPS(0.002710320629100963),\r\n+LPF_TAPS(-0.002748337541244994),\r\n+LPF_TAPS(0.002786334357196795),\r\n+LPF_TAPS(-0.002824303318549647),\r\n+LPF_TAPS(0.002862236632995987),\r\n+LPF_TAPS(-0.002900126476598270),\r\n+LPF_TAPS(0.002937964996080315),\r\n+LPF_TAPS(-0.002975744311138068),\r\n+LPF_TAPS(0.003013456516769105),\r\n+LPF_TAPS(-0.003051093685619919),\r\n+LPF_TAPS(0.003088647870350189),\r\n+LPF_TAPS(-0.003126111106013140),\r\n+LPF_TAPS(0.003163475412451058),\r\n+LPF_TAPS(-0.003200732796705143),\r\n+LPF_TAPS(0.003237875255438910),\r\n+LPF_TAPS(-0.003274894777373765),\r\n+LPF_TAPS(0.003311783345736453),\r\n+LPF_TAPS(-0.003348532940717123),\r\n+LPF_TAPS(0.003385135541937034),\r\n+LPF_TAPS(-0.003421583130924953),\r\n+LPF_TAPS(0.003457867693601739),\r\n+LPF_TAPS(-0.003493981222771505),\r\n+LPF_TAPS(0.003529915720618663),\r\n+LPF_TAPS(-0.003565663201210385),\r\n+LPF_TAPS(0.003601215693002516),\r\n+LPF_TAPS(-0.003636565241348854),\r\n+LPF_TAPS(0.003671703911012522),\r\n+LPF_TAPS(-0.003706623788678157),\r\n+LPF_TAPS(0.003741316985464251),\r\n+LPF_TAPS(-0.003775775639435239),\r\n+LPF_TAPS(0.003809991918110436),\r\n+LPF_TAPS(-0.003843958020971396),\r\n+LPF_TAPS(0.003877666181964841),\r\n+LPF_TAPS(-0.003911108672000603),\r\n+LPF_TAPS(0.003944277801444062),\r\n+LPF_TAPS(-0.003977165922601843),\r\n+LPF_TAPS(0.004009765432199282),\r\n+LPF_TAPS(-0.004042068773849197),\r\n+LPF_TAPS(0.004074068440511907),\r\n+LPF_TAPS(-0.004105756976942348),\r\n+LPF_TAPS(0.004137126982127919),\r\n+LPF_TAPS(-0.004168171111711666),\r\n+LPF_TAPS(0.004198882080402778),\r\n+LPF_TAPS(-0.004229252664372421),\r\n+LPF_TAPS(0.004259275703633247),\r\n+LPF_TAPS(-0.004288944104403062),\r\n+LPF_TAPS(0.004318250841450483),\r\n+LPF_TAPS(-0.004347188960422623),\r\n+LPF_TAPS(0.004375751580152430),\r\n+LPF_TAPS(-0.004403931894946425),\r\n+LPF_TAPS(0.004431723176851317),\r\n+LPF_TAPS(-0.004459118777896791),\r\n+LPF_TAPS(0.004486112132317764),\r\n+LPF_TAPS(-0.004512696758749931),\r\n+LPF_TAPS(0.004538866262402050),\r\n+LPF_TAPS(-0.004564614337201600),\r\n+LPF_TAPS(0.004589934767914467),\r\n+LPF_TAPS(-0.004614821432235720),\r\n+LPF_TAPS(0.004639268302853067),\r\n+LPF_TAPS(-0.004663269449481221),\r\n+LPF_TAPS(0.004686819040863900),\r\n+LPF_TAPS(-0.004709911346748542),\r\n+LPF_TAPS(0.004732540739825469),\r\n+LPF_TAPS(-0.004754701697636799),\r\n+LPF_TAPS(0.004776388804451371),\r\n+LPF_TAPS(-0.004797596753105372),\r\n+LPF_TAPS(0.004818320346807375),\r\n+LPF_TAPS(-0.004838554500909534),\r\n+LPF_TAPS(0.004858294244640562),\r\n+LPF_TAPS(-0.004877534722802006),\r\n+LPF_TAPS(0.004896271197427504),\r\n+LPF_TAPS(-0.004914499049402611),\r\n+LPF_TAPS(0.004932213780045447),\r\n+LPF_TAPS(-0.004949411012647929),\r\n+LPF_TAPS(0.004966086493976694),\r\n+LPF_TAPS(-0.004982236095731548),\r\n+LPF_TAPS(0.004997855815964010),\r\n+LPF_TAPS(-0.005012941780452204),\r\n+LPF_TAPS(0.005027490244032875),\r\n+LPF_TAPS(-0.005041497591890537),\r\n+LPF_TAPS(0.005054960340802851),\r\n+LPF_TAPS(-0.005067875140339913),\r\n+LPF_TAPS(0.005080238774019983),\r\n+LPF_TAPS(-0.005092048160419741),\r\n+LPF_TAPS(0.005103300354237250),\r\n+LPF_TAPS(-0.005113992547309152),\r\n+LPF_TAPS(0.005124122069582142),\r\n+LPF_TAPS(-0.005133686390034935),\r\n+LPF_TAPS(0.005142683117554329),\r\n+LPF_TAPS(-0.005151110001762504),\r\n+LPF_TAPS(0.005158964933796077),\r\n+LPF_TAPS(-0.005166245947036424),\r\n+LPF_TAPS(0.005172951217791205),\r\n+LPF_TAPS(-0.005179079065925450),\r\n+LPF_TAPS(0.005184627955445600),\r\n+LPF_TAPS(-0.005189596495030709),\r\n+LPF_TAPS(0.005193983438515609),\r\n+LPF_TAPS(-0.005197787685323134),\r\n+LPF_TAPS(0.005201008280846106),\r\n+LPF_TAPS(-0.005203644416778216),\r\n+LPF_TAPS(0.005205695431395181),\r\n+LPF_TAPS(-0.005207160809784200),\r\n+LPF_TAPS(0.005208040184022438),\r\n+LPF_TAPS(0.994791666661283269),\r\n+LPF_TAPS(0.005208040184022438),\r\n+LPF_TAPS(-0.005207160809784200),\r\n+LPF_TAPS(0.005205695431395181),\r\n+LPF_TAPS(-0.005203644416778216),\r\n+LPF_TAPS(0.005201008280846106),\r\n+LPF_TAPS(-0.005197787685323134),\r\n+LPF_TAPS(0.005193983438515609),\r\n+LPF_TAPS(-0.005189596495030709),\r\n+LPF_TAPS(0.005184627955445601),\r\n+LPF_TAPS(-0.005179079065925450),\r\n+LPF_TAPS(0.005172951217791205),\r\n+LPF_TAPS(-0.005166245947036424),\r\n+LPF_TAPS(0.005158964933796077),\r\n+LPF_TAPS(-0.005151110001762505),\r\n+LPF_TAPS(0.005142683117554329),\r\n+LPF_TAPS(-0.005133686390034935),\r\n+LPF_TAPS(0.005124122069582142),\r\n+LPF_TAPS(-0.005113992547309153),\r\n+LPF_TAPS(0.005103300354237250),\r\n+LPF_TAPS(-0.005092048160419742),\r\n+LPF_TAPS(0.005080238774019983),\r\n+LPF_TAPS(-0.005067875140339913),\r\n+LPF_TAPS(0.005054960340802851),\r\n+LPF_TAPS(-0.005041497591890537),\r\n+LPF_TAPS(0.005027490244032875),\r\n+LPF_TAPS(-0.005012941780452204),\r\n+LPF_TAPS(0.004997855815964010),\r\n+LPF_TAPS(-0.004982236095731548),\r\n+LPF_TAPS(0.004966086493976694),\r\n+LPF_TAPS(-0.004949411012647929),\r\n+LPF_TAPS(0.004932213780045447),\r\n+LPF_TAPS(-0.004914499049402611),\r\n+LPF_TAPS(0.004896271197427504),\r\n+LPF_TAPS(-0.004877534722802006),\r\n+LPF_TAPS(0.004858294244640562),\r\n+LPF_TAPS(-0.004838554500909534),\r\n+LPF_TAPS(0.004818320346807375),\r\n+LPF_TAPS(-0.004797596753105372),\r\n+LPF_TAPS(0.004776388804451371),\r\n+LPF_TAPS(-0.004754701697636799),\r\n+LPF_TAPS(0.004732540739825469),\r\n+LPF_TAPS(-0.004709911346748542),\r\n+LPF_TAPS(0.004686819040863900),\r\n+LPF_TAPS(-0.004663269449481221),\r\n+LPF_TAPS(0.004639268302853067),\r\n+LPF_TAPS(-0.004614821432235721),\r\n+LPF_TAPS(0.004589934767914467),\r\n+LPF_TAPS(-0.004564614337201602),\r\n+LPF_TAPS(0.004538866262402050),\r\n+LPF_TAPS(-0.004512696758749932),\r\n+LPF_TAPS(0.004486112132317765),\r\n+LPF_TAPS(-0.004459118777896791),\r\n+LPF_TAPS(0.004431723176851318),\r\n+LPF_TAPS(-0.004403931894946425),\r\n+LPF_TAPS(0.004375751580152430),\r\n+LPF_TAPS(-0.004347188960422624),\r\n+LPF_TAPS(0.004318250841450484),\r\n+LPF_TAPS(-0.004288944104403062),\r\n+LPF_TAPS(0.004259275703633247),\r\n+LPF_TAPS(-0.004229252664372422),\r\n+LPF_TAPS(0.004198882080402778),\r\n+LPF_TAPS(-0.004168171111711667),\r\n+LPF_TAPS(0.004137126982127919),\r\n+LPF_TAPS(-0.004105756976942348),\r\n+LPF_TAPS(0.004074068440511907),\r\n+LPF_TAPS(-0.004042068773849197),\r\n+LPF_TAPS(0.004009765432199283),\r\n+LPF_TAPS(-0.003977165922601843),\r\n+LPF_TAPS(0.003944277801444063),\r\n+LPF_TAPS(-0.003911108672000603),\r\n+LPF_TAPS(0.003877666181964843),\r\n+LPF_TAPS(-0.003843958020971395),\r\n+LPF_TAPS(0.003809991918110436),\r\n+LPF_TAPS(-0.003775775639435239),\r\n+LPF_TAPS(0.003741316985464251),\r\n+LPF_TAPS(-0.003706623788678157),\r\n+LPF_TAPS(0.003671703911012522),\r\n+LPF_TAPS(-0.003636565241348854),\r\n+LPF_TAPS(0.003601215693002516),\r\n+LPF_TAPS(-0.003565663201210386),\r\n+LPF_TAPS(0.003529915720618663),\r\n+LPF_TAPS(-0.003493981222771505),\r\n+LPF_TAPS(0.003457867693601739),\r\n+LPF_TAPS(-0.003421583130924954),\r\n+LPF_TAPS(0.003385135541937035),\r\n+LPF_TAPS(-0.003348532940717124),\r\n+LPF_TAPS(0.003311783345736452),\r\n+LPF_TAPS(-0.003274894777373765),\r\n+LPF_TAPS(0.003237875255438911),\r\n+LPF_TAPS(-0.003200732796705143),\r\n+LPF_TAPS(0.003163475412451059),\r\n+LPF_TAPS(-0.003126111106013141),\r\n+LPF_TAPS(0.003088647870350190),\r\n+LPF_TAPS(-0.003051093685619919),\r\n+LPF_TAPS(0.003013456516769106),\r\n+LPF_TAPS(-0.002975744311138068),\r\n+LPF_TAPS(0.002937964996080315),\r\n+LPF_TAPS(-0.002900126476598269),\r\n+LPF_TAPS(0.002862236632995987),\r\n+LPF_TAPS(-0.002824303318549648),\r\n+LPF_TAPS(0.002786334357196794),\r\n+LPF_TAPS(-0.002748337541244995),\r\n+LPF_TAPS(0.002710320629100963),\r\n+LPF_TAPS(-0.002672291343020785),\r\n+LPF_TAPS(0.002634257366882061),\r\n+LPF_TAPS(-0.002596226343979004),\r\n+LPF_TAPS(0.002558205874840951),\r\n+LPF_TAPS(-0.002520203515075174),\r\n+LPF_TAPS(0.002482226773234862),\r\n+LPF_TAPS(-0.002444283108713130),\r\n+LPF_TAPS(0.002406379929663036),\r\n+LPF_TAPS(-0.002368524590945418),\r\n+LPF_TAPS(0.002330724392104569),\r\n+LPF_TAPS(-0.002292986575372473),\r\n+LPF_TAPS(0.002255318323702333),\r\n+LPF_TAPS(-0.002217726758832453),\r\n+LPF_TAPS(0.002180218939380428),\r\n+LPF_TAPS(-0.002142801858968588),\r\n+LPF_TAPS(0.002105482444381714),\r\n+LPF_TAPS(-0.002068267553756875),\r\n+LPF_TAPS(0.002031163974806278),\r\n+LPF_TAPS(-0.001994178423074256),\r\n+LPF_TAPS(0.001957317540227685),\r\n+LPF_TAPS(-0.001920587892381849),\r\n+LPF_TAPS(0.001883995968461037),\r\n+LPF_TAPS(-0.001847548178594808),\r\n+LPF_TAPS(0.001811250852550967),\r\n+LPF_TAPS(-0.001775110238204684),\r\n+LPF_TAPS(0.001739132500044762),\r\n+LPF_TAPS(-0.001703323717717588),\r\n+LPF_TAPS(0.001667689884609320),\r\n+LPF_TAPS(-0.001632236906465618),\r\n+LPF_TAPS(0.001596970600050276),\r\n+LPF_TAPS(-0.001561896691843702),\r\n+LPF_TAPS(0.001527020816780052),\r\n+LPF_TAPS(-0.001492348517023386),\r\n+LPF_TAPS(0.001457885240785600),\r\n+LPF_TAPS(-0.001423636341183102),\r\n+LPF_TAPS(0.001389607075134370),\r\n+LPF_TAPS(-0.001355802602298820),\r\n+LPF_TAPS(0.001322227984056061),\r\n+LPF_TAPS(-0.001288888182526336),\r\n+LPF_TAPS(0.001255788059632947),\r\n+LPF_TAPS(-0.001222932376205617),\r\n+LPF_TAPS(0.001190325791125529),\r\n+LPF_TAPS(-0.001157972860512807),\r\n+LPF_TAPS(0.001125878036955374),\r\n+LPF_TAPS(-0.001094045668779393),\r\n+LPF_TAPS(0.001062479999363495),\r\n+LPF_TAPS(-0.001031185166493171),\r\n+LPF_TAPS(0.001000165201758039),\r\n+LPF_TAPS(-0.000969424029992166),\r\n+LPF_TAPS(0.000938965468755724),\r\n+LPF_TAPS(-0.000908793227858092),\r\n+LPF_TAPS(0.000878910908925098),\r\n+LPF_TAPS(-0.000849322005006615),\r\n+LPF_TAPS(0.000820029900226574),\r\n+LPF_TAPS(-0.000791037869475468),\r\n+LPF_TAPS(0.000762349078143985),\r\n+LPF_TAPS(-0.000733966581898311),\r\n+LPF_TAPS(0.000705893326497601),\r\n+LPF_TAPS(-0.000678132147652138),\r\n+LPF_TAPS(0.000650685770922677),\r\n+LPF_TAPS(-0.000623556811661394),\r\n+LPF_TAPS(0.000596747774993021),\r\n+LPF_TAPS(-0.000570261055836143),\r\n+LPF_TAPS(0.000544098938966130),\r\n+LPF_TAPS(-0.000518263599116645),\r\n+LPF_TAPS(0.000492757101121588),\r\n+LPF_TAPS(-0.000467581400096331),\r\n+LPF_TAPS(0.000442738341658212),\r\n+LPF_TAPS(-0.000418229662185096),\r\n+LPF_TAPS(0.000394056989113803),\r\n+LPF_TAPS(-0.000370221841275197),\r\n+LPF_TAPS(0.000346725629267694),\r\n+LPF_TAPS(-0.000323569655867949),\r\n+LPF_TAPS(0.000300755116478590),\r\n+LPF_TAPS(-0.000278283099611775),\r\n+LPF_TAPS(0.000256154587410179),\r\n+LPF_TAPS(-0.000234370456202377),\r\n+LPF_TAPS(0.000212931477093403),\r\n+LPF_TAPS(-0.000191838316591080),\r\n+LPF_TAPS(0.000171091537266013),\r\n+LPF_TAPS(-0.000150691598443988),\r\n+LPF_TAPS(0.000130638856934091),\r\n+LPF_TAPS(-0.000110933567787667),\r\n+LPF_TAPS(0.000091575885089580),\r\n+LPF_TAPS(-0.000072565862782260),\r\n+LPF_TAPS(0.000053903455519512),\r\n+LPF_TAPS(-0.000035588519551489),\r\n+LPF_TAPS(0.000017620813639447),\r\n+LPF_TAPS(0.000000000000000014),\r\n+LPF_TAPS(-0.000017274354722572),\r\n+LPF_TAPS(0.000034202778454439),\r\n+LPF_TAPS(-0.000050785892664286),\r\n+LPF_TAPS(0.000067024411307639),\r\n+LPF_TAPS(-0.000082919139745099),\r\n+LPF_TAPS(0.000098470973634793),\r\n+LPF_TAPS(-0.000113680897800369),\r\n+LPF_TAPS(0.000128549985073485),\r\n+LPF_TAPS(-0.000143079395113615),\r\n+LPF_TAPS(0.000157270373204788),\r\n+LPF_TAPS(-0.000171124249029052),\r\n+LPF_TAPS(0.000184642435418710),\r\n+LPF_TAPS(-0.000197826427088561),\r\n+LPF_TAPS(0.000210677799345778),\r\n+LPF_TAPS(-0.000223198206781637),\r\n+LPF_TAPS(0.000235389381944138),\r\n+LPF_TAPS(-0.000247253133991462),\r\n+LPF_TAPS(0.000258791347328876),\r\n+LPF_TAPS(-0.000270005980228271),\r\n+LPF_TAPS(0.000280899063431644),\r\n+LPF_TAPS(-0.000291472698739046),\r\n+LPF_TAPS(0.000301729057582259),\r\n+LPF_TAPS(-0.000311670379583514),\r\n+LPF_TAPS(0.000321298971101761),\r\n+LPF_TAPS(-0.000330617203766392),\r\n+LPF_TAPS(0.000339627512997867),\r\n+LPF_TAPS(-0.000348332396518861),\r\n+LPF_TAPS(0.000356734412854056),\r\n+LPF_TAPS(-0.000364836179819894),\r\n+LPF_TAPS(0.000372640373005998),\r\n+LPF_TAPS(-0.000380149724248259),\r\n+LPF_TAPS(0.000387367020093622),\r\n+LPF_TAPS(-0.000394295100258801),\r\n+LPF_TAPS(0.000400936856082419),\r\n+LPF_TAPS(-0.000407295228971762),\r\n+LPF_TAPS(0.000413373208844710),\r\n+LPF_TAPS(-0.000419173832567952),\r\n+LPF_TAPS(0.000424700182391138),\r\n+LPF_TAPS(-0.000429955384379064),\r\n+LPF_TAPS(0.000434942606841526),\r\n+LPF_TAPS(-0.000439665058761943),\r\n+LPF_TAPS(0.000444125988225302),\r\n+LPF_TAPS(-0.000448328680846479),\r\n+LPF_TAPS(0.000452276458198651),\r\n+LPF_TAPS(-0.000455972676243683),\r\n+LPF_TAPS(0.000459420723764588),\r\n+LPF_TAPS(-0.000462624020799889),\r\n+LPF_TAPS(0.000465586017082436),\r\n+LPF_TAPS(-0.000468310190481601),\r\n+LPF_TAPS(0.000470800045449915),\r\n+LPF_TAPS(-0.000473059111475377),\r\n+LPF_TAPS(0.000475090941539597),\r\n+LPF_TAPS(-0.000476899110581980),\r\n+LPF_TAPS(0.000478487213971474),\r\n+LPF_TAPS(-0.000479858865985737),\r\n+LPF_TAPS(0.000481017698298616),\r\n+LPF_TAPS(-0.000481967358476406),\r\n+LPF_TAPS(0.000482711508483713),\r\n+LPF_TAPS(-0.000483253823198866),\r\n+LPF_TAPS(0.000483597988940244),\r\n+LPF_TAPS(-0.000483747702003447),\r\n+LPF_TAPS(0.000483706667210077),\r\n+LPF_TAPS(-0.000483478596468587),\r\n+LPF_TAPS(0.000483067207347904),\r\n+LPF_TAPS(-0.000482476221663813),\r\n+LPF_TAPS(0.000481709364079260),\r\n+LPF_TAPS(-0.000480770360718725),\r\n+LPF_TAPS(0.000479662937796735),\r\n+LPF_TAPS(-0.000478390820261935),\r\n+LPF_TAPS(0.000476957730456324),\r\n+LPF_TAPS(-0.000475367386790138),\r\n+LPF_TAPS(0.000473623502433613),\r\n+LPF_TAPS(-0.000471729784024983),\r\n+LPF_TAPS(0.000469689930395632),\r\n+LPF_TAPS(-0.000467507631313146),\r\n+LPF_TAPS(0.000465186566241767),\r\n+LPF_TAPS(-0.000462730403121316),\r\n+LPF_TAPS(0.000460142797164853),\r\n+LPF_TAPS(-0.000457427389675035),\r\n+LPF_TAPS(0.000454587806879764),\r\n+LPF_TAPS(-0.000451627658787709),\r\n+LPF_TAPS(0.000448550538063360),\r\n+LPF_TAPS(-0.000445360018922507),\r\n+LPF_TAPS(0.000442059656048091),\r\n+LPF_TAPS(-0.000438652983526867),\r\n+LPF_TAPS(0.000435143513806896),\r\n+LPF_TAPS(-0.000431534736676510),\r\n+LPF_TAPS(0.000427830118264552),\r\n+LPF_TAPS(-0.000424033100062336),\r\n+LPF_TAPS(0.000420147097967580),\r\n+LPF_TAPS(-0.000416175501350349),\r\n+LPF_TAPS(0.000412121672141243),\r\n+LPF_TAPS(-0.000407988943942102),\r\n+LPF_TAPS(0.000403780621159213),\r\n+LPF_TAPS(-0.000399499978159282),\r\n+LPF_TAPS(0.000395150258448289),\r\n+LPF_TAPS(-0.000390734673873283),\r\n+LPF_TAPS(0.000386256403847293),\r\n+LPF_TAPS(-0.000381718594597412),\r\n+LPF_TAPS(0.000377124358436137),\r\n+LPF_TAPS(-0.000372476773056069),\r\n+LPF_TAPS(0.000367778880847964),\r\n+LPF_TAPS(-0.000363033688242245),\r\n+LPF_TAPS(0.000358244165074024),\r\n+LPF_TAPS(-0.000353413243971538),\r\n+LPF_TAPS(0.000348543819768130),\r\n+LPF_TAPS(-0.000343638748937801),\r\n+LPF_TAPS(0.000338700849054109),\r\n+LPF_TAPS(-0.000333732898272658),\r\n+LPF_TAPS(0.000328737634837030),\r\n+LPF_TAPS(-0.000323717756607956),\r\n+LPF_TAPS(0.000318675920616005),\r\n+LPF_TAPS(-0.000313614742637452),\r\n+LPF_TAPS(0.000308536796793261),\r\n+LPF_TAPS(-0.000303444615171273),\r\n+LPF_TAPS(0.000298340687471424),\r\n+LPF_TAPS(-0.000293227460673635),\r\n+LPF_TAPS(0.000288107338728734),\r\n+LPF_TAPS(-0.000282982682271836),\r\n+LPF_TAPS(0.000277855808358299),\r\n+LPF_TAPS(-0.000272728990221946),\r\n+LPF_TAPS(0.000267604457055676),\r\n+LPF_TAPS(-0.000262484393813786),\r\n+LPF_TAPS(0.000257370941036386),\r\n+LPF_TAPS(-0.000252266194695467),\r\n+LPF_TAPS(0.000247172206062245),\r\n+LPF_TAPS(-0.000242090981595876),\r\n+LPF_TAPS(0.000237024482853370),\r\n+LPF_TAPS(-0.000231974626419998),\r\n+LPF_TAPS(0.000226943283860568),\r\n+LPF_TAPS(-0.000221932281691084),\r\n+LPF_TAPS(0.000216943401370225),\r\n+LPF_TAPS(-0.000211978379311058),\r\n+LPF_TAPS(0.000207038906912205),\r\n+LPF_TAPS(-0.000202126630608231),\r\n+LPF_TAPS(0.000197243151939321),\r\n+LPF_TAPS(-0.000192390027639763),\r\n+LPF_TAPS(0.000187568769744742),\r\n+LPF_TAPS(-0.000182780845715392),\r\n+LPF_TAPS(0.000178027678582232),\r\n+LPF_TAPS(-0.000173310647105377),\r\n+LPF_TAPS(0.000168631085952943),\r\n+LPF_TAPS(-0.000163990285895906),\r\n+LPF_TAPS(0.000159389494019859),\r\n+LPF_TAPS(-0.000154829913953110),\r\n+LPF_TAPS(0.000150312706110820),\r\n+LPF_TAPS(-0.000145838987954894),\r\n+LPF_TAPS(0.000141409834269036),\r\n+LPF_TAPS(-0.000137026277449419),\r\n+LPF_TAPS(0.000132689307809155),\r\n+LPF_TAPS(-0.000128399873897980),\r\n+LPF_TAPS(0.000124158882835594),\r\n+LPF_TAPS(-0.000119967200658306),\r\n+LPF_TAPS(0.000115825652679693),\r\n+LPF_TAPS(-0.000111735023863637),\r\n+LPF_TAPS(0.000107696059210172),\r\n+LPF_TAPS(-0.000103709464153514),\r\n+LPF_TAPS(0.000099775904971949),\r\n+LPF_TAPS(-0.000095896009209253),\r\n+LPF_TAPS(0.000092070366107026),\r\n+LPF_TAPS(-0.000088299527048358),\r\n+LPF_TAPS(0.000084584006010995),\r\n+LPF_TAPS(-0.000080924280031426),\r\n+LPF_TAPS(0.000077320789678049),\r\n+LPF_TAPS(-0.000073773939533842),\r\n+LPF_TAPS(0.000070284098687913),\r\n+LPF_TAPS(-0.000066851601235593),\r\n+LPF_TAPS(0.000063476746786749),\r\n+LPF_TAPS(-0.000060159800981691),\r\n+LPF_TAPS(0.000056900996015075),\r\n+LPF_TAPS(-0.000053700531166021),\r\n+LPF_TAPS(0.000050558573335760),\r\n+LPF_TAPS(-0.000047475257591278),\r\n+LPF_TAPS(0.000044450687714644),\r\n+LPF_TAPS(-0.000041484936758591),\r\n+LPF_TAPS(0.000038578047606853),\r\n+LPF_TAPS(-0.000035730033539605),\r\n+LPF_TAPS(0.000032940878803412),\r\n+LPF_TAPS(-0.000030210539185376),\r\n+LPF_TAPS(0.000027538942591151),\r\n+LPF_TAPS(-0.000024925989626264),\r\n+LPF_TAPS(0.000022371554181096),\r\n+LPF_TAPS(-0.000019875484017872),\r\n+LPF_TAPS(0.000017437601360918),\r\n+LPF_TAPS(-0.000015057703488542),\r\n+LPF_TAPS(0.000012735563326905),\r\n+LPF_TAPS(-0.000010470930045337),\r\n+LPF_TAPS(0.000008263529652806),\r\n+LPF_TAPS(-0.000006113065595237),\r\n+LPF_TAPS(0.000004019219353176),\r\n+LPF_TAPS(-0.000001981651040116),\r\n+LPF_TAPS(-0.000000000000000003),\r\n+LPF_TAPS(0.000001926114595016),\r\n+LPF_TAPS(-0.000003797093147761),\r\n+LPF_TAPS(0.000005613355040533),\r\n+LPF_TAPS(-0.000007375338040335),\r\n+LPF_TAPS(0.000009083497706100),\r\n+LPF_TAPS(-0.000010738306797607),\r\n+LPF_TAPS(0.000012340254686558),\r\n+LPF_TAPS(-0.000013889846770054),\r\n+LPF_TAPS(0.000015387603886708),\r\n+LPF_TAPS(-0.000016834061735821),\r\n+LPF_TAPS(0.000018229770299364),\r\n+LPF_TAPS(-0.000019575293267954),\r\n+LPF_TAPS(0.000020871207469923),\r\n+LPF_TAPS(-0.000022118102304654),\r\n+LPF_TAPS(0.000023316579179911),\r\n+LPF_TAPS(-0.000024467250953544),\r\n+LPF_TAPS(0.000025570741379770),\r\n+LPF_TAPS(-0.000026627684560227),\r\n+LPF_TAPS(0.000027638724400135),\r\n+LPF_TAPS(-0.000028604514069339),\r\n+LPF_TAPS(0.000029525715469236),\r\n+LPF_TAPS(-0.000030402998704811),\r\n+LPF_TAPS(0.000031237041562636),\r\n+LPF_TAPS(-0.000032028528994971),\r\n+LPF_TAPS(0.000032778152609630),\r\n+LPF_TAPS(-0.000033486610166390),\r\n+LPF_TAPS(0.000034154605079718),\r\n+LPF_TAPS(-0.000034782845928194),\r\n+LPF_TAPS(0.000035372045970431),\r\n+LPF_TAPS(-0.000035922922668168),\r\n+LPF_TAPS(0.000036436197216230),\r\n+LPF_TAPS(-0.000036912594079466),\r\n+LPF_TAPS(0.000037352840537317),\r\n+LPF_TAPS(-0.000037757666235375),\r\n+LPF_TAPS(0.000038127802744662),\r\n+LPF_TAPS(-0.000038463983128416),\r\n+LPF_TAPS(0.000038766941516558),\r\n+LPF_TAPS(-0.000039037412687953),\r\n+LPF_TAPS(0.000039276131660508),\r\n+LPF_TAPS(-0.000039483833289280),\r\n+LPF_TAPS(0.000039661251872419),\r\n+LPF_TAPS(-0.000039809120765477),\r\n+LPF_TAPS(0.000039928172003567),\r\n+LPF_TAPS(-0.000040019135931921),\r\n+LPF_TAPS(0.000040082740844612),\r\n+LPF_TAPS(-0.000040119712631595),\r\n+LPF_TAPS(0.000040130774434076),\r\n+LPF_TAPS(-0.000040116646308240),\r\n+LPF_TAPS(0.000040078044897437),\r\n+LPF_TAPS(-0.000040015683112645),\r\n+LPF_TAPS(0.000039930269821541),\r\n+LPF_TAPS(-0.000039822509545943),\r\n+LPF_TAPS(0.000039693102167627),\r\n+LPF_TAPS(-0.000039542742642795),\r\n+LPF_TAPS(0.000039372120724805),\r\n+LPF_TAPS(-0.000039181920695467),\r\n+LPF_TAPS(0.000038972821104735),\r\n+LPF_TAPS(-0.000038745494518822),\r\n+LPF_TAPS(0.000038500607276709),\r\n+LPF_TAPS(-0.000038238819255021),\r\n+LPF_TAPS(0.000037960783641273),\r\n+LPF_TAPS(-0.000037667146715327),\r\n+LPF_TAPS(0.000037358547639259),\r\n+LPF_TAPS(-0.000037035618255292),\r\n+LPF_TAPS(0.000036698982892007),\r\n+LPF_TAPS(-0.000036349258178619),\r\n+LPF_TAPS(0.000035987052867338),\r\n+LPF_TAPS(-0.000035612967663724),\r\n+LPF_TAPS(0.000035227595064980),\r\n+LPF_TAPS(-0.000034831519206137),\r\n+LPF_TAPS(0.000034425315713993),\r\n+LPF_TAPS(-0.000034009551568840),\r\n+LPF_TAPS(0.000033584784973814),\r\n+LPF_TAPS(-0.000033151565231787),\r\n+LPF_TAPS(0.000032710432629812),\r\n+LPF_TAPS(-0.000032261918330903),\r\n+LPF_TAPS(0.000031806544273172),\r\n+LPF_TAPS(-0.000031344823076165),\r\n+LPF_TAPS(0.000030877257954332),\r\n+LPF_TAPS(-0.000030404342637523),\r\n+LPF_TAPS(0.000029926561298414),\r\n+LPF_TAPS(-0.000029444388486774),\r\n+LPF_TAPS(0.000028958289070426),\r\n+LPF_TAPS(-0.000028468718182870),\r\n+LPF_TAPS(0.000027976121177382),\r\n+LPF_TAPS(-0.000027480933587537),\r\n+LPF_TAPS(0.000026983581094014),\r\n+LPF_TAPS(-0.000026484479497582),\r\n+LPF_TAPS(0.000025984034698156),\r\n+LPF_TAPS(-0.000025482642679791),\r\n+LPF_TAPS(0.000024980689501528),\r\n+LPF_TAPS(-0.000024478551293927),\r\n+LPF_TAPS(0.000023976594261223),\r\n+LPF_TAPS(-0.000023475174688944),\r\n+LPF_TAPS(0.000022974638956881),\r\n+LPF_TAPS(-0.000022475323557302),\r\n+LPF_TAPS(0.000021977555118269),\r\n+LPF_TAPS(-0.000021481650431946),\r\n+LPF_TAPS(0.000020987916487774),\r\n+LPF_TAPS(-0.000020496650510385),\r\n+LPF_TAPS(0.000020008140002136),\r\n+LPF_TAPS(-0.000019522662790136),\r\n+LPF_TAPS(0.000019040487077642),\r\n+LPF_TAPS(-0.000018561871499706),\r\n+LPF_TAPS(0.000018087065182938),\r\n+LPF_TAPS(-0.000017616307809269),\r\n+LPF_TAPS(0.000017149829683597),\r\n+LPF_TAPS(-0.000016687851805172),\r\n+LPF_TAPS(0.000016230585942621),\r\n+LPF_TAPS(-0.000015778234712481),\r\n+LPF_TAPS(0.000015330991661110),\r\n+LPF_TAPS(-0.000014889041349871),\r\n+LPF_TAPS(0.000014452559443468),\r\n+LPF_TAPS(-0.000014021712801288),\r\n+LPF_TAPS(0.000013596659571678),\r\n+LPF_TAPS(-0.000013177549289003),\r\n+LPF_TAPS(0.000012764522973365),\r\n+LPF_TAPS(-0.000012357713232915),\r\n+LPF_TAPS(0.000011957244368585),\r\n+LPF_TAPS(-0.000011563232481166),\r\n+LPF_TAPS(0.000011175785580615),\r\n+LPF_TAPS(-0.000010795003697464),\r\n+LPF_TAPS(0.000010420978996245),\r\n+LPF_TAPS(-0.000010053795890810),\r\n+LPF_TAPS(0.000009693531161449),\r\n+LPF_TAPS(-0.000009340254073686),\r\n+LPF_TAPS(0.000008994026498681),\r\n+LPF_TAPS(-0.000008654903035105),\r\n+LPF_TAPS(0.000008322931132410),\r\n+LPF_TAPS(-0.000007998151215387),\r\n+LPF_TAPS(0.000007680596809926),\r\n+LPF_TAPS(-0.000007370294669877),\r\n+LPF_TAPS(0.000007067264904908),\r\n+LPF_TAPS(-0.000006771521109318),\r\n+LPF_TAPS(0.000006483070491646),\r\n+LPF_TAPS(-0.000006201914005048),\r\n+LPF_TAPS(0.000005928046478342),\r\n+LPF_TAPS(-0.000005661456747620),\r\n+LPF_TAPS(0.000005402127788367),\r\n+LPF_TAPS(-0.000005150036848010),\r\n+LPF_TAPS(0.000004905155578810),\r\n+LPF_TAPS(-0.000004667450171018),\r\n+LPF_TAPS(0.000004436881486255),\r\n+LPF_TAPS(-0.000004213405190998),\r\n+LPF_TAPS(0.000003996971890143),\r\n+LPF_TAPS(-0.000003787527260573),\r\n+LPF_TAPS(0.000003585012184637),\r\n+LPF_TAPS(-0.000003389362883522),\r\n+LPF_TAPS(0.000003200511050424),\r\n+LPF_TAPS(-0.000003018383983486),\r\n+LPF_TAPS(0.000002842904718416),\r\n+LPF_TAPS(-0.000002673992160767),\r\n+LPF_TAPS(0.000002511561217805),\r\n+LPF_TAPS(-0.000002355522929902),\r\n+LPF_TAPS(0.000002205784601466),\r\n+LPF_TAPS(-0.000002062249931271),\r\n+LPF_TAPS(0.000001924819142227),\r\n+LPF_TAPS(-0.000001793389110503),\r\n+LPF_TAPS(0.000001667853493968),\r\n+LPF_TAPS(-0.000001548102859921),\r\n+LPF_TAPS(0.000001434024812076),\r\n+LPF_TAPS(-0.000001325504116749),\r\n+LPF_TAPS(0.000001222422828231),\r\n+LPF_TAPS(-0.000001124660413318),\r\n+LPF_TAPS(0.000001032093874948),\r\n+LPF_TAPS(-0.000000944597874939),\r\n+LPF_TAPS(0.000000862044855799),\r\n+LPF_TAPS(-0.000000784305161561),\r\n+LPF_TAPS(0.000000711247157657),\r\n+LPF_TAPS(-0.000000642737349775),\r\n+LPF_TAPS(0.000000578640501706),\r\n+LPF_TAPS(-0.000000518819752139),\r\n+LPF_TAPS(0.000000463136730412),\r\n+LPF_TAPS(-0.000000411451671180),\r\n+LPF_TAPS(0.000000363623527997),\r\n+LPF_TAPS(-0.000000319510085809),\r\n+LPF_TAPS(0.000000278968072322),\r\n+LPF_TAPS(-0.000000241853268257),\r\n+LPF_TAPS(0.000000208020616472),\r\n+LPF_TAPS(-0.000000177324329941),\r\n+LPF_TAPS(0.000000149617998591),\r\n+LPF_TAPS(-0.000000124754694991),\r\n+LPF_TAPS(0.000000102587078868),\r\n+LPF_TAPS(-0.000000082967500483),\r\n+LPF_TAPS(0.000000065748102820),\r\n+LPF_TAPS(-0.000000050780922627),\r\n+LPF_TAPS(0.000000037917990275),\r\n+LPF_TAPS(-0.000000027011428453),\r\n+LPF_TAPS(0.000000017913549694),\r\n+LPF_TAPS(-0.000000010476952726),\r\n+LPF_TAPS(0.000000004554617657),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000003332876482),\r\n+LPF_TAPS(0.000000005589328076),\r\n+LPF_TAPS(-0.000000006913920594),\r\n+LPF_TAPS(0.000000007450379994),\r\n+LPF_TAPS(-0.000000007341504155),\r\n+LPF_TAPS(0.000000006729075805),\r\n+LPF_TAPS(-0.000000005753776591),\r\n+LPF_TAPS(0.000000004555102288),\r\n+LPF_TAPS(-0.000000003271279145),\r\n+LPF_TAPS(0.000000002039181362),\r\n+LPF_TAPS(-0.000000000994249696),\r\n+LPF_TAPS(0.000000000270411186),\r\n+LPF_TAPS(0.000000000000000000),\r\n+};\r\ndiff --git a/core/sound/blip_lpf_768K_48K.h b/core/sound/blip_lpf_768K_48K.h\nnew file mode 100644\nindex 000000000..d9f39a406\n--- /dev/null\n+++ b/core/sound/blip_lpf_768K_48K.h\n@@ -0,0 +1,1181 @@\n+static buf_t const blip_lpf_768K_48K[blip_lpf_768K_taps] = {\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000001359448860),\r\n+LPF_TAPS(0.000000004667803778),\r\n+LPF_TAPS(0.000000007291655555),\r\n+LPF_TAPS(0.000000005417116054),\r\n+LPF_TAPS(-0.000000004555102366),\r\n+LPF_TAPS(-0.000000024455755672),\r\n+LPF_TAPS(-0.000000053068738903),\r\n+LPF_TAPS(-0.000000085529617644),\r\n+LPF_TAPS(-0.000000113670834618),\r\n+LPF_TAPS(-0.000000127377349425),\r\n+LPF_TAPS(-0.000000116776553081),\r\n+LPF_TAPS(-0.000000074862812243),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000102305467491),\r\n+LPF_TAPS(0.000000218892576977),\r\n+LPF_TAPS(0.000000330027000994),\r\n+LPF_TAPS(0.000000412114767172),\r\n+LPF_TAPS(0.000000441750238329),\r\n+LPF_TAPS(0.000000400482860087),\r\n+LPF_TAPS(0.000000279454635221),\r\n+LPF_TAPS(0.000000082967501909),\r\n+LPF_TAPS(-0.000000169880370116),\r\n+LPF_TAPS(-0.000000446094830917),\r\n+LPF_TAPS(-0.000000702426625941),\r\n+LPF_TAPS(-0.000000891469622152),\r\n+LPF_TAPS(-0.000000969441292523),\r\n+LPF_TAPS(-0.000000904464094134),\r\n+LPF_TAPS(-0.000000683928580435),\r\n+LPF_TAPS(-0.000000319510091302),\r\n+LPF_TAPS(0.000000151344328816),\r\n+LPF_TAPS(0.000000668161269568),\r\n+LPF_TAPS(0.000001154465104752),\r\n+LPF_TAPS(0.000001528393730563),\r\n+LPF_TAPS(0.000001715526626870),\r\n+LPF_TAPS(0.000001662018825424),\r\n+LPF_TAPS(0.000001345877978929),\r\n+LPF_TAPS(0.000000784305175046),\r\n+LPF_TAPS(0.000000035460970252),\r\n+LPF_TAPS(-0.000000806224823920),\r\n+LPF_TAPS(-0.000001621105458760),\r\n+LPF_TAPS(-0.000002280585752777),\r\n+LPF_TAPS(-0.000002666499897103),\r\n+LPF_TAPS(-0.000002690787350045),\r\n+LPF_TAPS(-0.000002312345201813),\r\n+LPF_TAPS(-0.000001548102886537),\r\n+LPF_TAPS(-0.000000476023404783),\r\n+LPF_TAPS(0.000000771181400041),\r\n+LPF_TAPS(0.000002021465017603),\r\n+LPF_TAPS(0.000003086375184260),\r\n+LPF_TAPS(0.000003788560986201),\r\n+LPF_TAPS(0.000003989957117356),\r\n+LPF_TAPS(0.000003616317717796),\r\n+LPF_TAPS(0.000002673992206742),\r\n+LPF_TAPS(0.000001255716262414),\r\n+LPF_TAPS(-0.000000466356405324),\r\n+LPF_TAPS(-0.000002260316904552),\r\n+LPF_TAPS(-0.000003864827717528),\r\n+LPF_TAPS(-0.000005026285450778),\r\n+LPF_TAPS(-0.000005537656619195),\r\n+LPF_TAPS(-0.000005273188024575),\r\n+LPF_TAPS(-0.000004213405263437),\r\n+LPF_TAPS(-0.000002455897603684),\r\n+LPF_TAPS(-0.000000209237167646),\r\n+LPF_TAPS(0.000002230237752093),\r\n+LPF_TAPS(0.000004516461176901),\r\n+LPF_TAPS(0.000006301781191850),\r\n+LPF_TAPS(0.000007288640610621),\r\n+LPF_TAPS(0.000007277262295166),\r\n+LPF_TAPS(0.000006201914111676),\r\n+LPF_TAPS(0.000004149568146742),\r\n+LPF_TAPS(0.000001357021165956),\r\n+LPF_TAPS(-0.000001814470334864),\r\n+LPF_TAPS(-0.000004924673538250),\r\n+LPF_TAPS(-0.000007514453903456),\r\n+LPF_TAPS(-0.000009172392215667),\r\n+LPF_TAPS(-0.000009598430104571),\r\n+LPF_TAPS(-0.000008654903183906),\r\n+LPF_TAPS(-0.000006396629158261),\r\n+LPF_TAPS(-0.000003074347785313),\r\n+LPF_TAPS(0.000000890558151977),\r\n+LPF_TAPS(0.000004957983543046),\r\n+LPF_TAPS(0.000008541512942748),\r\n+LPF_TAPS(0.000011091787638396),\r\n+LPF_TAPS(0.000012179135462912),\r\n+LPF_TAPS(0.000011563232679969),\r\n+LPF_TAPS(0.000009238814004167),\r\n+LPF_TAPS(0.000005449388731714),\r\n+LPF_TAPS(0.000000665210997690),\r\n+LPF_TAPS(-0.000004473175304439),\r\n+LPF_TAPS(-0.000009239352535250),\r\n+LPF_TAPS(-0.000012922484749463),\r\n+LPF_TAPS(-0.000014931815471149),\r\n+LPF_TAPS(-0.000014889041605853),\r\n+LPF_TAPS(-0.000012694403544655),\r\n+LPF_TAPS(-0.000008555473445022),\r\n+LPF_TAPS(-0.000002972543870313),\r\n+LPF_TAPS(0.000003319420166117),\r\n+LPF_TAPS(0.000009445938101717),\r\n+LPF_TAPS(0.000014513205712786),\r\n+LPF_TAPS(0.000017736994996257),\r\n+LPF_TAPS(0.000018561871818833),\r\n+LPF_TAPS(0.000016752874677521),\r\n+LPF_TAPS(0.000012444972319258),\r\n+LPF_TAPS(0.000006141091038300),\r\n+LPF_TAPS(-0.000001343421473661),\r\n+LPF_TAPS(-0.000008984312747285),\r\n+LPF_TAPS(-0.000015687084203430),\r\n+LPF_TAPS(-0.000020442241587054),\r\n+LPF_TAPS(-0.000022475323943711),\r\n+LPF_TAPS(-0.000021369670893989),\r\n+LPF_TAPS(-0.000017142865405167),\r\n+LPF_TAPS(-0.000010263678225663),\r\n+LPF_TAPS(-0.000001604409044088),\r\n+LPF_TAPS(0.000007667313823874),\r\n+LPF_TAPS(0.000016244238103206),\r\n+LPF_TAPS(0.000022862192292638),\r\n+LPF_TAPS(0.000026484479952918),\r\n+LPF_TAPS(0.000026461321281526),\r\n+LPF_TAPS(0.000022640183553416),\r\n+LPF_TAPS(0.000015408940720877),\r\n+LPF_TAPS(0.000005662780227376),\r\n+LPF_TAPS(-0.000005303553733386),\r\n+LPF_TAPS(-0.000015965707722944),\r\n+LPF_TAPS(-0.000024779861226435),\r\n+LPF_TAPS(-0.000030404343160250),\r\n+LPF_TAPS(-0.000031901167390632),\r\n+LPF_TAPS(-0.000028887554888383),\r\n+LPF_TAPS(-0.000021613534847926),\r\n+LPF_TAPS(-0.000010951445764810),\r\n+LPF_TAPS(0.000001704673145246),\r\n+LPF_TAPS(0.000014618866986779),\r\n+LPF_TAPS(0.000025949422139282),\r\n+LPF_TAPS(0.000034009552153551),\r\n+LPF_TAPS(0.000037515983141392),\r\n+LPF_TAPS(0.000035789132174905),\r\n+LPF_TAPS(0.000028874154654551),\r\n+LPF_TAPS(0.000017562372412707),\r\n+LPF_TAPS(0.000003306180458168),\r\n+LPF_TAPS(-0.000011964370615358),\r\n+LPF_TAPS(-0.000026100632912291),\r\n+LPF_TAPS(-0.000037035618892028),\r\n+LPF_TAPS(-0.000043083788946342),\r\n+LPF_TAPS(-0.000043197213207640),\r\n+LPF_TAPS(-0.000037139634571452),\r\n+LPF_TAPS(-0.000025550362604739),\r\n+LPF_TAPS(-0.000009884758915617),\r\n+LPF_TAPS(0.000007764644796739),\r\n+LPF_TAPS(0.000024945028324660),\r\n+LPF_TAPS(0.000039181921369101),\r\n+LPF_TAPS(0.000048333165179803),\r\n+LPF_TAPS(0.000050907893980236),\r\n+LPF_TAPS(0.000046303466797793),\r\n+LPF_TAPS(0.000034923404169512),\r\n+LPF_TAPS(0.000018155182598477),\r\n+LPF_TAPS(-0.000001793863434875),\r\n+LPF_TAPS(-0.000022183953916465),\r\n+LPF_TAPS(-0.000040116646997951),\r\n+LPF_TAPS(-0.000052944360125334),\r\n+LPF_TAPS(-0.000058658110405480),\r\n+LPF_TAPS(-0.000056197102480673),\r\n+LPF_TAPS(-0.000045633079459602),\r\n+LPF_TAPS(-0.000028198722243287),\r\n+LPF_TAPS(-0.000006150721233903),\r\n+LPF_TAPS(0.000017518448170727),\r\n+LPF_TAPS(0.000039483833968097),\r\n+LPF_TAPS(0.000056552462191051),\r\n+LPF_TAPS(0.000066124426393850),\r\n+LPF_TAPS(0.000066584435346170),\r\n+LPF_TAPS(0.000057565419794740),\r\n+LPF_TAPS(0.000040042213710101),\r\n+LPF_TAPS(0.000016236303510003),\r\n+LPF_TAPS(-0.000010660904207243),\r\n+LPF_TAPS(-0.000036912594714084),\r\n+LPF_TAPS(-0.000058752864731266),\r\n+LPF_TAPS(-0.000072923912246472),\r\n+LPF_TAPS(-0.000077157882495439),\r\n+LPF_TAPS(-0.000070532635385286),\r\n+LPF_TAPS(-0.000053646492901935),\r\n+LPF_TAPS(-0.000028581195343862),\r\n+LPF_TAPS(0.000001348358019648),\r\n+LPF_TAPS(0.000032028529545616),\r\n+LPF_TAPS(0.000059109194199816),\r\n+LPF_TAPS(0.000078617426254042),\r\n+LPF_TAPS(0.000087536477165891),\r\n+LPF_TAPS(0.000084266182598215),\r\n+LPF_TAPS(0.000068895297575180),\r\n+LPF_TAPS(0.000043241014115690),\r\n+LPF_TAPS(0.000010642839072521),\r\n+LPF_TAPS(-0.000024467251374184),\r\n+LPF_TAPS(-0.000057163799306339),\r\n+LPF_TAPS(-0.000082715563486318),\r\n+LPF_TAPS(-0.000097266370464980),\r\n+LPF_TAPS(-0.000098411646607848),\r\n+LPF_TAPS(-0.000085585131224879),\r\n+LPF_TAPS(-0.000060194832140154),\r\n+LPF_TAPS(-0.000025481297179959),\r\n+LPF_TAPS(0.000013889847008835),\r\n+LPF_TAPS(0.000052450811872167),\r\n+LPF_TAPS(0.000084687469158516),\r\n+LPF_TAPS(0.000105824102159998),\r\n+LPF_TAPS(0.000112525915634239),\r\n+LPF_TAPS(0.000103416618210071),\r\n+LPF_TAPS(0.000079331798651948),\r\n+LPF_TAPS(0.000043264236188097),\r\n+LPF_TAPS(-0.000000000000000002),\r\n+LPF_TAPS(-0.000044511691498128),\r\n+LPF_TAPS(-0.000083972630656939),\r\n+LPF_TAPS(-0.000112622944066689),\r\n+LPF_TAPS(-0.000126077101208288),\r\n+LPF_TAPS(-0.000121987895707572),\r\n+LPF_TAPS(-0.000100438797921751),\r\n+LPF_TAPS(-0.000064001010754390),\r\n+LPF_TAPS(-0.000017437601660726),\r\n+LPF_TAPS(0.000032913059017108),\r\n+LPF_TAPS(0.000079995664135062),\r\n+LPF_TAPS(0.000117022543786603),\r\n+LPF_TAPS(0.000138447616040141),\r\n+LPF_TAPS(0.000140790584377543),\r\n+LPF_TAPS(0.000123189743606017),\r\n+LPF_TAPS(0.000087597089208893),\r\n+LPF_TAPS(0.000038578048270125),\r\n+LPF_TAPS(-0.000017266511725195),\r\n+LPF_TAPS(-0.000072184001225267),\r\n+LPF_TAPS(-0.000118342002758861),\r\n+LPF_TAPS(-0.000148940756773300),\r\n+LPF_TAPS(-0.000159208853892438),\r\n+LPF_TAPS(-0.000147137126223414),\r\n+LPF_TAPS(-0.000113839121163930),\r\n+LPF_TAPS(-0.000063476747878071),\r\n+LPF_TAPS(-0.000002749999175545),\r\n+LPF_TAPS(0.000059988262299059),\r\n+LPF_TAPS(0.000115876412984811),\r\n+LPF_TAPS(0.000156791053766152),\r\n+LPF_TAPS(0.000176522050630483),\r\n+LPF_TAPS(0.000171706425136369),\r\n+LPF_TAPS(0.000142381767716384),\r\n+LPF_TAPS(0.000092070367689991),\r\n+LPF_TAPS(0.000027369756980472),\r\n+LPF_TAPS(-0.000042904978978613),\r\n+LPF_TAPS(-0.000108916754401175),\r\n+LPF_TAPS(-0.000161178545601417),\r\n+LPF_TAPS(-0.000191911282688537),\r\n+LPF_TAPS(-0.000196193966704777),\r\n+LPF_TAPS(-0.000172736985353814),\r\n+LPF_TAPS(-0.000124158884970213),\r\n+LPF_TAPS(-0.000056714461339902),\r\n+LPF_TAPS(0.000020501204933958),\r\n+LPF_TAPS(0.000096772923575936),\r\n+LPF_TAPS(0.000161247014791811),\r\n+LPF_TAPS(0.000204470262738553),\r\n+LPF_TAPS(0.000219768755358778),\r\n+LPF_TAPS(0.000204266447336485),\r\n+LPF_TAPS(0.000159389496760190),\r\n+LPF_TAPS(0.000090771716893217),\r\n+LPF_TAPS(0.000007559564539307),\r\n+LPF_TAPS(-0.000078799528741505),\r\n+LPF_TAPS(-0.000156126086562068),\r\n+LPF_TAPS(-0.000213220593974129),\r\n+LPF_TAPS(-0.000241478724185279),\r\n+LPF_TAPS(-0.000236177752523331),\r\n+LPF_TAPS(-0.000197243155330462),\r\n+LPF_TAPS(-0.000129373609165754),\r\n+LPF_TAPS(-0.000041490851807240),\r\n+LPF_TAPS(0.000054423951283517),\r\n+LPF_TAPS(0.000144956948925325),\r\n+LPF_TAPS(0.000217131551326968),\r\n+LPF_TAPS(0.000260261747274281),\r\n+LPF_TAPS(0.000267525010396375),\r\n+LPF_TAPS(0.000237024486928444),\r\n+LPF_TAPS(0.000172177192501632),\r\n+LPF_TAPS(0.000081356815168347),\r\n+LPF_TAPS(-0.000023176045180278),\r\n+LPF_TAPS(-0.000126921304547573),\r\n+LPF_TAPS(-0.000215144263109794),\r\n+LPF_TAPS(-0.000274961629651598),\r\n+LPF_TAPS(-0.000297214302530807),\r\n+LPF_TAPS(-0.000277855813135357),\r\n+LPF_TAPS(-0.000218647732480789),\r\n+LPF_TAPS(-0.000127046877978245),\r\n+LPF_TAPS(-0.000015281270758960),\r\n+LPF_TAPS(0.000101273018695546),\r\n+LPF_TAPS(0.000206200041981676),\r\n+LPF_TAPS(0.000284349145337142),\r\n+LPF_TAPS(0.000324014406196469),\r\n+LPF_TAPS(0.000318675926094879),\r\n+LPF_TAPS(0.000268045533373828),\r\n+LPF_TAPS(0.000178252266903005),\r\n+LPF_TAPS(0.000061121371994166),\r\n+LPF_TAPS(-0.000067371788877151),\r\n+LPF_TAPS(-0.000189272454112044),\r\n+LPF_TAPS(-0.000287148034138770),\r\n+LPF_TAPS(-0.000346573027549407),\r\n+LPF_TAPS(-0.000358244171233166),\r\n+LPF_TAPS(-0.000319417137704527),\r\n+LPF_TAPS(-0.000234445374637796),\r\n+LPF_TAPS(-0.000114324158704671),\r\n+LPF_TAPS(0.000024718036788845),\r\n+LPF_TAPS(0.000163402557720058),\r\n+LPF_TAPS(0.000282065698371838),\r\n+LPF_TAPS(0.000363438633495539),\r\n+LPF_TAPS(0.000395150265241936),\r\n+LPF_TAPS(0.000371591608966844),\r\n+LPF_TAPS(0.000294862846963479),\r\n+LPF_TAPS(0.000174648125360398),\r\n+LPF_TAPS(0.000027011881957749),\r\n+LPF_TAPS(-0.000127736593278010),\r\n+LPF_TAPS(-0.000267828167726443),\r\n+LPF_TAPS(-0.000373087797360296),\r\n+LPF_TAPS(-0.000427830125620042),\r\n+LPF_TAPS(-0.000423182500185979),\r\n+LPF_TAPS(-0.000358493243807931),\r\n+LPF_TAPS(-0.000241605252470305),\r\n+LPF_TAPS(-0.000087931134219321),\r\n+LPF_TAPS(0.000081565274292044),\r\n+LPF_TAPS(0.000243218730553891),\r\n+LPF_TAPS(0.000373957789509607),\r\n+LPF_TAPS(0.000454587814695286),\r\n+LPF_TAPS(0.000472595971723450),\r\n+LPF_TAPS(0.000424070037890936),\r\n+LPF_TAPS(0.000314439682826313),\r\n+LPF_TAPS(0.000157909563791660),\r\n+LPF_TAPS(-0.000024363716411711),\r\n+LPF_TAPS(-0.000207119469909664),\r\n+LPF_TAPS(-0.000364483956377314),\r\n+LPF_TAPS(-0.000473623510576415),\r\n+LPF_TAPS(-0.000518045354092092),\r\n+LPF_TAPS(-0.000490070592560787),\r\n+LPF_TAPS(-0.000392111085189919),\r\n+LPF_TAPS(-0.000236543587877976),\r\n+LPF_TAPS(-0.000044169039830351),\r\n+LPF_TAPS(0.000158554800002030),\r\n+LPF_TAPS(0.000343141246928103),\r\n+LPF_TAPS(0.000483067215653052),\r\n+LPF_TAPS(0.000557572259271586),\r\n+LPF_TAPS(0.000554721603718573),\r\n+LPF_TAPS(0.000473283508764436),\r\n+LPF_TAPS(0.000323129851106015),\r\n+LPF_TAPS(0.000124072004969681),\r\n+LPF_TAPS(-0.000096735980511317),\r\n+LPF_TAPS(-0.000308489071818717),\r\n+LPF_TAPS(-0.000481017706568504),\r\n+LPF_TAPS(-0.000589074131789658),\r\n+LPF_TAPS(-0.000616011301487119),\r\n+LPF_TAPS(-0.000556320391373693),\r\n+LPF_TAPS(-0.000416643580674457),\r\n+LPF_TAPS(-0.000215086814767172),\r\n+LPF_TAPS(0.000021105499668541),\r\n+LPF_TAPS(0.000259218525026417),\r\n+LPF_TAPS(0.000465586025087031),\r\n+LPF_TAPS(0.000610337904146259),\r\n+LPF_TAPS(0.000671708488657673),\r\n+LPF_TAPS(0.000639286203371008),\r\n+LPF_TAPS(0.000515722468116167),\r\n+LPF_TAPS(0.000316625963837260),\r\n+LPF_TAPS(0.000068619831178850),\r\n+LPF_TAPS(-0.000194200868121255),\r\n+LPF_TAPS(-0.000434942614319249),\r\n+LPF_TAPS(-0.000619079186033522),\r\n+LPF_TAPS(-0.000719388248767022),\r\n+LPF_TAPS(-0.000719954989008131),\r\n+LPF_TAPS(-0.000618656737124804),\r\n+LPF_TAPS(-0.000427745671860825),\r\n+LPF_TAPS(-0.000172408232095687),\r\n+LPF_TAPS(0.000112536081132703),\r\n+LPF_TAPS(0.000387367026753429),\r\n+LPF_TAPS(0.000612986179481084),\r\n+LPF_TAPS(0.000756463891081504),\r\n+LPF_TAPS(0.000795825808780393),\r\n+LPF_TAPS(0.000723385841491201),\r\n+LPF_TAPS(0.000547124213374555),\r\n+LPF_TAPS(0.000289875871129091),\r\n+LPF_TAPS(-0.000013600228281345),\r\n+LPF_TAPS(-0.000321298976625744),\r\n+LPF_TAPS(-0.000589767278575103),\r\n+LPF_TAPS(-0.000780224416792033),\r\n+LPF_TAPS(-0.000864144791486477),\r\n+LPF_TAPS(-0.000827501970962114),\r\n+LPF_TAPS(-0.000673046341994755),\r\n+LPF_TAPS(-0.000420254351351959),\r\n+LPF_TAPS(-0.000102909621436732),\r\n+LPF_TAPS(0.000235389385991059),\r\n+LPF_TAPS(0.000547201088099536),\r\n+LPF_TAPS(0.000787876493512615),\r\n+LPF_TAPS(0.000921933173856351),\r\n+LPF_TAPS(0.000928260223461724),\r\n+LPF_TAPS(0.000803394177128660),\r\n+LPF_TAPS(0.000562363609226324),\r\n+LPF_TAPS(0.000236934133089329),\r\n+LPF_TAPS(-0.000128549987283509),\r\n+LPF_TAPS(-0.000483187384332318),\r\n+LPF_TAPS(-0.000776589615094117),\r\n+LPF_TAPS(-0.000966020337024241),\r\n+LPF_TAPS(-0.001022594925275672),\r\n+LPF_TAPS(-0.000935644589411755),\r\n+LPF_TAPS(-0.000714590827271672),\r\n+LPF_TAPS(-0.000388015211898054),\r\n+LPF_TAPS(0.000000000000000007),\r\n+LPF_TAPS(0.000395797345139045),\r\n+LPF_TAPS(0.000743542799064008),\r\n+LPF_TAPS(0.000993080437533362),\r\n+LPF_TAPS(0.001107141138307767),\r\n+LPF_TAPS(0.001066872710566303),\r\n+LPF_TAPS(0.000874875646388696),\r\n+LPF_TAPS(0.000555265209860269),\r\n+LPF_TAPS(0.000150691601034830),\r\n+LPF_TAPS(-0.000283321194004648),\r\n+LPF_TAPS(-0.000685970827866444),\r\n+LPF_TAPS(-0.000999670764342302),\r\n+LPF_TAPS(-0.001178259870510930),\r\n+LPF_TAPS(-0.001193760688319778),\r\n+LPF_TAPS(-0.001040701551881250),\r\n+LPF_TAPS(-0.000737342514358144),\r\n+LPF_TAPS(-0.000323569661431093),\r\n+LPF_TAPS(0.000144311227422484),\r\n+LPF_TAPS(0.000601207657703439),\r\n+LPF_TAPS(0.000982269410612325),\r\n+LPF_TAPS(0.001232064876063025),\r\n+LPF_TAPS(0.001312610181298188),\r\n+LPF_TAPS(0.001209092780511007),\r\n+LPF_TAPS(0.000932433858217402),\r\n+LPF_TAPS(0.000518263608026988),\r\n+LPF_TAPS(0.000022381986458309),\r\n+LPF_TAPS(-0.000486724172822189),\r\n+LPF_TAPS(-0.000937309191562415),\r\n+LPF_TAPS(-0.001264448151532591),\r\n+LPF_TAPS(-0.001419356298934519),\r\n+LPF_TAPS(-0.001376615418620143),\r\n+LPF_TAPS(-0.001138243238730974),\r\n+LPF_TAPS(-0.000733966594517146),\r\n+LPF_TAPS(-0.000217582662460545),\r\n+LPF_TAPS(0.000340156906325913),\r\n+LPF_TAPS(0.000861203902397716),\r\n+LPF_TAPS(0.001271100228905015),\r\n+LPF_TAPS(0.001509579665070793),\r\n+LPF_TAPS(0.001539380475420018),\r\n+LPF_TAPS(0.001351986739160018),\r\n+LPF_TAPS(0.000969424046659185),\r\n+LPF_TAPS(0.000441774816022595),\r\n+LPF_TAPS(-0.000159323601669108),\r\n+LPF_TAPS(-0.000750361884546773),\r\n+LPF_TAPS(-0.001247520011945825),\r\n+LPF_TAPS(-0.001578511900391426),\r\n+LPF_TAPS(-0.001693045524085645),\r\n+LPF_TAPS(-0.001570391756465221),\r\n+LPF_TAPS(-0.001222932397231006),\r\n+LPF_TAPS(-0.000695102381242500),\r\n+LPF_TAPS(-0.000057779580465230),\r\n+LPF_TAPS(0.000601180272375858),\r\n+LPF_TAPS(0.001189006991122532),\r\n+LPF_TAPS(0.001621027875164315),\r\n+LPF_TAPS(0.001832809842707534),\r\n+LPF_TAPS(0.001789698061951320),\r\n+LPF_TAPS(0.001492348542680722),\r\n+LPF_TAPS(0.000977388252817532),\r\n+LPF_TAPS(0.000313006019718721),\r\n+LPF_TAPS(-0.000410010919136253),\r\n+LPF_TAPS(-0.001090625851674463),\r\n+LPF_TAPS(-0.001631615234243192),\r\n+LPF_TAPS(-0.001953395577104861),\r\n+LPF_TAPS(-0.002005656598462505),\r\n+LPF_TAPS(-0.001775110268723410),\r\n+LPF_TAPS(-0.001288177216072311),\r\n+LPF_TAPS(-0.000608121107446455),\r\n+LPF_TAPS(0.000173085322578482),\r\n+LPF_TAPS(0.000947129150702814),\r\n+LPF_TAPS(0.001604307340888672),\r\n+LPF_TAPS(0.002049003798581933),\r\n+LPF_TAPS(0.002213519668761413),\r\n+LPF_TAPS(0.002068267589315719),\r\n+LPF_TAPS(0.001626809663921161),\r\n+LPF_TAPS(0.000944912710343187),\r\n+LPF_TAPS(0.000113620040394409),\r\n+LPF_TAPS(-0.000752816806223807),\r\n+LPF_TAPS(-0.001532558858449233),\r\n+LPF_TAPS(-0.002113228567072949),\r\n+LPF_TAPS(-0.002408012689596018),\r\n+LPF_TAPS(-0.002368524631666443),\r\n+LPF_TAPS(-0.001992536333210033),\r\n+LPF_TAPS(-0.001325370018242146),\r\n+LPF_TAPS(-0.000454606383626016),\r\n+LPF_TAPS(0.000501299656080775),\r\n+LPF_TAPS(0.001409031739149504),\r\n+LPF_TAPS(0.002138902624492951),\r\n+LPF_TAPS(0.002583272037926706),\r\n+LPF_TAPS(0.002672291388964332),\r\n+LPF_TAPS(0.002384690142120560),\r\n+LPF_TAPS(0.001751963089894417),\r\n+LPF_TAPS(0.000855208577551981),\r\n+LPF_TAPS(-0.000185114622720898),\r\n+LPF_TAPS(-0.001225239726990133),\r\n+LPF_TAPS(-0.002117832071754483),\r\n+LPF_TAPS(-0.002732723904046048),\r\n+LPF_TAPS(-0.002975744362298746),\r\n+LPF_TAPS(-0.002802941719239318),\r\n+LPF_TAPS(-0.002228076641992786),\r\n+LPF_TAPS(-0.001322159750808357),\r\n+LPF_TAPS(-0.000204896150555957),\r\n+LPF_TAPS(0.000970964342673048),\r\n+LPF_TAPS(0.002040348260098252),\r\n+LPF_TAPS(0.002848861909604556),\r\n+LPF_TAPS(0.003274894833677578),\r\n+LPF_TAPS(0.003247684687255261),\r\n+LPF_TAPS(0.002758690863649444),\r\n+LPF_TAPS(0.001864495530567434),\r\n+LPF_TAPS(0.000680595212459752),\r\n+LPF_TAPS(-0.000633289731702014),\r\n+LPF_TAPS(-0.001894550570044378),\r\n+LPF_TAPS(-0.002922849064605867),\r\n+LPF_TAPS(-0.003565663262513257),\r\n+LPF_TAPS(-0.003720634286961690),\r\n+LPF_TAPS(-0.003351477778623521),\r\n+LPF_TAPS(-0.002495036862551363),\r\n+LPF_TAPS(-0.001258229252703277),\r\n+LPF_TAPS(0.000194975183151831),\r\n+LPF_TAPS(0.001665006205857837),\r\n+LPF_TAPS(0.002943805914118389),\r\n+LPF_TAPS(0.003843958087058865),\r\n+LPF_TAPS(0.004225798837087251),\r\n+LPF_TAPS(0.004018635661116777),\r\n+LPF_TAPS(0.003232911217167509),\r\n+LPF_TAPS(0.001961321217018796),\r\n+LPF_TAPS(0.000368382711489133),\r\n+LPF_TAPS(-0.001330448303111322),\r\n+LPF_TAPS(-0.002897512586064453),\r\n+LPF_TAPS(-0.004105757047530809),\r\n+LPF_TAPS(-0.004771146551610363),\r\n+LPF_TAPS(-0.004780117208221306),\r\n+LPF_TAPS(-0.004108053920816586),\r\n+LPF_TAPS(-0.002825896333281318),\r\n+LPF_TAPS(-0.001093538945580079),\r\n+LPF_TAPS(0.000859509678153194),\r\n+LPF_TAPS(0.002763948990592597),\r\n+LPF_TAPS(0.004347189035161921),\r\n+LPF_TAPS(0.005371667058210150),\r\n+LPF_TAPS(0.005669685080505564),\r\n+LPF_TAPS(0.005169768442631645),\r\n+LPF_TAPS(0.003910542281136750),\r\n+LPF_TAPS(0.002039710357167114),\r\n+LPF_TAPS(-0.000202299725470556),\r\n+LPF_TAPS(-0.002512348101206461),\r\n+LPF_TAPS(-0.004564614415679022),\r\n+LPF_TAPS(-0.006055481428685038),\r\n+LPF_TAPS(-0.006747224427039125),\r\n+LPF_TAPS(-0.006504381455886494),\r\n+LPF_TAPS(-0.005317439779102889),\r\n+LPF_TAPS(-0.003310001477805524),\r\n+LPF_TAPS(-0.000727706394243490),\r\n+LPF_TAPS(0.002090371981529391),\r\n+LPF_TAPS(0.004754701779382235),\r\n+LPF_TAPS(0.006877371468460783),\r\n+LPF_TAPS(0.008126520471630896),\r\n+LPF_TAPS(0.008275740284339120),\r\n+LPF_TAPS(0.007241408673530529),\r\n+LPF_TAPS(0.005102230981241567),\r\n+LPF_TAPS(0.002097405428776219),\r\n+LPF_TAPS(-0.001397448693528728),\r\n+LPF_TAPS(-0.004914499133895396),\r\n+LPF_TAPS(-0.007953126593456580),\r\n+LPF_TAPS(-0.010047356605476896),\r\n+LPF_TAPS(-0.010832642208056086),\r\n+LPF_TAPS(-0.010102975549189539),\r\n+LPF_TAPS(-0.007850110868803264),\r\n+LPF_TAPS(-0.004278601732532487),\r\n+LPF_TAPS(0.000206810215022680),\r\n+LPF_TAPS(0.005041497678566803),\r\n+LPF_TAPS(0.009565394720809384),\r\n+LPF_TAPS(0.013104736936610281),\r\n+LPF_TAPS(0.015061657215475832),\r\n+LPF_TAPS(0.015000690417068760),\r\n+LPF_TAPS(0.012721042817706861),\r\n+LPF_TAPS(0.008304673409568883),\r\n+LPF_TAPS(0.002132719023066271),\r\n+LPF_TAPS(-0.005133686478296106),\r\n+LPF_TAPS(-0.012607994653065960),\r\n+LPF_TAPS(-0.019263721656912779),\r\n+LPF_TAPS(-0.024042394058406389),\r\n+LPF_TAPS(-0.025972472722104633),\r\n+LPF_TAPS(-0.024285972973015362),\r\n+LPF_TAPS(-0.018519226073113456),\r\n+LPF_TAPS(-0.008585550204756025),\r\n+LPF_TAPS(0.005189596584253116),\r\n+LPF_TAPS(0.022076420229632895),\r\n+LPF_TAPS(0.040992261870568814),\r\n+LPF_TAPS(0.060592521675711608),\r\n+LPF_TAPS(0.079392273199095378),\r\n+LPF_TAPS(0.095906176085457207),\r\n+LPF_TAPS(0.108792019799307069),\r\n+LPF_TAPS(0.116982593447661723),\r\n+LPF_TAPS(0.119791668725544434),\r\n+LPF_TAPS(0.116982593447661723),\r\n+LPF_TAPS(0.108792019799307069),\r\n+LPF_TAPS(0.095906176085457207),\r\n+LPF_TAPS(0.079392273199095378),\r\n+LPF_TAPS(0.060592521675711608),\r\n+LPF_TAPS(0.040992261870568814),\r\n+LPF_TAPS(0.022076420229632895),\r\n+LPF_TAPS(0.005189596584253116),\r\n+LPF_TAPS(-0.008585550204756025),\r\n+LPF_TAPS(-0.018519226073113456),\r\n+LPF_TAPS(-0.024285972973015362),\r\n+LPF_TAPS(-0.025972472722104633),\r\n+LPF_TAPS(-0.024042394058406389),\r\n+LPF_TAPS(-0.019263721656912779),\r\n+LPF_TAPS(-0.012607994653065960),\r\n+LPF_TAPS(-0.005133686478296106),\r\n+LPF_TAPS(0.002132719023066271),\r\n+LPF_TAPS(0.008304673409568883),\r\n+LPF_TAPS(0.012721042817706861),\r\n+LPF_TAPS(0.015000690417068762),\r\n+LPF_TAPS(0.015061657215475832),\r\n+LPF_TAPS(0.013104736936610281),\r\n+LPF_TAPS(0.009565394720809384),\r\n+LPF_TAPS(0.005041497678566803),\r\n+LPF_TAPS(0.000206810215022680),\r\n+LPF_TAPS(-0.004278601732532487),\r\n+LPF_TAPS(-0.007850110868803264),\r\n+LPF_TAPS(-0.010102975549189539),\r\n+LPF_TAPS(-0.010832642208056086),\r\n+LPF_TAPS(-0.010047356605476898),\r\n+LPF_TAPS(-0.007953126593456580),\r\n+LPF_TAPS(-0.004914499133895396),\r\n+LPF_TAPS(-0.001397448693528728),\r\n+LPF_TAPS(0.002097405428776219),\r\n+LPF_TAPS(0.005102230981241567),\r\n+LPF_TAPS(0.007241408673530529),\r\n+LPF_TAPS(0.008275740284339120),\r\n+LPF_TAPS(0.008126520471630896),\r\n+LPF_TAPS(0.006877371468460784),\r\n+LPF_TAPS(0.004754701779382235),\r\n+LPF_TAPS(0.002090371981529391),\r\n+LPF_TAPS(-0.000727706394243490),\r\n+LPF_TAPS(-0.003310001477805524),\r\n+LPF_TAPS(-0.005317439779102889),\r\n+LPF_TAPS(-0.006504381455886495),\r\n+LPF_TAPS(-0.006747224427039125),\r\n+LPF_TAPS(-0.006055481428685038),\r\n+LPF_TAPS(-0.004564614415679024),\r\n+LPF_TAPS(-0.002512348101206461),\r\n+LPF_TAPS(-0.000202299725470556),\r\n+LPF_TAPS(0.002039710357167115),\r\n+LPF_TAPS(0.003910542281136750),\r\n+LPF_TAPS(0.005169768442631646),\r\n+LPF_TAPS(0.005669685080505564),\r\n+LPF_TAPS(0.005371667058210150),\r\n+LPF_TAPS(0.004347189035161921),\r\n+LPF_TAPS(0.002763948990592597),\r\n+LPF_TAPS(0.000859509678153194),\r\n+LPF_TAPS(-0.001093538945580079),\r\n+LPF_TAPS(-0.002825896333281318),\r\n+LPF_TAPS(-0.004108053920816587),\r\n+LPF_TAPS(-0.004780117208221306),\r\n+LPF_TAPS(-0.004771146551610363),\r\n+LPF_TAPS(-0.004105757047530809),\r\n+LPF_TAPS(-0.002897512586064453),\r\n+LPF_TAPS(-0.001330448303111323),\r\n+LPF_TAPS(0.000368382711489133),\r\n+LPF_TAPS(0.001961321217018796),\r\n+LPF_TAPS(0.003232911217167510),\r\n+LPF_TAPS(0.004018635661116777),\r\n+LPF_TAPS(0.004225798837087253),\r\n+LPF_TAPS(0.003843958087058864),\r\n+LPF_TAPS(0.002943805914118389),\r\n+LPF_TAPS(0.001665006205857837),\r\n+LPF_TAPS(0.000194975183151831),\r\n+LPF_TAPS(-0.001258229252703277),\r\n+LPF_TAPS(-0.002495036862551363),\r\n+LPF_TAPS(-0.003351477778623522),\r\n+LPF_TAPS(-0.003720634286961690),\r\n+LPF_TAPS(-0.003565663262513257),\r\n+LPF_TAPS(-0.002922849064605867),\r\n+LPF_TAPS(-0.001894550570044379),\r\n+LPF_TAPS(-0.000633289731702014),\r\n+LPF_TAPS(0.000680595212459752),\r\n+LPF_TAPS(0.001864495530567434),\r\n+LPF_TAPS(0.002758690863649444),\r\n+LPF_TAPS(0.003247684687255260),\r\n+LPF_TAPS(0.003274894833677578),\r\n+LPF_TAPS(0.002848861909604557),\r\n+LPF_TAPS(0.002040348260098252),\r\n+LPF_TAPS(0.000970964342673048),\r\n+LPF_TAPS(-0.000204896150555957),\r\n+LPF_TAPS(-0.001322159750808358),\r\n+LPF_TAPS(-0.002228076641992786),\r\n+LPF_TAPS(-0.002802941719239318),\r\n+LPF_TAPS(-0.002975744362298747),\r\n+LPF_TAPS(-0.002732723904046048),\r\n+LPF_TAPS(-0.002117832071754483),\r\n+LPF_TAPS(-0.001225239726990133),\r\n+LPF_TAPS(-0.000185114622720898),\r\n+LPF_TAPS(0.000855208577551981),\r\n+LPF_TAPS(0.001751963089894417),\r\n+LPF_TAPS(0.002384690142120560),\r\n+LPF_TAPS(0.002672291388964333),\r\n+LPF_TAPS(0.002583272037926706),\r\n+LPF_TAPS(0.002138902624492951),\r\n+LPF_TAPS(0.001409031739149504),\r\n+LPF_TAPS(0.000501299656080775),\r\n+LPF_TAPS(-0.000454606383626017),\r\n+LPF_TAPS(-0.001325370018242146),\r\n+LPF_TAPS(-0.001992536333210033),\r\n+LPF_TAPS(-0.002368524631666444),\r\n+LPF_TAPS(-0.002408012689596018),\r\n+LPF_TAPS(-0.002113228567072950),\r\n+LPF_TAPS(-0.001532558858449234),\r\n+LPF_TAPS(-0.000752816806223807),\r\n+LPF_TAPS(0.000113620040394409),\r\n+LPF_TAPS(0.000944912710343188),\r\n+LPF_TAPS(0.001626809663921161),\r\n+LPF_TAPS(0.002068267589315719),\r\n+LPF_TAPS(0.002213519668761413),\r\n+LPF_TAPS(0.002049003798581933),\r\n+LPF_TAPS(0.001604307340888671),\r\n+LPF_TAPS(0.000947129150702814),\r\n+LPF_TAPS(0.000173085322578483),\r\n+LPF_TAPS(-0.000608121107446455),\r\n+LPF_TAPS(-0.001288177216072311),\r\n+LPF_TAPS(-0.001775110268723411),\r\n+LPF_TAPS(-0.002005656598462505),\r\n+LPF_TAPS(-0.001953395577104861),\r\n+LPF_TAPS(-0.001631615234243192),\r\n+LPF_TAPS(-0.001090625851674463),\r\n+LPF_TAPS(-0.000410010919136254),\r\n+LPF_TAPS(0.000313006019718720),\r\n+LPF_TAPS(0.000977388252817533),\r\n+LPF_TAPS(0.001492348542680722),\r\n+LPF_TAPS(0.001789698061951319),\r\n+LPF_TAPS(0.001832809842707535),\r\n+LPF_TAPS(0.001621027875164315),\r\n+LPF_TAPS(0.001189006991122532),\r\n+LPF_TAPS(0.000601180272375858),\r\n+LPF_TAPS(-0.000057779580465230),\r\n+LPF_TAPS(-0.000695102381242500),\r\n+LPF_TAPS(-0.001222932397231007),\r\n+LPF_TAPS(-0.001570391756465220),\r\n+LPF_TAPS(-0.001693045524085646),\r\n+LPF_TAPS(-0.001578511900391427),\r\n+LPF_TAPS(-0.001247520011945825),\r\n+LPF_TAPS(-0.000750361884546773),\r\n+LPF_TAPS(-0.000159323601669108),\r\n+LPF_TAPS(0.000441774816022596),\r\n+LPF_TAPS(0.000969424046659185),\r\n+LPF_TAPS(0.001351986739160019),\r\n+LPF_TAPS(0.001539380475420018),\r\n+LPF_TAPS(0.001509579665070794),\r\n+LPF_TAPS(0.001271100228905015),\r\n+LPF_TAPS(0.000861203902397716),\r\n+LPF_TAPS(0.000340156906325913),\r\n+LPF_TAPS(-0.000217582662460545),\r\n+LPF_TAPS(-0.000733966594517146),\r\n+LPF_TAPS(-0.001138243238730974),\r\n+LPF_TAPS(-0.001376615418620143),\r\n+LPF_TAPS(-0.001419356298934519),\r\n+LPF_TAPS(-0.001264448151532591),\r\n+LPF_TAPS(-0.000937309191562415),\r\n+LPF_TAPS(-0.000486724172822189),\r\n+LPF_TAPS(0.000022381986458309),\r\n+LPF_TAPS(0.000518263608026988),\r\n+LPF_TAPS(0.000932433858217402),\r\n+LPF_TAPS(0.001209092780511007),\r\n+LPF_TAPS(0.001312610181298188),\r\n+LPF_TAPS(0.001232064876063025),\r\n+LPF_TAPS(0.000982269410612325),\r\n+LPF_TAPS(0.000601207657703440),\r\n+LPF_TAPS(0.000144311227422484),\r\n+LPF_TAPS(-0.000323569661431093),\r\n+LPF_TAPS(-0.000737342514358145),\r\n+LPF_TAPS(-0.001040701551881250),\r\n+LPF_TAPS(-0.001193760688319779),\r\n+LPF_TAPS(-0.001178259870510930),\r\n+LPF_TAPS(-0.000999670764342301),\r\n+LPF_TAPS(-0.000685970827866444),\r\n+LPF_TAPS(-0.000283321194004648),\r\n+LPF_TAPS(0.000150691601034830),\r\n+LPF_TAPS(0.000555265209860269),\r\n+LPF_TAPS(0.000874875646388696),\r\n+LPF_TAPS(0.001066872710566303),\r\n+LPF_TAPS(0.001107141138307768),\r\n+LPF_TAPS(0.000993080437533362),\r\n+LPF_TAPS(0.000743542799064008),\r\n+LPF_TAPS(0.000395797345139045),\r\n+LPF_TAPS(0.000000000000000007),\r\n+LPF_TAPS(-0.000388015211898053),\r\n+LPF_TAPS(-0.000714590827271673),\r\n+LPF_TAPS(-0.000935644589411756),\r\n+LPF_TAPS(-0.001022594925275672),\r\n+LPF_TAPS(-0.000966020337024242),\r\n+LPF_TAPS(-0.000776589615094116),\r\n+LPF_TAPS(-0.000483187384332319),\r\n+LPF_TAPS(-0.000128549987283509),\r\n+LPF_TAPS(0.000236934133089329),\r\n+LPF_TAPS(0.000562363609226325),\r\n+LPF_TAPS(0.000803394177128660),\r\n+LPF_TAPS(0.000928260223461724),\r\n+LPF_TAPS(0.000921933173856352),\r\n+LPF_TAPS(0.000787876493512615),\r\n+LPF_TAPS(0.000547201088099536),\r\n+LPF_TAPS(0.000235389385991059),\r\n+LPF_TAPS(-0.000102909621436732),\r\n+LPF_TAPS(-0.000420254351351959),\r\n+LPF_TAPS(-0.000673046341994754),\r\n+LPF_TAPS(-0.000827501970962114),\r\n+LPF_TAPS(-0.000864144791486477),\r\n+LPF_TAPS(-0.000780224416792033),\r\n+LPF_TAPS(-0.000589767278575103),\r\n+LPF_TAPS(-0.000321298976625744),\r\n+LPF_TAPS(-0.000013600228281345),\r\n+LPF_TAPS(0.000289875871129091),\r\n+LPF_TAPS(0.000547124213374555),\r\n+LPF_TAPS(0.000723385841491201),\r\n+LPF_TAPS(0.000795825808780393),\r\n+LPF_TAPS(0.000756463891081504),\r\n+LPF_TAPS(0.000612986179481084),\r\n+LPF_TAPS(0.000387367026753429),\r\n+LPF_TAPS(0.000112536081132703),\r\n+LPF_TAPS(-0.000172408232095687),\r\n+LPF_TAPS(-0.000427745671860825),\r\n+LPF_TAPS(-0.000618656737124805),\r\n+LPF_TAPS(-0.000719954989008130),\r\n+LPF_TAPS(-0.000719388248767023),\r\n+LPF_TAPS(-0.000619079186033522),\r\n+LPF_TAPS(-0.000434942614319249),\r\n+LPF_TAPS(-0.000194200868121255),\r\n+LPF_TAPS(0.000068619831178850),\r\n+LPF_TAPS(0.000316625963837260),\r\n+LPF_TAPS(0.000515722468116167),\r\n+LPF_TAPS(0.000639286203371008),\r\n+LPF_TAPS(0.000671708488657673),\r\n+LPF_TAPS(0.000610337904146259),\r\n+LPF_TAPS(0.000465586025087032),\r\n+LPF_TAPS(0.000259218525026417),\r\n+LPF_TAPS(0.000021105499668541),\r\n+LPF_TAPS(-0.000215086814767172),\r\n+LPF_TAPS(-0.000416643580674457),\r\n+LPF_TAPS(-0.000556320391373693),\r\n+LPF_TAPS(-0.000616011301487119),\r\n+LPF_TAPS(-0.000589074131789658),\r\n+LPF_TAPS(-0.000481017706568504),\r\n+LPF_TAPS(-0.000308489071818717),\r\n+LPF_TAPS(-0.000096735980511317),\r\n+LPF_TAPS(0.000124072004969681),\r\n+LPF_TAPS(0.000323129851106015),\r\n+LPF_TAPS(0.000473283508764437),\r\n+LPF_TAPS(0.000554721603718573),\r\n+LPF_TAPS(0.000557572259271585),\r\n+LPF_TAPS(0.000483067215653052),\r\n+LPF_TAPS(0.000343141246928103),\r\n+LPF_TAPS(0.000158554800002030),\r\n+LPF_TAPS(-0.000044169039830351),\r\n+LPF_TAPS(-0.000236543587877976),\r\n+LPF_TAPS(-0.000392111085189920),\r\n+LPF_TAPS(-0.000490070592560787),\r\n+LPF_TAPS(-0.000518045354092093),\r\n+LPF_TAPS(-0.000473623510576415),\r\n+LPF_TAPS(-0.000364483956377313),\r\n+LPF_TAPS(-0.000207119469909664),\r\n+LPF_TAPS(-0.000024363716411711),\r\n+LPF_TAPS(0.000157909563791660),\r\n+LPF_TAPS(0.000314439682826313),\r\n+LPF_TAPS(0.000424070037890936),\r\n+LPF_TAPS(0.000472595971723450),\r\n+LPF_TAPS(0.000454587814695287),\r\n+LPF_TAPS(0.000373957789509607),\r\n+LPF_TAPS(0.000243218730553891),\r\n+LPF_TAPS(0.000081565274292044),\r\n+LPF_TAPS(-0.000087931134219321),\r\n+LPF_TAPS(-0.000241605252470305),\r\n+LPF_TAPS(-0.000358493243807931),\r\n+LPF_TAPS(-0.000423182500185980),\r\n+LPF_TAPS(-0.000427830125620041),\r\n+LPF_TAPS(-0.000373087797360296),\r\n+LPF_TAPS(-0.000267828167726444),\r\n+LPF_TAPS(-0.000127736593278010),\r\n+LPF_TAPS(0.000027011881957749),\r\n+LPF_TAPS(0.000174648125360398),\r\n+LPF_TAPS(0.000294862846963479),\r\n+LPF_TAPS(0.000371591608966844),\r\n+LPF_TAPS(0.000395150265241936),\r\n+LPF_TAPS(0.000363438633495539),\r\n+LPF_TAPS(0.000282065698371838),\r\n+LPF_TAPS(0.000163402557720058),\r\n+LPF_TAPS(0.000024718036788845),\r\n+LPF_TAPS(-0.000114324158704671),\r\n+LPF_TAPS(-0.000234445374637796),\r\n+LPF_TAPS(-0.000319417137704526),\r\n+LPF_TAPS(-0.000358244171233166),\r\n+LPF_TAPS(-0.000346573027549407),\r\n+LPF_TAPS(-0.000287148034138770),\r\n+LPF_TAPS(-0.000189272454112044),\r\n+LPF_TAPS(-0.000067371788877151),\r\n+LPF_TAPS(0.000061121371994166),\r\n+LPF_TAPS(0.000178252266903006),\r\n+LPF_TAPS(0.000268045533373828),\r\n+LPF_TAPS(0.000318675926094879),\r\n+LPF_TAPS(0.000324014406196470),\r\n+LPF_TAPS(0.000284349145337142),\r\n+LPF_TAPS(0.000206200041981676),\r\n+LPF_TAPS(0.000101273018695546),\r\n+LPF_TAPS(-0.000015281270758960),\r\n+LPF_TAPS(-0.000127046877978245),\r\n+LPF_TAPS(-0.000218647732480789),\r\n+LPF_TAPS(-0.000277855813135357),\r\n+LPF_TAPS(-0.000297214302530807),\r\n+LPF_TAPS(-0.000274961629651599),\r\n+LPF_TAPS(-0.000215144263109794),\r\n+LPF_TAPS(-0.000126921304547573),\r\n+LPF_TAPS(-0.000023176045180278),\r\n+LPF_TAPS(0.000081356815168347),\r\n+LPF_TAPS(0.000172177192501632),\r\n+LPF_TAPS(0.000237024486928444),\r\n+LPF_TAPS(0.000267525010396375),\r\n+LPF_TAPS(0.000260261747274281),\r\n+LPF_TAPS(0.000217131551326968),\r\n+LPF_TAPS(0.000144956948925325),\r\n+LPF_TAPS(0.000054423951283517),\r\n+LPF_TAPS(-0.000041490851807240),\r\n+LPF_TAPS(-0.000129373609165754),\r\n+LPF_TAPS(-0.000197243155330462),\r\n+LPF_TAPS(-0.000236177752523331),\r\n+LPF_TAPS(-0.000241478724185279),\r\n+LPF_TAPS(-0.000213220593974129),\r\n+LPF_TAPS(-0.000156126086562068),\r\n+LPF_TAPS(-0.000078799528741505),\r\n+LPF_TAPS(0.000007559564539307),\r\n+LPF_TAPS(0.000090771716893217),\r\n+LPF_TAPS(0.000159389496760190),\r\n+LPF_TAPS(0.000204266447336485),\r\n+LPF_TAPS(0.000219768755358778),\r\n+LPF_TAPS(0.000204470262738553),\r\n+LPF_TAPS(0.000161247014791811),\r\n+LPF_TAPS(0.000096772923575936),\r\n+LPF_TAPS(0.000020501204933958),\r\n+LPF_TAPS(-0.000056714461339902),\r\n+LPF_TAPS(-0.000124158884970214),\r\n+LPF_TAPS(-0.000172736985353814),\r\n+LPF_TAPS(-0.000196193966704777),\r\n+LPF_TAPS(-0.000191911282688537),\r\n+LPF_TAPS(-0.000161178545601417),\r\n+LPF_TAPS(-0.000108916754401175),\r\n+LPF_TAPS(-0.000042904978978614),\r\n+LPF_TAPS(0.000027369756980472),\r\n+LPF_TAPS(0.000092070367689991),\r\n+LPF_TAPS(0.000142381767716384),\r\n+LPF_TAPS(0.000171706425136369),\r\n+LPF_TAPS(0.000176522050630483),\r\n+LPF_TAPS(0.000156791053766152),\r\n+LPF_TAPS(0.000115876412984811),\r\n+LPF_TAPS(0.000059988262299059),\r\n+LPF_TAPS(-0.000002749999175545),\r\n+LPF_TAPS(-0.000063476747878071),\r\n+LPF_TAPS(-0.000113839121163930),\r\n+LPF_TAPS(-0.000147137126223414),\r\n+LPF_TAPS(-0.000159208853892438),\r\n+LPF_TAPS(-0.000148940756773300),\r\n+LPF_TAPS(-0.000118342002758861),\r\n+LPF_TAPS(-0.000072184001225267),\r\n+LPF_TAPS(-0.000017266511725195),\r\n+LPF_TAPS(0.000038578048270125),\r\n+LPF_TAPS(0.000087597089208893),\r\n+LPF_TAPS(0.000123189743606018),\r\n+LPF_TAPS(0.000140790584377544),\r\n+LPF_TAPS(0.000138447616040141),\r\n+LPF_TAPS(0.000117022543786603),\r\n+LPF_TAPS(0.000079995664135062),\r\n+LPF_TAPS(0.000032913059017108),\r\n+LPF_TAPS(-0.000017437601660726),\r\n+LPF_TAPS(-0.000064001010754390),\r\n+LPF_TAPS(-0.000100438797921751),\r\n+LPF_TAPS(-0.000121987895707572),\r\n+LPF_TAPS(-0.000126077101208288),\r\n+LPF_TAPS(-0.000112622944066690),\r\n+LPF_TAPS(-0.000083972630656939),\r\n+LPF_TAPS(-0.000044511691498128),\r\n+LPF_TAPS(-0.000000000000000002),\r\n+LPF_TAPS(0.000043264236188097),\r\n+LPF_TAPS(0.000079331798651948),\r\n+LPF_TAPS(0.000103416618210071),\r\n+LPF_TAPS(0.000112525915634239),\r\n+LPF_TAPS(0.000105824102159998),\r\n+LPF_TAPS(0.000084687469158516),\r\n+LPF_TAPS(0.000052450811872168),\r\n+LPF_TAPS(0.000013889847008835),\r\n+LPF_TAPS(-0.000025481297179959),\r\n+LPF_TAPS(-0.000060194832140154),\r\n+LPF_TAPS(-0.000085585131224879),\r\n+LPF_TAPS(-0.000098411646607848),\r\n+LPF_TAPS(-0.000097266370464980),\r\n+LPF_TAPS(-0.000082715563486318),\r\n+LPF_TAPS(-0.000057163799306339),\r\n+LPF_TAPS(-0.000024467251374184),\r\n+LPF_TAPS(0.000010642839072521),\r\n+LPF_TAPS(0.000043241014115690),\r\n+LPF_TAPS(0.000068895297575180),\r\n+LPF_TAPS(0.000084266182598215),\r\n+LPF_TAPS(0.000087536477165891),\r\n+LPF_TAPS(0.000078617426254042),\r\n+LPF_TAPS(0.000059109194199816),\r\n+LPF_TAPS(0.000032028529545616),\r\n+LPF_TAPS(0.000001348358019648),\r\n+LPF_TAPS(-0.000028581195343862),\r\n+LPF_TAPS(-0.000053646492901935),\r\n+LPF_TAPS(-0.000070532635385286),\r\n+LPF_TAPS(-0.000077157882495440),\r\n+LPF_TAPS(-0.000072923912246472),\r\n+LPF_TAPS(-0.000058752864731266),\r\n+LPF_TAPS(-0.000036912594714084),\r\n+LPF_TAPS(-0.000010660904207243),\r\n+LPF_TAPS(0.000016236303510003),\r\n+LPF_TAPS(0.000040042213710101),\r\n+LPF_TAPS(0.000057565419794740),\r\n+LPF_TAPS(0.000066584435346171),\r\n+LPF_TAPS(0.000066124426393850),\r\n+LPF_TAPS(0.000056552462191051),\r\n+LPF_TAPS(0.000039483833968097),\r\n+LPF_TAPS(0.000017518448170727),\r\n+LPF_TAPS(-0.000006150721233903),\r\n+LPF_TAPS(-0.000028198722243287),\r\n+LPF_TAPS(-0.000045633079459602),\r\n+LPF_TAPS(-0.000056197102480673),\r\n+LPF_TAPS(-0.000058658110405480),\r\n+LPF_TAPS(-0.000052944360125334),\r\n+LPF_TAPS(-0.000040116646997951),\r\n+LPF_TAPS(-0.000022183953916465),\r\n+LPF_TAPS(-0.000001793863434875),\r\n+LPF_TAPS(0.000018155182598477),\r\n+LPF_TAPS(0.000034923404169512),\r\n+LPF_TAPS(0.000046303466797793),\r\n+LPF_TAPS(0.000050907893980236),\r\n+LPF_TAPS(0.000048333165179803),\r\n+LPF_TAPS(0.000039181921369101),\r\n+LPF_TAPS(0.000024945028324660),\r\n+LPF_TAPS(0.000007764644796739),\r\n+LPF_TAPS(-0.000009884758915617),\r\n+LPF_TAPS(-0.000025550362604739),\r\n+LPF_TAPS(-0.000037139634571452),\r\n+LPF_TAPS(-0.000043197213207640),\r\n+LPF_TAPS(-0.000043083788946342),\r\n+LPF_TAPS(-0.000037035618892028),\r\n+LPF_TAPS(-0.000026100632912291),\r\n+LPF_TAPS(-0.000011964370615358),\r\n+LPF_TAPS(0.000003306180458168),\r\n+LPF_TAPS(0.000017562372412707),\r\n+LPF_TAPS(0.000028874154654551),\r\n+LPF_TAPS(0.000035789132174905),\r\n+LPF_TAPS(0.000037515983141392),\r\n+LPF_TAPS(0.000034009552153551),\r\n+LPF_TAPS(0.000025949422139282),\r\n+LPF_TAPS(0.000014618866986779),\r\n+LPF_TAPS(0.000001704673145246),\r\n+LPF_TAPS(-0.000010951445764810),\r\n+LPF_TAPS(-0.000021613534847926),\r\n+LPF_TAPS(-0.000028887554888383),\r\n+LPF_TAPS(-0.000031901167390632),\r\n+LPF_TAPS(-0.000030404343160250),\r\n+LPF_TAPS(-0.000024779861226435),\r\n+LPF_TAPS(-0.000015965707722944),\r\n+LPF_TAPS(-0.000005303553733386),\r\n+LPF_TAPS(0.000005662780227376),\r\n+LPF_TAPS(0.000015408940720877),\r\n+LPF_TAPS(0.000022640183553416),\r\n+LPF_TAPS(0.000026461321281526),\r\n+LPF_TAPS(0.000026484479952918),\r\n+LPF_TAPS(0.000022862192292638),\r\n+LPF_TAPS(0.000016244238103206),\r\n+LPF_TAPS(0.000007667313823874),\r\n+LPF_TAPS(-0.000001604409044088),\r\n+LPF_TAPS(-0.000010263678225663),\r\n+LPF_TAPS(-0.000017142865405167),\r\n+LPF_TAPS(-0.000021369670893989),\r\n+LPF_TAPS(-0.000022475323943711),\r\n+LPF_TAPS(-0.000020442241587054),\r\n+LPF_TAPS(-0.000015687084203430),\r\n+LPF_TAPS(-0.000008984312747285),\r\n+LPF_TAPS(-0.000001343421473661),\r\n+LPF_TAPS(0.000006141091038300),\r\n+LPF_TAPS(0.000012444972319258),\r\n+LPF_TAPS(0.000016752874677521),\r\n+LPF_TAPS(0.000018561871818833),\r\n+LPF_TAPS(0.000017736994996257),\r\n+LPF_TAPS(0.000014513205712786),\r\n+LPF_TAPS(0.000009445938101717),\r\n+LPF_TAPS(0.000003319420166117),\r\n+LPF_TAPS(-0.000002972543870313),\r\n+LPF_TAPS(-0.000008555473445022),\r\n+LPF_TAPS(-0.000012694403544655),\r\n+LPF_TAPS(-0.000014889041605853),\r\n+LPF_TAPS(-0.000014931815471149),\r\n+LPF_TAPS(-0.000012922484749463),\r\n+LPF_TAPS(-0.000009239352535250),\r\n+LPF_TAPS(-0.000004473175304439),\r\n+LPF_TAPS(0.000000665210997690),\r\n+LPF_TAPS(0.000005449388731714),\r\n+LPF_TAPS(0.000009238814004167),\r\n+LPF_TAPS(0.000011563232679969),\r\n+LPF_TAPS(0.000012179135462912),\r\n+LPF_TAPS(0.000011091787638396),\r\n+LPF_TAPS(0.000008541512942748),\r\n+LPF_TAPS(0.000004957983543046),\r\n+LPF_TAPS(0.000000890558151977),\r\n+LPF_TAPS(-0.000003074347785313),\r\n+LPF_TAPS(-0.000006396629158261),\r\n+LPF_TAPS(-0.000008654903183906),\r\n+LPF_TAPS(-0.000009598430104571),\r\n+LPF_TAPS(-0.000009172392215667),\r\n+LPF_TAPS(-0.000007514453903456),\r\n+LPF_TAPS(-0.000004924673538250),\r\n+LPF_TAPS(-0.000001814470334864),\r\n+LPF_TAPS(0.000001357021165956),\r\n+LPF_TAPS(0.000004149568146742),\r\n+LPF_TAPS(0.000006201914111676),\r\n+LPF_TAPS(0.000007277262295166),\r\n+LPF_TAPS(0.000007288640610621),\r\n+LPF_TAPS(0.000006301781191850),\r\n+LPF_TAPS(0.000004516461176901),\r\n+LPF_TAPS(0.000002230237752093),\r\n+LPF_TAPS(-0.000000209237167646),\r\n+LPF_TAPS(-0.000002455897603684),\r\n+LPF_TAPS(-0.000004213405263437),\r\n+LPF_TAPS(-0.000005273188024575),\r\n+LPF_TAPS(-0.000005537656619195),\r\n+LPF_TAPS(-0.000005026285450778),\r\n+LPF_TAPS(-0.000003864827717528),\r\n+LPF_TAPS(-0.000002260316904552),\r\n+LPF_TAPS(-0.000000466356405324),\r\n+LPF_TAPS(0.000001255716262414),\r\n+LPF_TAPS(0.000002673992206742),\r\n+LPF_TAPS(0.000003616317717796),\r\n+LPF_TAPS(0.000003989957117356),\r\n+LPF_TAPS(0.000003788560986201),\r\n+LPF_TAPS(0.000003086375184260),\r\n+LPF_TAPS(0.000002021465017603),\r\n+LPF_TAPS(0.000000771181400041),\r\n+LPF_TAPS(-0.000000476023404783),\r\n+LPF_TAPS(-0.000001548102886537),\r\n+LPF_TAPS(-0.000002312345201813),\r\n+LPF_TAPS(-0.000002690787350045),\r\n+LPF_TAPS(-0.000002666499897103),\r\n+LPF_TAPS(-0.000002280585752777),\r\n+LPF_TAPS(-0.000001621105458760),\r\n+LPF_TAPS(-0.000000806224823920),\r\n+LPF_TAPS(0.000000035460970252),\r\n+LPF_TAPS(0.000000784305175046),\r\n+LPF_TAPS(0.000001345877978929),\r\n+LPF_TAPS(0.000001662018825424),\r\n+LPF_TAPS(0.000001715526626870),\r\n+LPF_TAPS(0.000001528393730563),\r\n+LPF_TAPS(0.000001154465104752),\r\n+LPF_TAPS(0.000000668161269568),\r\n+LPF_TAPS(0.000000151344328816),\r\n+LPF_TAPS(-0.000000319510091302),\r\n+LPF_TAPS(-0.000000683928580435),\r\n+LPF_TAPS(-0.000000904464094134),\r\n+LPF_TAPS(-0.000000969441292523),\r\n+LPF_TAPS(-0.000000891469622152),\r\n+LPF_TAPS(-0.000000702426625941),\r\n+LPF_TAPS(-0.000000446094830917),\r\n+LPF_TAPS(-0.000000169880370116),\r\n+LPF_TAPS(0.000000082967501909),\r\n+LPF_TAPS(0.000000279454635221),\r\n+LPF_TAPS(0.000000400482860087),\r\n+LPF_TAPS(0.000000441750238329),\r\n+LPF_TAPS(0.000000412114767172),\r\n+LPF_TAPS(0.000000330027000994),\r\n+LPF_TAPS(0.000000218892576977),\r\n+LPF_TAPS(0.000000102305467491),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000074862812243),\r\n+LPF_TAPS(-0.000000116776553081),\r\n+LPF_TAPS(-0.000000127377349425),\r\n+LPF_TAPS(-0.000000113670834618),\r\n+LPF_TAPS(-0.000000085529617644),\r\n+LPF_TAPS(-0.000000053068738903),\r\n+LPF_TAPS(-0.000000024455755672),\r\n+LPF_TAPS(-0.000000004555102366),\r\n+LPF_TAPS(0.000000005417116054),\r\n+LPF_TAPS(0.000000007291655555),\r\n+LPF_TAPS(0.000000004667803778),\r\n+LPF_TAPS(0.000000001359448860),\r\n+LPF_TAPS(0.000000000000000000),\r\n+};\r\ndiff --git a/core/sound/blip_lpf_768K_96K.h b/core/sound/blip_lpf_768K_96K.h\nnew file mode 100644\nindex 000000000..4ce32869f\n--- /dev/null\n+++ b/core/sound/blip_lpf_768K_96K.h\n@@ -0,0 +1,1181 @@\n+static buf_t const blip_lpf_768K_96K[blip_lpf_768K_taps] = {\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000000270411184),\r\n+LPF_TAPS(-0.000000004566831930),\r\n+LPF_TAPS(-0.000000012351139235),\r\n+LPF_TAPS(-0.000000013280804131),\r\n+LPF_TAPS(0.000000004555102241),\r\n+LPF_TAPS(0.000000039434566462),\r\n+LPF_TAPS(0.000000068321452499),\r\n+LPF_TAPS(0.000000058120029422),\r\n+LPF_TAPS(-0.000000007450379918),\r\n+LPF_TAPS(-0.000000104404320415),\r\n+LPF_TAPS(-0.000000170736308622),\r\n+LPF_TAPS(-0.000000141661312606),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000193590467381),\r\n+LPF_TAPS(0.000000320037795188),\r\n+LPF_TAPS(0.000000270505273607),\r\n+LPF_TAPS(0.000000027011428177),\r\n+LPF_TAPS(-0.000000300182995740),\r\n+LPF_TAPS(-0.000000515587354585),\r\n+LPF_TAPS(-0.000000450616719176),\r\n+LPF_TAPS(-0.000000082967499633),\r\n+LPF_TAPS(0.000000416485063055),\r\n+LPF_TAPS(0.000000755628036388),\r\n+LPF_TAPS(0.000000687232046705),\r\n+LPF_TAPS(0.000000177324328124),\r\n+LPF_TAPS(-0.000000533957607898),\r\n+LPF_TAPS(-0.000001037252087726),\r\n+LPF_TAPS(-0.000000984767130185),\r\n+LPF_TAPS(-0.000000319510082535),\r\n+LPF_TAPS(0.000000643271372107),\r\n+LPF_TAPS(0.000001356374370310),\r\n+LPF_TAPS(0.000001346726039086),\r\n+LPF_TAPS(0.000000518819746823),\r\n+LPF_TAPS(-0.000000734366703963),\r\n+LPF_TAPS(-0.000001707712156148),\r\n+LPF_TAPS(-0.000001775611017371),\r\n+LPF_TAPS(-0.000000784305153524),\r\n+LPF_TAPS(0.000000796521519526),\r\n+LPF_TAPS(0.000002084771914283),\r\n+LPF_TAPS(0.000002272834232693),\r\n+LPF_TAPS(0.000001124660401793),\r\n+LPF_TAPS(-0.000000818427794343),\r\n+LPF_TAPS(-0.000002479843756310),\r\n+LPF_TAPS(-0.000002838631893487),\r\n+LPF_TAPS(-0.000001548102844057),\r\n+LPF_TAPS(0.000000788276939661),\r\n+LPF_TAPS(0.000002884004257187),\r\n+LPF_TAPS(0.000003471981422733),\r\n+LPF_TAPS(0.000002062249910138),\r\n+LPF_TAPS(-0.000000693854385419),\r\n+LPF_TAPS(-0.000003287128408051),\r\n+LPF_TAPS(-0.000004170522469635),\r\n+LPF_TAPS(-0.000002673992133367),\r\n+LPF_TAPS(0.000000522643645980),\r\n+LPF_TAPS(0.000003677911487767),\r\n+LPF_TAPS(0.000004930482632690),\r\n+LPF_TAPS(0.000003389362848789),\r\n+LPF_TAPS(-0.000000261940083240),\r\n+LPF_TAPS(-0.000004043901657974),\r\n+LPF_TAPS(-0.000005746608857426),\r\n+LPF_TAPS(-0.000004213405147821),\r\n+LPF_TAPS(-0.000000101025494664),\r\n+LPF_TAPS(0.000004371544091072),\r\n+LPF_TAPS(0.000006612105557627),\r\n+LPF_TAPS(0.000005150036795236),\r\n+LPF_TAPS(0.000000578953352335),\r\n+LPF_TAPS(-0.000004646237430354),\r\n+LPF_TAPS(-0.000007518580587867),\r\n+LPF_TAPS(-0.000006201913941494),\r\n+LPF_TAPS(-0.000001184331523467),\r\n+LPF_TAPS(0.000004852403355266),\r\n+LPF_TAPS(0.000008456000265721),\r\n+LPF_TAPS(0.000007370294594349),\r\n+LPF_TAPS(0.000001929282864789),\r\n+LPF_TAPS(-0.000004973569981430),\r\n+LPF_TAPS(-0.000009412654701919),\r\n+LPF_TAPS(-0.000008654902946414),\r\n+LPF_TAPS(-0.000002825402781922),\r\n+LPF_TAPS(0.000004992469763834),\r\n+LPF_TAPS(0.000010375134744049),\r\n+LPF_TAPS(0.000010053795787783),\r\n+LPF_TAPS(0.000003883588087799),\r\n+LPF_TAPS(-0.000004891152491910),\r\n+LPF_TAPS(-0.000011328321872127),\r\n+LPF_TAPS(-0.000011563232362672),\r\n+LPF_TAPS(-0.000005113857611770),\r\n+LPF_TAPS(0.000004651113866717),\r\n+LPF_TAPS(0.000012255392400844),\r\n+LPF_TAPS(0.000013177549153965),\r\n+LPF_TAPS(0.000006525165344348),\r\n+LPF_TAPS(-0.000004253440033178),\r\n+LPF_TAPS(-0.000013137837341611),\r\n+LPF_TAPS(-0.000014889041197294),\r\n+LPF_TAPS(-0.000008125207077045),\r\n+LPF_TAPS(0.000003678968304326),\r\n+LPF_TAPS(0.000013955499256432),\r\n+LPF_TAPS(0.000016687851634161),\r\n+LPF_TAPS(0.000009920221676887),\r\n+LPF_TAPS(-0.000002908464160586),\r\n+LPF_TAPS(-0.000014686627393690),\r\n+LPF_TAPS(-0.000018561871309492),\r\n+LPF_TAPS(-0.000011914788318634),\r\n+LPF_TAPS(0.000001922814435766),\r\n+LPF_TAPS(0.000015307952332069),\r\n+LPF_TAPS(0.000020496650300343),\r\n+LPF_TAPS(0.000014111621182239),\r\n+LPF_TAPS(-0.000000703236414013),\r\n+LPF_TAPS(-0.000015794781272331),\r\n+LPF_TAPS(-0.000022475323326984),\r\n+LPF_TAPS(-0.000016511363305968),\r\n+LPF_TAPS(-0.000000768497640292),\r\n+LPF_TAPS(0.000016121115006902),\r\n+LPF_TAPS(0.000024478551043080),\r\n+LPF_TAPS(0.000019112381464281),\r\n+LPF_TAPS(0.000002509821213062),\r\n+LPF_TAPS(-0.000016259787463951),\r\n+LPF_TAPS(-0.000026484479226179),\r\n+LPF_TAPS(-0.000021910564111253),\r\n+LPF_TAPS(-0.000004537120451352),\r\n+LPF_TAPS(0.000016182628565960),\r\n+LPF_TAPS(0.000028468717891133),\r\n+LPF_TAPS(0.000024899124592205),\r\n+LPF_TAPS(0.000006865468409934),\r\n+LPF_TAPS(-0.000015860650962998),\r\n+LPF_TAPS(-0.000030404342325949),\r\n+LPF_TAPS(-0.000028068411975450),\r\n+LPF_TAPS(-0.000009508348030975),\r\n+LPF_TAPS(0.000015264260998860),\r\n+LPF_TAPS(0.000032261918000294),\r\n+LPF_TAPS(0.000031405731989841),\r\n+LPF_TAPS(0.000012477365500132),\r\n+LPF_TAPS(-0.000014363494044602),\r\n+LPF_TAPS(-0.000034009551220323),\r\n+LPF_TAPS(-0.000034895180669362),\r\n+LPF_TAPS(-0.000015781955869275),\r\n+LPF_TAPS(0.000013128274090703),\r\n+LPF_TAPS(0.000035612967298774),\r\n+LPF_TAPS(0.000038517493400618),\r\n+LPF_TAPS(0.000019429083080919),\r\n+LPF_TAPS(-0.000011528697227208),\r\n+LPF_TAPS(-0.000037035617875765),\r\n+LPF_TAPS(-0.000042249912140231),\r\n+LPF_TAPS(-0.000023422936769313),\r\n+LPF_TAPS(0.000009535338363085),\r\n+LPF_TAPS(0.000038238818863166),\r\n+LPF_TAPS(0.000046066073614426),\r\n+LPF_TAPS(0.000027764628444526),\r\n+LPF_TAPS(-0.000007119580243999),\r\n+LPF_TAPS(-0.000039181920293943),\r\n+LPF_TAPS(-0.000049935921330255),\r\n+LPF_TAPS(-0.000032451889885582),\r\n+LPF_TAPS(0.000004253963524157),\r\n+LPF_TAPS(0.000039822509137849),\r\n+LPF_TAPS(0.000053825644215059),\r\n+LPF_TAPS(0.000037478776773538),\r\n+LPF_TAPS(-0.000000912556335678),\r\n+LPF_TAPS(-0.000040116645897143),\r\n+LPF_TAPS(-0.000057697644656153),\r\n+LPF_TAPS(-0.000042835380781845),\r\n+LPF_TAPS(-0.000002928658518456),\r\n+LPF_TAPS(0.000040019135521818),\r\n+LPF_TAPS(0.000061510538634914),\r\n+LPF_TAPS(0.000048507553506201),\r\n+LPF_TAPS(0.000007291380941630),\r\n+LPF_TAPS(-0.000039483832884655),\r\n+LPF_TAPS(-0.000065219190537468),\r\n+LPF_TAPS(-0.000054476645756378),\r\n+LPF_TAPS(-0.000012194578003053),\r\n+LPF_TAPS(0.000038463982734246),\r\n+LPF_TAPS(0.000068774785077135),\r\n+LPF_TAPS(0.000060719265845020),\r\n+LPF_TAPS(0.000017654058304802),\r\n+LPF_TAPS(-0.000036912593701199),\r\n+LPF_TAPS(-0.000072124938581478),\r\n+LPF_TAPS(-0.000067207060590316),\r\n+LPF_TAPS(-0.000023682039386360),\r\n+LPF_TAPS(0.000034782845571742),\r\n+LPF_TAPS(0.000075213851679169),\r\n+LPF_TAPS(0.000073906522798216),\r\n+LPF_TAPS(0.000030286711588387),\r\n+LPF_TAPS(-0.000032028528666751),\r\n+LPF_TAPS(-0.000077982505169364),\r\n+LPF_TAPS(-0.000080778829003251),\r\n+LPF_TAPS(-0.000037471802072891),\r\n+LPF_TAPS(0.000028604513776213),\r\n+LPF_TAPS(0.000080368900569730),\r\n+LPF_TAPS(0.000087779711222512),\r\n+LPF_TAPS(0.000045236142951916),\r\n+LPF_TAPS(-0.000024467250702803),\r\n+LPF_TAPS(-0.000082308346520089),\r\n+LPF_TAPS(-0.000094859366413814),\r\n+LPF_TAPS(-0.000053573247707659),\r\n+LPF_TAPS(0.000019575293067346),\r\n+LPF_TAPS(0.000083733791868213),\r\n+LPF_TAPS(0.000101962407224727),\r\n+LPF_TAPS(0.000062470900289848),\r\n+LPF_TAPS(-0.000013889846627700),\r\n+LPF_TAPS(-0.000084576205885109),\r\n+LPF_TAPS(-0.000109027857473073),\r\n+LPF_TAPS(-0.000071910761447583),\r\n+LPF_TAPS(0.000007375337964748),\r\n+LPF_TAPS(0.000084765005651504),\r\n+LPF_TAPS(0.000115989195611307),\r\n+LPF_TAPS(0.000081867996989454),\r\n+LPF_TAPS(0.000000000000000001),\r\n+LPF_TAPS(-0.000084228530228097),\r\n+LPF_TAPS(-0.000122774449196541),\r\n+LPF_TAPS(-0.000092310932764303),\r\n+LPF_TAPS(-0.000008263529568140),\r\n+LPF_TAPS(0.000082894560772723),\r\n+LPF_TAPS(0.000129306343115324),\r\n+LPF_TAPS(0.000103200741212745),\r\n+LPF_TAPS(0.000017437601182228),\r\n+LPF_TAPS(-0.000080690885301903),\r\n+LPF_TAPS(-0.000135502503998360),\r\n+LPF_TAPS(-0.000114491164353880),\r\n+LPF_TAPS(-0.000027538942308942),\r\n+LPF_TAPS(0.000077545906315897),\r\n+LPF_TAPS(0.000141275722906486),\r\n+LPF_TAPS(0.000126128278040423),\r\n+LPF_TAPS(0.000038578047211531),\r\n+LPF_TAPS(-0.000073389289019584),\r\n+LPF_TAPS(-0.000146534277977077),\r\n+LPF_TAPS(-0.000138050302236821),\r\n+LPF_TAPS(-0.000050558572817687),\r\n+LPF_TAPS(0.000068152647381547),\r\n+LPF_TAPS(0.000151182318291936),\r\n+LPF_TAPS(0.000150187461947657),\r\n+LPF_TAPS(0.000063476746136257),\r\n+LPF_TAPS(-0.000061770264784565),\r\n+LPF_TAPS(-0.000155120309766295),\r\n+LPF_TAPS(-0.000162461903246604),\r\n+LPF_TAPS(-0.000077320788885710),\r\n+LPF_TAPS(0.000054179845537360),\r\n+LPF_TAPS(0.000158245543366951),\r\n+LPF_TAPS(0.000174787668629224),\r\n+LPF_TAPS(0.000092070365163552),\r\n+LPF_TAPS(-0.000045323293046136),\r\n+LPF_TAPS(-0.000160452705449426),\r\n+LPF_TAPS(-0.000187070735635932),\r\n+LPF_TAPS(-0.000107696058106567),\r\n+LPF_TAPS(0.000035147509988554),\r\n+LPF_TAPS(0.000161634509463345),\r\n+LPF_TAPS(0.000199209122364984),\r\n+LPF_TAPS(0.000124158881563270),\r\n+LPF_TAPS(-0.000023605215399143),\r\n+LPF_TAPS(-0.000161682387716431),\r\n+LPF_TAPS(-0.000211093063120905),\r\n+LPF_TAPS(-0.000141409832819943),\r\n+LPF_TAPS(0.000010655773168138),\r\n+LPF_TAPS(0.000160487241315340),\r\n+LPF_TAPS(0.000222605257022561),\r\n+LPF_TAPS(0.000159389492386513),\r\n+LPF_TAPS(0.000003733973919304),\r\n+LPF_TAPS(-0.000157940245821130),\r\n+LPF_TAPS(-0.000233621191929531),\r\n+LPF_TAPS(-0.000178027676757870),\r\n+LPF_TAPS(-0.000019588870814477),\r\n+LPF_TAPS(0.000153933709573879),\r\n+LPF_TAPS(0.000244009545538508),\r\n+LPF_TAPS(0.000197243149918067),\r\n+LPF_TAPS(0.000036924624014180),\r\n+LPF_TAPS(-0.000148361981060471),\r\n+LPF_TAPS(-0.000253632664955913),\r\n+LPF_TAPS(-0.000216943399147082),\r\n+LPF_TAPS(-0.000055746989303841),\r\n+LPF_TAPS(0.000141122401127468),\r\n+LPF_TAPS(0.000262347125473069),\r\n+LPF_TAPS(0.000237024480424446),\r\n+LPF_TAPS(0.000076050980390099),\r\n+LPF_TAPS(-0.000132116295283923),\r\n+LPF_TAPS(-0.000270004368660097),\r\n+LPF_TAPS(-0.000257370938398958),\r\n+LPF_TAPS(-0.000097820105521335),\r\n+LPF_TAPS(0.000121250000801888),\r\n+LPF_TAPS(0.000276451419258909),\r\n+LPF_TAPS(0.000277855805510942),\r\n+LPF_TAPS(0.000121025639279983),\r\n+LPF_TAPS(-0.000108435922812569),\r\n+LPF_TAPS(-0.000281531679699815),\r\n+LPF_TAPS(-0.000298340684414147),\r\n+LPF_TAPS(-0.000145625936753519),\r\n+LPF_TAPS(0.000093593613118962),\r\n+LPF_TAPS(0.000285085800395328),\r\n+LPF_TAPS(0.000318675917350350),\r\n+LPF_TAPS(0.000171565797249006),\r\n+LPF_TAPS(-0.000076650865007591),\r\n+LPF_TAPS(-0.000286952623285186),\r\n+LPF_TAPS(-0.000338700845583232),\r\n+LPF_TAPS(-0.000198775884607860),\r\n+LPF_TAPS(0.000057544816948299),\r\n+LPF_TAPS(0.000286970195424600),\r\n+LPF_TAPS(0.000358244161402881),\r\n+LPF_TAPS(0.000227172210999713),\r\n+LPF_TAPS(-0.000036223057728650),\r\n+LPF_TAPS(-0.000284976848729387),\r\n+LPF_TAPS(-0.000377124354571514),\r\n+LPF_TAPS(-0.000256655690826361),\r\n+LPF_TAPS(0.000012644725282694),\r\n+LPF_TAPS(0.000280812341324255),\r\n+LPF_TAPS(0.000395150254398941),\r\n+LPF_TAPS(0.000287111771048686),\r\n+LPF_TAPS(0.000013218408751720),\r\n+LPF_TAPS(-0.000274319055291023),\r\n+LPF_TAPS(-0.000412121667917977),\r\n+LPF_TAPS(-0.000318410143859715),\r\n+LPF_TAPS(-0.000041380876871214),\r\n+LPF_TAPS(0.000265343244988183),\r\n+LPF_TAPS(0.000427830113880310),\r\n+LPF_TAPS(0.000350404547166695),\r\n+LPF_TAPS(0.000071842484152793),\r\n+LPF_TAPS(-0.000253736329520328),\r\n+LPF_TAPS(-0.000442059651518030),\r\n+LPF_TAPS(-0.000382932657815871),\r\n+LPF_TAPS(-0.000104587315532687),\r\n+LPF_TAPS(0.000239356222381871),\r\n+LPF_TAPS(0.000454587802221318),\r\n+LPF_TAPS(0.000415816081895713),\r\n+LPF_TAPS(0.000139582790075373),\r\n+LPF_TAPS(-0.000222068690791697),\r\n+LPF_TAPS(-0.000465186561474685),\r\n+LPF_TAPS(-0.000448860445790772),\r\n+LPF_TAPS(-0.000176778770242168),\r\n+LPF_TAPS(0.000201748736780270),\r\n+LPF_TAPS(0.000473623497580100),\r\n+LPF_TAPS(0.000481855590931383),\r\n+LPF_TAPS(0.000216106733933253),\r\n+LPF_TAPS(-0.000178281991696848),\r\n+LPF_TAPS(-0.000479662932881307),\r\n+LPF_TAPS(-0.000514575874397409),\r\n+LPF_TAPS(-0.000257479016753594),\r\n+LPF_TAPS(0.000151566115476765),\r\n+LPF_TAPS(0.000483067202397602),\r\n+LPF_TAPS(0.000546780576689613),\r\n+LPF_TAPS(0.000300788131540266),\r\n+LPF_TAPS(-0.000121512191754436),\r\n+LPF_TAPS(-0.000483597983984493),\r\n+LPF_TAPS(-0.000578214417085337),\r\n+LPF_TAPS(-0.000345906171682450),\r\n+LPF_TAPS(0.000088046109734778),\r\n+LPF_TAPS(0.000481017693369305),\r\n+LPF_TAPS(0.000608608176048614),\r\n+LPF_TAPS(0.000392684304164982),\r\n+LPF_TAPS(-0.000051109923647480),\r\n+LPF_TAPS(-0.000475090936671043),\r\n+LPF_TAPS(-0.000637679423173593),\r\n+LPF_TAPS(-0.000440952357572390),\r\n+LPF_TAPS(0.000010663180613739),\r\n+LPF_TAPS(0.000465586012311272),\r\n+LPF_TAPS(0.000665133348108232),\r\n+LPF_TAPS(0.000490518509497743),\r\n+LPF_TAPS(0.000033315792142107),\r\n+LPF_TAPS(-0.000452276453563864),\r\n+LPF_TAPS(-0.000690663690836736),\r\n+LPF_TAPS(-0.000541169076912061),\r\n+LPF_TAPS(-0.000080828649596569),\r\n+LPF_TAPS(0.000434942602384353),\r\n+LPF_TAPS(0.000713953766598160),\r\n+LPF_TAPS(0.000592668412062428),\r\n+LPF_TAPS(0.000131855849291230),\r\n+LPF_TAPS(-0.000413373204608622),\r\n+LPF_TAPS(-0.000734677579588487),\r\n+LPF_TAPS(-0.000644758905377691),\r\n+LPF_TAPS(-0.000186355537869023),\r\n+LPF_TAPS(0.000387367016124019),\r\n+LPF_TAPS(0.000752501018436972),\r\n+LPF_TAPS(0.000697161095670107),\r\n+LPF_TAPS(0.000244262511342674),\r\n+LPF_TAPS(-0.000356734409198346),\r\n+LPF_TAPS(-0.000767083125267112),\r\n+LPF_TAPS(-0.000749573886623857),\r\n+LPF_TAPS(-0.000305487255974598),\r\n+LPF_TAPS(0.000321298967809247),\r\n+LPF_TAPS(0.000778077428948392),\r\n+LPF_TAPS(0.000801674867154103),\r\n+LPF_TAPS(0.000369915075832187),\r\n+LPF_TAPS(-0.000280899060553020),\r\n+LPF_TAPS(-0.000785133331916735),\r\n+LPF_TAPS(-0.000853120731696567),\r\n+LPF_TAPS(-0.000437405312127583),\r\n+LPF_TAPS(0.000235389379531954),\r\n+LPF_TAPS(0.000787897538687086),\r\n+LPF_TAPS(0.000903547794839195),\r\n+LPF_TAPS(0.000507790658341669),\r\n+LPF_TAPS(-0.000184642433526538),\r\n+LPF_TAPS(-0.000786015512894042),\r\n+LPF_TAPS(-0.000952572592922852),\r\n+LPF_TAPS(-0.000580876573863251),\r\n+LPF_TAPS(0.000128549983756101),\r\n+LPF_TAPS(0.000779132948370268),\r\n+LPF_TAPS(0.000999792563301986),\r\n+LPF_TAPS(0.000656440797430408),\r\n+LPF_TAPS(-0.000067024410620718),\r\n+LPF_TAPS(-0.000766897238393383),\r\n+LPF_TAPS(-0.001044786789848272),\r\n+LPF_TAPS(-0.000734232960023326),\r\n+LPF_TAPS(-0.000000000000000005),\r\n+LPF_TAPS(0.000748958925783496),\r\n+LPF_TAPS(0.001087116800973934),\r\n+LPF_TAPS(0.000813974295010493),\r\n+LPF_TAPS(0.000072565862038648),\r\n+LPF_TAPS(-0.000724973114994913),\r\n+LPF_TAPS(-0.001126327403911303),\r\n+LPF_TAPS(-0.000895357441261970),\r\n+LPF_TAPS(-0.000150691596899802),\r\n+LPF_TAPS(0.000694600825682697),\r\n+LPF_TAPS(0.001161947536166415),\r\n+LPF_TAPS(0.000978046332583554),\r\n+LPF_TAPS(0.000234370453800612),\r\n+LPF_TAPS(-0.000657510265401049),\r\n+LPF_TAPS(-0.001193491111907350),\r\n+LPF_TAPS(-0.001061676164149838),\r\n+LPF_TAPS(-0.000323569652552237),\r\n+LPF_TAPS(0.000613377997052172),\r\n+LPF_TAPS(0.001220457837477517),\r\n+LPF_TAPS(0.001145853423567000),\r\n+LPF_TAPS(0.000418229657899272),\r\n+LPF_TAPS(-0.000561889974384736),\r\n+LPF_TAPS(-0.001242333966140826),\r\n+LPF_TAPS(-0.001230155970706029),\r\n+LPF_TAPS(-0.000518263593805743),\r\n+LPF_TAPS(0.000502742416153757),\r\n+LPF_TAPS(0.001258592957444364),\r\n+LPF_TAPS(0.001314133146421481),\r\n+LPF_TAPS(0.000623556805271501),\r\n+LPF_TAPS(-0.000435642486386754),\r\n+LPF_TAPS(-0.001268696001060263),\r\n+LPF_TAPS(-0.001397305885589659),\r\n+LPF_TAPS(-0.000733966574376959),\r\n+LPF_TAPS(0.000360308744410595),\r\n+LPF_TAPS(0.001272092358430086),\r\n+LPF_TAPS(0.001479166804407970),\r\n+LPF_TAPS(0.000849321996303103),\r\n+LPF_TAPS(-0.000276471323693381),\r\n+LPF_TAPS(-0.001268219467708550),\r\n+LPF_TAPS(-0.001559180225390086),\r\n+LPF_TAPS(-0.000969424020057980),\r\n+LPF_TAPS(0.000183871792903588),\r\n+LPF_TAPS(0.001256502748029804),\r\n+LPF_TAPS(0.001636782095705366),\r\n+LPF_TAPS(0.001094045657568108),\r\n+LPF_TAPS(-0.000082262645572483),\r\n+LPF_TAPS(-0.001236355027529776),\r\n+LPF_TAPS(-0.001711379745094407),\r\n+LPF_TAPS(-0.001222932363673510),\r\n+LPF_TAPS(-0.000028593644051682),\r\n+LPF_TAPS(0.001207175505238442),\r\n+LPF_TAPS(0.001782351418086488),\r\n+LPF_TAPS(0.001355802588405122),\r\n+LPF_TAPS(0.000148926072484010),\r\n+LPF_TAPS(-0.001168348139089120),\r\n+LPF_TAPS(-0.001849045501035285),\r\n+LPF_TAPS(-0.001492348501730395),\r\n+LPF_TAPS(-0.000278957153502074),\r\n+LPF_TAPS(0.001119239329794093),\r\n+LPF_TAPS(0.001910779346758653),\r\n+LPF_TAPS(0.001632236889739083),\r\n+LPF_TAPS(0.000418905665507703),\r\n+LPF_TAPS(-0.001059194741754679),\r\n+LPF_TAPS(-0.001966837577216155),\r\n+LPF_TAPS(-0.001775110220014063),\r\n+LPF_TAPS(-0.000568990229048854),\r\n+LPF_TAPS(0.000987535065544672),\r\n+LPF_TAPS(0.002016469716192195),\r\n+LPF_TAPS(0.001920587872700438),\r\n+LPF_TAPS(0.000729433874303646),\r\n+LPF_TAPS(-0.000903550479155667),\r\n+LPF_TAPS(-0.002058886967336214),\r\n+LPF_TAPS(-0.002068267532562079),\r\n+LPF_TAPS(-0.000900469798287184),\r\n+LPF_TAPS(0.000806493503452518),\r\n+LPF_TAPS(0.002093257905337432),\r\n+LPF_TAPS(0.002217726736106073),\r\n+LPF_TAPS(0.001082348564271453),\r\n+LPF_TAPS(-0.000695569866067479),\r\n+LPF_TAPS(-0.002118702785577123),\r\n+LPF_TAPS(-0.002368524566673696),\r\n+LPF_TAPS(-0.001275347066045030),\r\n+LPF_TAPS(0.000569926880137041),\r\n+LPF_TAPS(0.002134286094823393),\r\n+LPF_TAPS(0.002520203489249087),\r\n+LPF_TAPS(0.001479779673719473),\r\n+LPF_TAPS(-0.000428638699776618),\r\n+LPF_TAPS(-0.002139006854631970),\r\n+LPF_TAPS(-0.002672291315636172),\r\n+LPF_TAPS(-0.001696012105135989),\r\n+LPF_TAPS(0.000270687618562523),\r\n+LPF_TAPS(0.002131786038913134),\r\n+LPF_TAPS(0.002824303289607278),\r\n+LPF_TAPS(0.001924478741007838),\r\n+LPF_TAPS(-0.000094940309639865),\r\n+LPF_TAPS(-0.002111450261374951),\r\n+LPF_TAPS(-0.002975744280643784),\r\n+LPF_TAPS(-0.002165704342448907),\r\n+LPF_TAPS(-0.000099882464296025),\r\n+LPF_TAPS(0.002076710603318021),\r\n+LPF_TAPS(0.003126111073977952),\r\n+LPF_TAPS(0.002420331465708461),\r\n+LPF_TAPS(0.000315244661688287),\r\n+LPF_TAPS(-0.002026135051765541),\r\n+LPF_TAPS(-0.003274894743813884),\r\n+LPF_TAPS(-0.002689155344745519),\r\n+LPF_TAPS(-0.000552845020310631),\r\n+LPF_TAPS(0.001958112447871428),\r\n+LPF_TAPS(0.003421583095861868),\r\n+LPF_TAPS(0.002973168695048461),\r\n+LPF_TAPS(0.000814682149728468),\r\n+LPF_TAPS(-0.001870805022176066),\r\n+LPF_TAPS(-0.003565663164670819),\r\n+LPF_TAPS(-0.003273619886621902),\r\n+LPF_TAPS(-0.001103139994380340),\r\n+LPF_TAPS(0.001762085384909424),\r\n+LPF_TAPS(0.003706623750694053),\r\n+LPF_TAPS(0.003592089406590396),\r\n+LPF_TAPS(0.001421101307595647),\r\n+LPF_TAPS(-0.001629452035153002),\r\n+LPF_TAPS(-0.003843957981579970),\r\n+LPF_TAPS(-0.003930591751701837),\r\n+LPF_TAPS(-0.001772100266318171),\r\n+LPF_TAPS(0.001469914706687037),\r\n+LPF_TAPS(0.003977165881845358),\r\n+LPF_TAPS(0.004291713304285165),\r\n+LPF_TAPS(0.002160530749761068),\r\n+LPF_TAPS(-0.001279836601243179),\r\n+LPF_TAPS(-0.004105756934868098),\r\n+LPF_TAPS(-0.004678802109646364),\r\n+LPF_TAPS(-0.002591935331103227),\r\n+LPF_TAPS(0.001054713774132877),\r\n+LPF_TAPS(0.004229252621032640),\r\n+LPF_TAPS(0.005096234111258445),\r\n+LPF_TAPS(0.003073413849970708),\r\n+LPF_TAPS(-0.000788860865288700),\r\n+LPF_TAPS(-0.004347188915874286),\r\n+LPF_TAPS(-0.005549794693420798),\r\n+LPF_TAPS(-0.003614213465399337),\r\n+LPF_TAPS(0.000474953775693102),\r\n+LPF_TAPS(0.004459118732201452),\r\n+LPF_TAPS(0.006047238764530833),\r\n+LPF_TAPS(0.004226601704931117),\r\n+LPF_TAPS(-0.000103347635223954),\r\n+LPF_TAPS(-0.004564614290425168),\r\n+LPF_TAPS(-0.006599135675019976),\r\n+LPF_TAPS(-0.004927194646314364),\r\n+LPF_TAPS(-0.000338969649985560),\r\n+LPF_TAPS(0.004663269401693712),\r\n+LPF_TAPS(0.007220184376639409),\r\n+LPF_TAPS(0.005739043522408302),\r\n+LPF_TAPS(0.000870037019175714),\r\n+LPF_TAPS(-0.004754701648912377),\r\n+LPF_TAPS(-0.007931336370168995),\r\n+LPF_TAPS(-0.006695038446581728),\r\n+LPF_TAPS(-0.001515656923509417),\r\n+LPF_TAPS(0.004838554451325837),\r\n+LPF_TAPS(0.008763372616940504),\r\n+LPF_TAPS(0.007843713794596620),\r\n+LPF_TAPS(0.002314122726735356),\r\n+LPF_TAPS(-0.004914498999040660),\r\n+LPF_TAPS(-0.009763247625583497),\r\n+LPF_TAPS(-0.009259696625635633),\r\n+LPF_TAPS(-0.003324858732932616),\r\n+LPF_TAPS(0.004982236044675482),\r\n+LPF_TAPS(0.011006070343321725),\r\n+LPF_TAPS(0.011063798161185320),\r\n+LPF_TAPS(0.004645354753451371),\r\n+LPF_TAPS(-0.005041497540227182),\r\n+LPF_TAPS(-0.012619584031900466),\r\n+LPF_TAPS(-0.013465021110133799),\r\n+LPF_TAPS(-0.006447454322367885),\r\n+LPF_TAPS(0.005092048108238308),\r\n+LPF_TAPS(0.014839564692262223),\r\n+LPF_TAPS(0.016858573939520928),\r\n+LPF_TAPS(0.009064872816953886),\r\n+LPF_TAPS(-0.005133686337426830),\r\n+LPF_TAPS(-0.018153852707843591),\r\n+LPF_TAPS(-0.022091905732457218),\r\n+LPF_TAPS(-0.013242286375227360),\r\n+LPF_TAPS(0.005166245894094694),\r\n+LPF_TAPS(0.023760629646010001),\r\n+LPF_TAPS(0.031369218971440446),\r\n+LPF_TAPS(0.021048655686047999),\r\n+LPF_TAPS(-0.005189596441849655),\r\n+LPF_TAPS(-0.035597921097925082),\r\n+LPF_TAPS(-0.052774023466892729),\r\n+LPF_TAPS(-0.041174498840934465),\r\n+LPF_TAPS(0.005203644363453204),\r\n+LPF_TAPS(0.078609102662633309),\r\n+LPF_TAPS(0.159062306412752513),\r\n+LPF_TAPS(0.221363681692069797),\r\n+LPF_TAPS(0.244791664156811084),\r\n+LPF_TAPS(0.221363681692069797),\r\n+LPF_TAPS(0.159062306412752513),\r\n+LPF_TAPS(0.078609102662633309),\r\n+LPF_TAPS(0.005203644363453204),\r\n+LPF_TAPS(-0.041174498840934465),\r\n+LPF_TAPS(-0.052774023466892729),\r\n+LPF_TAPS(-0.035597921097925082),\r\n+LPF_TAPS(-0.005189596441849655),\r\n+LPF_TAPS(0.021048655686048003),\r\n+LPF_TAPS(0.031369218971440446),\r\n+LPF_TAPS(0.023760629646010001),\r\n+LPF_TAPS(0.005166245894094694),\r\n+LPF_TAPS(-0.013242286375227360),\r\n+LPF_TAPS(-0.022091905732457225),\r\n+LPF_TAPS(-0.018153852707843591),\r\n+LPF_TAPS(-0.005133686337426830),\r\n+LPF_TAPS(0.009064872816953886),\r\n+LPF_TAPS(0.016858573939520932),\r\n+LPF_TAPS(0.014839564692262223),\r\n+LPF_TAPS(0.005092048108238309),\r\n+LPF_TAPS(-0.006447454322367884),\r\n+LPF_TAPS(-0.013465021110133800),\r\n+LPF_TAPS(-0.012619584031900466),\r\n+LPF_TAPS(-0.005041497540227182),\r\n+LPF_TAPS(0.004645354753451371),\r\n+LPF_TAPS(0.011063798161185320),\r\n+LPF_TAPS(0.011006070343321727),\r\n+LPF_TAPS(0.004982236044675482),\r\n+LPF_TAPS(-0.003324858732932616),\r\n+LPF_TAPS(-0.009259696625635633),\r\n+LPF_TAPS(-0.009763247625583497),\r\n+LPF_TAPS(-0.004914498999040660),\r\n+LPF_TAPS(0.002314122726735356),\r\n+LPF_TAPS(0.007843713794596620),\r\n+LPF_TAPS(0.008763372616940504),\r\n+LPF_TAPS(0.004838554451325837),\r\n+LPF_TAPS(-0.001515656923509417),\r\n+LPF_TAPS(-0.006695038446581728),\r\n+LPF_TAPS(-0.007931336370168997),\r\n+LPF_TAPS(-0.004754701648912377),\r\n+LPF_TAPS(0.000870037019175714),\r\n+LPF_TAPS(0.005739043522408302),\r\n+LPF_TAPS(0.007220184376639409),\r\n+LPF_TAPS(0.004663269401693713),\r\n+LPF_TAPS(-0.000338969649985560),\r\n+LPF_TAPS(-0.004927194646314365),\r\n+LPF_TAPS(-0.006599135675019976),\r\n+LPF_TAPS(-0.004564614290425169),\r\n+LPF_TAPS(-0.000103347635223954),\r\n+LPF_TAPS(0.004226601704931118),\r\n+LPF_TAPS(0.006047238764530834),\r\n+LPF_TAPS(0.004459118732201452),\r\n+LPF_TAPS(0.000474953775693102),\r\n+LPF_TAPS(-0.003614213465399337),\r\n+LPF_TAPS(-0.005549794693420798),\r\n+LPF_TAPS(-0.004347188915874287),\r\n+LPF_TAPS(-0.000788860865288701),\r\n+LPF_TAPS(0.003073413849970708),\r\n+LPF_TAPS(0.005096234111258445),\r\n+LPF_TAPS(0.004229252621032641),\r\n+LPF_TAPS(0.001054713774132877),\r\n+LPF_TAPS(-0.002591935331103227),\r\n+LPF_TAPS(-0.004678802109646364),\r\n+LPF_TAPS(-0.004105756934868098),\r\n+LPF_TAPS(-0.001279836601243179),\r\n+LPF_TAPS(0.002160530749761068),\r\n+LPF_TAPS(0.004291713304285166),\r\n+LPF_TAPS(0.003977165881845358),\r\n+LPF_TAPS(0.001469914706687038),\r\n+LPF_TAPS(-0.001772100266318171),\r\n+LPF_TAPS(-0.003930591751701838),\r\n+LPF_TAPS(-0.003843957981579969),\r\n+LPF_TAPS(-0.001629452035153002),\r\n+LPF_TAPS(0.001421101307595647),\r\n+LPF_TAPS(0.003592089406590396),\r\n+LPF_TAPS(0.003706623750694053),\r\n+LPF_TAPS(0.001762085384909424),\r\n+LPF_TAPS(-0.001103139994380340),\r\n+LPF_TAPS(-0.003273619886621902),\r\n+LPF_TAPS(-0.003565663164670820),\r\n+LPF_TAPS(-0.001870805022176066),\r\n+LPF_TAPS(0.000814682149728468),\r\n+LPF_TAPS(0.002973168695048460),\r\n+LPF_TAPS(0.003421583095861869),\r\n+LPF_TAPS(0.001958112447871428),\r\n+LPF_TAPS(-0.000552845020310631),\r\n+LPF_TAPS(-0.002689155344745519),\r\n+LPF_TAPS(-0.003274894743813884),\r\n+LPF_TAPS(-0.002026135051765542),\r\n+LPF_TAPS(0.000315244661688287),\r\n+LPF_TAPS(0.002420331465708461),\r\n+LPF_TAPS(0.003126111073977953),\r\n+LPF_TAPS(0.002076710603318022),\r\n+LPF_TAPS(-0.000099882464296025),\r\n+LPF_TAPS(-0.002165704342448908),\r\n+LPF_TAPS(-0.002975744280643785),\r\n+LPF_TAPS(-0.002111450261374951),\r\n+LPF_TAPS(-0.000094940309639865),\r\n+LPF_TAPS(0.001924478741007838),\r\n+LPF_TAPS(0.002824303289607278),\r\n+LPF_TAPS(0.002131786038913134),\r\n+LPF_TAPS(0.000270687618562523),\r\n+LPF_TAPS(-0.001696012105135989),\r\n+LPF_TAPS(-0.002672291315636172),\r\n+LPF_TAPS(-0.002139006854631970),\r\n+LPF_TAPS(-0.000428638699776618),\r\n+LPF_TAPS(0.001479779673719473),\r\n+LPF_TAPS(0.002520203489249086),\r\n+LPF_TAPS(0.002134286094823393),\r\n+LPF_TAPS(0.000569926880137041),\r\n+LPF_TAPS(-0.001275347066045031),\r\n+LPF_TAPS(-0.002368524566673696),\r\n+LPF_TAPS(-0.002118702785577123),\r\n+LPF_TAPS(-0.000695569866067479),\r\n+LPF_TAPS(0.001082348564271454),\r\n+LPF_TAPS(0.002217726736106073),\r\n+LPF_TAPS(0.002093257905337432),\r\n+LPF_TAPS(0.000806493503452518),\r\n+LPF_TAPS(-0.000900469798287184),\r\n+LPF_TAPS(-0.002068267532562080),\r\n+LPF_TAPS(-0.002058886967336214),\r\n+LPF_TAPS(-0.000903550479155668),\r\n+LPF_TAPS(0.000729433874303646),\r\n+LPF_TAPS(0.001920587872700438),\r\n+LPF_TAPS(0.002016469716192196),\r\n+LPF_TAPS(0.000987535065544672),\r\n+LPF_TAPS(-0.000568990229048854),\r\n+LPF_TAPS(-0.001775110220014063),\r\n+LPF_TAPS(-0.001966837577216155),\r\n+LPF_TAPS(-0.001059194741754679),\r\n+LPF_TAPS(0.000418905665507703),\r\n+LPF_TAPS(0.001632236889739084),\r\n+LPF_TAPS(0.001910779346758654),\r\n+LPF_TAPS(0.001119239329794093),\r\n+LPF_TAPS(-0.000278957153502074),\r\n+LPF_TAPS(-0.001492348501730395),\r\n+LPF_TAPS(-0.001849045501035285),\r\n+LPF_TAPS(-0.001168348139089120),\r\n+LPF_TAPS(0.000148926072484010),\r\n+LPF_TAPS(0.001355802588405122),\r\n+LPF_TAPS(0.001782351418086488),\r\n+LPF_TAPS(0.001207175505238443),\r\n+LPF_TAPS(-0.000028593644051682),\r\n+LPF_TAPS(-0.001222932363673511),\r\n+LPF_TAPS(-0.001711379745094406),\r\n+LPF_TAPS(-0.001236355027529776),\r\n+LPF_TAPS(-0.000082262645572483),\r\n+LPF_TAPS(0.001094045657568108),\r\n+LPF_TAPS(0.001636782095705366),\r\n+LPF_TAPS(0.001256502748029804),\r\n+LPF_TAPS(0.000183871792903588),\r\n+LPF_TAPS(-0.000969424020057980),\r\n+LPF_TAPS(-0.001559180225390086),\r\n+LPF_TAPS(-0.001268219467708550),\r\n+LPF_TAPS(-0.000276471323693381),\r\n+LPF_TAPS(0.000849321996303103),\r\n+LPF_TAPS(0.001479166804407970),\r\n+LPF_TAPS(0.001272092358430086),\r\n+LPF_TAPS(0.000360308744410595),\r\n+LPF_TAPS(-0.000733966574376958),\r\n+LPF_TAPS(-0.001397305885589660),\r\n+LPF_TAPS(-0.001268696001060262),\r\n+LPF_TAPS(-0.000435642486386754),\r\n+LPF_TAPS(0.000623556805271501),\r\n+LPF_TAPS(0.001314133146421482),\r\n+LPF_TAPS(0.001258592957444364),\r\n+LPF_TAPS(0.000502742416153757),\r\n+LPF_TAPS(-0.000518263593805743),\r\n+LPF_TAPS(-0.001230155970706030),\r\n+LPF_TAPS(-0.001242333966140826),\r\n+LPF_TAPS(-0.000561889974384736),\r\n+LPF_TAPS(0.000418229657899272),\r\n+LPF_TAPS(0.001145853423567001),\r\n+LPF_TAPS(0.001220457837477517),\r\n+LPF_TAPS(0.000613377997052172),\r\n+LPF_TAPS(-0.000323569652552237),\r\n+LPF_TAPS(-0.001061676164149839),\r\n+LPF_TAPS(-0.001193491111907350),\r\n+LPF_TAPS(-0.000657510265401049),\r\n+LPF_TAPS(0.000234370453800612),\r\n+LPF_TAPS(0.000978046332583554),\r\n+LPF_TAPS(0.001161947536166415),\r\n+LPF_TAPS(0.000694600825682696),\r\n+LPF_TAPS(-0.000150691596899802),\r\n+LPF_TAPS(-0.000895357441261970),\r\n+LPF_TAPS(-0.001126327403911303),\r\n+LPF_TAPS(-0.000724973114994913),\r\n+LPF_TAPS(0.000072565862038648),\r\n+LPF_TAPS(0.000813974295010493),\r\n+LPF_TAPS(0.001087116800973934),\r\n+LPF_TAPS(0.000748958925783496),\r\n+LPF_TAPS(-0.000000000000000005),\r\n+LPF_TAPS(-0.000734232960023325),\r\n+LPF_TAPS(-0.001044786789848272),\r\n+LPF_TAPS(-0.000766897238393383),\r\n+LPF_TAPS(-0.000067024410620718),\r\n+LPF_TAPS(0.000656440797430408),\r\n+LPF_TAPS(0.000999792563301986),\r\n+LPF_TAPS(0.000779132948370269),\r\n+LPF_TAPS(0.000128549983756101),\r\n+LPF_TAPS(-0.000580876573863252),\r\n+LPF_TAPS(-0.000952572592922853),\r\n+LPF_TAPS(-0.000786015512894041),\r\n+LPF_TAPS(-0.000184642433526538),\r\n+LPF_TAPS(0.000507790658341669),\r\n+LPF_TAPS(0.000903547794839196),\r\n+LPF_TAPS(0.000787897538687086),\r\n+LPF_TAPS(0.000235389379531954),\r\n+LPF_TAPS(-0.000437405312127583),\r\n+LPF_TAPS(-0.000853120731696568),\r\n+LPF_TAPS(-0.000785133331916735),\r\n+LPF_TAPS(-0.000280899060553020),\r\n+LPF_TAPS(0.000369915075832187),\r\n+LPF_TAPS(0.000801674867154103),\r\n+LPF_TAPS(0.000778077428948392),\r\n+LPF_TAPS(0.000321298967809247),\r\n+LPF_TAPS(-0.000305487255974598),\r\n+LPF_TAPS(-0.000749573886623857),\r\n+LPF_TAPS(-0.000767083125267112),\r\n+LPF_TAPS(-0.000356734409198346),\r\n+LPF_TAPS(0.000244262511342674),\r\n+LPF_TAPS(0.000697161095670107),\r\n+LPF_TAPS(0.000752501018436972),\r\n+LPF_TAPS(0.000387367016124019),\r\n+LPF_TAPS(-0.000186355537869023),\r\n+LPF_TAPS(-0.000644758905377691),\r\n+LPF_TAPS(-0.000734677579588487),\r\n+LPF_TAPS(-0.000413373204608623),\r\n+LPF_TAPS(0.000131855849291230),\r\n+LPF_TAPS(0.000592668412062428),\r\n+LPF_TAPS(0.000713953766598160),\r\n+LPF_TAPS(0.000434942602384354),\r\n+LPF_TAPS(-0.000080828649596569),\r\n+LPF_TAPS(-0.000541169076912061),\r\n+LPF_TAPS(-0.000690663690836736),\r\n+LPF_TAPS(-0.000452276453563864),\r\n+LPF_TAPS(0.000033315792142107),\r\n+LPF_TAPS(0.000490518509497743),\r\n+LPF_TAPS(0.000665133348108233),\r\n+LPF_TAPS(0.000465586012311272),\r\n+LPF_TAPS(0.000010663180613739),\r\n+LPF_TAPS(-0.000440952357572390),\r\n+LPF_TAPS(-0.000637679423173593),\r\n+LPF_TAPS(-0.000475090936671043),\r\n+LPF_TAPS(-0.000051109923647480),\r\n+LPF_TAPS(0.000392684304164983),\r\n+LPF_TAPS(0.000608608176048614),\r\n+LPF_TAPS(0.000481017693369305),\r\n+LPF_TAPS(0.000088046109734778),\r\n+LPF_TAPS(-0.000345906171682450),\r\n+LPF_TAPS(-0.000578214417085338),\r\n+LPF_TAPS(-0.000483597983984493),\r\n+LPF_TAPS(-0.000121512191754436),\r\n+LPF_TAPS(0.000300788131540266),\r\n+LPF_TAPS(0.000546780576689613),\r\n+LPF_TAPS(0.000483067202397602),\r\n+LPF_TAPS(0.000151566115476765),\r\n+LPF_TAPS(-0.000257479016753594),\r\n+LPF_TAPS(-0.000514575874397409),\r\n+LPF_TAPS(-0.000479662932881307),\r\n+LPF_TAPS(-0.000178281991696848),\r\n+LPF_TAPS(0.000216106733933253),\r\n+LPF_TAPS(0.000481855590931383),\r\n+LPF_TAPS(0.000473623497580101),\r\n+LPF_TAPS(0.000201748736780270),\r\n+LPF_TAPS(-0.000176778770242168),\r\n+LPF_TAPS(-0.000448860445790772),\r\n+LPF_TAPS(-0.000465186561474686),\r\n+LPF_TAPS(-0.000222068690791697),\r\n+LPF_TAPS(0.000139582790075373),\r\n+LPF_TAPS(0.000415816081895713),\r\n+LPF_TAPS(0.000454587802221318),\r\n+LPF_TAPS(0.000239356222381871),\r\n+LPF_TAPS(-0.000104587315532687),\r\n+LPF_TAPS(-0.000382932657815871),\r\n+LPF_TAPS(-0.000442059651518030),\r\n+LPF_TAPS(-0.000253736329520328),\r\n+LPF_TAPS(0.000071842484152793),\r\n+LPF_TAPS(0.000350404547166695),\r\n+LPF_TAPS(0.000427830113880309),\r\n+LPF_TAPS(0.000265343244988183),\r\n+LPF_TAPS(-0.000041380876871214),\r\n+LPF_TAPS(-0.000318410143859715),\r\n+LPF_TAPS(-0.000412121667917977),\r\n+LPF_TAPS(-0.000274319055291023),\r\n+LPF_TAPS(0.000013218408751720),\r\n+LPF_TAPS(0.000287111771048686),\r\n+LPF_TAPS(0.000395150254398941),\r\n+LPF_TAPS(0.000280812341324255),\r\n+LPF_TAPS(0.000012644725282694),\r\n+LPF_TAPS(-0.000256655690826361),\r\n+LPF_TAPS(-0.000377124354571515),\r\n+LPF_TAPS(-0.000284976848729387),\r\n+LPF_TAPS(-0.000036223057728650),\r\n+LPF_TAPS(0.000227172210999713),\r\n+LPF_TAPS(0.000358244161402881),\r\n+LPF_TAPS(0.000286970195424601),\r\n+LPF_TAPS(0.000057544816948299),\r\n+LPF_TAPS(-0.000198775884607860),\r\n+LPF_TAPS(-0.000338700845583232),\r\n+LPF_TAPS(-0.000286952623285186),\r\n+LPF_TAPS(-0.000076650865007591),\r\n+LPF_TAPS(0.000171565797249007),\r\n+LPF_TAPS(0.000318675917350350),\r\n+LPF_TAPS(0.000285085800395328),\r\n+LPF_TAPS(0.000093593613118962),\r\n+LPF_TAPS(-0.000145625936753519),\r\n+LPF_TAPS(-0.000298340684414148),\r\n+LPF_TAPS(-0.000281531679699815),\r\n+LPF_TAPS(-0.000108435922812569),\r\n+LPF_TAPS(0.000121025639279983),\r\n+LPF_TAPS(0.000277855805510942),\r\n+LPF_TAPS(0.000276451419258910),\r\n+LPF_TAPS(0.000121250000801888),\r\n+LPF_TAPS(-0.000097820105521335),\r\n+LPF_TAPS(-0.000257370938398959),\r\n+LPF_TAPS(-0.000270004368660097),\r\n+LPF_TAPS(-0.000132116295283924),\r\n+LPF_TAPS(0.000076050980390099),\r\n+LPF_TAPS(0.000237024480424446),\r\n+LPF_TAPS(0.000262347125473069),\r\n+LPF_TAPS(0.000141122401127468),\r\n+LPF_TAPS(-0.000055746989303841),\r\n+LPF_TAPS(-0.000216943399147082),\r\n+LPF_TAPS(-0.000253632664955913),\r\n+LPF_TAPS(-0.000148361981060471),\r\n+LPF_TAPS(0.000036924624014180),\r\n+LPF_TAPS(0.000197243149918068),\r\n+LPF_TAPS(0.000244009545538509),\r\n+LPF_TAPS(0.000153933709573879),\r\n+LPF_TAPS(-0.000019588870814477),\r\n+LPF_TAPS(-0.000178027676757870),\r\n+LPF_TAPS(-0.000233621191929532),\r\n+LPF_TAPS(-0.000157940245821130),\r\n+LPF_TAPS(0.000003733973919304),\r\n+LPF_TAPS(0.000159389492386513),\r\n+LPF_TAPS(0.000222605257022561),\r\n+LPF_TAPS(0.000160487241315340),\r\n+LPF_TAPS(0.000010655773168138),\r\n+LPF_TAPS(-0.000141409832819944),\r\n+LPF_TAPS(-0.000211093063120906),\r\n+LPF_TAPS(-0.000161682387716431),\r\n+LPF_TAPS(-0.000023605215399143),\r\n+LPF_TAPS(0.000124158881563270),\r\n+LPF_TAPS(0.000199209122364984),\r\n+LPF_TAPS(0.000161634509463345),\r\n+LPF_TAPS(0.000035147509988554),\r\n+LPF_TAPS(-0.000107696058106567),\r\n+LPF_TAPS(-0.000187070735635932),\r\n+LPF_TAPS(-0.000160452705449426),\r\n+LPF_TAPS(-0.000045323293046136),\r\n+LPF_TAPS(0.000092070365163552),\r\n+LPF_TAPS(0.000174787668629224),\r\n+LPF_TAPS(0.000158245543366951),\r\n+LPF_TAPS(0.000054179845537360),\r\n+LPF_TAPS(-0.000077320788885710),\r\n+LPF_TAPS(-0.000162461903246604),\r\n+LPF_TAPS(-0.000155120309766295),\r\n+LPF_TAPS(-0.000061770264784565),\r\n+LPF_TAPS(0.000063476746136257),\r\n+LPF_TAPS(0.000150187461947657),\r\n+LPF_TAPS(0.000151182318291936),\r\n+LPF_TAPS(0.000068152647381547),\r\n+LPF_TAPS(-0.000050558572817687),\r\n+LPF_TAPS(-0.000138050302236821),\r\n+LPF_TAPS(-0.000146534277977078),\r\n+LPF_TAPS(-0.000073389289019584),\r\n+LPF_TAPS(0.000038578047211531),\r\n+LPF_TAPS(0.000126128278040423),\r\n+LPF_TAPS(0.000141275722906487),\r\n+LPF_TAPS(0.000077545906315898),\r\n+LPF_TAPS(-0.000027538942308942),\r\n+LPF_TAPS(-0.000114491164353880),\r\n+LPF_TAPS(-0.000135502503998360),\r\n+LPF_TAPS(-0.000080690885301903),\r\n+LPF_TAPS(0.000017437601182228),\r\n+LPF_TAPS(0.000103200741212745),\r\n+LPF_TAPS(0.000129306343115324),\r\n+LPF_TAPS(0.000082894560772723),\r\n+LPF_TAPS(-0.000008263529568140),\r\n+LPF_TAPS(-0.000092310932764303),\r\n+LPF_TAPS(-0.000122774449196541),\r\n+LPF_TAPS(-0.000084228530228097),\r\n+LPF_TAPS(0.000000000000000001),\r\n+LPF_TAPS(0.000081867996989454),\r\n+LPF_TAPS(0.000115989195611307),\r\n+LPF_TAPS(0.000084765005651504),\r\n+LPF_TAPS(0.000007375337964748),\r\n+LPF_TAPS(-0.000071910761447583),\r\n+LPF_TAPS(-0.000109027857473073),\r\n+LPF_TAPS(-0.000084576205885109),\r\n+LPF_TAPS(-0.000013889846627700),\r\n+LPF_TAPS(0.000062470900289848),\r\n+LPF_TAPS(0.000101962407224727),\r\n+LPF_TAPS(0.000083733791868213),\r\n+LPF_TAPS(0.000019575293067346),\r\n+LPF_TAPS(-0.000053573247707659),\r\n+LPF_TAPS(-0.000094859366413814),\r\n+LPF_TAPS(-0.000082308346520089),\r\n+LPF_TAPS(-0.000024467250702803),\r\n+LPF_TAPS(0.000045236142951916),\r\n+LPF_TAPS(0.000087779711222512),\r\n+LPF_TAPS(0.000080368900569730),\r\n+LPF_TAPS(0.000028604513776213),\r\n+LPF_TAPS(-0.000037471802072892),\r\n+LPF_TAPS(-0.000080778829003251),\r\n+LPF_TAPS(-0.000077982505169364),\r\n+LPF_TAPS(-0.000032028528666751),\r\n+LPF_TAPS(0.000030286711588387),\r\n+LPF_TAPS(0.000073906522798216),\r\n+LPF_TAPS(0.000075213851679169),\r\n+LPF_TAPS(0.000034782845571742),\r\n+LPF_TAPS(-0.000023682039386360),\r\n+LPF_TAPS(-0.000067207060590316),\r\n+LPF_TAPS(-0.000072124938581478),\r\n+LPF_TAPS(-0.000036912593701199),\r\n+LPF_TAPS(0.000017654058304802),\r\n+LPF_TAPS(0.000060719265845020),\r\n+LPF_TAPS(0.000068774785077135),\r\n+LPF_TAPS(0.000038463982734246),\r\n+LPF_TAPS(-0.000012194578003053),\r\n+LPF_TAPS(-0.000054476645756378),\r\n+LPF_TAPS(-0.000065219190537468),\r\n+LPF_TAPS(-0.000039483832884655),\r\n+LPF_TAPS(0.000007291380941630),\r\n+LPF_TAPS(0.000048507553506201),\r\n+LPF_TAPS(0.000061510538634914),\r\n+LPF_TAPS(0.000040019135521818),\r\n+LPF_TAPS(-0.000002928658518456),\r\n+LPF_TAPS(-0.000042835380781844),\r\n+LPF_TAPS(-0.000057697644656153),\r\n+LPF_TAPS(-0.000040116645897143),\r\n+LPF_TAPS(-0.000000912556335678),\r\n+LPF_TAPS(0.000037478776773538),\r\n+LPF_TAPS(0.000053825644215059),\r\n+LPF_TAPS(0.000039822509137849),\r\n+LPF_TAPS(0.000004253963524157),\r\n+LPF_TAPS(-0.000032451889885582),\r\n+LPF_TAPS(-0.000049935921330255),\r\n+LPF_TAPS(-0.000039181920293943),\r\n+LPF_TAPS(-0.000007119580243999),\r\n+LPF_TAPS(0.000027764628444526),\r\n+LPF_TAPS(0.000046066073614426),\r\n+LPF_TAPS(0.000038238818863166),\r\n+LPF_TAPS(0.000009535338363085),\r\n+LPF_TAPS(-0.000023422936769313),\r\n+LPF_TAPS(-0.000042249912140231),\r\n+LPF_TAPS(-0.000037035617875765),\r\n+LPF_TAPS(-0.000011528697227208),\r\n+LPF_TAPS(0.000019429083080919),\r\n+LPF_TAPS(0.000038517493400618),\r\n+LPF_TAPS(0.000035612967298774),\r\n+LPF_TAPS(0.000013128274090703),\r\n+LPF_TAPS(-0.000015781955869275),\r\n+LPF_TAPS(-0.000034895180669362),\r\n+LPF_TAPS(-0.000034009551220323),\r\n+LPF_TAPS(-0.000014363494044602),\r\n+LPF_TAPS(0.000012477365500132),\r\n+LPF_TAPS(0.000031405731989841),\r\n+LPF_TAPS(0.000032261918000294),\r\n+LPF_TAPS(0.000015264260998860),\r\n+LPF_TAPS(-0.000009508348030975),\r\n+LPF_TAPS(-0.000028068411975450),\r\n+LPF_TAPS(-0.000030404342325949),\r\n+LPF_TAPS(-0.000015860650962998),\r\n+LPF_TAPS(0.000006865468409934),\r\n+LPF_TAPS(0.000024899124592205),\r\n+LPF_TAPS(0.000028468717891133),\r\n+LPF_TAPS(0.000016182628565960),\r\n+LPF_TAPS(-0.000004537120451352),\r\n+LPF_TAPS(-0.000021910564111253),\r\n+LPF_TAPS(-0.000026484479226179),\r\n+LPF_TAPS(-0.000016259787463952),\r\n+LPF_TAPS(0.000002509821213062),\r\n+LPF_TAPS(0.000019112381464281),\r\n+LPF_TAPS(0.000024478551043080),\r\n+LPF_TAPS(0.000016121115006902),\r\n+LPF_TAPS(-0.000000768497640292),\r\n+LPF_TAPS(-0.000016511363305968),\r\n+LPF_TAPS(-0.000022475323326984),\r\n+LPF_TAPS(-0.000015794781272331),\r\n+LPF_TAPS(-0.000000703236414013),\r\n+LPF_TAPS(0.000014111621182239),\r\n+LPF_TAPS(0.000020496650300343),\r\n+LPF_TAPS(0.000015307952332069),\r\n+LPF_TAPS(0.000001922814435766),\r\n+LPF_TAPS(-0.000011914788318634),\r\n+LPF_TAPS(-0.000018561871309492),\r\n+LPF_TAPS(-0.000014686627393690),\r\n+LPF_TAPS(-0.000002908464160586),\r\n+LPF_TAPS(0.000009920221676887),\r\n+LPF_TAPS(0.000016687851634161),\r\n+LPF_TAPS(0.000013955499256432),\r\n+LPF_TAPS(0.000003678968304326),\r\n+LPF_TAPS(-0.000008125207077045),\r\n+LPF_TAPS(-0.000014889041197294),\r\n+LPF_TAPS(-0.000013137837341611),\r\n+LPF_TAPS(-0.000004253440033178),\r\n+LPF_TAPS(0.000006525165344347),\r\n+LPF_TAPS(0.000013177549153965),\r\n+LPF_TAPS(0.000012255392400844),\r\n+LPF_TAPS(0.000004651113866717),\r\n+LPF_TAPS(-0.000005113857611770),\r\n+LPF_TAPS(-0.000011563232362672),\r\n+LPF_TAPS(-0.000011328321872127),\r\n+LPF_TAPS(-0.000004891152491910),\r\n+LPF_TAPS(0.000003883588087799),\r\n+LPF_TAPS(0.000010053795787783),\r\n+LPF_TAPS(0.000010375134744049),\r\n+LPF_TAPS(0.000004992469763834),\r\n+LPF_TAPS(-0.000002825402781922),\r\n+LPF_TAPS(-0.000008654902946414),\r\n+LPF_TAPS(-0.000009412654701919),\r\n+LPF_TAPS(-0.000004973569981430),\r\n+LPF_TAPS(0.000001929282864789),\r\n+LPF_TAPS(0.000007370294594349),\r\n+LPF_TAPS(0.000008456000265721),\r\n+LPF_TAPS(0.000004852403355266),\r\n+LPF_TAPS(-0.000001184331523467),\r\n+LPF_TAPS(-0.000006201913941494),\r\n+LPF_TAPS(-0.000007518580587867),\r\n+LPF_TAPS(-0.000004646237430354),\r\n+LPF_TAPS(0.000000578953352335),\r\n+LPF_TAPS(0.000005150036795236),\r\n+LPF_TAPS(0.000006612105557627),\r\n+LPF_TAPS(0.000004371544091072),\r\n+LPF_TAPS(-0.000000101025494664),\r\n+LPF_TAPS(-0.000004213405147821),\r\n+LPF_TAPS(-0.000005746608857426),\r\n+LPF_TAPS(-0.000004043901657974),\r\n+LPF_TAPS(-0.000000261940083240),\r\n+LPF_TAPS(0.000003389362848789),\r\n+LPF_TAPS(0.000004930482632690),\r\n+LPF_TAPS(0.000003677911487767),\r\n+LPF_TAPS(0.000000522643645981),\r\n+LPF_TAPS(-0.000002673992133367),\r\n+LPF_TAPS(-0.000004170522469635),\r\n+LPF_TAPS(-0.000003287128408051),\r\n+LPF_TAPS(-0.000000693854385419),\r\n+LPF_TAPS(0.000002062249910138),\r\n+LPF_TAPS(0.000003471981422733),\r\n+LPF_TAPS(0.000002884004257187),\r\n+LPF_TAPS(0.000000788276939661),\r\n+LPF_TAPS(-0.000001548102844057),\r\n+LPF_TAPS(-0.000002838631893487),\r\n+LPF_TAPS(-0.000002479843756310),\r\n+LPF_TAPS(-0.000000818427794343),\r\n+LPF_TAPS(0.000001124660401793),\r\n+LPF_TAPS(0.000002272834232693),\r\n+LPF_TAPS(0.000002084771914283),\r\n+LPF_TAPS(0.000000796521519526),\r\n+LPF_TAPS(-0.000000784305153524),\r\n+LPF_TAPS(-0.000001775611017371),\r\n+LPF_TAPS(-0.000001707712156148),\r\n+LPF_TAPS(-0.000000734366703963),\r\n+LPF_TAPS(0.000000518819746823),\r\n+LPF_TAPS(0.000001346726039086),\r\n+LPF_TAPS(0.000001356374370310),\r\n+LPF_TAPS(0.000000643271372107),\r\n+LPF_TAPS(-0.000000319510082535),\r\n+LPF_TAPS(-0.000000984767130185),\r\n+LPF_TAPS(-0.000001037252087726),\r\n+LPF_TAPS(-0.000000533957607898),\r\n+LPF_TAPS(0.000000177324328124),\r\n+LPF_TAPS(0.000000687232046705),\r\n+LPF_TAPS(0.000000755628036388),\r\n+LPF_TAPS(0.000000416485063055),\r\n+LPF_TAPS(-0.000000082967499633),\r\n+LPF_TAPS(-0.000000450616719176),\r\n+LPF_TAPS(-0.000000515587354585),\r\n+LPF_TAPS(-0.000000300182995740),\r\n+LPF_TAPS(0.000000027011428177),\r\n+LPF_TAPS(0.000000270505273607),\r\n+LPF_TAPS(0.000000320037795188),\r\n+LPF_TAPS(0.000000193590467381),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000141661312606),\r\n+LPF_TAPS(-0.000000170736308622),\r\n+LPF_TAPS(-0.000000104404320415),\r\n+LPF_TAPS(-0.000000007450379918),\r\n+LPF_TAPS(0.000000058120029422),\r\n+LPF_TAPS(0.000000068321452499),\r\n+LPF_TAPS(0.000000039434566462),\r\n+LPF_TAPS(0.000000004555102241),\r\n+LPF_TAPS(-0.000000013280804131),\r\n+LPF_TAPS(-0.000000012351139235),\r\n+LPF_TAPS(-0.000000004566831930),\r\n+LPF_TAPS(-0.000000000270411184),\r\n+LPF_TAPS(0.000000000000000000),\r\n+};\r\ndiff --git a/core/sound/blip_lpf_96K.h b/core/sound/blip_lpf_96K.h\nnew file mode 100644\nindex 000000000..337bc7542\n--- /dev/null\n+++ b/core/sound/blip_lpf_96K.h\n@@ -0,0 +1,6 @@\n+/* 96K sampling, 2K cutoff, 3K transition */\r\n+enum { blip_lpf_96K_taps = 149 };\r\n+\r\n+\r\n+#include \"blip_lpf_96K_24K.h\"\r\n+#include \"blip_lpf_96K_48K.h\"\r\ndiff --git a/core/sound/blip_lpf_96K_24K.h b/core/sound/blip_lpf_96K_24K.h\nnew file mode 100644\nindex 000000000..3bea654e0\n--- /dev/null\n+++ b/core/sound/blip_lpf_96K_24K.h\n@@ -0,0 +1,151 @@\n+static buf_t const blip_lpf_96K_24K[blip_lpf_96K_taps] = {\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000701708496922),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000006526941230716),\r\n+LPF_TAPS(0.000003086174321712),\r\n+LPF_TAPS(-0.000017562355331373),\r\n+LPF_TAPS(-0.000013983752058089),\r\n+LPF_TAPS(0.000030897117874493),\r\n+LPF_TAPS(0.000036845200332407),\r\n+LPF_TAPS(-0.000041175536588245),\r\n+LPF_TAPS(-0.000074255894369925),\r\n+LPF_TAPS(0.000040812226421973),\r\n+LPF_TAPS(0.000126146936811878),\r\n+LPF_TAPS(-0.000020604771748354),\r\n+LPF_TAPS(-0.000188724141316930),\r\n+LPF_TAPS(-0.000029173032704737),\r\n+LPF_TAPS(0.000253585610710458),\r\n+LPF_TAPS(0.000117164314451904),\r\n+LPF_TAPS(-0.000307253598820201),\r\n+LPF_TAPS(-0.000248860398155740),\r\n+LPF_TAPS(0.000331371187525320),\r\n+LPF_TAPS(0.000424233064773930),\r\n+LPF_TAPS(-0.000303794660088205),\r\n+LPF_TAPS(-0.000635351123521239),\r\n+LPF_TAPS(0.000200738385905457),\r\n+LPF_TAPS(0.000864371546408451),\r\n+LPF_TAPS(-0.000000000000000010),\r\n+LPF_TAPS(-0.001082363393076616),\r\n+LPF_TAPS(-0.000314879761646322),\r\n+LPF_TAPS(0.001249428733550099),\r\n+LPF_TAPS(0.000749864524294362),\r\n+LPF_TAPS(-0.001316512932465652),\r\n+LPF_TAPS(-0.001295608098165062),\r\n+LPF_TAPS(0.001229142584712964),\r\n+LPF_TAPS(0.001923257171696114),\r\n+LPF_TAPS(-0.000933102744204027),\r\n+LPF_TAPS(-0.002581621887633276),\r\n+LPF_TAPS(0.000381790053630705),\r\n+LPF_TAPS(0.003196436815514680),\r\n+LPF_TAPS(0.000455308268491780),\r\n+LPF_TAPS(-0.003672291924219871),\r\n+LPF_TAPS(-0.001583812755983461),\r\n+LPF_TAPS(0.003897558987902193),\r\n+LPF_TAPS(0.002976302417062643),\r\n+LPF_TAPS(-0.003752294656353574),\r\n+LPF_TAPS(-0.004565839676857047),\r\n+LPF_TAPS(0.003118705184201384),\r\n+LPF_TAPS(0.006242078083372391),\r\n+LPF_TAPS(-0.001893360144979369),\r\n+LPF_TAPS(-0.007850564394344390),\r\n+LPF_TAPS(0.000000000000000042),\r\n+LPF_TAPS(0.009195349733646911),\r\n+LPF_TAPS(0.002598450251324513),\r\n+LPF_TAPS(-0.010044302454275438),\r\n+LPF_TAPS(-0.005890127809141893),\r\n+LPF_TAPS(0.010135492919056117),\r\n+LPF_TAPS(0.009808104202461783),\r\n+LPF_TAPS(-0.009181469455383524),\r\n+LPF_TAPS(-0.014228963148724134),\r\n+LPF_TAPS(0.006865511849241973),\r\n+LPF_TAPS(0.018976718875527550),\r\n+LPF_TAPS(-0.002818154096629675),\r\n+LPF_TAPS(-0.023832149121100512),\r\n+LPF_TAPS(-0.003452366427128846),\r\n+LPF_TAPS(0.028547006304230925),\r\n+LPF_TAPS(0.012745589635669397),\r\n+LPF_TAPS(-0.032861984682323937),\r\n+LPF_TAPS(-0.026695612427201355),\r\n+LPF_TAPS(0.036526836527406958),\r\n+LPF_TAPS(0.049580913855936638),\r\n+LPF_TAPS(-0.039320712347764498),\r\n+LPF_TAPS(-0.097376548791218737),\r\n+LPF_TAPS(0.041070695496571295),\r\n+LPF_TAPS(0.315353296251168147),\r\n+LPF_TAPS(0.458332933341161874),\r\n+LPF_TAPS(0.315353296251168147),\r\n+LPF_TAPS(0.041070695496571302),\r\n+LPF_TAPS(-0.097376548791218737),\r\n+LPF_TAPS(-0.039320712347764505),\r\n+LPF_TAPS(0.049580913855936638),\r\n+LPF_TAPS(0.036526836527406958),\r\n+LPF_TAPS(-0.026695612427201365),\r\n+LPF_TAPS(-0.032861984682323937),\r\n+LPF_TAPS(0.012745589635669397),\r\n+LPF_TAPS(0.028547006304230925),\r\n+LPF_TAPS(-0.003452366427128846),\r\n+LPF_TAPS(-0.023832149121100522),\r\n+LPF_TAPS(-0.002818154096629675),\r\n+LPF_TAPS(0.018976718875527557),\r\n+LPF_TAPS(0.006865511849241973),\r\n+LPF_TAPS(-0.014228963148724134),\r\n+LPF_TAPS(-0.009181469455383529),\r\n+LPF_TAPS(0.009808104202461783),\r\n+LPF_TAPS(0.010135492919056122),\r\n+LPF_TAPS(-0.005890127809141894),\r\n+LPF_TAPS(-0.010044302454275435),\r\n+LPF_TAPS(0.002598450251324513),\r\n+LPF_TAPS(0.009195349733646914),\r\n+LPF_TAPS(0.000000000000000042),\r\n+LPF_TAPS(-0.007850564394344388),\r\n+LPF_TAPS(-0.001893360144979369),\r\n+LPF_TAPS(0.006242078083372392),\r\n+LPF_TAPS(0.003118705184201384),\r\n+LPF_TAPS(-0.004565839676857049),\r\n+LPF_TAPS(-0.003752294656353575),\r\n+LPF_TAPS(0.002976302417062643),\r\n+LPF_TAPS(0.003897558987902192),\r\n+LPF_TAPS(-0.001583812755983463),\r\n+LPF_TAPS(-0.003672291924219874),\r\n+LPF_TAPS(0.000455308268491780),\r\n+LPF_TAPS(0.003196436815514683),\r\n+LPF_TAPS(0.000381790053630706),\r\n+LPF_TAPS(-0.002581621887633277),\r\n+LPF_TAPS(-0.000933102744204027),\r\n+LPF_TAPS(0.001923257171696116),\r\n+LPF_TAPS(0.001229142584712963),\r\n+LPF_TAPS(-0.001295608098165061),\r\n+LPF_TAPS(-0.001316512932465654),\r\n+LPF_TAPS(0.000749864524294363),\r\n+LPF_TAPS(0.001249428733550099),\r\n+LPF_TAPS(-0.000314879761646322),\r\n+LPF_TAPS(-0.001082363393076616),\r\n+LPF_TAPS(-0.000000000000000010),\r\n+LPF_TAPS(0.000864371546408451),\r\n+LPF_TAPS(0.000200738385905457),\r\n+LPF_TAPS(-0.000635351123521240),\r\n+LPF_TAPS(-0.000303794660088205),\r\n+LPF_TAPS(0.000424233064773931),\r\n+LPF_TAPS(0.000331371187525320),\r\n+LPF_TAPS(-0.000248860398155740),\r\n+LPF_TAPS(-0.000307253598820201),\r\n+LPF_TAPS(0.000117164314451904),\r\n+LPF_TAPS(0.000253585610710458),\r\n+LPF_TAPS(-0.000029173032704737),\r\n+LPF_TAPS(-0.000188724141316931),\r\n+LPF_TAPS(-0.000020604771748354),\r\n+LPF_TAPS(0.000126146936811877),\r\n+LPF_TAPS(0.000040812226421973),\r\n+LPF_TAPS(-0.000074255894369925),\r\n+LPF_TAPS(-0.000041175536588245),\r\n+LPF_TAPS(0.000036845200332407),\r\n+LPF_TAPS(0.000030897117874494),\r\n+LPF_TAPS(-0.000013983752058089),\r\n+LPF_TAPS(-0.000017562355331373),\r\n+LPF_TAPS(0.000003086174321712),\r\n+LPF_TAPS(0.000006526941230715),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000701708496923),\r\n+LPF_TAPS(0.000000000000000000),\r\n+};\r\ndiff --git a/core/sound/blip_lpf_96K_48K.h b/core/sound/blip_lpf_96K_48K.h\nnew file mode 100644\nindex 000000000..fbbd96fcb\n--- /dev/null\n+++ b/core/sound/blip_lpf_96K_48K.h\n@@ -0,0 +1,151 @@\n+static buf_t const blip_lpf_96K_48K[blip_lpf_96K_taps] = {\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000092381758809),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(0.000000859288883037),\r\n+LPF_TAPS(-0.000003086177081482),\r\n+LPF_TAPS(0.000007274572270650),\r\n+LPF_TAPS(-0.000013983764562867),\r\n+LPF_TAPS(0.000023708213596591),\r\n+LPF_TAPS(-0.000036845233280721),\r\n+LPF_TAPS(0.000053661052007767),\r\n+LPF_TAPS(-0.000074255960772238),\r\n+LPF_TAPS(0.000098529518647157),\r\n+LPF_TAPS(-0.000126147049617042),\r\n+LPF_TAPS(0.000156508919705138),\r\n+LPF_TAPS(-0.000188724310080899),\r\n+LPF_TAPS(0.000221591381302565),\r\n+LPF_TAPS(-0.000253585837475903),\r\n+LPF_TAPS(0.000282859929919310),\r\n+LPF_TAPS(-0.000307253873577503),\r\n+LPF_TAPS(0.000324321475191690),\r\n+LPF_TAPS(-0.000331371483849456),\r\n+LPF_TAPS(0.000325525770890753),\r\n+LPF_TAPS(-0.000303794931752394),\r\n+LPF_TAPS(0.000263171287568576),\r\n+LPF_TAPS(-0.000200738565412977),\r\n+LPF_TAPS(0.000113796774689262),\r\n+LPF_TAPS(-0.000000000000000012),\r\n+LPF_TAPS(-0.000142495971420656),\r\n+LPF_TAPS(0.000314880043223212),\r\n+LPF_TAPS(-0.000517530789449474),\r\n+LPF_TAPS(0.000749865194850437),\r\n+LPF_TAPS(-0.001010196806458020),\r\n+LPF_TAPS(0.001295609256744784),\r\n+LPF_TAPS(-0.001601851235669701),\r\n+LPF_TAPS(0.001923258891542412),\r\n+LPF_TAPS(-0.002252711314599227),\r\n+LPF_TAPS(0.002581624196213172),\r\n+LPF_TAPS(-0.002899985963333183),\r\n+LPF_TAPS(0.003196439673884358),\r\n+LPF_TAPS(-0.003458412745589792),\r\n+LPF_TAPS(0.003672295208116436),\r\n+LPF_TAPS(-0.003823665655012165),\r\n+LPF_TAPS(0.003897562473240722),\r\n+LPF_TAPS(-0.003878796295721843),\r\n+LPF_TAPS(0.003752298011791477),\r\n+LPF_TAPS(-0.003503495139787102),\r\n+LPF_TAPS(0.003118707973060552),\r\n+LPF_TAPS(-0.002585555711620335),\r\n+LPF_TAPS(0.001893361838090584),\r\n+LPF_TAPS(-0.001033547334220734),\r\n+LPF_TAPS(0.000000000000000055),\r\n+LPF_TAPS(0.001210591841178303),\r\n+LPF_TAPS(-0.002598452574953052),\r\n+LPF_TAPS(0.004160490021595888),\r\n+LPF_TAPS(-0.005890133076307769),\r\n+LPF_TAPS(0.007777244207948916),\r\n+LPF_TAPS(-0.009808112973224117),\r\n+LPF_TAPS(0.011965534654227609),\r\n+LPF_TAPS(-0.014228975872778828),\r\n+LPF_TAPS(0.016574826640870784),\r\n+LPF_TAPS(-0.018976735845197538),\r\n+LPF_TAPS(0.021406024711794043),\r\n+LPF_TAPS(-0.023832170432672221),\r\n+LPF_TAPS(0.026223349937347668),\r\n+LPF_TAPS(-0.028547031831998824),\r\n+LPF_TAPS(0.030770602875039004),\r\n+LPF_TAPS(-0.032862014068701928),\r\n+LPF_TAPS(0.034790430569500291),\r\n+LPF_TAPS(-0.036526869191028370),\r\n+LPF_TAPS(0.038044807311335589),\r\n+LPF_TAPS(-0.039320747509770888),\r\n+LPF_TAPS(0.040334723235147786),\r\n+LPF_TAPS(-0.041070732223476049),\r\n+LPF_TAPS(0.041517086199934598),\r\n+LPF_TAPS(0.958333353961726031),\r\n+LPF_TAPS(0.041517086199934598),\r\n+LPF_TAPS(-0.041070732223476056),\r\n+LPF_TAPS(0.040334723235147786),\r\n+LPF_TAPS(-0.039320747509770895),\r\n+LPF_TAPS(0.038044807311335589),\r\n+LPF_TAPS(-0.036526869191028370),\r\n+LPF_TAPS(0.034790430569500298),\r\n+LPF_TAPS(-0.032862014068701928),\r\n+LPF_TAPS(0.030770602875039004),\r\n+LPF_TAPS(-0.028547031831998824),\r\n+LPF_TAPS(0.026223349937347668),\r\n+LPF_TAPS(-0.023832170432672228),\r\n+LPF_TAPS(0.021406024711794047),\r\n+LPF_TAPS(-0.018976735845197549),\r\n+LPF_TAPS(0.016574826640870784),\r\n+LPF_TAPS(-0.014228975872778828),\r\n+LPF_TAPS(0.011965534654227615),\r\n+LPF_TAPS(-0.009808112973224117),\r\n+LPF_TAPS(0.007777244207948919),\r\n+LPF_TAPS(-0.005890133076307770),\r\n+LPF_TAPS(0.004160490021595888),\r\n+LPF_TAPS(-0.002598452574953052),\r\n+LPF_TAPS(0.001210591841178303),\r\n+LPF_TAPS(0.000000000000000055),\r\n+LPF_TAPS(-0.001033547334220734),\r\n+LPF_TAPS(0.001893361838090585),\r\n+LPF_TAPS(-0.002585555711620336),\r\n+LPF_TAPS(0.003118707973060552),\r\n+LPF_TAPS(-0.003503495139787103),\r\n+LPF_TAPS(0.003752298011791478),\r\n+LPF_TAPS(-0.003878796295721843),\r\n+LPF_TAPS(0.003897562473240721),\r\n+LPF_TAPS(-0.003823665655012169),\r\n+LPF_TAPS(0.003672295208116439),\r\n+LPF_TAPS(-0.003458412745589795),\r\n+LPF_TAPS(0.003196439673884361),\r\n+LPF_TAPS(-0.002899985963333184),\r\n+LPF_TAPS(0.002581624196213173),\r\n+LPF_TAPS(-0.002252711314599227),\r\n+LPF_TAPS(0.001923258891542414),\r\n+LPF_TAPS(-0.001601851235669700),\r\n+LPF_TAPS(0.001295609256744783),\r\n+LPF_TAPS(-0.001010196806458021),\r\n+LPF_TAPS(0.000749865194850438),\r\n+LPF_TAPS(-0.000517530789449474),\r\n+LPF_TAPS(0.000314880043223212),\r\n+LPF_TAPS(-0.000142495971420657),\r\n+LPF_TAPS(-0.000000000000000012),\r\n+LPF_TAPS(0.000113796774689262),\r\n+LPF_TAPS(-0.000200738565412977),\r\n+LPF_TAPS(0.000263171287568577),\r\n+LPF_TAPS(-0.000303794931752394),\r\n+LPF_TAPS(0.000325525770890754),\r\n+LPF_TAPS(-0.000331371483849456),\r\n+LPF_TAPS(0.000324321475191690),\r\n+LPF_TAPS(-0.000307253873577503),\r\n+LPF_TAPS(0.000282859929919310),\r\n+LPF_TAPS(-0.000253585837475903),\r\n+LPF_TAPS(0.000221591381302565),\r\n+LPF_TAPS(-0.000188724310080900),\r\n+LPF_TAPS(0.000156508919705138),\r\n+LPF_TAPS(-0.000126147049617042),\r\n+LPF_TAPS(0.000098529518647157),\r\n+LPF_TAPS(-0.000074255960772238),\r\n+LPF_TAPS(0.000053661052007767),\r\n+LPF_TAPS(-0.000036845233280721),\r\n+LPF_TAPS(0.000023708213596591),\r\n+LPF_TAPS(-0.000013983764562867),\r\n+LPF_TAPS(0.000007274572270650),\r\n+LPF_TAPS(-0.000003086177081482),\r\n+LPF_TAPS(0.000000859288883036),\r\n+LPF_TAPS(0.000000000000000000),\r\n+LPF_TAPS(-0.000000092381758809),\r\n+LPF_TAPS(0.000000000000000000),\r\n+};\r\ndiff --git a/core/sound/opll.c b/core/sound/opll.c\nindex 260f56608..5ccd217bc 100644\n--- a/core/sound/opll.c\n+++ b/core/sound/opll.c\n@@ -1,6 +1,6 @@\n #ifdef HAVE_OPLL_CORE\n /*\n- * Copyright (C) 2019 Nuke.YKT\n+ * Copyright (C) 2019-2023 Nuke.YKT\n  * \n  *  Redistribution and use of this code or any derivative works are permitted\n  *  provided that the following conditions are met:\n@@ -38,7 +38,7 @@\n  *      siliconpr0n.org(digshadow, John McMaster):\n  *          VRC VII decap and die shot.\n  *\n- *  version: 1.0\n+ *  version: 1.0.2\n  */\n \n #include <string.h>\n@@ -153,7 +153,7 @@ static const opll_patch_t patch_ds1001[opll_patch_max] = {\n     { 0x00, 0x00, 0x00, 0x00,{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x01, 0x00 },{ 0x00, 0x00 },{ 0x0c, 0x00 },{ 0x08, 0x00 },{ 0x0a, 0x00 },{ 0x07, 0x00 } },\n     { 0x00, 0x00, 0x00, 0x00,{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x05, 0x00 },{ 0x00, 0x00 },{ 0x0f, 0x00 },{ 0x08, 0x00 },{ 0x05, 0x00 },{ 0x09, 0x00 } },\n     { 0x00, 0x00, 0x00, 0x00,{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x01 },{ 0x00, 0x00 },{ 0x00, 0x0f },{ 0x00, 0x08 },{ 0x00, 0x06 },{ 0x00, 0x0d } },\n-    { 0x00, 0x00, 0x00, 0x00,{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x01 },{ 0x00, 0x00 },{ 0x00, 0x0d },{ 0x00, 0x08 },{ 0x00, 0x06 },{ 0x00, 0x08 } },\n+    { 0x00, 0x00, 0x00, 0x00,{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x01 },{ 0x00, 0x00 },{ 0x00, 0x0d },{ 0x00, 0x08 },{ 0x00, 0x04 },{ 0x00, 0x08 } },\n     { 0x00, 0x00, 0x00, 0x00,{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x01 },{ 0x00, 0x00 },{ 0x00, 0x0a },{ 0x00, 0x0a },{ 0x00, 0x05 },{ 0x00, 0x05 } }\n };\n \n@@ -417,8 +417,8 @@ void OPLL_PreparePatch2(opll_t *chip) {\n void OPLL_PhaseGenerate(opll_t *chip) {\n     uint32_t ismod;\n     uint32_t phase;\n-    uint8_t rm_bit;\n     uint16_t pg_out;\n+    uint8_t rm_bit;\n \n     chip->pg_phase[(chip->cycles + 17) % 18] = chip->pg_phase_next + chip->pg_inc;\n \n@@ -953,6 +953,9 @@ void OPLL_Operator(opll_t *chip) {\n         }\n     }\n \n+    if (!(chip->rm_enable & 0x80))\n+        routput = 0;\n+\n     chip->ch_out = ismod1 ? routput : (output>>3);\n }\n \ndiff --git a/core/sound/sound.c b/core/sound/sound.c\nindex 40c2bbddb..1b209557b 100644\n--- a/core/sound/sound.c\n+++ b/core/sound/sound.c\n@@ -239,7 +239,7 @@ static void OPLL2413_Update(int* buffer, int length)\n   int i, j;\r\n   for (i = 0; i < length; i++)\r\n   {\r\n-    OPLL_Clock(&opll, opll_accm[opll_cycles]);\r\n+    OPLL_Clock(&opll, (int32_t *)opll_accm[opll_cycles]);\r\n     opll_cycles = (opll_cycles + 1) % 18;\r\n     if (opll_cycles == 0)\r\n     {\r\ndiff --git a/core/sound/ym2413.c b/core/sound/ym2413.c\nindex 82bc43cf3..edef50e53 100644\n--- a/core/sound/ym2413.c\n+++ b/core/sound/ym2413.c\n@@ -1183,7 +1183,7 @@ static int init_tables(void)\n       n = n>>1;\r\n \r\n     /* waveform 0: standard sinus  */\r\n-    sin_tab[ i ] = n*2 + (m>=0.0? 0: 1 );\r\n+    sin_tab[ i ] = n*2 + ((m>=0.0)? 0: 1 );\r\n \r\n     /* waveform 1:  __      __     */\r\n     /*             /  \\____/  \\____*/\r\ndiff --git a/core/sound/ym2612.c b/core/sound/ym2612.c\nindex 3cba674ca..fc55e2c19 100644\n--- a/core/sound/ym2612.c\n+++ b/core/sound/ym2612.c\n@@ -1843,7 +1843,7 @@ static void init_tables(void)\n       n = n>>1;\r\n \r\n     /* 13-bits (8.5) value is formatted for above 'Power' table */\r\n-    sin_tab[ i ] = n*2 + (m>=0.0? 0: 1 );\r\n+    sin_tab[ i ] = n*2 + ((m>=0.0)? 0: 1 );\r\n   }\r\n \r\n   /* build LFO PM modulation table */\r\ndiff --git a/core/sound/ym3438.c b/core/sound/ym3438.c\nindex d2debad7a..9ecc45477 100644\n--- a/core/sound/ym3438.c\n+++ b/core/sound/ym3438.c\n@@ -983,6 +983,36 @@ static void OPN2_ChOutput(ym3438_t *chip)\n     chip->mol = 0;\n     chip->mor = 0;\n \n+#if 1\n+/* https://jsgroth.dev/blog/posts/sega-cd-pcm-interpolation/ */\n+\t{\n+\t\tstatic Bit16s ym[6][6] = {0,0,0,0,0,0};  /* hermite 6p */\n+\t\tfloat x = 0;  /* fractional pitch */\n+\t\tfloat c0,c1,c2,c3;\n+\t\tint ch = 0; //chip->channel;\n+\t\tint out_ex;\n+\n+\t\tym[ch][0] = ym[ch][1];\n+\t\tym[ch][1] = ym[ch][2];\n+\t\tym[ch][2] = ym[ch][3];\n+\t\tym[ch][3] = ym[ch][4];\n+\t\tym[ch][4] = ym[ch][5];\n+\t\tym[ch][5] = out;\n+\n+\t\tc0 = ym[ch][2];\n+\t\tc1 = 1.0/12.0 * (ym[ch][0] - ym[ch][4]) + 2.0/3.0 * (ym[ch][3] - ym[ch][1]);\n+\t\tc2 = 5.0/4.0 * ym[ch][1] - 7/3 * ym[ch][2] + 5.0/3.0 * ym[ch][3] - 1.0/2.0 * ym[ch][4] + 1.0/12.0 * ym[ch][5] - 1.0/6.0 * ym[ch][0];\n+\t\tc3 = 1.0/12.0 * (ym[ch][0] - ym[ch][5]) + 7.0/12.0 * (ym[ch][4] - ym[ch][1]) + 4.0/3.0 * (ym[ch][2] - ym[ch][3]);\n+\n+\t\tout_ex = (Bit16s) (((c3 * x + c2) * x + c1) * x + c0);\n+\t\tif (out_ex > 32767)\n+\t\t\tout_ex = 32767;\n+\t\telse if(out_ex < -32768)\n+\t\t\tout_ex = -32768;\n+\t\tout = (Bit16s) out_ex;\n+\t}\n+#endif\n+\n     if (chip_type & ym3438_mode_ym2612)\n     {\n         out_en = ((cycles & 3) == 3) || test_dac;\ndiff --git a/core/state.h b/core/state.h\nindex 7f6e46b58..9cb5af5b6 100644\n--- a/core/state.h\n+++ b/core/state.h\n@@ -39,7 +39,8 @@\n #ifndef _STATE_H_\r\n #define _STATE_H_\r\n \r\n-#define STATE_SIZE    0xfd000\r\n+//#define STATE_SIZE    0x120000\r\n+#define STATE_SIZE    0x200000\r\n #define STATE_VERSION \"GENPLUS-GX 1.7.6\"\r\n \r\n #define load_param(param, size) \\\r\ndiff --git a/core/system.c b/core/system.c\nindex 17491b628..9da3e3f96 100644\n--- a/core/system.c\n+++ b/core/system.c\n@@ -42,8 +42,6 @@\n #include \"shared.h\"\r\n #include \"eq.h\"\r\n \r\n-extern int8 audio_hard_disable;\r\n-\r\n /* Global variables */\r\n t_bitmap bitmap;\r\n t_snd snd;\r\n@@ -89,6 +87,14 @@ int audio_init(int samplerate, double framerate)\n     }\r\n   }\r\n \r\n+  /* Cart sound */\r\n+  snd.blips[3] = blip_new(samplerate / 10);\r\n+  if (!snd.blips[3])\r\n+  {\r\n+    audio_shutdown();\r\n+    return -1;\r\n+  }\r\n+\r\n   /* Initialize resampler internal rates */\r\n   audio_set_rate(samplerate, framerate);\r\n \r\n@@ -145,6 +151,8 @@ void audio_set_rate(int samplerate, double framerate)\n     cdd_init(samplerate);\r\n   }\r\n \r\n+  blip_set_rates(snd.blips[3], 48000, samplerate);\r\n+\r\n   /* Reinitialize internal rates */\r\n   snd.sample_rate = samplerate;\r\n   snd.frame_rate  = framerate;\r\n@@ -155,7 +163,7 @@ void audio_reset(void)\n   int i;\r\n   \r\n   /* Clear blip buffers */\r\n-  for (i=0; i<3; i++)\r\n+  for (i=0; i<4; i++)\r\n   {\r\n     if (snd.blips[i])\r\n     {\r\n@@ -185,12 +193,11 @@ void audio_shutdown(void)\n   int i;\r\n   \r\n   /* Delete blip buffers */\r\n-  for (i=0; i<3; i++)\r\n+  for (i=0; i<4; i++)\r\n   {\r\n-    blip_delete(snd.blips[i]);\r\n+    if (snd.blips[i])\r\n+      blip_delete(snd.blips[i]);\r\n     snd.blips[i] = 0;\r\n-    blip_delete_buffer_state(snd.blip_states[i]);\r\n-    snd.blip_states[i] = 0;\r\n   }\r\n }\r\n \r\n@@ -199,8 +206,22 @@ int audio_update(int16 *buffer)\n   /* run sound chips until end of frame */\r\n   int size = sound_update(mcycles_vdp);\r\n \r\n+  if (cart.special & HW_PAPRIUM)\r\n+  {\r\n+    extern void paprium_audio(int samples);\r\n+    paprium_audio(size);\r\n+\r\n+#ifdef ALIGN_SND\r\n+    /* return an aligned number of samples if required */\r\n+    size &= ALIGN_SND;\r\n+#endif\r\n+\r\n+    /* resample & mix FM/PSG, PCM & Cart streams to output buffer */\r\n+    blip_mix_samples_2(snd.blips[0], snd.blips[3], buffer, size);\r\n+  }\r\n+\r\n   /* Mega CD sound hardware enabled ? */\r\n-  if (snd.blips[1] && snd.blips[2])\r\n+  else if (snd.blips[1] && snd.blips[2])\r\n   {\r\n     /* sync PCM chip with other sound chips */\r\n     pcm_update(size);\r\n@@ -213,14 +234,6 @@ int audio_update(int16 *buffer)\n     size &= ALIGN_SND;\r\n #endif\r\n \r\n-    if (audio_hard_disable)\r\n-    {\r\n-      blip_discard_samples_dirty(snd.blips[0], size);\r\n-      blip_discard_samples_dirty(snd.blips[1], size);\r\n-      blip_discard_samples_dirty(snd.blips[2], size);\r\n-      return 0;\r\n-    }\r\n-\r\n     /* resample & mix FM/PSG, PCM & CD-DA streams to output buffer */\r\n     blip_mix_samples(snd.blips[0], snd.blips[1], snd.blips[2], buffer, size);\r\n   }\r\n@@ -231,12 +244,6 @@ int audio_update(int16 *buffer)\n     size &= ALIGN_SND;\r\n #endif\r\n \r\n-    if (audio_hard_disable)\r\n-    {\r\n-      blip_discard_samples_dirty(snd.blips[0], size);\r\n-      return 0;\r\n-    }\r\n-\r\n     /* resample FM/PSG mixed stream to output buffer */\r\n     blip_read_samples(snd.blips[0], buffer, size);\r\n   }\r\ndiff --git a/core/system.h b/core/system.h\nindex 5857f838e..633c4c678 100644\n--- a/core/system.h\n+++ b/core/system.h\n@@ -92,8 +92,8 @@ typedef struct\n   int sample_rate;      /* Output Sample rate (8000-48000) */\r\n   double frame_rate;    /* Output Frame rate (usually 50 or 60 frames per second) */\r\n   int enabled;          /* 1= sound emulation is enabled */\r\n-  blip_t* blips[3];     /* Blip Buffer resampling (stereo) */\r\n-  blip_buffer_state_t *blip_states[3]; /* states for suspending and restoring the sound buffer */\r\n+  blip_t* blips[4];     /* Blip Buffer resampling (stereo) */\r\n+  blip_buffer_state_t *blip_states[4]; /* states for suspending and restoring the sound buffer */\r\n   int fm_last_save[2];  /* For saving and restoring the sound buffer */\r\n   int16 cd_last_save[2];  /* For saving and restoring the sound buffer */\r\n } t_snd;\r\ndiff --git a/core/vdp_ctrl.c b/core/vdp_ctrl.c\nindex b09880d29..9d01d4981 100644\n--- a/core/vdp_ctrl.c\n+++ b/core/vdp_ctrl.c\n@@ -42,10 +42,23 @@\n #include \"shared.h\"\r\n #include \"hvc.h\"\r\n \r\n+#if 0\r\n+#include <windows.h>\r\n+#include <stdio.h>\r\n+#endif\r\n+\r\n+//#define DEBUG_DMA\r\n+//#define DEBUG_VDP\r\n+\r\n+extern retro_log_printf_t log_cb;\r\n+static int debug_dma;\r\n+static int debug_dma_once;\r\n+\r\n extern int8 reset_do_not_clear_buffers;\r\n static int8 do_not_invalidate_tile_cache;\r\n \r\n static void vdp_set_all_vram(const uint8 *src);\r\n+\tstatic char error_str[512];\r\n \r\n /* Mark a pattern as modified */\r\n #define MARK_BG_DIRTY(addr)                         \\\r\n@@ -689,8 +702,19 @@ void vdp_dma_update(unsigned int cycles)\n   error(\"[%d(%d)][%d(%d)] DMA type %d (%d access/line)(%d cycles left)-> %d access (%d remaining) (%x)\\n\", v_counter, (v_counter + (cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, cycles, cycles%MCYCLES_PER_LINE,dma_type, rate, dma_cycles, dma_bytes, dma_length, m68k_get_reg(M68K_REG_PC));\r\n #endif\r\n \r\n+#if 0\r\n+static char error_str[512];\r\n+sprintf(error_str, \"[%d(%d)][%d(%d)] DMA type %d (%d access/line)(%d cycles left)-> %d access (%d remaining) (%x)\\n\", v_counter, (v_counter + (cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, cycles, cycles%MCYCLES_PER_LINE,dma_type, rate, dma_cycles, dma_bytes, dma_length, m68k_get_reg(M68K_REG_PC));\r\n+log_cb(RETRO_LOG_ERROR, error_str);\r\n+#endif\r\n+\r\n   /* Check if DMA can be finished within current timeframe */\r\n-  if (dma_length < dma_bytes)\r\n+  extern int fast_dma_hack;\r\n+  if( fast_dma_hack ) {\r\n+    dma_bytes = dma_length;\r\n+\tdma_cycles = (1 * MCYCLES_PER_LINE) / rate;\r\n+  }\r\n+  else if (dma_length < dma_bytes)\r\n   {\r\n     /* Adjust remaining DMA bytes */\r\n     dma_bytes = dma_length;\r\n@@ -740,6 +764,8 @@ void vdp_dma_update(unsigned int cycles)\n     /* Check if DMA is finished */\r\n     if (!dma_length)\r\n     {\r\n+      debug_dma = 0;\r\n+\r\n       /* DMA source address registers are incremented during DMA (even DMA Fill) */\r\n       uint16 end = reg[21] + (reg[22] << 8) + reg[19] + (reg[20] << 8);\r\n       reg[21] = end & 0xff;\r\n@@ -1222,6 +1248,55 @@ unsigned int vdp_68k_ctrl_r(unsigned int cycles)\n {\r\n   unsigned int temp;\r\n \r\n+#if 0\r\n+\tstatic int debug_dump = 0;\r\n+\r\n+\tif( GetAsyncKeyState(VK_OEM_PERIOD) ) {\r\n+\t\tif( debug_dump == 0 ) {\r\n+\t\t\tFILE *fp = fopen(\"vram.bin\",\"wb\");\r\n+\t\t\tint lcv;\r\n+\t\t\tif(fp) {\r\n+\t\t\t\tdebug_dump = 1;\r\n+\t\t\t\tfor( lcv = 0; lcv < 0x10000; lcv += 2 ) {\r\n+\t\t\t\t\tfwrite(vram + lcv + 1, 1, 1, fp);\r\n+\t\t\t\t\tfwrite(vram + lcv + 0, 1, 1, fp);\r\n+\t\t\t\t}\r\n+\t\t\t\tfclose(fp);\r\n+\t\t\t}\r\n+\r\n+\t\t\tfp = fopen(\"ram.bin\",\"wb\");\r\n+\t\t\tif(fp) {\r\n+\t\t\t\tdebug_dump = 1;\r\n+\t\t\t\tfor( lcv = 0; lcv < 0x10000; lcv += 2 ) {\r\n+\t\t\t\t\tfwrite(m68k.memory_map[0xff].base + lcv + 1, 1, 1, fp);\r\n+\t\t\t\t\tfwrite(m68k.memory_map[0xff].base + lcv + 0, 1, 1, fp);\r\n+\t\t\t\t}\r\n+\t\t\t\tfclose(fp);\r\n+\t\t\t}\r\n+\r\n+\t\t\tfp = fopen(\"stm32.bin\",\"wb\");\r\n+\t\t\tif(fp) {\r\n+\t\t\t\tdebug_dump = 1;\r\n+\t\t\t\tfor( lcv = 0; lcv < 0x10000; lcv += 2 ) {\r\n+\t\t\t\t\tfwrite(m68k.memory_map[0x00].base + lcv + 1, 1, 1, fp);\r\n+\t\t\t\t\tfwrite(m68k.memory_map[0x00].base + lcv + 0, 1, 1, fp);\r\n+\t\t\t\t}\r\n+\t\t\t\tfclose(fp);\r\n+\t\t\t}\r\n+\r\n+\t\t\tfp = fopen(\"z80.bin\",\"wb\");\r\n+\t\t\tif(fp) {\r\n+\t\t\t\tdebug_dump = 1;\r\n+\t\t\t\tfwrite(zram, 1, 0x2000, fp);\r\n+\t\t\t\tfclose(fp);\r\n+\t\t\t}\r\n+\t\t}\r\n+\t}\r\n+\telse {\r\n+\t\tdebug_dump = 0;\r\n+\t}\r\n+#endif\r\n+\r\n   /* Cycle-accurate VDP status read (adjust CPU time with current instruction execution time) */\r\n   cycles += m68k_cycles();\r\n \r\n@@ -1288,6 +1363,13 @@ unsigned int vdp_68k_ctrl_r(unsigned int cycles)\n #ifdef LOGVDP\r\n   error(\"[%d(%d)][%d(%d)] VDP 68k status read -> 0x%x (0x%x) (%x)\\n\", v_counter, (v_counter + cycles/MCYCLES_PER_LINE)%lines_per_frame, cycles + mcycles_vdp, cycles%MCYCLES_PER_LINE, temp, status, m68k_get_reg(M68K_REG_PC));\r\n #endif\r\n+\r\n+#ifdef VDP_DEBUG\r\n+\tstatic char error_str[512];\r\n+\tsprintf(error_str, \"[%d(%d)][%d(%d)] VDP 68k status read -> 0x%x (0x%x) (%x)\\n\", v_counter, (v_counter + cycles/MCYCLES_PER_LINE)%lines_per_frame, cycles + mcycles_vdp, cycles%MCYCLES_PER_LINE, temp, status, m68k_get_reg(M68K_REG_PC));\r\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\r\n+#endif\r\n+\r\n   return (temp);\r\n }\r\n \r\n@@ -1398,6 +1480,7 @@ unsigned int vdp_z80_ctrl_r(unsigned int cycles)\n #ifdef LOGVDP\r\n   error(\"[%d(%d)][%d(%d)] VDP Z80 status read -> 0x%x (0x%x) (%x)\\n\", v_counter, (v_counter + (cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, cycles, cycles%MCYCLES_PER_LINE, temp, status, Z80.pc.w.l);\r\n #endif\r\n+\r\n   return (temp);\r\n }\r\n \r\n@@ -1537,6 +1620,12 @@ static void vdp_reg_w(unsigned int r, unsigned int d, unsigned int cycles)\n   error(\"[%d(%d)][%d(%d)] VDP register %d write -> 0x%x (%x)\\n\", v_counter, (v_counter + (cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, cycles, cycles%MCYCLES_PER_LINE, r, d, m68k_get_reg(M68K_REG_PC));\r\n #endif\r\n \r\n+#ifdef DEBUG_VDP\r\n+\tstatic char error_str[512];\r\n+\tsprintf(error_str, \"[%d(%d)][%d(%d)] VDP register %d write -> 0x%x (%x)\\n\", v_counter, (v_counter + (cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, cycles, cycles%MCYCLES_PER_LINE, r, d, m68k_get_reg(M68K_REG_PC));\r\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\r\n+#endif\r\n+\r\n   /* VDP registers #11 to #23 cannot be updated in Mode 4 (Captain Planet & Avengers, Bass Master Classic Pro Edition) */\r\n   if (!(reg[1] & 4) && (r > 10))\r\n   {\r\n@@ -2160,6 +2249,35 @@ static void vdp_bus_w(unsigned int data)\n   /* increment FIFO write pointer */\r\n   fifo_idx = (fifo_idx + 1) & 3;\r\n \r\n+\r\n+\tif( debug_dma == 1 ) {\r\n+\t\tint test = ((reg[23] & 0x7f) << 16) + reg[21] + (reg[22] << 8);\r\n+\t\ttest *= 2;\r\n+\r\n+\t\tdebug_dma_once = 1;\r\n+\t\tdebug_dma = 2;\r\n+\r\n+#ifdef DEBUG_DMA\r\n+\t\tsprintf(error_str, \"[%d] DMA %02X:%04X ==>\", v_counter, (test>>16) & 0xff, test & 0xffff);\r\n+\r\n+\t\tif( code & 0x04 ) {\r\n+\t\t\tsprintf(error_str, \"%s VSRAM\", error_str);\r\n+\t\t}\r\n+\t\telse if( code & 0x02 ) {\r\n+\t\t\tsprintf(error_str, \"%s CRAM\", error_str);\r\n+\t\t}\r\n+\t\telse {\r\n+\t\t\tsprintf(error_str, \"%s VRAM\", error_str);\r\n+\t\t}\r\n+\r\n+\t\tsprintf(error_str, \"%s %04X @ %04X len\\n\", error_str, addr, (reg[19] + (reg[20] << 8)) * 2);\r\n+\t\tlog_cb(RETRO_LOG_ERROR, error_str);\r\n+#endif\r\n+\r\n+\t\t//if(addr == 0xc800) memset(vram + 0xc000, 0xAA, 0x400);\r\n+\t}\r\n+\r\n+\r\n   /* Check destination code (CD0-CD3) */\r\n   switch (code & 0x0F)\r\n   {\r\n@@ -2204,6 +2322,19 @@ static void vdp_bus_w(unsigned int data)\n #ifdef LOGVDP\r\n       error(\"[%d(%d)][%d(%d)] VRAM 0x%x write -> 0x%x (%x)\\n\", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, addr, data, m68k_get_reg(M68K_REG_PC));\r\n #endif\r\n+\r\n+#ifdef DEBUG_VDP\r\n+\t\t{\r\n+\t\t\tstatic int once = 0;\r\n+\t\t\tif (data != 0) once = 1;\r\n+\t\t\tif (!debug_dma && debug_dma_once && once) {\r\n+\t\t\t//if (once) {\r\n+\t\t\t\tsprintf(error_str, \"[%d(%d)][%d(%d)] VRAM 0x%x write -> 0x%x (%x)\\n\", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, addr, data, m68k_get_reg(M68K_REG_PC));\r\n+\t\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\r\n+\t\t\t}\r\n+\t\t}\r\n+#endif\r\n+\r\n       break;\r\n     }\r\n \r\n@@ -2253,6 +2384,17 @@ static void vdp_bus_w(unsigned int data)\n #ifdef LOGVDP\r\n       error(\"[%d(%d)][%d(%d)] CRAM 0x%x write -> 0x%x (%x)\\n\", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, addr, data, m68k_get_reg(M68K_REG_PC));\r\n #endif\r\n+\r\n+#ifdef DEBUG_VDP\r\n+\t\t{\r\n+\t\t\tstatic int once = 0;\r\n+\t\t\tif (data != 0) once = 1;\r\n+\t\t\tif (!debug_dma && debug_dma_once && once) {\r\n+\t\t\t\tsprintf(error_str, \"[%d(%d)][%d(%d)] CRAM 0x%x write -> 0x%x (%x)\\n\", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, addr, data, m68k_get_reg(M68K_REG_PC));\r\n+\t\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\r\n+\t\t\t}\r\n+\t\t}\r\n+#endif\r\n       break;\r\n     }\r\n \r\n@@ -2279,6 +2421,17 @@ static void vdp_bus_w(unsigned int data)\n #ifdef LOGVDP\r\n       error(\"[%d(%d)][%d(%d)] VSRAM 0x%x write -> 0x%x (%x)\\n\", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, addr, data, m68k_get_reg(M68K_REG_PC));\r\n #endif\r\n+\r\n+#ifdef DEBUG_VDP\r\n+\t\t{\r\n+\t\t\tstatic int once = 0;\r\n+\t\t\tif (data != 0) once = 1;\r\n+\t\t\tif (!debug_dma && debug_dma_once && once) {\r\n+\t\t\t\tsprintf(error_str, \"[%d(%d)][%d(%d)] VSRAM 0x%x write -> 0x%x (%x)\\n\", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, addr, data, m68k_get_reg(M68K_REG_PC));\r\n+\t\t\t\tlog_cb(RETRO_LOG_ERROR, error_str);\r\n+\t\t\t}\r\n+\t\t}\r\n+#endif\r\n       break;\r\n     }\r\n \r\n@@ -2287,6 +2440,10 @@ static void vdp_bus_w(unsigned int data)\n #ifdef LOGERROR\r\n       error(\"[%d(%d)][%d(%d)] Invalid (%d) 0x%x write -> 0x%x (%x)\\n\", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, code, addr, data, m68k_get_reg(M68K_REG_PC));\r\n #endif\r\n+\r\n+\tsprintf(error_str, \"[%d(%d)][%d(%d)] Invalid (%d) 0x%x write -> 0x%x (%x)\\n\", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, code, addr, data, m68k_get_reg(M68K_REG_PC));\r\n+\tlog_cb(RETRO_LOG_ERROR, error_str);\r\n+\r\n       break;\r\n     }\r\n   }\r\n@@ -3014,6 +3171,8 @@ static void vdp_dma_68k_ext(unsigned int length)\n   /* 68k bus source address */\r\n   uint32 source = (reg[23] << 17) | (dma_src << 1);\r\n \r\n+\tif( debug_dma == 0 ) debug_dma = 1;\r\n+\r\n   do\r\n   {\r\n     /* Read data word from 68k bus */\r\n@@ -3049,6 +3208,8 @@ static void vdp_dma_68k_ram(unsigned int length)\n   /* 68k bus source address */\r\n   uint32 source = (reg[23] << 17) | (dma_src << 1);\r\n \r\n+\tif( debug_dma == 0 ) debug_dma = 1;\r\n+\r\n   do\r\n   {\r\n     /* access Work-RAM by default  */\r\n@@ -3077,6 +3238,8 @@ static void vdp_dma_68k_io(unsigned int length)\n   /* 68k bus source address */\r\n   uint32 source = (reg[23] << 17) | (dma_src << 1);\r\n \r\n+\tif( debug_dma == 0 ) debug_dma = 1;\r\n+\r\n   do\r\n   {\r\n     /* Z80 area */\r\n@@ -3120,6 +3283,8 @@ static void vdp_dma_68k_io(unsigned int length)\n /*  VRAM Copy */\r\n static void vdp_dma_copy(unsigned int length)\r\n {\r\n+\tif( debug_dma == 0 ) debug_dma = 1;\r\n+\r\n   /* CD4 should be set (CD0-CD3 ignored) otherwise VDP locks (hard reset needed) */\r\n   if (code & 0x10)\r\n   {\r\n@@ -3163,6 +3328,8 @@ static void vdp_dma_copy(unsigned int length)\n /* DMA Fill */\r\n static void vdp_dma_fill(unsigned int length)\r\n {\r\n+\tif( debug_dma == 0 ) debug_dma = 1;\r\n+\r\n   /* Check destination code (CD0-CD3) */\r\n   switch (code & 0x0F)\r\n   {\r\ndiff --git a/core/vdp_render.c b/core/vdp_render.c\nindex d3c913006..abf87d6ca 100644\n--- a/core/vdp_render.c\n+++ b/core/vdp_render.c\n@@ -968,6 +968,81 @@ INLINE void merge(uint8 *srca, uint8 *srcb, uint8 *dst, uint8 *table, int width)\n /* Pixel color lookup tables initialization                                 */\r\n /*--------------------------------------------------------------------------*/\r\n \r\n+void palette_libretro_init(int type)\r\n+{\r\n+  int r, g, b, i;\r\n+\r\n+  /* Initialize Mode 5 pixel color look-up tables */\r\n+  for (i = 0; i < 0x200; i++)\r\n+  {\r\n+    /* CRAM 9-bit value (BBBGGGRRR) */\r\n+    r = (i >> 0) & 7;\r\n+    g = (i >> 3) & 7;\r\n+    b = (i >> 6) & 7;\r\n+\r\n+    /* Convert to output pixel format */\r\n+\tif (type == 0)\r\n+\t{\r\n+\t\tstatic int linear_lut[15] = { 0, 18, 36, 55, 73, 91, 109, 128, 146, 164, 182, 200, 219, 237, 255 };\r\n+\r\n+\t\tpixel_lut[0][i] = (0xff << 24) | (linear_lut[r+0] << 16) | (linear_lut[g+0] << 8) | (linear_lut[b+0] << 0);\r\n+\t\tpixel_lut[1][i] = (0xff << 24) | (linear_lut[r*2] << 16) | (linear_lut[g*2] << 8) | (linear_lut[b*2] << 0);\r\n+\t\tpixel_lut[2][i] = (0xff << 24) | (linear_lut[r+7] << 16) | (linear_lut[g+7] << 8) | (linear_lut[b+7] << 0);\r\n+\t}\r\n+\telse if (type == 1)\r\n+\t{\r\n+\t\tstatic int hardware_lut[15] = { 0, 27, 49, 71, 87, 103, 119, 130, 146, 157, 174, 190, 206, 228, 255 };  /* non-linear dac ramp */\r\n+\r\n+\t\tpixel_lut[0][i] = (0xff << 24) | (hardware_lut[r+0] << 16) | (hardware_lut[g+0] << 8) | (hardware_lut[b+0] << 0);\r\n+\t\tpixel_lut[1][i] = (0xff << 24) | (hardware_lut[r*2] << 16) | (hardware_lut[g*2] << 8) | (hardware_lut[b*2] << 0);\r\n+\t\tpixel_lut[2][i] = (0xff << 24) | (hardware_lut[r+7] << 16) | (hardware_lut[g+7] << 8) | (hardware_lut[b+7] << 0);\r\n+\t}\r\n+\telse if (type == 2)\r\n+\t{\r\n+\t\tstatic int sgb_lut[15] = { 0, 9, 27, 42, 58, 76, 94, 114, 133, 153, 173, 192, 211, 229, 255 };\r\n+\t\tstatic int hardware_lut[15] = { 0, 27, 49, 71, 87, 103, 119, 130, 146, 157, 174, 190, 206, 228, 255 };\r\n+\r\n+\t\tstatic int sgb_hardware[15];\r\n+\t\tfor(int lcv = 0; lcv < 15; lcv++) {\r\n+#if 1\r\n+\t\t\tsgb_hardware[lcv] = (sgb_lut[lcv] + hardware_lut[lcv]) / 2;\r\n+#else\r\n+\t\t\tsgb_hardware[lcv] = sgb_lut[lcv];\r\n+#endif\r\n+\t\t}\r\n+\r\n+\t\tpixel_lut[0][i] = (0xff << 24) | (sgb_hardware[r+0] << 16) | (sgb_hardware[g+0] << 8) | (sgb_hardware[b+0] << 0);\r\n+\t\tpixel_lut[1][i] = (0xff << 24) | (sgb_hardware[r*2] << 16) | (sgb_hardware[g*2] << 8) | (sgb_hardware[b*2] << 0);\r\n+\t\tpixel_lut[2][i] = (0xff << 24) | (sgb_hardware[r+7] << 16) | (sgb_hardware[g+7] << 8) | (sgb_hardware[b+7] << 0);\r\n+\t}\r\n+  }\r\n+\r\n+\r\n+  /* Mega Drive VDP only */\r\n+  if (system_hw & SYSTEM_MD)\r\n+  {\r\n+\t/* Reset color palette */\r\n+\tif (reg[1] & 0x04)\r\n+    {\r\n+\t\t/* Mode 5 */\r\n+\t\t/* color_update_m5(0x00, *(uint16 *)&cram[border << 1]); */\r\n+\t\tfor (i = 1; i < 0x40; i++)\r\n+\t\t{\r\n+\t\t\tcolor_update_m5(i, *(uint16 *)&cram[i << 1]);\r\n+\t\t}\r\n+\t}\r\n+\telse\r\n+\t{\r\n+\t\t/* Mode 4 */\r\n+\t\tfor (i = 0; i < 0x20; i++)\r\n+\t\t{\r\n+\t\t\tcolor_update_m4(i, *(uint16 *)&cram[i << 1]);\r\n+\t\t}\r\n+\t\t/* color_update_m4(0x40, *(uint16 *)&cram[(0x10 | (border & 0x0F)) << 1]); */\r\n+\t}\r\n+  }\r\n+}\r\n+\r\n static void palette_init(void)\r\n {\r\n   int r, g, b, i;\r\ndiff --git a/core/z80/z80.c b/core/z80/z80.c\nindex 74d5053c6..9fa286da0 100644\n--- a/core/z80/z80.c\n+++ b/core/z80/z80.c\n@@ -3428,6 +3428,16 @@ void z80_run(unsigned int cycles)\n       if (Z80.cycles >= cycles) return;\r\n     }\r\n \r\n+\r\n+//if(PC == 0x28C)\r\n+\tif(0)\r\n+\t{\r\n+\t\tstatic FILE *fp = 0;\r\n+\t\tif(!fp) fp = fopen(\"trace-z80.txt\", \"w\");\r\n+\t\tfprintf(fp, \"%X %X - %X %X %X %X\\n\", PC, zbank, A, BC, DE, HL);\r\n+\t}\r\n+\r\n+\r\n     Z80.after_ei = FALSE;\r\n     R++;\r\n     EXEC_INLINE(op,ROP());\r\ndiff --git a/libretro/Makefile.common b/libretro/Makefile.common\nindex 02f4fb65e..ac77aca98 100644\n--- a/libretro/Makefile.common\n+++ b/libretro/Makefile.common\n@@ -25,8 +25,7 @@ ifeq ($(HAVE_CHD), 1)\n    INCFLAGS += \\\n                -I$(LIBRETRO_DEPS_DIR)/libchdr/include \\\n                -I$(LIBRETRO_DEPS_DIR)/lzma-19.00/include \\\n-               -I$(LIBRETRO_DEPS_DIR)/zlib-1.2.11 \\\n-               -I$(LIBRETRO_DEPS_DIR)/zstd/lib\n+               -I$(LIBRETRO_DEPS_DIR)/zlib-1.2.11\n    SOURCES_C += \\\n                 $(LIBRETRO_DEPS_DIR)/lzma-19.00/src/Alloc.c \\\n                 $(LIBRETRO_DEPS_DIR)/lzma-19.00/src/Bra86.c \\\n@@ -42,16 +41,7 @@ ifeq ($(HAVE_CHD), 1)\n                 $(LIBRETRO_DEPS_DIR)/libchdr/src/libchdr_cdrom.c \\\n                 $(LIBRETRO_DEPS_DIR)/libchdr/src/libchdr_chd.c \\\n                 $(LIBRETRO_DEPS_DIR)/libchdr/src/libchdr_flac.c \\\n-                $(LIBRETRO_DEPS_DIR)/libchdr/src/libchdr_huffman.c \\\n-                $(LIBRETRO_DEPS_DIR)/zstd/lib/common/entropy_common.c \\\n-                $(LIBRETRO_DEPS_DIR)/zstd/lib/common/error_private.c \\\n-                $(LIBRETRO_DEPS_DIR)/zstd/lib/common/fse_decompress.c \\\n-                $(LIBRETRO_DEPS_DIR)/zstd/lib/common/zstd_common.c \\\n-                $(LIBRETRO_DEPS_DIR)/zstd/lib/common/xxhash.c \\\n-                $(LIBRETRO_DEPS_DIR)/zstd/lib/decompress/huf_decompress.c \\\n-                $(LIBRETRO_DEPS_DIR)/zstd/lib/decompress/zstd_ddict.c \\\n-                $(LIBRETRO_DEPS_DIR)/zstd/lib/decompress/zstd_decompress.c \\\n-                $(LIBRETRO_DEPS_DIR)/zstd/lib/decompress/zstd_decompress_block.c\n+                $(LIBRETRO_DEPS_DIR)/libchdr/src/libchdr_huffman.c\n endif\n \n SOURCES_C += $(foreach dir,$(GENPLUS_SRC_DIR),$(wildcard $(dir)/*.c))\ndiff --git a/libretro/debian/rules b/libretro/debian/rules\nold mode 100755\nnew mode 100644\ndiff --git a/libretro/deps/libchdr/include/dr_libs/dr_flac.h b/libretro/deps/libchdr/include/dr_libs/dr_flac.h\nindex 14324cf37..c38e5b250 100644\n--- a/libretro/deps/libchdr/include/dr_libs/dr_flac.h\n+++ b/libretro/deps/libchdr/include/dr_libs/dr_flac.h\n@@ -1,6 +1,6 @@\n /*\n FLAC audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file.\n-dr_flac - v0.12.42 - 2023-11-02\n+dr_flac - v0.12.28 - 2021-02-21\n \n David Reid - mackron@gmail.com\n \n@@ -210,9 +210,6 @@ Build Options\n #define DR_FLAC_NO_SIMD\n   Disables SIMD optimizations (SSE on x86/x64 architectures, NEON on ARM architectures). Use this if you are having compatibility issues with your compiler.\n \n-#define DR_FLAC_NO_WCHAR\n-  Disables all functions ending with `_w`. Use this if your compiler does not provide wchar.h. Not required if DR_FLAC_NO_STDIO is also defined.\n-\n \n \n Notes\n@@ -235,19 +232,19 @@ extern \"C\" {\n \n #define DRFLAC_VERSION_MAJOR     0\n #define DRFLAC_VERSION_MINOR     12\n-#define DRFLAC_VERSION_REVISION  42\n+#define DRFLAC_VERSION_REVISION  28\n #define DRFLAC_VERSION_STRING    DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MAJOR) \".\" DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MINOR) \".\" DRFLAC_XSTRINGIFY(DRFLAC_VERSION_REVISION)\n \n #include <stddef.h> /* For size_t. */\n \n-/* Sized Types */\n+/* Sized types. */\n typedef   signed char           drflac_int8;\n typedef unsigned char           drflac_uint8;\n typedef   signed short          drflac_int16;\n typedef unsigned short          drflac_uint16;\n typedef   signed int            drflac_int32;\n typedef unsigned int            drflac_uint32;\n-#if defined(_MSC_VER) && !defined(__clang__)\n+#if defined(_MSC_VER)\n     typedef   signed __int64    drflac_int64;\n     typedef unsigned __int64    drflac_uint64;\n #else\n@@ -264,7 +261,7 @@ typedef unsigned int            drflac_uint32;\n         #pragma GCC diagnostic pop\n     #endif\n #endif\n-#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined(_M_IA64) || defined(__aarch64__) || defined(_M_ARM64) || defined(__powerpc64__)\n+#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)\n     typedef drflac_uint64       drflac_uintptr;\n #else\n     typedef drflac_uint32       drflac_uintptr;\n@@ -273,9 +270,7 @@ typedef drflac_uint8            drflac_bool8;\n typedef drflac_uint32           drflac_bool32;\n #define DRFLAC_TRUE             1\n #define DRFLAC_FALSE            0\n-/* End Sized Types */\n \n-/* Decorations */\n #if !defined(DRFLAC_API)\n     #if defined(DRFLAC_DLL)\n         #if defined(_WIN32)\n@@ -305,7 +300,6 @@ typedef drflac_uint32           drflac_bool32;\n         #define DRFLAC_PRIVATE static\n     #endif\n #endif\n-/* End Decorations */\n \n #if defined(_MSC_VER) && _MSC_VER >= 1700   /* Visual Studio 2012 */\n     #define DRFLAC_DEPRECATED       __declspec(deprecated)\n@@ -324,16 +318,6 @@ typedef drflac_uint32           drflac_bool32;\n DRFLAC_API void drflac_version(drflac_uint32* pMajor, drflac_uint32* pMinor, drflac_uint32* pRevision);\n DRFLAC_API const char* drflac_version_string(void);\n \n-/* Allocation Callbacks */\n-typedef struct\n-{\n-    void* pUserData;\n-    void* (* onMalloc)(size_t sz, void* pUserData);\n-    void* (* onRealloc)(void* p, size_t sz, void* pUserData);\n-    void  (* onFree)(void* p, void* pUserData);\n-} drflac_allocation_callbacks;\n-/* End Allocation Callbacks */\n-\n /*\n As data is read from the client it is placed into an internal buffer for fast access. This controls the size of that buffer. Larger values means more speed,\n but also more memory. In my testing there is diminishing returns after about 4KB, but you can fiddle with this to suit your own needs. Must be a multiple of 8.\n@@ -342,22 +326,11 @@ but also more memory. In my testing there is diminishing returns after about 4KB\n #define DR_FLAC_BUFFER_SIZE   4096\n #endif\n \n-\n-/* Architecture Detection */\n+/* Check if we can enable 64-bit optimizations. */\n #if defined(_WIN64) || defined(_LP64) || defined(__LP64__)\n #define DRFLAC_64BIT\n #endif\n \n-#if defined(__x86_64__) || defined(_M_X64)\n-    #define DRFLAC_X64\n-#elif defined(__i386) || defined(_M_IX86)\n-    #define DRFLAC_X86\n-#elif defined(__arm__) || defined(_M_ARM) || defined(__arm64) || defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64)\n-    #define DRFLAC_ARM\n-#endif\n-/* End Architecture Detection */\n-\n-\n #ifdef DRFLAC_64BIT\n typedef drflac_uint64 drflac_cache_t;\n #else\n@@ -410,13 +383,15 @@ typedef enum\n     drflac_seek_origin_current\n } drflac_seek_origin;\n \n-/* The order of members in this structure is important because we map this directly to the raw data within the SEEKTABLE metadata block. */\n+/* Packing is important on this structure because we map this directly to the raw data within the SEEKTABLE metadata block. */\n+#pragma pack(2)\n typedef struct\n {\n     drflac_uint64 firstPCMFrame;\n     drflac_uint64 flacFrameOffset;   /* The offset from the first byte of the header of the first frame. */\n     drflac_uint16 pcmFrameCount;\n } drflac_seekpoint;\n+#pragma pack()\n \n typedef struct\n {\n@@ -586,6 +561,14 @@ will be set to one of the DRFLAC_METADATA_BLOCK_TYPE_* tokens.\n typedef void (* drflac_meta_proc)(void* pUserData, drflac_metadata* pMetadata);\n \n \n+typedef struct\n+{\n+    void* pUserData;\n+    void* (* onMalloc)(size_t sz, void* pUserData);\n+    void* (* onRealloc)(void* p, size_t sz, void* pUserData);\n+    void  (* onFree)(void* p, void* pUserData);\n+} drflac_allocation_callbacks;\n+\n /* Structure for internal use. Only used for decoders opened with drflac_open_memory. */\n typedef struct\n {\n@@ -1072,84 +1055,6 @@ Return Value\n */\n DRFLAC_API drflac_bool32 drflac_seek_to_pcm_frame(drflac* pFlac, drflac_uint64 pcmFrameIndex);\n \n-\n-\n-#ifndef DR_FLAC_NO_STDIO\n-/*\n-Opens a FLAC decoder from the file at the given path.\n-\n-\n-Parameters\n-----------\n-pFileName (in)\n-    The path of the file to open, either absolute or relative to the current directory.\n-\n-pAllocationCallbacks (in, optional)\n-    A pointer to application defined callbacks for managing memory allocations.\n-\n-\n-Return Value\n-------------\n-A pointer to an object representing the decoder.\n-\n-\n-Remarks\n--------\n-Close the decoder with drflac_close().\n-\n-\n-Remarks\n--------\n-This will hold a handle to the file until the decoder is closed with drflac_close(). Some platforms will restrict the number of files a process can have open\n-at any given time, so keep this mind if you have many decoders open at the same time.\n-\n-\n-See Also\n---------\n-drflac_open_file_with_metadata()\n-drflac_open()\n-drflac_close()\n-*/\n-DRFLAC_API drflac* drflac_open_file(const char* pFileName, const drflac_allocation_callbacks* pAllocationCallbacks);\n-DRFLAC_API drflac* drflac_open_file_w(const wchar_t* pFileName, const drflac_allocation_callbacks* pAllocationCallbacks);\n-\n-/*\n-Opens a FLAC decoder from the file at the given path and notifies the caller of the metadata chunks (album art, etc.)\n-\n-\n-Parameters\n-----------\n-pFileName (in)\n-    The path of the file to open, either absolute or relative to the current directory.\n-\n-pAllocationCallbacks (in, optional)\n-    A pointer to application defined callbacks for managing memory allocations.\n-\n-onMeta (in)\n-    The callback to fire for each metadata block.\n-\n-pUserData (in)\n-    A pointer to the user data to pass to the metadata callback.\n-\n-pAllocationCallbacks (in)\n-    A pointer to application defined callbacks for managing memory allocations.\n-\n-\n-Remarks\n--------\n-Look at the documentation for drflac_open_with_metadata() for more information on how metadata is handled.\n-\n-\n-See Also\n---------\n-drflac_open_with_metadata()\n-drflac_open()\n-drflac_close()\n-*/\n-DRFLAC_API drflac* drflac_open_file_with_metadata(const char* pFileName, drflac_meta_proc onMeta, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks);\n-DRFLAC_API drflac* drflac_open_file_with_metadata_w(const wchar_t* pFileName, drflac_meta_proc onMeta, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks);\n-#endif\n-\n /*\n Opens a FLAC decoder from a pre-allocated block of memory\n \n@@ -1242,17 +1147,6 @@ DRFLAC_API drflac_int16* drflac_open_and_read_pcm_frames_s16(drflac_read_proc on\n /* Same as drflac_open_and_read_pcm_frames_s32(), except returns 32-bit floating-point samples. */\n DRFLAC_API float* drflac_open_and_read_pcm_frames_f32(drflac_read_proc onRead, drflac_seek_proc onSeek, void* pUserData, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks);\n \n-#ifndef DR_FLAC_NO_STDIO\n-/* Same as drflac_open_and_read_pcm_frames_s32() except opens the decoder from a file. */\n-DRFLAC_API drflac_int32* drflac_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks);\n-\n-/* Same as drflac_open_file_and_read_pcm_frames_s32(), except returns signed 16-bit integer samples. */\n-DRFLAC_API drflac_int16* drflac_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks);\n-\n-/* Same as drflac_open_file_and_read_pcm_frames_s32(), except returns 32-bit floating-point samples. */\n-DRFLAC_API float* drflac_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks);\n-#endif\n-\n /* Same as drflac_open_and_read_pcm_frames_s32() except opens the decoder from a block of memory. */\n DRFLAC_API drflac_int32* drflac_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks);\n \n@@ -1297,13 +1191,15 @@ typedef struct\n     const char* pRunningData;\n } drflac_cuesheet_track_iterator;\n \n-/* The order of members here is important because we map this directly to the raw data within the CUESHEET metadata block. */\n+/* Packing is important on this structure because we map this directly to the raw data within the CUESHEET metadata block. */\n+#pragma pack(4)\n typedef struct\n {\n     drflac_uint64 offset;\n     drflac_uint8 index;\n     drflac_uint8 reserved[3];\n } drflac_cuesheet_track_index;\n+#pragma pack()\n \n typedef struct\n {\n@@ -1367,7 +1263,6 @@ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterat\n #include <stdlib.h>\n #include <string.h>\n \n-/* Inline */\n #ifdef _MSC_VER\n     #define DRFLAC_INLINE __forceinline\n #elif defined(__GNUC__)\n@@ -1379,22 +1274,24 @@ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterat\n     I am using \"__inline__\" only when we're compiling in strict ANSI mode.\n     */\n     #if defined(__STRICT_ANSI__)\n-        #define DRFLAC_GNUC_INLINE_HINT __inline__\n-    #else\n-        #define DRFLAC_GNUC_INLINE_HINT inline\n-    #endif\n-\n-    #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) || defined(__clang__)\n-        #define DRFLAC_INLINE DRFLAC_GNUC_INLINE_HINT __attribute__((always_inline))\n+        #define DRFLAC_INLINE __inline__ __attribute__((always_inline))\n     #else\n-        #define DRFLAC_INLINE DRFLAC_GNUC_INLINE_HINT\n+        #define DRFLAC_INLINE inline __attribute__((always_inline))\n     #endif\n #elif defined(__WATCOMC__)\n     #define DRFLAC_INLINE __inline\n #else\n     #define DRFLAC_INLINE\n #endif\n-/* End Inline */\n+\n+/* CPU architecture. */\n+#if defined(__x86_64__) || defined(_M_X64)\n+    #define DRFLAC_X64\n+#elif defined(__i386) || defined(_M_IX86)\n+    #define DRFLAC_X86\n+#elif defined(__arm__) || defined(_M_ARM) || defined(_M_ARM64)\n+    #define DRFLAC_ARM\n+#endif\n \n /*\n Intrinsics Support\n@@ -1445,6 +1342,16 @@ Unfortuantely dr_flac depends on this for a few things so we're just going to di\n     #if defined(DRFLAC_ARM)\n         #if !defined(DRFLAC_NO_NEON) && (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64))\n             #define DRFLAC_SUPPORT_NEON\n+        #endif\n+\n+        /* Fall back to looking for the #include file. */\n+        #if !defined(__GNUC__) && !defined(__clang__) && defined(__has_include)\n+            #if !defined(DRFLAC_SUPPORT_NEON) && !defined(DRFLAC_NO_NEON) && __has_include(<arm_neon.h>)\n+                #define DRFLAC_SUPPORT_NEON\n+            #endif\n+        #endif\n+\n+        #if defined(DRFLAC_SUPPORT_NEON)\n             #include <arm_neon.h>\n         #endif\n     #endif\n@@ -1523,7 +1430,9 @@ static DRFLAC_INLINE drflac_bool32 drflac_has_sse41(void)\n {\n #if defined(DRFLAC_SUPPORT_SSE41)\n     #if (defined(DRFLAC_X64) || defined(DRFLAC_X86)) && !defined(DRFLAC_NO_SSE41)\n-        #if defined(__SSE4_1__) || defined(__AVX__)\n+        #if defined(DRFLAC_X64)\n+            return DRFLAC_TRUE;    /* 64-bit targets always support SSE4.1. */\n+        #elif (defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE4_1__)\n             return DRFLAC_TRUE;    /* If the compiler is allowed to freely generate SSE41 code we can assume support. */\n         #else\n             #if defined(DRFLAC_NO_CPUID)\n@@ -1579,30 +1488,6 @@ static DRFLAC_INLINE drflac_bool32 drflac_has_sse41(void)\n     #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))\n         #define DRFLAC_HAS_BYTESWAP16_INTRINSIC\n     #endif\n-#elif defined(__WATCOMC__) && defined(__386__)\n-    #define DRFLAC_HAS_BYTESWAP16_INTRINSIC\n-    #define DRFLAC_HAS_BYTESWAP32_INTRINSIC\n-    #define DRFLAC_HAS_BYTESWAP64_INTRINSIC\n-    extern __inline drflac_uint16 _watcom_bswap16(drflac_uint16);\n-    extern __inline drflac_uint32 _watcom_bswap32(drflac_uint32);\n-    extern __inline drflac_uint64 _watcom_bswap64(drflac_uint64);\n-#pragma aux _watcom_bswap16 = \\\n-    \"xchg al, ah\" \\\n-    parm  [ax]    \\\n-    value [ax]    \\\n-    modify nomemory;\n-#pragma aux _watcom_bswap32 = \\\n-    \"bswap eax\" \\\n-    parm  [eax] \\\n-    value [eax] \\\n-    modify nomemory;\n-#pragma aux _watcom_bswap64 = \\\n-    \"bswap eax\"     \\\n-    \"bswap edx\"     \\\n-    \"xchg eax,edx\"  \\\n-    parm [eax edx]  \\\n-    value [eax edx] \\\n-    modify nomemory;\n #endif\n \n \n@@ -1632,7 +1517,6 @@ static DRFLAC_INLINE drflac_bool32 drflac_has_sse41(void)\n \n #define DRFLAC_MAX_SIMD_VECTOR_SIZE                     64  /* 64 for AVX-512 in the future. */\n \n-/* Result Codes */\n typedef drflac_int32 drflac_result;\n #define DRFLAC_SUCCESS                                   0\n #define DRFLAC_ERROR                                    -1   /* A generic error. */\n@@ -1688,10 +1572,7 @@ typedef drflac_int32 drflac_result;\n #define DRFLAC_CANCELLED                                -51\n #define DRFLAC_MEMORY_ALREADY_MAPPED                    -52\n #define DRFLAC_AT_END                                   -53\n-\n-#define DRFLAC_CRC_MISMATCH                             -100\n-/* End Result Codes */\n-\n+#define DRFLAC_CRC_MISMATCH                             -128\n \n #define DRFLAC_SUBFRAME_CONSTANT                        0\n #define DRFLAC_SUBFRAME_VERBATIM                        1\n@@ -1707,10 +1588,6 @@ typedef drflac_int32 drflac_result;\n #define DRFLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE            9\n #define DRFLAC_CHANNEL_ASSIGNMENT_MID_SIDE              10\n \n-#define DRFLAC_SEEKPOINT_SIZE_IN_BYTES                  18\n-#define DRFLAC_CUESHEET_TRACK_SIZE_IN_BYTES             36\n-#define DRFLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES       12\n-\n #define drflac_align(x, a)                              ((((x) + (a) - 1) / (a)) * (a))\n \n \n@@ -1834,8 +1711,6 @@ static DRFLAC_INLINE drflac_uint16 drflac__swap_endian_uint16(drflac_uint16 n)\n         return _byteswap_ushort(n);\n     #elif defined(__GNUC__) || defined(__clang__)\n         return __builtin_bswap16(n);\n-    #elif defined(__WATCOMC__) && defined(__386__)\n-        return _watcom_bswap16(n);\n     #else\n         #error \"This compiler does not support the byte swap intrinsic.\"\n     #endif\n@@ -1851,7 +1726,7 @@ static DRFLAC_INLINE drflac_uint32 drflac__swap_endian_uint32(drflac_uint32 n)\n     #if defined(_MSC_VER) && !defined(__clang__)\n         return _byteswap_ulong(n);\n     #elif defined(__GNUC__) || defined(__clang__)\n-        #if defined(DRFLAC_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 6) && !defined(__ARM_ARCH_6M__) && !defined(DRFLAC_64BIT)   /* <-- 64-bit inline assembly has not been tested, so disabling for now. */\n+        #if defined(DRFLAC_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 6) && !defined(DRFLAC_64BIT)   /* <-- 64-bit inline assembly has not been tested, so disabling for now. */\n             /* Inline assembly optimized implementation for ARM. In my testing, GCC does not generate optimized code with __builtin_bswap32(). */\n             drflac_uint32 r;\n             __asm__ __volatile__ (\n@@ -1865,8 +1740,6 @@ static DRFLAC_INLINE drflac_uint32 drflac__swap_endian_uint32(drflac_uint32 n)\n         #else\n             return __builtin_bswap32(n);\n         #endif\n-    #elif defined(__WATCOMC__) && defined(__386__)\n-        return _watcom_bswap32(n);\n     #else\n         #error \"This compiler does not support the byte swap intrinsic.\"\n     #endif\n@@ -1885,8 +1758,6 @@ static DRFLAC_INLINE drflac_uint64 drflac__swap_endian_uint64(drflac_uint64 n)\n         return _byteswap_uint64(n);\n     #elif defined(__GNUC__) || defined(__clang__)\n         return __builtin_bswap64(n);\n-    #elif defined(__WATCOMC__) && defined(__386__)\n-        return _watcom_bswap64(n);\n     #else\n         #error \"This compiler does not support the byte swap intrinsic.\"\n     #endif\n@@ -1922,12 +1793,6 @@ static DRFLAC_INLINE drflac_uint32 drflac__be2host_32(drflac_uint32 n)\n     return n;\n }\n \n-static DRFLAC_INLINE drflac_uint32 drflac__be2host_32_ptr_unaligned(const void* pData)\n-{\n-    const drflac_uint8* pNum = (drflac_uint8*)pData;\n-    return *(pNum) << 24 | *(pNum+1) << 16 | *(pNum+2) << 8 | *(pNum+3);\n-}\n-\n static DRFLAC_INLINE drflac_uint64 drflac__be2host_64(drflac_uint64 n)\n {\n     if (drflac__is_little_endian()) {\n@@ -1947,12 +1812,6 @@ static DRFLAC_INLINE drflac_uint32 drflac__le2host_32(drflac_uint32 n)\n     return n;\n }\n \n-static DRFLAC_INLINE drflac_uint32 drflac__le2host_32_ptr_unaligned(const void* pData)\n-{\n-    const drflac_uint8* pNum = (drflac_uint8*)pData;\n-    return *pNum | *(pNum+1) << 8 |  *(pNum+2) << 16 | *(pNum+3) << 24;\n-}\n-\n \n static DRFLAC_INLINE drflac_uint32 drflac__unsynchsafe_32(drflac_uint32 n)\n {\n@@ -2034,19 +1893,6 @@ static DRFLAC_INLINE drflac_uint8 drflac_crc8(drflac_uint8 crc, drflac_uint32 da\n     (void)data;\n     (void)count;\n     return 0;\n-#else\n-#if 0\n-    /* REFERENCE (use of this implementation requires an explicit flush by doing \"drflac_crc8(crc, 0, 8);\") */\n-    drflac_uint8 p = 0x07;\n-    for (int i = count-1; i >= 0; --i) {\n-        drflac_uint8 bit = (data & (1 << i)) >> i;\n-        if (crc & 0x80) {\n-            crc = ((crc << 1) | bit) ^ p;\n-        } else {\n-            crc = ((crc << 1) | bit);\n-        }\n-    }\n-    return crc;\n #else\n     drflac_uint32 wholeBytes;\n     drflac_uint32 leftoverBits;\n@@ -2071,7 +1917,6 @@ static DRFLAC_INLINE drflac_uint8 drflac_crc8(drflac_uint8 crc, drflac_uint32 da\n     }\n     return crc;\n #endif\n-#endif\n }\n \n static DRFLAC_INLINE drflac_uint16 drflac_crc16_byte(drflac_uint16 crc, drflac_uint8 data)\n@@ -2114,106 +1959,6 @@ static DRFLAC_INLINE drflac_uint16 drflac_crc16_bytes(drflac_uint16 crc, drflac_\n     return crc;\n }\n \n-#if 0\n-static DRFLAC_INLINE drflac_uint16 drflac_crc16__32bit(drflac_uint16 crc, drflac_uint32 data, drflac_uint32 count)\n-{\n-#ifdef DR_FLAC_NO_CRC\n-    (void)crc;\n-    (void)data;\n-    (void)count;\n-    return 0;\n-#else\n-#if 0\n-    /* REFERENCE (use of this implementation requires an explicit flush by doing \"drflac_crc16(crc, 0, 16);\") */\n-    drflac_uint16 p = 0x8005;\n-    for (int i = count-1; i >= 0; --i) {\n-        drflac_uint16 bit = (data & (1ULL << i)) >> i;\n-        if (r & 0x8000) {\n-            r = ((r << 1) | bit) ^ p;\n-        } else {\n-            r = ((r << 1) | bit);\n-        }\n-    }\n-\n-    return crc;\n-#else\n-    drflac_uint32 wholeBytes;\n-    drflac_uint32 leftoverBits;\n-    drflac_uint64 leftoverDataMask;\n-\n-    static drflac_uint64 leftoverDataMaskTable[8] = {\n-        0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F\n-    };\n-\n-    DRFLAC_ASSERT(count <= 64);\n-\n-    wholeBytes = count >> 3;\n-    leftoverBits = count & 7;\n-    leftoverDataMask = leftoverDataMaskTable[leftoverBits];\n-\n-    switch (wholeBytes) {\n-        default:\n-        case 4: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (0xFF000000UL << leftoverBits)) >> (24 + leftoverBits)));\n-        case 3: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (0x00FF0000UL << leftoverBits)) >> (16 + leftoverBits)));\n-        case 2: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (0x0000FF00UL << leftoverBits)) >> ( 8 + leftoverBits)));\n-        case 1: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (0x000000FFUL << leftoverBits)) >> ( 0 + leftoverBits)));\n-        case 0: if (leftoverBits > 0) crc = (crc << leftoverBits) ^ drflac__crc16_table[(crc >> (16 - leftoverBits)) ^ (data & leftoverDataMask)];\n-    }\n-    return crc;\n-#endif\n-#endif\n-}\n-\n-static DRFLAC_INLINE drflac_uint16 drflac_crc16__64bit(drflac_uint16 crc, drflac_uint64 data, drflac_uint32 count)\n-{\n-#ifdef DR_FLAC_NO_CRC\n-    (void)crc;\n-    (void)data;\n-    (void)count;\n-    return 0;\n-#else\n-    drflac_uint32 wholeBytes;\n-    drflac_uint32 leftoverBits;\n-    drflac_uint64 leftoverDataMask;\n-\n-    static drflac_uint64 leftoverDataMaskTable[8] = {\n-        0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F\n-    };\n-\n-    DRFLAC_ASSERT(count <= 64);\n-\n-    wholeBytes = count >> 3;\n-    leftoverBits = count & 7;\n-    leftoverDataMask = leftoverDataMaskTable[leftoverBits];\n-\n-    switch (wholeBytes) {\n-        default:\n-        case 8: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0xFF000000 << 32) << leftoverBits)) >> (56 + leftoverBits)));    /* Weird \"<< 32\" bitshift is required for C89 because it doesn't support 64-bit constants. Should be optimized out by a good compiler. */\n-        case 7: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0x00FF0000 << 32) << leftoverBits)) >> (48 + leftoverBits)));\n-        case 6: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0x0000FF00 << 32) << leftoverBits)) >> (40 + leftoverBits)));\n-        case 5: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0x000000FF << 32) << leftoverBits)) >> (32 + leftoverBits)));\n-        case 4: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0xFF000000      ) << leftoverBits)) >> (24 + leftoverBits)));\n-        case 3: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0x00FF0000      ) << leftoverBits)) >> (16 + leftoverBits)));\n-        case 2: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0x0000FF00      ) << leftoverBits)) >> ( 8 + leftoverBits)));\n-        case 1: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0x000000FF      ) << leftoverBits)) >> ( 0 + leftoverBits)));\n-        case 0: if (leftoverBits > 0) crc = (crc << leftoverBits) ^ drflac__crc16_table[(crc >> (16 - leftoverBits)) ^ (data & leftoverDataMask)];\n-    }\n-    return crc;\n-#endif\n-}\n-\n-\n-static DRFLAC_INLINE drflac_uint16 drflac_crc16(drflac_uint16 crc, drflac_cache_t data, drflac_uint32 count)\n-{\n-#ifdef DRFLAC_64BIT\n-    return drflac_crc16__64bit(crc, data, count);\n-#else\n-    return drflac_crc16__32bit(crc, data, count);\n-#endif\n-}\n-#endif\n-\n-\n #ifdef DRFLAC_64BIT\n #define drflac__be2host__cache_line drflac__be2host_64\n #else\n@@ -2454,10 +2199,6 @@ static DRFLAC_INLINE drflac_bool32 drflac__read_uint32(drflac_bs* bs, unsigned i\n         if (!drflac__reload_cache(bs)) {\n             return DRFLAC_FALSE;\n         }\n-        if (bitCountLo > DRFLAC_CACHE_L1_BITS_REMAINING(bs)) {\n-            /* This happens when we get to end of stream */\n-            return DRFLAC_FALSE;\n-        }\n \n         *pResultOut = (resultHi << bitCountLo) | (drflac_uint32)DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCountLo);\n         bs->consumedBits += bitCountLo;\n@@ -2512,27 +2253,6 @@ static drflac_bool32 drflac__read_uint64(drflac_bs* bs, unsigned int bitCount, d\n }\n #endif\n \n-/* Function below is unused, but leaving it here in case I need to quickly add it again. */\n-#if 0\n-static drflac_bool32 drflac__read_int64(drflac_bs* bs, unsigned int bitCount, drflac_int64* pResultOut)\n-{\n-    drflac_uint64 result;\n-    drflac_uint64 signbit;\n-\n-    DRFLAC_ASSERT(bitCount <= 64);\n-\n-    if (!drflac__read_uint64(bs, bitCount, &result)) {\n-        return DRFLAC_FALSE;\n-    }\n-\n-    signbit = ((result >> (bitCount-1)) & 0x01);\n-    result |= (~signbit + 1) << bitCount;\n-\n-    *pResultOut = (drflac_int64)result;\n-    return DRFLAC_TRUE;\n-}\n-#endif\n-\n static drflac_bool32 drflac__read_uint16(drflac_bs* bs, unsigned int bitCount, drflac_uint16* pResult)\n {\n     drflac_uint32 result;\n@@ -2550,25 +2270,6 @@ static drflac_bool32 drflac__read_uint16(drflac_bs* bs, unsigned int bitCount, d\n     return DRFLAC_TRUE;\n }\n \n-#if 0\n-static drflac_bool32 drflac__read_int16(drflac_bs* bs, unsigned int bitCount, drflac_int16* pResult)\n-{\n-    drflac_int32 result;\n-\n-    DRFLAC_ASSERT(bs != NULL);\n-    DRFLAC_ASSERT(pResult != NULL);\n-    DRFLAC_ASSERT(bitCount > 0);\n-    DRFLAC_ASSERT(bitCount <= 16);\n-\n-    if (!drflac__read_int32(bs, bitCount, &result)) {\n-        return DRFLAC_FALSE;\n-    }\n-\n-    *pResult = (drflac_int16)result;\n-    return DRFLAC_TRUE;\n-}\n-#endif\n-\n static drflac_bool32 drflac__read_uint8(drflac_bs* bs, unsigned int bitCount, drflac_uint8* pResult)\n {\n     drflac_uint32 result;\n@@ -2710,13 +2411,6 @@ static drflac_bool32 drflac__find_and_seek_to_next_sync_code(drflac_bs* bs)\n #if  defined(_MSC_VER) && _MSC_VER >= 1400 && (defined(DRFLAC_X64) || defined(DRFLAC_X86)) && !defined(__clang__)\n #define DRFLAC_IMPLEMENT_CLZ_MSVC\n #endif\n-#if  defined(__WATCOMC__) && defined(__386__)\n-#define DRFLAC_IMPLEMENT_CLZ_WATCOM\n-#endif\n-#ifdef __MRC__\n-#include <intrinsics.h>\n-#define DRFLAC_IMPLEMENT_CLZ_MRC\n-#endif\n \n static DRFLAC_INLINE drflac_uint32 drflac__clz_software(drflac_cache_t x)\n {\n@@ -2757,8 +2451,6 @@ static DRFLAC_INLINE drflac_bool32 drflac__is_lzcnt_supported(void)\n     /* Fast compile time check for ARM. */\n #if defined(DRFLAC_HAS_LZCNT_INTRINSIC) && defined(DRFLAC_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5)\n     return DRFLAC_TRUE;\n-#elif defined(__MRC__)\n-    return DRFLAC_TRUE;\n #else\n     /* If the compiler itself does not support the intrinsic then we'll need to return false. */\n     #ifdef DRFLAC_HAS_LZCNT_INTRINSIC\n@@ -2815,7 +2507,7 @@ static DRFLAC_INLINE drflac_uint32 drflac__clz_lzcnt(drflac_cache_t x)\n \n                 return r;\n             }\n-        #elif defined(DRFLAC_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5) && !defined(__ARM_ARCH_6M__) && !defined(DRFLAC_64BIT)   /* <-- I haven't tested 64-bit inline assembly, so only enabling this for the 32-bit build for now. */\n+        #elif defined(DRFLAC_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5) && !defined(DRFLAC_64BIT)   /* <-- I haven't tested 64-bit inline assembly, so only enabling this for the 32-bit build for now. */\n             {\n                 unsigned int r;\n                 __asm__ __volatile__ (\n@@ -2866,26 +2558,6 @@ static DRFLAC_INLINE drflac_uint32 drflac__clz_msvc(drflac_cache_t x)\n }\n #endif\n \n-#ifdef DRFLAC_IMPLEMENT_CLZ_WATCOM\n-static __inline drflac_uint32 drflac__clz_watcom (drflac_uint32);\n-#ifdef DRFLAC_IMPLEMENT_CLZ_WATCOM_LZCNT\n-/* Use the LZCNT instruction (only available on some processors since the 2010s). */\n-#pragma aux drflac__clz_watcom_lzcnt = \\\n-    \"db 0F3h, 0Fh, 0BDh, 0C0h\" /* lzcnt eax, eax */ \\\n-    parm [eax] \\\n-    value [eax] \\\n-    modify nomemory;\n-#else\n-/* Use the 386+-compatible implementation. */\n-#pragma aux drflac__clz_watcom = \\\n-    \"bsr eax, eax\" \\\n-    \"xor eax, 31\" \\\n-    parm [eax] nomemory \\\n-    value [eax] \\\n-    modify exact [eax] nomemory;\n-#endif\n-#endif\n-\n static DRFLAC_INLINE drflac_uint32 drflac__clz(drflac_cache_t x)\n {\n #ifdef DRFLAC_IMPLEMENT_CLZ_LZCNT\n@@ -2896,12 +2568,6 @@ static DRFLAC_INLINE drflac_uint32 drflac__clz(drflac_cache_t x)\n     {\n #ifdef DRFLAC_IMPLEMENT_CLZ_MSVC\n         return drflac__clz_msvc(x);\n-#elif defined(DRFLAC_IMPLEMENT_CLZ_WATCOM_LZCNT)\n-        return drflac__clz_watcom_lzcnt(x);\n-#elif defined(DRFLAC_IMPLEMENT_CLZ_WATCOM)\n-        return (x == 0) ? sizeof(x)*8 : drflac__clz_watcom(x);\n-#elif defined(__MRC__)\n-        return __cntlzw(x);\n #else\n         return drflac__clz_software(x);\n #endif\n@@ -2921,24 +2587,9 @@ static DRFLAC_INLINE drflac_bool32 drflac__seek_past_next_set_bit(drflac_bs* bs,\n         }\n     }\n \n-    if (bs->cache == 1) {\n-        /* Not catching this would lead to undefined behaviour: a shift of a 32-bit number by 32 or more is undefined */\n-        *pOffsetOut = zeroCounter + (drflac_uint32)DRFLAC_CACHE_L1_BITS_REMAINING(bs) - 1;\n-        if (!drflac__reload_cache(bs)) {\n-            return DRFLAC_FALSE;\n-        }\n-\n-        return DRFLAC_TRUE;\n-    }\n-\n     setBitOffsetPlus1 = drflac__clz(bs->cache);\n     setBitOffsetPlus1 += 1;\n \n-    if (setBitOffsetPlus1 > DRFLAC_CACHE_L1_BITS_REMAINING(bs)) {\n-        /* This happens when we get to end of stream */\n-        return DRFLAC_FALSE;\n-    }\n-\n     bs->consumedBits += setBitOffsetPlus1;\n     bs->cache <<= setBitOffsetPlus1;\n \n@@ -3053,25 +2704,6 @@ static drflac_result drflac__read_utf8_coded_number(drflac_bs* bs, drflac_uint64\n }\n \n \n-static DRFLAC_INLINE drflac_uint32 drflac__ilog2_u32(drflac_uint32 x)\n-{\n-#if 1   /* Needs optimizing. */\n-    drflac_uint32 result = 0;\n-    while (x > 0) {\n-        result += 1;\n-        x >>= 1;\n-    }\n-\n-    return result;\n-#endif\n-}\n-\n-static DRFLAC_INLINE drflac_bool32 drflac__use_64_bit_prediction(drflac_uint32 bitsPerSample, drflac_uint32 order, drflac_uint32 precision)\n-{\n-    /* https://web.archive.org/web/20220205005724/https://github.com/ietf-wg-cellar/flac-specification/blob/37a49aa48ba4ba12e8757badfc59c0df35435fec/rfc_backmatter.md */\n-    return bitsPerSample + precision + drflac__ilog2_u32(order) > 32;\n-}\n-\n \n /*\n The next two functions are responsible for calculating the prediction.\n@@ -3079,9 +2711,6 @@ The next two functions are responsible for calculating the prediction.\n When the bits per sample is >16 we need to use 64-bit integer arithmetic because otherwise we'll run out of precision. It's\n safe to assume this will be slower on 32-bit platforms so we use a more optimal solution when the bits per sample is <=16.\n */\n-#if defined(__clang__)\n-__attribute__((no_sanitize(\"signed-integer-overflow\")))\n-#endif\n static DRFLAC_INLINE drflac_int32 drflac__calculate_prediction_32(drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pDecodedSamples)\n {\n     drflac_int32 prediction = 0;\n@@ -3311,170 +2940,6 @@ static DRFLAC_INLINE drflac_int32 drflac__calculate_prediction_64(drflac_uint32\n     return (drflac_int32)(prediction >> shift);\n }\n \n-\n-#if 0\n-/*\n-Reference implementation for reading and decoding samples with residual. This is intentionally left unoptimized for the\n-sake of readability and should only be used as a reference.\n-*/\n-static drflac_bool32 drflac__decode_samples_with_residual__rice__reference(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut)\n-{\n-    drflac_uint32 i;\n-\n-    DRFLAC_ASSERT(bs != NULL);\n-    DRFLAC_ASSERT(pSamplesOut != NULL);\n-\n-    for (i = 0; i < count; ++i) {\n-        drflac_uint32 zeroCounter = 0;\n-        for (;;) {\n-            drflac_uint8 bit;\n-            if (!drflac__read_uint8(bs, 1, &bit)) {\n-                return DRFLAC_FALSE;\n-            }\n-\n-            if (bit == 0) {\n-                zeroCounter += 1;\n-            } else {\n-                break;\n-            }\n-        }\n-\n-        drflac_uint32 decodedRice;\n-        if (riceParam > 0) {\n-            if (!drflac__read_uint32(bs, riceParam, &decodedRice)) {\n-                return DRFLAC_FALSE;\n-            }\n-        } else {\n-            decodedRice = 0;\n-        }\n-\n-        decodedRice |= (zeroCounter << riceParam);\n-        if ((decodedRice & 0x01)) {\n-            decodedRice = ~(decodedRice >> 1);\n-        } else {\n-            decodedRice =  (decodedRice >> 1);\n-        }\n-\n-\n-        if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {\n-            pSamplesOut[i] = decodedRice + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + i);\n-        } else {\n-            pSamplesOut[i] = decodedRice + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + i);\n-        }\n-    }\n-\n-    return DRFLAC_TRUE;\n-}\n-#endif\n-\n-#if 0\n-static drflac_bool32 drflac__read_rice_parts__reference(drflac_bs* bs, drflac_uint8 riceParam, drflac_uint32* pZeroCounterOut, drflac_uint32* pRiceParamPartOut)\n-{\n-    drflac_uint32 zeroCounter = 0;\n-    drflac_uint32 decodedRice;\n-\n-    for (;;) {\n-        drflac_uint8 bit;\n-        if (!drflac__read_uint8(bs, 1, &bit)) {\n-            return DRFLAC_FALSE;\n-        }\n-\n-        if (bit == 0) {\n-            zeroCounter += 1;\n-        } else {\n-            break;\n-        }\n-    }\n-\n-    if (riceParam > 0) {\n-        if (!drflac__read_uint32(bs, riceParam, &decodedRice)) {\n-            return DRFLAC_FALSE;\n-        }\n-    } else {\n-        decodedRice = 0;\n-    }\n-\n-    *pZeroCounterOut = zeroCounter;\n-    *pRiceParamPartOut = decodedRice;\n-    return DRFLAC_TRUE;\n-}\n-#endif\n-\n-#if 0\n-static DRFLAC_INLINE drflac_bool32 drflac__read_rice_parts(drflac_bs* bs, drflac_uint8 riceParam, drflac_uint32* pZeroCounterOut, drflac_uint32* pRiceParamPartOut)\n-{\n-    drflac_cache_t riceParamMask;\n-    drflac_uint32 zeroCounter;\n-    drflac_uint32 setBitOffsetPlus1;\n-    drflac_uint32 riceParamPart;\n-    drflac_uint32 riceLength;\n-\n-    DRFLAC_ASSERT(riceParam > 0);   /* <-- riceParam should never be 0. drflac__read_rice_parts__param_equals_zero() should be used instead for this case. */\n-\n-    riceParamMask = DRFLAC_CACHE_L1_SELECTION_MASK(riceParam);\n-\n-    zeroCounter = 0;\n-    while (bs->cache == 0) {\n-        zeroCounter += (drflac_uint32)DRFLAC_CACHE_L1_BITS_REMAINING(bs);\n-        if (!drflac__reload_cache(bs)) {\n-            return DRFLAC_FALSE;\n-        }\n-    }\n-\n-    setBitOffsetPlus1 = drflac__clz(bs->cache);\n-    zeroCounter += setBitOffsetPlus1;\n-    setBitOffsetPlus1 += 1;\n-\n-    riceLength = setBitOffsetPlus1 + riceParam;\n-    if (riceLength < DRFLAC_CACHE_L1_BITS_REMAINING(bs)) {\n-        riceParamPart = (drflac_uint32)((bs->cache & (riceParamMask >> setBitOffsetPlus1)) >> DRFLAC_CACHE_L1_SELECTION_SHIFT(bs, riceLength));\n-\n-        bs->consumedBits += riceLength;\n-        bs->cache <<= riceLength;\n-    } else {\n-        drflac_uint32 bitCountLo;\n-        drflac_cache_t resultHi;\n-\n-        bs->consumedBits += riceLength;\n-        bs->cache <<= setBitOffsetPlus1 & (DRFLAC_CACHE_L1_SIZE_BITS(bs)-1);    /* <-- Equivalent to \"if (setBitOffsetPlus1 < DRFLAC_CACHE_L1_SIZE_BITS(bs)) { bs->cache <<= setBitOffsetPlus1; }\" */\n-\n-        /* It straddles the cached data. It will never cover more than the next chunk. We just read the number in two parts and combine them. */\n-        bitCountLo = bs->consumedBits - DRFLAC_CACHE_L1_SIZE_BITS(bs);\n-        resultHi = DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, riceParam);  /* <-- Use DRFLAC_CACHE_L1_SELECT_AND_SHIFT_SAFE() if ever this function allows riceParam=0. */\n-\n-        if (bs->nextL2Line < DRFLAC_CACHE_L2_LINE_COUNT(bs)) {\n-#ifndef DR_FLAC_NO_CRC\n-            drflac__update_crc16(bs);\n-#endif\n-            bs->cache = drflac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]);\n-            bs->consumedBits = 0;\n-#ifndef DR_FLAC_NO_CRC\n-            bs->crc16Cache = bs->cache;\n-#endif\n-        } else {\n-            /* Slow path. We need to fetch more data from the client. */\n-            if (!drflac__reload_cache(bs)) {\n-                return DRFLAC_FALSE;\n-            }\n-            if (bitCountLo > DRFLAC_CACHE_L1_BITS_REMAINING(bs)) {\n-                /* This happens when we get to end of stream */\n-                return DRFLAC_FALSE;\n-            }\n-        }\n-\n-        riceParamPart = (drflac_uint32)(resultHi | DRFLAC_CACHE_L1_SELECT_AND_SHIFT_SAFE(bs, bitCountLo));\n-\n-        bs->consumedBits += bitCountLo;\n-        bs->cache <<= bitCountLo;\n-    }\n-\n-    pZeroCounterOut[0] = zeroCounter;\n-    pRiceParamPartOut[0] = riceParamPart;\n-\n-    return DRFLAC_TRUE;\n-}\n-#endif\n-\n static DRFLAC_INLINE drflac_bool32 drflac__read_rice_parts_x1(drflac_bs* bs, drflac_uint8 riceParam, drflac_uint32* pZeroCounterOut, drflac_uint32* pRiceParamPartOut)\n {\n     drflac_uint32  riceParamPlus1 = riceParam + 1;\n@@ -3540,10 +3005,6 @@ static DRFLAC_INLINE drflac_bool32 drflac__read_rice_parts_x1(drflac_bs* bs, drf\n                 if (!drflac__reload_cache(bs)) {\n                     return DRFLAC_FALSE;\n                 }\n-                if (riceParamPartLoBitCount > DRFLAC_CACHE_L1_BITS_REMAINING(bs)) {\n-                    /* This happens when we get to end of stream */\n-                    return DRFLAC_FALSE;\n-                }\n \n                 bs_cache = bs->cache;\n                 bs_consumedBits = bs->consumedBits + riceParamPartLoBitCount;\n@@ -3654,11 +3115,6 @@ static DRFLAC_INLINE drflac_bool32 drflac__seek_rice_parts(drflac_bs* bs, drflac\n                     return DRFLAC_FALSE;\n                 }\n \n-                if (riceParamPartLoBitCount > DRFLAC_CACHE_L1_BITS_REMAINING(bs)) {\n-                    /* This happens when we get to end of stream */\n-                    return DRFLAC_FALSE;\n-                }\n-\n                 bs_cache = bs->cache;\n                 bs_consumedBits = bs->consumedBits + riceParamPartLoBitCount;\n             }\n@@ -3716,6 +3172,7 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar_zeroorde\n     drflac_uint32 i;\n \n     DRFLAC_ASSERT(bs != NULL);\n+    DRFLAC_ASSERT(count > 0);\n     DRFLAC_ASSERT(pSamplesOut != NULL);\n \n     (void)bitsPerSample;\n@@ -3745,7 +3202,7 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar_zeroorde\n     return DRFLAC_TRUE;\n }\n \n-static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut)\n+static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut)\n {\n     drflac_uint32 t[2] = {0x00000000, 0xFFFFFFFF};\n     drflac_uint32 zeroCountPart0 = 0;\n@@ -3761,16 +3218,17 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar(drflac_b\n     drflac_uint32 i;\n \n     DRFLAC_ASSERT(bs != NULL);\n+    DRFLAC_ASSERT(count > 0);\n     DRFLAC_ASSERT(pSamplesOut != NULL);\n \n-    if (lpcOrder == 0) {\n-        return drflac__decode_samples_with_residual__rice__scalar_zeroorder(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut);\n+    if (order == 0) {\n+        return drflac__decode_samples_with_residual__rice__scalar_zeroorder(bs, bitsPerSample, count, riceParam, order, shift, coefficients, pSamplesOut);\n     }\n \n     riceParamMask  = (drflac_uint32)~((~0UL) << riceParam);\n     pSamplesOutEnd = pSamplesOut + (count & ~3);\n \n-    if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {\n+    if (bitsPerSample+shift > 32) {\n         while (pSamplesOut < pSamplesOutEnd) {\n             /*\n             Rice extraction. It's faster to do this one at a time against local variables than it is to use the x4 version\n@@ -3798,10 +3256,10 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar(drflac_b\n             riceParamPart2  = (riceParamPart2 >> 1) ^ t[riceParamPart2 & 0x01];\n             riceParamPart3  = (riceParamPart3 >> 1) ^ t[riceParamPart3 & 0x01];\n \n-            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 0);\n-            pSamplesOut[1] = riceParamPart1 + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 1);\n-            pSamplesOut[2] = riceParamPart2 + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 2);\n-            pSamplesOut[3] = riceParamPart3 + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 3);\n+            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_64(order, shift, coefficients, pSamplesOut + 0);\n+            pSamplesOut[1] = riceParamPart1 + drflac__calculate_prediction_64(order, shift, coefficients, pSamplesOut + 1);\n+            pSamplesOut[2] = riceParamPart2 + drflac__calculate_prediction_64(order, shift, coefficients, pSamplesOut + 2);\n+            pSamplesOut[3] = riceParamPart3 + drflac__calculate_prediction_64(order, shift, coefficients, pSamplesOut + 3);\n \n             pSamplesOut += 4;\n         }\n@@ -3829,10 +3287,10 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar(drflac_b\n             riceParamPart2  = (riceParamPart2 >> 1) ^ t[riceParamPart2 & 0x01];\n             riceParamPart3  = (riceParamPart3 >> 1) ^ t[riceParamPart3 & 0x01];\n \n-            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 0);\n-            pSamplesOut[1] = riceParamPart1 + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 1);\n-            pSamplesOut[2] = riceParamPart2 + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 2);\n-            pSamplesOut[3] = riceParamPart3 + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 3);\n+            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_32(order, shift, coefficients, pSamplesOut + 0);\n+            pSamplesOut[1] = riceParamPart1 + drflac__calculate_prediction_32(order, shift, coefficients, pSamplesOut + 1);\n+            pSamplesOut[2] = riceParamPart2 + drflac__calculate_prediction_32(order, shift, coefficients, pSamplesOut + 2);\n+            pSamplesOut[3] = riceParamPart3 + drflac__calculate_prediction_32(order, shift, coefficients, pSamplesOut + 3);\n \n             pSamplesOut += 4;\n         }\n@@ -3852,10 +3310,10 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar(drflac_b\n         /*riceParamPart0  = (riceParamPart0 >> 1) ^ (~(riceParamPart0 & 0x01) + 1);*/\n \n         /* Sample reconstruction. */\n-        if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {\n-            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 0);\n+        if (bitsPerSample+shift > 32) {\n+            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_64(order, shift, coefficients, pSamplesOut + 0);\n         } else {\n-            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 0);\n+            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_32(order, shift, coefficients, pSamplesOut + 0);\n         }\n \n         i += 1;\n@@ -4311,20 +3769,21 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__sse41_64(drflac\n     return DRFLAC_TRUE;\n }\n \n-static drflac_bool32 drflac__decode_samples_with_residual__rice__sse41(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut)\n+static drflac_bool32 drflac__decode_samples_with_residual__rice__sse41(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut)\n {\n     DRFLAC_ASSERT(bs != NULL);\n+    DRFLAC_ASSERT(count > 0);\n     DRFLAC_ASSERT(pSamplesOut != NULL);\n \n     /* In my testing the order is rarely > 12, so in this case I'm going to simplify the SSE implementation by only handling order <= 12. */\n-    if (lpcOrder > 0 && lpcOrder <= 12) {\n-        if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {\n-            return drflac__decode_samples_with_residual__rice__sse41_64(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut);\n+    if (order > 0 && order <= 12) {\n+        if (bitsPerSample+shift > 32) {\n+            return drflac__decode_samples_with_residual__rice__sse41_64(bs, count, riceParam, order, shift, coefficients, pSamplesOut);\n         } else {\n-            return drflac__decode_samples_with_residual__rice__sse41_32(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut);\n+            return drflac__decode_samples_with_residual__rice__sse41_32(bs, count, riceParam, order, shift, coefficients, pSamplesOut);\n         }\n     } else {\n-        return drflac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);\n+        return drflac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, order, shift, coefficients, pSamplesOut);\n     }\n }\n #endif\n@@ -4463,7 +3922,7 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__neon_32(drflac_\n \n     const drflac_uint32 t[2] = {0x00000000, 0xFFFFFFFF};\n \n-    riceParamMask    = (drflac_uint32)~((~0UL) << riceParam);\n+    riceParamMask    = ~((~0UL) << riceParam);\n     riceParamMask128 = vdupq_n_u32(riceParamMask);\n \n     riceParam128 = vdupq_n_s32(riceParam);\n@@ -4649,13 +4108,10 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__neon_64(drflac_\n     int32x4_t riceParam128;\n     int64x1_t shift64;\n     uint32x4_t one128;\n-    int64x2_t prediction128 = { 0 };\n-    uint32x4_t zeroCountPart128;\n-    uint32x4_t riceParamPart128;\n \n     const drflac_uint32 t[2] = {0x00000000, 0xFFFFFFFF};\n \n-    riceParamMask    = (drflac_uint32)~((~0UL) << riceParam);\n+    riceParamMask    = ~((~0UL) << riceParam);\n     riceParamMask128 = vdupq_n_u32(riceParamMask);\n \n     riceParam128 = vdupq_n_s32(riceParam);\n@@ -4664,7 +4120,7 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__neon_64(drflac_\n \n     /*\n     Pre-loading the coefficients and prior samples is annoying because we need to ensure we don't try reading more than\n-    what's available in the input buffers. It would be convenient to use a fall-through switch to do this, but this results\n+    what's available in the input buffers. It would be conenient to use a fall-through switch to do this, but this results\n     in strict aliasing warnings with GCC. To work around this I'm just doing something hacky. This feels a bit convoluted\n     so I think there's opportunity for this to be simplified.\n     */\n@@ -4732,6 +4188,10 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__neon_64(drflac_\n \n     /* For this version we are doing one sample at a time. */\n     while (pDecodedSamples < pDecodedSamplesEnd) {\n+        int64x2_t prediction128;\n+        uint32x4_t zeroCountPart128;\n+        uint32x4_t riceParamPart128;\n+\n         if (!drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0]) ||\n             !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[1], &riceParamParts[1]) ||\n             !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[2], &riceParamParts[2]) ||\n@@ -4808,42 +4268,39 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__neon_64(drflac_\n     return DRFLAC_TRUE;\n }\n \n-static drflac_bool32 drflac__decode_samples_with_residual__rice__neon(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut)\n+static drflac_bool32 drflac__decode_samples_with_residual__rice__neon(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut)\n {\n     DRFLAC_ASSERT(bs != NULL);\n+    DRFLAC_ASSERT(count > 0);\n     DRFLAC_ASSERT(pSamplesOut != NULL);\n \n     /* In my testing the order is rarely > 12, so in this case I'm going to simplify the NEON implementation by only handling order <= 12. */\n-    if (lpcOrder > 0 && lpcOrder <= 12) {\n-        if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {\n-            return drflac__decode_samples_with_residual__rice__neon_64(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut);\n+    if (order > 0 && order <= 12) {\n+        if (bitsPerSample+shift > 32) {\n+            return drflac__decode_samples_with_residual__rice__neon_64(bs, count, riceParam, order, shift, coefficients, pSamplesOut);\n         } else {\n-            return drflac__decode_samples_with_residual__rice__neon_32(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut);\n+            return drflac__decode_samples_with_residual__rice__neon_32(bs, count, riceParam, order, shift, coefficients, pSamplesOut);\n         }\n     } else {\n-        return drflac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);\n+        return drflac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, order, shift, coefficients, pSamplesOut);\n     }\n }\n #endif\n \n-static drflac_bool32 drflac__decode_samples_with_residual__rice(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut)\n+static drflac_bool32 drflac__decode_samples_with_residual__rice(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut)\n {\n #if defined(DRFLAC_SUPPORT_SSE41)\n     if (drflac__gIsSSE41Supported) {\n-        return drflac__decode_samples_with_residual__rice__sse41(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);\n+        return drflac__decode_samples_with_residual__rice__sse41(bs, bitsPerSample, count, riceParam, order, shift, coefficients, pSamplesOut);\n     } else\n #elif defined(DRFLAC_SUPPORT_NEON)\n     if (drflac__gIsNEONSupported) {\n-        return drflac__decode_samples_with_residual__rice__neon(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);\n+        return drflac__decode_samples_with_residual__rice__neon(bs, bitsPerSample, count, riceParam, order, shift, coefficients, pSamplesOut);\n     } else\n #endif\n     {\n         /* Scalar fallback. */\n-    #if 0\n-        return drflac__decode_samples_with_residual__rice__reference(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);\n-    #else\n-        return drflac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);\n-    #endif\n+        return drflac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, order, shift, coefficients, pSamplesOut);\n     }\n }\n \n@@ -4853,6 +4310,7 @@ static drflac_bool32 drflac__read_and_seek_residual__rice(drflac_bs* bs, drflac_\n     drflac_uint32 i;\n \n     DRFLAC_ASSERT(bs != NULL);\n+    DRFLAC_ASSERT(count > 0);\n \n     for (i = 0; i < count; ++i) {\n         if (!drflac__seek_rice_parts(bs, riceParam)) {\n@@ -4863,14 +4321,12 @@ static drflac_bool32 drflac__read_and_seek_residual__rice(drflac_bs* bs, drflac_\n     return DRFLAC_TRUE;\n }\n \n-#if defined(__clang__)\n-__attribute__((no_sanitize(\"signed-integer-overflow\")))\n-#endif\n-static drflac_bool32 drflac__decode_samples_with_residual__unencoded(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 unencodedBitsPerSample, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut)\n+static drflac_bool32 drflac__decode_samples_with_residual__unencoded(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 unencodedBitsPerSample, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut)\n {\n     drflac_uint32 i;\n \n     DRFLAC_ASSERT(bs != NULL);\n+    DRFLAC_ASSERT(count > 0);\n     DRFLAC_ASSERT(unencodedBitsPerSample <= 31);    /* <-- unencodedBitsPerSample is a 5 bit number, so cannot exceed 31. */\n     DRFLAC_ASSERT(pSamplesOut != NULL);\n \n@@ -4883,10 +4339,10 @@ static drflac_bool32 drflac__decode_samples_with_residual__unencoded(drflac_bs*\n             pSamplesOut[i] = 0;\n         }\n \n-        if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {\n-            pSamplesOut[i] += drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + i);\n+        if (bitsPerSample >= 24) {\n+            pSamplesOut[i] += drflac__calculate_prediction_64(order, shift, coefficients, pSamplesOut + i);\n         } else {\n-            pSamplesOut[i] += drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + i);\n+            pSamplesOut[i] += drflac__calculate_prediction_32(order, shift, coefficients, pSamplesOut + i);\n         }\n     }\n \n@@ -4899,7 +4355,7 @@ Reads and decodes the residual for the sub-frame the decoder is currently sittin\n when the decoder is sitting at the very start of the RESIDUAL block. The first <order> residuals will be ignored. The\n <blockSize> and <order> parameters are used to determine how many residual values need to be decoded.\n */\n-static drflac_bool32 drflac__decode_samples_with_residual(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 blockSize, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pDecodedSamples)\n+static drflac_bool32 drflac__decode_samples_with_residual(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 blockSize, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pDecodedSamples)\n {\n     drflac_uint8 residualMethod;\n     drflac_uint8 partitionOrder;\n@@ -4919,7 +4375,7 @@ static drflac_bool32 drflac__decode_samples_with_residual(drflac_bs* bs, drflac_\n     }\n \n     /* Ignore the first <order> values. */\n-    pDecodedSamples += lpcOrder;\n+    pDecodedSamples += order;\n \n     if (!drflac__read_uint8(bs, 4, &partitionOrder)) {\n         return DRFLAC_FALSE;\n@@ -4934,11 +4390,11 @@ static drflac_bool32 drflac__decode_samples_with_residual(drflac_bs* bs, drflac_\n     }\n \n     /* Validation check. */\n-    if ((blockSize / (1 << partitionOrder)) < lpcOrder) {\n+    if ((blockSize / (1 << partitionOrder)) <= order) {\n         return DRFLAC_FALSE;\n     }\n \n-    samplesInPartition = (blockSize / (1 << partitionOrder)) - lpcOrder;\n+    samplesInPartition = (blockSize / (1 << partitionOrder)) - order;\n     partitionsRemaining = (1 << partitionOrder);\n     for (;;) {\n         drflac_uint8 riceParam = 0;\n@@ -4959,7 +4415,7 @@ static drflac_bool32 drflac__decode_samples_with_residual(drflac_bs* bs, drflac_\n         }\n \n         if (riceParam != 0xFF) {\n-            if (!drflac__decode_samples_with_residual__rice(bs, bitsPerSample, samplesInPartition, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) {\n+            if (!drflac__decode_samples_with_residual__rice(bs, bitsPerSample, samplesInPartition, riceParam, order, shift, coefficients, pDecodedSamples)) {\n                 return DRFLAC_FALSE;\n             }\n         } else {\n@@ -4968,7 +4424,7 @@ static drflac_bool32 drflac__decode_samples_with_residual(drflac_bs* bs, drflac_\n                 return DRFLAC_FALSE;\n             }\n \n-            if (!drflac__decode_samples_with_residual__unencoded(bs, bitsPerSample, samplesInPartition, unencodedBitsPerSample, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) {\n+            if (!drflac__decode_samples_with_residual__unencoded(bs, bitsPerSample, samplesInPartition, unencodedBitsPerSample, order, shift, coefficients, pDecodedSamples)) {\n                 return DRFLAC_FALSE;\n             }\n         }\n@@ -5137,7 +4593,7 @@ static drflac_bool32 drflac__decode_samples__fixed(drflac_bs* bs, drflac_uint32\n         pDecodedSamples[i] = sample;\n     }\n \n-    if (!drflac__decode_samples_with_residual(bs, subframeBitsPerSample, blockSize, lpcOrder, 0, 4, lpcCoefficientsTable[lpcOrder], pDecodedSamples)) {\n+    if (!drflac__decode_samples_with_residual(bs, subframeBitsPerSample, blockSize, lpcOrder, 0, lpcCoefficientsTable[lpcOrder], pDecodedSamples)) {\n         return DRFLAC_FALSE;\n     }\n \n@@ -5192,7 +4648,7 @@ static drflac_bool32 drflac__decode_samples__lpc(drflac_bs* bs, drflac_uint32 bl\n         }\n     }\n \n-    if (!drflac__decode_samples_with_residual(bs, bitsPerSample, blockSize, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) {\n+    if (!drflac__decode_samples_with_residual(bs, bitsPerSample, blockSize, lpcOrder, lpcShift, coefficients, pDecodedSamples)) {\n         return DRFLAC_FALSE;\n     }\n \n@@ -5320,9 +4776,6 @@ static drflac_bool32 drflac__read_next_flac_frame_header(drflac_bs* bs, drflac_u\n                 return DRFLAC_FALSE;\n             }\n             crc8 = drflac_crc8(crc8, header->blockSizeInPCMFrames, 16);\n-            if (header->blockSizeInPCMFrames == 0xFFFF) {\n-                return DRFLAC_FALSE;    /* Frame is too big. This is the size of the frame minus 1. The STREAMINFO block defines the max block size which is 16-bits. Adding one will make it 17 bits and therefore too big. */\n-            }\n             header->blockSizeInPCMFrames += 1;\n         } else {\n             DRFLAC_ASSERT(blockSize >= 8);\n@@ -5361,11 +4814,6 @@ static drflac_bool32 drflac__read_next_flac_frame_header(drflac_bs* bs, drflac_u\n             header->bitsPerSample = streaminfoBitsPerSample;\n         }\n \n-        if (header->bitsPerSample != streaminfoBitsPerSample) {\n-            /* If this subframe has a different bitsPerSample then streaminfo or the first frame, reject it */\n-            return DRFLAC_FALSE;\n-        }\n-\n         if (!drflac__read_uint8(bs, 8, &header->crc8)) {\n             return DRFLAC_FALSE;\n         }\n@@ -5452,11 +4900,6 @@ static drflac_bool32 drflac__decode_subframe(drflac_bs* bs, drflac_frame* frame,\n         subframeBitsPerSample += 1;\n     }\n \n-    if (subframeBitsPerSample > 32) {\n-        /* libFLAC and ffmpeg reject 33-bit subframes as well */\n-        return DRFLAC_FALSE;\n-    }\n-\n     /* Need to handle wasted bits per sample. */\n     if (pSubframe->wastedBitsPerSample >= subframeBitsPerSample) {\n         return DRFLAC_FALSE;\n@@ -5976,15 +5419,6 @@ static drflac_bool32 drflac__seek_to_approximate_flac_frame_to_byte(drflac* pFla\n static drflac_bool32 drflac__decode_flac_frame_and_seek_forward_by_pcm_frames(drflac* pFlac, drflac_uint64 offset)\n {\n     /* This section of code would be used if we were only decoding the FLAC frame header when calling drflac__seek_to_approximate_flac_frame_to_byte(). */\n-#if 0\n-    if (drflac__decode_flac_frame(pFlac) != DRFLAC_SUCCESS) {\n-        /* We failed to decode this frame which may be due to it being corrupt. We'll just use the next valid FLAC frame. */\n-        if (drflac__read_and_decode_next_flac_frame(pFlac) == DRFLAC_FALSE) {\n-            return DRFLAC_FALSE;\n-        }\n-    }\n-#endif\n-\n     return drflac__seek_forward_by_pcm_frames(pFlac, offset) == offset;\n }\n \n@@ -6127,11 +5561,6 @@ static drflac_bool32 drflac__seek_to_pcm_frame__seek_table(drflac* pFlac, drflac\n         return DRFLAC_FALSE;\n     }\n \n-    /* Do not use the seektable if pcmFramIndex is not coverd by it. */\n-    if (pFlac->pSeekpoints[0].firstPCMFrame > pcmFrameIndex) {\n-        return DRFLAC_FALSE;\n-    }\n-\n     for (iSeekpoint = 0; iSeekpoint < pFlac->seekpointCount; ++iSeekpoint) {\n         if (pFlac->pSeekpoints[iSeekpoint].firstPCMFrame >= pcmFrameIndex) {\n             break;\n@@ -6479,7 +5908,7 @@ static void drflac__free_from_callbacks(void* p, const drflac_allocation_callbac\n }\n \n \n-static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_meta_proc onMeta, void* pUserData, void* pUserDataMD, drflac_uint64* pFirstFramePos, drflac_uint64* pSeektablePos, drflac_uint32* pSeekpointCount, drflac_allocation_callbacks* pAllocationCallbacks)\n+static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_meta_proc onMeta, void* pUserData, void* pUserDataMD, drflac_uint64* pFirstFramePos, drflac_uint64* pSeektablePos, drflac_uint32* pSeektableSize, drflac_allocation_callbacks* pAllocationCallbacks)\n {\n     /*\n     We want to keep track of the byte position in the stream of the seektable. At the time of calling this function we know that\n@@ -6492,7 +5921,7 @@ static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, d\n     for (;;) {\n         drflac_metadata metadata;\n         drflac_uint8 isLastBlock = 0;\n-        drflac_uint8 blockType = 0;\n+        drflac_uint8 blockType;\n         drflac_uint32 blockSize;\n         if (drflac__read_and_decode_block_header(onRead, pUserData, &isLastBlock, &blockType, &blockSize) == DRFLAC_FALSE) {\n             return DRFLAC_FALSE;\n@@ -6539,37 +5968,32 @@ static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, d\n                 seektableSize = blockSize;\n \n                 if (onMeta) {\n-                    drflac_uint32 seekpointCount;\n                     drflac_uint32 iSeekpoint;\n                     void* pRawData;\n \n-                    seekpointCount = blockSize/DRFLAC_SEEKPOINT_SIZE_IN_BYTES;\n-\n-                    pRawData = drflac__malloc_from_callbacks(seekpointCount * sizeof(drflac_seekpoint), pAllocationCallbacks);\n+                    pRawData = drflac__malloc_from_callbacks(blockSize, pAllocationCallbacks);\n                     if (pRawData == NULL) {\n                         return DRFLAC_FALSE;\n                     }\n \n-                    /* We need to read seekpoint by seekpoint and do some processing. */\n-                    for (iSeekpoint = 0; iSeekpoint < seekpointCount; ++iSeekpoint) {\n-                        drflac_seekpoint* pSeekpoint = (drflac_seekpoint*)pRawData + iSeekpoint;\n+                    if (onRead(pUserData, pRawData, blockSize) != blockSize) {\n+                        drflac__free_from_callbacks(pRawData, pAllocationCallbacks);\n+                        return DRFLAC_FALSE;\n+                    }\n \n-                        if (onRead(pUserData, pSeekpoint, DRFLAC_SEEKPOINT_SIZE_IN_BYTES) != DRFLAC_SEEKPOINT_SIZE_IN_BYTES) {\n-                            drflac__free_from_callbacks(pRawData, pAllocationCallbacks);\n-                            return DRFLAC_FALSE;\n-                        }\n+                    metadata.pRawData = pRawData;\n+                    metadata.rawDataSize = blockSize;\n+                    metadata.data.seektable.seekpointCount = blockSize/sizeof(drflac_seekpoint);\n+                    metadata.data.seektable.pSeekpoints = (const drflac_seekpoint*)pRawData;\n \n-                        /* Endian swap. */\n+                    /* Endian swap. */\n+                    for (iSeekpoint = 0; iSeekpoint < metadata.data.seektable.seekpointCount; ++iSeekpoint) {\n+                        drflac_seekpoint* pSeekpoint = (drflac_seekpoint*)pRawData + iSeekpoint;\n                         pSeekpoint->firstPCMFrame   = drflac__be2host_64(pSeekpoint->firstPCMFrame);\n                         pSeekpoint->flacFrameOffset = drflac__be2host_64(pSeekpoint->flacFrameOffset);\n                         pSeekpoint->pcmFrameCount   = drflac__be2host_16(pSeekpoint->pcmFrameCount);\n                     }\n \n-                    metadata.pRawData = pRawData;\n-                    metadata.rawDataSize = blockSize;\n-                    metadata.data.seektable.seekpointCount = seekpointCount;\n-                    metadata.data.seektable.pSeekpoints = (const drflac_seekpoint*)pRawData;\n-\n                     onMeta(pUserDataMD, &metadata);\n \n                     drflac__free_from_callbacks(pRawData, pAllocationCallbacks);\n@@ -6604,7 +6028,7 @@ static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, d\n                     pRunningData    = (const char*)pRawData;\n                     pRunningDataEnd = (const char*)pRawData + blockSize;\n \n-                    metadata.data.vorbis_comment.vendorLength = drflac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n+                    metadata.data.vorbis_comment.vendorLength = drflac__le2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;\n \n                     /* Need space for the rest of the block */\n                     if ((pRunningDataEnd - pRunningData) - 4 < (drflac_int64)metadata.data.vorbis_comment.vendorLength) { /* <-- Note the order of operations to avoid overflow to a valid value */\n@@ -6612,7 +6036,7 @@ static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, d\n                         return DRFLAC_FALSE;\n                     }\n                     metadata.data.vorbis_comment.vendor       = pRunningData;                                            pRunningData += metadata.data.vorbis_comment.vendorLength;\n-                    metadata.data.vorbis_comment.commentCount = drflac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n+                    metadata.data.vorbis_comment.commentCount = drflac__le2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;\n \n                     /* Need space for 'commentCount' comments after the block, which at minimum is a drflac_uint32 per comment */\n                     if ((pRunningDataEnd - pRunningData) / sizeof(drflac_uint32) < metadata.data.vorbis_comment.commentCount) { /* <-- Note the order of operations to avoid overflow to a valid value */\n@@ -6630,7 +6054,7 @@ static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, d\n                             return DRFLAC_FALSE;\n                         }\n \n-                        commentLength = drflac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n+                        commentLength = drflac__le2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;\n                         if (pRunningDataEnd - pRunningData < (drflac_int64)commentLength) { /* <-- Note the order of operations to avoid overflow to a valid value */\n                             drflac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                             return DRFLAC_FALSE;\n@@ -6654,15 +6078,9 @@ static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, d\n                     void* pRawData;\n                     const char* pRunningData;\n                     const char* pRunningDataEnd;\n-                    size_t bufferSize;\n                     drflac_uint8 iTrack;\n                     drflac_uint8 iIndex;\n-                    void* pTrackData;\n \n-                    /*\n-                    This needs to be loaded in two passes. The first pass is used to calculate the size of the memory allocation\n-                    we need for storing the necessary data. The second pass will fill that buffer with usable data.\n-                    */\n                     pRawData = drflac__malloc_from_callbacks(blockSize, pAllocationCallbacks);\n                     if (pRawData == NULL) {\n                         return DRFLAC_FALSE;\n@@ -6683,91 +6101,38 @@ static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, d\n                     metadata.data.cuesheet.leadInSampleCount = drflac__be2host_64(*(const drflac_uint64*)pRunningData); pRunningData += 8;\n                     metadata.data.cuesheet.isCD              = (pRunningData[0] & 0x80) != 0;                           pRunningData += 259;\n                     metadata.data.cuesheet.trackCount        = pRunningData[0];                                         pRunningData += 1;\n-                    metadata.data.cuesheet.pTrackData        = NULL;    /* Will be filled later. */\n-\n-                    /* Pass 1: Calculate the size of the buffer for the track data. */\n-                    {\n-                        const char* pRunningDataSaved = pRunningData;   /* Will be restored at the end in preparation for the second pass. */\n-\n-                        bufferSize = metadata.data.cuesheet.trackCount * DRFLAC_CUESHEET_TRACK_SIZE_IN_BYTES;\n-\n-                        for (iTrack = 0; iTrack < metadata.data.cuesheet.trackCount; ++iTrack) {\n-                            drflac_uint8 indexCount;\n-                            drflac_uint32 indexPointSize;\n-\n-                            if (pRunningDataEnd - pRunningData < DRFLAC_CUESHEET_TRACK_SIZE_IN_BYTES) {\n-                                drflac__free_from_callbacks(pRawData, pAllocationCallbacks);\n-                                return DRFLAC_FALSE;\n-                            }\n+                    metadata.data.cuesheet.pTrackData        = pRunningData;\n \n-                            /* Skip to the index point count */\n-                            pRunningData += 35;\n-                            \n-                            indexCount = pRunningData[0];\n-                            pRunningData += 1;\n-                            \n-                            bufferSize += indexCount * sizeof(drflac_cuesheet_track_index);\n-\n-                            /* Quick validation check. */\n-                            indexPointSize = indexCount * DRFLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES;\n-                            if (pRunningDataEnd - pRunningData < (drflac_int64)indexPointSize) {\n-                                drflac__free_from_callbacks(pRawData, pAllocationCallbacks);\n-                                return DRFLAC_FALSE;\n-                            }\n+                    /* Check that the cuesheet tracks are valid before passing it to the callback */\n+                    for (iTrack = 0; iTrack < metadata.data.cuesheet.trackCount; ++iTrack) {\n+                        drflac_uint8 indexCount;\n+                        drflac_uint32 indexPointSize;\n \n-                            pRunningData += indexPointSize;\n+                        if (pRunningDataEnd - pRunningData < 36) {\n+                            drflac__free_from_callbacks(pRawData, pAllocationCallbacks);\n+                            return DRFLAC_FALSE;\n                         }\n \n-                        pRunningData = pRunningDataSaved;\n-                    }\n-\n-                    /* Pass 2: Allocate a buffer and fill the data. Validation was done in the step above so can be skipped. */\n-                    {\n-                        char* pRunningTrackData;\n-\n-                        pTrackData = drflac__malloc_from_callbacks(bufferSize, pAllocationCallbacks);\n-                        if (pTrackData == NULL) {\n+                        /* Skip to the index point count */\n+                        pRunningData += 35;\n+                        indexCount = pRunningData[0]; pRunningData += 1;\n+                        indexPointSize = indexCount * sizeof(drflac_cuesheet_track_index);\n+                        if (pRunningDataEnd - pRunningData < (drflac_int64)indexPointSize) {\n                             drflac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                             return DRFLAC_FALSE;\n                         }\n \n-                        pRunningTrackData = (char*)pTrackData;\n-\n-                        for (iTrack = 0; iTrack < metadata.data.cuesheet.trackCount; ++iTrack) {\n-                            drflac_uint8 indexCount;\n-\n-                            DRFLAC_COPY_MEMORY(pRunningTrackData, pRunningData, DRFLAC_CUESHEET_TRACK_SIZE_IN_BYTES);\n-                            pRunningData      += DRFLAC_CUESHEET_TRACK_SIZE_IN_BYTES-1; /* Skip forward, but not beyond the last byte in the CUESHEET_TRACK block which is the index count. */\n-                            pRunningTrackData += DRFLAC_CUESHEET_TRACK_SIZE_IN_BYTES-1;\n-\n-                            /* Grab the index count for the next part. */\n-                            indexCount = pRunningData[0];\n-                            pRunningData      += 1;\n-                            pRunningTrackData += 1;\n-\n-                            /* Extract each track index. */\n-                            for (iIndex = 0; iIndex < indexCount; ++iIndex) {\n-                                drflac_cuesheet_track_index* pTrackIndex = (drflac_cuesheet_track_index*)pRunningTrackData;\n-\n-                                DRFLAC_COPY_MEMORY(pRunningTrackData, pRunningData, DRFLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES);\n-                                pRunningData      += DRFLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES;\n-                                pRunningTrackData += sizeof(drflac_cuesheet_track_index);\n-\n-                                pTrackIndex->offset = drflac__be2host_64(pTrackIndex->offset);\n-                            }\n+                        /* Endian swap. */\n+                        for (iIndex = 0; iIndex < indexCount; ++iIndex) {\n+                            drflac_cuesheet_track_index* pTrack = (drflac_cuesheet_track_index*)pRunningData;\n+                            pRunningData += sizeof(drflac_cuesheet_track_index);\n+                            pTrack->offset = drflac__be2host_64(pTrack->offset);\n                         }\n-\n-                        metadata.data.cuesheet.pTrackData = pTrackData;\n                     }\n \n-                    /* The original data is no longer needed. */\n-                    drflac__free_from_callbacks(pRawData, pAllocationCallbacks);\n-                    pRawData = NULL;\n-\n                     onMeta(pUserDataMD, &metadata);\n \n-                    drflac__free_from_callbacks(pTrackData, pAllocationCallbacks);\n-                    pTrackData = NULL;\n+                    drflac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                 }\n             } break;\n \n@@ -6798,28 +6163,28 @@ static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, d\n                     pRunningData    = (const char*)pRawData;\n                     pRunningDataEnd = (const char*)pRawData + blockSize;\n \n-                    metadata.data.picture.type       = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n-                    metadata.data.picture.mimeLength = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n+                    metadata.data.picture.type       = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;\n+                    metadata.data.picture.mimeLength = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;\n \n                     /* Need space for the rest of the block */\n                     if ((pRunningDataEnd - pRunningData) - 24 < (drflac_int64)metadata.data.picture.mimeLength) { /* <-- Note the order of operations to avoid overflow to a valid value */\n                         drflac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                         return DRFLAC_FALSE;\n                     }\n-                    metadata.data.picture.mime              = pRunningData;                                   pRunningData += metadata.data.picture.mimeLength;\n-                    metadata.data.picture.descriptionLength = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n+                    metadata.data.picture.mime              = pRunningData;                                            pRunningData += metadata.data.picture.mimeLength;\n+                    metadata.data.picture.descriptionLength = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;\n \n                     /* Need space for the rest of the block */\n                     if ((pRunningDataEnd - pRunningData) - 20 < (drflac_int64)metadata.data.picture.descriptionLength) { /* <-- Note the order of operations to avoid overflow to a valid value */\n                         drflac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                         return DRFLAC_FALSE;\n                     }\n-                    metadata.data.picture.description     = pRunningData;                                   pRunningData += metadata.data.picture.descriptionLength;\n-                    metadata.data.picture.width           = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n-                    metadata.data.picture.height          = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n-                    metadata.data.picture.colorDepth      = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n-                    metadata.data.picture.indexColorCount = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n-                    metadata.data.picture.pictureDataSize = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n+                    metadata.data.picture.description     = pRunningData;                                            pRunningData += metadata.data.picture.descriptionLength;\n+                    metadata.data.picture.width           = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;\n+                    metadata.data.picture.height          = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;\n+                    metadata.data.picture.colorDepth      = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;\n+                    metadata.data.picture.indexColorCount = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;\n+                    metadata.data.picture.pictureDataSize = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;\n                     metadata.data.picture.pPictureData    = (const drflac_uint8*)pRunningData;\n \n                     /* Need space for the picture after the block */\n@@ -6897,9 +6262,9 @@ static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, d\n         }\n     }\n \n-    *pSeektablePos   = seektablePos;\n-    *pSeekpointCount = seektableSize / DRFLAC_SEEKPOINT_SIZE_IN_BYTES;\n-    *pFirstFramePos  = runningFilePos;\n+    *pSeektablePos = seektablePos;\n+    *pSeektableSize = seektableSize;\n+    *pFirstFramePos = runningFilePos;\n \n     return DRFLAC_TRUE;\n }\n@@ -7063,24 +6428,6 @@ static DRFLAC_INLINE drflac_uint32 drflac_crc32_byte(drflac_uint32 crc32, drflac\n #endif\n }\n \n-#if 0\n-static DRFLAC_INLINE drflac_uint32 drflac_crc32_uint32(drflac_uint32 crc32, drflac_uint32 data)\n-{\n-    crc32 = drflac_crc32_byte(crc32, (drflac_uint8)((data >> 24) & 0xFF));\n-    crc32 = drflac_crc32_byte(crc32, (drflac_uint8)((data >> 16) & 0xFF));\n-    crc32 = drflac_crc32_byte(crc32, (drflac_uint8)((data >>  8) & 0xFF));\n-    crc32 = drflac_crc32_byte(crc32, (drflac_uint8)((data >>  0) & 0xFF));\n-    return crc32;\n-}\n-\n-static DRFLAC_INLINE drflac_uint32 drflac_crc32_uint64(drflac_uint32 crc32, drflac_uint64 data)\n-{\n-    crc32 = drflac_crc32_uint32(crc32, (drflac_uint32)((data >> 32) & 0xFFFFFFFF));\n-    crc32 = drflac_crc32_uint32(crc32, (drflac_uint32)((data >>  0) & 0xFFFFFFFF));\n-    return crc32;\n-}\n-#endif\n-\n static DRFLAC_INLINE drflac_uint32 drflac_crc32_buffer(drflac_uint32 crc32, drflac_uint8* pData, drflac_uint32 dataSize)\n {\n     /* This can be optimized. */\n@@ -7337,85 +6684,6 @@ static drflac_bool32 drflac_oggbs__goto_next_page(drflac_oggbs* oggbs, drflac_og\n }\n \n /* Function below is unused at the moment, but I might be re-adding it later. */\n-#if 0\n-static drflac_uint8 drflac_oggbs__get_current_segment_index(drflac_oggbs* oggbs, drflac_uint8* pBytesRemainingInSeg)\n-{\n-    drflac_uint32 bytesConsumedInPage = drflac_ogg__get_page_body_size(&oggbs->currentPageHeader) - oggbs->bytesRemainingInPage;\n-    drflac_uint8 iSeg = 0;\n-    drflac_uint32 iByte = 0;\n-    while (iByte < bytesConsumedInPage) {\n-        drflac_uint8 segmentSize = oggbs->currentPageHeader.segmentTable[iSeg];\n-        if (iByte + segmentSize > bytesConsumedInPage) {\n-            break;\n-        } else {\n-            iSeg += 1;\n-            iByte += segmentSize;\n-        }\n-    }\n-\n-    *pBytesRemainingInSeg = oggbs->currentPageHeader.segmentTable[iSeg] - (drflac_uint8)(bytesConsumedInPage - iByte);\n-    return iSeg;\n-}\n-\n-static drflac_bool32 drflac_oggbs__seek_to_next_packet(drflac_oggbs* oggbs)\n-{\n-    /* The current packet ends when we get to the segment with a lacing value of < 255 which is not at the end of a page. */\n-    for (;;) {\n-        drflac_bool32 atEndOfPage = DRFLAC_FALSE;\n-\n-        drflac_uint8 bytesRemainingInSeg;\n-        drflac_uint8 iFirstSeg = drflac_oggbs__get_current_segment_index(oggbs, &bytesRemainingInSeg);\n-\n-        drflac_uint32 bytesToEndOfPacketOrPage = bytesRemainingInSeg;\n-        for (drflac_uint8 iSeg = iFirstSeg; iSeg < oggbs->currentPageHeader.segmentCount; ++iSeg) {\n-            drflac_uint8 segmentSize = oggbs->currentPageHeader.segmentTable[iSeg];\n-            if (segmentSize < 255) {\n-                if (iSeg == oggbs->currentPageHeader.segmentCount-1) {\n-                    atEndOfPage = DRFLAC_TRUE;\n-                }\n-\n-                break;\n-            }\n-\n-            bytesToEndOfPacketOrPage += segmentSize;\n-        }\n-\n-        /*\n-        At this point we will have found either the packet or the end of the page. If were at the end of the page we'll\n-        want to load the next page and keep searching for the end of the packet.\n-        */\n-        drflac_oggbs__seek_physical(oggbs, bytesToEndOfPacketOrPage, drflac_seek_origin_current);\n-        oggbs->bytesRemainingInPage -= bytesToEndOfPacketOrPage;\n-\n-        if (atEndOfPage) {\n-            /*\n-            We're potentially at the next packet, but we need to check the next page first to be sure because the packet may\n-            straddle pages.\n-            */\n-            if (!drflac_oggbs__goto_next_page(oggbs)) {\n-                return DRFLAC_FALSE;\n-            }\n-\n-            /* If it's a fresh packet it most likely means we're at the next packet. */\n-            if ((oggbs->currentPageHeader.headerType & 0x01) == 0) {\n-                return DRFLAC_TRUE;\n-            }\n-        } else {\n-            /* We're at the next packet. */\n-            return DRFLAC_TRUE;\n-        }\n-    }\n-}\n-\n-static drflac_bool32 drflac_oggbs__seek_to_next_frame(drflac_oggbs* oggbs)\n-{\n-    /* The bitstream should be sitting on the first byte just after the header of the frame. */\n-\n-    /* What we're actually doing here is seeking to the start of the next packet. */\n-    return drflac_oggbs__seek_to_next_packet(oggbs);\n-}\n-#endif\n-\n static size_t drflac__on_read_ogg(void* pUserData, void* bufferOut, size_t bytesToRead)\n {\n     drflac_oggbs* oggbs = (drflac_oggbs*)pUserData;\n@@ -7929,11 +7197,11 @@ static drflac* drflac_open_with_metadata_private(drflac_read_proc onRead, drflac\n     drflac_uint32 wholeSIMDVectorCountPerChannel;\n     drflac_uint32 decodedSamplesAllocationSize;\n #ifndef DR_FLAC_NO_OGG\n-    drflac_oggbs* pOggbs = NULL;\n+    drflac_oggbs oggbs;\n #endif\n     drflac_uint64 firstFramePos;\n     drflac_uint64 seektablePos;\n-    drflac_uint32 seekpointCount;\n+    drflac_uint32 seektableSize;\n     drflac_allocation_callbacks allocationCallbacks;\n     drflac* pFlac;\n \n@@ -7987,21 +7255,18 @@ static drflac* drflac_open_with_metadata_private(drflac_read_proc onRead, drflac\n     /* There's additional data required for Ogg streams. */\n     if (init.container == drflac_container_ogg) {\n         allocationSize += sizeof(drflac_oggbs);\n+    }\n \n-        pOggbs = (drflac_oggbs*)drflac__malloc_from_callbacks(sizeof(*pOggbs), &allocationCallbacks);\n-        if (pOggbs == NULL) {\n-            return NULL; /*DRFLAC_OUT_OF_MEMORY;*/\n-        }\n-\n-        DRFLAC_ZERO_MEMORY(pOggbs, sizeof(*pOggbs));\n-        pOggbs->onRead = onRead;\n-        pOggbs->onSeek = onSeek;\n-        pOggbs->pUserData = pUserData;\n-        pOggbs->currentBytePos = init.oggFirstBytePos;\n-        pOggbs->firstBytePos = init.oggFirstBytePos;\n-        pOggbs->serialNumber = init.oggSerial;\n-        pOggbs->bosPageHeader = init.oggBosHeader;\n-        pOggbs->bytesRemainingInPage = 0;\n+    DRFLAC_ZERO_MEMORY(&oggbs, sizeof(oggbs));\n+    if (init.container == drflac_container_ogg) {\n+        oggbs.onRead = onRead;\n+        oggbs.onSeek = onSeek;\n+        oggbs.pUserData = pUserData;\n+        oggbs.currentBytePos = init.oggFirstBytePos;\n+        oggbs.firstBytePos = init.oggFirstBytePos;\n+        oggbs.serialNumber = init.oggSerial;\n+        oggbs.bosPageHeader = init.oggBosHeader;\n+        oggbs.bytesRemainingInPage = 0;\n     }\n #endif\n \n@@ -8010,9 +7275,9 @@ static drflac* drflac_open_with_metadata_private(drflac_read_proc onRead, drflac\n     consist of only a single heap allocation. To this, the size of the seek table needs to be known, which we determine when reading\n     and decoding the metadata.\n     */\n-    firstFramePos  = 42;   /* <-- We know we are at byte 42 at this point. */\n-    seektablePos   = 0;\n-    seekpointCount = 0;\n+    firstFramePos = 42;   /* <-- We know we are at byte 42 at this point. */\n+    seektablePos  = 0;\n+    seektableSize = 0;\n     if (init.hasMetadataBlocks) {\n         drflac_read_proc onReadOverride = onRead;\n         drflac_seek_proc onSeekOverride = onSeek;\n@@ -8022,26 +7287,20 @@ static drflac* drflac_open_with_metadata_private(drflac_read_proc onRead, drflac\n         if (init.container == drflac_container_ogg) {\n             onReadOverride = drflac__on_read_ogg;\n             onSeekOverride = drflac__on_seek_ogg;\n-            pUserDataOverride = (void*)pOggbs;\n+            pUserDataOverride = (void*)&oggbs;\n         }\n #endif\n \n-        if (!drflac__read_and_decode_metadata(onReadOverride, onSeekOverride, onMeta, pUserDataOverride, pUserDataMD, &firstFramePos, &seektablePos, &seekpointCount, &allocationCallbacks)) {\n-        #ifndef DR_FLAC_NO_OGG\n-            drflac__free_from_callbacks(pOggbs, &allocationCallbacks);\n-        #endif\n+        if (!drflac__read_and_decode_metadata(onReadOverride, onSeekOverride, onMeta, pUserDataOverride, pUserDataMD, &firstFramePos, &seektablePos, &seektableSize, &allocationCallbacks)) {\n             return NULL;\n         }\n \n-        allocationSize += seekpointCount * sizeof(drflac_seekpoint);\n+        allocationSize += seektableSize;\n     }\n \n \n     pFlac = (drflac*)drflac__malloc_from_callbacks(allocationSize, &allocationCallbacks);\n     if (pFlac == NULL) {\n-    #ifndef DR_FLAC_NO_OGG\n-        drflac__free_from_callbacks(pOggbs, &allocationCallbacks);\n-    #endif\n         return NULL;\n     }\n \n@@ -8051,12 +7310,8 @@ static drflac* drflac_open_with_metadata_private(drflac_read_proc onRead, drflac\n \n #ifndef DR_FLAC_NO_OGG\n     if (init.container == drflac_container_ogg) {\n-        drflac_oggbs* pInternalOggbs = (drflac_oggbs*)((drflac_uint8*)pFlac->pDecodedSamples + decodedSamplesAllocationSize + (seekpointCount * sizeof(drflac_seekpoint)));\n-        DRFLAC_COPY_MEMORY(pInternalOggbs, pOggbs, sizeof(*pOggbs));\n-\n-        /* At this point the pOggbs object has been handed over to pInternalOggbs and can be freed. */\n-        drflac__free_from_callbacks(pOggbs, &allocationCallbacks);\n-        pOggbs = NULL;\n+        drflac_oggbs* pInternalOggbs = (drflac_oggbs*)((drflac_uint8*)pFlac->pDecodedSamples + decodedSamplesAllocationSize + seektableSize);\n+        *pInternalOggbs = oggbs;\n \n         /* The Ogg bistream needs to be layered on top of the original bitstream. */\n         pFlac->bs.onRead = drflac__on_read_ogg;\n@@ -8080,7 +7335,7 @@ static drflac* drflac_open_with_metadata_private(drflac_read_proc onRead, drflac\n     {\n         /* If we have a seektable we need to load it now, making sure we move back to where we were previously. */\n         if (seektablePos != 0) {\n-            pFlac->seekpointCount = seekpointCount;\n+            pFlac->seekpointCount = seektableSize / sizeof(*pFlac->pSeekpoints);\n             pFlac->pSeekpoints = (drflac_seekpoint*)((drflac_uint8*)pFlac->pDecodedSamples + decodedSamplesAllocationSize);\n \n             DRFLAC_ASSERT(pFlac->bs.onSeek != NULL);\n@@ -8088,20 +7343,18 @@ static drflac* drflac_open_with_metadata_private(drflac_read_proc onRead, drflac\n \n             /* Seek to the seektable, then just read directly into our seektable buffer. */\n             if (pFlac->bs.onSeek(pFlac->bs.pUserData, (int)seektablePos, drflac_seek_origin_start)) {\n-                drflac_uint32 iSeekpoint;\n-\n-                for (iSeekpoint = 0; iSeekpoint < seekpointCount; iSeekpoint += 1) {\n-                    if (pFlac->bs.onRead(pFlac->bs.pUserData, pFlac->pSeekpoints + iSeekpoint, DRFLAC_SEEKPOINT_SIZE_IN_BYTES) == DRFLAC_SEEKPOINT_SIZE_IN_BYTES) {\n-                        /* Endian swap. */\n+                if (pFlac->bs.onRead(pFlac->bs.pUserData, pFlac->pSeekpoints, seektableSize) == seektableSize) {\n+                    /* Endian swap. */\n+                    drflac_uint32 iSeekpoint;\n+                    for (iSeekpoint = 0; iSeekpoint < pFlac->seekpointCount; ++iSeekpoint) {\n                         pFlac->pSeekpoints[iSeekpoint].firstPCMFrame   = drflac__be2host_64(pFlac->pSeekpoints[iSeekpoint].firstPCMFrame);\n                         pFlac->pSeekpoints[iSeekpoint].flacFrameOffset = drflac__be2host_64(pFlac->pSeekpoints[iSeekpoint].flacFrameOffset);\n                         pFlac->pSeekpoints[iSeekpoint].pcmFrameCount   = drflac__be2host_16(pFlac->pSeekpoints[iSeekpoint].pcmFrameCount);\n-                    } else {\n-                        /* Failed to read the seektable. Pretend we don't have one. */\n-                        pFlac->pSeekpoints = NULL;\n-                        pFlac->seekpointCount = 0;\n-                        break;\n                     }\n+                } else {\n+                    /* Failed to read the seektable. Pretend we don't have one. */\n+                    pFlac->pSeekpoints = NULL;\n+                    pFlac->seekpointCount = 0;\n                 }\n \n                 /* We need to seek back to where we were. If this fails it's a critical error. */\n@@ -8118,697 +7371,33 @@ static drflac* drflac_open_with_metadata_private(drflac_read_proc onRead, drflac\n     }\n \n \n-    /*\n-    If we get here, but don't have a STREAMINFO block, it means we've opened the stream in relaxed mode and need to decode\n-    the first frame.\n-    */\n-    if (!init.hasStreamInfoBlock) {\n-        pFlac->currentFLACFrame.header = init.firstFrameHeader;\n-        for (;;) {\n-            drflac_result result = drflac__decode_flac_frame(pFlac);\n-            if (result == DRFLAC_SUCCESS) {\n-                break;\n-            } else {\n-                if (result == DRFLAC_CRC_MISMATCH) {\n-                    if (!drflac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) {\n-                        drflac__free_from_callbacks(pFlac, &allocationCallbacks);\n-                        return NULL;\n-                    }\n-                    continue;\n-                } else {\n-                    drflac__free_from_callbacks(pFlac, &allocationCallbacks);\n-                    return NULL;\n-                }\n-            }\n-        }\n-    }\n-\n-    return pFlac;\n-}\n-\n-\n-\n-#ifndef DR_FLAC_NO_STDIO\n-#include <stdio.h>\n-#ifndef DR_FLAC_NO_WCHAR\n-#include <wchar.h>      /* For wcslen(), wcsrtombs() */\n-#endif\n-\n-/* Errno */\n-/* drflac_result_from_errno() is only used for fopen() and wfopen() so putting it inside DR_WAV_NO_STDIO for now. If something else needs this later we can move it out. */\n-#include <errno.h>\n-static drflac_result drflac_result_from_errno(int e)\n-{\n-    switch (e)\n-    {\n-        case 0: return DRFLAC_SUCCESS;\n-    #ifdef EPERM\n-        case EPERM: return DRFLAC_INVALID_OPERATION;\n-    #endif\n-    #ifdef ENOENT\n-        case ENOENT: return DRFLAC_DOES_NOT_EXIST;\n-    #endif\n-    #ifdef ESRCH\n-        case ESRCH: return DRFLAC_DOES_NOT_EXIST;\n-    #endif\n-    #ifdef EINTR\n-        case EINTR: return DRFLAC_INTERRUPT;\n-    #endif\n-    #ifdef EIO\n-        case EIO: return DRFLAC_IO_ERROR;\n-    #endif\n-    #ifdef ENXIO\n-        case ENXIO: return DRFLAC_DOES_NOT_EXIST;\n-    #endif\n-    #ifdef E2BIG\n-        case E2BIG: return DRFLAC_INVALID_ARGS;\n-    #endif\n-    #ifdef ENOEXEC\n-        case ENOEXEC: return DRFLAC_INVALID_FILE;\n-    #endif\n-    #ifdef EBADF\n-        case EBADF: return DRFLAC_INVALID_FILE;\n-    #endif\n-    #ifdef ECHILD\n-        case ECHILD: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EAGAIN\n-        case EAGAIN: return DRFLAC_UNAVAILABLE;\n-    #endif\n-    #ifdef ENOMEM\n-        case ENOMEM: return DRFLAC_OUT_OF_MEMORY;\n-    #endif\n-    #ifdef EACCES\n-        case EACCES: return DRFLAC_ACCESS_DENIED;\n-    #endif\n-    #ifdef EFAULT\n-        case EFAULT: return DRFLAC_BAD_ADDRESS;\n-    #endif\n-    #ifdef ENOTBLK\n-        case ENOTBLK: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EBUSY\n-        case EBUSY: return DRFLAC_BUSY;\n-    #endif\n-    #ifdef EEXIST\n-        case EEXIST: return DRFLAC_ALREADY_EXISTS;\n-    #endif\n-    #ifdef EXDEV\n-        case EXDEV: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ENODEV\n-        case ENODEV: return DRFLAC_DOES_NOT_EXIST;\n-    #endif\n-    #ifdef ENOTDIR\n-        case ENOTDIR: return DRFLAC_NOT_DIRECTORY;\n-    #endif\n-    #ifdef EISDIR\n-        case EISDIR: return DRFLAC_IS_DIRECTORY;\n-    #endif\n-    #ifdef EINVAL\n-        case EINVAL: return DRFLAC_INVALID_ARGS;\n-    #endif\n-    #ifdef ENFILE\n-        case ENFILE: return DRFLAC_TOO_MANY_OPEN_FILES;\n-    #endif\n-    #ifdef EMFILE\n-        case EMFILE: return DRFLAC_TOO_MANY_OPEN_FILES;\n-    #endif\n-    #ifdef ENOTTY\n-        case ENOTTY: return DRFLAC_INVALID_OPERATION;\n-    #endif\n-    #ifdef ETXTBSY\n-        case ETXTBSY: return DRFLAC_BUSY;\n-    #endif\n-    #ifdef EFBIG\n-        case EFBIG: return DRFLAC_TOO_BIG;\n-    #endif\n-    #ifdef ENOSPC\n-        case ENOSPC: return DRFLAC_NO_SPACE;\n-    #endif\n-    #ifdef ESPIPE\n-        case ESPIPE: return DRFLAC_BAD_SEEK;\n-    #endif\n-    #ifdef EROFS\n-        case EROFS: return DRFLAC_ACCESS_DENIED;\n-    #endif\n-    #ifdef EMLINK\n-        case EMLINK: return DRFLAC_TOO_MANY_LINKS;\n-    #endif\n-    #ifdef EPIPE\n-        case EPIPE: return DRFLAC_BAD_PIPE;\n-    #endif\n-    #ifdef EDOM\n-        case EDOM: return DRFLAC_OUT_OF_RANGE;\n-    #endif\n-    #ifdef ERANGE\n-        case ERANGE: return DRFLAC_OUT_OF_RANGE;\n-    #endif\n-    #ifdef EDEADLK\n-        case EDEADLK: return DRFLAC_DEADLOCK;\n-    #endif\n-    #ifdef ENAMETOOLONG\n-        case ENAMETOOLONG: return DRFLAC_PATH_TOO_LONG;\n-    #endif\n-    #ifdef ENOLCK\n-        case ENOLCK: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ENOSYS\n-        case ENOSYS: return DRFLAC_NOT_IMPLEMENTED;\n-    #endif\n-    #ifdef ENOTEMPTY\n-        case ENOTEMPTY: return DRFLAC_DIRECTORY_NOT_EMPTY;\n-    #endif\n-    #ifdef ELOOP\n-        case ELOOP: return DRFLAC_TOO_MANY_LINKS;\n-    #endif\n-    #ifdef ENOMSG\n-        case ENOMSG: return DRFLAC_NO_MESSAGE;\n-    #endif\n-    #ifdef EIDRM\n-        case EIDRM: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ECHRNG\n-        case ECHRNG: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EL2NSYNC\n-        case EL2NSYNC: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EL3HLT\n-        case EL3HLT: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EL3RST\n-        case EL3RST: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ELNRNG\n-        case ELNRNG: return DRFLAC_OUT_OF_RANGE;\n-    #endif\n-    #ifdef EUNATCH\n-        case EUNATCH: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ENOCSI\n-        case ENOCSI: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EL2HLT\n-        case EL2HLT: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EBADE\n-        case EBADE: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EBADR\n-        case EBADR: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EXFULL\n-        case EXFULL: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ENOANO\n-        case ENOANO: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EBADRQC\n-        case EBADRQC: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EBADSLT\n-        case EBADSLT: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EBFONT\n-        case EBFONT: return DRFLAC_INVALID_FILE;\n-    #endif\n-    #ifdef ENOSTR\n-        case ENOSTR: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ENODATA\n-        case ENODATA: return DRFLAC_NO_DATA_AVAILABLE;\n-    #endif\n-    #ifdef ETIME\n-        case ETIME: return DRFLAC_TIMEOUT;\n-    #endif\n-    #ifdef ENOSR\n-        case ENOSR: return DRFLAC_NO_DATA_AVAILABLE;\n-    #endif\n-    #ifdef ENONET\n-        case ENONET: return DRFLAC_NO_NETWORK;\n-    #endif\n-    #ifdef ENOPKG\n-        case ENOPKG: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EREMOTE\n-        case EREMOTE: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ENOLINK\n-        case ENOLINK: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EADV\n-        case EADV: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ESRMNT\n-        case ESRMNT: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ECOMM\n-        case ECOMM: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EPROTO\n-        case EPROTO: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EMULTIHOP\n-        case EMULTIHOP: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EDOTDOT\n-        case EDOTDOT: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EBADMSG\n-        case EBADMSG: return DRFLAC_BAD_MESSAGE;\n-    #endif\n-    #ifdef EOVERFLOW\n-        case EOVERFLOW: return DRFLAC_TOO_BIG;\n-    #endif\n-    #ifdef ENOTUNIQ\n-        case ENOTUNIQ: return DRFLAC_NOT_UNIQUE;\n-    #endif\n-    #ifdef EBADFD\n-        case EBADFD: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EREMCHG\n-        case EREMCHG: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ELIBACC\n-        case ELIBACC: return DRFLAC_ACCESS_DENIED;\n-    #endif\n-    #ifdef ELIBBAD\n-        case ELIBBAD: return DRFLAC_INVALID_FILE;\n-    #endif\n-    #ifdef ELIBSCN\n-        case ELIBSCN: return DRFLAC_INVALID_FILE;\n-    #endif\n-    #ifdef ELIBMAX\n-        case ELIBMAX: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ELIBEXEC\n-        case ELIBEXEC: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EILSEQ\n-        case EILSEQ: return DRFLAC_INVALID_DATA;\n-    #endif\n-    #ifdef ERESTART\n-        case ERESTART: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ESTRPIPE\n-        case ESTRPIPE: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EUSERS\n-        case EUSERS: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ENOTSOCK\n-        case ENOTSOCK: return DRFLAC_NOT_SOCKET;\n-    #endif\n-    #ifdef EDESTADDRREQ\n-        case EDESTADDRREQ: return DRFLAC_NO_ADDRESS;\n-    #endif\n-    #ifdef EMSGSIZE\n-        case EMSGSIZE: return DRFLAC_TOO_BIG;\n-    #endif\n-    #ifdef EPROTOTYPE\n-        case EPROTOTYPE: return DRFLAC_BAD_PROTOCOL;\n-    #endif\n-    #ifdef ENOPROTOOPT\n-        case ENOPROTOOPT: return DRFLAC_PROTOCOL_UNAVAILABLE;\n-    #endif\n-    #ifdef EPROTONOSUPPORT\n-        case EPROTONOSUPPORT: return DRFLAC_PROTOCOL_NOT_SUPPORTED;\n-    #endif\n-    #ifdef ESOCKTNOSUPPORT\n-        case ESOCKTNOSUPPORT: return DRFLAC_SOCKET_NOT_SUPPORTED;\n-    #endif\n-    #ifdef EOPNOTSUPP\n-        case EOPNOTSUPP: return DRFLAC_INVALID_OPERATION;\n-    #endif\n-    #ifdef EPFNOSUPPORT\n-        case EPFNOSUPPORT: return DRFLAC_PROTOCOL_FAMILY_NOT_SUPPORTED;\n-    #endif\n-    #ifdef EAFNOSUPPORT\n-        case EAFNOSUPPORT: return DRFLAC_ADDRESS_FAMILY_NOT_SUPPORTED;\n-    #endif\n-    #ifdef EADDRINUSE\n-        case EADDRINUSE: return DRFLAC_ALREADY_IN_USE;\n-    #endif\n-    #ifdef EADDRNOTAVAIL\n-        case EADDRNOTAVAIL: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ENETDOWN\n-        case ENETDOWN: return DRFLAC_NO_NETWORK;\n-    #endif\n-    #ifdef ENETUNREACH\n-        case ENETUNREACH: return DRFLAC_NO_NETWORK;\n-    #endif\n-    #ifdef ENETRESET\n-        case ENETRESET: return DRFLAC_NO_NETWORK;\n-    #endif\n-    #ifdef ECONNABORTED\n-        case ECONNABORTED: return DRFLAC_NO_NETWORK;\n-    #endif\n-    #ifdef ECONNRESET\n-        case ECONNRESET: return DRFLAC_CONNECTION_RESET;\n-    #endif\n-    #ifdef ENOBUFS\n-        case ENOBUFS: return DRFLAC_NO_SPACE;\n-    #endif\n-    #ifdef EISCONN\n-        case EISCONN: return DRFLAC_ALREADY_CONNECTED;\n-    #endif\n-    #ifdef ENOTCONN\n-        case ENOTCONN: return DRFLAC_NOT_CONNECTED;\n-    #endif\n-    #ifdef ESHUTDOWN\n-        case ESHUTDOWN: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ETOOMANYREFS\n-        case ETOOMANYREFS: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ETIMEDOUT\n-        case ETIMEDOUT: return DRFLAC_TIMEOUT;\n-    #endif\n-    #ifdef ECONNREFUSED\n-        case ECONNREFUSED: return DRFLAC_CONNECTION_REFUSED;\n-    #endif\n-    #ifdef EHOSTDOWN\n-        case EHOSTDOWN: return DRFLAC_NO_HOST;\n-    #endif\n-    #ifdef EHOSTUNREACH\n-        case EHOSTUNREACH: return DRFLAC_NO_HOST;\n-    #endif\n-    #ifdef EALREADY\n-        case EALREADY: return DRFLAC_IN_PROGRESS;\n-    #endif\n-    #ifdef EINPROGRESS\n-        case EINPROGRESS: return DRFLAC_IN_PROGRESS;\n-    #endif\n-    #ifdef ESTALE\n-        case ESTALE: return DRFLAC_INVALID_FILE;\n-    #endif\n-    #ifdef EUCLEAN\n-        case EUCLEAN: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ENOTNAM\n-        case ENOTNAM: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ENAVAIL\n-        case ENAVAIL: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EISNAM\n-        case EISNAM: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EREMOTEIO\n-        case EREMOTEIO: return DRFLAC_IO_ERROR;\n-    #endif\n-    #ifdef EDQUOT\n-        case EDQUOT: return DRFLAC_NO_SPACE;\n-    #endif\n-    #ifdef ENOMEDIUM\n-        case ENOMEDIUM: return DRFLAC_DOES_NOT_EXIST;\n-    #endif\n-    #ifdef EMEDIUMTYPE\n-        case EMEDIUMTYPE: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ECANCELED\n-        case ECANCELED: return DRFLAC_CANCELLED;\n-    #endif\n-    #ifdef ENOKEY\n-        case ENOKEY: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EKEYEXPIRED\n-        case EKEYEXPIRED: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EKEYREVOKED\n-        case EKEYREVOKED: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EKEYREJECTED\n-        case EKEYREJECTED: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EOWNERDEAD\n-        case EOWNERDEAD: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ENOTRECOVERABLE\n-        case ENOTRECOVERABLE: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef ERFKILL\n-        case ERFKILL: return DRFLAC_ERROR;\n-    #endif\n-    #ifdef EHWPOISON\n-        case EHWPOISON: return DRFLAC_ERROR;\n-    #endif\n-        default: return DRFLAC_ERROR;\n-    }\n-}\n-/* End Errno */\n-\n-/* fopen */\n-static drflac_result drflac_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode)\n-{\n-#if defined(_MSC_VER) && _MSC_VER >= 1400\n-    errno_t err;\n-#endif\n-\n-    if (ppFile != NULL) {\n-        *ppFile = NULL;  /* Safety. */\n-    }\n-\n-    if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) {\n-        return DRFLAC_INVALID_ARGS;\n-    }\n-\n-#if defined(_MSC_VER) && _MSC_VER >= 1400\n-    err = fopen_s(ppFile, pFilePath, pOpenMode);\n-    if (err != 0) {\n-        return drflac_result_from_errno(err);\n-    }\n-#else\n-#if defined(_WIN32) || defined(__APPLE__)\n-    *ppFile = fopen(pFilePath, pOpenMode);\n-#else\n-    #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && defined(_LARGEFILE64_SOURCE)\n-        *ppFile = fopen64(pFilePath, pOpenMode);\n-    #else\n-        *ppFile = fopen(pFilePath, pOpenMode);\n-    #endif\n-#endif\n-    if (*ppFile == NULL) {\n-        drflac_result result = drflac_result_from_errno(errno);\n-        if (result == DRFLAC_SUCCESS) {\n-            result = DRFLAC_ERROR;   /* Just a safety check to make sure we never ever return success when pFile == NULL. */\n-        }\n-\n-        return result;\n-    }\n-#endif\n-\n-    return DRFLAC_SUCCESS;\n-}\n-\n-/*\n-_wfopen() isn't always available in all compilation environments.\n-\n-    * Windows only.\n-    * MSVC seems to support it universally as far back as VC6 from what I can tell (haven't checked further back).\n-    * MinGW-64 (both 32- and 64-bit) seems to support it.\n-    * MinGW wraps it in !defined(__STRICT_ANSI__).\n-    * OpenWatcom wraps it in !defined(_NO_EXT_KEYS).\n-\n-This can be reviewed as compatibility issues arise. The preference is to use _wfopen_s() and _wfopen() as opposed to the wcsrtombs()\n-fallback, so if you notice your compiler not detecting this properly I'm happy to look at adding support.\n-*/\n-#if defined(_WIN32)\n-    #if defined(_MSC_VER) || defined(__MINGW64__) || (!defined(__STRICT_ANSI__) && !defined(_NO_EXT_KEYS))\n-        #define DRFLAC_HAS_WFOPEN\n-    #endif\n-#endif\n-\n-#ifndef DR_FLAC_NO_WCHAR\n-static drflac_result drflac_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_t* pOpenMode, const drflac_allocation_callbacks* pAllocationCallbacks)\n-{\n-    if (ppFile != NULL) {\n-        *ppFile = NULL;  /* Safety. */\n-    }\n-\n-    if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) {\n-        return DRFLAC_INVALID_ARGS;\n-    }\n-\n-#if defined(DRFLAC_HAS_WFOPEN)\n-    {\n-        /* Use _wfopen() on Windows. */\n-    #if defined(_MSC_VER) && _MSC_VER >= 1400\n-        errno_t err = _wfopen_s(ppFile, pFilePath, pOpenMode);\n-        if (err != 0) {\n-            return drflac_result_from_errno(err);\n-        }\n-    #else\n-        *ppFile = _wfopen(pFilePath, pOpenMode);\n-        if (*ppFile == NULL) {\n-            return drflac_result_from_errno(errno);\n-        }\n-    #endif\n-        (void)pAllocationCallbacks;\n-    }\n-#else\n-    /*\n-    Use fopen() on anything other than Windows. Requires a conversion. This is annoying because\n-\tfopen() is locale specific. The only real way I can think of to do this is with wcsrtombs(). Note\n-\tthat wcstombs() is apparently not thread-safe because it uses a static global mbstate_t object for\n-    maintaining state. I've checked this with -std=c89 and it works, but if somebody get's a compiler\n-\terror I'll look into improving compatibility.\n-    */\n-\n-\t/*\n-\tSome compilers don't support wchar_t or wcsrtombs() which we're using below. In this case we just\n-\tneed to abort with an error. If you encounter a compiler lacking such support, add it to this list\n-\tand submit a bug report and it'll be added to the library upstream.\n-\t*/\n-\t#if defined(__DJGPP__)\n-\t{\n-\t\t/* Nothing to do here. This will fall through to the error check below. */\n-\t}\n-\t#else\n-    {\n-        mbstate_t mbs;\n-        size_t lenMB;\n-        const wchar_t* pFilePathTemp = pFilePath;\n-        char* pFilePathMB = NULL;\n-        char pOpenModeMB[32] = {0};\n-\n-        /* Get the length first. */\n-        DRFLAC_ZERO_OBJECT(&mbs);\n-        lenMB = wcsrtombs(NULL, &pFilePathTemp, 0, &mbs);\n-        if (lenMB == (size_t)-1) {\n-            return drflac_result_from_errno(errno);\n-        }\n-\n-        pFilePathMB = (char*)drflac__malloc_from_callbacks(lenMB + 1, pAllocationCallbacks);\n-        if (pFilePathMB == NULL) {\n-            return DRFLAC_OUT_OF_MEMORY;\n-        }\n-\n-        pFilePathTemp = pFilePath;\n-        DRFLAC_ZERO_OBJECT(&mbs);\n-        wcsrtombs(pFilePathMB, &pFilePathTemp, lenMB + 1, &mbs);\n-\n-        /* The open mode should always consist of ASCII characters so we should be able to do a trivial conversion. */\n-        {\n-            size_t i = 0;\n-            for (;;) {\n-                if (pOpenMode[i] == 0) {\n-                    pOpenModeMB[i] = '\\0';\n-                    break;\n-                }\n-\n-                pOpenModeMB[i] = (char)pOpenMode[i];\n-                i += 1;\n-            }\n-        }\n-\n-        *ppFile = fopen(pFilePathMB, pOpenModeMB);\n-\n-        drflac__free_from_callbacks(pFilePathMB, pAllocationCallbacks);\n-    }\n-\t#endif\n-\n-    if (*ppFile == NULL) {\n-        return DRFLAC_ERROR;\n-    }\n-#endif\n-\n-    return DRFLAC_SUCCESS;\n-}\n-#endif\n-/* End fopen */\n-\n-static size_t drflac__on_read_stdio(void* pUserData, void* bufferOut, size_t bytesToRead)\n-{\n-    return fread(bufferOut, 1, bytesToRead, (FILE*)pUserData);\n-}\n-\n-static drflac_bool32 drflac__on_seek_stdio(void* pUserData, int offset, drflac_seek_origin origin)\n-{\n-    DRFLAC_ASSERT(offset >= 0);  /* <-- Never seek backwards. */\n-\n-    return fseek((FILE*)pUserData, offset, (origin == drflac_seek_origin_current) ? SEEK_CUR : SEEK_SET) == 0;\n-}\n-\n-\n-DRFLAC_API drflac* drflac_open_file(const char* pFileName, const drflac_allocation_callbacks* pAllocationCallbacks)\n-{\n-    drflac* pFlac;\n-    FILE* pFile;\n-\n-    if (drflac_fopen(&pFile, pFileName, \"rb\") != DRFLAC_SUCCESS) {\n-        return NULL;\n-    }\n-\n-    pFlac = drflac_open(drflac__on_read_stdio, drflac__on_seek_stdio, (void*)pFile, pAllocationCallbacks);\n-    if (pFlac == NULL) {\n-        fclose(pFile);\n-        return NULL;\n-    }\n-\n-    return pFlac;\n-}\n-\n-#ifndef DR_FLAC_NO_WCHAR\n-DRFLAC_API drflac* drflac_open_file_w(const wchar_t* pFileName, const drflac_allocation_callbacks* pAllocationCallbacks)\n-{\n-    drflac* pFlac;\n-    FILE* pFile;\n-\n-    if (drflac_wfopen(&pFile, pFileName, L\"rb\", pAllocationCallbacks) != DRFLAC_SUCCESS) {\n-        return NULL;\n-    }\n-\n-    pFlac = drflac_open(drflac__on_read_stdio, drflac__on_seek_stdio, (void*)pFile, pAllocationCallbacks);\n-    if (pFlac == NULL) {\n-        fclose(pFile);\n-        return NULL;\n-    }\n-\n-    return pFlac;\n-}\n-#endif\n-\n-DRFLAC_API drflac* drflac_open_file_with_metadata(const char* pFileName, drflac_meta_proc onMeta, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks)\n-{\n-    drflac* pFlac;\n-    FILE* pFile;\n-\n-    if (drflac_fopen(&pFile, pFileName, \"rb\") != DRFLAC_SUCCESS) {\n-        return NULL;\n-    }\n-\n-    pFlac = drflac_open_with_metadata_private(drflac__on_read_stdio, drflac__on_seek_stdio, onMeta, drflac_container_unknown, (void*)pFile, pUserData, pAllocationCallbacks);\n-    if (pFlac == NULL) {\n-        fclose(pFile);\n-        return pFlac;\n-    }\n-\n-    return pFlac;\n-}\n-\n-#ifndef DR_FLAC_NO_WCHAR\n-DRFLAC_API drflac* drflac_open_file_with_metadata_w(const wchar_t* pFileName, drflac_meta_proc onMeta, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks)\n-{\n-    drflac* pFlac;\n-    FILE* pFile;\n-\n-    if (drflac_wfopen(&pFile, pFileName, L\"rb\", pAllocationCallbacks) != DRFLAC_SUCCESS) {\n-        return NULL;\n-    }\n-\n-    pFlac = drflac_open_with_metadata_private(drflac__on_read_stdio, drflac__on_seek_stdio, onMeta, drflac_container_unknown, (void*)pFile, pUserData, pAllocationCallbacks);\n-    if (pFlac == NULL) {\n-        fclose(pFile);\n-        return pFlac;\n+    /*\n+    If we get here, but don't have a STREAMINFO block, it means we've opened the stream in relaxed mode and need to decode\n+    the first frame.\n+    */\n+    if (!init.hasStreamInfoBlock) {\n+        pFlac->currentFLACFrame.header = init.firstFrameHeader;\n+        for (;;) {\n+            drflac_result result = drflac__decode_flac_frame(pFlac);\n+            if (result == DRFLAC_SUCCESS) {\n+                break;\n+            } else {\n+                if (result == DRFLAC_CRC_MISMATCH) {\n+                    if (!drflac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) {\n+                        drflac__free_from_callbacks(pFlac, &allocationCallbacks);\n+                        return NULL;\n+                    }\n+                    continue;\n+                } else {\n+                    drflac__free_from_callbacks(pFlac, &allocationCallbacks);\n+                    return NULL;\n+                }\n+            }\n+        }\n     }\n \n     return pFlac;\n }\n-#endif\n-#endif  /* DR_FLAC_NO_STDIO */\n \n static size_t drflac__on_read_memory(void* pUserData, void* bufferOut, size_t bytesToRead)\n {\n@@ -8947,47 +7536,9 @@ DRFLAC_API void drflac_close(drflac* pFlac)\n         return;\n     }\n \n-#ifndef DR_FLAC_NO_STDIO\n-    /*\n-    If we opened the file with drflac_open_file() we will want to close the file handle. We can know whether or not drflac_open_file()\n-    was used by looking at the callbacks.\n-    */\n-    if (pFlac->bs.onRead == drflac__on_read_stdio) {\n-        fclose((FILE*)pFlac->bs.pUserData);\n-    }\n-\n-#ifndef DR_FLAC_NO_OGG\n-    /* Need to clean up Ogg streams a bit differently due to the way the bit streaming is chained. */\n-    if (pFlac->container == drflac_container_ogg) {\n-        drflac_oggbs* oggbs = (drflac_oggbs*)pFlac->_oggbs;\n-        DRFLAC_ASSERT(pFlac->bs.onRead == drflac__on_read_ogg);\n-\n-        if (oggbs->onRead == drflac__on_read_stdio) {\n-            fclose((FILE*)oggbs->pUserData);\n-        }\n-    }\n-#endif\n-#endif\n-\n     drflac__free_from_callbacks(pFlac, &pFlac->allocationCallbacks);\n }\n \n-\n-#if 0\n-static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_left_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples)\n-{\n-    drflac_uint64 i;\n-    for (i = 0; i < frameCount; ++i) {\n-        drflac_uint32 left  = (drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n-        drflac_uint32 side  = (drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n-        drflac_uint32 right = left - side;\n-\n-        pOutputSamples[i*2+0] = (drflac_int32)left;\n-        pOutputSamples[i*2+1] = (drflac_int32)right;\n-    }\n-}\n-#endif\n-\n static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_left_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples)\n {\n     drflac_uint64 i;\n@@ -9118,30 +7669,11 @@ static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_left_side(drflac* p\n #endif\n     {\n         /* Scalar fallback. */\n-#if 0\n-        drflac_read_pcm_frames_s32__decode_left_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#else\n         drflac_read_pcm_frames_s32__decode_left_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#endif\n     }\n }\n \n \n-#if 0\n-static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_right_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples)\n-{\n-    drflac_uint64 i;\n-    for (i = 0; i < frameCount; ++i) {\n-        drflac_uint32 side  = (drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n-        drflac_uint32 right = (drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n-        drflac_uint32 left  = right + side;\n-\n-        pOutputSamples[i*2+0] = (drflac_int32)left;\n-        pOutputSamples[i*2+1] = (drflac_int32)right;\n-    }\n-}\n-#endif\n-\n static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_right_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples)\n {\n     drflac_uint64 i;\n@@ -9272,30 +7804,11 @@ static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_right_side(drflac*\n #endif\n     {\n         /* Scalar fallback. */\n-#if 0\n-        drflac_read_pcm_frames_s32__decode_right_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#else\n         drflac_read_pcm_frames_s32__decode_right_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#endif\n     }\n }\n \n \n-#if 0\n-static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_mid_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples)\n-{\n-    for (drflac_uint64 i = 0; i < frameCount; ++i) {\n-        drflac_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n-        drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n-\n-        mid = (mid << 1) | (side & 0x01);\n-\n-        pOutputSamples[i*2+0] = (drflac_int32)((drflac_uint32)((drflac_int32)(mid + side) >> 1) << unusedBitsPerSample);\n-        pOutputSamples[i*2+1] = (drflac_int32)((drflac_uint32)((drflac_int32)(mid - side) >> 1) << unusedBitsPerSample);\n-    }\n-}\n-#endif\n-\n static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_mid_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples)\n {\n     drflac_uint64 i;\n@@ -9574,24 +8087,9 @@ static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_mid_side(drflac* pF\n #endif\n     {\n         /* Scalar fallback. */\n-#if 0\n-        drflac_read_pcm_frames_s32__decode_mid_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#else\n         drflac_read_pcm_frames_s32__decode_mid_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#endif\n-    }\n-}\n-\n-\n-#if 0\n-static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_independent_stereo__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples)\n-{\n-    for (drflac_uint64 i = 0; i < frameCount; ++i) {\n-        pOutputSamples[i*2+0] = (drflac_int32)((drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample));\n-        pOutputSamples[i*2+1] = (drflac_int32)((drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample));\n     }\n }\n-#endif\n \n static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_independent_stereo__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples)\n {\n@@ -9697,11 +8195,7 @@ static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_independent_stereo(\n #endif\n     {\n         /* Scalar fallback. */\n-#if 0\n-        drflac_read_pcm_frames_s32__decode_independent_stereo__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#else\n         drflac_read_pcm_frames_s32__decode_independent_stereo__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#endif\n     }\n }\n \n@@ -9787,25 +8281,6 @@ DRFLAC_API drflac_uint64 drflac_read_pcm_frames_s32(drflac* pFlac, drflac_uint64\n     return framesRead;\n }\n \n-\n-#if 0\n-static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_left_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples)\n-{\n-    drflac_uint64 i;\n-    for (i = 0; i < frameCount; ++i) {\n-        drflac_uint32 left  = (drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n-        drflac_uint32 side  = (drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n-        drflac_uint32 right = left - side;\n-\n-        left  >>= 16;\n-        right >>= 16;\n-\n-        pOutputSamples[i*2+0] = (drflac_int16)left;\n-        pOutputSamples[i*2+1] = (drflac_int16)right;\n-    }\n-}\n-#endif\n-\n static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_left_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples)\n {\n     drflac_uint64 i;\n@@ -9960,32 +8435,9 @@ static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_left_side(drflac* p\n #endif\n     {\n         /* Scalar fallback. */\n-#if 0\n-        drflac_read_pcm_frames_s16__decode_left_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#else\n         drflac_read_pcm_frames_s16__decode_left_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#endif\n-    }\n-}\n-\n-\n-#if 0\n-static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_right_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples)\n-{\n-    drflac_uint64 i;\n-    for (i = 0; i < frameCount; ++i) {\n-        drflac_uint32 side  = (drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n-        drflac_uint32 right = (drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n-        drflac_uint32 left  = right + side;\n-\n-        left  >>= 16;\n-        right >>= 16;\n-\n-        pOutputSamples[i*2+0] = (drflac_int16)left;\n-        pOutputSamples[i*2+1] = (drflac_int16)right;\n     }\n }\n-#endif\n \n static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_right_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples)\n {\n@@ -10141,29 +8593,9 @@ static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_right_side(drflac*\n #endif\n     {\n         /* Scalar fallback. */\n-#if 0\n-        drflac_read_pcm_frames_s16__decode_right_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#else\n         drflac_read_pcm_frames_s16__decode_right_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#endif\n-    }\n-}\n-\n-\n-#if 0\n-static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_mid_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples)\n-{\n-    for (drflac_uint64 i = 0; i < frameCount; ++i) {\n-        drflac_uint32 mid  = (drflac_uint32)pInputSamples0[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n-        drflac_uint32 side = (drflac_uint32)pInputSamples1[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n-\n-        mid = (mid << 1) | (side & 0x01);\n-\n-        pOutputSamples[i*2+0] = (drflac_int16)(((drflac_uint32)((drflac_int32)(mid + side) >> 1) << unusedBitsPerSample) >> 16);\n-        pOutputSamples[i*2+1] = (drflac_int16)(((drflac_uint32)((drflac_int32)(mid - side) >> 1) << unusedBitsPerSample) >> 16);\n     }\n }\n-#endif\n \n static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_mid_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples)\n {\n@@ -10471,24 +8903,9 @@ static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_mid_side(drflac* pF\n #endif\n     {\n         /* Scalar fallback. */\n-#if 0\n-        drflac_read_pcm_frames_s16__decode_mid_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#else\n         drflac_read_pcm_frames_s16__decode_mid_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#endif\n-    }\n-}\n-\n-\n-#if 0\n-static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_independent_stereo__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples)\n-{\n-    for (drflac_uint64 i = 0; i < frameCount; ++i) {\n-        pOutputSamples[i*2+0] = (drflac_int16)((drflac_int32)((drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample)) >> 16);\n-        pOutputSamples[i*2+1] = (drflac_int16)((drflac_int32)((drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample)) >> 16);\n     }\n }\n-#endif\n \n static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_independent_stereo__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples)\n {\n@@ -10610,11 +9027,7 @@ static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_independent_stereo(\n #endif\n     {\n         /* Scalar fallback. */\n-#if 0\n-        drflac_read_pcm_frames_s16__decode_independent_stereo__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#else\n         drflac_read_pcm_frames_s16__decode_independent_stereo__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#endif\n     }\n }\n \n@@ -10700,22 +9113,6 @@ DRFLAC_API drflac_uint64 drflac_read_pcm_frames_s16(drflac* pFlac, drflac_uint64\n     return framesRead;\n }\n \n-\n-#if 0\n-static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_left_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples)\n-{\n-    drflac_uint64 i;\n-    for (i = 0; i < frameCount; ++i) {\n-        drflac_uint32 left  = (drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n-        drflac_uint32 side  = (drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n-        drflac_uint32 right = left - side;\n-\n-        pOutputSamples[i*2+0] = (float)((drflac_int32)left  / 2147483648.0);\n-        pOutputSamples[i*2+1] = (float)((drflac_int32)right / 2147483648.0);\n-    }\n-}\n-#endif\n-\n static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_left_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples)\n {\n     drflac_uint64 i;\n@@ -10859,29 +9256,9 @@ static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_left_side(drflac* p\n #endif\n     {\n         /* Scalar fallback. */\n-#if 0\n-        drflac_read_pcm_frames_f32__decode_left_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#else\n         drflac_read_pcm_frames_f32__decode_left_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#endif\n-    }\n-}\n-\n-\n-#if 0\n-static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_right_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples)\n-{\n-    drflac_uint64 i;\n-    for (i = 0; i < frameCount; ++i) {\n-        drflac_uint32 side  = (drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n-        drflac_uint32 right = (drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n-        drflac_uint32 left  = right + side;\n-\n-        pOutputSamples[i*2+0] = (float)((drflac_int32)left  / 2147483648.0);\n-        pOutputSamples[i*2+1] = (float)((drflac_int32)right / 2147483648.0);\n     }\n }\n-#endif\n \n static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_right_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples)\n {\n@@ -11025,29 +9402,9 @@ static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_right_side(drflac*\n #endif\n     {\n         /* Scalar fallback. */\n-#if 0\n-        drflac_read_pcm_frames_f32__decode_right_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#else\n         drflac_read_pcm_frames_f32__decode_right_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#endif\n-    }\n-}\n-\n-\n-#if 0\n-static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_mid_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples)\n-{\n-    for (drflac_uint64 i = 0; i < frameCount; ++i) {\n-        drflac_uint32 mid  = (drflac_uint32)pInputSamples0[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n-        drflac_uint32 side = (drflac_uint32)pInputSamples1[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n-\n-        mid = (mid << 1) | (side & 0x01);\n-\n-        pOutputSamples[i*2+0] = (float)((((drflac_int32)(mid + side) >> 1) << (unusedBitsPerSample)) / 2147483648.0);\n-        pOutputSamples[i*2+1] = (float)((((drflac_int32)(mid - side) >> 1) << (unusedBitsPerSample)) / 2147483648.0);\n     }\n }\n-#endif\n \n static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_mid_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples)\n {\n@@ -11351,23 +9708,9 @@ static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_mid_side(drflac* pF\n #endif\n     {\n         /* Scalar fallback. */\n-#if 0\n-        drflac_read_pcm_frames_f32__decode_mid_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#else\n         drflac_read_pcm_frames_f32__decode_mid_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#endif\n-    }\n-}\n-\n-#if 0\n-static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_independent_stereo__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples)\n-{\n-    for (drflac_uint64 i = 0; i < frameCount; ++i) {\n-        pOutputSamples[i*2+0] = (float)((drflac_int32)((drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample)) / 2147483648.0);\n-        pOutputSamples[i*2+1] = (float)((drflac_int32)((drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample)) / 2147483648.0);\n     }\n }\n-#endif\n \n static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_independent_stereo__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples)\n {\n@@ -11492,11 +9835,7 @@ static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_independent_stereo(\n #endif\n     {\n         /* Scalar fallback. */\n-#if 0\n-        drflac_read_pcm_frames_f32__decode_independent_stereo__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#else\n         drflac_read_pcm_frames_f32__decode_independent_stereo__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n-#endif\n     }\n }\n \n@@ -11607,7 +9946,6 @@ DRFLAC_API drflac_bool32 drflac_seek_to_pcm_frame(drflac* pFlac, drflac_uint64 p\n         return drflac__seek_to_first_frame(pFlac);\n     } else {\n         drflac_bool32 wasSuccessful = DRFLAC_FALSE;\n-        drflac_uint64 originalPCMFrame = pFlac->currentPCMFrame;\n \n         /* Clamp the sample to the end. */\n         if (pcmFrameIndex > pFlac->totalPCMFrameCount) {\n@@ -11665,16 +10003,7 @@ DRFLAC_API drflac_bool32 drflac_seek_to_pcm_frame(drflac* pFlac, drflac_uint64 p\n             }\n         }\n \n-        if (wasSuccessful) {\n-            pFlac->currentPCMFrame = pcmFrameIndex;\n-        } else {\n-            /* Seek failed. Try putting the decoder back to it's original state. */\n-            if (drflac_seek_to_pcm_frame(pFlac, originalPCMFrame) == DRFLAC_FALSE) {\n-                /* Failed to seek back to the original PCM frame. Fall back to 0. */\n-                drflac_seek_to_pcm_frame(pFlac, 0);\n-            }\n-        }\n-\n+        pFlac->currentPCMFrame = pcmFrameIndex;\n         return wasSuccessful;\n     }\n }\n@@ -11683,7 +10012,6 @@ DRFLAC_API drflac_bool32 drflac_seek_to_pcm_frame(drflac* pFlac, drflac_uint64 p\n \n /* High Level APIs */\n \n-/* SIZE_MAX */\n #if defined(SIZE_MAX)\n     #define DRFLAC_SIZE_MAX  SIZE_MAX\n #else\n@@ -11693,7 +10021,6 @@ DRFLAC_API drflac_bool32 drflac_seek_to_pcm_frame(drflac* pFlac, drflac_uint64 p\n         #define DRFLAC_SIZE_MAX  0xFFFFFFFF\n     #endif\n #endif\n-/* End SIZE_MAX */\n \n \n /* Using a macro as the definition of the drflac__full_decode_and_close_*() API family. Sue me. */\n@@ -11742,7 +10069,7 @@ static type* drflac__full_read_and_close_ ## extension (drflac* pFlac, unsigned\n         DRFLAC_ZERO_MEMORY(pSampleData + (totalPCMFrameCount*pFlac->channels), (size_t)(sampleDataBufferSize - totalPCMFrameCount*pFlac->channels*sizeof(type)));   \\\n     } else {                                                                                                                                                        \\\n         drflac_uint64 dataSize = totalPCMFrameCount*pFlac->channels*sizeof(type);                                                                                   \\\n-        if (dataSize > (drflac_uint64)DRFLAC_SIZE_MAX) {                                                                                                            \\\n+        if (dataSize > DRFLAC_SIZE_MAX) {                                                                                                                           \\\n             goto on_error;  /* The decoded data is too big. */                                                                                                      \\\n         }                                                                                                                                                           \\\n                                                                                                                                                                     \\\n@@ -11836,74 +10163,6 @@ DRFLAC_API float* drflac_open_and_read_pcm_frames_f32(drflac_read_proc onRead, d\n     return drflac__full_read_and_close_f32(pFlac, channelsOut, sampleRateOut, totalPCMFrameCountOut);\n }\n \n-#ifndef DR_FLAC_NO_STDIO\n-DRFLAC_API drflac_int32* drflac_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks)\n-{\n-    drflac* pFlac;\n-\n-    if (sampleRate) {\n-        *sampleRate = 0;\n-    }\n-    if (channels) {\n-        *channels = 0;\n-    }\n-    if (totalPCMFrameCount) {\n-        *totalPCMFrameCount = 0;\n-    }\n-\n-    pFlac = drflac_open_file(filename, pAllocationCallbacks);\n-    if (pFlac == NULL) {\n-        return NULL;\n-    }\n-\n-    return drflac__full_read_and_close_s32(pFlac, channels, sampleRate, totalPCMFrameCount);\n-}\n-\n-DRFLAC_API drflac_int16* drflac_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks)\n-{\n-    drflac* pFlac;\n-\n-    if (sampleRate) {\n-        *sampleRate = 0;\n-    }\n-    if (channels) {\n-        *channels = 0;\n-    }\n-    if (totalPCMFrameCount) {\n-        *totalPCMFrameCount = 0;\n-    }\n-\n-    pFlac = drflac_open_file(filename, pAllocationCallbacks);\n-    if (pFlac == NULL) {\n-        return NULL;\n-    }\n-\n-    return drflac__full_read_and_close_s16(pFlac, channels, sampleRate, totalPCMFrameCount);\n-}\n-\n-DRFLAC_API float* drflac_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks)\n-{\n-    drflac* pFlac;\n-\n-    if (sampleRate) {\n-        *sampleRate = 0;\n-    }\n-    if (channels) {\n-        *channels = 0;\n-    }\n-    if (totalPCMFrameCount) {\n-        *totalPCMFrameCount = 0;\n-    }\n-\n-    pFlac = drflac_open_file(filename, pAllocationCallbacks);\n-    if (pFlac == NULL) {\n-        return NULL;\n-    }\n-\n-    return drflac__full_read_and_close_f32(pFlac, channels, sampleRate, totalPCMFrameCount);\n-}\n-#endif\n-\n DRFLAC_API drflac_int32* drflac_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks)\n {\n     drflac* pFlac;\n@@ -12007,7 +10266,7 @@ DRFLAC_API const char* drflac_next_vorbis_comment(drflac_vorbis_comment_iterator\n         return NULL;\n     }\n \n-    length = drflac__le2host_32_ptr_unaligned(pIter->pRunningData);\n+    length = drflac__le2host_32(*(const drflac_uint32*)pIter->pRunningData);\n     pIter->pRunningData += 4;\n \n     pComment = pIter->pRunningData;\n@@ -12077,57 +10336,6 @@ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterat\n /*\n REVISION HISTORY\n ================\n-v0.12.42 - 2023-11-02\n-  - Fix build for ARMv6-M.\n-  - Fix a compilation warning with GCC.\n-\n-v0.12.41 - 2023-06-17\n-  - Fix an incorrect date in revision history. No functional change.\n-\n-v0.12.40 - 2023-05-22\n-  - Minor code restructure. No functional change.\n-\n-v0.12.39 - 2022-09-17\n-  - Fix compilation with DJGPP.\n-  - Fix compilation error with Visual Studio 2019 and the ARM build.\n-  - Fix an error with SSE 4.1 detection.\n-  - Add support for disabling wchar_t with DR_WAV_NO_WCHAR.\n-  - Improve compatibility with compilers which lack support for explicit struct packing.\n-  - Improve compatibility with low-end and embedded hardware by reducing the amount of stack\n-    allocation when loading an Ogg encapsulated file.\n-\n-v0.12.38 - 2022-04-10\n-  - Fix compilation error on older versions of GCC.\n-\n-v0.12.37 - 2022-02-12\n-  - Improve ARM detection.\n-\n-v0.12.36 - 2022-02-07\n-  - Fix a compilation error with the ARM build.\n-\n-v0.12.35 - 2022-02-06\n-  - Fix a bug due to underestimating the amount of precision required for the prediction stage.\n-  - Fix some bugs found from fuzz testing.\n-\n-v0.12.34 - 2022-01-07\n-  - Fix some misalignment bugs when reading metadata.\n-\n-v0.12.33 - 2021-12-22\n-  - Fix a bug with seeking when the seek table does not start at PCM frame 0.\n-\n-v0.12.32 - 2021-12-11\n-  - Fix a warning with Clang.\n-\n-v0.12.31 - 2021-08-16\n-  - Silence some warnings.\n-\n-v0.12.30 - 2021-07-31\n-  - Fix platform detection for ARM64.\n-\n-v0.12.29 - 2021-04-02\n-  - Fix a bug where the running PCM frame index is set to an invalid value when over-seeking.\n-  - Fix a decoding error due to an incorrect validation check.\n-\n v0.12.28 - 2021-02-21\n   - Fix a warning due to referencing _MSC_VER when it is undefined.\n \n@@ -12517,7 +10725,7 @@ For more information, please refer to <http://unlicense.org/>\n ===============================================================================\n ALTERNATIVE 2 - MIT No Attribution\n ===============================================================================\n-Copyright 2023 David Reid\n+Copyright 2020 David Reid\n \n Permission is hereby granted, free of charge, to any person obtaining a copy of\n this software and associated documentation files (the \"Software\"), to deal in\ndiff --git a/libretro/deps/libchdr/include/libchdr/cdrom.h b/libretro/deps/libchdr/include/libchdr/cdrom.h\nindex 4ceb0b033..5bd4a2e02 100644\n--- a/libretro/deps/libchdr/include/libchdr/cdrom.h\n+++ b/libretro/deps/libchdr/include/libchdr/cdrom.h\n@@ -72,12 +72,12 @@ void ecc_clear(uint8_t *sector);\n     INLINE FUNCTIONS\n ***************************************************************************/\n \n-static INLINE uint32_t msf_to_lba(uint32_t msf)\n+INLINE uint32_t msf_to_lba(uint32_t msf)\n {\n \treturn ( ((msf&0x00ff0000)>>16) * 60 * 75) + (((msf&0x0000ff00)>>8) * 75) + ((msf&0x000000ff)>>0);\n }\n \n-static INLINE uint32_t lba_to_msf(uint32_t lba)\n+INLINE uint32_t lba_to_msf(uint32_t lba)\n {\n \tuint8_t m, s, f;\n \n@@ -96,7 +96,7 @@ static INLINE uint32_t lba_to_msf(uint32_t lba)\n  * Angelo also says PCE tracks often start playing at the\n  * wrong address.. related?\n  **/\n-static INLINE uint32_t lba_to_msf_alt(int lba)\n+INLINE uint32_t lba_to_msf_alt(int lba)\n {\n \tuint32_t ret = 0;\n \ndiff --git a/libretro/deps/libchdr/include/libchdr/chd.h b/libretro/deps/libchdr/include/libchdr/chd.h\nindex ed052ef7c..61b149dcf 100644\n--- a/libretro/deps/libchdr/include/libchdr/chd.h\n+++ b/libretro/deps/libchdr/include/libchdr/chd.h\n@@ -58,67 +58,67 @@ extern \"C\" {\n     V1 header:\n \n     [  0] char   tag[8];        // 'MComprHD'\n-    [  8] uint32_t length;        // length of header (including tag and length fields)\n-    [ 12] uint32_t version;       // drive format version\n-    [ 16] uint32_t flags;         // flags (see below)\n-    [ 20] uint32_t compression;   // compression type\n-    [ 24] uint32_t hunksize;      // 512-byte sectors per hunk\n-    [ 28] uint32_t totalhunks;    // total # of hunks represented\n-    [ 32] uint32_t cylinders;     // number of cylinders on hard disk\n-    [ 36] uint32_t heads;         // number of heads on hard disk\n-    [ 40] uint32_t sectors;       // number of sectors on hard disk\n-    [ 44] uint8_t  md5[16];       // MD5 checksum of raw data\n-    [ 60] uint8_t  parentmd5[16]; // MD5 checksum of parent file\n+    [  8] UINT32 length;        // length of header (including tag and length fields)\n+    [ 12] UINT32 version;       // drive format version\n+    [ 16] UINT32 flags;         // flags (see below)\n+    [ 20] UINT32 compression;   // compression type\n+    [ 24] UINT32 hunksize;      // 512-byte sectors per hunk\n+    [ 28] UINT32 totalhunks;    // total # of hunks represented\n+    [ 32] UINT32 cylinders;     // number of cylinders on hard disk\n+    [ 36] UINT32 heads;         // number of heads on hard disk\n+    [ 40] UINT32 sectors;       // number of sectors on hard disk\n+    [ 44] UINT8  md5[16];       // MD5 checksum of raw data\n+    [ 60] UINT8  parentmd5[16]; // MD5 checksum of parent file\n     [ 76] (V1 header length)\n \n     V2 header:\n \n     [  0] char   tag[8];        // 'MComprHD'\n-    [  8] uint32_t length;        // length of header (including tag and length fields)\n-    [ 12] uint32_t version;       // drive format version\n-    [ 16] uint32_t flags;         // flags (see below)\n-    [ 20] uint32_t compression;   // compression type\n-    [ 24] uint32_t hunksize;      // seclen-byte sectors per hunk\n-    [ 28] uint32_t totalhunks;    // total # of hunks represented\n-    [ 32] uint32_t cylinders;     // number of cylinders on hard disk\n-    [ 36] uint32_t heads;         // number of heads on hard disk\n-    [ 40] uint32_t sectors;       // number of sectors on hard disk\n-    [ 44] uint8_t  md5[16];       // MD5 checksum of raw data\n-    [ 60] uint8_t  parentmd5[16]; // MD5 checksum of parent file\n-    [ 76] uint32_t seclen;        // number of bytes per sector\n+    [  8] UINT32 length;        // length of header (including tag and length fields)\n+    [ 12] UINT32 version;       // drive format version\n+    [ 16] UINT32 flags;         // flags (see below)\n+    [ 20] UINT32 compression;   // compression type\n+    [ 24] UINT32 hunksize;      // seclen-byte sectors per hunk\n+    [ 28] UINT32 totalhunks;    // total # of hunks represented\n+    [ 32] UINT32 cylinders;     // number of cylinders on hard disk\n+    [ 36] UINT32 heads;         // number of heads on hard disk\n+    [ 40] UINT32 sectors;       // number of sectors on hard disk\n+    [ 44] UINT8  md5[16];       // MD5 checksum of raw data\n+    [ 60] UINT8  parentmd5[16]; // MD5 checksum of parent file\n+    [ 76] UINT32 seclen;        // number of bytes per sector\n     [ 80] (V2 header length)\n \n     V3 header:\n \n     [  0] char   tag[8];        // 'MComprHD'\n-    [  8] uint32_t length;        // length of header (including tag and length fields)\n-    [ 12] uint32_t version;       // drive format version\n-    [ 16] uint32_t flags;         // flags (see below)\n-    [ 20] uint32_t compression;   // compression type\n-    [ 24] uint32_t totalhunks;    // total # of hunks represented\n-    [ 28] uint64_t logicalbytes;  // logical size of the data (in bytes)\n-    [ 36] uint64_t metaoffset;    // offset to the first blob of metadata\n-    [ 44] uint8_t  md5[16];       // MD5 checksum of raw data\n-    [ 60] uint8_t  parentmd5[16]; // MD5 checksum of parent file\n-    [ 76] uint32_t hunkbytes;     // number of bytes per hunk\n-    [ 80] uint8_t  sha1[20];      // SHA1 checksum of raw data\n-    [100] uint8_t  parentsha1[20];// SHA1 checksum of parent file\n+    [  8] UINT32 length;        // length of header (including tag and length fields)\n+    [ 12] UINT32 version;       // drive format version\n+    [ 16] UINT32 flags;         // flags (see below)\n+    [ 20] UINT32 compression;   // compression type\n+    [ 24] UINT32 totalhunks;    // total # of hunks represented\n+    [ 28] UINT64 logicalbytes;  // logical size of the data (in bytes)\n+    [ 36] UINT64 metaoffset;    // offset to the first blob of metadata\n+    [ 44] UINT8  md5[16];       // MD5 checksum of raw data\n+    [ 60] UINT8  parentmd5[16]; // MD5 checksum of parent file\n+    [ 76] UINT32 hunkbytes;     // number of bytes per hunk\n+    [ 80] UINT8  sha1[20];      // SHA1 checksum of raw data\n+    [100] UINT8  parentsha1[20];// SHA1 checksum of parent file\n     [120] (V3 header length)\n \n     V4 header:\n \n     [  0] char   tag[8];        // 'MComprHD'\n-    [  8] uint32_t length;        // length of header (including tag and length fields)\n-    [ 12] uint32_t version;       // drive format version\n-    [ 16] uint32_t flags;         // flags (see below)\n-    [ 20] uint32_t compression;   // compression type\n-    [ 24] uint32_t totalhunks;    // total # of hunks represented\n-    [ 28] uint64_t logicalbytes;  // logical size of the data (in bytes)\n-    [ 36] uint64_t metaoffset;    // offset to the first blob of metadata\n-    [ 44] uint32_t hunkbytes;     // number of bytes per hunk\n-    [ 48] uint8_t  sha1[20];      // combined raw+meta SHA1\n-    [ 68] uint8_t  parentsha1[20];// combined raw+meta SHA1 of parent\n-    [ 88] uint8_t  rawsha1[20];   // raw data SHA1\n+    [  8] UINT32 length;        // length of header (including tag and length fields)\n+    [ 12] UINT32 version;       // drive format version\n+    [ 16] UINT32 flags;         // flags (see below)\n+    [ 20] UINT32 compression;   // compression type\n+    [ 24] UINT32 totalhunks;    // total # of hunks represented\n+    [ 28] UINT64 logicalbytes;  // logical size of the data (in bytes)\n+    [ 36] UINT64 metaoffset;    // offset to the first blob of metadata\n+    [ 44] UINT32 hunkbytes;     // number of bytes per hunk\n+    [ 48] UINT8  sha1[20];      // combined raw+meta SHA1\n+    [ 68] UINT8  parentsha1[20];// combined raw+meta SHA1 of parent\n+    [ 88] UINT8  rawsha1[20];   // raw data SHA1\n     [108] (V4 header length)\n \n     Flags:\n@@ -130,17 +130,17 @@ extern \"C\" {\n     V5 header:\n \n     [  0] char   tag[8];        // 'MComprHD'\n-    [  8] uint32_t_t length;        // length of header (including tag and length fields)\n-    [ 12] uint32_t_t version;       // drive format version\n-    [ 16] uint32_t_t compressors[4];// which custom compressors are used?\n-    [ 32] uint64_t_t logicalbytes;  // logical size of the data (in bytes)\n-    [ 40] uint64_t_t mapoffset;     // offset to the map\n-    [ 48] uint64_t_t metaoffset;    // offset to the first blob of metadata\n-    [ 56] uint32_t_t hunkbytes;     // number of bytes per hunk (512k maximum)\n-    [ 60] uint32_t_t unitbytes;     // number of bytes per unit within each hunk\n-    [ 64] uint8_t_t  rawsha1[20];   // raw data SHA1\n-    [ 84] uint8_t_t  sha1[20];      // combined raw+meta SHA1\n-    [104] uint8_t_t  parentsha1[20];// combined raw+meta SHA1 of parent\n+    [  8] uint32_t length;        // length of header (including tag and length fields)\n+    [ 12] uint32_t version;       // drive format version\n+    [ 16] uint32_t compressors[4];// which custom compressors are used?\n+    [ 32] uint64_t logicalbytes;  // logical size of the data (in bytes)\n+    [ 40] uint64_t mapoffset;     // offset to the map\n+    [ 48] uint64_t metaoffset;    // offset to the first blob of metadata\n+    [ 56] uint32_t hunkbytes;     // number of bytes per hunk (512k maximum)\n+    [ 60] uint32_t unitbytes;     // number of bytes per unit within each hunk\n+    [ 64] uint8_t  rawsha1[20];   // raw data SHA1\n+    [ 84] uint8_t  sha1[20];      // combined raw+meta SHA1\n+    [104] uint8_t  parentsha1[20];// combined raw+meta SHA1 of parent\n     [124] (V5 header length)\n \n     If parentsha1 != 0, we have a parent (no need for flags)\n@@ -148,22 +148,22 @@ extern \"C\" {\n \n     V5 uncompressed map format:\n \n-    [  0] uint32_t_t offset;        // starting offset / hunk size\n+    [  0] uint32_t offset;        // starting offset / hunk size\n \n     V5 compressed map format header:\n \n-    [  0] uint32_t_t length;        // length of compressed map\n+    [  0] uint32_t length;        // length of compressed map\n     [  4] UINT48 datastart;     // offset of first block\n     [ 10] uint16_t crc;           // crc-16 of the map\n-    [ 12] uint8_t_t lengthbits;     // bits used to encode complength\n-    [ 13] uint8_t_t hunkbits;       // bits used to encode self-refs\n-    [ 14] uint8_t_t parentunitbits; // bits used to encode parent unit refs\n-    [ 15] uint8_t_t reserved;       // future use\n+    [ 12] uint8_t lengthbits;     // bits used to encode complength\n+    [ 13] uint8_t hunkbits;       // bits used to encode self-refs\n+    [ 14] uint8_t parentunitbits; // bits used to encode parent unit refs\n+    [ 15] uint8_t reserved;       // future use\n     [ 16] (compressed header length)\n \n     Each compressed map entry, once expanded, looks like:\n \n-    [  0] uint8_t_t compression;    // compression type\n+    [  0] uint8_t compression;    // compression type\n     [  1] UINT24 complength;    // compressed length\n     [  4] UINT48 offset;        // offset\n     [ 10] uint16_t crc;           // crc-16 of the data\n@@ -204,15 +204,10 @@ extern \"C\" {\n \n #define CHD_CODEC_NONE 0\n #define CHD_CODEC_ZLIB\t\t\t\tCHD_MAKE_TAG('z','l','i','b')\n-#define CHD_CODEC_LZMA\t\t\t\tCHD_MAKE_TAG('l','z','m','a')\n-#define CHD_CODEC_HUFFMAN \t\t\tCHD_MAKE_TAG('h','u','f','f')\n-#define CHD_CODEC_FLAC\t\t\t\tCHD_MAKE_TAG('f','l','a','c')\n-#define CHD_CODEC_ZSTD\t\t\t\tCHD_MAKE_TAG('z', 's', 't', 'd')\n /* general codecs with CD frontend */\n #define CHD_CODEC_CD_ZLIB\t\t\tCHD_MAKE_TAG('c','d','z','l')\n #define CHD_CODEC_CD_LZMA\t\t\tCHD_MAKE_TAG('c','d','l','z')\n #define CHD_CODEC_CD_FLAC\t\t\tCHD_MAKE_TAG('c','d','f','l')\n-#define CHD_CODEC_CD_ZSTD\t\t\tCHD_MAKE_TAG('c','d','z','s')\n \n /* A/V codec configuration parameters */\n #define AV_CODEC_COMPRESS_CONFIG\t1\n@@ -220,7 +215,7 @@ extern \"C\" {\n \n /* metadata parameters */\n #define CHDMETATAG_WILDCARD\t\t\t0\n-#define CHD_METAINDEX_APPEND\t\t((uint32_t)-1)\n+#define CHD_METAINDEX_APPEND\t\t((UINT32)-1)\n \n /* metadata flags */\n #define CHD_MDFLAGS_CHECKSUM\t\t0x01\t\t/* indicates data is checksummed */\n@@ -307,32 +302,32 @@ typedef struct _chd_file chd_file;\n typedef struct _chd_header chd_header;\n struct _chd_header\n {\n-\tuint32_t\t\tlength;\t\t\t\t\t\t/* length of header data */\n-\tuint32_t\t\tversion;\t\t\t\t\t/* drive format version */\n-\tuint32_t\t\tflags;\t\t\t\t\t\t/* flags field */\n-\tuint32_t\t\tcompression[4];\t\t\t\t/* compression type */\n-\tuint32_t\t\thunkbytes;\t\t\t\t\t/* number of bytes per hunk */\n-\tuint32_t\t\ttotalhunks;\t\t\t\t\t/* total # of hunks represented */\n-\tuint64_t\t\tlogicalbytes;\t\t\t\t/* logical size of the data */\n-\tuint64_t\t\tmetaoffset;\t\t\t\t\t/* offset in file of first metadata */\n-\tuint64_t\t\tmapoffset;\t\t\t\t\t/* TOOD V5 */\n-\tuint8_t\t\tmd5[CHD_MD5_BYTES];\t\t\t/* overall MD5 checksum */\n-\tuint8_t\t\tparentmd5[CHD_MD5_BYTES];\t/* overall MD5 checksum of parent */\n-\tuint8_t\t\tsha1[CHD_SHA1_BYTES];\t\t/* overall SHA1 checksum */\n-\tuint8_t\t\trawsha1[CHD_SHA1_BYTES];\t/* SHA1 checksum of raw data */\n-\tuint8_t\t\tparentsha1[CHD_SHA1_BYTES];\t/* overall SHA1 checksum of parent */\n-\tuint32_t\t\tunitbytes;\t\t\t\t\t/* TODO V5 */\n-\tuint64_t\t\tunitcount;\t\t\t\t\t/* TODO V5 */\n-    uint32_t      hunkcount;                  /* TODO V5 */\n+\tUINT32\t\tlength;\t\t\t\t\t\t/* length of header data */\n+\tUINT32\t\tversion;\t\t\t\t\t/* drive format version */\n+\tUINT32\t\tflags;\t\t\t\t\t\t/* flags field */\n+\tUINT32\t\tcompression[4];\t\t\t\t/* compression type */\n+\tUINT32\t\thunkbytes;\t\t\t\t\t/* number of bytes per hunk */\n+\tUINT32\t\ttotalhunks;\t\t\t\t\t/* total # of hunks represented */\n+\tUINT64\t\tlogicalbytes;\t\t\t\t/* logical size of the data */\n+\tUINT64\t\tmetaoffset;\t\t\t\t\t/* offset in file of first metadata */\n+\tUINT64\t\tmapoffset;\t\t\t\t\t/* TOOD V5 */\n+\tUINT8\t\tmd5[CHD_MD5_BYTES];\t\t\t/* overall MD5 checksum */\n+\tUINT8\t\tparentmd5[CHD_MD5_BYTES];\t/* overall MD5 checksum of parent */\n+\tUINT8\t\tsha1[CHD_SHA1_BYTES];\t\t/* overall SHA1 checksum */\n+\tUINT8\t\trawsha1[CHD_SHA1_BYTES];\t/* SHA1 checksum of raw data */\n+\tUINT8\t\tparentsha1[CHD_SHA1_BYTES];\t/* overall SHA1 checksum of parent */\n+\tUINT32\t\tunitbytes;\t\t\t\t\t/* TODO V5 */\n+\tUINT64\t\tunitcount;\t\t\t\t\t/* TODO V5 */\n+    UINT32      hunkcount;                  /* TODO V5 */\n \n     /* map information */\n-    uint32_t      mapentrybytes;              /* length of each entry in a map (V5) */\n-    uint8_t*      rawmap;                     /* raw map data */\n+    UINT32      mapentrybytes;              /* length of each entry in a map (V5) */\n+    UINT8*      rawmap;                     /* raw map data */\n \n-\tuint32_t\t\tobsolete_cylinders;\t\t\t/* obsolete field -- do not use! */\n-\tuint32_t\t\tobsolete_sectors;\t\t\t/* obsolete field -- do not use! */\n-\tuint32_t\t\tobsolete_heads;\t\t\t\t/* obsolete field -- do not use! */\n-\tuint32_t\t\tobsolete_hunksize;\t\t\t/* obsolete field -- do not use! */\n+\tUINT32\t\tobsolete_cylinders;\t\t\t/* obsolete field -- do not use! */\n+\tUINT32\t\tobsolete_sectors;\t\t\t/* obsolete field -- do not use! */\n+\tUINT32\t\tobsolete_heads;\t\t\t\t/* obsolete field -- do not use! */\n+\tUINT32\t\tobsolete_hunksize;\t\t\t/* obsolete field -- do not use! */\n };\n \n \n@@ -340,10 +335,10 @@ struct _chd_header\n typedef struct _chd_verify_result chd_verify_result;\n struct _chd_verify_result\n {\n-\tuint8_t\t\tmd5[CHD_MD5_BYTES];\t\t\t/* overall MD5 checksum */\n-\tuint8_t\t\tsha1[CHD_SHA1_BYTES];\t\t/* overall SHA1 checksum */\n-\tuint8_t\t\trawsha1[CHD_SHA1_BYTES];\t/* SHA1 checksum of raw data */\n-\tuint8_t\t\tmetasha1[CHD_SHA1_BYTES];\t/* SHA1 checksum of metadata */\n+\tUINT8\t\tmd5[CHD_MD5_BYTES];\t\t\t/* overall MD5 checksum */\n+\tUINT8\t\tsha1[CHD_SHA1_BYTES];\t\t/* overall SHA1 checksum */\n+\tUINT8\t\trawsha1[CHD_SHA1_BYTES];\t/* SHA1 checksum of raw data */\n+\tUINT8\t\tmetasha1[CHD_SHA1_BYTES];\t/* SHA1 checksum of metadata */\n };\n \n \n@@ -369,14 +364,13 @@ struct _chd_verify_result\n /* ----- CHD file management ----- */\n \n /* create a new CHD file fitting the given description */\n-/* chd_error chd_create(const char *filename, uint64_t logicalbytes, uint32_t hunkbytes, uint32_t compression, chd_file *parent); */\n+/* chd_error chd_create(const char *filename, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 compression, chd_file *parent); */\n \n /* same as chd_create(), but accepts an already-opened core_file object */\n-/* chd_error chd_create_file(core_file *file, uint64_t logicalbytes, uint32_t hunkbytes, uint32_t compression, chd_file *parent); */\n+/* chd_error chd_create_file(core_file *file, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 compression, chd_file *parent); */\n \n /* open an existing CHD file */\n-CHD_EXPORT chd_error chd_open_core_file(core_file *file, int mode, chd_file *parent, chd_file **chd);\n-CHD_EXPORT chd_error chd_open_file(FILE *file, int mode, chd_file *parent, chd_file **chd);\n+CHD_EXPORT chd_error chd_open_file(core_file *file, int mode, chd_file *parent, chd_file **chd);\n CHD_EXPORT chd_error chd_open(const char *filename, int mode, chd_file *parent, chd_file **chd);\n \n /* precache underlying file */\n@@ -398,22 +392,20 @@ CHD_EXPORT const char *chd_error_string(chd_error err);\n /* return a pointer to the extracted CHD header data */\n CHD_EXPORT const chd_header *chd_get_header(chd_file *chd);\n \n-/* read CHD header data from file into the pointed struct */\n-CHD_EXPORT chd_error chd_read_header(const char *filename, chd_header *header);\n \n \n \n /* ----- core data read/write ----- */\n \n /* read one hunk from the CHD file */\n-CHD_EXPORT chd_error chd_read(chd_file *chd, uint32_t hunknum, void *buffer);\n+CHD_EXPORT chd_error chd_read(chd_file *chd, UINT32 hunknum, void *buffer);\n \n \n \n /* ----- metadata management ----- */\n \n /* get indexed metadata of a particular sort */\n-CHD_EXPORT chd_error chd_get_metadata(chd_file *chd, uint32_t searchtag, uint32_t searchindex, void *output, uint32_t outputlen, uint32_t *resultlen, uint32_t *resulttag, uint8_t *resultflags);\n+CHD_EXPORT chd_error chd_get_metadata(chd_file *chd, UINT32 searchtag, UINT32 searchindex, void *output, UINT32 outputlen, UINT32 *resultlen, UINT32 *resulttag, UINT8 *resultflags);\n \n \n \n@@ -424,7 +416,7 @@ CHD_EXPORT chd_error chd_get_metadata(chd_file *chd, uint32_t searchtag, uint32_\n CHD_EXPORT chd_error chd_codec_config(chd_file *chd, int param, void *config);\n \n /* return a string description of a codec */\n-CHD_EXPORT const char *chd_get_codec_name(uint32_t codec);\n+CHD_EXPORT const char *chd_get_codec_name(UINT32 codec);\n \n #ifdef __cplusplus\n }\ndiff --git a/libretro/deps/libchdr/include/libchdr/coretypes.h b/libretro/deps/libchdr/include/libchdr/coretypes.h\nindex 86689e07a..12f095ee0 100644\n--- a/libretro/deps/libchdr/include/libchdr/coretypes.h\n+++ b/libretro/deps/libchdr/include/libchdr/coretypes.h\n@@ -8,54 +8,51 @@\n #include <streams/file_stream_transforms.h>\n #endif\n \n-#ifndef ARRAY_LENGTH\n #define ARRAY_LENGTH(x) (sizeof(x)/sizeof(x[0]))\n-#endif\n \n-typedef struct chd_core_file {\n-\t/*\n-\t * arbitrary pointer to data the implementation uses to implement the below functions\n-\t */\n-\tvoid *argp;\n-\n-\t/*\n-\t * return the size of a given file as a 64-bit unsigned integer.\n-\t * the position of the file pointer after calling this function is\n-\t * undefined because many implementations will seek to the end of the\n-\t * file and call ftell.\n-\t *\n-\t * on error, (uint64_t)-1 is returned.\n-\t */\n-\tuint64_t(*fsize)(struct chd_core_file*);\n-\n-\t/*\n-\t * should match the behavior of fread, except the FILE* argument at the end\n-\t * will be replaced with a struct chd_core_file*.\n-\t */\n-\tsize_t(*fread)(void*,size_t,size_t,struct chd_core_file*);\n-\n-\t/* closes the given file. */\n-\tint (*fclose)(struct chd_core_file*);\n-\n-\t/* fseek clone */\n-\tint (*fseek)(struct chd_core_file*, int64_t, int);\n-} core_file;\n-\n-static INLINE int core_fclose(core_file *fp) {\n-\treturn fp->fclose(fp);\n-}\n+typedef uint64_t UINT64;\n+typedef uint32_t UINT32;\n+typedef uint16_t UINT16;\n+typedef uint8_t UINT8;\n \n-static INLINE size_t core_fread(core_file *fp, void *ptr, size_t len) {\n-\treturn fp->fread(ptr, 1, len, fp);\n-}\n+typedef int64_t INT64;\n+typedef int32_t INT32;\n+typedef int16_t INT16;\n+typedef int8_t INT8;\n \n-static INLINE int core_fseek(core_file* fp, int64_t offset, int whence) {\n-\treturn fp->fseek(fp, offset, whence);\n-}\n+#ifdef USE_LIBRETRO_VFS\n+/* Genesis-Plus-GX requires custom defines */\n+#define core_file                 RFILE\n+#define core_fopen(file)          rfopen(file, \"rb\")\n+#define core_fseek                rfseek\n+#define core_ftell                rftell\n+#define core_fread(fc, buff, len) rfread(buff, 1, len, fc)\n+#define core_fclose               rfclose\n+#else\n+#define core_file FILE\n+#define core_fopen(file) fopen(file, \"rb\")\n+#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WIN64__)\n+\t#define core_fseek _fseeki64\n+\t#define core_ftell _ftelli64\n+#elif defined(_LARGEFILE_SOURCE) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64\n+\t#define core_fseek fseeko64\n+\t#define core_ftell ftello64\n+#else\n+\t#define core_fseek fseeko\n+\t#define core_ftell ftello\n+#endif\n+#define core_fread(fc, buff, len) fread(buff, 1, len, fc)\n+#define core_fclose fclose\n+#endif\n \n-static INLINE uint64_t core_fsize(core_file *fp)\n+static UINT64 core_fsize(core_file *f)\n {\n-\treturn fp->fsize(fp);\n+    UINT64 rv;\n+    UINT64 p = core_ftell(f);\n+    core_fseek(f, 0, SEEK_END);\n+    rv = core_ftell(f);\n+    core_fseek(f, p, SEEK_SET);\n+    return rv;\n }\n \n #endif\ndiff --git a/libretro/deps/libchdr/src/libchdr_cdrom.c b/libretro/deps/libchdr/src/libchdr_cdrom.c\nindex 547b6007b..44fa66466 100644\n--- a/libretro/deps/libchdr/src/libchdr_cdrom.c\n+++ b/libretro/deps/libchdr/src/libchdr_cdrom.c\n@@ -15,12 +15,9 @@\n     schemes will differ after track 1!\n \n ***************************************************************************/\n-\n+#include <assert.h>\n #include <string.h>\n \n-#undef INLINE\n-#include <retro_inline.h>\n-\n #include <libchdr/cdrom.h>\n \n #ifdef WANT_RAW_DATA_SECTOR\n@@ -307,7 +304,7 @@ static const uint16_t qoffsets[ECC_Q_NUM_BYTES][ECC_Q_COMP] =\n  *-------------------------------------------------\n  */\n \n-static INLINE uint8_t ecc_source_byte(const uint8_t *sector, uint32_t offset)\n+INLINE uint8_t ecc_source_byte(const uint8_t *sector, uint32_t offset)\n {\n \t/* in mode 2 always treat these as 0 bytes */\n \treturn (sector[MODE_OFFSET] == 2 && offset < 4) ? 0x00 : sector[SYNC_OFFSET + SYNC_NUM_BYTES + offset];\ndiff --git a/libretro/deps/libchdr/src/libchdr_chd.c b/libretro/deps/libchdr/src/libchdr_chd.c\nindex 70ebde6be..632426ee7 100644\n--- a/libretro/deps/libchdr/src/libchdr_chd.c\n+++ b/libretro/deps/libchdr/src/libchdr_chd.c\n@@ -43,21 +43,14 @@\n #include <string.h>\n #include <time.h>\n \n-#undef INLINE\n-#include <retro_inline.h>\n-\n #include <libchdr/chd.h>\n #include <libchdr/cdrom.h>\n #include <libchdr/flac.h>\n #include <libchdr/huffman.h>\n-#include <zlib.h>\n-#include <zstd.h>\n \n+#include \"zlib.h\"\n #include \"LzmaEnc.h\"\n #include \"LzmaDec.h\"\n-#if defined(__PS3__) || defined(__PSL1GHT__)\n-#define __MACTYPES__\n-#endif\n \n #undef TRUE\n #undef FALSE\n@@ -164,10 +157,10 @@ enum\n typedef struct _codec_interface codec_interface;\n struct _codec_interface\n {\n-\tuint32_t\t\tcompression;\t\t\t\t\t\t\t\t/* type of compression */\n+\tUINT32\t\tcompression;\t\t\t\t\t\t\t\t/* type of compression */\n \tconst char *compname;\t\t\t\t\t\t\t\t\t/* name of the algorithm */\n-\tuint8_t\t\tlossy;\t\t\t\t\t\t\t\t\t\t/* is this a lossy algorithm? */\n-\tchd_error\t(*init)(void *codec, uint32_t hunkbytes);\t\t/* codec initialize */\n+\tUINT8\t\tlossy;\t\t\t\t\t\t\t\t\t\t/* is this a lossy algorithm? */\n+\tchd_error\t(*init)(void *codec, UINT32 hunkbytes);\t\t/* codec initialize */\n \tvoid\t\t(*free)(void *codec);\t\t\t\t\t\t/* codec free */\n \tchd_error\t(*decompress)(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen); /* decompress data */\n \tchd_error\t(*config)(void *codec, int param, void *config); /* configure */\n@@ -177,22 +170,22 @@ struct _codec_interface\n typedef struct _map_entry map_entry;\n struct _map_entry\n {\n-\tuint64_t\t\t\t\t\toffset;\t\t\t/* offset within the file of the data */\n-\tuint32_t\t\t\t\t\tcrc;\t\t\t/* 32-bit CRC of the data */\n-\tuint32_t\t\t\t\t\tlength;\t\t\t/* length of the data */\n-\tuint8_t\t\t\t\t\tflags;\t\t\t/* misc flags */\n+\tUINT64\t\t\t\t\toffset;\t\t\t/* offset within the file of the data */\n+\tUINT32\t\t\t\t\tcrc;\t\t\t/* 32-bit CRC of the data */\n+\tUINT32\t\t\t\t\tlength;\t\t\t/* length of the data */\n+\tUINT8\t\t\t\t\tflags;\t\t\t/* misc flags */\n };\n \n /* a single metadata entry */\n typedef struct _metadata_entry metadata_entry;\n struct _metadata_entry\n {\n-\tuint64_t\t\t\t\t\toffset;\t\t\t/* offset within the file of the header */\n-\tuint64_t\t\t\t\t\tnext;\t\t\t/* offset within the file of the next header */\n-\tuint64_t\t\t\t\t\tprev;\t\t\t/* offset within the file of the previous header */\n-\tuint32_t\t\t\t\t\tlength;\t\t\t/* length of the metadata */\n-\tuint32_t\t\t\t\t\tmetatag;\t\t/* metadata tag */\n-\tuint8_t\t\t\t\t\tflags;\t\t\t/* flag bits */\n+\tUINT64\t\t\t\t\toffset;\t\t\t/* offset within the file of the header */\n+\tUINT64\t\t\t\t\tnext;\t\t\t/* offset within the file of the next header */\n+\tUINT64\t\t\t\t\tprev;\t\t\t/* offset within the file of the previous header */\n+\tUINT32\t\t\t\t\tlength;\t\t\t/* length of the metadata */\n+\tUINT32\t\t\t\t\tmetatag;\t\t/* metadata tag */\n+\tUINT8\t\t\t\t\tflags;\t\t\t/* flag bits */\n };\n \n /* codec-private data for the ZLIB codec */\n@@ -200,8 +193,8 @@ struct _metadata_entry\n typedef struct _zlib_allocator zlib_allocator;\n struct _zlib_allocator\n {\n-\tuint32_t *\t\t\t\tallocptr[MAX_ZLIB_ALLOCS];\n-\tuint32_t *\t\t\t\tallocptr2[MAX_ZLIB_ALLOCS];\n+\tUINT32 *\t\t\t\tallocptr[MAX_ZLIB_ALLOCS];\n+\tUINT32 *\t\t\t\tallocptr2[MAX_ZLIB_ALLOCS];\n };\n \n typedef struct _zlib_codec_data zlib_codec_data;\n@@ -231,18 +224,6 @@ struct _lzma_codec_data\n \tlzma_allocator\tallocator;\n };\n \n-typedef struct _huff_codec_data huff_codec_data;\n-struct _huff_codec_data\n-{\n-\tstruct huffman_decoder* decoder;\n-};\n-\n-typedef struct _zstd_codec_data zstd_codec_data;\n-struct _zstd_codec_data\n-{\n-\tZSTD_DStream *dstream;\n-};\n-\n /* codec-private data for the CDZL codec */\n typedef struct _cdzl_codec_data cdzl_codec_data;\n struct _cdzl_codec_data {\n@@ -265,14 +246,6 @@ struct _cdlz_codec_data {\n \tuint8_t*\t\t\tbuffer;\n };\n \n-/* codec-private data for the FLAC codec */\n-typedef struct _flac_codec_data flac_codec_data;\n-struct _flac_codec_data {\n-\t/* internal state */\n-\tint\t\tnative_endian;\n-\tflac_decoder\tdecoder;\n-};\n-\n /* codec-private data for the CDFL codec */\n typedef struct _cdfl_codec_data cdfl_codec_data;\n struct _cdfl_codec_data {\n@@ -285,22 +258,13 @@ struct _cdfl_codec_data {\n \tuint8_t*\tbuffer;\n };\n \n-typedef struct _cdzs_codec_data cdzs_codec_data;\n-struct _cdzs_codec_data\n-{\n-\tzstd_codec_data base_decompressor;\n-#ifdef WANT_SUBCODE\n-\tzstd_codec_data subcode_decompressor;\n-#endif\n-\tuint8_t*\t\t\t\tbuffer;\n-};\n-\n /* internal representation of an open CHD file */\n struct _chd_file\n {\n-\tuint32_t\t\t\t\t\tcookie;\t\t\t/* cookie, should equal COOKIE_VALUE */\n+\tUINT32\t\t\t\t\tcookie;\t\t\t/* cookie, should equal COOKIE_VALUE */\n \n \tcore_file *\t\t\t\tfile;\t\t\t/* handle to the open core file */\n+\tUINT8\t\t\t\t\towns_file;\t\t/* flag indicating if this file should be closed on chd_close() */\n \tchd_header\t\t\t\theader;\t\t\t/* header, extracted from file */\n \n \tchd_file *\t\t\t\tparent;\t\t\t/* pointer to parent file, or NULL */\n@@ -308,31 +272,26 @@ struct _chd_file\n \tmap_entry *\t\t\t\tmap;\t\t\t/* array of map entries */\n \n #ifdef NEED_CACHE_HUNK\n-\tuint8_t *\t\t\t\t\tcache;\t\t\t/* hunk cache pointer */\n-\tuint32_t\t\t\t\t\tcachehunk;\t\t/* index of currently cached hunk */\n+\tUINT8 *\t\t\t\t\tcache;\t\t\t/* hunk cache pointer */\n+\tUINT32\t\t\t\t\tcachehunk;\t\t/* index of currently cached hunk */\n \n-\tuint8_t *\t\t\t\t\tcompare;\t\t/* hunk compare pointer */\n-\tuint32_t\t\t\t\t\tcomparehunk;\t/* index of current compare data */\n+\tUINT8 *\t\t\t\t\tcompare;\t\t/* hunk compare pointer */\n+\tUINT32\t\t\t\t\tcomparehunk;\t/* index of current compare data */\n #endif\n \n-\tuint8_t *\t\t\t\t\tcompressed;\t\t/* pointer to buffer for compressed data */\n+\tUINT8 *\t\t\t\t\tcompressed;\t\t/* pointer to buffer for compressed data */\n \tconst codec_interface *\tcodecintf[4];\t/* interface to the codec */\n \n \tzlib_codec_data\t\t\tzlib_codec_data;\t\t/* zlib codec data */\n-\tlzma_codec_data\t\t\tlzma_codec_data;\t\t/* lzma codec data */\n-\thuff_codec_data\t\t\thuff_codec_data;\t\t/* huff codec data */\n-\tflac_codec_data\t\t\tflac_codec_data;\t\t/* flac codec data */\n-\tzstd_codec_data\t\t\tzstd_codec_data;\t\t/* zstd codec data */\n \tcdzl_codec_data\t\t\tcdzl_codec_data;\t\t/* cdzl codec data */\n \tcdlz_codec_data\t\t\tcdlz_codec_data;\t\t/* cdlz codec data */\n \tcdfl_codec_data\t\t\tcdfl_codec_data;\t\t/* cdfl codec data */\n-\tcdzs_codec_data\t\t\tcdzs_codec_data;\t\t/* cdzs codec data */\n \n #ifdef NEED_CACHE_HUNK\n-\tuint32_t\t\t\t\t\tmaxhunk;\t\t/* maximum hunk accessed */\n+\tUINT32\t\t\t\t\tmaxhunk;\t\t/* maximum hunk accessed */\n #endif\n \n-\tuint8_t *\t\t\t\t\tfile_cache;\t\t/* cache of underlying file */\n+\tUINT8 *\t\t\t\t\tfile_cache;\t\t/* cache of underlying file */\n };\n \n \n@@ -340,36 +299,28 @@ struct _chd_file\n     GLOBAL VARIABLES\n ***************************************************************************/\n \n-static const uint8_t nullmd5[CHD_MD5_BYTES] = { 0 };\n-static const uint8_t nullsha1[CHD_SHA1_BYTES] = { 0 };\n+static const UINT8 nullmd5[CHD_MD5_BYTES] = { 0 };\n+static const UINT8 nullsha1[CHD_SHA1_BYTES] = { 0 };\n \n /***************************************************************************\n     PROTOTYPES\n ***************************************************************************/\n \n-/* core_file wrappers over stdio */\n-static core_file *core_stdio_fopen(char const *path);\n-static uint64_t core_stdio_fsize(core_file *file);\n-static size_t core_stdio_fread(void *ptr, size_t size, size_t nmemb, core_file *file);\n-static int core_stdio_fclose(core_file *file);\n-static int core_stdio_fclose_nonowner(core_file *file); /* alternate fclose used by chd_open_file */\n-static int core_stdio_fseek(core_file* file, int64_t offset, int whence);\n-\n /* internal header operations */\n static chd_error header_validate(const chd_header *header);\n static chd_error header_read(chd_file *chd, chd_header *header);\n \n /* internal hunk read/write */\n #ifdef NEED_CACHE_HUNK\n-static chd_error hunk_read_into_cache(chd_file *chd, uint32_t hunknum);\n+static chd_error hunk_read_into_cache(chd_file *chd, UINT32 hunknum);\n #endif\n-static chd_error hunk_read_into_memory(chd_file *chd, uint32_t hunknum, uint8_t *dest);\n+static chd_error hunk_read_into_memory(chd_file *chd, UINT32 hunknum, UINT8 *dest);\n \n /* internal map access */\n static chd_error map_read(chd_file *chd);\n \n /* metadata management */\n-static chd_error metadata_find_entry(chd_file *chd, uint32_t metatag, uint32_t metaindex, metadata_entry *metaentry);\n+static chd_error metadata_find_entry(chd_file *chd, UINT32 metatag, UINT32 metaindex, metadata_entry *metaentry);\n \n /* zlib compression codec */\n static chd_error zlib_codec_init(void *codec, uint32_t hunkbytes);\n@@ -384,22 +335,6 @@ static chd_error lzma_codec_init(void *codec, uint32_t hunkbytes);\n static void lzma_codec_free(void *codec);\n static chd_error lzma_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen);\n \n-/* huff compression codec */\n-static chd_error huff_codec_init(void *codec, uint32_t hunkbytes);\n-static void huff_codec_free(void *codec);\n-static chd_error huff_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen);\n-\n-/* flac compression codec */\n-static chd_error flac_codec_init(void *codec, uint32_t hunkbytes);\n-static void flac_codec_free(void *codec);\n-static chd_error flac_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen);\n-\n-/* zstd compression codec */\n-static chd_error zstd_codec_init(void *codec, uint32_t hunkbytes);\n-static void zstd_codec_free(void *codec);\n-static chd_error zstd_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen);\n-\n-\n /* cdzl compression codec */\n static chd_error cdzl_codec_init(void* codec, uint32_t hunkbytes);\n static void cdzl_codec_free(void* codec);\n@@ -415,11 +350,6 @@ static chd_error cdfl_codec_init(void* codec, uint32_t hunkbytes);\n static void cdfl_codec_free(void* codec);\n static chd_error cdfl_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen);\n \n-/* cdzs compression codec */\n-static chd_error cdzs_codec_init(void *codec, uint32_t hunkbytes);\n-static void cdzs_codec_free(void *codec);\n-static chd_error cdzs_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen);\n-\n /***************************************************************************\n  *  LZMA ALLOCATOR HELPER\n  ***************************************************************************\n@@ -816,123 +746,24 @@ static chd_error cdzl_codec_decompress(void *codec, const uint8_t *src, uint32_t\n \treturn CHDERR_NONE;\n }\n \n-/***************************************************************************\n- *  HUFFMAN DECOMPRESSOR\n- ***************************************************************************\n- */\n-\n-static chd_error huff_codec_init(void* codec, uint32_t hunkbytes)\n-{\n-\thuff_codec_data* huff_codec = (huff_codec_data*) codec;\n-\thuff_codec->decoder = create_huffman_decoder(256, 16);\n-\treturn CHDERR_NONE;\n-}\n-\n-static void huff_codec_free(void *codec)\n-{\n-\thuff_codec_data* huff_codec = (huff_codec_data*) codec;\n-\tdelete_huffman_decoder(huff_codec->decoder);\n-}\n-\n-static chd_error huff_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen)\n-{\n-\tuint32_t cur;\n-\tchd_error result;\n-\thuff_codec_data* huff_codec = (huff_codec_data*) codec;\n-\tstruct bitstream* bitbuf = create_bitstream(src, complen);\n-\n-\t/* first import the tree */\n-\tenum huffman_error err = huffman_import_tree_huffman(huff_codec->decoder, bitbuf);\n-\tif (err != HUFFERR_NONE)\n-\t{\n-\t\tfree(bitbuf);\n-\t\treturn CHDERR_DECOMPRESSION_ERROR;\n-\t}\n-\n-\t/* then decode the data */\n-\tfor (cur = 0; cur < destlen; cur++)\n-\t\tdest[cur] = huffman_decode_one(huff_codec->decoder, bitbuf);\n-\tbitstream_flush(bitbuf);\n-\tresult = bitstream_overflow(bitbuf) ? CHDERR_DECOMPRESSION_ERROR : CHDERR_NONE;\n-\n-\tfree(bitbuf);\n-\treturn result;\n-}\n- \n /***************************************************************************\n  *  CD FLAC DECOMPRESSOR\n  ***************************************************************************\n  */\n \n /*------------------------------------------------------\n- *  flac_codec_blocksize - return the optimal block size\n+ *  cdfl_codec_blocksize - return the optimal block size\n  *------------------------------------------------------\n  */\n \n-static uint32_t flac_codec_blocksize(uint32_t bytes)\n+static uint32_t cdfl_codec_blocksize(uint32_t bytes)\n {\n \t/* determine FLAC block size, which must be 16-65535\n \t * clamp to 2k since that's supposed to be the sweet spot */\n-\tuint32_t blocksize = bytes / 4;\n-\twhile (blocksize > 2048)\n-\t\tblocksize /= 2;\n-\treturn blocksize;\n-}\n-\n-static chd_error flac_codec_init(void *codec, uint32_t hunkbytes)\n-{\n-\tuint16_t native_endian = 0;\n-\tflac_codec_data *flac = (flac_codec_data*)codec;\n-\n-\t/* make sure the CHD's hunk size is an even multiple of the sample size */\n-\tif (hunkbytes % 4 != 0)\n-\t\treturn CHDERR_CODEC_ERROR;\n-\n-\t/* determine whether we want native or swapped samples */\n-\t*(uint8_t *)(&native_endian) = 1;\n-\tflac->native_endian = (native_endian & 1);\n-\n-\t/* flac decoder init */\n-\tif (flac_decoder_init(&flac->decoder))\n-\t\treturn CHDERR_OUT_OF_MEMORY;\n-\n-\treturn CHDERR_NONE;\n-}\n-\n-static void flac_codec_free(void *codec)\n-{\n-\tflac_codec_data *flac = (flac_codec_data*)codec;\n-\tflac_decoder_free(&flac->decoder);\n-}\n-\n-static chd_error flac_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen)\n-{\n-\tflac_codec_data *flac = (flac_codec_data*)codec;\n-\tint swap_endian;\n-\n-\tif (src[0] == 'L')\n-\t\tswap_endian = !flac->native_endian;\n-\telse if (src[0] == 'B')\n-\t\tswap_endian = flac->native_endian;\n-\telse\n-\t\treturn CHDERR_DECOMPRESSION_ERROR;\n-\n-\tif (!flac_decoder_reset(&flac->decoder, 44100, 2, flac_codec_blocksize(destlen), src + 1, complen - 1))\n-\t\treturn CHDERR_DECOMPRESSION_ERROR;\n-\tif (!flac_decoder_decode_interleaved(&flac->decoder, (int16_t *)(dest), destlen/4, swap_endian))\n-\t\treturn CHDERR_DECOMPRESSION_ERROR;\n-\tflac_decoder_finish(&flac->decoder);\n-\n-\treturn CHDERR_NONE;\n-}\n-\n-static uint32_t cdfl_codec_blocksize(uint32_t bytes)\n-{\n-\t/* for CDs it seems that CD_MAX_SECTOR_DATA is the right target */\n-\tuint32_t blocksize = bytes / 4;\n-\twhile (blocksize > CD_MAX_SECTOR_DATA)\n-\t\tblocksize /= 2;\n-\treturn blocksize;\n+\tuint32_t hunkbytes = bytes / 4;\n+\twhile (hunkbytes > 2048)\n+\t\thunkbytes /= 2;\n+\treturn hunkbytes;\n }\n \n static chd_error cdfl_codec_init(void *codec, uint32_t hunkbytes)\n@@ -1020,173 +851,6 @@ static chd_error cdfl_codec_decompress(void *codec, const uint8_t *src, uint32_t\n \n \treturn CHDERR_NONE;\n }\n-\n-\n-/***************************************************************************\n- *  ZSTD DECOMPRESSOR\n- ***************************************************************************\n- */\n-\n-/*-------------------------------------------------\n- *  zstd_codec_init - constructor\n- *-------------------------------------------------\n- */\n-\n-static chd_error zstd_codec_init(void* codec, uint32_t hunkbytes)\n-{\n-\tzstd_codec_data* zstd_codec = (zstd_codec_data*) codec;\n-\n-\tzstd_codec->dstream = ZSTD_createDStream();\n-\tif (!zstd_codec->dstream) {\n-\t\tprintf(\"NO DSTREAM CREATED!\\n\");\n-\t\treturn CHDERR_DECOMPRESSION_ERROR;\n-\t}\n-\treturn CHDERR_NONE;\n-}\n-\n-/*-------------------------------------------------\n- *  zstd_codec_free\n- *-------------------------------------------------\n- */\n-\n-static void zstd_codec_free(void* codec)\n-{\n-\tzstd_codec_data* zstd_codec = (zstd_codec_data*) codec;\n-\n-\tZSTD_freeDStream(zstd_codec->dstream);\n-}\n-\n-/*-------------------------------------------------\n- *  decompress - decompress data using the ZSTD \n- *  codec\n- *-------------------------------------------------\n- */\n-static chd_error zstd_codec_decompress(void* codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen)\n-{\n-\tZSTD_inBuffer input;\n-\tZSTD_outBuffer output;\n-\n-\t/* initialize */\n-\tzstd_codec_data* zstd_codec = (zstd_codec_data*) codec;\n-\n-\t/* reset decompressor */\n-\tsize_t zstd_res =  ZSTD_initDStream(zstd_codec->dstream);\n-\n-\tinput.src   = src;\n-\tinput.size  = complen;\n-\tinput.pos   = 0;\n-\n-\toutput.dst  = dest;\n-\toutput.size = destlen;\n-\toutput.pos  = 0;\n-\n-\tif (ZSTD_isError(zstd_res)) \n-\t{\n-\t\tprintf(\"INITI DSTREAM FAILED!\\n\");\n-\t\treturn CHDERR_DECOMPRESSION_ERROR;\n-\t}\n-\n-\twhile ((input.pos < input.size) && (output.pos < output.size))\n-\t{\n-\t\tzstd_res = ZSTD_decompressStream(zstd_codec->dstream, &output, &input);\n-\t\tif (ZSTD_isError(zstd_res))\n-\t\t{\n-\t\t\tprintf(\"DECOMPRESSION ERROR IN LOOP\\n\");\n-\t\t\treturn CHDERR_DECOMPRESSION_ERROR;\n-\t\t}\n-\t}\n-\tif (output.pos != output.size)\n-\t{\n-\t\tprintf(\"OUTPUT DOESN'T MATCH!\\n\");\n-\t\treturn CHDERR_DECOMPRESSION_ERROR;\n-\t}\n-\treturn CHDERR_NONE;\n-\n-}\n-\n-/* cdzs */\n-static chd_error cdzs_codec_init(void* codec, uint32_t hunkbytes)\n-{\n-\tchd_error ret;\n-\tcdzs_codec_data* cdzs = (cdzs_codec_data*) codec;\n-\n-\t/* allocate buffer */\n-\tcdzs->buffer = (uint8_t*)malloc(sizeof(uint8_t) * hunkbytes);\n-\tif (cdzs->buffer == NULL)\n-\t\treturn CHDERR_OUT_OF_MEMORY;\n-\n-\t/* make sure the CHD's hunk size is an even multiple of the frame size */\n-\tret = zstd_codec_init(&cdzs->base_decompressor, (hunkbytes / CD_FRAME_SIZE) * CD_MAX_SECTOR_DATA);\n-\tif (ret != CHDERR_NONE)\n-\t\treturn ret;\n-\n-#ifdef WANT_SUBCODE\n-\tret = zstd_codec_init(&cdzs->subcode_decompressor, (hunkbytes / CD_FRAME_SIZE) * CD_MAX_SUBCODE_DATA);\n-\tif (ret != CHDERR_NONE)\n-\t\treturn ret;\n-#endif\n-\n-\tif (hunkbytes % CD_FRAME_SIZE != 0)\n-\t\treturn CHDERR_CODEC_ERROR;\n-\n-\treturn CHDERR_NONE;\n-}\n-\n-static void cdzs_codec_free(void* codec)\n-{\n-\tcdzs_codec_data* cdzs = (cdzs_codec_data*) codec;\n-\tfree(cdzs->buffer);\n-\tzstd_codec_free(&cdzs->base_decompressor);\n-#ifdef WANT_SUBCODE\n-\tzstd_codec_free(&cdzs->subcode_decompressor);\n-#endif\n-}\n-\n-static chd_error cdzs_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen)\n-{\n-\tuint32_t framenum;\n-\tcdzs_codec_data* cdzs = (cdzs_codec_data*)codec;\n-\n-\t/* determine header bytes */\n-\tuint32_t frames = destlen / CD_FRAME_SIZE;\n-\tuint32_t complen_bytes = (destlen < 65536) ? 2 : 3;\n-\tuint32_t ecc_bytes = (frames + 7) / 8;\n-\tuint32_t header_bytes = ecc_bytes + complen_bytes;\n-\n-\t/* extract compressed length of base */\n-\tuint32_t complen_base = (src[ecc_bytes + 0] << 8) | src[ecc_bytes + 1];\n-\tif (complen_bytes > 2)\n-\t\tcomplen_base = (complen_base << 8) | src[ecc_bytes + 2];\n-\n-\t/* reset and decode */\n-\tzstd_codec_decompress(&cdzs->base_decompressor, &src[header_bytes], complen_base, &cdzs->buffer[0], frames * CD_MAX_SECTOR_DATA);\n-#ifdef WANT_SUBCODE\n-\tzstd_codec_decompress(&cdzs->subcode_decompressor, &src[header_bytes + complen_base], complen - complen_base - header_bytes, &cdzs->buffer[frames * CD_MAX_SECTOR_DATA], frames * CD_MAX_SUBCODE_DATA);\n-#endif\n-\n-\t/* reassemble the data */\n-\tfor (framenum = 0; framenum < frames; framenum++)\n-\t{\n-\t\tuint8_t *sector;\n-\n-\t\tmemcpy(&dest[framenum * CD_FRAME_SIZE], &cdzs->buffer[framenum * CD_MAX_SECTOR_DATA], CD_MAX_SECTOR_DATA);\n-#ifdef WANT_SUBCODE\n-\t\tmemcpy(&dest[framenum * CD_FRAME_SIZE + CD_MAX_SECTOR_DATA], &cdzs->buffer[frames * CD_MAX_SECTOR_DATA + framenum * CD_MAX_SUBCODE_DATA], CD_MAX_SUBCODE_DATA);\n-#endif\n-\n-#ifdef WANT_RAW_DATA_SECTOR\n-\t\t/* reconstitute the ECC data and sync header */\n-\t\tsector = (uint8_t *)&dest[framenum * CD_FRAME_SIZE];\n-\t\tif ((src[framenum / 8] & (1 << (framenum % 8))) != 0)\n-\t\t{\n-\t\t\tmemcpy(sector, s_cd_sync_header, sizeof(s_cd_sync_header));\n-\t\t\tecc_generate(sector);\n-\t\t}\n-#endif\n-\t}\n-\treturn CHDERR_NONE;\n-}\n-\n /***************************************************************************\n     CODEC INTERFACES\n ***************************************************************************/\n@@ -1237,49 +901,6 @@ static const codec_interface codec_interfaces[] =\n \t\tNULL\n \t},\n \n-\t/* V5 lzma compression */\n-\t{\n-\t\tCHD_CODEC_LZMA,\n-\t\t\"lzma (LZMA)\",\n-\t\tFALSE,\n-\t\tlzma_codec_init,\n-\t\tlzma_codec_free,\n-\t\tlzma_codec_decompress,\n-\t\tNULL\n-\t},\n-\n-\t/* V5 huffman compression */\n-\t{\n-\t\tCHD_CODEC_HUFFMAN,\n-\t\t\"Huffman\",\n-\t\tFALSE,\n-\t\thuff_codec_init,\n-\t\thuff_codec_free,\n-\t\thuff_codec_decompress,\n-\t\tNULL\n-\t},\n-\n-\t/* V5 flac compression */\n-\t{\n-\t\tCHD_CODEC_FLAC,\n-\t\t\"flac (FLAC)\",\n-\t\tFALSE,\n-\t\tflac_codec_init,\n-\t\tflac_codec_free,\n-\t\tflac_codec_decompress,\n-\t\tNULL\n-\t},\n-\t/* V5 zstd compression */\n-\t{\n-\t\tCHD_CODEC_ZSTD,\n-\t\t\"ZStandard\",\n-\t\tFALSE,\n-\t\tzstd_codec_init,\n-\t\tzstd_codec_free,\n-\t\tzstd_codec_decompress,\n-\t\tNULL\n-\t},\n-\n \t/* V5 CD zlib compression */\n \t{\n \t\tCHD_CODEC_CD_ZLIB,\n@@ -1312,17 +933,6 @@ static const codec_interface codec_interfaces[] =\n \t\tcdfl_codec_decompress,\n \t\tNULL\n \t},\n-\t/* V5 CD zstd compression */\n-\t{\n-\t\tCHD_CODEC_CD_ZSTD,\n-\t\t\"cdzs (CD ZStandard)\",\n-\t\tFALSE,\n-\t\tcdzs_codec_init,\n-\t\tcdzs_codec_free,\n-\t\tcdzs_codec_decompress,\n-\t\tNULL\n-\t}\n-\t\n };\n \n /***************************************************************************\n@@ -1330,22 +940,22 @@ static const codec_interface codec_interfaces[] =\n ***************************************************************************/\n \n /*-------------------------------------------------\n-    get_bigendian_uint64_t - fetch a uint64_t from\n+    get_bigendian_uint64 - fetch a UINT64 from\n     the data stream in bigendian order\n -------------------------------------------------*/\n \n-static INLINE uint64_t get_bigendian_uint64_t(const uint8_t *base)\n+INLINE UINT64 get_bigendian_uint64(const UINT8 *base)\n {\n-\treturn ((uint64_t)base[0] << 56) | ((uint64_t)base[1] << 48) | ((uint64_t)base[2] << 40) | ((uint64_t)base[3] << 32) |\n-\t\t\t((uint64_t)base[4] << 24) | ((uint64_t)base[5] << 16) | ((uint64_t)base[6] << 8) | (uint64_t)base[7];\n+\treturn ((UINT64)base[0] << 56) | ((UINT64)base[1] << 48) | ((UINT64)base[2] << 40) | ((UINT64)base[3] << 32) |\n+\t\t\t((UINT64)base[4] << 24) | ((UINT64)base[5] << 16) | ((UINT64)base[6] << 8) | (UINT64)base[7];\n }\n \n /*-------------------------------------------------\n-    put_bigendian_uint64_t - write a uint64_t to\n+    put_bigendian_uint64 - write a UINT64 to\n     the data stream in bigendian order\n -------------------------------------------------*/\n \n-static INLINE void put_bigendian_uint64_t(uint8_t *base, uint64_t value)\n+INLINE void put_bigendian_uint64(UINT8 *base, UINT64 value)\n {\n \tbase[0] = value >> 56;\n \tbase[1] = value >> 48;\n@@ -1362,10 +972,10 @@ static INLINE void put_bigendian_uint64_t(uint8_t *base, uint64_t value)\n     the data stream in bigendian order\n -------------------------------------------------*/\n \n-static INLINE uint64_t get_bigendian_uint48(const uint8_t *base)\n+INLINE UINT64 get_bigendian_uint48(const UINT8 *base)\n {\n-\treturn  ((uint64_t)base[0] << 40) | ((uint64_t)base[1] << 32) |\n-\t\t\t((uint64_t)base[2] << 24) | ((uint64_t)base[3] << 16) | ((uint64_t)base[4] << 8) | (uint64_t)base[5];\n+\treturn  ((UINT64)base[0] << 40) | ((UINT64)base[1] << 32) |\n+\t\t\t((UINT64)base[2] << 24) | ((UINT64)base[3] << 16) | ((UINT64)base[4] << 8) | (UINT64)base[5];\n }\n \n /*-------------------------------------------------\n@@ -1373,7 +983,7 @@ static INLINE uint64_t get_bigendian_uint48(const uint8_t *base)\n     the data stream in bigendian order\n -------------------------------------------------*/\n \n-static INLINE void put_bigendian_uint48(uint8_t *base, uint64_t value)\n+INLINE void put_bigendian_uint48(UINT8 *base, UINT64 value)\n {\n \tvalue &= 0xffffffffffff;\n \tbase[0] = value >> 40;\n@@ -1384,21 +994,21 @@ static INLINE void put_bigendian_uint48(uint8_t *base, uint64_t value)\n \tbase[5] = value;\n }\n /*-------------------------------------------------\n-    get_bigendian_uint32_t - fetch a uint32_t from\n+    get_bigendian_uint32 - fetch a UINT32 from\n     the data stream in bigendian order\n -------------------------------------------------*/\n \n-static INLINE uint32_t get_bigendian_uint32_t(const uint8_t *base)\n+INLINE UINT32 get_bigendian_uint32(const UINT8 *base)\n {\n \treturn (base[0] << 24) | (base[1] << 16) | (base[2] << 8) | base[3];\n }\n \n /*-------------------------------------------------\n-    put_bigendian_uint32_t - write a uint32_t to\n+    put_bigendian_uint32 - write a UINT32 to\n     the data stream in bigendian order\n -------------------------------------------------*/\n \n-static INLINE void put_bigendian_uint32_t(uint8_t *base, uint32_t value)\n+INLINE void put_bigendian_uint32(UINT8 *base, UINT32 value)\n {\n \tbase[0] = value >> 24;\n \tbase[1] = value >> 16;\n@@ -1411,7 +1021,7 @@ static INLINE void put_bigendian_uint32_t(uint8_t *base, uint32_t value)\n     the data stream in bigendian order\n -------------------------------------------------*/\n \n-static INLINE void put_bigendian_uint24(uint8_t *base, uint32_t value)\n+INLINE void put_bigendian_uint24(UINT8 *base, UINT32 value)\n {\n \tvalue &= 0xffffff;\n \tbase[0] = value >> 16;\n@@ -1424,27 +1034,27 @@ static INLINE void put_bigendian_uint24(uint8_t *base, uint32_t value)\n     the data stream in bigendian order\n -------------------------------------------------*/\n \n-static INLINE uint32_t get_bigendian_uint24(const uint8_t *base)\n+INLINE UINT32 get_bigendian_uint24(const UINT8 *base)\n {\n \treturn (base[0] << 16) | (base[1] << 8) | base[2];\n }\n \n /*-------------------------------------------------\n-    get_bigendian_uint16 - fetch a uint16_t from\n+    get_bigendian_uint16 - fetch a UINT16 from\n     the data stream in bigendian order\n -------------------------------------------------*/\n \n-static INLINE uint16_t get_bigendian_uint16(const uint8_t *base)\n+INLINE UINT16 get_bigendian_uint16(const UINT8 *base)\n {\n \treturn (base[0] << 8) | base[1];\n }\n \n /*-------------------------------------------------\n-    put_bigendian_uint16 - write a uint16_t to\n+    put_bigendian_uint16 - write a UINT16 to\n     the data stream in bigendian order\n -------------------------------------------------*/\n \n-static INLINE void put_bigendian_uint16(uint8_t *base, uint16_t value)\n+INLINE void put_bigendian_uint16(UINT8 *base, UINT16 value)\n {\n \tbase[0] = value >> 8;\n \tbase[1] = value;\n@@ -1455,10 +1065,10 @@ static INLINE void put_bigendian_uint16(uint8_t *base, uint16_t value)\n     entry from the datastream\n -------------------------------------------------*/\n \n-static INLINE void map_extract(const uint8_t *base, map_entry *entry)\n+INLINE void map_extract(const UINT8 *base, map_entry *entry)\n {\n-\tentry->offset = get_bigendian_uint64_t(&base[0]);\n-\tentry->crc = get_bigendian_uint32_t(&base[8]);\n+\tentry->offset = get_bigendian_uint64(&base[0]);\n+\tentry->crc = get_bigendian_uint32(&base[8]);\n \tentry->length = get_bigendian_uint16(&base[12]) | (base[14] << 16);\n \tentry->flags = base[15];\n }\n@@ -1468,10 +1078,10 @@ static INLINE void map_extract(const uint8_t *base, map_entry *entry)\n     entry to the datastream\n -------------------------------------------------*/\n \n-static INLINE void map_assemble(uint8_t *base, map_entry *entry)\n+INLINE void map_assemble(UINT8 *base, map_entry *entry)\n {\n-\tput_bigendian_uint64_t(&base[0], entry->offset);\n-\tput_bigendian_uint32_t(&base[8], entry->crc);\n+\tput_bigendian_uint64(&base[0], entry->offset);\n+\tput_bigendian_uint32(&base[8], entry->crc);\n \tput_bigendian_uint16(&base[12], entry->length);\n \tbase[14] = entry->length >> 16;\n \tbase[15] = entry->flags;\n@@ -1480,7 +1090,7 @@ static INLINE void map_assemble(uint8_t *base, map_entry *entry)\n /*-------------------------------------------------\n     map_size_v5 - calculate CHDv5 map size\n -------------------------------------------------*/\n-static INLINE int map_size_v5(chd_header* header)\n+INLINE int map_size_v5(chd_header* header)\n {\n \treturn header->hunkcount * header->mapentrybytes;\n }\n@@ -1539,7 +1149,7 @@ uint16_t crc16(const void *data, uint32_t length)\n /*-------------------------------------------------\n \tcompressed - test if CHD file is compressed\n +-------------------------------------------------*/\n-static INLINE int chd_compressed(chd_header* header) {\n+INLINE int chd_compressed(chd_header* header) {\n \treturn header->compression[0] != CHD_CODEC_NONE;\n }\n \n@@ -1549,8 +1159,8 @@ static INLINE int chd_compressed(chd_header* header) {\n \n static chd_error decompress_v5_map(chd_file* chd, chd_header* header)\n {\n-\t/*int result = 0;*/\n-\tuint32_t hunknum;\n+\tint result = 0;\n+\tint hunknum;\n \tint repcount = 0;\n \tuint8_t lastcomp = 0;\n \tuint32_t last_self = 0;\n@@ -1572,17 +1182,15 @@ static chd_error decompress_v5_map(chd_file* chd, chd_header* header)\n \tif (!chd_compressed(header))\n \t{\n \t\theader->rawmap = (uint8_t*)malloc(rawmapsize);\n-\t\tif (header->rawmap == NULL)\n-\t\t\treturn CHDERR_OUT_OF_MEMORY;\n \t\tcore_fseek(chd->file, header->mapoffset, SEEK_SET);\n-\t\tcore_fread(chd->file, header->rawmap, rawmapsize);\n+\t\tresult = core_fread(chd->file, header->rawmap, rawmapsize);\n \t\treturn CHDERR_NONE;\n \t}\n \n \t/* read the reader */\n \tcore_fseek(chd->file, header->mapoffset, SEEK_SET);\n-\tcore_fread(chd->file, rawbuf, sizeof(rawbuf));\n-\tmapbytes = get_bigendian_uint32_t(&rawbuf[0]);\n+\tresult = core_fread(chd->file, rawbuf, sizeof(rawbuf));\n+\tmapbytes = get_bigendian_uint32(&rawbuf[0]);\n \tfirstoffs = get_bigendian_uint48(&rawbuf[4]);\n \tmapcrc = get_bigendian_uint16(&rawbuf[10]);\n \tlengthbits = rawbuf[12];\n@@ -1591,18 +1199,10 @@ static chd_error decompress_v5_map(chd_file* chd, chd_header* header)\n \n \t/* now read the map */\n \tcompressed_ptr = (uint8_t*)malloc(sizeof(uint8_t) * mapbytes);\n-\tif (compressed_ptr == NULL)\n-\t\treturn CHDERR_OUT_OF_MEMORY;\n \tcore_fseek(chd->file, header->mapoffset + 16, SEEK_SET);\n-\tcore_fread(chd->file, compressed_ptr, mapbytes);\n+\tresult = core_fread(chd->file, compressed_ptr, mapbytes);\n \tbitbuf = create_bitstream(compressed_ptr, sizeof(uint8_t) * mapbytes);\n \theader->rawmap = (uint8_t*)malloc(rawmapsize);\n-\tif (header->rawmap == NULL)\n-\t{\n-\t\tfree(compressed_ptr);\n-\t\tfree(bitbuf);\n-\t\treturn CHDERR_OUT_OF_MEMORY;\n-\t}\n \n \t/* first decode the compression types */\n \tdecoder = create_huffman_decoder(16, 8);\n@@ -1719,9 +1319,9 @@ static chd_error decompress_v5_map(chd_file* chd, chd_header* header)\n     entry in old format from the datastream\n -------------------------------------------------*/\n \n-static INLINE void map_extract_old(const uint8_t *base, map_entry *entry, uint32_t hunkbytes)\n+INLINE void map_extract_old(const UINT8 *base, map_entry *entry, UINT32 hunkbytes)\n {\n-\tentry->offset = get_bigendian_uint64_t(&base[0]);\n+\tentry->offset = get_bigendian_uint64(&base[0]);\n \tentry->crc = 0;\n \tentry->length = entry->offset >> 44;\n \tentry->flags = MAP_ENTRY_FLAG_NO_CRC | ((entry->length == hunkbytes) ? V34_MAP_ENTRY_TYPE_UNCOMPRESSED : V34_MAP_ENTRY_TYPE_COMPRESSED);\n@@ -1740,24 +1340,7 @@ static INLINE void map_extract_old(const uint8_t *base, map_entry *entry, uint32\n     chd_open_file - open a CHD file for access\n -------------------------------------------------*/\n \n-CHD_EXPORT chd_error chd_open_file(FILE *file, int mode, chd_file *parent, chd_file **chd) {\n-\tcore_file *stream = malloc(sizeof(core_file));\n-\tif (!stream)\n-\t\treturn CHDERR_OUT_OF_MEMORY;\n-\tstream->argp = file;\n-\tstream->fsize = core_stdio_fsize;\n-\tstream->fread = core_stdio_fread;\n-\tstream->fclose = core_stdio_fclose_nonowner;\n-\tstream->fseek = core_stdio_fseek;\n-\n-\treturn chd_open_core_file(stream, mode, parent, chd);\n-}\n-\n-/*-------------------------------------------------\n-    chd_open_core_file - open a CHD file for access\n--------------------------------------------------*/\n-\n-CHD_EXPORT chd_error chd_open_core_file(core_file *file, int mode, chd_file *parent, chd_file **chd)\n+CHD_EXPORT chd_error chd_open_file(core_file *file, int mode, chd_file *parent, chd_file **chd)\n {\n \tchd_file *newchd = NULL;\n \tchd_error err;\n@@ -1799,15 +1382,8 @@ CHD_EXPORT chd_error chd_open_core_file(core_file *file, int mode, chd_file *par\n \t\tEARLY_EXIT(err = CHDERR_UNSUPPORTED_VERSION);\n \n \t/* if we need a parent, make sure we have one */\n-\tif (parent == NULL)\n-\t{\n-\t\t/* Detect parent requirement for versions below 5 */\n-\t\tif (newchd->header.version < 5 && newchd->header.flags & CHDFLAGS_HAS_PARENT)\n-\t\t\tEARLY_EXIT(err = CHDERR_REQUIRES_PARENT);\n-\t\t/* Detection for version 5 and above - if parentsha1 != 0, we have a parent */\n-\t\telse if (newchd->header.version >= 5 && memcmp(nullsha1, newchd->header.parentsha1, sizeof(newchd->header.parentsha1)) != 0)\n-\t\t\tEARLY_EXIT(err = CHDERR_REQUIRES_PARENT);\n-\t}\n+\tif (parent == NULL && (newchd->header.flags & CHDFLAGS_HAS_PARENT))\n+\t\tEARLY_EXIT(err = CHDERR_REQUIRES_PARENT);\n \n \t/* make sure we have a valid parent */\n \tif (parent != NULL)\n@@ -1841,8 +1417,8 @@ CHD_EXPORT chd_error chd_open_core_file(core_file *file, int mode, chd_file *par\n \n #ifdef NEED_CACHE_HUNK\n \t/* allocate and init the hunk cache */\n-\tnewchd->cache = (uint8_t *)malloc(newchd->header.hunkbytes);\n-\tnewchd->compare = (uint8_t *)malloc(newchd->header.hunkbytes);\n+\tnewchd->cache = (UINT8 *)malloc(newchd->header.hunkbytes);\n+\tnewchd->compare = (UINT8 *)malloc(newchd->header.hunkbytes);\n \tif (newchd->cache == NULL || newchd->compare == NULL)\n \t\tEARLY_EXIT(err = CHDERR_OUT_OF_MEMORY);\n \tnewchd->cachehunk = ~0;\n@@ -1850,7 +1426,7 @@ CHD_EXPORT chd_error chd_open_core_file(core_file *file, int mode, chd_file *par\n #endif\n \n \t/* allocate the temporary compressed buffer */\n-\tnewchd->compressed = (uint8_t *)malloc(newchd->header.hunkbytes);\n+\tnewchd->compressed = (UINT8 *)malloc(newchd->header.hunkbytes);\n \tif (newchd->compressed == NULL)\n \t\tEARLY_EXIT(err = CHDERR_OUT_OF_MEMORY);\n \n@@ -1906,22 +1482,6 @@ CHD_EXPORT chd_error chd_open_core_file(core_file *file, int mode, chd_file *par\n \t\t\t\t\t\tcodec = &newchd->zlib_codec_data;\n \t\t\t\t\t\tbreak;\n \n-\t\t\t\t\tcase CHD_CODEC_LZMA:\n-\t\t\t\t\t\tcodec = &newchd->lzma_codec_data;\n-\t\t\t\t\t\tbreak;\n-\n-\t\t\t\t\tcase CHD_CODEC_HUFFMAN:\n-\t\t\t\t\t\tcodec = &newchd->huff_codec_data;\n-\t\t\t\t\t\tbreak;\n-\n-\t\t\t\t\tcase CHD_CODEC_FLAC:\n-\t\t\t\t\t\tcodec = &newchd->flac_codec_data;\n-\t\t\t\t\t\tbreak;\n-\n-\t\t\t\t\tcase CHD_CODEC_ZSTD:\n-\t\t\t\t\t\tcodec = &newchd->zstd_codec_data;\n-\t\t\t\t\t\tbreak;\n-\n \t\t\t\t\tcase CHD_CODEC_CD_ZLIB:\n \t\t\t\t\t\tcodec = &newchd->cdzl_codec_data;\n \t\t\t\t\t\tbreak;\n@@ -1933,10 +1493,6 @@ CHD_EXPORT chd_error chd_open_core_file(core_file *file, int mode, chd_file *par\n \t\t\t\t\tcase CHD_CODEC_CD_FLAC:\n \t\t\t\t\t\tcodec = &newchd->cdfl_codec_data;\n \t\t\t\t\t\tbreak;\n-\n-\t\t\t\t\tcase CHD_CODEC_CD_ZSTD:\n-\t\t\t\t\t\tcodec = &newchd->cdzs_codec_data;\n-\t\t\t\t\t\tbreak;\n \t\t\t\t}\n \n \t\t\t\tif (codec == NULL)\n@@ -1966,13 +1522,17 @@ CHD_EXPORT chd_error chd_open_core_file(core_file *file, int mode, chd_file *par\n \n CHD_EXPORT chd_error chd_precache(chd_file *chd)\n {\n-\tint64_t count;\n-\tuint64_t size;\n+#ifdef _MSC_VER\n+\tsize_t size, count;\n+#else\n+\tssize_t size, count;\n+#endif\n \n \tif (chd->file_cache == NULL)\n \t{\n-\t\tsize = core_fsize(chd->file);\n-\t\tif ((int64_t)size <= 0)\n+\t\tcore_fseek(chd->file, 0, SEEK_END);\n+\t\tsize = core_ftell(chd->file);\n+\t\tif (size <= 0)\n \t\t\treturn CHDERR_INVALID_DATA;\n \t\tchd->file_cache = malloc(size);\n \t\tif (chd->file_cache == NULL)\n@@ -2000,12 +1560,6 @@ CHD_EXPORT chd_error chd_open(const char *filename, int mode, chd_file *parent,\n \tchd_error err;\n \tcore_file *file = NULL;\n \n-\tif (filename == NULL)\n-\t{\n-\t\terr = CHDERR_INVALID_PARAMETER;\n-\t\tgoto cleanup;\n-\t}\n-\n \t/* choose the proper mode */\n \tswitch(mode)\n \t{\n@@ -2018,7 +1572,7 @@ CHD_EXPORT chd_error chd_open(const char *filename, int mode, chd_file *parent,\n \t}\n \n \t/* open the file */\n-\tfile = core_stdio_fopen(filename);\n+\tfile = core_fopen(filename);\n \tif (file == 0)\n \t{\n \t\terr = CHDERR_FILE_NOT_FOUND;\n@@ -2026,7 +1580,12 @@ CHD_EXPORT chd_error chd_open(const char *filename, int mode, chd_file *parent,\n \t}\n \n \t/* now open the CHD */\n-\treturn chd_open_core_file(file, mode, parent, chd);\n+\terr = chd_open_file(file, mode, parent, chd);\n+\tif (err != CHDERR_NONE)\n+\t\tgoto cleanup;\n+\n+\t/* we now own this file */\n+\t(*chd)->owns_file = TRUE;\n \n cleanup:\n \tif ((err != CHDERR_NONE) && (file != NULL))\n@@ -2063,41 +1622,21 @@ CHD_EXPORT void chd_close(chd_file *chd)\n \n \t\t\tswitch (chd->codecintf[i]->compression)\n \t\t\t{\n-\t\t\t\tcase CHD_CODEC_ZLIB:\n-\t\t\t\t\tcodec = &chd->zlib_codec_data;\n-\t\t\t\t\tbreak;\n-\n-\t\t\t\tcase CHD_CODEC_LZMA:\n-\t\t\t\t\tcodec = &chd->lzma_codec_data;\n-\t\t\t\t\tbreak;\n-\n-\t\t\t\tcase CHD_CODEC_HUFFMAN:\n-\t\t\t\t\tcodec = &chd->huff_codec_data;\n-\t\t\t\t\tbreak;\n-\n-\t\t\t\tcase CHD_CODEC_FLAC:\n-\t\t\t\t\tcodec = &chd->flac_codec_data;\n+\t\t\t\tcase CHD_CODEC_CD_LZMA:\n+\t\t\t\t\tcodec = &chd->cdlz_codec_data;\n \t\t\t\t\tbreak;\n \n-\t\t\t\tcase CHD_CODEC_ZSTD:\n-\t\t\t\t\tcodec = &chd->zstd_codec_data;\n+\t\t\t\tcase CHD_CODEC_ZLIB:\n+\t\t\t\t\tcodec = &chd->zlib_codec_data;\n \t\t\t\t\tbreak;\n \n \t\t\t\tcase CHD_CODEC_CD_ZLIB:\n \t\t\t\t\tcodec = &chd->cdzl_codec_data;\n \t\t\t\t\tbreak;\n \n-\t\t\t\tcase CHD_CODEC_CD_LZMA:\n-\t\t\t\t\tcodec = &chd->cdlz_codec_data;\n-\t\t\t\t\tbreak;\n-\n \t\t\t\tcase CHD_CODEC_CD_FLAC:\n \t\t\t\t\tcodec = &chd->cdfl_codec_data;\n \t\t\t\t\tbreak;\n-\n-\t\t\t\tcase CHD_CODEC_CD_ZSTD:\n-\t\t\t\t\tcodec = &chd->cdzs_codec_data;\n-\t\t\t\t\tbreak;\n \t\t\t}\n \n \t\t\tif (codec)\n@@ -2128,7 +1667,7 @@ CHD_EXPORT void chd_close(chd_file *chd)\n \t\tfree(chd->map);\n \n \t/* close the file */\n-\tif (chd->file != NULL)\n+\tif (chd->owns_file && chd->file != NULL)\n \t\tcore_fclose(chd->file);\n \n #ifdef NEED_CACHE_HUNK\n@@ -2137,9 +1676,6 @@ CHD_EXPORT void chd_close(chd_file *chd)\n \tif (chd->file_cache)\n \t\tfree(chd->file_cache);\n \n-\tif (chd->parent)\n-\t\tchd_close(chd->parent);\n-\n \t/* free our memory */\n \tfree(chd);\n }\n@@ -2213,41 +1749,6 @@ CHD_EXPORT const chd_header *chd_get_header(chd_file *chd)\n \treturn &chd->header;\n }\n \n-/*-------------------------------------------------\n-    chd_read_header - read CHD header data\n-\tfrom file into the pointed struct\n--------------------------------------------------*/\n-CHD_EXPORT chd_error chd_read_header(const char *filename, chd_header *header)\n-{\n-\tchd_error err = CHDERR_NONE;\n-\tchd_file chd;\n-\n-\t/* punt if NULL */\n-\tif (filename == NULL || header == NULL)\n-\t\tEARLY_EXIT(err = CHDERR_INVALID_PARAMETER);\n-\n-\t/* open the file */\n-\tchd.file = core_stdio_fopen(filename);\n-\tif (chd.file == NULL)\n-\t\tEARLY_EXIT(err = CHDERR_FILE_NOT_FOUND);\n-\n-\t/* attempt to read the header */\n-\terr = header_read(&chd, header);\n-\tif (err != CHDERR_NONE)\n-\t\tEARLY_EXIT(err);\n-\n-\t/* validate the header */\n-\terr = header_validate(header);\n-\tif (err != CHDERR_NONE)\n-\t\tEARLY_EXIT(err);\n-\n-cleanup:\n-\tif (chd.file != NULL)\n-\t\tcore_fclose(chd.file);\n-\n-\treturn err;\n-}\n-\n /***************************************************************************\n     CORE DATA READ/WRITE\n ***************************************************************************/\n@@ -2257,7 +1758,7 @@ CHD_EXPORT chd_error chd_read_header(const char *filename, chd_header *header)\n     file\n -------------------------------------------------*/\n \n-CHD_EXPORT chd_error chd_read(chd_file *chd, uint32_t hunknum, void *buffer)\n+CHD_EXPORT chd_error chd_read(chd_file *chd, UINT32 hunknum, void *buffer)\n {\n \t/* punt if NULL or invalid */\n \tif (chd == NULL || chd->cookie != COOKIE_VALUE)\n@@ -2268,7 +1769,7 @@ CHD_EXPORT chd_error chd_read(chd_file *chd, uint32_t hunknum, void *buffer)\n \t\treturn CHDERR_HUNK_OUT_OF_RANGE;\n \n \t/* perform the read */\n-\treturn hunk_read_into_memory(chd, hunknum, (uint8_t *)buffer);\n+\treturn hunk_read_into_memory(chd, hunknum, (UINT8 *)buffer);\n }\n \n /***************************************************************************\n@@ -2280,11 +1781,11 @@ CHD_EXPORT chd_error chd_read(chd_file *chd, uint32_t hunknum, void *buffer)\n     of the given type\n -------------------------------------------------*/\n \n-CHD_EXPORT chd_error chd_get_metadata(chd_file *chd, uint32_t searchtag, uint32_t searchindex, void *output, uint32_t outputlen, uint32_t *resultlen, uint32_t *resulttag, uint8_t *resultflags)\n+CHD_EXPORT chd_error chd_get_metadata(chd_file *chd, UINT32 searchtag, UINT32 searchindex, void *output, UINT32 outputlen, UINT32 *resultlen, UINT32 *resulttag, UINT8 *resultflags)\n {\n \tmetadata_entry metaentry;\n \tchd_error err;\n-\tuint32_t count;\n+\tUINT32 count;\n \n \t/* if we didn't find it, just return */\n \terr = metadata_find_entry(chd, searchtag, searchindex, &metaentry);\n@@ -2294,11 +1795,11 @@ CHD_EXPORT chd_error chd_get_metadata(chd_file *chd, uint32_t searchtag, uint32_\n \t\tif (chd->header.version < 3 && (searchtag == HARD_DISK_METADATA_TAG || searchtag == CHDMETATAG_WILDCARD) && searchindex == 0)\n \t\t{\n \t\t\tchar faux_metadata[256];\n-\t\t\tuint32_t faux_length;\n+\t\t\tUINT32 faux_length;\n \n \t\t\t/* fill in the faux metadata */\n \t\t\tsprintf(faux_metadata, HARD_DISK_METADATA_FORMAT, chd->header.obsolete_cylinders, chd->header.obsolete_heads, chd->header.obsolete_sectors, chd->header.hunkbytes / chd->header.obsolete_hunksize);\n-\t\t\tfaux_length = (uint32_t)strlen(faux_metadata) + 1;\n+\t\t\tfaux_length = (UINT32)strlen(faux_metadata) + 1;\n \n \t\t\t/* copy the metadata itself */\n \t\t\tmemcpy(output, faux_metadata, MIN(outputlen, faux_length));\n@@ -2349,7 +1850,7 @@ CHD_EXPORT chd_error chd_codec_config(chd_file *chd, int param, void *config)\n     particular codec\n -------------------------------------------------*/\n \n-CHD_EXPORT const char *chd_get_codec_name(uint32_t codec)\n+CHD_EXPORT const char *chd_get_codec_name(UINT32 codec)\n {\n \treturn \"Unknown\";\n }\n@@ -2427,7 +1928,7 @@ static chd_error header_validate(const chd_header *header)\n     guess at the bytes/unit based on metadata\n -------------------------------------------------*/\n \n-static uint32_t header_guess_unitbytes(chd_file *chd)\n+static UINT32 header_guess_unitbytes(chd_file *chd)\n {\n \t/* look for hard disk metadata; if found, then the unit size == sector size */\n \tchar metadata[512];\n@@ -2455,8 +1956,8 @@ static uint32_t header_guess_unitbytes(chd_file *chd)\n \n static chd_error header_read(chd_file *chd, chd_header *header)\n {\n-\tuint8_t rawheader[CHD_MAX_HEADER_SIZE];\n-\tuint32_t count;\n+\tUINT8 rawheader[CHD_MAX_HEADER_SIZE];\n+\tUINT32 count;\n \n \t/* punt if NULL */\n \tif (header == NULL)\n@@ -2478,8 +1979,8 @@ static chd_error header_read(chd_file *chd, chd_header *header)\n \n \t/* extract the direct data */\n \tmemset(header, 0, sizeof(*header));\n-\theader->length        = get_bigendian_uint32_t(&rawheader[8]);\n-\theader->version       = get_bigendian_uint32_t(&rawheader[12]);\n+\theader->length        = get_bigendian_uint32(&rawheader[8]);\n+\theader->version       = get_bigendian_uint32(&rawheader[12]);\n \n \t/* make sure it's a version we understand */\n \tif (header->version == 0 || header->version > CHD_HEADER_VERSION)\n@@ -2495,8 +1996,8 @@ static chd_error header_read(chd_file *chd, chd_header *header)\n \t\treturn CHDERR_INVALID_DATA;\n \n \t/* extract the common data */\n-\theader->flags         \t= get_bigendian_uint32_t(&rawheader[16]);\n-\theader->compression[0]\t= get_bigendian_uint32_t(&rawheader[20]);\n+\theader->flags         \t= get_bigendian_uint32(&rawheader[16]);\n+\theader->compression[0]\t= get_bigendian_uint32(&rawheader[20]);\n \theader->compression[1]\t= CHD_CODEC_NONE;\n \theader->compression[2]\t= CHD_CODEC_NONE;\n \theader->compression[3]\t= CHD_CODEC_NONE;\n@@ -2504,19 +2005,17 @@ static chd_error header_read(chd_file *chd, chd_header *header)\n \t/* extract the V1/V2-specific data */\n \tif (header->version < 3)\n \t{\n-\t\tint seclen = (header->version == 1) ? CHD_V1_SECTOR_SIZE : get_bigendian_uint32_t(&rawheader[76]);\n-\t\theader->obsolete_hunksize  = get_bigendian_uint32_t(&rawheader[24]);\n-\t\theader->totalhunks         = get_bigendian_uint32_t(&rawheader[28]);\n-\t\theader->obsolete_cylinders = get_bigendian_uint32_t(&rawheader[32]);\n-\t\theader->obsolete_heads     = get_bigendian_uint32_t(&rawheader[36]);\n-\t\theader->obsolete_sectors   = get_bigendian_uint32_t(&rawheader[40]);\n+\t\tint seclen = (header->version == 1) ? CHD_V1_SECTOR_SIZE : get_bigendian_uint32(&rawheader[76]);\n+\t\theader->obsolete_hunksize  = get_bigendian_uint32(&rawheader[24]);\n+\t\theader->totalhunks         = get_bigendian_uint32(&rawheader[28]);\n+\t\theader->obsolete_cylinders = get_bigendian_uint32(&rawheader[32]);\n+\t\theader->obsolete_heads     = get_bigendian_uint32(&rawheader[36]);\n+\t\theader->obsolete_sectors   = get_bigendian_uint32(&rawheader[40]);\n \t\tmemcpy(header->md5, &rawheader[44], CHD_MD5_BYTES);\n \t\tmemcpy(header->parentmd5, &rawheader[60], CHD_MD5_BYTES);\n-\t\theader->logicalbytes = (uint64_t)header->obsolete_cylinders * (uint64_t)header->obsolete_heads * (uint64_t)header->obsolete_sectors * (uint64_t)seclen;\n+\t\theader->logicalbytes = (UINT64)header->obsolete_cylinders * (UINT64)header->obsolete_heads * (UINT64)header->obsolete_sectors * (UINT64)seclen;\n \t\theader->hunkbytes = seclen * header->obsolete_hunksize;\n \t\theader->unitbytes          = header_guess_unitbytes(chd);\n-\t\tif (header->unitbytes == 0)\n-\t\t\treturn CHDERR_INVALID_DATA;\n \t\theader->unitcount          = (header->logicalbytes + header->unitbytes - 1) / header->unitbytes;\n \t\theader->metaoffset = 0;\n \t}\n@@ -2524,15 +2023,13 @@ static chd_error header_read(chd_file *chd, chd_header *header)\n \t/* extract the V3-specific data */\n \telse if (header->version == 3)\n \t{\n-\t\theader->totalhunks   = get_bigendian_uint32_t(&rawheader[24]);\n-\t\theader->logicalbytes = get_bigendian_uint64_t(&rawheader[28]);\n-\t\theader->metaoffset   = get_bigendian_uint64_t(&rawheader[36]);\n+\t\theader->totalhunks   = get_bigendian_uint32(&rawheader[24]);\n+\t\theader->logicalbytes = get_bigendian_uint64(&rawheader[28]);\n+\t\theader->metaoffset   = get_bigendian_uint64(&rawheader[36]);\n \t\tmemcpy(header->md5, &rawheader[44], CHD_MD5_BYTES);\n \t\tmemcpy(header->parentmd5, &rawheader[60], CHD_MD5_BYTES);\n-\t\theader->hunkbytes    = get_bigendian_uint32_t(&rawheader[76]);\n+\t\theader->hunkbytes    = get_bigendian_uint32(&rawheader[76]);\n \t\theader->unitbytes    = header_guess_unitbytes(chd);\n-\t\tif (header->unitbytes == 0)\n-\t\t\treturn CHDERR_INVALID_DATA;\n \t\theader->unitcount    = (header->logicalbytes + header->unitbytes - 1) / header->unitbytes;\n \t\tmemcpy(header->sha1, &rawheader[80], CHD_SHA1_BYTES);\n \t\tmemcpy(header->parentsha1, &rawheader[100], CHD_SHA1_BYTES);\n@@ -2541,13 +2038,11 @@ static chd_error header_read(chd_file *chd, chd_header *header)\n \t/* extract the V4-specific data */\n \telse if (header->version == 4)\n \t{\n-\t\theader->totalhunks   = get_bigendian_uint32_t(&rawheader[24]);\n-\t\theader->logicalbytes = get_bigendian_uint64_t(&rawheader[28]);\n-\t\theader->metaoffset   = get_bigendian_uint64_t(&rawheader[36]);\n-\t\theader->hunkbytes    = get_bigendian_uint32_t(&rawheader[44]);\n+\t\theader->totalhunks   = get_bigendian_uint32(&rawheader[24]);\n+\t\theader->logicalbytes = get_bigendian_uint64(&rawheader[28]);\n+\t\theader->metaoffset   = get_bigendian_uint64(&rawheader[36]);\n+\t\theader->hunkbytes    = get_bigendian_uint32(&rawheader[44]);\n \t\theader->unitbytes    = header_guess_unitbytes(chd);\n-\t\tif (header->unitbytes == 0)\n-\t\t\treturn CHDERR_INVALID_DATA;\n \t\theader->unitcount    = (header->logicalbytes + header->unitbytes - 1) / header->unitbytes;\n \t\tmemcpy(header->sha1, &rawheader[48], CHD_SHA1_BYTES);\n \t\tmemcpy(header->parentsha1, &rawheader[68], CHD_SHA1_BYTES);\n@@ -2558,20 +2053,16 @@ static chd_error header_read(chd_file *chd, chd_header *header)\n \telse if (header->version == 5)\n \t{\n \t\t/* TODO */\n-\t\theader->compression[0]  = get_bigendian_uint32_t(&rawheader[16]);\n-\t\theader->compression[1]  = get_bigendian_uint32_t(&rawheader[20]);\n-\t\theader->compression[2]  = get_bigendian_uint32_t(&rawheader[24]);\n-\t\theader->compression[3]  = get_bigendian_uint32_t(&rawheader[28]);\n-\t\theader->logicalbytes    = get_bigendian_uint64_t(&rawheader[32]);\n-\t\theader->mapoffset       = get_bigendian_uint64_t(&rawheader[40]);\n-\t\theader->metaoffset      = get_bigendian_uint64_t(&rawheader[48]);\n-\t\theader->hunkbytes       = get_bigendian_uint32_t(&rawheader[56]);\n-\t\tif (header->hunkbytes == 0)\n-\t\t\treturn CHDERR_INVALID_DATA;\n+\t\theader->compression[0]  = get_bigendian_uint32(&rawheader[16]);\n+\t\theader->compression[1]  = get_bigendian_uint32(&rawheader[20]);\n+\t\theader->compression[2]  = get_bigendian_uint32(&rawheader[24]);\n+\t\theader->compression[3]  = get_bigendian_uint32(&rawheader[28]);\n+\t\theader->logicalbytes    = get_bigendian_uint64(&rawheader[32]);\n+\t\theader->mapoffset       = get_bigendian_uint64(&rawheader[40]);\n+\t\theader->metaoffset      = get_bigendian_uint64(&rawheader[48]);\n+\t\theader->hunkbytes       = get_bigendian_uint32(&rawheader[56]);\n \t\theader->hunkcount       = (header->logicalbytes + header->hunkbytes - 1) / header->hunkbytes;\n-\t\theader->unitbytes       = get_bigendian_uint32_t(&rawheader[60]);\n-\t\tif (header->unitbytes == 0)\n-\t\t\treturn CHDERR_INVALID_DATA;\n+\t\theader->unitbytes       = get_bigendian_uint32(&rawheader[60]);\n \t\theader->unitcount       = (header->logicalbytes + header->unitbytes - 1) / header->unitbytes;\n \t\tmemcpy(header->sha1, &rawheader[84], CHD_SHA1_BYTES);\n \t\tmemcpy(header->parentsha1, &rawheader[104], CHD_SHA1_BYTES);\n@@ -2603,7 +2094,7 @@ static chd_error header_read(chd_file *chd, chd_header *header)\n     hunk\n -------------------------------------------------*/\n \n-static uint8_t* hunk_read_compressed(chd_file *chd, uint64_t offset, size_t size)\n+static UINT8* hunk_read_compressed(chd_file *chd, UINT64 offset, size_t size)\n {\n #ifdef _MSC_VER\n \tsize_t bytes;\n@@ -2629,7 +2120,7 @@ static uint8_t* hunk_read_compressed(chd_file *chd, uint64_t offset, size_t size\n     hunk\n -------------------------------------------------*/\n \n-static chd_error hunk_read_uncompressed(chd_file *chd, uint64_t offset, size_t size, uint8_t *dest)\n+static chd_error hunk_read_uncompressed(chd_file *chd, UINT64 offset, size_t size, UINT8 *dest)\n {\n #ifdef _MSC_VER\n \tsize_t bytes;\n@@ -2656,7 +2147,7 @@ static chd_error hunk_read_uncompressed(chd_file *chd, uint64_t offset, size_t s\n     the CHD's hunk cache\n -------------------------------------------------*/\n \n-static chd_error hunk_read_into_cache(chd_file *chd, uint32_t hunknum)\n+static chd_error hunk_read_into_cache(chd_file *chd, UINT32 hunknum)\n {\n \tchd_error err;\n \n@@ -2685,7 +2176,7 @@ static chd_error hunk_read_into_cache(chd_file *chd, uint32_t hunknum)\n     memory at the given location\n -------------------------------------------------*/\n \n-static chd_error hunk_read_into_memory(chd_file *chd, uint32_t hunknum, uint8_t *dest)\n+static chd_error hunk_read_into_memory(chd_file *chd, UINT32 hunknum, UINT8 *dest)\n {\n \tchd_error err;\n \n@@ -2703,8 +2194,8 @@ static chd_error hunk_read_into_memory(chd_file *chd, uint32_t hunknum, uint8_t\n \tif (chd->header.version < 5)\n \t{\n \t\tmap_entry *entry = &chd->map[hunknum];\n-\t\tuint32_t bytes;\n-\t\tuint8_t* compressed_bytes;\n+\t\tUINT32 bytes;\n+\t\tUINT8* compressed_bytes;\n \n \t\t/* switch off the entry type */\n \t\tswitch (entry->flags & MAP_ENTRY_FLAG_TYPE_MASK)\n@@ -2717,9 +2208,7 @@ static chd_error hunk_read_into_memory(chd_file *chd, uint32_t hunknum, uint8_t\n \t\t\t\t/* read it into the decompression buffer */\n \t\t\t\tcompressed_bytes = hunk_read_compressed(chd, entry->offset, entry->length);\n \t\t\t\tif (compressed_bytes == NULL)\n-\t\t\t\t\t{\n \t\t\t\t\treturn CHDERR_READ_ERROR;\n-\t\t\t\t\t}\n \n \t\t\t\t/* now decompress using the codec */\n \t\t\t\terr = CHDERR_NONE;\n@@ -2740,7 +2229,7 @@ static chd_error hunk_read_into_memory(chd_file *chd, uint32_t hunknum, uint8_t\n \n \t\t\t/* mini-compressed data */\n \t\t\tcase V34_MAP_ENTRY_TYPE_MINI:\n-\t\t\t\tput_bigendian_uint64_t(&dest[0], entry->offset);\n+\t\t\t\tput_bigendian_uint64(&dest[0], entry->offset);\n \t\t\t\tfor (bytes = 8; bytes < chd->header.hunkbytes; bytes++)\n \t\t\t\t\tdest[bytes] = dest[bytes - 8];\n \t\t\t\tbreak;\n@@ -2772,16 +2261,16 @@ static chd_error hunk_read_into_memory(chd_file *chd, uint32_t hunknum, uint8_t\n \t\tuint16_t blockcrc;\n #endif\n \t\tuint8_t *rawmap = &chd->header.rawmap[chd->header.mapentrybytes * hunknum];\n-\t\tuint8_t* compressed_bytes;\n+\t\tUINT8* compressed_bytes;\n \n \t\t/* uncompressed case */\n \t\tif (!chd_compressed(&chd->header))\n \t\t{\n-\t\t\tblockoffs = (uint64_t)get_bigendian_uint32_t(rawmap) * (uint64_t)chd->header.hunkbytes;\n+\t\t\tblockoffs = (uint64_t)get_bigendian_uint32(rawmap) * (uint64_t)chd->header.hunkbytes;\n \t\t\tif (blockoffs != 0) {\n+                                int result;\n \t\t\t\tcore_fseek(chd->file, blockoffs, SEEK_SET);\n-\t\t\t\t/*int result =*/\n-\t\t\t\tcore_fread(chd->file, dest, chd->header.hunkbytes);\n+\t\t\t\tresult = core_fread(chd->file, dest, chd->header.hunkbytes);\n \t\t\t/* TODO\n \t\t\telse if (m_parent_missing)\n \t\t\t\tthrow CHDERR_REQUIRES_PARENT; */\n@@ -2814,41 +2303,21 @@ static chd_error hunk_read_into_memory(chd_file *chd, uint32_t hunknum, uint8_t\n \t\t\t\t\treturn CHDERR_READ_ERROR;\n \t\t\t\tswitch (chd->codecintf[rawmap[0]]->compression)\n \t\t\t\t{\n-\t\t\t\t\tcase CHD_CODEC_ZLIB:\n-\t\t\t\t\t\tcodec = &chd->zlib_codec_data;\n-\t\t\t\t\t\tbreak;\n-\n-\t\t\t\t\tcase CHD_CODEC_LZMA:\n-\t\t\t\t\t\tcodec = &chd->lzma_codec_data;\n-\t\t\t\t\t\tbreak;\n-\n-\t\t\t\t\tcase CHD_CODEC_HUFFMAN:\n-\t\t\t\t\t\tcodec = &chd->huff_codec_data;\n-\t\t\t\t\t\tbreak;\n-\n-\t\t\t\t\tcase CHD_CODEC_FLAC:\n-\t\t\t\t\t\tcodec = &chd->flac_codec_data;\n+\t\t\t\t\tcase CHD_CODEC_CD_LZMA:\n+\t\t\t\t\t\tcodec = &chd->cdlz_codec_data;\n \t\t\t\t\t\tbreak;\n \n-\t\t\t\t\tcase CHD_CODEC_ZSTD:\n-\t\t\t\t\t\tcodec = &chd->zstd_codec_data;\n+\t\t\t\t\tcase CHD_CODEC_ZLIB:\n+\t\t\t\t\t\tcodec = &chd->zlib_codec_data;\n \t\t\t\t\t\tbreak;\n \n \t\t\t\t\tcase CHD_CODEC_CD_ZLIB:\n \t\t\t\t\t\tcodec = &chd->cdzl_codec_data;\n \t\t\t\t\t\tbreak;\n \n-\t\t\t\t\tcase CHD_CODEC_CD_LZMA:\n-\t\t\t\t\t\tcodec = &chd->cdlz_codec_data;\n-\t\t\t\t\t\tbreak;\n-\n \t\t\t\t\tcase CHD_CODEC_CD_FLAC:\n \t\t\t\t\t\tcodec = &chd->cdfl_codec_data;\n \t\t\t\t\t\tbreak;\n-\n-\t\t\t\t\tcase CHD_CODEC_CD_ZSTD:\n-\t\t\t\t\t\tcodec = &chd->cdzs_codec_data;\n-\t\t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tif (codec==NULL)\n \t\t\t\t\treturn CHDERR_CODEC_ERROR;\n@@ -2875,36 +2344,13 @@ static chd_error hunk_read_into_memory(chd_file *chd, uint32_t hunknum, uint8_t\n \t\t\t\treturn hunk_read_into_memory(chd, blockoffs, dest);\n \n \t\t\tcase COMPRESSION_PARENT:\n-\t\t\t{\n-\t\t\t\tuint8_t units_in_hunk = chd->header.hunkbytes / chd->header.unitbytes;\n-\n-\t\t\t\tif (chd->parent == NULL)\n+#if 0\n+\t\t\t\t/* TODO */\n+\t\t\t\tif (m_parent_missing)\n \t\t\t\t\treturn CHDERR_REQUIRES_PARENT;\n-\n-\t\t\t\t/* blockoffs is aligned to units_in_hunk */\n-\t\t\t\tif (blockoffs % units_in_hunk == 0) {\n-\t\t\t\t\treturn hunk_read_into_memory(chd->parent, blockoffs / units_in_hunk, dest);\n-\t\t\t\t/* blockoffs is not aligned to units_in_hunk */\n-\t\t\t\t} else {\n-\t\t\t\t\tuint32_t unit_in_hunk = blockoffs % units_in_hunk;\n-\t\t\t\t\tuint8_t *buf = malloc(chd->header.hunkbytes);\n-\t\t\t\t\t/* Read first half of hunk which contains blockoffs */\n-\t\t\t\t\terr = hunk_read_into_memory(chd->parent, blockoffs / units_in_hunk, buf);\n-\t\t\t\t\tif (err != CHDERR_NONE) {\n-\t\t\t\t\t\tfree(buf);\n-\t\t\t\t\t\treturn err;\n-\t\t\t\t\t}\n-\t\t\t\t\tmemcpy(dest, buf + unit_in_hunk * chd->header.unitbytes, (units_in_hunk - unit_in_hunk) * chd->header.unitbytes);\n-\t\t\t\t\t/* Read second half of hunk which contains blockoffs */\n-\t\t\t\t\terr = hunk_read_into_memory(chd->parent, (blockoffs / units_in_hunk) + 1, buf);\n-\t\t\t\t\tif (err != CHDERR_NONE) {\n-\t\t\t\t\t\tfree(buf);\n-\t\t\t\t\t\treturn err;\n-\t\t\t\t\t}\n-\t\t\t\t\tmemcpy(dest + (units_in_hunk - unit_in_hunk) * chd->header.unitbytes, buf, unit_in_hunk * chd->header.unitbytes);\n-\t\t\t\t\tfree(buf);\n-\t\t\t\t}\n-\t\t\t}\n+\t\t\t\treturn m_parent->read_bytes(uint64_t(blockoffs) * uint64_t(m_parent->unit_bytes()), dest, m_hunkbytes);\n+#endif\n+\t\t\t\treturn CHDERR_DECOMPRESSION_ERROR;\n \t\t}\n \t\treturn CHDERR_NONE;\n \t}\n@@ -2923,13 +2369,13 @@ static chd_error hunk_read_into_memory(chd_file *chd, uint32_t hunknum, uint8_t\n \n static chd_error map_read(chd_file *chd)\n {\n-\tuint32_t entrysize = (chd->header.version < 3) ? OLD_MAP_ENTRY_SIZE : MAP_ENTRY_SIZE;\n-\tuint8_t raw_map_entries[MAP_STACK_ENTRIES * MAP_ENTRY_SIZE];\n-\tuint64_t fileoffset, maxoffset = 0;\n-\tuint8_t cookie[MAP_ENTRY_SIZE];\n-\tuint32_t count;\n+\tUINT32 entrysize = (chd->header.version < 3) ? OLD_MAP_ENTRY_SIZE : MAP_ENTRY_SIZE;\n+\tUINT8 raw_map_entries[MAP_STACK_ENTRIES * MAP_ENTRY_SIZE];\n+\tUINT64 fileoffset, maxoffset = 0;\n+\tUINT8 cookie[MAP_ENTRY_SIZE];\n+\tUINT32 count;\n \tchd_error err;\n-\tuint32_t i;\n+\tint i;\n \n \t/* first allocate memory */\n \tchd->map = (map_entry *)malloc(sizeof(chd->map[0]) * chd->header.totalhunks);\n@@ -3006,7 +2452,7 @@ static chd_error map_read(chd_file *chd)\n     metadata_find_entry - find a metadata entry\n -------------------------------------------------*/\n \n-static chd_error metadata_find_entry(chd_file *chd, uint32_t metatag, uint32_t metaindex, metadata_entry *metaentry)\n+static chd_error metadata_find_entry(chd_file *chd, UINT32 metatag, UINT32 metaindex, metadata_entry *metaentry)\n {\n \t/* start at the beginning */\n \tmetaentry->offset = chd->header.metaoffset;\n@@ -3015,8 +2461,8 @@ static chd_error metadata_find_entry(chd_file *chd, uint32_t metatag, uint32_t m\n \t/* loop until we run out of options */\n \twhile (metaentry->offset != 0)\n \t{\n-\t\tuint8_t\traw_meta_header[METADATA_HEADER_SIZE];\n-\t\tuint32_t\tcount;\n+\t\tUINT8\traw_meta_header[METADATA_HEADER_SIZE];\n+\t\tUINT32\tcount;\n \n \t\t/* read the raw header */\n \t\tcore_fseek(chd->file, metaentry->offset, SEEK_SET);\n@@ -3025,9 +2471,9 @@ static chd_error metadata_find_entry(chd_file *chd, uint32_t metatag, uint32_t m\n \t\t\tbreak;\n \n \t\t/* extract the data */\n-\t\tmetaentry->metatag = get_bigendian_uint32_t(&raw_meta_header[0]);\n-\t\tmetaentry->length = get_bigendian_uint32_t(&raw_meta_header[4]);\n-\t\tmetaentry->next = get_bigendian_uint64_t(&raw_meta_header[8]);\n+\t\tmetaentry->metatag = get_bigendian_uint32(&raw_meta_header[0]);\n+\t\tmetaentry->length = get_bigendian_uint32(&raw_meta_header[4]);\n+\t\tmetaentry->next = get_bigendian_uint64(&raw_meta_header[8]);\n \n \t\t/* flags are encoded in the high byte of length */\n \t\tmetaentry->flags = metaentry->length >> 24;\n@@ -3080,6 +2526,10 @@ static chd_error zlib_codec_init(void *codec, uint32_t hunkbytes)\n \telse\n \t\terr = CHDERR_NONE;\n \n+\t/* handle an error */\n+\tif (err != CHDERR_NONE)\n+\t\tzlib_codec_free(data);\n+\n \treturn err;\n }\n \n@@ -3095,6 +2545,8 @@ static void zlib_codec_free(void *codec)\n \t/* deinit the streams */\n \tif (data != NULL)\n \t{\n+\t\tint i;\n+\n \t\tinflateEnd(&data->inflater);\n \n \t\t/* free our fast memory */\n@@ -3144,7 +2596,7 @@ static voidpf zlib_fast_alloc(voidpf opaque, uInt items, uInt size)\n {\n \tzlib_allocator *alloc = (zlib_allocator *)opaque;\n \tuintptr_t paddr = 0;\n-\tuint32_t *ptr;\n+\tUINT32 *ptr;\n \tint i;\n \n \t/* compute the size, rounding to the nearest 1k */\n@@ -3165,7 +2617,7 @@ static voidpf zlib_fast_alloc(voidpf opaque, uInt items, uInt size)\n \t}\n \n \t/* alloc a new one */\n-    ptr = (uint32_t *)malloc(size + sizeof(uint32_t) + ZLIB_MIN_ALIGNMENT_BYTES);\n+    ptr = (UINT32 *)malloc(size + sizeof(UINT32) + ZLIB_MIN_ALIGNMENT_BYTES);\n \tif (!ptr)\n \t\treturn NULL;\n \n@@ -3174,7 +2626,7 @@ static voidpf zlib_fast_alloc(voidpf opaque, uInt items, uInt size)\n \t\tif (!alloc->allocptr[i])\n \t\t{\n \t\t\talloc->allocptr[i] = ptr;\n-\t\t\tpaddr = (((uintptr_t)ptr) + sizeof(uint32_t) + (ZLIB_MIN_ALIGNMENT_BYTES-1)) & (~(ZLIB_MIN_ALIGNMENT_BYTES-1));\n+\t\t\tpaddr = (((uintptr_t)ptr) + sizeof(UINT32) + (ZLIB_MIN_ALIGNMENT_BYTES-1)) & (~(ZLIB_MIN_ALIGNMENT_BYTES-1));\n \t\t\talloc->allocptr2[i] = (uint32_t*)paddr;\n \t\t\tbreak;\n \t\t}\n@@ -3194,7 +2646,7 @@ static voidpf zlib_fast_alloc(voidpf opaque, uInt items, uInt size)\n static void zlib_fast_free(voidpf opaque, voidpf address)\n {\n \tzlib_allocator *alloc = (zlib_allocator *)opaque;\n-\tuint32_t *ptr = (uint32_t *)address;\n+\tUINT32 *ptr = (UINT32 *)address;\n \tint i;\n \n \t/* find the hunk */\n@@ -3219,87 +2671,3 @@ static void zlib_allocator_free(voidpf opaque)\n \t\tif (alloc->allocptr[i])\n \t\t\tfree(alloc->allocptr[i]);\n }\n-\n-/*-------------------------------------------------\n-\tcore_stdio_fopen - core_file wrapper over fopen\n--------------------------------------------------*/\n-static core_file *core_stdio_fopen(char const *path) {\n-\tcore_file *file = malloc(sizeof(core_file));\n-\tif (!file)\n-\t\treturn NULL;\n-\tif (!(file->argp = fopen(path, \"rb\"))) {\n-\t\tfree(file);\n-\t\treturn NULL;\n-\t}\n-\tfile->fsize = core_stdio_fsize;\n-\tfile->fread = core_stdio_fread;\n-\tfile->fclose = core_stdio_fclose;\n-\tfile->fseek = core_stdio_fseek;\n-\treturn file;\n-}\n-\n-/*-------------------------------------------------\n-\tcore_stdio_fsize - core_file function for\n-\tgetting file size with stdio\n--------------------------------------------------*/\n-static uint64_t core_stdio_fsize(core_file *file) {\n-#if defined USE_LIBRETRO_VFS\n-\t#define core_stdio_fseek_impl fseek\n-\t#define core_stdio_ftell_impl ftell\n-#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WIN64__)\n-\t#define core_stdio_fseek_impl _fseeki64\n-\t#define core_stdio_ftell_impl _ftelli64\n-#elif defined(_LARGEFILE_SOURCE) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64\n-\t#define core_stdio_fseek_impl fseeko64\n-\t#define core_stdio_ftell_impl ftello64\n-#elif defined(__PS3__) && !defined(__PSL1GHT__) || defined(__SWITCH__) || defined(__vita__)\n-\t#define core_stdio_fseek_impl(x,y,z) fseek(x,(off_t)y,z)\n-\t#define core_stdio_ftell_impl(x) (off_t)ftell(x)\n-#else\n-\t#define core_stdio_fseek_impl fseeko\n-\t#define core_stdio_ftell_impl ftello\n-#endif\n-\tFILE *fp;\n-\tuint64_t p, rv;\n-\tfp = (FILE*)file->argp;\n-\n-\tp = core_stdio_ftell_impl(fp);\n-\tcore_stdio_fseek_impl(fp, 0, SEEK_END);\n-\trv = core_stdio_ftell_impl(fp);\n-\tcore_stdio_fseek_impl(fp, p, SEEK_SET);\n-\treturn rv;\n-}\n-\n-/*-------------------------------------------------\n-\tcore_stdio_fread - core_file wrapper over fread\n--------------------------------------------------*/\n-static size_t core_stdio_fread(void *ptr, size_t size, size_t nmemb, core_file *file) {\n-\treturn fread(ptr, size, nmemb, (FILE*)file->argp);\n-}\n-\n-/*-------------------------------------------------\n-\tcore_stdio_fclose - core_file wrapper over fclose\n--------------------------------------------------*/\n-static int core_stdio_fclose(core_file *file) {\n-\tint err = fclose((FILE*)file->argp);\n-\tif (err == 0)\n-\t\tfree(file);\n-\treturn err;\n-}\n-\n-/*-------------------------------------------------\n-\tcore_stdio_fclose_nonowner - don't call fclose because\n-\t\twe don't own the underlying file, but do free the\n-\t\tcore_file because libchdr did allocate that itself.\n--------------------------------------------------*/\n-static int core_stdio_fclose_nonowner(core_file *file) {\n-\tfree(file);\n-\treturn 0;\n-}\n-\n-/*-------------------------------------------------\n-\tcore_stdio_fseek - core_file wrapper over fclose\n--------------------------------------------------*/\n-static int core_stdio_fseek(core_file* file, int64_t offset, int whence) {\n-\treturn core_stdio_fseek_impl((FILE*)file->argp, offset, whence);\n-}\ndiff --git a/libretro/deps/libchdr/src/libchdr_flac.c b/libretro/deps/libchdr/src/libchdr_flac.c\nindex 66c09dea8..4ded43ba4 100644\n--- a/libretro/deps/libchdr/src/libchdr_flac.c\n+++ b/libretro/deps/libchdr/src/libchdr_flac.c\n@@ -8,14 +8,11 @@\n \n ***************************************************************************/\n \n+#include <assert.h>\n #include <string.h>\n \n #include <libchdr/flac.h>\n-#undef INLINE\n-#include <retro_inline.h>\n #define DR_FLAC_IMPLEMENTATION\n-#define DR_FLAC_NO_STDIO\n-#define DRFLAC_API static INLINE\n #include <dr_libs/dr_flac.h>\n \n /***************************************************************************\n@@ -26,13 +23,13 @@\n static size_t flac_decoder_read_callback(void *userdata, void *buffer, size_t bytes);\n static drflac_bool32 flac_decoder_seek_callback(void *userdata, int offset, drflac_seek_origin origin);\n static void flac_decoder_metadata_callback(void *userdata, drflac_metadata *metadata);\n-static void flac_decoder_write_callback(void *userdata, void *buffer, size_t bytes);\n+static void flac_decoder_write_callback(void *userdata, void *buffer, size_t len);\n \n \n /* getters (valid after reset) */\n-/*static uint32_t sample_rate(flac_decoder *decoder)  { return decoder->sample_rate; }*/\n+static uint32_t sample_rate(flac_decoder *decoder)  { return decoder->sample_rate; }\n static uint8_t channels(flac_decoder *decoder)  { return decoder->channels; }\n-/*static uint8_t bits_per_sample(flac_decoder *decoder) { return decoder->bits_per_sample; }*/\n+static uint8_t bits_per_sample(flac_decoder *decoder) { return decoder->bits_per_sample; }\n \n /*-------------------------------------------------\n  *  flac_decoder - constructor\n@@ -63,10 +60,9 @@ int flac_decoder_init(flac_decoder *decoder)\n \n void flac_decoder_free(flac_decoder* decoder)\n {\n-\tif ((decoder != NULL) && (decoder->decoder != NULL)) {\n+\tif ((decoder != NULL) && (decoder->decoder != NULL))\n \t\tdrflac_close(decoder->decoder);\n-\t\tdecoder->decoder = NULL;\n-\t}\n+\tdecoder->decoder = NULL;\n }\n \n /*-------------------------------------------------\n@@ -131,11 +127,12 @@ int flac_decoder_reset(flac_decoder* decoder, uint32_t sample_rate, uint8_t num_\n  *-------------------------------------------------\n  */\n \n+#define\tBUFFER\t2352\t/* bytes per CD audio sector */\n+\n int flac_decoder_decode_interleaved(flac_decoder* decoder, int16_t *samples, uint32_t num_samples, int swap_endian)\n {\n-#define\tBUFFER\t2352\t/* bytes per CD audio sector */\n \tint16_t buffer[BUFFER];\n-\tuint32_t buf_samples = BUFFER / channels(decoder);\n+        uint32_t buf_samples;\n \n \t/* configure the uncompressed buffer */\n \tmemset(decoder->uncompressed_start, 0, sizeof(decoder->uncompressed_start));\n@@ -144,6 +141,7 @@ int flac_decoder_decode_interleaved(flac_decoder* decoder, int16_t *samples, uin\n \tdecoder->uncompressed_length = num_samples;\n \tdecoder->uncompressed_swap = swap_endian;\n \n+\tbuf_samples = BUFFER / channels(decoder);\n \t/* loop until we get everything we want */\n \twhile (decoder->uncompressed_offset < decoder->uncompressed_length) {\n \t\tuint32_t frames = (num_samples < buf_samples ? num_samples : buf_samples);\n@@ -304,3 +302,4 @@ static drflac_bool32 flac_decoder_seek_callback(void *userdata, int offset, drfl\n \t}\n \treturn 0;\n }\n+\ndiff --git a/libretro/deps/libchdr/src/libchdr_huffman.c b/libretro/deps/libchdr/src/libchdr_huffman.c\nindex 556aa346f..6a50f1344 100644\n--- a/libretro/deps/libchdr/src/libchdr_huffman.c\n+++ b/libretro/deps/libchdr/src/libchdr_huffman.c\n@@ -97,6 +97,7 @@\n ***************************************************************************/\n \n #include <stdlib.h>\n+#include <assert.h>\n #include <stdio.h>\n #include <string.h>\n \n@@ -180,8 +181,7 @@ uint32_t huffman_decode_one(struct huffman_decoder* decoder, struct bitstream* b\n \n enum huffman_error huffman_import_tree_rle(struct huffman_decoder* decoder, struct bitstream* bitbuf)\n {\n-\tint numbits;\n-\tuint32_t curnode;\n+\tint numbits, curnode;\n \tenum huffman_error error;\n \n \t/* bits per entry depends on the maxbits */\n@@ -212,8 +212,6 @@ enum huffman_error huffman_import_tree_rle(struct huffman_decoder* decoder, stru\n \t\t\telse\n \t\t\t{\n \t\t\t\tint repcount = bitstream_read(bitbuf, numbits) + 3;\n-\t\t\t\tif (repcount + curnode > decoder->numcodes)\n-\t\t\t\t\treturn HUFFERR_INVALID_DATA;\n \t\t\t\twhile (repcount--)\n \t\t\t\t\tdecoder->huffnode[curnode++].numbits = nodebits;\n \t\t\t}\n@@ -249,7 +247,7 @@ enum huffman_error huffman_import_tree_huffman(struct huffman_decoder* decoder,\n \tint last = 0;\n \tint count = 0;\n \tint index;\n-\tuint32_t curcode;\n+\tint curcode;\n \tuint8_t rlefullbits = 0;\n \tuint32_t temp;\n \tenum huffman_error error;\n@@ -295,9 +293,6 @@ enum huffman_error huffman_import_tree_huffman(struct huffman_decoder* decoder,\n \t\t}\n \t}\n \n-    /* make sure we free the local huffman decoder */\n-    delete_huffman_decoder(smallhuff);\n-\n \t/* make sure we ended up with the right number */\n \tif (curcode != decoder->numcodes)\n \t\treturn HUFFERR_INVALID_DATA;\n@@ -322,7 +317,7 @@ enum huffman_error huffman_import_tree_huffman(struct huffman_decoder* decoder,\n \n enum huffman_error huffman_compute_tree_from_histo(struct huffman_decoder* decoder)\n {\n-\tuint32_t i;\n+\tint i;\n \tuint32_t lowerweight;\n \tuint32_t upperweight;\n \t/* compute the number of data items in the histogram */\n@@ -386,7 +381,7 @@ static int huffman_tree_node_compare(const void *item1, const void *item2)\n \n int huffman_build_tree(struct huffman_decoder* decoder, uint32_t totaldata, uint32_t totalweight)\n {\n-\tuint32_t curcode;\n+\tint curcode;\n \tint nextalloc;\n \tint listitems = 0;\n \tint maxbits = 0;\n@@ -483,8 +478,7 @@ int huffman_build_tree(struct huffman_decoder* decoder, uint32_t totaldata, uint\n \n enum huffman_error huffman_assign_canonical_codes(struct huffman_decoder* decoder)\n {\n-\tuint32_t curcode;\n-\tint codelen;\n+\tint curcode, codelen;\n \tuint32_t curstart = 0;\n \t/* build up a histogram of bit lengths */\n \tuint32_t bithisto[33] = { 0 };\n@@ -525,7 +519,7 @@ enum huffman_error huffman_assign_canonical_codes(struct huffman_decoder* decode\n \n void huffman_build_lookup_table(struct huffman_decoder* decoder)\n {\n-\tuint32_t curcode;\n+\tint curcode;\n \t/* iterate over all codes */\n \tfor (curcode = 0; curcode < decoder->numcodes; curcode++)\n \t{\ndiff --git a/libretro/jni/Android.mk b/libretro/jni/Android.mk\nindex fb5a3a82e..d9448aff8 100644\n--- a/libretro/jni/Android.mk\n+++ b/libretro/jni/Android.mk\n@@ -10,7 +10,7 @@ USE_PER_SOUND_CHANNELS_CONFIG := 1\n \n include $(CORE_DIR)/libretro/Makefile.common\n \n-COREFLAGS := -ffast-math -funroll-loops -DINLINE=\"static inline\" -DUSE_LIBTREMOR -DUSE_16BPP_RENDERING -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 -DALIGN_LONG -DALIGN_WORD -DM68K_OVERCLOCK_SHIFT=20 -DZ80_OVERCLOCK_SHIFT=20 -DHAVE_YM3438_CORE -DUSE_LIBCHDR -D_7ZIP_ST -DZSTD_DISABLE_ASM -DUSE_LIBRETRO_VFS -DHAVE_OPLL_CORE -DUSE_PER_SOUND_CHANNELS_CONFIG $(INCFLAGS) -DMAXROMSIZE=16777216\n+COREFLAGS := -ffast-math -funroll-loops -DINLINE=\"static inline\" -DUSE_LIBTREMOR -DUSE_16BPP_RENDERING -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 -DALIGN_LONG -DALIGN_WORD -DM68K_OVERCLOCK_SHIFT=20 -DZ80_OVERCLOCK_SHIFT=20 -DHAVE_YM3438_CORE -DUSE_LIBCHDR -D_7ZIP_ST -DUSE_LIBRETRO_VFS -DHAVE_OPLL_CORE -DUSE_PER_SOUND_CHANNELS_CONFIG $(INCFLAGS) -DMAXROMSIZE=16777216\n \n ifeq ($(TARGET_ARCH),arm)\n   COREFLAGS += -D_ARM_ASSEM_\ndiff --git a/libretro/libretro.c b/libretro/libretro.c\nindex 798c6cc5f..05899d814 100644\n--- a/libretro/libretro.c\n+++ b/libretro/libretro.c\n@@ -144,14 +144,22 @@ static uint8_t brm_format[0x40] =\n };\r\n uint8_t cart_size;\r\n \r\n+#define MAX_SOUND 768000\r\n+\r\n+#ifdef FRONTEND_SUPPORTS_RGB888\r\n+\t#define RETRO_PITCH uint32_t\r\n+#else\r\n+\t#define RETRO_PITCH uint16_t\r\n+#endif\r\n+\r\n static bool is_running = 0;\r\n static bool restart_eq = false;\r\n static uint8_t temp[0x10000];\r\n-static int16 soundbuffer[3068];\r\n-static uint16_t bitmap_data_[720 * 576];\r\n+static int16 soundbuffer[MAX_SOUND / 50 * 4 * 2];\r\n+static RETRO_PITCH bitmap_data_[720 * 576];\r\n static uint8_t reg0_prev = 0;\r\n \r\n-static char g_rom_dir[256];\r\n+char g_rom_dir[256];\r\n static char g_rom_name[256];\r\n static const void *g_rom_data = NULL;\r\n static size_t g_rom_size      = 0;\r\n@@ -201,7 +209,7 @@ static uint32_t overclock_delay;\n static bool libretro_supports_option_categories = false;\r\n static bool libretro_supports_bitmasks          = false;\r\n \r\n-#define SOUND_FREQUENCY 44100\r\n+#define SOUND_FREQUENCY MAX_SOUND\r\n \r\n /*EQ settings*/\r\n #define HAVE_EQ\r\n@@ -226,6 +234,10 @@ static bool update_audio_latency           = false;\n static bool show_advanced_av_settings      = true;\r\n #endif\r\n \r\n+static unsigned video_ramp = 0;\r\n+static unsigned volume_master = 100;\r\n+static unsigned sampling_rate = 48000;\r\n+\r\n static void retro_audio_buff_status_cb(\r\n       bool active, unsigned occupancy, bool underrun_likely)\r\n {\r\n@@ -937,7 +949,8 @@ static void draw_cursor(int16_t x, int16_t y, uint16_t color)\n    int i;\r\n \r\n    /* crosshair center position */   \r\n-   uint16_t *ptr = (uint16_t *)bitmap.data + ((bitmap.viewport.y + y) * bitmap.width) + x + bitmap.viewport.x;\r\n+   RETRO_PITCH *ptr = (uint32_t *)bitmap.data + ((bitmap.viewport.y + y) * bitmap.width) + x + bitmap.viewport.x;\r\n+   RETRO_PITCH white = (RETRO_PITCH) (-1);\r\n \r\n    /* default crosshair dimension */\r\n    int x_start = x - 3;\r\n@@ -957,9 +970,9 @@ static void draw_cursor(int16_t x, int16_t y, uint16_t color)\n \r\n    /* draw crosshair */\r\n    for (i = (x_start - x); i <= (x_end - x); i++)\r\n-      ptr[i] = (i & 1) ? color : 0xffff;\r\n+      ptr[i] = (i & 1) ? color : white;\r\n    for (i = (y_start - y); i <= (y_end - y); i++)\r\n-      ptr[i * bitmap.width] = (i & 1) ? color : 0xffff;\r\n+      ptr[i * bitmap.width] = (i & 1) ? color : white;\r\n }\r\n \r\n static void init_bitmap(void)\r\n@@ -967,7 +980,7 @@ static void init_bitmap(void)\n    memset(&bitmap, 0, sizeof(bitmap));\r\n    bitmap.width      = 720;\r\n    bitmap.height     = 576;\r\n-   bitmap.pitch      = 720 * 2;\r\n+   bitmap.pitch      = 720 * sizeof(RETRO_PITCH);\r\n    bitmap.data       = (uint8_t *)bitmap_data_;\r\n }\r\n \r\n@@ -1320,9 +1333,9 @@ static bool update_viewport(void)\n    else\r\n       bmdoffset = vwoffset = 0;\r\n \r\n-   vwidth  = bitmap.viewport.w + (bitmap.viewport.x * 2);\r\n-   vheight = bitmap.viewport.h + (bitmap.viewport.y * 2);\r\n-   vaspect_ratio = calculate_display_aspect_ratio();\r\n+  vwidth  = bitmap.viewport.w + (bitmap.viewport.x * 2);\r\n+  vheight = bitmap.viewport.h + (bitmap.viewport.y * 2);\r\n+  vaspect_ratio = calculate_display_aspect_ratio();\r\n \r\n    if (config.ntsc)\r\n    {\r\n@@ -1607,7 +1620,7 @@ static void check_variables(bool first_run)\n           };\r\n \r\n           /* framerate might have changed, reinitialize audio timings */\r\n-          audio_set_rate(44100, 0);\r\n+          audio_set_rate(sampling_rate, 0);\r\n           \r\n           /* reinitialize I/O region register */\r\n           if (system_hw == SYSTEM_MD)\r\n@@ -1688,7 +1701,7 @@ static void check_variables(bool first_run)\n           };\r\n \r\n           /* framerate might have changed, reinitialize audio timings */\r\n-          audio_set_rate(44100, 0);\r\n+          audio_set_rate(sampling_rate, 0);\r\n \r\n           /* reinitialize I/O region register */\r\n           if (system_hw == SYSTEM_MD)\r\n@@ -1859,11 +1872,35 @@ static void check_variables(bool first_run)\n       config.mono = 0; \r\n   }\r\n \r\n+  var.key = \"genesis_plus_gx_audio_master_volume\";\r\n+  environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);\r\n+  {\r\n+    volume_master = (!var.value) ? 100 : atoi(var.value);    \r\n+  }\r\n+\r\n+  var.key = \"genesis_plus_gx_audio_sampling_rate\";\r\n+  environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);\r\n+  {\r\n+    unsigned old_value = sampling_rate;\r\n+    sampling_rate = (!var.value) ? 48000 : atoi(var.value);\r\n+  }\r\n+\r\n+  var.key = \"genesis_plus_gx_audio_lowpass_cutoff\";\r\n+  environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);\r\n+  {\r\n+    extern int set_blip_lowpass(int rate);\r\n+    unsigned new_value;\r\n+\r\n+    new_value = (!var.value) ? 0 : atoi(var.value);\r\n+    set_blip_lowpass(new_value);\r\n+  }\r\n \r\n   var.key = \"genesis_plus_gx_psg_preamp\";\r\n   environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);\r\n   {\r\n     config.psg_preamp = (!var.value) ? 150: atoi(var.value);\r\n+    config.psg_preamp = (config.psg_preamp * volume_master) / 100;\r\n+\r\n     if ((system_hw & SYSTEM_PBC) == SYSTEM_MD)\r\n     {\r\n       psg_config(0, config.psg_preamp, 0xff);\r\n@@ -1878,18 +1915,21 @@ static void check_variables(bool first_run)\n   environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);\r\n   {\r\n     config.fm_preamp = (!var.value) ? 100: atoi(var.value);\r\n+    config.fm_preamp = (config.fm_preamp * volume_master) / 100;\r\n   }\r\n \r\n   var.key = \"genesis_plus_gx_cdda_volume\";\r\n   environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);\r\n   {\r\n     config.cdda_volume = (!var.value) ? 100: atoi(var.value);\r\n+    config.cdda_volume = (config.cdda_volume * volume_master) / 100;\r\n   }\r\n \r\n   var.key = \"genesis_plus_gx_pcm_volume\";\r\n   environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);\r\n   {\r\n     config.pcm_volume = (!var.value) ? 100: atoi(var.value);\r\n+    config.pcm_volume = (config.pcm_volume * volume_master) / 100;\r\n   }\r\n \r\n   var.key = \"genesis_plus_gx_audio_filter\";\r\n@@ -2011,6 +2051,7 @@ static void check_variables(bool first_run)\n   {\r\n     orig_value = config.ntsc;\r\n \r\n+#if 0\r\n     if (!var.value || !strcmp(var.value, \"disabled\"))\r\n       config.ntsc = 0;\r\n     else if (var.value && !strcmp(var.value, \"monochrome\"))\r\n@@ -2037,6 +2078,7 @@ static void check_variables(bool first_run)\n       sms_ntsc_init(sms_ntsc, &sms_ntsc_rgb);\r\n       md_ntsc_init(md_ntsc,   &md_ntsc_rgb);\r\n     }\r\n+#endif\r\n \r\n     if (orig_value != config.ntsc)\r\n       update_viewports = true;\r\n@@ -2109,6 +2151,23 @@ static void check_variables(bool first_run)\n       update_viewports = true;\r\n   }\r\n \r\n+  var.key             = \"genesis_plus_gx_video_ramp\";\r\n+  environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);\r\n+  {\r\n+    extern void palette_libretro_init(int type);\r\n+    int old_value = video_ramp;\r\n+\r\n+    if (!var.value || !strcmp(var.value, \"Linear\"))\r\n+      video_ramp = 0;\r\n+    else if (!strcmp(var.value, \"Hardware\"))\r\n+      video_ramp = 1;\r\n+    else if (!strcmp(var.value, \"Sgb\"))\r\n+      video_ramp = 2;\r\n+\r\n+    if (old_value != video_ramp)\r\n+      palette_libretro_init(video_ramp);\r\n+  }\r\n+\r\n   var.key = \"genesis_plus_gx_gun_cursor\";\r\n   environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);\r\n   {\r\n@@ -2273,7 +2332,7 @@ static void check_variables(bool first_run)\n #ifdef HAVE_OVERCLOCK\r\n     overclock_delay = OVERCLOCK_FRAME_DELAY;\r\n #endif\r\n-    audio_init(SOUND_FREQUENCY, 0);\r\n+    audio_init(sampling_rate, 0);\r\n     memcpy(temp, sram.sram, sizeof(temp));\r\n     system_init();\r\n     system_reset();\r\n@@ -2743,11 +2802,10 @@ static void set_memory_maps(void)\n       const uint64_t mem = RETRO_MEMDESC_SYSTEM_RAM;\r\n       struct retro_memory_map mmaps;\r\n       struct retro_memory_descriptor descs[] = {\r\n-         { mem, work_ram,        0,           0xFF0000, 0, 0, 0x10000, \"68KRAM\" },\r\n+         { mem, work_ram,     0,           0xFF0000, 0, 0, 0x10000, \"68KRAM\" },\r\n          /* virtual address using SCD_BIT so all 512M of prg_ram can be accessed */\r\n          /* at address $80020000 */\r\n-         { mem, scd.prg_ram,     0, SCD_BIT | 0x020000, 0, 0, 0x80000, \"PRGRAM\" },\r\n-         { mem, scd.word_ram_2M, 0,           0x200000, 0, 0, 0x40000, \"WORDRAM\" },\r\n+         { mem, scd.prg_ram,  0, SCD_BIT | 0x020000, 0, 0, 0x80000, \"PRGRAM\" },\r\n       };\r\n \r\n       mmaps.descriptors = descs;\r\n@@ -3165,7 +3223,7 @@ void retro_get_system_av_info(struct retro_system_av_info *info)\n \r\n    info->geometry.aspect_ratio  = vaspect_ratio;\r\n    info->timing.fps             = (double)(system_clock) / (double)lines_per_frame / (double)MCYCLES_PER_LINE;\r\n-   info->timing.sample_rate     = SOUND_FREQUENCY;\r\n+   info->timing.sample_rate     = sampling_rate;\r\n \r\n    if (!retro_fps)\r\n       retro_fps = info->timing.fps;\r\n@@ -3491,6 +3549,13 @@ bool retro_load_game(const struct retro_game_info *info)\n          if (log_cb)\r\n             log_cb(RETRO_LOG_INFO, \"Frontend supports RGB565 - will use that instead of XRGB1555.\\n\");\r\n    }\r\n+#elif defined(FRONTEND_SUPPORTS_RGB888)\r\n+   {\r\n+      unsigned rgb888 = RETRO_PIXEL_FORMAT_XRGB8888;\r\n+      if(environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &rgb888))\r\n+         if (log_cb)\r\n+            log_cb(RETRO_LOG_INFO, \"Frontend supports RGB888 - will use that instead of XRGB565.\\n\");\r\n+   }\r\n #endif\r\n \r\n    sms_ntsc = calloc(1, sizeof(sms_ntsc_t));\r\n@@ -3666,7 +3731,7 @@ bool retro_load_game(const struct retro_game_info *info)\n       }\r\n    }\r\n \r\n-   audio_init(SOUND_FREQUENCY, 0);\r\n+   audio_init(sampling_rate, 0);\r\n    system_init();\r\n    system_reset();\r\n    is_running = false;\r\n@@ -4006,9 +4071,9 @@ void retro_run(void)\n       retro_led_interface();\r\n \r\n    if (!do_skip)\r\n-      video_cb(bitmap.data + bmdoffset, vwidth - vwoffset, vheight, 720 * 2);\r\n+      video_cb(bitmap.data + bmdoffset, vwidth - vwoffset, vheight, 720 * sizeof(RETRO_PITCH));\t\r\n    else\r\n-      video_cb(NULL, vwidth - vwoffset, vheight, 720 * 2);\r\n+      video_cb(NULL, vwidth - vwoffset, vheight, 720 * sizeof(RETRO_PITCH));\r\n \r\n    audio_cb(soundbuffer, soundbuffer_size);\r\n }\r\ndiff --git a/libretro/libretro_core_options.h b/libretro/libretro_core_options.h\nindex 284e4ce6c..ff9763afc 100644\n--- a/libretro/libretro_core_options.h\n+++ b/libretro/libretro_core_options.h\n@@ -389,6 +389,20 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       },\r\n       \"33\"\r\n    },\r\n+   {\r\n+      \"genesis_plus_gx_video_ramp\",\r\n+      \"Video Ramp\",\r\n+      NULL,\r\n+      \"Lookup-table gamma ramp.\",\r\n+      NULL,\r\n+      \"video\",\r\n+      {\r\n+         { \"Linear\", NULL },\r\n+         { \"Hardware\", NULL },\r\n+         { \"Sgb\", \"Sgb (TV)\" },\r\n+      },\r\n+      \"Linear\"\r\n+   },\r\n    {\r\n       \"genesis_plus_gx_ym2413\",\r\n       \"Master System FM (YM2413)\",\r\n@@ -474,6 +488,347 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       },\r\n       \"disabled\"\r\n    },\r\n+#ifdef HAVE_EQ\r\n+   {\r\n+      \"genesis_plus_gx_audio_eq_low\",\r\n+      \"EQ Low\",\r\n+      NULL,\r\n+      \"Adjust the low range band of the internal audio equalizer.\",\r\n+      NULL,\r\n+      \"audio\",\r\n+      {\r\n+         { \"0\", \"0%\" },\r\n+         { \"1\", \"1%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"3\", \"3%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"5\", \"5%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"7\", \"7%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"9\", \"9%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"11\", \"11%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"13\", \"13%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"15\", \"15%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"17\", \"17%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"19\", \"19%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"21\", \"21%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"23\", \"23%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"25\", \"25%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"27\", \"27%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"29\", \"29%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"31\", \"31%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"33\", \"33%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"35\", \"35%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"37\", \"37%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"39\", \"39%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"41\", \"41%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"43\", \"43%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"45\", \"45%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"47\", \"47%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"49\", \"49%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"51\", \"51%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"53\", \"53%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"55\", \"55%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"57\", \"57%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"59\", \"59%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"61\", \"61%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"63\", \"63%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"65\", \"65%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"67\", \"67%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"69\", \"69%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"71\", \"71%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"73\", \"73%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"75\", \"75%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"77\", \"77%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"79\", \"79%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"81\", \"81%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"83\", \"83%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"85\", \"85%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"87\", \"87%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"89\", \"89%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"91\", \"91%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"93\", \"93%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"95\", \"95%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"97\", \"97%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"99\", \"99%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { NULL, NULL },\r\n+      },\r\n+      \"100\"\r\n+   },\r\n+   {\r\n+      \"genesis_plus_gx_audio_eq_mid\",\r\n+      \"EQ Mid\",\r\n+      NULL,\r\n+      \"Adjust the middle range band of the internal audio equalizer.\",\r\n+      NULL,\r\n+      \"audio\",\r\n+      {\r\n+         { \"0\", \"0%\" },\r\n+         { \"1\", \"1%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"3\", \"3%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"5\", \"5%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"7\", \"7%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"9\", \"9%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"11\", \"11%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"13\", \"13%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"15\", \"15%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"17\", \"17%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"19\", \"19%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"21\", \"21%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"23\", \"23%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"25\", \"25%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"27\", \"27%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"29\", \"29%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"31\", \"31%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"33\", \"33%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"35\", \"35%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"37\", \"37%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"39\", \"39%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"41\", \"41%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"43\", \"43%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"45\", \"45%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"47\", \"47%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"49\", \"49%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"51\", \"51%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"53\", \"53%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"55\", \"55%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"57\", \"57%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"59\", \"59%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"61\", \"61%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"63\", \"63%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"65\", \"65%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"67\", \"67%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"69\", \"69%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"71\", \"71%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"73\", \"73%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"75\", \"75%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"77\", \"77%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"79\", \"79%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"81\", \"81%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"83\", \"83%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"85\", \"85%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"87\", \"87%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"89\", \"89%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"91\", \"91%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"93\", \"93%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"95\", \"95%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"97\", \"97%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"99\", \"99%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { NULL, NULL },\r\n+      },\r\n+      \"100\"\r\n+   },\r\n+   {\r\n+      \"genesis_plus_gx_audio_eq_high\",\r\n+      \"EQ High\",\r\n+      NULL,\r\n+      \"Adjust the high range band of the internal audio equalizer.\",\r\n+      NULL,\r\n+      \"audio\",\r\n+      {\r\n+         { \"0\", \"0%\" },\r\n+         { \"1\", \"1%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"3\", \"3%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"5\", \"5%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"7\", \"7%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"9\", \"9%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"11\", \"11%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"13\", \"13%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"15\", \"15%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"17\", \"17%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"19\", \"19%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"21\", \"21%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"23\", \"23%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"25\", \"25%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"27\", \"27%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"29\", \"29%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"31\", \"31%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"33\", \"33%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"35\", \"35%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"37\", \"37%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"39\", \"39%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"41\", \"41%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"43\", \"43%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"45\", \"45%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"47\", \"47%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"49\", \"49%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"51\", \"51%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"53\", \"53%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"55\", \"55%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"57\", \"57%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"59\", \"59%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"61\", \"61%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"63\", \"63%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"65\", \"65%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"67\", \"67%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"69\", \"69%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"71\", \"71%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"73\", \"73%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"75\", \"75%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"77\", \"77%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"79\", \"79%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"81\", \"81%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"83\", \"83%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"85\", \"85%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"87\", \"87%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"89\", \"89%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"91\", \"91%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"93\", \"93%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"95\", \"95%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"97\", \"97%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"99\", \"99%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { NULL, NULL },\r\n+      },\r\n+      \"100\"\r\n+   },\r\n+#endif\r\n    {\r\n       \"genesis_plus_gx_lowpass_range\",\r\n       \"Low-Pass Filter %\",\r\n@@ -482,302 +837,713 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"audio\",\r\n       {\r\n-         { \"5\",  NULL },\r\n-         { \"10\", NULL },\r\n-         { \"15\", NULL },\r\n-         { \"20\", NULL },\r\n-         { \"25\", NULL },\r\n-         { \"30\", NULL },\r\n-         { \"35\", NULL },\r\n-         { \"40\", NULL },\r\n-         { \"45\", NULL },\r\n-         { \"50\", NULL },\r\n-         { \"55\", NULL },\r\n-         { \"60\", NULL },\r\n-         { \"65\", NULL },\r\n-         { \"70\", NULL },\r\n-         { \"75\", NULL },\r\n-         { \"80\", NULL },\r\n-         { \"85\", NULL },\r\n-         { \"90\", NULL },\r\n-         { \"95\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"1\", \"1%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"3\", \"3%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"5\", \"5%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"7\", \"7%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"9\", \"9%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"11\", \"11%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"13\", \"13%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"15\", \"15%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"17\", \"17%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"19\", \"19%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"21\", \"21%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"23\", \"23%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"25\", \"25%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"27\", \"27%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"29\", \"29%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"31\", \"31%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"33\", \"33%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"35\", \"35%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"37\", \"37%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"39\", \"39%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"41\", \"41%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"43\", \"43%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"45\", \"45%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"47\", \"47%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"49\", \"49%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"51\", \"51%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"53\", \"53%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"55\", \"55%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"57\", \"57%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"59\", \"59%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"61\", \"61%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"63\", \"63%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"65\", \"65%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"67\", \"67%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"69\", \"69%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"71\", \"71%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"73\", \"73%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"75\", \"75%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"77\", \"77%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"79\", \"79%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"81\", \"81%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"83\", \"83%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"85\", \"85%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"87\", \"87%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"89\", \"89%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"91\", \"91%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"93\", \"93%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"95\", \"95%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"97\", \"97%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"99\", \"99%\" },\r\n+         { \"100\", \"100%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"60\"\r\n    },\r\n    {\r\n-      \"genesis_plus_gx_psg_preamp\",\r\n-      \"PSG Preamp Level\",\r\n+      \"genesis_plus_gx_audio_sampling_rate\",\r\n+      \"Sampling Rate (Reboot core)\",\r\n       NULL,\r\n-      \"Set the audio preamplifier level of the emulated SN76496 4-channel Programmable Sound Generator found in the SG-1000, Sega Mark III, Master System, Game Gear and Mega Drive/Genesis.\",\r\n+      \"Internal sampling rate. Higher gives less audio lag, better downsampling.\",\r\n       NULL,\r\n       \"audio\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"5\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"15\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"25\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"35\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"45\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"55\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"65\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"75\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"85\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"95\",  NULL },\r\n-         { \"100\", NULL },\r\n-         { \"105\", NULL },\r\n-         { \"110\", NULL },\r\n-         { \"115\", NULL },\r\n-         { \"120\", NULL },\r\n-         { \"125\", NULL },\r\n-         { \"130\", NULL },\r\n-         { \"135\", NULL },\r\n-         { \"140\", NULL },\r\n-         { \"145\", NULL },\r\n-         { \"150\", NULL },\r\n-         { \"155\", NULL },\r\n-         { \"160\", NULL },\r\n-         { \"165\", NULL },\r\n-         { \"170\", NULL },\r\n-         { \"175\", NULL },\r\n-         { \"180\", NULL },\r\n-         { \"185\", NULL },\r\n-         { \"190\", NULL },\r\n-         { \"195\", NULL },\r\n-         { \"200\", NULL },\r\n+         { \"22050\", NULL },\r\n+         { \"44100\", NULL },\r\n+         { \"48000\", NULL },\r\n+         { \"96000\", NULL },\r\n+         { \"192000\", NULL },\r\n+         { \"384000\", NULL },\r\n+         { \"768000\", NULL },\r\n          { NULL, NULL },\r\n       },\r\n-      \"150\"\r\n+      \"48000\"\r\n    },\r\n    {\r\n-      \"genesis_plus_gx_fm_preamp\",\r\n-      \"FM Preamp Level\",\r\n+      \"genesis_plus_gx_audio_lowpass_cutoff\",\r\n+      \"Lowpass Cutoff Rate\",\r\n       NULL,\r\n-      \"Set the audio preamplifier level of the emulated Mega Drive/Genesis FM sound synthesizer or Sega Mark III/Master System FM Sound Unit.\",\r\n+      \"Remove high frequency, aliasing sounds beyond nyquist.\",\r\n       NULL,\r\n       \"audio\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"5\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"15\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"25\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"35\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"45\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"55\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"65\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"75\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"85\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"95\",  NULL },\r\n-         { \"100\", NULL },\r\n-         { \"105\", NULL },\r\n-         { \"110\", NULL },\r\n-         { \"115\", NULL },\r\n-         { \"120\", NULL },\r\n-         { \"125\", NULL },\r\n-         { \"130\", NULL },\r\n-         { \"135\", NULL },\r\n-         { \"140\", NULL },\r\n-         { \"145\", NULL },\r\n-         { \"150\", NULL },\r\n-         { \"155\", NULL },\r\n-         { \"160\", NULL },\r\n-         { \"165\", NULL },\r\n-         { \"170\", NULL },\r\n-         { \"175\", NULL },\r\n-         { \"180\", NULL },\r\n-         { \"185\", NULL },\r\n-         { \"190\", NULL },\r\n-         { \"195\", NULL },\r\n-         { \"200\", NULL },\r\n+         { \"0\", \"Disabled\" },\r\n+         { \"24000\" },\r\n+         { \"48000\" },\r\n+         { \"96000\" },\r\n+         { \"192000\" },\r\n+         { \"384000\" },\r\n          { NULL, NULL },\r\n       },\r\n-      \"100\"\r\n+      \"24000\"\r\n    },\r\n    {\r\n-      \"genesis_plus_gx_cdda_volume\",\r\n-      \"CD-DA Volume\",\r\n+      \"genesis_plus_gx_psg_preamp\",\r\n+      \"PSG Preamp Level\",\r\n       NULL,\r\n-      \"Adjust the mixing volume of the emulated CD audio playback output.\",\r\n+      \"Set the audio preamplifier level of the emulated SN76496 4-channel Programmable Sound Generator found in the SG-1000, Sega Mark III, Master System, Game Gear and Mega Drive/Genesis.\",\r\n       NULL,\r\n       \"audio\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"5\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"15\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"25\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"35\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"45\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"55\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"65\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"75\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"85\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"95\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n-      \"100\"\r\n+      \"150\"\r\n    },\r\n    {\r\n-      \"genesis_plus_gx_pcm_volume\",\r\n-      \"PCM Volume\",\r\n+      \"genesis_plus_gx_fm_preamp\",\r\n+      \"FM Preamp Level\",\r\n       NULL,\r\n-      \"Adjust the mixing volume of the emulated Sega CD/Mega-CD RF5C164 PCM sound generator output.\",\r\n+      \"Set the audio preamplifier level of the emulated Mega Drive/Genesis FM sound synthesizer or Sega Mark III/Master System FM Sound Unit.\",\r\n       NULL,\r\n       \"audio\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"5\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"15\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"25\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"35\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"45\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"55\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"65\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"75\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"85\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"95\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n    },\r\n-#ifdef HAVE_EQ\r\n    {\r\n-      \"genesis_plus_gx_audio_eq_low\",\r\n-      \"EQ Low\",\r\n+      \"genesis_plus_gx_cdda_volume\",\r\n+      \"CD-DA Volume\",\r\n       NULL,\r\n-      \"Adjust the low range band of the internal audio equalizer.\",\r\n+      \"Adjust the mixing volume of the emulated CD audio playback output.\",\r\n       NULL,\r\n       \"audio\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"5\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"15\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"25\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"35\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"45\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"55\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"65\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"75\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"85\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"95\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n    },\r\n    {\r\n-      \"genesis_plus_gx_audio_eq_mid\",\r\n-      \"EQ Mid\",\r\n+      \"genesis_plus_gx_pcm_volume\",\r\n+      \"PCM Volume\",\r\n       NULL,\r\n-      \"Adjust the middle range band of the internal audio equalizer.\",\r\n+      \"Adjust the mixing volume of the emulated Sega CD/Mega-CD RF5C164 PCM sound generator output.\",\r\n       NULL,\r\n       \"audio\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"5\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"15\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"25\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"35\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"45\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"55\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"65\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"75\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"85\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"95\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n    },\r\n    {\r\n-      \"genesis_plus_gx_audio_eq_high\",\r\n-      \"EQ High\",\r\n+      \"genesis_plus_gx_audio_master_volume\",\r\n+      \"Master Volume\",\r\n       NULL,\r\n-      \"Adjust the high range band of the internal audio equalizer.\",\r\n+      \"Adjust the output volume level.\",\r\n       NULL,\r\n       \"audio\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"5\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"15\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"25\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"35\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"45\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"55\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"65\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"75\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"85\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"95\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n    },\r\n-#endif\r\n    {\r\n       \"genesis_plus_gx_gun_input\",\r\n       \"Light Gun Input\",\r\n@@ -985,17 +1751,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1008,17 +1864,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1031,17 +1977,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1054,17 +2090,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1077,17 +2203,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1100,17 +2316,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1123,17 +2429,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1146,17 +2542,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1169,17 +2655,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1192,17 +2768,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1215,17 +2881,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1238,17 +2994,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1261,17 +3107,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1284,17 +3220,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1307,17 +3333,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1330,17 +3446,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1353,17 +3559,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1376,17 +3672,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\n@@ -1399,17 +3785,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {\n       NULL,\r\n       \"channel_volume\",\r\n       {\r\n-         { \"0\",   NULL },\r\n-         { \"10\",  NULL },\r\n-         { \"20\",  NULL },\r\n-         { \"30\",  NULL },\r\n-         { \"40\",  NULL },\r\n-         { \"50\",  NULL },\r\n-         { \"60\",  NULL },\r\n-         { \"70\",  NULL },\r\n-         { \"80\",  NULL },\r\n-         { \"90\",  NULL },\r\n-         { \"100\", NULL },\r\n+         { \"0\", \"0%\" },\r\n+         { \"2\", \"2%\" },\r\n+         { \"4\", \"4%\" },\r\n+         { \"6\", \"6%\" },\r\n+         { \"8\", \"8%\" },\r\n+         { \"10\", \"10%\" },\r\n+         { \"12\", \"12%\" },\r\n+         { \"14\", \"14%\" },\r\n+         { \"16\", \"16%\" },\r\n+         { \"18\", \"18%\" },\r\n+         { \"20\", \"20%\" },\r\n+         { \"22\", \"22%\" },\r\n+         { \"24\", \"24%\" },\r\n+         { \"26\", \"26%\" },\r\n+         { \"28\", \"28%\" },\r\n+         { \"30\", \"30%\" },\r\n+         { \"32\", \"32%\" },\r\n+         { \"34\", \"34%\" },\r\n+         { \"36\", \"36%\" },\r\n+         { \"38\", \"38%\" },\r\n+         { \"40\", \"40%\" },\r\n+         { \"42\", \"42%\" },\r\n+         { \"44\", \"44%\" },\r\n+         { \"46\", \"46%\" },\r\n+         { \"48\", \"48%\" },\r\n+         { \"50\", \"50%\" },\r\n+         { \"52\", \"52%\" },\r\n+         { \"54\", \"54%\" },\r\n+         { \"56\", \"56%\" },\r\n+         { \"58\", \"58%\" },\r\n+         { \"60\", \"60%\" },\r\n+         { \"62\", \"62%\" },\r\n+         { \"64\", \"64%\" },\r\n+         { \"66\", \"66%\" },\r\n+         { \"68\", \"68%\" },\r\n+         { \"70\", \"70%\" },\r\n+         { \"72\", \"72%\" },\r\n+         { \"74\", \"74%\" },\r\n+         { \"76\", \"76%\" },\r\n+         { \"78\", \"78%\" },\r\n+         { \"80\", \"80%\" },\r\n+         { \"82\", \"82%\" },\r\n+         { \"84\", \"84%\" },\r\n+         { \"86\", \"86%\" },\r\n+         { \"88\", \"88%\" },\r\n+         { \"90\", \"90%\" },\r\n+         { \"92\", \"92%\" },\r\n+         { \"94\", \"94%\" },\r\n+         { \"96\", \"96%\" },\r\n+         { \"98\", \"98%\" },\r\n+         { \"100\", \"100%\" },\r\n+         { \"102\", \"102%\" },\r\n+         { \"104\", \"104%\" },\r\n+         { \"106\", \"106%\" },\r\n+         { \"108\", \"108%\" },\r\n+         { \"110\", \"110%\" },\r\n+         { \"112\", \"112%\" },\r\n+         { \"114\", \"114%\" },\r\n+         { \"116\", \"116%\" },\r\n+         { \"118\", \"118%\" },\r\n+         { \"120\", \"120%\" },\r\n+         { \"122\", \"122%\" },\r\n+         { \"124\", \"124%\" },\r\n+         { \"126\", \"126%\" },\r\n+         { \"128\", \"128%\" },\r\n+         { \"130\", \"130%\" },\r\n+         { \"132\", \"132%\" },\r\n+         { \"134\", \"134%\" },\r\n+         { \"136\", \"136%\" },\r\n+         { \"138\", \"138%\" },\r\n+         { \"140\", \"140%\" },\r\n+         { \"142\", \"142%\" },\r\n+         { \"144\", \"144%\" },\r\n+         { \"146\", \"146%\" },\r\n+         { \"148\", \"148%\" },\r\n+         { \"150\", \"150%\" },\r\n+         { \"152\", \"152%\" },\r\n+         { \"154\", \"154%\" },\r\n+         { \"156\", \"156%\" },\r\n+         { \"158\", \"158%\" },\r\n+         { \"160\", \"160%\" },\r\n+         { \"162\", \"162%\" },\r\n+         { \"164\", \"164%\" },\r\n+         { \"166\", \"166%\" },\r\n+         { \"168\", \"168%\" },\r\n+         { \"170\", \"170%\" },\r\n+         { \"172\", \"172%\" },\r\n+         { \"174\", \"174%\" },\r\n+         { \"176\", \"176%\" },\r\n+         { \"178\", \"178%\" },\r\n+         { \"180\", \"180%\" },\r\n+         { \"182\", \"182%\" },\r\n+         { \"184\", \"184%\" },\r\n+         { \"186\", \"186%\" },\r\n+         { \"188\", \"188%\" },\r\n+         { \"190\", \"190%\" },\r\n+         { \"192\", \"192%\" },\r\n+         { \"194\", \"194%\" },\r\n+         { \"196\", \"196%\" },\r\n+         { \"198\", \"198%\" },\r\n+         { \"200\", \"200%\" },\r\n          { NULL, NULL },\r\n       },\r\n       \"100\"\r\ndiff --git a/libretro/libretro_core_options_intl.h b/libretro/libretro_core_options_intl.h\nindex 34473c9e6..0481abddf 100644\n--- a/libretro/libretro_core_options_intl.h\n+++ b/libretro/libretro_core_options_intl.h\n@@ -1779,7 +1779,7 @@ struct retro_core_options_v2 options_ar = {\n #define OPTION_VAL_475_AST NULL\n #define OPTION_VAL_500_AST NULL\n #define GENESIS_PLUS_GX_FORCE_DTACK_LABEL_AST \"Bloqueos del sistema\"\n-#define GENESIS_PLUS_GX_FORCE_DTACK_INFO_0_AST \"Emula los bloqueos del sistema que se producen nel hardware real cuando s'accede a direiciones illegales. Esta opción namás habría desactivase cuando se xueguen ciertes demos ya programes homebrew que s'enconten nel comportamientu illegal pa funcionar correutamente.\"\n+#define GENESIS_PLUS_GX_FORCE_DTACK_INFO_0_AST \"Emula los bloqueos del sistema que se producen nel hardware real cuando s'accede a direiciones illegales. Esta opción namás habría desactivase cuando se xueguen ciertes demos y programes homebrew que s'enconten nel comportamientu illegal pa funcionar correutamente.\"\n #define GENESIS_PLUS_GX_ADDR_ERROR_LABEL_AST NULL\n #define GENESIS_PLUS_GX_ADDR_ERROR_INFO_0_AST NULL\n #define GENESIS_PLUS_GX_CD_LATENCY_LABEL_AST NULL\n@@ -22140,11 +22140,11 @@ struct retro_core_options_v2 options_eo = {\n #define GENESIS_PLUS_GX_SYSTEM_BRAM_INFO_0_ES \"Al ejecutar contenidos para Mega-CD/Sega CD, especifica si se debe compartir un archivo de guardado entre todos los juegos de la misma región («Una por BIOS») o si se debe crear un archivo de guardado individual para cada juego («Una por cada juego»). Nota: la Mega-CD/Sega CD tiene un almacenamiento interno limitado, suficiente para unos pocos títulos. Se recomienda seleccionar «Una por cada juego» para que no te quedes sin espacio libre.\"\n #define OPTION_VAL_PER_BIOS_ES \"Uno por BIOS\"\n #define OPTION_VAL_PER_GAME_ES \"Uno por cada juego\"\n-#define GENESIS_PLUS_GX_CART_BRAM_LABEL_ES \"Cartucho de BRAM de CD (es necesario reiniciar)\"\n+#define GENESIS_PLUS_GX_CART_BRAM_LABEL_ES \"BRAM de memoria de CD (es necesario reiniciar)\"\n #define GENESIS_PLUS_GX_CART_BRAM_INFO_0_ES \"Al ejecutar contenidos para Mega-CD/Sega CD, especifica si se debe compartir un cartucho de RAM para guardados entre todos los juegos de la misma región («Una por cartucho») o si se debe crear un archivo de guardado individual para cada juego («Una por cada juego»).\"\n #define OPTION_VAL_PER_CART_ES \"Una por cartucho\"\n-#define GENESIS_PLUS_GX_CART_SIZE_LABEL_ES \"Tamaño del cartucho de BRAM de CD (es necesario reiniciar)\"\n-#define GENESIS_PLUS_GX_CART_SIZE_INFO_0_ES \"Establece el tamaño del cartucho de RAM para los contenidos de Sega CD/Mega-CD. Este ajuste es ideal si se utiliza un archivo de cartucho de RAM por cada juego para así no tener varios cartuchos de gran tamaño.\"\n+#define GENESIS_PLUS_GX_CART_SIZE_LABEL_ES \"Tamaño de la BRAM de memoria de CD (es necesario reiniciar)\"\n+#define GENESIS_PLUS_GX_CART_SIZE_INFO_0_ES \"Establece el tamaño del cartucho de memoria BRAM para los contenidos de Sega CD/Mega-CD. Este ajuste es ideal al configurar las BRAM de memoria para que haya una por cada juego y evitar tener varios cartuchos con un tamaño grande.\"\n #define OPTION_VAL_128K_ES \"128 Kbit\"\n #define OPTION_VAL_256K_ES \"256 Kbit\"\n #define OPTION_VAL_512K_ES \"512 Kbit\"\n@@ -22244,7 +22244,7 @@ struct retro_core_options_v2 options_eo = {\n #define GENESIS_PLUS_GX_NO_SPRITE_LIMIT_LABEL_ES \"Eliminar límite de sprites por línea\"\n #define GENESIS_PLUS_GX_NO_SPRITE_LIMIT_INFO_0_ES \"Elimina el límite de sprites por líneas de barrido que tenía el hardware original. Reduce los parpadeos, pero puede provocar fallos gráficos, ya que algunos juegos aprovechan esta limitación para generar efectos especiales.\"\n #define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LABEL_ES \"Mejorar desplazamiento vertical de «tiles»\"\n-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_INFO_0_ES \"Permite que cada celda individual pueda desplazarse en vertical de forma fluida en vez de hacerlo por parejas de 16 píxeles, haciendo un promedio del valor «vscroll» de las celdas colindantes. Este arreglo solo afecta a unos pocos juegos que utilizan el modo de desplazamiento vertical por parejas de dos celdas.\"\n+#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_INFO_0_ES \"Permite que cada celda individual pueda desplazarse verticalmente, en vez de hacerlo por parejas de 16 píxeles, haciendo un promedio del valor «vscroll» de las celdas colindantes. Este arreglo solo se aplica a unos pocos juegos que utilizan el modo de desplazamiento vertical por parejas de dos celdas.\"\n #define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_LABEL_ES \"Límite de la mejora del desplazamiento vertical de «tiles»\"\n #define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_INFO_0_ES \"Esta opción solo se aplicará si la mejora del desplazamiento vertical de «tiles» está activada. Ajusta el límite de esta mejora. Cuando la diferencia del valor «vscroll» entre celdas colindantes sea superior a este límite, se desactivará la mejora.\"\n #define GENESIS_PLUS_GX_OVERCLOCK_LABEL_ES \"Velocidad de la CPU\"\n@@ -22271,9 +22271,9 @@ struct retro_core_options_v2 options_eo = {\n #define GENESIS_PLUS_GX_ADDR_ERROR_LABEL_ES \"Error de dirección del 68K\"\n #define GENESIS_PLUS_GX_ADDR_ERROR_INFO_0_ES \"La CPU principal de la Mega Drive/Genesis (el Motorola 68000) genera una excepción (cuelgue) de error de memoria al intentar acceder a una memoria no alineada. Activa esta opción para simular este comportamiento. Solo debe desactivarse para jugar a modificaciones de juegos, ya que estas suelen desarrollarse con emuladores menos precisos y pueden depender de accesos a RAM no válidos para funcionar correctamente.\"\n #define GENESIS_PLUS_GX_CD_LATENCY_LABEL_ES \"Tiempo de acceso al CD\"\n-#define GENESIS_PLUS_GX_CD_LATENCY_INFO_0_ES \"Simula la latencia del lector original de CD al empezar a leer o buscar una ubicación concreta del disco que esté cargado. Esto es necesario para algunos juegos en formato CD que se colgarán si los datos aparecen demasiado pronto, también corrige problemas de desincronización del audio de CD en algunos juegos. Desactivar esta opción podría venir bien para juegos MSU-MD, ya que hará que los bucles en las pistas de audio de CD queden más disimulados.\"\n+#define GENESIS_PLUS_GX_CD_LATENCY_INFO_0_ES \"Simula la latencia del lector original de CD al iniciar una lectura o búsqueda a una ubicación concreta del disco que esté cargada. Necesario para algunos juegos en formato CD que se colgarán si los datos aparecen demasiado pronto y también corrige problemas de desincronización del audio de CD en algunos juegos. Desactivar esta opción podría venir bien para juegos MSU-MD, ya que hará que los bucles de las pistas de audio de CD parezcan más uniformes.\"\n #define GENESIS_PLUS_GX_CD_PRECACHE_LABEL_ES \"Cachear imagen del CD\"\n-#define GENESIS_PLUS_GX_CD_PRECACHE_INFO_0_ES \"Carga la imagen del CD a la memoria al iniciar la emulación. Solo se admiten imágenes CHD. Es necesario reiniciar.\"\n+#define GENESIS_PLUS_GX_CD_PRECACHE_INFO_0_ES \"Carga la imagen del CD a la memoria al iniciar la emulación. Solo se admiten imágenes CDH. Es necesario reiniciar.\"\n #define GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_LABEL_ES \"Mostrar Ajustes avanzados de volumen de audio (es necesario reabrir el menú)\"\n #define GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_INFO_0_ES \"Permite configurar los parámetros de los canales de audio a un bajo nivel. NOTA: es necesario salir y volver a entrar del menú rápido para que el cambio surta efecto.\"\n #define GENESIS_PLUS_GX_PSG_CHANNEL_0_VOLUME_LABEL_ES \"Volumen del canal tonal 0 del PSG (%)\"\n@@ -28404,1582 +28404,6 @@ struct retro_core_options_v2 options_fr = {\n    option_defs_fr\n };\n \n-/* RETRO_LANGUAGE_GA */\n-\n-#define CATEGORY_SYSTEM_LABEL_GA \"Córas\"\n-#define CATEGORY_SYSTEM_INFO_0_GA \"Athraigh an rogha crua-earraí bunúsach, an réigiún, an BIOS agus socruithe comhaid sábhála Sega CD/Mega-CD.\"\n-#define CATEGORY_VIDEO_LABEL_GA \"Físeán\"\n-#define CATEGORY_VIDEO_INFO_0_GA \"Athraigh cóimheas gné, bearradh taispeána, scagaire físe agus socruithe scipeála frámaí.\"\n-#define CATEGORY_AUDIO_LABEL_GA \"Fuaim\"\n-#define CATEGORY_AUDIO_INFO_0_GA \"Athraigh socruithe gléis fuaime.\"\n-#define CATEGORY_INPUT_LABEL_GA \"Ionchur\"\n-#define CATEGORY_INPUT_INFO_0_GA \"Athraigh socruithe ionchuir an ghunna solais agus/nó an luiche.\"\n-#define CATEGORY_HACKS_LABEL_GA \"Cleasanna Aithrise\"\n-#define CATEGORY_HACKS_INFO_0_GA \"Athraigh socruithe róchlogála agus cruinneas aithrise próiseálaí a mbíonn tionchar acu ar fheidhmíocht agus comhoiriúnacht íseal-leibhéil.\"\n-#define CATEGORY_CHANNEL_VOLUME_LABEL_GA \"Socruithe Ardleibhéil Imleabhair Cainéal\"\n-#define CATEGORY_CHANNEL_VOLUME_INFO_0_GA \"Athraigh toirt na gcainéal fuaime crua-earraí aonair.\"\n-#define GENESIS_PLUS_GX_SYSTEM_HW_LABEL_GA \"Crua-earraí an Chórais\"\n-#define GENESIS_PLUS_GX_SYSTEM_HW_INFO_0_GA \"Rith ábhar luchtaithe le consól aithriste ar leith. Roghnóidh 'Auto' an córas is oiriúnaí don chluiche reatha.\"\n-#define OPTION_VAL_AUTO_GA \"Uathoibríoch\"\n-#define OPTION_VAL_SG_1000_GA NULL\n-#define OPTION_VAL_SG_1000_II_GA NULL\n-#define OPTION_VAL_SG_1000_II_RAM_EXT_GA NULL\n-#define OPTION_VAL_MARK_III_GA NULL\n-#define OPTION_VAL_MASTER_SYSTEM_GA NULL\n-#define OPTION_VAL_MASTER_SYSTEM_II_GA NULL\n-#define OPTION_VAL_GAME_GEAR_GA NULL\n-#define OPTION_VAL_MEGA_DRIVE_GENESIS_GA NULL\n-#define GENESIS_PLUS_GX_REGION_DETECT_LABEL_GA \"Réigiún an Chórais\"\n-#define GENESIS_PLUS_GX_REGION_DETECT_INFO_0_GA \"Sonraigh cén réigiún as a bhfuil an córas. I gcás consóil seachas an Game Gear, is é 50 Hz an 'PAL', agus is é 60 Hz an 'NTSC'. Féadfaidh cluichí rith níos tapúla nó níos moille ná mar is gnách má roghnaítear an réigiún mícheart.\"\n-#define OPTION_VAL_NTSC_U_GA NULL\n-#define OPTION_VAL_PAL_GA NULL\n-#define OPTION_VAL_NTSC_J_GA NULL\n-#define GENESIS_PLUS_GX_VDP_MODE_LABEL_GA \"Mód VDP Fórsála\"\n-#define GENESIS_PLUS_GX_VDP_MODE_INFO_0_GA \"Sáraíonn sé an modh VDP chun é a chur ag rith ag NTSC 60Hz nó PAL 50Hz, beag beann ar réigiún an chórais.\"\n-#define OPTION_VAL_60HZ_GA NULL\n-#define OPTION_VAL_50HZ_GA NULL\n-#define GENESIS_PLUS_GX_BIOS_LABEL_GA \"ROM Tosaithe Córais\"\n-#define GENESIS_PLUS_GX_BIOS_INFO_0_GA \"Bain úsáid as an BIOS/tosaitheoir oifigiúil le haghaidh crua-earraí aithriste, má tá sé i láthair in eolaire córais RetroArch. Taispeánann sé seicheamh/beochan tosaithe atá sainiúil don chonsól, agus ansin ritheann sé ábhar luchtaithe.\"\n-#define GENESIS_PLUS_GX_SYSTEM_BRAM_LABEL_GA \"Córas CD BRAM (Atosú Éilitheach)\"\n-#define GENESIS_PLUS_GX_SYSTEM_BRAM_INFO_0_GA \"Agus ábhar Sega CD/Mega-CD á rith, sonraítear an ndéanfar comhad sábhála aonair a roinnt idir na cluichí go léir ó réigiún ar leith (In aghaidh an BIOS) nó comhad sábhála ar leith a chruthú do gach cluiche (In aghaidh an Chluiche). Tabhair faoi deara go bhfuil stóráil inmheánach theoranta ag an Sega CD/Mega-CD, nach leor ach do roinnt teidil. Chun nach rithfidh tú as spás, moltar an socrú 'In aghaidh an Chluiche'.\"\n-#define OPTION_VAL_PER_BIOS_GA \"In aghaidh an BIOS\"\n-#define OPTION_VAL_PER_GAME_GA \"In aghaidh an Chluiche\"\n-#define GENESIS_PLUS_GX_CART_BRAM_LABEL_GA \"Cairt Cúltaca CD BRAM (Atosú Éilitheach)\"\n-#define GENESIS_PLUS_GX_CART_BRAM_INFO_0_GA \"Agus ábhar Sega CD/Mega-CD á rith, sonraítear ann an ndéanfar cairt RAM cúltaca aonair a roinnt do gach cluiche (In aghaidh an Chairt) nó cairt RAM cúltaca ar leith a chruthú do gach cluiche (In aghaidh an Chluiche).\"\n-#define OPTION_VAL_PER_CART_GA \"In aghaidh an cartúis\"\n-#define GENESIS_PLUS_GX_CART_SIZE_LABEL_GA \"Méid BRAM Cairt Cúltaca CD (Atosú Éilitheach)\"\n-#define GENESIS_PLUS_GX_CART_SIZE_INFO_0_GA \"Socraíonn sé seo méid an chairt reithe cúltaca agus ábhar Sega CD/Mega-CD á rith. Úsáideach nuair a shocraítear an chairt reithe cúltaca go In aghaidh an Chluiche chun méideanna cairte níos mó iolracha a sheachaint.\"\n-#define OPTION_VAL_128K_GA NULL\n-#define OPTION_VAL_256K_GA NULL\n-#define OPTION_VAL_512K_GA NULL\n-#define OPTION_VAL_1MEG_GA NULL\n-#define OPTION_VAL_2MEG_GA NULL\n-#define OPTION_VAL_4MEG_GA NULL\n-#define GENESIS_PLUS_GX_ADD_ON_LABEL_GA \"Breiseán CD (mód MD) (Éilíonn Atosú)\"\n-#define GENESIS_PLUS_GX_ADD_ON_INFO_0_GA \"Sonraigh cén breiseán atá le húsáid le haghaidh athsheinm fuaime CD le cluichí Mega Drive/Genesis a dtacaítear leo.\"\n-#define OPTION_VAL_SEGA_MEGA_CD_GA NULL\n-#define OPTION_VAL_MEGASD_GA NULL\n-#define OPTION_VAL_NONE_GA \"Dada\"\n-#define GENESIS_PLUS_GX_LOCK_ON_LABEL_GA \"Glasáil Cartús-Ar\"\n-#define GENESIS_PLUS_GX_LOCK_ON_INFO_0_GA \"Is gné Mega Drive/Genesis í an Teicneolaíocht Glasála a chuir ar chumas cluiche níos sine ceangal le port pas-trí cartús speisialta le haghaidh súgartha sínte nó athraithe. Sonraíonn an rogha seo cén cineál cartús speisialta 'glasála' atá le haithris. Ní mór comhad bios comhfhreagrach a bheith i láthair in eolaire córais RetroArch.\"\n-#define OPTION_VAL_GAME_GENIE_GA NULL\n-#define OPTION_VAL_ACTION_REPLAY_PRO_GA NULL\n-#define OPTION_VAL_SONIC_KNUCKLES_GA NULL\n-#define GENESIS_PLUS_GX_ASPECT_RATIO_LABEL_GA \"Cóimheas Gnéithe arna Sholáthrú ag an gCroí\"\n-#define GENESIS_PLUS_GX_ASPECT_RATIO_INFO_0_GA \"Roghnaigh an cóimheas gné ábhair is fearr leat. Ní bheidh feidhm ag seo ach amháin nuair a bheidh cóimheas gné RetroArch socraithe go 'Croílár curtha ar fáil' sna socruithe Físeáin.\"\n-#define OPTION_VAL_NTSC_PAR_GA NULL\n-#define OPTION_VAL_PAL_PAR_GA NULL\n-#define OPTION_VAL_4_3_GA NULL\n-#define OPTION_VAL_UNCORRECTED_GA \"Gan cheartú\"\n-#define GENESIS_PLUS_GX_OVERSCAN_LABEL_GA \"Teorainneacha\"\n-#define GENESIS_PLUS_GX_OVERSCAN_INFO_0_GA \"Cumasaigh é seo chun na réigiúin ró-scan a thaispeáint ag barr/bun agus/nó ar chlé/ar dheis an scáileáin. De ghnáth, bheadh ​​siad seo i bhfolach ag an mbezel timpeall imeall teilifíse caighdeánach sainmhínithe.\"\n-#define OPTION_VAL_TOP_BOTTOM_GA \"Barr/Bun\"\n-#define OPTION_VAL_LEFT_RIGHT_GA \"Clé/Deas\"\n-#define OPTION_VAL_FULL_GA \"Lán\"\n-#define GENESIS_PLUS_GX_LEFT_BORDER_LABEL_GA \"Folaigh Teorainneacha Taobh an Mháistirchórais\"\n-#define GENESIS_PLUS_GX_LEFT_BORDER_INFO_0_GA \"Gearrann sé 8 bpicteil ó thaobh clé an scáileáin, nó ón dá thaobh clé agus deas agus cluichí Master System á reáchtáil.\"\n-#define OPTION_VAL_LEFT_BORDER_GA \"Imeall Clé Amháin\"\n-#define OPTION_VAL_LEFT_RIGHT_BORDERS_GA \"Teorainneacha Clé & Deis\"\n-#define GENESIS_PLUS_GX_GG_EXTRA_LABEL_GA \"Scáileán Leathnaithe Game Gear\"\n-#define GENESIS_PLUS_GX_GG_EXTRA_INFO_0_GA \"Éiríonn sé seo le teidil Game Gear a rith i mód SMS, le taifeach méadaithe de 256x192. Féadfaidh sé ábhar breise a thaispeáint, ach de ghnáth taispeánann sé teorainn de shonraí íomhá truaillithe/nach dteastaíonn.\"\n-#define GENESIS_PLUS_GX_BLARGG_NTSC_FILTER_LABEL_GA \"Scagaire NTSC Blargg\"\n-#define GENESIS_PLUS_GX_BLARGG_NTSC_FILTER_INFO_0_GA \"Cuir scagaire físe i bhfeidhm chun comharthaí teilifíse NTSC éagsúla a aithris.\"\n-#define OPTION_VAL_MONOCHROME_GA \"Monacrómach\"\n-#define OPTION_VAL_COMPOSITE_GA \"Ilchodach\"\n-#define OPTION_VAL_SVIDEO_GA \"S-Físeán\"\n-#define OPTION_VAL_RGB_GA NULL\n-#define GENESIS_PLUS_GX_LCD_FILTER_LABEL_GA \"Scagaire Taibhse LCD\"\n-#define GENESIS_PLUS_GX_LCD_FILTER_INFO_0_GA \"Cuir scagaire 'taibhsithe' íomhá i bhfeidhm chun tréithe taispeána phainéil LCD Game Gear agus Genesis Nomad a aithris.\"\n-#define GENESIS_PLUS_GX_RENDER_LABEL_GA \"Aschur Mód Idirfhite 2\"\n-#define GENESIS_PLUS_GX_RENDER_INFO_0_GA \"Ligeann Mód Idirfhite 2 don Mega Drive/Genesis íomhá 320x448 airde dhúbailte (ardtaifigh) a aschur trí línte scanadh malartacha a tharraingt i ngach fráma (úsáideann modhanna il-imreora Sonic the Hedgehog 2 agus Combat Cars é seo). Déanann 'Double Field' aithris ar chrua-earraí bunaidh, ag táirgeadh íomhá ghéar le déantáin splancacha/idirfhite. Cuireann 'Single Field' scagaire dí-idirfhite i bhfeidhm, rud a chobhsaíonn an íomhá ach a chruthaíonn doiléiriú beag.\"\n-#define OPTION_VAL_SINGLE_FIELD_GA \"Réimse Aonair\"\n-#define OPTION_VAL_DOUBLE_FIELD_GA \"Réimse Dúbailte\"\n-#define GENESIS_PLUS_GX_FRAMESKIP_LABEL_GA \"Fráma-léim\"\n-#define GENESIS_PLUS_GX_FRAMESKIP_INFO_0_GA \"Léim frámaí chun fo-rith maoláin fuaime (crágáil) a sheachaint. Feabhsaíonn sé feidhmíocht ar chostas réidhe amhairc. Léimeann 'Uath' frámaí nuair a thugann an tosaitheoir comhairle. Úsáideann 'Lámhleabhar' an socrú 'Tairseach Léim Frámaí (%)'.\"\n-#define OPTION_VAL_MANUAL_GA \"Lámhleabhar\"\n-#define GENESIS_PLUS_GX_FRAMESKIP_THRESHOLD_LABEL_GA \"Tairseach Léim Fráma (%)\"\n-#define GENESIS_PLUS_GX_FRAMESKIP_THRESHOLD_INFO_0_GA \"Nuair a shocraítear 'Frameskip' go 'Lámhleabhar', sonraítear an tairseach áitíochta maoláin fuaime (céatadán) faoina mbeidh frámaí á scipeáil. Laghdaíonn luachanna níos airde an baol go mbeidh frámaí ag scoilteadh trína chur faoi deara go gcaillfear frámaí níos minice.\"\n-#define GENESIS_PLUS_GX_YM2413_LABEL_GA NULL\n-#define GENESIS_PLUS_GX_YM2413_INFO_0_GA \"Cumasaigh aithris ar an Aonad Fuaime FM a úsáideann cluichí áirithe Sega Mark III/Master System le haghaidh aschur fuaime feabhsaithe.\"\n-#define GENESIS_PLUS_GX_YM2413_CORE_LABEL_GA \"Croílár an Mháistirchórais FM (YM2413)\"\n-#define GENESIS_PLUS_GX_YM2413_CORE_INFO_0_GA \"Roghnaigh an modh a úsáidtear chun Aonad Fuaime FM an Chórais Sega Mark III/Master a aithris. Tá an rogha 'MAME' gasta, agus ritheann sé ar lánluas ar fhormhór na gcóras. Tá an rogha 'Nuked' cruinn ó thaobh timthrialla de, ardchaighdeáin, agus tá riachtanais shuntasacha LAP aige.\"\n-#define OPTION_VAL_MAME_GA NULL\n-#define OPTION_VAL_NUKED_GA NULL\n-#define GENESIS_PLUS_GX_YM2612_LABEL_GA NULL\n-#define GENESIS_PLUS_GX_YM2612_INFO_0_GA \"Roghnaigh an modh a úsáidtear chun sintéiseoir FM (príomhghineadóir fuaime) an Mega Drive/Genesis a aithris. Tá roghanna 'MAME' gasta, agus ritheann siad ar lánluas ar fhormhór na gcóras. Tá roghanna 'Nuked' cruinn ó thaobh timthrialla de, ardchaighdeáin, agus tá riachtanais shuntasacha LAP acu. Úsáideann an Model 1 Mega Drive/Genesis bunaidh an tslis YM2612. Úsáidtear an YM3438 in athbhreithnithe níos déanaí ar Mega Drive/Genesis.\"\n-#define GENESIS_PLUS_GX_YM2612_INFO_1_GA \"Roghnaigh an modh a úsáidtear chun sintéiseoir FM (príomhghineadóir fuaime) an Mega Drive/Genesis a aithris. Úsáideann an Mega Drive/Genesis bunaidh an tslis YM2612. Úsáidtear an YM3438 in athbhreithnithe níos déanaí ar an Mega Drive/Genesis.\"\n-#define OPTION_VAL_MAME_YM2612_GA NULL\n-#define OPTION_VAL_MAME_ASIC_YM3438_GA NULL\n-#define OPTION_VAL_MAME_ENHANCED_YM3438_GA \"MAME (YM3438 Feabhsaithe)\"\n-#define OPTION_VAL_NUKED_YM2612_GA NULL\n-#define OPTION_VAL_NUKED_YM3438_GA NULL\n-#define GENESIS_PLUS_GX_SOUND_OUTPUT_LABEL_GA \"Aschur Fuaime\"\n-#define GENESIS_PLUS_GX_SOUND_OUTPUT_INFO_0_GA \"Roghnaigh athsheinm fuaime steiréó nó mona.\"\n-#define OPTION_VAL_STEREO_GA \"Steiréó\"\n-#define OPTION_VAL_MONO_GA NULL\n-#define GENESIS_PLUS_GX_AUDIO_FILTER_LABEL_GA \"Scagaire Fuaime\"\n-#define GENESIS_PLUS_GX_AUDIO_FILTER_INFO_0_GA \"Cumasaigh scagaire fuaime ísealpas chun fuaim shainiúil Model 1 Mega Drive/Genesis a insamhladh níos fearr.\"\n-#define OPTION_VAL_LOW_PASS_GA \"Íseal-Phas\"\n-#define OPTION_VAL_EQ_GA NULL\n-#define GENESIS_PLUS_GX_LOWPASS_RANGE_LABEL_GA \"Scagaire Íseal-Phas %\"\n-#define GENESIS_PLUS_GX_LOWPASS_RANGE_INFO_0_GA \"Sonraigh minicíocht scoite an scagaire íseal-phas fuaime. Méadaíonn luach níos airde 'neart' braite an scagaire, ós rud é go laghdaítear raon níos leithne den speictream ardmhinicíochta.\"\n-#define GENESIS_PLUS_GX_PSG_PREAMP_LABEL_GA \"Leibhéal Réamh-Amp PSG\"\n-#define GENESIS_PLUS_GX_PSG_PREAMP_INFO_0_GA \"Socraigh leibhéal an réamh-aimplitheora fuaime don Ghineadóir Fuaime In-ríomhchláraithe 4-chainéil SN76496 aithriste atá le fáil sa SG-1000, Sega Mark III, Master System, Game Gear agus Mega Drive/Genesis.\"\n-#define GENESIS_PLUS_GX_FM_PREAMP_LABEL_GA \"Leibhéal Réamh-Aimplitheoir FM\"\n-#define GENESIS_PLUS_GX_FM_PREAMP_INFO_0_GA \"Socraigh leibhéal an réamh-aimplitheora fuaime don sintéiseoir fuaime aithrisithe Mega Drive/Genesis FM nó don Aonad Fuaime FM Sega Mark III/Master System.\"\n-#define GENESIS_PLUS_GX_CDDA_VOLUME_LABEL_GA \"Imleabhar CD-DA\"\n-#define GENESIS_PLUS_GX_CDDA_VOLUME_INFO_0_GA \"Coigeartaigh toirt mheasctha aschur athsheinm fuaime an CD aithrisithe.\"\n-#define GENESIS_PLUS_GX_PCM_VOLUME_LABEL_GA \"Imleabhar PCM\"\n-#define GENESIS_PLUS_GX_PCM_VOLUME_INFO_0_GA \"Coigeartaigh toirt mheasctha aschur gineadóir fuaime Sega CD/Mega-CD RF5C164 PCM aithrisithe.\"\n-#define GENESIS_PLUS_GX_AUDIO_EQ_LOW_LABEL_GA \"Cothromóir Íseal\"\n-#define GENESIS_PLUS_GX_AUDIO_EQ_LOW_INFO_0_GA \"Coigeartaigh an banda íseal-raoin den chothromóir fuaime inmheánaigh.\"\n-#define GENESIS_PLUS_GX_AUDIO_EQ_MID_LABEL_GA \"EQ Lár\"\n-#define GENESIS_PLUS_GX_AUDIO_EQ_MID_INFO_0_GA \"Coigeartaigh banda lár-raoin an chothromóra fuaime inmheánaigh.\"\n-#define GENESIS_PLUS_GX_AUDIO_EQ_HIGH_LABEL_GA \"Ard-EQ\"\n-#define GENESIS_PLUS_GX_AUDIO_EQ_HIGH_INFO_0_GA \"Coigeartaigh an banda ard-raoin den chothromóir fuaime inmheánaigh.\"\n-#define GENESIS_PLUS_GX_GUN_INPUT_LABEL_GA \"Ionchur Gunna Solais\"\n-#define GENESIS_PLUS_GX_GUN_INPUT_INFO_0_GA \"Bain úsáid as ionchur 'Gunna Solais' nó 'Scáileán Tadhaill' atá rialaithe ag an luch.\"\n-#define OPTION_VAL_LIGHTGUN_GA \"Gunna Solais\"\n-#define OPTION_VAL_TOUCHSCREEN_GA \"Scáileán tadhaill\"\n-#define GENESIS_PLUS_GX_GUN_CURSOR_LABEL_GA \"Taispeáin Crosghruaig Gunna Solais\"\n-#define GENESIS_PLUS_GX_GUN_CURSOR_INFO_0_GA \"Taispeáin crosrianta gunna solais agus na cineálacha gléasanna ionchuir MD Menacer, MD Justifiers agus MS Light Phaser in úsáid.\"\n-#define GENESIS_PLUS_GX_INVERT_MOUSE_LABEL_GA \"Inbhéartaigh Ais-Y na Luiche\"\n-#define GENESIS_PLUS_GX_INVERT_MOUSE_INFO_0_GA \"Déanann sé ais-Y an chineáil gléis ionchuir Luch MD a aisiompú.\"\n-#define GENESIS_PLUS_GX_NO_SPRITE_LIMIT_LABEL_GA \"Bain Teorainn Sprite In Aghaidh na Líne\"\n-#define GENESIS_PLUS_GX_NO_SPRITE_LIMIT_INFO_0_GA \"Baintear an teorainn crua-earraí bunaidh sprite-in-aghaidh-scannánlíne. Laghdaíonn sé seo an caochadh ach is féidir leis fabhtanna amhairc a chur faoi deara, toisc go mbaintear leas as an teorainn crua-earraí i roinnt cluichí chun éifeachtaí speisialta a ghiniúint.\"\n-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LABEL_GA \"Scrollaigh ingearach feabhsaithe in aghaidh an tíle\"\n-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_INFO_0_GA \"Ceadaíonn sé seo gach cill aonair a scrollú go hingearach, in ionad 16px 2-chill, trí mheán a bhaint amach le luach vscroll na cille comharsanachta. Ní bhaineann an cleas seo ach le cúpla cluiche a úsáideann mód scrollú ingearach 2-chill.\"\n-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_LABEL_GA \"Teorainn scrollaithe ingearach feabhsaithe in aghaidh an tíle\"\n-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_INFO_0_GA \"Nuair a bhíonn scrolla ingearach feabhsaithe in aghaidh an tíle cumasaithe amháin. Coigeartaíonn sé teorainn an fheabhsaithe scrolla ingearach. Nuair a bhíonn an difríocht vscroll idir tíleanna comharsanacha níos mó ná an teorainn seo, díchumasaítear an feabhsú.\"\n-#define GENESIS_PLUS_GX_OVERCLOCK_LABEL_GA \"Luas LAP\"\n-#define GENESIS_PLUS_GX_OVERCLOCK_INFO_0_GA \"Róchlogáil an LAP aithrisithe. Is féidir leis an moilliú a laghdú, ach d'fhéadfadh sé go mbeadh teipeanna mar thoradh air.\"\n-#define OPTION_VAL_100_GA NULL\n-#define OPTION_VAL_125_GA NULL\n-#define OPTION_VAL_150_GA NULL\n-#define OPTION_VAL_175_GA NULL\n-#define OPTION_VAL_200_GA NULL\n-#define OPTION_VAL_225_GA NULL\n-#define OPTION_VAL_250_GA NULL\n-#define OPTION_VAL_275_GA NULL\n-#define OPTION_VAL_300_GA NULL\n-#define OPTION_VAL_325_GA NULL\n-#define OPTION_VAL_350_GA NULL\n-#define OPTION_VAL_375_GA NULL\n-#define OPTION_VAL_400_GA NULL\n-#define OPTION_VAL_425_GA NULL\n-#define OPTION_VAL_450_GA NULL\n-#define OPTION_VAL_475_GA NULL\n-#define OPTION_VAL_500_GA NULL\n-#define GENESIS_PLUS_GX_FORCE_DTACK_LABEL_GA \"Glasálacha Córais\"\n-#define GENESIS_PLUS_GX_FORCE_DTACK_INFO_0_GA \"Déan aithris ar ghlasálacha córais a tharlaíonn ar chrua-earraí fíor agus rochtain neamhdhleathach seoltaí á déanamh. Níor cheart é seo a dhíchumasú ach amháin agus taispeántais agus grúdaireacht bhaile áirithe á n-imirt a bhraitheann ar iompar neamhdhleathach le haghaidh oibriú ceart.\"\n-#define GENESIS_PLUS_GX_ADDR_ERROR_LABEL_GA \"Earráid Seoladh 68K\"\n-#define GENESIS_PLUS_GX_ADDR_ERROR_INFO_0_GA \"Gineann príomh-LAP Mega Drive/Genesis (Motorola 68000) eisceacht Earráid Seolta (tuairteáil) agus iarracht á déanamh rochtain neamhailínithe ar chuimhne. Má chumasaítear é seo, déanfar an t-iompar seo a insamhladh. Níor cheart é a dhíchumasú ach amháin agus hacks ROM á n-imirt, ós rud é go bhforbraítear iad seo de ghnáth ag baint úsáide as aithriseoirí nach bhfuil chomh cruinn agus go bhféadfadh siad brath ar rochtain RAM neamhbhailí le haghaidh oibriú ceart.\"\n-#define GENESIS_PLUS_GX_CD_LATENCY_LABEL_GA \"Am Rochtana CD\"\n-#define GENESIS_PLUS_GX_CD_LATENCY_INFO_0_GA \"Insamhladh a dhéanamh ar mhoill chrua-earraí bunaidh CD agus léamh á thosú nó nuair a bhíonn suíomh ar leith á lorg ar dhiosca luchtaithe. Tá sé seo riachtanach i gcás roinnt cluichí CD a thuairteálann má bhíonn sonraí CD ar fáil ró-luath agus réitíonn sé fadhbanna díshioncrónaithe fuaime CD i roinnt cluichí freisin. Is féidir é seo a dhíchumasú a bheith úsáideach le cluichí MSU-MD mar go ndéanann sé lúba rianta fuaime CD níos gan uaim.\"\n-#define GENESIS_PLUS_GX_CD_PRECACHE_LABEL_GA \"Taisce Íomhá CD\"\n-#define GENESIS_PLUS_GX_CD_PRECACHE_INFO_0_GA \"Luchtaigh íomhá CD isteach sa chuimhne ag am tosaithe. Tacaítear le CHD amháin. Atosú Riachtanach.\"\n-#define GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_LABEL_GA \"Taispeáin Socruithe Ardleibhéil Imleabhair Fuaime (Athoscail an roghchlár)\"\n-#define GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_INFO_0_GA \"Cumasaigh cumraíocht paraiméadair chainéil fuaime íseal-leibhéil. TABHAIR FAOI DEARA: Ní mór an Roghchlár Tapa a athrú chun go dtiocfaidh an socrú seo i bhfeidhm.\"\n-#define GENESIS_PLUS_GX_PSG_CHANNEL_0_VOLUME_LABEL_GA \"Cainéal Ton PSG 0 Imleabhar %\"\n-#define GENESIS_PLUS_GX_PSG_CHANNEL_0_VOLUME_INFO_0_GA \"Laghdaigh toirt Chainéal Tóin PSG 0.\"\n-#define GENESIS_PLUS_GX_PSG_CHANNEL_1_VOLUME_LABEL_GA \"% Imleabhar Cainéal 1 Ton PSG\"\n-#define GENESIS_PLUS_GX_PSG_CHANNEL_1_VOLUME_INFO_0_GA \"Laghdaigh toirt Chainéal 1 Tóin PSG.\"\n-#define GENESIS_PLUS_GX_PSG_CHANNEL_2_VOLUME_LABEL_GA \"% Imleabhar Cainéal 2 Ton PSG\"\n-#define GENESIS_PLUS_GX_PSG_CHANNEL_2_VOLUME_INFO_0_GA \"Laghdaigh toirt Chainéal 2 Tone PSG.\"\n-#define GENESIS_PLUS_GX_PSG_CHANNEL_3_VOLUME_LABEL_GA \"Torann PSG Cainéal 3 Imleabhar %\"\n-#define GENESIS_PLUS_GX_PSG_CHANNEL_3_VOLUME_INFO_0_GA \"Laghdaigh toirt Chainéal Torainn PSG 3.\"\n-#define GENESIS_PLUS_GX_MD_CHANNEL_0_VOLUME_LABEL_GA \"Cainéal Mega Drive/Genesis FM 0 % Imleabhar\"\n-#define GENESIS_PLUS_GX_MD_CHANNEL_0_VOLUME_INFO_0_GA \"Laghdaigh toirt Cainéal 0 Mega Drive/Genesis FM. Ní oibríonn sé ach le hinslitheoirí MAME FM.\"\n-#define GENESIS_PLUS_GX_MD_CHANNEL_1_VOLUME_LABEL_GA \"Cainéal 1 Mega Drive/Genesis FM % Toirt\"\n-#define GENESIS_PLUS_GX_MD_CHANNEL_1_VOLUME_INFO_0_GA \"Laghdaigh toirt Cainéal 1 Mega Drive/Genesis FM. Ní oibríonn sé ach le hinslitheoirí MAME FM.\"\n-#define GENESIS_PLUS_GX_MD_CHANNEL_2_VOLUME_LABEL_GA \"Cainéal 2 Mega Drive/Genesis FM % Toirt\"\n-#define GENESIS_PLUS_GX_MD_CHANNEL_2_VOLUME_INFO_0_GA \"Laghdaigh toirt Cainéal 2 Mega Drive/Genesis FM. Ní oibríonn sé ach le hinslitheoirí MAME FM.\"\n-#define GENESIS_PLUS_GX_MD_CHANNEL_3_VOLUME_LABEL_GA \"Cainéal 3 Mega Drive/Genesis FM % Toirt\"\n-#define GENESIS_PLUS_GX_MD_CHANNEL_3_VOLUME_INFO_0_GA \"Laghdaigh toirt Cainéal 3 Mega Drive/Genesis FM. Ní oibríonn sé ach le hinslitheoirí MAME FM.\"\n-#define GENESIS_PLUS_GX_MD_CHANNEL_4_VOLUME_LABEL_GA \"Mega Drive/Genesis FM Cainéal 4 % Toirt\"\n-#define GENESIS_PLUS_GX_MD_CHANNEL_4_VOLUME_INFO_0_GA \"Laghdaigh toirt Cainéal 4 Mega Drive/Genesis FM. Ní oibríonn sé ach le hinslitheoirí MAME FM.\"\n-#define GENESIS_PLUS_GX_MD_CHANNEL_5_VOLUME_LABEL_GA \"Cainéal 5 Mega Drive/Genesis FM % Toirt\"\n-#define GENESIS_PLUS_GX_MD_CHANNEL_5_VOLUME_INFO_0_GA \"Laghdaigh toirt Cainéal 5 Mega Drive/Genesis FM. Ní oibríonn sé ach le hinslitheoirí MAME FM.\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_0_VOLUME_LABEL_GA \"Córas Máistir FM (YM2413) Cainéal 0 Imleabhar %\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_0_VOLUME_INFO_0_GA \"Laghdaigh toirt Chainéal FM 0 an Mháistirchórais.\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_1_VOLUME_LABEL_GA \"Córas Máistir FM (YM2413) Cainéal 1 Imleabhar %\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_1_VOLUME_INFO_0_GA \"Laghdaigh toirt Chainéal 1 FM an Mháistirchórais.\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_2_VOLUME_LABEL_GA \"Córas Máistir FM (YM2413) Cainéal 2 Imleabhar %\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_2_VOLUME_INFO_0_GA \"Laghdaigh toirt Chainéal 2 FM an Mháistirchórais.\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_3_VOLUME_LABEL_GA \"Córas Máistir FM (YM2413) Cainéal 3 Imleabhar %\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_3_VOLUME_INFO_0_GA \"Laghdaigh toirt Chainéal 3 FM an Mháistirchórais.\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_4_VOLUME_LABEL_GA \"Córas Máistir FM (YM2413) Cainéal 4 Imleabhar %\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_4_VOLUME_INFO_0_GA \"Laghdaigh toirt Cainéal 4 FM an Mháistirchórais.\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_5_VOLUME_LABEL_GA \"Córas Máistir FM (YM2413) Cainéal 5 Imleabhar %\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_5_VOLUME_INFO_0_GA \"Laghdaigh toirt Chainéal 5 FM an Mháistirchórais.\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_6_VOLUME_LABEL_GA \"Córas Máistir FM (YM2413) Cainéal 6 Imleabhar %\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_6_VOLUME_INFO_0_GA \"Laghdaigh toirt Chainéal 6 FM an Mháistirchórais.\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_7_VOLUME_LABEL_GA \"Córas Máistir FM (YM2413) Cainéal 7 Imleabhar %\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_7_VOLUME_INFO_0_GA \"Laghdaigh toirt Chainéal 7 FM an Mháistirchórais.\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_8_VOLUME_LABEL_GA \"Córas Máistir FM (YM2413) Cainéal 8 Imleabhar %\"\n-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_8_VOLUME_INFO_0_GA \"Laghdaigh toirt Chainéal 8 FM an Mháistirchórais.\"\n-\n-struct retro_core_option_v2_category option_cats_ga[] = {\n-   {\n-      \"system\",\n-      CATEGORY_SYSTEM_LABEL_GA,\n-      CATEGORY_SYSTEM_INFO_0_GA\n-   },\n-   {\n-      \"video\",\n-      CATEGORY_VIDEO_LABEL_GA,\n-      CATEGORY_VIDEO_INFO_0_GA\n-   },\n-   {\n-      \"audio\",\n-      CATEGORY_AUDIO_LABEL_GA,\n-      CATEGORY_AUDIO_INFO_0_GA\n-   },\n-   {\n-      \"input\",\n-      CATEGORY_INPUT_LABEL_GA,\n-      CATEGORY_INPUT_INFO_0_GA\n-   },\n-   {\n-      \"hacks\",\n-      CATEGORY_HACKS_LABEL_GA,\n-      CATEGORY_HACKS_INFO_0_GA\n-   },\n-   {\n-      \"channel_volume\",\n-      CATEGORY_CHANNEL_VOLUME_LABEL_GA,\n-      CATEGORY_CHANNEL_VOLUME_INFO_0_GA\n-   },\n-   { NULL, NULL, NULL },\n-};\n-struct retro_core_option_v2_definition option_defs_ga[] = {\n-   {\n-      \"genesis_plus_gx_system_hw\",\n-      GENESIS_PLUS_GX_SYSTEM_HW_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_SYSTEM_HW_INFO_0_GA,\n-      NULL,\n-      \"system\",\n-      {\n-         { \"auto\",                 OPTION_VAL_AUTO_GA                 },\n-         { \"sg-1000\",              OPTION_VAL_SG_1000_GA              },\n-         { \"sg-1000 II\",           OPTION_VAL_SG_1000_II_GA           },\n-         { \"sg-1000 II + ram ext.\",OPTION_VAL_SG_1000_II_RAM_EXT_GA},\n-         { \"mark-III\",             OPTION_VAL_MARK_III_GA             },\n-         { \"master system\",        OPTION_VAL_MASTER_SYSTEM_GA        },\n-         { \"master system II\",     OPTION_VAL_MASTER_SYSTEM_II_GA     },\n-         { \"game gear\",            OPTION_VAL_GAME_GEAR_GA            },\n-         { \"mega drive / genesis\", OPTION_VAL_MEGA_DRIVE_GENESIS_GA   },\n-         { NULL, NULL },\n-      },\n-      \"auto\"\n-   },\n-   {\n-      \"genesis_plus_gx_region_detect\",\n-      GENESIS_PLUS_GX_REGION_DETECT_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_REGION_DETECT_INFO_0_GA,\n-      NULL,\n-      \"system\",\n-      {\n-         { \"auto\",    OPTION_VAL_AUTO_GA   },\n-         { \"ntsc-u\",  OPTION_VAL_NTSC_U_GA },\n-         { \"pal\",     OPTION_VAL_PAL_GA    },\n-         { \"ntsc-j\",  OPTION_VAL_NTSC_J_GA },\n-         { NULL, NULL },\n-      },\n-      \"auto\"\n-   },\n-   {\n-      \"genesis_plus_gx_vdp_mode\",\n-      GENESIS_PLUS_GX_VDP_MODE_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_VDP_MODE_INFO_0_GA,\n-      NULL,\n-      \"system\",\n-      {\n-         { \"auto\",  \"Disabled\" },\n-         { \"60hz\",  OPTION_VAL_60HZ_GA },\n-         { \"50hz\",  OPTION_VAL_50HZ_GA },\n-         { NULL, NULL },\n-      },\n-      \"auto\"\n-   },\n-   {\n-      \"genesis_plus_gx_bios\",\n-      GENESIS_PLUS_GX_BIOS_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_BIOS_INFO_0_GA,\n-      NULL,\n-      \"system\",\n-      {\n-         { \"disabled\", NULL },\n-         { \"enabled\",  NULL },\n-         { NULL, NULL },\n-      },\n-      \"disabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_system_bram\",\n-      GENESIS_PLUS_GX_SYSTEM_BRAM_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_SYSTEM_BRAM_INFO_0_GA,\n-      NULL,\n-      \"system\",\n-      {\n-         { \"per bios\", OPTION_VAL_PER_BIOS_GA },\n-         { \"per game\", OPTION_VAL_PER_GAME_GA },\n-         { NULL, NULL },\n-      },\n-      \"per bios\"\n-   },\n-   {\n-      \"genesis_plus_gx_cart_bram\",\n-      GENESIS_PLUS_GX_CART_BRAM_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_CART_BRAM_INFO_0_GA,\n-      NULL,\n-      \"system\",\n-      {\n-         { \"per cart\", OPTION_VAL_PER_CART_GA },\n-         { \"per game\", OPTION_VAL_PER_GAME_GA },\n-         { NULL, NULL },\n-      },\n-      \"per cart\"\n-   },\n-   {\n-      \"genesis_plus_gx_cart_size\",\n-      GENESIS_PLUS_GX_CART_SIZE_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_CART_SIZE_INFO_0_GA,\n-      NULL,\n-      \"system\",\n-      {\n-         { \"disabled\", \"Disabled\" },\n-         { \"128k\",     OPTION_VAL_128K_GA  },\n-         { \"256k\",     OPTION_VAL_256K_GA  },\n-         { \"512k\",     OPTION_VAL_512K_GA  },\n-         { \"1meg\",     OPTION_VAL_1MEG_GA    },\n-         { \"2meg\",     OPTION_VAL_2MEG_GA    },\n-         { \"4meg\",     OPTION_VAL_4MEG_GA    },\n-         { NULL, NULL },\n-      },\n-      \"4meg\"\n-   },\n-   {\n-      \"genesis_plus_gx_add_on\",\n-      GENESIS_PLUS_GX_ADD_ON_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_ADD_ON_INFO_0_GA,\n-      NULL,\n-      \"system\",\n-      {\n-         { \"auto\",         OPTION_VAL_AUTO_GA },\n-         { \"sega/mega cd\", OPTION_VAL_SEGA_MEGA_CD_GA },\n-         { \"megasd\",       OPTION_VAL_MEGASD_GA },\n-         { \"none\",         OPTION_VAL_NONE_GA },\n-         { NULL, NULL },\n-      },\n-      \"auto\"\n-   },\n-   {\n-      \"genesis_plus_gx_lock_on\",\n-      GENESIS_PLUS_GX_LOCK_ON_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_LOCK_ON_INFO_0_GA,\n-      NULL,\n-      \"system\",\n-      {\n-         { \"disabled\",            NULL },\n-         { \"game genie\",          OPTION_VAL_GAME_GENIE_GA },\n-         { \"action replay (pro)\", OPTION_VAL_ACTION_REPLAY_PRO_GA },\n-         { \"sonic & knuckles\",    OPTION_VAL_SONIC_KNUCKLES_GA },\n-         { NULL, NULL },\n-      },\n-      \"disabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_aspect_ratio\",\n-      GENESIS_PLUS_GX_ASPECT_RATIO_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_ASPECT_RATIO_INFO_0_GA,\n-      NULL,\n-      \"video\",\n-      {\n-         { \"auto\",     OPTION_VAL_AUTO_GA },\n-         { \"NTSC PAR\", OPTION_VAL_NTSC_PAR_GA },\n-         { \"PAL PAR\",  OPTION_VAL_PAL_PAR_GA },\n-         { \"4:3\",  OPTION_VAL_4_3_GA },\n-         { \"Uncorrected\",  OPTION_VAL_UNCORRECTED_GA },\n-      },\n-      \"auto\"\n-   },\n-   {\n-      \"genesis_plus_gx_overscan\",\n-      GENESIS_PLUS_GX_OVERSCAN_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_OVERSCAN_INFO_0_GA,\n-      NULL,\n-      \"video\",\n-      {\n-         { \"disabled\",   NULL },\n-         { \"top/bottom\", OPTION_VAL_TOP_BOTTOM_GA },\n-         { \"left/right\", OPTION_VAL_LEFT_RIGHT_GA },\n-         { \"full\",       OPTION_VAL_FULL_GA },\n-         { NULL, NULL },\n-      },\n-      \"disabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_left_border\",\n-      GENESIS_PLUS_GX_LEFT_BORDER_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_LEFT_BORDER_INFO_0_GA,\n-      NULL,\n-      \"video\",\n-      {\n-         { \"disabled\", NULL },\n-         { \"left border\", OPTION_VAL_LEFT_BORDER_GA },\n-         { \"left & right borders\", OPTION_VAL_LEFT_RIGHT_BORDERS_GA },\n-         { NULL, NULL },\n-      },\n-      \"disabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_gg_extra\",\n-      GENESIS_PLUS_GX_GG_EXTRA_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_GG_EXTRA_INFO_0_GA,\n-      NULL,\n-      \"video\",\n-      {\n-         { \"disabled\", NULL },\n-         { \"enabled\",  NULL },\n-         { NULL, NULL },\n-      },\n-      \"disabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_blargg_ntsc_filter\",\n-      GENESIS_PLUS_GX_BLARGG_NTSC_FILTER_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_BLARGG_NTSC_FILTER_INFO_0_GA,\n-      NULL,\n-      \"video\",\n-      {\n-         { \"disabled\",   NULL },\n-         { \"monochrome\", OPTION_VAL_MONOCHROME_GA },\n-         { \"composite\",  OPTION_VAL_COMPOSITE_GA },\n-         { \"svideo\",     OPTION_VAL_SVIDEO_GA },\n-         { \"rgb\",        OPTION_VAL_RGB_GA },\n-         { NULL, NULL },\n-      },\n-      \"disabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_lcd_filter\",\n-      GENESIS_PLUS_GX_LCD_FILTER_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_LCD_FILTER_INFO_0_GA,\n-      NULL,\n-      \"video\",\n-      {\n-         { \"disabled\", NULL },\n-         { \"enabled\",  NULL },\n-         { NULL, NULL },\n-      },\n-      \"disabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_render\",\n-      GENESIS_PLUS_GX_RENDER_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_RENDER_INFO_0_GA,\n-      NULL,\n-      \"video\",\n-      {\n-         { \"single field\", OPTION_VAL_SINGLE_FIELD_GA },\n-         { \"double field\", OPTION_VAL_DOUBLE_FIELD_GA },\n-         { NULL, NULL },\n-      },\n-      \"single field\"\n-   },\n-   {\n-      \"genesis_plus_gx_frameskip\",\n-      GENESIS_PLUS_GX_FRAMESKIP_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_FRAMESKIP_INFO_0_GA,\n-      NULL,\n-      \"video\",\n-      {\n-         { \"disabled\", NULL },\n-         { \"auto\",     OPTION_VAL_AUTO_GA },\n-         { \"manual\",   OPTION_VAL_MANUAL_GA },\n-         { NULL, NULL },\n-      },\n-      \"disabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_frameskip_threshold\",\n-      GENESIS_PLUS_GX_FRAMESKIP_THRESHOLD_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_FRAMESKIP_THRESHOLD_INFO_0_GA,\n-      NULL,\n-      \"video\",\n-      {\n-         { \"15\", NULL },\n-         { \"18\", NULL },\n-         { \"21\", NULL },\n-         { \"24\", NULL },\n-         { \"27\", NULL },\n-         { \"30\", NULL },\n-         { \"33\", NULL },\n-         { \"36\", NULL },\n-         { \"39\", NULL },\n-         { \"42\", NULL },\n-         { \"45\", NULL },\n-         { \"48\", NULL },\n-         { \"51\", NULL },\n-         { \"54\", NULL },\n-         { \"57\", NULL },\n-         { \"60\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"33\"\n-   },\n-   {\n-      \"genesis_plus_gx_ym2413\",\n-      GENESIS_PLUS_GX_YM2413_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_YM2413_INFO_0_GA,\n-      NULL,\n-      \"audio\",\n-      {\n-         { \"auto\",     OPTION_VAL_AUTO_GA },\n-         { \"disabled\", NULL },\n-         { \"enabled\",  NULL },\n-         { NULL, NULL },\n-      },\n-      \"auto\"\n-   },\n-#ifdef HAVE_OPLL_CORE\n-   {\n-      \"genesis_plus_gx_ym2413_core\",\n-      GENESIS_PLUS_GX_YM2413_CORE_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_YM2413_CORE_INFO_0_GA,\n-      NULL,\n-      \"audio\",\n-      {\n-         { \"mame\",  OPTION_VAL_MAME_GA },\n-         { \"nuked\", OPTION_VAL_NUKED_GA },\n-         { NULL, NULL },\n-      },\n-      \"mame\"\n-   },\n-#endif\n-   {\n-      \"genesis_plus_gx_ym2612\",\n-      GENESIS_PLUS_GX_YM2612_LABEL_GA,\n-      NULL,\n-#ifdef HAVE_YM3438_CORE\n-      GENESIS_PLUS_GX_YM2612_INFO_0_GA,\n-#else\n-      GENESIS_PLUS_GX_YM2612_INFO_1_GA,\n-#endif\n-      NULL,\n-      \"audio\",\n-      {\n-         { \"mame (ym2612)\",          OPTION_VAL_MAME_YM2612_GA },\n-         { \"mame (asic ym3438)\",     OPTION_VAL_MAME_ASIC_YM3438_GA },\n-         { \"mame (enhanced ym3438)\", OPTION_VAL_MAME_ENHANCED_YM3438_GA },\n-#ifdef HAVE_YM3438_CORE\n-         { \"nuked (ym2612)\",         OPTION_VAL_NUKED_YM2612_GA },\n-         { \"nuked (ym3438)\",         OPTION_VAL_NUKED_YM3438_GA },\n-#endif\n-         { NULL, NULL },\n-      },\n-      \"mame (ym2612)\"\n-   },\n-   {\n-      \"genesis_plus_gx_sound_output\",\n-      GENESIS_PLUS_GX_SOUND_OUTPUT_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_SOUND_OUTPUT_INFO_0_GA,\n-      NULL,\n-      \"audio\",\n-      {\n-         { \"stereo\", OPTION_VAL_STEREO_GA },\n-         { \"mono\",   OPTION_VAL_MONO_GA },\n-         { NULL, NULL },\n-      },\n-      \"stereo\"\n-   },\n-   {\n-      \"genesis_plus_gx_audio_filter\",\n-      GENESIS_PLUS_GX_AUDIO_FILTER_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_AUDIO_FILTER_INFO_0_GA,\n-      NULL,\n-      \"audio\",\n-      {\n-         { \"disabled\", NULL },\n-         { \"low-pass\", OPTION_VAL_LOW_PASS_GA },\n-#ifdef HAVE_EQ\n-         { \"EQ\",       OPTION_VAL_EQ_GA },\n-#endif\n-         { NULL, NULL },\n-      },\n-      \"disabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_lowpass_range\",\n-      GENESIS_PLUS_GX_LOWPASS_RANGE_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_LOWPASS_RANGE_INFO_0_GA,\n-      NULL,\n-      \"audio\",\n-      {\n-         { \"5\",  NULL },\n-         { \"10\", NULL },\n-         { \"15\", NULL },\n-         { \"20\", NULL },\n-         { \"25\", NULL },\n-         { \"30\", NULL },\n-         { \"35\", NULL },\n-         { \"40\", NULL },\n-         { \"45\", NULL },\n-         { \"50\", NULL },\n-         { \"55\", NULL },\n-         { \"60\", NULL },\n-         { \"65\", NULL },\n-         { \"70\", NULL },\n-         { \"75\", NULL },\n-         { \"80\", NULL },\n-         { \"85\", NULL },\n-         { \"90\", NULL },\n-         { \"95\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"60\"\n-   },\n-   {\n-      \"genesis_plus_gx_psg_preamp\",\n-      GENESIS_PLUS_GX_PSG_PREAMP_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_PSG_PREAMP_INFO_0_GA,\n-      NULL,\n-      \"audio\",\n-      {\n-         { \"0\",   NULL },\n-         { \"5\",   NULL },\n-         { \"10\",  NULL },\n-         { \"15\",  NULL },\n-         { \"20\",  NULL },\n-         { \"25\",  NULL },\n-         { \"30\",  NULL },\n-         { \"35\",  NULL },\n-         { \"40\",  NULL },\n-         { \"45\",  NULL },\n-         { \"50\",  NULL },\n-         { \"55\",  NULL },\n-         { \"60\",  NULL },\n-         { \"65\",  NULL },\n-         { \"70\",  NULL },\n-         { \"75\",  NULL },\n-         { \"80\",  NULL },\n-         { \"85\",  NULL },\n-         { \"90\",  NULL },\n-         { \"95\",  NULL },\n-         { \"100\", NULL },\n-         { \"105\", NULL },\n-         { \"110\", NULL },\n-         { \"115\", NULL },\n-         { \"120\", NULL },\n-         { \"125\", NULL },\n-         { \"130\", NULL },\n-         { \"135\", NULL },\n-         { \"140\", NULL },\n-         { \"145\", NULL },\n-         { \"150\", NULL },\n-         { \"155\", NULL },\n-         { \"160\", NULL },\n-         { \"165\", NULL },\n-         { \"170\", NULL },\n-         { \"175\", NULL },\n-         { \"180\", NULL },\n-         { \"185\", NULL },\n-         { \"190\", NULL },\n-         { \"195\", NULL },\n-         { \"200\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"150\"\n-   },\n-   {\n-      \"genesis_plus_gx_fm_preamp\",\n-      GENESIS_PLUS_GX_FM_PREAMP_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_FM_PREAMP_INFO_0_GA,\n-      NULL,\n-      \"audio\",\n-      {\n-         { \"0\",   NULL },\n-         { \"5\",   NULL },\n-         { \"10\",  NULL },\n-         { \"15\",  NULL },\n-         { \"20\",  NULL },\n-         { \"25\",  NULL },\n-         { \"30\",  NULL },\n-         { \"35\",  NULL },\n-         { \"40\",  NULL },\n-         { \"45\",  NULL },\n-         { \"50\",  NULL },\n-         { \"55\",  NULL },\n-         { \"60\",  NULL },\n-         { \"65\",  NULL },\n-         { \"70\",  NULL },\n-         { \"75\",  NULL },\n-         { \"80\",  NULL },\n-         { \"85\",  NULL },\n-         { \"90\",  NULL },\n-         { \"95\",  NULL },\n-         { \"100\", NULL },\n-         { \"105\", NULL },\n-         { \"110\", NULL },\n-         { \"115\", NULL },\n-         { \"120\", NULL },\n-         { \"125\", NULL },\n-         { \"130\", NULL },\n-         { \"135\", NULL },\n-         { \"140\", NULL },\n-         { \"145\", NULL },\n-         { \"150\", NULL },\n-         { \"155\", NULL },\n-         { \"160\", NULL },\n-         { \"165\", NULL },\n-         { \"170\", NULL },\n-         { \"175\", NULL },\n-         { \"180\", NULL },\n-         { \"185\", NULL },\n-         { \"190\", NULL },\n-         { \"195\", NULL },\n-         { \"200\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_cdda_volume\",\n-      GENESIS_PLUS_GX_CDDA_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_CDDA_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"audio\",\n-      {\n-         { \"0\",   NULL },\n-         { \"5\",   NULL },\n-         { \"10\",  NULL },\n-         { \"15\",  NULL },\n-         { \"20\",  NULL },\n-         { \"25\",  NULL },\n-         { \"30\",  NULL },\n-         { \"35\",  NULL },\n-         { \"40\",  NULL },\n-         { \"45\",  NULL },\n-         { \"50\",  NULL },\n-         { \"55\",  NULL },\n-         { \"60\",  NULL },\n-         { \"65\",  NULL },\n-         { \"70\",  NULL },\n-         { \"75\",  NULL },\n-         { \"80\",  NULL },\n-         { \"85\",  NULL },\n-         { \"90\",  NULL },\n-         { \"95\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_pcm_volume\",\n-      GENESIS_PLUS_GX_PCM_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_PCM_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"audio\",\n-      {\n-         { \"0\",   NULL },\n-         { \"5\",   NULL },\n-         { \"10\",  NULL },\n-         { \"15\",  NULL },\n-         { \"20\",  NULL },\n-         { \"25\",  NULL },\n-         { \"30\",  NULL },\n-         { \"35\",  NULL },\n-         { \"40\",  NULL },\n-         { \"45\",  NULL },\n-         { \"50\",  NULL },\n-         { \"55\",  NULL },\n-         { \"60\",  NULL },\n-         { \"65\",  NULL },\n-         { \"70\",  NULL },\n-         { \"75\",  NULL },\n-         { \"80\",  NULL },\n-         { \"85\",  NULL },\n-         { \"90\",  NULL },\n-         { \"95\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-#ifdef HAVE_EQ\n-   {\n-      \"genesis_plus_gx_audio_eq_low\",\n-      GENESIS_PLUS_GX_AUDIO_EQ_LOW_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_AUDIO_EQ_LOW_INFO_0_GA,\n-      NULL,\n-      \"audio\",\n-      {\n-         { \"0\",   NULL },\n-         { \"5\",   NULL },\n-         { \"10\",  NULL },\n-         { \"15\",  NULL },\n-         { \"20\",  NULL },\n-         { \"25\",  NULL },\n-         { \"30\",  NULL },\n-         { \"35\",  NULL },\n-         { \"40\",  NULL },\n-         { \"45\",  NULL },\n-         { \"50\",  NULL },\n-         { \"55\",  NULL },\n-         { \"60\",  NULL },\n-         { \"65\",  NULL },\n-         { \"70\",  NULL },\n-         { \"75\",  NULL },\n-         { \"80\",  NULL },\n-         { \"85\",  NULL },\n-         { \"90\",  NULL },\n-         { \"95\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_audio_eq_mid\",\n-      GENESIS_PLUS_GX_AUDIO_EQ_MID_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_AUDIO_EQ_MID_INFO_0_GA,\n-      NULL,\n-      \"audio\",\n-      {\n-         { \"0\",   NULL },\n-         { \"5\",   NULL },\n-         { \"10\",  NULL },\n-         { \"15\",  NULL },\n-         { \"20\",  NULL },\n-         { \"25\",  NULL },\n-         { \"30\",  NULL },\n-         { \"35\",  NULL },\n-         { \"40\",  NULL },\n-         { \"45\",  NULL },\n-         { \"50\",  NULL },\n-         { \"55\",  NULL },\n-         { \"60\",  NULL },\n-         { \"65\",  NULL },\n-         { \"70\",  NULL },\n-         { \"75\",  NULL },\n-         { \"80\",  NULL },\n-         { \"85\",  NULL },\n-         { \"90\",  NULL },\n-         { \"95\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_audio_eq_high\",\n-      GENESIS_PLUS_GX_AUDIO_EQ_HIGH_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_AUDIO_EQ_HIGH_INFO_0_GA,\n-      NULL,\n-      \"audio\",\n-      {\n-         { \"0\",   NULL },\n-         { \"5\",   NULL },\n-         { \"10\",  NULL },\n-         { \"15\",  NULL },\n-         { \"20\",  NULL },\n-         { \"25\",  NULL },\n-         { \"30\",  NULL },\n-         { \"35\",  NULL },\n-         { \"40\",  NULL },\n-         { \"45\",  NULL },\n-         { \"50\",  NULL },\n-         { \"55\",  NULL },\n-         { \"60\",  NULL },\n-         { \"65\",  NULL },\n-         { \"70\",  NULL },\n-         { \"75\",  NULL },\n-         { \"80\",  NULL },\n-         { \"85\",  NULL },\n-         { \"90\",  NULL },\n-         { \"95\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-#endif\n-   {\n-      \"genesis_plus_gx_gun_input\",\n-      GENESIS_PLUS_GX_GUN_INPUT_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_GUN_INPUT_INFO_0_GA,\n-      NULL,\n-      \"input\",\n-      {\n-         { \"lightgun\",    OPTION_VAL_LIGHTGUN_GA },\n-         { \"touchscreen\", OPTION_VAL_TOUCHSCREEN_GA },\n-         { NULL, NULL },\n-      },\n-      \"lightgun\"\n-   },\n-   {\n-      \"genesis_plus_gx_gun_cursor\",\n-      GENESIS_PLUS_GX_GUN_CURSOR_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_GUN_CURSOR_INFO_0_GA,\n-      NULL,\n-      \"input\",\n-      {\n-         { \"disabled\", NULL },\n-         { \"enabled\",  NULL },\n-         { NULL, NULL },\n-      },\n-      \"disabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_invert_mouse\",\n-      GENESIS_PLUS_GX_INVERT_MOUSE_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_INVERT_MOUSE_INFO_0_GA,\n-      NULL,\n-      \"input\",\n-      {\n-         { \"disabled\", NULL },\n-         { \"enabled\",  NULL },\n-         { NULL, NULL },\n-      },\n-      \"disabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_no_sprite_limit\",\n-      GENESIS_PLUS_GX_NO_SPRITE_LIMIT_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_NO_SPRITE_LIMIT_INFO_0_GA,\n-      NULL,\n-      \"hacks\",\n-      {\n-         { \"disabled\", NULL },\n-         { \"enabled\",  NULL },\n-         { NULL, NULL },\n-      },\n-      \"disabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_enhanced_vscroll\",\n-      GENESIS_PLUS_GX_ENHANCED_VSCROLL_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_ENHANCED_VSCROLL_INFO_0_GA,\n-      NULL,\n-      \"hacks\",\n-      {\n-         { \"disabled\", NULL },\n-         { \"enabled\",  NULL },\n-         { NULL, NULL },\n-      },\n-      \"disabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_enhanced_vscroll_limit\",\n-      GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_INFO_0_GA,\n-      NULL,\n-      \"hacks\",\n-      {\n-         { \"2\", NULL },\n-         { \"3\",  NULL },\n-         { \"4\", NULL },\n-         { \"5\",  NULL },\n-         { \"6\", NULL },\n-         { \"7\",  NULL },\n-         { \"8\", NULL },\n-         { \"9\",  NULL },\n-         { \"10\", NULL },\n-         { \"11\",  NULL },\n-         { \"12\", NULL },\n-         { \"13\",  NULL },\n-         { \"14\", NULL },\n-         { \"15\",  NULL },\n-         { \"16\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"8\"\n-   },\n-#ifdef HAVE_OVERCLOCK\n-   {\n-      \"genesis_plus_gx_overclock\",\n-      GENESIS_PLUS_GX_OVERCLOCK_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_OVERCLOCK_INFO_0_GA,\n-      NULL,\n-      \"hacks\",\n-      {\n-         { \"100\", OPTION_VAL_100_GA },\n-         { \"125\", OPTION_VAL_125_GA },\n-         { \"150\", OPTION_VAL_150_GA },\n-         { \"175\", OPTION_VAL_175_GA },\n-         { \"200\", OPTION_VAL_200_GA },\n-         { \"225\", OPTION_VAL_225_GA },\n-         { \"250\", OPTION_VAL_250_GA },\n-         { \"275\", OPTION_VAL_275_GA },\n-         { \"300\", OPTION_VAL_300_GA },\n-         { \"325\", OPTION_VAL_325_GA },\n-         { \"350\", OPTION_VAL_350_GA },\n-         { \"375\", OPTION_VAL_375_GA },\n-         { \"400\", OPTION_VAL_400_GA },\n-         { \"425\", OPTION_VAL_425_GA },\n-         { \"450\", OPTION_VAL_450_GA },\n-         { \"475\", OPTION_VAL_475_GA },\n-         { \"500\", OPTION_VAL_500_GA },\n-         { NULL, NULL },\n-      },\n-      \"100%\"\n-   },\n-#endif\n-   {\n-      \"genesis_plus_gx_force_dtack\",\n-      GENESIS_PLUS_GX_FORCE_DTACK_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_FORCE_DTACK_INFO_0_GA,\n-      NULL,\n-      \"hacks\",\n-      {\n-         { \"enabled\",  NULL },\n-         { \"disabled\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"enabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_addr_error\",\n-      GENESIS_PLUS_GX_ADDR_ERROR_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_ADDR_ERROR_INFO_0_GA,\n-      NULL,\n-      \"hacks\",\n-      {\n-         { \"enabled\",  NULL },\n-         { \"disabled\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"enabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_cd_latency\",\n-      GENESIS_PLUS_GX_CD_LATENCY_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_CD_LATENCY_INFO_0_GA,\n-      NULL,\n-      \"hacks\",\n-      {\n-         { \"enabled\",  NULL },\n-         { \"disabled\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"enabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_cd_precache\",\n-      GENESIS_PLUS_GX_CD_PRECACHE_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_CD_PRECACHE_INFO_0_GA,\n-      NULL,\n-      \"hacks\",\n-      {\n-         { \"disabled\", NULL },\n-         { \"enabled\",  NULL },\n-         { NULL, NULL },\n-      },\n-      \"disabled\"\n-   },\n-#ifdef USE_PER_SOUND_CHANNELS_CONFIG\n-   {\n-      \"genesis_plus_gx_show_advanced_audio_settings\",\n-      GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"enabled\",  NULL },\n-         { \"disabled\", NULL },\n-         { NULL, NULL},\n-      },\n-      \"disabled\"\n-   },\n-   {\n-      \"genesis_plus_gx_psg_channel_0_volume\",\n-      GENESIS_PLUS_GX_PSG_CHANNEL_0_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_PSG_CHANNEL_0_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_psg_channel_1_volume\",\n-      GENESIS_PLUS_GX_PSG_CHANNEL_1_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_PSG_CHANNEL_1_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_psg_channel_2_volume\",\n-      GENESIS_PLUS_GX_PSG_CHANNEL_2_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_PSG_CHANNEL_2_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_psg_channel_3_volume\",\n-      GENESIS_PLUS_GX_PSG_CHANNEL_3_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_PSG_CHANNEL_3_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_md_channel_0_volume\",\n-      GENESIS_PLUS_GX_MD_CHANNEL_0_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_MD_CHANNEL_0_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_md_channel_1_volume\",\n-      GENESIS_PLUS_GX_MD_CHANNEL_1_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_MD_CHANNEL_1_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_md_channel_2_volume\",\n-      GENESIS_PLUS_GX_MD_CHANNEL_2_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_MD_CHANNEL_2_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_md_channel_3_volume\",\n-      GENESIS_PLUS_GX_MD_CHANNEL_3_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_MD_CHANNEL_3_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_md_channel_4_volume\",\n-      GENESIS_PLUS_GX_MD_CHANNEL_4_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_MD_CHANNEL_4_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_md_channel_5_volume\",\n-      GENESIS_PLUS_GX_MD_CHANNEL_5_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_MD_CHANNEL_5_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_sms_fm_channel_0_volume\",\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_0_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_0_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_sms_fm_channel_1_volume\",\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_1_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_1_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_sms_fm_channel_2_volume\",\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_2_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_2_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_sms_fm_channel_3_volume\",\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_3_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_3_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_sms_fm_channel_4_volume\",\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_4_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_4_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_sms_fm_channel_5_volume\",\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_5_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_5_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_sms_fm_channel_6_volume\",\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_6_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_6_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_sms_fm_channel_7_volume\",\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_7_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_7_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-   {\n-      \"genesis_plus_gx_sms_fm_channel_8_volume\",\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_8_VOLUME_LABEL_GA,\n-      NULL,\n-      GENESIS_PLUS_GX_SMS_FM_CHANNEL_8_VOLUME_INFO_0_GA,\n-      NULL,\n-      \"channel_volume\",\n-      {\n-         { \"0\",   NULL },\n-         { \"10\",  NULL },\n-         { \"20\",  NULL },\n-         { \"30\",  NULL },\n-         { \"40\",  NULL },\n-         { \"50\",  NULL },\n-         { \"60\",  NULL },\n-         { \"70\",  NULL },\n-         { \"80\",  NULL },\n-         { \"90\",  NULL },\n-         { \"100\", NULL },\n-         { NULL, NULL },\n-      },\n-      \"100\"\n-   },\n-#endif\n-   { NULL, NULL, NULL, NULL, NULL, NULL, {{0}}, NULL },\n-};\n-struct retro_core_options_v2 options_ga = {\n-   option_cats_ga,\n-   option_defs_ga\n-};\n-\n /* RETRO_LANGUAGE_GL */\n \n #define CATEGORY_SYSTEM_LABEL_GL \"Sistema\"\n@@ -56775,7 +55199,7 @@ struct retro_core_options_v2 options_sr = {\n /* RETRO_LANGUAGE_SV */\n \n #define CATEGORY_SYSTEM_LABEL_SV NULL\n-#define CATEGORY_SYSTEM_INFO_0_SV \"Ändra val av basmaskinvara, region, BIOS och inställningar för Sega CD/Mega-CD-sparfil.\"\n+#define CATEGORY_SYSTEM_INFO_0_SV NULL\n #define CATEGORY_VIDEO_LABEL_SV NULL\n #define CATEGORY_VIDEO_INFO_0_SV \"Ändra bildformat, beskärning, videofilter och inställningar för bildruteskippning.\"\n #define CATEGORY_AUDIO_LABEL_SV \"Ljud\"\n@@ -56812,19 +55236,19 @@ struct retro_core_options_v2 options_sr = {\n #define GENESIS_PLUS_GX_SYSTEM_BRAM_INFO_0_SV \"När du kör Sega CD/Mega-CD-innehåll anger du om en enda sparfil ska delas mellan alla spel från en viss region (Per-BIOS) eller om en separat sparfil ska skapas för varje spel (Per-Game). Observera att Sega CD/Mega-CD har ett begränsat internt lagringsutrymme, som endast räcker till en handfull titlar. För att undvika att utrymmet tar slut rekommenderas inställningen ”Per-Game”.\"\n #define OPTION_VAL_PER_BIOS_SV NULL\n #define OPTION_VAL_PER_GAME_SV \"Per-Spel\"\n-#define GENESIS_PLUS_GX_CART_BRAM_LABEL_SV \"CD Backup Cart BRAM (kräver omstart)\"\n+#define GENESIS_PLUS_GX_CART_BRAM_LABEL_SV NULL\n #define GENESIS_PLUS_GX_CART_BRAM_INFO_0_SV \"När du kör Sega CD/Mega-CD-innehåll anger du om en enda ramkassett för säkerhetskopiering ska delas för alla spel (Per-Cart) eller om en separat ramkassett för säkerhetskopiering ska skapas för varje spel (Per-Game).\"\n-#define OPTION_VAL_PER_CART_SV \"Per-kassett\"\n-#define GENESIS_PLUS_GX_CART_SIZE_LABEL_SV \"CD Backup Cart BRAM-storlek (kräver omstart)\"\n-#define GENESIS_PLUS_GX_CART_SIZE_INFO_0_SV \"Ställer in storleken på backup-ramkortet när du kör Sega CD/Mega-CD-innehåll. Användbart när du ställer in backup-ramkortet på Per spel för att undvika flera större kortstorlekar.\"\n+#define OPTION_VAL_PER_CART_SV NULL\n+#define GENESIS_PLUS_GX_CART_SIZE_LABEL_SV NULL\n+#define GENESIS_PLUS_GX_CART_SIZE_INFO_0_SV NULL\n #define OPTION_VAL_128K_SV NULL\n #define OPTION_VAL_256K_SV NULL\n #define OPTION_VAL_512K_SV NULL\n #define OPTION_VAL_1MEG_SV NULL\n #define OPTION_VAL_2MEG_SV NULL\n #define OPTION_VAL_4MEG_SV NULL\n-#define GENESIS_PLUS_GX_ADD_ON_LABEL_SV \"CD-tillägg (MD-läge) (kräver omstart)\"\n-#define GENESIS_PLUS_GX_ADD_ON_INFO_0_SV \"Ange vilket tillägg som ska användas för uppspelning av CD-ljud med Mega Drive/Genesis-spel som stöds.\"\n+#define GENESIS_PLUS_GX_ADD_ON_LABEL_SV NULL\n+#define GENESIS_PLUS_GX_ADD_ON_INFO_0_SV NULL\n #define OPTION_VAL_SEGA_MEGA_CD_SV NULL\n #define OPTION_VAL_MEGASD_SV NULL\n #define OPTION_VAL_NONE_SV \"Ingen\"\n@@ -56840,15 +55264,15 @@ struct retro_core_options_v2 options_sr = {\n #define OPTION_VAL_4_3_SV NULL\n #define OPTION_VAL_UNCORRECTED_SV \"Okorrigerad\"\n #define GENESIS_PLUS_GX_OVERSCAN_LABEL_SV \"Ramar\"\n-#define GENESIS_PLUS_GX_OVERSCAN_INFO_0_SV \"Aktivera detta för att visa överskanningsområdena längst upp/ned och/eller till vänster/höger på skärmen. Dessa skulle normalt vara dolda av ramen runt kanten på en standard-Tv.\"\n+#define GENESIS_PLUS_GX_OVERSCAN_INFO_0_SV NULL\n #define OPTION_VAL_TOP_BOTTOM_SV \"Topp/Botten\"\n #define OPTION_VAL_LEFT_RIGHT_SV \"Vänster/Höger\"\n #define OPTION_VAL_FULL_SV NULL\n #define GENESIS_PLUS_GX_LEFT_BORDER_LABEL_SV \"Dölj sidokanter för Master System\"\n-#define GENESIS_PLUS_GX_LEFT_BORDER_INFO_0_SV \"Skär bort 8 bildpunkter från antingen vänster sida av skärmen eller från både vänster och höger sida när Master System-spel körs.\"\n+#define GENESIS_PLUS_GX_LEFT_BORDER_INFO_0_SV NULL\n #define OPTION_VAL_LEFT_BORDER_SV \"Endast vänster ram\"\n #define OPTION_VAL_LEFT_RIGHT_BORDERS_SV \"Vänstra och högra ramar\"\n-#define GENESIS_PLUS_GX_GG_EXTRA_LABEL_SV \"Utökad skärm för Game Gear\"\n+#define GENESIS_PLUS_GX_GG_EXTRA_LABEL_SV NULL\n #define GENESIS_PLUS_GX_GG_EXTRA_INFO_0_SV \"Tvingar Game Gear-titlar att köras i SMS-läge, med en ökad upplösning på 256x192. Kan visa ytterligare innehåll, men visar vanligtvis en kant av korrupt/olämplig bilddata.\"\n #define GENESIS_PLUS_GX_BLARGG_NTSC_FILTER_LABEL_SV \"Blargg NTSC-filter\"\n #define GENESIS_PLUS_GX_BLARGG_NTSC_FILTER_INFO_0_SV \"Använd ett videofilter för att efterlikna olika NTSC-TV-signaler.\"\n@@ -56868,8 +55292,8 @@ struct retro_core_options_v2 options_sr = {\n #define GENESIS_PLUS_GX_FRAMESKIP_THRESHOLD_LABEL_SV \"Frameskip Tröskelvärde (%)\"\n #define GENESIS_PLUS_GX_FRAMESKIP_THRESHOLD_INFO_0_SV \"När 'Frameskip' är satt till 'Manuell', ange ljudbuffertens tröskel (i procent) under vilka ramar som kommer att hoppas över. Högre värden minskar risken för hackigt ljud genom att bildrutor tappas oftare.\"\n #define GENESIS_PLUS_GX_YM2413_LABEL_SV NULL\n-#define GENESIS_PLUS_GX_YM2413_INFO_0_SV \"Aktivera emulering av FM-ljudkortet som används av vissa Sega Mark III/Master System-spel för förbättrad ljudutgång.\"\n-#define GENESIS_PLUS_GX_YM2413_CORE_LABEL_SV \"Kärna för Master System FM (YM2413)\"\n+#define GENESIS_PLUS_GX_YM2413_INFO_0_SV NULL\n+#define GENESIS_PLUS_GX_YM2413_CORE_LABEL_SV NULL\n #define GENESIS_PLUS_GX_YM2413_CORE_INFO_0_SV \"Välj metod som används för att emulera FM-ljudenheten i Sega Mark III/Master System. ”MAME\\\"-alternativet är snabbt och körs i full hastighet på de flesta system. Alternativet ”Nuked” är cykelnoggrannt, av mycket hög kvalitet och har betydande CPU-krav.\"\n #define OPTION_VAL_MAME_SV NULL\n #define OPTION_VAL_NUKED_SV NULL\n@@ -56889,22 +55313,22 @@ struct retro_core_options_v2 options_sr = {\n #define GENESIS_PLUS_GX_AUDIO_FILTER_INFO_0_SV \"Aktivera ett lågpassljudfilter för att bättre simulera det karakteristiska ljudet från en Model 1 Mega Drive/Genesis.\"\n #define OPTION_VAL_LOW_PASS_SV \"Lågpass\"\n #define OPTION_VAL_EQ_SV NULL\n-#define GENESIS_PLUS_GX_LOWPASS_RANGE_LABEL_SV \"Lågpassfilter %\"\n-#define GENESIS_PLUS_GX_LOWPASS_RANGE_INFO_0_SV \"Ange gränsfrekvensen för ljudets lågpassfilter. Ett högre värde ökar den upplevda ”styrkan” hos filtret, eftersom ett bredare spektrum av höga frekvenser dämpas.\"\n-#define GENESIS_PLUS_GX_PSG_PREAMP_LABEL_SV \"PSG-förförstärkarens nivå\"\n-#define GENESIS_PLUS_GX_PSG_PREAMP_INFO_0_SV \"Ställ in ljudförförstärkarnivån för den emulerade SN76496 4-kanals programmerbara ljudgeneratorn som finns i SG-1000, Sega Mark III, Master System, Game Gear och Mega Drive/Genesis.\"\n-#define GENESIS_PLUS_GX_FM_PREAMP_LABEL_SV \"FM-förförstärkarnivå\"\n-#define GENESIS_PLUS_GX_FM_PREAMP_INFO_0_SV \"Ställ in ljudförförstärkarens nivå för den emulerade Mega Drive/Genesis FM-ljudsyntetisatorn eller Sega Mark III/Master System FM-ljudkällan.\"\n+#define GENESIS_PLUS_GX_LOWPASS_RANGE_LABEL_SV NULL\n+#define GENESIS_PLUS_GX_LOWPASS_RANGE_INFO_0_SV NULL\n+#define GENESIS_PLUS_GX_PSG_PREAMP_LABEL_SV NULL\n+#define GENESIS_PLUS_GX_PSG_PREAMP_INFO_0_SV NULL\n+#define GENESIS_PLUS_GX_FM_PREAMP_LABEL_SV NULL\n+#define GENESIS_PLUS_GX_FM_PREAMP_INFO_0_SV NULL\n #define GENESIS_PLUS_GX_CDDA_VOLUME_LABEL_SV \"CD-DA-volym\"\n #define GENESIS_PLUS_GX_CDDA_VOLUME_INFO_0_SV \"Justera mixningsvolymen för den emulerade uppspelningen av CD-ljud.\"\n #define GENESIS_PLUS_GX_PCM_VOLUME_LABEL_SV \"PCM-volym\"\n-#define GENESIS_PLUS_GX_PCM_VOLUME_INFO_0_SV \"Justera mixningsvolymen för den emulerade Sega CD/Mega-CD RF5C164 PCM-ljudgeneratorns utgång.\"\n+#define GENESIS_PLUS_GX_PCM_VOLUME_INFO_0_SV NULL\n #define GENESIS_PLUS_GX_AUDIO_EQ_LOW_LABEL_SV \"EQ låg\"\n-#define GENESIS_PLUS_GX_AUDIO_EQ_LOW_INFO_0_SV \"Justera det låga frekvensområdet för den interna ljudequalizern.\"\n+#define GENESIS_PLUS_GX_AUDIO_EQ_LOW_INFO_0_SV NULL\n #define GENESIS_PLUS_GX_AUDIO_EQ_MID_LABEL_SV \"EQ mid\"\n-#define GENESIS_PLUS_GX_AUDIO_EQ_MID_INFO_0_SV \"Justera det mellersta frekvensområdet för den interna ljudequalizern.\"\n+#define GENESIS_PLUS_GX_AUDIO_EQ_MID_INFO_0_SV NULL\n #define GENESIS_PLUS_GX_AUDIO_EQ_HIGH_LABEL_SV \"EQ hög\"\n-#define GENESIS_PLUS_GX_AUDIO_EQ_HIGH_INFO_0_SV \"Justera det höga frekvensområdet för den interna ljudequalizern.\"\n+#define GENESIS_PLUS_GX_AUDIO_EQ_HIGH_INFO_0_SV NULL\n #define GENESIS_PLUS_GX_GUN_INPUT_LABEL_SV \"Inmatning för ljuspistol\"\n #define GENESIS_PLUS_GX_GUN_INPUT_INFO_0_SV \"Använd en musstyrd 'ljuspistol' eller 'pekskärm'.\"\n #define OPTION_VAL_LIGHTGUN_SV \"Ljuspistol\"\n@@ -56912,13 +55336,13 @@ struct retro_core_options_v2 options_sr = {\n #define GENESIS_PLUS_GX_GUN_CURSOR_LABEL_SV \"Visa hårkors för ljuspistol\"\n #define GENESIS_PLUS_GX_GUN_CURSOR_INFO_0_SV \"Visa hårkorset för ljuspistoler när du använder inmatningsenhetstyperna MD Menacer, MD Justifiers och MS Light Phaser.\"\n #define GENESIS_PLUS_GX_INVERT_MOUSE_LABEL_SV \"Invertera musens Y-axel\"\n-#define GENESIS_PLUS_GX_INVERT_MOUSE_INFO_0_SV \"Inverterar Y-axeln för inmatningsenhetstypen MD Mouse.\"\n+#define GENESIS_PLUS_GX_INVERT_MOUSE_INFO_0_SV NULL\n #define GENESIS_PLUS_GX_NO_SPRITE_LIMIT_LABEL_SV \"Ta bort blockfigursgräns per rad\"\n-#define GENESIS_PLUS_GX_NO_SPRITE_LIMIT_INFO_0_SV \"Tar bort den ursprungliga hårdvarubegränsningen för sprite per skanlinje. Detta minskar flimret men kan orsaka visuella störningar, eftersom vissa spel utnyttjar hårdvarubegränsningen för att skapa specialeffekter.\"\n-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LABEL_SV \"Förbättrad vertikal rullning per ruta\"\n-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_INFO_0_SV \"Gör det möjligt att bläddra vertikalt i varje enskild cell, istället för 16px 2-cell, genom att beräkna genomsnittet med vscroll-värdet för den angränsande cellen. Detta hack gäller endast för ett fåtal spel som använder 2-cell vertikalt bläddringsläge.\"\n-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_LABEL_SV \"Förbättrad vertikal rullningsgräns per ruta\"\n-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_INFO_0_SV \"Endast när Förbättrad vertikal rullning per ruta är aktiverat. Justerar gränsen för förbättrad vertikal rullning. När skillnaden i vertikal rullning mellan angränsande rutor är större än denna gräns inaktiveras förbättringen.\"\n+#define GENESIS_PLUS_GX_NO_SPRITE_LIMIT_INFO_0_SV NULL\n+#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LABEL_SV NULL\n+#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_INFO_0_SV NULL\n+#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_LABEL_SV NULL\n+#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_INFO_0_SV NULL\n #define GENESIS_PLUS_GX_OVERCLOCK_LABEL_SV \"CPU-hastighet\"\n #define GENESIS_PLUS_GX_OVERCLOCK_INFO_0_SV \"Överklocka den emulerade processorn. Kan minska långsamheter, men kan orsaka glitchar.\"\n #define OPTION_VAL_100_SV NULL\n@@ -56942,9 +55366,9 @@ struct retro_core_options_v2 options_sr = {\n #define GENESIS_PLUS_GX_FORCE_DTACK_INFO_0_SV \"Emulera systemlåsningar som inträffar på riktig hårdvara när man utför olaglig adressåtkomst. Detta bör endast inaktiveras när du spelar vissa demos och homebrew som förlitar sig på otillåtet beteende för korrekt funktion.\"\n #define GENESIS_PLUS_GX_ADDR_ERROR_LABEL_SV \"68K-adressfel\"\n #define GENESIS_PLUS_GX_ADDR_ERROR_INFO_0_SV \"Mega Drive/Genesis huvudprocessor (Motorola 68000) genererar ett Address Error-undantag (krasch) när den försöker utföra ojusterad minnesåtkomst. Om du aktiverar detta kommer du att simulera detta beteende. Det bör endast inaktiveras när du spelar ROM-hack, eftersom dessa vanligtvis utvecklas med mindre exakta emulatorer och kan förlita sig på ogiltig RAM-åtkomst för korrekt funktion.\"\n-#define GENESIS_PLUS_GX_CD_LATENCY_LABEL_SV \"CD-åtkomsttid\"\n+#define GENESIS_PLUS_GX_CD_LATENCY_LABEL_SV NULL\n #define GENESIS_PLUS_GX_CD_LATENCY_INFO_0_SV \"Simulera den ursprungliga CD-maskinvarans latens när du initierar en läsning eller sökning till en specifik plats på den inlästa skivan. Detta krävs av några CD-spel som kraschar om CD-data är tillgängliga för tidigt och åtgärdar även problem med desynkronisering av CD-ljud i vissa spel. Att inaktivera detta kan vara användbart med MSU-MD-spel eftersom det gör CD-ljudspårsloopar mer sömlösa.\"\n-#define GENESIS_PLUS_GX_CD_PRECACHE_LABEL_SV \"CD-avbildningscache\"\n+#define GENESIS_PLUS_GX_CD_PRECACHE_LABEL_SV NULL\n #define GENESIS_PLUS_GX_CD_PRECACHE_INFO_0_SV \"Läs in cd-avbildning till minnet vid uppstart. CHD stöds endast. Kräver omstart.\"\n #define GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_LABEL_SV \"Visa avancerade inställningar för ljudvolym (Öppnar menyn igen)\"\n #define GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_INFO_0_SV \"Aktiverar konfiguration av parametrar för lågnivå-ljudkanaler. OBS: Snabbmenyn måste vara aktiverad för att den här inställningen ska träda i kraft.\"\n"
  },
  {
    "path": "packages/sx05re/libretro/geolith/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present EmuELEC (https://github.com/emuelec)\n\nPKG_NAME=\"geolith\"\nPKG_VERSION=\"b683c2f712a6647c69326961a90cf1990e25ccea\"\nPKG_SHA256=\"8a18d404e2e3c6304cc2fc52aa1b816ba147b83963b3a576ad2ac1b13ee45c2b\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/geolith-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Highly accurate emulator for the Neo Geo AES and MVS Cartridge Systems\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\ncd libretro\n  make -f ./Makefile platform=rpi3_64\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp geolith_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/gme/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"gme\"\nPKG_VERSION=\"de22a26ae9ed8f0eb739bce8990fe175677edcf8\"\nPKG_SHA256=\"4974eff7d22f599e1f1780f31da96a713850c697d6b24b7c34e4c510ddcc2859\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/libretro-gme\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of blargg's Game_Music_Emu library.\"\nPKG_LONGDESC=\"Port of blargg's Game_Music_Emu library.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp gme_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n\n"
  },
  {
    "path": "packages/sx05re/libretro/gpsp/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"gpsp\"\nPKG_VERSION=\"74db5e5c73020626a1118b97d3735b5636d65d9d\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/gpsp\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"gpSP for libretro\"\nPKG_TOOLCHAIN=\"make\"\n\npre_make_target() {\n  PKG_MAKE_OPTS_TARGET=\"CC=${CC}\"\n  if [ \"${ARCH}\" = \"arm\" ]; then\n    PKG_MAKE_OPTS_TARGET+=\" platform=armv\"\n  elif [ \"${ARCH}\" = \"aarch64\" ]; then\n    PKG_MAKE_OPTS_TARGET+=\" platform=arm64\"\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n    cp -v gpsp_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/gw-libretro/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"gw-libretro\"\nPKG_VERSION=\"435e5cfd4bf6aea03a84259e9b8dba3daf3ff5bd\"\nPKG_SHA256=\"610f613aedb6182b00bd4231e53d4350977b97e28f6f551cec138ef810cbb761\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/gw-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"A libretro core for Game & Watch simulators \"\nPKG_LONGDESC=\"A libretro core for Game & Watch simulators \"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp gw_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/handy/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"handy\"\nPKG_VERSION=\"fca239207e9c111da3e85d2faf0b1b9d7524e498\"\nPKG_SHA256=\"0e73ed43f7a2768130e110ef6a84d7df8850976daa328405f5e89a2d6db4cb96\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Zlib\"\nPKG_SITE=\"https://github.com/libretro/libretro-handy\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"K. Wilkins' Atari Lynx emulator Handy for libretro\"\nPKG_LONGDESC=\"Handy is an Atari Lynx Emulator for Windows 95/98/NT/2000. Handy was the original name of the Lynx project that was started at Epyx and then finished by Atari.\"\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nif [ ${ARCH} = \"aarch64\" ]; then\n  PKG_MAKE_OPTS_TARGET=\" platform=emuelec\"\nelse\n  PKG_MAKE_OPTS_TARGET=\" platform=classic_armv8_a35\"\nfi\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp handy_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/handy/patches/aarch64/handy-01-add-emuelec.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -245,7 +245,7 @@\n \n # (armv8 a35, hard point, neon based) ###\n # Playstation Classic\n-else ifeq ($(platform), classic_armv8_a35)\n+else ifeq ($(platform), emuelec)\n \tTARGET := $(TARGET_NAME)_libretro.so\n \tfpic := -fPIC\n     SHARED := -shared -Wl,-version-script=$(LIBRETRO_DIR)/link.T -Wl,-no-undefined\n@@ -256,9 +256,9 @@\n \t-falign-functions=1 -falign-jumps=1 -falign-loops=1 \\\n \t-fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \\\n \t-fmerge-all-constants -fno-math-errno \\\n-\t-marm -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard\n+\t-mtune=cortex-a72 #-mfpu=neon-fp-armv8 -mfloat-abi=hard\n \tHAVE_NEON = 1\n-\tARCH = arm\n+\tARCH = aarch64\n \tifeq ($(shell echo `$(CC) -dumpversion` \"< 4.9\" | bc -l), 1)\n \tCFLAGS += -march=armv8-a\n \telse\n"
  },
  {
    "path": "packages/sx05re/libretro/hatari/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"hatari\"\nPKG_VERSION=\"7008194d3f951a157997f67a820578f56f7feee0\"\nPKG_SHA256=\"05f9da703fb5030aa5424e53a35d9b310d183b3b48aa777504e796c88fdd3da2\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/hatari\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"New rebasing of Hatari based on Mercurial upstream. Tries to be a shallow fork for easy upstreaming later on.\"\nPKG_LONGDESC=\"New rebasing of Hatari based on Mercurial upstream. Tries to be a shallow fork for easy upstreaming later on.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\nPKG_USE_CMAKE=\"no\"\n\nconfigure_target() {\n  :\n}\n\nmake_target() {\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    CFLAGS=\"${CFLAGS} -DNO_ASM -DARM -D__arm__ -DARM_ASM -DNOSSE -DARM_HARDFP\"\n  fi\n  make -C .. -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ../hatari_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/imame4all/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"imame4all\"\nPKG_VERSION=\"2ec60f6e1078cf9ba173e80432cc28fd4eea200f\"\nPKG_SHA256=\"e9e39e0153970729a2b81898af140749118db56be2920600bcff29fe13c59658\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MAME\"\nPKG_SITE=\"https://github.com/libretro/imame4all-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"A port of iMAME4all to libretro\"\nPKG_LONGDESC=\"A port of iMAME4all to libretro\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -f makefile.libretro ARM=1\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp libretro.so ${INSTALL}/usr/lib/libretro/imame4all_libretro.so\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/jaxe/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# EmuELEC / LibreELEC package for JAXE libretro core\n\nPKG_NAME=\"jaxe\"\nPKG_VERSION=\"e8e90e3d683bb560df5882f0ad62ed28f96a541a\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/kurtjd/jaxe\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_GIT_CLONE_BRANCH=\"main\"\n\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec/libretro\"\nPKG_SHORTDESC=\"JAXE CHIP-8/S-CHIP/XO-CHIP libretro core\"\nPKG_LONGDESC=\"JAXE is a CHIP-8 / S-CHIP / XO-CHIP emulator with a libretro frontend.\"\n\nPKG_TOOLCHAIN=\"make\"\n\npost_unpack() {\n  cd \"${PKG_BUILD}\"\n  git submodule update --init --recursive\n}\n\nmake_target() {\n  cd \"${PKG_BUILD}\"\n\n  make -f Makefile.libretro \\\n    CC=\"${CC}\" \\\n    CXX=\"${CXX}\" \\\n    AR=\"${AR}\" \\\n    RANLIB=\"${RANLIB}\" \\\n    platform=unix\n}\n\nmakeinstall_target() {\n  mkdir -p \"${INSTALL}/usr/lib/libretro\"\n  cp \"${PKG_BUILD}/jaxe_libretro.so\" \"${INSTALL}/usr/lib/libretro/\"\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/jollycv/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present\nPKG_NAME=\"jollycv\"\nPKG_VERSION=\"5b01c1e43f9040bfae25cc9f9dfb14d73951ec3c\"\nPKG_SHA256=\"\"\nPKG_LICENSE=\"BSD-3-Clause\"\nPKG_SITE=\"https://github.com/libretro/jollycv\"\nPKG_URL=\"https://github.com/libretro/jollycv/archive/${PKG_VERSION}.tar.gz\"\nPKG_ARCH=\"any\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec/libretro\"\nPKG_SHORTDESC=\"JollyCV libretro core (ColecoVision/CreatiVision/My Vision)\"\nPKG_LONGDESC=\"Libretro core port of JollyCV (ColecoVision/CreatiVision/My Vision).\"\nPKG_TOOLCHAIN=\"make\"\nPKG_MAKE_OPTS_TARGET=\"-C libretro platform=unix\"\n\nmakeinstall_target() {\n  mkdir -p \"${INSTALL}/usr/lib/libretro\"\n  cp \"${PKG_BUILD}/libretro/jollycv_libretro.so\" \"${INSTALL}/usr/lib/libretro/\"\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/libretro-bash-launcher/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"libretro-bash-launcher\"\nPKG_VERSION=\"78b40429be72950e467ec73b7bc90b8c45dd0fce\"\nPKG_SHA256=\"dd87405a7ac24d559f5daa8bab18be86a3e3276a345510929dfe8ec8ec092162\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/SwedishGojira/libretro-bash-launcher\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Use bash scripts to run apps/games from RetroArch/libretro\"\nPKG_LONGDESC=\"Use bash scripts to run apps/games from RetroArch/libretro\"\nPKG_TOOLCHAIN=\"make\"\n\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n    cp `find . -name \"*.so\" | xargs echo` ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/lowresnx/package.mk",
    "content": "# SPDX-License-Identifier: Zlib\n# LowRes NX (libretro core) for EmuELEC\n# Source: https://github.com/timoinutilis/lowres-nx\n\nPKG_NAME=\"lowresnx\"\nPKG_VERSION=\"12aeb16\"\nPKG_SHA256=\"c59b1e64e845658aa3baa262e2231a4b28bc98b3be29e9e1f030c31d358e351e\"\nPKG_LICENSE=\"Zlib\"\nPKG_SITE=\"https://github.com/timoinutilis/lowres-nx\"\nPKG_URL=\"https://github.com/timoinutilis/lowres-nx/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec/libretro\"\nPKG_SHORTDESC=\"LowRes NX (libretro core)\"\nPKG_LONGDESC=\"LowRes NX fantasy console (BASIC) - libretro core.\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_MAKE_OPTS_TARGET=\"platform=unix\"\n\nmake_target() {\n  make -C platform/LibRetro ${PKG_MAKE_OPTS_TARGET}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp -v platform/LibRetro/lowresnx_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/lr-dolphin/package.mk",
    "content": "PKG_NAME=\"lr-dolphin\"\nPKG_VERSION=\"bfac84ab609696a96a24261fd3bb5f12e90c2409\"\nPKG_ARCH=\"x86_64 aarch64\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/dolphin\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements.\"\nPKG_TOOLCHAIN=\"cmake\"\n\nif [ \"${OPENGL_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGL}\"\nfi\n\nif [ \"${OPENGLES_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\nfi\n\nif [ \"${VULKAN_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${VULKAN}\"\nfi\n\nPKG_CMAKE_OPTS_TARGET=\"-DENABLE_X11=OFF \\\n                       -DLIBRETRO=ON \\\n                       -DENABLE_NOGUI=OFF \\\n                       -DENABLE_QT=OFF \\\n                       -DENABLE_TESTS=OFF \\\n                       -DUSE_DISCORD_PRESENCE=OFF \\\n                       -DBUILD_SHARED_LIBS=OFF \\\n                       -DCMAKE_BUILD_TYPE=Release\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n    cp -v ${PKG_BUILD}/.${TARGET_NAME}/dolphin_libretro.so ${INSTALL}/usr/lib/libretro/\n  mkdir -p ${INSTALL}/usr/share/retroarch-system/dolphin-emu\n    cp -vr ${PKG_BUILD}/Data/Sys ${INSTALL}/usr/share/retroarch-system/dolphin-emu/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/lr-dolphin/patches/001-openglmessage.patch",
    "content": "diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp\nindex 5206c47..1aa4048 100644\n--- a/Source/Core/VideoBackends/OGL/Render.cpp\n+++ b/Source/Core/VideoBackends/OGL/Render.cpp\n@@ -738,14 +738,14 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_\n                                    g_ogl_config.gl_renderer, g_ogl_config.gl_version),\n                   5000);\n \n-  if (!g_ogl_config.bSupportsGLBufferStorage && !g_ogl_config.bSupportsGLPinnedMemory)\n-  {\n-    OSD::AddMessage(StringFromFormat(\"Your OpenGL driver does not support %s_buffer_storage.\",\n-                                     m_main_gl_context->IsGLES() ? \"EXT\" : \"ARB\"),\n-                    60000);\n-    OSD::AddMessage(\"This device's performance will be terrible.\", 60000);\n-    OSD::AddMessage(\"Please ask your device vendor for an updated OpenGL driver.\", 60000);\n-  }\n+  //if (!g_ogl_config.bSupportsGLBufferStorage && !g_ogl_config.bSupportsGLPinnedMemory)\n+  //{\n+  //  OSD::AddMessage(StringFromFormat(\"Your OpenGL driver does not support %s_buffer_storage.\",\n+  //                                   m_main_gl_context->IsGLES() ? \"EXT\" : \"ARB\"),\n+  //                  60000);\n+  //  OSD::AddMessage(\"This device's performance will be terrible.\", 60000);\n+  //  OSD::AddMessage(\"Please ask your device vendor for an updated OpenGL driver.\", 60000);\n+  //}\n \n   WARN_LOG(VIDEO, \"Missing OGL Extensions: %s%s%s%s%s%s%s%s%s%s%s%s%s%s\",\n            g_ActiveConfig.backend_info.bSupportsDualSourceBlend ? \"\" : \"DualSourceBlend \",\n"
  },
  {
    "path": "packages/sx05re/libretro/lr-dolphin/patches/dolphin-01-buildfix-libusb.patch",
    "content": "diff --git a/Externals/hidapi/libusb/hid.c b/Externals/hidapi/libusb/hid.c\nindex a23bf46125..c82718636f 100644\n--- a/Externals/hidapi/libusb/hid.c\n+++ b/Externals/hidapi/libusb/hid.c\n@@ -44,7 +44,7 @@\n #include <wchar.h>\n \n /* GNU / LibUSB */\n-#include <libusb.h>\n+#include <libusb-1.0/libusb.h>\n #ifndef __ANDROID__\n #include <iconv.h>\n #endif\n"
  },
  {
    "path": "packages/sx05re/libretro/lutro/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"lutro\"\nPKG_VERSION=\"b84d0605e847e07657a44a1a11374a03a6e8a489\"\nPKG_SHA256=\"aa58df3d85873a3ca79841ad565dde65de64484664b01ee3352d8ee356b48f86\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/libretro/libretro-lutro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"An experimental lua game framework for libretro inspired by LÖVE\"\nPKG_LONGDESC=\"An experimental lua game framework for libretro inspired by LÖVE\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\npre_make_target() {\n  # Fix luajit cross-compilation issue\n  # This replaces the need for the broken patch file\n  sed -i '/deps\\/luajit\\/src\\/libluajit.a:/,/^$/s|^\\t\\$(MAKE) -C deps/luajit/src BUILDMODE=static|\\t$(MAKE) -C deps/luajit/src HOST_CC=\"$(HOST_CC) $(PTR_SIZE)\" CROSS=\"$(CROSS)\" BUILDMODE=static|' Makefile\n}\n\nmake_target() {\n  PTR_SIZE=\"-m32\"\n  if [ \"${ARCH}\" == \"x86_64\" ]; then\n    PTR_SIZE=\"-m64\"\n  fi  \n  make HOST_CC=\"${HOST_CC}\" PTR_SIZE=\"${PTR_SIZE}\" CROSS=\"${TARGET_PREFIX}\" HAVE_COMPOSITION=1\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp lutro_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/m2000/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# EmuELEC package for M2000 libretro core (Philips P2000T)\n\nPKG_NAME=\"m2000\"\nPKG_VERSION=\"0.9.4\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/p2000t/M2000\"\n\n\nPKG_URL=\"${PKG_SITE}/archive/refs/tags/v${PKG_VERSION}.tar.gz\"\nPKG_SOURCE_DIR=\"M2000-${PKG_VERSION}\"\n\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec/libretro\"\nPKG_SHORTDESC=\"Philips P2000T (M2000) libretro core\"\nPKG_LONGDESC=\"M2000 is an emulator for the Philips P2000T home computer, here built as a libretro core.\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\n  make -C \"${PKG_BUILD}/src/libretro\" \\\n    CC=\"${CC}\" \\\n    CXX=\"${CXX}\" \\\n    AR=\"${AR}\" \\\n    platform=unix\n}\n\nmakeinstall_target() {\n  mkdir -p \"${INSTALL}/usr/lib/libretro\"\n  cp \"${PKG_BUILD}/src/libretro/m2000_libretro.so\" \\\n     \"${INSTALL}/usr/lib/libretro/\"\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/mame/config/MAME/MAME.opt",
    "content": "mame_alternate_renderer = \"disabled\"\nmame_altres = \"640x480\"\nmame_auto_save = \"disabled\"\nmame_autoloadfastforward = \"disabled\"\nmame_boot_to_bios = \"disabled\"\nmame_boot_to_osd = \"disabled\"\nmame_buttons_profiles = \"disabled\"\nmame_cheats_enable = \"disabled\"\nmame_cpu_overclock = \"default\"\nmame_joystick_deadzone = \"0.15\"\nmame_joystick_saturation = \"0.85\"\nmame_joystick_threshold = \"0.30\"\nmame_lightgun_mode = \"none\"\nmame_lightgun_offscreen_mode = \"free\"\nmame_mame_4way_enable = \"disabled\"\nmame_mame_paths_enable = \"enabled\"\nmame_media_type = \"rom\"\nmame_mouse_enable = \"enabled\"\nmame_read_config = \"enabled\"\nmame_rotation_mode = \"libretro\"\nmame_saves = \"game\"\nmame_softlists_auto_media = \"enabled\"\nmame_softlists_enable = \"enabled\"\nmame_thread_mode = \"enabled\"\nmame_throttle = \"disabled\"\nmame_write_config = \"enabled\"\n"
  },
  {
    "path": "packages/sx05re/libretro/mame/config/ini/fmtownsftv.ini",
    "content": "﻿#\n# CORE CONFIGURATION OPTIONS\n#\nreadconfig                1\nwriteconfig               1\n\n#\n# CORE SEARCH PATH OPTIONS\n#\nhomepath                  /storage/roms/bios/mame/\nrompath                   /storage/roms/fmtownsux\nhashpath                  /storage/roms/bios/mame/hash\nsamplepath                /storage/roms/bios/mame/samples\nartpath                   /storage/roms/bios/mame/artwork\nctrlrpath                 system/mame/ctrlr\ninipath                   /storage/roms/bios/mame/ini\nfontpath                  system/mame/\ncheatpath                 /storage/roms/bios/mame/cheat\ncrosshairpath             system/mame/crosshair\npluginspath               /storage/roms/bios/mame/plugins\nlanguagepath              system/mame/language\nswpath                    system/mame/software\n\n#\n# CORE OUTPUT DIRECTORY OPTIONS\n#\ncfg_directory             /storage/roms/mame/fmtownsux/raiden//mame/cfg\nnvram_directory           /storage/roms/mame/fmtownsux/raiden//mame/nvram\ninput_directory           /storage/roms/mame/fmtownsux/raiden//mame/input\nstate_directory           /storage/roms/mame/fmtownsux/raiden//mame/states\nsnapshot_directory        /storage/roms/mame/fmtownsux/raiden//mame/snaps\ndiff_directory            /storage/roms/mame/fmtownsux/raiden//mame/diff\ncomment_directory         system/mame/comments\nshare_directory           system/mame/share\n\n#\n# CORE STATE/PLAYBACK OPTIONS\n#\nstate                     \nautosave                  0\nrewind                    0\nrewind_capacity           100\nplayback                  \nrecord                    \nexit_after_playback       0\nmngwrite                  \naviwrite                  \nwavwrite                  \nsnapname                  %g/%i\nsnapsize                  auto\nsnapview                  auto\nsnapbilinear              1\nstatename                 %g/mouse\nburnin                    0\n\n#\n# CORE PERFORMANCE OPTIONS\n#\nautoframeskip             0\nframeskip                 0\nseconds_to_run            0\nthrottle                  0\nsleep                     1\nspeed                     1.0\nrefreshspeed              0\nlowlatency                0\n\n#\n# CORE RENDER OPTIONS\n#\nkeepaspect                1\nunevenstretch             1\nunevenstretchx            0\nunevenstretchy            0\nautostretchxy             0\nintoverscan               0\nintscalex                 0\nintscaley                 0\n\n#\n# CORE ROTATION OPTIONS\n#\nrotate                    0\nror                       0\nrol                       0\nautoror                   0\nautorol                   0\nflipx                     0\nflipy                     0\n\n#\n# CORE ARTWORK OPTIONS\n#\nartwork_crop              0\nfallback_artwork          \noverride_artwork          \n\n#\n# CORE SCREEN OPTIONS\n#\nbrightness                1.0\ncontrast                  1.0\ngamma                     1.0\npause_brightness          0.65\neffect                    none\n\n#\n# CORE VECTOR OPTIONS\n#\nbeam_width_min            1.0\nbeam_width_max            1.0\nbeam_dot_size             1.0\nbeam_intensity_weight     0\nflicker                   0\n\n#\n# CORE SOUND OPTIONS\n#\nsamplerate                48000\nsamples                   1\nvolume                    0\ncompressor                1\nspeaker_report            0\n\n#\n# CORE INPUT OPTIONS\n#\ncoin_lockout              1\nctrlr                     \nmouse                     1\njoystick                  1\nlightgun                  0\nmultikeyboard             0\nmultimouse                1\nsteadykey                 0\nui_active                 1\noffscreen_reload          0\njoystick_map              auto\njoystick_deadzone         0.15\njoystick_saturation       0.85\njoystick_threshold        0.30\nnatural                   0\njoystick_contradictory    0\ncoin_impulse              0\n\n#\n# CORE INPUT AUTOMATIC ENABLE OPTIONS\n#\npaddle_device             keyboard\nadstick_device            keyboard\npedal_device              keyboard\ndial_device               keyboard\ntrackball_device          keyboard\nlightgun_device           keyboard\npositional_device         keyboard\nmouse_device              mouse\n\n#\n# CORE DEBUGGING OPTIONS\n#\nverbose                   0\nlog                       0\noslog                     0\ndebug                     0\nupdate_in_pause           1\ndebugscript               \ndebuglog                  0\n\n#\n# CORE COMM OPTIONS\n#\ncomm_localhost            0.0.0.0\ncomm_localport            15112\ncomm_remotehost           127.0.0.1\ncomm_remoteport           15112\ncomm_framesync            0\n\n#\n# CORE MISC OPTIONS\n#\ndrc                       1\ndrc_use_c                 0\ndrc_log_uml               0\ndrc_log_native            0\nbios                      \ncheat                     0\nskip_gameinfo             0\nuifont                    default\nui                        cabinet\nramsize                   6M\nconfirm_quit              0\nui_mouse                  1\nlanguage                  \nnvram_save                1\n\n#\n# SCRIPTING OPTIONS\n#\nautoboot_command          \nautoboot_delay            0\nautoboot_script           \nconsole                   0\nplugins                   1\nplugin                    \nnoplugin                  \n\n#\n# HTTP SERVER OPTIONS\n#\nhttp                      0\nhttp_port                 8080\nhttp_root                 web\n\n#\n# OSD INPUT MAPPING OPTIONS\n#\nuimodekey                 auto\ncontroller_map            none\nbackground_input          0\n\n#\n# OSD FONT OPTIONS\n#\nuifontprovider            auto\n\n#\n# OSD OUTPUT OPTIONS\n#\noutput                    auto\n\n#\n# OSD INPUT OPTIONS\n#\nkeyboardprovider          auto\nmouseprovider             auto\nlightgunprovider          auto\njoystickprovider          auto\n\n#\n# OSD DEBUGGING OPTIONS\n#\ndebugger                  auto\ndebugger_port             23946\ndebugger_font             auto\ndebugger_font_size        0\nwatchdog                  0\n\n#\n# OSD PERFORMANCE OPTIONS\n#\nnumprocessors             auto\nbench                     0\n\n#\n# OSD VIDEO OPTIONS\n#\nvideo                     auto\nnumscreens                1\nwindow                    0\nmaximize                  1\nwaitvsync                 0\nsyncrefresh               0\nmonitorprovider           auto\n\n#\n# OSD PER-WINDOW VIDEO OPTIONS\n#\nscreen                    auto\naspect                    auto\nresolution                auto\nview                      auto\nscreen0                   auto\naspect0                   auto\nresolution0               auto\nview0                     auto\nscreen1                   auto\naspect1                   auto\nresolution1               auto\nview1                     auto\nscreen2                   auto\naspect2                   auto\nresolution2               auto\nview2                     auto\nscreen3                   auto\naspect3                   auto\nresolution3               auto\nview3                     auto\n\n#\n# OSD FULL SCREEN OPTIONS\n#\nswitchres                 0\n\n#\n# OSD ACCELERATED VIDEO OPTIONS\n#\nfilter                    1\nprescale                  1\n\n#\n# OSD SOUND OPTIONS\n#\nsound                     auto\naudio_latency             2\n\n#\n# OSD MIDI OPTIONS\n#\nmidiprovider              auto\n\n#\n# OSD EMULATED NETWORKING OPTIONS\n#\nnetworkprovider           auto\n\n#\n# BGFX POST-PROCESSING OPTIONS\n#\nbgfx_path                 bgfx\nbgfx_backend              auto\nbgfx_debug                0\nbgfx_screen_chains        \nbgfx_shadow_mask          slot-mask.png\nbgfx_lut                  lut-default.png\nbgfx_avi_name             auto\n\n#\n# SDL VIDEO OPTIONS\n#\ncenterh                   1\ncenterv                   1\nscalemode                 none\n\n#\n# SDL JOYSTICK MAPPING\n#\njoy_idx1                  auto\njoy_idx2                  auto\njoy_idx3                  auto\njoy_idx4                  auto\njoy_idx5                  auto\njoy_idx6                  auto\njoy_idx7                  auto\njoy_idx8                  auto\nsixaxis                   0\n\n#\n# SDL MOUSE MAPPING\n#\nmouse_index1              auto\nmouse_index2              auto\nmouse_index3              auto\nmouse_index4              auto\nmouse_index5              auto\nmouse_index6              auto\nmouse_index7              auto\nmouse_index8              auto\n\n#\n# SDL KEYBOARD MAPPING\n#\nkeyb_idx1                 auto\nkeyb_idx2                 auto\nkeyb_idx3                 auto\nkeyb_idx4                 auto\nkeyb_idx5                 auto\nkeyb_idx6                 auto\nkeyb_idx7                 auto\nkeyb_idx8                 auto\n\n#\n# FRONTEND COMMAND OPTIONS\n#\ndtd                       1\n\n#\n# SLOT DEVICES\n#\npad1                      townspad\npad2                      mouse\n\n#\n# IMAGE DEVICES\n#\nfloppydisk1               \nfloppydisk2               \ncdrom                     \"/storage/roms/fmtownsux/mahoudai/mahou daisakusen (japan).chd\"\nmemcard                   \nharddisk1                 \nharddisk2                 \nharddisk3                 \nharddisk4                 \nharddisk5                 \n"
  },
  {
    "path": "packages/sx05re/libretro/mame/config/ini/fmtownshr.ini",
    "content": "﻿#\n# CORE CONFIGURATION OPTIONS\n#\nreadconfig                1\nwriteconfig               1\n\n#\n# CORE SEARCH PATH OPTIONS\n#\nhomepath                  /storage/roms/bios/mame/\nrompath                   /storage/roms/fmtownsux\nhashpath                  /storage/roms/bios/mame/hash\nsamplepath                /storage/roms/bios/mame/samples\nartpath                   /storage/roms/bios/mame/artwork\nctrlrpath                 system/mame/ctrlr\ninipath                   /storage/roms/bios/mame/ini\nfontpath                  system/mame/\ncheatpath                 /storage/roms/bios/mame/cheat\ncrosshairpath             system/mame/crosshair\npluginspath               /storage/roms/bios/mame/plugins\nlanguagepath              system/mame/language\nswpath                    system/mame/software\n\n#\n# CORE OUTPUT DIRECTORY OPTIONS\n#\ncfg_directory             /storage/roms/mame/fmtownsux/raiden//mame/cfg\nnvram_directory           /storage/roms/mame/fmtownsux/raiden//mame/nvram\ninput_directory           /storage/roms/mame/fmtownsux/raiden//mame/input\nstate_directory           /storage/roms/mame/fmtownsux/raiden//mame/states\nsnapshot_directory        /storage/roms/mame/fmtownsux/raiden//mame/snaps\ndiff_directory            /storage/roms/mame/fmtownsux/raiden//mame/diff\ncomment_directory         system/mame/comments\nshare_directory           system/mame/share\n\n#\n# CORE STATE/PLAYBACK OPTIONS\n#\nstate                     \nautosave                  0\nrewind                    0\nrewind_capacity           100\nplayback                  \nrecord                    \nexit_after_playback       0\nmngwrite                  \naviwrite                  \nwavwrite                  \nsnapname                  %g/%i\nsnapsize                  auto\nsnapview                  auto\nsnapbilinear              1\nstatename                 %g/-ui_active\nburnin                    0\n\n#\n# CORE PERFORMANCE OPTIONS\n#\nautoframeskip             0\nframeskip                 0\nseconds_to_run            0\nthrottle                  0\nsleep                     1\nspeed                     1.0\nrefreshspeed              0\nlowlatency                0\n\n#\n# CORE RENDER OPTIONS\n#\nkeepaspect                1\nunevenstretch             1\nunevenstretchx            0\nunevenstretchy            0\nautostretchxy             0\nintoverscan               0\nintscalex                 0\nintscaley                 0\n\n#\n# CORE ROTATION OPTIONS\n#\nrotate                    0\nror                       0\nrol                       0\nautoror                   0\nautorol                   0\nflipx                     0\nflipy                     0\n\n#\n# CORE ARTWORK OPTIONS\n#\nartwork_crop              0\nfallback_artwork          \noverride_artwork          \n\n#\n# CORE SCREEN OPTIONS\n#\nbrightness                1.0\ncontrast                  1.0\ngamma                     1.0\npause_brightness          0.65\neffect                    none\n\n#\n# CORE VECTOR OPTIONS\n#\nbeam_width_min            1.0\nbeam_width_max            1.0\nbeam_dot_size             1.0\nbeam_intensity_weight     0\nflicker                   0\n\n#\n# CORE SOUND OPTIONS\n#\nsamplerate                48000\nsamples                   1\nvolume                    0\ncompressor                1\nspeaker_report            0\n\n#\n# CORE INPUT OPTIONS\n#\ncoin_lockout              1\nctrlr                     \nmouse                     1\njoystick                  1\nlightgun                  0\nmultikeyboard             0\nmultimouse                1\nsteadykey                 0\nui_active                 1\noffscreen_reload          0\njoystick_map              auto\njoystick_deadzone         0.15\njoystick_saturation       0.85\njoystick_threshold        0.30\nnatural                   0\njoystick_contradictory    0\ncoin_impulse              0\n\n#\n# CORE INPUT AUTOMATIC ENABLE OPTIONS\n#\npaddle_device             keyboard\nadstick_device            keyboard\npedal_device              keyboard\ndial_device               keyboard\ntrackball_device          keyboard\nlightgun_device           keyboard\npositional_device         keyboard\nmouse_device              mouse\n\n#\n# CORE DEBUGGING OPTIONS\n#\nverbose                   0\nlog                       0\noslog                     0\ndebug                     0\nupdate_in_pause           1\ndebugscript               \ndebuglog                  0\n\n#\n# CORE COMM OPTIONS\n#\ncomm_localhost            0.0.0.0\ncomm_localport            15112\ncomm_remotehost           127.0.0.1\ncomm_remoteport           15112\ncomm_framesync            0\n\n#\n# CORE MISC OPTIONS\n#\ndrc                       1\ndrc_use_c                 0\ndrc_log_uml               0\ndrc_log_native            0\nbios                      \ncheat                     0\nskip_gameinfo             0\nuifont                    default\nui                        cabinet\nramsize                   2M\nconfirm_quit              0\nui_mouse                  1\nlanguage                  \nnvram_save                1\n\n#\n# SCRIPTING OPTIONS\n#\nautoboot_command          \nautoboot_delay            0\nautoboot_script           \nconsole                   0\nplugins                   1\nplugin                    \nnoplugin                  \n\n#\n# HTTP SERVER OPTIONS\n#\nhttp                      0\nhttp_port                 8080\nhttp_root                 web\n\n#\n# OSD INPUT MAPPING OPTIONS\n#\nuimodekey                 auto\ncontroller_map            none\nbackground_input          0\n\n#\n# OSD FONT OPTIONS\n#\nuifontprovider            auto\n\n#\n# OSD OUTPUT OPTIONS\n#\noutput                    auto\n\n#\n# OSD INPUT OPTIONS\n#\nkeyboardprovider          auto\nmouseprovider             auto\nlightgunprovider          auto\njoystickprovider          auto\n\n#\n# OSD DEBUGGING OPTIONS\n#\ndebugger                  auto\ndebugger_port             23946\ndebugger_font             auto\ndebugger_font_size        0\nwatchdog                  0\n\n#\n# OSD PERFORMANCE OPTIONS\n#\nnumprocessors             auto\nbench                     0\n\n#\n# OSD VIDEO OPTIONS\n#\nvideo                     auto\nnumscreens                1\nwindow                    0\nmaximize                  1\nwaitvsync                 0\nsyncrefresh               0\nmonitorprovider           auto\n\n#\n# OSD PER-WINDOW VIDEO OPTIONS\n#\nscreen                    auto\naspect                    auto\nresolution                auto\nview                      auto\nscreen0                   auto\naspect0                   auto\nresolution0               auto\nview0                     auto\nscreen1                   auto\naspect1                   auto\nresolution1               auto\nview1                     auto\nscreen2                   auto\naspect2                   auto\nresolution2               auto\nview2                     auto\nscreen3                   auto\naspect3                   auto\nresolution3               auto\nview3                     auto\n\n#\n# OSD FULL SCREEN OPTIONS\n#\nswitchres                 0\n\n#\n# OSD ACCELERATED VIDEO OPTIONS\n#\nfilter                    1\nprescale                  1\n\n#\n# OSD SOUND OPTIONS\n#\nsound                     auto\naudio_latency             2\n\n#\n# OSD MIDI OPTIONS\n#\nmidiprovider              auto\n\n#\n# OSD EMULATED NETWORKING OPTIONS\n#\nnetworkprovider           auto\n\n#\n# BGFX POST-PROCESSING OPTIONS\n#\nbgfx_path                 bgfx\nbgfx_backend              auto\nbgfx_debug                0\nbgfx_screen_chains        \nbgfx_shadow_mask          slot-mask.png\nbgfx_lut                  lut-default.png\nbgfx_avi_name             auto\n\n#\n# SDL VIDEO OPTIONS\n#\ncenterh                   1\ncenterv                   1\nscalemode                 none\n\n#\n# SDL JOYSTICK MAPPING\n#\njoy_idx1                  auto\njoy_idx2                  auto\njoy_idx3                  auto\njoy_idx4                  auto\njoy_idx5                  auto\njoy_idx6                  auto\njoy_idx7                  auto\njoy_idx8                  auto\nsixaxis                   0\n\n#\n# SDL MOUSE MAPPING\n#\nmouse_index1              auto\nmouse_index2              auto\nmouse_index3              auto\nmouse_index4              auto\nmouse_index5              auto\nmouse_index6              auto\nmouse_index7              auto\nmouse_index8              auto\n\n#\n# SDL KEYBOARD MAPPING\n#\nkeyb_idx1                 auto\nkeyb_idx2                 auto\nkeyb_idx3                 auto\nkeyb_idx4                 auto\nkeyb_idx5                 auto\nkeyb_idx6                 auto\nkeyb_idx7                 auto\nkeyb_idx8                 auto\n\n#\n# FRONTEND COMMAND OPTIONS\n#\ndtd                       1\n\n#\n# SLOT DEVICES\n#\npad1                      townspad\npad2                      mouse\n\n#\n# IMAGE DEVICES\n#\nfloppydisk1               /storage/roms/fmtownsux/rbisland/disk1.hdm\nfloppydisk2               \ncdrom                     \"/storage/roms/fmtownsux/rbisland/rainbow islands - the story of bubble bobble 2 - extra version (japan).chd\"\nmemcard                   \nharddisk1                 \nharddisk2                 \nharddisk3                 \nharddisk4                 \nharddisk5                 \n"
  },
  {
    "path": "packages/sx05re/libretro/mame/config/ini/fmtownsux.ini",
    "content": "﻿#\n# CORE CONFIGURATION OPTIONS\n#\nreadconfig                1\nwriteconfig               1\n\n#\n# CORE SEARCH PATH OPTIONS\n#\nhomepath                  /storage/roms/bios/mame/\nrompath                   /storage/roms/fmtownsux\nhashpath                  /storage/roms/bios/mame/hash\nsamplepath                /storage/roms/bios/mame/samples\nartpath                   /storage/roms/bios/mame/artwork\nctrlrpath                 system/mame/ctrlr\ninipath                   /storage/roms/bios/mame/ini\nfontpath                  system/mame/\ncheatpath                 /storage/roms/bios/mame/cheat\ncrosshairpath             system/mame/crosshair\npluginspath               /storage/roms/bios/mame/plugins\nlanguagepath              system/mame/language\nswpath                    system/mame/software\n\n#\n# CORE OUTPUT DIRECTORY OPTIONS\n#\ncfg_directory             /storage/roms/mame/fmtownsux/raiden//mame/cfg\nnvram_directory           /storage/roms/mame/fmtownsux/raiden//mame/nvram\ninput_directory           /storage/roms/mame/fmtownsux/raiden//mame/input\nstate_directory           /storage/roms/mame/fmtownsux/raiden//mame/states\nsnapshot_directory        /storage/roms/mame/fmtownsux/raiden//mame/snaps\ndiff_directory            /storage/roms/mame/fmtownsux/raiden//mame/diff\ncomment_directory         system/mame/comments\nshare_directory           system/mame/share\n\n#\n# CORE STATE/PLAYBACK OPTIONS\n#\nstate                     \nautosave                  0\nrewind                    0\nrewind_capacity           100\nplayback                  \nrecord                    \nexit_after_playback       0\nmngwrite                  \naviwrite                  \nwavwrite                  \nsnapname                  %g/%i\nsnapsize                  auto\nsnapview                  auto\nsnapbilinear              1\nstatename                 %g/mouse\nburnin                    0\n\n#\n# CORE PERFORMANCE OPTIONS\n#\nautoframeskip             0\nframeskip                 0\nseconds_to_run            0\nthrottle                  0\nsleep                     1\nspeed                     1.0\nrefreshspeed              0\nlowlatency                0\n\n#\n# CORE RENDER OPTIONS\n#\nkeepaspect                1\nunevenstretch             1\nunevenstretchx            0\nunevenstretchy            0\nautostretchxy             0\nintoverscan               0\nintscalex                 0\nintscaley                 0\n\n#\n# CORE ROTATION OPTIONS\n#\nrotate                    0\nror                       0\nrol                       0\nautoror                   0\nautorol                   0\nflipx                     0\nflipy                     0\n\n#\n# CORE ARTWORK OPTIONS\n#\nartwork_crop              0\nfallback_artwork          \noverride_artwork          \n\n#\n# CORE SCREEN OPTIONS\n#\nbrightness                1.0\ncontrast                  1.0\ngamma                     1.0\npause_brightness          0.65\neffect                    none\n\n#\n# CORE VECTOR OPTIONS\n#\nbeam_width_min            1.0\nbeam_width_max            1.0\nbeam_dot_size             1.0\nbeam_intensity_weight     0\nflicker                   0\n\n#\n# CORE SOUND OPTIONS\n#\nsamplerate                48000\nsamples                   1\nvolume                    0\ncompressor                1\nspeaker_report            0\n\n#\n# CORE INPUT OPTIONS\n#\ncoin_lockout              1\nctrlr                     \nmouse                     1\njoystick                  1\nlightgun                  0\nmultikeyboard             0\nmultimouse                1\nsteadykey                 0\nui_active                 1\noffscreen_reload          0\njoystick_map              auto\njoystick_deadzone         0.15\njoystick_saturation       0.85\njoystick_threshold        0.30\nnatural                   0\njoystick_contradictory    0\ncoin_impulse              0\n\n#\n# CORE INPUT AUTOMATIC ENABLE OPTIONS\n#\npaddle_device             keyboard\nadstick_device            keyboard\npedal_device              keyboard\ndial_device               keyboard\ntrackball_device          keyboard\nlightgun_device           keyboard\npositional_device         keyboard\nmouse_device              mouse\n\n#\n# CORE DEBUGGING OPTIONS\n#\nverbose                   1\nlog                       0\noslog                     0\ndebug                     0\nupdate_in_pause           1\ndebugscript               \ndebuglog                  0\n\n#\n# CORE COMM OPTIONS\n#\ncomm_localhost            0.0.0.0\ncomm_localport            15112\ncomm_remotehost           127.0.0.1\ncomm_remoteport           15112\ncomm_framesync            0\n\n#\n# CORE MISC OPTIONS\n#\ndrc                       1\ndrc_use_c                 0\ndrc_log_uml               0\ndrc_log_native            0\nbios                      \ncheat                     0\nskip_gameinfo             0\nuifont                    default\nui                        cabinet\nramsize                   6M\nconfirm_quit              0\nui_mouse                  1\nlanguage                  \nnvram_save                1\n\n#\n# SCRIPTING OPTIONS\n#\nautoboot_command          \nautoboot_delay            0\nautoboot_script           \nconsole                   0\nplugins                   1\nplugin                    \nnoplugin                  \n\n#\n# HTTP SERVER OPTIONS\n#\nhttp                      0\nhttp_port                 8080\nhttp_root                 web\n\n#\n# OSD INPUT MAPPING OPTIONS\n#\nuimodekey                 auto\ncontroller_map            none\nbackground_input          0\n\n#\n# OSD FONT OPTIONS\n#\nuifontprovider            auto\n\n#\n# OSD OUTPUT OPTIONS\n#\noutput                    auto\n\n#\n# OSD INPUT OPTIONS\n#\nkeyboardprovider          auto\nmouseprovider             auto\nlightgunprovider          auto\njoystickprovider          auto\n\n#\n# OSD DEBUGGING OPTIONS\n#\ndebugger                  auto\ndebugger_port             23946\ndebugger_font             auto\ndebugger_font_size        0\nwatchdog                  0\n\n#\n# OSD PERFORMANCE OPTIONS\n#\nnumprocessors             auto\nbench                     0\n\n#\n# OSD VIDEO OPTIONS\n#\nvideo                     auto\nnumscreens                1\nwindow                    0\nmaximize                  1\nwaitvsync                 0\nsyncrefresh               0\nmonitorprovider           auto\n\n#\n# OSD PER-WINDOW VIDEO OPTIONS\n#\nscreen                    auto\naspect                    auto\nresolution                auto\nview                      auto\nscreen0                   auto\naspect0                   auto\nresolution0               auto\nview0                     auto\nscreen1                   auto\naspect1                   auto\nresolution1               auto\nview1                     auto\nscreen2                   auto\naspect2                   auto\nresolution2               auto\nview2                     auto\nscreen3                   auto\naspect3                   auto\nresolution3               auto\nview3                     auto\n\n#\n# OSD FULL SCREEN OPTIONS\n#\nswitchres                 0\n\n#\n# OSD ACCELERATED VIDEO OPTIONS\n#\nfilter                    1\nprescale                  1\n\n#\n# OSD SOUND OPTIONS\n#\nsound                     auto\naudio_latency             2\n\n#\n# OSD MIDI OPTIONS\n#\nmidiprovider              auto\n\n#\n# OSD EMULATED NETWORKING OPTIONS\n#\nnetworkprovider           auto\n\n#\n# BGFX POST-PROCESSING OPTIONS\n#\nbgfx_path                 bgfx\nbgfx_backend              auto\nbgfx_debug                0\nbgfx_screen_chains        default\nbgfx_shadow_mask          slot-mask.png\nbgfx_lut                  lut-default.png\nbgfx_avi_name             auto\n\n#\n# SDL VIDEO OPTIONS\n#\ncenterh                   1\ncenterv                   1\nscalemode                 none\n\n#\n# SDL JOYSTICK MAPPING\n#\njoy_idx1                  auto\njoy_idx2                  auto\njoy_idx3                  auto\njoy_idx4                  auto\njoy_idx5                  auto\njoy_idx6                  auto\njoy_idx7                  auto\njoy_idx8                  auto\nsixaxis                   0\n\n#\n# SDL MOUSE MAPPING\n#\nmouse_index1              auto\nmouse_index2              auto\nmouse_index3              auto\nmouse_index4              auto\nmouse_index5              auto\nmouse_index6              auto\nmouse_index7              auto\nmouse_index8              auto\n\n#\n# SDL KEYBOARD MAPPING\n#\nkeyb_idx1                 auto\nkeyb_idx2                 auto\nkeyb_idx3                 auto\nkeyb_idx4                 auto\nkeyb_idx5                 auto\nkeyb_idx6                 auto\nkeyb_idx7                 auto\nkeyb_idx8                 auto\n\n#\n# FRONTEND COMMAND OPTIONS\n#\ndtd                       1\n\n#\n# SLOT DEVICES\n#\npad1                      townspad\npad2                      mouse\n\n#\n# IMAGE DEVICES\n#\nfloppydisk1               /storage/roms/fmtownsux/rbisland/disk1.hdm\nfloppydisk2               \ncdrom                     \"/storage/roms/fmtownsux/mahoudai/mahou daisakusen (japan).chd\"\nmemcard                   \nharddisk1                 /storage/roms/fmtownsux/alltynex/alltynex.h0\nharddisk2                 \nharddisk3                 \nharddisk4                 \nharddisk5                 \n"
  },
  {
    "path": "packages/sx05re/libretro/mame/config/ini/mame.ini",
    "content": "﻿#\n# CORE CONFIGURATION OPTIONS\n#\nreadconfig                1\nwriteconfig               1\n\n#\n# CORE SEARCH PATH OPTIONS\n#\nhomepath                  /storage/roms/bios/mame/\nrompath                   /storage/roms/bios/mame/bios;/storage/roms/mame;/storage/roms/arcade;/storage/roms/fmtownsux;/storage/roms/pgm2;/storage/roms/apple;\nhashpath                  /storage/roms/bios/mame/hash\nsamplepath                /storage/roms/bios/mame/samples\nartpath                   /storage/roms/bios/mame/artwork\nctrlrpath                 system/mame/ctrlr\ninipath                   /storage/roms/bios/mame/ini\nfontpath                  system/mame/\ncheatpath                 /storage/roms/bios/mame/cheat\ncrosshairpath             /storage/roms/bios/mame/crosshair\npluginspath               /storage/roms/bios/mame/plugins\nlanguagepath              system/mame/language\nswpath                    system/mame/software\n\n#\n# CORE OUTPUT DIRECTORY OPTIONS\n#\ncfg_directory             /storage/roms/bios/mame/mame/cfg\nnvram_directory           /storage/roms/bios/mame/mame/nvram\ninput_directory           /storage/roms/bios/mame/mame/input\nstate_directory           /storage/roms/bios/mame/mame/states\nsnapshot_directory        /storage/roms/bios/mame/mame/snaps\ndiff_directory            /storage/roms/bios/mame/mame/diff\ncomment_directory         system/mame/comments\nshare_directory           system/mame/share\n\n#\n# CORE STATE/PLAYBACK OPTIONS\n#\nstate                     \nautosave                  0\nrewind                    0\nrewind_capacity           10\nplayback                  \nrecord                    \nexit_after_playback       0\nmngwrite                  \naviwrite                  \nwavwrite                  \nsnapname                  %g/%i\nsnapsize                  auto\nsnapview                  auto\nsnapbilinear              1\nburnin                    0\n\n#\n# CORE PERFORMANCE OPTIONS\n#\nautoframeskip             0\nframeskip                 0\nseconds_to_run            0\nthrottle                  0\nsleep                     0\nspeed                     1.0\nrefreshspeed              0\nlowlatency                0\n\n#\n# CORE RENDER OPTIONS\n#\nkeepaspect                1\nunevenstretch             1\nunevenstretchx            0\nunevenstretchy            0\nautostretchxy             0\nintoverscan               0\nintscalex                 0\nintscaley                 0\n\n#\n# CORE ROTATION OPTIONS\n#\nrotate                    0\nror                       0\nrol                       0\nautoror                   0\nautorol                   0\nflipx                     0\nflipy                     0\n\n#\n# CORE ARTWORK OPTIONS\n#\nartwork_crop              0\nfallback_artwork          \noverride_artwork          \n\n#\n# CORE SCREEN OPTIONS\n#\nbrightness                1.0\ncontrast                  1.0\ngamma                     1.0\npause_brightness          0.65\neffect                    none\n\n#\n# CORE VECTOR OPTIONS\n#\nbeam_width_min            1.0\nbeam_width_max            1.0\nbeam_dot_size             1.0\nbeam_intensity_weight     0\nflicker                   0\n\n#\n# CORE SOUND OPTIONS\n#\nsamplerate                48000\nsamples                   1\nvolume                    0\n\n#\n# CORE INPUT OPTIONS\n#\ncoin_lockout              1\nctrlr                     \nmouse                     1\njoystick                  1\nlightgun                  0\nmultikeyboard             0\nmultimouse                1\nsteadykey                 0\nui_active                 0\noffscreen_reload          0\njoystick_map              auto\njoystick_deadzone         0.15\njoystick_saturation       0.85\njoystick_threshold        0.30\nnatural                   0\njoystick_contradictory    0\ncoin_impulse              0\n\n#\n# CORE INPUT AUTOMATIC ENABLE OPTIONS\n#\npaddle_device             keyboard\nadstick_device            keyboard\npedal_device              keyboard\ndial_device               keyboard\ntrackball_device          keyboard\nlightgun_device           keyboard\npositional_device         keyboard\nmouse_device              mouse\n\n#\n# CORE DEBUGGING OPTIONS\n#\nverbose                   0\nlog                       0\noslog                     0\ndebug                     0\nupdate_in_pause           1\ndebugscript               \ndebuglog                  0\n\n#\n# CORE COMM OPTIONS\n#\ncomm_localhost            0.0.0.0\ncomm_localport            15112\ncomm_remotehost           127.0.0.1\ncomm_remoteport           15112\ncomm_framesync            0\n\n#\n# CORE MISC OPTIONS\n#\ndrc                       1\ndrc_use_c                 0\ndrc_log_uml               0\ndrc_log_native            0\nbios                      \ncheat                     0\nskip_gameinfo             0\nuifont                    default\nui                        cabinet\nramsize                   \nconfirm_quit              0\nui_mouse                  1\nlanguage                  \nnvram_save                1\n\n#\n# SCRIPTING OPTIONS\n#\nautoboot_command          \nautoboot_delay            0\nautoboot_script           \nconsole                   0\nplugins                   1\nplugin                    \nnoplugin                  \n\n#\n# HTTP SERVER OPTIONS\n#\nhttp                      0\nhttp_port                 8080\nhttp_root                 web\n\n#\n# OSD INPUT MAPPING OPTIONS\n#\nuimodekey                 auto\ncontroller_map            none\nbackground_input          0\n\n#\n# OSD FONT OPTIONS\n#\nuifontprovider            auto\n\n#\n# OSD OUTPUT OPTIONS\n#\noutput                    auto\n\n#\n# OSD INPUT OPTIONS\n#\nkeyboardprovider          auto\nmouseprovider             auto\nlightgunprovider          auto\njoystickprovider          auto\n\n#\n# OSD DEBUGGING OPTIONS\n#\ndebugger                  auto\ndebugger_host             localhost\ndebugger_port             23946\ndebugger_font             auto\ndebugger_font_size        0\nwatchdog                  0\n\n#\n# OSD PERFORMANCE OPTIONS\n#\nnumprocessors             4\nbench                     0\n\n#\n# OSD VIDEO OPTIONS\n#\nvideo                     auto\nnumscreens                1\nwindow                    0\nmaximize                  1\nwaitvsync                 0\nsyncrefresh               0\nmonitorprovider           auto\n\n#\n# OSD PER-WINDOW VIDEO OPTIONS\n#\nscreen                    auto\naspect                    auto\nresolution                auto\nview                      auto\nscreen0                   auto\naspect0                   auto\nresolution0               auto\nview0                     auto\nscreen1                   auto\naspect1                   auto\nresolution1               auto\nview1                     auto\nscreen2                   auto\naspect2                   auto\nresolution2               auto\nview2                     auto\nscreen3                   auto\naspect3                   auto\nresolution3               auto\nview3                     auto\n\n#\n# OSD FULL SCREEN OPTIONS\n#\nswitchres                 0\n\n#\n# OSD ACCELERATED VIDEO OPTIONS\n#\nfilter                    1\nprescale                  1\n\n#\n# OSD SOUND OPTIONS\n#\nsound                     auto\naudio_latency             2\n\n#\n# OSD MIDI OPTIONS\n#\nmidiprovider              auto\n\n#\n# OSD EMULATED NETWORKING OPTIONS\n#\nnetworkprovider           auto\n\n#\n# BGFX POST-PROCESSING OPTIONS\n#\nbgfx_path                 bgfx\nbgfx_backend              auto\nbgfx_debug                0\nbgfx_screen_chains        \nbgfx_shadow_mask          slot-mask.png\nbgfx_lut                  lut-default.png\nbgfx_avi_name             auto\n\n#\n# SDL VIDEO OPTIONS\n#\ncenterh                   1\ncenterv                   1\nscalemode                 none\n\n#\n# SDL JOYSTICK MAPPING\n#\njoy_idx1                  auto\njoy_idx2                  auto\njoy_idx3                  auto\njoy_idx4                  auto\njoy_idx5                  auto\njoy_idx6                  auto\njoy_idx7                  auto\njoy_idx8                  auto\nsixaxis                   0\n\n#\n# SDL MOUSE MAPPING\n#\nmouse_index1              auto\nmouse_index2              auto\nmouse_index3              auto\nmouse_index4              auto\nmouse_index5              auto\nmouse_index6              auto\nmouse_index7              auto\nmouse_index8              auto\n\n#\n# SDL KEYBOARD MAPPING\n#\nkeyb_idx1                 auto\nkeyb_idx2                 auto\nkeyb_idx3                 auto\nkeyb_idx4                 auto\nkeyb_idx5                 auto\nkeyb_idx6                 auto\nkeyb_idx7                 auto\nkeyb_idx8                 auto\n\n#\n# FRONTEND COMMAND OPTIONS\n#\ndtd                       1\n"
  },
  {
    "path": "packages/sx05re/libretro/mame/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019 Trond Haugland (trondah@gmail.com)\n\nPKG_NAME=\"mame\"\nPKG_VERSION=\"6cdc40fc53ba5574073d4009b531fda07156ff49\"\nPKG_SHA256=\"ea494a44d69e7a075e6271e7a9a987aca208e3b018718984e20b5739eb8a2114\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/mame\"\nPKG_URL=\"https://github.com/libretro/mame/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib flac sqlite expat\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"MAME - Multiple Arcade Machine Emulator\"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\n\nPTR64=\"1\"\nNOASM=\"0\"\n\nif [ \"${ARCH}\" == \"arm\" ]; then\n  NOASM=\"1\"\nfi\n\nPKG_MAKE_OPTS_TARGET=\"REGENIE=1 \\\n\t\t      VERBOSE=1 \\\n\t\t      NOWERROR=1 \\\n\t\t      OPENMP=1 \\\n\t\t      CROSS_BUILD=1 \\\n\t\t      TOOLS=0 \\\n\t\t      RETRO=1 \\\n\t\t      PTR64=${PTR64} \\\n\t\t      NOASM=${NOASM} \\\n\t\t      PYTHON_EXECUTABLE=python3 \\\n\t\t      CONFIG=libretro \\\n\t\t      LIBRETRO_OS=unix \\\n\t\t      LIBRETRO_CPU=arm64 \\\n\t\t      PLATFORM=arm64 \\\n\t\t      ARCH= \\\n\t\t      TARGET=mame \\\n\t\t      SUBTARGET=mame \\\n\t\t      OPTIMIZE=fast \\\n\t\t      OSD=retro \\\n\t\t      USE_SYSTEM_LIB_EXPAT=1 \\\n\t\t      USE_SYSTEM_LIB_ZLIB=1 \\\n\t\t      USE_SYSTEM_LIB_FLAC=1 \\\n\t\t      USE_SYSTEM_LIB_SQLITE3=1\"\n\nexport ARCHOPTS=\"-D__aarch64__ -DASMJIT_BUILD_X86\"\n\nsed -i \"s/-static-libstdc++//g\" scripts/genie.lua\n\nunset ARCH\nunset DISTRO\nunset PROJECT\n\n}\n\nmake_target() {\n  make ${PKG_MAKE_OPTS_TARGET} OVERRIDE_CC=${CC} OVERRIDE_CXX=${CXX} OVERRIDE_LD=${LD} AR=${AR} ${MAKEFLAGS} -j$(nproc)\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp *.so ${INSTALL}/usr/lib/libretro/\n  mkdir -p ${INSTALL}/usr/config/retroarch/savefiles/mame/hi\n  cp plugins/hiscore/hiscore.dat ${INSTALL}/usr/config/retroarch/savefiles/mame/hi\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/mame\n  cp -rf ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/mame\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/mame/hash\n  cp -rf $PKG_BUILD/hash/fmtowns_cd.xml ${INSTALL}/usr/config/emuelec/configs/mame/hash\n  cp -rf $PKG_BUILD/hash/apple*.xml ${INSTALL}/usr/config/emuelec/configs/mame/hash\n  mkdir -p ${INSTALL}/usr/bin\n  cp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/mame/patches/mame-crosscompile.patch",
    "content": "--- a/3rdparty/genie/build/gmake.linux/genie.make\t2018-08-11 00:17:44.000000000 +0200\n+++ b/3rdparty/genie/build/gmake.linux/genie.make\t2019-04-03 11:57:27.671223016 +0200\n@@ -28,8 +28,8 @@\n   RM    = $(SILENT) del /F \"$(subst /,\\\\,$(1))\" 2> nul || exit 0\n endif\n \n-CC  = gcc\n-CXX = g++\n+CC  = $(HOST_CC)\n+CXX = $(HOST_CXX)\n AR  = ar\n \n ifndef RESCOMP\n@@ -50,12 +50,12 @@\n   INCLUDES           += -I\"../../src/host/lua-5.3.0/src\"\n   ALL_CPPFLAGS       += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)\n   ALL_ASMFLAGS       += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n-  ALL_CFLAGS         += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n-  ALL_CXXFLAGS       += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n-  ALL_OBJCFLAGS      += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n-  ALL_OBJCPPFLAGS    += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n+  ALL_CFLAGS         += $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n+  ALL_CXXFLAGS       += $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n+  ALL_OBJCFLAGS      += $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n+  ALL_OBJCPPFLAGS    += $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n   ALL_RESFLAGS       += $(RESFLAGS) $(DEFINES) $(INCLUDES)\n-  ALL_LDFLAGS        += $(LDFLAGS) -L\".\" -s -rdynamic\n+  ALL_LDFLAGS        += -L\".\" -s -rdynamic\n   LIBDEPS            +=\n   LDDEPS             +=\n   LDRESP              =\ndiff --git a/3rdparty/genie/src/host/scripts.c b/3rdparty/genie/src/host/scripts.c\nindex d052a1418f4..486f7dc08ce 100644\n--- a/3rdparty/genie/src/host/scripts.c\n+++ b/3rdparty/genie/src/host/scripts.c\n@@ -149,8 +149,7 @@ const char* builtin_scripts[] = {\n \n \t/* tools/gcc.lua */\n \t\"premake.gcc = { }\\npremake.gcc.cc     = \\\"gcc\\\"\\npremake.gcc.cxx    = \\\"g++\\\"\\npremake.gcc.ar     = \\\"ar\\\"\\npremake.gcc.rc     = \\\"windres\\\"\\npremake.gcc.llvm   = false\\nlocal cflags =\\n{\\nEnableSSE        = \\\"-msse\\\",\\nEnableSSE2       = \\\"-msse2\\\",\\nEnableAVX        = \\\"-mavx\\\",\\nEnableAVX2       = \\\"-mavx2\\\",\\nPedanticWarnings = \\\"-Wall -Wextra -pedantic\\\",\\nExtraWarnings    = \\\"-Wall -Wextra\\\",\\nFatalWarnings    = \\\"-Werror\\\",\\nFloatFast        = \\\"-ffast-math\\\",\\nFloatStrict      = \\\"-ffloat-store\\\",\\nNoFramePointer   = \\\"-fomit-frame-pointer\\\",\\nOptimize         = \\\"-O2\\\",\\nOptimizeSize     = \\\"-Os\\\",\\nOptimizeSpeed    = \\\"-O3\\\",\\nSymbols          = \\\"-g\\\",\\n}\\nlocal cxxflags =\\n{\\nCpp11        = \\\"-std=c++11\\\",\\nCpp14        = \\\"-std=c++14\\\",\\nCpp17        = \\\"-std=c++17\\\",\\nCpp20        = \\\"-std=c++20\\\",\\nCppLatest    = \\\"-std=c++2b\\\",\\nNoExceptions = \\\"-fno-exceptions\\\",\\nNoRTTI       = \\\"-fno-rtti\\\",\\nUnsignedChar = \\\"-funsigned-char\\\",\\n}\\nlocal objcflags =\\n{\\nObjcARC = \\\"-fobjc-arc\\\",\\n}\\npremake.\"\n-\t\"gcc.platforms =\\n{\\nNative = {\\ncppflags = \\\"-MMD -MP\\\",\\n},\\nx32 = {\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-m32\\\",\\n},\\nx64 = {\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-m64\\\",\\n},\\nUniversal = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch i386 -arch x86_64 -arch ppc -arch ppc64\\\",\\n},\\nUniversal32 = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch i386 -arch ppc\\\",\\n},\\nUniversal64 = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch x86_64 -arch ppc64\\\",\\n},\\nPS3 = {\\ncc         = \\\"ppu-lv2-g++\\\",\\ncxx        = \\\"ppu-lv2-g++\\\",\\nar         = \\\"ppu-lv2-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\n},\\nWiiDev = {\\ncppflags    = \\\"-MMD -MP -I$(LIBOGC_INC) $(MACHDEP)\\\",\\nldflags= \\\"-L$(LIBOGC_LIB) $(MACHDEP)\\\",\\ncfgsettings = [[\\n  ifeq ($(strip $(DEVKITPPC)),)\\n    $(error \\\"DEVKITPPC environment variable is not set\\\")'\\n  endif\\n  include $(DEVKITPPC)/wii_rules']],\\n},\\nOrbis = {\\ncc         = \\\"orbis-clang\\\",\\ncxx        = \\\"orbis-clang++\\\",\\nar \"\n-\t\"        = \\\"orbis-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\n},\\nEmscripten = {\\ncc         = \\\"$(EMSCRIPTEN)/emcc\\\",\\ncxx        = \\\"$(EMSCRIPTEN)/em++\\\",\\nar         = \\\"$(EMSCRIPTEN)/emar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\n},\\nNX32 = {\\ncc         = \\\"clang\\\",\\ncxx        = \\\"clang++\\\",\\nar         = \\\"armv7l-nintendo-nx-eabihf-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\nflags      = \\\"-march=armv7l\\\",\\n},\\nNX64 = {\\ncc         = \\\"clang\\\",\\ncxx        = \\\"clang++\\\",\\nar         = \\\"aarch64-nintendo-nx-elf-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\nflags      = \\\"-march=aarch64\\\",\\n},\\n}\\nlocal platforms = premake.gcc.platforms\\nfunction premake.gcc.getcppflags(cfg)\\nlocal flags = { }\\ntable.insert(flags, platforms[cfg.platform].cppflags)\\nif flags[1]:startswith(\\\"-MMD\\\") then\\ntable.insert(flags, \\\"-MP\\\")\\nend\\nreturn flags\\nend\\nfunction premake.gcc.getcflags(cfg)\\nlocal result = table.translate(cfg.flags, cflags)\\ntable.insert(result, platforms[cfg.platform].flags)\\nif cfg.system ~= \\\"windows\\\" and cfg.kind == \\\"SharedLib\\\" then\\nt\"\n+\t\"gcc.platforms =\\n{\\nNative = {\\ncppflags = \\\"-MMD -MP\\\",\\n},\\nx32 = {\\ncppflags = \\\"-MMD -MP\\\"\\n},\\nx64 = {\\ncppflags = \\\"-MMD -MP\\\"\\n},\\nUniversal = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch i386 -arch x86_64 -arch ppc -arch ppc64\\\",\\n},\\nUniversal32 = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch i386 -arch ppc\\\",\\n},\\nUniversal64 = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch x86_64 -arch ppc64\\\",\\n},\\nPS3 = {\\ncc         = \\\"ppu-lv2-g++\\\",\\ncxx        = \\\"ppu-lv2-g++\\\",\\nar         = \\\"ppu-lv2-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\n},\\nWiiDev = {\\ncppflags    = \\\"-MMD -MP -I$(LIBOGC_INC) $(MACHDEP)\\\",\\nldflags= \\\"-L$(LIBOGC_LIB) $(MACHDEP)\\\",\\ncfgsettings = [[\\n  ifeq ($(strip $(DEVKITPPC)),)\\n    $(error \\\"DEVKITPPC environment variable is not set\\\")'\\n  endif\\n  include $(DEVKITPPC)/wii_rules']],\\n},\\nOrbis = {\\ncc         = \\\"orbis-clang\\\",\\ncxx        = \\\"orbis-clang++\\\",\\nar         = \\\"orbis-ar\\\",\\ncppflag   = \\\"-MMD -MP\\\",\\n},\\nEmscripten = {\\ncc         = \\\"$(EMSCRIPTEN)/emcc\\\",\\ncxx        = \\\"$(EMSCRIPTEN)/em++\\\",\\nar         = \\\"$(EMSCRIPTEN)/emar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\n},\\nNX32 = {\\ncc         = \\\"clang\\\",\\ncxx        = \\\"clang++\\\",\\nar         = \\\"armv7l-nintendo-nx-eabihf-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\nflags      = \\\"-march=armv7l\\\",\\n},\\nNX64 = {\\ncc         = \\\"clang\\\",\\ncxx        = \\\"clang++\\\",\\nar         = \\\"aarch64-nintendo-nx-elf-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\nflags      = \\\"-march=aarch64\\\",\\n},\\n}\\nlocal platforms = premake.gcc.platforms\\nfunction premake.gcc.getcppflags(cfg)\\nlocal flags = { }\\ntable.insert(flags, platforms[cfg.platform].cppflags)\\nif flags[1]:startswith(\\\"-MMD\\\") then\\ntable.insert(flags, \\\"-MP\\\")\\nend\\nreturn flags\\nend\\nfunction premake.gcc.getcflags(cfg)\\nlocal result = table.translate(cfg.flags, cflags)\\ntable.insert(result, platforms[cfg.platform].flags)\\nif cfg.system ~= \\\"windows\\\" and cfg.kind == \\\"SharedLib\\\" then\\nt\"\n \t\"able.insert(result, \\\"-fPIC\\\")\\nend\\nreturn result\\nend\\nfunction premake.gcc.getcxxflags(cfg)\\nlocal result = table.translate(cfg.flags, cxxflags)\\nreturn result\\nend\\nfunction premake.gcc.getobjcflags(cfg)\\nreturn table.translate(cfg.flags, objcflags)\\nend\\nfunction premake.gcc.getldflags(cfg)\\nlocal result = { }\\nif not cfg.flags.Symbols then\\nif cfg.system == \\\"macosx\\\" then\\nelse\\ntable.insert(result, \\\"-s\\\")\\nend\\nend\\nif cfg.kind == \\\"Bundle\\\" then\\ntable.insert(result, \\\"-bundle\\\")\\nend\\nif cfg.kind == \\\"SharedLib\\\" then\\nif cfg.system == \\\"macosx\\\" then\\ntable.insert(result, \\\"-dynamiclib\\\")\\nelse\\ntable.insert(result, \\\"-shared\\\")\\nend\\nif cfg.system == \\\"windows\\\" and not cfg.flags.NoImportLib then\\ntable.insert(result, '-Wl,--out-implib=\\\"' .. cfg.linktarget.fullpath .. '\\\"')\\nend\\nend\\nif cfg.kind == \\\"WindowedApp\\\" and cfg.system == \\\"windows\\\" then\\ntable.insert(result, \\\"-mwindows\\\")\\nend\\nlocal platform = platforms[cfg.platform]\\ntable.insert(result, platform.flags)\\ntable.insert(result, platf\"\n \t\"orm.ldflags)\\nreturn result\\nend\\nfunction premake.gcc.getlibdirflags(cfg)\\nlocal result = { }\\nfor _, value in ipairs(premake.getlinks(cfg, \\\"all\\\", \\\"directory\\\")) do\\ntable.insert(result, '-L\\\\\\\"' .. value .. '\\\\\\\"')\\nend\\nreturn result\\nend\\nfunction premake.gcc.islibfile(p)\\nif path.getextension(p) == \\\".a\\\" then\\nreturn true\\nend\\nreturn false\\nend\\nfunction premake.gcc.getlibfiles(cfg)\\nlocal result = {}\\nfor _, value in ipairs(premake.getlinks(cfg, \\\"system\\\", \\\"fullpath\\\")) do\\nif premake.gcc.islibfile(value) then\\ntable.insert(result, _MAKE.esc(value))\\nend\\nend\\nreturn result\\nend\\nfunction premake.gcc.getlinkflags(cfg)\\nlocal result = {}\\nfor _, value in ipairs(premake.getlinks(cfg, \\\"system\\\", \\\"fullpath\\\")) do\\nif premake.gcc.islibfile(value) then\\nvalue = path.rebase(value, cfg.project.location, cfg.location)\\ntable.insert(result, _MAKE.esc(value))\\nelseif path.getextension(value) == \\\".framework\\\" then\\ntable.insert(result, '-framework ' .. _MAKE.esc(path.getbasename(value)))\\nelse\\ntable.inser\"\n \t\"t(result, '-l' .. _MAKE.esc(path.getname(value)))\\nend\\nend\\nreturn result\\nend\\nfunction premake.gcc.wholearchive(lib)\\nif premake.gcc.llvm then\\nreturn {\\\"-force_load\\\", lib}\\nelseif os.get() == \\\"macosx\\\" then\\nreturn {\\\"-Wl,-force_load\\\", lib}\\nelse\\nreturn {\\\"-Wl,--whole-archive\\\", lib, \\\"-Wl,--no-whole-archive\\\"}\\nend\\nend\\nfunction premake.gcc.getarchiveflags(prj, cfg, ndx)\\nlocal result = {}\\nif cfg.platform:startswith(\\\"Universal\\\") then\\nif prj.options.ArchiveSplit then\\nerror(\\\"gcc tool 'Universal*' platforms do not support split archives\\\")\\nend\\ntable.insert(result, '-o')\\nelse\\nif (not prj.options.ArchiveSplit) then\\nif premake.gcc.llvm then\\ntable.insert(result, 'rcs')\\nelse\\ntable.insert(result, '-rcs')\\nend\\nelse\\nif premake.gcc.llvm then\\nif (not ndx) then\\ntable.insert(result, 'qc')\\nelse\\ntable.insert(result, 'cs')\\nend\\nelse\\nif (not ndx) then\\ntable.insert(result, '-qc')\\nelse\\ntable.insert(result, '-cs')\\nend\\nend\\nend\\nend\\nreturn result\\nend\\nfunction premake.gcc.getdefines(defines)\\nl\"\n"
  },
  {
    "path": "packages/sx05re/libretro/mame/patches/mame-remove-bgfx.patch",
    "content": "diff --git a/Makefile.libretro b/Makefile.libretro\nindex 31c414be..8de62064 100644\n--- a/Makefile.libretro\n+++ b/Makefile.libretro\n@@ -55,6 +55,8 @@ VERBOSE ?= 1\n # scripts/toolchain.lua)\n # PTR64 = 1\n \n+USE_BGFX ?= 0\n+\n ###########################################################################\n #\n #   LIBRETRO PLATFORM GUESSING\ndiff --git a/scripts/genie.lua b/scripts/genie.lua\nindex 4655b3f4..495308a8 100644\n--- a/scripts/genie.lua\n+++ b/scripts/genie.lua\n@@ -387,8 +387,22 @@ newoption {\n \tdescription = \"Arguments for running debug build.\",\n }\n \n+newoption {\n+\ttrigger = \"USE_BGFX\",\n+\tdescription = \"Use bgfx.\",\n+\tallowed = {\n+\t\t{ \"0\",   \"Disabled\"     },\n+\t\t{ \"1\",   \"Enabled\"      },\n+\t}\n+}\n+\n dofile (\"extlib.lua\")\n \n+if not _OPTIONS[\"USE_BGFX\"] then\n+\t_OPTIONS[\"USE_BGFX\"] = \"0\"\n+end\n+\n+\n if _OPTIONS[\"SHLIB\"]==\"1\" then\n \tLIBTYPE = \"SharedLib\"\n else\n"
  },
  {
    "path": "packages/sx05re/libretro/mame/patches/mame-workaround-for-arm-cross-compilation.patch",
    "content": "diff --git a/3rdparty/bgfx/src/renderer_gl.h b/3rdparty/bgfx/src/renderer_gl.h\nindex d52efc76..9f5b2022 100644\n--- a/3rdparty/bgfx/src/renderer_gl.h\n+++ b/3rdparty/bgfx/src/renderer_gl.h\n@@ -12,10 +12,12 @@\n \t|| BX_PLATFORM_LINUX                                                                    \\\n \t|| BX_PLATFORM_NX                                                                       \\\n \t|| BX_PLATFORM_RPI                                                                      \\\n+\t|| BX_PLATFORM_LINUX_NO_GL                       \t\t\t\t\t  \\\n \t) )\n \n #define BGFX_USE_HTML5 (BGFX_CONFIG_RENDERER_OPENGLES && (0 \\\n \t|| BX_PLATFORM_EMSCRIPTEN                               \\\n+\t|| BX_PLATFORM_LINUX_NO_GL \t\t\t\t\\\n \t) )\n \n #define BGFX_USE_WGL (BGFX_CONFIG_RENDERER_OPENGL && (0 \\\ndiff --git a/3rdparty/bx/include/bx/platform.h b/3rdparty/bx/include/bx/platform.h\nindex eea5fcb0..f57a3a79 100644\n--- a/3rdparty/bx/include/bx/platform.h\n+++ b/3rdparty/bx/include/bx/platform.h\n@@ -60,6 +60,7 @@\n #define BX_PLATFORM_WINDOWS    0\n #define BX_PLATFORM_WINRT      0\n #define BX_PLATFORM_XBOXONE    0\n+#define BX_PLATFORM_LINUX_NO_GL 0\n \n // http://sourceforge.net/apps/mediawiki/predef/index.php?title=Compilers\n #if defined(__clang__)\n@@ -221,6 +222,13 @@\n #\tdefine BX_PLATFORM_HAIKU 1\n #endif //\n \n+#if BX_CPU_ARM\n+#   undef  BX_PLATFORM_LINUX\n+#   define BX_PLATFORM_LINUX 0\n+#   undef  BX_PLATFORM_LINUX_NO_GL\n+#   define BX_PLATFORM_LINUX_NO_GL 1\n+#endif\n+\n #if !BX_CRT_NONE\n // https://sourceforge.net/p/predef/wiki/Libraries/\n #\tif defined(__BIONIC__)\n@@ -269,6 +277,7 @@\n \t||  BX_PLATFORM_OSX        \\\n \t||  BX_PLATFORM_PS4        \\\n \t||  BX_PLATFORM_RPI        \\\n+\t||  BX_PLATFORM_LINUX_NO_GL \\\n \t)\n \n ///\n@@ -287,6 +296,7 @@\n \t||  BX_PLATFORM_WINDOWS    \\\n \t||  BX_PLATFORM_WINRT      \\\n \t||  BX_PLATFORM_XBOXONE    \\\n+\t||  BX_PLATFORM_LINUX_NO_GL \\\n \t)\n \n ///\n@@ -388,6 +398,8 @@\n #\tdefine BX_PLATFORM_NAME \"WinRT\"\n #elif BX_PLATFORM_XBOXONE\n #\tdefine BX_PLATFORM_NAME \"Xbox One\"\n+#elif BX_PLATFORM_LINUX_NO_GL\n+#\tdefine BX_PLATFORM_NAME \"Linux (GLES)\"\n #else\n #\terror \"Unknown BX_PLATFORM!\"\n #endif // BX_PLATFORM_\ndiff --git a/3rdparty/bx/src/os.cpp b/3rdparty/bx/src/os.cpp\nindex 12586aa8..ae2836ad 100644\n--- a/3rdparty/bx/src/os.cpp\n+++ b/3rdparty/bx/src/os.cpp\n@@ -45,7 +46,8 @@\n #\tif BX_PLATFORM_ANDROID\n #\t\tinclude <malloc.h> // mallinfo\n #\telif   BX_PLATFORM_LINUX     \\\n-\t\t|| BX_PLATFORM_RPI\n+\t\t|| BX_PLATFORM_RPI       \\\n+\t\t|| BX_PLATFORM_LINUX_NO_GL\n #\t\tinclude <stdio.h>  // fopen\n #\t\tinclude <unistd.h> // syscall\n #\t\tinclude <sys/syscall.h>\n@@ -98,7 +100,8 @@ namespace bx\n #if BX_PLATFORM_WINDOWS\n \t\treturn ::GetCurrentThreadId();\n #elif  BX_PLATFORM_LINUX \\\n-\t|| BX_PLATFORM_RPI\n+\t|| BX_PLATFORM_RPI\t \\\n+\t|| BX_PLATFORM_LINUX_NO_GL\n \t\treturn (pid_t)::syscall(SYS_gettid);\n #elif  BX_PLATFORM_IOS \\\n \t|| BX_PLATFORM_OSX\n@@ -119,7 +122,8 @@ namespace bx\n \t\tstruct mallinfo mi = mallinfo();\n \t\treturn mi.uordblks;\n #elif  BX_PLATFORM_LINUX \\\n-\t|| BX_PLATFORM_HURD\n+\t|| BX_PLATFORM_HURD\t \\\n+\t|| BX_PLATFORM_LINUX_NO_GL\n \t\tFILE* file = fopen(\"/proc/self/statm\", \"r\");\n \t\tif (NULL == file)\n \t\t{\n@@ -312,7 +316,8 @@ namespace bx\n \tvoid* exec(const char* const* _argv)\n \t{\n #if BX_PLATFORM_LINUX \\\n- || BX_PLATFORM_HURD\n+ || BX_PLATFORM_HURD  \\\n+ || BX_PLATFORM_LINUX_NO_GL\n \t\tpid_t pid = fork();\n \n \t\tif (0 == pid)\n"
  },
  {
    "path": "packages/sx05re/libretro/mame/patches/neww.patch",
    "content": "--- a/scripts/toolchain.lua\t2025-04-26 06:49:26.434764500 +0200\n+++ b/scripts/toolchain.lua\t2025-04-26 06:50:20.330044973 +0200\n@@ -335,9 +335,6 @@\n \n \tconfiguration { \"linux-gcc\", \"x32\" }\n \t\tobjdir (_buildDir .. \"linux_gcc\" .. \"/obj\")\n-\t\tbuildoptions {\n-\t\t\t\"-m32\",\n-\t\t}\n \n \tconfiguration { \"linux-gcc\", \"x32\", \"Release\" }\n \t\ttargetdir (_buildDir .. \"linux_gcc\" .. \"/bin/x32/Release\")\n@@ -347,9 +344,6 @@\n \n \tconfiguration { \"linux-gcc\", \"x64\" }\n \t\tobjdir (_buildDir .. \"linux_gcc\" .. \"/obj\")\n-\t\tbuildoptions {\n-\t\t\t\"-m64\",\n-\t\t}\n \n \tconfiguration { \"linux-gcc\", \"x64\", \"Release\" }\n \t\ttargetdir (_buildDir .. \"linux_gcc\" .. \"/bin/x64/Release\")\n"
  },
  {
    "path": "packages/sx05re/libretro/mame/patches/thread-patch",
    "content": "--- a/3rdparty/bx/src/thread.cpp\t2023-08-19 07:51:14.246942500 +0200\n+++ b/3rdparty/bx/src/thread.cpp\t2023-08-19 07:59:28.740042068 +0200\n@@ -22,12 +22,14 @@\n \t|| BX_PLATFORM_OSX     \\\n \t|| BX_PLATFORM_PS4     \\\n \t|| BX_PLATFORM_RPI     \\\n-\t|| BX_PLATFORM_NX\n+\t|| BX_PLATFORM_NX      \\\n+\t|| BX_PLATFORM_LINUX_NO_GL\n #\tinclude <pthread.h>\n #\tif BX_PLATFORM_BSD\n #\t\tinclude <pthread_np.h>\n #\tendif // BX_PLATFORM_BSD\n-#\tif BX_PLATFORM_LINUX && (BX_CRT_GLIBC < 21200)\n+#\tif BX_PLATFORM_LINUX \\\n+\t|| BX_PLATFORM_LINUX_NO_GL && (BX_CRT_GLIBC < 21200)\n #\t\tinclude <sys/prctl.h>\n #\tendif // BX_PLATFORM_\n #elif  BX_PLATFORM_WINDOWS \\\n@@ -252,7 +254,8 @@\n \t\tpthread_setname_np(_name);\n #elif (BX_CRT_GLIBC >= 21200) && ! BX_PLATFORM_HURD\n \t\tpthread_setname_np(ti->m_handle, _name);\n-#elif BX_PLATFORM_LINUX\n+#elif BX_PLATFORM_LINUX \\\n+\t|| BX_PLATFORM_LINUX_NO_GL\n \t\tprctl(PR_SET_NAME,_name, 0, 0, 0);\n #elif BX_PLATFORM_BSD\n #\tif defined(__NetBSD__)\n"
  },
  {
    "path": "packages/sx05re/libretro/mame/scripts/mame.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present Héctor C.M. (github.com/kelvfimer)\n\nif [ ! -f \"/storage/roms/bios/mame/hash/fmtowns_cd.xml\" ]; then\n    mkdir -p /storage/roms/bios/mame/hash\n    cp -rf \"/usr/config/emuelec/configs/mame/hash/\"fm* \"/storage/roms/bios/mame/hash\"\nfi\n\nif [ ! -f \"/storage/roms/bios/mame/hash/apple2_flop_orig.xml\" ]; then\n    mkdir -p /storage/roms/bios/mame/hash\n    cp -rf \"/usr/config/emuelec/configs/mame/hash/\"app* \"/storage/roms/bios/mame/hash\"\nfi\n\nif [ ! -f \"/storage/roms/bios/mame/ini/fmtownsux.ini\" ]; then\n    mkdir -p /storage/roms/bios/mame/ini\n    cp -rf \"/usr/config/emuelec/configs/mame/ini/\"fm* \"/storage/roms/bios/mame/ini\"\nfi\n\nif [ ! -f \"/storage/roms/bios/mame/ini/mame.ini\" ]; then\n    mkdir -p /storage/roms/bios/mame/ini\n    cp -rf \"/usr/config/emuelec/configs/mame/ini/\"mame* \"/storage/roms/bios/mame/ini\"\nfi\n\nif [ ! -f \"/storage/.config/retroarch/config/MAME/MAME.opt\" ]; then\n    mkdir -p /storage/.config/retroarch/config/MAME\n    cp -rf \"/usr/config/emuelec/configs/mame/MAME/\"MAME* \"/storage/.config/retroarch/config/MAME\"\nfi\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2000/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"mame2000\"\nPKG_VERSION=\"2ec60f6e1078cf9ba173e80432cc28fd4eea200f\"\nPKG_SHA256=\"e9e39e0153970729a2b81898af140749118db56be2920600bcff29fe13c59658\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MAME\"\nPKG_SITE=\"https://github.com/libretro/mame2000-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"MAME - Multiple Arcade Machine Emulator\"\nPKG_LONGDESC=\"MAME - Multiple Arcade Machine Emulator\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    make ARM=1 USE_CYCLONE=1 USE_DRZ80=1\n  else\n    make\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mame2000_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2003/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"mame2003\"\nPKG_VERSION=\"3570605767a447c13b087a5946189bcbafe11e1d\"\nPKG_SHA256=\"0c0518ae3dbea9479353c0f11b3a674113f6064923d5383e9055e28de88d555f\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MAME\"\nPKG_SITE=\"https://github.com/libretro/mame2003-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"MAME - Multiple Arcade Machine Emulator\"\nPKG_LONGDESC=\"MAME - Multiple Arcade Machine Emulator\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make ARCH=\"\" CC=\"${CC}\" NATIVE_CC=\"${CC}\" LD=\"${CC}\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mame2003_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2003-midway/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"mame2003-midway\"\nPKG_VERSION=\"3a47c3d8b44d3ced80a8b4907cc7bc75d9a738fd\"\nPKG_SHA256=\"2e9154db99675190e1d3b685b738627e3116fbcfe4f590a4a071d5bd1a935c09\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MAME\"\nPKG_SITE=\"https://github.com/libretro/mame2003_midway\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"MAME - Multiple Arcade Machine Emulator\"\nPKG_LONGDESC=\"MAME - Multiple Arcade Machine Emulator\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\nPKG_BUILD_FLAGS=\"-lto\"\n\nmake_target() {\n  make ARCH=\"\" CC=\"${CC}\" NATIVE_CC=\"${CC}\" LD=\"${CC}\" -j 1\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mame2003_midway_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2003-plus/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"mame2003-plus\"\nPKG_VERSION=\"870e8ba3fa4e6635e2eb9d85c939589498659c32\"\nPKG_SHA256=\"1240e641302ec7941d4879c88e162afae3a7347b67e8b0f2c826f70b23ea5166\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MAME\"\nPKG_SITE=\"https://github.com/libretro/mame2003-plus-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"MAME - Multiple Arcade Machine Emulator\"\nPKG_LONGDESC=\"MAME - Multiple Arcade Machine Emulator\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make ARCH=\"\" CC=\"${CC}\" NATIVE_CC=\"${CC}\" LD=\"${CC}\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mame2003_plus_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2003-xtreme/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"mame2003-xtreme\"\nPKG_VERSION=\"9382b943f6a8a197d9fc8bd136d2c4a252c39b54\"\nPKG_SHA256=\"5fd17a0061166a91128364fe3b31144a1015132ef77b530aeb56734c6c0dd587\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MAME\"\nPKG_SITE=\"https://github.com/KMFDManic/mame2003-xtreme\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Updated 2018 version of MAME (0.78) for libretro, with added game support, and optimized for performance and speed on the Mini Classics. \"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n  export SYSROOT_PREFIX=${SYSROOT_PREFIX}\n\n  case ${DEVICE} in\n    Amlogic-ng|Amlogic-no|Amlogic-ogu)\n        PKG_MAKE_OPTS_TARGET+=\" platform=AMLG12B\"\n      ;;\n    Amlogic-old)\n        PKG_MAKE_OPTS_TARGET+=\" platform=AMLGX\"\n      ;;\n  esac\n  PKG_MAKE_OPTS_TARGET+=\" ARCH=\\\"\\\" CC=\\\"${CC}\\\" NATIVE_CC=\\\"${CC}\\\" LD=\\\"${CC}\\\"\"\n  \n  # PKG_MAKE_OPTS_TARGET=\" platform=rpi2 ARCH=\\\"\\\" CC=\\\"${CC}\\\" NATIVE_CC=\\\"${CC}\\\" LD=\\\"${CC}\\\"\"\n  \n }\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mame2003_libretro.so ${INSTALL}/usr/lib/libretro/km_mame2003_xtreme_libretro.so\n  cp km_mame2003_xtreme_libretro.info ${INSTALL}/usr/lib/libretro/km_mame2003_xtreme_libretro.info\n  \n}\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2003-xtreme/sources/km_mame2003_xtreme_libretro.info",
    "content": "display_name = \"Arcade (km_MAME 2003 Xtreme)\"\nauthors = \"MAMEdev\"\nsupported_extensions = \"zip\"\ncorename = \"MAME 2003 Xtreme (0.78)\"\nmanufacturer = \"Various\"\ncategories = \"Emulator\"\nsystemname = \"Arcade (various)\"\nsystemid = \"mame\"\ndatabase = \"MAME 2003\"\nlicense = \"MAME\"\npermissions = \"\"\ndisplay_version = \"0.78\"\nsupports_no_game = \"false\"\nnotes = \"(!) The BIOS files must be inside the ROM directory.|\"\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2010/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"mame2010\"\nPKG_VERSION=\"c5b413b71e0a290c57fc351562cd47ba75bac105\"\nPKG_SHA256=\"38270732ef2b503583e96a3c83cd5ba8d4ca6510d1f24f2b00bf6703eb74070d\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MAME\"\nPKG_SITE=\"https://github.com/libretro/mame2010-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Late 2010 version of MAME (0.139) for libretro. Compatible with MAME 0.139 romsets.\"\nPKG_LONGDESC=\"Late 2010 version of MAME (0.139) for libretro. Compatible with MAME 0.139 romsets.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    make CC=\"${CC}\" LD=\"${CC}\" PLATCFLAGS=\"${CFLAGS}\" PTR64=0 ARM_ENABLED=1 LCPU=arm\n  elif [ \"${ARCH}\" == \"i386\" ]; then\n    make CC=\"${CC}\" LD=\"${CC}\" PLATCFLAGS=\"${CFLAGS}\" PTR64=0 ARM_ENABLED=0 LCPU=x86\n  elif [ \"${ARCH}\" == \"x86_64\" ]; then\n    make CC=\"${CC}\" LD=\"${CC}\" PLATCFLAGS=\"${CFLAGS}\" PTR64=1 ARM_ENABLED=0 LCPU=x86_64\n  elif [ \"${ARCH}\" == \"aarch64\" ]; then\n\tmake CC=\"${CC}\" LD=\"${CC}\" PLATCFLAGS=\"${CFLAGS}\" PTR64=1 ARM_ENABLED=1 LCPU=arm64 maketree\n    make CC=\"${CC}\" LD=\"${CC}\" PLATCFLAGS=\"${CFLAGS}\" PTR64=1 ARM_ENABLED=1 LCPU=arm64\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mame2010_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2010/patches/libretro-mame2010-0001_fix-cross-build.patch",
    "content": "diff --git a/Makefile b/Makefile\nindex 65ece36..bd7d670 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -61,7 +61,7 @@ COBJFLAGS =\n CPPONLYFLAGS =\r\n # LDFLAGS are used generally; LDFLAGSEMULATOR are additional\r\n # flags only used when linking the core emulator\r\n-LDFLAGS =\r\n+LDFLAGS ?=\r\n LDFLAGSEMULATOR =\r\n \r\n GIT_VERSION ?= \" $(shell git rev-parse --short HEAD || echo unknown)\"\r\n@@ -104,27 +104,25 @@ ifeq ($(VRENDER),opengl)\n \tCCOMFLAGS  += -DHAVE_OPENGL\r\n endif\r\n \r\n-UNAME=$(shell uname -m)\r\n-\r\n-ifeq ($(firstword $(filter x86_64,$(UNAME))),x86_64)\r\n+ifeq ($(firstword $(filter x86_64,$(ARCH))),x86_64)\r\n PTR64 ?= 1\r\n endif\r\n-ifeq ($(firstword $(filter amd64,$(UNAME))),amd64)\r\n+ifeq ($(firstword $(filter amd64,$(ARCH))),amd64)\r\n PTR64 ?= 1\r\n endif\r\n-ifeq ($(firstword $(filter ppc64,$(UNAME))),ppc64)\r\n+ifeq ($(firstword $(filter ppc64,$(ARCH))),ppc64)\r\n PTR64 ?= 1\r\n endif\r\n ifneq (,$(findstring mingw64-w64,$(PATH)))\r\n PTR64 ?= 1\r\n endif\r\n-ifeq ($(firstword $(filter arm64,$(UNAME))),arm64)\r\n+ifeq ($(firstword $(filter arm64,$(ARCH))),arm64)\r\n PTR64 ?= 1\r\n endif\r\n-ifneq (,$(findstring Power,$(UNAME)))\r\n+ifneq (,$(findstring Power,$(ARCH)))\r\n BIGENDIAN=1\r\n endif\r\n-ifneq (,$(findstring ppc,$(UNAME)))\r\n+ifneq (,$(findstring ppc,$(ARCH)))\r\n BIGENDIAN=1\r\n endif\r\n \r\n@@ -146,14 +144,10 @@ ifeq ($(VRENDER),opengl)\n    LIBS += -lGL\r\n endif\r\n LDFLAGS += $(SHARED)\r\n-   NATIVELD = g++\r\n-   NATIVELDFLAGS = -Wl,--warn-common -lstdc++\r\n-   NATIVECC = g++\r\n-   NATIVECFLAGS = -std=gnu99\r\n-   CC_AS = gcc \r\n-   CC = g++\r\n-   AR = @ar\r\n-   LD = g++ \r\n+   CC_AS ?= $(CC)\r\n+   CC ?= g++\r\n+   AR ?= @ar\r\n+   LD ?= g++\r\n    CCOMFLAGS += $(PLATCFLAGS) -ffast-math  \r\n    LIBS += -lstdc++ -lpthread \r\n \r\n@@ -462,10 +456,13 @@ else ifneq (,$(findstring rpi,$(platform)))\n \r\n # ARM\r\n else ifneq (,$(findstring armv,$(platform)))\r\n+   ARM_ENABLED = 1\r\n+   EXTRA_RULES = 1\r\n    TARGETLIB := $(TARGET_NAME)_libretro.so\r\n-   SHARED := -shared -Wl,--no-undefined\r\n+   SHARED := -shared -Wl,--version-script=src/osd/retro/link.T\r\n+   LDFLAGS += $(SHARED)\r\n    fpic = -fPIC\r\n-   CC = g++\r\n+   CC ?= g++\r\n    LDFLAGS +=  $(SHARED)\r\n    ARM_ENABLED = 1\r\n    X86_SH2DRC = 0\r\n@@ -683,7 +680,7 @@ DEFS += -DFLAC__NO_DLL\n \r\n # CFLAGS is defined based on C or C++ targets\r\n # (remember, expansion only happens when used, so doing it here is ok)\r\n-CFLAGS = $(CCOMFLAGS) $(CPPONLYFLAGS)\r\n+CFLAGS += $(CCOMFLAGS) $(CPPONLYFLAGS)\r\n \r\n # we compile C-only to C89 standard with GNU extensions\r\n # we compile C++ code to C++98 standard with GNU extensions\r\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2010/patches/libretro-mame2010-0002_fix-cheats.patch",
    "content": "From 96e7ce0bcd1d0ae84a9974f7fd7c18e37da9c449 Mon Sep 17 00:00:00 2001\nFrom: RussellKR <46307397+RussellKR@users.noreply.github.com>\nDate: Sat, 1 Jul 2023 03:03:33 +1000\nSubject: [PATCH 1/8] Update README.md\n\n---\n README.md | 10 +++++++---\n 1 file changed, 7 insertions(+), 3 deletions(-)\n\ndiff --git a/src/osd/retro/retromain.c b/src/osd/retro/retromain.c\nindex c89edd5c..3f2c0e8d 100755\n--- a/src/osd/retro/retromain.c\n+++ b/src/osd/retro/retromain.c\n@@ -63,6 +63,7 @@ static int mouse_mode = 1;\n static bool videoapproach1_enable = false;\n bool hide_nagscreen = false;\n bool hide_gameinfo = false;\n+bool cheat_enable = false;\n bool hide_warnings = false;\n \n static void update_geometry();\n@@ -226,6 +227,10 @@ void retro_init (void)\n     path_mkdir(libretro_save_directory);\n  \n     // content loaded from mame2010 subfolder within the libretro system folder\n+    snprintf(cheatpath, sizeof(cheatpath), \"%s%s%s\", libretro_system_directory, path_default_slash(), \"cheat\");\n+    path_mkdir(cheatpath);\n+    snprintf(inipath, sizeof(inipath), \"%s%s%s\", libretro_system_directory, path_default_slash(), \"ini\");\n+    path_mkdir(inipath);\n     snprintf(samplepath, sizeof(samplepath), \"%s%s%s\", libretro_system_directory, path_default_slash(), \"samples\");\n     path_mkdir(samplepath);\n     snprintf(artpath, sizeof(artpath), \"%s%s%s\", libretro_system_directory, path_default_slash(), \"artwork\");\n@@ -236,10 +241,12 @@ void retro_init (void)\n     path_mkdir(crosshairpath);\n \n     // user-generated content loaded from mame2010 subfolder within the libretro save folder\n-    snprintf(ctrlrpath, sizeof(ctrlrpath), \"%s%s%s\", libretro_save_directory, path_default_slash(), \"ctrlr\");\n-    path_mkdir(ctrlrpath);\n+    snprintf(cheatpath, sizeof(cheatpath), \"%s%s%s\", libretro_save_directory, path_default_slash(), \"cheat\");\n+    path_mkdir(cheatpath);\n     snprintf(inipath, sizeof(inipath), \"%s%s%s\", libretro_save_directory, path_default_slash(), \"ini\");\n     path_mkdir(inipath);\n+    snprintf(ctrlrpath, sizeof(ctrlrpath), \"%s%s%s\", libretro_save_directory, path_default_slash(), \"ctrlr\");\n+    path_mkdir(ctrlrpath);\n     snprintf(cfg_directory, sizeof(cfg_directory), \"%s%s%s\", libretro_save_directory, path_default_slash(), \"cfg\");\n     path_mkdir(cfg_directory);\n     snprintf(nvram_directory, sizeof(nvram_directory), \"%s%s%s\", libretro_save_directory, path_default_slash(), \"nvram\");\n@@ -589,6 +596,7 @@ void retro_set_environment(retro_environment_t cb)\n       //Shell for CPU overclock setting. Search mame_current_overclock for other pieces\n       //{ \"mame_current_overclock\", \"Main CPU Overclock; 100|25|30|35|40|45|50|55|60|65|70|75|80|95|90|95|105|110|115|120\" },\n       { \"mame_current_videoapproach1_enable\", \"Video approach 1 Enabled; disabled|enabled\" },\n+      { \"mame_current_cheat\", \"Cheat enable; disabled|enabled\" },\n       { \"mame_current_skip_nagscreen\", \"Hide nag screen; enabled|disabled\" },\n       { \"mame_current_skip_gameinfo\", \"Hide game info screen; disabled|enabled\" },\n       { \"mame_current_skip_warnings\", \"Hide warning screen; disabled|enabled\" },\n@@ -659,6 +667,17 @@ static void check_variables(void)\n       if (!strcmp(var.value, \"enabled\"))\n          hide_gameinfo = true;\n    }\n+   \n+   var.key = \"mame_current_cheat\";\n+   var.value = NULL;\n+   if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)\n+   {\n+      retro_log(RETRO_LOG_INFO, \"[MAME 2010] cheat_enable value: %s\\n\", var.value);\n+      if (!strcmp(var.value, \"disabled\"))\n+         cheat_enable = false;\n+      if (!strcmp(var.value, \"enabled\"))\n+         cheat_enable = true;\n+   }\n \n    var.key = \"mame_current_skip_warnings\";\n    var.value = NULL;\n@@ -1943,7 +1962,7 @@ int executeGame(char* path) {\n \n \tif (tate) {\n \t\tif (screenRot == 3) {\n-\t\t\txargv[paramCount++] =(char*) \"-rol\";\n+\t\t\txargv[paramCount++] = (char*) \"-rol\";\n \t\t} else {\n \t\t\txargv[paramCount++] = (char*)(screenRot ? \"-mouse\" : \"-ror\");\n \t\t}\n@@ -1956,15 +1975,21 @@ int executeGame(char* path) {\n \t}\n \n \tif(hide_gameinfo) {\n-\t\txargv[paramCount++] =(char*) \"-skip_gameinfo\";\n+\t\txargv[paramCount++] = (char*) \"-skip_gameinfo\";\n+\t}\n+\t\n+\tif(cheat_enable) {\n+\t\txargv[paramCount++] = (char*) \"-cheat\";\n+\t} else {\n+\t\txargv[paramCount++] = (char*) \"-nocheat\";\n \t}\n \n \tif(hide_nagscreen) {\n-\t\txargv[paramCount++] =(char*) \"-skip_nagscreen\";\n+\t\txargv[paramCount++] = (char*) \"-skip_nagscreen\";\n \t}\n \n \tif(hide_warnings) {\n-\t\txargv[paramCount++] =(char*) \"-skip_warnings\";\n+\t\txargv[paramCount++] = (char*) \"-skip_warnings\";\n \t}\n \n \txargv[paramCount++] = MgameName;\n\nFrom 84767238401ffe3844915d3668d22f3c96c6a5b6 Mon Sep 17 00:00:00 2001\nFrom: RussellKR <46307397+RussellKR@users.noreply.github.com>\nDate: Sat, 1 Jul 2023 03:54:22 +1000\nSubject: [PATCH 3/8] Fixed Cheat Enable\n\n---\n src/osd/retro/retromain.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/src/osd/retro/retromain.c b/src/osd/retro/retromain.c\nindex 3f2c0e8d..338bbccc 100755\n--- a/src/osd/retro/retromain.c\n+++ b/src/osd/retro/retromain.c\n@@ -63,8 +63,8 @@ static int mouse_mode = 1;\n static bool videoapproach1_enable = false;\n bool hide_nagscreen = false;\n bool hide_gameinfo = false;\n-bool cheat_enable = false;\n bool hide_warnings = false;\n+bool cheat_enable = false;\n \n static void update_geometry();\n static unsigned int turbo_enable, turbo_state, turbo_delay = 5;\n\nFrom ab65119f992f4fbf7bd5fa5b20f2c5549ae49c7b Mon Sep 17 00:00:00 2001\nFrom: RussellKR <46307397+RussellKR@users.noreply.github.com>\nDate: Sat, 1 Jul 2023 04:06:04 +1000\nSubject: [PATCH 4/8] Update README.md\n\n---\n README.md | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2015/package.mk",
    "content": "################################################################################\n#      This file is part of LibreELEC - http://www.libreelec.tv\n#      Copyright (C) 2016 Team LibreELEC\n#\n#  LibreELEC is free software: you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation, either version 2 of the License, or\n#  (at your option) any later version.\n#\n#  LibreELEC is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with LibreELEC.  If not, see <http://www.gnu.org/licenses/>.\n################################################################################\n\nPKG_NAME=\"mame2015\"\nPKG_VERSION=\"316cd06349f2b34b4719f04f7c0d07569a74c764\"\nPKG_SHA256=\"45c5bda01876545c5a2b39ec700baab43c34ce38ab710e14abe14aae3b33afc4\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/mame2015-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Late 2014/Early 2015 version of MAME (0.160-ish) for libretro. Compatible with MAME 0.160 romsets.\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"-lto\"\n\npre_make_target() {\n  export REALCC=${CC}\n  export CC=${CXX}\n  export LD=${CXX}\n}\n\npre_configure_target() {\n  case ${PROJECT} in\n    RPi|Slice)\n     PKG_MAKE_OPTS_TARGET=\" platform=armv6-hardfloat-arm1176jzf-s\"\n      ;;\n    RPi2|Slice3)\n      PKG_MAKE_OPTS_TARGET=\" platform=armv7-neon-hardfloat-cortex-a7\"\n      ;;\n    imx6)\n     PKG_MAKE_OPTS_TARGET=\" platform=armv7-neon-hardfloat-cortex-a9\"\n      ;;\n    WeTek_Play)\n      PKG_MAKE_OPTS_TARGET=\" platform=armv7-neon-hardfloat-cortex-a9\"\n      ;;\n    Odroid_C2|WeTek_Hub|WeTek_Play_2)\n      PKG_MAKE_OPTS_TARGET=\" platform=armv-neon-hardfloat\"\n      ;;\n    Amlogic*)\n     PKG_MAKE_OPTS_TARGET=\" platform=armv8-neon-hardfloat-cortex-a53\"\n      ;;\n    Generic)\n      PKG_MAKE_OPTS_TARGET=\"\"\n      ;;\n    *)\n      PKG_MAKE_OPTS_TARGET=\" platform=armv\"\n      ;;\n  esac\n  \n  if [ \"${DEVICE}\" == \"Amlogic\"* ]; then \n\tPKG_MAKE_OPTS_TARGET=\" platform=armv8-neon-hardfloat-cortex-a53\"\n  fi\n\n  if [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then \n\tPKG_MAKE_OPTS_TARGET=\" platform=armv8-neon-hardfloat-cortex-a35\"\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mame*_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2016/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019 Trond Haugland (trondah@gmail.com)\n\nPKG_NAME=\"mame2016\"\nPKG_VERSION=\"01058613a0109424c4e7211e49ed83ac950d3993\"\nPKG_SHA256=\"3faaf226279d0c08d2a945a208c43d3851d4b86981b5224231de80098a97ea27\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/mame2016-libretro\"\nPKG_URL=\"https://github.com/libretro/mame2016-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"escalade\"\nPKG_SHORTDESC=\"MAME (0.174-ish) for libretro\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"-lto\"\n\nPTR64=\"0\"\nNOASM=\"0\"\n\nif [ \"${ARCH}\" == \"aarch64\" ]; then\n  NOASM=\"1\"\n  PLAT=arm64\nelif [ \"${ARCH}\" == \"arm\" ]; then\n  NOASM=\"1\"\n  PLAT=${ARCH}\n\nelse\n  PLAT=${ARCH}\nfi\n\nPKG_MAKE_OPTS_TARGET=\"REGENIE=1 \\\n\t\t      VERBOSE=1 \\\n\t\t      NOWERROR=1 \\\n\t\t      OPENMP=1 \\\n\t\t      CROSS_BUILD=1 \\\n\t\t      TOOLS=1 \\\n\t\t      RETRO=1 \\\n\t\t      PTR64=${PTR64} \\\n\t\t      NOASM=${NOASM} \\\n\t\t      PYTHON_EXECUTABLE=python \\\n\t\t      CONFIG=libretro \\\n\t\t      LIBRETRO_OS=unix \\\n\t\t      LIBRETRO_CPU=${PLAT} \\\n\t\t      PLATFORM=${PLAT} \\\n\t\t      ARCH= \\\n\t\t      TARGET=mame \\\n\t\t      SUBTARGET=arcade \\\n\t\t      OSD=retro \\\n\t\t      USE_SYSTEM_LIB_EXPAT=1 \\\n\t\t      USE_SYSTEM_LIB_ZLIB=1 \\\n\t\t      USE_SYSTEM_LIB_FLAC=1 \\\n\t\t      USE_SYSTEM_LIB_SQLITE3=1\"\n\nmake_target() {\n  unset DISTRO\n  make ${PKG_MAKE_OPTS_TARGET} OVERRIDE_CC=${CC} OVERRIDE_CXX=${CXX} OVERRIDE_LD=${LD} AR=${AR} ${MAKEFLAGS}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp *.so ${INSTALL}/usr/lib/libretro/mame2016_libretro.so\n  mkdir -p ${INSTALL}/usr/config/retroarch/savefiles/mame2016/hi\n  cp metadata/hiscore.dat ${INSTALL}/usr/config/retroarch/savefiles/mame2016/hi\n}\n\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2016/patches/57.patch",
    "content": "From 184b3a8eac80fde6b274089017085dda1ef1fdf8 Mon Sep 17 00:00:00 2001\nFrom: StormedBubbles <80055191+StormedBubbles@users.noreply.github.com>\nDate: Mon, 18 Apr 2022 16:48:42 -0400\nSubject: [PATCH 1/2] Fix mouse buttons, add multimouse/lightgun\n\n---\n src/emu/emuopts.cpp             |   2 +-\n src/osd/retro/libretro.cpp      |  15 +-\n src/osd/retro/libretro_shared.h |  11 +-\n src/osd/retro/retromain.cpp     | 240 ++++++++++++++++++++++++--------\n 4 files changed, 202 insertions(+), 66 deletions(-)\n\ndiff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp\nindex 97ca3337555..ed87d8bf216 100644\n--- a/src/emu/emuopts.cpp\n+++ b/src/emu/emuopts.cpp\n@@ -144,7 +144,7 @@ const options_entry emu_options::s_option_entries[] =\n \t{ OPTION_JOYSTICK \";joy\",                            \"1\",         OPTION_BOOLEAN,    \"enable joystick input\" },\n \t{ OPTION_LIGHTGUN \";gun\",                            \"0\",         OPTION_BOOLEAN,    \"enable lightgun input\" },\n \t{ OPTION_MULTIKEYBOARD \";multikey\",                  \"0\",         OPTION_BOOLEAN,    \"enable separate input from each keyboard device (if present)\" },\n-\t{ OPTION_MULTIMOUSE,                                 \"0\",         OPTION_BOOLEAN,    \"enable separate input from each mouse device (if present)\" },\n+\t{ OPTION_MULTIMOUSE,                                 \"1\",         OPTION_BOOLEAN,    \"enable separate input from each mouse device (if present)\" },\n \t{ OPTION_STEADYKEY \";steady\",                        \"0\",         OPTION_BOOLEAN,    \"enable steadykey support\" },\n \t{ OPTION_UI_ACTIVE,                                  \"0\",         OPTION_BOOLEAN,    \"enable user interface on top of emulated keyboard (if present)\" },\n \t{ OPTION_OFFSCREEN_RELOAD \";reload\",                 \"0\",         OPTION_BOOLEAN,    \"convert lightgun button 2 into offscreen reload\" },\ndiff --git a/src/osd/retro/libretro.cpp b/src/osd/retro/libretro.cpp\nindex c3c20d0ff40..4c93480af3f 100755\n--- a/src/osd/retro/libretro.cpp\n+++ b/src/osd/retro/libretro.cpp\n@@ -133,7 +133,7 @@ void retro_set_audio_sample(retro_audio_sample_t cb) { }\n \n void retro_set_environment(retro_environment_t cb)\n {\n-   sprintf(option_mouse, \"%s_%s\", core, \"mouse_enable\");\n+   sprintf(option_mouse, \"%s_%s\", core, \"mouse_mode\");\n    sprintf(option_cheats, \"%s_%s\", core, \"cheats_enable\");\n    sprintf(option_overclock, \"%s_%s\", core, \"cpu_overclock\");\n    sprintf(option_nag, \"%s_%s\",core,\"hide_nagscreen\");\n@@ -162,7 +162,7 @@ void retro_set_environment(retro_environment_t cb)\n     { option_write_config, \"Write configuration; disabled|enabled\" },\n     { option_saves, \"Save state naming; game|system\" },\n     { option_auto_save, \"Auto save/load states; disabled|enabled\" },\n-    { option_mouse, \"Enable in-game mouse; disabled|enabled\" },\n+    { option_mouse, \"XY device (Restart); none|lightgun|mouse\" },\n     { option_throttle, \"Enable throttle; disabled|enabled\" },\n     { option_cheats, \"Enable cheats; disabled|enabled\" },\n     { option_overclock, \"Main CPU Overclock; default|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|60|65|70|75|80|85|90|95|100|105|110|115|120|125|130|135|140|145|150\" },\n@@ -212,10 +212,12 @@ static void check_variables(void)\n \n    if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)\n    {\n-      if (!strcmp(var.value, \"disabled\"))\n-         mouse_enable = false;\n-      if (!strcmp(var.value, \"enabled\"))\n-         mouse_enable = true;\n+      if (!strcmp(var.value, \"none\"))\n+         mouse_mode = 0;\n+      if (!strcmp(var.value, \"mouse\"))\n+         mouse_mode = 1;\n+      if (!strcmp(var.value, \"lightgun\"))\n+         mouse_mode = 2;\n    }\n \n    var.key   = option_throttle;\n@@ -578,6 +580,7 @@ void retro_run (void)\n    input_poll_cb();\n \n    process_mouse_state();\n+   process_lightgun_state();\n    process_keyboard_state();\n    process_joypad_state();\n \ndiff --git a/src/osd/retro/libretro_shared.h b/src/osd/retro/libretro_shared.h\nindex c53f049fc4a..c613656460e 100644\n--- a/src/osd/retro/libretro_shared.h\n+++ b/src/osd/retro/libretro_shared.h\n@@ -30,7 +30,7 @@ extern int retro_pause;\n \n extern bool experimental_cmdline;\n extern bool hide_gameinfo;\n-extern bool mouse_enable;\n+extern int mouse_mode;\n extern bool cheats_enable;\n extern bool alternate_renderer;\n extern bool boot_to_osd_enable;\n@@ -45,9 +45,12 @@ extern bool throttle_enable;\n extern bool auto_save_enable;\n extern bool game_specific_saves_enable;\n \n-extern int mouseLX;\n-extern int mouseLY;\n+extern int mouseLX[4];\n+extern int mouseLY[4];\n extern int mouseBUT[4];\n+extern int lightgunLX[4];\n+extern int lightgunLY[4];\n+extern int lightgunBUT[4];\n \n extern UINT16 retrokbd_state[RETROK_LAST];\n \n@@ -82,6 +85,8 @@ void process_joypad_state(void);\n \n void process_mouse_state(void);\n \n+void process_lightgun_state(void);\n+\n #ifdef __cplusplus\n extern \"C\" {\n #endif\ndiff --git a/src/osd/retro/retromain.cpp b/src/osd/retro/retromain.cpp\nindex 8f499b26027..7f66d70591d 100755\n--- a/src/osd/retro/retromain.cpp\n+++ b/src/osd/retro/retromain.cpp\n@@ -61,21 +61,35 @@ typedef struct joystate_t\n    int a2[2];\n }Joystate;\n \n+typedef struct mousestate_t\n+{\n+   int mouseBUT[4];\n+}Mousestate;\n+\n+typedef struct lightgunstate_t\n+{\n+   int lightgunBUT[4];\n+}Lightgunstate;\n+\n /* rendering target */\n static render_target *our_target = NULL;\n \n /* input device */\n-static input_device *retrokbd_device; // KEYBD\n-static input_device *mouse_device;    // MOUSE\n-static input_device *joy_device[4];// JOY0/JOY1/JOY2/JOY3\n-static input_device *Pad_device[4];// PAD0/PAD1/PAD2/PAD3\n+static input_device *retrokbd_device;    // KEYBD\n+static input_device *mouse_device[4];    // MOUSE0/MOUSE1/MOUSE2/MOUSE3\n+static input_device *lightgun_device[4]; // GUN0/GUN1/GUN2/GUN3\n+static input_device *joy_device[4];      // JOY0/JOY1/JOY2/JOY3\n+static input_device *Pad_device[4];      // PAD0/PAD1/PAD2/PAD3\n \n /* state */\n UINT16 retrokbd_state[RETROK_LAST];\n-int mouseLX;\n-int mouseLY;\n-int mouseBUT[4];\n+int mouseLX[4];\n+int mouseLY[4];\n+int lightgunLX[4];\n+int lightgunLY[4];\n static Joystate joystate[4];\n+static Mousestate mousestate[4];\n+static Lightgunstate lightgunstate[4];\n \n static int ui_ipt_pushchar=-1;\n \n@@ -87,7 +101,7 @@ bool hide_warnings = false;\n bool nobuffer_enable = false;\n \n bool hide_gameinfo = false;\n-bool mouse_enable = false;\n+int mouse_mode = 0;\n bool cheats_enable = false;\n bool alternate_renderer = false;\n bool boot_to_osd_enable = false;\n@@ -353,10 +367,11 @@ static INT32 generic_button_get_state(void *device_internal, void *item_internal\n \treturn *itemdata >> 7;\n }\n \n-#define input_device_item_add_joy(a,b,c,d,e)   joy_device[a]->add_item(b,d,e,c)\n-#define input_device_item_add_mouse(a,b,c,d,e) mouse_device->add_item(b,d,e,c)\n-#define input_device_item_add_kbd(a,b,c,d,e)   retrokbd_device->add_item(b,d,e,c)\n-#define input_device_item_add_pad(a,b,c,d,e)   Pad_device[a]->add_item(b,d,e,c)\n+#define input_device_item_add_joy(a,b,c,d,e)       joy_device[a]->add_item(b,d,e,c)\n+#define input_device_item_add_mouse(a,b,c,d,e)     mouse_device[a]->add_item(b,d,e,c)\n+#define input_device_item_add_lightgun(a,b,c,d,e)  lightgun_device[a]->add_item(b,d,e,c)\n+#define input_device_item_add_kbd(a,b,c,d,e)       retrokbd_device->add_item(b,d,e,c)\n+#define input_device_item_add_pad(a,b,c,d,e)       Pad_device[a]->add_item(b,d,e,c)\n \n void process_keyboard_state(void)\n {\n@@ -397,42 +412,116 @@ void process_joypad_state(void)\n \n void process_mouse_state(void)\n {\n-   static int mbL = 0, mbR = 0;\n-   int mouse_l;\n-   int mouse_r;\n-   int16_t mouse_x;\n-   int16_t mouse_y;\n+   unsigned i;\n \n-   if (!mouse_enable)\n-      return;\n+   for(i = 0;i < 4; i++)\n+   {\n+      static int mbL[4] = {0}, mbR[4] = {0}, mbM[4] = {0};\n+      int mouse_l[4];\n+      int mouse_r[4];\n+      int mouse_m[4];\n+      int16_t mouse_x[4];\n+      int16_t mouse_y[4];\n \n-   mouse_x = input_state_cb(0, RETRO_DEVICE_MOUSE, 0, RETRO_DEVICE_ID_MOUSE_X);\n-   mouse_y = input_state_cb(0, RETRO_DEVICE_MOUSE, 0, RETRO_DEVICE_ID_MOUSE_Y);\n-   mouse_l = input_state_cb(0, RETRO_DEVICE_MOUSE, 0, RETRO_DEVICE_ID_MOUSE_LEFT);\n-   mouse_r = input_state_cb(0, RETRO_DEVICE_MOUSE, 0, RETRO_DEVICE_ID_MOUSE_RIGHT);\n-   mouseLX = mouse_x*INPUT_RELATIVE_PER_PIXEL;;\n-   mouseLY = mouse_y*INPUT_RELATIVE_PER_PIXEL;;\n+      if (mouse_mode == 0 || mouse_mode == 2)\n+         return;\n \n-   if(mbL==0 && mouse_l)\n-   {\n-      mbL=1;\n-      mouseBUT[0]=0x80;\n-   }\n-   else if(mbL==1 && !mouse_l)\n-   {\n-      mouseBUT[0]=0;\n-      mbL=0;\n-   }\n+      mouse_x[i] = input_state_cb(i, RETRO_DEVICE_MOUSE, 0, RETRO_DEVICE_ID_MOUSE_X);\n+      mouse_y[i] = input_state_cb(i, RETRO_DEVICE_MOUSE, 0, RETRO_DEVICE_ID_MOUSE_Y);\n+      mouse_l[i] = input_state_cb(i, RETRO_DEVICE_MOUSE, 0, RETRO_DEVICE_ID_MOUSE_LEFT);\n+      mouse_r[i] = input_state_cb(i, RETRO_DEVICE_MOUSE, 0, RETRO_DEVICE_ID_MOUSE_RIGHT);\n+      mouse_m[i] = input_state_cb(i, RETRO_DEVICE_MOUSE, 0, RETRO_DEVICE_ID_MOUSE_MIDDLE);\n \n-   if(mbR==0 && mouse_r)\n-   {\n-      mbR=1;\n-      mouseBUT[1]=1;\n+      mouseLX[i] = mouse_x[i]*INPUT_RELATIVE_PER_PIXEL;;\n+      mouseLY[i] = mouse_y[i]*INPUT_RELATIVE_PER_PIXEL;;\n+\t   \n+      if(mbL[i]==0 && mouse_l[i])\n+      {\n+         mbL[i]=1;\n+         mousestate[i].mouseBUT[0]=0x80;\n+      }\n+      else if(mbL[i]==1 && !mouse_l[i])\n+      {\n+         mousestate[i].mouseBUT[0]=0;\n+         mbL[i]=0;\n+      }\n+\t   \n+      if(mbR[i]==0 && mouse_r[i])\n+      {\n+         mbR[i]=1;\n+         mousestate[i].mouseBUT[1]=0x80;\n+      }\n+      else if(mbR[i]==1 && !mouse_r[i])\n+      {\n+         mousestate[i].mouseBUT[1]=0;\n+         mbR[i]=0;\n+      }\n+\n+      if(mbM[i]==0 && mouse_m[i])\n+      {\n+         mbM[i]=1;\n+         mousestate[i].mouseBUT[2]=0x80;\n+      }\n+      else if(mbM[i]==1 && !mouse_m[i])\n+      {\n+         mousestate[i].mouseBUT[2]=0;\n+         mbM[i]=0;\n+      }\n    }\n-   else if(mbR==1 && !mouse_r)\n-   {\n-      mouseBUT[1]=0;\n-      mbR=0;\n+}\n+\n+void process_lightgun_state(void)\n+{\n+   unsigned i;\n+\n+   for(i = 0;i < 4; i++)\n+   {\n+      static int gb1[4] = {0}, gb2[4] = {0};\n+      int gun_1[4];\n+      int gun_2[4];\n+      int16_t lightgun_x[4];\n+      int16_t lightgun_y[4];\n+\n+      if (mouse_mode == 0 || mouse_mode == 1)\n+         return;\n+\n+      gun_1[i] = input_state_cb( i, RETRO_DEVICE_LIGHTGUN, 0, RETRO_DEVICE_ID_LIGHTGUN_TRIGGER ) || input_state_cb( i, RETRO_DEVICE_LIGHTGUN, 0, RETRO_DEVICE_ID_LIGHTGUN_RELOAD );\n+      gun_2[i] = input_state_cb( i, RETRO_DEVICE_LIGHTGUN, 0, RETRO_DEVICE_ID_LIGHTGUN_AUX_A );\n+\n+      if(gb1[i]==0 && gun_1[i])\n+\t  {\n+\t     gb1[i]=1;\n+\t     lightgunstate[i].lightgunBUT[0] = 0x80;\t  \n+\t  }\n+      else if(gb1[i]==1 && !gun_1[i])\n+\t  {\n+\t     lightgunstate[i].lightgunBUT[0] = 0;\t\n+\t     gb1[i]=0;\n+\t  }\n+\n+      if(gb2[i]==0 && gun_2[i])\n+\t  {\n+\t     gb2[i]=1;\n+\t     lightgunstate[i].lightgunBUT[1] = 0x80;\t  \n+\t  }\n+      else if(gb2[i]==1 && !gun_2[i])\n+\t  {\n+\t     lightgunstate[i].lightgunBUT[1] = 0;\t\n+\t     gb2[i]=0;\n+\t  }\n+\n+      lightgun_x[i] = input_state_cb(i, RETRO_DEVICE_LIGHTGUN, 0, RETRO_DEVICE_ID_LIGHTGUN_SCREEN_X);\n+      lightgun_y[i] = input_state_cb(i, RETRO_DEVICE_LIGHTGUN, 0, RETRO_DEVICE_ID_LIGHTGUN_SCREEN_Y);\n+\n+      lightgunLX[i] = lightgun_x[i]*2;;\n+      lightgunLY[i] = lightgun_y[i]*2;;\n+\n+      //Place the cursor at screen top left when detected as offscreen or when Gun Reload input activated\n+      if (input_state_cb( i, RETRO_DEVICE_LIGHTGUN, 0, RETRO_DEVICE_ID_LIGHTGUN_IS_OFFSCREEN ) || input_state_cb( i, RETRO_DEVICE_LIGHTGUN, 0, RETRO_DEVICE_ID_LIGHTGUN_RELOAD ) )\n+\t  {\n+\t     lightgunLX[i] = -65534;\n+\t     lightgunLY[i] = -65534; \n+\t  }\n    }\n }\n \n@@ -441,21 +530,46 @@ static void initInput(running_machine &machine)\n    int i,j,button;\n    char defname[20];\n \n-   if (mouse_enable)\n+   //MOUSE\n+   if (mouse_mode == 1)\n    {\n-      //MOUSE\n-      mouse_device = machine.input().device_class(DEVICE_CLASS_MOUSE).add_device(\"Mice1\");\n-      // add the axes\n-      input_device_item_add_mouse(mouse_device , \"X\", &mouseLX, ITEM_ID_XAXIS, generic_axis_get_state);\n-      input_device_item_add_mouse(mouse_device , \"Y\", &mouseLY, ITEM_ID_YAXIS, generic_axis_get_state);\n-      // add the buttons\n-      for (button = 0; button < 4; button++)\n+      for(i=0;i<4;i++)\n       {\n-         input_item_id itemid = (input_item_id) (ITEM_ID_BUTTON1+button);\n-         sprintf(defname, \"B%d\", button + 1);\n-         input_device_item_add_mouse(mouse_device, defname, &mouseBUT[button], itemid, generic_button_get_state);\n+         sprintf(defname, \"Mouse%d\", i);\n+         mouse_device[i]=machine.input().device_class(DEVICE_CLASS_MOUSE).add_device(defname);\n+         // add the axes\n+         input_device_item_add_mouse (i , \"X\", &mouseLX[i], ITEM_ID_XAXIS, generic_axis_get_state);\n+         input_device_item_add_mouse (i , \"Y\", &mouseLY[i], ITEM_ID_YAXIS, generic_axis_get_state);\n+         // add the buttons\n+         for (button = 0; button < 4; button++)\n+         {\n+            input_item_id itemid = (input_item_id) (ITEM_ID_BUTTON1+button);\n+            sprintf(defname, \"B%d\", button + 1);\n+            input_device_item_add_mouse(i, defname, &mousestate[i].mouseBUT[button], itemid, generic_button_get_state);\n+         }\n       }\n    }\n+\t      \n+   //LIGHTGUN\n+   if (mouse_mode == 2)\n+   {\n+      for(i=0;i<4;i++)\n+      {\n+         sprintf(defname, \"Gun%d\", i);\n+         lightgun_device[i]=machine.input().device_class(DEVICE_CLASS_LIGHTGUN).add_device(defname);\n+         // add the axes\n+         input_device_item_add_lightgun (i , \"X\", &lightgunLX[i], ITEM_ID_XAXIS, generic_axis_get_state);\n+         input_device_item_add_lightgun (i , \"Y\", &lightgunLY[i], ITEM_ID_YAXIS, generic_axis_get_state);\n+         // add the buttons\n+         for (button = 0; button < 4; button++)\n+         {\n+            input_item_id itemid = (input_item_id) (ITEM_ID_BUTTON1+button);\n+            sprintf(defname, \"B%d\", button + 1);\n+            input_device_item_add_lightgun(i, defname, &lightgunstate[i].lightgunBUT[button], itemid, generic_button_get_state);\n+         }\n+      }\n+   }\n+\n \n    //KEYBOARD\n    retrokbd_device = machine.input().device_class(DEVICE_CLASS_KEYBOARD).add_device(\"Retrokdb\");\n@@ -1212,10 +1326,24 @@ static void Set_Default_Option(void)\n    else\n       Add_Option(\"-nocheat\");\n \n-   if(mouse_enable)\n+   if(mouse_mode == 0)\n+   {\n+      Add_Option(\"-nomouse\");\n+      Add_Option(\"-nolightgun\");\n+   }\n+   if(mouse_mode == 1)\n+   {\n       Add_Option(\"-mouse\");\n-   else\n+      Add_Option(\"-multimouse\");\n+      Add_Option(\"-nolightgun\");\n+   }\n+   if(mouse_mode == 2)\n+   {\n       Add_Option(\"-nomouse\");\n+      Add_Option(\"-multimouse\");\n+      Add_Option(\"-lightgun\");\n+   }\n+\n \n    if(hide_gameinfo)\n       Add_Option(\"-skip_gameinfo\");\n\nFrom 20a4b9dc30e25cbdc8cd02319391e5943ae2f842 Mon Sep 17 00:00:00 2001\nFrom: StormedBubbles <80055191+StormedBubbles@users.noreply.github.com>\nDate: Tue, 19 Apr 2022 08:39:39 -0400\nSubject: [PATCH 2/2] Fix greatgun mappings\n\n---\n src/mame/drivers/mazerbla.cpp | 16 ++++++++++------\n 1 file changed, 10 insertions(+), 6 deletions(-)\n\ndiff --git a/src/mame/drivers/mazerbla.cpp b/src/mame/drivers/mazerbla.cpp\nindex 24c80847ea8..60ee75ea5b3 100644\n--- a/src/mame/drivers/mazerbla.cpp\n+++ b/src/mame/drivers/mazerbla.cpp\n@@ -1315,20 +1315,24 @@ static INPUT_PORTS_START( greatgun )\n \tPORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 )\n \tPORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )\n \tPORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )\n-\tPORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )\n-\tPORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )\n+\tPORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME(\"P1 Fire\")\n+\tPORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME(\"P2 Fire\")\n \tPORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )\n \tPORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 )\n \n+\n \tPORT_START(\"STICK0_X\")  /* Strobe 6: horizontal movement of gun */\n-\tPORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(7) PORT_PLAYER(1)\n+\tPORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_MINMAX(0x00, 0xff) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(7) PORT_PLAYER(1)\n+\n \tPORT_START(\"STICK0_Y\")  /* Strobe 7: vertical movement of gun */\n-\tPORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(7) PORT_PLAYER(1)\n+\tPORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_MINMAX(0x00, 0xff) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(7) PORT_PLAYER(1)\n \n \tPORT_START(\"STICK1_X\")  /* Strobe 8: horizontal movement of gun */\n-\tPORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(7) PORT_PLAYER(2)\n+\tPORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_MINMAX(0x00, 0xff) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(7) PORT_PLAYER(2)\n+\n \tPORT_START(\"STICK1_Y\")  /* Strobe 9: vertical movement of gun */\n-\tPORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(7) PORT_PLAYER(2)\n+\t// for whatever reason this should be inverted?\n+\tPORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_MINMAX(0x00, 0xff) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_INVERT PORT_KEYDELTA(7) PORT_PLAYER(2)\n \n \tPORT_START(\"UNUSED\")\n \tPORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2016/patches/bgfx.patch",
    "content": "--- a/3rdparty/bgfx/src/config.h\t2020-01-14 08:42:35.023108564 +0100\n+++ b/3rdparty/bgfx/src/config.h\t2020-01-14 08:42:39.527041246 +0100\n@@ -12,7 +12,7 @@\n #\tdefine BGFX_CONFIG_DEBUG 0\n #endif // BGFX_CONFIG_DEBUG\n \n-#if !defined(BGFX_CONFIG_RENDERER_DIRECT3D9) \\\n+#if 0 && !defined(BGFX_CONFIG_RENDERER_DIRECT3D9) \\\n \t&& !defined(BGFX_CONFIG_RENDERER_DIRECT3D11) \\\n \t&& !defined(BGFX_CONFIG_RENDERER_DIRECT3D12) \\\n \t&& !defined(BGFX_CONFIG_RENDERER_METAL) \\\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2016/patches/build.patch",
    "content": "--- a/makefile\t2020-01-08 21:26:00.559307012 +0100\n+++ b/makefile\t2020-01-08 21:26:17.743082994 +0100\n@@ -1499,7 +1499,7 @@\n \t@echo Compressing $<...\n \t$(SILENT)$(PYTHON) scripts/build/complay.py $< $@ layout_$(basename $(notdir $<))\n \n-$(GENDIR)/mame/drivers/ymmu100.hxx: $(SRC)/mame/drivers/ymmu100.ppm scripts/build/file2str.py\n+$(GENDIR)/mame/drivers/ymmu100.hxx: $(SRC)/mame/drivers/ymmu100.ppm scripts/build/file2str.py | $(GEN_FOLDERS)\n \t@echo Converting $<...\n \t$(SILENT)$(PYTHON) scripts/build/file2str.py $< $@ ymmu100_bkg UINT8\n \n--- a/3rdparty/genie/src/actions/make/make_cpp.lua\t2020-01-09 10:47:07.915711959 +0100\n+++ b/3rdparty/genie/src/actions/make/make_cpp.lua\t2020-01-09 10:47:10.627673879 +0100\n@@ -474,7 +474,7 @@\n \tfunction cpp.fileRules(prj)\n \t\tfor _, file in ipairs(prj.files or {}) do\n \t\t\tif path.isSourceFile(file) then\n-\t\t\t\t_p('$(OBJDIR)/%s.o: %s $(GCH)'\n+\t\t\t\t_p('$(OBJDIR)/%s.o: %s $(GCH) | $(OBJDIRS)'\n \t\t\t\t\t, _MAKE.esc(path.trimdots(path.removeext(file)))\n \t\t\t\t\t, _MAKE.esc(file)\n \t\t\t\t\t)\n@@ -497,7 +497,7 @@\n \n \t\t\t\t_p('')\n \t\t\telseif (path.getextension(file) == \".rc\") then\n-\t\t\t\t_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\n+\t\t\t\t_p('$(OBJDIR)/%s.res: %s | $(OBJDIRS)', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\n \t\t\t\tif prj.msgresource then\n \t\t\t\t\t_p('\\t@echo ' .. prj.msgresource)\n \t\t\t\telse\n--- a/3rdparty/genie/src/host/scripts.c\t2020-01-10 15:55:33.330479398 +0100\n+++ b/3rdparty/genie/src/host/scripts.c\t2020-01-10 15:56:01.313900664 +0100\n@@ -222,7 +222,7 @@\n \t\"E.esc(path.trimdots(path.removeext(file)))\\n)\\nend\\nend\\nend\\n_p('')\\n_p('  define PREBUILDCMDS')\\nif #cfg.prebuildcommands > 0 then\\n_p('\\\\t@echo Running pre-build commands')\\n_p('\\\\t%s', table.implode(cfg.prebuildcommands, \\\"\\\", \\\"\\\", \\\"\\\\n\\\\t\\\"))\\nend\\n_p('  endef')\\n_p('  define PRELINKCMDS')\\nif #cfg.prelinkcommands > 0 then\\n_p('\\\\t@echo Running pre-link commands')\\n_p('\\\\t%s', table.implode(cfg.prelinkcommands, \\\"\\\", \\\"\\\", \\\"\\\\n\\\\t\\\"))\\nend\\n_p('  endef')\\n_p('  define POSTBUILDCMDS')\\nif #cfg.postbuildcommands > 0 then\\n_p('\\\\t@echo Running post-build commands')\\n_p('\\\\t%s', table.implode(cfg.postbuildcommands, \\\"\\\", \\\"\\\", \\\"\\\\n\\\\t\\\"))\\nend\\n_p('  endef')\\nmake.settings(cfg, cc)\\n_p('endif')\\n_p('')\\nend\\nfunction cpp.platformtools(cfg, cc)\\nlocal platform = cc.platforms[cfg.platform]\\nif platform.cc then\\n_p('  CC         = %s', platform.cc)\\nend\\nif platform.cxx then\\n_p('  CXX        = %s', platform.cxx)\\nend\\nif platform.ar then\\n_p('  AR         = %s', platform.ar)\\nend\\nend\\nfunction cpp.flags(cf\"\n \t\"g, cc)\\nif cfg.pchheader and not cfg.flags.NoPCH then\\n_p('  FORCE_INCLUDE += -include $(OBJDIR)/$(notdir $(PCH))')\\nend\\nif #cfg.forcedincludes > 0 then\\n_p('  FORCE_INCLUDE += -include %s'\\n,_MAKE.esc(table.concat(cfg.forcedincludes, \\\";\\\")))\\nend\\n_p('  ALL_CPPFLAGS  += $(CPPFLAGS) %s $(DEFINES) $(INCLUDES)', table.concat(cc.getcppflags(cfg), \\\" \\\"))\\n_p('  ALL_CFLAGS    += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)))\\n_p('  ALL_CXXFLAGS  += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)))\\n_p('  ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH)%s', make.list(table.join(cc.getcflags(cfg), cc.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)))\\n_p('  ALL_RESFLAGS  += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s',\\n        make.list(table.join(cc.getdefines(cfg.resdefines),\\n                                cc.getincludedi\"\n \t\"rs(cfg.resincludedirs), cfg.resoptions)))\\nend\\nfunction cpp.linker(prj, cfg, cc)\\n_p('  ALL_LDFLAGS   += $(LDFLAGS)%s', make.list(table.join(cc.getlibdirflags(cfg), cc.getldflags(cfg), cfg.linkoptions)))\\n_p('  LDDEPS    +=%s', make.list(_MAKE.esc(premake.getlinks(cfg, \\\"siblings\\\", \\\"fullpath\\\"))))\\n_p('  LIBS      += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))\\n_p('  EXTERNAL_LIBS +=%s', make.list(cc.getlibfiles(cfg)))\\nif cfg.kind == \\\"StaticLib\\\" then\\nif (not prj.options.ArchiveSplit) then\\n_p('  LINKCMD    = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\\nelse\\n_p('  LINKCMD    = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))\\n_p('  LINKCMD_NDX= $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, true)))\\nend\\nelse\\nlocal tool = iif(cfg.language == \\\"C\\\", \\\"CC\\\", \\\"CXX\\\")\\n_p('  LINKCMD    = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', tool)\\nend\\nend\\nfunction cpp.pchconfig(cfg)\\nif not cfg.pchheader or cfg.flags.NoPC\"\n-\t\"H then\\nreturn\\nend\\nlocal pch = cfg.pchheader\\nfor _, incdir in ipairs(cfg.includedirs) do\\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\\nlocal testname = path.join(abspath, pch)\\nif os.isfile(testname) then\\npch = path.getrelative(cfg.location, testname)\\nbreak\\nend\\nend\\n_p('  PCH        = %s', _MAKE.esc(pch))\\n_p('  GCH        = $(OBJDIR)/$(notdir $(PCH)).gch')\\nend\\nfunction cpp.pchrules(prj)\\n_p('ifneq (,$(PCH))')\\n_p('$(GCH): $(PCH) | $(OBJDIR)')\\nif prj.msgprecompile then\\n_p('\\\\t@echo ' .. prj.msgprecompile)\\nelse\\n_p('\\\\t@echo $(notdir $<)')\\nend\\nlocal cmd = iif(prj.language == \\\"C\\\", \\\"$(CC) $(ALL_CFLAGS) -x c-header\\\", \\\"$(CXX) $(ALL_CXXFLAGS) -x c++-header\\\")\\n_p('\\\\t$(SILENT) %s $(DEFINES) $(INCLUDES) -o \\\"$@\\\" -c \\\"$<\\\"', cmd)\\n_p('endif')\\n_p('')\\nend\\nfunction cpp.fileRules(prj)\\nfor _, file in ipairs(prj.files or {}) do\\nif path.isSourceFile(file) then\\n_p('$(OBJDIR)/%s.o: %s $(GCH)'\\n, _MAKE.esc(path.trimdots(path.removeext(file)))\\n, _MAKE.esc(file)\\n)\\nif (pat\"\n+\t\"H then\\nreturn\\nend\\nlocal pch = cfg.pchheader\\nfor _, incdir in ipairs(cfg.includedirs) do\\nlocal abspath = path.getabsolute(path.join(cfg.project.location, incdir))\\nlocal testname = path.join(abspath, pch)\\nif os.isfile(testname) then\\npch = path.getrelative(cfg.location, testname)\\nbreak\\nend\\nend\\n_p('  PCH        = %s', _MAKE.esc(pch))\\n_p('  GCH        = $(OBJDIR)/$(notdir $(PCH)).gch')\\nend\\nfunction cpp.pchrules(prj)\\n_p('ifneq (,$(PCH))')\\n_p('$(GCH): $(PCH) | $(OBJDIR)')\\nif prj.msgprecompile then\\n_p('\\\\t@echo ' .. prj.msgprecompile)\\nelse\\n_p('\\\\t@echo $(notdir $<)')\\nend\\nlocal cmd = iif(prj.language == \\\"C\\\", \\\"$(CC) $(ALL_CFLAGS) -x c-header\\\", \\\"$(CXX) $(ALL_CXXFLAGS) -x c++-header\\\")\\n_p('\\\\t$(SILENT) %s $(DEFINES) $(INCLUDES) -o \\\"$@\\\" -c \\\"$<\\\"', cmd)\\n_p('endif')\\n_p('')\\nend\\nfunction cpp.fileRules(prj)\\nfor _, file in ipairs(prj.files or {}) do\\nif path.isSourceFile(file) then\\n_p('$(OBJDIR)/%s.o: %s $(GCH) | $(OBJDIRS)'\\n, _MAKE.esc(path.trimdots(path.removeext(file)))\\n, _MAKE.esc(file)\\n)\\nif (pat\"\n \t\"h.isobjcfile(file) and prj.msgcompile_objc) then\\n_p('\\\\t@echo ' .. prj.msgcompile_objc)\\nelseif prj.msgcompile then\\n_p('\\\\t@echo ' .. prj.msgcompile)\\nelse\\n_p('\\\\t@echo $(notdir $<)')\\nend\\nif (path.isobjcfile(file)) then\\n_p('\\\\t$(SILENT) $(CXX) $(ALL_OBJCFLAGS) $(FORCE_INCLUDE) -o \\\"$@\\\" -c \\\"$<\\\"')\\nelse\\ncpp.buildcommand(path.iscfile(file) and not prj.options.ForceCPP, \\\"o\\\")\\nend\\nfor _, task in ipairs(prj.postcompiletasks or {}) do\\n_p('\\\\t$(SILENT) %s', task)\\n_p('')\\nend\\n_p('')\\nelseif (path.getextension(file) == \\\".rc\\\") then\\n_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))\\nif prj.msgresource then\\n_p('\\\\t@echo ' .. prj.msgresource)\\nelse\\n_p('\\\\t@echo $(notdir $<)')\\nend\\n_p('\\\\t$(SILENT) $(RESCOMP) $< -O coff -o \\\"$@\\\" $(ALL_RESFLAGS)')\\n_p('')\\nend\\nend\\nend\\nfunction cpp.dependencyRules(prj)\\nfor _, dependency in ipairs(prj.dependency or {}) do\\nfor _, dep in ipairs(dependency or {}) do\\nif (dep[3]==nil or dep[3]==false) then\\n_p('$(OBJDIR)/%s.o: %s'\\n, _MAKE.es\"\n \t\"c(path.trimdots(path.removeext(path.getrelative(prj.location, dep[1]))))\\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\\n)\\nelse\\n_p('%s: %s'\\n, _MAKE.esc(dep[1])\\n, _MAKE.esc(path.getrelative(prj.location, dep[2]))\\n)\\nend\\n_p('')\\nend\\nend\\nend\\nfunction cpp.buildcommand(iscfile, objext)\\nlocal flags = iif(iscfile, '$(CC) $(ALL_CFLAGS)', '$(CXX) $(ALL_CXXFLAGS)')\\n_p('\\\\t$(SILENT) %s $(FORCE_INCLUDE) -o \\\"$@\\\" -c \\\"$<\\\"', flags, objext)\\nend\\n\",\n \n"
  },
  {
    "path": "packages/sx05re/libretro/mame2016/patches/genie.patch",
    "content": "--- a/3rdparty/genie/build/gmake.linux/genie.make\t2020-01-14 06:27:22.077161784 +0100\n+++ b/3rdparty/genie/build/gmake.linux/genie.make\t2020-01-14 06:27:49.856857764 +0100\n@@ -28,8 +28,12 @@\n   RM    = $(SILENT) del /F \"$(subst /,\\\\,$(1))\" 2> nul || exit 0\n endif\n \n-CC  = gcc\n-CXX = g++\n+CC  = $(HOST_CC)\n+CXX = $(HOST_CXX)\n+CPPFLAGS = $(HOST_CPPFLAGS)\n+CFLAGS = $(HOST_CFLAGS)\n+CXXFLAGS = $(HOST_CXXFLAGS)\n+LDFLAGS = $(HOST_LDFLAGS)\n AR  = ar\n \n ifndef RESCOMP\n@@ -247,211 +243,211 @@\n \t$(SILENT) $(CC) $(ALL_CFLAGS) -x c-header $(DEFINES) $(INCLUDES) -o \"$@\" -c \"$<\"\n endif\n \n-$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH)\n+$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH)\n+$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH)\n+$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH)\n+$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH)\n+$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH)\n+$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH)\n+$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH)\n+$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH)\n+$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH)\n+$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH)\n+$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH)\n+$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH)\n+$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH)\n+$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH)\n+$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH)\n+$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH)\n+$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH)\n+$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH)\n+$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n-$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH)\n+$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH) | $(OBJDIRS)\n \t@echo $(notdir $<)\n \t$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o \"$@\" -c \"$<\"\n \n"
  },
  {
    "path": "packages/sx05re/libretro/mame2016/patches/mame2016-libretro-crosscompile.patch",
    "content": "--- a/scripts/toolchain.lua\t2019-04-03 12:13:08.556919475 +0200\n+++ b/scripts/toolchain.lua\t2019-04-03 12:13:43.323043587 +0200\n@@ -675,9 +675,6 @@\n \n \tconfiguration { \"linux-gcc\", \"x32\" }\n \t\tobjdir (_buildDir .. \"linux_gcc\" .. \"/obj\")\n-\t\tbuildoptions {\n-\t\t\t\"-m32\",\n-\t\t}\n \n \tconfiguration { \"linux-gcc\", \"x32\", \"Release\" }\n \t\ttargetdir (_buildDir .. \"linux_gcc\" .. \"/bin/x32/Release\")\n--- a/3rdparty/genie/src/host/scripts.c\t2019-04-03 12:30:33.272654617 +0200\n+++ b/3rdparty/genie/src/host/scripts.c\t2019-04-03 12:30:12.892921812 +0200\n@@ -131,7 +131,7 @@\n \t\"gs(cfg)\\nlocal result = table.translate(cfg.flags, flags)\\nreturn result\\nend\\nfunction premake.dotnet.getkind(cfg)\\nif (cfg.kind == \\\"ConsoleApp\\\") then\\nreturn \\\"Exe\\\"\\nelseif (cfg.kind == \\\"WindowedApp\\\") then\\nreturn \\\"WinExe\\\"\\nelseif (cfg.kind == \\\"SharedLib\\\") then\\nreturn \\\"Library\\\"\\nend\\nend\",\n \n \t/* tools/gcc.lua */\n-\t\"premake.gcc = { }\\npremake.gcc.cc     = \\\"gcc\\\"\\npremake.gcc.cxx    = \\\"g++\\\"\\npremake.gcc.ar     = \\\"ar\\\"\\npremake.gcc.llvm   = false\\nlocal cflags =\\n{\\nEnableSSE      = \\\"-msse\\\",\\nEnableSSE2     = \\\"-msse2\\\",\\nEnableAVX      = \\\"-mavx\\\",\\nEnableAVX2     = \\\"-mavx2\\\",\\nExtraWarnings  = \\\"-Wall -Wextra\\\",\\nFatalWarnings  = \\\"-Werror\\\",\\nFloatFast      = \\\"-ffast-math\\\",\\nFloatStrict    = \\\"-ffloat-store\\\",\\nNoFramePointer = \\\"-fomit-frame-pointer\\\",\\nOptimize       = \\\"-O2\\\",\\nOptimizeSize   = \\\"-Os\\\",\\nOptimizeSpeed  = \\\"-O3\\\",\\nSymbols        = \\\"-g\\\",\\n}\\nlocal cxxflags =\\n{\\nNoExceptions   = \\\"-fno-exceptions\\\",\\nNoRTTI         = \\\"-fno-rtti\\\",\\nUnsignedChar   = \\\"-funsigned-char\\\",\\n}\\npremake.gcc.platforms =\\n{\\nNative = {\\ncppflags = \\\"-MMD -MP\\\",\\n},\\nx32 = {\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-m32\\\",\\n},\\nx64 = {\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-m64\\\",\\n},\\nUniversal = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch i386 -arch x86_64 -arch ppc -arch ppc64\\\",\\n},\"\n+\t\"premake.gcc = { }\\npremake.gcc.cc     = \\\"gcc\\\"\\npremake.gcc.cxx    = \\\"g++\\\"\\npremake.gcc.ar     = \\\"ar\\\"\\npremake.gcc.llvm   = false\\nlocal cflags =\\n{\\nEnableSSE      = \\\"-msse\\\",\\nEnableSSE2     = \\\"-msse2\\\",\\nEnableAVX      = \\\"-mavx\\\",\\nEnableAVX2     = \\\"-mavx2\\\",\\nExtraWarnings  = \\\"-Wall -Wextra\\\",\\nFatalWarnings  = \\\"-Werror\\\",\\nFloatFast      = \\\"-ffast-math\\\",\\nFloatStrict    = \\\"-ffloat-store\\\",\\nNoFramePointer = \\\"-fomit-frame-pointer\\\",\\nOptimize       = \\\"-O2\\\",\\nOptimizeSize   = \\\"-Os\\\",\\nOptimizeSpeed  = \\\"-O3\\\",\\nSymbols        = \\\"-g\\\",\\n}\\nlocal cxxflags =\\n{\\nNoExceptions   = \\\"-fno-exceptions\\\",\\nNoRTTI         = \\\"-fno-rtti\\\",\\nUnsignedChar   = \\\"-funsigned-char\\\",\\n}\\npremake.gcc.platforms =\\n{\\nNative = {\\ncppflags = \\\"-MMD -MP\\\",\\n},\\nx32 = {\\ncppflags = \\\"-MMD -MP\\\",\\n},\\nx64 = {\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-m64\\\",\\n},\\nUniversal = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch i386 -arch x86_64 -arch ppc -arch ppc64\\\",\\n},\"\n \t\"\\nUniversal32 = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch i386 -arch ppc\\\",\\n},\\nUniversal64 = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch x86_64 -arch ppc64\\\",\\n},\\nPS3 = {\\ncc         = \\\"ppu-lv2-g++\\\",\\ncxx        = \\\"ppu-lv2-g++\\\",\\nar         = \\\"ppu-lv2-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\n},\\nWiiDev = {\\ncppflags    = \\\"-MMD -MP -I$(LIBOGC_INC) $(MACHDEP)\\\",\\nldflags= \\\"-L$(LIBOGC_LIB) $(MACHDEP)\\\",\\ncfgsettings = [[\\n  ifeq ($(strip $(DEVKITPPC)),)\\n    $(error \\\"DEVKITPPC environment variable is not set\\\")'\\n  endif\\n  include $(DEVKITPPC)/wii_rules']],\\n},\\nOrbis = {\\ncc         = \\\"orbis-clang\\\",\\ncxx        = \\\"orbis-clang++\\\",\\nar         = \\\"orbis-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\n}\\n}\\nlocal platforms = premake.gcc.platforms\\nfunction premake.gcc.getcppflags(cfg)\\nlocal flags = { }\\ntable.insert(flags, platforms[cfg.platform].cppflags)\\nif flags[1]:startswith(\\\"-MMD\\\") then\\ntable.insert(flags, \\\"-MP\\\")\\nend\\nreturn flags\\nend\\nfunction \"\n \t\"premake.gcc.getcflags(cfg)\\nlocal result = table.translate(cfg.flags, cflags)\\ntable.insert(result, platforms[cfg.platform].flags)\\nif cfg.system ~= \\\"windows\\\" and cfg.kind == \\\"SharedLib\\\" then\\ntable.insert(result, \\\"-fPIC\\\")\\nend\\nreturn result\\nend\\nfunction premake.gcc.getcxxflags(cfg)\\nlocal result = table.translate(cfg.flags, cxxflags)\\nreturn result\\nend\\nfunction premake.gcc.getldflags(cfg)\\nlocal result = { }\\nif not cfg.flags.Symbols then\\nif cfg.system == \\\"macosx\\\" then\\nelse\\ntable.insert(result, \\\"-s\\\")\\nend\\nend\\nif cfg.kind == \\\"SharedLib\\\" then\\nif cfg.system == \\\"macosx\\\" then\\ntable.insert(result, \\\"-dynamiclib\\\")\\nelse\\ntable.insert(result, \\\"-shared\\\")\\nend\\nif cfg.system == \\\"windows\\\" and not cfg.flags.NoImportLib then\\ntable.insert(result, '-Wl,--out-implib=\\\"' .. cfg.linktarget.fullpath .. '\\\"')\\nend\\nend\\nif cfg.kind == \\\"WindowedApp\\\" and cfg.system == \\\"windows\\\" then\\ntable.insert(result, \\\"-mwindows\\\")\\nend\\nlocal platform = platforms[cfg.platform]\\ntable.insert(result, platform\"\n \t\".flags)\\ntable.insert(result, platform.ldflags)\\nreturn result\\nend\\nfunction premake.gcc.getlibdirflags(cfg)\\nlocal result = { }\\nfor _, value in ipairs(premake.getlinks(cfg, \\\"all\\\", \\\"directory\\\")) do\\ntable.insert(result, '-L' .. _MAKE.esc(value))\\nend\\nreturn result\\nend\\nfunction premake.gcc.islibfile(p)\\nif path.getextension(p) == \\\".a\\\" then\\nreturn true\\nend\\nreturn false\\nend\\nfunction premake.gcc.getlibfiles(cfg)\\nlocal result = {}\\nfor _, value in ipairs(premake.getlinks(cfg, \\\"system\\\", \\\"fullpath\\\")) do\\nif premake.gcc.islibfile(value) then\\ntable.insert(result, _MAKE.esc(value))\\nend\\nend\\nreturn result\\nend\\nfunction premake.gcc.getlinkflags(cfg)\\nlocal result = {}\\nfor _, value in ipairs(premake.getlinks(cfg, \\\"system\\\", \\\"fullpath\\\")) do\\nif premake.gcc.islibfile(value) then\\ntable.insert(result, _MAKE.esc(value))\\nelseif path.getextension(value) == \\\".framework\\\" then\\ntable.insert(result, '-framework ' .. _MAKE.esc(path.getbasename(value)))\\nelse\\ntable.insert(result, '-l' .. _MAKE.esc(path\"\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2016/patches/pregenerate.patch",
    "content": "--- a/makefile\t2020-01-15 17:56:35.780589637 +0100\n+++ b/makefile\t2020-01-15 17:56:15.020900841 +0100\n@@ -1201,16 +1201,19 @@\n .PHONY: linux_x64\n linux_x64: generate $(PROJECTDIR)/gmake-linux/Makefile\n \t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)64 precompile\n+\t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)64 dasm\n \t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)64\n \n .PHONY: linux_x86\n linux_x86: generate $(PROJECTDIR)/gmake-linux/Makefile\n \t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)32 precompile\n+\t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)32 dasm\n \t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)32\n \n .PHONY: linux\n linux: generate $(PROJECTDIR)/gmake-linux/Makefile\n \t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG) precompile\n+\t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG) dasm\n \t$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)\n \n #-------------------------------------------------\n"
  },
  {
    "path": "packages/sx05re/libretro/mame2016/patches/pythonfix.patch",
    "content": "--- a/src/devices/cpu/tms57002/tmsmake.py\n+++ b/src/devices/cpu/tms57002/tmsmake.py\n@@ -323,7 +323,7 @@\n def LoadLst(filename):\n     instructions = []\n     ins = None\n-    for n, line in enumerate(open(filename, \"rU\")):\n+    for n, line in enumerate(open(filename, \"r\")):\n         line = line.rstrip()\n         if not line and ins:\n             # new lines separate intructions\n--- a/src/devices/cpu/m6502/m6502make.py\n+++ b/src/devices/cpu/m6502/m6502make.py\n@@ -18,7 +18,7 @@\n     opcodes = []\n     logging.info(\"load_opcodes: %s\", fname)\n     try:\n-        f = open(fname, \"rU\")\n+        f = open(fname, \"r\")\n     except Exception:\n         err = sys.exc_info()[1]\n         logging.error(\"cannot read opcodes file %s [%s]\", fname, err)\n@@ -41,7 +41,7 @@\n     logging.info(\"load_disp: %s\", fname)\n     states = []\n     try:\n-        f = open(fname, \"rU\")\n+        f = open(fname, \"r\")\n     except Exception:\n         err = sys.exc_info()[1]\n         logging.error(\"cannot read display file %s [%s]\", fname, err)\n--- a/src/devices/cpu/m6809/m6809make.py\n+++ b/src/devices/cpu/m6809/m6809make.py\n@@ -16,7 +16,7 @@\n \tif path != \"\":\n \t\tpath += '/'\n \ttry:\n-\t\tf = open(fname, \"rU\")\n+\t\tf = open(fname, \"r\")\n \texcept Exception:\n \t\terr = sys.exc_info()[1]\n \t\tsys.stderr.write(\"Cannot read opcodes file %s [%s]\\n\" % (fname, err))\n\n--- a/src/devices/cpu/mcs96/mcs96make.py\n+++ b/src/devices/cpu/mcs96/mcs96make.py\n@@ -73,7 +73,7 @@\n         self.ea = {}\n         self.macros = {}\n         try:\n-            f = open(fname, \"rU\")\n+            f = open(fname, \"r\")\n         except Exception:\n             err = sys.exc_info()[1]\n             sys.stderr.write(\"Cannot read opcodes file %s [%s]\\n\" % (fname, err))\n\n"
  },
  {
    "path": "packages/sx05re/libretro/melonds/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"melonds\"\nPKG_VERSION=\"7a3c11ff970cd36ca806961fae6db94b30dd5401\"\nPKG_SHA256=\"382d7522a626a7bd590b4d5dca0d76a2dd0805f41ab6ec130b683ee45b4a937d\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/melonds\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"DS emulator, sorta\"\nPKG_LONGDESC=\"DS emulator, sorta\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\nPKG_USE_CMAKE=\"no\"\n\n\n\nconfigure_target() {\n  cd ${PKG_BUILD}\n  PKG_MAKE_OPTS_TARGET+=\" HAVE_OPENGL=0 HAVE_NEON=1\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp melonds_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/meowpc98/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"meowpc98\"\nPKG_VERSION=\"dc905d4e10470ff65a38e8b9e1a75b43b9b12149\"\nPKG_SHA256=\"1d0e528fdccaa533a54529975a1b298f63fb52c338a8208dd34a6f7f35b20039\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Unknown\"\nPKG_SITE=\"https://github.com/libretro/libretro-meowPC98\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Neko Project 2 (PC98 emulator) port for libretro/RetroArch\"\nPKG_LONGDESC=\"Neko Project 2 (PC98 emulator) port for libretro/RetroArch\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -C libretro -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp libretro/nekop2_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/mesen/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"mesen\"\nPKG_VERSION=\"791c5e8153ee6e29691d45b5df2cf1151ff416f9\"\nPKG_SHA256=\"b39cad667603a116b38ddea1b96b88001d8e469637bd0ff3838a7a536eff1bf4\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/Mesen\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Mesen is a cross-platform (Windows & Linux) NES/Famicom emulator built in C++ and C#\"\nPKG_LONGDESC=\"Mesen is a cross-platform (Windows & Linux) NES/Famicom emulator built in C++ and C#\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\n  LTO=true make -C Libretro/\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp Libretro/mesen_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n\n"
  },
  {
    "path": "packages/sx05re/libretro/mesen-s/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"mesen-s\"\nPKG_VERSION=\"d4fca31a6004041d99b02199688f84c009c55967\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/Mesen-S\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Mesen-S is a cross-platform (Windows & Linux) SNES emulator built in C++ and C#\"\nPKG_LONGDESC=\"Mesen-S is a cross-platform (Windows & Linux) SNES emulator built in C++ and C#\"\nPKG_TOOLCHAIN=\"make\"\nGET_HANDLER_SUPPORT=\"git\"\n\nmake_target() {\n  LTO=true make -C Libretro/\n}\n\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp Libretro/mesen-s_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n\n"
  },
  {
    "path": "packages/sx05re/libretro/meteor/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"meteor\"\nPKG_VERSION=\"e533d300d0561564451bde55a2b73119c768453c\"\nPKG_SHA256=\"09df1661aa8d5c830e9ef3b62f01d7e2ae108bce2572e199b181e0c13d87e084\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/meteor-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Libretro port of Meteor GBA emulator.\"\nPKG_LONGDESC=\"Meteor is a Nintendo Gameboy Advance emulator.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\nPKG_USE_CMAKE=\"no\"\n\nmake_target() {\n  make -C ../libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ../libretro/meteor_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/mgba/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"mgba\"\nPKG_VERSION=\"c758314a639aa0066e7b65a8341448181b73c804\"\nPKG_SHA256=\"2cb97ada9b75d23ef4838fb2c1b52335bf0bba867f98d790d4ec2cf4d3b9e050\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MPLv2.0\"\nPKG_SITE=\"https://github.com/libretro/mgba\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"mGBA Game Boy Advance Emulator\"\nPKG_LONGDESC=\"mGBA is a new emulator for running Game Boy Advance games. It aims to be faster and more accurate than many existing Game Boy Advance emulators, as well as adding features that other emulators lack.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\nPKG_USE_CMAKE=\"no\"\n\nmake_target() {\n  cd ${PKG_BUILD}\n  if [[ \"${ARCH}\" =~ \"arm\" ]]; then\n    make -f Makefile.libretro platform=unix-armv HAVE_NEON=1\n  else\n    make -f Makefile.libretro\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mgba_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/minivmac/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n\n# EmuELEC package for Mini vMac (libretro-minivmac) core\n\nPKG_NAME=\"minivmac\"\nPKG_VERSION=\"e7fcfef\"\n\nPKG_LICENSE=\"GPL-2.0-only\"\nPKG_SITE=\"https://github.com/libretro/libretro-minivmac\"\nPKG_URL=\"${PKG_SITE}.git\"\n\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec/libretro\"\nPKG_SHORTDESC=\"Mini vMac Macintosh II emulator (libretro core)\"\nPKG_LONGDESC=\"libretro-minivmac is a libretro port of Mini vMac, a classic Macintosh II emulator.\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\n  make -C \"${PKG_BUILD}\"\n}\n\nmakeinstall_target() {\n  mkdir -p \"${INSTALL}/usr/lib/libretro\"\n  cp \"${PKG_BUILD}/minivmac_libretro.so\" \\\n     \"${INSTALL}/usr/lib/libretro/\"\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/mojozork/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2025-present EmuELEC (https://github.com/EmuELEC)\n\nPKG_NAME=\"mojozork\"\nPKG_VERSION=\"517ccff5ad6a811f948fadc0489b45c32f177c42\"\nPKG_SHA256=\"\"\nPKG_LICENSE=\"Zlib\"\nPKG_SITE=\"https://github.com/icculus/mojozork\"\nPKG_URL=\"https://github.com/icculus/mojozork/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"MojoZork: Z-Machine implementation as libretro core\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_LIBNAME=\"mojozork_libretro.so\"\nPKG_LIBPATH=\"${PKG_LIBNAME}\"\n\nmake_target() {\n  cd ${PKG_BUILD}\n  ${CC} -o ${PKG_LIBNAME} mojozork-libretro.c -shared -fPIC ${CFLAGS} ${LDFLAGS}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_LIBPATH} ${INSTALL}/usr/lib/libretro/\n}"
  },
  {
    "path": "packages/sx05re/libretro/mrboom/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"mrboom\"\nPKG_VERSION=\"d011acfbdb2d93ed38bd684ccfa0db79bda1c932\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/mrboom-libretro\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Mr.Boom is a 8 players Bomberman clone for RetroArch/Libretro\"\nPKG_LONGDESC=\"Mr.Boom is a 8 players Bomberman clone for RetroArch/Libretro\"\nPKG_TOOLCHAIN=\"make\"\nGET_HANDLER_SUPPORT=\"git\"\n\npre_configure_target() {\nif [ \"${ARCH}\" == \"arm\" ]; then\nPKG_MAKE_OPTS_TARGET=\"platform=classic_armv7_a7\"\n#else\n#PKG_MAKE_OPTS_TARGET=\"platform=classic_armv7_a7\"\nfi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mrboom_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/multiemu/config/ini/fmtownsftv.ini",
    "content": "﻿#\n# CORE CONFIGURATION OPTIONS\n#\nreadconfig                1\nwriteconfig               1\n\n#\n# CORE SEARCH PATH OPTIONS\n#\nhomepath                  /storage/roms/bios/mame/\nrompath                   /storage/roms/fmtownsux\nhashpath                  /storage/roms/bios/mame/hash\nsamplepath                /storage/roms/bios/mame/samples\nartpath                   /storage/roms/bios/mame/artwork\nctrlrpath                 system/mame/ctrlr\ninipath                   /storage/roms/bios/mame/ini\nfontpath                  system/mame/\ncheatpath                 /storage/roms/bios/mame/cheat\ncrosshairpath             system/mame/crosshair\npluginspath               /storage/roms/bios/mame/plugins\nlanguagepath              system/mame/language\nswpath                    system/mame/software\n\n#\n# CORE OUTPUT DIRECTORY OPTIONS\n#\ncfg_directory             /storage/roms/mame/fmtownsux/raiden//mame/cfg\nnvram_directory           /storage/roms/mame/fmtownsux/raiden//mame/nvram\ninput_directory           /storage/roms/mame/fmtownsux/raiden//mame/input\nstate_directory           /storage/roms/mame/fmtownsux/raiden//mame/states\nsnapshot_directory        /storage/roms/mame/fmtownsux/raiden//mame/snaps\ndiff_directory            /storage/roms/mame/fmtownsux/raiden//mame/diff\ncomment_directory         system/mame/comments\nshare_directory           system/mame/share\n\n#\n# CORE STATE/PLAYBACK OPTIONS\n#\nstate                     \nautosave                  0\nrewind                    0\nrewind_capacity           100\nplayback                  \nrecord                    \nexit_after_playback       0\nmngwrite                  \naviwrite                  \nwavwrite                  \nsnapname                  %g/%i\nsnapsize                  auto\nsnapview                  auto\nsnapbilinear              1\nstatename                 %g/mouse\nburnin                    0\n\n#\n# CORE PERFORMANCE OPTIONS\n#\nautoframeskip             0\nframeskip                 0\nseconds_to_run            0\nthrottle                  0\nsleep                     1\nspeed                     1.0\nrefreshspeed              0\nlowlatency                0\n\n#\n# CORE RENDER OPTIONS\n#\nkeepaspect                1\nunevenstretch             1\nunevenstretchx            0\nunevenstretchy            0\nautostretchxy             0\nintoverscan               0\nintscalex                 0\nintscaley                 0\n\n#\n# CORE ROTATION OPTIONS\n#\nrotate                    0\nror                       0\nrol                       0\nautoror                   0\nautorol                   0\nflipx                     0\nflipy                     0\n\n#\n# CORE ARTWORK OPTIONS\n#\nartwork_crop              0\nfallback_artwork          \noverride_artwork          \n\n#\n# CORE SCREEN OPTIONS\n#\nbrightness                1.0\ncontrast                  1.0\ngamma                     1.0\npause_brightness          0.65\neffect                    none\n\n#\n# CORE VECTOR OPTIONS\n#\nbeam_width_min            1.0\nbeam_width_max            1.0\nbeam_dot_size             1.0\nbeam_intensity_weight     0\nflicker                   0\n\n#\n# CORE SOUND OPTIONS\n#\nsamplerate                48000\nsamples                   1\nvolume                    0\ncompressor                1\nspeaker_report            0\n\n#\n# CORE INPUT OPTIONS\n#\ncoin_lockout              1\nctrlr                     \nmouse                     1\njoystick                  1\nlightgun                  0\nmultikeyboard             0\nmultimouse                1\nsteadykey                 0\nui_active                 1\noffscreen_reload          0\njoystick_map              auto\njoystick_deadzone         0.15\njoystick_saturation       0.85\njoystick_threshold        0.30\nnatural                   0\njoystick_contradictory    0\ncoin_impulse              0\n\n#\n# CORE INPUT AUTOMATIC ENABLE OPTIONS\n#\npaddle_device             keyboard\nadstick_device            keyboard\npedal_device              keyboard\ndial_device               keyboard\ntrackball_device          keyboard\nlightgun_device           keyboard\npositional_device         keyboard\nmouse_device              mouse\n\n#\n# CORE DEBUGGING OPTIONS\n#\nverbose                   0\nlog                       0\noslog                     0\ndebug                     0\nupdate_in_pause           1\ndebugscript               \ndebuglog                  0\n\n#\n# CORE COMM OPTIONS\n#\ncomm_localhost            0.0.0.0\ncomm_localport            15112\ncomm_remotehost           127.0.0.1\ncomm_remoteport           15112\ncomm_framesync            0\n\n#\n# CORE MISC OPTIONS\n#\ndrc                       1\ndrc_use_c                 0\ndrc_log_uml               0\ndrc_log_native            0\nbios                      \ncheat                     0\nskip_gameinfo             0\nuifont                    default\nui                        cabinet\nramsize                   6M\nconfirm_quit              0\nui_mouse                  1\nlanguage                  \nnvram_save                1\n\n#\n# SCRIPTING OPTIONS\n#\nautoboot_command          \nautoboot_delay            0\nautoboot_script           \nconsole                   0\nplugins                   1\nplugin                    \nnoplugin                  \n\n#\n# HTTP SERVER OPTIONS\n#\nhttp                      0\nhttp_port                 8080\nhttp_root                 web\n\n#\n# OSD INPUT MAPPING OPTIONS\n#\nuimodekey                 auto\ncontroller_map            none\nbackground_input          0\n\n#\n# OSD FONT OPTIONS\n#\nuifontprovider            auto\n\n#\n# OSD OUTPUT OPTIONS\n#\noutput                    auto\n\n#\n# OSD INPUT OPTIONS\n#\nkeyboardprovider          auto\nmouseprovider             auto\nlightgunprovider          auto\njoystickprovider          auto\n\n#\n# OSD DEBUGGING OPTIONS\n#\ndebugger                  auto\ndebugger_port             23946\ndebugger_font             auto\ndebugger_font_size        0\nwatchdog                  0\n\n#\n# OSD PERFORMANCE OPTIONS\n#\nnumprocessors             auto\nbench                     0\n\n#\n# OSD VIDEO OPTIONS\n#\nvideo                     auto\nnumscreens                1\nwindow                    0\nmaximize                  1\nwaitvsync                 0\nsyncrefresh               0\nmonitorprovider           auto\n\n#\n# OSD PER-WINDOW VIDEO OPTIONS\n#\nscreen                    auto\naspect                    auto\nresolution                auto\nview                      auto\nscreen0                   auto\naspect0                   auto\nresolution0               auto\nview0                     auto\nscreen1                   auto\naspect1                   auto\nresolution1               auto\nview1                     auto\nscreen2                   auto\naspect2                   auto\nresolution2               auto\nview2                     auto\nscreen3                   auto\naspect3                   auto\nresolution3               auto\nview3                     auto\n\n#\n# OSD FULL SCREEN OPTIONS\n#\nswitchres                 0\n\n#\n# OSD ACCELERATED VIDEO OPTIONS\n#\nfilter                    1\nprescale                  1\n\n#\n# OSD SOUND OPTIONS\n#\nsound                     auto\naudio_latency             2\n\n#\n# OSD MIDI OPTIONS\n#\nmidiprovider              auto\n\n#\n# OSD EMULATED NETWORKING OPTIONS\n#\nnetworkprovider           auto\n\n#\n# BGFX POST-PROCESSING OPTIONS\n#\nbgfx_path                 bgfx\nbgfx_backend              auto\nbgfx_debug                0\nbgfx_screen_chains        \nbgfx_shadow_mask          slot-mask.png\nbgfx_lut                  lut-default.png\nbgfx_avi_name             auto\n\n#\n# SDL VIDEO OPTIONS\n#\ncenterh                   1\ncenterv                   1\nscalemode                 none\n\n#\n# SDL JOYSTICK MAPPING\n#\njoy_idx1                  auto\njoy_idx2                  auto\njoy_idx3                  auto\njoy_idx4                  auto\njoy_idx5                  auto\njoy_idx6                  auto\njoy_idx7                  auto\njoy_idx8                  auto\nsixaxis                   0\n\n#\n# SDL MOUSE MAPPING\n#\nmouse_index1              auto\nmouse_index2              auto\nmouse_index3              auto\nmouse_index4              auto\nmouse_index5              auto\nmouse_index6              auto\nmouse_index7              auto\nmouse_index8              auto\n\n#\n# SDL KEYBOARD MAPPING\n#\nkeyb_idx1                 auto\nkeyb_idx2                 auto\nkeyb_idx3                 auto\nkeyb_idx4                 auto\nkeyb_idx5                 auto\nkeyb_idx6                 auto\nkeyb_idx7                 auto\nkeyb_idx8                 auto\n\n#\n# FRONTEND COMMAND OPTIONS\n#\ndtd                       1\n\n#\n# SLOT DEVICES\n#\npad1                      townspad\npad2                      mouse\n\n#\n# IMAGE DEVICES\n#\nfloppydisk1               \nfloppydisk2               \ncdrom                     \"/storage/roms/fmtownsux/mahoudai/mahou daisakusen (japan).chd\"\nmemcard                   \nharddisk1                 \nharddisk2                 \nharddisk3                 \nharddisk4                 \nharddisk5                 \n"
  },
  {
    "path": "packages/sx05re/libretro/multiemu/config/ini/fmtownshr.ini",
    "content": "﻿#\n# CORE CONFIGURATION OPTIONS\n#\nreadconfig                1\nwriteconfig               1\n\n#\n# CORE SEARCH PATH OPTIONS\n#\nhomepath                  /storage/roms/bios/mame/\nrompath                   /storage/roms/fmtownsux\nhashpath                  /storage/roms/bios/mame/hash\nsamplepath                /storage/roms/bios/mame/samples\nartpath                   /storage/roms/bios/mame/artwork\nctrlrpath                 system/mame/ctrlr\ninipath                   /storage/roms/bios/mame/ini\nfontpath                  system/mame/\ncheatpath                 /storage/roms/bios/mame/cheat\ncrosshairpath             system/mame/crosshair\npluginspath               /storage/roms/bios/mame/plugins\nlanguagepath              system/mame/language\nswpath                    system/mame/software\n\n#\n# CORE OUTPUT DIRECTORY OPTIONS\n#\ncfg_directory             /storage/roms/mame/fmtownsux/raiden//mame/cfg\nnvram_directory           /storage/roms/mame/fmtownsux/raiden//mame/nvram\ninput_directory           /storage/roms/mame/fmtownsux/raiden//mame/input\nstate_directory           /storage/roms/mame/fmtownsux/raiden//mame/states\nsnapshot_directory        /storage/roms/mame/fmtownsux/raiden//mame/snaps\ndiff_directory            /storage/roms/mame/fmtownsux/raiden//mame/diff\ncomment_directory         system/mame/comments\nshare_directory           system/mame/share\n\n#\n# CORE STATE/PLAYBACK OPTIONS\n#\nstate                     \nautosave                  0\nrewind                    0\nrewind_capacity           100\nplayback                  \nrecord                    \nexit_after_playback       0\nmngwrite                  \naviwrite                  \nwavwrite                  \nsnapname                  %g/%i\nsnapsize                  auto\nsnapview                  auto\nsnapbilinear              1\nstatename                 %g/-ui_active\nburnin                    0\n\n#\n# CORE PERFORMANCE OPTIONS\n#\nautoframeskip             0\nframeskip                 0\nseconds_to_run            0\nthrottle                  0\nsleep                     1\nspeed                     1.0\nrefreshspeed              0\nlowlatency                0\n\n#\n# CORE RENDER OPTIONS\n#\nkeepaspect                1\nunevenstretch             1\nunevenstretchx            0\nunevenstretchy            0\nautostretchxy             0\nintoverscan               0\nintscalex                 0\nintscaley                 0\n\n#\n# CORE ROTATION OPTIONS\n#\nrotate                    0\nror                       0\nrol                       0\nautoror                   0\nautorol                   0\nflipx                     0\nflipy                     0\n\n#\n# CORE ARTWORK OPTIONS\n#\nartwork_crop              0\nfallback_artwork          \noverride_artwork          \n\n#\n# CORE SCREEN OPTIONS\n#\nbrightness                1.0\ncontrast                  1.0\ngamma                     1.0\npause_brightness          0.65\neffect                    none\n\n#\n# CORE VECTOR OPTIONS\n#\nbeam_width_min            1.0\nbeam_width_max            1.0\nbeam_dot_size             1.0\nbeam_intensity_weight     0\nflicker                   0\n\n#\n# CORE SOUND OPTIONS\n#\nsamplerate                48000\nsamples                   1\nvolume                    0\ncompressor                1\nspeaker_report            0\n\n#\n# CORE INPUT OPTIONS\n#\ncoin_lockout              1\nctrlr                     \nmouse                     1\njoystick                  1\nlightgun                  0\nmultikeyboard             0\nmultimouse                1\nsteadykey                 0\nui_active                 1\noffscreen_reload          0\njoystick_map              auto\njoystick_deadzone         0.15\njoystick_saturation       0.85\njoystick_threshold        0.30\nnatural                   0\njoystick_contradictory    0\ncoin_impulse              0\n\n#\n# CORE INPUT AUTOMATIC ENABLE OPTIONS\n#\npaddle_device             keyboard\nadstick_device            keyboard\npedal_device              keyboard\ndial_device               keyboard\ntrackball_device          keyboard\nlightgun_device           keyboard\npositional_device         keyboard\nmouse_device              mouse\n\n#\n# CORE DEBUGGING OPTIONS\n#\nverbose                   0\nlog                       0\noslog                     0\ndebug                     0\nupdate_in_pause           1\ndebugscript               \ndebuglog                  0\n\n#\n# CORE COMM OPTIONS\n#\ncomm_localhost            0.0.0.0\ncomm_localport            15112\ncomm_remotehost           127.0.0.1\ncomm_remoteport           15112\ncomm_framesync            0\n\n#\n# CORE MISC OPTIONS\n#\ndrc                       1\ndrc_use_c                 0\ndrc_log_uml               0\ndrc_log_native            0\nbios                      \ncheat                     0\nskip_gameinfo             0\nuifont                    default\nui                        cabinet\nramsize                   2M\nconfirm_quit              0\nui_mouse                  1\nlanguage                  \nnvram_save                1\n\n#\n# SCRIPTING OPTIONS\n#\nautoboot_command          \nautoboot_delay            0\nautoboot_script           \nconsole                   0\nplugins                   1\nplugin                    \nnoplugin                  \n\n#\n# HTTP SERVER OPTIONS\n#\nhttp                      0\nhttp_port                 8080\nhttp_root                 web\n\n#\n# OSD INPUT MAPPING OPTIONS\n#\nuimodekey                 auto\ncontroller_map            none\nbackground_input          0\n\n#\n# OSD FONT OPTIONS\n#\nuifontprovider            auto\n\n#\n# OSD OUTPUT OPTIONS\n#\noutput                    auto\n\n#\n# OSD INPUT OPTIONS\n#\nkeyboardprovider          auto\nmouseprovider             auto\nlightgunprovider          auto\njoystickprovider          auto\n\n#\n# OSD DEBUGGING OPTIONS\n#\ndebugger                  auto\ndebugger_port             23946\ndebugger_font             auto\ndebugger_font_size        0\nwatchdog                  0\n\n#\n# OSD PERFORMANCE OPTIONS\n#\nnumprocessors             auto\nbench                     0\n\n#\n# OSD VIDEO OPTIONS\n#\nvideo                     auto\nnumscreens                1\nwindow                    0\nmaximize                  1\nwaitvsync                 0\nsyncrefresh               0\nmonitorprovider           auto\n\n#\n# OSD PER-WINDOW VIDEO OPTIONS\n#\nscreen                    auto\naspect                    auto\nresolution                auto\nview                      auto\nscreen0                   auto\naspect0                   auto\nresolution0               auto\nview0                     auto\nscreen1                   auto\naspect1                   auto\nresolution1               auto\nview1                     auto\nscreen2                   auto\naspect2                   auto\nresolution2               auto\nview2                     auto\nscreen3                   auto\naspect3                   auto\nresolution3               auto\nview3                     auto\n\n#\n# OSD FULL SCREEN OPTIONS\n#\nswitchres                 0\n\n#\n# OSD ACCELERATED VIDEO OPTIONS\n#\nfilter                    1\nprescale                  1\n\n#\n# OSD SOUND OPTIONS\n#\nsound                     auto\naudio_latency             2\n\n#\n# OSD MIDI OPTIONS\n#\nmidiprovider              auto\n\n#\n# OSD EMULATED NETWORKING OPTIONS\n#\nnetworkprovider           auto\n\n#\n# BGFX POST-PROCESSING OPTIONS\n#\nbgfx_path                 bgfx\nbgfx_backend              auto\nbgfx_debug                0\nbgfx_screen_chains        \nbgfx_shadow_mask          slot-mask.png\nbgfx_lut                  lut-default.png\nbgfx_avi_name             auto\n\n#\n# SDL VIDEO OPTIONS\n#\ncenterh                   1\ncenterv                   1\nscalemode                 none\n\n#\n# SDL JOYSTICK MAPPING\n#\njoy_idx1                  auto\njoy_idx2                  auto\njoy_idx3                  auto\njoy_idx4                  auto\njoy_idx5                  auto\njoy_idx6                  auto\njoy_idx7                  auto\njoy_idx8                  auto\nsixaxis                   0\n\n#\n# SDL MOUSE MAPPING\n#\nmouse_index1              auto\nmouse_index2              auto\nmouse_index3              auto\nmouse_index4              auto\nmouse_index5              auto\nmouse_index6              auto\nmouse_index7              auto\nmouse_index8              auto\n\n#\n# SDL KEYBOARD MAPPING\n#\nkeyb_idx1                 auto\nkeyb_idx2                 auto\nkeyb_idx3                 auto\nkeyb_idx4                 auto\nkeyb_idx5                 auto\nkeyb_idx6                 auto\nkeyb_idx7                 auto\nkeyb_idx8                 auto\n\n#\n# FRONTEND COMMAND OPTIONS\n#\ndtd                       1\n\n#\n# SLOT DEVICES\n#\npad1                      townspad\npad2                      mouse\n\n#\n# IMAGE DEVICES\n#\nfloppydisk1               /storage/roms/fmtownsux/rbisland/disk1.hdm\nfloppydisk2               \ncdrom                     \"/storage/roms/fmtownsux/rbisland/rainbow islands - the story of bubble bobble 2 - extra version (japan).chd\"\nmemcard                   \nharddisk1                 \nharddisk2                 \nharddisk3                 \nharddisk4                 \nharddisk5                 \n"
  },
  {
    "path": "packages/sx05re/libretro/multiemu/config/ini/fmtownsux.ini",
    "content": "﻿#\n# CORE CONFIGURATION OPTIONS\n#\nreadconfig                1\nwriteconfig               1\n\n#\n# CORE SEARCH PATH OPTIONS\n#\nhomepath                  /storage/roms/bios/mame/\nrompath                   /storage/roms/fmtownsux\nhashpath                  /storage/roms/bios/mame/hash\nsamplepath                /storage/roms/bios/mame/samples\nartpath                   /storage/roms/bios/mame/artwork\nctrlrpath                 system/mame/ctrlr\ninipath                   /storage/roms/bios/mame/ini\nfontpath                  system/mame/\ncheatpath                 /storage/roms/bios/mame/cheat\ncrosshairpath             system/mame/crosshair\npluginspath               /storage/roms/bios/mame/plugins\nlanguagepath              system/mame/language\nswpath                    system/mame/software\n\n#\n# CORE OUTPUT DIRECTORY OPTIONS\n#\ncfg_directory             /storage/roms/mame/fmtownsux/raiden//mame/cfg\nnvram_directory           /storage/roms/mame/fmtownsux/raiden//mame/nvram\ninput_directory           /storage/roms/mame/fmtownsux/raiden//mame/input\nstate_directory           /storage/roms/mame/fmtownsux/raiden//mame/states\nsnapshot_directory        /storage/roms/mame/fmtownsux/raiden//mame/snaps\ndiff_directory            /storage/roms/mame/fmtownsux/raiden//mame/diff\ncomment_directory         system/mame/comments\nshare_directory           system/mame/share\n\n#\n# CORE STATE/PLAYBACK OPTIONS\n#\nstate                     \nautosave                  0\nrewind                    0\nrewind_capacity           100\nplayback                  \nrecord                    \nexit_after_playback       0\nmngwrite                  \naviwrite                  \nwavwrite                  \nsnapname                  %g/%i\nsnapsize                  auto\nsnapview                  auto\nsnapbilinear              1\nstatename                 %g/mouse\nburnin                    0\n\n#\n# CORE PERFORMANCE OPTIONS\n#\nautoframeskip             0\nframeskip                 0\nseconds_to_run            0\nthrottle                  0\nsleep                     1\nspeed                     1.0\nrefreshspeed              0\nlowlatency                0\n\n#\n# CORE RENDER OPTIONS\n#\nkeepaspect                1\nunevenstretch             1\nunevenstretchx            0\nunevenstretchy            0\nautostretchxy             0\nintoverscan               0\nintscalex                 0\nintscaley                 0\n\n#\n# CORE ROTATION OPTIONS\n#\nrotate                    0\nror                       0\nrol                       0\nautoror                   0\nautorol                   0\nflipx                     0\nflipy                     0\n\n#\n# CORE ARTWORK OPTIONS\n#\nartwork_crop              0\nfallback_artwork          \noverride_artwork          \n\n#\n# CORE SCREEN OPTIONS\n#\nbrightness                1.0\ncontrast                  1.0\ngamma                     1.0\npause_brightness          0.65\neffect                    none\n\n#\n# CORE VECTOR OPTIONS\n#\nbeam_width_min            1.0\nbeam_width_max            1.0\nbeam_dot_size             1.0\nbeam_intensity_weight     0\nflicker                   0\n\n#\n# CORE SOUND OPTIONS\n#\nsamplerate                48000\nsamples                   1\nvolume                    0\ncompressor                1\nspeaker_report            0\n\n#\n# CORE INPUT OPTIONS\n#\ncoin_lockout              1\nctrlr                     \nmouse                     1\njoystick                  1\nlightgun                  0\nmultikeyboard             0\nmultimouse                1\nsteadykey                 0\nui_active                 1\noffscreen_reload          0\njoystick_map              auto\njoystick_deadzone         0.15\njoystick_saturation       0.85\njoystick_threshold        0.30\nnatural                   0\njoystick_contradictory    0\ncoin_impulse              0\n\n#\n# CORE INPUT AUTOMATIC ENABLE OPTIONS\n#\npaddle_device             keyboard\nadstick_device            keyboard\npedal_device              keyboard\ndial_device               keyboard\ntrackball_device          keyboard\nlightgun_device           keyboard\npositional_device         keyboard\nmouse_device              mouse\n\n#\n# CORE DEBUGGING OPTIONS\n#\nverbose                   1\nlog                       0\noslog                     0\ndebug                     0\nupdate_in_pause           1\ndebugscript               \ndebuglog                  0\n\n#\n# CORE COMM OPTIONS\n#\ncomm_localhost            0.0.0.0\ncomm_localport            15112\ncomm_remotehost           127.0.0.1\ncomm_remoteport           15112\ncomm_framesync            0\n\n#\n# CORE MISC OPTIONS\n#\ndrc                       1\ndrc_use_c                 0\ndrc_log_uml               0\ndrc_log_native            0\nbios                      \ncheat                     0\nskip_gameinfo             0\nuifont                    default\nui                        cabinet\nramsize                   6M\nconfirm_quit              0\nui_mouse                  1\nlanguage                  \nnvram_save                1\n\n#\n# SCRIPTING OPTIONS\n#\nautoboot_command          \nautoboot_delay            0\nautoboot_script           \nconsole                   0\nplugins                   1\nplugin                    \nnoplugin                  \n\n#\n# HTTP SERVER OPTIONS\n#\nhttp                      0\nhttp_port                 8080\nhttp_root                 web\n\n#\n# OSD INPUT MAPPING OPTIONS\n#\nuimodekey                 auto\ncontroller_map            none\nbackground_input          0\n\n#\n# OSD FONT OPTIONS\n#\nuifontprovider            auto\n\n#\n# OSD OUTPUT OPTIONS\n#\noutput                    auto\n\n#\n# OSD INPUT OPTIONS\n#\nkeyboardprovider          auto\nmouseprovider             auto\nlightgunprovider          auto\njoystickprovider          auto\n\n#\n# OSD DEBUGGING OPTIONS\n#\ndebugger                  auto\ndebugger_port             23946\ndebugger_font             auto\ndebugger_font_size        0\nwatchdog                  0\n\n#\n# OSD PERFORMANCE OPTIONS\n#\nnumprocessors             auto\nbench                     0\n\n#\n# OSD VIDEO OPTIONS\n#\nvideo                     auto\nnumscreens                1\nwindow                    0\nmaximize                  1\nwaitvsync                 0\nsyncrefresh               0\nmonitorprovider           auto\n\n#\n# OSD PER-WINDOW VIDEO OPTIONS\n#\nscreen                    auto\naspect                    auto\nresolution                auto\nview                      auto\nscreen0                   auto\naspect0                   auto\nresolution0               auto\nview0                     auto\nscreen1                   auto\naspect1                   auto\nresolution1               auto\nview1                     auto\nscreen2                   auto\naspect2                   auto\nresolution2               auto\nview2                     auto\nscreen3                   auto\naspect3                   auto\nresolution3               auto\nview3                     auto\n\n#\n# OSD FULL SCREEN OPTIONS\n#\nswitchres                 0\n\n#\n# OSD ACCELERATED VIDEO OPTIONS\n#\nfilter                    1\nprescale                  1\n\n#\n# OSD SOUND OPTIONS\n#\nsound                     auto\naudio_latency             2\n\n#\n# OSD MIDI OPTIONS\n#\nmidiprovider              auto\n\n#\n# OSD EMULATED NETWORKING OPTIONS\n#\nnetworkprovider           auto\n\n#\n# BGFX POST-PROCESSING OPTIONS\n#\nbgfx_path                 bgfx\nbgfx_backend              auto\nbgfx_debug                0\nbgfx_screen_chains        default\nbgfx_shadow_mask          slot-mask.png\nbgfx_lut                  lut-default.png\nbgfx_avi_name             auto\n\n#\n# SDL VIDEO OPTIONS\n#\ncenterh                   1\ncenterv                   1\nscalemode                 none\n\n#\n# SDL JOYSTICK MAPPING\n#\njoy_idx1                  auto\njoy_idx2                  auto\njoy_idx3                  auto\njoy_idx4                  auto\njoy_idx5                  auto\njoy_idx6                  auto\njoy_idx7                  auto\njoy_idx8                  auto\nsixaxis                   0\n\n#\n# SDL MOUSE MAPPING\n#\nmouse_index1              auto\nmouse_index2              auto\nmouse_index3              auto\nmouse_index4              auto\nmouse_index5              auto\nmouse_index6              auto\nmouse_index7              auto\nmouse_index8              auto\n\n#\n# SDL KEYBOARD MAPPING\n#\nkeyb_idx1                 auto\nkeyb_idx2                 auto\nkeyb_idx3                 auto\nkeyb_idx4                 auto\nkeyb_idx5                 auto\nkeyb_idx6                 auto\nkeyb_idx7                 auto\nkeyb_idx8                 auto\n\n#\n# FRONTEND COMMAND OPTIONS\n#\ndtd                       1\n\n#\n# SLOT DEVICES\n#\npad1                      townspad\npad2                      mouse\n\n#\n# IMAGE DEVICES\n#\nfloppydisk1               /storage/roms/fmtownsux/rbisland/disk1.hdm\nfloppydisk2               \ncdrom                     \"/storage/roms/fmtownsux/mahoudai/mahou daisakusen (japan).chd\"\nmemcard                   \nharddisk1                 /storage/roms/fmtownsux/alltynex/alltynex.h0\nharddisk2                 \nharddisk3                 \nharddisk4                 \nharddisk5                 \n"
  },
  {
    "path": "packages/sx05re/libretro/multiemu/config/ini/mame.ini",
    "content": "#\r\n# CORE CONFIGURATION OPTIONS\r\n#\r\nreadconfig                1\r\nwriteconfig               1\r\n\r\n#\r\n# CORE SEARCH PATH OPTIONS\r\n#\r\nhomepath                  /storage/roms/bios/mame/\r\nrompath                   /storage/roms/bios/mame/bios;/storage/roms/pgm2;/storage/roms/fmtownsux\r\nhashpath                  /storage/roms/bios/mame/hash\r\nsamplepath                /storage/roms/bios/mame/samples\r\nartpath                   /storage/roms/bios/mame/artwork\r\nctrlrpath                 system/mame/ctrlr\r\ninipath                   /storage/roms/bios/mame/ini\r\nfontpath                  system/mame/\r\ncheatpath                 /storage/roms/bios/mame/cheat\r\ncrosshairpath             system/mame/crosshair\r\npluginspath               /storage/roms/bios/mame/plugins\r\nlanguagepath              system/mame/language\r\nswpath                    system/mame/software\r\n\r\n#\r\n# CORE OUTPUT DIRECTORY OPTIONS\r\n#\r\ncfg_directory             /storage/roms/mame//cfg\r\nnvram_directory           /storage/roms/mame/nvram\r\ninput_directory           /storage/roms/mame/input\r\nstate_directory           /storage/roms/mame/states\r\nsnapshot_directory        /storage/roms/mame/snaps\r\ndiff_directory            /storage/roms/mame/diff\r\ncomment_directory         system/mame/comments\r\nshare_directory           system/mame/share\r\n\r\n#\r\n# CORE STATE/PLAYBACK OPTIONS\r\n#\r\nstate                     \r\nautosave                  0\r\nrewind                    0\r\nrewind_capacity           100\r\nplayback                  \r\nrecord                    \r\nexit_after_playback       0\r\nmngwrite                  \r\naviwrite                  \r\nwavwrite                  \r\nsnapname                  %g/%i\r\nsnapsize                  auto\r\nsnapview                  auto\r\nsnapbilinear              1\r\nstatename                 %g\r\nburnin                    0\r\n\r\n#\r\n# CORE PERFORMANCE OPTIONS\r\n#\r\nautoframeskip             1\r\nframeskip                 0\r\nseconds_to_run            0\r\nthrottle                  1\r\nsleep                     1\r\nspeed                     1.0\r\nrefreshspeed              0\r\nlowlatency                0\r\n\r\n#\r\n# CORE RENDER OPTIONS\r\n#\r\nkeepaspect                1\r\nunevenstretch             1\r\nunevenstretchx            0\r\nunevenstretchy            0\r\nautostretchxy             0\r\nintoverscan               0\r\nintscalex                 0\r\nintscaley                 0\r\n\r\n#\r\n# CORE ROTATION OPTIONS\r\n#\r\nrotate                    0\r\nror                       0\r\nrol                       0\r\nautoror                   0\r\nautorol                   0\r\nflipx                     0\r\nflipy                     0\r\n\r\n#\r\n# CORE ARTWORK OPTIONS\r\n#\r\nartwork_crop              0\r\nfallback_artwork          \r\noverride_artwork          \r\n\r\n#\r\n# CORE SCREEN OPTIONS\r\n#\r\nbrightness                1.0\r\ncontrast                  1.0\r\ngamma                     1.0\r\npause_brightness          0.65\r\neffect                    none\r\n\r\n#\r\n# CORE VECTOR OPTIONS\r\n#\r\nbeam_width_min            1.0\r\nbeam_width_max            1.0\r\nbeam_dot_size             1.0\r\nbeam_intensity_weight     0\r\nflicker                   0\r\n\r\n#\r\n# CORE SOUND OPTIONS\r\n#\r\nsamplerate                48000\r\nsamples                   1\r\nvolume                    0\r\ncompressor                1\r\nspeaker_report            0\r\n\r\n#\r\n# CORE INPUT OPTIONS\r\n#\r\ncoin_lockout              1\r\nctrlr                    \r\nmouse                     1\r\njoystick                  1\r\nlightgun                  0\r\nmultikeyboard             0\r\nmultimouse                1\r\nsteadykey                 0\r\nui_active                 1\r\noffscreen_reload          0\r\njoystick_map              auto\r\njoystick_deadzone         0.20\r\njoystick_saturation       1.00\r\nnatural                   0\r\njoystick_contradictory    0\r\ncoin_impulse              0\r\n\r\n#\r\n# CORE INPUT AUTOMATIC ENABLE OPTIONS\r\n#\r\npaddle_device             keyboard\r\nadstick_device            keyboard\r\npedal_device              keyboard\r\ndial_device               keyboard\r\ntrackball_device          keyboard\r\nlightgun_device           keyboard\r\npositional_device         keyboard\r\nmouse_device              mouse\r\n\r\n#\r\n# CORE DEBUGGING OPTIONS\r\n#\r\nverbose                   0\r\nlog                       0\r\noslog                     0\r\ndebug                     0\r\nupdate_in_pause           0\r\ndebugscript               \r\ndebuglog                  0\r\n\r\n#\r\n# CORE COMM OPTIONS\r\n#\r\ncomm_localhost            0.0.0.0\r\ncomm_localport            15112\r\ncomm_remotehost           127.0.0.1\r\ncomm_remoteport           15112\r\ncomm_framesync            0\r\n\r\n#\r\n# CORE MISC OPTIONS\r\n#\r\ndrc                       1\r\ndrc_use_c                 0\r\ndrc_log_uml               0\r\ndrc_log_native            0\r\nbios                      \r\ncheat                     1\r\nskip_gameinfo             0\r\nuifont                    default\r\nui                        cabinet\r\nramsize                   \r\nconfirm_quit              0\r\nui_mouse                  1\r\nlanguage                  \r\nnvram_save                1\r\n\r\n#\r\n# SCRIPTING OPTIONS\r\n#\r\nautoboot_command          \r\nautoboot_delay            0\r\nautoboot_script           \r\nconsole                   0\r\nplugins                   1\r\nplugin                    \r\nnoplugin                  \r\n\r\n#\r\n# HTTP SERVER OPTIONS\r\n#\r\nhttp                      0\r\nhttp_port                 8080\r\nhttp_root                 web\r\n\r\n#\r\n# OSD KEYBOARD MAPPING OPTIONS\r\n#\r\nuimodekey                 auto\r\n\r\n#\r\n# OSD FONT OPTIONS\r\n#\r\nuifontprovider            auto\r\n\r\n#\r\n# OSD OUTPUT OPTIONS\r\n#\r\noutput                    auto\r\n\r\n#\r\n# OSD INPUT OPTIONS\r\n#\r\nkeyboardprovider          auto\r\nmouseprovider             auto\r\nlightgunprovider          auto\r\njoystickprovider          auto\r\n\r\n#\r\n# OSD DEBUGGING OPTIONS\r\n#\r\ndebugger                  auto\r\ndebugger_port             23946\r\ndebugger_font             auto\r\ndebugger_font_size        0\r\nwatchdog                  0\r\n\r\n#\r\n# OSD PERFORMANCE OPTIONS\r\n#\r\nnumprocessors             auto\r\nbench                     0\r\n\r\n#\r\n# OSD VIDEO OPTIONS\r\n#\r\nvideo                     auto\r\nnumscreens                1\r\nwindow                    0\r\nmaximize                  1\r\nwaitvsync                 0\r\nsyncrefresh               0\r\nmonitorprovider           auto\r\n\r\n#\r\n# OSD PER-WINDOW VIDEO OPTIONS\r\n#\r\nscreen                    auto\r\naspect                    auto\r\nresolution                auto\r\nview                      auto\r\nscreen0                   auto\r\naspect0                   auto\r\nresolution0               auto\r\nview0                     auto\r\nscreen1                   auto\r\naspect1                   auto\r\nresolution1               auto\r\nview1                     auto\r\nscreen2                   auto\r\naspect2                   auto\r\nresolution2               auto\r\nview2                     auto\r\nscreen3                   auto\r\naspect3                   auto\r\nresolution3               auto\r\nview3                     auto\r\n\r\n#\r\n# OSD FULL SCREEN OPTIONS\r\n#\r\nswitchres                 0\r\n\r\n#\r\n# OSD ACCELERATED VIDEO OPTIONS\r\n#\r\nfilter                    1\r\nprescale                  1\r\n\r\n#\r\n# OSD SOUND OPTIONS\r\n#\r\nsound                     auto\r\naudio_latency             2\r\n\r\n#\r\n# BGFX POST-PROCESSING OPTIONS\r\n#\r\nbgfx_path                 bgfx\r\nbgfx_backend              auto\r\nbgfx_debug                0\r\nbgfx_screen_chains        default\r\nbgfx_shadow_mask          slot-mask.png\r\nbgfx_lut                  lut-default.png\r\nbgfx_avi_name             auto\r\n\r\n#\r\n# SDL VIDEO OPTIONS\r\n#\r\ncenterh                   1\r\ncenterv                   1\r\nscalemode                 none\r\n\r\n#\r\n# SDL JOYSTICK MAPPING\r\n#\r\njoy_idx1                  auto\r\njoy_idx2                  auto\r\njoy_idx3                  auto\r\njoy_idx4                  auto\r\njoy_idx5                  auto\r\njoy_idx6                  auto\r\njoy_idx7                  auto\r\njoy_idx8                  auto\r\nsixaxis                   0\r\n\r\n#\r\n# SDL MOUSE MAPPING\r\n#\r\nmouse_index1              auto\r\nmouse_index2              auto\r\nmouse_index3              auto\r\nmouse_index4              auto\r\nmouse_index5              auto\r\nmouse_index6              auto\r\nmouse_index7              auto\r\nmouse_index8              auto\r\n\r\n#\r\n# SDL KEYBOARD MAPPING\r\n#\r\nkeyb_idx1                 auto\r\nkeyb_idx2                 auto\r\nkeyb_idx3                 auto\r\nkeyb_idx4                 auto\r\nkeyb_idx5                 auto\r\nkeyb_idx6                 auto\r\nkeyb_idx7                 auto\r\nkeyb_idx8                 auto\r\n\r\n#\r\n# SDL LOWLEVEL DRIVER OPTIONS\r\n#\r\nvideodriver               auto\r\nrenderdriver              auto\r\naudiodriver               auto\r\n\r\n#\r\n# FRONTEND COMMAND OPTIONS\r\n#\r\ndtd                       1\r\n"
  },
  {
    "path": "packages/sx05re/libretro/multiemu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019 Trond Haugland (trondah@gmail.com)\n\nPKG_NAME=\"multiemu\"\nPKG_VERSION=\"61743c76180f1ad454227ed1be0261a071d37d67\"\nPKG_SHA256=\"cf61595e30235758f1598f575a075db243f9d32d1fb8994679a812d59b936917\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/mame\"\nPKG_URL=\"https://github.com/libretro/mame/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib flac sqlite expat\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Apple 2, Fmtowns and pgm2 MAME -  Multiple Arcade Machine Emulator\"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\n\nPTR64=\"1\"\nNOASM=\"0\"\n\nif [ \"${ARCH}\" == \"arm\" ]; then\n  NOASM=\"1\"\nfi\n\nPKG_MAKE_OPTS_TARGET=\"REGENIE=1 \\\n\t\t      VERBOSE=1 \\\n\t\t      NOWERROR=1 \\\n\t\t      OPENMP=1 \\\n\t\t      CROSS_BUILD=1 \\\n\t\t      TOOLS=0 \\\n\t\t      RETRO=1 \\\n\t\t      PTR64=${PTR64} \\\n\t\t      NOASM=${NOASM} \\\n\t\t      PYTHON_EXECUTABLE=python3 \\\n\t\t      CONFIG=libretro \\\n\t\t      LIBRETRO_OS=unix \\\n\t\t      LIBRETRO_CPU=arm64 \\\n\t\t      PLATFORM=arm64 \\\n\t\t      ARCH= \\\n\t\t      TARGET=mame \\\n\t\t      SUBTARGET=multiemu \\\n\t\t      SOURCES=fujitsu/fmtowns.cpp,igs/pgm2.cpp,igs/pgm.cpp,igs/pgm3.cpp,apple/apple2gs.cpp,apple/apple2.cpp,apple/apple2common.cpp,apple/apple2video.cpp,apple/apple2e.cpp \\\n\t\t      OSD=retro \\\n\t\t      USE_SYSTEM_LIB_EXPAT=1 \\\n\t\t      USE_SYSTEM_LIB_ZLIB=1 \\\n\t\t      USE_SYSTEM_LIB_FLAC=1 \\\n\t\t      USE_SYSTEM_LIB_SQLITE3=1\"\n\nexport ARCHOPTS=\"-D__aarch64__ -DASMJIT_BUILD_X86\"\n\nsed -i \"s/-static-libstdc++//g\" scripts/genie.lua\n\nunset ARCH\nunset DISTRO\nunset PROJECT\n\n}\n\nmake_target() {\n  make $PKG_MAKE_OPTS_TARGET OVERRIDE_CC=$CC OVERRIDE_CXX=$CXX OVERRIDE_LD=$LD AR=$AR $MAKEFLAGS -j5\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/lib/libretro\n  cp *.so $INSTALL/usr/lib/libretro/\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/multiemu\n  cp -rf ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/multiemu\n  cp -rf $PKG_BUILD/hash/fmtowns_cd.xml ${INSTALL}/usr/config/emuelec/configs/multiemu/hash\n  mkdir -p ${INSTALL}/usr/bin\n  cp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/multiemu/patches/fmtownshash.patch",
    "content": "--- a/fmtowns/hash/fmtowns_cd.xml\t2024-02-03 18:10:56.927394400 +0100\n+++ ./hash/fmtowns_cd.xml\t2024-02-03 18:13:01.893835080 +0100\n@@ -31537,4 +31537,22 @@\n \t\t</part>\n \t</software>\n \n+\t<software name=\"alltynex\">\n+\t\t<!--\n+\t\tOrigin: nfggames.org\n+\t\t-->\n+\t\t<description>alltynex</description>\n+\t\t<year>1996</year>\n+\t\t<publisher>Satoshi Yoshida</publisher>\n+\t\t<info name=\"serial\" value=\"2TD-3010\"/>\n+\t\t<info name=\"alt_title\" value=\"アルティネクス\" />\n+\t\t<info name=\"release\" value=\"19960101\" />\n+\t\t<info name=\"usage\" value=\"Requires 4 MB RAM\"/>\n+\t\t<part name=\"cdrom\" interface=\"fmt_cdrom\">\n+\t\t\t<diskarea name=\"cdrom\">\n+\t\t\t\t<disk name=\"alltynex\" sha1=\"4e7c7009aec6373e7d71fb6d7a38730a30c4d055\" />\n+\t\t\t</diskarea>\n+\t\t</part>\n+\t</software>\n+\n </softwarelist>\n"
  },
  {
    "path": "packages/sx05re/libretro/multiemu/patches/mame-crosscompile.patch",
    "content": "diff --git a/makefile b/makefile\nindex 46c78d04dc0..d95e3e6c3b0 100644\n--- a/makefile\n+++ b/makefile\n@@ -383,14 +383,14 @@ ifndef FORCE_DRC_C_BACKEND\n endif\n endif\n \n-ifeq ($(findstring arm,$(UNAME)),arm)\n+ifeq ($(findstring arm,$(PLATFORM)),arm)\n ARCHITECTURE :=\n ifndef FORCE_DRC_C_BACKEND\n \tFORCE_DRC_C_BACKEND := 1\n endif\n endif\n \n-ifeq ($(findstring aarch64,$(UNAME)),aarch64)\n+ifeq ($(findstring aarch64,$(PLATFORM)),aarch64)\n ARCHITECTURE :=\n ifndef FORCE_DRC_C_BACKEND\n \tFORCE_DRC_C_BACKEND := 1\n--- a/3rdparty/genie/build/gmake.linux/genie.make\t2018-08-11 00:17:44.000000000 +0200\n+++ b/3rdparty/genie/build/gmake.linux/genie.make\t2019-04-03 11:57:27.671223016 +0200\n@@ -28,8 +28,8 @@\n   RM    = $(SILENT) del /F \"$(subst /,\\\\,$(1))\" 2> nul || exit 0\n endif\n \n-CC  = gcc\n-CXX = g++\n+CC  = $(HOST_CC)\n+CXX = $(HOST_CXX)\n AR  = ar\n \n ifndef RESCOMP\n@@ -50,12 +50,12 @@\n   INCLUDES           += -I\"../../src/host/lua-5.3.0/src\"\n   ALL_CPPFLAGS       += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)\n   ALL_ASMFLAGS       += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n-  ALL_CFLAGS         += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n-  ALL_CXXFLAGS       += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n-  ALL_OBJCFLAGS      += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n-  ALL_OBJCPPFLAGS    += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n+  ALL_CFLAGS         += $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n+  ALL_CXXFLAGS       += $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n+  ALL_OBJCFLAGS      += $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n+  ALL_OBJCPPFLAGS    += $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n   ALL_RESFLAGS       += $(RESFLAGS) $(DEFINES) $(INCLUDES)\n-  ALL_LDFLAGS        += $(LDFLAGS) -L\".\" -s -rdynamic\n+  ALL_LDFLAGS        += -L\".\" -s -rdynamic\n   LIBDEPS            +=\n   LDDEPS             +=\n   LDRESP              =\n-- a/scripts/toolchain.lua\t2019-04-30 15:47:21.000000000 +0200\n+++ b/scripts/toolchain.lua\t2019-05-21 22:51:48.116148725 +0200\n@@ -698,9 +698,6 @@\n \n \tconfiguration { \"linux-gcc\", \"x32\" }\n \t\tobjdir (_buildDir .. \"linux_gcc\" .. \"/obj\")\n-\t\tbuildoptions {\n-\t\t\t\"-m32\",\n-\t\t}\n \n \tconfiguration { \"linux-gcc\", \"x32\", \"Release\" }\n \t\ttargetdir (_buildDir .. \"linux_gcc\" .. \"/bin/x32/Release\")\n"
  },
  {
    "path": "packages/sx05re/libretro/multiemu/patches/mame-remove-bgfx.patch",
    "content": "diff --git a/Makefile.libretro b/Makefile.libretro\nindex 31c414be..8de62064 100644\n--- a/Makefile.libretro\n+++ b/Makefile.libretro\n@@ -55,6 +55,8 @@ VERBOSE ?= 1\n # scripts/toolchain.lua)\n # PTR64 = 1\n \n+USE_BGFX ?= 0\n+\n ###########################################################################\n #\n #   LIBRETRO PLATFORM GUESSING\ndiff --git a/scripts/genie.lua b/scripts/genie.lua\nindex 4655b3f4..495308a8 100644\n--- a/scripts/genie.lua\n+++ b/scripts/genie.lua\n@@ -387,8 +387,22 @@ newoption {\n \tdescription = \"Arguments for running debug build.\",\n }\n \n+newoption {\n+\ttrigger = \"USE_BGFX\",\n+\tdescription = \"Use bgfx.\",\n+\tallowed = {\n+\t\t{ \"0\",   \"Disabled\"     },\n+\t\t{ \"1\",   \"Enabled\"      },\n+\t}\n+}\n+\n dofile (\"extlib.lua\")\n \n+if not _OPTIONS[\"USE_BGFX\"] then\n+\t_OPTIONS[\"USE_BGFX\"] = \"0\"\n+end\n+\n+\n if _OPTIONS[\"SHLIB\"]==\"1\" then\n \tLIBTYPE = \"SharedLib\"\n else\n"
  },
  {
    "path": "packages/sx05re/libretro/multiemu/patches/mame-workaround-for-arm-cross-compilation.patch",
    "content": "diff --git a/3rdparty/bgfx/src/renderer_gl.h b/3rdparty/bgfx/src/renderer_gl.h\nindex d52efc76..9f5b2022 100644\n--- a/3rdparty/bgfx/src/renderer_gl.h\n+++ b/3rdparty/bgfx/src/renderer_gl.h\n@@ -12,10 +12,12 @@\n \t|| BX_PLATFORM_LINUX                                                                    \\\n \t|| BX_PLATFORM_NX                                                                       \\\n \t|| BX_PLATFORM_RPI                                                                      \\\n+\t|| BX_PLATFORM_LINUX_NO_GL                       \t\t\t\t\t  \\\n \t) )\n \n #define BGFX_USE_HTML5 (BGFX_CONFIG_RENDERER_OPENGLES && (0 \\\n \t|| BX_PLATFORM_EMSCRIPTEN                               \\\n+\t|| BX_PLATFORM_LINUX_NO_GL \t\t\t\t\\\n \t) )\n \n #define BGFX_USE_WGL (BGFX_CONFIG_RENDERER_OPENGL && (0 \\\ndiff --git a/3rdparty/bx/include/bx/platform.h b/3rdparty/bx/include/bx/platform.h\nindex eea5fcb0..f57a3a79 100644\n--- a/3rdparty/bx/include/bx/platform.h\n+++ b/3rdparty/bx/include/bx/platform.h\n@@ -60,6 +60,7 @@\n #define BX_PLATFORM_WINDOWS    0\n #define BX_PLATFORM_WINRT      0\n #define BX_PLATFORM_XBOXONE    0\n+#define BX_PLATFORM_LINUX_NO_GL 0\n \n // http://sourceforge.net/apps/mediawiki/predef/index.php?title=Compilers\n #if defined(__clang__)\n@@ -221,6 +222,13 @@\n #\tdefine BX_PLATFORM_HAIKU 1\n #endif //\n \n+#if BX_CPU_ARM\n+#   undef  BX_PLATFORM_LINUX\n+#   define BX_PLATFORM_LINUX 0\n+#   undef  BX_PLATFORM_LINUX_NO_GL\n+#   define BX_PLATFORM_LINUX_NO_GL 1\n+#endif\n+\n #if !BX_CRT_NONE\n // https://sourceforge.net/p/predef/wiki/Libraries/\n #\tif defined(__BIONIC__)\n@@ -269,6 +277,7 @@\n \t||  BX_PLATFORM_OSX        \\\n \t||  BX_PLATFORM_PS4        \\\n \t||  BX_PLATFORM_RPI        \\\n+\t||  BX_PLATFORM_LINUX_NO_GL \\\n \t)\n \n ///\n@@ -287,6 +296,7 @@\n \t||  BX_PLATFORM_WINDOWS    \\\n \t||  BX_PLATFORM_WINRT      \\\n \t||  BX_PLATFORM_XBOXONE    \\\n+\t||  BX_PLATFORM_LINUX_NO_GL \\\n \t)\n \n ///\n@@ -388,6 +398,8 @@\n #\tdefine BX_PLATFORM_NAME \"WinRT\"\n #elif BX_PLATFORM_XBOXONE\n #\tdefine BX_PLATFORM_NAME \"Xbox One\"\n+#elif BX_PLATFORM_LINUX_NO_GL\n+#\tdefine BX_PLATFORM_NAME \"Linux (GLES)\"\n #else\n #\terror \"Unknown BX_PLATFORM!\"\n #endif // BX_PLATFORM_\ndiff --git a/3rdparty/bx/src/os.cpp b/3rdparty/bx/src/os.cpp\nindex 12586aa8..ae2836ad 100644\n--- a/3rdparty/bx/src/os.cpp\n+++ b/3rdparty/bx/src/os.cpp\n@@ -27,7 +27,8 @@\n \t|| BX_PLATFORM_NX         \\\n \t|| BX_PLATFORM_OSX        \\\n \t|| BX_PLATFORM_PS4        \\\n-\t|| BX_PLATFORM_RPI\n+\t|| BX_PLATFORM_RPI\t\t  \\\n+\t|| BX_PLATFORM_LINUX_NO_GL\n #\tinclude <sched.h> // sched_yield\n #\tif BX_PLATFORM_BSD       \\\n \t|| BX_PLATFORM_HAIKU     \\\n@@ -45,7 +46,8 @@\n #\tif BX_PLATFORM_ANDROID\n #\t\tinclude <malloc.h> // mallinfo\n #\telif   BX_PLATFORM_LINUX     \\\n-\t\t|| BX_PLATFORM_RPI\n+\t\t|| BX_PLATFORM_RPI       \\\n+\t\t|| BX_PLATFORM_LINUX_NO_GL\n #\t\tinclude <stdio.h>  // fopen\n #\t\tinclude <unistd.h> // syscall\n #\t\tinclude <sys/syscall.h>\n@@ -98,7 +100,8 @@ namespace bx\n #if BX_PLATFORM_WINDOWS\n \t\treturn ::GetCurrentThreadId();\n #elif  BX_PLATFORM_LINUX \\\n-\t|| BX_PLATFORM_RPI\n+\t|| BX_PLATFORM_RPI\t \\\n+\t|| BX_PLATFORM_LINUX_NO_GL\n \t\treturn (pid_t)::syscall(SYS_gettid);\n #elif  BX_PLATFORM_IOS \\\n \t|| BX_PLATFORM_OSX\n@@ -119,7 +122,8 @@ namespace bx\n \t\tstruct mallinfo mi = mallinfo();\n \t\treturn mi.uordblks;\n #elif  BX_PLATFORM_LINUX \\\n-\t|| BX_PLATFORM_HURD\n+\t|| BX_PLATFORM_HURD\t \\\n+\t|| BX_PLATFORM_LINUX_NO_GL\n \t\tFILE* file = fopen(\"/proc/self/statm\", \"r\");\n \t\tif (NULL == file)\n \t\t{\n@@ -312,7 +316,8 @@ namespace bx\n \tvoid* exec(const char* const* _argv)\n \t{\n #if BX_PLATFORM_LINUX \\\n- || BX_PLATFORM_HURD\n+ || BX_PLATFORM_HURD  \\\n+ || BX_PLATFORM_LINUX_NO_GL\n \t\tpid_t pid = fork();\n \n \t\tif (0 == pid)\n"
  },
  {
    "path": "packages/sx05re/libretro/multiemu/patches/mutex.patch",
    "content": "--- a/3rdparty/bx/src/mutex.cpp\t2023-08-19 07:51:29.861134100 +0200\n+++ b/3rdparty/bx/src/mutex.cpp\t2023-08-19 08:04:43.449984297 +0200\n@@ -18,7 +18,8 @@\n \t|| BX_PLATFORM_OSX     \\\n \t|| BX_PLATFORM_PS4     \\\n \t|| BX_PLATFORM_RPI\t   \\\n-\t|| BX_PLATFORM_NX\n+\t|| BX_PLATFORM_NX\t   \\\n+\t|| BX_PLATFORM_LINUX_NO_GL\n #\tinclude <pthread.h>\n #elif  BX_PLATFORM_WINDOWS \\\n \t|| BX_PLATFORM_WINRT   \\\n"
  },
  {
    "path": "packages/sx05re/libretro/multiemu/patches/new.patch",
    "content": "--- a/3rdparty/genie/src/host/scripts.c\t2025-01-04 19:13:10.550615500 +0100\n+++ b/3rdparty/genie/src/host/scripts.c\t2025-01-04 21:29:13.629791709 +0100\n@@ -149,7 +149,7 @@\n \n \t/* tools/gcc.lua */\n \t\"premake.gcc = { }\\npremake.gcc.cc     = \\\"gcc\\\"\\npremake.gcc.cxx    = \\\"g++\\\"\\npremake.gcc.ar     = \\\"ar\\\"\\npremake.gcc.rc     = \\\"windres\\\"\\npremake.gcc.llvm   = false\\nlocal cflags =\\n{\\nEnableSSE        = \\\"-msse\\\",\\nEnableSSE2       = \\\"-msse2\\\",\\nEnableAVX        = \\\"-mavx\\\",\\nEnableAVX2       = \\\"-mavx2\\\",\\nPedanticWarnings = \\\"-Wall -Wextra -pedantic\\\",\\nExtraWarnings    = \\\"-Wall -Wextra\\\",\\nFatalWarnings    = \\\"-Werror\\\",\\nFloatFast        = \\\"-ffast-math\\\",\\nFloatStrict      = \\\"-ffloat-store\\\",\\nNoFramePointer   = \\\"-fomit-frame-pointer\\\",\\nOptimize         = \\\"-O2\\\",\\nOptimizeSize     = \\\"-Os\\\",\\nOptimizeSpeed    = \\\"-O3\\\",\\nSymbols          = \\\"-g\\\",\\n}\\nlocal cxxflags =\\n{\\nCpp11        = \\\"-std=c++11\\\",\\nCpp14        = \\\"-std=c++14\\\",\\nCpp17        = \\\"-std=c++17\\\",\\nCpp20        = \\\"-std=c++20\\\",\\nCppLatest    = \\\"-std=c++2b\\\",\\nNoExceptions = \\\"-fno-exceptions\\\",\\nNoRTTI       = \\\"-fno-rtti\\\",\\nUnsignedChar = \\\"-funsigned-char\\\",\\n}\\nlocal objcflags =\\n{\\nObjcARC = \\\"-fobjc-arc\\\",\\n}\\npremake.\"\n-\t\"gcc.platforms =\\n{\\nNative = {\\ncppflags = \\\"-MMD -MP\\\",\\n},\\nx32 = {\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-m32\\\",\\n},\\nx64 = {\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-m64\\\",\\n},\\nUniversal = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch i386 -arch x86_64 -arch ppc -arch ppc64\\\",\\n},\\nUniversal32 = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch i386 -arch ppc\\\",\\n},\\nUniversal64 = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch x86_64 -arch ppc64\\\",\\n},\\nPS3 = {\\ncc         = \\\"ppu-lv2-g++\\\",\\ncxx        = \\\"ppu-lv2-g++\\\",\\nar         = \\\"ppu-lv2-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\n},\\nWiiDev = {\\ncppflags    = \\\"-MMD -MP -I$(LIBOGC_INC) $(MACHDEP)\\\",\\nldflags= \\\"-L$(LIBOGC_LIB) $(MACHDEP)\\\",\\ncfgsettings = [[\\n  ifeq ($(strip $(DEVKITPPC)),)\\n    $(error \\\"DEVKITPPC environment variable is not set\\\")'\\n  endif\\n  include $(DEVKITPPC)/wii_rules']],\\n},\\nOrbis = {\\ncc         = \\\"orbis-clang\\\",\\ncxx        = \\\"orbis-clang++\\\",\\nar \"\n+\t\"gcc.platforms =\\n{\\nNative = {\\ncppflags = \\\"-MMD -MP\\\",\\n},\\nx32 = {\\ncppflags = \\\"-MMD -MP\\\"\\n},\\nx64 = {\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-m64\\\",\\n},\\nUniversal = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch i386 -arch x86_64 -arch ppc -arch ppc64\\\",\\n},\\nUniversal32 = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch i386 -arch ppc\\\",\\n},\\nUniversal64 = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch x86_64 -arch ppc64\\\",\\n},\\nPS3 = {\\ncc         = \\\"ppu-lv2-g++\\\",\\ncxx        = \\\"ppu-lv2-g++\\\",\\nar         = \\\"ppu-lv2-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\n},\\nWiiDev = {\\ncppflags    = \\\"-MMD -MP -I$(LIBOGC_INC) $(MACHDEP)\\\",\\nldflags= \\\"-L$(LIBOGC_LIB) $(MACHDEP)\\\",\\ncfgsettings = [[\\n  ifeq ($(strip $(DEVKITPPC)),)\\n    $(error \\\"DEVKITPPC environment variable is not set\\\")'\\n  endif\\n  include $(DEVKITPPC)/wii_rules']],\\n},\\nOrbis = {\\ncc         = \\\"orbis-clang\\\",\\ncxx        = \\\"orbis-clang++\\\",\\nar \"\n \t\"        = \\\"orbis-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\n},\\nEmscripten = {\\ncc         = \\\"$(EMSCRIPTEN)/emcc\\\",\\ncxx        = \\\"$(EMSCRIPTEN)/em++\\\",\\nar         = \\\"$(EMSCRIPTEN)/emar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\n},\\nNX32 = {\\ncc         = \\\"clang\\\",\\ncxx        = \\\"clang++\\\",\\nar         = \\\"armv7l-nintendo-nx-eabihf-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\nflags      = \\\"-march=armv7l\\\",\\n},\\nNX64 = {\\ncc         = \\\"clang\\\",\\ncxx        = \\\"clang++\\\",\\nar         = \\\"aarch64-nintendo-nx-elf-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\nflags      = \\\"-march=aarch64\\\",\\n},\\n}\\nlocal platforms = premake.gcc.platforms\\nfunction premake.gcc.getcppflags(cfg)\\nlocal flags = { }\\ntable.insert(flags, platforms[cfg.platform].cppflags)\\nif flags[1]:startswith(\\\"-MMD\\\") then\\ntable.insert(flags, \\\"-MP\\\")\\nend\\nreturn flags\\nend\\nfunction premake.gcc.getcflags(cfg)\\nlocal result = table.translate(cfg.flags, cflags)\\ntable.insert(result, platforms[cfg.platform].flags)\\nif cfg.system ~= \\\"windows\\\" and cfg.kind == \\\"SharedLib\\\" then\\nt\"\n \t\"able.insert(result, \\\"-fPIC\\\")\\nend\\nreturn result\\nend\\nfunction premake.gcc.getcxxflags(cfg)\\nlocal result = table.translate(cfg.flags, cxxflags)\\nreturn result\\nend\\nfunction premake.gcc.getobjcflags(cfg)\\nreturn table.translate(cfg.flags, objcflags)\\nend\\nfunction premake.gcc.getldflags(cfg)\\nlocal result = { }\\nif not cfg.flags.Symbols then\\nif cfg.system == \\\"macosx\\\" then\\nelse\\ntable.insert(result, \\\"-s\\\")\\nend\\nend\\nif cfg.kind == \\\"Bundle\\\" then\\ntable.insert(result, \\\"-bundle\\\")\\nend\\nif cfg.kind == \\\"SharedLib\\\" then\\nif cfg.system == \\\"macosx\\\" then\\ntable.insert(result, \\\"-dynamiclib\\\")\\nelse\\ntable.insert(result, \\\"-shared\\\")\\nend\\nif cfg.system == \\\"windows\\\" and not cfg.flags.NoImportLib then\\ntable.insert(result, '-Wl,--out-implib=\\\"' .. cfg.linktarget.fullpath .. '\\\"')\\nend\\nend\\nif cfg.kind == \\\"WindowedApp\\\" and cfg.system == \\\"windows\\\" then\\ntable.insert(result, \\\"-mwindows\\\")\\nend\\nlocal platform = platforms[cfg.platform]\\ntable.insert(result, platform.flags)\\ntable.insert(result, platf\"\n \t\"orm.ldflags)\\nreturn result\\nend\\nfunction premake.gcc.getlibdirflags(cfg)\\nlocal result = { }\\nfor _, value in ipairs(premake.getlinks(cfg, \\\"all\\\", \\\"directory\\\")) do\\ntable.insert(result, '-L\\\\\\\"' .. value .. '\\\\\\\"')\\nend\\nreturn result\\nend\\nfunction premake.gcc.islibfile(p)\\nif path.getextension(p) == \\\".a\\\" then\\nreturn true\\nend\\nreturn false\\nend\\nfunction premake.gcc.getlibfiles(cfg)\\nlocal result = {}\\nfor _, value in ipairs(premake.getlinks(cfg, \\\"system\\\", \\\"fullpath\\\")) do\\nif premake.gcc.islibfile(value) then\\ntable.insert(result, _MAKE.esc(value))\\nend\\nend\\nreturn result\\nend\\nfunction premake.gcc.getlinkflags(cfg)\\nlocal result = {}\\nfor _, value in ipairs(premake.getlinks(cfg, \\\"system\\\", \\\"fullpath\\\")) do\\nif premake.gcc.islibfile(value) then\\nvalue = path.rebase(value, cfg.project.location, cfg.location)\\ntable.insert(result, _MAKE.esc(value))\\nelseif path.getextension(value) == \\\".framework\\\" then\\ntable.insert(result, '-framework ' .. _MAKE.esc(path.getbasename(value)))\\nelse\\ntable.inser\"\n"
  },
  {
    "path": "packages/sx05re/libretro/multiemu/patches/thread-patch",
    "content": "--- a/3rdparty/bx/src/thread.cpp\t2023-08-19 07:51:14.246942500 +0200\n+++ b/3rdparty/bx/src/thread.cpp\t2023-08-19 07:59:28.740042068 +0200\n@@ -22,12 +22,14 @@\n \t|| BX_PLATFORM_OSX     \\\n \t|| BX_PLATFORM_PS4     \\\n \t|| BX_PLATFORM_RPI     \\\n-\t|| BX_PLATFORM_NX\n+\t|| BX_PLATFORM_NX      \\\n+\t|| BX_PLATFORM_LINUX_NO_GL\n #\tinclude <pthread.h>\n #\tif BX_PLATFORM_BSD\n #\t\tinclude <pthread_np.h>\n #\tendif // BX_PLATFORM_BSD\n-#\tif BX_PLATFORM_LINUX && (BX_CRT_GLIBC < 21200)\n+#\tif BX_PLATFORM_LINUX \\\n+\t|| BX_PLATFORM_LINUX_NO_GL && (BX_CRT_GLIBC < 21200)\n #\t\tinclude <sys/prctl.h>\n #\tendif // BX_PLATFORM_\n #elif  BX_PLATFORM_WINDOWS \\\n@@ -252,7 +254,8 @@\n \t\tpthread_setname_np(_name);\n #elif (BX_CRT_GLIBC >= 21200) && ! BX_PLATFORM_HURD\n \t\tpthread_setname_np(ti->m_handle, _name);\n-#elif BX_PLATFORM_LINUX\n+#elif BX_PLATFORM_LINUX \\\n+\t|| BX_PLATFORM_LINUX_NO_GL\n \t\tprctl(PR_SET_NAME,_name, 0, 0, 0);\n #elif BX_PLATFORM_BSD\n #\tif defined(__NetBSD__)\n"
  },
  {
    "path": "packages/sx05re/libretro/multiemu/scripts/multiemu.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present Héctor C.M. (github.com/kelvfimer)\n\n\nif [ ! -f \"/storage/roms/bios/mame/hash/fmtowns_cd.xml\" ]; then\n    mkdir -p /storage/roms/bios/mame/hash\n    cp -rf \"/usr/config/emuelec/configs/multiemu/hash/\"fm* \"/storage/roms/bios/mame/hash\"\nfi\n\nif [ ! -f \"/storage/roms/bios/mame/ini/fmtownsux.ini\" ]; then\n    mkdir -p /storage/roms/bios/mame/ini\n    cp -rf \"/usr/config/emuelec/configs/multiemu/ini/\"fm* \"/storage/roms/bios/mame/ini\"\nfi\n\nif [ ! -f \"/storage/roms/bios/mame/ini/mame.ini\" ]; then\n    mkdir -p /storage/roms/bios/mame/ini\n    cp -rf \"/usr/config/emuelec/configs/multiemu/ini/\"mame* \"/storage/roms/bios/mame/ini\"\nfi\n"
  },
  {
    "path": "packages/sx05re/libretro/mupen64plus/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"mupen64plus\"\nPKG_VERSION=\"ab8134ac90a567581df6de4fc427dd67bfad1b17\"\nPKG_SHA256=\"98e197cdcac64c0e08eda91a6d63b637c3f151066bede25766e62bc1a59552a0\"\nPKG_REV=\"1\"\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/mupen64plus-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain nasm:host ${OPENGLES}\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"mupen64plus + RSP-HLE + GLideN64 + libretro\"\nPKG_LONGDESC=\"mupen64plus + RSP-HLE + GLideN64 + libretro\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"-lto\"\n\npre_configure_target() {\n\n  CFLAGS=\"${CFLAGS} -DLINUX -DEGL_API_FB -fcommon\"\n  CPPFLAGS=\"${CPPFLAGS} -DLINUX -DEGL_API_FB\"\n  \n  sed -i \"s|BOARD :=.*|BOARD = N2|g\" Makefile\n  sed -i \"s|odroid64|emuelec64|g\" Makefile\n  \n   case ${DEVICE} in\n    Amlogic-ng|Amlogic-no|Amlogic-ogu)\n    if [ ${ARCH} == \"arm\" ]; then\n\t\tPKG_MAKE_OPTS_TARGET=\"platform=odroid BOARD=c2\"\n      else\n\t\tPKG_MAKE_OPTS_TARGET=\"platform=emuelec64 BOARD=N2\"\n      fi\n    ;;\n    Amlogic-old)\n    if [ ${ARCH} == \"arm\" ]; then\n\t\tPKG_MAKE_OPTS_TARGET=\"platform=odroid BOARD=c2\"\n      else\n\t\tPKG_MAKE_OPTS_TARGET=\"platform=odroid64 BOARD=c2 HAVE_NEON=0\"\n      fi\n    ;;\n  esac\n \n if [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ] || [ \"${DEVICE}\" == \"RK356x\" ]; then \n\tif [[ \"${ARCH}\" == \"arm\" ]]; then\n\t\tPKG_MAKE_OPTS_TARGET=\" platform=unix GLES=1 FORCE_GLES=1 HAVE_NEON=1 WITH_DYNAREC=arm\"\n\telse \n\t\tPKG_MAKE_OPTS_TARGET=\" platform=unix GLES=1 FORCE_GLES=1 HAVE_NEON=0 WITH_DYNAREC=aarch64\"\n\tfi\n fi\n  \n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mupen64plus_libretro.so ${INSTALL}/usr/lib/libretro/mupen64plus_32b_libretro.so\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/mupen64plus/patches/mupen64plus-fixdouble.patch",
    "content": "diff --git a/libretro-common/include/glsym/rglgen_headers.h b/libretro-common/include/glsym/rglgen_headers.h\nindex 766efb63..3de538d6 100644\n--- a/libretro-common/include/glsym/rglgen_headers.h\n+++ b/libretro-common/include/glsym/rglgen_headers.h\n@@ -53,6 +53,7 @@\n #include <GLES2/gl2ext.h>\n #elif defined(HAVE_OPENGLES2)\n #include <GLES2/gl2.h>\n+#define GL_NV_path_rendering\n #include <GLES2/gl2ext.h>\n #elif defined(HAVE_OPENGLES1)\n #include <GLES/gl.h>\n"
  },
  {
    "path": "packages/sx05re/libretro/mupen64plus/patches/mupen64plus-gcc10-32bit-fix.patch",
    "content": "--- a/GLideN64/src/ShaderUtils.h\n+++ b/GLideN64/src/ShaderUtils.h\n@@ -3,6 +3,7 @@\n \n #include \"OpenGL.h\"\n #include \"Combiner.h\"\n+#include <string>\n \n GLuint createShaderProgram(const char * _strVertex, const char * _strFragment);\n bool checkShaderCompileStatus(GLuint obj);\n"
  },
  {
    "path": "packages/sx05re/libretro/mupen64plus/patches/mupen64plus-sx05re-neonfix.patch",
    "content": "--- a/Makefile\t2018-12-15 12:01:25.246556521 -0600\n+++ b/Makefile\t2018-12-15 12:01:37.110536416 -0600\n@@ -92,6 +92,8 @@\n    else\n       GL_LIB := -lGL\n    endif\n+   HAVE_NEON = 1\n+   WITH_DYNAREC=arm\n \n    COREFLAGS += -DOS_LINUX\n    ASFLAGS = -f elf -d ELF_TYPE\n"
  },
  {
    "path": "packages/sx05re/libretro/mupen64plus-nx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"mupen64plus-nx\"\nPKG_VERSION=\"222acbd3f98391458a047874d0372fe78e14fe94\"\nPKG_SHA256=\"9e55fa83f2313f9b80a369d77457ec216e5774ef2d486083ad8661aa94a4dbd1\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/mupen64plus-libretro-nx\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain nasm:host ${OPENGLES}\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"mupen64plus + RSP-HLE + GLideN64 + libretro\"\nPKG_LONGDESC=\"mupen64plus + RSP-HLE + GLideN64 + libretro\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"-lto\"\n\npre_configure_target() {\n  sed -e \"s|^GIT_VERSION ?.*$|GIT_VERSION := \\\" ${PKG_VERSION:0:7}\\\"|\" -i Makefile\n\nPKG_MAKE_OPTS_TARGET+=\" HAVE_PARALLEL_RDP=1 HAVE_PARALLEL_RSP=1 HAVE_THR_AL=1 LLE=1\"\n\nif [ ${ARCH} == \"arm\" ]; then\n\tif [ \"${DEVICE}\" = \"Amlogic-old\" ]; then\n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=emuelec BOARD=OLD32BIT\"\n\telif [ \"${DEVICE}\" = \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\t\tsed -i \"s|cortex-a53|cortex-a35|g\" Makefile\n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=odroidgoa\"\n\telif [ \"${DEVICE}\" == \"OdroidM1\" ] || [ \"${DEVICE}\" == \"RK356x\" ]; then\n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=emuelec BOARD=NGRK32BIT\"\n\telse\n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=AMLG12B\"\n\tfi\nelse\n\tif [ \"${DEVICE}\" = \"Amlogic-old\" ]; then \n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=emuelec BOARD=OLD\"\n\telif [ \"${DEVICE}\" == \"OdroidM1\" ] || [ \"${DEVICE}\" == \"RK356x\" ]; then\n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=emuelec BOARD=NGRK\"\n\telif [ \"${DEVICE}\" = \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=emuelec BOARD=NGHH\"\n\telse\n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=odroid64 BOARD=N2\"\n\tfi\nfi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mupen64plus_next_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/mupen64plus-nx/patches/mupen64plus-nx-01-add-amlogic64.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -308,16 +308,35 @@\n    ASFLAGS = -f elf -d ELF_TYPE\n \n # Amlogic S905/S912\n-else ifneq (,$(findstring amlogic,$(platform)))\n+else ifneq (,$(findstring emuelec,$(platform)))\n    TARGET := $(TARGET_NAME)_libretro.so\n    LDFLAGS += -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T -Wl,--no-undefined -ldl\n    GLES = 1\n+   GLES3= 0\n    GL_LIB := -lGLESv2\n-   CPUFLAGS += -marm -mfloat-abi=hard -mfpu=neon\n-   HAVE_NEON = 1\n-   WITH_DYNAREC=arm\n+  ifneq (,$(findstring NG,$(BOARD)))\n+    WITH_DYNAREC=aarch64\n+    GL_LIB := -lGLESv3\n+    GLES = 0\n+    GLES3= 1\n+  endif\n+  ifneq (,$(findstring OLD,$(BOARD)))\n+    WITH_DYNAREC=aarch64\n+    CPUFLAGS += -mcpu=cortex-a53\n+   endif\n+  ifneq (,$(findstring HH,$(BOARD)))\n+    CPUFLAGS += -mcpu=cortex-a35\n+   endif\n+  ifneq (,$(findstring RK,$(BOARD)))\n+    CPUFLAGS += -mcpu=cortex-a53\n+   endif\n+  ifneq (,$(findstring 32BIT,$(BOARD)))\n+\tCPUFLAGS += -marm -mfloat-abi=hard -mfpu=neon\n+\tHAVE_NEON = 1\n+\tWITH_DYNAREC=arm\n+ endif\n    COREFLAGS += -DUSE_GENERIC_GLESV2 -DOS_LINUX\n-   CPUFLAGS += -march=armv8-a -mcpu=cortex-a53 -mtune=cortex-a53\n+   \n \n # Rockchip RK3288 e.g. Asus Tinker Board / RK3328 e.g. PINE64 Rock64 / RK3399 e.g. PINE64 RockPro64 - 32-bit userspace\n else ifneq (,$(findstring RK,$(platform)))\n"
  },
  {
    "path": "packages/sx05re/libretro/mupen64plus-nx-alt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"mupen64plus-nx-alt\"\nPKG_VERSION=\"680e033fc8ed1a49df7b156d97164e0050ee13bc\"\nPKG_SHA256=\"ffadc0144406df9875e1cb5e788d619fcddc6c7d5df61692be8c67c86d5b8fcb\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/mupen64plus-libretro-nx\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain nasm:host ${OPENGLES}\"\nPKG_SECTION=\"libretro\"\nPKG_LONGDESC=\"Improved mupen64plus libretro core reimplementation\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"-lto\"\nPKG_EE_UPDATE=no\n\npre_configure_target() {\n  sed -e \"s|^GIT_VERSION ?.*$|GIT_VERSION := \\\" ${PKG_VERSION:0:7}\\\"|\" -i Makefile\n \nPKG_MAKE_OPTS_TARGET+=\" HAVE_PARALLEL_RDP=1 HAVE_PARALLEL_RSP=1 HAVE_THR_AL=1 LLE=1\"\n\nif [ ${ARCH} == \"arm\" ]; then\n\tif [ \"${DEVICE}\" = \"Amlogic-old\" ]; then\n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=emuelec BOARD=OLD32BIT\"\n\telif [ \"${DEVICE}\" = \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\t\tsed -i \"s|cortex-a53|cortex-a35|g\" Makefile\n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=odroidgoa\"\n\telif [ \"${DEVICE}\" == \"OdroidM1\" ] || [ \"${DEVICE}\" == \"RK356x\" ]; then\n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=emuelec BOARD=NGRK32BIT\"\n\telse\n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=AMLG12B\"\n\tfi\nelse\n\tif [ \"${DEVICE}\" = \"Amlogic-old\" ]; then \n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=emuelec BOARD=OLD\"\n\telif [ \"${DEVICE}\" == \"OdroidM1\" ] || [ \"${DEVICE}\" == \"RK356x\" ]; then\n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=emuelec BOARD=NGRK\"\n\telif [ \"${DEVICE}\" = \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=emuelec BOARD=NGHH\"\n\telse\n\t\tPKG_MAKE_OPTS_TARGET+=\" platform=odroid64 BOARD=N2\"\n\tfi\nfi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp mupen64plus_next_libretro.so ${INSTALL}/usr/lib/libretro/mupen64plus_next_alt_libretro.so\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/mupen64plus-nx-alt/patches/mupen64plus-nx-01-add-amlogic64.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -308,16 +308,35 @@\n    ASFLAGS = -f elf -d ELF_TYPE\n \n # Amlogic S905/S912\n-else ifneq (,$(findstring amlogic,$(platform)))\n+else ifneq (,$(findstring emuelec,$(platform)))\n    TARGET := $(TARGET_NAME)_libretro.so\n    LDFLAGS += -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T -Wl,--no-undefined -ldl\n    GLES = 1\n+   GLES3= 0\n    GL_LIB := -lGLESv2\n-   CPUFLAGS += -marm -mfloat-abi=hard -mfpu=neon\n-   HAVE_NEON = 1\n-   WITH_DYNAREC=arm\n+  ifneq (,$(findstring NG,$(BOARD)))\n+    WITH_DYNAREC=aarch64\n+    GL_LIB := -lGLESv3\n+    GLES = 0\n+    GLES3= 1\n+  endif\n+  ifneq (,$(findstring OLD,$(BOARD)))\n+    WITH_DYNAREC=aarch64\n+    CPUFLAGS += -mcpu=cortex-a53\n+   endif\n+  ifneq (,$(findstring HH,$(BOARD)))\n+    CPUFLAGS += -mcpu=cortex-a35\n+   endif\n+  ifneq (,$(findstring RK,$(BOARD)))\n+    CPUFLAGS += -mcpu=cortex-a53\n+   endif\n+  ifneq (,$(findstring 32BIT,$(BOARD)))\n+\tCPUFLAGS += -marm -mfloat-abi=hard -mfpu=neon\n+\tHAVE_NEON = 1\n+\tWITH_DYNAREC=arm\n+ endif\n    COREFLAGS += -DUSE_GENERIC_GLESV2 -DOS_LINUX\n-   CPUFLAGS += -march=armv8-a -mcpu=cortex-a53 -mtune=cortex-a53\n+   \n \n # Rockchip RK3288 e.g. Asus Tinker Board / RK3328 e.g. PINE64 Rock64 / RK3399 e.g. PINE64 RockPro64 - 32-bit userspace\n else ifneq (,$(findstring RK,$(platform)))\n"
  },
  {
    "path": "packages/sx05re/libretro/neocd_libretro/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"neocd_libretro\"\nPKG_VERSION=\"5eca2c8fd567b5261251c65ecafa8cf5b179d1d2\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"LGPLv3.0\"\nPKG_SITE=\"https://github.com/libretro/neocd_libretro\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain flac libogg libvorbis\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Neo Geo CD emulator for libretro \"\nPKG_LONGDESC=\"NeoCD-Libretro is a complete rewrite of NeoCD from scratch in modern C++11. It is designed with accuracy and portability in mind rather than being all about speed like the the older versions. The goal is also to document all I know about the platform in the source code so other emulator authors can make their own implementations.\"\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\nGET_HANDLER_SUPPORT=\"git\"\n\nmake_target() {\ncd ${PKG_BUILD}\nCFLAGS=${CFLAGS} CXXFLAGS=\"${CXXFLAGS}\" CXX=\"${CXX}\" CC=\"${CC}\" LD=\"${LD}\" RANLIB=\"${RANLIB}\" AR=\"${AR}\" make\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/neocd_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/nestopia/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"nestopia\"\nPKG_VERSION=\"e9429844f2e16a284a8cdf663589634fd4c6345f\"\nPKG_SHA256=\"5d145e4171bd3381def8ba6d4f08a79d04d3a09c0d53e0b89266b7aa89402990\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/nestopia\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Libretro implementation of NEStopia. (Nintendo Entertainment System)\"\nPKG_LONGDESC=\"This project is a fork of the original Nestopia source code, plus the Linux port. The purpose of the project is to enhance the original, and ensure it continues to work on modern operating systems.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\nPKG_USE_CMAKE=\"no\"\n\nmake_target() {\n  cd ${PKG_BUILD}\n  make -C libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp libretro/nestopia_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/nestopiaCV/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present asakous (https://github.com/asakous)\n\nPKG_NAME=\"nestopiaCV\"\nPKG_VERSION=\"2ef9f54159a3da268545f338842bf8a7bbd5e66c\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/asakous/NestopiaCV\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Libretro implementation of NEStopia. (Nintendo Entertainment System)\"\nPKG_LONGDESC=\"This project is a fork of the original Nestopia source code, plus the Linux port. The purpose of the project is to enhance the original, and ensure it continues to work on modern operating systems.\"\nPKG_TOOLCHAIN=\"make\"\nGET_HANDLER_SUPPORT=\"git\"\n\npre_configure_target() {\ncp -f ${PKG_BUILD}/NstCore.hpp ${PKG_BUILD}/source/core/NstCore.hpp\n}\n\nmake_target() {\n  cd ${PKG_BUILD}\n  make -C libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  mkdir -p ${INSTALL}/etc/\n  cp ${PKG_BUILD}/skin.png ${INSTALL}/usr/lib/libretro/\n  cp ${PKG_BUILD}/skin.png ${INSTALL}/etc/\n  cp libretro/nestopiaCV_libretro.so ${INSTALL}/usr/lib/libretro/\necho 'display_name = \"Nintendo - NES / Famicom (Nestopia CV)\"\nauthors = \"Martin Freij|R. Belmont|R. Danbrook\"\nsupported_extensions = \"nes|fds|unf|unif\"\ncorename = \"NestopiaCV\"\nmanufacturer = \"Nintendo\"\ncategories = \"Emulator\"\nsystemname = \"Nintendo Entertainment System\"\nsystemid = \"nes\"\ndatabase = \"Nintendo - Nintendo Entertainment System|Nintendo - Family Computer Disk System\"\nlicense = \"GPLv2\"\npermissions = \"\"\ndisplay_version = \"v1.47-WIP\"\nsupports_no_game = \"false\"\nfirmware_count = 2\nfirmware0_desc = \"NstDatabase.xml (Nestopia UE Database file)\"\nfirmware0_path = \"NstDatabase.xml\"\nfirmware0_opt = \"false\"\nfirmware1_desc = \"disksys.rom (Family Computer Disk System BIOS)\"\nfirmware1_path = \"disksys.rom\"\nfirmware1_opt = \"false\"\nnotes = \"Get NstDatabase.xml from https://github.com/0ldsk00l/nestopia|(!) disksys.rom (md5): ca30b50f880eb660a320674ed365ef7a|Press Retropad L1 to switch disk side.\"'>  ${INSTALL}/usr/lib/libretro/nestopiaCV_libretro.info\n\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/np2kai/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"np2kai\"\nPKG_VERSION=\"3ccfef9d7a4779591f72ff5ea7db13a1e7f3b137\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/libretro/NP2kai\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Neko Project II kai\"\nPKG_TOOLCHAIN=\"make\"\n\npre_make_target() {\n  # Fix 1: Remove the -municode flag using the absolute package build path\n  if [ -f \"${PKG_BUILD}/Makefile.libretro\" ]; then\n    sed -i 's/-municode//g' \"${PKG_BUILD}/Makefile.libretro\"\n  fi\n\n  # Fix 2: Comment out the s_window line in the correct path\n  if [ -f \"${PKG_BUILD}/sdl/scrnmng.c\" ]; then\n    sed -i 's/.*SDL_SetWindowFullscreen(s_window.*/\\/\\/ &/' \"${PKG_BUILD}/sdl/scrnmng.c\"\n  fi\n}\n\nmake_target() {\ncd ${PKG_BUILD}/sdl\n    make\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/sdl/np2kai_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/nxengine/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"nxengine\"\nPKG_VERSION=\"9adc032a5f6aa913d71d22042bb72cb11cf0f4a2\"\nPKG_SHA256=\"bc065a4f82f3644888f01fcaca482e1ead03055df03d8453bd8efed62c176d26\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/nxengine-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of NxEngine to libretro - Cave Story game engine clone\"\nPKG_LONGDESC=\"A complete open-source clone/rewrite of the masterpiece jump-and-run platformer Doukutsu Monogatari (also known as Cave Story).\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\npre_configure_target() {\n  sed -i -e \"s/CC         = gcc//\" Makefile\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp nxengine_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/o2em/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"o2em\"\nPKG_VERSION=\"3ba4231c1dc8dcdf487428712856b790d2e4b8f3\"\nPKG_SHA256=\"a2aff1f017600eb3478a0e78b68d6bcf576c86164f75c0fdd05cae4b2af55eae\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Artistic License\"\nPKG_SITE=\"https://github.com/libretro/libretro-o2em\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of O2EM to the libretro API, an Odyssey 2 / VideoPac emulator.\"\nPKG_LONGDESC=\"Port of O2EM to the libretro API, an Odyssey 2 / VideoPac emulator.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp o2em_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/opera/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"opera\"\nPKG_VERSION=\"67a29e60a4d194b675c9272b21b61eaa022f3ba3\"\nPKG_SHA256=\"e4135d62160f84d3bc287d165ef514a3e4ea31b759888ee29bde05e8c899b666\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"LGPL with additional notes\"\nPKG_SITE=\"https://github.com/libretro/opera-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of 4DO/libfreedo to libretro.\"\nPKG_LONGDESC=\"Port of 4DO/libfreedo to libretro.\"\nPKG_TOOLCHAIN=\"make\"\n\n\nmake_target() {\n  make CC=${CC} CXX=${CXX} AR=${AR}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp opera_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/parallel-n64/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"parallel-n64\"\nPKG_VERSION=\"50d3ddd55b5774da643d90d7ad1e3cbd2c618883\"\nPKG_SHA256=\"ac9f9a8d36cd5a1a4859589ce95f4d9b1bd4bce1047c83dc6b6d1c5c4bcf87bf\"\nPKG_REV=\"2\"\nPKG_LICENSE=\"GPLv2\"\nPKG_ARCH=\"arm\"\nPKG_SITE=\"https://github.com/libretro/parallel-n64\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Optimized/rewritten Nintendo 64 emulator made specifically for Libretro. Originally based on Mupen64 Plus.\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"-lto\"\n\n\nif [[ \"${ARCH}\" == \"arm\" ]]; then\n\tPKG_PATCH_DIRS=\"emuelec-arm32\"\nelse\n\tPKG_PATCH_DIRS=\"emuelec-aarch64\"\nfi\n\npre_configure_target() {\nif [[ \"${ARCH}\" == \"arm\" ]]; then\n\tPKG_PATCH_DIRS=\"arm\"\n\tPKG_MAKE_OPTS_TARGET=\" platform=${DEVICE}\"\n\t\n\tif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\t\tPKG_MAKE_OPTS_TARGET=\" platform=Odroidgoa\"\n\tfi\n\t\n\tif [ \"${DEVICE}\" == \"RK356x\" ] || [ \"${DEVICE}\" == \"OdroidM1\" ]; then\n\t\tPKG_MAKE_OPTS_TARGET=\" platform=Odroidgoa-RK356x\"\n\tfi\nelse\n\tPKG_PATCH_DIRS=\"emuelec-aarch64\"\n\tPKG_MAKE_OPTS_TARGET=\" platform=emuelec64-armv8\"\n\t\n\tif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\t\t#todo add odroidgoadvance to 64bits\n\t\tPKG_MAKE_OPTS_TARGET=\" platform=emuelec64-armv8\"\n\tfi\nfi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp parallel_n64_libretro.so ${INSTALL}/usr/lib/libretro/parallel_n64_32b_libretro.so\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/parallel-n64/patches/emuelec-aarch64/parallel-n64-add_platform.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -2,8 +2,8 @@\n PERF_TEST=0\n HAVE_SHARED_CONTEXT=0\n WITH_CRC=brumme\n-FORCE_GLES=0\n-HAVE_OPENGL=1\n+FORCE_GLES=1\n+HAVE_OPENGL=0\n HAVE_VULKAN_DEBUG=0\n GLIDEN64=0\n GLIDEN64CORE=0\n@@ -11,7 +11,7 @@\n HAVE_RSP_DUMP=0\n HAVE_RDP_DUMP=0\n HAVE_RICE=1\n-HAVE_PARALLEL=0\n+HAVE_PARALLEL=1\n HAVE_PARALLEL_RSP=0\n STATIC_LINKING=0\n WANT_LLVM_OVERRIDE=0\n@@ -229,25 +229,24 @@\n       LDFLAGS += -static-libgcc -static-libstdc++\n    endif\n \n-   #######################################\n-   # Generic ARMV8 - cross - No GL \n-   ifneq (,$(findstring armv8,$(platform)))\n-      CC = aarch64-linux-gnu-gcc\n-      CXX = aarch64-linux-gnu-g++\n-      CPUFLAGS += -DNO_ASM -DARM -DARM_ASM -DDONT_WANT_ARM_OPTIMIZATIONS -DARM_FIX -DCLASSIC -DARM64\n-      LDFLAGS += -static-libgcc -static-libstdc++\n-      GLES = 0\n-      HAVE_NEON = 0\n-      WITH_DYNAREC=aarch64\n-      ifneq (,$(findstring neon,$(platform)))\n-         CPUFLAGS += -D__NEON_OPT -mfpu=neon\n-         HAVE_NEON = 1\n-      endif\n-   endif\n+ #######################################\n+   # EmuELEC 64bit ARMV8 - cross - No GL \n+ifneq (,$(findstring emuelec64-armv8,$(platform)))\n+   CPUFLAGS += -DNO_ASM -DDONT_WANT_ARM_OPTIMIZATIONS -DARM_FIX -DCLASSIC -DARM64\n+   LDFLAGS += -static-libgcc #-static-libstdc++\n+   fpic = -fPIC\n+   GLES = 1\n+   GL_LIB := -lGLESv3\n+   HAVE_OPENGL = 0\n+   HAVE_NEON = 1\n+   FORCE_GLES = 1\n+   WITH_DYNAREC=aarch64\n+   PLATFORM_EXT := unix\n+   \n \n    #######################################\n    # Generic ARM\n-   ifneq (,$(findstring armv,$(platform)))\n+   else ifneq (,$(findstring armv,$(platform)))\n       CPUFLAGS += -DNO_ASM -DARM -D__arm__ -DARM_ASM -DNOSSE\n       WITH_DYNAREC=arm\n       ifneq (,$(findstring neon,$(platform)))\n@@ -268,6 +267,15 @@\n    PLATFORM_EXT := unix\n    WITH_DYNAREC=arm\n    HAVE_NEON=1\n+   ASFLAGS += -D__ARM_NEON__ -marm -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard\n+   CPUFLAGS += -O2 \\\n+      -fno-lto -fuse-linker-plugin -fno-semantic-interposition -fno-trapping-math \\\n+      -fdata-sections -ffunction-sections -Wl,--gc-sections \\\n+      -fno-stack-protector -fno-ident -fomit-frame-pointer \\\n+      -falign-functions=32 -falign-jumps=1 -falign-loops=1 \\\n+      -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \\\n+      -fno-strict-aliasing -fmerge-all-constants -fno-math-errno \\\n+      -marm -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard\n \n # OS X\n else ifneq (,$(findstring osx,$(platform)))\n"
  },
  {
    "path": "packages/sx05re/libretro/parallel-n64/patches/emuelec-arm32/parallel-n64-add_platform.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -284,7 +284,66 @@\n    PLATFORM_EXT := unix\n    WITH_DYNAREC=arm\n    HAVE_NEON=1\n-\n+   \n+# Emuelec Amlogic\n+else ifneq (,$(findstring Amlogic,$(platform)))\n+   TARGET := $(TARGET_NAME)_libretro.so\n+   LDFLAGS += -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T\n+   fpic = -fPIC\n+   GLES = 1\n+   GL_LIB := -lGLESv2\n+   CPUFLAGS += -DNO_ASM -DARM -D__arm__ -DARM_ASM -D__NEON_OPT -DNOSSE -DARM_FIX -DCLASSIC\n+   PLATFORM_EXT := unix\n+   WITH_DYNAREC=arm\n+   HAVE_NEON=1\n+   \n+\tifneq (,$(findstring Amlogic-ng,$(platform)))\n+\t\tASFLAGS += -D__ARM_NEON__ -marm -mcpu=cortex-a73 -mtune=cortex-a73.cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard\n+\telse\n+\t\tASFLAGS += -D__ARM_NEON__ -marm -mcpu=cortex-a53 -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard\n+\tendif\n+   \n+   CPUFLAGS += -O2 \\\n+      -fno-lto -fuse-linker-plugin -fno-semantic-interposition -fno-trapping-math \\\n+      -fdata-sections -ffunction-sections -Wl,--gc-sections \\\n+      -fno-stack-protector -fno-ident -fomit-frame-pointer \\\n+      -falign-functions=32 -falign-jumps=1 -falign-loops=1 \\\n+      -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \\\n+      -fno-strict-aliasing -fmerge-all-constants -fno-math-errno -fcommon\n+\tifneq (,$(findstring Amlogic-ng,$(platform)))     \n+\t\tCPUFLAGS += -marm -mtune=cortex-a73.cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard\n+\telse\n+\t\tCPUFLAGS += -marm -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard  \n+\tendif\n+\n+# Emuelec OdroidGoA\n+else ifneq (,$(findstring Odroidgoa,$(platform)))\n+   TARGET := $(TARGET_NAME)_libretro.so\n+   LDFLAGS += -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T\n+   fpic = -fPIC\n+   GLES = 1\n+   GL_LIB := -lGLESv2\n+   CPUFLAGS += -DNO_ASM -DARM -D__arm__ -DARM_ASM -D__NEON_OPT -DNOSSE -DARM_FIX -DCLASSIC\n+   PLATFORM_EXT := unix\n+   WITH_DYNAREC=arm\n+   HAVE_NEON=1\n+   ifneq (,$(findstring RK356x,$(platform)))\n+   ASFLAGS += -D__ARM_NEON__ -marm -mcpu=cortex-a55 -mtune=cortex-a55 -mfpu=neon-fp-armv8 -mfloat-abi=hard\n+  else\n+   ASFLAGS += -D__ARM_NEON__ -marm -mcpu=cortex-a35 -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard\n+  endif\n+   CPUFLAGS += -O2 \\\n+      -fno-lto -fuse-linker-plugin -fno-semantic-interposition -fno-trapping-math \\\n+      -fdata-sections -ffunction-sections -Wl,--gc-sections \\\n+      -fno-stack-protector -fno-ident -fomit-frame-pointer \\\n+      -falign-functions=32 -falign-jumps=1 -falign-loops=1 \\\n+      -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \\\n+      -fno-strict-aliasing -fmerge-all-constants -fno-math-errno -fcommon\n+   ifneq (,$(findstring RK356x,$(platform)))\n+   CPUFLAGS += -marm -mtune=cortex-a55 -mfpu=neon-fp-armv8 -mfloat-abi=hard\n+  else\n+   CPUFLAGS += -marm -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard\n+  endif\n # OS X\n else ifneq (,$(findstring osx,$(platform)))\n    TARGET := $(TARGET_NAME)_libretro.dylib\n"
  },
  {
    "path": "packages/sx05re/libretro/pcsx_rearmed/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"pcsx_rearmed\"\nPKG_VERSION=\"228c14e10e9a8fae0ead8adf30daad2cdd8655b9\"\nPKG_SHA256=\"0530dc5772466c31900a5bb8b412b67f82a01d8cbf771e07fe25d5799c161f0a\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/pcsx_rearmed\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain alsa\"\nPKG_SHORTDESC=\"ARM optimized PCSX fork\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"+speed -gold\"\n\nmake_target() {\ncd ${PKG_BUILD}\nexport ALLOW_LIGHTREC_ON_ARM=1\nif [ \"${ARCH}\" == \"arm\" ]; then\n\tif [ \"${DEVICE}\" == \"Amlogic-old\" ]; then\n\t\tmake -f Makefile.libretro GIT_VERSION=${PKG_VERSION} platform=rpi3\n\telse\n\t\tmake -f Makefile.libretro GIT_VERSION=${PKG_VERSION} platform=rpi4\n\tfi\nelse\n\tif [ \"${DEVICE}\" == \"Amlogic-old\" ]; then\n\t\tmake -f Makefile.libretro GIT_VERSION=${PKG_VERSION} platform=h5\n\telif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"Gameforce\" ]; then\n\t\tsed -i \"s|cortex-a53|cortex-a35|g\" Makefile.libretro\n\t\tmake -f Makefile.libretro GIT_VERSION=${PKG_VERSION} platform=h5\n\telse\n\t\tmake -f Makefile.libretro GIT_VERSION=${PKG_VERSION} platform=CortexA73_G12B\n\tfi\nfi\n}\n\nmakeinstall_target() {\nINSTALLTO=\"/usr/lib/libretro\"\nmkdir -p ${INSTALL}${INSTALLTO}/\n\nif [ \"${ARCH}\" == \"arm\" ]; then\n    cp pcsx_rearmed_libretro.so ${INSTALL}${INSTALLTO}/pcsx_rearmed_32b_libretro.so\nelse\n    cp pcsx_rearmed_libretro.so ${INSTALL}${INSTALLTO}\nfi\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/picodrive/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"picodrive\"\nPKG_VERSION=\"3cd193ed1c7a2ffa94e69334367c64c136de0c7d\"\nPKG_LICENSE=\"MAME\"\nPKG_SITE=\"https://github.com/irixxxx/picodrive\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Libretro implementation of PicoDrive. (Sega Megadrive/Genesis/Sega Master System/Sega GameGear/Sega CD/32X)\"\nPKG_LONGDESC=\"This is yet another Megadrive / Genesis / Sega CD / Mega CD / 32X / SMS emulator, which was written having ARM-based handheld devices in mind (such as smartphones and handheld consoles like GP2X and Pandora), but also runs on non-ARM little-endian hardware too.\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_BUILD_FLAGS=\"-gold\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    make -C .. -f Makefile.libretro platform=armv6\n  elif [ \"${ARCH}\" == \"aarch64\" ]; then\n  cd ${PKG_BUILD}\n    make -f Makefile.libretro platform=arm64\n  else\n    make -C .. -f Makefile.libretro\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/picodrive_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/pocketcdg/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"pocketcdg\"\nPKG_VERSION=\"c1fac9f7164e60e5c4b81705b65d65750abfe488\"\nPKG_SHA256=\"629ec6ef7ffe2e10a3a8074e493edff156e0d0712ee6b6b33f685a16424b9cad\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/libretro/libretro-pocketcdg\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Karaoke player\"\nPKG_LONGDESC=\"Karaoke player\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make CC=${CC}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp pocketcdg_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/pokemini/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"pokemini\"\nPKG_VERSION=\"19095803f1434eb980db6e4004187a4b786e20b6\"\nPKG_SHA256=\"ddc19868e876ed4f6edff5e9f5b3801c0d77cf53885f404bdf250c2173ee8126\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/pokemini\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Obscure nintendo handheld emulator (functional,no color files or savestates currently)\"\nPKG_LONGDESC=\"Obscure nintendo handheld emulator (functional,no color files or savestates currently)\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp pokemini_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/potator/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"potator\"\nPKG_VERSION=\"ad87bc6068ef126e48339b440465fb0bf5a2794f\"\nPKG_SHA256=\"a863462780ac042ad1a8defe1ab3e864fde060c645d605de3661962b72c4b808\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"The Unlicense\"\nPKG_SITE=\"https://github.com/libretro/potator\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_LONGDESC=\"A Watara Supervision Emulator based on Normmatt version \"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\ncd ${PKG_BUILD}/platform/libretro\nmake\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/platform/libretro/potator_libretro.so ${INSTALL}/usr/lib/libretro/potator_libretro.so\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/ppsspp/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"ppsspp\"\nPKG_VERSION=\"$(get_pkg_version PPSSPPSDL)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory PPSSPPSDL)\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/hrydgard/ppsspp\"\nPKG_URL=\"https://github.com/hrydgard/ppsspp.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 ffmpeg\"\nPKG_LONGDESC=\"A PSP emulator for Android, Windows, Mac, Linux and Blackberry 10, written in C++.\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory PPSSPPSDL)/patches\"\n\nPKG_LIBNAME=\"ppsspp_libretro.so\"\nPKG_LIBPATH=\"lib/${PKG_LIBNAME}\"\n\npost_unpack() {\n  ( cd \"${PKG_BUILD}\" && git submodule update --init --recursive )\n}\n\npre_configure_target() {\n  PKG_CMAKE_OPTS_TARGET=\"-DLIBRETRO=ON \\\n                         -DUSE_SYSTEM_FFMPEG=ON \\\n                         -DUSING_X11_VULKAN=OFF\"\n\n  if [ \"${ARCH}\" = \"arm\" ] && [ ! \"${TARGET_CPU}\" = \"arm1176jzf-s\" ]; then\n    PKG_CMAKE_OPTS_TARGET+=\" -DARMV7=ON\"\n  elif [ \"${TARGET_CPU}\" = \"arm1176jzf-s\" ]; then\n    PKG_CMAKE_OPTS_TARGET+=\" -DARM=ON\"\n  fi\n\n  if [ \"${OPENGLES_SUPPORT}\" = \"yes\" ]; then\n    PKG_CMAKE_OPTS_TARGET+=\" -DUSING_FBDEV=ON \\\n                             -DUSING_EGL=ON \\\n                             -DUSING_GLES2=ON\"\n  fi\n  \nif [ ${ARCH} == \"aarch64\" ]; then\nPKG_CMAKE_OPTS_TARGET+=\" -DARM64=ON\"\nelse\nPKG_CMAKE_OPTS_TARGET+=\" -DARMV7=ON\"\nfi\n  \n}\n\npre_make_target() {\n  # fix cross compiling\n  find ${PKG_BUILD} -name flags.make -exec sed -i \"s:isystem :I:g\" \\{} \\;\n  find ${PKG_BUILD} -name build.ninja -exec sed -i \"s:isystem :I:g\" \\{} \\;\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_LIBPATH} ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/ppsspp/patches/ppsspp-x86_64-fix.patch",
    "content": "diff -Naur ppsspp-00051fd/ext/glew/glew.c ppsspp-00051fd.patch/ext/glew/glew.c\n--- ppsspp-00051fd/ext/glew/glew.c\t2018-12-24 10:48:13.869315087 +0100\n+++ ppsspp-00051fd.patch/ext/glew/glew.c\t2018-12-24 10:50:23.969537401 +0100\n@@ -20872,8 +20872,6 @@\n   return r;\n #elif defined(_WIN32)\n   return wglewInit();\n-#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) /* _UNIX */\n-  return glxewInit();\n #else\n   return r;\n #endif /* _WIN32 */\n"
  },
  {
    "path": "packages/sx05re/libretro/prboom/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"prboom\"\nPKG_VERSION=\"b3e5f8b2e8855f9c6fc7ff7a0036e4e61379177d\"\nPKG_SHA256=\"e4a7eb96ab547027e0fbd9d27d0057d522b19e604656a0b34f00853795a4cc47\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/libretro-prboom\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"libretro implementation of Doom\"\nPKG_LONGDESC=\"libretro implementation of Doom\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp prboom_libretro.so ${INSTALL}/usr/lib/libretro/prboom_libretro.so\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/prosystem/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"prosystem\"\nPKG_VERSION=\"acae250da8d98b8b9707cd499e2a0bf6d8500652\"\nPKG_SHA256=\"5a376c6621678daff86977de12b1421f1599602683a8d7228f75281ab4274229\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/prosystem-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of ProSystem to libretro.\"\nPKG_LONGDESC=\"Port of ProSystem to libretro.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp prosystem_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/psp1/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"psp1\"\nPKG_VERSION=\"edf1cb70cc01c9f4ce81a83e1538c7b5ab7a2658\"\nPKG_SHA256=\"66e8c2902e2580c1e77cd13e2128a59fd0aac1a672782e73ba3c2a4411bdc247\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/PSP1\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Non-shallow fork of PPSSPP for libretro exclusively.\"\nPKG_LONGDESC=\"A fast and portable PSP emulator\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\nPKG_BUILD_FLAGS=\"-lto\"\n\nmake_target() {\n  cd ${PKG_BUILD}/libretro\n  if [ \"${OPENGLES}\" == \"gpu-viv-bin-mx6q\" ]; then\n    CFLAGS=\"${CFLAGS} -DLINUX -DEGL_API_FB\"\n    CXXFLAGS=\"${CXXFLAGS} -DLINUX -DEGL_API_FB\"\n  fi\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    SYSROOT_PREFIX=${SYSROOT_PREFIX} make platform=imx6\n  else\n    make\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ../libretro/ppsspp_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/puae/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"puae\"\n#PKG_VERSION=\"c60e42ef9ad474518d4be859b7c1da2c0c7e1d6f\"\nPKG_VERSION=\"9e2aa770a9b6b0a4e1f4fc05eb0db6c8e7aba8ee\"\n\n#PKG_SHA256=\"933fd83ad42ceb558c2ae9c0d2ea0a7bb68f05f8ab828951bcabfe400ce8c50f\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libretro/libretro-uae\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"WIP libretro port of UAE (P-UAE and libco) Expect bugs\"\nPKG_LONGDESC=\"WIP libretro port of UAE (P-UAE and libco) Expect bugs\"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    CFLAGS=\"${CFLAGS} -DARM -marm\"\n  elif  [ \"${ARCH}\" == \"aarch64\" ]; then\n  CFLAGS=\"${CFLAGS} -DARM\"\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp puae_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/puae2021/package.mk",
    "content": "PKG_NAME=\"puae2021\"\nPKG_VERSION=\"a19f7423e8ac8bedf92023064589daf888340552\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libretro/libretro-uae\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_GIT_CLONE_BRANCH=\"2.6.1\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Portable Commodore Amiga Emulator. Branch frozen at older version for better performance.\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n    cp -v puae2021_libretro.so ${INSTALL}/usr/lib/libretro/\n  mkdir -p ${INSTALL}/usr/share/retroarch/system/uae_data\n    cp -vR ${PKG_BUILD}/sources/uae_data/* ${INSTALL}/usr/share/retroarch/system/uae_data/\n}"
  },
  {
    "path": "packages/sx05re/libretro/px68k/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"px68k\"\nPKG_VERSION=\"9dfa6abc25ddd6e597790f7a535cd0a1d7f9c385\"\nPKG_SHA256=\"c03c89d350ec4b2c73b61a517fb4450eccd2307961f30c3b94eefc14dfd855ef\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Unknown\"\nPKG_SITE=\"https://github.com/libretro/px68k-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Portable SHARP X68000 Emulator for PSP, Android and other platforms\"\nPKG_LONGDESC=\"Portable SHARP X68000 Emulator for PSP, Android and other platforms\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp px68k_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/quasi88/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present asakous (https://github.com/asakous)\n\nPKG_NAME=\"quasi88\"\nPKG_VERSION=\"42be798db5585f62b4bd34ce49dd1e8063c9d7c1\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"BSD3\"\nPKG_SITE=\"https://github.com/libretro/quasi88-libretro\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"A port of QUASI88, a PC-8800 series emulator by Showzoh Fukunaga, to the libretro API\"\nPKG_LONGDESC=\"A port of QUASI88, a PC-8800 series emulator by Showzoh Fukunaga, to the libretro API\"\nPKG_TOOLCHAIN=\"make\"\nGET_HANDLER_SUPPORT=\"git\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp quasi88_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/quicknes/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"quicknes\"\nPKG_VERSION=\"dbf19f73e3eb9701d1c7f5898f57c097e05c9fbd\"\nPKG_SHA256=\"3a2e3c564156a7e18b15b8ac04fc5aa10da3f44d8253a073cc42fdd74a1a48de\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"LGPLv2.1+\"\nPKG_SITE=\"https://github.com/libretro/QuickNES_Core\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"The QuickNES core library, originally by Shay Green, heavily modified\"\nPKG_LONGDESC=\"The QuickNES core library, originally by Shay Green, heavily modified\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make platform=armv8-hardfloat-cortex-a53 \n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp quicknes_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/reminiscence/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"reminiscence\"\nPKG_VERSION=\"e80d7b1aa287010e30c54f72252a9303173f1c7e\"\nPKG_SHA256=\"68804a7f65faf4f86b69ab86b85953d9e0703b9499895b9307f5b16195355891\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/libretro/REminiscence\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of Gregory Montoir's Flashback emulator, running as a libretro core.\"\nPKG_LONGDESC=\"Port of Gregory Montoir's Flashback emulator, running as a libretro core.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nconfigure_target () {\n  : # nothing to do\n}\n\nmake_target() {\n  cd ${PKG_BUILD}\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp reminiscence_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/same_cdi/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"same_cdi\"\nPKG_VERSION=\"7ee1d8e9cb4307b7cd44ee1dd757e9b3f48f41d5\"\nPKG_LICENSE=\"MAME\"\nPKG_SITE=\"https://github.com/libretro/same_cdi\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain expat zlib flac sqlite\"\nPKG_LONGDESC=\"SAME_CDI is a libretro core to play CD-i games. This is a fork and modification of the MAME libretro core\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"-parallel\"\n\nPKG_MAKE_OPTS_TARGET=\"-f Makefile.libretro REGENIE=1 VERBOSE=1 NOWERROR=1 OPENMP=0 CROSS_BUILD=1 TOOLS=0 RETRO=1 PYTHON_EXECUTABLE=python3 CONFIG=libretro LIBRETRO_OS=unix TARGET=mame OSD=retro USE_SYSTEM_LIB_EXPAT=1 USE_SYSTEM_LIB_ZLIB=1 USE_SYSTEM_LIB_FLAC=1 USE_SYSTEM_LIB_SQLITE3=1 LIBRETRO_CPU= ARCH= PROJECT=\"\n\ncase ${ARCH} in\n  x86_64)\n    PKG_MAKE_OPTS_TARGET+=\" NOASM=0 PTR64=1 PLATFORM=x86_64\"\n    ;;\n  i386)\n    PKG_MAKE_OPTS_TARGET+=\" NOASM=0 PTR64=0 PLATFORM=x86\"\n    ;;\n  aarch64)\n    PKG_MAKE_OPTS_TARGET+=\" NOASM=0 PTR64=0 PLATFORM=arm64\"\n    ;;\n  arm)\n    PKG_MAKE_OPTS_TARGET+=\" NOASM=1 PTR64=0 PLATFORM=arm\"\n    ;;\nesac\n\npre_make_target() {\n  PKG_MAKE_OPTS_TARGET+=\" OVERRIDE_CC=${CC} OVERRIDE_CXX=${CXX} OVERRIDE_LD=${LD}\"\n  sed -i scripts/genie.lua \\\n      -e 's|-static-libstdc++||g'\n}\n\nmake_target() {\n  unset DISTRO\n  [ \"${ARCH}\" = \"aarch64\" ] && export ARCHOPTS=\"-D__aarch64__ -DASMJIT_BUILD_X86\"\n  make ${PKG_MAKE_OPTS_TARGET}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n    cp -v same_cdi_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/same_cdi/patches/mame-crosscompile.patch",
    "content": "--- a/3rdparty/genie/build/gmake.linux/genie.make\t2018-08-11 00:17:44.000000000 +0200\n+++ b/3rdparty/genie/build/gmake.linux/genie.make\t2019-04-03 11:57:27.671223016 +0200\n@@ -28,8 +28,8 @@\n   RM    = $(SILENT) del /F \"$(subst /,\\\\,$(1))\" 2> nul || exit 0\n endif\n \n-CC  = gcc\n-CXX = g++\n+CC  = $(HOST_CC)\n+CXX = $(HOST_CXX)\n AR  = ar\n \n ifndef RESCOMP\n@@ -50,12 +50,12 @@\n   INCLUDES           += -I\"../../src/host/lua-5.3.0/src\"\n   ALL_CPPFLAGS       += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)\n   ALL_ASMFLAGS       += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n-  ALL_CFLAGS         += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n-  ALL_CXXFLAGS       += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n-  ALL_OBJCFLAGS      += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n-  ALL_OBJCPPFLAGS    += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n+  ALL_CFLAGS         += $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n+  ALL_CXXFLAGS       += $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n+  ALL_OBJCFLAGS      += $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n+  ALL_OBJCPPFLAGS    += $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough\n   ALL_RESFLAGS       += $(RESFLAGS) $(DEFINES) $(INCLUDES)\n-  ALL_LDFLAGS        += $(LDFLAGS) -L\".\" -s -rdynamic\n+  ALL_LDFLAGS        += -L\".\" -s -rdynamic\n   LIBDEPS            +=\n   LDDEPS             +=\n   LDRESP              =\n--- a/3rdparty/genie/src/host/scripts.c\t2019-05-21 22:41:14.207745861 +0200\n+++ b/3rdparty/genie/src/host/scripts.c\t2019-05-21 22:42:43.159893481 +0200\n@@ -147,7 +147,7 @@\n \n \t/* tools/gcc.lua */\n \t\"premake.gcc = { }\\npremake.gcc.cc     = \\\"gcc\\\"\\npremake.gcc.cxx    = \\\"g++\\\"\\npremake.gcc.ar     = \\\"ar\\\"\\npremake.gcc.rc     = \\\"windres\\\"\\npremake.gcc.llvm   = false\\nlocal cflags =\\n{\\nEnableSSE        = \\\"-msse\\\",\\nEnableSSE2       = \\\"-msse2\\\",\\nEnableAVX        = \\\"-mavx\\\",\\nEnableAVX2       = \\\"-mavx2\\\",\\nPedanticWarnings = \\\"-Wall -Wextra -pedantic\\\",\\nExtraWarnings    = \\\"-Wall -Wextra\\\",\\nFatalWarnings    = \\\"-Werror\\\",\\nFloatFast        = \\\"-ffast-math\\\",\\nFloatStrict      = \\\"-ffloat-store\\\",\\nNoFramePointer   = \\\"-fomit-frame-pointer\\\",\\nOptimize         = \\\"-O2\\\",\\nOptimizeSize     = \\\"-Os\\\",\\nOptimizeSpeed    = \\\"-O3\\\",\\nSymbols          = \\\"-g\\\",\\n}\\nlocal cxxflags =\\n{\\nCpp11        = \\\"-std=c++11\\\",\\nCpp14        = \\\"-std=c++14\\\",\\nCpp17        = \\\"-std=c++17\\\",\\nCppLatest    = \\\"-std=c++2a\\\",\\nNoExceptions = \\\"-fno-exceptions\\\",\\nNoRTTI       = \\\"-fno-rtti\\\",\\nUnsignedChar = \\\"-funsigned-char\\\",\\n}\\nlocal objcflags =\\n{\\nObjcARC = \\\"-fobjc-arc\\\",\\n}\\npremake.gcc.platforms =\\n{\\nNative = {\\n\"\n-\t\"cppflags = \\\"-MMD -MP\\\",\\n},\\nx32 = {\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-m32\\\",\\n},\\nx64 = {\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-m64\\\",\\n},\\nUniversal = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch i386 -arch x86_64 -arch ppc -arch ppc64\\\",\\n},\\nUniversal32 = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch i386 -arch ppc\\\",\\n},\\nUniversal64 = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch x86_64 -arch ppc64\\\",\\n},\\nPS3 = {\\ncc         = \\\"ppu-lv2-g++\\\",\\ncxx        = \\\"ppu-lv2-g++\\\",\\nar         = \\\"ppu-lv2-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\n},\\nWiiDev = {\\ncppflags    = \\\"-MMD -MP -I$(LIBOGC_INC) $(MACHDEP)\\\",\\nldflags= \\\"-L$(LIBOGC_LIB) $(MACHDEP)\\\",\\ncfgsettings = [[\\n  ifeq ($(strip $(DEVKITPPC)),)\\n    $(error \\\"DEVKITPPC environment variable is not set\\\")'\\n  endif\\n  include $(DEVKITPPC)/wii_rules']],\\n},\\nOrbis = {\\ncc         = \\\"orbis-clang\\\",\\ncxx        = \\\"orbis-clang++\\\",\\nar         = \\\"orbis-ar\\\",\\ncppflag\"\n+\t\"cppflags = \\\"-MMD -MP\\\",\\n},\\nx32 = {\\ncppflags = \\\"-MMD -MP\\\"\\n},\\nx64 = {\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-m64\\\",\\n},\\nUniversal = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch i386 -arch x86_64 -arch ppc -arch ppc64\\\",\\n},\\nUniversal32 = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch i386 -arch ppc\\\",\\n},\\nUniversal64 = {\\nar       = \\\"libtool\\\",\\ncppflags = \\\"-MMD -MP\\\",\\nflags    = \\\"-arch x86_64 -arch ppc64\\\",\\n},\\nPS3 = {\\ncc         = \\\"ppu-lv2-g++\\\",\\ncxx        = \\\"ppu-lv2-g++\\\",\\nar         = \\\"ppu-lv2-ar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\n},\\nWiiDev = {\\ncppflags    = \\\"-MMD -MP -I$(LIBOGC_INC) $(MACHDEP)\\\",\\nldflags= \\\"-L$(LIBOGC_LIB) $(MACHDEP)\\\",\\ncfgsettings = [[\\n  ifeq ($(strip $(DEVKITPPC)),)\\n    $(error \\\"DEVKITPPC environment variable is not set\\\")'\\n  endif\\n  include $(DEVKITPPC)/wii_rules']],\\n},\\nOrbis = {\\ncc         = \\\"orbis-clang\\\",\\ncxx        = \\\"orbis-clang++\\\",\\nar         = \\\"orbis-ar\\\",\\ncppflag\"\n \t\"s   = \\\"-MMD -MP\\\",\\n},\\nEmscripten = {\\ncc         = \\\"$(EMSCRIPTEN)/emcc\\\",\\ncxx        = \\\"$(EMSCRIPTEN)/em++\\\",\\nar         = \\\"$(EMSCRIPTEN)/emar\\\",\\ncppflags   = \\\"-MMD -MP\\\",\\n}\\n}\\nlocal platforms = premake.gcc.platforms\\nfunction premake.gcc.getcppflags(cfg)\\nlocal flags = { }\\ntable.insert(flags, platforms[cfg.platform].cppflags)\\nif flags[1]:startswith(\\\"-MMD\\\") then\\ntable.insert(flags, \\\"-MP\\\")\\nend\\nreturn flags\\nend\\nfunction premake.gcc.getcflags(cfg)\\nlocal result = table.translate(cfg.flags, cflags)\\ntable.insert(result, platforms[cfg.platform].flags)\\nif cfg.system ~= \\\"windows\\\" and cfg.kind == \\\"SharedLib\\\" then\\ntable.insert(result, \\\"-fPIC\\\")\\nend\\nreturn result\\nend\\nfunction premake.gcc.getcxxflags(cfg)\\nlocal result = table.translate(cfg.flags, cxxflags)\\nreturn result\\nend\\nfunction premake.gcc.getobjcflags(cfg)\\nreturn table.translate(cfg.flags, objcflags)\\nend\\nfunction premake.gcc.getldflags(cfg)\\nlocal result = { }\\nif not cfg.flags.Symbols then\\nif cfg.system == \\\"macosx\\\" then\"\n \t\"\\nelse\\ntable.insert(result, \\\"-s\\\")\\nend\\nend\\nif cfg.kind == \\\"Bundle\\\" then\\ntable.insert(result, \\\"-bundle\\\")\\nend\\nif cfg.kind == \\\"SharedLib\\\" then\\nif cfg.system == \\\"macosx\\\" then\\ntable.insert(result, \\\"-dynamiclib\\\")\\nelse\\ntable.insert(result, \\\"-shared\\\")\\nend\\nif cfg.system == \\\"windows\\\" and not cfg.flags.NoImportLib then\\ntable.insert(result, '-Wl,--out-implib=\\\"' .. cfg.linktarget.fullpath .. '\\\"')\\nend\\nend\\nif cfg.kind == \\\"WindowedApp\\\" and cfg.system == \\\"windows\\\" then\\ntable.insert(result, \\\"-mwindows\\\")\\nend\\nlocal platform = platforms[cfg.platform]\\ntable.insert(result, platform.flags)\\ntable.insert(result, platform.ldflags)\\nreturn result\\nend\\nfunction premake.gcc.getlibdirflags(cfg)\\nlocal result = { }\\nfor _, value in ipairs(premake.getlinks(cfg, \\\"all\\\", \\\"directory\\\")) do\\ntable.insert(result, '-L\\\\\\\"' .. value .. '\\\\\\\"')\\nend\\nreturn result\\nend\\nfunction premake.gcc.islibfile(p)\\nif path.getextension(p) == \\\".a\\\" then\\nreturn true\\nend\\nreturn false\\nend\\nfunction premake.gcc.ge\"\n \t\"tlibfiles(cfg)\\nlocal result = {}\\nfor _, value in ipairs(premake.getlinks(cfg, \\\"system\\\", \\\"fullpath\\\")) do\\nif premake.gcc.islibfile(value) then\\ntable.insert(result, _MAKE.esc(value))\\nend\\nend\\nreturn result\\nend\\nfunction premake.gcc.getlinkflags(cfg)\\nlocal result = {}\\nfor _, value in ipairs(premake.getlinks(cfg, \\\"system\\\", \\\"fullpath\\\")) do\\nif premake.gcc.islibfile(value) then\\nvalue = path.rebase(value, cfg.project.location, cfg.location)\\ntable.insert(result, _MAKE.esc(value))\\nelseif path.getextension(value) == \\\".framework\\\" then\\ntable.insert(result, '-framework ' .. _MAKE.esc(path.getbasename(value)))\\nelse\\ntable.insert(result, '-l' .. _MAKE.esc(path.getname(value)))\\nend\\nend\\nreturn result\\nend\\nfunction premake.gcc.wholearchive(lib)\\nif premake.gcc.llvm then\\nreturn {\\\"-force_load\\\", lib}\\nelse\\nreturn {\\\"-Wl,--whole-archive\\\", lib, \\\"-Wl,--no-whole-archive\\\"}\\nend\\nend\\nfunction premake.gcc.getarchiveflags(prj, cfg, ndx)\\nlocal result = {}\\nif cfg.platform:startswith(\\\"Universal\\\") then\\n\"\n--- a/scripts/toolchain.lua\t2019-04-30 15:47:21.000000000 +0200\n+++ b/scripts/toolchain.lua\t2019-05-21 22:51:48.116148725 +0200\n@@ -698,9 +698,6 @@\n \n \tconfiguration { \"linux-gcc\", \"x32\" }\n \t\tobjdir (_buildDir .. \"linux_gcc\" .. \"/obj\")\n-\t\tbuildoptions {\n-\t\t\t\"-m32\",\n-\t\t}\n \n \tconfiguration { \"linux-gcc\", \"x32\", \"Release\" }\n \t\ttargetdir (_buildDir .. \"linux_gcc\" .. \"/bin/x32/Release\")\n"
  },
  {
    "path": "packages/sx05re/libretro/sameboy/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"sameboy\"\nPKG_VERSION=\"51433012a871a44555492273fd22f29867d12655\"\nPKG_SHA256=\"cb1b914ce29d250ed1b170b317c114106bdd9208d69100f3f761eeddd5fb472d\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/libretro/sameboy\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_GIT_CLONE_BRANCH=\"buildbot\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Gameboy and Gameboy Color emulator written in C\"\nPKG_LONGDESC=\"Gameboy and Gameboy Color emulator written in C\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -C libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp libretro/sameboy_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/sameduck/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"sameduck\"\nPKG_VERSION=\"5619abdb01cee6bedb47599cdb5532c318443b52\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/LIJI32/SameBoy\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_GIT_CLONE_BRANCH=\"SameDuck\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Mega Duck / Cougar Boy emulator written in C\"\nPKG_LONGDESC=\"Mega Duck / Cougar Boy emulator written in C\"\nGET_HANDLER_SUPPORT=\"git\"\n\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -C libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp build/bin/sameduck_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/scummvm/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"scummvm\"\nPKG_VERSION=\"686cdd13719b92554fa46b264c512ca7deec7a96\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/scummvm\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"ScummVM with libretro backend.\"\nPKG_LONGDESC=\"ScummVM is a program which allows you to run certain classic graphical point-and-click adventure games, provided you already have their data files.\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"-lto\"\n\npost_unpack() {\n  sed -i \"s|DEFINES  += -Wno-multichar|#DEFINES  += -Wno-multichar|\" ${PKG_BUILD}/Makefile.common\n}\n\nmake_target() {\n  cd \"${PKG_BUILD}/backends/platform/libretro\"\n  make all platform=rpi4_64\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp \"${PKG_BUILD}/backends/platform/libretro/scummvm_libretro.\"{so,info} ${INSTALL}/usr/lib/libretro/\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/scummvm\n  cp ${PKG_BUILD}/backends/platform/libretro/scummvm.zip ${INSTALL}/usr/config/emuelec/configs/scummvm\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/snes9x/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"snes9x\"\nPKG_VERSION=\"abfc018c90799eb55b773fc46d486167d8b3c762\"\nPKG_SHA256=\"d3d2e83ea318f0de3eca285c3b2446788f4c9c891beeae1c8a8e54c6a384f8a6\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Non-commercial\"\nPKG_SITE=\"https://github.com/snes9xgit/snes9x\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Snes9x - Portable Super Nintendo Entertainment System (TM) emulator\"\nPKG_LONGDESC=\"Snes9x - Portable Super Nintendo Entertainment System (TM) emulator\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    CXXFLAGS=\"${CXXFLAGS} -DARM\"\n  fi\n  \n   if ([ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"OdroidGoAdvance\" ]) && [ \"${ARCH}\" == \"arm\" ]; then\n    make -C libretro platform=classic_armv8_a35\n   else\n   make -C libretro\n   fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp libretro/snes9x_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/snes9x2002/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"snes9x2002\"\nPKG_VERSION=\"a0709ec7dcd6de2fbebb43106bd757b649e3b7cf\"\nPKG_SHA256=\"58abd84309d0fafacccd94920aa4b99eeb935c4157971487c1052b6104de2412\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Non-commercial\"\nPKG_SITE=\"https://github.com/libretro/snes9x2002\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Snes9x 2002.\"\nPKG_LONGDESC=\"Snes9x 2002. Port of SNES9x 1.39 for libretro (was previously called PocketSNES). Heavily optimized for ARM.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp snes9x2002_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/snes9x2005/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"snes9x2005\"\nPKG_VERSION=\"74d871db9b4dba6dbe6c5ecebc88cbf255be5349\"\nPKG_SHA256=\"e8e659fe3ed3686823f77a07b22289bc36b367c39bacfbad4285cc822d7998f8\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Non-commercial\"\nPKG_SITE=\"https://github.com/libretro/snes9x2005\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Snes9x 2005.\"\nPKG_LONGDESC=\"Snes9x 2005. Port of SNES9x 1.43 for libretro (was previously called CAT SFC).\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp snes9x2005_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/snes9x2005_plus/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"snes9x2005_plus\"\nPKG_VERSION=\"74d871db9b4dba6dbe6c5ecebc88cbf255be5349\"\nPKG_SHA256=\"e8e659fe3ed3686823f77a07b22289bc36b367c39bacfbad4285cc822d7998f8\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Non-commercial\"\nPKG_SITE=\"https://github.com/libretro/snes9x2005\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Snes9x 2005 Plus.\"\nPKG_LONGDESC=\"Snes9x 2005 Plus. Port of SNES9x 1.43 for libretro (was previously called CAT SFC) with enabled BLARRG APU.\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_MAKE_OPTS_TARGET=\"USE_BLARGG_APU=1 platform=armv8-hardfloat-neon\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp snes9x2005_plus_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/snes9x2005_plus/patches/aarch64/01-snes9x2005_plux-01-fix-fpic.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -74,9 +74,10 @@\n else ifneq (,$(findstring armv,$(platform)))\n        TARGET := $(TARGET_NAME)_libretro.so\n        fpic := -fPIC\n+       FLAGS += $(fpic)\n        SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T\n-       CC = gcc\n-       CXX = g++\n+       #CC = gcc\n+       #CXX = g++\n        PLATFORM_DEFINES += -marm\n        ifneq (,$(findstring softfloat,$(platform)))\n                PLATFORM_DEFINES += -mfloat-abi=softfp\n@@ -84,8 +85,8 @@\n                PLATFORM_DEFINES += -mfloat-abi=hard\n        endif\n        ifneq (,$(findstring neon,$(platform)))\n-               FLAGS += -mfpu=neon\n-               ASFLAGS += -mfpu=neon\n+               #FLAGS += -mfpu=neon\n+               #ASFLAGS += -mfpu=neon\n                HAVE_NEON = 1\n        endif\n        PLATFORM_DEFINES += -DARM\n"
  },
  {
    "path": "packages/sx05re/libretro/snes9x2005_plus/patches/arm/01-snes9x2005_plux-01-fix-fpic.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -74,9 +74,10 @@\n else ifneq (,$(findstring armv,$(platform)))\n        TARGET := $(TARGET_NAME)_libretro.so\n        fpic := -fPIC\n+       FLAGS += $(fpic)\n        SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T\n-       CC = gcc\n-       CXX = g++\n+       #CC = gcc\n+       #CXX = g++\n        PLATFORM_DEFINES += -marm\n        ifneq (,$(findstring softfloat,$(platform)))\n                PLATFORM_DEFINES += -mfloat-abi=softfp\n"
  },
  {
    "path": "packages/sx05re/libretro/snes9x2010/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"snes9x2010\"\nPKG_VERSION=\"f9ae8fd28b13070a945a829ccf41cbf90a21d0f7\"\nPKG_SHA256=\"730aa78b64c5c214454361c517b351ce7d225a89dd51705ebb94a8fedc3bd3e3\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Non-commercial\"\nPKG_SITE=\"https://github.com/libretro/snes9x2010\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Snes9x 2010.\"\nPKG_LONGDESC=\"Snes9x 2010. Port of Snes9x 1.52+ to Libretro (previously called SNES9x Next). Rewritten in C and several optimizations and speedhacks.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\nif ([ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"OdroidGoAdvance\" ]) && [ \"${ARCH}\" == \"arm\" ]; then\n  make -f Makefile.libretro platform=goa_armv8_a35\n  else\n  make -f Makefile.libretro\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp snes9x2010_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/snes9x2010/patches/snes9x2010-add-oga.patch",
    "content": "--- a/Makefile.libretro\n+++ b/Makefile.libretro\n@@ -344,6 +344,29 @@\n \tendif\n #######################################\n \n+\n+#########################################\n+# (armv8 a35, hard point, neon based) ###\n+# Odroid Go Advance\n+else ifeq ($(platform), goa_armv8_a35)\n+TARGET := $(TARGET_NAME)_libretro.so\n+\tfpic := -fPIC\n+\tSHARED := -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined\n+\tCFLAGS += -Ofast \\\n+\t-flto=4 -fuse-linker-plugin \\\n+\t-fdata-sections -ffunction-sections -Wl,--gc-sections \\\n+\t-fno-stack-protector -fno-ident -fomit-frame-pointer \\\n+\t-falign-functions=1 -falign-jumps=1 -falign-loops=1 \\\n+\t-fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \\\n+\t-fmerge-all-constants -fno-math-errno \\\n+\t-marm -mcpu=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard\n+\tCXXFLAGS += $(CFLAGS)\n+\tCPPFLAGS += $(CFLAGS)\n+\tASFLAGS += $(CFLAGS)\n+\tHAVE_NEON = 1\n+\tARCH = arm\n+\tBUILTIN_GPU = neon\n+\tUSE_DYNAREC = 1\n # Xbox 360\n else ifeq ($(platform), xenon)\n \tEXT=a\n"
  },
  {
    "path": "packages/sx05re/libretro/spring/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"spring\"\nPKG_VERSION=\"443d2a83584a6ea26cba797a88b5f4dae2258402\"\nPKG_SHA256=\"93d0197787003cc5ba3025c4a7577cd5d39f6dbe53fdb6708b67900ad86b61fd\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/shantigilbert/spring-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Launch any command through retroarch\"\nPKG_LONGDESC=\"Launch any command through retroarch\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\nPKG_USE_CMAKE=\"no\"\n\nmake_target() {\n  cd ${PKG_BUILD}\n  make\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n\n  cp spring_libretro.so ${INSTALL}/usr/lib/libretro/spring_ppsspp_libretro.so\n  cp spring_ppsspp_libretro.info ${INSTALL}/usr/lib/libretro/\n\n  cp spring_libretro.so ${INSTALL}/usr/lib/libretro/spring_pcsx_rearmed32_libretro.so\n  cp spring_pcsx_rearmed32_libretro.info ${INSTALL}/usr/lib/libretro/\n\n  cp spring_libretro.so ${INSTALL}/usr/lib/libretro/spring_shell_libretro.so\n  cp spring_shell_libretro.info ${INSTALL}/usr/lib/libretro/\n  \n  # mkdir -p ${INSTALL}/usr/bin\n  # cp retroarch32.sh ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/spring/sources/retroarch32.sh",
    "content": "#!/usr/bin/env bash\n\nexport LD_LIBRARY_PATH=\"/emuelec/lib32:$LD_LIBRARY_PATH\"\nexec /usr/bin/retroarch32 \"$@\"\n"
  },
  {
    "path": "packages/sx05re/libretro/spring/sources/spring_pcsx_rearmed32_libretro.info",
    "content": "display_name = \"Spring PCSX ReARMed RetroArch 32-bit\"\nauthors = \"PCSX Team|notaz|Exophase\"\nsupported_extensions = \"bin|cue|img|mdf|pbp|toc|cbn|m3u|ccd|chd\"\ncorename = \"PCSX-ReARMed\"\nmanufacturer = \"Sony\"\ncategories = \"Emulator\"\nsystemname = \"PlayStation\"\nsystemid = \"playstation\"\ndatabase = \"Sony - PlayStation\"\nlicense = \"GPLv2\"\npermissions = \"dynarec\"\ndisplay_version = \"r21\"\nsupports_no_game = \"true\"\nfirmware_count = 3\nfirmware0_desc = \"scph5500.bin (PS1 JP BIOS)\"\nfirmware0_path = \"scph5500.bin\"\nfirmware0_opt = \"true\"\nfirmware1_desc = \"scph5501.bin (PS1 US BIOS)\"\nfirmware1_path = \"scph5501.bin\"\nfirmware1_opt = \"true\"\nfirmware2_desc = \"scph5502.bin (PS1 EU BIOS)\"\nfirmware2_path = \"scph5502.bin\"\nfirmware2_opt = \"true\"\nnotes = \"(!) scph5500.bin (md5): 8dd7d5296a650fac7319bce665a6a53c|(!) scph5501.bin (md5): 490f666e1afb15b7362b406ed1cea246|(!) scph5502.bin (md5): 32736f17079d0b2b7024407c39bd3050\"\ncommand = \"/usr/bin/retroarch32 -L /usr/lib/libretro/pcsx_rearmed_libretro.so %s\"\n"
  },
  {
    "path": "packages/sx05re/libretro/spring/sources/spring_ppsspp_libretro.info",
    "content": "display_name = \"PPSSPP Standalone\"\nauthors = \"valadaa48\"\nsupported_extensions = \"elf|iso|cso|prx|pbp\"\ncorename = \"PPSSPP\"\nmanufacturer = \"Sony\"\ncategories = \"Emulator\"\nsystemname = \"PSP\"\nsystemid = \"playstation_portable\"\ndatabase = \"Sony - PlayStation Portable\"\nlicense = \"MIT\"\npermissions = \"\"\ndisplay_version = \"0.1.0\"\nsupports_no_game = \"true\"\ncommand = \"/usr/bin/ppsspp.sh %s\"\n"
  },
  {
    "path": "packages/sx05re/libretro/spring/sources/spring_shell_libretro.info",
    "content": "display_name = \"Run Shell Command\"\nauthors = \"valadaa48\"\nsupported_extensions = \"sh|csh|bash\"\ncorename = \"shell\"\nmanufacturer = \"Sony\"\ncategories = \"Emulator\"\nsystemname = \"shell\"\nsystemid = \"playstation_portable\"\ndatabase = \"Sony - PlayStation Portable\"\nlicense = \"MIT\"\npermissions = \"\"\ndisplay_version = \"0.1.0\"\nsupports_no_game = \"true\"\ncommand = \"bash -c '%s'\"\n"
  },
  {
    "path": "packages/sx05re/libretro/stella/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"stella\"\nPKG_VERSION=\"749a21f653cf85fcedf4fe514ac8df1ad308be8e\"\nPKG_SHA256=\"57f641936267bebaf182147e60a1cf04c1cc6288cbfbc8e3b4ea80f81076f621\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"https://github.com/stella-emu/stella\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of Stella to libretro.\"\nPKG_LONGDESC=\"Stella is a multi-platform Atari 2600 VCS emulator released under the GNU General Public License (GPL).\"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\nif [ \"${ARCH}\" == \"arm\" ]; then\nPKG_MAKE_OPTS_TARGET=\" -C ${PKG_BUILD}/src/os/libretro -f Makefile platform=emuelec\"\nelse\nPKG_MAKE_OPTS_TARGET=\" -C ${PKG_BUILD}/src/os/libretro -f Makefile platform=emuelec-arm64\"\nfi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/src/os/libretro/stella_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/stella/patches/stella-01-emuelec-platform.patch",
    "content": "--- a/src/os/libretro/Makefile\n+++ b/src/os/libretro/Makefile\n@@ -137,6 +137,27 @@\n       endif\n    endif\n \n+# EmuELEC for Amlogic devices\n+else ifeq ($(platform), emuelec)\n+   TARGET := $(TARGET_NAME)_libretro.so\n+   fpic := -fPIC\n+   SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined\n+   CXXFLAGS += -lpthread -marm -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -march=armv7ve -DARM\n+   LDFLAGS += -lpthread -static-libgcc -lstdc++\n+   HAVE_NEON = 1\n+   ARCH = arm\n+   BUILTIN_GPU = neon\n+   USE_DYNAREC = 1\n+else ifeq ($(platform), emuelec-arm64)\n+   TARGET := $(TARGET_NAME)_libretro.so\n+   fpic := -fPIC\n+   SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined\n+   CXXFLAGS += -lpthread -DARM64\n+   LDFLAGS += -lpthread -static-libgcc -lstdc++\n+   ARCH = arm64\n+   USE_DYNAREC = 1\n+\n+\n # iOS\n else ifneq (,$(findstring ios,$(platform)))\n    CXXFLAGS += $(LTO) $(PTHREAD_FLAGS) -stdlib=libc++\n"
  },
  {
    "path": "packages/sx05re/libretro/supafaust/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"supafaust\"\nPKG_VERSION=\"e25f66765938d33f9ad5850e8d6cd597e55b7299\"\nPKG_SHA256=\"0b0ff644b780d1565e8f097998f371b1a4255213846c2082d8e8c143d0868ef1\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/supafaust\"\nPKG_URL=\"https://github.com/libretro/supafaust/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"SNES emulator for multicore ARM Cortex A7, A9, A15, A53 Linux platforms\"\nPKG_LONGDESC=\"SNES emulator optimized for multicore ARM processors.\"\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nPKG_LIBNAME=\"mednafen_supafaust_libretro.so\"\nPKG_LIBVAR=\"SUPAFAUST_LIB\"\n\nmake_target() {\n  make\n}\n\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n    cp -v mednafen_supafaust_libretro.so ${INSTALL}/usr/lib/libretro/\n \n}"
  },
  {
    "path": "packages/sx05re/libretro/swanstation/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"swanstation\"\nPKG_VERSION=\"4d309c05fd7bdc503d91d267bd542edb8d192b09\"\nPKG_SHA256=\"bf41b6df7ab1eeaafc8548eb4732775153535b12d42de826e578b7f2492c6843\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/swanstation\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain nasm:host ${OPENGLES}\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Fast PlayStation 1 emulator for PC and Android\"\nPKG_TOOLCHAIN=\"cmake\"\nPKG_BUILD_FLAGS=\"-lto\"\n\npre_configure_target() {\n PKG_CMAKE_OPTS_TARGET+=\" -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON \"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/.${TARGET_NAME}/swanstation_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/tgbdual/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"tgbdual\"\nPKG_VERSION=\"933707c0ba8f12360f6d79712f735a917713709a\"\nPKG_SHA256=\"fb166e32c34f0f2b6e568e0136d38a60202f32c8e4f7f4defd421810ac7614e4\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/tgbdual-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"libretro port of TGB Dual\"\nPKG_LONGDESC=\"TGB Dual is an open source (GPLv2) GB/GBC emulator with game link cable support.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp tgbdual_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/theodore/package.mk",
    "content": "# SPDX-License-Identifier: GPL-3.0-only\n\n# EmuELEC package for Theodore libretro core (Thomson MO/TO)\n\nPKG_NAME=\"theodore\"\nPKG_VERSION=\"3.1\"\nPKG_SHA256=\"\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL-3.0-only\"\nPKG_SITE=\"https://github.com/Zlika/theodore\"\nPKG_URL=\"https://github.com/Zlika/theodore/archive/v3.1/theodore-3.1.tar.gz\"\nPKG_SOURCE_DIR=\"theodore-${PKG_VERSION}\"\n\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec/libretro\"\nPKG_SHORTDESC=\"Theodore Thomson MO/TO libretro core\"\nPKG_LONGDESC=\"Theodore is a libretro core for emulation of Thomson MO/TO computers (TO7, TO8, MO5, MO6, etc.).\"\nPKG_TOOLCHAIN=\"make\"\n\nconfigure_target() {\n  :\n}\n\nmake_target() {\n  make -C \"${PKG_BUILD}\" \\\n    CC=\"${CC}\" \\\n    CXX=\"${CXX}\" \\\n    AR=\"${AR}\"\n}\n\nmakeinstall_target() {\n  mkdir -p \"${INSTALL}/usr/lib/libretro\"\n  cp \"${PKG_BUILD}/theodore_libretro.so\" \\\n     \"${INSTALL}/usr/lib/libretro/\"\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/tic-80/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"tic-80\"\nPKG_VERSION=\"a2c875f7275541e7724199ce8e504fb578b819a6\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/nesbox/TIC-80\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"TIC-80 is a fantasy computer for making, playing and sharing tiny games.\"\nGET_HANDLER_SUPPORT=\"git\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_LIBRETRO=ON \\\n\t\t\t\t\t   -DBUILD_PLAYER=ON \\\n                       -DBUILD_SDL=ON \\\n                       -DBUILD_WITH_RUBY=OFF \\\n                       -DBUILD_WITH_YUE=OFF \\\n                       -DCMAKE_BUILD_TYPE=Release \\\n                       -DBUILD_WITH_JANET=Off  \\\n                       -DBUILD_WITH_ALL=On \\\n                       -DBUILD_STATIC=On\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/.${TARGET_NAME}/bin/tic80_libretro.so ${INSTALL}/usr/lib/libretro/tic80_libretro.so\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/tyrquake/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"tyrquake\"\nPKG_VERSION=\"dfdae65c0ab5cf5d459155e8fefe796105229959\"\nPKG_SHA256=\"9c4b07794357293b874ac46e18f3929a16baf8b958cbb41e47dbe55bb151c671\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/tyrquake\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Libretro port of Tyrquake (Quake 1 engine)\"\nPKG_LONGDESC=\"Libretro port of Tyrquake (Quake 1 engine)\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\npre_configure_target() {\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    CFLAGS=\"${CFLAGS} -DARM -marm\"\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp tyrquake_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/uae4arm/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"uae4arm\"\nPKG_VERSION=\"866fe9ceee6103fbc9cd7d08533f495518471381\"\nPKG_SHA256=\"221124981d8750209f10d1add2536c44c84bc60fa5c87f1dd8cf5a71c4d1c5cb\"\nPKG_REV=\"1\"\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libretro/uae4arm-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of uae4arm for libretro (rpi/android)\"\nPKG_LONGDESC=\"Port of uae4arm for libretro (rpi/android) \"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\nPKG_BUILD_FLAGS=\"-lto\"\n\nmake_target() {\n   CFLAGS=\"${CFLAGS} -DARM -marm\"\n  if [[ \"${TARGET_FPU}\" =~ \"neon\" ]]; then\n    CFLAGS=\"-D__NEON_OPT\"\n  fi\n  make HAVE_NEON=1 USE_PICASSO96=1\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp uae4arm_libretro.so ${INSTALL}/usr/lib/libretro/uae4arm_32b_libretro.so\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/uzebox/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"uzebox\"\nPKG_VERSION=\"e5faef9a287cc98ac9fae2ce99a0117c37be460a\"\nPKG_SHA256=\"e7fcee86e35b96aec94234b19e2e514d83a82a1342a84af0a93e5e18810ddb93\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/t-paul/uzebox\"\nPKG_URL=\"https://github.com/t-paul/uzebox/archive/${PKG_VERSION}.tar.gz\"\nPKG_PATCH_DIRS=\"libretro\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"A retro-minimalist game console engine for the ATMega644\"\nPKG_LONGDESC=\"A retro-minimalist game console engine for the ATMega644\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -C tools/uzem CPPFLAGS=\"${CFLAGS} -I. ${LDFLAGS} -DNOGDB=1\" CC=\"${CXX}\" LIBRETRO_BUILD=1\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp tools/uzem/uzem_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/uzebox/patches/uzebox-01-buildfix.patch",
    "content": "diff -Naur uzebox.git/tools/uzem/avr8.h uzebox.patch/tools/uzem/avr8.h\n--- uzebox.git/tools/uzem/avr8.h\t2016-06-26 21:59:20.243240043 +0200\n+++ uzebox.patch/tools/uzem/avr8.h\t2016-06-27 22:56:09.836039916 +0200\n@@ -37,15 +37,6 @@\n #include \"input_driver.h\"\r\n #include \"video_driver.h\"\r\n \r\n-#if defined(__WIN32__)\r\n-    #include <windows.h> // Win32 memory mapped I/O\r\n-    #include <winioctl.h>\r\n-#elif defined(LINUX) || defined(__APPLE__)\r\n-    #include <sys/mman.h> // Linux memory mapped I/O\r\n-#else\r\n-    #include <sys/mmap.h> // Unix memory mapped I/O\r\n-#endif\r\n-\r\n // If you're building from the command line or on a non-MS compiler you'll need\r\n // -lSDL or somesuch.\r\n #include <SDL2/SDL.h>\r\n"
  },
  {
    "path": "packages/sx05re/libretro/uzem/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"uzem\"\nPKG_VERSION=\"cd6004ea143435cfdb6b12e7c6779dab499f7829\"\nPKG_SHA256=\"338c6bff624e9c822f9d20f497e62080588b42cc3eb94c1bd52137b3e8cae977\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/libretro/libretro-uzem\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_PATCH_DIRS=\"libretro\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"A retro-minimalist game console engine for the ATMega644\"\nPKG_LONGDESC=\"A retro-minimalist game console engine for the ATMega644\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp uzem_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/vba-next/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"vba-next\"\nPKG_VERSION=\"d0ec7f3e209a91b903bb9d2c2397fef2bb3cca32\"\nPKG_SHA256=\"380473c6c9d10f47dda27239ec0375f4e49b5b149e4466902a07380f57b8d77b\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libretro/vba-next\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Optimized port of VBA-M to Libretro.\"\nPKG_LONGDESC=\"Optimized port of VBA-M to Libretro. \"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -f Makefile.libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp vba_next_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/vbam/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"vbam\"\nPKG_VERSION=\"277271c6f3003654154723e143f41cfc75a9cda2\"\nPKG_SHA256=\"c8d83f1c4bc25bac728f9b89a0bbc1786033f22e088248305485bb03516bcb01\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/vbam-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"A fork of VBA-M with libretro integration\"\nPKG_LONGDESC=\"VBA-M is a [Super] Game Boy [Color / Advance] emulator for Windows, Linux & Mac.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\nPKG_USE_CMAKE=\"no\"\n\nmake_target() {\n  make -C ../src/libretro -f Makefile\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ../src/libretro/vbam_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/vecx/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"vecx\"\nPKG_VERSION=\"841229a6a81a0461d08af6488f252dcec5266c6a\"\nPKG_SHA256=\"d564413e9611b16e49e076cadd719587b6712c3cb435eaf90597c2db157546f4\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2|LGPLv2.1\"\nPKG_SITE=\"https://github.com/libretro/libretro-vecx\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"libretro adaptation of vecx\"\nPKG_LONGDESC=\"libretro adaptation of vecx\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -f Makefile.libretro HAS_GPU=1 HAS_GLES=1\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp vecx_libretro.so ${INSTALL}/usr/lib/libretro/vecx_libretro.so\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/vice/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"vice\"\nPKG_VERSION=\"e9f8ac034ddef3025f0567768f7af8219f7cfdb8\"\nPKG_SHA256=\"83c68b33ba42d2cf885705f8b703112ed5c35593bac0618f062f704957ab6c9f\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/vice-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Versatile Commodore 8-bit Emulator version 3.0\"\nPKG_LONGDESC=\"Versatile Commodore 8-bit Emulator version 3.0\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\nPKG_BUILD_FLAGS=\"-lto\"\n\nmake_target() {\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    CFLAGS=\"${CFLAGS} -DARM -DALIGN_DWORD -mstructure-size-boundary=32 -mthumb-interwork -falign-functions=16 -marm\"\n  fi\n  mkdir -p built\n  for EMUTYPE in x128 x64sc x64dtv xscpu64 xplus4 xvic xcbm5x0 xcbm2 xpet x64\n  do\n    make clean\n    make EMUTYPE=${EMUTYPE}\n    mv vice_*_libretro.so built\n  done\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp built/vice_*_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/vircon32/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2024-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vircon32\"\nPKG_VERSION=\"d8a92430e887286b4e5351916ef0bd35d8cb40e8\"\nPKG_SHA512=\"8746ba64b721954adab761dad17071d6c92a48bb35944d6cc1360c25046774ec9cc2f6c144036a3376deb9723e9d106ffc2bf520e4a4595130e8ef864bb5bd2d\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"BSD-3-Clause\"\nPKG_SITE=\"https://github.com/vircon32/vircon32-libretro\"\nPKG_URL=\"https://github.com/vircon32/vircon32-libretro/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES}\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Vircon32 is a 32-bit virtual console\"\nPKG_LONGDESC=\"Vircon32 emulator for libretro - a 32-bit virtual game console.\"\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"cmake\"\nPKG_AUTORECONF=\"no\"\n\nPKG_LIBNAME=\"vircon32_libretro.so\"\nPKG_LIBVAR=\"VIRCON32_LIB\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DENABLE_OPENGLES3=1 \\\n                       -DOpenGL_GL_PREFERENCE=GLVND \\\n                       -DOPENGL_INCLUDE_DIR=${SYSROOT_PREFIX}/usr/include \\\n                       -DOPENGL_opengl_LIBRARY=${SYSROOT_PREFIX}/usr/lib/libOpenGL.so \\\n                       -DOPENGL_glx_LIBRARY=${SYSROOT_PREFIX}/usr/lib/libGLX.so\"\n\npre_configure_target() {\n  # Patch CMakeLists.txt to make OpenGL optional/mock it for GLES builds\n  sed -i 's/find_package(OpenGL REQUIRED)/find_package(OpenGL)/' ${PKG_BUILD}/CMakeLists.txt\n  \n  # Set OpenGL as found even if desktop OpenGL isn't available\n  echo \"set(OPENGL_FOUND TRUE)\" >> ${PKG_BUILD}/CMakeLists.txt\n  echo \"set(OPENGL_LIBRARIES \\\"\\\")\" >> ${PKG_BUILD}/CMakeLists.txt\n  \n  # Remove static linking flags that cause issues\n  sed -i 's/-static-libgcc -static-libstdc++//' ${PKG_BUILD}/CMakeLists.txt\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp -v ${PKG_BUILD}/.${TARGET_NAME}/vircon32_libretro.so ${INSTALL}/usr/lib/libretro/\n}"
  },
  {
    "path": "packages/sx05re/libretro/virtualjaguar/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"virtualjaguar\"\nPKG_VERSION=\"48096c1f6f8b98cfff048a5cb4e6a86686631072\"\nPKG_SHA256=\"2192ff7d093a76420b5dea2c694e7681ec6d388f7dd5b3df62ddec5a700afbe2\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/virtualjaguar-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of Virtual Jaguar to Libretro\"\nPKG_LONGDESC=\"Port of Virtual Jaguar to Libretro\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp virtualjaguar_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/virtualjaguar/patches/001-optimize.patch",
    "content": "diff --git a/src/blitter.c b/src/blitter.c\nindex 12f8398..02ee24b 100644\n--- a/src/blitter.c\n+++ b/src/blitter.c\n@@ -980,6 +980,8 @@ uint8_t BlitterReadByte(uint32_t offset, uint32_t who/*=UNKNOWN*/)\n {\n \toffset &= 0xFF;\n \n+\tif (offset <= 0x3B)\n+\t{\n \t// status register\n //This isn't cycle accurate--how to fix? !!! FIX !!!\n //Probably have to do some multi-threaded implementation or at least a reentrant safe implementation...\n@@ -1003,6 +1005,7 @@ uint8_t BlitterReadByte(uint32_t offset, uint32_t who/*=UNKNOWN*/)\n \tif (offset >= 0x2C && offset <= 0x2F)\n \t\treturn blitter_ram[offset + 0x04];\t\t// A2_PIXEL ($F02230) read at $F0222C\n \n+\t}\n \treturn blitter_ram[offset];\n }\n \ndiff --git a/src/dac.c b/src/dac.c\nindex 4b5bc7b..f105602 100644\n--- a/src/dac.c\n+++ b/src/dac.c\n@@ -107,7 +107,7 @@ void DSPSampleCallback(void)\n       return;\n    }\n \n-   SetCallbackTime(DSPSampleCallback, 1000000.0 / (double)DAC_AUDIO_RATE, EVENT_JERRY);\n+   SetCallbackTime(DSPSampleCallback, (1000000.0 / (double)DAC_AUDIO_RATE)*2, EVENT_JERRY);\n }\n \n // Approach: Run the DSP for however many cycles needed to correspond to whatever sample rate\n@@ -157,7 +157,7 @@ void SoundCallback(void * userdata, uint16_t * buffer, int length)\n    numberOfSamples = length;\n    bufferDone      = false;\n \n-   SetCallbackTime(DSPSampleCallback, 1000000.0 / (double)DAC_AUDIO_RATE, EVENT_JERRY);\n+   SetCallbackTime(DSPSampleCallback, (1000000.0 / (double)DAC_AUDIO_RATE)*2, EVENT_JERRY);\n \n    // These timings are tied to NTSC, need to fix that in event.cpp/h! [FIXED]\n    do\ndiff --git a/src/event.h b/src/event.h\nindex 1d01c3d..d6b42f6 100644\n--- a/src/event.h\n+++ b/src/event.h\n@@ -14,10 +14,10 @@ extern \"C\" {\n enum { EVENT_MAIN, EVENT_JERRY };\n \n //NTSC Timings...\n-#define RISC_CYCLE_IN_USEC\t\t\t0.03760684198\n+#define RISC_CYCLE_IN_USEC\t\t\t0.03760684198 * 2\n #define M68K_CYCLE_IN_USEC\t\t\t(RISC_CYCLE_IN_USEC * 2)\n //PAL Timings\n-#define RISC_CYCLE_PAL_IN_USEC\t\t0.03760260812\n+#define RISC_CYCLE_PAL_IN_USEC\t\t0.03760260812 * 2\n #define M68K_CYCLE_PAL_IN_USEC\t\t(RISC_CYCLE_PAL_IN_USEC * 2)\n \n #define HORIZ_PERIOD_IN_USEC_NTSC\t63.555555555"
  },
  {
    "path": "packages/sx05re/libretro/wasm4/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# EmuELEC / LibreELEC package for WASM-4 libretro core\n\nPKG_NAME=\"wasm4\"\nPKG_VERSION=\"68cbe429fcbab3e80537282d2c21566f5ea216ea\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"ISC\"\nPKG_SITE=\"https://git.libretro.com/libretro/wasm4\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_SHA256=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"WASM-4 libretro core\"\nPKG_LONGDESC=\"WASM-4 is a fantasy console based on WebAssembly. This package builds the libretro core (lr-wasm4).\"\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"cmake\"\n\nPKG_GIT_CLONE_SINGLE=\"yes\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DLIBRETRO=ON \\\n                       -DWASM3=ON \\\n                       -DCMAKE_BUILD_TYPE=Release\"\n\npre_configure_target() {\n  PKG_CMAKE_SCRIPT=\"${PKG_BUILD}/runtimes/native/CMakeLists.txt\"\n}\n\nmakeinstall_target() {\n  mkdir -p \"${INSTALL}/usr/lib/libretro\"\n  cp \"${PKG_BUILD}/wasm4_libretro.so\" \"${INSTALL}/usr/lib/libretro/\"\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/xmil/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present asakous (https://github.com/asakous)\n\nPKG_NAME=\"xmil\"\nPKG_VERSION=\"b07506c0cae31d260db28cb079148857d6ca2e93\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Unknown\"\nPKG_SITE=\"https://github.com/r-type/xmil-libretro\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Libretro port of X Millennium Sharp X1 emulator\"\nPKG_LONGDESC=\"Libretro port of X Millennium Sharp X1 emulator\"\nPKG_TOOLCHAIN=\"make\"\nGET_HANDLER_SUPPORT=\"git\"\n\nmake_target() {\n  cd ${PKG_BUILD}\n    make -C libretro\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/libretro/x1_libretro.so ${INSTALL}/usr/lib/libretro/\n  cp x1_libretro.info ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/xrick/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"xrick\"\nPKG_VERSION=\"476a9a637a6d2afa3f9f6b202bb98b522a4e95d1\"\nPKG_SHA256=\"32c5dcef326790d91c5e2fbc666a95421bb62a1a342bb92270acd2384b375a23\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libretro/xrick-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Rick Dangerous Game Engine\"\nPKG_LONGDESC=\"Rick Dangerous Game Engine\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make -f Makefile.libretro CC=${CC}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp xrick_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/yabasanshiro/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"yabasanshiro\"\nPKG_VERSION=\"39535a6abcad5abf9f71c8b2a7975f005ee12ed6\"\nPKG_GIT_CLONE_BRANCH=\"yabasanshiro\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/yabause\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES}\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of YabaSanshiro to libretro.\"\nPKG_LONGDESC=\"Port of YabaSanshiro to libretro.\"\nPKG_TOOLCHAIN=\"make\"\nGET_HANDLER_SUPPORT=\"git\"\n\npre_configure_target() { \nif [[ \"${ARCH}\" == \"arm\" ]]; then\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\t\tPKG_MAKE_OPTS_TARGET+=\" -C yabause/src/libretro platform=RK3399\"\n\t\tsed -i \"s|-mtune=cortex-a72.cortex-a53|-mtune=cortex-a35|g\" ${PKG_BUILD}/yabause/src/libretro/Makefile\n\telse\n\t\tPKG_MAKE_OPTS_TARGET+=\" -C yabause/src/libretro platform=AMLG12B\"\n\tfi\nelse\n\tif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\t\tsed -i \"s|-mtune=cortex-a73.cortex-a53|-mtune=cortex-a35|g\" ${PKG_BUILD}/yabause/src/libretro/Makefile\n\tfi\n\t\n\tif [[ \"${DEVICE}\" == \"Amlogic-old\" ]]; then\n\t\tsed -i \"s|-mtune=cortex-a73.cortex-a53|-mtune=cortex-a53|g\" ${PKG_BUILD}/yabause/src/libretro/Makefile\n\tfi\n\t\tPKG_MAKE_OPTS_TARGET+=\" -C yabause/src/libretro platform=odroid-n2\"\n\n# yabasanshiro seems to only work in debug mode, it is not recomended for use as it will be slow. But until a fix is found this will have to do\n#sed -i \"s|DEBUG = 0|DEBUG = 1|g\" ${PKG_BUILD}/yabause/src/libretro/Makefile\n\nfi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp yabause/src/libretro/yabasanshiro_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro/yabasanshiro/patches/aarch64/01-optimization.patch",
    "content": "diff -rupN yabasanshiro.orig/yabause/src/libretro/Makefile yabasanshiro/yabause/src/libretro/Makefile\n--- yabasanshiro.orig/yabause/src/libretro/Makefile\t2022-02-27 14:51:53.958685169 -0500\n+++ yabasanshiro/yabause/src/libretro/Makefile\t2022-02-27 14:57:08.993824415 -0500\n@@ -155,11 +155,12 @@ else ifneq (,$(findstring rockpro64,$(pl\n \tSHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T\n \tLDFLAGS += -lpthread\n \tARCH_IS_LINUX = 1\n+        FLAGS += -DAARCH64\n \tHAVE_SSE = 0\n \tFORCE_GLES = 1\n-\tUSE_ARM_DRC = 1\n+        USE_AARCH64_DRC = 1\n \tDYNAREC_DEVMIYAX = 1\n-\tFLAGS += -march=armv8-a+crc -mcpu=cortex-a72 -mtune=cortex-a72.cortex-a53 -mfloat-abi=hard -mfpu=neon-vfpv4 -mvectorize-with-neon-quad\n+\tFLAGS += -march=armv8-a+crc -mtune=@TARGET_CPU@\n \n # Rpi4 (64-bit)\n else ifeq ($(platform), rpi4)\n"
  },
  {
    "path": "packages/sx05re/libretro/yabause/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"yabause\"\nPKG_VERSION=\"c35712c5ed33e18d77097f2059a036e19d1d66f2\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/libretro/yabause\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES}\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of Yabause to libretro.\"\nPKG_LONGDESC=\"Port of Yabause to libretro.\"\nPKG_TOOLCHAIN=\"make\"\nGET_HANDLER_SUPPORT=\"git\"\n\nmake_target() {\ncd ${PKG_BUILD}/yabause/src/libretro\nmake HAVE_SSE=0 platform=armvneonhardfloat\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/yabause/src/libretro/yabause_libretro.so ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro_base/common-shaders/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"common-shaders\"\nPKG_VERSION=\"43eaf9b91857eb8515310c74ae750895d77b20f8\"\nPKG_SHA256=\"4bc1bc61604e91fe314cf781d05b3b99e1991e65a6adafcb8464e633e156a58e\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/RetroPie/common-shaders\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"emuelec\"\nPKG_SHORTDESC=\"Manually converted libretro/common-shaders for arm devices treebranch pi\"\nPKG_LONGDESC=\"Manually converted libretro/common-shaders for arm devices treebranch pi\"\nPKG_GIT_CLONE_BRANCH=\"rpi\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\n\n\nmake_target() {\n  : not\n}\n\nmakeinstall_target() {\n  #make install INSTALLDIR=\"${INSTALL}/usr/share/common-shaders/pi\"\n\nmkdir -p ${INSTALL}/usr/share/common-shaders/rpi\n    cp -rf ${PKG_BUILD}/* ${INSTALL}/usr/share/common-shaders/rpi\n}\n\n"
  },
  {
    "path": "packages/sx05re/libretro_base/core-info/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"core-info\"\nPKG_VERSION=\"bc4abc9daff498eaa479a7d1efacb5ea97d2a79a\"\nPKG_SHA256=\"821a41b438290634fff627e3257a2ab73158109024e47bbfdca2bcb252494b97\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libretro/libretro-core-info\"\nPKG_URL=\"https://github.com/libretro/libretro-core-info/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Mirror of libretro's core info files\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp ${PKG_BUILD}/*.info ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro_base/glsl-shaders/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"glsl-shaders\"\nPKG_VERSION=\"28643f63dd8d95dec49fb7241d3d35e3d037e14a\"\nPKG_SHA256=\"ea1a97cd7d233c828e48d07fa40e1124aae58471ae7f63d608e18f6eee7455cd\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libretro/glsl-shaders\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Common GSLS shaders for RetroArch\"\nPKG_LONGDESC=\"Common GSLS shaders for RetroArch\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nconfigure_target() {\n  cd ${PKG_BUILD}\n}\n\nmakeinstall_target() {\n  make install INSTALLDIR=\"${INSTALL}/usr/share/common-shaders\"\n}\n"
  },
  {
    "path": "packages/sx05re/libretro_base/libretro-database/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"libretro-database\"\nPKG_VERSION=\"798f2a875676b895da13323e64856a451b290e71\"\nPKG_SHA256=\"c448d124e8dd9f5fc39c44b976ac1cd14fd96fb9ffa0bed996edec69511dc4fa\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libretro/libretro-database\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Repository containing cheatcode files, content data files, etc.\"\nPKG_LONGDESC=\"Repository containing cheatcode files, content data files, etc.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nconfigure_target() {\n  cd ${PKG_BUILD}\n}\n\nmakeinstall_target() {\n  make install INSTALLDIR=\"${INSTALL}/usr/share/libretro-database\"\n}\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/modprobe.d/usbhid.conf",
    "content": "# Juyao \noptions usbhid quirks=0x0314:0x0326:0x040\noptions usbhid quirks=0x0314:0x0328:0x040\n\n# 4NES4SNES\noptions usbhid quirks=0x1781:0x0A9D:0x040\n\n# Retrolink SNES\noptions usbhid quirks=0x1292:0x5346:0x040\noptions usbhid quirks=0x1292:0x5366:0x040\n\n# Retrobit Atari to USB Driver\noptions usbhid quirks=0x1292:0x4154:0x040\n\n# Retrobit Genesis to PC USB Adapter\noptions usbhid quirks=0x1292:0x4745:0x040\n\n# Retrode\noptions usbhid quirks=0x0403:0x97c1:0x040\n\n# HuiJia  USB GamePad Mayflash Sega Saturn\noptions usbhid quirks=0x0e8f:0x3010:0x040\n\n# HuiJia  USB GamePad Mayflash NES SNES\noptions usbhid quirks=0x0079:0x1804:0x040\n\n# Mayflash Dreamcast\noptions usbhid quirks=0x0xe8f:0x3013:0x040\n\n# Xin-Mo 2players 20pins\noptions usbhid quirks=0x16c0:0x75e1:0x040\n\n# Xinmo 18 pins USB THT 2P arcade controller THT 2P arcade controller\noptions usbhid quirks=0x16c0:0x05e1:0x040\n\n# USB PS2 Adapter GreenAsia Electronics\noptions usbhid quirks=0xe8f:0x1013:0x040\n\n# HuiJia  USB GamePad Mayflash N64 - need test\noptions usbhid quirks=0xe8f:0x3013:0x040\n\n# XCSOURCE 2 Encoder USB - Twin USB Gamepad\noptions usbhid quirks=0x810:0xe001:0x040\n\n# 3H Dual Arcade 2Players\noptions usbhid quirks=0x16c0:0x05e0:0x040\n\n#ShanWan Twin USB Joystick\noptions usbhid quirks=0x2563:0x555:0x040\n\n\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/package.mk",
    "content": "#############################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"retroarch\"\nPKG_VERSION=\"850cc561968846b08a268421bf904d680724f303\"\nPKG_SITE=\"https://github.com/libretro/RetroArch\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_LICENSE=\"GPLv3\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 alsa-lib openssl freetype zlib retroarch-assets retroarch-overlays core-info ffmpeg libass joyutils empty ${OPENGLES} samba avahi nss-mdns freetype openal-soft espeak\"\nPKG_LONGDESC=\"Reference frontend for the libretro API.\"\nGET_HANDLER_SUPPORT=\"git\"\n\nif [ \"${DEVICE}\" = \"Amlogic-ng\" ] || [ \"${DEVICE}\" = \"Amlogic-no\" ] || [ \"${DEVICE}\" = \"Amlogic-old\" ]; then\n  PKG_PATCH_DIRS=\"${DEVICE}\"\nfi\n\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ] || [ \"${DEVICE}\" == \"RK356x\" ] || [ \"${DEVICE}\" == \"OdroidM1\" ]; then\nPKG_DEPENDS_TARGET+=\" libdrm librga\"\nPKG_PATCH_DIRS=\"OdroidGoAdvance\"\nfi\n\n# Pulseaudio Support\n  if [ \"${PULSEAUDIO_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" pulseaudio\"\nfi\n\npre_configure_target() {\n# Retroarch does not like -O3 for CHD loading with cheevos\nexport CFLAGS=\"${CFLAGS} -O3 -fno-tree-vectorize\"\n\nTARGET_CONFIGURE_OPTS=\"\"\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-qt \\\n                           --enable-alsa \\\n                           --enable-udev \\\n                           --disable-opengl1 \\\n                           --disable-opengl \\\n                           --enable-egl \\\n                           --enable-opengles \\\n                           --disable-wayland \\\n                           --disable-x11 \\\n                           --enable-zlib \\\n                           --enable-freetype \\\n                           --disable-discord \\\n                           --disable-vg \\\n                           --disable-sdl \\\n                           --enable-sdl2 \\\n                           --enable-ffmpeg\"\n\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ] || [ \"${DEVICE}\" == \"RK356x\" ] || [ \"${DEVICE}\" == \"OdroidM1\" ]; then\nPKG_CONFIGURE_OPTS_TARGET+=\" --enable-opengles3 \\\n                           --enable-opengles3_2 \\\n                           --enable-kms \\\n                           --disable-mali_fbdev\"\nelse\nPKG_CONFIGURE_OPTS_TARGET+=\" --disable-kms \\\n                           --enable-mali_fbdev\"\nfi\n\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ]; then\nPKG_CONFIGURE_OPTS_TARGET+=\" --enable-odroidgo2\"\nfi\n\nif [ ${ARCH} == \"arm\" ]; then\nPKG_CONFIGURE_OPTS_TARGET+=\" --enable-neon\"\nfi\n\ncd ${PKG_BUILD}\n}\n\nmake_target() {\n  make HAVE_ONLINE_UPDATER=1 HAVE_UPDATE_CORES=1 HAVE_UPDATE_CORE_INFO=1 HAVE_COMPRESSION=1 HAVE_ACCESSIBILITY=1 HAVE_UPDATE_ASSETS=1 HAVE_LIBRETRODB=1 HAVE_BLUETOOTH=1 HAVE_NETWORKING=1 HAVE_LAKKA=1 HAVE_ZARCH=1 HAVE_QT=0 HAVE_LANGEXTRA=1 HAVE_LAKKA_PROJECT=odroidn2+.aarch64 HAVE_LAKKA_SERVER=\"https://www.lakka.tv\"\n  [ $? -eq 0 ] && echo \"(retroarch ok)\" || { echo \"(retroarch failed)\" ; exit 1 ; }\n  make -C gfx/video_filters compiler=${CC} extra_flags=\"${CFLAGS}\"\n[ $? -eq 0 ] && echo \"(video filters ok)\" || { echo \"(video filters failed)\" ; exit 1 ; }\n  make -C libretro-common/audio/dsp_filters compiler=${CC} extra_flags=\"${CFLAGS}\"\n[ $? -eq 0 ] && echo \"(audio filters ok)\" || { echo \"(audio filters failed)\" ; exit 1 ; }\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  mkdir -p ${INSTALL}/etc\n    cp ${PKG_BUILD}/retroarch ${INSTALL}/usr/bin\n\n    cp ${PKG_BUILD}/retroarch.cfg ${INSTALL}/etc\n  mkdir -p ${INSTALL}/usr/share/video_filters\n    cp ${PKG_BUILD}/gfx/video_filters/*.so ${INSTALL}/usr/share/video_filters\n    cp ${PKG_BUILD}/gfx/video_filters/*.filt ${INSTALL}/usr/share/video_filters\n  mkdir -p ${INSTALL}/usr/share/audio_filters\n    cp ${PKG_BUILD}/libretro-common/audio/dsp_filters/*.so ${INSTALL}/usr/share/audio_filters\n    cp ${PKG_BUILD}/libretro-common/audio/dsp_filters/*.dsp ${INSTALL}/usr/share/audio_filters\n  \n  # General configuration\n  sed -i -e \"s/# libretro_directory =/libretro_directory = \\\"\\/tmp\\/cores\\\"/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# libretro_info_path =/libretro_info_path = \\\"\\/tmp\\/cores\\\"/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# rgui_browser_directory =/rgui_browser_directory =\\/storage\\/roms/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# content_database_path =/content_database_path =\\/tmp\\/database\\/rdb/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# playlist_directory =/playlist_directory =\\/storage\\/playlists/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# savefile_directory =/# savefile_directory =\\/storage\\/savefiles/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# savestate_directory =/savestate_directory =\\/storage\\/roms\\/savestates/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# system_directory =/system_directory =\\/storage\\/roms\\/bios/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# screenshot_directory =/screenshot_directory =\\/storage\\/roms\\/screenshots/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# recording_output_directory =/recording_output_directory =\\/storage\\/roms\\/mplayer\\/retroarch/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# video_shader_dir =/video_shader_dir =\\/tmp\\/shaders/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# rgui_show_start_screen = true/rgui_show_start_screen = false/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# assets_directory =/assets_directory =\\/tmp\\/assets/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# overlay_directory =/overlay_directory =\\/tmp\\/overlays/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# cheat_database_path =/cheat_database_path =\\/tmp\\/database\\/cht/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# menu_driver = \\\"rgui\\\"/menu_driver = \\\"ozone\\\"/\" ${INSTALL}/etc/retroarch.cfg\n \n  # Quick menu\n  echo \"core_assets_directory =/storage/roms/downloads\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"quick_menu_show_undo_save_load_state = \\\"false\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"quick_menu_show_save_core_overrides = \\\"false\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"quick_menu_show_save_game_overrides = \\\"false\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"quick_menu_show_cheats = \\\"true\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  \n  # Video\n  sed -i -e \"s/# video_windowed_fullscreen = true/video_windowed_fullscreen = false/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# video_smooth = true/video_smooth = false/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# video_aspect_ratio_auto = false/video_aspect_ratio_auto = true/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# video_threaded = false/video_threaded = true/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# video_font_path =/video_font_path =\\/usr\\/share\\/retroarch-assets\\/xmb\\/monochrome\\/font.ttf/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# video_font_size = 48/video_font_size = 32/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# video_filter_dir =/video_filter_dir =\\/usr\\/share\\/video_filters/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# video_gpu_screenshot = true/video_gpu_screenshot = false/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# video_fullscreen = false/video_fullscreen = true/\" ${INSTALL}/etc/retroarch.cfg\n\n  # Audio\n  sed -i -e \"s/# audio_driver =/audio_driver = \\\"alsathread\\\"/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# audio_filter_dir =/audio_filter_dir =\\/usr\\/share\\/audio_filters/\" ${INSTALL}/etc/retroarch.cfg\n  if [ \"${PROJECT}\" == \"OdroidXU3\" ]; then # workaround the 55fps bug\n    sed -i -e \"s/# audio_out_rate = 48000/audio_out_rate = 44100/\" ${INSTALL}/etc/retroarch.cfg\n  fi\n\n  # Saving\n  echo \"savestate_thumbnail_enable = \\\"true\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  \n  # Input\n  sed -i -e \"s/# input_driver = sdl/input_driver = udev/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# input_max_users = 16/input_max_users = 5/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# input_autodetect_enable = true/input_autodetect_enable = true/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# joypad_autoconfig_dir =/joypad_autoconfig_dir = \\/tmp\\/joypads/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# input_remapping_directory =/input_remapping_directory = \\/storage\\/.config\\/retroarch\\/config\\/remappings/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# input_menu_toggle_gamepad_combo = 0/input_menu_toggle_gamepad_combo = 2/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# all_users_control_menu = false/all_users_control_menu = true/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# menu_swap_ok_cancel_buttons = false/menu_swap_ok_cancel_buttons = false/\" ${INSTALL}/etc/retroarch.cfg\n\n  # Menu\n  sed -i -e \"s/# menu_mouse_enable = false/menu_mouse_enable = false/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# menu_core_enable = true/menu_core_enable = true/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# thumbnails_directory =/thumbnails_directory = \\/storage\\/thumbnails/\" ${INSTALL}/etc/retroarch.cfg\n  echo \"menu_show_advanced_settings = \\\"false\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"menu_wallpaper_opacity = \\\"1.0\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"content_show_images = \\\"false\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"content_show_music = \\\"false\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"content_show_video = \\\"false\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n\n  # Updater\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    sed -i -e \"s/# core_updater_buildbot_url = \\\"http:\\/\\/buildbot.libretro.com\\\"/core_updater_buildbot_url = \\\"http:\\/\\/buildbot.libretro.com\\/nightly\\/linux\\/armhf\\/latest\\/\\\"/\" ${INSTALL}/etc/retroarch.cfg\n  fi\n  \n  # Playlists\n  echo \"playlist_names = \\\"${RA_PLAYLIST_NAMES}\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"playlist_cores = \\\"${RA_PLAYLIST_CORES}\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"playlist_entry_rename = \\\"false\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"playlist_entry_remove = \\\"false\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n\n  #emuelec\n  sed -i -e \"s/.*core_updater_buildbot_url =.*/core_updater_buildbot_url = \\\"http:\\/\\/dontupdatecores\\\"/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# input_hotkey_block_delay = \\\"5\\\"/input_hotkey_block_delay = \\\"5\\\"/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# menu_show_core_updater = true/\\# DONT UPDATE CORES IT WILL BREAK EMUELEC! \\n menu_show_core_updater = false/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# menu_show_online_updater = true/menu_show_online_updater = true/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# input_overlay_opacity = 1.0/input_overlay_opacity = 0.15/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# audio_volume = 0.0/audio_volume = \"0.000000\"/\" ${INSTALL}/etc/retroarch.cfg\n  sed -i -e \"s/# cache_directory =/cache_directory = \\/tmp\\/cache/\" ${INSTALL}/etc/retroarch.cfg\n  echo \"user_language = \\\"0\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"menu_show_shutdown = \\\"false\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"menu_show_reboot = \\\"false\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"input_player1_analog_dpad_mode = \\\"1\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"input_player2_analog_dpad_mode = \\\"1\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"input_player3_analog_dpad_mode = \\\"1\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"input_player4_analog_dpad_mode = \\\"1\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"savefiles_in_content_dir = \\\"true\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"savestates_in_content_dir = \\\"false\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"menu_show_restart_retroarch = \\\"false\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  echo \"menu_show_quit_retroarch = \\\"true\\\"\" >> ${INSTALL}/etc/retroarch.cfg\n  \nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n    echo \"xmb_layout = 2\" >> ${INSTALL}/etc/retroarch.cfg\n    echo \"menu_widget_scale_auto = false\" >> ${INSTALL}/etc/retroarch.cfg\n    echo \"menu_widget_scale_factor = 2.00\" >> ${INSTALL}/etc/retroarch.cfg\n    echo \"menu_scale_factor = 1.000000\" >> ${INSTALL}/etc/retroarch.cfg\n    echo \"video_font_size = 12.000000\" >> ${INSTALL}/etc/retroarch.cfg\n    echo \"menu_rgui_shadows = true\" >> ${INSTALL}/etc/retroarch.cfg\n    echo \"rgui_aspect_ratio = 6\" >> ${INSTALL}/etc/retroarch.cfg\n    echo \"rgui_inline_thumbnails = true\" >> ${INSTALL}/etc/retroarch.cfg\n    echo \"input_max_users = 1\" >> ${INSTALL}/etc/retroarch.cfg\nfi\n\n  mkdir -p ${INSTALL}/usr/config/retroarch/\n  mv ${INSTALL}/etc/retroarch.cfg ${INSTALL}/usr/config/retroarch/\n  \n}\n\npost_install() {  \n  enable_service retroarch.service\n  enable_service tmp-cores.mount\n  enable_service tmp-joypads.mount\n  enable_service tmp-database.mount\n  enable_service tmp-assets.mount\n  enable_service tmp-shaders.mount\n  enable_service tmp-overlays.mount\n}\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/patches/13pixel.patch",
    "content": "--- a/cheevos/cheevos.c\t2024-12-22 21:25:46.767207900 +0100\n+++ b/cheevos/cheevos.c\t2024-12-22 21:31:50.025471176 +0100\n@@ -293,7 +293,11 @@\n \n    if (!cheevo)\n       return;\n-\n+   char pixelcade[256];\n+   snprintf(pixelcade, sizeof(pixelcade), \"/storage/.emulationstation/scripts/achievements/pixelcade.sh %u \\\"%s\\\" \\\"%s\\\" > /dev/null 2>/dev/null\",\n+   cheevo->id, cheevo->title, cheevo->description);\n+   //CHEEVOS_LOG(pixelcade);\n+   system(pixelcade);\n    /* Show the on screen message. */\n    if (settings->bools.cheevos_visibility_unlock)\n    {\n@@ -1279,12 +1283,14 @@\n                MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);\n    }\n \n+ if (settings->bools.cheevos_unsupported_notification) {\n    if (summary.num_unsupported_achievements)\n    {\n       const char* warning = msg_hash_to_str(MSG_CHEEVOS_UNSUPPORTED_WARNING);\n       runloop_msg_queue_push(warning, strlen(warning), 0, 3 * 60, false, NULL,\n          MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_WARNING);\n    }\n+ }\n }\n \n static uint32_t rcheevos_client_read_memory(uint32_t address,\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/patches/Amlogic-old/01-ALSA_fix.patch",
    "content": "diff --git a/audio/common/alsa.c b/audio/common/alsa.c\nindex f1b011a2e8..07a3d9b23b 100644\n--- a/audio/common/alsa.c\n+++ b/audio/common/alsa.c\n@@ -63,16 +63,6 @@ int alsa_init_pcm(snd_pcm_t **pcm,\n       goto error;\n    }\n \n-   if ((errnum = snd_pcm_hw_params_any(*pcm, params)) < 0)\n-   {\n-      RARCH_ERR(\"[ALSA]: Failed to query hardware parameters from %s device \\\"%s\\\": %s\\n\",\n-            snd_pcm_stream_name(stream),\n-            snd_pcm_name(*pcm),\n-            snd_strerror(errnum));\n-\n-      goto error;\n-   }\n-\n    format = (snd_pcm_hw_params_test_format(*pcm, params, SND_PCM_FORMAT_FLOAT) == 0)\n          ? SND_PCM_FORMAT_FLOAT : SND_PCM_FORMAT_S16;\n    stream_info->has_float = (format == SND_PCM_FORMAT_FLOAT);\n@@ -83,6 +73,16 @@ int alsa_init_pcm(snd_pcm_t **pcm,\n          snd_pcm_name(*pcm)\n    );\n \n+   if ((errnum = snd_pcm_hw_params_any(*pcm, params)) < 0)\n+   {\n+      RARCH_ERR(\"[ALSA]: Failed to query hardware parameters from %s device \\\"%s\\\": %s\\n\",\n+            snd_pcm_stream_name(stream),\n+            snd_pcm_name(*pcm),\n+            snd_strerror(errnum));\n+\n+      goto error;\n+   }\n+\n    if ((errnum = snd_pcm_hw_params_set_access(*pcm, params, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0)\n    {\n       RARCH_ERR(\"[ALSA]: Failed to set %s access for %s device \\\"%s\\\": %s\\n\",\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/patches/OdroidGoAdvance/0001-video_thread_wrapper-implement-RETRO_ENVIRONMENT_GET.patch",
    "content": "From cfc19b7e5ccaabd0ae5cf74a470badc04a97fab0 Mon Sep 17 00:00:00 2001\nFrom: valadaa48 <valadaa48@gmx.com>\nDate: Sun, 13 Dec 2020 15:24:02 -0500\nSubject: [PATCH] video_thread_wrapper: implement\n RETRO_ENVIRONMENT_GET_CURRENT_SOFTWARE_FRAMEBUFFER:\n\n---\n gfx/video_thread_wrapper.c | 18 ++++++++++++++++--\n 1 file changed, 16 insertions(+), 2 deletions(-)\n\ndiff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c\nindex 9052130198..36028a6ec4 100644\n--- a/gfx/video_thread_wrapper.c\n+++ b/gfx/video_thread_wrapper.c\n@@ -612,7 +612,7 @@\n       unsigned copy_stride = width *\n          (thr->info.rgb32 ? sizeof(uint32_t) : sizeof(uint16_t));\n \n-      if (src)\n+      if (src && src != dst)\n       {\n          unsigned h;\n          for (h = 0; h < height; h++, src += pitch, dst += copy_stride)\n@@ -1248,6 +1248,20 @@\n       return thr->poke->get_flags(thr->driver_data);\n \n    return 0;\n+}\n+\n+static bool thread_get_current_software_framebuffer(void *data,\n+      struct retro_framebuffer *framebuffer)\n+{\n+   thread_video_t *thr = (thread_video_t*)data;\n+   if (!thr)\n+      return false;\n+\n+   framebuffer->data = (uint8_t*)thr->frame.buffer;\n+   framebuffer->pitch = thr->frame.pitch;\n+   framebuffer->format = thr->info.rgb32 ? RETRO_PIXEL_FORMAT_XRGB8888 : RETRO_PIXEL_FORMAT_RGB565;\n+\n+   return true;\n }\n \n static const video_poke_interface_t thread_poke = {\n@@ -1270,7 +1284,7 @@\n    thread_show_mouse,\n    thread_grab_mouse_toggle,\n    thread_get_current_shader,\n-   NULL, /* get_current_software_framebuffer */\n+   thread_get_current_software_framebuffer,\n    NULL, /* get_hw_render_interface */\n    thread_set_hdr_max_nits,\n    thread_set_hdr_paper_white_nits,\n-- \n2.30.0\n\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/patches/OdroidGoAdvance/999-emuelec-add-vertical.patch",
    "content": "--- a/gfx/drivers/oga_gfx.c\n+++ b/gfx/drivers/oga_gfx.c\n@@ -547,6 +547,7 @@ static bool oga_frame(void *data, const void *frame, unsigned width,\n       unsigned height, uint64_t frame_count,\n       unsigned pitch, const char *msg, video_frame_info_t *video_info)\n {\n+   settings_t *settings        = config_get_ptr();\n    oga_video_t *vid            = (oga_video_t*)data;\n    oga_framebuf_t* page        = vid->pages[vid->cur_page];\n    oga_surface_t *page_surface = page->surface;\n@@ -581,10 +582,17 @@ static bool oga_frame(void *data, const void *frame, unsigned width,\n       width        = vid->menu_surface->width;\n       height       = vid->menu_surface->height;\n       aspect_ratio = (float)width / height;\n+      if (settings->bools.video_oga_vertical_enable) {\n+       vid->rotation = 0;\n\n+       if (settings->bools.video_ogs_vertical_enable)\n+        vid->rotation = HAL_TRANSFORM_ROT_180;\n+\n+        // RARCH_LOG(\"EmuELEC Rotation set to %d\", vid->rotation);\n+      }\n       oga_calc_bounds(&r, vid->drm_width, vid->drm_height, width, height, aspect_ratio, vid->display_ar);\n       oga_blit(vid->menu_surface, 0, 0, width, height,\n-            page_surface, r.y, r.x, r.h, r.w, HAL_TRANSFORM_ROT_270, vid->scale_mode, 0);\n+      page_surface, r.y, r.x, r.h, r.w, vid->rotation, vid->scale_mode, 0);\n    }\n    else\n #endif\n@@ -608,6 +616,14 @@ static bool oga_frame(void *data, const void *frame, unsigned width,\n          }\n       }\n\n+   if (settings->bools.video_oga_vertical_enable) {\n+    vid->rotation = HAL_TRANSFORM_ROT_270;\n+\n+   if (settings->bools.video_ogs_vertical_enable)\n+    vid->rotation = HAL_TRANSFORM_ROT_90;\n+\n+       // RARCH_LOG(\"EmuELEC Rotation set to %d\", vid->rotation);\n+}\n       oga_calc_bounds(&r, vid->drm_width, vid->drm_height, width, height, aspect_ratio, vid->display_ar);\n       oga_blit(vid->frame_surface, 0, 0, width, height,\n             page_surface, r.y, r.x, r.h, r.w, vid->rotation, vid->scale_mode, blend);\n@@ -615,9 +631,21 @@ static bool oga_frame(void *data, const void *frame, unsigned width,\n\n    if (msg)\n    {\n+\n+    if (settings->bools.video_oga_vertical_enable) {\n+     int rotation2 = 0;\n+\n+     if (settings->bools.video_ogs_vertical_enable)\n+      rotation2 = HAL_TRANSFORM_ROT_180;\n+\n+     oga_blit(vid->msg_surface, 0, 0, vid->msg_width, vid->msg_height,\n+        page_surface, 0, 0, vid->msg_width, vid->msg_height,\n+        rotation2, vid->scale_mode, 0xff0105);\n+    } else {\n       oga_blit(vid->msg_surface, 0, 0, vid->msg_width, vid->msg_height,\n             page_surface, 0, 0, vid->msg_height, vid->msg_width,\n             HAL_TRANSFORM_ROT_270, vid->scale_mode, 0xff0105);\n+    }\n    }\n\n    if (unlikely(drmModeSetCrtc(vid->fd, vid->crtc_id, page->fb_id, 0, 0, &vid->connector_id, 1, &vid->mode) != 0))\n@@ -705,6 +733,14 @@ static void oga_set_rotation(void *data, unsigned rotation)\n    if (!vid)\n       return;\n\n+   settings_t *settings                 = config_get_ptr();\n+\n+   if (settings->bools.video_oga_vertical_enable)\n+   rotation = 3;\n+\n+   if (settings->bools.video_ogs_vertical_enable)\n+   rotation = 2;\n+\n    switch (rotation)\n    {\n    case 0:\n\n--- a/gfx/drivers_context/drm_go2_ctx.c\n+++ b/gfx/drivers_context/drm_go2_ctx.c\n@@ -295,7 +295,8 @@\n    int src_w = drm->fb_width;\n    int src_h = drm->fb_height;\n    int src_x = 0;\n    int src_y = drm->ctx_h - drm->fb_height;\n+    settings_t *settings = config_get_ptr();\n\n    if (out_w != src_w || out_h != src_h)\n    {\n@@ -321,10 +322,25 @@\n    go2_context_swap_buffers(drm->context);\n    surf     = go2_context_surface_lock(drm->context);\n+\n+if (settings->bools.video_oga_vertical_enable) {\n+\n+    auto ee_rotation = GO2_ROTATION_DEGREES_0;\n+\n+    if (settings->bools.video_ogs_vertical_enable)\n+       ee_rotation = GO2_ROTATION_DEGREES_180;\n+\n+   go2_presenter_post(drm->presenter,\n+         surf,\n+         src_x, src_y, src_w, src_h,\n+         out_y, out_x, out_h, out_w,\n+         ee_rotation, 2);\n+} else {\n    go2_presenter_post(drm->presenter,\n          surf,\n          src_x, src_y, src_w, src_h,\n          out_y, out_x, out_h, out_w,\n          GO2_ROTATION_DEGREES_270, 2);\n+}\n    go2_context_surface_unlock(drm->context, surf);\n #endif\n }\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/patches/OdroidGoAdvance/999-enable_rga_scaling_for_gf.patch",
    "content": "--- a/menu/menu_setting.c\n+++ b/menu/menu_setting.c\n@@ -10856,7 +10856,6 @@\n                MENU_SETTINGS_LIST_CURRENT_ADD_CMD(list, list_info, CMD_EVENT_REINIT);\n             }\n \n-#ifdef HAVE_ODROIDGO2\n             CONFIG_BOOL(\n                   list, list_info,\n                   &settings->bools.video_ctx_scaling,\n@@ -10873,7 +10872,6 @@\n                   SD_FLAG_NONE\n                   );\n             MENU_SETTINGS_LIST_CURRENT_ADD_CMD(list, list_info, CMD_EVENT_REINIT);\n-#endif\n \n             CONFIG_UINT(\n                   list, list_info,\n--- a/msg_hash.h\n+++ b/msg_hash.h\n@@ -1105,9 +1105,7 @@\n    MENU_LABEL(VIDEO_RECORD_THREADS),\n    MENU_LABEL(VIDEO_SMOOTH),\n    MENU_LABEL(VIDEO_CTX_SCALING),\n-#ifdef HAVE_ODROIDGO2\n    MENU_LABEL(VIDEO_RGA_SCALING),\n-#endif\n \n    MENU_LABEL(VIDEO_CROP_OVERSCAN),\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/patches/OdroidGoAdvance/9999-emuelec-unify-brightness.patch",
    "content": "--- a/frontend/drivers/platform_unix.c\n+++ b/frontend/drivers/platform_unix.c\n@@ -1334,12 +1334,17 @@\n    }\n    #endif\n \n-   /* Calculate the brightness */\n+   char bright[64];\n+   sprintf(bright, \"/usr/bin/odroidgoa_utils.sh bright %i\", value);\n+   system(bright);\n+   /*\n+   // Calculate the brightness \n    value = (value * max_brightness) / 100;\n \n    snprintf(svalue, sizeof(svalue), \"%d\\n\", value);\n    filestream_write_file(\"/sys/class/backlight/backlight/brightness\",\n                          svalue, strlen(svalue));\n+*/\n }\n \n #endif\n@@ -2052,13 +2052,13 @@\n \n    android_app_destroy(android_app);\n #endif\n-\n+/*\n #ifdef HAVE_LAKKA\n-   /* Reset brightness to maximum */\n+   // Reset brightness to maximum\n    if (settings->uints.screen_brightness != DEFAULT_SCREEN_BRIGHTNESS)\n       frontend_unix_set_screen_brightness(DEFAULT_SCREEN_BRIGHTNESS);\n #endif\n-\n+*/\n    frontend_unix_set_gamemode(false);\n }\n \n\n static void frontend_unix_init(void *data)\n@@ -2800,7 +2807,7 @@\n #else\n    NULL,                               /* get_lakka_version */\n #endif\n-#if defined(HAVE_LAKKA_SWITCH) || (defined(HAVE_LAKKA) && defined(HAVE_ODROIDGO2))\n+#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LAKKA)\n    frontend_unix_set_screen_brightness,/* set_screen_brightness */\n #else \n    NULL,                         /* set_screen_brightness */\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/patches/retroarch-01-xkb-fix.patch",
    "content": "diff --git a/input/drivers/udev_input.c b/input/drivers/udev_input.c\nindex bcdacb60a6..d2f00114bd 100644\n--- a/input/drivers/udev_input.c\n+++ b/input/drivers/udev_input.c\n@@ -76,14 +76,14 @@\n #include \"../../retroarch.h\"\n #include \"../../verbosity.h\"\n \n-#if defined(HAVE_XKBCOMMON) && defined(HAVE_KMS)\n+#if defined(HAVE_XKBCOMMON)\n #define UDEV_XKB_HANDLING\n #endif\n \n /* Force UDEV_XKB_HANDLING for Lakka */\n #ifdef HAVE_LAKKA\n #ifndef UDEV_XKB_HANDLING\n-#define UDEV_XKB_HANDLING\n+#undef UDEV_XKB_HANDLING\n #endif\n #endif\n \n@@ -1402,7 +1402,7 @@\n    /* Force xkb_handling on Lakka */\n    udev->xkb_handling = true;\n #else\n-   udev->xkb_handling = string_is_equal(ctx_ident.ident, \"kms\");\n+   udev->xkb_handling = true; //string_is_equal(ctx_ident.ident, \"kms\");\n #endif /* HAVE_LAKKA */\n #endif\n \n\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/patches/retroarch-02_disable_search.patch",
    "content": "--- a/menu/menu_driver.c\t2023-08-17 17:35:47.328058500 +0200\n+++ b/menu/menu_driver_2.c\t2023-08-17 17:42:40.014684249 +0200\n@@ -7617,7 +7617,7 @@\n                   entry->label, entry->type, i, entry->entry_idx);\n          break;\n       case MENU_ACTION_SEARCH:\n-         menu_input_dialog_start_search();\n+         //menu_input_dialog_start_search();\n          break;\n       case MENU_ACTION_SCAN:\n          if (cbs && cbs->action_scan)\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/patches/retroarch-04-enablecontent.patch",
    "content": "--- a/menu/menu_displaylist.c\r\n+++ b/menu/menu_displaylist.c\r\n@@ -13884,12 +13884,6 @@\r\n             menu_entries_clear(info->list);\r\n             {\r\n #ifdef HAVE_LAKKA\r\n-               if (menu_entries_append(info->list,\r\n-                        msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UPDATE_LAKKA),\r\n-                        msg_hash_to_str(MENU_ENUM_LABEL_UPDATE_LAKKA),\r\n-                        MENU_ENUM_LABEL_UPDATE_LAKKA,\r\n-                        MENU_SETTING_ACTION, 0, 0, NULL))\r\n-                  count++;\r\n\r\n                if (menu_entries_append(info->list,\r\n                         msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT),\r\n--- a/menu/menu_setting.c\r\n+++ b/menu/menu_setting.c\r\n@@ -9781,7 +9781,7 @@\r\n #endif\r\n #if !defined(IOS)\r\n          /* Apple rejects iOS apps that let you forcibly quit them. */\r\n-#ifdef HAVE_LAKKA\r\n+#ifndef HAVE_LAKKA\r\n          CONFIG_ACTION(\r\n                list, list_info,\r\n                MENU_ENUM_LABEL_QUIT_RETROARCH,\r\n@@ -17765,7 +17765,7 @@\r\n                   general_read_handler,\r\n                   SD_FLAG_LAKKA_ADVANCED);\r\n \r\n-#ifdef HAVE_LAKKA\r\n+#ifndef HAVE_LAKKA\r\n             CONFIG_BOOL(\r\n                   list, list_info,\r\n                   &settings->bools.menu_show_quit_retroarch,\r\n--- a/menu/cbs/menu_cbs_sublabel.c\r\n+++ b/menu/cbs/menu_cbs_sublabel.c\r\n@@ -604,7 +604,7 @@\r\n DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_load_content_history,          MENU_ENUM_SUBLABEL_LOAD_CONTENT_HISTORY)\r\n DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_network_information,           MENU_ENUM_SUBLABEL_NETWORK_INFORMATION)\r\n DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_system_information,            MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION)\r\n-#ifdef HAVE_LAKKA\r\n+#ifndef HAVE_LAKKA\r\n DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_quit_retroarch,                MENU_ENUM_SUBLABEL_RESTART_RETROARCH)\r\n #else\r\n DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_quit_retroarch,                MENU_ENUM_SUBLABEL_QUIT_RETROARCH)\r\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/patches/retroarch-10-Exit_menu.patch",
    "content": "--- ./retroarch.c\t2017-07-26 23:59:01.195225618 -0500\n+++ ./retroarch.c\t2017-08-14 01:58:07.722644341 -0500\n@@ -49,6 +49,7 @@\n #include <setjmp.h>\n #include <math.h>\n #include <locale.h>\n+#include <fcntl.h>\n \n #include <boolean.h>\n #include <clamping.h>\n@@ -3962,9 +3963,30 @@\n          }\n          break;\n       case CMD_EVENT_QUIT:\n-         if (!retroarch_main_quit())\n+ {\n+     /* Exit Back to Kodi if the option exists on the cfg file*/\n+      settings_t *settings      = config_get_ptr();\n+      if(settings->bools.emuelec_exit_to_kodi)\n+      {\n+      remove(\"/var/lock/start.retro\");\n+      system(\"touch /var/lock/start.kodi\");\n+      system(\"systemctl start kodi.service\");\n+      system(\"systemctl stop retroarch.service\");\n+      }\n+       else\n+      {\n+      /* Exit back to ES - TODO: Check if start.retro file exists, if it does, then exit with the following code */ \n+     if( access( \"/var/lock/start.retro\", F_OK ) != -1 ) { remove(\"/var/lock/start.retro\");\n+      system(\"touch /var/lock/start.games\");\n+      system(\"systemctl restart emustation.service\");\n+      system(\"systemctl stop retroarch.service\"); \n+      } }\n+      /* if it doesn't exist then just exit */\n+\n+ if (!retroarch_main_quit())\n             return false;\n          break;\n+ }\n       case CMD_EVENT_CHEEVOS_HARDCORE_MODE_TOGGLE:\n #ifdef HAVE_CHEEVOS\n          rcheevos_toggle_hardcore_mode();\n\n--- ./configuration.h\t2017-08-14 02:20:37.546187576 -0500\n+++ ./configuration.h\t2017-08-14 02:20:46.390236188 -0500\n@@ -47,6 +47,11 @@\n    {\n       bool placeholder;\n \n+      /* emuelec */\n+      bool emuelec_exit_to_kodi;\n+      bool video_oga_vertical_enable;\n+      bool video_ogs_vertical_enable;\n+      bool cheevos_unsupported_notification;\n       /* Video */\n       bool video_fullscreen;\n       bool video_windowed_fullscreen;\n--- ./configuration.c\t2017-08-18 06:30:31.000000000 -0500\n+++ ./configuration.c\t2017-08-23 01:24:28.009570267 -0500\n@@ -1329,6 +1329,12 @@\n {\n    struct config_bool_setting  *tmp    = (struct config_bool_setting*)calloc(1, (*size + 1) * sizeof(struct config_bool_setting));\n    unsigned count                      = 0;\n+   /* emuelec */\n+   SETTING_BOOL(\"emuelec_exit_to_kodi\",           &settings->bools.emuelec_exit_to_kodi, true, false, false);\n+   SETTING_BOOL(\"video_oga_vertical_enable\",      &settings->bools.video_oga_vertical_enable, true, false, false);\n+   SETTING_BOOL(\"video_ogs_vertical_enable\",      &settings->bools.video_ogs_vertical_enable, true, false, false);\n+   SETTING_BOOL(\"cheevos_unsupported_notification\",      &settings->bools.cheevos_unsupported_notification, true, false, false);\n+   /* emuelec */\n \n    SETTING_BOOL(\"accessibility_enable\", &settings->bools.accessibility_enable, true, DEFAULT_ACCESSIBILITY_ENABLE, false);\n    SETTING_BOOL(\"driver_switch_enable\", &settings->bools.driver_switch_enable, true, DEFAULT_DRIVER_SWITCH_ENABLE, false);\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/patches/retroarch-12-input_sort_devices.patch",
    "content": "diff --git a/input/drivers_joypad/udev_joypad.c b/input/drivers_joypad/udev_joypad.c\nindex e60a8b2..03ba777 100644\n--- a/input/drivers_joypad/udev_joypad.c\n+++ b/input/drivers_joypad/udev_joypad.c\n@@ -538,6 +538,14 @@\n    }\n }\n \n+/* Used for sorting devnodes to appear in the correct order */\n+static int sort_devnodes(const void *a, const void *b)\n+{\n+   const struct joypad_udev_entry *aa = (const struct joypad_udev_entry*)a;\n+   const struct joypad_udev_entry *bb = (const struct joypad_udev_entry*)b;\n+   return strcmp(aa->devnode, bb->devnode);\n+}\n+\n static void *udev_joypad_init(void *data)\n {\n    unsigned i;\n@@ -570,9 +578,29 @@\n    udev_enumerate_scan_devices(enumerate);\n    devs = udev_enumerate_get_list_entry(enumerate);\n \n-   udev_list_entry_foreach(item, devs)\n+   for (item = devs; item; item = udev_list_entry_get_next(item))\n    {\n       const char         *name = udev_list_entry_get_name(item);\n+      struct udev_device  *dev = udev_device_new_from_syspath(udev_joypad_fd, name);\n+      const char      *devnode = udev_device_get_devnode(dev);\n+\n+      if (devnode != NULL) {\n+         sorted[sorted_count].devnode = devnode;\n+         sorted[sorted_count].item = item;\n+         sorted_count++;\n+      } else {\n+         udev_device_unref(dev);\n+      }\n+   }\n+\n+   /* Sort the udev entries by devnode name so that they are\n+    * created in the proper order */\n+   qsort(sorted, sorted_count,\n+         sizeof(struct joypad_udev_entry), sort_devnodes);\n+\n+   for (i = 0; i < sorted_count; i++)\n+   {\n+      const char         *name = udev_list_entry_get_name(sorted[i].item);\n       struct udev_device  *dev = udev_device_new_from_syspath(udev_joypad_fd, name);\n       const char      *devnode = udev_device_get_devnode(dev);\n \n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/scripts/retroarch-config",
    "content": "#!/bin/bash\n\nfor i in 5 4 3 2 1 0; do [ -e /dev/snd/pcmC${i}D0p ] && export ALSA_CARD=$i; done\n\necho \"ALSA_CARD=\\\"$ALSA_CARD\\\"\" > /run/libreelec/retroarch.conf\necho \"LD_LIBRARY_PATH=\\\"/usr/lib:/tmp/cores\\\"\" >> /run/libreelec/retroarch.conf\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/system.d/retroarch.service",
    "content": "[Unit]\nDescription=RetroArch emulator frontend\nConditionPathExists=/var/lock/start.retro\n\n[Service]\nEnvironment=DISPLAY=:0.0\nEnvironment=SDL_MOUSE_RELATIVE=0\nEnvironment=FB_MULTI_BUFFER=2\nEnvironment=HOME=/storage\nExecStartPre=/usr/bin/emustation-config retroarch\nExecStart=/bin/bash -c '/usr/bin/retroarch $(cat /emuelec/configs/RA_ARGS)'\nKillMode=process\nTimeoutStopSec=3\nRestart=on-failure\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=emuelec.target\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/system.d/tmp-assets.mount",
    "content": "[Unit]\nDescription=Assets directory\nAfter=systemd-tmpfiles-setup.service\nDefaultDependencies=no\n\n[Mount]\nWhat=none\nWhere=/tmp/assets\nType=overlay\nOptions=lowerdir=/usr/share/retroarch-assets,upperdir=/storage/assets,workdir=/storage/.tmp/assets-workdir\n\n[Install]\nWantedBy=emuelec.target\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/system.d/tmp-cores.mount",
    "content": "[Unit]\nDescription=Cores directory\nAfter=systemd-tmpfiles-setup.service\nDefaultDependencies=no\n\n[Mount]\nWhat=none\nWhere=/tmp/cores\nType=overlay\nOptions=lowerdir=/usr/lib/libretro,upperdir=/storage/cores,workdir=/storage/.tmp/cores-workdir\n\n[Install]\nWantedBy=emuelec.target\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/system.d/tmp-database.mount",
    "content": "[Unit]\nDescription=Database directory\nAfter=systemd-tmpfiles-setup.service\nDefaultDependencies=no\n\n[Mount]\nWhat=none\nWhere=/tmp/database\nType=overlay\nOptions=lowerdir=/usr/share/libretro-database,upperdir=/storage/database,workdir=/storage/.tmp/database-workdir\n\n[Install]\nWantedBy=emuelec.target\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/system.d/tmp-joypads.mount",
    "content": "[Unit]\nDescription=Joypad configs directory\nAfter=systemd-tmpfiles-setup.service\nDefaultDependencies=no\n\n[Mount]\nWhat=none\nWhere=/tmp/joypads\nType=overlay\nOptions=lowerdir=/etc/retroarch-joypad-autoconfig,upperdir=/storage/joypads,workdir=/storage/.tmp/joypads-workdir\n\n[Install]\nWantedBy=emuelec.target\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/system.d/tmp-overlays.mount",
    "content": "[Unit]\nDescription=Overlays directory\nAfter=systemd-tmpfiles-setup.service\nDefaultDependencies=no\n\n[Mount]\nWhat=none\nWhere=/tmp/overlays\nType=overlay\nOptions=lowerdir=/usr/share/retroarch-overlays,upperdir=/storage/overlays,workdir=/storage/.tmp/overlays-workdir\n\n[Install]\nWantedBy=emuelec.target\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/system.d/tmp-shaders.mount",
    "content": "[Unit]\nDescription=Shaders directory RetroArch\nAfter=systemd-tmpfiles-setup.service\nDefaultDependencies=no\n\n[Mount]\nWhat=none\nWhere=/tmp/shaders\nType=overlay\nOptions=lowerdir=/usr/share/common-shaders,upperdir=/storage/shaders,workdir=/storage/.tmp/shaders-workdir\n\n[Install]\nWantedBy=emuelec.target\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/tmpfiles.d/retroarch-userdirs.conf",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n#\n#  OpenELEC is free software: you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation, either version 2 of the License, or\n#  (at your option) any later version.\n#\n#  OpenELEC is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.  If not, see <http://www.gnu.org/licenses/>.\n################################################################################\n\nd    /storage/cores              0777 root root - -\nd    /storage/playlists          0777 root root - -\nd    /storage/savefiles          0777 root root - -\nd    /storage/savestates         0777 root root - -\nd    /storage/system             0777 root root - -\nd    /storage/roms/screenshots   0777 root root - -\nd    /storage/shaders            0777 root root - -\nd    /storage/joypads            0777 root root - -\nd    /storage/remappings         0777 root root - -\nd    /storage/database           0777 root root - -\nd    /storage/thumbnails         0777 root root - -\nd    /storage/assets             0777 root root - -\nd    /storage/overlays           0777 root root - -\n\nd    /storage/.tmp/cores-workdir    0777 root root - -\nd    /storage/.tmp/joypads-workdir  0777 root root - -\nd    /storage/.tmp/database-workdir 0777 root root - -\nd    /storage/.tmp/assets-workdir   0777 root root - -\nd    /storage/.tmp/overlays-workdir 0777 root root - -\nd    /storage/.tmp/shaders-workdir  0777 root root - -\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/udev.d/99-8bitdo-bluetooth-controllers.rules",
    "content": "# Add the ID_INPUT_JOYSTICK attribute to the device so SDL picks up on it\n\n# 8Bitdo FC30 1P GamePad Bluetooth mode(START) mode(START+R)\nSUBSYSTEM==\"input\", ATTRS{name}==\"8Bitdo FC30 GamePad\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n\n# 8Bitdo FC30 2P GamePad Bluetooth mode(START)\nSUBSYSTEM==\"input\", ATTRS{name}==\"8Bitdo FC30 II\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\" \n\n# 8Bitdo FC30 2P GamePad Bluetooth mode(START+R)\nSUBSYSTEM==\"input\", ATTRS{name}==\"8Bitdo FC30 II Joystick\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n\n# 8Bitdo SFC30 GamePad Bluetooth mode(START)\nSUBSYSTEM==\"input\", ATTRS{name}==\"8Bitdo SFC30 GamePad\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n\n# 8Bitdo SFC30 GamePad Bluetooth mode(START+R)\nSUBSYSTEM==\"input\", ATTRS{name}==\"8Bitdo SFC30 GamePad Joystick\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n\n# 8Bitdo NES30 GamePad Bluetooth mode(START)\nSUBSYSTEM==\"input\", ATTRS{name}==\"8Bitdo NES30 GamePad\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n\n# 8Bitdo NES30 GamePad Bluetooth mode(START+R)\nSUBSYSTEM==\"input\", ATTRS{name}==\"8Bitdo NES30 GamePad Joystick\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n\n# 8Bitdo SNES30 GamePad Bluetooth mode(START)\nSUBSYSTEM==\"input\", ATTRS{name}==\"8Bitdo SNES30 GamePad\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n\n# 8Bitdo SNES30 GamePad Bluetooth mode(START+R)\nSUBSYSTEM==\"input\", ATTRS{name}==\"8Bitdo SNES30 GamePad Joystick\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n\n# 8Bitdo FC30 Pro GamePad Bluetooth mode(POWER) mode(POWER+R1)\nSUBSYSTEM==\"input\", ATTRS{name}==\"8Bitdo FC30 Pro\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n\n# 8Bitdo NES30 Pro GamePad Bluetooth mode(POWER)\nSUBSYSTEM==\"input\", ATTRS{name}==\"8Bitdo NES30 Pro\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n\n# 8Bitdo NES30 Pro GamePad Bluetooth mode(POWER+R1)\nSUBSYSTEM==\"input\", ATTRS{name}==\"8Bitdo NES30 Pro Joystick\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n\n# 8Bitdo FC30 Arcade Joystick Bluetooth mode(HOME)\nSUBSYSTEM==\"input\", ATTRS{name}==\"8Bitdo Joy\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n\n# 8Bitdo Zero GamePad Bluetooth mode(START) mode(START+R)\nSUBSYSTEM==\"input\", ATTRS{name}==\"8Bitdo Zero GamePad\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n\n# 8Bitdo 2.4ghz ultimate\nACTION==\"add\", ATTRS{idVendor}==\"2dc8\", ATTRS{idProduct}==\"3106\", RUN+=\"/sbin/modprobe xpad\", RUN+=\"/bin/bash -c 'echo 2dc8 3106 > /sys/bus/usb/drivers/xpad/new_id'\"\n\n# 8Bitdo M30\nACTION==\"add\", ATTRS{idVendor}==\"2dc8\", ATTRS{idProduct}==\"6002\", RUN+=\"/sbin/modprobe xpad\", RUN+=\"/bin/bash -c 'echo 2dc8 6002 > /sys/bus/usb/drivers/xpad/new_id'\"\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/udev.d/99-ION-iCade-bluetooth.rules",
    "content": "SUBSYSTEM==\"input\", ATTRS{name}==\"ION iCade\", KERNEL==\"event*\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/udev.d/99-bluetooth-power-on.rules",
    "content": "ACTION==\"add\", KERNEL==\"hci0\", RUN+=\"/usr/bin/hciconfig hci0 up\"\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/udev.d/99-evdev.rules",
    "content": "# Needed for permissions set correctly for /dev/input/event* for keyboard input\nSUBSYSTEM==\"input\", ATTRS{name}==\"input/%k\", KERNEL==\"event*\", MODE=\"0666\", ENV{ID_INPUT_KEYBOARD}=\"1\"\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/udev.d/99-gen-game-s3-controller.rules",
    "content": "SUBSYSTEM==\"input\", ATTRS{name}==\"GEN GAME S3\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\", ENV{ID_INPUT_MOUSE}=\"\", ENV{ID_INPUT_KEYBOARD}=\"\"\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/udev.d/99-homatics-gamepad.rules",
    "content": "SUBSYSTEM==\"input\", ATTRS{name}==\"GAME\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/udev.d/99-juyao-dual-arcade.rules",
    "content": "# Needed for device Juyao dual arcade (Bus 002 Device 007: ID 0314:0328)\nATTRS{product}==\"JUYAO Dual Arcade\",ACTION==\"add\",ENV{ID_INPUT_TABLET}=\"0\",ENV{ID_INPUT_JOYSTICK}:=\"1\"\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/udev.d/99-nintendo-wii-remote.rules",
    "content": "SUBSYSTEM==\"input\", ATTRS{name}==\"Nintendo Wii Remote\", MODE=\"666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\nSUBSYSTEM==\"input\", ATTRS{name}==\"Nintendo Wii Remote Classic Controller\", MODE=\"666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/udev.d/99-ninteno-wii-remote.rules",
    "content": "SUBSYSTEM==\"input\", ATTRS{name}==\"Nintendo Wii Remote\", MODE=\"666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\nSUBSYSTEM==\"input\", ATTRS{name}==\"Nintendo Wii Remote Classic Controller\", MODE=\"666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/udev.d/99-nv-shield-controller.rules",
    "content": "SUBSYSTEM==\"input\", ATTRS{idVendor}==\"0955\", ATTRS{idProduct}==\"7210\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\", ENV{ID_INPUT_MOUSE}=\"\"\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/udev.d/99-ouya-controller.rules",
    "content": "SUBSYSTEM==\"input\", ATTRS{name}==\"OUYA Game Controller\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\", ENV{ID_INPUT_MOUSE}=\"\"\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch/udev.d/99-terios-t3.rules",
    "content": "# Needed for device Terios T3 (1949:0402)\nSUBSYSTEM==\"input\", ATTRS{name}==\"Gamepad\", KERNEL==\"event*\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch-assets/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"retroarch-assets\"\n#PKG_VERSION=\"fb39cdde6dfaea2c98218d28c71b14afc632fa03\"\n#PKG_SHA256=\"7be775fa493185d4f23725e2a550f6b8115e1f6544c56f82729469d97e13f9e5\"\nPKG_VERSION=\"2d24ef2972a709f870cc3f73853158fa2376f37d\"\nPKG_SHA256=\"91acc898158d2ab25d83501509bf5c26e795c0f56cfdd1eb97ac1a05211463a1\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libretro/retroarch-assets\"\nPKG_URL=\"https://github.com/libretro/retroarch-assets/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"RetroArch assets. Background and icon themes for the menu drivers.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_configure_target() {\n  cd ../\n  rm -rf .${TARGET_NAME}\n}\n\nmakeinstall_target() {\n  make install INSTALLDIR=\"${INSTALL}/usr/share/retroarch-assets\"\n  \n  \n  # Remove unnecesary Retroarch Assets\n  for i in Automatic branding cfg devtools FlatUX glui nxrgui pkg/wiiu scripts Systematic switch wallpapers COPYING; do\n    rm -rf \"${INSTALL}/usr/share/retroarch-assets/${i}\"\n  done\n  \n  for i in automatic dot-art flatui neoactive pixel retroactive retrosystem systematic convert.sh NPMApng2PMApng.py; do\n  rm -rf \"${INSTALL}/usr/share/retroarch-assets/xmb/${i}\"\n  done\n  \n  \n  \n}\n"
  },
  {
    "path": "packages/sx05re/libretro_base/retroarch-overlays/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"retroarch-overlays\"\n#PKG_VERSION=\"8f48a907245babdd7f367afffaec85d330cdbe88\"\n#PKG_SHA256=\"66bf3e0a0498d214cb3997e557bf4801f73b5da75d5fe21fbeb424f8df0566e0\"\nPKG_VERSION=\"b8f4b3205414486793a82ce27101b850d6c7e5a0\"\nPKG_SHA256=\"00000cac463a26ee0a2cf3892cf1af0d6cf322b01992740de889bdc2315a7808\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libretro/common-overlays\"\nPKG_URL=\"https://github.com/libretro/common-overlays/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Collection of overlay files for use with libretro frontends, such as RetroArch.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/retroarch-overlays\n  rm -rf ${PKG_BUILD}/gamepads\n  rm -rf ${PKG_BUILD}/misc\n  rm -rf ${PKG_BUILD}/ipad\n  rm -rf ${PKG_BUILD}/keyboards\n  cp -r ${PKG_BUILD}/* ${INSTALL}/usr/share/retroarch-overlays\n}\n\n"
  },
  {
    "path": "packages/sx05re/libretro_base/wii-u-gc-adapter/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"wii-u-gc-adapter\"\nPKG_VERSION=\"fa098efa7f6b34f8cd82e2c249c81c629901976c\"\nPKG_SHA256=\"b8ef28ec9cdab69805b709423678dcd8f44da883a9c3b37e154967af8fb0ea5d\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Non-commercial\"\nPKG_SITE=\"https://github.com/ToadKing/wii-u-gc-adapter\"\nPKG_URL=\"https://github.com/ToadKing/wii-u-gc-adapter/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"\"\nPKG_SHORTDESC=\"Tool for using the Wii U GameCube Adapter on Linux\"\nPKG_LONGDESC=\"Tool for using the Wii U GameCube Adapter on Linux\"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp wii-u-gc-adapter ${INSTALL}/usr/bin/\n}\n"
  },
  {
    "path": "packages/sx05re/libretro_base/wii-u-gc-adapter/system.d/wii-u-gc-adapter.service",
    "content": "[Unit]\nDescription=Wii U GC Adapter\n\n[Service]\nTimeoutStartSec=infinity\nExecStart=/usr/bin/wii-u-gc-adapter\n\n[Install]\nWantedBy=retroarch.target\n\n"
  },
  {
    "path": "packages/sx05re/tools/32bit/emuelec-32bit-info/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"emuelec-32bit-info\"\nPKG_VERSION=\"1\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/emuelec/emuelec-32bit-libs\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-retroarch\"\nPKG_LONGDESC=\"EmuELEC 32-bit infos, stolen from emuelec-32bit-libs, since I don't want to break that package\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n  :\n}\n\nmake_target() {\n  :\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp $(get_pkg_directory emuelec-32bit-libs)/infos/*.info ${INSTALL}/usr/lib/libretro/\n}"
  },
  {
    "path": "packages/sx05re/tools/32bit/emuelec-32bit-libs/infos/flycast_32b_libretro.info",
    "content": "# Software Information\ndisplay_name = \"Sega - Dreamcast/NAOMI (Flycast 32Bit)\"\nauthors = \"flyinghead\"\nsupported_extensions = \"chd|cdi|elf|bin|cue|gdi|lst|zip|dat|7z|m3u\"\ncorename = \"Flycast 32Bit\"\nlicense = \"GPLv2\"\npermissions = \"\"\ncategories = \"Emulator\"\ndisplay_version = \"Git\"\n\n# Hardware Information\nmanufacturer = \"Sega\"\nsystemname = \"Sega Dreamcast\"\nsystemid = \"dreamcast\"\n\n# Libretro Features\ndatabase = \"Sega - Dreamcast|Sega - NAOMI\"\nsupports_no_game = \"false\"\nsavestate = \"true\"\nsavestate_features = \"basic\"\n\n# BIOS / Firmware\nfirmware_count = 7\nfirmware0_desc = \"dc/dc_boot.bin (Dreamcast BIOS)\"\nfirmware0_path = \"dc/dc_boot.bin\"\nfirmware0_opt = \"true\"\nfirmware1_desc = \"dc/naomi.zip (Naomi Bios from MAME)\"\nfirmware1_path = \"dc/naomi.zip\"\nfirmware1_opt = \"true\"\nfirmware2_desc = \"dc/hod2bios.zip (Naomi The House of the Dead 2 Bios from MAME)\"\nfirmware2_path = \"dc/hod2bios.zip\"\nfirmware2_opt  = \"true\"\nfirmware3_desc = \"dc/f355dlx.zip (Naomi Ferrari F355 Challenge deluxe Bios from MAME)\"\nfirmware3_path = \"dc/f355dlx.zip\"\nfirmware3_opt  = \"true\"\nfirmware4_desc = \"dc/f355bios.zip (Naomi Ferrari F355 Challenge twin/deluxe Bios from MAME)\"\nfirmware4_path = \"dc/f355bios.zip\"\nfirmware4_opt  = \"true\"\nfirmware5_desc = \"dc/airlbios.zip (Naomi Airline Pilots deluxe Bios from MAME)\"\nfirmware5_path = \"dc/airlbios.zip\"\nfirmware5_opt  = \"true\"\nfirmware6_desc = \"dc/awbios.zip (Atomiswave BIOS from MAME)\"\nfirmware6_path = \"dc/awbios.zip\"\nfirmware6_opt  = \"true\"\nnotes = \"(!) dc_boot.bin (md5): e10c53c2f8b90bab96ead2d368858623\"\nhw_render = \"true\"\nrequired_hw_api = \"OpenGL >= 3.0 | OpenGL Core >= 3.1 | OpenGL ES >= 2.0 | Vulkan >= 1.1\"\n\ndescription = \"A port of the Flycast Dreamcast emulator to libretro. In addition to Dreamcast, the core also supports the NAOMI and Atomiswave arcade platforms (with appropriate BIOS images) and will load these games from the latest MAME ROMset. This version of the core uses advanced graphics API features, so anyone using an older, limited GPU may need to use the GLES2 version if this one is incompatible with their hardware.\"\n"
  },
  {
    "path": "packages/sx05re/tools/32bit/emuelec-32bit-libs/infos/mupen64plus_32b_libretro.info",
    "content": "# Software Information\ndisplay_name = \"Nintendo - Nintendo 64 (Mupen64Plus 32Bit)\"\nauthors = \"m4xw|Hacktarux|gonetz|GLideN64 Contributors|Mupen64Plus Team\"\nsupported_extensions = \"n64|v64|z64|bin|u1\"\ncorename = \"Mupen64Plus 32Bit\"\nlicense = \"GPLv2\"\npermissions = \"dynarec_optional\"\ndisplay_version = \"1.0\"\ncategories = \"Emulator\"\n\n# Hardware Information\nmanufacturer = \"Nintendo\"\nsystemname = \"Nintendo 64\"\nsystemid = \"nintendo_64\"\n\n# Libretro Features\nsupports_no_game = \"false\"\ndatabase = \"Nintendo - Nintendo 64\"\nhw_render = \"true\"\nrequired_hw_api = \"OpenGL Core >= 3.3 | OpenGL ES >= 2.0\"\nsavestate = \"true\"\nsavestate_features = \"serialized\"\ncheats = \"true\"\ninput_descriptors = \"true\"\nmemory_descriptors = \"true\"\nlibretro_saves = \"true\"\ncore_options = \"true\"\nload_subsystem = \"true\"\nneeds_fullpath = \"false\"\ndisk_control = \"false\"\nis_experimental = \"false\"\n\ndescription = \"An up-to-date port of the Mupen64Plus N64 emulator, ported to libretro. It uses up-to-date GLideN64 plugin as its default graphics plug, though the high-accuracy Angrylion and ParaLLEl-RDP plugins are also available. This core is a good first choice for most users and should generally work better than the ParaLLEl-N64 core, which is mainly useful for its support for legacy graphics plugins that can run on older/low-power devices that are too weak for the modern plugins.\"\n"
  },
  {
    "path": "packages/sx05re/tools/32bit/emuelec-32bit-libs/infos/mupen64plus_next_alt_libretro.info",
    "content": "# Software Information\ndisplay_name = \"Nintendo - Nintendo 64 (Mupen64Plus-Next-Alt)\"\nauthors = \"m4xw|Hacktarux|gonetz|GLideN64 Contributors|Mupen64Plus Team\"\nsupported_extensions = \"n64|v64|z64|bin|u1\"\ncorename = \"Mupen64Plus-Next-Alt\"\nlicense = \"GPLv2\"\npermissions = \"dynarec_optional\"\ndisplay_version = \"1.0\"\ncategories = \"Emulator\"\n\n# Hardware Information\nmanufacturer = \"Nintendo\"\nsystemname = \"Nintendo 64\"\nsystemid = \"nintendo_64\"\n\n# Libretro Features\nsupports_no_game = \"false\"\ndatabase = \"Nintendo - Nintendo 64\"\nhw_render = \"true\"\nrequired_hw_api = \"OpenGL Core >= 3.3 | OpenGL ES >= 2.0\"\nsavestate = \"true\"\nsavestate_features = \"serialized\"\ncheats = \"true\"\ninput_descriptors = \"true\"\nmemory_descriptors = \"true\"\nlibretro_saves = \"true\"\ncore_options = \"true\"\nload_subsystem = \"true\"\nneeds_fullpath = \"false\"\ndisk_control = \"false\"\nis_experimental = \"false\"\n\ndescription = \"An up-to-date port of the Mupen64Plus N64 emulator, ported to libretro. It uses up-to-date GLideN64 plugin as its default graphics plug, though the high-accuracy Angrylion and ParaLLEl-RDP plugins are also available. This core is a good first choice for most users and should generally work better than the ParaLLEl-N64 core, which is mainly useful for its support for legacy graphics plugins that can run on older/low-power devices that are too weak for the modern plugins.\"\n"
  },
  {
    "path": "packages/sx05re/tools/32bit/emuelec-32bit-libs/infos/pcsx_rearmed_32b_libretro.info",
    "content": "display_name = \"Sony - PlayStation (PCSX ReARMed 32Bit)\"\nauthors = \"PCSX Team|notaz|Exophase\"\nsupported_extensions = \"bin|cue|img|mdf|pbp|toc|cbn|m3u|ccd|chd\"\ncorename = \"PCSX-ReARMed 32Bit\"\nlicense = \"GPLv2\"\npermissions = \"dynarec\"\ndisplay_version = \"r21\"\ncategories = \"Emulator\"\n\n# Hardware Information\nmanufacturer = \"Sony\"\nsystemname = \"PlayStation\"\nsystemid = \"playstation\"\n\n# Libretro Features\ndatabase = \"Sony - PlayStation\"\nsupports_no_game = \"false\"\nsavestate = \"true\"\nsavestate_features = \"serialized\"\ncheats = \"true\"\ninput_descriptors = \"true\"\nmemory_descriptors = \"true\"\nlibretro_saves = \"true\"\ncore_options = \"true\"\nload_subsystem = \"false\"\nhw_render = \"false\"\nneeds_fullpath = \"true\"\ndisk_control = \"true\"\nis_experimental = \"false\"\n\n# Firmware / BIOS\nfirmware_count = 3\nfirmware0_desc = \"scph5500.bin (PS1 JP BIOS)\"\nfirmware0_path = \"scph5500.bin\"\nfirmware0_opt = \"true\"\nfirmware1_desc = \"scph5501.bin (PS1 US BIOS)\"\nfirmware1_path = \"scph5501.bin\"\nfirmware1_opt = \"true\"\nfirmware2_desc = \"scph5502.bin (PS1 EU BIOS)\"\nfirmware2_path = \"scph5502.bin\"\nfirmware2_opt = \"true\"\nnotes = \"(!) scph5500.bin (md5): 8dd7d5296a650fac7319bce665a6a53c|(!) scph5501.bin (md5): 490f666e1afb15b7362b406ed1cea246|(!) scph5502.bin (md5): 32736f17079d0b2b7024407c39bd3050\"\n\ndescription = \"A port of the PCSX-ReARMed fork to libretro. This emulator is a technical marvel and runs incredibly well on 32-bit ARM CPUs, though it is also a good choice for other low-powered hardware that cannot run Beetle-PSX/-HW or Swanstation at full speed. However, this core has no support for increased internal resolution, texture filtering, etc., so users who want those features would be better served by the other cores.\"\n"
  },
  {
    "path": "packages/sx05re/tools/32bit/emuelec-32bit-libs/infos/uae4arm_32b_libretro.info",
    "content": "# Software Information\ndisplay_name = \"Commodore - Amiga (UAE4ARM 32Bit)\"\ncategories = \"Emulator\"\nauthors = \"TomB/Chips-fr\"\nsupported_extensions = \"adf|dms|ipf|adz|wrp|zip|uae|lha|cue|ccd|iso|hdf\"\ncorename = \"UAE4ARM 32Bit\"\ncategories = \"Emulator\"\nlicense = \"GPLv2\"\npermissions = \"\"\ndisplay_version = \"v0.5\"\n\n# Hardware Information\nmanufacturer = \"Commodore\"\nsystemname = \"Amiga\"\nsystemid = \"commodore_amiga\"\n\n# Libretro Features\nsupports_no_game = \"false\"\nsavestate = \"true\"\nsavestate_features = \"serialized\"\n\n# Firmware / BIOS\nfirmware_count = 6\nfirmware0_desc = \"kick34005.A500 (Amiga 500 BIOS, Kickstart v1.3 Rev. 34.005)\"\nfirmware0_path = \"kick34005.A500\"\nfirmware0_opt = \"false\"\nfirmware1_desc = \"kick40063.A600 (Amiga 600 BIOS, Kickstart v3.1 Rev. 40.063)\"\nfirmware1_path = \"kick40063.A600\"\nfirmware1_opt = \"false\"\nfirmware2_desc = \"kick40068.A1200 (Amiga 1200 BIOS, Kickstart v3.1 Rev. 40.068)\"\nfirmware2_path = \"kick40068.A1200\"\nfirmware2_opt = \"false\"\nfirmware3_desc = \"kick34005.CDTV (Amiga CDTV extended ROM v1.00 Rev. 34.005)\"\nfirmware3_path = \"kick34005.CDTV\"\nfirmware3_opt = \"false\"\nfirmware4_desc = \"kick40060.CD32 (Amiga CD32 BIOS, Kickstart v3.1 Rev. 40.060)\"\nfirmware4_path = \"kick40060.CD32\"\nfirmware4_opt = \"false\"\nfirmware5_desc = \"kick40060.CD32.ext (Amiga CD32 Extended BIOS, CD32 Extended ROM Rev. 40.060)\"\nfirmware5_path = \"kick40060.CD32.ext\"\nfirmware5_opt = \"false\"\n\ndescription = \"An old fork of the uae4arm Amiga emulator, ported to libretro. This core is intended only for use on very weak, low-powered hardware and should only be used in cases where the P-UAE core is not available or cannot maintain full speed.\"\n"
  },
  {
    "path": "packages/sx05re/tools/32bit/emuelec-32bit-libs/infos/vice_x64dtv_libretro.info",
    "content": "# Software Information\ndisplay_name = \"Commodore - C64 (VICE x64dtv, fast)\"\ncategories = \"Emulator\"\nauthors = \"VICE Team\"\ncorename = \"VICE x64dtv\"\nsupported_extensions = \"d64|d71|d80|d81|d82|g64|g41|x64|t64|tap|prg|p00|crt|bin|zip|gz|d6z|d7z|d8z|g6z|g4z|x6z|cmd|m3u|vfl|vsf|nib|nbz|d2m|d4m\"\nlicense = \"GPLv2\"\npermissions = \"\"\ndisplay_version = \"3.5\"\n\n# Hardware Information\nmanufacturer = \"Commodore\"\nsystemname = \"C64\"\nsystemid = \"commodore_c64\"\n\n# Libretro Features\ndatabase = \"Commodore - 64\"\nsupports_no_game = \"true\"\nsavestate = \"true\"\nsavestate_features = \"serialized\"\n\n# Firmware\nfirmware_count = 4\nfirmware0_desc = \"vice/JiffyDOS_C64.bin (JiffyDOS C64 Kernal)\"\nfirmware0_path = \"vice/JiffyDOS_C64.bin\"\nfirmware0_opt = \"true\"\nfirmware1_desc = \"vice/JiffyDOS_1541-II.bin (JiffyDOS 1541 drive BIOS)\"\nfirmware1_path = \"vice/JiffyDOS_1541-II.bin\"\nfirmware1_opt = \"true\"\nfirmware2_desc = \"vice/JiffyDOS_1571_repl310654.bin (JiffyDOS 1571 drive BIOS)\"\nfirmware2_path = \"vice/JiffyDOS_1571_repl310654.bin\"\nfirmware2_opt = \"true\"\nfirmware3_desc = \"vice/JiffyDOS_1581.bin (JiffyDOS 1581 drive BIOS)\"\nfirmware3_path = \"vice/JiffyDOS_1581.bin\"\nfirmware3_opt = \"true\"\nnotes = \"(!) JiffyDOS_C64.bin (md5): be09394f0576cf81fa8bacf634daf9a2|(!) JiffyDOS_1541-II.bin (md5): 1b1e985ea5325a1f46eb7fd9681707bf|(!) JiffyDOS_1571_repl310654.bin (md5): 41c6cc528e9515ffd0ed9b180f8467c0|(!) JiffyDOS_1581.bin (md5): 20b6885c6dc2d42c38754a365b043d71\"\n\ndescription = \"The VICE x64 (fast) Commodore 64 emulator, isolated and ported to libretro. This core features a fairly complete emulation of the VIC-II video chip, with all sprites, registers and video modes emulated in a fully cycle-accurate manner. However, the 'x64sc' core's VIC-II emulation is both cycle-based and pixel-accurate, making it a better choice for devices powerful enough to run it. Both cores include options to switch between the original 'fastSID' sound chip emulation and the slower but much more accurate 'reSID' module.\"\n"
  },
  {
    "path": "packages/sx05re/tools/32bit/emuelec-32bit-libs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"emuelec-32bit-libs\"\nPKG_VERSION=\"8e53ca0df4de3a86f9c7d04952b41f25d3396932\"\nPKG_SHA256=\"1a273909baaf10d5abf28dc18bf60d63662113c66d9d6d316ae463253c5c7e8c\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/emuelec/emuelec-32bit-libs\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES}\"\nPKG_LONGDESC=\"EmuELEC 32-bit libraries, binaries and cores to use with EmuELEC aarch64\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}\nif [[ \"${DEVICE}\" == \"OdroidGoAdvance\" ]] || [[ \"${DEVICE}\" == \"GameForce\" ]]; then\n\tcp -rf ${PKG_BUILD}/OdroidGoAdvance/* ${INSTALL}/\n\t\n\tif [[ \"${DEVICE}\" == \"GameForce\" ]]; then\n\t   cp -rf ${PKG_BUILD}/GameForce/* ${INSTALL}/\n\tfi\n\tcp -rf --remove-destination \"$(get_build_dir mali-bifrost)/libmali.so_rk3326_gbm_arm32_r13p0_with_vulkan_and_cl\" ${INSTALL}/usr/config/emuelec/lib32/libMali.so\t\nelif [[ \"${DEVICE}\" == \"Amlogic-ng\" ]]; then\n    cp -rf ${PKG_BUILD}/Amlogic-ng/* ${INSTALL}/\n    cp -p \"$(get_build_dir opengl-meson)/lib/eabihf/gondul/r12p0/fbdev/libMali.so\" ${INSTALL}/usr/config/emuelec/lib32/libMali.gondul.so\n    cp -p \"$(get_build_dir opengl-meson)/lib/eabihf/dvalin/r12p0/fbdev/libMali.so\" ${INSTALL}/usr/config/emuelec/lib32/libMali.dvalin.so\n    cp -p \"$(get_build_dir opengl-meson)/lib/eabihf/m450/r7p0/fbdev/libMali.so\" ${INSTALL}/usr/config/emuelec/lib32/libMali.m450.so\nelif [[ \"${DEVICE}\" == \"Amlogic-no\" ]]; then\n    cp -rf ${PKG_BUILD}/Amlogic-no/* ${INSTALL}/\n    cp -p \"$(get_build_dir opengl-meson)/lib/eabihf/gondul/r37p0/fbdev/libMali_r1p0.so\" ${INSTALL}/usr/config/emuelec/lib32/libMali.gondul.so\n    cp -p \"$(get_build_dir opengl-meson)/lib/eabihf/dvalin/r37p0/fbdev/libMali.so\" ${INSTALL}/usr/config/emuelec/lib32/libMali.dvalin.so\n    cp -p \"$(get_build_dir opengl-meson)/lib/eabihf/valhall/r41p0/fbdev/libMali.so\" ${INSTALL}/usr/config/emuelec/lib32/libMali.valhall.so\nelif [[ \"${DEVICE}\" == \"Amlogic-old\" ]]; then\n\tcp -rf ${PKG_BUILD}/Amlogic-old/* ${INSTALL}/\n    cp -p \"$(get_build_dir opengl-meson)/lib/eabihf/m450/r7p0/fbdev/libMali.so\" ${INSTALL}/usr/config/emuelec/lib32/libMali.m450.so\nelif [[ \"${DEVICE}\" == \"RK356x\" ]] || [[ \"${DEVICE}\" == \"OdroidM1\" ]]; then\n\tcp -rf ${PKG_BUILD}/RK356x/* ${INSTALL}/\n    cp -rfp --remove-destination \"$(get_build_dir mali-bifrost)/lib/arm-linux-gnueabihf/libmali-bifrost-g52-g2p0-gbm.so\" ${INSTALL}/usr/config/emuelec/lib32/libMali.so\nfi\n\nmkdir -p ${INSTALL}/usr/lib\nln -sf /emuelec/lib32 ${INSTALL}/usr/lib/arm-linux-gnueabihf\nln -sf /emuelec/lib32/ld-linux-armhf.so.3 ${INSTALL}/usr/lib/ld-linux-armhf.so.3\n\nmkdir -p ${INSTALL}/usr/lib/libretro\ncp ${PKG_DIR}/infos/*.info ${INSTALL}/usr/lib/libretro/\n}\n"
  },
  {
    "path": "packages/sx05re/tools/SDL/SDL_net/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n#\n#  OpenELEC is free software: you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation, either version 2 of the License, or\n#  (at your option) any later version.\n#\n#  OpenELEC is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.  If not, see <http://www.gnu.org/licenses/>.\n################################################################################\n\nPKG_NAME=\"SDL_net\"\nPKG_VERSION=\"1.2.8\"\nPKG_SHA256=\"5f4a7a8bb884f793c278ac3f3713be41980c5eedccecff0260411347714facb4\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.libsdl.org/\"\nPKG_URL=\"https://www.libsdl.org/projects/SDL_net/release/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain yasm:host alsa-lib systemd dbus sdl12-compat sdl12-compat:host\"\nPKG_DEPENDS_HOST=\"sdl12-compat:host\"\nPKG_SECTION=\"multimedia\"\nPKG_SHORTDESC=\"This is a small sample cross-platform networking library, with a sample chat client and server application.\"\nPKG_LONGDESC=\"This is a small sample cross-platform networking library, with a sample chat client and server application.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_USE_CMAKE=\"no\"\nPKG_AUTORECONF=\"no\"\n"
  },
  {
    "path": "packages/sx05re/tools/SDL2/SDL2_gfx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"SDL2_gfx\"\nPKG_VERSION=\"29927b386a32ffda432a7058e831b3da62e3d1f9\"\nPKG_SHA256=\"812fe76eec07c2b0b9f2cc3a9393d6b3ddb2a243d8f2c45a227da2adef532b63\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/jjYBdx4IL/SDL2_gfx\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_LONGDESC=\"SDL_image is an image file loading library. \"\nPKG_TOOLCHAIN=\"configure\"\n\npre_configure_target() {\nexport CC=${CC}\n}\nPKG_CONFIGURE_OPTS_TARGET=\" --disable-mmx\"\n\n"
  },
  {
    "path": "packages/sx05re/tools/SDL2/SDL2_image/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 0riginally created by Escalade (https://github.com/escalade)\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n\nPKG_NAME=\"SDL2_image\"\nPKG_VERSION=\"2.8.2\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.libsdl.org/\"\nPKG_URL=\"https://www.libsdl.org/projects/SDL_image/release/SDL2_image-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 libjpeg-turbo libwebp\"\nPKG_LONGDESC=\"SDL_image is an image file loading library. \"\nPKG_TOOLCHAIN=\"cmake-make\"\n\nPKG_CMAKE_OPTS_TARGET=\" -DSDL2IMAGE_WEBP=ON\"\n"
  },
  {
    "path": "packages/sx05re/tools/SDL2/SDL2_mixer/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"SDL2_mixer\"\nPKG_VERSION=\"d79638a1b6ff6563a82b57732ce05ca27cc54338\"\nPKG_GIT_CLONE_BRANCH=\"SDL2\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/libsdl-org/SDL_mixer\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib SDL2 mpg123-compat libvorbis libvorbisidec libogg opusfile libmodplug flac\"\nPKG_LONGDESC=\"An audio mixer that supports various file formats for Simple Directmedia Layer. \"\nPKG_DEPENDS_HOST=\"toolchain:host SDL2:host\"\n\npre_configure_host() {\n  PKG_CMAKE_OPTS_HOST=\"-DSDL2MIXER_OPUS=OFF \\\n                       -DSDL2MIXER_MOD=OFF \\\n                       -DSDL2MIXER_MP3=OFF \\\n                       -DSDL2MIXER_FLAC=OFF \\\n                       -DSDL2MIXER_MIDI=OFF \\\n                       -DSDL2MIXER_VORBIS=OFF \\\n                       -DSDL2MIXER_OGG=OFF \\\n                       -DSDL2MIXER_MOD_XMP=OFF \\\n                       -DSDL2MIXER_WAVPACK=OFF\"\n}\n\npre_configure_target() {\nPKG_CMAKE_OPTS_TARGET=\"-DSDL2MIXER_MIDI_FLUIDSYNTH=OFF \\\n                       -DSDL2MIXER_FLAC=ON \\\n                       -DSDL2MIXER_MOD_MODPLUG=ON \\\n                       -DSDL2MIXER_VORBIS_TREMOR=ON \\\n                       -DSDL2MIXER_OGG=ON \\\n                       -DSDL2MIXER_MP3=ON \\\n                       -DSDL2MIXER_SAMPLES=OFF \\\n                       -DSDL2MIXER_MOD_MODPLUG_SHARED=OFF \\\n                       -DSDL2MIXER_MOD_XMP=OFF \\\n                       -DSDL2MIXER_WAVPACK=OFF\"\n}\n"
  },
  {
    "path": "packages/sx05re/tools/SDL2/SDL2_net/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 0riginally created by Escalade (https://github.com/escalade)\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n\nPKG_NAME=\"SDL2_net\"\nPKG_VERSION=\"2.0.1\"\nPKG_SHA256=\"15ce8a7e5a23dafe8177c8df6e6c79b6749a03fff1e8196742d3571657609d21\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.libsdl.org/projects/SDL_net/\"\nPKG_URL=\"https://www.libsdl.org/projects/SDL_net/release/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_LONGDESC=\"SDL2_net: network library\" \nPKG_DEPENDS_HOST=\"SDL2:host toolchain:host\"\n"
  },
  {
    "path": "packages/sx05re/tools/SDL2/SDL2_ttf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 0riginally created by Escalade (https://github.com/escalade)\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n\nPKG_NAME=\"SDL2_ttf\"\nPKG_VERSION=\"2.0.18\"\nPKG_SHA256=\"7234eb8883514e019e7747c703e4a774575b18d435c22a4a29d068cb768a2251\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.libsdl.org/\"\nPKG_URL=\"https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 freetype\"\nPKG_LONGDESC=\"This is a sample library which allows you to use TrueType fonts in your SDL applications\"\n\nif [ ! \"${DISPLAYSERVER}\" = \"x11\" ]; then\n  X11=\"--without-x\"\nfi\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-freetype-prefix=${SYSROOT_PREFIX}/usr ${X11}\"\n"
  },
  {
    "path": "packages/sx05re/tools/SDL2/SDL2_ttf/patches/SDL2_ttf-001-opengl-only-with-x.patch",
    "content": "--- a/configure\t\t2023-09-23 21:31:10.041141600 +0200\n+++ b/configure\t\t2023-09-23 21:32:57.917914080 +0200\n@@ -19383,48 +19383,10 @@\n             SYS_GL_LIBS=\"$X_LIBS -lGL\"\n         else\n             SYS_GL_LIBS=\"-lGL\"\n+            SYS_GL_LIBS=\"$X_LIBS -lGL -DHAVE_OPENGL\"\n         fi\n         ;;\n esac\n-{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for OpenGL support\" >&5\n-$as_echo_n \"checking for OpenGL support... \" >&6; }\n-have_opengl=no\n-save_LIBS=\"$LIBS\"\n-LIBS=\"$LIBS $SYS_GL_LIBS\"\n-cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n-/* end confdefs.h.  */\n-\n- #include \"SDL_opengl.h\"\n-\n-int\n-main ()\n-{\n-\n- glOrtho( -2.0, 2.0, -2.0, 2.0, -20.0, 20.0 );\n-\n-  ;\n-  return 0;\n-}\n-_ACEOF\n-if ac_fn_c_try_link \"$LINENO\"; then :\n-  have_opengl=yes\n-fi\n-rm -f core conftest.err conftest.$ac_objext \\\n-    conftest$ac_exeext conftest.$ac_ext\n-{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $have_opengl\" >&5\n-$as_echo \"$have_opengl\" >&6; }\n-LIBS=\"$save_LIBS\"\n-if test x$have_opengl = xyes; then\n-    CFLAGS=\"$CFLAGS -DHAVE_OPENGL\"\n-    GL_LIBS=\"$SYS_GL_LIBS\"\n-else\n-    GL_LIBS=\"\"\n-fi\n-\n-\n-\n-\n-\n \n # Finally create all the generated files\n ac_config_files=\"$ac_config_files Makefile SDL2_ttf.spec SDL2_ttf.pc\"\n"
  },
  {
    "path": "packages/sx05re/tools/SDL2/SDL_sound/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 0riginally created by Escalade (https://github.com/escalade)\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n\nPKG_NAME=\"SDL_sound\"\nPKG_VERSION=\"4a8ecd77446d8653c99a673e7896f70a4489b1bb\"\nPKG_SHA256=\"aac0b9a1058fa99e7886c2639bd115c6cd40b3828a438abdfd4744af9d88cdb5\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://www.icculus.org/SDL_sound/\"\nPKG_URL=\"https://github.com/icculus/SDL_sound/archive/${PKG_VERSION}.zip\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib SDL2\"\nPKG_LONGDESC=\"SDL_sound library\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--prefix=/usr \\\n                           --disable-speex \\\n                           --disable-physfs \\\n                           ac_cv_path_SDL2_CONFIG=${SYSROOT_PREFIX}/usr/bin/sdl2-config\"\n\npost_unpack() {\n  touch ${PKG_BUILD}/README\n}\n\npre_configure_target() {\n  export LDFLAGS=\"${LDFLAGS} -lm\"\n}\n\npost_makeinstall_target() {\n  ln -sf ${PKG_ORIG_SYSROOT_PREFIX:-${SYSROOT_PREFIX}}/usr/include/SDL/SDL_sound.h ${PKG_ORIG_SYSROOT_PREFIX:-${SYSROOT_PREFIX}}/usr/include/SDL2/SDL_sound.h\n}\n"
  },
  {
    "path": "packages/sx05re/tools/btop/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2025-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"btop\"\nPKG_VERSION=\"1.4.0\"\nPKG_SHA256=\"ac0d2371bf69d5136de7e9470c6fb286cbee2e16b4c7a6d2cd48a14796e86650\"\nPKG_LICENSE=\"Apache-2.0\"\nPKG_SITE=\"https://github.com/aristocratos/btop\"\nPKG_URL=\"https://github.com/aristocratos/btop/archive/refs/tags/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"btop resource monitor\"\nPKG_TOOLCHAIN=\"auto\"\n\npost_makeinstall_target() {\nmkdir -p ${INSTALL}/usr/config/btop/\n  cat >${INSTALL}/usr/config/btop/btop.conf <<EOF\ndisks_filter = \"/flash /storage /storage/roms\"\nuse_fstab = False\nupdate_ms = 1000\nproc_gradient = False\nEOF\n}\n"
  },
  {
    "path": "packages/sx05re/tools/emuelec-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"emuelec-tools\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"various\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain busybox wget coreutils grep bash\"\nPKG_SHORTDESC=\"EmuELEC tools metapackage\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory busybox) $(get_pkg_directory wget) $(get_pkg_directory grep) $(get_pkg_directory coreutils) $(get_pkg_directory bash)\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_DEPENDS_TARGET+=\" ffmpeg \\\n                      libjpeg-turbo \\\n                      curl \\\n                      common-shaders \\\n                      Skyscraper \\\n                      MC \\\n                      libretro-bash-launcher \\\n                      SDL_GameControllerDB \\\n                      util-linux \\\n                      xmlstarlet \\\n                      sixaxis \\\n                      jslisten \\\n                      evtest \\\n                      mpv \\\n                      poppler \\\n                      bluetool \\\n                      patchelf \\\n                      fbgrab \\\n                      sdljoytest \\\n                      bash \\\n                      pyudev \\\n                      dialog \\\n                      six \\\n                      git \\\n                      dbus-python \\\n                      pygobject \\\n                      coreutils \\\n                      wget \\\n                      TvTextViewer \\\n                      imagemagick \\\n                      htop \\\n                      libevdev \\\n                      gptokeyb \\\n                      exfat \\\n                      351Files \\\n                      box64 \\\n                      iotop \\\n                      usb-modeswitch \\\n                      vim \\\n                      rclone \\\n                      grep \\\n                      eemount \\\n                      dasbus \\\n                      diffutils \\\n                      fbfix \\\n                      munt \\\n                      munt_alsadrv \\\n                      python-uinput \\\n                      python-evdev \\\n                      xow \\\n                      progressor \\\n                      timidity \\\n                      sdlterm \\\n                      btop \\\n                      ee_utils\"\n\nif [ \"${PROJECT}\" == \"Amlogic-ce\" ]; then\n                      PKG_DEPENDS_TARGET+=\" CoreELEC-Debug-Scripts\"\nfi\n\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\t  \n  #we disable some tools that are not working HH\n\tfor discore in xow; do\n\t\tPKG_DEPENDS_TARGET=$(echo ${PKG_DEPENDS_TARGET} | sed \"s|${discore} | |\")\n\tdone\nfi\n\n\npost_install() {\n  rm -f ${INSTALL}/usr/bin/{sort,wget,grep}\n  cp $(get_install_dir wget)/usr/bin/wget ${INSTALL}/usr/bin\n  cp $(get_install_dir coreutils)/usr/bin/sort ${INSTALL}/usr/bin\n  cp $(get_install_dir grep)/usr/bin/grep ${INSTALL}/usr/bin\n  ln -sf /usr/bin/bash ${INSTALL}/usr/bin/sh\n  find ${INSTALL}/usr/ -type f -iname \"*.sh\" -exec chmod +x {} \\;\n}\n\n\n"
  },
  {
    "path": "packages/sx05re/tools/qt-everywhere/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"qt-everywhere\"\nPKG_VERSION=\"5.15.0\"\nPKG_SHA256=\"22b63d7a7a45183865cc4141124f12b673e7a17b1fe2b91e433f6547c5d548c3\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://qt-project.org\"\nPKG_URL=\"http://download.qt.io/archive/qt/${PKG_VERSION::-2}/${PKG_VERSION}/single/${PKG_NAME}-src-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"pcre2 zlib openssl\"\nPKG_SOURCE_DIR=\"${PKG_NAME}-src-${PKG_VERSION}\"\nPKG_LONGDESC=\"A cross-platform application and UI framework\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"-prefix /usr\n                           -sysroot \"${SYSROOT_PREFIX}\"\n                           -hostprefix \"${TOOLCHAIN}\"\n                           -device linux-libreelec-g++\n                           -opensource -confirm-license\n                           -release\n                           -static\n                           -make libs\n                           -force-pkg-config\n                           -openssl-linked\n                           -no-accessibility\n                           -qt-sqlite\n                           -no-sql-mysql\n                           -system-zlib\n                           -no-mtdev\n                           -qt-libjpeg\n                           -qt-libpng\n                           -no-harfbuzz\n                           -no-libproxy\n                           -system-pcre\n                           -no-glib\n                           -silent\n                           -no-cups\n                           -no-iconv\n                           -no-evdev\n                           -no-tslib\n                           -no-icu\n                           -no-strip\n                           -no-fontconfig\n                           -no-dbus\n                           -no-opengl\n                           -no-libudev\n                           -no-libinput\n                           -no-eglfs\n                           -skip qt3d\n                           -skip qtactiveqt\n                           -skip qtandroidextras\n                           -skip qtcanvas3d\n                           -skip qtconnectivity\n                           -skip qtdeclarative\n                           -skip qtdoc\n                           -skip qtgraphicaleffects\n                           -skip qtimageformats\n                           -skip qtlocation\n                           -skip qtmacextras\n                           -skip qtmultimedia\n                           -skip qtquickcontrols\n                           -skip qtquickcontrols2\n                           -skip qtscript\n                           -skip qtsensors\n                           -skip qtserialbus\n                           -skip qtsvg\n                           -skip qttranslations\n                           -skip qtwayland\n                           -skip qtwebchannel\n                           -skip qtwebengine\n                           -skip qtwebsockets\n                           -skip qtwebview\n                           -skip qtwinextras\n                           -skip qtx11extras\n                           -skip qtxmlpatterns\"\n\nconfigure_target() {\n  QMAKE_CONF_DIR=\"qtbase/mkspecs/devices/linux-libreelec-g++\"\n\n  cd ..\n  mkdir -p ${QMAKE_CONF_DIR}\n\n  cat >\"${QMAKE_CONF_DIR}/qmake.conf\" <<EOF\nMAKEFILE_GENERATOR      = UNIX\nCONFIG                 += incremental\nQMAKE_INCREMENTAL_STYLE = sublib\ninclude(../../common/linux.conf)\ninclude(../../common/gcc-base-unix.conf)\ninclude(../../common/g++-unix.conf)\nload(device_config)\nQMAKE_CC         = ${CC}\nQMAKE_CXX        = ${CXX}\nQMAKE_LINK       = ${CXX}\nQMAKE_LINK_SHLIB = ${CXX}\nQMAKE_AR         = ${AR} cqs\nQMAKE_OBJCOPY    = ${OBJCOPY}\nQMAKE_NM         = ${NM} -P\nQMAKE_STRIP      = ${STRIP}\nQMAKE_CFLAGS     = ${CFLAGS}\nQMAKE_CXXFLAGS   = ${CXXFLAGS}\nQMAKE_LFLAGS     = ${LDFLAGS}\nload(qt_config)\nEOF\n\n  cat >\"${QMAKE_CONF_DIR}/qplatformdefs.h\" <<EOF\n#include \"../../linux-g++/qplatformdefs.h\"\nEOF\n\n  unset CC CXX LD RANLIB AR AS CPPFLAGS CFLAGS LDFLAGS CXXFLAGS\n  ./configure ${PKG_CONFIGURE_OPTS_TARGET}\n}\n\npost_makeinstall_target() {\n  # Qt installs directly to ${SYSROOT_PREFIX} so don't rely on scripts/build fixing this up\n  # PKG_ORIG_SYSROOT_PREFIX will be undefined when performing a legacy build\n  sed -e \"s:\\(['= ]\\)/usr:\\\\1${PKG_ORIG_SYSROOT_PREFIX:-${SYSROOT_PREFIX}}/usr:g\" -i \"${PKG_ORIG_SYSROOT_PREFIX:-${SYSROOT_PREFIX}}/usr/lib\"/libQt*.la\n}\n"
  },
  {
    "path": "packages/sx05re/tools/qt-everywhere/patches/qt-everywhere-5.15.0.GCC11-limits.patch",
    "content": "--- a/qtbase/src/corelib/global/qfloat16.h\n+++ b/qtbase/src/corelib/global/qfloat16.h\n@@ -44,6 +44,8 @@\n #include <QtCore/qglobal.h>\n #include <QtCore/qmetatype.h>\n #include <string.h>\n+#include <stdexcept>\n+#include <limits>\n \n #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)\n // All processors that support AVX2 do support F16C too. That doesn't mean\n\n--- a/qtbase/src/corelib/text/qbytearraymatcher.h\n+++ b/qtbase/src/corelib/text/qbytearraymatcher.h\n@@ -41,7 +41,8 @@\n #define QBYTEARRAYMATCHER_H\n \n #include <QtCore/qbytearray.h>\n-\n+#include <stdexcept>\n+#include <limits>\n QT_BEGIN_NAMESPACE\n \n"
  },
  {
    "path": "packages/sx05re/tools/scrapers/Skyscraper/config/artwork.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<artwork>\n  <output type=\"screenshot\" width=\"640\" height=\"480\">\n    <layer resource=\"screenshot\" x=\"20\" width=\"520\" height=\"390\" align=\"center\" valign=\"middle\">\n      <rounded radius=\"10\"/>\n      <stroke width=\"5\"/>\n    </layer>\n    <layer resource=\"cover\" height=\"250\" x=\"0\" y=\"-10\" valign=\"bottom\">\n      <gamebox side=\"wheel\" rotate=\"90\"/>\n      <shadow distance=\"5\" softness=\"5\" opacity=\"70\"/>\n    </layer>\n    <layer resource=\"wheel\" width=\"250\" x=\"-10\" align=\"right\">\n      <shadow distance=\"5\" softness=\"5\" opacity=\"70\"/>\n    </layer>\n  </output>\n</artwork>\n"
  },
  {
    "path": "packages/sx05re/tools/scrapers/Skyscraper/config/config.ini",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n[main]\ninputFolder=\"/storage/roms\"\ngamelistFolder=\"/storage/roms\"\nvideos=\"true\"\nsymlink=\"false\"\nbrackets=\"true\"\nmaxLength=\"10000\"\nunattend=\"true\"\nverbosity=\"0\"\nhints=\"false\"\n\n# List of supported languages https://github.com/muldjord/skyscraper/blob/master/docs/LANGUAGES.md\n# List of supported regions https://github.com/muldjord/skyscraper/blob/master/docs/REGIONS.md\nlang=\"en\"\nlangPrios=\"en,es,ja,de,fr,it\"\nregion=\"us\"\nregionPrios=\"us,es,jp,eu,de,fr,it,wor\"\n\n[screenscraper]\nuserCreds=\"Username:Pass\"\n\n"
  },
  {
    "path": "packages/sx05re/tools/scrapers/Skyscraper/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"Skyscraper\"\nPKG_VERSION=\"03d8d657d1ea3dfc5d3b1047922b76971bdf5ff5\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/muldjord/skyscraper\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain qt-everywhere p7zip:host\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"emuelec\"\nPKG_SHORTDESC=\"Powerful and versatile game scraper written in c++ \"\nPKG_TOOLCHAIN=\"make\"\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"no\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"make\" \n\nconfigure_target() {\n  # Fix install paths / 5schatten\n  sed -e \"s#target.path=/usr/local/bin#target.path=${INSTALL}/usr/bin#\"                                                       -i ${PKG_BUILD}/skyscraper.pro\n  sed -e \"s#examples.path=/usr/local/etc/skyscraper#examples.path=${INSTALL}/usr/share/skyscraper#\"                           -i ${PKG_BUILD}/skyscraper.pro\n  sed -e \"s#cacheexamples.path=/usr/local/etc/skyscraper/cache#cacheexamples.path=${INSTALL}/usr/share/skyscraper/cache#\"     -i ${PKG_BUILD}/skyscraper.pro\n  sed -e \"s#impexamples.path=/usr/local/etc/skyscraper/import#impexamples.path=${INSTALL}/usr/share/skyscraper/import#\"       -i ${PKG_BUILD}/skyscraper.pro\n  sed -e \"s#resexamples.path=/usr/local/etc/skyscraper/resources#resexamples.path=${INSTALL}/usr/share/skyscraper/resources#\" -i ${PKG_BUILD}/skyscraper.pro\n\n  rm -rf .qmake.stash\n  QMAKEPATH=\"$(get_build_dir qt-everywhere)/qtbase/bin/qmake\"\n  ${QMAKEPATH} ${PKG_BUILD}/skyscraper.pro\n}\n\npost_makeinstall_target() {\n  # Install scripts \n  cp ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin/\n\n  # Install config\n  mkdir -p ${INSTALL}/usr/config/skyscraper\n  cp ${PKG_DIR}/config/* ${INSTALL}/usr/config/skyscraper/\n}\n\n"
  },
  {
    "path": "packages/sx05re/tools/scrapers/Skyscraper/scripts/skyscraper",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n\n. /etc/profile\n\n# Set common paths\nSKYSCRAPER_HOME_CONFIG=/storage/.config/skyscraper\nSKYSCRAPER_HOME=/storage/.skyscraper\n\n# create link to config directory\nif [ ! -L ${SKYSCRAPER_HOME} ]; then\n  cp -r ${SKYSCRAPER_HOME}/* ${SKYSCRAPER_HOME_CONFIG}/\n  rm -rf ${SKYSCRAPER_HOME}\n  ln -s ${SKYSCRAPER_HOME_CONFIG} ${SKYSCRAPER_HOME}\nfi\n\nSkyscraper \"$@\"\n\n\n"
  },
  {
    "path": "packages/sx05re/tools/sdl12-compat/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"sdl12-compat\"\nPKG_VERSION=\"189f8f0741efdb7d6ff8308f64e5f23365d97a94\"\nPKG_SHA256=\"f2c8f8e364999f9284090d4a23276a2e927a75d89c13917f126710891312f792\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libsdl-org/sdl12-compat\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib systemd dbus SDL2\"\nPKG_DEPENDS_HOST=\"SDL2:host yasm:host\"\nPKG_SECTION=\"multimedia\"\nPKG_SHORTDESC=\"SDL: A cross-platform Graphic API\"\nPKG_LONGDESC=\"An SDL-1.2 compatibility layer that uses SDL 2.0 behind the scenes. \"\n\npre_configure_target() {\nPKG_CMAKE_OPTS_TARGET+=\" -DSDL12TESTS=off\"\n}\n\npre_configure_host() {\nPKG_CMAKE_OPTS_HOST+=\" -DSDL12TESTS=off\"\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sdl12-compat/patches/fix-pkgconfig.patch",
    "content": "--- a/CMakeLists.txt\r\n+++ b/CMakeLists.txt\r\n@@ -222,6 +222,10 @@\r\n     install(FILES ${CMAKE_BINARY_DIR}/sdl12_compat.pc\r\n       DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig\r\n     )\r\n+    configure_file(sdl.pc.in sdl.pc @ONLY)\r\n+    install(FILES ${CMAKE_BINARY_DIR}/sdl.pc\r\n+      DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig\r\n+    )\r\n \r\n     configure_file(\"${CMAKE_SOURCE_DIR}/sdl-config.in\" \"${CMAKE_BINARY_DIR}/sdl-config\" @ONLY)\r\n     install(PROGRAMS \"${CMAKE_BINARY_DIR}/sdl-config\" DESTINATION bin)\r\n\r\n--- <unnamed>\r\n+++ b/sdl.pc.in\r\n@@ -0,0 +1,14 @@\r\n+# sdl12_compat pkg-config source file\r\n+\r\n+prefix=@CMAKE_INSTALL_PREFIX@\r\n+exec_prefix=${prefix}\r\n+libdir=@CMAKE_INSTALL_FULL_LIBDIR@\r\n+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@\r\n+\r\n+Name: sdl12_compat\r\n+Description: An SDL-1.2 compatibility layer that uses SDL 2.0 behind the scenes.\r\n+Version: @SDL_VERSION@\r\n+Provides: sdl = @SDL_VERSION@\r\n+Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@\r\n+Libs.private: -L${libdir} @SDL_LIBS@ @SDL_STATIC_LIBS@\r\n+Cflags: -I${includedir}/SDL @SDL_CFLAGS@\r\n"
  },
  {
    "path": "packages/sx05re/tools/sdl12-compat/patches/fix-sdlconfig.patch",
    "content": "--- a/sdl-config.in\t2021-06-11 17:12:20.442391000 -0400\r\n+++ b/sdl-config.in\t2021-06-11 17:12:32.558391405 -0400\r\n@@ -7,11 +7,11 @@\r\n \r\n # Copied and modified from SDL2's sdl2-compat.\r\n \r\n-prefix=@CMAKE_INSTALL_PREFIX@\r\n+prefix=@CMAKE_SYSROOT@@CMAKE_INSTALL_PREFIX@\r\n exec_prefix=${prefix}\r\n exec_prefix_set=no\r\n-libdir=@CMAKE_INSTALL_FULL_LIBDIR@\r\n-includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@\r\n+libdir=${prefix}/lib\r\n+includedir=${prefix}/include\r\n \r\n @ENABLE_STATIC_FALSE@usage=\"\\\r\n @ENABLE_STATIC_FALSE@Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]\"\r\n"
  },
  {
    "path": "packages/sx05re/tools/sound/espeak/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"espeak\"\nPKG_VERSION=\"1.48.04-source\"\nPKG_SHA256=\"bf9a17673adffcc28ff7ea18764f06136547e97bbd9edf2ec612f09b207f0659\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://espeak.sourceforge.net/\"\nPKG_URL=\"http://sourceforge.net/projects/espeak/files/espeak/espeak-1.48/$PKG_NAME-$PKG_VERSION.zip\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Text to Speech engine for English, with support for other languages\"\nPKG_TOOLCHAIN=\"manual\"\n\nREALSYSROOT=${SYSROOT_PREFIX}\n\npre_make_target() {\n  cp src/portaudio19.h src/portaudio.h\n}\n\nmake_target() {\n  make -C src \\\n       CXXFLAGS=\"$CXXFLAGS\" \\\n       LDFLAGS=\"$LDFLAGS\" \\\n       AUDIO=\"\"\n}\n\nmakeinstall_target() {\n  make -C src \\\n       CXXFLAGS=\"$CXXFLAGS\" \\\n       LDFLAGS=\"$LDFLAGS\" \\\n       AUDIO=\"\" \\\n       DESTDIR=$INSTALL install\n}\n\npost_makeinstall_target() {\n\tmkdir -p ${REALSYSROOT}/usr/include/espeak\n\tcp ${INSTALL}/usr/lib/* ${REALSYSROOT}/usr/lib/\n\tcp ${PKG_BUILD}/src/speak_lib.h ${REALSYSROOT}/usr/include/espeak\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sound/espeak/patches/espeak-1.47-ftbs-ld-libm.patch",
    "content": "diff --git a/src/Makefile b/src/Makefile\nindex f04b4c4..b8d4b19 100644\n--- a/src/Makefile\n+++ b/src/Makefile\n@@ -83,15 +83,15 @@ libespeak_SOURCES = speak_lib.cpp compiledict.cpp dictionary.cpp intonation.cpp\n \n SRCS1=$(speak_SOURCES)\n OBJS1=$(patsubst %.cpp,%.o,$(SRCS1))\n-LIBS1=-lstdc++ $(LIB_AUDIO) -lpthread $(EXTRA_LIBS)\n+LIBS1=-lstdc++ -lm $(LIB_AUDIO) -lpthread $(EXTRA_LIBS)\n \n SRCS2=$(libespeak_SOURCES)\n OBJS2=$(patsubst %.cpp,x_%.o,$(SRCS2))\n-LIBS2=-lstdc++ $(LIB_AUDIO) -lpthread\n+LIBS2=-lstdc++ -lm $(LIB_AUDIO) -lpthread\n \n SRCS3 = espeak.cpp\n OBJS3=$(patsubst %.cpp,%.o,$(SRCS3))\n-LIBS3=-lstdc++ -L . -lespeak\n+LIBS3=-lstdc++ -lm -L . -lespeak\n \n CXXFLAGS=-O2\n \n"
  },
  {
    "path": "packages/sx05re/tools/sound/espeak/patches/espeak-1.47-wav-close.patch",
    "content": "diff --git a/src/espeak.cpp b/src/espeak.cpp\nindex 00f93c1..4ad42e8 100644\n--- a/src/espeak.cpp\n+++ b/src/espeak.cpp\n@@ -281,10 +281,7 @@ static int SynthCallback(short *wav, int numsamples, espeak_EVENT *events)\n \tif(quiet) return(0);  // -q quiet mode\n \n \tif(wav == NULL)\n-\t{\n-\t\tCloseWavFile();\n \t\treturn(0);\n-\t}\n \n \twhile(events->type != 0)\n \t{\n@@ -805,5 +802,7 @@ int main (int argc, char **argv)\n \n \tif(f_phonemes_out != stdout)\n \t\tfclose(f_phonemes_out);  // needed for WinCE\n+\tCloseWavFile();\n+\tespeak_Terminate();\n \treturn(0);\n }\n"
  },
  {
    "path": "packages/sx05re/tools/sound/espeak/patches/espeak-1.48-gcc-6-fix.patch",
    "content": "diff --git a/src/tr_languages.cpp b/src/tr_languages.cpp\n--- a/src/tr_languages.cpp\n+++ b/src/tr_languages.cpp\n@@ -198,7 +198,7 @@ static const unsigned short chars_ignore_zwnj_hyphen[] = {\n \t0x200d,  1, // zero width joiner\n \t0, 0 };\n \n-const char string_ordinal[] = {0xc2,0xba,0};  // masculine ordinal character, UTF-8\n+const char string_ordinal[] = {'\\xc2','\\xba',0};  // masculine ordinal character, UTF-8\n \n \n static Translator* NewTranslator(void)\n"
  },
  {
    "path": "packages/sx05re/tools/sound/fluidsynth-git/config/fluidsynth.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)\n\nSOUND_FONT=/storage/.config/fluidsynth/soundfonts/GeneralUser.sf2\nAUDIO_DRIVER=pulseaudio\nMIDI_DRIVER=alsa_seq\nPORT_NAME=FluidSynth\nOTHER_OPTS='-r 48000'\n"
  },
  {
    "path": "packages/sx05re/tools/sound/fluidsynth-git/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)\n\nPKG_NAME=\"fluidsynth-git\"\nPKG_VERSION=\"2.0.6\"\nPKG_SHA256=\"e97e63c1045e102465f1aa848f9d712c5528c58685b8d40062e4aaf6af7edb75\"\nPKG_LICENSE=\"LGPL\"\nPKG_SITE=\"http://fluidsynth.org/\"\nPKG_URL=\"https://github.com/FluidSynth/fluidsynth/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain glib soundfont-generaluser\"\nPKG_LONGDESC=\"FluidSynth is a software real-time synthesizer based on the Soundfont 2 specifications.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\npre_configure_target() {\n  PKG_CMAKE_OPTS_TARGET=\"-DLIB_SUFFIX= \\\n                         -Denable-readline=0 \\\n                         -Denable-oss=0 \\\n                         -Denable-pulseaudio=1 \\\n                         -Denable-libsndfile=0\"\n}\n\npost_makeinstall_target() {\n  # Create directories\n  mkdir -p ${INSTALL}/etc/fluidsynth\n  mkdir -p ${INSTALL}/usr/config/fluidsynth/soundfonts\n\n  # Create symlinks & install config file\n  cp -a ${PKG_DIR}/config/* ${INSTALL}/usr/config/fluidsynth/\n  ln -s /storage/.config/fluidsynth/fluidsynth.conf ${INSTALL}/etc/fluidsynth/\n  echo \"Place your SoundFonts here!\" >> ${INSTALL}/usr/config/fluidsynth/soundfonts/readme.txt\n\n  # Create symlink to SoundFont\n  ln -s /usr/share/soundfonts/GeneralUser.sf2  ${INSTALL}/usr/config/fluidsynth/soundfonts/\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sound/fluidsynth-git/system.d/fluidsynth.service",
    "content": "[Unit]\nDescription=FluidSynth Software Synthesizer Daemon\nAfter=sound.target\n\n[Service]\nEnvironmentFile=/etc/fluidsynth/fluidsynth.conf\nExecStart=/usr/bin/fluidsynth -is -a $AUDIO_DRIVER -m $MIDI_DRIVER -p $PORT_NAME $OTHER_OPTS $SOUND_FONT\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/sx05re/tools/sound/libvorbisidec/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"libvorbisidec\"\nPKG_VERSION=\"a76e41f6ece93d10deac5f9ef3a84dce5b9c2a84\"\nPKG_SHA256=\"54c4cfaf442885575261d7b310b2dfa79e4fbf095aaf34de07875b024e499991\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/sezero/tremor\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libogg freetype\"\nPKG_LONGDESC=\"libvorbisidec\"\nPKG_TOOLCHAIN=\"make\"\n\n\nmake_target() {\ncd ${PKG_BUILD}\n./autogen.sh HAVE_OGG=no --disable-mmx --prefix=/usr --datadir=/usr/share/ --datarootdir=/usr/share/ --host=armv8a-libreelec-linux --enable-fb --enable-freetype --with-freetype-prefix=${SYSROOT_PREFIX}/usr/ --enable-slang\nmake \n}\n"
  },
  {
    "path": "packages/sx05re/tools/sound/modplug/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"libmodplug\"\nPKG_VERSION=\"a35e253001b1bc9046b7955d0871f841f88f993b\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"public domain\"\nPKG_SITE=\"https://gitlab.com/solarus-games/libmodplug\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\"Modplug Plugin for XMMS v2.0 / libmodplug v0.8.5\"\nGET_HANDLER_SUPPORT=\"git\"\n"
  },
  {
    "path": "packages/sx05re/tools/sound/mpg123-compat/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n\nPKG_NAME=\"mpg123-compat\"\nPKG_VERSION=\"1.28.2\"\nPKG_SHA256=\"7eefd4b68fdac7e138d04c37efe12155a8ebf25a5bccf0fb7e775af22d21db00\"\nPKG_LICENSE=\"LGPLv2\"\nPKG_SITE=\"http://www.mpg123.org/\"\nPKG_URL=\"http://downloads.sourceforge.net/sourceforge/mpg123/mpg123-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib SDL2\"\nPKG_LONGDESC=\"A console based real time MPEG Audio Player for Layer 1, 2 and 3.\"\nPKG_BUILD_FLAGS=\"-fpic\"\n\nif [ \"${PULSEAUDIO_SUPPORT}\" = yes ]; then\n  PKG_DEPENDS_TARGET=\"${PKG_DEPENDS_TARGET} pulseaudio\"\n  PKG_CONFIGURE_OPTS_TARGET=\"--with-default-audio=pulse --with-audio=alsa,pulse\"\nelse\n  PKG_CONFIGURE_OPTS_TARGET=\"--with-default-audio=alsa --with-audio=alsa\"\nfi\n"
  },
  {
    "path": "packages/sx05re/tools/sound/opusfile/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"opusfile\"\nPKG_VERSION=\"58b229a\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/xiph/opusfile\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain openssl opus libogg\"\nPKG_PRIORITY=\"optional\"\nPKG_SHORTDESC=\"Stand-alone decoder library for .opus streams\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"configure\"\n\npre_configure_target() {\n  ${PKG_BUILD}/autogen.sh\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sound/soundfont-generaluser/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n\nPKG_NAME=\"soundfont-generaluser\"\nPKG_VERSION=\"1.471\"\nPKG_SHA256=\"4203835164766f428c4926c097c9ea58dae431c7fb8f9dbe277b92d80da45ec2\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.schristiancollins.com/generaluser.php\"\nPKG_URL=\"https://www.dropbox.com/s/4x27l49kxcwamp5/GeneralUser_GS_${PKG_VERSION}.zip\"\nPKG_SOURCE_DIR=\"GeneralUser*\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"GeneralUser GS is a GM and GS compatible SoundFont bank for composing, playing MIDI files, and retro gaming.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/soundfonts\n  cp GeneralUser*${PKG_VERSION}.sf2 ${INSTALL}/usr/share/soundfonts/GeneralUser.sf2\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sound/timidity/config/GeneralUser.cfg",
    "content": "dir /storage/.config/fluidsynth/soundfonts/\n\nbank 0\n0 %font \"GeneralUser.sf2\" 0 0 amp=52 pan=0\n1 %font \"GeneralUser.sf2\" 0 1 amp=84 pan=0\n2 %font \"GeneralUser.sf2\" 0 2 amp=51 pan=0\n3 %font \"GeneralUser.sf2\" 0 3 amp=139 pan=0\n4 %font \"GeneralUser.sf2\" 0 4 amp=79 pan=0\n5 %font \"GeneralUser.sf2\" 0 5 amp=102 pan=0\n6 %font \"GeneralUser.sf2\" 0 6 amp=50 pan=0\n7 %font \"GeneralUser.sf2\" 0 7 amp=103 pan=0\n8 %font \"GeneralUser.sf2\" 0 8 amp=127 pan=0\n9 %font \"GeneralUser.sf2\" 0 9 amp=214 pan=0\n10 %font \"GeneralUser.sf2\" 0 10 amp=207 pan=0\n11 %font \"GeneralUser.sf2\" 0 11 amp=39 pan=0\n12 %font \"GeneralUser.sf2\" 0 12 amp=143 pan=0\n13 %font \"GeneralUser.sf2\" 0 13 amp=101 pan=0\n14 %font \"GeneralUser.sf2\" 0 14 amp=77 pan=0\n15 %font \"GeneralUser.sf2\" 0 15 amp=134 pan=0\n16 %font \"GeneralUser.sf2\" 0 16 amp=119 pan=0\n17 %font \"GeneralUser.sf2\" 0 17 amp=112 pan=0\n18 %font \"GeneralUser.sf2\" 0 18 amp=93 pan=0\n19 %font \"GeneralUser.sf2\" 0 19 amp=201 pan=0\n20 %font \"GeneralUser.sf2\" 0 20 amp=86 pan=0\n21 %font \"GeneralUser.sf2\" 0 21 amp=59 pan=0\n22 %font \"GeneralUser.sf2\" 0 22 amp=51 pan=0\n23 %font \"GeneralUser.sf2\" 0 23 amp=42 pan=0\n24 %font \"GeneralUser.sf2\" 0 24 amp=130 pan=0\n25 %font \"GeneralUser.sf2\" 0 25 amp=65 pan=0\n26 %font \"GeneralUser.sf2\" 0 26 amp=193 pan=0\n27 %font \"GeneralUser.sf2\" 0 27 amp=110 pan=0\n28 %font \"GeneralUser.sf2\" 0 28 amp=187 pan=0\n29 %font \"GeneralUser.sf2\" 0 29 amp=124 pan=0\n30 %font \"GeneralUser.sf2\" 0 30 amp=154 pan=0\n31 %font \"GeneralUser.sf2\" 0 31 amp=94 pan=0\n32 %font \"GeneralUser.sf2\" 0 32 amp=231 pan=0\n33 %font \"GeneralUser.sf2\" 0 33 amp=112 pan=0\n34 %font \"GeneralUser.sf2\" 0 34 amp=441 pan=0\n35 %font \"GeneralUser.sf2\" 0 35 amp=147 pan=0\n36 %font \"GeneralUser.sf2\" 0 36 amp=342 pan=0\n37 %font \"GeneralUser.sf2\" 0 37 amp=110 pan=0\n38 %font \"GeneralUser.sf2\" 0 38 amp=51 pan=0\n39 %font \"GeneralUser.sf2\" 0 39 amp=186 pan=0\n40 %font \"GeneralUser.sf2\" 0 40 amp=115 pan=0\n41 %font \"GeneralUser.sf2\" 0 41 amp=190 pan=0\n42 %font \"GeneralUser.sf2\" 0 42 amp=53 pan=0\n43 %font \"GeneralUser.sf2\" 0 43 amp=89 pan=0\n44 %font \"GeneralUser.sf2\" 0 44 amp=147 pan=0\n45 %font \"GeneralUser.sf2\" 0 45 amp=381 pan=0\n46 %font \"GeneralUser.sf2\" 0 46 amp=160 pan=0\n47 %font \"GeneralUser.sf2\" 0 47 amp=138 pan=0\n48 %font \"GeneralUser.sf2\" 0 48 amp=127 pan=0\n49 %font \"GeneralUser.sf2\" 0 49 amp=127 pan=0\n50 %font \"GeneralUser.sf2\" 0 50 amp=72 pan=0\n51 %font \"GeneralUser.sf2\" 0 51 amp=45 pan=0\n52 %font \"GeneralUser.sf2\" 0 52 amp=64 pan=0\n53 %font \"GeneralUser.sf2\" 0 53 amp=68 pan=0\n54 %font \"GeneralUser.sf2\" 0 54 amp=168 pan=0\n55 %font \"GeneralUser.sf2\" 0 55 amp=102 pan=0\n56 %font \"GeneralUser.sf2\" 0 56 amp=112 pan=0\n57 %font \"GeneralUser.sf2\" 0 57 amp=132 pan=0\n58 %font \"GeneralUser.sf2\" 0 58 amp=107 pan=0\n59 %font \"GeneralUser.sf2\" 0 59 amp=63 pan=0\n60 %font \"GeneralUser.sf2\" 0 60 amp=120 pan=0\n61 %font \"GeneralUser.sf2\" 0 61 amp=168 pan=0\n62 %font \"GeneralUser.sf2\" 0 62 amp=45 pan=0\n63 %font \"GeneralUser.sf2\" 0 63 amp=47 pan=0\n64 %font \"GeneralUser.sf2\" 0 64 amp=90 pan=0\n65 %font \"GeneralUser.sf2\" 0 65 amp=117 pan=0\n66 %font \"GeneralUser.sf2\" 0 66 amp=105 pan=0\n67 %font \"GeneralUser.sf2\" 0 67 amp=73 pan=0\n68 %font \"GeneralUser.sf2\" 0 68 amp=110 pan=0\n69 %font \"GeneralUser.sf2\" 0 69 amp=134 pan=0\n70 %font \"GeneralUser.sf2\" 0 70 amp=92 pan=0\n71 %font \"GeneralUser.sf2\" 0 71 amp=94 pan=0\n72 %font \"GeneralUser.sf2\" 0 72 amp=58 pan=0\n73 %font \"GeneralUser.sf2\" 0 73 amp=144 pan=0\n74 %font \"GeneralUser.sf2\" 0 74 amp=129 pan=0\n75 %font \"GeneralUser.sf2\" 0 75 amp=79 pan=0\n76 %font \"GeneralUser.sf2\" 0 76 amp=87 pan=0\n77 %font \"GeneralUser.sf2\" 0 77 amp=114 pan=0\n78 %font \"GeneralUser.sf2\" 0 78 amp=316 pan=0\n79 %font \"GeneralUser.sf2\" 0 79 amp=164 pan=0\n80 %font \"GeneralUser.sf2\" 0 80 amp=22 pan=0\n81 %font \"GeneralUser.sf2\" 0 81 amp=41 pan=0\n82 %font \"GeneralUser.sf2\" 0 82 amp=55 pan=0\n83 %font \"GeneralUser.sf2\" 0 83 amp=79 pan=0\n84 %font \"GeneralUser.sf2\" 0 84 amp=140 pan=0\n85 %font \"GeneralUser.sf2\" 0 85 amp=79 pan=0\n86 %font \"GeneralUser.sf2\" 0 86 amp=84 pan=0\n87 %font \"GeneralUser.sf2\" 0 87 amp=105 pan=0\n88 %font \"GeneralUser.sf2\" 0 88 amp=165 pan=0\n89 %font \"GeneralUser.sf2\" 0 89 amp=203 pan=0\n90 %font \"GeneralUser.sf2\" 0 90 amp=80 pan=0\n91 %font \"GeneralUser.sf2\" 0 91 amp=88 pan=0\n92 %font \"GeneralUser.sf2\" 0 92 amp=168 pan=0\n93 %font \"GeneralUser.sf2\" 0 93 amp=123 pan=0\n94 %font \"GeneralUser.sf2\" 0 94 amp=69 pan=0\n95 %font \"GeneralUser.sf2\" 0 95 amp=89 pan=0\n96 %font \"GeneralUser.sf2\" 0 96 amp=77 pan=0\n97 %font \"GeneralUser.sf2\" 0 97 amp=78 pan=0\n98 %font \"GeneralUser.sf2\" 0 98 amp=74 pan=0\n99 %font \"GeneralUser.sf2\" 0 99 amp=115 pan=0\n100 %font \"GeneralUser.sf2\" 0 100 amp=109 pan=0\n101 %font \"GeneralUser.sf2\" 0 101 amp=67 pan=0\n102 %font \"GeneralUser.sf2\" 0 102 amp=71 pan=0\n103 %font \"GeneralUser.sf2\" 0 103 amp=99 pan=0\n104 %font \"GeneralUser.sf2\" 0 104 amp=126 pan=0\n105 %font \"GeneralUser.sf2\" 0 105 amp=118 pan=0\n106 %font \"GeneralUser.sf2\" 0 106 amp=185 pan=0\n107 %font \"GeneralUser.sf2\" 0 107 amp=203 pan=0\n108 %font \"GeneralUser.sf2\" 0 108 amp=62 pan=0\n109 %font \"GeneralUser.sf2\" 0 109 amp=72 pan=0\n110 %font \"GeneralUser.sf2\" 0 110 amp=143 pan=0\n111 %font \"GeneralUser.sf2\" 0 111 amp=93 pan=0\n112 %font \"GeneralUser.sf2\" 0 112 amp=126 pan=0\n113 %font \"GeneralUser.sf2\" 0 113 amp=154 pan=0\n114 %font \"GeneralUser.sf2\" 0 114 amp=91 pan=0\n115 %font \"GeneralUser.sf2\" 0 115 amp=119 pan=0\n116 %font \"GeneralUser.sf2\" 0 116 amp=99 pan=0\n117 %font \"GeneralUser.sf2\" 0 117 amp=132 pan=0\n118 %font \"GeneralUser.sf2\" 0 118 amp=125 pan=0\n119 %font \"GeneralUser.sf2\" 0 119 amp=82 pan=0\n120 %font \"GeneralUser.sf2\" 0 120 amp=68 pan=0\n121 %font \"GeneralUser.sf2\" 0 121 amp=77 pan=0\n122 %font \"GeneralUser.sf2\" 0 122 amp=77 pan=0\n123 %font \"GeneralUser.sf2\" 0 123 amp=74 pan=0\n124 %font \"GeneralUser.sf2\" 0 124 amp=57 pan=0\n125 %font \"GeneralUser.sf2\" 0 125 amp=211 pan=0\n126 %font \"GeneralUser.sf2\" 0 126 amp=40 pan=0\n127 %font \"GeneralUser.sf2\" 0 127 amp=149 pan=0\n\nbank 1\n38 %font \"GeneralUser.sf2\" 1 38 amp=103 pan=0\n44 %font \"GeneralUser.sf2\" 1 44 amp=142 pan=0\n48 %font \"GeneralUser.sf2\" 1 48 amp=119 pan=0\n49 %font \"GeneralUser.sf2\" 1 49 amp=108 pan=0\n57 %font \"GeneralUser.sf2\" 1 57 amp=89 pan=0\n60 %font \"GeneralUser.sf2\" 1 60 amp=196 pan=0\n80 %font \"GeneralUser.sf2\" 1 80 amp=31 pan=0\n81 %font \"GeneralUser.sf2\" 1 81 amp=45 pan=0\n98 %font \"GeneralUser.sf2\" 1 98 amp=89 pan=0\n120 %font \"GeneralUser.sf2\" 1 120 amp=28 pan=0\n121 %font \"GeneralUser.sf2\" 1 121 amp=104 pan=0\n122 %font \"GeneralUser.sf2\" 1 122 amp=59 pan=0\n123 %font \"GeneralUser.sf2\" 1 123 amp=50 pan=0\n124 %font \"GeneralUser.sf2\" 1 124 amp=101 pan=0\n125 %font \"GeneralUser.sf2\" 1 125 amp=203 pan=0\n126 %font \"GeneralUser.sf2\" 1 126 amp=207 pan=0\n127 %font \"GeneralUser.sf2\" 1 127 amp=65 pan=0\n\nbank 2\n44 %font \"GeneralUser.sf2\" 2 44 amp=361 pan=0\n48 %font \"GeneralUser.sf2\" 2 48 amp=118 pan=0\n49 %font \"GeneralUser.sf2\" 2 49 amp=195 pan=0\n102 %font \"GeneralUser.sf2\" 2 102 amp=90 pan=0\n120 %font \"GeneralUser.sf2\" 2 120 amp=52 pan=0\n122 %font \"GeneralUser.sf2\" 2 122 amp=85 pan=0\n123 %font \"GeneralUser.sf2\" 2 123 amp=276 pan=0\n124 %font \"GeneralUser.sf2\" 2 124 amp=94 pan=0\n125 %font \"GeneralUser.sf2\" 2 125 amp=38 pan=0\n126 %font \"GeneralUser.sf2\" 2 126 amp=38 pan=0\n127 %font \"GeneralUser.sf2\" 2 127 amp=128 pan=0\n\nbank 3\n122 %font \"GeneralUser.sf2\" 3 122 amp=72 pan=0\n123 %font \"GeneralUser.sf2\" 3 123 amp=45 pan=0\n124 %font \"GeneralUser.sf2\" 3 124 amp=128 pan=0\n125 %font \"GeneralUser.sf2\" 3 125 amp=61 pan=0\n126 %font \"GeneralUser.sf2\" 3 126 amp=83 pan=0\n127 %font \"GeneralUser.sf2\" 3 127 amp=77 pan=0\n\nbank 4\n122 %font \"GeneralUser.sf2\" 4 122 amp=299 pan=0\n123 %font \"GeneralUser.sf2\" 4 123 amp=62 pan=0\n125 %font \"GeneralUser.sf2\" 4 125 amp=73 pan=0\n126 %font \"GeneralUser.sf2\" 4 126 amp=60 pan=0\n\nbank 5\n122 %font \"GeneralUser.sf2\" 5 122 amp=81 pan=0\n124 %font \"GeneralUser.sf2\" 5 124 amp=98 pan=0\n125 %font \"GeneralUser.sf2\" 5 125 amp=58 pan=0\n126 %font \"GeneralUser.sf2\" 5 126 amp=141 pan=0\n\nbank 6\n125 %font \"GeneralUser.sf2\" 6 125 amp=91 pan=0\n\nbank 7\n125 %font \"GeneralUser.sf2\" 7 125 amp=41 pan=0\n\nbank 8\n0 %font \"GeneralUser.sf2\" 8 0 amp=52 pan=0\n1 %font \"GeneralUser.sf2\" 8 1 amp=84 pan=0\n2 %font \"GeneralUser.sf2\" 8 2 amp=51 pan=0\n3 %font \"GeneralUser.sf2\" 8 3 amp=110 pan=0\n4 %font \"GeneralUser.sf2\" 8 4 amp=82 pan=0\n5 %font \"GeneralUser.sf2\" 8 5 amp=52 pan=0\n6 %font \"GeneralUser.sf2\" 8 6 amp=47 pan=0\n11 %font \"GeneralUser.sf2\" 8 11 amp=53 pan=0\n12 %font \"GeneralUser.sf2\" 8 12 amp=143 pan=0\n14 %font \"GeneralUser.sf2\" 8 14 amp=35 pan=0\n16 %font \"GeneralUser.sf2\" 8 16 amp=64 pan=0\n17 %font \"GeneralUser.sf2\" 8 17 amp=100 pan=0\n19 %font \"GeneralUser.sf2\" 8 19 amp=153 pan=0\n21 %font \"GeneralUser.sf2\" 8 21 amp=28 pan=0\n24 %font \"GeneralUser.sf2\" 8 24 amp=117 pan=0\n25 %font \"GeneralUser.sf2\" 8 25 amp=82 pan=0\n26 %font \"GeneralUser.sf2\" 8 26 amp=87 pan=0\n27 %font \"GeneralUser.sf2\" 8 27 amp=57 pan=0\n28 %font \"GeneralUser.sf2\" 8 28 amp=47 pan=0\n30 %font \"GeneralUser.sf2\" 8 30 amp=71 pan=0\n31 %font \"GeneralUser.sf2\" 8 31 amp=100 pan=0\n38 %font \"GeneralUser.sf2\" 8 38 amp=38 pan=0\n39 %font \"GeneralUser.sf2\" 8 39 amp=231 pan=0\n40 %font \"GeneralUser.sf2\" 8 40 amp=112 pan=0\n48 %font \"GeneralUser.sf2\" 8 48 amp=86 pan=0\n50 %font \"GeneralUser.sf2\" 8 50 amp=63 pan=0\n61 %font \"GeneralUser.sf2\" 8 61 amp=93 pan=0\n62 %font \"GeneralUser.sf2\" 8 62 amp=49 pan=0\n63 %font \"GeneralUser.sf2\" 8 63 amp=74 pan=0\n80 %font \"GeneralUser.sf2\" 8 80 amp=86 pan=0\n81 %font \"GeneralUser.sf2\" 8 81 amp=62 pan=0\n107 %font \"GeneralUser.sf2\" 8 107 amp=118 pan=0\n115 %font \"GeneralUser.sf2\" 8 115 amp=149 pan=0\n116 %font \"GeneralUser.sf2\" 8 116 amp=76 pan=0\n117 %font \"GeneralUser.sf2\" 8 117 amp=141 pan=0\n118 %font \"GeneralUser.sf2\" 8 118 amp=167 pan=0\n125 %font \"GeneralUser.sf2\" 8 125 amp=80 pan=0\n\nbank 9\n14 %font \"GeneralUser.sf2\" 9 14 amp=53 pan=0\n125 %font \"GeneralUser.sf2\" 9 125 amp=19 pan=0\n\nbank 11\n1 %font \"GeneralUser.sf2\" 11 1 amp=362 pan=0\n4 %font \"GeneralUser.sf2\" 11 4 amp=143 pan=0\n5 %font \"GeneralUser.sf2\" 11 5 amp=494 pan=0\n8 %font \"GeneralUser.sf2\" 11 8 amp=355 pan=0\n14 %font \"GeneralUser.sf2\" 11 14 amp=376 pan=0\n38 %font \"GeneralUser.sf2\" 11 38 amp=136 pan=0\n39 %font \"GeneralUser.sf2\" 11 39 amp=33 pan=0\n50 %font \"GeneralUser.sf2\" 11 50 amp=73 pan=0\n51 %font \"GeneralUser.sf2\" 11 51 amp=180 pan=0\n61 %font \"GeneralUser.sf2\" 11 61 amp=51 pan=0\n78 %font \"GeneralUser.sf2\" 11 78 amp=40 pan=0\n81 %font \"GeneralUser.sf2\" 11 81 amp=194 pan=0\n87 %font \"GeneralUser.sf2\" 11 87 amp=92 pan=0\n88 %font \"GeneralUser.sf2\" 11 88 amp=317 pan=0\n89 %font \"GeneralUser.sf2\" 11 89 amp=262 pan=0\n96 %font \"GeneralUser.sf2\" 11 96 amp=40 pan=0\n98 %font \"GeneralUser.sf2\" 11 98 amp=93 pan=0\n100 %font \"GeneralUser.sf2\" 11 100 amp=188 pan=0\n119 %font \"GeneralUser.sf2\" 11 119 amp=674 pan=0\n121 %font \"GeneralUser.sf2\" 11 121 amp=71 pan=0\n127 %font \"GeneralUser.sf2\" 11 127 amp=37 pan=0\n\nbank 12\n10 %font \"GeneralUser.sf2\" 12 10 amp=55 pan=0\n27 %font \"GeneralUser.sf2\" 12 27 amp=69 pan=0\n38 %font \"GeneralUser.sf2\" 12 38 amp=34 pan=0\n48 %font \"GeneralUser.sf2\" 12 48 amp=156 pan=0\n49 %font \"GeneralUser.sf2\" 12 49 amp=193 pan=0\n80 %font \"GeneralUser.sf2\" 12 80 amp=13 pan=0\n81 %font \"GeneralUser.sf2\" 12 81 amp=21 pan=0\n88 %font \"GeneralUser.sf2\" 12 88 amp=108 pan=0\n89 %font \"GeneralUser.sf2\" 12 89 amp=64 pan=0\n119 %font \"GeneralUser.sf2\" 12 119 amp=422 pan=0\n122 %font \"GeneralUser.sf2\" 12 122 amp=68 pan=0\n127 %font \"GeneralUser.sf2\" 12 127 amp=185 pan=0\n\nbank 13\n88 %font \"GeneralUser.sf2\" 13 88 amp=128 pan=0\n\nbank 16\n0 %font \"GeneralUser.sf2\" 16 0 amp=118 pan=0\n4 %font \"GeneralUser.sf2\" 16 4 amp=78 pan=0\n5 %font \"GeneralUser.sf2\" 16 5 amp=107 pan=0\n6 %font \"GeneralUser.sf2\" 16 6 amp=50 pan=0\n25 %font \"GeneralUser.sf2\" 16 25 amp=61 pan=0\n\nbank 126\n0 %font \"GeneralUser.sf2\" 0 1 amp=112 pan=0\n1 %font \"GeneralUser.sf2\" 0 1 amp=112 pan=0\n2 %font \"GeneralUser.sf2\" 0 1 amp=112 pan=0\n3 %font \"GeneralUser.sf2\" 0 3 amp=134 pan=0\n4 %font \"GeneralUser.sf2\" 0 0 amp=72 pan=0\n5 %font \"GeneralUser.sf2\" 0 1 amp=111 pan=0\n6 %font \"GeneralUser.sf2\" 0 1 amp=112 pan=0\n7 %font \"GeneralUser.sf2\" 0 4 amp=91 pan=0\n8 %font \"GeneralUser.sf2\" 0 4 amp=80 pan=0\n9 %font \"GeneralUser.sf2\" 0 5 amp=73 pan=0\n10 %font \"GeneralUser.sf2\" 0 25 amp=75 pan=0\n11 %font \"GeneralUser.sf2\" 0 25 amp=76 pan=0\n12 %font \"GeneralUser.sf2\" 0 26 amp=92 pan=0\n13 %font \"GeneralUser.sf2\" 0 26 amp=104 pan=0\n14 %font \"GeneralUser.sf2\" 0 28 amp=222 pan=0\n15 %font \"GeneralUser.sf2\" 0 36 amp=152 pan=0\n16 %font \"GeneralUser.sf2\" 0 36 amp=152 pan=0\n17 %font \"GeneralUser.sf2\" 0 36 amp=152 pan=0\n18 %font \"GeneralUser.sf2\" 0 36 amp=152 pan=0\n19 %font \"GeneralUser.sf2\" 0 37 amp=48 pan=0\n20 %font \"GeneralUser.sf2\" 0 37 amp=48 pan=0\n21 %font \"GeneralUser.sf2\" 0 37 amp=48 pan=0\n22 %font \"GeneralUser.sf2\" 0 37 amp=48 pan=0\n23 %font \"GeneralUser.sf2\" 0 33 amp=119 pan=0\n24 %font \"GeneralUser.sf2\" 0 33 amp=120 pan=0\n25 %font \"GeneralUser.sf2\" 0 34 amp=408 pan=0\n26 %font \"GeneralUser.sf2\" 0 34 amp=412 pan=0\n27 %font \"GeneralUser.sf2\" 0 35 amp=160 pan=0\n28 %font \"GeneralUser.sf2\" 0 32 amp=361 pan=0\n29 %font \"GeneralUser.sf2\" 0 52 amp=89 pan=0\n30 %font \"GeneralUser.sf2\" 0 52 amp=89 pan=0\n31 %font \"GeneralUser.sf2\" 0 52 amp=90 pan=0\n32 %font \"GeneralUser.sf2\" 0 52 amp=89 pan=0\n33 %font \"GeneralUser.sf2\" 0 49 amp=116 pan=0\n34 %font \"GeneralUser.sf2\" 0 48 amp=89 pan=0\n35 %font \"GeneralUser.sf2\" 0 50 amp=100 pan=0\n36 %font \"GeneralUser.sf2\" 0 50 amp=76 pan=0\n37 %font \"GeneralUser.sf2\" 0 16 amp=54 pan=0\n38 %font \"GeneralUser.sf2\" 0 16 amp=75 pan=0\n39 %font \"GeneralUser.sf2\" 0 16 amp=75 pan=0\n40 %font \"GeneralUser.sf2\" 0 17 amp=167 pan=0\n41 %font \"GeneralUser.sf2\" 0 16 amp=75 pan=0\n42 %font \"GeneralUser.sf2\" 0 16 amp=75 pan=0\n43 %font \"GeneralUser.sf2\" 0 17 amp=167 pan=0\n44 %font \"GeneralUser.sf2\" 0 17 amp=167 pan=0\n45 %font \"GeneralUser.sf2\" 0 17 amp=167 pan=0\n46 %font \"GeneralUser.sf2\" 0 56 amp=104 pan=0\n47 %font \"GeneralUser.sf2\" 0 56 amp=104 pan=0\n48 %font \"GeneralUser.sf2\" 0 57 amp=94 pan=0\n49 %font \"GeneralUser.sf2\" 0 57 amp=94 pan=0\n50 %font \"GeneralUser.sf2\" 0 57 amp=94 pan=0\n51 %font \"GeneralUser.sf2\" 0 57 amp=94 pan=0\n52 %font \"GeneralUser.sf2\" 0 57 amp=94 pan=0\n53 %font \"GeneralUser.sf2\" 0 57 amp=94 pan=0\n54 %font \"GeneralUser.sf2\" 0 65 amp=116 pan=0\n55 %font \"GeneralUser.sf2\" 0 66 amp=86 pan=0\n56 %font \"GeneralUser.sf2\" 0 67 amp=144 pan=0\n57 %font \"GeneralUser.sf2\" 0 65 amp=116 pan=0\n58 %font \"GeneralUser.sf2\" 0 61 amp=89 pan=0\n59 %font \"GeneralUser.sf2\" 0 61 amp=88 pan=0\n60 %font \"GeneralUser.sf2\" 0 61 amp=105 pan=0\n61 %font \"GeneralUser.sf2\" 0 61 amp=105 pan=0\n62 %font \"GeneralUser.sf2\" 0 61 amp=88 pan=0\n63 %font \"GeneralUser.sf2\" 0 55 amp=112 pan=0\n\nbank 127\n0 %font \"GeneralUser.sf2\" 127 0 amp=80 pan=0\n1 %font \"GeneralUser.sf2\" 127 1 amp=143 pan=0\n8 %font \"GeneralUser.sf2\" 127 8 amp=204 pan=0\n9 %font \"GeneralUser.sf2\" 0 17 amp=101 pan=0\n10 %font \"GeneralUser.sf2\" 0 18 amp=106 pan=0\n11 %font \"GeneralUser.sf2\" 0 18 amp=79 pan=0\n12 %font \"GeneralUser.sf2\" 0 19 amp=87 pan=0\n13 %font \"GeneralUser.sf2\" 0 19 amp=148 pan=0\n14 %font \"GeneralUser.sf2\" 0 20 amp=35 pan=0\n15 %font \"GeneralUser.sf2\" 0 21 amp=53 pan=0\n16 %font \"GeneralUser.sf2\" 127 16 amp=96 pan=0\n17 %font \"GeneralUser.sf2\" 0 6 amp=38 pan=0\n18 %font \"GeneralUser.sf2\" 0 6 amp=43 pan=0\n19 %font \"GeneralUser.sf2\" 0 7 amp=63 pan=0\n20 %font \"GeneralUser.sf2\" 0 7 amp=111 pan=0\n21 %font \"GeneralUser.sf2\" 0 7 amp=72 pan=0\n22 %font \"GeneralUser.sf2\" 0 8 amp=32 pan=0\n23 %font \"GeneralUser.sf2\" 0 8 amp=32 pan=0\n24 %font \"GeneralUser.sf2\" 127 24 amp=332 pan=0\n25 %font \"GeneralUser.sf2\" 127 25 amp=406 pan=0\n26 %font \"GeneralUser.sf2\" 127 26 amp=350 pan=0\n27 %font \"GeneralUser.sf2\" 0 63 amp=89 pan=0\n28 %font \"GeneralUser.sf2\" 0 38 amp=55 pan=0\n29 %font \"GeneralUser.sf2\" 0 39 amp=50 pan=0\n30 %font \"GeneralUser.sf2\" 0 38 amp=55 pan=0\n31 %font \"GeneralUser.sf2\" 0 39 amp=69 pan=0\n32 %font \"GeneralUser.sf2\" 127 32 amp=205 pan=0\n33 %font \"GeneralUser.sf2\" 0 89 amp=48 pan=0\n34 %font \"GeneralUser.sf2\" 0 52 amp=52 pan=0\n35 %font \"GeneralUser.sf2\" 0 113 amp=165 pan=0\n36 %font \"GeneralUser.sf2\" 0 97 amp=78 pan=0\n37 %font \"GeneralUser.sf2\" 0 96 amp=56 pan=0\n38 %font \"GeneralUser.sf2\" 0 91 amp=47 pan=0\n39 %font \"GeneralUser.sf2\" 0 85 amp=16 pan=0\n40 %font \"GeneralUser.sf2\" 127 40 amp=356 pan=0\n41 %font \"GeneralUser.sf2\" 0 101 amp=107 pan=0\n42 %font \"GeneralUser.sf2\" 0 68 amp=40 pan=0\n43 %font \"GeneralUser.sf2\" 0 95 amp=119 pan=0\n44 %font \"GeneralUser.sf2\" 0 86 amp=49 pan=0\n45 %font \"GeneralUser.sf2\" 0 103 amp=104 pan=0\n46 %font \"GeneralUser.sf2\" 0 88 amp=33 pan=0\n47 %font \"GeneralUser.sf2\" 0 80 amp=19 pan=0\n48 %font \"GeneralUser.sf2\" 127 48 amp=189 pan=0\n49 %font \"GeneralUser.sf2\" 0 49 amp=111 pan=0\n51 %font \"GeneralUser.sf2\" 0 45 amp=76 pan=0\n52 %font \"GeneralUser.sf2\" 0 40 amp=86 pan=0\n53 %font \"GeneralUser.sf2\" 0 40 amp=76 pan=0\n54 %font \"GeneralUser.sf2\" 0 42 amp=64 pan=0\n55 %font \"GeneralUser.sf2\" 0 42 amp=64 pan=0\n56 %font \"GeneralUser.sf2\" 127 56 amp=220 pan=0\n57 %font \"GeneralUser.sf2\" 0 46 amp=36 pan=0\n58 %font \"GeneralUser.sf2\" 0 46 amp=48 pan=0\n59 %font \"GeneralUser.sf2\" 0 24 amp=56 pan=0\n60 %font \"GeneralUser.sf2\" 0 24 amp=43 pan=0\n61 %font \"GeneralUser.sf2\" 0 26 amp=88 pan=0\n62 %font \"GeneralUser.sf2\" 0 27 amp=198 pan=0\n63 %font \"GeneralUser.sf2\" 0 104 amp=77 pan=0\n64 %font \"GeneralUser.sf2\" 0 32 amp=158 pan=0\n65 %font \"GeneralUser.sf2\" 0 33 amp=67 pan=0\n66 %font \"GeneralUser.sf2\" 0 34 amp=201 pan=0\n67 %font \"GeneralUser.sf2\" 0 39 amp=99 pan=0\n68 %font \"GeneralUser.sf2\" 0 36 amp=117 pan=0\n69 %font \"GeneralUser.sf2\" 0 37 amp=35 pan=0\n70 %font \"GeneralUser.sf2\" 0 35 amp=88 pan=0\n71 %font \"GeneralUser.sf2\" 0 35 amp=64 pan=0\n72 %font \"GeneralUser.sf2\" 0 73 amp=64 pan=0\n73 %font \"GeneralUser.sf2\" 0 73 amp=110 pan=0\n74 %font \"GeneralUser.sf2\" 0 72 amp=62 pan=0\n75 %font \"GeneralUser.sf2\" 0 72 amp=40 pan=0\n76 %font \"GeneralUser.sf2\" 0 74 amp=71 pan=0\n77 %font \"GeneralUser.sf2\" 0 75 amp=62 pan=0\n78 %font \"GeneralUser.sf2\" 0 64 amp=53 pan=0\n79 %font \"GeneralUser.sf2\" 0 65 amp=95 pan=0\n80 %font \"GeneralUser.sf2\" 0 66 amp=111 pan=0\n81 %font \"GeneralUser.sf2\" 0 67 amp=111 pan=0\n82 %font \"GeneralUser.sf2\" 0 71 amp=39 pan=0\n83 %font \"GeneralUser.sf2\" 0 71 amp=34 pan=0\n84 %font \"GeneralUser.sf2\" 0 68 amp=66 pan=0\n85 %font \"GeneralUser.sf2\" 0 69 amp=130 pan=0\n86 %font \"GeneralUser.sf2\" 0 70 amp=49 pan=0\n87 %font \"GeneralUser.sf2\" 0 22 amp=80 pan=0\n88 %font \"GeneralUser.sf2\" 0 56 amp=156 pan=0\n89 %font \"GeneralUser.sf2\" 0 56 amp=136 pan=0\n90 %font \"GeneralUser.sf2\" 0 57 amp=216 pan=0\n91 %font \"GeneralUser.sf2\" 0 57 amp=125 pan=0\n92 %font \"GeneralUser.sf2\" 0 60 amp=146 pan=0\n93 %font \"GeneralUser.sf2\" 0 60 amp=203 pan=0\n94 %font \"GeneralUser.sf2\" 0 58 amp=111 pan=0\n95 %font \"GeneralUser.sf2\" 0 61 amp=100 pan=0\n96 %font \"GeneralUser.sf2\" 0 61 amp=89 pan=0\n97 %font \"GeneralUser.sf2\" 0 11 amp=18 pan=0\n98 %font \"GeneralUser.sf2\" 0 11 amp=19 pan=0\n99 %font \"GeneralUser.sf2\" 0 12 amp=43 pan=0\n100 %font \"GeneralUser.sf2\" 0 88 amp=30 pan=0\n101 %font \"GeneralUser.sf2\" 0 9 amp=76 pan=0\n102 %font \"GeneralUser.sf2\" 0 14 amp=57 pan=0\n103 %font \"GeneralUser.sf2\" 0 13 amp=103 pan=0\n104 %font \"GeneralUser.sf2\" 0 12 amp=61 pan=0\n105 %font \"GeneralUser.sf2\" 0 107 amp=100 pan=0\n106 %font \"GeneralUser.sf2\" 0 111 amp=63 pan=0\n107 %font \"GeneralUser.sf2\" 0 77 amp=171 pan=0\n108 %font \"GeneralUser.sf2\" 0 78 amp=164 pan=0\n109 %font \"GeneralUser.sf2\" 0 78 amp=83 pan=0\n110 %font \"GeneralUser.sf2\" 0 76 amp=68 pan=0\n111 %font \"GeneralUser.sf2\" 0 76 amp=75 pan=0\n112 %font \"GeneralUser.sf2\" 0 47 amp=40 pan=0\n113 %font \"GeneralUser.sf2\" 0 117 amp=66 pan=0\n114 %font \"GeneralUser.sf2\" 0 118 amp=39 pan=0\n115 %font \"GeneralUser.sf2\" 0 118 amp=41 pan=0\n116 %font \"GeneralUser.sf2\" 0 118 amp=67 pan=0\n117 %font \"GeneralUser.sf2\" 0 116 amp=84 pan=0\n118 %font \"GeneralUser.sf2\" 0 116 amp=30 pan=0\n119 %font \"GeneralUser.sf2\" 128 0 49 amp=72 pan=0\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n\ndrumset 0\n0 %font \"GeneralUser.sf2\" 128 0 36 amp=231 pan=0\t# Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1\n1 %font \"GeneralUser.sf2\" 128 0 35 amp=172 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n2 %font \"GeneralUser.sf2\" 128 1 36 amp=196 pan=0\t# Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1\n3 %font \"GeneralUser.sf2\" 128 1 35 amp=149 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n4 %font \"GeneralUser.sf2\" 128 0 36 amp=112 pan=0\t# Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1\n5 %font \"GeneralUser.sf2\" 128 0 35 amp=134 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n6 %font \"GeneralUser.sf2\" 128 32 36 amp=109 pan=0\t# Jazz Bass Drum Jazz Bass Drum Jazz Bass Drum Jazz Bass Drum Standard Kick 1 Standard Kick 1 Standard Kick 1\n7 %font \"GeneralUser.sf2\" 128 32 35 amp=169 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n8 %font \"GeneralUser.sf2\" 128 8 36 amp=145 pan=0\t# Power Kick 2 Power Kick 2 Power Kick 2 Power Kick 2\n9 %font \"GeneralUser.sf2\" 128 8 35 amp=91 pan=0\t# Power/Room Kick 1 Power/Room Kick 1 Power/Room Kick 1 Power/Room Kick 1\n10 %font \"GeneralUser.sf2\" 128 16 36 amp=57 pan=0\t# Power Kick 2 Power Kick 2 Power Kick 2 Power Kick 2\n11 %font \"GeneralUser.sf2\" 128 16 35 amp=87 pan=0\t# Power/Room Kick 1 Power/Room Kick 1 Power/Room Kick 1 Power/Room Kick 1\n12 %font \"GeneralUser.sf2\" 128 24 36 amp=94 pan=0\t# TR-909 Kick Electric Tom\n13 %font \"GeneralUser.sf2\" 128 24 35 amp=294 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n14 %font \"GeneralUser.sf2\" 128 25 36 amp=88 pan=0\t# TR-909 Kick\n15 %font \"GeneralUser.sf2\" 128 25 35 amp=111 pan=0\t# Sine-93.75Hz\n16 %font \"GeneralUser.sf2\" 128 26 35 amp=147 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n27 %font \"GeneralUser.sf2\" 128 0 27 amp=36 pan=-23\t# Filter Snap\n28 %font \"GeneralUser.sf2\" 128 0 28 amp=104 pan=31\t# Slap\n29 %font \"GeneralUser.sf2\" 128 0 29 amp=44 pan=-16\t# Scratch Push\n30 %font \"GeneralUser.sf2\" 128 0 30 amp=50 pan=-16\t# Scratch Pull\n31 %font \"GeneralUser.sf2\" 128 0 31 amp=154 pan=0\t# Sticks\n32 %font \"GeneralUser.sf2\" 128 0 32 amp=315 pan=-16\t# Square Click\n33 %font \"GeneralUser.sf2\" 128 0 33 amp=77 pan=0\t# TR-808 Click\n34 %font \"GeneralUser.sf2\" 128 0 34 amp=45 pan=0\t# TR-808 Click Carillon-C6\n35 %font \"GeneralUser.sf2\" 128 0 35 amp=161 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n36 %font \"GeneralUser.sf2\" 128 0 36 amp=158 pan=0\t# Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1\n37 %font \"GeneralUser.sf2\" 128 0 37 amp=72 pan=0\t# Jazz Rim Shot Jazz Rim Shot Jazz Rim Shot Jazz Rim Shot Rim Shot\n38 %font \"GeneralUser.sf2\" 128 0 38 amp=129 pan=0\t# Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Jazz Snare Soft 1 Jazz Snare Soft 1\n39 %font \"GeneralUser.sf2\" 128 0 39 amp=54 pan=-16\t# Hand Clap\n40 %font \"GeneralUser.sf2\" 128 0 40 amp=378 pan=0\t# Standard Snare 2 Standard Snare 2 Standard Snare 2 Standard Snare 2\n41 %font \"GeneralUser.sf2\" 128 0 41 amp=137 pan=-47\t# Standard Tom 5 Standard Tom 5 Standard Tom 5 Standard Tom 5 Standard Tom 5\n42 %font \"GeneralUser.sf2\" 128 0 42 amp=36 pan=31\t# Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Soft Hi-Hat Closed Soft Hi-Hat Closed Soft\n43 %font \"GeneralUser.sf2\" 128 0 43 amp=130 pan=-28\t# Standard Tom 5 Standard Tom 5 Standard Tom 5 Standard Tom 5 Standard Tom 5\n44 %font \"GeneralUser.sf2\" 128 0 44 amp=23 pan=31\t# Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Dead Air\n45 %font \"GeneralUser.sf2\" 128 0 45 amp=119 pan=-9\t# Standard Tom 4 Standard Tom 4 Standard Tom 4 Standard Tom 4 Standard Tom 4\n46 %font \"GeneralUser.sf2\" 128 0 46 amp=59 pan=31\t# Hi-Hat Open Hi-Hat Open Attack Hi-Hat Open Attack\n47 %font \"GeneralUser.sf2\" 128 0 47 amp=141 pan=9\t# Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3\n48 %font \"GeneralUser.sf2\" 128 0 48 amp=84 pan=28\t# Standard Tom 2 Standard Tom 2 Standard Tom 2 Standard Tom 2 Standard Tom 2\n49 %font \"GeneralUser.sf2\" 128 0 49 amp=166 pan=31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n50 %font \"GeneralUser.sf2\" 128 0 50 amp=52 pan=47\t# Standard Tom 1 Standard Tom 1 Standard Tom 1 Standard Tom 1 Standard Tom 1\n51 %font \"GeneralUser.sf2\" 128 0 51 amp=62 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 0 52 amp=70 pan=-31\t# Chinese Cymbal\n53 %font \"GeneralUser.sf2\" 128 0 53 amp=62 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 0 54 amp=66 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 0 55 amp=61 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 0 56 amp=102 pan=31\t# Cowbell\n57 %font \"GeneralUser.sf2\" 128 0 57 amp=136 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 0 58 amp=33 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 0 59 amp=64 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 0 60 amp=17 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 0 61 amp=77 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 0 62 amp=31 pan=-39\t# Conga High Muted\n63 %font \"GeneralUser.sf2\" 128 0 63 amp=68 pan=-39\t# Conga High Open\n64 %font \"GeneralUser.sf2\" 128 0 64 amp=49 pan=-31\t# Tumba Low\n65 %font \"GeneralUser.sf2\" 128 0 65 amp=127 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 0 66 amp=64 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 0 67 amp=63 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 0 68 amp=71 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 0 69 amp=39 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 0 70 amp=44 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 0 71 amp=37 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 0 72 amp=40 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 0 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 0 74 amp=46 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 0 75 amp=92 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 0 76 amp=56 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 0 77 amp=101 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 0 78 amp=39 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 0 79 amp=43 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 0 80 amp=45 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 0 81 amp=11 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 0 82 amp=155 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 0 83 amp=71 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 0 84 amp=40 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 0 85 amp=106 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 0 86 amp=64 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 0 87 amp=104 pan=-31\t# Surdo Open\n97 %font \"GeneralUser.sf2\" 128 0 38 amp=128 pan=0\t# Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Jazz Snare Soft 1 Jazz Snare Soft 1\n98 %font \"GeneralUser.sf2\" 128 0 40 amp=204 pan=0\t# Standard Snare 2 Standard Snare 2 Standard Snare 2 Standard Snare 2\n99 %font \"GeneralUser.sf2\" 128 1 38 amp=174 pan=0\t# Standard 2 Snare Standard 2 Snare Standard 2 Snare Standard 2 Snare\n100 %font \"GeneralUser.sf2\" 128 1 40 amp=211 pan=0\t# Standard Snare 2 Standard Snare 2 Standard Snare 2 Standard Snare 2\n101 %font \"GeneralUser.sf2\" 128 0 40 amp=345 pan=0\t# Standard Snare 2 Standard Snare 2 Standard Snare 2 Standard Snare 2\n102 %font \"GeneralUser.sf2\" 128 0 38 amp=129 pan=0\t# Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Jazz Snare Soft 1 Jazz Snare Soft 1\n103 %font \"GeneralUser.sf2\" 128 0 40 amp=250 pan=0\t# Standard Snare 2 Standard Snare 2 Standard Snare 2 Standard Snare 2\n104 %font \"GeneralUser.sf2\" 128 0 38 amp=157 pan=0\t# Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Jazz Snare Soft 1 Jazz Snare Soft 1\n105 %font \"GeneralUser.sf2\" 128 32 38 amp=80 pan=0\t# Jazz Snare Soft 1 Jazz Snare Soft 1 Jazz Snare Soft 2 Jazz Snare Hard Jazz Snare Hard\n106 %font \"GeneralUser.sf2\" 128 32 40 amp=179 pan=0\t# Brush Snare Brush Snare Brush Snare Standard Snare 2 Standard Snare 2 Standard Snare 2\n107 %font \"GeneralUser.sf2\" 128 8 38 amp=117 pan=0\t# Room Snare 1 Room Snare 1 Room Snare 1 Room Snare 1 Room Snare 1\n108 %font \"GeneralUser.sf2\" 128 8 40 amp=144 pan=0\t# Standard Snare 2 Standard Snare 2 Standard Snare 2 Standard Snare 2\n109 %font \"GeneralUser.sf2\" 128 16 38 amp=50 pan=0\t# Power Snare 1 Power Snare 1 Power Snare 1 Power Snare 1\n110 %font \"GeneralUser.sf2\" 128 16 40 amp=58 pan=0\t# Power Snare 2 Power Snare 2 Power Snare 2 Power Snare 2\n111 %font \"GeneralUser.sf2\" 128 24 40 amp=64 pan=0\t# Power Snare 1 Power Snare 1 Power Snare 1 Power Snare 1\n112 %font \"GeneralUser.sf2\" 128 26 38 amp=87 pan=0\t# Dance Snare\n113 %font \"GeneralUser.sf2\" 128 26 40 amp=75 pan=0\t# TR-909 Snare 2\n114 %font \"GeneralUser.sf2\" 128 26 38 amp=93 pan=0\t# Dance Snare\n115 %font \"GeneralUser.sf2\" 128 24 40 amp=43 pan=0\t# Power Snare 1 Power Snare 1 Power Snare 1 Power Snare 1\n116 %font \"GeneralUser.sf2\" 128 24 38 amp=116 pan=0\t# Electric Tom White Noise\n117 %font \"GeneralUser.sf2\" 128 24 38 amp=190 pan=0\t# Electric Tom White Noise\n118 %font \"GeneralUser.sf2\" 128 25 38 amp=83 pan=0\t# TR-909 Snare 1\n119 %font \"GeneralUser.sf2\" 128 25 38 amp=72 pan=0\t# TR-909 Snare 1\n120 %font \"GeneralUser.sf2\" 128 25 40 amp=53 pan=0\t# TR-909 Snare 2\n121 %font \"GeneralUser.sf2\" 128 25 38 amp=58 pan=0\t# TR-909 Snare 1\n122 %font \"GeneralUser.sf2\" 128 25 40 amp=77 pan=0\t# TR-909 Snare 2\n123 %font \"GeneralUser.sf2\" 128 25 38 amp=93 pan=0\t# TR-909 Snare 1\n124 %font \"GeneralUser.sf2\" 128 25 38 amp=68 pan=0\t# TR-909 Snare 1\n125 %font \"GeneralUser.sf2\" 128 26 38 amp=149 pan=0\t# Dance Snare\n126 %font \"GeneralUser.sf2\" 128 26 38 amp=101 pan=0\t# Dance Snare\n127 %font \"GeneralUser.sf2\" 128 26 38 amp=115 pan=0\t# Dance Snare\n\ndrumset 1\n27 %font \"GeneralUser.sf2\" 128 1 27 amp=36 pan=-23\t# Filter Snap\n28 %font \"GeneralUser.sf2\" 128 1 28 amp=104 pan=31\t# Slap\n29 %font \"GeneralUser.sf2\" 128 1 29 amp=44 pan=-16\t# Scratch Push\n30 %font \"GeneralUser.sf2\" 128 1 30 amp=80 pan=-16\t# Scratch Pull\n31 %font \"GeneralUser.sf2\" 128 1 31 amp=97 pan=0\t# Sticks\n32 %font \"GeneralUser.sf2\" 128 1 32 amp=432 pan=-16\t# Square Click\n33 %font \"GeneralUser.sf2\" 128 1 33 amp=76 pan=0\t# TR-808 Click\n34 %font \"GeneralUser.sf2\" 128 1 34 amp=45 pan=0\t# TR-808 Click Carillon-C6\n35 %font \"GeneralUser.sf2\" 128 1 35 amp=161 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n36 %font \"GeneralUser.sf2\" 128 1 36 amp=218 pan=0\t# Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1\n37 %font \"GeneralUser.sf2\" 128 1 37 amp=115 pan=0\t# Jazz Rim Shot Jazz Rim Shot Jazz Rim Shot Jazz Rim Shot Rim Shot\n38 %font \"GeneralUser.sf2\" 128 1 38 amp=286 pan=0\t# Standard 2 Snare Standard 2 Snare Standard 2 Snare Standard 2 Snare\n39 %font \"GeneralUser.sf2\" 128 1 39 amp=81 pan=-16\t# Hand Clap\n40 %font \"GeneralUser.sf2\" 128 1 40 amp=139 pan=0\t# Standard Snare 2 Standard Snare 2 Standard Snare 2 Standard Snare 2\n41 %font \"GeneralUser.sf2\" 128 1 41 amp=200 pan=-47\t# Standard Tom 5 Standard Tom 5 Standard Tom 5 Standard Tom 5 Standard Tom 5\n42 %font \"GeneralUser.sf2\" 128 1 42 amp=58 pan=31\t# Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Soft Hi-Hat Closed Soft Hi-Hat Closed Soft\n43 %font \"GeneralUser.sf2\" 128 1 43 amp=130 pan=-28\t# Standard Tom 5 Standard Tom 5 Standard Tom 5 Standard Tom 5 Standard Tom 5\n44 %font \"GeneralUser.sf2\" 128 1 44 amp=33 pan=31\t# Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Dead Air\n45 %font \"GeneralUser.sf2\" 128 1 45 amp=119 pan=-9\t# Standard Tom 4 Standard Tom 4 Standard Tom 4 Standard Tom 4 Standard Tom 4\n46 %font \"GeneralUser.sf2\" 128 1 46 amp=31 pan=31\t# Hi-Hat Open Hi-Hat Open Attack Hi-Hat Open Attack\n47 %font \"GeneralUser.sf2\" 128 1 47 amp=95 pan=9\t# Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3\n48 %font \"GeneralUser.sf2\" 128 1 48 amp=124 pan=28\t# Standard Tom 2 Standard Tom 2 Standard Tom 2 Standard Tom 2 Standard Tom 2\n49 %font \"GeneralUser.sf2\" 128 1 49 amp=176 pan=31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n50 %font \"GeneralUser.sf2\" 128 1 50 amp=163 pan=47\t# Standard Tom 1 Standard Tom 1 Standard Tom 1 Standard Tom 1 Standard Tom 1\n51 %font \"GeneralUser.sf2\" 128 1 51 amp=61 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 1 52 amp=55 pan=-31\t# Chinese Cymbal\n53 %font \"GeneralUser.sf2\" 128 1 53 amp=27 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 1 54 amp=18 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 1 55 amp=63 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 1 56 amp=106 pan=31\t# Cowbell\n57 %font \"GeneralUser.sf2\" 128 1 57 amp=114 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 1 58 amp=80 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 1 59 amp=65 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 1 60 amp=159 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 1 61 amp=124 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 1 62 amp=31 pan=-39\t# Conga High Muted\n63 %font \"GeneralUser.sf2\" 128 1 63 amp=67 pan=-39\t# Conga High Open\n64 %font \"GeneralUser.sf2\" 128 1 64 amp=49 pan=-31\t# Tumba Low\n65 %font \"GeneralUser.sf2\" 128 1 65 amp=82 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 1 66 amp=98 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 1 67 amp=64 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 1 68 amp=71 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 1 69 amp=40 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 1 70 amp=28 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 1 71 amp=37 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 1 72 amp=65 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 1 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 1 74 amp=45 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 1 75 amp=92 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 1 76 amp=57 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 1 77 amp=62 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 1 78 amp=63 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 1 79 amp=43 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 1 80 amp=45 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 1 81 amp=11 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 1 82 amp=96 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 1 83 amp=114 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 1 84 amp=110 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 1 85 amp=14 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 1 86 amp=61 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 1 87 amp=102 pan=-31\t# Surdo Open\n\ndrumset 8\n27 %font \"GeneralUser.sf2\" 128 8 27 amp=51 pan=-23\t# Filter Snap\n28 %font \"GeneralUser.sf2\" 128 8 28 amp=167 pan=31\t# Slap\n29 %font \"GeneralUser.sf2\" 128 8 29 amp=44 pan=-16\t# Scratch Push\n30 %font \"GeneralUser.sf2\" 128 8 30 amp=50 pan=-16\t# Scratch Pull\n31 %font \"GeneralUser.sf2\" 128 8 31 amp=97 pan=0\t# Sticks\n32 %font \"GeneralUser.sf2\" 128 8 32 amp=321 pan=-16\t# Square Click\n33 %font \"GeneralUser.sf2\" 128 8 33 amp=77 pan=0\t# TR-808 Click\n34 %font \"GeneralUser.sf2\" 128 8 34 amp=45 pan=0\t# TR-808 Click Carillon-C6\n35 %font \"GeneralUser.sf2\" 128 8 35 amp=95 pan=0\t# Power/Room Kick 1 Power/Room Kick 1 Power/Room Kick 1 Power/Room Kick 1\n36 %font \"GeneralUser.sf2\" 128 8 36 amp=100 pan=0\t# Power Kick 2 Power Kick 2 Power Kick 2 Power Kick 2\n37 %font \"GeneralUser.sf2\" 128 8 37 amp=72 pan=0\t# Jazz Rim Shot Jazz Rim Shot Jazz Rim Shot Jazz Rim Shot Rim Shot\n38 %font \"GeneralUser.sf2\" 128 8 38 amp=194 pan=0\t# Room Snare 1 Room Snare 1 Room Snare 1 Room Snare 1 Room Snare 1\n39 %font \"GeneralUser.sf2\" 128 8 39 amp=81 pan=-16\t# Hand Clap\n40 %font \"GeneralUser.sf2\" 128 8 40 amp=197 pan=0\t# Standard Snare 2 Standard Snare 2 Standard Snare 2 Standard Snare 2\n41 %font \"GeneralUser.sf2\" 128 8 41 amp=115 pan=-47\t# Room Tom 1 Room Tom 1 Room Tom 1 Room Tom 1\n42 %font \"GeneralUser.sf2\" 128 8 42 amp=35 pan=31\t# Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Soft Hi-Hat Closed Soft Hi-Hat Closed Soft\n43 %font \"GeneralUser.sf2\" 128 8 43 amp=113 pan=-28\t# Room Tom 1 Room Tom 1 Room Tom 1 Room Tom 1\n44 %font \"GeneralUser.sf2\" 128 8 44 amp=71 pan=31\t# Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Dead Air\n45 %font \"GeneralUser.sf2\" 128 8 45 amp=221 pan=-9\t# Room Tom 1 Room Tom 1 Room Tom 1 Room Tom 1\n46 %font \"GeneralUser.sf2\" 128 8 46 amp=42 pan=31\t# Hi-Hat Open Hi-Hat Open Attack Hi-Hat Open Attack\n47 %font \"GeneralUser.sf2\" 128 8 47 amp=148 pan=9\t# Room Tom 2 Room Tom 2 Room Tom 2 Room Tom 2\n48 %font \"GeneralUser.sf2\" 128 8 48 amp=152 pan=28\t# Room Tom 2 Room Tom 2 Room Tom 2 Room Tom 2\n49 %font \"GeneralUser.sf2\" 128 8 49 amp=176 pan=31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n50 %font \"GeneralUser.sf2\" 128 8 50 amp=249 pan=47\t# Room Tom 2 Room Tom 2 Room Tom 2 Room Tom 2\n51 %font \"GeneralUser.sf2\" 128 8 51 amp=77 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 8 52 amp=71 pan=-31\t# Chinese Cymbal\n53 %font \"GeneralUser.sf2\" 128 8 53 amp=27 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 8 54 amp=68 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 8 55 amp=63 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 8 56 amp=163 pan=31\t# Cowbell\n57 %font \"GeneralUser.sf2\" 128 8 57 amp=121 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 8 58 amp=34 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 8 59 amp=51 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 8 60 amp=98 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 8 61 amp=75 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 8 62 amp=48 pan=-39\t# Conga High Muted\n63 %font \"GeneralUser.sf2\" 128 8 63 amp=67 pan=-39\t# Conga High Open\n64 %font \"GeneralUser.sf2\" 128 8 64 amp=49 pan=-31\t# Tumba Low\n65 %font \"GeneralUser.sf2\" 128 8 65 amp=82 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 8 66 amp=64 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 8 67 amp=63 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 8 68 amp=113 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 8 69 amp=39 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 8 70 amp=28 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 8 71 amp=37 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 8 72 amp=40 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 8 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 8 74 amp=43 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 8 75 amp=145 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 8 76 amp=56 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 8 77 amp=64 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 8 78 amp=39 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 8 79 amp=43 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 8 80 amp=65 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 8 81 amp=11 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 8 82 amp=96 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 8 83 amp=71 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 8 84 amp=40 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 8 85 amp=106 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 8 86 amp=95 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 8 87 amp=144 pan=-31\t# Surdo Open\n\ndrumset 9\n29 %font \"GeneralUser.sf2\" 128 25 29 amp=72 pan=-16\t# TR-909 Scratch Pull\n30 %font \"GeneralUser.sf2\" 128 25 30 amp=57 pan=-16\t# TR-909 Scratch Push\n35 %font \"GeneralUser.sf2\" 128 25 35 amp=177 pan=0\t# Sine-93.75Hz\n36 %font \"GeneralUser.sf2\" 128 25 36 amp=94 pan=0\t# TR-909 Kick\n37 %font \"GeneralUser.sf2\" 128 25 37 amp=175 pan=0\t# TR-808 Click\n38 %font \"GeneralUser.sf2\" 128 25 38 amp=93 pan=0\t# TR-909 Snare 1\n39 %font \"GeneralUser.sf2\" 128 25 39 amp=45 pan=-16\t# Synth Hand Clap\n40 %font \"GeneralUser.sf2\" 128 25 40 amp=64 pan=0\t# TR-909 Snare 2\n41 %font \"GeneralUser.sf2\" 128 25 41 amp=123 pan=-47\t# Sine-750Hz\n42 %font \"GeneralUser.sf2\" 128 25 42 amp=57 pan=31\t# TR-808 Hi-Hat\n43 %font \"GeneralUser.sf2\" 128 25 43 amp=72 pan=-28\t# Sine-750Hz\n44 %font \"GeneralUser.sf2\" 128 25 44 amp=36 pan=31\t# TR-808 Hi-Hat\n45 %font \"GeneralUser.sf2\" 128 25 45 amp=68 pan=-9\t# Sine-750Hz\n46 %font \"GeneralUser.sf2\" 128 25 46 amp=18 pan=31\t# TR-909 Hi-Hat Open\n47 %font \"GeneralUser.sf2\" 128 25 47 amp=68 pan=9\t# Sine-750Hz\n48 %font \"GeneralUser.sf2\" 128 25 48 amp=46 pan=28\t# Sine-750Hz\n49 %font \"GeneralUser.sf2\" 128 25 49 amp=89 pan=31\t# TR-808 Hi-Hat Crash Cymbal\n50 %font \"GeneralUser.sf2\" 128 25 50 amp=55 pan=47\t# Sine-750Hz\n51 %font \"GeneralUser.sf2\" 128 25 51 amp=62 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 25 52 amp=23 pan=-31\t# Chinese Cymbal\n53 %font \"GeneralUser.sf2\" 128 25 53 amp=62 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 25 54 amp=22 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 25 55 amp=61 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 25 56 amp=32 pan=31\t# TR-808 Cowbell\n57 %font \"GeneralUser.sf2\" 128 25 57 amp=121 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 25 58 amp=34 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 25 59 amp=66 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 25 60 amp=98 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 25 61 amp=76 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 25 62 amp=16 pan=-39\t# Sine-750Hz\n63 %font \"GeneralUser.sf2\" 128 25 63 amp=47 pan=-39\t# Sine-750Hz\n64 %font \"GeneralUser.sf2\" 128 25 64 amp=57 pan=-31\t# Sine-750Hz\n65 %font \"GeneralUser.sf2\" 128 25 65 amp=82 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 25 66 amp=64 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 25 67 amp=64 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 25 68 amp=71 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 25 69 amp=39 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 25 70 amp=43 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 25 71 amp=37 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 25 72 amp=65 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 25 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 25 74 amp=116 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 25 75 amp=80 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 25 76 amp=56 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 25 77 amp=102 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 25 78 amp=51 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 25 79 amp=73 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 25 80 amp=36 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 25 81 amp=14 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 25 82 amp=61 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 25 83 amp=114 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 25 84 amp=40 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 25 85 amp=106 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 25 86 amp=64 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 25 87 amp=102 pan=-31\t# Surdo Open\n\ndrumset 10\n29 %font \"GeneralUser.sf2\" 128 25 29 amp=44 pan=-16\t# TR-909 Scratch Pull\n30 %font \"GeneralUser.sf2\" 128 25 30 amp=91 pan=-16\t# TR-909 Scratch Push\n35 %font \"GeneralUser.sf2\" 128 25 35 amp=51 pan=0\t# Sine-93.75Hz\n36 %font \"GeneralUser.sf2\" 128 25 36 amp=132 pan=0\t# TR-909 Kick\n37 %font \"GeneralUser.sf2\" 128 25 37 amp=98 pan=0\t# TR-808 Click\n38 %font \"GeneralUser.sf2\" 128 25 38 amp=79 pan=0\t# TR-909 Snare 1\n39 %font \"GeneralUser.sf2\" 128 25 39 amp=83 pan=-16\t# Synth Hand Clap\n40 %font \"GeneralUser.sf2\" 128 25 40 amp=80 pan=0\t# TR-909 Snare 2\n41 %font \"GeneralUser.sf2\" 128 25 41 amp=124 pan=-47\t# Sine-750Hz\n42 %font \"GeneralUser.sf2\" 128 25 42 amp=85 pan=31\t# TR-808 Hi-Hat\n43 %font \"GeneralUser.sf2\" 128 25 43 amp=72 pan=-28\t# Sine-750Hz\n44 %font \"GeneralUser.sf2\" 128 25 44 amp=69 pan=31\t# TR-808 Hi-Hat\n45 %font \"GeneralUser.sf2\" 128 25 45 amp=68 pan=-9\t# Sine-750Hz\n46 %font \"GeneralUser.sf2\" 128 25 46 amp=47 pan=31\t# TR-909 Hi-Hat Open\n47 %font \"GeneralUser.sf2\" 128 25 47 amp=68 pan=9\t# Sine-750Hz\n48 %font \"GeneralUser.sf2\" 128 25 48 amp=46 pan=28\t# Sine-750Hz\n49 %font \"GeneralUser.sf2\" 128 25 49 amp=97 pan=31\t# TR-808 Hi-Hat Crash Cymbal\n50 %font \"GeneralUser.sf2\" 128 25 50 amp=19 pan=47\t# Sine-750Hz\n51 %font \"GeneralUser.sf2\" 128 25 51 amp=61 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 25 52 amp=23 pan=-31\t# Chinese Cymbal\n53 %font \"GeneralUser.sf2\" 128 25 53 amp=62 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 25 54 amp=101 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 25 55 amp=62 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 25 56 amp=32 pan=31\t# TR-808 Cowbell\n57 %font \"GeneralUser.sf2\" 128 25 57 amp=136 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 25 58 amp=33 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 25 59 amp=65 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 25 60 amp=159 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 25 61 amp=76 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 25 62 amp=16 pan=-39\t# Sine-750Hz\n63 %font \"GeneralUser.sf2\" 128 25 63 amp=48 pan=-39\t# Sine-750Hz\n64 %font \"GeneralUser.sf2\" 128 25 64 amp=36 pan=-31\t# Sine-750Hz\n65 %font \"GeneralUser.sf2\" 128 25 65 amp=82 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 25 66 amp=64 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 25 67 amp=63 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 25 68 amp=71 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 25 69 amp=39 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 25 70 amp=43 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 25 71 amp=59 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 25 72 amp=65 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 25 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 25 74 amp=116 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 25 75 amp=75 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 25 76 amp=56 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 25 77 amp=101 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 25 78 amp=51 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 25 79 amp=72 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 25 80 amp=36 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 25 81 amp=9 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 25 82 amp=61 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 25 83 amp=114 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 25 84 amp=61 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 25 85 amp=106 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 25 86 amp=63 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 25 87 amp=103 pan=-31\t# Surdo Open\n\ndrumset 11\n29 %font \"GeneralUser.sf2\" 128 25 29 amp=44 pan=-16\t# TR-909 Scratch Pull\n30 %font \"GeneralUser.sf2\" 128 25 30 amp=91 pan=-16\t# TR-909 Scratch Push\n35 %font \"GeneralUser.sf2\" 128 25 35 amp=72 pan=0\t# Sine-93.75Hz\n36 %font \"GeneralUser.sf2\" 128 25 36 amp=154 pan=0\t# TR-909 Kick\n37 %font \"GeneralUser.sf2\" 128 25 37 amp=175 pan=0\t# TR-808 Click\n38 %font \"GeneralUser.sf2\" 128 25 38 amp=71 pan=0\t# TR-909 Snare 1\n39 %font \"GeneralUser.sf2\" 128 25 39 amp=66 pan=-16\t# Synth Hand Clap\n40 %font \"GeneralUser.sf2\" 128 25 40 amp=94 pan=0\t# TR-909 Snare 2\n41 %font \"GeneralUser.sf2\" 128 25 41 amp=68 pan=-47\t# Sine-750Hz\n42 %font \"GeneralUser.sf2\" 128 25 42 amp=67 pan=31\t# TR-808 Hi-Hat\n43 %font \"GeneralUser.sf2\" 128 25 43 amp=109 pan=-28\t# Sine-750Hz\n44 %font \"GeneralUser.sf2\" 128 25 44 amp=93 pan=31\t# TR-808 Hi-Hat\n45 %font \"GeneralUser.sf2\" 128 25 45 amp=65 pan=-9\t# Sine-750Hz\n46 %font \"GeneralUser.sf2\" 128 25 46 amp=31 pan=31\t# TR-909 Hi-Hat Open\n47 %font \"GeneralUser.sf2\" 128 25 47 amp=63 pan=9\t# Sine-750Hz\n48 %font \"GeneralUser.sf2\" 128 25 48 amp=111 pan=28\t# Sine-750Hz\n49 %font \"GeneralUser.sf2\" 128 25 49 amp=144 pan=31\t# TR-808 Hi-Hat Crash Cymbal\n50 %font \"GeneralUser.sf2\" 128 25 50 amp=88 pan=47\t# Sine-750Hz\n51 %font \"GeneralUser.sf2\" 128 25 51 amp=62 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 25 52 amp=23 pan=-31\t# Chinese Cymbal\n53 %font \"GeneralUser.sf2\" 128 25 53 amp=46 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 25 54 amp=101 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 25 55 amp=89 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 25 56 amp=32 pan=31\t# TR-808 Cowbell\n57 %font \"GeneralUser.sf2\" 128 25 57 amp=140 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 25 58 amp=59 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 25 59 amp=52 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 25 60 amp=194 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 25 61 amp=136 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 25 62 amp=36 pan=-39\t# Sine-750Hz\n63 %font \"GeneralUser.sf2\" 128 25 63 amp=54 pan=-39\t# Sine-750Hz\n64 %font \"GeneralUser.sf2\" 128 25 64 amp=70 pan=-31\t# Sine-750Hz\n65 %font \"GeneralUser.sf2\" 128 25 65 amp=82 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 25 66 amp=98 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 25 67 amp=64 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 25 68 amp=71 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 25 69 amp=39 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 25 70 amp=43 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 25 71 amp=37 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 25 72 amp=65 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 25 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 25 74 amp=117 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 25 75 amp=84 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 25 76 amp=56 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 25 77 amp=64 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 25 78 amp=79 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 25 79 amp=113 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 25 80 amp=36 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 25 81 amp=9 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 25 82 amp=61 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 25 83 amp=71 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 25 84 amp=61 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 25 85 amp=162 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 25 86 amp=64 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 25 87 amp=103 pan=-31\t# Surdo Open\n\ndrumset 16\n27 %font \"GeneralUser.sf2\" 128 16 27 amp=52 pan=-23\t# Filter Snap\n28 %font \"GeneralUser.sf2\" 128 16 28 amp=104 pan=31\t# Slap\n29 %font \"GeneralUser.sf2\" 128 16 29 amp=44 pan=-16\t# Scratch Push\n30 %font \"GeneralUser.sf2\" 128 16 30 amp=50 pan=-16\t# Scratch Pull\n31 %font \"GeneralUser.sf2\" 128 16 31 amp=97 pan=0\t# Sticks\n32 %font \"GeneralUser.sf2\" 128 16 32 amp=431 pan=-16\t# Square Click\n33 %font \"GeneralUser.sf2\" 128 16 33 amp=123 pan=0\t# TR-808 Click\n34 %font \"GeneralUser.sf2\" 128 16 34 amp=68 pan=0\t# TR-808 Click Carillon-C6\n35 %font \"GeneralUser.sf2\" 128 16 35 amp=106 pan=0\t# Power/Room Kick 1 Power/Room Kick 1 Power/Room Kick 1 Power/Room Kick 1\n36 %font \"GeneralUser.sf2\" 128 16 36 amp=75 pan=0\t# Power Kick 2 Power Kick 2 Power Kick 2 Power Kick 2\n37 %font \"GeneralUser.sf2\" 128 16 37 amp=72 pan=0\t# Jazz Rim Shot Jazz Rim Shot Jazz Rim Shot Jazz Rim Shot Rim Shot\n38 %font \"GeneralUser.sf2\" 128 16 38 amp=71 pan=0\t# Power Snare 1 Power Snare 1 Power Snare 1 Power Snare 1\n39 %font \"GeneralUser.sf2\" 128 16 39 amp=129 pan=-16\t# Hand Clap\n40 %font \"GeneralUser.sf2\" 128 16 40 amp=86 pan=0\t# Power Snare 2 Power Snare 2 Power Snare 2 Power Snare 2\n41 %font \"GeneralUser.sf2\" 128 16 41 amp=102 pan=-47\t# Room Tom 1 Room Tom 1 Room Tom 1 Room Tom 1\n42 %font \"GeneralUser.sf2\" 128 16 42 amp=35 pan=31\t# Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Soft Hi-Hat Closed Soft Hi-Hat Closed Soft\n43 %font \"GeneralUser.sf2\" 128 16 43 amp=99 pan=-28\t# Room Tom 1 Room Tom 1 Room Tom 1 Room Tom 1\n44 %font \"GeneralUser.sf2\" 128 16 44 amp=23 pan=31\t# Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Dead Air\n45 %font \"GeneralUser.sf2\" 128 16 45 amp=161 pan=-9\t# Room Tom 1 Room Tom 1 Room Tom 1 Room Tom 1\n46 %font \"GeneralUser.sf2\" 128 16 46 amp=41 pan=31\t# Hi-Hat Open Hi-Hat Open Attack Hi-Hat Open Attack\n47 %font \"GeneralUser.sf2\" 128 16 47 amp=109 pan=9\t# Room Tom 2 Room Tom 2 Room Tom 2 Room Tom 2\n48 %font \"GeneralUser.sf2\" 128 16 48 amp=128 pan=28\t# Room Tom 2 Room Tom 2 Room Tom 2 Room Tom 2\n49 %font \"GeneralUser.sf2\" 128 16 49 amp=176 pan=31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n50 %font \"GeneralUser.sf2\" 128 16 50 amp=56 pan=47\t# Room Tom 2 Room Tom 2 Room Tom 2 Room Tom 2\n51 %font \"GeneralUser.sf2\" 128 16 51 amp=77 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 16 52 amp=32 pan=-31\t# Chinese Cymbal\n53 %font \"GeneralUser.sf2\" 128 16 53 amp=27 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 16 54 amp=18 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 16 55 amp=62 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 16 56 amp=106 pan=31\t# Cowbell\n57 %font \"GeneralUser.sf2\" 128 16 57 amp=136 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 16 58 amp=80 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 16 59 amp=51 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 16 60 amp=98 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 16 61 amp=78 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 16 62 amp=31 pan=-39\t# Conga High Muted\n63 %font \"GeneralUser.sf2\" 128 16 63 amp=108 pan=-39\t# Conga High Open\n64 %font \"GeneralUser.sf2\" 128 16 64 amp=75 pan=-31\t# Tumba Low\n65 %font \"GeneralUser.sf2\" 128 16 65 amp=82 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 16 66 amp=64 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 16 67 amp=64 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 16 68 amp=71 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 16 69 amp=124 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 16 70 amp=28 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 16 71 amp=37 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 16 72 amp=40 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 16 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 16 74 amp=44 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 16 75 amp=145 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 16 76 amp=56 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 16 77 amp=64 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 16 78 amp=39 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 16 79 amp=43 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 16 80 amp=46 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 16 81 amp=17 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 16 82 amp=96 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 16 83 amp=71 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 16 84 amp=40 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 16 85 amp=106 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 16 86 amp=61 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 16 87 amp=144 pan=-31\t# Surdo Open\n\ndrumset 24\n27 %font \"GeneralUser.sf2\" 128 24 27 amp=36 pan=-23\t# Filter Snap\n28 %font \"GeneralUser.sf2\" 128 24 28 amp=104 pan=31\t# Slap\n29 %font \"GeneralUser.sf2\" 128 24 29 amp=52 pan=-16\t# Scratch Push\n30 %font \"GeneralUser.sf2\" 128 24 30 amp=106 pan=-16\t# Scratch Pull\n31 %font \"GeneralUser.sf2\" 128 24 31 amp=97 pan=0\t# Sticks\n32 %font \"GeneralUser.sf2\" 128 24 32 amp=431 pan=-16\t# Square Click\n33 %font \"GeneralUser.sf2\" 128 24 33 amp=77 pan=0\t# TR-808 Click\n34 %font \"GeneralUser.sf2\" 128 24 34 amp=45 pan=0\t# TR-808 Click Carillon-C6\n35 %font \"GeneralUser.sf2\" 128 24 35 amp=213 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n36 %font \"GeneralUser.sf2\" 128 24 36 amp=297 pan=0\t# TR-909 Kick Electric Tom\n37 %font \"GeneralUser.sf2\" 128 24 37 amp=90 pan=0\t# Rim Shot\n38 %font \"GeneralUser.sf2\" 128 24 38 amp=182 pan=0\t# Electric Tom White Noise\n39 %font \"GeneralUser.sf2\" 128 24 39 amp=67 pan=-16\t# Synth Hand Clap\n40 %font \"GeneralUser.sf2\" 128 24 40 amp=57 pan=0\t# Power Snare 1 Power Snare 1 Power Snare 1 Power Snare 1\n41 %font \"GeneralUser.sf2\" 128 24 41 amp=118 pan=-47\t# Electric Tom\n42 %font \"GeneralUser.sf2\" 128 24 42 amp=58 pan=31\t# Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Soft Hi-Hat Closed Soft Hi-Hat Closed Soft\n43 %font \"GeneralUser.sf2\" 128 24 43 amp=82 pan=-28\t# Electric Tom\n44 %font \"GeneralUser.sf2\" 128 24 44 amp=32 pan=31\t# Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Dead Air\n45 %font \"GeneralUser.sf2\" 128 24 45 amp=82 pan=-9\t# Electric Tom\n46 %font \"GeneralUser.sf2\" 128 24 46 amp=31 pan=31\t# Hi-Hat Open Hi-Hat Open Attack Hi-Hat Open Attack\n47 %font \"GeneralUser.sf2\" 128 24 47 amp=84 pan=9\t# Electric Tom\n48 %font \"GeneralUser.sf2\" 128 24 48 amp=120 pan=28\t# Electric Tom\n49 %font \"GeneralUser.sf2\" 128 24 49 amp=176 pan=31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n50 %font \"GeneralUser.sf2\" 128 24 50 amp=35 pan=47\t# Electric Tom\n51 %font \"GeneralUser.sf2\" 128 24 51 amp=62 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 24 52 amp=24 pan=-31\t# Reverse Cymbal\n53 %font \"GeneralUser.sf2\" 128 24 53 amp=47 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 24 54 amp=104 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 24 55 amp=63 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 24 56 amp=104 pan=31\t# Cowbell\n57 %font \"GeneralUser.sf2\" 128 24 57 amp=121 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 24 58 amp=34 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 24 59 amp=65 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 24 60 amp=157 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 24 61 amp=75 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 24 62 amp=31 pan=-39\t# Conga High Muted\n63 %font \"GeneralUser.sf2\" 128 24 63 amp=68 pan=-39\t# Conga High Open\n64 %font \"GeneralUser.sf2\" 128 24 64 amp=49 pan=-31\t# Tumba Low\n65 %font \"GeneralUser.sf2\" 128 24 65 amp=82 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 24 66 amp=64 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 24 67 amp=63 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 24 68 amp=71 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 24 69 amp=39 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 24 70 amp=28 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 24 71 amp=37 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 24 72 amp=40 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 24 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 24 74 amp=43 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 24 75 amp=92 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 24 76 amp=90 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 24 77 amp=63 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 24 78 amp=39 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 24 79 amp=43 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 24 80 amp=44 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 24 81 amp=11 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 24 82 amp=155 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 24 83 amp=71 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 24 84 amp=40 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 24 85 amp=106 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 24 86 amp=61 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 24 87 amp=103 pan=-31\t# Surdo Open\n\ndrumset 25\n27 %font \"GeneralUser.sf2\" 128 25 27 amp=36 pan=-23\t# Filter Snap\n28 %font \"GeneralUser.sf2\" 128 25 28 amp=104 pan=31\t# Slap\n29 %font \"GeneralUser.sf2\" 128 25 29 amp=43 pan=-16\t# TR-909 Scratch Pull\n30 %font \"GeneralUser.sf2\" 128 25 30 amp=57 pan=-16\t# TR-909 Scratch Push\n31 %font \"GeneralUser.sf2\" 128 25 31 amp=154 pan=0\t# Sticks\n32 %font \"GeneralUser.sf2\" 128 25 32 amp=320 pan=-16\t# Square Click\n33 %font \"GeneralUser.sf2\" 128 25 33 amp=77 pan=0\t# TR-808 Click\n34 %font \"GeneralUser.sf2\" 128 25 34 amp=45 pan=0\t# TR-808 Click Carillon-C6\n35 %font \"GeneralUser.sf2\" 128 25 35 amp=70 pan=0\t# Sine-93.75Hz\n36 %font \"GeneralUser.sf2\" 128 25 36 amp=97 pan=0\t# TR-909 Kick\n37 %font \"GeneralUser.sf2\" 128 25 37 amp=275 pan=0\t# TR-808 Click\n38 %font \"GeneralUser.sf2\" 128 25 38 amp=62 pan=0\t# TR-909 Snare 1\n39 %font \"GeneralUser.sf2\" 128 25 39 amp=67 pan=-16\t# Synth Hand Clap\n40 %font \"GeneralUser.sf2\" 128 25 40 amp=72 pan=0\t# TR-909 Snare 2\n41 %font \"GeneralUser.sf2\" 128 25 41 amp=67 pan=-47\t# Sine-750Hz\n42 %font \"GeneralUser.sf2\" 128 25 42 amp=68 pan=31\t# TR-808 Hi-Hat\n43 %font \"GeneralUser.sf2\" 128 25 43 amp=69 pan=-28\t# Sine-750Hz\n44 %font \"GeneralUser.sf2\" 128 25 44 amp=86 pan=31\t# TR-808 Hi-Hat\n45 %font \"GeneralUser.sf2\" 128 25 45 amp=101 pan=-9\t# Sine-750Hz\n46 %font \"GeneralUser.sf2\" 128 25 46 amp=38 pan=31\t# TR-909 Hi-Hat Open\n47 %font \"GeneralUser.sf2\" 128 25 47 amp=64 pan=9\t# Sine-750Hz\n48 %font \"GeneralUser.sf2\" 128 25 48 amp=72 pan=28\t# Sine-750Hz\n49 %font \"GeneralUser.sf2\" 128 25 49 amp=76 pan=31\t# TR-808 Hi-Hat Crash Cymbal\n50 %font \"GeneralUser.sf2\" 128 25 50 amp=135 pan=47\t# Sine-750Hz\n51 %font \"GeneralUser.sf2\" 128 25 51 amp=111 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 25 52 amp=55 pan=-31\t# Chinese Cymbal\n53 %font \"GeneralUser.sf2\" 128 25 53 amp=27 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 25 54 amp=107 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 25 55 amp=55 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 25 56 amp=32 pan=31\t# TR-808 Cowbell\n57 %font \"GeneralUser.sf2\" 128 25 57 amp=140 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 25 58 amp=81 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 25 59 amp=50 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 25 60 amp=28 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 25 61 amp=89 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 25 62 amp=33 pan=-39\t# Sine-750Hz\n63 %font \"GeneralUser.sf2\" 128 25 63 amp=76 pan=-31\t# Sine-750Hz\n64 %font \"GeneralUser.sf2\" 128 25 64 amp=69 pan=-23\t# Sine-750Hz\n65 %font \"GeneralUser.sf2\" 128 25 65 amp=82 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 25 66 amp=64 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 25 67 amp=63 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 25 68 amp=71 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 25 69 amp=124 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 25 70 amp=70 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 25 71 amp=37 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 25 72 amp=40 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 25 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 25 74 amp=116 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 25 75 amp=111 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 25 76 amp=90 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 25 77 amp=62 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 25 78 amp=51 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 25 79 amp=72 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 25 80 amp=36 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 25 81 amp=9 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 25 82 amp=61 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 25 83 amp=71 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 25 84 amp=40 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 25 85 amp=106 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 25 86 amp=62 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 25 87 amp=143 pan=-31\t# Surdo Open\n\ndrumset 26\n21 %font \"GeneralUser.sf2\" 128 26 21 amp=100 pan=0\t# WhiteNoiseWave FilterSnap\n23 %font \"GeneralUser.sf2\" 128 26 23 amp=268 pan=0\t# FilterSnap WhiteNoiseWave\n24 %font \"GeneralUser.sf2\" 128 26 24 amp=76 pan=0\t# WhiteNoiseWave FilterSnap\n27 %font \"GeneralUser.sf2\" 128 26 27 amp=52 pan=-23\t# Filter Snap\n28 %font \"GeneralUser.sf2\" 128 26 28 amp=167 pan=31\t# Slap\n29 %font \"GeneralUser.sf2\" 128 26 29 amp=52 pan=-16\t# Scratch Push\n30 %font \"GeneralUser.sf2\" 128 26 30 amp=66 pan=-16\t# Scratch Pull\n31 %font \"GeneralUser.sf2\" 128 26 31 amp=97 pan=0\t# Sticks\n32 %font \"GeneralUser.sf2\" 128 26 32 amp=315 pan=-16\t# Square Click\n33 %font \"GeneralUser.sf2\" 128 26 33 amp=77 pan=0\t# TR-808 Click\n34 %font \"GeneralUser.sf2\" 128 26 34 amp=45 pan=0\t# TR-808 Click Carillon-C6\n35 %font \"GeneralUser.sf2\" 128 26 35 amp=236 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n36 %font \"GeneralUser.sf2\" 128 26 36 amp=94 pan=0\t# TR-909 Kick TR-909 Kick\n37 %font \"GeneralUser.sf2\" 128 26 37 amp=90 pan=0\t# Rim Shot\n38 %font \"GeneralUser.sf2\" 128 26 38 amp=93 pan=0\t# Dance Snare\n39 %font \"GeneralUser.sf2\" 128 26 39 amp=68 pan=-16\t# Synth Hand Clap\n40 %font \"GeneralUser.sf2\" 128 26 40 amp=142 pan=0\t# TR-909 Snare 2\n41 %font \"GeneralUser.sf2\" 128 26 41 amp=80 pan=-47\t# Electric Tom\n42 %font \"GeneralUser.sf2\" 128 26 42 amp=110 pan=31\t# TR-808 Hi-Hat\n43 %font \"GeneralUser.sf2\" 128 26 43 amp=81 pan=-28\t# Electric Tom\n44 %font \"GeneralUser.sf2\" 128 26 44 amp=35 pan=31\t# TR-808 Hi-Hat\n45 %font \"GeneralUser.sf2\" 128 26 45 amp=84 pan=-9\t# Electric Tom\n46 %font \"GeneralUser.sf2\" 128 26 46 amp=54 pan=31\t# TR-909 Hi-Hat Open\n47 %font \"GeneralUser.sf2\" 128 26 47 amp=83 pan=9\t# Electric Tom\n48 %font \"GeneralUser.sf2\" 128 26 48 amp=82 pan=28\t# Electric Tom\n49 %font \"GeneralUser.sf2\" 128 26 49 amp=116 pan=31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n50 %font \"GeneralUser.sf2\" 128 26 50 amp=35 pan=47\t# Electric Tom\n51 %font \"GeneralUser.sf2\" 128 26 51 amp=113 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 26 52 amp=69 pan=-31\t# Reverse Cymbal\n53 %font \"GeneralUser.sf2\" 128 26 53 amp=62 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 26 54 amp=64 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 26 55 amp=61 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 26 56 amp=57 pan=31\t# Cowbell\n57 %font \"GeneralUser.sf2\" 128 26 57 amp=136 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 26 58 amp=80 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 26 59 amp=51 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 26 60 amp=17 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 26 61 amp=75 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 26 62 amp=31 pan=-39\t# Conga High Muted\n63 %font \"GeneralUser.sf2\" 128 26 63 amp=106 pan=-39\t# Conga High Open\n64 %font \"GeneralUser.sf2\" 128 26 64 amp=73 pan=-31\t# Tumba Low\n65 %font \"GeneralUser.sf2\" 128 26 65 amp=127 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 26 66 amp=98 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 26 67 amp=63 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 26 68 amp=71 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 26 69 amp=40 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 26 70 amp=44 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 26 71 amp=37 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 26 72 amp=40 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 26 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 26 74 amp=46 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 26 75 amp=145 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 26 76 amp=90 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 26 77 amp=64 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 26 78 amp=51 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 26 79 amp=72 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 26 80 amp=36 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 26 81 amp=9 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 26 82 amp=98 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 26 83 amp=114 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 26 84 amp=39 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 26 85 amp=106 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 26 86 amp=62 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 26 87 amp=101 pan=-31\t# Surdo Open\n\ndrumset 27\n29 %font \"GeneralUser.sf2\" 128 25 29 amp=43 pan=-16\t# TR-909 Scratch Pull\n30 %font \"GeneralUser.sf2\" 128 25 30 amp=57 pan=-16\t# TR-909 Scratch Push\n35 %font \"GeneralUser.sf2\" 128 25 35 amp=100 pan=0\t# Sine-93.75Hz\n36 %font \"GeneralUser.sf2\" 128 25 36 amp=88 pan=0\t# TR-909 Kick\n37 %font \"GeneralUser.sf2\" 128 25 37 amp=293 pan=0\t# TR-808 Click\n38 %font \"GeneralUser.sf2\" 128 25 38 amp=87 pan=0\t# TR-909 Snare 1\n39 %font \"GeneralUser.sf2\" 128 25 39 amp=66 pan=-16\t# Synth Hand Clap\n40 %font \"GeneralUser.sf2\" 128 25 40 amp=81 pan=0\t# TR-909 Snare 2\n41 %font \"GeneralUser.sf2\" 128 25 41 amp=105 pan=-47\t# Sine-750Hz\n42 %font \"GeneralUser.sf2\" 128 25 42 amp=110 pan=31\t# TR-808 Hi-Hat\n43 %font \"GeneralUser.sf2\" 128 25 43 amp=135 pan=-28\t# Sine-750Hz\n44 %font \"GeneralUser.sf2\" 128 25 44 amp=64 pan=31\t# TR-808 Hi-Hat\n45 %font \"GeneralUser.sf2\" 128 25 45 amp=98 pan=-9\t# Sine-750Hz\n46 %font \"GeneralUser.sf2\" 128 25 46 amp=34 pan=31\t# TR-909 Hi-Hat Open\n47 %font \"GeneralUser.sf2\" 128 25 47 amp=57 pan=9\t# Sine-750Hz\n48 %font \"GeneralUser.sf2\" 128 25 48 amp=145 pan=28\t# Sine-750Hz\n49 %font \"GeneralUser.sf2\" 128 25 49 amp=97 pan=31\t# TR-808 Hi-Hat Crash Cymbal\n50 %font \"GeneralUser.sf2\" 128 25 50 amp=32 pan=47\t# Sine-750Hz\n51 %font \"GeneralUser.sf2\" 128 25 51 amp=113 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 25 52 amp=54 pan=-31\t# Chinese Cymbal\n53 %font \"GeneralUser.sf2\" 128 25 53 amp=27 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 25 54 amp=33 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 25 55 amp=89 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 25 56 amp=96 pan=31\t# TR-808 Cowbell\n57 %font \"GeneralUser.sf2\" 128 25 57 amp=141 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 25 58 amp=58 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 25 59 amp=49 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 25 60 amp=129 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 25 61 amp=89 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 25 62 amp=33 pan=-39\t# Sine-750Hz\n63 %font \"GeneralUser.sf2\" 128 25 63 amp=81 pan=-39\t# Sine-750Hz\n64 %font \"GeneralUser.sf2\" 128 25 64 amp=102 pan=-31\t# Sine-750Hz\n65 %font \"GeneralUser.sf2\" 128 25 65 amp=82 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 25 66 amp=64 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 25 67 amp=63 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 25 68 amp=71 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 25 69 amp=122 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 25 70 amp=126 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 25 71 amp=37 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 25 72 amp=40 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 25 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 25 74 amp=116 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 25 75 amp=64 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 25 76 amp=56 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 25 77 amp=62 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 25 78 amp=51 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 25 79 amp=72 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 25 80 amp=163 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 25 81 amp=46 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 25 82 amp=98 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 25 83 amp=71 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 25 84 amp=41 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 25 85 amp=106 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 25 86 amp=63 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 25 87 amp=144 pan=-31\t# Surdo Open\n\ndrumset 28\n29 %font \"GeneralUser.sf2\" 128 25 29 amp=44 pan=-16\t# TR-909 Scratch Pull\n30 %font \"GeneralUser.sf2\" 128 25 30 amp=91 pan=-16\t# TR-909 Scratch Push\n35 %font \"GeneralUser.sf2\" 128 25 35 amp=100 pan=0\t# Sine-93.75Hz\n36 %font \"GeneralUser.sf2\" 128 25 36 amp=85 pan=0\t# TR-909 Kick\n37 %font \"GeneralUser.sf2\" 128 25 37 amp=293 pan=0\t# TR-808 Click\n38 %font \"GeneralUser.sf2\" 128 25 38 amp=84 pan=0\t# TR-909 Snare 1\n39 %font \"GeneralUser.sf2\" 128 25 39 amp=66 pan=-16\t# Synth Hand Clap\n40 %font \"GeneralUser.sf2\" 128 25 40 amp=110 pan=0\t# TR-909 Snare 2\n41 %font \"GeneralUser.sf2\" 128 25 41 amp=126 pan=-47\t# Sine-750Hz\n42 %font \"GeneralUser.sf2\" 128 25 42 amp=76 pan=31\t# TR-808 Hi-Hat\n43 %font \"GeneralUser.sf2\" 128 25 43 amp=64 pan=-28\t# Sine-750Hz\n44 %font \"GeneralUser.sf2\" 128 25 44 amp=64 pan=31\t# TR-808 Hi-Hat\n45 %font \"GeneralUser.sf2\" 128 25 45 amp=62 pan=-9\t# Sine-750Hz\n46 %font \"GeneralUser.sf2\" 128 25 46 amp=47 pan=31\t# TR-909 Hi-Hat Open\n47 %font \"GeneralUser.sf2\" 128 25 47 amp=58 pan=9\t# Sine-750Hz\n48 %font \"GeneralUser.sf2\" 128 25 48 amp=86 pan=28\t# Sine-750Hz\n49 %font \"GeneralUser.sf2\" 128 25 49 amp=75 pan=31\t# TR-808 Hi-Hat Crash Cymbal\n50 %font \"GeneralUser.sf2\" 128 25 50 amp=67 pan=47\t# Sine-750Hz\n51 %font \"GeneralUser.sf2\" 128 25 51 amp=113 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 25 52 amp=54 pan=-31\t# Chinese Cymbal\n53 %font \"GeneralUser.sf2\" 128 25 53 amp=44 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 25 54 amp=107 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 25 55 amp=90 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 25 56 amp=59 pan=31\t# TR-808 Cowbell\n57 %font \"GeneralUser.sf2\" 128 25 57 amp=140 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 25 58 amp=58 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 25 59 amp=50 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 25 60 amp=28 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 25 61 amp=89 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 25 62 amp=52 pan=-39\t# Sine-750Hz\n63 %font \"GeneralUser.sf2\" 128 25 63 amp=76 pan=-39\t# Sine-750Hz\n64 %font \"GeneralUser.sf2\" 128 25 64 amp=72 pan=-31\t# Sine-750Hz\n65 %font \"GeneralUser.sf2\" 128 25 65 amp=82 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 25 66 amp=98 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 25 67 amp=64 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 25 68 amp=113 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 25 69 amp=40 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 25 70 amp=78 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 25 71 amp=37 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 25 72 amp=40 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 25 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 25 74 amp=116 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 25 75 amp=98 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 25 76 amp=56 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 25 77 amp=64 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 25 78 amp=51 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 25 79 amp=72 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 25 80 amp=157 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 25 81 amp=46 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 25 82 amp=61 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 25 83 amp=114 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 25 84 amp=61 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 25 85 amp=106 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 25 86 amp=64 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 25 87 amp=104 pan=-31\t# Surdo Open\n\ndrumset 29\n29 %font \"GeneralUser.sf2\" 128 25 29 amp=71 pan=-16\t# TR-909 Scratch Pull\n30 %font \"GeneralUser.sf2\" 128 25 30 amp=91 pan=-16\t# TR-909 Scratch Push\n35 %font \"GeneralUser.sf2\" 128 25 35 amp=90 pan=0\t# Sine-93.75Hz\n36 %font \"GeneralUser.sf2\" 128 25 36 amp=90 pan=0\t# TR-909 Kick\n37 %font \"GeneralUser.sf2\" 128 25 37 amp=124 pan=0\t# TR-808 Click\n38 %font \"GeneralUser.sf2\" 128 25 38 amp=235 pan=0\t# TR-909 Snare 1\n39 %font \"GeneralUser.sf2\" 128 25 39 amp=66 pan=-16\t# Synth Hand Clap\n40 %font \"GeneralUser.sf2\" 128 25 40 amp=141 pan=0\t# TR-909 Snare 2\n41 %font \"GeneralUser.sf2\" 128 25 41 amp=105 pan=-47\t# Sine-750Hz\n42 %font \"GeneralUser.sf2\" 128 25 42 amp=67 pan=31\t# TR-808 Hi-Hat\n43 %font \"GeneralUser.sf2\" 128 25 43 amp=105 pan=-28\t# Sine-750Hz\n44 %font \"GeneralUser.sf2\" 128 25 44 amp=31 pan=31\t# TR-808 Hi-Hat\n45 %font \"GeneralUser.sf2\" 128 25 45 amp=105 pan=-9\t# Sine-750Hz\n46 %font \"GeneralUser.sf2\" 128 25 46 amp=34 pan=31\t# TR-909 Hi-Hat Open\n47 %font \"GeneralUser.sf2\" 128 25 47 amp=44 pan=9\t# Sine-750Hz\n48 %font \"GeneralUser.sf2\" 128 25 48 amp=51 pan=28\t# Sine-750Hz\n49 %font \"GeneralUser.sf2\" 128 25 49 amp=144 pan=31\t# TR-808 Hi-Hat Crash Cymbal\n50 %font \"GeneralUser.sf2\" 128 25 50 amp=91 pan=47\t# Sine-750Hz\n51 %font \"GeneralUser.sf2\" 128 25 51 amp=142 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 25 52 amp=50 pan=-31\t# Chinese Cymbal\n53 %font \"GeneralUser.sf2\" 128 25 53 amp=44 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 25 54 amp=107 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 25 55 amp=61 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 25 56 amp=32 pan=31\t# TR-808 Cowbell\n57 %font \"GeneralUser.sf2\" 128 25 57 amp=119 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 25 58 amp=34 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 25 59 amp=49 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 25 60 amp=17 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 25 61 amp=75 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 25 62 amp=16 pan=-39\t# Sine-750Hz\n63 %font \"GeneralUser.sf2\" 128 25 63 amp=76 pan=-39\t# Sine-750Hz\n64 %font \"GeneralUser.sf2\" 128 25 64 amp=56 pan=-31\t# Sine-750Hz\n65 %font \"GeneralUser.sf2\" 128 25 65 amp=127 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 25 66 amp=63 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 25 67 amp=63 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 25 68 amp=71 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 25 69 amp=39 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 25 70 amp=70 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 25 71 amp=37 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 25 72 amp=40 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 25 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 25 74 amp=46 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 25 75 amp=92 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 25 76 amp=56 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 25 77 amp=101 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 25 78 amp=80 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 25 79 amp=73 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 25 80 amp=36 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 25 81 amp=9 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 25 82 amp=61 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 25 83 amp=71 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 25 84 amp=39 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 25 85 amp=106 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 25 86 amp=96 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 25 87 amp=103 pan=-31\t# Surdo Open\n\ndrumset 30\n29 %font \"GeneralUser.sf2\" 128 25 29 amp=44 pan=-16\t# TR-909 Scratch Pull\n30 %font \"GeneralUser.sf2\" 128 25 30 amp=91 pan=-16\t# TR-909 Scratch Push\n35 %font \"GeneralUser.sf2\" 128 25 35 amp=74 pan=0\t# Sine-93.75Hz\n36 %font \"GeneralUser.sf2\" 128 25 36 amp=132 pan=0\t# TR-909 Kick\n37 %font \"GeneralUser.sf2\" 128 25 37 amp=304 pan=0\t# TR-808 Click\n38 %font \"GeneralUser.sf2\" 128 25 38 amp=136 pan=0\t# TR-909 Snare 1\n39 %font \"GeneralUser.sf2\" 128 25 39 amp=45 pan=-16\t# Synth Hand Clap\n40 %font \"GeneralUser.sf2\" 128 25 40 amp=48 pan=0\t# TR-909 Snare 2\n41 %font \"GeneralUser.sf2\" 128 25 41 amp=81 pan=-47\t# Sine-750Hz\n42 %font \"GeneralUser.sf2\" 128 25 42 amp=44 pan=31\t# TR-808 Hi-Hat\n43 %font \"GeneralUser.sf2\" 128 25 43 amp=72 pan=-28\t# Sine-750Hz\n44 %font \"GeneralUser.sf2\" 128 25 44 amp=42 pan=31\t# TR-808 Hi-Hat\n45 %font \"GeneralUser.sf2\" 128 25 45 amp=68 pan=-9\t# Sine-750Hz\n46 %font \"GeneralUser.sf2\" 128 25 46 amp=31 pan=31\t# TR-909 Hi-Hat Open\n47 %font \"GeneralUser.sf2\" 128 25 47 amp=43 pan=9\t# Sine-750Hz\n48 %font \"GeneralUser.sf2\" 128 25 48 amp=46 pan=28\t# Sine-750Hz\n49 %font \"GeneralUser.sf2\" 128 25 49 amp=90 pan=31\t# TR-808 Hi-Hat Crash Cymbal\n50 %font \"GeneralUser.sf2\" 128 25 50 amp=86 pan=47\t# Sine-750Hz\n51 %font \"GeneralUser.sf2\" 128 25 51 amp=142 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 25 52 amp=70 pan=-31\t# Chinese Cymbal\n53 %font \"GeneralUser.sf2\" 128 25 53 amp=46 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 25 54 amp=108 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 25 55 amp=62 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 25 56 amp=52 pan=31\t# TR-808 Cowbell\n57 %font \"GeneralUser.sf2\" 128 25 57 amp=122 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 25 58 amp=34 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 25 59 amp=50 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 25 60 amp=99 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 25 61 amp=77 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 25 62 amp=15 pan=-39\t# Sine-750Hz\n63 %font \"GeneralUser.sf2\" 128 25 63 amp=75 pan=-39\t# Sine-750Hz\n64 %font \"GeneralUser.sf2\" 128 25 64 amp=53 pan=-31\t# Sine-750Hz\n65 %font \"GeneralUser.sf2\" 128 25 65 amp=82 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 25 66 amp=65 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 25 67 amp=63 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 25 68 amp=113 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 25 69 amp=123 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 25 70 amp=70 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 25 71 amp=37 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 25 72 amp=40 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 25 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 25 74 amp=117 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 25 75 amp=82 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 25 76 amp=91 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 25 77 amp=101 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 25 78 amp=80 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 25 79 amp=73 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 25 80 amp=36 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 25 81 amp=9 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 25 82 amp=61 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 25 83 amp=114 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 25 84 amp=60 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 25 85 amp=106 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 25 86 amp=65 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 25 87 amp=144 pan=-31\t# Surdo Open\n\ndrumset 32\n27 %font \"GeneralUser.sf2\" 128 32 27 amp=36 pan=-23\t# Filter Snap\n28 %font \"GeneralUser.sf2\" 128 32 28 amp=104 pan=31\t# Slap\n29 %font \"GeneralUser.sf2\" 128 32 29 amp=71 pan=-16\t# Scratch Push\n30 %font \"GeneralUser.sf2\" 128 32 30 amp=80 pan=-16\t# Scratch Pull\n31 %font \"GeneralUser.sf2\" 128 32 31 amp=97 pan=0\t# Sticks\n32 %font \"GeneralUser.sf2\" 128 32 32 amp=433 pan=-16\t# Square Click\n33 %font \"GeneralUser.sf2\" 128 32 33 amp=76 pan=0\t# TR-808 Click\n34 %font \"GeneralUser.sf2\" 128 32 34 amp=45 pan=0\t# TR-808 Click Carillon-C6\n35 %font \"GeneralUser.sf2\" 128 32 35 amp=169 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n36 %font \"GeneralUser.sf2\" 128 32 36 amp=156 pan=0\t# Jazz Bass Drum Jazz Bass Drum Jazz Bass Drum Jazz Bass Drum Standard Kick 1 Standard Kick 1 Standard Kick 1\n37 %font \"GeneralUser.sf2\" 128 32 37 amp=115 pan=0\t# Jazz Rim Shot Jazz Rim Shot Jazz Rim Shot Jazz Rim Shot Rim Shot\n38 %font \"GeneralUser.sf2\" 128 32 38 amp=95 pan=0\t# Jazz Snare Soft 1 Jazz Snare Soft 1 Jazz Snare Soft 2 Jazz Snare Hard Jazz Snare Hard\n39 %font \"GeneralUser.sf2\" 128 32 39 amp=92 pan=-16\t# Hand Clap\n40 %font \"GeneralUser.sf2\" 128 32 40 amp=132 pan=0\t# Brush Snare Brush Snare Brush Snare Standard Snare 2 Standard Snare 2 Standard Snare 2\n41 %font \"GeneralUser.sf2\" 128 32 41 amp=123 pan=-47\t# Standard Tom 5 Standard Tom 5 Standard Tom 5 Standard Tom 5 Standard Tom 5\n42 %font \"GeneralUser.sf2\" 128 32 42 amp=37 pan=31\t# Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Soft Hi-Hat Closed Soft Hi-Hat Closed Soft\n43 %font \"GeneralUser.sf2\" 128 32 43 amp=131 pan=-28\t# Standard Tom 5 Standard Tom 5 Standard Tom 5 Standard Tom 5 Standard Tom 5\n44 %font \"GeneralUser.sf2\" 128 32 44 amp=50 pan=31\t# Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Dead Air\n45 %font \"GeneralUser.sf2\" 128 32 45 amp=118 pan=-9\t# Standard Tom 4 Standard Tom 4 Standard Tom 4 Standard Tom 4 Standard Tom 4\n46 %font \"GeneralUser.sf2\" 128 32 46 amp=30 pan=31\t# Hi-Hat Open Hi-Hat Open Attack Hi-Hat Open Attack\n47 %font \"GeneralUser.sf2\" 128 32 47 amp=97 pan=9\t# Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3\n48 %font \"GeneralUser.sf2\" 128 32 48 amp=84 pan=28\t# Standard Tom 2 Standard Tom 2 Standard Tom 2 Standard Tom 2 Standard Tom 2\n49 %font \"GeneralUser.sf2\" 128 32 49 amp=176 pan=31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n50 %font \"GeneralUser.sf2\" 128 32 50 amp=50 pan=47\t# Standard Tom 1 Standard Tom 1 Standard Tom 1 Standard Tom 1 Standard Tom 1\n51 %font \"GeneralUser.sf2\" 128 32 51 amp=73 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 32 52 amp=32 pan=-31\t# Chinese Cymbal\n53 %font \"GeneralUser.sf2\" 128 32 53 amp=27 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 32 54 amp=68 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 32 55 amp=55 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 32 56 amp=103 pan=31\t# Cowbell\n57 %font \"GeneralUser.sf2\" 128 32 57 amp=136 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 32 58 amp=81 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 32 59 amp=69 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 32 60 amp=98 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 32 61 amp=77 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 32 62 amp=31 pan=-39\t# Conga High Muted\n63 %font \"GeneralUser.sf2\" 128 32 63 amp=68 pan=-39\t# Conga High Open\n64 %font \"GeneralUser.sf2\" 128 32 64 amp=74 pan=-31\t# Tumba Low\n65 %font \"GeneralUser.sf2\" 128 32 65 amp=127 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 32 66 amp=64 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 32 67 amp=63 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 32 68 amp=71 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 32 69 amp=39 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 32 70 amp=28 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 32 71 amp=60 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 32 72 amp=65 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 32 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 32 74 amp=43 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 32 75 amp=92 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 32 76 amp=56 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 32 77 amp=64 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 32 78 amp=39 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 32 79 amp=43 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 32 80 amp=45 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 32 81 amp=11 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 32 82 amp=96 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 32 83 amp=71 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 32 84 amp=40 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 32 85 amp=162 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 32 86 amp=67 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 32 87 amp=98 pan=-31\t# Surdo Open\n\ndrumset 40\n27 %font \"GeneralUser.sf2\" 128 40 27 amp=36 pan=-23\t# Filter Snap\n28 %font \"GeneralUser.sf2\" 128 40 28 amp=104 pan=31\t# Slap\n29 %font \"GeneralUser.sf2\" 128 40 29 amp=44 pan=-16\t# Scratch Push\n30 %font \"GeneralUser.sf2\" 128 40 30 amp=50 pan=-16\t# Scratch Pull\n31 %font \"GeneralUser.sf2\" 128 40 31 amp=155 pan=0\t# Sticks\n32 %font \"GeneralUser.sf2\" 128 40 32 amp=436 pan=-16\t# Square Click\n33 %font \"GeneralUser.sf2\" 128 40 33 amp=121 pan=0\t# TR-808 Click\n34 %font \"GeneralUser.sf2\" 128 40 34 amp=45 pan=0\t# TR-808 Click Carillon-C6\n35 %font \"GeneralUser.sf2\" 128 40 35 amp=133 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n36 %font \"GeneralUser.sf2\" 128 40 36 amp=104 pan=0\t# Jazz Bass Drum Jazz Bass Drum Jazz Bass Drum Jazz Bass Drum Standard Kick 1 Standard Kick 1 Standard Kick 1\n37 %font \"GeneralUser.sf2\" 128 40 37 amp=72 pan=0\t# Jazz Rim Shot Jazz Rim Shot Jazz Rim Shot Jazz Rim Shot Rim Shot\n38 %font \"GeneralUser.sf2\" 128 40 38 amp=37 pan=0\t# Brush Snare Brush Snare Brush Snare\n39 %font \"GeneralUser.sf2\" 128 40 39 amp=90 pan=0\t# Brush Snare Brush Snare Brush Snare Standard Snare 2 Standard Snare 2 Standard Snare 2\n40 %font \"GeneralUser.sf2\" 128 40 40 amp=16 pan=0\t# Brush Swirl\n41 %font \"GeneralUser.sf2\" 128 40 41 amp=138 pan=-47\t# Brushed Tom Brushed Tom Brushed Tom Brushed Tom\n42 %font \"GeneralUser.sf2\" 128 40 42 amp=36 pan=31\t# Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Soft Hi-Hat Closed Soft Hi-Hat Closed Soft\n43 %font \"GeneralUser.sf2\" 128 40 43 amp=111 pan=-28\t# Brushed Tom Brushed Tom Brushed Tom Brushed Tom\n44 %font \"GeneralUser.sf2\" 128 40 44 amp=31 pan=31\t# Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Dead Air\n45 %font \"GeneralUser.sf2\" 128 40 45 amp=157 pan=-9\t# Brushed Tom Brushed Tom Brushed Tom Brushed Tom\n46 %font \"GeneralUser.sf2\" 128 40 46 amp=39 pan=31\t# Hi-Hat Open Hi-Hat Open Attack Hi-Hat Open Attack\n47 %font \"GeneralUser.sf2\" 128 40 47 amp=104 pan=9\t# Brushed Tom Brushed Tom Brushed Tom Brushed Tom\n48 %font \"GeneralUser.sf2\" 128 40 48 amp=101 pan=28\t# Brushed Tom Brushed Tom Brushed Tom Brushed Tom\n49 %font \"GeneralUser.sf2\" 128 40 49 amp=183 pan=31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n50 %font \"GeneralUser.sf2\" 128 40 50 amp=54 pan=47\t# Brushed Tom Brushed Tom Brushed Tom Brushed Tom\n51 %font \"GeneralUser.sf2\" 128 40 51 amp=49 pan=-31\t# Ride Cymbal\n52 %font \"GeneralUser.sf2\" 128 40 52 amp=71 pan=-31\t# Chinese Cymbal\n53 %font \"GeneralUser.sf2\" 128 40 53 amp=110 pan=-31\t# Ride Bell\n54 %font \"GeneralUser.sf2\" 128 40 54 amp=19 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 40 55 amp=55 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 40 56 amp=106 pan=31\t# Cowbell\n57 %font \"GeneralUser.sf2\" 128 40 57 amp=121 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 40 58 amp=34 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 40 59 amp=60 pan=-31\t# Ride Cymbal\n60 %font \"GeneralUser.sf2\" 128 40 60 amp=98 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 40 61 amp=78 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 40 62 amp=31 pan=-39\t# Conga High Muted\n63 %font \"GeneralUser.sf2\" 128 40 63 amp=69 pan=-39\t# Conga High Open\n64 %font \"GeneralUser.sf2\" 128 40 64 amp=48 pan=-31\t# Tumba Low\n65 %font \"GeneralUser.sf2\" 128 40 65 amp=82 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 40 66 amp=98 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 40 67 amp=63 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 40 68 amp=71 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 40 69 amp=40 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 40 70 amp=28 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 40 71 amp=37 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 40 72 amp=65 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 40 73 amp=77 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 40 74 amp=43 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 40 75 amp=92 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 40 76 amp=56 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 40 77 amp=63 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 40 78 amp=39 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 40 79 amp=43 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 40 80 amp=46 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 40 81 amp=11 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 40 82 amp=96 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 40 83 amp=71 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 40 84 amp=40 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 40 85 amp=162 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 40 86 amp=67 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 40 87 amp=144 pan=-31\t# Surdo Open\n\ndrumset 48\n27 %font \"GeneralUser.sf2\" 128 48 27 amp=38 pan=31\t# Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Soft Hi-Hat Closed Soft Hi-Hat Closed Soft\n28 %font \"GeneralUser.sf2\" 128 48 28 amp=63 pan=31\t# Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal\n29 %font \"GeneralUser.sf2\" 128 48 29 amp=31 pan=31\t# Hi-Hat Open Hi-Hat Open Attack Hi-Hat Open Attack\n30 %font \"GeneralUser.sf2\" 128 48 30 amp=52 pan=-31\t# Ride Cymbal\n31 %font \"GeneralUser.sf2\" 128 48 31 amp=23 pan=0\t# Sticks\n32 %font \"GeneralUser.sf2\" 128 48 32 amp=351 pan=-16\t# Square Click\n33 %font \"GeneralUser.sf2\" 128 48 33 amp=61 pan=0\t# TR-808 Click\n34 %font \"GeneralUser.sf2\" 128 48 34 amp=37 pan=0\t# TR-808 Click Carillon-C6\n35 %font \"GeneralUser.sf2\" 128 48 35 amp=154 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n36 %font \"GeneralUser.sf2\" 128 48 36 amp=67 pan=0\t# Taiko Drum Timpani Hard Timpani Hard Timpani Hard Timpani Hard\n37 %font \"GeneralUser.sf2\" 128 48 37 amp=16 pan=0\t# Rim Shot\n38 %font \"GeneralUser.sf2\" 128 48 38 amp=55 pan=-31\t# Orchestral Snare Orchestral Snare Orchestral Snare Orchestral Snare\n39 %font \"GeneralUser.sf2\" 128 48 39 amp=70 pan=-47\t# Castanets\n40 %font \"GeneralUser.sf2\" 128 48 40 amp=55 pan=0\t# Orchestral Snare Orchestral Snare Orchestral Snare Orchestral Snare\n41 %font \"GeneralUser.sf2\" 128 48 41 amp=200 pan=-47\t# Timpani Hard Timpani Hard Timpani Hard Timpani Soft Timpani Soft Timpani Hard Timpani Hard Timpani Soft\n42 %font \"GeneralUser.sf2\" 0 47 amp=197 pan=-47\n43 %font \"GeneralUser.sf2\" 0 47 amp=123 pan=-47\n44 %font \"GeneralUser.sf2\" 0 47 amp=191 pan=-47\n45 %font \"GeneralUser.sf2\" 0 47 amp=112 pan=-47\n46 %font \"GeneralUser.sf2\" 0 47 amp=181 pan=-47\n47 %font \"GeneralUser.sf2\" 0 47 amp=108 pan=-47\n48 %font \"GeneralUser.sf2\" 0 47 amp=168 pan=-47\n49 %font \"GeneralUser.sf2\" 0 47 amp=166 pan=-47\n50 %font \"GeneralUser.sf2\" 0 47 amp=159 pan=-47\n51 %font \"GeneralUser.sf2\" 0 47 amp=93 pan=-47\n52 %font \"GeneralUser.sf2\" 0 47 amp=91 pan=-47\n53 %font \"GeneralUser.sf2\" 0 47 amp=89 pan=-47\n54 %font \"GeneralUser.sf2\" 128 48 54 amp=72 pan=16\t# Tambourine\n55 %font \"GeneralUser.sf2\" 128 48 55 amp=63 pan=-16\t# Splash Cymbal\n56 %font \"GeneralUser.sf2\" 128 48 56 amp=95 pan=31\t# Cowbell\n57 %font \"GeneralUser.sf2\" 128 48 57 amp=122 pan=-31\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n58 %font \"GeneralUser.sf2\" 128 48 58 amp=27 pan=-55\t# Vibra Slap\n59 %font \"GeneralUser.sf2\" 128 48 59 amp=99 pan=-47\t# Orchestral Cymbal\n60 %font \"GeneralUser.sf2\" 128 48 60 amp=16 pan=55\t# Bongo Rim\n61 %font \"GeneralUser.sf2\" 128 48 61 amp=115 pan=55\t# Bongo Tone\n62 %font \"GeneralUser.sf2\" 128 48 62 amp=43 pan=-39\t# Conga High Muted\n63 %font \"GeneralUser.sf2\" 128 48 63 amp=66 pan=-39\t# Conga High Open\n64 %font \"GeneralUser.sf2\" 128 48 64 amp=48 pan=-31\t# Tumba Low\n65 %font \"GeneralUser.sf2\" 128 48 65 amp=66 pan=31\t# Timbale Rim\n66 %font \"GeneralUser.sf2\" 128 48 66 amp=53 pan=31\t# Timbale Low\n67 %font \"GeneralUser.sf2\" 128 48 67 amp=91 pan=-55\t# Agogo Agogo Agogo\n68 %font \"GeneralUser.sf2\" 128 48 68 amp=101 pan=-55\t# Agogo Agogo Agogo\n69 %font \"GeneralUser.sf2\" 128 48 69 amp=30 pan=-55\t# Cabasa\n70 %font \"GeneralUser.sf2\" 128 48 70 amp=24 pan=-63\t# Maracas\n71 %font \"GeneralUser.sf2\" 128 48 71 amp=28 pan=55\t# Whistle Short\n72 %font \"GeneralUser.sf2\" 128 48 72 amp=29 pan=55\t# Whistle Long\n73 %font \"GeneralUser.sf2\" 128 48 73 amp=58 pan=47\t# Guiro Short\n74 %font \"GeneralUser.sf2\" 128 48 74 amp=65 pan=47\t# Guiro Long\n75 %font \"GeneralUser.sf2\" 128 48 75 amp=72 pan=31\t# Claves\n76 %font \"GeneralUser.sf2\" 128 48 76 amp=43 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n77 %font \"GeneralUser.sf2\" 128 48 77 amp=48 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n78 %font \"GeneralUser.sf2\" 128 48 78 amp=32 pan=-31\t# Cuica Mute\n79 %font \"GeneralUser.sf2\" 128 48 79 amp=35 pan=-31\t# Cuica Open\n80 %font \"GeneralUser.sf2\" 128 48 80 amp=36 pan=-63\t# Triangle (Perc)\n81 %font \"GeneralUser.sf2\" 128 48 81 amp=14 pan=-63\t# Triangle (Perc)\n82 %font \"GeneralUser.sf2\" 128 48 82 amp=71 pan=47\t# Shaker\n83 %font \"GeneralUser.sf2\" 128 48 83 amp=54 pan=55\t# Jingle Bell\n84 %font \"GeneralUser.sf2\" 128 48 84 amp=32 pan=63\t# Bell Tree\n85 %font \"GeneralUser.sf2\" 128 48 85 amp=81 pan=-47\t# Castanets\n86 %font \"GeneralUser.sf2\" 128 48 86 amp=52 pan=-31\t# Surdo Muted\n87 %font \"GeneralUser.sf2\" 128 48 87 amp=118 pan=-31\t# Surdo Open\n88 %font \"GeneralUser.sf2\" 128 48 88 amp=55 pan=0\t# Applause\n\ndrumset 49\n30 %font \"GeneralUser.sf2\" 128 0 38 amp=109 pan=-31\t# Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Jazz Snare Soft 1 Jazz Snare Soft 1\n31 %font \"GeneralUser.sf2\" 128 0 49 amp=110 pan=-47\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n32 %font \"GeneralUser.sf2\" 128 0 35 amp=27 pan=-63\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n33 %font \"GeneralUser.sf2\" 0 116 amp=42 pan=55\n36 %font \"GeneralUser.sf2\" 128 0 47 amp=110 pan=0\t# Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3\n38 %font \"GeneralUser.sf2\" 128 0 47 amp=216 pan=-31\t# Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3\n39 %font \"GeneralUser.sf2\" 128 0 47 amp=100 pan=63\t# Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3\n40 %font \"GeneralUser.sf2\" 128 0 47 amp=75 pan=63\t# Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3\n41 %font \"GeneralUser.sf2\" 128 0 47 amp=140 pan=31\t# Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3\n42 %font \"GeneralUser.sf2\" 128 0 63 amp=59 pan=47\t# Conga High Open\n43 %font \"GeneralUser.sf2\" 128 0 64 amp=81 pan=47\t# Tumba Low\n44 %font \"GeneralUser.sf2\" 128 0 47 amp=152 pan=63\t# Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3\n49 %font \"GeneralUser.sf2\" 128 0 52 amp=45 pan=-47\t# Chinese Cymbal\n50 %font \"GeneralUser.sf2\" 128 0 52 amp=177 pan=31\t# Chinese Cymbal\n51 %font \"GeneralUser.sf2\" 128 0 47 amp=247 pan=47\t# Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3\n52 %font \"GeneralUser.sf2\" 128 0 47 amp=260 pan=47\t# Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3\n54 %font \"GeneralUser.sf2\" 128 0 64 amp=60 pan=23\t# Tumba Low\n55 %font \"GeneralUser.sf2\" 128 0 64 amp=55 pan=47\t# Tumba Low\n56 %font \"GeneralUser.sf2\" 128 0 64 amp=30 pan=47\t# Tumba Low\n57 %font \"GeneralUser.sf2\" 128 0 60 amp=97 pan=-47\t# Bongo Rim\n58 %font \"GeneralUser.sf2\" 128 0 61 amp=56 pan=-47\t# Bongo Tone\n59 %font \"GeneralUser.sf2\" 128 0 63 amp=27 pan=-47\t# Conga High Open\n60 %font \"GeneralUser.sf2\" 128 0 64 amp=55 pan=-47\t# Tumba Low\n61 %font \"GeneralUser.sf2\" 128 0 62 amp=99 pan=-31\t# Conga High Muted\n62 %font \"GeneralUser.sf2\" 128 0 47 amp=159 pan=31\t# Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3\n63 %font \"GeneralUser.sf2\" 128 0 47 amp=175 pan=31\t# Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3 Standard Tom 3\n64 %font \"GeneralUser.sf2\" 128 0 64 amp=23 pan=-16\t# Tumba Low\n65 %font \"GeneralUser.sf2\" 128 0 60 amp=203 pan=-31\t# Bongo Rim\n67 %font \"GeneralUser.sf2\" 128 0 66 amp=76 pan=31\t# Timbale Low\n68 %font \"GeneralUser.sf2\" 128 0 66 amp=28 pan=39\t# Timbale Low\n69 %font \"GeneralUser.sf2\" 128 0 65 amp=69 pan=39\t# Timbale Rim\n70 %font \"GeneralUser.sf2\" 128 0 56 amp=74 pan=31\t# Cowbell\n71 %font \"GeneralUser.sf2\" 128 0 60 amp=93 pan=55\t# Bongo Rim\n72 %font \"GeneralUser.sf2\" 128 0 61 amp=91 pan=47\t# Bongo Tone\n73 %font \"GeneralUser.sf2\" 128 0 62 amp=58 pan=-31\t# Conga High Muted\n74 %font \"GeneralUser.sf2\" 128 0 63 amp=139 pan=-31\t# Conga High Open\n75 %font \"GeneralUser.sf2\" 128 0 64 amp=29 pan=-39\t# Tumba Low\n76 %font \"GeneralUser.sf2\" 128 0 64 amp=48 pan=-39\t# Tumba Low\n77 %font \"GeneralUser.sf2\" 128 0 64 amp=50 pan=-39\t# Tumba Low\n78 %font \"GeneralUser.sf2\" 128 0 64 amp=64 pan=-39\t# Tumba Low\n79 %font \"GeneralUser.sf2\" 0 116 amp=125 pan=63\n80 %font \"GeneralUser.sf2\" 0 116 amp=56 pan=63\n81 %font \"GeneralUser.sf2\" 0 116 amp=96 pan=-31\n82 %font \"GeneralUser.sf2\" 0 116 amp=66 pan=-31\n83 %font \"GeneralUser.sf2\" 128 0 54 amp=186 pan=8\t# Tambourine\n84 %font \"GeneralUser.sf2\" 128 0 67 amp=56 pan=-55\t# Agogo Agogo Agogo\n85 %font \"GeneralUser.sf2\" 128 0 68 amp=63 pan=-55\t# Agogo Agogo Agogo\n87 %font \"GeneralUser.sf2\" 128 0 71 amp=70 pan=55\t# Whistle Short\n88 %font \"GeneralUser.sf2\" 128 0 72 amp=39 pan=55\t# Whistle Long\n89 %font \"GeneralUser.sf2\" 128 0 78 amp=36 pan=-31\t# Cuica Mute\n90 %font \"GeneralUser.sf2\" 128 0 79 amp=39 pan=-31\t# Cuica Open\n91 %font \"GeneralUser.sf2\" 128 0 80 amp=43 pan=-63\t# Triangle (Perc)\n92 %font \"GeneralUser.sf2\" 128 0 81 amp=24 pan=-63\t# Triangle (Perc)\n93 %font \"GeneralUser.sf2\" 128 0 73 amp=63 pan=47\t# Guiro Short\n94 %font \"GeneralUser.sf2\" 128 0 74 amp=33 pan=47\t# Guiro Long\n95 %font \"GeneralUser.sf2\" 128 0 69 amp=44 pan=-55\t# Cabasa\n96 %font \"GeneralUser.sf2\" 128 0 69 amp=65 pan=-55\t# Cabasa\n97 %font \"GeneralUser.sf2\" 128 0 75 amp=65 pan=31\t# Claves\n98 %font \"GeneralUser.sf2\" 128 0 76 amp=79 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n99 %font \"GeneralUser.sf2\" 128 0 77 amp=88 pan=55\t# Wood Block Med Wood Block Med Wood Block Med Wood Block Med Wood Block Hard Wood Block Hard Wood Block Hard\n\ndrumset 50\n25 %font \"GeneralUser.sf2\" 128 25 36 amp=88 pan=0\t# TR-909 Kick\n26 %font \"GeneralUser.sf2\" 128 25 35 amp=186 pan=0\t# Sine-93.75Hz\n27 %font \"GeneralUser.sf2\" 128 25 36 amp=82 pan=0\t# TR-909 Kick\n28 %font \"GeneralUser.sf2\" 128 25 36 amp=90 pan=0\t# TR-909 Kick\n29 %font \"GeneralUser.sf2\" 128 25 36 amp=80 pan=0\t# TR-909 Kick\n30 %font \"GeneralUser.sf2\" 128 25 36 amp=112 pan=0\t# TR-909 Kick\n31 %font \"GeneralUser.sf2\" 128 25 35 amp=311 pan=0\t# Sine-93.75Hz\n32 %font \"GeneralUser.sf2\" 128 25 36 amp=106 pan=0\t# TR-909 Kick\n33 %font \"GeneralUser.sf2\" 128 25 35 amp=160 pan=0\t# Sine-93.75Hz\n34 %font \"GeneralUser.sf2\" 128 25 36 amp=59 pan=0\t# TR-909 Kick\n35 %font \"GeneralUser.sf2\" 128 25 35 amp=67 pan=0\t# Sine-93.75Hz\n36 %font \"GeneralUser.sf2\" 128 25 36 amp=93 pan=0\t# TR-909 Kick\n37 %font \"GeneralUser.sf2\" 128 25 35 amp=323 pan=0\t# Sine-93.75Hz\n38 %font \"GeneralUser.sf2\" 128 0 36 amp=144 pan=0\t# Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1\n39 %font \"GeneralUser.sf2\" 128 0 35 amp=282 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n40 %font \"GeneralUser.sf2\" 128 0 36 amp=159 pan=0\t# Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1\n41 %font \"GeneralUser.sf2\" 128 0 35 amp=172 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n42 %font \"GeneralUser.sf2\" 128 1 36 amp=195 pan=0\t# Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1\n43 %font \"GeneralUser.sf2\" 128 1 35 amp=148 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n44 %font \"GeneralUser.sf2\" 128 0 36 amp=174 pan=0\t# Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1\n45 %font \"GeneralUser.sf2\" 128 0 35 amp=108 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n46 %font \"GeneralUser.sf2\" 128 0 36 amp=179 pan=0\t# Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1 Standard Kick 1\n47 %font \"GeneralUser.sf2\" 128 32 36 amp=106 pan=0\t# Jazz Bass Drum Jazz Bass Drum Jazz Bass Drum Jazz Bass Drum Standard Kick 1 Standard Kick 1 Standard Kick 1\n48 %font \"GeneralUser.sf2\" 128 32 35 amp=133 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n49 %font \"GeneralUser.sf2\" 128 48 36 amp=58 pan=0\t# Taiko Drum Timpani Hard Timpani Hard Timpani Hard Timpani Hard\n50 %font \"GeneralUser.sf2\" 128 8 36 amp=45 pan=0\t# Power Kick 2 Power Kick 2 Power Kick 2 Power Kick 2\n51 %font \"GeneralUser.sf2\" 128 8 35 amp=137 pan=0\t# Power/Room Kick 1 Power/Room Kick 1 Power/Room Kick 1 Power/Room Kick 1\n52 %font \"GeneralUser.sf2\" 128 16 36 amp=92 pan=0\t# Power Kick 2 Power Kick 2 Power Kick 2 Power Kick 2\n53 %font \"GeneralUser.sf2\" 128 16 35 amp=87 pan=0\t# Power/Room Kick 1 Power/Room Kick 1 Power/Room Kick 1 Power/Room Kick 1\n54 %font \"GeneralUser.sf2\" 128 24 36 amp=94 pan=0\t# TR-909 Kick Electric Tom\n55 %font \"GeneralUser.sf2\" 128 24 35 amp=181 pan=0\t# Standard Kick 2 Standard Kick 2 Standard Kick 2 Standard Kick 2\n56 %font \"GeneralUser.sf2\" 128 24 36 amp=68 pan=0\t# TR-909 Kick Electric Tom\n57 %font \"GeneralUser.sf2\" 128 25 36 amp=87 pan=0\t# TR-909 Kick\n58 %font \"GeneralUser.sf2\" 128 25 36 amp=101 pan=0\t# TR-909 Kick\n59 %font \"GeneralUser.sf2\" 128 26 36 amp=101 pan=0\t# TR-909 Kick TR-909 Kick\n60 %font \"GeneralUser.sf2\" 128 0 38 amp=127 pan=0\t# Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Jazz Snare Soft 1 Jazz Snare Soft 1\n61 %font \"GeneralUser.sf2\" 128 0 40 amp=202 pan=0\t# Standard Snare 2 Standard Snare 2 Standard Snare 2 Standard Snare 2\n62 %font \"GeneralUser.sf2\" 128 0 38 amp=135 pan=0\t# Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Jazz Snare Soft 1 Jazz Snare Soft 1\n63 %font \"GeneralUser.sf2\" 128 0 40 amp=139 pan=0\t# Standard Snare 2 Standard Snare 2 Standard Snare 2 Standard Snare 2\n64 %font \"GeneralUser.sf2\" 128 0 38 amp=125 pan=0\t# Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Jazz Snare Soft 1 Jazz Snare Soft 1\n65 %font \"GeneralUser.sf2\" 128 48 38 amp=85 pan=0\t# Orchestral Snare Orchestral Snare Orchestral Snare Orchestral Snare\n66 %font \"GeneralUser.sf2\" 128 32 38 amp=122 pan=0\t# Jazz Snare Soft 1 Jazz Snare Soft 1 Jazz Snare Soft 2 Jazz Snare Hard Jazz Snare Hard\n67 %font \"GeneralUser.sf2\" 128 32 40 amp=118 pan=0\t# Brush Snare Brush Snare Brush Snare Standard Snare 2 Standard Snare 2 Standard Snare 2\n68 %font \"GeneralUser.sf2\" 128 8 38 amp=118 pan=0\t# Room Snare 1 Room Snare 1 Room Snare 1 Room Snare 1 Room Snare 1\n69 %font \"GeneralUser.sf2\" 128 8 40 amp=144 pan=0\t# Standard Snare 2 Standard Snare 2 Standard Snare 2 Standard Snare 2\n70 %font \"GeneralUser.sf2\" 128 16 38 amp=77 pan=0\t# Power Snare 1 Power Snare 1 Power Snare 1 Power Snare 1\n71 %font \"GeneralUser.sf2\" 128 16 40 amp=57 pan=0\t# Power Snare 2 Power Snare 2 Power Snare 2 Power Snare 2\n72 %font \"GeneralUser.sf2\" 128 24 40 amp=103 pan=0\t# Power Snare 1 Power Snare 1 Power Snare 1 Power Snare 1\n73 %font \"GeneralUser.sf2\" 128 26 38 amp=133 pan=0\t# Dance Snare\n74 %font \"GeneralUser.sf2\" 128 26 40 amp=116 pan=0\t# TR-909 Snare 2\n75 %font \"GeneralUser.sf2\" 128 26 40 amp=78 pan=0\t# TR-909 Snare 2\n76 %font \"GeneralUser.sf2\" 128 24 38 amp=64 pan=0\t# Electric Tom White Noise\n77 %font \"GeneralUser.sf2\" 128 26 38 amp=67 pan=0\t# Dance Snare\n78 %font \"GeneralUser.sf2\" 128 24 38 amp=120 pan=0\t# Electric Tom White Noise\n79 %font \"GeneralUser.sf2\" 128 24 40 amp=126 pan=0\t# Power Snare 1 Power Snare 1 Power Snare 1 Power Snare 1\n80 %font \"GeneralUser.sf2\" 128 25 38 amp=47 pan=0\t# TR-909 Snare 1\n81 %font \"GeneralUser.sf2\" 128 25 40 amp=53 pan=0\t# TR-909 Snare 2\n82 %font \"GeneralUser.sf2\" 128 25 38 amp=60 pan=0\t# TR-909 Snare 1\n83 %font \"GeneralUser.sf2\" 128 25 40 amp=77 pan=0\t# TR-909 Snare 2\n84 %font \"GeneralUser.sf2\" 128 40 38 amp=26 pan=0\t# Brush Snare Brush Snare Brush Snare\n85 %font \"GeneralUser.sf2\" 128 40 38 amp=36 pan=0\t# Brush Snare Brush Snare Brush Snare\n86 %font \"GeneralUser.sf2\" 128 40 39 amp=103 pan=0\t# Brush Snare Brush Snare Brush Snare Standard Snare 2 Standard Snare 2 Standard Snare 2\n87 %font \"GeneralUser.sf2\" 128 40 39 amp=100 pan=0\t# Brush Snare Brush Snare Brush Snare Standard Snare 2 Standard Snare 2 Standard Snare 2\n88 %font \"GeneralUser.sf2\" 128 40 39 amp=131 pan=0\t# Brush Snare Brush Snare Brush Snare Standard Snare 2 Standard Snare 2 Standard Snare 2\n89 %font \"GeneralUser.sf2\" 128 40 40 amp=19 pan=0\t# Brush Swirl\n90 %font \"GeneralUser.sf2\" 128 40 40 amp=17 pan=0\t# Brush Swirl\n91 %font \"GeneralUser.sf2\" 128 40 40 amp=23 pan=0\t# Brush Swirl\n92 %font \"GeneralUser.sf2\" 128 0 38 amp=207 pan=0\t# Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Jazz Snare Soft 1 Jazz Snare Soft 1\n93 %font \"GeneralUser.sf2\" 128 0 40 amp=413 pan=0\t# Standard Snare 2 Standard Snare 2 Standard Snare 2 Standard Snare 2\n94 %font \"GeneralUser.sf2\" 128 0 38 amp=267 pan=0\t# Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Standard Snare 1 Jazz Snare Soft 1 Jazz Snare Soft 1\n95 %font \"GeneralUser.sf2\" 128 25 38 amp=93 pan=0\t# TR-909 Snare 1\n96 %font \"GeneralUser.sf2\" 128 25 40 amp=61 pan=0\t# TR-909 Snare 2\n97 %font \"GeneralUser.sf2\" 128 25 38 amp=68 pan=0\t# TR-909 Snare 1\n98 %font \"GeneralUser.sf2\" 128 25 40 amp=80 pan=0\t# TR-909 Snare 2\n99 %font \"GeneralUser.sf2\" 128 25 38 amp=66 pan=0\t# TR-909 Snare 1\n\ndrumset 53\n32 %font \"GeneralUser.sf2\" 128 0 46 amp=51 pan=0\t# Hi-Hat Open Hi-Hat Open Attack Hi-Hat Open Attack\n33 %font \"GeneralUser.sf2\" 128 0 42 amp=61 pan=0\t# Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Soft Hi-Hat Closed Soft Hi-Hat Closed Soft\n34 %font \"GeneralUser.sf2\" 128 0 42 amp=82 pan=0\t# Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Soft Hi-Hat Closed Soft Hi-Hat Closed Soft\n35 %font \"GeneralUser.sf2\" 128 25 44 amp=170 pan=0\t# TR-808 Hi-Hat\n36 %font \"GeneralUser.sf2\" 128 0 42 amp=42 pan=0\t# Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Soft Hi-Hat Closed Soft Hi-Hat Closed Soft\n37 %font \"GeneralUser.sf2\" 128 0 42 amp=45 pan=0\t# Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Soft Hi-Hat Closed Soft Hi-Hat Closed Soft\n38 %font \"GeneralUser.sf2\" 128 0 42 amp=33 pan=0\t# Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Soft Hi-Hat Closed Soft Hi-Hat Closed Soft\n39 %font \"GeneralUser.sf2\" 128 0 42 amp=34 pan=0\t# Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Soft Hi-Hat Closed Soft Hi-Hat Closed Soft\n40 %font \"GeneralUser.sf2\" 128 0 42 amp=35 pan=0\t# Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Hard Hi-Hat Closed Soft Hi-Hat Closed Soft Hi-Hat Closed Soft\n41 %font \"GeneralUser.sf2\" 128 25 42 amp=50 pan=0\t# TR-808 Hi-Hat\n42 %font \"GeneralUser.sf2\" 128 25 42 amp=72 pan=0\t# TR-808 Hi-Hat\n43 %font \"GeneralUser.sf2\" 128 25 42 amp=88 pan=0\t# TR-808 Hi-Hat\n44 %font \"GeneralUser.sf2\" 128 25 42 amp=69 pan=0\t# TR-808 Hi-Hat\n45 %font \"GeneralUser.sf2\" 128 25 42 amp=151 pan=0\t# TR-808 Hi-Hat\n46 %font \"GeneralUser.sf2\" 128 0 44 amp=41 pan=0\t# Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Dead Air\n47 %font \"GeneralUser.sf2\" 128 0 44 amp=60 pan=0\t# Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Dead Air\n48 %font \"GeneralUser.sf2\" 128 0 44 amp=43 pan=0\t# Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Hi-Hat Pedal Dead Air\n49 %font \"GeneralUser.sf2\" 128 0 46 amp=43 pan=0\t# Hi-Hat Open Hi-Hat Open Attack Hi-Hat Open Attack\n50 %font \"GeneralUser.sf2\" 128 0 46 amp=36 pan=0\t# Hi-Hat Open Hi-Hat Open Attack Hi-Hat Open Attack\n51 %font \"GeneralUser.sf2\" 128 0 46 amp=38 pan=0\t# Hi-Hat Open Hi-Hat Open Attack Hi-Hat Open Attack\n52 %font \"GeneralUser.sf2\" 128 0 46 amp=18 pan=0\t# Hi-Hat Open Hi-Hat Open Attack Hi-Hat Open Attack\n53 %font \"GeneralUser.sf2\" 128 0 46 amp=42 pan=0\t# Hi-Hat Open Hi-Hat Open Attack Hi-Hat Open Attack\n54 %font \"GeneralUser.sf2\" 128 0 46 amp=60 pan=0\t# Hi-Hat Open Hi-Hat Open Attack Hi-Hat Open Attack\n55 %font \"GeneralUser.sf2\" 128 25 46 amp=31 pan=0\t# TR-909 Hi-Hat Open\n56 %font \"GeneralUser.sf2\" 128 25 46 amp=31 pan=0\t# TR-909 Hi-Hat Open\n57 %font \"GeneralUser.sf2\" 128 25 46 amp=47 pan=0\t# TR-909 Hi-Hat Open\n58 %font \"GeneralUser.sf2\" 128 25 46 amp=61 pan=0\t# TR-909 Hi-Hat Open\n59 %font \"GeneralUser.sf2\" 128 25 46 amp=38 pan=0\t# TR-909 Hi-Hat Open\n60 %font \"GeneralUser.sf2\" 128 25 46 amp=34 pan=0\t# TR-909 Hi-Hat Open\n61 %font \"GeneralUser.sf2\" 128 0 49 amp=176 pan=0\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n62 %font \"GeneralUser.sf2\" 128 0 57 amp=164 pan=0\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n63 %font \"GeneralUser.sf2\" 128 0 49 amp=180 pan=0\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n64 %font \"GeneralUser.sf2\" 128 40 49 amp=105 pan=0\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n65 %font \"GeneralUser.sf2\" 128 0 49 amp=172 pan=0\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n66 %font \"GeneralUser.sf2\" 128 25 49 amp=60 pan=0\t# TR-808 Hi-Hat Crash Cymbal\n67 %font \"GeneralUser.sf2\" 128 25 49 amp=97 pan=0\t# TR-808 Hi-Hat Crash Cymbal\n68 %font \"GeneralUser.sf2\" 128 0 49 amp=271 pan=0\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n69 %font \"GeneralUser.sf2\" 128 0 57 amp=220 pan=0\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n70 %font \"GeneralUser.sf2\" 128 0 49 amp=169 pan=0\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n71 %font \"GeneralUser.sf2\" 128 0 57 amp=148 pan=0\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n72 %font \"GeneralUser.sf2\" 128 0 49 amp=155 pan=0\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n73 %font \"GeneralUser.sf2\" 128 40 49 amp=155 pan=0\t# Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Crash Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal Ride Cymbal\n74 %font \"GeneralUser.sf2\" 128 0 55 amp=71 pan=0\t# Splash Cymbal\n75 %font \"GeneralUser.sf2\" 128 0 55 amp=90 pan=0\t# Splash Cymbal\n76 %font \"GeneralUser.sf2\" 128 0 53 amp=47 pan=0\t# Ride Bell\n77 %font \"GeneralUser.sf2\" 128 40 53 amp=58 pan=0\t# Ride Bell\n78 %font \"GeneralUser.sf2\" 128 0 51 amp=58 pan=0\t# Ride Cymbal\n79 %font \"GeneralUser.sf2\" 128 0 59 amp=58 pan=0\t# Ride Cymbal\n80 %font \"GeneralUser.sf2\" 128 40 51 amp=75 pan=0\t# Ride Cymbal\n81 %font \"GeneralUser.sf2\" 128 0 51 amp=83 pan=0\t# Ride Cymbal\n82 %font \"GeneralUser.sf2\" 128 0 51 amp=42 pan=0\t# Ride Cymbal\n83 %font \"GeneralUser.sf2\" 128 0 51 amp=36 pan=0\t# Ride Cymbal\n84 %font \"GeneralUser.sf2\" 128 0 51 amp=41 pan=0\t# Ride Cymbal\n85 %font \"GeneralUser.sf2\" 128 0 51 amp=41 pan=0\t# Ride Cymbal\n86 %font \"GeneralUser.sf2\" 128 0 51 amp=33 pan=0\t# Ride Cymbal\n87 %font \"GeneralUser.sf2\" 128 25 51 amp=80 pan=0\t# Ride Cymbal\n88 %font \"GeneralUser.sf2\" 128 25 51 amp=252 pan=0\t# Ride Cymbal\n89 %font \"GeneralUser.sf2\" 128 0 51 amp=308 pan=0\t# Ride Cymbal\n90 %font \"GeneralUser.sf2\" 128 0 51 amp=276 pan=0\t# Ride Cymbal\n91 %font \"GeneralUser.sf2\" 128 0 39 amp=21 pan=0\t# Hand Clap\n92 %font \"GeneralUser.sf2\" 128 0 39 amp=93 pan=0\t# Hand Clap\n93 %font \"GeneralUser.sf2\" 128 0 39 amp=81 pan=0\t# Hand Clap\n94 %font \"GeneralUser.sf2\" 128 0 39 amp=83 pan=0\t# Hand Clap\n95 %font \"GeneralUser.sf2\" 128 0 39 amp=155 pan=0\t# Hand Clap\n96 %font \"GeneralUser.sf2\" 128 25 39 amp=66 pan=0\t# Synth Hand Clap\n\ndrumset 56\n39 %font \"GeneralUser.sf2\" 128 56 39 amp=36 pan=-23\t# Filter Snap\n40 %font \"GeneralUser.sf2\" 128 56 40 amp=167 pan=-23\t# Slap\n41 %font \"GeneralUser.sf2\" 128 56 41 amp=74 pan=-16\t# Scratch Push\n42 %font \"GeneralUser.sf2\" 128 56 42 amp=52 pan=-16\t# Scratch Pull\n43 %font \"GeneralUser.sf2\" 128 56 43 amp=97 pan=0\t# Sticks\n44 %font \"GeneralUser.sf2\" 128 56 44 amp=433 pan=-16\t# Square Click\n45 %font \"GeneralUser.sf2\" 128 56 45 amp=77 pan=0\t# TR-808 Click\n46 %font \"GeneralUser.sf2\" 128 56 46 amp=45 pan=0\t# TR-808 Click Carillon-C6\n47 %font \"GeneralUser.sf2\" 128 56 47 amp=68 pan=0\t# Fret Slide\n48 %font \"GeneralUser.sf2\" 128 56 48 amp=17 pan=0\t# Gtr Cut Up\n49 %font \"GeneralUser.sf2\" 128 56 49 amp=73 pan=0\t# Gtr Cut Down\n50 %font \"GeneralUser.sf2\" 128 56 50 amp=28 pan=0\t# Gtr Slap\n51 %font \"GeneralUser.sf2\" 128 56 51 amp=154 pan=0\t# Gtr Click\n52 %font \"GeneralUser.sf2\" 128 56 52 amp=87 pan=0\t# Laughing\n53 %font \"GeneralUser.sf2\" 128 56 53 amp=61 pan=0\t# Scream\n54 %font \"GeneralUser.sf2\" 128 56 54 amp=174 pan=0\t# Punch Bone Crunch\n55 %font \"GeneralUser.sf2\" 128 56 55 amp=155 pan=0\t# Heartbeat\n56 %font \"GeneralUser.sf2\" 128 56 56 amp=83 pan=0\t# Foot Step\n58 %font \"GeneralUser.sf2\" 128 56 58 amp=9 pan=0\t# Applause Applause\n59 %font \"GeneralUser.sf2\" 128 56 59 amp=24 pan=0\t# Door Creak\n60 %font \"GeneralUser.sf2\" 128 56 60 amp=75 pan=0\t# Door Slam\n61 %font \"GeneralUser.sf2\" 128 56 61 amp=74 pan=0\t# Scratch Pull\n62 %font \"GeneralUser.sf2\" 128 56 62 amp=118 pan=0\t# Windchimes\n63 %font \"GeneralUser.sf2\" 128 56 63 amp=55 pan=0\t# Car-Start Car-Start\n64 %font \"GeneralUser.sf2\" 128 56 64 amp=117 pan=0\t# Car-Skid\n65 %font \"GeneralUser.sf2\" 128 56 65 amp=56 pan=0\t# Car-Pass Car-Pass\n66 %font \"GeneralUser.sf2\" 128 56 66 amp=142 pan=0\t# Car-Crash\n67 %font \"GeneralUser.sf2\" 128 56 67 amp=14 pan=0\t# Siren Siren\n68 %font \"GeneralUser.sf2\" 128 56 68 amp=302 pan=0\t# Train Train\n69 %font \"GeneralUser.sf2\" 128 56 69 amp=26 pan=0\t# Jet\n70 %font \"GeneralUser.sf2\" 128 56 70 amp=171 pan=0\t# Helicopter\n71 %font \"GeneralUser.sf2\" 128 56 71 amp=12 pan=0\t# Starship Noise Harpsichord-C6\n72 %font \"GeneralUser.sf2\" 128 56 72 amp=79 pan=0\t# Gun Shot\n73 %font \"GeneralUser.sf2\" 128 56 73 amp=33 pan=0\t# Gun Shot\n74 %font \"GeneralUser.sf2\" 128 56 74 amp=154 pan=0\t# Sine-Triangle-12000 White Noise White Noise\n75 %font \"GeneralUser.sf2\" 128 56 75 amp=65 pan=0\t# Explosion Explosion\n76 %font \"GeneralUser.sf2\" 128 56 76 amp=141 pan=0\t# Dog\n77 %font \"GeneralUser.sf2\" 128 56 77 amp=3 pan=0\t# Horse Gallop\n78 %font \"GeneralUser.sf2\" 128 56 78 amp=99 pan=0\t# Birds Birds\n79 %font \"GeneralUser.sf2\" 128 56 79 amp=14 pan=0\t# Rain Rain\n80 %font \"GeneralUser.sf2\" 128 56 80 amp=182 pan=0\t# Thunder Thunder\n81 %font \"GeneralUser.sf2\" 128 56 81 amp=12 pan=0\t# WhiteNoiseWave WhiteNoiseWave\n82 %font \"GeneralUser.sf2\" 128 56 82 amp=82 pan=0\t# Seashore Seashore\n83 %font \"GeneralUser.sf2\" 128 56 83 amp=109 pan=0\t# Stream Stream\n84 %font \"GeneralUser.sf2\" 128 56 84 amp=57 pan=0\t# Bubbles\n\n\n"
  },
  {
    "path": "packages/sx05re/tools/sound/timidity/config/fluidr3_gm.cfg",
    "content": "dir /storage/roms/bios/timidity/sf2\n\nbank 0\n0 %font \"FluidR3_GM.sf2\" 0 0 amp=29 pan=0\n1 %font \"FluidR3_GM.sf2\" 0 1 amp=41 pan=0\n2 %font \"FluidR3_GM.sf2\" 0 2 amp=64 pan=0\n3 %font \"FluidR3_GM.sf2\" 0 3 amp=32 pan=0\n4 %font \"FluidR3_GM.sf2\" 0 4 amp=35 pan=0\n5 %font \"FluidR3_GM.sf2\" 0 5 amp=51 pan=0\n6 %font \"FluidR3_GM.sf2\" 0 6 amp=71 pan=0\n7 %font \"FluidR3_GM.sf2\" 0 7 amp=65 pan=0\n8 %font \"FluidR3_GM.sf2\" 0 8 amp=73 pan=0\n9 %font \"FluidR3_GM.sf2\" 0 9 amp=98 pan=0\n10 %font \"FluidR3_GM.sf2\" 0 10 amp=150 pan=0\n11 %font \"FluidR3_GM.sf2\" 0 11 amp=63 pan=0\n12 %font \"FluidR3_GM.sf2\" 0 12 amp=48 pan=0\n13 %font \"FluidR3_GM.sf2\" 0 13 amp=46 pan=0\n14 %font \"FluidR3_GM.sf2\" 0 14 amp=65 pan=0\n15 %font \"FluidR3_GM.sf2\" 0 15 amp=62 pan=0\n16 %font \"FluidR3_GM.sf2\" 0 16 amp=154 pan=0\n17 %font \"FluidR3_GM.sf2\" 0 17 amp=96 pan=0\n18 %font \"FluidR3_GM.sf2\" 0 18 amp=75 pan=0\n19 %font \"FluidR3_GM.sf2\" 0 19 amp=128 pan=0\n20 %font \"FluidR3_GM.sf2\" 0 20 amp=45 pan=0\n21 %font \"FluidR3_GM.sf2\" 0 21 amp=50 pan=0\n22 %font \"FluidR3_GM.sf2\" 0 22 amp=36 pan=0\n23 %font \"FluidR3_GM.sf2\" 0 23 amp=46 pan=0\n24 %font \"FluidR3_GM.sf2\" 0 24 amp=139 pan=0\n25 %font \"FluidR3_GM.sf2\" 0 25 amp=92 pan=0\n26 %font \"FluidR3_GM.sf2\" 0 26 amp=87 pan=0\n27 %font \"FluidR3_GM.sf2\" 0 27 amp=46 pan=0\n28 %font \"FluidR3_GM.sf2\" 0 28 amp=92 pan=0\n29 %font \"FluidR3_GM.sf2\" 0 29 amp=41 pan=0\n30 %font \"FluidR3_GM.sf2\" 0 30 amp=91 pan=0\n31 %font \"FluidR3_GM.sf2\" 0 31 amp=60 pan=0\n32 %font \"FluidR3_GM.sf2\" 0 32 amp=125 pan=0\n33 %font \"FluidR3_GM.sf2\" 0 33 amp=85 pan=0\n34 %font \"FluidR3_GM.sf2\" 0 34 amp=148 pan=0\n35 %font \"FluidR3_GM.sf2\" 0 35 amp=98 pan=0\n36 %font \"FluidR3_GM.sf2\" 0 36 amp=207 pan=0\n37 %font \"FluidR3_GM.sf2\" 0 37 amp=223 pan=0\n38 %font \"FluidR3_GM.sf2\" 0 38 amp=35 pan=0\n39 %font \"FluidR3_GM.sf2\" 0 39 amp=38 pan=0\n40 %font \"FluidR3_GM.sf2\" 0 40 amp=48 pan=0\n41 %font \"FluidR3_GM.sf2\" 0 41 amp=69 pan=0\n42 %font \"FluidR3_GM.sf2\" 0 42 amp=34 pan=0\n43 %font \"FluidR3_GM.sf2\" 0 43 amp=109 pan=0\n44 %font \"FluidR3_GM.sf2\" 0 44 amp=68 pan=0\n45 %font \"FluidR3_GM.sf2\" 0 45 amp=124 pan=0\n46 %font \"FluidR3_GM.sf2\" 0 46 amp=117 pan=0\n47 %font \"FluidR3_GM.sf2\" 0 47 amp=98 pan=0\n48 %font \"FluidR3_GM.sf2\" 0 48 amp=91 pan=0\n49 %font \"FluidR3_GM.sf2\" 0 49 amp=79 pan=0\n50 %font \"FluidR3_GM.sf2\" 0 50 amp=30 pan=0\n51 %font \"FluidR3_GM.sf2\" 0 51 amp=14 pan=0\n52 %font \"FluidR3_GM.sf2\" 0 52 amp=56 pan=0\n53 %font \"FluidR3_GM.sf2\" 0 53 amp=66 pan=0\n54 %font \"FluidR3_GM.sf2\" 0 54 amp=79 pan=0\n55 %font \"FluidR3_GM.sf2\" 0 55 amp=105 pan=0\n56 %font \"FluidR3_GM.sf2\" 0 56 amp=102 pan=0\n57 %font \"FluidR3_GM.sf2\" 0 57 amp=54 pan=0\n58 %font \"FluidR3_GM.sf2\" 0 58 amp=60 pan=0\n59 %font \"FluidR3_GM.sf2\" 0 59 amp=42 pan=0\n60 %font \"FluidR3_GM.sf2\" 0 60 amp=80 pan=0\n61 %font \"FluidR3_GM.sf2\" 0 61 amp=89 pan=0\n62 %font \"FluidR3_GM.sf2\" 0 62 amp=82 pan=0\n63 %font \"FluidR3_GM.sf2\" 0 63 amp=117 pan=0\n64 %font \"FluidR3_GM.sf2\" 0 64 amp=90 pan=0\n65 %font \"FluidR3_GM.sf2\" 0 65 amp=30 pan=0\n66 %font \"FluidR3_GM.sf2\" 0 66 amp=51 pan=0\n67 %font \"FluidR3_GM.sf2\" 0 67 amp=33 pan=0\n68 %font \"FluidR3_GM.sf2\" 0 68 amp=58 pan=0\n69 %font \"FluidR3_GM.sf2\" 0 69 amp=68 pan=0\n70 %font \"FluidR3_GM.sf2\" 0 70 amp=67 pan=0\n71 %font \"FluidR3_GM.sf2\" 0 71 amp=61 pan=0\n72 %font \"FluidR3_GM.sf2\" 0 72 amp=43 pan=0\n73 %font \"FluidR3_GM.sf2\" 0 73 amp=43 pan=0\n74 %font \"FluidR3_GM.sf2\" 0 74 amp=116 pan=0\n75 %font \"FluidR3_GM.sf2\" 0 75 amp=51 pan=0\n76 %font \"FluidR3_GM.sf2\" 0 76 amp=56 pan=0\n77 %font \"FluidR3_GM.sf2\" 0 77 amp=32 pan=0\n78 %font \"FluidR3_GM.sf2\" 0 78 amp=122 pan=0\n79 %font \"FluidR3_GM.sf2\" 0 79 amp=144 pan=0\n80 %font \"FluidR3_GM.sf2\" 0 80 amp=24 pan=0\n81 %font \"FluidR3_GM.sf2\" 0 81 amp=65 pan=0\n82 %font \"FluidR3_GM.sf2\" 0 82 amp=222 pan=0\n83 %font \"FluidR3_GM.sf2\" 0 83 amp=86 pan=0\n84 %font \"FluidR3_GM.sf2\" 0 84 amp=41 pan=0\n85 %font \"FluidR3_GM.sf2\" 0 85 amp=147 pan=0\n86 %font \"FluidR3_GM.sf2\" 0 86 amp=29 pan=0\n87 %font \"FluidR3_GM.sf2\" 0 87 amp=60 pan=0\n88 %font \"FluidR3_GM.sf2\" 0 88 amp=205 pan=0\n89 %font \"FluidR3_GM.sf2\" 0 89 amp=52 pan=0\n90 %font \"FluidR3_GM.sf2\" 0 90 amp=39 pan=0\n91 %font \"FluidR3_GM.sf2\" 0 91 amp=60 pan=0\n92 %font \"FluidR3_GM.sf2\" 0 92 amp=107 pan=0\n93 %font \"FluidR3_GM.sf2\" 0 93 amp=50 pan=0\n94 %font \"FluidR3_GM.sf2\" 0 94 amp=87 pan=0\n95 %font \"FluidR3_GM.sf2\" 0 95 amp=70 pan=0\n96 %font \"FluidR3_GM.sf2\" 0 96 amp=37 pan=0\n97 %font \"FluidR3_GM.sf2\" 0 97 amp=74 pan=0\n98 %font \"FluidR3_GM.sf2\" 0 98 amp=132 pan=0\n99 %font \"FluidR3_GM.sf2\" 0 99 amp=117 pan=0\n100 %font \"FluidR3_GM.sf2\" 0 100 amp=64 pan=0\n101 %font \"FluidR3_GM.sf2\" 0 101 amp=53 pan=0\n102 %font \"FluidR3_GM.sf2\" 0 102 amp=51 pan=0\n103 %font \"FluidR3_GM.sf2\" 0 103 amp=110 pan=0\n104 %font \"FluidR3_GM.sf2\" 0 104 amp=66 pan=0\n105 %font \"FluidR3_GM.sf2\" 0 105 amp=120 pan=0\n106 %font \"FluidR3_GM.sf2\" 0 106 amp=77 pan=0\n107 %font \"FluidR3_GM.sf2\" 0 107 amp=182 pan=0\n108 %font \"FluidR3_GM.sf2\" 0 108 amp=88 pan=0\n109 %font \"FluidR3_GM.sf2\" 0 109 amp=62 pan=0\n110 %font \"FluidR3_GM.sf2\" 0 110 amp=45 pan=0\n111 %font \"FluidR3_GM.sf2\" 0 111 amp=78 pan=0\n112 %font \"FluidR3_GM.sf2\" 0 112 amp=72 pan=0\n113 %font \"FluidR3_GM.sf2\" 0 113 amp=122 pan=0\n114 %font \"FluidR3_GM.sf2\" 0 114 amp=47 pan=0\n115 %font \"FluidR3_GM.sf2\" 0 115 amp=142 pan=0\n116 %font \"FluidR3_GM.sf2\" 0 116 amp=61 pan=0\n117 %font \"FluidR3_GM.sf2\" 0 117 amp=83 pan=0\n118 %font \"FluidR3_GM.sf2\" 0 118 amp=42 pan=0\n119 %font \"FluidR3_GM.sf2\" 0 119 amp=75 pan=0\n120 %font \"FluidR3_GM.sf2\" 0 120 amp=56 pan=0\n121 %font \"FluidR3_GM.sf2\" 0 121 amp=13 pan=0\n122 %font \"FluidR3_GM.sf2\" 0 122 amp=113 pan=0\n123 %font \"FluidR3_GM.sf2\" 0 123 amp=80 pan=0\n124 %font \"FluidR3_GM.sf2\" 0 124 amp=91 pan=0\n125 %font \"FluidR3_GM.sf2\" 0 125 amp=67 pan=0\n126 %font \"FluidR3_GM.sf2\" 0 126 amp=31 pan=0\n127 %font \"FluidR3_GM.sf2\" 0 127 amp=117 pan=0\n\nbank 8\n4 %font \"FluidR3_GM.sf2\" 8 4 amp=46 pan=0\n5 %font \"FluidR3_GM.sf2\" 8 5 amp=37 pan=0\n6 %font \"FluidR3_GM.sf2\" 8 6 amp=57 pan=0\n14 %font \"FluidR3_GM.sf2\" 8 14 amp=35 pan=0\n16 %font \"FluidR3_GM.sf2\" 8 16 amp=118 pan=0\n17 %font \"FluidR3_GM.sf2\" 8 17 amp=96 pan=0\n19 %font \"FluidR3_GM.sf2\" 8 19 amp=78 pan=0\n21 %font \"FluidR3_GM.sf2\" 8 21 amp=24 pan=0\n24 %font \"FluidR3_GM.sf2\" 8 24 amp=123 pan=0\n25 %font \"FluidR3_GM.sf2\" 8 25 amp=114 pan=0\n26 %font \"FluidR3_GM.sf2\" 8 26 amp=111 pan=0\n28 %font \"FluidR3_GM.sf2\" 8 28 amp=25 pan=0\n30 %font \"FluidR3_GM.sf2\" 8 30 amp=38 pan=0\n31 %font \"FluidR3_GM.sf2\" 8 31 amp=109 pan=0\n38 %font \"FluidR3_GM.sf2\" 8 38 amp=59 pan=0\n39 %font \"FluidR3_GM.sf2\" 8 39 amp=51 pan=0\n40 %font \"FluidR3_GM.sf2\" 8 40 amp=46 pan=0\n48 %font \"FluidR3_GM.sf2\" 8 48 amp=52 pan=0\n50 %font \"FluidR3_GM.sf2\" 8 50 amp=32 pan=0\n61 %font \"FluidR3_GM.sf2\" 8 61 amp=87 pan=0\n62 %font \"FluidR3_GM.sf2\" 8 62 amp=49 pan=0\n63 %font \"FluidR3_GM.sf2\" 8 63 amp=78 pan=0\n80 %font \"FluidR3_GM.sf2\" 8 80 amp=84 pan=0\n107 %font \"FluidR3_GM.sf2\" 8 107 amp=93 pan=0\n115 %font \"FluidR3_GM.sf2\" 8 115 amp=115 pan=0\n116 %font \"FluidR3_GM.sf2\" 8 116 amp=62 pan=0\n117 %font \"FluidR3_GM.sf2\" 8 117 amp=73 pan=0\n118 %font \"FluidR3_GM.sf2\" 8 118 amp=131 pan=0\n\nbank 9\n125 %font \"FluidR3_GM.sf2\" 9 125 amp=51 pan=0\n\nbank 16\n25 %font \"FluidR3_GM.sf2\" 16 25 amp=82 pan=0\n\nbank 126\n0 %font \"FluidR3_GM.sf2\" 0 1 amp=55 pan=0\n1 %font \"FluidR3_GM.sf2\" 0 1 amp=55 pan=0\n2 %font \"FluidR3_GM.sf2\" 0 1 amp=55 pan=0\n3 %font \"FluidR3_GM.sf2\" 0 3 amp=31 pan=0\n4 %font \"FluidR3_GM.sf2\" 0 0 amp=40 pan=0\n5 %font \"FluidR3_GM.sf2\" 0 1 amp=55 pan=0\n6 %font \"FluidR3_GM.sf2\" 0 1 amp=55 pan=0\n7 %font \"FluidR3_GM.sf2\" 0 4 amp=40 pan=0\n8 %font \"FluidR3_GM.sf2\" 0 4 amp=35 pan=0\n9 %font \"FluidR3_GM.sf2\" 0 5 amp=37 pan=0\n10 %font \"FluidR3_GM.sf2\" 0 25 amp=106 pan=0\n11 %font \"FluidR3_GM.sf2\" 0 25 amp=107 pan=0\n12 %font \"FluidR3_GM.sf2\" 0 26 amp=41 pan=0\n13 %font \"FluidR3_GM.sf2\" 0 26 amp=47 pan=0\n14 %font \"FluidR3_GM.sf2\" 0 28 amp=109 pan=0\n15 %font \"FluidR3_GM.sf2\" 0 36 amp=92 pan=0\n16 %font \"FluidR3_GM.sf2\" 0 36 amp=92 pan=0\n17 %font \"FluidR3_GM.sf2\" 0 36 amp=92 pan=0\n18 %font \"FluidR3_GM.sf2\" 0 36 amp=92 pan=0\n19 %font \"FluidR3_GM.sf2\" 0 37 amp=98 pan=0\n20 %font \"FluidR3_GM.sf2\" 0 37 amp=98 pan=0\n21 %font \"FluidR3_GM.sf2\" 0 37 amp=98 pan=0\n22 %font \"FluidR3_GM.sf2\" 0 37 amp=98 pan=0\n23 %font \"FluidR3_GM.sf2\" 0 33 amp=91 pan=0\n24 %font \"FluidR3_GM.sf2\" 0 33 amp=92 pan=0\n25 %font \"FluidR3_GM.sf2\" 0 34 amp=137 pan=0\n26 %font \"FluidR3_GM.sf2\" 0 34 amp=138 pan=0\n27 %font \"FluidR3_GM.sf2\" 0 35 amp=107 pan=0\n28 %font \"FluidR3_GM.sf2\" 0 32 amp=195 pan=0\n29 %font \"FluidR3_GM.sf2\" 0 52 amp=78 pan=0\n30 %font \"FluidR3_GM.sf2\" 0 52 amp=77 pan=0\n31 %font \"FluidR3_GM.sf2\" 0 52 amp=78 pan=0\n32 %font \"FluidR3_GM.sf2\" 0 52 amp=78 pan=0\n33 %font \"FluidR3_GM.sf2\" 0 49 amp=72 pan=0\n34 %font \"FluidR3_GM.sf2\" 0 48 amp=64 pan=0\n35 %font \"FluidR3_GM.sf2\" 0 50 amp=42 pan=0\n36 %font \"FluidR3_GM.sf2\" 0 50 amp=32 pan=0\n37 %font \"FluidR3_GM.sf2\" 0 16 amp=70 pan=0\n38 %font \"FluidR3_GM.sf2\" 0 16 amp=98 pan=0\n39 %font \"FluidR3_GM.sf2\" 0 16 amp=98 pan=0\n40 %font \"FluidR3_GM.sf2\" 0 17 amp=144 pan=0\n41 %font \"FluidR3_GM.sf2\" 0 16 amp=98 pan=0\n42 %font \"FluidR3_GM.sf2\" 0 16 amp=98 pan=0\n43 %font \"FluidR3_GM.sf2\" 0 17 amp=144 pan=0\n44 %font \"FluidR3_GM.sf2\" 0 17 amp=144 pan=0\n45 %font \"FluidR3_GM.sf2\" 0 17 amp=144 pan=0\n46 %font \"FluidR3_GM.sf2\" 0 56 amp=94 pan=0\n47 %font \"FluidR3_GM.sf2\" 0 56 amp=95 pan=0\n48 %font \"FluidR3_GM.sf2\" 0 57 amp=38 pan=0\n49 %font \"FluidR3_GM.sf2\" 0 57 amp=38 pan=0\n50 %font \"FluidR3_GM.sf2\" 0 57 amp=38 pan=0\n51 %font \"FluidR3_GM.sf2\" 0 57 amp=38 pan=0\n52 %font \"FluidR3_GM.sf2\" 0 57 amp=38 pan=0\n53 %font \"FluidR3_GM.sf2\" 0 57 amp=38 pan=0\n54 %font \"FluidR3_GM.sf2\" 0 65 amp=29 pan=0\n55 %font \"FluidR3_GM.sf2\" 0 66 amp=41 pan=0\n56 %font \"FluidR3_GM.sf2\" 0 67 amp=65 pan=0\n57 %font \"FluidR3_GM.sf2\" 0 65 amp=29 pan=0\n58 %font \"FluidR3_GM.sf2\" 0 61 amp=47 pan=0\n59 %font \"FluidR3_GM.sf2\" 0 61 amp=47 pan=0\n60 %font \"FluidR3_GM.sf2\" 0 61 amp=56 pan=0\n61 %font \"FluidR3_GM.sf2\" 0 61 amp=56 pan=0\n62 %font \"FluidR3_GM.sf2\" 0 61 amp=46 pan=0\n63 %font \"FluidR3_GM.sf2\" 0 55 amp=116 pan=0\n\nbank 127\n8 %font \"FluidR3_GM.sf2\" 0 16 amp=59 pan=0\n9 %font \"FluidR3_GM.sf2\" 0 17 amp=87 pan=0\n10 %font \"FluidR3_GM.sf2\" 0 18 amp=86 pan=0\n11 %font \"FluidR3_GM.sf2\" 0 18 amp=64 pan=0\n12 %font \"FluidR3_GM.sf2\" 0 19 amp=55 pan=0\n13 %font \"FluidR3_GM.sf2\" 0 19 amp=94 pan=0\n14 %font \"FluidR3_GM.sf2\" 0 20 amp=18 pan=0\n15 %font \"FluidR3_GM.sf2\" 0 21 amp=45 pan=0\n16 %font \"FluidR3_GM.sf2\" 0 6 amp=60 pan=0\n17 %font \"FluidR3_GM.sf2\" 0 6 amp=53 pan=0\n18 %font \"FluidR3_GM.sf2\" 0 6 amp=60 pan=0\n19 %font \"FluidR3_GM.sf2\" 0 7 amp=40 pan=0\n20 %font \"FluidR3_GM.sf2\" 0 7 amp=71 pan=0\n21 %font \"FluidR3_GM.sf2\" 0 7 amp=46 pan=0\n22 %font \"FluidR3_GM.sf2\" 0 8 amp=18 pan=0\n23 %font \"FluidR3_GM.sf2\" 0 8 amp=19 pan=0\n24 %font \"FluidR3_GM.sf2\" 0 62 amp=83 pan=0\n25 %font \"FluidR3_GM.sf2\" 0 63 amp=141 pan=0\n26 %font \"FluidR3_GM.sf2\" 0 62 amp=88 pan=0\n27 %font \"FluidR3_GM.sf2\" 0 63 amp=222 pan=0\n28 %font \"FluidR3_GM.sf2\" 0 38 amp=38 pan=0\n29 %font \"FluidR3_GM.sf2\" 0 39 amp=10 pan=0\n30 %font \"FluidR3_GM.sf2\" 0 38 amp=38 pan=0\n31 %font \"FluidR3_GM.sf2\" 0 39 amp=14 pan=0\n32 %font \"FluidR3_GM.sf2\" 0 88 amp=108 pan=0\n33 %font \"FluidR3_GM.sf2\" 0 89 amp=12 pan=0\n34 %font \"FluidR3_GM.sf2\" 0 52 amp=46 pan=0\n35 %font \"FluidR3_GM.sf2\" 0 113 amp=131 pan=0\n36 %font \"FluidR3_GM.sf2\" 0 97 amp=74 pan=0\n37 %font \"FluidR3_GM.sf2\" 0 96 amp=27 pan=0\n38 %font \"FluidR3_GM.sf2\" 0 91 amp=32 pan=0\n39 %font \"FluidR3_GM.sf2\" 0 85 amp=30 pan=0\n40 %font \"FluidR3_GM.sf2\" 0 102 amp=83 pan=0\n41 %font \"FluidR3_GM.sf2\" 0 101 amp=85 pan=0\n42 %font \"FluidR3_GM.sf2\" 0 68 amp=21 pan=0\n43 %font \"FluidR3_GM.sf2\" 0 95 amp=94 pan=0\n44 %font \"FluidR3_GM.sf2\" 0 86 amp=17 pan=0\n45 %font \"FluidR3_GM.sf2\" 0 103 amp=116 pan=0\n46 %font \"FluidR3_GM.sf2\" 0 88 amp=41 pan=0\n47 %font \"FluidR3_GM.sf2\" 0 80 amp=22 pan=0\n48 %font \"FluidR3_GM.sf2\" 0 48 amp=55 pan=0\n49 %font \"FluidR3_GM.sf2\" 0 49 amp=69 pan=0\n51 %font \"FluidR3_GM.sf2\" 0 45 amp=25 pan=0\n52 %font \"FluidR3_GM.sf2\" 0 40 amp=35 pan=0\n53 %font \"FluidR3_GM.sf2\" 0 40 amp=32 pan=0\n54 %font \"FluidR3_GM.sf2\" 0 42 amp=40 pan=0\n55 %font \"FluidR3_GM.sf2\" 0 42 amp=40 pan=0\n56 %font \"FluidR3_GM.sf2\" 0 43 amp=79 pan=0\n57 %font \"FluidR3_GM.sf2\" 0 46 amp=26 pan=0\n58 %font \"FluidR3_GM.sf2\" 0 46 amp=35 pan=0\n59 %font \"FluidR3_GM.sf2\" 0 24 amp=60 pan=0\n60 %font \"FluidR3_GM.sf2\" 0 24 amp=46 pan=0\n61 %font \"FluidR3_GM.sf2\" 0 26 amp=39 pan=0\n62 %font \"FluidR3_GM.sf2\" 0 27 amp=83 pan=0\n63 %font \"FluidR3_GM.sf2\" 0 104 amp=40 pan=0\n64 %font \"FluidR3_GM.sf2\" 0 32 amp=85 pan=0\n65 %font \"FluidR3_GM.sf2\" 0 33 amp=51 pan=0\n66 %font \"FluidR3_GM.sf2\" 0 34 amp=67 pan=0\n67 %font \"FluidR3_GM.sf2\" 0 39 amp=20 pan=0\n68 %font \"FluidR3_GM.sf2\" 0 36 amp=71 pan=0\n69 %font \"FluidR3_GM.sf2\" 0 37 amp=72 pan=0\n70 %font \"FluidR3_GM.sf2\" 0 35 amp=58 pan=0\n71 %font \"FluidR3_GM.sf2\" 0 35 amp=42 pan=0\n72 %font \"FluidR3_GM.sf2\" 0 73 amp=19 pan=0\n73 %font \"FluidR3_GM.sf2\" 0 73 amp=33 pan=0\n74 %font \"FluidR3_GM.sf2\" 0 72 amp=47 pan=0\n75 %font \"FluidR3_GM.sf2\" 0 72 amp=30 pan=0\n76 %font \"FluidR3_GM.sf2\" 0 74 amp=64 pan=0\n77 %font \"FluidR3_GM.sf2\" 0 75 amp=40 pan=0\n78 %font \"FluidR3_GM.sf2\" 0 64 amp=53 pan=0\n79 %font \"FluidR3_GM.sf2\" 0 65 amp=24 pan=0\n80 %font \"FluidR3_GM.sf2\" 0 66 amp=54 pan=0\n81 %font \"FluidR3_GM.sf2\" 0 67 amp=50 pan=0\n82 %font \"FluidR3_GM.sf2\" 0 71 amp=25 pan=0\n83 %font \"FluidR3_GM.sf2\" 0 71 amp=22 pan=0\n84 %font \"FluidR3_GM.sf2\" 0 68 amp=35 pan=0\n85 %font \"FluidR3_GM.sf2\" 0 69 amp=66 pan=0\n86 %font \"FluidR3_GM.sf2\" 0 70 amp=35 pan=0\n87 %font \"FluidR3_GM.sf2\" 0 22 amp=56 pan=0\n88 %font \"FluidR3_GM.sf2\" 0 56 amp=142 pan=0\n89 %font \"FluidR3_GM.sf2\" 0 56 amp=124 pan=0\n90 %font \"FluidR3_GM.sf2\" 0 57 amp=88 pan=0\n91 %font \"FluidR3_GM.sf2\" 0 57 amp=51 pan=0\n92 %font \"FluidR3_GM.sf2\" 0 60 amp=98 pan=0\n93 %font \"FluidR3_GM.sf2\" 0 60 amp=136 pan=0\n94 %font \"FluidR3_GM.sf2\" 0 58 amp=63 pan=0\n95 %font \"FluidR3_GM.sf2\" 0 61 amp=53 pan=0\n96 %font \"FluidR3_GM.sf2\" 0 61 amp=47 pan=0\n97 %font \"FluidR3_GM.sf2\" 0 11 amp=28 pan=0\n98 %font \"FluidR3_GM.sf2\" 0 11 amp=31 pan=0\n99 %font \"FluidR3_GM.sf2\" 0 12 amp=14 pan=0\n100 %font \"FluidR3_GM.sf2\" 0 88 amp=38 pan=0\n101 %font \"FluidR3_GM.sf2\" 0 9 amp=35 pan=0\n102 %font \"FluidR3_GM.sf2\" 0 14 amp=48 pan=0\n103 %font \"FluidR3_GM.sf2\" 0 13 amp=47 pan=0\n104 %font \"FluidR3_GM.sf2\" 0 12 amp=21 pan=0\n105 %font \"FluidR3_GM.sf2\" 0 107 amp=89 pan=0\n106 %font \"FluidR3_GM.sf2\" 0 111 amp=53 pan=0\n107 %font \"FluidR3_GM.sf2\" 0 77 amp=49 pan=0\n108 %font \"FluidR3_GM.sf2\" 0 78 amp=63 pan=0\n109 %font \"FluidR3_GM.sf2\" 0 78 amp=32 pan=0\n110 %font \"FluidR3_GM.sf2\" 0 76 amp=44 pan=0\n111 %font \"FluidR3_GM.sf2\" 0 76 amp=48 pan=0\n112 %font \"FluidR3_GM.sf2\" 0 47 amp=28 pan=0\n113 %font \"FluidR3_GM.sf2\" 0 117 amp=42 pan=0\n114 %font \"FluidR3_GM.sf2\" 0 118 amp=13 pan=0\n115 %font \"FluidR3_GM.sf2\" 0 118 amp=14 pan=0\n116 %font \"FluidR3_GM.sf2\" 0 118 amp=22 pan=0\n117 %font \"FluidR3_GM.sf2\" 0 116 amp=52 pan=0\n118 %font \"FluidR3_GM.sf2\" 0 116 amp=18 pan=0\n119 %font \"FluidR3_GM.sf2\" 128 0 49 amp=34 pan=0\t# Crsh 1(L) Crsh 1(R)\n\ndrumset 0\n0 %font \"FluidR3_GM.sf2\" 128 0 35 amp=206 pan=0\t# Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R)\n1 %font \"FluidR3_GM.sf2\" 128 0 35 amp=138 pan=0\t# Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R)\n2 %font \"FluidR3_GM.sf2\" 128 1 35 amp=189 pan=0\t# Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R)\n3 %font \"FluidR3_GM.sf2\" 128 1 35 amp=129 pan=0\t# Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R)\n4 %font \"FluidR3_GM.sf2\" 128 0 35 amp=100 pan=0\t# Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R)\n5 %font \"FluidR3_GM.sf2\" 128 0 35 amp=107 pan=0\t# Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R)\n6 %font \"FluidR3_GM.sf2\" 128 32 35 amp=89 pan=0\t# Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R)\n7 %font \"FluidR3_GM.sf2\" 128 32 35 amp=119 pan=0\t# Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R)\n8 %font \"FluidR3_GM.sf2\" 128 8 35 amp=249 pan=0\t# Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R)\n9 %font \"FluidR3_GM.sf2\" 128 8 35 amp=143 pan=0\t# Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R)\n10 %font \"FluidR3_GM.sf2\" 128 16 35 amp=86 pan=0\t# Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R\n11 %font \"FluidR3_GM.sf2\" 128 16 36 amp=85 pan=0\t# Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R\n12 %font \"FluidR3_GM.sf2\" 128 24 35 amp=86 pan=0\t# Elec Kick1(L) Elec Kick1(R)\n13 %font \"FluidR3_GM.sf2\" 128 24 36 amp=219 pan=0\t# Elec Kick2(L) Elec Kick2(R)\n14 %font \"FluidR3_GM.sf2\" 128 25 35 amp=59 pan=0\t# 808 Kick 1 808 Kick 1\n15 %font \"FluidR3_GM.sf2\" 128 25 36 amp=47 pan=0\t# 808 Kick 2 808 Kick 2\n16 %font \"FluidR3_GM.sf2\" 128 25 35 amp=60 pan=0\t# 808 Kick 1 808 Kick 1\n27 %font \"FluidR3_GM.sf2\" 128 0 27 amp=31 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 0 28 amp=44 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 0 29 amp=26 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 0 30 amp=27 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 0 31 amp=119 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 0 32 amp=128 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 0 33 amp=54 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 0 34 amp=16 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 0 35 amp=129 pan=0\t# Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R)\n36 %font \"FluidR3_GM.sf2\" 128 0 35 amp=141 pan=0\t# Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R)\n37 %font \"FluidR3_GM.sf2\" 128 0 37 amp=116 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 0 38 amp=110 pan=0\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n39 %font \"FluidR3_GM.sf2\" 128 0 39 amp=38 pan=-16\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 0 40 amp=241 pan=0\t# Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R)\n41 %font \"FluidR3_GM.sf2\" 128 0 41 amp=105 pan=-47\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 0 42 amp=20 pan=31\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 0 43 amp=73 pan=-28\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 0 44 amp=10 pan=31\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 0 45 amp=132 pan=-9\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 0 46 amp=89 pan=31\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 0 47 amp=167 pan=9\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 0 48 amp=148 pan=28\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 0 49 amp=79 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 0 50 amp=78 pan=47\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 0 51 amp=23 pan=-31\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 0 52 amp=84 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 0 53 amp=55 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 0 54 amp=62 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 0 55 amp=49 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 0 56 amp=100 pan=31\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 0 57 amp=56 pan=-31\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 0 58 amp=27 pan=-55\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 0 59 amp=25 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 0 60 amp=9 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 0 61 amp=55 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 0 62 amp=30 pan=-39\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 0 63 amp=80 pan=-39\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 0 64 amp=46 pan=-31\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 0 65 amp=153 pan=31\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 0 66 amp=96 pan=31\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 0 67 amp=57 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 0 68 amp=64 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 0 69 amp=15 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 0 70 amp=49 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 0 71 amp=59 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 0 72 amp=47 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 0 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 0 74 amp=33 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 0 75 amp=78 pan=31\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 0 76 amp=68 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 0 77 amp=131 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 0 78 amp=66 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 0 79 amp=30 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 0 80 amp=44 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 0 81 amp=64 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 0 82 amp=249 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 0 83 amp=102 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 0 84 amp=34 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 0 85 amp=83 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 0 86 amp=48 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 0 87 amp=56 pan=-31\t# Long Taiko Hit Long Taiko Hit\n97 %font \"FluidR3_GM.sf2\" 128 0 38 amp=108 pan=0\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n98 %font \"FluidR3_GM.sf2\" 128 0 40 amp=130 pan=0\t# Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R)\n99 %font \"FluidR3_GM.sf2\" 128 1 38 amp=94 pan=0\t# Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R)\n100 %font \"FluidR3_GM.sf2\" 128 1 40 amp=79 pan=0\t# Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R)\n101 %font \"FluidR3_GM.sf2\" 128 0 40 amp=220 pan=0\t# Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R)\n102 %font \"FluidR3_GM.sf2\" 128 0 38 amp=109 pan=0\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n103 %font \"FluidR3_GM.sf2\" 128 0 40 amp=160 pan=0\t# Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R)\n104 %font \"FluidR3_GM.sf2\" 128 0 38 amp=133 pan=0\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n105 %font \"FluidR3_GM.sf2\" 128 32 38 amp=88 pan=0\t# Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R)\n106 %font \"FluidR3_GM.sf2\" 128 32 40 amp=138 pan=0\t# Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R)\n107 %font \"FluidR3_GM.sf2\" 128 8 38 amp=75 pan=0\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n108 %font \"FluidR3_GM.sf2\" 128 8 40 amp=92 pan=0\t# Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R)\n109 %font \"FluidR3_GM.sf2\" 128 16 38 amp=74 pan=0\t# Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R)\n110 %font \"FluidR3_GM.sf2\" 128 16 40 amp=104 pan=0\t# Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R)\n111 %font \"FluidR3_GM.sf2\" 128 24 40 amp=76 pan=0\t# Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R)\n112 %font \"FluidR3_GM.sf2\" 128 11 38 amp=67 pan=0\t# RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R)\n113 %font \"FluidR3_GM.sf2\" 128 11 40 amp=100 pan=0\t# RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R)\n114 %font \"FluidR3_GM.sf2\" 128 11 38 amp=71 pan=0\t# RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R)\n115 %font \"FluidR3_GM.sf2\" 128 24 40 amp=51 pan=0\t# Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R)\n116 %font \"FluidR3_GM.sf2\" 128 24 38 amp=99 pan=0\t# Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R)\n117 %font \"FluidR3_GM.sf2\" 128 24 38 amp=155 pan=0\t# Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R)\n118 %font \"FluidR3_GM.sf2\" 128 25 38 amp=39 pan=0\t# 808 Snare 1 808 Snare 1\n119 %font \"FluidR3_GM.sf2\" 128 25 38 amp=34 pan=0\t# 808 Snare 1 808 Snare 1\n120 %font \"FluidR3_GM.sf2\" 128 25 40 amp=33 pan=0\t# 808 Snare 2 808 Snare 2\n121 %font \"FluidR3_GM.sf2\" 128 25 38 amp=27 pan=0\t# 808 Snare 1 808 Snare 1\n122 %font \"FluidR3_GM.sf2\" 128 25 40 amp=48 pan=0\t# 808 Snare 2 808 Snare 2\n123 %font \"FluidR3_GM.sf2\" 128 9 38 amp=79 pan=0\t# Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R)\n124 %font \"FluidR3_GM.sf2\" 128 10 38 amp=58 pan=0\t# RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R)\n125 %font \"FluidR3_GM.sf2\" 128 11 38 amp=113 pan=0\t# RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R)\n126 %font \"FluidR3_GM.sf2\" 128 11 38 amp=77 pan=0\t# RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R)\n127 %font \"FluidR3_GM.sf2\" 128 11 38 amp=88 pan=0\t# RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R)\n\ndrumset 1\n27 %font \"FluidR3_GM.sf2\" 128 1 27 amp=31 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 1 28 amp=43 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 1 29 amp=26 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 1 30 amp=43 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 1 31 amp=75 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 1 32 amp=176 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 1 33 amp=53 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 1 34 amp=16 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 1 35 amp=139 pan=0\t# Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R)\n36 %font \"FluidR3_GM.sf2\" 128 1 35 amp=210 pan=0\t# Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R)\n37 %font \"FluidR3_GM.sf2\" 128 1 37 amp=186 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 1 38 amp=154 pan=0\t# Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R)\n39 %font \"FluidR3_GM.sf2\" 128 1 39 amp=58 pan=-16\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 1 40 amp=52 pan=0\t# Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R)\n41 %font \"FluidR3_GM.sf2\" 128 1 41 amp=153 pan=-47\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 1 42 amp=33 pan=31\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 1 43 amp=73 pan=-28\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 1 44 amp=14 pan=31\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 1 45 amp=132 pan=-9\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 1 46 amp=47 pan=31\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 1 47 amp=112 pan=9\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 1 48 amp=217 pan=28\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 1 49 amp=83 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 1 50 amp=247 pan=47\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 1 51 amp=23 pan=-31\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 1 52 amp=65 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 1 53 amp=24 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 1 54 amp=17 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 1 55 amp=51 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 1 56 amp=103 pan=31\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 1 57 amp=47 pan=-31\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 1 58 amp=64 pan=-55\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 1 59 amp=26 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 1 60 amp=87 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 1 61 amp=88 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 1 62 amp=30 pan=-39\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 1 63 amp=78 pan=-39\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 1 64 amp=46 pan=-31\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 1 65 amp=98 pan=31\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 1 66 amp=145 pan=31\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 1 67 amp=57 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 1 68 amp=64 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 1 69 amp=15 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 1 70 amp=31 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 1 71 amp=59 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 1 72 amp=76 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 1 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 1 74 amp=32 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 1 75 amp=78 pan=31\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 1 76 amp=69 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 1 77 amp=81 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 1 78 amp=105 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 1 79 amp=30 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 1 80 amp=45 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 1 81 amp=63 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 1 82 amp=155 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 1 83 amp=165 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 1 84 amp=95 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 1 85 amp=11 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 1 86 amp=46 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 1 87 amp=55 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 2\n27 %font \"FluidR3_GM.sf2\" 128 2 27 amp=31 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 2 28 amp=43 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 2 29 amp=26 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 2 30 amp=27 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 2 31 amp=75 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 2 32 amp=129 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 2 33 amp=85 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 2 34 amp=16 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 2 35 amp=110 pan=0\t# Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R)\n37 %font \"FluidR3_GM.sf2\" 128 2 37 amp=116 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 2 38 amp=281 pan=0\t# Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R)\n39 %font \"FluidR3_GM.sf2\" 128 2 39 amp=38 pan=-16\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 2 40 amp=221 pan=0\t# Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R)\n41 %font \"FluidR3_GM.sf2\" 128 2 41 amp=105 pan=-47\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 2 42 amp=20 pan=31\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 2 43 amp=106 pan=-28\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 2 44 amp=16 pan=31\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 2 45 amp=194 pan=-9\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 2 46 amp=62 pan=31\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 2 47 amp=114 pan=9\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 2 48 amp=148 pan=28\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 2 49 amp=81 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 2 50 amp=245 pan=47\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 2 51 amp=25 pan=-31\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 2 52 amp=38 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 2 53 amp=21 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 2 54 amp=17 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 2 55 amp=71 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 2 56 amp=102 pan=31\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 2 57 amp=56 pan=-31\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 2 58 amp=27 pan=-55\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 2 59 amp=16 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 2 60 amp=54 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 2 61 amp=88 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 2 62 amp=30 pan=-39\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 2 63 amp=78 pan=-39\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 2 64 amp=45 pan=-31\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 2 65 amp=98 pan=31\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 2 66 amp=95 pan=31\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 2 67 amp=92 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 2 68 amp=64 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 2 69 amp=15 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 2 70 amp=31 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 2 71 amp=59 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 2 72 amp=47 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 2 73 amp=69 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 2 74 amp=30 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 2 75 amp=78 pan=31\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 2 76 amp=68 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 2 77 amp=83 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 2 78 amp=66 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 2 79 amp=49 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 2 80 amp=63 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 2 81 amp=63 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 2 82 amp=155 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 2 83 amp=102 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 2 84 amp=35 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 2 85 amp=127 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 2 86 amp=51 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 2 87 amp=55 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 3\n27 %font \"FluidR3_GM.sf2\" 128 3 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 3 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 3 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 3 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 3 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 3 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 3 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 3 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 3 35 amp=100 pan=0\t# Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R)\n37 %font \"FluidR3_GM.sf2\" 128 3 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 3 38 amp=100 pan=0\t# Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R)\n39 %font \"FluidR3_GM.sf2\" 128 3 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 3 40 amp=100 pan=0\t# Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R)\n41 %font \"FluidR3_GM.sf2\" 128 3 41 amp=100 pan=0\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 3 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 3 43 amp=100 pan=0\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 3 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 3 45 amp=100 pan=0\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 3 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 3 47 amp=100 pan=0\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 3 48 amp=100 pan=0\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 3 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 3 50 amp=100 pan=0\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 3 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 3 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 3 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 3 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 3 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 3 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 3 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 3 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 3 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 3 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 3 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 3 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 3 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 3 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 3 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 3 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 3 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 3 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 3 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 3 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 3 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 3 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 3 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 3 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 3 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 3 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 3 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 3 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 3 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 3 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 3 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 3 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 3 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 3 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 3 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 3 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 3 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 4\n27 %font \"FluidR3_GM.sf2\" 128 4 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 4 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 4 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 4 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 4 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 4 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 4 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 4 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 4 35 amp=100 pan=0\t# Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R)\n37 %font \"FluidR3_GM.sf2\" 128 4 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 4 38 amp=100 pan=0\t# Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R)\n39 %font \"FluidR3_GM.sf2\" 128 4 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 4 40 amp=100 pan=0\t# Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R)\n41 %font \"FluidR3_GM.sf2\" 128 4 41 amp=100 pan=0\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 4 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 4 43 amp=100 pan=0\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 4 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 4 45 amp=100 pan=0\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 4 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 4 47 amp=100 pan=0\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 4 48 amp=100 pan=0\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 4 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 4 50 amp=100 pan=0\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 4 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 4 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 4 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 4 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 4 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 4 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 4 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 4 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 4 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 4 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 4 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 4 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 4 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 4 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 4 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 4 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 4 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 4 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 4 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 4 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 4 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 4 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 4 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 4 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 4 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 4 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 4 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 4 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 4 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 4 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 4 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 4 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 4 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 4 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 4 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 4 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 4 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 5\n27 %font \"FluidR3_GM.sf2\" 128 5 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 5 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 5 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 5 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 5 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 5 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 5 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 5 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 5 35 amp=100 pan=0\t# Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R)\n37 %font \"FluidR3_GM.sf2\" 128 5 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 5 38 amp=100 pan=0\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n39 %font \"FluidR3_GM.sf2\" 128 5 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 5 40 amp=100 pan=0\t# Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R)\n41 %font \"FluidR3_GM.sf2\" 128 5 41 amp=100 pan=0\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 5 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 5 43 amp=100 pan=0\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 5 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 5 45 amp=100 pan=0\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 5 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 5 47 amp=100 pan=0\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 5 48 amp=100 pan=0\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 5 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 5 50 amp=100 pan=0\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 5 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 5 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 5 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 5 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 5 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 5 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 5 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 5 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 5 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 5 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 5 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 5 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 5 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 5 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 5 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 5 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 5 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 5 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 5 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 5 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 5 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 5 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 5 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 5 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 5 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 5 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 5 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 5 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 5 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 5 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 5 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 5 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 5 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 5 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 5 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 5 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 5 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 6\n27 %font \"FluidR3_GM.sf2\" 128 6 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 6 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 6 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 6 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 6 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 6 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 6 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 6 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 6 35 amp=100 pan=0\t# Std Kick 4(L) Std Kick 4(R) Std Kick 4(L) Std Kick 4(R) Std Kick 4(L) Std Kick 4(R) Std Kick 4(L) Std Kick 4(R) Std Kick 4(L) Std Kick 4(R) Std Kick 4(L) Std Kick 4(R) Std Kick 4(L) Std Kick 4(R)\n37 %font \"FluidR3_GM.sf2\" 128 6 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 6 38 amp=100 pan=0\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n39 %font \"FluidR3_GM.sf2\" 128 6 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 6 40 amp=100 pan=0\t# Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R)\n41 %font \"FluidR3_GM.sf2\" 128 6 41 amp=100 pan=0\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 6 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 6 43 amp=100 pan=0\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 6 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 6 45 amp=100 pan=0\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 6 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 6 47 amp=100 pan=0\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 6 48 amp=100 pan=0\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 6 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 6 50 amp=100 pan=0\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 6 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 6 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 6 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 6 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 6 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 6 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 6 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 6 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 6 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 6 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 6 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 6 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 6 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 6 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 6 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 6 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 6 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 6 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 6 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 6 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 6 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 6 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 6 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 6 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 6 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 6 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 6 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 6 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 6 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 6 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 6 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 6 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 6 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 6 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 6 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 6 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 6 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 7\n27 %font \"FluidR3_GM.sf2\" 128 7 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 7 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 7 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 7 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 7 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 7 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 7 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 7 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 7 35 amp=100 pan=0\t# Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R)\n37 %font \"FluidR3_GM.sf2\" 128 7 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 7 38 amp=100 pan=0\t# Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R)\n39 %font \"FluidR3_GM.sf2\" 128 7 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 7 40 amp=100 pan=0\t# Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R)\n41 %font \"FluidR3_GM.sf2\" 128 7 41 amp=100 pan=0\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 7 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 7 43 amp=100 pan=0\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 7 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 7 45 amp=100 pan=0\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 7 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 7 47 amp=100 pan=0\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 7 48 amp=100 pan=0\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 7 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 7 50 amp=100 pan=0\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 7 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 7 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 7 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 7 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 7 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 7 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 7 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 7 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 7 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 7 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 7 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 7 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 7 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 7 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 7 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 7 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 7 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 7 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 7 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 7 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 7 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 7 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 7 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 7 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 7 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 7 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 7 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 7 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 7 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 7 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 7 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 7 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 7 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 7 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 7 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 7 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 7 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 8\n27 %font \"FluidR3_GM.sf2\" 128 8 27 amp=45 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 8 28 amp=70 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 8 29 amp=26 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 8 30 amp=27 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 8 31 amp=75 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 8 32 amp=131 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 8 33 amp=54 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 8 34 amp=16 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 8 35 amp=149 pan=0\t# Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R)\n37 %font \"FluidR3_GM.sf2\" 128 8 37 amp=116 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 8 38 amp=125 pan=0\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n39 %font \"FluidR3_GM.sf2\" 128 8 39 amp=58 pan=-16\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 8 40 amp=126 pan=0\t# Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R)\n41 %font \"FluidR3_GM.sf2\" 128 8 41 amp=84 pan=-47\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 8 42 amp=20 pan=31\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 8 43 amp=62 pan=-28\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 8 44 amp=31 pan=31\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 8 45 amp=231 pan=-9\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 8 46 amp=64 pan=31\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 8 47 amp=127 pan=9\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 8 48 amp=129 pan=28\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 8 49 amp=83 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 8 50 amp=238 pan=47\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 8 51 amp=29 pan=-31\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 8 52 amp=84 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 8 53 amp=24 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 8 54 amp=63 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 8 55 amp=51 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 8 56 amp=158 pan=31\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 8 57 amp=50 pan=-31\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 8 58 amp=27 pan=-55\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 8 59 amp=20 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 8 60 amp=54 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 8 61 amp=53 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 8 62 amp=46 pan=-39\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 8 63 amp=78 pan=-39\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 8 64 amp=45 pan=-31\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 8 65 amp=98 pan=31\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 8 66 amp=96 pan=31\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 8 67 amp=57 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 8 68 amp=103 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 8 69 amp=15 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 8 70 amp=31 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 8 71 amp=59 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 8 72 amp=47 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 8 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 8 74 amp=30 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 8 75 amp=123 pan=31\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 8 76 amp=68 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 8 77 amp=84 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 8 78 amp=66 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 8 79 amp=30 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 8 80 amp=64 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 8 81 amp=64 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 8 82 amp=155 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 8 83 amp=102 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 8 84 amp=34 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 8 85 amp=84 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 8 86 amp=71 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 8 87 amp=78 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 9\n27 %font \"FluidR3_GM.sf2\" 128 9 27 amp=32 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 9 28 amp=44 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 9 29 amp=52 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 9 30 amp=35 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 9 31 amp=75 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 9 32 amp=176 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 9 33 amp=54 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 9 34 amp=16 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 9 35 amp=288 pan=0\t# Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R)\n36 %font \"FluidR3_GM.sf2\" 128 25 36 amp=68 pan=0\t# 808 Kick 2 808 Kick 2\n37 %font \"FluidR3_GM.sf2\" 128 9 37 amp=210 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 9 38 amp=79 pan=0\t# Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R)\n39 %font \"FluidR3_GM.sf2\" 128 9 39 amp=38 pan=-16\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 9 40 amp=57 pan=0\t# Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R)\n41 %font \"FluidR3_GM.sf2\" 128 9 41 amp=237 pan=-47\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 9 42 amp=30 pan=31\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 9 43 amp=95 pan=-28\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 9 44 amp=20 pan=31\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 9 45 amp=178 pan=-9\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 9 46 amp=64 pan=31\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 9 47 amp=159 pan=9\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 9 48 amp=91 pan=28\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 9 49 amp=66 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 9 50 amp=100 pan=47\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 9 51 amp=23 pan=-31\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 9 52 amp=28 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 9 53 amp=55 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 9 54 amp=20 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 9 55 amp=50 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 9 56 amp=55 pan=31\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 9 57 amp=50 pan=-31\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 9 58 amp=27 pan=-55\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 9 59 amp=26 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 9 60 amp=54 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 9 61 amp=54 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 9 62 amp=30 pan=-39\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 9 63 amp=78 pan=-39\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 9 64 amp=72 pan=-31\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 9 65 amp=98 pan=31\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 9 66 amp=95 pan=31\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 9 67 amp=58 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 9 68 amp=64 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 9 69 amp=15 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 9 70 amp=48 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 9 71 amp=59 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 9 72 amp=76 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 9 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 9 74 amp=83 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 9 75 amp=68 pan=31\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 9 76 amp=68 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 9 77 amp=133 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 9 78 amp=87 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 9 79 amp=51 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 9 80 amp=36 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 9 81 amp=81 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 9 82 amp=99 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 9 83 amp=165 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 9 84 amp=35 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 9 85 amp=84 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 9 86 amp=48 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 9 87 amp=55 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 10\n27 %font \"FluidR3_GM.sf2\" 128 10 27 amp=32 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 10 28 amp=44 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 10 29 amp=32 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 10 30 amp=57 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 10 31 amp=76 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 10 32 amp=178 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 10 33 amp=53 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 10 34 amp=16 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 10 35 amp=63 pan=0\t# Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R)\n36 %font \"FluidR3_GM.sf2\" 128 25 36 amp=96 pan=0\t# 808 Kick 2 808 Kick 2\n37 %font \"FluidR3_GM.sf2\" 128 10 37 amp=118 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 10 38 amp=68 pan=0\t# RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R)\n39 %font \"FluidR3_GM.sf2\" 128 10 39 amp=71 pan=-16\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 10 40 amp=70 pan=0\t# RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R)\n41 %font \"FluidR3_GM.sf2\" 128 10 41 amp=237 pan=-47\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 10 42 amp=45 pan=31\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 10 43 amp=95 pan=-28\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 10 44 amp=39 pan=31\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 10 45 amp=178 pan=-9\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 10 46 amp=161 pan=31\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 10 47 amp=159 pan=9\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 10 48 amp=91 pan=28\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 10 49 amp=72 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 10 50 amp=34 pan=47\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 10 51 amp=23 pan=-31\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 10 52 amp=28 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 10 53 amp=55 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 10 54 amp=94 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 10 55 amp=50 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 10 56 amp=55 pan=31\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 10 57 amp=56 pan=-31\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 10 58 amp=27 pan=-55\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 10 59 amp=26 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 10 60 amp=87 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 10 61 amp=54 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 10 62 amp=30 pan=-39\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 10 63 amp=80 pan=-39\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 10 64 amp=46 pan=-31\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 10 65 amp=98 pan=31\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 10 66 amp=95 pan=31\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 10 67 amp=57 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 10 68 amp=64 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 10 69 amp=15 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 10 70 amp=48 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 10 71 amp=95 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 10 72 amp=76 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 10 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 10 74 amp=83 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 10 75 amp=64 pan=31\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 10 76 amp=68 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 10 77 amp=131 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 10 78 amp=86 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 10 79 amp=51 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 10 80 amp=36 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 10 81 amp=53 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 10 82 amp=99 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 10 83 amp=164 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 10 84 amp=53 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 10 85 amp=83 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 10 86 amp=47 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 10 87 amp=56 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 11\n27 %font \"FluidR3_GM.sf2\" 128 11 27 amp=32 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 11 28 amp=44 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 11 29 amp=32 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 11 30 amp=57 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 11 31 amp=119 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 11 32 amp=175 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 11 33 amp=53 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 11 34 amp=16 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 11 35 amp=184 pan=0\t# Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R)\n36 %font \"FluidR3_GM.sf2\" 128 25 36 amp=111 pan=0\t# 808 Kick 2 808 Kick 2\n37 %font \"FluidR3_GM.sf2\" 128 11 37 amp=210 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 11 38 amp=61 pan=0\t# RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R)\n39 %font \"FluidR3_GM.sf2\" 128 11 39 amp=57 pan=-16\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 11 40 amp=126 pan=0\t# RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R)\n41 %font \"FluidR3_GM.sf2\" 128 11 41 amp=130 pan=-47\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 11 42 amp=36 pan=31\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 11 43 amp=143 pan=-28\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 11 44 amp=52 pan=31\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 11 45 amp=170 pan=-9\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 11 46 amp=106 pan=31\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 11 47 amp=148 pan=9\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 11 48 amp=218 pan=28\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 11 49 amp=106 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 11 50 amp=160 pan=47\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 11 51 amp=23 pan=-31\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 11 52 amp=28 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 11 53 amp=41 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 11 54 amp=94 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 11 55 amp=72 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 11 56 amp=55 pan=31\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 11 57 amp=58 pan=-31\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 11 58 amp=47 pan=-55\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 11 59 amp=21 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 11 60 amp=106 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 11 61 amp=97 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 11 62 amp=69 pan=-39\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 11 63 amp=89 pan=-39\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 11 64 amp=88 pan=-31\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 11 65 amp=98 pan=31\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 11 66 amp=145 pan=31\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 11 67 amp=57 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 11 68 amp=64 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 11 69 amp=15 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 11 70 amp=48 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 11 71 amp=59 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 11 72 amp=76 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 11 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 11 74 amp=83 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 11 75 amp=71 pan=31\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 11 76 amp=68 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 11 77 amp=84 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 11 78 amp=133 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 11 79 amp=79 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 11 80 amp=36 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 11 81 amp=53 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 11 82 amp=99 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 11 83 amp=102 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 11 84 amp=52 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 11 85 amp=127 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 11 86 amp=48 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 11 87 amp=55 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 12\n27 %font \"FluidR3_GM.sf2\" 128 12 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 12 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 12 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 12 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 12 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 12 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 12 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 12 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 12 35 amp=100 pan=0\t# Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R)\n37 %font \"FluidR3_GM.sf2\" 128 12 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 12 38 amp=100 pan=0\t# Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R)\n39 %font \"FluidR3_GM.sf2\" 128 12 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 12 40 amp=100 pan=0\t# Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R)\n41 %font \"FluidR3_GM.sf2\" 128 12 41 amp=100 pan=0\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 12 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 12 43 amp=100 pan=0\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 12 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 12 45 amp=100 pan=0\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 12 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 12 47 amp=100 pan=0\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 12 48 amp=100 pan=0\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 12 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 12 50 amp=100 pan=0\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 12 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 12 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 12 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 12 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 12 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 12 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 12 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 12 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 12 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 12 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 12 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 12 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 12 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 12 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 12 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 12 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 12 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 12 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 12 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 12 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 12 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 12 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 12 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 12 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 12 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 12 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 12 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 12 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 12 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 12 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 12 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 12 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 12 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 12 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 12 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 12 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 12 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 13\n27 %font \"FluidR3_GM.sf2\" 128 13 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 13 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 13 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 13 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 13 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 13 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 13 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 13 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 13 35 amp=100 pan=0\t# Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R)\n37 %font \"FluidR3_GM.sf2\" 128 13 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 13 38 amp=100 pan=0\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n39 %font \"FluidR3_GM.sf2\" 128 13 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 13 40 amp=100 pan=0\t# Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R)\n41 %font \"FluidR3_GM.sf2\" 128 13 41 amp=100 pan=0\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 13 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 13 43 amp=100 pan=0\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 13 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 13 45 amp=100 pan=0\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 13 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 13 47 amp=100 pan=0\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 13 48 amp=100 pan=0\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 13 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 13 50 amp=100 pan=0\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 13 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 13 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 13 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 13 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 13 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 13 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 13 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 13 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 13 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 13 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 13 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 13 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 13 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 13 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 13 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 13 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 13 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 13 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 13 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 13 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 13 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 13 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 13 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 13 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 13 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 13 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 13 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 13 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 13 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 13 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 13 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 13 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 13 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 13 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 13 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 13 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 13 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 14\n27 %font \"FluidR3_GM.sf2\" 128 14 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 14 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 14 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 14 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 14 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 14 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 14 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 14 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 14 35 amp=100 pan=0\t# Std Kick 4(L) Std Kick 4(R) Std Kick 4(L) Std Kick 4(R) Std Kick 4(L) Std Kick 4(R) Std Kick 4(L) Std Kick 4(R) Std Kick 4(L) Std Kick 4(R) Std Kick 4(L) Std Kick 4(R) Std Kick 4(L) Std Kick 4(R)\n37 %font \"FluidR3_GM.sf2\" 128 14 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 14 38 amp=100 pan=0\t# Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R)\n39 %font \"FluidR3_GM.sf2\" 128 14 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 14 40 amp=100 pan=0\t# Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R)\n41 %font \"FluidR3_GM.sf2\" 128 14 41 amp=100 pan=0\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 14 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 14 43 amp=100 pan=0\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 14 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 14 45 amp=100 pan=0\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 14 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 14 47 amp=100 pan=0\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 14 48 amp=100 pan=0\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 14 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 14 50 amp=100 pan=0\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 14 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 14 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 14 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 14 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 14 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 14 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 14 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 14 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 14 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 14 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 14 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 14 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 14 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 14 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 14 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 14 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 14 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 14 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 14 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 14 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 14 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 14 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 14 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 14 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 14 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 14 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 14 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 14 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 14 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 14 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 14 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 14 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 14 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 14 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 14 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 14 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 14 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 15\n27 %font \"FluidR3_GM.sf2\" 128 15 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 15 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 15 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 15 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 15 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 15 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 15 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 15 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 15 35 amp=100 pan=0\t# Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R)\n37 %font \"FluidR3_GM.sf2\" 128 15 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 15 38 amp=100 pan=0\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n39 %font \"FluidR3_GM.sf2\" 128 15 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 15 40 amp=100 pan=0\t# Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R)\n41 %font \"FluidR3_GM.sf2\" 128 15 41 amp=100 pan=0\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 15 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 15 43 amp=100 pan=0\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 15 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 15 45 amp=100 pan=0\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 15 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 15 47 amp=100 pan=0\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 15 48 amp=100 pan=0\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 15 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 15 50 amp=100 pan=0\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 15 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 15 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 15 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 15 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 15 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 15 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 15 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 15 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 15 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 15 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 15 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 15 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 15 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 15 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 15 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 15 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 15 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 15 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 15 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 15 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 15 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 15 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 15 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 15 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 15 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 15 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 15 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 15 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 15 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 15 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 15 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 15 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 15 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 15 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 15 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 15 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 15 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 16\n27 %font \"FluidR3_GM.sf2\" 128 16 27 amp=45 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 16 28 amp=43 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 16 29 amp=26 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 16 30 amp=27 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 16 31 amp=75 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 16 32 amp=176 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 16 33 amp=86 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 16 34 amp=24 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 16 35 amp=147 pan=0\t# Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R\n36 %font \"FluidR3_GM.sf2\" 128 16 36 amp=80 pan=0\t# Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R\n37 %font \"FluidR3_GM.sf2\" 128 16 37 amp=116 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 16 38 amp=105 pan=0\t# Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R)\n39 %font \"FluidR3_GM.sf2\" 128 16 39 amp=93 pan=-16\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 16 40 amp=155 pan=0\t# Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R)\n41 %font \"FluidR3_GM.sf2\" 128 16 41 amp=82 pan=-47\t# Tom Floor(L) Tom Floor(R)\n42 %font \"FluidR3_GM.sf2\" 128 16 42 amp=20 pan=31\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 16 43 amp=79 pan=-28\t# Tom Floor(L) Tom Floor(R)\n44 %font \"FluidR3_GM.sf2\" 128 16 44 amp=10 pan=31\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 16 45 amp=98 pan=-9\t# Tom Low(L) Tom Low(R)\n46 %font \"FluidR3_GM.sf2\" 128 16 46 amp=62 pan=31\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 16 47 amp=59 pan=9\t# Tom Med(L) Tom Med(R)\n48 %font \"FluidR3_GM.sf2\" 128 16 48 amp=72 pan=28\t# Tom Hi(L) Tom Hi(R)\n49 %font \"FluidR3_GM.sf2\" 128 16 49 amp=83 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 16 50 amp=31 pan=47\t# Tom Hi(L) Tom Hi(R)\n51 %font \"FluidR3_GM.sf2\" 128 16 51 amp=29 pan=-31\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 16 52 amp=38 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 16 53 amp=24 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 16 54 amp=17 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 16 55 amp=50 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 16 56 amp=103 pan=31\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 16 57 amp=56 pan=-31\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 16 58 amp=65 pan=-55\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 16 59 amp=20 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 16 60 amp=54 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 16 61 amp=55 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 16 62 amp=30 pan=-39\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 16 63 amp=126 pan=-39\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 16 64 amp=70 pan=-31\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 16 65 amp=98 pan=31\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 16 66 amp=95 pan=31\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 16 67 amp=58 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 16 68 amp=64 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 16 69 amp=47 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 16 70 amp=31 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 16 71 amp=59 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 16 72 amp=47 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 16 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 16 74 amp=32 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 16 75 amp=123 pan=31\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 16 76 amp=68 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 16 77 amp=84 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 16 78 amp=66 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 16 79 amp=30 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 16 80 amp=45 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 16 81 amp=97 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 16 82 amp=155 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 16 83 amp=102 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 16 84 amp=34 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 16 85 amp=84 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 16 86 amp=46 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 16 87 amp=78 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 17\n27 %font \"FluidR3_GM.sf2\" 128 17 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 17 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 17 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 17 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 17 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 17 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 17 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 17 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 17 35 amp=100 pan=0\t# Power Kick (L) Power Kick (R) Power Kick (L) Power Kick (R) Power Kick (L) Power Kick (R) Power Kick (L) Power Kick (R) Power Kick (L) Power Kick (R) Power Kick (L) Power Kick (R) Power Kick (L) Power Kick (R)\n37 %font \"FluidR3_GM.sf2\" 128 17 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 17 38 amp=100 pan=0\t# RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R)\n39 %font \"FluidR3_GM.sf2\" 128 17 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 17 40 amp=100 pan=0\t# RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R)\n41 %font \"FluidR3_GM.sf2\" 128 17 41 amp=100 pan=0\t# Tom Floor(L) Tom Floor(R)\n42 %font \"FluidR3_GM.sf2\" 128 17 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 17 43 amp=100 pan=0\t# Tom Floor(L) Tom Floor(R)\n44 %font \"FluidR3_GM.sf2\" 128 17 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 17 45 amp=100 pan=0\t# Tom Low(L) Tom Low(R)\n46 %font \"FluidR3_GM.sf2\" 128 17 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 17 47 amp=100 pan=0\t# Tom Med(L) Tom Med(R)\n48 %font \"FluidR3_GM.sf2\" 128 17 48 amp=100 pan=0\t# Tom Hi(L) Tom Hi(R)\n49 %font \"FluidR3_GM.sf2\" 128 17 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 17 50 amp=100 pan=0\t# Tom Hi(L) Tom Hi(R)\n51 %font \"FluidR3_GM.sf2\" 128 17 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 17 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 17 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 17 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 17 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 17 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 17 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 17 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 17 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 17 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 17 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 17 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 17 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 17 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 17 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 17 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 17 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 17 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 17 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 17 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 17 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 17 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 17 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 17 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 17 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 17 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 17 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 17 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 17 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 17 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 17 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 17 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 17 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 17 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 17 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 17 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 17 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 18\n27 %font \"FluidR3_GM.sf2\" 128 18 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 18 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 18 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 18 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 18 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 18 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 18 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 18 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 18 35 amp=100 pan=0\t# Power Kick 2(L) Power Kick 2(R) Power Kick 2(L) Power Kick 2(R) Power Kick 2(L) Power Kick 2(R) Power Kick 2(L) Power Kick 2(R) Power Kick 2(L) Power Kick 2(R) Power Kick 2(L) Power Kick 2(R) Power Kick 2(L) Power Kick 2(R)\n37 %font \"FluidR3_GM.sf2\" 128 18 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 18 38 amp=100 pan=0\t# RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R)\n39 %font \"FluidR3_GM.sf2\" 128 18 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 18 40 amp=100 pan=0\t# RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R)\n41 %font \"FluidR3_GM.sf2\" 128 18 41 amp=100 pan=0\t# Tom Floor(L) Tom Floor(R)\n42 %font \"FluidR3_GM.sf2\" 128 18 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 18 43 amp=100 pan=0\t# Tom Floor(L) Tom Floor(R)\n44 %font \"FluidR3_GM.sf2\" 128 18 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 18 45 amp=100 pan=0\t# Tom Low(L) Tom Low(R)\n46 %font \"FluidR3_GM.sf2\" 128 18 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 18 47 amp=100 pan=0\t# Tom Med(L) Tom Med(R)\n48 %font \"FluidR3_GM.sf2\" 128 18 48 amp=100 pan=0\t# Tom Hi(L) Tom Hi(R)\n49 %font \"FluidR3_GM.sf2\" 128 18 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 18 50 amp=100 pan=0\t# Tom Hi(L) Tom Hi(R)\n51 %font \"FluidR3_GM.sf2\" 128 18 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 18 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 18 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 18 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 18 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 18 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 18 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 18 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 18 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 18 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 18 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 18 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 18 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 18 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 18 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 18 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 18 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 18 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 18 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 18 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 18 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 18 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 18 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 18 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 18 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 18 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 18 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 18 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 18 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 18 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 18 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 18 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 18 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 18 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 18 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 18 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 18 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 19\n27 %font \"FluidR3_GM.sf2\" 128 19 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 19 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 19 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 19 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 19 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 19 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 19 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 19 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 19 35 amp=100 pan=0\t# Power Kick 3(L) Power Kick 3(R) Power Kick 3(L) Power Kick 3(R) Power Kick 3(L) Power Kick 3(R) Power Kick 3(L) Power Kick 3(R) Power Kick 3(L) Power Kick 3(R) Power Kick 3(L) Power Kick 3(R) Power Kick 3(L) Power Kick 3(R)\n37 %font \"FluidR3_GM.sf2\" 128 19 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 19 38 amp=100 pan=0\t# RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R)\n39 %font \"FluidR3_GM.sf2\" 128 19 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 19 40 amp=100 pan=0\t# RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R)\n41 %font \"FluidR3_GM.sf2\" 128 19 41 amp=100 pan=0\t# Tom Floor(L) Tom Floor(R)\n42 %font \"FluidR3_GM.sf2\" 128 19 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 19 43 amp=100 pan=0\t# Tom Floor(L) Tom Floor(R)\n44 %font \"FluidR3_GM.sf2\" 128 19 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 19 45 amp=100 pan=0\t# Tom Low(L) Tom Low(R)\n46 %font \"FluidR3_GM.sf2\" 128 19 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 19 47 amp=100 pan=0\t# Tom Med(L) Tom Med(R)\n48 %font \"FluidR3_GM.sf2\" 128 19 48 amp=100 pan=0\t# Tom Hi(L) Tom Hi(R)\n49 %font \"FluidR3_GM.sf2\" 128 19 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 19 50 amp=100 pan=0\t# Tom Hi(L) Tom Hi(R)\n51 %font \"FluidR3_GM.sf2\" 128 19 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 19 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 19 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 19 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 19 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 19 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 19 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 19 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 19 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 19 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 19 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 19 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 19 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 19 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 19 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 19 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 19 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 19 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 19 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 19 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 19 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 19 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 19 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 19 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 19 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 19 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 19 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 19 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 19 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 19 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 19 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 19 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 19 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 19 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 19 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 19 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 19 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 24\n27 %font \"FluidR3_GM.sf2\" 128 24 27 amp=31 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 24 28 amp=44 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 24 29 amp=31 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 24 30 amp=57 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 24 31 amp=74 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 24 32 amp=176 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 24 33 amp=54 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 24 34 amp=16 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 24 35 amp=162 pan=0\t# Elec Kick1(L) Elec Kick1(R)\n36 %font \"FluidR3_GM.sf2\" 128 24 36 amp=265 pan=0\t# Elec Kick2(L) Elec Kick2(R)\n37 %font \"FluidR3_GM.sf2\" 128 24 37 amp=116 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 24 38 amp=151 pan=0\t# Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R)\n39 %font \"FluidR3_GM.sf2\" 128 24 39 amp=58 pan=-16\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 24 40 amp=67 pan=0\t# Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R)\n41 %font \"FluidR3_GM.sf2\" 128 24 41 amp=180 pan=-47\t# ElectTom(L) ElectTom(R)\n42 %font \"FluidR3_GM.sf2\" 128 24 42 amp=33 pan=31\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 24 43 amp=119 pan=-28\t# ElectTom(L) ElectTom(R)\n44 %font \"FluidR3_GM.sf2\" 128 24 44 amp=14 pan=31\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 24 45 amp=114 pan=-9\t# ElectTom(L) ElectTom(R)\n46 %font \"FluidR3_GM.sf2\" 128 24 46 amp=47 pan=31\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 24 47 amp=116 pan=9\t# ElectTom(L) ElectTom(R)\n48 %font \"FluidR3_GM.sf2\" 128 24 48 amp=171 pan=28\t# ElectTom(L) ElectTom(R)\n49 %font \"FluidR3_GM.sf2\" 128 24 49 amp=83 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 24 50 amp=53 pan=47\t# ElectTom(L) ElectTom(R)\n51 %font \"FluidR3_GM.sf2\" 128 24 51 amp=23 pan=-31\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 24 52 amp=28 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 24 53 amp=41 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 24 54 amp=97 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 24 55 amp=51 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 24 56 amp=101 pan=31\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 24 57 amp=50 pan=-31\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 24 58 amp=27 pan=-55\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 24 59 amp=25 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 24 60 amp=86 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 24 61 amp=54 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 24 62 amp=30 pan=-39\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 24 63 amp=79 pan=-39\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 24 64 amp=45 pan=-31\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 24 65 amp=98 pan=31\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 24 66 amp=96 pan=31\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 24 67 amp=57 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 24 68 amp=65 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 24 69 amp=15 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 24 70 amp=31 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 24 71 amp=59 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 24 72 amp=47 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 24 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 24 74 amp=30 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 24 75 amp=78 pan=31\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 24 76 amp=109 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 24 77 amp=82 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 24 78 amp=66 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 24 79 amp=30 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 24 80 amp=43 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 24 81 amp=64 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 24 82 amp=249 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 24 83 amp=103 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 24 84 amp=34 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 24 85 amp=83 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 24 86 amp=46 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 24 87 amp=55 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 25\n27 %font \"FluidR3_GM.sf2\" 128 25 27 amp=31 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 25 28 amp=43 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 25 29 amp=31 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 25 30 amp=35 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 25 31 amp=119 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 25 32 amp=130 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 25 33 amp=54 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 25 34 amp=16 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 25 35 amp=54 pan=0\t# 808 Kick 1 808 Kick 1\n36 %font \"FluidR3_GM.sf2\" 128 25 36 amp=70 pan=0\t# 808 Kick 2 808 Kick 2\n37 %font \"FluidR3_GM.sf2\" 128 25 37 amp=331 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 25 38 amp=29 pan=0\t# 808 Snare 1 808 Snare 1\n39 %font \"FluidR3_GM.sf2\" 128 25 39 amp=45 pan=-16\t# 808 Clap 808 Clap\n40 %font \"FluidR3_GM.sf2\" 128 25 40 amp=45 pan=0\t# 808 Snare 2 808 Snare 2\n41 %font \"FluidR3_GM.sf2\" 128 25 41 amp=38 pan=-47\t# 808 Tom 1 808 Tom 1\n42 %font \"FluidR3_GM.sf2\" 128 25 42 amp=21 pan=31\t# 808 Closed Hat 808 Closed Hat\n43 %font \"FluidR3_GM.sf2\" 128 25 43 amp=36 pan=-28\t# 808 Tom 2 808 Tom 2\n44 %font \"FluidR3_GM.sf2\" 128 25 44 amp=70 pan=31\t# 808 Open Hat 808 Open Hat\n45 %font \"FluidR3_GM.sf2\" 128 25 45 amp=53 pan=-9\t# 808 Tom 3 808 Tom 3\n46 %font \"FluidR3_GM.sf2\" 128 25 46 amp=78 pan=31\t# 808 Open Hat 808 Open Hat\n47 %font \"FluidR3_GM.sf2\" 128 25 47 amp=33 pan=9\t# 808 Tom 4 808 Tom 4\n48 %font \"FluidR3_GM.sf2\" 128 25 48 amp=30 pan=28\t# 808 Tom 5 808 Tom 5\n49 %font \"FluidR3_GM.sf2\" 128 25 49 amp=56 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 25 50 amp=46 pan=47\t# 808 Tom 6 808 Tom 6\n51 %font \"FluidR3_GM.sf2\" 128 25 51 amp=22 pan=-31\t# Ride1(L) Ride1(R) 808 Ride 808 Ride\n52 %font \"FluidR3_GM.sf2\" 128 25 52 amp=65 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 25 53 amp=24 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 25 54 amp=99 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 25 55 amp=44 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 25 56 amp=30 pan=31\t# 808 Cowbell 808 Cowbell\n57 %font \"FluidR3_GM.sf2\" 128 25 57 amp=58 pan=-31\t# Crsh 2(L) Crsh 2(R)\n59 %font \"FluidR3_GM.sf2\" 128 25 59 amp=20 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 25 60 amp=15 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 25 61 amp=63 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 25 62 amp=28 pan=-39\t# 808 High Conga 808 High Conga\n63 %font \"FluidR3_GM.sf2\" 128 25 63 amp=66 pan=-31\t# 808 Mid Conga 808 Mid Conga\n64 %font \"FluidR3_GM.sf2\" 128 25 64 amp=61 pan=-23\t# 808 Low Conga 808 Low Conga\n67 %font \"FluidR3_GM.sf2\" 128 25 67 amp=57 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 25 68 amp=64 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 25 69 amp=47 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 25 70 amp=78 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 25 71 amp=59 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 25 72 amp=47 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 25 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 25 74 amp=83 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 25 75 amp=41 pan=31\t# 808 Clave 808 Clave\n76 %font \"FluidR3_GM.sf2\" 128 25 76 amp=109 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 25 77 amp=81 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 25 78 amp=86 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 25 79 amp=51 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 25 80 amp=36 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 25 81 amp=54 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 25 82 amp=99 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 25 83 amp=102 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 25 84 amp=35 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 25 85 amp=83 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 25 86 amp=46 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 25 87 amp=77 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 26\n27 %font \"FluidR3_GM.sf2\" 128 25 27 amp=45 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 25 28 amp=70 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 25 29 amp=31 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 25 30 amp=35 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 25 31 amp=75 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 25 32 amp=128 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 25 33 amp=54 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 25 34 amp=16 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 25 35 amp=97 pan=0\t# 808 Kick 1 808 Kick 1\n36 %font \"FluidR3_GM.sf2\" 128 24 35 amp=104 pan=0\t# Elec Kick1(L) Elec Kick1(R)\n37 %font \"FluidR3_GM.sf2\" 128 25 37 amp=116 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 11 38 amp=71 pan=0\t# RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R)\n39 %font \"FluidR3_GM.sf2\" 128 25 39 amp=46 pan=-16\t# 808 Clap 808 Clap\n40 %font \"FluidR3_GM.sf2\" 128 11 40 amp=190 pan=0\t# RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R)\n41 %font \"FluidR3_GM.sf2\" 128 24 41 amp=123 pan=-47\t# ElectTom(L) ElectTom(R)\n42 %font \"FluidR3_GM.sf2\" 128 25 42 amp=34 pan=31\t# 808 Closed Hat 808 Closed Hat\n43 %font \"FluidR3_GM.sf2\" 128 24 43 amp=117 pan=-28\t# ElectTom(L) ElectTom(R)\n44 %font \"FluidR3_GM.sf2\" 128 25 44 amp=28 pan=31\t# 808 Open Hat 808 Open Hat\n45 %font \"FluidR3_GM.sf2\" 128 24 45 amp=116 pan=-9\t# ElectTom(L) ElectTom(R)\n46 %font \"FluidR3_GM.sf2\" 128 25 46 amp=112 pan=31\t# 808 Open Hat 808 Open Hat\n47 %font \"FluidR3_GM.sf2\" 128 24 47 amp=114 pan=9\t# ElectTom(L) ElectTom(R)\n48 %font \"FluidR3_GM.sf2\" 128 24 48 amp=117 pan=28\t# ElectTom(L) ElectTom(R)\n49 %font \"FluidR3_GM.sf2\" 128 25 49 amp=55 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 24 50 amp=53 pan=47\t# ElectTom(L) ElectTom(R)\n51 %font \"FluidR3_GM.sf2\" 128 25 51 amp=22 pan=-31\t# Ride1(L) Ride1(R) 808 Ride 808 Ride\n52 %font \"FluidR3_GM.sf2\" 128 25 52 amp=80 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 25 53 amp=55 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 11 54 amp=59 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 25 55 amp=50 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 25 56 amp=31 pan=31\t# 808 Cowbell 808 Cowbell\n57 %font \"FluidR3_GM.sf2\" 128 25 57 amp=56 pan=-31\t# Crsh 2(L) Crsh 2(R)\n59 %font \"FluidR3_GM.sf2\" 128 25 59 amp=20 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 25 60 amp=9 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 25 61 amp=53 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 25 62 amp=13 pan=-39\t# 808 High Conga 808 High Conga\n63 %font \"FluidR3_GM.sf2\" 128 25 63 amp=65 pan=-39\t# 808 Mid Conga 808 Mid Conga\n64 %font \"FluidR3_GM.sf2\" 128 25 64 amp=48 pan=-31\t# 808 Low Conga 808 Low Conga\n67 %font \"FluidR3_GM.sf2\" 128 25 67 amp=57 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 25 68 amp=65 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 25 69 amp=15 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 25 70 amp=49 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 25 71 amp=59 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 25 72 amp=47 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 25 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 25 74 amp=32 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 25 75 amp=53 pan=31\t# 808 Clave 808 Clave\n76 %font \"FluidR3_GM.sf2\" 128 25 76 amp=109 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 25 77 amp=84 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 25 78 amp=86 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 25 79 amp=51 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 25 80 amp=36 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 25 81 amp=53 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 25 82 amp=158 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 25 83 amp=165 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 25 84 amp=34 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 25 85 amp=83 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 25 86 amp=46 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 25 87 amp=54 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 27\n27 %font \"FluidR3_GM.sf2\" 128 25 27 amp=32 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 25 28 amp=44 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 25 29 amp=31 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 25 30 amp=35 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 25 31 amp=75 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 25 32 amp=178 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 25 33 amp=54 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 25 34 amp=16 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 25 35 amp=78 pan=0\t# 808 Kick 1 808 Kick 1\n36 %font \"FluidR3_GM.sf2\" 128 25 36 amp=64 pan=0\t# 808 Kick 2 808 Kick 2\n37 %font \"FluidR3_GM.sf2\" 128 25 37 amp=352 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 25 38 amp=41 pan=0\t# 808 Snare 1 808 Snare 1\n39 %font \"FluidR3_GM.sf2\" 128 25 39 amp=44 pan=-16\t# 808 Clap 808 Clap\n40 %font \"FluidR3_GM.sf2\" 128 25 40 amp=50 pan=0\t# 808 Snare 2 808 Snare 2\n41 %font \"FluidR3_GM.sf2\" 128 25 41 amp=60 pan=-47\t# 808 Tom 1 808 Tom 1\n42 %font \"FluidR3_GM.sf2\" 128 25 42 amp=34 pan=31\t# 808 Closed Hat 808 Closed Hat\n43 %font \"FluidR3_GM.sf2\" 128 25 43 amp=70 pan=-28\t# 808 Tom 2 808 Tom 2\n44 %font \"FluidR3_GM.sf2\" 128 25 44 amp=52 pan=31\t# 808 Open Hat 808 Open Hat\n45 %font \"FluidR3_GM.sf2\" 128 25 45 amp=51 pan=-9\t# 808 Tom 3 808 Tom 3\n46 %font \"FluidR3_GM.sf2\" 128 25 46 amp=71 pan=31\t# 808 Open Hat 808 Open Hat\n47 %font \"FluidR3_GM.sf2\" 128 25 47 amp=29 pan=9\t# 808 Tom 4 808 Tom 4\n48 %font \"FluidR3_GM.sf2\" 128 25 48 amp=61 pan=28\t# 808 Tom 5 808 Tom 5\n49 %font \"FluidR3_GM.sf2\" 128 25 49 amp=72 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 25 50 amp=11 pan=47\t# 808 Tom 6 808 Tom 6\n51 %font \"FluidR3_GM.sf2\" 128 25 51 amp=22 pan=-31\t# Ride1(L) Ride1(R) 808 Ride 808 Ride\n52 %font \"FluidR3_GM.sf2\" 128 25 52 amp=65 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 25 53 amp=24 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 25 54 amp=30 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 25 55 amp=72 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 25 56 amp=91 pan=31\t# 808 Cowbell 808 Cowbell\n57 %font \"FluidR3_GM.sf2\" 128 25 57 amp=58 pan=-31\t# Crsh 2(L) Crsh 2(R)\n59 %font \"FluidR3_GM.sf2\" 128 25 59 amp=19 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 25 60 amp=70 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 25 61 amp=63 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 25 62 amp=28 pan=-39\t# 808 High Conga 808 High Conga\n63 %font \"FluidR3_GM.sf2\" 128 25 63 amp=70 pan=-39\t# 808 Mid Conga 808 Mid Conga\n64 %font \"FluidR3_GM.sf2\" 128 25 64 amp=90 pan=-31\t# 808 Low Conga 808 Low Conga\n67 %font \"FluidR3_GM.sf2\" 128 25 67 amp=57 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 25 68 amp=64 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 25 69 amp=47 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 25 70 amp=141 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 25 71 amp=59 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 25 72 amp=47 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 25 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 25 74 amp=83 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 25 75 amp=23 pan=31\t# 808 Clave 808 Clave\n76 %font \"FluidR3_GM.sf2\" 128 25 76 amp=68 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 25 77 amp=81 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 25 78 amp=87 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 25 79 amp=51 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 25 80 amp=161 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 25 81 amp=256 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 25 82 amp=158 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 25 83 amp=102 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 25 84 amp=36 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 25 85 amp=83 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 25 86 amp=47 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 25 87 amp=78 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 28\n27 %font \"FluidR3_GM.sf2\" 128 25 27 amp=31 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 25 28 amp=70 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 25 29 amp=32 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 25 30 amp=57 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 25 31 amp=75 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 25 32 amp=178 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 25 33 amp=86 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 25 34 amp=24 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 25 35 amp=78 pan=0\t# 808 Kick 1 808 Kick 1\n36 %font \"FluidR3_GM.sf2\" 128 25 36 amp=61 pan=0\t# 808 Kick 2 808 Kick 2\n37 %font \"FluidR3_GM.sf2\" 128 25 37 amp=352 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 25 38 amp=40 pan=0\t# 808 Snare 1 808 Snare 1\n39 %font \"FluidR3_GM.sf2\" 128 25 39 amp=44 pan=-16\t# 808 Clap 808 Clap\n40 %font \"FluidR3_GM.sf2\" 128 25 40 amp=69 pan=0\t# 808 Snare 2 808 Snare 2\n41 %font \"FluidR3_GM.sf2\" 128 25 41 amp=71 pan=-47\t# 808 Tom 1 808 Tom 1\n42 %font \"FluidR3_GM.sf2\" 128 25 42 amp=24 pan=31\t# 808 Closed Hat 808 Closed Hat\n43 %font \"FluidR3_GM.sf2\" 128 25 43 amp=33 pan=-28\t# 808 Tom 2 808 Tom 2\n44 %font \"FluidR3_GM.sf2\" 128 25 44 amp=52 pan=31\t# 808 Open Hat 808 Open Hat\n45 %font \"FluidR3_GM.sf2\" 128 25 45 amp=33 pan=-9\t# 808 Tom 3 808 Tom 3\n46 %font \"FluidR3_GM.sf2\" 128 25 46 amp=97 pan=31\t# 808 Open Hat 808 Open Hat\n47 %font \"FluidR3_GM.sf2\" 128 25 47 amp=30 pan=9\t# 808 Tom 4 808 Tom 4\n48 %font \"FluidR3_GM.sf2\" 128 25 48 amp=36 pan=28\t# 808 Tom 5 808 Tom 5\n49 %font \"FluidR3_GM.sf2\" 128 25 49 amp=55 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 25 50 amp=23 pan=47\t# 808 Tom 6 808 Tom 6\n51 %font \"FluidR3_GM.sf2\" 128 25 51 amp=22 pan=-31\t# Ride1(L) Ride1(R) 808 Ride 808 Ride\n52 %font \"FluidR3_GM.sf2\" 128 25 52 amp=65 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 25 53 amp=39 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 25 54 amp=100 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 25 55 amp=73 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 25 56 amp=56 pan=31\t# 808 Cowbell 808 Cowbell\n57 %font \"FluidR3_GM.sf2\" 128 25 57 amp=58 pan=-31\t# Crsh 2(L) Crsh 2(R)\n59 %font \"FluidR3_GM.sf2\" 128 25 59 amp=20 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 25 60 amp=15 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 25 61 amp=63 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 25 62 amp=44 pan=-39\t# 808 High Conga 808 High Conga\n63 %font \"FluidR3_GM.sf2\" 128 25 63 amp=65 pan=-39\t# 808 Mid Conga 808 Mid Conga\n64 %font \"FluidR3_GM.sf2\" 128 25 64 amp=63 pan=-31\t# 808 Low Conga 808 Low Conga\n67 %font \"FluidR3_GM.sf2\" 128 25 67 amp=57 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 25 68 amp=103 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 25 69 amp=15 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 25 70 amp=87 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 25 71 amp=59 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 25 72 amp=47 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 25 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 25 74 amp=83 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 25 75 amp=36 pan=31\t# 808 Clave 808 Clave\n76 %font \"FluidR3_GM.sf2\" 128 25 76 amp=68 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 25 77 amp=84 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 25 78 amp=86 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 25 79 amp=50 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 25 80 amp=155 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 25 81 amp=256 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 25 82 amp=99 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 25 83 amp=165 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 25 84 amp=53 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 25 85 amp=83 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 25 86 amp=48 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 25 87 amp=56 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 29\n27 %font \"FluidR3_GM.sf2\" 128 25 27 amp=32 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 25 28 amp=43 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 25 29 amp=52 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 25 30 amp=57 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 25 31 amp=119 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 25 32 amp=178 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 25 33 amp=54 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 25 34 amp=16 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 25 35 amp=70 pan=0\t# 808 Kick 1 808 Kick 1\n36 %font \"FluidR3_GM.sf2\" 128 25 36 amp=65 pan=0\t# 808 Kick 2 808 Kick 2\n37 %font \"FluidR3_GM.sf2\" 128 25 37 amp=150 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 25 38 amp=112 pan=0\t# 808 Snare 1 808 Snare 1\n39 %font \"FluidR3_GM.sf2\" 128 25 39 amp=44 pan=-16\t# 808 Clap 808 Clap\n40 %font \"FluidR3_GM.sf2\" 128 25 40 amp=88 pan=0\t# 808 Snare 2 808 Snare 2\n41 %font \"FluidR3_GM.sf2\" 128 25 41 amp=60 pan=-47\t# 808 Tom 1 808 Tom 1\n42 %font \"FluidR3_GM.sf2\" 128 25 42 amp=20 pan=31\t# 808 Closed Hat 808 Closed Hat\n43 %font \"FluidR3_GM.sf2\" 128 25 43 amp=55 pan=-28\t# 808 Tom 2 808 Tom 2\n44 %font \"FluidR3_GM.sf2\" 128 25 44 amp=25 pan=31\t# 808 Open Hat 808 Open Hat\n45 %font \"FluidR3_GM.sf2\" 128 25 45 amp=55 pan=-9\t# 808 Tom 3 808 Tom 3\n46 %font \"FluidR3_GM.sf2\" 128 25 46 amp=71 pan=31\t# 808 Open Hat 808 Open Hat\n47 %font \"FluidR3_GM.sf2\" 128 25 47 amp=23 pan=9\t# 808 Tom 4 808 Tom 4\n48 %font \"FluidR3_GM.sf2\" 128 25 48 amp=21 pan=28\t# 808 Tom 5 808 Tom 5\n49 %font \"FluidR3_GM.sf2\" 128 25 49 amp=107 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 25 50 amp=31 pan=47\t# 808 Tom 6 808 Tom 6\n51 %font \"FluidR3_GM.sf2\" 128 25 51 amp=28 pan=-31\t# Ride1(L) Ride1(R) 808 Ride 808 Ride\n52 %font \"FluidR3_GM.sf2\" 128 25 52 amp=60 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 25 53 amp=39 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 25 54 amp=100 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 25 55 amp=50 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 25 56 amp=30 pan=31\t# 808 Cowbell 808 Cowbell\n57 %font \"FluidR3_GM.sf2\" 128 25 57 amp=49 pan=-31\t# Crsh 2(L) Crsh 2(R)\n59 %font \"FluidR3_GM.sf2\" 128 25 59 amp=19 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 25 60 amp=9 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 25 61 amp=54 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 25 62 amp=13 pan=-39\t# 808 High Conga 808 High Conga\n63 %font \"FluidR3_GM.sf2\" 128 25 63 amp=66 pan=-39\t# 808 Mid Conga 808 Mid Conga\n64 %font \"FluidR3_GM.sf2\" 128 25 64 amp=50 pan=-31\t# 808 Low Conga 808 Low Conga\n67 %font \"FluidR3_GM.sf2\" 128 25 67 amp=57 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 25 68 amp=64 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 25 69 amp=15 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 25 70 amp=78 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 25 71 amp=59 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 25 72 amp=47 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 25 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 25 74 amp=33 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 25 75 amp=33 pan=31\t# 808 Clave 808 Clave\n76 %font \"FluidR3_GM.sf2\" 128 25 76 amp=68 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 25 77 amp=131 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 25 78 amp=134 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 25 79 amp=51 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 25 80 amp=36 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 25 81 amp=53 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 25 82 amp=99 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 25 83 amp=102 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 25 84 amp=34 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 25 85 amp=84 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 25 86 amp=72 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 25 87 amp=55 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 30\n27 %font \"FluidR3_GM.sf2\" 128 25 27 amp=31 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 25 28 amp=43 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 25 29 amp=32 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 25 30 amp=57 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 25 31 amp=74 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 25 32 amp=176 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 25 33 amp=54 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 25 34 amp=16 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 25 35 amp=58 pan=0\t# 808 Kick 1 808 Kick 1\n36 %font \"FluidR3_GM.sf2\" 128 25 36 amp=95 pan=0\t# 808 Kick 2 808 Kick 2\n37 %font \"FluidR3_GM.sf2\" 128 25 37 amp=365 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 25 38 amp=65 pan=0\t# 808 Snare 1 808 Snare 1\n39 %font \"FluidR3_GM.sf2\" 128 25 39 amp=30 pan=-16\t# 808 Clap 808 Clap\n40 %font \"FluidR3_GM.sf2\" 128 25 40 amp=30 pan=0\t# 808 Snare 2 808 Snare 2\n41 %font \"FluidR3_GM.sf2\" 128 25 41 amp=46 pan=-47\t# 808 Tom 1 808 Tom 1\n42 %font \"FluidR3_GM.sf2\" 128 25 42 amp=13 pan=31\t# 808 Closed Hat 808 Closed Hat\n43 %font \"FluidR3_GM.sf2\" 128 25 43 amp=38 pan=-28\t# 808 Tom 2 808 Tom 2\n44 %font \"FluidR3_GM.sf2\" 128 25 44 amp=35 pan=31\t# 808 Open Hat 808 Open Hat\n45 %font \"FluidR3_GM.sf2\" 128 25 45 amp=36 pan=-9\t# 808 Tom 3 808 Tom 3\n46 %font \"FluidR3_GM.sf2\" 128 25 46 amp=64 pan=31\t# 808 Open Hat 808 Open Hat\n47 %font \"FluidR3_GM.sf2\" 128 25 47 amp=22 pan=9\t# 808 Tom 4 808 Tom 4\n48 %font \"FluidR3_GM.sf2\" 128 25 48 amp=19 pan=28\t# 808 Tom 5 808 Tom 5\n49 %font \"FluidR3_GM.sf2\" 128 25 49 amp=66 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 25 50 amp=29 pan=47\t# 808 Tom 6 808 Tom 6\n51 %font \"FluidR3_GM.sf2\" 128 25 51 amp=28 pan=-31\t# Ride1(L) Ride1(R) 808 Ride 808 Ride\n52 %font \"FluidR3_GM.sf2\" 128 25 52 amp=84 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 25 53 amp=41 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 25 54 amp=100 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 25 55 amp=50 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 25 56 amp=49 pan=31\t# 808 Cowbell 808 Cowbell\n57 %font \"FluidR3_GM.sf2\" 128 25 57 amp=50 pan=-31\t# Crsh 2(L) Crsh 2(R)\n59 %font \"FluidR3_GM.sf2\" 128 25 59 amp=20 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 25 60 amp=54 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 25 61 amp=55 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 25 62 amp=13 pan=-39\t# 808 High Conga 808 High Conga\n63 %font \"FluidR3_GM.sf2\" 128 25 63 amp=65 pan=-39\t# 808 Mid Conga 808 Mid Conga\n64 %font \"FluidR3_GM.sf2\" 128 25 64 amp=47 pan=-31\t# 808 Low Conga 808 Low Conga\n67 %font \"FluidR3_GM.sf2\" 128 25 67 amp=57 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 25 68 amp=103 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 25 69 amp=47 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 25 70 amp=78 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 25 71 amp=59 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 25 72 amp=47 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 25 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 25 74 amp=83 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 25 75 amp=30 pan=31\t# 808 Clave 808 Clave\n76 %font \"FluidR3_GM.sf2\" 128 25 76 amp=110 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 25 77 amp=131 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 25 78 amp=134 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 25 79 amp=51 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 25 80 amp=36 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 25 81 amp=53 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 25 82 amp=99 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 25 83 amp=164 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 25 84 amp=52 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 25 85 amp=83 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 25 86 amp=49 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 25 87 amp=78 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 32\n27 %font \"FluidR3_GM.sf2\" 128 32 27 amp=31 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 32 28 amp=43 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 32 29 amp=43 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 32 30 amp=43 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 32 31 amp=75 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 32 32 amp=176 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 32 33 amp=53 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 32 34 amp=16 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 32 35 amp=119 pan=0\t# Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R)\n37 %font \"FluidR3_GM.sf2\" 128 32 37 amp=186 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 32 38 amp=104 pan=0\t# Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R)\n39 %font \"FluidR3_GM.sf2\" 128 32 39 amp=66 pan=-16\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 32 40 amp=101 pan=0\t# Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R)\n41 %font \"FluidR3_GM.sf2\" 128 32 41 amp=94 pan=-47\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 32 42 amp=21 pan=31\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 32 43 amp=73 pan=-28\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 32 44 amp=21 pan=31\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 32 45 amp=131 pan=-9\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 32 46 amp=46 pan=31\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 32 47 amp=114 pan=9\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 32 48 amp=148 pan=28\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 32 49 amp=83 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 32 50 amp=76 pan=47\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 32 51 amp=27 pan=-31\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 32 52 amp=38 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 32 53 amp=23 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 32 54 amp=63 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 32 55 amp=44 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 32 56 amp=101 pan=31\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 32 57 amp=56 pan=-31\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 32 58 amp=65 pan=-55\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 32 59 amp=27 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 32 60 amp=54 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 32 61 amp=55 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 32 62 amp=30 pan=-39\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 32 63 amp=79 pan=-39\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 32 64 amp=69 pan=-31\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 32 65 amp=152 pan=31\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 32 66 amp=95 pan=31\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 32 67 amp=57 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 32 68 amp=64 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 32 69 amp=15 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 32 70 amp=31 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 32 71 amp=95 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 32 72 amp=75 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 32 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 32 74 amp=31 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 32 75 amp=78 pan=31\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 32 76 amp=68 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 32 77 amp=84 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 32 78 amp=66 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 32 79 amp=30 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 32 80 amp=44 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 32 81 amp=63 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 32 82 amp=155 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 32 83 amp=103 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 32 84 amp=34 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 32 85 amp=127 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 32 86 amp=50 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 32 87 amp=53 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 33\n27 %font \"FluidR3_GM.sf2\" 128 33 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 33 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 33 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 33 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 33 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 33 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 33 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 33 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 33 35 amp=100 pan=0\t# Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R)\n37 %font \"FluidR3_GM.sf2\" 128 33 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 33 38 amp=100 pan=0\t# Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R) Piccolo 1-1(L) Piccolo 1-1(R)\n39 %font \"FluidR3_GM.sf2\" 128 33 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 33 40 amp=100 pan=0\t# Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R) Piccolo 1-2(L) Piccolo 1-2(R)\n41 %font \"FluidR3_GM.sf2\" 128 33 41 amp=100 pan=0\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 33 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 33 43 amp=100 pan=0\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 33 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 33 45 amp=100 pan=0\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 33 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 33 47 amp=100 pan=0\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 33 48 amp=100 pan=0\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 33 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 33 50 amp=100 pan=0\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 33 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 33 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 33 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 33 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 33 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 33 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 33 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 33 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 33 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 33 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 33 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 33 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 33 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 33 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 33 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 33 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 33 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 33 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 33 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 33 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 33 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 33 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 33 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 33 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 33 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 33 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 33 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 33 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 33 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 33 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 33 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 33 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 33 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 33 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 33 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 33 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 33 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 34\n27 %font \"FluidR3_GM.sf2\" 128 34 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 34 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 34 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 34 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 34 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 34 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 34 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 34 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 34 35 amp=100 pan=0\t# Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R)\n37 %font \"FluidR3_GM.sf2\" 128 34 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 34 38 amp=100 pan=0\t# Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R)\n39 %font \"FluidR3_GM.sf2\" 128 34 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 34 40 amp=100 pan=0\t# Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R)\n41 %font \"FluidR3_GM.sf2\" 128 34 41 amp=100 pan=0\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 34 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 34 43 amp=100 pan=0\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 34 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 34 45 amp=100 pan=0\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 34 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 34 47 amp=100 pan=0\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 34 48 amp=100 pan=0\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 34 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 34 50 amp=100 pan=0\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 34 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 34 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 34 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 34 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 34 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 34 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 34 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 34 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 34 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 34 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 34 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 34 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 34 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 34 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 34 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 34 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 34 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 34 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 34 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 34 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 34 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 34 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 34 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 34 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 34 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 34 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 34 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 34 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 34 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 34 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 34 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 34 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 34 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 34 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 34 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 34 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 34 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 35\n27 %font \"FluidR3_GM.sf2\" 128 35 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 35 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 35 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 35 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 35 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 35 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 35 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 35 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 35 35 amp=100 pan=0\t# Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R)\n37 %font \"FluidR3_GM.sf2\" 128 35 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 35 38 amp=100 pan=0\t# Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R)\n39 %font \"FluidR3_GM.sf2\" 128 35 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 35 40 amp=100 pan=0\t# Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R)\n41 %font \"FluidR3_GM.sf2\" 128 35 41 amp=100 pan=0\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 35 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 35 43 amp=100 pan=0\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 35 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 35 45 amp=100 pan=0\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 35 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 35 47 amp=100 pan=0\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 35 48 amp=100 pan=0\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 35 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 35 50 amp=100 pan=0\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 35 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 35 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 35 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 35 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 35 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 35 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 35 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 35 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 35 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 35 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 35 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 35 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 35 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 35 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 35 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 35 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 35 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 35 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 35 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 35 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 35 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 35 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 35 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 35 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 35 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 35 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 35 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 35 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 35 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 35 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 35 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 35 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 35 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 35 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 35 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 35 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 35 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 36\n27 %font \"FluidR3_GM.sf2\" 128 36 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 36 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 36 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 36 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 36 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 36 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 36 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 36 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 36 35 amp=100 pan=0\t# Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R)\n37 %font \"FluidR3_GM.sf2\" 128 36 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 36 38 amp=100 pan=0\t# Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R)\n39 %font \"FluidR3_GM.sf2\" 128 36 39 amp=100 pan=0\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 36 40 amp=100 pan=0\t# Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R)\n41 %font \"FluidR3_GM.sf2\" 128 36 41 amp=100 pan=0\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 36 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 36 43 amp=100 pan=0\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 36 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 36 45 amp=100 pan=0\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 36 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 36 47 amp=100 pan=0\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 36 48 amp=100 pan=0\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 36 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 36 50 amp=100 pan=0\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 36 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 36 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 36 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 36 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 36 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 36 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 36 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 36 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 36 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 36 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 36 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 36 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 36 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 36 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 36 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 36 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 36 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 36 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 36 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 36 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 36 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 36 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 36 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 36 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 36 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 36 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 36 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 36 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 36 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 36 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 36 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 36 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 36 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 36 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 36 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 36 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 36 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 40\n27 %font \"FluidR3_GM.sf2\" 128 40 27 amp=31 pan=-23\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 40 28 amp=44 pan=31\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 40 29 amp=26 pan=-16\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 40 30 amp=27 pan=-16\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 40 31 amp=119 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 40 32 amp=178 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 40 33 amp=85 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 40 34 amp=16 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 40 35 amp=94 pan=0\t# Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R)\n37 %font \"FluidR3_GM.sf2\" 128 40 37 amp=116 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 40 38 amp=28 pan=0\t# Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R)\n39 %font \"FluidR3_GM.sf2\" 128 40 39 amp=69 pan=0\t# Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R)\n40 %font \"FluidR3_GM.sf2\" 128 40 40 amp=33 pan=0\t# Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R)\n41 %font \"FluidR3_GM.sf2\" 128 40 41 amp=76 pan=-47\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 40 42 amp=20 pan=31\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 40 43 amp=46 pan=-28\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 40 44 amp=13 pan=31\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 40 45 amp=125 pan=-9\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 40 46 amp=59 pan=31\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 40 47 amp=74 pan=9\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 40 48 amp=73 pan=28\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 40 49 amp=87 pan=31\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 40 50 amp=39 pan=47\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 40 51 amp=18 pan=-31\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 40 52 amp=84 pan=-31\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 40 53 amp=97 pan=-31\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 40 54 amp=17 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 40 55 amp=44 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 40 56 amp=103 pan=31\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 40 57 amp=50 pan=-31\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 40 58 amp=28 pan=-55\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 40 59 amp=24 pan=-31\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 40 60 amp=54 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 40 61 amp=56 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 40 62 amp=30 pan=-39\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 40 63 amp=80 pan=-39\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 40 64 amp=44 pan=-31\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 40 65 amp=98 pan=31\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 40 66 amp=146 pan=31\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 40 67 amp=57 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 40 68 amp=64 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 40 69 amp=15 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 40 70 amp=31 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 40 71 amp=59 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 40 72 amp=76 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 40 73 amp=43 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 40 74 amp=30 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 40 75 amp=78 pan=31\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 40 76 amp=68 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 40 77 amp=82 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 40 78 amp=66 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 40 79 amp=30 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 40 80 amp=45 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 40 81 amp=64 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 40 82 amp=155 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 40 83 amp=102 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 40 84 amp=34 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 40 85 amp=127 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 40 86 amp=50 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 40 87 amp=78 pan=-31\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 41\n27 %font \"FluidR3_GM.sf2\" 128 41 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 41 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 41 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 41 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 41 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 41 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 41 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 41 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 41 35 amp=100 pan=0\t# Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R) Std Kick 5(L) Std Kick 5(R)\n37 %font \"FluidR3_GM.sf2\" 128 41 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 41 38 amp=100 pan=0\t# Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R)\n39 %font \"FluidR3_GM.sf2\" 128 41 39 amp=100 pan=0\t# Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R)\n40 %font \"FluidR3_GM.sf2\" 128 41 40 amp=100 pan=0\t# Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R)\n41 %font \"FluidR3_GM.sf2\" 128 41 41 amp=100 pan=0\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 41 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 41 43 amp=100 pan=0\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 41 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 41 45 amp=100 pan=0\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 41 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 41 47 amp=100 pan=0\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 41 48 amp=100 pan=0\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 41 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 41 50 amp=100 pan=0\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 41 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 41 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 41 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 41 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 41 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 41 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 41 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 41 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 41 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 41 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 41 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 41 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 41 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 41 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 41 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 41 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 41 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 41 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 41 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 41 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 41 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 41 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 41 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 41 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 41 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 41 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 41 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 41 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 41 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 41 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 41 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 41 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 41 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 41 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 41 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 41 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 41 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 42\n27 %font \"FluidR3_GM.sf2\" 128 42 27 amp=100 pan=0\t# High Q(L) High Q(R)\n28 %font \"FluidR3_GM.sf2\" 128 42 28 amp=100 pan=0\t# Slap Slap\n29 %font \"FluidR3_GM.sf2\" 128 42 29 amp=100 pan=0\t# Scratch Push(L) Scratch Push(R)\n30 %font \"FluidR3_GM.sf2\" 128 42 30 amp=100 pan=0\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 42 31 amp=100 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 42 32 amp=100 pan=0\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 42 33 amp=100 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 42 34 amp=100 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 42 35 amp=100 pan=0\t# Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R) Std Kick 1(L) Std Kick 1(R)\n37 %font \"FluidR3_GM.sf2\" 128 42 37 amp=100 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 42 38 amp=100 pan=0\t# Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R)\n39 %font \"FluidR3_GM.sf2\" 128 42 39 amp=100 pan=0\t# Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R)\n40 %font \"FluidR3_GM.sf2\" 128 42 40 amp=100 pan=0\t# Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R)\n41 %font \"FluidR3_GM.sf2\" 128 42 41 amp=100 pan=0\t# Low Flr Studio(L) Low Flr Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 42 42 amp=100 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 42 43 amp=100 pan=0\t# Flr Studio(L) Flr Studio(R)\n44 %font \"FluidR3_GM.sf2\" 128 42 44 amp=100 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n45 %font \"FluidR3_GM.sf2\" 128 42 45 amp=100 pan=0\t# Low Studio(L) Low Studio(R)\n46 %font \"FluidR3_GM.sf2\" 128 42 46 amp=100 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n47 %font \"FluidR3_GM.sf2\" 128 42 47 amp=100 pan=0\t# Md Studio(L) Md Studio(R)\n48 %font \"FluidR3_GM.sf2\" 128 42 48 amp=100 pan=0\t# MdHi Studio(L) MdHi Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 42 49 amp=100 pan=0\t# Crsh 1(L) Crsh 1(R)\n50 %font \"FluidR3_GM.sf2\" 128 42 50 amp=100 pan=0\t# Hi Studio(L) Hi Studio(R)\n51 %font \"FluidR3_GM.sf2\" 128 42 51 amp=100 pan=0\t# Ride1(L) Ride1(R)\n52 %font \"FluidR3_GM.sf2\" 128 42 52 amp=100 pan=0\t# China Crash(L) China Crash(R)\n53 %font \"FluidR3_GM.sf2\" 128 42 53 amp=100 pan=0\t# BellRide(L) BellRide(R)\n54 %font \"FluidR3_GM.sf2\" 128 42 54 amp=100 pan=0\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 42 55 amp=100 pan=0\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 42 56 amp=100 pan=0\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 42 57 amp=100 pan=0\t# Crsh 2(L) Crsh 2(R)\n58 %font \"FluidR3_GM.sf2\" 128 42 58 amp=100 pan=0\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 42 59 amp=100 pan=0\t# Ride2(L) Ride2(R)\n60 %font \"FluidR3_GM.sf2\" 128 42 60 amp=100 pan=0\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 42 61 amp=100 pan=0\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 42 62 amp=100 pan=0\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 42 63 amp=100 pan=0\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 42 64 amp=100 pan=0\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 42 65 amp=100 pan=0\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 42 66 amp=100 pan=0\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 42 67 amp=100 pan=0\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 42 68 amp=100 pan=0\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 42 69 amp=100 pan=0\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 42 70 amp=100 pan=0\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 42 71 amp=100 pan=0\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 42 72 amp=100 pan=0\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 42 73 amp=100 pan=0\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 42 74 amp=100 pan=0\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 42 75 amp=100 pan=0\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 42 76 amp=100 pan=0\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 42 77 amp=100 pan=0\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 42 78 amp=100 pan=0\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 42 79 amp=100 pan=0\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 42 80 amp=100 pan=0\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 42 81 amp=100 pan=0\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 42 82 amp=100 pan=0\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 42 83 amp=100 pan=0\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 42 84 amp=100 pan=0\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 42 85 amp=100 pan=0\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 42 86 amp=100 pan=0\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 42 87 amp=100 pan=0\t# Long Taiko Hit Long Taiko Hit\n\ndrumset 48\n27 %font \"FluidR3_GM.sf2\" 128 48 27 amp=11 pan=31\t# High Q(L) High Q(R) Hi-Hat Closed(L) Hi-Hat Closed(R)\n28 %font \"FluidR3_GM.sf2\" 128 48 28 amp=24 pan=31\t# Slap Slap Hi-Hat Foot(L) Hi-Hat Foot(R)\n29 %font \"FluidR3_GM.sf2\" 128 48 29 amp=23 pan=31\t# Scratch Push(L) Scratch Push(R) Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n30 %font \"FluidR3_GM.sf2\" 128 48 30 amp=3 pan=-31\t# Scratch Pull(L) Scratch Pull(R)\n31 %font \"FluidR3_GM.sf2\" 128 48 31 amp=18 pan=0\t# Sticks(L) Sticks(R)\n32 %font \"FluidR3_GM.sf2\" 128 48 32 amp=143 pan=-16\t# Square Click(L) Square Click(R)\n33 %font \"FluidR3_GM.sf2\" 128 48 33 amp=43 pan=0\t# Metronome Click Metronome Click\n34 %font \"FluidR3_GM.sf2\" 128 48 34 amp=13 pan=0\t# Metronome Bell(L) Metronome Bell(R)\n35 %font \"FluidR3_GM.sf2\" 128 48 35 amp=187 pan=0\t# Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R)\n36 %font \"FluidR3_GM.sf2\" 128 48 35 amp=57 pan=0\t# Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R)\n37 %font \"FluidR3_GM.sf2\" 128 48 37 amp=21 pan=0\t# Rim Tap(L) Rim Tap(R)\n38 %font \"FluidR3_GM.sf2\" 128 48 38 amp=126 pan=-31\t# Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R)\n39 %font \"FluidR3_GM.sf2\" 128 48 39 amp=33 pan=-47\t# Clap(L) Clap(R)\n40 %font \"FluidR3_GM.sf2\" 128 48 40 amp=126 pan=0\t# Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R)\n41 %font \"FluidR3_GM.sf2\" 128 48 41 amp=87 pan=-47\t# Timpani 2(L) Timpani 2(R)\n42 %font \"FluidR3_GM.sf2\" 128 48 41 amp=86 pan=-47\t# Timpani 2(L) Timpani 2(R)\n43 %font \"FluidR3_GM.sf2\" 128 48 43 amp=81 pan=-47\t# Timpani 3(L) Timpani 3(R)\n44 %font \"FluidR3_GM.sf2\" 128 48 43 amp=126 pan=-47\t# Timpani 3(L) Timpani 3(R)\n45 %font \"FluidR3_GM.sf2\" 128 48 43 amp=75 pan=-47\t# Timpani 3(L) Timpani 3(R)\n46 %font \"FluidR3_GM.sf2\" 128 48 43 amp=120 pan=-47\t# Timpani 3(L) Timpani 3(R)\n47 %font \"FluidR3_GM.sf2\" 128 48 43 amp=72 pan=-47\t# Timpani 3(L) Timpani 3(R)\n48 %font \"FluidR3_GM.sf2\" 128 48 43 amp=114 pan=-47\t# Timpani 3(L) Timpani 3(R)\n49 %font \"FluidR3_GM.sf2\" 128 48 43 amp=113 pan=-47\t# Timpani 3(L) Timpani 3(R)\n50 %font \"FluidR3_GM.sf2\" 128 48 43 amp=110 pan=-47\t# Timpani 3(L) Timpani 3(R)\n51 %font \"FluidR3_GM.sf2\" 128 48 43 amp=63 pan=-47\t# Timpani 3(L) Timpani 3(R)\n52 %font \"FluidR3_GM.sf2\" 128 48 43 amp=63 pan=-47\t# Timpani 3(L) Timpani 3(R)\n53 %font \"FluidR3_GM.sf2\" 128 48 43 amp=61 pan=-47\t# Timpani 3(L) Timpani 3(R)\n54 %font \"FluidR3_GM.sf2\" 128 48 54 amp=67 pan=16\t# Tambourine(L) Tambourine(R)\n55 %font \"FluidR3_GM.sf2\" 128 48 55 amp=49 pan=-16\t# Splash(L) Splash(R)\n56 %font \"FluidR3_GM.sf2\" 128 48 56 amp=92 pan=31\t# Cow Bell(L) Cow Bell(R)\n57 %font \"FluidR3_GM.sf2\" 128 48 57 amp=69 pan=-31\t# Orchcrash(L) Orchcrash(R)\n58 %font \"FluidR3_GM.sf2\" 128 48 58 amp=22 pan=-55\t# Vibra Slap\n59 %font \"FluidR3_GM.sf2\" 128 48 59 amp=76 pan=-47\t# Orchcrash(L) Orchcrash(R)\n60 %font \"FluidR3_GM.sf2\" 128 48 60 amp=8 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n61 %font \"FluidR3_GM.sf2\" 128 48 61 amp=82 pan=55\t# Low Bongo(L) Low Bongo(R)\n62 %font \"FluidR3_GM.sf2\" 128 48 62 amp=41 pan=-39\t# Closed Slap(L) Closed Slap(R)\n63 %font \"FluidR3_GM.sf2\" 128 48 63 amp=77 pan=-39\t# High Conga(L) High Conga(R)\n64 %font \"FluidR3_GM.sf2\" 128 48 64 amp=45 pan=-31\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 48 65 amp=80 pan=31\t# High Timbale(L) High Timbale(R)\n66 %font \"FluidR3_GM.sf2\" 128 48 66 amp=78 pan=31\t# Low Timbale(L) Low Timbale(R)\n67 %font \"FluidR3_GM.sf2\" 128 48 67 amp=82 pan=-55\t# High Agogo(L) High Agogo(R)\n68 %font \"FluidR3_GM.sf2\" 128 48 68 amp=92 pan=-55\t# Low Agogo(L) Low Agogo(R)\n69 %font \"FluidR3_GM.sf2\" 128 48 69 amp=11 pan=-55\t# Cabasa(L) Cabasa(R)\n70 %font \"FluidR3_GM.sf2\" 128 48 70 amp=27 pan=-63\t# Maracas(L) Maracas(R)\n71 %font \"FluidR3_GM.sf2\" 128 48 71 amp=45 pan=55\t# Short Whistle\n72 %font \"FluidR3_GM.sf2\" 128 48 72 amp=34 pan=55\t# Long Whistle\n73 %font \"FluidR3_GM.sf2\" 128 48 73 amp=32 pan=47\t# Guiro Down(L) Guiro Down(R)\n74 %font \"FluidR3_GM.sf2\" 128 48 74 amp=46 pan=47\t# Guiro Up(L) Guiro Up(R)\n75 %font \"FluidR3_GM.sf2\" 128 48 75 amp=61 pan=31\t# Clave(L) Clave(R)\n76 %font \"FluidR3_GM.sf2\" 128 48 76 amp=52 pan=55\t# High Woodblock(L) High Woodblock(R)\n77 %font \"FluidR3_GM.sf2\" 128 48 77 amp=63 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n78 %font \"FluidR3_GM.sf2\" 128 48 78 amp=54 pan=-31\t# Quica Hi Quica Hi\n79 %font \"FluidR3_GM.sf2\" 128 48 79 amp=24 pan=-31\t# Quica Low Quica Low\n80 %font \"FluidR3_GM.sf2\" 128 48 80 amp=36 pan=-63\t# Triangle\n81 %font \"FluidR3_GM.sf2\" 128 48 81 amp=76 pan=-63\t# Triangle\n82 %font \"FluidR3_GM.sf2\" 128 48 82 amp=114 pan=47\t# Small Shaker (L) Small Shaker (R)\n83 %font \"FluidR3_GM.sf2\" 128 48 83 amp=78 pan=55\t# Sleigh Bells\n84 %font \"FluidR3_GM.sf2\" 128 48 84 amp=27 pan=63\t# Bell Tree Bell Tree\n85 %font \"FluidR3_GM.sf2\" 128 48 85 amp=63 pan=-47\t# Castanet\n86 %font \"FluidR3_GM.sf2\" 128 48 86 amp=39 pan=-31\t# Short Taiko Hit Short Taiko Hit\n87 %font \"FluidR3_GM.sf2\" 128 48 87 amp=64 pan=-31\t# Long Taiko Hit Long Taiko Hit\n88 %font \"FluidR3_GM.sf2\" 128 48 88 amp=44 pan=0\t# Applause Applause\n\ndrumset 49\n30 %font \"FluidR3_GM.sf2\" 128 0 38 amp=93 pan=-31\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n31 %font \"FluidR3_GM.sf2\" 128 0 49 amp=52 pan=-47\t# Crsh 1(L) Crsh 1(R)\n32 %font \"FluidR3_GM.sf2\" 128 0 35 amp=21 pan=-63\t# Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R)\n33 %font \"FluidR3_GM.sf2\" 0 116 amp=26 pan=55\n36 %font \"FluidR3_GM.sf2\" 128 0 47 amp=96 pan=0\t# Md Studio(L) Md Studio(R)\n38 %font \"FluidR3_GM.sf2\" 128 0 47 amp=189 pan=-31\t# Md Studio(L) Md Studio(R)\n39 %font \"FluidR3_GM.sf2\" 128 0 47 amp=88 pan=63\t# Md Studio(L) Md Studio(R)\n40 %font \"FluidR3_GM.sf2\" 128 0 47 amp=66 pan=63\t# Md Studio(L) Md Studio(R)\n41 %font \"FluidR3_GM.sf2\" 128 0 47 amp=122 pan=31\t# Md Studio(L) Md Studio(R)\n42 %font \"FluidR3_GM.sf2\" 128 0 63 amp=69 pan=47\t# High Conga(L) High Conga(R)\n43 %font \"FluidR3_GM.sf2\" 128 0 64 amp=76 pan=47\t# Low Tumba(L) Low Tumba(R)\n44 %font \"FluidR3_GM.sf2\" 128 0 47 amp=133 pan=63\t# Md Studio(L) Md Studio(R)\n49 %font \"FluidR3_GM.sf2\" 128 0 52 amp=43 pan=-47\t# China Crash(L) China Crash(R)\n50 %font \"FluidR3_GM.sf2\" 128 0 52 amp=170 pan=31\t# China Crash(L) China Crash(R)\n51 %font \"FluidR3_GM.sf2\" 128 0 47 amp=216 pan=47\t# Md Studio(L) Md Studio(R)\n52 %font \"FluidR3_GM.sf2\" 128 0 47 amp=227 pan=47\t# Md Studio(L) Md Studio(R)\n54 %font \"FluidR3_GM.sf2\" 128 0 64 amp=56 pan=23\t# Low Tumba(L) Low Tumba(R)\n55 %font \"FluidR3_GM.sf2\" 128 0 64 amp=52 pan=47\t# Low Tumba(L) Low Tumba(R)\n56 %font \"FluidR3_GM.sf2\" 128 0 64 amp=28 pan=47\t# Low Tumba(L) Low Tumba(R)\n57 %font \"FluidR3_GM.sf2\" 128 0 60 amp=53 pan=-47\t# Bongo Rim(L) Bongo Rim(R)\n58 %font \"FluidR3_GM.sf2\" 128 0 61 amp=40 pan=-47\t# Low Bongo(L) Low Bongo(R)\n59 %font \"FluidR3_GM.sf2\" 128 0 63 amp=31 pan=-47\t# High Conga(L) High Conga(R)\n60 %font \"FluidR3_GM.sf2\" 128 0 64 amp=51 pan=-47\t# Low Tumba(L) Low Tumba(R)\n61 %font \"FluidR3_GM.sf2\" 128 0 62 amp=96 pan=-31\t# Closed Slap(L) Closed Slap(R)\n62 %font \"FluidR3_GM.sf2\" 128 0 47 amp=139 pan=31\t# Md Studio(L) Md Studio(R)\n63 %font \"FluidR3_GM.sf2\" 128 0 47 amp=153 pan=31\t# Md Studio(L) Md Studio(R)\n64 %font \"FluidR3_GM.sf2\" 128 0 64 amp=22 pan=-16\t# Low Tumba(L) Low Tumba(R)\n65 %font \"FluidR3_GM.sf2\" 128 0 60 amp=111 pan=-31\t# Bongo Rim(L) Bongo Rim(R)\n67 %font \"FluidR3_GM.sf2\" 128 0 66 amp=113 pan=31\t# Low Timbale(L) Low Timbale(R)\n68 %font \"FluidR3_GM.sf2\" 128 0 66 amp=41 pan=39\t# Low Timbale(L) Low Timbale(R)\n69 %font \"FluidR3_GM.sf2\" 128 0 65 amp=83 pan=39\t# High Timbale(L) High Timbale(R)\n70 %font \"FluidR3_GM.sf2\" 128 0 56 amp=72 pan=31\t# Cow Bell(L) Cow Bell(R)\n71 %font \"FluidR3_GM.sf2\" 128 0 60 amp=50 pan=55\t# Bongo Rim(L) Bongo Rim(R)\n72 %font \"FluidR3_GM.sf2\" 128 0 61 amp=65 pan=47\t# Low Bongo(L) Low Bongo(R)\n73 %font \"FluidR3_GM.sf2\" 128 0 62 amp=56 pan=-31\t# Closed Slap(L) Closed Slap(R)\n74 %font \"FluidR3_GM.sf2\" 128 0 63 amp=162 pan=-31\t# High Conga(L) High Conga(R)\n75 %font \"FluidR3_GM.sf2\" 128 0 64 amp=27 pan=-39\t# Low Tumba(L) Low Tumba(R)\n76 %font \"FluidR3_GM.sf2\" 128 0 64 amp=45 pan=-39\t# Low Tumba(L) Low Tumba(R)\n77 %font \"FluidR3_GM.sf2\" 128 0 64 amp=47 pan=-39\t# Low Tumba(L) Low Tumba(R)\n78 %font \"FluidR3_GM.sf2\" 128 0 64 amp=60 pan=-39\t# Low Tumba(L) Low Tumba(R)\n79 %font \"FluidR3_GM.sf2\" 0 116 amp=58 pan=63\n80 %font \"FluidR3_GM.sf2\" 0 116 amp=26 pan=63\n81 %font \"FluidR3_GM.sf2\" 0 116 amp=44 pan=-31\n82 %font \"FluidR3_GM.sf2\" 0 116 amp=30 pan=-31\n83 %font \"FluidR3_GM.sf2\" 128 0 54 amp=79 pan=8\t# Tambourine(L) Tambourine(R)\n84 %font \"FluidR3_GM.sf2\" 128 0 67 amp=50 pan=-55\t# High Agogo(L) High Agogo(R)\n85 %font \"FluidR3_GM.sf2\" 128 0 68 amp=57 pan=-55\t# Low Agogo(L) Low Agogo(R)\n87 %font \"FluidR3_GM.sf2\" 128 0 71 amp=111 pan=55\t# Short Whistle\n88 %font \"FluidR3_GM.sf2\" 128 0 72 amp=45 pan=55\t# Long Whistle\n89 %font \"FluidR3_GM.sf2\" 128 0 78 amp=61 pan=-31\t# Quica Hi Quica Hi\n90 %font \"FluidR3_GM.sf2\" 128 0 79 amp=27 pan=-31\t# Quica Low Quica Low\n91 %font \"FluidR3_GM.sf2\" 128 0 80 amp=41 pan=-63\t# Triangle\n92 %font \"FluidR3_GM.sf2\" 128 0 81 amp=48 pan=-63\t# Triangle\n93 %font \"FluidR3_GM.sf2\" 128 0 73 amp=35 pan=47\t# Guiro Down(L) Guiro Down(R)\n94 %font \"FluidR3_GM.sf2\" 128 0 74 amp=23 pan=47\t# Guiro Up(L) Guiro Up(R)\n95 %font \"FluidR3_GM.sf2\" 128 0 69 amp=17 pan=-55\t# Cabasa(L) Cabasa(R)\n96 %font \"FluidR3_GM.sf2\" 128 0 69 amp=25 pan=-55\t# Cabasa(L) Cabasa(R)\n97 %font \"FluidR3_GM.sf2\" 128 0 75 amp=55 pan=31\t# Clave(L) Clave(R)\n98 %font \"FluidR3_GM.sf2\" 128 0 76 amp=96 pan=55\t# High Woodblock(L) High Woodblock(R)\n99 %font \"FluidR3_GM.sf2\" 128 0 77 amp=115 pan=55\t# Low Woodblock(L) Low Woodblock(R)\n\ndrumset 50\n25 %font \"FluidR3_GM.sf2\" 128 25 36 amp=63 pan=0\t# 808 Kick 2 808 Kick 2\n26 %font \"FluidR3_GM.sf2\" 128 25 35 amp=73 pan=0\t# 808 Kick 1 808 Kick 1\n27 %font \"FluidR3_GM.sf2\" 128 25 36 amp=59 pan=0\t# 808 Kick 2 808 Kick 2\n28 %font \"FluidR3_GM.sf2\" 128 25 36 amp=65 pan=0\t# 808 Kick 2 808 Kick 2\n29 %font \"FluidR3_GM.sf2\" 128 25 36 amp=58 pan=0\t# 808 Kick 2 808 Kick 2\n30 %font \"FluidR3_GM.sf2\" 128 25 36 amp=81 pan=0\t# 808 Kick 2 808 Kick 2\n31 %font \"FluidR3_GM.sf2\" 128 25 35 amp=123 pan=0\t# 808 Kick 1 808 Kick 1\n32 %font \"FluidR3_GM.sf2\" 128 9 35 amp=150 pan=0\t# Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R)\n33 %font \"FluidR3_GM.sf2\" 128 9 35 amp=133 pan=0\t# Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R)\n34 %font \"FluidR3_GM.sf2\" 128 10 35 amp=63 pan=0\t# Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R)\n35 %font \"FluidR3_GM.sf2\" 128 10 35 amp=82 pan=0\t# Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R) Std Kick 3(L) Std Kick 3(R)\n36 %font \"FluidR3_GM.sf2\" 128 11 35 amp=205 pan=0\t# Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R)\n37 %font \"FluidR3_GM.sf2\" 128 11 35 amp=417 pan=0\t# Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R) Room Kick (L) Room Kick (R)\n38 %font \"FluidR3_GM.sf2\" 128 0 35 amp=129 pan=0\t# Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R)\n39 %font \"FluidR3_GM.sf2\" 128 0 35 amp=226 pan=0\t# Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R)\n40 %font \"FluidR3_GM.sf2\" 128 0 35 amp=142 pan=0\t# Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R)\n41 %font \"FluidR3_GM.sf2\" 128 0 35 amp=138 pan=0\t# Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R)\n42 %font \"FluidR3_GM.sf2\" 128 1 35 amp=188 pan=0\t# Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R)\n43 %font \"FluidR3_GM.sf2\" 128 1 35 amp=128 pan=0\t# Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R) Std Kick 2(L) Std Kick 2(R)\n44 %font \"FluidR3_GM.sf2\" 128 0 35 amp=156 pan=0\t# Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R)\n45 %font \"FluidR3_GM.sf2\" 128 0 35 amp=86 pan=0\t# Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R)\n46 %font \"FluidR3_GM.sf2\" 128 0 35 amp=160 pan=0\t# Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R) Std Kick(L) Std Kick(R)\n47 %font \"FluidR3_GM.sf2\" 128 32 35 amp=86 pan=0\t# Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R)\n48 %font \"FluidR3_GM.sf2\" 128 32 35 amp=94 pan=0\t# Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R) Std Kick 7(L) Std Kick 7(R)\n49 %font \"FluidR3_GM.sf2\" 128 48 35 amp=50 pan=0\t# Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R) Orch Bass Drum(L) Orch Bass Drum(R)\n50 %font \"FluidR3_GM.sf2\" 128 8 35 amp=77 pan=0\t# Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R)\n51 %font \"FluidR3_GM.sf2\" 128 8 35 amp=215 pan=0\t# Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R) Std Kick 6(L) Std Kick 6(R)\n52 %font \"FluidR3_GM.sf2\" 128 16 35 amp=140 pan=0\t# Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R Power Bass Drum 1(L Power Bass Drum 1(R\n53 %font \"FluidR3_GM.sf2\" 128 16 36 amp=85 pan=0\t# Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R Power Bass Drum 2(L Power Bass Drum 2(R\n54 %font \"FluidR3_GM.sf2\" 128 24 35 amp=86 pan=0\t# Elec Kick1(L) Elec Kick1(R)\n55 %font \"FluidR3_GM.sf2\" 128 24 36 amp=135 pan=0\t# Elec Kick2(L) Elec Kick2(R)\n56 %font \"FluidR3_GM.sf2\" 128 24 35 amp=62 pan=0\t# Elec Kick1(L) Elec Kick1(R)\n57 %font \"FluidR3_GM.sf2\" 128 25 35 amp=59 pan=0\t# 808 Kick 1 808 Kick 1\n58 %font \"FluidR3_GM.sf2\" 128 25 35 amp=68 pan=0\t# 808 Kick 1 808 Kick 1\n59 %font \"FluidR3_GM.sf2\" 128 25 35 amp=60 pan=0\t# 808 Kick 1 808 Kick 1\n60 %font \"FluidR3_GM.sf2\" 128 0 38 amp=108 pan=0\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n61 %font \"FluidR3_GM.sf2\" 128 0 40 amp=129 pan=0\t# Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R)\n62 %font \"FluidR3_GM.sf2\" 128 1 38 amp=93 pan=0\t# Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R)\n63 %font \"FluidR3_GM.sf2\" 128 1 40 amp=52 pan=0\t# Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R)\n64 %font \"FluidR3_GM.sf2\" 128 0 38 amp=106 pan=0\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n65 %font \"FluidR3_GM.sf2\" 128 48 38 amp=194 pan=0\t# Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R) Orch Snare(L) Orch Snare(R)\n66 %font \"FluidR3_GM.sf2\" 128 32 38 amp=134 pan=0\t# Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R) Snr 2-1(L) Snr 2-1(R)\n67 %font \"FluidR3_GM.sf2\" 128 32 40 amp=91 pan=0\t# Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R) Snr 2-2(L) Snr 2-2(R)\n68 %font \"FluidR3_GM.sf2\" 128 8 38 amp=76 pan=0\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n69 %font \"FluidR3_GM.sf2\" 128 8 40 amp=92 pan=0\t# Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R)\n70 %font \"FluidR3_GM.sf2\" 128 16 38 amp=113 pan=0\t# Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R) Power Snare 1(L) Power Snare 1(R)\n71 %font \"FluidR3_GM.sf2\" 128 16 40 amp=103 pan=0\t# Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R) Power Snare 2(L) Power Snare 2(R)\n72 %font \"FluidR3_GM.sf2\" 128 24 40 amp=123 pan=0\t# Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R)\n73 %font \"FluidR3_GM.sf2\" 128 11 38 amp=102 pan=0\t# RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R)\n74 %font \"FluidR3_GM.sf2\" 128 11 40 amp=155 pan=0\t# RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R)\n75 %font \"FluidR3_GM.sf2\" 128 11 38 amp=71 pan=0\t# RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R)\n76 %font \"FluidR3_GM.sf2\" 128 11 40 amp=66 pan=0\t# RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R) RmPwr 1-2(L) RmPwr 1-2(R)\n77 %font \"FluidR3_GM.sf2\" 128 8 38 amp=63 pan=0\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n78 %font \"FluidR3_GM.sf2\" 128 24 38 amp=100 pan=0\t# Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R) Electronic Snr 1(L) Electronic Snr 1(R)\n79 %font \"FluidR3_GM.sf2\" 128 24 40 amp=149 pan=0\t# Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R) Electronic Snr 2(L) Electronic Snr 2(R)\n80 %font \"FluidR3_GM.sf2\" 128 25 38 amp=22 pan=0\t# 808 Snare 1 808 Snare 1\n81 %font \"FluidR3_GM.sf2\" 128 25 40 amp=33 pan=0\t# 808 Snare 2 808 Snare 2\n82 %font \"FluidR3_GM.sf2\" 128 25 38 amp=28 pan=0\t# 808 Snare 1 808 Snare 1\n83 %font \"FluidR3_GM.sf2\" 128 25 40 amp=48 pan=0\t# 808 Snare 2 808 Snare 2\n84 %font \"FluidR3_GM.sf2\" 128 40 38 amp=19 pan=0\t# Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R)\n85 %font \"FluidR3_GM.sf2\" 128 40 38 amp=27 pan=0\t# Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R) Brush Snr 1(L) Brush Snr 1(R)\n86 %font \"FluidR3_GM.sf2\" 128 40 39 amp=79 pan=0\t# Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R)\n87 %font \"FluidR3_GM.sf2\" 128 40 39 amp=76 pan=0\t# Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R)\n88 %font \"FluidR3_GM.sf2\" 128 40 39 amp=101 pan=0\t# Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R) Brush Snr 2(L) Brush Snr 2(R)\n89 %font \"FluidR3_GM.sf2\" 128 40 40 amp=40 pan=0\t# Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R)\n90 %font \"FluidR3_GM.sf2\" 128 40 40 amp=37 pan=0\t# Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R)\n91 %font \"FluidR3_GM.sf2\" 128 40 40 amp=48 pan=0\t# Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R) Brush Swirl(L) Brush Swirl(R)\n92 %font \"FluidR3_GM.sf2\" 128 0 38 amp=175 pan=0\t# Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R) Std Snr 1(L) Std Snr 1(R)\n93 %font \"FluidR3_GM.sf2\" 128 0 40 amp=264 pan=0\t# Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R)\n94 %font \"FluidR3_GM.sf2\" 128 0 40 amp=304 pan=0\t# Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R) Std Snr 2(L) Std Snr 2(R)\n95 %font \"FluidR3_GM.sf2\" 128 9 38 amp=79 pan=0\t# Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R) Snr 1-2(L) Snr 1-2(R)\n96 %font \"FluidR3_GM.sf2\" 128 9 40 amp=54 pan=0\t# Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R) Snr 1-1(L) Snr 1-1(R)\n97 %font \"FluidR3_GM.sf2\" 128 10 38 amp=58 pan=0\t# RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R) RmPwr 2-1(L) RmPwr 2-1(R)\n98 %font \"FluidR3_GM.sf2\" 128 10 40 amp=70 pan=0\t# RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R) RmPwr 2-2(L) RmPwr 2-2(R)\n99 %font \"FluidR3_GM.sf2\" 128 11 38 amp=56 pan=0\t# RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R) RmPwr 1-1(L) RmPwr 1-1(R)\n\ndrumset 53\n32 %font \"FluidR3_GM.sf2\" 128 0 46 amp=77 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n33 %font \"FluidR3_GM.sf2\" 128 0 42 amp=35 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n34 %font \"FluidR3_GM.sf2\" 128 0 42 amp=47 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n35 %font \"FluidR3_GM.sf2\" 128 0 46 amp=272 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n36 %font \"FluidR3_GM.sf2\" 128 0 42 amp=24 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n37 %font \"FluidR3_GM.sf2\" 128 0 42 amp=26 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n38 %font \"FluidR3_GM.sf2\" 128 0 42 amp=19 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n39 %font \"FluidR3_GM.sf2\" 128 0 42 amp=19 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n40 %font \"FluidR3_GM.sf2\" 128 0 42 amp=20 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n41 %font \"FluidR3_GM.sf2\" 128 0 42 amp=27 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n42 %font \"FluidR3_GM.sf2\" 128 0 42 amp=39 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n43 %font \"FluidR3_GM.sf2\" 128 0 42 amp=47 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n44 %font \"FluidR3_GM.sf2\" 128 0 42 amp=36 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n45 %font \"FluidR3_GM.sf2\" 128 0 42 amp=80 pan=0\t# Hi-Hat Closed(L) Hi-Hat Closed(R)\n46 %font \"FluidR3_GM.sf2\" 128 0 44 amp=17 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n47 %font \"FluidR3_GM.sf2\" 128 0 44 amp=26 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n48 %font \"FluidR3_GM.sf2\" 128 0 44 amp=18 pan=0\t# Hi-Hat Foot(L) Hi-Hat Foot(R)\n49 %font \"FluidR3_GM.sf2\" 128 0 46 amp=66 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n50 %font \"FluidR3_GM.sf2\" 128 0 46 amp=55 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n51 %font \"FluidR3_GM.sf2\" 128 0 46 amp=58 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n52 %font \"FluidR3_GM.sf2\" 128 0 46 amp=27 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n53 %font \"FluidR3_GM.sf2\" 128 0 46 amp=64 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n54 %font \"FluidR3_GM.sf2\" 128 0 46 amp=90 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n55 %font \"FluidR3_GM.sf2\" 128 0 46 amp=107 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n56 %font \"FluidR3_GM.sf2\" 128 0 46 amp=108 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n57 %font \"FluidR3_GM.sf2\" 128 0 46 amp=161 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n58 %font \"FluidR3_GM.sf2\" 128 0 46 amp=208 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n59 %font \"FluidR3_GM.sf2\" 128 0 46 amp=131 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n60 %font \"FluidR3_GM.sf2\" 128 0 46 amp=117 pan=0\t# Hi-Hat Half-Open(L) Hi-Hat Half-Open(R)\n61 %font \"FluidR3_GM.sf2\" 128 0 49 amp=83 pan=0\t# Crsh 1(L) Crsh 1(R)\n62 %font \"FluidR3_GM.sf2\" 128 0 57 amp=68 pan=0\t# Crsh 2(L) Crsh 2(R)\n63 %font \"FluidR3_GM.sf2\" 128 0 49 amp=85 pan=0\t# Crsh 1(L) Crsh 1(R)\n64 %font \"FluidR3_GM.sf2\" 128 0 49 amp=49 pan=0\t# Crsh 1(L) Crsh 1(R)\n65 %font \"FluidR3_GM.sf2\" 128 0 49 amp=81 pan=0\t# Crsh 1(L) Crsh 1(R)\n66 %font \"FluidR3_GM.sf2\" 128 0 49 amp=44 pan=0\t# Crsh 1(L) Crsh 1(R)\n67 %font \"FluidR3_GM.sf2\" 128 0 49 amp=72 pan=0\t# Crsh 1(L) Crsh 1(R)\n68 %font \"FluidR3_GM.sf2\" 128 0 49 amp=128 pan=0\t# Crsh 1(L) Crsh 1(R)\n69 %font \"FluidR3_GM.sf2\" 128 0 57 amp=91 pan=0\t# Crsh 2(L) Crsh 2(R)\n70 %font \"FluidR3_GM.sf2\" 128 0 49 amp=80 pan=0\t# Crsh 1(L) Crsh 1(R)\n71 %font \"FluidR3_GM.sf2\" 128 0 57 amp=61 pan=0\t# Crsh 2(L) Crsh 2(R)\n72 %font \"FluidR3_GM.sf2\" 128 0 49 amp=73 pan=0\t# Crsh 1(L) Crsh 1(R)\n73 %font \"FluidR3_GM.sf2\" 128 0 49 amp=73 pan=0\t# Crsh 1(L) Crsh 1(R)\n74 %font \"FluidR3_GM.sf2\" 128 0 55 amp=58 pan=0\t# Splash(L) Splash(R)\n75 %font \"FluidR3_GM.sf2\" 128 0 55 amp=73 pan=0\t# Splash(L) Splash(R)\n76 %font \"FluidR3_GM.sf2\" 128 0 53 amp=41 pan=0\t# BellRide(L) BellRide(R)\n77 %font \"FluidR3_GM.sf2\" 128 0 53 amp=51 pan=0\t# BellRide(L) BellRide(R)\n78 %font \"FluidR3_GM.sf2\" 128 0 51 amp=22 pan=0\t# Ride1(L) Ride1(R)\n79 %font \"FluidR3_GM.sf2\" 128 0 59 amp=23 pan=0\t# Ride2(L) Ride2(R)\n80 %font \"FluidR3_GM.sf2\" 128 0 51 amp=28 pan=0\t# Ride1(L) Ride1(R)\n81 %font \"FluidR3_GM.sf2\" 128 0 51 amp=31 pan=0\t# Ride1(L) Ride1(R)\n82 %font \"FluidR3_GM.sf2\" 128 0 51 amp=16 pan=0\t# Ride1(L) Ride1(R)\n83 %font \"FluidR3_GM.sf2\" 128 0 51 amp=13 pan=0\t# Ride1(L) Ride1(R)\n84 %font \"FluidR3_GM.sf2\" 128 0 51 amp=15 pan=0\t# Ride1(L) Ride1(R)\n85 %font \"FluidR3_GM.sf2\" 128 0 51 amp=15 pan=0\t# Ride1(L) Ride1(R)\n86 %font \"FluidR3_GM.sf2\" 128 0 51 amp=12 pan=0\t# Ride1(L) Ride1(R)\n87 %font \"FluidR3_GM.sf2\" 128 0 51 amp=30 pan=0\t# Ride1(L) Ride1(R)\n88 %font \"FluidR3_GM.sf2\" 128 0 51 amp=95 pan=0\t# Ride1(L) Ride1(R)\n89 %font \"FluidR3_GM.sf2\" 128 0 51 amp=116 pan=0\t# Ride1(L) Ride1(R)\n90 %font \"FluidR3_GM.sf2\" 128 0 51 amp=104 pan=0\t# Ride1(L) Ride1(R)\n91 %font \"FluidR3_GM.sf2\" 128 0 39 amp=15 pan=0\t# Clap(L) Clap(R)\n92 %font \"FluidR3_GM.sf2\" 128 0 39 amp=67 pan=0\t# Clap(L) Clap(R)\n93 %font \"FluidR3_GM.sf2\" 128 0 39 amp=58 pan=0\t# Clap(L) Clap(R)\n94 %font \"FluidR3_GM.sf2\" 128 0 39 amp=60 pan=0\t# Clap(L) Clap(R)\n95 %font \"FluidR3_GM.sf2\" 128 0 39 amp=111 pan=0\t# Clap(L) Clap(R)\n96 %font \"FluidR3_GM.sf2\" 128 0 39 amp=57 pan=0\t# Clap(L) Clap(R)\n\n"
  },
  {
    "path": "packages/sx05re/tools/sound/timidity/config/fluidr3_gs.cfg",
    "content": "dir /storage/roms/bios/timidity/sf2\n\nbank 1\n120 %font \"FluidR3_GS.sf2\" 1 120 amp=42 pan=0\n121 %font \"FluidR3_GS.sf2\" 1 121 amp=170 pan=0\n122 %font \"FluidR3_GS.sf2\" 1 122 amp=24 pan=0\n123 %font \"FluidR3_GS.sf2\" 1 123 amp=26 pan=0\n124 %font \"FluidR3_GS.sf2\" 1 124 amp=66 pan=0\n125 %font \"FluidR3_GS.sf2\" 1 125 amp=97 pan=0\n126 %font \"FluidR3_GS.sf2\" 1 126 amp=181 pan=0\n127 %font \"FluidR3_GS.sf2\" 1 127 amp=44 pan=0\n\nbank 2\n120 %font \"FluidR3_GS.sf2\" 2 120 amp=89 pan=0\n122 %font \"FluidR3_GS.sf2\" 2 122 amp=93 pan=0\n123 %font \"FluidR3_GS.sf2\" 2 123 amp=147 pan=0\n124 %font \"FluidR3_GS.sf2\" 2 124 amp=68 pan=0\n125 %font \"FluidR3_GS.sf2\" 2 125 amp=33 pan=0\n126 %font \"FluidR3_GS.sf2\" 2 126 amp=17 pan=0\n127 %font \"FluidR3_GS.sf2\" 2 127 amp=95 pan=0\n\nbank 3\n122 %font \"FluidR3_GS.sf2\" 3 122 amp=45 pan=0\n123 %font \"FluidR3_GS.sf2\" 3 123 amp=58 pan=0\n124 %font \"FluidR3_GS.sf2\" 3 124 amp=146 pan=0\n125 %font \"FluidR3_GS.sf2\" 3 125 amp=121 pan=0\n126 %font \"FluidR3_GS.sf2\" 3 126 amp=67 pan=0\n127 %font \"FluidR3_GS.sf2\" 3 127 amp=94 pan=0\n\nbank 4\n122 %font \"FluidR3_GS.sf2\" 4 122 amp=68 pan=0\n124 %font \"FluidR3_GS.sf2\" 4 124 amp=41 pan=0\n125 %font \"FluidR3_GS.sf2\" 4 125 amp=33 pan=0\n126 %font \"FluidR3_GS.sf2\" 4 126 amp=30 pan=0\n\nbank 5\n122 %font \"FluidR3_GS.sf2\" 5 122 amp=81 pan=0\n124 %font \"FluidR3_GS.sf2\" 5 124 amp=136 pan=0\n125 %font \"FluidR3_GS.sf2\" 5 125 amp=22 pan=0\n126 %font \"FluidR3_GS.sf2\" 5 126 amp=51 pan=0\n\nbank 6\n125 %font \"FluidR3_GS.sf2\" 6 125 amp=61 pan=0\n\nbank 7\n125 %font \"FluidR3_GS.sf2\" 7 125 amp=47 pan=0\n\nbank 8\n125 %font \"FluidR3_GS.sf2\" 8 125 amp=27 pan=0\n\ndrumset 56\n39 %font \"FluidR3_GS.sf2\" 128 56 39 amp=49 pan=-23\t# High Q(L)\n40 %font \"FluidR3_GS.sf2\" 128 56 40 amp=116 pan=-23\t# Slap\n41 %font \"FluidR3_GS.sf2\" 128 56 41 amp=71 pan=-16\t# Scratch Push(L)\n42 %font \"FluidR3_GS.sf2\" 128 56 42 amp=45 pan=-16\t# Scratch Pull(L)\n43 %font \"FluidR3_GS.sf2\" 128 56 43 amp=152 pan=0\t# Sticks(L)\n44 %font \"FluidR3_GS.sf2\" 128 56 44 amp=296 pan=-16\t# Square Click(L)\n45 %font \"FluidR3_GS.sf2\" 128 56 45 amp=91 pan=0\t# Metronome Click\n46 %font \"FluidR3_GS.sf2\" 128 56 46 amp=52 pan=0\t# Metronome Click\n47 %font \"FluidR3_GS.sf2\" 128 56 47 amp=56 pan=0\t# Fretnoise\n48 %font \"FluidR3_GS.sf2\" 128 56 48 amp=26 pan=0\t# Gtr Cut Up\n49 %font \"FluidR3_GS.sf2\" 128 56 49 amp=65 pan=0\t# Gtr Cut Down\n50 %font \"FluidR3_GS.sf2\" 128 56 50 amp=47 pan=0\t# Str. Slap\n51 %font \"FluidR3_GS.sf2\" 128 56 51 amp=106 pan=0\t# Pick Click\n52 %font \"FluidR3_GS.sf2\" 128 56 52 amp=76 pan=0\t# Laugh\n53 %font \"FluidR3_GS.sf2\" 128 56 53 amp=27 pan=0\t# Scream\n54 %font \"FluidR3_GS.sf2\" 128 56 54 amp=140 pan=0\t# Punch Punch\n55 %font \"FluidR3_GS.sf2\" 128 56 55 amp=78 pan=0\t# HeartBeat HeartBeat\n56 %font \"FluidR3_GS.sf2\" 128 56 56 amp=30 pan=0\t# FootStep FootStep\n57 %font \"FluidR3_GS.sf2\" 128 56 57 amp=30 pan=0\t# FootStep FootStep\n58 %font \"FluidR3_GS.sf2\" 128 56 58 amp=7 pan=0\t\t# Applause Applause\n59 %font \"FluidR3_GS.sf2\" 128 56 59 amp=17 pan=0\t# doorcreak doorcreak\n60 %font \"FluidR3_GS.sf2\" 128 56 60 amp=86 pan=0\t# Door\n61 %font \"FluidR3_GS.sf2\" 128 56 61 amp=40 pan=0\t# Scratchgs(L) Scratchgs(R)\n62 %font \"FluidR3_GS.sf2\" 128 56 62 amp=225 pan=0\t# Wind Chime Wind Chime Wind Chime\n63 %font \"FluidR3_GS.sf2\" 128 56 63 amp=26 pan=0\t# Car Start Car Start\n64 %font \"FluidR3_GS.sf2\" 128 56 64 amp=101 pan=0\t# Car Stop Car Stop\n65 %font \"FluidR3_GS.sf2\" 128 56 65 amp=112 pan=0\t# Car Pass Car Pass\n66 %font \"FluidR3_GS.sf2\" 128 56 66 amp=78 pan=0\t# Crash Car Crash1\n67 %font \"FluidR3_GS.sf2\" 128 56 67 amp=3 pan=0\t\t# Siren Siren\n68 %font \"FluidR3_GS.sf2\" 128 56 68 amp=116 pan=0\t# train train\n69 %font \"FluidR3_GS.sf2\" 128 56 69 amp=43 pan=0\t# Noise\n70 %font \"FluidR3_GS.sf2\" 128 56 70 amp=76 pan=0\t# Heli Heli\n71 %font \"FluidR3_GS.sf2\" 128 56 71 amp=4 pan=0\t\t# Ufo1 Ufo1\n72 %font \"FluidR3_GS.sf2\" 128 56 72 amp=62 pan=0\t# Gun\n73 %font \"FluidR3_GS.sf2\" 128 56 73 amp=32 pan=0\t# MachineGun MachineGun\n74 %font \"FluidR3_GS.sf2\" 128 56 74 amp=55 pan=0\t# Noise Gun\n75 %font \"FluidR3_GS.sf2\" 128 56 75 amp=83 pan=0\t# Explosion Explosion\n76 %font \"FluidR3_GS.sf2\" 128 56 76 amp=74 pan=0\t# Dog Bark Dog Bark\n77 %font \"FluidR3_GS.sf2\" 128 56 77 amp=6 pan=0\t\t# Gallops Gallops\n78 %font \"FluidR3_GS.sf2\" 128 56 78 amp=49 pan=0\t# Bird2(R) Bird2(L)\n79 %font \"FluidR3_GS.sf2\" 128 56 79 amp=4 pan=0\t\t# SeattleRain...(L) SeattleRain...(R)\n80 %font \"FluidR3_GS.sf2\" 128 56 80 amp=185 pan=0\t# Thunder(R) Thunder(L)\n81 %font \"FluidR3_GS.sf2\" 128 56 81 amp=7 pan=0\t\t# Noise Noise\n82 %font \"FluidR3_GS.sf2\" 128 56 82 amp=111 pan=0\t# Sea Shore Sea Shore Sea Shore\n83 %font \"FluidR3_GS.sf2\" 128 56 83 amp=132 pan=0\t# River bubbles River\n84 %font \"FluidR3_GS.sf2\" 128 56 84 amp=96 pan=0\t# bubbles bubbles\n"
  },
  {
    "path": "packages/sx05re/tools/sound/timidity/config/freepats.cfg",
    "content": "\ndrumset 0\n\n 25\t/storage/.config/timidity/freepats/Drum_000/025_Snare_Roll.pat \n 26\t/storage/.config/timidity/freepats/Drum_000/026_Snap.pat \n 27\t/storage/.config/timidity/freepats/Drum_000/027_High_Q.pat \n 31\t/storage/.config/timidity/freepats/Drum_000/031_Sticks.pat \n 32\t/storage/.config/timidity/freepats/Drum_000/032_Square_Click.pat \n 33\t/storage/.config/timidity/freepats/Drum_000/033_Metronome_Click.pat \n 34\t/storage/.config/timidity/freepats/Drum_000/034_Metronome_Bell.pat \n 35\t/storage/.config/timidity/freepats/Drum_000/035_Kick_1.pat amp=100\n 36\t/storage/.config/timidity/freepats/Drum_000/036_Kick_2.pat amp=100\n 37\t/storage/.config/timidity/freepats/Drum_000/037_Stick_Rim.pat \n 38\t/storage/.config/timidity/freepats/Drum_000/038_Snare_1.pat \n 39\t/storage/.config/timidity/freepats/Drum_000/039_Clap_Hand.pat amp=100\n 40\t/storage/.config/timidity/freepats/Drum_000/040_Snare_2.pat \n 41\t/storage/.config/timidity/freepats/Drum_000/041_Tom_Low_2.pat amp=100\n 42\t/storage/.config/timidity/freepats/Drum_000/042_Hi-Hat_Closed.pat \n 43\t/storage/.config/timidity/freepats/Drum_000/043_Tom_Low_1.pat amp=100\n 44\t/storage/.config/timidity/freepats/Drum_000/044_Hi-Hat_Pedal.pat \n 45\t/storage/.config/timidity/freepats/Drum_000/045_Tom_Mid_2.pat amp=100\n 46\t/storage/.config/timidity/freepats/Drum_000/046_Hi-Hat_Open.pat \n 47\t/storage/.config/timidity/freepats/Drum_000/047_Tom_Mid_1.pat amp=100\n 48\t/storage/.config/timidity/freepats/Drum_000/048_Tom_High_2.pat amp=100\n 49\t/storage/.config/timidity/freepats/Drum_000/049_Cymbal_Crash_1.pat \n 50\t/storage/.config/timidity/freepats/Drum_000/050_Tom_High_1.pat amp=100\n 51\t/storage/.config/timidity/freepats/Drum_000/051_Cymbal_Ride_1.pat \n 52\t/storage/.config/timidity/freepats/Drum_000/052_Cymbal_Chinese.pat \n 53\t/storage/.config/timidity/freepats/Drum_000/053_Cymbal_Ride_Bell.pat amp=100\n 54\t/storage/.config/timidity/freepats/Drum_000/054_Tombourine.pat \n 55\t/storage/.config/timidity/freepats/Drum_000/055_Cymbal_Splash.pat \n 56\t/storage/.config/timidity/freepats/Drum_000/056_Cow_Bell.pat \n 57\t/storage/.config/timidity/freepats/Drum_000/057_Cymbal_Crash_2.pat \n 58\t/storage/.config/timidity/freepats/Drum_000/058_Vibra-Slap.pat \n 59\t/storage/.config/timidity/freepats/Drum_000/059_Cymbal_Ride_2.pat \n 60\t/storage/.config/timidity/freepats/Drum_000/060_Bongo_High.pat \n 61\t/storage/.config/timidity/freepats/Drum_000/061_Bongo_Low.pat \n 62\t/storage/.config/timidity/freepats/Drum_000/062_Conga_High_1_Mute.pat \n 63\t/storage/.config/timidity/freepats/Drum_000/063_Conga_High_2_Open.pat \n 64\t/storage/.config/timidity/freepats/Drum_000/064_Conga_Low.pat \n 65\t/storage/.config/timidity/freepats/Drum_000/065_Timbale_High.pat \n 66\t/storage/.config/timidity/freepats/Drum_000/066_Timbale_Low.pat \n 67\t/storage/.config/timidity/freepats/Drum_000/067_Agogo_High.pat \n 68\t/storage/.config/timidity/freepats/Drum_000/068_Agogo_Low.pat \n 69\t/storage/.config/timidity/freepats/Drum_000/069_Cabasa.pat amp=100\n 70\t/storage/.config/timidity/freepats/Drum_000/070_Maracas.pat \n 71\t/storage/.config/timidity/freepats/Drum_000/071_Whistle_1_High_Short.pat \n 72\t/storage/.config/timidity/freepats/Drum_000/072_Whistle_2_Low_Long.pat \n 73\t/storage/.config/timidity/freepats/Drum_000/073_Guiro_1_Short.pat \n 74\t/storage/.config/timidity/freepats/Drum_000/074_Guiro_2_Long.pat \n 75\t/storage/.config/timidity/freepats/Drum_000/075_Claves.pat amp=100\n 76\t/storage/.config/timidity/freepats/Drum_000/076_Wood_Block_1_High.pat \n 77\t/storage/.config/timidity/freepats/Drum_000/077_Wood_Block_2_Low.pat \n 78\t/storage/.config/timidity/freepats/Drum_000/078_Cuica_1_Mute.pat amp=100\n 79\t/storage/.config/timidity/freepats/Drum_000/079_Cuica_2_Open.pat amp=100\n 80\t/storage/.config/timidity/freepats/Drum_000/080_Triangle_1_Mute.pat \n 81\t/storage/.config/timidity/freepats/Drum_000/081_Triangle_2_Open.pat \n 82\t/storage/.config/timidity/freepats/Drum_000/082_Shaker.pat \n 84\t/storage/.config/timidity/freepats/Drum_000/084_Belltree.pat \n\nbank 0\n\n 0\t/storage/.config/timidity/freepats/Tone_000/000_Acoustic_Grand_Piano.pat amp=120 pan=center\n 1\t/storage/.config/timidity/freepats/Tone_000/001_Acoustic_Brite_Piano.pat \n 2\t/storage/.config/timidity/freepats/Tone_000/002_Electric_Grand_Piano.pat \n 4\t/storage/.config/timidity/freepats/Tone_000/004_Electric_Piano_1_Rhodes.pat \n 5\t/storage/.config/timidity/freepats/Tone_000/005_Electric_Piano_2_Chorused_Yamaha_DX.pat \n 6\t/storage/.config/timidity/freepats/Tone_000/006_Harpsichord.pat \n 7\t/storage/.config/timidity/freepats/Tone_000/007_Clavinet.pat \n 8\t/storage/.config/timidity/freepats/Tone_000/008_Celesta.pat \n 9\t/storage/.config/timidity/freepats/Tone_000/009_Glockenspiel.pat \n 13\t/storage/.config/timidity/freepats/Tone_000/013_Xylophone.pat \n 14\t/storage/.config/timidity/freepats/Tone_000/014_Tubular_Bells.pat \n 15\t/storage/.config/timidity/freepats/Tone_000/015_Dulcimer.pat \n 16\t/storage/.config/timidity/freepats/Tone_000/016_Hammond_Organ.pat \n 19\t/storage/.config/timidity/freepats/Tone_000/019_Church_Organ.pat \n 21\t/storage/.config/timidity/freepats/Tone_000/021_Accordion.pat \n 23\t/storage/.config/timidity/freepats/Tone_000/023_Tango_Accordion.pat \n 24\t/storage/.config/timidity/freepats/Tone_000/024_Nylon_Guitar.pat \n 25\t/storage/.config/timidity/freepats/Tone_000/025_Steel_Guitar.pat \n 26\t/storage/.config/timidity/freepats/Tone_000/026_Jazz_Guitar.pat \n 27\t/storage/.config/timidity/freepats/Tone_000/027_Clean_Electric_Guitar.pat \n 28\t/storage/.config/timidity/freepats/Tone_000/028_Muted_Electric_Guitar.pat \n 29\t/storage/.config/timidity/freepats/Tone_000/029_Overdriven_Guitar.pat \n 30\t/storage/.config/timidity/freepats/Tone_000/030_Distortion_Guitar.pat \n 32\t/storage/.config/timidity/freepats/Tone_000/032_Acoustic_Bass.pat \n 33\t/storage/.config/timidity/freepats/Tone_000/033_Finger_Bass.pat \n 34\t/storage/.config/timidity/freepats/Tone_000/034_Pick_Bass.pat \n 35\t/storage/.config/timidity/freepats/Tone_000/035_Fretless_Bass.pat \n 36\t/storage/.config/timidity/freepats/Tone_000/036_Slap_Bass_1.pat \n 37\t/storage/.config/timidity/freepats/Tone_000/037_Slap_Bass_2.pat \n 38\t/storage/.config/timidity/freepats/Tone_000/038_Synth_Bass_1.pat \n 40\t/storage/.config/timidity/freepats/Tone_000/040_Violin.pat \n 42\t/storage/.config/timidity/freepats/Tone_000/042_Cello.pat \n 44\t/storage/.config/timidity/freepats/Tone_000/044_Tremolo_Strings.pat \n 45\t/storage/.config/timidity/freepats/Tone_000/045_Pizzicato_Strings.pat \n 46\t/storage/.config/timidity/freepats/Tone_000/046_Harp.pat \n 47\t/storage/.config/timidity/freepats/Tone_000/047_Timpani.pat \n 48\t/storage/.config/timidity/freepats/Tone_000/048_String_Ensemble_1_Marcato.pat \n 53\t/storage/.config/timidity/freepats/Tone_000/053_Voice_Oohs.pat \n 56\t/storage/.config/timidity/freepats/Tone_000/056_Trumpet.pat \n 57\t/storage/.config/timidity/freepats/Tone_000/057_Trombone.pat \n 58\t/storage/.config/timidity/freepats/Tone_000/058_Tuba.pat \n 59\t/storage/.config/timidity/freepats/Tone_000/059_Muted_Trumpet.pat \n 60\t/storage/.config/timidity/freepats/Tone_000/060_French_Horn.pat \n 61\t/storage/.config/timidity/freepats/Tone_000/061_Brass_Section.pat \n 64\t/storage/.config/timidity/freepats/Tone_000/064_Soprano_Sax.pat \n 65\t/storage/.config/timidity/freepats/Tone_000/065_Alto_Sax.pat \n 66\t/storage/.config/timidity/freepats/Tone_000/066_Tenor_Sax.pat \n 67\t/storage/.config/timidity/freepats/Tone_000/067_Baritone_Sax.pat \n 68\t/storage/.config/timidity/freepats/Tone_000/068_Oboe.pat \n 69\t/storage/.config/timidity/freepats/Tone_000/069_English_Horn.pat \n 70\t/storage/.config/timidity/freepats/Tone_000/070_Bassoon.pat \n 71\t/storage/.config/timidity/freepats/Tone_000/071_Clarinet.pat \n 72\t/storage/.config/timidity/freepats/Tone_000/072_Piccolo.pat \n 73\t/storage/.config/timidity/freepats/Tone_000/073_Flute.pat \n 74\t/storage/.config/timidity/freepats/Tone_000/074_Recorder.pat \n 75\t/storage/.config/timidity/freepats/Tone_000/075_Pan_Flute.pat \n 76\t/storage/.config/timidity/freepats/Tone_000/076_Bottle_Blow.pat \n 79\t/storage/.config/timidity/freepats/Tone_000/079_Ocarina.pat \n 80\t/storage/.config/timidity/freepats/Tone_000/080_Square_Wave.pat \n 84\t/storage/.config/timidity/freepats/Tone_000/084_Charang.pat \n 88\t/storage/.config/timidity/freepats/Tone_000/088_New_Age.pat \n 94\t/storage/.config/timidity/freepats/Tone_000/094_Halo_Pad.pat \n 95\t/storage/.config/timidity/freepats/Tone_000/095_Sweep_Pad.pat \n 98\t/storage/.config/timidity/freepats/Tone_000/098_Crystal.pat \n 101\t/storage/.config/timidity/freepats/Tone_000/101_Goblins--Unicorn.pat \n 102\t/storage/.config/timidity/freepats/Tone_000/102_Echo_Voice.pat \n 104\t/storage/.config/timidity/freepats/Tone_000/104_Sitar.pat \n 114\t/storage/.config/timidity/freepats/Tone_000/114_Steel_Drums.pat \n 115\t/storage/.config/timidity/freepats/Tone_000/115_Wood_Block.pat \n 120\t/storage/.config/timidity/freepats/Tone_000/120_Guitar_Fret_Noise.pat \n 122\t/storage/.config/timidity/freepats/Tone_000/122_Seashore.pat \n 125\t/storage/.config/timidity/freepats/Tone_000/125_Helicopter.pat \n\n"
  },
  {
    "path": "packages/sx05re/tools/sound/timidity/config/soundfont_readme.txt",
    "content": "If you want music using FluidR3_GM and FluidR3_GS you need to download the soundfonts from: \nhttps://osdn.net/projects/sfnet_androidframe/downloads/soundfonts/FluidR3_GM.sf2/\nhttps://osdn.net/projects/sfnet_androidframe/downloads/soundfonts/FluidR3_GS.sf2/\nand place them in /storage/roms/bios/timidity/sf2\n\n\nIf you want music using freepats you need to download http://freepats.zenvoid.org/freepats-20060219.zip\nand unzip the file to /storage/roms/bios/timidity/freepats\n\n"
  },
  {
    "path": "packages/sx05re/tools/sound/timidity/config/timidity.cfg",
    "content": "# Instrument configuration file for timidity\n# $Id: timidity.cfg,v 1.7 2005/09/03 19:26:03 hmh Exp $\n\n# You can change just about every option in TiMidity++ using\n# This config file.  Please refer to the timidity.cfg(5) manpage\n# for more details\n\n## If you have a slow CPU, uncomment these:\n#opt EFresamp=d\t\t#disable resampling\n#opt EFvlpf=d\t\t#disable VLPF\n#opt EFreverb=d\t\t#disable reverb\n#opt EFchorus=d\t\t#disable chorus\n#opt EFdelay=d\t\t#disable delay\n#opt anti-alias=d\t#disable sample anti-aliasing\n#opt EWPVSETOZ\t\t#disable all Midi Controls\n#opt p32a\t\t#default to 32 voices with auto reduction\n#opt s32kHz\t\t#default sample frequency to 32kHz\n#opt fast-decay\t\t#fast decay notes\n\n## If you have a moderate CPU, try these:\n#opt EFresamp=l\n#opt EFreverb=g,42\n#opt EFchorus=s\n#opt s32kHz\n#opt p64a\n\n# Disabling some of the Midi Controls can help with the CPU usage a lot.\n# The same goes to the VLPF, sample anti-aliasing and effects such as\n# reverb and chorus\n\n\n# By default, try to use the instrument patches from GeneralUser.cfg:\n\nsource /storage/.config/timidity/GeneralUser.cfg\n\n# alternatively, you can use freepats\n# source /storage/.config/timidity/freepats.cfg\n\n# or alternatively, you can use the fluid-soundfont:\n# source /storage/.config/timidity/fluidr3_gm.cfg\n# source /storage/.config/timidity/fluidr3_gs.cfg\n\n"
  },
  {
    "path": "packages/sx05re/tools/sound/timidity/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"timidity\"\nPKG_VERSION=\"2.15.0\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL2\"\nPKG_SITE=\"https://sourceforge.net/projects/timidity/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/timidity/TiMidity++-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_mixer\"\nPKG_LONGDESC=\"TiMidity++\"\nPKG_TOOLCHAIN=\"autotools\"\n\npre_configure_target() {\n  # doesn't like to be build in target folder\n  cd ${PKG_BUILD}\n  rm -fr .${TARGET_NAME}\n\n  # simple tool can be build directly\n  ${HOST_CC} timidity/calcnewt.c -o timidity/calcnewt_host -lm\n\n  PKG_CONFIGURE_OPTS_TARGET=\"--host=${TARGET_NAME} \\\n                             --enable-alsa\n\t\t\t     --with-default-output=alsa \\\n                             --with-default-path=/storage/.config/timidity \\\n                             lib_cv_va_copy=yes \\\n                             lib_cv___va_copy=yes \\\n                             lib_cv_va_val_copy=no \\\n                             ac_cv_c_bigendian=no \\\n                             --with-includes=${SYSROOT_PREFIX}/usr/include \\\n                             --with-libraries=${SYSROOT_PREFIX}/usr/lib\n\t\t\t     --enable-alsaseq\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/config/timidity\n  cp -rf ${PKG_DIR}/config/* ${INSTALL}/usr/config/timidity\n  ln -sf /storage/roms/bios/timidity/freepats ${INSTALL}/usr/config/timidity/freepats\n  \n  mkdir -p ${INSTALL}/usr/bin\n  cp ${PKG_BUILD}/timidity/timidity ${INSTALL}/usr/bin\n  \n  mkdir -p ${INSTALL}/etc/timidity/\n  ln -sf /storage/.config/timidity/freepats.cfg ${INSTALL}/etc/timidity/freepats.cfg \n}\n"
  },
  {
    "path": "packages/sx05re/tools/sound/timidity/patches/02-calcnewt-host-build.patch",
    "content": "--- a/timidity/Makefile.am\t2008-03-30 04:31:14.000000000 +0200\n+++ b/timidity/Makefile.am\t2020-08-17 10:55:25.271404644 +0200\n@@ -446,21 +446,21 @@ resample.c: newton_table.c\n \n if VCPP\n newton_table.c: calcnewt$(EXEEXT)\n-\t./calcnewt $@\n+\t./calcnewt_host $@\n \n else\n if POCC\n newton_table.c: calcnewt$(EXEEXT)\n-\t./calcnewt $@\n+\t./calcnewt_host $@\n \n else\n if WATCOM_C\n newton_table.c: calcnewt$(EXEEXT)\n-\t./calcnewt > $@\n+\t./calcnewt_host > $@\n \n else\n newton_table.c: calcnewt$(EXEEXT)\n-\t./calcnewt > $@\n+\t./calcnewt_host > $@\n \n endif\n endif\n"
  },
  {
    "path": "packages/sx05re/tools/sound/timidity/patches/03-ar-cru-fix.patch",
    "content": "--- a/interface/Makefile.am\t2013-12-12 03:04:52.000000000 +0100\n+++ b/interface/Makefile.am\t2020-08-17 10:56:55.977780546 +0200\n@@ -220,7 +220,7 @@ if POCC\n \tif test -f interface.lib ; then touch $@ ; fi\n else\n \trm -f libinterface.a\n-\t$(AR) cru libinterface.a $(libinterface_a_OBJECTS) $(libinterface_a_LIBADD)\n+\t$(AR) cr libinterface.a $(libinterface_a_OBJECTS) $(libinterface_a_LIBADD)\n \t$(RANLIB) libinterface.a\n endif\n endif\n"
  },
  {
    "path": "packages/sx05re/tools/sound/wildmidi/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.tv; see the file COPYING.  If not, write to\n#  the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.\n#  http://www.gnu.org/copyleft/gpl.html\n################################################################################\n\nPKG_NAME=\"wildmidi\"\nPKG_VERSION=\"405ca73\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/Mindwerks/wildmidi\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain alsa\"\nPKG_PRIORITY=\"optional\"\nPKG_SHORTDESC=\"WildMIDI is a simple software midi player which has a core softsynth library that can be used with other applications.\"\n\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"no\"\nPKG_TOOLCHAIN=\"cmake\"\n\nPKG_CMAKE_OPTS_TARGET=\"WANT_PLAYER=OFF -DWANT_ALSA=ON\"\n"
  },
  {
    "path": "packages/sx05re/tools/sound/wildmidi/sources/CMakeLists.txt",
    "content": "# ########## Project setup ##########\nPROJECT(wildmidi C)\nCMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)\n\n# WildMIDI Version\nSET(VERSION_MAJOR 0)\nSET(VERSION_MINOR 4)\nSET(VERSION_RELEASE 3)\nSET(WILDMIDI_VERSION \"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}\")\n\n# Lib Versions\nSET(SOVERSION 2)\nSET(VERSION 2.1.0)\n\n# Find Macros\nSET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)\n\nINCLUDE(CMakeDependentOption)\nINCLUDE(CheckCCompilerFlag)\nINCLUDE(CheckCSourceCompiles)\nINCLUDE(CheckIncludeFile)\nINCLUDE(TestBigEndian)\n\n# Set a default build type if none was specified\nIF (NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL \"\")\n    MESSAGE(STATUS \"Setting build type to 'Debug' as none was specified.\")\n    SET(CMAKE_BUILD_TYPE Debug CACHE STRING \"Choose the type of build.\" FORCE)\n    # Set the possible values of build type for cmake-gui\n    SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS \"Debug\" \"Release\" \"MinSizeRel\" \"RelWithDebInfo\")\nENDIF ()\nSET(CMAKE_CONFIGURATION_TYPES \"${CMAKE_BUILD_TYPE}\")\nMESSAGE(STATUS \"Build Type: ${CMAKE_BUILD_TYPE}\")\n\n# Set our options\nOPTION(BUILD_SHARED_LIBS \"Build a dynamic wildmidi library\" ON)\nOPTION(WANT_PLAYER \"Build WildMIDI player in addition to the libraries\" ON)\nOPTION(WANT_STATIC \"Build static library in addition to dynamic library\" OFF)\nCMAKE_DEPENDENT_OPTION(WANT_PLAYERSTATIC \"Build a statically linked WildMIDI player\" ON \"WANT_STATIC;WANT_PLAYER\" OFF)\nOPTION(WANT_ALSA \"Include ALSA (Advanced Linux Sound Architecture) support\" OFF)\nOPTION(WANT_OSS \"Include OSS (Open Sound System) support\" OFF)\nOPTION(WANT_OPENAL \"Include OpenAL (Cross Platform) support\" OFF)\nOPTION(WANT_DEVTEST \"Build WildMIDI DevTest file to check files\" OFF)\nOPTION(WANT_OSX_DEPLOYMENT \"OSX Deployment\" OFF)\nIF (WIN32 AND MSVC)\n    OPTION(WANT_MP_BUILD \"Build with Multiple Processes (/MP)\" OFF)\nENDIF ()\nIF (UNIX AND NOT APPLE AND NOT RISCOS)\n    SET(WILDMIDI_CFG \"/etc/wildmidi/wildmidi.cfg\" CACHE STRING \"default config location\")\nELSE ()\n    SET(WILDMIDI_CFG \"wildmidi.cfg\" CACHE STRING \"default config location\")\nENDIF ()\n\nIF ((NOT BUILD_SHARED_LIBS) AND (NOT WANT_STATIC))\n    MESSAGE(FATAL_ERROR \"Neither dynamic nor static library build is selected.\")\nENDIF ()\n\n\n# Platform specific defines\nIF (UNIX)\n    # allow 'large' files in 32 bit builds\n    ADD_DEFINITIONS(\n            -D_LARGEFILE_SOURCE\n            -D_FILE_OFFSET_BITS=64\n            -D_LARGE_FILES\n    )\nENDIF (UNIX)\n\n# Usage of RPATH for macOS is enabled by default; this just suppresses the CMP0042 warning\n# when building libwildmidi_dynamic.\nIF (POLICY CMP0042)\n    CMAKE_POLICY(SET CMP0042 NEW)\nENDIF ()\n\nIF (OPENBSD)  # Set RPATH for OpenBSD so WildMIDI can find libWildMidi.so\n    # use, i.e. don't skip the full RPATH for the build tree\n    SET(CMAKE_SKIP_BUILD_RPATH FALSE)\n\n    # when building, don't use the install RPATH already\n    # (but later on when installing)\n    SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)\n\n    SET(CMAKE_INSTALL_RPATH \"${CMAKE_INSTALL_PREFIX}/lib\")\n\n    # add the automatically determined parts of the RPATH\n    # which point to directories outside the build tree to the install RPATH\n    SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)\n\n    # the RPATH to be used when installing, but only if it's not a system directory\n    LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES \"${CMAKE_INSTALL_PREFIX}/lib\" isSystemDir)\n    IF (\"${isSystemDir}\" STREQUAL \"-1\")\n        SET(CMAKE_INSTALL_RPATH \"${CMAKE_INSTALL_PREFIX}/lib\")\n    ENDIF ()\nENDIF (OPENBSD)\n\nIF (WIN32)\n    ADD_DEFINITIONS(\n            -DNOMINMAX\n            -DWIN32_LEAN_AND_MEAN\n            -D_CRT_SECURE_NO_WARNINGS\n    )\nENDIF (WIN32)\n\n# Compiler specific settings\nIF (CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES \"Clang\"))\n    ADD_DEFINITIONS(\n            -Wall -W\n            -fno-common\n    )\n\n    IF (NOT WIN32 AND NOT CYGWIN)\n        SET(OLD_REQUIRED_FLAGS \"${CMAKE_REQUIRED_FLAGS}\")\n        SET(CMAKE_REQUIRED_FLAGS \"${OLD_REQUIRED_FLAGS} -Werror\")\n        CHECK_C_SOURCE_COMPILES(\"int foo(void) __attribute__((visibility(\\\"default\\\")));\n                                 int main(void) {return 0;}\" HAVE_VISIBILITY_DEFAULT)\n        IF (HAVE_VISIBILITY_DEFAULT)\n            CHECK_C_COMPILER_FLAG(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN)\n        ENDIF ()\n        SET(CMAKE_REQUIRED_FLAGS \"${OLD_REQUIRED_FLAGS}\")\n    ENDIF ()\n\n    IF (CMAKE_BUILD_TYPE STREQUAL \"Debug\")\n        ADD_DEFINITIONS(-ggdb3 -O0)\n    ELSEIF (CMAKE_BUILD_TYPE STREQUAL \"Release\")\n        ADD_DEFINITIONS(-O3)\n    ENDIF (CMAKE_BUILD_TYPE STREQUAL \"Debug\")\nENDIF ()\n\nIF (CMAKE_C_COMPILER_ID MATCHES \"SunPro\")\n    SET(OLD_REQUIRED_FLAGS \"${CMAKE_REQUIRED_FLAGS}\")\n    SET(CMAKE_REQUIRED_FLAGS \"${OLD_REQUIRED_FLAGS} -xldscope=hidden\")\n    # __SUNPRO_C >= 0x590\n    #   CHECK_C_SOURCE_COMPILES(\"int foo(void) __attribute__((visibility(\\\"default\\\")));\n    #                            int main(void) {return 0;}\" HAVE_VISIBILITY_DEFAULT)\n    # __SUNPRO_C >= 0x550\n    CHECK_C_SOURCE_COMPILES(\"__global int foo(void);\n                             int main(void) {return 0;}\" HAVE_LDSCOPE_GLOBAL)\n    IF (HAVE_LDSCOPE_GLOBAL)# OR HAVE_VISIBILITY_DEFAULT\n        SET(HAVE_LDSCOPE_HIDDEN 1)\n    ENDIF ()\n    SET(CMAKE_REQUIRED_FLAGS \"${OLD_REQUIRED_FLAGS}\")\nENDIF ()\n\nCHECK_C_SOURCE_COMPILES(\"int main(void) {__builtin_expect(0,0); return 0;}\" HAVE___BUILTIN_EXPECT)\n\nCHECK_C_SOURCE_COMPILES(\"static inline int static_foo() {return 0;}\n                         int main(void) {return 0;}\" HAVE_C_INLINE)\nCHECK_C_SOURCE_COMPILES(\"static __inline__ int static_foo() {return 0;}\n                         int main(void) {return 0;}\" HAVE_C___INLINE__)\nCHECK_C_SOURCE_COMPILES(\"static __inline int static_foo() {return 0;}\n                         int main(void) {return 0;}\" HAVE_C___INLINE)\n\n# we must not have any unresolved symbols:\nif (APPLE)\n    SET(EXTRA_LDFLAGS \"-Wl,-undefined,error\")\nELSE()\n    SET(OLD_REQUIRED_FLAGS \"${CMAKE_REQUIRED_FLAGS}\")\n    SET(CMAKE_REQUIRED_FLAGS \"${OLD_REQUIRED_FLAGS} -Wl,--no-undefined\")\n    CHECK_C_COMPILER_FLAG(\"\" HAVE_NO_UNDEFINED)\n    SET(CMAKE_REQUIRED_FLAGS \"${OLD_REQUIRED_FLAGS}\")\n    IF (HAVE_NO_UNDEFINED)\n        SET(EXTRA_LDFLAGS \"-Wl,--no-undefined -lm\")\n    ELSE()\n        SET(EXTRA_LDFLAGS \"\")\n    ENDIF()\nENDIF()\n\nCHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)\nCHECK_INCLUDE_FILE(inttypes.h HAVE_INTTYPES_H)\n\nTEST_BIG_ENDIAN(WORDS_BIGENDIAN)\n\nSET(AUDIODRV_ALSA)\nSET(AUDIODRV_OSS)\nSET(AUDIODRV_OPENAL)\n\n# UNIX-like environments\nIF (UNIX AND NOT APPLE)\n\n    # Go looking for available sound packages for WildMIDI player\n    IF (WANT_PLAYER)\n        FIND_PACKAGE(ALSA)\n        FIND_PACKAGE(OpenAL)\n        FIND_PACKAGE(OSS)\n\n        # Set preferred output\n        IF (WANT_ALSA)\n            IF (NOT ALSA_FOUND)\n                MESSAGE(FATAL_ERROR \"ALSA required but not found.\")\n            ENDIF ()\n            SET(AUDIODRV_ALSA 1)\n            SET(AUDIO_LIBRARY ${ALSA_LIBRARY})\n\n        ELSEIF (WANT_OSS)\n            IF (NOT OSS_FOUND)\n                MESSAGE(FATAL_ERROR \"OSS required but not found.\")\n            ENDIF ()\n            # no special header paths\n            SET(AUDIODRV_OSS 1)\n            SET(AUDIO_LIBRARY ${OSS_LIBRARY})\n\n        ELSEIF (WANT_OPENAL)\n            IF (NOT OPENAL_FOUND)\n                MESSAGE(FATAL_ERROR \"OpenAL required but not found.\")\n            ENDIF ()\n            SET(AUDIODRV_OPENAL 1)\n            SET(AUDIO_LIBRARY ${OPENAL_LIBRARY})\n\n        ELSE () # Try to auto-detect\n\n            IF (ALSA_FOUND)\n                SET(AUDIO_LIBRARY ${ALSA_LIBRARY})\n                SET(AUDIODRV_ALSA 1)\n\n            ELSEIF (OSS_FOUND)\n                # no special header paths\n                SET(AUDIO_LIBRARY ${OSS_LIBRARY})\n                SET(AUDIODRV_OSS 1)\n\n            ELSEIF (OPENAL_FOUND)\n                SET(AUDIO_LIBRARY ${OPENAL_LIBRARY})\n                SET(AUDIODRV_OPENAL 1)\n\n            ELSE ()\n                MESSAGE(WARNING \"Could not find an audio sub-system!\")\n                SET(AUDIO_LIBRARY \"\")\n            ENDIF ()\n\n        ENDIF ()\n    ENDIF ()\n\n    # find our math lib\n    FIND_LIBRARY(M_LIBRARY m)\n    MESSAGE(STATUS \"M_LIBRARY: ${M_LIBRARY}\")\n    IF (NOT M_LIBRARY)\n        SET(M_LIBRARY \"\")\n    ENDIF ()\n\n    ## Debian and non debian Linux building\n    IF (DPKG_PROGRAM)\n        ## Debian specific\n    ELSE ()\n        ## Non debian specific\n    ENDIF ()\nENDIF (UNIX AND NOT APPLE)\n\nIF (APPLE AND WANT_PLAYER)\n    FIND_PACKAGE(OpenAL)\n\n    IF (WANT_OPENAL)\n        IF (NOT OPENAL_FOUND)\n            MESSAGE(FATAL_ERROR \"OpenAL required but not found.\")\n        ENDIF ()\n        SET(AUDIO_LIBRARY ${OPENAL_LIBRARY})\n\n    ELSE ()\n        IF (OPENAL_FOUND)\n            SET(AUDIO_LIBRARY ${OPENAL_LIBRARY})\n            SET(AUDIODRV_OPENAL 1)\n\n        ELSE ()\n            MESSAGE(WARNING \"Could not find an audio sub-system!\")\n            SET(AUDIO_LIBRARY \"\")\n        ENDIF ()\n\n    ENDIF ()\nENDIF ()\n\nIF (WIN32)\n    IF (WANT_PLAYER)\n        LINK_LIBRARIES(winmm)\n    ENDIF ()\nENDIF (WIN32)\n\n# ######### General setup ##########\nINCLUDE_DIRECTORIES(BEFORE \"${CMAKE_SOURCE_DIR}/include\")\nFILE(MAKE_DIRECTORY \"${CMAKE_BINARY_DIR}/include\")\nINCLUDE_DIRECTORIES(BEFORE \"${CMAKE_BINARY_DIR}/include\")\nIF (NOT HAVE_STDINT_H) # AND NOT HAVE_INTTYPES_H\n    INCLUDE_DIRECTORIES(BEFORE \"${CMAKE_SOURCE_DIR}/include/stdint\")\nENDIF ()\n\nIF (AMIGA OR AROS)\n    SET(WILDMIDI_AMIGA 1)\nENDIF ()\n\nIF (APPLE)\n    SET(APP_BUNDLE_NAME \"${CMAKE_PROJECT_NAME}.app\")\n    SET(APP_BUNDLE_DIR \"${wildmidi_BINARY_DIR}/${APP_BUNDLE_NAME}\")\n    IF (WANT_OSX_DEPLOYMENT)\n        SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)\n    ENDIF ()\nENDIF (APPLE)\n\nIF (APPLE)\n    SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY \"${APP_BUNDLE_DIR}/Contents/MacOS\")\nELSE (APPLE)\n    SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY \"${wildmidi_BINARY_DIR}\")\nENDIF (APPLE)\n\n# Setup up our config file\nCONFIGURE_FILE(\"${CMAKE_SOURCE_DIR}/include/config.h.cmake\" \"${CMAKE_BINARY_DIR}/include/config.h\")\n\nADD_SUBDIRECTORY(src)\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/351Files/config/gptokeyb/351Files.gptk",
    "content": "back = backspace\nstart = enter\nguide = esc\na = enter\nb = backspace\nx = x\ny = backspace\nl1 = pageup\nl2 = home\nr1 = pagedown\nr2 = end\nup = up\ndown = down\nleft = left\nright = right\nleft_analog_up = up\nleft_analog_down = down\nleft_analog_left = left\nleft_analog_right = right\nright_analog_up = up\nright_analog_down = down\nright_analog_left = left\nright_analog_right = right\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/351Files/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"351Files\"\nPKG_VERSION=\"492961726abb04ebefa58f7dda47b7040f3bd088\"\nPKG_SHA256=\"249ef2842fb28fc9a1296f25a35b7f02ac5a5ef7a472b9a4e1a977722cf39643\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/EmuELEC/351Files\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_image SDL2_gfx SDL2_ttf freetype file\"\nPKG_LONGDESC=\"File Manager\"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\n  sed -i \"s|ifeq (\\$(DEVICE),PC)||g\" Makefile\n  sed -i \"s|endif||g\" Makefile\n  sed -i \"s|START_PATH = \\$(PWD)||g\" Makefile\n  sed -i \"s|sdl2-config|${SYSROOT_PREFIX}/usr/bin/sdl2-config|g\" Makefile\n  sed -i \"s|g++|\\$(CXX)|g\" Makefile\n\n\tEEDV=\"PC\"\n\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\n\tEEDV=\"EE_HH\"\nfi\n\n  PKG_MAKE_OPTS_TARGET=\" START_PATH=\"/storage\" DEVICE=${EEDV} RES_PATH=\"/emuelec/configs/fm/res\"\"\n}\n\n\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/fm\n  cp 351Files ${INSTALL}/usr/bin/\n  cp -rf res ${INSTALL}/usr/config/emuelec/configs/fm/\n  \n  cp -rf ${PKG_DIR}/config/* ${INSTALL}/usr/config/emuelec/configs/\n  \n  \n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/351Files/patches/01-EmuELEC.patch",
    "content": "--- a/src/def.h\n+++ b/src/def.h\n@@ -41,16 +41,20 @@\n    #define KEYBOARD_KEY_SPACING     4\n \n // Paraters for desktop PC\n+#elif defined(DEVICE_PC) || defined(DEVICE_EE_HH)\n+   extern int SCREEN_WIDTH;\n+   extern int SCREEN_HEIGHT;\n+#if defined(DEVICE_PC)\n+   #define HARDWARE_ACCELERATION    1\n #else\n-   #define SCREEN_WIDTH             640\n-   #define SCREEN_HEIGHT            480\n-   #define HARDWARE_ACCELERATION    1\n+    #define HARDWARE_ACCELERATION    0\n+#endif\n    #define FULLSCREEN               0\n    #define FONT_NAME                \"NotoSans-Regular.ttf\"\n    #define FONT_NAME_MONO           \"NotoSansMono-Regular.ttf\"\n-   #define FONT_SIZE                20\n-   #define LINE_HEIGHT              32\n-   #define ICON_SIZE                24\n+   extern int FONT_SIZE;\n+   extern int LINE_HEIGHT;\n+   extern int ICON_SIZE;\n    #define MARGIN_X                 10\n    #define KEYBOARD_MARGIN          8\n    #define KEYBOARD_KEY_SPACING     4\n\n--- a/src/main.cpp\n+++ b/src/main.cpp\n@@ -17,6 +17,12 @@\n int g_charW = 0;\n std::vector<IWindow *> g_windows;\n bool IWindow::g_hasChanged = true;\n+\n+int SCREEN_WIDTH = 1920;\n+int SCREEN_HEIGHT = 1080;\n+int FONT_SIZE = 30;\n+int LINE_HEIGHT = 42;\n+int ICON_SIZE = 34;\n \n // Textures for icons\n SDL_Texture *g_iconFile = NULL;\n@@ -41,6 +47,24 @@\n \n int main(int argc, char* args[])\n {\n+ \n+ if (argc > 2) {\n+      SCREEN_WIDTH = atoi(args[1]);\n+      SCREEN_HEIGHT = atoi(args[2]);\n+      \n+      if (argc > 3) { \n+          FONT_SIZE = atoi(args[3]);\n+      }\n+      \n+      if (argc > 4) {  \n+          LINE_HEIGHT = atoi(args[4]);\n+      }\n+      \n+      if (argc > 5) {  \n+          ICON_SIZE = atoi(args[5]);\n+      }\n+}  \n+\n    // Init SDL\n    if (! SDLUtils::init())\n    {\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/etc/edit.indent.rc",
    "content": "#! /bin/sh\n# *** External Formatter (Indenter) for GNU Midnight Commander.\n# arguments:\n#    $1 - Name of the file being edited\n#    $2 - Name of the file to be processed\n\nexec >/dev/null\n\ncase `echo $1 |sed 's/^.*\\.//'` in\n    c|h)\n    # ftp://ftp.gnu.org/pub/gnu/indent/\n    # Please add options to your ~/.indent.pro, not here.\n        indent \"$2\"\n    ;;\n    C|cc|CC|cxx|CXX|cpp|CPP)\n    # http://astyle.sourceforge.net/\n        astyle \"$2\"\n    ;;\n    java|JAVA)\n    # http://astyle.sourceforge.net/\n        astyle --style=java --mode=java \"$2\"\n    ;;\n    htm|html|HTM|HTML)\n    # http://tidy.sourceforge.net/\n        tidy -q -m -ascii -wrap 80 \"$2\"\n    ;;\n    *)\n    # http://www.gnu.org/software/coreutils/\n        fmt \"$2\" >\"$2.tmp\" && rm -f \"$2\" && mv -f \"$2.tmp\" \"$2\"\n    ;;\nesac\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/etc/edit.spell.rc",
    "content": "#! /bin/sh\n# *** External Spell Checker for GNU Midnight Commander.\n# arguments:\n#    $1 - Name of the file being edited\n#    $2 - Name of the file to be processed\n\nif aspell </dev/null >/dev/null 2>&1; then\n  aspell -c \"$2\"\nelse\n  ispell \"$2\"\nfi\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/etc/filehighlight.ini",
    "content": "[executable]\n    type=FILE_EXE\n\n[directory]\n    type=DIR\n\n[device]\n    type=DEVICE\n\n[special]\n    type=SPECIAL\n\n[stalelink]\n    type=STALE_LINK\n\n[symlink]\n    type=SYMLINK\n\n[hardlink]\n    type=HARDLINK\n\n[core]\n    regexp=^core\\\\.*\\\\d*$\n\n[temp]\n    extensions=tmp;$$$;~;bak\n    extensions_case=false\n    regexp=(^#.*|.*~$)\n\n[archive]\n    extensions=gz;bz2;tar;tgz;rpm;Z;rar;zip;arj;cab;lzh;lha;zoo;arc;ark;xz;tbz;tbz2;\n\n[doc]\n    extensions=txt;doc;rtf;diz;ctl;me;ps;pdf;xml;xsd;xslt;dtd;html;shtml;htm;mail;msg;lsm;po;nroff;man;tex;sgml;css;text;letter;chm\n\n[source]\n    extensions=c;h;cc;hh;cpp;cxx;hpp;asm;py;pl;pm;inc;cgi;php;phps;js;java;jav;jasm;sh;bash;diff;patch;pas;tcl;tk;awk;m4;st;mak;sl;ada;caml;ml;mli;mly;mll;mlp;sas;prg;hs;hi;erl\n\n[media]\n    extensions=mp2;mp3;mpg;ogg;mpeg;wav;avi;asf;mov;mol;mpl;xm;mod;it;med;mid;midi;s3m;umx;vob;mkv;flv;mp4;m3u\n\n[graph]\n    extensions=jpg;jpeg;gif;png;tif;pcx;bmp;xpm;xbm;eps;pic;rle;ico;wmf;omf;ai;cdr\n\n[database]\n    extensions=dbf;mdn;db;mdb;dat;fox;dbx;mdx;sql;mssql;msql;ssql;pgsql;xls;cdx;dbi\n\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/etc/ini",
    "content": "[Midnight-Commander]\nverbose=1\npause_after_run=1\nshell_patterns=1\nauto_save_setup=1\nauto_menu=0\nuse_internal_view=1\nuse_internal_edit=1\nclear_before_exec=1\nconfirm_delete=1\nconfirm_overwrite=1\nconfirm_execute=0\nconfirm_history_cleanup=1\nconfirm_exit=1\nconfirm_directory_hotlist_delete=1\nsafe_delete=0\nmouse_repeat_rate=100\ndouble_click_speed=250\nuse_8th_bit_as_meta=0\nconfirm_view_dir=0\nmouse_move_pages_viewer=1\nmouse_close_dialog=0\nfast_refresh=0\ndrop_menus=0\nwrap_mode=1\nold_esc_mode=0\nold_esc_mode_timeout=1000000\ncd_symlinks=1\nshow_all_if_ambiguous=0\nmax_dirt_limit=10\nuse_file_to_guess_type=1\nalternate_plus_minus=0\nonly_leading_plus_minus=1\nshow_output_starts_shell=0\nxtree_mode=0\nnum_history_items_recorded=60\nfile_op_compute_totals=1\nclassic_progressbar=1\nvfs_timeout=60\nftpfs_directory_timeout=900\nuse_netrc=1\nftpfs_retry_seconds=30\nftpfs_always_use_proxy=0\nftpfs_use_passive_connections=1\nftpfs_use_passive_connections_over_proxy=0\nftpfs_use_unix_list_options=1\nftpfs_first_cd_then_ls=1\nfish_directory_timeout=900\neditor_tab_spacing=8\neditor_word_wrap_line_length=72\neditor_fill_tabs_with_spaces=0\neditor_return_does_auto_indent=1\neditor_backspace_through_tabs=0\neditor_fake_half_tabs=1\neditor_option_save_mode=0\neditor_option_save_position=1\neditor_option_auto_para_formatting=0\neditor_option_typewriter_wrap=0\neditor_edit_confirm_save=1\neditor_syntax_highlighting=1\neditor_persistent_selections=1\neditor_cursor_beyond_eol=0\neditor_visible_tabs=1\neditor_visible_spaces=1\neditor_line_state=0\neditor_simple_statusbar=0\neditor_check_new_line=0\neditor_show_right_margin=0\neditor_group_undo=0\nnice_rotating_dash=1\nmcview_remember_file_position=0\nauto_fill_mkdir_name=1\ncopymove_persistent_attr=1\nselect_flags=6\neditor_backup_extension=~\nmcview_eof=\nignore_ftp_chattr_errors=true\nkeymap=mc.keymap\nskin=default\n\nfilepos_max_saved_entries=1024\n\npreallocate_space=0\neditor_cursor_after_inserted_block=0\neditor_ask_filename_before_edit=0\neditor_filesize_threshold=64M\n\n[Layout]\nmessage_visible=0\nkeybar_visible=1\nxterm_title=1\noutput_lines=0\ncommand_prompt=1\nmenubar_visible=1\nfree_space=1\n\nhorizontal_split=0\nvertical_equal=1\nleft_panel_size=118\nhorizontal_equal=1\ntop_panel_size=118\n\n[Misc]\ntimeformat_recent=%b %e %H:%M\ntimeformat_old=%b %e  %Y\nftp_proxy_host=gate\nftpfs_password=anonymous@\ndisplay_codepage=UTF-8\nsource_codepage=UTF-8\nautodetect_codeset=\nclipboard_store=\nclipboard_paste=\n\n[Colors]\nbase_color=\nlinux=\ncolor_terminals=\n\nxterm=\n\n[Panels]\nshow_mini_info=true\nkilobyte_si=false\nmix_all_files=false\nshow_backups=true\nshow_dot_files=true\nfast_reload=false\nfast_reload_msg_shown=false\nmark_moves_down=true\nreverse_files_only=true\nauto_save_setup_panels=true\nnavigate_with_arrows=false\npanel_scroll_pages=true\nmouse_move_pages=true\nfiletype_mode=true\npermission_mode=false\ntorben_fj_mode=false\nquick_search_mode=2\n\nsimple_swap=false\n\n[terminal:linux]\nf1=\\\\e[11~\nf2=\\\\e[12~\nf3=\\\\e[13~\nf4=\\\\e[14~\nf5=\\\\e[15~\n\n[terminal:xterm]\nf1=\\\\e[11~\nup=\\\\e[A\ndown=\\\\e[B\nleft=\\\\e[D\nright=\\\\e[C\n\n[Panelize]\nFind *.orig after patching=find . -name \\\\*.orig -print\nFind SUID and SGID programs=find . \\\\( \\\\( -perm -04000 -a -perm +011 \\\\) -o \\\\( -perm -02000 -a -perm +01 \\\\) \\\\) -print\nFind rejects after patching=find . -name \\\\*.rej -print\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/etc/mc.ext",
    "content": "# Midnight Commander 3.0 extension file\n# Warning: Structure of this file has changed completely with version 3.0\n#\n# All lines starting with # or empty lines are thrown away.\n# Lines starting in the first column should have following format:\n#\n# keyword/descNL, i.e. everything after keyword/ until new line is desc\n#\n# keyword can be:\n#\n#    shell (desc is, when starting with a dot, any extension (no wildcars),\n#          i.e. matches all the files *desc . Example: .tar matches *.tar;\n#          if it doesn't start with a dot, it matches only a file of that name)\n#\n#    regex (desc is an extended regular expression)\n#          Please note that we are using the GNU regex library and thus\n#          \\| matches the literal | and | has special meaning (or) and\n#          () have special meaning and \\( \\) stand for literal ( ).\n#\n#    type  (file matches this if `file %f` matches regular expression desc\n#          (the filename: part from `file %f` is removed))\n#\n#    directory (matches any directory matching regular expression desc)\n#\n#    include (matches an include directive)\n#\n#    default (matches any file no matter what desc is)\n#\n# Other lines should start with a space or tab and should be in the format:\n#\n# keyword=commandNL (with no spaces around =), where keyword should be:\n#\n#    Open (if the user presses Enter or doubleclicks it),\n#\n#    View (F3), Edit (F4)\n#\n#    Include is the keyword used to add any further entries from an include/\n#    section\n#\n# command is any one-line shell command, with the following substitutions:\n#\n# %% -> % character\n# %p -> name of the current file (without path, but pwd is its path)\n# %f -> name of the current file. Unlike %p, if file is located on a\n#\tnon-local virtual filesystem, i.e. either tarfs or ftpfs,\n#\tthen the file will be temporarily copied into a local directory\n#\tand %f will be the full path to this local temporal file.\n#\tIf you don't want to get a local copy and want to get the\n#\tvirtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then\n#\tuse %d/%p instead of %f.\n# %d -> name of the current directory (pwd, without trailing slash)\n# %s -> \"selected files\", i.e. space separated list of tagged files if any\n#       or name of the current file\n# %t -> list of tagged files\n# %u -> list of tagged files (they'll be untaged after the command)\n#\n# (If these 6 letters are in uppercase, they refer to the other panel.\n# But you shouldn't have to use it in this file.)\n#\n#\n# %cd -> the rest is a path mc should change into (cd won't work, since it's\n#\ta child process).  %cd handles even vfs names.\n#\n# %view -> the command you type will be piped into mc's internal file viewer\n#\tif you type only the %view and no command, viewer will load %f file\n#\tinstead (i.e. no piping, so it is different to %view cat %f)\n#\t%view may be directly followed by {} with a list of any of\n#\tascii (Ascii mode), hex (Hex mode), nroff (color highlighting for\n#\ttext using backspace for bold and underscore) and unform\n#\t(no highlighting for nroff sequences) separated by commas.\n#\n# %var -> You use it like this: %var{VAR:default}.  This macro will expand\n#       to the value of the VAR variable in the environment if it's set\n#       otherwise the value in default will be used.  This is similar to\n#       the Bourne shell ${VAR-default} construct.\n#\n# Rules are applied from top to bottom, thus the order is important.\n# If some actions are missing, search continues as if this target didn't\n# match (i.e. if a file matches the first and second entry and View action\n# is missing in the first one, then on pressing F3 the View action from\n# the second entry will be used. default should catch all the actions.\n#\n# Any new entries you develop for you are always welcome if they are\n# useful on more than one system.  You can post your modifications\n# as tickets at www.midnight-commander.org\n\n\n### Changes ###\n#\n# Reorganization: 2000-05-01 Michal Svec <rebel@penguin.cz>\n\n\n### TODO ###\n#\n# Postscript\tOpen: ps2svga [gs -DEVICE=jpeg|zgv or something]\n# Images\t\tasciiview\n#\n# All X Apps\t[Nothing/Warning] if no DISPLAY\n# Not found\t[Default/Warning]\n# Empty Output\t[Default/Warning]\n# Edit:\t\tCopyOut+EDIT+CopyIn\n# Security\tCheck gzip/bzip EDIT (mktemp)\n#\n# Maybe:\tOpen/XOpen/GOpen/KOpen/... for Console/X/GNOME/KDE/etc.\n\n\n### GIT Repo ###\n# gitfs changeset\nregex/^\\[git\\]\n\tOpen=%cd %p/changesetfs://\n\tView=%cd %p/patchsetfs://\n\n### Archives ###\n\n# .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk\nregex/\\.t([gp]?z|ar\\.g?[zZ])$|\\.ipk$\n\tOpen=%cd %p/utar://\n\tView=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -\n\nregex/\\.tar\\.bz$\n\t# Open=%cd %p/utar://\n\tView=%view{ascii} bzip -dc %f 2>/dev/null | tar tvvf -\n\nregex/\\.t(ar\\.bz2|bz2?|b2)$\n\tOpen=%cd %p/utar://\n\tView=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf -\n\n# .tar.lzma, .tlz\nregex/\\.t(ar\\.lzma|lz)$\n\tOpen=%cd %p/utar://\n\tView=%view{ascii} lzma -dc %f 2>/dev/null | tar tvvf -\n\n# .tar.xz, .txz\nregex/\\.t(ar\\.xz|xz)$\n\tOpen=%cd %p/utar://\n\tView=%view{ascii} xz -dc %f 2>/dev/null | tar tvvf -\n\n# .tar.F - used in QNX\nregex/\\.tar\\.F$\n\t# Open=%cd %p/utar://\n\tView=%view{ascii} freeze -dc %f 2>/dev/null | tar tvvf -\n\n# .qpr/.qpk - QNX Neutrino package installer files\nregex/\\.(qp[rk])$\n\tOpen=%cd %p/utar://\n\tView=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -\n\n# tar\nregex/\\.(tar|TAR)$\n\tOpen=%cd %p/utar://\n\tView=%view{ascii} tar tvvf - < %f\n\n# lha\ntype/^LHa\\ .*archive\n\tOpen=%cd %p/ulha://\n\tView=%view{ascii} lha l %f\n\n# arj\nregex/\\.a(rj|[0-9][0-9])$\n\tOpen=%cd %p/uarj://\n\tView=%view{ascii} unarj l %f\n\n# cab\nregex/\\.([cC][aA][bB])$\n\tOpen=%cd %p/ucab://\n\tView=%view{ascii} cabextract -l %f\n\n# ha\nregex/\\.([Hh][Aa])$\n\tOpen=%cd %p/uha://\n\tView=%view{ascii} ha lf %f\n\n# rar\nregex/\\.[rR]([aA][rR]|[0-9][0-9])$\n\tOpen=%cd %p/urar://\n\tView=%view{ascii} rar v -c- %f\n\n# ALZip\nregex/\\.(alz|ALZ)$\n\tOpen=%cd %p/ualz://\n\tView=%view{ascii} unalz -l %f\n\n# cpio\nshell/.cpio.Z\n\tOpen=%cd %p/ucpio://\n\tView=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null\n\nshell/.cpio.gz\n\tOpen=%cd %p/ucpio://\n\tView=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null\n\nshell/.cpio\n\tOpen=%cd %p/ucpio://\n\tView=%view{ascii} cpio -itv < %f 2>/dev/null\n\n# ls-lR\nregex/(^|\\.)ls-?lR(\\.gz|Z|bz2)$\n\tOpen=%cd %p/lslR://\n\n# patch\nregex/\\.(diff|patch)(\\.bz2)$\n\tOpen=%cd %p/patchfs://\n\tView=%view{ascii} bzip2 -dc %f 2>/dev/null\n\nregex/\\.(diff|patch)(\\.(gz|Z))$\n\tOpen=%cd %p/patchfs://\n\tView=%view{ascii} gzip -dc %f 2>/dev/null\n\nregex/\\.(diff|patch)$\n\tOpen=%cd %p/patchfs://\n\tView=%view{ascii} /bin/cat %f 2>/dev/null\n\n# ar library\nregex/\\.s?a$\n\tOpen=%cd %p/uar://\n\t#Open=%view{ascii} ar tv %f\n\tView=%view{ascii} file %f && nm -C %f\n\n# trpm\nregex/\\.trpm$\n\tOpen=%cd %p/trpm://\n\tView=%view{ascii} rpm -qivl --scripts `basename %p .trpm`\n\n# RPM packages (SuSE uses *.spm for source packages)\nregex/\\.(src\\.rpm|spm)$\n\tOpen=%cd %p/rpm://\n\tView=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM=\"rpm --nosignature\" ; else RPM=\"rpm\" ; fi ; $RPM -qivlp --scripts %f\n\nregex/\\.rpm$\n\tOpen=%cd %p/rpm://\n\tView=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM=\"rpm --nosignature\" ; else RPM=\"rpm\" ; fi ; $RPM -qivlp --scripts %f\n\n# deb\nregex/\\.u?deb$\n\tOpen=%cd %p/deb://\n\tView=%view{ascii} dpkg-deb -I %f && echo && dpkg-deb -c %f\n\n# dpkg\nshell/.debd\n        Open=%cd %p/debd://\n        View=%view{ascii} dpkg -s `echo %p | sed 's/\\([0-9a-z.-]*\\).*/\\1/'`\n# apt\nshell/.deba\n        Open=%cd %p/deba://\n        View=%view{ascii} apt-cache show `echo %p | sed 's/\\([0-9a-z.-]*\\).*/\\1/'`\n\n# ISO9660\nregex/\\.([iI][sS][oO])$\n\tOpen=%cd %p/iso9660://\n\tView=%view{ascii} isoinfo -l -i %f\n\n# 7zip archives (they are not man pages)\nregex/\\.(7z|7Z)$\n\tOpen=%cd %p/u7z://\n\tView=%view{ascii} 7za l %f 2>/dev/null\n\n# Mailboxes\ntype/^ASCII\\ mail\\ text\n\tOpen=%cd %p/mailfs://\n\n\n### Sources ###\n\n# C\nshell/.c\n\tInclude=editor\n\n# Fortran\nshell/.f\n\tInclude=editor\n\n# Header\nregex/\\.(h|hpp)$\n\tInclude=editor\n\n# Asm\nshell/.s\n\tInclude=editor\n\n# C++\nregex/\\.(C|cc|cpp)$\n\tInclude=editor\n\ninclude/editor\n\tOpen=%var{EDITOR:vi} %f\n\n# .so libraries\nregex/\\.(so|so\\.[0-9\\.]*)$\n\tView=%view{ascii} file %f && nm -C -D %f\n\n# Object\ntype/^ELF\n\t#Open=%var{PAGER:more} %f\n\tView=%view{ascii} file %f && nm -C %f\n\n### Documentation ###\n\n# Texinfo\nregex/\\.(te?xi|texinfo)$\n\n# GNU Info page\ntype/^Info\\ text\n\tOpen=info -f %f\n\nshell/.info\n\tOpen=info -f %f\n\n# Exception: .3gp are video files not manual pages\nregex/\\.(3[gG][pP])$\n\tInclude=video\n\n# Manual page\nregex/(([^0-9]|^[^\\.]*)\\.([1-9][A-Za-z]*|[ln])|\\.man)$\n\tOpen=case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}\n\tView=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff -c -Tlatin1 -mandoc ;; esac\n\n# Perl pod page\nshell/.pod\n\tOpen=pod2man %f | nroff -c -Tlatin1 -mandoc | %var{PAGER:more}\n\tView=%view{ascii,nroff} pod2man %f | nroff -c -Tlatin1 -mandoc\n\n# Troff with me macros.\n# Exception - \"read.me\" is not a nroff file.\nshell/read.me\n\tOpen=\n\tView=\n\nshell/.me\n\tOpen=nroff -c -Tlatin1 -me %f | %var{PAGER:more}\n\tView=%view{ascii,nroff} nroff -c -Tlatin1 -me %f\n\n# Troff with ms macros.\nshell/.ms\n\tOpen=nroff -c -Tlatin1 -ms %f | %var{PAGER:more}\n\tView=%view{ascii,nroff} nroff -c -Tlatin1 -ms %f\n\n# Manual page - compressed\nregex/([^0-9]|^[^\\.]*)\\.([1-9][A-Za-z]*|[ln])\\.g?[Zz]$\n\tOpen=case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}\n\tView=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac\n\nregex/([^0-9]|^[^\\.]*)\\.([1-9][A-Za-z]*|[ln])\\.bz$\n\tOpen=case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}\n\tView=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac\n\nregex/([^0-9]|^[^\\.]*)\\.([1-9][A-Za-z]*|[ln])\\.bz2$\n\tOpen=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}\n\tView=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff -c -Tlatin1 -mandoc ;; esac\n\nregex/([^0-9]|^[^\\.]*)\\.([1-9][A-Za-z]*|[ln])\\.lzma$\n\tOpen=case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}\n\tView=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff -c -Tlatin1 -mandoc ;; esac\n\nregex/([^0-9]|^[^\\.]*)\\.([1-9][A-Za-z]*|[ln])\\.xz$\n\tOpen=case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}\n\tView=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff -c -Tlatin1 -mandoc ;; esac\n\n# CHM\nregex/\\.(chm|CHM)$\n\tOpen=which kchmviewer > /dev/null 2>&1 && (kchmviewer %f &) || (xchm %f &)\n\n### Images ###\n\ntype/^GIF\n\tInclude=image\n\ntype/^JPEG\n\tView=%view{ascii} identify %f; test -x /usr/bin/exif && echo && exif %f 2>/dev/null\n\tInclude=image\n\ntype/^PC\\ bitmap\n\tInclude=image\n\ntype/^PNG\n\tInclude=image\n\ntype/^TIFF\n\tInclude=image\n\ntype/^PBM\n\tInclude=image\n\ntype/^PGM\n\tInclude=image\n\ntype/^PPM\n\tInclude=image\n\ntype/^Netpbm\n\tInclude=image\n\nshell/.xcf\n\tOpen=(gimp %f &)\n\nshell/.xbm\n\tOpen=bitmap %f\n\nshell/.xpm\n\tInclude=image\n\tView=sxpm %f\n\nshell/.ico\n\tInclude=image\n\ninclude/image\n\tOpen=if [ \"$DISPLAY\" = \"\" ]; then zgv %f; else (gqview %f &); fi\n\tView=%view{ascii} identify %f\n\t#View=%view{ascii} asciiview %f\n\n\n### Sound files ###\n\nregex/\\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$\n       Open=if [ \"$DISPLAY\" = \"\" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi\n\nregex/\\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$\n       Open=mikmod %f\n       #Open=tracker %f\n\nregex/\\.([wW][aA][wW]22)$\n       Open=vplay -s 22 %f\n\nregex/\\.([mM][pP]3)$\n\tOpen=if [ \"$DISPLAY\" = \"\" ]; then mpg123 %f; else (xmms %f >/dev/null 2>&1 &); fi\n\tView=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'\n\nregex/\\.([oO][gG][gG|aA|vV|xX])$\n\tOpen=if [ \"$DISPLAY\" = \"\" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi\n\tView=%view{ascii} ogginfo %s\n\nregex/\\.([sS][pP][xX]|[fF][lL][aA][cC])$\n\tOpen=if [ \"$DISPLAY\" = \"\" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi\n\nregex/\\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$\n\tOpen=timidity %f\n\nregex/\\.([wW][mM][aA])$\n\tOpen=mplayer -vo null %f\n\tView=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f\n\n\n### Play lists ###\n\nregex/\\.([mM]3[uU]|[pP][lL][sS])$\n\tOpen=if [ -z \"$DISPLAY\" ]; then mplayer -vo null -playlist %f; else (xmms -p %f >/dev/null 2>&1 &); fi\n\n\n### Video ###\n\nregex/\\.([aA][vV][iI])$\n\tInclude=video\n\nregex/\\.([aA][sS][fFxX])$\n\tInclude=video\n\nregex/\\.([dD][iI][vV][xX])$\n\tInclude=video\n\nregex/\\.([mM][kK][vV])$\n\tInclude=video\n\nregex/\\.([mM][oO][vV]|[qQ][tT])$\n\tInclude=video\n\nregex/\\.([mM][pP]4|[mM][pP][eE]?[gG])$\n\tInclude=video\n\n# MPEG-2 TS container + H.264 codec\nregex/\\.([mM][tT][sS])$\n\tInclude=video\n\nregex/\\.([vV][oO][bB])$\n\tInclude=video\n\nregex/\\.([wW][mM][vV])$\n\tInclude=video\n\nregex/\\.([fF][lL][iIcCvV])$\n\tInclude=video\n\nregex/\\.([oO][gG][mM])$\n\tInclude=video\n\nregex/\\.([rR][aA]?[mM])$\n\tOpen=(realplay %f >/dev/null 2>&1 &)\n\ninclude/video\n\tOpen=(mplayer %f >/dev/null 2>&1 &)\n\t#Open=(gtv %f >/dev/null 2>&1 &)\n\t#Open=(xanim %f >/dev/null 2>&1 &)\n\n\n### Documents ###\n\n# Postscript\ntype/^PostScript\n\tOpen=(gv %f &)\n\tView=%view{ascii} ps2ascii %f\n\n# PDF\ntype/^PDF\n\tOpen=(xpdf %f &)\n\t#Open=(acroread %f &)\n\t#Open=(ghostview %f &)\n\tView=%view{ascii} pdftotext %f -\n\n# The following code very ugly and should not be taken as example.\n# It should be cleaned up when the new format of mc.ext is developed.\n\n# html\nregex/\\.([hH][tT][mM][lL]?)$\n\tOpen=(if test -n \"\" && test -n \"$DISPLAY\"; then ( file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null\n\tView=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f\n\n# StarOffice 5.2\nshell/.sdw\n\tOpen=(ooffice %f &)\n\n# StarOffice 6 and OpenOffice.org formats\nregex/\\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$\n\tOpen=(ooffice %f &)\n\tView=%view{ascii} odt2txt %f\n\n# AbiWord\nshell/.abw\n\tOpen=(abiword %f &)\n\n# Microsoft Word Document\nregex/\\.([Dd][oO][cCtT]|[Ww][rR][iI])$\n\tOpen=(abiword %f >/dev/null 2>&1 &)\n\tView=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f\ntype/^Microsoft\\ Word\n\tOpen=(abiword %f >/dev/null 2>&1 &)\n\tView=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f\n\n# RTF document\nregex/\\.([rR][tT][fF])$\n\tOpen=(abiword %f >/dev/null 2>&1 &)\n\n# Microsoft Excel Worksheet\nregex/\\.([xX][lL][sSwW])$\n\tOpen=(gnumeric %f >/dev/null 2>&1 &)\n\tView=%view{ascii} xls2csv %f || strings %f\ntype/^Microsoft\\ Excel\n\tOpen=(gnumeric %f >/dev/null 2>&1 &)\n\tView=%view{ascii} xls2csv %f || strings %f\n\n# Use OpenOffice.org to open any MS Office documents\ntype/^Microsoft\\ Office\\ Document\n\tOpen=(ooffice %f &)\n\n# Framemaker\ntype/^FrameMaker\n\tOpen=fmclient -f %f\n\n# DVI\nregex/\\.([dD][vV][iI])$\n\tOpen=if [ x$DISPLAY = x ]; then dvisvga %f; else (xdvi %f &); fi\n\tView=%view{ascii} dvi2tty %f\n\n# TeX\nregex/\\.([Tt][Ee][Xx])$\n\tInclude=editor\n\n# DjVu\nregex/\\.(djvu|DJVU)$\n\tOpen=djview %f &\n\n### Miscellaneous ###\n\n# Makefile\nregex/[Mm]akefile$\n\tOpen=make -f %f %{Enter parameters}\n\n# Imakefile\nshell/Imakefile\n\tOpen=xmkmf -a\n\n# Makefile.PL (MakeMaker)\nregex/^Makefile.(PL|pl)$\n\tOpen=%var{PERL:perl} %f\n\n# dbf\nregex/\\.([dD][bB][fF])$\n       Open=%view{ascii} dbview %f\n       View=%view{ascii} dbview -b %f\n\n# REXX script\nregex/\\.(rexx?|cmd)$\n       Open=rexx %f %{Enter parameters};echo \"Press ENTER\";read y\n\n# Disk images for Commodore computers (VIC20, C64, C128)\nregex/\\.(d64|D64)$\n\tOpen=%cd %p/uc1541://\n\tView=%view{ascii} c1541 %f -list\n\tExtract=c1541 %f -extract\n\n# Glade, a user interface designer for GTK+ and GNOME\nregex/\\.([Gg][Ll][Aa][Dd][Ee])$\n\tOpen=if glade-3 --version >/dev/null 2>&1; then (glade-3 %f >/dev/null 2>&1 &); else (glade-2 %f >/dev/null 2>&1 &); fi\n\n# Gettext Catalogs\nshell/.mo\n\tView=%view{ascii} msgunfmt %f || cat %f\n\n# lyx\nregex/\\.(lyx|LYX)$\n\tOpen=lyx %f\n\tView=%view{ascii} lyxcat %f\n\n# torrent\nregex/\\.([tT][oO][rR][rR][eE][nN][tT])$\n\tView=%view{ascii} ctorrent -x %f 2>/dev/null\n\n### Plain compressed files ###\n\n# ace\nregex/\\.(ace|ACE)$\n\tOpen=%cd %p/uace://\n\tView=%view{ascii} unace l %f\n\tExtract=unace x %f\n\n# arc\nregex/\\.(arc|ARC)$\n\tOpen=%cd %p/uarc://\n\tView=%view{ascii} arc l %f\n\tExtract=arc x %f '*'\n\tExtract (with flags)=I=%{Enter any Arc flags:}; if test -n \"$I\"; then arc x $I %f; fi\n\n# zip\ntype/^([Zz][Ii][Pp])\\ archive\n\tOpen=%cd %p/uzip://\n\tView=%view{ascii} unzip -v %f\n\n# zoo\nregex/\\.([Zz][Oo][Oo])$\n\tOpen=%cd %p/uzoo://\n\tView=%view{ascii} zoo l %f\n\n# gzip\ntype/^gzip\n\tOpen=gzip -dc %f | %var{PAGER:more}\n\tView=%view{ascii} gzip -dc %f 2>/dev/null\n\nregex/\\.(gz|Z)$\n\tView=%view{ascii} gzip -dc %f 2>/dev/null\n\n# bzip2\ntype/^bzip2\n\tOpen=bzip2 -dc %f | %var{PAGER:more}\n\tView=%view{ascii} bzip2 -dc %f 2>/dev/null\n\nregex/\\.bz2?$\n\tView=%view{ascii} bzip2 -dc %f 2>/dev/null\n\n# bzip\ntype/^bzip\n\tOpen=bzip -dc %f | %var{PAGER:more}\n\tView=%view{ascii} bzip -dc %f 2>/dev/null\n\n# compress\ntype/^compress\n\tOpen=gzip -dc %f | %var{PAGER:more}\n\tView=%view{ascii} gzip -dc %f 2>/dev/null\n\n# lzma\nregex/\\.lzma$\n\tOpen=lzma -dc %f | %var{PAGER:more}\n\tView=%view{ascii} lzma -dc %f 2>/dev/null\n\n# xz\nregex/\\.xz$\n\tOpen=xz -dc %f | %var{PAGER:more}\n\tView=%view{ascii} xz -dc %f 2>/dev/null\n\n### Default ###\n\n# Default target for anything not described above\ndefault/*\n\tOpen=\n\tView=\n\n\n### EOF ###\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/etc/mc.keymap",
    "content": "[main]\nHelp = f1\nUserMenu = f2\nView = f3\nViewFile =\nEdit = f4\nEditForceInternal =\nCopy = f5\nMove = f6\nMakeDir = f7\nDelete = f8\nMenu = f9\nQuit = f10\nMenuLastSelected = f19\nQuitQuiet = f20\nFind = alt-question\nCdQuick = alt-c\nHotList = ctrl-backslash\nReread = ctrl-r\nDirSize = ctrl-space\nSuspend = ctrl-z\nSwap = ctrl-u\nHistory = alt-h\nPanelListing =\nPanelListingSwitch = alt-t\nPanelListingChange =\nShowHidden = alt-dot\nSplitVertHoriz = alt-comma\nShell = ctrl-o\nPutCurrentPath = alt-a\nPutOtherPath = alt-shift-a\nViewFiltered = alt-exclamation\nSelect = kpplus\nUnselect = kpminus\nSelectInvert = kpasterisk\nScreenList = alt-prime\nOptionsLayout =\nOptionsPanel =\nOptionsConfirm =\nOptionsDisplayBits =\nOptionsVfs =\nLearnKeys =\nSaveSetup =\nEditExtensionsFile =\nEditFileHighlightFile =\nFilter =\nConnectFish =\nConnectFtp =\nConnectSmb =\nUndelete =\nExtendedKeyMap = ctrl-x\n\n[main:xmap]\nChangeMode = c\nChangeOwn = o\nCompareDirs = d\nCompareFiles = ctrl-d\nHotListAdd = h\nLinkSymbolicEdit = ctrl-s\nLink = l\nLinkSymbolic = s\nLinkSymbolicRelative = v\nPanelInfo = i\nPanelQuickView = q\nExternalPanelize = exclamation\nVfsList = a\nJobs = j\nPutCurrentPath = p\nPutOtherPath = ctrl-p\nPutCurrentTagged = t\nPutOtherTagged = ctrl-t\nPutCurrentLink = r\nPutOtherLink = ctrl-r\n\n[panel]\nSearch = ctrl-s; alt-s\nMark = insert; ctrl-t\nMarkUp = shift-up\nMarkDown = shift-down\nMarkLeft =\nMarkRight =\nDown = down; ctrl-n\nUp = up; ctrl-p\nLeft = left\nRight = right\nPageUp = pgup; alt-v\nPageDown = pgdn; ctrl-v\nEnter = enter\nPanelOtherCd = alt-o\nPanelOtherCdLink = alt-l\nViewRaw = f13\nEditNew = f14\nCopySingle = f15\nMoveSingle = f16\nDeleteSingle = f18\nSelect = alt-plus\nUnselect = alt-minus\nSelectInvert = alt-asterisk\nCdChild = ctrl-pgdn\nCdParent = ctrl-pgup\nCdParentSmart =\nHistory = alt-shift-h\nHistoryNext = alt-u\nHistoryPrev = alt-y\nBottomOnScreen = alt-j\nMiddleOnScreen = alt-r\nTopOnScreen = alt-g\nPanelOtherSync = alt-i\nSelectCodepage = alt-e\nTop = alt-lt; home; a1\nBottom = alt-gt; end; c1\nSort =\nSortPrev =\nSortNext =\nSortReverse =\nSortByName =\nSortByExt =\nSortBySize =\nSortByMTime =\n\n[dialog]\nOk = enter\nCancel = f10; esc; ctrl-g\nUp = left; up\n#Left = left; up\nDown = right; down\n#Right = right; down\nHelp = f1\nSuspend = ctrl-z\nRefresh = ctrl-l\nScreenList = alt-prime\nScreenNext = alt-rbrace\nScreenPrev = alt-lbrace\n\n[input]\nHome = ctrl-a; alt-lt; home; a1\nEnd = ctrl-e; alt-gt; end; c1\nLeft = left; alt-left; ctrl-b\nRight = right; alt-right; ctrl-f\nWordLeft = ctrl-left; alt-b\nWordRight = ctrl-right; alt-f\nBackspace = backspace; ctrl-h\nDelete = delete; ctrl-d\nDeleteToWordBegin = alt-backspace\nDeleteToWordEnd = alt-d\nMark =\nRemove = ctrl-w\nCut =\nStore = alt-w\nPaste =\nYank = ctrl-y\nDeleteToEnd = ctrl-k\nHistoryPrev = alt-p; ctrl-down\nHistoryNext = alt-n; ctrl-up\nHistory = alt-h\nComplete = alt-tab\nClear =\nMarkLeft = shift-left\nMarkRight = shift-right\nMarkToWordBegin = ctrl-shift-left\nMarkToWordEnd = ctrl-shift-right\nMarkToHome = shift-home\nMarkToEnd = shift-end\n\n[listbox]\nUp = up; ctrl-p\nDown = down; ctrl-n\nTop = home; alt-lt; a1\nBottom = end; alt-gt; c1\nPageUp = pgup; alt-v\nPageDown = pgdn; ctrl-v\nDelete = delete; d\nClear = shift-delete; shift-d\n\n[tree]\nHelp = f1\nReread = f2; ctrl-r\nForget = f3\nToggleNavigation = f4\nCopy = f5\nMove = f6\nUp = up; ctrl-p\nDown = down; ctrl-n\nLeft = left\nRight = right\nTop = home; alt-lt; a1\nBottom = end; alt-gt; c1\nPageUp = pgup; alt-v\nPageDown = pgdn; ctrl-v\nEnter = enter\nSearch = ctrl-s; alt-s\nDelete = f8; delete\n\n[help]\nHelp = f1\nIndex = f2; c\nBack = f3; left; l\nQuit = f10; esc\nUp = up; ctrl-p\nDown = down; ctrl-n\nPageDown = f; space; pgdn; ctrl-v\nPageUp = b; pgup; alt-v; backspace\nHalfPageDown = d\nHalfPageUp = u\nTop = home; ctrl-home; ctrl-pgup; a1; alt-lt; g\nBottom = end; ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g\nEnter = right; enter\nLinkNext = tab\nLinkPrev = alt-tab\nNodeNext = n\nNodePrev = p\n\n[editor]\nStore = ctrl-insert\nPaste = shift-insert\nCut = shift-delete\nUp = up\nDown = down\nLeft = left\nRight = right\nWordLeft = ctrl-left; ctrl-z\nWordRight = ctrl-right; ctrl-x\nEnter = enter\nReturn = shift-enter\nBackSpace = backspace; ctrl-h\nDelete = delete; ctrl-d\nPageUp = pgup\nPageDown = pgdn\nHome = home\nEnd = end\nTab = tab\nUndo = ctrl-u\nRedo = alt-r\nTop = ctrl-home; alt-lt\nBottom = ctrl-end; alt-gt\nScrollUp = ctrl-up\nScrollDown = ctrl-down\nTopOnScreen = ctrl-pgup\nBottomOnScreen = ctrl-pgdn\nDeleteToWordBegin = alt-backspace\nDeleteToWordEnd = alt-d\nDeleteLine = ctrl-y\nDeleteToEnd = ctrl-k\nDeleteToHome =\nParagraphUp =\nParagraphDown =\nSave = f2\nEditFile =\nEditNew = ctrl-n\nSaveAs = f12; ctrl-f2\nMark = f3\nCopy = f5\nMove = f6\nRemove = f8\nMarkLine =\nMarkWord =\nMarkAll =\nUnmark =\nSearch = f7\nSearchContinue = f17\nBlockShiftLeft =\nBlockShiftRight =\nMarkPageUp = shift-pgup\nMarkPageDown = shift-pgdn\nMarkLeft = shift-left\nMarkRight = shift-right\nMarkToWordBegin = ctrl-shift-left\nMarkToWordEnd = ctrl-shift-right\nMarkUp = shift-up\nMarkDown = shift-down\nMarkToHome = shift-home\nMarkToEnd = shift-end\nMarkToFileBegin = ctrl-shift-home\nMarkToFileEnd = ctrl-shift-end\nMarkToPageBegin  = ctrl-shift-pgup\nMarkToPageEnd = ctrl-shift-pgdn\nMarkScrollUp = ctrl-shift-up\nMarkScrollDown = ctrl-shift-down\nMarkParagraphUp =\nMarkParagraphDown =\nMarkColumnPageUp = alt-pgup\nMarkColumnPageDown = alt-pgdn\nMarkColumnLeft = alt-left\nMarkColumnRight = alt-right\nMarkColumnUp = alt-up\nMarkColumnDown = alt-down\nMarkColumnScrollUp =\nMarkColumnScrollDown =\nMarkColumnParagraphUp =\nMarkColumnParagraphDown =\nBlockSave = ctrl-f\nMarkColumn = f13\nReplace = f4\nReplaceContinue = f14\nComplete = alt-tab\nInsertFile = f15\nQuit = f10\nInsertOverwrite = insert\nHelp = f1\nDate =\nRefresh = ctrl-l\nGoto = alt-l\nSort = alt-t\nMail = alt-m\nParagraphFormat = alt-p\nMatchBracket = alt-b\nExternalCommand = alt-u\nUserMenu = f11\nMenu = f9\nBookmark = alt-k\nBookmarkFlush = alt-o\nBookmarkNext = alt-j\nBookmarkPrev = alt-i\nHistory =\nShell = ctrl-o\nInsertLiteral = ctrl-q\nMacroStartRecord =\nMacroStopRecord =\nMacroStartStopRecord = ctrl-r\nMacroDelete =\nShowNumbers = alt-n\nShowTabTws = alt-underline\nSyntaxOnOff = ctrl-s\nSyntaxChoose =\nShowMargin =\nFind = alt-enter\nFilePrev = alt-minus\nFileNext = alt-plus\nRepeatStartStopRecord =\nSelectCodepage = alt-e\nOptions =\nOptionsSaveMode =\nLearnKeys =\nExtendedKeyMap =\n\n[viewer]\nHelp = f1\nWrapMode = f2\nQuit = f3; f10; q; esc\nHexMode = f4\nGoto = f5\nSearch = f7; question; slash\nSearchContinue = ctrl-r; ctrl-s; f17; n\nMagicMode = f8\nNroffMode = f9\nHome = ctrl-a\nEnd = ctrl-e\nLeft = h; left\nRight = l; right\nLeftQuick = ctrl-left\nRightQuick = ctrl-right\nUp = k; y; insert; up; ctrl-p\nDown = j; e; delete; down; enter; ctrl-n\nPageDown = f; space; pgdn; ctrl-v\nPageUp = b; pgup; alt-v; backspace\nHalfPageDown = d\nHalfPageUp = u\nTop = home; ctrl-home; ctrl-pgup; a1; alt-lt; g\nBottom = end; ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g\nBookmarkGoto = m\nBookmark = r\nFileNext = ctrl-f\nFilePrev = ctrl-b\nSelectCodepage = alt-e\nShell = ctrl-o\nRuler = alt-r\n\n[viewer:hex]\nHelp = f1\nHexEditMode = f2\nQuit = f3; f10; q; esc\nHexMode = f4\nGoto = f5\nSave = f6\nSearch = f7; question; slash\nSearchContinue = ctrl-r; ctrl-s; f17; n\nMagicMode = f8\nNroffMode = f9\nToggleNavigation = tab\nHome = ctrl-a; home\nEnd = ctrl-e; end\nLeft = b; left\nRight = f; right\nUp = k; y; up\nDown = j; delete; down\nPageDown = pgdn; ctrl-v\nPageUp = pgup; alt-v\nTop = ctrl-home; ctrl-pgup; a1; alt-lt; g\nBottom = ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g\n\n[diffviewer]\nShowSymbols = alt-s; s\nShowNumbers = alt-n; l\nSplitFull = f\nSplitEqual = equal\nSplitMore = gt\nSplitLess = lt\nTab2 = 2\nTab3 = 3\nTab4 = 4\nTab8 = 8\nSwap = ctrl-u\nRedo = ctrl-r\nHunkNext = n; enter; space\nHunkPrev = p; backspace\nGoto = g; shift-g\nSave = f2\nEdit = f4\nEditOther = f14\nMerge = f5\nSearch = f7\nSearchContinue = f17\nOptions = f9\nTop = ctrl-home\nBottom = ctrl-end\nDown = down\nUp = up\nLeftQuick = ctrl-left\nRightQuick = ctrl-right\nLeft = left\nRight = right\nPageDown = pgdn\nPageUp = pgup\nHome = home\nEnd = end\nHelp = f1\nQuit = f10; q; shift-q; esc\nShell = ctrl-o\nSelectCodepage = alt-e\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/etc/mc.keymap.default",
    "content": "[main]\nHelp = f1\nUserMenu = f2\nView = f3\nViewFile =\nEdit = f4\nEditForceInternal =\nCopy = f5\nMove = f6\nMakeDir = f7\nDelete = f8\nMenu = f9\nQuit = f10\nMenuLastSelected = f19\nQuitQuiet = f20\nFind = alt-question\nCdQuick = alt-c\nHotList = ctrl-backslash\nReread = ctrl-r\nDirSize = ctrl-space\nSuspend = ctrl-z\nSwap = ctrl-u\nHistory = alt-h\nPanelListing =\nPanelListingSwitch = alt-t\nPanelListingChange =\nShowHidden = alt-dot\nSplitVertHoriz = alt-comma\nShell = ctrl-o\nPutCurrentPath = alt-a\nPutOtherPath = alt-shift-a\nViewFiltered = alt-exclamation\nSelect = kpplus\nUnselect = kpminus\nSelectInvert = kpasterisk\nScreenList = alt-prime\nOptionsLayout =\nOptionsPanel =\nOptionsConfirm =\nOptionsDisplayBits =\nOptionsVfs =\nLearnKeys =\nSaveSetup =\nEditExtensionsFile =\nEditFileHighlightFile =\nFilter =\nConnectFish =\nConnectFtp =\nConnectSmb =\nUndelete =\nExtendedKeyMap = ctrl-x\n\n[main:xmap]\nChangeMode = c\nChangeOwn = o\nCompareDirs = d\nCompareFiles = ctrl-d\nHotListAdd = h\nLinkSymbolicEdit = ctrl-s\nLink = l\nLinkSymbolic = s\nLinkSymbolicRelative = v\nPanelInfo = i\nPanelQuickView = q\nExternalPanelize = exclamation\nVfsList = a\nJobs = j\nPutCurrentPath = p\nPutOtherPath = ctrl-p\nPutCurrentTagged = t\nPutOtherTagged = ctrl-t\nPutCurrentLink = r\nPutOtherLink = ctrl-r\n\n[panel]\nSearch = ctrl-s; alt-s\nMark = insert; ctrl-t\nMarkUp = shift-up\nMarkDown = shift-down\nMarkLeft =\nMarkRight =\nDown = down; ctrl-n\nUp = up; ctrl-p\nLeft = left\nRight = right\nPageUp = pgup; alt-v\nPageDown = pgdn; ctrl-v\nEnter = enter\nPanelOtherCd = alt-o\nPanelOtherCdLink = alt-l\nViewRaw = f13\nEditNew = f14\nCopySingle = f15\nMoveSingle = f16\nDeleteSingle = f18\nSelect = alt-plus\nUnselect = alt-minus\nSelectInvert = alt-asterisk\nCdChild = ctrl-pgdn\nCdParent = ctrl-pgup\nCdParentSmart =\nHistory = alt-shift-h\nHistoryNext = alt-u\nHistoryPrev = alt-y\nBottomOnScreen = alt-j\nMiddleOnScreen = alt-r\nTopOnScreen = alt-g\nPanelOtherSync = alt-i\nSelectCodepage = alt-e\nTop = alt-lt; home; a1\nBottom = alt-gt; end; c1\nSort =\nSortPrev =\nSortNext =\nSortReverse =\nSortByName =\nSortByExt =\nSortBySize =\nSortByMTime =\n\n[dialog]\nOk = enter\nCancel = f10; esc; ctrl-g\nUp = left; up\n#Left = left; up\nDown = right; down\n#Right = right; down\nHelp = f1\nSuspend = ctrl-z\nRefresh = ctrl-l\nScreenList = alt-prime\nScreenNext = alt-rbrace\nScreenPrev = alt-lbrace\n\n[input]\nHome = ctrl-a; alt-lt; home; a1\nEnd = ctrl-e; alt-gt; end; c1\nLeft = left; alt-left; ctrl-b\nRight = right; alt-right; ctrl-f\nWordLeft = ctrl-left; alt-b\nWordRight = ctrl-right; alt-f\nBackspace = backspace; ctrl-h\nDelete = delete; ctrl-d\nDeleteToWordBegin = alt-backspace\nDeleteToWordEnd = alt-d\nMark =\nRemove = ctrl-w\nCut =\nStore = alt-w\nPaste =\nYank = ctrl-y\nDeleteToEnd = ctrl-k\nHistoryPrev = alt-p; ctrl-down\nHistoryNext = alt-n; ctrl-up\nHistory = alt-h\nComplete = alt-tab\nClear =\nMarkLeft = shift-left\nMarkRight = shift-right\nMarkToWordBegin = ctrl-shift-left\nMarkToWordEnd = ctrl-shift-right\nMarkToHome = shift-home\nMarkToEnd = shift-end\n\n[listbox]\nUp = up; ctrl-p\nDown = down; ctrl-n\nTop = home; alt-lt; a1\nBottom = end; alt-gt; c1\nPageUp = pgup; alt-v\nPageDown = pgdn; ctrl-v\nDelete = delete; d\nClear = shift-delete; shift-d\n\n[tree]\nHelp = f1\nReread = f2; ctrl-r\nForget = f3\nToggleNavigation = f4\nCopy = f5\nMove = f6\nUp = up; ctrl-p\nDown = down; ctrl-n\nLeft = left\nRight = right\nTop = home; alt-lt; a1\nBottom = end; alt-gt; c1\nPageUp = pgup; alt-v\nPageDown = pgdn; ctrl-v\nEnter = enter\nSearch = ctrl-s; alt-s\nDelete = f8; delete\n\n[help]\nHelp = f1\nIndex = f2; c\nBack = f3; left; l\nQuit = f10; esc\nUp = up; ctrl-p\nDown = down; ctrl-n\nPageDown = f; space; pgdn; ctrl-v\nPageUp = b; pgup; alt-v; backspace\nHalfPageDown = d\nHalfPageUp = u\nTop = home; ctrl-home; ctrl-pgup; a1; alt-lt; g\nBottom = end; ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g\nEnter = right; enter\nLinkNext = tab\nLinkPrev = alt-tab\nNodeNext = n\nNodePrev = p\n\n[editor]\nStore = ctrl-insert\nPaste = shift-insert\nCut = shift-delete\nUp = up\nDown = down\nLeft = left\nRight = right\nWordLeft = ctrl-left; ctrl-z\nWordRight = ctrl-right; ctrl-x\nEnter = enter\nReturn = shift-enter\nBackSpace = backspace; ctrl-h\nDelete = delete; ctrl-d\nPageUp = pgup\nPageDown = pgdn\nHome = home\nEnd = end\nTab = tab\nUndo = ctrl-u\nRedo = alt-r\nTop = ctrl-home; alt-lt\nBottom = ctrl-end; alt-gt\nScrollUp = ctrl-up\nScrollDown = ctrl-down\nTopOnScreen = ctrl-pgup\nBottomOnScreen = ctrl-pgdn\nDeleteToWordBegin = alt-backspace\nDeleteToWordEnd = alt-d\nDeleteLine = ctrl-y\nDeleteToEnd = ctrl-k\nDeleteToHome =\nParagraphUp =\nParagraphDown =\nSave = f2\nEditFile =\nEditNew = ctrl-n\nSaveAs = f12; ctrl-f2\nMark = f3\nCopy = f5\nMove = f6\nRemove = f8\nMarkLine =\nMarkWord =\nMarkAll =\nUnmark =\nSearch = f7\nSearchContinue = f17\nBlockShiftLeft =\nBlockShiftRight =\nMarkPageUp = shift-pgup\nMarkPageDown = shift-pgdn\nMarkLeft = shift-left\nMarkRight = shift-right\nMarkToWordBegin = ctrl-shift-left\nMarkToWordEnd = ctrl-shift-right\nMarkUp = shift-up\nMarkDown = shift-down\nMarkToHome = shift-home\nMarkToEnd = shift-end\nMarkToFileBegin = ctrl-shift-home\nMarkToFileEnd = ctrl-shift-end\nMarkToPageBegin  = ctrl-shift-pgup\nMarkToPageEnd = ctrl-shift-pgdn\nMarkScrollUp = ctrl-shift-up\nMarkScrollDown = ctrl-shift-down\nMarkParagraphUp =\nMarkParagraphDown =\nMarkColumnPageUp = alt-pgup\nMarkColumnPageDown = alt-pgdn\nMarkColumnLeft = alt-left\nMarkColumnRight = alt-right\nMarkColumnUp = alt-up\nMarkColumnDown = alt-down\nMarkColumnScrollUp =\nMarkColumnScrollDown =\nMarkColumnParagraphUp =\nMarkColumnParagraphDown =\nBlockSave = ctrl-f\nMarkColumn = f13\nReplace = f4\nReplaceContinue = f14\nComplete = alt-tab\nInsertFile = f15\nQuit = f10\nInsertOverwrite = insert\nHelp = f1\nDate =\nRefresh = ctrl-l\nGoto = alt-l\nSort = alt-t\nMail = alt-m\nParagraphFormat = alt-p\nMatchBracket = alt-b\nExternalCommand = alt-u\nUserMenu = f11\nMenu = f9\nBookmark = alt-k\nBookmarkFlush = alt-o\nBookmarkNext = alt-j\nBookmarkPrev = alt-i\nHistory =\nShell = ctrl-o\nInsertLiteral = ctrl-q\nMacroStartRecord =\nMacroStopRecord =\nMacroStartStopRecord = ctrl-r\nMacroDelete =\nShowNumbers = alt-n\nShowTabTws = alt-underline\nSyntaxOnOff = ctrl-s\nSyntaxChoose =\nShowMargin =\nFind = alt-enter\nFilePrev = alt-minus\nFileNext = alt-plus\nRepeatStartStopRecord =\nSelectCodepage = alt-e\nOptions =\nOptionsSaveMode =\nLearnKeys =\nExtendedKeyMap =\n\n[viewer]\nHelp = f1\nWrapMode = f2\nQuit = f3; f10; q; esc\nHexMode = f4\nGoto = f5\nSearch = f7; question; slash\nSearchContinue = ctrl-r; ctrl-s; f17; n\nMagicMode = f8\nNroffMode = f9\nHome = ctrl-a\nEnd = ctrl-e\nLeft = h; left\nRight = l; right\nLeftQuick = ctrl-left\nRightQuick = ctrl-right\nUp = k; y; insert; up; ctrl-p\nDown = j; e; delete; down; enter; ctrl-n\nPageDown = f; space; pgdn; ctrl-v\nPageUp = b; pgup; alt-v; backspace\nHalfPageDown = d\nHalfPageUp = u\nTop = home; ctrl-home; ctrl-pgup; a1; alt-lt; g\nBottom = end; ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g\nBookmarkGoto = m\nBookmark = r\nFileNext = ctrl-f\nFilePrev = ctrl-b\nSelectCodepage = alt-e\nShell = ctrl-o\nRuler = alt-r\n\n[viewer:hex]\nHelp = f1\nHexEditMode = f2\nQuit = f3; f10; q; esc\nHexMode = f4\nGoto = f5\nSave = f6\nSearch = f7; question; slash\nSearchContinue = ctrl-r; ctrl-s; f17; n\nMagicMode = f8\nNroffMode = f9\nToggleNavigation = tab\nHome = ctrl-a; home\nEnd = ctrl-e; end\nLeft = b; left\nRight = f; right\nUp = k; y; up\nDown = j; delete; down\nPageDown = pgdn; ctrl-v\nPageUp = pgup; alt-v\nTop = ctrl-home; ctrl-pgup; a1; alt-lt; g\nBottom = ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g\n\n[diffviewer]\nShowSymbols = alt-s; s\nShowNumbers = alt-n; l\nSplitFull = f\nSplitEqual = equal\nSplitMore = gt\nSplitLess = lt\nTab2 = 2\nTab3 = 3\nTab4 = 4\nTab8 = 8\nSwap = ctrl-u\nRedo = ctrl-r\nHunkNext = n; enter; space\nHunkPrev = p; backspace\nGoto = g; shift-g\nSave = f2\nEdit = f4\nEditOther = f14\nMerge = f5\nSearch = f7\nSearchContinue = f17\nOptions = f9\nTop = ctrl-home\nBottom = ctrl-end\nDown = down\nUp = up\nLeftQuick = ctrl-left\nRightQuick = ctrl-right\nLeft = left\nRight = right\nPageDown = pgdn\nPageUp = pgup\nHome = home\nEnd = end\nHelp = f1\nQuit = f10; q; shift-q; esc\nShell = ctrl-o\nSelectCodepage = alt-e\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/etc/mc.keymap.emacs",
    "content": "[main]\nHelp = f1\nUserMenu = f2\nView = f3\nViewFile =\nEdit = f4\nEditForceInternal =\nCopy = f5\nMove = f6\nMakeDir = f7\nDelete = f8\nMenu = f9\nQuit = f10\nMenuLastSelected = f19\nQuitQuiet = f20\nFind = alt-question\nCdQuick = alt-c\nHotList = ctrl-backslash\nReread = ctrl-r\nDirSize = ctrl-space\nSuspend = ctrl-z\nSwap = ctrl-u\nHistory = alt-h\nPanelListing =\nPanelListingSwitch = alt-t\nPanelListingChange =\nShowHidden = alt-dot\nSplitVertHoriz = alt-comma\nShell = ctrl-o\nPutCurrentPath = alt-a\nPutOtherPath = alt-shift-a\nViewFiltered = alt-exclamation\nSelect = kpplus\nUnselect = kpminus\nSelectInvert = kpasterisk\nScreenList = alt-prime\nOptions =\nOptionsLayout =\nOptionsPanel =\nOptionsConfirm =\nOptionsDisplayBits =\nOptionsVfs =\nLearnKeys =\nSaveSetup =\nEditExtensionsFile =\nEditFileHighlightFile =\nFilter =\nConnectFish =\nConnectFtp =\nConnectSmb =\nUndelete =\nExtendedKeyMap = ctrl-x\n\n[main:xmap]\nChangeMode = c\nChangeOwn = o\nCompareDirs = d\nCompareFiles = ctrl-d\nHotListAdd = h\nLinkSymbolicEdit = ctrl-s\nLink = l\nLinkSymbolic = s\nLinkSymbolicRelative\nPanelInfo = i\nPanelQuickView = q\nExternalPanelize = exclamation\nVfsList = a\nJobs = j\nPutCurrentPath = p\nPutOtherPath = ctrl-p\nPutCurrentTagged = t\nPutOtherTagged = ctrl-t\nPutCurrentLink = r\nPutOtherLink = ctrl-r\n\n[panel]\nSearch = ctrl-s; alt-s\nMark = insert; ctrl-t\nMarkUp = shift-up\nMarkDown = shift-down\nMarkLeft =\nMarkRight =\nDown = down; ctrl-n\nUp = up; ctrl-p\nLeft = left\nRight = right\nPageUp = pgup; alt-v\nPageDown = pgdn; ctrl-v\nEnter = enter\nPanelOtherCd = alt-o\nPanelOtherCdLink = alt-l\nViewRaw = f13\nEditNew = f14\nCopySingle = f15\nMoveSingle = f16\nDeleteSingle = f18\nSelect = alt-plus\nUnselect = alt-minus\nSelectInvert = alt-asterisk\nCdChild = ctrl-pgdn\nCdParent = ctrl-pgup\nCdParentSmart =\nHistory = alt-shift-h\nHistoryNext = alt-u\nHistoryPrev = alt-y\nBottomOnScreen = alt-j\nMiddleOnScreen = alt-r\nTopOnScreen = alt-g\nPanelOtherSync = alt-i\nSelectCodepage = alt-e\nTop = alt-lt; home; a1\nBottom = alt-gt; end; c1\nSort =\nSortPrev =\nSortNext =\nSortReverse =\nSortByName =\nSortByExt =\nSortBySize =\nSortByMTime =\n\n[dialog]\nOk = enter\nCancel = f10; esc\nUp = left; up\n#Left = left; up\nDown = right; down\n#Right = right; down\nHelp = f1\nSuspend = ctrl-z\nRefresh = ctrl-l\nScreenList = alt-prime\nScreenNext = alt-rbrace\nScreenPrev = alt-lbrace\n\n[input]\nHome = ctrl-a; alt-lt; home; a1\nEnd = ctrl-e; alt-gt; end; c1\nLeft = left; alt-left; ctrl-b\nRight = right; alt-right; ctrl-f\nWordLeft = ctrl-left; alt-b\nWordRight = ctrl-right; alt-f\nBackspace = backspace\nDelete = delete\nDeleteToWordBegin = alt-backspace\nDeleteToWordEnd = alt-d\nMark =\nRemove = ctrl-w\nCut =\nStore = alt-w\nPaste =\nYank = ctrl-y\nDeleteToEnd = ctrl-k\nHistoryPrev = alt-p; ctrl-down\nHistoryNext = alt-n; ctrl-up\nHistory = alt-h\nComplete = alt-tab\nClear =\nMarkLeft =\nMarkRight =\nMarkToWordBegin =\nMarkToWordEnd =\nMarkToHome =\nMarkToEnd =\n\n[listbox]\nUp = up; ctrl-p\nDown = down; ctrl-n\nTop = home; alt-lt; a1\nBottom = end; alt-gt; c1\nPageUp = pgup; alt-v\nPageDown = pgdn; ctrl-v\nDelete = delete; d\nClear = shift-delete; shift-d\n\n[tree]\nHelp = f1\nReread = f2; ctrl-r\nForget = f3\nToggleNavigation = f4\nCopy = f5\nMove = f6\nUp = up; ctrl-p\nDown = down; ctrl-n\nLeft = left\nRight = right\nTop = home; alt-lt; a1\nBottom = end; alt-gt; c1\nPageUp = pgup; alt-v\nPageDown = pgdn; ctrl-v\nEnter = enter\nSearch = ctrl-s; alt-s\nDelete = f8; delete\n\n[help]\nHelp = f1\nIndex = f2; c\nBack = f3; left; l\nQuit = f10; esc; ctrl-g\nUp = up; ctrl-p\nDown = down; ctrl-n\nPageDown = f; space; pgdn; ctrl-v\nPageUp = b; pgup; alt-v; backspace\nHalfPageDown = d\nHalfPageUp = u\nTop = home; ctrl-home; ctrl-pgup; a1; alt-lt; g\nBottom = end; ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g\nEnter = right; enter\nLinkNext = tab\nLinkPrev = alt-tab\nNodeNext = n\nNodePrev = p\n\n[editor]\nStore = alt-w\nPaste = ctrl-y\nCut = ctrl-w\nUp = up; ctrl-p\nDown = down; ctrl-n\nLeft = left; ctrl-b\nRight = right; ctrl-f\nWordLeft = ctrl-left; alt-b\nWordRight = ctrl-right; alt-f\nEnter = enter\nReturn = shift-enter\nBackSpace = backspace\nDelete = delete\nPageUp = pgup; alt-v\nPageDown = pgdn; ctrl-v\nHome = home; ctrl-a\nEnd = end; ctrl-e\nTab = tab\nUndo = ctrl-u\nRedo =\nTop = ctrl-home; alt-lt\nBottom = ctrl-end; alt-gt\nScrollUp = ctrl-up\nScrollDown = ctrl-down\nTopOnScreen = ctrl-pgup\nBottomOnScreen = ctrl-pgdn\nDeleteToWordBegin = alt-backspace\nDeleteToWordEnd = alt-d\nDeleteLine = ctrl-y\nDeleteToEnd = ctrl-k\nDeleteToHome =\nParagraphUp =\nParagraphDown =\nSave = f2\nEditFile =\nSaveAs = f12; ctrl-f2\nMark = f3; ctrl-at\nCopy = f5\nMove = f6\nRemove = f8\nMarkLine =\nMarkWord =\nMarkAll =\nUnmark =\nSearch = f7; ctrl-s\nSearchContinue = f17\nBlockShiftLeft =\nBlockShiftRight =\nMarkPageUp = shift-pgup\nMarkPageDown = shift-pgdn\nMarkLeft = shift-left\nMarkRight = shift-right\nMarkToWordBegin = ctrl-shift-left\nMarkToWordEnd = ctrl-shift-right\nMarkUp = shift-up\nMarkDown = shift-down\nMarkToHome = shift-home\nMarkToEnd = shift-end\nMarkToFileBegin = ctrl-shift-home\nMarkToFileEnd = ctrl-shift-end\nMarkToPageBegin = ctrl-shift-pgup\nMarkToPageEnd = ctrl-shift-pgdn\nMarkScrollUp = ctrl-shift-up\nMarkScrollDown = ctrl-shift-down\nMarkParagraphUp =\nMarkParagraphDown =\nMarkColumnPageUp = alt-pgup\nMarkColumnPageDown = alt-pgdn\nMarkColumnLeft = alt-left\nMarkColumnRight = alt-right\nMarkColumnUp = alt-up\nMarkColumnDown = alt-down\nMarkColumnScrollUp =\nMarkColumnScrollDown =\nMarkColumnParagraphUp =\nMarkColumnParagraphDown =\nBlockSave =\nMarkColumn = f13\nReplace = f4\nReplaceContinue = f14\nComplete = alt-tab\nInsertFile = f15\nQuit = f10\nInsertOverwrite = insert\nHelp = f1\nDate =\nRefresh = ctrl-l\nGoto = alt-l\nSort = alt-t\nMail =\nParagraphFormat = alt-p\nMatchBracket =\nExternalCommand = alt-u\nUserMenu = f11\nMenu = f9\nBookmark =\nBookmarkFlush =\nBookmarkNext =\nBookmarkPrev =\nHistory =\nShell = ctrl-o\nInsertLiteral = ctrl-q\nMacroStartRecord =\nMacroStopRecord =\nMacroStartStopRecord = ctrl-r\nMacroDelete =\nShowNumbers = alt-n\nShowTabTws = alt-underline\nSyntaxOnOff = ctrl-s\nSyntaxChoose =\nShowMargin =\nFind = alt-enter\nFilePrev = alt-minus\nFileNext = alt-plus\nRepeatStartStopRecord =\nSelectCodepage = alt-e\nOptions =\nOptionsSaveMode =\nLearnKeys =\nExtendedKeyMap = ctrl-x\n\n[editor:xmap]\nEditNew = k\n\n[viewer]\nHelp = f1\nWrapMode = f2\nQuit = f3; f10; q; esc\nHexMode = f4\nGoto = f5\nSearch = f7; question; slash\nMagicMode = f8\nNroffMode = f9\nSearchContinue = ctrl-r; ctrl-s; f17; n\nHome = ctrl-a\nEnd = ctrl-e\nLeft = h; left\nRight = l; right\nLeftQuick= ctrl-left\nRightQuick = ctrl-right\nUp = k; y; insert; up; ctrl-p\nDown = j; e; delete; down; enter; ctrl-n\nPageDown = f; space; pgdn; ctrl-v\nPageUp = b; pgup; alt-v; backspace\nHalfPageDown = d\nHalfPageUp = u\nTop = home; ctrl-home; ctrl-pgup; a1; alt-lt; g\nBottom = end; ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g\nBookmarkGoto = m\nBookmark = r\nFileNext = ctrl-f\nFilePrev = ctrl-b\nSelectCodepage = alt-e\nShell = ctrl-o\nRuler = alt-r\n\n[viewer:hex]\nHelp = f1\nHexEditMode = f2\nQuit = f3; f10; q; esc\nHexMode = f4\nGoto = f5\nSave = f6\nSearch = f7; question; slash\nSearchContinue = ctrl-r; ctrl-s; f17; n\nMagicMode = f8\nNroffMode = f9\nToggleNavigation = tab\nHome = ctrl-a; home\nEnd = ctrl-e; end\nLeft = b; left\nRight = f; right\nUp = k; y; up\nDown = j; delete; down\nPageDown = pgdn; ctrl-v\nPageUp = pgup; alt-v\nTop = ctrl-home; ctrl-pgup; a1; alt-lt; g\nBottom = ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g\n\n[diffviewer]\nShowSymbols = alt-s; s\nShowNumbers = alt-n; l\nSplitFull = f\nSplitEqual = equal\nSplitMore = gt\nSplitLess = lt\nTab2 = 2\nTab3 = 3\nTab4 = 4\nTab8 = 8\nSwap = ctrl-u\nRedo = ctrl-r\nHunkNext = n; enter; space\nHunkPrev = p; backspace\nGoto = g; shift-g\nSave = f2\nEdit = f4\nEditOther = f14\nMerge = f5\nSearch = f7\nSearchContinue = f17\nOptions = f9\nTop = ctrl-home\nBottom = ctrl-end\nDown = down\nUp = up\nLeftQuick = ctrl-left\nRightQuick = ctrl-right\nLeft = left\nRight = right\nPageDown = pgdn\nPageUp = pgup\nHome = home\nEnd = end\nHelp = f1\nQuit = f10; q; shift-q; esc\nShell = ctrl-o\nSelectCodepage = alt-e\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/etc/mc.menu",
    "content": "shell_patterns=0\n+ ! t t\n@       Do something on the current file\n\tCMD=%{Enter command}\n\t$CMD %f\n\n+ t t\n@       Do something on the tagged files\n\tset %t; CMD=%{Enter command}\n\twhile [ -n \"$1\" ]; do\n\t  $CMD \"$1\"\n\t  shift\n\tdone\n\t\n\n0       Edit a bug report and send it to root\n\tI=`mktemp \"${MC_TMPDIR:-/tmp}/mail.XXXXXX\"` || exit 1\n\t${EDITOR-vi} \"$I\"\n\ttest -r $I && mail root < $I\n\trm -f \"$I\"\n\n=+ f \\.1$ | f \\.3$ | f \\.4$ | f \\.5$ | f \\.6$ | f \\.7$ | f \\.8$ | f \\.man$ & t r\n1       Display the file with roff -man\n\tnroff -man %f | less\n\n2       Call the info hypertext browser\n        info\n\n= t d\n3       Compress the current subdirectory (tar.gz)\n\tPwd=`basename %d /`\n\techo -n \"Name of the compressed file (without extension) [$Pwd]: \"\n\tread tar\n        if [ \"$tar\"x = x ]; then tar=\"$Pwd\"; fi\n\tcd .. && \\\n\ttar cf - \"$Pwd\" | gzip -f9 > \"$tar.tar.gz\" && \\\n\techo \"../$tar.tar.gz created.\"\n\n4       Compress the current subdirectory (tar.bz2)\n\tPwd=`basename %d /`\n\techo -n \"Name of the compressed file (without extension) [$Pwd]: \"\n\tread tar\n        if [ \"$tar\"x = x ]; then tar=\"$Pwd\"; fi\n\tcd .. && \\\n\ttar cf - \"$Pwd\" | bzip2 -f > \"$tar.tar.bz2\" && \\\n\techo \"../$tar.tar.bz2 created.\"\n\n5       Compress the current subdirectory (tar.p7)\n\tPwd=`basename %d /`\n\techo -n \"Name of the compressed file (without extension) [$Pwd]: \"\n\tread tar\n        if [ \"$tar\"x = x ]; then tar=\"$Pwd\"; fi\n\tcd .. && \\\n\ttar cf - \"$Pwd\" | 7za a -si \"$tar.tar.7z\" && \\\n\techo \"../$tar.tar.7z created.\"\n\n6       Compress the current subdirectory (tar.lzma)\n\tPwd=`basename %d /`\n\techo -n \"Name of the compressed file (without extension) [$Pwd]: \"\n\tread tar\n        if [ \"$tar\"x = x ]; then tar=\"$Pwd\"; fi\n\tcd .. && \\\n\ttar cf - \"$Pwd\" | lzma -f > \"$tar.tar.lzma\" && \\\n\techo \"../$tar.tar.lzma created.\"\n\n7       Compress the current subdirectory (tar.lz)\n\tPwd=`basename %d /`\n\techo -n \"Name of the compressed file (without extension) [$Pwd]: \"\n\tread tar\n        if [ \"$tar\"x = x ]; then tar=\"$Pwd\"; fi\n\tcd .. && \\\n\ttar cf - \"$Pwd\" | lzip -f > \"$tar.tar.lz\" && \\\n\techo \"../$tar.tar.lz created.\"\n\n8       Compress the current subdirectory (tar.xz)\n\tPwd=`basename %d /`\n\techo -n \"Name of the compressed file (without extension) [$Pwd]: \"\n\tread tar\n        if [ \"$tar\"x = x ]; then tar=\"$Pwd\"; fi\n\tcd .. && \\\n\ttar cf - \"$Pwd\" | xz -f > \"$tar.tar.xz\" && \\\n\techo \"../$tar.tar.xz created.\"\n\n= f \\.c$ & t r\n+ f \\.c$ & t r & ! t t\nс       Compile and link current .c file\n        make `basename %f .c` 2>/dev/null || cc -O -o `basename %f .c` %f\n\n+ t r & ! t t\na       Append file to opposite\n\tcat %f >> %D/%f\n\n+ t t\nA       Append files to opposite files\n\tset %t\n\twhile [ -n \"$1\" ]; do\n\t  cat \"$1\" >> \"%D/$1\"\n\t  shift\n\tdone\n\n+ t r & ! t t\nd       Delete file if a copy exists in the other directory.\n\tif [ \"%d\" = \"%D\" ]; then\n\t  echo \"The two directories must be different.\"\n\t  exit 1\n\tfi\n\tif [ -f %D/%f ]; then        # if two of them, then\n          if cmp -s %D/%f %f; then\n            rm %f && echo \"%f: DELETED.\"\n          else\n            echo \"%f and %D/%f differ: NOT deleted.\"\n            echo -n \"Press RETURN \"\n            read key\n          fi\n\telse\n\t  echo \"%f: No copy in %D/%f: NOT deleted.\"\n        fi\n\n+ t t\nD       Delete tagged files if a copy exists in the other directory.\n\tif [ \"%d\" = \"%D\" ]; then\n\t  echo \"The two directores must be different.\"\n\t  exit 1\n\tfi\n        for i in %t\n        do\n          if [ -f \"%D/$i\" ]; then\n            SUM1=\"`sum $i`\"\n            SUM2=\"`sum %D/$i`\"\n            if [ \"$SUM1\" = \"$SUM2\" ]; then\n\t      rm \"$i\" && echo \"${i}: DELETED.\"\n\t    else\n\t      echo \"$i and %D/$i differ: NOT deleted.\"\n\t    fi\n\t  else\n\t    echo \"%f has no copy in %D/%f: NOT deleted.\"\n          fi\n        done\n\nm       View manual page\n\tMAN=%{Enter manual name}\n\t%view man -P cat $MAN\n\n= f \\.gz$ & t r\n+ ! t t\nn       Inspect gzip'ed newsbatch file\n        dd if=%f bs=1 skip=12|zcat|${PAGER-more}\n        # assuming the cunbatch header is 12 bytes long.\n\n= t r &\n+ ! t t\nh       Strip headers from current newsarticle\n\tCHECK=`awk '{print $1 ; exit}' %f` 2>/dev/null\n\tcase \"$CHECK\" in\n\t  Newsgroups:|Path:)\n\t      I=`mktemp \"${MC_TMPDIR:-/tmp}/news.XXXXXX\"` || exit 1\n\t      cp %f \"$I\" && sed '/^'\"$CHECK\"' /,/^$/d' \"$I\" > %f\n              [ \"$?\" = \"0\" ] && rm \"$I\"\n\t      echo \"%f: header removed.\"\n\t\t;;\n\t  *)\n\t      echo \"%f is not a news article.\"\n\t\t;;\n\tesac\n\n+ t t\nH       Strip headers from the marked newsarticles\n\tset %t\n\twhile [ -n \"$1\" ]; do\n\t  CHECK=`awk '{print $1 ; exit}' $1` 2>/dev/null\n\t  WFILE=`mktemp \"${MC_TMPDIR:-/tmp}/news.XXXXXX\"` || exit 1\n\t  case \"$CHECK\" in\n\t    Newsgroups:|Path:)\n\t      cp \"$1\" \"$WFILE\" && sed '/^'\"$CHECK\"' /,/^$/d' \"$WFILE\" > \"$1\"\n              if [ \"$?\" = \"0\" ]; then\n\t\trm \"$WFILE\"; echo \"$1 header removed. OK.\"\n\t      else\n\t\techo \"Oops! Please check $1 against $WFILE.\"\n\t      fi\n\t\t;;\n\t    *)\n\t      echo \"$1 skipped: Not a news article.\"\n\t\t;;\n\t  esac\n\t  shift\n\tdone\n\n= t r\n+ ! t t\nr       Copy file to remote host\n\techo -n \"To which host?: \"\n        read Host\n        echo -n \"To which directory on $Host?: \"\n        read Dir\n        rcp -p %f \"${Host}:$Dir\"\n\n+ t t\nR       Copy files to remote host (no error checking)\n\techo -n \"Copy files to which host?: \"\n        read Host\n        echo -n \"To which directory on $Host? :\"\n        read Dir\n        rcp -pr %u \"${Host}:$Dir\"\n\n= f \\.tex$ & t r\n+ f \\.tex$ & t r & ! t t\nt       Run latex on file and show it with xdvi\n        latex %f && xdvi `basename %f .tex`.dvi\n\n=+ f ^part | f ^Part | f uue & t r\n+ t t\nU       Uudecode marked news articles (needs work)\n\tset %t\n        (\n\twhile [ -n \"$1\" ]; do # strip headers\n\t  FIRST=`awk '{print $1 ; exit}' \"$1\"`\n\t  cat \"$1\" | sed '/^'\"$FIRST\"' /,/^$/d'; shift\n\tdone\n\t) |sed '/^$/d' |sed -n '/^begin 6/,/^end$/p' | uudecode\n\tif [ \"$?\" != \"0\" ]; then\n\t  echo \"Cannot decode %t.\"\n\tfi\n\techo \"Please test the output file before deleting anything.\"\n\n=+ f \\.tar\\.gz$ | f \\.tar\\.z$ | f \\.tgz$ | f \\.tpz$ | f \\.tar\\.lz$ | f \\.tar\\.lzma$ | f \\.tar\\.7z$ | f \\.tar\\.xz$ | f \\.tar\\.Z$ | f \\.tar\\.bz2$ & t r\nx       Extract the contents of a compressed tar file\n\tunset PRG\n\tcase %f in\n\t    *.tar.bz2)\n\t\tPRG=\"bunzip2 -c\"\n\t\t;;\n\t    *.tar.gz|*.tar.z|*.tgz|*.tpz|*.tar.Z)\n\t\tPRG=\"gzip -dc\"\n\t\t;;\n\t    *.tar.lzma)\n\t\tPRG=\"lzma -dc\"\n\t\t;;\n\t    *.tar.lz)\n\t\tPRG=\"lzip -dc\"\n\t\t;;\n\t    *.tar.xz)\n\t\tPRG=\"xz -dc\"\n\t\t;;\n\t    *.tar.7z)\n\t\tPRG=\"7za e -so\"\n\t\t;;\n\t    *)\n\t\texit 1\n\t\t;;\n\tesac\n\t$PRG %f | tar xvf -\n\n= t r\n+ ! t t\ny       Gzip or gunzip current file\n        unset DECOMP\n\tcase %f in\n\t    *.gz) DECOMP=-d;;\n\t    *.[zZ]) DECOMP=-d;;\n\tesac\n        gzip $DECOMP -v %f\n\n+ t t\nY       Gzip or gunzip tagged files\n        for i in %t\n        do\n          unset DECOMP\n\t  case \"$i\" in\n\t    *.gz) DECOMP=-d;;\n\t    *.[zZ]) DECOMP=-d;;\n\t  esac\n          gzip $DECOMP -v \"$i\"\n        done\n\n+ ! t t\nb       Bzip2 or bunzip2 current file\n        unset DECOMP\n\tcase %f in\n\t    *.bz2) DECOMP=-d;;\n\tesac\n        bzip2 $DECOMP -v %f\n\n+ t t\nB       Bzip2 or bunzip2 tagged files\n        for i in %t\n        do\n          unset DECOMP\n\t  case \"$i\" in\n\t    *.bz2) DECOMP=-d;;\n\t  esac\n          bzip2 $DECOMP -v \"$i\"\n        done\n\n+ f \\.tar.gz$ | f \\.tgz$ | f \\.tpz$ | f \\.tar.Z$ | f \\.tar.z$ | f \\.tar.bz2$ | f \\.tar.F$ & t r & ! t t\nz       Extract compressed tar file to subdirectory\n\tunset D\n\tset gzip -cd\n\tcase %f in\n\t  *.tar.gz) D=\"`basename %f .tar.gz`\";;\n\t  *.tgz)    D=\"`basename %f .tgz`\";;\n\t  *.tpz)    D=\"`basename %f .tpz`\";;\n\t  *.tar.Z)  D=\"`basename %f .tar.Z`\";;\n\t  *.tar.z)  D=\"`basename %f .tar.z`\";;\n\t  *.tar.bz2) D=\"`basename %f .tar.bz2`\"; set bunzip2 -c ;;\n\t  *.tar.F) D=\"`basename %f .tar.F`\"; set freeze -dc;\n\tesac\n\tmkdir \"$D\"; cd \"$D\" && (\"$1\" \"$2\" ../%f | tar xvf -)\n\n+ t t\nZ       Extract compressed tar files to subdirectories\n\tfor i in %t\n        do\n\t  set gzip -dc\n          unset D\n\t  case \"$i\" in\n\t    *.tar.gz)  D=\"`basename $i .tar.gz`\";;\n\t    *.tgz)     D=\"`basename $i .tgz`\";;\n\t    *.tpz)     D=\"`basename $i .tpz`\";;\n\t    *.tar.Z)   D=\"`basename $i .tar.Z`\";;\n\t    *.tar.z)   D=\"`basename $i .tar.z`\";;\n\t    *.tar.F)   D=\"`basename $i .tar.F`\"; set freeze -dc;;\n\t    *.tar.bz2) D=\"`basename $i .tar.bz2`\"; set bunzip2 -c;;\n          esac\n\t  mkdir \"$D\"; (cd \"$D\" && \"$1\" \"$2\" \"../$i\" | tar xvf -)\n        done\n\n+ f \\.gz$ | f \\.tgz$ | f \\.tpz$ | f \\.Z$ | f \\.z$ | f \\.bz2$ & t r & ! t t\nc       Convert gz<->bz2, tar.gz<->tar.bz2 & tgz->tar.bz2\n\tunset D\n\tunset EXT\n\tcase %f in\n\t    *.tgz)\tEXT=tgz;;\n\t    *.tpz)\tEXT=tpz;;\n\t    *.Z)\tEXT=Z;;\n\t    *.z)\tEXT=z;;\n\t    *.gz)\tEXT=gz;;\n\t    *.bz2)\tEXT=bz2;;\n\tesac\n        case $EXT in\n\t  tgz|tpz)\tD=\"`basename %f .$EXT`.tar\";;\n\t  gz|Z|z)\tD=\"`basename %f .$EXT`\";;\n\t  bz2)\t\tD=\"`basename %f .bz2`\";;\n        esac\n        if [ \"$EXT\" = \"bz2\" ]; then\n\t    bunzip2 -v %f ; gzip -f9 -v \"$D\"\n\telse\n\t    gunzip -v %f ; bzip2 -v \"$D\"\n\tfi\n\n+ t t\nC       Convert gz<->bz2, tar.gz<->tar.bz2 & tgz->tar.bz2\n\tset %t\n\twhile [ -n \"$1\" ]\n        do\n\t  unset D\n\t  unset EXT\n\t  case \"$1\" in\n\t    *.tgz)\tEXT=tgz;;\n\t    *.tpz)\tEXT=tpz;;\n\t    *.Z)\tEXT=Z;;\n\t    *.z)\tEXT=z;;\n\t    *.gz)\tEXT=gz;;\n\t    *.bz2)\tEXT=bz2;;\n\t  esac\n\t  case $EXT in\n\t      tgz)    D=\"`basename $1 .tgz`.tar\";;\n              tpz)    D=\"`basename $1 .tpz`.tar\";;\n\t      gz|Z|z) D=\"`basename $1 .$EXT`\";;\n\t      bz2)    D=\"`basename $1 .bz2`\";;\n\t  esac\n\t  if [ \"$EXT\" = \"bz2\" ]; then\n\t    bunzip2 -v \"$1\"\n\t    gzip -f9 -v \"$D\"\n\t  else\n\t    gunzip -v \"$1\"\n\t    bzip2 -v \"$D\"\n\t  fi\n\t  shift\n        done\n\n+ x /usr/bin/open | x /usr/local/bin/open & x /bin/sh\no       Open next a free console\n        open -s -- sh\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/etc/mc.menu.sr",
    "content": "shell_patterns=0\n+ ! t t\n@       Ради нешто над текућом датотеком\n\tCMD=%{Унесите наредбу}\n\t$CMD %f\n\n+ t t\n@       Ради нешто над означеним датотекама\n\tset %t; CMD=%{Унесите наредбу}\n\twhile [ -n \"$1\" ]; do\n\t  $CMD \"$1\"\n\t  shift\n\tdone\n\t\n\n0       Уреди пријаву грешке и пошаљи је администратору\n        ${EDITOR-vi} /tmp/mail.$$\n\ttest -r /tmp/mail.$$ && mail root < /tmp/mail.$$\n\trm -f /tmp/mail.$$\n\n=+ f \\.1$ | f \\.3$ | f \\.4$ | f \\.5$ | f \\.6$ | f \\.7$ | f \\.8$ | f \\.man$ & t r\n1       Прикажи датотеку уз помоћ roff -man\n\tnroff -man %f | less\n\n2       Позови читач хипертекста info\n        info\n\n= t d\n3       Компримуј текући поддиректоријум (tar.gz)\n\tPwd=`basename \"%d\" /`\n\techo -n \"Назив компримоване датотеке (без врсте) [$Pwd]: \"\n\tread tar\n        if [ \"$tar\"x = x ]; then tar=\"$Pwd\"; fi\n\tcd .. && \\\n\ttar cf - \"$Pwd\" | gzip -f9 > \"$tar.tar.gz\" && \\\n\techo \"Датотека ../$tar.tar.gz је створена.\"\n\n4       Компримуј текући поддиректоријум (tar.bz2)\n\tPwd=`basename %d /`\n\techo -n \"Назив компримоване датотеке (без врсте) [$Pwd]: \"\n\tread tar\n        if [ \"$tar\"x = x ]; then tar=\"$Pwd\"; fi\n\tcd .. && \\\n\ttar cf - \"$Pwd\" | bzip2 -f > \"$tar.tar.bz2\" && \\\n\techo \"Датотека ../$tar.tar.bz2 је створена.\"\n\n= f \\.c$ & t r\n+ f \\.c$ & t r & ! t t\n5       Преведи и повежи текућу датотеку врсте `.c'\n        make `basename %f .c` 2>/dev/null || cc -O -o `basename %f .c` %f\n\n+ t r & ! t t\na       Надовежи датотеку на ону из другог окна\n\tcat %f >>%D/%f\n\n+ t t\nA       Надовежи датотеке на оне из другог окна\n\tset %t\n\twhile [ -n \"$1\" ]; do\n\t  cat \"$1\" >> \"%D/$1\"\n\t  shift\n\tdone\n\n+ t r & ! t t\nd       Обриши датотеку ако њена копија постоји у другом окну.\n\tif [ \"%d\" = \"%D\" ]; then\n\t  echo \"Два директоријума морају да буду различити.\"\n\t  exit 1\n\tfi\n  \tif [ -f %D/%f ]; then        # if two of them, then\n          if cmp -s %D/%f %f; then\n            rm %f && echo \"%f: ОБРИСАНА.\"\n          else\n            echo \"%f и %D/%f се разликују: НИЈЕ обрисана.\"\n            echo -n \"Притисните `RETURN' \"\n            read тастер\n          fi\n\telse\n\t  echo \"%f: Нема копије у %D/%f: НИЈЕ обрисана.\"\n        fi\n\n+ t t\nD       Обриши означене датотеке ако постоји копија у другом окну.\n\tif [ \"%d\" = \"%D\" ]; then\n\t  echo \"Два директоријума морају да буду различити.\"\n\t  exit 1\n\tfi \n        for i in %t\n        do \n          if [ -f \"%D/$i\" ]; then\n            SUM1=\"`sum $i`\"\n            SUM2=\"`sum %D/$i`\"\n            if [ \"$SUM1\" = \"$SUM2\" ]; then\n\t      rm \"$i\" && echo \"${i}: ОБРИСАНА.\"\n\t    else\n\t      echo \"$i и %D/$i се разликују: НИЈЕ обрисана.\"\n\t    fi\n\t  else\n\t    echo \"%f нема копију у %D/%f: НИЈЕ обрисана.\"\n          fi\n        done\n\nm       Погледај страницу упутства\n\tMAN=%{Унесите назив упутства}\n\t%view man -P cat $MAN\n\n= f \\.gz$ & t r\n+ ! t t\nn       Прегледај датотеку вести компримовану програмом gzip\n        dd if=%f bs=1 skip=12|zcat|${PAGER-more}\n        # assuming the cunbatch header is 12 bytes long.\n\n= t r &\n+ ! t t\nh       Скини заглавља из текућег чланка вести\n\tCHECK=`awk '{print $1 ; exit}' %f` 2>/dev/null\n\tcase \"$CHECK\" in\n\t  Newsgroups:|Path:)\n\t      cp %f /tmp/%f.$$ && sed '/^'\"$CHECK\"' /,/^$/d' /tmp/%f.$$ > %f\n              [ \"$?\" = \"0\" ] && rm \"/tmp/%f.$$\"\n\t      echo \"%f: уклоњено заглавље.\"\n\t\t;;\n\t  *)\n\t      echo \"%f није чланак вести.\"\n\t\t;;\n\tesac\n\n+ t t\nH       Скини заглавља из означених чланака вести\n\tset %t\n\twhile [ -n \"$1\" ]; do\n\t  CHECK=`awk '{print $1 ; exit}' \"$1\"` 2>/dev/null\n\t  WFILE=/tmp/${1}.$$\n\t  case \"$CHECK\" in\n\t    Newsgroups:|Path:)\n\t      cp \"$1\" \"$WFILE\" && sed '/^'\"$CHECK\"' /,/^$/d' \"$WFILE\" > \"$1\"\n              if [ \"$?\" = \"0\" ]; then\n\t\trm \"$WFILE\"; echo \"$1 заглавље уклоњено. У реду.\"\n\t      else\n\t\techo \"Уупс! Молим да проверите $1 са $WFILE.\"\n\t      fi\n\t\t;;\n\t    *)\n\t      echo \"$1 прескочена: Није чланак вести.\"\n\t\t;;\n\t  esac\n\t  shift\n\tdone\n\n= t r\n+ ! t t\nr       Копирај датотеку на удаљеног домаћина\n\techo -n \"На ког домаћина?: \"\n        read Домаћин\n        echo -n \"У који директоријум на $Домаћин?: \"\n        read Дир\n        rcp -p %f \"${Домаћин}:$Дир\"\n\n+ t t\nR       Копирај датотеке на удаљеног домаћина (без провере грешака)\n\techo -n \"На ког домаћина да копирам датотеке?: \"\n        read Домаћин\n        echo -n \"У који директоријум на $Домаћин? :\"\n        read Дир\n        rcp -pr %u \"${Домаћин}:$Дир\"\n\n= f \\.tex$ & t r\n+ f \\.tex$ & t r & ! t t\nt       Покрени ЛаТеХ над датотеком и прикажи је преко програма `xdvi'\n        latex %f && xdvi `basename %f .tex`.dvi\n\n=+ f ^part | f ^Part | f uue & t r\n+ t t\nU       Уудекодирај означени чланак вести (требало би разрадити)\n\tset %t\n        (\n\twhile [ -n \"$1\" ]; do # strip headers\n\t  FIRST=`awk '{print $1 ; exit}' \"$1\"`\n\t  cat \"$1\" | sed '/^'\"$FIRST\"' /,/^$/d'; shift\n\tdone\n\t) |sed '/^$/d' |sed -n '/^begin 6/,/^end$/p' | uudecode\n\tif [ \"$?\" != \"0\" ]; then\n\t  echo \"Не могу да декодирам %t.\"\n\tfi\n\techo \"Молим да проверите излазну датотеку пре било каквог брисања.\"\n\n=+ f \\.tar\\.gz$ | f \\.tar\\.z$ | f \\.tgz$ | f \\.tpz$ | f \\.tar\\.lz$ | f \\.tar\\.lzma$ | f \\.tar\\.7z$ | f \\.tar\\.xz$ | f \\.tar\\.Z$ | f \\.tar\\.bz2$ & t r\nx       Издвој садржај компримоване датотеке врсте `tar'\n\tunset PRG\n\tcase %f in\n\t    *.tar.bz2)\n\t\tPRG=\"bunzip2 -c\"\n\t\t;;\n\t    *.tar.gz|*.tar.z|*.tgz|*.tpz|*.tar.Z)\n\t\tPRG=\"gzip -dc\"\n\t\t;;\n\t    *.tar.lzma)\n\t\tPRG=\"lzma -dc\"\n\t\t;;\n\t    *.tar.lz)\n\t\tPRG=\"lzip -dc\"\n\t\t;;\n\t    *.tar.xz)\n\t\tPRG=\"xz -dc\"\n\t\t;;\n\t    *.tar.7z)\n\t\tPRG=\"7za e -so\"\n\t\t;;\n\t    *)\n\t\texit 1\n\t\t;;\n\tesac\n\t$PRG %f | tar xvf -\n\n= t r\n+ ! t t\ny       Пакуј или расп. тек. дат. програмима `gzip' или `gunzip'\n        unset DECOMP\n\tcase %f in \n\t    *.gz) DECOMP=-d;;\n\t    *.[zZ]) DECOMP=-d;;\n\tesac\n        gzip $DECOMP -v %f\n\n+ t t\nY       Пакуј или расп. означ. дат. програмима `gzip' или `gunzip'\n        for i in %t\n        do\n          unset DECOMP\n\t  case \"$i\" in\n\t    *.gz) DECOMP=-d;;\n\t    *.[zZ]) DECOMP=-d;;\n\t  esac\n          gzip $DECOMP -v \"$i\"\n        done\n\n+ ! t t\nb       Пакуј или расп. тек. дат. програмима `bzip2' или `bunzip2'\n        unset DECOMP\n\tcase %f in\n\t    *.bz2) DECOMP=-d;;\n\tesac\n        bzip2 $DECOMP -v %f\n\n+ t t\nB       Пакуј или расп. означ. дат. програмима `bzip2' или `bunzip2'\n        for i in %t\n        do\n          unset DECOMP\n\t  case \"$i\" in\n\t    *.bz2) DECOMP=-d;;\n\t  esac\n          bzip2 $DECOMP -v \"$i\"\n        done\n\n+ f \\.tar.gz$ | f \\.tgz$ | f \\.tpz$ | f \\.tar.Z$ | f \\.tar.z$ | f \\.tar.bz2$ | f \\.tar.F$ & t r & ! t t\nz       Издвој компримовану датотеку врсте `tar' у поддиректоријум\n\tunset D\n\tset gzip -cd\n\tcase %f in\n\t  *.tar.gz) D=\"`basename %f .tar.gz`\";;\n\t  *.tgz)    D=\"`basename %f .tgz`\";;\n\t  *.tpz)    D=\"`basename %f .tpz`\";;\n\t  *.tar.Z)  D=\"`basename %f .tar.Z`\";;\n\t  *.tar.z)  D=\"`basename %f .tar.z`\";;\n\t  *.tar.bz2) D=\"`basename %f .tar.bz2`\"; set bunzip2 -c ;;\n\t  *.tar.F) D=\"`basename %f .tar.F`\"; set freeze -dc;\n\tesac\n\tmkdir \"$D\"; cd \"$D\" && (\"$1\" \"$2\" ../%f | tar xvf -)\n\n+ t t\nZ       Издвој компримовану датотеке врсте `tar' у поддиректоријуме\n\tfor i in %t\n        do\n\t  set gzip -dc\n          unset D\n\t  case \"$i\" in\n\t    *.tar.gz)  D=\"`basename $i .tar.gz`\";;\n\t    *.tgz)     D=\"`basename $i .tgz`\";;\n\t    *.tpz)     D=\"`basename $i .tpz`\";;\n\t    *.tar.Z)   D=\"`basename $i .tar.Z`\";;\n\t    *.tar.z)   D=\"`basename $i .tar.z`\";;\n\t    *.tar.F)   D=\"`basename $i .tar.F`\"; set freeze -dc;;\n\t    *.tar.bz2) D=\"`basename $i .tar.bz2`\"; set bunzip2 -c;;\n          esac\n\t  mkdir \"$D\"; (cd \"$D\" && \"$1\" \"$2\" \"../$i\" | tar xvf -)\n        done\n\n+ f \\.gz$ | f \\.tgz$ | f \\.tpz$ | f \\.Z$ | f \\.z$ | f \\.bz2$ & t r & ! t t\nc       Пребаци gz<->bz2, tar.gz<->tar.bz2 и tgz->tar.bz2\n        unset D\n\tcase \"%f\" in\n\t    *.tgz)\tEXT=tgz;;\n\t    *.tpz)\tEXT=tpz;;\n\t    *.Z)\tEXT=Z;;\n\t    *.z)\tEXT=z;;\n\t    *.gz)\tEXT=gz;;\n\t    *.bz2)\tEXT=bz2;;\n\tesac\n        case $EXT in\n\t  tgz|tpz)\tD=\"`basename %f .$EXT`.tar\";;\n\t  gz|Z|z)\tD=\"`basename %f .$EXT`\";;\n\t  bz2)\t\tD=\"`basename %f .bz2`\";;\n        esac\n        if [ \"$EXT\" = \"bz2\" ]; then\n\t    bunzip2 -v \"%f\" ; gzip -f9 -v \"$D\"\n\telse\n\t    gunzip -v \"%f\" ; bzip2 -v \"$D\"\n\tfi\n\n+ t t\nC       Пребаци gz<->bz2, tar.gz<->tar.bz2 и tgz->tar.bz2\n\tset %t\n\twhile [ -n \"$1\" ]\n        do\n          unset D\n\t  case \"$1\" in\n\t    *.tgz)\tEXT=tgz;;\n\t    *.tpz)\tEXT=tpz;;\n\t    *.Z)\tEXT=Z;;\n\t    *.z)\tEXT=z;;\n\t    *.gz)\tEXT=gz;;\n\t    *.bz2)\tEXT=bz2;;\n\t  esac\n\t  case $EXT in\n\t      tgz)    D=\"`basename $1 .tgz`.tar\";;\n              tpz)    D=\"`basename $1 .tpz`.tar\";;\n\t      gz|Z|z) D=\"`basename $1 .$EXT`\";;\n\t      bz2)    D=\"`basename $1 .bz2`\";;\n\t  esac\n\t  if [ \"$EXT\" = \"bz2\" ]; then\n\t    bunzip2 -v \"$1\"\n\t    gzip -f9 -v \"$D\"\n\t  else\n\t    gunzip -v \"$1\"\n\t    bzip2 -v \"$D\"\n\t  fi\n\t  shift\n        done\n\n+ x /usr/bin/open | x /usr/local/bin/open & x /bin/sh\no       Отвори следећу слободну конзолу\n        open -s -- sh\n\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/etc/mcedit.menu",
    "content": "shell_patterns=0    # expression type\n\n# The macros are:\n#\n# %c The cursor column position number. For edit menu only.\n# %i The indent of blank space, equal the cursor column \n#    position. For edit menu only.\n# %y The syntax type of current file. For edit menu only.\n# %b The block file name.\n# %f The current file name.\n# %n Only the current file name without extension.\n# %x The extension of current file name.\n# %d The current directory name.\n# %F The current file in the unselected panel.\n# %D The directory name of the unselected panel.\n# %t The currently tagged files.\n# %T The tagged files in the unselected panel.\n# %u and %U Similar to the %t and %T macros, but in\n#    addition the files are untagged. You can use this macro\n#    only once per menu file entry or extension file entry,\n#    because next time there will be no tagged files.\n# %s and %S The selected files: The tagged files if\n#    there are any. Otherwise the current file.\n#\n# %% The % character\n#\n# %{some text} Prompt for the substitution. An input box\n#    is shown and the text inside the braces is used as a\n#    prompt. The macro is substituted by the text typed by the\n#    user. The user can press ESC or F10 to cancel. This macro\n#    doesn't work on the command line yet.\n\n#----------------------- Begin [perl] language template -----------------------\n+ y Perl\\ Program | f \\.pl$\n1       Author description header\n        unset LANG\n        unset LANGUAGE\n        LC_ALL=\n        MY_UID=\"`id | sed 's/^.*uid=\\([^(]*\\).*$/\\1/'`\"\n        AUTHOR=\"`awk -F: '$3 == '$MY_UID' {print $5}' /etc/passwd`\"\n        cat >>%b <<EOF\n        #----------------------------------------------------------------------\n        # Description:\n        # Author: $AUTHOR <$REPLYTO>\n        # Created at: `date`\n        # Computer: `uname -n` \n        # System: `uname -sr` on `uname -m`\n        #\n        # Copyright (c) `date +%%Y` $AUTHOR  All rights reserved.\n        #\n        #----------------------------------------------------------------------\n        # Configure section:\n\n        #----------------------------------------------------------------------\n        #\n        # main()\n\n        EOF\n\n+ y Perl\\ Program | f \\.pl$\n2       while ()\n        cat <<EOF > %b\n        %iwhile() {\n        %i}\n        EOF\n\n+ y Perl\\ Program | f \\.pl$\n3       for ()\n        cat <<EOF > %b\n        %ifor ($i =  ; $i <  ; $i++) {\n        %i}\n        EOF\n\n+ y Perl\\ Program | f \\.pl$\n4       foreach ()\n        cat <<EOF > %b\n        %iforeach ($ ) {\n        %i}\n        EOF\n\n+ y Perl\\ Program | f \\.pl$\n5       if ()\n        cat <<EOF > %b\n        %iif () {\n        %i}\n        EOF\n\n+ y Perl\\ Program | f \\.pl$\n6       if () else\n        cat <<EOF > %b\n        %iif () {\n        %i} else {\n        %i}\n        EOF\n\n+ y Perl\\ Program | f \\.pl$\n7       if () elsif ()\n        cat <<EOF > %b\n        %iif () {\n        %i} elsif () {\n        %i}\n        EOF\n\n+ y Perl\\ Program | f \\.pl$\n8       substr ()\n        echo \"%i$ = substr(\\$str, \\$off, \\$cnt);\" >%b\n\n+ y Perl\\ Program | f \\.pl$\n9       opendir ()\n        cat <<EOF > %b\n        %iopendir(DIR, \\$dir) || die(\"\\$0: can't open \\$dir\\n\");\n        EOF\n\n+ y Perl\\ Program | f \\.pl$\na       sub ()\n        NAME=%{ Enter name of subroutine: }\n        cat <<EOF > %b\n        sub\n        $NAME ()\n        {\n        } # end of $NAME()\n        EOF\n#----------------------- End [perl] language template -------------------------\n\n#---------------------- Begin [shell] language template -----------------------\n+ y Shell\\ Script | f \\.sh$\n1       Author description header\n        unset LANG\n        unset LANGUAGE\n        LC_ALL=\n        MY_UID=\"`id | sed 's/^.*uid=\\([^(]*\\).*$/\\1/'`\"\n        AUTHOR=\"`awk -F: '$3 == '$MY_UID' {print $5}' /etc/passwd`\"\n        cat >>%b <<EOF\n        #----------------------------------------------------------------------\n        # Description:\n        # Author: $AUTHOR <$REPLYTO>\n        # Created at: `date`\n        # Computer: `uname -n`\n        # System: `uname -sr` on `uname -m`\n        #\n        # Copyright (c) `date +%%Y` $AUTHOR  All rights reserved.\n        #\n        #----------------------------------------------------------------------\n        # Configure section:\n\n        #----------------------------------------------------------------------\n        #\n        # main()\n\n        EOF\n\n+ y Shell\\ Script | f \\.sh$\n3       for\n        cat <<EOF > %b\n        %ifor i in \\$\n        %ido\n        %idone\n        EOF\n\n+ y Shell\\ Script | f \\.sh$\n4       while\n        cat <<EOF > %b\n        %iwhile\n        %ido\n        %idone\n        EOF\n\n+ y Shell\\ Script | f \\.sh$\n5       if [] then else\n        cat <<EOF >> %b\n        %iif [ ];then\n        %ielse\n        %ifi\n        EOF\n\n+ y Shell\\ Script | f \\.sh$\n6       case\n        NUMBER=%{ Enter number elements of case:}\n        cat <<EOF > %b\n        %icase \"\\$\" in\n        EOF\n        while [ \"$NUMBER\" -gt 0 ]\n        do\n        cat <<EOF >> %b\n        %i)\n        %i    ;;\n        EOF\n        let NUMBER=$NUMBER-1\n        done\n        cat <<EOF >> %b\n        %i*)\n        %iesac\n        EOF\n\n+ y Shell\\ Script | f \\.sh$\n7       function\n        NAME=%{ Enter name of function:}\n        cat <<EOF >> %b\n        $NAME() {\n        } # end of $NAME()\n        EOF\n\n+ y Shell\\ Script | f \\.sh$\n8       select of bash\n        cat <<EOF >> %b\n        %iselect i in \\$l\n        %ido\n        %i    if [ -n \"\\$i\" ];then\n        %i       break\n        %i    else\n        %i       continue\n        %i    fi\n        %idone\n        EOF\n\n#----------------------- End [shell] language template ------------------------\n\n#------------------------- Begin [c] language template ------------------------\n+ f \\.h$ | f \\.c$ | f \\.cc$\n1       Author description header\n        unset LANG\n        unset LANGUAGE\n        LC_ALL=\n        MY_UID=\"`id | sed 's/^.*uid=\\([^(]*\\).*$/\\1/'`\"\n        AUTHOR=\"`awk -F: '$3 == '$MY_UID' {print $5}' /etc/passwd`\"\n        cat >> %b <<EOF\n        /********************************************************************\n        * Description:\n        * Author: $AUTHOR <$REPLYTO>\n        * Created at: `date`\n        * Computer: `uname -n`\n        * System: `uname -sr` on `uname -m`\n        *\n        * Copyright (c) `date +%%Y` $AUTHOR  All rights reserved.\n        *\n        ********************************************************************/\n        EOF\n\n+ f \\.h$ | f \\.c$ | f \\.cc$\n2       GPL description header\n        cat >>%b <<EOF\n        /*\n        *  This program is free software: you can redistribute it and/or modify\n        *  it under the terms of the GNU General Public License as published by\n        *  the Free Software Foundation, either version 3 of the License, or\n        *  (at your option) any later version.\n        *\n        *  This program is distributed in the hope that it will be useful,\n        *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n        *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n        *  GNU General Public License for more details.\n        *\n        *  You should have received a copy of the GNU General Public License\n        *  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n        */\n        EOF\n\n+ f \\.c$ | f \\.cc$\n3       if ()\n        cat <<EOF > %b\n        %iif () {\n        %i}\n        EOF\n\n+ f \\.c$ | f \\.cc$\n4       if () else\n        cat <<EOF > %b\n        %iif () {\n        %i} else {\n        %i}\n        EOF\n\n+ f \\.c$ | f \\.cc$\n5       if () else if ()\n        cat <<EOF > %b\n        %iif ( ) {\n        %i} else if ( ) {\n        %i}\n        EOF\n\n+ f \\.c$ | f \\.cc$\n6       switch ()\n        NUMBER=%{ Enter number elements of switch:}\n        echo \"%iswitch () {\" >%b\n        while [ \"$NUMBER\" -gt 0 ]\n        do\n            echo \"%icase '':\" >>%b\n            echo \"%i      break;\" >>%b\n            let NUMBER=$NUMBER-1\n        done\n        echo \"%i      default:\" >>%b\n        echo \"%i}\" >>%b\n\n+ f \\.c$ | f \\.cc$\n7       for ()\n        cat <<EOF > %b\n        %ifor (i =  ; i <  ; i++) {\n        %i}\n        EOF\n\n+ f \\.c$ | f \\.cc$\n8       while ()\n        cat <<EOF > %b\n        %iwhile () {\n        %i}\n        EOF\n\n+ f \\.c$ | f \\.cc$\n9       do {} while ()\n        cat <<EOF > %b\n        %ido {\n        %i} while ()\n        EOF\n\n+ f \\.c$ | f \\.cc$\na       array\n        cat <<EOF > %b\n        %ichar const x[] = {\n        %i, ,\n        %i};\n        EOF\n        \n+ f \\.c$ | f \\.cc$\nb       enum\n        cat <<EOF > %b\n        %ienum x {\n        %i, ,\n        %i};\n        EOF\n        \n+ f \\.c$ | f \\.cc$\nc       struct\n        cat <<EOF > %b\n        %istruct ? {\n        %i;\n        %i};\n        EOF\n\n+ f \\.c$ | f \\.cc$\nd       union\n        cat <<EOF > %b\n        %iunion ? {\n        %i;\n        %i};\n        EOF\n\n+ f \\.c$ | f \\.cc$\ne       typedef struct\n        cat <<EOF > %b\n        %itypedef struct {\n        %i;\n        %i} ?;\n        EOF\n\n+ f \\.c$ | f \\.cc$\nf       function\n        NAME=%{ Enter name of function:}\n        cat <<EOF >> %b\n        $NAME()\n        {\n        } /* end of $NAME() */\n        EOF\n\n+ f \\.c$ | f \\.h$ | f \\.cc$\ng       #include\n        INC=%{ Enter include name: }\n        if [ -r \"$INC\" ];then\n            echo \\#include \\\"$INC\\\" >%b\n        else\n            echo \\#include \\<$INC\\> >%b\n        fi\n\n+ f \\.c$ | f \\.h$ | f \\.cc$\nd       #define\n        echo \"#define \" >%b\n\n+ f \\.c$ | f \\.h$ | f \\.cc$\nd       #ifdef\n        cat <<EOF > %b\n        #ifdef\n        #else\n        #endif\n        EOF\n\n+ f \\.c$ | f \\.h$ | f \\.cc$\n...............................................................................\n\n+ f \\.c$ | f \\.h$ | f \\.cc$\nh       View all *.h into current directory\n        cat *.h |less\n\n+ f \\.c$ | f \\.cc$\nd       Run gdb for current file\n        [ -x \"./%n\" ] && gdb ./%n\n\n= f \\.c$ | f \\.cc$\n+ f \\.c$ | f \\.cc$\nc       Compile, link and run the current .c file\n        export CFLAGS=\"-g -Wall -O2\"\n        make || make %n || cc $CFLAGS -o %n %f\n        [ -r \"%n\" ] && (echo \"*** press any key for run... ***\"; read)\n        [ -x \"%n\" ] && ./%n\n        (echo -ne \"\\n--- Press any key for return to edit. ---\"; read)\n\n+ f \\.c$ | f \\.h$\nt       Indent `C' formatter\n        indent -kr -pcs %b 1>/dev/null 2> %e\n\n#--------------------- End [c/c++] language template --------------------------\n\n#------------------------- Begin unknown template -----------------------------\n+ y unknown & t r\ns       #! /bin/sh\n        echo \"#! /bin/sh\" >%b\n\n+ y unknown & t r\np       #! /usr/bin/perl\n        echo \"#! /usr/bin/perl\" >%b\n\n+ y unknown & t r\na       Author description header\n        unset LANG\n        unset LANGUAGE\n        LC_ALL=\n        MY_UID=\"`id | sed 's/^.*uid=\\([^(]*\\).*$/\\1/'`\"\n        AUTHOR=\"`awk -F: '$3 == '$MY_UID' {print $5}' /etc/passwd`\"\n        cat >>%b <<EOF\n        ----------------------------------------------------------------------\n        Description:\n        Author: $AUTHOR <$REPLYTO>\n        Created at: `date`\n        Computer: `uname -n` \n        System: `uname -sr` on `uname -m`\n\n        Copyright (c) `date +%%Y` $AUTHOR  All rights reserved.\n        ----------------------------------------------------------------------\n\n        EOF\n#--------------------------- End unknown template -----------------------------\n\n-------------------------------------------------------------------------------\n\n#----------------------- Begin common section ---------------------------------\nS       Sort selection\n        TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1\n        cat %b > $TMPFILE\n        cat $TMPFILE| sort >%b\n        rm -f $TMPFILE\n\nI       Insert `Changelog' string\n        DATE=\"`date +%%Y-%%m-%%d`\"\n        MY_UID=\"`id | sed 's/^.*uid=\\([^(]*\\).*$/\\1/'`\"\n        AUTHOR=\"`awk -F: '$3 == '$MY_UID' {print $5}' /etc/passwd`\"\n        EMAIL=\"<$REPLYTO>\"\n        echo \"$DATE  $AUTHOR  $EMAIL\" >%b\n\ns       Invoke `shell'\n        sh\n\nm       view `man'\n        MAN=%{Enter name of man:}\n        TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/mcview.$MAN.XXXXXX` || exit 1\n        man -Pcat $MAN >$TMPFILE\n        mcview $TMPFILE\n        rm -f $TMPFILE\n\ni       Insert a out of command to cursor.\n        CMD=%{ Enter command: }\n        eval $CMD > %b\n\no       Open bash to next free console\n        open -s -- /bin/bash\n\nu       Upper case selection\n        TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1\n        cat %b > $TMPFILE\n        cat $TMPFILE| sed 's/\\(.*\\)/\\U\\1/' >%b\n        rm -f $TMPFILE\n\nl       Lower case selection\n        TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1\n        cat %b > $TMPFILE\n        cat $TMPFILE| sed 's/\\(.*\\)/\\U\\1/' >%b\n        rm -f $TMPFILE\n\n#-------------------------- End of common section -----------------------------\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/etc/panels.ini",
    "content": "[New Left Panel]\ndisplay=listing\nreverse=0\ncase_sensitive=1\nexec_first=0\nsort_order=name\nlist_mode=full\nuser_format=half type name | size | perm\nuser_status0=half type name | size | perm\nuser_status1=half type name | size | perm\nuser_status2=half type name | size | perm\nuser_status3=half type name | size | perm\nuser_mini_status=0\n\n[New Right Panel]\ndisplay=listing\nreverse=0\ncase_sensitive=1\nexec_first=0\nsort_order=name\nlist_mode=full\nuser_format=half type name | size | perm\nuser_status0=half type name | size | perm\nuser_status1=half type name | size | perm\nuser_status2=half type name | size | perm\nuser_status3=half type name | size | perm\nuser_mini_status=0\n\n[Dirs]\nother_dir=/\ncurrent_is_left=false\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/etc/sfs.ini",
    "content": "#\n# This is config for Single File fileSystem\n#\n# Notice that output files (%3) are pre-created atomically in /tmp\n# with 0600 rights, so it is safe to > %3\n#\ngz/1\tgzip < %1 > %3\nugz/1\tgzip -cdf < %1 > %3\nbz/1\tbzip < %1 > %3\nubz/1\tbzip -d < %1 > %3\nbz2/1\tbzip2 < %1 > %3\nubz2/1\tbzip2 -d < %1 > %3\nlzma/1\tlzma < %1 > %3\nulzma/1\tlzma -d < %1 > %3\nxz/1\txz < %1 > %3\nuxz/1\txz -d < %1 > %3\ntar/1\ttar cf %3 %1\ntgz/1\ttar czf %3 %1\nuhtml/1\tlynx -force_html -dump %1 > %3\numan/1\tgroff -Tascii -man %1 > %3\nuue/1\tuuenpipe < %1 > %3\nuude/1\tuudepipe < %1 > %3\ncrlf/1\ttodos < %1 > %3\ncr/1\tfromdos < %1 > %3\n# Fixme: we need it to fail whenever it should\nurl:2\tlynx -source `echo \"%2\" | sed 's-|-/-g'` > %3\nnop/1\tcat %1 > %3\nstrings/1\tstrings %1 > %3\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2011-present AlexELEC (http://alexelec.in.ua)\n\nPKG_NAME=\"MC\"\nPKG_VERSION=\"4.8.22\"\nPKG_SHA256=\"ee7868d7ba0498cf2cccefe107d7efee7f2571098806bba2aed5a159db801318\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.midnight-commander.org/\"\nPKG_URL=\"http://ftp.midnight-commander.org/mc-${PKG_VERSION}.tar.xz\"\nPKG_SOURCE_NAME=\"${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libtool:host gettext:host glib libssh2 pcre slang\"\nPKG_LONGDESC=\"Midnight Commander is a visual file manager\"\nPKG_TOOLCHAIN=\"configure\"\n\nPKG_CONFIGURE_OPTS_TARGET=\" \\\n  --prefix=/usr \\\n  --sysconfdir=/etc \\\n  --with-screen=slang \\\n  --with-sysroot=${SYSROOT_PREFIX} \\\n  --disable-aspell \\\n  --without-diff-viewer \\\n  --disable-doxygen-doc \\\n  --disable-doxygen-dot \\\n  --disable-doxygen-html \\\n  --with-gnu-ld \\\n  --without-libiconv-prefix \\\n  --without-libintl-prefix \\\n  --without-gpm-mouse \\\n  --disable-mclib \\\n  --with-subshell \\\n  --with-edit \\\n  --with-internal-edit \\\n  --enable-vfs-extfs \\\n  --enable-vfs-ftp \\\n  --enable-vfs-sftp \\\n  --enable-vfs-tar \\\n  --without-x \\\n  --with-slang-includes=${SYSROOT_PREFIX}/usr/include\"\n\npre_configure_target() {\n  LDFLAGS=\"${LDFLAGS} -lcrypto -lssl\"\n}\n\npost_install() {\n  rm -rf ${INSTALL}/etc/mc\n  mkdir -p  ${INSTALL}/usr/config/mc\n    cp -a ${PKG_DIR}/etc/* ${INSTALL}/usr/config/mc\n    ln -sf /storage/.config/mc ${INSTALL}/etc/mc\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/patches/MC-01-utf8.patch",
    "content": "diff -Naurp mc-4.8.8/lib/strutil/strutil.c mc-4.8.8-patch/lib/strutil/strutil.c\n--- mc-4.8.8/lib/strutil/strutil.c\t2013-03-07 12:45:57.000000000 +0200\n+++ mc-4.8.8-patch/lib/strutil/strutil.c\t2013-05-14 09:39:14.000000000 +0300\n@@ -322,16 +322,7 @@ str_translate_char (GIConv conv, const c\n const char *\n str_detect_termencoding (void)\n {\n-    if (term_encoding == NULL)\n-    {\n-        /* On Linux, nl_langinfo (CODESET) returns upper case UTF-8 whether the LANG is set\n-           to utf-8 or UTF-8.\n-           On Mac OS X, it returns the same case as the LANG input.\n-           So let tranform result of nl_langinfo (CODESET) to upper case  unconditionally. */\n-        term_encoding = g_ascii_strup (nl_langinfo (CODESET), -1);\n-    }\n-\n-    return term_encoding;\n+    return \"UTF8\";\n }\n \n static int\ndiff -Naurp mc-4.8.8/lib/tty/tty-slang.c mc-4.8.8-patch/lib/tty/tty-slang.c\n--- mc-4.8.8/lib/tty/tty-slang.c\t2013-03-07 12:45:57.000000000 +0200\n+++ mc-4.8.8-patch/lib/tty/tty-slang.c\t2013-05-14 09:40:10.000000000 +0300\n@@ -268,7 +268,7 @@ tty_init (gboolean mouse_enable, gboolea\n {\n     SLtt_Ignore_Beep = 1;\n \n-    SLutf8_enable (-1);         /* has to be called first before any of the other functions. */\n+    SLutf8_enable (1);         /* has to be called first before any of the other functions. */\n     SLtt_get_terminfo ();\n     /*\n      * If the terminal in not in terminfo but begins with a well-known\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/MC/profile.d/52-mc.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2011-present AlexELEC (http://alexelec.in.ua)\n\nexport EDITOR=\"mcedit\"\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/SDL_GameControllerDB/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n\nPKG_NAME=\"SDL_GameControllerDB\"\nPKG_VERSION=\"cead9cccf79c0865cf8c2b7b652867372d63cd6e\"\nPKG_SHA256=\"af45411e7b4a24b91f267cf2281c63df209e7552f41f29d9a4261a50363811e5\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://github.com/gabomdq/SDL_GameControllerDB\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A community sourced database of game controller mappings to be used with SDL2 Game Controller functionality\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_configure_target() {\n# These maps are old, we use our own\nsed -i \"s/19000000010000000100000001010000,odroid/# 19000000010000000100000001010000,odroid/g\" gamecontrollerdb.txt\nsed -i \"s/19000000010000000200000011000000,odroid/# 19000000010000000200000011000000,odroid/g\" gamecontrollerdb.txt\nsed -i \"s/03000000d11800000094000011010000,Stadia Controller/# 03000000d11800000094000011010000,Stadia Controller/g\" gamecontrollerdb.txt\nsed -i \"s/030000004c0500006802000011810000,PS3 Controller/# 030000004c0500006802000011810000,PS3 Controller/g\" gamecontrollerdb.txt\nsed -i \"s/030005ff6d0400001dc2000014400000,Logitech Gamepad F310/# 030005ff6d0400001dc2000014400000,Logitech Gamepad F310/g\" gamecontrollerdb.txt\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/config/SDL-GameControllerDB\n  cp ${PKG_BUILD}/gamecontrollerdb.txt ${INSTALL}/usr/config/SDL-GameControllerDB\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/SDL_GameControllerDB/patches/add-emuelec-gamepads.patch",
    "content": "--- a/gamecontrollerdb.txt\n+++ b/gamecontrollerdb.txt\n@@ -1,5 +1,20 @@\n # Game Controller DB for SDL in 2.0.9 format\n # Source: https://github.com/gabomdq/SDL_GameControllerDB\n+\n+# EmuELEC extra gamepads\n+030000004c0500006802000011810000,Sony PLAYSTATION(R)3 Controller,platform:Linux,dpleft:b15,rightx:a3,dpright:b16,rightshoulder:b5,dpdown:b14,righty:a4,leftshoulder:b4,y:b3,x:b2,b:b0,a:b1,dpup:b13,back:b8,leftstick:b11,start:b9,lefty:a1,guide:b8,lefttrigger:a2,righttrigger:a5,rightstick:b12,leftx:a0,\n+030005ff6d0400001dc2000014400000,Logitech Gamepad F310,dpleft:h0.8,rightx:a3,dpright:h0.2,rightshoulder:b5,dpdown:h0.4,righty:a4,leftshoulder:b4,y:b2,x:b3,b:b0,a:b1,dpup:h0.1,back:b6,leftstick:b9,start:b7,lefty:a1,guide:b8,lefttrigger:a2,righttrigger:a5,rightstick:b10,leftx:a0,platform:Linux,\n+030000004c0500006802000011810000,Sony PLAYSTATION(R)3 Controller,platform:Linux,dpleft:b15,rightx:a3,dpright:b16,rightshoulder:b5,dpdown:b14,righty:a4,leftshoulder:b4,y:b3,x:b2,b:b0,a:b1,dpup:b13,back:b8,leftstick:b11,start:b9,lefty:a1,guide:b8,lefttrigger:a2,righttrigger:a5,rightstick:b12,leftx:a0,\n+190000004b4800000010000000010000,GO-Advance Gamepad,platform:Linux,a:b0,b:b1,x:b3,y:b2,back:b10,start:b15,leftstick:b12,rightstick:b13,leftshoulder:b4,rightshoulder:b5,dpup:b6,dpdown:b7,dpleft:b8,dpright:b9,leftx:a0,lefty:a1,lefttrigger:b11,righttrigger:b14,\n+190000004b4800000010000001010000,GO-Advance Gamepad (rev 1.1),platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b12,guide:b13,start:b17,dpleft:b10,dpdown:b9,dpright:b11,dpup:b8,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,rightstick:b16,leftx:a0,lefty:a1,\n+190000004b4800000011000000010000,GO-Super Gamepad,platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b12,guide:b16,start:b13,dpleft:b10,dpdown:b9,dpright:b11,dpup:b8,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b14,rightstick:b17,leftx:a0,lefty:a1,rightx:a2,righty:a3,\n+19000000030000000300000002030000,gameforce_gamepad,platform:Linux,leftstick:b14,rightx:a3,leftshoulder:b4,start:b9,lefty:a0,dpup:b10,righty:a2,a:b1,b:b0,guide:b16,dpdown:b11,rightshoulder:b5,righttrigger:b7,rightstick:b15,dpright:b13,x:b2,back:b8,leftx:a1,y:b3,dpleft:b12,lefttrigger:b6,\n+05000000c82d00000021000000010000,8BitDo SN30 Pro for Android,platform:Linux,x:b3,a:b0,b:b1,y:b4,back:b10,guide:b12,start:b11,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,rightshoulder:b7,righttrigger:b9,leftstick:b13,rightstick:b14,leftx:a0,lefty:a1,rightx:a2,righty:a5,\n+03000000c82d00000031000011010000,8BitDo 8BitDo Receiver,platform:Linux,x:b3,a:b0,b:b1,y:b4,back:b10,guide:b2,start:b11,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,rightshoulder:b7,righttrigger:b9,leftstick:b13,rightstick:b14,leftx:a0,lefty:a1,rightx:a2,righty:a3, \n+03000000d11800000094000011010000,Google LLC Stadia Controller rev. A,platform:Linux,leftstick:b9,rightx:a2,leftshoulder:b4,start:b7,lefty:a1,dpup:h0.1,righty:a3,a:b1,b:b0,guide:b8,dpdown:h0.4,rightshoulder:b5,righttrigger:b13,rightstick:b10,dpright:h0.2,x:b3,back:b6,leftx:a0,y:b2,dpleft:h0.8,lefttrigger:b14,\n+03000000790000001100000010010000,iNNEXT SNES Retro USB Controller,platform:Linux,leftshoulder:b4,start:b9,dpup:a1,a:b1,b:b2,guide:b8,dpdown:a1,rightshoulder:b5,dpright:a0,x:b0,back:b8,y:b3,dpleft:a0,\n+03000000100800000100000010010000,PlayGame PS2-like Controller,platform:Linux,leftstick:b10,rightx:a3,leftshoulder:b4,start:b9,lefty:a1,dpup:h0.1,righty:a2,a:b1,b:b2,guide:b8,dpdown:h0.4,rightshoulder:b5,righttrigger:b7,rightstick:b11,dpright:h0.2,x:b0,back:b8,leftx:a0,y:b3,dpleft:h0.8,lefttrigger:b6,\n+050000007e0500000920000001000000,8BitDo SN30 pro,platform:Linux,leftstick:b10,rightx:a2,leftshoulder:b4,start:b9,lefty:a1,dpup:h0.1,righty:a3,a:b1,b:b0,guide:b13,dpdown:h0.4,rightshoulder:b5,righttrigger:b7,rightstick:b11,dpright:h0.2,x:b3,back:b8,leftx:a0,y:b2,dpleft:h0.8,lefttrigger:b6,\n \n # Windows\n 03000000fa2d00000100000000000000,3DRUDDER,leftx:a0,lefty:a1,rightx:a5,righty:a2,platform:Windows,\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/TvTextViewer/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"TvTextViewer\"\nPKG_VERSION=\"f3d2ecd7276a2fb44c0dbbd163b837feb8dc4aa1\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/lethal-guitar/TvTextViewer\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_SHORTDESC=\"Full-screen text viewer tool with gamepad controls\"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\nsed -i \"s|\\`sdl2-config|\\`${SYSROOT_PREFIX}/usr/bin/sdl2-config|g\" Makefile\n}\n\nmakeinstall_target(){\nmkdir -p ${INSTALL}/usr/bin\ncp text_viewer ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/bluetool/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n# Based on libreelec pycryptodome package\n\nPKG_NAME=\"bluetool\"\nPKG_VERSION=\"29570c71ed77d0db0ef19ac8d2172e8989fcecac\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/emlid/bluetool\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"Python3 dbus-python tcpbridge\"\nPKG_LONGDESC=\"A simple Python API for Bluetooth D-Bus calls. Allows easy pairing, connecting and scanning.Also provides a TCP-to-RFCOMM socket bridge for data transfer.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n  export LDSHARED=\"${CC} -shared\"\n}\n\nmake_target() {\n  python setup.py build\n}\n\nmakeinstall_target() {\n  python setup.py install --root=${INSTALL} --prefix=/usr\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/bluetool/patches/12.patch",
    "content": "--- a/bluetool/__init__.py\n+++ b/bluetool/__init__.py\n@@ -2,3 +2,4 @@\n from .blueserver import BluetoothServer\n \n __all__ = ['Bluetooth', 'BluetoothServer']\n+from tcpbridge import TCPBridge, TCPBridgeError, TCPServer, SocketSink, FileSink\n--- a/bluetool/blueserver.py\n+++ b/bluetool/blueserver.py\n@@ -29,6 +29,8 @@\n import socket\n \n try:\n+    import pgi\n+    pgi.install_as_gi()\n     from gi.repository import GObject\n except ImportError:\n     import gobject as GObject\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/coreutils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"coreutils\"\nPKG_VERSION=\"8.31\"\nPKG_SHA256=\"ff7a9c918edce6b4f4b2725e3f9b37b0c4d193531cac49a48b56c4d0d3a9e9fd\"\nPKG_LICENSE=\"GPLv2+\"\nPKG_SITE=\"https://www.gnu.org/software/coreutils/\"\nPKG_URL=\"https://ftp.gnu.org/gnu/coreutils/coreutils-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"The GNU Core Utilities are the basic file, shell and text manipulation utilities of the GNU operating system.\"\nPKG_TOOLCHAIN=\"auto\"\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp ${PKG_BUILD}/.${TARGET_NAME}/src/stdbuf ${INSTALL}/usr/bin/\ncp ${PKG_BUILD}/.${TARGET_NAME}/src/timeout ${INSTALL}/usr/bin/\ncp ${PKG_BUILD}/.${TARGET_NAME}/src/sort ${INSTALL}/usr/bin/\nmkdir -p ${INSTALL}/usr/lib/coreutils\ncp ${PKG_BUILD}/.${TARGET_NAME}/src/libstdbuf.so ${INSTALL}/usr/lib/coreutils/\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/dasbus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n# Based on libreelec pycryptodome package\n\nPKG_NAME=\"dasbus\"\nPKG_VERSION=\"592f444f91707e6a23efe587b01592d09b3541f7\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/rhinstaller/dasbus\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"Python3 dbus-python tcpbridge\"\nPKG_LONGDESC=\"DBus library in Python 3 \"\nPKG_TOOLCHAIN=\"manual\"\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n  export LDSHARED=\"${CC} -shared\"\n}\n\nmake_target() {\n  python setup.py build\n}\n\nmakeinstall_target() {\n  python setup.py install --root=${INSTALL} --prefix=/usr\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/dialog/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"dialog\"\nPKG_VERSION=\"1.3-20220117\"\nPKG_SHA256=\"754cb6bf7dc6a9ac5c1f80c13caa4d976e30a5a6e8b46f17b3bb9b080c31041f\"\nPKG_LICENSE=\"GNU-2.1\"\nPKG_SITE=\"https://invisible-mirror.net/archives/dialog\"\nPKG_URL=\"${PKG_SITE}/dialog-${PKG_VERSION}.tgz\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses\"\nPKG_LONGDESC=\"This version of dialog, formerly known as cdialog is based on the Debian package for dialog 0.9a\"\nPKG_TOOLCHAIN=\"auto\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-ncurses --disable-rpath-hack\"\n\n\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/ee_utils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2025-present EmuELEC (https://github.com/EmuELEC)\n\nPKG_NAME=\"ee_utils\"\nPKG_VERSION=\"v1\"\nPKG_LICENSE=\"Public Domain\"\nPKG_SITE=\"https://emuelec.org\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\"Misc EmuELEC specific utils\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n\tmkdir -p bin\n    ${CC} -O2 ees.c -o bin/ees\n    ${CC} -O2 ee_asd.c -o bin/ee_asd\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp bin/* ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/ee_utils/sources/ee_asd.c",
    "content": "// autoshutdown.c\r\n#define _GNU_SOURCE\r\n#include <stdio.h>\r\n#include <stdlib.h>\r\n#include <unistd.h>\r\n#include <fcntl.h>\r\n#include <string.h>\r\n#include <time.h>\r\n#include <errno.h>\r\n#include <stdarg.h>\r\n#include <signal.h>\r\n#include <sys/types.h>\r\n#include <sys/stat.h>\r\n#include <sys/ioctl.h>\r\n#include <sys/poll.h>\r\n#include <sys/resource.h>\r\n#include <sched.h>\r\n#include <linux/input.h>\r\n#include <dirent.h>\r\n\r\n#define LOG_FILE \"/emuelec/logs/shutdowntimer.log\"\r\n#define PID_FILE \"/tmp/autoshutdown.pid\"\r\n#define MAX_DEVICES 32\r\n#define POLL_TIMEOUT_MS 5000  // Check every 5 seconds instead of 1\r\n\r\nstatic FILE *log_fp = NULL;\r\nstatic time_t last_activity;\r\nstatic volatile int running = 1;\r\nstatic int debug_mode = 0;\r\n\r\nstatic int check_debug_mode() {\r\n    // get_es_setting is defined in /etc/profile, so we need to source it first\r\n    FILE *fp = popen(\". /etc/profile && get_es_setting string LogLevel\", \"r\");\r\n    if (!fp) return 0;\r\n    \r\n    char result[64] = {0};\r\n    if (fgets(result, sizeof(result), fp) != NULL) {\r\n        result[strcspn(result, \"\\n\")] = 0;\r\n        pclose(fp);\r\n        return (strcmp(result, \"debug\") == 0);\r\n    }\r\n    pclose(fp);\r\n    return 0;\r\n}\r\n\r\nstatic void log_msg(const char *level, const char *fmt, ...) {\r\n\t\r\n\tif (strcmp(level, \"SUCCESS\") != 0) {\r\n\t\tif (!debug_mode) return;\r\n\t}\r\n    \r\n    if (!log_fp) return;\r\n    \r\n    va_list args;\r\n    va_start(args, fmt);\r\n    time_t t = time(NULL);\r\n    struct tm tm;\r\n    localtime_r(&t, &tm);\r\n    char buf[64];\r\n    strftime(buf, sizeof(buf), \"%Y-%m-%d %H:%M:%S\", &tm);\r\n    fprintf(log_fp, \"[%s] [%s] \", buf, level);\r\n    vfprintf(log_fp, fmt, args);\r\n    fprintf(log_fp, \"\\n\");\r\n    fflush(log_fp);\r\n    va_end(args);\r\n}\r\n\r\nstatic void cleanup(int signum) {\r\n    log_msg(\"INFO\", \"Received signal %d, exiting...\", signum);\r\n    running = 0;\r\n}\r\n\r\nstatic void perform_action(const char *action) {\r\n    if (!action) return;\r\n    if (strcmp(action, \"shutdown\") == 0) {\r\n        log_msg(\"SUCCESS\", \"No activity detected: calling shutdown, bye :-)\");\r\n        system(\". /etc/profile && shutdown\");\r\n    } else {\r\n        log_msg(\"INFO\", \"No activity detected: killing process %s\", action);\r\n        char cmd[256];\r\n        snprintf(cmd, sizeof(cmd), \"pkill -TERM %s\", action);\r\n        system(cmd);\r\n    }\r\n}\r\n\r\nstatic int is_relevant_device(const char *path) {\r\n    int fd = open(path, O_RDONLY);\r\n    if (fd < 0) return 0;\r\n    \r\n    // Check if device supports the event types we care about\r\n    unsigned long evbit[EV_MAX/sizeof(long)/8 + 1] = {0};\r\n    if (ioctl(fd, EVIOCGBIT(0, sizeof(evbit)), evbit) < 0) {\r\n        close(fd);\r\n        return 0;\r\n    }\r\n    \r\n    // Only monitor devices with keys, relative movement, or absolute positioning\r\n    int relevant = (evbit[0] & (1 << EV_KEY)) || \r\n                   (evbit[0] & (1 << EV_REL)) || \r\n                   (evbit[0] & (1 << EV_ABS));\r\n    close(fd);\r\n    return relevant;\r\n}\r\n\r\nstatic int is_motion_sensor_event(struct input_event *ev) {\r\n    // Filter out motion sensor axes commonly used by PS3/PS4/PS5 controllers\r\n    // These axes constantly send data even when controller is sitting still\r\n    if (ev->type == EV_ABS) {\r\n        switch (ev->code) {\r\n            // Accelerometer axes\r\n            case ABS_RX:  // Often used for accelerometer X\r\n            case ABS_RY:  // Often used for accelerometer Y  \r\n            case ABS_RZ:  // Often used for accelerometer Z\r\n            // Gyroscope axes (some controllers)\r\n            case ABS_TILT_X:\r\n            case ABS_TILT_Y:\r\n            // Other motion/orientation sensors\r\n            case ABS_DISTANCE:\r\n            case ABS_MISC:\r\n                return 1;  // This is likely motion sensor data\r\n            default:\r\n                return 0;  // Legitimate analog stick/trigger input\r\n        }\r\n    }\r\n    return 0;\r\n}\r\n\r\nstatic int open_input_devices(struct pollfd *pfds, int max_devices) {\r\n    DIR *dir = opendir(\"/dev/input\");\r\n    if (!dir) {\r\n        log_msg(\"ERROR\", \"Cannot open /dev/input: %s\", strerror(errno));\r\n        return 0;\r\n    }\r\n\r\n    struct dirent *entry;\r\n    int count = 0;\r\n    while ((entry = readdir(dir)) != NULL && count < max_devices) {\r\n        if (strncmp(entry->d_name, \"event\", 5) == 0) {\r\n            char path[256];\r\n            snprintf(path, sizeof(path), \"/dev/input/%s\", entry->d_name);\r\n            \r\n            // Skip irrelevant devices\r\n            if (!is_relevant_device(path)) {\r\n                continue;\r\n            }\r\n            \r\n            int fd = open(path, O_RDONLY | O_NONBLOCK);\r\n            if (fd >= 0) {\r\n                pfds[count].fd = fd;\r\n                pfds[count].events = POLLIN;\r\n                log_msg(\"INFO\", \"Monitoring device: %s\", path);\r\n                count++;\r\n            } else {\r\n                log_msg(\"WARN\", \"Failed to open %s: %s\", path, strerror(errno));\r\n            }\r\n        }\r\n    }\r\n    closedir(dir);\r\n    return count;\r\n}\r\n\r\nstatic int read_timer_from_ees() {\r\n    FILE *fp = popen(\"ees -e -r ee_auto_shutdown_timeout\", \"r\");\r\n    if (!fp) return 0;\r\n    int t = 0;\r\n    if (fscanf(fp, \"%d\", &t) != 1) t = 0;\r\n    pclose(fp);\r\n    return t;\r\n}\r\n\r\nstatic void set_low_priority() {\r\n    // Set to lowest priority nice value\r\n    if (setpriority(PRIO_PROCESS, 0, 19) < 0) {\r\n        log_msg(\"WARN\", \"Failed to set nice priority: %s\", strerror(errno));\r\n    }\r\n    \r\n    // Set idle I/O scheduling class (best effort, class 3, lowest priority)\r\n    // This requires ioprio_set syscall which isn't in libc\r\n    // We'll skip this for simplicity, but it could be added via syscall()\r\n}\r\n\r\nint main(int argc, char *argv[]) {\r\n    int timeout_minutes = 0;\r\n    const char *action = \"shutdown\";\r\n\r\n    // Check if debug mode is enabled BEFORE forking\r\n    debug_mode = check_debug_mode();\r\n\r\n    // Open log only if debug mode is enabled\r\n    if (debug_mode) {\r\n        log_fp = fopen(LOG_FILE, \"w+\");\r\n        if (!log_fp) {\r\n            perror(\"Failed to open log file\");\r\n            return 1;\r\n        }\r\n    }\r\n\r\n    // Parse arguments\r\n    int opt;\r\n    while ((opt = getopt(argc, argv, \"t:p:\")) != -1) {\r\n        switch (opt) {\r\n            case 't': timeout_minutes = atoi(optarg); break;\r\n            case 'p': action = optarg; break;\r\n            default: break;\r\n        }\r\n    }\r\n\r\n    // Auto-mode if no timer specified\r\n    if (timeout_minutes <= 0) {\r\n        timeout_minutes = read_timer_from_ees();\r\n        if (timeout_minutes <= 0) {\r\n            log_msg(\"INFO\", \"Auto-mode timer is 0 or undefined. Exiting.\");\r\n            if (log_fp) fclose(log_fp);\r\n            return 2;  // Exit code 2: no timer configured\r\n        }\r\n        log_msg(\"INFO\", \"Auto-mode timer: %d minutes\", timeout_minutes);\r\n    }\r\n\r\n    int limit_seconds = timeout_minutes * 60;\r\n    last_activity = time(NULL);\r\n\r\n    // Setup signal handlers\r\n    signal(SIGTERM, cleanup);\r\n    signal(SIGINT, cleanup);\r\n\r\n    // Daemonize\r\n    pid_t pid = fork();\r\n    if (pid < 0) exit(1);\r\n    if (pid > 0) exit(0); // parent exits\r\n    umask(0);\r\n    setsid();\r\n    chdir(\"/\");\r\n    \r\n    // Close standard file descriptors after forking to avoid interference\r\n    close(STDIN_FILENO);\r\n    close(STDOUT_FILENO);\r\n    close(STDERR_FILENO);\r\n\r\n    // Set low priority to minimize impact\r\n    set_low_priority();\r\n\r\n    // Write PID file\r\n    FILE *pid_fp = fopen(PID_FILE, \"w\");\r\n    if (pid_fp) {\r\n        fprintf(pid_fp, \"%d\\n\", getpid());\r\n        fclose(pid_fp);\r\n        log_msg(\"INFO\", \"PID file created at %s\", PID_FILE);\r\n    } else {\r\n        log_msg(\"WARN\", \"Cannot write PID file: %s\", strerror(errno));\r\n    }\r\n\r\n    // Open input devices\r\n    struct pollfd pfds[MAX_DEVICES];\r\n    int num_fds = open_input_devices(pfds, MAX_DEVICES);\r\n    if (num_fds == 0) {\r\n        log_msg(\"ERROR\", \"No input devices found, exiting\");\r\n        if (log_fp) fclose(log_fp);\r\n        remove(PID_FILE);\r\n        return 1;\r\n    }\r\n\r\n    log_msg(\"SUCCESS\", \"Autoshutdown started: timeout=%d minutes, action=%s, poll_interval=%dms\", \r\n            timeout_minutes, action, POLL_TIMEOUT_MS);\r\n\r\n    struct input_event ev;\r\n    char device_name[256];\r\n    time_t last_check = time(NULL);\r\n\r\n    while (running) {\r\n        int activity_detected = 0;\r\n\r\n        // Poll with longer timeout to reduce CPU wake-ups\r\n        int ret = poll(pfds, num_fds, POLL_TIMEOUT_MS);\r\n        \r\n        if (ret > 0) {\r\n            // Drain all pending events efficiently\r\n            for (int i = 0; i < num_fds; i++) {\r\n                if (pfds[i].revents & POLLIN) {\r\n                    // Read and discard events - we only care that SOMETHING happened\r\n                    while (read(pfds[i].fd, &ev, sizeof(ev)) > 0) {\r\n                        // Check if this is legitimate input (not motion sensor noise)\r\n                        if (ev.type == EV_KEY || ev.type == EV_REL) {\r\n                            activity_detected = 1;\r\n                        } else if (ev.type == EV_ABS && !is_motion_sensor_event(&ev)) {\r\n                            activity_detected = 1;\r\n\t\t\t\t\t\t\t// Uncomment for detailed activity logging in debug mode \r\n                            if (ioctl(pfds[i].fd, EVIOCGNAME(sizeof(device_name)), device_name) >= 0) { \r\n                                log_msg(\"INFO\", \"Activity detected on %s\", device_name); \r\n                            } else { \r\n                                log_msg(\"INFO\", \"Activity detected on fd %d\", pfds[i].fd); \r\n                            }   \r\n                        }\r\n                    }\r\n                }\r\n                // Handle errors/hangups by reopening device\r\n                if (pfds[i].revents & (POLLERR | POLLHUP | POLLNVAL)) {\r\n                    close(pfds[i].fd);\r\n                    pfds[i].fd = -1;\r\n                    log_msg(\"WARN\", \"Device fd %d disconnected\", i);\r\n                }\r\n            }\r\n        }\r\n\r\n        if (activity_detected) {\r\n            last_activity = time(NULL);\r\n        }\r\n\r\n        // Only check time periodically to reduce syscalls\r\n        time_t now = time(NULL);\r\n        if (now - last_check >= 1) {\r\n            last_check = now;\r\n            if (difftime(now, last_activity) > limit_seconds) {\r\n                perform_action(action);\r\n                break;\r\n            }\r\n        }\r\n    }\r\n\r\n    // Cleanup\r\n    for (int i = 0; i < num_fds; i++) {\r\n        if (pfds[i].fd >= 0) close(pfds[i].fd);\r\n    }\r\n    if (log_fp) fclose(log_fp);\r\n    remove(PID_FILE);\r\n\r\n    return 0;\r\n}\r\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/ee_utils/sources/ees.c",
    "content": "/*\n\tees - EmuELEC setter\n* \nUsage:\n  RetroArch config:\n    ees -s <key> -v <value> [-o file]  Set a setting\n    ees -r <key> [-o file]             Read a setting\n    ees -i <changes.cfg> [-o out]      Merge changes\n\n  EmuELEC emuelec.conf config (enable with -e):\n    ees -e -s <key> -v <value> -p <platform> [-m <rom>]\n                                   Set setting (uses $EE_CONF)\n    ees -e -r <key> -p <platform> [-m <rom>]\n                                   Read setting with priority:\n                                   ROM -> Platform -> Global -> Standalone\n\nEnvironment variables:\n  RA_CONF - path to retroarch.cfg (default: /storage/.config/retroarch/retroarch.cfg)\n  EE_CONF - path to emuelec.conf (default: /storage/.config/emuelec/configs/emuelec.conf)\n\nNote: -o specifies output file (for -s/-r, uses $RA_CONF if not specified)\n Compile: gcc -O2 -o ras ras.c\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <ctype.h>\n#include <unistd.h>\n\n#define MAX_LINE 2048\n#define MAX_KEY 256\n#define MAX_VALUE 1024\n#define HASH_SIZE 1024\n\ntypedef struct Entry {\n    char *key;\n    char *value;\n    struct Entry *next;\n} Entry;\n\ntypedef struct {\n    Entry *buckets[HASH_SIZE];\n} HashMap;\n\n/* Simple hash function */\nunsigned int hash(const char *str) {\n    unsigned int h = 5381;\n    int c;\n    while ((c = *str++))\n        h = ((h << 5) + h) + c;\n    return h % HASH_SIZE;\n}\n\n/* Create new hashmap */\nHashMap* hashmap_create() {\n    HashMap *map = calloc(1, sizeof(HashMap));\n    return map;\n}\n\n/* Trim whitespace from both ends */\nchar* trim(char *str) {\n    char *end;\n    while (isspace((unsigned char)*str)) str++;\n    if (*str == 0) return str;\n    end = str + strlen(str) - 1;\n    while (end > str && isspace((unsigned char)*end)) end--;\n    end[1] = '\\0';\n    return str;\n}\n\n/* Insert or update key-value pair */\nvoid hashmap_put(HashMap *map, const char *key, const char *value) {\n    unsigned int h = hash(key);\n    Entry *e = map->buckets[h];\n    \n    /* Check if key exists, update if found */\n    while (e) {\n        if (strcmp(e->key, key) == 0) {\n            free(e->value);\n            e->value = strdup(value);\n            return;\n        }\n        e = e->next;\n    }\n    \n    /* New entry */\n    e = malloc(sizeof(Entry));\n    e->key = strdup(key);\n    e->value = strdup(value);\n    e->next = map->buckets[h];\n    map->buckets[h] = e;\n}\n\n/* Get value for key */\nconst char* hashmap_get(HashMap *map, const char *key) {\n    unsigned int h = hash(key);\n    Entry *e = map->buckets[h];\n    \n    while (e) {\n        if (strcmp(e->key, key) == 0)\n            return e->value;\n        e = e->next;\n    }\n    return NULL;\n}\n\n/* Parse a config line: key = \"value\" or key = value */\nint parse_line(char *line, char *key, char *value) {\n    char *eq, *val_start, *val_end;\n    \n    /* Skip comments and empty lines */\n    char *trimmed = trim(line);\n    if (trimmed[0] == '#' || trimmed[0] == '\\0')\n        return 0;\n    \n    /* Find the = sign */\n    eq = strchr(trimmed, '=');\n    if (!eq) return 0;\n    \n    /* Extract key */\n    *eq = '\\0';\n    strncpy(key, trim(trimmed), MAX_KEY - 1);\n    key[MAX_KEY - 1] = '\\0';\n    \n    /* Extract value */\n    val_start = trim(eq + 1);\n    \n    /* Remove quotes if present */\n    if (val_start[0] == '\"') {\n        val_start++;\n        val_end = strrchr(val_start, '\"');\n        if (val_end) *val_end = '\\0';\n    }\n    \n    strncpy(value, val_start, MAX_VALUE - 1);\n    value[MAX_VALUE - 1] = '\\0';\n    \n    return 1;\n}\n\n/* Load config file into hashmap */\nint load_config(const char *filename, HashMap *map) {\n    FILE *f = fopen(filename, \"r\");\n    if (!f) {\n        return 0;\n    }\n    \n    char line[MAX_LINE];\n    char key[MAX_KEY], value[MAX_VALUE];\n    \n    while (fgets(line, sizeof(line), f)) {\n        if (parse_line(line, key, value)) {\n            hashmap_put(map, key, value);\n        }\n    }\n    \n    fclose(f);\n    return 1;\n}\n\n/* Write hashmap to config file */\nint write_config(const char *filename, HashMap *map) {\n    char temp_file[1024];\n    snprintf(temp_file, sizeof(temp_file), \"%s.tmp\", filename);\n    \n    FILE *f = fopen(temp_file, \"w\");\n    if (!f) {\n        fprintf(stderr, \"Error: Cannot write to %s\\n\", temp_file);\n        return 0;\n    }\n    \n    /* Iterate through all buckets */\n    for (int i = 0; i < HASH_SIZE; i++) {\n        Entry *e = map->buckets[i];\n        while (e) {\n            fprintf(f, \"%s = \\\"%s\\\"\\n\", e->key, e->value);\n            e = e->next;\n        }\n    }\n    \n    fclose(f);\n    \n    /* Atomic rename */\n    if (rename(temp_file, filename) != 0) {\n        fprintf(stderr, \"Error: Cannot rename %s to %s\\n\", temp_file, filename);\n        unlink(temp_file);\n        return 0;\n    }\n    \n    return 1;\n}\n\n/* Free hashmap */\nvoid hashmap_free(HashMap *map) {\n    for (int i = 0; i < HASH_SIZE; i++) {\n        Entry *e = map->buckets[i];\n        while (e) {\n            Entry *next = e->next;\n            free(e->key);\n            free(e->value);\n            free(e);\n            e = next;\n        }\n    }\n    free(map);\n}\n\n/* Get RA_CONF from environment */\nconst char* get_ra_conf() {\n    const char *conf = getenv(\"RA_CONF\");\n    if (!conf) {\n        return \"/storage/.config/retroarch/retroarch.cfg\";\n    }\n    return conf;\n}\n\n/* Get EE_CONF from environment */\nconst char* get_ee_conf() {\n    const char *conf = getenv(\"EE_CONF\");\n    if (!conf) {\n        return \"/storage/.config/emuelec/configs/emuelec.conf\";\n    }\n    return conf;\n}\n\n/* Parse hierarchical config line: platform[\"rom\"].key=value or platform.key=value or global.key=value or standalone key=value */\nint parse_ee_line(char *line, char *platform, char *rom, char *key, char *value) {\n    char *trimmed = trim(line);\n    \n    /* Skip comments and empty lines */\n    if (trimmed[0] == '#' || trimmed[0] == '\\0')\n        return 0;\n    \n    /* Find the = sign */\n    char *eq = strchr(trimmed, '=');\n    if (!eq) return 0;\n    \n    *eq = '\\0';\n    char *left = trim(trimmed);\n    char *val = trim(eq + 1);\n    \n    /* Copy value */\n    strncpy(value, val, MAX_VALUE - 1);\n    value[MAX_VALUE - 1] = '\\0';\n    \n    /* Parse left side */\n    platform[0] = '\\0';\n    rom[0] = '\\0';\n    \n    /* Check for ROM-specific: platform[\"rom\"].key */\n    char *bracket = strchr(left, '[');\n    if (bracket) {\n        *bracket = '\\0';\n        strncpy(platform, trim(left), MAX_KEY - 1);\n        platform[MAX_KEY - 1] = '\\0';\n        \n        char *quote1 = strchr(bracket + 1, '\"');\n        if (quote1) {\n            char *quote2 = strchr(quote1 + 1, '\"');\n            if (quote2) {\n                *quote2 = '\\0';\n                strncpy(rom, quote1 + 1, MAX_KEY - 1);\n                rom[MAX_KEY - 1] = '\\0';\n                \n                /* Look for dot or hyphen after the closing bracket */\n                char *sep = quote2 + 1;\n                while (*sep && (*sep == ']' || isspace(*sep))) sep++;\n                if (*sep == '.' || *sep == '-') {\n                    strncpy(key, trim(sep + 1), MAX_KEY - 1);\n                    key[MAX_KEY - 1] = '\\0';\n                    return 1;\n                }\n            }\n        }\n        return 0;\n    }\n    \n    /* Check for platform.key or global.key */\n    char *dot = strchr(left, '.');\n    if (!dot) dot = strchr(left, '-');  /* Support both . and - as separators */\n    \n    if (dot) {\n        *dot = '\\0';\n        strncpy(platform, trim(left), MAX_KEY - 1);\n        platform[MAX_KEY - 1] = '\\0';\n        strncpy(key, trim(dot + 1), MAX_KEY - 1);\n        key[MAX_KEY - 1] = '\\0';\n        return 1;\n    }\n    \n    /* Standalone key with no platform (e.g., ee_randomsplashpath=value) */\n    strncpy(key, left, MAX_KEY - 1);\n    key[MAX_KEY - 1] = '\\0';\n    platform[0] = '\\0';  /* Empty platform means standalone */\n    \n    return 1;\n}\n\n/* Read hierarchical setting: ROM -> Platform -> Global -> Standalone */\nint cmd_ee_read(const char *setting_key, const char *platform_name, const char *rom_name) {\n    const char *conf_file = get_ee_conf();\n    if (!conf_file) return 1;\n    \n    FILE *f = fopen(conf_file, \"r\");\n    if (!f) {\n        fprintf(stderr, \"Error: Cannot read %s\\n\", conf_file);\n        return 1;\n    }\n    \n    char line[MAX_LINE];\n    char platform[MAX_KEY], rom[MAX_KEY], key[MAX_KEY], value[MAX_VALUE];\n    \n    char *rom_value = NULL;\n    char *platform_value = NULL;\n    char *global_value = NULL;\n    char *standalone_value = NULL;\n    \n    /* Read file and find matching entries */\n    while (fgets(line, sizeof(line), f)) {\n        if (parse_ee_line(line, platform, rom, key, value)) {\n            if (strcmp(key, setting_key) == 0) {\n                /* ROM-specific match (highest priority) */\n                if (rom_name && rom[0] != '\\0' && \n                    strcmp(platform, platform_name) == 0 && \n                    strcmp(rom, rom_name) == 0) {\n                    if (rom_value) free(rom_value);\n                    rom_value = strdup(value);\n                }\n                /* Platform-specific match */\n                else if (rom[0] == '\\0' && platform[0] != '\\0' && strcmp(platform, platform_name) == 0) {\n                    if (platform_value) free(platform_value);\n                    platform_value = strdup(value);\n                }\n                /* Global match */\n                else if (rom[0] == '\\0' && platform[0] != '\\0' && strcmp(platform, \"global\") == 0) {\n                    if (global_value) free(global_value);\n                    global_value = strdup(value);\n                }\n                /* Standalone match (no platform prefix) */\n                else if (rom[0] == '\\0' && platform[0] == '\\0') {\n                    if (standalone_value) free(standalone_value);\n                    standalone_value = strdup(value);\n                }\n            }\n        }\n    }\n    \n    fclose(f);\n    \n    /* Return in priority order: ROM -> Platform -> Global -> Standalone */\n    char *result = rom_value ? rom_value : \n                   (platform_value ? platform_value : \n                   (global_value ? global_value : standalone_value));\n    \n    if (result) {\n        printf(\"%s\\n\", result);\n        if (rom_value) free(rom_value);\n        if (platform_value) free(platform_value);\n        if (global_value) free(global_value);\n        if (standalone_value) free(standalone_value);\n        return 0;\n    }\n    \n    /* Cleanup */\n    if (rom_value) free(rom_value);\n    if (platform_value) free(platform_value);\n    if (global_value) free(global_value);\n    if (standalone_value) free(standalone_value);\n    \n    /* Not found - return nothing (empty output) */\n    return 1;\n}\n\n/* Set hierarchical setting - preserves file structure, comments, and order */\nint cmd_ee_set(const char *setting_key, const char *setting_value, \n               const char *platform_name, const char *rom_name) {\n    const char *conf_file = get_ee_conf();\n    if (!conf_file) return 1;\n    \n    /* Read entire file into memory, preserving everything */\n    FILE *f = fopen(conf_file, \"r\");\n    if (!f) {\n        fprintf(stderr, \"Error: Cannot read %s\\n\", conf_file);\n        return 1;\n    }\n    \n    char **lines = NULL;\n    int line_count = 0;\n    int line_capacity = 100;\n    lines = malloc(sizeof(char*) * line_capacity);\n    \n    char buffer[MAX_LINE];\n    int found = 0;\n    \n    while (fgets(buffer, sizeof(buffer), f)) {\n        if (line_count >= line_capacity) {\n            line_capacity *= 2;\n            lines = realloc(lines, sizeof(char*) * line_capacity);\n        }\n        \n        char platform[MAX_KEY], rom[MAX_KEY], key[MAX_KEY], value[MAX_VALUE];\n        int is_target = 0;\n        \n        /* Try to parse, but keep original line regardless */\n        char *line_copy = strdup(buffer);\n        if (parse_ee_line(line_copy, platform, rom, key, value)) {\n            /* Check if this is the line we want to update */\n            if (strcmp(key, setting_key) == 0 && strcmp(platform, platform_name) == 0) {\n                if (rom_name && rom_name[0] != '\\0') {\n                    /* Looking for ROM-specific: must match ROM exactly */\n                    if (rom[0] != '\\0' && strcmp(rom, rom_name) == 0) {\n                        is_target = 1;\n                    }\n                } else {\n                    /* Looking for platform-specific: must NOT have a ROM */\n                    if (rom[0] == '\\0') {\n                        is_target = 1;\n                    }\n                }\n            }\n        }\n        free(line_copy);\n        \n        if (is_target) {\n            /* Update this line, preserving format as much as possible */\n            found = 1;\n            char new_line[MAX_LINE];\n            if (rom_name && rom_name[0] != '\\0') {\n                /* ROM-specific: platform[\"rom\"].key=value */\n                snprintf(new_line, sizeof(new_line), \"%s[\\\"%s\\\"].%s=%s\\n\", \n                         platform_name, rom_name, setting_key, setting_value);\n            } else if (platform_name && platform_name[0] != '\\0') {\n                /* Platform-specific: platform.key=value */\n                snprintf(new_line, sizeof(new_line), \"%s.%s=%s\\n\", \n                         platform_name, setting_key, setting_value);\n            } else {\n                /* Standalone: key=value (no platform prefix) */\n                snprintf(new_line, sizeof(new_line), \"%s=%s\\n\", \n                         setting_key, setting_value);\n            }\n            lines[line_count++] = strdup(new_line);\n        } else {\n            /* Keep original line exactly as-is (comments, blank lines, etc) */\n            lines[line_count++] = strdup(buffer);\n        }\n    }\n    \n    fclose(f);\n    \n    /* If not found, append new line at the end */\n    if (!found) {\n        if (line_count >= line_capacity) {\n            line_capacity++;\n            lines = realloc(lines, sizeof(char*) * line_capacity);\n        }\n        \n        char new_line[MAX_LINE];\n        if (rom_name && rom_name[0] != '\\0') {\n            /* ROM-specific: platform[\"rom\"].key=value */\n            snprintf(new_line, sizeof(new_line), \"%s[\\\"%s\\\"].%s=%s\\n\", \n                     platform_name, rom_name, setting_key, setting_value);\n        } else if (platform_name && platform_name[0] != '\\0') {\n            /* Platform-specific: platform.key=value */\n            snprintf(new_line, sizeof(new_line), \"%s.%s=%s\\n\", \n                     platform_name, setting_key, setting_value);\n        } else {\n            /* Standalone: key=value (no platform prefix) */\n            snprintf(new_line, sizeof(new_line), \"%s=%s\\n\", \n                     setting_key, setting_value);\n        }\n        lines[line_count++] = strdup(new_line);\n    }\n    \n    /* Write back atomically */\n    char temp_file[1024];\n    snprintf(temp_file, sizeof(temp_file), \"%s.tmp\", conf_file);\n    \n    f = fopen(temp_file, \"w\");\n    if (!f) {\n        fprintf(stderr, \"Error: Cannot write to %s\\n\", temp_file);\n        for (int i = 0; i < line_count; i++) free(lines[i]);\n        free(lines);\n        return 1;\n    }\n    \n    for (int i = 0; i < line_count; i++) {\n        fputs(lines[i], f);\n        free(lines[i]);\n    }\n    free(lines);\n    \n    fclose(f);\n    \n    /* Atomic rename */\n    if (rename(temp_file, conf_file) != 0) {\n        fprintf(stderr, \"Error: Cannot update %s\\n\", conf_file);\n        unlink(temp_file);\n        return 1;\n    }\n    \n    return 0;\n}\n\n/* Set a setting */\nint cmd_set(const char *key, const char *value, const char *output_file) {\n    const char *conf_file = output_file ? output_file : get_ra_conf();\n    if (!conf_file) return 1;\n    \n    HashMap *config = hashmap_create();\n    \n    /* Load existing config (create new if doesn't exist) */\n    load_config(conf_file, config);\n    \n    /* Set the value */\n    hashmap_put(config, key, value);\n    \n    /* Write back */\n    if (!write_config(conf_file, config)) {\n        hashmap_free(config);\n        return 1;\n    }\n    \n    hashmap_free(config);\n    return 0;\n}\n\n/* Read a setting */\nint cmd_read(const char *key, const char *input_file) {\n    const char *conf_file = input_file ? input_file : get_ra_conf();\n    if (!conf_file) return 1;\n    \n    HashMap *config = hashmap_create();\n    \n    if (!load_config(conf_file, config)) {\n        fprintf(stderr, \"Error: Cannot read %s\\n\", conf_file);\n        hashmap_free(config);\n        return 1;\n    }\n    \n    const char *value = hashmap_get(config, key);\n    if (value) {\n        printf(\"%s\\n\", value);\n        hashmap_free(config);\n        return 0;\n    }\n    \n    hashmap_free(config);\n    /* Key not found - return nothing (empty output) */\n    return 1;\n}\n\n/* Merge changes */\nint cmd_merge(const char *changes_file, const char *output_file) {\n    const char *base_file = output_file;\n    \n    /* If no output specified, use RA_CONF */\n    if (!base_file) {\n        base_file = get_ra_conf();\n        if (!base_file) return 1;\n    }\n    \n    HashMap *config = hashmap_create();\n    \n    /* Load base config */\n    if (!load_config(base_file, config)) {\n        fprintf(stderr, \"Error: Cannot read %s\\n\", base_file);\n        hashmap_free(config);\n        return 1;\n    }\n    \n    /* Apply changes */\n    if (!load_config(changes_file, config)) {\n        fprintf(stderr, \"Error: Cannot read %s\\n\", changes_file);\n        hashmap_free(config);\n        return 1;\n    }\n    \n    /* Write merged config */\n    if (!write_config(base_file, config)) {\n        hashmap_free(config);\n        return 1;\n    }\n    \n    hashmap_free(config);\n    return 0;\n}\n\nvoid print_usage(const char *prog) {\n    fprintf(stderr, \"Usage:\\n\");\n    fprintf(stderr, \"  RetroArch config:\\n\");\n    fprintf(stderr, \"    %s -s <key> -v <value> [-o file]  Set a setting\\n\", prog);\n    fprintf(stderr, \"    %s -r <key> [-o file]             Read a setting\\n\", prog);\n    fprintf(stderr, \"    %s -i <changes.cfg> [-o out]      Merge changes\\n\", prog);\n    fprintf(stderr, \"\\n\");\n    fprintf(stderr, \"  EmuELEC emuelec.conf config:\\n\");\n    fprintf(stderr, \"    %s -e -s <key> -v <value> -p <platform> [-m <rom>]\\n\", prog);\n    fprintf(stderr, \"                                   Set setting (uses $EE_CONF)\\n\");\n    fprintf(stderr, \"    %s -e -r <key> -p <platform> [-m <rom>]\\n\", prog);\n    fprintf(stderr, \"                                   Read setting with priority:\\n\");\n    fprintf(stderr, \"                                   ROM -> Platform -> Global -> Standalone\\n\");\n    fprintf(stderr, \"\\n\");\n    fprintf(stderr, \"Environment variables:\\n\");\n    fprintf(stderr, \"  RA_CONF - path to retroarch.cfg (default: /storage/.config/retroarch/retroarch.cfg)\\n\");\n    fprintf(stderr, \"  EE_CONF - path to emuelec.conf (default: /storage/.config/emuelec/configs/emuelec.conf)\\n\");\n    fprintf(stderr, \"\\n\");\n    fprintf(stderr, \"Note: -o specifies output file (for -s/-r, uses $RA_CONF if not specified)\\n\");\n}\n\nint main(int argc, char *argv[]) {\n    int opt;\n    char *set_key = NULL, *set_value = NULL;\n    char *read_key = NULL;\n    char *input_file = NULL, *output_file = NULL;\n    char *platform = NULL, *rom = NULL;\n    int use_ee_conf = 0;\n    \n    if (argc < 2) {\n        print_usage(argv[0]);\n        return 1;\n    }\n    \n    /* Parse arguments */\n    while ((opt = getopt(argc, argv, \"s:v:r:i:o:p:m:eh\")) != -1) {\n        switch (opt) {\n            case 's':\n                set_key = optarg;\n                break;\n            case 'v':\n                set_value = optarg;\n                break;\n            case 'r':\n                read_key = optarg;\n                break;\n            case 'i':\n                input_file = optarg;\n                break;\n            case 'o':\n                output_file = optarg;\n                break;\n            case 'p':\n                platform = optarg;\n                break;\n            case 'm':\n                rom = optarg;\n                break;\n            case 'e':\n                use_ee_conf = 1;\n                break;\n            case 'h':\n                print_usage(argv[0]);\n                return 0;\n            default:\n                print_usage(argv[0]);\n                return 1;\n        }\n    }\n    \n    /* Execute command */\n    if (use_ee_conf) {\n        /* EmuELEC hierarchical config operations */\n        \n        /* Treat empty strings as NULL */\n        if (platform && platform[0] == '\\0') platform = NULL;\n        if (rom && rom[0] == '\\0') rom = NULL;\n        \n        /* For simple keys like \"global.timezone\", auto-extract platform if no -p specified */\n        if (!platform) {\n            /* Check if key contains a dot - if so, extract platform and key parts */\n            char *key_to_use = set_key ? set_key : read_key;\n            if (key_to_use && strchr(key_to_use, '.')) {\n                char *dot = strchr(key_to_use, '.');\n                int len = dot - key_to_use;\n                char auto_platform[MAX_KEY];\n                char auto_key[MAX_KEY];\n                \n                strncpy(auto_platform, key_to_use, len);\n                auto_platform[len] = '\\0';\n                strncpy(auto_key, dot + 1, MAX_KEY - 1);\n                auto_key[MAX_KEY - 1] = '\\0';\n                \n                /* Use extracted platform and key */\n                if (set_value) {\n                    return cmd_ee_set(auto_key, set_value, auto_platform, rom);\n                } else {\n                    return cmd_ee_read(auto_key, auto_platform, rom);\n                }\n            }\n            \n            /* No dot found - treat as standalone key (search all entries) */\n            if (read_key) {\n                return cmd_ee_read(read_key, \"\", rom);\n            } else if (set_key && set_value) {\n                return cmd_ee_set(set_key, set_value, \"\", rom);\n            }\n            \n            fprintf(stderr, \"Error: -p <platform> required for platform-specific operations\\n\");\n            fprintf(stderr, \"       (or use 'platform.setting' format for auto-detection)\\n\");\n            return 1;\n        }\n        \n        if (set_key && set_value) {\n            return cmd_ee_set(set_key, set_value, platform, rom);\n        } else if (read_key) {\n            return cmd_ee_read(read_key, platform, rom);\n        } else {\n            fprintf(stderr, \"Error: -s or -r required with -e\\n\");\n            print_usage(argv[0]);\n            return 1;\n        }\n    } else {\n        /* RetroArch config operations */\n        if (set_key && set_value) {\n            return cmd_set(set_key, set_value, output_file);\n        } else if (read_key) {\n            return cmd_read(read_key, output_file);\n        } else if (input_file) {\n            return cmd_merge(input_file, output_file);\n        } else {\n            print_usage(argv[0]);\n            return 1;\n        }\n    }\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/eemount/package.mk",
    "content": "# SPDX-License-Identifier: GPL-3.0\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"eemount\"\nPKG_VERSION=\"7ec126a4dc2209eaa5c7cc25cd5e227b6157ae41\"\nPKG_SHA256=\"4895c70bff8a3a9e1046d924cca71eadf5cb1774b63c2e48bab05635e26c690b\"\nPKG_SITE=\"https://github.com/shantigilbert/eemount\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain systemd\"\nPKG_LONGDESC=\"Multi-source ROMs mounting utility for EmuELEC\"\nPKG_TOOLCHAIN=\"make\"\nPKG_MAKE_OPTS_TARGET=\"LOGGING_ALL_TO_STDOUT=1\"\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/empty/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"empty\"\nPKG_VERSION=\"0.6.20b\"\nPKG_SHA256=\"7e6636e400856984c4405ce7bd0843aaa3329fa3efd20c58df8400a9eaa35f09\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://empty.sourceforge.net/\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_URL=\"http://downloads.sourceforge.net/sourceforge/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tgz\"\nPKG_SECTION=\"sysutils\"\nPKG_SHORTDESC=\"Run applications under pseudo-terminal sessions\"\nPKG_LONGDESC=\"Run applications under pseudo-terminal sessions\"\n\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make CC=${CC}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp empty ${INSTALL}/usr/bin/\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/evdev_tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present BetaXOi (https://github.com/BetaXOi)\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"evdev_tools\"\nPKG_VERSION=\"\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/BetaXOi\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec\"\nPKG_LONGDESC=\"A set of small evdev tools by https://github.com/BetaXOi\"\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"no\"\nPKG_TOOLCHAIN=\"make\"\n \nmake_target() {\n\tcd ${PKG_BUILD}/\n\t${CC} -O2 evtest.c -o evtest\n\t${CC} -O2 send.c -o evsend\n\t${CC} -O2 remap.c -o evremap\n\t${CC} -O2 evkill.c -o evkill\n}\n\nmakeinstall_target() {\n\tmkdir -p ${INSTALL}/usr/bin\n\tcp ${PKG_BUILD}/evtest ${INSTALL}/usr/bin\n\tcp ${PKG_BUILD}/evsend ${INSTALL}/usr/bin\n\tcp ${PKG_BUILD}/evremap ${INSTALL}/usr/bin\n\tcp ${PKG_BUILD}/evkill ${INSTALL}/usr/bin\n} \n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/evdev_tools/sources/evkill.c",
    "content": "/* Usage: evkill <-k, --keys keys> <-d, --device evdev> <programs>\neg: evkill -k 304+305 -d /dev/input/event3 retroarch\n\nSigned-off-by: Ning Bo <n.b@live.com> \n*/\n\n#define _GNU_SOURCE\n\n#include <stdlib.h>\n#include <string.h>\n#include <stdio.h>\n#include <unistd.h>\n#include <getopt.h>\n#include <fcntl.h>\n#include <linux/input.h>\n#include <dirent.h>\n#include <libgen.h>\n\nvoid set_bit(char *mem, int key) {\n\tint8_t *byte = (int8_t *)mem + key / 8;\n\t*byte |= 1 << key % 8;\n}\n\nvoid clr_bit(char *mem, int key) {\n\tint8_t *byte = (int8_t *)mem + key / 8;\n\t*byte &= ~(1 << key % 8);\n}\n\nstatic const struct option long_options[] = {\n\t{\"device\", required_argument, NULL, 'd'},\n\t{\"keys\", required_argument, NULL, 'k'},\n\t{0, 0, 0, 0}\n};\n\nchar *js2evdev(char *joystick) {\n\tchar *evdev = NULL;\n\tchar *path = NULL;\n\tDIR *dir;\n\tstruct dirent *ptr;\n\n\tasprintf(&path, \"/sys/class/input/%s/device\", basename(joystick));\n\tdir = opendir(path);\n\tfree(path);\n\tif (dir == NULL) {\n\t\treturn NULL;\n\t}\n\n\twhile((ptr = readdir(dir)) != NULL) {\n\t\tif (ptr->d_type == DT_DIR && strncmp(ptr->d_name, \"event\", 5) == 0) {\n\t\t\tasprintf(&evdev, \"/dev/input/%s\", ptr->d_name);\n\t\t}\n\t}\n\n\treturn evdev;\n}\n\nint main(int argc, char* argv[])\n{\n\tint ret = 0;\n\tint opt = 0;\n\tstruct input_event ev;\n\tchar *dev = NULL, *keys = NULL;\n\tchar cmd[1024];\n\n\tint size = (KEY_CNT - 1) / 8 + 1;\n\tchar *bitmap0 = (char *)malloc(size);\n\tchar *bitmap1 = (char *)malloc(size);\n\tmemset(bitmap0, 0x0, size);\n\tmemset(bitmap1, 0x0, size);\n\n\twhile((opt = getopt_long(argc, argv, \"d:k:\", long_options, NULL)) != -1)\n\t{\n\t\tswitch(opt)\n\t\t{\n\t\t\tcase 'd':\n\t\t\t\tdev = strdup(optarg);\n\t\t\t\tbreak;\n\t\t\tcase 'k':\n\t\t\t\tkeys = strdup(optarg);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tprintf(\"Usage: %s <-k, --keys keys> <-d, --device evdev or joystick> <programe...>\\n\", argv[0]);\n\t\t\t\texit(1);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (dev == NULL || keys== NULL || optind == argc) {\n\t\tprintf(\"Usage: %s <-k, --keys keys> <-d, --device evdev or joystick> <programe...>\\n\", argv[0]);\n\t\texit(1);\n\t}\n\n\tstrcpy(cmd, \"killall \");\n\tint i;\n\tfor (i = optind; i < argc; i++) {\n\t\tstrcat(cmd, argv[i]);\n\t}\n\n\tchar *str, *saveptr, *key;\n\tfor (i = 0, str = keys; ; i++, str = NULL) {\n\t\tkey = strtok_r(str, \",+\", &saveptr);\n\t\tif (key == NULL)\n\t\t\tbreak;\n\n\t\tif (atoi(key) > KEY_MAX)\n\t\t\tcontinue;\n\n\t\tset_bit(bitmap0, atoi(key));\n\t}\n\n\twhile(1) {\n\t\tint fd, version, ready;\n\n\t\tready = 0;\n\t\tdo {\n\t\t\tfd = open(dev, O_RDONLY);\n\t\t\tif (fd > 0) {\n\t\t\t\tif (ioctl(fd, EVIOCGVERSION, &version)) {\n\t\t\t\t\tready = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tchar *evdev = js2evdev(dev);\n\t\t\tif (!evdev) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfd = open(evdev, O_RDONLY);\n\t\t\tfree(evdev);\n\t\t\tif (fd > 0) {\n\t\t\t\tif (ioctl(fd, EVIOCGVERSION, &version) == 0) {\n\t\t\t\t\tready = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} while(0);\n\n\t\tif (!ready) {\n\t\t\tsleep(1);\n\t\t\tcontinue;\n\t\t}\n\n\t\twhile(1) {\n\t\t\tret = read(fd, &ev, sizeof(struct input_event));\n\t\t\tif (ret < 0) {\n\t\t\t\tperror(\"read\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (ev.type == EV_KEY) {\n\t\t\t\tif (ev.value == 0) {\n\t\t\t\t\tclr_bit(bitmap1, ev.code);\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tset_bit(bitmap1, ev.code);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (memcmp(bitmap0, bitmap1, size) == 0) {\n\t\t\t\tmemset(bitmap1, 0x0, size);\n\t\t\t\t/* printf(\"execute cmd: %s\\n\", cmd);*/\n\t\t\t\tsystem(cmd);\n\t\t\t\texit(0);\n\t\t\t}\n\t\t}\n\n\t\tclose(fd);\n\t}\n\n\treturn 0;\n}\n\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/evdev_tools/sources/evtest.c",
    "content": "/*\nevtest is used for show input event received.\nsend is used for send BTN_A input event.\n\nSigned-off-by: Ning Bo <n.b@live.com>\n*/\n#include <stdint.h>\n#include <linux/input.h>\n#include <string.h>\n#include <fcntl.h>\n#include <unistd.h>\n#include <stdio.h>\n\n#ifndef EV_SYN\n#define EV_SYN 0\n#endif\n\nchar *events[EV_MAX + 1] = {\n    [0 ... EV_MAX] = NULL,\n    [EV_SYN] = \"Sync\",            [EV_KEY] = \"Key\",\n    [EV_REL] = \"Relative\",            [EV_ABS] = \"Absolute\",\n    [EV_MSC] = \"Misc\",            [EV_LED] = \"LED\",\n    [EV_SND] = \"Sound\",            [EV_REP] = \"Repeat\",\n    [EV_FF] = \"ForceFeedback\",        [EV_PWR] = \"Power\",\n    [EV_FF_STATUS] = \"ForceFeedbackStatus\",\n};\n\nchar *keys[KEY_MAX + 1] = {\n    [0 ... KEY_MAX] = NULL,\n    [KEY_RESERVED] = \"Reserved\",        [KEY_ESC] = \"Esc\",\n    [KEY_1] = \"1\",                [KEY_2] = \"2\",\n    [KEY_3] = \"3\",                [KEY_4] = \"4\",\n    [KEY_5] = \"5\",                [KEY_6] = \"6\",\n    [KEY_7] = \"7\",                [KEY_8] = \"8\",\n    [KEY_9] = \"9\",                [KEY_0] = \"0\",\n    [KEY_MINUS] = \"Minus\",            [KEY_EQUAL] = \"Equal\",\n    [KEY_BACKSPACE] = \"Backspace\",        [KEY_TAB] = \"Tab\",\n    [KEY_Q] = \"Q\",                [KEY_W] = \"W\",\n    [KEY_E] = \"E\",                [KEY_R] = \"R\",\n    [KEY_T] = \"T\",                [KEY_Y] = \"Y\",\n    [KEY_U] = \"U\",                [KEY_I] = \"I\",\n    [KEY_O] = \"O\",                [KEY_P] = \"P\",\n    [KEY_LEFTBRACE] = \"LeftBrace\",        [KEY_RIGHTBRACE] = \"RightBrace\",\n    [KEY_ENTER] = \"Enter\",            [KEY_LEFTCTRL] = \"LeftControl\",\n    [KEY_A] = \"A\",                [KEY_S] = \"S\",\n    [KEY_D] = \"D\",                [KEY_F] = \"F\",\n    [KEY_G] = \"G\",                [KEY_H] = \"H\",\n    [KEY_J] = \"J\",                [KEY_K] = \"K\",\n    [KEY_L] = \"L\",                [KEY_SEMICOLON] = \"Semicolon\",\n    [KEY_APOSTROPHE] = \"Apostrophe\",    [KEY_GRAVE] = \"Grave\",\n    [KEY_LEFTSHIFT] = \"LeftShift\",        [KEY_BACKSLASH] = \"BackSlash\",\n    [KEY_Z] = \"Z\",                [KEY_X] = \"X\",\n    [KEY_C] = \"C\",                [KEY_V] = \"V\",\n    [KEY_B] = \"B\",                [KEY_N] = \"N\",\n    [KEY_M] = \"M\",                [KEY_COMMA] = \"Comma\",\n    [KEY_DOT] = \"Dot\",            [KEY_SLASH] = \"Slash\",\n    [KEY_RIGHTSHIFT] = \"RightShift\",    [KEY_KPASTERISK] = \"KPAsterisk\",\n    [KEY_LEFTALT] = \"LeftAlt\",        [KEY_SPACE] = \"Space\",\n    [KEY_CAPSLOCK] = \"CapsLock\",        [KEY_F1] = \"F1\",\n    [KEY_F2] = \"F2\",            [KEY_F3] = \"F3\",\n    [KEY_F4] = \"F4\",            [KEY_F5] = \"F5\",\n    [KEY_F6] = \"F6\",            [KEY_F7] = \"F7\",\n    [KEY_F8] = \"F8\",            [KEY_F9] = \"F9\",\n    [KEY_F10] = \"F10\",            [KEY_NUMLOCK] = \"NumLock\",\n    [KEY_SCROLLLOCK] = \"ScrollLock\",    [KEY_KP7] = \"KP7\",\n    [KEY_KP8] = \"KP8\",            [KEY_KP9] = \"KP9\",\n    [KEY_KPMINUS] = \"KPMinus\",        [KEY_KP4] = \"KP4\",\n    [KEY_KP5] = \"KP5\",            [KEY_KP6] = \"KP6\",\n    [KEY_KPPLUS] = \"KPPlus\",        [KEY_KP1] = \"KP1\",\n    [KEY_KP2] = \"KP2\",            [KEY_KP3] = \"KP3\",\n    [KEY_KP0] = \"KP0\",            [KEY_KPDOT] = \"KPDot\",\n    [KEY_ZENKAKUHANKAKU] = \"Zenkaku/Hankaku\", [KEY_102ND] = \"102nd\",\n    [KEY_F11] = \"F11\",            [KEY_F12] = \"F12\",\n    [KEY_RO] = \"RO\",            [KEY_KATAKANA] = \"Katakana\",\n    [KEY_HIRAGANA] = \"HIRAGANA\",        [KEY_HENKAN] = \"Henkan\",\n    [KEY_KATAKANAHIRAGANA] = \"Katakana/Hiragana\", [KEY_MUHENKAN] = \"Muhenkan\",\n    [KEY_KPJPCOMMA] = \"KPJpComma\",        [KEY_KPENTER] = \"KPEnter\",\n    [KEY_RIGHTCTRL] = \"RightCtrl\",        [KEY_KPSLASH] = \"KPSlash\",\n    [KEY_SYSRQ] = \"SysRq\",            [KEY_RIGHTALT] = \"RightAlt\",\n    [KEY_LINEFEED] = \"LineFeed\",        [KEY_HOME] = \"Home\",\n    [KEY_UP] = \"Up\",            [KEY_PAGEUP] = \"PageUp\",\n    [KEY_LEFT] = \"Left\",            [KEY_RIGHT] = \"Right\",\n    [KEY_END] = \"End\",            [KEY_DOWN] = \"Down\",\n    [KEY_PAGEDOWN] = \"PageDown\",        [KEY_INSERT] = \"Insert\",\n    [KEY_DELETE] = \"Delete\",        [KEY_MACRO] = \"Macro\",\n    [KEY_MUTE] = \"Mute\",            [KEY_VOLUMEDOWN] = \"VolumeDown\",\n    [KEY_VOLUMEUP] = \"VolumeUp\",        [KEY_POWER] = \"Power\",\n    [KEY_KPEQUAL] = \"KPEqual\",        [KEY_KPPLUSMINUS] = \"KPPlusMinus\",\n    [KEY_PAUSE] = \"Pause\",            [KEY_KPCOMMA] = \"KPComma\",\n    [KEY_HANGUEL] = \"Hanguel\",        [KEY_HANJA] = \"Hanja\",\n    [KEY_YEN] = \"Yen\",            [KEY_LEFTMETA] = \"LeftMeta\",\n    [KEY_RIGHTMETA] = \"RightMeta\",        [KEY_COMPOSE] = \"Compose\",\n    [KEY_STOP] = \"Stop\",            [KEY_AGAIN] = \"Again\",\n    [KEY_PROPS] = \"Props\",            [KEY_UNDO] = \"Undo\",\n    [KEY_FRONT] = \"Front\",            [KEY_COPY] = \"Copy\",\n    [KEY_OPEN] = \"Open\",            [KEY_PASTE] = \"Paste\",\n    [KEY_FIND] = \"Find\",            [KEY_CUT] = \"Cut\",\n    [KEY_HELP] = \"Help\",            [KEY_MENU] = \"Menu\",\n    [KEY_CALC] = \"Calc\",            [KEY_SETUP] = \"Setup\",\n    [KEY_SLEEP] = \"Sleep\",            [KEY_WAKEUP] = \"WakeUp\",\n    [KEY_FILE] = \"File\",            [KEY_SENDFILE] = \"SendFile\",\n    [KEY_DELETEFILE] = \"DeleteFile\",    [KEY_XFER] = \"X-fer\",\n    [KEY_PROG1] = \"Prog1\",            [KEY_PROG2] = \"Prog2\",\n    [KEY_WWW] = \"WWW\",            [KEY_MSDOS] = \"MSDOS\",\n    [KEY_COFFEE] = \"Coffee\",        [KEY_DIRECTION] = \"Direction\",\n    [KEY_CYCLEWINDOWS] = \"CycleWindows\",    [KEY_MAIL] = \"Mail\",\n    [KEY_BOOKMARKS] = \"Bookmarks\",        [KEY_COMPUTER] = \"Computer\",\n    [KEY_BACK] = \"Back\",            [KEY_FORWARD] = \"Forward\",\n    [KEY_CLOSECD] = \"CloseCD\",        [KEY_EJECTCD] = \"EjectCD\",\n    [KEY_EJECTCLOSECD] = \"EjectCloseCD\",    [KEY_NEXTSONG] = \"NextSong\",\n    [KEY_PLAYPAUSE] = \"PlayPause\",        [KEY_PREVIOUSSONG] = \"PreviousSong\",\n    [KEY_STOPCD] = \"StopCD\",        [KEY_RECORD] = \"Record\",\n    [KEY_REWIND] = \"Rewind\",        [KEY_PHONE] = \"Phone\",\n    [KEY_ISO] = \"ISOKey\",            [KEY_CONFIG] = \"Config\",\n    [KEY_HOMEPAGE] = \"HomePage\",        [KEY_REFRESH] = \"Refresh\",\n    [KEY_EXIT] = \"Exit\",            [KEY_MOVE] = \"Move\",\n    [KEY_EDIT] = \"Edit\",            [KEY_SCROLLUP] = \"ScrollUp\",\n    [KEY_SCROLLDOWN] = \"ScrollDown\",    [KEY_KPLEFTPAREN] = \"KPLeftParenthesis\",\n    [KEY_KPRIGHTPAREN] = \"KPRightParenthesis\", [KEY_F13] = \"F13\",\n    [KEY_F14] = \"F14\",            [KEY_F15] = \"F15\",\n    [KEY_F16] = \"F16\",            [KEY_F17] = \"F17\",\n    [KEY_F18] = \"F18\",            [KEY_F19] = \"F19\",\n    [KEY_F20] = \"F20\",            [KEY_F21] = \"F21\",\n    [KEY_F22] = \"F22\",            [KEY_F23] = \"F23\",\n    [KEY_F24] = \"F24\",            [KEY_PLAYCD] = \"PlayCD\",\n    [KEY_PAUSECD] = \"PauseCD\",        [KEY_PROG3] = \"Prog3\",\n    [KEY_PROG4] = \"Prog4\",            [KEY_SUSPEND] = \"Suspend\",\n    [KEY_CLOSE] = \"Close\",            [KEY_PLAY] = \"Play\",\n    [KEY_FASTFORWARD] = \"Fast Forward\",    [KEY_BASSBOOST] = \"Bass Boost\",\n    [KEY_PRINT] = \"Print\",            [KEY_HP] = \"HP\",\n    [KEY_CAMERA] = \"Camera\",        [KEY_SOUND] = \"Sound\",\n    [KEY_QUESTION] = \"Question\",        [KEY_EMAIL] = \"Email\",\n    [KEY_CHAT] = \"Chat\",            [KEY_SEARCH] = \"Search\",\n    [KEY_CONNECT] = \"Connect\",        [KEY_FINANCE] = \"Finance\",\n    [KEY_SPORT] = \"Sport\",            [KEY_SHOP] = \"Shop\",\n    [KEY_ALTERASE] = \"Alternate Erase\",    [KEY_CANCEL] = \"Cancel\",\n    [KEY_BRIGHTNESSDOWN] = \"Brightness down\", [KEY_BRIGHTNESSUP] = \"Brightness up\",\n    [KEY_MEDIA] = \"Media\",            [KEY_UNKNOWN] = \"Unknown\",\n    [BTN_0] = \"Btn0\",            [BTN_1] = \"Btn1\",\n    [BTN_2] = \"Btn2\",            [BTN_3] = \"Btn3\",\n    [BTN_4] = \"Btn4\",            [BTN_5] = \"Btn5\",\n    [BTN_6] = \"Btn6\",            [BTN_7] = \"Btn7\",\n    [BTN_8] = \"Btn8\",            [BTN_9] = \"Btn9\",\n    [BTN_LEFT] = \"LeftBtn\",            [BTN_RIGHT] = \"RightBtn\",\n    [BTN_MIDDLE] = \"MiddleBtn\",        [BTN_SIDE] = \"SideBtn\",\n    [BTN_EXTRA] = \"ExtraBtn\",        [BTN_FORWARD] = \"ForwardBtn\",\n    [BTN_BACK] = \"BackBtn\",            [BTN_TASK] = \"TaskBtn\",\n    [BTN_TRIGGER] = \"Trigger\",        [BTN_THUMB] = \"ThumbBtn\",\n    [BTN_THUMB2] = \"ThumbBtn2\",        [BTN_TOP] = \"TopBtn\",\n    [BTN_TOP2] = \"TopBtn2\",            [BTN_PINKIE] = \"PinkieBtn\",\n    [BTN_BASE] = \"BaseBtn\",            [BTN_BASE2] = \"BaseBtn2\",\n    [BTN_BASE3] = \"BaseBtn3\",        [BTN_BASE4] = \"BaseBtn4\",\n    [BTN_BASE5] = \"BaseBtn5\",        [BTN_BASE6] = \"BaseBtn6\",\n    [BTN_DEAD] = \"BtnDead\",            [BTN_A] = \"BtnA\",\n    [BTN_B] = \"BtnB\",            [BTN_C] = \"BtnC\",\n    [BTN_X] = \"BtnX\",            [BTN_Y] = \"BtnY\",\n    [BTN_Z] = \"BtnZ\",            [BTN_TL] = \"BtnTL\",\n    [BTN_TR] = \"BtnTR\",            [BTN_TL2] = \"BtnTL2\",\n    [BTN_TR2] = \"BtnTR2\",            [BTN_SELECT] = \"BtnSelect\",\n    [BTN_START] = \"BtnStart\",        [BTN_MODE] = \"BtnMode\",\n    [BTN_THUMBL] = \"BtnThumbL\",        [BTN_THUMBR] = \"BtnThumbR\",\n    [BTN_TOOL_PEN] = \"ToolPen\",        [BTN_TOOL_RUBBER] = \"ToolRubber\",\n    [BTN_TOOL_BRUSH] = \"ToolBrush\",        [BTN_TOOL_PENCIL] = \"ToolPencil\",\n    [BTN_TOOL_AIRBRUSH] = \"ToolAirbrush\",    [BTN_TOOL_FINGER] = \"ToolFinger\",\n    [BTN_TOOL_MOUSE] = \"ToolMouse\",        [BTN_TOOL_LENS] = \"ToolLens\",\n    [BTN_TOUCH] = \"Touch\",            [BTN_STYLUS] = \"Stylus\",\n    [BTN_STYLUS2] = \"Stylus2\",        [BTN_TOOL_DOUBLETAP] = \"Tool Doubletap\",\n    [BTN_TOOL_TRIPLETAP] = \"Tool Tripletap\", [BTN_GEAR_DOWN] = \"WheelBtn\",\n    [BTN_GEAR_UP] = \"Gear up\",        [KEY_OK] = \"Ok\",\n    [KEY_SELECT] = \"Select\",        [KEY_GOTO] = \"Goto\",\n    [KEY_CLEAR] = \"Clear\",            [KEY_POWER2] = \"Power2\",\n    [KEY_OPTION] = \"Option\",        [KEY_INFO] = \"Info\",\n    [KEY_TIME] = \"Time\",            [KEY_VENDOR] = \"Vendor\",\n    [KEY_ARCHIVE] = \"Archive\",        [KEY_PROGRAM] = \"Program\",\n    [KEY_CHANNEL] = \"Channel\",        [KEY_FAVORITES] = \"Favorites\",\n    [KEY_EPG] = \"EPG\",            [KEY_PVR] = \"PVR\",\n    [KEY_MHP] = \"MHP\",            [KEY_LANGUAGE] = \"Language\",\n    [KEY_TITLE] = \"Title\",            [KEY_SUBTITLE] = \"Subtitle\",\n    [KEY_ANGLE] = \"Angle\",            [KEY_ZOOM] = \"Zoom\",\n    [KEY_MODE] = \"Mode\",            [KEY_KEYBOARD] = \"Keyboard\",\n    [KEY_SCREEN] = \"Screen\",        [KEY_PC] = \"PC\",\n    [KEY_TV] = \"TV\",            [KEY_TV2] = \"TV2\",\n    [KEY_VCR] = \"VCR\",            [KEY_VCR2] = \"VCR2\",\n    [KEY_SAT] = \"Sat\",            [KEY_SAT2] = \"Sat2\",\n    [KEY_CD] = \"CD\",            [KEY_TAPE] = \"Tape\",\n    [KEY_RADIO] = \"Radio\",            [KEY_TUNER] = \"Tuner\",\n    [KEY_PLAYER] = \"Player\",        [KEY_TEXT] = \"Text\",\n    [KEY_DVD] = \"DVD\",            [KEY_AUX] = \"Aux\",\n    [KEY_MP3] = \"MP3\",            [KEY_AUDIO] = \"Audio\",\n    [KEY_VIDEO] = \"Video\",            [KEY_DIRECTORY] = \"Directory\",\n    [KEY_LIST] = \"List\",            [KEY_MEMO] = \"Memo\",\n    [KEY_CALENDAR] = \"Calendar\",        [KEY_RED] = \"Red\",\n    [KEY_GREEN] = \"Green\",            [KEY_YELLOW] = \"Yellow\",\n    [KEY_BLUE] = \"Blue\",            [KEY_CHANNELUP] = \"ChannelUp\",\n    [KEY_CHANNELDOWN] = \"ChannelDown\",    [KEY_FIRST] = \"First\",\n    [KEY_LAST] = \"Last\",            [KEY_AB] = \"AB\",\n    [KEY_NEXT] = \"Next\",            [KEY_RESTART] = \"Restart\",\n    [KEY_SLOW] = \"Slow\",            [KEY_SHUFFLE] = \"Shuffle\",\n    [KEY_BREAK] = \"Break\",            [KEY_PREVIOUS] = \"Previous\",\n    [KEY_DIGITS] = \"Digits\",        [KEY_TEEN] = \"TEEN\",\n    [KEY_TWEN] = \"TWEN\",            [KEY_DEL_EOL] = \"Delete EOL\",\n    [KEY_DEL_EOS] = \"Delete EOS\",        [KEY_INS_LINE] = \"Insert line\",\n    [KEY_DEL_LINE] = \"Delete line\",\n};\n\nchar *absval[5] = { \"Value\", \"Min \", \"Max \", \"Fuzz \", \"Flat \" };\n\nchar *relatives[REL_MAX + 1] = {\n    [0 ... REL_MAX] = NULL,\n    [REL_X] = \"X\",            [REL_Y] = \"Y\",\n    [REL_Z] = \"Z\",            [REL_HWHEEL] = \"HWheel\",\n    [REL_DIAL] = \"Dial\",        [REL_WHEEL] = \"Wheel\", \n    [REL_MISC] = \"Misc\",    \n};\n\nchar *absolutes[ABS_MAX + 1] = {\n    [0 ... ABS_MAX] = NULL,\n    [ABS_X] = \"X\",            [ABS_Y] = \"Y\",\n    [ABS_Z] = \"Z\",            [ABS_RX] = \"Rx\",\n    [ABS_RY] = \"Ry\",        [ABS_RZ] = \"Rz\",\n    [ABS_THROTTLE] = \"Throttle\",    [ABS_RUDDER] = \"Rudder\",\n    [ABS_WHEEL] = \"Wheel\",        [ABS_GAS] = \"Gas\",\n    [ABS_BRAKE] = \"Brake\",        [ABS_HAT0X] = \"Hat0X\",\n    [ABS_HAT0Y] = \"Hat0Y\",        [ABS_HAT1X] = \"Hat1X\",\n    [ABS_HAT1Y] = \"Hat1Y\",        [ABS_HAT2X] = \"Hat2X\",\n    [ABS_HAT2Y] = \"Hat2Y\",        [ABS_HAT3X] = \"Hat3X\",\n    [ABS_HAT3Y] = \"Hat 3Y\",        [ABS_PRESSURE] = \"Pressure\",\n    [ABS_DISTANCE] = \"Distance\",    [ABS_TILT_X] = \"XTilt\",\n    [ABS_TILT_Y] = \"YTilt\",        [ABS_TOOL_WIDTH] = \"Tool Width\",\n    [ABS_VOLUME] = \"Volume\",    [ABS_MISC] = \"Misc\",\n};\n\nchar *misc[MSC_MAX + 1] = {\n    [ 0 ... MSC_MAX] = NULL,\n    [MSC_SERIAL] = \"Serial\",    [MSC_PULSELED] = \"Pulseled\",\n    [MSC_GESTURE] = \"Gesture\",    [MSC_RAW] = \"RawData\",\n    [MSC_SCAN] = \"ScanCode\",\n};\n\nchar *leds[LED_MAX + 1] = {\n    [0 ... LED_MAX] = NULL,\n    [LED_NUML] = \"NumLock\",        [LED_CAPSL] = \"CapsLock\", \n    [LED_SCROLLL] = \"ScrollLock\",    [LED_COMPOSE] = \"Compose\",\n    [LED_KANA] = \"Kana\",        [LED_SLEEP] = \"Sleep\", \n    [LED_SUSPEND] = \"Suspend\",    [LED_MUTE] = \"Mute\",\n    [LED_MISC] = \"Misc\",\n};\n\nchar *repeats[REP_MAX + 1] = {\n    [0 ... REP_MAX] = NULL,\n    [REP_DELAY] = \"Delay\",        [REP_PERIOD] = \"Period\"\n};\n\nchar *sounds[SND_MAX + 1] = {\n    [0 ... SND_MAX] = NULL,\n    [SND_CLICK] = \"Click\",        [SND_BELL] = \"Bell\",\n    [SND_TONE] = \"Tone\"\n};\n\nchar **names[EV_MAX + 1] = {\n    [0 ... EV_MAX] = NULL,\n    [EV_SYN] = events,            [EV_KEY] = keys,\n    [EV_REL] = relatives,            [EV_ABS] = absolutes,\n    [EV_MSC] = misc,            [EV_LED] = leds,\n    [EV_SND] = sounds,            [EV_REP] = repeats,\n};\n\n#define BITS_PER_LONG (sizeof(long) * 8)\n#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)\n#define OFF(x) ((x)%BITS_PER_LONG)\n#define BIT(x) (1UL<<OFF(x))\n#define LONG(x) ((x)/BITS_PER_LONG)\n#define test_bit(bit, array)    ((array[LONG(bit)] >> OFF(bit)) & 1)\n\nint main (int argc, char **argv)\n{\n    int fd, rd, i, j, k;\n    struct input_event ev[64];\n    int version;\n    unsigned short id[4];\n    unsigned long bit[EV_MAX][NBITS(KEY_MAX)];\n    char name[256] = \"Unknown\";\n    int abs[5];\n\n    if (argc < 2) {\n        printf(\"Usage: evtest /dev/input/eventX\\n\");\n        printf(\"Where X = input device number\\n\");\n        return 1;\n    }\n\n    if ((fd = open(argv[argc - 1], O_RDONLY)) < 0) {\n        perror(\"evtest\");\n        return 1;\n    }\n\n    if (ioctl(fd, EVIOCGVERSION, &version)) {\n        perror(\"evtest: can't get version\");\n        return 1;\n    }\n\n    printf(\"Input driver version is %d.%d.%d\\n\",\n        version >> 16, (version >> 8) & 0xff, version & 0xff);\n\n    ioctl(fd, EVIOCGID, id);\n    printf(\"Input device ID: bus 0x%x vendor 0x%x product 0x%x version 0x%x\\n\",\n        id[ID_BUS], id[ID_VENDOR], id[ID_PRODUCT], id[ID_VERSION]);\n\n    ioctl(fd, EVIOCGNAME(sizeof(name)), name);\n    printf(\"Input device name: \\\"%s\\\"\\n\", name);\n\n    memset(bit, 0, sizeof(bit));\n    ioctl(fd, EVIOCGBIT(0, EV_MAX), bit[0]);\n    printf(\"Supported events:\\n\");\n\n    for (i = 0; i < EV_MAX; i++)\n        if (test_bit(i, bit[0])) {\n            printf(\" Event type %d (%s)\\n\", i, events[i] ? events[i] : \"?\");\n            if (!i) continue;\n            ioctl(fd, EVIOCGBIT(i, KEY_MAX), bit[i]);\n            for (j = 0; j < KEY_MAX; j++) \n                if (test_bit(j, bit[i])) {\n                    printf(\" Event code %d (%s)\\n\", j, names[i] ? (names[i][j] ? names[i][j] : \"?\") : \"?\");\n                    if (i == EV_ABS) {\n                        ioctl(fd, EVIOCGABS(j), abs);\n                        for (k = 0; k < 5; k++)\n                            if ((k < 3) || abs[k])\n                                printf(\" %s %6d\\n\", absval[k], abs[k]);\n                    }\n                }\n        }\n    printf(\"Testing ... (interrupt to exit)\\n\");\n\n    while (1) {\n        rd = read(fd, ev, sizeof(struct input_event) * 64);\n\n        if (rd < (int) sizeof(struct input_event)) {\n            printf(\"yyy\\n\");\n            perror(\"\\nevtest: error reading\");\n            return 1;\n        }\n\n        for (i = 0; i < rd / sizeof(struct input_event); i++)\n\n            if (ev[i].type == EV_SYN) {\n                printf(\"Event: time %ld.%06ld, -------------- %s ------------\\n\",\n                    ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].code ? \"Config Sync\" : \"Report Sync\" );\n            } else if (ev[i].type == EV_MSC && (ev[i].code == MSC_RAW || ev[i].code == MSC_SCAN)) {\n                printf(\"Event: time %ld.%06ld, type %d (%s), code %d (%s), value %02x\\n\",\n                    ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type,\n                    events[ev[i].type] ? events[ev[i].type] : \"?\",\n                    ev[i].code,\n                    names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : \"?\") : \"?\",\n                    ev[i].value);\n            } else {\n                printf(\"Event: time %ld.%06ld, type %d (%s), code %d (%s), value %d\\n\",\n                    ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type,\n                    events[ev[i].type] ? events[ev[i].type] : \"?\",\n                    ev[i].code,\n                    names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : \"?\") : \"?\",\n                    ev[i].value);\n            }    \n\n    }\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/evdev_tools/sources/remap.c",
    "content": "/*\n * Signed-off-by: Ning Bo <n.b@live.com>\n*/\n#include <linux/input.h>\n#include <unistd.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <fcntl.h>\n#include <stdio.h>\n#include <string.h>\n\nvoid remap(int src, int dst) {\n    int ret = 0;\n    int power = 0, back = 0;\n\tstruct input_event ev, ev_pre, ev_end;\n\n    while(1) {\n\t\tret = read(src, &ev, sizeof(struct input_event));\n\t\tif(ret != sizeof(struct input_event))\n\t\t{\n\t\t\tperror(\"read\");\n            break;\n\t\t}\n\n\t\tif (ev.value == 0xc0030) {\n\t\t\tev_pre.time = ev.time;\n\t\t\tev_pre.type = 4;\n\t\t\tev_pre.code = 4;\n\t\t\tev_pre.value = 0x9000b;\n\t\t\tpower = 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (power==0 && ev.value==0xc0224) {\n\t\t\tev_pre.time = ev.time;\n\t\t\tev_pre.type = 4;\n\t\t\tev_pre.code = 4;\n\t\t\tev_pre.value = 0x9000b;\n\t\t\tback = 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (power) {\n\t\t\twrite(dst, &ev_pre, sizeof(struct input_event));\n\n\t\t\tev.code = 0x13a;\n\t\t\twrite(dst, &ev, sizeof(struct input_event));\n\n\t\t\tev_end.time = ev.time;\n\t\t\tev_end.type = 0;\n\t\t\tev_end.code = 0;\n\t\t\tev_end.value = 0;\n\t\t\twrite(dst, &ev_end, sizeof(struct input_event));\n\n\t\t\tev_pre.value = 0x9000c;\n\t\t\twrite(dst, &ev_pre, sizeof(struct input_event));\n\n\t\t\tev.code = 0x13b;\n\t\t\twrite(dst, &ev, sizeof(struct input_event));\n\n\t\t\twrite(dst, &ev_end, sizeof(struct input_event));\n\n\t\t\tpower = 0;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (back) {\n\t\t\twrite(dst, &ev_pre, sizeof(struct input_event));\n\n\t\t\tev.code = 0x13a;\n\t\t\twrite(dst, &ev, sizeof(struct input_event));\n\n\t\t\tev_end.time = ev.time;\n\t\t\tev_end.type = 0;\n\t\t\tev_end.code = 0;\n\t\t\tev_end.value = 0;\n\t\t\twrite(dst, &ev_end, sizeof(struct input_event));\n\n\t\t\tback = 0;\n\t\t\tcontinue;\n\t\t}\n\t}\n\n    close(src);\n    close(dst);\n\n    return;\n}\n\nint main(int argc, char *argv[])\n{\n\tint fd_from = 0, fd_to = 0;\n\n\tif (argc != 3) {\n\t\tprintf(\"usage: %s <input event from> <input event to>\", argv[0]);\n\t\treturn 1;\n\t}\n\n    while(1) {\n\t    fd_from = open(argv[1], O_RDONLY);\n\t    if(fd_from < 0)\n\t    {\n\t    \tperror(\"open from\");\n            sleep(1);\n            break;\n\t    }\n\t    fd_to = open(argv[2], O_WRONLY);\n\t    if(fd_to < 0)\n\t    {\n\t    \tperror(\"open to\");\n            sleep(1);\n            break;\n\t    }\n\n        remap(fd_from, fd_to);\n    }\n}\n\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/evdev_tools/sources/send.c",
    "content": "/*\n * Signed-off-by: Ning Bo <n.b@live.com>\n*/\n#include <linux/input.h>\n#include <unistd.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <fcntl.h>\n#include <stdio.h>\n#include <string.h>\n\n#define BASE_VALUE 0x9000b\n#define BASE_CODE BTN_SELECT\n\nint main(int argc, char *argv[])\n{\n\tint fd_to = -1, ret = -1;\n\tstruct input_event ev, ev_pre, ev_end;\n\tstruct timeval ts;\n\n\tif (argc != 2) {\n\t\tprintf(\"usage: %s <input event to>\", argv[0]);\n\t\treturn 1;\n\t}\n\n\tchar *to = argv[1];\n\n\tfd_to = open(to, O_WRONLY);\n\tif(fd_to < 0)\n\t{\n\t\tperror(\"open to\");\n\t\treturn -1;\n\t}\n\n    int version;\n    ioctl(fd_to, EVIOCGVERSION, &version);\n\n\tgettimeofday(&ts, NULL);\n\tev_pre.time=ts;\n\tev_pre.type=4;\n\tev_pre.code=4;\n\tev_pre.value=BASE_VALUE+(BTN_A-BTN_SELECT);\n\twrite(fd_to, &ev_pre, sizeof(struct input_event));\n\n\tev.time=ts;\n\tev.type=1;\n\tev.code=BASE_CODE+(BTN_A-BTN_SELECT);\n\tev.value=1;\n\twrite(fd_to, &ev, sizeof(struct input_event));\n\n\tev_end.time=ev.time;\n\tev_end.type=0;\n\tev_end.code=0;\n\tev_end.value=0;\n\twrite(fd_to, &ev_end, sizeof(struct input_event));\n\n\tsleep(1);\n\n\tgettimeofday(&ts, NULL);\n\tev_pre.time=ts;\n\twrite(fd_to, &ev_pre, sizeof(struct input_event));\n\tev.time=ts;\n\tev.value=0;\n\twrite(fd_to, &ev, sizeof(struct input_event));\n\tev_end.time=ts;\n\twrite(fd_to, &ev_end, sizeof(struct input_event));\n}\n\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/exfat/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"exfat\"\nPKG_VERSION=\"66747e2df0771b23ea30cbef3767f2b72488e914\"\nPKG_SHA256=\"c83fedc3deaefde0d9549deb73ffc4b610d29ff23d39e5628114f67d267d0e82\"\nPKG_LICENSE=\"GPLv2+\"\nPKG_SITE=\"https://github.com/relan/exfat\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Free exFAT file system implementation.\"\nPKG_TOOLCHAIN=\"autotools\"\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/exfat/patches/01-no-fuse.patch",
    "content": "diff -rupN exfat.orig/configure.ac exfat.new/configure.ac\n--- exfat.orig/configure.ac\t2021-01-04 18:18:34.766169964 -0500\n+++ exfat.new/configure.ac\t2021-01-04 18:20:48.674744092 -0500\n@@ -38,7 +38,6 @@ PKG_CHECK_MODULES([UBLIO], [libublio], [\n   AC_DEFINE([USE_UBLIO], [1],\n     [Define if block devices are not supported.])\n ], [:])\n-PKG_CHECK_MODULES([FUSE], [fuse])\n case \"$host_os\" in\n   *-gnu)\n     AC_DEFINE([_XOPEN_SOURCE], [500], [Enable pread() and pwrite().])\n@@ -50,7 +49,6 @@ AC_CONFIG_FILES([\n \tlibexfat/Makefile\n \tdump/Makefile\n \tfsck/Makefile\n-\tfuse/Makefile\n \tlabel/Makefile\n \tmkfs/Makefile\n \tMakefile])\ndiff -rupN exfat.orig/configure.ac.orig exfat.new/configure.ac.orig\n--- exfat.orig/configure.ac.orig\t1969-12-31 19:00:00.000000000 -0500\n+++ exfat.new/configure.ac.orig\t2021-01-04 18:19:10.778324347 -0500\n@@ -0,0 +1,57 @@\n+#\n+#\tconfigure.ac (30.03.15)\n+#\tAutoconf source.\n+#\n+#\tFree exFAT implementation.\n+#\tCopyright (C) 2010-2018  Andrew Nayenko\n+#\n+#\tThis program is free software; you can redistribute it and/or modify\n+#\tit under the terms of the GNU General Public License as published by\n+#\tthe Free Software Foundation, either version 2 of the License, or\n+#\t(at your option) any later version.\n+#\n+#\tThis program is distributed in the hope that it will be useful,\n+#\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\n+#\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+#\tGNU General Public License for more details.\n+#\n+#\tYou should have received a copy of the GNU General Public License along\n+#\twith this program; if not, write to the Free Software Foundation, Inc.,\n+#\t51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n+#\n+\n+AC_INIT([Free exFAT implementation],\n+\t[1.3.0],\n+\t[relan@users.noreply.github.com],\n+\t[exfat],\n+\t[https://github.com/relan/exfat])\n+AM_INIT_AUTOMAKE([1.11.2 -Wall -Werror foreign subdir-objects])\n+AC_PROG_CC\n+AC_PROG_CC_C99\n+AC_PROG_RANLIB\n+AM_PROG_AR\n+AC_SYS_LARGEFILE\n+AC_CANONICAL_HOST\n+PKG_CHECK_MODULES([UBLIO], [libublio], [\n+  CFLAGS=\"$CFLAGS $UBLIO_CFLAGS\"\n+  LIBS=\"$LIBS $UBLIO_LIBS\"\n+  AC_DEFINE([USE_UBLIO], [1],\n+    [Define if block devices are not supported.])\n+], [:])\n+PKG_CHECK_MODULES([FUSE], [fuse])\n+case \"$host_os\" in\n+  *-gnu)\n+    AC_DEFINE([_XOPEN_SOURCE], [500], [Enable pread() and pwrite().])\n+    AC_DEFINE([_DEFAULT_SOURCE], [], [Enable vsyslog().])\n+\t;;\n+esac\n+AC_CONFIG_HEADERS([libexfat/config.h])\n+AC_CONFIG_FILES([\n+\tlibexfat/Makefile\n+\tdump/Makefile\n+\tfsck/Makefile\n+\tfuse/Makefile\n+\tlabel/Makefile\n+\tmkfs/Makefile\n+\tMakefile])\n+AC_OUTPUT\ndiff -rupN exfat.orig/Makefile.am exfat.new/Makefile.am\n--- exfat.orig/Makefile.am\t2021-01-04 18:18:34.766169964 -0500\n+++ exfat.new/Makefile.am\t2021-01-04 18:19:10.778324347 -0500\n@@ -20,4 +20,4 @@\n #\t51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n #\n \n-SUBDIRS = libexfat dump fsck fuse label mkfs\n+SUBDIRS = libexfat dump fsck label mkfs\ndiff -rupN exfat.orig/patch exfat.new/patch\n--- exfat.orig/patch\t1969-12-31 19:00:00.000000000 -0500\n+++ exfat.new/patch\t2021-01-04 18:18:55.522258946 -0500\n@@ -0,0 +1,26 @@\n+diff --git configure.ac configure.ac\n+--- configure.ac\t2018-09-15 07:03:24.000000000 +0200\n++++ configure.ac\t2019-10-28 18:02:19.792588993 +0100\n+@@ -37,13 +37,11 @@\n+   AC_DEFINE([USE_UBLIO], [1],\n+     [Define if block devices are not supported.])\n+ ], [:])\n+-PKG_CHECK_MODULES([FUSE], [fuse])\n+ AC_CONFIG_HEADERS([libexfat/config.h])\n+ AC_CONFIG_FILES([\n+ \tlibexfat/Makefile\n+ \tdump/Makefile\n+ \tfsck/Makefile\n+-\tfuse/Makefile\n+ \tlabel/Makefile\n+ \tmkfs/Makefile\n+ \tMakefile])\n+diff --git Makefile.am Makefile.am\n+--- Makefile.am\t2018-09-15 07:03:24.000000000 +0200\n++++ Makefile.am\t2019-10-28 18:02:19.785922319 +0100\n+@@ -20,4 +20,4 @@\n+ #\t51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n+ #\n+\n+-SUBDIRS = libexfat dump fsck fuse label mkfs\n++SUBDIRS = libexfat dump fsck label mkfs\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/exfat-linux/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"exfat-linux\"\nPKG_VERSION=\"29fdcd25f82439e49d03ed2d5c7d0fd0906f3cb8\"\nPKG_SHA256=\"15d5bff755733442546aec119d7a05e2166af2d034ff0698677e914efe35e1d6\"\nPKG_SITE=\"https://github.com/arter97/exfat-linux\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"exFAT filesystem module for Linux kernel, for extraction in linux package only, DO NOT BUILD\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n  # This package should not be built, and should not be unpacked to the build dir\n  :\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/fbdump/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"fbdump\"\nPKG_VERSION=\"0.4.2\"\nPKG_SHA256=\"c4d521a86229b3106cf69786008ad94f899da5288a19a067deae84951880722d\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.rcdrummond.net/fbdump\"\nPKG_URL=\"${PKG_SITE}/fbdump-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"fbdump is a simple tool that captures the contents of the visible portion of the Linux framebuffer device and writes it to the standard output as a PPM file.\"\nPKG_TOOLCHAIN=\"autotools\"\n\npre_configure_target() {\n# for some reason this was failing with undefined reference to 'rpl_malloc' so we remove the check\ncd ${PKG_BUILD}\nsed -i \"s|AC_FUNC_MALLOC||\" configure.in\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp src/fbdump ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/fbfix/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"fbfix\"\nPKG_VERSION=\"v1\"\nPKG_LICENSE=\"Public Domain\"\nPKG_SITE=\"https://forum.odroid.com/viewtopic.php?t=34827\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\"A workaround used to fix framebuffer issues on s922x kernel v4.x\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n    ${CC} -O2 fbfix.c -o fbfix\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp fbfix ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/fbfix/sources/fbfix.c",
    "content": "/* by crashoverride https://forum.odroid.com/viewtopic.php?p=254904#p254904 */\n\n#include <unistd.h>\n#include <stdio.h>\n#include <fcntl.h>\n#include <linux/fb.h>\n#include <sys/mman.h>\n#include <stdlib.h>\n#include <sys/ioctl.h>\n#include <string.h>\n#include <ctype.h>\n\nint main(int argc, char *argv[])\n{\n\t\tif (argc != 2) {\n\t\t\t\tfprintf(stderr, \"Usage: %s <fb index 0-3>\\n\", argv[0]);\n\t\t\t\treturn 1;\n\t\t}\n\n\t\t// Validate argument\n\t\tif (strlen(argv[1]) != 1 || !isdigit(argv[1][0])) {\n\t\t\t\tfprintf(stderr, \"Error: framebuffer index must be a single digit (0-3)\\n\");\n\t\t\t\treturn 1;\n\t\t}\n\n\t\tint fb_index = argv[1][0] - '0';\n\t\tif (fb_index < 0 || fb_index > 3) {\n\t\t\t\tfprintf(stderr, \"Error: framebuffer index must be between 0 and 3\\n\");\n\t\t\t\treturn 1;\n\t\t}\n\n    int fbfd = 0;\n    struct fb_var_screeninfo vinfo;\n    struct fb_fix_screeninfo finfo;\n\n\t\t// Build framebuffer path\n    char fb_path[16];\n    snprintf(fb_path, sizeof(fb_path), \"/dev/fb%d\", fb_index);\n\n    /* Open the file for reading and writing */\n    fbfd = open(fb_path, O_RDWR);\n    if (!fbfd) \n    {\n        printf(\"Error: cannot open framebuffer device.\\n\");\n        exit(1);\n    }\n    printf(\"The framebuffer device was opened successfully.\\n\");\n\n    /* Get fixed screen information */\n    if (ioctl(fbfd, FBIOGET_FSCREENINFO, &finfo))\n    {\n        printf(\"Error reading fixed information.\\n\");\n        exit(2);\n    }\n\n    /* Get variable screen information */\n    if (ioctl(fbfd, FBIOGET_VSCREENINFO, &vinfo)) \n    {\n        printf(\"Error reading variable information.\\n\");\n        exit(3);\n    }\n\n    printf(\"vinfo.yoffset=%d\\n\", vinfo.yoffset);\n    \n    if (vinfo.yoffset != 0)\n    {\n        printf(\"FIX: setting vinfo.yoffset=0.\\n\");\n        vinfo.yoffset = 0;\n        if (ioctl(fbfd, FBIOPUT_VSCREENINFO, &vinfo)) \n        {\n            printf(\"Error setting variable information.\\n\");\n            exit(4);\n        }\n    }\n\n    return 0;\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/fbgrab/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"fbgrab\"\nPKG_VERSION=\"74373aafc0b496e67642562d86eac6b858a31f24\"\nPKG_SHA256=\"c6199223c001bb47950a157be9877f54b20211cacd05c0256a08769e9fe0f190\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/GunnarMonell/fbgrab\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libpng fbdump\"\nPKG_LONGDESC=\"fbgrab linux framebuffer screenshot utility. \"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\n\tsed -i \"s|-Wall|-Wall -lm|\" Makefile\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp fbgrab ${INSTALL}/usr/bin\ncp screenshot.sh ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/fbgrab/sources/screenshot.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n. /etc/profile\n\nSCREENDIR=\"/storage/roms/screenshots\"\nFILENAME=$(date \"+%Y%m%d%H%M%S%3N\")\n\n# Make sure folder exists\nmkdir -p \"${SCREENDIR}\"\n\n# Take screenshot\ncd \"${SCREENDIR}\"\n\nif [[ \"$EE_DEVICE\" == \"OdroidGoAdvance\" || \"$EE_DEVICE\" == \"GameForce\" || \"$EE_DEVICE\" == \"RK3568\" ]]; then\n    fbdump > \"${FILENAME}.pbm\"\n    convert \"${FILENAME}.pbm\" \"${FILENAME}.png\"\n    rm \"${FILENAME}.pbm\"\nelse\n    fbgrab -z 0 \"${FILENAME}.png\"\nfi\n\n\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/fbterm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"fbterm\"\nPKG_VERSION=\"ef9a13146e24c059fa44151e2a0a22b9762853bc\"\nPKG_SHA256=\"149c9fd243b6f93a0e907c8adf281e6e308d15be6a30fc0b1081755c0bc44dbc\"\nPKG_LICENSE=\"GPLv2+\"\nPKG_SITE=\"https://github.com/sfzhi/fbterm\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain freetype fontconfig\"\nPKG_LONGDESC=\" fbterm is a framebuffer based terminal emulator for linux \"\nPKG_TOOLCHAIN=\"configure\"\n\npre_configure_target() {\n  cd ..\n  rm -rf .${TARGET_NAME}\n}\n\nmakeinstall_target() { \nmkdir -p ${INSTALL}/usr/bin\ncp -rf ${PKG_BUILD}/src/fbterm ${INSTALL}/usr/bin\n#mkdir -p ${INSTALL}/usr/share/terminfo\n#cp -rf ${PKG_DIR}/terminfo/* ${INSTALL}/usr/share/terminfo/\n#tic ${PKG_BUILD}/terminfo/fbterm -o ${INSTALL}/usr/share/terminfo\n# mv ${INSTALL}/usr/share/terminfo/f/fbterm ${INSTALL}/usr/share/terminfo/f/linux\n# mv ${INSTALL}/usr/share/terminfo/f ${INSTALL}/usr/share/terminfo/l\n# mkdir -p ${INSTALL}/usr/share/terminfo/f/\n# cp ${PKG_BUILD}/terminfo/fbterm ${INSTALL}/usr/share/terminfo/f/\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/fbterm/patches/0001-fbio.cpp-improxy.cpp-fbterm.cpp-fix-musl-compile.patch",
    "content": "From 1072d60c6c8f1f51feb740527a8a056bfead9318 Mon Sep 17 00:00:00 2001\nFrom: Peter Seiderer <ps.report@gmx.net>\nDate: Thu, 8 Oct 2015 19:53:47 +0200\nSubject: [PATCH] fbio.cpp, improxy.cpp, fbterm.cpp: fix musl compile\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\n- add missing include, fixes:\n\n  fbio.cpp:33:8: error: ‘fd_set’ does not name a type\n   static fd_set fds;\n\n  improxy.cpp:439:3: error: ‘fd_set’ was not declared in this scope\n\n- add missing WAIT_ANY define, fixes:\n\n  fbterm.cpp: In member function ‘void FbTerm::processSignal(u32)’:\n  fbterm.cpp:212:22: error: ‘WAIT_ANY’ was not declared in this scope\n      s32 pid = waitpid(WAIT_ANY, 0, WNOHANG);\n\nSigned-off-by: Peter Seiderer <ps.report@gmx.net>\n---\n src/fbio.cpp    | 1 +\n src/fbterm.cpp  | 4 ++++\n src/improxy.cpp | 1 +\n 3 files changed, 6 insertions(+)\n\ndiff --git a/src/fbio.cpp b/src/fbio.cpp\nindex e5afc44..88c632c 100644\n--- a/src/fbio.cpp\n+++ b/src/fbio.cpp\n@@ -30,6 +30,7 @@\n #define NR_EPOLL_FDS 10\n s32 epollFd;\n #else\n+#include <sys/select.h>\n static fd_set fds;\n static u32 maxfd = 0;\n #endif\ndiff --git a/src/fbterm.cpp b/src/fbterm.cpp\nindex 38d4014..60288e4 100644\n--- a/src/fbterm.cpp\n+++ b/src/fbterm.cpp\n@@ -37,6 +37,10 @@\n #include \"input_key.h\"\n #include \"mouse.h\"\n \n+#ifndef WAIT_ANY\n+#define WAIT_ANY (-1)\n+#endif\n+\n #ifdef HAVE_SIGNALFD\n // <sys/signalfd.h> offered by some systems has bug with g++\n #include \"signalfd.h\"\ndiff --git a/src/improxy.cpp b/src/improxy.cpp\nindex 3d03e66..4e046d2 100644\n--- a/src/improxy.cpp\n+++ b/src/improxy.cpp\n@@ -23,6 +23,7 @@\n #include <stdio.h>\n #include <string.h>\n #include <errno.h>\n+#include <sys/select.h>\n #include <sys/socket.h>\n #include \"improxy.h\"\n #include \"immessage.h\"\n-- \n2.1.4\n\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/fbterm/patches/gcc-6-build-fixes.patch",
    "content": "From 69917d25c6f718572433262d86691bf24e72e4c8 Mon Sep 17 00:00:00 2001\nFrom: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>\nDate: Wed, 13 Jul 2016 12:02:10 +0900\nSubject: [PATCH] Fix build with gcc-6\n\nSigned-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>\n---\n src/lib/vterm.cpp        |  4 ++--\n src/lib/vterm_states.cpp | 18 +++++++++---------\n 2 files changed, 11 insertions(+), 11 deletions(-)\n\ndiff --git a/src/lib/vterm.cpp b/src/lib/vterm.cpp\nindex 3a5dcc7..f79f44c 100644\n--- a/src/lib/vterm.cpp\n+++ b/src/lib/vterm.cpp\n@@ -68,13 +68,13 @@ u8 VTerm::control_map[MAX_CONTROL_CODE], VTerm::escape_map[NR_STATES][MAX_ESCAPE\n \n void VTerm::init_state()\n {\n-\tfor (u8 i = 1; control_sequences[i].code != (u16)-1; i++) {\n+\tfor (u8 i = 1; control_sequences[i].code != (u16)0xFFFF; i++) {\n \t\tcontrol_map[control_sequences[i].code] = i;\n \t}\n \n \tu8 state = ESnormal;\n \tfor (u8 i = 1; ; i++) {\n-\t\tif (escape_sequences[i].code == (u16)-1) {\n+\t\tif (escape_sequences[i].code == (u16)0xFFFF) {\n \t\t\tstate++;\n \t\t\tif (state == NR_STATES) break;\n \t\t} else {\ndiff --git a/src/lib/vterm_states.cpp b/src/lib/vterm_states.cpp\nindex 49e7588..6aaa8b3 100644\n--- a/src/lib/vterm_states.cpp\n+++ b/src/lib/vterm_states.cpp\n@@ -39,14 +39,14 @@ const VTerm::Sequence VTerm::control_sequences[] = {\n \t{ 0x1B, 0,\tESesc },\n \t{ 0x7F, 0,\tESkeep },\n \t{ 0x9B, 0,\tESsquare },\n-\t{ -1}\n+\t{ 0xFFFF}\n };\n \n const VTerm::Sequence VTerm::escape_sequences[] = {\n \t{   0, 0, ESnormal },\n \n \t// ESnormal\n-\t{ -1 },\n+\t{ 0xFFFF },\n \n \t// ESesc\n \t{ '[', &VTerm::clear_param,\tESsquare },\n@@ -65,7 +65,7 @@ const VTerm::Sequence VTerm::escape_sequences[] = {\n \t{ '8', &VTerm::restore_cursor,\tESnormal },\n \t{ '>', &VTerm::keypad_numeric,\tESnormal },\n \t{ '=', &VTerm::keypad_application,\tESnormal },\n-\t{ -1 },\n+\t{ 0xFFFF },\n \n \t// ESsquare\n \t{ '[', 0,\tESfunckey },\n@@ -104,7 +104,7 @@ const VTerm::Sequence VTerm::escape_sequences[] = {\n \t{ '`', &VTerm::cursor_position_col,\tESnormal },\n \t{ ']', &VTerm::linux_specific, ESnormal },\n \t{ '}', &VTerm::fbterm_specific, ESnormal },\n-\t{ -1 },\n+\t{ 0xFFFF },\n \n \t// ESnonstd\n \t{ '0' | ADDSAME(9), &VTerm::set_palette,    ESkeep },\n@@ -112,25 +112,25 @@ const VTerm::Sequence VTerm::escape_sequences[] = {\n \t{ 'a' | ADDSAME(5), &VTerm::set_palette,    ESkeep },\n \t{ 'P', &VTerm::begin_set_palette, ESkeep },\n \t{ 'R', &VTerm::reset_palette, ESnormal },\n-\t{ -1 },\n+\t{ 0xFFFF },\n \n \t// ESpercent\n \t{ '@', &VTerm::clear_utf8,\tESnormal },\n \t{ 'G', &VTerm::set_utf8,\tESnormal },\n \t{ '8', &VTerm::set_utf8,\tESnormal },\n-\t{ -1 },\n+\t{ 0xFFFF },\n \n \t// EScharset\n \t{ '0', &VTerm::set_charset, ESnormal },\n \t{ 'B', &VTerm::set_charset, ESnormal },\n \t{ 'U', &VTerm::set_charset, ESnormal },\n \t{ 'K', &VTerm::set_charset, ESnormal },\n-\t{ -1 },\n+\t{ 0xFFFF },\n \n \t// EShash\n \t{ '8', &VTerm::screen_align,\tESnormal },\n-\t{ -1 },\n+\t{ 0xFFFF },\n \n \t// ESfunckey\n-\t{ -1 },\n+\t{ 0xFFFF },\n };\n-- \n2.8.1\n\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/freeimage/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n\nPKG_NAME=\"freeimage\"\nPKG_VERSION=\"3180\"\nPKG_SHA256=\"f41379682f9ada94ea7b34fe86bf9ee00935a3147be41b6569c9605a53e438fd\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"http://freeimage.sourceforge.net/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/${PKG_NAME}/FreeImage${PKG_VERSION}.zip\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SOURCE_DIR=\"FreeImage\"\nPKG_LONGDESC=\"FreeImage library\"\n\npre_make_target() {\n  export CXXFLAGS=\"${CXXFLAGS} -Wno-narrowing -std=c++11\"\n  export CFLAGS=\"${CFLAGS} -DPNG_ARM_NEON_OPT=0\"\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/freeimage/patches/freeimage-02-makefix.patch",
    "content": "--- a/Makefile.gnu\t2016-03-21 16:07:00.122741950 +0100\n+++ b/Makefile.gnu\t2016-03-21 16:07:25.745733760 +0100\n@@ -71,9 +71,9 @@\n \n install:\n \tinstall -d $(INCDIR) $(INSTALLDIR)\n-\tinstall -m 644 -o root -g root $(HEADER) $(INCDIR)\n-\tinstall -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)\n-\tinstall -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)\n+\tinstall -m 644 $(HEADER) $(INCDIR)\n+\tinstall -m 644 $(STATICLIB) $(INSTALLDIR)\n+\tinstall -m 755 $(SHAREDLIB) $(INSTALLDIR)\n \tln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)\n \tln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)\t\n #\tldconfig\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/git/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"git\"\nPKG_VERSION=\"2.39.2\"\nPKG_SHA256=\"fb6807d1eb4094bb2349ab97d203fe1e6c3eb28af73ea391decfbd3a03c02e85\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://git-scm.com/\"\nPKG_URL=\"https://mirrors.edge.kernel.org/pub/software/scm/git/git-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain openssl pcre curl libiconv zlib\"\nPKG_SECTION=\"emuelec\"\nPKG_SHORTDESC=\"Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. \"\nPKG_LONGDESC=\"Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. \"\n\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_fread_reads_directories=yes \\\n                           ac_cv_snprintf_returns_bogus=yes \\\n                           ac_cv_iconv_omits_bom=yes\"\n                           \npre_configure_target() {\n cd ..\n rm -rf .${TARGET_NAME}\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/gptokeyb/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"gptokeyb\"\nPKG_VERSION=\"9cf438275c87ca3542b2ce34b1a043663d3be005\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/EmuELEC/gptokeyb\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 libevdev\"\nPKG_SECTION=\"emuelec\"\nPKG_SHORTDESC=\"Gamepad to Keyboard/mouse/xbox360 emulator\"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\nsed -i \"s|\\`sdl2-config|\\`${SYSROOT_PREFIX}/usr/bin/sdl2-config|g\" Makefile\nsed -i \"s|\\-I/usr/include/libevdev-1.0|\\-I${SYSROOT_PREFIX}/usr/include/libevdev-1.0|g\" Makefile\n}\n\nmakeinstall_target(){\nmkdir -p ${INSTALL}/usr/bin\ncp gptokeyb ${INSTALL}/usr/bin\n\nmkdir -p ${INSTALL}/usr/config/emuelec/configs/gptokeyb\ncp -rf ${PKG_BUILD}/configs/*.gptk ${INSTALL}/usr/config/emuelec/configs/gptokeyb\n\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/grep/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"grep\"\nPKG_VERSION=\"3.11\"\nPKG_SHA256=\"1f31014953e71c3cddcedb97692ad7620cb9d6d04fbdc19e0d8dd836f87622bb\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://ftp.gnu.org/gnu/${PKG_NAME}\"\nPKG_URL=\"${PKG_SITE}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SHORTDESC=\"Grep\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory busybox)\"\n\npre_configure_target() {\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-perl-regexp=yes\"\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/iotop/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"iotop\"\nPKG_VERSION=\"4602ed3353a6479b1b7a3adfba84e09124c90d38\"\nPKG_SHA256=\"0d3593714011197e32f56953ae1dc21079126a614f90caa2a58d118137f1e8af\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/Tomas-M/iotop\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses\"\nPKG_LONGDESC=\"A top utility for IO \"\nPKG_TOOLCHAIN=\"make\"\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/joyutils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"joyutils\"\nPKG_VERSION=\"b6703ebf04c839fc47f9e490b68c4d5d885f32f9\"\nPKG_SHA256=\"73914d760d44542fa5b88ab42f914713e07e184c299415fdbe8abd83e68dc200\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/datrh/joyutils\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"tools\"\nPKG_SHORTDESC=\"jscal, jstest, and jsattach utilities for the Linux joystick driver\"\nPKG_LONGDESC=\"jscal, jstest, and jsattach utilities for the Linux joystick driver\"\n\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"no\"\n\n# post_unpack() {\n#  mv ${BUILD}/joystick-${PKG_VERSION} ${BUILD}/${PKG_NAME}-${PKG_VERSION}\n# }\n\nmake_target() {\n  ${CC} -lm -o jscal jscal.c ${CFLAGS}\n  ${CC} -lm -o jstest jstest.c ${CFLAGS}\n  ${CC} -lm -o jsattach jsattach.c ${CFLAGS}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp jscal ${INSTALL}/usr/bin/\n  cp jstest ${INSTALL}/usr/bin/\n  cp jsattach ${INSTALL}/usr/bin/\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/jslisten/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"jslisten\"\nPKG_VERSION=\"f6842f6be8ffff2013ce4a7f56b421bed61c269c\"\nPKG_SHA256=\"9ad886915544ca620b751de65fd8337613de94c742fbac550d13d8a6f692dea3\"\nPKG_LICENSE=\"GPL3\"\nPKG_SITE=\"https://github.com/shantigilbert/jslisten\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_GIT_CLONE_BRANCH=\"EmuELEC\"\nPKG_DEPENDS_TARGET=\"toolchain systemd\"\nPKG_LONGDESC=\"listen to gamepad inputs and trigger a command, cloned from https://github.com/workinghard/jslisten\"\nPKG_TOOLCHAIN=\"make\"\n\nmake_target() {\nmkdir bin\nmake \n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp bin/jslisten ${INSTALL}/usr/bin\n} \n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/light/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"light\"\nPKG_VERSION=\"33f2316e5512762a5a33a62c78db7a435d9fec9b\"\nPKG_LICENSE=\"GPL3\"\nPKG_SITE=\"https://github.com/haikarainen/light\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Light - A program to control backlights (and other hardware lights) in GNU/Linux\"\nPKG_TOOLCHAIN=\"configure\"\n\npre_configure_target() {\n\t./autogen.sh\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/luajit/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019 Trond Haugland (github.com/escalade)\n\nPKG_NAME=\"luajit\"\nPKG_VERSION=\"99168476b9f6e1910057181428f2225b09458747\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/moonjit/moonjit\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain luajit:host\"\nPKG_SHORTDESC=\"LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming language. \"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_GIT_CLONE_BRANCH=\"v2.1\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"+speed\"\n\npost_patch() {\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME} && cp -r ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}\n  mkdir -p ${PKG_BUILD}/.${HOST_NAME} && cp -r ${PKG_BUILD}/* ${PKG_BUILD}/.${HOST_NAME}\n}\n\nmakeinstall_host() {\n  cd .${HOST_NAME}\n  make amalg\n  make PREFIX=/ DESTDIR=${TOOLCHAIN} install\n  VER=$(grep LUAJIT_VERSION src/luajit.h | head -n1 | cut -d \\\" -f 2 | cut -d \" \" -f 2)\n  ln -sf luajit-${VER} ${TOOLCHAIN}/bin/luajit\n}\n\nmakeinstall_target() {\n  cd .${TARGET_NAME}\n  unset CFLAGS\n  [ \"${ARCH}\" = \"arm\" ] && BIT=\"-m32\"\n  make PREFIX=\"/usr\" \\\n\t\tCC=\"${CC} -fPIC\" \\\n\t\tTARGET_LD=\"${CC}\" \\\n\t\tTARGET_AR=\"${AR} rcus\" \\\n\t\tTARGET_STRIP=true \\\n\t\tTARGET_CFLAGS=\"${TARGET_CFLAGS}\" \\\n\t\tTARGET_LDFLAGS=\"${LDFLAGS}\" \\\n\t\tHOST_CC=\"${HOST_CC} ${BIT}\" \\\n\t\tHOST_CFLAGS=\"${CFLAGS}\" \\\n\t\tHOST_LDFLAGS=\"${LDFLAGS}\" \\\n\t\tXCFLAGS= \\\n\t\t${JITARCH} \\\n\t\tamalg \n  make PREFIX=/usr DESTDIR=${INSTALL} install\n  make PREFIX=/usr DESTDIR=${SYSROOT_PREFIX} install\n  \n  VER=$(grep LUAJIT_VERSION src/luajit.h | head -n1 | cut -d \\\" -f 2 | cut -d \" \" -f 2)\n\n  ln -sf /usr/bin/luajit-${VER} ${INSTALL}/usr/bin/lua\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/luajit/patches/luajit-crosscompile.patch",
    "content": "--- a/src/host/buildvm.c\t2019-11-19 18:33:03.914237086 +0100\n+++ b/src/host/buildvm.c\t2019-11-19 18:33:08.837645902 +0100\n@@ -434,12 +434,6 @@\n   BuildCtx *ctx = &ctx_;\n   int status, binmode;\n \n-  if (sizeof(void *) != 4*LJ_32+8*LJ_64) {\n-    fprintf(stderr,\"Error: pointer size mismatch in cross-build.\\n\");\n-    fprintf(stderr,\"Try: make HOST_CC=\\\"gcc -m32\\\" CROSS=...\\n\\n\");\n-    return 1;\n-  }\n-\n   UNUSED(argc);\n   parseargs(ctx, argv);\n \n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/munt/munt_alsadrv/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2024-present EmuELEC (https://github.com/emuelec)\n\nPKG_NAME=\"munt_alsadrv\"\nPKG_VERSION=\"$(get_pkg_version munt)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory munt)\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/munt/munt\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain munt\"\nPKG_LONGDESC=\"A software synthesiser emulating pre-GM MIDI devices such as the Roland MT-32.\"\nPKG_TOOLCHAIN=\"make\"\n\nunpack() {\n  ${SCRIPTS}/get munt\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/munt/munt-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n                    \nmake_target() {\ncd ${PKG_BUILD}/mt32emu_alsadrv\nmake mt32d\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin/\n  cp ${PKG_BUILD}/mt32emu_alsadrv/mt32d ${INSTALL}/usr/bin/\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/munt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 0riginally created by Escalade (https://github.com/escalade)\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n\nPKG_NAME=\"munt\"\nPKG_VERSION=\"1cdac309f420ca224e59e2952f5521759508d2eb\"\nPKG_SHA256=\"cad4c7b224f315051e01a8c6b27b42941fc1818766c3c69df773e788bc39f0b6\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/munt/munt\"\nPKG_URL=\"https://github.com/munt/munt/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A software synthesiser emulating pre-GM MIDI devices such as the Roland MT-32.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-Dmunt_WITH_MT32EMU_QT=OFF \\\n                       -Dmunt_WITH_MT32EMU_SMF2WAV=0 \\\n                       -Dlibmt32emu_SHARED=1\"                  \n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/patchelf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"patchelf\"\nPKG_VERSION=\"47dc18d0e5c1ff24f815177927940c294b1fde76\"\nPKG_SHA256=\"4799c754930293281966426f0aae596a629d1a1b77612f92b8ff8a98063d511c\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://github.com/NixOS/patchelf\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"A small utility to modify the dynamic linker and RPATH of ELF executables\"\nPKG_TOOLCHAIN=\"configure\"\n\npre_configure_target() {\n./bootstrap.sh\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/physfs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"physfs\"\nPKG_VERSION=\"0145431345058282ec77ffb4240b2f5947a7dc4a\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://github.com/criptych/physfs\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain glm ncurses\"\nPKG_SHORTDESC=\"PhysicsFS; a portable, flexible file i/o abstraction.\"\nGET_HANDLER_SUPPORT=\"git\"\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/poppler/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n# Copyright (C) 2023-present Guoxin \"7Ji\" Pu (https://github.com/7Ji)\n\nPKG_NAME=\"poppler\"\nPKG_VERSION=\"23.04.0\"\n_PKG_TAG=\"${PKG_NAME}-${PKG_VERSION}\"\nPKG_SHA256=\"61ab8a8da0ae2bd6f8e7e6f60d5970f7f87cd790c1620f0fe6fbcbdc095c7571\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://gitlab.freedesktop.org/poppler/poppler\"\nPKG_URL=\"${PKG_SITE}/-/archive/${_PKG_TAG}/${PKG_NAME}-${_PKG_TAG}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib libpng libjpeg-turbo boost freetype fontconfig glib glib:host\"\nPKG_LONGDESC=\"The poppler pdf rendering library \"\nPKG_TOOLCHAIN=\"cmake\"\n\n\npre_configure_target() { \n    PKG_CMAKE_OPTS_TARGET=\"-DCMAKE_BUILD_TYPE=release \\\n                        -DENABLE_LIBOPENJPEG=none \\\n                        -DENABLE_GLIB=ON \\\n                        -DENABLE_QT5=off \\\n                        -DENABLE_CPP=off\"\n                        \n    # Disable \"gobject-introspection\"\n    sed -i \"s|set(HAVE_INTROSPECTION \\${INTROSPECTION_FOUND})|set(HAVE_INTROSPECTION \"NO\")|g\" ${PKG_BUILD}/CMakeLists.txt\n}\n\npost_makeinstall_target() {\n    mkdir -p ${INSTALL}/usr/bin/batocera\n    ln -sf /usr/bin/pdftoppm ${INSTALL}/usr/bin/batocera/pdftoppm\n    ln -sf /usr/bin/pdfinfo ${INSTALL}/usr/bin/batocera/pdfinfo\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/progressor/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"progressor\"\nPKG_VERSION=\"151f47a07b13cb37faf3e9a144691f44c7370161\"\nPKG_LICENSE=\"GPL-2.0\"\nPKG_SITE=\"https://github.com/JohnnyonFlame/progressor\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_SHORTDESC=\"Simple ImGui application to display patching progress and queries.\"\nPKG_TOOLCHAIN=\"cmake\"\n\nmakeinstall_target(){\nmkdir -p ${INSTALL}/usr/bin\ncp progressor ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/progressor/patches/gles.patch",
    "content": "--- a/src/main.cpp\n+++ b/src/main.cpp\n@@ -40,19 +40,11 @@\n const char* glsl_version_core_32 = \"#version 150\";\n static int create_gl_context(int width, int height, bool is_es2)\n {\n-    if (is_es2) {\n         SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0);\n         SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);\n         SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);\n         SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);\n         glsl_version = glsl_version_es_20;\n-    } else {\n-        SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG); // Always required on Mac\n-        SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY);\n-        SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);\n-        SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);\n-        glsl_version = glsl_version_core_32;\n-    }\n \n     sdl_win = SDL_CreateWindow(\"Progress\", 0, 0, width, height, SDL_WINDOW_OPENGL | SDL_WINDOW_FULLSCREEN_DESKTOP);\n     if (!sdl_win) {\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/pygame/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"pygame\"\nPKG_VERSION=\"ee0fc698531a0c14f3e6a06734d35f8460ab71f4\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/pygame/pygame\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_mixer SDL2_net SDL2_ttf libpng libjpeg-turbo Python3\"\nPKG_LONGDESC=\"pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL. \"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n  export LDFLAGS=\"${LDFLAGS} -L${SYSROOT_PREFIX}/usr/lib -L${SYSROOT_PREFIX}/lib\"\n  export LDSHARED=\"${CC} -shared\"\n\n  sed -i \"s|sdl2-config|${SYSROOT_PREFIX}/usr/bin/sdl2-config|g\" ${PKG_BUILD}/buildconfig/config_unix.py\n  sed -i \"s|freetype-config|${SYSROOT_PREFIX}/usr/bin/freetype-config|g\" ${PKG_BUILD}/buildconfig/config_unix.py\n  sed -i \"s|raise SystemExit(\\\"Missing dependencies\\\")||g\" ${PKG_BUILD}/buildconfig/config_unix.py\n}\n\nmake_target() {\n  LOCALBASE=\"${SYSROOT_PREFIX}/usr\" python3 setup.py build\n}\n\nmakeinstall_target() {\n  python3 setup.py install --root=${INSTALL} --prefix=/usr \n}\n\npost_makeinstall_target() {\n  find ${INSTALL}/usr/lib/python*/site-packages/  -name \"*.pyc\" -exec rm -rf {} \";\"\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/python-evdev/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 0riginally created by Escalade (https://github.com/escalade)\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n\nPKG_NAME=\"python-evdev\"\nPKG_VERSION=\"2dd6ce6364bb67eedb209f6aa0bace0c18a3a40a\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://github.com/gvalkov/python-evdev\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain Python3:host Python3 distutilscross:host\"\nPKG_LONGDESC=\"Userspace evdev events\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_GIT_CLONE_BRANCH=\"main\"\n\npre_make_target() {\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n  export LDFLAGS=\"${LDFLAGS} -L${SYSROOT_PREFIX}/usr/lib -L${SYSROOT_PREFIX}/lib\"\n  export LDSHARED=\"${CC} -shared\"\n  find . -name setup.py -exec sed -i \"s:/usr/include/linux/input.h :${SYSROOT_PREFIX}/usr/include/linux/input.h:g\" \\{} \\;\n  find . -name setup.py -exec sed -i \"s:/usr/include/linux/input-event-codes.h :${SYSROOT_PREFIX}/usr/include/linux/input-event-codes.h:g\" \\{} \\;\n}\n\nmake_target() {\n  python3 setup.py build_ext \\\n  build_ecodes --evdev-headers ${SYSROOT_PREFIX}/usr/include/linux/input.h:${SYSROOT_PREFIX}/usr/include/linux/input-event-codes.h \\\n  build_ext --include-dirs ${SYSROOT_PREFIX}/usr/include/\n}\n\nmakeinstall_target() {\n  python3 setup.py install --root=${INSTALL} --prefix=/usr\n}\n\npost_makeinstall_target() {\n\nif [[ \"${ARCH}\" == \"arm\" ]]; then\n\tlibname=\"arm-linux-gnueabihf.so\"\nelse\n\tlibname=\"aarch64-linux-gnu.so\"\nfi\n\n  # Seems like there's an issue in the build system.\n  # C Modules get built using the correct target toolchain but the generated *.so\n  # file names use the arch from the host system\n  # tried to solve it but couldn't so I move them to the correct names for python\n  # to grab them\n  mv ${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}/site-packages/evdev/_ecodes.cpython-311-* \\\n    ${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}/site-packages/evdev/_ecodes.cpython-311-${libname}\n  mv ${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}/site-packages/evdev/_input.cpython-311-* \\\n    ${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}/site-packages/evdev/_input.cpython-311-${libname}\n  mv ${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}/site-packages/evdev/_uinput.cpython-311-* \\\n    ${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}/site-packages/evdev/_uinput.cpython-311-${libname}\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/python3-protobuf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"python3-protobuf\"\nPKG_VERSION=\"4f49062a95f18a6c7e21ba17715a2b0a4608151a\"\nPKG_SHA256=\"b96b86607ee0b1620b6cb512fa8ea01149493a9af01438906b006f685fd43e59\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://github.com/protocolbuffers/protobuf\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host protobuf\"\nPKG_DEPENDS_HOST=\"toolchain Python3:host distutilscross:host protobuf protobuf:host\"\nPKG_LONGDESC=\"Python 2 and 3 compatibility library \"\nPKG_TOOLCHAIN=\"manual\"\n\n\nmake_host() {\n cd ${PKG_BUILD}/python\n  python3 setup.py build\n}\n\nmakeinstall_host() {\n cd ${PKG_BUILD}/python\n  python3 setup.py install --prefix=${TOOLCHAIN}\n}\n\npre_make_target() {\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n  export LDFLAGS=\"${LDFLAGS} -L${SYSROOT_PREFIX}/usr/lib -L${SYSROOT_PREFIX}/lib\"\n  export LDSHARED=\"${CC} -shared\"\n  cd ${PKG_BUILD}/python\n}\n\nmake_target() {\ncd ${PKG_BUILD}/python\n  python3 setup.py build\n}\n\nmakeinstall_target() {\n  python3 setup.py install --root=${INSTALL} --prefix=/usr\n}\n\npost_makeinstall_target() {\n  find ${INSTALL}/usr/lib/python*/site-packages/  -name \"*.py\" -exec rm -rf {} \";\"\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/python3-protobuf/patches/python3-protobuf-001-add-experimental_allow_proto3_optional.patch",
    "content": "--- a/python/setup.py\n+++ b/python/setup.py\n@@ -73,7 +73,7 @@\n           \"or install the binary package.\\n\")\n       sys.exit(-1)\n \n-    protoc_command = [ protoc, \"-I../src\", \"-I.\", \"--python_out=.\", source ]\n+    protoc_command = [ protoc, \"--experimental_allow_proto3_optional\", \"-I../src\", \"-I.\", \"--python_out=.\", source ]\n     if subprocess.call(protoc_command) != 0:\n       sys.exit(-1)\n \n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/pyudev/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 0riginally created by Escalade (https://github.com/escalade)\n# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)\n\nPKG_NAME=\"pyudev\"\nPKG_VERSION=\"fa2789694c84c7120ecc7bf9e4647914482e8665\"\nPKG_SHA256=\"50597fc925fca44f8d572775be0caadfd6875afaad3dd7f4d02809220c30ebb5\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://github.com/pyudev/pyudev\"\nPKG_URL=\"https://github.com/pyudev/pyudev/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"pyudev is a LGPL licenced, pure Python 2/3 binding to libudev, the device and hardware management and information library of Linux.\"\n\npre_make_target() {\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n  export LDFLAGS=\"${LDFLAGS} -L${SYSROOT_PREFIX}/usr/lib -L${SYSROOT_PREFIX}/lib\"\n  export LDSHARED=\"${CC} -shared\"\n}\n\nmake_target() {\n  python setup.py build --cross-compile\n}\n\nmakeinstall_target() {\n  python setup.py install --root=${INSTALL} --prefix=/usr\n}\n\npost_makeinstall_target() {\n  find ${INSTALL}/usr/lib/python*/site-packages/  -name \"*.py\" -exec rm -rf {} \";\"\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/pyudev/patches/pyudev-001-libraryfix.patch",
    "content": "--- a/src/pyudev/_ctypeslib/utils.py\t2016-07-25 13:16:38.820202459 +0200\n+++ b/src/pyudev/_ctypeslib/utils.py\t2016-07-25 13:23:32.533533168 +0200\n@@ -53,7 +53,7 @@\n     \"\"\"\n     library_name = find_library(name)\n     if not library_name:\n-        raise ImportError('No library named %s' % name)\n+        library_name = 'libudev.so'\n     lib = CDLL(library_name, use_errno=True)\n     # Add function signatures\n     for funcname, signature in signatures.items():\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/pyyaml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"pyyaml\"\nPKG_VERSION=\"8cdff2c80573b8be8e8ad28929264a913a63aa33\"\nPKG_SHA256=\"\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://github.com/yaml/pyyaml\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_DEPENDS_HOST=\"toolchain:host distutilscross:host Python3:host \"\nPKG_LONGDESC=\"Python 2 and 3 compatibility library \"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_host() {\n  python3 setup.py build\n}\n\nmakeinstall_host() {\n\texec_thread_safe python3 setup.py install --prefix=${TOOLCHAIN}\n}\n\npre_make_target() {\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n  export LDFLAGS=\"${LDFLAGS} -L${SYSROOT_PREFIX}/usr/lib -L${SYSROOT_PREFIX}/lib\"\n  export LDSHARED=\"${CC} -shared\"\n}\n\nmake_target() {\n  python3 setup.py build\n}\n\nmakeinstall_target() {\n  python3 setup.py install --root=${INSTALL} --prefix=/usr\n}\n\npost_makeinstall_target() {\n  find ${INSTALL}/usr/lib/python*/site-packages/  -name \"*.py\" -exec rm -rf {} \";\"\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/rclone/bin/ra_rclone.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Joshua L. (https://github.com/Langerz82)\n\n# Source predefined functions and variables\n. /etc/profile\n\nACTION=${1}\nPLATFORM=${2}\nROMNAME=\"${3}\"\n\nRA_CONFIG=\"/storage/.config/retroarch/retroarch.cfg\"\nRA_RBASE=\"emuelec:/retroarch-saves\"\nRC_LOG=\"/emuelec/logs/rclone.log\"\nRCLONE_ARGS=\" --log-file=${RC_LOG} --log-level DEBUG --transfers 2 --checkers 2 --contimeout 30s --timeout 120s --retries 3 --low-level-retries 10 --stats 1s\"\n\nDEBUG=1\n\nrm \"${RC_LOG}\"\ntouch \"${RC_LOG}\"\n\n[[ ! -f \"${ROMNAME}\" ]] && exit 1\n\n[[ ${DEBUG} == 1 ]] && echo \"ROMNAME=${ROMNAME}\" >> \"${RC_LOG}\"\nBASENAME=\"${ROMNAME##*/}\"\n[[ ${DEBUG} == 1 ]] && echo \"BASENAME=${BASENAME}\" >> \"${RC_LOG}\"\nROMSTEM=\"${BASENAME%.*}\"\n[[ ${DEBUG} == 1 ]] && echo \"ROMSTEM=${ROMSTEM}\" >> \"${RC_LOG}\"\n\nif [[ \"${ACTION}\" == \"get\" || \"${ACTION}\" == \"set\" ]]; then  \n  SRM_CONTENT=$(cat \"${RA_CONFIG}\" | grep savefiles_in_content_dir | cut -d'\"' -f2)\n  if [[ \"${SRM_CONTENT}\" == \"true\" ]]; then\n    RA_LSAVES=\"${ROMNAME%/*}\"\n  else\n    SAVEFILE_PATH=$(cat \"${RA_CONFIG}\" | grep savefile_directory | cut -d'\"' -f2 | sed -e \"s/\\/${PLATFORM}$//g\" | sed -e \"s/^~/\\/storage/g\" )    \n    [[ ${DEBUG} == 1 ]] && echo \"SAVEFILE_PATH=${SAVEFILE_PATH}\" >> \"${RC_LOG}\"\n    RA_LSAVES=\"${SAVEFILE_PATH}\"\n  fi\n  [[ ${DEBUG} == 1 ]] && echo \"RA_LSAVES=${RA_LSAVES}\" >> \"${RC_LOG}\"\n  SAVESTATE_PATH=$(cat \"${RA_CONFIG}\" | grep savestate_directory | cut -d'\"' -f2 | sed -e \"s/\\/${PLATFORM}$//g\" | sed -e \"s/^~/\\/storage/g\" )\n  [[ ${DEBUG} == 1 ]] && echo \"SAVESTATE_PATH=${SAVESTATE_PATH}\" >> \"${RC_LOG}\"\n\n  RA_LSTATES=\"${SAVESTATE_PATH}/${PLATFORM}/\"\n  [[ ${DEBUG} == 1 ]] && echo \"RA_LSTATES=\\\"${RA_LSTATES}\\\"\" >> \"${RC_LOG}\"\n\n  RA_RSAVES=${RA_RBASE}/saves/${PLATFORM}\n  [[ ${DEBUG} == 1 ]] && echo \"RA_RSAVES=${RA_RBASE}/saves/${PLATFORM}\" >> \"${RC_LOG}\"\n  \n  RA_RSTATES=${RA_RBASE}/states/${PLATFORM}\n  [[ ${DEBUG} == 1 ]] && echo \"RA_RSTATES=${RA_RBASE}/states/${PLATFORM}\" >> \"${RC_LOG}\"\n  \nfi\n\nRUNSYNC=$(get_ee_setting cloudsave \"${PLATFORM}\"  \"${ROMNAME}\")\nif [[ \"${RUNSYNC}\" == \"1\" ]]; then\n  rclone mkdir \"${RA_RBASE}\"\n  wait\n  if [[ \"${ACTION}\" == \"get\" ]]; then\n    rclone copy ${RCLONE_ARGS} \"${RA_RSAVES}/\" --include \"/${ROMSTEM}.srm\" \"${RA_LSAVES}\" &\n    rclone copy ${RCLONE_ARGS} \"${RA_RSTATES}/\" --include \"/${ROMSTEM}.state*\" \"${RA_LSTATES}\" &\n  fi\n  if [[ \"${ACTION}\" == \"set\" ]]; then\n    \n    SRM=\"${RA_LSAVES}/${ROMSTEM}.srm\"\n    if [[ -f \"${SRM}\" ]]; then\n      rclone copy ${RCLONE_ARGS} \"${SRM}\" \"${RA_RSAVES}\" &\n      fc -ln -1 >> \"${RC_LOG}\"\n    fi\n    SF_FILES=\"${RA_LSTATES}${ROMSTEM}.state\"\n    SF_OK=$(ls \"${SF_FILES}\"*)\n    if [[ ! -z \"${SF_OK}\" ]]; then\n      rclone copy ${RCLONE_ARGS} \"${RA_LSTATES}\" --include \"/${ROMSTEM}.state*\" \"${RA_RSTATES}\" &\n      fc -ln -1 >> \"${RC_LOG}\"\n    fi\n  fi\n  wait\n  LOG_ERROR_TEXT=$(cat ${RC_LOG} \\\n    | grep -e \"ERROR :\" -e \"Failed to create file system\" \\\n    | grep -v \"directory not found\")\n  [[ ! -z \"${LOG_ERROR_TEXT}\" ]] || [[ ! -f \"${RC_LOG}\" ]] && exit 1\n  exit 0  \nfi\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/rclone/config/emuelec-cloud-filter.cfg",
    "content": "# Save states / sram from /storage/roms\n+ ee_defaults.txt\n+ *.sav\n+ *.nv\n+ *.nvmem*\n+ *.eeprom*\n+ *.fs\n+ *.srm\n+ *.state*\n+ *.auto\n# config backup (it will include restored backups as well)\n+ *ee_backup_config.tar.gz\n# Do not backup bios, roms and everything else\n- bios/**\n- *\n# exclude hidden files (hopefuly)\n- *.\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/rclone/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"rclone\"\nPKG_VERSION=\"71a784cfa22cd4753950999b356c16231e4f6888\"\nPKG_SHA256=\"e47d769185971d3d414d4ca5f9532e5b476e4fc5b1d4da89a8437ed3049bf908\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/rclone/rclone\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain go:host\"\nPKG_LONGDESC=\"rsync for cloud storage - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Yandex Files\"\nPKG_TOOLCHAIN=\"manual\"\n\nconfigure_target() {\n\n  case ${TARGET_ARCH} in\n    arm)\n      export GOARCH=arm\n\n      case ${TARGET_CPU} in\n        arm1176jzf-s)\n          export GOARM=6\n          ;;\n        *)\n          export GOARM=7\n          ;;\n      esac\n      ;;\n    aarch64)\n      export GOARCH=arm64\n      ;;\n  esac\n\n  export GOOS=linux\n  export GOLANG=${TOOLCHAIN}/lib/golang/bin/go\n  export LDFLAGS=\"-w -extldflags -static -X main.gitCommit=${PKG_VERSION} -X main.versionStr=${PKG_VERSION:0:7} -extld ${CC}\"\n}\n\nmake_target() {\n  mkdir -p bin\n  cd ${PKG_BUILD}\n  ${GOLANG} get $(echo ${PKG_SITE} | sed s/'http[s]\\?:\\/\\/'//)\n  ${GOLANG} build -ldflags \"${LDFLAGS}\" $(echo ${PKG_SITE} | sed s/'http[s]\\?:\\/\\/'//)\n}\n\nmakeinstall_target() {\n\tmkdir -p ${INSTALL}/usr/bin/\n\tmkdir -p ${INSTALL}/usr/config/emuelec/configs/rclone\n\tcp ${PKG_BUILD}/rclone ${INSTALL}/usr/bin/\n\tcp ${PKG_DIR}/bin/ra_rclone.sh ${INSTALL}/usr/bin\n\tcp ${PKG_DIR}/config/emuelec-cloud-filter.cfg ${INSTALL}/usr/config/emuelec/configs/rclone/\n\tln -sf /emuelec/configs/rclone ${INSTALL}/usr/config/rclone\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/rs97-commander-sdl2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"rs97-commander-sdl2\"\nPKG_VERSION=\"ad4f01b14a2fde33897167f18daa7218c13e5b52\"\nPKG_SHA256=\"175357346bae41e827de5cf79e752ed438eaae7dba82d812f042dd05fb146b45\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/EmuELEC/rs97-commander-sdl2\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_image SDL2_gfx SDL2_ttf freetype\"\nPKG_SECTION=\"tools\"\nPKG_SHORTDESC=\"Two-pane commander for RetroFW and RG-350 (fork of Dingux Commander)\"\n\npre_configure_target() {\nsed -i \"s|sdl2-config|${SYSROOT_PREFIX}/usr/bin/sdl2-config|\" Makefile\nsed -i \"s|CC=g++|CC=${CXX}|\" Makefile\n\nOGA=0\n\nif [[ \"${DEVICE}\" == \"OdroidGoAdvance\" || \"${DEVICE}\" == \"GameForce\" ]]; then\n\tOGA=1\nfi\n\nPKG_MAKE_OPTS_TARGET=\" ODROIDGO=${OGA} CC=${CXX}\"\n\t\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/fm\n  cp DinguxCommander ${INSTALL}/usr/bin/\n  cp -rf res ${INSTALL}/usr/config/emuelec/configs/fm/\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/sdljoytest/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"sdljoytest\"\nPKG_VERSION=\"49724c185e19d176cb05f08eab5f2349c4c365b7\"\nPKG_SHA256=\"e6c321cfb33b040dc56aa1472df6f50f5c956446e765e0238b073da4e6774ab1\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://github.com/EmuELEC/sdljoytest\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2\"\nPKG_LONGDESC=\"Test joystick with SDL2 in Linux\"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\nsed -i \"s|gcc|${CC}|\" Makefile\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp -rf test_gamepad_SDL2 ${INSTALL}/usr/bin/sdljoytest\ncp -rf map_gamepad_SDL2 ${INSTALL}/usr/bin/sdljoymap\ncp -rf gamepad_info ${INSTALL}/usr/bin/gamepad_info\ncp -rf sdl_ra_joystick_map ${INSTALL}/usr/bin/sdl_ra_joystick_map\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/sdlterm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2025-present EmuELEC (https://github.com/EmuELEC)\n\nPKG_NAME=\"sdlterm\"\nPKG_VERSION=\"v1\"\nPKG_LICENSE=\"Public Domain\"\nPKG_DEPENDS_TARGET=\"toolchain SDL2 SDL2_ttf\"\nPKG_SHORTDESC=\"simple SDL2 program to read output of bash scripts\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n    ${CXX} sdlterm.cpp -o sdlterm `sdl2-config --cflags --libs` -lSDL2_ttf -pthread\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp sdlterm ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/sdlterm/sources/sdlterm.cpp",
    "content": "#include <SDL2/SDL.h>\n#include <SDL2/SDL_ttf.h>\n\n#include <fstream>\n#include <iostream>\n#include <thread>\n#include <mutex>\n#include <vector>\n#include <string>\n#include <cstdlib>\n#include <cstdio>\n#include <cmath>\n\nstd::vector<std::string> output_lines;\nstd::mutex output_mutex;\nbool running = true;\n\nvoid read_script_output(const std::string& cmd) {\n    FILE* pipe = popen(cmd.c_str(), \"r\");\n    if (!pipe) {\n        std::lock_guard<std::mutex> lock(output_mutex);\n        output_lines.push_back(\"Failed to run script.\");\n        running = false;\n        return;\n    }\n\n    std::ofstream logfile(\"/emuelec/logs/sdlterm.log\", std::ios::out | std::ios::trunc);\n    if (!logfile) {\n        std::cerr << \"[ERROR] Could not open log file /emuelec/logs/sdlterm.log\\n\";\n    } else {\n        logfile << \"Output for: \" << cmd << \"\\n\\n\";\n    }\n\n    char buffer[256];\n    while (fgets(buffer, sizeof(buffer), pipe)) {\n        std::string line(buffer);\n\n        // Strip trailing newline/carriage return\n        while (!line.empty() && (line.back() == '\\n' || line.back() == '\\r')) {\n            line.pop_back();\n        }\n\n        {\n            std::lock_guard<std::mutex> lock(output_mutex);\n            output_lines.push_back(line);\n        }\n\n        if (logfile) {\n            logfile << line << std::endl;\n        }\n    }\n\n    if (logfile) {\n        logfile << \"All finished.\\n\";\n    }\n\n    pclose(pipe);\n    running = false;\n}\n\nvoid draw_filled_circle(SDL_Renderer* renderer, int cx, int cy, int radius) {\n    for (int dy = -radius; dy <= radius; ++dy) {\n        int width = static_cast<int>(sqrt(radius * radius - dy * dy));\n        SDL_RenderDrawLine(renderer, cx - width, cy + dy, cx + width, cy + dy);\n    }\n}\n\nint main(int argc, char* argv[]) {\n    std::string title = \"EmuELEC\";\n    std::string run_cmd;\n    std::string run_args;\n    bool wait_after_finish = false;\n\n    // Parse arguments\n    for (int i = 1; i < argc; ++i) {\n        std::string arg = argv[i];\n        if (arg == \"--title\" && i + 1 < argc) {\n            title = std::string(\"EmuELEC - \") + argv[++i];\n        } else if (arg == \"--run\" && i + 1 < argc) {\n            run_cmd = argv[++i];\n        } else if ((arg == \"--runargs\" || arg == \"--args\") && i + 1 < argc) {\n            run_args = argv[++i];\n        } else if (arg == \"--wait\") {\n            wait_after_finish = true;\n        } else {\n            std::cerr << \"Unknown argument: \" << arg << std::endl;\n            std::cerr << \"Usage: --title <title> --run <script> [--runargs <args>] [--wait]\" << std::endl;\n            return 1;\n        }\n    }\n\n    if (run_cmd.empty()) {\n        std::cerr << \"Usage: --title <title> --run <script> [--runargs <args>] [--wait]\" << std::endl;\n        return 1;\n    }\n\n    std::string full_cmd = \"bash -c '\" + run_cmd + \" \" + run_args + \"'\";\n    std::cout << \"[DEBUG] Full command: \" << full_cmd << std::endl;\n\n    // Initialize SDL\n    if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) != 0) {\n        std::cerr << \"SDL_Init error: \" << SDL_GetError() << std::endl;\n        return 1;\n    }\n\n    if (TTF_Init() == -1) {\n        std::cerr << \"TTF_Init error: \" << TTF_GetError() << std::endl;\n        SDL_Quit();\n        return 1;\n    }\n\n    // Load controller mappings\n    const char* mapping_file = std::getenv(\"SDL_GAMECONTROLLERCONFIG_FILE\");\n    if (mapping_file) {\n        if (SDL_GameControllerAddMappingsFromFile(mapping_file) == -1) {\n            std::cerr << \"Warning: Could not load mappings: \" << SDL_GetError() << std::endl;\n        } else {\n            std::cout << \"[DEBUG] Loaded controller mappings from: \" << mapping_file << std::endl;\n        }\n    }\n\n    // Open first available game controller\n    SDL_GameController* controller = nullptr;\n    for (int i = 0; i < SDL_NumJoysticks(); ++i) {\n        if (SDL_IsGameController(i)) {\n            controller = SDL_GameControllerOpen(i);\n            if (controller) {\n                std::cout << \"Game controller connected: \" << SDL_GameControllerName(controller) << std::endl;\n                break;\n            }\n        }\n    }\n\n    // Create fullscreen window\n    SDL_DisplayMode dm;\n    if (SDL_GetCurrentDisplayMode(0, &dm) != 0) {\n        std::cerr << \"SDL_GetCurrentDisplayMode error: \" << SDL_GetError() << std::endl;\n        TTF_Quit();\n        SDL_Quit();\n        return 1;\n    }\n\n    SDL_Window* window = SDL_CreateWindow(title.c_str(),\n                                          SDL_WINDOWPOS_CENTERED,\n                                          SDL_WINDOWPOS_CENTERED,\n                                          dm.w, dm.h,\n                                          SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_SHOWN);\n    if (!window) {\n        std::cerr << \"SDL_CreateWindow error: \" << SDL_GetError() << std::endl;\n        if (controller) SDL_GameControllerClose(controller);\n        TTF_Quit();\n        SDL_Quit();\n        return 1;\n    }\n\n    SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);\n    if (!renderer) {\n        std::cerr << \"SDL_CreateRenderer error: \" << SDL_GetError() << std::endl;\n        SDL_DestroyWindow(window);\n        if (controller) SDL_GameControllerClose(controller);\n        TTF_Quit();\n        SDL_Quit();\n        return 1;\n    }\n\n    TTF_Font* font = TTF_OpenFont(\"/usr/share/retroarch-assets/ozone/regular.ttf\", 18);\n    if (!font) {\n        std::cerr << \"TTF_OpenFont error: \" << TTF_GetError() << std::endl;\n        SDL_DestroyRenderer(renderer);\n        SDL_DestroyWindow(window);\n        if (controller) SDL_GameControllerClose(controller);\n        TTF_Quit();\n        SDL_Quit();\n        return 1;\n    }\n\n    SDL_Color white = {255, 255, 255, 255};\n    SDL_Color gray = {50, 50, 50, 255};\n\n    // Start script thread\n    std::thread script_thread(read_script_output, full_cmd);\n\n    bool quit = false;\n    SDL_Event e;\n    float angle = 0.0f;\n\n    const int line_height = 20;\n    const int output_start_y = 50;\n    const int visible_lines = (dm.h - output_start_y) / line_height;\n\n    while (!quit) {\n        while (SDL_PollEvent(&e)) {\n            if (e.type == SDL_QUIT) {\n                quit = true;\n            }\n            \n            if (!running && wait_after_finish) {\n                if (e.type == SDL_KEYDOWN || e.type == SDL_CONTROLLERBUTTONDOWN) {\n                    quit = true;\n                }\n            }\n        }\n\n        if (!running && !wait_after_finish) {\n            quit = true;\n        }\n\n        // Clear screen\n        SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);\n        SDL_RenderClear(renderer);\n\n        // Draw title bar\n        SDL_Rect title_bar = {0, 0, dm.w, 40};\n        SDL_SetRenderDrawColor(renderer, gray.r, gray.g, gray.b, gray.a);\n        SDL_RenderFillRect(renderer, &title_bar);\n\n        SDL_Surface* title_surface = TTF_RenderText_Blended(font, title.c_str(), white);\n        if (title_surface) {\n            SDL_Texture* title_texture = SDL_CreateTextureFromSurface(renderer, title_surface);\n            if (title_texture) {\n                SDL_Rect title_rect = {10, 10, title_surface->w, title_surface->h};\n                SDL_RenderCopy(renderer, title_texture, nullptr, &title_rect);\n                SDL_DestroyTexture(title_texture);\n            }\n            SDL_FreeSurface(title_surface);\n        }\n\n        // Draw output lines\n        {\n            std::lock_guard<std::mutex> lock(output_mutex);\n            int total_lines = static_cast<int>(output_lines.size());\n            int scroll_offset = 0;\n\n            if (running) {\n                scroll_offset = std::max(0, total_lines - visible_lines);\n            } else {\n                scroll_offset = std::max(0, total_lines - static_cast<int>(visible_lines / 1.2));\n            }\n\n            int lines_to_draw = std::min(visible_lines, total_lines - scroll_offset);\n            for (int i = 0; i < lines_to_draw; ++i) {\n                const std::string& line = output_lines[scroll_offset + i];\n                if (line.empty()) continue;\n                \n                SDL_Surface* text_surface = TTF_RenderText_Blended(font, line.c_str(), white);\n                if (!text_surface) {\n                    std::cerr << \"[WARN] Failed to render line: \" << line << \" - \" << TTF_GetError() << std::endl;\n                    continue;\n                }\n                \n                SDL_Texture* text_texture = SDL_CreateTextureFromSurface(renderer, text_surface);\n                if (!text_texture) {\n                    SDL_FreeSurface(text_surface);\n                    continue;\n                }\n                \n                SDL_Rect dst = {10, output_start_y + i * line_height, text_surface->w, text_surface->h};\n                SDL_RenderCopy(renderer, text_texture, nullptr, &dst);\n                SDL_FreeSurface(text_surface);\n                SDL_DestroyTexture(text_texture);\n            }\n        }\n\n        // Draw status indicator\n        const int circle_radius = 15;\n        const int circle_x = dm.w - 40;\n        const int circle_y = 25;\n\n        if (running) {\n            angle += 0.05f;\n            if (angle > 2 * M_PI) angle -= 2 * M_PI;\n\n            int pulse_radius = circle_radius - static_cast<int>(3 * (1 + sin(angle * 4)));\n            SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255);\n            draw_filled_circle(renderer, circle_x, circle_y, pulse_radius);\n        } else {\n            SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255);\n            draw_filled_circle(renderer, circle_x, circle_y, circle_radius);\n\n            const char* done_msg = wait_after_finish \n                ? \"Script finished! Press any key or gamepad button to exit.\"\n                : \"Script finished! Exiting...\";\n            \n            SDL_Surface* done_surface = TTF_RenderText_Blended(font, done_msg, white);\n            if (done_surface) {\n                SDL_Texture* done_texture = SDL_CreateTextureFromSurface(renderer, done_surface);\n                if (done_texture) {\n                    SDL_Rect done_rect = {10, dm.h - 40, done_surface->w, done_surface->h};\n                    SDL_RenderCopy(renderer, done_texture, nullptr, &done_rect);\n                    SDL_DestroyTexture(done_texture);\n                }\n                SDL_FreeSurface(done_surface);\n            }\n        }\n\n        SDL_RenderPresent(renderer);\n        SDL_Delay(16);\n    }\n\n    if (script_thread.joinable()) script_thread.join();\n\n    if (controller) SDL_GameControllerClose(controller);\n    TTF_CloseFont(font);\n    SDL_DestroyRenderer(renderer);\n    SDL_DestroyWindow(window);\n    TTF_Quit();\n    SDL_Quit();\n\n    return 0;\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/six/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"six\"\nPKG_VERSION=\"aa4e90bcd7b7bc13a71dfaebcb2021f4caaa8432\"\nPKG_SHA256=\"c96447798c18575887c4eddc9bf05fc09ba52d008584f0e5c2d8337795572d61\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://github.com/benjaminp/six\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host\"\nPKG_LONGDESC=\"Python 2 and 3 compatibility library \"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n  export LDFLAGS=\"${LDFLAGS} -L${SYSROOT_PREFIX}/usr/lib -L${SYSROOT_PREFIX}/lib\"\n  export LDSHARED=\"${CC} -shared\"\n}\n\nmake_target() {\n  python setup.py build --cross-compile\n}\n\nmakeinstall_target() {\n  python setup.py install --root=${INSTALL} --prefix=/usr\n}\n\npost_makeinstall_target() {\n  find ${INSTALL}/usr/lib/python*/site-packages/  -name \"*.py\" -exec rm -rf {} \";\"\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/sixaxis/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"sixaxis\"\nPKG_VERSION=\"f53b0ca28c35ebd71b54190f33eadcb8c3267186\"\nPKG_SHA256=\"baf7fd22c86c5a32d5043a6bd8487928d2ae216759414632b1d3a998ba61d922\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/RetroPie/sixaxis\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec/tools\"\nPKG_LONGDESC=\"sixaxis helper service \"\nPKG_TOOLCHAIN=\"make\"\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"no\"\n\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp sixaxis-helper.sh ${INSTALL}/usr/bin/sixaxis-helper.sh\n    cp bins/sixaxis-timeout ${INSTALL}/usr/bin/sixaxis-timeout\n}\n\npost_install() {\nenable_service sixaxis@.service\n}\n\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/sixaxis/system.d/sixaxis@.service",
    "content": "[Unit]\nDescription=sixaxis helper (%I)\n\n[Service]\nType=simple\nExecStart=/usr/bin/sixaxis-helper.sh %I\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/sixaxis/udev.d/99-sixaxis.rules",
    "content": "ACTION==\"add\", SUBSYSTEMS==\"input\", ATTRS{name}==\"*PLAYSTATION(R)3 Controller\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}=\"sixaxis@%E{DEVNAME}.service\", ENV{ID_INPUT_KEY}=\"\"\nACTION==\"add\", SUBSYSTEMS==\"input\", ATTRS{name}==\"*PLAYSTATION(R)3Conteroller\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}=\"sixaxis@%E{DEVNAME}.service\", ENV{ID_INPUT_KEY}=\"\"\nACTION==\"add\", SUBSYSTEMS==\"input\", ATTRS{name}==\"*PLAYSTATION(R)3Conteroller-PANHAI\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}=\"sixaxis@%E{DEVNAME}.service\", ENV{ID_INPUT_KEY}=\"\"\nACTION==\"add\", SUBSYSTEMS==\"input\", ATTRS{name}==\"*PS(R) Gamepad\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}=\"sixaxis@%E{DEVNAME}.service\", ENV{ID_INPUT_KEY}=\"\"\nACTION==\"add\", SUBSYSTEMS==\"input\", ATTRS{name}==\"*PS3 GamePad\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}=\"sixaxis@%E{DEVNAME}.service\", ENV{ID_INPUT_KEY}=\"\"\nACTION==\"add\", SUBSYSTEMS==\"input\", ATTRS{name}==\"Sony Interactive Entertainment Wireless Controller\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}=\"sixaxis@%E{DEVNAME}.service\", ENV{ID_INPUT_KEY}=\"\"\nACTION==\"add\", SUBSYSTEMS==\"input\", ENV{DEVNAME}==\"/dev/input/event*\", ATTRS{name}==\"*Motion Sensors\", RUN+=\"/bin/rm %E{DEVNAME}\", ENV{ID_INPUT_JOYSTICK}=\"\", ENV{ID_INPUT_KEY}=\"\"\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/sixpair/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"sixpair\"\nPKG_VERSION=\"23e6e087fe7f013128ce2e0e19a8f4b04fa7a6e8\"\nPKG_SHA256=\"9fc491060a85a01789a88e4dcb5271806ff6c7fbe62b58f828ac83ed1b4de1fe\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.pabr.org/sixlinux/\"\nPKG_URL=\"https://github.com/lakkatv/sixpair/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libusb libusb-compat\"\nPKG_SECTION=\"network\"\nPKG_SHORTDESC=\"Associate PS3 Sixaxis controller to system bluetoothd via USB\"\nPKG_LONGDESC=\"Associate PS3 Sixaxis controller to system bluetoothd via USB\"\nPKG_TOOLCHAIN=\"make\"\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  make sixpair LDLIBS=-lusb\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp sixpair ${INSTALL}/usr/bin\n}\n\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/tcpbridge/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n# Based on libreelec pycryptodome package\n\nPKG_NAME=\"tcpbridge\"\nPKG_VERSION=\"b8d11ef8a33f5484fa4f48f5f50801f7418aebe5\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/Cacaonut/tcpbridge\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"Python3 dbus-python\"\nPKG_LONGDESC=\"TCP bridge for data transfer.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_configure_target() {\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n  export LDSHARED=\"${CC} -shared\"\n}\n\nmake_target() {\n  python setup.py build\n}\n\nmakeinstall_target() {\n  python setup.py install --root=${INSTALL} --prefix=/usr\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/triggerhappy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"triggerhappy\"\nPKG_VERSION=\"b822888066129350e51ad79f1cf307fa38dae4f7\"\nPKG_SHA256=\"1b3221963b9adca26eacc5442d8c2422cf2072f8adde1dbd691a69b37a583fb1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL3\"\nPKG_SITE=\"https://github.com/wertarbyte/triggerhappy\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"A lightweight hotkey daemon \"\nPKG_TOOLCHAIN=\"make\"\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/vim/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"vim\"\nPKG_VERSION=\"9.0.1417\"\nPKG_SHA256=\"02c67859046f7c0206afb909061763cf40747c6bf40c22bb6efaf9c06be41591\"\nPKG_LICENSE=\"VIM\"\nPKG_SITE=\"http://www.vim.org/\"\nPKG_URL=\"https://github.com/vim/vim/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses\"\nPKG_LONGDESC=\"Vim is a highly configurable text editor built to enable efficient text editing.\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"vim_cv_getcwd_broken=no \\\n                           vim_cv_memmove_handles_overlap=yes \\\n                           vim_cv_stat_ignores_slash=yes \\\n                           vim_cv_terminfo=yes \\\n                           vim_cv_tgetent=zero \\\n                           vim_cv_toupper_broken=no \\\n                           vim_cv_tty_group=world \\\n                           vim_cv_tty_mode=0620 \\\n                           ac_cv_sizeof_int=4 \\\n                           ac_cv_small_wchar_t=no \\\n                           --datarootdir=/storage/.config/emuelec/configs/vimdata\\\n                           --disable-canberra \\\n                           --disable-nls \\\n                           --enable-selinux=no \\\n                           --enable-gui=no \\\n                           --with-compiledby=EmuELEC \\\n                           --with-features=huge \\\n                           --with-tlib=ncurses \\\n                           --without-x\"\n\nPKG_MAKEINSTALL_OPTS_TARGET=VIMRTDIR=\n\npre_configure_target() {\n  cd ..\n  rm -rf .${TARGET_NAME}\n}\n\nmake_target() {\n  :\n}\n\npre_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  mkdir -p ${INSTALL}/usr/config/emuelec/configs/vimdata\n}\n\npost_makeinstall_target() {\n  (\n  mv ${INSTALL}/storage/.config/emuelec/configs/vimdata/vim/vimrc_example.vim ${INSTALL}/usr/config/emuelec/configs/vimdata/vimrc\n  rm -r ${INSTALL}/storage/\n  )\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/wget/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"wget\"\nPKG_VERSION=\"1.20.3\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/mirror/wget\"\nPKG_URL=\"https://ftp.gnu.org/gnu/wget/wget-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain openssl\"\nPKG_LONGDESC=\"GNU Wget is a free software package for retrieving files using HTTP, HTTPS, FTP and FTPS\"\nPKG_TOOLCHAIN=\"configure\"\n\npre_configure_target() {\nPKG_CONFIGURE_OPTS_TARGET+=\" --with-ssl=openssl\"\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp ${PKG_BUILD}/.${TARGET_NAME}/src/wget ${INSTALL}/usr/bin/wget\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/xow/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"xow\"\nPKG_VERSION=\"d335d6024f8380f52767a7de67727d9b2f867871\"\nPKG_SHA256=\"b841bf298e2e8904033629cf5685938f90add9d9d3a826f1670ac9990b6f1f76\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/medusalix/xow\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libusb\"\nPKG_LONGDESC=\"Linux driver for the Xbox One wireless dongle  \"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\nPKG_MAKE_OPTS_TARGET=\" BUILD=RELEASE\"\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp xow ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/tools/sysutils/yasm/package.mk",
    "content": "################################################################################\n#      This file is part of OpenELEC - http://www.openelec.tv\n#      Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n#\n#  OpenELEC is free software: you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation, either version 2 of the License, or\n#  (at your option) any later version.\n#\n#  OpenELEC is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with OpenELEC.  If not, see <http://www.gnu.org/licenses/>.\n################################################################################\n\nPKG_NAME=\"yasm\"\nPKG_VERSION=\"1.3.0\"\nPKG_SHA256=\"3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://www.tortall.net/projects/yasm/\"\nPKG_URL=\"http://www.tortall.net/projects/yasm/releases/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_SECTION=\"toolchain/lang\"\nPKG_SHORTDESC=\"yasm: A complete rewrite of the NASM assembler\"\nPKG_LONGDESC=\"Yasm is a complete rewrite of the NASM assembler under the new BSD License (some portions are under other licenses, see COPYING for details). It is designed from the ground up to allow for multiple assembler syntaxes to be supported (eg, NASM, TASM, GAS, etc.) in addition to multiple output object formats and even multiple instruction sets. Another primary module of the overall design is an optimizer module.\"\nPKG_TOOLCHAIN=\"configure\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--disable-debug \\\n                         --disable-warnerror \\\n                         --disable-profiling \\\n                         --disable-gcov \\\n                         --disable-python \\\n                         --disable-python-bindings \\\n                         --enable-nls \\\n                         --disable-rpath \\\n                         --without-dmalloc \\\n                         --with-gnu-ld \\\n                         --without-libiconv-prefix \\\n                         --without-libintl-prefix\"\n"
  },
  {
    "path": "packages/sx05re/tools/unused/eigen/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"eigen\"\nPKG_VERSION=\"3.2.10\"\nPKG_SHA256=\"760e6656426fde71cc48586c971390816f456d30f0b5d7d4ad5274d8d2cb0a6d\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://eigen.tuxfamily.org/index.php?title=Main_Page\"\nPKG_URL=\"http://bitbucket.org/eigen/eigen/get/${PKG_VERSION}.tar.bz2\"\nPKG_SOURCE_DIR=\"eigen-*\"\nPKG_DEPENDS_TARGET=\"toolchain cmake:host\"\nPKG_SECTION=\"xmedia/games\"\nPKG_SHORTDESC=\"eigen c++ headers\"\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"no\"\nPKG_TOOLCHAIN=\"configure\"\n\nconfigure_target() {\n  SYSROOT_PREFIX=${SYSROOT_PREFIX} cmake -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CONF} \\\n        -DCMAKE_INSTALL_PREFIX=/usr \\\n        -DCMAKE_INSTALL_LIBDIR=/usr/lib \\\n        -DCMAKE_INSTALL_LIBDIR_NOARCH=/usr/lib \\\n        -DCMAKE_INSTALL_PREFIX_TOOLCHAIN=${SYSROOT_PREFIX}/usr \\\n        -DCMAKE_PREFIX_PATH=${SYSROOT_PREFIX}/usr \\\n        ${EXTRA_CMAKE_OPTS} \\\n        ..\n}\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/fba4arm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"fba4arm\"\nPKG_VERSION=\"99f4c3f37cd803de8d84dfb046b0b9a760b4f8dd\"\nPKG_SHA256=\"f1a06091a4ab83cc2ec3490e6d2199a25c8032137bc786b17473fff63c24f7c3\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Non-commercial\"\nPKG_SITE=\"https://github.com/shantigilbert/FBA4ARM/\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_PRIORITY=\"optional\"\nPKG_SECTION=\"libretro\"\nPKG_SHORTDESC=\"Port of Final Burn Alpha to Libretro (v0.2.97.38). With many hacked roms added by SumavisionQ5\"\nPKG_LONGDESC=\"Currently, FB Alpha supports games on Capcom CPS-1 and CPS-2 hardware, SNK Neo-Geo hardware, Toaplan hardware, Cave hardware, and various games on miscellaneous hardware. \"\n\nPKG_IS_ADDON=\"no\"\nPKG_TOOLCHAIN=\"make\"\nPKG_AUTORECONF=\"no\"\n\nmake_target() {\n  if [ \"${ARCH}\" == \"arm\" ]; then\n    if [[ \"${TARGET_FPU}\" =~ \"neon\" ]]; then\n      make -f makefile.libretro CC=${CC} CXX=${CXX} HAVE_NEON=1 profile=performance\n    else\n      make -f makefile.libretro CC=${CC} CXX=${CXX} profile=performance\n    fi\n  else\n    make -f makefile.libretro CC=${CC} CXX=${CXX} profile=accuracy\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/libretro\n  cp fbalpha_libretro.so ${INSTALL}/usr/lib/libretro/fba4arm_libretro.so\n}\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/mba.mini.plus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"mba.mini.plus\"\nPKG_VERSION=\"0446f417b9434bccf043fb0d2c256303c5bdf2a8\"\nPKG_SHA256=\"a5c944857fe549522efa02f96fa495b2d3affa49ff3de3e1f81852f1ff9a4eee\"\nPKG_REV=\"1\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"Non-commercial\"\nPKG_SITE=\"https://github.com/shantigilbert/MBA.mini.Plus-libretro\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"emuelec\"\nPKG_SHORTDESC=\"M.B.A = MAME's skeleton + FBA's romsets\"\nPKG_LONGDESC=\"M.B.A-mini from MAME2010-libretro (https://github.com/libretro/mame2010-libretro) after the codes is streamlined, only CPS 1/2, NEOGEO, IREM M92 machines && roms is supported.\"\nPKG_TOOLCHAIN=\"make\"\n\nif [[ \"${ARCH}\" == \"aarch64\" ]]; then\nPKG_PATCH_DIRS=\"emuelec-aarch64\"\nfi\n\npre_configure_target() {\n  \n  \n  \nif [[ \"${ARCH}\" == \"arm\" ]]; then\n  \n   if [ \"${DEVICE}\" = \"Amlogic-ng\" ]; then\n\tPKG_MAKE_OPTS_TARGET=\"platform=AMLG12B\"\n  elif [ \"${DEVICE}\" = \"Amlogic-old\" ]; then\n\tPKG_MAKE_OPTS_TARGET=\"platform=AMLGX\"\n  fi\n  \n  PKG_MAKE_OPTS_TARGET+=\" CC=${CC} LD=${CC}\"\n  \n  sed -i -e \"s|uname -a|echo armv|\" \\\n         -e \"s|uname -m|echo armv|\" \\\n         -e \"s|LIBS = -lm|LIBS = |g\" \\\n         -e \"s|LIBS = |LIBS = -lm|g\" \\\n    makefile\n  \nelse\n\n  if [ \"${DEVICE}\" = \"Amlogic-ng\" ]; then\n\tPKG_MAKE_OPTS_TARGET=\"platform=emuelec-n2\"\n  elif [ \"${DEVICE}\" = \"Amlogic-old\" ]; then\n\tPKG_MAKE_OPTS_TARGET=\"platform=emuelec\"\n  fi\n  \n  PKG_MAKE_OPTS_TARGET+=\" CC=${CC} LD=${CC}\"\n  \n  sed -i -e \"s|uname -a|echo aarch64|\" \\\n         -e \"s|uname -m|echo aarch64|\" \\\n         -e \"s|LIBS = -lm|LIBS = |g\" \\\n         -e \"s|LIBS = |LIBS = -lm|g\" \\\n    makefile\nfi\n}\n\nmakeinstall_target() {\n mkdir -p ${INSTALL}/usr/lib/libretro\n cp mba_mini_libretro.so ${INSTALL}/usr/lib/libretro/mba_mini_libretro.so\n}\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/mba.mini.plus/patches/emuelec-aarch64/mba.mini.plus-01-add-emuelec-64b.patch",
    "content": "--- a/makefile\n+++ b/makefile\n@@ -23,7 +23,7 @@\n NEOGEO_BIOS = 0\n \n # system platform\n-UNAME = $(shell uname -a)\n+UNAME = $(shell echo unix)\n \n ifeq ($(platform),)\n    platform = unix\n@@ -44,7 +44,7 @@\n endif\n \n # Autodetect PTR64 and ENDIAN\n-UNAME = $(shell uname -m)\n+UNAME = $(shell echo aarch64)\n \n ifeq ($(firstword $(filter x86_64,$(UNAME))),x86_64)\n    PTR64 = 1\n@@ -96,7 +96,7 @@\n TARGET_NAME := mba_mini\n fpic := \n EXE = \n-LIBS = \n+LIBS = -lm\n CORE_DIR = .\n \n CCOMFLAGS += -D__LIBRETRO__\n@@ -365,6 +365,32 @@\n     CORE_DEFINES += -DLOW_END\n   endif\n \n+#EmuELEC: 64 bits odroid-n2, amlogic\n+else ifneq (,$(findstring emuelec,$(platform))) \n+   TARGETLIB := $(TARGET_NAME)_libretro.so\n+   SHARED := -shared -Wl,--version-script=src/osd/retro/link.T\n+   LDFLAGS += $(SHARED)\n+   fpic = -fPIC\n+   LIBS += -lstdc++ -lpthread\n+   ARM_ENABLED = 1\n+   ALIGNED = 1\n+   PTR64 = 1\n+\n+  CPUFLAGS += -DNO_ASM -DARM_ASM -frename-registers -ftree-vectorize\n+  CFLAGS += -march=armv8-a+crc $(CPUFLAGS)\n+  CXXFLAGS += -march=armv8-a+crc $(CPUFLAGS)\n+  CCOMFLAGS += -march=armv8-a+crc $(CPUFLAGS)\n+  \n+ ifneq (,$(findstring emuelec-n2,$(platform)))\n+      CFLAGS += -mtune=cortex-a73.cortex-a53\n+      CXXFLAGS += -mtune=cortex-a73.cortex-a53\n+      CCOMFLAGS += -mtune=cortex-a73.cortex-a53\n+    else\n+      CFLAGS += -mtune=cortex-a53\n+      CXXFLAGS += -mtune=cortex-a53\n+      CCOMFLAGS += -mtune=cortex-a53\n+    endif\n+    \n   ASFLAGS += $(CFLAGS) -c -frename-registers -fno-strict-aliasing -ffast-math -ftree-vectorize\n \n   PLATFORM_EXT := unix\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/config/reicast/emu_new.cfg",
    "content": "[alsa]\ndevice = default\n\n[audio]\ndisable = 0\n\n[config]\nDebug.SerialConsoleEnabled = no\nDreamcast.Broadcast = 4\nDreamcast.Cable = 3\nDreamcast.ContentPath = \nDreamcast.FullMMU = no\nDreamcast.Language = 6\nDreamcast.Region = 3\nDynarec.Enabled = yes\nDynarec.SmcCheckLevel = 0\nDynarec.idleskip = yes\nDynarec.safe-mode = yes\nDynarec.unstable-opt = no\naica.LimitFPS = yes\naica.NoBatch = no\naica.NoSound = no\npvr.MaxThreads = 3\npvr.SynchronousRendering = yes\npvr.rend = 0\nrend.Clipping = yes\nrend.CustomTextures = no\nrend.DumpTextures = no\nrend.Fog = yes\nrend.MaxFilteredTextureSize = 256\nrend.ModifierVolumes = yes\nrend.RenderToTextureBuffer = no\nrend.RenderToTextureUpscale = 1\nrend.ScreenScaling = 100\nrend.ShowFPS = no\nrend.TextureUpscale = 1\nrend.WideScreen = no\nta.skip = 0\n\n[input]\nMouseSensitivity = 100\nVirtualGamepadVibration = 20\ndevice1 = 0\ndevice1.1 = 1\ndevice1.2 = 1\ndevice2 = 8\ndevice2.1 = 8\ndevice2.2 = 8\ndevice3 = 8\ndevice3.1 = 8\ndevice3.2 = 8\ndevice4 = 8\ndevice4.1 = 8\ndevice4.2 = 8\nevdev_device_id_1 = 4\nevdev_device_id_2 = 0\nevdev_device_id_3 = -1\nevdev_device_id_4 = -1\njoystick_device_id = -1\nmaple_/dev/input/event4 = 0\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/config/reicast/f310.cfg",
    "content": "[emulator]\r\nmapping_name = Logitech Gamepad F310\r\nbtn_escape = 316\r\n\r\n[dreamcast]\r\nbtn_a = 304\r\nbtn_b = 305\r\nbtn_c = 310\r\nbtn_d = 311\r\nbtn_x = 307\r\nbtn_y = 308\r\nbtn_z = 318\r\nbtn_start = 315\r\naxis_trigger_left = 2\r\naxis_trigger_right = 5\r\naxis_x = 0\r\naxis_y = 1\r\n\r\n[compat]\r\naxis_dpad1_x = 16\r\naxis_dpad1_x_inverted = no\r\naxis_dpad1_y = 17\r\naxis_dpad1_y_inverted = no\r\naxis_dpad2_x = 3\r\naxis_dpad2_x_inverted = no\r\naxis_dpad2_y = 4\r\naxis_dpad2_y_inverted = no\r\naxis_trigger_left_inverted = no\r\naxis_trigger_right_inverted = no\r\naxis_x_inverted = no\r\naxis_y_inverted = no\r\n\r\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/config/reicast/mappings/Logitech Gamepad F310.cfg",
    "content": "[emulator]\r\nmapping_name = Logitech Gamepad F310\r\nbtn_escape = 316\r\n\r\n[dreamcast]\r\nbtn_a = 304\r\nbtn_b = 305\r\nbtn_c = 310\r\nbtn_d = 311\r\nbtn_x = 307\r\nbtn_y = 308\r\nbtn_z = 317\r\nbtn_start = 315\r\naxis_trigger_left = 2\r\naxis_trigger_right = 5\r\naxis_x = 0\r\naxis_y = 1\r\n\r\n[compat]\r\naxis_dpad1_x = 16\r\naxis_dpad1_x_inverted = no\r\naxis_dpad1_y = 17\r\naxis_dpad1_y_inverted = no\r\naxis_dpad2_x = 3\r\naxis_dpad2_x_inverted = no\r\naxis_dpad2_y = 4\r\naxis_dpad2_y_inverted = no\r\naxis_trigger_left_inverted = no\r\naxis_trigger_right_inverted = no\r\naxis_x_inverted = no\r\naxis_y_inverted = no\r\n\r\n\r\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/config/reicast/mappings/controller_gcwz.cfg",
    "content": "[emulator]\nmapping_name = GCW Zero\nbtn_escape = 0x01\n\n[dreamcast]\nbtn_a = 0x1D\nbtn_b = 0x38\nbtn_c = 0x0F\nbtn_d = 0x0E\nbtn_x = 0x2A\nbtn_y = 0x39\nbtn_start = 0x1C\nbtn_dpad1_left = 0x69\nbtn_dpad1_right = 0x6A\nbtn_dpad1_up = 0x67\nbtn_dpad1_down = 0x6C\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/config/reicast/mappings/controller_generic.cfg",
    "content": "[emulator]\nmapping_name = Generic Controller\nbtn_escape = 0x13a\n\n[dreamcast]\nbtn_a = 0x130\nbtn_b = 0x131\nbtn_c = 0x132\nbtn_d = 0x13d\nbtn_x = 0x133\nbtn_y = 0x134\nbtn_z = 0x135\nbtn_start = 0x13b\nbtn_dpad1_left = 0x220\nbtn_dpad1_right = 0x221\nbtn_dpad1_up = 0x222\nbtn_dpad1_down = 0x223\naxis_x = 0x00\naxis_y = 0x01\naxis_trigger_left = 0x02\naxis_trigger_right = 0x05\n\n[compat]\nbtn_trigger_left = 0x136\nbtn_trigger_right = 0x137\naxis_dpad1_x = 0x10\naxis_dpad1_y = 0x11\naxis_dpad2_x = 0x12\naxis_dpad2_y = 0x13"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/config/reicast/mappings/controller_pandora.cfg",
    "content": "[emulator]\nmapping_name = Pandora\nbtn_escape = 139\n\n[dreamcast]\nbtn_a = 109\nbtn_b = 107\nbtn_c = 57\nbtn_x = 102\nbtn_y = 104\nbtn_start = 56\nbtn_dpad1_left  = 105\nbtn_dpad1_right = 106\nbtn_dpad1_up    = 103\nbtn_dpad1_down  = 108\n\n[compat]\nbtn_trigger_left = 54\nbtn_trigger_right = 97\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/config/reicast/mappings/controller_xboxdrv.cfg",
    "content": "[emulator]\nmapping_name = Xbox 360 Controller (xboxdrv userspace driver)\nbtn_escape = 0x13a\n\n[dreamcast]\nbtn_a = 0x130\nbtn_b = 0x131\nbtn_c = 0x136\nbtn_d = 0x137\nbtn_x = 0x133\nbtn_y = 0x134\nbtn_z = 0x13d\nbtn_start = 0x13b\naxis_x = 0x00\naxis_y = 0x01\naxis_trigger_left = 0x0a\naxis_trigger_right = 0x09\n\n[compat]\naxis_dpad1_x = 0x10\naxis_dpad1_y = 0x11\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/config/reicast/mappings/controller_xpad.cfg",
    "content": "[emulator]\nmapping_name = Xbox 360 Controller (xpad driver)\nbtn_escape = 0x13a\n\n[dreamcast]\nbtn_a = 0x130\nbtn_b = 0x131\nbtn_c = 0x136\nbtn_d = 0x137\nbtn_x = 0x133\nbtn_y = 0x134\nbtn_z = 0x13d\nbtn_start = 0x13b\nbtn_dpad1_left  = 0x2c0\nbtn_dpad1_right = 0x2c1\nbtn_dpad1_up    = 0x2c2\nbtn_dpad1_down  = 0x2c3\naxis_x = 0x00\naxis_y = 0x01\naxis_trigger_left = 0x02\naxis_trigger_right = 0x05\n\n[compat]\naxis_dpad1_x = 0x10\naxis_dpad1_y = 0x11\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/config/reicast/mappings/keyboard.cfg",
    "content": "[emulator]\nmapping_name = Generic Keyboard\nemu_btn_escape = 1\n\n[dreamcast]\nbtn_a = 30\nbtn_b = 48\nbtn_c = 46\nbtn_d = 32\nbtn_x = 45\nbtn_y = 21\nbtn_z = 44\nbtn_start = 28\nbtn_dpad1_left  = 105\nbtn_dpad1_right = 106\nbtn_dpad1_up    = 103\nbtn_dpad1_down  = 108\n\n[compat]\nbtn_trigger_left = 29\nbtn_trigger_right = 97\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/config/reicast/x360.cfg",
    "content": "[emulator]\r\nmapping_name = Xbox Gamepad (userspace driver)\r\nbtn_escape = 0x13a\r\n\r\n[dreamcast]\r\nbtn_a = 0x130h\r\nbtn_b = 0x131h\r\nbtn_c =\r\nbtn_d = 0x139h\r\nbtn_x = 0x133h\r\nbtn_y = 0x134h\r\nbtn_z = 0x138h\r\nbtn_start = 0x13Bh\r\naxis_x = 0x00\r\naxis_y = 0x01\r\naxis_trigger_left = 0x0a\r\naxis_trigger_right = 0x09\r\n\r\n[compat]\r\naxis_dpad1_x = 0x10\r\naxis_dpad1_y = 0x11"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"reicastsa\"\nif [ \"${DEVICE}\" == \"Amlogic-ng\" ]; then\nPKG_VERSION=\"7e11e7aff6d704de4ad8ad7531f597df058099ac\"\nPKG_SHA256=\"07978933e040470b1fbb8c887485703f10fb828b583b350e23e834e7b8cee4bc\"\nelse\nPKG_VERSION=\"cb278e367b5e5635be9ebf45fd77fac2ce2fed7a\"\nPKG_SHA256=\"74f69c7b1122b178a17840b51a225b8487dfc8bc30dacc9153495e0c88683259\"\nfi\nPKG_EE_UPDATE=\"no\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/reicast/reicast-emulator\"\nPKG_URL=\"https://github.com/reicast/reicast-emulator/archive/${PKG_VERSION}.tar.gz\"\nPKG_SOURCE_DIR=\"reicast-emulator-${PKG_VERSION}*\"\nPKG_DEPENDS_TARGET=\"toolchain alsa libpng libevdev python-evdev\"\nPKG_SHORTDESC=\"Reicast is a multi-platform Sega Dreamcast emulator\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"-gold\"\n\nPKG_PATCH_DIRS=\"${PROJECT}\"\n\nmake_target() {\n  cd shell/linux\n  make CC=${CC} CXX=${CXX} AS=${CC} STRIP=${STRIP} EXTRAFLAGS=\"-I${PKG_BUILD}/shell/linux-deps/include\" platform=odroidc2 reicast.elf\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp reicast.elf ${INSTALL}/usr/bin/reicast\n  cp tools/reicast-joyconfig.py ${INSTALL}/usr/bin/\n\n  mkdir -p ${INSTALL}/usr/bin\n  cp -r ${PKG_DIR}/config/* ${INSTALL}/usr/config/\n  cp -r ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin/\n \n}\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/patches/Amlogic/reicastsa-02-add_platform_OdroidC2.patch",
    "content": "--- a/shell/linux/Makefile\t2019-01-18 11:46:08.000000000 -0600\n+++ a/shell/linux/Makefile\t2019-01-18 14:05:17.236571691 -0600\n@@ -201,6 +201,10 @@\n         # ODROID-C1 & -C1+\n         ifneq (,$(findstring odroidc1,$(platform)))\n             MFLAGS += -mtune=cortex-a5\n+            \n+        # ODROID-C2 \n+       else ifneq (,$(findstring odroidc2,$(platform)))\n+            MFLAGS += -mtune=cortex-a53\n \n         # ODROID-U2, -U3, -X & -X2\n         else\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/patches/Amlogic/reicastsa-03-mali.patch",
    "content": "diff --git a/core/rend/gles/gles.cpp b/core/rend/gles/gles.cpp\nindex a2bc1be..ebb006b 100755\n--- a/core/rend/gles/gles.cpp\n+++ b/core/rend/gles/gles.cpp\n@@ -1442,7 +1442,7 @@ bool RenderFrame()\n \tbool is_rtt=pvrrc.isRTT;\n \n \n-\tOSD_HOOK();\n+\t//OSD_HOOK(); \n \n \t//if (FrameCount&7) return;\n \ndiff --git a/core/sdl/sdl.cpp b/core/sdl/sdl.cpp\nindex af84ef3..6e26744 100644\n--- a/core/sdl/sdl.cpp\n+++ b/core/sdl/sdl.cpp\n@@ -415,11 +415,8 @@ void sdl_window_create()\n \tint window_height = cfgLoadInt(\"x11\",\"height\", WINDOW_HEIGHT);\n \n \tint flags = SDL_WINDOW_OPENGL;\n-\t#ifdef TARGET_PANDORA\n-\t\tflags |= SDL_FULLSCREEN;\n-\t#else\n-\t\tflags |= SDL_SWSURFACE;\n-\t#endif\n+\tflags |= SDL_WINDOW_FULLSCREEN;\n+\tflags |= SDL_SWSURFACE;\n \n \t#ifdef GLES\n \t\tSDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);\n@@ -434,7 +431,7 @@ void sdl_window_create()\n \tSDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);\n \tSDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);\n \tSDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);\n-\tSDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);\n+\t//SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);\n \tSDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);\n \tSDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);\n \tSDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/patches/Amlogic-ng/reicastsa-02-add_platform_OdroidC2.patch",
    "content": "--- a/shell/linux/Makefile\t2019-01-18 11:46:08.000000000 -0600\n+++ a/shell/linux/Makefile\t2019-01-18 14:05:17.236571691 -0600\n@@ -231,6 +231,10 @@\n         # ODROID-C1 & -C1+\n         ifneq (,$(findstring odroidc1,$(platform)))\n             MFLAGS += -mtune=cortex-a5\n+       else ifneq (,$(findstring odroidc2,$(platform)))\n+            MFLAGS += -mtune=cortex-a53\n+            CFLAGS += -D TARGET_NO_OPENMP \n+            USE_GLES := 1\n \n         # ODROID-U2, -U3, -X & -X2\n         else\n             MFLAGS += -mtune=cortex-a9\n@@ -277,9 +281,9 @@\n RZDCY_SRC_DIR = $(LOCAL_PATH)/../../core\n include $(RZDCY_SRC_DIR)/core.mk\n \n-LDFLAGS += -g -Wl,-Map,$(notdir $@).map,--gc-sections -Wl,-O3 -Wl,--sort-common -fopenmp\n-\n-CFLAGS += $(RZDCY_CFLAGS) -g -O3 -D RELEASE -c -D USES_HOMEDIR -fopenmp #-D NO_REND\n+LDFLAGS += -g -Wl,-Map,$(notdir $@).map,--gc-sections -Wl,-O3 -Wl,--sort-common\n+\n+CFLAGS += $(RZDCY_CFLAGS) -g -O3 -D RELEASE -c -D USES_HOMEDIR #-D NO_REND\n CFLAGS += -frename-registers -fno-strict-aliasing\n CFLAGS += -ffast-math -ftree-vectorize\n \n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/patches/Amlogic-ng/reicastsa-03-mali.patch",
    "content": "diff --git a/core/sdl/sdl.cpp b/core/sdl/sdl.cpp\nindex af84ef3..6e26744 100644\n--- a/core/sdl/sdl.cpp\n+++ b/core/sdl/sdl.cpp\n@@ -223,11 +223,9 @@\n \tint window_height = cfgLoadInt(\"x11\",\"height\", WINDOW_HEIGHT);\n \n \tint flags = SDL_WINDOW_OPENGL;\n-\t#ifdef TARGET_PANDORA\n+\n \t\tflags |= SDL_FULLSCREEN;\n-\t#else\n \t\tflags |= SDL_SWSURFACE | SDL_WINDOW_RESIZABLE;\n-\t#endif\n \n \t#ifdef GLES\n \t\tSDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);\n@@ -242,7 +240,7 @@\n \tSDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);\n \tSDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);\n \tSDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);\n-\tSDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);\n+\t//SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);\n \tSDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);\n \tSDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);\n \tSDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/patches/Amlogic-ng/reicastsa-05-fix-gles.patch",
    "content": "diff -ur 1/core/rend/gles/gldraw.cpp 2/core/rend/gles/gldraw.cpp\n--- 1/core/rend/gles/gldraw.cpp\t2019-04-01 07:49:01.000000000 -0600\n+++ 2/core/rend/gles/gldraw.cpp\t2019-04-04 02:10:32.000000000 -0600\n@@ -934,9 +934,10 @@\n \n static void SetupMainVBO()\n {\n+#if !defined(GLES) || defined(_ANDROID)\n \tif (gl.gl_major >= 3)\n \t\tglBindVertexArray(gl.vbo.vao);\n-\n+#endif\n \tglBindBuffer(GL_ARRAY_BUFFER, gl.vbo.geometry); glCheck();\n \tglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, gl.vbo.idxs); glCheck();\n \n@@ -956,9 +957,10 @@\n \n void SetupModvolVBO()\n {\n+#if !defined(GLES) || defined(_ANDROID)\n \tif (gl.gl_major >= 3)\n \t\tglBindVertexArray(gl.vbo.vao);\n-\n+#endif\n \tglBindBuffer(GL_ARRAY_BUFFER, gl.vbo.modvols); glCheck();\n \n \t//setup vertex buffers attrib pointers\ndiff -ur 1/core/rend/gles/gles.cpp 2/core/rend/gles/gles.cpp\n--- 1/core/rend/gles/gles.cpp\t2019-04-01 07:49:01.000000000 -0600\n+++ 2/core/rend/gles/gles.cpp\t2019-04-04 02:10:32.000000000 -0600\n@@ -560,7 +560,10 @@\n \t\t\t\t\treturn false;\n \t\t\t\t}\n #ifdef GLES\n+// EGL only supports runtime loading with android? TDB\n+#ifdef _ANDROID\n \t\t\t\tload_gles_symbols();\n+#endif\n #else\n \t\t\t\tegl_makecurrent();\n \t\t\t\tif (gl3wInit())\n@@ -1147,7 +1150,9 @@\n \t\t//create vao\n \t\t//This is really not \"proper\", vaos are supposed to be defined once\n \t\t//i keep updating the same one to make the es2 code work in 3.1 context\n+#if !defined(GLES) || defined(_ANDROID)\n \t\tglGenVertexArrays(1, &gl.vbo.vao);\n+#endif\n \t}\n \n \t//create vbos\n@@ -1988,8 +1993,10 @@\n \n \tvoid DrawOSD(bool clear_screen)\n \t{\n+#if !defined(GLES) || defined(_ANDROID)\n \t\tif (gl.gl_major >= 3)\n \t\t\tglBindVertexArray(gl.vbo.vao);\n+#endif\n \t\tglBindBuffer(GL_ARRAY_BUFFER, gl.vbo.geometry); glCheck();\n \t\tglEnableVertexAttribArray(VERTEX_POS_ARRAY);\n \t\tglVertexAttribPointer(VERTEX_POS_ARRAY, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)offsetof(Vertex,x));\ndiff -ur 1/core/rend/gles/gles.h 2/core/rend/gles/gles.h\n--- 1/core/rend/gles/gles.h\t2019-04-01 07:49:01.000000000 -0600\n+++ 2/core/rend/gles/gles.h\t2019-04-04 02:10:32.000000000 -0600\n@@ -15,7 +15,9 @@\n #endif\n #include <GLES32/gl32.h>\n #include <GLES32/gl2ext.h>\n+#ifdef _ANDROID\n #include \"gl32funcs.h\"\n+#endif\n \n #ifndef GL_NV_draw_path\n //IMGTEC GLES emulation\ndiff -ur 1/core/rend/gles/imgui_impl_opengl3.cpp 2/core/rend/gles/imgui_impl_opengl3.cpp\n--- 1/core/rend/gles/imgui_impl_opengl3.cpp\t2019-04-01 07:49:01.000000000 -0600\n+++ 2/core/rend/gles/imgui_impl_opengl3.cpp\t2019-04-04 02:10:32.000000000 -0600\n@@ -141,6 +141,7 @@\n \n     if (save_background)\n     {\n+#if !defined(GLES) || defined(_ANDROID)\n     \tif (!gl.is_gles && glReadBuffer != NULL)\n     \t\tglReadBuffer(GL_FRONT);\n \n@@ -157,6 +158,7 @@\n \n \t\t// Copy the current framebuffer into it\n \t\tglCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, fb_width, fb_height);\n+#endif\n     }\n \n     // Setup render state: alpha-blending enabled, no face culling, no depth testing, scissor enabled, polygon fill\n@@ -188,10 +190,12 @@\n     glcache.UseProgram(g_ShaderHandle);\n     glUniform1i(g_AttribLocationTex, 0);\n     glUniformMatrix4fv(g_AttribLocationProjMtx, 1, GL_FALSE, &ortho_projection[0][0]);\n+#if !defined(GLES) || defined(_ANDROID)\n     if (gl.gl_major >= 3 && glBindSampler != NULL)\n     \tglBindSampler(0, 0); // We use combined texture/sampler state. Applications using GL 3.3 may set that otherwise.\n-\n+#endif\n     GLuint vao_handle = 0;\n+#if !defined(GLES) || defined(_ANDROID)\n     if (gl.gl_major >= 3)\n     {\n \t\t// Recreate the VAO every time\n@@ -199,6 +203,7 @@\n \t\tglGenVertexArrays(1, &vao_handle);\n \t\tglBindVertexArray(vao_handle);\n     }\n+#endif\n     glBindBuffer(GL_ARRAY_BUFFER, g_VboHandle);\n     glEnableVertexAttribArray(g_AttribLocationPosition);\n     glEnableVertexAttribArray(g_AttribLocationUV);\n@@ -247,8 +252,10 @@\n             idx_buffer_offset += pcmd->ElemCount;\n         }\n     }\n+#if !defined(GLES) || defined(_ANDROID)\n     if (vao_handle != 0)\n     \tglDeleteVertexArrays(1, &vao_handle);\n+#endif\n }\n \n bool ImGui_ImplOpenGL3_CreateFontsTexture()\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/patches/reicastsa-01-libpng-fix-arm-neon.patch",
    "content": "--- a/core/deps/libpng/pngpriv.h\n+++ b/core/deps/libpng/pngpriv.h\n@@ -123,7 +123,7 @@\n     * Note that gcc-4.9 defines __ARM_NEON instead of __ARM_NEON__, so we\n     * check both variants.\n     */\n-#  if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \\\n+#  if defined(PNG_ARM_NEON) && (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \\\n    defined(PNG_ALIGNED_MEMORY_SUPPORTED)\n #     define PNG_ARM_NEON_OPT 2\n #  else\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/patches/reicastsa-04-fix-neon.patch",
    "content": "diff --git a/shell/linux/Makefile b/shell/linux/Makefile\nindex 75fc804..6d421a1 100644\n--- a/shell/linux/Makefile\n+++ b/shell/linux/Makefile\n@@ -155,8 +155,8 @@ else ifneq (,$(findstring pandora,$(platform)))\n \n # ODROIDs\n else ifneq (,$(findstring odroid,$(platform)))\n-    MFLAGS += -marm -mfpu=neon -mfloat-abi=hard -funroll-loops\n-    ASFLAGS += -mfpu=neon -mfloat-abi=hard\n+    MFLAGS += -marm -mfpu=neon-vfpv4 -mfloat-abi=hard -funroll-loops\n+    ASFLAGS += -mfpu=neon-vfpv4 -mfloat-abi=hard\n     CFLAGS += -D TARGET_BEAGLE -D TARGET_LINUX_ARMELv7 -DARM_HARDFP -fsingle-precision-constant\n     USE_GLES := 1\n     INCS += -I/home/nicolas/dev/batocera/batocera-odroidxu4-414/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/ -I../linux-deps/include\n\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/reicastsa_old/config/reicast/emu_old.cfg",
    "content": "[audio]\nbackend = auto\ndisable = 0\n\n[config]\nDebug.SerialConsoleEnabled = 0\nDreamcast.Broadcast = 4\nDreamcast.Cable = 3\nDreamcast.RTC = -2090049557\nDreamcast.Region = 3\nDynarec.Enabled = 1\nDynarec.idleskip = 1\nDynarec.unstable-opt = 0\naica.LimitFPS = 1\naica.NoBatch = 0\naica.NoSound = 0\naica.OldSyncronousDma = no\nbios.UseReios = 0\npvr.MaxThreads = 3\npvr.Subdivide = 0\npvr.SynchronousRendering = 0\npvr.rend = 0\nrend.Clipping = 1\nrend.UseMipmaps = 1\nrend.WideScreen = 0\nta.skip = 0\n\n[input]\nevdev_device_id_1 = 4\nevdev_device_id_2 = 0\nevdev_device_id_3 = -1\nevdev_device_id_4 = -1\njoystick_device_id = -1\n\n[reios]\nElfFile = \n\n[testing]\nta.HashCheckFile = \nta.HashLogFile = \n\n[validate]\nOpenGlChecks = 0\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/reicastsa_old/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"reicastsa_old\"\nPKG_VERSION=\"69371070f2c04a832f45e238afd703596f6e19f7\"\nPKG_SHA256=\"ae1f64a520a1d14281b5745b43105e0d5dc6b37e43c3f594a10a0ece7edc1709\"\nPKG_EE_UPDATE=\"no\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/reicast/reicast-emulator\"\nPKG_URL=\"https://github.com/reicast/reicast-emulator/archive/${PKG_VERSION}.tar.gz\"\nPKG_SOURCE_DIR=\"reicast-emulator-${PKG_VERSION}*\"\nPKG_DEPENDS_TARGET=\"toolchain alsa libpng libevdev python-evdev\"\nPKG_SHORTDESC=\"Reicast is a multi-platform Sega Dreamcast emulator\"\nPKG_TOOLCHAIN=\"make\"\nPKG_BUILD_FLAGS=\"-gold\"\n\nPKG_PATCH_DIRS=\"${PROJECT}\"\n\nmake_target() {\n  cd ${PKG_BUILD}/shell/linux\n  make CC=${CC} CXX=${CXX} AS=${CC} STRIP=${STRIP} EXTRAFLAGS=\"-I${PKG_BUILD}/shell/linux-deps/include\" platform=odroidc2 reicast.elf\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp reicast.elf ${INSTALL}/usr/bin/reicast_old\n  \n  mkdir -p ${INSTALL}/usr/config\n  cp -r ${PKG_DIR}/config/* ${INSTALL}/usr/config/\n \n}\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/reicastsa_old/patches/Amlogic/reicastsa-02-add_platform_OdroidC2.patch",
    "content": "--- a/shell/linux/Makefile\t2019-01-18 11:46:08.000000000 -0600\n+++ a/shell/linux/Makefile\t2019-01-18 14:05:17.236571691 -0600\n@@ -201,6 +201,10 @@\n         # ODROID-C1 & -C1+\n         ifneq (,$(findstring odroidc1,$(platform)))\n             MFLAGS += -mtune=cortex-a5\n+            \n+        else ifneq (,$(findstring odroidc2,$(platform))) # ODROID-C2 \n+         #USE_SDL := 1      \n+         MFLAGS += -mtune=cortex-a53\n \n         # ODROID-U2, -U3, -X & -X2\n         else\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/reicastsa_old/patches/Amlogic-ng/reicastsa-02-add_platform_OdroidC2.patch",
    "content": "--- a/shell/linux/Makefile\t2019-01-18 11:46:08.000000000 -0600\n+++ a/shell/linux/Makefile\t2019-01-18 14:05:17.236571691 -0600\n@@ -204,6 +204,10 @@\n         # ODROID-C1 & -C1+\n         ifneq (,$(findstring odroidc1,$(platform)))\n             MFLAGS += -mtune=cortex-a5\n+       else ifneq (,$(findstring odroidc2,$(platform)))\n+            MFLAGS += -mtune=cortex-a73.cortex-a53\n+            #CFLAGS += -D TARGET_NO_OPENMP \n+            USE_GLES := 1\n \n         # ODROID-U2, -U3, -X & -X2\n         else\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/reicastsa_old/patches/reicastsa-01-libpng-fix-arm-neon.patch",
    "content": "--- a/core/deps/libpng/pngpriv.h\n+++ b/core/deps/libpng/pngpriv.h\n@@ -123,7 +123,7 @@\n     * Note that gcc-4.9 defines __ARM_NEON instead of __ARM_NEON__, so we\n     * check both variants.\n     */\n-#  if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \\\n+#  if defined(PNG_ARM_NEON) && (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \\\n    defined(PNG_ALIGNED_MEMORY_SUPPORTED)\n #     define PNG_ARM_NEON_OPT 2\n #  else\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/reicastsa_old/patches/reicastsa-04-fix-neon.patch",
    "content": "diff --git a/shell/linux/Makefile b/shell/linux/Makefile\nindex 75fc804..6d421a1 100644\n--- a/shell/linux/Makefile\n+++ b/shell/linux/Makefile\n@@ -155,8 +155,8 @@ else ifneq (,$(findstring pandora,$(platform)))\n \n # ODROIDs\n else ifneq (,$(findstring odroid,$(platform)))\n-    MFLAGS += -marm -mfpu=neon -mfloat-abi=hard -funroll-loops\n-    ASFLAGS += -mfpu=neon -mfloat-abi=hard\n+    MFLAGS += -marm -mfpu=neon-vfpv4 -mfloat-abi=hard -funroll-loops\n+    ASFLAGS += -mfpu=neon-vfpv4 -mfloat-abi=hard\n     CFLAGS += -D TARGET_BEAGLE -D TARGET_LINUX_ARMELv7 -DARM_HARDFP -fsingle-precision-constant\n     USE_GLES := 1\n     INCS += -I/home/nicolas/dev/batocera/batocera-odroidxu4-414/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/ -I../linux-deps/include\n\n"
  },
  {
    "path": "packages/sx05re/tools/unused/emulators/reicastsa/scripts/reicast.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\nREICASTBIN=\"/usr/bin/reicast\"\n\n/usr/bin/setres.sh 16\n\n#set reicast BIOS dir to point to /storage/roms/bios/dc\nif [ ! -L /storage/.local/share/reicast/data ]; then\n\tmkdir -p /storage/.local/share/reicast \n\trm -rf /storage/.local/share/reicast/data\n\tln -s /storage/roms/bios/dc /storage/.local/share/reicast/data\nfi\n\nif [ ! -L /storage/.local/share/reicast/mappings ]; then\nmkdir -p /storage/.local/share/reicast/\nln -sf /storage/.config/reicast/mappings /storage/.local/share/reicast/mappings\nfi\n\n\n# try to automatically set the gamepad in emu.cfg\ny=1\n\n\nfor D in `find /dev/input/by-id/ | grep -e event-joystick -e amepad`; do\n  str=$(ls -la $D)\n  i=$((${#str}-1))\n  DEVICE=$(echo \"${str:$i:1}\")\n  CFG=\"/storage/.config/reicast/emu.cfg\"\n   sed -i -e \"s/^evdev_device_id_$y =.*$/evdev_device_id_$y = $DEVICE/g\" $CFG\n # echo \"Device: $y input $DEVICE\"\n  y=$((y+1))\n if [$y -lt 4]; then\n  break\n fi \ndone\n\nset_audio alsa\n\n[[ -f \"/ee_s905\" ]] && mv /storage/.config/asound.conf /storage/.config/asound.confs\n${REICASTBIN} \"$1\" &>/dev/null\n[[ -f \"/ee_s905\" ]] && mv /storage/.config/asound.confs /storage/.config/asound.conf\n\n/usr/bin/setres.sh\n \n"
  },
  {
    "path": "packages/sx05re/tools/unused/fbida/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"fbida\"\nPKG_VERSION=\"b733a22190c70443fedcd4e87397c426c9d48af6\"\nPKG_SHA256=\"4aa43acc5c47fac8cb54db787d7a77ad4c20c08e2913162cf52a53ab9533740f\"\nPKG_ARCH=\"any\"\nPKG_SITE=\"https://github.com/kraxel/fbida\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libexif pixman libdrm libepoxy tiff fontconfig\"\nPKG_SHORTDESC=\"The fbida project contains a few applications for viewing and editing images, with the main focus being photos.\"\nPKG_LONGDESC=\"The fbida project contains a few applications for viewing and editing images, with the main focus being photos.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_configure_target() {\n  sed -i \"s|cpp -include jpeglib.h|${CPP} -include ${SYSROOT_PREFIX}/usr/include/jpeglib.h|\" GNUmakefile\n  sed -i \"s|LIRC||\" GNUmakefile\n  \n\n  CFLAGS=\"${CFLAGS} -I$(get_build_dir libepoxy)/include\"\n  CFLAGS=\"${CFLAGS} -I$(get_build_dir libepoxy)/.${TARGET_NAME}/include\"\n}\n\nmake_target() {\n  make -f GNUmakefile fbi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp fbi ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/tools/unused/fbpad/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"fbpad\"\nPKG_VERSION=\"52b6bed1d8ce6357992e8fff6d53fef3c9fb047c\"\nPKG_SHA256=\"65ce00aa9709c4fc747499b0c5a8e0d084fa134678a3d781a7634f8d8a2f452f\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/aligrudi/fbpad\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A small Linux framebuffer virtual terminal http://litcave.rudi.ir/\"\nPKG_TOOLCHAIN=\"auto\"\n\nexport CC=${CC}\nexport CFLAGS=\"-Wall -O2\"\n\nmake_target() {\nmake fbpad\n\nif [ \"${DEVICE}\" == \"Amlogic-old\" ]; then\n\tsed -i \"s|unsigned int|unsigned short|\" ${PKG_BUILD}/conf.h\n\tmv fbpad fbpad32\n\tmake fbpad\nfi \n}\n\nmakeinstall_target() {\n\tmkdir -p ${INSTALL}/usr/bin\nif [ \"${DEVICE}\" == \"Amlogic-old\" ]; then\n\tcp fbpad32 ${INSTALL}/usr/bin/fbpad\n\tcp fbpad ${INSTALL}/usr/bin/fbpad16\nelse\n\tcp fbpad ${INSTALL}/usr/bin/fbpad\nfi\n\tmkdir -p ${INSTALL}/usr/config/emuelec/configs\n\tcp courr.tf ${INSTALL}/usr/config/emuelec/configs\n\tmkdir -p ${INSTALL}/usr/share/terminfo\n\ttic -x ${PKG_BUILD}/fbpad-256 -o ${INSTALL}/usr/share/terminfo\n\t}\n\n"
  },
  {
    "path": "packages/sx05re/tools/unused/fbpad/sources/Makefile",
    "content": "all: fbpad\n%.o: %.c conf.h\n\t$(CC) -c $(CFLAGS) $<\nfbpad: fbpad.o term.o pad.o draw.o font.o isdw.o scrsnap.o\n\t$(CC) -o $@ $^ $(LDFLAGS)\nclean:\n\trm -f *.o fbpad\n"
  },
  {
    "path": "packages/sx05re/tools/unused/fbpad/sources/conf.h",
    "content": "/* framebuffer device */\n#define FBDEV\t\t\"/dev/fb0\"\n\n/* list of tags */\n#define TAGS\t\t\"xnlhtr01uiva-\"\n#define TAGS_SAVED\t\"\"\n\n/* programs mapped to m-c, m-m, m-e */\n#define SHELL\t\t{\"bash\"}\n#define EDITOR\t\t{\"nano\"}\n#define MAIL\t\t{\"mailx\", \"-f\", \"+inbox\"}\n\n/* TERM variable for launched programs */\n#define TERM        \"fbpad-256\"\n\n/* fbval_t should match framebuffer depth */\ntypedef unsigned int fbval_t;\n\n/* tinyfont files for regular, italic, and bold fonts */\n#define FR\t\t\"/storage/.config/emuelec/configs/courr.tf\"\n#define FI\t\tNULL\n#define FB\t\tNULL\n\n/* foreground and background colors */\n#define FGCOLOR\t\tCOLOR2\n#define BGCOLOR\t\tCOLOR0\n\n/* where to write the screen shot */\n#define SCRSHOT\t\t\"/tmp/scr\"\n\n/* lock command password; NULL disables locking */\n#define PASS\t\tNULL\n\n/* optimized version of fb_val() */\n#define FB_VAL(r, g, b)\tfb_val((r), (g), (b))\n\n/* brighten colors 0-7 for bold text */\n#define BRIGHTEN\t1\n\n/* black */\n#define COLOR0\t\t0x000000\n#define COLOR8\t\t0x555555\n/* red */\n#define COLOR1\t\t0xaa0000\n#define COLOR9\t\t0xff5555\n/* green */\n#define COLOR2\t\t0x00aa00\n#define COLORA\t\t0x55ff55\n/* yellow */\n#define COLOR3\t\t0xaa5500\n#define COLORB\t\t0xffff55\n/* blue */\n#define COLOR4\t\t0x0000aa\n#define COLORC\t\t0x5555ff\n/* magenta */\n#define COLOR5\t\t0xaa00aa\n#define COLORD\t\t0xff55ff\n/* cyan */\n#define COLOR6\t\t0x00aaaa\n#define COLORE\t\t0x55ffff\n/* white */\n#define COLOR7\t\t0xaaaaaa\n#define COLORF\t\t0xffffff\n"
  },
  {
    "path": "packages/sx05re/tools/unused/fbpad/sources/draw.c",
    "content": "#include <fcntl.h>\n#include <linux/fb.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <sys/ioctl.h>\n#include <sys/mman.h>\n#include <unistd.h>\n#include \"draw.h\"\n\n#define MIN(a, b)\t((a) < (b) ? (a) : (b))\n#define MAX(a, b)\t((a) > (b) ? (a) : (b))\n#define NLEVELS\t\t(1 << 8)\n\nstatic struct fb_var_screeninfo vinfo;\t/* linux-specific FB structure */\nstatic struct fb_fix_screeninfo finfo;\t/* linux-specific FB structure */\nstatic int fd;\t\t\t\t/* FB device file descriptor */\nstatic void *fb;\t\t\t/* mmap()ed FB memory */\nstatic int bpp;\t\t\t\t/* bytes per pixel */\nstatic int nr, ng, nb;\t\t\t/* color levels */\nstatic int rl, rr, gl, gr, bl, br;\t/* shifts per color */\n\nstatic int fb_len(void)\n{\n\treturn finfo.line_length * vinfo.yres_virtual;\n}\n\nstatic void fb_cmap_save(int save)\n{\n\tstatic unsigned short red[NLEVELS], green[NLEVELS], blue[NLEVELS];\n\tstruct fb_cmap cmap;\n\tif (finfo.visual == FB_VISUAL_TRUECOLOR)\n\t\treturn;\n\tcmap.start = 0;\n\tcmap.len = MAX(nr, MAX(ng, nb));\n\tcmap.red = red;\n\tcmap.green = green;\n\tcmap.blue = blue;\n\tcmap.transp = NULL;\n\tioctl(fd, save ? FBIOGETCMAP : FBIOPUTCMAP, &cmap);\n}\n\nvoid fb_cmap(void)\n{\n\tunsigned short red[NLEVELS], green[NLEVELS], blue[NLEVELS];\n\tstruct fb_cmap cmap;\n\tint i;\n\tif (finfo.visual == FB_VISUAL_TRUECOLOR)\n\t\treturn;\n\n\tfor (i = 0; i < nr; i++)\n\t\tred[i] = (65535 / (nr - 1)) * i;\n\tfor (i = 0; i < ng; i++)\n\t\tgreen[i] = (65535 / (ng - 1)) * i;\n\tfor (i = 0; i < nb; i++)\n\t\tblue[i] = (65535 / (nb - 1)) * i;\n\n\tcmap.start = 0;\n\tcmap.len = MAX(nr, MAX(ng, nb));\n\tcmap.red = red;\n\tcmap.green = green;\n\tcmap.blue = blue;\n\tcmap.transp = NULL;\n\n\tioctl(fd, FBIOPUTCMAP, &cmap);\n}\n\nunsigned fb_mode(void)\n{\n\treturn ((rl < gl) << 22) | ((rl < bl) << 21) | ((gl < bl) << 20) |\n\t\t(bpp << 16) | (vinfo.red.length << 8) |\n\t\t(vinfo.green.length << 4) | (vinfo.blue.length);\n}\n\nstatic void init_colors(void)\n{\n\tnr = 1 << vinfo.red.length;\n\tng = 1 << vinfo.blue.length;\n\tnb = 1 << vinfo.green.length;\n\trr = 8 - vinfo.red.length;\n\trl = vinfo.red.offset;\n\tgr = 8 - vinfo.green.length;\n\tgl = vinfo.green.offset;\n\tbr = 8 - vinfo.blue.length;\n\tbl = vinfo.blue.offset;\n}\n\nint fb_init(char *dev)\n{\n\tfd = open(dev, O_RDWR);\n\tif (fd < 0)\n\t\tgoto failed;\n\tif (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) < 0)\n\t\tgoto failed;\n\tif (ioctl(fd, FBIOGET_FSCREENINFO, &finfo) < 0)\n\t\tgoto failed;\n\tfcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);\n\tbpp = (vinfo.bits_per_pixel + 7) >> 3;\n\tfb = mmap(NULL, fb_len(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);\n/* emuelec fbfix for n2 */\n\tif (vinfo.yoffset != 0)\n    {\n        vinfo.yoffset = 0;\n        if (ioctl(fd, FBIOPUT_VSCREENINFO, &vinfo)) \n        {\n            printf(\"Error setting variable information.\\n\");\n            exit(4);\n        }\n    }\n/* emuelec fbfix for n2 */\n\tif (fb == MAP_FAILED)\n\t\tgoto failed;\n\tinit_colors();\n\tfb_cmap_save(1);\n\tfb_cmap();\n\treturn 0;\nfailed:\n\tperror(\"fb_init()\");\n\tclose(fd);\n\treturn 1;\n}\n\nvoid fb_free(void)\n{\n\tfb_cmap_save(0);\n\tmunmap(fb, fb_len());\n\tclose(fd);\n}\n\nint fb_rows(void)\n{\n\treturn vinfo.yres;\n}\n\nint fb_cols(void)\n{\n\treturn vinfo.xres;\n}\n\nvoid *fb_mem(int r)\n{\n\treturn fb + (r + vinfo.yoffset) * finfo.line_length + vinfo.xoffset * bpp;\n}\n\nunsigned fb_val(int r, int g, int b)\n{\n\treturn ((r >> rr) << rl) | ((g >> gr) << gl) | ((b >> br) << bl);\n}\n"
  },
  {
    "path": "packages/sx05re/tools/unused/fbpad/sources/fbpad-256",
    "content": "fbpad-256,\n\tuse=linux, U8#0,\n\tcolors#256,\n\tpairs#32767,\n\tsetab=\\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,\n\tsetaf=\\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,\n"
  },
  {
    "path": "packages/sx05re/tools/unused/munt_neon/math_neon/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present asakous (https://github.com/asakous)\n\nPKG_NAME=\"math_neon\"\nPKG_VERSION=\"bc25cd6715796c2c656dca9244f042b79c6bac8c\"\nPKG_ARCH=\"arm\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/asakous/math_neon\"\nPKG_URL=\"https://github.com/asakous/math_neon.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"This project implements the cmath functions and some optimised matrix functions with the aim of increasing the floating point performance of ARM Cortex A-8 based platforms. As well as implementing the functions in ARM NEON assembly, they sacrifice error checking and some accuracy to achieve better performance\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_TOOLCHAIN=\"make\"\n\n\nPKG_MAKE_OPTS_TARGET=\"all\"\n\npre_configure_target() {\nif [ \"${DEVICE}\" == \"OdroidGoAdvance\" ] || [ \"${DEVICE}\" == \"GameForce\" ]; then\nsed -i -e \"s/cortex-a7/cortex-a35/\" ${PKG_BUILD}/Makefile\nelse\nsed -i -e \"s/cortex-a7/cortex-a53/\" ${PKG_BUILD}/Makefile\nfi\n}\n    \nmakeinstall_target() {\ncd ${PKG_BUILD}\ncp -f ${PKG_BUILD}/libmathneon.a ${SYSROOT_PREFIX}/usr/lib/\n}\n"
  },
  {
    "path": "packages/sx05re/tools/unused/munt_neon/package.mk_",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present asakous (https://github.com/asakous)\n\nPKG_NAME=\"munt_neon\"\nPKG_VERSION=\"5785a6c9321179cf0544128ea4f740bb59f1928b\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/munt/munt\"\nPKG_URL=\"${PKG_SITE}.git\"\nPKG_DEPENDS_TARGET=\"toolchain math_neon\"\nPKG_LONGDESC=\"A software synthesiser emulating pre-GM MIDI devices such as the Roland MT-32.\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_CMAKE_OPTS_TARGET=\"-Dmunt_WITH_MT32EMU_QT=0 \\\n                       -Dmunt_WITH_MT32EMU_SMF2WAV=0 \\\n                       -Dlibmt32emu_SHARED=1\"\n\n\npre_configure_target() {\nif [ \"$DEVICE\" == \"OdroidGoAdvance\" ] || [ \"$DEVICE\" == \"GameForce\" ]; then\nsed -i -e \"s/cortex-a7/cortex-a35/\" $PKG_BUILD/mt32emu_alsadrv/Makefile\nelse\nsed -i -e \"s/cortex-a7/cortex-a53/\" $PKG_BUILD/mt32emu_alsadrv/Makefile\nfi\nsed -i -e \"s|../libmathneon.a|$(get_build_dir math_neon)/libmathneon.a|\" $PKG_BUILD/mt32emu_alsadrv/Makefile\nsed -i -e \"s|/usr/share/mt32-rom-data/|/storage/mt32-rom-data/|\" $PKG_BUILD/mt32emu_alsadrv/src/alsadrv.cpp\nsed -i -e \"s|../build/mt32emu/libmt32emu.a|${PKG_BUILD}/.${TARGET_NAME}/mt32emu/libmt32emu.so|\" $PKG_BUILD/mt32emu_alsadrv/Makefile\n}\n\npost_configure_target() { \ncp -rf ${PKG_BUILD}/.${TARGET_NAME}/mt32emu/include/* $SYSROOT_PREFIX/usr/include\n}\n\npre_makeinstall_target() { \nPKG_LIBNAME=\"libmt32emu.so.2\"\nPKG_LIBPATH=\"$PKG_BUILD/.${TARGET_NAME}/mt32emu/libmt32emu.so*\"\n\ncp $PKG_LIBPATH $SYSROOT_PREFIX/usr/lib\ncd $PKG_BUILD/mt32emu_alsadrv/\nmake mt32d\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/bin\n  cp mt32d $INSTALL/usr/bin/mt32d\n \n  #build systems will not copy .la files so this is pointless \n  mkdir -p $INSTALL/usr/lib\n  cp $PKG_LIBPATH $INSTALL/usr/lib\n}\n"
  },
  {
    "path": "packages/sx05re/tools/unused/steam-controller/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"steam-controller\"\nPKG_VERSION=\"60499dc\"\nPKG_SHA256=\"04a846c6f659fb5efca7747fe78e15c1348b5e0579437bb425f538318289bb80\"\nPKG_REV=\"102\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/ynsta/steamcontroller\"\nPKG_URL=\"https://github.com/ynsta/steamcontroller/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 distutilscross:host python-libusb1 enum34 linux:host\"\nPKG_SECTION=\"driver\"\nPKG_SHORTDESC=\"A standalone userland driver for the steam controller to be used where steam client can't be installed.\"\nPKG_LONGDESC=\"A standalone userland driver for the steam controller to be used where steam client can't be installed.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  export PYTHONXCPREFIX=\"${SYSROOT_PREFIX}/usr\"\n  export LDSHARED=\"${CC} -shared\"\n}\n\nmake_target() {\n  python setup.py build\n}\n\nmakeinstall_target() {\n\nfind ${PKG_BUILD}/build/scripts-2.7 -type f -exec sed -i \"s|\\#\\!/mnt.*|\\#\\!/usr/bin/python|g\" {} \\;\n\n  mkdir -p ${INSTALL}/usr/bin/\n    cp -a ${PKG_BUILD}/build/scripts-2.7/* ${INSTALL}/usr/bin/\n\n\n  mkdir -p ${INSTALL}/usr/lib\n    cp -a ${PKG_BUILD}/build/lib.linux-*-2.7/* ${INSTALL}/usr/lib/\n    cp -a $(get_build_dir python-libusb1)/build/lib/* ${INSTALL}/usr/lib/\n    cp -a $(get_build_dir enum34)/build/lib/* ${INSTALL}/usr/lib/\n\n  mkdir -p ${INSTALL}/usr/config/emuelec/scinclude/linux\n    if [ -f \"$(get_build_dir linux)/usr/include/linux/input-event-codes.h\" ]; then\n      cp $(get_build_dir linux)/usr/include/linux/input-event-codes.h ${INSTALL}/usr/config/emuelec/scinclude/linux/\n    fi\n    cp $(get_build_dir linux)/usr/include/linux/input.h ${INSTALL}/usr/config/emuelec/scinclude/linux/input.h\n\n  ${TOOLCHAIN}/bin/python -Wi -t -B ${TOOLCHAIN}/lib/${PKG_PYTHON_VERSION}/compileall.py ${INSTALL}/usr/lib/ -f 1>/dev/null\n  find ${INSTALL}/usr/lib/ -name '*.py' -exec rm {} \\;\n}\n\npost_install() {  \n    enable_service driver.steam-controller.service\n  }\n"
  },
  {
    "path": "packages/sx05re/tools/unused/steam-controller/patches/steamcontroller-0001-fix-include-dir.patch",
    "content": "commit 8da1123bcbf3ad12b6c9d7975ebbb3f8663fd166\nAuthor: Lukas Rusak <lorusak@gmail.com>\nDate:   Sat Jan 7 13:50:30 2017 -0800\n\n    fix include dir\n\ndiff --git a/src/uinput.py b/src/uinput.py\nindex 684a018..ffc2354 100644\n--- a/src/uinput.py\n+++ b/src/uinput.py\n@@ -36,10 +36,10 @@ from steamcontroller.tools import get_so_extensions\n from collections import deque\n \n # Get All defines from linux headers\n-if os.path.exists('/usr/include/linux/input-event-codes.h'):\n-    CHEAD = defines('/usr/include', 'linux/input-event-codes.h')\n+if os.path.exists('/storage/.config/emuelec/scinclude/linux/input-event-codes.h'):\n+    CHEAD = defines('/storage/.config/emuelec/scinclude', 'linux/input-event-codes.h')\n else:\n-    CHEAD = defines('/usr/include', 'linux/input.h')\n+    CHEAD = defines('/storage/.config/emuelec/scinclude', 'linux/input.h')\n \n # Keys enum contains all keys and button from linux/uinput.h (KEY_* BTN_*)\n Keys = IntEnum('Keys', {i: CHEAD[i] for i in CHEAD.keys() if (i.startswith('KEY_') or\n"
  },
  {
    "path": "packages/sx05re/tools/unused/steam-controller/patches/steamcontroller-0002-append-python-path.patch",
    "content": "commit b1bcba9b73d1e5e755ef6cda014ea3cc5a5ba270\nAuthor: Lukas Rusak <lorusak@gmail.com>\nDate:   Sat Jan 7 13:51:01 2017 -0800\n\n    append python path\n\ndiff --git a/scripts/sc-callbacks.py b/scripts/sc-callbacks.py\nindex eaeb658..35a272a 100755\n--- a/scripts/sc-callbacks.py\n+++ b/scripts/sc-callbacks.py\n@@ -25,6 +25,8 @@\n \"\"\"Steam Controller Callback Mode example\"\"\"\n import sys\n \n+sys.path.append('/usr/lib')\n+\n from steamcontroller import SteamController, SCButtons\n from steamcontroller.events import EventMapper, Pos\n from steamcontroller.uinput import Keys\ndiff --git a/scripts/sc-desktop.py b/scripts/sc-desktop.py\nindex 9eff430..e0b8ec7 100755\n--- a/scripts/sc-desktop.py\n+++ b/scripts/sc-desktop.py\n@@ -22,6 +22,10 @@\n # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n # THE SOFTWARE.\n \n+import sys\n+\n+sys.path.append('/usr/lib')\n+\n \"\"\"Steam Controller Mouse, Keyboard mode\"\"\"\n \n from steamcontroller import SteamController, SCButtons\ndiff --git a/scripts/sc-dump.py b/scripts/sc-dump.py\nindex b6f2c24..b582771 100755\n--- a/scripts/sc-dump.py\n+++ b/scripts/sc-dump.py\n@@ -25,6 +25,9 @@\n \"\"\"Steam Controller USB Dumper\"\"\"\n \n import sys\n+\n+sys.path.append('/usr/lib')\n+\n from steamcontroller import SteamController\n \n def dump(_, sci):\ndiff --git a/scripts/sc-mixed.py b/scripts/sc-mixed.py\nindex 4a9c3c0..5e25af9 100755\n--- a/scripts/sc-mixed.py\n+++ b/scripts/sc-mixed.py\n@@ -22,6 +22,10 @@\n # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n # THE SOFTWARE.\n \n+import sys\n+\n+sys.path.append('/usr/lib')\n+\n \"\"\"Steam Controller XBOX360 Gamepad Emulator\"\"\"\n \n from steamcontroller import \\\ndiff --git a/scripts/sc-test-cmsg.py b/scripts/sc-test-cmsg.py\nindex 08c8481..a59fbe9 100755\n--- a/scripts/sc-test-cmsg.py\n+++ b/scripts/sc-test-cmsg.py\n@@ -26,6 +26,9 @@\n \n import sys\n import struct\n+\n+sys.path.append('/usr/lib')\n+\n from steamcontroller import SteamController\n \n def dump(_, sci):\ndiff --git a/scripts/sc-xbox.py b/scripts/sc-xbox.py\nindex 814c8bc..89d4f55 100755\n--- a/scripts/sc-xbox.py\n+++ b/scripts/sc-xbox.py\n@@ -22,6 +22,10 @@\n # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n # THE SOFTWARE.\n \n+import sys\n+\n+sys.path.append('/usr/lib')\n+\n \"\"\"Steam Controller XBOX360 Gamepad Emulator\"\"\"\n \n from steamcontroller import \\\n"
  },
  {
    "path": "packages/sx05re/tools/unused/steam-controller/patches/steamcontroller-0003-wait-for-controller-connection.patch",
    "content": "commit 21abfb33340ba34de9c7266568515fc42608b339\nAuthor: Lukas Rusak <lorusak@gmail.com>\nDate:   Fri Jan 13 14:27:18 2017 -0800\n\n    wait for controller\n\ndiff --git a/src/__init__.py b/src/__init__.py\nindex 1bf111e..353f032 100644\n--- a/src/__init__.py\n+++ b/src/__init__.py\n@@ -24,7 +24,7 @@ import struct\n from enum import IntEnum\n \n from threading import Timer\n-from time import time\n+from time import time, sleep\n \n \n VENDOR_ID = 0x28de\n@@ -121,24 +121,28 @@ class SteamController(object):\n         self._cmsg = []\n         self._ctx = usb1.USBContext()\n \n+        _handle = None\n         handle = []\n         pid = []\n         endpoint = []\n         ccidx = []\n-        for i in range(len(PRODUCT_ID)):\n-            _pid = PRODUCT_ID[i]\n-            _endpoint = ENDPOINT[i]\n-            _ccidx = CONTROLIDX[i]\n-\n-            _handle = self._ctx.openByVendorIDAndProductID(\n-                VENDOR_ID, _pid,\n-                skip_on_error=True,\n-            )\n-            if _handle != None:\n-                handle.append(_handle)\n-                pid.append(_pid)\n-                endpoint.append(_endpoint)\n-                ccidx.append(_ccidx)\n+\n+        while _handle is None:\n+            for i in range(len(PRODUCT_ID)):\n+                _pid = PRODUCT_ID[i]\n+                _endpoint = ENDPOINT[i]\n+                _ccidx = CONTROLIDX[i]\n+\n+                _handle = self._ctx.openByVendorIDAndProductID(\n+                    VENDOR_ID, _pid,\n+                    skip_on_error=True,\n+                )\n+                if _handle != None:\n+                    handle.append(_handle)\n+                    pid.append(_pid)\n+                    endpoint.append(_endpoint)\n+                    ccidx.append(_ccidx)\n+            sleep(2)\n \n         if len(handle) == 0:\n             raise ValueError('No SteamControler Device found')\n"
  },
  {
    "path": "packages/sx05re/tools/unused/steam-controller/patches/steamcontroller-0004-use-run-for-pid-directory.patch",
    "content": "commit 5947f69820db3ce2d976ac533fb64319637d3f93\nAuthor: Lukas Rusak <lorusak@gmail.com>\nDate:   Sat Jan 7 13:53:36 2017 -0800\n\n    use run for pid directory\n\ndiff --git a/scripts/sc-desktop.py b/scripts/sc-desktop.py\nindex e0b8ec7..ad494d8 100755\n--- a/scripts/sc-desktop.py\n+++ b/scripts/sc-desktop.py\n@@ -87,9 +87,9 @@ if __name__ == '__main__':\n         parser.add_argument('-i', '--index', type=int, choices=[0,1,2,3], default=None)\n         args = parser.parse_args()\n         if args.index != None:\n-            daemon = SCDaemon('/tmp/steamcontroller{:d}.pid'.format(args.index))\n+            daemon = SCDaemon('/run/steamcontroller{:d}.pid'.format(args.index))\n         else:\n-            daemon = SCDaemon('/tmp/steamcontroller.pid')\n+            daemon = SCDaemon('/run/steamcontroller.pid')\n \n         if 'start' == args.command:\n             daemon.start()\ndiff --git a/scripts/sc-mixed.py b/scripts/sc-mixed.py\nindex 5e25af9..c9139e7 100755\n--- a/scripts/sc-mixed.py\n+++ b/scripts/sc-mixed.py\n@@ -126,9 +126,9 @@ if __name__ == '__main__':\n         parser.add_argument('-i', '--index', type=int, choices=[0,1,2,3], default=None)\n         args = parser.parse_args()\n         if args.index != None:\n-            daemon = SCDaemon('/tmp/steamcontroller{:d}.pid'.format(args.index))\n+            daemon = SCDaemon('/run/steamcontroller{:d}.pid'.format(args.index))\n         else:\n-            daemon = SCDaemon('/tmp/steamcontroller.pid')\n+            daemon = SCDaemon('/run/steamcontroller.pid')\n \n         if 'start' == args.command:\n             daemon.start()\ndiff --git a/scripts/sc-xbox.py b/scripts/sc-xbox.py\nindex 89d4f55..0c61b4e 100755\n--- a/scripts/sc-xbox.py\n+++ b/scripts/sc-xbox.py\n@@ -86,9 +86,9 @@ if __name__ == '__main__':\n         parser.add_argument('-i', '--index', type=int, choices=[0,1,2,3], default=None)\n         args = parser.parse_args()\n         if args.index != None:\n-            daemon = SCDaemon('/tmp/steamcontroller{:d}.pid'.format(args.index))\n+            daemon = SCDaemon('/run/steamcontroller{:d}.pid'.format(args.index))\n         else:\n-            daemon = SCDaemon('/tmp/steamcontroller.pid')\n+            daemon = SCDaemon('/run/steamcontroller.pid')\n \n         if 'start' == args.command:\n             daemon.start()\n"
  },
  {
    "path": "packages/sx05re/tools/unused/steam-controller/patches/steamcontroller-0005-steam-client-will-never-be-running.patch",
    "content": "commit 1467b7cd9d153be6680cc818b10c66967a2f0951\nAuthor: Lukas Rusak <lorusak@gmail.com>\nDate:   Sat Jan 7 14:11:25 2017 -0800\n\n    steam client will never be running\n\ndiff --git a/src/daemon.py b/src/daemon.py\nindex 964c765..fba7792 100644\n--- a/src/daemon.py\n+++ b/src/daemon.py\n@@ -9,7 +9,6 @@ import time\n import atexit\n import signal\n import syslog\n-import psutil\n import traceback\n import gc\n \n@@ -92,16 +91,12 @@ class Daemon(object):\n         self.daemonize()\n         syslog.syslog(syslog.LOG_INFO, '{}: started'.format(os.path.basename(sys.argv[0])))\n         while True:\n-            # look if steam is running\n-            if len([p for p in psutil.process_iter() if p.name() == 'steam']) == 0:\n-                try:\n-                    self.run()\n-                except Exception as e: # pylint: disable=W0703\n-                    syslog.syslog(syslog.LOG_ERR, '{}: {!s}'.format(os.path.basename(sys.argv[0]), e))\n-                    syslog.syslog(syslog.LOG_ERR, traceback.format_exc())\n-                    gc.collect()\n-            else:\n-                syslog.syslog(syslog.LOG_INFO, '{}: steam client is runing'.format(os.path.basename(sys.argv[0])))\n+            try:\n+                self.run()\n+            except Exception as e: # pylint: disable=W0703\n+                syslog.syslog(syslog.LOG_ERR, '{}: {!s}'.format(os.path.basename(sys.argv[0]), e))\n+                syslog.syslog(syslog.LOG_ERR, traceback.format_exc())\n+                gc.collect()\n             time.sleep(2)\n \n     def stop(self):\n"
  },
  {
    "path": "packages/sx05re/tools/unused/steam-controller/system.d/driver.steam-controller.service",
    "content": "[Unit]\nDescription=Steam Controller driver\n\n[Service]\nType=forking\nExecStart=/usr/bin/python /usr/bin/sc-xbox.py start\nExecReload=/usr/bin/python /usr/bin/sc-xbox.py restart\nExecStop=/usr/bin/python /usr/bin/sc-xbox.py stop\nPIDFile=/run/steamcontroller.pid\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/sx05re/tools/video/capsimg/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)\n\nPKG_NAME=\"capsimg\"\nPKG_VERSION=\"5d306bb19bc4382367a1e489fb36768fd224b5e6\"\nPKG_SHA256=\"340a4a167a1d457076d133f14ceb3f8fe20773511c3bc37b1dd633e6b81b2da8\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/FrodeSolheim/capsimg\"\nPKG_URL=\"https://github.com/FrodeSolheim/capsimg/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"SPS Decoder Library 5.1 (formerly IPF Decoder Lib)\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_MAKE_OPTS_TARGET=\"-C CAPSImg\"\n\npre_configure_target() {\n  ./bootstrap.fs\n  ./configure.fs --host=${TARGET_NAME}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib\n  cp -v  CAPSImg/libcapsimage.so.5.1 ${INSTALL}/usr/lib/\n  ln -sf libcapsimage.so.5.1 ${INSTALL}/usr/lib/libcapsimage.so.5\n  ln -sf libcapsimage.so.5.1 ${INSTALL}/usr/lib/libcapsimage.so\n  ln -sf libcapsimage.so.5.1 ${INSTALL}/usr/lib/capsimg.so\n}\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/X.h",
    "content": "/* Definitions for the X window system likely to be used by applications */\n\n#ifndef X_H\n#define X_H\n\n/***********************************************************\n\nCopyright 1987, 1998  The Open Group\n\nPermission to use, copy, modify, distribute, and sell this software and its\ndocumentation for any purpose is hereby granted without fee, provided that\nthe above copyright notice appear in all copies and that both that\ncopyright notice and this permission notice appear in supporting\ndocumentation.\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\nAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nExcept as contained in this notice, the name of The Open Group shall not be\nused in advertising or otherwise to promote the sale, use or other dealings\nin this Software without prior written authorization from The Open Group.\n\n\nCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.\n\n                        All Rights Reserved\n\nPermission to use, copy, modify, and distribute this software and its \ndocumentation for any purpose and without fee is hereby granted, \nprovided that the above copyright notice appear in all copies and that\nboth that copyright notice and this permission notice appear in \nsupporting documentation, and that the name of Digital not be\nused in advertising or publicity pertaining to distribution of the\nsoftware without specific, written prior permission.  \n\nDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING\nALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL\nDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR\nANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\nWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\nARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS\nSOFTWARE.\n\n******************************************************************/\n\n#define X_PROTOCOL\t11\t\t/* current protocol version */\n#define X_PROTOCOL_REVISION 0\t\t/* current minor version */\n\n/* Resources */\n\n/*\n * _XSERVER64 must ONLY be defined when compiling X server sources on\n * systems where unsigned long is not 32 bits, must NOT be used in\n * client or library code.\n */\n#ifndef _XSERVER64\n#  ifndef _XTYPEDEF_XID\n#    define _XTYPEDEF_XID\ntypedef unsigned long XID;\n#  endif\n#  ifndef _XTYPEDEF_MASK\n#    define _XTYPEDEF_MASK\ntypedef unsigned long Mask;\n#  endif\n#  ifndef _XTYPEDEF_ATOM\n#    define _XTYPEDEF_ATOM\ntypedef unsigned long Atom;\t\t/* Also in Xdefs.h */\n#  endif\ntypedef unsigned long VisualID;\ntypedef unsigned long Time;\n#else\n#  include <X11/Xmd.h>\n#  ifndef _XTYPEDEF_XID\n#    define _XTYPEDEF_XID\ntypedef CARD32 XID;\n#  endif\n#  ifndef _XTYPEDEF_MASK\n#    define _XTYPEDEF_MASK\ntypedef CARD32 Mask;\n#  endif\n#  ifndef _XTYPEDEF_ATOM\n#    define _XTYPEDEF_ATOM\ntypedef CARD32 Atom;\n#  endif\ntypedef CARD32 VisualID;\ntypedef CARD32 Time;\n#endif\n\ntypedef XID Window;\ntypedef XID Drawable;\n#ifndef _XTYPEDEF_FONT\n#  define _XTYPEDEF_FONT\ntypedef XID Font;\n#endif\ntypedef XID Pixmap;\ntypedef XID Cursor;\ntypedef XID Colormap;\ntypedef XID GContext;\ntypedef XID KeySym;\n\ntypedef unsigned char KeyCode;\n\n/*****************************************************************\n * RESERVED RESOURCE AND CONSTANT DEFINITIONS\n *****************************************************************/\n\n#ifndef None\n#define None                 0L\t/* universal null resource or null atom */\n#endif\n\n#define ParentRelative       1L\t/* background pixmap in CreateWindow\n\t\t\t\t    and ChangeWindowAttributes */\n\n#define CopyFromParent       0L\t/* border pixmap in CreateWindow\n\t\t\t\t       and ChangeWindowAttributes\n\t\t\t\t   special VisualID and special window\n\t\t\t\t       class passed to CreateWindow */\n\n#define PointerWindow        0L\t/* destination window in SendEvent */\n#define InputFocus           1L\t/* destination window in SendEvent */\n\n#define PointerRoot          1L\t/* focus window in SetInputFocus */\n\n#define AnyPropertyType      0L\t/* special Atom, passed to GetProperty */\n\n#define AnyKey\t\t     0L\t/* special Key Code, passed to GrabKey */\n\n#define AnyButton            0L\t/* special Button Code, passed to GrabButton */\n\n#define AllTemporary         0L\t/* special Resource ID passed to KillClient */\n\n#define CurrentTime          0L\t/* special Time */\n\n#define NoSymbol\t     0L\t/* special KeySym */\n\n/***************************************************************** \n * EVENT DEFINITIONS \n *****************************************************************/\n\n/* Input Event Masks. Used as event-mask window attribute and as arguments\n   to Grab requests.  Not to be confused with event names.  */\n\n#define NoEventMask\t\t\t0L\n#define KeyPressMask\t\t\t(1L<<0)  \n#define KeyReleaseMask\t\t\t(1L<<1)  \n#define ButtonPressMask\t\t\t(1L<<2)  \n#define ButtonReleaseMask\t\t(1L<<3)  \n#define EnterWindowMask\t\t\t(1L<<4)  \n#define LeaveWindowMask\t\t\t(1L<<5)  \n#define PointerMotionMask\t\t(1L<<6)  \n#define PointerMotionHintMask\t\t(1L<<7)  \n#define Button1MotionMask\t\t(1L<<8)  \n#define Button2MotionMask\t\t(1L<<9)  \n#define Button3MotionMask\t\t(1L<<10) \n#define Button4MotionMask\t\t(1L<<11) \n#define Button5MotionMask\t\t(1L<<12) \n#define ButtonMotionMask\t\t(1L<<13) \n#define KeymapStateMask\t\t\t(1L<<14)\n#define ExposureMask\t\t\t(1L<<15) \n#define VisibilityChangeMask\t\t(1L<<16) \n#define StructureNotifyMask\t\t(1L<<17) \n#define ResizeRedirectMask\t\t(1L<<18) \n#define SubstructureNotifyMask\t\t(1L<<19) \n#define SubstructureRedirectMask\t(1L<<20) \n#define FocusChangeMask\t\t\t(1L<<21) \n#define PropertyChangeMask\t\t(1L<<22) \n#define ColormapChangeMask\t\t(1L<<23) \n#define OwnerGrabButtonMask\t\t(1L<<24) \n\n/* Event names.  Used in \"type\" field in XEvent structures.  Not to be\nconfused with event masks above.  They start from 2 because 0 and 1\nare reserved in the protocol for errors and replies. */\n\n#define KeyPress\t\t2\n#define KeyRelease\t\t3\n#define ButtonPress\t\t4\n#define ButtonRelease\t\t5\n#define MotionNotify\t\t6\n#define EnterNotify\t\t7\n#define LeaveNotify\t\t8\n#define FocusIn\t\t\t9\n#define FocusOut\t\t10\n#define KeymapNotify\t\t11\n#define Expose\t\t\t12\n#define GraphicsExpose\t\t13\n#define NoExpose\t\t14\n#define VisibilityNotify\t15\n#define CreateNotify\t\t16\n#define DestroyNotify\t\t17\n#define UnmapNotify\t\t18\n#define MapNotify\t\t19\n#define MapRequest\t\t20\n#define ReparentNotify\t\t21\n#define ConfigureNotify\t\t22\n#define ConfigureRequest\t23\n#define GravityNotify\t\t24\n#define ResizeRequest\t\t25\n#define CirculateNotify\t\t26\n#define CirculateRequest\t27\n#define PropertyNotify\t\t28\n#define SelectionClear\t\t29\n#define SelectionRequest\t30\n#define SelectionNotify\t\t31\n#define ColormapNotify\t\t32\n#define ClientMessage\t\t33\n#define MappingNotify\t\t34\n#define GenericEvent\t\t35\n#define LASTEvent\t\t36\t/* must be bigger than any event # */\n\n\n/* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer,\n   state in various key-, mouse-, and button-related events. */\n\n#define ShiftMask\t\t(1<<0)\n#define LockMask\t\t(1<<1)\n#define ControlMask\t\t(1<<2)\n#define Mod1Mask\t\t(1<<3)\n#define Mod2Mask\t\t(1<<4)\n#define Mod3Mask\t\t(1<<5)\n#define Mod4Mask\t\t(1<<6)\n#define Mod5Mask\t\t(1<<7)\n\n/* modifier names.  Used to build a SetModifierMapping request or\n   to read a GetModifierMapping request.  These correspond to the\n   masks defined above. */\n#define ShiftMapIndex\t\t0\n#define LockMapIndex\t\t1\n#define ControlMapIndex\t\t2\n#define Mod1MapIndex\t\t3\n#define Mod2MapIndex\t\t4\n#define Mod3MapIndex\t\t5\n#define Mod4MapIndex\t\t6\n#define Mod5MapIndex\t\t7\n\n\n/* button masks.  Used in same manner as Key masks above. Not to be confused\n   with button names below. */\n\n#define Button1Mask\t\t(1<<8)\n#define Button2Mask\t\t(1<<9)\n#define Button3Mask\t\t(1<<10)\n#define Button4Mask\t\t(1<<11)\n#define Button5Mask\t\t(1<<12)\n\n#define AnyModifier\t\t(1<<15)  /* used in GrabButton, GrabKey */\n\n\n/* button names. Used as arguments to GrabButton and as detail in ButtonPress\n   and ButtonRelease events.  Not to be confused with button masks above.\n   Note that 0 is already defined above as \"AnyButton\".  */\n\n#define Button1\t\t\t1\n#define Button2\t\t\t2\n#define Button3\t\t\t3\n#define Button4\t\t\t4\n#define Button5\t\t\t5\n\n/* Notify modes */\n\n#define NotifyNormal\t\t0\n#define NotifyGrab\t\t1\n#define NotifyUngrab\t\t2\n#define NotifyWhileGrabbed\t3\n\n#define NotifyHint\t\t1\t/* for MotionNotify events */\n\t\t       \n/* Notify detail */\n\n#define NotifyAncestor\t\t0\n#define NotifyVirtual\t\t1\n#define NotifyInferior\t\t2\n#define NotifyNonlinear\t\t3\n#define NotifyNonlinearVirtual\t4\n#define NotifyPointer\t\t5\n#define NotifyPointerRoot\t6\n#define NotifyDetailNone\t7\n\n/* Visibility notify */\n\n#define VisibilityUnobscured\t\t0\n#define VisibilityPartiallyObscured\t1\n#define VisibilityFullyObscured\t\t2\n\n/* Circulation request */\n\n#define PlaceOnTop\t\t0\n#define PlaceOnBottom\t\t1\n\n/* protocol families */\n\n#define FamilyInternet\t\t0\t/* IPv4 */\n#define FamilyDECnet\t\t1\n#define FamilyChaos\t\t2\n#define FamilyInternet6\t\t6\t/* IPv6 */\n\n/* authentication families not tied to a specific protocol */\n#define FamilyServerInterpreted 5\n\n/* Property notification */\n\n#define PropertyNewValue\t0\n#define PropertyDelete\t\t1\n\n/* Color Map notification */\n\n#define ColormapUninstalled\t0\n#define ColormapInstalled\t1\n\n/* GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes */\n\n#define GrabModeSync\t\t0\n#define GrabModeAsync\t\t1\n\n/* GrabPointer, GrabKeyboard reply status */\n\n#define GrabSuccess\t\t0\n#define AlreadyGrabbed\t\t1\n#define GrabInvalidTime\t\t2\n#define GrabNotViewable\t\t3\n#define GrabFrozen\t\t4\n\n/* AllowEvents modes */\n\n#define AsyncPointer\t\t0\n#define SyncPointer\t\t1\n#define ReplayPointer\t\t2\n#define AsyncKeyboard\t\t3\n#define SyncKeyboard\t\t4\n#define ReplayKeyboard\t\t5\n#define AsyncBoth\t\t6\n#define SyncBoth\t\t7\n\n/* Used in SetInputFocus, GetInputFocus */\n\n#define RevertToNone\t\t(int)None\n#define RevertToPointerRoot\t(int)PointerRoot\n#define RevertToParent\t\t2\n\n/*****************************************************************\n * ERROR CODES \n *****************************************************************/\n\n#define Success\t\t   0\t/* everything's okay */\n#define BadRequest\t   1\t/* bad request code */\n#define BadValue\t   2\t/* int parameter out of range */\n#define BadWindow\t   3\t/* parameter not a Window */\n#define BadPixmap\t   4\t/* parameter not a Pixmap */\n#define BadAtom\t\t   5\t/* parameter not an Atom */\n#define BadCursor\t   6\t/* parameter not a Cursor */\n#define BadFont\t\t   7\t/* parameter not a Font */\n#define BadMatch\t   8\t/* parameter mismatch */\n#define BadDrawable\t   9\t/* parameter not a Pixmap or Window */\n#define BadAccess\t  10\t/* depending on context:\n\t\t\t\t - key/button already grabbed\n\t\t\t\t - attempt to free an illegal \n\t\t\t\t   cmap entry \n\t\t\t\t- attempt to store into a read-only \n\t\t\t\t   color map entry.\n \t\t\t\t- attempt to modify the access control\n\t\t\t\t   list from other than the local host.\n\t\t\t\t*/\n#define BadAlloc\t  11\t/* insufficient resources */\n#define BadColor\t  12\t/* no such colormap */\n#define BadGC\t\t  13\t/* parameter not a GC */\n#define BadIDChoice\t  14\t/* choice not in range or already used */\n#define BadName\t\t  15\t/* font or color name doesn't exist */\n#define BadLength\t  16\t/* Request length incorrect */\n#define BadImplementation 17\t/* server is defective */\n\n#define FirstExtensionError\t128\n#define LastExtensionError\t255\n\n/*****************************************************************\n * WINDOW DEFINITIONS \n *****************************************************************/\n\n/* Window classes used by CreateWindow */\n/* Note that CopyFromParent is already defined as 0 above */\n\n#define InputOutput\t\t1\n#define InputOnly\t\t2\n\n/* Window attributes for CreateWindow and ChangeWindowAttributes */\n\n#define CWBackPixmap\t\t(1L<<0)\n#define CWBackPixel\t\t(1L<<1)\n#define CWBorderPixmap\t\t(1L<<2)\n#define CWBorderPixel           (1L<<3)\n#define CWBitGravity\t\t(1L<<4)\n#define CWWinGravity\t\t(1L<<5)\n#define CWBackingStore          (1L<<6)\n#define CWBackingPlanes\t        (1L<<7)\n#define CWBackingPixel\t        (1L<<8)\n#define CWOverrideRedirect\t(1L<<9)\n#define CWSaveUnder\t\t(1L<<10)\n#define CWEventMask\t\t(1L<<11)\n#define CWDontPropagate\t        (1L<<12)\n#define CWColormap\t\t(1L<<13)\n#define CWCursor\t        (1L<<14)\n\n/* ConfigureWindow structure */\n\n#define CWX\t\t\t(1<<0)\n#define CWY\t\t\t(1<<1)\n#define CWWidth\t\t\t(1<<2)\n#define CWHeight\t\t(1<<3)\n#define CWBorderWidth\t\t(1<<4)\n#define CWSibling\t\t(1<<5)\n#define CWStackMode\t\t(1<<6)\n\n\n/* Bit Gravity */\n\n#define ForgetGravity\t\t0\n#define NorthWestGravity\t1\n#define NorthGravity\t\t2\n#define NorthEastGravity\t3\n#define WestGravity\t\t4\n#define CenterGravity\t\t5\n#define EastGravity\t\t6\n#define SouthWestGravity\t7\n#define SouthGravity\t\t8\n#define SouthEastGravity\t9\n#define StaticGravity\t\t10\n\n/* Window gravity + bit gravity above */\n\n#define UnmapGravity\t\t0\n\n/* Used in CreateWindow for backing-store hint */\n\n#define NotUseful               0\n#define WhenMapped              1\n#define Always                  2\n\n/* Used in GetWindowAttributes reply */\n\n#define IsUnmapped\t\t0\n#define IsUnviewable\t\t1\n#define IsViewable\t\t2\n\n/* Used in ChangeSaveSet */\n\n#define SetModeInsert           0\n#define SetModeDelete           1\n\n/* Used in ChangeCloseDownMode */\n\n#define DestroyAll              0\n#define RetainPermanent         1\n#define RetainTemporary         2\n\n/* Window stacking method (in configureWindow) */\n\n#define Above                   0\n#define Below                   1\n#define TopIf                   2\n#define BottomIf                3\n#define Opposite                4\n\n/* Circulation direction */\n\n#define RaiseLowest             0\n#define LowerHighest            1\n\n/* Property modes */\n\n#define PropModeReplace         0\n#define PropModePrepend         1\n#define PropModeAppend          2\n\n/*****************************************************************\n * GRAPHICS DEFINITIONS\n *****************************************************************/\n\n/* graphics functions, as in GC.alu */\n\n#define\tGXclear\t\t\t0x0\t\t/* 0 */\n#define GXand\t\t\t0x1\t\t/* src AND dst */\n#define GXandReverse\t\t0x2\t\t/* src AND NOT dst */\n#define GXcopy\t\t\t0x3\t\t/* src */\n#define GXandInverted\t\t0x4\t\t/* NOT src AND dst */\n#define\tGXnoop\t\t\t0x5\t\t/* dst */\n#define GXxor\t\t\t0x6\t\t/* src XOR dst */\n#define GXor\t\t\t0x7\t\t/* src OR dst */\n#define GXnor\t\t\t0x8\t\t/* NOT src AND NOT dst */\n#define GXequiv\t\t\t0x9\t\t/* NOT src XOR dst */\n#define GXinvert\t\t0xa\t\t/* NOT dst */\n#define GXorReverse\t\t0xb\t\t/* src OR NOT dst */\n#define GXcopyInverted\t\t0xc\t\t/* NOT src */\n#define GXorInverted\t\t0xd\t\t/* NOT src OR dst */\n#define GXnand\t\t\t0xe\t\t/* NOT src OR NOT dst */\n#define GXset\t\t\t0xf\t\t/* 1 */\n\n/* LineStyle */\n\n#define LineSolid\t\t0\n#define LineOnOffDash\t\t1\n#define LineDoubleDash\t\t2\n\n/* capStyle */\n\n#define CapNotLast\t\t0\n#define CapButt\t\t\t1\n#define CapRound\t\t2\n#define CapProjecting\t\t3\n\n/* joinStyle */\n\n#define JoinMiter\t\t0\n#define JoinRound\t\t1\n#define JoinBevel\t\t2\n\n/* fillStyle */\n\n#define FillSolid\t\t0\n#define FillTiled\t\t1\n#define FillStippled\t\t2\n#define FillOpaqueStippled\t3\n\n/* fillRule */\n\n#define EvenOddRule\t\t0\n#define WindingRule\t\t1\n\n/* subwindow mode */\n\n#define ClipByChildren\t\t0\n#define IncludeInferiors\t1\n\n/* SetClipRectangles ordering */\n\n#define Unsorted\t\t0\n#define YSorted\t\t\t1\n#define YXSorted\t\t2\n#define YXBanded\t\t3\n\n/* CoordinateMode for drawing routines */\n\n#define CoordModeOrigin\t\t0\t/* relative to the origin */\n#define CoordModePrevious       1\t/* relative to previous point */\n\n/* Polygon shapes */\n\n#define Complex\t\t\t0\t/* paths may intersect */\n#define Nonconvex\t\t1\t/* no paths intersect, but not convex */\n#define Convex\t\t\t2\t/* wholly convex */\n\n/* Arc modes for PolyFillArc */\n\n#define ArcChord\t\t0\t/* join endpoints of arc */\n#define ArcPieSlice\t\t1\t/* join endpoints to center of arc */\n\n/* GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into\n   GC.stateChanges */\n\n#define GCFunction              (1L<<0)\n#define GCPlaneMask             (1L<<1)\n#define GCForeground            (1L<<2)\n#define GCBackground            (1L<<3)\n#define GCLineWidth             (1L<<4)\n#define GCLineStyle             (1L<<5)\n#define GCCapStyle              (1L<<6)\n#define GCJoinStyle\t\t(1L<<7)\n#define GCFillStyle\t\t(1L<<8)\n#define GCFillRule\t\t(1L<<9) \n#define GCTile\t\t\t(1L<<10)\n#define GCStipple\t\t(1L<<11)\n#define GCTileStipXOrigin\t(1L<<12)\n#define GCTileStipYOrigin\t(1L<<13)\n#define GCFont \t\t\t(1L<<14)\n#define GCSubwindowMode\t\t(1L<<15)\n#define GCGraphicsExposures     (1L<<16)\n#define GCClipXOrigin\t\t(1L<<17)\n#define GCClipYOrigin\t\t(1L<<18)\n#define GCClipMask\t\t(1L<<19)\n#define GCDashOffset\t\t(1L<<20)\n#define GCDashList\t\t(1L<<21)\n#define GCArcMode\t\t(1L<<22)\n\n#define GCLastBit\t\t22\n/*****************************************************************\n * FONTS \n *****************************************************************/\n\n/* used in QueryFont -- draw direction */\n\n#define FontLeftToRight\t\t0\n#define FontRightToLeft\t\t1\n\n#define FontChange\t\t255\n\n/*****************************************************************\n *  IMAGING \n *****************************************************************/\n\n/* ImageFormat -- PutImage, GetImage */\n\n#define XYBitmap\t\t0\t/* depth 1, XYFormat */\n#define XYPixmap\t\t1\t/* depth == drawable depth */\n#define ZPixmap\t\t\t2\t/* depth == drawable depth */\n\n/*****************************************************************\n *  COLOR MAP STUFF \n *****************************************************************/\n\n/* For CreateColormap */\n\n#define AllocNone\t\t0\t/* create map with no entries */\n#define AllocAll\t\t1\t/* allocate entire map writeable */\n\n\n/* Flags used in StoreNamedColor, StoreColors */\n\n#define DoRed\t\t\t(1<<0)\n#define DoGreen\t\t\t(1<<1)\n#define DoBlue\t\t\t(1<<2)\n\n/*****************************************************************\n * CURSOR STUFF\n *****************************************************************/\n\n/* QueryBestSize Class */\n\n#define CursorShape\t\t0\t/* largest size that can be displayed */\n#define TileShape\t\t1\t/* size tiled fastest */\n#define StippleShape\t\t2\t/* size stippled fastest */\n\n/***************************************************************** \n * KEYBOARD/POINTER STUFF\n *****************************************************************/\n\n#define AutoRepeatModeOff\t0\n#define AutoRepeatModeOn\t1\n#define AutoRepeatModeDefault\t2\n\n#define LedModeOff\t\t0\n#define LedModeOn\t\t1\n\n/* masks for ChangeKeyboardControl */\n\n#define KBKeyClickPercent\t(1L<<0)\n#define KBBellPercent\t\t(1L<<1)\n#define KBBellPitch\t\t(1L<<2)\n#define KBBellDuration\t\t(1L<<3)\n#define KBLed\t\t\t(1L<<4)\n#define KBLedMode\t\t(1L<<5)\n#define KBKey\t\t\t(1L<<6)\n#define KBAutoRepeatMode\t(1L<<7)\n\n#define MappingSuccess     \t0\n#define MappingBusy        \t1\n#define MappingFailed\t\t2\n\n#define MappingModifier\t\t0\n#define MappingKeyboard\t\t1\n#define MappingPointer\t\t2\n\n/*****************************************************************\n * SCREEN SAVER STUFF \n *****************************************************************/\n\n#define DontPreferBlanking\t0\n#define PreferBlanking\t\t1\n#define DefaultBlanking\t\t2\n\n#define DisableScreenSaver\t0\n#define DisableScreenInterval\t0\n\n#define DontAllowExposures\t0\n#define AllowExposures\t\t1\n#define DefaultExposures\t2\n\n/* for ForceScreenSaver */\n\n#define ScreenSaverReset 0\n#define ScreenSaverActive 1\n\n/*****************************************************************\n * HOSTS AND CONNECTIONS\n *****************************************************************/\n\n/* for ChangeHosts */\n\n#define HostInsert\t\t0\n#define HostDelete\t\t1\n\n/* for ChangeAccessControl */\n\n#define EnableAccess\t\t1      \n#define DisableAccess\t\t0\n\n/* Display classes  used in opening the connection \n * Note that the statically allocated ones are even numbered and the\n * dynamically changeable ones are odd numbered */\n\n#define StaticGray\t\t0\n#define GrayScale\t\t1\n#define StaticColor\t\t2\n#define PseudoColor\t\t3\n#define TrueColor\t\t4\n#define DirectColor\t\t5\n\n\n/* Byte order  used in imageByteOrder and bitmapBitOrder */\n\n#define LSBFirst\t\t0\n#define MSBFirst\t\t1\n\n#endif /* X_H */\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/Xatom.h",
    "content": "#ifndef XATOM_H\n#define XATOM_H 1\n\n/* THIS IS A GENERATED FILE\n *\n * Do not change!  Changing this file implies a protocol change!\n */\n\n#define XA_PRIMARY ((Atom) 1)\n#define XA_SECONDARY ((Atom) 2)\n#define XA_ARC ((Atom) 3)\n#define XA_ATOM ((Atom) 4)\n#define XA_BITMAP ((Atom) 5)\n#define XA_CARDINAL ((Atom) 6)\n#define XA_COLORMAP ((Atom) 7)\n#define XA_CURSOR ((Atom) 8)\n#define XA_CUT_BUFFER0 ((Atom) 9)\n#define XA_CUT_BUFFER1 ((Atom) 10)\n#define XA_CUT_BUFFER2 ((Atom) 11)\n#define XA_CUT_BUFFER3 ((Atom) 12)\n#define XA_CUT_BUFFER4 ((Atom) 13)\n#define XA_CUT_BUFFER5 ((Atom) 14)\n#define XA_CUT_BUFFER6 ((Atom) 15)\n#define XA_CUT_BUFFER7 ((Atom) 16)\n#define XA_DRAWABLE ((Atom) 17)\n#define XA_FONT ((Atom) 18)\n#define XA_INTEGER ((Atom) 19)\n#define XA_PIXMAP ((Atom) 20)\n#define XA_POINT ((Atom) 21)\n#define XA_RECTANGLE ((Atom) 22)\n#define XA_RESOURCE_MANAGER ((Atom) 23)\n#define XA_RGB_COLOR_MAP ((Atom) 24)\n#define XA_RGB_BEST_MAP ((Atom) 25)\n#define XA_RGB_BLUE_MAP ((Atom) 26)\n#define XA_RGB_DEFAULT_MAP ((Atom) 27)\n#define XA_RGB_GRAY_MAP ((Atom) 28)\n#define XA_RGB_GREEN_MAP ((Atom) 29)\n#define XA_RGB_RED_MAP ((Atom) 30)\n#define XA_STRING ((Atom) 31)\n#define XA_VISUALID ((Atom) 32)\n#define XA_WINDOW ((Atom) 33)\n#define XA_WM_COMMAND ((Atom) 34)\n#define XA_WM_HINTS ((Atom) 35)\n#define XA_WM_CLIENT_MACHINE ((Atom) 36)\n#define XA_WM_ICON_NAME ((Atom) 37)\n#define XA_WM_ICON_SIZE ((Atom) 38)\n#define XA_WM_NAME ((Atom) 39)\n#define XA_WM_NORMAL_HINTS ((Atom) 40)\n#define XA_WM_SIZE_HINTS ((Atom) 41)\n#define XA_WM_ZOOM_HINTS ((Atom) 42)\n#define XA_MIN_SPACE ((Atom) 43)\n#define XA_NORM_SPACE ((Atom) 44)\n#define XA_MAX_SPACE ((Atom) 45)\n#define XA_END_SPACE ((Atom) 46)\n#define XA_SUPERSCRIPT_X ((Atom) 47)\n#define XA_SUPERSCRIPT_Y ((Atom) 48)\n#define XA_SUBSCRIPT_X ((Atom) 49)\n#define XA_SUBSCRIPT_Y ((Atom) 50)\n#define XA_UNDERLINE_POSITION ((Atom) 51)\n#define XA_UNDERLINE_THICKNESS ((Atom) 52)\n#define XA_STRIKEOUT_ASCENT ((Atom) 53)\n#define XA_STRIKEOUT_DESCENT ((Atom) 54)\n#define XA_ITALIC_ANGLE ((Atom) 55)\n#define XA_X_HEIGHT ((Atom) 56)\n#define XA_QUAD_WIDTH ((Atom) 57)\n#define XA_WEIGHT ((Atom) 58)\n#define XA_POINT_SIZE ((Atom) 59)\n#define XA_RESOLUTION ((Atom) 60)\n#define XA_COPYRIGHT ((Atom) 61)\n#define XA_NOTICE ((Atom) 62)\n#define XA_FONT_NAME ((Atom) 63)\n#define XA_FAMILY_NAME ((Atom) 64)\n#define XA_FULL_NAME ((Atom) 65)\n#define XA_CAP_HEIGHT ((Atom) 66)\n#define XA_WM_CLASS ((Atom) 67)\n#define XA_WM_TRANSIENT_FOR ((Atom) 68)\n\n#define XA_LAST_PREDEFINED ((Atom) 68)\n#endif /* XATOM_H */\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/Xdefs.h",
    "content": "/***********************************************************\n\nCopyright (c) 1999  The XFree86 Project Inc.\n\nAll Rights Reserved.\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\nAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nExcept as contained in this notice, the name of The XFree86 Project\nInc. shall not be used in advertising or otherwise to promote the\nsale, use or other dealings in this Software without prior written\nauthorization from The XFree86 Project Inc..\n\n*/\n\n/**\n ** Types definitions shared between server and clients \n **/\n\n#ifndef _XDEFS_H\n#define _XDEFS_H\n\n#ifdef _XSERVER64\n#include <X11/Xmd.h>\n#endif \n\n#ifndef _XTYPEDEF_ATOM\n#  define _XTYPEDEF_ATOM\n#  ifndef _XSERVER64\ntypedef unsigned long Atom;\n#  else\ntypedef CARD32 Atom;\n#  endif\n#endif\n\n#ifndef Bool\n#  ifndef _XTYPEDEF_BOOL\n#   define _XTYPEDEF_BOOL\ntypedef int Bool;\n#  endif\n#endif\n\n#ifndef _XTYPEDEF_POINTER\n#  define _XTYPEDEF_POINTER\ntypedef void *pointer;\n#endif\n\n#ifndef _XTYPEDEF_CLIENTPTR\ntypedef struct _Client *ClientPtr;\n#  define _XTYPEDEF_CLIENTPTR\n#endif\n\n#ifndef _XTYPEDEF_XID\n#  define _XTYPEDEF_XID\n#  ifndef _XSERVER64\ntypedef unsigned long XID;\n#  else\ntypedef CARD32 XID;\n#  endif\n#endif\n\n#ifndef _XTYPEDEF_MASK\n#  define _XTYPEDEF_MASK\n#  ifndef _XSERVER64\ntypedef unsigned long Mask;\n#  else\ntypedef CARD32 Mask;\n#  endif\n#endif\n\n#ifndef _XTYPEDEF_FONTPTR\n#  define _XTYPEDEF_FONTPTR\ntypedef struct _Font *FontPtr; /* also in fonts/include/font.h */\n#endif\n\n#ifndef _XTYPEDEF_FONT\n#  define _XTYPEDEF_FONT\ntypedef XID\tFont;\n#endif\n\n#ifndef _XTYPEDEF_FSID\n#  ifndef _XSERVER64\ntypedef unsigned long FSID;\n#  else\ntypedef CARD32 FSID;\n#  endif\n#endif\n\ntypedef FSID AccContext;\n\n/* OS independent time value \n   XXX Should probably go in Xos.h */\ntypedef struct timeval **OSTimePtr;\n\n\ntypedef void (* BlockHandlerProcPtr)(void * /* blockData */,\n\t\t\t\t     OSTimePtr /* pTimeout */,\n\t\t\t\t     void * /* pReadmask */);\n\n#endif\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/Xfuncproto.h",
    "content": "/* Xfuncproto.h.  Generated from Xfuncproto.h.in by configure.  */\n/*\n *\nCopyright 1989, 1991, 1998  The Open Group\n\nPermission to use, copy, modify, distribute, and sell this software and its\ndocumentation for any purpose is hereby granted without fee, provided that\nthe above copyright notice appear in all copies and that both that\ncopyright notice and this permission notice appear in supporting\ndocumentation.\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\nAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nExcept as contained in this notice, the name of The Open Group shall not be\nused in advertising or otherwise to promote the sale, use or other dealings\nin this Software without prior written authorization from The Open Group.\n *\n */\n\n/* Definitions to make function prototypes manageable */\n\n#ifndef _XFUNCPROTO_H_\n#define _XFUNCPROTO_H_\n\n#ifndef NeedFunctionPrototypes\n#define NeedFunctionPrototypes 1\n#endif /* NeedFunctionPrototypes */\n\n#ifndef NeedVarargsPrototypes\n#define NeedVarargsPrototypes 1\n#endif /* NeedVarargsPrototypes */\n\n#if NeedFunctionPrototypes\n\n#ifndef NeedNestedPrototypes\n#define NeedNestedPrototypes 1\n#endif /* NeedNestedPrototypes */\n\n#ifndef _Xconst\n#define _Xconst const\n#endif /* _Xconst */\n\n/* Function prototype configuration (see configure for more info) */\n#ifndef NARROWPROTO\n#define NARROWPROTO /**/\n#endif\n#ifndef FUNCPROTO\n#define FUNCPROTO 15\n#endif\n\n#ifndef NeedWidePrototypes\n#ifdef NARROWPROTO\n#define NeedWidePrototypes 0\n#else\n#define NeedWidePrototypes 1\t\t/* default to make interropt. easier */\n#endif\n#endif /* NeedWidePrototypes */\n\n#endif /* NeedFunctionPrototypes */\n\n#ifndef _XFUNCPROTOBEGIN\n#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */\n#define _XFUNCPROTOBEGIN extern \"C\" {\t/* do not leave open across includes */\n#define _XFUNCPROTOEND }\n#else\n#define _XFUNCPROTOBEGIN\n#define _XFUNCPROTOEND\n#endif\n#endif /* _XFUNCPROTOBEGIN */\n\n/* Added in X11R6.9, so available in any version of modular xproto */\n#if defined(__GNUC__) && (__GNUC__ >= 4)\n# define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))\n#else\n# define _X_SENTINEL(x)\n#endif /* GNUC >= 4 */\n\n/* Added in X11R6.9, so available in any version of modular xproto */\n#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__CYGWIN__)\n# define _X_EXPORT      __attribute__((visibility(\"default\")))\n# define _X_HIDDEN      __attribute__((visibility(\"hidden\")))\n# define _X_INTERNAL    __attribute__((visibility(\"internal\")))\n#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)\n# define _X_EXPORT      __global\n# define _X_HIDDEN      __hidden\n# define _X_INTERNAL    __hidden\n#else /* not gcc >= 4 and not Sun Studio >= 8 */\n# define _X_EXPORT\n# define _X_HIDDEN\n# define _X_INTERNAL\n#endif /* GNUC >= 4 */\n\n/* requires xproto >= 7.0.9 */\n#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)\n# define _X_LIKELY(x)   __builtin_expect(!!(x), 1)\n# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0)\n#else /* not gcc >= 3.3 */\n# define _X_LIKELY(x)   (x)\n# define _X_UNLIKELY(x) (x)\n#endif\n\n/* Added in X11R6.9, so available in any version of modular xproto */\n#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)\n# define _X_DEPRECATED  __attribute__((deprecated))\n#else /* not gcc >= 3.1 */\n# define _X_DEPRECATED\n#endif\n\n/* requires xproto >= 7.0.17 */\n#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \\\n\t|| (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))\n# define _X_NORETURN __attribute((noreturn))\n#else\n# define _X_NORETURN\n#endif /* GNUC  */\n\n/* Added in X11R6.9, so available in any version of modular xproto */\n#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203)\n# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))\n#else /* not gcc >= 2.3 */\n# define _X_ATTRIBUTE_PRINTF(x,y)\n#endif\n\n/* requires xproto >= 7.0.22 */\n#if defined(__GNUC__) &&  ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)\n#define _X_NONNULL(args...)  __attribute__((nonnull(args)))\n#else\n#define _X_NONNULL(...)  /* */\n#endif\n\n/* requires xproto >= 7.0.22 */\n#if defined(__GNUC__) &&  ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)\n#define _X_UNUSED  __attribute__((__unused__))\n#else\n#define _X_UNUSED  /* */\n#endif\n\n/* C99 keyword \"inline\" or equivalent extensions in pre-C99 compilers */\n/* requires xproto >= 7.0.9\n   (introduced in 7.0.8 but didn't support all compilers until 7.0.9) */\n#if defined(inline) /* assume autoconf set it correctly */ || \\\n   (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */ || \\\n   (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550))\n# define _X_INLINE inline\n#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */\n# define _X_INLINE __inline__\n#else\n# define _X_INLINE\n#endif\n\n/* C99 keyword \"restrict\" or equivalent extensions in pre-C99 compilers */\n/* requires xproto >= 7.0.21 */\n#ifndef _X_RESTRICT_KYWD\n# if defined(restrict) /* assume autoconf set it correctly */ || \\\n   (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */\n#  define _X_RESTRICT_KYWD  restrict\n# elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */\n#  define _X_RESTRICT_KYWD __restrict__\n# else\n#  define _X_RESTRICT_KYWD\n# endif\n#endif\n\n#endif /* _XFUNCPROTO_H_ */\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/Xlib.h",
    "content": "/*\n\nCopyright 1985, 1986, 1987, 1991, 1998  The Open Group\n\nPermission to use, copy, modify, distribute, and sell this software and its\ndocumentation for any purpose is hereby granted without fee, provided that\nthe above copyright notice appear in all copies and that both that\ncopyright notice and this permission notice appear in supporting\ndocumentation.\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\nAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nExcept as contained in this notice, the name of The Open Group shall not be\nused in advertising or otherwise to promote the sale, use or other dealings\nin this Software without prior written authorization from The Open Group.\n\n*/\n\n\n/*\n *\tXlib.h - Header definition and support file for the C subroutine\n *\tinterface library (Xlib) to the X Window System Protocol (V11).\n *\tStructures and symbols starting with \"_\" are private to the library.\n */\n#ifndef _X11_XLIB_H_\n#define _X11_XLIB_H_\n\n#define XlibSpecificationRelease 6\n\n#include <sys/types.h>\n\n#if defined(__SCO__) || defined(__UNIXWARE__)\n#include <stdint.h>\n#endif\n\n#include <X11/X.h>\n\n/* applications should not depend on these two headers being included! */\n#include <X11/Xfuncproto.h>\n#include <X11/Xosdefs.h>\n\n#ifndef X_WCHAR\n#include <stddef.h>\n#else\n#ifdef __UNIXOS2__\n#include <stdlib.h>\n#else\n/* replace this with #include or typedef appropriate for your system */\ntypedef unsigned long wchar_t;\n#endif\n#endif\n\n#if defined(ISC) && defined(USE_XMBTOWC)\n#define wctomb(a,b)\t_Xwctomb(a,b)\n#define mblen(a,b)\t_Xmblen(a,b)\n#ifndef USE_XWCHAR_STRING\n#define mbtowc(a,b,c)\t_Xmbtowc(a,b,c)\n#endif\n#endif\n\nextern int\n_Xmblen(\n#ifdef ISC\n    char const *str,\n    size_t len\n#else\n    char *str,\n    int len\n#endif\n    );\n\n/* API mentioning \"UTF8\" or \"utf8\" is an XFree86 extension, introduced in\n   November 2000. Its presence is indicated through the following macro. */\n#define X_HAVE_UTF8_STRING 1\n\ntypedef char *XPointer;\n\n#define Bool int\n#define Status int\n#define True 1\n#define False 0\n\n#define QueuedAlready 0\n#define QueuedAfterReading 1\n#define QueuedAfterFlush 2\n\n#define ConnectionNumber(dpy) \t(((_XPrivDisplay)dpy)->fd)\n#define RootWindow(dpy, scr) \t(ScreenOfDisplay(dpy,scr)->root)\n#define DefaultScreen(dpy) \t(((_XPrivDisplay)dpy)->default_screen)\n#define DefaultRootWindow(dpy) \t(ScreenOfDisplay(dpy,DefaultScreen(dpy))->root)\n#define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual)\n#define DefaultGC(dpy, scr) \t(ScreenOfDisplay(dpy,scr)->default_gc)\n#define BlackPixel(dpy, scr) \t(ScreenOfDisplay(dpy,scr)->black_pixel)\n#define WhitePixel(dpy, scr) \t(ScreenOfDisplay(dpy,scr)->white_pixel)\n#define AllPlanes \t\t((unsigned long)~0L)\n#define QLength(dpy) \t\t(((_XPrivDisplay)dpy)->qlen)\n#define DisplayWidth(dpy, scr) \t(ScreenOfDisplay(dpy,scr)->width)\n#define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)\n#define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth)\n#define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight)\n#define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)\n#define DisplayCells(dpy, scr) \t(DefaultVisual(dpy,scr)->map_entries)\n#define ScreenCount(dpy) \t(((_XPrivDisplay)dpy)->nscreens)\n#define ServerVendor(dpy) \t(((_XPrivDisplay)dpy)->vendor)\n#define ProtocolVersion(dpy) \t(((_XPrivDisplay)dpy)->proto_major_version)\n#define ProtocolRevision(dpy) \t(((_XPrivDisplay)dpy)->proto_minor_version)\n#define VendorRelease(dpy) \t(((_XPrivDisplay)dpy)->release)\n#define DisplayString(dpy) \t(((_XPrivDisplay)dpy)->display_name)\n#define DefaultDepth(dpy, scr) \t(ScreenOfDisplay(dpy,scr)->root_depth)\n#define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap)\n#define BitmapUnit(dpy) \t(((_XPrivDisplay)dpy)->bitmap_unit)\n#define BitmapBitOrder(dpy) \t(((_XPrivDisplay)dpy)->bitmap_bit_order)\n#define BitmapPad(dpy) \t\t(((_XPrivDisplay)dpy)->bitmap_pad)\n#define ImageByteOrder(dpy) \t(((_XPrivDisplay)dpy)->byte_order)\n#ifdef CRAY /* unable to get WORD64 without pulling in other symbols */\n#define NextRequest(dpy)\tXNextRequest(dpy)\n#else\n#define NextRequest(dpy)\t(((_XPrivDisplay)dpy)->request + 1)\n#endif\n#define LastKnownRequestProcessed(dpy)\t(((_XPrivDisplay)dpy)->last_request_read)\n\n/* macros for screen oriented applications (toolkit) */\n#define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)dpy)->screens[scr])\n#define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy))\n#define DisplayOfScreen(s)\t((s)->display)\n#define RootWindowOfScreen(s)\t((s)->root)\n#define BlackPixelOfScreen(s)\t((s)->black_pixel)\n#define WhitePixelOfScreen(s)\t((s)->white_pixel)\n#define DefaultColormapOfScreen(s)((s)->cmap)\n#define DefaultDepthOfScreen(s)\t((s)->root_depth)\n#define DefaultGCOfScreen(s)\t((s)->default_gc)\n#define DefaultVisualOfScreen(s)((s)->root_visual)\n#define WidthOfScreen(s)\t((s)->width)\n#define HeightOfScreen(s)\t((s)->height)\n#define WidthMMOfScreen(s)\t((s)->mwidth)\n#define HeightMMOfScreen(s)\t((s)->mheight)\n#define PlanesOfScreen(s)\t((s)->root_depth)\n#define CellsOfScreen(s)\t(DefaultVisualOfScreen((s))->map_entries)\n#define MinCmapsOfScreen(s)\t((s)->min_maps)\n#define MaxCmapsOfScreen(s)\t((s)->max_maps)\n#define DoesSaveUnders(s)\t((s)->save_unders)\n#define DoesBackingStore(s)\t((s)->backing_store)\n#define EventMaskOfScreen(s)\t((s)->root_input_mask)\n\n/*\n * Extensions need a way to hang private data on some structures.\n */\ntypedef struct _XExtData {\n\tint number;\t\t/* number returned by XRegisterExtension */\n\tstruct _XExtData *next;\t/* next item on list of data for structure */\n\tint (*free_private)(\t/* called to free private storage */\n\tstruct _XExtData *extension\n\t);\n\tXPointer private_data;\t/* data private to this extension. */\n} XExtData;\n\n/*\n * This file contains structures used by the extension mechanism.\n */\ntypedef struct {\t\t/* public to extension, cannot be changed */\n\tint extension;\t\t/* extension number */\n\tint major_opcode;\t/* major op-code assigned by server */\n\tint first_event;\t/* first event number for the extension */\n\tint first_error;\t/* first error number for the extension */\n} XExtCodes;\n\n/*\n * Data structure for retrieving info about pixmap formats.\n */\n\ntypedef struct {\n    int depth;\n    int bits_per_pixel;\n    int scanline_pad;\n} XPixmapFormatValues;\n\n\n/*\n * Data structure for setting graphics context.\n */\ntypedef struct {\n\tint function;\t\t/* logical operation */\n\tunsigned long plane_mask;/* plane mask */\n\tunsigned long foreground;/* foreground pixel */\n\tunsigned long background;/* background pixel */\n\tint line_width;\t\t/* line width */\n\tint line_style;\t \t/* LineSolid, LineOnOffDash, LineDoubleDash */\n\tint cap_style;\t  \t/* CapNotLast, CapButt,\n\t\t\t\t   CapRound, CapProjecting */\n\tint join_style;\t \t/* JoinMiter, JoinRound, JoinBevel */\n\tint fill_style;\t \t/* FillSolid, FillTiled,\n\t\t\t\t   FillStippled, FillOpaeueStippled */\n\tint fill_rule;\t  \t/* EvenOddRule, WindingRule */\n\tint arc_mode;\t\t/* ArcChord, ArcPieSlice */\n\tPixmap tile;\t\t/* tile pixmap for tiling operations */\n\tPixmap stipple;\t\t/* stipple 1 plane pixmap for stipping */\n\tint ts_x_origin;\t/* offset for tile or stipple operations */\n\tint ts_y_origin;\n        Font font;\t        /* default text font for text operations */\n\tint subwindow_mode;     /* ClipByChildren, IncludeInferiors */\n\tBool graphics_exposures;/* boolean, should exposures be generated */\n\tint clip_x_origin;\t/* origin for clipping */\n\tint clip_y_origin;\n\tPixmap clip_mask;\t/* bitmap clipping; other calls for rects */\n\tint dash_offset;\t/* patterned/dashed line information */\n\tchar dashes;\n} XGCValues;\n\n/*\n * Graphics context.  The contents of this structure are implementation\n * dependent.  A GC should be treated as opaque by application code.\n */\n\ntypedef struct _XGC\n#ifdef XLIB_ILLEGAL_ACCESS\n{\n    XExtData *ext_data;\t/* hook for extension to hang data */\n    GContext gid;\t/* protocol ID for graphics context */\n    /* there is more to this structure, but it is private to Xlib */\n}\n#endif\n*GC;\n\n/*\n * Visual structure; contains information about colormapping possible.\n */\ntypedef struct {\n\tXExtData *ext_data;\t/* hook for extension to hang data */\n\tVisualID visualid;\t/* visual id of this visual */\n#if defined(__cplusplus) || defined(c_plusplus)\n\tint c_class;\t\t/* C++ class of screen (monochrome, etc.) */\n#else\n\tint class;\t\t/* class of screen (monochrome, etc.) */\n#endif\n\tunsigned long red_mask, green_mask, blue_mask;\t/* mask values */\n\tint bits_per_rgb;\t/* log base 2 of distinct color values */\n\tint map_entries;\t/* color map entries */\n} Visual;\n\n/*\n * Depth structure; contains information for each possible depth.\n */\ntypedef struct {\n\tint depth;\t\t/* this depth (Z) of the depth */\n\tint nvisuals;\t\t/* number of Visual types at this depth */\n\tVisual *visuals;\t/* list of visuals possible at this depth */\n} Depth;\n\n/*\n * Information about the screen.  The contents of this structure are\n * implementation dependent.  A Screen should be treated as opaque\n * by application code.\n */\n\nstruct _XDisplay;\t\t/* Forward declare before use for C++ */\n\ntypedef struct {\n\tXExtData *ext_data;\t/* hook for extension to hang data */\n\tstruct _XDisplay *display;/* back pointer to display structure */\n\tWindow root;\t\t/* Root window id. */\n\tint width, height;\t/* width and height of screen */\n\tint mwidth, mheight;\t/* width and height of  in millimeters */\n\tint ndepths;\t\t/* number of depths possible */\n\tDepth *depths;\t\t/* list of allowable depths on the screen */\n\tint root_depth;\t\t/* bits per pixel */\n\tVisual *root_visual;\t/* root visual */\n\tGC default_gc;\t\t/* GC for the root root visual */\n\tColormap cmap;\t\t/* default color map */\n\tunsigned long white_pixel;\n\tunsigned long black_pixel;\t/* White and Black pixel values */\n\tint max_maps, min_maps;\t/* max and min color maps */\n\tint backing_store;\t/* Never, WhenMapped, Always */\n\tBool save_unders;\n\tlong root_input_mask;\t/* initial root input mask */\n} Screen;\n\n/*\n * Format structure; describes ZFormat data the screen will understand.\n */\ntypedef struct {\n\tXExtData *ext_data;\t/* hook for extension to hang data */\n\tint depth;\t\t/* depth of this image format */\n\tint bits_per_pixel;\t/* bits/pixel at this depth */\n\tint scanline_pad;\t/* scanline must padded to this multiple */\n} ScreenFormat;\n\n/*\n * Data structure for setting window attributes.\n */\ntypedef struct {\n    Pixmap background_pixmap;\t/* background or None or ParentRelative */\n    unsigned long background_pixel;\t/* background pixel */\n    Pixmap border_pixmap;\t/* border of the window */\n    unsigned long border_pixel;\t/* border pixel value */\n    int bit_gravity;\t\t/* one of bit gravity values */\n    int win_gravity;\t\t/* one of the window gravity values */\n    int backing_store;\t\t/* NotUseful, WhenMapped, Always */\n    unsigned long backing_planes;/* planes to be preseved if possible */\n    unsigned long backing_pixel;/* value to use in restoring planes */\n    Bool save_under;\t\t/* should bits under be saved? (popups) */\n    long event_mask;\t\t/* set of events that should be saved */\n    long do_not_propagate_mask;\t/* set of events that should not propagate */\n    Bool override_redirect;\t/* boolean value for override-redirect */\n    Colormap colormap;\t\t/* color map to be associated with window */\n    Cursor cursor;\t\t/* cursor to be displayed (or None) */\n} XSetWindowAttributes;\n\ntypedef struct {\n    int x, y;\t\t\t/* location of window */\n    int width, height;\t\t/* width and height of window */\n    int border_width;\t\t/* border width of window */\n    int depth;          \t/* depth of window */\n    Visual *visual;\t\t/* the associated visual structure */\n    Window root;        \t/* root of screen containing window */\n#if defined(__cplusplus) || defined(c_plusplus)\n    int c_class;\t\t/* C++ InputOutput, InputOnly*/\n#else\n    int class;\t\t\t/* InputOutput, InputOnly*/\n#endif\n    int bit_gravity;\t\t/* one of bit gravity values */\n    int win_gravity;\t\t/* one of the window gravity values */\n    int backing_store;\t\t/* NotUseful, WhenMapped, Always */\n    unsigned long backing_planes;/* planes to be preserved if possible */\n    unsigned long backing_pixel;/* value to be used when restoring planes */\n    Bool save_under;\t\t/* boolean, should bits under be saved? */\n    Colormap colormap;\t\t/* color map to be associated with window */\n    Bool map_installed;\t\t/* boolean, is color map currently installed*/\n    int map_state;\t\t/* IsUnmapped, IsUnviewable, IsViewable */\n    long all_event_masks;\t/* set of events all people have interest in*/\n    long your_event_mask;\t/* my event mask */\n    long do_not_propagate_mask; /* set of events that should not propagate */\n    Bool override_redirect;\t/* boolean value for override-redirect */\n    Screen *screen;\t\t/* back pointer to correct screen */\n} XWindowAttributes;\n\n/*\n * Data structure for host setting; getting routines.\n *\n */\n\ntypedef struct {\n\tint family;\t\t/* for example FamilyInternet */\n\tint length;\t\t/* length of address, in bytes */\n\tchar *address;\t\t/* pointer to where to find the bytes */\n} XHostAddress;\n\n/*\n * Data structure for ServerFamilyInterpreted addresses in host routines\n */\ntypedef struct {\n\tint typelength;\t\t/* length of type string, in bytes */\n\tint valuelength;\t/* length of value string, in bytes */\n\tchar *type;\t\t/* pointer to where to find the type string */\n\tchar *value;\t\t/* pointer to where to find the address */\n} XServerInterpretedAddress;\n\n/*\n * Data structure for \"image\" data, used by image manipulation routines.\n */\ntypedef struct _XImage {\n    int width, height;\t\t/* size of image */\n    int xoffset;\t\t/* number of pixels offset in X direction */\n    int format;\t\t\t/* XYBitmap, XYPixmap, ZPixmap */\n    char *data;\t\t\t/* pointer to image data */\n    int byte_order;\t\t/* data byte order, LSBFirst, MSBFirst */\n    int bitmap_unit;\t\t/* quant. of scanline 8, 16, 32 */\n    int bitmap_bit_order;\t/* LSBFirst, MSBFirst */\n    int bitmap_pad;\t\t/* 8, 16, 32 either XY or ZPixmap */\n    int depth;\t\t\t/* depth of image */\n    int bytes_per_line;\t\t/* accelarator to next line */\n    int bits_per_pixel;\t\t/* bits per pixel (ZPixmap) */\n    unsigned long red_mask;\t/* bits in z arrangment */\n    unsigned long green_mask;\n    unsigned long blue_mask;\n    XPointer obdata;\t\t/* hook for the object routines to hang on */\n    struct funcs {\t\t/* image manipulation routines */\n\tstruct _XImage *(*create_image)(\n\t\tstruct _XDisplay* /* display */,\n\t\tVisual*\t\t/* visual */,\n\t\tunsigned int\t/* depth */,\n\t\tint\t\t/* format */,\n\t\tint\t\t/* offset */,\n\t\tchar*\t\t/* data */,\n\t\tunsigned int\t/* width */,\n\t\tunsigned int\t/* height */,\n\t\tint\t\t/* bitmap_pad */,\n\t\tint\t\t/* bytes_per_line */);\n\tint (*destroy_image)        (struct _XImage *);\n\tunsigned long (*get_pixel)  (struct _XImage *, int, int);\n\tint (*put_pixel)            (struct _XImage *, int, int, unsigned long);\n\tstruct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);\n\tint (*add_pixel)            (struct _XImage *, long);\n\t} f;\n} XImage;\n\n/*\n * Data structure for XReconfigureWindow\n */\ntypedef struct {\n    int x, y;\n    int width, height;\n    int border_width;\n    Window sibling;\n    int stack_mode;\n} XWindowChanges;\n\n/*\n * Data structure used by color operations\n */\ntypedef struct {\n\tunsigned long pixel;\n\tunsigned short red, green, blue;\n\tchar flags;  /* do_red, do_green, do_blue */\n\tchar pad;\n} XColor;\n\n/*\n * Data structures for graphics operations.  On most machines, these are\n * congruent with the wire protocol structures, so reformatting the data\n * can be avoided on these architectures.\n */\ntypedef struct {\n    short x1, y1, x2, y2;\n} XSegment;\n\ntypedef struct {\n    short x, y;\n} XPoint;\n\ntypedef struct {\n    short x, y;\n    unsigned short width, height;\n} XRectangle;\n\ntypedef struct {\n    short x, y;\n    unsigned short width, height;\n    short angle1, angle2;\n} XArc;\n\n\n/* Data structure for XChangeKeyboardControl */\n\ntypedef struct {\n        int key_click_percent;\n        int bell_percent;\n        int bell_pitch;\n        int bell_duration;\n        int led;\n        int led_mode;\n        int key;\n        int auto_repeat_mode;   /* On, Off, Default */\n} XKeyboardControl;\n\n/* Data structure for XGetKeyboardControl */\n\ntypedef struct {\n        int key_click_percent;\n\tint bell_percent;\n\tunsigned int bell_pitch, bell_duration;\n\tunsigned long led_mask;\n\tint global_auto_repeat;\n\tchar auto_repeats[32];\n} XKeyboardState;\n\n/* Data structure for XGetMotionEvents.  */\n\ntypedef struct {\n        Time time;\n\tshort x, y;\n} XTimeCoord;\n\n/* Data structure for X{Set,Get}ModifierMapping */\n\ntypedef struct {\n \tint max_keypermod;\t/* The server's max # of keys per modifier */\n \tKeyCode *modifiermap;\t/* An 8 by max_keypermod array of modifiers */\n} XModifierKeymap;\n\n\n/*\n * Display datatype maintaining display specific data.\n * The contents of this structure are implementation dependent.\n * A Display should be treated as opaque by application code.\n */\n#ifndef XLIB_ILLEGAL_ACCESS\ntypedef struct _XDisplay Display;\n#endif\n\nstruct _XPrivate;\t\t/* Forward declare before use for C++ */\nstruct _XrmHashBucketRec;\n\ntypedef struct\n#ifdef XLIB_ILLEGAL_ACCESS\n_XDisplay\n#endif\n{\n\tXExtData *ext_data;\t/* hook for extension to hang data */\n\tstruct _XPrivate *private1;\n\tint fd;\t\t\t/* Network socket. */\n\tint private2;\n\tint proto_major_version;/* major version of server's X protocol */\n\tint proto_minor_version;/* minor version of servers X protocol */\n\tchar *vendor;\t\t/* vendor of the server hardware */\n        XID private3;\n\tXID private4;\n\tXID private5;\n\tint private6;\n\tXID (*resource_alloc)(\t/* allocator function */\n\t\tstruct _XDisplay*\n\t);\n\tint byte_order;\t\t/* screen byte order, LSBFirst, MSBFirst */\n\tint bitmap_unit;\t/* padding and data requirements */\n\tint bitmap_pad;\t\t/* padding requirements on bitmaps */\n\tint bitmap_bit_order;\t/* LeastSignificant or MostSignificant */\n\tint nformats;\t\t/* number of pixmap formats in list */\n\tScreenFormat *pixmap_format;\t/* pixmap format list */\n\tint private8;\n\tint release;\t\t/* release of the server */\n\tstruct _XPrivate *private9, *private10;\n\tint qlen;\t\t/* Length of input event queue */\n\tunsigned long last_request_read; /* seq number of last event read */\n\tunsigned long request;\t/* sequence number of last request. */\n\tXPointer private11;\n\tXPointer private12;\n\tXPointer private13;\n\tXPointer private14;\n\tunsigned max_request_size; /* maximum number 32 bit words in request*/\n\tstruct _XrmHashBucketRec *db;\n\tint (*private15)(\n\t\tstruct _XDisplay*\n\t\t);\n\tchar *display_name;\t/* \"host:display\" string used on this connect*/\n\tint default_screen;\t/* default screen for operations */\n\tint nscreens;\t\t/* number of screens on this server*/\n\tScreen *screens;\t/* pointer to list of screens */\n\tunsigned long motion_buffer;\t/* size of motion buffer */\n\tunsigned long private16;\n\tint min_keycode;\t/* minimum defined keycode */\n\tint max_keycode;\t/* maximum defined keycode */\n\tXPointer private17;\n\tXPointer private18;\n\tint private19;\n\tchar *xdefaults;\t/* contents of defaults from server */\n\t/* there is more to this structure, but it is private to Xlib */\n}\n#ifdef XLIB_ILLEGAL_ACCESS\nDisplay,\n#endif\n*_XPrivDisplay;\n\n#undef _XEVENT_\n#ifndef _XEVENT_\n/*\n * Definitions of specific events.\n */\ntypedef struct {\n\tint type;\t\t/* of event */\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow window;\t        /* \"event\" window it is reported relative to */\n\tWindow root;\t        /* root window that the event occurred on */\n\tWindow subwindow;\t/* child window */\n\tTime time;\t\t/* milliseconds */\n\tint x, y;\t\t/* pointer x, y coordinates in event window */\n\tint x_root, y_root;\t/* coordinates relative to root */\n\tunsigned int state;\t/* key or button mask */\n\tunsigned int keycode;\t/* detail */\n\tBool same_screen;\t/* same screen flag */\n} XKeyEvent;\ntypedef XKeyEvent XKeyPressedEvent;\ntypedef XKeyEvent XKeyReleasedEvent;\n\ntypedef struct {\n\tint type;\t\t/* of event */\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow window;\t        /* \"event\" window it is reported relative to */\n\tWindow root;\t        /* root window that the event occurred on */\n\tWindow subwindow;\t/* child window */\n\tTime time;\t\t/* milliseconds */\n\tint x, y;\t\t/* pointer x, y coordinates in event window */\n\tint x_root, y_root;\t/* coordinates relative to root */\n\tunsigned int state;\t/* key or button mask */\n\tunsigned int button;\t/* detail */\n\tBool same_screen;\t/* same screen flag */\n} XButtonEvent;\ntypedef XButtonEvent XButtonPressedEvent;\ntypedef XButtonEvent XButtonReleasedEvent;\n\ntypedef struct {\n\tint type;\t\t/* of event */\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow window;\t        /* \"event\" window reported relative to */\n\tWindow root;\t        /* root window that the event occurred on */\n\tWindow subwindow;\t/* child window */\n\tTime time;\t\t/* milliseconds */\n\tint x, y;\t\t/* pointer x, y coordinates in event window */\n\tint x_root, y_root;\t/* coordinates relative to root */\n\tunsigned int state;\t/* key or button mask */\n\tchar is_hint;\t\t/* detail */\n\tBool same_screen;\t/* same screen flag */\n} XMotionEvent;\ntypedef XMotionEvent XPointerMovedEvent;\n\ntypedef struct {\n\tint type;\t\t/* of event */\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow window;\t        /* \"event\" window reported relative to */\n\tWindow root;\t        /* root window that the event occurred on */\n\tWindow subwindow;\t/* child window */\n\tTime time;\t\t/* milliseconds */\n\tint x, y;\t\t/* pointer x, y coordinates in event window */\n\tint x_root, y_root;\t/* coordinates relative to root */\n\tint mode;\t\t/* NotifyNormal, NotifyGrab, NotifyUngrab */\n\tint detail;\n\t/*\n\t * NotifyAncestor, NotifyVirtual, NotifyInferior,\n\t * NotifyNonlinear,NotifyNonlinearVirtual\n\t */\n\tBool same_screen;\t/* same screen flag */\n\tBool focus;\t\t/* boolean focus */\n\tunsigned int state;\t/* key or button mask */\n} XCrossingEvent;\ntypedef XCrossingEvent XEnterWindowEvent;\ntypedef XCrossingEvent XLeaveWindowEvent;\n\ntypedef struct {\n\tint type;\t\t/* FocusIn or FocusOut */\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow window;\t\t/* window of event */\n\tint mode;\t\t/* NotifyNormal, NotifyWhileGrabbed,\n\t\t\t\t   NotifyGrab, NotifyUngrab */\n\tint detail;\n\t/*\n\t * NotifyAncestor, NotifyVirtual, NotifyInferior,\n\t * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,\n\t * NotifyPointerRoot, NotifyDetailNone\n\t */\n} XFocusChangeEvent;\ntypedef XFocusChangeEvent XFocusInEvent;\ntypedef XFocusChangeEvent XFocusOutEvent;\n\n/* generated on EnterWindow and FocusIn  when KeyMapState selected */\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow window;\n\tchar key_vector[32];\n} XKeymapEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow window;\n\tint x, y;\n\tint width, height;\n\tint count;\t\t/* if non-zero, at least this many more */\n} XExposeEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tDrawable drawable;\n\tint x, y;\n\tint width, height;\n\tint count;\t\t/* if non-zero, at least this many more */\n\tint major_code;\t\t/* core is CopyArea or CopyPlane */\n\tint minor_code;\t\t/* not defined in the core */\n} XGraphicsExposeEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tDrawable drawable;\n\tint major_code;\t\t/* core is CopyArea or CopyPlane */\n\tint minor_code;\t\t/* not defined in the core */\n} XNoExposeEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow window;\n\tint state;\t\t/* Visibility state */\n} XVisibilityEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow parent;\t\t/* parent of the window */\n\tWindow window;\t\t/* window id of window created */\n\tint x, y;\t\t/* window location */\n\tint width, height;\t/* size of window */\n\tint border_width;\t/* border width */\n\tBool override_redirect;\t/* creation should be overridden */\n} XCreateWindowEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow event;\n\tWindow window;\n} XDestroyWindowEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow event;\n\tWindow window;\n\tBool from_configure;\n} XUnmapEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow event;\n\tWindow window;\n\tBool override_redirect;\t/* boolean, is override set... */\n} XMapEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow parent;\n\tWindow window;\n} XMapRequestEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow event;\n\tWindow window;\n\tWindow parent;\n\tint x, y;\n\tBool override_redirect;\n} XReparentEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow event;\n\tWindow window;\n\tint x, y;\n\tint width, height;\n\tint border_width;\n\tWindow above;\n\tBool override_redirect;\n} XConfigureEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow event;\n\tWindow window;\n\tint x, y;\n} XGravityEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow window;\n\tint width, height;\n} XResizeRequestEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow parent;\n\tWindow window;\n\tint x, y;\n\tint width, height;\n\tint border_width;\n\tWindow above;\n\tint detail;\t\t/* Above, Below, TopIf, BottomIf, Opposite */\n\tunsigned long value_mask;\n} XConfigureRequestEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow event;\n\tWindow window;\n\tint place;\t\t/* PlaceOnTop, PlaceOnBottom */\n} XCirculateEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow parent;\n\tWindow window;\n\tint place;\t\t/* PlaceOnTop, PlaceOnBottom */\n} XCirculateRequestEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow window;\n\tAtom atom;\n\tTime time;\n\tint state;\t\t/* NewValue, Deleted */\n} XPropertyEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow window;\n\tAtom selection;\n\tTime time;\n} XSelectionClearEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow owner;\n\tWindow requestor;\n\tAtom selection;\n\tAtom target;\n\tAtom property;\n\tTime time;\n} XSelectionRequestEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow requestor;\n\tAtom selection;\n\tAtom target;\n\tAtom property;\t\t/* ATOM or None */\n\tTime time;\n} XSelectionEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow window;\n\tColormap colormap;\t/* COLORMAP or None */\n#if defined(__cplusplus) || defined(c_plusplus)\n\tBool c_new;\t\t/* C++ */\n#else\n\tBool new;\n#endif\n\tint state;\t\t/* ColormapInstalled, ColormapUninstalled */\n} XColormapEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow window;\n\tAtom message_type;\n\tint format;\n\tunion {\n\t\tchar b[20];\n\t\tshort s[10];\n\t\tlong l[5];\n\t\t} data;\n} XClientMessageEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;\t/* Display the event was read from */\n\tWindow window;\t\t/* unused */\n\tint request;\t\t/* one of MappingModifier, MappingKeyboard,\n\t\t\t\t   MappingPointer */\n\tint first_keycode;\t/* first keycode */\n\tint count;\t\t/* defines range of change w. first_keycode*/\n} XMappingEvent;\n\ntypedef struct {\n\tint type;\n\tDisplay *display;\t/* Display the event was read from */\n\tXID resourceid;\t\t/* resource id */\n\tunsigned long serial;\t/* serial number of failed request */\n\tunsigned char error_code;\t/* error code of failed request */\n\tunsigned char request_code;\t/* Major op-code of failed request */\n\tunsigned char minor_code;\t/* Minor op-code of failed request */\n} XErrorEvent;\n\ntypedef struct {\n\tint type;\n\tunsigned long serial;\t/* # of last request processed by server */\n\tBool send_event;\t/* true if this came from a SendEvent request */\n\tDisplay *display;/* Display the event was read from */\n\tWindow window;\t/* window on which event was requested in event mask */\n} XAnyEvent;\n\n\n/***************************************************************\n *\n * GenericEvent.  This event is the standard event for all newer extensions.\n */\n\ntypedef struct\n    {\n    int            type;         /* of event. Always GenericEvent */\n    unsigned long  serial;       /* # of last request processed */\n    Bool           send_event;   /* true if from SendEvent request */\n    Display        *display;     /* Display the event was read from */\n    int            extension;    /* major opcode of extension that caused the event */\n    int            evtype;       /* actual event type. */\n    } XGenericEvent;\n\ntypedef struct {\n    int            type;         /* of event. Always GenericEvent */\n    unsigned long  serial;       /* # of last request processed */\n    Bool           send_event;   /* true if from SendEvent request */\n    Display        *display;     /* Display the event was read from */\n    int            extension;    /* major opcode of extension that caused the event */\n    int            evtype;       /* actual event type. */\n    unsigned int   cookie;\n    void           *data;\n} XGenericEventCookie;\n\n/*\n * this union is defined so Xlib can always use the same sized\n * event structure internally, to avoid memory fragmentation.\n */\ntypedef union _XEvent {\n        int type;\t\t/* must not be changed; first element */\n\tXAnyEvent xany;\n\tXKeyEvent xkey;\n\tXButtonEvent xbutton;\n\tXMotionEvent xmotion;\n\tXCrossingEvent xcrossing;\n\tXFocusChangeEvent xfocus;\n\tXExposeEvent xexpose;\n\tXGraphicsExposeEvent xgraphicsexpose;\n\tXNoExposeEvent xnoexpose;\n\tXVisibilityEvent xvisibility;\n\tXCreateWindowEvent xcreatewindow;\n\tXDestroyWindowEvent xdestroywindow;\n\tXUnmapEvent xunmap;\n\tXMapEvent xmap;\n\tXMapRequestEvent xmaprequest;\n\tXReparentEvent xreparent;\n\tXConfigureEvent xconfigure;\n\tXGravityEvent xgravity;\n\tXResizeRequestEvent xresizerequest;\n\tXConfigureRequestEvent xconfigurerequest;\n\tXCirculateEvent xcirculate;\n\tXCirculateRequestEvent xcirculaterequest;\n\tXPropertyEvent xproperty;\n\tXSelectionClearEvent xselectionclear;\n\tXSelectionRequestEvent xselectionrequest;\n\tXSelectionEvent xselection;\n\tXColormapEvent xcolormap;\n\tXClientMessageEvent xclient;\n\tXMappingEvent xmapping;\n\tXErrorEvent xerror;\n\tXKeymapEvent xkeymap;\n\tXGenericEvent xgeneric;\n\tXGenericEventCookie xcookie;\n\tlong pad[24];\n} XEvent;\n#endif\n\n#define XAllocID(dpy) ((*((_XPrivDisplay)dpy)->resource_alloc)((dpy)))\n\n/*\n * per character font metric information.\n */\ntypedef struct {\n    short\tlbearing;\t/* origin to left edge of raster */\n    short\trbearing;\t/* origin to right edge of raster */\n    short\twidth;\t\t/* advance to next char's origin */\n    short\tascent;\t\t/* baseline to top edge of raster */\n    short\tdescent;\t/* baseline to bottom edge of raster */\n    unsigned short attributes;\t/* per char flags (not predefined) */\n} XCharStruct;\n\n/*\n * To allow arbitrary information with fonts, there are additional properties\n * returned.\n */\ntypedef struct {\n    Atom name;\n    unsigned long card32;\n} XFontProp;\n\ntypedef struct {\n    XExtData\t*ext_data;\t/* hook for extension to hang data */\n    Font        fid;            /* Font id for this font */\n    unsigned\tdirection;\t/* hint about direction the font is painted */\n    unsigned\tmin_char_or_byte2;/* first character */\n    unsigned\tmax_char_or_byte2;/* last character */\n    unsigned\tmin_byte1;\t/* first row that exists */\n    unsigned\tmax_byte1;\t/* last row that exists */\n    Bool\tall_chars_exist;/* flag if all characters have non-zero size*/\n    unsigned\tdefault_char;\t/* char to print for undefined character */\n    int         n_properties;   /* how many properties there are */\n    XFontProp\t*properties;\t/* pointer to array of additional properties*/\n    XCharStruct\tmin_bounds;\t/* minimum bounds over all existing char*/\n    XCharStruct\tmax_bounds;\t/* maximum bounds over all existing char*/\n    XCharStruct\t*per_char;\t/* first_char to last_char information */\n    int\t\tascent;\t\t/* log. extent above baseline for spacing */\n    int\t\tdescent;\t/* log. descent below baseline for spacing */\n} XFontStruct;\n\n/*\n * PolyText routines take these as arguments.\n */\ntypedef struct {\n    char *chars;\t\t/* pointer to string */\n    int nchars;\t\t\t/* number of characters */\n    int delta;\t\t\t/* delta between strings */\n    Font font;\t\t\t/* font to print it in, None don't change */\n} XTextItem;\n\ntypedef struct {\t\t/* normal 16 bit characters are two bytes */\n    unsigned char byte1;\n    unsigned char byte2;\n} XChar2b;\n\ntypedef struct {\n    XChar2b *chars;\t\t/* two byte characters */\n    int nchars;\t\t\t/* number of characters */\n    int delta;\t\t\t/* delta between strings */\n    Font font;\t\t\t/* font to print it in, None don't change */\n} XTextItem16;\n\n\ntypedef union { Display *display;\n\t\tGC gc;\n\t\tVisual *visual;\n\t\tScreen *screen;\n\t\tScreenFormat *pixmap_format;\n\t\tXFontStruct *font; } XEDataObject;\n\ntypedef struct {\n    XRectangle      max_ink_extent;\n    XRectangle      max_logical_extent;\n} XFontSetExtents;\n\n/* unused:\ntypedef void (*XOMProc)();\n */\n\ntypedef struct _XOM *XOM;\ntypedef struct _XOC *XOC, *XFontSet;\n\ntypedef struct {\n    char           *chars;\n    int             nchars;\n    int             delta;\n    XFontSet        font_set;\n} XmbTextItem;\n\ntypedef struct {\n    wchar_t        *chars;\n    int             nchars;\n    int             delta;\n    XFontSet        font_set;\n} XwcTextItem;\n\n#define XNRequiredCharSet \"requiredCharSet\"\n#define XNQueryOrientation \"queryOrientation\"\n#define XNBaseFontName \"baseFontName\"\n#define XNOMAutomatic \"omAutomatic\"\n#define XNMissingCharSet \"missingCharSet\"\n#define XNDefaultString \"defaultString\"\n#define XNOrientation \"orientation\"\n#define XNDirectionalDependentDrawing \"directionalDependentDrawing\"\n#define XNContextualDrawing \"contextualDrawing\"\n#define XNFontInfo \"fontInfo\"\n\ntypedef struct {\n    int charset_count;\n    char **charset_list;\n} XOMCharSetList;\n\ntypedef enum {\n    XOMOrientation_LTR_TTB,\n    XOMOrientation_RTL_TTB,\n    XOMOrientation_TTB_LTR,\n    XOMOrientation_TTB_RTL,\n    XOMOrientation_Context\n} XOrientation;\n\ntypedef struct {\n    int num_orientation;\n    XOrientation *orientation;\t/* Input Text description */\n} XOMOrientation;\n\ntypedef struct {\n    int num_font;\n    XFontStruct **font_struct_list;\n    char **font_name_list;\n} XOMFontInfo;\n\ntypedef struct _XIM *XIM;\ntypedef struct _XIC *XIC;\n\ntypedef void (*XIMProc)(\n    XIM,\n    XPointer,\n    XPointer\n);\n\ntypedef Bool (*XICProc)(\n    XIC,\n    XPointer,\n    XPointer\n);\n\ntypedef void (*XIDProc)(\n    Display*,\n    XPointer,\n    XPointer\n);\n\ntypedef unsigned long XIMStyle;\n\ntypedef struct {\n    unsigned short count_styles;\n    XIMStyle *supported_styles;\n} XIMStyles;\n\n#define XIMPreeditArea\t\t0x0001L\n#define XIMPreeditCallbacks\t0x0002L\n#define XIMPreeditPosition\t0x0004L\n#define XIMPreeditNothing\t0x0008L\n#define XIMPreeditNone\t\t0x0010L\n#define XIMStatusArea\t\t0x0100L\n#define XIMStatusCallbacks\t0x0200L\n#define XIMStatusNothing\t0x0400L\n#define XIMStatusNone\t\t0x0800L\n\n#define XNVaNestedList \"XNVaNestedList\"\n#define XNQueryInputStyle \"queryInputStyle\"\n#define XNClientWindow \"clientWindow\"\n#define XNInputStyle \"inputStyle\"\n#define XNFocusWindow \"focusWindow\"\n#define XNResourceName \"resourceName\"\n#define XNResourceClass \"resourceClass\"\n#define XNGeometryCallback \"geometryCallback\"\n#define XNDestroyCallback \"destroyCallback\"\n#define XNFilterEvents \"filterEvents\"\n#define XNPreeditStartCallback \"preeditStartCallback\"\n#define XNPreeditDoneCallback \"preeditDoneCallback\"\n#define XNPreeditDrawCallback \"preeditDrawCallback\"\n#define XNPreeditCaretCallback \"preeditCaretCallback\"\n#define XNPreeditStateNotifyCallback \"preeditStateNotifyCallback\"\n#define XNPreeditAttributes \"preeditAttributes\"\n#define XNStatusStartCallback \"statusStartCallback\"\n#define XNStatusDoneCallback \"statusDoneCallback\"\n#define XNStatusDrawCallback \"statusDrawCallback\"\n#define XNStatusAttributes \"statusAttributes\"\n#define XNArea \"area\"\n#define XNAreaNeeded \"areaNeeded\"\n#define XNSpotLocation \"spotLocation\"\n#define XNColormap \"colorMap\"\n#define XNStdColormap \"stdColorMap\"\n#define XNForeground \"foreground\"\n#define XNBackground \"background\"\n#define XNBackgroundPixmap \"backgroundPixmap\"\n#define XNFontSet \"fontSet\"\n#define XNLineSpace \"lineSpace\"\n#define XNCursor \"cursor\"\n\n#define XNQueryIMValuesList \"queryIMValuesList\"\n#define XNQueryICValuesList \"queryICValuesList\"\n#define XNVisiblePosition \"visiblePosition\"\n#define XNR6PreeditCallback \"r6PreeditCallback\"\n#define XNStringConversionCallback \"stringConversionCallback\"\n#define XNStringConversion \"stringConversion\"\n#define XNResetState \"resetState\"\n#define XNHotKey \"hotKey\"\n#define XNHotKeyState \"hotKeyState\"\n#define XNPreeditState \"preeditState\"\n#define XNSeparatorofNestedList \"separatorofNestedList\"\n\n#define XBufferOverflow\t\t-1\n#define XLookupNone\t\t1\n#define XLookupChars\t\t2\n#define XLookupKeySym\t\t3\n#define XLookupBoth\t\t4\n\ntypedef void *XVaNestedList;\n\ntypedef struct {\n    XPointer client_data;\n    XIMProc callback;\n} XIMCallback;\n\ntypedef struct {\n    XPointer client_data;\n    XICProc callback;\n} XICCallback;\n\ntypedef unsigned long XIMFeedback;\n\n#define XIMReverse\t\t1L\n#define XIMUnderline\t\t(1L<<1)\n#define XIMHighlight\t\t(1L<<2)\n#define XIMPrimary\t \t(1L<<5)\n#define XIMSecondary\t\t(1L<<6)\n#define XIMTertiary\t \t(1L<<7)\n#define XIMVisibleToForward \t(1L<<8)\n#define XIMVisibleToBackword \t(1L<<9)\n#define XIMVisibleToCenter \t(1L<<10)\n\ntypedef struct _XIMText {\n    unsigned short length;\n    XIMFeedback *feedback;\n    Bool encoding_is_wchar;\n    union {\n\tchar *multi_byte;\n\twchar_t *wide_char;\n    } string;\n} XIMText;\n\ntypedef\tunsigned long\t XIMPreeditState;\n\n#define\tXIMPreeditUnKnown\t0L\n#define\tXIMPreeditEnable\t1L\n#define\tXIMPreeditDisable\t(1L<<1)\n\ntypedef\tstruct\t_XIMPreeditStateNotifyCallbackStruct {\n    XIMPreeditState state;\n} XIMPreeditStateNotifyCallbackStruct;\n\ntypedef\tunsigned long\t XIMResetState;\n\n#define\tXIMInitialState\t\t1L\n#define\tXIMPreserveState\t(1L<<1)\n\ntypedef unsigned long XIMStringConversionFeedback;\n\n#define\tXIMStringConversionLeftEdge\t(0x00000001)\n#define\tXIMStringConversionRightEdge\t(0x00000002)\n#define\tXIMStringConversionTopEdge\t(0x00000004)\n#define\tXIMStringConversionBottomEdge\t(0x00000008)\n#define\tXIMStringConversionConcealed\t(0x00000010)\n#define\tXIMStringConversionWrapped\t(0x00000020)\n\ntypedef struct _XIMStringConversionText {\n    unsigned short length;\n    XIMStringConversionFeedback *feedback;\n    Bool encoding_is_wchar;\n    union {\n\tchar *mbs;\n\twchar_t *wcs;\n    } string;\n} XIMStringConversionText;\n\ntypedef\tunsigned short\tXIMStringConversionPosition;\n\ntypedef\tunsigned short\tXIMStringConversionType;\n\n#define\tXIMStringConversionBuffer\t(0x0001)\n#define\tXIMStringConversionLine\t\t(0x0002)\n#define\tXIMStringConversionWord\t\t(0x0003)\n#define\tXIMStringConversionChar\t\t(0x0004)\n\ntypedef\tunsigned short\tXIMStringConversionOperation;\n\n#define\tXIMStringConversionSubstitution\t(0x0001)\n#define\tXIMStringConversionRetrieval\t(0x0002)\n\ntypedef enum {\n    XIMForwardChar, XIMBackwardChar,\n    XIMForwardWord, XIMBackwardWord,\n    XIMCaretUp, XIMCaretDown,\n    XIMNextLine, XIMPreviousLine,\n    XIMLineStart, XIMLineEnd,\n    XIMAbsolutePosition,\n    XIMDontChange\n} XIMCaretDirection;\n\ntypedef struct _XIMStringConversionCallbackStruct {\n    XIMStringConversionPosition position;\n    XIMCaretDirection direction;\n    XIMStringConversionOperation operation;\n    unsigned short factor;\n    XIMStringConversionText *text;\n} XIMStringConversionCallbackStruct;\n\ntypedef struct _XIMPreeditDrawCallbackStruct {\n    int caret;\t\t/* Cursor offset within pre-edit string */\n    int chg_first;\t/* Starting change position */\n    int chg_length;\t/* Length of the change in character count */\n    XIMText *text;\n} XIMPreeditDrawCallbackStruct;\n\ntypedef enum {\n    XIMIsInvisible,\t/* Disable caret feedback */\n    XIMIsPrimary,\t/* UI defined caret feedback */\n    XIMIsSecondary\t/* UI defined caret feedback */\n} XIMCaretStyle;\n\ntypedef struct _XIMPreeditCaretCallbackStruct {\n    int position;\t\t /* Caret offset within pre-edit string */\n    XIMCaretDirection direction; /* Caret moves direction */\n    XIMCaretStyle style;\t /* Feedback of the caret */\n} XIMPreeditCaretCallbackStruct;\n\ntypedef enum {\n    XIMTextType,\n    XIMBitmapType\n} XIMStatusDataType;\n\ntypedef struct _XIMStatusDrawCallbackStruct {\n    XIMStatusDataType type;\n    union {\n\tXIMText *text;\n\tPixmap  bitmap;\n    } data;\n} XIMStatusDrawCallbackStruct;\n\ntypedef struct _XIMHotKeyTrigger {\n    KeySym\t keysym;\n    int\t\t modifier;\n    int\t\t modifier_mask;\n} XIMHotKeyTrigger;\n\ntypedef struct _XIMHotKeyTriggers {\n    int\t\t\t num_hot_key;\n    XIMHotKeyTrigger\t*key;\n} XIMHotKeyTriggers;\n\ntypedef\tunsigned long\t XIMHotKeyState;\n\n#define\tXIMHotKeyStateON\t(0x0001L)\n#define\tXIMHotKeyStateOFF\t(0x0002L)\n\ntypedef struct {\n    unsigned short count_values;\n    char **supported_values;\n} XIMValuesList;\n\n_XFUNCPROTOBEGIN\n\n#if defined(WIN32) && !defined(_XLIBINT_)\n#define _Xdebug (*_Xdebug_p)\n#endif\n\nextern int _Xdebug;\n\nextern XFontStruct *XLoadQueryFont(\n    Display*\t\t/* display */,\n    _Xconst char*\t/* name */\n);\n\nextern XFontStruct *XQueryFont(\n    Display*\t\t/* display */,\n    XID\t\t\t/* font_ID */\n);\n\n\nextern XTimeCoord *XGetMotionEvents(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Time\t\t/* start */,\n    Time\t\t/* stop */,\n    int*\t\t/* nevents_return */\n);\n\nextern XModifierKeymap *XDeleteModifiermapEntry(\n    XModifierKeymap*\t/* modmap */,\n#if NeedWidePrototypes\n    unsigned int\t/* keycode_entry */,\n#else\n    KeyCode\t\t/* keycode_entry */,\n#endif\n    int\t\t\t/* modifier */\n);\n\nextern XModifierKeymap\t*XGetModifierMapping(\n    Display*\t\t/* display */\n);\n\nextern XModifierKeymap\t*XInsertModifiermapEntry(\n    XModifierKeymap*\t/* modmap */,\n#if NeedWidePrototypes\n    unsigned int\t/* keycode_entry */,\n#else\n    KeyCode\t\t/* keycode_entry */,\n#endif\n    int\t\t\t/* modifier */\n);\n\nextern XModifierKeymap *XNewModifiermap(\n    int\t\t\t/* max_keys_per_mod */\n);\n\nextern XImage *XCreateImage(\n    Display*\t\t/* display */,\n    Visual*\t\t/* visual */,\n    unsigned int\t/* depth */,\n    int\t\t\t/* format */,\n    int\t\t\t/* offset */,\n    char*\t\t/* data */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    int\t\t\t/* bitmap_pad */,\n    int\t\t\t/* bytes_per_line */\n);\nextern Status XInitImage(\n    XImage*\t\t/* image */\n);\nextern XImage *XGetImage(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    unsigned long\t/* plane_mask */,\n    int\t\t\t/* format */\n);\nextern XImage *XGetSubImage(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    unsigned long\t/* plane_mask */,\n    int\t\t\t/* format */,\n    XImage*\t\t/* dest_image */,\n    int\t\t\t/* dest_x */,\n    int\t\t\t/* dest_y */\n);\n\n/*\n * X function declarations.\n */\nextern Display *XOpenDisplay(\n    _Xconst char*\t/* display_name */\n);\n\nextern void XrmInitialize(\n    void\n);\n\nextern char *XFetchBytes(\n    Display*\t\t/* display */,\n    int*\t\t/* nbytes_return */\n);\nextern char *XFetchBuffer(\n    Display*\t\t/* display */,\n    int*\t\t/* nbytes_return */,\n    int\t\t\t/* buffer */\n);\nextern char *XGetAtomName(\n    Display*\t\t/* display */,\n    Atom\t\t/* atom */\n);\nextern Status XGetAtomNames(\n    Display*\t\t/* dpy */,\n    Atom*\t\t/* atoms */,\n    int\t\t\t/* count */,\n    char**\t\t/* names_return */\n);\nextern char *XGetDefault(\n    Display*\t\t/* display */,\n    _Xconst char*\t/* program */,\n    _Xconst char*\t/* option */\n);\nextern char *XDisplayName(\n    _Xconst char*\t/* string */\n);\nextern char *XKeysymToString(\n    KeySym\t\t/* keysym */\n);\n\nextern int (*XSynchronize(\n    Display*\t\t/* display */,\n    Bool\t\t/* onoff */\n))(\n    Display*\t\t/* display */\n);\nextern int (*XSetAfterFunction(\n    Display*\t\t/* display */,\n    int (*) (\n\t     Display*\t/* display */\n            )\t\t/* procedure */\n))(\n    Display*\t\t/* display */\n);\nextern Atom XInternAtom(\n    Display*\t\t/* display */,\n    _Xconst char*\t/* atom_name */,\n    Bool\t\t/* only_if_exists */\n);\nextern Status XInternAtoms(\n    Display*\t\t/* dpy */,\n    char**\t\t/* names */,\n    int\t\t\t/* count */,\n    Bool\t\t/* onlyIfExists */,\n    Atom*\t\t/* atoms_return */\n);\nextern Colormap XCopyColormapAndFree(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */\n);\nextern Colormap XCreateColormap(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Visual*\t\t/* visual */,\n    int\t\t\t/* alloc */\n);\nextern Cursor XCreatePixmapCursor(\n    Display*\t\t/* display */,\n    Pixmap\t\t/* source */,\n    Pixmap\t\t/* mask */,\n    XColor*\t\t/* foreground_color */,\n    XColor*\t\t/* background_color */,\n    unsigned int\t/* x */,\n    unsigned int\t/* y */\n);\nextern Cursor XCreateGlyphCursor(\n    Display*\t\t/* display */,\n    Font\t\t/* source_font */,\n    Font\t\t/* mask_font */,\n    unsigned int\t/* source_char */,\n    unsigned int\t/* mask_char */,\n    XColor _Xconst *\t/* foreground_color */,\n    XColor _Xconst *\t/* background_color */\n);\nextern Cursor XCreateFontCursor(\n    Display*\t\t/* display */,\n    unsigned int\t/* shape */\n);\nextern Font XLoadFont(\n    Display*\t\t/* display */,\n    _Xconst char*\t/* name */\n);\nextern GC XCreateGC(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    unsigned long\t/* valuemask */,\n    XGCValues*\t\t/* values */\n);\nextern GContext XGContextFromGC(\n    GC\t\t\t/* gc */\n);\nextern void XFlushGC(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */\n);\nextern Pixmap XCreatePixmap(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    unsigned int\t/* depth */\n);\nextern Pixmap XCreateBitmapFromData(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    _Xconst char*\t/* data */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */\n);\nextern Pixmap XCreatePixmapFromBitmapData(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    char*\t\t/* data */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    unsigned long\t/* fg */,\n    unsigned long\t/* bg */,\n    unsigned int\t/* depth */\n);\nextern Window XCreateSimpleWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* parent */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    unsigned int\t/* border_width */,\n    unsigned long\t/* border */,\n    unsigned long\t/* background */\n);\nextern Window XGetSelectionOwner(\n    Display*\t\t/* display */,\n    Atom\t\t/* selection */\n);\nextern Window XCreateWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* parent */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    unsigned int\t/* border_width */,\n    int\t\t\t/* depth */,\n    unsigned int\t/* class */,\n    Visual*\t\t/* visual */,\n    unsigned long\t/* valuemask */,\n    XSetWindowAttributes*\t/* attributes */\n);\nextern Colormap *XListInstalledColormaps(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    int*\t\t/* num_return */\n);\nextern char **XListFonts(\n    Display*\t\t/* display */,\n    _Xconst char*\t/* pattern */,\n    int\t\t\t/* maxnames */,\n    int*\t\t/* actual_count_return */\n);\nextern char **XListFontsWithInfo(\n    Display*\t\t/* display */,\n    _Xconst char*\t/* pattern */,\n    int\t\t\t/* maxnames */,\n    int*\t\t/* count_return */,\n    XFontStruct**\t/* info_return */\n);\nextern char **XGetFontPath(\n    Display*\t\t/* display */,\n    int*\t\t/* npaths_return */\n);\nextern char **XListExtensions(\n    Display*\t\t/* display */,\n    int*\t\t/* nextensions_return */\n);\nextern Atom *XListProperties(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    int*\t\t/* num_prop_return */\n);\nextern XHostAddress *XListHosts(\n    Display*\t\t/* display */,\n    int*\t\t/* nhosts_return */,\n    Bool*\t\t/* state_return */\n);\n_X_DEPRECATED\nextern KeySym XKeycodeToKeysym(\n    Display*\t\t/* display */,\n#if NeedWidePrototypes\n    unsigned int\t/* keycode */,\n#else\n    KeyCode\t\t/* keycode */,\n#endif\n    int\t\t\t/* index */\n);\nextern KeySym XLookupKeysym(\n    XKeyEvent*\t\t/* key_event */,\n    int\t\t\t/* index */\n);\nextern KeySym *XGetKeyboardMapping(\n    Display*\t\t/* display */,\n#if NeedWidePrototypes\n    unsigned int\t/* first_keycode */,\n#else\n    KeyCode\t\t/* first_keycode */,\n#endif\n    int\t\t\t/* keycode_count */,\n    int*\t\t/* keysyms_per_keycode_return */\n);\nextern KeySym XStringToKeysym(\n    _Xconst char*\t/* string */\n);\nextern long XMaxRequestSize(\n    Display*\t\t/* display */\n);\nextern long XExtendedMaxRequestSize(\n    Display*\t\t/* display */\n);\nextern char *XResourceManagerString(\n    Display*\t\t/* display */\n);\nextern char *XScreenResourceString(\n\tScreen*\t\t/* screen */\n);\nextern unsigned long XDisplayMotionBufferSize(\n    Display*\t\t/* display */\n);\nextern VisualID XVisualIDFromVisual(\n    Visual*\t\t/* visual */\n);\n\n/* multithread routines */\n\nextern Status XInitThreads(\n    void\n);\n\nextern void XLockDisplay(\n    Display*\t\t/* display */\n);\n\nextern void XUnlockDisplay(\n    Display*\t\t/* display */\n);\n\n/* routines for dealing with extensions */\n\nextern XExtCodes *XInitExtension(\n    Display*\t\t/* display */,\n    _Xconst char*\t/* name */\n);\n\nextern XExtCodes *XAddExtension(\n    Display*\t\t/* display */\n);\nextern XExtData *XFindOnExtensionList(\n    XExtData**\t\t/* structure */,\n    int\t\t\t/* number */\n);\nextern XExtData **XEHeadOfExtensionList(\n    XEDataObject\t/* object */\n);\n\n/* these are routines for which there are also macros */\nextern Window XRootWindow(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */\n);\nextern Window XDefaultRootWindow(\n    Display*\t\t/* display */\n);\nextern Window XRootWindowOfScreen(\n    Screen*\t\t/* screen */\n);\nextern Visual *XDefaultVisual(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */\n);\nextern Visual *XDefaultVisualOfScreen(\n    Screen*\t\t/* screen */\n);\nextern GC XDefaultGC(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */\n);\nextern GC XDefaultGCOfScreen(\n    Screen*\t\t/* screen */\n);\nextern unsigned long XBlackPixel(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */\n);\nextern unsigned long XWhitePixel(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */\n);\nextern unsigned long XAllPlanes(\n    void\n);\nextern unsigned long XBlackPixelOfScreen(\n    Screen*\t\t/* screen */\n);\nextern unsigned long XWhitePixelOfScreen(\n    Screen*\t\t/* screen */\n);\nextern unsigned long XNextRequest(\n    Display*\t\t/* display */\n);\nextern unsigned long XLastKnownRequestProcessed(\n    Display*\t\t/* display */\n);\nextern char *XServerVendor(\n    Display*\t\t/* display */\n);\nextern char *XDisplayString(\n    Display*\t\t/* display */\n);\nextern Colormap XDefaultColormap(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */\n);\nextern Colormap XDefaultColormapOfScreen(\n    Screen*\t\t/* screen */\n);\nextern Display *XDisplayOfScreen(\n    Screen*\t\t/* screen */\n);\nextern Screen *XScreenOfDisplay(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */\n);\nextern Screen *XDefaultScreenOfDisplay(\n    Display*\t\t/* display */\n);\nextern long XEventMaskOfScreen(\n    Screen*\t\t/* screen */\n);\n\nextern int XScreenNumberOfScreen(\n    Screen*\t\t/* screen */\n);\n\ntypedef int (*XErrorHandler) (\t    /* WARNING, this type not in Xlib spec */\n    Display*\t\t/* display */,\n    XErrorEvent*\t/* error_event */\n);\n\nextern XErrorHandler XSetErrorHandler (\n    XErrorHandler\t/* handler */\n);\n\n\ntypedef int (*XIOErrorHandler) (    /* WARNING, this type not in Xlib spec */\n    Display*\t\t/* display */\n);\n\nextern XIOErrorHandler XSetIOErrorHandler (\n    XIOErrorHandler\t/* handler */\n);\n\n\nextern XPixmapFormatValues *XListPixmapFormats(\n    Display*\t\t/* display */,\n    int*\t\t/* count_return */\n);\nextern int *XListDepths(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */,\n    int*\t\t/* count_return */\n);\n\n/* ICCCM routines for things that don't require special include files; */\n/* other declarations are given in Xutil.h                             */\nextern Status XReconfigureWMWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    int\t\t\t/* screen_number */,\n    unsigned int\t/* mask */,\n    XWindowChanges*\t/* changes */\n);\n\nextern Status XGetWMProtocols(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Atom**\t\t/* protocols_return */,\n    int*\t\t/* count_return */\n);\nextern Status XSetWMProtocols(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Atom*\t\t/* protocols */,\n    int\t\t\t/* count */\n);\nextern Status XIconifyWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    int\t\t\t/* screen_number */\n);\nextern Status XWithdrawWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    int\t\t\t/* screen_number */\n);\nextern Status XGetCommand(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    char***\t\t/* argv_return */,\n    int*\t\t/* argc_return */\n);\nextern Status XGetWMColormapWindows(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Window**\t\t/* windows_return */,\n    int*\t\t/* count_return */\n);\nextern Status XSetWMColormapWindows(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Window*\t\t/* colormap_windows */,\n    int\t\t\t/* count */\n);\nextern void XFreeStringList(\n    char**\t\t/* list */\n);\nextern int XSetTransientForHint(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Window\t\t/* prop_window */\n);\n\n/* The following are given in alphabetical order */\n\nextern int XActivateScreenSaver(\n    Display*\t\t/* display */\n);\n\nextern int XAddHost(\n    Display*\t\t/* display */,\n    XHostAddress*\t/* host */\n);\n\nextern int XAddHosts(\n    Display*\t\t/* display */,\n    XHostAddress*\t/* hosts */,\n    int\t\t\t/* num_hosts */\n);\n\nextern int XAddToExtensionList(\n    struct _XExtData**\t/* structure */,\n    XExtData*\t\t/* ext_data */\n);\n\nextern int XAddToSaveSet(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern Status XAllocColor(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */,\n    XColor*\t\t/* screen_in_out */\n);\n\nextern Status XAllocColorCells(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */,\n    Bool\t        /* contig */,\n    unsigned long*\t/* plane_masks_return */,\n    unsigned int\t/* nplanes */,\n    unsigned long*\t/* pixels_return */,\n    unsigned int \t/* npixels */\n);\n\nextern Status XAllocColorPlanes(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */,\n    Bool\t\t/* contig */,\n    unsigned long*\t/* pixels_return */,\n    int\t\t\t/* ncolors */,\n    int\t\t\t/* nreds */,\n    int\t\t\t/* ngreens */,\n    int\t\t\t/* nblues */,\n    unsigned long*\t/* rmask_return */,\n    unsigned long*\t/* gmask_return */,\n    unsigned long*\t/* bmask_return */\n);\n\nextern Status XAllocNamedColor(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */,\n    _Xconst char*\t/* color_name */,\n    XColor*\t\t/* screen_def_return */,\n    XColor*\t\t/* exact_def_return */\n);\n\nextern int XAllowEvents(\n    Display*\t\t/* display */,\n    int\t\t\t/* event_mode */,\n    Time\t\t/* time */\n);\n\nextern int XAutoRepeatOff(\n    Display*\t\t/* display */\n);\n\nextern int XAutoRepeatOn(\n    Display*\t\t/* display */\n);\n\nextern int XBell(\n    Display*\t\t/* display */,\n    int\t\t\t/* percent */\n);\n\nextern int XBitmapBitOrder(\n    Display*\t\t/* display */\n);\n\nextern int XBitmapPad(\n    Display*\t\t/* display */\n);\n\nextern int XBitmapUnit(\n    Display*\t\t/* display */\n);\n\nextern int XCellsOfScreen(\n    Screen*\t\t/* screen */\n);\n\nextern int XChangeActivePointerGrab(\n    Display*\t\t/* display */,\n    unsigned int\t/* event_mask */,\n    Cursor\t\t/* cursor */,\n    Time\t\t/* time */\n);\n\nextern int XChangeGC(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    unsigned long\t/* valuemask */,\n    XGCValues*\t\t/* values */\n);\n\nextern int XChangeKeyboardControl(\n    Display*\t\t/* display */,\n    unsigned long\t/* value_mask */,\n    XKeyboardControl*\t/* values */\n);\n\nextern int XChangeKeyboardMapping(\n    Display*\t\t/* display */,\n    int\t\t\t/* first_keycode */,\n    int\t\t\t/* keysyms_per_keycode */,\n    KeySym*\t\t/* keysyms */,\n    int\t\t\t/* num_codes */\n);\n\nextern int XChangePointerControl(\n    Display*\t\t/* display */,\n    Bool\t\t/* do_accel */,\n    Bool\t\t/* do_threshold */,\n    int\t\t\t/* accel_numerator */,\n    int\t\t\t/* accel_denominator */,\n    int\t\t\t/* threshold */\n);\n\nextern int XChangeProperty(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Atom\t\t/* property */,\n    Atom\t\t/* type */,\n    int\t\t\t/* format */,\n    int\t\t\t/* mode */,\n    _Xconst unsigned char*\t/* data */,\n    int\t\t\t/* nelements */\n);\n\nextern int XChangeSaveSet(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    int\t\t\t/* change_mode */\n);\n\nextern int XChangeWindowAttributes(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    unsigned long\t/* valuemask */,\n    XSetWindowAttributes* /* attributes */\n);\n\nextern Bool XCheckIfEvent(\n    Display*\t\t/* display */,\n    XEvent*\t\t/* event_return */,\n    Bool (*) (\n\t       Display*\t\t\t/* display */,\n               XEvent*\t\t\t/* event */,\n               XPointer\t\t\t/* arg */\n             )\t\t/* predicate */,\n    XPointer\t\t/* arg */\n);\n\nextern Bool XCheckMaskEvent(\n    Display*\t\t/* display */,\n    long\t\t/* event_mask */,\n    XEvent*\t\t/* event_return */\n);\n\nextern Bool XCheckTypedEvent(\n    Display*\t\t/* display */,\n    int\t\t\t/* event_type */,\n    XEvent*\t\t/* event_return */\n);\n\nextern Bool XCheckTypedWindowEvent(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    int\t\t\t/* event_type */,\n    XEvent*\t\t/* event_return */\n);\n\nextern Bool XCheckWindowEvent(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    long\t\t/* event_mask */,\n    XEvent*\t\t/* event_return */\n);\n\nextern int XCirculateSubwindows(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    int\t\t\t/* direction */\n);\n\nextern int XCirculateSubwindowsDown(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern int XCirculateSubwindowsUp(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern int XClearArea(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    Bool\t\t/* exposures */\n);\n\nextern int XClearWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern int XCloseDisplay(\n    Display*\t\t/* display */\n);\n\nextern int XConfigureWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    unsigned int\t/* value_mask */,\n    XWindowChanges*\t/* values */\n);\n\nextern int XConnectionNumber(\n    Display*\t\t/* display */\n);\n\nextern int XConvertSelection(\n    Display*\t\t/* display */,\n    Atom\t\t/* selection */,\n    Atom \t\t/* target */,\n    Atom\t\t/* property */,\n    Window\t\t/* requestor */,\n    Time\t\t/* time */\n);\n\nextern int XCopyArea(\n    Display*\t\t/* display */,\n    Drawable\t\t/* src */,\n    Drawable\t\t/* dest */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* src_x */,\n    int\t\t\t/* src_y */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    int\t\t\t/* dest_x */,\n    int\t\t\t/* dest_y */\n);\n\nextern int XCopyGC(\n    Display*\t\t/* display */,\n    GC\t\t\t/* src */,\n    unsigned long\t/* valuemask */,\n    GC\t\t\t/* dest */\n);\n\nextern int XCopyPlane(\n    Display*\t\t/* display */,\n    Drawable\t\t/* src */,\n    Drawable\t\t/* dest */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* src_x */,\n    int\t\t\t/* src_y */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    int\t\t\t/* dest_x */,\n    int\t\t\t/* dest_y */,\n    unsigned long\t/* plane */\n);\n\nextern int XDefaultDepth(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */\n);\n\nextern int XDefaultDepthOfScreen(\n    Screen*\t\t/* screen */\n);\n\nextern int XDefaultScreen(\n    Display*\t\t/* display */\n);\n\nextern int XDefineCursor(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Cursor\t\t/* cursor */\n);\n\nextern int XDeleteProperty(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Atom\t\t/* property */\n);\n\nextern int XDestroyWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern int XDestroySubwindows(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern int XDoesBackingStore(\n    Screen*\t\t/* screen */\n);\n\nextern Bool XDoesSaveUnders(\n    Screen*\t\t/* screen */\n);\n\nextern int XDisableAccessControl(\n    Display*\t\t/* display */\n);\n\n\nextern int XDisplayCells(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */\n);\n\nextern int XDisplayHeight(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */\n);\n\nextern int XDisplayHeightMM(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */\n);\n\nextern int XDisplayKeycodes(\n    Display*\t\t/* display */,\n    int*\t\t/* min_keycodes_return */,\n    int*\t\t/* max_keycodes_return */\n);\n\nextern int XDisplayPlanes(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */\n);\n\nextern int XDisplayWidth(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */\n);\n\nextern int XDisplayWidthMM(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */\n);\n\nextern int XDrawArc(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    int\t\t\t/* angle1 */,\n    int\t\t\t/* angle2 */\n);\n\nextern int XDrawArcs(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    XArc*\t\t/* arcs */,\n    int\t\t\t/* narcs */\n);\n\nextern int XDrawImageString(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    _Xconst char*\t/* string */,\n    int\t\t\t/* length */\n);\n\nextern int XDrawImageString16(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    _Xconst XChar2b*\t/* string */,\n    int\t\t\t/* length */\n);\n\nextern int XDrawLine(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x1 */,\n    int\t\t\t/* y1 */,\n    int\t\t\t/* x2 */,\n    int\t\t\t/* y2 */\n);\n\nextern int XDrawLines(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    XPoint*\t\t/* points */,\n    int\t\t\t/* npoints */,\n    int\t\t\t/* mode */\n);\n\nextern int XDrawPoint(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */\n);\n\nextern int XDrawPoints(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    XPoint*\t\t/* points */,\n    int\t\t\t/* npoints */,\n    int\t\t\t/* mode */\n);\n\nextern int XDrawRectangle(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */\n);\n\nextern int XDrawRectangles(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    XRectangle*\t\t/* rectangles */,\n    int\t\t\t/* nrectangles */\n);\n\nextern int XDrawSegments(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    XSegment*\t\t/* segments */,\n    int\t\t\t/* nsegments */\n);\n\nextern int XDrawString(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    _Xconst char*\t/* string */,\n    int\t\t\t/* length */\n);\n\nextern int XDrawString16(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    _Xconst XChar2b*\t/* string */,\n    int\t\t\t/* length */\n);\n\nextern int XDrawText(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    XTextItem*\t\t/* items */,\n    int\t\t\t/* nitems */\n);\n\nextern int XDrawText16(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    XTextItem16*\t/* items */,\n    int\t\t\t/* nitems */\n);\n\nextern int XEnableAccessControl(\n    Display*\t\t/* display */\n);\n\nextern int XEventsQueued(\n    Display*\t\t/* display */,\n    int\t\t\t/* mode */\n);\n\nextern Status XFetchName(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    char**\t\t/* window_name_return */\n);\n\nextern int XFillArc(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    int\t\t\t/* angle1 */,\n    int\t\t\t/* angle2 */\n);\n\nextern int XFillArcs(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    XArc*\t\t/* arcs */,\n    int\t\t\t/* narcs */\n);\n\nextern int XFillPolygon(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    XPoint*\t\t/* points */,\n    int\t\t\t/* npoints */,\n    int\t\t\t/* shape */,\n    int\t\t\t/* mode */\n);\n\nextern int XFillRectangle(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */\n);\n\nextern int XFillRectangles(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    XRectangle*\t\t/* rectangles */,\n    int\t\t\t/* nrectangles */\n);\n\nextern int XFlush(\n    Display*\t\t/* display */\n);\n\nextern int XForceScreenSaver(\n    Display*\t\t/* display */,\n    int\t\t\t/* mode */\n);\n\nextern int XFree(\n    void*\t\t/* data */\n);\n\nextern int XFreeColormap(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */\n);\n\nextern int XFreeColors(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */,\n    unsigned long*\t/* pixels */,\n    int\t\t\t/* npixels */,\n    unsigned long\t/* planes */\n);\n\nextern int XFreeCursor(\n    Display*\t\t/* display */,\n    Cursor\t\t/* cursor */\n);\n\nextern int XFreeExtensionList(\n    char**\t\t/* list */\n);\n\nextern int XFreeFont(\n    Display*\t\t/* display */,\n    XFontStruct*\t/* font_struct */\n);\n\nextern int XFreeFontInfo(\n    char**\t\t/* names */,\n    XFontStruct*\t/* free_info */,\n    int\t\t\t/* actual_count */\n);\n\nextern int XFreeFontNames(\n    char**\t\t/* list */\n);\n\nextern int XFreeFontPath(\n    char**\t\t/* list */\n);\n\nextern int XFreeGC(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */\n);\n\nextern int XFreeModifiermap(\n    XModifierKeymap*\t/* modmap */\n);\n\nextern int XFreePixmap(\n    Display*\t\t/* display */,\n    Pixmap\t\t/* pixmap */\n);\n\nextern int XGeometry(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen */,\n    _Xconst char*\t/* position */,\n    _Xconst char*\t/* default_position */,\n    unsigned int\t/* bwidth */,\n    unsigned int\t/* fwidth */,\n    unsigned int\t/* fheight */,\n    int\t\t\t/* xadder */,\n    int\t\t\t/* yadder */,\n    int*\t\t/* x_return */,\n    int*\t\t/* y_return */,\n    int*\t\t/* width_return */,\n    int*\t\t/* height_return */\n);\n\nextern int XGetErrorDatabaseText(\n    Display*\t\t/* display */,\n    _Xconst char*\t/* name */,\n    _Xconst char*\t/* message */,\n    _Xconst char*\t/* default_string */,\n    char*\t\t/* buffer_return */,\n    int\t\t\t/* length */\n);\n\nextern int XGetErrorText(\n    Display*\t\t/* display */,\n    int\t\t\t/* code */,\n    char*\t\t/* buffer_return */,\n    int\t\t\t/* length */\n);\n\nextern Bool XGetFontProperty(\n    XFontStruct*\t/* font_struct */,\n    Atom\t\t/* atom */,\n    unsigned long*\t/* value_return */\n);\n\nextern Status XGetGCValues(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    unsigned long\t/* valuemask */,\n    XGCValues*\t\t/* values_return */\n);\n\nextern Status XGetGeometry(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    Window*\t\t/* root_return */,\n    int*\t\t/* x_return */,\n    int*\t\t/* y_return */,\n    unsigned int*\t/* width_return */,\n    unsigned int*\t/* height_return */,\n    unsigned int*\t/* border_width_return */,\n    unsigned int*\t/* depth_return */\n);\n\nextern Status XGetIconName(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    char**\t\t/* icon_name_return */\n);\n\nextern int XGetInputFocus(\n    Display*\t\t/* display */,\n    Window*\t\t/* focus_return */,\n    int*\t\t/* revert_to_return */\n);\n\nextern int XGetKeyboardControl(\n    Display*\t\t/* display */,\n    XKeyboardState*\t/* values_return */\n);\n\nextern int XGetPointerControl(\n    Display*\t\t/* display */,\n    int*\t\t/* accel_numerator_return */,\n    int*\t\t/* accel_denominator_return */,\n    int*\t\t/* threshold_return */\n);\n\nextern int XGetPointerMapping(\n    Display*\t\t/* display */,\n    unsigned char*\t/* map_return */,\n    int\t\t\t/* nmap */\n);\n\nextern int XGetScreenSaver(\n    Display*\t\t/* display */,\n    int*\t\t/* timeout_return */,\n    int*\t\t/* interval_return */,\n    int*\t\t/* prefer_blanking_return */,\n    int*\t\t/* allow_exposures_return */\n);\n\nextern Status XGetTransientForHint(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Window*\t\t/* prop_window_return */\n);\n\nextern int XGetWindowProperty(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Atom\t\t/* property */,\n    long\t\t/* long_offset */,\n    long\t\t/* long_length */,\n    Bool\t\t/* delete */,\n    Atom\t\t/* req_type */,\n    Atom*\t\t/* actual_type_return */,\n    int*\t\t/* actual_format_return */,\n    unsigned long*\t/* nitems_return */,\n    unsigned long*\t/* bytes_after_return */,\n    unsigned char**\t/* prop_return */\n);\n\nextern Status XGetWindowAttributes(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XWindowAttributes*\t/* window_attributes_return */\n);\n\nextern int XGrabButton(\n    Display*\t\t/* display */,\n    unsigned int\t/* button */,\n    unsigned int\t/* modifiers */,\n    Window\t\t/* grab_window */,\n    Bool\t\t/* owner_events */,\n    unsigned int\t/* event_mask */,\n    int\t\t\t/* pointer_mode */,\n    int\t\t\t/* keyboard_mode */,\n    Window\t\t/* confine_to */,\n    Cursor\t\t/* cursor */\n);\n\nextern int XGrabKey(\n    Display*\t\t/* display */,\n    int\t\t\t/* keycode */,\n    unsigned int\t/* modifiers */,\n    Window\t\t/* grab_window */,\n    Bool\t\t/* owner_events */,\n    int\t\t\t/* pointer_mode */,\n    int\t\t\t/* keyboard_mode */\n);\n\nextern int XGrabKeyboard(\n    Display*\t\t/* display */,\n    Window\t\t/* grab_window */,\n    Bool\t\t/* owner_events */,\n    int\t\t\t/* pointer_mode */,\n    int\t\t\t/* keyboard_mode */,\n    Time\t\t/* time */\n);\n\nextern int XGrabPointer(\n    Display*\t\t/* display */,\n    Window\t\t/* grab_window */,\n    Bool\t\t/* owner_events */,\n    unsigned int\t/* event_mask */,\n    int\t\t\t/* pointer_mode */,\n    int\t\t\t/* keyboard_mode */,\n    Window\t\t/* confine_to */,\n    Cursor\t\t/* cursor */,\n    Time\t\t/* time */\n);\n\nextern int XGrabServer(\n    Display*\t\t/* display */\n);\n\nextern int XHeightMMOfScreen(\n    Screen*\t\t/* screen */\n);\n\nextern int XHeightOfScreen(\n    Screen*\t\t/* screen */\n);\n\nextern int XIfEvent(\n    Display*\t\t/* display */,\n    XEvent*\t\t/* event_return */,\n    Bool (*) (\n\t       Display*\t\t\t/* display */,\n               XEvent*\t\t\t/* event */,\n               XPointer\t\t\t/* arg */\n             )\t\t/* predicate */,\n    XPointer\t\t/* arg */\n);\n\nextern int XImageByteOrder(\n    Display*\t\t/* display */\n);\n\nextern int XInstallColormap(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */\n);\n\nextern KeyCode XKeysymToKeycode(\n    Display*\t\t/* display */,\n    KeySym\t\t/* keysym */\n);\n\nextern int XKillClient(\n    Display*\t\t/* display */,\n    XID\t\t\t/* resource */\n);\n\nextern Status XLookupColor(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */,\n    _Xconst char*\t/* color_name */,\n    XColor*\t\t/* exact_def_return */,\n    XColor*\t\t/* screen_def_return */\n);\n\nextern int XLowerWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern int XMapRaised(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern int XMapSubwindows(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern int XMapWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern int XMaskEvent(\n    Display*\t\t/* display */,\n    long\t\t/* event_mask */,\n    XEvent*\t\t/* event_return */\n);\n\nextern int XMaxCmapsOfScreen(\n    Screen*\t\t/* screen */\n);\n\nextern int XMinCmapsOfScreen(\n    Screen*\t\t/* screen */\n);\n\nextern int XMoveResizeWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */\n);\n\nextern int XMoveWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */\n);\n\nextern int XNextEvent(\n    Display*\t\t/* display */,\n    XEvent*\t\t/* event_return */\n);\n\nextern int XNoOp(\n    Display*\t\t/* display */\n);\n\nextern Status XParseColor(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */,\n    _Xconst char*\t/* spec */,\n    XColor*\t\t/* exact_def_return */\n);\n\nextern int XParseGeometry(\n    _Xconst char*\t/* parsestring */,\n    int*\t\t/* x_return */,\n    int*\t\t/* y_return */,\n    unsigned int*\t/* width_return */,\n    unsigned int*\t/* height_return */\n);\n\nextern int XPeekEvent(\n    Display*\t\t/* display */,\n    XEvent*\t\t/* event_return */\n);\n\nextern int XPeekIfEvent(\n    Display*\t\t/* display */,\n    XEvent*\t\t/* event_return */,\n    Bool (*) (\n\t       Display*\t\t/* display */,\n               XEvent*\t\t/* event */,\n               XPointer\t\t/* arg */\n             )\t\t/* predicate */,\n    XPointer\t\t/* arg */\n);\n\nextern int XPending(\n    Display*\t\t/* display */\n);\n\nextern int XPlanesOfScreen(\n    Screen*\t\t/* screen */\n);\n\nextern int XProtocolRevision(\n    Display*\t\t/* display */\n);\n\nextern int XProtocolVersion(\n    Display*\t\t/* display */\n);\n\n\nextern int XPutBackEvent(\n    Display*\t\t/* display */,\n    XEvent*\t\t/* event */\n);\n\nextern int XPutImage(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    XImage*\t\t/* image */,\n    int\t\t\t/* src_x */,\n    int\t\t\t/* src_y */,\n    int\t\t\t/* dest_x */,\n    int\t\t\t/* dest_y */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */\n);\n\nextern int XQLength(\n    Display*\t\t/* display */\n);\n\nextern Status XQueryBestCursor(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    unsigned int        /* width */,\n    unsigned int\t/* height */,\n    unsigned int*\t/* width_return */,\n    unsigned int*\t/* height_return */\n);\n\nextern Status XQueryBestSize(\n    Display*\t\t/* display */,\n    int\t\t\t/* class */,\n    Drawable\t\t/* which_screen */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    unsigned int*\t/* width_return */,\n    unsigned int*\t/* height_return */\n);\n\nextern Status XQueryBestStipple(\n    Display*\t\t/* display */,\n    Drawable\t\t/* which_screen */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    unsigned int*\t/* width_return */,\n    unsigned int*\t/* height_return */\n);\n\nextern Status XQueryBestTile(\n    Display*\t\t/* display */,\n    Drawable\t\t/* which_screen */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    unsigned int*\t/* width_return */,\n    unsigned int*\t/* height_return */\n);\n\nextern int XQueryColor(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */,\n    XColor*\t\t/* def_in_out */\n);\n\nextern int XQueryColors(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */,\n    XColor*\t\t/* defs_in_out */,\n    int\t\t\t/* ncolors */\n);\n\nextern Bool XQueryExtension(\n    Display*\t\t/* display */,\n    _Xconst char*\t/* name */,\n    int*\t\t/* major_opcode_return */,\n    int*\t\t/* first_event_return */,\n    int*\t\t/* first_error_return */\n);\n\nextern int XQueryKeymap(\n    Display*\t\t/* display */,\n    char [32]\t\t/* keys_return */\n);\n\nextern Bool XQueryPointer(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Window*\t\t/* root_return */,\n    Window*\t\t/* child_return */,\n    int*\t\t/* root_x_return */,\n    int*\t\t/* root_y_return */,\n    int*\t\t/* win_x_return */,\n    int*\t\t/* win_y_return */,\n    unsigned int*       /* mask_return */\n);\n\nextern int XQueryTextExtents(\n    Display*\t\t/* display */,\n    XID\t\t\t/* font_ID */,\n    _Xconst char*\t/* string */,\n    int\t\t\t/* nchars */,\n    int*\t\t/* direction_return */,\n    int*\t\t/* font_ascent_return */,\n    int*\t\t/* font_descent_return */,\n    XCharStruct*\t/* overall_return */\n);\n\nextern int XQueryTextExtents16(\n    Display*\t\t/* display */,\n    XID\t\t\t/* font_ID */,\n    _Xconst XChar2b*\t/* string */,\n    int\t\t\t/* nchars */,\n    int*\t\t/* direction_return */,\n    int*\t\t/* font_ascent_return */,\n    int*\t\t/* font_descent_return */,\n    XCharStruct*\t/* overall_return */\n);\n\nextern Status XQueryTree(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Window*\t\t/* root_return */,\n    Window*\t\t/* parent_return */,\n    Window**\t\t/* children_return */,\n    unsigned int*\t/* nchildren_return */\n);\n\nextern int XRaiseWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern int XReadBitmapFile(\n    Display*\t\t/* display */,\n    Drawable \t\t/* d */,\n    _Xconst char*\t/* filename */,\n    unsigned int*\t/* width_return */,\n    unsigned int*\t/* height_return */,\n    Pixmap*\t\t/* bitmap_return */,\n    int*\t\t/* x_hot_return */,\n    int*\t\t/* y_hot_return */\n);\n\nextern int XReadBitmapFileData(\n    _Xconst char*\t/* filename */,\n    unsigned int*\t/* width_return */,\n    unsigned int*\t/* height_return */,\n    unsigned char**\t/* data_return */,\n    int*\t\t/* x_hot_return */,\n    int*\t\t/* y_hot_return */\n);\n\nextern int XRebindKeysym(\n    Display*\t\t/* display */,\n    KeySym\t\t/* keysym */,\n    KeySym*\t\t/* list */,\n    int\t\t\t/* mod_count */,\n    _Xconst unsigned char*\t/* string */,\n    int\t\t\t/* bytes_string */\n);\n\nextern int XRecolorCursor(\n    Display*\t\t/* display */,\n    Cursor\t\t/* cursor */,\n    XColor*\t\t/* foreground_color */,\n    XColor*\t\t/* background_color */\n);\n\nextern int XRefreshKeyboardMapping(\n    XMappingEvent*\t/* event_map */\n);\n\nextern int XRemoveFromSaveSet(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern int XRemoveHost(\n    Display*\t\t/* display */,\n    XHostAddress*\t/* host */\n);\n\nextern int XRemoveHosts(\n    Display*\t\t/* display */,\n    XHostAddress*\t/* hosts */,\n    int\t\t\t/* num_hosts */\n);\n\nextern int XReparentWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Window\t\t/* parent */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */\n);\n\nextern int XResetScreenSaver(\n    Display*\t\t/* display */\n);\n\nextern int XResizeWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */\n);\n\nextern int XRestackWindows(\n    Display*\t\t/* display */,\n    Window*\t\t/* windows */,\n    int\t\t\t/* nwindows */\n);\n\nextern int XRotateBuffers(\n    Display*\t\t/* display */,\n    int\t\t\t/* rotate */\n);\n\nextern int XRotateWindowProperties(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Atom*\t\t/* properties */,\n    int\t\t\t/* num_prop */,\n    int\t\t\t/* npositions */\n);\n\nextern int XScreenCount(\n    Display*\t\t/* display */\n);\n\nextern int XSelectInput(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    long\t\t/* event_mask */\n);\n\nextern Status XSendEvent(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Bool\t\t/* propagate */,\n    long\t\t/* event_mask */,\n    XEvent*\t\t/* event_send */\n);\n\nextern int XSetAccessControl(\n    Display*\t\t/* display */,\n    int\t\t\t/* mode */\n);\n\nextern int XSetArcMode(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* arc_mode */\n);\n\nextern int XSetBackground(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    unsigned long\t/* background */\n);\n\nextern int XSetClipMask(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    Pixmap\t\t/* pixmap */\n);\n\nextern int XSetClipOrigin(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* clip_x_origin */,\n    int\t\t\t/* clip_y_origin */\n);\n\nextern int XSetClipRectangles(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* clip_x_origin */,\n    int\t\t\t/* clip_y_origin */,\n    XRectangle*\t\t/* rectangles */,\n    int\t\t\t/* n */,\n    int\t\t\t/* ordering */\n);\n\nextern int XSetCloseDownMode(\n    Display*\t\t/* display */,\n    int\t\t\t/* close_mode */\n);\n\nextern int XSetCommand(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    char**\t\t/* argv */,\n    int\t\t\t/* argc */\n);\n\nextern int XSetDashes(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* dash_offset */,\n    _Xconst char*\t/* dash_list */,\n    int\t\t\t/* n */\n);\n\nextern int XSetFillRule(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* fill_rule */\n);\n\nextern int XSetFillStyle(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* fill_style */\n);\n\nextern int XSetFont(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    Font\t\t/* font */\n);\n\nextern int XSetFontPath(\n    Display*\t\t/* display */,\n    char**\t\t/* directories */,\n    int\t\t\t/* ndirs */\n);\n\nextern int XSetForeground(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    unsigned long\t/* foreground */\n);\n\nextern int XSetFunction(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* function */\n);\n\nextern int XSetGraphicsExposures(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    Bool\t\t/* graphics_exposures */\n);\n\nextern int XSetIconName(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    _Xconst char*\t/* icon_name */\n);\n\nextern int XSetInputFocus(\n    Display*\t\t/* display */,\n    Window\t\t/* focus */,\n    int\t\t\t/* revert_to */,\n    Time\t\t/* time */\n);\n\nextern int XSetLineAttributes(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    unsigned int\t/* line_width */,\n    int\t\t\t/* line_style */,\n    int\t\t\t/* cap_style */,\n    int\t\t\t/* join_style */\n);\n\nextern int XSetModifierMapping(\n    Display*\t\t/* display */,\n    XModifierKeymap*\t/* modmap */\n);\n\nextern int XSetPlaneMask(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    unsigned long\t/* plane_mask */\n);\n\nextern int XSetPointerMapping(\n    Display*\t\t/* display */,\n    _Xconst unsigned char*\t/* map */,\n    int\t\t\t/* nmap */\n);\n\nextern int XSetScreenSaver(\n    Display*\t\t/* display */,\n    int\t\t\t/* timeout */,\n    int\t\t\t/* interval */,\n    int\t\t\t/* prefer_blanking */,\n    int\t\t\t/* allow_exposures */\n);\n\nextern int XSetSelectionOwner(\n    Display*\t\t/* display */,\n    Atom\t        /* selection */,\n    Window\t\t/* owner */,\n    Time\t\t/* time */\n);\n\nextern int XSetState(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    unsigned long \t/* foreground */,\n    unsigned long\t/* background */,\n    int\t\t\t/* function */,\n    unsigned long\t/* plane_mask */\n);\n\nextern int XSetStipple(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    Pixmap\t\t/* stipple */\n);\n\nextern int XSetSubwindowMode(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* subwindow_mode */\n);\n\nextern int XSetTSOrigin(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* ts_x_origin */,\n    int\t\t\t/* ts_y_origin */\n);\n\nextern int XSetTile(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    Pixmap\t\t/* tile */\n);\n\nextern int XSetWindowBackground(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    unsigned long\t/* background_pixel */\n);\n\nextern int XSetWindowBackgroundPixmap(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Pixmap\t\t/* background_pixmap */\n);\n\nextern int XSetWindowBorder(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    unsigned long\t/* border_pixel */\n);\n\nextern int XSetWindowBorderPixmap(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Pixmap\t\t/* border_pixmap */\n);\n\nextern int XSetWindowBorderWidth(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    unsigned int\t/* width */\n);\n\nextern int XSetWindowColormap(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    Colormap\t\t/* colormap */\n);\n\nextern int XStoreBuffer(\n    Display*\t\t/* display */,\n    _Xconst char*\t/* bytes */,\n    int\t\t\t/* nbytes */,\n    int\t\t\t/* buffer */\n);\n\nextern int XStoreBytes(\n    Display*\t\t/* display */,\n    _Xconst char*\t/* bytes */,\n    int\t\t\t/* nbytes */\n);\n\nextern int XStoreColor(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */,\n    XColor*\t\t/* color */\n);\n\nextern int XStoreColors(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */,\n    XColor*\t\t/* color */,\n    int\t\t\t/* ncolors */\n);\n\nextern int XStoreName(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    _Xconst char*\t/* window_name */\n);\n\nextern int XStoreNamedColor(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */,\n    _Xconst char*\t/* color */,\n    unsigned long\t/* pixel */,\n    int\t\t\t/* flags */\n);\n\nextern int XSync(\n    Display*\t\t/* display */,\n    Bool\t\t/* discard */\n);\n\nextern int XTextExtents(\n    XFontStruct*\t/* font_struct */,\n    _Xconst char*\t/* string */,\n    int\t\t\t/* nchars */,\n    int*\t\t/* direction_return */,\n    int*\t\t/* font_ascent_return */,\n    int*\t\t/* font_descent_return */,\n    XCharStruct*\t/* overall_return */\n);\n\nextern int XTextExtents16(\n    XFontStruct*\t/* font_struct */,\n    _Xconst XChar2b*\t/* string */,\n    int\t\t\t/* nchars */,\n    int*\t\t/* direction_return */,\n    int*\t\t/* font_ascent_return */,\n    int*\t\t/* font_descent_return */,\n    XCharStruct*\t/* overall_return */\n);\n\nextern int XTextWidth(\n    XFontStruct*\t/* font_struct */,\n    _Xconst char*\t/* string */,\n    int\t\t\t/* count */\n);\n\nextern int XTextWidth16(\n    XFontStruct*\t/* font_struct */,\n    _Xconst XChar2b*\t/* string */,\n    int\t\t\t/* count */\n);\n\nextern Bool XTranslateCoordinates(\n    Display*\t\t/* display */,\n    Window\t\t/* src_w */,\n    Window\t\t/* dest_w */,\n    int\t\t\t/* src_x */,\n    int\t\t\t/* src_y */,\n    int*\t\t/* dest_x_return */,\n    int*\t\t/* dest_y_return */,\n    Window*\t\t/* child_return */\n);\n\nextern int XUndefineCursor(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern int XUngrabButton(\n    Display*\t\t/* display */,\n    unsigned int\t/* button */,\n    unsigned int\t/* modifiers */,\n    Window\t\t/* grab_window */\n);\n\nextern int XUngrabKey(\n    Display*\t\t/* display */,\n    int\t\t\t/* keycode */,\n    unsigned int\t/* modifiers */,\n    Window\t\t/* grab_window */\n);\n\nextern int XUngrabKeyboard(\n    Display*\t\t/* display */,\n    Time\t\t/* time */\n);\n\nextern int XUngrabPointer(\n    Display*\t\t/* display */,\n    Time\t\t/* time */\n);\n\nextern int XUngrabServer(\n    Display*\t\t/* display */\n);\n\nextern int XUninstallColormap(\n    Display*\t\t/* display */,\n    Colormap\t\t/* colormap */\n);\n\nextern int XUnloadFont(\n    Display*\t\t/* display */,\n    Font\t\t/* font */\n);\n\nextern int XUnmapSubwindows(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern int XUnmapWindow(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern int XVendorRelease(\n    Display*\t\t/* display */\n);\n\nextern int XWarpPointer(\n    Display*\t\t/* display */,\n    Window\t\t/* src_w */,\n    Window\t\t/* dest_w */,\n    int\t\t\t/* src_x */,\n    int\t\t\t/* src_y */,\n    unsigned int\t/* src_width */,\n    unsigned int\t/* src_height */,\n    int\t\t\t/* dest_x */,\n    int\t\t\t/* dest_y */\n);\n\nextern int XWidthMMOfScreen(\n    Screen*\t\t/* screen */\n);\n\nextern int XWidthOfScreen(\n    Screen*\t\t/* screen */\n);\n\nextern int XWindowEvent(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    long\t\t/* event_mask */,\n    XEvent*\t\t/* event_return */\n);\n\nextern int XWriteBitmapFile(\n    Display*\t\t/* display */,\n    _Xconst char*\t/* filename */,\n    Pixmap\t\t/* bitmap */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */,\n    int\t\t\t/* x_hot */,\n    int\t\t\t/* y_hot */\n);\n\nextern Bool XSupportsLocale (void);\n\nextern char *XSetLocaleModifiers(\n    const char*\t\t/* modifier_list */\n);\n\nextern XOM XOpenOM(\n    Display*\t\t\t/* display */,\n    struct _XrmHashBucketRec*\t/* rdb */,\n    _Xconst char*\t\t/* res_name */,\n    _Xconst char*\t\t/* res_class */\n);\n\nextern Status XCloseOM(\n    XOM\t\t\t/* om */\n);\n\nextern char *XSetOMValues(\n    XOM\t\t\t/* om */,\n    ...\n) _X_SENTINEL(0);\n\nextern char *XGetOMValues(\n    XOM\t\t\t/* om */,\n    ...\n) _X_SENTINEL(0);\n\nextern Display *XDisplayOfOM(\n    XOM\t\t\t/* om */\n);\n\nextern char *XLocaleOfOM(\n    XOM\t\t\t/* om */\n);\n\nextern XOC XCreateOC(\n    XOM\t\t\t/* om */,\n    ...\n) _X_SENTINEL(0);\n\nextern void XDestroyOC(\n    XOC\t\t\t/* oc */\n);\n\nextern XOM XOMOfOC(\n    XOC\t\t\t/* oc */\n);\n\nextern char *XSetOCValues(\n    XOC\t\t\t/* oc */,\n    ...\n) _X_SENTINEL(0);\n\nextern char *XGetOCValues(\n    XOC\t\t\t/* oc */,\n    ...\n) _X_SENTINEL(0);\n\nextern XFontSet XCreateFontSet(\n    Display*\t\t/* display */,\n    _Xconst char*\t/* base_font_name_list */,\n    char***\t\t/* missing_charset_list */,\n    int*\t\t/* missing_charset_count */,\n    char**\t\t/* def_string */\n);\n\nextern void XFreeFontSet(\n    Display*\t\t/* display */,\n    XFontSet\t\t/* font_set */\n);\n\nextern int XFontsOfFontSet(\n    XFontSet\t\t/* font_set */,\n    XFontStruct***\t/* font_struct_list */,\n    char***\t\t/* font_name_list */\n);\n\nextern char *XBaseFontNameListOfFontSet(\n    XFontSet\t\t/* font_set */\n);\n\nextern char *XLocaleOfFontSet(\n    XFontSet\t\t/* font_set */\n);\n\nextern Bool XContextDependentDrawing(\n    XFontSet\t\t/* font_set */\n);\n\nextern Bool XDirectionalDependentDrawing(\n    XFontSet\t\t/* font_set */\n);\n\nextern Bool XContextualDrawing(\n    XFontSet\t\t/* font_set */\n);\n\nextern XFontSetExtents *XExtentsOfFontSet(\n    XFontSet\t\t/* font_set */\n);\n\nextern int XmbTextEscapement(\n    XFontSet\t\t/* font_set */,\n    _Xconst char*\t/* text */,\n    int\t\t\t/* bytes_text */\n);\n\nextern int XwcTextEscapement(\n    XFontSet\t\t/* font_set */,\n    _Xconst wchar_t*\t/* text */,\n    int\t\t\t/* num_wchars */\n);\n\nextern int Xutf8TextEscapement(\n    XFontSet\t\t/* font_set */,\n    _Xconst char*\t/* text */,\n    int\t\t\t/* bytes_text */\n);\n\nextern int XmbTextExtents(\n    XFontSet\t\t/* font_set */,\n    _Xconst char*\t/* text */,\n    int\t\t\t/* bytes_text */,\n    XRectangle*\t\t/* overall_ink_return */,\n    XRectangle*\t\t/* overall_logical_return */\n);\n\nextern int XwcTextExtents(\n    XFontSet\t\t/* font_set */,\n    _Xconst wchar_t*\t/* text */,\n    int\t\t\t/* num_wchars */,\n    XRectangle*\t\t/* overall_ink_return */,\n    XRectangle*\t\t/* overall_logical_return */\n);\n\nextern int Xutf8TextExtents(\n    XFontSet\t\t/* font_set */,\n    _Xconst char*\t/* text */,\n    int\t\t\t/* bytes_text */,\n    XRectangle*\t\t/* overall_ink_return */,\n    XRectangle*\t\t/* overall_logical_return */\n);\n\nextern Status XmbTextPerCharExtents(\n    XFontSet\t\t/* font_set */,\n    _Xconst char*\t/* text */,\n    int\t\t\t/* bytes_text */,\n    XRectangle*\t\t/* ink_extents_buffer */,\n    XRectangle*\t\t/* logical_extents_buffer */,\n    int\t\t\t/* buffer_size */,\n    int*\t\t/* num_chars */,\n    XRectangle*\t\t/* overall_ink_return */,\n    XRectangle*\t\t/* overall_logical_return */\n);\n\nextern Status XwcTextPerCharExtents(\n    XFontSet\t\t/* font_set */,\n    _Xconst wchar_t*\t/* text */,\n    int\t\t\t/* num_wchars */,\n    XRectangle*\t\t/* ink_extents_buffer */,\n    XRectangle*\t\t/* logical_extents_buffer */,\n    int\t\t\t/* buffer_size */,\n    int*\t\t/* num_chars */,\n    XRectangle*\t\t/* overall_ink_return */,\n    XRectangle*\t\t/* overall_logical_return */\n);\n\nextern Status Xutf8TextPerCharExtents(\n    XFontSet\t\t/* font_set */,\n    _Xconst char*\t/* text */,\n    int\t\t\t/* bytes_text */,\n    XRectangle*\t\t/* ink_extents_buffer */,\n    XRectangle*\t\t/* logical_extents_buffer */,\n    int\t\t\t/* buffer_size */,\n    int*\t\t/* num_chars */,\n    XRectangle*\t\t/* overall_ink_return */,\n    XRectangle*\t\t/* overall_logical_return */\n);\n\nextern void XmbDrawText(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    XmbTextItem*\t/* text_items */,\n    int\t\t\t/* nitems */\n);\n\nextern void XwcDrawText(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    XwcTextItem*\t/* text_items */,\n    int\t\t\t/* nitems */\n);\n\nextern void Xutf8DrawText(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    XmbTextItem*\t/* text_items */,\n    int\t\t\t/* nitems */\n);\n\nextern void XmbDrawString(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    XFontSet\t\t/* font_set */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    _Xconst char*\t/* text */,\n    int\t\t\t/* bytes_text */\n);\n\nextern void XwcDrawString(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    XFontSet\t\t/* font_set */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    _Xconst wchar_t*\t/* text */,\n    int\t\t\t/* num_wchars */\n);\n\nextern void Xutf8DrawString(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    XFontSet\t\t/* font_set */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    _Xconst char*\t/* text */,\n    int\t\t\t/* bytes_text */\n);\n\nextern void XmbDrawImageString(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    XFontSet\t\t/* font_set */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    _Xconst char*\t/* text */,\n    int\t\t\t/* bytes_text */\n);\n\nextern void XwcDrawImageString(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    XFontSet\t\t/* font_set */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    _Xconst wchar_t*\t/* text */,\n    int\t\t\t/* num_wchars */\n);\n\nextern void Xutf8DrawImageString(\n    Display*\t\t/* display */,\n    Drawable\t\t/* d */,\n    XFontSet\t\t/* font_set */,\n    GC\t\t\t/* gc */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    _Xconst char*\t/* text */,\n    int\t\t\t/* bytes_text */\n);\n\nextern XIM XOpenIM(\n    Display*\t\t\t/* dpy */,\n    struct _XrmHashBucketRec*\t/* rdb */,\n    char*\t\t\t/* res_name */,\n    char*\t\t\t/* res_class */\n);\n\nextern Status XCloseIM(\n    XIM /* im */\n);\n\nextern char *XGetIMValues(\n    XIM /* im */, ...\n) _X_SENTINEL(0);\n\nextern char *XSetIMValues(\n    XIM /* im */, ...\n) _X_SENTINEL(0);\n\nextern Display *XDisplayOfIM(\n    XIM /* im */\n);\n\nextern char *XLocaleOfIM(\n    XIM /* im*/\n);\n\nextern XIC XCreateIC(\n    XIM /* im */, ...\n) _X_SENTINEL(0);\n\nextern void XDestroyIC(\n    XIC /* ic */\n);\n\nextern void XSetICFocus(\n    XIC /* ic */\n);\n\nextern void XUnsetICFocus(\n    XIC /* ic */\n);\n\nextern wchar_t *XwcResetIC(\n    XIC /* ic */\n);\n\nextern char *XmbResetIC(\n    XIC /* ic */\n);\n\nextern char *Xutf8ResetIC(\n    XIC /* ic */\n);\n\nextern char *XSetICValues(\n    XIC /* ic */, ...\n) _X_SENTINEL(0);\n\nextern char *XGetICValues(\n    XIC /* ic */, ...\n) _X_SENTINEL(0);\n\nextern XIM XIMOfIC(\n    XIC /* ic */\n);\n\nextern Bool XFilterEvent(\n    XEvent*\t/* event */,\n    Window\t/* window */\n);\n\nextern int XmbLookupString(\n    XIC\t\t\t/* ic */,\n    XKeyPressedEvent*\t/* event */,\n    char*\t\t/* buffer_return */,\n    int\t\t\t/* bytes_buffer */,\n    KeySym*\t\t/* keysym_return */,\n    Status*\t\t/* status_return */\n);\n\nextern int XwcLookupString(\n    XIC\t\t\t/* ic */,\n    XKeyPressedEvent*\t/* event */,\n    wchar_t*\t\t/* buffer_return */,\n    int\t\t\t/* wchars_buffer */,\n    KeySym*\t\t/* keysym_return */,\n    Status*\t\t/* status_return */\n);\n\nextern int Xutf8LookupString(\n    XIC\t\t\t/* ic */,\n    XKeyPressedEvent*\t/* event */,\n    char*\t\t/* buffer_return */,\n    int\t\t\t/* bytes_buffer */,\n    KeySym*\t\t/* keysym_return */,\n    Status*\t\t/* status_return */\n);\n\nextern XVaNestedList XVaCreateNestedList(\n    int /*unused*/, ...\n) _X_SENTINEL(0);\n\n/* internal connections for IMs */\n\nextern Bool XRegisterIMInstantiateCallback(\n    Display*\t\t\t/* dpy */,\n    struct _XrmHashBucketRec*\t/* rdb */,\n    char*\t\t\t/* res_name */,\n    char*\t\t\t/* res_class */,\n    XIDProc\t\t\t/* callback */,\n    XPointer\t\t\t/* client_data */\n);\n\nextern Bool XUnregisterIMInstantiateCallback(\n    Display*\t\t\t/* dpy */,\n    struct _XrmHashBucketRec*\t/* rdb */,\n    char*\t\t\t/* res_name */,\n    char*\t\t\t/* res_class */,\n    XIDProc\t\t\t/* callback */,\n    XPointer\t\t\t/* client_data */\n);\n\ntypedef void (*XConnectionWatchProc)(\n    Display*\t\t\t/* dpy */,\n    XPointer\t\t\t/* client_data */,\n    int\t\t\t\t/* fd */,\n    Bool\t\t\t/* opening */,\t /* open or close flag */\n    XPointer*\t\t\t/* watch_data */ /* open sets, close uses */\n);\n\n\nextern Status XInternalConnectionNumbers(\n    Display*\t\t\t/* dpy */,\n    int**\t\t\t/* fd_return */,\n    int*\t\t\t/* count_return */\n);\n\nextern void XProcessInternalConnection(\n    Display*\t\t\t/* dpy */,\n    int\t\t\t\t/* fd */\n);\n\nextern Status XAddConnectionWatch(\n    Display*\t\t\t/* dpy */,\n    XConnectionWatchProc\t/* callback */,\n    XPointer\t\t\t/* client_data */\n);\n\nextern void XRemoveConnectionWatch(\n    Display*\t\t\t/* dpy */,\n    XConnectionWatchProc\t/* callback */,\n    XPointer\t\t\t/* client_data */\n);\n\nextern void XSetAuthorization(\n    char *\t\t\t/* name */,\n    int\t\t\t\t/* namelen */,\n    char *\t\t\t/* data */,\n    int\t\t\t\t/* datalen */\n);\n\nextern int _Xmbtowc(\n    wchar_t *\t\t\t/* wstr */,\n#ifdef ISC\n    char const *\t\t/* str */,\n    size_t\t\t\t/* len */\n#else\n    char *\t\t\t/* str */,\n    int\t\t\t\t/* len */\n#endif\n);\n\nextern int _Xwctomb(\n    char *\t\t\t/* str */,\n    wchar_t\t\t\t/* wc */\n);\n\nextern Bool XGetEventData(\n    Display*\t\t\t/* dpy */,\n    XGenericEventCookie*\t/* cookie*/\n);\n\nextern void XFreeEventData(\n    Display*\t\t\t/* dpy */,\n    XGenericEventCookie*\t/* cookie*/\n);\n\n_XFUNCPROTOEND\n\n#endif /* _X11_XLIB_H_ */\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/Xmd.h",
    "content": "/***********************************************************\n\nCopyright 1987, 1998  The Open Group\n\nPermission to use, copy, modify, distribute, and sell this software and its\ndocumentation for any purpose is hereby granted without fee, provided that\nthe above copyright notice appear in all copies and that both that\ncopyright notice and this permission notice appear in supporting\ndocumentation.\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\nAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nExcept as contained in this notice, the name of The Open Group shall not be\nused in advertising or otherwise to promote the sale, use or other dealings\nin this Software without prior written authorization from The Open Group.\n\n\nCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.\n\n                        All Rights Reserved\n\nPermission to use, copy, modify, and distribute this software and its\ndocumentation for any purpose and without fee is hereby granted,\nprovided that the above copyright notice appear in all copies and that\nboth that copyright notice and this permission notice appear in\nsupporting documentation, and that the name of Digital not be\nused in advertising or publicity pertaining to distribution of the\nsoftware without specific, written prior permission.\n\nDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING\nALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL\nDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR\nANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\nWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\nARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS\nSOFTWARE.\n\n******************************************************************/\n#ifndef XMD_H\n# define XMD_H 1\n/*\n *  Xmd.h: MACHINE DEPENDENT DECLARATIONS.\n */\n\n/*\n * Special per-machine configuration flags.\n */\n# if defined(__sun) && defined(__SVR4)\n#  include <sys/isa_defs.h> /* Solaris: defines _LP64 if necessary */\n# endif\n\n# if defined (_LP64) || defined(__LP64__) || \\\n     defined(__alpha) || defined(__alpha__) || \\\n     defined(__ia64__) || defined(ia64) || \\\n     defined(__sparc64__) || \\\n     defined(__s390x__) || \\\n     defined(__amd64__) || defined(amd64) || \\\n     defined(__powerpc64__)\n#  if !defined(__ILP32__) /* amd64-x32 is 32bit */\n#   define LONG64\t\t\t\t/* 32/64-bit architecture */\n#  endif /* !__ILP32__ */\n# endif\n\n/*\n * Definition of macro used to set constants for size of network structures;\n * machines with preprocessors that can't handle all of the sz_ symbols\n * can define this macro to be sizeof(x) if and only if their compiler doesn't\n * pad out structures (esp. the xTextElt structure which contains only two\n * one-byte fields).  Network structures should always define sz_symbols.\n *\n * The sz_ prefix is used instead of something more descriptive so that the\n * symbols are no more than 32 characters long (which causes problems for some\n * compilers and preprocessors).\n *\n * The extra indirection is to get macro arguments to expand correctly before\n * the concatenation, rather than afterward.\n */\n# define _SIZEOF(x) sz_##x\n# define SIZEOF(x) _SIZEOF(x)\n\n/*\n * Bitfield suffixes for the protocol structure elements, if you\n * need them.  Note that bitfields are not guaranteed to be signed\n * (or even unsigned) according to ANSI C.\n */\n# define B32 /* bitfield not needed on architectures with native 32-bit type */\n# define B16 /* bitfield not needed on architectures with native 16-bit type */\n# ifdef LONG64\ntypedef long INT64;\ntypedef int INT32;\n# else\ntypedef long INT32;\n# endif\ntypedef short INT16;\n\ntypedef signed char    INT8;\n\n# ifdef LONG64\ntypedef unsigned long CARD64;\ntypedef unsigned int CARD32;\n# else\ntypedef unsigned long long CARD64;\ntypedef unsigned long CARD32;\n# endif\ntypedef unsigned short CARD16;\ntypedef unsigned char  CARD8;\n\ntypedef CARD32\t\tBITS32;\ntypedef CARD16\t\tBITS16;\n\ntypedef CARD8\t\tBYTE;\ntypedef CARD8\t\tBOOL;\n\n/*\n * was definitions for sign-extending bitfields on architectures without\n * native types smaller than 64-bit, now just backwards compatibility\n */\n# define cvtINT8toInt(val) (val)\n# define cvtINT16toInt(val) (val)\n# define cvtINT32toInt(val) (val)\n# define cvtINT8toShort(val) (val)\n# define cvtINT16toShort(val) (val)\n# define cvtINT32toShort(val) (val)\n# define cvtINT8toLong(val) (val)\n# define cvtINT16toLong(val) (val)\n# define cvtINT32toLong(val) (val)\n\n/*\n * this version should leave result of type (t *), but that should only be\n * used when not in MUSTCOPY\n */\n# define NEXTPTR(p,t) (((t *)(p)) + 1)\n\n#endif /* XMD_H */\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/Xosdefs.h",
    "content": "/*\n * O/S-dependent (mis)feature macro definitions\n *\nCopyright 1991, 1998  The Open Group\n\nPermission to use, copy, modify, distribute, and sell this software and its\ndocumentation for any purpose is hereby granted without fee, provided that\nthe above copyright notice appear in all copies and that both that\ncopyright notice and this permission notice appear in supporting\ndocumentation.\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\nAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nExcept as contained in this notice, the name of The Open Group shall not be\nused in advertising or otherwise to promote the sale, use or other dealings\nin this Software without prior written authorization from The Open Group.\n */\n\n#ifndef _XOSDEFS_H_\n# define _XOSDEFS_H_\n\n/*\n * X_NOT_POSIX means does not have POSIX header files.  Lack of this\n * symbol does NOT mean that the POSIX environment is the default.\n * You may still have to define _POSIX_SOURCE to get it.\n */\n\n\n# ifdef _SCO_DS\n#  ifndef __SCO__\n#   define __SCO__\n#  endif\n# endif\n\n# ifdef __i386__\n#  ifdef SYSV\n#   if !defined(__SCO__) && \\\n\t!defined(__UNIXWARE__) && !defined(__sun)\n#    if !defined(_POSIX_SOURCE)\n#     define X_NOT_POSIX\n#    endif\n#   endif\n#  endif\n# endif\n\n# ifdef __sun\n/* Imake configs define SVR4 on Solaris, but cc & gcc only define __SVR4\n * This check allows non-Imake configured programs to build correctly.\n */\n#  if defined(__SVR4) && !defined(SVR4)\n#   define SVR4 1\n#  endif\n#  ifdef SVR4\n/* define this to whatever it needs to be */\n#   define X_POSIX_C_SOURCE 199300L\n#  endif\n# endif\n\n# ifdef WIN32\n#  ifndef _POSIX_\n#   define X_NOT_POSIX\n#  endif\n# endif\n\n\n# ifdef __APPLE__\n#  define NULL_NOT_ZERO\n\n/* Defining any of these will sanitize the namespace to JUST want is defined by\n * that particular standard.  If that happens, we don't get some expected\n * prototypes, typedefs, etc (like fd_mask).  We can define _DARWIN_C_SOURCE to\n * loosen our belts a tad.\n */\n#  if defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE)\n#   ifndef _DARWIN_C_SOURCE\n#    define _DARWIN_C_SOURCE\n#   endif\n#  endif\n\n# endif\n\n# ifdef __GNU__\n#  ifndef PATH_MAX\n#   define PATH_MAX 4096\n#  endif\n#  ifndef MAXPATHLEN\n#   define MAXPATHLEN 4096\n#  endif\n# endif\n\n# if defined(__SCO__) || defined(__UNIXWARE__)\n#  ifndef PATH_MAX\n#   define PATH_MAX\t1024\n#  endif\n#  ifndef MAXPATHLEN\n#   define MAXPATHLEN\t1024\n#  endif\n# endif\n\n# if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) \\\n\t|| defined(__APPLE__) || defined(__DragonFly__)\n#  ifndef CSRG_BASED\n#   define CSRG_BASED\n#  endif\n# endif\n\n#endif /* _XOSDEFS_H_ */\n\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/Xutil.h",
    "content": "\n/***********************************************************\n\nCopyright 1987, 1998  The Open Group\n\nPermission to use, copy, modify, distribute, and sell this software and its\ndocumentation for any purpose is hereby granted without fee, provided that\nthe above copyright notice appear in all copies and that both that\ncopyright notice and this permission notice appear in supporting\ndocumentation.\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\nAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nExcept as contained in this notice, the name of The Open Group shall not be\nused in advertising or otherwise to promote the sale, use or other dealings\nin this Software without prior written authorization from The Open Group.\n\n\nCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.\n\n                        All Rights Reserved\n\nPermission to use, copy, modify, and distribute this software and its\ndocumentation for any purpose and without fee is hereby granted,\nprovided that the above copyright notice appear in all copies and that\nboth that copyright notice and this permission notice appear in\nsupporting documentation, and that the name of Digital not be\nused in advertising or publicity pertaining to distribution of the\nsoftware without specific, written prior permission.\n\nDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING\nALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL\nDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR\nANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\nWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\nARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS\nSOFTWARE.\n\n******************************************************************/\n\n#ifndef _X11_XUTIL_H_\n#define _X11_XUTIL_H_\n\n/* You must include <X11/Xlib.h> before including this file */\n#include <X11/Xlib.h>\n#include <X11/keysym.h>\n\n/*\n * Bitmask returned by XParseGeometry().  Each bit tells if the corresponding\n * value (x, y, width, height) was found in the parsed string.\n */\n#define NoValue\t\t0x0000\n#define XValue  \t0x0001\n#define YValue\t\t0x0002\n#define WidthValue  \t0x0004\n#define HeightValue  \t0x0008\n#define AllValues \t0x000F\n#define XNegative \t0x0010\n#define YNegative \t0x0020\n\n/*\n * new version containing base_width, base_height, and win_gravity fields;\n * used with WM_NORMAL_HINTS.\n */\ntypedef struct {\n    \tlong flags;\t/* marks which fields in this structure are defined */\n\tint x, y;\t\t/* obsolete for new window mgrs, but clients */\n\tint width, height;\t/* should set so old wm's don't mess up */\n\tint min_width, min_height;\n\tint max_width, max_height;\n    \tint width_inc, height_inc;\n\tstruct {\n\t\tint x;\t/* numerator */\n\t\tint y;\t/* denominator */\n\t} min_aspect, max_aspect;\n\tint base_width, base_height;\t\t/* added by ICCCM version 1 */\n\tint win_gravity;\t\t\t/* added by ICCCM version 1 */\n} XSizeHints;\n\n/*\n * The next block of definitions are for window manager properties that\n * clients and applications use for communication.\n */\n\n/* flags argument in size hints */\n#define USPosition\t(1L << 0) /* user specified x, y */\n#define USSize\t\t(1L << 1) /* user specified width, height */\n\n#define PPosition\t(1L << 2) /* program specified position */\n#define PSize\t\t(1L << 3) /* program specified size */\n#define PMinSize\t(1L << 4) /* program specified minimum size */\n#define PMaxSize\t(1L << 5) /* program specified maximum size */\n#define PResizeInc\t(1L << 6) /* program specified resize increments */\n#define PAspect\t\t(1L << 7) /* program specified min and max aspect ratios */\n#define PBaseSize\t(1L << 8) /* program specified base for incrementing */\n#define PWinGravity\t(1L << 9) /* program specified window gravity */\n\n/* obsolete */\n#define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect)\n\n\n\ntypedef struct {\n\tlong flags;\t/* marks which fields in this structure are defined */\n\tBool input;\t/* does this application rely on the window manager to\n\t\t\tget keyboard input? */\n\tint initial_state;\t/* see below */\n\tPixmap icon_pixmap;\t/* pixmap to be used as icon */\n\tWindow icon_window; \t/* window to be used as icon */\n\tint icon_x, icon_y; \t/* initial position of icon */\n\tPixmap icon_mask;\t/* icon mask bitmap */\n\tXID window_group;\t/* id of related window group */\n\t/* this structure may be extended in the future */\n} XWMHints;\n\n/* definition for flags of XWMHints */\n\n#define InputHint \t\t(1L << 0)\n#define StateHint \t\t(1L << 1)\n#define IconPixmapHint\t\t(1L << 2)\n#define IconWindowHint\t\t(1L << 3)\n#define IconPositionHint \t(1L << 4)\n#define IconMaskHint\t\t(1L << 5)\n#define WindowGroupHint\t\t(1L << 6)\n#define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| \\\nIconPositionHint|IconMaskHint|WindowGroupHint)\n#define XUrgencyHint\t\t(1L << 8)\n\n/* definitions for initial window state */\n#define WithdrawnState 0\t/* for windows that are not mapped */\n#define NormalState 1\t/* most applications want to start this way */\n#define IconicState 3\t/* application wants to start as an icon */\n\n/*\n * Obsolete states no longer defined by ICCCM\n */\n#define DontCareState 0\t/* don't know or care */\n#define ZoomState 2\t/* application wants to start zoomed */\n#define InactiveState 4\t/* application believes it is seldom used; */\n\t\t\t/* some wm's may put it on inactive menu */\n\n\n/*\n * new structure for manipulating TEXT properties; used with WM_NAME,\n * WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND.\n */\ntypedef struct {\n    unsigned char *value;\t\t/* same as Property routines */\n    Atom encoding;\t\t\t/* prop type */\n    int format;\t\t\t\t/* prop data format: 8, 16, or 32 */\n    unsigned long nitems;\t\t/* number of data items in value */\n} XTextProperty;\n\n#define XNoMemory -1\n#define XLocaleNotSupported -2\n#define XConverterNotFound -3\n\ntypedef enum {\n    XStringStyle,\t\t/* STRING */\n    XCompoundTextStyle,\t\t/* COMPOUND_TEXT */\n    XTextStyle,\t\t\t/* text in owner's encoding (current locale)*/\n    XStdICCTextStyle,\t\t/* STRING, else COMPOUND_TEXT */\n    /* The following is an XFree86 extension, introduced in November 2000 */\n    XUTF8StringStyle\t\t/* UTF8_STRING */\n} XICCEncodingStyle;\n\ntypedef struct {\n\tint min_width, min_height;\n\tint max_width, max_height;\n\tint width_inc, height_inc;\n} XIconSize;\n\ntypedef struct {\n\tchar *res_name;\n\tchar *res_class;\n} XClassHint;\n\n#ifdef XUTIL_DEFINE_FUNCTIONS\nextern int XDestroyImage(\n        XImage *ximage);\nextern unsigned long XGetPixel(\n        XImage *ximage,\n        int x, int y);\nextern int XPutPixel(\n        XImage *ximage,\n        int x, int y,\n        unsigned long pixel);\nextern XImage *XSubImage(\n        XImage *ximage,\n        int x, int y,\n        unsigned int width, unsigned int height);\nextern int XAddPixel(\n        XImage *ximage,\n        long value);\n#else\n/*\n * These macros are used to give some sugar to the image routines so that\n * naive people are more comfortable with them.\n */\n#define XDestroyImage(ximage) \\\n\t((*((ximage)->f.destroy_image))((ximage)))\n#define XGetPixel(ximage, x, y) \\\n\t((*((ximage)->f.get_pixel))((ximage), (x), (y)))\n#define XPutPixel(ximage, x, y, pixel) \\\n\t((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel)))\n#define XSubImage(ximage, x, y, width, height)  \\\n\t((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height)))\n#define XAddPixel(ximage, value) \\\n\t((*((ximage)->f.add_pixel))((ximage), (value)))\n#endif\n\n/*\n * Compose sequence status structure, used in calling XLookupString.\n */\ntypedef struct _XComposeStatus {\n    XPointer compose_ptr;\t/* state table pointer */\n    int chars_matched;\t\t/* match state */\n} XComposeStatus;\n\n/*\n * Keysym macros, used on Keysyms to test for classes of symbols\n */\n#define IsKeypadKey(keysym) \\\n  (((KeySym)(keysym) >= XK_KP_Space) && ((KeySym)(keysym) <= XK_KP_Equal))\n\n#define IsPrivateKeypadKey(keysym) \\\n  (((KeySym)(keysym) >= 0x11000000) && ((KeySym)(keysym) <= 0x1100FFFF))\n\n#define IsCursorKey(keysym) \\\n  (((KeySym)(keysym) >= XK_Home)     && ((KeySym)(keysym) <  XK_Select))\n\n#define IsPFKey(keysym) \\\n  (((KeySym)(keysym) >= XK_KP_F1)     && ((KeySym)(keysym) <= XK_KP_F4))\n\n#define IsFunctionKey(keysym) \\\n  (((KeySym)(keysym) >= XK_F1)       && ((KeySym)(keysym) <= XK_F35))\n\n#define IsMiscFunctionKey(keysym) \\\n  (((KeySym)(keysym) >= XK_Select)   && ((KeySym)(keysym) <= XK_Break))\n\n#ifdef XK_XKB_KEYS\n#define IsModifierKey(keysym) \\\n  ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \\\n   || (((KeySym)(keysym) >= XK_ISO_Lock) && \\\n       ((KeySym)(keysym) <= XK_ISO_Level5_Lock)) \\\n   || ((KeySym)(keysym) == XK_Mode_switch) \\\n   || ((KeySym)(keysym) == XK_Num_Lock))\n#else\n#define IsModifierKey(keysym) \\\n  ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \\\n   || ((KeySym)(keysym) == XK_Mode_switch) \\\n   || ((KeySym)(keysym) == XK_Num_Lock))\n#endif\n/*\n * opaque reference to Region data type\n */\ntypedef struct _XRegion *Region;\n\n/* Return values from XRectInRegion() */\n\n#define RectangleOut 0\n#define RectangleIn  1\n#define RectanglePart 2\n\n\n/*\n * Information used by the visual utility routines to find desired visual\n * type from the many visuals a display may support.\n */\n\ntypedef struct {\n  Visual *visual;\n  VisualID visualid;\n  int screen;\n  int depth;\n#if defined(__cplusplus) || defined(c_plusplus)\n  int c_class;\t\t\t\t\t/* C++ */\n#else\n  int class;\n#endif\n  unsigned long red_mask;\n  unsigned long green_mask;\n  unsigned long blue_mask;\n  int colormap_size;\n  int bits_per_rgb;\n} XVisualInfo;\n\n#define VisualNoMask\t\t0x0\n#define VisualIDMask \t\t0x1\n#define VisualScreenMask\t0x2\n#define VisualDepthMask\t\t0x4\n#define VisualClassMask\t\t0x8\n#define VisualRedMaskMask\t0x10\n#define VisualGreenMaskMask\t0x20\n#define VisualBlueMaskMask\t0x40\n#define VisualColormapSizeMask\t0x80\n#define VisualBitsPerRGBMask\t0x100\n#define VisualAllMask\t\t0x1FF\n\n/*\n * This defines a window manager property that clients may use to\n * share standard color maps of type RGB_COLOR_MAP:\n */\ntypedef struct {\n\tColormap colormap;\n\tunsigned long red_max;\n\tunsigned long red_mult;\n\tunsigned long green_max;\n\tunsigned long green_mult;\n\tunsigned long blue_max;\n\tunsigned long blue_mult;\n\tunsigned long base_pixel;\n\tVisualID visualid;\t\t/* added by ICCCM version 1 */\n\tXID killid;\t\t\t/* added by ICCCM version 1 */\n} XStandardColormap;\n\n#define ReleaseByFreeingColormap ((XID) 1L)  /* for killid field above */\n\n\n/*\n * return codes for XReadBitmapFile and XWriteBitmapFile\n */\n#define BitmapSuccess\t\t0\n#define BitmapOpenFailed \t1\n#define BitmapFileInvalid \t2\n#define BitmapNoMemory\t\t3\n\n/****************************************************************\n *\n * Context Management\n *\n ****************************************************************/\n\n\n/* Associative lookup table return codes */\n\n#define XCSUCCESS 0\t/* No error. */\n#define XCNOMEM   1    /* Out of memory */\n#define XCNOENT   2    /* No entry in table */\n\ntypedef int XContext;\n\n#define XUniqueContext()       ((XContext) XrmUniqueQuark())\n#define XStringToContext(string)   ((XContext) XrmStringToQuark(string))\n\n_XFUNCPROTOBEGIN\n\n/* The following declarations are alphabetized. */\n\nextern XClassHint *XAllocClassHint (\n    void\n);\n\nextern XIconSize *XAllocIconSize (\n    void\n);\n\nextern XSizeHints *XAllocSizeHints (\n    void\n);\n\nextern XStandardColormap *XAllocStandardColormap (\n    void\n);\n\nextern XWMHints *XAllocWMHints (\n    void\n);\n\nextern int XClipBox(\n    Region\t\t/* r */,\n    XRectangle*\t\t/* rect_return */\n);\n\nextern Region XCreateRegion(\n    void\n);\n\nextern const char *XDefaultString (void);\n\nextern int XDeleteContext(\n    Display*\t\t/* display */,\n    XID\t\t\t/* rid */,\n    XContext\t\t/* context */\n);\n\nextern int XDestroyRegion(\n    Region\t\t/* r */\n);\n\nextern int XEmptyRegion(\n    Region\t\t/* r */\n);\n\nextern int XEqualRegion(\n    Region\t\t/* r1 */,\n    Region\t\t/* r2 */\n);\n\nextern int XFindContext(\n    Display*\t\t/* display */,\n    XID\t\t\t/* rid */,\n    XContext\t\t/* context */,\n    XPointer*\t\t/* data_return */\n);\n\nextern Status XGetClassHint(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XClassHint*\t\t/* class_hints_return */\n);\n\nextern Status XGetIconSizes(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XIconSize**\t\t/* size_list_return */,\n    int*\t\t/* count_return */\n);\n\nextern Status XGetNormalHints(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XSizeHints*\t\t/* hints_return */\n);\n\nextern Status XGetRGBColormaps(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XStandardColormap** /* stdcmap_return */,\n    int*\t\t/* count_return */,\n    Atom\t\t/* property */\n);\n\nextern Status XGetSizeHints(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XSizeHints*\t\t/* hints_return */,\n    Atom\t\t/* property */\n);\n\nextern Status XGetStandardColormap(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XStandardColormap*\t/* colormap_return */,\n    Atom\t\t/* property */\n);\n\nextern Status XGetTextProperty(\n    Display*\t\t/* display */,\n    Window\t\t/* window */,\n    XTextProperty*\t/* text_prop_return */,\n    Atom\t\t/* property */\n);\n\nextern XVisualInfo *XGetVisualInfo(\n    Display*\t\t/* display */,\n    long\t\t/* vinfo_mask */,\n    XVisualInfo*\t/* vinfo_template */,\n    int*\t\t/* nitems_return */\n);\n\nextern Status XGetWMClientMachine(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XTextProperty*\t/* text_prop_return */\n);\n\nextern XWMHints *XGetWMHints(\n    Display*\t\t/* display */,\n    Window\t\t/* w */\n);\n\nextern Status XGetWMIconName(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XTextProperty*\t/* text_prop_return */\n);\n\nextern Status XGetWMName(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XTextProperty*\t/* text_prop_return */\n);\n\nextern Status XGetWMNormalHints(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XSizeHints*\t\t/* hints_return */,\n    long*\t\t/* supplied_return */\n);\n\nextern Status XGetWMSizeHints(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XSizeHints*\t\t/* hints_return */,\n    long*\t\t/* supplied_return */,\n    Atom\t\t/* property */\n);\n\nextern Status XGetZoomHints(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XSizeHints*\t\t/* zhints_return */\n);\n\nextern int XIntersectRegion(\n    Region\t\t/* sra */,\n    Region\t\t/* srb */,\n    Region\t\t/* dr_return */\n);\n\nextern void XConvertCase(\n    KeySym\t\t/* sym */,\n    KeySym*\t\t/* lower */,\n    KeySym*\t\t/* upper */\n);\n\nextern int XLookupString(\n    XKeyEvent*\t\t/* event_struct */,\n    char*\t\t/* buffer_return */,\n    int\t\t\t/* bytes_buffer */,\n    KeySym*\t\t/* keysym_return */,\n    XComposeStatus*\t/* status_in_out */\n);\n\nextern Status XMatchVisualInfo(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen */,\n    int\t\t\t/* depth */,\n    int\t\t\t/* class */,\n    XVisualInfo*\t/* vinfo_return */\n);\n\nextern int XOffsetRegion(\n    Region\t\t/* r */,\n    int\t\t\t/* dx */,\n    int\t\t\t/* dy */\n);\n\nextern Bool XPointInRegion(\n    Region\t\t/* r */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */\n);\n\nextern Region XPolygonRegion(\n    XPoint*\t\t/* points */,\n    int\t\t\t/* n */,\n    int\t\t\t/* fill_rule */\n);\n\nextern int XRectInRegion(\n    Region\t\t/* r */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */,\n    unsigned int\t/* width */,\n    unsigned int\t/* height */\n);\n\nextern int XSaveContext(\n    Display*\t\t/* display */,\n    XID\t\t\t/* rid */,\n    XContext\t\t/* context */,\n    _Xconst char*\t/* data */\n);\n\nextern int XSetClassHint(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XClassHint*\t\t/* class_hints */\n);\n\nextern int XSetIconSizes(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XIconSize*\t\t/* size_list */,\n    int\t\t\t/* count */\n);\n\nextern int XSetNormalHints(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XSizeHints*\t\t/* hints */\n);\n\nextern void XSetRGBColormaps(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XStandardColormap*\t/* stdcmaps */,\n    int\t\t\t/* count */,\n    Atom\t\t/* property */\n);\n\nextern int XSetSizeHints(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XSizeHints*\t\t/* hints */,\n    Atom\t\t/* property */\n);\n\nextern int XSetStandardProperties(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    _Xconst char*\t/* window_name */,\n    _Xconst char*\t/* icon_name */,\n    Pixmap\t\t/* icon_pixmap */,\n    char**\t\t/* argv */,\n    int\t\t\t/* argc */,\n    XSizeHints*\t\t/* hints */\n);\n\nextern void XSetTextProperty(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XTextProperty*\t/* text_prop */,\n    Atom\t\t/* property */\n);\n\nextern void XSetWMClientMachine(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XTextProperty*\t/* text_prop */\n);\n\nextern int XSetWMHints(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XWMHints*\t\t/* wm_hints */\n);\n\nextern void XSetWMIconName(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XTextProperty*\t/* text_prop */\n);\n\nextern void XSetWMName(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XTextProperty*\t/* text_prop */\n);\n\nextern void XSetWMNormalHints(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XSizeHints*\t\t/* hints */\n);\n\nextern void XSetWMProperties(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XTextProperty*\t/* window_name */,\n    XTextProperty*\t/* icon_name */,\n    char**\t\t/* argv */,\n    int\t\t\t/* argc */,\n    XSizeHints*\t\t/* normal_hints */,\n    XWMHints*\t\t/* wm_hints */,\n    XClassHint*\t\t/* class_hints */\n);\n\nextern void XmbSetWMProperties(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    _Xconst char*\t/* window_name */,\n    _Xconst char*\t/* icon_name */,\n    char**\t\t/* argv */,\n    int\t\t\t/* argc */,\n    XSizeHints*\t\t/* normal_hints */,\n    XWMHints*\t\t/* wm_hints */,\n    XClassHint*\t\t/* class_hints */\n);\n\nextern void Xutf8SetWMProperties(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    _Xconst char*\t/* window_name */,\n    _Xconst char*\t/* icon_name */,\n    char**\t\t/* argv */,\n    int\t\t\t/* argc */,\n    XSizeHints*\t\t/* normal_hints */,\n    XWMHints*\t\t/* wm_hints */,\n    XClassHint*\t\t/* class_hints */\n);\n\nextern void XSetWMSizeHints(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XSizeHints*\t\t/* hints */,\n    Atom\t\t/* property */\n);\n\nextern int XSetRegion(\n    Display*\t\t/* display */,\n    GC\t\t\t/* gc */,\n    Region\t\t/* r */\n);\n\nextern void XSetStandardColormap(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XStandardColormap*\t/* colormap */,\n    Atom\t\t/* property */\n);\n\nextern int XSetZoomHints(\n    Display*\t\t/* display */,\n    Window\t\t/* w */,\n    XSizeHints*\t\t/* zhints */\n);\n\nextern int XShrinkRegion(\n    Region\t\t/* r */,\n    int\t\t\t/* dx */,\n    int\t\t\t/* dy */\n);\n\nextern Status XStringListToTextProperty(\n    char**\t\t/* list */,\n    int\t\t\t/* count */,\n    XTextProperty*\t/* text_prop_return */\n);\n\nextern int XSubtractRegion(\n    Region\t\t/* sra */,\n    Region\t\t/* srb */,\n    Region\t\t/* dr_return */\n);\n\nextern int XmbTextListToTextProperty(\n    Display*\t\tdisplay,\n    char**\t\tlist,\n    int\t\t\tcount,\n    XICCEncodingStyle\tstyle,\n    XTextProperty*\ttext_prop_return\n);\n\nextern int XwcTextListToTextProperty(\n    Display*\t\tdisplay,\n    wchar_t**\t\tlist,\n    int\t\t\tcount,\n    XICCEncodingStyle\tstyle,\n    XTextProperty*\ttext_prop_return\n);\n\nextern int Xutf8TextListToTextProperty(\n    Display*\t\tdisplay,\n    char**\t\tlist,\n    int\t\t\tcount,\n    XICCEncodingStyle\tstyle,\n    XTextProperty*\ttext_prop_return\n);\n\nextern void XwcFreeStringList(\n    wchar_t**\t\tlist\n);\n\nextern Status XTextPropertyToStringList(\n    XTextProperty*\t/* text_prop */,\n    char***\t\t/* list_return */,\n    int*\t\t/* count_return */\n);\n\nextern int XmbTextPropertyToTextList(\n    Display*\t\tdisplay,\n    const XTextProperty* text_prop,\n    char***\t\tlist_return,\n    int*\t\tcount_return\n);\n\nextern int XwcTextPropertyToTextList(\n    Display*\t\tdisplay,\n    const XTextProperty* text_prop,\n    wchar_t***\t\tlist_return,\n    int*\t\tcount_return\n);\n\nextern int Xutf8TextPropertyToTextList(\n    Display*\t\tdisplay,\n    const XTextProperty* text_prop,\n    char***\t\tlist_return,\n    int*\t\tcount_return\n);\n\nextern int XUnionRectWithRegion(\n    XRectangle*\t\t/* rectangle */,\n    Region\t\t/* src_region */,\n    Region\t\t/* dest_region_return */\n);\n\nextern int XUnionRegion(\n    Region\t\t/* sra */,\n    Region\t\t/* srb */,\n    Region\t\t/* dr_return */\n);\n\nextern int XWMGeometry(\n    Display*\t\t/* display */,\n    int\t\t\t/* screen_number */,\n    _Xconst char*\t/* user_geometry */,\n    _Xconst char*\t/* default_geometry */,\n    unsigned int\t/* border_width */,\n    XSizeHints*\t\t/* hints */,\n    int*\t\t/* x_return */,\n    int*\t\t/* y_return */,\n    int*\t\t/* width_return */,\n    int*\t\t/* height_return */,\n    int*\t\t/* gravity_return */\n);\n\nextern int XXorRegion(\n    Region\t\t/* sra */,\n    Region\t\t/* srb */,\n    Region\t\t/* dr_return */\n);\n\n_XFUNCPROTOEND\n\n#endif /* _X11_XUTIL_H_ */\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/extensions/Xrandr.h",
    "content": "/*\n * Copyright © 2000 Compaq Computer Corporation, Inc.\n * Copyright © 2002 Hewlett-Packard Company, Inc.\n * Copyright © 2006 Intel Corporation\n * Copyright © 2008 Red Hat, Inc.\n *\n * Permission to use, copy, modify, distribute, and sell this software and its\n * documentation for any purpose is hereby granted without fee, provided that\n * the above copyright notice appear in all copies and that both that copyright\n * notice and this permission notice appear in supporting documentation, and\n * that the name of the copyright holders not be used in advertising or\n * publicity pertaining to distribution of the software without specific,\n * written prior permission.  The copyright holders make no representations\n * about the suitability of this software for any purpose.  It is provided \"as\n * is\" without express or implied warranty.\n *\n * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\n * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO\n * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR\n * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,\n * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE\n * OF THIS SOFTWARE.\n *\n * Author:  Jim Gettys, HP Labs, Hewlett-Packard, Inc.\n *\t    Keith Packard, Intel Corporation\n */\n\n#ifndef _XRANDR_H_\n#define _XRANDR_H_\n\n#include <X11/extensions/randr.h>\n#include <X11/extensions/Xrender.h>\n\n#include <X11/Xfuncproto.h>\n\n_XFUNCPROTOBEGIN\n\ntypedef XID RROutput;\ntypedef XID RRCrtc;\ntypedef XID RRMode;\ntypedef XID RRProvider;\n\ntypedef struct {\n    int\twidth, height;\n    int\tmwidth, mheight;\n} XRRScreenSize;\n\n/*\n *  Events.\n */\n\ntypedef struct {\n    int type;\t\t\t/* event base */\n    unsigned long serial;\t/* # of last request processed by server */\n    Bool send_event;\t\t/* true if this came from a SendEvent request */\n    Display *display;\t\t/* Display the event was read from */\n    Window window;\t\t/* window which selected for this event */\n    Window root;\t\t/* Root window for changed screen */\n    Time timestamp;\t\t/* when the screen change occurred */\n    Time config_timestamp;\t/* when the last configuration change */\n    SizeID size_index;\n    SubpixelOrder subpixel_order;\n    Rotation rotation;\n    int width;\n    int height;\n    int mwidth;\n    int mheight;\n} XRRScreenChangeNotifyEvent;\n\ntypedef struct {\n    int type;\t\t\t/* event base */\n    unsigned long serial;\t/* # of last request processed by server */\n    Bool send_event;\t\t/* true if this came from a SendEvent request */\n    Display *display;\t\t/* Display the event was read from */\n    Window window;\t\t/* window which selected for this event */\n    int subtype;\t\t/* RRNotify_ subtype */\n} XRRNotifyEvent;\n\ntypedef struct {\n    int type;\t\t\t/* event base */\n    unsigned long serial;\t/* # of last request processed by server */\n    Bool send_event;\t\t/* true if this came from a SendEvent request */\n    Display *display;\t\t/* Display the event was read from */\n    Window window;\t\t/* window which selected for this event */\n    int subtype;\t\t/* RRNotify_OutputChange */\n    RROutput output;\t\t/* affected output */\n    RRCrtc crtc;\t    \t/* current crtc (or None) */\n    RRMode mode;\t    \t/* current mode (or None) */\n    Rotation rotation;\t\t/* current rotation of associated crtc */\n    Connection connection;\t/* current connection status */\n    SubpixelOrder subpixel_order;\n} XRROutputChangeNotifyEvent;\n\ntypedef struct {\n    int type;\t\t\t/* event base */\n    unsigned long serial;\t/* # of last request processed by server */\n    Bool send_event;\t\t/* true if this came from a SendEvent request */\n    Display *display;\t\t/* Display the event was read from */\n    Window window;\t\t/* window which selected for this event */\n    int subtype;\t\t/* RRNotify_CrtcChange */\n    RRCrtc crtc;    \t\t/* current crtc (or None) */\n    RRMode mode;\t    \t/* current mode (or None) */\n    Rotation rotation;\t\t/* current rotation of associated crtc */\n    int x, y;\t\t\t/* position */\n    unsigned int width, height;\t/* size */\n} XRRCrtcChangeNotifyEvent;\n\ntypedef struct {\n    int type;\t\t\t/* event base */\n    unsigned long serial;\t/* # of last request processed by server */\n    Bool send_event;\t\t/* true if this came from a SendEvent request */\n    Display *display;\t\t/* Display the event was read from */\n    Window window;\t\t/* window which selected for this event */\n    int subtype;\t\t/* RRNotify_OutputProperty */\n    RROutput output;\t\t/* related output */\n    Atom property;\t\t/* changed property */\n    Time timestamp;\t\t/* time of change */\n    int state;\t\t\t/* NewValue, Deleted */\n} XRROutputPropertyNotifyEvent;\n\ntypedef struct {\n    int type;\t\t\t/* event base */\n    unsigned long serial;\t/* # of last request processed by server */\n    Bool send_event;\t\t/* true if this came from a SendEvent request */\n    Display *display;\t\t/* Display the event was read from */\n    Window window;\t\t/* window which selected for this event */\n    int subtype;\t\t/* RRNotify_ProviderChange */\n    RRProvider provider; \t/* current provider (or None) */\n    Time timestamp;\t\t/* time of change */\n    unsigned int current_role;\n} XRRProviderChangeNotifyEvent;\n\ntypedef struct {\n    int type;\t\t\t/* event base */\n    unsigned long serial;\t/* # of last request processed by server */\n    Bool send_event;\t\t/* true if this came from a SendEvent request */\n    Display *display;\t\t/* Display the event was read from */\n    Window window;\t\t/* window which selected for this event */\n    int subtype;\t\t/* RRNotify_ProviderProperty */\n    RRProvider provider;\t\t/* related provider */\n    Atom property;\t\t/* changed property */\n    Time timestamp;\t\t/* time of change */\n    int state;\t\t\t/* NewValue, Deleted */\n} XRRProviderPropertyNotifyEvent;\n\ntypedef struct {\n    int type;\t\t\t/* event base */\n    unsigned long serial;\t/* # of last request processed by server */\n    Bool send_event;\t\t/* true if this came from a SendEvent request */\n    Display *display;\t\t/* Display the event was read from */\n    Window window;\t\t/* window which selected for this event */\n    int subtype;\t\t/* RRNotify_ResourceChange */\n    Time timestamp;\t\t/* time of change */\n} XRRResourceChangeNotifyEvent;\n\n/* internal representation is private to the library */\ntypedef struct _XRRScreenConfiguration XRRScreenConfiguration;\n\nBool XRRQueryExtension (Display *dpy,\n\t\t\tint *event_base_return,\n\t\t\tint *error_base_return);\nStatus XRRQueryVersion (Display *dpy,\n\t\t\t    int     *major_version_return,\n\t\t\t    int     *minor_version_return);\n\nXRRScreenConfiguration *XRRGetScreenInfo (Display *dpy,\n\t\t\t\t\t  Window window);\n\nvoid XRRFreeScreenConfigInfo (XRRScreenConfiguration *config);\n\n/*\n * Note that screen configuration changes are only permitted if the client can\n * prove it has up to date configuration information.  We are trying to\n * insist that it become possible for screens to change dynamically, so\n * we want to ensure the client knows what it is talking about when requesting\n * changes.\n */\nStatus XRRSetScreenConfig (Display *dpy,\n\t\t\t   XRRScreenConfiguration *config,\n\t\t\t   Drawable draw,\n\t\t\t   int size_index,\n\t\t\t   Rotation rotation,\n\t\t\t   Time timestamp);\n\n/* added in v1.1, sorry for the lame name */\nStatus XRRSetScreenConfigAndRate (Display *dpy,\n\t\t\t\t  XRRScreenConfiguration *config,\n\t\t\t\t  Drawable draw,\n\t\t\t\t  int size_index,\n\t\t\t\t  Rotation rotation,\n\t\t\t\t  short rate,\n\t\t\t\t  Time timestamp);\n\n\nRotation XRRConfigRotations(XRRScreenConfiguration *config, Rotation *current_rotation);\n\nTime XRRConfigTimes (XRRScreenConfiguration *config, Time *config_timestamp);\n\nXRRScreenSize *XRRConfigSizes(XRRScreenConfiguration *config, int *nsizes);\n\nshort *XRRConfigRates (XRRScreenConfiguration *config, int sizeID, int *nrates);\n\nSizeID XRRConfigCurrentConfiguration (XRRScreenConfiguration *config,\n\t\t\t      Rotation *rotation);\n\nshort XRRConfigCurrentRate (XRRScreenConfiguration *config);\n\nint XRRRootToScreen(Display *dpy, Window root);\n\n/*\n * returns the screen configuration for the specified screen; does a lazy\n * evalution to delay getting the information, and caches the result.\n * These routines should be used in preference to XRRGetScreenInfo\n * to avoid unneeded round trips to the X server.  These are new\n * in protocol version 0.1.\n */\n\n\nvoid XRRSelectInput(Display *dpy, Window window, int mask);\n\n/*\n * the following are always safe to call, even if RandR is not implemented\n * on a screen\n */\n\n\nRotation XRRRotations(Display *dpy, int screen, Rotation *current_rotation);\nXRRScreenSize *XRRSizes(Display *dpy, int screen, int *nsizes);\nshort *XRRRates (Display *dpy, int screen, int sizeID, int *nrates);\nTime XRRTimes (Display *dpy, int screen, Time *config_timestamp);\n\n\n/* Version 1.2 additions */\n\n/* despite returning a Status, this returns 1 for success */\nStatus\nXRRGetScreenSizeRange (Display *dpy, Window window,\n\t\t       int *minWidth, int *minHeight,\n\t\t       int *maxWidth, int *maxHeight);\n\nvoid\nXRRSetScreenSize (Display *dpy, Window window,\n\t\t  int width, int height,\n\t\t  int mmWidth, int mmHeight);\n\ntypedef unsigned long XRRModeFlags;\n\ntypedef struct _XRRModeInfo {\n    RRMode\t\tid;\n    unsigned int\twidth;\n    unsigned int\theight;\n    unsigned long\tdotClock;\n    unsigned int\thSyncStart;\n    unsigned int\thSyncEnd;\n    unsigned int\thTotal;\n    unsigned int\thSkew;\n    unsigned int\tvSyncStart;\n    unsigned int\tvSyncEnd;\n    unsigned int\tvTotal;\n    char\t\t*name;\n    unsigned int\tnameLength;\n    XRRModeFlags\tmodeFlags;\n} XRRModeInfo;\n\ntypedef struct _XRRScreenResources {\n    Time\ttimestamp;\n    Time\tconfigTimestamp;\n    int\t\tncrtc;\n    RRCrtc\t*crtcs;\n    int\t\tnoutput;\n    RROutput\t*outputs;\n    int\t\tnmode;\n    XRRModeInfo\t*modes;\n} XRRScreenResources;\n\nXRRScreenResources *\nXRRGetScreenResources (Display *dpy, Window window);\n\nvoid\nXRRFreeScreenResources (XRRScreenResources *resources);\n\ntypedef struct _XRROutputInfo {\n    Time\t    timestamp;\n    RRCrtc\t    crtc;\n    char\t    *name;\n    int\t\t    nameLen;\n    unsigned long   mm_width;\n    unsigned long   mm_height;\n    Connection\t    connection;\n    SubpixelOrder   subpixel_order;\n    int\t\t    ncrtc;\n    RRCrtc\t    *crtcs;\n    int\t\t    nclone;\n    RROutput\t    *clones;\n    int\t\t    nmode;\n    int\t\t    npreferred;\n    RRMode\t    *modes;\n} XRROutputInfo;\n\nXRROutputInfo *\nXRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, RROutput output);\n\nvoid\nXRRFreeOutputInfo (XRROutputInfo *outputInfo);\n\nAtom *\nXRRListOutputProperties (Display *dpy, RROutput output, int *nprop);\n\ntypedef struct {\n    Bool    pending;\n    Bool    range;\n    Bool    immutable;\n    int\t    num_values;\n    long    *values;\n} XRRPropertyInfo;\n\nXRRPropertyInfo *\nXRRQueryOutputProperty (Display *dpy, RROutput output, Atom property);\n\nvoid\nXRRConfigureOutputProperty (Display *dpy, RROutput output, Atom property,\n\t\t\t    Bool pending, Bool range, int num_values,\n\t\t\t    long *values);\n\nvoid\nXRRChangeOutputProperty (Display *dpy, RROutput output,\n\t\t\t Atom property, Atom type,\n\t\t\t int format, int mode,\n\t\t\t _Xconst unsigned char *data, int nelements);\n\nvoid\nXRRDeleteOutputProperty (Display *dpy, RROutput output, Atom property);\n\nint\nXRRGetOutputProperty (Display *dpy, RROutput output,\n\t\t      Atom property, long offset, long length,\n\t\t      Bool _delete, Bool pending, Atom req_type,\n\t\t      Atom *actual_type, int *actual_format,\n\t\t      unsigned long *nitems, unsigned long *bytes_after,\n\t\t      unsigned char **prop);\n\nXRRModeInfo *\nXRRAllocModeInfo (_Xconst char *name, int nameLength);\n\nRRMode\nXRRCreateMode (Display *dpy, Window window, XRRModeInfo *modeInfo);\n\nvoid\nXRRDestroyMode (Display *dpy, RRMode mode);\n\nvoid\nXRRAddOutputMode (Display *dpy, RROutput output, RRMode mode);\n\nvoid\nXRRDeleteOutputMode (Display *dpy, RROutput output, RRMode mode);\n\nvoid\nXRRFreeModeInfo (XRRModeInfo *modeInfo);\n\ntypedef struct _XRRCrtcInfo {\n    Time\t    timestamp;\n    int\t\t    x, y;\n    unsigned int    width, height;\n    RRMode\t    mode;\n    Rotation\t    rotation;\n    int\t\t    noutput;\n    RROutput\t    *outputs;\n    Rotation\t    rotations;\n    int\t\t    npossible;\n    RROutput\t    *possible;\n} XRRCrtcInfo;\n\nXRRCrtcInfo *\nXRRGetCrtcInfo (Display *dpy, XRRScreenResources *resources, RRCrtc crtc);\n\nvoid\nXRRFreeCrtcInfo (XRRCrtcInfo *crtcInfo);\n\nStatus\nXRRSetCrtcConfig (Display *dpy,\n\t\t  XRRScreenResources *resources,\n\t\t  RRCrtc crtc,\n\t\t  Time timestamp,\n\t\t  int x, int y,\n\t\t  RRMode mode,\n\t\t  Rotation rotation,\n\t\t  RROutput *outputs,\n\t\t  int noutputs);\n\nint\nXRRGetCrtcGammaSize (Display *dpy, RRCrtc crtc);\n\ntypedef struct _XRRCrtcGamma {\n    int\t\t    size;\n    unsigned short  *red;\n    unsigned short  *green;\n    unsigned short  *blue;\n} XRRCrtcGamma;\n\nXRRCrtcGamma *\nXRRGetCrtcGamma (Display *dpy, RRCrtc crtc);\n\nXRRCrtcGamma *\nXRRAllocGamma (int size);\n\nvoid\nXRRSetCrtcGamma (Display *dpy, RRCrtc crtc, XRRCrtcGamma *gamma);\n\nvoid\nXRRFreeGamma (XRRCrtcGamma *gamma);\n\n/* Version 1.3 additions */\n\nXRRScreenResources *\nXRRGetScreenResourcesCurrent (Display *dpy, Window window);\n\nvoid\nXRRSetCrtcTransform (Display\t*dpy,\n\t\t     RRCrtc\tcrtc,\n\t\t     XTransform\t*transform,\n\t\t     _Xconst char *filter,\n\t\t     XFixed\t*params,\n\t\t     int\tnparams);\n\ntypedef struct _XRRCrtcTransformAttributes {\n    XTransform\tpendingTransform;\n    char\t*pendingFilter;\n    int\t\tpendingNparams;\n    XFixed\t*pendingParams;\n    XTransform\tcurrentTransform;\n    char\t*currentFilter;\n    int\t\tcurrentNparams;\n    XFixed\t*currentParams;\n} XRRCrtcTransformAttributes;\n\n/*\n * Get current crtc transforms and filters.\n * Pass *attributes to XFree to free\n */\nStatus\nXRRGetCrtcTransform (Display\t*dpy,\n\t\t     RRCrtc\tcrtc,\n\t\t     XRRCrtcTransformAttributes **attributes);\n\n/*\n * intended to take RRScreenChangeNotify,  or\n * ConfigureNotify (on the root window)\n * returns 1 if it is an event type it understands, 0 if not\n */\nint XRRUpdateConfiguration(XEvent *event);\n\ntypedef struct _XRRPanning {\n    Time            timestamp;\n    unsigned int left;\n    unsigned int top;\n    unsigned int width;\n    unsigned int height;\n    unsigned int track_left;\n    unsigned int track_top;\n    unsigned int track_width;\n    unsigned int track_height;\n    int          border_left;\n    int          border_top;\n    int          border_right;\n    int          border_bottom;\n} XRRPanning;\n\nXRRPanning *\nXRRGetPanning (Display *dpy, XRRScreenResources *resources, RRCrtc crtc);\n\nvoid\nXRRFreePanning (XRRPanning *panning);\n\nStatus\nXRRSetPanning (Display *dpy,\n\t       XRRScreenResources *resources,\n\t       RRCrtc crtc,\n\t       XRRPanning *panning);\n\nvoid\nXRRSetOutputPrimary(Display *dpy,\n\t\t    Window window,\n\t\t    RROutput output);\n\nRROutput\nXRRGetOutputPrimary(Display *dpy,\n\t\t    Window window);\n\ntypedef struct _XRRProviderResources {\n    Time timestamp;\n    int nproviders;\n    RRProvider *providers;\n} XRRProviderResources;\n\nXRRProviderResources *\nXRRGetProviderResources(Display *dpy, Window window);\n\nvoid\nXRRFreeProviderResources(XRRProviderResources *resources);\n\ntypedef struct _XRRProviderInfo {\n    unsigned int capabilities;\n    int ncrtcs;\n    RRCrtc\t*crtcs;\n    int noutputs;\n    RROutput    *outputs;\n    char\t    *name;\n    int nassociatedproviders;\n    RRProvider *associated_providers;\n    unsigned int *associated_capability;\n    int\t\t    nameLen;\n} XRRProviderInfo;\n  \nXRRProviderInfo *\nXRRGetProviderInfo(Display *dpy, XRRScreenResources *resources, RRProvider provider);\n\nvoid\nXRRFreeProviderInfo(XRRProviderInfo *provider);\n\nint\nXRRSetProviderOutputSource(Display *dpy, XID provider, XID source_provider);\n\nint\nXRRSetProviderOffloadSink(Display *dpy, XID provider, XID sink_provider);\n\nAtom *\nXRRListProviderProperties (Display *dpy, RRProvider provider, int *nprop);\n\nXRRPropertyInfo *\nXRRQueryProviderProperty (Display *dpy, RRProvider provider, Atom property);\n\nvoid\nXRRConfigureProviderProperty (Display *dpy, RRProvider provider, Atom property,\n\t\t\t    Bool pending, Bool range, int num_values,\n\t\t\t    long *values);\n\t\t\t\nvoid\nXRRChangeProviderProperty (Display *dpy, RRProvider provider,\n\t\t\t Atom property, Atom type,\n\t\t\t int format, int mode,\n\t\t\t _Xconst unsigned char *data, int nelements);\n\nvoid\nXRRDeleteProviderProperty (Display *dpy, RRProvider provider, Atom property);\n\nint\nXRRGetProviderProperty (Display *dpy, RRProvider provider,\n\t\t\tAtom property, long offset, long length,\n\t\t\tBool _delete, Bool pending, Atom req_type,\n\t\t\tAtom *actual_type, int *actual_format,\n\t\t\tunsigned long *nitems, unsigned long *bytes_after,\n\t\t\tunsigned char **prop);\n\n\ntypedef struct _XRRMonitorInfo {\n    Atom name;\n    Bool primary;\n    Bool automatic;\n    int noutput;\n    int x;\n    int y;\n    int width;\n    int height;\n    int mwidth;\n    int mheight;\n    RROutput *outputs;\n} XRRMonitorInfo;\n\nXRRMonitorInfo *\nXRRAllocateMonitor(Display *dpy, int noutput);\n\nXRRMonitorInfo *\nXRRGetMonitors(Display *dpy, Window window, Bool get_active, int *nmonitors);\n\nvoid\nXRRSetMonitor(Display *dpy, Window window, XRRMonitorInfo *monitor);\n\nvoid\nXRRDeleteMonitor(Display *dpy, Window window, Atom name);\n\nvoid\nXRRFreeMonitors(XRRMonitorInfo *monitors);\n\n_XFUNCPROTOEND\n\n#endif /* _XRANDR_H_ */\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/extensions/Xrender.h",
    "content": "/*\n *\n * Copyright © 2000 SuSE, Inc.\n *\n * Permission to use, copy, modify, distribute, and sell this software and its\n * documentation for any purpose is hereby granted without fee, provided that\n * the above copyright notice appear in all copies and that both that\n * copyright notice and this permission notice appear in supporting\n * documentation, and that the name of SuSE not be used in advertising or\n * publicity pertaining to distribution of the software without specific,\n * written prior permission.  SuSE makes no representations about the\n * suitability of this software for any purpose.  It is provided \"as is\"\n * without express or implied warranty.\n *\n * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE\n * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION\n * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN\n * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n *\n * Author:  Keith Packard, SuSE, Inc.\n */\n\n#ifndef _XRENDER_H_\n#define _XRENDER_H_\n\n#include <X11/Xlib.h>\n#include <X11/Xfuncproto.h>\n#include <X11/Xosdefs.h>\n#include <X11/Xutil.h>\n\n#include <X11/extensions/render.h>\n\ntypedef struct {\n    short   red;\n    short   redMask;\n    short   green;\n    short   greenMask;\n    short   blue;\n    short   blueMask;\n    short   alpha;\n    short   alphaMask;\n} XRenderDirectFormat;\n\ntypedef struct {\n    PictFormat\t\tid;\n    int\t\t\ttype;\n    int\t\t\tdepth;\n    XRenderDirectFormat\tdirect;\n    Colormap\t\tcolormap;\n} XRenderPictFormat;\n\n#define PictFormatID\t    (1 << 0)\n#define PictFormatType\t    (1 << 1)\n#define PictFormatDepth\t    (1 << 2)\n#define PictFormatRed\t    (1 << 3)\n#define PictFormatRedMask   (1 << 4)\n#define PictFormatGreen\t    (1 << 5)\n#define PictFormatGreenMask (1 << 6)\n#define PictFormatBlue\t    (1 << 7)\n#define PictFormatBlueMask  (1 << 8)\n#define PictFormatAlpha\t    (1 << 9)\n#define PictFormatAlphaMask (1 << 10)\n#define PictFormatColormap  (1 << 11)\n\ntypedef struct _XRenderPictureAttributes {\n    int \t\trepeat;\n    Picture\t\talpha_map;\n    int\t\t\talpha_x_origin;\n    int\t\t\talpha_y_origin;\n    int\t\t\tclip_x_origin;\n    int\t\t\tclip_y_origin;\n    Pixmap\t\tclip_mask;\n    Bool\t\tgraphics_exposures;\n    int\t\t\tsubwindow_mode;\n    int\t\t\tpoly_edge;\n    int\t\t\tpoly_mode;\n    Atom\t\tdither;\n    Bool\t\tcomponent_alpha;\n} XRenderPictureAttributes;\n\ntypedef struct {\n    unsigned short   red;\n    unsigned short   green;\n    unsigned short   blue;\n    unsigned short   alpha;\n} XRenderColor;\n\ntypedef struct _XGlyphInfo {\n    unsigned short  width;\n    unsigned short  height;\n    short\t    x;\n    short\t    y;\n    short\t    xOff;\n    short\t    yOff;\n} XGlyphInfo;\n\ntypedef struct _XGlyphElt8 {\n    GlyphSet\t\t    glyphset;\n    _Xconst char\t    *chars;\n    int\t\t\t    nchars;\n    int\t\t\t    xOff;\n    int\t\t\t    yOff;\n} XGlyphElt8;\n\ntypedef struct _XGlyphElt16 {\n    GlyphSet\t\t    glyphset;\n    _Xconst unsigned short  *chars;\n    int\t\t\t    nchars;\n    int\t\t\t    xOff;\n    int\t\t\t    yOff;\n} XGlyphElt16;\n\ntypedef struct _XGlyphElt32 {\n    GlyphSet\t\t    glyphset;\n    _Xconst unsigned int    *chars;\n    int\t\t\t    nchars;\n    int\t\t\t    xOff;\n    int\t\t\t    yOff;\n} XGlyphElt32;\n\ntypedef double\tXDouble;\n\ntypedef struct _XPointDouble {\n    XDouble  x, y;\n} XPointDouble;\n\n#define XDoubleToFixed(f)    ((XFixed) ((f) * 65536))\n#define XFixedToDouble(f)    (((XDouble) (f)) / 65536)\n\ntypedef int XFixed;\n\ntypedef struct _XPointFixed {\n    XFixed  x, y;\n} XPointFixed;\n\ntypedef struct _XLineFixed {\n    XPointFixed\tp1, p2;\n} XLineFixed;\n\ntypedef struct _XTriangle {\n    XPointFixed\tp1, p2, p3;\n} XTriangle;\n\ntypedef struct _XCircle {\n    XFixed x;\n    XFixed y;\n    XFixed radius;\n} XCircle;\n\ntypedef struct _XTrapezoid {\n    XFixed  top, bottom;\n    XLineFixed\tleft, right;\n} XTrapezoid;\n\ntypedef struct _XTransform {\n    XFixed  matrix[3][3];\n} XTransform;\n\ntypedef struct _XFilters {\n    int\t    nfilter;\n    char    **filter;\n    int\t    nalias;\n    short   *alias;\n} XFilters;\n\ntypedef struct _XIndexValue {\n    unsigned long    pixel;\n    unsigned short   red, green, blue, alpha;\n} XIndexValue;\n\ntypedef struct _XAnimCursor {\n    Cursor\t    cursor;\n    unsigned long   delay;\n} XAnimCursor;\n\ntypedef struct _XSpanFix {\n    XFixed\t    left, right, y;\n} XSpanFix;\n\ntypedef struct _XTrap {\n    XSpanFix\t    top, bottom;\n} XTrap;\n\ntypedef struct _XLinearGradient {\n    XPointFixed p1;\n    XPointFixed p2;\n} XLinearGradient;\n\ntypedef struct _XRadialGradient {\n    XCircle inner;\n    XCircle outer;\n} XRadialGradient;\n\ntypedef struct _XConicalGradient {\n    XPointFixed center;\n    XFixed angle; /* in degrees */\n} XConicalGradient;\n\n_XFUNCPROTOBEGIN\n\nBool XRenderQueryExtension (Display *dpy, int *event_basep, int *error_basep);\n\nStatus XRenderQueryVersion (Display *dpy,\n\t\t\t    int     *major_versionp,\n\t\t\t    int     *minor_versionp);\n\nStatus XRenderQueryFormats (Display *dpy);\n\nint XRenderQuerySubpixelOrder (Display *dpy, int screen);\n\nBool XRenderSetSubpixelOrder (Display *dpy, int screen, int subpixel);\n\nXRenderPictFormat *\nXRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual);\n\nXRenderPictFormat *\nXRenderFindFormat (Display\t\t\t*dpy,\n\t\t   unsigned long\t\tmask,\n\t\t   _Xconst XRenderPictFormat\t*templ,\n\t\t   int\t\t\t\tcount);\n\n#define PictStandardARGB32  0\n#define PictStandardRGB24   1\n#define PictStandardA8\t    2\n#define PictStandardA4\t    3\n#define PictStandardA1\t    4\n#define PictStandardNUM\t    5\n\nXRenderPictFormat *\nXRenderFindStandardFormat (Display\t\t*dpy,\n\t\t\t   int\t\t\tformat);\n\nXIndexValue *\nXRenderQueryPictIndexValues(Display\t\t\t*dpy,\n\t\t\t    _Xconst XRenderPictFormat\t*format,\n\t\t\t    int\t\t\t\t*num);\n\nPicture\nXRenderCreatePicture (Display\t\t\t\t*dpy,\n\t\t      Drawable\t\t\t\tdrawable,\n\t\t      _Xconst XRenderPictFormat\t\t*format,\n\t\t      unsigned long\t\t\tvaluemask,\n\t\t      _Xconst XRenderPictureAttributes\t*attributes);\n\nvoid\nXRenderChangePicture (Display\t\t\t\t*dpy,\n\t\t      Picture\t\t\t\tpicture,\n\t\t      unsigned long\t\t\tvaluemask,\n\t\t      _Xconst XRenderPictureAttributes  *attributes);\n\nvoid\nXRenderSetPictureClipRectangles (Display\t    *dpy,\n\t\t\t\t Picture\t    picture,\n\t\t\t\t int\t\t    xOrigin,\n\t\t\t\t int\t\t    yOrigin,\n\t\t\t\t _Xconst XRectangle *rects,\n\t\t\t\t int\t\t    n);\n\nvoid\nXRenderSetPictureClipRegion (Display\t    *dpy,\n\t\t\t     Picture\t    picture,\n\t\t\t     Region\t    r);\n\nvoid\nXRenderSetPictureTransform (Display\t    *dpy,\n\t\t\t    Picture\t    picture,\n\t\t\t    XTransform\t    *transform);\n\nvoid\nXRenderFreePicture (Display                   *dpy,\n\t\t    Picture                   picture);\n\nvoid\nXRenderComposite (Display   *dpy,\n\t\t  int\t    op,\n\t\t  Picture   src,\n\t\t  Picture   mask,\n\t\t  Picture   dst,\n\t\t  int\t    src_x,\n\t\t  int\t    src_y,\n\t\t  int\t    mask_x,\n\t\t  int\t    mask_y,\n\t\t  int\t    dst_x,\n\t\t  int\t    dst_y,\n\t\t  unsigned int\twidth,\n\t\t  unsigned int\theight);\n\nGlyphSet\nXRenderCreateGlyphSet (Display *dpy, _Xconst XRenderPictFormat *format);\n\nGlyphSet\nXRenderReferenceGlyphSet (Display *dpy, GlyphSet existing);\n\nvoid\nXRenderFreeGlyphSet (Display *dpy, GlyphSet glyphset);\n\nvoid\nXRenderAddGlyphs (Display\t\t*dpy,\n\t\t  GlyphSet\t\tglyphset,\n\t\t  _Xconst Glyph\t\t*gids,\n\t\t  _Xconst XGlyphInfo\t*glyphs,\n\t\t  int\t\t\tnglyphs,\n\t\t  _Xconst char\t\t*images,\n\t\t  int\t\t\tnbyte_images);\n\nvoid\nXRenderFreeGlyphs (Display\t    *dpy,\n\t\t   GlyphSet\t    glyphset,\n\t\t   _Xconst Glyph    *gids,\n\t\t   int\t\t    nglyphs);\n\nvoid\nXRenderCompositeString8 (Display\t\t    *dpy,\n\t\t\t int\t\t\t    op,\n\t\t\t Picture\t\t    src,\n\t\t\t Picture\t\t    dst,\n\t\t\t _Xconst XRenderPictFormat  *maskFormat,\n\t\t\t GlyphSet\t\t    glyphset,\n\t\t\t int\t\t\t    xSrc,\n\t\t\t int\t\t\t    ySrc,\n\t\t\t int\t\t\t    xDst,\n\t\t\t int\t\t\t    yDst,\n\t\t\t _Xconst char\t\t    *string,\n\t\t\t int\t\t\t    nchar);\n\nvoid\nXRenderCompositeString16 (Display\t\t    *dpy,\n\t\t\t  int\t\t\t    op,\n\t\t\t  Picture\t\t    src,\n\t\t\t  Picture\t\t    dst,\n\t\t\t  _Xconst XRenderPictFormat *maskFormat,\n\t\t\t  GlyphSet\t\t    glyphset,\n\t\t\t  int\t\t\t    xSrc,\n\t\t\t  int\t\t\t    ySrc,\n\t\t\t  int\t\t\t    xDst,\n\t\t\t  int\t\t\t    yDst,\n\t\t\t  _Xconst unsigned short    *string,\n\t\t\t  int\t\t\t    nchar);\n\nvoid\nXRenderCompositeString32 (Display\t\t    *dpy,\n\t\t\t  int\t\t\t    op,\n\t\t\t  Picture\t\t    src,\n\t\t\t  Picture\t\t    dst,\n\t\t\t  _Xconst XRenderPictFormat *maskFormat,\n\t\t\t  GlyphSet\t\t    glyphset,\n\t\t\t  int\t\t\t    xSrc,\n\t\t\t  int\t\t\t    ySrc,\n\t\t\t  int\t\t\t    xDst,\n\t\t\t  int\t\t\t    yDst,\n\t\t\t  _Xconst unsigned int\t    *string,\n\t\t\t  int\t\t\t    nchar);\n\nvoid\nXRenderCompositeText8 (Display\t\t\t    *dpy,\n\t\t       int\t\t\t    op,\n\t\t       Picture\t\t\t    src,\n\t\t       Picture\t\t\t    dst,\n\t\t       _Xconst XRenderPictFormat    *maskFormat,\n\t\t       int\t\t\t    xSrc,\n\t\t       int\t\t\t    ySrc,\n\t\t       int\t\t\t    xDst,\n\t\t       int\t\t\t    yDst,\n\t\t       _Xconst XGlyphElt8\t    *elts,\n\t\t       int\t\t\t    nelt);\n\nvoid\nXRenderCompositeText16 (Display\t\t\t    *dpy,\n\t\t\tint\t\t\t    op,\n\t\t\tPicture\t\t\t    src,\n\t\t\tPicture\t\t\t    dst,\n\t\t\t_Xconst XRenderPictFormat   *maskFormat,\n\t\t\tint\t\t\t    xSrc,\n\t\t\tint\t\t\t    ySrc,\n\t\t\tint\t\t\t    xDst,\n\t\t\tint\t\t\t    yDst,\n\t\t\t_Xconst XGlyphElt16\t    *elts,\n\t\t\tint\t\t\t    nelt);\n\nvoid\nXRenderCompositeText32 (Display\t\t\t    *dpy,\n\t\t\tint\t\t\t    op,\n\t\t\tPicture\t\t\t    src,\n\t\t\tPicture\t\t\t    dst,\n\t\t\t_Xconst XRenderPictFormat   *maskFormat,\n\t\t\tint\t\t\t    xSrc,\n\t\t\tint\t\t\t    ySrc,\n\t\t\tint\t\t\t    xDst,\n\t\t\tint\t\t\t    yDst,\n\t\t\t_Xconst XGlyphElt32\t    *elts,\n\t\t\tint\t\t\t    nelt);\n\nvoid\nXRenderFillRectangle (Display\t\t    *dpy,\n\t\t      int\t\t    op,\n\t\t      Picture\t\t    dst,\n\t\t      _Xconst XRenderColor  *color,\n\t\t      int\t\t    x,\n\t\t      int\t\t    y,\n\t\t      unsigned int\t    width,\n\t\t      unsigned int\t    height);\n\nvoid\nXRenderFillRectangles (Display\t\t    *dpy,\n\t\t       int\t\t    op,\n\t\t       Picture\t\t    dst,\n\t\t       _Xconst XRenderColor *color,\n\t\t       _Xconst XRectangle   *rectangles,\n\t\t       int\t\t    n_rects);\n\nvoid\nXRenderCompositeTrapezoids (Display\t\t*dpy,\n\t\t\t    int\t\t\top,\n\t\t\t    Picture\t\tsrc,\n\t\t\t    Picture\t\tdst,\n\t\t\t    _Xconst XRenderPictFormat\t*maskFormat,\n\t\t\t    int\t\t\txSrc,\n\t\t\t    int\t\t\tySrc,\n\t\t\t    _Xconst XTrapezoid\t*traps,\n\t\t\t    int\t\t\tntrap);\n\nvoid\nXRenderCompositeTriangles (Display\t\t*dpy,\n\t\t\t   int\t\t\top,\n\t\t\t   Picture\t\tsrc,\n\t\t\t   Picture\t\tdst,\n\t\t\t    _Xconst XRenderPictFormat\t*maskFormat,\n\t\t\t   int\t\t\txSrc,\n\t\t\t   int\t\t\tySrc,\n\t\t\t   _Xconst XTriangle\t*triangles,\n\t\t\t   int\t\t\tntriangle);\n\nvoid\nXRenderCompositeTriStrip (Display\t\t*dpy,\n\t\t\t  int\t\t\top,\n\t\t\t  Picture\t\tsrc,\n\t\t\t  Picture\t\tdst,\n\t\t\t    _Xconst XRenderPictFormat\t*maskFormat,\n\t\t\t  int\t\t\txSrc,\n\t\t\t  int\t\t\tySrc,\n\t\t\t  _Xconst XPointFixed\t*points,\n\t\t\t  int\t\t\tnpoint);\n\nvoid\nXRenderCompositeTriFan (Display\t\t\t*dpy,\n\t\t\tint\t\t\top,\n\t\t\tPicture\t\t\tsrc,\n\t\t\tPicture\t\t\tdst,\n\t\t\t_Xconst XRenderPictFormat\t*maskFormat,\n\t\t\tint\t\t\txSrc,\n\t\t\tint\t\t\tySrc,\n\t\t\t_Xconst XPointFixed\t*points,\n\t\t\tint\t\t\tnpoint);\n\nvoid\nXRenderCompositeDoublePoly (Display\t\t    *dpy,\n\t\t\t    int\t\t\t    op,\n\t\t\t    Picture\t\t    src,\n\t\t\t    Picture\t\t    dst,\n\t\t\t    _Xconst XRenderPictFormat\t*maskFormat,\n\t\t\t    int\t\t\t    xSrc,\n\t\t\t    int\t\t\t    ySrc,\n\t\t\t    int\t\t\t    xDst,\n\t\t\t    int\t\t\t    yDst,\n\t\t\t    _Xconst XPointDouble    *fpoints,\n\t\t\t    int\t\t\t    npoints,\n\t\t\t    int\t\t\t    winding);\nStatus\nXRenderParseColor(Display\t*dpy,\n\t\t  char\t\t*spec,\n\t\t  XRenderColor\t*def);\n\nCursor\nXRenderCreateCursor (Display\t    *dpy,\n\t\t     Picture\t    source,\n\t\t     unsigned int   x,\n\t\t     unsigned int   y);\n\nXFilters *\nXRenderQueryFilters (Display *dpy, Drawable drawable);\n\nvoid\nXRenderSetPictureFilter (Display    *dpy,\n\t\t\t Picture    picture,\n\t\t\t const char *filter,\n\t\t\t XFixed\t    *params,\n\t\t\t int\t    nparams);\n\nCursor\nXRenderCreateAnimCursor (Display\t*dpy,\n\t\t\t int\t\tncursor,\n\t\t\t XAnimCursor\t*cursors);\n\n\nvoid\nXRenderAddTraps (Display\t    *dpy,\n\t\t Picture\t    picture,\n\t\t int\t\t    xOff,\n\t\t int\t\t    yOff,\n\t\t _Xconst XTrap\t    *traps,\n\t\t int\t\t    ntrap);\n\nPicture XRenderCreateSolidFill (Display *dpy,\n                                const XRenderColor *color);\n\nPicture XRenderCreateLinearGradient (Display *dpy,\n                                     const XLinearGradient *gradient,\n                                     const XFixed *stops,\n                                     const XRenderColor *colors,\n                                     int nstops);\n\nPicture XRenderCreateRadialGradient (Display *dpy,\n                                     const XRadialGradient *gradient,\n                                     const XFixed *stops,\n                                     const XRenderColor *colors,\n                                     int nstops);\n\nPicture XRenderCreateConicalGradient (Display *dpy,\n                                      const XConicalGradient *gradient,\n                                      const XFixed *stops,\n                                      const XRenderColor *colors,\n                                      int nstops);\n\n_XFUNCPROTOEND\n\n#endif /* _XRENDER_H_ */\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/extensions/randr.h",
    "content": "/*\n * Copyright © 2000 Compaq Computer Corporation\n * Copyright © 2002 Hewlett Packard Company\n * Copyright © 2006 Intel Corporation\n * Copyright © 2008 Red Hat, Inc.\n *\n * Permission to use, copy, modify, distribute, and sell this software and its\n * documentation for any purpose is hereby granted without fee, provided that\n * the above copyright notice appear in all copies and that both that copyright\n * notice and this permission notice appear in supporting documentation, and\n * that the name of the copyright holders not be used in advertising or\n * publicity pertaining to distribution of the software without specific,\n * written prior permission.  The copyright holders make no representations\n * about the suitability of this software for any purpose.  It is provided \"as\n * is\" without express or implied warranty.\n *\n * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\n * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO\n * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR\n * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,\n * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE\n * OF THIS SOFTWARE.\n *\n * Author:  Jim Gettys, HP Labs, Hewlett-Packard, Inc.\n *\t    Keith Packard, Intel Corporation\n */\n\n#ifndef _RANDR_H_\n#define _RANDR_H_\n\ntypedef unsigned short\tRotation;\ntypedef unsigned short\tSizeID;\ntypedef unsigned short\tSubpixelOrder;\ntypedef unsigned short\tConnection;\ntypedef unsigned short\tXRandrRotation;\ntypedef unsigned short\tXRandrSizeID;\ntypedef unsigned short\tXRandrSubpixelOrder;\ntypedef unsigned long\tXRandrModeFlags;\n\n#define RANDR_NAME\t\t\"RANDR\"\n#define RANDR_MAJOR\t\t1\n#define RANDR_MINOR\t\t4\n\n#define RRNumberErrors\t\t4\n#define RRNumberEvents\t\t2\n#define RRNumberRequests\t42\n\n#define X_RRQueryVersion\t0\n/* we skip 1 to make old clients fail pretty immediately */\n#define X_RROldGetScreenInfo\t1\n#define X_RR1_0SetScreenConfig\t2\n/* V1.0 apps share the same set screen config request id */\n#define X_RRSetScreenConfig\t2\n#define X_RROldScreenChangeSelectInput\t3\n/* 3 used to be ScreenChangeSelectInput; deprecated */\n#define X_RRSelectInput\t\t4\n#define X_RRGetScreenInfo\t5\n\n/* V1.2 additions */\n#define X_RRGetScreenSizeRange\t    6\n#define X_RRSetScreenSize\t    7\n#define X_RRGetScreenResources\t    8\n#define X_RRGetOutputInfo\t    9\n#define X_RRListOutputProperties    10\n#define X_RRQueryOutputProperty\t    11\n#define X_RRConfigureOutputProperty 12\n#define X_RRChangeOutputProperty    13\n#define X_RRDeleteOutputProperty    14\n#define X_RRGetOutputProperty\t    15\n#define X_RRCreateMode\t\t    16\n#define X_RRDestroyMode\t\t    17\n#define X_RRAddOutputMode\t    18\n#define X_RRDeleteOutputMode\t    19\n#define X_RRGetCrtcInfo\t\t    20\n#define X_RRSetCrtcConfig\t    21\n#define X_RRGetCrtcGammaSize\t    22\n#define X_RRGetCrtcGamma\t    23\n#define X_RRSetCrtcGamma\t    24\n\n/* V1.3 additions */\n#define X_RRGetScreenResourcesCurrent\t25\n#define X_RRSetCrtcTransform\t    26\n#define X_RRGetCrtcTransform\t    27\n#define X_RRGetPanning\t\t    28\n#define X_RRSetPanning\t\t    29\n#define X_RRSetOutputPrimary\t    30\n#define X_RRGetOutputPrimary\t    31\n\n#define RRTransformUnit\t\t    (1L << 0)\n#define RRTransformScaleUp\t    (1L << 1)\n#define RRTransformScaleDown\t    (1L << 2)\n#define RRTransformProjective\t    (1L << 3)\n\n/* v1.4 */\n#define X_RRGetProviders\t      32\n#define X_RRGetProviderInfo\t      33\n#define X_RRSetProviderOffloadSink    34\n#define X_RRSetProviderOutputSource   35\n#define X_RRListProviderProperties    36\n#define X_RRQueryProviderProperty     37\n#define X_RRConfigureProviderProperty 38\n#define X_RRChangeProviderProperty    39\n#define X_RRDeleteProviderProperty    40\n#define X_RRGetProviderProperty\t      41\n\n/* Event selection bits */\n#define RRScreenChangeNotifyMask  (1L << 0)\n/* V1.2 additions */\n#define RRCrtcChangeNotifyMask\t    (1L << 1)\n#define RROutputChangeNotifyMask    (1L << 2)\n#define RROutputPropertyNotifyMask  (1L << 3)\n/* V1.4 additions */\n#define RRProviderChangeNotifyMask   (1L << 4)\n#define RRProviderPropertyNotifyMask (1L << 5)\n#define RRResourceChangeNotifyMask   (1L << 6)\n\n/* Event codes */\n#define RRScreenChangeNotify\t0\n/* V1.2 additions */\n#define RRNotify\t\t    1\n/* RRNotify Subcodes */\n#define  RRNotify_CrtcChange\t    0\n#define  RRNotify_OutputChange\t    1\n#define  RRNotify_OutputProperty    2\n#define  RRNotify_ProviderChange    3\n#define  RRNotify_ProviderProperty  4\n#define  RRNotify_ResourceChange    5\n/* used in the rotation field; rotation and reflection in 0.1 proto. */\n#define RR_Rotate_0\t\t1\n#define RR_Rotate_90\t\t2\n#define RR_Rotate_180\t\t4\n#define RR_Rotate_270\t\t8\n\n/* new in 1.0 protocol, to allow reflection of screen */\n\n#define RR_Reflect_X\t\t16\n#define RR_Reflect_Y\t\t32\n\n#define RRSetConfigSuccess\t\t0\n#define RRSetConfigInvalidConfigTime\t1\n#define RRSetConfigInvalidTime\t\t2\n#define RRSetConfigFailed\t\t3\n\n/* new in 1.2 protocol */\n\n#define RR_HSyncPositive\t0x00000001\n#define RR_HSyncNegative\t0x00000002\n#define RR_VSyncPositive\t0x00000004\n#define RR_VSyncNegative\t0x00000008\n#define RR_Interlace\t\t0x00000010\n#define RR_DoubleScan\t\t0x00000020\n#define RR_CSync\t\t0x00000040\n#define RR_CSyncPositive\t0x00000080\n#define RR_CSyncNegative\t0x00000100\n#define RR_HSkewPresent\t\t0x00000200\n#define RR_BCast\t\t0x00000400\n#define RR_PixelMultiplex\t0x00000800\n#define RR_DoubleClock\t\t0x00001000\n#define RR_ClockDivideBy2\t0x00002000\n\n#define RR_Connected\t\t0\n#define RR_Disconnected\t\t1\n#define RR_UnknownConnection\t2\n\n#define BadRROutput\t\t0\n#define BadRRCrtc\t\t1\n#define BadRRMode\t\t2\n#define BadRRProvider\t\t3\n\n/* Conventional RandR output properties */\n\n#define RR_PROPERTY_BACKLIGHT\t\t\"Backlight\"\n#define RR_PROPERTY_RANDR_EDID\t\t\"EDID\"\n#define RR_PROPERTY_SIGNAL_FORMAT\t\"SignalFormat\"\n#define RR_PROPERTY_SIGNAL_PROPERTIES\t\"SignalProperties\"\n#define RR_PROPERTY_CONNECTOR_TYPE\t\"ConnectorType\"\n#define RR_PROPERTY_CONNECTOR_NUMBER\t\"ConnectorNumber\"\n#define RR_PROPERTY_COMPATIBILITY_LIST\t\"CompatibilityList\"\n#define RR_PROPERTY_CLONE_LIST\t\t\"CloneList\"\n#define RR_PROPERTY_BORDER\t\t\"Border\"\n#define RR_PROPERTY_BORDER_DIMENSIONS\t\"BorderDimensions\"\n\n/* roles this device can carry out */\n#define RR_Capability_None 0\n#define RR_Capability_SourceOutput 1\n#define RR_Capability_SinkOutput 2\n#define RR_Capability_SourceOffload 4\n#define RR_Capability_SinkOffload 8\n\n#endif\t/* _RANDR_H_ */\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/extensions/render.h",
    "content": "/*\n * $XFree86: xc/include/extensions/render.h,v 1.10 2002/11/06 22:47:49 keithp Exp $\n *\n * Copyright © 2000 SuSE, Inc.\n *\n * Permission to use, copy, modify, distribute, and sell this software and its\n * documentation for any purpose is hereby granted without fee, provided that\n * the above copyright notice appear in all copies and that both that\n * copyright notice and this permission notice appear in supporting\n * documentation, and that the name of SuSE not be used in advertising or\n * publicity pertaining to distribution of the software without specific,\n * written prior permission.  SuSE makes no representations about the\n * suitability of this software for any purpose.  It is provided \"as is\"\n * without express or implied warranty.\n *\n * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE\n * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION\n * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN\n * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n *\n * Author:  Keith Packard, SuSE, Inc.\n */\n\n#ifndef _RENDER_H_\n#define _RENDER_H_\n\n#include <X11/Xdefs.h>\n\ntypedef XID\t\tGlyph;\ntypedef XID\t\tGlyphSet;\ntypedef XID\t\tPicture;\ntypedef XID\t\tPictFormat;\n\n#define RENDER_NAME\t\"RENDER\"\n#define RENDER_MAJOR\t0\n#define RENDER_MINOR\t11\n\n#define X_RenderQueryVersion\t\t    0\n#define X_RenderQueryPictFormats\t    1\n#define X_RenderQueryPictIndexValues\t    2\t/* 0.7 */\n#define X_RenderQueryDithers\t\t    3\n#define X_RenderCreatePicture\t\t    4\n#define X_RenderChangePicture\t\t    5\n#define X_RenderSetPictureClipRectangles    6\n#define X_RenderFreePicture\t\t    7\n#define X_RenderComposite\t\t    8\n#define X_RenderScale\t\t\t    9\n#define X_RenderTrapezoids\t\t    10\n#define X_RenderTriangles\t\t    11\n#define X_RenderTriStrip\t\t    12\n#define X_RenderTriFan\t\t\t    13\n#define X_RenderColorTrapezoids\t\t    14\n#define X_RenderColorTriangles\t\t    15\n/* #define X_RenderTransform\t\t    16 */\n#define X_RenderCreateGlyphSet\t\t    17\n#define X_RenderReferenceGlyphSet\t    18\n#define X_RenderFreeGlyphSet\t\t    19\n#define X_RenderAddGlyphs\t\t    20\n#define X_RenderAddGlyphsFromPicture\t    21\n#define X_RenderFreeGlyphs\t\t    22\n#define X_RenderCompositeGlyphs8\t    23\n#define X_RenderCompositeGlyphs16\t    24\n#define X_RenderCompositeGlyphs32\t    25\n#define X_RenderFillRectangles\t\t    26\n/* 0.5 */\n#define X_RenderCreateCursor\t\t    27\n/* 0.6 */\n#define X_RenderSetPictureTransform\t    28\n#define X_RenderQueryFilters\t\t    29\n#define X_RenderSetPictureFilter\t    30\n/* 0.8 */\n#define X_RenderCreateAnimCursor\t    31\n/* 0.9 */\n#define X_RenderAddTraps\t\t    32\n/* 0.10 */\n#define X_RenderCreateSolidFill             33\n#define X_RenderCreateLinearGradient        34\n#define X_RenderCreateRadialGradient        35\n#define X_RenderCreateConicalGradient       36\n#define RenderNumberRequests\t\t    (X_RenderCreateConicalGradient+1)\n\n#define BadPictFormat\t\t\t    0\n#define BadPicture\t\t\t    1\n#define BadPictOp\t\t\t    2\n#define BadGlyphSet\t\t\t    3\n#define BadGlyph\t\t\t    4\n#define RenderNumberErrors\t\t    (BadGlyph+1)\n\n#define PictTypeIndexed\t\t\t    0\n#define PictTypeDirect\t\t\t    1\n\n#define PictOpMinimum\t\t\t    0\n#define PictOpClear\t\t\t    0\n#define PictOpSrc\t\t\t    1\n#define PictOpDst\t\t\t    2\n#define PictOpOver\t\t\t    3\n#define PictOpOverReverse\t\t    4\n#define PictOpIn\t\t\t    5\n#define PictOpInReverse\t\t\t    6\n#define PictOpOut\t\t\t    7\n#define PictOpOutReverse\t\t    8\n#define PictOpAtop\t\t\t    9\n#define PictOpAtopReverse\t\t    10\n#define PictOpXor\t\t\t    11\n#define PictOpAdd\t\t\t    12\n#define PictOpSaturate\t\t\t    13\n#define PictOpMaximum\t\t\t    13\n\n/*\n * Operators only available in version 0.2\n */\n#define PictOpDisjointMinimum\t\t\t    0x10\n#define PictOpDisjointClear\t\t\t    0x10\n#define PictOpDisjointSrc\t\t\t    0x11\n#define PictOpDisjointDst\t\t\t    0x12\n#define PictOpDisjointOver\t\t\t    0x13\n#define PictOpDisjointOverReverse\t\t    0x14\n#define PictOpDisjointIn\t\t\t    0x15\n#define PictOpDisjointInReverse\t\t\t    0x16\n#define PictOpDisjointOut\t\t\t    0x17\n#define PictOpDisjointOutReverse\t\t    0x18\n#define PictOpDisjointAtop\t\t\t    0x19\n#define PictOpDisjointAtopReverse\t\t    0x1a\n#define PictOpDisjointXor\t\t\t    0x1b\n#define PictOpDisjointMaximum\t\t\t    0x1b\n\n#define PictOpConjointMinimum\t\t\t    0x20\n#define PictOpConjointClear\t\t\t    0x20\n#define PictOpConjointSrc\t\t\t    0x21\n#define PictOpConjointDst\t\t\t    0x22\n#define PictOpConjointOver\t\t\t    0x23\n#define PictOpConjointOverReverse\t\t    0x24\n#define PictOpConjointIn\t\t\t    0x25\n#define PictOpConjointInReverse\t\t\t    0x26\n#define PictOpConjointOut\t\t\t    0x27\n#define PictOpConjointOutReverse\t\t    0x28\n#define PictOpConjointAtop\t\t\t    0x29\n#define PictOpConjointAtopReverse\t\t    0x2a\n#define PictOpConjointXor\t\t\t    0x2b\n#define PictOpConjointMaximum\t\t\t    0x2b\n\n/*\n * Operators only available in version 0.11\n */\n#define PictOpBlendMinimum\t\t\t    0x30\n#define PictOpMultiply\t\t\t\t    0x30\n#define PictOpScreen\t\t\t\t    0x31\n#define PictOpOverlay\t\t\t\t    0x32\n#define PictOpDarken\t\t\t\t    0x33\n#define PictOpLighten\t\t\t\t    0x34\n#define PictOpColorDodge\t\t\t    0x35\n#define PictOpColorBurn\t\t\t\t    0x36\n#define PictOpHardLight\t\t\t\t    0x37\n#define PictOpSoftLight\t\t\t\t    0x38\n#define PictOpDifference\t\t\t    0x39\n#define PictOpExclusion\t\t\t\t    0x3a\n#define PictOpHSLHue\t\t\t\t    0x3b\n#define PictOpHSLSaturation\t\t\t    0x3c\n#define PictOpHSLColor\t\t\t\t    0x3d\n#define PictOpHSLLuminosity\t\t\t    0x3e\n#define PictOpBlendMaximum\t\t\t    0x3e\n\n#define PolyEdgeSharp\t\t\t    0\n#define PolyEdgeSmooth\t\t\t    1\n\n#define PolyModePrecise\t\t\t    0\n#define PolyModeImprecise\t\t    1\n\n#define CPRepeat\t\t\t    (1 << 0)\n#define CPAlphaMap\t\t\t    (1 << 1)\n#define CPAlphaXOrigin\t\t\t    (1 << 2)\n#define CPAlphaYOrigin\t\t\t    (1 << 3)\n#define CPClipXOrigin\t\t\t    (1 << 4)\n#define CPClipYOrigin\t\t\t    (1 << 5)\n#define CPClipMask\t\t\t    (1 << 6)\n#define CPGraphicsExposure\t\t    (1 << 7)\n#define CPSubwindowMode\t\t\t    (1 << 8)\n#define CPPolyEdge\t\t\t    (1 << 9)\n#define CPPolyMode\t\t\t    (1 << 10)\n#define CPDither\t\t\t    (1 << 11)\n#define CPComponentAlpha\t\t    (1 << 12)\n#define CPLastBit\t\t\t    12\n\n/* Filters included in 0.6 */\n#define FilterNearest\t\t\t    \"nearest\"\n#define FilterBilinear\t\t\t    \"bilinear\"\n/* Filters included in 0.10 */\n#define FilterConvolution\t\t    \"convolution\"\n\n#define FilterFast\t\t\t    \"fast\"\n#define FilterGood\t\t\t    \"good\"\n#define FilterBest\t\t\t    \"best\"\n\n#define FilterAliasNone\t\t\t    -1\n\n/* Subpixel orders included in 0.6 */\n#define SubPixelUnknown\t\t\t    0\n#define SubPixelHorizontalRGB\t\t    1\n#define SubPixelHorizontalBGR\t\t    2\n#define SubPixelVerticalRGB\t\t    3\n#define SubPixelVerticalBGR\t\t    4\n#define SubPixelNone\t\t\t    5\n\n/* Extended repeat attributes included in 0.10 */\n#define RepeatNone                          0\n#define RepeatNormal                        1\n#define RepeatPad                           2\n#define RepeatReflect                       3\n\n#endif\t/* _RENDER_H_ */\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/extensions/xf86vm.h",
    "content": "/*\nCopyright 1995  Kaleb S. KEITHLEY\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES \nOR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\nExcept as contained in this notice, the name of Kaleb S. KEITHLEY \nshall not be used in advertising or otherwise to promote the sale, use \nor other dealings in this Software without prior written authorization\nfrom Kaleb S. KEITHLEY\n*/\n/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */\n#ifndef _XF86VM_H_\n#define _XF86VM_H_\n#include <X11/Xmd.h>\n#define CLKFLAG_PROGRAMABLE\t\t1\n#ifdef XF86VIDMODE_EVENTS\n#define XF86VidModeNotify\t\t0\n#define XF86VidModeNumberEvents\t\t(XF86VidModeNotify + 1)\n#define XF86VidModeNotifyMask\t\t0x00000001\n#define XF86VidModeNonEvent\t\t0\n#define XF86VidModeModeChange\t\t1\n#else\n#define XF86VidModeNumberEvents\t\t0\n#endif\n#define XF86VidModeBadClock\t\t0\n#define XF86VidModeBadHTimings\t\t1\n#define XF86VidModeBadVTimings\t\t2\n#define XF86VidModeModeUnsuitable\t3\n#define XF86VidModeExtensionDisabled\t4\n#define XF86VidModeClientNotLocal\t5\n#define XF86VidModeZoomLocked\t\t6\n#define XF86VidModeNumberErrors\t\t(XF86VidModeZoomLocked + 1)\n#define XF86VM_READ_PERMISSION\t1\n#define XF86VM_WRITE_PERMISSION\t2\n#endif\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/extensions/xf86vmode.h",
    "content": "/*\n\nCopyright 1995  Kaleb S. KEITHLEY\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES\nOR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nExcept as contained in this notice, the name of Kaleb S. KEITHLEY\nshall not be used in advertising or otherwise to promote the sale, use\nor other dealings in this Software without prior written authorization\nfrom Kaleb S. KEITHLEY\n\n*/\n\n/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */\n\n#ifndef _XF86VIDMODE_H_\n#define _XF86VIDMODE_H_\n\n#include <X11/Xfuncproto.h>\n#include <X11/Xmd.h>\n#include <X11/extensions/xf86vm.h>\n\n#define CLKFLAG_PROGRAMABLE\t\t1\n\n#ifdef XF86VIDMODE_EVENTS\n#define XF86VidModeNotify\t\t0\n#define XF86VidModeNumberEvents\t\t(XF86VidModeNotify + 1)\n\n#define XF86VidModeNotifyMask\t\t0x00000001\n\n#define XF86VidModeNonEvent\t\t0\n#define XF86VidModeModeChange\t\t1\n#else\n#define XF86VidModeNumberEvents\t\t0\n#endif\n\n#define XF86VidModeBadClock\t\t0\n#define XF86VidModeBadHTimings\t\t1\n#define XF86VidModeBadVTimings\t\t2\n#define XF86VidModeModeUnsuitable\t3\n#define XF86VidModeExtensionDisabled\t4\n#define XF86VidModeClientNotLocal\t5\n#define XF86VidModeZoomLocked\t\t6\n#define XF86VidModeNumberErrors\t\t(XF86VidModeZoomLocked + 1)\n\n#define XF86VM_READ_PERMISSION\t1\n#define XF86VM_WRITE_PERMISSION\t2\n\n#ifndef _XF86VIDMODE_SERVER_\n\ntypedef struct {\n    unsigned short\thdisplay;\n    unsigned short\thsyncstart;\n    unsigned short\thsyncend;\n    unsigned short\thtotal;\n    unsigned short\thskew;\n    unsigned short\tvdisplay;\n    unsigned short\tvsyncstart;\n    unsigned short\tvsyncend;\n    unsigned short\tvtotal;\n    unsigned int\tflags;\n    int\t\t\tprivsize;\n#if defined(__cplusplus) || defined(c_plusplus)\n    /* private is a C++ reserved word */\n    INT32\t\t*c_private;\n#else\n    INT32\t\t*private;\n#endif\n} XF86VidModeModeLine;\n\ntypedef struct {\n    unsigned int\tdotclock;\n    unsigned short\thdisplay;\n    unsigned short\thsyncstart;\n    unsigned short\thsyncend;\n    unsigned short\thtotal;\n    unsigned short\thskew;\n    unsigned short\tvdisplay;\n    unsigned short\tvsyncstart;\n    unsigned short\tvsyncend;\n    unsigned short\tvtotal;\n    unsigned int\tflags;\n    int\t\t\tprivsize;\n#if defined(__cplusplus) || defined(c_plusplus)\n    /* private is a C++ reserved word */\n    INT32\t\t*c_private;\n#else\n    INT32\t\t*private;\n#endif\n} XF86VidModeModeInfo;\n\ntypedef struct {\n    float\t\thi;\n    float\t\tlo;\n} XF86VidModeSyncRange;\n\ntypedef struct {\n    char*\t\t\tvendor;\n    char*\t\t\tmodel;\n    float\t\t\tEMPTY;\n    unsigned char\t\tnhsync;\n    XF86VidModeSyncRange*\thsync;\n    unsigned char\t\tnvsync;\n    XF86VidModeSyncRange*\tvsync;\n} XF86VidModeMonitor;\n\ntypedef struct {\n    int type;\t\t\t/* of event */\n    unsigned long serial;\t/* # of last request processed by server */\n    Bool send_event;\t\t/* true if this came from a SendEvent req */\n    Display *display;\t\t/* Display the event was read from */\n    Window root;\t\t/* root window of event screen */\n    int state;\t\t\t/* What happened */\n    int kind;\t\t\t/* What happened */\n    Bool forced;\t\t/* extents of new region */\n    Time time;\t\t\t/* event timestamp */\n} XF86VidModeNotifyEvent;\n\ntypedef struct {\n    float red;\t\t\t/* Red Gamma value */\n    float green;\t\t/* Green Gamma value */\n    float blue;\t\t\t/* Blue Gamma value */\n} XF86VidModeGamma;\n\n\n#define XF86VidModeSelectNextMode(disp, scr) \\\n\tXF86VidModeSwitchMode(disp, scr, 1)\n#define XF86VidModeSelectPrevMode(disp, scr) \\\n\tXF86VidModeSwitchMode(disp, scr, -1)\n\n_XFUNCPROTOBEGIN\n\nBool XF86VidModeQueryVersion(\n    Display*\t\t/* dpy */,\n    int*\t\t/* majorVersion */,\n    int*\t\t/* minorVersion */\n);\n\nBool XF86VidModeQueryExtension(\n    Display*\t\t/* dpy */,\n    int*\t\t/* event_base */,\n    int*\t\t/* error_base */\n);\n\nBool XF86VidModeSetClientVersion(\n    Display*\t\t/* dpy */\n);\n\nBool XF86VidModeGetModeLine(\n    Display*\t\t\t/* dpy */,\n    int\t\t\t\t/* screen */,\n    int*\t\t\t/* dotclock */,\n    XF86VidModeModeLine*\t/* modeline */\n);\n\nBool XF86VidModeGetAllModeLines(\n    Display*\t\t\t/* dpy */,\n    int\t\t\t\t/* screen */,\n    int*\t\t\t/* modecount */,\n    XF86VidModeModeInfo***\t/* modelinesPtr */\n);\n\nBool XF86VidModeAddModeLine(\n    Display*\t\t\t/* dpy */,\n    int\t\t\t\t/* screen */,\n    XF86VidModeModeInfo*\t/* new modeline */,\n    XF86VidModeModeInfo*\t/* after modeline */\n);\n\nBool XF86VidModeDeleteModeLine(\n    Display*\t\t\t/* dpy */,\n    int\t\t\t\t/* screen */,\n    XF86VidModeModeInfo*\t/* modeline */\n);\n\nBool XF86VidModeModModeLine(\n    Display*\t\t\t/* dpy */,\n    int\t\t\t\t/* screen */,\n    XF86VidModeModeLine*\t/* modeline */\n);\n\nStatus XF86VidModeValidateModeLine(\n    Display*\t\t\t/* dpy */,\n    int\t\t\t\t/* screen */,\n    XF86VidModeModeInfo*\t/* modeline */\n);\n\nBool XF86VidModeSwitchMode(\n    Display*\t\t/* dpy */,\n    int\t\t\t/* screen */,\n    int\t\t\t/* zoom */\n);\n\nBool XF86VidModeSwitchToMode(\n    Display*\t\t\t/* dpy */,\n    int\t\t\t\t/* screen */,\n    XF86VidModeModeInfo*\t/* modeline */\n);\n\nBool XF86VidModeLockModeSwitch(\n    Display*\t\t/* dpy */,\n    int\t\t\t/* screen */,\n    int\t\t\t/* lock */\n);\n\nBool XF86VidModeGetMonitor(\n    Display*\t\t/* dpy */,\n    int\t\t\t/* screen */,\n    XF86VidModeMonitor*\t/* monitor */\n);\n\nBool XF86VidModeGetViewPort(\n    Display*\t\t/* dpy */,\n    int\t\t\t/* screen */,\n    int*\t\t/* x return */,\n    int*\t\t/* y return */\n);\n\nBool XF86VidModeSetViewPort(\n    Display*\t\t/* dpy */,\n    int\t\t\t/* screen */,\n    int\t\t\t/* x */,\n    int\t\t\t/* y */\n);\n\nBool XF86VidModeGetDotClocks(\n    Display*\t\t/* dpy */,\n    int\t\t\t/* screen */,\n    int*\t\t/* flags return */,\n    int*\t\t/* number of clocks return */,\n    int*\t\t/* max dot clock return */,\n    int**\t\t/* clocks return */\n);\n\nBool XF86VidModeGetGamma(\n    Display*\t\t\t/* dpy */,\n    int\t\t\t\t/* screen */,\n    XF86VidModeGamma*\t\t/* Gamma */\n);\n\nBool XF86VidModeSetGamma(\n    Display*\t\t\t/* dpy */,\n    int\t\t\t\t/* screen */,\n    XF86VidModeGamma*\t\t/* Gamma */\n);\n\nBool XF86VidModeSetGammaRamp(\n    Display*                    /* dpy */,\n    int                         /* screen */,\n    int\t\t\t\t/* size */,\n    unsigned short*             /* red array */,\n    unsigned short*             /* green array */,\n    unsigned short*             /* blue array */\n);\n\nBool XF86VidModeGetGammaRamp(\n    Display*                    /* dpy */,\n    int                         /* screen */,\n    int                         /* size */,\n    unsigned short*             /* red array */,\n    unsigned short*             /* green array */,\n    unsigned short*             /* blue array */\n);\n\nBool XF86VidModeGetGammaRampSize(\n    Display*                    /* dpy */,\n    int                         /* screen */,\n    int*                        /* size */\n);\n\nBool XF86VidModeGetPermissions(\n    Display*                    /* dpy */,\n    int                         /* screen */,\n    int*\t\t\t/* permissions */\n);\n\n_XFUNCPROTOEND\n\n#endif\n\n#endif\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/keysym.h",
    "content": "/***********************************************************\n\nCopyright 1987, 1998  The Open Group\n\nPermission to use, copy, modify, distribute, and sell this software and its\ndocumentation for any purpose is hereby granted without fee, provided that\nthe above copyright notice appear in all copies and that both that\ncopyright notice and this permission notice appear in supporting\ndocumentation.\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\nAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nExcept as contained in this notice, the name of The Open Group shall not be\nused in advertising or otherwise to promote the sale, use or other dealings\nin this Software without prior written authorization from The Open Group.\n\n\nCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.\n\n                        All Rights Reserved\n\nPermission to use, copy, modify, and distribute this software and its \ndocumentation for any purpose and without fee is hereby granted, \nprovided that the above copyright notice appear in all copies and that\nboth that copyright notice and this permission notice appear in \nsupporting documentation, and that the name of Digital not be\nused in advertising or publicity pertaining to distribution of the\nsoftware without specific, written prior permission.  \n\nDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING\nALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL\nDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR\nANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\nWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\nARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS\nSOFTWARE.\n\n******************************************************************/\n\n/* default keysyms */\n#define XK_MISCELLANY\n#define XK_XKB_KEYS\n#define XK_LATIN1\n#define XK_LATIN2\n#define XK_LATIN3\n#define XK_LATIN4\n#define XK_LATIN8\n#define XK_LATIN9\n#define XK_CAUCASUS\n#define XK_GREEK\n#define XK_KATAKANA\n#define XK_ARABIC\n#define XK_CYRILLIC\n#define XK_HEBREW\n#define XK_THAI\n#define XK_KOREAN\n#define XK_ARMENIAN\n#define XK_GEORGIAN\n#define XK_VIETNAMESE\n#define XK_CURRENCY\n#define XK_MATHEMATICAL\n#define XK_BRAILLE\n#define XK_SINHALA\n\n#include <X11/keysymdef.h>\n\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/X11/keysymdef.h",
    "content": "/***********************************************************\nCopyright 1987, 1994, 1998  The Open Group\n\nPermission to use, copy, modify, distribute, and sell this software and its\ndocumentation for any purpose is hereby granted without fee, provided that\nthe above copyright notice appear in all copies and that both that\ncopyright notice and this permission notice appear in supporting\ndocumentation.\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nExcept as contained in this notice, the name of The Open Group shall\nnot be used in advertising or otherwise to promote the sale, use or\nother dealings in this Software without prior written authorization\nfrom The Open Group.\n\n\nCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts\n\n                        All Rights Reserved\n\nPermission to use, copy, modify, and distribute this software and its\ndocumentation for any purpose and without fee is hereby granted,\nprovided that the above copyright notice appear in all copies and that\nboth that copyright notice and this permission notice appear in\nsupporting documentation, and that the name of Digital not be\nused in advertising or publicity pertaining to distribution of the\nsoftware without specific, written prior permission.\n\nDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING\nALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL\nDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR\nANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\nWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\nARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS\nSOFTWARE.\n\n******************************************************************/\n\n/*\n * The \"X11 Window System Protocol\" standard defines in Appendix A the\n * keysym codes. These 29-bit integer values identify characters or\n * functions associated with each key (e.g., via the visible\n * engraving) of a keyboard layout. This file assigns mnemonic macro\n * names for these keysyms.\n *\n * This file is also compiled (by src/util/makekeys.c in libX11) into\n * hash tables that can be accessed with X11 library functions such as\n * XStringToKeysym() and XKeysymToString().\n *\n * Where a keysym corresponds one-to-one to an ISO 10646 / Unicode\n * character, this is noted in a comment that provides both the U+xxxx\n * Unicode position, as well as the official Unicode name of the\n * character.\n *\n * Where the correspondence is either not one-to-one or semantically\n * unclear, the Unicode position and name are enclosed in\n * parentheses. Such legacy keysyms should be considered deprecated\n * and are not recommended for use in future keyboard mappings.\n *\n * For any future extension of the keysyms with characters already\n * found in ISO 10646 / Unicode, the following algorithm shall be\n * used. The new keysym code position will simply be the character's\n * Unicode number plus 0x01000000. The keysym values in the range\n * 0x01000100 to 0x0110ffff are reserved to represent Unicode\n * characters in the range U+0100 to U+10FFFF.\n * \n * While most newer Unicode-based X11 clients do already accept\n * Unicode-mapped keysyms in the range 0x01000100 to 0x0110ffff, it\n * will remain necessary for clients -- in the interest of\n * compatibility with existing servers -- to also understand the\n * existing legacy keysym values in the range 0x0100 to 0x20ff.\n *\n * Where several mnemonic names are defined for the same keysym in this\n * file, all but the first one listed should be considered deprecated.\n *\n * Mnemonic names for keysyms are defined in this file with lines\n * that match one of these Perl regular expressions:\n *\n *    /^\\#define XK_([a-zA-Z_0-9]+)\\s+0x([0-9a-f]+)\\s*\\/\\* U+([0-9A-F]{4,6}) (.*) \\*\\/\\s*$/\n *    /^\\#define XK_([a-zA-Z_0-9]+)\\s+0x([0-9a-f]+)\\s*\\/\\*\\(U+([0-9A-F]{4,6}) (.*)\\)\\*\\/\\s*$/\n *    /^\\#define XK_([a-zA-Z_0-9]+)\\s+0x([0-9a-f]+)\\s*(\\/\\*\\s*(.*)\\s*\\*\\/)?\\s*$/\n *\n * Before adding new keysyms, please do consider the following: In\n * addition to the keysym names defined in this file, the\n * XStringToKeysym() and XKeysymToString() functions will also handle\n * any keysym string of the form \"U0020\" to \"U007E\" and \"U00A0\" to\n * \"U10FFFF\" for all possible Unicode characters. In other words,\n * every possible Unicode character has already a keysym string\n * defined algorithmically, even if it is not listed here. Therefore,\n * defining an additional keysym macro is only necessary where a\n * non-hexadecimal mnemonic name is needed, or where the new keysym\n * does not represent any existing Unicode character.\n *\n * When adding new keysyms to this file, do not forget to also update the\n * following:\n *\n *   - the mappings in src/KeyBind.c in the repo\n *     git://anongit.freedesktop.org/xorg/lib/libX11\n *\n *   - the protocol specification in specs/XProtocol/X11.keysyms\n *     in the repo git://anongit.freedesktop.org/xorg/doc/xorg-docs\n *\n */\n\n#define XK_VoidSymbol                  0xffffff  /* Void symbol */\n\n#ifdef XK_MISCELLANY\n/*\n * TTY function keys, cleverly chosen to map to ASCII, for convenience of\n * programming, but could have been arbitrary (at the cost of lookup\n * tables in client code).\n */\n\n#define XK_BackSpace                     0xff08  /* Back space, back char */\n#define XK_Tab                           0xff09\n#define XK_Linefeed                      0xff0a  /* Linefeed, LF */\n#define XK_Clear                         0xff0b\n#define XK_Return                        0xff0d  /* Return, enter */\n#define XK_Pause                         0xff13  /* Pause, hold */\n#define XK_Scroll_Lock                   0xff14\n#define XK_Sys_Req                       0xff15\n#define XK_Escape                        0xff1b\n#define XK_Delete                        0xffff  /* Delete, rubout */\n\n\n\n/* International & multi-key character composition */\n\n#define XK_Multi_key                     0xff20  /* Multi-key character compose */\n#define XK_Codeinput                     0xff37\n#define XK_SingleCandidate               0xff3c\n#define XK_MultipleCandidate             0xff3d\n#define XK_PreviousCandidate             0xff3e\n\n/* Japanese keyboard support */\n\n#define XK_Kanji                         0xff21  /* Kanji, Kanji convert */\n#define XK_Muhenkan                      0xff22  /* Cancel Conversion */\n#define XK_Henkan_Mode                   0xff23  /* Start/Stop Conversion */\n#define XK_Henkan                        0xff23  /* Alias for Henkan_Mode */\n#define XK_Romaji                        0xff24  /* to Romaji */\n#define XK_Hiragana                      0xff25  /* to Hiragana */\n#define XK_Katakana                      0xff26  /* to Katakana */\n#define XK_Hiragana_Katakana             0xff27  /* Hiragana/Katakana toggle */\n#define XK_Zenkaku                       0xff28  /* to Zenkaku */\n#define XK_Hankaku                       0xff29  /* to Hankaku */\n#define XK_Zenkaku_Hankaku               0xff2a  /* Zenkaku/Hankaku toggle */\n#define XK_Touroku                       0xff2b  /* Add to Dictionary */\n#define XK_Massyo                        0xff2c  /* Delete from Dictionary */\n#define XK_Kana_Lock                     0xff2d  /* Kana Lock */\n#define XK_Kana_Shift                    0xff2e  /* Kana Shift */\n#define XK_Eisu_Shift                    0xff2f  /* Alphanumeric Shift */\n#define XK_Eisu_toggle                   0xff30  /* Alphanumeric toggle */\n#define XK_Kanji_Bangou                  0xff37  /* Codeinput */\n#define XK_Zen_Koho                      0xff3d  /* Multiple/All Candidate(s) */\n#define XK_Mae_Koho                      0xff3e  /* Previous Candidate */\n\n/* 0xff31 thru 0xff3f are under XK_KOREAN */\n\n/* Cursor control & motion */\n\n#define XK_Home                          0xff50\n#define XK_Left                          0xff51  /* Move left, left arrow */\n#define XK_Up                            0xff52  /* Move up, up arrow */\n#define XK_Right                         0xff53  /* Move right, right arrow */\n#define XK_Down                          0xff54  /* Move down, down arrow */\n#define XK_Prior                         0xff55  /* Prior, previous */\n#define XK_Page_Up                       0xff55\n#define XK_Next                          0xff56  /* Next */\n#define XK_Page_Down                     0xff56\n#define XK_End                           0xff57  /* EOL */\n#define XK_Begin                         0xff58  /* BOL */\n\n\n/* Misc functions */\n\n#define XK_Select                        0xff60  /* Select, mark */\n#define XK_Print                         0xff61\n#define XK_Execute                       0xff62  /* Execute, run, do */\n#define XK_Insert                        0xff63  /* Insert, insert here */\n#define XK_Undo                          0xff65\n#define XK_Redo                          0xff66  /* Redo, again */\n#define XK_Menu                          0xff67\n#define XK_Find                          0xff68  /* Find, search */\n#define XK_Cancel                        0xff69  /* Cancel, stop, abort, exit */\n#define XK_Help                          0xff6a  /* Help */\n#define XK_Break                         0xff6b\n#define XK_Mode_switch                   0xff7e  /* Character set switch */\n#define XK_script_switch                 0xff7e  /* Alias for mode_switch */\n#define XK_Num_Lock                      0xff7f\n\n/* Keypad functions, keypad numbers cleverly chosen to map to ASCII */\n\n#define XK_KP_Space                      0xff80  /* Space */\n#define XK_KP_Tab                        0xff89\n#define XK_KP_Enter                      0xff8d  /* Enter */\n#define XK_KP_F1                         0xff91  /* PF1, KP_A, ... */\n#define XK_KP_F2                         0xff92\n#define XK_KP_F3                         0xff93\n#define XK_KP_F4                         0xff94\n#define XK_KP_Home                       0xff95\n#define XK_KP_Left                       0xff96\n#define XK_KP_Up                         0xff97\n#define XK_KP_Right                      0xff98\n#define XK_KP_Down                       0xff99\n#define XK_KP_Prior                      0xff9a\n#define XK_KP_Page_Up                    0xff9a\n#define XK_KP_Next                       0xff9b\n#define XK_KP_Page_Down                  0xff9b\n#define XK_KP_End                        0xff9c\n#define XK_KP_Begin                      0xff9d\n#define XK_KP_Insert                     0xff9e\n#define XK_KP_Delete                     0xff9f\n#define XK_KP_Equal                      0xffbd  /* Equals */\n#define XK_KP_Multiply                   0xffaa\n#define XK_KP_Add                        0xffab\n#define XK_KP_Separator                  0xffac  /* Separator, often comma */\n#define XK_KP_Subtract                   0xffad\n#define XK_KP_Decimal                    0xffae\n#define XK_KP_Divide                     0xffaf\n\n#define XK_KP_0                          0xffb0\n#define XK_KP_1                          0xffb1\n#define XK_KP_2                          0xffb2\n#define XK_KP_3                          0xffb3\n#define XK_KP_4                          0xffb4\n#define XK_KP_5                          0xffb5\n#define XK_KP_6                          0xffb6\n#define XK_KP_7                          0xffb7\n#define XK_KP_8                          0xffb8\n#define XK_KP_9                          0xffb9\n\n\n\n/*\n * Auxiliary functions; note the duplicate definitions for left and right\n * function keys;  Sun keyboards and a few other manufacturers have such\n * function key groups on the left and/or right sides of the keyboard.\n * We've not found a keyboard with more than 35 function keys total.\n */\n\n#define XK_F1                            0xffbe\n#define XK_F2                            0xffbf\n#define XK_F3                            0xffc0\n#define XK_F4                            0xffc1\n#define XK_F5                            0xffc2\n#define XK_F6                            0xffc3\n#define XK_F7                            0xffc4\n#define XK_F8                            0xffc5\n#define XK_F9                            0xffc6\n#define XK_F10                           0xffc7\n#define XK_F11                           0xffc8\n#define XK_L1                            0xffc8\n#define XK_F12                           0xffc9\n#define XK_L2                            0xffc9\n#define XK_F13                           0xffca\n#define XK_L3                            0xffca\n#define XK_F14                           0xffcb\n#define XK_L4                            0xffcb\n#define XK_F15                           0xffcc\n#define XK_L5                            0xffcc\n#define XK_F16                           0xffcd\n#define XK_L6                            0xffcd\n#define XK_F17                           0xffce\n#define XK_L7                            0xffce\n#define XK_F18                           0xffcf\n#define XK_L8                            0xffcf\n#define XK_F19                           0xffd0\n#define XK_L9                            0xffd0\n#define XK_F20                           0xffd1\n#define XK_L10                           0xffd1\n#define XK_F21                           0xffd2\n#define XK_R1                            0xffd2\n#define XK_F22                           0xffd3\n#define XK_R2                            0xffd3\n#define XK_F23                           0xffd4\n#define XK_R3                            0xffd4\n#define XK_F24                           0xffd5\n#define XK_R4                            0xffd5\n#define XK_F25                           0xffd6\n#define XK_R5                            0xffd6\n#define XK_F26                           0xffd7\n#define XK_R6                            0xffd7\n#define XK_F27                           0xffd8\n#define XK_R7                            0xffd8\n#define XK_F28                           0xffd9\n#define XK_R8                            0xffd9\n#define XK_F29                           0xffda\n#define XK_R9                            0xffda\n#define XK_F30                           0xffdb\n#define XK_R10                           0xffdb\n#define XK_F31                           0xffdc\n#define XK_R11                           0xffdc\n#define XK_F32                           0xffdd\n#define XK_R12                           0xffdd\n#define XK_F33                           0xffde\n#define XK_R13                           0xffde\n#define XK_F34                           0xffdf\n#define XK_R14                           0xffdf\n#define XK_F35                           0xffe0\n#define XK_R15                           0xffe0\n\n/* Modifiers */\n\n#define XK_Shift_L                       0xffe1  /* Left shift */\n#define XK_Shift_R                       0xffe2  /* Right shift */\n#define XK_Control_L                     0xffe3  /* Left control */\n#define XK_Control_R                     0xffe4  /* Right control */\n#define XK_Caps_Lock                     0xffe5  /* Caps lock */\n#define XK_Shift_Lock                    0xffe6  /* Shift lock */\n\n#define XK_Meta_L                        0xffe7  /* Left meta */\n#define XK_Meta_R                        0xffe8  /* Right meta */\n#define XK_Alt_L                         0xffe9  /* Left alt */\n#define XK_Alt_R                         0xffea  /* Right alt */\n#define XK_Super_L                       0xffeb  /* Left super */\n#define XK_Super_R                       0xffec  /* Right super */\n#define XK_Hyper_L                       0xffed  /* Left hyper */\n#define XK_Hyper_R                       0xffee  /* Right hyper */\n#endif /* XK_MISCELLANY */\n\n/*\n * Keyboard (XKB) Extension function and modifier keys\n * (from Appendix C of \"The X Keyboard Extension: Protocol Specification\")\n * Byte 3 = 0xfe\n */\n\n#ifdef XK_XKB_KEYS\n#define XK_ISO_Lock                      0xfe01\n#define XK_ISO_Level2_Latch              0xfe02\n#define XK_ISO_Level3_Shift              0xfe03\n#define XK_ISO_Level3_Latch              0xfe04\n#define XK_ISO_Level3_Lock               0xfe05\n#define XK_ISO_Level5_Shift              0xfe11\n#define XK_ISO_Level5_Latch              0xfe12\n#define XK_ISO_Level5_Lock               0xfe13\n#define XK_ISO_Group_Shift               0xff7e  /* Alias for mode_switch */\n#define XK_ISO_Group_Latch               0xfe06\n#define XK_ISO_Group_Lock                0xfe07\n#define XK_ISO_Next_Group                0xfe08\n#define XK_ISO_Next_Group_Lock           0xfe09\n#define XK_ISO_Prev_Group                0xfe0a\n#define XK_ISO_Prev_Group_Lock           0xfe0b\n#define XK_ISO_First_Group               0xfe0c\n#define XK_ISO_First_Group_Lock          0xfe0d\n#define XK_ISO_Last_Group                0xfe0e\n#define XK_ISO_Last_Group_Lock           0xfe0f\n\n#define XK_ISO_Left_Tab                  0xfe20\n#define XK_ISO_Move_Line_Up              0xfe21\n#define XK_ISO_Move_Line_Down            0xfe22\n#define XK_ISO_Partial_Line_Up           0xfe23\n#define XK_ISO_Partial_Line_Down         0xfe24\n#define XK_ISO_Partial_Space_Left        0xfe25\n#define XK_ISO_Partial_Space_Right       0xfe26\n#define XK_ISO_Set_Margin_Left           0xfe27\n#define XK_ISO_Set_Margin_Right          0xfe28\n#define XK_ISO_Release_Margin_Left       0xfe29\n#define XK_ISO_Release_Margin_Right      0xfe2a\n#define XK_ISO_Release_Both_Margins      0xfe2b\n#define XK_ISO_Fast_Cursor_Left          0xfe2c\n#define XK_ISO_Fast_Cursor_Right         0xfe2d\n#define XK_ISO_Fast_Cursor_Up            0xfe2e\n#define XK_ISO_Fast_Cursor_Down          0xfe2f\n#define XK_ISO_Continuous_Underline      0xfe30\n#define XK_ISO_Discontinuous_Underline   0xfe31\n#define XK_ISO_Emphasize                 0xfe32\n#define XK_ISO_Center_Object             0xfe33\n#define XK_ISO_Enter                     0xfe34\n\n#define XK_dead_grave                    0xfe50\n#define XK_dead_acute                    0xfe51\n#define XK_dead_circumflex               0xfe52\n#define XK_dead_tilde                    0xfe53\n#define XK_dead_perispomeni              0xfe53  /* alias for dead_tilde */\n#define XK_dead_macron                   0xfe54\n#define XK_dead_breve                    0xfe55\n#define XK_dead_abovedot                 0xfe56\n#define XK_dead_diaeresis                0xfe57\n#define XK_dead_abovering                0xfe58\n#define XK_dead_doubleacute              0xfe59\n#define XK_dead_caron                    0xfe5a\n#define XK_dead_cedilla                  0xfe5b\n#define XK_dead_ogonek                   0xfe5c\n#define XK_dead_iota                     0xfe5d\n#define XK_dead_voiced_sound             0xfe5e\n#define XK_dead_semivoiced_sound         0xfe5f\n#define XK_dead_belowdot                 0xfe60\n#define XK_dead_hook                     0xfe61\n#define XK_dead_horn                     0xfe62\n#define XK_dead_stroke                   0xfe63\n#define XK_dead_abovecomma               0xfe64\n#define XK_dead_psili                    0xfe64  /* alias for dead_abovecomma */\n#define XK_dead_abovereversedcomma       0xfe65\n#define XK_dead_dasia                    0xfe65  /* alias for dead_abovereversedcomma */\n#define XK_dead_doublegrave              0xfe66\n#define XK_dead_belowring                0xfe67\n#define XK_dead_belowmacron              0xfe68\n#define XK_dead_belowcircumflex          0xfe69\n#define XK_dead_belowtilde               0xfe6a\n#define XK_dead_belowbreve               0xfe6b\n#define XK_dead_belowdiaeresis           0xfe6c\n#define XK_dead_invertedbreve            0xfe6d\n#define XK_dead_belowcomma               0xfe6e\n#define XK_dead_currency                 0xfe6f\n\n/* dead vowels for universal syllable entry */\n#define XK_dead_a                        0xfe80\n#define XK_dead_A                        0xfe81\n#define XK_dead_e                        0xfe82\n#define XK_dead_E                        0xfe83\n#define XK_dead_i                        0xfe84\n#define XK_dead_I                        0xfe85\n#define XK_dead_o                        0xfe86\n#define XK_dead_O                        0xfe87\n#define XK_dead_u                        0xfe88\n#define XK_dead_U                        0xfe89\n#define XK_dead_small_schwa              0xfe8a\n#define XK_dead_capital_schwa            0xfe8b\n\n#define XK_First_Virtual_Screen          0xfed0\n#define XK_Prev_Virtual_Screen           0xfed1\n#define XK_Next_Virtual_Screen           0xfed2\n#define XK_Last_Virtual_Screen           0xfed4\n#define XK_Terminate_Server              0xfed5\n\n#define XK_AccessX_Enable                0xfe70\n#define XK_AccessX_Feedback_Enable       0xfe71\n#define XK_RepeatKeys_Enable             0xfe72\n#define XK_SlowKeys_Enable               0xfe73\n#define XK_BounceKeys_Enable             0xfe74\n#define XK_StickyKeys_Enable             0xfe75\n#define XK_MouseKeys_Enable              0xfe76\n#define XK_MouseKeys_Accel_Enable        0xfe77\n#define XK_Overlay1_Enable               0xfe78\n#define XK_Overlay2_Enable               0xfe79\n#define XK_AudibleBell_Enable            0xfe7a\n\n#define XK_Pointer_Left                  0xfee0\n#define XK_Pointer_Right                 0xfee1\n#define XK_Pointer_Up                    0xfee2\n#define XK_Pointer_Down                  0xfee3\n#define XK_Pointer_UpLeft                0xfee4\n#define XK_Pointer_UpRight               0xfee5\n#define XK_Pointer_DownLeft              0xfee6\n#define XK_Pointer_DownRight             0xfee7\n#define XK_Pointer_Button_Dflt           0xfee8\n#define XK_Pointer_Button1               0xfee9\n#define XK_Pointer_Button2               0xfeea\n#define XK_Pointer_Button3               0xfeeb\n#define XK_Pointer_Button4               0xfeec\n#define XK_Pointer_Button5               0xfeed\n#define XK_Pointer_DblClick_Dflt         0xfeee\n#define XK_Pointer_DblClick1             0xfeef\n#define XK_Pointer_DblClick2             0xfef0\n#define XK_Pointer_DblClick3             0xfef1\n#define XK_Pointer_DblClick4             0xfef2\n#define XK_Pointer_DblClick5             0xfef3\n#define XK_Pointer_Drag_Dflt             0xfef4\n#define XK_Pointer_Drag1                 0xfef5\n#define XK_Pointer_Drag2                 0xfef6\n#define XK_Pointer_Drag3                 0xfef7\n#define XK_Pointer_Drag4                 0xfef8\n#define XK_Pointer_Drag5                 0xfefd\n\n#define XK_Pointer_EnableKeys            0xfef9\n#define XK_Pointer_Accelerate            0xfefa\n#define XK_Pointer_DfltBtnNext           0xfefb\n#define XK_Pointer_DfltBtnPrev           0xfefc\n\n#endif /* XK_XKB_KEYS */\n\n/*\n * 3270 Terminal Keys\n * Byte 3 = 0xfd\n */\n\n#ifdef XK_3270\n#define XK_3270_Duplicate                0xfd01\n#define XK_3270_FieldMark                0xfd02\n#define XK_3270_Right2                   0xfd03\n#define XK_3270_Left2                    0xfd04\n#define XK_3270_BackTab                  0xfd05\n#define XK_3270_EraseEOF                 0xfd06\n#define XK_3270_EraseInput               0xfd07\n#define XK_3270_Reset                    0xfd08\n#define XK_3270_Quit                     0xfd09\n#define XK_3270_PA1                      0xfd0a\n#define XK_3270_PA2                      0xfd0b\n#define XK_3270_PA3                      0xfd0c\n#define XK_3270_Test                     0xfd0d\n#define XK_3270_Attn                     0xfd0e\n#define XK_3270_CursorBlink              0xfd0f\n#define XK_3270_AltCursor                0xfd10\n#define XK_3270_KeyClick                 0xfd11\n#define XK_3270_Jump                     0xfd12\n#define XK_3270_Ident                    0xfd13\n#define XK_3270_Rule                     0xfd14\n#define XK_3270_Copy                     0xfd15\n#define XK_3270_Play                     0xfd16\n#define XK_3270_Setup                    0xfd17\n#define XK_3270_Record                   0xfd18\n#define XK_3270_ChangeScreen             0xfd19\n#define XK_3270_DeleteWord               0xfd1a\n#define XK_3270_ExSelect                 0xfd1b\n#define XK_3270_CursorSelect             0xfd1c\n#define XK_3270_PrintScreen              0xfd1d\n#define XK_3270_Enter                    0xfd1e\n#endif /* XK_3270 */\n\n/*\n * Latin 1\n * (ISO/IEC 8859-1 = Unicode U+0020..U+00FF)\n * Byte 3 = 0\n */\n#ifdef XK_LATIN1\n#define XK_space                         0x0020  /* U+0020 SPACE */\n#define XK_exclam                        0x0021  /* U+0021 EXCLAMATION MARK */\n#define XK_quotedbl                      0x0022  /* U+0022 QUOTATION MARK */\n#define XK_numbersign                    0x0023  /* U+0023 NUMBER SIGN */\n#define XK_dollar                        0x0024  /* U+0024 DOLLAR SIGN */\n#define XK_percent                       0x0025  /* U+0025 PERCENT SIGN */\n#define XK_ampersand                     0x0026  /* U+0026 AMPERSAND */\n#define XK_apostrophe                    0x0027  /* U+0027 APOSTROPHE */\n#define XK_quoteright                    0x0027  /* deprecated */\n#define XK_parenleft                     0x0028  /* U+0028 LEFT PARENTHESIS */\n#define XK_parenright                    0x0029  /* U+0029 RIGHT PARENTHESIS */\n#define XK_asterisk                      0x002a  /* U+002A ASTERISK */\n#define XK_plus                          0x002b  /* U+002B PLUS SIGN */\n#define XK_comma                         0x002c  /* U+002C COMMA */\n#define XK_minus                         0x002d  /* U+002D HYPHEN-MINUS */\n#define XK_period                        0x002e  /* U+002E FULL STOP */\n#define XK_slash                         0x002f  /* U+002F SOLIDUS */\n#define XK_0                             0x0030  /* U+0030 DIGIT ZERO */\n#define XK_1                             0x0031  /* U+0031 DIGIT ONE */\n#define XK_2                             0x0032  /* U+0032 DIGIT TWO */\n#define XK_3                             0x0033  /* U+0033 DIGIT THREE */\n#define XK_4                             0x0034  /* U+0034 DIGIT FOUR */\n#define XK_5                             0x0035  /* U+0035 DIGIT FIVE */\n#define XK_6                             0x0036  /* U+0036 DIGIT SIX */\n#define XK_7                             0x0037  /* U+0037 DIGIT SEVEN */\n#define XK_8                             0x0038  /* U+0038 DIGIT EIGHT */\n#define XK_9                             0x0039  /* U+0039 DIGIT NINE */\n#define XK_colon                         0x003a  /* U+003A COLON */\n#define XK_semicolon                     0x003b  /* U+003B SEMICOLON */\n#define XK_less                          0x003c  /* U+003C LESS-THAN SIGN */\n#define XK_equal                         0x003d  /* U+003D EQUALS SIGN */\n#define XK_greater                       0x003e  /* U+003E GREATER-THAN SIGN */\n#define XK_question                      0x003f  /* U+003F QUESTION MARK */\n#define XK_at                            0x0040  /* U+0040 COMMERCIAL AT */\n#define XK_A                             0x0041  /* U+0041 LATIN CAPITAL LETTER A */\n#define XK_B                             0x0042  /* U+0042 LATIN CAPITAL LETTER B */\n#define XK_C                             0x0043  /* U+0043 LATIN CAPITAL LETTER C */\n#define XK_D                             0x0044  /* U+0044 LATIN CAPITAL LETTER D */\n#define XK_E                             0x0045  /* U+0045 LATIN CAPITAL LETTER E */\n#define XK_F                             0x0046  /* U+0046 LATIN CAPITAL LETTER F */\n#define XK_G                             0x0047  /* U+0047 LATIN CAPITAL LETTER G */\n#define XK_H                             0x0048  /* U+0048 LATIN CAPITAL LETTER H */\n#define XK_I                             0x0049  /* U+0049 LATIN CAPITAL LETTER I */\n#define XK_J                             0x004a  /* U+004A LATIN CAPITAL LETTER J */\n#define XK_K                             0x004b  /* U+004B LATIN CAPITAL LETTER K */\n#define XK_L                             0x004c  /* U+004C LATIN CAPITAL LETTER L */\n#define XK_M                             0x004d  /* U+004D LATIN CAPITAL LETTER M */\n#define XK_N                             0x004e  /* U+004E LATIN CAPITAL LETTER N */\n#define XK_O                             0x004f  /* U+004F LATIN CAPITAL LETTER O */\n#define XK_P                             0x0050  /* U+0050 LATIN CAPITAL LETTER P */\n#define XK_Q                             0x0051  /* U+0051 LATIN CAPITAL LETTER Q */\n#define XK_R                             0x0052  /* U+0052 LATIN CAPITAL LETTER R */\n#define XK_S                             0x0053  /* U+0053 LATIN CAPITAL LETTER S */\n#define XK_T                             0x0054  /* U+0054 LATIN CAPITAL LETTER T */\n#define XK_U                             0x0055  /* U+0055 LATIN CAPITAL LETTER U */\n#define XK_V                             0x0056  /* U+0056 LATIN CAPITAL LETTER V */\n#define XK_W                             0x0057  /* U+0057 LATIN CAPITAL LETTER W */\n#define XK_X                             0x0058  /* U+0058 LATIN CAPITAL LETTER X */\n#define XK_Y                             0x0059  /* U+0059 LATIN CAPITAL LETTER Y */\n#define XK_Z                             0x005a  /* U+005A LATIN CAPITAL LETTER Z */\n#define XK_bracketleft                   0x005b  /* U+005B LEFT SQUARE BRACKET */\n#define XK_backslash                     0x005c  /* U+005C REVERSE SOLIDUS */\n#define XK_bracketright                  0x005d  /* U+005D RIGHT SQUARE BRACKET */\n#define XK_asciicircum                   0x005e  /* U+005E CIRCUMFLEX ACCENT */\n#define XK_underscore                    0x005f  /* U+005F LOW LINE */\n#define XK_grave                         0x0060  /* U+0060 GRAVE ACCENT */\n#define XK_quoteleft                     0x0060  /* deprecated */\n#define XK_a                             0x0061  /* U+0061 LATIN SMALL LETTER A */\n#define XK_b                             0x0062  /* U+0062 LATIN SMALL LETTER B */\n#define XK_c                             0x0063  /* U+0063 LATIN SMALL LETTER C */\n#define XK_d                             0x0064  /* U+0064 LATIN SMALL LETTER D */\n#define XK_e                             0x0065  /* U+0065 LATIN SMALL LETTER E */\n#define XK_f                             0x0066  /* U+0066 LATIN SMALL LETTER F */\n#define XK_g                             0x0067  /* U+0067 LATIN SMALL LETTER G */\n#define XK_h                             0x0068  /* U+0068 LATIN SMALL LETTER H */\n#define XK_i                             0x0069  /* U+0069 LATIN SMALL LETTER I */\n#define XK_j                             0x006a  /* U+006A LATIN SMALL LETTER J */\n#define XK_k                             0x006b  /* U+006B LATIN SMALL LETTER K */\n#define XK_l                             0x006c  /* U+006C LATIN SMALL LETTER L */\n#define XK_m                             0x006d  /* U+006D LATIN SMALL LETTER M */\n#define XK_n                             0x006e  /* U+006E LATIN SMALL LETTER N */\n#define XK_o                             0x006f  /* U+006F LATIN SMALL LETTER O */\n#define XK_p                             0x0070  /* U+0070 LATIN SMALL LETTER P */\n#define XK_q                             0x0071  /* U+0071 LATIN SMALL LETTER Q */\n#define XK_r                             0x0072  /* U+0072 LATIN SMALL LETTER R */\n#define XK_s                             0x0073  /* U+0073 LATIN SMALL LETTER S */\n#define XK_t                             0x0074  /* U+0074 LATIN SMALL LETTER T */\n#define XK_u                             0x0075  /* U+0075 LATIN SMALL LETTER U */\n#define XK_v                             0x0076  /* U+0076 LATIN SMALL LETTER V */\n#define XK_w                             0x0077  /* U+0077 LATIN SMALL LETTER W */\n#define XK_x                             0x0078  /* U+0078 LATIN SMALL LETTER X */\n#define XK_y                             0x0079  /* U+0079 LATIN SMALL LETTER Y */\n#define XK_z                             0x007a  /* U+007A LATIN SMALL LETTER Z */\n#define XK_braceleft                     0x007b  /* U+007B LEFT CURLY BRACKET */\n#define XK_bar                           0x007c  /* U+007C VERTICAL LINE */\n#define XK_braceright                    0x007d  /* U+007D RIGHT CURLY BRACKET */\n#define XK_asciitilde                    0x007e  /* U+007E TILDE */\n\n#define XK_nobreakspace                  0x00a0  /* U+00A0 NO-BREAK SPACE */\n#define XK_exclamdown                    0x00a1  /* U+00A1 INVERTED EXCLAMATION MARK */\n#define XK_cent                          0x00a2  /* U+00A2 CENT SIGN */\n#define XK_sterling                      0x00a3  /* U+00A3 POUND SIGN */\n#define XK_currency                      0x00a4  /* U+00A4 CURRENCY SIGN */\n#define XK_yen                           0x00a5  /* U+00A5 YEN SIGN */\n#define XK_brokenbar                     0x00a6  /* U+00A6 BROKEN BAR */\n#define XK_section                       0x00a7  /* U+00A7 SECTION SIGN */\n#define XK_diaeresis                     0x00a8  /* U+00A8 DIAERESIS */\n#define XK_copyright                     0x00a9  /* U+00A9 COPYRIGHT SIGN */\n#define XK_ordfeminine                   0x00aa  /* U+00AA FEMININE ORDINAL INDICATOR */\n#define XK_guillemotleft                 0x00ab  /* U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */\n#define XK_notsign                       0x00ac  /* U+00AC NOT SIGN */\n#define XK_hyphen                        0x00ad  /* U+00AD SOFT HYPHEN */\n#define XK_registered                    0x00ae  /* U+00AE REGISTERED SIGN */\n#define XK_macron                        0x00af  /* U+00AF MACRON */\n#define XK_degree                        0x00b0  /* U+00B0 DEGREE SIGN */\n#define XK_plusminus                     0x00b1  /* U+00B1 PLUS-MINUS SIGN */\n#define XK_twosuperior                   0x00b2  /* U+00B2 SUPERSCRIPT TWO */\n#define XK_threesuperior                 0x00b3  /* U+00B3 SUPERSCRIPT THREE */\n#define XK_acute                         0x00b4  /* U+00B4 ACUTE ACCENT */\n#define XK_mu                            0x00b5  /* U+00B5 MICRO SIGN */\n#define XK_paragraph                     0x00b6  /* U+00B6 PILCROW SIGN */\n#define XK_periodcentered                0x00b7  /* U+00B7 MIDDLE DOT */\n#define XK_cedilla                       0x00b8  /* U+00B8 CEDILLA */\n#define XK_onesuperior                   0x00b9  /* U+00B9 SUPERSCRIPT ONE */\n#define XK_masculine                     0x00ba  /* U+00BA MASCULINE ORDINAL INDICATOR */\n#define XK_guillemotright                0x00bb  /* U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */\n#define XK_onequarter                    0x00bc  /* U+00BC VULGAR FRACTION ONE QUARTER */\n#define XK_onehalf                       0x00bd  /* U+00BD VULGAR FRACTION ONE HALF */\n#define XK_threequarters                 0x00be  /* U+00BE VULGAR FRACTION THREE QUARTERS */\n#define XK_questiondown                  0x00bf  /* U+00BF INVERTED QUESTION MARK */\n#define XK_Agrave                        0x00c0  /* U+00C0 LATIN CAPITAL LETTER A WITH GRAVE */\n#define XK_Aacute                        0x00c1  /* U+00C1 LATIN CAPITAL LETTER A WITH ACUTE */\n#define XK_Acircumflex                   0x00c2  /* U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX */\n#define XK_Atilde                        0x00c3  /* U+00C3 LATIN CAPITAL LETTER A WITH TILDE */\n#define XK_Adiaeresis                    0x00c4  /* U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS */\n#define XK_Aring                         0x00c5  /* U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE */\n#define XK_AE                            0x00c6  /* U+00C6 LATIN CAPITAL LETTER AE */\n#define XK_Ccedilla                      0x00c7  /* U+00C7 LATIN CAPITAL LETTER C WITH CEDILLA */\n#define XK_Egrave                        0x00c8  /* U+00C8 LATIN CAPITAL LETTER E WITH GRAVE */\n#define XK_Eacute                        0x00c9  /* U+00C9 LATIN CAPITAL LETTER E WITH ACUTE */\n#define XK_Ecircumflex                   0x00ca  /* U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX */\n#define XK_Ediaeresis                    0x00cb  /* U+00CB LATIN CAPITAL LETTER E WITH DIAERESIS */\n#define XK_Igrave                        0x00cc  /* U+00CC LATIN CAPITAL LETTER I WITH GRAVE */\n#define XK_Iacute                        0x00cd  /* U+00CD LATIN CAPITAL LETTER I WITH ACUTE */\n#define XK_Icircumflex                   0x00ce  /* U+00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX */\n#define XK_Idiaeresis                    0x00cf  /* U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS */\n#define XK_ETH                           0x00d0  /* U+00D0 LATIN CAPITAL LETTER ETH */\n#define XK_Eth                           0x00d0  /* deprecated */\n#define XK_Ntilde                        0x00d1  /* U+00D1 LATIN CAPITAL LETTER N WITH TILDE */\n#define XK_Ograve                        0x00d2  /* U+00D2 LATIN CAPITAL LETTER O WITH GRAVE */\n#define XK_Oacute                        0x00d3  /* U+00D3 LATIN CAPITAL LETTER O WITH ACUTE */\n#define XK_Ocircumflex                   0x00d4  /* U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX */\n#define XK_Otilde                        0x00d5  /* U+00D5 LATIN CAPITAL LETTER O WITH TILDE */\n#define XK_Odiaeresis                    0x00d6  /* U+00D6 LATIN CAPITAL LETTER O WITH DIAERESIS */\n#define XK_multiply                      0x00d7  /* U+00D7 MULTIPLICATION SIGN */\n#define XK_Oslash                        0x00d8  /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */\n#define XK_Ooblique                      0x00d8  /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */\n#define XK_Ugrave                        0x00d9  /* U+00D9 LATIN CAPITAL LETTER U WITH GRAVE */\n#define XK_Uacute                        0x00da  /* U+00DA LATIN CAPITAL LETTER U WITH ACUTE */\n#define XK_Ucircumflex                   0x00db  /* U+00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX */\n#define XK_Udiaeresis                    0x00dc  /* U+00DC LATIN CAPITAL LETTER U WITH DIAERESIS */\n#define XK_Yacute                        0x00dd  /* U+00DD LATIN CAPITAL LETTER Y WITH ACUTE */\n#define XK_THORN                         0x00de  /* U+00DE LATIN CAPITAL LETTER THORN */\n#define XK_Thorn                         0x00de  /* deprecated */\n#define XK_ssharp                        0x00df  /* U+00DF LATIN SMALL LETTER SHARP S */\n#define XK_agrave                        0x00e0  /* U+00E0 LATIN SMALL LETTER A WITH GRAVE */\n#define XK_aacute                        0x00e1  /* U+00E1 LATIN SMALL LETTER A WITH ACUTE */\n#define XK_acircumflex                   0x00e2  /* U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX */\n#define XK_atilde                        0x00e3  /* U+00E3 LATIN SMALL LETTER A WITH TILDE */\n#define XK_adiaeresis                    0x00e4  /* U+00E4 LATIN SMALL LETTER A WITH DIAERESIS */\n#define XK_aring                         0x00e5  /* U+00E5 LATIN SMALL LETTER A WITH RING ABOVE */\n#define XK_ae                            0x00e6  /* U+00E6 LATIN SMALL LETTER AE */\n#define XK_ccedilla                      0x00e7  /* U+00E7 LATIN SMALL LETTER C WITH CEDILLA */\n#define XK_egrave                        0x00e8  /* U+00E8 LATIN SMALL LETTER E WITH GRAVE */\n#define XK_eacute                        0x00e9  /* U+00E9 LATIN SMALL LETTER E WITH ACUTE */\n#define XK_ecircumflex                   0x00ea  /* U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX */\n#define XK_ediaeresis                    0x00eb  /* U+00EB LATIN SMALL LETTER E WITH DIAERESIS */\n#define XK_igrave                        0x00ec  /* U+00EC LATIN SMALL LETTER I WITH GRAVE */\n#define XK_iacute                        0x00ed  /* U+00ED LATIN SMALL LETTER I WITH ACUTE */\n#define XK_icircumflex                   0x00ee  /* U+00EE LATIN SMALL LETTER I WITH CIRCUMFLEX */\n#define XK_idiaeresis                    0x00ef  /* U+00EF LATIN SMALL LETTER I WITH DIAERESIS */\n#define XK_eth                           0x00f0  /* U+00F0 LATIN SMALL LETTER ETH */\n#define XK_ntilde                        0x00f1  /* U+00F1 LATIN SMALL LETTER N WITH TILDE */\n#define XK_ograve                        0x00f2  /* U+00F2 LATIN SMALL LETTER O WITH GRAVE */\n#define XK_oacute                        0x00f3  /* U+00F3 LATIN SMALL LETTER O WITH ACUTE */\n#define XK_ocircumflex                   0x00f4  /* U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX */\n#define XK_otilde                        0x00f5  /* U+00F5 LATIN SMALL LETTER O WITH TILDE */\n#define XK_odiaeresis                    0x00f6  /* U+00F6 LATIN SMALL LETTER O WITH DIAERESIS */\n#define XK_division                      0x00f7  /* U+00F7 DIVISION SIGN */\n#define XK_oslash                        0x00f8  /* U+00F8 LATIN SMALL LETTER O WITH STROKE */\n#define XK_ooblique                      0x00f8  /* U+00F8 LATIN SMALL LETTER O WITH STROKE */\n#define XK_ugrave                        0x00f9  /* U+00F9 LATIN SMALL LETTER U WITH GRAVE */\n#define XK_uacute                        0x00fa  /* U+00FA LATIN SMALL LETTER U WITH ACUTE */\n#define XK_ucircumflex                   0x00fb  /* U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX */\n#define XK_udiaeresis                    0x00fc  /* U+00FC LATIN SMALL LETTER U WITH DIAERESIS */\n#define XK_yacute                        0x00fd  /* U+00FD LATIN SMALL LETTER Y WITH ACUTE */\n#define XK_thorn                         0x00fe  /* U+00FE LATIN SMALL LETTER THORN */\n#define XK_ydiaeresis                    0x00ff  /* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */\n#endif /* XK_LATIN1 */\n\n/*\n * Latin 2\n * Byte 3 = 1\n */\n\n#ifdef XK_LATIN2\n#define XK_Aogonek                       0x01a1  /* U+0104 LATIN CAPITAL LETTER A WITH OGONEK */\n#define XK_breve                         0x01a2  /* U+02D8 BREVE */\n#define XK_Lstroke                       0x01a3  /* U+0141 LATIN CAPITAL LETTER L WITH STROKE */\n#define XK_Lcaron                        0x01a5  /* U+013D LATIN CAPITAL LETTER L WITH CARON */\n#define XK_Sacute                        0x01a6  /* U+015A LATIN CAPITAL LETTER S WITH ACUTE */\n#define XK_Scaron                        0x01a9  /* U+0160 LATIN CAPITAL LETTER S WITH CARON */\n#define XK_Scedilla                      0x01aa  /* U+015E LATIN CAPITAL LETTER S WITH CEDILLA */\n#define XK_Tcaron                        0x01ab  /* U+0164 LATIN CAPITAL LETTER T WITH CARON */\n#define XK_Zacute                        0x01ac  /* U+0179 LATIN CAPITAL LETTER Z WITH ACUTE */\n#define XK_Zcaron                        0x01ae  /* U+017D LATIN CAPITAL LETTER Z WITH CARON */\n#define XK_Zabovedot                     0x01af  /* U+017B LATIN CAPITAL LETTER Z WITH DOT ABOVE */\n#define XK_aogonek                       0x01b1  /* U+0105 LATIN SMALL LETTER A WITH OGONEK */\n#define XK_ogonek                        0x01b2  /* U+02DB OGONEK */\n#define XK_lstroke                       0x01b3  /* U+0142 LATIN SMALL LETTER L WITH STROKE */\n#define XK_lcaron                        0x01b5  /* U+013E LATIN SMALL LETTER L WITH CARON */\n#define XK_sacute                        0x01b6  /* U+015B LATIN SMALL LETTER S WITH ACUTE */\n#define XK_caron                         0x01b7  /* U+02C7 CARON */\n#define XK_scaron                        0x01b9  /* U+0161 LATIN SMALL LETTER S WITH CARON */\n#define XK_scedilla                      0x01ba  /* U+015F LATIN SMALL LETTER S WITH CEDILLA */\n#define XK_tcaron                        0x01bb  /* U+0165 LATIN SMALL LETTER T WITH CARON */\n#define XK_zacute                        0x01bc  /* U+017A LATIN SMALL LETTER Z WITH ACUTE */\n#define XK_doubleacute                   0x01bd  /* U+02DD DOUBLE ACUTE ACCENT */\n#define XK_zcaron                        0x01be  /* U+017E LATIN SMALL LETTER Z WITH CARON */\n#define XK_zabovedot                     0x01bf  /* U+017C LATIN SMALL LETTER Z WITH DOT ABOVE */\n#define XK_Racute                        0x01c0  /* U+0154 LATIN CAPITAL LETTER R WITH ACUTE */\n#define XK_Abreve                        0x01c3  /* U+0102 LATIN CAPITAL LETTER A WITH BREVE */\n#define XK_Lacute                        0x01c5  /* U+0139 LATIN CAPITAL LETTER L WITH ACUTE */\n#define XK_Cacute                        0x01c6  /* U+0106 LATIN CAPITAL LETTER C WITH ACUTE */\n#define XK_Ccaron                        0x01c8  /* U+010C LATIN CAPITAL LETTER C WITH CARON */\n#define XK_Eogonek                       0x01ca  /* U+0118 LATIN CAPITAL LETTER E WITH OGONEK */\n#define XK_Ecaron                        0x01cc  /* U+011A LATIN CAPITAL LETTER E WITH CARON */\n#define XK_Dcaron                        0x01cf  /* U+010E LATIN CAPITAL LETTER D WITH CARON */\n#define XK_Dstroke                       0x01d0  /* U+0110 LATIN CAPITAL LETTER D WITH STROKE */\n#define XK_Nacute                        0x01d1  /* U+0143 LATIN CAPITAL LETTER N WITH ACUTE */\n#define XK_Ncaron                        0x01d2  /* U+0147 LATIN CAPITAL LETTER N WITH CARON */\n#define XK_Odoubleacute                  0x01d5  /* U+0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */\n#define XK_Rcaron                        0x01d8  /* U+0158 LATIN CAPITAL LETTER R WITH CARON */\n#define XK_Uring                         0x01d9  /* U+016E LATIN CAPITAL LETTER U WITH RING ABOVE */\n#define XK_Udoubleacute                  0x01db  /* U+0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */\n#define XK_Tcedilla                      0x01de  /* U+0162 LATIN CAPITAL LETTER T WITH CEDILLA */\n#define XK_racute                        0x01e0  /* U+0155 LATIN SMALL LETTER R WITH ACUTE */\n#define XK_abreve                        0x01e3  /* U+0103 LATIN SMALL LETTER A WITH BREVE */\n#define XK_lacute                        0x01e5  /* U+013A LATIN SMALL LETTER L WITH ACUTE */\n#define XK_cacute                        0x01e6  /* U+0107 LATIN SMALL LETTER C WITH ACUTE */\n#define XK_ccaron                        0x01e8  /* U+010D LATIN SMALL LETTER C WITH CARON */\n#define XK_eogonek                       0x01ea  /* U+0119 LATIN SMALL LETTER E WITH OGONEK */\n#define XK_ecaron                        0x01ec  /* U+011B LATIN SMALL LETTER E WITH CARON */\n#define XK_dcaron                        0x01ef  /* U+010F LATIN SMALL LETTER D WITH CARON */\n#define XK_dstroke                       0x01f0  /* U+0111 LATIN SMALL LETTER D WITH STROKE */\n#define XK_nacute                        0x01f1  /* U+0144 LATIN SMALL LETTER N WITH ACUTE */\n#define XK_ncaron                        0x01f2  /* U+0148 LATIN SMALL LETTER N WITH CARON */\n#define XK_odoubleacute                  0x01f5  /* U+0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE */\n#define XK_rcaron                        0x01f8  /* U+0159 LATIN SMALL LETTER R WITH CARON */\n#define XK_uring                         0x01f9  /* U+016F LATIN SMALL LETTER U WITH RING ABOVE */\n#define XK_udoubleacute                  0x01fb  /* U+0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE */\n#define XK_tcedilla                      0x01fe  /* U+0163 LATIN SMALL LETTER T WITH CEDILLA */\n#define XK_abovedot                      0x01ff  /* U+02D9 DOT ABOVE */\n#endif /* XK_LATIN2 */\n\n/*\n * Latin 3\n * Byte 3 = 2\n */\n\n#ifdef XK_LATIN3\n#define XK_Hstroke                       0x02a1  /* U+0126 LATIN CAPITAL LETTER H WITH STROKE */\n#define XK_Hcircumflex                   0x02a6  /* U+0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX */\n#define XK_Iabovedot                     0x02a9  /* U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE */\n#define XK_Gbreve                        0x02ab  /* U+011E LATIN CAPITAL LETTER G WITH BREVE */\n#define XK_Jcircumflex                   0x02ac  /* U+0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX */\n#define XK_hstroke                       0x02b1  /* U+0127 LATIN SMALL LETTER H WITH STROKE */\n#define XK_hcircumflex                   0x02b6  /* U+0125 LATIN SMALL LETTER H WITH CIRCUMFLEX */\n#define XK_idotless                      0x02b9  /* U+0131 LATIN SMALL LETTER DOTLESS I */\n#define XK_gbreve                        0x02bb  /* U+011F LATIN SMALL LETTER G WITH BREVE */\n#define XK_jcircumflex                   0x02bc  /* U+0135 LATIN SMALL LETTER J WITH CIRCUMFLEX */\n#define XK_Cabovedot                     0x02c5  /* U+010A LATIN CAPITAL LETTER C WITH DOT ABOVE */\n#define XK_Ccircumflex                   0x02c6  /* U+0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX */\n#define XK_Gabovedot                     0x02d5  /* U+0120 LATIN CAPITAL LETTER G WITH DOT ABOVE */\n#define XK_Gcircumflex                   0x02d8  /* U+011C LATIN CAPITAL LETTER G WITH CIRCUMFLEX */\n#define XK_Ubreve                        0x02dd  /* U+016C LATIN CAPITAL LETTER U WITH BREVE */\n#define XK_Scircumflex                   0x02de  /* U+015C LATIN CAPITAL LETTER S WITH CIRCUMFLEX */\n#define XK_cabovedot                     0x02e5  /* U+010B LATIN SMALL LETTER C WITH DOT ABOVE */\n#define XK_ccircumflex                   0x02e6  /* U+0109 LATIN SMALL LETTER C WITH CIRCUMFLEX */\n#define XK_gabovedot                     0x02f5  /* U+0121 LATIN SMALL LETTER G WITH DOT ABOVE */\n#define XK_gcircumflex                   0x02f8  /* U+011D LATIN SMALL LETTER G WITH CIRCUMFLEX */\n#define XK_ubreve                        0x02fd  /* U+016D LATIN SMALL LETTER U WITH BREVE */\n#define XK_scircumflex                   0x02fe  /* U+015D LATIN SMALL LETTER S WITH CIRCUMFLEX */\n#endif /* XK_LATIN3 */\n\n\n/*\n * Latin 4\n * Byte 3 = 3\n */\n\n#ifdef XK_LATIN4\n#define XK_kra                           0x03a2  /* U+0138 LATIN SMALL LETTER KRA */\n#define XK_kappa                         0x03a2  /* deprecated */\n#define XK_Rcedilla                      0x03a3  /* U+0156 LATIN CAPITAL LETTER R WITH CEDILLA */\n#define XK_Itilde                        0x03a5  /* U+0128 LATIN CAPITAL LETTER I WITH TILDE */\n#define XK_Lcedilla                      0x03a6  /* U+013B LATIN CAPITAL LETTER L WITH CEDILLA */\n#define XK_Emacron                       0x03aa  /* U+0112 LATIN CAPITAL LETTER E WITH MACRON */\n#define XK_Gcedilla                      0x03ab  /* U+0122 LATIN CAPITAL LETTER G WITH CEDILLA */\n#define XK_Tslash                        0x03ac  /* U+0166 LATIN CAPITAL LETTER T WITH STROKE */\n#define XK_rcedilla                      0x03b3  /* U+0157 LATIN SMALL LETTER R WITH CEDILLA */\n#define XK_itilde                        0x03b5  /* U+0129 LATIN SMALL LETTER I WITH TILDE */\n#define XK_lcedilla                      0x03b6  /* U+013C LATIN SMALL LETTER L WITH CEDILLA */\n#define XK_emacron                       0x03ba  /* U+0113 LATIN SMALL LETTER E WITH MACRON */\n#define XK_gcedilla                      0x03bb  /* U+0123 LATIN SMALL LETTER G WITH CEDILLA */\n#define XK_tslash                        0x03bc  /* U+0167 LATIN SMALL LETTER T WITH STROKE */\n#define XK_ENG                           0x03bd  /* U+014A LATIN CAPITAL LETTER ENG */\n#define XK_eng                           0x03bf  /* U+014B LATIN SMALL LETTER ENG */\n#define XK_Amacron                       0x03c0  /* U+0100 LATIN CAPITAL LETTER A WITH MACRON */\n#define XK_Iogonek                       0x03c7  /* U+012E LATIN CAPITAL LETTER I WITH OGONEK */\n#define XK_Eabovedot                     0x03cc  /* U+0116 LATIN CAPITAL LETTER E WITH DOT ABOVE */\n#define XK_Imacron                       0x03cf  /* U+012A LATIN CAPITAL LETTER I WITH MACRON */\n#define XK_Ncedilla                      0x03d1  /* U+0145 LATIN CAPITAL LETTER N WITH CEDILLA */\n#define XK_Omacron                       0x03d2  /* U+014C LATIN CAPITAL LETTER O WITH MACRON */\n#define XK_Kcedilla                      0x03d3  /* U+0136 LATIN CAPITAL LETTER K WITH CEDILLA */\n#define XK_Uogonek                       0x03d9  /* U+0172 LATIN CAPITAL LETTER U WITH OGONEK */\n#define XK_Utilde                        0x03dd  /* U+0168 LATIN CAPITAL LETTER U WITH TILDE */\n#define XK_Umacron                       0x03de  /* U+016A LATIN CAPITAL LETTER U WITH MACRON */\n#define XK_amacron                       0x03e0  /* U+0101 LATIN SMALL LETTER A WITH MACRON */\n#define XK_iogonek                       0x03e7  /* U+012F LATIN SMALL LETTER I WITH OGONEK */\n#define XK_eabovedot                     0x03ec  /* U+0117 LATIN SMALL LETTER E WITH DOT ABOVE */\n#define XK_imacron                       0x03ef  /* U+012B LATIN SMALL LETTER I WITH MACRON */\n#define XK_ncedilla                      0x03f1  /* U+0146 LATIN SMALL LETTER N WITH CEDILLA */\n#define XK_omacron                       0x03f2  /* U+014D LATIN SMALL LETTER O WITH MACRON */\n#define XK_kcedilla                      0x03f3  /* U+0137 LATIN SMALL LETTER K WITH CEDILLA */\n#define XK_uogonek                       0x03f9  /* U+0173 LATIN SMALL LETTER U WITH OGONEK */\n#define XK_utilde                        0x03fd  /* U+0169 LATIN SMALL LETTER U WITH TILDE */\n#define XK_umacron                       0x03fe  /* U+016B LATIN SMALL LETTER U WITH MACRON */\n#endif /* XK_LATIN4 */\n\n/*\n * Latin 8\n */\n#ifdef XK_LATIN8\n#define XK_Wcircumflex                0x1000174  /* U+0174 LATIN CAPITAL LETTER W WITH CIRCUMFLEX */\n#define XK_wcircumflex                0x1000175  /* U+0175 LATIN SMALL LETTER W WITH CIRCUMFLEX */\n#define XK_Ycircumflex                0x1000176  /* U+0176 LATIN CAPITAL LETTER Y WITH CIRCUMFLEX */\n#define XK_ycircumflex                0x1000177  /* U+0177 LATIN SMALL LETTER Y WITH CIRCUMFLEX */\n#define XK_Babovedot                  0x1001e02  /* U+1E02 LATIN CAPITAL LETTER B WITH DOT ABOVE */\n#define XK_babovedot                  0x1001e03  /* U+1E03 LATIN SMALL LETTER B WITH DOT ABOVE */\n#define XK_Dabovedot                  0x1001e0a  /* U+1E0A LATIN CAPITAL LETTER D WITH DOT ABOVE */\n#define XK_dabovedot                  0x1001e0b  /* U+1E0B LATIN SMALL LETTER D WITH DOT ABOVE */\n#define XK_Fabovedot                  0x1001e1e  /* U+1E1E LATIN CAPITAL LETTER F WITH DOT ABOVE */\n#define XK_fabovedot                  0x1001e1f  /* U+1E1F LATIN SMALL LETTER F WITH DOT ABOVE */\n#define XK_Mabovedot                  0x1001e40  /* U+1E40 LATIN CAPITAL LETTER M WITH DOT ABOVE */\n#define XK_mabovedot                  0x1001e41  /* U+1E41 LATIN SMALL LETTER M WITH DOT ABOVE */\n#define XK_Pabovedot                  0x1001e56  /* U+1E56 LATIN CAPITAL LETTER P WITH DOT ABOVE */\n#define XK_pabovedot                  0x1001e57  /* U+1E57 LATIN SMALL LETTER P WITH DOT ABOVE */\n#define XK_Sabovedot                  0x1001e60  /* U+1E60 LATIN CAPITAL LETTER S WITH DOT ABOVE */\n#define XK_sabovedot                  0x1001e61  /* U+1E61 LATIN SMALL LETTER S WITH DOT ABOVE */\n#define XK_Tabovedot                  0x1001e6a  /* U+1E6A LATIN CAPITAL LETTER T WITH DOT ABOVE */\n#define XK_tabovedot                  0x1001e6b  /* U+1E6B LATIN SMALL LETTER T WITH DOT ABOVE */\n#define XK_Wgrave                     0x1001e80  /* U+1E80 LATIN CAPITAL LETTER W WITH GRAVE */\n#define XK_wgrave                     0x1001e81  /* U+1E81 LATIN SMALL LETTER W WITH GRAVE */\n#define XK_Wacute                     0x1001e82  /* U+1E82 LATIN CAPITAL LETTER W WITH ACUTE */\n#define XK_wacute                     0x1001e83  /* U+1E83 LATIN SMALL LETTER W WITH ACUTE */\n#define XK_Wdiaeresis                 0x1001e84  /* U+1E84 LATIN CAPITAL LETTER W WITH DIAERESIS */\n#define XK_wdiaeresis                 0x1001e85  /* U+1E85 LATIN SMALL LETTER W WITH DIAERESIS */\n#define XK_Ygrave                     0x1001ef2  /* U+1EF2 LATIN CAPITAL LETTER Y WITH GRAVE */\n#define XK_ygrave                     0x1001ef3  /* U+1EF3 LATIN SMALL LETTER Y WITH GRAVE */\n#endif /* XK_LATIN8 */\n\n/*\n * Latin 9\n * Byte 3 = 0x13\n */\n\n#ifdef XK_LATIN9\n#define XK_OE                            0x13bc  /* U+0152 LATIN CAPITAL LIGATURE OE */\n#define XK_oe                            0x13bd  /* U+0153 LATIN SMALL LIGATURE OE */\n#define XK_Ydiaeresis                    0x13be  /* U+0178 LATIN CAPITAL LETTER Y WITH DIAERESIS */\n#endif /* XK_LATIN9 */\n\n/*\n * Katakana\n * Byte 3 = 4\n */\n\n#ifdef XK_KATAKANA\n#define XK_overline                      0x047e  /* U+203E OVERLINE */\n#define XK_kana_fullstop                 0x04a1  /* U+3002 IDEOGRAPHIC FULL STOP */\n#define XK_kana_openingbracket           0x04a2  /* U+300C LEFT CORNER BRACKET */\n#define XK_kana_closingbracket           0x04a3  /* U+300D RIGHT CORNER BRACKET */\n#define XK_kana_comma                    0x04a4  /* U+3001 IDEOGRAPHIC COMMA */\n#define XK_kana_conjunctive              0x04a5  /* U+30FB KATAKANA MIDDLE DOT */\n#define XK_kana_middledot                0x04a5  /* deprecated */\n#define XK_kana_WO                       0x04a6  /* U+30F2 KATAKANA LETTER WO */\n#define XK_kana_a                        0x04a7  /* U+30A1 KATAKANA LETTER SMALL A */\n#define XK_kana_i                        0x04a8  /* U+30A3 KATAKANA LETTER SMALL I */\n#define XK_kana_u                        0x04a9  /* U+30A5 KATAKANA LETTER SMALL U */\n#define XK_kana_e                        0x04aa  /* U+30A7 KATAKANA LETTER SMALL E */\n#define XK_kana_o                        0x04ab  /* U+30A9 KATAKANA LETTER SMALL O */\n#define XK_kana_ya                       0x04ac  /* U+30E3 KATAKANA LETTER SMALL YA */\n#define XK_kana_yu                       0x04ad  /* U+30E5 KATAKANA LETTER SMALL YU */\n#define XK_kana_yo                       0x04ae  /* U+30E7 KATAKANA LETTER SMALL YO */\n#define XK_kana_tsu                      0x04af  /* U+30C3 KATAKANA LETTER SMALL TU */\n#define XK_kana_tu                       0x04af  /* deprecated */\n#define XK_prolongedsound                0x04b0  /* U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK */\n#define XK_kana_A                        0x04b1  /* U+30A2 KATAKANA LETTER A */\n#define XK_kana_I                        0x04b2  /* U+30A4 KATAKANA LETTER I */\n#define XK_kana_U                        0x04b3  /* U+30A6 KATAKANA LETTER U */\n#define XK_kana_E                        0x04b4  /* U+30A8 KATAKANA LETTER E */\n#define XK_kana_O                        0x04b5  /* U+30AA KATAKANA LETTER O */\n#define XK_kana_KA                       0x04b6  /* U+30AB KATAKANA LETTER KA */\n#define XK_kana_KI                       0x04b7  /* U+30AD KATAKANA LETTER KI */\n#define XK_kana_KU                       0x04b8  /* U+30AF KATAKANA LETTER KU */\n#define XK_kana_KE                       0x04b9  /* U+30B1 KATAKANA LETTER KE */\n#define XK_kana_KO                       0x04ba  /* U+30B3 KATAKANA LETTER KO */\n#define XK_kana_SA                       0x04bb  /* U+30B5 KATAKANA LETTER SA */\n#define XK_kana_SHI                      0x04bc  /* U+30B7 KATAKANA LETTER SI */\n#define XK_kana_SU                       0x04bd  /* U+30B9 KATAKANA LETTER SU */\n#define XK_kana_SE                       0x04be  /* U+30BB KATAKANA LETTER SE */\n#define XK_kana_SO                       0x04bf  /* U+30BD KATAKANA LETTER SO */\n#define XK_kana_TA                       0x04c0  /* U+30BF KATAKANA LETTER TA */\n#define XK_kana_CHI                      0x04c1  /* U+30C1 KATAKANA LETTER TI */\n#define XK_kana_TI                       0x04c1  /* deprecated */\n#define XK_kana_TSU                      0x04c2  /* U+30C4 KATAKANA LETTER TU */\n#define XK_kana_TU                       0x04c2  /* deprecated */\n#define XK_kana_TE                       0x04c3  /* U+30C6 KATAKANA LETTER TE */\n#define XK_kana_TO                       0x04c4  /* U+30C8 KATAKANA LETTER TO */\n#define XK_kana_NA                       0x04c5  /* U+30CA KATAKANA LETTER NA */\n#define XK_kana_NI                       0x04c6  /* U+30CB KATAKANA LETTER NI */\n#define XK_kana_NU                       0x04c7  /* U+30CC KATAKANA LETTER NU */\n#define XK_kana_NE                       0x04c8  /* U+30CD KATAKANA LETTER NE */\n#define XK_kana_NO                       0x04c9  /* U+30CE KATAKANA LETTER NO */\n#define XK_kana_HA                       0x04ca  /* U+30CF KATAKANA LETTER HA */\n#define XK_kana_HI                       0x04cb  /* U+30D2 KATAKANA LETTER HI */\n#define XK_kana_FU                       0x04cc  /* U+30D5 KATAKANA LETTER HU */\n#define XK_kana_HU                       0x04cc  /* deprecated */\n#define XK_kana_HE                       0x04cd  /* U+30D8 KATAKANA LETTER HE */\n#define XK_kana_HO                       0x04ce  /* U+30DB KATAKANA LETTER HO */\n#define XK_kana_MA                       0x04cf  /* U+30DE KATAKANA LETTER MA */\n#define XK_kana_MI                       0x04d0  /* U+30DF KATAKANA LETTER MI */\n#define XK_kana_MU                       0x04d1  /* U+30E0 KATAKANA LETTER MU */\n#define XK_kana_ME                       0x04d2  /* U+30E1 KATAKANA LETTER ME */\n#define XK_kana_MO                       0x04d3  /* U+30E2 KATAKANA LETTER MO */\n#define XK_kana_YA                       0x04d4  /* U+30E4 KATAKANA LETTER YA */\n#define XK_kana_YU                       0x04d5  /* U+30E6 KATAKANA LETTER YU */\n#define XK_kana_YO                       0x04d6  /* U+30E8 KATAKANA LETTER YO */\n#define XK_kana_RA                       0x04d7  /* U+30E9 KATAKANA LETTER RA */\n#define XK_kana_RI                       0x04d8  /* U+30EA KATAKANA LETTER RI */\n#define XK_kana_RU                       0x04d9  /* U+30EB KATAKANA LETTER RU */\n#define XK_kana_RE                       0x04da  /* U+30EC KATAKANA LETTER RE */\n#define XK_kana_RO                       0x04db  /* U+30ED KATAKANA LETTER RO */\n#define XK_kana_WA                       0x04dc  /* U+30EF KATAKANA LETTER WA */\n#define XK_kana_N                        0x04dd  /* U+30F3 KATAKANA LETTER N */\n#define XK_voicedsound                   0x04de  /* U+309B KATAKANA-HIRAGANA VOICED SOUND MARK */\n#define XK_semivoicedsound               0x04df  /* U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */\n#define XK_kana_switch                   0xff7e  /* Alias for mode_switch */\n#endif /* XK_KATAKANA */\n\n/*\n * Arabic\n * Byte 3 = 5\n */\n\n#ifdef XK_ARABIC\n#define XK_Farsi_0                    0x10006f0  /* U+06F0 EXTENDED ARABIC-INDIC DIGIT ZERO */\n#define XK_Farsi_1                    0x10006f1  /* U+06F1 EXTENDED ARABIC-INDIC DIGIT ONE */\n#define XK_Farsi_2                    0x10006f2  /* U+06F2 EXTENDED ARABIC-INDIC DIGIT TWO */\n#define XK_Farsi_3                    0x10006f3  /* U+06F3 EXTENDED ARABIC-INDIC DIGIT THREE */\n#define XK_Farsi_4                    0x10006f4  /* U+06F4 EXTENDED ARABIC-INDIC DIGIT FOUR */\n#define XK_Farsi_5                    0x10006f5  /* U+06F5 EXTENDED ARABIC-INDIC DIGIT FIVE */\n#define XK_Farsi_6                    0x10006f6  /* U+06F6 EXTENDED ARABIC-INDIC DIGIT SIX */\n#define XK_Farsi_7                    0x10006f7  /* U+06F7 EXTENDED ARABIC-INDIC DIGIT SEVEN */\n#define XK_Farsi_8                    0x10006f8  /* U+06F8 EXTENDED ARABIC-INDIC DIGIT EIGHT */\n#define XK_Farsi_9                    0x10006f9  /* U+06F9 EXTENDED ARABIC-INDIC DIGIT NINE */\n#define XK_Arabic_percent             0x100066a  /* U+066A ARABIC PERCENT SIGN */\n#define XK_Arabic_superscript_alef    0x1000670  /* U+0670 ARABIC LETTER SUPERSCRIPT ALEF */\n#define XK_Arabic_tteh                0x1000679  /* U+0679 ARABIC LETTER TTEH */\n#define XK_Arabic_peh                 0x100067e  /* U+067E ARABIC LETTER PEH */\n#define XK_Arabic_tcheh               0x1000686  /* U+0686 ARABIC LETTER TCHEH */\n#define XK_Arabic_ddal                0x1000688  /* U+0688 ARABIC LETTER DDAL */\n#define XK_Arabic_rreh                0x1000691  /* U+0691 ARABIC LETTER RREH */\n#define XK_Arabic_comma                  0x05ac  /* U+060C ARABIC COMMA */\n#define XK_Arabic_fullstop            0x10006d4  /* U+06D4 ARABIC FULL STOP */\n#define XK_Arabic_0                   0x1000660  /* U+0660 ARABIC-INDIC DIGIT ZERO */\n#define XK_Arabic_1                   0x1000661  /* U+0661 ARABIC-INDIC DIGIT ONE */\n#define XK_Arabic_2                   0x1000662  /* U+0662 ARABIC-INDIC DIGIT TWO */\n#define XK_Arabic_3                   0x1000663  /* U+0663 ARABIC-INDIC DIGIT THREE */\n#define XK_Arabic_4                   0x1000664  /* U+0664 ARABIC-INDIC DIGIT FOUR */\n#define XK_Arabic_5                   0x1000665  /* U+0665 ARABIC-INDIC DIGIT FIVE */\n#define XK_Arabic_6                   0x1000666  /* U+0666 ARABIC-INDIC DIGIT SIX */\n#define XK_Arabic_7                   0x1000667  /* U+0667 ARABIC-INDIC DIGIT SEVEN */\n#define XK_Arabic_8                   0x1000668  /* U+0668 ARABIC-INDIC DIGIT EIGHT */\n#define XK_Arabic_9                   0x1000669  /* U+0669 ARABIC-INDIC DIGIT NINE */\n#define XK_Arabic_semicolon              0x05bb  /* U+061B ARABIC SEMICOLON */\n#define XK_Arabic_question_mark          0x05bf  /* U+061F ARABIC QUESTION MARK */\n#define XK_Arabic_hamza                  0x05c1  /* U+0621 ARABIC LETTER HAMZA */\n#define XK_Arabic_maddaonalef            0x05c2  /* U+0622 ARABIC LETTER ALEF WITH MADDA ABOVE */\n#define XK_Arabic_hamzaonalef            0x05c3  /* U+0623 ARABIC LETTER ALEF WITH HAMZA ABOVE */\n#define XK_Arabic_hamzaonwaw             0x05c4  /* U+0624 ARABIC LETTER WAW WITH HAMZA ABOVE */\n#define XK_Arabic_hamzaunderalef         0x05c5  /* U+0625 ARABIC LETTER ALEF WITH HAMZA BELOW */\n#define XK_Arabic_hamzaonyeh             0x05c6  /* U+0626 ARABIC LETTER YEH WITH HAMZA ABOVE */\n#define XK_Arabic_alef                   0x05c7  /* U+0627 ARABIC LETTER ALEF */\n#define XK_Arabic_beh                    0x05c8  /* U+0628 ARABIC LETTER BEH */\n#define XK_Arabic_tehmarbuta             0x05c9  /* U+0629 ARABIC LETTER TEH MARBUTA */\n#define XK_Arabic_teh                    0x05ca  /* U+062A ARABIC LETTER TEH */\n#define XK_Arabic_theh                   0x05cb  /* U+062B ARABIC LETTER THEH */\n#define XK_Arabic_jeem                   0x05cc  /* U+062C ARABIC LETTER JEEM */\n#define XK_Arabic_hah                    0x05cd  /* U+062D ARABIC LETTER HAH */\n#define XK_Arabic_khah                   0x05ce  /* U+062E ARABIC LETTER KHAH */\n#define XK_Arabic_dal                    0x05cf  /* U+062F ARABIC LETTER DAL */\n#define XK_Arabic_thal                   0x05d0  /* U+0630 ARABIC LETTER THAL */\n#define XK_Arabic_ra                     0x05d1  /* U+0631 ARABIC LETTER REH */\n#define XK_Arabic_zain                   0x05d2  /* U+0632 ARABIC LETTER ZAIN */\n#define XK_Arabic_seen                   0x05d3  /* U+0633 ARABIC LETTER SEEN */\n#define XK_Arabic_sheen                  0x05d4  /* U+0634 ARABIC LETTER SHEEN */\n#define XK_Arabic_sad                    0x05d5  /* U+0635 ARABIC LETTER SAD */\n#define XK_Arabic_dad                    0x05d6  /* U+0636 ARABIC LETTER DAD */\n#define XK_Arabic_tah                    0x05d7  /* U+0637 ARABIC LETTER TAH */\n#define XK_Arabic_zah                    0x05d8  /* U+0638 ARABIC LETTER ZAH */\n#define XK_Arabic_ain                    0x05d9  /* U+0639 ARABIC LETTER AIN */\n#define XK_Arabic_ghain                  0x05da  /* U+063A ARABIC LETTER GHAIN */\n#define XK_Arabic_tatweel                0x05e0  /* U+0640 ARABIC TATWEEL */\n#define XK_Arabic_feh                    0x05e1  /* U+0641 ARABIC LETTER FEH */\n#define XK_Arabic_qaf                    0x05e2  /* U+0642 ARABIC LETTER QAF */\n#define XK_Arabic_kaf                    0x05e3  /* U+0643 ARABIC LETTER KAF */\n#define XK_Arabic_lam                    0x05e4  /* U+0644 ARABIC LETTER LAM */\n#define XK_Arabic_meem                   0x05e5  /* U+0645 ARABIC LETTER MEEM */\n#define XK_Arabic_noon                   0x05e6  /* U+0646 ARABIC LETTER NOON */\n#define XK_Arabic_ha                     0x05e7  /* U+0647 ARABIC LETTER HEH */\n#define XK_Arabic_heh                    0x05e7  /* deprecated */\n#define XK_Arabic_waw                    0x05e8  /* U+0648 ARABIC LETTER WAW */\n#define XK_Arabic_alefmaksura            0x05e9  /* U+0649 ARABIC LETTER ALEF MAKSURA */\n#define XK_Arabic_yeh                    0x05ea  /* U+064A ARABIC LETTER YEH */\n#define XK_Arabic_fathatan               0x05eb  /* U+064B ARABIC FATHATAN */\n#define XK_Arabic_dammatan               0x05ec  /* U+064C ARABIC DAMMATAN */\n#define XK_Arabic_kasratan               0x05ed  /* U+064D ARABIC KASRATAN */\n#define XK_Arabic_fatha                  0x05ee  /* U+064E ARABIC FATHA */\n#define XK_Arabic_damma                  0x05ef  /* U+064F ARABIC DAMMA */\n#define XK_Arabic_kasra                  0x05f0  /* U+0650 ARABIC KASRA */\n#define XK_Arabic_shadda                 0x05f1  /* U+0651 ARABIC SHADDA */\n#define XK_Arabic_sukun                  0x05f2  /* U+0652 ARABIC SUKUN */\n#define XK_Arabic_madda_above         0x1000653  /* U+0653 ARABIC MADDAH ABOVE */\n#define XK_Arabic_hamza_above         0x1000654  /* U+0654 ARABIC HAMZA ABOVE */\n#define XK_Arabic_hamza_below         0x1000655  /* U+0655 ARABIC HAMZA BELOW */\n#define XK_Arabic_jeh                 0x1000698  /* U+0698 ARABIC LETTER JEH */\n#define XK_Arabic_veh                 0x10006a4  /* U+06A4 ARABIC LETTER VEH */\n#define XK_Arabic_keheh               0x10006a9  /* U+06A9 ARABIC LETTER KEHEH */\n#define XK_Arabic_gaf                 0x10006af  /* U+06AF ARABIC LETTER GAF */\n#define XK_Arabic_noon_ghunna         0x10006ba  /* U+06BA ARABIC LETTER NOON GHUNNA */\n#define XK_Arabic_heh_doachashmee     0x10006be  /* U+06BE ARABIC LETTER HEH DOACHASHMEE */\n#define XK_Farsi_yeh                  0x10006cc  /* U+06CC ARABIC LETTER FARSI YEH */\n#define XK_Arabic_farsi_yeh           0x10006cc  /* U+06CC ARABIC LETTER FARSI YEH */\n#define XK_Arabic_yeh_baree           0x10006d2  /* U+06D2 ARABIC LETTER YEH BARREE */\n#define XK_Arabic_heh_goal            0x10006c1  /* U+06C1 ARABIC LETTER HEH GOAL */\n#define XK_Arabic_switch                 0xff7e  /* Alias for mode_switch */\n#endif /* XK_ARABIC */\n\n/*\n * Cyrillic\n * Byte 3 = 6\n */\n#ifdef XK_CYRILLIC\n#define XK_Cyrillic_GHE_bar           0x1000492  /* U+0492 CYRILLIC CAPITAL LETTER GHE WITH STROKE */\n#define XK_Cyrillic_ghe_bar           0x1000493  /* U+0493 CYRILLIC SMALL LETTER GHE WITH STROKE */\n#define XK_Cyrillic_ZHE_descender     0x1000496  /* U+0496 CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER */\n#define XK_Cyrillic_zhe_descender     0x1000497  /* U+0497 CYRILLIC SMALL LETTER ZHE WITH DESCENDER */\n#define XK_Cyrillic_KA_descender      0x100049a  /* U+049A CYRILLIC CAPITAL LETTER KA WITH DESCENDER */\n#define XK_Cyrillic_ka_descender      0x100049b  /* U+049B CYRILLIC SMALL LETTER KA WITH DESCENDER */\n#define XK_Cyrillic_KA_vertstroke     0x100049c  /* U+049C CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE */\n#define XK_Cyrillic_ka_vertstroke     0x100049d  /* U+049D CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE */\n#define XK_Cyrillic_EN_descender      0x10004a2  /* U+04A2 CYRILLIC CAPITAL LETTER EN WITH DESCENDER */\n#define XK_Cyrillic_en_descender      0x10004a3  /* U+04A3 CYRILLIC SMALL LETTER EN WITH DESCENDER */\n#define XK_Cyrillic_U_straight        0x10004ae  /* U+04AE CYRILLIC CAPITAL LETTER STRAIGHT U */\n#define XK_Cyrillic_u_straight        0x10004af  /* U+04AF CYRILLIC SMALL LETTER STRAIGHT U */\n#define XK_Cyrillic_U_straight_bar    0x10004b0  /* U+04B0 CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE */\n#define XK_Cyrillic_u_straight_bar    0x10004b1  /* U+04B1 CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE */\n#define XK_Cyrillic_HA_descender      0x10004b2  /* U+04B2 CYRILLIC CAPITAL LETTER HA WITH DESCENDER */\n#define XK_Cyrillic_ha_descender      0x10004b3  /* U+04B3 CYRILLIC SMALL LETTER HA WITH DESCENDER */\n#define XK_Cyrillic_CHE_descender     0x10004b6  /* U+04B6 CYRILLIC CAPITAL LETTER CHE WITH DESCENDER */\n#define XK_Cyrillic_che_descender     0x10004b7  /* U+04B7 CYRILLIC SMALL LETTER CHE WITH DESCENDER */\n#define XK_Cyrillic_CHE_vertstroke    0x10004b8  /* U+04B8 CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE */\n#define XK_Cyrillic_che_vertstroke    0x10004b9  /* U+04B9 CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE */\n#define XK_Cyrillic_SHHA              0x10004ba  /* U+04BA CYRILLIC CAPITAL LETTER SHHA */\n#define XK_Cyrillic_shha              0x10004bb  /* U+04BB CYRILLIC SMALL LETTER SHHA */\n\n#define XK_Cyrillic_SCHWA             0x10004d8  /* U+04D8 CYRILLIC CAPITAL LETTER SCHWA */\n#define XK_Cyrillic_schwa             0x10004d9  /* U+04D9 CYRILLIC SMALL LETTER SCHWA */\n#define XK_Cyrillic_I_macron          0x10004e2  /* U+04E2 CYRILLIC CAPITAL LETTER I WITH MACRON */\n#define XK_Cyrillic_i_macron          0x10004e3  /* U+04E3 CYRILLIC SMALL LETTER I WITH MACRON */\n#define XK_Cyrillic_O_bar             0x10004e8  /* U+04E8 CYRILLIC CAPITAL LETTER BARRED O */\n#define XK_Cyrillic_o_bar             0x10004e9  /* U+04E9 CYRILLIC SMALL LETTER BARRED O */\n#define XK_Cyrillic_U_macron          0x10004ee  /* U+04EE CYRILLIC CAPITAL LETTER U WITH MACRON */\n#define XK_Cyrillic_u_macron          0x10004ef  /* U+04EF CYRILLIC SMALL LETTER U WITH MACRON */\n\n#define XK_Serbian_dje                   0x06a1  /* U+0452 CYRILLIC SMALL LETTER DJE */\n#define XK_Macedonia_gje                 0x06a2  /* U+0453 CYRILLIC SMALL LETTER GJE */\n#define XK_Cyrillic_io                   0x06a3  /* U+0451 CYRILLIC SMALL LETTER IO */\n#define XK_Ukrainian_ie                  0x06a4  /* U+0454 CYRILLIC SMALL LETTER UKRAINIAN IE */\n#define XK_Ukranian_je                   0x06a4  /* deprecated */\n#define XK_Macedonia_dse                 0x06a5  /* U+0455 CYRILLIC SMALL LETTER DZE */\n#define XK_Ukrainian_i                   0x06a6  /* U+0456 CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */\n#define XK_Ukranian_i                    0x06a6  /* deprecated */\n#define XK_Ukrainian_yi                  0x06a7  /* U+0457 CYRILLIC SMALL LETTER YI */\n#define XK_Ukranian_yi                   0x06a7  /* deprecated */\n#define XK_Cyrillic_je                   0x06a8  /* U+0458 CYRILLIC SMALL LETTER JE */\n#define XK_Serbian_je                    0x06a8  /* deprecated */\n#define XK_Cyrillic_lje                  0x06a9  /* U+0459 CYRILLIC SMALL LETTER LJE */\n#define XK_Serbian_lje                   0x06a9  /* deprecated */\n#define XK_Cyrillic_nje                  0x06aa  /* U+045A CYRILLIC SMALL LETTER NJE */\n#define XK_Serbian_nje                   0x06aa  /* deprecated */\n#define XK_Serbian_tshe                  0x06ab  /* U+045B CYRILLIC SMALL LETTER TSHE */\n#define XK_Macedonia_kje                 0x06ac  /* U+045C CYRILLIC SMALL LETTER KJE */\n#define XK_Ukrainian_ghe_with_upturn     0x06ad  /* U+0491 CYRILLIC SMALL LETTER GHE WITH UPTURN */\n#define XK_Byelorussian_shortu           0x06ae  /* U+045E CYRILLIC SMALL LETTER SHORT U */\n#define XK_Cyrillic_dzhe                 0x06af  /* U+045F CYRILLIC SMALL LETTER DZHE */\n#define XK_Serbian_dze                   0x06af  /* deprecated */\n#define XK_numerosign                    0x06b0  /* U+2116 NUMERO SIGN */\n#define XK_Serbian_DJE                   0x06b1  /* U+0402 CYRILLIC CAPITAL LETTER DJE */\n#define XK_Macedonia_GJE                 0x06b2  /* U+0403 CYRILLIC CAPITAL LETTER GJE */\n#define XK_Cyrillic_IO                   0x06b3  /* U+0401 CYRILLIC CAPITAL LETTER IO */\n#define XK_Ukrainian_IE                  0x06b4  /* U+0404 CYRILLIC CAPITAL LETTER UKRAINIAN IE */\n#define XK_Ukranian_JE                   0x06b4  /* deprecated */\n#define XK_Macedonia_DSE                 0x06b5  /* U+0405 CYRILLIC CAPITAL LETTER DZE */\n#define XK_Ukrainian_I                   0x06b6  /* U+0406 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */\n#define XK_Ukranian_I                    0x06b6  /* deprecated */\n#define XK_Ukrainian_YI                  0x06b7  /* U+0407 CYRILLIC CAPITAL LETTER YI */\n#define XK_Ukranian_YI                   0x06b7  /* deprecated */\n#define XK_Cyrillic_JE                   0x06b8  /* U+0408 CYRILLIC CAPITAL LETTER JE */\n#define XK_Serbian_JE                    0x06b8  /* deprecated */\n#define XK_Cyrillic_LJE                  0x06b9  /* U+0409 CYRILLIC CAPITAL LETTER LJE */\n#define XK_Serbian_LJE                   0x06b9  /* deprecated */\n#define XK_Cyrillic_NJE                  0x06ba  /* U+040A CYRILLIC CAPITAL LETTER NJE */\n#define XK_Serbian_NJE                   0x06ba  /* deprecated */\n#define XK_Serbian_TSHE                  0x06bb  /* U+040B CYRILLIC CAPITAL LETTER TSHE */\n#define XK_Macedonia_KJE                 0x06bc  /* U+040C CYRILLIC CAPITAL LETTER KJE */\n#define XK_Ukrainian_GHE_WITH_UPTURN     0x06bd  /* U+0490 CYRILLIC CAPITAL LETTER GHE WITH UPTURN */\n#define XK_Byelorussian_SHORTU           0x06be  /* U+040E CYRILLIC CAPITAL LETTER SHORT U */\n#define XK_Cyrillic_DZHE                 0x06bf  /* U+040F CYRILLIC CAPITAL LETTER DZHE */\n#define XK_Serbian_DZE                   0x06bf  /* deprecated */\n#define XK_Cyrillic_yu                   0x06c0  /* U+044E CYRILLIC SMALL LETTER YU */\n#define XK_Cyrillic_a                    0x06c1  /* U+0430 CYRILLIC SMALL LETTER A */\n#define XK_Cyrillic_be                   0x06c2  /* U+0431 CYRILLIC SMALL LETTER BE */\n#define XK_Cyrillic_tse                  0x06c3  /* U+0446 CYRILLIC SMALL LETTER TSE */\n#define XK_Cyrillic_de                   0x06c4  /* U+0434 CYRILLIC SMALL LETTER DE */\n#define XK_Cyrillic_ie                   0x06c5  /* U+0435 CYRILLIC SMALL LETTER IE */\n#define XK_Cyrillic_ef                   0x06c6  /* U+0444 CYRILLIC SMALL LETTER EF */\n#define XK_Cyrillic_ghe                  0x06c7  /* U+0433 CYRILLIC SMALL LETTER GHE */\n#define XK_Cyrillic_ha                   0x06c8  /* U+0445 CYRILLIC SMALL LETTER HA */\n#define XK_Cyrillic_i                    0x06c9  /* U+0438 CYRILLIC SMALL LETTER I */\n#define XK_Cyrillic_shorti               0x06ca  /* U+0439 CYRILLIC SMALL LETTER SHORT I */\n#define XK_Cyrillic_ka                   0x06cb  /* U+043A CYRILLIC SMALL LETTER KA */\n#define XK_Cyrillic_el                   0x06cc  /* U+043B CYRILLIC SMALL LETTER EL */\n#define XK_Cyrillic_em                   0x06cd  /* U+043C CYRILLIC SMALL LETTER EM */\n#define XK_Cyrillic_en                   0x06ce  /* U+043D CYRILLIC SMALL LETTER EN */\n#define XK_Cyrillic_o                    0x06cf  /* U+043E CYRILLIC SMALL LETTER O */\n#define XK_Cyrillic_pe                   0x06d0  /* U+043F CYRILLIC SMALL LETTER PE */\n#define XK_Cyrillic_ya                   0x06d1  /* U+044F CYRILLIC SMALL LETTER YA */\n#define XK_Cyrillic_er                   0x06d2  /* U+0440 CYRILLIC SMALL LETTER ER */\n#define XK_Cyrillic_es                   0x06d3  /* U+0441 CYRILLIC SMALL LETTER ES */\n#define XK_Cyrillic_te                   0x06d4  /* U+0442 CYRILLIC SMALL LETTER TE */\n#define XK_Cyrillic_u                    0x06d5  /* U+0443 CYRILLIC SMALL LETTER U */\n#define XK_Cyrillic_zhe                  0x06d6  /* U+0436 CYRILLIC SMALL LETTER ZHE */\n#define XK_Cyrillic_ve                   0x06d7  /* U+0432 CYRILLIC SMALL LETTER VE */\n#define XK_Cyrillic_softsign             0x06d8  /* U+044C CYRILLIC SMALL LETTER SOFT SIGN */\n#define XK_Cyrillic_yeru                 0x06d9  /* U+044B CYRILLIC SMALL LETTER YERU */\n#define XK_Cyrillic_ze                   0x06da  /* U+0437 CYRILLIC SMALL LETTER ZE */\n#define XK_Cyrillic_sha                  0x06db  /* U+0448 CYRILLIC SMALL LETTER SHA */\n#define XK_Cyrillic_e                    0x06dc  /* U+044D CYRILLIC SMALL LETTER E */\n#define XK_Cyrillic_shcha                0x06dd  /* U+0449 CYRILLIC SMALL LETTER SHCHA */\n#define XK_Cyrillic_che                  0x06de  /* U+0447 CYRILLIC SMALL LETTER CHE */\n#define XK_Cyrillic_hardsign             0x06df  /* U+044A CYRILLIC SMALL LETTER HARD SIGN */\n#define XK_Cyrillic_YU                   0x06e0  /* U+042E CYRILLIC CAPITAL LETTER YU */\n#define XK_Cyrillic_A                    0x06e1  /* U+0410 CYRILLIC CAPITAL LETTER A */\n#define XK_Cyrillic_BE                   0x06e2  /* U+0411 CYRILLIC CAPITAL LETTER BE */\n#define XK_Cyrillic_TSE                  0x06e3  /* U+0426 CYRILLIC CAPITAL LETTER TSE */\n#define XK_Cyrillic_DE                   0x06e4  /* U+0414 CYRILLIC CAPITAL LETTER DE */\n#define XK_Cyrillic_IE                   0x06e5  /* U+0415 CYRILLIC CAPITAL LETTER IE */\n#define XK_Cyrillic_EF                   0x06e6  /* U+0424 CYRILLIC CAPITAL LETTER EF */\n#define XK_Cyrillic_GHE                  0x06e7  /* U+0413 CYRILLIC CAPITAL LETTER GHE */\n#define XK_Cyrillic_HA                   0x06e8  /* U+0425 CYRILLIC CAPITAL LETTER HA */\n#define XK_Cyrillic_I                    0x06e9  /* U+0418 CYRILLIC CAPITAL LETTER I */\n#define XK_Cyrillic_SHORTI               0x06ea  /* U+0419 CYRILLIC CAPITAL LETTER SHORT I */\n#define XK_Cyrillic_KA                   0x06eb  /* U+041A CYRILLIC CAPITAL LETTER KA */\n#define XK_Cyrillic_EL                   0x06ec  /* U+041B CYRILLIC CAPITAL LETTER EL */\n#define XK_Cyrillic_EM                   0x06ed  /* U+041C CYRILLIC CAPITAL LETTER EM */\n#define XK_Cyrillic_EN                   0x06ee  /* U+041D CYRILLIC CAPITAL LETTER EN */\n#define XK_Cyrillic_O                    0x06ef  /* U+041E CYRILLIC CAPITAL LETTER O */\n#define XK_Cyrillic_PE                   0x06f0  /* U+041F CYRILLIC CAPITAL LETTER PE */\n#define XK_Cyrillic_YA                   0x06f1  /* U+042F CYRILLIC CAPITAL LETTER YA */\n#define XK_Cyrillic_ER                   0x06f2  /* U+0420 CYRILLIC CAPITAL LETTER ER */\n#define XK_Cyrillic_ES                   0x06f3  /* U+0421 CYRILLIC CAPITAL LETTER ES */\n#define XK_Cyrillic_TE                   0x06f4  /* U+0422 CYRILLIC CAPITAL LETTER TE */\n#define XK_Cyrillic_U                    0x06f5  /* U+0423 CYRILLIC CAPITAL LETTER U */\n#define XK_Cyrillic_ZHE                  0x06f6  /* U+0416 CYRILLIC CAPITAL LETTER ZHE */\n#define XK_Cyrillic_VE                   0x06f7  /* U+0412 CYRILLIC CAPITAL LETTER VE */\n#define XK_Cyrillic_SOFTSIGN             0x06f8  /* U+042C CYRILLIC CAPITAL LETTER SOFT SIGN */\n#define XK_Cyrillic_YERU                 0x06f9  /* U+042B CYRILLIC CAPITAL LETTER YERU */\n#define XK_Cyrillic_ZE                   0x06fa  /* U+0417 CYRILLIC CAPITAL LETTER ZE */\n#define XK_Cyrillic_SHA                  0x06fb  /* U+0428 CYRILLIC CAPITAL LETTER SHA */\n#define XK_Cyrillic_E                    0x06fc  /* U+042D CYRILLIC CAPITAL LETTER E */\n#define XK_Cyrillic_SHCHA                0x06fd  /* U+0429 CYRILLIC CAPITAL LETTER SHCHA */\n#define XK_Cyrillic_CHE                  0x06fe  /* U+0427 CYRILLIC CAPITAL LETTER CHE */\n#define XK_Cyrillic_HARDSIGN             0x06ff  /* U+042A CYRILLIC CAPITAL LETTER HARD SIGN */\n#endif /* XK_CYRILLIC */\n\n/*\n * Greek\n * (based on an early draft of, and not quite identical to, ISO/IEC 8859-7)\n * Byte 3 = 7\n */\n\n#ifdef XK_GREEK\n#define XK_Greek_ALPHAaccent             0x07a1  /* U+0386 GREEK CAPITAL LETTER ALPHA WITH TONOS */\n#define XK_Greek_EPSILONaccent           0x07a2  /* U+0388 GREEK CAPITAL LETTER EPSILON WITH TONOS */\n#define XK_Greek_ETAaccent               0x07a3  /* U+0389 GREEK CAPITAL LETTER ETA WITH TONOS */\n#define XK_Greek_IOTAaccent              0x07a4  /* U+038A GREEK CAPITAL LETTER IOTA WITH TONOS */\n#define XK_Greek_IOTAdieresis            0x07a5  /* U+03AA GREEK CAPITAL LETTER IOTA WITH DIALYTIKA */\n#define XK_Greek_IOTAdiaeresis           0x07a5  /* old typo */\n#define XK_Greek_OMICRONaccent           0x07a7  /* U+038C GREEK CAPITAL LETTER OMICRON WITH TONOS */\n#define XK_Greek_UPSILONaccent           0x07a8  /* U+038E GREEK CAPITAL LETTER UPSILON WITH TONOS */\n#define XK_Greek_UPSILONdieresis         0x07a9  /* U+03AB GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA */\n#define XK_Greek_OMEGAaccent             0x07ab  /* U+038F GREEK CAPITAL LETTER OMEGA WITH TONOS */\n#define XK_Greek_accentdieresis          0x07ae  /* U+0385 GREEK DIALYTIKA TONOS */\n#define XK_Greek_horizbar                0x07af  /* U+2015 HORIZONTAL BAR */\n#define XK_Greek_alphaaccent             0x07b1  /* U+03AC GREEK SMALL LETTER ALPHA WITH TONOS */\n#define XK_Greek_epsilonaccent           0x07b2  /* U+03AD GREEK SMALL LETTER EPSILON WITH TONOS */\n#define XK_Greek_etaaccent               0x07b3  /* U+03AE GREEK SMALL LETTER ETA WITH TONOS */\n#define XK_Greek_iotaaccent              0x07b4  /* U+03AF GREEK SMALL LETTER IOTA WITH TONOS */\n#define XK_Greek_iotadieresis            0x07b5  /* U+03CA GREEK SMALL LETTER IOTA WITH DIALYTIKA */\n#define XK_Greek_iotaaccentdieresis      0x07b6  /* U+0390 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */\n#define XK_Greek_omicronaccent           0x07b7  /* U+03CC GREEK SMALL LETTER OMICRON WITH TONOS */\n#define XK_Greek_upsilonaccent           0x07b8  /* U+03CD GREEK SMALL LETTER UPSILON WITH TONOS */\n#define XK_Greek_upsilondieresis         0x07b9  /* U+03CB GREEK SMALL LETTER UPSILON WITH DIALYTIKA */\n#define XK_Greek_upsilonaccentdieresis   0x07ba  /* U+03B0 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */\n#define XK_Greek_omegaaccent             0x07bb  /* U+03CE GREEK SMALL LETTER OMEGA WITH TONOS */\n#define XK_Greek_ALPHA                   0x07c1  /* U+0391 GREEK CAPITAL LETTER ALPHA */\n#define XK_Greek_BETA                    0x07c2  /* U+0392 GREEK CAPITAL LETTER BETA */\n#define XK_Greek_GAMMA                   0x07c3  /* U+0393 GREEK CAPITAL LETTER GAMMA */\n#define XK_Greek_DELTA                   0x07c4  /* U+0394 GREEK CAPITAL LETTER DELTA */\n#define XK_Greek_EPSILON                 0x07c5  /* U+0395 GREEK CAPITAL LETTER EPSILON */\n#define XK_Greek_ZETA                    0x07c6  /* U+0396 GREEK CAPITAL LETTER ZETA */\n#define XK_Greek_ETA                     0x07c7  /* U+0397 GREEK CAPITAL LETTER ETA */\n#define XK_Greek_THETA                   0x07c8  /* U+0398 GREEK CAPITAL LETTER THETA */\n#define XK_Greek_IOTA                    0x07c9  /* U+0399 GREEK CAPITAL LETTER IOTA */\n#define XK_Greek_KAPPA                   0x07ca  /* U+039A GREEK CAPITAL LETTER KAPPA */\n#define XK_Greek_LAMDA                   0x07cb  /* U+039B GREEK CAPITAL LETTER LAMDA */\n#define XK_Greek_LAMBDA                  0x07cb  /* U+039B GREEK CAPITAL LETTER LAMDA */\n#define XK_Greek_MU                      0x07cc  /* U+039C GREEK CAPITAL LETTER MU */\n#define XK_Greek_NU                      0x07cd  /* U+039D GREEK CAPITAL LETTER NU */\n#define XK_Greek_XI                      0x07ce  /* U+039E GREEK CAPITAL LETTER XI */\n#define XK_Greek_OMICRON                 0x07cf  /* U+039F GREEK CAPITAL LETTER OMICRON */\n#define XK_Greek_PI                      0x07d0  /* U+03A0 GREEK CAPITAL LETTER PI */\n#define XK_Greek_RHO                     0x07d1  /* U+03A1 GREEK CAPITAL LETTER RHO */\n#define XK_Greek_SIGMA                   0x07d2  /* U+03A3 GREEK CAPITAL LETTER SIGMA */\n#define XK_Greek_TAU                     0x07d4  /* U+03A4 GREEK CAPITAL LETTER TAU */\n#define XK_Greek_UPSILON                 0x07d5  /* U+03A5 GREEK CAPITAL LETTER UPSILON */\n#define XK_Greek_PHI                     0x07d6  /* U+03A6 GREEK CAPITAL LETTER PHI */\n#define XK_Greek_CHI                     0x07d7  /* U+03A7 GREEK CAPITAL LETTER CHI */\n#define XK_Greek_PSI                     0x07d8  /* U+03A8 GREEK CAPITAL LETTER PSI */\n#define XK_Greek_OMEGA                   0x07d9  /* U+03A9 GREEK CAPITAL LETTER OMEGA */\n#define XK_Greek_alpha                   0x07e1  /* U+03B1 GREEK SMALL LETTER ALPHA */\n#define XK_Greek_beta                    0x07e2  /* U+03B2 GREEK SMALL LETTER BETA */\n#define XK_Greek_gamma                   0x07e3  /* U+03B3 GREEK SMALL LETTER GAMMA */\n#define XK_Greek_delta                   0x07e4  /* U+03B4 GREEK SMALL LETTER DELTA */\n#define XK_Greek_epsilon                 0x07e5  /* U+03B5 GREEK SMALL LETTER EPSILON */\n#define XK_Greek_zeta                    0x07e6  /* U+03B6 GREEK SMALL LETTER ZETA */\n#define XK_Greek_eta                     0x07e7  /* U+03B7 GREEK SMALL LETTER ETA */\n#define XK_Greek_theta                   0x07e8  /* U+03B8 GREEK SMALL LETTER THETA */\n#define XK_Greek_iota                    0x07e9  /* U+03B9 GREEK SMALL LETTER IOTA */\n#define XK_Greek_kappa                   0x07ea  /* U+03BA GREEK SMALL LETTER KAPPA */\n#define XK_Greek_lamda                   0x07eb  /* U+03BB GREEK SMALL LETTER LAMDA */\n#define XK_Greek_lambda                  0x07eb  /* U+03BB GREEK SMALL LETTER LAMDA */\n#define XK_Greek_mu                      0x07ec  /* U+03BC GREEK SMALL LETTER MU */\n#define XK_Greek_nu                      0x07ed  /* U+03BD GREEK SMALL LETTER NU */\n#define XK_Greek_xi                      0x07ee  /* U+03BE GREEK SMALL LETTER XI */\n#define XK_Greek_omicron                 0x07ef  /* U+03BF GREEK SMALL LETTER OMICRON */\n#define XK_Greek_pi                      0x07f0  /* U+03C0 GREEK SMALL LETTER PI */\n#define XK_Greek_rho                     0x07f1  /* U+03C1 GREEK SMALL LETTER RHO */\n#define XK_Greek_sigma                   0x07f2  /* U+03C3 GREEK SMALL LETTER SIGMA */\n#define XK_Greek_finalsmallsigma         0x07f3  /* U+03C2 GREEK SMALL LETTER FINAL SIGMA */\n#define XK_Greek_tau                     0x07f4  /* U+03C4 GREEK SMALL LETTER TAU */\n#define XK_Greek_upsilon                 0x07f5  /* U+03C5 GREEK SMALL LETTER UPSILON */\n#define XK_Greek_phi                     0x07f6  /* U+03C6 GREEK SMALL LETTER PHI */\n#define XK_Greek_chi                     0x07f7  /* U+03C7 GREEK SMALL LETTER CHI */\n#define XK_Greek_psi                     0x07f8  /* U+03C8 GREEK SMALL LETTER PSI */\n#define XK_Greek_omega                   0x07f9  /* U+03C9 GREEK SMALL LETTER OMEGA */\n#define XK_Greek_switch                  0xff7e  /* Alias for mode_switch */\n#endif /* XK_GREEK */\n\n/*\n * Technical\n * (from the DEC VT330/VT420 Technical Character Set, http://vt100.net/charsets/technical.html)\n * Byte 3 = 8\n */\n\n#ifdef XK_TECHNICAL\n#define XK_leftradical                   0x08a1  /* U+23B7 RADICAL SYMBOL BOTTOM */\n#define XK_topleftradical                0x08a2  /*(U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT)*/\n#define XK_horizconnector                0x08a3  /*(U+2500 BOX DRAWINGS LIGHT HORIZONTAL)*/\n#define XK_topintegral                   0x08a4  /* U+2320 TOP HALF INTEGRAL */\n#define XK_botintegral                   0x08a5  /* U+2321 BOTTOM HALF INTEGRAL */\n#define XK_vertconnector                 0x08a6  /*(U+2502 BOX DRAWINGS LIGHT VERTICAL)*/\n#define XK_topleftsqbracket              0x08a7  /* U+23A1 LEFT SQUARE BRACKET UPPER CORNER */\n#define XK_botleftsqbracket              0x08a8  /* U+23A3 LEFT SQUARE BRACKET LOWER CORNER */\n#define XK_toprightsqbracket             0x08a9  /* U+23A4 RIGHT SQUARE BRACKET UPPER CORNER */\n#define XK_botrightsqbracket             0x08aa  /* U+23A6 RIGHT SQUARE BRACKET LOWER CORNER */\n#define XK_topleftparens                 0x08ab  /* U+239B LEFT PARENTHESIS UPPER HOOK */\n#define XK_botleftparens                 0x08ac  /* U+239D LEFT PARENTHESIS LOWER HOOK */\n#define XK_toprightparens                0x08ad  /* U+239E RIGHT PARENTHESIS UPPER HOOK */\n#define XK_botrightparens                0x08ae  /* U+23A0 RIGHT PARENTHESIS LOWER HOOK */\n#define XK_leftmiddlecurlybrace          0x08af  /* U+23A8 LEFT CURLY BRACKET MIDDLE PIECE */\n#define XK_rightmiddlecurlybrace         0x08b0  /* U+23AC RIGHT CURLY BRACKET MIDDLE PIECE */\n#define XK_topleftsummation              0x08b1\n#define XK_botleftsummation              0x08b2\n#define XK_topvertsummationconnector     0x08b3\n#define XK_botvertsummationconnector     0x08b4\n#define XK_toprightsummation             0x08b5\n#define XK_botrightsummation             0x08b6\n#define XK_rightmiddlesummation          0x08b7\n#define XK_lessthanequal                 0x08bc  /* U+2264 LESS-THAN OR EQUAL TO */\n#define XK_notequal                      0x08bd  /* U+2260 NOT EQUAL TO */\n#define XK_greaterthanequal              0x08be  /* U+2265 GREATER-THAN OR EQUAL TO */\n#define XK_integral                      0x08bf  /* U+222B INTEGRAL */\n#define XK_therefore                     0x08c0  /* U+2234 THEREFORE */\n#define XK_variation                     0x08c1  /* U+221D PROPORTIONAL TO */\n#define XK_infinity                      0x08c2  /* U+221E INFINITY */\n#define XK_nabla                         0x08c5  /* U+2207 NABLA */\n#define XK_approximate                   0x08c8  /* U+223C TILDE OPERATOR */\n#define XK_similarequal                  0x08c9  /* U+2243 ASYMPTOTICALLY EQUAL TO */\n#define XK_ifonlyif                      0x08cd  /* U+21D4 LEFT RIGHT DOUBLE ARROW */\n#define XK_implies                       0x08ce  /* U+21D2 RIGHTWARDS DOUBLE ARROW */\n#define XK_identical                     0x08cf  /* U+2261 IDENTICAL TO */\n#define XK_radical                       0x08d6  /* U+221A SQUARE ROOT */\n#define XK_includedin                    0x08da  /* U+2282 SUBSET OF */\n#define XK_includes                      0x08db  /* U+2283 SUPERSET OF */\n#define XK_intersection                  0x08dc  /* U+2229 INTERSECTION */\n#define XK_union                         0x08dd  /* U+222A UNION */\n#define XK_logicaland                    0x08de  /* U+2227 LOGICAL AND */\n#define XK_logicalor                     0x08df  /* U+2228 LOGICAL OR */\n#define XK_partialderivative             0x08ef  /* U+2202 PARTIAL DIFFERENTIAL */\n#define XK_function                      0x08f6  /* U+0192 LATIN SMALL LETTER F WITH HOOK */\n#define XK_leftarrow                     0x08fb  /* U+2190 LEFTWARDS ARROW */\n#define XK_uparrow                       0x08fc  /* U+2191 UPWARDS ARROW */\n#define XK_rightarrow                    0x08fd  /* U+2192 RIGHTWARDS ARROW */\n#define XK_downarrow                     0x08fe  /* U+2193 DOWNWARDS ARROW */\n#endif /* XK_TECHNICAL */\n\n/*\n * Special\n * (from the DEC VT100 Special Graphics Character Set)\n * Byte 3 = 9\n */\n\n#ifdef XK_SPECIAL\n#define XK_blank                         0x09df\n#define XK_soliddiamond                  0x09e0  /* U+25C6 BLACK DIAMOND */\n#define XK_checkerboard                  0x09e1  /* U+2592 MEDIUM SHADE */\n#define XK_ht                            0x09e2  /* U+2409 SYMBOL FOR HORIZONTAL TABULATION */\n#define XK_ff                            0x09e3  /* U+240C SYMBOL FOR FORM FEED */\n#define XK_cr                            0x09e4  /* U+240D SYMBOL FOR CARRIAGE RETURN */\n#define XK_lf                            0x09e5  /* U+240A SYMBOL FOR LINE FEED */\n#define XK_nl                            0x09e8  /* U+2424 SYMBOL FOR NEWLINE */\n#define XK_vt                            0x09e9  /* U+240B SYMBOL FOR VERTICAL TABULATION */\n#define XK_lowrightcorner                0x09ea  /* U+2518 BOX DRAWINGS LIGHT UP AND LEFT */\n#define XK_uprightcorner                 0x09eb  /* U+2510 BOX DRAWINGS LIGHT DOWN AND LEFT */\n#define XK_upleftcorner                  0x09ec  /* U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT */\n#define XK_lowleftcorner                 0x09ed  /* U+2514 BOX DRAWINGS LIGHT UP AND RIGHT */\n#define XK_crossinglines                 0x09ee  /* U+253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */\n#define XK_horizlinescan1                0x09ef  /* U+23BA HORIZONTAL SCAN LINE-1 */\n#define XK_horizlinescan3                0x09f0  /* U+23BB HORIZONTAL SCAN LINE-3 */\n#define XK_horizlinescan5                0x09f1  /* U+2500 BOX DRAWINGS LIGHT HORIZONTAL */\n#define XK_horizlinescan7                0x09f2  /* U+23BC HORIZONTAL SCAN LINE-7 */\n#define XK_horizlinescan9                0x09f3  /* U+23BD HORIZONTAL SCAN LINE-9 */\n#define XK_leftt                         0x09f4  /* U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT */\n#define XK_rightt                        0x09f5  /* U+2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT */\n#define XK_bott                          0x09f6  /* U+2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL */\n#define XK_topt                          0x09f7  /* U+252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL */\n#define XK_vertbar                       0x09f8  /* U+2502 BOX DRAWINGS LIGHT VERTICAL */\n#endif /* XK_SPECIAL */\n\n/*\n * Publishing\n * (these are probably from a long forgotten DEC Publishing\n * font that once shipped with DECwrite)\n * Byte 3 = 0x0a\n */\n\n#ifdef XK_PUBLISHING\n#define XK_emspace                       0x0aa1  /* U+2003 EM SPACE */\n#define XK_enspace                       0x0aa2  /* U+2002 EN SPACE */\n#define XK_em3space                      0x0aa3  /* U+2004 THREE-PER-EM SPACE */\n#define XK_em4space                      0x0aa4  /* U+2005 FOUR-PER-EM SPACE */\n#define XK_digitspace                    0x0aa5  /* U+2007 FIGURE SPACE */\n#define XK_punctspace                    0x0aa6  /* U+2008 PUNCTUATION SPACE */\n#define XK_thinspace                     0x0aa7  /* U+2009 THIN SPACE */\n#define XK_hairspace                     0x0aa8  /* U+200A HAIR SPACE */\n#define XK_emdash                        0x0aa9  /* U+2014 EM DASH */\n#define XK_endash                        0x0aaa  /* U+2013 EN DASH */\n#define XK_signifblank                   0x0aac  /*(U+2423 OPEN BOX)*/\n#define XK_ellipsis                      0x0aae  /* U+2026 HORIZONTAL ELLIPSIS */\n#define XK_doubbaselinedot               0x0aaf  /* U+2025 TWO DOT LEADER */\n#define XK_onethird                      0x0ab0  /* U+2153 VULGAR FRACTION ONE THIRD */\n#define XK_twothirds                     0x0ab1  /* U+2154 VULGAR FRACTION TWO THIRDS */\n#define XK_onefifth                      0x0ab2  /* U+2155 VULGAR FRACTION ONE FIFTH */\n#define XK_twofifths                     0x0ab3  /* U+2156 VULGAR FRACTION TWO FIFTHS */\n#define XK_threefifths                   0x0ab4  /* U+2157 VULGAR FRACTION THREE FIFTHS */\n#define XK_fourfifths                    0x0ab5  /* U+2158 VULGAR FRACTION FOUR FIFTHS */\n#define XK_onesixth                      0x0ab6  /* U+2159 VULGAR FRACTION ONE SIXTH */\n#define XK_fivesixths                    0x0ab7  /* U+215A VULGAR FRACTION FIVE SIXTHS */\n#define XK_careof                        0x0ab8  /* U+2105 CARE OF */\n#define XK_figdash                       0x0abb  /* U+2012 FIGURE DASH */\n#define XK_leftanglebracket              0x0abc  /*(U+27E8 MATHEMATICAL LEFT ANGLE BRACKET)*/\n#define XK_decimalpoint                  0x0abd  /*(U+002E FULL STOP)*/\n#define XK_rightanglebracket             0x0abe  /*(U+27E9 MATHEMATICAL RIGHT ANGLE BRACKET)*/\n#define XK_marker                        0x0abf\n#define XK_oneeighth                     0x0ac3  /* U+215B VULGAR FRACTION ONE EIGHTH */\n#define XK_threeeighths                  0x0ac4  /* U+215C VULGAR FRACTION THREE EIGHTHS */\n#define XK_fiveeighths                   0x0ac5  /* U+215D VULGAR FRACTION FIVE EIGHTHS */\n#define XK_seveneighths                  0x0ac6  /* U+215E VULGAR FRACTION SEVEN EIGHTHS */\n#define XK_trademark                     0x0ac9  /* U+2122 TRADE MARK SIGN */\n#define XK_signaturemark                 0x0aca  /*(U+2613 SALTIRE)*/\n#define XK_trademarkincircle             0x0acb\n#define XK_leftopentriangle              0x0acc  /*(U+25C1 WHITE LEFT-POINTING TRIANGLE)*/\n#define XK_rightopentriangle             0x0acd  /*(U+25B7 WHITE RIGHT-POINTING TRIANGLE)*/\n#define XK_emopencircle                  0x0ace  /*(U+25CB WHITE CIRCLE)*/\n#define XK_emopenrectangle               0x0acf  /*(U+25AF WHITE VERTICAL RECTANGLE)*/\n#define XK_leftsinglequotemark           0x0ad0  /* U+2018 LEFT SINGLE QUOTATION MARK */\n#define XK_rightsinglequotemark          0x0ad1  /* U+2019 RIGHT SINGLE QUOTATION MARK */\n#define XK_leftdoublequotemark           0x0ad2  /* U+201C LEFT DOUBLE QUOTATION MARK */\n#define XK_rightdoublequotemark          0x0ad3  /* U+201D RIGHT DOUBLE QUOTATION MARK */\n#define XK_prescription                  0x0ad4  /* U+211E PRESCRIPTION TAKE */\n#define XK_minutes                       0x0ad6  /* U+2032 PRIME */\n#define XK_seconds                       0x0ad7  /* U+2033 DOUBLE PRIME */\n#define XK_latincross                    0x0ad9  /* U+271D LATIN CROSS */\n#define XK_hexagram                      0x0ada\n#define XK_filledrectbullet              0x0adb  /*(U+25AC BLACK RECTANGLE)*/\n#define XK_filledlefttribullet           0x0adc  /*(U+25C0 BLACK LEFT-POINTING TRIANGLE)*/\n#define XK_filledrighttribullet          0x0add  /*(U+25B6 BLACK RIGHT-POINTING TRIANGLE)*/\n#define XK_emfilledcircle                0x0ade  /*(U+25CF BLACK CIRCLE)*/\n#define XK_emfilledrect                  0x0adf  /*(U+25AE BLACK VERTICAL RECTANGLE)*/\n#define XK_enopencircbullet              0x0ae0  /*(U+25E6 WHITE BULLET)*/\n#define XK_enopensquarebullet            0x0ae1  /*(U+25AB WHITE SMALL SQUARE)*/\n#define XK_openrectbullet                0x0ae2  /*(U+25AD WHITE RECTANGLE)*/\n#define XK_opentribulletup               0x0ae3  /*(U+25B3 WHITE UP-POINTING TRIANGLE)*/\n#define XK_opentribulletdown             0x0ae4  /*(U+25BD WHITE DOWN-POINTING TRIANGLE)*/\n#define XK_openstar                      0x0ae5  /*(U+2606 WHITE STAR)*/\n#define XK_enfilledcircbullet            0x0ae6  /*(U+2022 BULLET)*/\n#define XK_enfilledsqbullet              0x0ae7  /*(U+25AA BLACK SMALL SQUARE)*/\n#define XK_filledtribulletup             0x0ae8  /*(U+25B2 BLACK UP-POINTING TRIANGLE)*/\n#define XK_filledtribulletdown           0x0ae9  /*(U+25BC BLACK DOWN-POINTING TRIANGLE)*/\n#define XK_leftpointer                   0x0aea  /*(U+261C WHITE LEFT POINTING INDEX)*/\n#define XK_rightpointer                  0x0aeb  /*(U+261E WHITE RIGHT POINTING INDEX)*/\n#define XK_club                          0x0aec  /* U+2663 BLACK CLUB SUIT */\n#define XK_diamond                       0x0aed  /* U+2666 BLACK DIAMOND SUIT */\n#define XK_heart                         0x0aee  /* U+2665 BLACK HEART SUIT */\n#define XK_maltesecross                  0x0af0  /* U+2720 MALTESE CROSS */\n#define XK_dagger                        0x0af1  /* U+2020 DAGGER */\n#define XK_doubledagger                  0x0af2  /* U+2021 DOUBLE DAGGER */\n#define XK_checkmark                     0x0af3  /* U+2713 CHECK MARK */\n#define XK_ballotcross                   0x0af4  /* U+2717 BALLOT X */\n#define XK_musicalsharp                  0x0af5  /* U+266F MUSIC SHARP SIGN */\n#define XK_musicalflat                   0x0af6  /* U+266D MUSIC FLAT SIGN */\n#define XK_malesymbol                    0x0af7  /* U+2642 MALE SIGN */\n#define XK_femalesymbol                  0x0af8  /* U+2640 FEMALE SIGN */\n#define XK_telephone                     0x0af9  /* U+260E BLACK TELEPHONE */\n#define XK_telephonerecorder             0x0afa  /* U+2315 TELEPHONE RECORDER */\n#define XK_phonographcopyright           0x0afb  /* U+2117 SOUND RECORDING COPYRIGHT */\n#define XK_caret                         0x0afc  /* U+2038 CARET */\n#define XK_singlelowquotemark            0x0afd  /* U+201A SINGLE LOW-9 QUOTATION MARK */\n#define XK_doublelowquotemark            0x0afe  /* U+201E DOUBLE LOW-9 QUOTATION MARK */\n#define XK_cursor                        0x0aff\n#endif /* XK_PUBLISHING */\n\n/*\n * APL\n * Byte 3 = 0x0b\n */\n\n#ifdef XK_APL\n#define XK_leftcaret                     0x0ba3  /*(U+003C LESS-THAN SIGN)*/\n#define XK_rightcaret                    0x0ba6  /*(U+003E GREATER-THAN SIGN)*/\n#define XK_downcaret                     0x0ba8  /*(U+2228 LOGICAL OR)*/\n#define XK_upcaret                       0x0ba9  /*(U+2227 LOGICAL AND)*/\n#define XK_overbar                       0x0bc0  /*(U+00AF MACRON)*/\n#define XK_downtack                      0x0bc2  /* U+22A4 DOWN TACK */\n#define XK_upshoe                        0x0bc3  /*(U+2229 INTERSECTION)*/\n#define XK_downstile                     0x0bc4  /* U+230A LEFT FLOOR */\n#define XK_underbar                      0x0bc6  /*(U+005F LOW LINE)*/\n#define XK_jot                           0x0bca  /* U+2218 RING OPERATOR */\n#define XK_quad                          0x0bcc  /* U+2395 APL FUNCTIONAL SYMBOL QUAD */\n#define XK_uptack                        0x0bce  /* U+22A5 UP TACK */\n#define XK_circle                        0x0bcf  /* U+25CB WHITE CIRCLE */\n#define XK_upstile                       0x0bd3  /* U+2308 LEFT CEILING */\n#define XK_downshoe                      0x0bd6  /*(U+222A UNION)*/\n#define XK_rightshoe                     0x0bd8  /*(U+2283 SUPERSET OF)*/\n#define XK_leftshoe                      0x0bda  /*(U+2282 SUBSET OF)*/\n#define XK_lefttack                      0x0bdc  /* U+22A3 LEFT TACK */\n#define XK_righttack                     0x0bfc  /* U+22A2 RIGHT TACK */\n#endif /* XK_APL */\n\n/*\n * Hebrew\n * Byte 3 = 0x0c\n */\n\n#ifdef XK_HEBREW\n#define XK_hebrew_doublelowline          0x0cdf  /* U+2017 DOUBLE LOW LINE */\n#define XK_hebrew_aleph                  0x0ce0  /* U+05D0 HEBREW LETTER ALEF */\n#define XK_hebrew_bet                    0x0ce1  /* U+05D1 HEBREW LETTER BET */\n#define XK_hebrew_beth                   0x0ce1  /* deprecated */\n#define XK_hebrew_gimel                  0x0ce2  /* U+05D2 HEBREW LETTER GIMEL */\n#define XK_hebrew_gimmel                 0x0ce2  /* deprecated */\n#define XK_hebrew_dalet                  0x0ce3  /* U+05D3 HEBREW LETTER DALET */\n#define XK_hebrew_daleth                 0x0ce3  /* deprecated */\n#define XK_hebrew_he                     0x0ce4  /* U+05D4 HEBREW LETTER HE */\n#define XK_hebrew_waw                    0x0ce5  /* U+05D5 HEBREW LETTER VAV */\n#define XK_hebrew_zain                   0x0ce6  /* U+05D6 HEBREW LETTER ZAYIN */\n#define XK_hebrew_zayin                  0x0ce6  /* deprecated */\n#define XK_hebrew_chet                   0x0ce7  /* U+05D7 HEBREW LETTER HET */\n#define XK_hebrew_het                    0x0ce7  /* deprecated */\n#define XK_hebrew_tet                    0x0ce8  /* U+05D8 HEBREW LETTER TET */\n#define XK_hebrew_teth                   0x0ce8  /* deprecated */\n#define XK_hebrew_yod                    0x0ce9  /* U+05D9 HEBREW LETTER YOD */\n#define XK_hebrew_finalkaph              0x0cea  /* U+05DA HEBREW LETTER FINAL KAF */\n#define XK_hebrew_kaph                   0x0ceb  /* U+05DB HEBREW LETTER KAF */\n#define XK_hebrew_lamed                  0x0cec  /* U+05DC HEBREW LETTER LAMED */\n#define XK_hebrew_finalmem               0x0ced  /* U+05DD HEBREW LETTER FINAL MEM */\n#define XK_hebrew_mem                    0x0cee  /* U+05DE HEBREW LETTER MEM */\n#define XK_hebrew_finalnun               0x0cef  /* U+05DF HEBREW LETTER FINAL NUN */\n#define XK_hebrew_nun                    0x0cf0  /* U+05E0 HEBREW LETTER NUN */\n#define XK_hebrew_samech                 0x0cf1  /* U+05E1 HEBREW LETTER SAMEKH */\n#define XK_hebrew_samekh                 0x0cf1  /* deprecated */\n#define XK_hebrew_ayin                   0x0cf2  /* U+05E2 HEBREW LETTER AYIN */\n#define XK_hebrew_finalpe                0x0cf3  /* U+05E3 HEBREW LETTER FINAL PE */\n#define XK_hebrew_pe                     0x0cf4  /* U+05E4 HEBREW LETTER PE */\n#define XK_hebrew_finalzade              0x0cf5  /* U+05E5 HEBREW LETTER FINAL TSADI */\n#define XK_hebrew_finalzadi              0x0cf5  /* deprecated */\n#define XK_hebrew_zade                   0x0cf6  /* U+05E6 HEBREW LETTER TSADI */\n#define XK_hebrew_zadi                   0x0cf6  /* deprecated */\n#define XK_hebrew_qoph                   0x0cf7  /* U+05E7 HEBREW LETTER QOF */\n#define XK_hebrew_kuf                    0x0cf7  /* deprecated */\n#define XK_hebrew_resh                   0x0cf8  /* U+05E8 HEBREW LETTER RESH */\n#define XK_hebrew_shin                   0x0cf9  /* U+05E9 HEBREW LETTER SHIN */\n#define XK_hebrew_taw                    0x0cfa  /* U+05EA HEBREW LETTER TAV */\n#define XK_hebrew_taf                    0x0cfa  /* deprecated */\n#define XK_Hebrew_switch                 0xff7e  /* Alias for mode_switch */\n#endif /* XK_HEBREW */\n\n/*\n * Thai\n * Byte 3 = 0x0d\n */\n\n#ifdef XK_THAI\n#define XK_Thai_kokai                    0x0da1  /* U+0E01 THAI CHARACTER KO KAI */\n#define XK_Thai_khokhai                  0x0da2  /* U+0E02 THAI CHARACTER KHO KHAI */\n#define XK_Thai_khokhuat                 0x0da3  /* U+0E03 THAI CHARACTER KHO KHUAT */\n#define XK_Thai_khokhwai                 0x0da4  /* U+0E04 THAI CHARACTER KHO KHWAI */\n#define XK_Thai_khokhon                  0x0da5  /* U+0E05 THAI CHARACTER KHO KHON */\n#define XK_Thai_khorakhang               0x0da6  /* U+0E06 THAI CHARACTER KHO RAKHANG */\n#define XK_Thai_ngongu                   0x0da7  /* U+0E07 THAI CHARACTER NGO NGU */\n#define XK_Thai_chochan                  0x0da8  /* U+0E08 THAI CHARACTER CHO CHAN */\n#define XK_Thai_choching                 0x0da9  /* U+0E09 THAI CHARACTER CHO CHING */\n#define XK_Thai_chochang                 0x0daa  /* U+0E0A THAI CHARACTER CHO CHANG */\n#define XK_Thai_soso                     0x0dab  /* U+0E0B THAI CHARACTER SO SO */\n#define XK_Thai_chochoe                  0x0dac  /* U+0E0C THAI CHARACTER CHO CHOE */\n#define XK_Thai_yoying                   0x0dad  /* U+0E0D THAI CHARACTER YO YING */\n#define XK_Thai_dochada                  0x0dae  /* U+0E0E THAI CHARACTER DO CHADA */\n#define XK_Thai_topatak                  0x0daf  /* U+0E0F THAI CHARACTER TO PATAK */\n#define XK_Thai_thothan                  0x0db0  /* U+0E10 THAI CHARACTER THO THAN */\n#define XK_Thai_thonangmontho            0x0db1  /* U+0E11 THAI CHARACTER THO NANGMONTHO */\n#define XK_Thai_thophuthao               0x0db2  /* U+0E12 THAI CHARACTER THO PHUTHAO */\n#define XK_Thai_nonen                    0x0db3  /* U+0E13 THAI CHARACTER NO NEN */\n#define XK_Thai_dodek                    0x0db4  /* U+0E14 THAI CHARACTER DO DEK */\n#define XK_Thai_totao                    0x0db5  /* U+0E15 THAI CHARACTER TO TAO */\n#define XK_Thai_thothung                 0x0db6  /* U+0E16 THAI CHARACTER THO THUNG */\n#define XK_Thai_thothahan                0x0db7  /* U+0E17 THAI CHARACTER THO THAHAN */\n#define XK_Thai_thothong                 0x0db8  /* U+0E18 THAI CHARACTER THO THONG */\n#define XK_Thai_nonu                     0x0db9  /* U+0E19 THAI CHARACTER NO NU */\n#define XK_Thai_bobaimai                 0x0dba  /* U+0E1A THAI CHARACTER BO BAIMAI */\n#define XK_Thai_popla                    0x0dbb  /* U+0E1B THAI CHARACTER PO PLA */\n#define XK_Thai_phophung                 0x0dbc  /* U+0E1C THAI CHARACTER PHO PHUNG */\n#define XK_Thai_fofa                     0x0dbd  /* U+0E1D THAI CHARACTER FO FA */\n#define XK_Thai_phophan                  0x0dbe  /* U+0E1E THAI CHARACTER PHO PHAN */\n#define XK_Thai_fofan                    0x0dbf  /* U+0E1F THAI CHARACTER FO FAN */\n#define XK_Thai_phosamphao               0x0dc0  /* U+0E20 THAI CHARACTER PHO SAMPHAO */\n#define XK_Thai_moma                     0x0dc1  /* U+0E21 THAI CHARACTER MO MA */\n#define XK_Thai_yoyak                    0x0dc2  /* U+0E22 THAI CHARACTER YO YAK */\n#define XK_Thai_rorua                    0x0dc3  /* U+0E23 THAI CHARACTER RO RUA */\n#define XK_Thai_ru                       0x0dc4  /* U+0E24 THAI CHARACTER RU */\n#define XK_Thai_loling                   0x0dc5  /* U+0E25 THAI CHARACTER LO LING */\n#define XK_Thai_lu                       0x0dc6  /* U+0E26 THAI CHARACTER LU */\n#define XK_Thai_wowaen                   0x0dc7  /* U+0E27 THAI CHARACTER WO WAEN */\n#define XK_Thai_sosala                   0x0dc8  /* U+0E28 THAI CHARACTER SO SALA */\n#define XK_Thai_sorusi                   0x0dc9  /* U+0E29 THAI CHARACTER SO RUSI */\n#define XK_Thai_sosua                    0x0dca  /* U+0E2A THAI CHARACTER SO SUA */\n#define XK_Thai_hohip                    0x0dcb  /* U+0E2B THAI CHARACTER HO HIP */\n#define XK_Thai_lochula                  0x0dcc  /* U+0E2C THAI CHARACTER LO CHULA */\n#define XK_Thai_oang                     0x0dcd  /* U+0E2D THAI CHARACTER O ANG */\n#define XK_Thai_honokhuk                 0x0dce  /* U+0E2E THAI CHARACTER HO NOKHUK */\n#define XK_Thai_paiyannoi                0x0dcf  /* U+0E2F THAI CHARACTER PAIYANNOI */\n#define XK_Thai_saraa                    0x0dd0  /* U+0E30 THAI CHARACTER SARA A */\n#define XK_Thai_maihanakat               0x0dd1  /* U+0E31 THAI CHARACTER MAI HAN-AKAT */\n#define XK_Thai_saraaa                   0x0dd2  /* U+0E32 THAI CHARACTER SARA AA */\n#define XK_Thai_saraam                   0x0dd3  /* U+0E33 THAI CHARACTER SARA AM */\n#define XK_Thai_sarai                    0x0dd4  /* U+0E34 THAI CHARACTER SARA I */\n#define XK_Thai_saraii                   0x0dd5  /* U+0E35 THAI CHARACTER SARA II */\n#define XK_Thai_saraue                   0x0dd6  /* U+0E36 THAI CHARACTER SARA UE */\n#define XK_Thai_sarauee                  0x0dd7  /* U+0E37 THAI CHARACTER SARA UEE */\n#define XK_Thai_sarau                    0x0dd8  /* U+0E38 THAI CHARACTER SARA U */\n#define XK_Thai_sarauu                   0x0dd9  /* U+0E39 THAI CHARACTER SARA UU */\n#define XK_Thai_phinthu                  0x0dda  /* U+0E3A THAI CHARACTER PHINTHU */\n#define XK_Thai_maihanakat_maitho        0x0dde\n#define XK_Thai_baht                     0x0ddf  /* U+0E3F THAI CURRENCY SYMBOL BAHT */\n#define XK_Thai_sarae                    0x0de0  /* U+0E40 THAI CHARACTER SARA E */\n#define XK_Thai_saraae                   0x0de1  /* U+0E41 THAI CHARACTER SARA AE */\n#define XK_Thai_sarao                    0x0de2  /* U+0E42 THAI CHARACTER SARA O */\n#define XK_Thai_saraaimaimuan            0x0de3  /* U+0E43 THAI CHARACTER SARA AI MAIMUAN */\n#define XK_Thai_saraaimaimalai           0x0de4  /* U+0E44 THAI CHARACTER SARA AI MAIMALAI */\n#define XK_Thai_lakkhangyao              0x0de5  /* U+0E45 THAI CHARACTER LAKKHANGYAO */\n#define XK_Thai_maiyamok                 0x0de6  /* U+0E46 THAI CHARACTER MAIYAMOK */\n#define XK_Thai_maitaikhu                0x0de7  /* U+0E47 THAI CHARACTER MAITAIKHU */\n#define XK_Thai_maiek                    0x0de8  /* U+0E48 THAI CHARACTER MAI EK */\n#define XK_Thai_maitho                   0x0de9  /* U+0E49 THAI CHARACTER MAI THO */\n#define XK_Thai_maitri                   0x0dea  /* U+0E4A THAI CHARACTER MAI TRI */\n#define XK_Thai_maichattawa              0x0deb  /* U+0E4B THAI CHARACTER MAI CHATTAWA */\n#define XK_Thai_thanthakhat              0x0dec  /* U+0E4C THAI CHARACTER THANTHAKHAT */\n#define XK_Thai_nikhahit                 0x0ded  /* U+0E4D THAI CHARACTER NIKHAHIT */\n#define XK_Thai_leksun                   0x0df0  /* U+0E50 THAI DIGIT ZERO */\n#define XK_Thai_leknung                  0x0df1  /* U+0E51 THAI DIGIT ONE */\n#define XK_Thai_leksong                  0x0df2  /* U+0E52 THAI DIGIT TWO */\n#define XK_Thai_leksam                   0x0df3  /* U+0E53 THAI DIGIT THREE */\n#define XK_Thai_leksi                    0x0df4  /* U+0E54 THAI DIGIT FOUR */\n#define XK_Thai_lekha                    0x0df5  /* U+0E55 THAI DIGIT FIVE */\n#define XK_Thai_lekhok                   0x0df6  /* U+0E56 THAI DIGIT SIX */\n#define XK_Thai_lekchet                  0x0df7  /* U+0E57 THAI DIGIT SEVEN */\n#define XK_Thai_lekpaet                  0x0df8  /* U+0E58 THAI DIGIT EIGHT */\n#define XK_Thai_lekkao                   0x0df9  /* U+0E59 THAI DIGIT NINE */\n#endif /* XK_THAI */\n\n/*\n * Korean\n * Byte 3 = 0x0e\n */\n\n#ifdef XK_KOREAN\n\n#define XK_Hangul                        0xff31  /* Hangul start/stop(toggle) */\n#define XK_Hangul_Start                  0xff32  /* Hangul start */\n#define XK_Hangul_End                    0xff33  /* Hangul end, English start */\n#define XK_Hangul_Hanja                  0xff34  /* Start Hangul->Hanja Conversion */\n#define XK_Hangul_Jamo                   0xff35  /* Hangul Jamo mode */\n#define XK_Hangul_Romaja                 0xff36  /* Hangul Romaja mode */\n#define XK_Hangul_Codeinput              0xff37  /* Hangul code input mode */\n#define XK_Hangul_Jeonja                 0xff38  /* Jeonja mode */\n#define XK_Hangul_Banja                  0xff39  /* Banja mode */\n#define XK_Hangul_PreHanja               0xff3a  /* Pre Hanja conversion */\n#define XK_Hangul_PostHanja              0xff3b  /* Post Hanja conversion */\n#define XK_Hangul_SingleCandidate        0xff3c  /* Single candidate */\n#define XK_Hangul_MultipleCandidate      0xff3d  /* Multiple candidate */\n#define XK_Hangul_PreviousCandidate      0xff3e  /* Previous candidate */\n#define XK_Hangul_Special                0xff3f  /* Special symbols */\n#define XK_Hangul_switch                 0xff7e  /* Alias for mode_switch */\n\n/* Hangul Consonant Characters */\n#define XK_Hangul_Kiyeog                 0x0ea1\n#define XK_Hangul_SsangKiyeog            0x0ea2\n#define XK_Hangul_KiyeogSios             0x0ea3\n#define XK_Hangul_Nieun                  0x0ea4\n#define XK_Hangul_NieunJieuj             0x0ea5\n#define XK_Hangul_NieunHieuh             0x0ea6\n#define XK_Hangul_Dikeud                 0x0ea7\n#define XK_Hangul_SsangDikeud            0x0ea8\n#define XK_Hangul_Rieul                  0x0ea9\n#define XK_Hangul_RieulKiyeog            0x0eaa\n#define XK_Hangul_RieulMieum             0x0eab\n#define XK_Hangul_RieulPieub             0x0eac\n#define XK_Hangul_RieulSios              0x0ead\n#define XK_Hangul_RieulTieut             0x0eae\n#define XK_Hangul_RieulPhieuf            0x0eaf\n#define XK_Hangul_RieulHieuh             0x0eb0\n#define XK_Hangul_Mieum                  0x0eb1\n#define XK_Hangul_Pieub                  0x0eb2\n#define XK_Hangul_SsangPieub             0x0eb3\n#define XK_Hangul_PieubSios              0x0eb4\n#define XK_Hangul_Sios                   0x0eb5\n#define XK_Hangul_SsangSios              0x0eb6\n#define XK_Hangul_Ieung                  0x0eb7\n#define XK_Hangul_Jieuj                  0x0eb8\n#define XK_Hangul_SsangJieuj             0x0eb9\n#define XK_Hangul_Cieuc                  0x0eba\n#define XK_Hangul_Khieuq                 0x0ebb\n#define XK_Hangul_Tieut                  0x0ebc\n#define XK_Hangul_Phieuf                 0x0ebd\n#define XK_Hangul_Hieuh                  0x0ebe\n\n/* Hangul Vowel Characters */\n#define XK_Hangul_A                      0x0ebf\n#define XK_Hangul_AE                     0x0ec0\n#define XK_Hangul_YA                     0x0ec1\n#define XK_Hangul_YAE                    0x0ec2\n#define XK_Hangul_EO                     0x0ec3\n#define XK_Hangul_E                      0x0ec4\n#define XK_Hangul_YEO                    0x0ec5\n#define XK_Hangul_YE                     0x0ec6\n#define XK_Hangul_O                      0x0ec7\n#define XK_Hangul_WA                     0x0ec8\n#define XK_Hangul_WAE                    0x0ec9\n#define XK_Hangul_OE                     0x0eca\n#define XK_Hangul_YO                     0x0ecb\n#define XK_Hangul_U                      0x0ecc\n#define XK_Hangul_WEO                    0x0ecd\n#define XK_Hangul_WE                     0x0ece\n#define XK_Hangul_WI                     0x0ecf\n#define XK_Hangul_YU                     0x0ed0\n#define XK_Hangul_EU                     0x0ed1\n#define XK_Hangul_YI                     0x0ed2\n#define XK_Hangul_I                      0x0ed3\n\n/* Hangul syllable-final (JongSeong) Characters */\n#define XK_Hangul_J_Kiyeog               0x0ed4\n#define XK_Hangul_J_SsangKiyeog          0x0ed5\n#define XK_Hangul_J_KiyeogSios           0x0ed6\n#define XK_Hangul_J_Nieun                0x0ed7\n#define XK_Hangul_J_NieunJieuj           0x0ed8\n#define XK_Hangul_J_NieunHieuh           0x0ed9\n#define XK_Hangul_J_Dikeud               0x0eda\n#define XK_Hangul_J_Rieul                0x0edb\n#define XK_Hangul_J_RieulKiyeog          0x0edc\n#define XK_Hangul_J_RieulMieum           0x0edd\n#define XK_Hangul_J_RieulPieub           0x0ede\n#define XK_Hangul_J_RieulSios            0x0edf\n#define XK_Hangul_J_RieulTieut           0x0ee0\n#define XK_Hangul_J_RieulPhieuf          0x0ee1\n#define XK_Hangul_J_RieulHieuh           0x0ee2\n#define XK_Hangul_J_Mieum                0x0ee3\n#define XK_Hangul_J_Pieub                0x0ee4\n#define XK_Hangul_J_PieubSios            0x0ee5\n#define XK_Hangul_J_Sios                 0x0ee6\n#define XK_Hangul_J_SsangSios            0x0ee7\n#define XK_Hangul_J_Ieung                0x0ee8\n#define XK_Hangul_J_Jieuj                0x0ee9\n#define XK_Hangul_J_Cieuc                0x0eea\n#define XK_Hangul_J_Khieuq               0x0eeb\n#define XK_Hangul_J_Tieut                0x0eec\n#define XK_Hangul_J_Phieuf               0x0eed\n#define XK_Hangul_J_Hieuh                0x0eee\n\n/* Ancient Hangul Consonant Characters */\n#define XK_Hangul_RieulYeorinHieuh       0x0eef\n#define XK_Hangul_SunkyeongeumMieum      0x0ef0\n#define XK_Hangul_SunkyeongeumPieub      0x0ef1\n#define XK_Hangul_PanSios                0x0ef2\n#define XK_Hangul_KkogjiDalrinIeung      0x0ef3\n#define XK_Hangul_SunkyeongeumPhieuf     0x0ef4\n#define XK_Hangul_YeorinHieuh            0x0ef5\n\n/* Ancient Hangul Vowel Characters */\n#define XK_Hangul_AraeA                  0x0ef6\n#define XK_Hangul_AraeAE                 0x0ef7\n\n/* Ancient Hangul syllable-final (JongSeong) Characters */\n#define XK_Hangul_J_PanSios              0x0ef8\n#define XK_Hangul_J_KkogjiDalrinIeung    0x0ef9\n#define XK_Hangul_J_YeorinHieuh          0x0efa\n\n/* Korean currency symbol */\n#define XK_Korean_Won                    0x0eff  /*(U+20A9 WON SIGN)*/\n\n#endif /* XK_KOREAN */\n\n/*\n * Armenian\n */\n\n#ifdef XK_ARMENIAN\n#define XK_Armenian_ligature_ew       0x1000587  /* U+0587 ARMENIAN SMALL LIGATURE ECH YIWN */\n#define XK_Armenian_full_stop         0x1000589  /* U+0589 ARMENIAN FULL STOP */\n#define XK_Armenian_verjaket          0x1000589  /* U+0589 ARMENIAN FULL STOP */\n#define XK_Armenian_separation_mark   0x100055d  /* U+055D ARMENIAN COMMA */\n#define XK_Armenian_but               0x100055d  /* U+055D ARMENIAN COMMA */\n#define XK_Armenian_hyphen            0x100058a  /* U+058A ARMENIAN HYPHEN */\n#define XK_Armenian_yentamna          0x100058a  /* U+058A ARMENIAN HYPHEN */\n#define XK_Armenian_exclam            0x100055c  /* U+055C ARMENIAN EXCLAMATION MARK */\n#define XK_Armenian_amanak            0x100055c  /* U+055C ARMENIAN EXCLAMATION MARK */\n#define XK_Armenian_accent            0x100055b  /* U+055B ARMENIAN EMPHASIS MARK */\n#define XK_Armenian_shesht            0x100055b  /* U+055B ARMENIAN EMPHASIS MARK */\n#define XK_Armenian_question          0x100055e  /* U+055E ARMENIAN QUESTION MARK */\n#define XK_Armenian_paruyk            0x100055e  /* U+055E ARMENIAN QUESTION MARK */\n#define XK_Armenian_AYB               0x1000531  /* U+0531 ARMENIAN CAPITAL LETTER AYB */\n#define XK_Armenian_ayb               0x1000561  /* U+0561 ARMENIAN SMALL LETTER AYB */\n#define XK_Armenian_BEN               0x1000532  /* U+0532 ARMENIAN CAPITAL LETTER BEN */\n#define XK_Armenian_ben               0x1000562  /* U+0562 ARMENIAN SMALL LETTER BEN */\n#define XK_Armenian_GIM               0x1000533  /* U+0533 ARMENIAN CAPITAL LETTER GIM */\n#define XK_Armenian_gim               0x1000563  /* U+0563 ARMENIAN SMALL LETTER GIM */\n#define XK_Armenian_DA                0x1000534  /* U+0534 ARMENIAN CAPITAL LETTER DA */\n#define XK_Armenian_da                0x1000564  /* U+0564 ARMENIAN SMALL LETTER DA */\n#define XK_Armenian_YECH              0x1000535  /* U+0535 ARMENIAN CAPITAL LETTER ECH */\n#define XK_Armenian_yech              0x1000565  /* U+0565 ARMENIAN SMALL LETTER ECH */\n#define XK_Armenian_ZA                0x1000536  /* U+0536 ARMENIAN CAPITAL LETTER ZA */\n#define XK_Armenian_za                0x1000566  /* U+0566 ARMENIAN SMALL LETTER ZA */\n#define XK_Armenian_E                 0x1000537  /* U+0537 ARMENIAN CAPITAL LETTER EH */\n#define XK_Armenian_e                 0x1000567  /* U+0567 ARMENIAN SMALL LETTER EH */\n#define XK_Armenian_AT                0x1000538  /* U+0538 ARMENIAN CAPITAL LETTER ET */\n#define XK_Armenian_at                0x1000568  /* U+0568 ARMENIAN SMALL LETTER ET */\n#define XK_Armenian_TO                0x1000539  /* U+0539 ARMENIAN CAPITAL LETTER TO */\n#define XK_Armenian_to                0x1000569  /* U+0569 ARMENIAN SMALL LETTER TO */\n#define XK_Armenian_ZHE               0x100053a  /* U+053A ARMENIAN CAPITAL LETTER ZHE */\n#define XK_Armenian_zhe               0x100056a  /* U+056A ARMENIAN SMALL LETTER ZHE */\n#define XK_Armenian_INI               0x100053b  /* U+053B ARMENIAN CAPITAL LETTER INI */\n#define XK_Armenian_ini               0x100056b  /* U+056B ARMENIAN SMALL LETTER INI */\n#define XK_Armenian_LYUN              0x100053c  /* U+053C ARMENIAN CAPITAL LETTER LIWN */\n#define XK_Armenian_lyun              0x100056c  /* U+056C ARMENIAN SMALL LETTER LIWN */\n#define XK_Armenian_KHE               0x100053d  /* U+053D ARMENIAN CAPITAL LETTER XEH */\n#define XK_Armenian_khe               0x100056d  /* U+056D ARMENIAN SMALL LETTER XEH */\n#define XK_Armenian_TSA               0x100053e  /* U+053E ARMENIAN CAPITAL LETTER CA */\n#define XK_Armenian_tsa               0x100056e  /* U+056E ARMENIAN SMALL LETTER CA */\n#define XK_Armenian_KEN               0x100053f  /* U+053F ARMENIAN CAPITAL LETTER KEN */\n#define XK_Armenian_ken               0x100056f  /* U+056F ARMENIAN SMALL LETTER KEN */\n#define XK_Armenian_HO                0x1000540  /* U+0540 ARMENIAN CAPITAL LETTER HO */\n#define XK_Armenian_ho                0x1000570  /* U+0570 ARMENIAN SMALL LETTER HO */\n#define XK_Armenian_DZA               0x1000541  /* U+0541 ARMENIAN CAPITAL LETTER JA */\n#define XK_Armenian_dza               0x1000571  /* U+0571 ARMENIAN SMALL LETTER JA */\n#define XK_Armenian_GHAT              0x1000542  /* U+0542 ARMENIAN CAPITAL LETTER GHAD */\n#define XK_Armenian_ghat              0x1000572  /* U+0572 ARMENIAN SMALL LETTER GHAD */\n#define XK_Armenian_TCHE              0x1000543  /* U+0543 ARMENIAN CAPITAL LETTER CHEH */\n#define XK_Armenian_tche              0x1000573  /* U+0573 ARMENIAN SMALL LETTER CHEH */\n#define XK_Armenian_MEN               0x1000544  /* U+0544 ARMENIAN CAPITAL LETTER MEN */\n#define XK_Armenian_men               0x1000574  /* U+0574 ARMENIAN SMALL LETTER MEN */\n#define XK_Armenian_HI                0x1000545  /* U+0545 ARMENIAN CAPITAL LETTER YI */\n#define XK_Armenian_hi                0x1000575  /* U+0575 ARMENIAN SMALL LETTER YI */\n#define XK_Armenian_NU                0x1000546  /* U+0546 ARMENIAN CAPITAL LETTER NOW */\n#define XK_Armenian_nu                0x1000576  /* U+0576 ARMENIAN SMALL LETTER NOW */\n#define XK_Armenian_SHA               0x1000547  /* U+0547 ARMENIAN CAPITAL LETTER SHA */\n#define XK_Armenian_sha               0x1000577  /* U+0577 ARMENIAN SMALL LETTER SHA */\n#define XK_Armenian_VO                0x1000548  /* U+0548 ARMENIAN CAPITAL LETTER VO */\n#define XK_Armenian_vo                0x1000578  /* U+0578 ARMENIAN SMALL LETTER VO */\n#define XK_Armenian_CHA               0x1000549  /* U+0549 ARMENIAN CAPITAL LETTER CHA */\n#define XK_Armenian_cha               0x1000579  /* U+0579 ARMENIAN SMALL LETTER CHA */\n#define XK_Armenian_PE                0x100054a  /* U+054A ARMENIAN CAPITAL LETTER PEH */\n#define XK_Armenian_pe                0x100057a  /* U+057A ARMENIAN SMALL LETTER PEH */\n#define XK_Armenian_JE                0x100054b  /* U+054B ARMENIAN CAPITAL LETTER JHEH */\n#define XK_Armenian_je                0x100057b  /* U+057B ARMENIAN SMALL LETTER JHEH */\n#define XK_Armenian_RA                0x100054c  /* U+054C ARMENIAN CAPITAL LETTER RA */\n#define XK_Armenian_ra                0x100057c  /* U+057C ARMENIAN SMALL LETTER RA */\n#define XK_Armenian_SE                0x100054d  /* U+054D ARMENIAN CAPITAL LETTER SEH */\n#define XK_Armenian_se                0x100057d  /* U+057D ARMENIAN SMALL LETTER SEH */\n#define XK_Armenian_VEV               0x100054e  /* U+054E ARMENIAN CAPITAL LETTER VEW */\n#define XK_Armenian_vev               0x100057e  /* U+057E ARMENIAN SMALL LETTER VEW */\n#define XK_Armenian_TYUN              0x100054f  /* U+054F ARMENIAN CAPITAL LETTER TIWN */\n#define XK_Armenian_tyun              0x100057f  /* U+057F ARMENIAN SMALL LETTER TIWN */\n#define XK_Armenian_RE                0x1000550  /* U+0550 ARMENIAN CAPITAL LETTER REH */\n#define XK_Armenian_re                0x1000580  /* U+0580 ARMENIAN SMALL LETTER REH */\n#define XK_Armenian_TSO               0x1000551  /* U+0551 ARMENIAN CAPITAL LETTER CO */\n#define XK_Armenian_tso               0x1000581  /* U+0581 ARMENIAN SMALL LETTER CO */\n#define XK_Armenian_VYUN              0x1000552  /* U+0552 ARMENIAN CAPITAL LETTER YIWN */\n#define XK_Armenian_vyun              0x1000582  /* U+0582 ARMENIAN SMALL LETTER YIWN */\n#define XK_Armenian_PYUR              0x1000553  /* U+0553 ARMENIAN CAPITAL LETTER PIWR */\n#define XK_Armenian_pyur              0x1000583  /* U+0583 ARMENIAN SMALL LETTER PIWR */\n#define XK_Armenian_KE                0x1000554  /* U+0554 ARMENIAN CAPITAL LETTER KEH */\n#define XK_Armenian_ke                0x1000584  /* U+0584 ARMENIAN SMALL LETTER KEH */\n#define XK_Armenian_O                 0x1000555  /* U+0555 ARMENIAN CAPITAL LETTER OH */\n#define XK_Armenian_o                 0x1000585  /* U+0585 ARMENIAN SMALL LETTER OH */\n#define XK_Armenian_FE                0x1000556  /* U+0556 ARMENIAN CAPITAL LETTER FEH */\n#define XK_Armenian_fe                0x1000586  /* U+0586 ARMENIAN SMALL LETTER FEH */\n#define XK_Armenian_apostrophe        0x100055a  /* U+055A ARMENIAN APOSTROPHE */\n#endif /* XK_ARMENIAN */\n\n/*\n * Georgian\n */\n\n#ifdef XK_GEORGIAN\n#define XK_Georgian_an                0x10010d0  /* U+10D0 GEORGIAN LETTER AN */\n#define XK_Georgian_ban               0x10010d1  /* U+10D1 GEORGIAN LETTER BAN */\n#define XK_Georgian_gan               0x10010d2  /* U+10D2 GEORGIAN LETTER GAN */\n#define XK_Georgian_don               0x10010d3  /* U+10D3 GEORGIAN LETTER DON */\n#define XK_Georgian_en                0x10010d4  /* U+10D4 GEORGIAN LETTER EN */\n#define XK_Georgian_vin               0x10010d5  /* U+10D5 GEORGIAN LETTER VIN */\n#define XK_Georgian_zen               0x10010d6  /* U+10D6 GEORGIAN LETTER ZEN */\n#define XK_Georgian_tan               0x10010d7  /* U+10D7 GEORGIAN LETTER TAN */\n#define XK_Georgian_in                0x10010d8  /* U+10D8 GEORGIAN LETTER IN */\n#define XK_Georgian_kan               0x10010d9  /* U+10D9 GEORGIAN LETTER KAN */\n#define XK_Georgian_las               0x10010da  /* U+10DA GEORGIAN LETTER LAS */\n#define XK_Georgian_man               0x10010db  /* U+10DB GEORGIAN LETTER MAN */\n#define XK_Georgian_nar               0x10010dc  /* U+10DC GEORGIAN LETTER NAR */\n#define XK_Georgian_on                0x10010dd  /* U+10DD GEORGIAN LETTER ON */\n#define XK_Georgian_par               0x10010de  /* U+10DE GEORGIAN LETTER PAR */\n#define XK_Georgian_zhar              0x10010df  /* U+10DF GEORGIAN LETTER ZHAR */\n#define XK_Georgian_rae               0x10010e0  /* U+10E0 GEORGIAN LETTER RAE */\n#define XK_Georgian_san               0x10010e1  /* U+10E1 GEORGIAN LETTER SAN */\n#define XK_Georgian_tar               0x10010e2  /* U+10E2 GEORGIAN LETTER TAR */\n#define XK_Georgian_un                0x10010e3  /* U+10E3 GEORGIAN LETTER UN */\n#define XK_Georgian_phar              0x10010e4  /* U+10E4 GEORGIAN LETTER PHAR */\n#define XK_Georgian_khar              0x10010e5  /* U+10E5 GEORGIAN LETTER KHAR */\n#define XK_Georgian_ghan              0x10010e6  /* U+10E6 GEORGIAN LETTER GHAN */\n#define XK_Georgian_qar               0x10010e7  /* U+10E7 GEORGIAN LETTER QAR */\n#define XK_Georgian_shin              0x10010e8  /* U+10E8 GEORGIAN LETTER SHIN */\n#define XK_Georgian_chin              0x10010e9  /* U+10E9 GEORGIAN LETTER CHIN */\n#define XK_Georgian_can               0x10010ea  /* U+10EA GEORGIAN LETTER CAN */\n#define XK_Georgian_jil               0x10010eb  /* U+10EB GEORGIAN LETTER JIL */\n#define XK_Georgian_cil               0x10010ec  /* U+10EC GEORGIAN LETTER CIL */\n#define XK_Georgian_char              0x10010ed  /* U+10ED GEORGIAN LETTER CHAR */\n#define XK_Georgian_xan               0x10010ee  /* U+10EE GEORGIAN LETTER XAN */\n#define XK_Georgian_jhan              0x10010ef  /* U+10EF GEORGIAN LETTER JHAN */\n#define XK_Georgian_hae               0x10010f0  /* U+10F0 GEORGIAN LETTER HAE */\n#define XK_Georgian_he                0x10010f1  /* U+10F1 GEORGIAN LETTER HE */\n#define XK_Georgian_hie               0x10010f2  /* U+10F2 GEORGIAN LETTER HIE */\n#define XK_Georgian_we                0x10010f3  /* U+10F3 GEORGIAN LETTER WE */\n#define XK_Georgian_har               0x10010f4  /* U+10F4 GEORGIAN LETTER HAR */\n#define XK_Georgian_hoe               0x10010f5  /* U+10F5 GEORGIAN LETTER HOE */\n#define XK_Georgian_fi                0x10010f6  /* U+10F6 GEORGIAN LETTER FI */\n#endif /* XK_GEORGIAN */\n\n/*\n * Azeri (and other Turkic or Caucasian languages)\n */\n\n#ifdef XK_CAUCASUS\n/* latin */\n#define XK_Xabovedot                  0x1001e8a  /* U+1E8A LATIN CAPITAL LETTER X WITH DOT ABOVE */\n#define XK_Ibreve                     0x100012c  /* U+012C LATIN CAPITAL LETTER I WITH BREVE */\n#define XK_Zstroke                    0x10001b5  /* U+01B5 LATIN CAPITAL LETTER Z WITH STROKE */\n#define XK_Gcaron                     0x10001e6  /* U+01E6 LATIN CAPITAL LETTER G WITH CARON */\n#define XK_Ocaron                     0x10001d1  /* U+01D2 LATIN CAPITAL LETTER O WITH CARON */\n#define XK_Obarred                    0x100019f  /* U+019F LATIN CAPITAL LETTER O WITH MIDDLE TILDE */\n#define XK_xabovedot                  0x1001e8b  /* U+1E8B LATIN SMALL LETTER X WITH DOT ABOVE */\n#define XK_ibreve                     0x100012d  /* U+012D LATIN SMALL LETTER I WITH BREVE */\n#define XK_zstroke                    0x10001b6  /* U+01B6 LATIN SMALL LETTER Z WITH STROKE */\n#define XK_gcaron                     0x10001e7  /* U+01E7 LATIN SMALL LETTER G WITH CARON */\n#define XK_ocaron                     0x10001d2  /* U+01D2 LATIN SMALL LETTER O WITH CARON */\n#define XK_obarred                    0x1000275  /* U+0275 LATIN SMALL LETTER BARRED O */\n#define XK_SCHWA                      0x100018f  /* U+018F LATIN CAPITAL LETTER SCHWA */\n#define XK_schwa                      0x1000259  /* U+0259 LATIN SMALL LETTER SCHWA */\n/* those are not really Caucasus */\n/* For Inupiak */\n#define XK_Lbelowdot                  0x1001e36  /* U+1E36 LATIN CAPITAL LETTER L WITH DOT BELOW */\n#define XK_lbelowdot                  0x1001e37  /* U+1E37 LATIN SMALL LETTER L WITH DOT BELOW */\n#endif /* XK_CAUCASUS */\n\n/*\n * Vietnamese\n */\n \n#ifdef XK_VIETNAMESE\n#define XK_Abelowdot                  0x1001ea0  /* U+1EA0 LATIN CAPITAL LETTER A WITH DOT BELOW */\n#define XK_abelowdot                  0x1001ea1  /* U+1EA1 LATIN SMALL LETTER A WITH DOT BELOW */\n#define XK_Ahook                      0x1001ea2  /* U+1EA2 LATIN CAPITAL LETTER A WITH HOOK ABOVE */\n#define XK_ahook                      0x1001ea3  /* U+1EA3 LATIN SMALL LETTER A WITH HOOK ABOVE */\n#define XK_Acircumflexacute           0x1001ea4  /* U+1EA4 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE */\n#define XK_acircumflexacute           0x1001ea5  /* U+1EA5 LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE */\n#define XK_Acircumflexgrave           0x1001ea6  /* U+1EA6 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE */\n#define XK_acircumflexgrave           0x1001ea7  /* U+1EA7 LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE */\n#define XK_Acircumflexhook            0x1001ea8  /* U+1EA8 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */\n#define XK_acircumflexhook            0x1001ea9  /* U+1EA9 LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */\n#define XK_Acircumflextilde           0x1001eaa  /* U+1EAA LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE */\n#define XK_acircumflextilde           0x1001eab  /* U+1EAB LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE */\n#define XK_Acircumflexbelowdot        0x1001eac  /* U+1EAC LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW */\n#define XK_acircumflexbelowdot        0x1001ead  /* U+1EAD LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW */\n#define XK_Abreveacute                0x1001eae  /* U+1EAE LATIN CAPITAL LETTER A WITH BREVE AND ACUTE */\n#define XK_abreveacute                0x1001eaf  /* U+1EAF LATIN SMALL LETTER A WITH BREVE AND ACUTE */\n#define XK_Abrevegrave                0x1001eb0  /* U+1EB0 LATIN CAPITAL LETTER A WITH BREVE AND GRAVE */\n#define XK_abrevegrave                0x1001eb1  /* U+1EB1 LATIN SMALL LETTER A WITH BREVE AND GRAVE */\n#define XK_Abrevehook                 0x1001eb2  /* U+1EB2 LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE */\n#define XK_abrevehook                 0x1001eb3  /* U+1EB3 LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE */\n#define XK_Abrevetilde                0x1001eb4  /* U+1EB4 LATIN CAPITAL LETTER A WITH BREVE AND TILDE */\n#define XK_abrevetilde                0x1001eb5  /* U+1EB5 LATIN SMALL LETTER A WITH BREVE AND TILDE */\n#define XK_Abrevebelowdot             0x1001eb6  /* U+1EB6 LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW */\n#define XK_abrevebelowdot             0x1001eb7  /* U+1EB7 LATIN SMALL LETTER A WITH BREVE AND DOT BELOW */\n#define XK_Ebelowdot                  0x1001eb8  /* U+1EB8 LATIN CAPITAL LETTER E WITH DOT BELOW */\n#define XK_ebelowdot                  0x1001eb9  /* U+1EB9 LATIN SMALL LETTER E WITH DOT BELOW */\n#define XK_Ehook                      0x1001eba  /* U+1EBA LATIN CAPITAL LETTER E WITH HOOK ABOVE */\n#define XK_ehook                      0x1001ebb  /* U+1EBB LATIN SMALL LETTER E WITH HOOK ABOVE */\n#define XK_Etilde                     0x1001ebc  /* U+1EBC LATIN CAPITAL LETTER E WITH TILDE */\n#define XK_etilde                     0x1001ebd  /* U+1EBD LATIN SMALL LETTER E WITH TILDE */\n#define XK_Ecircumflexacute           0x1001ebe  /* U+1EBE LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE */\n#define XK_ecircumflexacute           0x1001ebf  /* U+1EBF LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE */\n#define XK_Ecircumflexgrave           0x1001ec0  /* U+1EC0 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE */\n#define XK_ecircumflexgrave           0x1001ec1  /* U+1EC1 LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE */\n#define XK_Ecircumflexhook            0x1001ec2  /* U+1EC2 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */\n#define XK_ecircumflexhook            0x1001ec3  /* U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */\n#define XK_Ecircumflextilde           0x1001ec4  /* U+1EC4 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE */\n#define XK_ecircumflextilde           0x1001ec5  /* U+1EC5 LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE */\n#define XK_Ecircumflexbelowdot        0x1001ec6  /* U+1EC6 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW */\n#define XK_ecircumflexbelowdot        0x1001ec7  /* U+1EC7 LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW */\n#define XK_Ihook                      0x1001ec8  /* U+1EC8 LATIN CAPITAL LETTER I WITH HOOK ABOVE */\n#define XK_ihook                      0x1001ec9  /* U+1EC9 LATIN SMALL LETTER I WITH HOOK ABOVE */\n#define XK_Ibelowdot                  0x1001eca  /* U+1ECA LATIN CAPITAL LETTER I WITH DOT BELOW */\n#define XK_ibelowdot                  0x1001ecb  /* U+1ECB LATIN SMALL LETTER I WITH DOT BELOW */\n#define XK_Obelowdot                  0x1001ecc  /* U+1ECC LATIN CAPITAL LETTER O WITH DOT BELOW */\n#define XK_obelowdot                  0x1001ecd  /* U+1ECD LATIN SMALL LETTER O WITH DOT BELOW */\n#define XK_Ohook                      0x1001ece  /* U+1ECE LATIN CAPITAL LETTER O WITH HOOK ABOVE */\n#define XK_ohook                      0x1001ecf  /* U+1ECF LATIN SMALL LETTER O WITH HOOK ABOVE */\n#define XK_Ocircumflexacute           0x1001ed0  /* U+1ED0 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE */\n#define XK_ocircumflexacute           0x1001ed1  /* U+1ED1 LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE */\n#define XK_Ocircumflexgrave           0x1001ed2  /* U+1ED2 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE */\n#define XK_ocircumflexgrave           0x1001ed3  /* U+1ED3 LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE */\n#define XK_Ocircumflexhook            0x1001ed4  /* U+1ED4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */\n#define XK_ocircumflexhook            0x1001ed5  /* U+1ED5 LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */\n#define XK_Ocircumflextilde           0x1001ed6  /* U+1ED6 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE */\n#define XK_ocircumflextilde           0x1001ed7  /* U+1ED7 LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE */\n#define XK_Ocircumflexbelowdot        0x1001ed8  /* U+1ED8 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW */\n#define XK_ocircumflexbelowdot        0x1001ed9  /* U+1ED9 LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW */\n#define XK_Ohornacute                 0x1001eda  /* U+1EDA LATIN CAPITAL LETTER O WITH HORN AND ACUTE */\n#define XK_ohornacute                 0x1001edb  /* U+1EDB LATIN SMALL LETTER O WITH HORN AND ACUTE */\n#define XK_Ohorngrave                 0x1001edc  /* U+1EDC LATIN CAPITAL LETTER O WITH HORN AND GRAVE */\n#define XK_ohorngrave                 0x1001edd  /* U+1EDD LATIN SMALL LETTER O WITH HORN AND GRAVE */\n#define XK_Ohornhook                  0x1001ede  /* U+1EDE LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE */\n#define XK_ohornhook                  0x1001edf  /* U+1EDF LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE */\n#define XK_Ohorntilde                 0x1001ee0  /* U+1EE0 LATIN CAPITAL LETTER O WITH HORN AND TILDE */\n#define XK_ohorntilde                 0x1001ee1  /* U+1EE1 LATIN SMALL LETTER O WITH HORN AND TILDE */\n#define XK_Ohornbelowdot              0x1001ee2  /* U+1EE2 LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW */\n#define XK_ohornbelowdot              0x1001ee3  /* U+1EE3 LATIN SMALL LETTER O WITH HORN AND DOT BELOW */\n#define XK_Ubelowdot                  0x1001ee4  /* U+1EE4 LATIN CAPITAL LETTER U WITH DOT BELOW */\n#define XK_ubelowdot                  0x1001ee5  /* U+1EE5 LATIN SMALL LETTER U WITH DOT BELOW */\n#define XK_Uhook                      0x1001ee6  /* U+1EE6 LATIN CAPITAL LETTER U WITH HOOK ABOVE */\n#define XK_uhook                      0x1001ee7  /* U+1EE7 LATIN SMALL LETTER U WITH HOOK ABOVE */\n#define XK_Uhornacute                 0x1001ee8  /* U+1EE8 LATIN CAPITAL LETTER U WITH HORN AND ACUTE */\n#define XK_uhornacute                 0x1001ee9  /* U+1EE9 LATIN SMALL LETTER U WITH HORN AND ACUTE */\n#define XK_Uhorngrave                 0x1001eea  /* U+1EEA LATIN CAPITAL LETTER U WITH HORN AND GRAVE */\n#define XK_uhorngrave                 0x1001eeb  /* U+1EEB LATIN SMALL LETTER U WITH HORN AND GRAVE */\n#define XK_Uhornhook                  0x1001eec  /* U+1EEC LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE */\n#define XK_uhornhook                  0x1001eed  /* U+1EED LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE */\n#define XK_Uhorntilde                 0x1001eee  /* U+1EEE LATIN CAPITAL LETTER U WITH HORN AND TILDE */\n#define XK_uhorntilde                 0x1001eef  /* U+1EEF LATIN SMALL LETTER U WITH HORN AND TILDE */\n#define XK_Uhornbelowdot              0x1001ef0  /* U+1EF0 LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW */\n#define XK_uhornbelowdot              0x1001ef1  /* U+1EF1 LATIN SMALL LETTER U WITH HORN AND DOT BELOW */\n#define XK_Ybelowdot                  0x1001ef4  /* U+1EF4 LATIN CAPITAL LETTER Y WITH DOT BELOW */\n#define XK_ybelowdot                  0x1001ef5  /* U+1EF5 LATIN SMALL LETTER Y WITH DOT BELOW */\n#define XK_Yhook                      0x1001ef6  /* U+1EF6 LATIN CAPITAL LETTER Y WITH HOOK ABOVE */\n#define XK_yhook                      0x1001ef7  /* U+1EF7 LATIN SMALL LETTER Y WITH HOOK ABOVE */\n#define XK_Ytilde                     0x1001ef8  /* U+1EF8 LATIN CAPITAL LETTER Y WITH TILDE */\n#define XK_ytilde                     0x1001ef9  /* U+1EF9 LATIN SMALL LETTER Y WITH TILDE */\n#define XK_Ohorn                      0x10001a0  /* U+01A0 LATIN CAPITAL LETTER O WITH HORN */\n#define XK_ohorn                      0x10001a1  /* U+01A1 LATIN SMALL LETTER O WITH HORN */\n#define XK_Uhorn                      0x10001af  /* U+01AF LATIN CAPITAL LETTER U WITH HORN */\n#define XK_uhorn                      0x10001b0  /* U+01B0 LATIN SMALL LETTER U WITH HORN */\n\n#endif /* XK_VIETNAMESE */\n\n#ifdef XK_CURRENCY\n#define XK_EcuSign                    0x10020a0  /* U+20A0 EURO-CURRENCY SIGN */\n#define XK_ColonSign                  0x10020a1  /* U+20A1 COLON SIGN */\n#define XK_CruzeiroSign               0x10020a2  /* U+20A2 CRUZEIRO SIGN */\n#define XK_FFrancSign                 0x10020a3  /* U+20A3 FRENCH FRANC SIGN */\n#define XK_LiraSign                   0x10020a4  /* U+20A4 LIRA SIGN */\n#define XK_MillSign                   0x10020a5  /* U+20A5 MILL SIGN */\n#define XK_NairaSign                  0x10020a6  /* U+20A6 NAIRA SIGN */\n#define XK_PesetaSign                 0x10020a7  /* U+20A7 PESETA SIGN */\n#define XK_RupeeSign                  0x10020a8  /* U+20A8 RUPEE SIGN */\n#define XK_WonSign                    0x10020a9  /* U+20A9 WON SIGN */\n#define XK_NewSheqelSign              0x10020aa  /* U+20AA NEW SHEQEL SIGN */\n#define XK_DongSign                   0x10020ab  /* U+20AB DONG SIGN */\n#define XK_EuroSign                      0x20ac  /* U+20AC EURO SIGN */\n#endif /* XK_CURRENCY */\n\n#ifdef XK_MATHEMATICAL\n/* one, two and three are defined above. */\n#define XK_zerosuperior               0x1002070  /* U+2070 SUPERSCRIPT ZERO */\n#define XK_foursuperior               0x1002074  /* U+2074 SUPERSCRIPT FOUR */\n#define XK_fivesuperior               0x1002075  /* U+2075 SUPERSCRIPT FIVE */\n#define XK_sixsuperior                0x1002076  /* U+2076 SUPERSCRIPT SIX */\n#define XK_sevensuperior              0x1002077  /* U+2077 SUPERSCRIPT SEVEN */\n#define XK_eightsuperior              0x1002078  /* U+2078 SUPERSCRIPT EIGHT */\n#define XK_ninesuperior               0x1002079  /* U+2079 SUPERSCRIPT NINE */\n#define XK_zerosubscript              0x1002080  /* U+2080 SUBSCRIPT ZERO */\n#define XK_onesubscript               0x1002081  /* U+2081 SUBSCRIPT ONE */\n#define XK_twosubscript               0x1002082  /* U+2082 SUBSCRIPT TWO */\n#define XK_threesubscript             0x1002083  /* U+2083 SUBSCRIPT THREE */\n#define XK_foursubscript              0x1002084  /* U+2084 SUBSCRIPT FOUR */\n#define XK_fivesubscript              0x1002085  /* U+2085 SUBSCRIPT FIVE */\n#define XK_sixsubscript               0x1002086  /* U+2086 SUBSCRIPT SIX */\n#define XK_sevensubscript             0x1002087  /* U+2087 SUBSCRIPT SEVEN */\n#define XK_eightsubscript             0x1002088  /* U+2088 SUBSCRIPT EIGHT */\n#define XK_ninesubscript              0x1002089  /* U+2089 SUBSCRIPT NINE */\n#define XK_partdifferential           0x1002202  /* U+2202 PARTIAL DIFFERENTIAL */\n#define XK_emptyset                   0x1002205  /* U+2205 NULL SET */\n#define XK_elementof                  0x1002208  /* U+2208 ELEMENT OF */\n#define XK_notelementof               0x1002209  /* U+2209 NOT AN ELEMENT OF */\n#define XK_containsas                 0x100220B  /* U+220B CONTAINS AS MEMBER */\n#define XK_squareroot                 0x100221A  /* U+221A SQUARE ROOT */\n#define XK_cuberoot                   0x100221B  /* U+221B CUBE ROOT */\n#define XK_fourthroot                 0x100221C  /* U+221C FOURTH ROOT */\n#define XK_dintegral                  0x100222C  /* U+222C DOUBLE INTEGRAL */\n#define XK_tintegral                  0x100222D  /* U+222D TRIPLE INTEGRAL */\n#define XK_because                    0x1002235  /* U+2235 BECAUSE */\n#define XK_approxeq                   0x1002248  /* U+2245 ALMOST EQUAL TO */\n#define XK_notapproxeq                0x1002247  /* U+2247 NOT ALMOST EQUAL TO */\n#define XK_notidentical               0x1002262  /* U+2262 NOT IDENTICAL TO */\n#define XK_stricteq                   0x1002263  /* U+2263 STRICTLY EQUIVALENT TO */          \n#endif /* XK_MATHEMATICAL */\n\n#ifdef XK_BRAILLE\n#define XK_braille_dot_1                 0xfff1\n#define XK_braille_dot_2                 0xfff2\n#define XK_braille_dot_3                 0xfff3\n#define XK_braille_dot_4                 0xfff4\n#define XK_braille_dot_5                 0xfff5\n#define XK_braille_dot_6                 0xfff6\n#define XK_braille_dot_7                 0xfff7\n#define XK_braille_dot_8                 0xfff8\n#define XK_braille_dot_9                 0xfff9\n#define XK_braille_dot_10                0xfffa\n#define XK_braille_blank              0x1002800  /* U+2800 BRAILLE PATTERN BLANK */\n#define XK_braille_dots_1             0x1002801  /* U+2801 BRAILLE PATTERN DOTS-1 */\n#define XK_braille_dots_2             0x1002802  /* U+2802 BRAILLE PATTERN DOTS-2 */\n#define XK_braille_dots_12            0x1002803  /* U+2803 BRAILLE PATTERN DOTS-12 */\n#define XK_braille_dots_3             0x1002804  /* U+2804 BRAILLE PATTERN DOTS-3 */\n#define XK_braille_dots_13            0x1002805  /* U+2805 BRAILLE PATTERN DOTS-13 */\n#define XK_braille_dots_23            0x1002806  /* U+2806 BRAILLE PATTERN DOTS-23 */\n#define XK_braille_dots_123           0x1002807  /* U+2807 BRAILLE PATTERN DOTS-123 */\n#define XK_braille_dots_4             0x1002808  /* U+2808 BRAILLE PATTERN DOTS-4 */\n#define XK_braille_dots_14            0x1002809  /* U+2809 BRAILLE PATTERN DOTS-14 */\n#define XK_braille_dots_24            0x100280a  /* U+280a BRAILLE PATTERN DOTS-24 */\n#define XK_braille_dots_124           0x100280b  /* U+280b BRAILLE PATTERN DOTS-124 */\n#define XK_braille_dots_34            0x100280c  /* U+280c BRAILLE PATTERN DOTS-34 */\n#define XK_braille_dots_134           0x100280d  /* U+280d BRAILLE PATTERN DOTS-134 */\n#define XK_braille_dots_234           0x100280e  /* U+280e BRAILLE PATTERN DOTS-234 */\n#define XK_braille_dots_1234          0x100280f  /* U+280f BRAILLE PATTERN DOTS-1234 */\n#define XK_braille_dots_5             0x1002810  /* U+2810 BRAILLE PATTERN DOTS-5 */\n#define XK_braille_dots_15            0x1002811  /* U+2811 BRAILLE PATTERN DOTS-15 */\n#define XK_braille_dots_25            0x1002812  /* U+2812 BRAILLE PATTERN DOTS-25 */\n#define XK_braille_dots_125           0x1002813  /* U+2813 BRAILLE PATTERN DOTS-125 */\n#define XK_braille_dots_35            0x1002814  /* U+2814 BRAILLE PATTERN DOTS-35 */\n#define XK_braille_dots_135           0x1002815  /* U+2815 BRAILLE PATTERN DOTS-135 */\n#define XK_braille_dots_235           0x1002816  /* U+2816 BRAILLE PATTERN DOTS-235 */\n#define XK_braille_dots_1235          0x1002817  /* U+2817 BRAILLE PATTERN DOTS-1235 */\n#define XK_braille_dots_45            0x1002818  /* U+2818 BRAILLE PATTERN DOTS-45 */\n#define XK_braille_dots_145           0x1002819  /* U+2819 BRAILLE PATTERN DOTS-145 */\n#define XK_braille_dots_245           0x100281a  /* U+281a BRAILLE PATTERN DOTS-245 */\n#define XK_braille_dots_1245          0x100281b  /* U+281b BRAILLE PATTERN DOTS-1245 */\n#define XK_braille_dots_345           0x100281c  /* U+281c BRAILLE PATTERN DOTS-345 */\n#define XK_braille_dots_1345          0x100281d  /* U+281d BRAILLE PATTERN DOTS-1345 */\n#define XK_braille_dots_2345          0x100281e  /* U+281e BRAILLE PATTERN DOTS-2345 */\n#define XK_braille_dots_12345         0x100281f  /* U+281f BRAILLE PATTERN DOTS-12345 */\n#define XK_braille_dots_6             0x1002820  /* U+2820 BRAILLE PATTERN DOTS-6 */\n#define XK_braille_dots_16            0x1002821  /* U+2821 BRAILLE PATTERN DOTS-16 */\n#define XK_braille_dots_26            0x1002822  /* U+2822 BRAILLE PATTERN DOTS-26 */\n#define XK_braille_dots_126           0x1002823  /* U+2823 BRAILLE PATTERN DOTS-126 */\n#define XK_braille_dots_36            0x1002824  /* U+2824 BRAILLE PATTERN DOTS-36 */\n#define XK_braille_dots_136           0x1002825  /* U+2825 BRAILLE PATTERN DOTS-136 */\n#define XK_braille_dots_236           0x1002826  /* U+2826 BRAILLE PATTERN DOTS-236 */\n#define XK_braille_dots_1236          0x1002827  /* U+2827 BRAILLE PATTERN DOTS-1236 */\n#define XK_braille_dots_46            0x1002828  /* U+2828 BRAILLE PATTERN DOTS-46 */\n#define XK_braille_dots_146           0x1002829  /* U+2829 BRAILLE PATTERN DOTS-146 */\n#define XK_braille_dots_246           0x100282a  /* U+282a BRAILLE PATTERN DOTS-246 */\n#define XK_braille_dots_1246          0x100282b  /* U+282b BRAILLE PATTERN DOTS-1246 */\n#define XK_braille_dots_346           0x100282c  /* U+282c BRAILLE PATTERN DOTS-346 */\n#define XK_braille_dots_1346          0x100282d  /* U+282d BRAILLE PATTERN DOTS-1346 */\n#define XK_braille_dots_2346          0x100282e  /* U+282e BRAILLE PATTERN DOTS-2346 */\n#define XK_braille_dots_12346         0x100282f  /* U+282f BRAILLE PATTERN DOTS-12346 */\n#define XK_braille_dots_56            0x1002830  /* U+2830 BRAILLE PATTERN DOTS-56 */\n#define XK_braille_dots_156           0x1002831  /* U+2831 BRAILLE PATTERN DOTS-156 */\n#define XK_braille_dots_256           0x1002832  /* U+2832 BRAILLE PATTERN DOTS-256 */\n#define XK_braille_dots_1256          0x1002833  /* U+2833 BRAILLE PATTERN DOTS-1256 */\n#define XK_braille_dots_356           0x1002834  /* U+2834 BRAILLE PATTERN DOTS-356 */\n#define XK_braille_dots_1356          0x1002835  /* U+2835 BRAILLE PATTERN DOTS-1356 */\n#define XK_braille_dots_2356          0x1002836  /* U+2836 BRAILLE PATTERN DOTS-2356 */\n#define XK_braille_dots_12356         0x1002837  /* U+2837 BRAILLE PATTERN DOTS-12356 */\n#define XK_braille_dots_456           0x1002838  /* U+2838 BRAILLE PATTERN DOTS-456 */\n#define XK_braille_dots_1456          0x1002839  /* U+2839 BRAILLE PATTERN DOTS-1456 */\n#define XK_braille_dots_2456          0x100283a  /* U+283a BRAILLE PATTERN DOTS-2456 */\n#define XK_braille_dots_12456         0x100283b  /* U+283b BRAILLE PATTERN DOTS-12456 */\n#define XK_braille_dots_3456          0x100283c  /* U+283c BRAILLE PATTERN DOTS-3456 */\n#define XK_braille_dots_13456         0x100283d  /* U+283d BRAILLE PATTERN DOTS-13456 */\n#define XK_braille_dots_23456         0x100283e  /* U+283e BRAILLE PATTERN DOTS-23456 */\n#define XK_braille_dots_123456        0x100283f  /* U+283f BRAILLE PATTERN DOTS-123456 */\n#define XK_braille_dots_7             0x1002840  /* U+2840 BRAILLE PATTERN DOTS-7 */\n#define XK_braille_dots_17            0x1002841  /* U+2841 BRAILLE PATTERN DOTS-17 */\n#define XK_braille_dots_27            0x1002842  /* U+2842 BRAILLE PATTERN DOTS-27 */\n#define XK_braille_dots_127           0x1002843  /* U+2843 BRAILLE PATTERN DOTS-127 */\n#define XK_braille_dots_37            0x1002844  /* U+2844 BRAILLE PATTERN DOTS-37 */\n#define XK_braille_dots_137           0x1002845  /* U+2845 BRAILLE PATTERN DOTS-137 */\n#define XK_braille_dots_237           0x1002846  /* U+2846 BRAILLE PATTERN DOTS-237 */\n#define XK_braille_dots_1237          0x1002847  /* U+2847 BRAILLE PATTERN DOTS-1237 */\n#define XK_braille_dots_47            0x1002848  /* U+2848 BRAILLE PATTERN DOTS-47 */\n#define XK_braille_dots_147           0x1002849  /* U+2849 BRAILLE PATTERN DOTS-147 */\n#define XK_braille_dots_247           0x100284a  /* U+284a BRAILLE PATTERN DOTS-247 */\n#define XK_braille_dots_1247          0x100284b  /* U+284b BRAILLE PATTERN DOTS-1247 */\n#define XK_braille_dots_347           0x100284c  /* U+284c BRAILLE PATTERN DOTS-347 */\n#define XK_braille_dots_1347          0x100284d  /* U+284d BRAILLE PATTERN DOTS-1347 */\n#define XK_braille_dots_2347          0x100284e  /* U+284e BRAILLE PATTERN DOTS-2347 */\n#define XK_braille_dots_12347         0x100284f  /* U+284f BRAILLE PATTERN DOTS-12347 */\n#define XK_braille_dots_57            0x1002850  /* U+2850 BRAILLE PATTERN DOTS-57 */\n#define XK_braille_dots_157           0x1002851  /* U+2851 BRAILLE PATTERN DOTS-157 */\n#define XK_braille_dots_257           0x1002852  /* U+2852 BRAILLE PATTERN DOTS-257 */\n#define XK_braille_dots_1257          0x1002853  /* U+2853 BRAILLE PATTERN DOTS-1257 */\n#define XK_braille_dots_357           0x1002854  /* U+2854 BRAILLE PATTERN DOTS-357 */\n#define XK_braille_dots_1357          0x1002855  /* U+2855 BRAILLE PATTERN DOTS-1357 */\n#define XK_braille_dots_2357          0x1002856  /* U+2856 BRAILLE PATTERN DOTS-2357 */\n#define XK_braille_dots_12357         0x1002857  /* U+2857 BRAILLE PATTERN DOTS-12357 */\n#define XK_braille_dots_457           0x1002858  /* U+2858 BRAILLE PATTERN DOTS-457 */\n#define XK_braille_dots_1457          0x1002859  /* U+2859 BRAILLE PATTERN DOTS-1457 */\n#define XK_braille_dots_2457          0x100285a  /* U+285a BRAILLE PATTERN DOTS-2457 */\n#define XK_braille_dots_12457         0x100285b  /* U+285b BRAILLE PATTERN DOTS-12457 */\n#define XK_braille_dots_3457          0x100285c  /* U+285c BRAILLE PATTERN DOTS-3457 */\n#define XK_braille_dots_13457         0x100285d  /* U+285d BRAILLE PATTERN DOTS-13457 */\n#define XK_braille_dots_23457         0x100285e  /* U+285e BRAILLE PATTERN DOTS-23457 */\n#define XK_braille_dots_123457        0x100285f  /* U+285f BRAILLE PATTERN DOTS-123457 */\n#define XK_braille_dots_67            0x1002860  /* U+2860 BRAILLE PATTERN DOTS-67 */\n#define XK_braille_dots_167           0x1002861  /* U+2861 BRAILLE PATTERN DOTS-167 */\n#define XK_braille_dots_267           0x1002862  /* U+2862 BRAILLE PATTERN DOTS-267 */\n#define XK_braille_dots_1267          0x1002863  /* U+2863 BRAILLE PATTERN DOTS-1267 */\n#define XK_braille_dots_367           0x1002864  /* U+2864 BRAILLE PATTERN DOTS-367 */\n#define XK_braille_dots_1367          0x1002865  /* U+2865 BRAILLE PATTERN DOTS-1367 */\n#define XK_braille_dots_2367          0x1002866  /* U+2866 BRAILLE PATTERN DOTS-2367 */\n#define XK_braille_dots_12367         0x1002867  /* U+2867 BRAILLE PATTERN DOTS-12367 */\n#define XK_braille_dots_467           0x1002868  /* U+2868 BRAILLE PATTERN DOTS-467 */\n#define XK_braille_dots_1467          0x1002869  /* U+2869 BRAILLE PATTERN DOTS-1467 */\n#define XK_braille_dots_2467          0x100286a  /* U+286a BRAILLE PATTERN DOTS-2467 */\n#define XK_braille_dots_12467         0x100286b  /* U+286b BRAILLE PATTERN DOTS-12467 */\n#define XK_braille_dots_3467          0x100286c  /* U+286c BRAILLE PATTERN DOTS-3467 */\n#define XK_braille_dots_13467         0x100286d  /* U+286d BRAILLE PATTERN DOTS-13467 */\n#define XK_braille_dots_23467         0x100286e  /* U+286e BRAILLE PATTERN DOTS-23467 */\n#define XK_braille_dots_123467        0x100286f  /* U+286f BRAILLE PATTERN DOTS-123467 */\n#define XK_braille_dots_567           0x1002870  /* U+2870 BRAILLE PATTERN DOTS-567 */\n#define XK_braille_dots_1567          0x1002871  /* U+2871 BRAILLE PATTERN DOTS-1567 */\n#define XK_braille_dots_2567          0x1002872  /* U+2872 BRAILLE PATTERN DOTS-2567 */\n#define XK_braille_dots_12567         0x1002873  /* U+2873 BRAILLE PATTERN DOTS-12567 */\n#define XK_braille_dots_3567          0x1002874  /* U+2874 BRAILLE PATTERN DOTS-3567 */\n#define XK_braille_dots_13567         0x1002875  /* U+2875 BRAILLE PATTERN DOTS-13567 */\n#define XK_braille_dots_23567         0x1002876  /* U+2876 BRAILLE PATTERN DOTS-23567 */\n#define XK_braille_dots_123567        0x1002877  /* U+2877 BRAILLE PATTERN DOTS-123567 */\n#define XK_braille_dots_4567          0x1002878  /* U+2878 BRAILLE PATTERN DOTS-4567 */\n#define XK_braille_dots_14567         0x1002879  /* U+2879 BRAILLE PATTERN DOTS-14567 */\n#define XK_braille_dots_24567         0x100287a  /* U+287a BRAILLE PATTERN DOTS-24567 */\n#define XK_braille_dots_124567        0x100287b  /* U+287b BRAILLE PATTERN DOTS-124567 */\n#define XK_braille_dots_34567         0x100287c  /* U+287c BRAILLE PATTERN DOTS-34567 */\n#define XK_braille_dots_134567        0x100287d  /* U+287d BRAILLE PATTERN DOTS-134567 */\n#define XK_braille_dots_234567        0x100287e  /* U+287e BRAILLE PATTERN DOTS-234567 */\n#define XK_braille_dots_1234567       0x100287f  /* U+287f BRAILLE PATTERN DOTS-1234567 */\n#define XK_braille_dots_8             0x1002880  /* U+2880 BRAILLE PATTERN DOTS-8 */\n#define XK_braille_dots_18            0x1002881  /* U+2881 BRAILLE PATTERN DOTS-18 */\n#define XK_braille_dots_28            0x1002882  /* U+2882 BRAILLE PATTERN DOTS-28 */\n#define XK_braille_dots_128           0x1002883  /* U+2883 BRAILLE PATTERN DOTS-128 */\n#define XK_braille_dots_38            0x1002884  /* U+2884 BRAILLE PATTERN DOTS-38 */\n#define XK_braille_dots_138           0x1002885  /* U+2885 BRAILLE PATTERN DOTS-138 */\n#define XK_braille_dots_238           0x1002886  /* U+2886 BRAILLE PATTERN DOTS-238 */\n#define XK_braille_dots_1238          0x1002887  /* U+2887 BRAILLE PATTERN DOTS-1238 */\n#define XK_braille_dots_48            0x1002888  /* U+2888 BRAILLE PATTERN DOTS-48 */\n#define XK_braille_dots_148           0x1002889  /* U+2889 BRAILLE PATTERN DOTS-148 */\n#define XK_braille_dots_248           0x100288a  /* U+288a BRAILLE PATTERN DOTS-248 */\n#define XK_braille_dots_1248          0x100288b  /* U+288b BRAILLE PATTERN DOTS-1248 */\n#define XK_braille_dots_348           0x100288c  /* U+288c BRAILLE PATTERN DOTS-348 */\n#define XK_braille_dots_1348          0x100288d  /* U+288d BRAILLE PATTERN DOTS-1348 */\n#define XK_braille_dots_2348          0x100288e  /* U+288e BRAILLE PATTERN DOTS-2348 */\n#define XK_braille_dots_12348         0x100288f  /* U+288f BRAILLE PATTERN DOTS-12348 */\n#define XK_braille_dots_58            0x1002890  /* U+2890 BRAILLE PATTERN DOTS-58 */\n#define XK_braille_dots_158           0x1002891  /* U+2891 BRAILLE PATTERN DOTS-158 */\n#define XK_braille_dots_258           0x1002892  /* U+2892 BRAILLE PATTERN DOTS-258 */\n#define XK_braille_dots_1258          0x1002893  /* U+2893 BRAILLE PATTERN DOTS-1258 */\n#define XK_braille_dots_358           0x1002894  /* U+2894 BRAILLE PATTERN DOTS-358 */\n#define XK_braille_dots_1358          0x1002895  /* U+2895 BRAILLE PATTERN DOTS-1358 */\n#define XK_braille_dots_2358          0x1002896  /* U+2896 BRAILLE PATTERN DOTS-2358 */\n#define XK_braille_dots_12358         0x1002897  /* U+2897 BRAILLE PATTERN DOTS-12358 */\n#define XK_braille_dots_458           0x1002898  /* U+2898 BRAILLE PATTERN DOTS-458 */\n#define XK_braille_dots_1458          0x1002899  /* U+2899 BRAILLE PATTERN DOTS-1458 */\n#define XK_braille_dots_2458          0x100289a  /* U+289a BRAILLE PATTERN DOTS-2458 */\n#define XK_braille_dots_12458         0x100289b  /* U+289b BRAILLE PATTERN DOTS-12458 */\n#define XK_braille_dots_3458          0x100289c  /* U+289c BRAILLE PATTERN DOTS-3458 */\n#define XK_braille_dots_13458         0x100289d  /* U+289d BRAILLE PATTERN DOTS-13458 */\n#define XK_braille_dots_23458         0x100289e  /* U+289e BRAILLE PATTERN DOTS-23458 */\n#define XK_braille_dots_123458        0x100289f  /* U+289f BRAILLE PATTERN DOTS-123458 */\n#define XK_braille_dots_68            0x10028a0  /* U+28a0 BRAILLE PATTERN DOTS-68 */\n#define XK_braille_dots_168           0x10028a1  /* U+28a1 BRAILLE PATTERN DOTS-168 */\n#define XK_braille_dots_268           0x10028a2  /* U+28a2 BRAILLE PATTERN DOTS-268 */\n#define XK_braille_dots_1268          0x10028a3  /* U+28a3 BRAILLE PATTERN DOTS-1268 */\n#define XK_braille_dots_368           0x10028a4  /* U+28a4 BRAILLE PATTERN DOTS-368 */\n#define XK_braille_dots_1368          0x10028a5  /* U+28a5 BRAILLE PATTERN DOTS-1368 */\n#define XK_braille_dots_2368          0x10028a6  /* U+28a6 BRAILLE PATTERN DOTS-2368 */\n#define XK_braille_dots_12368         0x10028a7  /* U+28a7 BRAILLE PATTERN DOTS-12368 */\n#define XK_braille_dots_468           0x10028a8  /* U+28a8 BRAILLE PATTERN DOTS-468 */\n#define XK_braille_dots_1468          0x10028a9  /* U+28a9 BRAILLE PATTERN DOTS-1468 */\n#define XK_braille_dots_2468          0x10028aa  /* U+28aa BRAILLE PATTERN DOTS-2468 */\n#define XK_braille_dots_12468         0x10028ab  /* U+28ab BRAILLE PATTERN DOTS-12468 */\n#define XK_braille_dots_3468          0x10028ac  /* U+28ac BRAILLE PATTERN DOTS-3468 */\n#define XK_braille_dots_13468         0x10028ad  /* U+28ad BRAILLE PATTERN DOTS-13468 */\n#define XK_braille_dots_23468         0x10028ae  /* U+28ae BRAILLE PATTERN DOTS-23468 */\n#define XK_braille_dots_123468        0x10028af  /* U+28af BRAILLE PATTERN DOTS-123468 */\n#define XK_braille_dots_568           0x10028b0  /* U+28b0 BRAILLE PATTERN DOTS-568 */\n#define XK_braille_dots_1568          0x10028b1  /* U+28b1 BRAILLE PATTERN DOTS-1568 */\n#define XK_braille_dots_2568          0x10028b2  /* U+28b2 BRAILLE PATTERN DOTS-2568 */\n#define XK_braille_dots_12568         0x10028b3  /* U+28b3 BRAILLE PATTERN DOTS-12568 */\n#define XK_braille_dots_3568          0x10028b4  /* U+28b4 BRAILLE PATTERN DOTS-3568 */\n#define XK_braille_dots_13568         0x10028b5  /* U+28b5 BRAILLE PATTERN DOTS-13568 */\n#define XK_braille_dots_23568         0x10028b6  /* U+28b6 BRAILLE PATTERN DOTS-23568 */\n#define XK_braille_dots_123568        0x10028b7  /* U+28b7 BRAILLE PATTERN DOTS-123568 */\n#define XK_braille_dots_4568          0x10028b8  /* U+28b8 BRAILLE PATTERN DOTS-4568 */\n#define XK_braille_dots_14568         0x10028b9  /* U+28b9 BRAILLE PATTERN DOTS-14568 */\n#define XK_braille_dots_24568         0x10028ba  /* U+28ba BRAILLE PATTERN DOTS-24568 */\n#define XK_braille_dots_124568        0x10028bb  /* U+28bb BRAILLE PATTERN DOTS-124568 */\n#define XK_braille_dots_34568         0x10028bc  /* U+28bc BRAILLE PATTERN DOTS-34568 */\n#define XK_braille_dots_134568        0x10028bd  /* U+28bd BRAILLE PATTERN DOTS-134568 */\n#define XK_braille_dots_234568        0x10028be  /* U+28be BRAILLE PATTERN DOTS-234568 */\n#define XK_braille_dots_1234568       0x10028bf  /* U+28bf BRAILLE PATTERN DOTS-1234568 */\n#define XK_braille_dots_78            0x10028c0  /* U+28c0 BRAILLE PATTERN DOTS-78 */\n#define XK_braille_dots_178           0x10028c1  /* U+28c1 BRAILLE PATTERN DOTS-178 */\n#define XK_braille_dots_278           0x10028c2  /* U+28c2 BRAILLE PATTERN DOTS-278 */\n#define XK_braille_dots_1278          0x10028c3  /* U+28c3 BRAILLE PATTERN DOTS-1278 */\n#define XK_braille_dots_378           0x10028c4  /* U+28c4 BRAILLE PATTERN DOTS-378 */\n#define XK_braille_dots_1378          0x10028c5  /* U+28c5 BRAILLE PATTERN DOTS-1378 */\n#define XK_braille_dots_2378          0x10028c6  /* U+28c6 BRAILLE PATTERN DOTS-2378 */\n#define XK_braille_dots_12378         0x10028c7  /* U+28c7 BRAILLE PATTERN DOTS-12378 */\n#define XK_braille_dots_478           0x10028c8  /* U+28c8 BRAILLE PATTERN DOTS-478 */\n#define XK_braille_dots_1478          0x10028c9  /* U+28c9 BRAILLE PATTERN DOTS-1478 */\n#define XK_braille_dots_2478          0x10028ca  /* U+28ca BRAILLE PATTERN DOTS-2478 */\n#define XK_braille_dots_12478         0x10028cb  /* U+28cb BRAILLE PATTERN DOTS-12478 */\n#define XK_braille_dots_3478          0x10028cc  /* U+28cc BRAILLE PATTERN DOTS-3478 */\n#define XK_braille_dots_13478         0x10028cd  /* U+28cd BRAILLE PATTERN DOTS-13478 */\n#define XK_braille_dots_23478         0x10028ce  /* U+28ce BRAILLE PATTERN DOTS-23478 */\n#define XK_braille_dots_123478        0x10028cf  /* U+28cf BRAILLE PATTERN DOTS-123478 */\n#define XK_braille_dots_578           0x10028d0  /* U+28d0 BRAILLE PATTERN DOTS-578 */\n#define XK_braille_dots_1578          0x10028d1  /* U+28d1 BRAILLE PATTERN DOTS-1578 */\n#define XK_braille_dots_2578          0x10028d2  /* U+28d2 BRAILLE PATTERN DOTS-2578 */\n#define XK_braille_dots_12578         0x10028d3  /* U+28d3 BRAILLE PATTERN DOTS-12578 */\n#define XK_braille_dots_3578          0x10028d4  /* U+28d4 BRAILLE PATTERN DOTS-3578 */\n#define XK_braille_dots_13578         0x10028d5  /* U+28d5 BRAILLE PATTERN DOTS-13578 */\n#define XK_braille_dots_23578         0x10028d6  /* U+28d6 BRAILLE PATTERN DOTS-23578 */\n#define XK_braille_dots_123578        0x10028d7  /* U+28d7 BRAILLE PATTERN DOTS-123578 */\n#define XK_braille_dots_4578          0x10028d8  /* U+28d8 BRAILLE PATTERN DOTS-4578 */\n#define XK_braille_dots_14578         0x10028d9  /* U+28d9 BRAILLE PATTERN DOTS-14578 */\n#define XK_braille_dots_24578         0x10028da  /* U+28da BRAILLE PATTERN DOTS-24578 */\n#define XK_braille_dots_124578        0x10028db  /* U+28db BRAILLE PATTERN DOTS-124578 */\n#define XK_braille_dots_34578         0x10028dc  /* U+28dc BRAILLE PATTERN DOTS-34578 */\n#define XK_braille_dots_134578        0x10028dd  /* U+28dd BRAILLE PATTERN DOTS-134578 */\n#define XK_braille_dots_234578        0x10028de  /* U+28de BRAILLE PATTERN DOTS-234578 */\n#define XK_braille_dots_1234578       0x10028df  /* U+28df BRAILLE PATTERN DOTS-1234578 */\n#define XK_braille_dots_678           0x10028e0  /* U+28e0 BRAILLE PATTERN DOTS-678 */\n#define XK_braille_dots_1678          0x10028e1  /* U+28e1 BRAILLE PATTERN DOTS-1678 */\n#define XK_braille_dots_2678          0x10028e2  /* U+28e2 BRAILLE PATTERN DOTS-2678 */\n#define XK_braille_dots_12678         0x10028e3  /* U+28e3 BRAILLE PATTERN DOTS-12678 */\n#define XK_braille_dots_3678          0x10028e4  /* U+28e4 BRAILLE PATTERN DOTS-3678 */\n#define XK_braille_dots_13678         0x10028e5  /* U+28e5 BRAILLE PATTERN DOTS-13678 */\n#define XK_braille_dots_23678         0x10028e6  /* U+28e6 BRAILLE PATTERN DOTS-23678 */\n#define XK_braille_dots_123678        0x10028e7  /* U+28e7 BRAILLE PATTERN DOTS-123678 */\n#define XK_braille_dots_4678          0x10028e8  /* U+28e8 BRAILLE PATTERN DOTS-4678 */\n#define XK_braille_dots_14678         0x10028e9  /* U+28e9 BRAILLE PATTERN DOTS-14678 */\n#define XK_braille_dots_24678         0x10028ea  /* U+28ea BRAILLE PATTERN DOTS-24678 */\n#define XK_braille_dots_124678        0x10028eb  /* U+28eb BRAILLE PATTERN DOTS-124678 */\n#define XK_braille_dots_34678         0x10028ec  /* U+28ec BRAILLE PATTERN DOTS-34678 */\n#define XK_braille_dots_134678        0x10028ed  /* U+28ed BRAILLE PATTERN DOTS-134678 */\n#define XK_braille_dots_234678        0x10028ee  /* U+28ee BRAILLE PATTERN DOTS-234678 */\n#define XK_braille_dots_1234678       0x10028ef  /* U+28ef BRAILLE PATTERN DOTS-1234678 */\n#define XK_braille_dots_5678          0x10028f0  /* U+28f0 BRAILLE PATTERN DOTS-5678 */\n#define XK_braille_dots_15678         0x10028f1  /* U+28f1 BRAILLE PATTERN DOTS-15678 */\n#define XK_braille_dots_25678         0x10028f2  /* U+28f2 BRAILLE PATTERN DOTS-25678 */\n#define XK_braille_dots_125678        0x10028f3  /* U+28f3 BRAILLE PATTERN DOTS-125678 */\n#define XK_braille_dots_35678         0x10028f4  /* U+28f4 BRAILLE PATTERN DOTS-35678 */\n#define XK_braille_dots_135678        0x10028f5  /* U+28f5 BRAILLE PATTERN DOTS-135678 */\n#define XK_braille_dots_235678        0x10028f6  /* U+28f6 BRAILLE PATTERN DOTS-235678 */\n#define XK_braille_dots_1235678       0x10028f7  /* U+28f7 BRAILLE PATTERN DOTS-1235678 */\n#define XK_braille_dots_45678         0x10028f8  /* U+28f8 BRAILLE PATTERN DOTS-45678 */\n#define XK_braille_dots_145678        0x10028f9  /* U+28f9 BRAILLE PATTERN DOTS-145678 */\n#define XK_braille_dots_245678        0x10028fa  /* U+28fa BRAILLE PATTERN DOTS-245678 */\n#define XK_braille_dots_1245678       0x10028fb  /* U+28fb BRAILLE PATTERN DOTS-1245678 */\n#define XK_braille_dots_345678        0x10028fc  /* U+28fc BRAILLE PATTERN DOTS-345678 */\n#define XK_braille_dots_1345678       0x10028fd  /* U+28fd BRAILLE PATTERN DOTS-1345678 */\n#define XK_braille_dots_2345678       0x10028fe  /* U+28fe BRAILLE PATTERN DOTS-2345678 */\n#define XK_braille_dots_12345678      0x10028ff  /* U+28ff BRAILLE PATTERN DOTS-12345678 */\n#endif /* XK_BRAILLE */\n\n/*\n * Sinhala (http://unicode.org/charts/PDF/U0D80.pdf)\n * http://www.nongnu.org/sinhala/doc/transliteration/sinhala-transliteration_6.html\n */\n\n#ifdef XK_SINHALA\n#define XK_Sinh_ng            0x1000d82  /* U+0D82 SINHALA ANUSVARAYA */\n#define XK_Sinh_h2            0x1000d83  /* U+0D83 SINHALA VISARGAYA */\n#define XK_Sinh_a             0x1000d85  /* U+0D85 SINHALA AYANNA */\n#define XK_Sinh_aa            0x1000d86  /* U+0D86 SINHALA AAYANNA */\n#define XK_Sinh_ae            0x1000d87  /* U+0D87 SINHALA AEYANNA */\n#define XK_Sinh_aee           0x1000d88  /* U+0D88 SINHALA AEEYANNA */\n#define XK_Sinh_i             0x1000d89  /* U+0D89 SINHALA IYANNA */\n#define XK_Sinh_ii            0x1000d8a  /* U+0D8A SINHALA IIYANNA */\n#define XK_Sinh_u             0x1000d8b  /* U+0D8B SINHALA UYANNA */\n#define XK_Sinh_uu            0x1000d8c  /* U+0D8C SINHALA UUYANNA */\n#define XK_Sinh_ri            0x1000d8d  /* U+0D8D SINHALA IRUYANNA */\n#define XK_Sinh_rii           0x1000d8e  /* U+0D8E SINHALA IRUUYANNA */\n#define XK_Sinh_lu            0x1000d8f  /* U+0D8F SINHALA ILUYANNA */\n#define XK_Sinh_luu           0x1000d90  /* U+0D90 SINHALA ILUUYANNA */\n#define XK_Sinh_e             0x1000d91  /* U+0D91 SINHALA EYANNA */\n#define XK_Sinh_ee            0x1000d92  /* U+0D92 SINHALA EEYANNA */\n#define XK_Sinh_ai            0x1000d93  /* U+0D93 SINHALA AIYANNA */\n#define XK_Sinh_o             0x1000d94  /* U+0D94 SINHALA OYANNA */\n#define XK_Sinh_oo            0x1000d95  /* U+0D95 SINHALA OOYANNA */\n#define XK_Sinh_au            0x1000d96  /* U+0D96 SINHALA AUYANNA */\n#define XK_Sinh_ka            0x1000d9a  /* U+0D9A SINHALA KAYANNA */\n#define XK_Sinh_kha           0x1000d9b  /* U+0D9B SINHALA MAHA. KAYANNA */\n#define XK_Sinh_ga            0x1000d9c  /* U+0D9C SINHALA GAYANNA */\n#define XK_Sinh_gha           0x1000d9d  /* U+0D9D SINHALA MAHA. GAYANNA */\n#define XK_Sinh_ng2           0x1000d9e  /* U+0D9E SINHALA KANTAJA NAASIKYAYA */\n#define XK_Sinh_nga           0x1000d9f  /* U+0D9F SINHALA SANYAKA GAYANNA */\n#define XK_Sinh_ca            0x1000da0  /* U+0DA0 SINHALA CAYANNA */\n#define XK_Sinh_cha           0x1000da1  /* U+0DA1 SINHALA MAHA. CAYANNA */\n#define XK_Sinh_ja            0x1000da2  /* U+0DA2 SINHALA JAYANNA */\n#define XK_Sinh_jha           0x1000da3  /* U+0DA3 SINHALA MAHA. JAYANNA */\n#define XK_Sinh_nya           0x1000da4  /* U+0DA4 SINHALA TAALUJA NAASIKYAYA */\n#define XK_Sinh_jnya          0x1000da5  /* U+0DA5 SINHALA TAALUJA SANYOOGA NAASIKYAYA */\n#define XK_Sinh_nja           0x1000da6  /* U+0DA6 SINHALA SANYAKA JAYANNA */\n#define XK_Sinh_tta           0x1000da7  /* U+0DA7 SINHALA TTAYANNA */\n#define XK_Sinh_ttha          0x1000da8  /* U+0DA8 SINHALA MAHA. TTAYANNA */\n#define XK_Sinh_dda           0x1000da9  /* U+0DA9 SINHALA DDAYANNA */\n#define XK_Sinh_ddha          0x1000daa  /* U+0DAA SINHALA MAHA. DDAYANNA */\n#define XK_Sinh_nna           0x1000dab  /* U+0DAB SINHALA MUURDHAJA NAYANNA */\n#define XK_Sinh_ndda          0x1000dac  /* U+0DAC SINHALA SANYAKA DDAYANNA */\n#define XK_Sinh_tha           0x1000dad  /* U+0DAD SINHALA TAYANNA */\n#define XK_Sinh_thha          0x1000dae  /* U+0DAE SINHALA MAHA. TAYANNA */\n#define XK_Sinh_dha           0x1000daf  /* U+0DAF SINHALA DAYANNA */\n#define XK_Sinh_dhha          0x1000db0  /* U+0DB0 SINHALA MAHA. DAYANNA */\n#define XK_Sinh_na            0x1000db1  /* U+0DB1 SINHALA DANTAJA NAYANNA */\n#define XK_Sinh_ndha          0x1000db3  /* U+0DB3 SINHALA SANYAKA DAYANNA */\n#define XK_Sinh_pa            0x1000db4  /* U+0DB4 SINHALA PAYANNA */\n#define XK_Sinh_pha           0x1000db5  /* U+0DB5 SINHALA MAHA. PAYANNA */\n#define XK_Sinh_ba            0x1000db6  /* U+0DB6 SINHALA BAYANNA */\n#define XK_Sinh_bha           0x1000db7  /* U+0DB7 SINHALA MAHA. BAYANNA */\n#define XK_Sinh_ma            0x1000db8  /* U+0DB8 SINHALA MAYANNA */\n#define XK_Sinh_mba           0x1000db9  /* U+0DB9 SINHALA AMBA BAYANNA */\n#define XK_Sinh_ya            0x1000dba  /* U+0DBA SINHALA YAYANNA */\n#define XK_Sinh_ra            0x1000dbb  /* U+0DBB SINHALA RAYANNA */\n#define XK_Sinh_la            0x1000dbd  /* U+0DBD SINHALA DANTAJA LAYANNA */\n#define XK_Sinh_va            0x1000dc0  /* U+0DC0 SINHALA VAYANNA */\n#define XK_Sinh_sha           0x1000dc1  /* U+0DC1 SINHALA TAALUJA SAYANNA */\n#define XK_Sinh_ssha          0x1000dc2  /* U+0DC2 SINHALA MUURDHAJA SAYANNA */\n#define XK_Sinh_sa            0x1000dc3  /* U+0DC3 SINHALA DANTAJA SAYANNA */\n#define XK_Sinh_ha            0x1000dc4  /* U+0DC4 SINHALA HAYANNA */\n#define XK_Sinh_lla           0x1000dc5  /* U+0DC5 SINHALA MUURDHAJA LAYANNA */\n#define XK_Sinh_fa            0x1000dc6  /* U+0DC6 SINHALA FAYANNA */\n#define XK_Sinh_al            0x1000dca  /* U+0DCA SINHALA AL-LAKUNA */\n#define XK_Sinh_aa2           0x1000dcf  /* U+0DCF SINHALA AELA-PILLA */\n#define XK_Sinh_ae2           0x1000dd0  /* U+0DD0 SINHALA AEDA-PILLA */\n#define XK_Sinh_aee2          0x1000dd1  /* U+0DD1 SINHALA DIGA AEDA-PILLA */\n#define XK_Sinh_i2            0x1000dd2  /* U+0DD2 SINHALA IS-PILLA */\n#define XK_Sinh_ii2           0x1000dd3  /* U+0DD3 SINHALA DIGA IS-PILLA */\n#define XK_Sinh_u2            0x1000dd4  /* U+0DD4 SINHALA PAA-PILLA */\n#define XK_Sinh_uu2           0x1000dd6  /* U+0DD6 SINHALA DIGA PAA-PILLA */\n#define XK_Sinh_ru2           0x1000dd8  /* U+0DD8 SINHALA GAETTA-PILLA */\n#define XK_Sinh_e2            0x1000dd9  /* U+0DD9 SINHALA KOMBUVA */\n#define XK_Sinh_ee2           0x1000dda  /* U+0DDA SINHALA DIGA KOMBUVA */\n#define XK_Sinh_ai2           0x1000ddb  /* U+0DDB SINHALA KOMBU DEKA */\n#define XK_Sinh_o2            0x1000ddc  /* U+0DDC SINHALA KOMBUVA HAA AELA-PILLA*/\n#define XK_Sinh_oo2           0x1000ddd  /* U+0DDD SINHALA KOMBUVA HAA DIGA AELA-PILLA*/\n#define XK_Sinh_au2           0x1000dde  /* U+0DDE SINHALA KOMBUVA HAA GAYANUKITTA */\n#define XK_Sinh_lu2           0x1000ddf  /* U+0DDF SINHALA GAYANUKITTA */\n#define XK_Sinh_ruu2          0x1000df2  /* U+0DF2 SINHALA DIGA GAETTA-PILLA */\n#define XK_Sinh_luu2          0x1000df3  /* U+0DF3 SINHALA DIGA GAYANUKITTA */\n#define XK_Sinh_kunddaliya    0x1000df4  /* U+0DF4 SINHALA KUNDDALIYA */\n#endif /* XK_SINHALA */\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"axe11\"\nPKG_VERSION=\"77813264827823bcbd617ca0f2b2da3e6abb1e7a\"\nPKG_SHA256=\"bcdc27316bba492af9f05d25dc07f2a2ac718807393796fc87b2c794bd458e14\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/JohnnyonFlame/axe11\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gl4es\"\nPKG_LONGDESC=\"A Proof-of-Concept libX11 Shim for Gamemaker Games to run under Box86 with GL4ES (and the necessary set of hacks on top of it).\"\n\npre_configure_target() {\n  sed -i \"s|sdl2-config|${SYSROOT_PREFIX}/usr/bin/sdl2-config|g\" Makefile\n\n# Temp copy the X11 header files\n  cp -r ${PKG_DIR}/X11 ${SYSROOT_PREFIX}/usr/include\n}\n\npost_make_target() {\n# Remove X11 header files\n  rm -rf ${SYSROOT_PREFIX}/usr/include/X11\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/lib\ncp -rf ${PKG_BUILD}/build/libs/*.so ${INSTALL}/usr/lib\n}\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/axe11/patches/01-EmuELEC-compile-fix.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -1,6 +1,6 @@\n-CROSS_PREFIX=arm-linux-gnueabihf-\n-CCACHE?=\n-CC=$(CCACHE) $(CROSS_PREFIX)gcc\n+#CROSS_PREFIX=arm-linux-gnueabihf-\n+#CCACHE?=\n+#CC=$(CCACHE) $(CROSS_PREFIX)gcc\n SDL_CONFIG=$(CROSS_PREFIX)pkg-config sdl2\n \n USE_SDL?=1\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/libglu/gl.pc",
    "content": "prefix=/usr\nexec_prefix=${prefix}\nlibdir=/usr/lib\nincludedir=${prefix}/include\n\nName: gl\nDescription: gl4es gl library\nVersion: 0.1.0\nLibs: -L${libdir} -lGL\nCflags: -I${includedir}\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/libglu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"libglu\"\nPKG_VERSION=\"2fed2bda2b725d2b9e32c435b48d5141cc95827f\"\nPKG_SHA256=\"8a016d32fc1fed742f10ba8e4bc32151598f6273a0dbabec15ba47c44151c879\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/ptitSeb/GLU\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gl4es\"\nPKG_LONGDESC=\" GL4ES is a OpenGL 2.1/1.5 to GL ES 2.0/1.1 translation library, with support for Pandora, ODroid, OrangePI, CHIP, Raspberry PI, Android, Emscripten and AmigaOS4. \"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-static --enable-shared\"\n\npre_configure_target() {\ncp -rf $(get_install_dir gl4es)/usr/lib/libGL.so* ${SYSROOT_PREFIX}/usr/lib/\ncp -rf $(get_build_dir gl4es)/include/GL/gl.h ${SYSROOT_PREFIX}/usr/include/GL/gl.h\ncp -rf ${PKG_DIR}/gl.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n}\n\n\npost_install_target() {\nrm ${SYSROOT_PREFIX}/usr/lib/libGL.so\nrm ${SYSROOT_PREFIX}/usr/include/GL/gl.h\nrm ${SYSROOT_PREFIX}/usr/lib/pkgconfig/gl.pc\n}\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"gl4es\"\nPKG_VERSION=\"83b074dcb0028e239da2ad9789db80cc1d5f2544\"\nPKG_SHA256=\"2031be77b49398cdf945c110e59530a48113c35fd69c0a7381be21fc9eaccc79\"\nPKG_GIT_CLONE_BRANCH=\"sk_hacks\"\nPKG_SITE=\"https://github.com/JohnnyonFlame/gl4es\"\nPKG_LICENSE=\"GPL\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ${OPENGLES}\"\nPKG_LONGDESC=\" GL4ES is a OpenGL 2.1/1.5 to GL ES 2.0/1.1 translation library, with support for Pandora, ODroid, OrangePI, CHIP, Raspberry PI, Android, Emscripten and AmigaOS4. \"\nPKG_TOOLCHAIN=\"cmake-make\"\n\npre_configure_target() {\n\nif [[ \"${DEVICE}\" == \"Amlogic\"* ]]; then\n\tPKG_CMAKE_OPTS_TARGET=\" -DNOX11=1 -DODROID=1 -DGBM=OFF -DCMAKE_BUILD_TYPE=Release \"\nelse\n\tPKG_CMAKE_OPTS_TARGET=\" -DNOX11=1 -DODROID=1 -DGBM=ON -DCMAKE_BUILD_TYPE=Release \"\nfi\n\n}\n\nmakeinstall_target(){\nmkdir -p ${INSTALL}/usr/lib/\ncp ${PKG_BUILD}/lib/libGL.so.1 ${INSTALL}/usr/lib/libGL.so\nln -sf libGL.so ${INSTALL}/usr/lib/libGL.so.1\n}\n\n\n# If we want to install gl4es to toolchain uncomment the following lines, keep in mind GL will now be available fore the build system and some programs might break, like Scummvm Stand Alone\n\n#post_makeinstall_target() {\n#cp -rf ${INSTALL}/usr/lib/libGL.so.1 ${SYSROOT_PREFIX}/usr/lib/libGL.so\n#ln -sf ${SYSROOT_PREFIX}/usr/lib/libGL.so ${SYSROOT_PREFIX}/usr/lib/libGL.so.1\n#cp -rf ${PKG_BUILD}/include/* ${SYSROOT_PREFIX}/usr/include\n#cp -rf ${PKG_DIR}/pkgconfig/gl.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n#}\n"
  },
  {
    "path": "packages/sx05re/tools/video/gl4es/pkgconfig/gl.pc",
    "content": "prefix=/usr\nexec_prefix=${prefix}\nlibdir=/usr/lib\nincludedir=${prefix}/include\n\nName: gl\nDescription: gl4es gl library\nVersion: 0.1.0\nLibs: -L${libdir} -lGL\nCflags: -I${includedir}\n"
  },
  {
    "path": "packages/sx05re/tools/video/imagemagick/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"imagemagick\"\nPKG_VERSION=\"2c4205d20c5495f15d706c26084eb327d4b859bb\"\nPKG_SHA256=\"0d038fa15f28e290bb8850c8fc954bc899b007d1ec1d09b88900d4bc14c53e31\"\nPKG_LICENSE=\"http://www.imagemagick.org/script/license.php\"\nPKG_SITE=\"https://github.com/ImageMagick/ImageMagick\"\nPKG_URL=\"https://github.com/ImageMagick/ImageMagick/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Software suite to create, edit, compose, or convert bitmap images\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-openmp \\\n                           --disable-static \\\n                           --enable-shared \\\n                           --with-pango=no \\\n                           --with-utilities=yes \\\n                           --with-x=no\"\n\nmakeinstall_target() {\n  make install DESTDIR=${INSTALL} ${PKG_MAKEINSTALL_OPTS_TARGET}\n  rm ${INSTALL}/usr/bin/*config\n}\n"
  },
  {
    "path": "packages/sx05re/tools/video/libdvbpsi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"libdvbpsi\"\nPKG_VERSION=\"1.3.0\"\nPKG_SHA256=\"a2fed1d11980662f919bbd1f29e2462719e0f6227e1a531310bd5a706db0a1fe\"\nPKG_REV=\"2\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.videolan.org/developers/libdvbpsi.html\"\nPKG_URL=\"http://download.videolan.org/pub/libdvbpsi/${PKG_VERSION}/libdvbpsi-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"tools\"\nPKG_SHORTDESC=\"library for MPEG TS and DVB PSI tables decoding and generating\"\nPKG_LONGDESC=\"libdvbpsi is a simple library designed for MPEG TS and DVB PSI tables decoding and generating.\"\nPKG_IS_ADDON=\"no\"\nPKG_AUTORECONF=\"yes\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared\"\n"
  },
  {
    "path": "packages/sx05re/tools/video/mpv/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"mpv\"\nPKG_VERSION=\"bb5b4b1ba61b67da40c85c34376aced9383fc366\"\nPKG_SHA256=\"452b0368120be80f9d19c766812e0903245c755d59225efa1dfb4d43da779588\"\nPKG_LICENSE=\"GPLv2+\"\nPKG_SITE=\"https://github.com/mpv-player/mpv\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ffmpeg SDL2 youtube-dl libass\"\nPKG_LONGDESC=\"Video player based on MPlayer/mplayer2 https://mpv.io\"\nPKG_TOOLCHAIN=\"manual\"\n\n\npre_configure_target() {\n\tWAFRELEASE=\"waf-2.0.20\"\n\tWAFURL=\"https://waf.io/${WAFRELEASE}\"\n\t\nif [ ! -e ${SOURCES}/${PKG_NAME}/waf ]; then\n\twget \"${WAFURL}\" -O \"${SOURCES}/${PKG_NAME}/waf\" || echo \"Could not download waf $?\"\n\tchmod +x \"${SOURCES}/${PKG_NAME}/waf\"\nfi\n\ncp ${SOURCES}/${PKG_NAME}/waf ${PKG_BUILD}\n}\n\nconfigure_target() {\n  #./bootstrap.py \n  # the bootstrap was failing for some reason. \n\tcd ${PKG_BUILD}\n \n if [[ \"${DEVICE}\" == \"OdroidGoAdvance\" || \"${DEVICE}\" == \"GameForce\" ]]; then\n  ./waf configure --enable-sdl2 --enable-sdl2-gamepad --disable-pulse --enable-egl --disable-libbluray --enable-drm --disable-gl\n  else\n  ./waf configure --enable-libmpv-shared --enable-sdl2 --enable-sdl2-gamepad --disable-pulse --enable-egl --disable-libbluray --disable-drm --disable-gl\n fi\n}\n\nmake_target() {\n  ./waf build\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp ./build/mpv ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/tools/video/vlc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"vlc\"\nPKG_VERSION=\"3.0.17.4\"\nPKG_SHA256=\"8c5a62d88a4fb45c1b095cf10befef217dfa87aedcec5184b9e7d590b6dd4133\"\nPKG_REV=\"20211025\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.videolan.org\"\nPKG_URL=\"https://download.videolan.org/pub/videolan/${PKG_NAME}/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libdvbpsi gnutls ffmpeg libmpeg2 zlib flac libvorbis libxml2 pulseaudio mpg123-compat x264\"\nPKG_SHORTDESC=\"VideoLAN multimedia player and streamer\"\nPKG_LONGDESC=\"VLC is the VideoLAN project's media player. It plays MPEG, MPEG2, MPEG4, DivX, MOV, WMV, QuickTime, mp3, Ogg/Vorbis files, DVDs, VCDs, and multimedia streams from various network sources.\"\n\n\npre_configure_target() {\n\nENABLED_FEATURES=\"--enable-silent-rules \\\n            --enable-run-as-root \\\n            --enable-sout \\\n            --enable-vlm \\\n            --enable-v4l2 \\\n            --enable-mpc \\\n            --enable-avcodec \\\n            --enable-avformat \\\n            --enable-swscale \\\n            --enable-postproc \\\n            --enable-aa \\\n            --enable-libmpeg2 \\\n            --enable-png \\\n            --enable-jpeg \\\n            --enable-libxml2 \\\n            --enable-alsa \\\n            --enable-udev \\\n            --enable-vlc \\\n            --enable-neon \\\n            --enable-x264 \\\n            --enable-gles2\"\n\nDISABLED_FEATURES=\"--disable-dependency-tracking \\\n            --without-contrib \\\n            --disable-nls \\\n            --disable-rpath \\\n            --disable-dbus \\\n            --disable-gprof \\\n            --disable-cprof \\\n            --disable-debug \\\n            --disable-coverage \\\n            --disable-lua \\\n            --disable-notify \\\n            --disable-taglib \\\n            --disable-live555 \\\n            --disable-dc1394 \\\n            --disable-dvdread \\\n            --disable-dvdnav \\\n            --disable-opencv \\\n            --disable-decklink \\\n            --disable-sftp \\\n            --disable-vcd \\\n            --disable-libcddb \\\n            --disable-dvbpsi \\\n            --disable-screen \\\n            --disable-ogg \\\n            --disable-shout\\\n            --disable-mod \\\n            --disable-gme \\\n            --disable-wma-fixed \\\n            --disable-shine \\\n            --disable-omxil \\\n            --disable-mad \\\n            --disable-merge-ffmpeg \\\n            --disable-faad \\\n            --disable-flac \\\n            --disable-twolame \\\n            --disable-realrtsp \\\n            --disable-libtar \\\n            --disable-a52 \\\n            --disable-dca \\\n            --disable-vorbis \\\n            --disable-tremor \\\n            --disable-speex \\\n            --disable-theora \\\n            --disable-schroedinger \\\n            --disable-fluidsynth \\\n            --disable-zvbi \\\n            --disable-telx \\\n            --disable-libass \\\n            --disable-kate \\\n            --disable-tiger \\\n            --disable-libva \\\n            --disable-vdpau \\\n            --without-x \\\n            --disable-xcb \\\n            --disable-xvideo \\\n            --disable-sdl-image \\\n            --disable-freetype \\\n            --disable-fribidi \\\n            --disable-fontconfig \\\n            --disable-svg \\\n            --disable-directx \\\n            --disable-caca \\\n            --disable-oss \\\n            --disable-jack \\\n            --disable-upnp \\\n            --disable-skins2 \\\n            --disable-kai \\\n            --disable-macosx \\\n            --disable-ncurses \\\n            --disable-goom \\\n            --disable-projectm \\\n            --disable-mtp \\\n            --disable-lirc \\\n            --disable-libgcrypt \\\n            --disable-update-check \\\n            --disable-kva \\\n            --disable-bluray \\\n            --disable-samplerate \\\n            --disable-sid \\\n            --disable-crystalhd \\\n            --disable-dxva2 \\\n            --disable-dav1d \\\n            --disable-qt \\\n            --disable-x26410b \\\n            --disable-chromecast \\\n            --disable-static \\\n            --disable-a52 \\\n            --disable-addonmanagermodules \\\n            --disable-aom \\\n            --disable-aribb25 \\\n            --disable-aribsub \\\n            --disable-asdcp \\\n            --disable-bpg \\\n            --disable-caca \\\n            --disable-chromaprint \\\n            --disable-chromecast \\\n            --disable-crystalhd \\\n            --disable-dc1394 \\\n            --disable-dca \\\n            --disable-decklink \\\n            --disable-dsm \\\n            --disable-dv1394 \\\n            --disable-fluidlite \\\n            --disable-gme \\\n            --disable-goom \\\n            --disable-jack \\\n            --disable-kai \\\n            --disable-kate \\\n            --disable-kva \\\n            --disable-libplacebo \\\n            --disable-linsys \\\n            --disable-mfx \\\n            --disable-microdns \\\n            --disable-mmal \\\n            --disable-mtp \\\n            --disable-notify \\\n            --disable-projectm \\\n            --disable-shine \\\n            --disable-shout \\\n            --disable-sndio \\\n            --disable-spatialaudio \\\n            --disable-srt \\\n            --disable-telx \\\n            --disable-tiger \\\n            --disable-twolame \\\n            --disable-vdpau \\\n            --disable-vsxu \\\n            --disable-wasapi \\\n            --disable-x262 \\\n            --disable-zvbi\"\n\n\tif [ \"${DEVICE}\" == \"Amlogic-old\" ]; then \n\t\tENABLED_FEATURES+=\" --enable-pulse\"\n\telse\n\t\tDISABLED_FEATURES+=\" --disable-pulse\"\n\tfi \n\nPKG_CONFIGURE_OPTS_TARGET=\"${ENABLED_FEATURES} ${DISABLED_FEATURES}\"\n\n\n  export LDFLAGS=\"${LDFLAGS} -lresolv -fopenmp\"\n}\n\npost_makeinstall_target() {\n  rm -fr ${INSTALL}/usr/share/applications\n  rm -fr ${INSTALL}/usr/share/icons\n  rm -fr ${INSTALL}/usr/share/kde4\n  rm -f ${INSTALL}/usr/bin/rvlc\n  rm -f ${INSTALL}/usr/bin/vlc-wrapper\n\n  mkdir -p ${INSTALL}/usr/config\n    mv -f ${INSTALL}/usr/lib/vlc ${INSTALL}/usr/config\n    ln -sf /storage/.config/vlc ${INSTALL}/usr/lib/vlc\n}\n"
  },
  {
    "path": "packages/sx05re/tools/video/youtube-dl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"youtube-dl\"\nPKG_VERSION=\"2024.08.07\"\nPKG_SHA256=\"9d6bd98d082338b9c532631270bfdf74ec1c8e8aa8ee37823d377c8817da7f61\"\nPKG_LICENSE=\"The Unlicense\"\nPKG_SITE=\"https://github.com/ytdl-org/youtube-dl\"\nPKG_URL=\"https://github.com/ytdl-org/ytdl-nightly/releases/download/${PKG_VERSION}/youtube-dl\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Command-line program to download videos from YouTube.com and other video sites\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n:\n}\n\nmakeinstall_target() {\nmkdir -p ${INSTALL}/usr/bin\ncp -rf ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.youtube-dl ${INSTALL}/usr/bin/youtube-dl\nchmod +x ${INSTALL}/usr/bin/youtube-dl\n}\n"
  },
  {
    "path": "packages/sx05re/tools/vksdl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2025-present Diegrosan (https://github.com/Diegrosan)\n#\n\nPKG_NAME=\"vksdl\"\nPKG_VERSION=\"1.0\"\nPKG_REV=\"1\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain libevdev SDL2 SDL2_ttf freetype\"\nPKG_LONGDESC=\"Virtual keyboard daemon for framebuffer devices\"\nPKG_TOOLCHAIN=\"manual\"\n\nconfigure_target() {\n  cp -f ${PKG_DIR}/virtual_keyboard.cpp ${PKG_BUILD}\n}\n\nmake_target() {\n    ${CXX} ${CXXFLAGS} -std=c++11 virtual_keyboard.cpp -o virtual_keyboard \\\n        ${LDFLAGS} \\\n        -lSDL2 \\\n        -lSDL2_ttf \\\n        -lSDL2_image \\\n        -lpng \\\n        -levdev \\\n        -lm\n}\n\nmakeinstall_target() {\n    mkdir -p ${INSTALL}/usr/bin\n    cp virtual_keyboard ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sx05re/tools/vksdl/virtual_keyboard.cpp",
    "content": "// ------------------------------------------------ //  \n// SPDX-License-Identifier: GPL-2.0-or-later       //\n//     Copyright (C) 2025-present BY DIEGROSAN    //\n// --------------------------------------------- //\n\n#include <SDL2/SDL.h>\n#include <SDL2/SDL_ttf.h>\n#include <vector>\n#include <map>\n#include <string>\n#include <linux/uinput.h>\n#include <linux/input.h>\n#include <fcntl.h>\n#include <unistd.h>\n#include <sys/ioctl.h>\n#include <cstring>\n#include <cmath>\n#include <algorithm>\n\n// Variáveis globais para resolução (serão definidas dinamicamente)\nint WINDOW_WIDTH = 1200;\nint WINDOW_HEIGHT = 500;\nint DISPLAY_WIDTH = 0;\nint DISPLAY_HEIGHT = 0;\nint DISPLAY_OFFSET = 2;\n\n// Configurações que dependem da resolução\nint KEY_SIZE = 45;\nint KEY_SPACING = 4;\nint SPECIAL_KEY_WIDTH = 80;\nint ROW_SPACING = 8;\n\nconstexpr int DEAD_ZONE = 8000;\nconstexpr float MOVE_THRESHOLD = 0.5f, ANALOG_SENSITIVITY = 1.5f;\nconstexpr Uint32 REPEAT_DELAY = 150, ANALOG_REPEAT_DELAY = 200;\n\n// Cores\nconstexpr SDL_Color COLORS[] = {\n    {50, 50, 50, 255},      // KEY_COLOR\n    {80, 120, 255, 255},    // KEY_PRESSED_COLOR  \n    {100, 150, 255, 255},   // KEY_SELECTED_COLOR\n    {255, 100, 60, 255},    // KEY_SHIFT_ACTIVE\n    {255, 255, 255, 255},   // TEXT_COLOR\n    {120, 120, 120, 255},   // BORDER_COLOR\n    {255, 255, 255, 255},   // SELECTED_BORDER_COLOR\n    {30, 30, 30, 255}       // PREVIEW_BACKGROUND\n};\n\n// Mapeamento de teclas\nconst std::map<char, int> keymap = {\n    {'a', KEY_A}, {'b', KEY_B}, {'c', KEY_C}, {'d', KEY_D}, {'e', KEY_E},\n    {'f', KEY_F}, {'g', KEY_G}, {'h', KEY_H}, {'i', KEY_I}, {'j', KEY_J},\n    {'k', KEY_K}, {'l', KEY_L}, {'m', KEY_M}, {'n', KEY_N}, {'o', KEY_O},\n    {'p', KEY_P}, {'q', KEY_Q}, {'r', KEY_R}, {'s', KEY_S}, {'t', KEY_T},\n    {'u', KEY_U}, {'v', KEY_V}, {'w', KEY_W}, {'x', KEY_X}, {'y', KEY_Y},\n    {'z', KEY_Z}, {'1', KEY_1}, {'2', KEY_2}, {'3', KEY_3}, {'4', KEY_4},\n    {'5', KEY_5}, {'6', KEY_6}, {'7', KEY_7}, {'8', KEY_8}, {'9', KEY_9},\n    {'0', KEY_0}, {' ', KEY_SPACE}, {'\\b', KEY_BACKSPACE}, {'-', KEY_MINUS},\n    {'=', KEY_EQUAL}, {'[', KEY_LEFTBRACE}, {']', KEY_RIGHTBRACE},\n    {'\\\\', KEY_BACKSLASH}, {';', KEY_SEMICOLON}, {'\\'', KEY_APOSTROPHE},\n    {'`', KEY_GRAVE}, {',', KEY_COMMA}, {'.', KEY_DOT}, {'/', KEY_SLASH},\n    {'\\n', KEY_ENTER}, {'\\t', KEY_TAB},\n    {'!', KEY_1}, {'@', KEY_2}, {'#', KEY_3}, {'$', KEY_4}, {'%', KEY_5},\n    {'^', KEY_6}, {'&', KEY_7}, {'*', KEY_8}, {'(', KEY_9}, {')', KEY_0},\n    {'_', KEY_MINUS}, {'+', KEY_EQUAL},\n    {'{', KEY_LEFTBRACE}, {'}', KEY_RIGHTBRACE},\n    {'|', KEY_BACKSLASH}, {':', KEY_SEMICOLON},\n    {'\"', KEY_APOSTROPHE}, {'~', KEY_GRAVE},\n    {'<', KEY_COMMA}, {'>', KEY_DOT}, {'?', KEY_SLASH}\n};\n\nstruct Key {\n    SDL_Rect rect;\n    char primary, secondary;\n    int keycode;\n    int physical_keycode;\n    bool pressed = false, selected = false, is_special = false, is_shift_key = false;\n    std::string display_text;\n    \n    Key(int x, int y, int w, int h, char p, char s, int kc, int pkc, const std::string& text, \n        bool special = false, bool shift_key = false)\n        : rect{x, y, w, h}, primary(p), secondary(s), keycode(kc), physical_keycode(pkc),\n          is_special(special), is_shift_key(shift_key), display_text(text) {}\n};\n\n// Variáveis globais\nSDL_Window* window = nullptr;\nSDL_Renderer* renderer = nullptr;\nTTF_Font* font = nullptr;\nSDL_GameController* controller = nullptr;\nstd::vector<Key> keys;\nstd::string input_text;\nbool shift_pressed = true, close_requested = false, keyboard_visible = false;\nint selected_key_index = 0, uinput_fd = -1;\nUint32 last_button_time = 0, last_analog_move_time = 0;\nfloat last_axis_x = 0.0f, last_axis_y = 0.0f;\nbool analog_moved = false;\nbool l1_pressed = false;  // Track L1 button state\n\n// Layout do teclado\nconst char* keyboard_rows[] = {\"1234567890-=\", \"!@#$%^&*()_+\", \"qwertyuiop[]\", \"asdfghjkl;'\", \"zxcvbnm,./\"};\n\n// Função para detectar resolução e ajustar tamanhos\nvoid detect_resolution_and_scale() {\n    // Inicializa SDL temporariamente apenas para detectar resolução\n    if (SDL_Init(SDL_INIT_VIDEO) < 0) {\n        printf(\"Erro ao inicializar SDL para detecção de resolução: %s\\n\", SDL_GetError());\n        return;\n    }\n    \n    SDL_DisplayMode display_mode;\n    if (SDL_GetCurrentDisplayMode(0, &display_mode) == 0) {\n        DISPLAY_WIDTH = display_mode.w;\n        DISPLAY_HEIGHT = display_mode.h;\n        \n        printf(\"Resolução detectada: %dx%d\\n\", DISPLAY_WIDTH, DISPLAY_HEIGHT);\n        \n        // Ajusta tamanhos baseado na resolução\n        if (DISPLAY_WIDTH <= 800) {\n            // Telas pequenas (ex: 800x600)\n            WINDOW_WIDTH = DISPLAY_WIDTH - 50;\n            WINDOW_HEIGHT = std::min(400 / DISPLAY_OFFSET, DISPLAY_HEIGHT - 100);\n            KEY_SIZE = 35;\n            KEY_SPACING = 3;\n            SPECIAL_KEY_WIDTH = 60;\n            ROW_SPACING = 6;\n        } else if (DISPLAY_WIDTH <= 1024) {\n            // Telas médias (ex: 1024x768)\n            WINDOW_WIDTH = DISPLAY_WIDTH - 100;\n            WINDOW_HEIGHT = std::min(450 / DISPLAY_OFFSET, DISPLAY_HEIGHT - 100);\n            KEY_SIZE = 40;\n            KEY_SPACING = 4;\n            SPECIAL_KEY_WIDTH = 70;\n            ROW_SPACING = 7;\n        } else if (DISPLAY_WIDTH <= 1366) {\n            // Telas comuns (ex: 1366x768)\n            WINDOW_WIDTH = std::min(1200 / DISPLAY_OFFSET, DISPLAY_WIDTH - 100);\n            WINDOW_HEIGHT = std::min(500, DISPLAY_HEIGHT - 100);\n            KEY_SIZE = 45;\n            KEY_SPACING = 4;\n            SPECIAL_KEY_WIDTH = 80;\n            ROW_SPACING = 8;\n        } else if (DISPLAY_WIDTH <= 1920) {\n            // Full HD\n            WINDOW_WIDTH = std::min(1400 / DISPLAY_OFFSET, DISPLAY_WIDTH - 400);\n            WINDOW_HEIGHT = std::min(600, DISPLAY_HEIGHT - 150);\n            KEY_SIZE = 50;\n            KEY_SPACING = 5;\n            SPECIAL_KEY_WIDTH = 90;\n            ROW_SPACING = 10;\n        } else {\n            // 4K e superiores\n            WINDOW_WIDTH = std::min(1800 / DISPLAY_OFFSET, DISPLAY_WIDTH - 300);\n            WINDOW_HEIGHT = std::min(800, DISPLAY_HEIGHT - 200);\n            KEY_SIZE = 60;\n            KEY_SPACING = 6;\n            SPECIAL_KEY_WIDTH = 110;\n            ROW_SPACING = 12;\n        }\n        \n        printf(\"Janela ajustada para: %dx%d\\n\", WINDOW_WIDTH, WINDOW_HEIGHT);\n        printf(\"Tamanho das teclas: %d pixels\\n\", KEY_SIZE);\n        \n    } else {\n        printf(\"Não foi possível detectar resolução, usando valores padrão\\n\");\n        DISPLAY_WIDTH = 800 / DISPLAY_OFFSET;\n        DISPLAY_HEIGHT = 500;\n    }\n    \n    SDL_Quit(); // Finaliza SDL temporária\n}\n\nint setup_uinput() {\n    uinput_fd = open(\"/dev/uinput\", O_WRONLY | O_NONBLOCK);\n    if (uinput_fd < 0) uinput_fd = open(\"/dev/input/uinput\", O_WRONLY | O_NONBLOCK);\n    if (uinput_fd < 0) return -1;\n    \n    ioctl(uinput_fd, UI_SET_EVBIT, EV_KEY);\n    ioctl(uinput_fd, UI_SET_EVBIT, EV_SYN);\n\n    for (const auto& k : keymap) ioctl(uinput_fd, UI_SET_KEYBIT, k.second);\n    \n    int special_keys[] = {KEY_LEFTSHIFT, KEY_RIGHTSHIFT, KEY_LEFTCTRL, KEY_LEFTALT, KEY_ESC, KEY_TAB};\n    for (int key : special_keys) ioctl(uinput_fd, UI_SET_KEYBIT, key);\n    \n    struct uinput_user_dev uidev = {};\n    snprintf(uidev.name, UINPUT_MAX_NAME_SIZE, \"Teclado Virtual Gamepad\");\n    uidev.id = {BUS_USB, 0x6264, 0x5678, 100};\n    \n    if (write(uinput_fd, &uidev, sizeof(uidev)) < 0 || ioctl(uinput_fd, UI_DEV_CREATE) < 0) {\n        close(uinput_fd);\n        return -1;\n    }\n    \n    usleep(100000);\n    return 0;\n}\n\nvoid send_key_event(int keycode, bool pressed) {\n    if (uinput_fd < 0) return;\n    struct input_event ev = {};\n    gettimeofday(&ev.time, nullptr);\n    ev.type = EV_KEY;\n    ev.code = keycode;\n    ev.value = pressed ? 1 : 0;\n    write(uinput_fd, &ev, sizeof(ev));\n    ev.type = EV_SYN;\n    ev.code = SYN_REPORT;\n    ev.value = 0;\n    write(uinput_fd, &ev, sizeof(ev));\n}\n\nvoid update_preview() {\n    if (!keys.empty()) {\n        keys[0].display_text = input_text.empty() ? \"Preview...\" : input_text;\n    }\n}\n\nvoid create_keyboard_layout() {\n    keys.clear();\n    input_text.clear();\n    \n    // Área de preview - ajustada proporcionalmente\n    int preview_width = (WINDOW_WIDTH - 100) * 2 / 3;\n    \n    keys.emplace_back((WINDOW_WIDTH - preview_width) / 2, 20, preview_width, KEY_SIZE + 15, '\\0', '\\0', 0, 0, \"Preview...\", true);\n    \n    int y = 20 + KEY_SIZE + 35; // Ajustado baseado no preview\n    \n    // Teclas especiais\n    struct {int w; char c; int k; const char* t; bool shift;} special_keys[] = {\n        {SPECIAL_KEY_WIDTH, 'X', KEY_ESC, \"CLOSE\", false},\n        {SPECIAL_KEY_WIDTH, '\\t', KEY_TAB, \"TAB\", false},\n        {SPECIAL_KEY_WIDTH, '^', KEY_LEFTSHIFT, \"SHIFT\", true},\n        {SPECIAL_KEY_WIDTH, '\\b', KEY_BACKSPACE, \"DEL\", false}\n    };\n    \n    int special_total_width = 4 * SPECIAL_KEY_WIDTH + 3 * KEY_SPACING;\n    int special_start_x = (WINDOW_WIDTH - special_total_width) / 2;\n    \n    for (int i = 0; i < 4; i++) {\n        auto& sk = special_keys[i];\n        keys.emplace_back(special_start_x + i * (SPECIAL_KEY_WIDTH + KEY_SPACING), y, \n                         sk.w, KEY_SIZE, sk.c, sk.c, sk.k, sk.k, sk.t, true, sk.shift);\n    }\n    y += KEY_SIZE + ROW_SPACING;\n    \n    // Linhas do teclado\n    for (int row = 0; row < 5; row++) {\n        const char* row_chars = keyboard_rows[row];\n        int key_count = strlen(row_chars);\n        int row_width = key_count * KEY_SIZE + (key_count - 1) * KEY_SPACING;\n        int row_start_x = (WINDOW_WIDTH - row_width) / 2;\n        \n        for (int i = 0; i < key_count; i++) {\n            char primary = row_chars[i];\n            auto it = keymap.find(primary);\n            if (it != keymap.end()) {\n                int kc = it->second;\n                keys.emplace_back(row_start_x + i * (KEY_SIZE + KEY_SPACING), y, KEY_SIZE, KEY_SIZE,\n                                primary, primary, kc, kc, std::string(1, primary));\n            }\n        }\n        y += KEY_SIZE + ROW_SPACING;\n    }\n    \n    // Barra de espaço e Enter\n    int space_width = KEY_SIZE * 6;\n    int space_x = (WINDOW_WIDTH - space_width - KEY_SPACING - SPECIAL_KEY_WIDTH) / 2;\n    keys.emplace_back(space_x, y, space_width, KEY_SIZE, ' ', ' ', KEY_SPACE, KEY_SPACE, \"ESPACE\", true);\n    keys.emplace_back(space_x + space_width + KEY_SPACING, y, SPECIAL_KEY_WIDTH, KEY_SIZE, \n                     '\\n', '\\n', KEY_ENTER, KEY_ENTER, \"ENTER\", true);\n    \n    if (!keys.empty()) {\n        selected_key_index = 2;\n        keys[selected_key_index].selected = true;\n    }\n}\n\nvoid update_key_display() {\n    for (auto& key : keys) {\n        if (!key.is_special && key.display_text.length() == 1) {\n            char original_char = key.primary;\n            \n            // Para letras (a-z), converta para maiúscula quando shift pressionado\n            if (original_char >= 'a' && original_char <= 'z') {\n                key.display_text = shift_pressed ? std::string(1, original_char - 'a' + 'A') : std::string(1, original_char);\n            }\n            // Para números, símbolos e outros caracteres, manter fixos\n            else {\n                key.display_text = std::string(1, original_char);\n            }\n        }\n    }\n    update_preview();\n}\n\nvoid render_key(const Key& key) {\n    if (&key == &keys[0]) {\n        // Área de preview\n        SDL_SetRenderDrawColor(renderer, COLORS[7].r, COLORS[7].g, COLORS[7].b, COLORS[7].a);\n        SDL_RenderFillRect(renderer, &key.rect);\n        \n        SDL_SetRenderDrawColor(renderer, COLORS[5].r, COLORS[5].g, COLORS[5].b, COLORS[5].a);\n        SDL_RenderDrawRect(renderer, &key.rect);\n        \n        if (font) {\n            SDL_Surface* surface = TTF_RenderUTF8_Blended(font, key.display_text.c_str(), COLORS[4]);\n            if (surface) {\n                SDL_Texture* texture = SDL_CreateTextureFromSurface(renderer, surface);\n                if (texture) {\n                    SDL_Rect text_rect = {key.rect.x + 10, key.rect.y + (key.rect.h - surface->h) / 2,\n                                         surface->w, surface->h};\n                    SDL_RenderCopy(renderer, texture, nullptr, &text_rect);\n                    SDL_DestroyTexture(texture);\n                }\n                SDL_FreeSurface(surface);\n            }\n        }\n        return;\n    }\n    \n    SDL_Color color = COLORS[key.is_shift_key && shift_pressed ? 3 : \n                            key.pressed ? 1 : key.selected ? 2 : 0];\n    \n    SDL_SetRenderDrawColor(renderer, color.r, color.g, color.b, color.a);\n    SDL_RenderFillRect(renderer, &key.rect);\n    \n    SDL_SetRenderDrawColor(renderer, COLORS[5].r, COLORS[5].g, COLORS[5].b, COLORS[5].a);\n    SDL_RenderDrawRect(renderer, &key.rect);\n    \n    if (key.selected) {\n        SDL_Rect border = {key.rect.x - 2, key.rect.y - 2, key.rect.w + 4, key.rect.h + 4};\n        SDL_SetRenderDrawColor(renderer, COLORS[6].r, COLORS[6].g, COLORS[6].b, COLORS[6].a);\n        SDL_RenderDrawRect(renderer, &border);\n        border = {key.rect.x - 1, key.rect.y - 1, key.rect.w + 2, key.rect.h + 2};\n        SDL_RenderDrawRect(renderer, &border);\n    }\n    \n    if (!font || key.display_text.empty()) return;\n    \n    SDL_Surface* surface = TTF_RenderUTF8_Blended(font, key.display_text.c_str(), COLORS[4]);\n    if (!surface) return;\n    \n    SDL_Texture* texture = SDL_CreateTextureFromSurface(renderer, surface);\n    if (texture) {\n        SDL_Rect text_rect = {key.rect.x + (key.rect.w - surface->w) / 2,\n                             key.rect.y + (key.rect.h - surface->h) / 2,\n                             surface->w, surface->h};\n        SDL_RenderCopy(renderer, texture, nullptr, &text_rect);\n        SDL_DestroyTexture(texture);\n    }\n    SDL_FreeSurface(surface);\n}\n\nvoid handle_key_action(int index, bool press) {\n    if (index < 0 || index >= (int)keys.size()) return;\n    \n    Key& key = keys[index];\n    key.pressed = press;\n    \n    if (press) {\n        if (key.display_text == \"CLOSE\") {\n            close_requested = true;\n        } else if (key.is_shift_key) {\n            shift_pressed = !shift_pressed;\n            update_key_display();\n        } else if (key.display_text == \"DEL\" && !input_text.empty()) {\n            input_text.pop_back();\n            update_preview();\n            send_key_event(KEY_BACKSPACE, true);\n        } else if (key.display_text == \"ESPACE\") {\n            input_text += ' ';\n            update_preview();\n            send_key_event(KEY_SPACE, true);\n        } else if (key.display_text == \"ENTER\") {\n            input_text += '\\n';\n            update_preview();\n            send_key_event(KEY_ENTER, true);\n        } else if (key.display_text == \"TAB\") {\n            input_text += '\\t';\n            update_preview();\n            send_key_event(KEY_TAB, true);\n        } else if (key.primary != '\\0') {\n            char to_add;\n            \n            // Para letras, use maiúscula/minúscula baseado no shift\n            if (key.primary >= 'a' && key.primary <= 'z') {\n                to_add = shift_pressed ? (key.primary - 'a' + 'A') : key.primary;\n            }\n            // Para números, símbolos e outros caracteres, manter o original\n            else {\n                to_add = key.primary;\n            }\n            \n            input_text += to_add;\n            update_preview();\n            \n            // Enviar evento do teclado\n            bool needs_shift = false;\n            int keycode_to_send = key.physical_keycode;\n            \n            // Verificar se precisa do shift para letras maiúsculas\n            if (shift_pressed && key.primary >= 'a' && key.primary <= 'z') {\n                needs_shift = true;\n            }\n            \n            if (needs_shift) {\n                send_key_event(KEY_LEFTSHIFT, true);\n            }\n            send_key_event(keycode_to_send, true);\n        }\n    } else {\n        if (key.display_text == \"DEL\") {\n            send_key_event(KEY_BACKSPACE, false);\n        } else if (key.display_text == \"ESPACE\") {\n            send_key_event(KEY_SPACE, false);\n        } else if (key.display_text == \"ENTER\") {\n            send_key_event(KEY_ENTER, false);\n        } else if (key.display_text == \"TAB\") {\n            send_key_event(KEY_TAB, false);\n        } else if (key.primary != '\\0' && key.display_text != \"CLOSE\") {\n            bool needs_shift = false;\n            \n            // Verificar se precisa do shift para letras maiúsculas\n            if (shift_pressed && key.primary >= 'a' && key.primary <= 'z') {\n                needs_shift = true;\n            }\n            \n            send_key_event(key.physical_keycode, false);\n            if (needs_shift) {\n                send_key_event(KEY_LEFTSHIFT, false);\n            }\n        }\n    }\n}\n\nvoid navigate_keys(int dir) {\n    if (keys.empty() || !keyboard_visible) return;\n    \n    keys[selected_key_index].selected = false;\n    const SDL_Rect& curr = keys[selected_key_index].rect;\n    int best = selected_key_index;\n    float best_score = 999999.0f;\n    \n    for (size_t i = 0; i < keys.size(); i++) {\n        if (i == (size_t)selected_key_index) continue;\n        \n        const SDL_Rect& tgt = keys[i].rect;\n        int dx = tgt.x + tgt.w/2 - (curr.x + curr.w/2);\n        int dy = tgt.y + tgt.h/2 - (curr.y + curr.h/2);\n        \n        bool valid = false;\n        float score = 0;\n        \n        switch (dir) {\n            case 0: if (dy < -5) { valid = true; score = -dy + abs(dx) * 0.5f; } break; // Up\n            case 1: if (dy > 5) { valid = true; score = dy + abs(dx) * 0.5f; } break;   // Down\n            case 2: if (dx < -5) { valid = true; score = -dx + abs(dy) * 0.5f; } break; // Left\n            case 3: if (dx > 5) { valid = true; score = dx + abs(dy) * 0.5f; } break;   // Right\n        }\n        \n        if (valid && score < best_score) {\n            best_score = score;\n            best = i;\n        }\n    }\n    \n    selected_key_index = best;\n    keys[selected_key_index].selected = true;\n}\n\nvoid handle_analog_movement(float x, float y) {\n    if (!keyboard_visible) return;\n    \n    Uint32 now = SDL_GetTicks();\n    \n    if (fabs(x) < MOVE_THRESHOLD && fabs(y) < MOVE_THRESHOLD) {\n        analog_moved = false;\n        return;\n    }\n    \n    if (analog_moved && (now - last_analog_move_time < ANALOG_REPEAT_DELAY)) return;\n    \n    int dir = (fabs(x) > fabs(y)) ? (x > MOVE_THRESHOLD ? 3 : 2) : (y > MOVE_THRESHOLD ? 1 : 0);\n    navigate_keys(dir);\n    \n    analog_moved = true;\n    last_analog_move_time = now;\n}\n\nbool load_font() {\n    const char* font_paths[] = {\n        \"/usr/share/fonts/truetype/liberation/LiberationSans-Bold.ttf\",\n        \"/usr/share/fonts/liberation/LiberationSans-Bold.ttf\",\n        \"/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf\",\n        \"/usr/share/fonts/TTF/DejaVuSans-Bold.ttf\",\n        \"/storage/.config/emuelec/configs/Font.ttf\",\n        \"/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf\",\n        \"arial.ttf\"\n    };\n\n    // Ajusta tamanho da fonte baseado na resolução\n    int font_size = 16;\n    if (DISPLAY_WIDTH <= 800) font_size = 12;\n    else if (DISPLAY_WIDTH <= 1024) font_size = 14;\n    else if (DISPLAY_WIDTH >= 1920) font_size = 18;\n\n    for (const char* path : font_paths) {\n        font = TTF_OpenFont(path, font_size);\n        if (font) return true;\n    }\n    return false;\n}\n\nbool init_system() {\n    if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) < 0 || TTF_Init() == -1) return false;\n    \n    for (int i = 0; i < SDL_NumJoysticks(); i++) {\n        if (SDL_IsGameController(i) && (controller = SDL_GameControllerOpen(i))) break;\n    }\n    \n    SDL_SetHint(SDL_HINT_FRAMEBUFFER_ACCELERATION, \"1\");\n    SDL_SetHint(SDL_HINT_RENDER_DRIVER, \"opengles\");\n    \n    SDL_Rect display;\n    SDL_GetDisplayBounds(0, &display);\n    \n    window = SDL_CreateWindow(\"Teclado Virtual\", \n                             display.x + (display.w - WINDOW_WIDTH) / 2, 0,\n                             WINDOW_WIDTH, WINDOW_HEIGHT,\n                             SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS);\n    \n    if (!window) return false;\n    \n    renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);\n    if (!renderer) return false;\n    \n    SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND);\n    return load_font();\n}\n\nvoid cleanup() {\n    if (controller) SDL_GameControllerClose(controller);\n    if (renderer) SDL_DestroyRenderer(renderer);\n    if (window) SDL_DestroyWindow(window);\n    if (font) TTF_CloseFont(font);\n    TTF_Quit();\n    SDL_Quit();\n    \n    if (uinput_fd >= 0) {\n        ioctl(uinput_fd, UI_DEV_DESTROY);\n        close(uinput_fd);\n    }\n}\n\nint main() {\n    // Detecta resolução antes de inicializar sistema\n    detect_resolution_and_scale();\n    \n    if (!init_system()) return 1;\n    \n    if (setup_uinput() < 0) printf(\"Executando sem uinput (apenas local)\\n\");\n    \n    create_keyboard_layout();\n    update_key_display();\n    \n    printf(\"By DiegroSan Teclado virtual iniciado!\\n\");\n    printf(\"Resolução: %dx%d | Janela: %dx%d | Teclas: %dpx\\n\", \n           DISPLAY_WIDTH, DISPLAY_HEIGHT, WINDOW_WIDTH, WINDOW_HEIGHT, KEY_SIZE);\n    printf(\"Controles: Analógico/Setas=navegar, A/Enter=tecla, R3/L3=mostrar/ocultar, L1+Up=mostrar/ocultar\\n\");\n    \n    SDL_Event event;\n    while (!close_requested) {\n        Uint32 now = SDL_GetTicks();\n        \n        while (SDL_PollEvent(&event)) {\n            switch (event.type) {\n                case SDL_QUIT: \n                    close_requested = true;\n                    break;\n                    \n                case SDL_KEYDOWN:\n                    if (!keyboard_visible) break;\n                    if (now - last_button_time <= REPEAT_DELAY) break;\n                    switch (event.key.keysym.sym) {\n                        case SDLK_UP: navigate_keys(0); break;\n                        case SDLK_DOWN: navigate_keys(1); break;\n                        case SDLK_LEFT: navigate_keys(2); break;\n                        case SDLK_RIGHT: navigate_keys(3); break;\n                        case SDLK_RETURN: \n                            handle_key_action(selected_key_index, true);\n                            break;\n                        case SDLK_ESCAPE: close_requested = true; break;\n                    }\n                    last_button_time = now;\n                    break;\n                    \n                case SDL_KEYUP:\n                    if (!keyboard_visible) break;\n                    if (event.key.keysym.sym == SDLK_RETURN) {\n                        handle_key_action(selected_key_index, false);\n                    }\n                    break;  \n                case SDL_CONTROLLERBUTTONUP:\n                    if (event.cbutton.button == SDL_CONTROLLER_BUTTON_A && keyboard_visible) {\n                        handle_key_action(selected_key_index, false);\n                    } else if (event.cbutton.button == SDL_CONTROLLER_BUTTON_LEFTSHOULDER) {\n                        l1_pressed = false;  // Track L1 release\n                    }\n                    break;\n                    \n                case SDL_CONTROLLERAXISMOTION:\n                    if (event.caxis.axis == SDL_CONTROLLER_AXIS_LEFTX || \n                        event.caxis.axis == SDL_CONTROLLER_AXIS_LEFTY) {\n                        float val = event.caxis.value / 32768.0f;\n                        if (fabs(val) < DEAD_ZONE / 32768.0f) val = 0.0f;\n                        else val = (val - (DEAD_ZONE / 32768.0f * (val > 0 ? 1 : -1))) / (1.0f - DEAD_ZONE / 32768.0f);\n                        \n                        if (event.caxis.axis == SDL_CONTROLLER_AXIS_LEFTX) last_axis_x = val * ANALOG_SENSITIVITY;\n                        else last_axis_y = val * ANALOG_SENSITIVITY;\n                        \n                        handle_analog_movement(last_axis_x, last_axis_y);\n                    }\n                    break;\n\n                case SDL_CONTROLLERBUTTONDOWN:\n                    if (now - last_button_time <= REPEAT_DELAY) break;\n                    if (event.cbutton.button == SDL_CONTROLLER_BUTTON_A) {\n                        if (keyboard_visible) {\n                            handle_key_action(selected_key_index, true);\n                        }\n                    } else if (event.cbutton.button == SDL_CONTROLLER_BUTTON_LEFTSHOULDER) {\n                        l1_pressed = true;  // Track L1 press\n                    } else if (event.cbutton.button == SDL_CONTROLLER_BUTTON_RIGHTSTICK ||\n                              event.cbutton.button == SDL_CONTROLLER_BUTTON_LEFTSTICK) {\n                        keyboard_visible = !keyboard_visible;\n                        printf(\"Teclado %s\\n\", keyboard_visible ? \"visível\" : \"oculto\");\n                    } else if (l1_pressed) {\n                        // Tratar combinação L1 + D-pad\n                        if (event.cbutton.button == SDL_CONTROLLER_BUTTON_DPAD_UP) {\n                            keyboard_visible = !keyboard_visible;\n                            printf(\"Teclado %s (L1+D-pad Up)\\n\", keyboard_visible ? \"visível\" : \"oculto\");\n                            l1_pressed = false; // Reset para evitar toggles rápidos\n                        }\n                    }\n                    last_button_time = now;\n                    break;\n            }\n        }\n        \n        // Renderização\n        SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0);\n        SDL_RenderClear(renderer);\n        \n        if (keyboard_visible) {\n            for (const auto& key : keys) render_key(key);\n        }\n        \n        SDL_RenderPresent(renderer);\n        SDL_Delay(16);\n    }\n    \n    cleanup();\n    return 0;\n}\n"
  },
  {
    "path": "packages/sysutils/bash/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"bash\"\nPKG_VERSION=\"5.2.15\"\nPKG_SHA256=\"13720965b5f4fc3a0d4b61dd37e7565c741da9a5be24edc2ae00182fc1b3588c\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.gnu.org/software/bash/\"\nPKG_URL=\"https://ftp.gnu.org/gnu/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses readline\"\nPKG_LONGDESC=\"Bash is the GNU Project shell - the Bourne Again SHell.\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory busybox)\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-curses \\\n                           --without-bash-malloc \\\n                           --with-installed-readline \\\n                             bash_cv_getcwd_malloc=yes \\\n                             bash_cv_printf_a_format=yes \\\n                             bash_cv_func_sigsetjmp=present \\\n                             bash_cv_sys_named_pipes=present\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp bash  ${INSTALL}/usr/bin\n}\n\npost_makeinstall_target() {\n  ln -sf /usr/bin/bash ${INSTALL}/usr/bin/sh\n}\n"
  },
  {
    "path": "packages/sysutils/bkeymaps/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"bkeymaps\"\nPKG_VERSION=\"1.13\"\nPKG_SHA256=\"59d41ddb0c7a92d8ac155a82ed2875b7880c8957ea4308afa633c8b81e5b8887\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.alpinelinux.org\"\nPKG_URL=\"http://dev.alpinelinux.org/archive/bkeymaps/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain busybox\"\nPKG_LONGDESC=\"bkeymaps: binary keyboard maps for busybox\"\n\nmakeinstall_init() {\n  makeinstall_target\n}\n\nmake_target() {\n  : # nothing todo, we install manually\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/keymaps\n    cp -PR bkeymaps/* ${INSTALL}/usr/lib/keymaps\n}\n"
  },
  {
    "path": "packages/sysutils/busybox/config/busybox-init.conf",
    "content": "#\n# Automatically generated make config: don't edit\n# Busybox version: 1.32.1\n# Fri Feb  5 01:01:29 2021\n#\nCONFIG_HAVE_DOT_CONFIG=y\n\n#\n# Settings\n#\n# CONFIG_DESKTOP is not set\n# CONFIG_EXTRA_COMPAT is not set\n# CONFIG_FEDORA_COMPAT is not set\n# CONFIG_INCLUDE_SUSv2 is not set\nCONFIG_LONG_OPTS=y\nCONFIG_SHOW_USAGE=y\nCONFIG_FEATURE_VERBOSE_USAGE=y\n# CONFIG_FEATURE_COMPRESS_USAGE is not set\nCONFIG_LFS=y\n# CONFIG_PAM is not set\nCONFIG_FEATURE_DEVPTS=y\n# CONFIG_FEATURE_UTMP is not set\n# CONFIG_FEATURE_WTMP is not set\n# CONFIG_FEATURE_PIDFILE is not set\nCONFIG_PID_FILE_PATH=\"\"\nCONFIG_BUSYBOX=y\nCONFIG_FEATURE_SHOW_SCRIPT=y\n# CONFIG_FEATURE_INSTALLER is not set\nCONFIG_INSTALL_NO_USR=y\n# CONFIG_FEATURE_SUID is not set\n# CONFIG_FEATURE_SUID_CONFIG is not set\n# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set\nCONFIG_FEATURE_PREFER_APPLETS=y\nCONFIG_BUSYBOX_EXEC_PATH=\"/proc/self/exe\"\n# CONFIG_SELINUX is not set\n# CONFIG_FEATURE_CLEAN_UP is not set\n# CONFIG_FEATURE_SYSLOG_INFO is not set\n# CONFIG_FEATURE_SYSLOG is not set\nCONFIG_PLATFORM_LINUX=y\n\n#\n# Build Options\n#\n# CONFIG_STATIC is not set\n# CONFIG_PIE is not set\n# CONFIG_NOMMU is not set\n# CONFIG_BUILD_LIBBUSYBOX is not set\n# CONFIG_FEATURE_LIBBUSYBOX_STATIC is not set\n# CONFIG_FEATURE_INDIVIDUAL is not set\n# CONFIG_FEATURE_SHARED_BUSYBOX is not set\nCONFIG_CROSS_COMPILER_PREFIX=\"\"\nCONFIG_SYSROOT=\"\"\nCONFIG_EXTRA_CFLAGS=\"\"\nCONFIG_EXTRA_LDFLAGS=\"\"\nCONFIG_EXTRA_LDLIBS=\"-ltirpc -lpthread\"\n# CONFIG_USE_PORTABLE_CODE is not set\n# CONFIG_STACK_OPTIMIZATION_386 is not set\n\n#\n# Installation Options (\"make install\" behavior)\n#\n# CONFIG_INSTALL_APPLET_SYMLINKS is not set\n# CONFIG_INSTALL_APPLET_HARDLINKS is not set\n# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set\nCONFIG_INSTALL_APPLET_DONT=y\n# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set\n# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set\n# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set\nCONFIG_PREFIX=\"./_install-initramfs\"\n\n#\n# Debugging Options\n#\n# CONFIG_DEBUG is not set\n# CONFIG_DEBUG_PESSIMIZE is not set\n# CONFIG_DEBUG_SANITIZE is not set\n# CONFIG_UNIT_TEST is not set\n# CONFIG_WERROR is not set\n# CONFIG_WARN_SIMPLE_MSG is not set\nCONFIG_NO_DEBUG_LIB=y\n# CONFIG_DMALLOC is not set\n# CONFIG_EFENCE is not set\n\n#\n# Library Tuning\n#\n# CONFIG_FEATURE_USE_BSS_TAIL is not set\nCONFIG_FLOAT_DURATION=y\n# CONFIG_FEATURE_RTMINMAX is not set\n# CONFIG_FEATURE_RTMINMAX_USE_LIBC_DEFINITIONS is not set\n# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set\nCONFIG_FEATURE_BUFFERS_GO_ON_STACK=y\n# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set\nCONFIG_PASSWORD_MINLEN=6\nCONFIG_MD5_SMALL=0\nCONFIG_SHA3_SMALL=0\nCONFIG_FEATURE_FAST_TOP=y\n# CONFIG_FEATURE_ETC_NETWORKS is not set\n# CONFIG_FEATURE_ETC_SERVICES is not set\nCONFIG_FEATURE_EDITING=y\nCONFIG_FEATURE_EDITING_MAX_LEN=1024\n# CONFIG_FEATURE_EDITING_VI is not set\nCONFIG_FEATURE_EDITING_HISTORY=15\n# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set\n# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set\n# CONFIG_FEATURE_REVERSE_SEARCH is not set\nCONFIG_FEATURE_TAB_COMPLETION=y\n# CONFIG_FEATURE_USERNAME_COMPLETION is not set\n# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set\n# CONFIG_FEATURE_EDITING_WINCH is not set\n# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set\n# CONFIG_LOCALE_SUPPORT is not set\nCONFIG_UNICODE_SUPPORT=y\n# CONFIG_UNICODE_USING_LOCALE is not set\n# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set\nCONFIG_SUBST_WCHAR=63\nCONFIG_LAST_SUPPORTED_WCHAR=767\n# CONFIG_UNICODE_COMBINING_WCHARS is not set\n# CONFIG_UNICODE_WIDE_WCHARS is not set\n# CONFIG_UNICODE_BIDI_SUPPORT is not set\n# CONFIG_UNICODE_NEUTRAL_TABLE is not set\n# CONFIG_UNICODE_PRESERVE_BROKEN is not set\n# CONFIG_FEATURE_NON_POSIX_CP is not set\nCONFIG_FEATURE_VERBOSE_CP_MESSAGE=y\nCONFIG_FEATURE_USE_SENDFILE=y\nCONFIG_FEATURE_COPYBUF_KB=4\nCONFIG_FEATURE_SKIP_ROOTFS=y\n# CONFIG_MONOTONIC_SYSCALL is not set\n# CONFIG_IOCTL_HEX2STR_ERROR is not set\n# CONFIG_FEATURE_HWIB is not set\n\n#\n# Applets\n#\n\n#\n# Archival Utilities\n#\nCONFIG_FEATURE_SEAMLESS_XZ=y\nCONFIG_FEATURE_SEAMLESS_LZMA=y\nCONFIG_FEATURE_SEAMLESS_BZ2=y\nCONFIG_FEATURE_SEAMLESS_GZ=y\n# CONFIG_FEATURE_SEAMLESS_Z is not set\n# CONFIG_AR is not set\n# CONFIG_FEATURE_AR_LONG_FILENAMES is not set\n# CONFIG_FEATURE_AR_CREATE is not set\n# CONFIG_UNCOMPRESS is not set\nCONFIG_GUNZIP=y\n# CONFIG_ZCAT is not set\n# CONFIG_FEATURE_GUNZIP_LONG_OPTIONS is not set\n# CONFIG_BUNZIP2 is not set\n# CONFIG_BZCAT is not set\n# CONFIG_UNLZMA is not set\n# CONFIG_LZCAT is not set\n# CONFIG_LZMA is not set\n# CONFIG_UNXZ is not set\n# CONFIG_XZCAT is not set\n# CONFIG_XZ is not set\n# CONFIG_BZIP2 is not set\nCONFIG_BZIP2_SMALL=0\n# CONFIG_FEATURE_BZIP2_DECOMPRESS is not set\n# CONFIG_CPIO is not set\n# CONFIG_FEATURE_CPIO_O is not set\n# CONFIG_FEATURE_CPIO_P is not set\n# CONFIG_DPKG is not set\n# CONFIG_DPKG_DEB is not set\nCONFIG_GZIP=y\n# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set\nCONFIG_GZIP_FAST=0\nCONFIG_FEATURE_GZIP_LEVELS=y\nCONFIG_FEATURE_GZIP_DECOMPRESS=y\n# CONFIG_LZOP is not set\n# CONFIG_UNLZOP is not set\n# CONFIG_LZOPCAT is not set\n# CONFIG_LZOP_COMPR_HIGH is not set\n# CONFIG_RPM is not set\n# CONFIG_RPM2CPIO is not set\nCONFIG_TAR=y\n# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set\n# CONFIG_FEATURE_TAR_CREATE is not set\nCONFIG_FEATURE_TAR_AUTODETECT=y\n# CONFIG_FEATURE_TAR_FROM is not set\n# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set\n# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set\nCONFIG_FEATURE_TAR_GNU_EXTENSIONS=y\n# CONFIG_FEATURE_TAR_TO_COMMAND is not set\n# CONFIG_FEATURE_TAR_UNAME_GNAME is not set\n# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set\n# CONFIG_FEATURE_TAR_SELINUX is not set\n# CONFIG_UNZIP is not set\n# CONFIG_FEATURE_UNZIP_CDF is not set\n# CONFIG_FEATURE_UNZIP_BZIP2 is not set\n# CONFIG_FEATURE_UNZIP_LZMA is not set\n# CONFIG_FEATURE_UNZIP_XZ is not set\n# CONFIG_FEATURE_LZMA_FAST is not set\n\n#\n# Coreutils\n#\nCONFIG_BASENAME=y\nCONFIG_CAT=y\nCONFIG_FEATURE_CATN=y\n# CONFIG_FEATURE_CATV is not set\n# CONFIG_CHGRP is not set\n# CONFIG_CHMOD is not set\n# CONFIG_CHOWN is not set\n# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set\nCONFIG_CHROOT=y\n# CONFIG_CKSUM is not set\n# CONFIG_COMM is not set\nCONFIG_CP=y\n# CONFIG_FEATURE_CP_LONG_OPTIONS is not set\n# CONFIG_FEATURE_CP_REFLINK is not set\nCONFIG_CUT=y\n# CONFIG_DATE is not set\n# CONFIG_FEATURE_DATE_ISOFMT is not set\n# CONFIG_FEATURE_DATE_NANO is not set\n# CONFIG_FEATURE_DATE_COMPAT is not set\nCONFIG_DD=y\nCONFIG_FEATURE_DD_SIGNAL_HANDLING=y\nCONFIG_FEATURE_DD_THIRD_STATUS_LINE=y\nCONFIG_FEATURE_DD_IBS_OBS=y\nCONFIG_FEATURE_DD_STATUS=y\nCONFIG_DF=y\n# CONFIG_FEATURE_DF_FANCY is not set\n# CONFIG_DIRNAME is not set\n# CONFIG_DOS2UNIX is not set\n# CONFIG_UNIX2DOS is not set\n# CONFIG_DU is not set\n# CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K is not set\n# CONFIG_ECHO is not set\nCONFIG_FEATURE_FANCY_ECHO=y\n# CONFIG_ENV is not set\n# CONFIG_EXPAND is not set\n# CONFIG_UNEXPAND is not set\n# CONFIG_EXPR is not set\n# CONFIG_EXPR_MATH_SUPPORT_64 is not set\n# CONFIG_FACTOR is not set\n# CONFIG_FALSE is not set\n# CONFIG_FOLD is not set\nCONFIG_HEAD=y\n# CONFIG_FEATURE_FANCY_HEAD is not set\n# CONFIG_HOSTID is not set\n# CONFIG_ID is not set\n# CONFIG_GROUPS is not set\n# CONFIG_INSTALL is not set\n# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set\n# CONFIG_LINK is not set\n# CONFIG_LN is not set\n# CONFIG_LOGNAME is not set\nCONFIG_LS=y\n# CONFIG_FEATURE_LS_FILETYPES is not set\n# CONFIG_FEATURE_LS_FOLLOWLINKS is not set\n# CONFIG_FEATURE_LS_RECURSIVE is not set\n# CONFIG_FEATURE_LS_WIDTH is not set\n# CONFIG_FEATURE_LS_SORTFILES is not set\n# CONFIG_FEATURE_LS_TIMESTAMPS is not set\n# CONFIG_FEATURE_LS_USERNAME is not set\n# CONFIG_FEATURE_LS_COLOR is not set\n# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set\nCONFIG_MD5SUM=y\n# CONFIG_SHA1SUM is not set\n# CONFIG_SHA256SUM is not set\n# CONFIG_SHA512SUM is not set\n# CONFIG_SHA3SUM is not set\n\n#\n# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum\n#\nCONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y\nCONFIG_MKDIR=y\n# CONFIG_MKFIFO is not set\nCONFIG_MKNOD=y\n# CONFIG_MKTEMP is not set\nCONFIG_MV=y\nCONFIG_NICE=y\n# CONFIG_NL is not set\n# CONFIG_NOHUP is not set\n# CONFIG_NPROC is not set\n# CONFIG_OD is not set\n# CONFIG_PASTE is not set\n# CONFIG_PRINTENV is not set\n# CONFIG_PRINTF is not set\n# CONFIG_PWD is not set\n# CONFIG_READLINK is not set\n# CONFIG_FEATURE_READLINK_FOLLOW is not set\n# CONFIG_REALPATH is not set\nCONFIG_RM=y\n# CONFIG_RMDIR is not set\n# CONFIG_SEQ is not set\n# CONFIG_SHRED is not set\n# CONFIG_SHUF is not set\nCONFIG_SLEEP=y\n# CONFIG_FEATURE_FANCY_SLEEP is not set\n# CONFIG_SORT is not set\n# CONFIG_FEATURE_SORT_BIG is not set\n# CONFIG_FEATURE_SORT_OPTIMIZE_MEMORY is not set\n# CONFIG_SPLIT is not set\n# CONFIG_FEATURE_SPLIT_FANCY is not set\nCONFIG_STAT=y\n# CONFIG_FEATURE_STAT_FORMAT is not set\n# CONFIG_FEATURE_STAT_FILESYSTEM is not set\n# CONFIG_STTY is not set\n# CONFIG_SUM is not set\nCONFIG_SYNC=y\nCONFIG_FEATURE_SYNC_FANCY=y\n# CONFIG_FSYNC is not set\n# CONFIG_TAC is not set\nCONFIG_TAIL=y\nCONFIG_FEATURE_FANCY_TAIL=y\nCONFIG_TEE=y\nCONFIG_FEATURE_TEE_USE_BLOCK_IO=y\n# CONFIG_TEST is not set\n# CONFIG_TEST1 is not set\n# CONFIG_TEST2 is not set\nCONFIG_FEATURE_TEST_64=y\n# CONFIG_TIMEOUT is not set\n# CONFIG_TOUCH is not set\n# CONFIG_FEATURE_TOUCH_NODEREF is not set\n# CONFIG_FEATURE_TOUCH_SUSV3 is not set\nCONFIG_TR=y\nCONFIG_FEATURE_TR_CLASSES=y\nCONFIG_FEATURE_TR_EQUIV=y\n# CONFIG_TRUE is not set\n# CONFIG_TRUNCATE is not set\n# CONFIG_TTY is not set\nCONFIG_UNAME=y\nCONFIG_UNAME_OSNAME=\"GNU/Linux\"\n# CONFIG_BB_ARCH is not set\n# CONFIG_UNIQ is not set\n# CONFIG_UNLINK is not set\nCONFIG_USLEEP=y\n# CONFIG_UUDECODE is not set\n# CONFIG_BASE64 is not set\n# CONFIG_UUENCODE is not set\n# CONFIG_WC is not set\n# CONFIG_FEATURE_WC_LARGE is not set\n# CONFIG_WHO is not set\n# CONFIG_W is not set\n# CONFIG_USERS is not set\n# CONFIG_WHOAMI is not set\n# CONFIG_YES is not set\n\n#\n# Common options\n#\n# CONFIG_FEATURE_VERBOSE is not set\n\n#\n# Common options for cp and mv\n#\n# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set\n\n#\n# Common options for df, du, ls\n#\n# CONFIG_FEATURE_HUMAN_READABLE is not set\n\n#\n# Console Utilities\n#\nCONFIG_CHVT=y\nCONFIG_CLEAR=y\n# CONFIG_DEALLOCVT is not set\n# CONFIG_DUMPKMAP is not set\n# CONFIG_FGCONSOLE is not set\n# CONFIG_KBD_MODE is not set\n# CONFIG_LOADFONT is not set\nCONFIG_SETFONT=y\n# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set\nCONFIG_DEFAULT_SETFONT_DIR=\"/usr/share\"\n\n#\n# Common options for loadfont and setfont\n#\nCONFIG_FEATURE_LOADFONT_PSF2=y\n# CONFIG_FEATURE_LOADFONT_RAW is not set\nCONFIG_LOADKMAP=y\n# CONFIG_OPENVT is not set\n# CONFIG_RESET is not set\n# CONFIG_RESIZE is not set\n# CONFIG_FEATURE_RESIZE_PRINT is not set\n# CONFIG_SETCONSOLE is not set\n# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set\n# CONFIG_SETKEYCODES is not set\n# CONFIG_SETLOGCONS is not set\n# CONFIG_SHOWKEY is not set\n\n#\n# Debian Utilities\n#\n# CONFIG_PIPE_PROGRESS is not set\n# CONFIG_RUN_PARTS is not set\n# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set\n# CONFIG_FEATURE_RUN_PARTS_FANCY is not set\n# CONFIG_START_STOP_DAEMON is not set\n# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set\n# CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set\n# CONFIG_WHICH is not set\n\n#\n# klibc-utils\n#\n# CONFIG_MINIPS is not set\n# CONFIG_NUKE is not set\n# CONFIG_RESUME is not set\n# CONFIG_RUN_INIT is not set\n\n#\n# Editors\n#\nCONFIG_AWK=y\n# CONFIG_FEATURE_AWK_LIBM is not set\nCONFIG_FEATURE_AWK_GNU_EXTENSIONS=y\n# CONFIG_CMP is not set\n# CONFIG_DIFF is not set\n# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set\n# CONFIG_FEATURE_DIFF_DIR is not set\n# CONFIG_ED is not set\n# CONFIG_PATCH is not set\nCONFIG_SED=y\nCONFIG_VI=y\nCONFIG_FEATURE_VI_MAX_LEN=4096\n# CONFIG_FEATURE_VI_8BIT is not set\nCONFIG_FEATURE_VI_COLON=y\nCONFIG_FEATURE_VI_YANKMARK=y\nCONFIG_FEATURE_VI_SEARCH=y\n# CONFIG_FEATURE_VI_REGEX_SEARCH is not set\nCONFIG_FEATURE_VI_USE_SIGNALS=y\nCONFIG_FEATURE_VI_DOT_CMD=y\nCONFIG_FEATURE_VI_READONLY=y\nCONFIG_FEATURE_VI_SETOPTS=y\nCONFIG_FEATURE_VI_SET=y\nCONFIG_FEATURE_VI_WIN_RESIZE=y\nCONFIG_FEATURE_VI_ASK_TERMINAL=y\nCONFIG_FEATURE_VI_UNDO=y\nCONFIG_FEATURE_VI_UNDO_QUEUE=y\nCONFIG_FEATURE_VI_UNDO_QUEUE_MAX=256\nCONFIG_FEATURE_ALLOW_EXEC=y\n\n#\n# Finding Utilities\n#\n# CONFIG_FIND is not set\n# CONFIG_FEATURE_FIND_PRINT0 is not set\n# CONFIG_FEATURE_FIND_MTIME is not set\n# CONFIG_FEATURE_FIND_MMIN is not set\n# CONFIG_FEATURE_FIND_PERM is not set\n# CONFIG_FEATURE_FIND_TYPE is not set\n# CONFIG_FEATURE_FIND_EXECUTABLE is not set\n# CONFIG_FEATURE_FIND_XDEV is not set\n# CONFIG_FEATURE_FIND_MAXDEPTH is not set\n# CONFIG_FEATURE_FIND_NEWER is not set\n# CONFIG_FEATURE_FIND_INUM is not set\n# CONFIG_FEATURE_FIND_EXEC is not set\n# CONFIG_FEATURE_FIND_EXEC_PLUS is not set\n# CONFIG_FEATURE_FIND_USER is not set\n# CONFIG_FEATURE_FIND_GROUP is not set\n# CONFIG_FEATURE_FIND_NOT is not set\n# CONFIG_FEATURE_FIND_DEPTH is not set\n# CONFIG_FEATURE_FIND_PAREN is not set\n# CONFIG_FEATURE_FIND_SIZE is not set\n# CONFIG_FEATURE_FIND_PRUNE is not set\n# CONFIG_FEATURE_FIND_QUIT is not set\n# CONFIG_FEATURE_FIND_DELETE is not set\n# CONFIG_FEATURE_FIND_EMPTY is not set\n# CONFIG_FEATURE_FIND_PATH is not set\n# CONFIG_FEATURE_FIND_REGEX is not set\n# CONFIG_FEATURE_FIND_CONTEXT is not set\n# CONFIG_FEATURE_FIND_LINKS is not set\nCONFIG_GREP=y\n# CONFIG_EGREP is not set\n# CONFIG_FGREP is not set\nCONFIG_FEATURE_GREP_CONTEXT=y\n# CONFIG_XARGS is not set\n# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set\n# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set\n# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set\n# CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM is not set\n# CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR is not set\n# CONFIG_FEATURE_XARGS_SUPPORT_PARALLEL is not set\n# CONFIG_FEATURE_XARGS_SUPPORT_ARGS_FILE is not set\n\n#\n# Init Utilities\n#\n# CONFIG_BOOTCHARTD is not set\n# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set\n# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set\nCONFIG_HALT=y\nCONFIG_POWEROFF=y\nCONFIG_REBOOT=y\nCONFIG_FEATURE_WAIT_FOR_INIT=y\n# CONFIG_FEATURE_CALL_TELINIT is not set\nCONFIG_TELINIT_PATH=\"\"\n# CONFIG_INIT is not set\n# CONFIG_LINUXRC is not set\n# CONFIG_FEATURE_USE_INITTAB is not set\n# CONFIG_FEATURE_KILL_REMOVED is not set\nCONFIG_FEATURE_KILL_DELAY=0\n# CONFIG_FEATURE_INIT_SCTTY is not set\n# CONFIG_FEATURE_INIT_SYSLOG is not set\n# CONFIG_FEATURE_INIT_QUIET is not set\n# CONFIG_FEATURE_INIT_COREDUMPS is not set\nCONFIG_INIT_TERMINAL_TYPE=\"\"\n# CONFIG_FEATURE_INIT_MODIFY_CMDLINE is not set\n\n#\n# Login/Password Management Utilities\n#\n# CONFIG_FEATURE_SHADOWPASSWDS is not set\n# CONFIG_USE_BB_PWD_GRP is not set\n# CONFIG_USE_BB_SHADOW is not set\n# CONFIG_USE_BB_CRYPT is not set\n# CONFIG_USE_BB_CRYPT_SHA is not set\n# CONFIG_ADD_SHELL is not set\n# CONFIG_REMOVE_SHELL is not set\n# CONFIG_ADDGROUP is not set\n# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set\n# CONFIG_ADDUSER is not set\n# CONFIG_FEATURE_CHECK_NAMES is not set\nCONFIG_LAST_ID=0\nCONFIG_FIRST_SYSTEM_ID=0\nCONFIG_LAST_SYSTEM_ID=0\n# CONFIG_CHPASSWD is not set\nCONFIG_FEATURE_DEFAULT_PASSWD_ALGO=\"\"\n# CONFIG_CRYPTPW is not set\n# CONFIG_MKPASSWD is not set\n# CONFIG_DELUSER is not set\n# CONFIG_DELGROUP is not set\n# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set\n# CONFIG_GETTY is not set\n# CONFIG_LOGIN is not set\n# CONFIG_LOGIN_SESSION_AS_CHILD is not set\n# CONFIG_LOGIN_SCRIPTS is not set\n# CONFIG_FEATURE_NOLOGIN is not set\n# CONFIG_FEATURE_SECURETTY is not set\n# CONFIG_PASSWD is not set\n# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set\n# CONFIG_SU is not set\n# CONFIG_FEATURE_SU_SYSLOG is not set\n# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set\n# CONFIG_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY is not set\n# CONFIG_SULOGIN is not set\n# CONFIG_VLOCK is not set\n\n#\n# Linux Ext2 FS Progs\n#\n# CONFIG_CHATTR is not set\n# CONFIG_FSCK is not set\n# CONFIG_LSATTR is not set\n# CONFIG_TUNE2FS is not set\n\n#\n# Linux Module Utilities\n#\n# CONFIG_MODPROBE_SMALL is not set\n# CONFIG_DEPMOD is not set\nCONFIG_INSMOD=y\n# CONFIG_LSMOD is not set\n# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set\n# CONFIG_MODINFO is not set\n# CONFIG_MODPROBE is not set\n# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set\n# CONFIG_RMMOD is not set\n\n#\n# Options common to multiple modutils\n#\n# CONFIG_FEATURE_CMDLINE_MODULE_OPTIONS is not set\n# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set\n# CONFIG_FEATURE_2_4_MODULES is not set\n# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set\n# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set\n# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set\n# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set\n# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set\n# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set\n# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set\n# CONFIG_FEATURE_MODUTILS_ALIAS is not set\n# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set\nCONFIG_DEFAULT_MODULES_DIR=\"\"\nCONFIG_DEFAULT_DEPMOD_FILE=\"\"\n\n#\n# Linux System Utilities\n#\n# CONFIG_ACPID is not set\n# CONFIG_FEATURE_ACPID_COMPAT is not set\n# CONFIG_BLKDISCARD is not set\nCONFIG_BLKID=y\nCONFIG_FEATURE_BLKID_TYPE=y\n# CONFIG_BLOCKDEV is not set\n# CONFIG_CAL is not set\n# CONFIG_CHRT is not set\nCONFIG_DMESG=y\n# CONFIG_FEATURE_DMESG_PRETTY is not set\n# CONFIG_EJECT is not set\n# CONFIG_FEATURE_EJECT_SCSI is not set\n# CONFIG_FALLOCATE is not set\n# CONFIG_FATATTR is not set\nCONFIG_FBSET=y\nCONFIG_FEATURE_FBSET_FANCY=y\nCONFIG_FEATURE_FBSET_READMODE=y\n# CONFIG_FDFORMAT is not set\nCONFIG_FDISK=y\n# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set\nCONFIG_FEATURE_FDISK_WRITABLE=y\n# CONFIG_FEATURE_AIX_LABEL is not set\n# CONFIG_FEATURE_SGI_LABEL is not set\n# CONFIG_FEATURE_SUN_LABEL is not set\n# CONFIG_FEATURE_OSF_LABEL is not set\nCONFIG_FEATURE_GPT_LABEL=y\n# CONFIG_FEATURE_FDISK_ADVANCED is not set\n# CONFIG_FINDFS is not set\n# CONFIG_FLOCK is not set\n# CONFIG_FDFLUSH is not set\n# CONFIG_FREERAMDISK is not set\n# CONFIG_FSCK_MINIX is not set\n# CONFIG_FSFREEZE is not set\n# CONFIG_FSTRIM is not set\n# CONFIG_GETOPT is not set\n# CONFIG_FEATURE_GETOPT_LONG is not set\n# CONFIG_HEXDUMP is not set\n# CONFIG_FEATURE_HEXDUMP_REVERSE is not set\n# CONFIG_HD is not set\n# CONFIG_XXD is not set\n# CONFIG_HWCLOCK is not set\n# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set\nCONFIG_IONICE=y\n# CONFIG_IPCRM is not set\n# CONFIG_IPCS is not set\n# CONFIG_LAST is not set\n# CONFIG_FEATURE_LAST_FANCY is not set\nCONFIG_LOSETUP=y\n# CONFIG_LSPCI is not set\n# CONFIG_LSUSB is not set\n# CONFIG_MDEV is not set\n# CONFIG_FEATURE_MDEV_CONF is not set\n# CONFIG_FEATURE_MDEV_RENAME is not set\n# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set\n# CONFIG_FEATURE_MDEV_EXEC is not set\n# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set\n# CONFIG_FEATURE_MDEV_DAEMON is not set\n# CONFIG_MESG is not set\n# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set\n# CONFIG_MKE2FS is not set\n# CONFIG_MKFS_EXT2 is not set\n# CONFIG_MKFS_MINIX is not set\n# CONFIG_FEATURE_MINIX2 is not set\n# CONFIG_MKFS_REISER is not set\n# CONFIG_MKDOSFS is not set\n# CONFIG_MKFS_VFAT is not set\n# CONFIG_MKSWAP is not set\n# CONFIG_FEATURE_MKSWAP_UUID is not set\n# CONFIG_MORE is not set\nCONFIG_MOUNT=y\nCONFIG_FEATURE_MOUNT_FAKE=y\n# CONFIG_FEATURE_MOUNT_VERBOSE is not set\n# CONFIG_FEATURE_MOUNT_HELPERS is not set\nCONFIG_FEATURE_MOUNT_LABEL=y\n# CONFIG_FEATURE_MOUNT_NFS is not set\n# CONFIG_FEATURE_MOUNT_CIFS is not set\nCONFIG_FEATURE_MOUNT_FLAGS=y\n# CONFIG_FEATURE_MOUNT_FSTAB is not set\n# CONFIG_FEATURE_MOUNT_OTHERTAB is not set\nCONFIG_MOUNTPOINT=y\n# CONFIG_NOLOGIN is not set\n# CONFIG_NOLOGIN_DEPENDENCIES is not set\n# CONFIG_NSENTER is not set\n# CONFIG_PIVOT_ROOT is not set\n# CONFIG_RDATE is not set\n# CONFIG_RDEV is not set\n# CONFIG_READPROFILE is not set\n# CONFIG_RENICE is not set\n# CONFIG_REV is not set\n# CONFIG_RTCWAKE is not set\n# CONFIG_SCRIPT is not set\n# CONFIG_SCRIPTREPLAY is not set\n# CONFIG_SETARCH is not set\n# CONFIG_LINUX32 is not set\n# CONFIG_LINUX64 is not set\n# CONFIG_SETPRIV is not set\n# CONFIG_FEATURE_SETPRIV_DUMP is not set\n# CONFIG_FEATURE_SETPRIV_CAPABILITIES is not set\n# CONFIG_FEATURE_SETPRIV_CAPABILITY_NAMES is not set\nCONFIG_SETSID=y\n# CONFIG_SWAPON is not set\n# CONFIG_FEATURE_SWAPON_DISCARD is not set\n# CONFIG_FEATURE_SWAPON_PRI is not set\n# CONFIG_SWAPOFF is not set\n# CONFIG_FEATURE_SWAPONOFF_LABEL is not set\nCONFIG_SWITCH_ROOT=y\n# CONFIG_TASKSET is not set\n# CONFIG_FEATURE_TASKSET_FANCY is not set\n# CONFIG_FEATURE_TASKSET_CPULIST is not set\nCONFIG_UEVENT=y\nCONFIG_UMOUNT=y\nCONFIG_FEATURE_UMOUNT_ALL=y\n# CONFIG_UNSHARE is not set\n# CONFIG_WALL is not set\n\n#\n# Common options for mount/umount\n#\nCONFIG_FEATURE_MOUNT_LOOP=y\nCONFIG_FEATURE_MOUNT_LOOP_CREATE=y\n# CONFIG_FEATURE_MTAB_SUPPORT is not set\nCONFIG_VOLUMEID=y\n\n#\n# Filesystem/Volume identification\n#\n# CONFIG_FEATURE_VOLUMEID_BCACHE is not set\nCONFIG_FEATURE_VOLUMEID_BTRFS=y\nCONFIG_FEATURE_VOLUMEID_CRAMFS=y\nCONFIG_FEATURE_VOLUMEID_EXFAT=y\nCONFIG_FEATURE_VOLUMEID_EXT=y\nCONFIG_FEATURE_VOLUMEID_F2FS=y\nCONFIG_FEATURE_VOLUMEID_FAT=y\nCONFIG_FEATURE_VOLUMEID_HFS=y\nCONFIG_FEATURE_VOLUMEID_ISO9660=y\nCONFIG_FEATURE_VOLUMEID_JFS=y\n# CONFIG_FEATURE_VOLUMEID_LFS is not set\nCONFIG_FEATURE_VOLUMEID_LINUXRAID=y\nCONFIG_FEATURE_VOLUMEID_LINUXSWAP=y\nCONFIG_FEATURE_VOLUMEID_LUKS=y\nCONFIG_FEATURE_VOLUMEID_MINIX=y\nCONFIG_FEATURE_VOLUMEID_NILFS=y\nCONFIG_FEATURE_VOLUMEID_NTFS=y\nCONFIG_FEATURE_VOLUMEID_OCFS2=y\nCONFIG_FEATURE_VOLUMEID_REISERFS=y\nCONFIG_FEATURE_VOLUMEID_ROMFS=y\nCONFIG_FEATURE_VOLUMEID_SQUASHFS=y\nCONFIG_FEATURE_VOLUMEID_SYSV=y\nCONFIG_FEATURE_VOLUMEID_UBIFS=y\nCONFIG_FEATURE_VOLUMEID_UDF=y\nCONFIG_FEATURE_VOLUMEID_XFS=y\n\n#\n# Miscellaneous Utilities\n#\n# CONFIG_ADJTIMEX is not set\n# CONFIG_BBCONFIG is not set\n# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set\n# CONFIG_BC is not set\n# CONFIG_DC is not set\n# CONFIG_FEATURE_DC_BIG is not set\n# CONFIG_FEATURE_DC_LIBM is not set\n# CONFIG_FEATURE_BC_INTERACTIVE is not set\n# CONFIG_FEATURE_BC_LONG_OPTIONS is not set\n# CONFIG_BEEP is not set\nCONFIG_FEATURE_BEEP_FREQ=0\nCONFIG_FEATURE_BEEP_LENGTH_MS=0\n# CONFIG_CHAT is not set\n# CONFIG_FEATURE_CHAT_NOFAIL is not set\n# CONFIG_FEATURE_CHAT_TTY_HIFI is not set\n# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set\n# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set\n# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set\n# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set\n# CONFIG_FEATURE_CHAT_CLR_ABORT is not set\n# CONFIG_CONSPY is not set\n# CONFIG_CROND is not set\n# CONFIG_FEATURE_CROND_D is not set\n# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set\n# CONFIG_FEATURE_CROND_SPECIAL_TIMES is not set\nCONFIG_FEATURE_CROND_DIR=\"\"\n# CONFIG_CRONTAB is not set\n# CONFIG_DEVFSD is not set\n# CONFIG_DEVFSD_MODLOAD is not set\n# CONFIG_DEVFSD_FG_NP is not set\n# CONFIG_DEVFSD_VERBOSE is not set\n# CONFIG_FEATURE_DEVFS is not set\n# CONFIG_DEVMEM is not set\n# CONFIG_FBSPLASH is not set\nCONFIG_FLASH_ERASEALL=y\n# CONFIG_FLASH_LOCK is not set\n# CONFIG_FLASH_UNLOCK is not set\n# CONFIG_FLASHCP is not set\n# CONFIG_HDPARM is not set\n# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set\n# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set\n# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set\n# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set\n# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set\n# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set\n# CONFIG_HEXEDIT is not set\n# CONFIG_I2CGET is not set\n# CONFIG_I2CSET is not set\n# CONFIG_I2CDUMP is not set\n# CONFIG_I2CDETECT is not set\n# CONFIG_I2CTRANSFER is not set\n# CONFIG_INOTIFYD is not set\nCONFIG_LESS=y\nCONFIG_FEATURE_LESS_MAXLINES=9999999\n# CONFIG_FEATURE_LESS_BRACKETS is not set\n# CONFIG_FEATURE_LESS_FLAGS is not set\n# CONFIG_FEATURE_LESS_TRUNCATE is not set\n# CONFIG_FEATURE_LESS_MARKS is not set\n# CONFIG_FEATURE_LESS_REGEXP is not set\n# CONFIG_FEATURE_LESS_WINCH is not set\n# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set\n# CONFIG_FEATURE_LESS_DASHCMD is not set\n# CONFIG_FEATURE_LESS_LINENUMS is not set\n# CONFIG_FEATURE_LESS_RAW is not set\n# CONFIG_FEATURE_LESS_ENV is not set\n# CONFIG_LSSCSI is not set\n# CONFIG_MAKEDEVS is not set\n# CONFIG_FEATURE_MAKEDEVS_LEAF is not set\n# CONFIG_FEATURE_MAKEDEVS_TABLE is not set\n# CONFIG_MAN is not set\n# CONFIG_MICROCOM is not set\n# CONFIG_MIM is not set\n# CONFIG_MT is not set\nCONFIG_NANDWRITE=y\n# CONFIG_NANDDUMP is not set\n# CONFIG_PARTPROBE is not set\n# CONFIG_RAIDAUTORUN is not set\n# CONFIG_READAHEAD is not set\n# CONFIG_RFKILL is not set\n# CONFIG_RUNLEVEL is not set\n# CONFIG_RX is not set\n# CONFIG_SETFATTR is not set\n# CONFIG_SETSERIAL is not set\n# CONFIG_STRINGS is not set\n# CONFIG_TIME is not set\n# CONFIG_TS is not set\n# CONFIG_TTYSIZE is not set\n# CONFIG_UBIATTACH is not set\n# CONFIG_UBIDETACH is not set\n# CONFIG_UBIMKVOL is not set\n# CONFIG_UBIRMVOL is not set\n# CONFIG_UBIRSVOL is not set\n# CONFIG_UBIUPDATEVOL is not set\n# CONFIG_UBIRENAME is not set\n# CONFIG_VOLNAME is not set\n# CONFIG_WATCHDOG is not set\n\n#\n# Networking Utilities\n#\n# CONFIG_FEATURE_IPV6 is not set\n# CONFIG_FEATURE_UNIX_LOCAL is not set\n# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set\n# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set\n# CONFIG_FEATURE_TLS_SHA1 is not set\n# CONFIG_ARP is not set\n# CONFIG_ARPING is not set\n# CONFIG_BRCTL is not set\n# CONFIG_FEATURE_BRCTL_FANCY is not set\n# CONFIG_FEATURE_BRCTL_SHOW is not set\n# CONFIG_DNSD is not set\nCONFIG_ETHER_WAKE=y\n# CONFIG_FTPD is not set\n# CONFIG_FEATURE_FTPD_WRITE is not set\n# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set\n# CONFIG_FEATURE_FTPD_AUTHENTICATION is not set\n# CONFIG_FTPGET is not set\n# CONFIG_FTPPUT is not set\n# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set\n# CONFIG_HOSTNAME is not set\n# CONFIG_DNSDOMAINNAME is not set\n# CONFIG_HTTPD is not set\n# CONFIG_FEATURE_HTTPD_RANGES is not set\n# CONFIG_FEATURE_HTTPD_SETUID is not set\n# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set\n# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set\n# CONFIG_FEATURE_HTTPD_CGI is not set\n# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set\n# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set\n# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set\n# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set\n# CONFIG_FEATURE_HTTPD_PROXY is not set\n# CONFIG_FEATURE_HTTPD_GZIP is not set\n# CONFIG_IFCONFIG is not set\n# CONFIG_FEATURE_IFCONFIG_STATUS is not set\n# CONFIG_FEATURE_IFCONFIG_SLIP is not set\n# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set\n# CONFIG_FEATURE_IFCONFIG_HW is not set\n# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set\n# CONFIG_IFENSLAVE is not set\n# CONFIG_IFPLUGD is not set\n# CONFIG_IFUP is not set\n# CONFIG_IFDOWN is not set\nCONFIG_IFUPDOWN_IFSTATE_PATH=\"\"\n# CONFIG_FEATURE_IFUPDOWN_IP is not set\n# CONFIG_FEATURE_IFUPDOWN_IPV4 is not set\n# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set\n# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set\n# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set\n# CONFIG_INETD is not set\n# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set\n# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set\n# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set\n# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set\n# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set\n# CONFIG_FEATURE_INETD_RPC is not set\n# CONFIG_IP is not set\n# CONFIG_IPADDR is not set\n# CONFIG_IPLINK is not set\n# CONFIG_IPROUTE is not set\n# CONFIG_IPTUNNEL is not set\n# CONFIG_IPRULE is not set\n# CONFIG_IPNEIGH is not set\n# CONFIG_FEATURE_IP_ADDRESS is not set\n# CONFIG_FEATURE_IP_LINK is not set\n# CONFIG_FEATURE_IP_ROUTE is not set\nCONFIG_FEATURE_IP_ROUTE_DIR=\"\"\n# CONFIG_FEATURE_IP_TUNNEL is not set\n# CONFIG_FEATURE_IP_RULE is not set\n# CONFIG_FEATURE_IP_NEIGH is not set\n# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set\n# CONFIG_IPCALC is not set\n# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set\n# CONFIG_FEATURE_IPCALC_FANCY is not set\n# CONFIG_FAKEIDENTD is not set\n# CONFIG_NAMEIF is not set\n# CONFIG_FEATURE_NAMEIF_EXTENDED is not set\nCONFIG_NBDCLIENT=y\n# CONFIG_NC is not set\n# CONFIG_NETCAT is not set\n# CONFIG_NC_SERVER is not set\n# CONFIG_NC_EXTRA is not set\n# CONFIG_NC_110_COMPAT is not set\n# CONFIG_NETSTAT is not set\n# CONFIG_FEATURE_NETSTAT_WIDE is not set\n# CONFIG_FEATURE_NETSTAT_PRG is not set\n# CONFIG_NSLOOKUP is not set\n# CONFIG_FEATURE_NSLOOKUP_BIG is not set\n# CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS is not set\n# CONFIG_NTPD is not set\n# CONFIG_FEATURE_NTPD_SERVER is not set\n# CONFIG_FEATURE_NTPD_CONF is not set\n# CONFIG_FEATURE_NTP_AUTH is not set\nCONFIG_PING=y\n# CONFIG_PING6 is not set\nCONFIG_FEATURE_FANCY_PING=y\n# CONFIG_PSCAN is not set\n# CONFIG_ROUTE is not set\n# CONFIG_SLATTACH is not set\n# CONFIG_SSL_CLIENT is not set\n# CONFIG_TC is not set\n# CONFIG_FEATURE_TC_INGRESS is not set\n# CONFIG_TCPSVD is not set\n# CONFIG_UDPSVD is not set\n# CONFIG_TELNET is not set\n# CONFIG_FEATURE_TELNET_TTYPE is not set\n# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set\n# CONFIG_FEATURE_TELNET_WIDTH is not set\n# CONFIG_TELNETD is not set\n# CONFIG_FEATURE_TELNETD_STANDALONE is not set\n# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set\n# CONFIG_TFTP is not set\n# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set\n# CONFIG_FEATURE_TFTP_HPA_COMPAT is not set\n# CONFIG_TFTPD is not set\n# CONFIG_FEATURE_TFTP_GET is not set\n# CONFIG_FEATURE_TFTP_PUT is not set\n# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set\n# CONFIG_TFTP_DEBUG is not set\n# CONFIG_TLS is not set\n# CONFIG_TRACEROUTE is not set\n# CONFIG_TRACEROUTE6 is not set\n# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set\n# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set\n# CONFIG_TUNCTL is not set\n# CONFIG_FEATURE_TUNCTL_UG is not set\n# CONFIG_VCONFIG is not set\n# CONFIG_WGET is not set\n# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set\n# CONFIG_FEATURE_WGET_STATUSBAR is not set\n# CONFIG_FEATURE_WGET_AUTHENTICATION is not set\n# CONFIG_FEATURE_WGET_TIMEOUT is not set\n# CONFIG_FEATURE_WGET_HTTPS is not set\n# CONFIG_FEATURE_WGET_OPENSSL is not set\n# CONFIG_WHOIS is not set\n# CONFIG_ZCIP is not set\n# CONFIG_UDHCPD is not set\n# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set\n# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set\nCONFIG_DHCPD_LEASES_FILE=\"\"\n# CONFIG_DUMPLEASES is not set\n# CONFIG_DHCPRELAY is not set\n# CONFIG_UDHCPC is not set\n# CONFIG_FEATURE_UDHCPC_ARPING is not set\n# CONFIG_FEATURE_UDHCPC_SANITIZEOPT is not set\nCONFIG_UDHCPC_DEFAULT_SCRIPT=\"\"\n# CONFIG_UDHCPC6 is not set\n# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set\n# CONFIG_FEATURE_UDHCPC6_RFC4704 is not set\n# CONFIG_FEATURE_UDHCPC6_RFC4833 is not set\n# CONFIG_FEATURE_UDHCPC6_RFC5970 is not set\n# CONFIG_FEATURE_UDHCP_PORT is not set\nCONFIG_UDHCP_DEBUG=0\nCONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0\n# CONFIG_FEATURE_UDHCP_RFC3397 is not set\n# CONFIG_FEATURE_UDHCP_8021Q is not set\nCONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS=\"\"\n\n#\n# Print Utilities\n#\n# CONFIG_LPD is not set\n# CONFIG_LPR is not set\n# CONFIG_LPQ is not set\n\n#\n# Mail Utilities\n#\n# CONFIG_MAKEMIME is not set\n# CONFIG_POPMAILDIR is not set\n# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set\n# CONFIG_REFORMIME is not set\n# CONFIG_FEATURE_REFORMIME_COMPAT is not set\n# CONFIG_SENDMAIL is not set\nCONFIG_FEATURE_MIME_CHARSET=\"\"\n\n#\n# Process Utilities\n#\n# CONFIG_FREE is not set\n# CONFIG_FUSER is not set\n# CONFIG_IOSTAT is not set\n# CONFIG_KILL is not set\n# CONFIG_KILLALL is not set\n# CONFIG_KILLALL5 is not set\n# CONFIG_LSOF is not set\n# CONFIG_MPSTAT is not set\n# CONFIG_NMETER is not set\n# CONFIG_PGREP is not set\n# CONFIG_PKILL is not set\n# CONFIG_PIDOF is not set\n# CONFIG_FEATURE_PIDOF_SINGLE is not set\n# CONFIG_FEATURE_PIDOF_OMIT is not set\n# CONFIG_PMAP is not set\n# CONFIG_POWERTOP is not set\n# CONFIG_FEATURE_POWERTOP_INTERACTIVE is not set\n# CONFIG_PS is not set\n# CONFIG_FEATURE_PS_WIDE is not set\n# CONFIG_FEATURE_PS_LONG is not set\n# CONFIG_FEATURE_PS_TIME is not set\n# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set\n# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set\n# CONFIG_PSTREE is not set\n# CONFIG_PWDX is not set\n# CONFIG_SMEMCAP is not set\n# CONFIG_BB_SYSCTL is not set\n# CONFIG_TOP is not set\n# CONFIG_FEATURE_TOP_INTERACTIVE is not set\n# CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE is not set\n# CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS is not set\n# CONFIG_FEATURE_TOP_SMP_CPU is not set\n# CONFIG_FEATURE_TOP_DECIMALS is not set\n# CONFIG_FEATURE_TOP_SMP_PROCESS is not set\n# CONFIG_FEATURE_TOPMEM is not set\n# CONFIG_UPTIME is not set\n# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set\n# CONFIG_WATCH is not set\n# CONFIG_FEATURE_SHOW_THREADS is not set\n\n#\n# Runit Utilities\n#\n# CONFIG_CHPST is not set\n# CONFIG_SETUIDGID is not set\n# CONFIG_ENVUIDGID is not set\n# CONFIG_ENVDIR is not set\n# CONFIG_SOFTLIMIT is not set\n# CONFIG_RUNSV is not set\n# CONFIG_RUNSVDIR is not set\n# CONFIG_FEATURE_RUNSVDIR_LOG is not set\n# CONFIG_SV is not set\nCONFIG_SV_DEFAULT_SERVICE_DIR=\"\"\n# CONFIG_SVC is not set\n# CONFIG_SVOK is not set\n# CONFIG_SVLOGD is not set\n# CONFIG_CHCON is not set\n# CONFIG_GETENFORCE is not set\n# CONFIG_GETSEBOOL is not set\n# CONFIG_LOAD_POLICY is not set\n# CONFIG_MATCHPATHCON is not set\n# CONFIG_RUNCON is not set\n# CONFIG_SELINUXENABLED is not set\n# CONFIG_SESTATUS is not set\n# CONFIG_SETENFORCE is not set\n# CONFIG_SETFILES is not set\n# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set\n# CONFIG_RESTORECON is not set\n# CONFIG_SETSEBOOL is not set\n\n#\n# Shells\n#\nCONFIG_SH_IS_ASH=y\n# CONFIG_SH_IS_HUSH is not set\n# CONFIG_SH_IS_NONE is not set\n# CONFIG_BASH_IS_ASH is not set\n# CONFIG_BASH_IS_HUSH is not set\nCONFIG_BASH_IS_NONE=y\nCONFIG_SHELL_ASH=y\nCONFIG_ASH=y\n# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set\nCONFIG_ASH_INTERNAL_GLOB=y\nCONFIG_ASH_BASH_COMPAT=y\n# CONFIG_ASH_BASH_SOURCE_CURDIR is not set\n# CONFIG_ASH_BASH_NOT_FOUND_HOOK is not set\nCONFIG_ASH_JOB_CONTROL=y\n# CONFIG_ASH_ALIAS is not set\n# CONFIG_ASH_RANDOM_SUPPORT is not set\n# CONFIG_ASH_EXPAND_PRMT is not set\n# CONFIG_ASH_IDLE_TIMEOUT is not set\n# CONFIG_ASH_MAIL is not set\nCONFIG_ASH_ECHO=y\nCONFIG_ASH_PRINTF=y\nCONFIG_ASH_TEST=y\n# CONFIG_ASH_HELP is not set\nCONFIG_ASH_GETOPTS=y\n# CONFIG_ASH_CMDCMD is not set\nCONFIG_CTTYHACK=y\n# CONFIG_HUSH is not set\n# CONFIG_SHELL_HUSH is not set\n# CONFIG_HUSH_BASH_COMPAT is not set\n# CONFIG_HUSH_BRACE_EXPANSION is not set\n# CONFIG_HUSH_LINENO_VAR is not set\n# CONFIG_HUSH_BASH_SOURCE_CURDIR is not set\n# CONFIG_HUSH_INTERACTIVE is not set\n# CONFIG_HUSH_SAVEHISTORY is not set\n# CONFIG_HUSH_JOB is not set\n# CONFIG_HUSH_TICK is not set\n# CONFIG_HUSH_IF is not set\n# CONFIG_HUSH_LOOPS is not set\n# CONFIG_HUSH_CASE is not set\n# CONFIG_HUSH_FUNCTIONS is not set\n# CONFIG_HUSH_LOCAL is not set\n# CONFIG_HUSH_RANDOM_SUPPORT is not set\n# CONFIG_HUSH_MODE_X is not set\n# CONFIG_HUSH_ECHO is not set\n# CONFIG_HUSH_PRINTF is not set\n# CONFIG_HUSH_TEST is not set\n# CONFIG_HUSH_HELP is not set\n# CONFIG_HUSH_EXPORT is not set\n# CONFIG_HUSH_EXPORT_N is not set\n# CONFIG_HUSH_READONLY is not set\n# CONFIG_HUSH_KILL is not set\n# CONFIG_HUSH_WAIT is not set\n# CONFIG_HUSH_COMMAND is not set\n# CONFIG_HUSH_TRAP is not set\n# CONFIG_HUSH_TYPE is not set\n# CONFIG_HUSH_TIMES is not set\n# CONFIG_HUSH_READ is not set\n# CONFIG_HUSH_SET is not set\n# CONFIG_HUSH_UNSET is not set\n# CONFIG_HUSH_ULIMIT is not set\n# CONFIG_HUSH_UMASK is not set\n# CONFIG_HUSH_GETOPTS is not set\n# CONFIG_HUSH_MEMLEAK is not set\n\n#\n# Options common to all shells\n#\nCONFIG_FEATURE_SH_MATH=y\nCONFIG_FEATURE_SH_MATH_64=y\nCONFIG_FEATURE_SH_MATH_BASE=y\nCONFIG_FEATURE_SH_EXTRA_QUIET=y\nCONFIG_FEATURE_SH_STANDALONE=y\n# CONFIG_FEATURE_SH_NOFORK is not set\nCONFIG_FEATURE_SH_READ_FRAC=y\n# CONFIG_FEATURE_SH_HISTFILESIZE is not set\n# CONFIG_FEATURE_SH_EMBEDDED_SCRIPTS is not set\n\n#\n# System Logging Utilities\n#\n# CONFIG_KLOGD is not set\n# CONFIG_FEATURE_KLOGD_KLOGCTL is not set\n# CONFIG_LOGGER is not set\n# CONFIG_LOGREAD is not set\n# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set\n# CONFIG_SYSLOGD is not set\n# CONFIG_FEATURE_ROTATE_LOGFILE is not set\n# CONFIG_FEATURE_REMOTE_LOG is not set\n# CONFIG_FEATURE_SYSLOGD_DUP is not set\n# CONFIG_FEATURE_SYSLOGD_CFG is not set\n# CONFIG_FEATURE_SYSLOGD_PRECISE_TIMESTAMPS is not set\nCONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0\n# CONFIG_FEATURE_IPC_SYSLOG is not set\nCONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0\n# CONFIG_FEATURE_KMSG_SYSLOG is not set\n"
  },
  {
    "path": "packages/sysutils/busybox/config/busybox-target.conf",
    "content": "#\n# Automatically generated make config: don't edit\n# Busybox version: 1.32.1\n# Thu Feb  4 21:33:53 2021\n#\nCONFIG_HAVE_DOT_CONFIG=y\n\n#\n# Settings\n#\nCONFIG_DESKTOP=y\n# CONFIG_EXTRA_COMPAT is not set\n# CONFIG_FEDORA_COMPAT is not set\n# CONFIG_INCLUDE_SUSv2 is not set\nCONFIG_LONG_OPTS=y\nCONFIG_SHOW_USAGE=y\nCONFIG_FEATURE_VERBOSE_USAGE=y\nCONFIG_FEATURE_COMPRESS_USAGE=y\nCONFIG_LFS=y\n# CONFIG_PAM is not set\nCONFIG_FEATURE_DEVPTS=y\n# CONFIG_FEATURE_UTMP is not set\n# CONFIG_FEATURE_WTMP is not set\nCONFIG_FEATURE_PIDFILE=y\nCONFIG_PID_FILE_PATH=\"/run\"\nCONFIG_BUSYBOX=y\nCONFIG_FEATURE_SHOW_SCRIPT=y\nCONFIG_FEATURE_INSTALLER=y\nCONFIG_INSTALL_NO_USR=y\nCONFIG_FEATURE_SUID=y\n# CONFIG_FEATURE_SUID_CONFIG is not set\n# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set\n# CONFIG_FEATURE_PREFER_APPLETS is not set\nCONFIG_BUSYBOX_EXEC_PATH=\"/proc/self/exe\"\n# CONFIG_SELINUX is not set\n# CONFIG_FEATURE_CLEAN_UP is not set\nCONFIG_FEATURE_SYSLOG_INFO=y\nCONFIG_FEATURE_SYSLOG=y\nCONFIG_PLATFORM_LINUX=y\n\n#\n# Build Options\n#\n# CONFIG_STATIC is not set\n# CONFIG_PIE is not set\n# CONFIG_NOMMU is not set\n# CONFIG_BUILD_LIBBUSYBOX is not set\n# CONFIG_FEATURE_LIBBUSYBOX_STATIC is not set\n# CONFIG_FEATURE_INDIVIDUAL is not set\n# CONFIG_FEATURE_SHARED_BUSYBOX is not set\nCONFIG_CROSS_COMPILER_PREFIX=\"\"\nCONFIG_SYSROOT=\"\"\nCONFIG_EXTRA_CFLAGS=\"\"\nCONFIG_EXTRA_LDFLAGS=\"\"\nCONFIG_EXTRA_LDLIBS=\"-ltirpc -lpthread\"\n# CONFIG_USE_PORTABLE_CODE is not set\n# CONFIG_STACK_OPTIMIZATION_386 is not set\n\n#\n# Installation Options (\"make install\" behavior)\n#\nCONFIG_INSTALL_APPLET_SYMLINKS=y\n# CONFIG_INSTALL_APPLET_HARDLINKS is not set\n# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set\n# CONFIG_INSTALL_APPLET_DONT is not set\n# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set\n# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set\n# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set\nCONFIG_PREFIX=\"./_install-system\"\n\n#\n# Debugging Options\n#\n# CONFIG_DEBUG is not set\n# CONFIG_DEBUG_PESSIMIZE is not set\n# CONFIG_DEBUG_SANITIZE is not set\n# CONFIG_UNIT_TEST is not set\n# CONFIG_WERROR is not set\n# CONFIG_WARN_SIMPLE_MSG is not set\nCONFIG_NO_DEBUG_LIB=y\n# CONFIG_DMALLOC is not set\n# CONFIG_EFENCE is not set\n\n#\n# Library Tuning\n#\n# CONFIG_FEATURE_USE_BSS_TAIL is not set\nCONFIG_FLOAT_DURATION=y\nCONFIG_FEATURE_RTMINMAX=y\nCONFIG_FEATURE_RTMINMAX_USE_LIBC_DEFINITIONS=y\n# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set\nCONFIG_FEATURE_BUFFERS_GO_ON_STACK=y\n# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set\nCONFIG_PASSWORD_MINLEN=6\nCONFIG_MD5_SMALL=0\nCONFIG_SHA3_SMALL=0\nCONFIG_FEATURE_FAST_TOP=y\n# CONFIG_FEATURE_ETC_NETWORKS is not set\n# CONFIG_FEATURE_ETC_SERVICES is not set\nCONFIG_FEATURE_EDITING=y\nCONFIG_FEATURE_EDITING_MAX_LEN=1024\n# CONFIG_FEATURE_EDITING_VI is not set\nCONFIG_FEATURE_EDITING_HISTORY=9999\nCONFIG_FEATURE_EDITING_SAVEHISTORY=y\nCONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y\nCONFIG_FEATURE_REVERSE_SEARCH=y\nCONFIG_FEATURE_TAB_COMPLETION=y\nCONFIG_FEATURE_USERNAME_COMPLETION=y\nCONFIG_FEATURE_EDITING_FANCY_PROMPT=y\n# CONFIG_FEATURE_EDITING_WINCH is not set\n# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set\nCONFIG_LOCALE_SUPPORT=y\nCONFIG_UNICODE_SUPPORT=y\nCONFIG_UNICODE_USING_LOCALE=y\n# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set\nCONFIG_SUBST_WCHAR=63\nCONFIG_LAST_SUPPORTED_WCHAR=767\n# CONFIG_UNICODE_COMBINING_WCHARS is not set\nCONFIG_UNICODE_WIDE_WCHARS=y\n# CONFIG_UNICODE_BIDI_SUPPORT is not set\n# CONFIG_UNICODE_NEUTRAL_TABLE is not set\n# CONFIG_UNICODE_PRESERVE_BROKEN is not set\nCONFIG_FEATURE_NON_POSIX_CP=y\nCONFIG_FEATURE_VERBOSE_CP_MESSAGE=y\nCONFIG_FEATURE_USE_SENDFILE=y\nCONFIG_FEATURE_COPYBUF_KB=4\nCONFIG_FEATURE_SKIP_ROOTFS=y\nCONFIG_MONOTONIC_SYSCALL=y\n# CONFIG_IOCTL_HEX2STR_ERROR is not set\n# CONFIG_FEATURE_HWIB is not set\n\n#\n# Applets\n#\n\n#\n# Archival Utilities\n#\nCONFIG_FEATURE_SEAMLESS_XZ=y\nCONFIG_FEATURE_SEAMLESS_LZMA=y\nCONFIG_FEATURE_SEAMLESS_BZ2=y\nCONFIG_FEATURE_SEAMLESS_GZ=y\n# CONFIG_FEATURE_SEAMLESS_Z is not set\nCONFIG_AR=y\nCONFIG_FEATURE_AR_LONG_FILENAMES=y\nCONFIG_FEATURE_AR_CREATE=y\n# CONFIG_UNCOMPRESS is not set\nCONFIG_GUNZIP=y\nCONFIG_ZCAT=y\n# CONFIG_FEATURE_GUNZIP_LONG_OPTIONS is not set\nCONFIG_BUNZIP2=y\nCONFIG_BZCAT=y\n# CONFIG_UNLZMA is not set\n# CONFIG_LZCAT is not set\n# CONFIG_LZMA is not set\nCONFIG_UNXZ=y\nCONFIG_XZCAT=y\nCONFIG_XZ=y\nCONFIG_BZIP2=y\nCONFIG_BZIP2_SMALL=8\nCONFIG_FEATURE_BZIP2_DECOMPRESS=y\nCONFIG_CPIO=y\nCONFIG_FEATURE_CPIO_O=y\nCONFIG_FEATURE_CPIO_P=y\n# CONFIG_DPKG is not set\n# CONFIG_DPKG_DEB is not set\nCONFIG_GZIP=y\nCONFIG_FEATURE_GZIP_LONG_OPTIONS=y\nCONFIG_GZIP_FAST=0\nCONFIG_FEATURE_GZIP_LEVELS=y\nCONFIG_FEATURE_GZIP_DECOMPRESS=y\n# CONFIG_LZOP is not set\n# CONFIG_UNLZOP is not set\n# CONFIG_LZOPCAT is not set\n# CONFIG_LZOP_COMPR_HIGH is not set\n# CONFIG_RPM is not set\nCONFIG_RPM2CPIO=y\nCONFIG_TAR=y\nCONFIG_FEATURE_TAR_LONG_OPTIONS=y\nCONFIG_FEATURE_TAR_CREATE=y\nCONFIG_FEATURE_TAR_AUTODETECT=y\nCONFIG_FEATURE_TAR_FROM=y\n# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set\n# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set\nCONFIG_FEATURE_TAR_GNU_EXTENSIONS=y\nCONFIG_FEATURE_TAR_TO_COMMAND=y\nCONFIG_FEATURE_TAR_UNAME_GNAME=y\nCONFIG_FEATURE_TAR_NOPRESERVE_TIME=y\n# CONFIG_FEATURE_TAR_SELINUX is not set\nCONFIG_UNZIP=y\nCONFIG_FEATURE_UNZIP_CDF=y\n# CONFIG_FEATURE_UNZIP_BZIP2 is not set\n# CONFIG_FEATURE_UNZIP_LZMA is not set\n# CONFIG_FEATURE_UNZIP_XZ is not set\n# CONFIG_FEATURE_LZMA_FAST is not set\n\n#\n# Coreutils\n#\nCONFIG_BASENAME=y\nCONFIG_CAT=y\nCONFIG_FEATURE_CATN=y\n# CONFIG_FEATURE_CATV is not set\n# CONFIG_CHGRP is not set\nCONFIG_CHMOD=y\nCONFIG_CHOWN=y\nCONFIG_FEATURE_CHOWN_LONG_OPTIONS=y\nCONFIG_CHROOT=y\n# CONFIG_CKSUM is not set\n# CONFIG_COMM is not set\nCONFIG_CP=y\nCONFIG_FEATURE_CP_LONG_OPTIONS=y\nCONFIG_FEATURE_CP_REFLINK=y\nCONFIG_CUT=y\nCONFIG_DATE=y\nCONFIG_FEATURE_DATE_ISOFMT=y\nCONFIG_FEATURE_DATE_NANO=y\nCONFIG_FEATURE_DATE_COMPAT=y\nCONFIG_DD=y\nCONFIG_FEATURE_DD_SIGNAL_HANDLING=y\nCONFIG_FEATURE_DD_THIRD_STATUS_LINE=y\nCONFIG_FEATURE_DD_IBS_OBS=y\nCONFIG_FEATURE_DD_STATUS=y\nCONFIG_DF=y\n# CONFIG_FEATURE_DF_FANCY is not set\nCONFIG_DIRNAME=y\nCONFIG_DOS2UNIX=y\nCONFIG_UNIX2DOS=y\nCONFIG_DU=y\n# CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K is not set\n# CONFIG_ECHO is not set\nCONFIG_FEATURE_FANCY_ECHO=y\nCONFIG_ENV=y\n# CONFIG_EXPAND is not set\n# CONFIG_UNEXPAND is not set\nCONFIG_EXPR=y\n# CONFIG_EXPR_MATH_SUPPORT_64 is not set\n# CONFIG_FACTOR is not set\n# CONFIG_FALSE is not set\n# CONFIG_FOLD is not set\nCONFIG_HEAD=y\nCONFIG_FEATURE_FANCY_HEAD=y\n# CONFIG_HOSTID is not set\nCONFIG_ID=y\nCONFIG_GROUPS=y\nCONFIG_INSTALL=y\nCONFIG_FEATURE_INSTALL_LONG_OPTIONS=y\n# CONFIG_LINK is not set\nCONFIG_LN=y\n# CONFIG_LOGNAME is not set\nCONFIG_LS=y\nCONFIG_FEATURE_LS_FILETYPES=y\nCONFIG_FEATURE_LS_FOLLOWLINKS=y\nCONFIG_FEATURE_LS_RECURSIVE=y\n# CONFIG_FEATURE_LS_WIDTH is not set\nCONFIG_FEATURE_LS_SORTFILES=y\nCONFIG_FEATURE_LS_TIMESTAMPS=y\nCONFIG_FEATURE_LS_USERNAME=y\nCONFIG_FEATURE_LS_COLOR=y\nCONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y\nCONFIG_MD5SUM=y\nCONFIG_SHA1SUM=y\nCONFIG_SHA256SUM=y\nCONFIG_SHA512SUM=y\n# CONFIG_SHA3SUM is not set\n\n#\n# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum\n#\nCONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y\nCONFIG_MKDIR=y\nCONFIG_MKFIFO=y\nCONFIG_MKNOD=y\nCONFIG_MKTEMP=y\nCONFIG_MV=y\nCONFIG_NICE=y\n# CONFIG_NL is not set\nCONFIG_NOHUP=y\n# CONFIG_NPROC is not set\nCONFIG_OD=y\n# CONFIG_PASTE is not set\nCONFIG_PRINTENV=y\n# CONFIG_PRINTF is not set\nCONFIG_PWD=y\nCONFIG_READLINK=y\nCONFIG_FEATURE_READLINK_FOLLOW=y\nCONFIG_REALPATH=y\nCONFIG_RM=y\nCONFIG_RMDIR=y\nCONFIG_SEQ=y\n# CONFIG_SHRED is not set\n# CONFIG_SHUF is not set\nCONFIG_SLEEP=y\nCONFIG_FEATURE_FANCY_SLEEP=y\n# CONFIG_SORT is not set\n# CONFIG_FEATURE_SORT_BIG is not set\n# CONFIG_FEATURE_SORT_OPTIMIZE_MEMORY is not set\n# CONFIG_SPLIT is not set\n# CONFIG_FEATURE_SPLIT_FANCY is not set\nCONFIG_STAT=y\n# CONFIG_FEATURE_STAT_FORMAT is not set\n# CONFIG_FEATURE_STAT_FILESYSTEM is not set\n# CONFIG_STTY is not set\n# CONFIG_SUM is not set\nCONFIG_SYNC=y\nCONFIG_FEATURE_SYNC_FANCY=y\n# CONFIG_FSYNC is not set\nCONFIG_TAC=y\nCONFIG_TAIL=y\nCONFIG_FEATURE_FANCY_TAIL=y\nCONFIG_TEE=y\nCONFIG_FEATURE_TEE_USE_BLOCK_IO=y\n# CONFIG_TEST is not set\n# CONFIG_TEST1 is not set\n# CONFIG_TEST2 is not set\nCONFIG_FEATURE_TEST_64=y\n# CONFIG_TIMEOUT is not set\nCONFIG_TOUCH=y\nCONFIG_FEATURE_TOUCH_NODEREF=y\nCONFIG_FEATURE_TOUCH_SUSV3=y\nCONFIG_TR=y\nCONFIG_FEATURE_TR_CLASSES=y\nCONFIG_FEATURE_TR_EQUIV=y\nCONFIG_TRUE=y\n# CONFIG_TRUNCATE is not set\n# CONFIG_TTY is not set\nCONFIG_UNAME=y\nCONFIG_UNAME_OSNAME=\"GNU/Linux\"\nCONFIG_BB_ARCH=y\nCONFIG_UNIQ=y\n# CONFIG_UNLINK is not set\nCONFIG_USLEEP=y\n# CONFIG_UUDECODE is not set\n# CONFIG_BASE64 is not set\n# CONFIG_UUENCODE is not set\nCONFIG_WC=y\nCONFIG_FEATURE_WC_LARGE=y\n# CONFIG_WHO is not set\n# CONFIG_W is not set\n# CONFIG_USERS is not set\nCONFIG_WHOAMI=y\n# CONFIG_YES is not set\n\n#\n# Common options\n#\nCONFIG_FEATURE_VERBOSE=y\n\n#\n# Common options for cp and mv\n#\n# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set\n\n#\n# Common options for df, du, ls\n#\nCONFIG_FEATURE_HUMAN_READABLE=y\n\n#\n# Console Utilities\n#\nCONFIG_CHVT=y\nCONFIG_CLEAR=y\nCONFIG_DEALLOCVT=y\n# CONFIG_DUMPKMAP is not set\nCONFIG_FGCONSOLE=y\n# CONFIG_KBD_MODE is not set\n# CONFIG_LOADFONT is not set\n# CONFIG_SETFONT is not set\n# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set\nCONFIG_DEFAULT_SETFONT_DIR=\"\"\n# CONFIG_FEATURE_LOADFONT_PSF2 is not set\n# CONFIG_FEATURE_LOADFONT_RAW is not set\nCONFIG_LOADKMAP=y\n# CONFIG_OPENVT is not set\nCONFIG_RESET=y\n# CONFIG_RESIZE is not set\n# CONFIG_FEATURE_RESIZE_PRINT is not set\nCONFIG_SETCONSOLE=y\nCONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y\n# CONFIG_SETKEYCODES is not set\n# CONFIG_SETLOGCONS is not set\n# CONFIG_SHOWKEY is not set\n\n#\n# Debian Utilities\n#\n# CONFIG_PIPE_PROGRESS is not set\n# CONFIG_RUN_PARTS is not set\n# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set\n# CONFIG_FEATURE_RUN_PARTS_FANCY is not set\n# CONFIG_START_STOP_DAEMON is not set\n# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set\n# CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set\nCONFIG_WHICH=y\n\n#\n# klibc-utils\n#\n# CONFIG_MINIPS is not set\n# CONFIG_NUKE is not set\n# CONFIG_RESUME is not set\n# CONFIG_RUN_INIT is not set\n\n#\n# Editors\n#\nCONFIG_AWK=y\nCONFIG_FEATURE_AWK_LIBM=y\nCONFIG_FEATURE_AWK_GNU_EXTENSIONS=y\n# CONFIG_CMP is not set\n# CONFIG_DIFF is not set\n# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set\n# CONFIG_FEATURE_DIFF_DIR is not set\n# CONFIG_ED is not set\n# CONFIG_PATCH is not set\nCONFIG_SED=y\nCONFIG_VI=y\nCONFIG_FEATURE_VI_MAX_LEN=4096\nCONFIG_FEATURE_VI_8BIT=y\nCONFIG_FEATURE_VI_COLON=y\nCONFIG_FEATURE_VI_YANKMARK=y\nCONFIG_FEATURE_VI_SEARCH=y\n# CONFIG_FEATURE_VI_REGEX_SEARCH is not set\nCONFIG_FEATURE_VI_USE_SIGNALS=y\nCONFIG_FEATURE_VI_DOT_CMD=y\nCONFIG_FEATURE_VI_READONLY=y\nCONFIG_FEATURE_VI_SETOPTS=y\nCONFIG_FEATURE_VI_SET=y\nCONFIG_FEATURE_VI_WIN_RESIZE=y\nCONFIG_FEATURE_VI_ASK_TERMINAL=y\nCONFIG_FEATURE_VI_UNDO=y\nCONFIG_FEATURE_VI_UNDO_QUEUE=y\nCONFIG_FEATURE_VI_UNDO_QUEUE_MAX=256\nCONFIG_FEATURE_ALLOW_EXEC=y\n\n#\n# Finding Utilities\n#\nCONFIG_FIND=y\nCONFIG_FEATURE_FIND_PRINT0=y\nCONFIG_FEATURE_FIND_MTIME=y\nCONFIG_FEATURE_FIND_MMIN=y\nCONFIG_FEATURE_FIND_PERM=y\nCONFIG_FEATURE_FIND_TYPE=y\nCONFIG_FEATURE_FIND_EXECUTABLE=y\nCONFIG_FEATURE_FIND_XDEV=y\nCONFIG_FEATURE_FIND_MAXDEPTH=y\nCONFIG_FEATURE_FIND_NEWER=y\nCONFIG_FEATURE_FIND_INUM=y\nCONFIG_FEATURE_FIND_EXEC=y\nCONFIG_FEATURE_FIND_EXEC_PLUS=y\nCONFIG_FEATURE_FIND_USER=y\nCONFIG_FEATURE_FIND_GROUP=y\nCONFIG_FEATURE_FIND_NOT=y\nCONFIG_FEATURE_FIND_DEPTH=y\nCONFIG_FEATURE_FIND_PAREN=y\nCONFIG_FEATURE_FIND_SIZE=y\nCONFIG_FEATURE_FIND_PRUNE=y\nCONFIG_FEATURE_FIND_QUIT=y\nCONFIG_FEATURE_FIND_DELETE=y\nCONFIG_FEATURE_FIND_EMPTY=y\nCONFIG_FEATURE_FIND_PATH=y\nCONFIG_FEATURE_FIND_REGEX=y\n# CONFIG_FEATURE_FIND_CONTEXT is not set\nCONFIG_FEATURE_FIND_LINKS=y\nCONFIG_GREP=y\nCONFIG_EGREP=y\nCONFIG_FGREP=y\nCONFIG_FEATURE_GREP_CONTEXT=y\nCONFIG_XARGS=y\nCONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y\nCONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y\nCONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y\nCONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y\nCONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y\nCONFIG_FEATURE_XARGS_SUPPORT_PARALLEL=y\nCONFIG_FEATURE_XARGS_SUPPORT_ARGS_FILE=y\n\n#\n# Init Utilities\n#\n# CONFIG_BOOTCHARTD is not set\n# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set\n# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set\n# CONFIG_HALT is not set\n# CONFIG_POWEROFF is not set\n# CONFIG_REBOOT is not set\n# CONFIG_FEATURE_WAIT_FOR_INIT is not set\n# CONFIG_FEATURE_CALL_TELINIT is not set\nCONFIG_TELINIT_PATH=\"\"\n# CONFIG_INIT is not set\n# CONFIG_LINUXRC is not set\n# CONFIG_FEATURE_USE_INITTAB is not set\n# CONFIG_FEATURE_KILL_REMOVED is not set\nCONFIG_FEATURE_KILL_DELAY=0\n# CONFIG_FEATURE_INIT_SCTTY is not set\n# CONFIG_FEATURE_INIT_SYSLOG is not set\n# CONFIG_FEATURE_INIT_QUIET is not set\n# CONFIG_FEATURE_INIT_COREDUMPS is not set\nCONFIG_INIT_TERMINAL_TYPE=\"\"\n# CONFIG_FEATURE_INIT_MODIFY_CMDLINE is not set\n\n#\n# Login/Password Management Utilities\n#\nCONFIG_FEATURE_SHADOWPASSWDS=y\n# CONFIG_USE_BB_PWD_GRP is not set\n# CONFIG_USE_BB_SHADOW is not set\nCONFIG_USE_BB_CRYPT=y\nCONFIG_USE_BB_CRYPT_SHA=y\n# CONFIG_ADD_SHELL is not set\n# CONFIG_REMOVE_SHELL is not set\n# CONFIG_ADDGROUP is not set\n# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set\n# CONFIG_ADDUSER is not set\n# CONFIG_FEATURE_CHECK_NAMES is not set\nCONFIG_LAST_ID=0\nCONFIG_FIRST_SYSTEM_ID=0\nCONFIG_LAST_SYSTEM_ID=0\n# CONFIG_CHPASSWD is not set\nCONFIG_FEATURE_DEFAULT_PASSWD_ALGO=\"sha512\"\nCONFIG_CRYPTPW=y\n# CONFIG_MKPASSWD is not set\n# CONFIG_DELUSER is not set\n# CONFIG_DELGROUP is not set\n# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set\n# CONFIG_GETTY is not set\nCONFIG_LOGIN=y\n# CONFIG_LOGIN_SESSION_AS_CHILD is not set\nCONFIG_LOGIN_SCRIPTS=y\n# CONFIG_FEATURE_NOLOGIN is not set\n# CONFIG_FEATURE_SECURETTY is not set\nCONFIG_PASSWD=y\nCONFIG_FEATURE_PASSWD_WEAK_CHECK=y\nCONFIG_SU=y\nCONFIG_FEATURE_SU_SYSLOG=y\nCONFIG_FEATURE_SU_CHECKS_SHELLS=y\n# CONFIG_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY is not set\n# CONFIG_SULOGIN is not set\n# CONFIG_VLOCK is not set\n\n#\n# Linux Ext2 FS Progs\n#\n# CONFIG_CHATTR is not set\n# CONFIG_FSCK is not set\n# CONFIG_LSATTR is not set\n# CONFIG_TUNE2FS is not set\n\n#\n# Linux Module Utilities\n#\n# CONFIG_MODPROBE_SMALL is not set\n# CONFIG_DEPMOD is not set\n# CONFIG_INSMOD is not set\n# CONFIG_LSMOD is not set\n# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set\n# CONFIG_MODINFO is not set\n# CONFIG_MODPROBE is not set\n# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set\n# CONFIG_RMMOD is not set\n\n#\n# Options common to multiple modutils\n#\n# CONFIG_FEATURE_CMDLINE_MODULE_OPTIONS is not set\n# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set\n# CONFIG_FEATURE_2_4_MODULES is not set\n# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set\n# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set\n# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set\n# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set\n# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set\n# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set\n# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set\n# CONFIG_FEATURE_MODUTILS_ALIAS is not set\n# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set\nCONFIG_DEFAULT_MODULES_DIR=\"\"\nCONFIG_DEFAULT_DEPMOD_FILE=\"\"\n\n#\n# Linux System Utilities\n#\n# CONFIG_ACPID is not set\n# CONFIG_FEATURE_ACPID_COMPAT is not set\n# CONFIG_BLKDISCARD is not set\n# CONFIG_BLKID is not set\n# CONFIG_FEATURE_BLKID_TYPE is not set\n# CONFIG_BLOCKDEV is not set\n# CONFIG_CAL is not set\n# CONFIG_CHRT is not set\nCONFIG_DMESG=y\nCONFIG_FEATURE_DMESG_PRETTY=y\nCONFIG_EJECT=y\nCONFIG_FEATURE_EJECT_SCSI=y\n# CONFIG_FALLOCATE is not set\n# CONFIG_FATATTR is not set\nCONFIG_FBSET=y\nCONFIG_FEATURE_FBSET_FANCY=y\nCONFIG_FEATURE_FBSET_READMODE=y\n# CONFIG_FDFORMAT is not set\n# CONFIG_FDISK is not set\n# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set\n# CONFIG_FEATURE_FDISK_WRITABLE is not set\n# CONFIG_FEATURE_AIX_LABEL is not set\n# CONFIG_FEATURE_SGI_LABEL is not set\n# CONFIG_FEATURE_SUN_LABEL is not set\n# CONFIG_FEATURE_OSF_LABEL is not set\n# CONFIG_FEATURE_GPT_LABEL is not set\n# CONFIG_FEATURE_FDISK_ADVANCED is not set\nCONFIG_FINDFS=y\nCONFIG_FLOCK=y\n# CONFIG_FDFLUSH is not set\n# CONFIG_FREERAMDISK is not set\n# CONFIG_FSCK_MINIX is not set\n# CONFIG_FSFREEZE is not set\n# CONFIG_FSTRIM is not set\nCONFIG_GETOPT=y\nCONFIG_FEATURE_GETOPT_LONG=y\nCONFIG_HEXDUMP=y\n# CONFIG_FEATURE_HEXDUMP_REVERSE is not set\n# CONFIG_HD is not set\n# CONFIG_XXD is not set\nCONFIG_HWCLOCK=y\n# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set\nCONFIG_IONICE=y\n# CONFIG_IPCRM is not set\n# CONFIG_IPCS is not set\n# CONFIG_LAST is not set\n# CONFIG_FEATURE_LAST_FANCY is not set\n# CONFIG_LOSETUP is not set\n# CONFIG_LSPCI is not set\n# CONFIG_LSUSB is not set\n# CONFIG_MDEV is not set\n# CONFIG_FEATURE_MDEV_CONF is not set\n# CONFIG_FEATURE_MDEV_RENAME is not set\n# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set\n# CONFIG_FEATURE_MDEV_EXEC is not set\n# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set\n# CONFIG_FEATURE_MDEV_DAEMON is not set\n# CONFIG_MESG is not set\n# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set\n# CONFIG_MKE2FS is not set\n# CONFIG_MKFS_EXT2 is not set\n# CONFIG_MKFS_MINIX is not set\n# CONFIG_FEATURE_MINIX2 is not set\n# CONFIG_MKFS_REISER is not set\n# CONFIG_MKDOSFS is not set\n# CONFIG_MKFS_VFAT is not set\nCONFIG_MKSWAP=y\nCONFIG_FEATURE_MKSWAP_UUID=y\nCONFIG_MORE=y\nCONFIG_MOUNT=y\nCONFIG_FEATURE_MOUNT_FAKE=y\nCONFIG_FEATURE_MOUNT_VERBOSE=y\nCONFIG_FEATURE_MOUNT_HELPERS=y\nCONFIG_FEATURE_MOUNT_LABEL=y\n# CONFIG_FEATURE_MOUNT_NFS is not set\nCONFIG_FEATURE_MOUNT_CIFS=y\nCONFIG_FEATURE_MOUNT_FLAGS=y\n# CONFIG_FEATURE_MOUNT_FSTAB is not set\n# CONFIG_FEATURE_MOUNT_OTHERTAB is not set\nCONFIG_MOUNTPOINT=y\n# CONFIG_NOLOGIN is not set\n# CONFIG_NOLOGIN_DEPENDENCIES is not set\n# CONFIG_NSENTER is not set\n# CONFIG_PIVOT_ROOT is not set\nCONFIG_RDATE=y\n# CONFIG_RDEV is not set\n# CONFIG_READPROFILE is not set\nCONFIG_RENICE=y\n# CONFIG_REV is not set\n# CONFIG_RTCWAKE is not set\n# CONFIG_SCRIPT is not set\n# CONFIG_SCRIPTREPLAY is not set\n# CONFIG_SETARCH is not set\n# CONFIG_LINUX32 is not set\n# CONFIG_LINUX64 is not set\n# CONFIG_SETPRIV is not set\n# CONFIG_FEATURE_SETPRIV_DUMP is not set\n# CONFIG_FEATURE_SETPRIV_CAPABILITIES is not set\n# CONFIG_FEATURE_SETPRIV_CAPABILITY_NAMES is not set\n# CONFIG_SETSID is not set\n# CONFIG_SWAPON is not set\n# CONFIG_FEATURE_SWAPON_DISCARD is not set\n# CONFIG_FEATURE_SWAPON_PRI is not set\n# CONFIG_SWAPOFF is not set\n# CONFIG_FEATURE_SWAPONOFF_LABEL is not set\nCONFIG_SWITCH_ROOT=y\n# CONFIG_TASKSET is not set\n# CONFIG_FEATURE_TASKSET_FANCY is not set\n# CONFIG_FEATURE_TASKSET_CPULIST is not set\nCONFIG_UEVENT=y\nCONFIG_UMOUNT=y\nCONFIG_FEATURE_UMOUNT_ALL=y\n# CONFIG_UNSHARE is not set\n# CONFIG_WALL is not set\n\n#\n# Common options for mount/umount\n#\nCONFIG_FEATURE_MOUNT_LOOP=y\nCONFIG_FEATURE_MOUNT_LOOP_CREATE=y\n# CONFIG_FEATURE_MTAB_SUPPORT is not set\nCONFIG_VOLUMEID=y\n\n#\n# Filesystem/Volume identification\n#\n# CONFIG_FEATURE_VOLUMEID_BCACHE is not set\nCONFIG_FEATURE_VOLUMEID_BTRFS=y\nCONFIG_FEATURE_VOLUMEID_CRAMFS=y\nCONFIG_FEATURE_VOLUMEID_EXFAT=y\nCONFIG_FEATURE_VOLUMEID_EXT=y\nCONFIG_FEATURE_VOLUMEID_F2FS=y\nCONFIG_FEATURE_VOLUMEID_FAT=y\nCONFIG_FEATURE_VOLUMEID_HFS=y\nCONFIG_FEATURE_VOLUMEID_ISO9660=y\nCONFIG_FEATURE_VOLUMEID_JFS=y\n# CONFIG_FEATURE_VOLUMEID_LFS is not set\nCONFIG_FEATURE_VOLUMEID_LINUXRAID=y\nCONFIG_FEATURE_VOLUMEID_LINUXSWAP=y\nCONFIG_FEATURE_VOLUMEID_LUKS=y\nCONFIG_FEATURE_VOLUMEID_MINIX=y\nCONFIG_FEATURE_VOLUMEID_NILFS=y\nCONFIG_FEATURE_VOLUMEID_NTFS=y\nCONFIG_FEATURE_VOLUMEID_OCFS2=y\nCONFIG_FEATURE_VOLUMEID_REISERFS=y\nCONFIG_FEATURE_VOLUMEID_ROMFS=y\n# CONFIG_FEATURE_VOLUMEID_SQUASHFS is not set\nCONFIG_FEATURE_VOLUMEID_SYSV=y\nCONFIG_FEATURE_VOLUMEID_UBIFS=y\nCONFIG_FEATURE_VOLUMEID_UDF=y\nCONFIG_FEATURE_VOLUMEID_XFS=y\n\n#\n# Miscellaneous Utilities\n#\n# CONFIG_ADJTIMEX is not set\n# CONFIG_BBCONFIG is not set\n# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set\n# CONFIG_BC is not set\n# CONFIG_DC is not set\n# CONFIG_FEATURE_DC_BIG is not set\n# CONFIG_FEATURE_DC_LIBM is not set\n# CONFIG_FEATURE_BC_INTERACTIVE is not set\n# CONFIG_FEATURE_BC_LONG_OPTIONS is not set\n# CONFIG_BEEP is not set\nCONFIG_FEATURE_BEEP_FREQ=0\nCONFIG_FEATURE_BEEP_LENGTH_MS=0\n# CONFIG_CHAT is not set\n# CONFIG_FEATURE_CHAT_NOFAIL is not set\n# CONFIG_FEATURE_CHAT_TTY_HIFI is not set\n# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set\n# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set\n# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set\n# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set\n# CONFIG_FEATURE_CHAT_CLR_ABORT is not set\n# CONFIG_CONSPY is not set\nCONFIG_CROND=y\nCONFIG_FEATURE_CROND_D=y\n# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set\n# CONFIG_FEATURE_CROND_SPECIAL_TIMES is not set\nCONFIG_FEATURE_CROND_DIR=\"/storage/.cache/cron\"\nCONFIG_CRONTAB=y\n# CONFIG_DEVFSD is not set\n# CONFIG_DEVFSD_MODLOAD is not set\n# CONFIG_DEVFSD_FG_NP is not set\n# CONFIG_DEVFSD_VERBOSE is not set\n# CONFIG_FEATURE_DEVFS is not set\nCONFIG_DEVMEM=y\n# CONFIG_FBSPLASH is not set\nCONFIG_FLASH_ERASEALL=y\n# CONFIG_FLASH_LOCK is not set\n# CONFIG_FLASH_UNLOCK is not set\n# CONFIG_FLASHCP is not set\n# CONFIG_HDPARM is not set\n# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set\n# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set\n# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set\n# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set\n# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set\n# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set\n# CONFIG_HEXEDIT is not set\n# CONFIG_I2CGET is not set\n# CONFIG_I2CSET is not set\n# CONFIG_I2CDUMP is not set\n# CONFIG_I2CDETECT is not set\n# CONFIG_I2CTRANSFER is not set\n# CONFIG_INOTIFYD is not set\nCONFIG_LESS=y\nCONFIG_FEATURE_LESS_MAXLINES=9999999\nCONFIG_FEATURE_LESS_BRACKETS=y\nCONFIG_FEATURE_LESS_FLAGS=y\nCONFIG_FEATURE_LESS_TRUNCATE=y\nCONFIG_FEATURE_LESS_MARKS=y\nCONFIG_FEATURE_LESS_REGEXP=y\nCONFIG_FEATURE_LESS_WINCH=y\nCONFIG_FEATURE_LESS_ASK_TERMINAL=y\nCONFIG_FEATURE_LESS_DASHCMD=y\nCONFIG_FEATURE_LESS_LINENUMS=y\nCONFIG_FEATURE_LESS_RAW=y\nCONFIG_FEATURE_LESS_ENV=y\n# CONFIG_LSSCSI is not set\n# CONFIG_MAKEDEVS is not set\n# CONFIG_FEATURE_MAKEDEVS_LEAF is not set\n# CONFIG_FEATURE_MAKEDEVS_TABLE is not set\n# CONFIG_MAN is not set\n# CONFIG_MICROCOM is not set\n# CONFIG_MIM is not set\n# CONFIG_MT is not set\nCONFIG_NANDWRITE=y\n# CONFIG_NANDDUMP is not set\n# CONFIG_PARTPROBE is not set\n# CONFIG_RAIDAUTORUN is not set\n# CONFIG_READAHEAD is not set\nCONFIG_RFKILL=y\n# CONFIG_RUNLEVEL is not set\n# CONFIG_RX is not set\n# CONFIG_SETFATTR is not set\nCONFIG_SETSERIAL=y\n# CONFIG_STRINGS is not set\nCONFIG_TIME=y\n# CONFIG_TS is not set\nCONFIG_TTYSIZE=y\n# CONFIG_UBIATTACH is not set\n# CONFIG_UBIDETACH is not set\n# CONFIG_UBIMKVOL is not set\n# CONFIG_UBIRMVOL is not set\n# CONFIG_UBIRSVOL is not set\n# CONFIG_UBIUPDATEVOL is not set\n# CONFIG_UBIRENAME is not set\n# CONFIG_VOLNAME is not set\n# CONFIG_WATCHDOG is not set\n\n#\n# Networking Utilities\n#\nCONFIG_FEATURE_IPV6=y\n# CONFIG_FEATURE_UNIX_LOCAL is not set\nCONFIG_FEATURE_PREFER_IPV4_ADDRESS=y\n# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set\n# CONFIG_FEATURE_TLS_SHA1 is not set\nCONFIG_ARP=y\nCONFIG_ARPING=y\nCONFIG_BRCTL=y\nCONFIG_FEATURE_BRCTL_FANCY=y\nCONFIG_FEATURE_BRCTL_SHOW=y\n# CONFIG_DNSD is not set\nCONFIG_ETHER_WAKE=y\n# CONFIG_FTPD is not set\n# CONFIG_FEATURE_FTPD_WRITE is not set\n# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set\n# CONFIG_FEATURE_FTPD_AUTHENTICATION is not set\nCONFIG_FTPGET=y\nCONFIG_FTPPUT=y\nCONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y\nCONFIG_HOSTNAME=y\nCONFIG_DNSDOMAINNAME=y\n# CONFIG_HTTPD is not set\n# CONFIG_FEATURE_HTTPD_RANGES is not set\n# CONFIG_FEATURE_HTTPD_SETUID is not set\n# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set\n# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set\n# CONFIG_FEATURE_HTTPD_CGI is not set\n# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set\n# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set\n# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set\n# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set\n# CONFIG_FEATURE_HTTPD_PROXY is not set\n# CONFIG_FEATURE_HTTPD_GZIP is not set\nCONFIG_IFCONFIG=y\nCONFIG_FEATURE_IFCONFIG_STATUS=y\n# CONFIG_FEATURE_IFCONFIG_SLIP is not set\n# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set\nCONFIG_FEATURE_IFCONFIG_HW=y\nCONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y\n# CONFIG_IFENSLAVE is not set\nCONFIG_IFPLUGD=y\n# CONFIG_IFUP is not set\n# CONFIG_IFDOWN is not set\nCONFIG_IFUPDOWN_IFSTATE_PATH=\"\"\n# CONFIG_FEATURE_IFUPDOWN_IP is not set\n# CONFIG_FEATURE_IFUPDOWN_IPV4 is not set\n# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set\n# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set\n# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set\n# CONFIG_INETD is not set\n# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set\n# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set\n# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set\n# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set\n# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set\n# CONFIG_FEATURE_INETD_RPC is not set\nCONFIG_IP=y\n# CONFIG_IPADDR is not set\n# CONFIG_IPLINK is not set\n# CONFIG_IPROUTE is not set\n# CONFIG_IPTUNNEL is not set\n# CONFIG_IPRULE is not set\n# CONFIG_IPNEIGH is not set\nCONFIG_FEATURE_IP_ADDRESS=y\nCONFIG_FEATURE_IP_LINK=y\nCONFIG_FEATURE_IP_ROUTE=y\nCONFIG_FEATURE_IP_ROUTE_DIR=\"/storage/.config/iproute2\"\nCONFIG_FEATURE_IP_TUNNEL=y\nCONFIG_FEATURE_IP_RULE=y\n# CONFIG_FEATURE_IP_NEIGH is not set\n# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set\n# CONFIG_IPCALC is not set\n# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set\n# CONFIG_FEATURE_IPCALC_FANCY is not set\n# CONFIG_FAKEIDENTD is not set\n# CONFIG_NAMEIF is not set\n# CONFIG_FEATURE_NAMEIF_EXTENDED is not set\nCONFIG_NBDCLIENT=y\nCONFIG_NC=y\n# CONFIG_NETCAT is not set\nCONFIG_NC_SERVER=y\nCONFIG_NC_EXTRA=y\nCONFIG_NC_110_COMPAT=y\nCONFIG_NETSTAT=y\n# CONFIG_FEATURE_NETSTAT_WIDE is not set\nCONFIG_FEATURE_NETSTAT_PRG=y\nCONFIG_NSLOOKUP=y\n# CONFIG_FEATURE_NSLOOKUP_BIG is not set\n# CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS is not set\nCONFIG_NTPD=y\n# CONFIG_FEATURE_NTPD_SERVER is not set\nCONFIG_FEATURE_NTPD_CONF=y\nCONFIG_FEATURE_NTP_AUTH=y\nCONFIG_PING=y\nCONFIG_PING6=y\nCONFIG_FEATURE_FANCY_PING=y\n# CONFIG_PSCAN is not set\nCONFIG_ROUTE=y\n# CONFIG_SLATTACH is not set\n# CONFIG_SSL_CLIENT is not set\n# CONFIG_TC is not set\n# CONFIG_FEATURE_TC_INGRESS is not set\n# CONFIG_TCPSVD is not set\n# CONFIG_UDPSVD is not set\nCONFIG_TELNET=y\nCONFIG_FEATURE_TELNET_TTYPE=y\nCONFIG_FEATURE_TELNET_AUTOLOGIN=y\n# CONFIG_FEATURE_TELNET_WIDTH is not set\n# CONFIG_TELNETD is not set\n# CONFIG_FEATURE_TELNETD_STANDALONE is not set\n# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set\n# CONFIG_TFTP is not set\n# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set\n# CONFIG_FEATURE_TFTP_HPA_COMPAT is not set\n# CONFIG_TFTPD is not set\n# CONFIG_FEATURE_TFTP_GET is not set\n# CONFIG_FEATURE_TFTP_PUT is not set\n# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set\n# CONFIG_TFTP_DEBUG is not set\n# CONFIG_TLS is not set\nCONFIG_TRACEROUTE=y\nCONFIG_TRACEROUTE6=y\nCONFIG_FEATURE_TRACEROUTE_VERBOSE=y\n# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set\n# CONFIG_TUNCTL is not set\n# CONFIG_FEATURE_TUNCTL_UG is not set\nCONFIG_VCONFIG=y\n# CONFIG_WGET is not set\n# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set\n# CONFIG_FEATURE_WGET_STATUSBAR is not set\n# CONFIG_FEATURE_WGET_AUTHENTICATION is not set\n# CONFIG_FEATURE_WGET_TIMEOUT is not set\n# CONFIG_FEATURE_WGET_HTTPS is not set\n# CONFIG_FEATURE_WGET_OPENSSL is not set\nCONFIG_WHOIS=y\n# CONFIG_ZCIP is not set\n# CONFIG_UDHCPD is not set\n# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set\n# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set\nCONFIG_DHCPD_LEASES_FILE=\"\"\n# CONFIG_DUMPLEASES is not set\n# CONFIG_DHCPRELAY is not set\n# CONFIG_UDHCPC is not set\n# CONFIG_FEATURE_UDHCPC_ARPING is not set\n# CONFIG_FEATURE_UDHCPC_SANITIZEOPT is not set\nCONFIG_UDHCPC_DEFAULT_SCRIPT=\"\"\n# CONFIG_UDHCPC6 is not set\n# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set\n# CONFIG_FEATURE_UDHCPC6_RFC4704 is not set\n# CONFIG_FEATURE_UDHCPC6_RFC4833 is not set\n# CONFIG_FEATURE_UDHCPC6_RFC5970 is not set\n# CONFIG_FEATURE_UDHCP_PORT is not set\nCONFIG_UDHCP_DEBUG=0\nCONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0\n# CONFIG_FEATURE_UDHCP_RFC3397 is not set\n# CONFIG_FEATURE_UDHCP_8021Q is not set\nCONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS=\"\"\n\n#\n# Print Utilities\n#\n# CONFIG_LPD is not set\n# CONFIG_LPR is not set\n# CONFIG_LPQ is not set\n\n#\n# Mail Utilities\n#\n# CONFIG_MAKEMIME is not set\n# CONFIG_POPMAILDIR is not set\n# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set\n# CONFIG_REFORMIME is not set\n# CONFIG_FEATURE_REFORMIME_COMPAT is not set\n# CONFIG_SENDMAIL is not set\nCONFIG_FEATURE_MIME_CHARSET=\"\"\n\n#\n# Process Utilities\n#\n# CONFIG_FREE is not set\nCONFIG_FUSER=y\nCONFIG_IOSTAT=y\nCONFIG_KILL=y\nCONFIG_KILLALL=y\nCONFIG_KILLALL5=y\nCONFIG_LSOF=y\nCONFIG_MPSTAT=y\n# CONFIG_NMETER is not set\nCONFIG_PGREP=y\nCONFIG_PKILL=y\nCONFIG_PIDOF=y\nCONFIG_FEATURE_PIDOF_SINGLE=y\nCONFIG_FEATURE_PIDOF_OMIT=y\nCONFIG_PMAP=y\n# CONFIG_POWERTOP is not set\n# CONFIG_FEATURE_POWERTOP_INTERACTIVE is not set\nCONFIG_PS=y\n# CONFIG_FEATURE_PS_WIDE is not set\n# CONFIG_FEATURE_PS_LONG is not set\nCONFIG_FEATURE_PS_TIME=y\n# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set\nCONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y\nCONFIG_PSTREE=y\nCONFIG_PWDX=y\nCONFIG_SMEMCAP=y\nCONFIG_BB_SYSCTL=y\n# CONFIG_TOP is not set\n# CONFIG_FEATURE_TOP_INTERACTIVE is not set\n# CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE is not set\n# CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS is not set\n# CONFIG_FEATURE_TOP_SMP_CPU is not set\n# CONFIG_FEATURE_TOP_DECIMALS is not set\n# CONFIG_FEATURE_TOP_SMP_PROCESS is not set\n# CONFIG_FEATURE_TOPMEM is not set\nCONFIG_UPTIME=y\n# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set\nCONFIG_WATCH=y\nCONFIG_FEATURE_SHOW_THREADS=y\n\n#\n# Runit Utilities\n#\n# CONFIG_CHPST is not set\n# CONFIG_SETUIDGID is not set\n# CONFIG_ENVUIDGID is not set\n# CONFIG_ENVDIR is not set\n# CONFIG_SOFTLIMIT is not set\n# CONFIG_RUNSV is not set\n# CONFIG_RUNSVDIR is not set\n# CONFIG_FEATURE_RUNSVDIR_LOG is not set\n# CONFIG_SV is not set\nCONFIG_SV_DEFAULT_SERVICE_DIR=\"\"\n# CONFIG_SVC is not set\n# CONFIG_SVOK is not set\n# CONFIG_SVLOGD is not set\n# CONFIG_CHCON is not set\n# CONFIG_GETENFORCE is not set\n# CONFIG_GETSEBOOL is not set\n# CONFIG_LOAD_POLICY is not set\n# CONFIG_MATCHPATHCON is not set\n# CONFIG_RUNCON is not set\n# CONFIG_SELINUXENABLED is not set\n# CONFIG_SESTATUS is not set\n# CONFIG_SETENFORCE is not set\n# CONFIG_SETFILES is not set\n# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set\n# CONFIG_RESTORECON is not set\n# CONFIG_SETSEBOOL is not set\n\n#\n# Shells\n#\nCONFIG_SH_IS_ASH=y\n# CONFIG_SH_IS_HUSH is not set\n# CONFIG_SH_IS_NONE is not set\nCONFIG_BASH_IS_ASH=y\n# CONFIG_BASH_IS_HUSH is not set\n# CONFIG_BASH_IS_NONE is not set\nCONFIG_SHELL_ASH=y\nCONFIG_ASH=y\n# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set\n# CONFIG_ASH_INTERNAL_GLOB is not set\nCONFIG_ASH_BASH_COMPAT=y\n# CONFIG_ASH_BASH_SOURCE_CURDIR is not set\n# CONFIG_ASH_BASH_NOT_FOUND_HOOK is not set\nCONFIG_ASH_JOB_CONTROL=y\nCONFIG_ASH_ALIAS=y\nCONFIG_ASH_RANDOM_SUPPORT=y\nCONFIG_ASH_EXPAND_PRMT=y\n# CONFIG_ASH_IDLE_TIMEOUT is not set\n# CONFIG_ASH_MAIL is not set\nCONFIG_ASH_ECHO=y\nCONFIG_ASH_PRINTF=y\nCONFIG_ASH_TEST=y\nCONFIG_ASH_HELP=y\nCONFIG_ASH_GETOPTS=y\nCONFIG_ASH_CMDCMD=y\n# CONFIG_CTTYHACK is not set\n# CONFIG_HUSH is not set\n# CONFIG_SHELL_HUSH is not set\n# CONFIG_HUSH_BASH_COMPAT is not set\n# CONFIG_HUSH_BRACE_EXPANSION is not set\n# CONFIG_HUSH_LINENO_VAR is not set\n# CONFIG_HUSH_BASH_SOURCE_CURDIR is not set\n# CONFIG_HUSH_INTERACTIVE is not set\n# CONFIG_HUSH_SAVEHISTORY is not set\n# CONFIG_HUSH_JOB is not set\n# CONFIG_HUSH_TICK is not set\n# CONFIG_HUSH_IF is not set\n# CONFIG_HUSH_LOOPS is not set\n# CONFIG_HUSH_CASE is not set\n# CONFIG_HUSH_FUNCTIONS is not set\n# CONFIG_HUSH_LOCAL is not set\n# CONFIG_HUSH_RANDOM_SUPPORT is not set\n# CONFIG_HUSH_MODE_X is not set\n# CONFIG_HUSH_ECHO is not set\n# CONFIG_HUSH_PRINTF is not set\n# CONFIG_HUSH_TEST is not set\n# CONFIG_HUSH_HELP is not set\n# CONFIG_HUSH_EXPORT is not set\n# CONFIG_HUSH_EXPORT_N is not set\n# CONFIG_HUSH_READONLY is not set\n# CONFIG_HUSH_KILL is not set\n# CONFIG_HUSH_WAIT is not set\n# CONFIG_HUSH_COMMAND is not set\n# CONFIG_HUSH_TRAP is not set\n# CONFIG_HUSH_TYPE is not set\n# CONFIG_HUSH_TIMES is not set\n# CONFIG_HUSH_READ is not set\n# CONFIG_HUSH_SET is not set\n# CONFIG_HUSH_UNSET is not set\n# CONFIG_HUSH_ULIMIT is not set\n# CONFIG_HUSH_UMASK is not set\n# CONFIG_HUSH_GETOPTS is not set\n# CONFIG_HUSH_MEMLEAK is not set\n\n#\n# Options common to all shells\n#\nCONFIG_FEATURE_SH_MATH=y\nCONFIG_FEATURE_SH_MATH_64=y\nCONFIG_FEATURE_SH_MATH_BASE=y\nCONFIG_FEATURE_SH_EXTRA_QUIET=y\n# CONFIG_FEATURE_SH_STANDALONE is not set\n# CONFIG_FEATURE_SH_NOFORK is not set\nCONFIG_FEATURE_SH_READ_FRAC=y\nCONFIG_FEATURE_SH_HISTFILESIZE=y\n# CONFIG_FEATURE_SH_EMBEDDED_SCRIPTS is not set\n\n#\n# System Logging Utilities\n#\n# CONFIG_KLOGD is not set\n# CONFIG_FEATURE_KLOGD_KLOGCTL is not set\nCONFIG_LOGGER=y\n# CONFIG_LOGREAD is not set\n# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set\n# CONFIG_SYSLOGD is not set\n# CONFIG_FEATURE_ROTATE_LOGFILE is not set\n# CONFIG_FEATURE_REMOTE_LOG is not set\n# CONFIG_FEATURE_SYSLOGD_DUP is not set\n# CONFIG_FEATURE_SYSLOGD_CFG is not set\n# CONFIG_FEATURE_SYSLOGD_PRECISE_TIMESTAMPS is not set\nCONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0\n# CONFIG_FEATURE_IPC_SYSLOG is not set\nCONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0\n# CONFIG_FEATURE_KMSG_SYSLOG is not set\n"
  },
  {
    "path": "packages/sysutils/busybox/config/inputrc",
    "content": "# /etc/inputrc - global inputrc for libreadline\n# See readline(3readline) and `info rluserman' for more information.\n\n# Be 8 bit clean.\nset input-meta on\nset output-meta on\n\n# To allow the use of 8bit-characters like the german umlauts, uncomment\n# the line below. However this makes the meta key not work as a meta key,\n# which is annoying to those which don't need to type in 8-bit characters.\n\n# set convert-meta off\n\n# try to enable the application keypad when it is called.  Some systems\n# need this to enable the arrow keys.\n# set enable-keypad on\n\n# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys\n\n# do not bell on tab-completion\n# set bell-style none\n# set bell-style visible\n\n# some defaults / modifications for the emacs mode\n$if mode=emacs\n\n# allow the use of the Home/End keys\n\"\\e[1~\": beginning-of-line\n\"\\e[4~\": end-of-line\n\n# allow the use of the Delete/Insert keys\n\"\\e[3~\": delete-char\n\"\\e[2~\": quoted-insert\n\n# mappings for \"page up\" and \"page down\" to step to the beginning/end\n# of the history\n# \"\\e[5~\": beginning-of-history\n# \"\\e[6~\": end-of-history\n\n# alternate mappings for \"page up\" and \"page down\" to search the history\n# \"\\e[5~\": history-search-backward\n# \"\\e[6~\": history-search-forward\n\n# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving\n\"\\e[1;5C\": forward-word\n\"\\e[1;5D\": backward-word\n\"\\e[5C\": forward-word\n\"\\e[5D\": backward-word\n\"\\e\\e[C\": forward-word\n\"\\e\\e[D\": backward-word\n\n$if term=rxvt\n\"\\e[8~\": end-of-line\n\"\\eOc\": forward-word\n\"\\eOd\": backward-word\n$endif\n\n# for non RH/Debian xterm, can't hurt for RH/Debian xterm\n# \"\\eOH\": beginning-of-line\n# \"\\eOF\": end-of-line\n\n# for freebsd console\n# \"\\e[H\": beginning-of-line\n# \"\\e[F\": end-of-line\n\n$endif\n"
  },
  {
    "path": "packages/sysutils/busybox/config/profile",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n# parse command line arguments\n  for arg in $(cat /proc/cmdline); do\n    case $arg in\n      debugging)\n        export DEBUG=yes\n        ;;\n      progress)\n        PROGRESS=yes\n        ;;\n    esac\n  done\n\n  if [ -e /storage/.cache/debug.libreelec ] ; then\n    export DEBUG=yes\n  fi\n\n# functions\n  progress() {\n    if test \"$PROGRESS\" = yes; then\n      logger -s -t Boot \"### $1 ###\"\n    else\n      logger -t Boot \"### $1 ###\"\n    fi\n  }\n\n# read config files\n  for config in /etc/profile.d/*; do\n    if [ -f \"$config\" ] ; then\n      . $config\n    fi\n  done\n"
  },
  {
    "path": "packages/sysutils/busybox/config/suspend-modules.conf",
    "content": "SUSPEND_MODULES=\"jme asix anysee rtl8192se imon r8712u cx23885 cdc_acm ddbridge brcmfmac 8812au xpad\"\n"
  },
  {
    "path": "packages/sysutils/busybox/default.d/crond.conf",
    "content": ""
  },
  {
    "path": "packages/sysutils/busybox/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"busybox\"\nPKG_VERSION=\"1.32.1\"\nPKG_SHA256=\"9d57c4bd33974140fd4111260468af22856f12f5b5ef7c70c8d9b75c712a0dee\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.busybox.net\"\nPKG_URL=\"https://busybox.net/downloads/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain hdparm hd-idle dosfstools e2fsprogs zip usbutils parted procps-ng gptfdisk libtirpc cryptsetup\"\nPKG_DEPENDS_INIT=\"toolchain libtirpc\"\nPKG_LONGDESC=\"BusyBox combines tiny versions of many common UNIX utilities into a single small executable.\"\nPKG_BUILD_FLAGS=\"-parallel\"\n\n# nano text editor\nif [ \"${NANO_EDITOR}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" nano\"\nfi\n\n# nfs support\nif [ \"${NFS_SUPPORT}\" = yes ]; then\n  PKG_DEPENDS_TARGET+=\" rpcbind\"\nfi\n\nif [ \"${DEVICE}\" = \"Amlogic-ng\" ] || [ \"${DEVICE}\" = \"Amlogic-no\" ]; then\n  PKG_DEPENDS_TARGET+=\" pciutils\"\nfi\n\npre_build_target() {\n  PKG_MAKE_OPTS_TARGET=\"ARCH=${TARGET_ARCH} \\\n                        HOSTCC=${HOST_CC} \\\n                        CROSS_COMPILE=${TARGET_PREFIX} \\\n                        KBUILD_VERBOSE=1 \\\n                        install\"\n\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n  cp -RP ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}\n}\n\npre_build_init() {\n  PKG_MAKE_OPTS_INIT=\"ARCH=${TARGET_ARCH} \\\n                      HOSTCC=${HOST_CC} \\\n                      CROSS_COMPILE=${TARGET_PREFIX} \\\n                      KBUILD_VERBOSE=1 \\\n                      install\"\n\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}-init\n  cp -RP ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}-init\n}\n\nconfigure_target() {\n  cd ${PKG_BUILD}/.${TARGET_NAME}\n    find_file_path config/busybox-target.conf\n    cp ${FOUND_PATH} .config\n\n    # set install dir\n    sed -i -e \"s|^CONFIG_PREFIX=.*$|CONFIG_PREFIX=\\\"${INSTALL}/usr\\\"|\" .config\n\n    if [ ! \"${CRON_SUPPORT}\" = \"yes\" ]; then\n      sed -i -e \"s|^CONFIG_CROND=.*$|# CONFIG_CROND is not set|\" .config\n      sed -i -e \"s|^CONFIG_FEATURE_CROND_D=.*$|# CONFIG_FEATURE_CROND_D is not set|\" .config\n      sed -i -e \"s|^CONFIG_CRONTAB=.*$|# CONFIG_CRONTAB is not set|\" .config\n      sed -i -e \"s|^CONFIG_FEATURE_CROND_SPECIAL_TIMES=.*$|# CONFIG_FEATURE_CROND_SPECIAL_TIMES is not set|\" .config\n    fi\n\n    if [ ! \"${SAMBA_SUPPORT}\" = yes ]; then\n      sed -i -e \"s|^CONFIG_FEATURE_MOUNT_CIFS=.*$|# CONFIG_FEATURE_MOUNT_CIFS is not set|\" .config\n    fi\n\n    # optimize for size\n    CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-Ofast|-Os|\")\n    CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-O.|-Os|\")\n    CFLAGS+=\" -I${SYSROOT_PREFIX}/usr/include/tirpc\"\n\n    LDFLAGS+=\" -fwhole-program\"\n\n    make oldconfig\n}\n\nconfigure_init() {\n  cd ${PKG_BUILD}/.${TARGET_NAME}-init\n    find_file_path config/busybox-init.conf\n    cp ${FOUND_PATH} .config\n\n    # set install dir\n    sed -i -e \"s|^CONFIG_PREFIX=.*$|CONFIG_PREFIX=\\\"${INSTALL}/usr\\\"|\" .config\n\n    # optimize for size\n    CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-Ofast|-Os|\")\n    CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-O.|-Os|\")\n    CFLAGS+=\" -I${SYSROOT_PREFIX}/usr/include/tirpc\"\n\n    LDFLAGS+=\" -fwhole-program\"\n\n    make oldconfig\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    if [ ${TARGET_ARCH} = x86_64 ]; then\n      cp ${PKG_DIR}/scripts/getedid ${INSTALL}/usr/bin\n    else\n      cp ${PKG_DIR}/scripts/dump-active-edids-drm ${INSTALL}/usr/bin/dump-active-edids\n    fi\n    cp ${PKG_DIR}/scripts/create-edid-cpio ${INSTALL}/usr/bin/\n    if [ \"${PROJECT}\" = \"RPi\" ]; then\n      cp ${PKG_DIR}/scripts/update-bootloader-edid-rpi ${INSTALL}/usr/bin/update-bootloader-edid\n      cp ${PKG_DIR}/scripts/getedid-drm ${INSTALL}/usr/bin/getedid\n    fi\n    cp ${PKG_DIR}/scripts/createlog ${INSTALL}/usr/bin/\n    cp ${PKG_DIR}/scripts/dthelper ${INSTALL}/usr/bin\n      ln -sf dthelper ${INSTALL}/usr/bin/dtfile\n      ln -sf dthelper ${INSTALL}/usr/bin/dtflag\n      ln -sf dthelper ${INSTALL}/usr/bin/dtname\n      ln -sf dthelper ${INSTALL}/usr/bin/dtsoc\n    cp ${PKG_DIR}/scripts/ledfix ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/lsb_release ${INSTALL}/usr/bin/\n    cp ${PKG_DIR}/scripts/apt-get ${INSTALL}/usr/bin/\n    cp ${PKG_DIR}/scripts/sudo ${INSTALL}/usr/bin/\n    cp ${PKG_DIR}/scripts/pastebinit ${INSTALL}/usr/bin/\n    cp ${PKG_DIR}/scripts/convert_dtname ${INSTALL}/usr/bin\n      ln -sf pastebinit ${INSTALL}/usr/bin/paste\n    cp ${PKG_DIR}/scripts/vfd-clock ${INSTALL}/usr/bin/\n\n  mkdir -p ${INSTALL}/usr/sbin\n    cp ${PKG_DIR}/scripts/kernel-overlays-setup ${INSTALL}/usr/sbin\n\n  mkdir -p ${INSTALL}/usr/lib/libreelec\n    cp ${PKG_DIR}/scripts/functions ${INSTALL}/usr/lib/libreelec\n    cp ${PKG_DIR}/scripts/fs-resize ${INSTALL}/usr/lib/libreelec\n    sed -e \"s/@DISTRONAME@/${DISTRONAME}/g\" \\\n        -i ${INSTALL}/usr/lib/libreelec/fs-resize\n\n    if listcontains \"${FIRMWARE}\" \"rpi-eeprom\"; then\n      cp ${PKG_DIR}/scripts/rpi-flash-firmware ${INSTALL}/usr/lib/libreelec\n    fi\n\n  mkdir -p ${INSTALL}/usr/lib/systemd/system-generators/\n    cp ${PKG_DIR}/scripts/libreelec-target-generator ${INSTALL}/usr/lib/systemd/system-generators/\n\n  mkdir -p ${INSTALL}/etc\n    cp ${PKG_DIR}/config/profile ${INSTALL}/etc\n    cp ${PKG_DIR}/config/inputrc ${INSTALL}/etc\n    cp ${PKG_DIR}/config/suspend-modules.conf ${INSTALL}/etc\n\n  # /etc/fstab is needed by...\n    touch ${INSTALL}/etc/fstab\n\n  # /etc/machine-id, needed by systemd and dbus\n    ln -sf /storage/.cache/systemd-machine-id ${INSTALL}/etc/machine-id\n\n  # /etc/mtab is needed by udisks etc...\n    ln -sf /proc/self/mounts ${INSTALL}/etc/mtab\n\n  # create /etc/hostname\n    ln -sf /proc/sys/kernel/hostname ${INSTALL}/etc/hostname\n\n  # remove bash symbolic link because we use real bash\n  rm ${INSTALL}/usr/bin/bash\n}\n\npost_install() {\n  echo \"chmod 4755 ${INSTALL}/usr/bin/busybox\" >> ${FAKEROOT_SCRIPT}\n  echo \"chmod 000 ${INSTALL}/usr/cache/shadow\" >> ${FAKEROOT_SCRIPT}\n\n  add_user root \"${ROOT_PASSWORD}\" 0 0 \"Root User\" \"/storage\" \"/bin/sh\"\n  add_group root 0\n  add_group users 100\n\n  add_user nobody x 65534 65534 \"Nobody\" \"/\" \"/bin/sh\"\n  add_group nogroup 65534\n\n  enable_service fs-resize.service\n  enable_service ledfix.service\n  enable_service shell.service\n  enable_service show-version.service\n  enable_service vfd-clock.service\n  enable_service var.mount\n  enable_service locale.service\n  listcontains \"${FIRMWARE}\" \"rpi-eeprom\" && enable_service rpi-flash-firmware.service\n\n  # cron support\n  if [ \"${CRON_SUPPORT}\" = \"yes\" ]; then\n    mkdir -p ${INSTALL}/usr/lib/systemd/system\n      cp ${PKG_DIR}/system.d.opt/cron.service ${INSTALL}/usr/lib/systemd/system\n      enable_service cron.service\n    mkdir -p ${INSTALL}/usr/share/services\n      cp -P ${PKG_DIR}/default.d/*.conf ${INSTALL}/usr/share/services\n      cp ${PKG_DIR}/system.d.opt/cron-defaults.service ${INSTALL}/usr/lib/systemd/system\n      enable_service cron-defaults.service\n  fi\n}\n\nmakeinstall_init() {\n  mkdir -p ${INSTALL}/bin\n    ln -sf busybox ${INSTALL}/usr/bin/sh\n    chmod 4755 ${INSTALL}/usr/bin/busybox\n\n  mkdir -p ${INSTALL}/etc\n    touch ${INSTALL}/etc/fstab\n    ln -sf /proc/self/mounts ${INSTALL}/etc/mtab\n\n  if find_file_path initramfs/platform_init; then\n    cp ${FOUND_PATH} ${INSTALL}\n    sed -e \"s/@BOOT_LABEL@/${DISTRO_BOOTLABEL}/g\" \\\n        -e \"s/@DISK_LABEL@/${DISTRO_DISKLABEL}/g\" \\\n        -i ${INSTALL}/platform_init\n    chmod 755 ${INSTALL}/platform_init\n  fi\n\n  cp ${PKG_DIR}/scripts/functions ${INSTALL}\n  cp ${PKG_DIR}/scripts/init ${INSTALL}\n  sed -e \"s/@DISTRONAME@/${DISTRONAME}/g\" \\\n      -e \"s/@KERNEL_NAME@/${KERNEL_NAME}/g\" \\\n      -e \"s/@SYSTEM_SIZE@/${SYSTEM_SIZE}/g\" \\\n      -i ${INSTALL}/init\n  chmod 755 ${INSTALL}/init\n}\n"
  },
  {
    "path": "packages/sysutils/busybox/patches/busybox-00_halt_no_init.patch",
    "content": "diff -Naur busybox-1.13.2/init/halt.c busybox-1.13.2a/init/halt.c\n--- busybox-1.13.2/init/halt.c\t2008-11-09 18:28:19.000000000 +0100\n+++ busybox-1.13.2a/init/halt.c\t2009-02-01 16:38:37.000000000 +0100\n@@ -79,7 +79,7 @@\n \n \t/* Perform action. */\n \trc = 1;\n-\tif (!(flags & 4)) { /* no -f */\n+\tif (ENABLE_INIT && !(flags & 4)) { /* no -f */\n //TODO: I tend to think that signalling linuxrc is wrong\n // pity original author didn't comment on it...\n \t\tif (ENABLE_FEATURE_INITRD) {\n"
  },
  {
    "path": "packages/sysutils/busybox/patches/busybox-02_silence-crond-startup-logging.patch",
    "content": "From 5f4085ddb16c206b1dc36d481c2aa6684ba392ee Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Thu, 18 Jul 2013 19:26:21 +0300\nSubject: [PATCH] silence crond startup logging\n\n---\n miscutils/crond.c |    1 -\n 1 files changed, 0 insertions(+), 1 deletions(-)\n\ndiff -Naur busybox-1.23.0/miscutils/crond.c busybox-1.23.0.patch/miscutils/crond.c\n--- busybox-1.23.0/miscutils/crond.c\t2014-10-04 22:35:59.000000000 +0200\n+++ busybox-1.23.0.patch/miscutils/crond.c\t2014-12-26 23:07:53.386118290 +0100\n@@ -1054,7 +1054,6 @@\n \t/* Useful on Android where DEFAULT_SHELL /bin/sh may not exist */\n \tG.default_shell = xstrdup(get_shell_name());\n\n-\tlog8(\"crond (busybox \"BB_VER\") started, log level %d\", G.log_level);\n \trescan_crontab_dir();\n \twrite_pidfile(CONFIG_PID_FILE_PATH \"/crond.pid\");\n #if ENABLE_FEATURE_CROND_SPECIAL_TIMES\n"
  },
  {
    "path": "packages/sysutils/busybox/patches/busybox-03-make_unicode_printable.patch",
    "content": "#\n# stolen from OpenWRT\n#\n# https://dev.openwrt.org/attachment/ticket/7993/701-make_unicode_printable.patch\n#\n\n--- a/libbb/printable_string.c\t2013-01-13 20:06:04.210089516 +0800\n+++ b/libbb/printable_string.c\t2013-01-13 20:00:27.917211167 +0800\n@@ -31,8 +31,6 @@\n \t\t}\n \t\tif (c < ' ')\n \t\t\tbreak;\n-\t\tif (c >= 0x7f)\n-\t\t\tbreak;\n \t\ts++;\n \t}\n \n@@ -45,7 +43,7 @@\n \t\t\tunsigned char c = *d;\n \t\t\tif (c == '\\0')\n \t\t\t\tbreak;\n-\t\t\tif (c < ' ' || c >= 0x7f)\n+\t\t\tif (c < ' ')\n \t\t\t\t*d = '?';\n \t\t\td++;\n \t\t}\n"
  },
  {
    "path": "packages/sysutils/busybox/patches/busybox-04-revert-dd-fsync-change.patch",
    "content": "From 0a61b6174d86fd0300be7cd4fa0b47ff12735958 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Tue, 8 Aug 2017 22:25:03 +0100\nSubject: [PATCH] Revert \"dd: call fsync() only once before exiting if\n conv=fsync is specified\"\n\nThis reverts commit dba0dc1999bb1e8bfe64607e2a9385cda361fcb7.\n---\n coreutils/dd.c | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/coreutils/dd.c b/coreutils/dd.c\nindex d302f35..bf0c4ab 100644\n--- a/coreutils/dd.c\n+++ b/coreutils/dd.c\n@@ -531,11 +531,11 @@ int dd_main(int argc UNUSED_PARAM, char **argv)\n \t\t\tif (write_and_stats(ibuf, n, obs, outfile))\n \t\t\t\tgoto out_status;\n \t\t}\n-\t}\n \n-\tif (G.flags & FLAG_FSYNC) {\n-\t\tif (fsync(ofd) < 0)\n-\t\t\tgoto die_outfile;\n+\t\tif (G.flags & FLAG_FSYNC) {\n+\t\t\tif (fsync(ofd) < 0)\n+\t\t\t\tgoto die_outfile;\n+\t\t}\n \t}\n \n \tif (ENABLE_FEATURE_DD_IBS_OBS && oc) {\n-- \n2.7.4\n\n"
  },
  {
    "path": "packages/sysutils/busybox/patches/busybox-05-update-shadow-or-passwd-not-both.patch",
    "content": "diff -Naur a/loginutils/passwd.c b/loginutils/passwd.c\n--- a/loginutils/passwd.c\t2017-07-06 08:14:57.000000000 -0700\n+++ b/loginutils/passwd.c\t2017-09-11 17:06:07.572805135 -0700\n@@ -220,7 +220,7 @@\n \tif (rc > 0)\n \t\t/* password in /etc/shadow was updated */\n \t\tnewp = (char*) \"x\";\n-\tif (rc >= 0)\n+\tif (rc == 0)\n \t\t/* 0 = /etc/shadow missing (not an error), >0 = passwd changed in /etc/shadow */\n #endif\n \t{\n"
  },
  {
    "path": "packages/sysutils/busybox/patches/busybox-06-prevent-root-weak-passwd.patch",
    "content": "diff --git a/loginutils/passwd.c b/loginutils/passwd.c\nindex 6c643d3..df8859d 100644\n--- a/loginutils/passwd.c\n+++ b/loginutils/passwd.c\n@@ -69,7 +69,6 @@ static char* new_password(const struct passwd *pw, uid_t myuid, const char *algo\n \t\tgoto err_ret;\n \tif (ENABLE_FEATURE_PASSWD_WEAK_CHECK\n \t && obscure(orig, newp, pw) /* NB: passing NULL orig is ok */\n-\t && myuid != 0\n \t) {\n \t\tgoto err_ret; /* non-root is not allowed to have weak passwd */\n \t}\n"
  },
  {
    "path": "packages/sysutils/busybox/patches/busybox-10-add-MS_BIND-option-when-remouting-bind-mount.patch",
    "content": "From 5624e803c89ee79afe7c6fd0ef9929110505a800 Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Fri, 20 Sep 2019 18:58:30 +0200\nSubject: [PATCH] add MS_BIND option when remouting bind mount\n\nwhen remounting bind mount add explicit MS_BIND to parameters\nto \"hide\" bind mount from user's view\n\nbind mount is only visible from /proc/self/mountinfo that's\nwhy we traverse the lines and using last entry in case\nmultiple sources are mount over same mount point\n\nSigned-off-by: Peter Vicman <peter.vicman@gmail.com>\n---\n util-linux/mount.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 48 insertions(+)\n\ndiff --git a/util-linux/mount.c b/util-linux/mount.c\nindex 84c85c0..bc3fbda 100644\n--- a/util-linux/mount.c\n+++ b/util-linux/mount.c\n@@ -1887,6 +1887,50 @@ static int nfsmount(struct mntent *mp, unsigned long vfsflags, char *filteropts)\n \n #endif // !ENABLE_FEATURE_MOUNT_NFS\n \n+// Check mount point in /proc/self/mountinfo and identify bind mount\n+// return 1 for bind mount, 0 for normal mount\n+static int check_bind_mount(struct mntent *mp)\n+{\n+int mnt_dir_len;\n+char *p;\n+FILE *fp;\n+char *line = NULL;\n+int ret = 0;\n+\n+\t// https://www.kernel.org/doc/Documentation/filesystems/proc.txt\n+\t// 21 20 179:20 /coreelec_flash /flash ro,noatime shared:2 - ext4 /dev/data rw,resgid=1065,data=ordered\n+\t// 20 22 179:1 / /flash ro,noatime shared:2 - vfat /dev/mmcblk1p1 ro,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro\n+\n+\tfp = fopen(\"/proc/self/mountinfo\", \"r\");\n+\tif (fp == NULL)\n+\t\treturn ret;\n+\n+\t// remove trailing slash\n+\tmnt_dir_len = strlen(mp->mnt_dir);\n+\tif (mnt_dir_len > 1 && mp->mnt_dir[mnt_dir_len - 1] == '/') {\n+\t\tmnt_dir_len--;\n+\t\tmp->mnt_dir[mnt_dir_len] = '\\0';\n+\t}\n+\n+\twhile ((line = xmalloc_fgetline(fp)) != NULL) {\n+\t\t// find mount point\n+\t\tp = strstr(line, mp->mnt_dir);\n+\t\tif (p == NULL)\n+\t\t\tcontinue;\n+\t\t\t\n+\t\t// bind mount has folder for root and not just \"/\"\n+\t\tret = 0;  // always use result from last entry\n+\t\tif (strncmp(p - 2, \"/ \", 2) != 0)\n+\t\t\tret = 1;\n+\t}\n+\n+\tif (line != NULL)\n+\t\tfree(line);\n+\n+\tfclose(fp);\n+\treturn ret;\n+}\n+\n // Mount one directory.  Handles CIFS, NFS, loopback, autobind, and filesystem\n // type detection.  Returns 0 for success, nonzero for failure.\n // NB: mp->xxx fields may be trashed on exit\n@@ -2058,6 +2102,10 @@ static int singlemount(struct mntent *mp, int ignore_busy)\n \t\t\tvfsflags |= MS_BIND;\n \t}\n \n+\t// add explicit MS_BIND if remounting bind mount\n+\tif ((vfsflags & MS_REMOUNT) && (check_bind_mount(mp) == 1))\n+\t\tvfsflags |= MS_BIND;\n+\n \t// If we know the fstype (or don't need to), jump straight\n \t// to the actual mount.\n \tif (mp->mnt_type || (vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE))) {\n-- \n2.7.4\n\n"
  },
  {
    "path": "packages/sysutils/busybox/profile.d/10-locale.conf",
    "content": "# don't overwrite value set by Locale Kodi addon\nif [ -z \"${LOCPATH}\" ]; then\n  export LANG=\"C.UTF-8\"\n  export LOCPATH=\"/storage/.cache/locpath\"\nfi\n"
  },
  {
    "path": "packages/sysutils/busybox/profile.d/98-busybox.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nexport HOME=\"/storage\"\nexport PATH=\"/usr/bin:/usr/sbin\"\nexport LD_LIBRARY_PATH=\"/usr/lib\"\nexport HOSTNAME=`cat /etc/hostname`\nexport PS1=\"\\[\\e[1;32m\\]\\h\\[\\e[1;32m\\]:\\[\\e[1;34m\\]\\w \\[\\e[0m\\]\\\\$ \"\nexport HISTFILESIZE=200\n# k0p\ncase \"$TERM\" in\n  linux|nxterm|screen|xterm|xterm-color|st-256color)\n    ;;\n  \"\")\n    export TERM=\"linux\"\n    ;;\n  *)\n    export TERM=\"xterm\"\n    ;;\nesac\n\n# aliases for interactive shell\ncase \"$-\" in\n  *i*)\n    alias ll='ls -alF'\n    alias h='history'\n    alias jc='journalctl --no-pager'\n    alias mf='mount -o remount,rw /flash'\n    alias umf='mount -o remount,ro /flash'\n    alias sc='systemctl'\n    alias kodi-stop='systemctl stop kodi'\n    alias kodi-start='systemctl start kodi'\n    alias kodi-restart='systemctl restart kodi'\n    alias kodi-mask='systemctl mask kodi'\n    alias kodi-unmask='systemctl unmask kodi'\n    alias kodi-toggle-debug='kodi-send -a ToggleDebug'\n    alias kodi-take-screenshot='kodi-send -a TakeScreenshot'\n    ;;\nesac\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/apt-get",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nmessage=\"$message\\n There is no working 'apt-get'.\"\nmessage=\"$message\\n \"\nmessage=\"$message\\n 'apt-get' is a command to install, update and remove software which\"\nmessage=\"$message\\n is stored in a non local repo. 'apt-get' does nothing then connecting to such\"\nmessage=\"$message\\n repo, downloads the software, unpacks the software, updates a big\"\nmessage=\"$message\\n local database with all filepaths and other informations about the\"\nmessage=\"$message\\n installed software or removes or updates installed Software.\"\nmessage=\"$message\\n \"\nmessage=\"$message\\n With LibreELEC it is not possible to change the system for security and\"\nmessage=\"$message\\n stability reasons so even 'apt-get' would not be able to do this.\"\nmessage=\"$message\\n We also dont have and want to maintain such a repo for various other\"\nmessage=\"$message\\n great reasons.\"\nmessage=\"$message\\n \"\nmessage=\"$message\\n Also Ubuntu or Debian packages are often outdated and not compatible\"\nmessage=\"$message\\n with LibreELEC\"\nmessage=\"$message\\n \"\nmessage=\"$message\\n TIP: use Kodi's addon browser to enhance your LibreELEC system\"\n\necho -e $message\nexit 1\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/convert_dtname",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nDT_ID=${1}\n\nif [ -z \"${SYSTEM_ROOT}\" ]; then\n  MULTIDTB_CONF=\"/usr/share/bootloader/dtb.conf\"\nelse\n  MULTIDTB_CONF=\"${SYSTEM_ROOT}/usr/share/bootloader/dtb.conf\"\n  export PATH=\"$PATH:${SYSTEM_ROOT}/usr/bin:${SYSTEM_ROOT}/usr/sbin\"\n  export LD_LIBRARY_PATH=\"${SYSTEM_ROOT}/usr/lib\"\nfi\n\nif [ -n \"${DT_ID}\" -a -f ${MULTIDTB_CONF} ]; then\n  # filter obsolete dtb by dtb.conf and migrate to new DT_ID\n  migratedtb_cnt=$(xmlstarlet sel -t -c \"count(//dtb/migratedtb)\" ${MULTIDTB_CONF})\n  cnt_m=1\n  while [ ${cnt_m} -le ${migratedtb_cnt} ]; do\n    migratedtb=$(xmlstarlet sel -t -v \"//dtb/migratedtb[${cnt_m}]/@coreelec-dt-id\" ${MULTIDTB_CONF})\n    if [ \"${DT_ID}\" == \"${migratedtb}\" ]; then\n      subdevice=$(xmlstarlet sel -t -v \"//dtb/migratedtb[${cnt_m}]/@subdevice\" ${MULTIDTB_CONF})\n      migratedtid=$(xmlstarlet sel -t -v \"//dtb/migratedtb[${cnt_m}]/migratedtid\" ${MULTIDTB_CONF})\n      migratecmd=$(xmlstarlet sel -t -v \"//dtb/migratedtb[${cnt_m}]/migratecmd\" ${MULTIDTB_CONF})\n      DT_ID=\"${migratedtid}\"\n      [ -n \"${subdevice}\" ] && SUBDEVICE=\"${subdevice}\"\n      [ -n \"${migratecmd}\" ] && MIGRATE_DTB=$(echo ${migratecmd} | xmlstarlet unesc)\n      break\n    fi\n    cnt_m=$((cnt_m+1))\n  done\n\n  # modify DT_ID and SUBDEVICE by dtb.conf if available\n  multidtb_cnt=$(xmlstarlet sel -t -c \"count(//dtb/multidtb)\" ${MULTIDTB_CONF})\n  cnt_m=1\n  while [ ${cnt_m} -le ${multidtb_cnt} ]; do\n    multidtb=$(xmlstarlet sel -t -v \"//dtb/multidtb[${cnt_m}]/@name\" ${MULTIDTB_CONF})\n    subdevice=$(xmlstarlet sel -t -v \"//dtb/multidtb[${cnt_m}]/@subdevice\" ${MULTIDTB_CONF})\n    files_cnt=$(xmlstarlet sel -t -c \"count(//dtb/multidtb[${cnt_m}]/file)\" ${MULTIDTB_CONF})\n    cnt_f=1\n    while [ ${cnt_f} -le ${files_cnt} ]; do\n      file=$(xmlstarlet sel -t -v \"//dtb/multidtb[${cnt_m}]/file[${cnt_f}]\" ${MULTIDTB_CONF})\n      cnt_f=$((cnt_f+1))\n      if [ \"${DT_ID}.dtb\" = \"${file}\" ]; then\n        DT_ID=\"${multidtb%%.*}\"\n        [ -n \"${subdevice}\" ] && SUBDEVICE=\"${subdevice}\"\n        break 2\n      fi\n    done\n    cnt_m=$((cnt_m+1))\n  done\nfi\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/create-edid-cpio",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nEDID_DIR=\"/storage/.config/firmware/edid\"\nEDID_CPIO=\"/flash/edid.cpio\"\nTMPDIR=\"/tmp/edid-cpio\"\n\nif [ \"$1\" = \"-q\" ]; then\n  VERBOSE=0\nelse\n  VERBOSE=1\nfi\n\nif [ ! -d \"${EDID_DIR}\" ]; then\n  echo \"error: ${EDID_DIR} does not exist\"\n  exit 1\nfi\n\nset -e\n\nrm -rf \"${TMPDIR}\"\nmkdir -p \"${TMPDIR}/usr/lib/firmware\"\ncp -r \"${EDID_DIR}\" \"${TMPDIR}/usr/lib/firmware\"\ncd \"${TMPDIR}\"\nmount -o remount,rw /flash\nfind usr -print | cpio -ov -H newc > \"${EDID_CPIO}\"\nsync\nmount -o remount,ro /flash\ncd /storage\nrm -rf \"${TMPDIR}\"\n\nif [ \"${VERBOSE}\" = \"1\" ]; then\n  echo \"successfully created ${EDID_CPIO}\"\nfi\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/createlog",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n# create logfile\n\nDATE=`date -u +%Y-%m-%d-%H.%M.%S`\nBASEDIR=\"/tmp\"\nLOGDIR=\"log-$DATE\"\nRELEASE=\"`cat /etc/release`\"\nGIT=\"`cat /etc/issue | grep git`\"\n\ngetlog_cmd() {\n  if command -v $1 >/dev/null; then\n    echo \"################################################################################\" >> $BASEDIR/$LOGDIR/$LOGFILE\n    echo \"# ... output of $@\" >> $BASEDIR/$LOGDIR/$LOGFILE\n    echo \"# LibreELEC release: $RELEASE\" >> $BASEDIR/$LOGDIR/$LOGFILE\n    echo \"# $GIT\" >> $BASEDIR/$LOGDIR/$LOGFILE\n    echo \"################################################################################\" >> $BASEDIR/$LOGDIR/$LOGFILE\n    $@ >> $BASEDIR/$LOGDIR/$LOGFILE 2>/dev/null\n    echo \"\" >> $BASEDIR/$LOGDIR/$LOGFILE\n  fi\n}\n\nget_governor_details() {\n  (\n    cat_all_files /sys/devices/system/cpu\n    cat_all_files /sys/devices/system/cpu/cpufreq\n    for cpun in /sys/devices/system/cpu/cpu[0-9]*; do\n      cat_all_files ${cpun}/cpufreq\n    done\n  )\n}\n\ncat_all_files() {\n  local adir=$1\n  local afile var\n\n  [ -d ${adir} ] || return 0\n\n  echo \"${adir}\"\n\n  cd ${adir}\n  for afile in $(find . -maxdepth 1 -print | sort); do\n    afile=${afile:2}\n    if [ -n \"${afile}\" ]; then\n      if [ -d ${afile} ]; then\n        var=\"<dir>\"\n      else\n        var=\"$(cat ${afile} 2>/dev/null)\"\n      fi\n      [ -n \"${var}\" ] && printf \"    %-30s : %s\\n\" \"${afile}\" \"${var}\"\n    fi\n  done\n}\n\nrm -rf $BASEDIR/$LOGDIR\nmkdir -p $BASEDIR/$LOGDIR\n\n# kodi.log\n  KODI_LOG_DIR=/storage/.kodi/temp\n\n  LOGFILE=\"01_KODI.log\"\n  for i in kodi.log kodi.old.log; do\n    [ -f ${KODI_LOG_DIR}/${i} ] && getlog_cmd cat ${KODI_LOG_DIR}/$i\n  done\n\n  LOGFILE=\"01_KODI_CRASH.log\"\n  for i in `find ${KODI_LOG_DIR} -type f -name \"kodi_crashlog_*.log\" | sort -r`; do\n    getlog_cmd cat $i\n  done\n\n  LOGFILE=\"01_KODI_OTHER.log\"\n  for i in `find ${KODI_LOG_DIR} -type f -name \"*.log\" | sort`; do\n    iname=\"${i#${KODI_LOG_DIR}/}\"\n    [ ${iname} == kodi.log ] && continue\n    [ ${iname} == kodi.old.log ] && continue\n    [ \"${iname#kodi_crashlog_}\" != \"${iname}\" ] && continue\n    getlog_cmd cat $i\n  done\n\n# System.log\n  LOGFILE=\"02_System.log\"\n  getlog_cmd dmesg\n  getlog_cmd lsmod\n  getlog_cmd ps xa\n  for i in /storage/.config/hwdb.d/*.hwdb \\\n      /storage/.config/modprobe.d/*.conf \\\n      /storage/.config/modules-load.d/*.conf \\\n      /storage/.config/sleep.d/*.power \\\n      /storage/.config/sysctl.d/*.conf \\\n      /storage/.config/udev.rules.d/*.rules \\\n  ; do\n    if [ -f \"$i\" ] ; then\n      getlog_cmd cat $i\n    fi\n  done\n  if [ -f \"/storage/.config/autostart.sh\" ] ; then\n    getlog_cmd cat /storage/.config/autostart.sh\n  fi\n  if [ -f \"/storage/.config/shutdown.sh\" ] ; then\n    getlog_cmd cat /storage/.config/shutdown.sh\n  fi\n  getlog_cmd ls -laR /storage/.config/system.d\n  # note: we dont add .mount units here as they may contan\n  # login credentials\n  for i in /storage/.config/system.d/*.service ; do\n    if [ -f \"$i\" -a ! -L \"$i\" ] ; then\n      getlog_cmd cat $i\n    fi\n  done\n\n# Hardware.log\n  LOGFILE=\"03_Hardware.log\"\n  getlog_cmd lspci -vvvvnn\n  getlog_cmd lsusb -vvv\n  getlog_cmd lsusb -t\n  getlog_cmd cat /proc/cpuinfo\n  getlog_cmd get_governor_details\n  getlog_cmd cat /proc/meminfo\n\n# Audio.log\n  LOGFILE=\"04_Audio.log\"\n  getlog_cmd aplay -l\n  getlog_cmd aplay -L\n  getlog_cmd amixer\n\n# Network.log\n  LOGFILE=\"05_Network.log\"\n  getlog_cmd ifconfig -a\n  getlog_cmd netstat -rn\n  getlog_cmd netstat -nalp\n  getlog_cmd connmanctl services\n  getlog_cmd cat /etc/resolv.conf\n\n# varlog.log\n  LOGFILE=\"06_varlog.log\"\n  for i in `find /var/log -name journal -prune -o -type f -print`; do\n    getlog_cmd cat $i\n  done\n\n# Input.log\n  LOGFILE=\"07_input.log\"\n  getlog_cmd cat /proc/bus/input/devices\n  # make RPi users happy\n  if [ -e /proc/acpi/wakeup ] ; then\n    getlog_cmd cat /proc/acpi/wakeup\n  fi\n\n# Filesystem.log\n  LOGFILE=\"08_Filesystem.log\"\n  getlog_cmd cat /proc/mounts\n  getlog_cmd df -h\n  getlog_cmd blkid\n\n# Journal (current)\n  LOGFILE=\"09_Journal-cur.log\"\n  getlog_cmd journalctl --no-pager -b -0\n\n# Journal (prev)\n  LOGFILE=\"10_Journal-prev.log\"\n  getlog_cmd journalctl --no-pager -b -1\n\n# addons\n  LOGFILE=\"11_Addons.log\"\n  for i in /storage/.kodi/userdata/addon_data/*/*.log \\\n      /storage/.kodi/userdata/addon_data/*/log/* \\\n  ; do\n    if [ -f \"$i\" ] ; then\n      getlog_cmd cat $i\n    fi\n  done\n\n# pack logfiles\n  mkdir -p /storage/logfiles\n  zip -jq /storage/logfiles/log-$DATE.zip $BASEDIR/$LOGDIR/*\n\n# remove logdir\n  rm -rf $BASEDIR/$LOGDIR\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/dthelper",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nCOMPATIBLE=$(cat /proc/device-tree/compatible 2>/dev/null | tr -d '\\000' | sed -n -e 's/.*\\(allwinner\\|amlogic\\|fsl\\|nxp\\|qcom\\|raspberrypi\\|rockchip\\|samsung\\).*/\\1/p')\n\ndo_dtfile(){\n  if [[ -n $(find /flash -name dtb.img) ]]; then\n    DTFILE=\"/flash/dtb.img\"\n  elif [[ -n $(find /flash -name extlinux.conf) ]]; then\n    EXTLINUX=$(find /flash -name extlinux.conf)\n    DTFILE=$(grep FDT \"${EXTLINUX}\" | sed 's,^ *FDT /,,g')\n  elif [ -e /flash/boot.ini ]; then\n    DTFILE=$(grep -m 1 dtb_name /flash/boot.ini | cut -d \\\" -f2 | sed 's,/dtb/,,g')\n  elif [ -e /flash/uEnv.ini ]; then\n    DTFILE=$(grep dtb_name /flash/uEnv.ini | sed 's,dtb_name=/dtb/,,g')\n  else\n    do_unknown\n  fi\n  echo \"${DTFILE}\"\n}\n\ndo_dtflag(){\n  if [ \"${COMPATIBLE}\" = \"raspberrypi\" ]; then\n    DTFLAG=$(cat /proc/device-tree/compatible | cut -f1,2 -d',' | head -n 1)\n    PIREV=$(awk '/^Revision/ {sub($3,-6, \"\", $3); print $3}' /proc/cpuinfo) # truncate to 6-chars\n    case \"${PIREV}\" in\n      d*)\n        MEMSIZE=\"-8g\"\n        ;;\n      c*)\n        MEMSIZE=\"-4g\"\n        ;;\n      b*)\n        MEMSIZE=\"-2g\"\n        ;;\n      a*)\n        MEMSIZE=\"-1g\"\n        ;;\n      *0002|*0003|*0004|*0005|*0006|*0007|*0008|*0009|*0012)\n        MEMSIZE=\"-256\"\n        ;;\n      0*|9*)\n        MEMSIZE=\"-512\"\n        ;;\n      *)\n        MEMSIZE=\"\"\n        ;;\n    esac\n  else\n    DTFLAG=\"unknown\"\n    if [ -f /proc/device-tree/coreelec-dt-id ]; then\n      DTFLAG=$(tr -d '\\0' < /proc/device-tree/coreelec-dt-id)\n    fi\n    MEMSIZE=$(awk -F \" \" '/MemTotal:/ {print $2}' /proc/meminfo)\n    if [ \"${MEMSIZE}\" -lt \"524288\" ]; then\n      MEMSIZE=\"-512\"\n    else\n      MEMSIZE=\"\"\n    fi\n  fi\n  echo \"${DTFLAG}${MEMSIZE}\"\n}\n\ndo_dtname(){\n  DTNAME=\"unknown\"\n  if [ -f /proc/device-tree/coreelec-dt-id ]; then\n    DTNAME=$(tr -d '\\0' < /proc/device-tree/coreelec-dt-id)\n  fi\n  echo \"${DTNAME}\"\n}\n\ndo_dtsoc(){\n  DTSOC=$(awk -F', ' '{print $2}' /proc/device-tree/compatible)\n  echo \"${DTSOC}\"\n}\n\ndo_unknown(){\n  echo \"unknown\"\n  exit 1\n}\n\nif [ -n \"${COMPATIBLE}\" ]; then\n  case $(basename \"${0}\") in\n    dtfile)\n      do_dtfile\n      ;;\n    dtflag)\n      do_dtflag\n      ;;\n    dtname)\n      do_dtname\n      ;;\n    dtsoc)\n      do_dtsoc\n      ;;\n  esac\nelse\n  do_unknown\nfi\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/dump-active-edids-drm",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nEDID_DIR=\"/storage/.config/firmware/edid\"\nCONNECTORS=\"\"\n\nif [ \"$1\" = \"-q\" ]; then\n  VERBOSE=0\nelse\n  VERBOSE=1\nfi\n\ninfo() {\n  [ \"${VERBOSE}\" = \"1\" ] && echo \"$@\"\n}\n\nmkdir -p \"${EDID_DIR}\"\n\nfor c in /sys/class/drm/card?-* ; do\n  [ ! -d \"$c\" ] && continue\n  [ ! -e \"$c/status\" ] && continue\n\n  if [ $(cat $c/status 2>/dev/null) = \"connected\" ]; then\n    CONNECTOR=$(basename $c | cut -c 7-)\n    EDID_NAME=\"edid-${CONNECTOR}.bin\"\n    cat $c/edid > \"${EDID_DIR}/${EDID_NAME}\" 2>/dev/null\n    if [ $? -eq 0 ]; then\n      [ -n \"${CONNECTORS}\" ] && CONNECTORS=\"${CONNECTORS} \"\n      CONNECTORS=\"${CONNECTORS}${CONNECTOR}\"\n    fi\n  fi\ndone\n\nif [ -z \"${CONNECTORS}\" ]; then\n  info \"error: no active connectors found\"\n  exit 1\nelse\n  info \"found active connector(s) ${CONNECTORS}\"\n  [ \"${VERBOSE}\" = \"0\" ] && echo \"${CONNECTORS}\"\nfi\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/fs-resize",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nStartProgressLog() {\n  if [ \"$1\" = \"spinner\" ]; then\n    echo \"*** $3\" >>$LOG\n  fi\n  StartProgress \"$@\"\n}\n\nif [ -e /storage/.please_resize_me ] ; then\n  . /usr/lib/libreelec/functions\n\n  hidecursor\n\n  mount -o remount,rw /flash\n  LOG=/flash/fs-resize.log\n  date -Iseconds >>$LOG\n\n  # this sh** was never intended to be used\n  # on already installed and runing system\n  if [ -d /storage/.kodi -o -d /storage/.config -o -d /storage/.cache ] ; then\n    rm -f /storage/.please_resize_me\n    sync\n    echo \"Resizing is not permitted - the system has already been initialised.\" | tee -a $LOG\n    mount -o remount,ro /flash\n    StartProgress countdown \"Rebooting in 15s... \" 15 \"NOW\"\n    reboot -f\n  fi\n\n  # get the disk. /storage on 2nd partition\n  echo $(grep \"/storage \" /proc/mounts) >>$LOG\n  PART=$(grep \"/storage \" /proc/mounts | cut -d\" \" -f1 | grep '2$')\n\n  # get disk: /dev/sdx2 -> /dev/sdx, /dev/mmcblkxp2 -> /dev/mmcblkx\n  case $PART in\n    \"/dev/mmcblk\"*|\"/dev/nvme\"*)\n      DISK=$(echo $PART | sed s/p2$//g)\n      ROMS_PART_NAME=\"${DISK}p3\"\n      ;;\n    *)\n      DISK=$(echo $PART | sed s/2$//g)\n      ROMS_PART_NAME=\"${DISK}3\"\n      ;;\n  esac\n\n  rm -f /storage/.please_resize_me\n  sync\n\n  echo \"DISK: $DISK  PART: $PART\" >>$LOG\n\n  # just in case\n  if [ ! -z \"$DISK\" -a ! -z \"$PART\" ] ; then\n    umount $PART\n\n    DISK_NAME=$(basename $DISK)\n    DISK_SECTORS=$(cat \"/sys/block/$DISK_NAME/size\") # Obtain the disk sectors count, each sector is always 512 Bytes large, independent of the underlying device, according to https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/types.h#n117\n    DISK_SIZE=$(( $DISK_SECTORS * 512 )) # Calculate the disk actual size, in byte\n    if [ $DISK_SIZE -gt 8589934592 ]; then # The optimal behaviour, this will leave 6GiB to storage, and create the EEROMS partition\n      ROMS_CREATE='yes'\n      STORAGE_END='8GiB'\n    elif [ $DISK_SIZE -gt 3221225472 ]; then  # Optionaly omit the EEROMS partition for 4GB cards/drives\n      ROMS_CREATE=''\n      ROMS_OMIT_MANUAL=''\n      STORAGE_END='100%'\n    else\n      # The bare minumum a EmuELEC image itself needs is 2186280960, but after adding in user configs things become uncontrollable, so we don't care about disks with size between 2085MiB and 3GiB\n      echo 'ERROR: You disk is too small! You need to use a USB drive/SD card that is at least 4GB!'\n      echo 'ERROR: You should NOT try to boot up this drive as it is NOT properly resized!'\n      StartProgress countdown \"Powering off in 30s...     \" 30 \"NOW\"\n      poweroff\n    fi\n\n    echo \"PARTITION RESIZING IN PROGRESS\"\n    echo \"\"\n    echo \"Please do not reboot or turn off your @DISTRONAME@ device!\"\n    echo \"\"\n\n    # identify the partition scheme, and if gpt fix minor issues such as gpt header not at end of disk\n    SCHEME=$(blkid -s PTTYPE -o value $DISK)\n    if [ \"$SCHEME\" = \"gpt\" ]; then\n      StartProgressLog spinner \"Checking layout...      \" \"sgdisk -e $DISK >>$LOG 2>&1\"\n    fi\n    \n    if [ \"$ROMS_CREATE\" ]; then\n      # EmueELEC Get EEROMS filetype\n      ROM_FS_TYPE=\"vfat\"\n      PARTED_FS_TYPE=\"fat32\"\n\n      if [ -e \"/flash/ee_fstype\" ]; then\n        EE_FS_TYPE=$(cat \"/flash/ee_fstype\")\n        \n        case $EE_FS_TYPE in\n        \"ntfs\")\n            ROM_FS_TYPE=\"ntfs\"\n            PARTED_FS_TYPE=\"ntfs\"\n        ;;\n        \"ext4\")\n            ROM_FS_TYPE=\"ext4\"\n            PARTED_FS_TYPE=\"ext4\"\n        ;;\n        \"exfat\")\n            ROM_FS_TYPE=\"exfat\"\n            PARTED_FS_TYPE=\"ntfs\"\n        ;;\n        \"no\")\n            ROMS_CREATE=''\n            ROMS_OMIT_MANUAL='yes'\n            STORAGE_END='100%'\n        ;;\n        *)\n            # Failsafe\n            ROM_FS_TYPE=\"vfat\"\n            PARTED_FS_TYPE=\"fat32\"\n        ;;\n        esac    \n        \n      fi\n    fi\n\n    StartProgress spinner \"Resizing partition...   \" \"parted -s -a optimal -m $DISK resizepart 2 $STORAGE_END &>/dev/null\"\n    StartProgress spinner \"Checking file system... \" \"e2fsck -f -p $PART &>/dev/null\"\n    StartProgress spinner \"Resizing file system... \" \"resize2fs $PART &>/dev/null\"\n    if [ \"$ROMS_CREATE\" ]; then\n      StartProgress spinner \"Creating EEROMS partition...\" \"parted -s -a optimal -m $DISK mkpart primary ${PARTED_FS_TYPE} ${STORAGE_END} 100% &>/dev/null\"\n      partprobe &>/dev/null\n      case $ROM_FS_TYPE in \n        \"ntfs\")\n        StartProgress spinner \"Formatting EEROMS partition as NTFS...\" \"mkfs.ntfs -L EEROMS -f ${ROMS_PART_NAME} &>/dev/null\"\n        ;;\n        \"ext4\")\n        StartProgress spinner \"Formatting EEROMS partition as EXT4...\" \"mkfs.ext4 -L EEROMS -t ext4 -O 64bit ${ROMS_PART_NAME} &>/dev/null\"\n        ;;\n        \"exfat\")\n        StartProgress spinner \"Formatting EEROMS partition as EXFAT...\" \"mkfs.exfat -n EEROMS ${ROMS_PART_NAME} &>/dev/null\"\n        ;;\n        *)\n        StartProgress spinner \"Formatting EEROMS partition as FAT32...\" \"mkfs.vfat -n EEROMS ${ROMS_PART_NAME} &>/dev/null\"\n        ;;\n      esac   \n    elif [ \"$ROMS_OMIT_MANUAL\" ]; then\n      echo 'WARNING: EEROMS partition is omitted manually even your drive size is >=8GB, YOU KNOW WHAT YOU ARE DOING'\n      mount -o rw,remount /flash\n      rm -f /flash/ee_fstype # Mark should be cleaned since the 'no' fstype has no use afterwards\n    else\n      echo 'WARNING: EEROMS partition is omitted for <8GB drives'\n    fi\n    StartProgress countdown \"Rebooting in 5s...     \" 5 \"NOW\"\n  fi\n  mount -o remount,ro /flash\nfi\nreboot -f &>/dev/null\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/functions",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n# Need a read/write location, as tmp may not always be available\nmkdir -p /dev/.progress\nrm -f /dev/.progress/*\n\n# Show frame-buffer cursor\nshowcursor() {\n  echo -en \"\\033[?25h\"\n\n  # show cursor\n  if [ -f /sys/devices/virtual/graphics/fbcon/cursor_blink ] ; then\n    echo 1 > /sys/devices/virtual/graphics/fbcon/cursor_blink\n  fi\n}\n\n# Hide frame-buffer cursor\nhidecursor() {\n  echo -en \"\\033[?25l\"\n\n  if [ -f /sys/devices/virtual/graphics/fbcon/cursor_blink ] ; then\n    echo 0 > /sys/devices/virtual/graphics/fbcon/cursor_blink\n  fi\n}\n\n# Start a progress meter\n# $1: spinner, percent, countdown\n# $2: message to display\n# [spinner]\n#   $3: optional command to execute\n#   $4: optional success completion message (nothing if not specified)\n#   $5: optional failure completion message ($4 if not specified)\n# [percent]\n#   $3: name of filename to be progress monitored\n#   $4: terminal size (in bytes) of $3 when progress is complete\n#   $5: optional command to execute\n#   $6: optional success message (100% if not specified)\n#   $7: optional failure message ($6 if not specified)\n# [countdown]\n#   $3: number of seconds to start counting down from\n#   $4: optional completion message, default is nothing\nStartProgress() {\n  local cmdresult=0\n\n  # Use files for inter-process communication.\n  # This file is used to indicate a metter is running/active\n\n  echo > /dev/.progress/run\n\n  case \"$1\" in\n    spinner)\n      ProgressTask_Spinner \"$2\" &\n      if [ -n \"$3\" ]; then\n        eval \"$3\"\n        cmdresult=$?\n        [ $cmdresult -eq 0 ] && StopProgress \"${4}\" || StopProgress \"${5:-$4}\"\n      fi\n      ;;\n    percent)\n      ProgressTask_Percent \"$2\" \"$3\" $4 &\n      if [ -n \"$5\" ]; then\n        eval \"$5\"\n        cmdresult=$?\n        [ $cmdresult -eq 0 ] && StopProgress \"${6}\" || StopProgress \"${7:-$6}\"\n      fi\n      ;;\n    countdown)\n      ProgressTask_Countdown \"$2\" $3 \"$4\"\n      ;;\n    *)\n      echo \"Unknown spinner type: $1\"\n      return 1\n      ;;\n  esac\n\n  return $cmdresult\n}\n\n# Stop a progress meter, displaying optional completion message\n# $1: optional completion message (appropriate default used if not specified)\nStopProgress() {\n  # Instruct running progress meter to end, showing specified completion message\n  echo \"${1}\" > /dev/.progress/stop\n\n  # Wait for progress meter to stop running\n  while [ -f /dev/.progress/run ]; do\n    usleep 250000\n  done\n\n  # Clean up\n  rm -f /dev/.progress/stop\n  return 0\n}\n\n# Use this task for processes of indeterminate duration\nProgressTask_Spinner() {\n  local msg=\"$1\"\n  local spinner=\"|/-\\\\|/-\\\\\"\n  local count=0 donemsg\n\n  echo -n \"${msg} \"\n\n  while [ ! -f /dev/.progress/stop ]; do\n    echo -en \"\\b${spinner:$count:1}\"\n    usleep 500000\n    count=$(((count + 1) % 8))\n  done\n\n  donemsg=\"$(cat /dev/.progress/stop)\"\n  echo -e \"\\b${donemsg:-done}\"\n\n  rm -f /dev/.progress/run\n\n  exit 0\n}\n\n# Use this task when transferring a file of known size\nProgressTask_Percent() {\n  local msg=\"$1\" filename=\"$2\" fsize=$3 csize donemsg\n\n  echo -n \"${msg}    \"\n\n  while [ ! -f /dev/.progress/stop ]; do\n    [ -f ${filename} ] && csize=$(stat -t \"${filename}\" | awk '{print $2}') || csize=0\n    echo $csize $fsize | awk '{ printf \"\\b\\b\\b\\b%3d%%\", ($1 * 100 / $2) }'\n    usleep 250000\n  done\n\n  donemsg=\"$(cat /dev/.progress/stop)\"\n  echo -e \"\\b\\b\\b\\b${donemsg:-100%}\"\n\n  rm -f /dev/.progress/run\n\n  exit 0\n}\n\n# Use this task to countdown a number of seconds\n# (needs more work for durations > 99 seconds)\nProgressTask_Countdown() {\n  local msg=\"$1\" countfrom=$2 donemsg=\"$3\"\n\n  echo -n \"${msg}  \"\n\n  while [ ${countfrom} -gt 0 ]; do\n    echo ${countfrom} | awk '{ printf \"\\b\\b%2d\", $1 }'\n    read -r -s -t1 && break\n    countfrom=$((countfrom - 1))\n  done\n\n  echo -e \"\\b\\b${donemsg:-  }\"\n\n  rm -f /dev/.progress/run\n\n  return 0\n}\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/getedid",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n#\n# exit 1 = unsupported GPU\n# exit 2 = dual boot system\n# exit 3 = no backup for syslinux.cfg or extlinux.conf\n# exit 4 = extlinux.conf and syslinux.cfg are available\n# exit 5 = changes are already made either to extlinux.conf or syslinux.cfg\n# exit 6 = xorg.conf already exists in /storage/.config\n# exit 7 = more than a single device detected\n\n# Help message and usage explanation\nhelp() {\n  echo \"This script generates a custom EDID depending on your GPU\"\n  echo \"\"\n  echo \"To check which GPU you are using, use: getedid gpu\"\n  echo \"\"\n  echo \"To create a custom EDID, just use this script like: getedid create\"\n  echo \"\"\n  echo \"If you don't want to use the created EDID file anymore use: getedid delete\"\n  echo \"\"\n  echo \"If your hardware or kernel has changed and you want to have a custom EDID again, then you have to delete the old EDID first.\"\n  echo \"For this use: getedid delete \"\n  echo \"And then use: getedid create\"\n}\n\n\n# check for GPU and store string\ncheck_gpu() {\n  if lspci | grep -i vga | grep -i -q -E 'intel|amd' ; then\n    gpu=\"intel/amd\"\n  elif lspci | grep -i vga | grep -i -q nvidia; then\n    gpu=\"nvidia\"\n  else\n    echo \"GPU is not supported\"\n    exit 1\n  fi\n}\n\n\n# run this first if the user already has a custom EDID but want to create a new one (TV or AVR change)\ndel_edid() {\n  if [ \"$gpu\" = \"intel/amd\" ]; then\n    check_file\n    if [ -f \"$file\".old ];  then\n      mount_rw\n      rm \"$file\"\n      mv \"$file\".old \"$file\"\n      rm -f /flash/edid.cpio\n      mount_ro\n      sys_reboot\n    else\n      echo \"You don't have a backup file for $file. You did not use this script to create the custom EDID\"\n      echo \"Therefore we can't be sure the script is working properly. Exiting\"\n      exit 3\n    fi\n  else\n    rm -f /storage/.config/xorg.conf\n    rm -f /storage/.config/xorg.le.backup\n    systemctl restart xorg.service\n  fi   \n}\n\n\n# run main script depending on the GPU\nrun() {\n  if [ \"$gpu\" = \"intel/amd\" ]; then\n    intel_amd\n  elif [ \"$gpu\" = \"nvidia\" ]; then\n    nvidia\n  fi\n}\n\n\n# mounting /flash to rw\nmount_rw() {\n  mount -o remount,rw /flash\n}\n\n\n# mounting /flash to ro\nmount_ro() {\n  mount -o remount,ro /flash\n}\n\n\n# remount /flash to ro and reboot\nsys_reboot() {\n  mount_ro\n  echo \"The system is rebooting in 15 seconds\"\n  sleep 15\n  reboot\n}\n\n\n# check syslinux.cfg and/or extlinux.conf\ncheck_file() {\n  # check boot system\n  if [ -d /sys/firmware/efi -a -f /flash/EFI/BOOT/syslinux.cfg ] ; then\n    sys_boot=\"UEFI\"\n    sys_path=\"/flash/EFI/BOOT\"\n  else\n    sys_boot=\"BIOS\"\n    sys_path=\"/flash\"\n  fi\n\n  # check which file is available\n  if [ -f \"$sys_path/syslinux.cfg\" -a -f \"$sys_path/extlinux.conf\" ]; then\n    echo \"Your system contains both a /flash/syslinux.cfg and a /flash/extlinux.conf file\"\n    echo \"Something is wrong on your system. Exiting\"\n    exit 4\n  elif [ -f \"$sys_path/extlinux.conf\" ]; then\n    file=\"$sys_path/extlinux.conf\"\n  elif [ -f \"$sys_path/syslinux.cfg\" ]; then\n    file=\"$sys_path/syslinux.cfg\"\n  else\n    echo \"You neither have a extlinux.conf nor do you have a syslinux.cfg.\"\n    echo \"Dual boot systems aren't supported\"\n    exit 2\n  fi\n}\n\n\ncheck_content() {\n  # check if changes are already made to $file and exit if yes\n  if grep -q \"initrd=/edid.cpio\" $file ; then\n    echo \"$file has been modified. Please run 'getedid delete' first if you want to modify it again. Exiting.\"\n    exit 5\n  fi\n}\n\n\ncreate_edid() {\n  # create edid \n  mkdir -p /tmp/cpio/lib/firmware/edid\n  cat \"/sys/class/drm/$card/edid\" > /tmp/cpio/lib/firmware/edid/edid.bin\n  mkdir -p /storage/.config/firmware/edid\n  cp /tmp/cpio/lib/firmware/edid/edid.bin /storage/.config/firmware/edid\n\n\n  # create cpio archive\n  cd /tmp/cpio/\n  find . -print | cpio -ov -H newc > /storage/edid.cpio\n}\n\n\nintel_amd() {\n  # check which output is connnected:\n  counter=0\n  for i in /sys/class/drm/*; do\n    if [ \"$(cat \"$i\"/status 2>/dev/null)\" = \"connected\" ]; then\n      counter=$((counter + 1))\n      if [ $counter -gt 0 -a $counter -lt 2 ]; then\n        card=\"$(echo \"$i\" | cut -d / -f 5)\"\n        hdmi=\"$(echo \"$i\" | cut -d / -f 5 | sed 's/card[0-9]-//g')\"\n      else\n        echo \"More than a single device connected. Probably enable \\\"Disable all other monitors\\\" at Kodi settings. Aborting!\"\n        exit 7\n      fi\n    fi\n  done\n\n  # create the edid \n  create_edid\n\n  # check extlinux.conf and syslinux.cfg\n  check_file\n  check_content\n\n  # remount /flash to rw\n  mount_rw\n  mv /storage/edid.cpio /flash\n\n  # make a backup of $file\n  cp \"$file\" \"$file\".old\n  \n  # add boot parameters to $file\n  sed -i \"/ APPEND/s/$/ initrd=\\/edid.cpio drm.edid_firmware=edid\\/edid.bin video=$hdmi:D/\" \"$file\"\n\n  # reboot\n  sys_reboot\n}\n\n\nnvidia() {\n  # check if xorg.conf already exists\n  if [ -f /storage/.config/xorg.conf -o -f /storage/.config/xorg-nvidia.conf ]; then\n    echo \"Existing /storage/.config/xorg.conf detected. Aborting!\"\n    exit 6\n  fi\n\n\n  # check for multi-montior setup\n  monitors=\"$(grep -i -w \"connected\" /var/log/Xorg.0.log | grep -i -o \"dfp-[0-9]\" | sort -u | wc -l)\"\n  if [ \"$monitors\" -gt \"1\" ]; then\n    echo \"You have more than a single monitor connected. The script doesn't support a multi-monitor setup. Aborting!\"\n    exit 7\n  fi\n\n\n  # set debug and restart Xorg\n  cp /etc/X11/xorg-nvidia.conf /storage/.config/xorg.conf\n  sed -i 's/\"ModeDebug\" \"false\"/\"ModeDebug\" \"true\"/g' /storage/.config/xorg.conf\n  systemctl restart xorg.service\n  \n\n  # get port\n  nv_port=\"$(grep -i -w connected /var/log/Xorg.0.log | grep -i -o \"dfp-[0-9]\" | sort -u)\"\n  nvidia-xconfig --extract-edids-from-file=/var/log/Xorg.0.log --extract-edids-output-file=/storage/.config/edid.bin 1>/dev/null\n\n  # set mode debug back to false\n  sed -i 's/\"ModeDebug\" \"true\"/\"ModeDebug\" \"false\"/g' /storage/.config/xorg.conf\n  \n  # set port and uncomment lines\n  sed -i \"s/#    Option         \\\"ConnectedMonitor\\\" \\\"DFP-0\\\"/    Option         \\\"ConnectedMonitor\\\" \\\"$nv_port\\\"/g\" /storage/.config/xorg.conf\n  sed -i \"s/#    Option         \\\"CustomEDID\\\" \\\"DFP-0:\\/storage\\/.config\\/edid.bin\\\"/    Option         \\\"CustomEDID\\\" \\\"$nv_port:\\/storage\\/.config\\/edid.bin\\\"/g\" /storage/.config/xorg.conf\n  sed -i \"s/#    Option         \\\"IgnoreEDID\\\" \\\"false\\\"/    Option         \\\"IgnoreEDID\\\" \\\"false\\\"/g\" /storage/.config/xorg.conf\n  sed -i \"s/#    Option         \\\"UseEDID\\\" \\\"true\\\"/    Option         \\\"UseEDID\\\" \\\"true\\\"/g\" /storage/.config/xorg.conf\n\n  # restart xorg.service\n  systemctl restart xorg.service\n}\n\n\n# start script from here\ncase \"$1\" in\n  'create')\n    check_gpu\n    run\n    ;;\n  'gpu')\n    check_gpu\n    echo \"$gpu\"\n    ;;\n  'delete')\n    check_gpu\n    del_edid\n    ;;\n  'help')\n    help\n    ;;\n  *)\n    echo \"Usage $0 { create | gpu | delete | help }\"\n    ;;\nesac\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/getedid-drm",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nusage() {\n  echo \"$0 create|delete|help\"\n}\n\ndelete_edid() {\n  update-bootloader-edid delete\n  if [ $? -eq 0 ]; then\n    echo \"successfully removed edid override\"\n  else\n    echo \"error removing bootloader edid-override options\"\n    exit 1\n  fi\n}\n\ncreate_edid() {\n  CONNECTORS=$(dump-active-edids -q)\n  if [ $? -ne 0 -o -z \"${CONNECTORS}\" ]; then\n    echo \"error: cannot detemine active connectors\"\n    exit 1\n  fi\n  create-edid-cpio -q\n  if [ $? -ne 0 ]; then\n    echo \"error creating edid.cpio\"\n    exit 1\n  fi\n  update-bootloader-edid set ${CONNECTORS}\n  if [ $? -eq 0 ]; then\n    echo \"successfully installed edid override for ${CONNECTORS}\"\n  else\n    echo \"error setting bootloader edid-override options\"\n    exit 1\n  fi\n}\n\ncase $1 in\n  create)\n    shift\n    create_edid \"$@\"\n    ;;\n  delete)\n    delete_edid\n    ;;\n  help)\n    usage\n    ;;\n  *)\n    usage\n    exit 1\n    ;;\nesac\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/init",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2010-2011 Roman Weber (roman@openelec.tv)\n# Copyright (C) 2012 Yann Cézard (eesprit@free.fr)\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\n# create directories\n/usr/bin/busybox mkdir -p /dev\n/usr/bin/busybox mkdir -p /proc\n/usr/bin/busybox mkdir -p /sys\n/usr/bin/busybox mkdir -p /tmp\n/usr/bin/busybox mkdir -p /flash\n/usr/bin/busybox mkdir -p /sysroot\n/usr/bin/busybox mkdir -p /storage\n/usr/bin/busybox mkdir -p /run\n\n# temp mountpoint for updates\n/usr/bin/busybox mkdir -p /update\n\n# mount all needed special filesystems\n/usr/bin/busybox mount -t devtmpfs devtmpfs /dev\n/usr/bin/busybox mount -t proc proc /proc\n/usr/bin/busybox mount -t sysfs sysfs /sys\n# /run options have to match what systemd uses by default\n/usr/bin/busybox mount -t tmpfs -o mode=755,size=20%,nr_inodes=800k,nosuid,nodev,strictatime tmpfs /run\n\nUPDATE_ROOT=/storage/.update\nUPDATE_DIR=\"$UPDATE_ROOT\"\n\nUPDATE_KERNEL=\"KERNEL\"\nUPDATE_SYSTEM=\"SYSTEM\"\nIMAGE_KERNEL=\"@KERNEL_NAME@\"\nIMAGE_SYSTEM=\"SYSTEM\"\n\nBOOT_STEP=\"start\"\nMD5_FAILED=\"0\"\nRUN_FSCK=\"yes\"\nRUN_FSCK_DISKS=\"\"\nSYSLINUX_DEFAULT=\"\"\nGRUB_DEFAULT=\"\"\n\nNBD_DEVS=\"0\"\nFLASH_FREE_MIN=\"5\"\n\nLIVE=\"no\"\n\nBREAK_TRIPPED=\"no\"\n\nBIGFONT=\"1080\"\n\nTEE_PID=\"\"\n\nFORCE_SPLASH=\"yes\"\n\n# Get a serial number if present (eg. RPi) otherwise use MAC address from eth0\nMACHINE_UID=\"$(awk '/^Serial/{s='0000000' $3; print substr(s, length(s) - 7)}' /proc/cpuinfo)\"\n[ -z \"$MACHINE_UID\" ] && MACHINE_UID=\"$(cat /sys/class/net/eth0/address 2>/dev/null | tr -d :)\"\n\n# common functions\n. /functions\n\n# script functions\nprogress() {\n  echo \"init: ### ${1::160}\" >/dev/kmsg\n\n  if test \"$PROGRESS\" = \"yes\"; then\n    echo \"### $1 ###\" >&2\n  fi\n}\n\necho_to_kmsg() {\n  while IFS= read -r line || [ -n \"${line}\" ]; do\n    echo \"init: ### ${line::160}\" >/dev/kmsg\n  done\n}\n\ndebug_msg() {\n  echo \"$1\" >&$SILENT_OUT\n}\n\ndebug_shell() {\n  redirect_output_to_screen  # restore output to a screen\n  echo \"### Starting debugging shell for boot step: $BOOT_STEP... type  exit  to quit ###\"\n  showcursor\n  setsid cttyhack sh\n}\n\nerror() {\n  # Display fatal error message\n  # $1:action which caused error, $2:message\n  # Send debug_shell output to stderr, in case caller is redirecting/consuming stdout\n  # Return exitcode=1 so that called may detect when an error has occurred\n  echo \"*** Error in $BOOT_STEP: $1: $2 ***\" >&2\n  debug_shell >&2\n  return 1\n}\n\nbreak_after() {\n  # Start debug shell after boot step $1, and all subsequent steps\n  if [ $BREAK_TRIPPED == yes ]; then\n    debug_shell\n  else\n    case $BREAK in\n      all|*$1*)\n        BREAK_TRIPPED=yes\n        debug_shell\n        ;;\n    esac\n  fi\n}\n\n# Mount handlers\n# All handlers take the following parameters:\n# $1:target, $2:mountpoint, $3:mount options, [$4:fs type]\nmount_common() {\n  # Common mount handler, handles block devices and filesystem images\n  MOUNT_OPTIONS=\"-o $3\"\n  [ -n \"$4\" ] && MOUNT_OPTIONS=\"-t $4 $MOUNT_OPTIONS\"\n\n  for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do\n    ERR_ENV=1\n\n    mount $MOUNT_OPTIONS $1 $2 >&$SILENT_OUT 2>&1\n    [ \"$?\" -eq \"0\" ] && ERR_ENV=0 && break\n\n    usleep 1000000\n  done\n  [ \"$ERR_ENV\" -eq \"0\" ] && return 0\n  error \"mount_common\" \"Could not mount $1\"\n}\n\nget_iscsistart_options() {\n  # Convert kernel commandline ISCSI= options to iscsistart options\n  IFS_SAVE=\"$IFS\"\n  IFS=,\n\n  for arg in $1; do\n    val=\"${arg#*=}\"\n    case \"$arg\" in\n      iscsi_initiator=*)\n        option=\"-i\"\n        ;;\n      iscsi_target_name=*)\n        option=\"-t\"\n        ;;\n      iscsi_target_ip=*)\n        option=\"-a\"\n        ;;\n      iscsi_target_port=*)\n        option=\"-p\"\n        ;;\n      iscsi_target_group=*)\n        option=\"-g\"\n        ;;\n      iscsi_username=*)\n        option=\"-u\"\n        ;;\n      iscsi_password=*)\n        option=\"-w\"\n        ;;\n      iscsi_in_username=*)\n        option=\"-U\"\n        ;;\n      iscsi_in_password=*)\n        option=\"-W\"\n        ;;\n    esac\n    echo \"$option $val\"\n  done\n\n  IFS=\"$IFS_SAVE\"\n}\n\nmount_iscsi() {\n  # Mount iSCSI target\n  ISCSI_DEV=\"${1##*,}\"\n  ISCSI_OPTIONS=\"${1%,*}\"\n\n  if [ ! -f \"/usr/sbin/iscsistart\" ]; then\n    error \"iscsistart\" \"iSCSI support not available\"\n  fi\n\n  if [ \"$ISCSI_OPTIONS\" = \"auto\" ]; then\n    progress \"Network configuration based on iBFT\"\n    /usr/sbin/iscsistart -N >&$SILENT_OUT 2>&1 || error \"iscsistart\" \"Unable to configure network\"\n    progress \"iSCSI auto connect based on iBFT\"\n    /usr/sbin/iscsistart -b >&$SILENT_OUT 2>&1 || error \"iscsistart\" \"Unable to auto connect\"\n  else\n    /usr/sbin/iscsistart $(get_iscsistart_options \"$ISCSI_OPTIONS\") >&$SILENT_OUT 2>&1 || error \"iscsistart\" \"Unable to connect to ISCSI target\"\n  fi\n\n  mount_common \"$ISCSI_DEV\" \"$2\" \"$3\" \"$4\"\n}\n\nmount_nbd() {\n# Mount NBD device\n  NBD_SERVER=\"${1%%:*}\"\n  NBD_PORT=\"${1#*:}\"\n  NBD_DEV=\"/dev/nbd$NBD_DEVS\"\n\n  nbd-client $NBD_SERVER $NBD_PORT $NBD_DEV >&$SILENT_OUT 2>&1 || error \"nbd-client\" \"Could not connect to NBD server $1\"\n\n  mount_common \"$NBD_DEV\" \"$2\" \"$3\" \"$4\"\n\n  NBD_DEVS=$(( NBD_DEVS + 1 ))\n}\n\nmount_nfs() {\n  # Mount NFS export\n  NFS_EXPORT=\"${1%%,*}\"\n  NFS_OPTIONS=\"${1#*,}\"\n\n  [ \"$NFS_OPTIONS\" = \"$1\" ] && NFS_OPTIONS=\n\n  mount_common \"$NFS_EXPORT\" \"$2\" \"$3,nolock,rsize=32768,wsize=32768,$NFS_OPTIONS\" \"nfs\"\n}\n\nmount_ubifs() {\n  mount_common \"$1\" \"$2\" \"$3\" \"ubifs\"\n}\n\n#  mount_folder \"$boot\" \"/flash\" \"ro,noatime\"\n# $1:[TYPE=]target, $2:mountpoint, $3:mount options, [$4:fs type]\nmount_folder() {\n  local target=\"${1#*=}\"\n\n  mkdir -p /dev/bind_tmp\n  mount_common \"$target\" \"/dev/bind_tmp\" \"rw,noatime\"\n  mount_common \"/dev/bind_tmp/coreelec_$(basename $2)\" \"$2\" \"bind\"\n  umount /dev/bind_tmp\n\n  [ \"$2\" = \"/flash\" ] && mount -o remount,ro /flash\n  [ -z \"$(ls -A /dev/bind_tmp)\" ] && rm -rf /dev/bind_tmp\n}\n\nmount_part() {\n  # Mount a local or network filesystem\n  # $1:[TYPE=]target, $2:mountpoint, $3:mount options, [$4:fs type]\n  progress \"mount filesystem $1 ...\"\n\n  MOUNT_TARGET=\"${1#*=}\"\n  case $1 in\n    /dev/ubi*)\n      MOUNT_CMD=\"mount_ubifs\"\n      MOUNT_TARGET=\"$1\"\n      RUN_FSCK=\"no\"\n      ;;\n    LABEL=*|UUID=*|/*)\n      MOUNT_CMD=\"mount_common\"\n      MOUNT_TARGET=\"$1\"\n      ;;\n    ISCSI=*)\n      MOUNT_CMD=\"mount_iscsi\"\n      ;;\n    NBD=*)\n      MOUNT_CMD=\"mount_nbd\"\n      ;;\n    NFS=*)\n      MOUNT_CMD=\"mount_nfs\"\n      ;;\n    FOLDER=*)\n      MOUNT_CMD=\"mount_folder\"\n      MOUNT_TARGET=\"$1\"\n      ;;\n    *)\n      error \"mount_part\" \"Unknown filesystem $1\"\n      ;;\n  esac\n\n  # Substitute unique identifier if available or remove placeholder\n  MOUNT_TARGET=\"${MOUNT_TARGET//@UID@/$MACHINE_UID}\"\n\n  $MOUNT_CMD \"$MOUNT_TARGET\" \"$2\" \"$3\" \"$4\"\n}\n\nmount_sysroot() {\n  if [ \"$SYSTEM_TORAM\" = \"yes\" ]; then\n    cp /flash/$IMAGE_SYSTEM /dev/$IMAGE_SYSTEM\n    mount_part \"/dev/$IMAGE_SYSTEM\" \"/sysroot\" \"ro,loop\"\n  else\n    mount_part \"/flash/$IMAGE_SYSTEM\" \"/sysroot\" \"ro,loop\"\n  fi\n\n  if [ -f /flash/post-sysroot.sh ]; then\n    . /flash/post-sysroot.sh\n  fi\n}\n\n# mount the specified SYSTEM file and output arch from /etc/os-release\nget_project_arch() {\n  if [ -f ${1}/etc/os-release ]; then\n    . ${1}/etc/os-release\n    echo \"${LIBREELEC_ARCH}\"\n  fi\n}\n\n# mount the specified SYSTEM file and output version from /etc/os-release\nget_project_version() {\n  if [ -f ${1}/etc/os-release ]; then\n    . ${1}/etc/os-release\n    echo \"${VERSION}\"\n  fi\n}\n\n# If the project/arch of current matches the update, then it is considered compatible.\n# Otherwise, mount the update SYSTEM partition and, if canupdate.sh is available,\n# call the script to determine if the current update file can be applied on to the\n# current system - 0 means it is compatible, non-zero that it is not compatible.\nis_compatible() {\n  local result=1\n\n  if [ \"${1}\" = \"${2}\" ]; then\n    result=0\n  else\n    if [ -f /update/usr/share/bootloader/canupdate.sh ]; then\n      sh /update/usr/share/bootloader/canupdate.sh \"${1}\" \"${2}\" && result=0\n    fi\n  fi\n\n  return ${result}\n}\n\n# determine if the new SYSTEM file is compatible with the current SYSTEM file\ncheck_is_compatible() {\n  local update_filename=\"${1}\"\n  local old_project_arch new_project_arch\n\n  old_project_arch=\"$(get_project_arch \"/sysroot\")\" || return\n  new_project_arch=\"$(get_project_arch \"/update\")\" || return\n\n  # If old or new project/arch isn't available then could be very old (pre-/etc/os-release) build - have to trust it\n  if [ -n \"${old_project_arch}\" -a -n \"${new_project_arch}\" ]; then\n    # If the old project/arch is not compatible with the new project/arch then abort...\n    if ! is_compatible \"${old_project_arch}\" \"${new_project_arch}\"; then\n      echo \"\"\n      echo \"ERROR: $(basename \"${update_filename}\") is not compatible with ${old_project_arch} hardware - update cancelled.\"\n      echo \"\"\n      echo \"Current system: ${old_project_arch}\"\n      echo \"Update  system: ${new_project_arch}\"\n      echo \"\"\n      echo \"Create $UPDATE_ROOT/.nocompat to disable compatibility checks and risk a non-booting system.\"\n      echo \"\"\n      return 1\n    fi\n  fi\n\n  return 0\n}\n\ndisplay_versions() {\n  local old_project_version new_project_version\n\n  old_project_version=\"$(get_project_version \"/sysroot\")\" || return\n  new_project_version=\"$(get_project_version \"/update\")\" || return\n\n  if [ -n \"${old_project_version}\" -a -n \"${new_project_version}\" ]; then\n    echo \"\"\n    echo \"Updating from ${old_project_version} to ${new_project_version}\"\n    echo \"\"\n  fi\n\n  return 0\n}\n\nupdate_file() {\n  if [ -f \"$UPDATE_DIR/$2\" -a -f \"$3\" ]; then\n    mount -o remount,rw /flash\n\n    rm -f \"$3\"\n    StartProgress percent \"Updating $1... \" \"$3\" $(stat -t \"$UPDATE_DIR/$2\" | awk '{print $2}')\n      # use dd here with conv=fsync so that all writes are non-buffered\n      # ensuring accurate progress - take the sync hit during the\n      # transfer, rather than when flushing file buffers after the progress\n      # meter declares the transfer already complete\n      dd if=$UPDATE_DIR/$2 of=$3 bs=1M conv=fsync 2>/dev/null\n      StopProgress\n\n    # loopback file needs writable /flash all the time\n    if [ \"${disk%%=*}\" != \"FILE\" ]; then\n      mount -o remount,ro /flash\n    fi\n    sync\n  fi\n}\n\nupdate_partition() {\n  local result\n\n  if [ -f \"$UPDATE_DIR/$2\" -a -b \"$3\" ]; then\n    StartProgress spinner \"Updating $1... \"\n      result=\"$(dd if=\"$UPDATE_DIR/$2\" of=\"$3\" 2>&1)\"\n      StopProgress \"done\"\n    echo \"${result}\"\n  fi\n}\n\nupdate_bootloader() {\n  local result\n\n  export BOOT_ROOT=\"/flash\"\n  export SYSTEM_ROOT=\"/update\"\n\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/update.sh ]; then\n    echo \"\"\n    echo \"Updating Boot Files... \"\n    sh $SYSTEM_ROOT/usr/share/bootloader/update.sh\n    sync\n    echo \"Boot Files Updated.\"\n    echo \"\"\n  fi\n}\n\nload_modules() {\n  progress \"Loading kernel modules\"\n\n  [ ! -f /etc/modules ] && return\n  for module in $(cat /etc/modules); do\n    progress \"Loading kernel module $module\"\n    insmod \"/usr/lib/modules/$module.ko\" || progress \"... Failed to load kernel module $module, skipping\"\n  done\n}\n\nset_consolefont() {\n  local vres\n\n  progress \"Set console font\"\n  if [ -e /dev/fb0 ]; then\n    vres=\"$(fbset 2>/dev/null | awk '/geometry/ { print $3 }')\"\n    if [ $vres -gt \"$BIGFONT\" ]; then\n      setfont -C /dev/tty0 ter-v32b.psf\n    fi\n  fi\n}\n\nload_splash() {\n  local set_default_res=no\n  local vres\n\n  if [ ! \"$SPLASH\" = \"no\" ]; then\n    progress \"Loading bootsplash\"\n\n    if [ -e /dev/fb0 ]; then\n      # Set framebuffer to a custom resolution and/or fallback to default resolution (1024x768-32), if required.\n      if [ ! \"$SWITCH_FRAMEBUFFER\" = \"no\" ]; then\n        if [ \"$SWITCH_FRAMEBUFFER\" = \"1080\" ]; then\n          SWITCH_FRAMEBUFFER=\"1920 1080 1920 1080 32\"\n        elif [ \"$SWITCH_FRAMEBUFFER\" = \"720\" ]; then\n          SWITCH_FRAMEBUFFER=\"1280 720 1280 720 32\"\n        fi\n\n        # Try setting a custom framebuffer resolution\n        if [ ! \"${SWITCH_FRAMEBUFFER:-yes}\" = \"yes\" ]; then\n          fbset -g $SWITCH_FRAMEBUFFER 2>/dev/null && set_default_res=no\n        fi\n\n        # Set a default resolution if required\n        if [ \"$set_default_res\" = \"yes\" ]; then\n          fbset -g 1024 768 1024 768 32\n        fi\n      fi\n\n      # load splash\n      if [ -f /splash/splash.conf ]; then\n        . /splash/splash.conf\n      fi\n\n      # Select splash image based on current native resolution\n      if [ -z \"$SPLASHIMAGE\" ]; then\n        vres=\"$(fbset 2>/dev/null | awk '/geometry/ { print $3 }')\"\n\n        for s in /flash/progress/oemsplash-${vres}- \\\n                 /flash/progress/oemsplash-1080- \\\n                 /flash/progress/oemsplash- \\\n                 /flash/oemsplash-${vres}.png \\\n                 /flash/oemsplash-1080.png \\\n                 /flash/oemsplash.png \\\n                 /splash/progress/splash-${vres}- \\\n                 /splash/progress/splash-1080- \\\n                 /splash/splash-${vres}.png \\\n                 /splash/splash-1080.png \\\n                 ; do\n          if [ -f \"${s}\" ]; then\n            SPLASHIMAGE=\"${s}\"\n            break\n          elif [ \"$FORCE_SPLASH\" = \"no\" -a -f \"${s}config\" ]; then\n            SPLASHIMAGE=\"${s}\"\n            break\n          fi\n        done\n      fi\n\n      if [ -n \"$SPLASHIMAGE\" ]; then\n        splash-image $SPLASHIMAGE > /dev/null 2>&1\n      fi\n\n      debug_msg \"Framebuffer vertical res: $vres\"\n      debug_msg \"Framebuffer splash image: $SPLASHIMAGE\"\n    fi\n  fi\n}\n\ndo_reboot() {\n  echo \"System reboots now...\"\n\n  # stop output redirection\n  [ -n \"$TEE_PID\" ] && kill $TEE_PID &>/dev/null\n  if [ -s /dev/init.log ]; then\n    mv /dev/init.log /storage/init-previous.log\n  fi\n  redirect_output_to_screen\n  delete_descriptors\n\n  # syncing filesystem\n  sync\n\n  # unmount filesystems\n  if /usr/bin/busybox mountpoint -q /flash ; then\n    /usr/bin/busybox umount /flash\n  fi\n\n  if /usr/bin/busybox mountpoint -q ${UPDATE_ROOT} ; then\n    /usr/bin/busybox umount ${UPDATE_ROOT}  > /dev/null 2>&1\n  fi\n\n  if /usr/bin/busybox mountpoint -q /storage/roms ; then\n    /usr/bin/busybox umount /storage/roms  > /dev/null 2>&1\n  fi\n\n  if /usr/bin/busybox mountpoint -q /storage ; then\n    /usr/bin/busybox umount /storage\n  fi\n\n  usleep 2000000\n  /usr/bin/busybox reboot\n}\n\nforce_fsck() {\n  echo \"Filesystem corruption has been detected!\"\n  echo \"To prevent an automatic repair attempt continuing,\"\n  echo \"press any key or power off your system within the next 120 seconds\"\n  echo \"\"\n  read -t120 -n1\n  # The exit status is 0 if input is available\n  # The exit status is greater than 128 if the timeout is exceeded\n  if [ $? -ne 0 -o $? -gt 128 ]; then\n    echo \"Repairing filesystem...\"\n    echo \"\"\n    /usr/sbin/fsck -T -M -y $RUN_FSCK_DISKS\n    FSCK_RET=$?\n    if [ $(( $FSCK_RET & 8 )) -eq 8 ]; then\n      # fubar\n      echo \"Forced fsck failed. Your system is broken beyond repair\"\n      echo \"Please re-install @DISTRONAME@\"\n      echo \"\"\n      echo \"Press enter to shutdown now\"\n      echo \"\"\n      read fubar\n      poweroff\n    fi\n    do_reboot\n  else\n    echo \"Shutting down...\"\n    sleep 5\n    sync\n    poweroff\n  fi\n}\n\nfix_bootlabel() {\nlocal flash_label\n\n  [ ! -b /dev/CE_FLASH ] && return 0\n\n  flash_label=$(/usr/sbin/fatlabel /dev/CE_FLASH)\n  if [ \"${flash_label}\" != \"CE_FLASH\" ]; then\n    progress \"wrong eMMC flash label \\\"${flash_label}\\\", fixing it\"\n    fatlabel /dev/CE_FLASH CE_FLASH 2>&1 | echo_to_kmsg\n  fi\n}\n\ncheck_disks() {\n  if [ \"$RUN_FSCK\" = \"yes\" -a -n \"$RUN_FSCK_DISKS\" ]; then\n    progress \"Checking disk(s): $RUN_FSCK_DISKS\"\n    for i in 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0; do\n      /usr/sbin/fsck -T -M -p -a $RUN_FSCK_DISKS >/dev/fsck.latest 2>&1\n      FSCK_RET=$?\n      cat /dev/fsck.latest >>/dev/fsck.log\n      cat /dev/fsck.latest | echo_to_kmsg\n      rm -f /dev/fsck.latest\n\n      # FSCK_RET is the bit-wise OR of the exit codes for each filesystem that is checked.\n      if [ $FSCK_RET -ge 16 ]; then\n        progress \"General error, continuing...\"\n        break\n      elif [ $(( $FSCK_RET & 8 )) -eq 8 ]; then\n        # device not found\n        if [ $i -eq 0 ]; then\n          progress \"Device not found, continuing...\"\n        else\n          usleep 500000\n        fi\n      elif [ $(( $FSCK_RET & 4 )) -eq 4 ]; then\n        # errors left\n        force_fsck\n      elif [ $(( $FSCK_RET & 2 )) -eq 2 ]; then\n        # reboot needed\n        echo \"Filesystem repaired, reboot needed...\"\n        do_reboot\n      elif [ $(( $FSCK_RET & 1 )) -eq 1 ]; then\n        # filesystem errors corrected\n        progress \"Filesystem errors corrected , continuing...\"\n        break\n      elif [ $FSCK_RET -eq 0 ]; then\n        # no errors found\n        progress \"No filesystem errors found, continuing...\"\n        break\n      fi\n    done\n  fi\n}\n\nwakeonlan() {\n  if [ \"$STORAGE_NETBOOT\" = \"yes\" ]; then\n    wol_ip=${disk%:*}\n    wol_ip=${wol_ip#*=}\n  elif [ \"$FLASH_NETBOOT\" = \"yes\" ]; then\n    wol_ip=${boot%:*}\n    wol_ip=${wol_ip#*=}\n  else\n    return 0\n  fi\n\n  if [ -n \"$wol_ip\" -a -n \"$wol_mac\" -a -n \"$wol_wait\" ]; then\n    progress \"Sending Magic Packet (WOL) if needed\"\n\n    if ! ping -q -c 2 \"$wol_ip\" &>/dev/null; then\n      ether-wake \"$wol_mac\"\n      StartProgress countdown \"WOL magic packet sent to $wol_ip, waiting $wol_wait seconds... \" $wol_wait \"done\"\n    fi\n  fi\n}\n\nmount_flash() {\n  progress \"Mounting flash\"\n\n  wakeonlan\n\n  mount_part \"$boot\" \"/flash\" \"ro,noatime\"\n\n  if [ -f /flash/post-flash.sh ]; then\n    . /flash/post-flash.sh\n  fi\n}\n\ncleanup_flash() {\n  progress \"Cleaning up flash (if required)\"\n\n  if [ -f /flash/pieeprom.bin -o -f /flash/pieeprom.upd -o -f /flash/vl805.bin ]; then\n    mount -o remount,rw /flash\n\n    rm -f /flash/pieeprom.bin /flash/pieeprom.upd /flash/pieeprom.sig\n    rm -f /flash/vl805.bin /flash/vl805.sig\n    rm -f /flash/recovery.bin /flash/recovery.[0-9][0-9][0-9] /flash/RECOVERY.[0-9][0-9][0-9]\n\n    mount -o remount,ro /flash\n  fi\n}\n\nmount_storage() {\n  progress \"Mounting storage\"\n\n  if [ \"$LIVE\" = \"yes\" ]; then\n    # mount tmpfs and exit early. disk=xx is not allowed in live mode\n    mount -t tmpfs none /storage\n    return\n  fi\n\n  wakeonlan\n\n  if [ -n \"$disk\" ]; then\n    if [ -n \"$OVERLAY\" ]; then\n      OVERLAY_DIR=$(cat /sys/class/net/eth0/address | tr -d :)\n\n      mount_part \"$disk\" \"/storage\" \"rw,noatime\"\n      mkdir -p /storage/$OVERLAY_DIR\n      umount /storage\n\n      # split $disk into $target,$options so we can append $OVERLAY_DIR\n      options=\"${disk#*,}\"\n      target=\"${disk%%,*}\"\n      if [ \"$options\" = \"$disk\" ]; then\n        disk=\"$target/$OVERLAY_DIR\"\n      else\n        disk=\"$target/$OVERLAY_DIR,$options\"\n      fi\n    fi\n\n    if [ -f /flash/mount-storage.sh ]; then\n      . /flash/mount-storage.sh\n    else\n      mount_part \"$disk\" \"/storage\" \"rw,noatime\"\n    fi\n  else\n    # /storage should always be writable\n    mount -t tmpfs none /storage\n  fi\n}\n\n# EmuELEC specific\nmount_roms() {\n  if /usr/bin/busybox mountpoint -q /storage ; then\n    progress \"Mounting roms\"\n    if [ -L \"/storage/roms\" ]; then\n      /usr/bin/busybox rm -f /storage/roms > /dev/null 2>&1\n    fi\n    /usr/bin/busybox mkdir -p /storage/roms > /dev/null 2>&1\n\n    # Get EEROMS filetype\n    ROM_FS_TYPE=\"vfat\"\n\n    if [ -e \"/flash/ee_fstype\" ]; then\n      EE_FS_TYPE=$(cat \"/flash/ee_fstype\")\n      \n      case $EE_FS_TYPE in\n        \"ntfs\"|\"ext4\"|\"exfat\")\n          ROM_FS_TYPE=${EE_FS_TYPE}\n        ;;\n        *)\n          # Failsafe\n          ROM_FS_TYPE=\"vfat\"\n        ;;\n      esac \n    fi\n      \n    if [ \"${ROM_FS_TYPE}\" == \"ntfs\" ]; then \n      NTFSMOUNT=$(/sysroot/usr/sbin/blkid --label EEROMS)\n      insmod /sysroot/usr/lib/kernel-overlays/base/lib/modules/$(uname -r)/kernel/fs/fuse/fuse.ko > /dev/null 2>&1\n      LD_LIBRARY_PATH=/sysroot/usr/lib /sysroot/usr/bin/ntfs-3g ${NTFSMOUNT} /storage/roms > /dev/null 2>&1\n    else\n      mount -t ${ROM_FS_TYPE} \"LABEL=EEROMS\" /storage/roms > /dev/null 2>&1\n    fi\n\n    # If mounting roms partition was succesful, we bind mount the update folder to use the third partition\n    if /usr/bin/busybox mountpoint -q /storage/roms ; then\n      /usr/bin/busybox mkdir -p /storage/roms/.update > /dev/null 2>&1\n      /usr/bin/busybox mkdir -p \"$UPDATE_ROOT\" > /dev/null 2>&1\n      mount --bind /storage/roms/.update \"$UPDATE_ROOT\" > /dev/null 2>&1\n    fi\n  fi\n  # Disable all enabled systemd mount units for /storage/roms and /storage/roms/*, since we will handle them in userland. Starting them then stopping then optionally restarting... It's a huge waste of time and a headache. Especially if the users want to use the systemd-mount for /storage/roms itself yet don't want to use our mount handler, many of them won't even realize storage-roms.mount is definitely up and running at the moment systemd checks for mount units, so their enabled storage-roms.mount won't work at all\n  # The pattern is splitted to two parts since 1) storage-roms*.mount matches storage-romswhatever.mount which is not what we want; 2) storage-roms{-*,}.mount is not supported by the ASH implemented in busybox\n  rm -f /storage/.config/system.d/*.wants/storage-roms-*.mount /storage/.config/system.d/*.wants/storage-roms.mount &>/dev/null\n}\n\n# Make last bootloader label (installer, live, run etc.) as the new default\nupdate_bootmenu() {\n  local crnt_default\n\n  if [ -n \"$SYSLINUX_DEFAULT\" -a -f /flash/syslinux.cfg ]; then\n    if grep -q \"^LABEL $SYSLINUX_DEFAULT\\$\" /flash/syslinux.cfg; then\n      crnt_default=\"$(awk '/^DEFAULT/ {print $2}' /flash/syslinux.cfg)\"\n      if [ ! \"$crnt_default\" = \"$SYSLINUX_DEFAULT\" ]; then\n        progress \"Updating /flash/syslinux.cfg [$crnt_default -> $SYSLINUX_DEFAULT]\"\n\n        mount -o remount,rw /flash\n        sed -e \"s/^SAY Wait for .* mode/SAY Wait for ${SYSLINUX_DEFAULT} mode/\" -i /flash/syslinux.cfg\n        sed -e \"s/^DEFAULT .*/DEFAULT $SYSLINUX_DEFAULT/\" -i /flash/syslinux.cfg\n        rm -f /flash/EFI/BOOT/syslinux.cfg\n        mount -o remount,ro /flash\n      fi\n    fi\n  fi\n\n  if [ -n \"$GRUB_DEFAULT\" -a -f /flash/EFI/BOOT/grub.cfg ]; then\n    if grep -q \"^menuentry \\\"$GRUB_DEFAULT\\\"\" /flash/EFI/BOOT/grub.cfg; then\n      crnt_default=\"$(awk '/^set default/ {print substr($2,9,19)}' /flash/EFI/BOOT/grub.cfg)\"\n      if [ ! \"$crnt_default\" = \"\\\"$GRUB_DEFAULT\\\"\" ]; then\n        progress \"Updating /flash/EFI/BOOT/grub.cfg [$crnt_default -> \\\"$GRUB_DEFAULT\\\"]\"\n\n        mount -o remount,rw /flash\n        sed -e \"s/^set default=.*/set default=\\\"$GRUB_DEFAULT\\\"/\" -i /flash/EFI/BOOT/grub.cfg\n        rm -f /flash/grub.cfg\n        mount -o remount,ro /flash\n      fi\n    fi\n  fi\n}\n\ncheck_out_of_space() {\n  if [ \"$(df /storage | awk '/[0-9]%/{print $4}')\" -eq \"0\" ]; then\n    echo \"\"\n    echo \"The $1 is corrupt, or there is not enough\"\n    echo \"free space on /storage to complete the update!\"\n    echo \"\"\n    echo \"Please free up space on your /storage partition\"\n    echo \"by deleting unecessary files, then try again.\"\n    echo \"\"\n    return 0\n  else\n    echo \"\"\n    echo \"The $1 is corrupt/invalid!\"\n    echo \"\"\n    return 1\n  fi\n}\n\ndo_cleanup() {\n  StartProgress spinner \"Cleaning up... \"\n\n  if mountpoint -q /update; then\n    umount /update\n  fi\n\n  if [ -d $UPDATE_ROOT/.tmp/mnt ]; then\n    if mountpoint -q $UPDATE_ROOT/.tmp/mnt ; then\n      # busybox umount deletes loop device automatically\n      umount $UPDATE_ROOT/.tmp/mnt\n    fi\n\n    [ -n $LOOP ] && losetup -d $LOOP &>/dev/null\n  fi\n\n  [ -f \"$UPDATE_TAR\" ] && rm -f \"$UPDATE_TAR\" &>/dev/null\n  [ -f \"$UPDATE_IMG_GZ\" ] && rm -f \"$UPDATE_IMG_GZ\" &>/dev/null\n  [ -f \"$UPDATE_IMG\" ] && rm -f \"$UPDATE_IMG\" &>/dev/null\n\n  rm -rf $UPDATE_ROOT/.tmp &>/dev/null\n  rm -rf $UPDATE_ROOT/[0-9a-zA-Z]* &>/dev/null\n  rm -f  $UPDATE_ROOT/.nocheck $UPDATE_ROOT/.nocompat &>/dev/null\n\n  sync\n\n  StopProgress \"done\"\n}\n\ncheck_force_splash() {\n  UPDATE_TAR=$(ls -1 \"$UPDATE_DIR\"/*.tar 2>/dev/null | head -n 1)\n  UPDATE_IMG_GZ=$(ls -1 \"$UPDATE_DIR\"/*.img.gz 2>/dev/null | head -n 1)\n  UPDATE_IMG=$(ls -1 \"$UPDATE_DIR\"/*.img 2>/dev/null | head -n 1)\n  BACKUP_FILE=$(ls -1 /storage/.restore/??????????????.tar 2>/dev/null | head -n 1)\n\n  if [ -f /storage/.config/animation.disable ]; then\n    FORCE_SPLASH=\"yes\"\n    return\n  fi\n\n  if [ -f /storage/.please_resize_me ]; then\n    FORCE_SPLASH=\"yes\"\n    return\n  fi\n\n  if [ -f /storage/.cache/reset_soft -o -f /storage/.cache/reset_hard ]; then\n    FORCE_SPLASH=\"yes\"\n    return\n  fi\n\n  if [ -f \"$BACKUP_FILE\" ]; then\n    FORCE_SPLASH=\"yes\"\n    return\n  fi\n\n  if [ -f \"$UPDATE_DIR/$UPDATE_KERNEL\" -a -f \"$UPDATE_DIR/$UPDATE_SYSTEM\" ] ||\n     [ -f \"$UPDATE_TAR\" -o -f \"$UPDATE_IMG_GZ\" -o -f \"$UPDATE_IMG\" ]; then\n    FORCE_SPLASH=\"yes\"\n    return\n  fi\n\n  if [ \"$UPDATE_DISABLED\" = \"yes\" ]; then\n    FORCE_SPLASH=\"yes\"\n    return\n  fi\n\n  if [ -d $UPDATE_DIR/.tmp ]; then\n    FORCE_SPLASH=\"yes\"\n    return\n  fi\n}\n\ncheck_update() {\n  progress \"Checking for updates\"\n  UPDATE_TAR=$(ls -1 \"$UPDATE_DIR\"/*.tar 2>/dev/null | head -n 1)\n  UPDATE_IMG_GZ=$(ls -1 \"$UPDATE_DIR\"/*.img.gz 2>/dev/null | head -n 1)\n  UPDATE_IMG=$(ls -1 \"$UPDATE_DIR\"/*.img 2>/dev/null | head -n 1)\n\n  if ! [ -f \"$UPDATE_DIR/$UPDATE_KERNEL\" -a -f \"$UPDATE_DIR/$UPDATE_SYSTEM\" ] &&\n     ! [ -f \"$UPDATE_TAR\" -o -f \"$UPDATE_IMG_GZ\" -o -f \"$UPDATE_IMG\" ]; then\n    return 0\n  fi\n\n  if [ \"$UPDATE_DISABLED\" = \"yes\" ]; then\n    echo \"Updating is not supported on netboot\"\n    do_cleanup\n    StartProgress countdown \"Normal startup in 10s... \" 10 \"NOW\"\n    return 0\n  fi\n\n  if [ -d $UPDATE_DIR/.tmp ]; then\n    echo \"Failed update detected - performing recovery.\"\n    echo \"\"\n    do_cleanup\n    StartProgress countdown \"Normal startup in 10s... \" 10 \"NOW\"\n    return 0\n  fi\n\n  mkdir -p $UPDATE_DIR/.tmp &>/dev/null\n  sync\n\n  echo \"UPDATE IN PROGRESS\"\n  echo \"\"\n  echo \"Please do not reboot or turn off your @DISTRONAME@ device!\"\n  echo \"\"\n\n  if [ -f \"$UPDATE_TAR\" ]; then\n    TARRESULT=\"0\"\n\n    echo \"Found new .tar archive\"\n    UPDATE_FILENAME=\"$UPDATE_TAR\"\n    StartProgress spinner \"Extracting contents of archive... \"\n      tar -xf \"$UPDATE_TAR\" -C $UPDATE_DIR/.tmp 1>/dev/null 2>/tmp/tarresult.txt || TARRESULT=\"1\"\n\n    if [ \"${TARRESULT}\" -eq \"0\" ]; then\n      mv $UPDATE_DIR/.tmp/*/target/* $UPDATE_DIR &>/dev/null\n      sync\n      StopProgress \"done\"\n    else\n      StopProgress \"FAILED\"\n\n      echo \"Failed to extract contents of archive file!\"\n      echo \"tar result: '$(cat /tmp/tarresult.txt)'\"\n\n      check_out_of_space \"archive\"\n\n      do_cleanup\n      StartProgress countdown \"Normal startup in 30s... \" 30 \"NOW\"\n      return 0\n    fi\n  elif [ -f \"$UPDATE_IMG_GZ\" -o -f \"$UPDATE_IMG\" ]; then\n    mkdir -p $UPDATE_DIR/.tmp/mnt &>/dev/null\n    IMG_FILE=\"$UPDATE_DIR/.tmp/update.img\"\n    GZRESULT=\"0\"\n\n    if [ -f \"$UPDATE_IMG_GZ\" ]; then\n      echo \"Found new compressed image file\"\n      UPDATE_FILENAME=\"$UPDATE_IMG_GZ\"\n      StartProgress spinner \"Decompressing image file... \"\n        gunzip -d -c \"$UPDATE_IMG_GZ\" 1>$IMG_FILE 2>/tmp/gzresult.txt || GZRESULT=\"1\"\n        sync\n        [ \"${GZRESULT}\" -eq \"0\" ] && StopProgress \"OK\" || StopProgress \"FAILED\"\n\n      if [ \"${GZRESULT}\" -eq \"1\" ]; then\n        echo \"Failed to decompress image file!\"\n        echo \"gunzip result: '$(cat /tmp/gzresult.txt)'\"\n\n        check_out_of_space \"compressed image\"\n\n        do_cleanup\n        StartProgress countdown \"Normal startup in 30s... \" 30 \"NOW\"\n        return 0\n      fi\n    else\n      echo \"Found new image file\"\n      UPDATE_FILENAME=\"$UPDATE_IMG\"\n      mv \"$UPDATE_IMG\" $IMG_FILE\n    fi\n\n    LOOP=$(losetup -f)\n    LOOP_NUM=$(echo $LOOP | sed 's|/dev/loop||')\n    mknod $LOOP b 7 $LOOP_NUM &>/dev/null\n    losetup $LOOP $IMG_FILE\n\n    # check for MBR partititon\n    OFFSET=$(fdisk -u -l $LOOP 2>/dev/null | awk '/^[ ]*Device/{part=1; next}; part{if ($2 == \"*\") {print $5} else {print $4} ; exit}')\n    if [ -z \"$OFFSET\" ]; then\n      # check for GPT partititon\n      OFFSET=$(fdisk -u -l $LOOP 2>/dev/null | awk '/^Number/{part=1; next}; part{print $2; exit}')\n      if [ -z \"$OFFSET\" ]; then\n        echo \"Could not find a valid system partition in image file!\"\n        do_cleanup\n        StartProgress countdown \"Normal startup in 10s... \" 10 \"NOW\"\n        return 0\n      fi\n    fi\n\n    SECTOR_SIZE=$(cat /sys/devices/virtual/block/loop${LOOP_NUM}/queue/hw_sector_size)\n    losetup -d $LOOP\n    sync\n\n    OFFSET=$(($OFFSET * $SECTOR_SIZE))\n\n    # use losetup because busybox mount does not support the -o offset option\n    echo \"Mounting system partition...\"\n    losetup -o $OFFSET $LOOP $IMG_FILE\n    mount -o ro,loop $LOOP $UPDATE_DIR/.tmp/mnt\n\n    # don't make temporary files but instead copy\n    # directly from mountpoint to /flash\n    UPDATE_DIR=$UPDATE_ROOT/.tmp/mnt\n    UPDATE_KERNEL=\"@KERNEL_NAME@\"\n  else\n    UPDATE_FILENAME=\"$UPDATE_DIR/$UPDATE_SYSTEM\"\n  fi\n\n  sync\n\n  if [ ! -b \"/$IMAGE_KERNEL\" -a ! -f \"/flash/$IMAGE_KERNEL\" ] || [ ! -f \"/flash/$IMAGE_SYSTEM\" ]; then\n    echo \"Missing (target) ${IMAGE_KERNEL} or ${IMAGE_SYSTEM}!\"\n    do_cleanup\n    StartProgress countdown \"Normal startup in 30s... \" 30 \"NOW\"\n    return 0\n  fi\n\n  if [ ! -f \"$UPDATE_DIR/$UPDATE_KERNEL\" -o ! -f \"$UPDATE_DIR/$UPDATE_SYSTEM\" ]; then\n    echo \"Missing (source) ${UPDATE_KERNEL} or ${UPDATE_SYSTEM}!\"\n    do_cleanup\n    StartProgress countdown \"Normal startup in 30s... \" 30 \"NOW\"\n    return 0\n  fi\n\n  # check md5 sums if .nocheck doesn't exist\n  if [ ! -f \"$UPDATE_ROOT/.nocheck\" ]; then\n    if [ -f \"$UPDATE_DIR/${UPDATE_KERNEL}.md5\" -a -f \"$UPDATE_DIR/${UPDATE_SYSTEM}.md5\" ]; then\n      # *.md5 size-check\n      if [ ! -s \"$UPDATE_DIR/${UPDATE_KERNEL}.md5\" -o ! -s \"$UPDATE_DIR/${UPDATE_SYSTEM}.md5\" ]; then\n        echo \"Zero-sized .md5 file!\"\n        MD5_FAILED=\"1\"\n      else\n        sed \"s#target/KERNEL#$UPDATE_DIR/$UPDATE_KERNEL#g\" \"$UPDATE_DIR/${UPDATE_KERNEL}.md5\" >\"$UPDATE_ROOT/${UPDATE_KERNEL}.check.md5\"\n        sed \"s#target#$UPDATE_DIR#g\" \"$UPDATE_DIR/${UPDATE_SYSTEM}.md5\" >\"$UPDATE_ROOT/${UPDATE_SYSTEM}.check.md5\"\n\n        StartProgress spinner \"Checking ${UPDATE_KERNEL}.md5... \"\n          if md5sum -sc \"$UPDATE_ROOT/${UPDATE_KERNEL}.check.md5\"; then\n            StopProgress \"OK\"\n          else\n            StopProgress \"FAILED\"\n            MD5_FAILED=\"1\"\n          fi\n\n        StartProgress spinner \"Checking ${UPDATE_SYSTEM}.md5... \"\n          if md5sum -sc \"$UPDATE_ROOT/${UPDATE_SYSTEM}.check.md5\"; then\n            StopProgress \"OK\"\n          else\n            StopProgress \"FAILED\"\n            MD5_FAILED=\"1\"\n          fi\n      fi\n    else\n      echo \"Missing ${UPDATE_KERNEL}.md5 or ${UPDATE_SYSTEM}.md5!\"\n      MD5_FAILED=\"1\"\n    fi\n\n    if [ \"$MD5_FAILED\" -eq \"1\" ]; then\n      echo \"md5 check failed!\"\n      do_cleanup\n      StartProgress countdown \"Normal startup in 30s... \" 30 \"NOW\"\n      return 0\n    fi\n  fi\n\n  mount_part \"$UPDATE_DIR/$UPDATE_SYSTEM\" \"/update\" \"ro,loop\"\n\n  # Verify that the new update is compatible with the current system - this should avoid creating\n  # non-booting systems after (for example) an RPi tar is incorrectly applied to an RPi2 system.\n  if [ ! -f \"$UPDATE_ROOT/.nocompat\" ]; then\n    if ! check_is_compatible \"$UPDATE_FILENAME\"; then\n      do_cleanup\n      StartProgress countdown \"Normal startup in 60s... \" 60 \"NOW\"\n      return 0\n    fi\n  fi\n\n  # get sizes\n  FLASH_FREE=$(df /flash/ | awk '/[0-9]%/{print $4}')\n  FLASH_FREE=$(( $FLASH_FREE * 1024 ))\n\n  # Disregard kernel size if it's a a block device\n  if [ ! -b \"/$IMAGE_KERNEL\" ]; then\n    OLD_KERNEL=$(stat -t \"/flash/$IMAGE_KERNEL\" | awk '{print $2}')\n  else\n    OLD_KERNEL=\"0\"\n  fi\n\n  OLD_SYSTEM=$(stat -t \"/flash/$IMAGE_SYSTEM\" | awk '{print $2}')\n  NEW_KERNEL=$(stat -t \"$UPDATE_DIR/$UPDATE_KERNEL\" | awk '{print $2}')\n  NEW_SYSTEM=$(stat -t \"$UPDATE_DIR/$UPDATE_SYSTEM\" | awk '{print $2}')\n\n  # old KERNEL+SYSTEM+free space - new KERNEL+SYSTEM must be higher than 5MB\n  # at least 5MB free after update\n\n  TMP_SIZE=$((OLD_KERNEL + OLD_SYSTEM + FLASH_FREE - NEW_KERNEL - NEW_SYSTEM))\n  FLASH_FREE_MIN=$((FLASH_FREE_MIN * 1024 * 1024))\n\n  if [ $TMP_SIZE -ge $FLASH_FREE_MIN ]; then\n    echo \"Checking size: OK\"\n  else\n    echo \"Checking size: FAILED\"\n    echo \"\"\n    echo \"Your System (FAT) partition is too small for this update,\"\n    echo \"and there is not enough space for the update to be installed!\"\n    echo \"\"\n    echo \"You must re-install your system using the disk image of a\"\n    echo \"current release, or you must re-size your existing partitions\"\n    echo \"so that the System (FAT) partition is at least @SYSTEM_SIZE@MB in size.\"\n    echo \"\"\n    do_cleanup\n    StartProgress countdown \"Normal startup in 60s... \" 60 \"NOW\"\n    return 0\n  fi\n\n  # all ok, update\n  display_versions\n  if [ -b \"/$IMAGE_KERNEL\" ]; then\n    update_partition \"Kernel\" \"$UPDATE_KERNEL\" \"/$IMAGE_KERNEL\"\n  else\n    update_file \"Kernel\" \"$UPDATE_KERNEL\" \"/flash/$IMAGE_KERNEL\"\n  fi\n  umount /sysroot\n  update_file \"System\" \"$UPDATE_SYSTEM\" \"/flash/$IMAGE_SYSTEM\"\n  update_bootloader\n  do_cleanup\n\n  if [ -f /flash/user-update.sh ]; then\n    sync\n    mount -o rw,remount /flash\n    sh /flash/user-update.sh\n    mount -o ro,remount /flash\n  fi\n\n  do_reboot\n}\n\nprepare_sysroot() {\n  progress \"Preparing system\"\n\n  mount --move /flash /sysroot/flash\n  mount --move /storage /sysroot/storage\n\n  if [ ! -d \"/sysroot/usr/lib/kernel-overlays/base/lib/modules/$(uname -r)/\" -a -f \"/sysroot/usr/lib/systemd/systemd\" ]; then\n    echo \"\"\n    echo \"NEVER TOUCH boot= in syslinux.conf / cmdline.txt!\"\n    echo \"If you don't know what you are doing,\"\n    echo \"your installation is now broken.\"\n    echo \"\"\n    StartProgress countdown \"Normal startup in 60s... \" 60 \"NOW\"\n  fi\n\n  [ -f \"/sysroot/usr/lib/systemd/systemd\" ] || error \"final_check\" \"Could not find systemd!\"\n}\n\namlogic_dtb_exists() {\n  DT_ID=$(sh /sysroot/usr/bin/dtname)\n\n  # modify DT_ID by dtb.conf\n  if [ -n \"$DT_ID\" -a -f /sysroot/usr/bin/convert_dtname ]; then\n    [ -n \"$SYSTEM_ROOT\" ] && SYSTEM_ROOT_ORIG=\"$SYSTEM_ROOT\"\n    SYSTEM_ROOT=\"/sysroot\"\n    . $SYSTEM_ROOT/usr/bin/convert_dtname $DT_ID\n    [ -n \"$SYSTEM_ROOT_ORIG\" ] && SYSTEM_ROOT=\"$SYSTEM_ROOT_ORIG\"\n    unset SYSTEM_ROOT_ORIG\n  fi\n\n  DT_FILE=$(ls -1 /sysroot/usr/share/bootloader/device_trees/${DT_ID}.dtb 2>/dev/null | head -n 1)\n\n  if [ -f \"/proc/device-tree/coreelec\" ] &&\n     [ -n \"${DT_ID}\" ] &&\n     [ -f \"${DT_FILE}\" ]; then\n    true\n  else\n    false\n  fi\n}\n\ncheck_amlogic_dtb() {\n  if grep -q \"amlogic\" /proc/device-tree/compatible; then\n    if grep -q \"official\" /sysroot/etc/os-release; then\n      progress \"Checking Amlogic DTB\"\n\n      if ! amlogic_dtb_exists; then\n        echo \"WARNING: Your device-tree is out-of-date!\"\n        echo \"\"\n        echo \"Please update it to resume normal startup.\"\n        echo \"\"\n\n        StartProgress countdown \"Normal startup in 30s... \" 30 \"NOW\"\n        echo \"\"\n      fi\n    fi\n  fi\n}\n\n# create pipe and save original descriptors\ncreate_output_pipe() {\n  # save original stdout and stderr descriptors\n  exec 4>&1\n  exec 5>&2\n\n  # create pipe and use it with tee\n  mknod /tmp/output_pipe p\n  tee </tmp/output_pipe /dev/init.log &\n  TEE_PID=$!\n}\n\n# redirect stdout and stderr\nredirect_output_to_pipe() {\n  exec 1>/tmp/output_pipe\n  exec 2>/tmp/output_pipe\n}\n\n# restore original descriptors\nredirect_output_to_screen() {\n  exec 1>&4\n  exec 2>&5\n}\n\n# delete descriptor\ndelete_descriptors() {\n  exec 4>&-\n  exec 5>&-\n}\n\n# Do init tasks to bring up system\n\n# set ondemand up_threshold\nif [ -e /sys/devices/system/cpu/cpufreq/ondemand/up_threshold ]; then\n  echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold\nelse\n  for f in $(ls /sys/devices/system/cpu/cpufreq/policy*/ondemand/up_threshold 2>/dev/null) ; do\n    echo 50 > $f\n  done\nfi\n\n# run platform_init script if exists\nif [ -f \"./platform_init\" ]; then\n  ./platform_init\nfi\n\n# load keymap if set\nif [ -n \"$KEYMAP\" ]; then\n  loadkmap < \"$KEYMAP\"\nfi\n\n# clear screen and hide cursor\nclear\nhidecursor\n\ncreate_output_pipe\nredirect_output_to_pipe\n\n# parse command line arguments\nfor arg in $(cat /proc/cmdline); do\n  case $arg in\n    BOOT_IMAGE=*)\n      IMAGE_KERNEL=\"${arg#*=}\"\n      [ \"${IMAGE_KERNEL:0:1}\" = \"/\" ] && IMAGE_KERNEL=\"${IMAGE_KERNEL:1}\"\n      ;;\n    SYSTEM_IMAGE=*)\n      IMAGE_SYSTEM=\"${arg#*=}\"\n      [ \"${IMAGE_SYSTEM:0:1}\" = \"/\" ] && IMAGE_SYSTEM=\"${IMAGE_SYSTEM:1}\"\n      ;;\n    boot=*)\n      boot=\"${arg#*=}\"\n      case $boot in\n        ISCSI=*|NBD=*|NFS=*)\n          UPDATE_DISABLED=yes\n          FLASH_NETBOOT=yes\n          ;;\n        /dev/*|LABEL=*|UUID=*)\n          RUN_FSCK_DISKS=\"$RUN_FSCK_DISKS $boot\"\n          ;;\n        FOLDER=*)\n          RUN_FSCK_DISKS=\"$RUN_FSCK_DISKS ${boot#*=}\"\n          ;;\n      esac\n      ;;\n    disk=*)\n      disk=\"${arg#*=}\"\n      case $disk in\n        ISCSI=*|NBD=*|NFS=*)\n          STORAGE_NETBOOT=yes\n          ;;\n        /dev/*|LABEL=*|UUID=*)\n          RUN_FSCK_DISKS=\"$RUN_FSCK_DISKS $disk\"\n          ;;\n        FOLDER=*)\n          RUN_FSCK_DISKS=\"$RUN_FSCK_DISKS ${disk#*=}\"\n          ;;\n      esac\n      ;;\n    wol_mac=*)\n      wol_mac=\"${arg#*=}\"\n      ;;\n    wol_wait=*)\n      wol_wait=\"${arg#*=}\"\n      ;;\n    installer)\n      SYSLINUX_DEFAULT=\"installer\"\n      ;;\n    debugging)\n      FORCE_SPLASH=\"yes\"\n      DEBUG=yes\n      ;;\n    nopkmute)\n      MUTE_PRINTK=no\n      ;;\n    keymap=*)\n      KEYMAP=$(ls -1 /usr/lib/keymaps/*/\"${arg#*=}\".bmap)\n      ;;\n    progress)\n      PROGRESS=yes\n      INIT_ARGS=\"$INIT_ARGS --show-status=1\"\n      ;;\n    nofsck)\n      RUN_FSCK=no\n      ;;\n    nosplash)\n      SPLASH=no\n      ;;\n    toram)\n      SYSTEM_TORAM=yes\n      ;;\n    live)\n      LIVE=yes\n      SYSLINUX_DEFAULT=\"live\"\n      ;;\n    portable)\n      SYSLINUX_DEFAULT=\"run\"\n      ;;\n    grub_live)\n      LIVE=yes\n      GRUB_DEFAULT=\"Live\"\n      ;;\n    grub_portable)\n      GRUB_DEFAULT=\"Run\"\n      ;;\n    overlay)\n      OVERLAY=yes\n      ;;\n    setfbres=*)\n      SWITCH_FRAMEBUFFER=\"${arg#*=}\"\n      SWITCH_FRAMEBUFFER=\"${SWITCH_FRAMEBUFFER//,/ }\"\n      ;;\n    break=*)\n      BREAK=\"${arg#*=}\"\n      ;;\n    bigfont=*)\n      BIGFONT=\"${arg#*=}\"\n      ;;\n    ip=*)\n      KERNEL_IPCONFIG=\"yes\"\n      ;;\n  esac\ndone\n\n# hide kernel log messages on console\nif [ ! \"$MUTE_PRINTK\" = \"no\" ]; then\n  echo '1 4 1 7' > /proc/sys/kernel/printk\nfi\n\nif test \"$DEBUG\" = \"yes\"; then\n  exec 3>&1\nelse\n  exec 3>/dev/null\nfi\nSILENT_OUT=3\n\n# If the network is up (due to the use of the \"ip\" kernel parameter) and a DNS\n# server is known, allow the libc resolver to use it\ngrep '^\\(nameserver\\|domain\\) ' /proc/net/pnp | grep -v '^nameserver 0\\.0\\.0\\.0$' > /etc/resolv.conf\n\nif [ \"${boot%%=*}\" = \"FILE\" ]; then\n  error \"check arguments\" \"boot argument can't be FILE type...\"\nfi\n\ndebug_msg \"Unique identifier for this client: ${MACHINE_UID:-NOT AVAILABLE}\"\n\n# main boot sequence\nfor BOOT_STEP in \\\n    load_modules \\\n    set_consolefont \\\n    check_disks \\\n    fix_bootlabel \\\n    mount_flash \\\n    cleanup_flash \\\n    update_bootmenu \\\n    mount_sysroot \\\n    mount_storage \\\n    mount_roms \\\n    check_force_splash \\\n    load_splash \\\n    check_update \\\n    prepare_sysroot \\\n    check_amlogic_dtb; do\n  $BOOT_STEP\n  [ -n \"$DEBUG\" ] && break_after $BOOT_STEP\ndone\n\nBOOT_STEP=final\n\n# log if booting from usb / removable storage\nSTORAGE=$(cat /proc/mounts | grep \" /sysroot/storage \" | awk '{print $1}' | awk -F '/' '{print $3}')\nFLASH=$(cat /proc/mounts | grep \" /sysroot/flash \" | awk '{print $1}' | awk -F '/' '{print $3}')\nfor i in $STORAGE $FLASH ; do\n  if [ -n \"$i\" ]; then\n    removable=\"/sys/class/block/*/$i/../removable\"\n    if [ -e $removable ]; then\n      if [ \"$(cat $removable 2>/dev/null)\" = \"1\" ]; then\n        echo \"### BIG FAT WARNING\" > /dev/kmsg\n        echo \"### $i is removable. suspend/resume may not work\" > /dev/kmsg\n      fi\n    fi\n  fi\ndone\n# move some special filesystems\n/usr/bin/busybox mount --move /dev /sysroot/dev\n/usr/bin/busybox mount --move /proc /sysroot/proc\n/usr/bin/busybox mount --move /sys /sysroot/sys\n/usr/bin/busybox mount --move /run /sysroot/run\n/usr/bin/busybox rm -fr /tmp\n\n# setup kernel overlays\n/usr/bin/busybox chroot /sysroot /usr/sbin/kernel-overlays-setup\n\n# tell OE settings addon to disable updates\nif [ \"$UPDATE_DISABLED\" = \"yes\" ]; then\n  echo \"\" > /sysroot/dev/.update_disabled\nfi\n\nif [ \"$FLASH_NETBOOT\" = \"yes\" ]; then\n  echo \"\" > /sysroot/dev/.flash_netboot\nfi\n\nif [ \"$KERNEL_IPCONFIG\" = \"yes\" ]; then\n  echo \"\" > /sysroot/dev/.kernel_ipconfig\nfi\n\n# swap can not be used over nfs.(see scripts/mount-swap)\nif [ \"$STORAGE_NETBOOT\" = \"yes\" ]; then\n  echo \"\" > /sysroot/dev/.storage_netboot\nfi\n\nBACKUP_FILE=$(ls -1 /sysroot/storage/.restore/??????????????.tar 2>/dev/null | head -n 1)\n\nif [ -f /sysroot/storage/.please_resize_me ]; then\n  INIT_UNIT=\"--unit=fs-resize.target\"\nelif [ -f /sysroot/storage/.cache/reset_soft -o -f /sysroot/storage/.cache/reset_hard ]; then\n  INIT_UNIT=\"--unit=factory-reset.target\"\nelif [ -f \"$BACKUP_FILE\" ]; then\n  INIT_UNIT=\"--unit=backup-restore.target\"\nfi\n\n# stop output redirection\n[ -n \"$TEE_PID\" ] && kill $TEE_PID &>/dev/null\nif [ -s /sysroot/dev/init.log ]; then\n  mv /sysroot/dev/init.log /sysroot/storage/init.log\nelse\n  rm -f /sysroot/dev/init.log\n  rm -f /sysroot/storage/init.log\nfi\n\n# restore original descriptors and delete descriptors\nredirect_output_to_screen\ndelete_descriptors\n\n# switch to new sysroot and start real init\nexec /usr/bin/busybox switch_root /sysroot /usr/lib/systemd/systemd $INIT_ARGS $INIT_UNIT\n\nerror \"switch_root\" \"Error in initramfs. Could not switch to new root\"\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/kernel-overlays-setup",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nSYSTEM_OVERLAYS_DIR=/usr/lib/kernel-overlays\nOVERLAY_CONFIG_DIR=/storage/.cache/kernel-overlays\nKVER=$(uname -r)\nRUNTIME_DIR=\"/run/kernel-overlays\"\nMODULES_DIR=\"${RUNTIME_DIR}/modules/${KVER}\"\nFIRMWARE_DIR=\"${RUNTIME_DIR}/firmware\"\nUSER_FIRMWARE_DIR=\"/storage/.config/firmware\"\n\nmkdir -p \"${MODULES_DIR}\"\nmkdir -p \"${FIRMWARE_DIR}\"\n\nlog() {\n  echo \"kernel-overlays-setup: $@\" > /dev/kmsg\n}\n\napply_overlay() {\n  case \"$1\" in\n    /*)\n      modules_overlay_dir=\"${1}/lib/modules/${KVER}\"\n      firmware_overlay_dir=\"${1}/lib/firmware\"\n      ;;\n    *)\n      modules_overlay_dir=\"${SYSTEM_OVERLAYS_DIR}/${1}/lib/modules/${KVER}\"\n      firmware_overlay_dir=\"${SYSTEM_OVERLAYS_DIR}/${1}/lib/firmware\"\n      ;;\n  esac\n\n  if [ -d \"${modules_overlay_dir}\" ] ; then\n    GOT_MODULE_OVERLAY=\"yes\"\n\n    if cp -rfs \"${modules_overlay_dir}\"/* \"${MODULES_DIR}\" ; then\n      log \"added modules from $modules_overlay_dir\"\n    else\n      log \"failed to add modules from $modules_overlay_dir\"\n    fi\n  fi\n\n  if [ -d \"${firmware_overlay_dir}\" ] ; then\n    if cp -rfs \"${firmware_overlay_dir}\"/* \"${FIRMWARE_DIR}\" ; then\n      log \"added firmware from $firmware_overlay_dir\"\n    else\n      log \"failed to add firmware from $firmware_overlay_dir\"\n    fi\n  fi\n}\n\n# setup system base modules\n\nlog \"setup base modules\"\napply_overlay base\n\n# apply user-configured module overlays\n\nif [ -d \"${OVERLAY_CONFIG_DIR}\" ] ; then\n  log \"adding overlays from ${OVERLAY_CONFIG_DIR}\"\n  GOT_MODULE_OVERLAY=\"no\"\n\n  for conf in \"${OVERLAY_CONFIG_DIR}/\"*.conf ; do\n    if [ -e \"$conf\" ] ; then\n      log \"processing conf $conf\"\n      overlay=$(cat \"$conf\")\n      [ -n \"$overlay\" ] && apply_overlay \"$overlay\"\n    fi\n  done\n\n  if [ \"yes\" = \"$GOT_MODULE_OVERLAY\" ] ; then\n    log \"running depmod\"\n    /usr/sbin/depmod -a >/dev/kmsg 2>&1\n  fi\nfi\n\nif [ -d \"${USER_FIRMWARE_DIR}\" ] && [ -n \"$(ls ${USER_FIRMWARE_DIR})\" ] ; then\n  if cp -rfs \"${USER_FIRMWARE_DIR}\"/* \"${FIRMWARE_DIR}\" ; then\n    log \"added firmware from ${USER_FIRMWARE_DIR}\"\n  else\n    log \"failed to add firmware from ${USER_FIRMWARE_DIR}\"\n  fi\nfi\n\nlog \"done\"\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/ledfix",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\n# find heartbeat triggers and set them to none\ncase $(dtsoc) in\n  amlogic*)\n    for triggerfile in $(find /sys/devices/platform/leds -name trigger); do\n      trigger=$(awk -F'[][]' '{print $2}' \"$triggerfile\")\n      if [ \"$trigger\" = \"heartbeat\" ]; then\n        echo \"none\" > \"$triggerfile\"\n      fi\n    done\n  ;;\nesac\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/libreelec-target-generator",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Matthias Reichl <hias@horus.com>\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nEARLY_DIR=\"$2\"\n\nlog() {\n  echo \"libreelec-target-generator: $@\" > /dev/kmsg\n}\n\nif [ -z \"$EARLY_DIR\" ]; then\n  log \"error: generator directory missing\"\n  exit 1\nfi\n\nTARGET=\"\"\n\nfor arg in $(cat /proc/cmdline); do\n  case \"$arg\" in\n    textmode)\n      TARGET=\"textmode.target\"\n      ;;\n    installer)\n      TARGET=\"installer.target\"\n      ;;\n  esac\ndone\n\nBACKUP_EXTENSION_LIST=\".tar .tar.gz .tar.bz2 .tar.xz\"\nfor extension in $BACKUP_EXTENSION_LIST; do\n  BACKUP_FILE=$(ls -1 /storage/.restore/*${EXTENSION} 2>/dev/null | head -n 1)\n  [ -n \"${BACKUP_FILE}\" ] && break\ndone\n\nif [ -f /storage/.please_resize_me ]; then\n  TARGET=\"fs-resize.target\"\nelif [ -f /storage/.cache/reset_hard -o -f /storage/.cache/reset_soft ]; then\n  TARGET=\"factory-reset.target\"\nelif [ -f \"$BACKUP_FILE\" ]; then\n  TARGET=\"backup-restore.target\"\nelif [ -f /storage/.rpi_flash_firmware ]; then\n  TARGET=\"rpi-flash-firmware.target\"\nfi\n\nif [ -n \"$TARGET\" ]; then\n  ln -sT \"/usr/lib/systemd/system/$TARGET\" \"$EARLY_DIR/default.target\" 2>/dev/kmsg || log \"error creating symlink to $TARGET: $?\"\nfi\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/lsb_release",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n# show release information\n. /etc/os-release\necho \"$PRETTY_NAME\"\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/pastebinit",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\ncat \"$@\" | curl -F 'sprunge=<-' https://paste.coreelec.org\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/rpi-flash-firmware",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nFLAG_FILE=\"/storage/.rpi_flash_firmware\"\n\n. /usr/lib/libreelec/functions\n\nhidecursor\n\nif [ -f \"${FLAG_FILE}\" ]; then\n  . ${FLAG_FILE}\n  rm -f \"${FLAG_FILE}\"\n\n  if ! mount -o remount,rw /flash 2>/dev/null; then\n    echo \"ERROR: Unable to mount /flash as a read/write file system.\"\n    echo\n    echo \"Aborting Flash update process - please proceed with a manual update.\"\n    echo\n\n    StartProgress countdown \"Rebooting in 15s... \" 15 \"NOW\"\n    reboot -f &>/dev/null\n  fi\n\n  # Install new bootloader and/or USB3 firmware files to /flash\n  # Firmware flashing will occur during the next boot, after\n  # which the system will again reboot.\n  # Old firmware files will be automatically removed by init.\n  CMD_ARGS=\"\"\n  [ \"${BOOTLOADER}\" = \"yes\" ] && CMD_ARGS=\"${CMD_ARGS} -A bootloader\"\n  [ \"${VL805}\" = \"yes\" ] && CMD_ARGS=\"${CMD_ARGS} -A vl805\"\n\n  if [ -n \"${CMD_ARGS}\" ]; then\n    USE_FLASHROM=0 /usr/bin/.rpi-eeprom-update.real ${CMD_ARGS}\n  fi\n\n  sync\n  mount -o remount,ro /flash\nfi\n\nreboot -f &>/dev/null\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/sudo",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nmessage=\"$message\\n There is no working 'sudo'.\"\nmessage=\"$message\\n \"\nmessage=\"$message\\n On debian/ubuntu/all general purpose linux distributions 'sudo'\"\nmessage=\"$message\\n allows a permitted user to execute a command as the superuser\"\nmessage=\"$message\\n or another user, as specified by the security policy\"\nmessage=\"$message\\n \"\nmessage=\"$message\\n With LibreELEC you have root access by default, so you dont need 'sudo'\"\nmessage=\"$message\\n \"\n\necho -e $message\n\nexit 1\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/update-bootloader-edid-rpi",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nEDID_DIR=\"/storage/.config/firmware/edid\"\nEDID_CPIO=\"/flash/edid.cpio\"\nCONFIG_TXT=\"/flash/config.txt\"\nCMDLINE_TXT=\"/flash/cmdline.txt\"\n\nusage() {\n  echo \"$0 set CONNECTOR... | delete | help\"\n}\n\ncheck_args() {\n  if [ $# -eq 0 ]; then\n    echo \"error: no connector(s) specified!\"\n    exit 1\n  fi\n  if [ ! -f \"${EDID_CPIO}\" ]; then\n    echo \"error: ${EDID_CPIO} not present\"\n    exit 1\n  fi\n  for conn in \"$@\"; do\n    if [ ! -f \"${EDID_DIR}/edid-${conn}.bin\" ]; then\n      echo \"error: ${EDID_DIR}/edid-${conn}.bin not present\"\n      exit 1\n    fi\n  done\n}\n\ncleanup_config_txt() {\n  sed -i \"/^initramfs edid\\.cpio/d\" ${CONFIG_TXT}\n}\n\nget_cleaned_cmdline_txt() {\n  sed \\\n    -e 's| drm\\.edid_firmware=[^ ]*||g' \\\n    -e 's| video=[^ ]*||g' \\\n    ${CMDLINE_TXT}\n}\n\nadd_initramfs() {\n  # make sure config.txt ends with a newline\n  if [ \"$(tail -c 1 ${CONFIG_TXT} | tr -c -d '\\n' | tr '\\n' 'X')\" != \"X\" ]; then\n    echo \"\" >> ${CONFIG_TXT}\n  fi\n  echo \"initramfs edid.cpio\" >> ${CONFIG_TXT}\n}\n\nadd_cmdline() {\n  CMDLINE=$(get_cleaned_cmdline_txt)\n  FIRMWARE=\"\" \n  VIDEO=\"\"\n  for conn in \"$@\"; do\n    VIDEO=\"${VIDEO} video=${conn}:D\"\n    [ -n \"${FIRMWARE}\" ] && FIRMWARE=\"${FIRMWARE},\"\n    FIRMWARE=\"${FIRMWARE}${conn}:edid/edid-${conn}.bin\"\n  done\n  echo \"${CMDLINE} drm.edid_firmware=${FIRMWARE}${VIDEO}\" > ${CMDLINE_TXT}\n}\n\nset_edids() {\n  check_args \"$@\"\n  mount -o remount,rw /flash\n  cleanup_config_txt\n  add_initramfs\n  add_cmdline \"$@\"\n  mount -o remount,ro /flash\n}\n\ndelete_edids() {\n  mount -o remount,rw /flash\n  cleanup_config_txt\n  CMDLINE=$(get_cleaned_cmdline_txt)\n  echo \"${CMDLINE}\" > ${CMDLINE_TXT}\n  mount -o remount,ro /flash\n}\n\ncase $1 in\n  set)\n    shift\n    set_edids \"$@\"\n    ;;\n  delete)\n    delete_edids\n    ;;\n  help)\n    usage\n    ;;\n  *)\n    usage\n    exit 1\n    ;;\nesac\n"
  },
  {
    "path": "packages/sysutils/busybox/scripts/vfd-clock",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\ndo_start(){\n  while sleep 1\n  do\n    printf \"%4s\" \"$(date +'%l %M' | tr -d '[:space:]')\" > \"$LED_PATH_TEXT\"\n    if [ \"$LED_COLON\" = \"off\" ]; then\n      echo \"1\" > \"$LED_PATH_COLON\"\n      LED_COLON=\"on\"\n    else\n      echo \"0\" > \"$LED_PATH_COLON\"\n      LED_COLON=\"off\"\n    fi\n  done\n}\n\ndo_stop(){\n  echo \"0\" > \"$LED_PATH_COLON\"\n  echo \" \" > \"$LED_PATH_TEXT\"\n}\n\ncase $(dtname) in\n  oranth,tx3-mini|oranth,tx9-pro|sunvell,t95z-plus)\n    LED_PATH_COLON=\"/sys/devices/platform/spi/spi_master/spi0/spi0.0/leds/:colon/brightness\"\n    LED_PATH_TEXT=\"/sys/devices/platform/spi/spi_master/spi0/spi0.0/display_text\"\n    ;;\n  default|*)\n    # noop\n    ;;\nesac\n\nif [ -n \"$LED_PATH_COLON\" ] && [ -n \"$LED_PATH_TEXT\" ]; then\n  case $1 in\n    start)\n      do_start\n      ;;\n    stop)\n      do_stop\n      ;;\n  esac\nelse\n  exit 0\nfi\n"
  },
  {
    "path": "packages/sysutils/busybox/sleep.d.serial/99-suspend-modules.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nif [ -f /storage/.config/suspend-modules.conf ]; then\n    . /storage/.config/suspend-modules.conf\n    custom_modules=\"${SUSPEND_MODULES}\"\n    SUSPEND_MODULES=\"\"\nfi\n\n. /etc/suspend-modules.conf\n\nif [ -n \"${custom_modules}\" ]; then\n    SUSPEND_MODULES=\"${SUSPEND_MODULES} ${custom_modules}\"\nfi\n\nmodunload()\n{\n    local MOD D C USED MODS I\n    local UNL=\"$(echo $1 |tr - _)\" RET=1\n\n    while read MOD D C USED D; do\n        [ \"$MOD\" = \"$UNL\" ] || continue\n        if [ \"$USED\" = \"-\" ]; then\n            # no dependent modules, just try to remove this one.\n            _rmmod \"$MOD\" $C\n            RET=$?\n        else\n            # modules depend on this one.  try to remove them first.\n            MODS=\",${USED%,}\"\n            while [ -n \"${MODS}\" ]; do\n                # try to unload the last one first\n                MOD=\"${MODS##*,}\"\n                modunload $MOD && RET=0\n                # prune the last one from the list\n                MODS=\"${MODS%,*}\"\n            done\n            # if we unloaded at least one module, then let's\n            # try again!\n            [ $RET -eq 0 ] && modunload $MOD\n            RET=$?\n        fi\n        return $RET\n    done < /proc/modules\n    # if we came this far, there was nothing to do,\n    # the module is no longer loaded.\n    return 0\n}\n\n_rmmod()\n{\n    if modprobe -r \"$1\"; then\n        touch \"/run/libreelec/suspend/module:$1\"\n        return 0\n    else\n        logger -t suspend-modules \"# could not unload '$1', usage count was $2\"\n        return 1\n    fi\n}\n\nresume_modules()\n{\n    for x in /run/libreelec/suspend/module:* ; do\n        [ -O \"${x}\" ] || continue\n        modprobe \"${x##*:}\" &>/dev/null && \\\n            logger -t resume-modules \"Reloaded module ${x##*:}.\" || \\\n            logger -t resume-modules \"Could not reload module ${x##*:}.\"\n    done\n}\n\nsuspend_modules()\n{\n    [ -z \"$SUSPEND_MODULES\" ] && return 0\n    # clean up\n    rm -rf /run/libreelec/suspend\n    mkdir -p /run/libreelec/suspend\n    for x in $SUSPEND_MODULES ; do\n        modunload $x && \\\n            logger -t suspend-modules \"Unloading kernel module $x: Done\" || \\\n            logger -t suspend-modules \"Unloading kernel module $x: Failed\"\n    done\n    return 0\n}\n\ncase $1 in\n    pre)\n        suspend_modules\n    ;;\n    post)\n        resume_modules\n    ;;\nesac\n"
  },
  {
    "path": "packages/sysutils/busybox/sysctl.d/99-coredump.conf",
    "content": "kernel.core_pattern=/storage/.cache/cores/core.%E.%t.%p\n"
  },
  {
    "path": "packages/sysutils/busybox/sysctl.d/cdrom.conf",
    "content": "dev.cdrom.lock=0\ndev.cdrom.autoclose=0\n"
  },
  {
    "path": "packages/sysutils/busybox/sysctl.d/memory.conf",
    "content": "vm.min_free_kbytes=16384\n"
  },
  {
    "path": "packages/sysutils/busybox/system.d/fs-resize.service",
    "content": "[Unit]\nDescription=FS Resize\nDefaultDependencies=no\n\n[Service]\nType=idle\nExecStart=/usr/lib/libreelec/fs-resize\nStandardInput=tty-force\nStandardOutput=inherit\nStandardError=inherit\n"
  },
  {
    "path": "packages/sysutils/busybox/system.d/fs-resize.target",
    "content": "[Unit]\nDescription=FS Resize target\nRequires=fs-resize.service\nAfter=fs-resize.service\nAllowIsolate=yes\n"
  },
  {
    "path": "packages/sysutils/busybox/system.d/ledfix.service",
    "content": "[Unit]\nDescription=LEDfix Service\nAfter=network-online.target graphical.target\nRequires=graphical.target\nWants=kodi.target\n\n[Service]\nType=oneshot\nExecStart=/bin/sh /usr/bin/ledfix\nRemainAfterExit=yes\nStartLimitInterval=0\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/sysutils/busybox/system.d/locale.service",
    "content": "[Unit]\nDescription=Compile locale definition files\nConditionPathExists=!/storage/.cache/locpath\nConditionPathExists=!/storage/.kodi/addons/service.locale/locpath\nBefore=kodi.service\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nEnvironment=I18NPATH=/usr/share/i18n\nExecStartPre=/bin/mkdir /storage/.cache/locpath\nExecStart=/usr/bin/localedef --quiet -i POSIX -f UTF-8 /storage/.cache/locpath/C.UTF-8\nSuccessExitStatus=0 1\nRemainAfterExit=yes\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/sysutils/busybox/system.d/rpi-flash-firmware.service",
    "content": "[Unit]\nDescription=RPi Flash Firmware\nRequires=tmp.mount var.mount sys-kernel-config.mount\nAfter=tmp.mount var.mount sys-kernel-config.mount\nDefaultDependencies=no\n\n[Service]\nType=idle\nExecStart=/usr/lib/libreelec/rpi-flash-firmware\nStandardInput=tty-force\nStandardOutput=inherit\nStandardError=inherit\n"
  },
  {
    "path": "packages/sysutils/busybox/system.d/rpi-flash-firmware.target",
    "content": "[Unit]\nDescription=RPi Flash Firmware target\nRequires=rpi-flash-firmware.service\nAfter=rpi-flash-firmware.service\nAllowIsolate=yes\n"
  },
  {
    "path": "packages/sysutils/busybox/system.d/shell.service",
    "content": "[Unit]\nDescription=Textmode Shell\nAfter=multi-user.target\n\n[Service]\nEnvironment=TTY=1\nWorkingDirectory=/storage\nExecStartPre=/bin/sh -c 'echo -en \"\\033[?25h\"'\nExecStart=/bin/sh -c 'clear; lsb_release; . /etc/profile; exec /bin/sh'\n\nRestart=always\nRestartSec=0\nStandardInput=tty\nTTYPath=/dev/tty1\nTTYReset=yes\nTTYVHangup=yes\nKillMode=process\nIgnoreSIGPIPE=no\n# bash ignores SIGTERM\nKillSignal=SIGHUP\n\n[Install]\nWantedBy=textmode.target\n"
  },
  {
    "path": "packages/sysutils/busybox/system.d/show-version.service",
    "content": "[Unit]\nDescription=Show Version\nDefaultDependencies=false\nConditionKernelCommandLine=!morequiet\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/lsb_release\nRemainAfterExit=yes\nStandardOutput=tty\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "packages/sysutils/busybox/system.d/storage-log.service",
    "content": "[Unit]\nDescription=Create Persistent Log Directory on /storage and rotate large logs\nDefaultDependencies=no\nRequiresMountsFor=/storage\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/bin/mkdir -p /storage/.cache/log/journal /storage/.cache/journald.conf.d ; \\\n/usr/bin/find /storage/.cache/log/ -maxdepth 1 -type f -size +512k ! -name '*.old' -exec mv {} {}.old \\;\n"
  },
  {
    "path": "packages/sysutils/busybox/system.d/textmode.target",
    "content": "[Unit]\nDescription=Textmode\nRequires=multi-user.target\nAfter=multi-user.target\nConflicts=rescue.target\nAllowIsolate=yes\n"
  },
  {
    "path": "packages/sysutils/busybox/system.d/var-log.mount",
    "content": "[Unit]\nDescription=Persistent Log Storage\nRequiresMountsFor=/var /storage\nRequires=storage-log.service\nAfter=storage-log.service\nConditionKernelCommandLine=!installer\nConditionKernelCommandLine=|debugging\nConditionPathExists=|/storage/.cache/debug.libreelec\nConditionPathExists=|/storage/.cache/journald.conf.d/00_settings.conf\n\n[Mount]\nWhat=/storage/.cache/log\nWhere=/var/log\nOptions=bind\n"
  },
  {
    "path": "packages/sysutils/busybox/system.d/var.mount",
    "content": "#  This file is part of systemd.\n#\n#  systemd is free software; you can redistribute it and/or modify it\n#  under the terms of the GNU Lesser General Public License as published by\n#  the Free Software Foundation; either version 2.1 of the License, or\n#  (at your option) any later version.\n\n[Unit]\nDescription=Variable Directory\nDocumentation=man:hier(7)\nDocumentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems\nDefaultDependencies=no\nBefore=local-fs.target umount.target\n\n[Mount]\nWhat=tmpfs\nWhere=/var\nType=tmpfs\n\n[Install]\nWantedBy=local-fs.target\n"
  },
  {
    "path": "packages/sysutils/busybox/system.d/vfd-clock.service",
    "content": "[Unit]\nDescription=VFD Clock Service\nAfter=network-online.target graphical.target\nRequires=graphical.target\nWants=kodi.target\n\n[Service]\nType=oneshot\nExecStart=/bin/sh /usr/bin/vfd-clock start\nExecStopPost=/bin/sh /usr/bin/vfd-clock stop\nRemainAfterExit=yes\nStartLimitInterval=0\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "packages/sysutils/busybox/system.d.opt/cron-defaults.service",
    "content": "[Unit]\nDescription=Cron defaults\nAfter=local-fs.target\n\nConditionPathExists=!/storage/.cache/services/crond.conf\nConditionPathExists=!/storage/.cache/services/crond.disabled\n\n[Service]\nType=oneshot\nExecStart=/bin/sh -c 'cp /usr/share/services/crond.conf /storage/.cache/services/'\nRemainAfterExit=yes\n"
  },
  {
    "path": "packages/sysutils/busybox/system.d.opt/cron.service",
    "content": "[Unit]\nDescription=Cron daemon\nAfter=cron-defaults.service\nRequires=cron-defaults.service\n\nConditionPathExists=/storage/.cache/services/crond.conf\n\n[Service]\nExecStartPre=/bin/mkdir -p /storage/.cache/cron/crontabs\nExecStart=/sbin/crond -f -S\nKillMode=process\nTimeoutStopSec=1s\n\n[Install]\nWantedBy=multi-user.target\n\n"
  },
  {
    "path": "packages/sysutils/busybox/tmpfiles.d/z_01_busybox.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nd    /var/media                0755 root root - -\n\nd    /storage/backup           0755 root root - -\nd    /storage/.update          0755 root root - -\nd    /storage/.cache/cores     0755 root root - -\nd    /storage/.cache/kernel-overlays  0755 root root - -\nd    /storage/.cache/services  0755 root root - -\nd    /storage/.config          0755 root root - -\n"
  },
  {
    "path": "packages/sysutils/cryptsetup/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020 Jeff Doozan <github@doozan.com>\n\nPKG_NAME=\"cryptsetup\"\nPKG_MAJOR=\"2.3\"\nPKG_VERSION=\"$PKG_MAJOR.4\"\nPKG_LICENSE=\"GPL\"\nPKG_URL=\"https://www.kernel.org/pub/linux/utils/cryptsetup/v$PKG_MAJOR/$PKG_NAME-$PKG_VERSION.tar.xz\"\nPKG_SHA256=\"9d16eebb96b53b514778e813019b8dd15fea9fec5aafde9fae5febf59df83773\"\nPKG_LONGDESC=\"cryptsetup utility for managing LUKS containers\"\nPKG_DEPENDS_HOST=\"toolchain ccache:host\"\nPKG_DEPENDS_TARGET=\"toolchain popt libdevmapper util-linux json-c openssl\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"\n        --disable-cryptsetup-reencrypt \\\n        --disable-integritysetup \\\n        --disable-selinux \\\n        --disable-rpath \\\n        --disable-veritysetup \\\n        --disable-udev \\\n        --enable-blkid\"\n"
  },
  {
    "path": "packages/sysutils/dbus/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dbus\"\nPKG_VERSION=\"1.14.0\"\nPKG_SHA256=\"ccd7cce37596e0a19558fd6648d1272ab43f011d80c8635aea8fd0bad58aebd4\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://dbus.freedesktop.org\"\nPKG_URL=\"https://dbus.freedesktop.org/releases/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain expat systemd\"\nPKG_LONGDESC=\"D-Bus is a message bus, used for sending messages between applications.\"\nPKG_TOOLCHAIN=\"configure\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"export ac_cv_have_abstract_sockets=yes \\\n                           --with-sysroot=${SYSROOT_PREFIX} \\\n                           --libexecdir=/usr/lib/dbus \\\n                           --disable-verbose-mode \\\n                           --disable-asserts \\\n                           --enable-checks \\\n                           --disable-tests \\\n                           --disable-ansi \\\n                           --disable-xml-docs \\\n                           --disable-doxygen-docs \\\n                           --disable-x11-autolaunch \\\n                           --disable-selinux \\\n                           --disable-libaudit \\\n                           --enable-systemd \\\n                           --enable-inotify \\\n                           --without-valgrind \\\n                           --without-x \\\n                           --with-dbus-user=dbus \\\n                           --runstatedir=/run \\\n                           --with-system-socket=/run/dbus/system_bus_socket\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/etc/rc.d\n  rm -rf ${INSTALL}/usr/lib/dbus-1.0/include\n}\n\npost_install() {\n  add_user dbus x 81 81 \"System message bus\" \"/\" \"/bin/sh\"\n  add_group dbus 81\n  add_group netdev 497\n\n  echo \"chmod 4750 ${INSTALL}/usr/lib/dbus/dbus-daemon-launch-helper\" >> ${FAKEROOT_SCRIPT}\n  echo \"chown 0:81 ${INSTALL}/usr/lib/dbus/dbus-daemon-launch-helper\" >> ${FAKEROOT_SCRIPT}\n}\n"
  },
  {
    "path": "packages/sysutils/diskdev_cmds/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"diskdev_cmds\"\nPKG_VERSION=\"332.14\"\nPKG_SHA256=\"a46bec392661a02d9683355baf4442d494e2bcde0ffb094aacc1e57ddc03b3d4\"\nPKG_LICENSE=\"APSL\"\nPKG_SITE=\"http://src.gnu-darwin.org/DarwinSourceArchive/expanded/diskdev_cmds/\"\nPKG_URL=\"http://www.opensource.apple.com/tarballs/diskdev_cmds/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain openssl\"\nPKG_LONGDESC=\"The fsck and mkfs utliities for hfs and hfsplus filesystems.\"\n\npre_make_target() {\n  PKG_MAKE_OPTS_TARGET=\"-f Makefile.lnx CC=${CC}\"\n\n  export CFLAGS=\"${TARGET_CFLAGS} -g3 -Wall -I${PKG_BUILD}/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/sbin\n    cp fsck_hfs.tproj/fsck_hfs ${INSTALL}/usr/sbin\n      ln -sf fsck_hfs ${INSTALL}/usr/sbin/fsck.hfs\n      ln -sf fsck_hfs ${INSTALL}/usr/sbin/fsck.hfsplus\n}\n\nmake_init() {\n  : # we reuse make_target()\n}\n"
  },
  {
    "path": "packages/sysutils/diskdev_cmds/patches/diskdev_cmds-332.14-main.patch",
    "content": "diff -druN diskdev_cmds-332.14/fsck_hfs.tproj/cache.c diskdev_cmds-332.14-patched/fsck_hfs.tproj/cache.c\n--- diskdev_cmds-332.14/fsck_hfs.tproj/cache.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/cache.c\t2008-07-01 22:30:11.000000000 +0200\n@@ -26,7 +26,11 @@\n #include <stdlib.h>\n #include <sys/mman.h>\n #include <sys/stat.h>\n+#if LINUX\n+#include \"missing.h\"\n+#else\n #include <sys/types.h>\n+#endif /* __LINUX__ */\n #include <sys/uio.h>\n #include <unistd.h>\n #include <string.h>\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/cache.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/cache.o differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/BlockCache.c diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/BlockCache.c\n--- diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/BlockCache.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/BlockCache.c\t2008-07-01 22:30:11.000000000 +0200\n@@ -20,6 +20,9 @@\n  * @APPLE_LICENSE_HEADER_END@\n  */\n \n+#if LINUX\n+#include \"missing.h\"\n+#endif\n #include \"SRuntime.h\"\n #include \"Scavenger.h\"\n #include \"../cache.h\"\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/BlockCache.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/BlockCache.o differ\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/BTreeAllocate.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/BTreeAllocate.o differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/BTree.c diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/BTree.c\n--- diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/BTree.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/BTree.c\t2008-07-01 22:30:11.000000000 +0200\n@@ -1705,7 +1705,9 @@\n \t\t\t\t\t\t\t\t UInt16\t\t\t\t\t version,\n \t\t\t\t\t\t\t\t BTreeInfoRec\t\t\t*info )\n {\n+#if !LINUX\n #pragma unused (version)\n+#endif\n \n \tBTreeControlBlockPtr\tbtreePtr;\n \nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/BTreeMiscOps.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/BTreeMiscOps.o differ\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/BTreeNodeOps.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/BTreeNodeOps.o differ\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/BTree.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/BTree.o differ\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/BTreeScanner.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/BTreeScanner.o differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/BTreeTreeOps.c diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/BTreeTreeOps.c\n--- diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/BTreeTreeOps.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/BTreeTreeOps.c\t2008-07-01 22:30:11.000000000 +0200\n@@ -223,7 +223,7 @@\n         //\n         if (curNodeNum == 0)\n         {\n-//          Panic(\"\\pSearchTree: curNodeNum is zero!\");\n+            Panic(\"SearchTree: curNodeNum is zero!\");\n             err = fsBTInvalidNodeErr;\n             goto ErrorExit;\n         }\n@@ -433,7 +433,7 @@\n \t\tM_ExitOnError (err);\n \t\t\n \t\tif ( DEBUG_BUILD && updateParent && newRoot )\n-\t\t\tDebugStr(\"\\p InsertLevel: New root from primary key, update from secondary key...\");\n+\t\t\tDebugStr(\"InsertLevel: New root from primary key, update from secondary key...\");\n \t}\n \n \t//////////////////////// Update Parent(s) ///////////////////////////////\n@@ -448,7 +448,7 @@\n \t\t\n \t\tsecondaryKey = nil;\n \t\t\n-\t\tPanicIf ( (level == btreePtr->treeDepth), \"\\p InsertLevel: unfinished insert!?\");\n+\t\tPanicIf ( (level == btreePtr->treeDepth), \"InsertLevel: unfinished insert!?\");\n \n \t\t++level;\n \n@@ -456,7 +456,7 @@\n \t\tindex = treePathTable [level].index;\n \t\tparentNodeNum = treePathTable [level].node;\n \n-\t\tPanicIf ( parentNodeNum == 0, \"\\p InsertLevel: parent node is zero!?\");\n+\t\tPanicIf ( parentNodeNum == 0, \"InsertLevel: parent node is zero!?\");\n \n \t\terr = GetNode (btreePtr, parentNodeNum, &parentNode);\t// released as target node in next level up\n \t\tM_ExitOnError (err);\n@@ -470,7 +470,7 @@\n \t\t{\n \t\t\t//debug: check if ptr == targetNodeNum\n \t\t\tGetRecordByIndex (btreePtr, parentNode.buffer, index, &keyPtr, &recPtr, &recSize);\n-\t\t\tPanicIf( (*(UInt32 *) recPtr) != targetNodeNum, \"\\p InsertLevel: parent ptr doesn't match target node!\");\n+\t\t\tPanicIf( (*(UInt32 *) recPtr) != targetNodeNum, \"InsertLevel: parent ptr doesn't match target node!\");\n \t\t\t\n \t\t\t// need to delete and re-insert this parent key/ptr\n \t\t\t// we delete it here and it gets re-inserted in the\n@@ -532,7 +532,7 @@\n \t(void) ReleaseNode (btreePtr, targetNode);\n \t(void) ReleaseNode (btreePtr, &siblingNode);\n \n-\tPanic (\"\\p InsertLevel: an error occured!\");\n+\tPanic (\"InsertLevel: an error occured!\");\n \n \treturn\terr;\n \n@@ -566,7 +566,7 @@\n \n \t*rootSplit = false;\n \t\n-\tPanicIf ( targetNode->buffer == siblingNode->buffer, \"\\p InsertNode: targetNode == siblingNode, huh?\");\n+\tPanicIf ( targetNode->buffer == siblingNode->buffer, \"InsertNode: targetNode == siblingNode, huh?\");\n \t\n \tleftNodeNum = ((NodeDescPtr) targetNode->buffer)->bLink;\n \trightNodeNum = ((NodeDescPtr) targetNode->buffer)->fLink;\n@@ -606,7 +606,7 @@\n \t\n \tif ( leftNodeNum > 0 )\n \t{\n-\t\tPanicIf ( siblingNode->buffer != nil, \"\\p InsertNode: siblingNode already aquired!\");\n+\t\tPanicIf ( siblingNode->buffer != nil, \"InsertNode: siblingNode already aquired!\");\n \n \t\tif ( siblingNode->buffer == nil )\n \t\t{\n@@ -614,7 +614,7 @@\n \t\t\tM_ExitOnError (err);\n \t\t}\n \n-\t\tPanicIf ( ((NodeDescPtr) siblingNode->buffer)->fLink != nodeNum, \"\\p InsertNode, RotateLeft: invalid sibling link!\" );\n+\t\tPanicIf ( ((NodeDescPtr) siblingNode->buffer)->fLink != nodeNum, \"InsertNode, RotateLeft: invalid sibling link!\" );\n \n \t\tif ( !key->skipRotate )\t\t// are rotates allowed?\n \t\t{\n@@ -703,7 +703,7 @@\n \n \ttargetNodeNum = treePathTable[level].node;\n \ttargetNodePtr = targetNode->buffer;\n-\tPanicIf (targetNodePtr == nil, \"\\pDeleteTree: targetNode has nil buffer!\");\n+\tPanicIf (targetNodePtr == nil, \"DeleteTree: targetNode has nil buffer!\");\n \n \tDeleteRecord (btreePtr, targetNodePtr, index);\n \t\t\n@@ -797,7 +797,7 @@\n \t\t\t \n \t\t\t//debug: check if ptr == targetNodeNum\n \t\t\tGetRecordByIndex (btreePtr, parentNode.buffer, index, &keyPtr, &recPtr, &recSize);\n-\t\t\tPanicIf( (*(UInt32 *) recPtr) != targetNodeNum, \"\\p DeleteTree: parent ptr doesn't match targetNodeNum!!\");\n+\t\t\tPanicIf( (*(UInt32 *) recPtr) != targetNodeNum, \" DeleteTree: parent ptr doesn't match targetNodeNum!!\");\n \t\t\t\n \t\t\t// need to delete and re-insert this parent key/ptr\n \t\t\tDeleteRecord (btreePtr, parentNode.buffer, index);\n@@ -1018,7 +1018,7 @@\n \t\t\t\t\t\t\t\t\t\tkeyPtr, keyLength, recPtr, recSize);\n \t\t\tif ( !didItFit )\n \t\t\t{\n-\t\t\t\tPanic (\"\\pRotateLeft: InsertKeyRecord (left) returned false!\");\n+\t\t\t\tPanic (\"RotateLeft: InsertKeyRecord (left) returned false!\");\n \t\t\t\terr = fsBTBadRotateErr;\n \t\t\t\tgoto ErrorExit;\n \t\t\t}\n@@ -1031,7 +1031,7 @@\n \t\t\tdidItFit = RotateRecordLeft (btreePtr, leftNode, rightNode);\n \t\t\tif ( !didItFit )\n \t\t\t{\n-\t\t\t\tPanic (\"\\pRotateLeft: RotateRecordLeft returned false!\");\n+\t\t\t\tPanic (\"RotateLeft: RotateRecordLeft returned false!\");\n \t\t\t\terr = fsBTBadRotateErr;\n \t\t\t\tgoto ErrorExit;\n \t\t\t}\n@@ -1048,7 +1048,7 @@\n \t\t\t\t\t\t\t\t\tkeyPtr, keyLength, recPtr, recSize);\n \t\tif ( !didItFit )\n \t\t{\n-\t\t\tPanic (\"\\pRotateLeft: InsertKeyRecord (right) returned false!\");\n+\t\t\tPanic (\"RotateLeft: InsertKeyRecord (right) returned false!\");\n \t\t\terr = fsBTBadRotateErr;\n \t\t\tgoto ErrorExit;\n \t\t}\n@@ -1117,7 +1117,7 @@\n \tright = rightNode->buffer;\n \tleft  = leftNode->buffer;\n \t\n-\tPanicIf ( right->bLink != 0 && left == 0, \"\\p SplitLeft: left sibling missing!?\" );\n+\tPanicIf ( right->bLink != 0 && left == 0, \" SplitLeft: left sibling missing!?\" );\n \t\n \t// type should be kLeafNode or kIndexNode\n \t\n@@ -1240,8 +1240,8 @@\n \tBoolean\t\t\t\tdidItFit;\n \tUInt16\t\t\t\tkeyLength;\t\n \t\n-\tPanicIf (leftNode == nil, \"\\pAddNewRootNode: leftNode == nil\");\n-\tPanicIf (rightNode == nil, \"\\pAddNewRootNode: rightNode == nil\");\n+\tPanicIf (leftNode == nil, \"AddNewRootNode: leftNode == nil\");\n+\tPanicIf (rightNode == nil, \"AddNewRootNode: rightNode == nil\");\n \t\n \t\n \t/////////////////////// Initialize New Root Node ////////////////////////////\n@@ -1264,7 +1264,7 @@\n \tdidItFit = InsertKeyRecord ( btreePtr, rootNode.buffer, 0, keyPtr, keyLength,\n \t\t\t\t\t\t\t\t (UInt8 *) &rightNode->bLink, 4 );\n \n-\tPanicIf ( !didItFit, \"\\pAddNewRootNode:InsertKeyRecord failed for left index record\");\n+\tPanicIf ( !didItFit, \"AddNewRootNode:InsertKeyRecord failed for left index record\");\n \n \n \t//////////////////// Insert Right Node Index Record /////////////////////////\n@@ -1275,7 +1275,7 @@\n \tdidItFit = InsertKeyRecord ( btreePtr, rootNode.buffer, 1, keyPtr, keyLength,\n \t\t\t\t\t\t\t\t (UInt8 *) &leftNode->fLink, 4 );\n \n-\tPanicIf ( !didItFit, \"\\pAddNewRootNode:InsertKeyRecord failed for right index record\");\n+\tPanicIf ( !didItFit, \"AddNewRootNode:InsertKeyRecord failed for right index record\");\n \n \n #if DEBUG_TREEOPS\n@@ -1355,7 +1355,7 @@\n \t}\n \trightPtr = rightNodePtr->buffer;\n \t\n-\tPanicIf ( leftPtr->fLink != 0 && rightPtr == 0, \"\\p SplitRight: right sibling missing!?\" );\n+\tPanicIf ( leftPtr->fLink != 0 && rightPtr == 0, \"SplitRight: right sibling missing!?\" );\n \t\n \t// type should be kLeafNode or kIndexNode\n \t\n@@ -1557,7 +1557,7 @@\n \t\t\t\t\t\t\t\t\tkeyPtr, keyLength, recPtr, recSize);\n \t\tif ( !didItFit )\n \t\t{\n-\t\t\tPanic (\"\\pRotateRight: InsertKeyRecord (left) returned false!\");\n+\t\t\tPanic (\"RotateRight: InsertKeyRecord (left) returned false!\");\n \t\t\terr = fsBTBadRotateErr;\n \t\t\tgoto ErrorExit;\n \t\t}\n@@ -1572,7 +1572,7 @@\n \t\tdidItFit = RotateRecordRight( btreePtr, leftNodePtr, rightNodePtr );\n \t\tif ( !didItFit )\n \t\t{\n-\t\t\tPanic (\"\\pRotateRight: RotateRecordRight returned false!\");\n+\t\t\tPanic (\"RotateRight: RotateRecordRight returned false!\");\n \t\t\terr = fsBTBadRotateErr;\n \t\t\tgoto ErrorExit;\n \t\t}\n@@ -1583,7 +1583,7 @@\n \t\t\t\t\t\t\t\t\t\tkeyPtr, keyLength, recPtr, recSize);\n \t\t\tif ( !didItFit )\n \t\t\t{\n-\t\t\t\tPanic (\"\\pRotateRight: InsertKeyRecord (left) returned false!\");\n+\t\t\t\tPanic (\"RotateRight: InsertKeyRecord (left) returned false!\");\n \t\t\t\terr = fsBTBadRotateErr;\n \t\t\t\tgoto ErrorExit;\n \t\t\t}\n@@ -1607,7 +1607,7 @@\n \t\t\t\t\t\t\t\t\tkeyPtr, keyLength, recPtr, recSize);\n \t\tif ( !didItFit )\n \t\t{\n-\t\t\tPanic (\"\\pRotateRight: InsertKeyRecord (right) returned false!\");\n+\t\t\tPanic (\"RotateRight: InsertKeyRecord (right) returned false!\");\n \t\t\terr = fsBTBadRotateErr;\n \t\t\tgoto ErrorExit;\n \t\t}\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/BTreeTreeOps.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/BTreeTreeOps.o differ\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/CatalogCheck.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/CatalogCheck.o differ\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/HardLinkCheck.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/HardLinkCheck.o differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/hfs_endian.c diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/hfs_endian.c\n--- diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/hfs_endian.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/hfs_endian.c\t2008-07-02 00:10:48.000000000 +0200\n@@ -31,7 +31,11 @@\n #include <sys/types.h>\n #include <sys/stat.h>\n \n+#if LINUX\n+#include \"missing.h\"\n+#else\n #include <architecture/byte_order.h>\n+#endif\n #include <hfs/hfs_format.h>\n \n #include \"Scavenger.h\"\n@@ -194,7 +198,7 @@\n     BTNodeDescriptor *srcDesc = src->buffer;\n     BTreeControlBlockPtr btcb = fcb->fcbBtree;\n     UInt16 *srcOffs = NULL;\n-    UInt32 i;\n+    int i;\n     int error = 0;\n \n //\t\t\tWriteError(fcb->fcbVolume->vcbGPtr, E_BadNode, fcb->fcbFileID, src->blockNum);\n@@ -433,7 +437,7 @@\n     BTNodeDescriptor *srcDesc = src->buffer;\n     UInt16 *srcOffs = (UInt16 *)((char *)src->buffer + (src->blockSize - (srcDesc->numRecords * sizeof (UInt16))));\n \tchar *nextRecord;\t/*  Points to start of record following current one */\n-    UInt32 i;\n+    int i;\n     UInt32 j;\n \n     if (fileID == kHFSExtentsFileID) {\n@@ -559,7 +563,7 @@\n             /* Make sure name length is consistent with key length */\n             if (keyLength < sizeof(srcKey->parentID) + sizeof(srcKey->nodeName.length) +\n                 srcKey->nodeName.length*sizeof(srcKey->nodeName.unicode[0])) {\n-\t\t\t\tif (debug) printf(\"hfs_swap_HFSPlusBTInternalNode: catalog record #%d keyLength=%d expected=%lu\\n\",\n+\t\t\t\tif (debug) printf(\"hfs_swap_HFSPlusBTInternalNode: catalog record #%d keyLength=%d expected=%i\\n\",\n \t\t\t\t\tsrcDesc->numRecords-i, keyLength, sizeof(srcKey->parentID) + sizeof(srcKey->nodeName.length) +\n                     srcKey->nodeName.length*sizeof(srcKey->nodeName.unicode[0]));\n \t\t\t\tWriteError(fcb->fcbVolume->vcbGPtr, E_KeyLen, fcb->fcbFileID, src->blockNum);\n@@ -854,7 +858,7 @@\n     UInt16 *srcOffs = (UInt16 *)((char *)src->buffer + (src->blockSize - (srcDesc->numRecords * sizeof (UInt16))));\n \tchar *nextRecord;\t/*  Points to start of record following current one */\n \n-    UInt32 i;\n+    int i;\n     UInt32 j;\n \n     if (fileID == kHFSExtentsFileID) {\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/hfs_endian.h diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/hfs_endian.h\n--- diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/hfs_endian.h\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/hfs_endian.h\t2008-07-01 22:30:11.000000000 +0200\n@@ -27,9 +27,14 @@\n  *\n  * This file prototypes endian swapping routines for the HFS/HFS Plus\n  * volume format.\n- */\n+*/\n #include <hfs/hfs_format.h>\n+#if LINUX\n+#include <endian.h>\n+#include <byteswap.h>\n+#else\n #include <architecture/byte_order.h>\n+#endif\n #include \"SRuntime.h\"\n \n /*********************/\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/hfs_endian.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/hfs_endian.o differ\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/libdfa.a and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/libdfa.a differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/Makefile.lnx diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/Makefile.lnx\n--- diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/Makefile.lnx\t1970-01-01 01:00:00.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/Makefile.lnx\t2008-07-01 22:30:11.000000000 +0200\n@@ -0,0 +1,15 @@\n+CFILES = hfs_endian.c BlockCache.c\\\n+         BTree.c BTreeAllocate.c BTreeMiscOps.c \\\n+         BTreeNodeOps.c BTreeScanner.c BTreeTreeOps.c\\\n+         CatalogCheck.c HardLinkCheck.c\\\n+         SBTree.c SControl.c SVerify1.c SVerify2.c\\\n+         SRepair.c SRebuildCatalogBTree.c\\\n+         SUtils.c SKeyCompare.c SDevice.c SExtents.c SAllocate.c\\\n+         SCatalog.c SStubs.c VolumeBitmapCheck.c\n+OFILES = $(CFILES:.c=.o)\n+\n+libdfa.a: $(OFILES)\n+\t$(AR) rc $@ $?\n+\n+clean:\n+\t$(RM) $(OFILES) libdfa.a\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SAllocate.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SAllocate.o differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SBTree.c diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SBTree.c\n--- diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SBTree.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SBTree.c\t2008-07-01 22:30:11.000000000 +0200\n@@ -93,7 +93,7 @@\n \t\t\tCopyMemory(&resultIterator->key, foundKey, CalcKeySize(btcb, &resultIterator->key));\t// warning, this could overflow user's buffer!!!\n \n \t\tif ( DEBUG_BUILD && !ValidHFSRecord(data, btcb, *dataSize) )\n-\t\t\tDebugStr(\"\\pSearchBTreeRecord: bad record?\");\n+\t\t\tDebugStr(\"SearchBTreeRecord: bad record?\");\n \t}\n \n ErrorExit:\n@@ -190,7 +190,7 @@\n \t\tCopyMemory(&iterator->key, key, CalcKeySize(btcb, &iterator->key));\t// warning, this could overflow user's buffer!!!\n \t\t\n \t\tif ( DEBUG_BUILD && !ValidHFSRecord(data, btcb, *dataSize) )\n-\t\t\tDebugStr(\"\\pGetBTreeRecord: bad record?\");\n+\t\t\tDebugStr(\"GetBTreeRecord: bad record?\");\n \n \t}\n \t\n@@ -222,7 +222,7 @@\n \tCopyMemory(key, &iterator.key, CalcKeySize(btcb, (BTreeKey *) key));\t// should we range check against maxkeylen?\n \n \tif ( DEBUG_BUILD && !ValidHFSRecord(data, btcb, dataSize) )\n-\t\tDebugStr(\"\\pInsertBTreeRecord: bad record?\");\n+\t\tDebugStr(\"InsertBTreeRecord: bad record?\");\n \n \tresult = BTInsertRecord( fcb, &iterator, &btRecord, dataSize );\n \n@@ -284,7 +284,7 @@\n \tCopyMemory(key, &iterator.key, CalcKeySize(btcb, (BTreeKey *) key));\t\t// should we range check against maxkeylen?\n \n \tif ( DEBUG_BUILD && !ValidHFSRecord(newData, btcb, dataSize) )\n-\t\tDebugStr(\"\\pReplaceBTreeRecord: bad record?\");\n+\t\tDebugStr(\"ReplaceBTreeRecord: bad record?\");\n \n \tresult = BTReplaceRecord( fcb, &iterator, &btRecord, dataSize );\n \n@@ -301,7 +301,9 @@\n OSStatus\n SetEndOfForkProc ( SFCB *filePtr, FSSize minEOF, FSSize maxEOF )\n {\n+#if !LINUX\n #pragma unused (maxEOF)\n+#endif\n \n \tOSStatus\tresult;\n \tUInt32\t\tactualSectorsAdded;\n@@ -321,7 +323,7 @@\n \telse\n \t{\n \t\tif ( DEBUG_BUILD )\n-\t\t\tDebugStr(\"\\pSetEndOfForkProc: minEOF is smaller than current size!\");\n+\t\t\tDebugStr(\"SetEndOfForkProc: minEOF is smaller than current size!\");\n \t\treturn -1;\n \t}\n \n@@ -347,7 +349,7 @@\n \t//\tMake sure we got at least as much space as we needed\n \t//\n \tif (filePtr->fcbLogicalSize < minEOF) {\n-\t\tPanic(\"\\pSetEndOfForkProc: disk too full to extend B-tree file\");\n+\t\tPanic(\"SetEndOfForkProc: disk too full to extend B-tree file\");\n \t\treturn dskFulErr;\n \t}\n \t\n@@ -419,7 +421,7 @@\n \tif ( (keyLen < 6) || (keyLen > btcb->maxKeyLength) )\n \t{\n \t\tif ( DEBUG_BUILD )\n-\t\t\tDebugStr(\"\\pCheckBTreeKey: bad key length!\");\n+\t\t\tDebugStr(\"CheckBTreeKey: bad key length!\");\n \t\treturn fsBTInvalidKeyLengthErr;\n \t}\n \t\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SBTree.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SBTree.o differ\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SCatalog.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SCatalog.o differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/Scavenger.h diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/Scavenger.h\n--- diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/Scavenger.h\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/Scavenger.h\t2008-07-01 22:30:11.000000000 +0200\n@@ -35,11 +35,16 @@\n #include \"BTreeScanner.h\"\n #include \"hfs_endian.h\"\n \n+#if LINUX\n+#define XATTR_MAXNAMELEN 127\n+#include <limits.h>\n+#else\n #include <sys/xattr.h>\n #include <sys/acl.h>\n #include <sys/kauth.h>\n-#include <sys/errno.h>\n #include <sys/syslimits.h>\n+#endif\n+#include <sys/errno.h>\n \n #ifdef __cplusplus\n extern\t\"C\" {\n@@ -1434,4 +1439,8 @@\n };\n #endif\n \n+#if LINUX\n+#undef XATTR_MAXNAMELEN\n+#endif\n+\n #endif /* __SCAVENGER__ */\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SControl.c diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SControl.c\n--- diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SControl.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SControl.c\t2008-07-01 22:30:11.000000000 +0200\n@@ -739,7 +739,7 @@\n \t\tpointer = (ScavStaticStructures *) AllocateClearMemory( sizeof(ScavStaticStructures) );\n \t\tif ( pointer == nil ) {\n \t\t\tif ( GPtr->logLevel >= kDebugLog ) {\n-\t\t\t\tprintf( \"\\t error %d - could not allocate %ld bytes of memory \\n\",\n+\t\t\t\tprintf( \"\\t error %d - could not allocate %i bytes of memory \\n\",\n \t\t\t\t\tR_NoMem, sizeof(ScavStaticStructures) );\n \t\t\t}\n \t\t\treturn( R_NoMem );\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SControl.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SControl.o differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SDevice.c diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SDevice.c\n--- diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SDevice.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SDevice.c\t2008-07-01 22:30:11.000000000 +0200\n@@ -28,24 +28,61 @@\n #include <unistd.h>\n #include <errno.h>\n #include <sys/ioctl.h>\n-\n+#if LINUX\n+#include <fcntl.h>\n+#include <sys/stat.h>\n+#else\n #include <IOKit/storage/IOMediaBSDClient.h>\n-\n+#endif /* LINUX */\n #else\n-\n #include <Files.h>\n #include <Device.h>\n #include <Disks.h>\n \n-#endif\n-\n+#endif \n \n OSErr GetDeviceSize(int driveRefNum, UInt64 *numBlocks, UInt32 *blockSize)\n {\n #if BSD\n \tUInt64 devBlockCount = 0;\n \tint devBlockSize = 0;\n+#if LINUX\n+\tstruct stat stbuf;\n+\n+\tdevBlockSize = 512;\n \n+#ifndef BLKGETSIZE\n+#define BLKGETSIZE              _IO(0x12,96)\n+#endif\n+#ifndef BLKGETSIZE64\n+#define BLKGETSIZE64            _IOR(0x12,114,size_t)\n+#endif\n+\tif (fstat(driveRefNum, &stbuf) < 0){\n+\t\tprintf(\"Error: %s\\n\", strerror(errno));\n+\t\treturn(-1);\n+\t}\n+        \n+        if (S_ISREG(stbuf.st_mode)) {\n+                devBlockCount = stbuf.st_size / 512;\n+        } \n+        else if (S_ISBLK(stbuf.st_mode)) {\n+                unsigned long size;\n+                u_int64_t size64;\n+                if (!ioctl(driveRefNum, BLKGETSIZE64, &size64))\n+                        devBlockCount = size64 / 512;\n+                else if (!ioctl(driveRefNum, BLKGETSIZE, &size))\n+                        devBlockCount = size;\n+                else{\n+                        printf(\"Error: %s\\n\", strerror(errno));\n+\t\t\treturn(-1);\n+\t\t}\n+\t\t\t\n+        }\n+        else{\n+                printf(\"Device is not a block device\");\n+\t\treturn(-1);\n+\t}\n+#elif BSD\n \tif (ioctl(driveRefNum, DKIOCGETBLOCKCOUNT, &devBlockCount) < 0) {\n \t\tprintf(\"ioctl(DKIOCGETBLOCKCOUNT) for fd %d: %s\\n\", driveRefNum, strerror(errno));\n \t\treturn (-1);\n@@ -55,6 +92,7 @@\n \t\tprintf(\"ioctl(DKIOCGETBLOCKSIZE) for fd %d: %s\\n\", driveRefNum, strerror(errno));\n \t\treturn (-1);\n \t}\n+#endif /* BSD */\n \n \tif (devBlockSize != 512) {\n \t\t*numBlocks = (devBlockCount * (UInt64)devBlockSize) / 512;\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SDevice.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SDevice.o differ\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SExtents.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SExtents.o differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SKeyCompare.c diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SKeyCompare.c\n--- diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SKeyCompare.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SKeyCompare.c\t2008-07-01 22:30:11.000000000 +0200\n@@ -454,7 +454,9 @@\n  * The name portion of the key is compared using a 16-bit binary comparison. \n  * This is called from the b-tree code.\n  */\n+#if !LINUX\n __private_extern__\n+#endif\n SInt32\n CompareAttributeKeys(const AttributeKey *searchKey, const AttributeKey *trialKey)\n {\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SKeyCompare.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SKeyCompare.o differ\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SRebuildCatalogBTree.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SRebuildCatalogBTree.o differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SRepair.c diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SRepair.c\n--- diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SRepair.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SRepair.c\t2008-07-01 22:30:11.000000000 +0200\n@@ -1593,7 +1593,9 @@\n \n static\tOSErr\tFixWrapperExtents( SGlobPtr GPtr, RepairOrderPtr p )\n {\n+#if !LINUX\n #pragma unused (p)\n+#endif\n \n \tOSErr\t\t\t\t\t\terr;\n \tHFSMasterDirectoryBlock\t\t*mdb;\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SRepair.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SRepair.o differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SRuntime.h diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SRuntime.h\n--- diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SRuntime.h\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SRuntime.h\t2008-07-01 22:30:11.000000000 +0200\n@@ -27,8 +27,11 @@\n #define __SRUNTIME__\n \n #if BSD\n-\n+#if LINUX\n+#include \"missing.h\"\n+#else\n #include <sys/types.h>\n+#endif\n #include <stdlib.h>\n #include <string.h>\n #include <stdio.h>\n@@ -91,10 +94,12 @@\n \n typedef u_int32_t\tHFSCatalogNodeID;\n \n+#if !LINUX\n enum {\n \tfalse\t\t= 0,\n \ttrue\t\t= 1\n };\n+#endif\n \n /* OS error codes */\n enum {\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SStubs.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SStubs.o differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SUtils.c diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SUtils.c\n--- diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SUtils.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SUtils.c\t2008-07-01 22:30:11.000000000 +0200\n@@ -380,7 +380,8 @@\n //\t\t\t\tGPtr->realVCB\t\t\tReal in-memory vcb\n //------------------------------------------------------------------------------\n \n-#if !BSD\t\n+#if BSD\n+#if !LINUX\n OSErr GetVolumeFeatures( SGlobPtr GPtr )\n {\n \tOSErr\t\t\t\t\terr;\n@@ -418,7 +419,7 @@\n \treturn( noErr );\n }\n #endif\n-\n+#endif\n \n \n /*-------------------------------------------------------------------------------\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SUtils.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SUtils.o differ\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SVerify1.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SVerify1.o differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SVerify2.c diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SVerify2.c\n--- diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SVerify2.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SVerify2.c\t2008-07-01 22:30:11.000000000 +0200\n@@ -32,7 +32,9 @@\n */\n \n #include <sys/ioctl.h>\n+#if !LINUX\n #include <sys/disk.h>\n+#endif\n \n #include \"BTree.h\"\n #include \"BTreePrivate.h\"\n@@ -1240,8 +1242,13 @@\n \t * clump size for read-only media is irrelevant we skip the clump size \n \t * check to avoid non useful warnings. \n \t */\n+#if LINUX\n+\t// FIXME\n+\tisWriteable = 1;\n+#else\n \tisWriteable = 0;\n \tioctl( GPtr->DrvNum, DKIOCISWRITABLE, &isWriteable );\n+#endif\n \tif ( isWriteable != 0 && \n \t\t volumeHeader->catalogFile.clumpSize != vcb->vcbCatalogFile->fcbClumpSize ) {\n \t\tPrintError(GPtr, E_InvalidClumpSize, 0);\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/SVerify2.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/SVerify2.o differ\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/dfalib/VolumeBitmapCheck.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/dfalib/VolumeBitmapCheck.o differ\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/fsck_hfs and diskdev_cmds-332.14-patched/fsck_hfs.tproj/fsck_hfs differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/fsck_hfs.c diskdev_cmds-332.14-patched/fsck_hfs.tproj/fsck_hfs.c\n--- diskdev_cmds-332.14/fsck_hfs.tproj/fsck_hfs.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/fsck_hfs.c\t2008-07-01 22:36:12.000000000 +0200\n@@ -24,10 +24,14 @@\n #include <sys/types.h>\n #include <sys/stat.h>\n #include <sys/param.h>\n+#if !LINUX\n #include <sys/ucred.h>\n+#endif\n #include <sys/mount.h>\n #include <sys/ioctl.h>\n+#if !LINUX\n #include <sys/disk.h>\n+#endif\n \n #include <hfs/hfs_mount.h>\n \n@@ -105,7 +109,7 @@\n \telse\n \t\tprogname = *argv;\n \n-\twhile ((ch = getopt(argc, argv, \"dfglm:npqruy\")) != EOF) {\n+\twhile ((ch = getopt(argc, argv, \"dfglm:napqruy\")) != EOF) {\n \t\tswitch (ch) {\n \t\tcase 'd':\n \t\t\tdebug++;\n@@ -141,6 +145,7 @@\n \t\t\tyflag = 0;\n \t\t\tbreak;\n \n+\t\tcase 'a':\n \t\tcase 'p':\n \t\t\tpreen++;\n \t\t\tbreak;\n@@ -170,10 +175,12 @@\n \t\n \tif (guiControl)\n \t\tdebug = 0; /* debugging is for command line only */\n-\n+#if LINUX\n+// FIXME\n+#else\n \tif (signal(SIGINT, SIG_IGN) != SIG_IGN)\n \t\t(void)signal(SIGINT, catch);\n-\n+#endif\n \tif (argc < 1) {\n \t\t(void) fprintf(stderr, \"%s: missing special-device\\n\", progname);\n \t\tusage();\n@@ -194,7 +201,9 @@\n \tint chkLev, repLev, logLev;\n \tint blockDevice_fd, canWrite;\n \tchar *unraw, *mntonname;\n+#if !LINUX\n \tstruct statfs *fsinfo;\n+#endif\n \tint fs_fd=-1;  // fd to the root-dir of the fs we're checking (only w/lfag == 1)\n \n \tflags = 0;\n@@ -203,7 +212,9 @@\n \tcanWrite = 0;\n \tunraw = NULL;\n \tmntonname = NULL;\n-\n+#if LINUX\n+\t// FIXME\n+#else\n \tif (lflag) {\n \t\tresult = getmntinfo(&fsinfo, MNT_NOWAIT);\n \n@@ -233,7 +244,7 @@\n \t\t    }\n \t\t}\n \t}\n-\n+#endif\n \tif (debug && preen)\n \t\tpwarn(\"starting\\n\");\n \t\n@@ -306,6 +317,9 @@\n \t\t\t}\n \t\t}\n \t} else {\n+#if LINUX\n+\t// FIXME\n+#else\n \t\tstruct statfs stfs_buf;\n \t\t/*\n \t\t * Check to see if root is mounted read-write.\n@@ -315,18 +329,24 @@\n \t\telse\n \t\t\tflags = 0;\n \t\tckfini(flags & MNT_RDONLY);\n+#endif\n \t}\n \n \t/* XXX free any allocated memory here */\n \n \tif (hotroot && fsmodified) {\n+#if !LINUX\n \t\tstruct hfs_mount_args args;\n+#endif\n \t\t/*\n \t\t * We modified the root.  Do a mount update on\n \t\t * it, unless it is read-write, so we can continue.\n \t\t */\n \t\tif (!preen)\n \t\t\tprintf(\"\\n***** FILE SYSTEM WAS MODIFIED *****\\n\");\n+#if LINUX\n+\t\t// FIXME\n+#else\n \t\tif (flags & MNT_RDONLY) {\t\t\n \t\t\tbzero(&args, sizeof(args));\n \t\t\tflags |= MNT_UPDATE | MNT_RELOAD;\n@@ -335,6 +355,7 @@\n \t\t\t\tgoto ExitThisRoutine;\n \t\t\t}\n \t\t}\n+#endif\n \t\tif (!preen)\n \t\t\tprintf(\"\\n***** REBOOT NOW *****\\n\");\n \t\tsync();\n@@ -380,11 +401,13 @@\n \t\tprintf(\"Can't stat %s: %s\\n\", dev, strerror(errno));\n \t\treturn (0);\n \t}\n+#if !LINUX\n \tif ((statb.st_mode & S_IFMT) != S_IFCHR) {\n \t\tpfatal(\"%s is not a character device\", dev);\n \t\tif (reply(\"CONTINUE\") == 0)\n \t\t\treturn (0);\n \t}\n+#endif\n \tif ((fsreadfd = open(dev, O_RDONLY)) < 0) {\n \t\tprintf(\"Can't open %s: %s\\n\", dev, strerror(errno));\n \t\treturn (0);\n@@ -407,10 +430,14 @@\n \t\tprintf(\"\\n\");\n \n \t/* Get device block size to initialize cache */\n+#if LINUX\n+\tdevBlockSize = 512;\n+#else\n \tif (ioctl(fsreadfd, DKIOCGETBLOCKSIZE, &devBlockSize) < 0) {\n \t\tpfatal (\"Can't get device block size\\n\");\n \t\treturn (0);\n \t}\n+#endif\n \t/* Initialize the cache */\n \tif (CacheInit (&fscache, fsreadfd, fswritefd, devBlockSize,\n \t\t\tCACHE_IOSIZE, CACHE_BLOCKS, CACHE_HASHSIZE) != EOK) {\n@@ -431,11 +458,15 @@\n \n static void getWriteAccess( char *dev, int *blockDevice_fdPtr, int *canWritePtr )\n {\n+#if !LINUX\n \tint\t\t\t\t\ti;\n \tint\t\t\t\t\tmyMountsCount;\n+#endif\n \tvoid *\t\t\t\tmyPtr;\n \tchar *\t\t\t\tmyCharPtr;\n+#if !LINUX\n \tstruct statfs *\t\tmyBufPtr;\n+#endif\n \tvoid *\t\t\t\tmyNamePtr;\n \n \tmyPtr = NULL;\n@@ -456,18 +487,19 @@\n \t\t*canWritePtr = 1;\n \t\tgoto ExitThisRoutine;\n \t}\n-\t\n \t// get count of mounts then get the info for each \n+#if LINUX\n+\t// FIXME\n+#else\n \tmyMountsCount = getfsstat( NULL, 0, MNT_NOWAIT );\n \tif ( myMountsCount < 0 )\n \t\tgoto ExitThisRoutine;\n-\n \tmyPtr = (void *) malloc( sizeof(struct statfs) * myMountsCount );\n \tif ( myPtr == NULL ) \n \t\tgoto ExitThisRoutine;\n \tmyMountsCount = getfsstat( \tmyPtr, \n-\t\t\t\t\t\t\t\t(sizeof(struct statfs) * myMountsCount), \n-\t\t\t\t\t\t\t\tMNT_NOWAIT );\n+\t\t\t\t\t\t\t(sizeof(struct statfs) * myMountsCount), \n+\t\t\t\t\t\t\tMNT_NOWAIT );\n \tif ( myMountsCount < 0 )\n \t\tgoto ExitThisRoutine;\n \n@@ -481,8 +513,8 @@\n \t\t}\n \t\tmyBufPtr++;\n \t}\n+#endif\n \t*canWritePtr = 1;  // single user will get us here, f_mntfromname is not /dev/diskXXXX \n-\t\n ExitThisRoutine:\n \tif ( myPtr != NULL )\n \t\tfree( myPtr );\n@@ -504,7 +536,7 @@\n \t(void) fprintf(stderr, \"  l = live fsck (lock down and test-only)\\n\");\n \t(void) fprintf(stderr, \"  m arg = octal mode used when creating lost+found directory \\n\");\n \t(void) fprintf(stderr, \"  n = assume a no response \\n\");\n-\t(void) fprintf(stderr, \"  p = just fix normal inconsistencies \\n\");\n+\t(void) fprintf(stderr, \"  p, a = just fix normal inconsistencies \\n\");\n \t(void) fprintf(stderr, \"  q = quick check returns clean, dirty, or failure \\n\");\n \t(void) fprintf(stderr, \"  r = rebuild catalog btree \\n\");\n \t(void) fprintf(stderr, \"  u = usage \\n\");\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/fsck_hfs.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/fsck_hfs.o differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/Makefile.lnx diskdev_cmds-332.14-patched/fsck_hfs.tproj/Makefile.lnx\n--- diskdev_cmds-332.14/fsck_hfs.tproj/Makefile.lnx\t1970-01-01 01:00:00.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/Makefile.lnx\t2008-07-01 22:30:11.000000000 +0200\n@@ -0,0 +1,15 @@\n+CFILES = fsck_hfs.c strings.c utilities.c cache.c\n+OFILES = $(CFILES:.c=.o)\n+\n+all: fsck_hfs\n+\n+fsck_hfs: $(OFILES) dfalib/libdfa.a\n+\n+dfalib/libdfa.a: FORCE\n+\t$(MAKE) -C dfalib -f Makefile.lnx libdfa.a\n+\n+clean:\n+\t$(RM) fsck_hfs $(OFILES)\n+\t$(MAKE) -C dfalib -f Makefile.lnx clean\n+\n+.PHONY : FORCE clean\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/strings.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/strings.o differ\ndiff -druN diskdev_cmds-332.14/fsck_hfs.tproj/utilities.c diskdev_cmds-332.14-patched/fsck_hfs.tproj/utilities.c\n--- diskdev_cmds-332.14/fsck_hfs.tproj/utilities.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/fsck_hfs.tproj/utilities.c\t2008-07-01 22:30:11.000000000 +0200\n@@ -183,12 +183,14 @@\n \t\t\tprintf(\"Can't stat %s\\n\", raw);\n \t\t\treturn (origname);\n \t\t}\n+#if !LINUX\n \t\tif ((stchar.st_mode & S_IFMT) == S_IFCHR) {\n \t\t\treturn (raw);\n \t\t} else {\n \t\t\tprintf(\"%s is not a character device\\n\", raw);\n \t\t\treturn (origname);\n \t\t}\n+#endif\n \t} else if ((stblock.st_mode & S_IFMT) == S_IFCHR && !retried) {\n \t\tnewname = unrawname(newname);\n \t\tretried++;\n@@ -214,7 +216,11 @@\n \t*dp = 0;\n \t(void)strcpy(rawbuf, name);\n \t*dp = '/';\n-\t(void)strcat(rawbuf, \"/r\");\n+#if LINUX\n+\t(void)strcat(rawbuf, \"/\");\n+#else\n+\t(void)strcat(rawbuf,\"/r\");\n+#endif\n \t(void)strcat(rawbuf, &dp[1]);\n \n \treturn (rawbuf);\nFiles diskdev_cmds-332.14/fsck_hfs.tproj/utilities.o and diskdev_cmds-332.14-patched/fsck_hfs.tproj/utilities.o differ\ndiff -druN diskdev_cmds-332.14/include/bitstring.h diskdev_cmds-332.14-patched/include/bitstring.h\n--- diskdev_cmds-332.14/include/bitstring.h\t1970-01-01 01:00:00.000000000 +0100\n+++ diskdev_cmds-332.14-patched/include/bitstring.h\t2008-07-01 22:30:11.000000000 +0200\n@@ -0,0 +1,164 @@\n+/*\n+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n+ *\n+ * @APPLE_LICENSE_HEADER_START@\n+ * \n+ * The contents of this file constitute Original Code as defined in and\n+ * are subject to the Apple Public Source License Version 1.1 (the\n+ * \"License\").  You may not use this file except in compliance with the\n+ * License.  Please obtain a copy of the License at\n+ * http://www.apple.com/publicsource and read it before using this file.\n+ * \n+ * This Original Code and all software distributed under the License are\n+ * distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the\n+ * License for the specific language governing rights and limitations\n+ * under the License.\n+ * \n+ * @APPLE_LICENSE_HEADER_END@\n+ */\n+/*\n+ * Copyright (c) 1989, 1993\n+ *\tThe Regents of the University of California.  All rights reserved.\n+ *\n+ * This code is derived from software contributed to Berkeley by\n+ * Paul Vixie.\n+ *\n+ * Redistribution and use in source and binary forms, with or without\n+ * modification, are permitted provided that the following conditions\n+ * are met:\n+ * 1. Redistributions of source code must retain the above copyright\n+ *    notice, this list of conditions and the following disclaimer.\n+ * 2. Redistributions in binary form must reproduce the above copyright\n+ *    notice, this list of conditions and the following disclaimer in the\n+ *    documentation and/or other materials provided with the distribution.\n+ * 3. All advertising materials mentioning features or use of this software\n+ *    must display the following acknowledgement:\n+ *\tThis product includes software developed by the University of\n+ *\tCalifornia, Berkeley and its contributors.\n+ * 4. Neither the name of the University nor the names of its contributors\n+ *    may be used to endorse or promote products derived from this software\n+ *    without specific prior written permission.\n+ *\n+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ * SUCH DAMAGE.\n+ *\n+ *\t@(#)bitstring.h\t8.1 (Berkeley) 7/19/93\n+ */\n+\n+#ifndef _BITSTRING_H_\n+#define\t_BITSTRING_H_\n+\n+typedef\tunsigned char bitstr_t;\n+\n+/* internal macros */\n+\t\t\t\t/* byte of the bitstring bit is in */\n+#define\t_bit_byte(bit) \\\n+\t((bit) >> 3)\n+\n+\t\t\t\t/* mask for the bit within its byte */\n+#define\t_bit_mask(bit) \\\n+\t(1 << ((bit)&0x7))\n+\n+/* external macros */\n+\t\t\t\t/* bytes in a bitstring of nbits bits */\n+#define\tbitstr_size(nbits) \\\n+\t((((nbits) - 1) >> 3) + 1)\n+\n+\t\t\t\t/* allocate a bitstring */\n+#define\tbit_alloc(nbits) \\\n+\t(bitstr_t *)calloc(1, \\\n+\t    (unsigned int)bitstr_size(nbits) * sizeof(bitstr_t))\n+\n+\t\t\t\t/* allocate a bitstring on the stack */\n+#define\tbit_decl(name, nbits) \\\n+\t(name)[bitstr_size(nbits)]\n+\n+\t\t\t\t/* is bit N of bitstring name set? */\n+#define\tbit_test(name, bit) \\\n+\t((name)[_bit_byte(bit)] & _bit_mask(bit))\n+\n+\t\t\t\t/* set bit N of bitstring name */\n+#define\tbit_set(name, bit) \\\n+\t(name)[_bit_byte(bit)] |= _bit_mask(bit)\n+\n+\t\t\t\t/* clear bit N of bitstring name */\n+#define\tbit_clear(name, bit) \\\n+\t(name)[_bit_byte(bit)] &= ~_bit_mask(bit)\n+\n+\t\t\t\t/* clear bits start ... stop in bitstring */\n+#define\tbit_nclear(name, start, stop) { \\\n+\tregister bitstr_t *_name = name; \\\n+\tregister int _start = start, _stop = stop; \\\n+\tregister int _startbyte = _bit_byte(_start); \\\n+\tregister int _stopbyte = _bit_byte(_stop); \\\n+\tif (_startbyte == _stopbyte) { \\\n+\t\t_name[_startbyte] &= ((0xff >> (8 - (_start&0x7))) | \\\n+\t\t\t\t      (0xff << ((_stop&0x7) + 1))); \\\n+\t} else { \\\n+\t\t_name[_startbyte] &= 0xff >> (8 - (_start&0x7)); \\\n+\t\twhile (++_startbyte < _stopbyte) \\\n+\t\t\t_name[_startbyte] = 0; \\\n+\t\t_name[_stopbyte] &= 0xff << ((_stop&0x7) + 1); \\\n+\t} \\\n+}\n+\n+\t\t\t\t/* set bits start ... stop in bitstring */\n+#define\tbit_nset(name, start, stop) { \\\n+\tregister bitstr_t *_name = name; \\\n+\tregister int _start = start, _stop = stop; \\\n+\tregister int _startbyte = _bit_byte(_start); \\\n+\tregister int _stopbyte = _bit_byte(_stop); \\\n+\tif (_startbyte == _stopbyte) { \\\n+\t\t_name[_startbyte] |= ((0xff << (_start&0x7)) & \\\n+\t\t\t\t    (0xff >> (7 - (_stop&0x7)))); \\\n+\t} else { \\\n+\t\t_name[_startbyte] |= 0xff << ((_start)&0x7); \\\n+\t\twhile (++_startbyte < _stopbyte) \\\n+\t    \t\t_name[_startbyte] = 0xff; \\\n+\t\t_name[_stopbyte] |= 0xff >> (7 - (_stop&0x7)); \\\n+\t} \\\n+}\n+\n+\t\t\t\t/* find first bit clear in name */\n+#define\tbit_ffc(name, nbits, value) { \\\n+\tregister bitstr_t *_name = name; \\\n+\tregister int _byte, _nbits = nbits; \\\n+\tregister int _stopbyte = _bit_byte(_nbits), _value = -1; \\\n+\tfor (_byte = 0; _byte <= _stopbyte; ++_byte) \\\n+\t\tif (_name[_byte] != 0xff) { \\\n+\t\t\t_value = _byte << 3; \\\n+\t\t\tfor (_stopbyte = _name[_byte]; (_stopbyte&0x1); \\\n+\t\t\t    ++_value, _stopbyte >>= 1); \\\n+\t\t\tbreak; \\\n+\t\t} \\\n+\t*(value) = _value; \\\n+}\n+\n+\t\t\t\t/* find first bit set in name */\n+#define\tbit_ffs(name, nbits, value) { \\\n+\tregister bitstr_t *_name = name; \\\n+\tregister int _byte, _nbits = nbits; \\\n+\tregister int _stopbyte = _bit_byte(_nbits), _value = -1; \\\n+\tfor (_byte = 0; _byte <= _stopbyte; ++_byte) \\\n+\t\tif (_name[_byte]) { \\\n+\t\t\t_value = _byte << 3; \\\n+\t\t\tfor (_stopbyte = _name[_byte]; !(_stopbyte&0x1); \\\n+\t\t\t    ++_value, _stopbyte >>= 1); \\\n+\t\t\tbreak; \\\n+\t\t} \\\n+\t*(value) = _value; \\\n+}\n+\n+#endif /* !_BITSTRING_H_ */\ndiff -druN diskdev_cmds-332.14/include/hfs/hfs_format.h diskdev_cmds-332.14-patched/include/hfs/hfs_format.h\n--- diskdev_cmds-332.14/include/hfs/hfs_format.h\t1970-01-01 01:00:00.000000000 +0100\n+++ diskdev_cmds-332.14-patched/include/hfs/hfs_format.h\t2008-07-01 22:30:11.000000000 +0200\n@@ -0,0 +1,689 @@\n+/*\n+ * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.\n+ *\n+ * @APPLE_LICENSE_HEADER_START@\n+ * \n+ * The contents of this file constitute Original Code as defined in and\n+ * are subject to the Apple Public Source License Version 1.1 (the\n+ * \"License\").  You may not use this file except in compliance with the\n+ * License.  Please obtain a copy of the License at\n+ * http://www.apple.com/publicsource and read it before using this file.\n+ * \n+ * This Original Code and all software distributed under the License are\n+ * distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the\n+ * License for the specific language governing rights and limitations\n+ * under the License.\n+ * \n+ * @APPLE_LICENSE_HEADER_END@\n+ */\n+#ifndef __HFS_FORMAT__\n+#define __HFS_FORMAT__\n+\n+#include \"missing.h\"\n+\n+#include <sys/appleapiopts.h>\n+\n+/*\n+ * hfs_format.c\n+ *\n+ * This file describes the on-disk format for HFS and HFS Plus volumes.\n+ * The HFS Plus volume format is desciibed in detail in Apple Technote 1150.\n+ *\n+ * http://developer.apple.com/technotes/tn/tn1150.html\n+ *\n+ */\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/* some on-disk hfs structures have 68K alignment (misaligned) */\n+\n+#define PACKED_S\t__attribute__((packed))\n+\t\n+/* Signatures used to differentiate between HFS and HFS Plus volumes */\n+enum {\n+\tkHFSSigWord\t\t= 0x4244,\t/* 'BD' in ASCII */\n+\tkHFSPlusSigWord\t\t= 0x482B,\t/* 'H+' in ASCII */\n+\tkHFSXSigWord\t\t= 0x4858,\t/* 'HX' in ASCII */\n+\n+\tkHFSPlusVersion\t\t= 0x0004,\t/* 'H+' volumes are version 4 only */\n+\tkHFSXVersion\t\t= 0x0005,\t/* 'HX' volumes start with version 5 */\n+\n+\tkHFSPlusMountVersion\t= 0x31302E30,\t/* '10.0' for Mac OS X */\n+\tkHFSJMountVersion\t= 0x4846534a,\t/* 'HFSJ' for journaled HFS+ on OS X */\n+\tkFSKMountVersion\t= 0x46534b21\t/* 'FSK!' for failed journal replay */\n+}PACKED_S;\n+\n+\n+#ifdef __APPLE_API_PRIVATE\n+/*\n+ * Mac OS X has a special directory for linked and unlinked files (HFS Plus only).\n+ * This directory and its contents are never exported from the filesystem under\n+ * Mac OS X.\n+ *\n+ * To make this folder name sort last,  it has embedded null prefix.\n+ * (0xC0, 0x80 in UTF-8)\n+ */\n+#define HFSPLUSMETADATAFOLDER  \"\\xC0\\x80\\xC0\\x80\\xC0\\x80\\xC0\\x80HFS+ Private Data\"\n+\n+/*\n+ * Files in the HFS Private Data folder have one of the following prefixes\n+ * followed by a decimal number (no leading zeros).  For indirect nodes this\n+ * number is a 32 bit random number.  For unlinked (deleted) files that are\n+ * still open, the number is the file ID for that file.\n+ *\n+ * e.g.  iNode7182000 and temp3296\n+ */\n+#define HFS_INODE_PREFIX\t\"iNode\"\n+#define HFS_DELETE_PREFIX\t\"temp\"\n+\n+#endif /* __APPLE_API_PRIVATE */\n+\n+/*\n+ * Indirect link files (hard links) have the following type/creator.\n+ */\n+enum {\n+\tkHardLinkFileType = 0x686C6E6B,  /* 'hlnk' */\n+\tkHFSPlusCreator   = 0x6866732B   /* 'hfs+' */\n+}PACKED_S;\n+\n+\n+#ifndef _HFSUNISTR255_DEFINED_\n+#define _HFSUNISTR255_DEFINED_\n+/* Unicode strings are used for HFS Plus file and folder names */\n+struct HFSUniStr255 {\n+\tu_int16_t\tlength;\t\t/* number of unicode characters */\n+\tu_int16_t\tunicode[255];\t/* unicode characters */\n+} PACKED_S;\n+typedef struct HFSUniStr255 HFSUniStr255;\n+typedef const HFSUniStr255 *ConstHFSUniStr255Param;\n+#endif /* _HFSUNISTR255_DEFINED_ */\n+\n+enum {\n+\tkHFSMaxVolumeNameChars\t\t= 27,\n+\tkHFSMaxFileNameChars\t\t= 31,\n+\tkHFSPlusMaxFileNameChars\t= 255\n+}PACKED_S;\n+\n+\n+/* Extent overflow file data structures */\n+\n+/* HFS Extent key */\n+struct HFSExtentKey {\n+\tu_int8_t \tkeyLength;\t/* length of key, excluding this field */\n+\tu_int8_t \tforkType;\t/* 0 = data fork, FF = resource fork */\n+\tu_int32_t \tfileID;\t\t/* file ID */\n+\tu_int16_t \tstartBlock;\t/* first file allocation block number in this extent */\n+}PACKED_S;\n+typedef struct HFSExtentKey HFSExtentKey;\n+\n+/* HFS Plus Extent key */\n+struct HFSPlusExtentKey {\n+\tu_int16_t \tkeyLength;\t\t/* length of key, excluding this field */\n+\tu_int8_t \tforkType;\t\t/* 0 = data fork, FF = resource fork */\n+\tu_int8_t \tpad;\t\t\t/* make the other fields align on 32-bit boundary */\n+\tu_int32_t \tfileID;\t\t\t/* file ID */\n+\tu_int32_t \tstartBlock;\t\t/* first file allocation block number in this extent */\n+}PACKED_S;\n+typedef struct HFSPlusExtentKey HFSPlusExtentKey;\n+\n+/* Number of extent descriptors per extent record */\n+enum {\n+\tkHFSExtentDensity\t= 3,\n+\tkHFSPlusExtentDensity\t= 8\n+}PACKED_S;\n+\n+/* HFS extent descriptor */\n+struct HFSExtentDescriptor {\n+\tu_int16_t \tstartBlock;\t\t/* first allocation block */\n+\tu_int16_t \tblockCount;\t\t/* number of allocation blocks */\n+}PACKED_S;\n+typedef struct HFSExtentDescriptor HFSExtentDescriptor;\n+\n+/* HFS Plus extent descriptor */\n+struct HFSPlusExtentDescriptor {\n+\tu_int32_t \tstartBlock;\t\t/* first allocation block */\n+\tu_int32_t \tblockCount;\t\t/* number of allocation blocks */\n+}PACKED_S;\n+typedef struct HFSPlusExtentDescriptor HFSPlusExtentDescriptor;\n+\n+/* HFS extent record */\n+typedef HFSExtentDescriptor HFSExtentRecord[3];\n+\n+/* HFS Plus extent record */\n+typedef HFSPlusExtentDescriptor HFSPlusExtentRecord[8];\n+\n+\n+/* Finder information */\n+struct FndrFileInfo {\n+\tu_int32_t \tfdType;\t\t/* file type */\n+\tu_int32_t \tfdCreator;\t/* file creator */\n+\tu_int16_t \tfdFlags;\t/* Finder flags */\n+\tstruct {\n+\t    int16_t\tv;\t\t/* file's location */\n+\t    int16_t\th;\n+\t} PACKED_S fdLocation;\n+\tint16_t \topaque;\n+}PACKED_S;\n+typedef struct FndrFileInfo FndrFileInfo;\n+\n+struct FndrDirInfo {\n+\tstruct {\t\t\t/* folder's window rectangle */\n+\t    int16_t\ttop;\n+\t    int16_t\tleft;\n+\t    int16_t\tbottom;\n+\t    int16_t\tright;\n+\t}PACKED_S frRect;\n+\tunsigned short \tfrFlags;\t/* Finder flags */\n+\tstruct {\n+\t    u_int16_t\tv;\t\t/* folder's location */\n+\t    u_int16_t\th;\n+\t}PACKED_S frLocation;\n+\tint16_t \topaque;\n+}PACKED_S;\n+typedef struct FndrDirInfo FndrDirInfo;\n+\n+struct FndrOpaqueInfo {\n+\tint8_t opaque[16];\n+}PACKED_S;\n+typedef struct FndrOpaqueInfo FndrOpaqueInfo;\n+\n+\n+/* HFS Plus Fork data info - 80 bytes */\n+struct HFSPlusForkData {\n+\tu_int64_t \t\tlogicalSize;\t/* fork's logical size in bytes */\n+\tu_int32_t \t\tclumpSize;\t/* fork's clump size in bytes */\n+\tu_int32_t \t\ttotalBlocks;\t/* total blocks used by this fork */\n+\tHFSPlusExtentRecord \textents;\t/* initial set of extents */\n+}PACKED_S;\n+typedef struct HFSPlusForkData HFSPlusForkData;\n+\n+\n+/* Mac OS X has 16 bytes worth of \"BSD\" info.\n+ *\n+ * Note:  Mac OS 9 implementations and applications\n+ * should preserve, but not change, this information.\n+ */\n+struct HFSPlusBSDInfo {\n+\tu_int32_t \townerID;\t/* user or group ID of file/folder owner */\n+\tu_int32_t \tgroupID;\t/* additional user of group ID */\n+\tu_int8_t \tadminFlags;\t/* super-user changeable flags */\n+\tu_int8_t \townerFlags;\t/* owner changeable flags */\n+\tu_int16_t \tfileMode;\t/* file type and permission bits */\n+\tunion {\n+\t    u_int32_t\tiNodeNum;\t/* indirect node number (hard links only) */\n+\t    u_int32_t\tlinkCount;\t/* links that refer to this indirect node */\n+\t    u_int32_t\trawDevice;\t/* special file device (FBLK and FCHR only) */\n+\t}PACKED_S special;\n+}PACKED_S;\n+typedef struct HFSPlusBSDInfo HFSPlusBSDInfo;\n+\n+\n+/* Catalog file data structures */\n+\n+enum {\n+\tkHFSRootParentID\t\t= 1,\t/* Parent ID of the root folder */\n+\tkHFSRootFolderID\t\t= 2,\t/* Folder ID of the root folder */\n+\tkHFSExtentsFileID\t\t= 3,\t/* File ID of the extents file */\n+\tkHFSCatalogFileID\t\t= 4,\t/* File ID of the catalog file */\n+\tkHFSBadBlockFileID\t\t= 5,\t/* File ID of the bad allocation block file */\n+\tkHFSAllocationFileID\t\t= 6,\t/* File ID of the allocation file (HFS Plus only) */\n+\tkHFSStartupFileID\t\t= 7,\t/* File ID of the startup file (HFS Plus only) */\n+\tkHFSAttributesFileID\t\t= 8,\t/* File ID of the attribute file (HFS Plus only) */\n+\tkHFSRepairCatalogFileID\t\t= 14,\t/* Used when rebuilding Catalog B-tree */\n+\tkHFSBogusExtentFileID\t\t= 15,\t/* Used for exchanging extents in extents file */\n+\tkHFSFirstUserCatalogNodeID\t= 16\n+}PACKED_S;\n+\n+/* HFS catalog key */\n+struct HFSCatalogKey {\n+\tu_int8_t \tkeyLength;\t\t/* key length (in bytes) */\n+\tu_int8_t \treserved;\t\t/* reserved (set to zero) */\n+\tu_int32_t \tparentID;\t\t/* parent folder ID */\n+\tu_int8_t \tnodeName[kHFSMaxFileNameChars + 1]; /* catalog node name */\n+}PACKED_S;\n+typedef struct HFSCatalogKey HFSCatalogKey;\n+\n+/* HFS Plus catalog key */\n+struct HFSPlusCatalogKey {\n+\tu_int16_t \t\tkeyLength;\t/* key length (in bytes) */\n+\tu_int32_t \t\tparentID;\t/* parent folder ID */\n+\tHFSUniStr255 \t\tnodeName;\t/* catalog node name */\n+}PACKED_S;\n+typedef struct HFSPlusCatalogKey HFSPlusCatalogKey;\n+\n+/* Catalog record types */\n+enum {\n+\t/* HFS Catalog Records */\n+\tkHFSFolderRecord\t\t= 0x0100,\t/* Folder record */\n+\tkHFSFileRecord\t\t\t= 0x0200,\t/* File record */\n+\tkHFSFolderThreadRecord\t\t= 0x0300,\t/* Folder thread record */\n+\tkHFSFileThreadRecord\t\t= 0x0400,\t/* File thread record */\n+\n+\t/* HFS Plus Catalog Records */\n+\tkHFSPlusFolderRecord\t\t= 1,\t\t/* Folder record */\n+\tkHFSPlusFileRecord\t\t= 2,\t\t/* File record */\n+\tkHFSPlusFolderThreadRecord\t= 3,\t\t/* Folder thread record */\n+\tkHFSPlusFileThreadRecord\t= 4\t\t/* File thread record */\n+}PACKED_S;\n+\n+\n+/* Catalog file record flags */\n+enum {\n+\tkHFSFileLockedBit\t= 0x0000,\t/* file is locked and cannot be written to */\n+\tkHFSFileLockedMask\t= 0x0001,\n+\n+\tkHFSThreadExistsBit\t= 0x0001,\t/* a file thread record exists for this file */\n+\tkHFSThreadExistsMask\t= 0x0002,\n+\n+\tkHFSHasAttributesBit\t= 0x0002,\t/* object has extended attributes */\n+\tkHFSHasAttributesMask\t= 0x0004,\n+\n+\tkHFSHasSecurityBit\t= 0x0003,\t/* object has security data (ACLs) */\n+\tkHFSHasSecurityMask\t= 0x0008\n+}PACKED_S;\n+\n+\n+/* HFS catalog folder record - 70 bytes */\n+struct HFSCatalogFolder {\n+\tint16_t \t\trecordType;\t\t/* == kHFSFolderRecord */\n+\tu_int16_t \t\tflags;\t\t\t/* folder flags */\n+\tu_int16_t \t\tvalence;\t\t/* folder valence */\n+\tu_int32_t\t\tfolderID;\t\t/* folder ID */\n+\tu_int32_t \t\tcreateDate;\t\t/* date and time of creation */\n+\tu_int32_t \t\tmodifyDate;\t\t/* date and time of last modification */\n+\tu_int32_t \t\tbackupDate;\t\t/* date and time of last backup */\n+\tFndrDirInfo \t\tuserInfo;\t\t/* Finder information */\n+\tFndrOpaqueInfo\t\tfinderInfo;\t\t/* additional Finder information */\n+\tu_int32_t \t\treserved[4];\t\t/* reserved - initialized as zero */\n+}PACKED_S;\n+typedef struct HFSCatalogFolder HFSCatalogFolder;\n+\n+/* HFS Plus catalog folder record - 88 bytes */\n+struct HFSPlusCatalogFolder {\n+\tint16_t \t\trecordType;\t\t/* == kHFSPlusFolderRecord */\n+\tu_int16_t \t\tflags;\t\t\t/* file flags */\n+\tu_int32_t \t\tvalence;\t\t/* folder's valence (limited to 2^16 in Mac OS) */\n+\tu_int32_t \t\tfolderID;\t\t/* folder ID */\n+\tu_int32_t \t\tcreateDate;\t\t/* date and time of creation */\n+\tu_int32_t \t\tcontentModDate;\t\t/* date and time of last content modification */\n+\tu_int32_t \t\tattributeModDate;\t/* date and time of last attribute modification */\n+\tu_int32_t \t\taccessDate;\t\t/* date and time of last access (MacOS X only) */\n+\tu_int32_t \t\tbackupDate;\t\t/* date and time of last backup */\n+\tHFSPlusBSDInfo\t\tbsdInfo;\t\t/* permissions (for MacOS X) */\n+\tFndrDirInfo \t\tuserInfo;\t\t/* Finder information */\n+\tFndrOpaqueInfo\t \tfinderInfo;\t\t/* additional Finder information */\n+\tu_int32_t \t\ttextEncoding;\t\t/* hint for name conversions */\n+\tu_int32_t \t\tattrBlocks;\t\t/* cached count of attribute data blocks */\n+}PACKED_S;\n+typedef struct HFSPlusCatalogFolder HFSPlusCatalogFolder;\n+\n+/* HFS catalog file record - 102 bytes */\n+struct HFSCatalogFile {\n+\tint16_t \t\trecordType;\t\t/* == kHFSFileRecord */\n+\tu_int8_t \t\tflags;\t\t\t/* file flags */\n+\tint8_t \t\t\tfileType;\t\t/* file type (unused ?) */\n+\tFndrFileInfo \t\tuserInfo;\t\t/* Finder information */\n+\tu_int32_t \t\tfileID;\t\t\t/* file ID */\n+\tu_int16_t \t\tdataStartBlock;\t\t/* not used - set to zero */\n+\tint32_t \t\tdataLogicalSize;\t/* logical EOF of data fork */\n+\tint32_t \t\tdataPhysicalSize;\t/* physical EOF of data fork */\n+\tu_int16_t\t\trsrcStartBlock;\t\t/* not used - set to zero */\n+\tint32_t\t\t\trsrcLogicalSize;\t/* logical EOF of resource fork */\n+\tint32_t\t\t\trsrcPhysicalSize;\t/* physical EOF of resource fork */\n+\tu_int32_t\t\tcreateDate;\t\t/* date and time of creation */\n+\tu_int32_t\t\tmodifyDate;\t\t/* date and time of last modification */\n+\tu_int32_t\t\tbackupDate;\t\t/* date and time of last backup */\n+\tFndrOpaqueInfo\t\tfinderInfo;\t\t/* additional Finder information */\n+\tu_int16_t\t\tclumpSize;\t\t/* file clump size (not used) */\n+\tHFSExtentRecord\t\tdataExtents;\t\t/* first data fork extent record */\n+\tHFSExtentRecord\t\trsrcExtents;\t\t/* first resource fork extent record */\n+\tu_int32_t\t\treserved;\t\t/* reserved - initialized as zero */\n+}PACKED_S;\n+typedef struct HFSCatalogFile HFSCatalogFile;\n+\n+/* HFS Plus catalog file record - 248 bytes */\n+struct HFSPlusCatalogFile {\n+\tint16_t \t\trecordType;\t\t/* == kHFSPlusFileRecord */\n+\tu_int16_t \t\tflags;\t\t\t/* file flags */\n+\tu_int32_t \t\treserved1;\t\t/* reserved - initialized as zero */\n+\tu_int32_t \t\tfileID;\t\t\t/* file ID */\n+\tu_int32_t \t\tcreateDate;\t\t/* date and time of creation */\n+\tu_int32_t \t\tcontentModDate;\t\t/* date and time of last content modification */\n+\tu_int32_t \t\tattributeModDate;\t/* date and time of last attribute modification */\n+\tu_int32_t \t\taccessDate;\t\t/* date and time of last access (MacOS X only) */\n+\tu_int32_t \t\tbackupDate;\t\t/* date and time of last backup */\n+\tHFSPlusBSDInfo \t\tbsdInfo;\t\t/* permissions (for MacOS X) */\n+\tFndrFileInfo \t\tuserInfo;\t\t/* Finder information */\n+\tFndrOpaqueInfo\t \tfinderInfo;\t\t/* additional Finder information */\n+\tu_int32_t \t\ttextEncoding;\t\t/* hint for name conversions */\n+\tu_int32_t \t\tattrBlocks;\t\t/* cached count of attribute data blocks */\n+\n+\t/* Note: these start on double long (64 bit) boundry */\n+\tHFSPlusForkData \tdataFork;\t\t/* size and block data for data fork */\n+\tHFSPlusForkData \tresourceFork;\t\t/* size and block data for resource fork */\n+}PACKED_S;\n+typedef struct HFSPlusCatalogFile HFSPlusCatalogFile;\n+\n+/* HFS catalog thread record - 46 bytes */\n+struct HFSCatalogThread {\n+\tint16_t \trecordType;\t\t/* == kHFSFolderThreadRecord or kHFSFileThreadRecord */\n+\tint32_t \treserved[2];\t\t/* reserved - initialized as zero */\n+\tu_int32_t \tparentID;\t\t/* parent ID for this catalog node */\n+\tu_int8_t \tnodeName[kHFSMaxFileNameChars + 1]; /* name of this catalog node */\n+}PACKED_S;\n+typedef struct HFSCatalogThread HFSCatalogThread;\n+\n+/* HFS Plus catalog thread record -- 264 bytes */\n+struct HFSPlusCatalogThread {\n+\tint16_t \trecordType;\t\t/* == kHFSPlusFolderThreadRecord or kHFSPlusFileThreadRecord */\n+\tint16_t \treserved;\t\t/* reserved - initialized as zero */\n+\tu_int32_t \tparentID;\t\t/* parent ID for this catalog node */\n+\tHFSUniStr255 \tnodeName;\t\t/* name of this catalog node (variable length) */\n+}PACKED_S;\n+typedef struct HFSPlusCatalogThread HFSPlusCatalogThread;\n+\n+#ifdef __APPLE_API_UNSTABLE\n+/*\n+  \tThese are the types of records in the attribute B-tree.  The values were\n+  \tchosen so that they wouldn't conflict with the catalog record types.\n+*/\n+enum {\n+\tkHFSPlusAttrInlineData\t= 0x10,    /* if size <  kAttrOverflowSize */\n+\tkHFSPlusAttrForkData\t= 0x20,    /* if size >= kAttrOverflowSize */\n+\tkHFSPlusAttrExtents\t= 0x30     /* overflow extents for large attributes */\n+}PACKED_S;\n+\n+\n+/*\n+  \tHFSPlusAttrForkData\n+  \tFor larger attributes, whose value is stored in allocation blocks.\n+  \tIf the attribute has more than 8 extents, there will be additonal\n+  \trecords (of type HFSPlusAttrExtents) for this attribute.\n+*/\n+struct HFSPlusAttrForkData {\n+\tu_int32_t \trecordType;\t\t/* == kHFSPlusAttrForkData*/\n+\tu_int32_t \treserved;\n+\tHFSPlusForkData theFork;\t\t/* size and first extents of value*/\n+}PACKED_S;\n+typedef struct HFSPlusAttrForkData HFSPlusAttrForkData;\n+\n+/*\n+  \tHFSPlusAttrExtents\n+  \tThis record contains information about overflow extents for large,\n+  \tfragmented attributes.\n+*/\n+struct HFSPlusAttrExtents {\n+\tu_int32_t \t\trecordType;\t/* == kHFSPlusAttrExtents*/\n+\tu_int32_t \t\treserved;\n+\tHFSPlusExtentRecord\textents;\t/* additional extents*/\n+}PACKED_S;\n+typedef struct HFSPlusAttrExtents HFSPlusAttrExtents;\n+\n+/*\n+ * Atrributes B-tree Data Record\n+ *\n+ * For small attributes, whose entire value is stored\n+ * within a single B-tree record.\n+ */\n+struct HFSPlusAttrData {\n+\tu_int32_t    recordType;   /* == kHFSPlusAttrInlineData */\n+\tu_int32_t    reserved[2];\n+\tu_int32_t    attrSize;     /* size of attribute data in bytes */\n+\tu_int8_t     attrData[2];  /* variable length */\n+}PACKED_S;\n+typedef struct HFSPlusAttrData HFSPlusAttrData;\n+\n+\n+/* HFSPlusAttrInlineData is obsolete use HFSPlusAttrData instead */\n+struct HFSPlusAttrInlineData {\n+\tu_int32_t \trecordType;\n+\tu_int32_t \treserved;\n+\tu_int32_t \tlogicalSize;\n+\tu_int8_t \tuserData[2];\n+}PACKED_S;\n+typedef struct HFSPlusAttrInlineData HFSPlusAttrInlineData;\n+\n+\n+/*\tA generic Attribute Record*/\n+union HFSPlusAttrRecord {\n+\tu_int32_t \t\trecordType;\n+\tHFSPlusAttrInlineData \tinlineData;   /* NOT USED */\n+\tHFSPlusAttrData \tattrData;\n+\tHFSPlusAttrForkData \tforkData;\n+\tHFSPlusAttrExtents \toverflowExtents;\n+}PACKED_S;\n+typedef union HFSPlusAttrRecord HFSPlusAttrRecord;\n+\n+/* Attribute key */\n+enum { kHFSMaxAttrNameLen = 127 };\n+struct HFSPlusAttrKey {\n+\tu_int16_t     keyLength;       /* key length (in bytes) */\n+\tu_int16_t     pad;\t       /* set to zero */\n+\tu_int32_t     fileID;          /* file associated with attribute */\n+\tu_int32_t     startBlock;      /* first attribue allocation block number for extents */\n+\tu_int16_t     attrNameLen;     /* number of unicode characters */\n+\tu_int16_t     attrName[127];   /* attribute name (Unicode) */\n+}PACKED_S;\n+typedef struct HFSPlusAttrKey HFSPlusAttrKey;\n+\n+#define kHFSPlusAttrKeyMaximumLength   (sizeof(HFSPlusAttrKey) - sizeof(u_int16_t))\n+#define kHFSPlusAttrKeyMinimumLength   (kHFSPlusAttrKeyMaximumLength - (127 * sizeof(u_int16_t)))\n+\n+#endif /* __APPLE_API_UNSTABLE */\n+\n+\n+/* Key and node lengths */\n+enum {\n+\tkHFSPlusExtentKeyMaximumLength = sizeof(HFSPlusExtentKey) - sizeof(u_int16_t),\n+\tkHFSExtentKeyMaximumLength\t= sizeof(HFSExtentKey) - sizeof(u_int8_t),\n+\tkHFSPlusCatalogKeyMaximumLength = sizeof(HFSPlusCatalogKey) - sizeof(u_int16_t),\n+\tkHFSPlusCatalogKeyMinimumLength = kHFSPlusCatalogKeyMaximumLength - sizeof(HFSUniStr255) + sizeof(u_int16_t),\n+\tkHFSCatalogKeyMaximumLength\t= sizeof(HFSCatalogKey) - sizeof(u_int8_t),\n+\tkHFSCatalogKeyMinimumLength\t= kHFSCatalogKeyMaximumLength - (kHFSMaxFileNameChars + 1) + sizeof(u_int8_t),\n+\tkHFSPlusCatalogMinNodeSize\t= 4096,\n+\tkHFSPlusExtentMinNodeSize\t= 512,\n+\tkHFSPlusAttrMinNodeSize\t\t= 4096\n+}PACKED_S;\n+\n+/* HFS and HFS Plus volume attribute bits */\n+enum {\n+\t\t\t\t\t\t\t/* Bits 0-6 are reserved (always cleared by MountVol call) */\n+\tkHFSVolumeHardwareLockBit\t= 7,\t\t/* volume is locked by hardware */\n+\tkHFSVolumeUnmountedBit\t\t= 8,\t\t/* volume was successfully unmounted */\n+\tkHFSVolumeSparedBlocksBit\t= 9,\t\t/* volume has bad blocks spared */\n+\tkHFSVolumeNoCacheRequiredBit = 10,\t\t/* don't cache volume blocks (i.e. RAM or ROM disk) */\n+\tkHFSBootVolumeInconsistentBit = 11,\t\t/* boot volume is inconsistent (System 7.6 and later) */\n+\tkHFSCatalogNodeIDsReusedBit = 12,\n+\tkHFSVolumeJournaledBit = 13,\t\t\t/* this volume has a journal on it */\n+\tkHFSVolumeInconsistentBit = 14,\t\t\t/* serious inconsistencies detected at runtime */\n+\tkHFSVolumeSoftwareLockBit\t= 15,\t\t/* volume is locked by software */\n+\n+\tkHFSVolumeHardwareLockMask\t= 1 << kHFSVolumeHardwareLockBit,\n+\tkHFSVolumeUnmountedMask\t\t= 1 << kHFSVolumeUnmountedBit,\n+\tkHFSVolumeSparedBlocksMask\t= 1 << kHFSVolumeSparedBlocksBit,\n+\tkHFSVolumeNoCacheRequiredMask = 1 << kHFSVolumeNoCacheRequiredBit,\n+\tkHFSBootVolumeInconsistentMask = 1 << kHFSBootVolumeInconsistentBit,\n+\tkHFSCatalogNodeIDsReusedMask = 1 << kHFSCatalogNodeIDsReusedBit,\n+\tkHFSVolumeJournaledMask\t= 1 << kHFSVolumeJournaledBit,\n+\tkHFSVolumeInconsistentMask = 1 << kHFSVolumeInconsistentBit,\n+\tkHFSVolumeSoftwareLockMask\t= 1 << kHFSVolumeSoftwareLockBit,\n+\tkHFSMDBAttributesMask\t\t= 0x8380\n+}PACKED_S;\n+\n+\n+/* HFS Master Directory Block - 162 bytes */\n+/* Stored at sector #2 (3rd sector) and second-to-last sector. */\n+struct HFSMasterDirectoryBlock {\n+\tu_int16_t \t\tdrSigWord;\t/* == kHFSSigWord */\n+\tu_int32_t \t\tdrCrDate;\t/* date and time of volume creation */\n+\tu_int32_t \t\tdrLsMod;\t/* date and time of last modification */\n+\tu_int16_t \t\tdrAtrb;\t\t/* volume attributes */\n+\tu_int16_t \t\tdrNmFls;\t/* number of files in root folder */\n+\tu_int16_t \t\tdrVBMSt;\t/* first block of volume bitmap */\n+\tu_int16_t \t\tdrAllocPtr;\t/* start of next allocation search */\n+\tu_int16_t \t\tdrNmAlBlks;\t/* number of allocation blocks in volume */\n+\tu_int32_t \t\tdrAlBlkSiz;\t/* size (in bytes) of allocation blocks */\n+\tu_int32_t \t\tdrClpSiz;\t/* default clump size */\n+\tu_int16_t \t\tdrAlBlSt;\t/* first allocation block in volume */\n+\tu_int32_t \t\tdrNxtCNID;\t/* next unused catalog node ID */\n+\tu_int16_t \t\tdrFreeBks;\t/* number of unused allocation blocks */\n+\tu_int8_t \t\tdrVN[kHFSMaxVolumeNameChars + 1];  /* volume name */\n+\tu_int32_t \t\tdrVolBkUp;\t/* date and time of last backup */\n+\tu_int16_t \t\tdrVSeqNum;\t/* volume backup sequence number */\n+\tu_int32_t \t\tdrWrCnt;\t/* volume write count */\n+\tu_int32_t \t\tdrXTClpSiz;\t/* clump size for extents overflow file */\n+\tu_int32_t \t\tdrCTClpSiz;\t/* clump size for catalog file */\n+\tu_int16_t \t\tdrNmRtDirs;\t/* number of directories in root folder */\n+\tu_int32_t \t\tdrFilCnt;\t/* number of files in volume */\n+\tu_int32_t \t\tdrDirCnt;\t/* number of directories in volume */\n+\tu_int32_t \t\tdrFndrInfo[8];\t/* information used by the Finder */\n+\tu_int16_t \t\tdrEmbedSigWord;\t/* embedded volume signature (formerly drVCSize) */\n+\tHFSExtentDescriptor\tdrEmbedExtent;\t/* embedded volume location and size (formerly drVBMCSize and drCtlCSize) */\n+\tu_int32_t\t\tdrXTFlSize;\t/* size of extents overflow file */\n+\tHFSExtentRecord\t\tdrXTExtRec;\t/* extent record for extents overflow file */\n+\tu_int32_t \t\tdrCTFlSize;\t/* size of catalog file */\n+\tHFSExtentRecord \tdrCTExtRec;\t/* extent record for catalog file */\n+}PACKED_S;\n+typedef struct HFSMasterDirectoryBlock\tHFSMasterDirectoryBlock;\n+\n+\n+#ifdef __APPLE_API_UNSTABLE\n+#define SET_HFS_TEXT_ENCODING(hint)  \\\n+\t(0x656e6300 | ((hint) & 0xff))\n+#define GET_HFS_TEXT_ENCODING(hint)  \\\n+\t(((hint) & 0xffffff00) == 0x656e6300 ? (hint) & 0x000000ff : 0xffffffffU)\n+#endif /* __APPLE_API_UNSTABLE */\n+\n+\n+/* HFS Plus Volume Header - 512 bytes */\n+/* Stored at sector #2 (3rd sector) and second-to-last sector. */\n+struct HFSPlusVolumeHeader {\n+\tu_int16_t \tsignature;\t\t/* == kHFSPlusSigWord */\n+\tu_int16_t \tversion;\t\t/* == kHFSPlusVersion */\n+\tu_int32_t \tattributes;\t\t/* volume attributes */\n+\tu_int32_t \tlastMountedVersion;\t/* implementation version which last mounted volume */\n+\tu_int32_t \tjournalInfoBlock;\t/* block addr of journal info (if volume is journaled, zero otherwise) */\n+\n+\tu_int32_t \tcreateDate;\t\t/* date and time of volume creation */\n+\tu_int32_t \tmodifyDate;\t\t/* date and time of last modification */\n+\tu_int32_t \tbackupDate;\t\t/* date and time of last backup */\n+\tu_int32_t \tcheckedDate;\t\t/* date and time of last disk check */\n+\n+\tu_int32_t \tfileCount;\t\t/* number of files in volume */\n+\tu_int32_t \tfolderCount;\t\t/* number of directories in volume */\n+\n+\tu_int32_t \tblockSize;\t\t/* size (in bytes) of allocation blocks */\n+\tu_int32_t \ttotalBlocks;\t\t/* number of allocation blocks in volume (includes this header and VBM*/\n+\tu_int32_t \tfreeBlocks;\t\t/* number of unused allocation blocks */\n+\n+\tu_int32_t \tnextAllocation;\t\t/* start of next allocation search */\n+\tu_int32_t \trsrcClumpSize;\t\t/* default resource fork clump size */\n+\tu_int32_t \tdataClumpSize;\t\t/* default data fork clump size */\n+\tu_int32_t \tnextCatalogID;\t\t/* next unused catalog node ID */\n+\n+\tu_int32_t \twriteCount;\t\t/* volume write count */\n+\tu_int64_t \tencodingsBitmap;\t/* which encodings have been use  on this volume */\n+\n+\tu_int8_t \tfinderInfo[32];\t\t/* information used by the Finder */\n+\n+\tHFSPlusForkData\t allocationFile;\t/* allocation bitmap file */\n+\tHFSPlusForkData  extentsFile;\t\t/* extents B-tree file */\n+\tHFSPlusForkData  catalogFile;\t\t/* catalog B-tree file */\n+\tHFSPlusForkData  attributesFile;\t/* extended attributes B-tree file */\n+\tHFSPlusForkData\t startupFile;\t\t/* boot file (secondary loader) */\n+}PACKED_S;\n+typedef struct HFSPlusVolumeHeader HFSPlusVolumeHeader;\n+\n+\n+/* B-tree structures */\n+\n+enum BTreeKeyLimits{\n+\tkMaxKeyLength\t= 520\n+}PACKED_S;\n+\n+union BTreeKey{\n+\tu_int8_t\tlength8;\n+\tu_int16_t\tlength16;\n+\tu_int8_t\trawData [kMaxKeyLength+2];\n+}PACKED_S;\n+typedef union BTreeKey BTreeKey;\n+\n+/* BTNodeDescriptor -- Every B-tree node starts with these fields. */\n+struct BTNodeDescriptor {\n+\tu_int32_t\tfLink;\t\t\t/* next node at this level*/\n+\tu_int32_t \tbLink;\t\t\t/* previous node at this level*/\n+\tint8_t \t\tkind;\t\t\t/* kind of node (leaf, index, header, map)*/\n+\tu_int8_t \theight;\t\t\t/* zero for header, map; child is one more than parent*/\n+\tu_int16_t \tnumRecords;\t\t/* number of records in this node*/\n+\tu_int16_t \treserved;\t\t/* reserved - initialized as zero */\n+}PACKED_S;\n+typedef struct BTNodeDescriptor BTNodeDescriptor;\n+\n+/* Constants for BTNodeDescriptor kind */\n+enum {\n+\tkBTLeafNode\t= -1,\n+\tkBTIndexNode\t= 0,\n+\tkBTHeaderNode\t= 1,\n+\tkBTMapNode\t= 2\n+}PACKED_S;\n+\n+/* BTHeaderRec -- The first record of a B-tree header node */\n+struct BTHeaderRec {\n+\tu_int16_t\ttreeDepth;\t\t/* maximum height (usually leaf nodes) */\n+\tu_int32_t \trootNode;\t\t/* node number of root node */\n+\tu_int32_t \tleafRecords;\t\t/* number of leaf records in all leaf nodes */\n+\tu_int32_t \tfirstLeafNode;\t\t/* node number of first leaf node */\n+\tu_int32_t \tlastLeafNode;\t\t/* node number of last leaf node */\n+\tu_int16_t \tnodeSize;\t\t/* size of a node, in bytes */\n+\tu_int16_t \tmaxKeyLength;\t\t/* reserved */\n+\tu_int32_t \ttotalNodes;\t\t/* total number of nodes in tree */\n+\tu_int32_t \tfreeNodes;\t\t/* number of unused (free) nodes in tree */\n+\tu_int16_t \treserved1;\t\t/* unused */\n+\tu_int32_t \tclumpSize;\t\t/* reserved */\n+\tu_int8_t \tbtreeType;\t\t/* reserved */\n+\tu_int8_t \tkeyCompareType;\t\t/* Key string Comparison Type */\n+\tu_int32_t \tattributes;\t\t/* persistent attributes about the tree */\n+\tu_int32_t \treserved3[16];\t\t/* reserved */\n+}PACKED_S;\n+typedef struct BTHeaderRec BTHeaderRec;\n+\n+/* Constants for BTHeaderRec attributes */\n+enum {\n+\tkBTBadCloseMask\t\t = 0x00000001,\t/* reserved */\n+\tkBTBigKeysMask\t\t = 0x00000002,\t/* key length field is 16 bits */\n+\tkBTVariableIndexKeysMask = 0x00000004\t/* keys in index nodes are variable length */\n+}PACKED_S;\n+\n+\n+/* Catalog Key Name Comparison Type */\n+enum {\n+\tkHFSCaseFolding   = 0xCF,  /* case folding (case-insensitive) */\n+\tkHFSBinaryCompare = 0xBC  /* binary compare (case-sensitive) */\n+}PACKED_S;\n+\n+/* JournalInfoBlock - Structure that describes where our journal lives */\n+struct JournalInfoBlock {\n+\tu_int32_t\tflags;\n+    \tu_int32_t       device_signature[8];  // signature used to locate our device.\n+\tu_int64_t       offset;               // byte offset to the journal on the device\n+\tu_int64_t       size;                 // size in bytes of the journal\n+\tu_int32_t \treserved[32];\n+}PACKED_S;\n+typedef struct JournalInfoBlock JournalInfoBlock;\n+\n+enum {\n+    kJIJournalInFSMask          = 0x00000001,\n+    kJIJournalOnOtherDeviceMask = 0x00000002,\n+    kJIJournalNeedInitMask      = 0x00000004\n+}PACKED_S;\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* __HFS_FORMAT__ */\ndiff -druN diskdev_cmds-332.14/include/hfs/hfs_mount.h diskdev_cmds-332.14-patched/include/hfs/hfs_mount.h\n--- diskdev_cmds-332.14/include/hfs/hfs_mount.h\t1970-01-01 01:00:00.000000000 +0100\n+++ diskdev_cmds-332.14-patched/include/hfs/hfs_mount.h\t2008-07-01 22:30:11.000000000 +0200\n@@ -0,0 +1,78 @@\n+/*\n+ * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.\n+ *\n+ * @APPLE_LICENSE_HEADER_START@\n+ * \n+ * The contents of this file constitute Original Code as defined in and\n+ * are subject to the Apple Public Source License Version 1.1 (the\n+ * \"License\").  You may not use this file except in compliance with the\n+ * License.  Please obtain a copy of the License at\n+ * http://www.apple.com/publicsource and read it before using this file.\n+ * \n+ * This Original Code and all software distributed under the License are\n+ * distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the\n+ * License for the specific language governing rights and limitations\n+ * under the License.\n+ * \n+ * @APPLE_LICENSE_HEADER_END@\n+ */\n+/*\n+ * Copyright (c) 1997-2002 Apple Computer, Inc. All Rights Reserved\n+ *\n+ */\n+\n+#ifndef _HFS_MOUNT_H_\n+#define _HFS_MOUNT_H_\n+\n+#include <sys/appleapiopts.h>\n+\n+#include <sys/mount.h>\n+#include <sys/time.h>\n+\n+/*\n+ * Arguments to mount HFS-based filesystems\n+ */\n+\n+#define OVERRIDE_UNKNOWN_PERMISSIONS 0\n+\n+#define UNKNOWNUID ((uid_t)99)\n+#define UNKNOWNGID ((gid_t)99)\n+#define UNKNOWNPERMISSIONS (S_IRWXU | S_IROTH | S_IXOTH)\t\t/* 705 */\n+\n+#ifdef __APPLE_API_UNSTABLE\n+struct hfs_mount_args {\n+#ifndef KERNEL\n+\tchar\t*fspec;\t\t\t/* block special device to mount */\n+#endif\n+\tuid_t\thfs_uid;\t\t/* uid that owns hfs files (standard HFS only) */\n+\tgid_t\thfs_gid;\t\t/* gid that owns hfs files (standard HFS only) */\n+\tmode_t\thfs_mask;\t\t/* mask to be applied for hfs perms  (standard HFS only) */\n+\tu_int32_t hfs_encoding;\t\t/* encoding for this volume (standard HFS only) */\n+\tstruct\ttimezone hfs_timezone;\t/* user time zone info (standard HFS only) */\n+\tint\t\tflags;\t\t\t/* mounting flags, see below */\n+\tint     journal_tbuffer_size;   /* size in bytes of the journal transaction buffer */\n+\tint\t\tjournal_flags;          /* flags to pass to journal_open/create */\n+\tint\t\tjournal_disable;        /* don't use journaling (potentially dangerous) */\n+};\n+\n+#define HFSFSMNT_NOXONFILES\t0x1\t/* disable execute permissions for files */\n+#define HFSFSMNT_WRAPPER\t0x2\t/* mount HFS wrapper (if it exists) */\n+#define HFSFSMNT_EXTENDED_ARGS  0x4     /* indicates new fields after \"flags\" are valid */\n+\n+/*\n+ * Sysctl values for HFS\n+ */\n+#define HFS_ENCODINGBIAS\t1\t    /* encoding matching CJK bias */\n+#define HFS_EXTEND_FS\t\t2\n+#define HFS_ENCODINGHINT\t3\t    /* guess encoding for string */\n+#define HFS_ENABLE_JOURNALING   0x082969\n+#define HFS_DISABLE_JOURNALING  0x031272\n+#define HFS_GET_JOURNAL_INFO    0x6a6e6c69\n+#define HFS_SET_PKG_EXTENSIONS  0x121031\n+\n+#endif /* __APPLE_API_UNSTABLE */\n+\n+#endif /* ! _HFS_MOUNT_H_ */\ndiff -druN diskdev_cmds-332.14/include/missing.h diskdev_cmds-332.14-patched/include/missing.h\n--- diskdev_cmds-332.14/include/missing.h\t1970-01-01 01:00:00.000000000 +0100\n+++ diskdev_cmds-332.14-patched/include/missing.h\t2008-07-01 22:30:11.000000000 +0200\n@@ -0,0 +1,113 @@\n+#ifndef _MISSING_H_\n+#define _MISSING_H_\n+\n+#include <endian.h>\n+#include <byteswap.h>\n+#include <errno.h>\n+#include <stdint.h>\n+\n+#define MAXBSIZE\t\t(256 * 4096)\n+\n+#ifndef true\n+#define true\t\t\t1\n+#endif\n+#ifndef false\n+#define false\t\t\t0\n+#endif\n+\n+/* Mac types */\n+\n+/* 8 Bit */\n+#ifndef UInt8\n+#define UInt8\t\t\tuint8_t\n+#endif\n+#ifndef u_int8_t\n+#define u_int8_t\t\tUInt8\n+#endif\n+#ifndef SInt8\n+#define SInt8\t\t\tint8_t\n+#endif\n+\n+/* 16 Bit */\n+#ifndef UInt16\n+#define UInt16\t\t\tuint16_t\n+#endif\n+#ifndef u_int16_t\n+#define u_int16_t\t\tUInt16\n+#endif\n+#ifndef SInt16\n+#define SInt16\t\t\tint16_t\n+#endif\n+\n+/* 32 Bit */\n+#ifndef UInt32\n+#define UInt32\t\t\tuint32_t\n+#endif\n+#ifndef u_int32_t\n+#define u_int32_t\t\tUInt32\n+#endif\n+#ifndef SInt32\n+#define SInt32\t\t\tint32_t\n+#endif\n+\n+/* 64 Bit */\n+#ifndef UInt64\n+#define UInt64\t\t\tuint64_t\n+#endif\n+#ifndef u_int64_t\n+#define u_int64_t\t\tUInt64\n+#endif\n+#ifndef SInt64\n+#define SInt64\t\t\tint64_t\n+#endif\n+\n+#define UniChar\t\t\tu_int16_t\n+#define Boolean\t\t\tu_int8_t\n+\n+#define UF_NODUMP\t0x00000001\n+\n+/* syslimits.h */\n+#define NAME_MAX\t255\n+\n+/* Byteswap stuff */\n+#define NXSwapHostLongToBig(x)\t\tcpu_to_be64(x)\n+#define NXSwapBigShortToHost(x) \tbe16_to_cpu(x)\n+#define OSSwapBigToHostInt16(x)\t\tbe16_to_cpu(x)\n+#define NXSwapBigLongToHost(x)\t\tbe32_to_cpu(x)\n+#define OSSwapBigToHostInt32(x)\t\tbe32_to_cpu(x)\n+#define NXSwapBigLongLongToHost(x) \tbe64_to_cpu(x)\n+#define OSSwapBigToHostInt64(x)\t\tbe64_to_cpu(x)\n+\n+#if __BYTE_ORDER == __LITTLE_ENDIAN\n+/* Big Endian Swaps */\n+#ifndef be16_to_cpu\n+#define be16_to_cpu(x) bswap_16(x)\n+#endif\n+#ifndef be32_to_cpu\n+#define be32_to_cpu(x) bswap_32(x)\n+#endif\n+#ifndef be64_to_cpu\n+#define be64_to_cpu(x) bswap_64(x)\n+#endif\n+#ifndef cpu_to_be64\n+#define cpu_to_be64(x) bswap_64(x) \n+#endif\n+#elif __BYTE_ORDER == __BIG_ENDIAN\n+/* Big endian doesn't swap */\n+#ifndef be16_to_cpu\n+#define be16_to_cpu(x)\t(x)\n+#endif\n+#ifndef be32_to_cpu\n+#define be32_to_cpu(x)\t(x)\n+#endif\n+#ifndef be64_to_cpu\n+#define be64_to_cpu(x)\t(x)\n+#endif\n+#ifndef cpu_to_be64\n+#define cpu_to_be64(x) \t(x)\n+#endif\n+#endif\n+\n+#define KAUTH_FILESEC_XATTR \"com.apple.system.Security\"\n+\n+#endif\ndiff -druN diskdev_cmds-332.14/include/sys/appleapiopts.h diskdev_cmds-332.14-patched/include/sys/appleapiopts.h\n--- diskdev_cmds-332.14/include/sys/appleapiopts.h\t1970-01-01 01:00:00.000000000 +0100\n+++ diskdev_cmds-332.14-patched/include/sys/appleapiopts.h\t2008-07-01 22:30:11.000000000 +0200\n@@ -0,0 +1,56 @@\n+/*\n+ * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.\n+ *\n+ * @APPLE_LICENSE_HEADER_START@\n+ * \n+ * The contents of this file constitute Original Code as defined in and\n+ * are subject to the Apple Public Source License Version 1.1 (the\n+ * \"License\").  You may not use this file except in compliance with the\n+ * License.  Please obtain a copy of the License at\n+ * http://www.apple.com/publicsource and read it before using this file.\n+ * \n+ * This Original Code and all software distributed under the License are\n+ * distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the\n+ * License for the specific language governing rights and limitations\n+ * under the License.\n+ * \n+ * @APPLE_LICENSE_HEADER_END@\n+ */\n+\n+#ifndef __SYS_APPLEAPIOPTS_H__\n+#define __SYS_APPLEAPIOPTS_H__\n+\n+\n+#ifndef __APPLE_API_STANDARD\n+#define __APPLE_API_STANDARD\n+#endif /* __APPLE_API_STANDARD */\n+\n+#ifndef __APPLE_API_STABLE\n+#define __APPLE_API_STABLE\n+#endif /* __APPLE_API_STABLE */\n+\n+#ifndef __APPLE_API_STRICT_CONFORMANCE\n+\n+#ifndef __APPLE_API_EVOLVING\n+#define __APPLE_API_EVOLVING\n+#endif /* __APPLE_API_EVOLVING */\n+\n+#ifndef __APPLE_API_UNSTABLE\n+#define __APPLE_API_UNSTABLE\n+#endif /* __APPLE_API_UNSTABLE */\n+\n+#ifndef __APPLE_API_PRIVATE\n+#define __APPLE_API_PRIVATE\n+#endif /* __APPLE_API_PRIVATE */\n+\n+#ifndef __APPLE_API_OBSOLETE\n+#define __APPLE_API_OBSOLETE\n+#endif /* __APPLE_API_OBSOLETE */\n+\n+#endif /* __APPLE_API_STRICT_CONFORMANCE */\n+\n+#endif /* __SYS_APPLEAPIOPTS_H__ */\n+\ndiff -druN diskdev_cmds-332.14/Makefile.lnx diskdev_cmds-332.14-patched/Makefile.lnx\n--- diskdev_cmds-332.14/Makefile.lnx\t1970-01-01 01:00:00.000000000 +0100\n+++ diskdev_cmds-332.14-patched/Makefile.lnx\t2008-07-01 22:30:11.000000000 +0200\n@@ -0,0 +1,8 @@\n+CC := gcc\n+CFLAGS := -g3 -Wall -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1\n+SUBDIRS := newfs_hfs.tproj fsck_hfs.tproj\n+\n+all clean:\n+\tfor d in $(SUBDIRS); do $(MAKE) -C $$d -f Makefile.lnx $@; done\n+\n+export CC CFLAGS\ndiff -druN diskdev_cmds-332.14/newfs_hfs.tproj/hfs_endian.c diskdev_cmds-332.14-patched/newfs_hfs.tproj/hfs_endian.c\n--- diskdev_cmds-332.14/newfs_hfs.tproj/hfs_endian.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/newfs_hfs.tproj/hfs_endian.c\t2008-07-01 22:30:11.000000000 +0200\n@@ -30,7 +30,12 @@\n #include <sys/types.h>\n #include <sys/stat.h>\n \n+#if LINUX\n+#include \"missing.h\"\n+#else\n #include <architecture/byte_order.h>\n+#endif\n+\n #include <hfs/hfs_format.h>\n \n #include \"hfs_endian.h\"\ndiff -druN diskdev_cmds-332.14/newfs_hfs.tproj/hfs_endian.h diskdev_cmds-332.14-patched/newfs_hfs.tproj/hfs_endian.h\n--- diskdev_cmds-332.14/newfs_hfs.tproj/hfs_endian.h\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/newfs_hfs.tproj/hfs_endian.h\t2008-07-01 22:30:11.000000000 +0200\n@@ -29,7 +29,12 @@\n  * volume format.\n  */\n #include <hfs/hfs_format.h>\n+#if LINUX\n+#include <endian.h>\n+#include <byteswap.h>\n+#else\n #include <architecture/byte_order.h>\n+#endif\n \n /*********************/\n /* BIG ENDIAN Macros */\nFiles diskdev_cmds-332.14/newfs_hfs.tproj/hfs_endian.o and diskdev_cmds-332.14-patched/newfs_hfs.tproj/hfs_endian.o differ\ndiff -druN diskdev_cmds-332.14/newfs_hfs.tproj/Makefile.lnx diskdev_cmds-332.14-patched/newfs_hfs.tproj/Makefile.lnx\n--- diskdev_cmds-332.14/newfs_hfs.tproj/Makefile.lnx\t1970-01-01 01:00:00.000000000 +0100\n+++ diskdev_cmds-332.14-patched/newfs_hfs.tproj/Makefile.lnx\t2008-07-01 22:30:11.000000000 +0200\n@@ -0,0 +1,12 @@\n+CFILES = hfs_endian.c makehfs.c newfs_hfs.c\n+OFILES = $(CFILES:.c=.o)\n+\n+all: newfs_hfs\n+\n+newfs_hfs: $(OFILES)\n+\t${CC} ${CFLAGS} -o newfs_hfs ${OFILES} -lcrypto\n+\n+clean:\n+\t$(RM) newfs_hfs $(OFILES)\n+\n+.PHONY : FORCE clean\ndiff -druN diskdev_cmds-332.14/newfs_hfs.tproj/makehfs.c diskdev_cmds-332.14-patched/newfs_hfs.tproj/makehfs.c\n--- diskdev_cmds-332.14/newfs_hfs.tproj/makehfs.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/newfs_hfs.tproj/makehfs.c\t2008-07-01 22:36:05.000000000 +0200\n@@ -31,10 +31,16 @@\n #include <sys/param.h>\n #include <sys/types.h>\n #include <sys/time.h>\n+#if LINUX\n+#include <time.h>\n+#include \"missing.h\"\n+#endif\n #include <sys/errno.h>\n #include <sys/stat.h>\n #include <sys/sysctl.h>\n+#if !LINUX\n #include <sys/vmmeter.h>\n+#endif\n \n #include <err.h>\n #include <errno.h>\n@@ -47,13 +53,14 @@\n \n #include <openssl/sha.h>\n \n+#if !LINUX\n #include <architecture/byte_order.h>\n \n #include <CoreFoundation/CFString.h>\n #include <CoreFoundation/CFStringEncodingExt.h>\n \n extern Boolean _CFStringGetFileSystemRepresentation(CFStringRef string, UInt8 *buffer, CFIndex maxBufLen);\n-\n+#endif\n \n #include <hfs/hfs_format.h>\n #include <hfs/hfs_mount.h>\n@@ -63,7 +70,7 @@\n #include \"readme.h\"\n \n \n-#define HFS_BOOT_DATA\t\"/usr/share/misc/hfsbootdata\"\n+#define HFS_BOOT_DATA\t\"/usr/share/hfsprogs/hfsbootdata\"\n \n #define HFS_JOURNAL_FILE\t\".journal\"\n #define HFS_JOURNAL_INFO\t\".journal_info_block\"\n@@ -129,7 +136,9 @@\n static void MarkBitInAllocationBuffer __P((HFSPlusVolumeHeader *header,\n \t\tUInt32 allocationBlock, void* sectorBuffer, UInt32 *sector));\n \n+#if !LINUX\n static UInt32 GetDefaultEncoding();\n+#endif\n \n static UInt32 UTCToLocal __P((UInt32 utcTime));\n \n@@ -158,11 +167,14 @@\n \n #define ROUNDUP(x, u)\t(((x) % (u) == 0) ? (x) : ((x)/(u) + 1) * (u))\n \n-#define ENCODING_TO_BIT(e)                               \\\n+#if LINUX\n+#define ENCODING_TO_BIT(e)       (e)                    \n+#else\n+#define ENCODING_TO_BIT(e)\n           ((e) < 48 ? (e) :                              \\\n           ((e) == kCFStringEncodingMacUkrainian ? 48 :   \\\n           ((e) == kCFStringEncodingMacFarsi ? 49 : 0)))\n-\n+#endif\n /*\n  * make_hfs\n  *\t\n@@ -528,6 +540,7 @@\n \t * Map UTF-8 input into a Mac encoding.\n \t * On conversion errors \"untitled\" is used as a fallback.\n \t */\n+#if !LINUX\n \t{\n \t\tUniChar unibuf[kHFSMaxVolumeNameChars];\n \t\tCFStringRef cfstr;\n@@ -553,7 +566,11 @@\n \t\tbcopy(&mdbp->drVN[1], defaults->volumeName, mdbp->drVN[0]);\n \t\tdefaults->volumeName[mdbp->drVN[0]] = '\\0';\n \t}\n+#endif\n \t/* Save the encoding hint in the Finder Info (field 4). */\n+\tmdbp->drVN[0] = strlen(defaults->volumeName);\n+\tbcopy(defaults->volumeName,&mdbp->drVN[1],mdbp->drVN[0]);\n+\t\n \tmdbp->drFndrInfo[4] = SET_HFS_TEXT_ENCODING(defaults->encodingHint);\n \n \tmdbp->drWrCnt = kWriteSeqNum;\n@@ -1100,9 +1117,11 @@\n \tUInt16\t\t\t\t\tnodeSize;\n \tSInt16\t\t\t\t\toffset;\n \tUInt32\t\t\t\t\tunicodeBytes;\n+#if !LINUX\n \tUInt8 canonicalName[256];\n \tCFStringRef cfstr;\n \tBoolean\tcfOK;\n+#endif\n \tint index = 0;\n \n \tnodeSize = dp->catalogNodeSize;\n@@ -1122,7 +1141,9 @@\n \t * First record is always the root directory...\n \t */\n \tckp = (HFSPlusCatalogKey *)((UInt8 *)buffer + offset);\n-\t\n+#if LINUX\t\n+\tConvertUTF8toUnicode(dp->volumeName, sizeof(ckp->nodeName.unicode), ckp->nodeName.unicode, &ckp->nodeName.length);\n+#else\n \t/* Use CFString functions to get a HFSPlus Canonical name */\n \tcfstr = CFStringCreateWithCString(kCFAllocatorDefault, (char *)dp->volumeName, kCFStringEncodingUTF8);\n \tcfOK = _CFStringGetFileSystemRepresentation(cfstr, canonicalName, sizeof(canonicalName));\n@@ -1139,6 +1160,7 @@\n \t\t      dp->volumeName, kDefaultVolumeNameStr);\n \t}\n \tCFRelease(cfstr);\n+#endif\n \tckp->nodeName.length = SWAP_BE16 (ckp->nodeName.length);\n \n \tunicodeBytes = sizeof(UniChar) * SWAP_BE16 (ckp->nodeName.length);\n@@ -1821,15 +1843,15 @@\n \toff_t sector;\n \n \tif ((byteCount % driveInfo->sectorSize) != 0)\n-\t\terrx(1, \"WriteBuffer: byte count %ld is not sector size multiple\", byteCount);\n+\t\terrx(1, \"WriteBuffer: byte count %i is not sector size multiple\", byteCount);\n \n \tsector = driveInfo->sectorOffset + startingSector;\n \n \tif (lseek(driveInfo->fd, sector * driveInfo->sectorSize, SEEK_SET) < 0)\n-\t\terr(1, \"seek (sector %qd)\", sector);\n+\t\terr(1, \"seek (sector %lld)\", sector);\n \n \tif (write(driveInfo->fd, buffer, byteCount) != byteCount)\n-\t\terr(1, \"write (sector %qd, %ld bytes)\", sector, byteCount);\n+\t\terr(1, \"write (sector %lld, %i bytes)\", sector, byteCount);\n }\n \n \n@@ -1913,7 +1935,7 @@\n \treturn quotient;\n }\n \n-\n+#if !LINUX\n #define __kCFUserEncodingFileName (\"/.CFUserTextEncoding\")\n \n static UInt32\n@@ -1939,7 +1961,7 @@\n     }\n     return 0;\n }\n-\n+#endif\n \n static int\n ConvertUTF8toUnicode(const UInt8* source, UInt32 bufsize, UniChar* unibuf,\n@@ -2006,6 +2028,9 @@\n static int\n getencodinghint(unsigned char *name)\n {\n+#if LINUX\n+\treturn(0);\n+#else\n         int mib[3];\n         size_t buflen = sizeof(int);\n         struct vfsconf vfc;\n@@ -2023,7 +2048,8 @@\n \treturn (hint);\n error:\n \thint = GetDefaultEncoding();\n-\treturn (hint);\n+\treturn (0);\n+#endif\n }\n \n \n@@ -2034,12 +2060,14 @@\n \tunsigned char digest[20];\n \ttime_t now;\n \tclock_t uptime;\n-\tint mib[2];\n-\tint sysdata;\n-\tchar sysctlstring[128];\n \tsize_t datalen;\n \tdouble sysloadavg[3];\n+#if !LINUX\n+\tint sysdata;\n+\tint mib[2];\n+\tchar sysctlstring[128];\n \tstruct vmtotal sysvmtotal;\n+#endif\n \t\n \tdo {\n \t\t/* Initialize the SHA-1 context for processing: */\n@@ -2052,52 +2080,58 @@\n \t\tSHA1_Update(&context, &uptime, sizeof(uptime));\n \t\t\n \t\t/* The kernel's boot time: */\n+#if !LINUX\n \t\tmib[0] = CTL_KERN;\n \t\tmib[1] = KERN_BOOTTIME;\n \t\tdatalen = sizeof(sysdata);\n \t\tsysctl(mib, 2, &sysdata, &datalen, NULL, 0);\n \t\tSHA1_Update(&context, &sysdata, datalen);\n-\t\t\n+#endif\n \t\t/* The system's host id: */\n+#if !LINUX\n \t\tmib[0] = CTL_KERN;\n \t\tmib[1] = KERN_HOSTID;\n \t\tdatalen = sizeof(sysdata);\n \t\tsysctl(mib, 2, &sysdata, &datalen, NULL, 0);\n \t\tSHA1_Update(&context, &sysdata, datalen);\n-\n+#endif\n \t\t/* The system's host name: */\n+#if !LINUX\n \t\tmib[0] = CTL_KERN;\n \t\tmib[1] = KERN_HOSTNAME;\n \t\tdatalen = sizeof(sysctlstring);\n \t\tsysctl(mib, 2, sysctlstring, &datalen, NULL, 0);\n \t\tSHA1_Update(&context, sysctlstring, datalen);\n-\n+#endif\n \t\t/* The running kernel's OS release string: */\n+#if !LINUX\n \t\tmib[0] = CTL_KERN;\n \t\tmib[1] = KERN_OSRELEASE;\n \t\tdatalen = sizeof(sysctlstring);\n \t\tsysctl(mib, 2, sysctlstring, &datalen, NULL, 0);\n \t\tSHA1_Update(&context, sysctlstring, datalen);\n-\n+#endif\n \t\t/* The running kernel's version string: */\n+#if !LINUX\n \t\tmib[0] = CTL_KERN;\n \t\tmib[1] = KERN_VERSION;\n \t\tdatalen = sizeof(sysctlstring);\n \t\tsysctl(mib, 2, sysctlstring, &datalen, NULL, 0);\n \t\tSHA1_Update(&context, sysctlstring, datalen);\n-\n+#endif\n \t\t/* The system's load average: */\n \t\tdatalen = sizeof(sysloadavg);\n \t\tgetloadavg(sysloadavg, 3);\n \t\tSHA1_Update(&context, &sysloadavg, datalen);\n \n \t\t/* The system's VM statistics: */\n+#if !LINUX\n \t\tmib[0] = CTL_VM;\n \t\tmib[1] = VM_METER;\n \t\tdatalen = sizeof(sysvmtotal);\n \t\tsysctl(mib, 2, &sysvmtotal, &datalen, NULL, 0);\n \t\tSHA1_Update(&context, &sysvmtotal, datalen);\n-\n+#endif\n \t\t/* The current GMT (26 ASCII characters): */\n \t\ttime(&now);\n \t\tstrncpy(randomInputBuffer, asctime(gmtime(&now)), 26);\t/* \"Mon Mar 27 13:46:26 2000\" */\nFiles diskdev_cmds-332.14/newfs_hfs.tproj/makehfs.o and diskdev_cmds-332.14-patched/newfs_hfs.tproj/makehfs.o differ\nFiles diskdev_cmds-332.14/newfs_hfs.tproj/newfs_hfs and diskdev_cmds-332.14-patched/newfs_hfs.tproj/newfs_hfs differ\ndiff -druN diskdev_cmds-332.14/newfs_hfs.tproj/newfs_hfs.8 diskdev_cmds-332.14-patched/newfs_hfs.tproj/newfs_hfs.8\n--- diskdev_cmds-332.14/newfs_hfs.tproj/newfs_hfs.8\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/newfs_hfs.tproj/newfs_hfs.8\t2008-07-01 22:35:53.000000000 +0200\n@@ -93,7 +93,7 @@\n option followed by a comma\n separated list of the form arg=blocks.\n .Pp\n-Example:  -c c=5000,e=500\n+Example:  \\-c c=5000,e=500\n .Bl -tag -width Fl\n .It Em a=blocks\n Set the attribute file clump size.\n@@ -126,7 +126,7 @@\n size must be a power of two and no larger than\n 32768 bytes.\n .Pp\n-Example:  -n c=8192,e=4096\n+Example:  \\-n c=8192,e=4096\n .Bl -tag -width Fl\n .It Em a=bytes\n Set the attribute b-tree node size.\ndiff -druN diskdev_cmds-332.14/newfs_hfs.tproj/newfs_hfs.c diskdev_cmds-332.14-patched/newfs_hfs.tproj/newfs_hfs.c\n--- diskdev_cmds-332.14/newfs_hfs.tproj/newfs_hfs.c\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/newfs_hfs.tproj/newfs_hfs.c\t2008-07-01 22:30:11.000000000 +0200\n@@ -38,8 +38,13 @@\n #include <sys/mount.h>\n #include <sys/param.h>\n #include <sys/stat.h>\n+#if LINUX\n+#include <time.h>\n+#endif\n \n+#if !LINUX\n #include <IOKit/storage/IOMediaBSDClient.h>\n+#endif\n \n #include <hfs/hfs_format.h>\n #include \"newfs_hfs.h\"\n@@ -73,7 +78,9 @@\n \n char\t*progname;\n char\tgVolumeName[kHFSPlusMaxFileNameChars + 1] = {kDefaultVolumeNameStr};\n-char\trawdevice[MAXPATHLEN];\n+#if !LINUX\n+char\trawdevice[MAXPATHLEN]; \n+#endif\n char\tblkdevice[MAXPATHLEN];\n UInt32\tgBlockSize = 0;\n UInt32\tgNextCNID = kHFSFirstUserCatalogNodeID;\n@@ -137,8 +144,10 @@\n \textern int optind;\n \tint ch;\n \tint forceHFS;\n+#if !LINUX\n \tchar *cp, *special;\n \tstruct statfs *mp;\n+#endif\n \tint n;\n \t\n \tif ((progname = strrchr(*argv, '/')))\n@@ -238,7 +247,9 @@\n \n \tif (argc != 1)\n \t\tusage();\n-\n+#if LINUX\n+\t(void) sprintf(blkdevice, \"%s\", argv[0]);\n+#else\n \tspecial = argv[0];\n \tcp = strrchr(special, '/');\n \tif (cp != 0)\n@@ -247,6 +258,7 @@\n \t\tspecial++;\n \t(void) sprintf(rawdevice, \"%sr%s\", _PATH_DEV, special);\n \t(void) sprintf(blkdevice, \"%s%s\", _PATH_DEV, special);\n+#endif\n \n \tif (forceHFS && gJournaled) {\n \t\tfprintf(stderr, \"-h -J: incompatible options specified\\n\");\n@@ -268,6 +280,9 @@\n \t/*\n \t * Check if target device is aready mounted\n \t */\n+#if LINUX\n+\t// FIXME\n+#else\n \tn = getmntinfo(&mp, MNT_NOWAIT);\n \tif (n == 0)\n \t\tfatal(\"%s: getmntinfo: %s\", blkdevice, strerror(errno));\n@@ -277,14 +292,19 @@\n \t\t\tfatal(\"%s is mounted on %s\", blkdevice, mp->f_mntonname);\n \t\t++mp;\n \t}\n+#endif\n \n-\tif (hfs_newfs(rawdevice, forceHFS, true) < 0) {\n+\tif (hfs_newfs(blkdevice, forceHFS, true) < 0) {\n+#if LINUX\n+\t\terr(1, NULL);\n+#else\n \t\t/* On ENXIO error use the block device (to get de-blocking) */\n \t\tif (errno == ENXIO) {\n \t\t\tif (hfs_newfs(blkdevice, forceHFS, false) < 0)\n \t\t\t\terr(1, NULL);\n \t\t} else\n \t\t\terr(1, NULL);\n+#endif\n \t}\n \n \texit(0);\n@@ -458,7 +478,7 @@\n \t\t\tfatal(\"%s: block size is too small for %lld sectors\", optarg, gBlockSize, sectorCount);\n \n \t\tif (gBlockSize < HFSOPTIMALBLKSIZE)\n-\t\t\twarnx(\"Warning: %ld is a non-optimal block size (4096 would be a better choice)\", gBlockSize);\n+\t\t\twarnx(\"Warning: %i is a non-optimal block size (4096 would be a better choice)\", gBlockSize);\n \t}\n }\n \n@@ -472,7 +492,9 @@\n \tint fso = 0;\n \tint retval = 0;\n \thfsparams_t defaults = {0};\n+#if !LINUX\n \tu_int64_t maxSectorsPerIO;\n+#endif\n \n \tif (gNoCreate) {\n \t\tfso = open( device, O_RDONLY | O_NDELAY, 0 );\n@@ -485,7 +507,33 @@\n \n \tif (fstat( fso, &stbuf) < 0)\n \t\tfatal(\"%s: %s\", device, strerror(errno));\n+#if LINUX\n+\tdip.sectorSize = 512;\n+\tdip.sectorsPerIO = 256;\n \n+#ifndef\tBLKGETSIZE\n+#define\tBLKGETSIZE\t\t_IO(0x12,96)\n+#endif\n+#ifndef\tBLKGETSIZE64\n+#define BLKGETSIZE64\t\t_IOR(0x12,114,size_t)\n+#endif\n+        \n+\tif (S_ISREG(stbuf.st_mode)) {\n+                dip.totalSectors = stbuf.st_size / 512;\n+        } \n+\telse if (S_ISBLK(stbuf.st_mode)) {\n+                unsigned long size;\n+                u_int64_t size64;\n+                if (!ioctl(fso, BLKGETSIZE64, &size64))\n+                        dip.totalSectors = size64 / 512;\n+                else if (!ioctl(fso, BLKGETSIZE, &size))\n+                        dip.totalSectors = size;\n+                else\n+                        fatal(\"%s: %s\", device, strerror(errno));\n+        } \n+\telse\n+                fatal(\"%s: is not a block device\", device);\n+#else\n \tif (ioctl(fso, DKIOCGETBLOCKCOUNT, &dip.totalSectors) < 0)\n \t\tfatal(\"%s: %s\", device, strerror(errno));\n \n@@ -493,14 +541,17 @@\n \t\tfatal(\"%s: %s\", device, strerror(errno));\n \n \tif (ioctl(fso, DKIOCGETMAXBLOCKCOUNTWRITE, &maxSectorsPerIO) < 0)\n-\t\tdip.sectorsPerIO = (128 * 1024) / dip.sectorSize;  /* use 128K as default */\n+\t\tdip.sectorsPerIO = (128 * 1024) / dip.sectorSize; /* use 128K as default */\n \telse\n \t\tdip.sectorsPerIO = MIN(maxSectorsPerIO, (1024 * 1024) / dip.sectorSize);\n+#endif\n+\t\n         /*\n-         * The make_hfs code currentlydoes 512 byte sized I/O.\n+         * The make_hfs code currently does 512 byte sized I/O.\n          * If the sector size is bigger than 512, start over\n          * using the block device (to get de-blocking).\n          */       \n+#if !LINUX\n         if (dip.sectorSize != kBytesPerSector) {\n \t\tif (isRaw) {\n \t\t\tclose(fso);\n@@ -515,7 +566,8 @@\n \t\t\tdip.sectorSize = kBytesPerSector;\n \t\t}\n         }\n-  \n+#endif\n+\n \tdip.fd = fso;\n \tdip.sectorOffset = 0;\n \ttime(&createtime);\n@@ -693,7 +745,7 @@\n \tdefaults->catalogClumpSize = clumpSize;\n \tdefaults->catalogNodeSize = catnodesiz;\n \tif (gBlockSize < 4096 && gBlockSize < catnodesiz)\n-\t\twarnx(\"Warning: block size %ld is less than catalog b-tree node size %ld\", gBlockSize, catnodesiz);\n+\t\twarnx(\"Warning: block size %i is less than catalog b-tree node size %i\", gBlockSize, catnodesiz);\n \n \tif (extclumpblks == 0) {\n \t\tclumpSize = CalcHFSPlusBTreeClumpSize(gBlockSize, extnodesiz, sectorCount, FALSE);\n@@ -706,7 +758,7 @@\n \tdefaults->extentsClumpSize = clumpSize;\n \tdefaults->extentsNodeSize = extnodesiz;\n \tif (gBlockSize < extnodesiz)\n-\t\twarnx(\"Warning: block size %ld is less than extents b-tree node size %ld\", gBlockSize, extnodesiz);\n+\t\twarnx(\"Warning: block size %i is less than extents b-tree node size %i\", gBlockSize, extnodesiz);\n \n \tif (atrclumpblks == 0) {\n \t\tclumpSize = 0;\n@@ -754,22 +806,22 @@\n \n \tif (gNoCreate) {\n \t\tif (!gWrapper)\n-\t\t\tprintf(\"%qd sectors (%lu bytes per sector)\\n\", sectorCount, sectorSize);\n+\t\t\tprintf(\"%lld sectors (%u bytes per sector)\\n\", sectorCount, sectorSize);\n \t\tprintf(\"HFS Plus format parameters:\\n\");\n \t\tprintf(\"\\tvolume name: \\\"%s\\\"\\n\", gVolumeName);\n-\t\tprintf(\"\\tblock-size: %lu\\n\", defaults->blockSize);\n-\t\tprintf(\"\\ttotal blocks: %lu\\n\", totalBlocks);\n+\t\tprintf(\"\\tblock-size: %u\\n\", defaults->blockSize);\n+\t\tprintf(\"\\ttotal blocks: %u\\n\", totalBlocks);\n \t\tif (gJournaled)\n \t\t\tprintf(\"\\tjournal-size: %dk\\n\", (int)defaults->journalSize/1024);\n-\t\tprintf(\"\\tfirst free catalog node id: %lu\\n\", defaults->nextFreeFileID);\n-\t\tprintf(\"\\tcatalog b-tree node size: %lu\\n\", defaults->catalogNodeSize);\n-\t\tprintf(\"\\tinitial catalog file size: %lu\\n\", defaults->catalogClumpSize);\n-\t\tprintf(\"\\textents b-tree node size: %lu\\n\", defaults->extentsNodeSize);\n-\t\tprintf(\"\\tinitial extents file size: %lu\\n\", defaults->extentsClumpSize);\n-\t\tprintf(\"\\tinitial allocation file size: %lu (%lu blocks)\\n\",\n+\t\tprintf(\"\\tfirst free catalog node id: %u\\n\", defaults->nextFreeFileID);\n+\t\tprintf(\"\\tcatalog b-tree node size: %u\\n\", defaults->catalogNodeSize);\n+\t\tprintf(\"\\tinitial catalog file size: %u\\n\", defaults->catalogClumpSize);\n+\t\tprintf(\"\\textents b-tree node size: %u\\n\", defaults->extentsNodeSize);\n+\t\tprintf(\"\\tinitial extents file size: %u\\n\", defaults->extentsClumpSize);\n+\t\tprintf(\"\\tinitial allocation file size: %u (%u blocks)\\n\",\n \t\t\tdefaults->allocationClumpSize, defaults->allocationClumpSize / gBlockSize);\n-\t\tprintf(\"\\tdata fork clump size: %lu\\n\", defaults->dataClumpSize);\n-\t\tprintf(\"\\tresource fork clump size: %lu\\n\", defaults->rsrcClumpSize);\n+\t\tprintf(\"\\tdata fork clump size: %u\\n\", defaults->dataClumpSize);\n+\t\tprintf(\"\\tresource fork clump size: %u\\n\", defaults->rsrcClumpSize);\n \t\tif (defaults->flags & kUseAccessPerms) {\n \t\t\tprintf(\"\\tuser ID: %d\\n\", (int)defaults->owner);\n \t\t\tprintf(\"\\tgroup ID: %d\\n\", (int)defaults->group);\n@@ -844,17 +896,17 @@\n \t}\n \t\n \tif (gNoCreate) {\n-\t\tprintf(\"%ld sectors at %ld bytes per sector\\n\", sectorCount, sectorSize);\n+\t\tprintf(\"%i sectors at %i bytes per sector\\n\", sectorCount, sectorSize);\n \t\tprintf(\"%s format parameters:\\n\", gWrapper ? \"HFS Wrapper\" : \"HFS\");\n \t\tprintf(\"\\tvolume name: \\\"%s\\\"\\n\", gVolumeName);\n-\t\tprintf(\"\\tblock-size: %ld\\n\", defaults->blockSize);\n-\t\tprintf(\"\\ttotal blocks: %ld\\n\", sectorCount / (alBlkSize / sectorSize) );\n-\t\tprintf(\"\\tfirst free catalog node id: %ld\\n\", defaults->nextFreeFileID);\n-\t\tprintf(\"\\tinitial catalog file size: %ld\\n\", defaults->catalogClumpSize);\n-\t\tprintf(\"\\tinitial extents file size: %ld\\n\", defaults->extentsClumpSize);\n-\t\tprintf(\"\\tfile clump size: %ld\\n\", defaults->dataClumpSize);\n+\t\tprintf(\"\\tblock-size: %i\\n\", defaults->blockSize);\n+\t\tprintf(\"\\ttotal blocks: %i\\n\", sectorCount / (alBlkSize / sectorSize) );\n+\t\tprintf(\"\\tfirst free catalog node id: %i\\n\", defaults->nextFreeFileID);\n+\t\tprintf(\"\\tinitial catalog file size: %i\\n\", defaults->catalogClumpSize);\n+\t\tprintf(\"\\tinitial extents file size: %i\\n\", defaults->extentsClumpSize);\n+\t\tprintf(\"\\tfile clump size: %i\\n\", defaults->dataClumpSize);\n \t\tif (hfsgrowblks)\n-\t\t\tprintf(\"\\twrapper growable from %ld to %ld sectors\\n\", sectorCount, hfsgrowblks);\n+\t\t\tprintf(\"\\twrapper growable from %i to %i sectors\\n\", sectorCount, hfsgrowblks);\n \t}\n }\n \ndiff -druN diskdev_cmds-332.14/newfs_hfs.tproj/newfs_hfs.h diskdev_cmds-332.14-patched/newfs_hfs.tproj/newfs_hfs.h\n--- diskdev_cmds-332.14/newfs_hfs.tproj/newfs_hfs.h\t2006-02-20 22:45:15.000000000 +0100\n+++ diskdev_cmds-332.14-patched/newfs_hfs.tproj/newfs_hfs.h\t2008-07-01 22:30:11.000000000 +0200\n@@ -19,8 +19,12 @@\n  * \n  * @APPLE_LICENSE_HEADER_END@\n  */\n- \n-#include <CoreFoundation/CFBase.h>\n+\n+#if LINUX\n+#include \"missing.h\"\n+#else\n+#include <CoreFoundation/CFBase.h>*/\n+#endif\n \n /*\n  * Mac OS Finder flags\n@@ -122,33 +126,33 @@\n #define kDTDF_FileID\t16\n #define kDTDF_Name\t\"Desktop DF\"\n #define kDTDF_Chars\t10\n-#define kDTDF_Type\t'DTFL'\n-#define kDTDF_Creator\t'DMGR'\n+#define kDTDF_Type\t0x4454464C /* 'DTFL' */\n+#define kDTDF_Creator\t0x444D4752 /* 'DMGR' */\n \n #define kDTDB_FileID\t17\n #define kDTDB_Name\t\"Desktop DB\"\n #define kDTDB_Chars\t10\n-#define kDTDB_Type\t'BTFL'\n-#define kDTDB_Creator\t'DMGR'\n+#define kDTDB_Type\t0x4254464C /* 'BTFL' */\n+#define kDTDB_Creator\t0x444D4752 /* 'DMGR' */\n #define kDTDB_Size\t1024\n \n #define kReadMe_FileID\t18\n #define kReadMe_Name\t\"ReadMe\"\n #define kReadMe_Chars\t6\n-#define kReadMe_Type\t'ttro'\n-#define kReadMe_Creator\t'ttxt'\n+#define kReadMe_Type\t0x7474726F /* 'ttro' */\n+#define kReadMe_Creator\t0x74747974 /* 'ttxt' */\n \n #define kFinder_FileID\t19\n #define kFinder_Name\t\"Finder\"\n #define kFinder_Chars\t6\n-#define kFinder_Type\t'FNDR'\n-#define kFinder_Creator\t'MACS'\n+#define kFinder_Type\t0x464E4452 /* 'FNDR' */\n+#define kFinder_Creator\t0x4D414353 /* 'MACS' */\n \n #define kSystem_FileID\t20\n #define kSystem_Name\t\"System\"\n #define kSystem_Chars\t6\n-#define kSystem_Type\t'zsys'\n-#define kSystem_Creator\t'MACS'\n+#define kSystem_Type\t0x7A737973 /* 'zsys' */\n+#define kSystem_Creator\t0x4D414353 /* 'MACS' */\n \n \n \nFiles diskdev_cmds-332.14/newfs_hfs.tproj/newfs_hfs.o and diskdev_cmds-332.14-patched/newfs_hfs.tproj/newfs_hfs.o differ\n"
  },
  {
    "path": "packages/sysutils/dosfstools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dosfstools\"\nPKG_VERSION=\"4.2\"\nPKG_SHA256=\"64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/dosfstools/dosfstools\"\nPKG_URL=\"https://github.com/dosfstools/dosfstools/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_DEPENDS_INIT=\"toolchain\"\nPKG_LONGDESC=\"dosfstools contains utilities for making and checking MS-DOS FAT filesystems.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-compat-symlinks\"\nPKG_MAKE_OPTS_TARGET=\"PREFIX=/usr\"\nPKG_MAKEINSTALL_OPTS_TARGET=\"PREFIX=/usr\"\n\nPKG_CONFIGURE_OPTS_INIT=\"--enable-compat-symlinks --without-iconv\"\nPKG_MAKE_OPTS_INIT=\"PREFIX=/usr\"\n\nmakeinstall_init() {\n  mkdir -p ${INSTALL}/usr/sbin\n    cp -P src/fatlabel ${INSTALL}/usr/sbin\n    cp -P src/fsck.fat ${INSTALL}/usr/sbin\n    ln -sf fsck.fat ${INSTALL}/usr/sbin/fsck.msdos\n    ln -sf fsck.fat ${INSTALL}/usr/sbin/fsck.vfat\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/sbin\n    cp src/mkfs.fat ${TOOLCHAIN}/sbin\n    ln -sf mkfs.fat ${TOOLCHAIN}/sbin/mkfs.vfat\n    cp src/fsck.fat ${TOOLCHAIN}/sbin\n    ln -sf fsck.fat ${TOOLCHAIN}/sbin/fsck.vfat\n    cp src/fatlabel ${TOOLCHAIN}/sbin\n}\n"
  },
  {
    "path": "packages/sysutils/dosfstools/patches/dosfstools-01-silence_backup_boot_sector_diff.patch",
    "content": "\nDo not print backup boot sector diff in non interactive mode to avoid log spam.\n\n--- a/src/boot.c\t2017-01-23 02:16:58.000000000 +0100\n+++ a/src/boot.c\t2020-02-05 18:32:16.000000000 +0100\n@@ -174,6 +174,9 @@ static void check_backup_boot(DOS_FS * f\n \tchar buf[20];\n \n \tprintf(\"There are differences between boot sector and its backup.\\n\");\n+\tif (!interactive)\n+\t    printf(\"This is mostly harmless.\\n\");\n+\telse {\n \tprintf(\"This is mostly harmless. Differences: (offset:original/backup)\\n  \");\n \tpos = 2;\n \tfor (p = (uint8_t *) b, q = (uint8_t *) & b2, i = 0; i < sizeof(b2);\n@@ -188,6 +191,7 @@ static void check_backup_boot(DOS_FS * f\n \t\tfirst = 0;\n \t    }\n \t}\n+\t}\n \tprintf(\"\\n\");\n \n \tif (interactive)\n"
  },
  {
    "path": "packages/sysutils/e2fsprogs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"e2fsprogs\"\nPKG_VERSION=\"1.46.6\"\nPKG_SHA256=\"a77517f19ff5e4e97ede63536566865dd5d48654e13fc145f5f2249ef7c4f4fc\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://e2fsprogs.sourceforge.net/\"\nPKG_URL=\"https://www.kernel.org/pub/linux/kernel/people/tytso/${PKG_NAME}/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_DEPENDS_INIT=\"toolchain\"\nPKG_LONGDESC=\"The filesystem utilities for the EXT2 filesystem, including e2fsck, mke2fs, dumpe2fs, fsck, and others.\"\nPKG_BUILD_FLAGS=\"-parallel\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--prefix=${TOOLCHAIN}/ \\\n                         --bindir=${TOOLCHAIN}/bin \\\n                         --sbindir=${TOOLCHAIN}/sbin \\\n                         --disable-debugfs \\\n                         --disable-defrag \\\n                         --disable-e2initrd-helper \\\n                         --disable-fsck \\\n                         --disable-fuse2fs \\\n                         --disable-imager \\\n                         --disable-nls \\\n                         --disable-resizer \\\n                         --disable-rpath \\\n                         --disable-subset \\\n                         --disable-symlink-build \\\n                         --disable-symlink-install \\\n                         --enable-tls \\\n                         --disable-uuidd \\\n                         --enable-verbose-makecmds \\\n                         --with-crond-dir=no \\\n                         --with-gnu-ld \\\n                         --without-pthread \\\n                         --with-systemd-unit-dir=no \\\n                         --with-udev-rules-dir=no\"\n\npost_unpack() {\n  # Increase minimal inode size to avoid:\n  # \"ext4 filesystem being mounted at xxx supports timestamps until 2038 (0x7fffffff)\"\n  sed -i 's/inode_size = 128/inode_size = 256/g' ${PKG_BUILD}/misc/mke2fs.conf.in\n}\n\npre_configure() {\n  PKG_CONFIGURE_OPTS_INIT=\"BUILD_CC=${HOST_CC} \\\n                           --disable-blkid-debug \\\n                           --disable-bsd-shlibs \\\n                           --disable-debugfs \\\n                           --disable-e2initrd-helper \\\n                           --disable-elf-shlibs \\\n                           --enable-fsck \\\n                           --disable-fuse2fs \\\n                           --disable-imager \\\n                           --disable-jbd-debug \\\n                           --enable-libblkid \\\n                           --enable-libuuid \\\n                           --disable-nls \\\n                           --disable-profile \\\n                           --enable-resizer \\\n                           --disable-rpath \\\n                           --disable-subset \\\n                           --enable-symlink-build \\\n                           --enable-symlink-install \\\n                           --disable-testio-debug \\\n                           --enable-tls \\\n                           --disable-uuidd \\\n                           --enable-verbose-makecmds \\\n                           --with-crond-dir=no \\\n                           --with-gnu-ld \\\n                           --without-pthread \\\n                           --with-systemd-unit-dir=no \\\n                           --with-udev-rules-dir=no\"\n\n  PKG_CONFIGURE_OPTS_TARGET=\"${PKG_CONFIGURE_OPTS_INIT}\"\n}\n\npost_makeinstall_target() {\n  make -C lib/et LIBMODE=644 DESTDIR=${SYSROOT_PREFIX} install\n\n  rm -rf ${INSTALL}/usr/sbin/badblocks\n  rm -rf ${INSTALL}/usr/sbin/blkid\n  rm -rf ${INSTALL}/usr/sbin/dumpe2fs\n  rm -rf ${INSTALL}/usr/sbin/e2freefrag\n  rm -rf ${INSTALL}/usr/sbin/e2undo\n  rm -rf ${INSTALL}/usr/sbin/e4defrag\n  rm -rf ${INSTALL}/usr/sbin/filefrag\n  rm -rf ${INSTALL}/usr/sbin/fsck\n  rm -rf ${INSTALL}/usr/sbin/logsave\n  rm -rf ${INSTALL}/usr/sbin/mklost+found\n}\n\nmakeinstall_init() {\n  mkdir -p ${INSTALL}/usr/sbin\n    cp e2fsck/e2fsck ${INSTALL}/usr/sbin\n    ln -sf e2fsck ${INSTALL}/usr/sbin/fsck.ext2\n    ln -sf e2fsck ${INSTALL}/usr/sbin/fsck.ext3\n    ln -sf e2fsck ${INSTALL}/usr/sbin/fsck.ext4\n\n  if [ ${INITRAMFS_PARTED_SUPPORT} = \"yes\" ]; then\n    cp misc/mke2fs ${INSTALL}/usr/sbin\n    ln -sf mke2fs ${INSTALL}/usr/sbin/mkfs.ext2\n    ln -sf mke2fs ${INSTALL}/usr/sbin/mkfs.ext3\n    ln -sf mke2fs ${INSTALL}/usr/sbin/mkfs.ext4\n  fi\n}\n\nmakeinstall_host() {\n  make -C lib/et LIBMODE=644 install\n  make -C lib/ext2fs LIBMODE=644 install\n  mkdir -p ${TOOLCHAIN}/sbin\n  cp e2fsck/e2fsck ${TOOLCHAIN}/sbin\n  cp misc/mke2fs ${TOOLCHAIN}/sbin\n  cp misc/tune2fs ${TOOLCHAIN}/sbin\n}\n"
  },
  {
    "path": "packages/sysutils/entropy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"entropy\"\nPKG_VERSION=\"0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A simple way to add entropy at boot\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/entropy\n    cp add-entropy ${INSTALL}/usr/lib/entropy\n    cp add-random-at-shutdown ${INSTALL}/usr/lib/entropy\n\n  chmod +x ${INSTALL}/usr/lib/entropy/*\n}\n\npost_install() {\n  enable_service add-entropy.service\n  enable_service add-random-at-shutdown.service\n}\n"
  },
  {
    "path": "packages/sysutils/entropy/sources/add-entropy",
    "content": "#!/usr/bin/python\n\nimport os\nimport struct\n\nRNDADDENTROPY = 0x40085203\nimport fcntl\n\ndef add_entropy(fd, data):\n    add = struct.pack('ii', len(data)*8, len(data)) + data\n    fcntl.ioctl(fd, RNDADDENTROPY, add)\n\nif not os.path.isfile(\"/storage/.cache/random.data\"):\n    os.system(\"dd if=/dev/urandom of=/storage/.cache/random.data count=4 >/dev/null\")\n\ncache=os.open(\"/storage/.cache/random.data\", os.O_RDONLY)\n\nrnd=os.open(\"/dev/random\", os.O_RDWR)\n\nwhile True:\n    data=os.read(cache, 512)\n    if len(data) == 0:\n        break\n    add_entropy(rnd, data)\n"
  },
  {
    "path": "packages/sysutils/entropy/sources/add-random-at-shutdown",
    "content": "#!/bin/sh\ndd if=/dev/urandom of=/storage/.cache/random.data count=4\n"
  },
  {
    "path": "packages/sysutils/entropy/system.d/add-entropy.service",
    "content": "[Unit]\nDescription=Add random entropy from file\nDefaultDependencies=no\nAfter=systemd-tmpfiles-setup.service\nBefore=systemd-udevd.service\n\n[Service]\nType=oneshot\nExecStart=/usr/lib/entropy/add-entropy\nRemainAfterExit=yes\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "packages/sysutils/entropy/system.d/add-random-at-shutdown.service",
    "content": "[Unit]\nDescription=Save random entropy at shutdown\nDefaultDependencies=no\nBefore=systemd-poweroff.service systemd-reboot.service systemd-halt.service\n\n[Service]\nType=oneshot\nExecStart=/usr/lib/entropy/add-random-at-shutdown\nRemainAfterExit=yes\n\n[Install]\nWantedBy=poweroff.target reboot.target halt.target\n"
  },
  {
    "path": "packages/sysutils/ethmactool/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ethmactool\"\nPKG_VERSION=\"1.0\"\nPKG_LICENSE=\"GPLv2\"\nPKG_LONGDESC=\"ethmactool: udev rule for obtaining real MAC address or creating a persistent MAC from the CPU serial\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/ethmactool-config ${INSTALL}/usr/bin\n}\n\npost_install() {\n  enable_service ethmactool-config.service\n}\n"
  },
  {
    "path": "packages/sysutils/ethmactool/scripts/ethmactool-config",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\ncase $DTNAME in\n  radxa,zero*)\n    echo \"Skipping configuration, eth0 not detected\"\n    exit 0\n    ;;\nesac\n\nCOMPATIBLE=$(/usr/bin/dtsoc)\nMAC_STEP=\"\"\n\nvalidate_mac() {\n  [ ${#MAC} -eq 12 -a \"${MAC}\" != \"000000000000\" ]\n}\n\nfixup_self_mac() {\n  # clear multicast bit and set local assignment bit (IEEE802)\n  MAC=$(printf '%012X' \"$(( (0x$MAC & 0xFEFFFFFFFFFF) | 0x020000000000 ))\")\n}\n\nfrom_cmdline() {\n  for arg in $(cat /proc/cmdline | tr -d ':'); do\n    case ${arg} in\n      mac=*)\n        MAC=${arg#*=}\n        ;;\n    esac\n  done\n}\n\naml_from_efuse_gxbb() {\n  if [ -e /sys/devices/platform/efuse/efuse0/nvmem ]; then\n    MAC=$(od -x -A n -j 0x34 -N 6 /sys/bus/nvmem/devices/efuse0/nvmem | tr -d ' ')\n    MAC=${MAC:2:2}${MAC:0:2}${MAC:6:2}${MAC:4:2}${MAC:10:2}${MAC:8:2}\n  fi\n}\n\naml_from_efuse_gxl() {\n  if [ -e /sys/devices/platform/efuse/efuse0/nvmem ]; then\n    MAC=$(cat /sys/devices/platform/efuse/efuse0/nvmem)\n  fi\n}\n\naml_from_cpu_sn() {\n  if [ -e /sys/bus/platform/devices/secure-monitor/serial ]; then\n    MAC=$(cat /sys/bus/platform/devices/secure-monitor/serial 2>/dev/null | cut -b-12)\n    fixup_self_mac\n  elif [ -e /sys/bus/platform/devices/firmware\\:secure-monitor/serial ]; then\n    MAC=$(cat /sys/bus/platform/devices/firmware\\:secure-monitor/serial 2>/dev/null | cut -b-12)\n    fixup_self_mac\n  fi\n}\n\nfrom_cpu_sn() {\n  MAC=$(cat /proc/cpuinfo 2>/dev/null | awk '/Serial/ {print substr($3,1,12)}')\n  fixup_self_mac\n}\n\ncase $COMPATIBLE in\n  amlogic*)\n    MAC_STEPS=\"from_cmdline aml_from_efuse_gxbb aml_from_efuse_gxl aml_from_cpu_sn\"\n    ;;\n  *)\n    MAC_STEPS=\"from_cpu_sn\"\n    ;;\nesac\n\nfor MAC_STEP in $MAC_STEPS ; do\n  $MAC_STEP\n  validate_mac && break\ndone\n\nif validate_mac ; then\n  MAC=$(echo \"$MAC\" | sed 's/\\(..\\)/\\1:/g' | cut -b-17)\n  echo \"MAC=${MAC}\" > /run/libreelec/ethmactool-$1\n  /usr/sbin/ip link set dev $1 down\n  /usr/sbin/ip link set dev $1 address $MAC\n  /usr/sbin/ip link set dev $1 up\nfi\n"
  },
  {
    "path": "packages/sysutils/ethmactool/system.d/ethmactool-config.service",
    "content": "[Unit]\nDescription=Configure eth0 MAC address\nRequisite=sys-subsystem-net-devices-eth0.device\nBefore=connman.service\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/ethmactool-config eth0\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/03_03eb_0002.evmap",
    "content": "KEY_VOLDOWN      = KEY_VOLUMEDOWN     # Volume Down\nKEY_VOLUP        = KEY_VOLUMEUP       # Volume Up\nKEY_CHDOWN       = KEY_CHANNELDOWN    # Channel Down\nKEY_CHUP         = KEY_CHANNELUP      # Channel Up\nKEY_OK           = KEY_ENTER             # Direction OK (also used for Enter)\nKEY_FFORWARD     = KEY_FASTFORWARD    # Forward\nKEY_GUIDE        = KEY_EPG            # EPG\n\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/03_0419_0001.evmap",
    "content": " ctrl+shift+alt+KEY_2    = KEY_PVR          # TV/DVR\n ctrl+shift+alt+KEY_H    = KEY_PRINT        # Print\n alt+KEY_F4              = KEY_CLOSE        # Close\n ctrl+shift+alt+KEY_3    = KEY_MP3          # Music\n ctrl+shift+alt+KEY_4    = KEY_MEDIA        # Pictures\n ctrl+shift+alt+KEY_5    = KEY_VIDEO        # Videos\n ctrl+shift+alt+KEY_1    = KEY_CONTEXT_MENU # DVD/Menu\n ctrl+KEY_B              = KEY_PREVIOUS     # Previous\n ctrl+KEY_P              = KEY_PLAYPAUSE    # Play/Pause\n ctrl+KEY_F              = KEY_NEXT         # Next\n ctrl+shift+KEY_B        = KEY_REWIND       # Rew\n ctrl+KEY_S              = KEY_STOP         # Stop\n ctrl+shift+KEY_F        = KEY_FORWARD      # Fwd\n ctrl+shift+alt+KEY_HOME = KEY_MENU         # Home\n ctrl+KEY_R              = KEY_RECORD       # Record\n ctrl+shift+alt+KEY_F    = KEY_SHUFFLE      # Shuffle\n ctrl+shift+alt+KEY_B    = KEY_MEDIA_REPEAT # Repeat\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/03_046d_c101.evmap",
    "content": "# Logitech, Inc. UltraX Media Remote\n# Bus=001 Device=009 Product=046d Version=c101\n\n KEY_KPENTER       = KEY_ENTER            # Enter/OK\n KEY_STOPCD        = KEY_STOP          # Stop\n\n KEY_PREVIOUSSONG  = KEY_PREVIOUS      # Prev\n KEY_NEXTSONG      = KEY_NEXT          # Next\n KEY_PLAYPAUSE     = KEY_PLAY          # Play/Pause\n KEY_FASTFORWARD   = KEY_FASTFORWARD   # Fwd\n\n KEY_BACK          = KEY_EXIT          # Back\n KEY_AGAIN         = KEY_MEDIA_REPEAT  # Repeat\n KEY_PROPS         = KEY_INFO          # Info/EPG\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/03_05a4_9881.evmap",
    "content": " KEY_HOMEPAGE        = KEY_WWW         # WWW\n KEY_SLEEP           = KEY_POWER       # Sleep\n ctrl+shift+KEY_T    = KEY_VCR         # My TV\n ctrl+KEY_M          = KEY_AUDIO       # My Music\n ctrl+KEY_I          = KEY_CAMERA      # My Pictures\n ctrl+KEY_E          = KEY_VIDEO       # My Videos\n ctrl+KEY_O          = KEY_TUNER       # Record TV\n ctrl+KEY_G          = KEY_EPG         # Guide\n ctrl+KEY_T          = KEY_TV          # Live TV\n ctrl+shift+KEY_M    = KEY_DVD         # DVD Menu\n KEY_PLAYPAUSE       = KEY_PLAY        # Play (also used for Pause)\n#KEY_PLAYPAUSE       = KEY_PAUSE       # Pause (also used for Play)\n ctrl+shift+KEY_B    = KEY_REWIND      # Reverse\n ctrl+shift+KEY_F    = KEY_FASTFORWARD # Forward\n KEY_PREVIOUSSONG    = KEY_PREVIOUS    # Pre-track\n KEY_NEXTSONG        = KEY_NEXT        # Next track\n KEY_STOPCD          = KEY_STOP        # Stop\n ctrl+KEY_R          = KEY_RECORD      # Record\n KEY_BACKSPACE       = KEY_EXIT        # Back\n BTN_RIGHT           = KEY_INFO        # Information (also used for Mouse Right)\n KEY_UP              = KEY_UP          # Direction Up\n KEY_DOWN            = KEY_DOWN        # Direction Down\n KEY_LEFT            = KEY_LEFT        # Direction Left\n KEY_RIGHT           = KEY_RIGHT       # Direction Right\n KEY_ENTER           = KEY_ENTER          # Direction OK (also used for Enter)\n BTN_MOUSE           = BTN_LEFT        # Mouse Left\n#BTN_RIGHT           = KEY_INFO        # Mouse Right (also used for Information)\n KEY_VOLUMEUP        = KEY_VOLUMEUP    # Volume Up\n KEY_VOLUMEDOWN      = KEY_VOLUMEDOWN  # Volume Down\n KEY_PAGEDOWN        = KEY_CHANNELDOWN # Channel Up\n KEY_PAGEUP          = KEY_CHANNELUP   # Channel Down\n KEY_MUTE            = KEY_MUTE        # Mute\n alt+meta+KEY_ENTER  = KEY_MEDIA       # Start Key\n alt+KEY_F4          = KEY_SUBTITLE    # Close (used here for Subtitles)\n KEY_ESC             = KEY_DELETE      # Clear\n#KEY_ENTER           = KEY_ENTER       # Enter (also used for Direction OK)\n numlock+KEY_KP0     = KEY_NUMERIC_0   # 0\n numlock+KEY_KP1     = KEY_NUMERIC_1   # 1\n numlock+KEY_KP2     = KEY_NUMERIC_2   # 2\n numlock+KEY_KP3     = KEY_NUMERIC_3   # 3\n numlock+KEY_KP4     = KEY_NUMERIC_4   # 4\n numlock+KEY_KP5     = KEY_NUMERIC_5   # 5\n numlock+KEY_KP6     = KEY_NUMERIC_6   # 6\n numlock+KEY_KP7     = KEY_NUMERIC_7   # 7\n numlock+KEY_KP8     = KEY_NUMERIC_8   # 8\n numlock+KEY_KP9     = KEY_NUMERIC_9   # 9\n KEY_KPASTERISK      = KEY_ZOOM        # *\n numlock+alt+KEY_KP3 = KEY_TEXT        # #\n numlock+alt+KEY_KP5 = NULL            # Sent as part #, and we ignore it\n\n#The USB interface advertises these events but none of the remote control's\n#buttons appear to generate them. Therefore, they are set to NULL so that\n#eventlircd does not advertise them as part of its mouse/joystick device.\n BTN_MIDDLE          = NULL\n BTN_SIDE            = NULL\n BTN_EXTRA           = NULL\n REL_WHEEL           = NULL\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/03_05ac_8241.evmap",
    "content": "# Apple Infrared Remote Controller\n\n KEY_FORWARD      = KEY_NEXT        # Next\n KEY_BACK         = KEY_PREVIOUS    # Prev\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/03_0709_9137.evmap",
    "content": "# Giada N20 Remote\n# Bus=0003 Vendor=0709 Product=9137 Version=0111\n\n KEY_BACK         = KEY_EXIT        # Back\n KEY_ESC          = KEY_CLEAR       # Clear\n\n KEY_STOPCD       = KEY_STOP        # Stop\n KEY_NEXTSONG     = KEY_NEXT        # Next\n KEY_PREVIOUSSONG = KEY_PREVIOUS    # Prev\n KEY_REWIND       = KEY_REWIND      # Rev\n KEY_FASTFORWARD  = KEY_FASTFORWARD # Fwd\n\n KEY_COMPOSE      = KEY_INFO        # Info/EPG\n KEY_G            = KEY_EPG         # Guide\n\n shift+KEY_3      = KEY_NUMERIC_POUND  # Hash (#)\n shift+KEY_8      = KEY_NUMERIC_STAR   # Star (*)\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/03_0755_2626.evmap",
    "content": "# Remote 0755:2626 Aureal Semiconductor (iRF Media Technology W-01RN USB_V3.1)\n\n shift+KEY_8  = KEY_NUMERIC_STAR       # *\n shift+KEY_3  = KEY_NUMERIC_POUND      # #\n\n ctrl+shift+KEY_B     = KEY_REWIND      # Rewind\n ctrl+KEY_LEFT        = NULL            # Rew (Hide)\n ctrl+shift+KEY_LEFT  = NULL            # Rew\n\n ctrl+shift+KEY_F     = NULL            # Fwd (Hide)\n ctrl+KEY_RIGHT       = NULL            # Fwd (Hide)\n ctrl+shift+KEY_RIGHT = NULL            # Fwd\n\n alt+KEY_LEFT         = NULL            # Prev\n ctrl+KEY_PAGEUP      = NULL            # Prev\n KEY_PREVIOUSSONG     = KEY_PREVIOUS    # Replay\n \n alt+KEY_DOWN         = NULL            # Next\n ctrl+KEY_PAGEDOWN    = NULL            # Next\n KEY_NEXTSONG         = KEY_NEXT        # Skip\n\n KEY_SPACE          = NULL              # Play/Pause\n KEY_PLAYPAUSE      = KEY_PLAY          # Play/Pause\n \n KEY_DOT           = NULL               # Stop\n ctrl+KEY_U        = NULL               # Stop\n alt+KEY_U         = NULL               # Stop\n KEY_STOPCD        = KEY_STOP           # Stop\n\n KEY_PAGEUP        = KEY_CHANNELUP     # CH/PG up\n KEY_PAGEDOWN      = KEY_CHANNELDOWN   # CH/PG down\n\n KEY_HOMEPAGE      = KEY_GREEN         # Green Key\n KEY_MAIL          = KEY_YELLOW        # Yellow Key\n\n alt+meta+KEY_ENTER = KEY_MEDIA        # Home\n ctrl+KEY_M        = KEY_AUDIO         # Music\n ctrl+KEY_I        = KEY_CAMERA        # Pictures\n ctrl+shift+KEY_M  = KEY_DVD           # DVD/VCD\n ctrl+KEY_E        = KEY_VIDEO         # Videos\n ctrl+KEY_A        = KEY_RADIO         # Radio\n ctrl+shift+KEY_T  = KEY_TUNER         # Tuner\n KEY_PVR           = KEY_TV            # PVR\n\n meta+KEY_EQUAL    = KEY_INFO          # Zoom\n ctrl+KEY_ENTER    = NULL              # Full Screen (Hide)\n alt+KEY_ENTER     = KEY_ZOOM          # Full Screen\n\n KEY_OK            = KEY_ENTER            # Ok\n KEY_BACKSPACE     = KEY_EXIT          # BACK\n\n alt+KEY_F4        = KEY_CLOSE         # Close\n meta+KEY_D        = KEY_INFO          # Desktop, remapped to Info in XBMC\n KEY_COMPOSE       = KEY_EPG           # More, remapped to Context Menu in XBMC\n ctrl+KEY_R        = KEY_RECORD        # Record\n KEY_ESC           = KEY_DELETE        # Clear\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/03_0bc7_0006.evmap",
    "content": "# X10 Remote\n\n KEY_OK              = KEY_ENTER       # Direction OK (also used for Enter)\n KEY_STOPCD          = KEY_STOP        # Stop\n\n KEY_FASTFORWARD     = KEY_FORWARD     # Forward\n\n KEY_IMAGES          = KEY_CAMERA      # My Pictures\n KEY_TV              = KEY_TUNER       # My TV\n\n KEY_SELECT          = KEY_MEDIA       # Start Key/Select Key\n KEY_BACK            = KEY_EXIT        # Back\n\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/03_1241_e000.evmap",
    "content": "# 1241:e000 HOLTEK USB receiver\n# mode 1, keyboard    red               # keyboard on\n# mode 2, mouse       blue              # mouse on\n\n shift+KEY_8        = KEY_NUMERIC_STAR  # *\n BTN_LEFT           = KEY_NUMERIC_POUND # #\n\n alt+KEY_F4         = KEY_POWER         # Power\n\n ctrl+KEY_R         = KEY_RECORD        # Record\n ctrl+KEY_P         = KEY_PAUSE         # Pause\n ctrl+shift+KEY_S   = KEY_STOP          # Stop\n ctrl+shift+KEY_B   = KEY_REWIND        # Rev\n ctrl+shift+KEY_P   = KEY_PLAY          # Play\n ctrl+shift+KEY_F   = KEY_FASTFORWARD   # Fwd\n KEY_PREVIOUSSONG   = KEY_PREVIOUS      # Prev\n KEY_KPASTERISK     = KEY_PREVIOUS      # Prev\n KEY_NEXTSONG       = KEY_NEXT          # Next\n ctrl+KEY_F         = KEY_NEXT          # Next\n\n KEY_BACKSPACE      = KEY_EXIT          # BACK/Clear\n ctrl+KEY_B         = KEY_BACK          # BACK/Clear\n BTN_RIGHT          = KEY_INFO          # Info/EPG\n KEY_F1             = KEY_INFO          # Info/EPG\n KEY_COMPOSE        = KEY_INFO          # Info/EPG\n alt+meta+KEY_ENTER = KEY_MEDIA         # Media\n\n KEY_F10            = KEY_VOLUMEUP      # Vol +\n KEY_F9             = KEY_VOLUMEDOWN    # Vol -\n KEY_PAGEUP         = KEY_CHANNELUP     # CH/PG up\n KEY_PAGEDOWN       = KEY_CHANNELDOWN   # CH/PG down\n KEY_F8             = KEY_MUTE          # Mute\n\n ctrl+shift+KEY_T   = KEY_SUBTITLE      # Teletext\n ctrl+shift+KEY_C   = KEY_SUBTITLE      # Teletext\n ctrl+KEY_U         = KEY_SUBTITLE      # Subtitles\n ctrl+KEY_G         = KEY_EPG           # Program # remapped to EPG (Contextmenu)\n\n ctrl+shift+KEY_M   = KEY_DVD           # DVD\n KEY_MP3            = KEY_AUDIO         # Music\n ctrl+KEY_M         = KEY_AUDIO         # Audio\n ctrl+KEY_T         = KEY_TUNER         # LiveTV\n ctrl+KEY_E         = KEY_TUNER         # TV\n ctrl+KEY_O         = KEY_PVR           # RecordedTV\n\n ctrl+KEY_I         = KEY_GREEN         # Green\n alt+KEY_TAB        = KEY_YELLOW        # Yellow\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/03_13ec_0006.evmap",
    "content": "# Remote 13ec:0006\n\n KEY_SLEEP         = KEY_POWER         # Power\n\n KEY_BACKSPACE     = KEY_EXIT          # Backspace\n\n KEY_PLAYPAUSE     = KEY_PLAY          # Play/Pause\n KEY_STOPCD        = KEY_STOP          # Stop\n KEY_PREVIOUSSONG  = KEY_PREVIOUS      # Prev\n KEY_NEXTSONG      = KEY_NEXT          # Next\n\n KEY_PVR           = KEY_MEDIA         # Home\n KEY_AUX           = KEY_CAMERA        # Photo\n\n KEY_MENU          = KEY_EPG           # Menu (used for XBMC's context menu)\n KEY_K             = KEY_EPG           # Title (used for XBMC's context menu)\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/03_147a_e02d.evmap",
    "content": " KEY_M     = KEY_MUTE\n KEY_R     = KEY_VOLUMEDOWN # -/-- key\n KEY_S     = KEY_VOLUMEUP   # A/B key\n KEY_F5    = KEY_RECORD     # KEY_RED\n KEY_F6    = KEY_PREVIOUS   # KEY_GREEN\n KEY_F7    = KEY_NEXT       # KEY_YELLOW\n KEY_F8    = KEY_BLUE\n KEY_E     = KEY_PROGRAM\n KEY_F     = KEY_EXIT\n KEY_I     = KEY_INFO\n KEY_F9    = KEY_TV\n KEY_F2    = KEY_MENU\n KEY_T     = KEY_TEXT\n KEY_P     = KEY_PAUSE\n KEY_V     = KEY_ZOOM       # EXT\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/03_18b1_0037.evmap",
    "content": "# Remote 18b1:0037 Petalynx Maxter\n\n KEY_PREVIOUSSONG  = KEY_PREVIOUS      # Prev\n KEY_NEXTSONG      = KEY_NEXT          # Next\n\n KEY_NEXT\t   = KEY_MENU\n \n KEY_PROGRAM       = KEY_HOME\n\n KEY_PLAYPAUSE     = KEY_PLAY          # Play/Pause\n KEY_STOPCD        = KEY_STOP          # Stop\n\n KEY_PAGEUP        = KEY_CHANNELUP     # CH/PG up\n KEY_PAGEDOWN      = KEY_CHANNELDOWN   # CH/PG down\n\n KEY_PVR           = KEY_TV            # PVR\n\n KEY_OK            = KEY_ENTER            # Ok\n KEY_EXIT          = KEY_EXIT          # BACK\n\n KEY_SLEEP         = KEY_POWER         # Power\n KEY_ESC\t   = KEY_ESC\t       # Escape\n KEY_BACK\t   = KEY_EXIT\t       # Back\n\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/03_1d57_ac01.evmap",
    "content": "# 1d57:ac01 MS-Tech\n\n shift+KEY_8        = KEY_NUMERIC_STAR  # *\n shift+KEY_3        = KEY_NUMERIC_POUND # #\n\n KEY_PAGEUP         = KEY_CHANNELUP     # CH/PG up\n KEY_PAGEDOWN       = KEY_CHANNELDOWN   # CH/PG down\n ctrl+KEY_F         = KEY_NEXT          # Next\n ctrl+KEY_B         = KEY_PREVIOUS      # Prev\n\n alt+KEY_F4         = KEY_EXIT          # Exit\n KEY_BACKSPACE      = KEY_EXIT          # Back\n\n KEY_COMPOSE        = KEY_INFO          # Info\n ctrl+KEY_R         = KEY_RECORD        # Record\n ctrl+KEY_P         = KEY_PAUSE         # Pause\n ctrl+shift+KEY_S   = KEY_STOP          # Stop\n ctrl+shift+KEY_B   = KEY_REWIND        # Rev\n ctrl+shift+KEY_P   = KEY_PLAY          # Play\n ctrl+shift+KEY_F   = KEY_FASTFORWARD   # Fwd\n\n ctrl+shift+KEY_M   = KEY_DVD           # DVD\n ctrl+shift+KEY_A   = KEY_AUDIO         # Audio\n ctrl+shift+KEY_T   = KEY_TUNER         # LiveTV\n ctrl+KEY_U         = KEY_SUBTITLE      # Subtitles\n ctrl+KEY_G         = KEY_EPG           # Guide # remapped to EPG (Contextmenu)\n alt+KEY_ENTER      = KEY_MEDIA         # Media/Switch Windows\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/aftvsremote.evmap",
    "content": "KEY_KPENTER      = KEY_OK\nKEY_UP           = KEY_UP\nKEY_LEFT         = KEY_LEFT\nKEY_RIGHT        = KEY_RIGHT\nKEY_DOWN         = KEY_DOWN\nKEY_MENU         = KEY_TITLE\nKEY_BACK         = KEY_BACK\nKEY_PLAYPAUSE    = KEY_PLAY\nKEY_REWIND       = KEY_REWIND\nKEY_HOMEPAGE     = KEY_HOME\nKEY_FASTFORWARD  = KEY_FASTFORWARD\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/bdremoteng.evmap",
    "content": "BTN_A     = KEY_F1\nBTN_B     = KEY_F2\nBTN_C     = KEY_F3\nBTN_X     = KEY_F4\nBNT_Y     = KEY_F5\nBTN_Z     = KEY_F6\nBTN_START = KEY_ENTER\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/cypress.evmap",
    "content": "# Cypress Receiver support\n# Bus=0003 Vendor=04b4 Product=0101 Version=0100\n# N: Name=\"Cypress Cypress USB Keyboard / PS2 Mouse\"\n# Bus=0003 Vendor=04b4 Product=0100 Version=0001\n# N: Name=\"Cyp Se WitheHome\"\n\n alt+meta+KEY_ENTER  = KEY_MEDIA       # Start Key\n ctrl+shift+KEY_P    = KEY_PLAY        # Play\n ctrl+KEY_R          = KEY_RECORD      # Record\n ctrl+KEY_P          = KEY_PAUSE       # Pause\n ctrl+KEY_S          = KEY_STOP        # Stop\n ctrl+shift+KEY_S    = KEY_STOP        # Stop\n\n ctrl+shift+KEY_F    = KEY_FASTFORWARD # Forward\n ctrl+shift+KEY_B    = KEY_REWIND      # Reverse\n ctrl+shift+KEY_R    = KEY_MEDIA_REPEAT # Repeat\n ctrl+KEY_F          = KEY_NEXT        # Next track\n ctrl+KEY_B          = KEY_PREVIOUS    # Pre-track\n KEY_PAGEDOWN        = KEY_CHANNELDOWN # Channel Up\n KEY_PAGEUP          = KEY_CHANNELUP   # Channel Down\n\n KEY_KPASTERISK      = KEY_NUMERIC_STAR # *\n shift+KEY_3         = KEY_NUMERIC_POUND # #\n\n KEY_BACKSPACE       = KEY_EXIT        # Back\n\n ctrl+KEY_V          = KEY_MENU        # Menu\n ctrl+shift+KEY_M    = KEY_MENU        # Menu\n KEY_COMPOSE         = KEY_INFO        # Information (also used for Mouse Right)\n KEY_F1              = KEY_EPG         # Guide (also contextmenu)\n alt+KEY_ENTER       = KEY_ZOOM        # Zoom\n\n ctrl+KEY_E          = KEY_VIDEO       # My Videos\n ctrl+KEY_M          = KEY_AUDIO       # My Music\n ctrl+KEY_I          = KEY_CAMERA      # My Pictures\n ctrl+KEY_T          = KEY_TV          # My TV\n ctrl+shift+KEY_T    = KEY_TV          # My TV\n ctrl+KEY_A          = KEY_RADIO       # Radio\n ctrl+KEY_O          = KEY_TUNER       # Record TV\n ctrl+KEY_N          = KEY_DVD         # DVD\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/default.evmap",
    "content": "# nothing to remap"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/mcekbd.evmap",
    "content": "alt+meta+KEY_ENTER = KEY_MENU\nKEY_BACKSPACE      = KEY_BACK\nKEY_EQUAL          = KEY_CHANNELUP\nctrl+KEY_EQUAL     = KEY_CHANNELUP\nKEY_MINUS          = KEY_CHANNELDOWN\nctrl+KEY_MINUS     = KEY_CHANNELDOWN\nctrl+shift+KEY_T   = KEY_TV\nctrl+KEY_M         = KEY_MP3\nctrl+KEY_E         = KEY_VIDEO\nctrl+KEY_I         = KEY_MEDIA\nctrl+KEY_G         = KEY_PROGRAM\nctrl+KEY_R         = KEY_RECORD\nctrl+KEY_D         = KEY_MENU\nctrl+shift+KEY_M   = KEY_DVD\nctrl+KEY_O         = KEY_VCR\nctrl+KEY_A         = KEY_RADIO\nctrl+KEY_U         = KEY_SUBTITLE\nctrl+KEY_P         = KEY_PAUSE\nctrl+shift+KEY_P   = KEY_PLAY\nctrl+shift+KEY_S   = KEY_STOP\nctrl+KEY_B         = KEY_PREVIOUS\nctrl+KEY_F         = KEY_NEXT\nctrl+shift+KEY_B   = KEY_REWIND\nctrl+shift+KEY_F   = KEY_FORWARD\nKEY_F8             = KEY_MUTE\nKEY_F9             = KEY_VOLUMEDOWN\nKEY_F10            = KEY_VOLUMEUP\nctrl+shift+KEY_C   = KEY_TEXT\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/ps3remote.evmap",
    "content": "# PS3 Bluetooth remote\n\nKEY_EJECTCD      = KEY_EJECT            # Eject\n\nKEY_AUDIO        = KEY_LANGUAGE         # Audio\nKEY_ANGLE        = KEY_ZOOM             # Angle\nKEY_CLEAR        = KEY_DELETE           # Clear\n\nKEY_CONTEXT_MENU = KEY_EPG              # Pop UP/MENU\nKEY_ESC          = KEY_EXIT             # Return\n\nKEY_BACK         = KEY_EXIT             # Back\nKEY_OPTION       = KEY_OPTION           # Options\nKEY_SCREEN       = KEY_SCREEN           # View\nBTN_0            = KEY_EXIT             # X\n\nBTN_TL           = KEY_VOLUMEUP         # L1 -> Volume Upn\nBTN_TL2          = KEY_VOLUMEDOWN       # L2 -> Volume down\nBTN_THUMBL       = KEY_MUTE             # L3 -> Mute\n\nKEY_HOMEPAGE     = KEY_MEDIA            # PS3 Menu\nKEY_SELECT       = KEY_RECORD           # Select\nBTN_START        = KEY_ENTER               # Start\n\nBTN_TR           = KEY_CHANNELUP        # R1 -> Channel Up\nBTN_TR2          = KEY_CHANNELDOWN      # R2 -> Channel down\nBTN_THUMBR       = KEY_PREVIOUS         # R3 -> Previous Channel\n\nKEY_FORWARD      = KEY_FASTFORWARD      # Forward\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/skyqremote.evmap",
    "content": "# SKY Q bluetooth remote\n# Bus=0005 Vendor=119b Product=212b Version=0001\n# Name=\"P218ruwido Sky Remote Keyboard\"\n\nKEY_ESC        = KEY_EXIT\nKEY_HOME       = KEY_MEDIA\nKEY_F5         = KEY_MENU\nKEY_F10        = KEY_REWIND\nKEY_F11        = KEY_PLAY\nKEY_F12        = KEY_FASTFORWARD\nKEY_F1         = KEY_POWER\nKEY_F3         = KEY_STOP\nKEY_KPASTERISK = KEY_MUTE\nKEY_F9         = KEY_INFO\nKEY_PAGEUP     = KEY_CHANNELUP\nKEY_PAGEDOWN   = KEY_CHANNELDOWN\nKEY_F15        = KEY_TUNER\nKEY_F2         = KEY_EPG\nKEY_KPPLUS     = KEY_VOLUMEUP\nKEY_KPMINUS    = KEY_VOLUMEDOWN\nKEY_F4         = KEY_RED\nKEY_DELETE     = KEY_GREEN\nKEY_INSERT     = KEY_YELLOW\nKEY_END        = KEY_BLUE\nKEY_F7         = KEY_RECORD\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/spinelplus.evmap",
    "content": "# 0471:0613 PHILIPS MCE USB IR Receiver- Spinel plus\n# 0471:206c PHILIPS MCE USB IR Receiver- Spinel plus\n# 0471:20cc PHILIPS MCE USB IR Receiver- Spinel plus\n \nshift+KEY_8      = KEY_NUMERIC_STAR  # *\nshift+KEY_3      = KEY_NUMERIC_POUND # #\n \nKEY_SLEEP        = KEY_POWER         # Sleep # remapped to Power\nKEY_WAKEUP       = KEY_POWER         # WakeUp # remapped to Power\nKEY_STOPCD       = KEY_STOP          # Stop\nKEY_PLAYPAUSE    = KEY_PLAY          # Play/Pause\nKEY_PREVIOUSSONG = KEY_PREVIOUS      # Prev\nKEY_NEXTSONG     = KEY_NEXT          # Next\nKEY_BACK         = KEY_EXIT          # BACK\nKEY_PROPS        = KEY_INFO          # Info/EPG\nKEY_PROGRAM      = KEY_EPG           # Program # remapped to EPG (Contextmenu)\nKEY_ESC          = KEY_DELETE        # Delete/Clear\nKEY_HOME         = KEY_DELETE        # Delete/Clear\nKEY_MP3          = KEY_AUDIO         # Music\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/tevii_s660.evmap",
    "content": "# TiVii S660 Remote\n# Bus=0003 Vendor=9022 Product=d660 Version=0000\n\n KEY_OK           = KEY_ENTER            # Ok\n KEY_F5           = KEY_ENTER            # Enter\n\n KEY_PLAYPAUSE    = KEY_PLAY          # Play/Pause\n KEY_EPG          = KEY_STOP          # remap EPG to STOP, because there is no STOP button\n KEY_OPEN         = KEY_NEXT          # Next\n KEY_TIME         = KEY_PREVIOUS      # Prev\n\n KEY_F6           = KEY_MEDIA         # HOME\n KEY_AUDIO        = KEY_NUMERIC_POUND # Audio\n KEY_SUBTITLE     = KEY_NUMERIC_STAR  # Subtitle\n\n KEY_MENU         = KEY_EXIT          # Menu\n KEY_BACK         = KEY_DELETE        # Back\n\n KEY_SWITCHVIDEOMODE = KEY_ZOOM       # Switch Video Mode (Zoom)\n\n KEY_F1           = KEY_VIDEO         # Videos\n KEY_F2           = KEY_AUDIO         # Music\n KEY_F3           = KEY_RADIO         # Radio\n KEY_F4           = KEY_CAMERA        # Pictures\n KEY_TUNER        = KEY_TV            # Live\n KEY_PVR          = KEY_EPG           # Play (EPG/PVR)\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/topseed.evmap",
    "content": "# Emprex BTX remote control\n# 046e:5577 BTC Emprex 2\n# 046e:5578 BTC Emprex\n# 04f2:0618 Chicony Wireless\n# 0766:0204 Topseed Cyberlink\n# 1784:0004 Topseed 2 RF Combo\n\n shift+KEY_8      = KEY_NUMERIC_STAR # *\n shift+KEY_3      = KEY_NUMERIC_POUND # #\n\n KEY_BACK         = KEY_EXIT        # BACK\n KEY_ESC          = KEY_DELETE      # Delete/Clear\n\n KEY_SLEEP        = KEY_POWER       # Power\n\n KEY_STOPCD       = KEY_STOP        # Stop\n KEY_NEXTSONG     = KEY_NEXT        # Next\n\n KEY_MP3          = KEY_AUDIO       # Music\n KEY_RADIO        = KEY_ZOOM        # Radio # Remap because we need the zoom key\n KEY_TV2          = KEY_EPG         # EPG\n\n KEY_PROGRAM      = KEY_SUBTITLE    # Program # remapped to Subtitle\n\n KEY_PROPS        = KEY_INFO        # Info/EPG\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/wiimote.evmap",
    "content": "BTN_A        = KEY_ENTER       # Ok\nBTN_B        = KEY_EXIT        # Back/Exit\n\nKEY_PREVIOUS = KEY_VOLUMEDOWN  # Vol-\nKEY_NEXT     = KEY_VOLUMEUP    # Vol+\n\nBTN_MODE     = KEY_MEDIA       # Home\nBTN_1        = KEY_CHANNELUP   # Channel Up\nBTN_2        = KEY_CHANNELDOWN # Channel Down\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/xiaomibtremote.evmap",
    "content": "KEY_POWER   = KEY_MUTE\nKEY_F5      = KEY_PLAYPAUSE\nKEY_HOME    = KEY_EPG\nKEY_BACK    = KEY_EXIT\n"
  },
  {
    "path": "packages/sysutils/eventlircd/evmap/xiaomibtremoteAM.evmap",
    "content": "KEY_POWER   = KEY_MUTE\nKEY_COMPOSE = KEY_STOPCD\nKEY_BACK    = KEY_EXIT\n"
  },
  {
    "path": "packages/sysutils/eventlircd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"eventlircd\"\nPKG_VERSION=\"fd511a9cc7de6af4517604fdc2b3f0f5b64c2a81\"\nPKG_SHA256=\"4c7a93d31845085272e497611159910af69e37a0f70925f36880ba40f4693e23\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/LibreELEC/eventlircd\"\nPKG_URL=\"https://github.com/LibreELEC/eventlircd/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain systemd lirc\"\nPKG_LONGDESC=\"The eventlircd daemon provides four functions for LIRC devices\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-udev-dir=/usr/lib/udev \\\n                           --with-lircd-socket=/run/lirc/lircd\"\n\npost_makeinstall_target() {\n# install our own evmap files and udev rules\n  rm -rf ${INSTALL}/etc/eventlircd.d\n  rm -rf ${INSTALL}/usr/lib/udev/rules.d\n  rm -rf ${INSTALL}/usr/lib/udev/lircd_helper\n\n  mkdir -p ${INSTALL}/etc/eventlircd.d\n    cp ${PKG_DIR}/evmap/*.evmap ${INSTALL}/etc/eventlircd.d\n}\n\npost_install() {\n  enable_service eventlircd.service\n}\n"
  },
  {
    "path": "packages/sysutils/eventlircd/system.d/eventlircd.service",
    "content": "[Unit]\nDescription=Eventlirc server daemon\n\n[Service]\nExecStart=/usr/sbin/eventlircd -f --evmap=/etc/eventlircd.d --socket=/run/lirc/lircd\nKillMode=process\nTimeoutStopSec=1s\n\n[Install]\nWantedBy=multi-user.target\n\n"
  },
  {
    "path": "packages/sysutils/eventlircd/tmpfiles.d/z_62_eventlircd.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nd    /run/lirc     0755 root root - -\n"
  },
  {
    "path": "packages/sysutils/eventlircd/udev.d/98-eventlircd.rules",
    "content": "################################################################################\n# An example udev rules file for eventlircd.\n#\n# This rules file does not start eventlircd. Many applications only check for\n# the lircd socket at application lauch. Therefore, it is better to start\n# eventlircd in an init script so that eventlircd creates the lircd socket\n# before any applications that use LIRC launch.\n################################################################################\n\n# eventlircd only does something for \"add\" and \"remove\" actions.\nACTION!=\"add|remove\", GOTO=\"end\"\n\n# eventlircd only does something \"input\" subsystem devices.\nSUBSYSTEM!=\"input\", GOTO=\"end\"\n\n# eventlircd can only handle event devices.\nKERNEL!=\"event[0-9]*\", GOTO=\"end\"\n\n# eventlircd ignores devices created by eventlircd.\nATTRS{name}==\"eventlircd\", GOTO=\"end\"\n\n#-------------------------------------------------------------------------------\n# Ask eventlircd to handle input event devices created by lircd. For this to\n# work, lircd must be configured to output Linux input events and must be\n# configured to output key names that conform to the LIRC namespace derived from\n# the Linux key/button event names. This rule assumes that lircd performs all\n# key mappings, so the rule does not provide a value for \"eventlircd_evmap\".\n# For more information on lircd, see <http://www.lirc.org/>.\n#-------------------------------------------------------------------------------\nATTRS{name}==\"lircd\", \\\n  ENV{eventlircd_enable}=\"true\"\n\nATTRS{name}==\"lircd-uinput\", \\\n  ENV{eventlircd_enable}=\"true\"\n\n#-------------------------------------------------------------------------------\n# Ask eventlircd to handle input event devices created by bdremoteng. For this\n# to work, bdremoteng must be configured to output Linux input events and must\n# be configured to output key names that conform to LIRC namespace derived\n# from the Linux key/button event names. For more information on bdremoteng,\n# see <http://code.google.com/p/bdremote-ng/>.\n#-------------------------------------------------------------------------------\nATTRS{name}==\"bdremoteng\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"bdremoteng.evmap\"\n\n#-------------------------------------------------------------------------------\n# Ask eventlircd to handle input event devices created by wminput. This rule\n# assumes that wminput performs all key mappings, so the rule does not provide a\n# value for \"eventlircd_evmap\" For more information on wminput, see\n# <http://abstrakraft.org/cwiid/>.\n#-------------------------------------------------------------------------------\nATTRS{name}==\"bdremoteng\", \\\n  ENV{eventlircd_enable}=\"true\"\n\n#-------------------------------------------------------------------------------\n# Ask eventlircd to handle input event devices created by ir-core (kernel).\n#-------------------------------------------------------------------------------\nSUBSYSTEMS==\"rc\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"default.evmap\"\n\n#-------------------------------------------------------------------------------\n# Ask eventlircd to handle input event devices.\n#-------------------------------------------------------------------------------\n\n# Xiaomi Mi Box USA remote\nSUBSYSTEMS==\"input\", ATTRS{name}==\"Xiaomi Remote\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"xiaomibtremote.evmap\"\n\n# Xiaomi Mi Box aftermarket remote\nSUBSYSTEMS==\"input\", ATTRS{name}==\"小米蓝牙遥控器\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"xiaomibtremoteAM.evmap\"\n  \n # iMON Ultrabay Front Panel\nSUBSYSTEMS==\"input\", ATTRS{name}==\"iMON Panel, Knob and Mouse(15c2:ffdc)\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"default.evmap\" \n\nSUBSYSTEMS==\"input\", ATTRS{name}==\"*ruwido Sky Remote Keyboard\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"skyqremote.evmap\"\n\n#-------------------------------------------------------------------------------\n# Ask eventlircd to handle USB HID devices that show up as event devices and are\n# known to be remote controls. For simplicity, the event map file names have the\n# format <BUSTYPE>_<VENDOR>_<PRODUCT>.evmap.\n#-------------------------------------------------------------------------------\nSUBSYSTEMS==\"usb\", GOTO=\"begin-usb\"\nGOTO=\"end-usb\"\nLABEL=\"begin-usb\"\n\nENV{ID_USB_INTERFACES}==\"\", IMPORT{builtin}=\"usb_id\"\n\nENV{ID_VENDOR_ID}==\"0bc7\", ENV{ID_MODEL_ID}==\"0006\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap\"\n\nENV{ID_VENDOR_ID}==\"0419\", ENV{ID_MODEL_ID}==\"0001\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap\"\n\nENV{ID_VENDOR_ID}==\"046d\", ENV{ID_MODEL_ID}==\"c101\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap\"\n\nENV{ID_VENDOR_ID}==\"046e\", ENV{ID_MODEL_ID}==\"5577\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"topseed.evmap\"\n\nENV{ID_VENDOR_ID}==\"046e\", ENV{ID_MODEL_ID}==\"5578\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"topseed.evmap\"\n\nENV{ID_VENDOR_ID}==\"04b4\", ENV{ID_MODEL_ID}==\"0100\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"cypress.evmap\"\n\nENV{ID_VENDOR_ID}==\"04b4\", ENV{ID_MODEL_ID}==\"0101\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"cypress.evmap\"\n\nENV{ID_VENDOR_ID}==\"04f2\", ENV{ID_MODEL_ID}==\"0618\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"topseed.evmap\"\n\nENV{ID_VENDOR_ID}==\"0766\", ENV{ID_MODEL_ID}==\"0204\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"topseed.evmap\"\n\nENV{ID_VENDOR_ID}==\"1784\", ENV{ID_MODEL_ID}==\"0004\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"topseed.evmap\"\n\nENV{ID_VENDOR_ID}==\"03eb\", ENV{ID_MODEL_ID}==\"0002\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap\"\n\nENV{ID_VENDOR_ID}==\"05a4\", ENV{ID_MODEL_ID}==\"9881\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap\"\n\nENV{ID_VENDOR_ID}==\"0709\", ENV{ID_MODEL_ID}==\"9137\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap\"\n\nENV{ID_VENDOR_ID}==\"0755\", ENV{ID_MODEL_ID}==\"2626\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap\"\n\nENV{ID_VENDOR_ID}==\"1241\", ENV{ID_MODEL_ID}==\"e000\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap\"\n\nENV{ID_VENDOR_ID}==\"13ec\", ENV{ID_MODEL_ID}==\"0006\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap\"\n\nENV{ID_VENDOR_ID}==\"147a\", ENV{ID_MODEL_ID}==\"e02d\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap\"\n\nENV{ID_VENDOR_ID}==\"18b1\", ENV{ID_MODEL_ID}==\"0037\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap\"\n\nENV{ID_VENDOR_ID}==\"1d57\", ENV{ID_MODEL_ID}==\"ac01\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap\"\n\nATTRS{idVendor}==\"9022\", ATTRS{idProduct}==\"d660\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"tevii_s660.evmap\"\n\nENV{ID_VENDOR_ID}==\"0471\", ENV{ID_MODEL_ID}==\"0613\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"spinelplus.evmap\"\n\nENV{ID_VENDOR_ID}==\"0471\", ENV{ID_MODEL_ID}==\"206c\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"spinelplus.evmap\"\n\nENV{ID_VENDOR_ID}==\"0471\", ENV{ID_MODEL_ID}==\"20cc\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"spinelplus.evmap\"\n\n# Enable wake-on-usb for the USB remotes.\n  RUN+=\"wakeup_enable\"\n\nLABEL=\"end-usb\"\n\n#-------------------------------------------------------------------------------\n# Ask eventlircd to handle Bluetooth HID devices that show up as event devices\n# and are known to be remote controls. For simplicity, the event map file names\n# have the format <BUSTYPE>_<VENDOR>_<PRODUCT>.evmap.\n#-------------------------------------------------------------------------------\nSUBSYSTEMS==\"bluetooth\", GOTO=\"begin-bluetooth\"\nGOTO=\"end-bluetooth\"\nLABEL=\"begin-bluetooth\"\n\nATTRS{name}==\"Nintendo Wii Remote\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"wiimote.evmap\"\n\nATTRS{name}==\"BD Remote Control\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"ps3remote.evmap\"\n\n#PS3 BD Remote Version 2 (Bluetooth AND infrared 3 in 1 remote)\nATTRS{name}==\"Sony Computer Entertainment Inc BD Remote Control\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"ps3remote.evmap\"\n\n# Amazon Fire TV stick remote\nATTRS{name}==\"Amazon Fire TV Remote\", \\\n  ENV{eventlircd_enable}=\"true\", \\\n  ENV{eventlircd_evmap}=\"aftvsremote.evmap\"\n\nLABEL=\"end-bluetooth\"\n\n# tell libinput to ignore devices handled by eventlircd\nENV{eventlircd_enable}==\"true\", ENV{LIBINPUT_IGNORE_DEVICE}=\"1\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "packages/sysutils/evrepeat/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"evrepeat\"\nPKG_VERSION=\"0.0.1\"\nPKG_SHA256=\"f1d14a12d700b9650562f8ec8ca593e6033f2e18b3d1fd1f44af29875152547e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/HiassofT/evrepeat\"\nPKG_URL=\"https://github.com/HiassofT/evrepeat/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Tool to view and change linux input device repeat settings\"\n\n"
  },
  {
    "path": "packages/sysutils/evrepeat/udev.d/70-input-repeat.rules",
    "content": "ACTION==\"add\", SUBSYSTEM==\"input\", KERNEL==\"event[0-9]*\", GOTO=\"start\"\nGOTO=\"end\"\nLABEL=\"start\"\n\n# don't change eventlircd device settings\nATTRS{name}==\"eventlircd\", GOTO=\"end\"\n\n# don't change settings of rc remotes\nSUBSYSTEMS==\"rc\", GOTO=\"end\"\n\n# set default repeat delay to 500ms like rc remotes\nRUN+=\"/usr/bin/evrepeat -d 500 $devnode\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "packages/sysutils/exfatprogs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"exfatprogs\"\nPKG_VERSION=\"1.2.0\"\nPKG_SHA256=\"56d9a49465deafc367d428afc71c8098705a30ee19a3cdf3c5320650b8880742\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/exfatprogs/exfatprogs\"\nPKG_URL=\"https://github.com/exfatprogs/exfatprogs/releases/download/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"userspace utilities that contain all of the standard utilities for creating and fixing and debugging exfat filesystems.\"\nPKG_TOOLCHAIN=\"autotools\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/share\n}\n"
  },
  {
    "path": "packages/sysutils/fuse/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"fuse\"\nPKG_VERSION=\"2.9.9\"\nPKG_SHA256=\"d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libfuse/libfuse/\"\nPKG_URL=\"https://github.com/libfuse/libfuse/releases/download/${PKG_NAME}-${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"FUSE provides a simple interface for userspace programs to export a virtual filesystem to the Linux kernel.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"MOUNT_FUSE_PATH=/usr/sbin \\\n                           --enable-lib \\\n                           --enable-util \\\n                           --disable-example \\\n                           --enable-mtab \\\n                           --disable-rpath \\\n                           --with-gnu-ld\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/etc/init.d\n  rm -rf ${INSTALL}/etc/udev\n}\n"
  },
  {
    "path": "packages/sysutils/fuse/patches/fuse-0001_aarch64-support.patch",
    "content": "fuse: add aarch64 support\n\nu64/u32 is not defined in sys/types.h, include linux/types.h like\nthe kernel version of fuse.h does. Patch sent to upstream mailing list.\n\nUpstream-Status: Submitted\nSigned-off-by: Riku Voipio <riku.voipio@linaro.org>\nSigned-off-by: Hongxu Jia <hongxu.jia@windriver.com>\n---\n include/fuse_kernel.h | 7 +------\n 1 file changed, 1 insertion(+), 6 deletions(-)\n\ndiff --git a/include/fuse_kernel.h b/include/fuse_kernel.h\nindex c632b58..e804278 100644\n--- a/include/fuse_kernel.h\n+++ b/include/fuse_kernel.h\n@@ -88,12 +88,7 @@\n #ifndef _LINUX_FUSE_H\n #define _LINUX_FUSE_H\n \n-#include <sys/types.h>\n-#define __u64 uint64_t\n-#define __s64 int64_t\n-#define __u32 uint32_t\n-#define __s32 int32_t\n-#define __u16 uint16_t\n+#include <linux/types.h>\n \n /*\n  * Version negotiation:\n-- \n1.8.1.2\n\n"
  },
  {
    "path": "packages/sysutils/fuse/patches/fuse-0002-dont-run-update-rc.d.patch",
    "content": "--- a/util/Makefile.in\t2017-06-23 22:47:36.762827097 +0200\n+++ b/util/Makefile.in\t2017-06-23 22:47:47.358852950 +0200\n@@ -734,10 +734,6 @@\n \t$(INSTALL_PROGRAM) $(builddir)/mount.fuse $(DESTDIR)$(MOUNT_FUSE_PATH)/mount.fuse\n \t$(MKDIR_P) $(DESTDIR)$(INIT_D_PATH)\n \t$(INSTALL_SCRIPT) $(srcdir)/init_script $(DESTDIR)$(INIT_D_PATH)/fuse\n-\t@if test -x /usr/sbin/update-rc.d; then \\\n-\t\techo \"/usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true\"; \\\n-\t\t/usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true; \\\n-\tfi\n \n install-data-local:\n \t$(MKDIR_P) $(DESTDIR)$(UDEV_RULES_PATH)\n"
  },
  {
    "path": "packages/sysutils/fuse/patches/fuse-0003-build-with-glibc-2.34.patch",
    "content": "From ae2352bca9b4e607538412da0cc2a9625cd8b692 Mon Sep 17 00:00:00 2001\nFrom: Sam James <sam@gentoo.org>\nDate: Sat, 24 Jul 2021 22:02:45 +0100\nSubject: [PATCH] util/ulockmgr_server.c: conditionally define closefrom (fix\n glibc-2.34+)\n\nclosefrom(3) has joined us in glibc-land from *BSD and Solaris. Since\nit's available in glibc 2.34+, we want to detect it and only define our\nfallback if the libc doesn't provide it.\n\nBug: https://bugs.gentoo.org/803923\nSigned-off-by: Sam James <sam@gentoo.org>\n---\n configure.ac           | 1 +\n util/ulockmgr_server.c | 6 ++++++\n 2 files changed, 7 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex 9946a0efa..a2d481aa9 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -55,6 +55,7 @@ fi\n \n AC_CHECK_FUNCS([fork setxattr fdatasync splice vmsplice utimensat])\n AC_CHECK_FUNCS([posix_fallocate])\n+AC_CHECK_FUNCS([closefrom])\n AC_CHECK_MEMBERS([struct stat.st_atim])\n AC_CHECK_MEMBERS([struct stat.st_atimespec])\n \ndiff --git a/util/ulockmgr_server.c b/util/ulockmgr_server.c\nindex 273c7d923..a04dac5c6 100644\n--- a/util/ulockmgr_server.c\n+++ b/util/ulockmgr_server.c\n@@ -22,6 +22,10 @@\n #include <sys/socket.h>\n #include <sys/wait.h>\n \n+#ifdef HAVE_CONFIG_H\n+\t#include \"config.h\"\n+#endif\n+\n struct message {\n \tunsigned intr : 1;\n \tunsigned nofd : 1;\n@@ -124,6 +128,7 @@ static int receive_message(int sock, void *buf, size_t buflen, int *fdp,\n \treturn res;\n }\n \n+#if !defined(HAVE_CLOSEFROM)\n static int closefrom(int minfd)\n {\n \tDIR *dir = opendir(\"/proc/self/fd\");\n@@ -141,6 +146,7 @@ static int closefrom(int minfd)\n \t}\n \treturn 0;\n }\n+#endif\n \n static void send_reply(int cfd, struct message *msg)\n {\n"
  },
  {
    "path": "packages/sysutils/fuse-exfat/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"fuse-exfat\"\nPKG_VERSION=\"1.2.8\"\nPKG_SHA256=\"1f357e7026407cba6617acd2a0109ede8292e5ede4addd918c65a7b700ef96cb\"\nPKG_LICENSE=\"GPLv2+\"\nPKG_SITE=\"https://github.com/relan/exfat\"\nPKG_URL=\"https://github.com/relan/exfat/releases/download/v$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain fuse\"\nPKG_LONGDESC=\"This project aims to provide a full-featured exFAT file system implementation for GNU/Linux other Unix-like systems as a FUSE module.\"\n"
  },
  {
    "path": "packages/sysutils/fuse3/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"fuse3\"\nPKG_VERSION=\"3.12.0\"\nPKG_SHA256=\"33b8a92d6f7a88e6a889f0009206933482f48f3eb85d88cf09ef551313ac7373\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libfuse/libfuse/\"\nPKG_URL=\"https://github.com/libfuse/libfuse/releases/download/fuse-${PKG_VERSION}/fuse-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain systemd\"\nPKG_LONGDESC=\"FUSE is an interface for userspace programs to export a filesystem to the Linux kernel.\"\n\nPKG_MESON_OPTS_TARGET=\"-Ddisable-mtab=false \\\n                       -Dutils=true \\\n                       -Dexamples=false \\\n                       -Duseroot=false \\\n                       -Dtests=false\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/etc\n  rm -rf ${INSTALL}/usr/lib/udev\n}\n"
  },
  {
    "path": "packages/sysutils/gptfdisk/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gptfdisk\"\nPKG_VERSION=\"1.0.9\"\nPKG_SHA256=\"dafead2693faeb8e8b97832b23407f6ed5b3219bc1784f482dd855774e2d50c2\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.rodsbooks.com/gdisk/\"\nPKG_URL=\"https://downloads.sourceforge.net/project/${PKG_NAME}/${PKG_NAME}/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain popt crossguid\"\nPKG_LONGDESC=\"GPT text-mode partitioning tools\"\n\nmake_target() {\n  make sgdisk \"CC=${CC}\" \"CXX=${CXX}\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/sbin/\n    cp -p sgdisk ${INSTALL}/usr/sbin/\n}\n"
  },
  {
    "path": "packages/sysutils/gptfdisk/patches/0001-Fix-failure-crash-of-sgdisk-when-compiled-with-lates.patch",
    "content": "From 5d5e76d369a412bfb3d2cebb5fc0a7509cef878d Mon Sep 17 00:00:00 2001\nFrom: Rod Smith <rodsmith@rodsbooks.com>\nDate: Fri, 15 Apr 2022 18:10:14 -0400\nSubject: [PATCH 01/12] Fix failure & crash of sgdisk when compiled with latest\n popt (commit 740; presumably eventually release 1.19)\n\n---\n NEWS      | 8 ++++++++\n gptcl.cc  | 2 +-\n support.h | 2 +-\n 3 files changed, 10 insertions(+), 2 deletions(-)\n\ndiff --git a/NEWS b/NEWS\nindex c7add56..9e153fd 100644\n--- a/NEWS\n+++ b/NEWS\n@@ -1,3 +1,11 @@\n+1.0.10 (?/??/2022):\n+-------------------\n+\n+- Fixed problem that caused sgdisk to crash with errors about being unable\n+  to read the disk's partition table when compiled with the latest popt\n+  (commit 740, which is pre-release as I type; presumably version 1.19 and\n+  later once released).\n+\n 1.0.9 (4/14/2022):\n ------------------\n \ndiff --git a/gptcl.cc b/gptcl.cc\nindex 34c9421..0d578eb 100644\n--- a/gptcl.cc\n+++ b/gptcl.cc\n@@ -155,7 +155,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {\n    } // while\n \n    // Assume first non-option argument is the device filename....\n-   device = (char*) poptGetArg(poptCon);\n+   device = strdup((char*) poptGetArg(poptCon));\n    poptResetContext(poptCon);\n \n    if (device != NULL) {\ndiff --git a/support.h b/support.h\nindex 8ba9ad1..f91f1bc 100644\n--- a/support.h\n+++ b/support.h\n@@ -8,7 +8,7 @@\n #include <stdlib.h>\n #include <string>\n \n-#define GPTFDISK_VERSION \"1.0.9\"\n+#define GPTFDISK_VERSION \"1.0.9.1\"\n \n #if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)\n // Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64\n-- \n2.31.1\n\n"
  },
  {
    "path": "packages/sysutils/gptfdisk/patches/0002-Updated-guid.cc-to-deal-with-minor-change-in-libuuid.patch",
    "content": "From 6a8416cbd12d55f882bb751993b94f72d338d96f Mon Sep 17 00:00:00 2001\nFrom: Rod Smith <rodsmith@rodsbooks.com>\nDate: Sat, 16 Apr 2022 09:32:04 -0400\nSubject: [PATCH 02/12] Updated guid.cc to deal with minor change in libuuid\n\n---\n NEWS    | 2 ++\n guid.cc | 2 +-\n 2 files changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/NEWS b/NEWS\nindex 9e153fd..9ec7e63 100644\n--- a/NEWS\n+++ b/NEWS\n@@ -6,6 +6,8 @@\n   (commit 740, which is pre-release as I type; presumably version 1.19 and\n   later once released).\n \n+- Updated guid.cc to deal with minor change in libuuid.\n+\n 1.0.9 (4/14/2022):\n ------------------\n \ndiff --git a/guid.cc b/guid.cc\nindex 1e73ab7..d3e4fd5 100644\n--- a/guid.cc\n+++ b/guid.cc\n@@ -141,7 +141,7 @@ void GUIDData::Zero(void) {\n void GUIDData::Randomize(void) {\n    int i, uuidGenerated = 0;\n \n-#ifdef _UUID_UUID_H\n+#if defined (_UUID_UUID_H) || defined (_UL_LIBUUID_UUID_H)\n    uuid_generate(uuidData);\n    ReverseBytes(&uuidData[0], 4);\n    ReverseBytes(&uuidData[4], 2);\n-- \n2.31.1\n\n"
  },
  {
    "path": "packages/sysutils/gptfdisk/patches/0003-Updated-URLs-in-man-pages-to-HTTPS-rather-than-HTTP.patch",
    "content": "From 913f7b48647bdbd23fdc4abccf2168b061273aa4 Mon Sep 17 00:00:00 2001\nFrom: Rod Smith <rodsmith@rodsbooks.com>\nDate: Tue, 26 Apr 2022 15:46:49 -0400\nSubject: [PATCH 03/12] Updated URLs in man pages to HTTPS rather than HTTP\n\n---\n cgdisk.8   | 8 ++++----\n fixparts.8 | 4 ++--\n gdisk.8    | 8 ++++----\n sgdisk.8   | 8 ++++----\n 4 files changed, 14 insertions(+), 14 deletions(-)\n\ndiff --git a/cgdisk.8 b/cgdisk.8\nindex e3b5cb4..bc83d4b 100644\n--- a/cgdisk.8\n+++ b/cgdisk.8\n@@ -25,7 +25,7 @@ disks.\n \n For information on MBR vs. GPT, as well as GPT terminology and structure,\n see the extended GPT fdisk documentation at\n-\\fIhttp://www.rodsbooks.com/gdisk/\\fR or consult Wikipedia.\n+\\fIhttps://www.rodsbooks.com/gdisk/\\fR or consult Wikipedia.\n \n The \\fBcgdisk\\fR program employs a user interface similar to that of Linux's\n \\fBcfdisk\\fR, but \\fBcgdisk\\fR modifies GPT partitions. It also has the\n@@ -389,11 +389,11 @@ Contributors:\n .BR sgdisk (8),\n .BR fixparts (8).\n \n-\\fIhttp://en.wikipedia.org/wiki/GUID_Partition_Table\\fR\n+\\fIhttps://en.wikipedia.org/wiki/GUID_Partition_Table\\fR\n \n-\\fIhttp://developer.apple.com/technotes/tn2006/tn2166.html\\fR\n+\\fIhttps://developer.apple.com/technotes/tn2006/tn2166.html\\fR\n \n-\\fIhttp://www.rodsbooks.com/gdisk/\\fR\n+\\fIhttps://www.rodsbooks.com/gdisk/\\fR\n \n .SH \"AVAILABILITY\"\n The \\fBcgdisk\\fR command is part of the \\fIGPT fdisk\\fR package and is\ndiff --git a/fixparts.8 b/fixparts.8\nindex da7462a..25d05ad 100644\n--- a/fixparts.8\n+++ b/fixparts.8\n@@ -273,9 +273,9 @@ Contributors:\n .BR gdisk (8),\n .BR sgdisk (8).\n \n-\\fIhttp://en.wikipedia.org/wiki/Master_boot_record\\fR\n+\\fIhttps://en.wikipedia.org/wiki/Master_boot_record\\fR\n \n-\\fIhttp://www.rodsbooks.com/fixparts/\\fR\n+\\fIhttps://www.rodsbooks.com/fixparts/\\fR\n \n .SH \"AVAILABILITY\"\n The \\fBfixparts\\fR command is part of the \\fIGPT fdisk\\fR package and is\ndiff --git a/gdisk.8 b/gdisk.8\nindex b826b89..8c9929b 100644\n--- a/gdisk.8\n+++ b/gdisk.8\n@@ -27,7 +27,7 @@ recovery options require you to understand the distinctions between the\n main and backup data, as well as between the GPT headers and the partition\n tables. For information on MBR vs. GPT, as well as GPT terminology and\n structure, see the extended \\fBgdisk\\fR documentation at\n-\\fIhttp://www.rodsbooks.com/gdisk/\\fR or consult Wikipedia.\n+\\fIhttps://www.rodsbooks.com/gdisk/\\fR or consult Wikipedia.\n \n The \\fBgdisk\\fR program employs a user interface similar to that of Linux's\n \\fBfdisk\\fR, but \\fBgdisk\\fR modifies GPT partitions. It also has the\n@@ -702,11 +702,11 @@ Contributors:\n .BR sgdisk (8),\n .BR fixparts (8).\n \n-\\fIhttp://en.wikipedia.org/wiki/GUID_Partition_Table\\fR\n+\\fIhttps://en.wikipedia.org/wiki/GUID_Partition_Table\\fR\n \n-\\fIhttp://developer.apple.com/technotes/tn2006/tn2166.html\\fR\n+\\fIhttps://developer.apple.com/technotes/tn2006/tn2166.html\\fR\n \n-\\fIhttp://www.rodsbooks.com/gdisk/\\fR\n+\\fIhttps://www.rodsbooks.com/gdisk/\\fR\n \n .SH \"AVAILABILITY\"\n The \\fBgdisk\\fR command is part of the \\fIGPT fdisk\\fR package and is\ndiff --git a/sgdisk.8 b/sgdisk.8\nindex b966a13..4e5a15a 100644\n--- a/sgdisk.8\n+++ b/sgdisk.8\n@@ -23,7 +23,7 @@ recovery options require you to understand the distinctions between the\n main and backup data, as well as between the GPT headers and the partition\n tables. For information on MBR vs. GPT, as well as GPT terminology and\n structure, see the extended \\fBgdisk\\fR documentation at\n-\\fIhttp://www.rodsbooks.com/gdisk/\\fR or consult Wikipedia.\n+\\fIhttps://www.rodsbooks.com/gdisk/\\fR or consult Wikipedia.\n \n The \\fBsgdisk\\fR program employs a user interface that's based entirely on\n the command line, making it suitable for use in scripts or by experts who\n@@ -632,11 +632,11 @@ Contributors:\n .BR sfdisk (8),\n .BR fixparts (8).\n \n-\\fIhttp://en.wikipedia.org/wiki/GUID_Partition_Table\\fR\n+\\fIhttps://en.wikipedia.org/wiki/GUID_Partition_Table\\fR\n \n-\\fIhttp://developer.apple.com/technotes/tn2006/tn2166.html\\fR\n+\\fIhttps://developer.apple.com/technotes/tn2006/tn2166.html\\fR\n \n-\\fIhttp://www.rodsbooks.com/gdisk/\\fR\n+\\fIhttps://www.rodsbooks.com/gdisk/\\fR\n \n .SH \"AVAILABILITY\"\n The \\fBsgdisk\\fR command is part of the \\fIGPT fdisk\\fR package and is\n-- \n2.31.1\n\n"
  },
  {
    "path": "packages/sysutils/gptfdisk/patches/0004-Fix-NULL-dereference-when-duplicating-string-argumen.patch",
    "content": "From f5de3401b974ce103ffd93af8f9d43505a04aaf9 Mon Sep 17 00:00:00 2001\nFrom: Damian Kurek <starfire24680@gmail.com>\nDate: Thu, 7 Jul 2022 03:39:16 +0000\nSubject: [PATCH 04/12] Fix NULL dereference when duplicating string argument\n\npoptGetArg can return NULL if there are no additional arguments, which\nmakes strdup dereference NULL on strlen\n---\n gptcl.cc | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/gptcl.cc b/gptcl.cc\nindex 0d578eb..ab95239 100644\n--- a/gptcl.cc\n+++ b/gptcl.cc\n@@ -155,10 +155,11 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {\n    } // while\n \n    // Assume first non-option argument is the device filename....\n-   device = strdup((char*) poptGetArg(poptCon));\n-   poptResetContext(poptCon);\n+   device = (char*) poptGetArg(poptCon);\n \n    if (device != NULL) {\n+      device = strdup(device);\n+      poptResetContext(poptCon);\n       JustLooking(); // reset as necessary\n       BeQuiet(); // Tell called functions to be less verbose & interactive\n       if (LoadPartitions((string) device)) {\n@@ -498,6 +499,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {\n          cerr << \"Error encountered; not saving changes.\\n\";\n          retval = 4;\n       } // if\n+      free(device);\n    } // if (device != NULL)\n    poptFreeContext(poptCon);\n    return retval;\n-- \n2.31.1\n\n"
  },
  {
    "path": "packages/sysutils/gptfdisk/patches/0005-Use-64bit-time_t-on-linux-as-well.patch",
    "content": "From 7dfa8984f5a30f313d8675ff6097c8592d636d10 Mon Sep 17 00:00:00 2001\nFrom: Khem Raj <raj.khem@gmail.com>\nDate: Mon, 12 Dec 2022 12:50:07 -0800\nSubject: [PATCH 05/12] Use 64bit time_t on linux as well\n\nAlias 64bit version of stat functions to original functions\nwe are already passing -D_FILE_OFFSET_BITS=64 in linux Makefile\n\nSigned-off-by: Khem Raj <raj.khem@gmail.com>\n---\n diskio-unix.cc | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/diskio-unix.cc b/diskio-unix.cc\nindex 7780aeb..0897c56 100644\n--- a/diskio-unix.cc\n+++ b/diskio-unix.cc\n@@ -37,8 +37,12 @@\n \n using namespace std;\n \n-#ifdef __APPLE__\n+#if defined(__APPLE__) || defined(__linux__)\n #define off64_t off_t\n+#define stat64 stat\n+#define fstat64 fstat\n+#define lstat64 lstat\n+#define lseek64 lseek\n #endif\n \n // Returns the official \"real\" name for a shortened version of same.\n-- \n2.31.1\n\n"
  },
  {
    "path": "packages/sysutils/gptfdisk/patches/0006-Allow-partition-dynamically-allocated-by-largest-new.patch",
    "content": "From caf30c022c5f659bb7a5e52272c6aeca94098c70 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?David=20Joaqu=C3=ADn=20Shourabi=20Porcel?= <david@djsp.eu>\nDate: Sat, 28 Jan 2023 16:19:16 +0100\nSubject: [PATCH 06/12] Allow partition dynamically allocated by --largest-new\n to be referenced by other options\n\nThe documentation for the option --new explains that:\n\n> [a] partnum value of 0 causes the program to use the first available\n> partition number. Subsequent uses of the -A (--attributes), -c\n> (--change-name), -t (--typecode), and -u (--partition-guid) options\n> may also use 0 to refer to the same partition.\n\nAlthough the documentation for the option --largest-new does not mention\nsuch functionality, I expected it, and was puzzled when it didn't work.\n---\n gptcl.cc | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/gptcl.cc b/gptcl.cc\nindex 0d578eb..e8d394a 100644\n--- a/gptcl.cc\n+++ b/gptcl.cc\n@@ -331,8 +331,10 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {\n                   startSector = FindFirstInLargest();\n                   Align(&startSector);\n                   endSector = FindLastInFree(startSector, alignEnd);\n-                  if (largestPartNum <= 0)\n+                  if (largestPartNum <= 0) {\n                      largestPartNum = FindFirstFreePart() + 1;\n+                     newPartNum = largestPartNum - 1;\n+                  }\n                   if (CreatePartition(largestPartNum - 1, startSector, endSector)) {\n                      saveData = 1;\n                   } else {\n-- \n2.31.1\n\n"
  },
  {
    "path": "packages/sysutils/gptfdisk/patches/0007-Document-recent-merge.patch",
    "content": "From 3c4a9fbd1d71fbd3aff0c83ec3ac9b2a0d9ba748 Mon Sep 17 00:00:00 2001\nFrom: Rod Smith <rodsmith@rodsbooks.com>\nDate: Sun, 5 Mar 2023 10:57:24 -0500\nSubject: [PATCH 07/12] Document recent merge.\n\n---\n NEWS | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/NEWS b/NEWS\nindex 9ec7e63..f9f7f19 100644\n--- a/NEWS\n+++ b/NEWS\n@@ -1,4 +1,4 @@\n-1.0.10 (?/??/2022):\n+1.0.10 (?/??/2023):\n -------------------\n \n - Fixed problem that caused sgdisk to crash with errors about being unable\n@@ -8,6 +8,8 @@\n \n - Updated guid.cc to deal with minor change in libuuid.\n \n+- Fixed potential NULL derefernce bug in sgdisk.\n+\n 1.0.9 (4/14/2022):\n ------------------\n \n-- \n2.31.1\n\n"
  },
  {
    "path": "packages/sysutils/gptfdisk/patches/0008-Document-recent-mergest.patch",
    "content": "From e7a566bd96573b3f71001d0215dab93dcdd120d9 Mon Sep 17 00:00:00 2001\nFrom: Rod Smith <rodsmith@rodsbooks.com>\nDate: Sun, 5 Mar 2023 11:26:49 -0500\nSubject: [PATCH 08/12] Document recent mergest\n\n---\n NEWS     | 7 ++++++-\n sgdisk.8 | 7 +++++--\n 2 files changed, 11 insertions(+), 3 deletions(-)\n\ndiff --git a/NEWS b/NEWS\nindex f9f7f19..8d5b365 100644\n--- a/NEWS\n+++ b/NEWS\n@@ -8,7 +8,12 @@\n \n - Updated guid.cc to deal with minor change in libuuid.\n \n-- Fixed potential NULL derefernce bug in sgdisk.\n+- Fixed potential NULL derefernce bug in sgdisk. Thanks to Damian Kurek\n+  for this fix.\n+\n+- The partition number of \"0\" can now be used to reference newly-created\n+  partitions when the --largest-new=0 option to sgdisk is used. Thanks to\n+  David Joaqun Shourabi Porcel for this improvement.\n \n 1.0.9 (4/14/2022):\n ------------------\ndiff --git a/sgdisk.8 b/sgdisk.8\nindex 4e5a15a..fa53b29 100644\n--- a/sgdisk.8\n+++ b/sgdisk.8\n@@ -370,8 +370,11 @@ to use the first available partition number. Subsequent uses of the\n .B \\-N, \\-\\-largest\\-new=num\n Create a new partition that fills the largest available block of space on\n the disk. You can use the \\fI\\-a\\fR (\\fI\\-\\-set\\-alignment\\fR) option to\n-adjust the alignment, if desired. A num value of 0 causes the program to\n-use the first available partition number.\n+adjust the alignment, if desired. A num value of 0 causes the program to use\n+the first available partition number. Subsequent uses of the \\fI\\-A\\fR\n+(\\fI\\-\\-attributes\\fR), \\fI\\-c\\fR (\\fI\\-\\-change\\-name\\fR), \\fI\\-t\\fR\n+(\\fI\\-\\-typecode\\fR), and \\fI\\-u\\fR (\\fI\\-\\-partition\\-guid\\fR) options may\n+also use \\fI0\\fR to refer to the same partition.\n \n .TP \n .B \\-o, \\-\\-clear\n-- \n2.31.1\n\n"
  },
  {
    "path": "packages/sysutils/gptfdisk/patches/0009-Do-some-explicit-casts-in-gptcurses.cc-to-eliminate-.patch",
    "content": "From 42eea87e89bdbf4c4548e88428513717a601e05d Mon Sep 17 00:00:00 2001\nFrom: Rod Smith <rodsmith@rodsbooks.com>\nDate: Mon, 6 Mar 2023 14:21:35 -0500\nSubject: [PATCH 09/12] Do some explicit casts in gptcurses.cc to eliminate\n compiler warnings.\n\n---\n NEWS         |  3 +++\n gptcurses.cc | 13 +++++++------\n 2 files changed, 10 insertions(+), 6 deletions(-)\n\ndiff --git a/NEWS b/NEWS\nindex 8d5b365..dc1660e 100644\n--- a/NEWS\n+++ b/NEWS\n@@ -15,6 +15,9 @@\n   partitions when the --largest-new=0 option to sgdisk is used. Thanks to\n   David Joaqun Shourabi Porcel for this improvement.\n \n+- Make explicit casts in gptcurses.cc to eliminate compiler warnings about\n+  mis-matched types in printw() statements.\n+\n 1.0.9 (4/14/2022):\n ------------------\n \ndiff --git a/gptcurses.cc b/gptcurses.cc\nindex 8b0ae91..64cc514 100644\n--- a/gptcurses.cc\n+++ b/gptcurses.cc\n@@ -333,13 +333,13 @@ void GPTDataCurses::ShowInfo(int partNum) {\n    printw(\"Partition GUID code: %s (%s)\\n\", partitions[partNum].GetType().AsString().c_str(),\n           partitions[partNum].GetTypeName().c_str());\n    printw(\"Partition unique GUID: %s\\n\", partitions[partNum].GetUniqueGUID().AsString().c_str());\n-   printw(\"First sector: %lld (at %s)\\n\", partitions[partNum].GetFirstLBA(),\n+   printw(\"First sector: %llu (at %s)\\n\", (long long unsigned int) partitions[partNum].GetFirstLBA(),\n           BytesToIeee(partitions[partNum].GetFirstLBA(), blockSize).c_str());\n-   printw(\"Last sector: %lld (at %s)\\n\", partitions[partNum].GetLastLBA(),\n+   printw(\"Last sector: %llu (at %s)\\n\", (long long unsigned int) partitions[partNum].GetLastLBA(),\n           BytesToIeee(partitions[partNum].GetLastLBA(), blockSize).c_str());\n    size = partitions[partNum].GetLastLBA() - partitions[partNum].GetFirstLBA() + 1;\n-   printw(\"Partition size: %lld sectors (%s)\\n\", size, BytesToIeee(size, blockSize).c_str());\n-   printw(\"Attribute flags: %016llx\\n\", partitions[partNum].GetAttributes().GetAttributes());\n+   printw(\"Partition size: %llu sectors (%s)\\n\", (long long unsigned int) size, BytesToIeee(size, blockSize).c_str());\n+   printw(\"Attribute flags: %016llx\\n\", (long long unsigned int) partitions[partNum].GetAttributes().GetAttributes());\n    #ifdef USE_UTF16\n    partitions[partNum].GetDescription().extract(0, NAME_SIZE , temp, NAME_SIZE );\n    printw(\"Partition name: '%s'\\n\", temp);\n@@ -447,7 +447,8 @@ void GPTDataCurses::MakeNewPart(void) {\n       clrtoeol();\n       newFirstLBA = currentSpace->firstLBA;\n       Align(&newFirstLBA);\n-      printw(\"First sector (%lld-%lld, default = %lld): \", newFirstLBA, currentSpace->lastLBA, newFirstLBA);\n+      printw(\"First sector (%llu-%llu, default = %llu): \", (long long unsigned int) newFirstLBA,\n+             (long long unsigned int) currentSpace->lastLBA, (long long unsigned int) newFirstLBA);\n       echo();\n       getnstr(inLine, 79);\n       noecho();\n@@ -461,7 +462,7 @@ void GPTDataCurses::MakeNewPart(void) {\n    while ((newLastLBA > currentSpace->lastLBA) || (newLastLBA < newFirstLBA)) {\n       move(LINES - 3, 0);\n       clrtoeol();\n-      printw(\"Size in sectors or {KMGTP} (default = %lld): \", size);\n+      printw(\"Size in sectors or {KMGTP} (default = %llu): \", (long long unsigned int) size);\n       echo();\n       getnstr(inLine, 79);\n       noecho();\n-- \n2.31.1\n\n"
  },
  {
    "path": "packages/sysutils/gptfdisk/patches/0010-Truncate-decimal-inputs-e.g.-9.5G-becomes-9G.patch",
    "content": "From e1cc654ef71996d836c5d051278130f50f768f84 Mon Sep 17 00:00:00 2001\nFrom: Rod Smith <rodsmith@rodsbooks.com>\nDate: Mon, 6 Mar 2023 17:22:32 -0500\nSubject: [PATCH 10/12] Truncate decimal inputs (e.g., '9.5G' becomes '9G')\n\n---\n support.cc | 12 +++++++++++-\n 1 file changed, 11 insertions(+), 1 deletion(-)\n\ndiff --git a/support.cc b/support.cc\nindex 0d3bd6f..3cbabf7 100644\n--- a/support.cc\n+++ b/support.cc\n@@ -124,6 +124,8 @@ char GetYN(void) {\n // inValue works out to something outside the range low-high, returns the\n // computed value; the calling function is responsible for checking the\n // validity of this value.\n+// If inValue contains a decimal number (e.g., \"9.5G\"), quietly truncate it\n+// (to \"9G\" in this example).\n // NOTE: There's a difference in how GCC and VC++ treat oversized values\n // (say, \"999999999999999999999\") read via the \">>\" operator; GCC turns\n // them into the maximum value for the type, whereas VC++ turns them into\n@@ -158,6 +160,15 @@ uint64_t IeeeToInt(string inValue, uint64_t sSize, uint64_t low, uint64_t high,\n       badInput = 1;\n    inString >> response >> suffix;\n    suffix = toupper(suffix);\n+   foundAt = suffixes.find(suffix);\n+   // If suffix is invalid, try to find a valid one. Done because users\n+   // sometimes enter decimal numbers; when they do, suffix becomes\n+   // '.', and we need to truncate the number and find the real suffix.\n+   while (foundAt > (suffixes.length() - 1) && inString.peek() != -1) {\n+      inString >> suffix;\n+      foundAt = suffixes.find(suffix);\n+      suffix = toupper(suffix);\n+   }\n \n    // If no response, or if response == 0, use default (def)\n    if ((inValue.length() == 0) || (response == 0)) {\n@@ -167,7 +178,6 @@ uint64_t IeeeToInt(string inValue, uint64_t sSize, uint64_t low, uint64_t high,\n    } // if\n \n    // Find multiplication and division factors for the suffix\n-   foundAt = suffixes.find(suffix);\n    if (foundAt != string::npos) {\n       bytesPerUnit = UINT64_C(1) << (10 * (foundAt + 1));\n       mult = bytesPerUnit / sSize;\n-- \n2.31.1\n\n"
  },
  {
    "path": "packages/sysutils/gptfdisk/patches/0011-Document-previous-merge.patch",
    "content": "From 0e7d63502f6ea68b5c56036c493e72e83b3f145d Mon Sep 17 00:00:00 2001\nFrom: Rod Smith <rodsmith@rodsbooks.com>\nDate: Mon, 6 Mar 2023 17:28:18 -0500\nSubject: [PATCH 11/12] Document previous merge\n\n---\n NEWS      | 7 +++++++\n support.h | 2 +-\n 2 files changed, 8 insertions(+), 1 deletion(-)\n\ndiff --git a/NEWS b/NEWS\nindex dc1660e..5c6dfa1 100644\n--- a/NEWS\n+++ b/NEWS\n@@ -18,6 +18,13 @@\n - Make explicit casts in gptcurses.cc to eliminate compiler warnings about\n   mis-matched types in printw() statements.\n \n+- In previous versions, rEFInd accepted only integer values for partition\n+  start points, end points, and sizes, and it interpreted decimal values\n+  incorrectly. That is, if you typed \"+9.5G\" as the partition end point,\n+  you'd end up with something just 9 sectors in size. This version now\n+  truncates decimal numbers to their integral values, so you'd get a 9 GiB\n+  partition instead.\n+\n 1.0.9 (4/14/2022):\n ------------------\n \ndiff --git a/support.h b/support.h\nindex f91f1bc..4a9f414 100644\n--- a/support.h\n+++ b/support.h\n@@ -8,7 +8,7 @@\n #include <stdlib.h>\n #include <string>\n \n-#define GPTFDISK_VERSION \"1.0.9.1\"\n+#define GPTFDISK_VERSION \"1.0.9.2\"\n \n #if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)\n // Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64\n-- \n2.31.1\n\n"
  },
  {
    "path": "packages/sysutils/gptfdisk/patches/0012-Minor-code-cleanup-based-on-valgrind-analysis.patch",
    "content": "From cb4bf320748f701a0ed835d4a410f2960f1ce0bd Mon Sep 17 00:00:00 2001\nFrom: Rod Smith <rodsmith@rodsbooks.com>\nDate: Fri, 10 Mar 2023 13:28:00 -0500\nSubject: [PATCH 12/12] Minor code cleanup based on valgrind analysis\n\n---\n NEWS   | 2 ++\n gpt.cc | 1 +\n 2 files changed, 3 insertions(+)\n\ndiff --git a/NEWS b/NEWS\nindex 5c6dfa1..29d99e3 100644\n--- a/NEWS\n+++ b/NEWS\n@@ -18,6 +18,8 @@\n - Make explicit casts in gptcurses.cc to eliminate compiler warnings about\n   mis-matched types in printw() statements.\n \n+- Minor code cleanup based on valgrind analysis.\n+\n - In previous versions, rEFInd accepted only integer values for partition\n   start points, end points, and sizes, and it interpreted decimal values\n   incorrectly. That is, if you typed \"+9.5G\" as the partition end point,\ndiff --git a/gpt.cc b/gpt.cc\nindex 76cd9ad..24d6918 100644\n--- a/gpt.cc\n+++ b/gpt.cc\n@@ -80,6 +80,7 @@ GPTData::GPTData(void) {\n    beQuiet = 0;\n    whichWasUsed = use_new;\n    mainHeader.numParts = 0;\n+   mainHeader.firstUsableLBA = 0;\n    mainHeader.lastUsableLBA = 0;\n    numParts = 0;\n    SetGPTSize(NUM_GPT_ENTRIES);\n-- \n2.31.1\n\n"
  },
  {
    "path": "packages/sysutils/ir-bpf-decoders/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ir-bpf-decoders\"\nPKG_VERSION=\"1.22.0\"\nPKG_SHA256=\"9743e49dd725f9fb7d0410f3481931156d69fd8305184baa883ed94038fc79fc\"\nPKG_LICENSE=\"GPLv2+\"\nPKG_SITE=\"https://linuxtv.org/\"\nPKG_URL=\"https://github.com/LibreELEC/ir-bpf-decoders/archive/v4l-utils-${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"ir-bpf-decoders: precompiled binaries of IR BPF decoders from v4l-utils utils/keytable/bpf_protocols\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/udev/rc_keymaps/protocols\n  cp ${PKG_BUILD}/*.o ${INSTALL}/usr/lib/udev/rc_keymaps/protocols\n}\n"
  },
  {
    "path": "packages/sysutils/keyutils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"keyutils\"\nPKG_VERSION=\"1.6.3\"\nPKG_SHA256=\"a61d5706136ae4c05bd48f86186bcfdbd88dd8bd5107e3e195c924cfc1b39bb4\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/\"\nPKG_URL=\"https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/snapshot/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Keyutils is a set of utilities for managing the key retention facility in the kernel.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_MAKE_OPTS_TARGET=\"NO_ARLIB=0 NO_SOLIB=1 BINDIR=/usr/bin SBINDIR=/usr/sbin LIBDIR=/usr/lib USRLIBDIR=/usr/lib\"\nPKG_MAKEINSTALL_OPTS_TARGET=\"${PKG_MAKE_OPTS_TARGET}\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/share\n  rmdir ${INSTALL}/etc/request-key.d\n  ln -sf /storage/.config/request-key.d ${INSTALL}/etc/request-key.d\n}\n"
  },
  {
    "path": "packages/sysutils/keyutils/patches/keyutils-02-cflags.patch",
    "content": "From d8f15e55b4d357ac0a2b384888080b120600d09d Mon Sep 17 00:00:00 2001\nFrom: vpeter4 <peter.vicman@gmail.com>\nDate: Wed, 8 Apr 2015 18:27:06 +0200\nSubject: [PATCH] cflags\n\n---\n Makefile | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex c904eaf..df0fe3e 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1,5 +1,5 @@\n CPPFLAGS\t:= -I.\n-CFLAGS\t\t:= -g -Wall -Werror\n-CXXFLAGS\t:= -g -Wall -Werror\n+CFLAGS\t\t+= -g -Wall -Werror\n+CXXFLAGS\t+= -g -Wall -Werror\n INSTALL\t:= install\n DESTDIR\t:=\n-- \n1.8.1.2\n\n"
  },
  {
    "path": "packages/sysutils/kmod/modprobe.d/aliases.conf",
    "content": "# These are the standard aliases for devices and kernel drivers.\n# This file does not need to be modified.\n#\n# Please file a bug against module-init-tools if a package needs a entry\n# in this file.\n\n# network protocols ##########################################################\nalias net-pf-1  unix\nalias net-pf-2  ipv4\nalias net-pf-3  ax25\nalias net-pf-4  ipx\nalias net-pf-5  appletalk\nalias net-pf-6  netrom\nalias net-pf-7  bridge\nalias net-pf-8  atm\nalias net-pf-9  x25\nalias net-pf-10 ipv6\nalias net-pf-11 rose\nalias net-pf-12 decnet\n# 13 NETBEUI\nalias net-pf-15 af_key\nalias net-pf-16 af_netlink\nalias net-pf-17 af_packet\n# 18 ASH\nalias net-pf-19 af_econet\nalias net-pf-20 atm\n# 22 SNA\nalias net-pf-23 irda\nalias net-pf-24 pppoe\nalias net-pf-25 wanrouter\nalias net-pf-26 llc\nalias net-pf-31 bluetooth\n\nalias net-pf-16-proto-1 wire\nalias net-pf-16-proto-3 ip_queue\nalias net-pf-16-proto-4 tcp_diag\nalias net-pf-16-proto-8 scsi_transport_iscsi\nalias net-pf-16-proto-9 audit\nalias net-pf-16-proto-11 cn\nalias net-pf-16-proto-13 ip6_queue\n\n# executables formats ########################################################\ninstall binfmt-0000 /bin/true\nalias binfmt-204 binfmt_aout\nalias binfmt-263 binfmt_aout\nalias binfmt-264 binfmt_aout\nalias binfmt-267 binfmt_aout\nalias binfmt-387 binfmt_aout\n\n# block devices ##############################################################\nalias block-major-3-*  ide_generic\nalias block-major-8-*  sd_mod\nalias block-major-9-*  md\nalias block-major-11-* sr_mod\nalias block-major-22-* ide_generic\nalias block-major-33-* ide_generic\nalias block-major-34-* ide_generic\nalias block-major-37-* ide_tape\nalias block-major-44-* ftl\nalias block-major-46-* pcd\nalias block-major-47-* pf\nalias block-major-56-* ide_generic\nalias block-major-57-* ide_generic\nalias block-major-58-* lvm_mod\nalias block-major-88-* ide_generic\nalias block-major-89-* ide_generic\nalias block-major-90-* ide_generic\nalias block-major-91-* ide_generic\nalias block-major-93-* nftl\nalias block-major-97-* pg\n\n# character devices ##########################################################\nalias char-major-9-* st\nalias char-major-10-1 psmouse\nalias char-major-10-139 openprom\nalias char-major-10-157 applicom\nalias char-major-10-181 toshiba\nalias char-major-10-183 hw_random\nalias char-major-10-187 irnet\nalias char-major-10-189 ussp\nalias char-major-10-250 hci_vhci\nalias char-major-13-0  joydev\nalias char-major-13-1  joydev\nalias char-major-13-2  joydev\nalias char-major-13-3  joydev\nalias char-major-13-32 mousedev\nalias char-major-13-33 mousedev\nalias char-major-13-34 mousedev\nalias char-major-13-35 mousedev\nalias char-major-13-63 mousedev\nalias char-major-13-64 evdev\nalias char-major-13-65 evdev\nalias char-major-13-66 evdev\nalias char-major-13-67 evdev\nalias char-major-19-* cyclades\nalias char-major-20-* cyclades\nalias char-major-22-* pcxx\nalias char-major-23-* pcxx\nalias char-major-27-* ftape\nalias char-major-34-* scc\nalias char-major-35-* tclmidi\nalias char-major-48-* riscom8\nalias char-major-49-* riscom8\nalias char-major-57-* esp\nalias char-major-58-* esp\nalias char-major-63-* kdebug\nalias char-major-67-* coda\nalias char-major-75-* specialix\nalias char-major-76-* specialix\nalias char-major-81-* videodev\nalias char-major-83-* vtx\nalias char-major-89-* i2c_dev\nalias char-major-90-* mtdchar\nalias char-major-96-* pt\nalias char-major-97-* pg\nalias char-major-107-* 3dfx\nalias char-major-109-* lvm_mod\nalias char-major-166-* cdc_acm\nalias char-major-171-0 raw1394\nalias char-major-171-1 video1394\nalias char-major-171-2 dv1394\nalias char-major-171-3 amdtp\nalias char-major-180-* usbcore\nalias char-major-195-* nvidia\nalias char-major-200-* vxspec\nalias char-major-202-* msr\nalias char-major-203-* cpuid\nalias char-major-206-* osst\nalias char-major-208-* ussp\nalias char-major-227-* tub3270\n#alias char-major-240-* usb-serial\n#alias char-major-240-* hsfserial\n#alias char-major-241-* hsfserial\n\n# misc #######################################################################\nalias xfrm-type-2-4 xfrm4_tunnel\nalias xfrm-type-2-50 esp4\nalias xfrm-type-2-51 ah4\nalias xfrm-type-2-108 ipcomp\nalias xfrm-type-10-41 xfrm6_tunnel\nalias xfrm-type-10-50 esp6\nalias xfrm-type-10-51 ah6\nalias xfrm-type-10-108 ipcomp6\n\nalias bt-proto-0 l2cap\nalias bt-proto-2 sco\nalias bt-proto-3 rfcomm\nalias bt-proto-4 bnep\nalias bt-proto-5 cmtp\nalias bt-proto-6 hidp\nalias bt-proto-7 avdtp\n\nalias cipcb0 cipcb\nalias cipcb1 cipcb\nalias cipcb2 cipcb\nalias cipcb3 cipcb\nalias dummy0 dummy\nalias dummy1 dummy\nalias plip0 plip\nalias plip1 plip\nalias slip0 slip\nalias slip1 slip\nalias tunl0 ipip\nalias gre0 ip_gre\n\nalias usbdevfs usbcore\n\n# work around other kernel issues ############################################\n# The EHCI driver should be loaded before the ones for low speed controllers\n# or some devices may be confused when they are disconnected and reconnected.\nsoftdep uhci-hcd pre: ehci-hcd\nsoftdep ohci-hcd pre: ehci-hcd\n"
  },
  {
    "path": "packages/sysutils/kmod/modprobe.d/i2c.conf",
    "content": "alias char-major-89 i2c-dev\n"
  },
  {
    "path": "packages/sysutils/kmod/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"kmod\"\nPKG_VERSION=\"30\"\nPKG_SHA256=\"f897dd72698dc6ac1ef03255cd0a5734ad932318e4adbaebc7338ef2f5202f9f\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git\"\nPKG_URL=\"https://www.kernel.org/pub/linux/utils/kernel/kmod/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"kmod offers the needed flexibility and fine grained control over insertion, removal, configuration and listing of kernel modules.\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--enable-tools \\\n                         --disable-logging \\\n                         --disable-debug \\\n                         --disable-manpages \\\n                         --with-gnu-ld \\\n                         --without-xz \\\n                         --without-zlib \\\n                         --without-zstd\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-tools \\\n                           --enable-logging \\\n                           --disable-debug \\\n                           --disable-manpages \\\n                           --with-gnu-ld \\\n                           --without-xz \\\n                           --without-zlib \\\n                           --without-zstd\"\n\npost_makeinstall_host() {\n  ln -sf kmod ${TOOLCHAIN}/bin/depmod\n}\n\npost_makeinstall_target() {\n# make symlinks for compatibility\n  mkdir -p ${INSTALL}/usr/sbin\n    ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/lsmod\n    ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/insmod\n    ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/rmmod\n    ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/modinfo\n    ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/modprobe\n    ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/depmod\n\n  mkdir -p ${INSTALL}/etc\n    ln -sf /storage/.config/modprobe.d ${INSTALL}/etc/modprobe.d\n\n# add user modprobe.d dir\n  mkdir -p ${INSTALL}/usr/config/modprobe.d\n}\n"
  },
  {
    "path": "packages/sysutils/kmod/patches/kmod-02_fix-pkgconf.patch",
    "content": "From 19b848e18e0eaaec75d3d840b5831b82f7c6b5b5 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Sat, 16 Aug 2014 13:39:55 +0300\nSubject: [PATCH] fix pkgconf\n\n---\n libkmod/libkmod.pc.in |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/libkmod/libkmod.pc.in b/libkmod/libkmod.pc.in\nindex e4fdf21..c4f1465 100644\n--- a/libkmod/libkmod.pc.in\n+++ b/libkmod/libkmod.pc.in\n@@ -1,7 +1,7 @@\n prefix=@prefix@\n-exec_prefix=@exec_prefix@\n-libdir=@libdir@\n-includedir=@includedir@\n+exec_prefix=${prefix}\n+libdir=${exec_prefix}/lib\n+includedir=${prefix}/include\n \n Name: libkmod\n Description: Library to deal with kernel modules\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/sysutils/libdevmapper/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"libdevmapper\"\nPKG_VERSION=\"2.03.23\"\nPKG_SHA256=\"74e794a9e9dee1bcf8a2065f65b9196c44fdf321e22d63b98ed7de8c9aa17a5d\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPLv2 LGPL2.1\"\nPKG_SITE=\"https://sourceware.org/lvm2\"\nPKG_URL=\"https://sourceware.org/ftp/lvm2/LVM2.$PKG_VERSION.tgz\"\nPKG_SOURCE_DIR=\"LVM2.$PKG_VERSION\"\nPKG_DEPENDS_TARGET=\"toolchain libaio util-linux\"\nPKG_SECTION=\"sysutils\"\nPKG_SHORTDESC=\"Logical Volume Manager 2 - only libdevmapper library.\"\nPKG_BUILD_FLAGS=\"-gold\"\n\nLVM2_CONFIG_DEFAULT=\"ac_cv_func_malloc_0_nonnull=yes \\\n                     ac_cv_func_realloc_0_nonnull=yes \\\n                     --disable-use-lvmlockd \\\n                     --disable-selinux \\\n                     --disable-dbus-service \\\n                     --with-cache=none \\\n                     --with-thin=none \\\n                     --with-clvmd=none \\\n                     --with-cluster=none\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"$LVM2_CONFIG_DEFAULT \\\n                           --with-optimisation=-Os \\\n                           --disable-readline \\\n                           --disable-applib \\\n                           --disable-cmdlib \\\n                           --disable-blkid_wiping \\\n                           --disable-use-lvmetad \\\n                           --with-mirrors=none \\\n                           --disable-use-lvmpolld \\\n                           --disable-dmeventd \\\n                           --disable-dmfilemapd \\\n                           --disable-blkdeactivate \\\n                           --disable-udev_sync \\\n                           --disable-udev_rules \\\n                           --disable-pkgconfig \\\n                           --disable-fsadm \\\n                           --disable-nls\"\n\nPKG_MAKEINSTALL_OPTS_TARGET=\"install_dynamic \\\n                             install_include \\\n                             -C libdm\"\n\nmakeinstall_target() {\n  make install DESTDIR=${SYSROOT_PREFIX} -j1 \\\n    ${PKG_MAKEINSTALL_OPTS_TARGET} M_INSTALL_PROGRAM=\"-m 755\"\n\n  make install DESTDIR=${INSTALL} \\\n    ${PKG_MAKEINSTALL_OPTS_TARGET} M_INSTALL_PROGRAM=\"-m 755\"\n}\n"
  },
  {
    "path": "packages/sysutils/libevdev/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libevdev\"\nPKG_VERSION=\"1.13.0\"\nPKG_SHA256=\"9edf2006cc86a5055279647c38ec923d11a821ee4dc2c3033e8d20e8ee237cd9\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"http://www.freedesktop.org/wiki/Software/libevdev/\"\nPKG_URL=\"http://www.freedesktop.org/software/libevdev/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"libevdev is a wrapper library for evdev devices.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_MESON_OPTS_TARGET=\" \\\n  -Ddefault_library=shared \\\n  -Ddocumentation=disabled \\\n  -Dtests=disabled\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/sysutils/libhid/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libhid\"\nPKG_VERSION=\"9bbcb6484c91e2594614412e12ae85a144839634\" # 0.2.17 + fixes\nPKG_SHA256=\"983c6fa0b46b67805a81eb600a6c4728b645ac7b014b4897d5aa212576105567\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://libhid.alioth.debian.org/\"\nPKG_URL=\"https://github.com/chad3814/libhid/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libusb-compat libusb\"\nPKG_LONGDESC=\"libhid provides a generic and flexible way to access and interact with USB HID devices.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-shared \\\n            --enable-static \\\n            --disable-werror \\\n            --disable-swig\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr\n}\n"
  },
  {
    "path": "packages/sysutils/libhid/patches/libhid-0.2.16-automake-1.13.patch",
    "content": "diff -Naur libhid-0.2.16/configure.ac libhid-0.2.16.patch/configure.ac\n--- libhid-0.2.16/configure.ac\t2007-04-01 22:32:10.000000000 +0200\n+++ libhid-0.2.16.patch/configure.ac\t2013-01-12 17:23:25.129691249 +0100\n@@ -21,7 +21,7 @@\n \n AC_INIT(MD_INIT_NAME, MD_INIT_VERSION, MD_INIT_ADDRESS)\n \n-AM_CONFIG_HEADER([config.h])\n+AC_CONFIG_HEADERS([config.h])\n AC_CONFIG_SRCDIR([include/hid.h])\n AC_CONFIG_AUX_DIR([.])\n \n"
  },
  {
    "path": "packages/sysutils/libhid/patches/libhid-disable_docs.patch",
    "content": "--- a/doc/Makefile.am\t2014-12-23 16:37:21.000000000 +0000\n+++ b/doc/Makefile.am\t2020-12-27 02:49:58.084611309 +0000\n@@ -1,7 +1,7 @@\n # AM_MAKEFLAGS = @MAKEFLAGS@\n ACLOCAL_AMFLAGS = -I m4\n \n-SUBDIRS = www man\n+SUBDIRS =\n \n if DOXYGEN\n all-local: html\n"
  },
  {
    "path": "packages/sysutils/libhid/patches/libhid-use_pkgconfig.patch",
    "content": "diff -Naur libhid-0.2.16/m4/md_check_libusb018b.m4 libhid-0.2.16.patch/m4/md_check_libusb018b.m4\n--- libhid-0.2.16/m4/md_check_libusb018b.m4\t2004-05-26 02:37:41.000000000 +0200\n+++ libhid-0.2.16.patch/m4/md_check_libusb018b.m4\t2016-01-10 00:07:24.000000000 +0100\n@@ -2,8 +2,8 @@\n   [\n     AC_CHECK_HEADERS([usb.h])\n \n-    LIBUSB_CFLAGS=\"`libusb-config --cflags`\"\n-    LIBUSB_LIBS=\"`libusb-config --libs`\"\n+    LIBUSB_CFLAGS=\"`pkg-config --cflags libusb`\"\n+    LIBUSB_LIBS=\"`pkg-config --libs libusb`\"\n \n     AC_SUBST(LIBUSB_CFLAGS)\n     AC_SUBST(LIBUSB_LIBS)\n"
  },
  {
    "path": "packages/sysutils/libusb/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libusb\"\nPKG_VERSION=\"1.0.26\"\nPKG_SHA256=\"12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5\"\nPKG_LICENSE=\"LGPLv2.1\"\nPKG_SITE=\"http://libusb.info/\"\nPKG_URL=\"https://github.com/libusb/libusb/releases/download/v${PKG_VERSION}/libusb-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain systemd\"\nPKG_LONGDESC=\"The libusb project's aim is to create a Library for use by user level applications to USB devices.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-shared \\\n            --enable-static \\\n            --disable-log \\\n            --disable-debug-log \\\n            --enable-udev \\\n            --disable-examples-build\"\n"
  },
  {
    "path": "packages/sysutils/libusb-compat/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"libusb-compat\"\nPKG_VERSION=\"0.1.7\"\nPKG_SHA256=\"8259f8d5b084fe43c47823a939e955e0ba21942b8d112266c39d228cc14764d6\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/libusb/libusb-compat-0.1\"\nPKG_URL=\"https://github.com/libusb/libusb-compat-0.1/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libusb\"\nPKG_LONGDESC=\"The libusb project's aim is to create a Library for use by user level applications to USB devices.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-log \\\n                           --disable-debug-log \\\n                           --disable-examples-build\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n  sed -e \"s:\\(['= ]\\)/usr:\\\\1${SYSROOT_PREFIX}/usr:g\" -i ${SYSROOT_PREFIX}/usr/bin/libusb-config\n}\n"
  },
  {
    "path": "packages/sysutils/lirc/config/lirc_options.conf",
    "content": "# These are the default options to lircd, if installed as\n# /etc/lirc/lirc_options.conf. See the lircd(8) and lircmd(8)\n# manpages for info on the different options.\n#\n# Some tools including mode2 and irw uses values such as\n# driver, device, plugindir and loglevel as fallback values\n# in not defined elsewhere.\n\n[lircd]\nnodaemon        = False\ndriver          = default\ndevice          = /dev/lirc0\noutput          = /run/lirc/lircd.socket\npidfile         = /run/lirc/lircd.pid\nplugindir       = /usr/lib/lirc/plugins\npermission      = 666\nallow-simulate  = No\nrepeat-max      = 600\n#effective-user =\n#listen         = [address:]port\n#connect        = host[:port]\n#loglevel       = 6\n#release        = true\n#release_suffix = _EVUP\n\n#logfile        = ...\n\n[lircmd]\nuinput          = False\nnodaemon        = False\n\n# modinit is not supported in LibreELEC\n\n# [modinit]\n# code = /usr/sbin/modprobe lirc_serial\n# code1 = /usr/bin/setfacl -m g:lirc:rw /dev/uinput\n# code2 = ...\n\n\n# [lircd-uinput]\n# add-release-events = False\n# release-timeout    = 200\n# release-suffix     = _EVUP\n"
  },
  {
    "path": "packages/sysutils/lirc/default.d/lircd.conf",
    "content": ""
  },
  {
    "path": "packages/sysutils/lirc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"lirc\"\nPKG_VERSION=\"0.10.2\"\nPKG_SHA256=\"3d44ec8274881cf262f160805641f0827ffcc20ade0d85e7e6f3b90e0d3d222a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.lirc.org\"\nPKG_URL=\"https://sourceforge.net/projects/lirc/files/LIRC/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libftdi1 libusb-compat libxslt alsa-lib\"\nPKG_LONGDESC=\"LIRC is a package that allows you to decode and send infra-red signals.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-devinput \\\n                           --enable-uinput \\\n                           --with-gnu-ld \\\n                           --without-x \\\n                           --runstatedir=/run\"\n\npre_configure_target() {\n  export HAVE_WORKING_POLL=yes\n  export HAVE_UINPUT=yes\n  export PYTHON=:\n  export PYTHON_VERSION=${PKG_PYTHON_VERSION#python}\n  if [ -e ${SYSROOT_PREFIX}/usr/include/linux/input-event-codes.h ]; then\n    export DEVINPUT_HEADER=${SYSROOT_PREFIX}/usr/include/linux/input-event-codes.h\n  else\n    export DEVINPUT_HEADER=${SYSROOT_PREFIX}/usr/include/linux/input.h\n  fi\n}\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/lib/systemd\n  rm -rf ${INSTALL}/lib\n  rm -rf ${INSTALL}/usr/share\n  rm -rf ${INSTALL}/etc\n\n  mkdir -p ${INSTALL}/etc/lirc\n    cp -r ${PKG_DIR}/config/lirc_options.conf ${INSTALL}/etc/lirc\n    ln -s /storage/.config/lircd.conf ${INSTALL}/etc/lirc/lircd.conf\n\n  mkdir -p ${INSTALL}/usr/lib/libreelec\n    cp ${PKG_DIR}/scripts/lircd_helper ${INSTALL}/usr/lib/libreelec\n    cp ${PKG_DIR}/scripts/lircd_uinput_helper ${INSTALL}/usr/lib/libreelec\n\n  mkdir -p ${INSTALL}/usr/share/services\n    cp -P ${PKG_DIR}/default.d/*.conf ${INSTALL}/usr/share/services\n}\n\npost_install() {\n  enable_service lircd.socket\n  enable_service lircd.service\n  enable_service lircd-uinput.service\n}\n"
  },
  {
    "path": "packages/sysutils/lirc/patches/lirc-0001-fix-zotac-poll.patch",
    "content": "From 79e2494e4880d0446bf837c8bbca0b01baac4ed4 Mon Sep 17 00:00:00 2001\nFrom: Matthias Reichl <hias@horus.com>\nDate: Wed, 8 Apr 2020 11:27:11 +0200\nSubject: [PATCH] plugins/zotac: fix poll timeout\n\npoll requires a negative timeout value for infinite waits.\nSee https://sourceforge.net/p/lirc/tickets/327/\n\nSigned-off-by: Matthias Reichl <hias@horus.com>\n---\n plugins/zotac.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/plugins/zotac.c b/plugins/zotac.c\nindex ac528c67..4a66acf5 100644\n--- a/plugins/zotac.c\n+++ b/plugins/zotac.c\n@@ -352,7 +352,7 @@ static void* zotac_repeat(void* arg)\n \t\tif (pressed)\n \t\t\tsel = curl_poll(&pfd, 1, delay_ms);\n \t\telse\n-\t\t\tsel = curl_poll(&pfd, 1, 0);\n+\t\t\tsel = curl_poll(&pfd, 1, -1);\n \t\tswitch (sel) {\n \t\tcase 1:\n \t\t\t// Data ready in device's file\n-- \n2.20.1\n\n"
  },
  {
    "path": "packages/sysutils/lirc/patches/lirc-0100-disable-python.patch",
    "content": "diff --git a/Makefile.am b/Makefile.am\nindex 9f3dd143..9619a6eb 100644\n--- a/Makefile.am\n+++ b/Makefile.am\n@@ -5,7 +5,9 @@ ACLOCAL_AMFLAGS         = -I m4\n AUTOMAKE_OPTIONS        = 1.5 check-news dist-bzip2 -Wno-portability \\\n                           subdir-objects\n \n+if HAVE_PYTHON\n include                 pylint.mak\n+endif\n \n GIT_COMMIT      = $(shell git log -1 --pretty=format:%h || echo UNKNOWN)\n GIT_DATE        = $(shell git log -1 --pretty=format:%cd || echo UNKNOWN)\n@@ -34,13 +36,17 @@ MANTAINERCLEANFILES     = config.sub install-sh depcomp py-compile \\\n AM_DISTCHECK_CONFIGURE_FLAGS = \\\n     --with-systemdsystemunitdir=$${dc_install_base}/lib/systemd/system\n \n+if HAVE_PYTHON\n BUILT_SOURCES           = paths.h python-pkg/lirc/config.py python-pkg/VERSION\n+else\n+BUILT_SOURCES           = paths.h\n+endif\n \n if WITH_SYSTEMDSYSTEMUNITDIR\n     SYSTEMD_DIR         = systemd\n endif\n \n-SUBDIRS                 = lib daemons tools plugins configs doc $(SYSTEMD_DIR)\n+SUBDIRS                 = lib daemons tools plugins $(SYSTEMD_DIR)\n \n if INSTALL_ETC\n \n@@ -61,7 +67,9 @@ endif\n \n dist_doc_DATA           = VERSION\n \n+if HAVE_PYTHON\n nodist_pkgdata_DATA     = $(PYTHON_TARBALL)\n+endif\n \n pkgconfigdir            = $(libdir)/pkgconfig\n dist_pkgconfig_DATA     = lirc.pc lirc-driver.pc\n@@ -71,6 +79,7 @@ nobase_header_HEADERS   = include/media/lirc.h \\\n                           include/linux/input-event-codes.h\n header_HEADERS          = drivers/irpipe/irpipe.h\n \n+if HAVE_PYTHON\n py_pkgdir               = $(pkgdatadir)/python-pkg\n dist_py_pkg_DATA        = python-pkg/setup.py \\\n                           python-pkg/README.rst\n@@ -134,6 +143,8 @@ all-local:\n \t    $(if $(VERBOSE),,-q) build\n endif\n \n+endif\n+\n install-data-hook:\n \t$(SED) -i -e '/^plugindir/s|/usr/lib|$(libdir)|' \\\n \t    $(DESTDIR)$(lirc_confdir)/lirc_options.conf\n@@ -170,6 +181,7 @@ fix-version: .phony\n \t$(SED) -i '/DATE/s/=.*/=\"$(GIT_DATE)\"/' $(distdir)/VERSION\n \t$(SED) -i '/REFS/s|=.*|=\"$(GIT_REFS)\"|' $(distdir)/VERSION\n \n+if HAVE_PYTHON\n $(abs_builddir)/python-pkg/setup.py:\n \tcp -ar $(top_srcdir)/python-pkg  $(abs_builddir)\n \tchmod -R u+w  python-pkg\n@@ -193,6 +205,7 @@ python-pkg/lirc/config.py: Makefile  $(abs_builddir)/python-pkg/setup.py\n \t@echo 'DOCDIR=\"$(docdir)\"' >>$@\n \t@echo 'MODINFO=\"$(MODINFO)\"' >>$@\n \t@echo 'VERSION=\"$(VERSION)\"' >>$@\n+endif\n \n paths.h: Makefile\n \t@echo \"#ifndef PATHS_H\"          >paths.h\ndiff --git a/configure.ac b/configure.ac\nindex 58347d88..48ce5629 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -43,7 +43,8 @@ AC_CHECK_PROG([DOXYGEN],[doxygen],[yes],[no])\n AM_CONDITIONAL(HAVE_DOXYGEN, test x$DOXYGEN = xyes)\n LT_INIT([disable-static])\n \n-AM_PATH_PYTHON([3.1],,)\n+AM_PATH_PYTHON([3.1],,[:])\n+AM_CONDITIONAL([HAVE_PYTHON], [test \"$PYTHON\" != :])\n PKG_CHECK_MODULES([PYTHON],[python-${PYTHON_VERSION}m],,[true])\n test -z \"$PYTHON_LIBS\" && \\\n     PKG_CHECK_MODULES([PYTHON], [python-$PYTHON_VERSION],,[true])\n@@ -580,6 +581,7 @@ AX_REPORT_CONDITIONAL([DEVEL])\n AX_REPORT_CONDITIONAL([LINUX_KERNEL])\n AX_REPORT_CONDITIONAL([HAVE_DEVINPUT])\n AX_REPORT_CONDITIONAL([WITH_SYSTEMDSYSTEMUNITDIR])\n+AX_REPORT_CONDITIONAL([HAVE_PYTHON])\n AX_REPORT_CONDITIONAL([HAVE_PYTHON35])\n \n echo\ndiff --git a/tools/Makefile.am b/tools/Makefile.am\nindex abfb9911..8aff1cff 100644\n--- a/tools/Makefile.am\n+++ b/tools/Makefile.am\n@@ -71,12 +71,17 @@ xmode2_SOURCES          = xmode2.cpp\n xmode2_LDADD            = @X_LIBS@ @X_PRE_LIBS@ -lX11 @X_EXTRA_LIBS@ \\\n                           $(LIRC_LIBS)\n \n+if HAVE_PYTHON\n dist_bin_SCRIPTS        = lirc-config-tool lirc-init-db\n+else\n+dist_bin_SCRIPTS\t=\n+endif\n \n if HAVE_DEVINPUT\n dist_bin_SCRIPTS        += lirc-make-devinput\n endif\n \n+if HAVE_PYTHON\n dist_bin_SCRIPTS        += pronto2lirc irdb-get irtext2udp lirc-postinstall\n dist_sbin_SCRIPTS       = lircd-setup\n dist_noinst_SCRIPTS     = make_rel_symlink.py check_configs.py\n@@ -121,6 +126,7 @@ install-data-hook:\n \t$(PYTHON) $(srcdir)/make_rel_symlink.py \\\n \t    $(DESTDIR)/$(pkgdatadir)/configs \\\n \t        $(DESTDIR)/$(setupdir)/configs\n+endif\n \n uninstall-hook:\n \trm -f $(DESTDIR)/$(bindir)/lirc-setup \\\n"
  },
  {
    "path": "packages/sysutils/lirc/scripts/lircd_helper",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2017 Matthias Reichl (hias@horus.com)\n\nif [ -e \"/storage/.config/lirc_options.conf\" ] ; then\n\tLIRCD_OPTIONS=\"-O /storage/.config/lirc_options.conf\"\nfi\n\nexec /usr/sbin/lircd $LIRCD_OPTIONS \"$@\" /storage/.config/lircd.conf\n"
  },
  {
    "path": "packages/sysutils/lirc/scripts/lircd_uinput_helper",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2017 Matthias Reichl (hias@horus.com)\n\nif [ -e \"/storage/.config/lirc_options.conf\" ] ; then\n\tLIRCD_OPTIONS=\"-O /storage/.config/lirc_options.conf\"\nfi\n\nexec /usr/sbin/lircd-uinput $LIRCD_OPTIONS \"$@\"\n"
  },
  {
    "path": "packages/sysutils/lirc/system.d/lircd-uinput.service",
    "content": "[Unit]\nDocumentation=http://lirc.org/html/configure.html\nDescription=Forward LIRC button presses as uinput events\nConditionPathExists=/storage/.config/lircd.conf\nAfter=lircd.service\n\n[Service]\nType=simple\nExecStart=/usr/lib/libreelec/lircd_uinput_helper --add-release-events\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/sysutils/lirc/system.d/lircd.service",
    "content": "[Unit]\nDocumentation=http://lirc.org/html/configure.html\nDescription=Flexible IR remote input/output application support\nConditionPathExists=/storage/.config/lircd.conf\nAfter=network.target\n\n[Service]\nType=simple\nExecStart=/usr/lib/libreelec/lircd_helper --nodaemon\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/sysutils/lirc/system.d/lircd.socket",
    "content": "[Socket]\nListenStream=/run/lirc/lircd.socket\n\n[Install]\nWantedBy=sockets.target\nAlso=lircd.service\n"
  },
  {
    "path": "packages/sysutils/lirc/tmpfiles.d/z_61_lirc.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nd    /run/lirc         0755 root root - -\n"
  },
  {
    "path": "packages/sysutils/ntfs-3g_ntfsprogs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ntfs-3g_ntfsprogs\"\nPKG_VERSION=\"2021.8.22\"\nPKG_SHA256=\"5cb9fa93bf2b9685e3f1b598861f6082786e76562989a5752c7379dbe0e989a2\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/tuxera/ntfs-3g\"\nPKG_URL=\"https://github.com/tuxera/ntfs-3g/archive/refs/tags/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain fuse libgcrypt\"\nPKG_LONGDESC=\"A NTFS driver with read and write support.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+lto\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--exec-prefix=/usr/ \\\n                           --disable-dependency-tracking \\\n                           --disable-library \\\n                           --enable-posix-acls \\\n                           --enable-mtab \\\n                           --enable-ntfsprogs \\\n                           --disable-crypto \\\n                           --with-fuse=external \\\n                           --with-uuid\"\n\npost_makeinstall_target() {\n  # dont include ntfsprogs.\n  for i in ${INSTALL}/usr/bin/*; do\n    if [ \"$(basename ${i})\" != \"ntfs-3g\" ]; then\n      rm ${i}\n    fi\n  done\n\n  rm -rf ${INSTALL}/sbin\n  rm -rf ${INSTALL}/usr/sbin/ntfsclone\n  rm -rf ${INSTALL}/usr/sbin/ntfscp\n  rm -rf ${INSTALL}/usr/sbin/ntfsundelete\n\n  mkdir -p ${INSTALL}/usr/sbin\n    ln -sf /usr/bin/ntfs-3g ${INSTALL}/usr/sbin/mount.ntfs\n    ln -sf /usr/sbin/mkntfs ${INSTALL}/usr/sbin/mkfs.ntfs\n}\n"
  },
  {
    "path": "packages/sysutils/open-iscsi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2012 Yann Cézard (eesprit@free.fr)\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"open-iscsi\"\nPKG_VERSION=\"bf399411ed8a2f4047f928653ac8dd02ffd0f662\"\nPKG_SHA256=\"92b9f0a27a9a373b14eab7b12f1bfff5d4857695a688dc4434df8e7623354588\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/mikechristie/open-iscsi\"\nPKG_URL=\"https://github.com/mikechristie/open-iscsi/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_INIT=\"toolchain util-linux\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain open-iscsi:host\"\nPKG_LONGDESC=\"The open-iscsi package allows you to mount iSCSI targets.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_BUILD_FLAGS=\"-sysroot\"\n\nPKG_MAKE_OPTS_INIT=\"user\"\n\nPKG_MAKE_OPTS_TARGET=\"user\"\n\npre_configure_init() {\n  export OPTFLAGS=\"${CFLAGS} ${LDFLAGS}\"\n}\n\nconfigure_init() {\n  cd utils/open-isns\n    ./configure --host=${TARGET_NAME} \\\n                --build=${HOST_NAME} \\\n                --with-security=no\n  cd ../..\n}\n\nmakeinstall_init() {\n  mkdir -p ${INSTALL}/usr/sbin\n    cp -P ${PKG_BUILD}/usr/iscsistart ${INSTALL}/usr/sbin\n}\n\npre_configure_host() {\n  export OPTFLAGS=\"${CFLAGS} ${LDFLAGS}\"\n}\n\nconfigure_host() {\n  :\n}\n\nmake_host() {\n  cd ${PKG_BUILD}/utils\n  make iscsi-iname\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp -P ${PKG_BUILD}/utils/iscsi-iname ${TOOLCHAIN}/bin\n}\n\npre_configure_target() {\n  export OPTFLAGS=\"${CFLAGS} ${LDFLAGS}\"\n}\n\nconfigure_target() {\n  cd utils/open-isns\n    ./configure --host=${TARGET_NAME} \\\n                --build=${HOST_NAME} \\\n                --with-security=no\n\n  cd ${PKG_BUILD}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/sbin\n    cp -P ${PKG_BUILD}/usr/iscsid ${INSTALL}/usr/sbin\n    cp -P ${PKG_BUILD}/usr/iscsiadm ${INSTALL}/usr/sbin\n    cp -P ${PKG_BUILD}/usr/iscsistart ${INSTALL}/usr/sbin\n    cp -P ${PKG_BUILD}/utils/iscsi-iname ${INSTALL}/usr/sbin\n\n  mkdir -p ${INSTALL}/etc/iscsi\n    cp -P ${PKG_BUILD}/etc/iscsid.conf ${INSTALL}/etc/iscsi\n\n    sed -i -e \"s:= /sbin/iscsid:= /usr/sbin/iscsid:\" ${INSTALL}/etc/iscsi/iscsid.conf\n\n    echo \"InitiatorName=$(${TOOLCHAIN}/bin/iscsi-iname)\" > ${INSTALL}/etc/iscsi/initiatorname.iscsi\n}\n\npost_install() {\n  enable_service iscsi-initiator.service\n}\n"
  },
  {
    "path": "packages/sysutils/open-iscsi/patches/open-iscsi-01_dynamic_linked_iscsistart.patch",
    "content": "--- a/usr/Makefile\t2011-08-05 11:54:52.000000000 +0200\n+++ b/usr/Makefile\t2011-08-05 11:55:06.000000000 +0200\n@@ -63,7 +63,7 @@\n \n iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \\\n \t\tiscsistart.o statics.o\n-\t$(CC) $(CFLAGS) -static $^ -o $@\n+\t$(CC) $(CFLAGS) $^ -o $@\n clean:\n \trm -f *.o $(PROGRAMS) .depend $(LIBSYS)\n \n"
  },
  {
    "path": "packages/sysutils/open-iscsi/patches/open-iscsi-02-cross_compile.patch",
    "content": "diff --git a/usr/Makefile b/usr/Makefile\nindex fd14a10..41b7140 100644\n--- a/usr/Makefile\n+++ b/usr/Makefile\n@@ -66,6 +66,6 @@ clean:\n \trm -f *.o $(PROGRAMS) .depend $(LIBSYS)\n \n depend:\n-\tgcc $(CFLAGS) -M `ls *.c` > .depend\n+\t$(CC) $(CFLAGS) -M `ls *.c` > .depend\n \n -include .depend\ndiff --git a/utils/Makefile b/utils/Makefile\nindex 2c7e891..440e24e 100644\n--- a/utils/Makefile\n+++ b/utils/Makefile\n@@ -12,6 +12,6 @@ clean:\n \trm -f *.o $(PROGRAMS) .depend\n \n depend:\n-\tgcc $(CFLAGS) -M `ls *.c` > .depend\n+\t$(CC) $(CFLAGS) -M `ls *.c` > .depend\n \n -include .depend\ndiff --git a/utils/fwparam_ibft/Makefile b/utils/fwparam_ibft/Makefile\nindex c72bb7f..3d2c2a5 100644\n--- a/utils/fwparam_ibft/Makefile\n+++ b/utils/fwparam_ibft/Makefile\n@@ -38,6 +38,6 @@ clean:\n $(OBJS): prom_parse.tab.h prom_parse.h fwparam_ibft.h\n \n depend:\n-\tgcc $(CFLAGS) -M `ls *.c` > .depend\n+\t$(CC) $(CFLAGS) -M `ls *.c` > .depend\n \n -include .depend\ndiff --git a/utils/open-isns/Makefile.in b/utils/open-isns/Makefile.in\nindex a27199c..a76649f 100644\n--- a/utils/open-isns/Makefile.in\n+++ b/utils/open-isns/Makefile.in\n@@ -73,9 +73,9 @@ distclean::\n \trm -rf autom4te.cache\n \n $(LIB): $(LIBOBJS)\n-\tar cr $@ $(LIBOBJS)\n+\t$(AR) cr $@ $(LIBOBJS)\n \n depend:\n-\tgcc $(CFLAGS) -M `ls *.c` > .depend\n+\t$(CC) $(CFLAGS) -M `ls *.c` > .depend\n \n -include .depend\ndiff --git a/utils/sysdeps/Makefile b/utils/sysdeps/Makefile\nindex 53c10e5..effe013 100644\n--- a/utils/sysdeps/Makefile\n+++ b/utils/sysdeps/Makefile\n@@ -10,6 +10,6 @@ clean:\n \trm -f *.o .depend\n \n depend:\n-\tgcc $(CFLAGS) -M `ls *.c` > .depend\n+\t$(CC) $(CFLAGS) -M `ls *.c` > .depend\n \n -include .depend\n"
  },
  {
    "path": "packages/sysutils/open-iscsi/patches/open-iscsi-03_enable-multicast.patch",
    "content": "From d5b4400d2c50190474a6000d60f05deb95f97e0b Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Thu, 8 Aug 2013 18:08:44 +0300\nSubject: [PATCH] enable multicast\n\nsource: https://groups.google.com/forum/#!msg/open-iscsi/nuLFqxgsHAA/53-JE3gNNjEJ\n---\n usr/iscsi_net_util.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/usr/iscsi_net_util.c b/usr/iscsi_net_util.c\nindex 6d0ebf9..3801ac7 100644\n--- a/usr/iscsi_net_util.c\n+++ b/usr/iscsi_net_util.c\n@@ -229,7 +229,7 @@ int net_setup_netdev(char *netdev, char *local_ip, char *mask, char *gateway,\n \t\t/* Bring up interface */\n \t\tmemset(&ifr, 0, sizeof(ifr));\n \t\tstrlcpy(ifr.ifr_name, netdev, IFNAMSIZ);\n-\t\tifr.ifr_flags = IFF_UP | IFF_RUNNING;\n+\t\tifr.ifr_flags = IFF_UP | IFF_RUNNING | IFF_MULTICAST;\n \t\tif (ioctl(sock, SIOCSIFFLAGS, &ifr) < 0) {\n \t\t\tlog_error(\"Could not bring up netdev %s (err %d - %s)\",\n \t\t\t\t  netdev, errno, strerror(errno));\n-- \n1.8.1.2\n\n"
  },
  {
    "path": "packages/sysutils/open-iscsi/patches/open-iscsi-04-no_iscsiuio.patch",
    "content": "diff -Naur open-iscsi-bf39941/Makefile open-iscsi-bf39941.patch/Makefile\n--- open-iscsi-bf39941/Makefile\t2013-08-08 17:06:46.000000000 +0200\n+++ open-iscsi-bf39941.patch/Makefile\t2013-08-08 18:02:13.009068581 +0200\n@@ -26,20 +26,18 @@\n \n all: user\n \n-user: utils/open-isns/Makefile iscsiuio/Makefile\n+user: utils/open-isns/Makefile\n \t$(MAKE) -C utils/open-isns\n \t$(MAKE) -C utils/sysdeps\n \t$(MAKE) -C utils/fwparam_ibft\n \t$(MAKE) -C usr\n \t$(MAKE) -C utils\n-\t$(MAKE) -C iscsiuio\n \t@echo\n \t@echo \"Compilation complete                 Output file\"\n \t@echo \"-----------------------------------  ----------------\"\n \t@echo \"Built iSCSI daemon:                  usr/iscsid\"\n \t@echo \"Built management application:        usr/iscsiadm\"\n \t@echo \"Built boot tool:                     usr/iscsistart\"\n-\t@echo \"Built iscsiuio daemon:               iscsiuio/src/unix/iscsiuio\"\n \t@echo\n \t@echo \"Read README file for detailed information.\"\n \n"
  },
  {
    "path": "packages/sysutils/open-iscsi/patches/open-iscsi-05-Updates-to-support-gcc-fno-common-option.patch",
    "content": "From a8ce860b4462fbb22634c34a5d30cd0d482acb22 Mon Sep 17 00:00:00 2001\nFrom: Lee Duncan <lduncan@suse.com>\nDate: Tue, 28 Jan 2020 16:36:56 -0800\nSubject: [PATCH] Updates to support gcc -fno-common option.\n\nThis meant cleaning up the definition of some\nglobal variables, so that they were only defined\nin one place and refered to as external elsewhere.\n---\n include/iscsi_err.h    | 6 ++++--\n iscsiuio/configure     | 2 +-\n iscsiuio/configure.ac  | 2 +-\n iscsiuio/src/uip/uip.h | 4 ++--\n usr/iscsi_err.c        | 2 ++\n usr/log.c              | 1 +\n usr/log.h              | 2 +-\n 7 files changed, 12 insertions(+), 7 deletions(-)\n\ndiff --git a/include/iscsi_err.h b/include/iscsi_err.h\nindex 125f443a2f25..a08f0fbfcea6 100644\n--- a/include/iscsi_err.h\n+++ b/include/iscsi_err.h\n@@ -4,7 +4,7 @@\n #ifndef _ISCSI_ERR_\n #define _ISCSI_ERR_\n \n-enum {\n+enum iscsi_error_list {\n \tISCSI_SUCCESS\t\t\t= 0,\n \t/* Generic error */\n \tISCSI_ERR\t\t\t= 1,\n@@ -69,7 +69,9 @@ enum {\n \n \t/* Always last. Indicates end of error code space */\n \tISCSI_MAX_ERR_VAL,\n-} iscsi_err;\n+};\n+\n+extern enum iscsi_error_list iscsi_err;\n \n extern void iscsi_err_print_msg(int err);\n extern char *iscsi_err_to_str(int err);\ndiff --git a/iscsiuio/configure b/iscsiuio/configure\nindex 2740598f5f87..e799c377b4ab 100755\n--- a/iscsiuio/configure\n+++ b/iscsiuio/configure\n@@ -22729,7 +22729,7 @@ echo \"$as_me: error: cannot create directory $dirpart/$fdir\" >&2;}\n   done\n done\n  ;;\n-    default )  echo 'char *build_date = \"'`date`'\";' > src/unix/build_date.c  && echo 'char *build_date;'> src/unix/build_date.h ;;\n+    default )  echo 'char *build_date = \"'`date`'\";' > src/unix/build_date.c  && echo 'extern char *build_date;'> src/unix/build_date.h ;;\n   esac\n done\n _ACEOF\ndiff --git a/iscsiuio/configure.ac b/iscsiuio/configure.ac\nindex e9a5e32399ea..f51687bf56b5 100644\n--- a/iscsiuio/configure.ac\n+++ b/iscsiuio/configure.ac\n@@ -62,7 +62,7 @@ AC_ARG_ENABLE(debug,\n     fi])\n AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])\n \n-AC_CONFIG_COMMANDS([default],[[ echo 'char *build_date = \"'`date`'\";' > src/unix/build_date.c  && echo 'char *build_date;'> src/unix/build_date.h]],[[]])\n+AC_CONFIG_COMMANDS([default],[[ echo 'char *build_date = \"'`date`'\";' > src/unix/build_date.c  && echo 'extern char *build_date;'> src/unix/build_date.h]],[[]])\n \n AC_PREFIX_DEFAULT()\n \ndiff --git a/iscsiuio/src/uip/uip.h b/iscsiuio/src/uip/uip.h\nindex 0225f6a456f5..d8e2220bf357 100644\n--- a/iscsiuio/src/uip/uip.h\n+++ b/iscsiuio/src/uip/uip.h\n@@ -70,8 +70,8 @@ struct uip_stack;\n typedef u16_t uip_ip4addr_t[2];\n typedef u16_t uip_ip6addr_t[8];\n \n-const uip_ip6addr_t all_zeroes_addr6;\n-const uip_ip4addr_t all_zeroes_addr4;\n+extern const uip_ip6addr_t all_zeroes_addr6;\n+extern const uip_ip4addr_t all_zeroes_addr4;\n \n #define ETH_BUF(buf) ((struct uip_eth_hdr *)buf)\n #define VLAN_ETH_BUF(buf) ((struct uip_vlan_eth_hdr *)buf)\ndiff --git a/usr/iscsi_err.c b/usr/iscsi_err.c\nindex 4fe1c53adce0..6b6a4124458a 100644\n--- a/usr/iscsi_err.c\n+++ b/usr/iscsi_err.c\n@@ -21,6 +21,8 @@\n #include \"iscsi_err.h\"\n #include \"log.h\"\n \n+enum iscsi_error_list iscsi_err;\n+\n static char *iscsi_err_msgs[] = {\n \t/* 0 */ \"\",\n \t/* 1 */ \"unknown error\",\ndiff --git a/usr/log.c b/usr/log.c\nindex 26c61d847793..f7c542eeb191 100644\n--- a/usr/log.c\n+++ b/usr/log.c\n@@ -33,6 +33,7 @@\n \n char *log_name;\n int log_level = 0;\n+struct logarea *la = NULL;\n \n static int log_stop_daemon = 0;\n static void (*log_func)(int prio, void *priv, const char *fmt, va_list ap);\ndiff --git a/usr/log.h b/usr/log.h\nindex 486a08ea08b2..c548791e73a1 100644\n--- a/usr/log.h\n+++ b/usr/log.h\n@@ -64,7 +64,7 @@ struct logarea {\n \tunion semun semarg;\n };\n \n-struct logarea *la;\n+extern struct logarea *la;\n \n extern int log_init(char *program_name, int size,\n \tvoid (*func)(int prio, void *priv, const char *fmt, va_list ap),\n-- \n2.27.0\n\n"
  },
  {
    "path": "packages/sysutils/open-iscsi/patches/open-iscsi-06-Fix-attribute.patch",
    "content": "From 61936357ef7d796c3f4fe95782309268be9e6a31 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Sat, 20 Jun 2020 19:37:42 +0200\nSubject: [PATCH] Fix attribute\n\n---\n include/iscsi_if.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/include/iscsi_if.h b/include/iscsi_if.h\nindex 20f2bc2961e9..6633bc528555 100644\n--- a/include/iscsi_if.h\n+++ b/include/iscsi_if.h\n@@ -327,7 +327,7 @@ struct iscsi_iface_param_info {\n \tuint8_t iface_type;\t/* IPv4 or IPv6 */\n \tuint8_t param_type;\t/* iscsi_param_type */\n \tuint8_t value[0];\t/* length sized value follows */\n-} __packed;\n+} __attribute__((__packed__));\n \n /*\n  * To keep the struct iscsi_uevent size the same for userspace code\n-- \n2.27.0\n\n"
  },
  {
    "path": "packages/sysutils/open-iscsi/patches/open-iscsi-07-usr-run-for-config.patch",
    "content": "diff -Naur a/usr/idbm.c b/usr/idbm.c\n--- a/usr/idbm.c\t2013-07-29 12:13:36.000000000 -0700\n+++ b/usr/idbm.c\t2022-05-03 15:16:35.006014572 -0700\n@@ -2647,9 +2647,9 @@\n int idbm_init(idbm_get_config_file_fn *fn)\n {\n \t/* make sure root db dir is there */\n-\tif (access(ISCSI_CONFIG_ROOT, F_OK) != 0) {\n-\t\tif (mkdir(ISCSI_CONFIG_ROOT, 0660) != 0) {\n-\t\t\tlog_error(\"Could not make %s %d\\n\", ISCSI_CONFIG_ROOT,\n+\tif (access(ISCSIVAR, F_OK) != 0) {\n+\t\tif (mkdir(ISCSIVAR, 0770) != 0) {\n+\t\t\tlog_error(\"Could not make %s %d\", ISCSIVAR,\n \t\t\t\t   errno);\n \t\t\treturn errno;\n \t\t}\ndiff -Naur a/usr/idbm.h b/usr/idbm.h\n--- a/usr/idbm.h\t2013-07-29 12:13:36.000000000 -0700\n+++ b/usr/idbm.h\t2022-05-03 15:17:18.700644189 -0700\n@@ -29,12 +29,13 @@\n #include \"list.h\"\n #include \"flashnode.h\"\n \n-#define NODE_CONFIG_DIR\t\tISCSI_CONFIG_ROOT\"nodes\"\n-#define SLP_CONFIG_DIR\t\tISCSI_CONFIG_ROOT\"slp\"\n-#define ISNS_CONFIG_DIR\t\tISCSI_CONFIG_ROOT\"isns\"\n-#define STATIC_CONFIG_DIR\tISCSI_CONFIG_ROOT\"static\"\n-#define FW_CONFIG_DIR\t\tISCSI_CONFIG_ROOT\"fw\"\n-#define ST_CONFIG_DIR\t\tISCSI_CONFIG_ROOT\"send_targets\"\n+#define ISCSIVAR\t\t\"/run/iscsi/\"\n+#define NODE_CONFIG_DIR\t\tISCSIVAR\"nodes\"\n+#define SLP_CONFIG_DIR\t\tISCSIVAR\"slp\"\n+#define ISNS_CONFIG_DIR\t\tISCSIVAR\"isns\"\n+#define STATIC_CONFIG_DIR\tISCSIVAR\"static\"\n+#define FW_CONFIG_DIR\t\tISCSIVAR\"fw\"\n+#define ST_CONFIG_DIR\t\tISCSIVAR\"send_targets\"\n #define ST_CONFIG_NAME\t\t\"st_config\"\n #define ISNS_CONFIG_NAME\t\"isns_config\"\n \ndiff -Naur a/usr/iface.h b/usr/iface.h\n--- a/usr/iface.h\t2013-07-29 12:13:36.000000000 -0700\n+++ b/usr/iface.h\t2022-05-03 15:18:31.164688356 -0700\n@@ -20,7 +20,9 @@\n #ifndef ISCSI_IFACE_H\n #define ISCSI_IFACE_H\n \n-#define IFACE_CONFIG_DIR\tISCSI_CONFIG_ROOT\"ifaces\"\n+#include \"idbm.h\"\n+\n+#define IFACE_CONFIG_DIR\tISCSIVAR\"ifaces\"\n \n struct iface_rec;\n struct list_head;\n"
  },
  {
    "path": "packages/sysutils/open-iscsi/system.d/iscsi-initiator.service",
    "content": "[Unit]\nDescription=Open-iSCSI initiator (i.e. client) service\nAfter=syslog.target\n\n[Service]\nExecStart=/usr/sbin/iscsid -f\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/sysutils/open-iscsi/tmpfiles.d/iscsi.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022 Team LibreELEC (https://libreelec.tv)\n\nd /run/lock/iscsi 0700 root root -\nf /run/lock/iscsi/lock 0600 root root -\n"
  },
  {
    "path": "packages/sysutils/open-vm-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2011 Anthony Nash (nash.ant@gmail.com)\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"open-vm-tools\"\nPKG_VERSION=\"12.1.5\"\nPKG_SHA256=\"678d08b46fba15f2b4c39245b5bc4deec30284d6f13ee279c233bc3d3627ec8a\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/vmware/open-vm-tools\"\nPKG_URL=\"https://github.com/vmware/open-vm-tools/archive/stable-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain fuse3 glib:host glib libdnet libtirpc\"\nPKG_LONGDESC=\"open-vm-tools: open source implementation of VMware Tools\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-docs \\\n                           --disable-tests \\\n                           --disable-containerinfo \\\n                           --disable-deploypkg \\\n                           --without-pam \\\n                           --without-gtk2 \\\n                           --without-gtkmm \\\n                           --without-ssl \\\n                           --without-x \\\n                           --without-xerces \\\n                           --without-icu \\\n                           --without-kernel-modules \\\n                           --with-fuse=fuse3 \\\n                           --with-udev-rules-dir=/usr/lib/udev/rules.d/ \\\n                           --with-sysroot=${SYSROOT_PREFIX}\"\n\nconfigure_package() {\n  PKG_CONFIGURE_SCRIPT=\"${PKG_BUILD}/open-vm-tools/configure\"\n}\n\npost_unpack() {\n  # Hack to allow package to be bumped without linking against old libraries\n  rm -f ${SYSROOT_PREFIX}/usr/lib/libvmtools*\n}\n\npre_configure_target() {\n  export LIBS=\"-ldnet -ltirpc\"\n}\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/sbin\n  rm -rf ${INSTALL}/usr/share\n  rm -rf ${INSTALL}/etc/vmware-tools/scripts/vmware/network\n\n  chmod -x ${INSTALL}/usr/lib/udev/rules.d/*.rules\n\n  find ${INSTALL}/etc/vmware-tools/ -type f | xargs sed -i '/.*expr.*/d'\n}\n\npost_install() {\n  enable_service vmtoolsd.service\n  enable_service vmware-vmblock-fuse.service\n}\n"
  },
  {
    "path": "packages/sysutils/open-vm-tools/system.d/vmtoolsd.service",
    "content": "[Unit]\nDescription=Open Virtual Machine Tools (VMware Tools)\nConditionVirtualization=vmware\n\n[Service]\nExecStart=/usr/bin/vmtoolsd\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/sysutils/open-vm-tools/system.d/vmware-vmblock-fuse.service",
    "content": "[Unit]\nDescription=Open Virtual Machine Tools (vmware-vmblock-fuse)\nConditionVirtualization=vmware\n\n[Service]\nType=simple\nRuntimeDirectory=vmblock-fuse\nRuntimeDirectoryMode=755\nExecStart=/usr/bin/vmware-vmblock-fuse -d -f -o subtype=vmware-vmblock,default_permissions,allow_other /run/vmblock-fuse\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "packages/sysutils/parted/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"parted\"\nPKG_VERSION=\"3.5\"\nPKG_SHA256=\"4938dd5c1c125f6c78b1f4b3e297526f18ee74aa43d45c248578b1d2470c05a2\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.gnu.org/software/parted/\"\nPKG_URL=\"http://ftpmirror.gnu.org/parted/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"toolchain:host util-linux:host\"\nPKG_DEPENDS_TARGET=\"toolchain util-linux parted:host\"\nPKG_DEPENDS_INIT=\"toolchain util-linux:init parted\"\nPKG_LONGDESC=\"GNU Parted is a program for creating, destroying, resizing, checking and copying partitions.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-device-mapper \\\n                           --disable-shared \\\n                           --without-readline \\\n                           --disable-rpath \\\n                           --with-gnu-ld\"\n\nPKG_CONFIGURE_OPTS_HOST=\"${PKG_CONFIGURE_OPTS_TARGET}\"\n\npre_configure_init() {\n  : # reuse pre_configure_target()\n}\n\npost_configure_init() {\n  : # reuse post_configure_target()\n}\n\nconfigure_init() {\n  : # reuse configure_target()\n}\n\nmake_init() {\n  : # reuse make_target()\n}\n\nmakeinstall_init() {\n  mkdir -p ${INSTALL}/usr/sbin\n    cp ../.${TARGET_NAME}/parted/parted ${INSTALL}/usr/sbin\n    cp ../.${TARGET_NAME}/partprobe/partprobe ${INSTALL}/usr/sbin\n}\n\npre_configure_target() {\n  export CFLAGS+=\" -I${PKG_BUILD}/lib\"\n}\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/sysutils/pciutils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pciutils\"\nPKG_VERSION=\"3.9.0\"\nPKG_SHA256=\"cdea7ae97239dee23249a09c68a19a287a3f109fbeb2c232ebb616cb38599012\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://mj.ucw.cz/pciutils.shtml\"\nPKG_URL=\"https://www.kernel.org/pub/software/utils/pciutils/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain kmod systemd\"\nPKG_LONGDESC=\"Utilities for inspecting devices connected to the PCI bus and the PCI vendor/product ID database.\"\n\nPKG_MAKE_OPTS=\"PREFIX=/usr SHARED=no STRIP= IDSDIR=/usr/share\"\n\nmake_target() {\n  make OPT=\"${CFLAGS}\" \\\n       CROSS_COMPILE=${TARGET_PREFIX} \\\n       HOST=${TARGET_ARCH}-linux \\\n       ${PKG_MAKE_OPTS} \\\n       ZLIB=no DNS=no LIBKMOD=yes HWDB=yes\n}\n\nmakeinstall_target() {\n  make ${PKG_MAKE_OPTS} DESTDIR=${SYSROOT_PREFIX} install\n  make ${PKG_MAKE_OPTS} DESTDIR=${SYSROOT_PREFIX} install-lib\n  make ${PKG_MAKE_OPTS} DESTDIR=${INSTALL} install-lib\n  make ${PKG_MAKE_OPTS} DESTDIR=${INSTALL} install\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/sbin/setpci\n  rm -rf ${INSTALL}/usr/sbin/update-pciids\n  rm -rf ${INSTALL}/usr/share\n}\n"
  },
  {
    "path": "packages/sysutils/pciutils/patches/pciutils-01-fix-pkgconf.patch",
    "content": "From 4dd9a1b445269aa24626b1cfb85d3c22bc0e64bb Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Sat, 16 Aug 2014 14:25:18 +0300\nSubject: [PATCH] fix pkgconf\n\n---\n lib/libpci.pc.in |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/lib/libpci.pc.in b/lib/libpci.pc.in\nindex 9d7e8a0..38827ba 100644\n--- a/lib/libpci.pc.in\n+++ b/lib/libpci.pc.in\n@@ -1,7 +1,7 @@\n prefix=@PREFIX@\n-includedir=@INCDIR@\n-libdir=@LIBDIR@\n-idsdir=@IDSDIR@\n+includedir=${prefix}/include\n+libdir=${prefix}/lib\n+idsdir=${prefix}/share\n \n Name: libpci\n Description: libpci\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/sysutils/sed/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"sed\"\nPKG_VERSION=\"4.9\"\nPKG_SHA256=\"6e226b732e1cd739464ad6862bd1a1aba42d7982922da7a53519631d24975181\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.gnu.org/software/sed/\"\nPKG_URL=\"https://mirrors.kernel.org/gnu/sed/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"The sed (Stream EDitor) editor is a stream or batch (non-interactive) editor.\"\n\nPKG_CONFIGURE_OPTS_HOST=\"--disable-nls --disable-acl --without-selinux\"\n"
  },
  {
    "path": "packages/sysutils/squashfs-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"squashfs-tools\"\nPKG_VERSION=\"4.5.1\"\nPKG_SHA256=\"277b6e7f75a4a57f72191295ae62766a10d627a4f5e5f19eadfbc861378deea7\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/plougher/squashfs-tools\"\nPKG_URL=\"https://github.com/plougher/squashfs-tools/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host zlib:host lzo:host xz:host zstd:host\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory zlib) $(get_pkg_directory lzo) $(get_pkg_directory xz) $(get_pkg_directory zstd)\"\nPKG_LONGDESC=\"Tools for squashfs, a highly compressed read-only filesystem for Linux.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_host() {\n  make -C squashfs-tools \\\n          mksquashfs \\\n          XZ_SUPPORT=1 \\\n          LZO_SUPPORT=1 \\\n          ZSTD_SUPPORT=1 \\\n          XATTR_SUPPORT=0 \\\n          XATTR_DEFAULT=0 \\\n          INCLUDEDIR=\"-I. -I${TOOLCHAIN}/include\"\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp squashfs-tools/mksquashfs ${TOOLCHAIN}/bin\n}\n"
  },
  {
    "path": "packages/sysutils/systemd/config/hosts.conf",
    "content": "# hosts.conf\n\n# This configuration file allows you to manually map hostnames to\n# IP addresses\n\n# Format:  <ipaddress> <fqdn> <alias1> <alias2>\n# Example: 192.168.0.3 libreelec.mynetwork libreelec\n\n# NOTE: do not edit /etc/hosts directly\n# edit /storage/.config/hosts.conf then reboot\n"
  },
  {
    "path": "packages/sysutils/systemd/config/hwdb.d/README",
    "content": "Hardware Database Files\n\nThe hwdb files are read from the files located in the system hwdb directory\n/usr/lib/udev/hwdb.d and the user runtime directory /storage/.config/hwdb.d\nAll hwdb files are collectively sorted and processed in lexical order, regardless of\nthe directories in which they live. However, files with identical filenames\nreplace each other. /usr/lib/udev/hwdb.d/* takes precedence over /storage/.config/hwdb.d/*\n\nyour files must be named 99-xxxxx.hwdb\n\n"
  },
  {
    "path": "packages/sysutils/systemd/config/logind.conf.d/README",
    "content": "LOGIND.CONF(5)                    logind.conf                   LOGIND.CONF(5)\n\nNAME\n       logind.conf, logind.conf.d - Login manager configuration files\n\nSYNOPSIS\n       /etc/systemd/logind.conf\n\n       /etc/systemd/logind.conf.d/*.conf\n\n       /run/systemd/logind.conf.d/*.conf\n\n       /usr/lib/systemd/logind.conf.d/*.conf\n\nDESCRIPTION\n       These files configure various parameters of the systemd login manager,\n       systemd-logind.service(8).\n\nCONFIGURATION DIRECTORIES AND PRECEDENCE\n       The default configuration is defined during compilation, so a\n       configuration file is only needed when it is necessary to deviate from\n       those defaults. By default, the configuration file in /etc/systemd/\n       contains commented out entries showing the defaults as a guide to the\n       administrator. This file can be edited to create local overrides.\n\n       When packages need to customize the configuration, they can install\n       configuration snippets in /usr/lib/systemd/*.conf.d/. Files in /etc/\n       are reserved for the local administrator, who may use this logic to\n       override the configuration files installed by vendor packages. The main\n       configuration file is read before any of the configuration directories,\n       and has the lowest precedence; entries in a file in any configuration\n       directory override entries in the single configuration file. Files in\n       the *.conf.d/ configuration subdirectories are sorted by their filename\n       in lexicographic order, regardless of which of the subdirectories they\n       reside in. When multiple files specify the same option, for options\n       which accept just a single value, the entry in the file with the\n       lexicographically latest name takes precedence. For options which\n       accept a list of values, entries are collected as they occur in files\n       sorted lexicographically. It is recommended to prefix all filenames in\n       those subdirectories with a two-digit number and a dash, to simplify\n       the ordering of the files.\n\n       To disable a configuration file supplied by the vendor, the recommended\n       way is to place a symlink to /dev/null in the configuration directory\n       in /etc/, with the same filename as the vendor configuration file.\n\nOPTIONS\n       All options are configured in the \"[Login]\" section:\n\n       NAutoVTs=\n           Takes a positive integer. Configures how many virtual terminals\n           (VTs) to allocate by default that, when switched to and are\n           previously unused, \"autovt\" services are automatically spawned on.\n           These services are instantiated from the template unit\n           autovt@.service for the respective VT TTY name, for example,\n           autovt@tty4.service. By default, autovt@.service is linked to\n           getty@.service. In other words, login prompts are started\n           dynamically as the user switches to unused virtual terminals.\n           Hence, this parameter controls how many login \"gettys\" are\n           available on the VTs. If a VT is already used by some other\n           subsystem (for example, a graphical login), this kind of activation\n           will not be attempted. Note that the VT configured in ReserveVT= is\n           always subject to this kind of activation, even if it is not one of\n           the VTs configured with the NAutoVTs= directive. Defaults to 6.\n           When set to 0, automatic spawning of \"autovt\" services is disabled.\n\n       ReserveVT=\n           Takes a positive integer. Identifies one virtual terminal that\n           shall unconditionally be reserved for autovt@.service activation\n           (see above). The VT selected with this option will be marked busy\n           unconditionally, so that no other subsystem will allocate it. This\n           functionality is useful to ensure that, regardless of how many VTs\n           are allocated by other subsystems, one login \"getty\" is always\n           available. Defaults to 6 (in other words, there will always be a\n           \"getty\" available on Alt-F6.). When set to 0, VT reservation is\n           disabled.\n\n       KillUserProcesses=\n           Takes a boolean argument. Configures whether the processes of a\n           user should be killed when the user logs out. If true, the scope\n           unit corresponding to the session and all processes inside that\n           scope will be terminated. If false, the scope is \"abandoned\", see\n           systemd.scope(5), and processes are not killed. Defaults to \"yes\",\n           but see the options KillOnlyUsers= and KillExcludeUsers= below.\n\n           In addition to session processes, user process may run under the\n           user manager unit user@.service. Depending on the linger settings,\n           this may allow users to run processes independent of their login\n           sessions. See the description of enable-linger in loginctl(1).\n\n           Note that setting KillUserProcesses=yes will break tools like\n           screen(1) and tmux(1), unless they are moved out of the session\n           scope. See example in systemd-run(1).\n\n       KillOnlyUsers=, KillExcludeUsers=\n           These settings take space-separated lists of usernames that\n           override the KillUserProcesses= setting. A user name may be added\n           to KillExcludeUsers= to exclude the processes in the session scopes\n           of that user from being killed even if KillUserProcesses=yes is\n           set. If KillExcludeUsers= is not set, the \"root\" user is excluded\n           by default.  KillExcludeUsers= may be set to an empty value to\n           override this default. If a user is not excluded, KillOnlyUsers= is\n           checked next. If this setting is specified, only the session scopes\n           of those users will be killed. Otherwise, users are subject to the\n           KillUserProcesses=yes setting.\n\n       IdleAction=\n           Configures the action to take when the system is idle. Takes one of\n           \"ignore\", \"poweroff\", \"reboot\", \"halt\", \"kexec\", \"suspend\",\n           \"hibernate\", \"hybrid-sleep\", and \"lock\". Defaults to \"ignore\".\n\n           Note that this requires that user sessions correctly report the\n           idle status to the system. The system will execute the action after\n           all sessions report that they are idle, no idle inhibitor lock is\n           active, and subsequently, the time configured with IdleActionSec=\n           (see below) has expired.\n\n       IdleActionSec=\n           Configures the delay after which the action configured in\n           IdleAction= (see above) is taken after the system is idle.\n\n       InhibitDelayMaxSec=\n           Specifies the maximum time a system shutdown or sleep request is\n           delayed due to an inhibitor lock of type \"delay\" being active\n           before the inhibitor is ignored and the operation executes anyway.\n           Defaults to 5.\n\n       HandlePowerKey=, HandleSuspendKey=, HandleHibernateKey=,\n       HandleLidSwitch=, HandleLidSwitchExternalPower=, HandleLidSwitchDocked=\n           Controls how logind shall handle the system power and sleep keys\n           and the lid switch to trigger actions such as system power-off or\n           suspend. Can be one of \"ignore\", \"poweroff\", \"reboot\", \"halt\",\n           \"kexec\", \"suspend\", \"hibernate\", \"hybrid-sleep\", and \"lock\". If\n           \"ignore\", logind will never handle these keys. If \"lock\", all\n           running sessions will be screen-locked; otherwise, the specified\n           action will be taken in the respective event. Only input devices\n           with the \"power-switch\" udev tag will be watched for key/lid switch\n           events.  HandlePowerKey= defaults to \"poweroff\".  HandleSuspendKey=\n           and HandleLidSwitch= default to \"suspend\".\n           HandleLidSwitchExternalPower= is completely ignored by default (for\n           backwards compatibility) — an explicit value must be set before it\n           will be used to determine behaviour.  HandleLidSwitchDocked=\n           defaults to \"ignore\".  HandleHibernateKey= defaults to \"hibernate\".\n           If the system is inserted in a docking station, or if more than one\n           display is connected, the action specified by\n           HandleLidSwitchDocked= occurs; if the system is on external power\n           the action (if any) specified by HandleLidSwitchExternalPower=\n           occurs; otherwise the HandleLidSwitch= action occurs.\n\n           A different application may disable logind's handling of system\n           power and sleep keys and the lid switch by taking a low-level\n           inhibitor lock (\"handle-power-key\", \"handle-suspend-key\",\n           \"handle-hibernate-key\", \"handle-lid-switch\"). This is most commonly\n           used by graphical desktop environments to take over suspend and\n           hibernation handling, and to use their own configuration\n           mechanisms. If a low-level inhibitor lock is taken, logind will not\n           take any action when that key or switch is triggered and the\n           Handle*= settings are irrelevant.\n\n       PowerKeyIgnoreInhibited=, SuspendKeyIgnoreInhibited=,\n       HibernateKeyIgnoreInhibited=, LidSwitchIgnoreInhibited=\n           Controls whether actions that systemd-logind takes when the power\n           and sleep keys and the lid switch are triggered are subject to\n           high-level inhibitor locks (\"shutdown\", \"sleep\", \"idle\"). Low level\n           inhibitor locks (\"handle-power-key\", \"handle-suspend-key\",\n           \"handle-hibernate-key\", \"handle-lid-switch\"), are always honored,\n           irrespective of this setting.\n\n           These settings take boolean arguments. If \"no\", the inhibitor locks\n           taken by applications are respected. If \"yes\", \"shutdown\", \"sleep\",\n           and \"idle\" inhibitor locks are ignored.  PowerKeyIgnoreInhibited=,\n           SuspendKeyIgnoreInhibited=, and HibernateKeyIgnoreInhibited=\n           default to \"no\".  LidSwitchIgnoreInhibited= defaults to \"yes\". This\n           means that when systemd-logind is handling events by itself (no low\n           level inhibitor locks are taken by another application), the lid\n           switch does not respect suspend blockers by default, but the power\n           and sleep keys do.\n\n       HoldoffTimeoutSec=\n           Specifies the timeout after system startup or system resume in\n           which systemd will hold off on reacting to lid events. This is\n           required for the system to properly detect any hotplugged devices\n           so systemd can ignore lid events if external monitors, or docks,\n           are connected. If set to 0, systemd will always react immediately,\n           possibly before the kernel fully probed all hotplugged devices.\n           This is safe, as long as you do not care for systemd to account for\n           devices that have been plugged or unplugged while the system was\n           off. Defaults to 30s.\n\n       RuntimeDirectorySize=\n           Sets the size limit on the $XDG_RUNTIME_DIR runtime directory for\n           each user who logs in. Takes a size in bytes, optionally suffixed\n           with the usual K, G, M, and T suffixes, to the base 1024 (IEC).\n           Alternatively, a numerical percentage suffixed by \"%\" may be\n           specified, which sets the size limit relative to the amount of\n           physical RAM. Defaults to 10%. Note that this size is a safety\n           limit only. As each runtime directory is a tmpfs file system, it\n           will only consume as much memory as is needed.\n\n       InhibitorsMax=\n           Controls the maximum number of concurrent inhibitors to permit.\n           Defaults to 8192 (8K).\n\n       SessionsMax=\n           Controls the maximum number of concurrent user sessions to manage.\n           Defaults to 8192 (8K). Depending on how the pam_systemd.so module\n           is included in the PAM stack configuration, further login sessions\n           will either be refused, or permitted but not tracked by\n           systemd-logind.\n\n       UserTasksMax=\n           Sets the maximum number of OS tasks each user may run concurrently.\n           This controls the TasksMax= setting of the per-user slice unit, see\n           systemd.resource-control(5) for details. If assigned the special\n           value \"infinity\", no tasks limit is applied. Defaults to 33%, which\n           equals 10813 with the kernel's defaults on the host, but might be\n           smaller in OS containers.\n\n       RemoveIPC=\n           Controls whether System V and POSIX IPC objects belonging to the\n           user shall be removed when the user fully logs out. Takes a boolean\n           argument. If enabled, the user may not consume IPC resources after\n           the last of the user's sessions terminated. This covers System V\n           semaphores, shared memory and message queues, as well as POSIX\n           shared memory and message queues. Note that IPC objects of the root\n           user and other system users are excluded from the effect of this\n           setting. Defaults to \"yes\".\n\nSEE ALSO\n       systemd(1), systemd-logind.service(8), loginctl(1), systemd-\n       system.conf(5)\n\nsystemd 238                                                     LOGIND.CONF(5)\n"
  },
  {
    "path": "packages/sysutils/systemd/config/modules-load.d/README",
    "content": "Name\n\nmodules-load.d — Configure kernel modules to load at boot\n\nSynopsis\n\n/etc/modules-load.d/*.conf\n\n/run/modules-load.d/*.conf\n\n/usr/lib/modules-load.d/*.conf\n\nDescription\n\nsystemd-modules-load.service(8) reads files from the above directories which contain kernel modules to load during boot in a static list. Each configuration file is named in the style of /etc/modules-load.d/program.conf. Note that it is usually a better idea to rely on the automatic module loading by PCI IDs, USB IDs, DMI IDs or similar triggers encoded in the kernel modules themselves instead of static configuration like this. In fact, most modern kernel modules are prepared for automatic loading already.\nConfiguration Format\n\nThe configuration files should simply contain a list of kernel module names to load, separated by newlines. Empty lines and lines whose first non-whitespace character is # or ; are ignored.\n\nEach configuration file shall be named in the style of program.conf. Files in /etc/ override files with the same name in /usr/lib/ and /run/. Files in /run/ override files with the same name in /usr/lib/. Packages should install their configuration files in /usr/lib/, files in /etc/ are reserved for the local administrator, who may use this logic to override the configuration files installed from vendor packages.\n\nIf the administrator wants to disable a configuration file supplied by the vendor the recommended way is to place a symlink to /dev/null in /etc/modules-load.d/ bearing the same filename.\nExample\n\nExample 1. /etc/modules-load.d/virtio-net.conf example:\n\n# Load virtio-net.ko at boot\nvirtio-net\n\n\nSee Also\n\nsystemd(1), systemd-modules-load.service(8), systemd-delta(1), modprobe(8) \n"
  },
  {
    "path": "packages/sysutils/systemd/config/sleep.conf.d/README",
    "content": "NAME\n       systemd-sleep.conf, sleep.conf.d - Suspend and hibernation configuration file\n\nSYNOPSIS\n       /etc/systemd/sleep.conf\n\n       /etc/systemd/sleep.conf.d/*.conf\n\n       /run/systemd/sleep.conf.d/*.conf\n\n       /usr/lib/systemd/sleep.conf.d/*.conf\n\nDESCRIPTION\n       systemd supports three general power-saving modes:\n\n       suspend\n           a low-power state where execution of the OS is paused, and complete power loss might result in lost data, and which is fast to enter and exit. This corresponds to suspend, standby, or freeze states as understood by the\n           kernel.\n\n       hibernate\n           a low-power state where execution of the OS is paused, and complete power loss does not result in lost data, and which might be slow to enter and exit. This corresponds to the hibernation as understood by the kernel.\n\n       hybrid-sleep\n           a low-power state where execution of the OS is paused, which might be slow to enter, and on complete power loss does not result in lost data but might be slower to exit in that case. This mode is called suspend-to-both\n           by the kernel.\n\n       Settings in these files determine what strings will be written to /sys/power/disk and /sys/power/state by systemd-sleep(8) when systemd(1) attempts to suspend or hibernate the machine.\n\nCONFIGURATION DIRECTORIES AND PRECEDENCE\n       The default configuration is defined during compilation, so a configuration file is only needed when it is necessary to deviate from those defaults. By default, the configuration file in /etc/systemd/ contains commented out\n       entries showing the defaults as a guide to the administrator. This file can be edited to create local overrides.\n\n       When packages need to customize the configuration, they can install configuration snippets in /usr/lib/systemd/*.conf.d/. Files in /etc/ are reserved for the local administrator, who may use this logic to override the\n       configuration files installed by vendor packages. The main configuration file is read before any of the configuration directories, and has the lowest precedence; entries in a file in any configuration directory override\n       entries in the single configuration file. Files in the *.conf.d/ configuration subdirectories are sorted by their filename in lexicographic order, regardless of which of the subdirectories they reside in. If multiple files\n       specify the same option, the entry in the file with the lexicographically latest name takes precedence. It is recommended to prefix all filenames in those subdirectories with a two-digit number and a dash, to simplify the\n       ordering of the files.\n\n       To disable a configuration file supplied by the vendor, the recommended way is to place a symlink to /dev/null in the configuration directory in /etc/, with the same filename as the vendor configuration file.\n\nOPTIONS\n       The following options can be configured in the \"[Sleep]\" section of /etc/systemd/sleep.conf or a sleep.conf.d file:\n\n       SuspendMode=, HibernateMode=, HybridSleepMode=\n           The string to be written to /sys/power/disk by, respectively, systemd-suspend.service(8), systemd-hibernate.service(8), or systemd-hybrid-sleep.service(8). More than one value can be specified by separating multiple\n           values with whitespace. They will be tried in turn, until one is written without error. If neither succeeds, the operation will be aborted.\n\n       SuspendState=, HibernateState=, HybridSleepState=\n           The string to be written to /sys/power/state by, respectively, systemd-suspend.service(8), systemd-hibernate.service(8), or systemd-hybrid-sleep.service(8). More than one value can be specified by separating multiple\n           values with whitespace. They will be tried in turn, until one is written without error. If neither succeeds, the operation will be aborted.\n\nEXAMPLE: FREEZE\n       Example: to exploit the “freeze” mode added in Linux 3.9, one can use systemctl suspend with\n\n           [Sleep]\n           SuspendState=freeze\n\nSEE ALSO\n       systemd-sleep(8), systemd-suspend.service(8), systemd-hibernate.service(8), systemd-hybrid-sleep.service(8), systemd(1), systemd.directives(7)\n"
  },
  {
    "path": "packages/sysutils/systemd/config/sleep.conf.d/sleep.conf.sample",
    "content": "[Sleep]\nSuspendMode=false\nHibernateMode=false\n"
  },
  {
    "path": "packages/sysutils/systemd/config/sysctl.d/README",
    "content": "Name\n\nsysctl.d — Configure kernel parameters at boot\n\nSynopsis\n\n/etc/sysctl.d/*.conf\n\n/run/sysctl.d/*.conf\n\n/usr/lib/sysctl.d/*.conf\n\nDescription\n\nAt boot, systemd-sysctl.service(8) reads configuration files from the above directories to configure sysctl(8) kernel parameters.\nConfiguration Format\n\nThe configuration files contain a list of variable assignments, separated by newlines. Empty lines and lines whose first non-whitespace character is # or ; are ignored.\n\nNote that both / and . are accepted as label separators within sysctl variable names. \"kernel.domainname=foo\" and \"kernel/domainname=foo\" hence are entirely equivalent.\n\nEach configuration file shall be named in the style of program.conf. Files in /etc/ override files with the same name in /usr/lib/ and /run/. Files in /run/ override files with the same name in /usr/lib/. Packages should install their configuration files in /usr/lib/. Files in /etc/ are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages. All configuration files are sorted by their filename in alphabetical order, regardless in which of the directories they reside, to guarantee that a specific configuration file takes precedence over another file with an alphabetically later name, if both files contain the same variable setting.\n\nIf the administrator wants to disable a configuration file supplied by the vendor, the recommended way is to place a symlink to /dev/null in /etc/sysctl.d/ bearing the same filename.\nExample\n\nExample 1. /etc/sysctl.d/domain-name.conf example:\n\n# Set kernel YP domain name\nkernel.domainname=example.com\n\n\nSee Also\n\nsystemd(1), systemd-sysctl.service(8), systemd-delta(1), sysctl(8), sysctl.conf(5) \n"
  },
  {
    "path": "packages/sysutils/systemd/config/system.d/README",
    "content": "Name\n\nsystemd.unit — Unit configuration\n\nSynopsis\n\nservice.service, socket.socket, device.device, mount.mount, automount.automount, swap.swap, target.target, path.path, timer.timer, snapshot.snapshot, slice.slice, scope.scope\n\n/etc/systemd/system/*\n/run/systemd/system/*\n/usr/lib/systemd/system/*\n...\n                \n\n$HOME/.config/systemd/user/*\n/etc/systemd/user/*\n/run/systemd/user/*\n/usr/lib/systemd/user/*\n...\n                \nDescription\n\nA unit configuration file encodes information about a service, a socket, a device, a mount point, an automount point, a swap file or partition, a start-up target, a watched file system path, a timer controlled and supervised by systemd(1), a temporary system state snapshot, a resource management slice or a group of externally created processes. The syntax is inspired by XDG Desktop Entry Specification .desktop files, which are in turn inspired by Microsoft Windows .ini files.\n\nThis man page lists the common configuration options of all the unit types. These options need to be configured in the [Unit] or [Install] sections of the unit files.\n\nIn addition to the generic [Unit] and [Install] sections described here, each unit may have a type-specific section, e.g. [Service] for a service unit. See the respective man pages for more information: systemd.service(5), systemd.socket(5), systemd.device(5), systemd.mount(5), systemd.automount(5), systemd.swap(5), systemd.target(5), systemd.path(5), systemd.timer(5), systemd.snapshot(5). systemd.slice(5). systemd.scope(5).\n\nUnit files are loaded from a set of paths determined during compilation, described in the next section.\n\nUnit files may contain additional options on top of those listed here. If systemd encounters an unknown option it will write a warning log message but continue loading the unit. If an option is prefixed with X- it is ignored completely by systemd. Applications may use this to include additional information in the unit files.\n\nBoolean arguments used in unit files can be written in various formats. For positive settings the strings 1, yes, true and on are equivalent. For negative settings the strings 0, no, false and off are equivalent.\n\nTime span values encoded in unit files can be written in various formats. A stand-alone number specifies a time in seconds. If suffixed with a time unit, the unit is honored. A concatenation of multiple values with units is supported, in which case the values are added up. Example: \"50\" refers to 50 seconds; \"2min 200ms\" refers to 2 minutes plus 200 milliseconds, i.e. 120200ms. The following time units are understood: s, min, h, d, w, ms, us. For details see systemd.time(7).\n\nEmpty lines and lines starting with # or ; are ignored. This may be used for commenting. Lines ending in a backslash are concatenated with the following line while reading and the backslash is replaced by a space character. This may be used to wrap long lines.\n\nAlong with a unit file foo.service the directory foo.service.wants/ may exist. All unit files symlinked from such a directory are implicitly added as dependencies of type Wanted= to the unit. This is useful to hook units into the start-up of other units, without having to modify their unit files. For details about the semantics of Wanted= see below. The preferred way to create symlinks in the .wants/ directory of a unit file is with the enable command of the systemctl(1) tool which reads information from the [Install] section of unit files (see below). A similar functionality exists for Requires= type dependencies as well, the directory suffix is .requires/ in this case.\n\nAlong with a unit file foo.service a directory foo.service.d/ may exist. All files with the suffix \".conf\" from this directory will be parsed after the file itself is parsed. This is useful to alter or add configuration settings to a unit, without having to modify their unit files. Make sure that the file that is included has the appropriate section headers before any directive.\n\nIf a line starts with .include followed by a filename, the specified file will be parsed at this point. Make sure that the file that is included has the appropriate section headers before any directives.\n\nNote that while systemd offers a flexible dependency system between units it is recommended to use this functionality only sparingly and instead rely on techniques such as bus-based or socket-based activation which make dependencies implicit, resulting in a both simpler and more flexible system.\n\nSome unit names reflect paths existing in the file system namespace. Example: a device unit dev-sda.device refers to a device with the device node /dev/sda in the file system namespace. If this applies a special way to escape the path name is used, so that the result is usable as part of a filename. Basically, given a path, \"/\" is replaced by \"-\", and all unprintable characters and the \"-\" are replaced by C-style \"\\x20\" escapes. The root directory \"/\" is encoded as single dash, while otherwise the initial and ending \"/\" is removed from all paths during transformation. This escaping is reversible.\n\nOptionally, units may be instantiated from a template file at runtime. This allows creation of multiple units from a single configuration file. If systemd looks for a unit configuration file it will first search for the literal unit name in the filesystem. If that yields no success and the unit name contains an \"@\" character, systemd will look for a unit template that shares the same name but with the instance string (i.e. the part between the \"@\" character and the suffix) removed. Example: if a service getty@tty3.service is requested and no file by that name is found, systemd will look for getty@.service and instantiate a service from that configuration file if it is found.\n\nTo refer to the instance string from within the configuration file you may use the special \"%i\" specifier in many of the configuration options. See below for details.\n\nIf a unit file is empty (i.e. has the file size 0) or is symlinked to /dev/null its configuration will not be loaded and it appears with a load state of \"masked\", and cannot be activated. Use this as an effective way to fully disable a unit, making it impossible to start it even manually.\n\nThe unit file format is covered by the Interface Stability Promise.\nUnit Load Path\n\nUnit files are loaded from a set of paths determined during compilation, described in the two tables below. Unit files found in directories listed earlier override files with the same name in directories lower in the list.\n\nWhen systemd is running in user mode (--user) and the variable $SYSTEMD_UNIT_PATH is set, this contents of this variable overrides the unit load path.\n\nTable 1.  Load path when running in system mode (--system).\nPath\t\t\t\tDescription\n/etc/systemd/system\t\tLocal configuration\n/run/systemd/systemd\t\tRuntime units\n/usr/lib/systemd/system\t\tUnits of installed packages\n\nTable 2.  Load path when running in user mode (--user).\nPath\t\t\t\tDescription\n$HOME/.config/systemd/user\tUser configuration\n/etc/systemd/user\t\tLocal configuration\n/run/systemd/user\t\tRuntime units\n/usr/lib/systemd/user\t\tUnits of installed packages\n\nAdditional units might be loaded into systemd (\"linked\") from directories not on the unit load path. See the link command for systemctl(1). Also, some units are dynamically created via generators Generators.\nOptions\n\nUnit file may include a [Unit] section, which carries generic information about the unit that is not dependent on the type of unit:\n\nDescription=\n    A free-form string describing the unit. This is intended for use in UIs to show descriptive information along with the unit name.\n\nDocumentation=\n    A space-separated list of URIs referencing documentation for this unit or its configuration. Accepted are only URIs of the types \"http://\", \"https://\", \"file:\", \"info:\", \"man:\". For more information about the syntax of these URIs, see uri(7). The URIs should be listed in order of relevance, starting with the most relevant. It is a good idea to first reference documentation that explains what the unit's purpose is, followed by how it is configured, followed by any other related documentation. This option may be specified more than once in which case the specified list of URIs is merged. If the empty string is assigned to this option, the list is reset and all prior assignments will have no effect.\nRequires=\n\n    Configures requirement dependencies on other units. If this unit gets activated, the units listed here will be activated as well. If one of the other units gets deactivated or its activation fails, this unit will be deactivated. This option may be specified more than once, in which case requirement dependencies for all listed names are created. Note that requirement dependencies do not influence the order in which services are started or stopped. This has to be configured independently with the After= or Before= options. If a unit foo.service requires a unit bar.service as configured with Requires= and no ordering is configured with After= or Before=, then both units will be started simultaneously and without any delay between them if foo.service is activated. Often it is a better choice to use Wants= instead of Requires= in order to achieve a system that is more robust when dealing with failing services.\n\n    Note that dependencies of this type may also be configured outside of the unit configuration file by adding a symlink to a .requires/ directory accompanying the unit file. For details see above.\n\nRequiresOverridable=\n    Similar to Requires=. Dependencies listed in RequiresOverridable= which cannot be fulfilled or fail to start are ignored if the startup was explicitly requested by the user. If the start-up was pulled in indirectly by some dependency or automatic start-up of units that is not requested by the user this dependency must be fulfilled and otherwise the transaction fails. Hence, this option may be used to configure dependencies that are normally honored unless the user explicitly starts up the unit, in which case whether they failed or not is irrelevant.\n\nRequisite=, RequisiteOverridable=\n    Similar to Requires= and RequiresOverridable=, respectively. However, if a unit listed here is not started already it will not be started and the transaction fails immediately.\n\nWants=\n    A weaker version of Requires=. A unit listed in this option will be started if the configuring unit is. However, if the listed unit fails to start up or cannot be added to the transaction this has no impact on the validity of the transaction as a whole. This is the recommended way to hook start-up of one unit to the start-up of another unit.\n\n    Note that dependencies of this type may also be configured outside of the unit configuration file by adding a symlink to a .wants/ directory accompanying the unit file. For details see above.\n\nBindsTo=\n    Configures requirement dependencies, very similar in style to Requires=, however in addition to this behavior it also declares that this unit is stopped when any of the units listed suddenly disappears. Units can suddenly, unexpectedly disappear if a service terminates on its own choice, a device is unplugged or a mount point unmounted without involvement of systemd.\n\nPartOf=\n    Configures dependencies similar to Requires=, but limited to stopping and restarting of units. When systemd stops or restarts the units listed here, the action is propagated to this unit. Note that this is a one way dependency - changes to this unit do not affect the listed units. \n\nConflicts=\n    Configures negative requirement dependencies. If a unit has a Conflicts= setting on another unit, starting the former will stop the latter and vice versa. Note that this setting is independent of and orthogonal to the After= and Before= ordering dependencies.\n\n    If a unit A that conflicts with a unit B is scheduled to be started at the same time as B, the transaction will either fail (in case both are required part of the transaction) or be modified to be fixed (in case one or both jobs are not a required part of the transaction). In the latter case the job that is not the required will be removed, or in case both are not required the unit that conflicts will be started and the unit that is conflicted is stopped.\n\nBefore=, After=\n    Configures ordering dependencies between units. If a unit foo.service contains a setting Before=bar.service and both units are being started, bar.service's start-up is delayed until foo.service is started up. Note that this setting is independent of and orthogonal to the requirement dependencies as configured by Requires=. It is a common pattern to include a unit name in both the After= and Requires= option in which case the unit listed will be started before the unit that is configured with these options. This option may be specified more than once, in which case ordering dependencies for all listed names are created. After= is the inverse of Before=, i.e. while After= ensures that the configured unit is started after the listed unit finished starting up, Before= ensures the opposite, i.e. that the configured unit is fully started up before the listed unit is started. Note that when two units with an ordering dependency between them are shut down, the inverse of the start-up order is applied. i.e. if a unit is configured with After= on another unit, the former is stopped before the latter if both are shut down. If one unit with an ordering dependency on another unit is shut down while the latter is started up, the shut down is ordered before the start-up regardless whether the ordering dependency is actually of type After= or Before=. If two units have no ordering dependencies between them they are shut down or started up simultaneously, and no ordering takes place. \n\nOnFailure=\n    Lists one or more units that are activated when this unit enters the \"failed\" state.\n\nPropagatesReloadTo=, ReloadPropagatedFrom=\n    Lists one or more units where reload requests on the unit will be propagated to/on the other unit will be propagated from. Issuing a reload request on a unit will automatically also enqueue a reload request on all units that the reload request shall be propagated to via these two settings.\n\nRequiresMountsFor=\n    Takes a space-separated list of absolute paths. Automatically adds dependencies of type Requires= and After= for all mount units required to access the specified path.\n\nOnFailureIsolate=\n    Takes a boolean argument. If true the unit listed in OnFailure= will be enqueued in isolation mode, i.e. all units that are not its dependency will be stopped. If this is set only a single unit may be listed in OnFailure=. Defaults to false.\n\nIgnoreOnIsolate=\n    Takes a boolean argument. If true this unit will not be stopped when isolating another unit. Defaults to false.\n\nIgnoreOnSnapshot=\n    Takes a boolean argument. If true this unit will not be included in snapshots. Defaults to true for device and snapshot units, false for the others.\n\nStopWhenUnneeded=\n    Takes a boolean argument. If true this unit will be stopped when it is no longer used. Note that in order to minimize the work to be executed, systemd will not stop units by default unless they are conflicting with other units, or the user explicitly requested their shut down. If this option is set, a unit will be automatically cleaned up if no other active unit requires it. Defaults to false.\n\nRefuseManualStart=, RefuseManualStop=\n    Takes a boolean argument. If true this unit can only be activated or deactivated indirectly. In this case explicit start-up or termination requested by the user is denied, however if it is started or stopped as a dependency of another unit, start-up or termination will succeed. This is mostly a safety feature to ensure that the user does not accidentally activate units that are not intended to be activated explicitly, and not accidentally deactivate units that are not intended to be deactivated. These options default to false.\n\nAllowIsolate=\n    Takes a boolean argument. If true this unit may be used with the systemctl isolate command. Otherwise this will be refused. It probably is a good idea to leave this disabled except for target units that shall be used similar to runlevels in SysV init systems, just as a precaution to avoid unusable system states. This option defaults to false.\n\nDefaultDependencies=\n    Takes a boolean argument. If true (the default), a few default dependencies will implicitly be created for the unit. The actual dependencies created depend on the unit type. For example, for service units, these dependencies ensure that the service is started only after basic system initialization is completed and is properly terminated on system shutdown. See the respective man pages for details. Generally, only services involved with early boot or late shutdown should set this option to false. It is highly recommended to leave this option enabled for the majority of common units. If set to false, this option does not disable all implicit dependencies, just non-essential ones.\n\nJobTimeoutSec=\n    When clients are waiting for a job of this unit to complete, time out after the specified time. If this time limit is reached the job will be cancelled, the unit however will not change state or even enter the \"failed\" mode. This value defaults to 0 (job timeouts disabled), except for device units. NB: this timeout is independent from any unit-specific timeout (for example, the timeout set with Timeout= in service units) as the job timeout has no effect on the unit itself, only on the job that might be pending for it. Or in other words: unit-specific timeouts are useful to abort unit state changes, and revert them. The job timeout set with this option however is useful to abort only the job waiting for the unit state to change.\n\nConditionPathExists=, ConditionPathExistsGlob=, ConditionPathIsDirectory=, ConditionPathIsSymbolicLink=, ConditionPathIsMountPoint=, ConditionPathIsReadWrite=, ConditionDirectoryNotEmpty=, ConditionFileNotEmpty=, ConditionFileIsExecutable=, ConditionKernelCommandLine=, ConditionVirtualization=, ConditionSecurity=, ConditionCapability=, ConditionHost=, ConditionACPower=, ConditionNull=\n    Before starting a unit verify that the specified condition is true. If it is not true the starting of the unit will be skipped, however all ordering dependencies of it are still respected. A failing condition will not result in the unit being moved into a failure state. The condition is checked at the time the queued start job is to be executed.\n\n    With ConditionPathExists= a file existence condition is checked before a unit is started. If the specified absolute path name does not exist the condition will fail. If the absolute path name passed to ConditionPathExists= is prefixed with an exclamation mark (\"!\"), the test is negated, and the unit is only started if the path does not exist.\n\n    ConditionPathExistsGlob= is similar to ConditionPathExists=, but checks for the existence of at least one file or directory matching the specified globbing pattern.\n\n    ConditionPathIsDirectory= is similar to ConditionPathExists= but verifies whether a certain path exists and is a directory.\n\n    ConditionPathIsSymbolicLink= is similar to ConditionPathExists= but verifies whether a certain path exists and is a symbolic link.\n\n    ConditionPathIsMountPoint= is similar to ConditionPathExists= but verifies whether a certain path exists and is a mount point.\n\n    ConditionPathIsReadWrite= is similar to ConditionPathExists= but verifies whether the underlying file system is readable and writable (i.e. not mounted read-only).\n\n    ConditionDirectoryNotEmpty= is similar to ConditionPathExists= but verifies whether a certain path exists and is a non-empty directory.\n\n    ConditionFileNotEmpty= is similar to ConditionPathExists= but verifies whether a certain path exists and refers to a regular file with a non-zero size.\n\n    ConditionFileIsExecutable= is similar to ConditionPathExists= but verifies whether a certain path exists, is a regular file and marked executable.\n\n    Similar, ConditionKernelCommandLine= may be used to check whether a specific kernel command line option is set (or if prefixed with the exclamation mark unset). The argument must either be a single word, or an assignment (i.e. two words, separated \"=\"). In the former case the kernel command line is searched for the word appearing as is, or as left hand side of an assignment. In the latter case the exact assignment is looked for with right and left hand side matching.\n\n    ConditionVirtualization= may be used to check whether the system is executed in a virtualized environment and optionally test whether it is a specific implementation. Takes either boolean value to check if being executed in any virtualized environment, or one of vm and container to test against a generic type of virtualization solution, or one of qemu, kvm, vmware, microsoft, oracle, xen, bochs, chroot, uml, openvz, lxc, lxc-libvirt, systemd-nspawn to test against a specific implementation. If multiple virtualization technologies are nested only the innermost is considered. The test may be negated by prepending an exclamation mark.\n\n    ConditionSecurity= may be used to check whether the given security module is enabled on the system. Currently the recognized values values are selinux, apparmor, ima and smack. The test may be negated by prepending an exclamation mark.\n\n    ConditionCapability= may be used to check whether the given capability exists in the capability bounding set of the service manager (i.e. this does not check whether capability is actually available in the permitted or effective sets, see capabilities(7) for details). Pass a capability name such as \"CAP_MKNOD\", possibly prefixed with an exclamation mark to negate the check.\n\n    ConditionHost= may be used to match against the hostname or machine ID of the host. This either takes a hostname string (optionally with shell style globs) which is tested against the locally set hostname as returned by gethostname(2), or a machine ID formatted as string (see machine-id(5)). The test may be negated by prepending an exclamation mark.\n\n    ConditionACPower= may be used to check whether the system has AC power, or is exclusively battery powered at the time of activation of the unit. This takes a boolean argument. If set to true the condition will hold only if at least one AC connector of the system is connected to a power source, or if no AC connectors are known. Conversely, if set to false the condition will hold only if there is at least one AC connector known and all AC connectors are disconnected from a power source.\n\n    Finally, ConditionNull= may be used to add a constant condition check value to the unit. It takes a boolean argument. If set to false the condition will always fail, otherwise succeed.\n\n    If multiple conditions are specified the unit will be executed if all of them apply (i.e. a logical AND is applied). Condition checks can be prefixed with a pipe symbol (|) in which case a condition becomes a triggering condition. If at least one triggering condition is defined for a unit then the unit will be executed if at least one of the triggering conditions apply and all of the non-triggering conditions. If you prefix an argument with the pipe symbol and an exclamation mark the pipe symbol must be passed first, the exclamation second. Except for ConditionPathIsSymbolicLink=, all path checks follow symlinks. If any of these options is assigned the empty string the list of conditions is reset completely, all previous condition settings (of any kind) will have no effect.\n\nSourcePath=\n    A path to a configuration file this unit has been generated from. This is primarily useful for implementation of generator tools that convert configuration from an external configuration file format into native unit files. Thus functionality should not be used in normal units.\n\nUnit file may include a [Install] section, which carries installation information for the unit. This section is not interpreted by systemd(1) during runtime. It is used exclusively by the enable and disable commands of the systemctl(1) tool during installation of a unit:\n\nAlias=\n    Additional names this unit shall be installed under. The names listed here must have the same suffix (i.e. type) as the unit file name. This option may be specified more than once, in which case all listed names are used. At installation time, systemctl enable will create symlinks from these names to the unit filename.\n\nWantedBy=, RequiredBy=\n    A symbolic link is created in the .wants/ or .requires/ directory of the listed unit when this unit is activated by systemctl enable. This has the effect that a dependency of type Wants= or Requires= is added from the listed unit to the current unit. The primary result is that the current unit will be started when the listed unit is started. See the description of Wants= and Requires= in the [Unit] section for details.\n\n    WantedBy=foo.service in a service bar.service is mostly equivalent to Alias=foo.service.wants/bar.service in the same file. In case of template units, systemctl enable must be called with an instance name, and this instance will be added to the .wants/ or .requires/ list of the listed unit. E.g. WantedBy=getty.target in a service getty@.service will result in systemctl enable getty@tty2.service creating a getty.target.wants/getty@tty2.service link to getty@.service. \n\nAlso=\n    Additional units to install/deinstall when this unit is installed/deinstalled. If the user requests installation/deinstallation of a unit with this option configured, systemctl enable and systemctl disable will automatically install/uninstall units listed in this option as well.\n\nThe following specifiers are interpreted in the Install section: %n, %N, %p, %i, %U, %u, %m, %H, %b, %v. For their meaning see the next section.\nSpecifiers\n\nMany settings resolve specifiers which may be used to write generic unit files referring to runtime or unit parameters that are replaced when the unit files are loaded. The following specifiers are understood:\n\nTable 3. Specifiers available in unit files\nSpecifier\tMeaning\tDetails\n\"%n\"\t\tFull unit name\t \n\"%N\"\t\tUnescaped full unit name\t \n\"%p\"\t\tPrefix name\tFor instantiated units this refers to the string before the @. For non-instantiated units this refers to to the name of the unit with the type suffix removed.\n\"%P\"\t\tUnescaped prefix name\t \n\"%i\"\t\tInstance name\tFor instantiated units: this is the string between the \"@\" character and the suffix.\n\"%I\"\t\tUnescaped instance name\t \n\"%f\"\t\tUnescaped filename\tThis is either the unescaped instance name (if applicable) with / prepended (if applicable), or the prefix name similarly prepended with /.\n\"%c\"\t\tControl group path of the unit\t \n\"%r\"\t\tRoot control group path where units are placed.\tFor system instances this usually resolves to /system, except in containers, where the path might be prefixed with the container's root control group.\n\"%R\"\t\tParent directory of the control group path where units are placed.\tFor system instances this usually resolves to /, except in containers, where this resolves to the container's root directory. This specifier is particularly useful in the ControlGroup= setting (see systemd.exec(5)).\n\"%t\"\t\tRuntime socket dir\tThis is either /run (for the system manager) or \"$XDG_RUNTIME_DIR\" (for user managers).\n\"%u\"\t\tUser name\tThis is the name of the configured user of the unit, or (if none is set) the user running the systemd instance.\n\"%U\"\t\tUser UID\tThis is the UID of the configured user of the unit, or (if none is set) the user running the systemd instance.\n\"%h\"\t\tUser home directory\tThis is the home directory of the configured user of the unit, or (if none is set) the user running the systemd instance.\n\"%s\"\t\tUser shell\tThis is the shell of the configured user of the unit, or (if none is set) the user running the systemd instance. If the user is \"root\" (UID equal to 0), the shell configured in account database is ignored and /bin/sh is always used.\n\"%m\"\t\tMachine ID\tThe machine ID of the running system, formatted as string. See machine-id(5) for more information.\n\"%b\"\t\tBoot ID\tThe boot ID of the running system, formatted as string. See random(4) for more information.\n\"%H\"\t\tHost name\tThe hostname of the running system.\n\"%v\"\t\tKernel release\tIdentical to uname -r output.\n\"%%\"\t\tEscaped %\tSingle percent sign.\n\nSee Also\n\nsystemd(1), systemctl(8), systemd.special(7), systemd.service(5), systemd.socket(5), systemd.device(5), systemd.mount(5), systemd.automount(5), systemd.swap(5), systemd.target(5), systemd.path(5), systemd.timer(5), systemd.snapshot(5), systemd.scope(5), systemd.slice(5), systemd.time(7), capabilities(7), systemd.directives(7), uname(1) \n"
  },
  {
    "path": "packages/sysutils/systemd/config/system.d/cifs.mount.sample",
    "content": "# This is a sample service script to mount CIFS/SAMBA shares.\n# Please read carefully the comments in this file. For production usage\n# you can remove all comments (lines beginning with \"#\") from this file.\n\n\n[Unit]\n# The description should be used to explain what this servicefile is for\nDescription=test cifs mount script\n\n# if we do network mounts like here we *require* 'network-online.service'\n# which checks if the network is online\nRequires=network-online.service\n\n# our scripts must start *after* 'network-online.service', on timeout and if\n# 'network-online.service' fails we can not mount and this scripts fails too\nAfter=network-online.service\n\n# usually we mount networks shares because we want they avaible *before* XBMC starts.\n# so XBMC has access to this mounts from beginning. Note: this slows down the boot!\nBefore=kodi.service\n\n\n[Mount]\n# The share we want mount\nWhat=//192.168.0.31/Music\n\n# Where we want mount this share\nWhere=/storage/music2\n\n# Any options you usually use with the \"-o\" parameter in the mount command\nOptions=username=myusername,password=mypassword\n\n# filesystem type\nType=cifs\n\n\n[Install]\n# The target is used by 'systemctl enable <name_of_this_file.mount>' to link\n# this service to a runlevel for starting on boot. usually 'multi-user.target'\n# is ok here.\nWantedBy=multi-user.target\n\n# Important:\n# this file must be renamed to <mountpoint>.mount where <mountpoint>, is the FULL path\n# where the share will be mounted but slashes \"/\" MUST BE REPLACED with dashes \"-\" with .mount\n# as extension.\n# This means, if we want mount to \"/storage/music2\" (see above \"Where=/storage/music2\")\n# then this file must be renamed to 'storage-music2.mount' and can be enabled via ssh with the\n# command 'systemctl enable storage-music2.mount'\n\n"
  },
  {
    "path": "packages/sysutils/systemd/config/system.d/nfs.mount.sample",
    "content": "# This is a sample service script to mount NFS shares.\n# Please read carefully the comments in this file. For production usage\n# you can remove all comments (lines beginning with \"#\") from this file.\n\n\n[Unit]\n# The description should be used to explain what this servicefile is for\nDescription=test nfs mount script\n\n# if we do network mounts like here we *require* 'network-online.service'\n# which checks if the network is online\nRequires=network-online.service\n\n# our scripts must start *after* 'network-online.service', on timeout and if\n# 'network-online.service' fails we can not mount and this scripts fails too\nAfter=network-online.service\n\n# usually we mount networks shares because we want they avaible *before* XBMC starts.\n# so XBMC has access to this mounts from beginning. Note: this slows down the boot!\nBefore=kodi.service\n\n\n[Mount]\n# The share we want mount\nWhat=192.168.0.31:/movies\n\n# Where we want mount this share\nWhere=/storage/movies2\n\n# Any options you usually use with the \"-o\" parameter in the mount command\nOptions=\n\n# filesystem type (for NFSv4 use Type=nfs4)\nType=nfs\n\n\n[Install]\n# The target is used by 'systemctl enable <name_of_this_file.mount>' to link\n# this service to a runlevel for starting on boot. usually 'multi-user.target'\n# is ok here.\nWantedBy=multi-user.target\n\n# Important:\n# this file must be renamed to <mountpoint>.mount where <mountpoint>, is the FULL path\n# where the share will be mounted but slashes \"/\" MUST BE REPLACED with dashes \"-\" with .mount\n# as extension.\n# This means, if we want mount to \"/storage/movies2\" (see above \"Where=/storage/movies2\")\n# then this file must be renamed to 'storage-movies2.mount' and can be enabled via ssh with the\n# command 'systemctl enable storage-movies2.mount'\n"
  },
  {
    "path": "packages/sysutils/systemd/config/system.d/openvpn.service.sample",
    "content": "[Unit]\nDescription=OpenVPN Autorun Service\n\n[Service]\nType=forking\nRequires=network-online.service\nAfter=network-online.service\nExecStart=/usr/sbin/openvpn --daemon --config /storage/.config/openvpn.config\nRestart=always\nRestartSec=15\n\n[Install]\nWantedBy=kodi.target\n\n# NOTES:\n#\n# 1) Edit /storage/.config/openvpn.config to the .config/.conf/.ovpn file\n# from your VPN service provider and test it works first by connecting at\n# the console:\n# \n#   /usr/sbin/openvpn --daemon --config /storage/.config/openvpn.config\n#\n# 2) The openvpn.service file must be addeded to the active systemd config \n# before it will work. This is done by running:\n#  \n#   systemctl enable openvpn.service\n# \n# 3) If you suspend/resume your LibreELEC system you will need to stop and\n# restart the connection with a systemd *.power script, e.g.\n#\n#   mkdir -p /storage/.config/sleep.d\n#   nano /storage/.config/sleep.d/01-openvpn.power\n# \n# Copy the sample script below. Remove # marks except for #!/bin/bash\n#\n#   #!/bin/sh\n#   case \"$1\" in\n#     pre)\n#     systemctl stop openvpn.service\n#     ;;\n#     post)\n#     systemctl start openvpn.service\n#     ;;\n#   esac\n"
  },
  {
    "path": "packages/sysutils/systemd/config/timesyncd.conf.d/README",
    "content": "TIMESYNCD.CONF(5)               timesyncd.conf               TIMESYNCD.CONF(5)\n\nNAME\n       timesyncd.conf, timesyncd.conf.d - Network Time Synchronization\n       configuration files\n\nSYNOPSIS\n       /etc/systemd/timesyncd.conf\n\n       /etc/systemd/timesyncd.conf.d/*.conf\n\n       /run/systemd/timesyncd.conf.d/*.conf\n\n       /usr/lib/systemd/timesyncd.conf.d/*.conf\n\nDESCRIPTION\n       These configuration files control NTP network time synchronization. See\n       systemd.syntax(5) for a general description of the syntax.\n\nCONFIGURATION DIRECTORIES AND PRECEDENCE\n       The default configuration is defined during compilation, so a\n       configuration file is only needed when it is necessary to deviate from\n       those defaults. By default, the configuration file in /etc/systemd/\n       contains commented out entries showing the defaults as a guide to the\n       administrator. This file can be edited to create local overrides.\n\n       When packages need to customize the configuration, they can install\n       configuration snippets in /usr/lib/systemd/*.conf.d/. Files in /etc/\n       are reserved for the local administrator, who may use this logic to\n       override the configuration files installed by vendor packages. The main\n       configuration file is read before any of the configuration directories,\n       and has the lowest precedence; entries in a file in any configuration\n       directory override entries in the single configuration file. Files in\n       the *.conf.d/ configuration subdirectories are sorted by their filename\n       in lexicographic order, regardless of which of the subdirectories they\n       reside in. When multiple files specify the same option, for options\n       which accept just a single value, the entry in the file with the\n       lexicographically latest name takes precedence. For options which\n       accept a list of values, entries are collected as they occur in files\n       sorted lexicographically. It is recommended to prefix all filenames in\n       those subdirectories with a two-digit number and a dash, to simplify\n       the ordering of the files.\n\n       To disable a configuration file supplied by the vendor, the recommended\n       way is to place a symlink to /dev/null in the configuration directory\n       in /etc/, with the same filename as the vendor configuration file.\n\nOPTIONS\n       The following settings are configured in the \"[Time]\" section:\n\n       NTP=\n           A space-separated list of NTP server host names or IP addresses.\n           During runtime this list is combined with any per-interface NTP\n           servers acquired from systemd-networkd.service(8).\n           systemd-timesyncd will contact all configured system or\n           per-interface servers in turn until one is found that responds.\n           When the empty string is assigned, the list of NTP servers is\n           reset, and all assignments prior to this one will have no effect.\n           This setting defaults to an empty list.\n\n       FallbackNTP=\n           A space-separated list of NTP server host names or IP addresses to\n           be used as the fallback NTP servers. Any per-interface NTP servers\n           obtained from systemd-networkd.service(8) take precedence over this\n           setting, as do any servers set via NTP= above. This setting is\n           hence only used if no other NTP server information is known. When\n           the empty string is assigned, the list of NTP servers is reset, and\n           all assignments prior to this one will have no effect. If this\n           option is not given, a compiled-in list of NTP servers is used\n           instead.\n\n       RootDistanceMaxSec=\n           Maximum acceptable root distance. Takes a time value (in seconds).\n           Defaults to 5 seconds.\n\n       PollIntervalMinSec=, PollIntervalMaxSec=\n           The minimum and maximum poll intervals for NTP messages. Each\n           setting takes a time value (in seconds).  PollIntervalMinSec= must\n           not be smaller than 16 seconds.  PollIntervalMaxSec= must be larger\n           than PollIntervalMinSec=.  PollIntervalMinSec= defaults to 32\n           seconds, and PollIntervalMaxSec= defaults to 2048 seconds.\n\nSEE ALSO\n       systemd(1), systemd-timesyncd.service(8), systemd-networkd.service(8)\n\nsystemd 241                                                  TIMESYNCD.CONF(5)\n"
  },
  {
    "path": "packages/sysutils/systemd/config/tmpfiles.d/README",
    "content": "Name\n\ntmpfiles.d — Configuration for creation, deletion and cleaning of volatile and temporary files\n\nSynopsis\n\n/etc/tmpfiles.d/*.conf\n\n/run/tmpfiles.d/*.conf\n\n/usr/lib/tmpfiles.d/*.conf\n\nDescription\n\nsystemd-tmpfiles uses the configuration files from the above directories to describe the creation, cleaning and removal of volatile and temporary files and directories which usually reside in directories such as /run or /tmp.\nConfiguration Format\n\nEach configuration file shall be named in the style of <program>.conf. Files in /etc/ override files with the same name in /usr/lib/ and /run/. Files in /run/ override files with the same name in /usr/lib/. Packages should install their configuration files in /usr/lib/. Files in /etc/ are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages. All configuration files are sorted by their filename in alphabetical order, regardless in which of the directories they reside, to guarantee that a specific configuration file takes precedence over another file with an alphabetically later name.\n\nIf the administrator wants to disable a configuration file supplied by the vendor the recommended way is to place a symlink to /dev/null in /etc/tmpfiles.d/ bearing the same filename.\n\nThe configuration format is one line per path containing action, path, mode, ownership, age and argument fields:\n\nType Path        Mode UID  GID  Age Argument\nd    /run/user   0755 root root 10d -\nL    /tmp/foobar -    -    -    -   /dev/null\n\nType\n\nf\n    Create a file if it doesn't exist yet (optionally writing a short string into it, if the argument parameter is passed)\n\nF\n    Create or truncate a file (optionally writing a short string into it, if the argument parameter is passed)\n\nw\n    Write the argument parameter to a file, if the file exists. Lines of this type accept shell-style globs in place of normal path names. The argument parameter will be written without a trailing newline. C-style backslash escapes are interpreted.\n\nd\n    Create a directory if it doesn't exist yet\n\nD\n    Create or empty a directory\n\np\n    Create a named pipe (FIFO) if it doesn't exist yet\n\nL\n    Create a symlink if it doesn't exist yet\n\nc\n    Create a character device node if it doesn't exist yet\n\nb\n    Create a block device node if it doesn't exist yet\n\nx\n    Ignore a path during cleaning. Use this type to exclude paths from clean-up as controlled with the Age parameter. Note that lines of this type do not influence the effect of r or R lines. Lines of this type accept shell-style globs in place of normal path names.\n\nX\n    Ignore a path during cleanup. Use this type to prevent path removal as controlled with the Age parameter. Note that if path is a directory, content of a directory is not excluded from clean-up, only directory itself. Lines of this type accept shell-style globs in place of normal path names.\n\nr\n    Remove a file or directory if it exists. This may not be used to remove non-empty directories, use R for that. Lines of this type accept shell-style globs in place of normal path names.\n\nR\n    Recursively remove a path and all its subdirectories (if it is a directory). Lines of this type accept shell-style globs in place of normal path names.\n\nz\n    Restore SELinux security context label and set ownership and access mode of a file or directory if it exists. Lines of this type accept shell-style globs in place of normal path names. \n\nZ\n    Recursively restore SELinux security context label and set ownership and access mode of a path and all its subdirectories (if it is a directory). Lines of this type accept shell-style globs in place of normal path names.\n\nMode\n\nThe file access mode to use when creating this file or directory. If omitted or when set to - the default is used: 0755 for directories, 0644 for all other file objects. For z, Z lines if omitted or when set to - the file access mode will not be modified. This parameter is ignored for x, r, R, L lines.\nUID, GID\n\nThe user and group to use for this file or directory. This may either be a numeric user/group ID or a user or group name. If omitted or when set to - the default 0 (root) is used. For z, Z lines when omitted or when set to - the file ownership will not be modified. These parameters are ignored for x, r, R, L lines.\nAge\n\nThe date field, when set, is used to decide what files to delete when cleaning. If a file or directory is older than the current time minus the age field it is deleted. The field format is a series of integers each followed by one of the following postfixes for the respective time units:\n\ns, min, h, d, w, ms, m, us\n\nIf multiple integers and units are specified the time values are summed up. If an integer is given without a unit, s is assumed.\n\nWhen the age is set to zero, the files are cleaned unconditionally.\n\nThe age field only applies to lines starting with d, D and x. If omitted or set to - no automatic clean-up is done.\n\nIf the age field starts with a tilde character (~) the clean-up is only applied to files and directories one level inside the directory specified, but not the files and directories immediately inside it.\nArgument\n\nFor L lines determines the destination path of the symlink. For c, b determines the major/minor of the device node, with major and minor formatted as integers, separated by :, e.g. \"1:3\". For f, F, w may be used to specify a short string that is written to the file, suffixed by a newline. Ignored for all other lines.\nExample\n\nExample 1. /etc/tmpfiles.d/screen.conf example\n\nscreen needs two directories created at boot with specific modes and ownership.\n\nd /var/run/screens  1777 root root 10d\nd /var/run/uscreens 0755 root root 10d12h\n\n\nSee Also\n\nsystemd(1), systemd-tmpfiles(8), systemd-delta(1) \n"
  },
  {
    "path": "packages/sysutils/systemd/config/udev.rules.d/README",
    "content": "The files in this directory are read by udev(7) and used when events\nare performed by the kernel.  The udev daemon watches this directory\nwith inotify so that changes to these files are automatically picked\nup, for this reason they must be files and not symlinks to another\nlocation as in the case in Debian.\n\nPackages do not generally install rules here, this directory is for\nlocal rules.  If you want to override behaviour of package-supplied\nrules, which can be found in /usr/lib/udev/rules.d, you can do one of\ntwo things:\n\n 1) Write your own rules in this directory that assign the name,\n    symlinks, permissions, etc. that you want.  Pick a number higher\n    than the rules you want to override, and yours will be used.\n\n 2) Copy the file from /usr/lib/udev/rules.d and edit it here; you\n    should generally only do this if you want to prevent a program\n    from being run.\n\n\nIf the ordering of files in this directory are not important to you,\nit's recommended that you simply name your files \"descriptive-name.rules\"\nsuch that they are processed AFTER all numbered rules in both this\ndirectory and /usr/lib/udev/rules.d and thus override anything set there.\n\n"
  },
  {
    "path": "packages/sysutils/systemd/hwdb.d/70-local-keyboard.hwdb",
    "content": "# alfawise z1 remote\nevdev:input:b0005v2B54p1603e*\n KEYBOARD_KEY_c0041=enter\n\n# auvipal g9f\nevdev:input:b0005v045Ep0041*\n KEYBOARD_KEY_c0041=enter\n KEYBOARD_KEY_70071=l\n KEYBOARD_KEY_70070=g\n KEYBOARD_KEY_7006f=x\n KEYBOARD_KEY_7006e=i\n\n# buzztv bt-300/bt-400 smart remote\nevdev:input:b0005v0957p1001*\n KEYBOARD_KEY_c0041=enter\n KEYBOARD_KEY_c0040=c\n KEYBOARD_KEY_70040=z\n KEYBOARD_KEY_70041=esc\n KEYBOARD_KEY_70042=t\n KEYBOARD_KEY_70043=e\n KEYBOARD_KEY_70044=o\n KEYBOARD_KEY_70045=volumeup\n KEYBOARD_KEY_70069=volumedown\n\n# g7bts remote\nevdev:input:b0005v045Ep0041e0300*\n KEYBOARD_KEY_c0041=enter\n\n# g20bts remote\nevdev:input:b0005v2B54p1600e0000*\n KEYBOARD_KEY_c0041=enter\n\n# homatics b21\nevdev:input:b0005v0957p0006*\n# homatics b21 variant (sold with dongle g 4k)\nevdev:input:b0005v0957p0019*\n# dune b25\nevdev:input:b0005v0957p000A*\n KEYBOARD_KEY_c0041=enter\n KEYBOARD_KEY_c009c=up\n KEYBOARD_KEY_c009d=down\n KEYBOARD_KEY_c0030=s\n KEYBOARD_KEY_c008d=e\n KEYBOARD_KEY_c0221=o\n KEYBOARD_KEY_c0077=a\n KEYBOARD_KEY_c0078=l\n KEYBOARD_KEY_c0079=n\n KEYBOARD_KEY_c007a=q\n KEYBOARD_KEY_c0096=v\n KEYBOARD_KEY_c01bb=z\n\n# justboom smart remote\nevdev:input:b0003v2252p0120*\n KEYBOARD_KEY_c0041=enter\n KEYBOARD_KEY_c0040=c\n\n# nokia 8010 remotes\nevdev:input:b0005v1D5A*\n KEYBOARD_KEY_c0041=enter\n\n# nvidia shield remotes\nevdev:input:b0005v0955p7213*\n KEYBOARD_KEY_c0041=enter\n\nevdev:input:b0005v0955p7217*\n KEYBOARD_KEY_c0041=enter\n\n# o2.cz khamsin bluetooth remote\nevdev:input:b0005v0217p0000e0110*\n KEYBOARD_KEY_c0041=enter\n KEYBOARD_KEY_c0040=c\n\n# osmcrf25 remotes\nevdev:input:b0003v2252p1069*\n KEYBOARD_KEY_7002e=volumeup\n KEYBOARD_KEY_7002d=volumedown\n KEYBOARD_KEY_7000c=kpleftparen\n KEYBOARD_KEY_70006=kprightparen\n\nevdev:input:b0003v2017p1690*\n KEYBOARD_KEY_7002e=volumeup\n KEYBOARD_KEY_7002d=volumedown\n KEYBOARD_KEY_7000c=kpleftparen\n KEYBOARD_KEY_70006=kprightparen\n\nevdev:input:b0003v2017p1689*\n KEYBOARD_KEY_7002e=volumeup\n KEYBOARD_KEY_7002d=volumedown\n KEYBOARD_KEY_7000c=kpleftparen\n KEYBOARD_KEY_70006=kprightparen\n\nevdev:input:b0003v2017p1688*\n KEYBOARD_KEY_7004a=esc\n KEYBOARD_KEY_c0060=kpleftparen\n KEYBOARD_KEY_10084=kprightparen\n KEYBOARD_KEY_7002e=volumeup\n KEYBOARD_KEY_7002d=volumedown\n\nevdev:input:b0003v2252p1037*\n KEYBOARD_KEY_7004a=esc\n KEYBOARD_KEY_c0060=kpleftparen\n KEYBOARD_KEY_10084=kprightparen\n\n# ugoos ur01-ble remote\nevdev:input:b0005v005Dp0001*\n KEYBOARD_KEY_c0041=enter\n\n# wechip g20 remote\nevdev:input:b0003v4842p0001*\n KEYBOARD_KEY_c0041=enter\n\n# xaomi remote\nevdev:input:b0005v2717p32B9e4A4C*\n KEYBOARD_KEY_c0041=enter\n\n# yyykq remote\nevdev:input:b0005v0416p0300*\n KEYBOARD_KEY_c0041=enter\n\n# zidoo v10\nevdev:input:b0005v2B54p1600*\n KEYBOARD_KEY_c0041=enter\n"
  },
  {
    "path": "packages/sysutils/systemd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"systemd\"\nPKG_VERSION=\"252.6\"\nPKG_SHA256=\"5f0b391f7e481f9ce0798515f34e85963990d42a27f9f80fc9e7321610b69784\"\nPKG_LICENSE=\"LGPL2.1+\"\nPKG_SITE=\"http://www.freedesktop.org/wiki/Software/systemd\"\nPKG_URL=\"https://github.com/systemd/systemd-stable/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libcap kmod util-linux entropy libidn2 wait-time-sync Jinja2:host\"\nPKG_LONGDESC=\"A system and session manager for Linux, compatible with SysV and LSB init scripts.\"\n\nPKG_MESON_OPTS_TARGET=\"--libdir=/usr/lib \\\n                       -Drootprefix=/usr \\\n                       -Dsplit-usr=false \\\n                       -Dsplit-bin=true \\\n                       -Ddefault-hierarchy=hybrid \\\n                       -Dtty-gid=5 \\\n                       -Dtests=false \\\n                       -Dseccomp=false \\\n                       -Dselinux=false \\\n                       -Dapparmor=false \\\n                       -Dpolkit=false \\\n                       -Dacl=false \\\n                       -Daudit=false \\\n                       -Dblkid=true \\\n                       -Dfdisk=false \\\n                       -Dkmod=true \\\n                       -Dpam=false \\\n                       -Dpwquality=false \\\n                       -Dmicrohttpd=false \\\n                       -Dlibcryptsetup=false \\\n                       -Dlibcurl=false \\\n                       -Dlibidn=false \\\n                       -Dlibidn2=true \\\n                       -Dlibiptc=false \\\n                       -Dqrencode=false \\\n                       -Dgcrypt=false \\\n                       -Dgnutls=false \\\n                       -Dopenssl=false \\\n                       -Dp11kit=false \\\n                       -Delfutils=false \\\n                       -Dzlib=false \\\n                       -Dbzip2=false \\\n                       -Dxz=false \\\n                       -Dlz4=false \\\n                       -Dxkbcommon=false \\\n                       -Dpcre2=false \\\n                       -Dglib=false \\\n                       -Ddbus=false \\\n                       -Ddefault-dnssec=no \\\n                       -Dimportd=false \\\n                       -Dremote=false \\\n                       -Dutmp=true \\\n                       -Dhibernate=false \\\n                       -Denvironment-d=false \\\n                       -Dbinfmt=false \\\n                       -Drepart=false \\\n                       -Dcoredump=false \\\n                       -Dresolve=false \\\n                       -Dlogind=true \\\n                       -Dhostnamed=true \\\n                       -Dlocaled=false \\\n                       -Dmachined=false \\\n                       -Dportabled=false \\\n                       -Duserdb=false \\\n                       -Dhomed=false \\\n                       -Dnetworkd=false \\\n                       -Dtimedated=false \\\n                       -Dtimesyncd=true \\\n                       -Dfirstboot=false \\\n                       -Drandomseed=false \\\n                       -Dbacklight=false \\\n                       -Dvconsole=false \\\n                       -Dquotacheck=false \\\n                       -Dsysusers=false \\\n                       -Dtmpfiles=true \\\n                       -Dhwdb=true \\\n                       -Drfkill=false \\\n                       -Dldconfig=false \\\n                       -Dtpm=false \\\n                       -Dima=false \\\n                       -Dsmack=false \\\n                       -Dgshadow=false \\\n                       -Didn=false \\\n                       -Dnss-myhostname=false \\\n                       -Dnss-mymachines=false \\\n                       -Dnss-resolve=false \\\n                       -Dnss-systemd=false \\\n                       -Dman=false \\\n                       -Dhtml=false \\\n                       -Dlink-udev-shared=true \\\n                       -Dlink-systemctl-shared=true \\\n                       -Dlink-networkd-shared=false \\\n                       -Dbashcompletiondir=no \\\n                       -Dzshcompletiondir=no \\\n                       -Dkmod-path=/usr/bin/kmod \\\n                       -Dmount-path=/usr/bin/mount \\\n                       -Dumount-path=/usr/bin/umount \\\n                       -Ddebug-tty=${DEBUG_TTY} \\\n                       -Dversion-tag=${PKG_VERSION}\"\n\nif [ \"${PROJECT}\" = \"Generic\" ]; then\n  PKG_MESON_OPTS_TARGET+=\" -Defi=true\"\nelse\n  PKG_MESON_OPTS_TARGET+=\" -Defi=false\"\nfi\n\npre_configure_target() {\n  export TARGET_CFLAGS=\"${TARGET_CFLAGS} -fno-schedule-insns -fno-schedule-insns2 -Wno-format-truncation\"\n  export LC_ALL=en_US.UTF-8\n}\n\npost_makeinstall_target() {\n  # remove unneeded stuff\n  safe_remove ${INSTALL}/etc/init.d\n  safe_remove ${INSTALL}/etc/systemd/system\n  safe_remove ${INSTALL}/etc/xdg\n  safe_remove ${INSTALL}/etc/X11\n  safe_remove ${INSTALL}/usr/bin/kernel-install\n  safe_remove ${INSTALL}/usr/lib/kernel/install.d\n  safe_remove ${INSTALL}/usr/lib/rpm\n  safe_remove ${INSTALL}/usr/lib/systemd/user\n  safe_remove ${INSTALL}/usr/lib/tmpfiles.d/etc.conf\n  safe_remove ${INSTALL}/usr/lib/tmpfiles.d/home.conf\n  safe_remove ${INSTALL}/usr/share/factory\n\n  # remove Network adaper renaming rule, this is confusing\n  safe_remove ${INSTALL}/usr/lib/udev/rules.d/80-net-setup-link.rules\n\n  safe_remove ${INSTALL}/usr/lib/udev/rules.d/71-seat.rules\n  safe_remove ${INSTALL}/usr/lib/udev/rules.d/73-seat-late.rules\n\n  # remove getty units, we dont want a console\n  safe_remove ${INSTALL}/usr/lib/systemd/system/autovt@.service\n  safe_remove ${INSTALL}/usr/lib/systemd/system/console-getty.service\n  safe_remove ${INSTALL}/usr/lib/systemd/system/container-getty@.service\n  safe_remove ${INSTALL}/usr/lib/systemd/system/getty.target\n  safe_remove ${INSTALL}/usr/lib/systemd/system/getty@.service\n  safe_remove ${INSTALL}/usr/lib/systemd/system/serial-getty@.service\n  safe_remove ${INSTALL}/usr/lib/systemd/system/*.target.wants/getty.target\n\n  # remove other notused or nonsense stuff (our /etc is ro)\n  safe_remove ${INSTALL}/usr/lib/systemd/systemd-update-done\n  safe_remove ${INSTALL}/usr/lib/systemd/system/systemd-update-done.service\n  safe_remove ${INSTALL}/usr/lib/systemd/system/*.target.wants/systemd-update-done.service\n  #\n  safe_remove ${INSTALL}/usr/lib/systemd/system/dev-hugepages.mount\n  safe_remove ${INSTALL}/usr/lib/systemd/system/*.target.wants/dev-hugepages.mount\n  #\n  safe_remove ${INSTALL}/usr/lib/systemd/system/systemd-journald-audit.socket\n  safe_remove ${INSTALL}/usr/lib/systemd/system/*.target.wants/systemd-journald-audit.socket\n\n  # adjust systemd-hwdb-update (we have read-only /etc).\n  sed '/^ConditionNeedsUpdate=.*$/d' -i ${INSTALL}/usr/lib/systemd/system/systemd-hwdb-update.service\n\n  # remove nspawn\n  safe_remove ${INSTALL}/usr/bin/systemd-nspawn\n  safe_remove ${INSTALL}/usr/lib/systemd/system/systemd-nspawn@.service\n\n  # remove unneeded generators\n  for gen in ${INSTALL}/usr/lib/systemd/system-generators/*; do\n    case \"${gen}\" in\n      */systemd-debug-generator)\n        # keep it\n        ;;\n      *)\n        safe_remove \"${gen}\"\n        ;;\n    esac\n  done\n\n  # remove catalog\n  safe_remove ${INSTALL}/usr/lib/systemd/catalog\n\n  # remove partition\n  safe_remove ${INSTALL}/usr/lib/systemd/systemd-growfs\n  safe_remove ${INSTALL}/usr/lib/systemd/systemd-makefs\n\n  # distro preset policy\n  safe_remove ${INSTALL}/usr/lib/systemd/system-preset/*\n  echo \"disable *\" > ${INSTALL}/usr/lib/systemd/system-preset/99-default.preset\n\n  safe_remove ${INSTALL}/usr/lib/systemd/user-preset/*\n  echo \"disable *\" > ${INSTALL}/usr/lib/systemd/user-preset/90-systemd.preset\n\n  # remove networkd\n  safe_remove ${INSTALL}/usr/lib/systemd/network\n\n  # remove systemd-time-wait-sync (not detecting slew time updates, using package wait-time-sync)\n  safe_remove ${INSTALL}/usr/lib/systemd/system/systemd-time-wait-sync.service\n  safe_remove ${INSTALL}/usr/lib/systemd/systemd-time-wait-sync\n\n  # tune journald.conf\n  sed -e \"s,^.*Compress=.*$,Compress=no,g\" -i ${INSTALL}/etc/systemd/journald.conf\n  sed -e \"s,^.*MaxFileSec=.*$,MaxFileSec=0,g\" -i ${INSTALL}/etc/systemd/journald.conf\n  sed -e \"s,^.*MaxRetentionSec=.*$,MaxRetentionSec=0,g\" -i ${INSTALL}/etc/systemd/journald.conf\n  sed -e \"s,^.*RuntimeMaxUse=.*$,RuntimeMaxUse=2M,g\" -i ${INSTALL}/etc/systemd/journald.conf\n  sed -e \"s,^.*RuntimeMaxFileSize=.*$,RuntimeMaxFileSize=128K,g\" -i ${INSTALL}/etc/systemd/journald.conf\n  sed -e \"s,^.*SplitMode=.*$,SplitMode=none,g\" -i ${INSTALL}/etc/systemd/journald.conf\n  sed -e \"s,^.*SystemMaxUse=.*$,SystemMaxUse=10M,g\" -i ${INSTALL}/etc/systemd/journald.conf\n\n  # tune logind.conf\n  sed -e \"s,^.*HandleLidSwitch=.*$,HandleLidSwitch=ignore,g\" -i ${INSTALL}/etc/systemd/logind.conf\n  if [ \"${DISPLAYSERVER}\" == \"no\" && ${DISTRO} != \"EmuELEC\" ]; then\n    sed -e \"s,^.*HandlePowerKey=.*$,HandlePowerKey=poweroff,g\" -i ${INSTALL}/etc/systemd/logind.conf\n  else\n    sed -e \"s,^.*HandlePowerKey=.*$,HandlePowerKey=ignore,g\" -i ${INSTALL}/etc/systemd/logind.conf\n  fi\n\n  # replace systemd-machine-id-setup with ours\n  safe_remove ${INSTALL}/usr/lib/systemd/system/systemd-machine-id-commit.service\n  safe_remove ${INSTALL}/usr/lib/systemd/system/*.target.wants/systemd-machine-id-commit.service\n  safe_remove ${INSTALL}/usr/bin/systemd-machine-id-setup\n  mkdir -p ${INSTALL}/usr/bin\n  cp ${PKG_DIR}/scripts/systemd-machine-id-setup ${INSTALL}/usr/bin\n  cp ${PKG_DIR}/scripts/userconfig-setup ${INSTALL}/usr/bin\n  cp ${PKG_DIR}/scripts/usercache-setup ${INSTALL}/usr/bin\n  cp ${PKG_DIR}/scripts/environment-setup ${INSTALL}/usr/bin\n\n  # use systemd to set cpufreq governor and tunables\n  find_file_path scripts/cpufreq && cp -PRv ${FOUND_PATH} ${INSTALL}/usr/bin\n\n  mkdir -p ${INSTALL}/usr/sbin\n  cp ${PKG_DIR}/scripts/network-base-setup ${INSTALL}/usr/sbin\n  cp ${PKG_DIR}/scripts/systemd-timesyncd-setup ${INSTALL}/usr/sbin\n\n  # /etc/resolv.conf and /etc/hosts must be writable\n  ln -sf /run/libreelec/resolv.conf ${INSTALL}/etc/resolv.conf\n  ln -sf /run/libreelec/hosts ${INSTALL}/etc/hosts\n  ln -sf /run/libreelec/environment ${INSTALL}/etc/environment\n\n  # provide 'halt', 'shutdown', 'reboot' & co.\n  ln -sf /usr/bin/systemctl ${INSTALL}/usr/sbin/halt\n  ln -sf /usr/bin/systemctl ${INSTALL}/usr/sbin/poweroff\n  ln -sf /usr/bin/systemctl ${INSTALL}/usr/sbin/reboot\n  ln -sf /usr/bin/systemctl ${INSTALL}/usr/sbin/runlevel\n  ln -sf /usr/bin/systemctl ${INSTALL}/usr/sbin/shutdown\n  ln -sf /usr/bin/systemctl ${INSTALL}/usr/sbin/telinit\n\n  # strip\n  debug_strip ${INSTALL}/usr\n\n  # defaults\n  mkdir -p ${INSTALL}/usr/config\n  cp -PR ${PKG_DIR}/config/* ${INSTALL}/usr/config\n\n  safe_remove ${INSTALL}/etc/modules-load.d\n  ln -sf /storage/.config/modules-load.d ${INSTALL}/etc/modules-load.d\n  ln -sf /storage/.config/logind.conf.d ${INSTALL}/etc/systemd/logind.conf.d\n  ln -sf /storage/.config/sleep.conf.d ${INSTALL}/etc/systemd/sleep.conf.d\n  ln -sf /storage/.config/timesyncd.conf.d ${INSTALL}/etc/systemd/timesyncd.conf.d\n  safe_remove ${INSTALL}/etc/sysctl.d\n  ln -sf /storage/.config/sysctl.d ${INSTALL}/etc/sysctl.d\n  safe_remove ${INSTALL}/etc/tmpfiles.d\n  ln -sf /storage/.config/tmpfiles.d ${INSTALL}/etc/tmpfiles.d\n  safe_remove ${INSTALL}/etc/udev/hwdb.d\n  ln -sf /storage/.config/hwdb.d ${INSTALL}/etc/udev/hwdb.d\n  safe_remove ${INSTALL}/etc/udev/rules.d\n  ln -sf /storage/.config/udev.rules.d ${INSTALL}/etc/udev/rules.d\n\n  # journald\n  ln -sf /storage/.cache/journald.conf.d ${INSTALL}/usr/lib/systemd/journald.conf.d\n}\n\npost_install() {\n  add_group systemd-journal 190\n\n  add_group systemd-timesync 191\n  add_user systemd-timesync x 191 191 \"systemd-timesync\" \"/\" \"/bin/false\"\n\n  add_group systemd-network 193\n  add_user systemd-network x 193 193 \"systemd-network\" \"/\" \"/bin/sh\"\n\n  add_group audio 63 pipewire\n  add_group cdrom 11\n  add_group dialout 18\n  add_group disk 6\n  add_group floppy 19\n  add_group kmem 9\n  add_group kvm 10\n  add_group lp 7\n  add_group render 12\n  add_group tape 33\n  add_group tty 5\n  add_group video 39 pipewire\n  add_group utmp 22\n  add_group input 199\n\n  enable_service machine-id.service\n  enable_service debugconfig.service\n  enable_service userconfig.service\n  enable_service usercache.service\n  enable_service envconfig.service\n  enable_service cpufreq.service\n  enable_service network-base.service\n  enable_service systemd-timesyncd.service\n  enable_service systemd-timesyncd-setup.service\n  enable_service debug-shell.service\n}\n"
  },
  {
    "path": "packages/sysutils/systemd/patches/systemd-0001-move-etc-systemd-system-to-storage-.config-system.d.patch",
    "content": "commit 43aba5ffffc6d35ed97db035c5818c76652b06de\nAuthor: Matthias Reichl <hias@horus.com>\nDate:   Mon Sep 28 23:55:13 2020 +0200\n\n    move /etc/systemd/system to /storage/.config/system.d\n\ndiff --git a/meson.build b/meson.build\nindex dbbddb68e2..4592cd1094 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -266,7 +266,7 @@\n conf.set_quoted('SYSTEMD_UPDATE_HELPER_PATH',                 rootlibexecdir / 'systemd-update-helper')\n conf.set_quoted('SYSTEMD_USERWORK_PATH',                      rootlibexecdir / 'systemd-userwork')\n conf.set_quoted('SYSTEMD_VERITYSETUP_PATH',                   rootlibexecdir / 'systemd-veritysetup')\n-conf.set_quoted('SYSTEM_CONFIG_UNIT_DIR',                     pkgsysconfdir / 'system')\n+conf.set_quoted('SYSTEM_CONFIG_UNIT_DIR',                     '/storage/.config/system.d')\n conf.set_quoted('SYSTEM_DATA_UNIT_DIR',                       systemunitdir)\n conf.set_quoted('SYSTEM_ENV_GENERATOR_DIR',                   systemenvgeneratordir)\n conf.set_quoted('SYSTEM_GENERATOR_DIR',                       systemgeneratordir)\n"
  },
  {
    "path": "packages/sysutils/systemd/patches/systemd-0002-move-hwdb.bin-to-run.patch",
    "content": "From bf2776b7f9403057cb82c2697e4fca8b554db4bd Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Thu, 11 Apr 2019 20:00:05 +0100\nSubject: [PATCH] move hwdb.bin to /run\n\n---\n src/shared/hwdb-util.c   | 2 +-\n src/libsystemd/sd-hwdb/hwdb-internal.h     | 2 +-\n units/systemd-hwdb-update.service.in | 2 +-\n 3 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/src/shared/hwdb-util.c b/src/shared/hwdb-util.c\nindex c83575c..6285f3d 100644\n--- a/src/shared/hwdb-util.c\n+++ b/src/shared/hwdb-util.c\n@@ -21,7 +21,7 @@\n #include \"strv.h\"\n #include \"tmpfile-util.h\"\n \n-static const char *default_hwdb_bin_dir = \"/etc/udev\";\n+static const char *default_hwdb_bin_dir = \"/run\";\n static const char * const conf_file_dirs[] = {\n         \"/etc/udev/hwdb.d\",\n         UDEVLIBEXECDIR \"/hwdb.d\",\ndiff --git a/src/libsystemd/sd-hwdb/hwdb-internal.h b/src/libsystemd/sd-hwdb/hwdb-internal.h\nindex 79fe1a8..0acbf71 100644\n--- a/src/libsystemd/sd-hwdb/hwdb-internal.h\t2021-07-07 17:41:29.000000000 +0000\n+++ b/src/libsystemd/sd-hwdb/hwdb-internal.h\t2021-07-08 10:59:13.723718762 +0000\n@@ -83,7 +83,7 @@\n \n #define hwdb_bin_paths                          \\\n         \"/etc/systemd/hwdb/hwdb.bin\\0\"          \\\n-        \"/etc/udev/hwdb.bin\\0\"                  \\\n+        \"/run/hwdb.bin\\0\"                       \\\n         \"/usr/lib/systemd/hwdb/hwdb.bin\\0\"      \\\n         _CONF_PATHS_SPLIT_USR_NULSTR(\"systemd/hwdb/hwdb.bin\") \\\n         UDEVLIBEXECDIR \"/hwdb.bin\\0\"\ndiff --git a/units/systemd-hwdb-update.service.in b/units/systemd-hwdb-update.service.in\nindex 259fe0d..18d617f 100644\n--- a/units/systemd-hwdb-update.service.in\n+++ b/units/systemd-hwdb-update.service.in\n@@ -16,7 +16,7 @@\n Before=sysinit.target shutdown.target systemd-update-done.service\n ConditionNeedsUpdate=/etc\n ConditionPathExists=|!{{UDEVLIBEXECDIR}}/hwdb.bin\n-ConditionPathExists=|/etc/udev/hwdb.bin\n+ConditionPathExists=|/run/hwdb.bin\n ConditionDirectoryNotEmpty=|/etc/udev/hwdb.d/\n \n [Service]\n-- \n2.14.1\n\n"
  },
  {
    "path": "packages/sysutils/systemd/patches/systemd-0003-remove-nonexistant-dependency.patch",
    "content": "From 382709612ae03d6f81049ac72ac2dabd7613763d Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Wed, 18 Feb 2015 18:23:47 +0200\nSubject: [PATCH 7/8] remove nonexistant dependency\n\n---\n units/graphical.target |    1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/units/graphical.target b/units/graphical.target\nindex 87be97e..b01b46d 100644\n--- a/units/graphical.target\n+++ b/units/graphical.target\n@@ -11,7 +11,6 @@\n Description=Graphical Interface\n Documentation=man:systemd.special(7)\n Requires=multi-user.target\n-Wants=display-manager.service\n Conflicts=rescue.service rescue.target\n After=multi-user.target rescue.service rescue.target display-manager.service\n AllowIsolate=yes\n-- \n1.7.10.4\n\n"
  },
  {
    "path": "packages/sysutils/systemd/patches/systemd-0200-persist-persistent-timer-stamps.patch",
    "content": "From c1bcb16c35724404d30fab53017b757c886e9ab7 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Mon, 8 Jan 2018 13:46:51 +0000\nSubject: [PATCH] timers: use a persistent filesystem for persistent timers\n\n---\n src/core/timer.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/src/core/timer.c b/src/core/timer.c\nindex 03935ee..bfd5c02 100644\n--- a/src/core/timer.c\n+++ b/src/core/timer.c\n@@ -144,11 +144,11 @@ static int timer_setup_persistent(Timer *t) {\n \n         if (MANAGER_IS_SYSTEM(UNIT(t)->manager)) {\n \n-                r = unit_require_mounts_for(UNIT(t), \"/var/lib/systemd/timers\", UNIT_DEPENDENCY_FILE);\n+                r = unit_require_mounts_for(UNIT(t), \"/storage/.cache/systemd/timers\", UNIT_DEPENDENCY_FILE);\n                 if (r < 0)\n                         return r;\n \n-                stamp_path = strjoin(\"/var/lib/systemd/timers/stamp-\", UNIT(t)->id);\n+                stamp_path = strjoin(\"/storage/.cache/systemd/timers/stamp-\", UNIT(t)->id);\n         } else {\n                 const char *e;\n \n-- \n2.14.1\n\n"
  },
  {
    "path": "packages/sysutils/systemd/patches/systemd-0300-config-env-unhide-cursor.patch",
    "content": "From 49285dae6756b22bc6881c04939f7c43c35b5506 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Sat, 29 Jun 2019 00:26:41 +0100\nSubject: [PATCH] debug-shell: configure environment, unhide cursor\n\n---\n units/debug-shell.service.in | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/units/debug-shell.service.in b/units/debug-shell.service.in\nindex 1127e68..4c3e971 100644\n--- a/units/debug-shell.service.in\n+++ b/units/debug-shell.service.in\n@@ -15,8 +15,8 @@ IgnoreOnIsolate=yes\n ConditionPathExists={{DEBUGTTY}}\n \n [Service]\n-Environment=TERM=linux\n-ExecStart={{SUSHELL}}\n+Environment=ENV=/etc/profile\n+ExecStart=/bin/sh -c 'echo -en \"\\033[?25h\"; exec /bin/sh'\n Restart=always\n RestartSec=0\n StandardInput=tty\n-- \n2.14.1\n\n"
  },
  {
    "path": "packages/sysutils/systemd/patches/systemd-0500-Add-working-directory-storage-for-debug-shell.patch",
    "content": "From c38a2fc53e5ebb3fc4637a168408591003aad0fb Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Mon, 30 Sep 2019 12:20:00 +0200\nSubject: [PATCH] Add working directory '/storage' for debug-shell\n\n---\n units/debug-shell.service.in | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/units/debug-shell.service.in b/units/debug-shell.service.in\nindex 9f3868e106..d5f93f18a6 100644\n--- a/units/debug-shell.service.in\n+++ b/units/debug-shell.service.in\n@@ -16,6 +16,7 @@ IgnoreOnIsolate=yes\n ConditionPathExists=@DEBUGTTY@\n\n [Service]\n+WorkingDirectory=/storage\n Environment=ENV=/etc/profile\n ExecStart=/bin/sh -c 'echo -en \"\\033[?25h\"; exec /bin/sh'\n Restart=always\n--\n2.17.1\n"
  },
  {
    "path": "packages/sysutils/systemd/patches/systemd-0600-SDCARDFS_SUPER_MAGIC.patch",
    "content": "--- a/src/basic/check-filesystems.sh\t2022-02-01 21:47:06.181142404 +0100\n+++ b/src/basic/check-filesystems.sh\t2022-02-01 21:45:58.760989671 +0100\n@@ -23,7 +23,8 @@ for fs in $($cpp -dM $includes - </dev/n\n         # STACK_END_MAGIC doesn't refer to a filesystem\n         # mtd_inode was removed in 2015\n         # futexfs was removed in 2018\n-        if [[ \"$fs\" =~ ^(STACK_END_MAGIC|MTD_INODE_FS_MAGIC|FUTEXFS_SUPER_MAGIC)$ ]]; then\n+        # sdcardfs is Android thing\n+        if [[ \"$fs\" =~ ^(STACK_END_MAGIC|MTD_INODE_FS_MAGIC|FUTEXFS_SUPER_MAGIC|SDCARDFS_SUPER_MAGIC)$ ]]; then\n             continue\n         fi\n         echo \"Filesystem found in kernel header but not in $(basename \"$filesystems_gperf\"): $fs\";\n"
  },
  {
    "path": "packages/sysutils/systemd/patches/systemd-501-Start-debug-service-after-locale-to-ensure-file-syst.patch",
    "content": "From 74ffc6f540d6bf0046df984f9eea9e5c08486767 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Sat, 5 Nov 2022 18:52:02 +0100\nSubject: [PATCH] Start debug service after locale to ensure file system is\n ready\n\n---\n units/debug-shell.service.in | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/units/debug-shell.service.in b/units/debug-shell.service.in\nindex bc3a23f..a1bc7e5 100644\n--- a/units/debug-shell.service.in\n+++ b/units/debug-shell.service.in\n@@ -13,6 +13,7 @@ Documentation=man:systemd-debug-generator(8)\n DefaultDependencies=no\n IgnoreOnIsolate=yes\n ConditionPathExists={{DEBUGTTY}}\n+After=locale.service\n \n [Service]\n WorkingDirectory=/storage\n-- \n2.38.1\n\n"
  },
  {
    "path": "packages/sysutils/systemd/profile.d/90-systemd.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nexport SYSTEMD_COLORS=0\n"
  },
  {
    "path": "packages/sysutils/systemd/scripts/cpufreq",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nSYS_CPUFREQ_GOV=$( cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor )\nSYS_CPUFREQ_DIR=\"/sys/devices/system/cpu/cpufreq\"\n\n# Configure frequency scaling properties\nif [ $SYS_CPUFREQ_GOV = \"ondemand\" ]; then\n  for policy in ${SYS_CPUFREQ_DIR}/ondemand ${SYS_CPUFREQ_DIR}/policy*/; do\n    if [ -e $policy/up_threshold ]; then\n      echo 50 > $policy/up_threshold\n    fi\n  done\nfi\n"
  },
  {
    "path": "packages/sysutils/systemd/scripts/environment-setup",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n# read config files\nfor config in /etc/profile.d/*; do\n  if [ -f \"$config\" ] ; then\n    . $config\n  fi\ndone\n\n# generate system-wide environment file\ncat <<EOF >/run/libreelec/environment\nPATH=${PATH}\nLD_LIBRARY_PATH=${LD_LIBRARY_PATH}\nEOF\n"
  },
  {
    "path": "packages/sysutils/systemd/scripts/network-base-setup",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\ncheck_hosts() {\n  grep -v \"^#\" /run/libreelec/hosts | grep \"${1}\"\n}\n\n\n# setup hostname\nif [ -f /storage/.cache/hostname ]; then\n  cat /storage/.cache/hostname > /proc/sys/kernel/hostname\nfi\n\n# setup /etc/hosts\nrm -f /run/libreelec/hosts\nif [ -f /storage/.config/hosts.conf ]; then\n  cat /storage/.config/hosts.conf > /run/libreelec/hosts\n  # add localhost to hosts if not present\n  LOCALHOST_HOSTS=$(check_hosts \"localhost\")\n  if [ -z \"${LOCALHOST_HOSTS}\" ]; then\n    {\n      echo \"127.0.0.1 localhost\"\n      echo \"::1 localhost ip6-localhost ip6-loopback\"\n    } >> /run/libreelec/hosts\n  fi\n  # add HOSTNAME to hosts if not present\n  HOSTNAME=$(cat /proc/sys/kernel/hostname)\n  HOSTNAME_HOSTS=$(check_hosts \"${HOSTNAME}\")\n  if [ -z \"${HOSTNAME_HOSTS}\" ]; then\n    echo \"127.0.1.1 ${HOSTNAME}\" >> /run/libreelec/hosts\n  fi\nfi\n\n# setup /etc/resolv.conf\nrm -f /run/libreelec/resolv.conf\nif [ -f /storage/.config/resolv.conf ]; then\n  cat /storage/.config/resolv.conf > /run/libreelec/resolv.conf\nelif [ -f /dev/.kernel_ipconfig ] && [ -f /proc/net/pnp ]; then\n  cat /proc/net/pnp > /run/libreelec/resolv.conf\nelse\n  cat << EOF > /run/libreelec/resolv.conf\nnameserver 8.8.8.8\nnameserver 8.8.4.4\nEOF\nfi\n\n"
  },
  {
    "path": "packages/sysutils/systemd/scripts/systemd-machine-id-setup",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n# remove old machine-id file\n[[ -f \"/storage/.cache/machine-id\" ]] && rm /storage/.cache/machine-id\n\n# test systemd-machine-id exists and is 32 hex chars or generate a new uuid\nMACHINEID=\"$(cat /storage/.cache/systemd-machine-id 2>/dev/null)\"\n[ \"${#MACHINEID}\" != \"32\" ] && MACHINEID=\n[[ \"${MACHINEID//[a-f0-9]/}\" != \"\" ]] && MACHINEID=\n[ -z \"${MACHINEID}\" ] && MACHINEID=$(/usr/bin/dbus-uuidgen)\n\n# For first boot detection systemd may have overmounted the file\numount /storage/.cache/systemd-machine-id >/dev/null 2>&1\n\n# persist uuid\nmkdir -p /storage/.cache\n  echo \"$MACHINEID\" > /storage/.cache/systemd-machine-id\n"
  },
  {
    "path": "packages/sysutils/systemd/scripts/systemd-timesyncd-setup",
    "content": "#!/bin/sh\nKERNEL_NTP=\"${1:-/proc/net/ipconfig/ntp_servers}\"\nNTP_SERVERS=\"\"\nif [ -f /proc/net/ipconfig/ntp_servers ]; then\n  for srv in $(cat /proc/net/ipconfig/ntp_servers); do\n    if [ -n \"$srv\" -a \"$srv\" != \"0.0.0.0\" ]; then\n      if [ -z \"$NTP_SERVERS\" ]; then\n        NTP_SERVERS=\"$srv\"\n      else\n        NTP_SERVERS=\"${NTP_SERVERS} $srv\"\n      fi\n    fi\n  done\n  if [ -n \"$NTP_SERVERS\" ]; then\n    mkdir -p /run/systemd/timesyncd.conf.d/\n    cat << EOF > /run/systemd/timesyncd.conf.d/kernel-ntp-servers.conf\n[Time]\nNTP=$NTP_SERVERS\nEOF\n  fi\nfi\n\n"
  },
  {
    "path": "packages/sysutils/systemd/scripts/usercache-setup",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n# Fix bug in older versions creating file /storage/.cache/services\n[ -f /storage/.cache/services ] && rm /storage/.cache/services && mkdir -p /storage/.cache/services\n\n# Copy cache files, but don't overwrite\nfalse | cp -iRp /usr/cache/* /storage/.cache/ &>/dev/null\n\n# Merge default and custom shadow file details\nif [ -f /storage/.cache/shadow -a -f /usr/cache/shadow ]; then\n  # Get existing root details (possibly user defined)\n  userroot=\"$(grep \"^root:\" /storage/.cache/shadow)\"\n\n  # Overwrite users shadow file with default details, replacing root with any existing value\n  # If current file is garbage (ie. missing root) then replace it\n  if [ -n \"${userroot}\" ]; then\n    sed -e \"s ^root:.* ${userroot} \" /usr/cache/shadow >/storage/.cache/shadow\n  else\n    cp -fp /usr/cache/shadow /storage/.cache/shadow\n  fi\n\n  # Make sure we have the correct permission\n  chmod 000 /storage/.cache/shadow\nfi\n"
  },
  {
    "path": "packages/sysutils/systemd/scripts/userconfig-setup",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n# Remove those sample files that we manage\nfor sample in $(find /storage/.config -name '*.sample' 2>/dev/null); do\n  [ -f /usr/config/${sample:17} ] && rm -f ${sample}\ndone\n\n# Copy config files, but don't overwrite - this should replace our sample files\nfalse | cp -iRp /usr/config/* /storage/.config/ &>/dev/null\n"
  },
  {
    "path": "packages/sysutils/systemd/system.d/cpufreq.service",
    "content": "[Unit]\nDescription=Set CPU frequency governor and its tunables\nConditionPathExists=/usr/bin/cpufreq\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/cpufreq\nRemainAfterExit=yes\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "packages/sysutils/systemd/system.d/debugconfig.service",
    "content": "[Unit]\nDescription=Setup debug config\nDefaultDependencies=no\nAfter=systemd-tmpfiles-setup.service\nConditionKernelCommandLine=|debugging\nConditionPathExists=|/storage/.cache/debug.libreelec\n\n[Service]\nType=oneshot\nExecStart=/bin/sh -c 'cp /usr/share/debugconf/*.conf /run/libreelec/debug'\nRemainAfterExit=yes\n\n[Install]\nWantedBy=sysinit.target\n"
  },
  {
    "path": "packages/sysutils/systemd/system.d/envconfig.service",
    "content": "[Unit]\nDescription=Generate system-wide /etc/environment file\nDefaultDependencies=no\nAfter=systemd-tmpfiles-setup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/environment-setup\nRemainAfterExit=yes\n\n[Install]\nWantedBy=sysinit.target\n"
  },
  {
    "path": "packages/sysutils/systemd/system.d/flash.mount.d/dependencies.conf",
    "content": "[Unit]\nDefaultDependencies=no\n"
  },
  {
    "path": "packages/sysutils/systemd/system.d/machine-id.service",
    "content": "[Unit]\nDescription=Setup machine-id\nDefaultDependencies=no\nConflicts=shutdown.target\nBefore=systemd-journald.service systemd-tmpfiles-setup-dev.service shutdown.target\nAfter=local-fs.target\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/systemd-machine-id-setup\nRemainAfterExit=yes\n\n[Install]\nWantedBy=sysinit.target\n"
  },
  {
    "path": "packages/sysutils/systemd/system.d/network-base.service",
    "content": "[Unit]\nDescription=Base Network Configuration\nDefaultDependencies=no\nAfter=local-fs.target systemd-tmpfiles-setup.service userconfig.service\n\n[Service]\nType=oneshot\nExecStart=/usr/sbin/network-base-setup\nRemainAfterExit=yes\n\n[Install]\nWantedBy=network.target\n"
  },
  {
    "path": "packages/sysutils/systemd/system.d/storage.mount.d/dependencies.conf",
    "content": "[Unit]\nDefaultDependencies=no\n"
  },
  {
    "path": "packages/sysutils/systemd/system.d/systemd-timesyncd-setup.service",
    "content": "[Unit]\nDescription=Setup NTP servers for timesyncd\nDefaultDependencies=no\nAfter=systemd-remount-fs.service systemd-sysusers.service\n\n[Service]\nType=oneshot\nExecStart=/usr/sbin/systemd-timesyncd-setup\nRemainAfterExit=yes\n\n[Install]\nWantedBy=sysinit.target\n"
  },
  {
    "path": "packages/sysutils/systemd/system.d/systemd-timesyncd.service.d/depend-on-kernel-ip-config.conf",
    "content": "[Unit]\nConditionPathExists=/dev/.kernel_ipconfig\nAfter=systemd-timesyncd-setup.service network-base.service\n"
  },
  {
    "path": "packages/sysutils/systemd/system.d/usercache.service",
    "content": "[Unit]\nDescription=Setup User cache dir\nDefaultDependencies=no\nAfter=systemd-tmpfiles-setup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/usercache-setup\nRemainAfterExit=yes\n\n[Install]\nWantedBy=sysinit.target\n"
  },
  {
    "path": "packages/sysutils/systemd/system.d/userconfig.service",
    "content": "[Unit]\nDescription=Setup User config dir\nDefaultDependencies=no\nAfter=systemd-tmpfiles-setup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/userconfig-setup\nRemainAfterExit=yes\n\n[Install]\nWantedBy=sysinit.target\n"
  },
  {
    "path": "packages/sysutils/systemd/tmpfiles.d/z_01_openelec.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nd    /run/libreelec       0755 root root - -\nd    /run/libreelec/debug 0755 root root - -\n"
  },
  {
    "path": "packages/sysutils/systemd/udev.d/60-not-joysticks.rules",
    "content": "SUBSYSTEM==\"input\", ATTRS{name}==\"aml_keypad\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{name}==\"Remote+\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\n"
  },
  {
    "path": "packages/sysutils/terminus-font/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019 Matthias Reichl <hias@horus.com>\n\nPKG_NAME=\"terminus-font\"\nPKG_VERSION=\"4.49.1\"\nPKG_SHA256=\"d961c1b781627bf417f9b340693d64fc219e0113ad3a3af1a3424c7aa373ef79\"\nPKG_LICENSE=\"OFL1_1\"\nPKG_SITE=\"http://terminus-font.sourceforge.net\"\nPKG_URL=\"https://downloads.sourceforge.net/project/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION:0:4}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_INIT=\"toolchain Python3:host\"\nPKG_LONGDESC=\"This package contains the Terminus Font\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_configure_init() {\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}-${TARGET}\n}\n\nconfigure_init() {\n  ./configure INT=${TOOLCHAIN}/bin/python3\n}\n\nmake_init() {\n  make ter-v32b.psf\n}\n\nmakeinstall_init() {\n  mkdir -p ${INSTALL}/usr/share/consolefonts\n    cp ter-v32b.psf ${INSTALL}/usr/share/consolefonts\n}\n"
  },
  {
    "path": "packages/sysutils/tz/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tz\"\nPKG_VERSION=\"2023d\"\nPKG_SHA256=\"487df6ff5f4a577fd96568d0fd0a22e8062b0ec59af7ad3e66b5dd23a85cfc1c\"\nPKG_LICENSE=\"Public Domain\"\nPKG_SITE=\"http://www.iana.org/time-zones\"\nPKG_URL=\"https://github.com/eggert/tz/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Time zone and daylight-saving time data.\"\n\npre_configure_target() {\n  PKG_MAKE_OPTS_TARGET=\"CC=${HOST_CC} CFLAGS= LDFLAGS=\"\n}\n\nmakeinstall_target() {\n  make TZDIR=\"${INSTALL}/usr/share/zoneinfo\" REDO=posix_only TOPDIR=\"${INSTALL}\" install\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin ${INSTALL}/usr/sbin\n\n  rm -rf ${INSTALL}/etc\n  mkdir -p ${INSTALL}/etc\n    ln -sf /var/run/localtime ${INSTALL}/etc/localtime\n}\n\npost_install() {\n  enable_service tz-data.service\n}\n"
  },
  {
    "path": "packages/sysutils/tz/system.d/tz-data.service",
    "content": "[Unit]\nDescription=Setup Timezone data\nDefaultDependencies=no\nBefore=systemd-udevd.service\nAfter=var.mount systemd-tmpfiles-setup.service\n\n[Service]\nType=oneshot\nEnvironment=TIMEZONE=UTC\nEnvironmentFile=-/storage/.cache/timezone\nExecStart=/bin/ln -sf /usr/share/zoneinfo/${TIMEZONE} /var/run/localtime\nRemainAfterExit=yes\nStartLimitInterval=0\n\n[Install]\nWantedBy=sysinit.target\n"
  },
  {
    "path": "packages/sysutils/udevil/config/udevil.conf",
    "content": "##############################################################################\n#\n# udevil configuration file    /etc/udevil/udevil.conf\n#\n# This file controls what devices, networks, and files users may mount and\n# unmount via udevil (set suid).\n# \n# IMPORTANT:  IT IS POSSIBLE TO CREATE SERIOUS SECURITY PROBLEMS IF THIS FILE\n# IS MISCONFIGURED - EDIT WITH CARE\n#\n# Note:  For greater control for specific users, including root, copy this\n# file to /etc/udevil/udevil-user-USERNAME.conf replacing USERNAME with the\n# desired username (eg /etc/udevil/udevil-user-jim.conf).\n#\n# Format:\n#   OPTION = VALUE[, VALUE, ...]\n#\n# DO NOT USE QUOTES except literally\n# Lines beginning with # are ignored\n#\n##############################################################################\n\n\n# To log all uses of udevil, set log_file to a file path:\n# log_file = /var/log/udevil.log\n\n# Approximate number of days to retain log entries (0=forever, max=60):\nlog_keep_days = 10\n\n\n# allowed_types determines what fstypes can be passed by a user to the u/mount\n# program, what device filesystems may be un/mounted implicitly, and what\n# network filesystems may be un/mounted.\n# It may also include the 'file' keyword, indicating that the user is allowed\n# to mount files (eg an ISO file).  The $KNOWN_FILESYSTEMS variable may\n# be included to include common local filesystems as well as those listed in\n# /etc/filesystems and /proc/filesystems.\n# allowed_types_USERNAME, if present, is used to override allowed_types for\n# the specific user 'USERNAME'.  For example, to allow user 'jim' to mount\n# only vfat filesystems, add:\n# allowed_types_jim = vfat\n# Setting allowed_types = * does NOT allow all types, as this is a security\n# risk, but does allow all recognized types.\n# allowed_types = $KNOWN_FILESYSTEMS, file, cifs, smbfs, nfs, curlftpfs, ftpfs, sshfs, davfs, tmpfs, ramfs\nallowed_types = $KNOWN_FILESYSTEMS, hfsplus, hfs\n\n\n# allowed_users is a list of users permitted to mount and unmount with udevil.\n# Wildcards (* or ?) may be used in the usernames.  To allow all users,\n# specify \"allowed_users=*\".  UIDs may be included using the form UID=1000.\n# For example:  allowed_users = carl, UID=1000, pre*\n# Also note that permission to execute udevil may be limited to users belonging\n# to the group that owns /usr/bin/udevil, such as 'plugdev' or 'storage',\n# depending on installation.\n# allowed_users_FSTYPE, if present, is used to override allowed_users when\n# mounting or unmounting a specific fstype (eg nfs, ext3, file).\n# Note that when mounting a file, fstype will always be 'file' regardless of\n# the internal fstype of the file.\n# For example, to allow only user 'bob' to mount nfs shares, add:\n# allowed_users_nfs = bob\n# The root user is NOT automatically allowed to use udevil in some cases unless\n# listed here (except for unmounting anything or mounting fstab devices).\nallowed_users = *\n\n\n# allowed_groups is a list of groups permitted to mount and unmount with\n# udevil.  The user MUST belong to at least one of these groups.  Wildcards\n# or GIDs may NOT be used in group names, but a single * may be used to allow\n# all groups.\n# Also note that permission to execute udevil may be limited to users belonging\n# to the group that owns /usr/bin/udevil, such as 'plugdev' or 'storage',\n# depending on installation.\n# allowed_groups_FSTYPE, if present, is used to override allowed_groups when\n# mounting or unmounting a specific fstype (eg nfs, ext3, file).  For example,\n# to allow only members of the 'network' group to mount smb and nfs shares,\n# use both of these lines:\n# allowed_groups_smbfs = network\n# allowed_groups_nfs = network\n# The root user is NOT automatically allowed to use udevil in some cases unless\n# listed here (except for unmounting anything or mounting fstab devices).\nallowed_groups = *\n\n\n# allowed_media_dirs specifies the media directories in which user mount points\n# may be located.  The first directory which exists and does not contain a\n# wildcard will be used as the default media directory (normally /media or\n# /run/media/$USER).\n# The $USER variable, if included, will be replaced with the username of the\n# user running udevil.  Wildcards may also be used in any directory EXCEPT the\n# default.  Wildcards will not match a /\n# allowed_media_dirs_FSTYPE, if present, is used to override allowed_media_dirs\n# when mounting or unmounting a specific fstype (eg ext2, nfs).  For example,\n# to cause /media/network to be used as the default media directory for\n# nfs and ftpfs mounts, use these two lines:\n# allowed_media_dirs_nfs   = /media/network, /media, /run/media/$USER\n# allowed_media_dirs_ftpfs = /media/network, /media, /run/media/$USER\n# NOTE: If you want only the user who mounted a device to have access to it\n# and be allowed to unmount it, specify /run/media/$USER as the first\n# allowed media directory.\n# IMPORTANT:  If an allowed file is mounted to a media directory, the user may\n# be permitted to unmount its associated loop device even though internal.\n# INCLUDING /MNT HERE IS NOT RECOMMENDED.  ALL ALLOWED MEDIA DIRECTORIES\n# SHOULD BE OWNED AND WRITABLE ONLY BY ROOT.\nallowed_media_dirs = /media, /var/media, /run/media/$USER\n\n\n# allowed_devices is the first criteria for what block devices users may mount\n# or unmount.  If a device is not listed in allowed_devices, it cannot be\n# un/mounted (unless in fstab).  However, even if a device is listed, other\n# factors may prevent its use.  For example, access to system internal devices\n# will be denied to normal users even if they are included in allowed_devices.  \n# allowed_devices_FSTYPE, if present, is used to override allowed_devices when\n# mounting or unmounting a specific fstype (eg ext3, ntfs).  For example, to\n# prevent all block devices containing an ext4 filesystem from being\n# un/mounted use:\n# allowed_devices_ext4 =\n# Note: Wildcards may be used, but a wildcard will never match a /, except\n# for \"allowed_devices=*\" which allows any device.  The recommended setting is\n# allowed_devices = /dev/*\n# WARNING:  ALLOWING USERS TO MOUNT DEVICES OUTSIDE OF /dev CAN CAUSE SERIOUS\n# SECURITY PROBLEMS.  DO NOT ALLOW DEVICES IN /dev/shm\nallowed_devices = /dev/*\n\n\n# allowed_internal_devices causes udevil to treat any listed block devices as\n# removable, thus allowing normal users to un/mount them (providing they are\n# also listed in allowed_devices).\n# allowed_internal_devices_FSTYPE, if present, is used to override\n# allowed_internal_devices when mounting or unmounting a specific fstype\n# (eg ext3, ntfs).  For example, to allow block devices containing a vfat\n# filesystem to be un/mounted even if they are system internal devices, use:\n# allowed_internal_devices_vfat = /dev/sdb*\n# Some removable esata drives look like internal drives to udevil.  To avoid\n# this problem, they can be treated as removable with this setting.\n# WARNING:  SETTING A SYSTEM DEVICE HERE CAN CAUSE SERIOUS SECURITY PROBLEMS.\n# allowed_internal_devices =\n\n\n# allowed_internal_uuids and allowed_internal_uuids_FSTYPE work similarly to\n# allowed_internal_devices, except that UUIDs are specified instead of devices.\n# For example, to allow un/mounting of an internal filesystem based on UUID:\n# allowed_internal_uuids = cc0c4489-8def-1e5b-a304-ab87c3cb626c0\n# WARNING:  SETTING A SYSTEM DEVICE HERE CAN CAUSE SERIOUS SECURITY PROBLEMS.\n# allowed_internal_uuids = \n\n\n# forbidden_devices is used to prevent block devices from being un/mounted\n# even if other settings would allow them (except devices in fstab).\n# forbidden_devices_FSTYPE, if present, is used to override\n# forbidden_devices when mounting or unmounting a specific fstype\n# (eg ext3, ntfs).  For example, to prevent device /dev/sdd1 from being\n# mounted when it contains an ntfs filesystem, use:\n# forbidden_devices_ntfs = /dev/sdd1\n# NOTE: device node paths are canonicalized before being tested, so forbidding\n# a link to a device will have no effect.\nforbidden_devices =\n\n\n# allowed_networks determines what hosts may be un/mounted by udevil users when\n# using nfs, cifs, smbfs, curlftpfs, ftpfs, or sshfs.  Hosts may be specified\n# using a hostname (eg myserver.com) or IP address (192.168.1.100).\n# Wildcards may be used in hostnames and IP addresses, but CIDR notation \n# (192.168.1.0/16) is NOT supported.  IP v6 is supported.  For example:\n# allowed_networks = 127.0.0.1, 192.168.1.*, 10.0.0.*, localmachine, *.okay.com\n# Or, to prevent un/mounting of any network shares, set:\n# allowed_networks =\n# allowed_networks_FSTYPE, if present, is used to override allowed_networks\n# when mounting or unmounting a specific network fstype (eg nfs, cifs, sshfs,\n# curlftpfs).  For example, to limit nfs and samba shares to only local\n# networks, use these two lines:\n# allowed_networks_nfs = 192.168.1.*, 10.0.0.*\n# allowed_networks_cifs = 192.168.1.*, 10.0.0.*\nallowed_networks = *\n\n\n# forbidden_networks and forbidden_networks_FSTYPE are used to specify networks\n# that are never allowed, even if other settings allow them (except fstab).\n# NO REVERSE LOOKUP IS PERFORMED, so including bad.com will only have an effect\n# if the user uses that hostname.  IP lookup is always performed, so forbidding\n# an IP address will also forbid all corresponding hostnames.\nforbidden_networks = \n\n\n# allowed_files is used to determine what files in what directories may be\n# un/mounted.  A user must also have read permission on a file to mount it.\n# Note: Wildcards may be used, but a wildcard will never match a /, except\n# for \"allowed_files=*\" which allows any file.  For example, to allow only\n# files in the /share directory to be mounted, use:\n# allowed_files = /share/*\n# NOTE:  Specifying allowed_files_FSTYPE will NOT work because the fstype of\n# files is always 'file'.\nallowed_files = *\n\n\n# forbidden_files is used to specify files that are never allowed, even if\n# other settings allow them (except fstab).  Specify a full path.\n# Note: Wildcards may be used, but a wildcard will never match a /, except\n# for \"forbidden_files = *\".\n# NOTE: file paths are canonicalized before being tested, so forbidding\n# a link to a file will have no effect.\nforbidden_files = \n\n\n# default_options specifies what options are always included when performing\n# a mount, in addition to any options the user may specify.\n# Note:  When a device is present in /etc/fstab, and the user does not specify\n# a mount point, the device is mounted with normal user permissions using\n# the fstab entry, without these options.\n# default_options_FSTYPE, if present, is used to override default_options\n# when mounting a specific fstype (eg ext2, nfs).\n# The variables $USER, $UID, and $GID are changed to the user's username, UID,\n# and GID.\n# FOR GOOD SECURITY, default_options SHOULD ALWAYS INCLUDE: nosuid,noexec,nodev\n# WARNING:  OPTIONS PRESENT OR MISSING CAN CAUSE SERIOUS SECURITY PROBLEMS.\ndefault_options           = nosuid, noexec, nodev, noatime\ndefault_options_file      = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro\n# mount iso9660 with 'ro' to prevent mount read-only warning\ndefault_options_iso9660   = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro, utf8\ndefault_options_udf       = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID\ndefault_options_vfat      = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID, utf8\ndefault_options_exfat     = nosuid, nodev, noatime, utf8, fmask=0022, dmask=0022,\ndefault_options_msdos     = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID\ndefault_options_umsdos    = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID\ndefault_options_ntfs      = nosuid, noexec, nodev, noatime, big_writes, fmask=0022, dmask=0022, uid=$UID, gid=$GID, utf8\ndefault_options_cifs      = nosuid, noexec, nodev, uid=$UID, gid=$GID\ndefault_options_smbfs     = nosuid, noexec, nodev, uid=$UID, gid=$GID\ndefault_options_sshfs     = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other\ndefault_options_curlftpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other\ndefault_options_ftpfs     = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID\ndefault_options_davfs     = nosuid, noexec, nodev, uid=$UID, gid=$GID\ndefault_options_tmpfs     = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID\ndefault_options_ramfs     = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID\n\n\n# allowed_options determines all options that a user may specify when mounting.\n# All the options used in default_options above must be included here too, or\n# they will be rejected.  If the user attempts to use an option not included\n# here, an error will result.  Wildcards may be used.\n# allowed_options_FSTYPE, if present, is used to override allowed_options\n# when mounting a specific fstype (eg ext2, nfs).\n# The variables $USER, $UID, and $GID are changed to the user's username, UID,\n# and GID.\n# If you want to forbid remounts, remove 'remount' from here.\n# WARNING:  OPTIONS HERE CAN CAUSE SERIOUS SECURITY PROBLEMS - CHOOSE CAREFULLY\nallowed_options           = nosuid, noexec, nodev, noatime, big_writes, fmask=0133, dmask=0022, uid=$UID, gid=$GID, ro, rw, sync, flush, iocharset=*, utf8, remount\nallowed_options_nfs       = nosuid, noexec, nodev, noatime, ro, rw, sync, remount, port=*, rsize=*, wsize=*, hard, proto=*, timeo=*, retrans=*\nallowed_options_cifs      = nosuid, noexec, nodev, ro, rw, remount, port=*, user=*, username=*, pass=*, password=*, guest, domain=*, uid=$UID, gid=$GID, credentials=*\nallowed_options_smbfs     = nosuid, noexec, nodev, ro, rw, remount, port=*, user=*, username=*, pass=*, password=*, guest, domain=*, uid=$UID, gid=$GID, credentials=*\nallowed_options_sshfs     = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, nonempty, allow_other, idmap=user, BatchMode=yes, port=*\nallowed_options_curlftpfs = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, nonempty, allow_other, user=*\nallowed_options_ftpfs     = nosuid, noexec, nodev, noatime, ro, rw, port=*, user=*, pass=*, ip=*, root=*, uid=$UID, gid=$GID\nallowed_options_exfat     = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, utf8, nonempty, fmask=0022, dmask=0022,\nallowed_options_ntfs      = nosuid, noexec, nodev, noatime, big_writes, fmask=0022, dmask=0022, uid=$UID, gid=$GID, ro, rw, utf8\n\n\n# mount_point_mode, if present and set to a non-empty value, will cause udevil\n# to set the mode (permissions) on the moint point after mounting  If not\n# specified or if left empty, the mode is not changed.  Mode must be octal\n# starting with a zero (0755).\n# mount_point_mode_FSTYPE, if present, is used to override mount_point_mode\n# when mounting a specific fstype (eg ext2, nfs).\n# NOT SETTING A MODE CAN HAVE SECURITY IMPLICATIONS FOR SOME FSTYPES\n# mount_point_mode = 0755\n# don't set a mode for some types:\n# mount_point_mode_sshfs =\n# mount_point_mode_curlftpfs =\n# mount_point_mode_ftpfs =\n\n\n# Use the settings below to change the default locations of programs used by\n# udevil, or (advanced topic) to redirect commands to your scripts.\n# When substituting scripts, make sure they are root-owned and accept the\n# options used by udevil (for example, the mount_program must accept --fake,\n# -o, -v, and other options valid to mount.)\n# Be sure to specify the full path and include NO OPTIONS or other arguments.\n# These programs may also be specified as configure options when building\n# udevil.\n# THESE PROGRAMS ARE RUN AS ROOT\n# mount_program   = /bin/mount\n# umount_program  = /bin/umount\n# losetup_program = /sbin/losetup\n# setfacl_program = /usr/bin/setfacl\n\n\n# validate_exec specifies a program or script which provides additional\n# validation of a mount or unmount command, beyond the checks performed by\n# udevil.  The program is run as a normal user (if root runs udevil,\n# validate_exec will NOT be run).  The program is NOT run if the user is\n# mounting a device without root priviledges (a device in fstab).\n# The program is passed the username, a printable description of what is\n# happening, and the entire udevil command line as the first three arguments.\n# The program must return an exit status of 0 to allow the mount or unmount\n# to proceed.  If it returns non-zero, the user will be denied permission.\n# For example, validate_exec might specify a script which notifies you\n# of the command being run, or performs additional steps to authenticate the\n# user.\n# Specify a full path to the program, with NO options or arguments.\n# validate_exec =\n\n\n# validate_rootexec works similarly to validate_exec, except that the program\n# is run as root.  validate_rootexec will also be run if the root user runs\n# udevil.  If both validate_exec and validate_rootexec are specified, \n# validate_rootexec will run first, followed by validate_exec.\n# The program must return an exit status of 0 to allow the mount or unmount\n# to proceed.  If it returns non-zero, the user will be denied permission.\n# Unless you are familiar with writing root scripts, it is recommended that\n# rootexec settings NOT be used, as it is easy to inadvertently open exploits.\n# THIS PROGRAM IS ALWAYS RUN AS ROOT, even if the user running udevil is not.\n# validate_rootexec =\n\n\n# success_exec is run after a successful mount, remount, or unmount.  The \n# program is run as a normal user (if root runs udevil, success_exec\n# will NOT be run).\n# The program is passed the username, a printable description of what action\n# was taken, and the entire udevil command line as the first three arguments.\n# The program's exit status is ignored.\n# For example, success_exec might run a script which informs you of what action\n# was taken, and might perform further actions.\n# Specify a full path to the program, with NO options or arguments.\n# success_exec =\n\n\n# success_rootexec works similarly to success_exec, except that the program is\n# run as root.  success_rootexec will also be run if the root user runs udevil.\n# If both success_exec and success_rootexec are specified,  success_rootexec\n# will run first, followed by success_exec.\n# Unless you are familiar with writing root scripts, it is recommended that\n# rootexec settings NOT be used, as it is easy to inadvertently open exploits.\n# THIS PROGRAM IS ALWAYS RUN AS ROOT, even if the user running udevil is not.\n# success_rootexec =\n\n"
  },
  {
    "path": "packages/sysutils/udevil/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"udevil\"\nPKG_VERSION=\"0.4.4\"\nPKG_SHA256=\"ce8c51fd4d589cda7be56e75b42188deeb258c66fc911a9b3a70a3945c157739\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/IgnorantGuru/udevil\"\nPKG_URL=\"https://github.com/IgnorantGuru/udevil/raw/pkg/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain systemd glib\"\nPKG_LONGDESC=\"Mounts and unmounts removable devices and networks without a password.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-systemd \\\n                           --with-mount-prog=/usr/bin/mount \\\n                           --with-umount-prog=/usr/bin/umount \\\n                           --with-losetup-prog=/usr/sbin/losetup \\\n                           --with-setfacl-prog=/usr/bin/setfacl\"\n\nmakeinstall_target() {\n : # nothing to install\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/etc/udevil\n    cp ${PKG_DIR}/config/udevil.conf ${INSTALL}/etc/udevil\n    ln -sf /storage/.config/udevil.conf ${INSTALL}/etc/udevil/udevil-user-root.conf\n\n  mkdir -p ${INSTALL}/usr/bin\n    cp -PR src/udevil ${INSTALL}/usr/bin\n}\n\npost_install() {\n  enable_service udevil-mount@.service\n}\n"
  },
  {
    "path": "packages/sysutils/udevil/patches/udevil-fix-build.patch",
    "content": "diff -Naur udevil-0.4.4/src/device-info.c udevil-0.4.4.patch/src/device-info.c\n--- udevil-0.4.4/src/device-info.c\t2015-05-04 15:34:32.000000000 +0200\n+++ udevil-0.4.4.patch/src/device-info.c\t2015-05-23 16:25:50.545362784 +0200\n@@ -4,6 +4,7 @@\n ************************************************************************** */\n \n #include \"device-info.h\"\n+#include <sys/stat.h>\n \n static char *\n _dupv8 (const char *s)\n"
  },
  {
    "path": "packages/sysutils/udevil/system.d/udevil-mount@.service",
    "content": "[Unit]\nDescription=Udevil mount service\n\n[Service]\nType=oneshot\nExecStart=-/usr/bin/udevil --mount %I\nExecStop=-/usr/bin/udevil --umount %I\nExecStartPost=-/usr/lib/samba/samba-autoshare\nExecStopPost=-/usr/lib/samba/samba-autoshare\nRemainAfterExit=yes\n"
  },
  {
    "path": "packages/sysutils/udevil/udev.d/95-udevil-mount.rules",
    "content": "# dont run in \"installer\" mode\nIMPORT{cmdline}=\"installer\"\nENV{installer}==\"1\", GOTO=\"exit\"\n\n# check for blockdevices, /dev/sd*, /dev/sr*, /dev/mmc*, and /dev/nvme*\nSUBSYSTEM!=\"block\", KERNEL!=\"sd*|sr*|mmc*|nvme*\", GOTO=\"exit\"\n\n# check for special partitions we dont want mount\nIMPORT{builtin}=\"blkid\"\nENV{ID_FS_LABEL}==\"EFI|BOOT|Recovery|RECOVERY|SETTINGS|boot|root0|share0\", GOTO=\"exit\"\n\n# /dev/sd*, /dev/mmc*, and /dev/nvme* with partitions/disk and filesystems only, and /dev/sr* disks only\nKERNEL==\"sd*|mmc*|nvme*\", ENV{DEVTYPE}==\"partition|disk\", ENV{ID_FS_USAGE}==\"filesystem\", GOTO=\"harddisk\"\nKERNEL==\"sr*\", ENV{DEVTYPE}==\"disk\", GOTO=\"optical\"\nGOTO=\"exit\"\n\n# mount or umount for hdds\nLABEL=\"harddisk\"\nACTION==\"add\", PROGRAM=\"/usr/bin/sh -c '/usr/bin/grep -E ^/dev/%k\\  /proc/mounts || true'\", RESULT==\"\", RUN+=\"/usr/bin/systemctl restart udevil-mount@/dev/%k.service\"\nACTION==\"remove\", RUN+=\"/usr/bin/systemctl stop udevil-mount@/dev/%k.service\"\nGOTO=\"exit\"\n\n# mount or umount for opticals\nLABEL=\"optical\"\nACTION==\"add|change\", RUN+=\"/usr/bin/systemctl restart udevil-mount@/dev/%k.service\"\nGOTO=\"exit\"\n\n# Exit\nLABEL=\"exit\"\n\n"
  },
  {
    "path": "packages/sysutils/usbutils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"usbutils\"\nPKG_VERSION=\"015\"\nPKG_SHA256=\"c3b451bb1f4ff9f6356cac5a6956a9ac8e85d81651af56a29e689f94fa6fda6e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.linux-usb.org/\"\nPKG_URL=\"http://kernel.org/pub/linux/utils/usb/usbutils/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libusb systemd\"\nPKG_LONGDESC=\"This package contains various utilities for inspecting and setting of devices connected to the USB bus.\"\nPKG_TOOLCHAIN=\"autotools\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin/lsusb.py\n  rm -rf ${INSTALL}/usr/bin/usbhid-dump\n}\n"
  },
  {
    "path": "packages/sysutils/util-linux/config/swap.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\n# location with write access and no spaces\nSWAPFILE=\"${HOME}/.cache/swapfile\"\n\n# in MiB\nSWAPFILESIZE=\"@SWAPFILESIZE@\"\n\n# set to \"yes\" to enable\nSWAP_ENABLED=\"@SWAP_ENABLED_DEFAULT@\"\n"
  },
  {
    "path": "packages/sysutils/util-linux/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"util-linux\"\nPKG_VERSION=\"2.38.1\"\nPKG_SHA256=\"60492a19b44e6cf9a3ddff68325b333b8b52b6c59ce3ebd6a0ecaa4c5117e84f\"\nPKG_LICENSE=\"GPL\"\nPKG_URL=\"https://www.kernel.org/pub/linux/utils/util-linux/v$(get_pkg_version_maj_min)/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host autoconf:host automake:host intltool:host libtool:host pkg-config:host\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses\"\nPKG_DEPENDS_INIT=\"toolchain\"\nPKG_LONGDESC=\"A large variety of low-level system utilities that are necessary for a Linux system to function.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic:host\"\n\nUTILLINUX_CONFIG_DEFAULT=\"--disable-gtk-doc \\\n                          --disable-nls \\\n                          --disable-rpath \\\n                          --enable-tls \\\n                          --enable-chsh-only-listed \\\n                          --disable-bash-completion \\\n                          --disable-colors-default \\\n                          --disable-pylibmount \\\n                          --disable-pg-bell \\\n                          --disable-use-tty-group \\\n                          --disable-makeinstall-chown \\\n                          --disable-makeinstall-setuid \\\n                          --with-gnu-ld \\\n                          --without-selinux \\\n                          --without-audit \\\n                          --without-udev \\\n                          --without-ncurses \\\n                          --without-ncursesw \\\n                          --without-readline \\\n                          --without-slang \\\n                          --without-tinfo \\\n                          --without-utempter \\\n                          --without-util \\\n                          --without-libz \\\n                          --without-user \\\n                          --without-systemd \\\n                          --without-smack \\\n                          --without-python \\\n                          --without-systemdsystemunitdir\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"${UTILLINUX_CONFIG_DEFAULT} \\\n                           --disable-all-programs \\\n                           --enable-libuuid \\\n                           --enable-libblkid \\\n                           --enable-libmount \\\n                           --enable-libsmartcols \\\n                           --enable-losetup \\\n                           --enable-fsck \\\n                           --enable-fstrim \\\n                           --enable-blkid \\\n                           --enable-lsfd \\\n                           --enable-lsblk \\\n                           --disable-setterm \\\n                           --with-ncursesw\"\n\nif [ \"${SWAP_SUPPORT}\" = \"yes\" ]; then\n  PKG_CONFIGURE_OPTS_TARGET+=\" --enable-swapon\"\nfi\n\nPKG_CONFIGURE_OPTS_HOST=\"--enable-static \\\n                         --disable-shared \\\n                         --enable-all-programs \\\n                         ${UTILLINUX_CONFIG_DEFAULT} \\\n                         --enable-uuidgen \\\n                         --enable-libuuid\"\n\nPKG_CONFIGURE_OPTS_INIT=\"${UTILLINUX_CONFIG_DEFAULT} \\\n                         --disable-all-programs \\\n                         --enable-libblkid \\\n                         --enable-libmount \\\n                         --enable-fsck\"\n\nif [ \"${INITRAMFS_PARTED_SUPPORT}\" = \"yes\" ]; then\n  PKG_CONFIGURE_OPTS_INIT+=\" --enable-mkfs --enable-libuuid\"\nfi\n\npost_makeinstall_target() {\n  if [ \"${SWAP_SUPPORT}\" = \"yes\" ]; then\n    mkdir -p ${INSTALL}/usr/lib/libreelec\n      cp -PR ${PKG_DIR}/scripts/mount-swap ${INSTALL}/usr/lib/libreelec\n\n    mkdir -p ${INSTALL}/etc\n      cat ${PKG_DIR}/config/swap.conf | \\\n        sed -e \"s,@SWAPFILESIZE@,${SWAPFILESIZE},g\" \\\n            -e \"s,@SWAP_ENABLED_DEFAULT@,${SWAP_ENABLED_DEFAULT},g\" \\\n            > ${INSTALL}/etc/swap.conf\n  fi\n}\n\npost_install () {\n  if [ \"${SWAP_SUPPORT}\" = \"yes\" ]; then\n    enable_service swap.service\n  fi\n\n  enable_service fstrim.timer\n}\n"
  },
  {
    "path": "packages/sysutils/util-linux/patches/util-linux-01-fix-pkgconf.patch",
    "content": "From 4856beb5186760419bafd1f5686d6492d2d36907 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Sat, 16 Aug 2014 13:40:57 +0300\nSubject: [PATCH] fix pkgconf\n\n---\n libblkid/blkid.pc.in         |    6 +++---\n libmount/mount.pc.in         |    6 +++---\n libsmartcols/smartcols.pc.in |    6 +++---\n libuuid/uuid.pc.in           |    6 +++---\n 4 files changed, 12 insertions(+), 12 deletions(-)\n\ndiff --git a/libblkid/blkid.pc.in b/libblkid/blkid.pc.in\nindex 40ec8a9..056ae64 100644\n--- a/libblkid/blkid.pc.in\n+++ b/libblkid/blkid.pc.in\n@@ -1,7 +1,7 @@\n prefix=@prefix@\n-exec_prefix=@exec_prefix@\n-libdir=@usrlib_execdir@\n-includedir=@includedir@\n+exec_prefix=${prefix}\n+libdir=${exec_prefix}/lib\n+includedir=${prefix}/include\n \n Name: blkid\n Description: Block device id library\ndiff --git a/libmount/mount.pc.in b/libmount/mount.pc.in\nindex 2c32797..c8112c6 100644\n--- a/libmount/mount.pc.in\n+++ b/libmount/mount.pc.in\n@@ -1,7 +1,7 @@\n prefix=@prefix@\n-exec_prefix=@exec_prefix@\n-libdir=@usrlib_execdir@\n-includedir=@includedir@\n+exec_prefix=${prefix}\n+libdir=${exec_prefix}/lib\n+includedir=${prefix}/include\n \n Name: mount\n Description: mount library\ndiff --git a/libsmartcols/smartcols.pc.in b/libsmartcols/smartcols.pc.in\nindex 0b16739..8f474ef 100644\n--- a/libsmartcols/smartcols.pc.in\n+++ b/libsmartcols/smartcols.pc.in\n@@ -1,7 +1,7 @@\n prefix=@prefix@\n-exec_prefix=@exec_prefix@\n-libdir=@usrlib_execdir@\n-includedir=@includedir@\n+exec_prefix=${prefix}\n+libdir=${exec_prefix}/lib\n+includedir=${prefix}/include\n \n Name: smartcols\n Description: table or tree library\ndiff --git a/libuuid/uuid.pc.in b/libuuid/uuid.pc.in\nindex 875de19..ef1009e 100644\n--- a/libuuid/uuid.pc.in\n+++ b/libuuid/uuid.pc.in\n@@ -1,7 +1,7 @@\n prefix=@prefix@\n-exec_prefix=@exec_prefix@\n-libdir=@usrlib_execdir@\n-includedir=@includedir@\n+exec_prefix=${prefix}\n+libdir=${exec_prefix}/lib\n+includedir=${prefix}/include\n \n Name: uuid\n Description: Universally unique id library\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/sysutils/util-linux/scripts/mount-swap",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\n. /etc/swap.conf\n. /etc/profile\n\nif [ -f /storage/.config/swap.conf ]; then\n  . /storage/.config/swap.conf\nfi\n\nif [ -e /dev/.storage_netboot ] ; then\n  logger -t Boot \"### netbooting... swap disabled ###\"\n  exit 0\nfi\n\nif [ ! \"${SWAP_ENABLED}\" = \"yes\" ] ; then\n  logger -t Boot \"### swap disabled via configfile ###\"\n  exit 0\nfi\n\nSWAP=$(blkid -t TYPE=\"swap\" -o device)\n\ncase $1 in\n  create)\n    if [ -z \"${SWAP}\" ] && [ ! -f \"${SWAPFILE}\" ]; then\n      mkdir -p \"$(dirname ${SWAPFILE})\"\n      dd if=/dev/zero of=\"${SWAPFILE}\" bs=1M count=\"${SWAPFILESIZE}\"\n      chmod 0600 \"${SWAPFILE}\"\n      mkswap \"${SWAPFILE}\"\n    fi\n    ;;\n  mount)\n    { [ -z \"${SWAP}\" ] && [ -f \"${SWAPFILE}\" ]; } && SWAP=\"${SWAPFILE}\"\n    for i in ${SWAP}; do\n      swapon -p 10000 \"${i}\"\n    done\n    ;;\n  unmount)\n    swapoff -a\n    ;;\nesac\n"
  },
  {
    "path": "packages/sysutils/util-linux/sysctl.d/swappiness.conf",
    "content": "vm.swappiness=10"
  },
  {
    "path": "packages/sysutils/util-linux/system.d/fstrim.service",
    "content": "[Unit]\nDescription=Discard unused blocks on all filesystems\n\n[Service]\nType=oneshot\n# don't run immediately on boot when timer event was missed\nExecStartPre=-/usr/bin/sleep 20\nExecStart=-/usr/sbin/fstrim --all --verbose --quiet-unsupported\nExecStart=-/usr/bin/touch /storage/.cache/fstrim.run\n"
  },
  {
    "path": "packages/sysutils/util-linux/system.d/fstrim.timer",
    "content": "[Unit]\nDescription=Discard unused blocks once a week\n\n[Timer]\nOnCalendar=weekly\nAccuracySec=1h\nPersistent=true\n\n[Install]\nWantedBy=timers.target\n"
  },
  {
    "path": "packages/sysutils/util-linux/system.d/swap.service",
    "content": "[Unit]\nDescription=Mounting swapfile\nDefaultDependencies=false\n\nBefore=swap.target shutdown.target\nConflicts=shutdown.target\nWants=swap.target\n\nConditionPathExists=/proc/swaps\nConditionKernelCommandLine=!noswap\nConditionKernelCommandLine=!installer\n\n[Service]\nEnvironment=HOME=/storage\nType=oneshot\nExecStartPre=/usr/lib/libreelec/mount-swap create\nExecStart=/usr/lib/libreelec/mount-swap mount\nRemainAfterExit=yes\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/config/rc_keymaps/README",
    "content": "RC keymaps user config dir\n\nput your own keymaps for ir-keytable in this directory\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/config/rc_keymaps/protocols/README",
    "content": "BPF protocol decoders user config dir\n\nput your BPF protocol decoders for ir-keytable in this directory\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/config/rc_maps.cfg.sample",
    "content": "# Keymaps table\n#\n# This table creates an association between a keycode file and a kernel\n# driver. It can be used to automatically override a keycode definition.\n#\n#\n# Format:\n#       driver - name of the driver provided via uevent - use * for any driver\n#       table -  RC keymap table, provided via uevent - use * for any table\n#       file - file name. If directory is not specified, it is first looked up\n#               in /storage/.config/rc_keymaps, then /usr/lib/udev/rc_keymaps\n#\n# For example:\n#\n# driver        table           file\n#\n# gpio-rc-recv  rc-streamzap    streamzap\n# gpio-rc-recv  *               justboom\n# *             rc-rc6-mce      rc6_mce_new\n# *             *               hauppauge_new\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/keymaps/a95x.toml",
    "content": "[[protocols]]\nname = \"a95x\"\nprotocol = \"nec\"\n[protocols.scancodes]\n0xdf0c = \"KEY_NUMERIC_0\"\n0xdf54 = \"KEY_NUMERIC_1\"\n0xdf16 = \"KEY_NUMERIC_2\"\n0xdf15 = \"KEY_NUMERIC_3\"\n0xdf50 = \"KEY_NUMERIC_4\"\n0xdf12 = \"KEY_NUMERIC_5\"\n0xdf11 = \"KEY_NUMERIC_6\"\n0xdf4c = \"KEY_NUMERIC_7\"\n0xdf0e = \"KEY_NUMERIC_8\"\n0xdf0d = \"KEY_NUMERIC_9\"\n0xdf06 = \"KEY_ENTER\"\n0xdf1a = \"KEY_UP\"\n0xdf48 = \"KEY_DOWN\"\n0xdf47 = \"KEY_LEFT\"\n0xdf07 = \"KEY_RIGHT\"\n0xdf18 = \"KEY_MENU\"\n0xdf0a = \"KEY_BACK\"\n0xdf5d = \"KEY_VOLUMEUP\"\n0xdf5c = \"KEY_VOLUMEDOWN\"\n0xdf4f = \"KEY_NEXT\"\n0xdf4b = \"KEY_PREVIOUS\"\n0xdf5f = \"KEY_INFO\"\n0xdf01 = \"KEY_EPG\"\n0xdf1c = \"KEY_POWER\"\n0xdf42 = \"KEY_HOME\"\n0xdf41 = \"KEY_FAVORITE\"\n0xdf03 = \"KEY_CONTEXT_MENU\"\n0xdf10 = \"KEY_BACK\"\n0xdff1 = \"KEY_SLEEP\"\n0xdff2 = \"KEY_SELECT\"\n0xdff3 = \"KEY_MUTE\"\n0xdff4 = \"KEY_PAGEUP\"\n0xdff5 = \"KEY_PAGEDOWN\"\n0x07   = \"KEY_PAGEDOWN\"\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/keymaps/beelink.toml",
    "content": "[[protocols]]\nname = \"beelink_x2\"\nprotocol = \"NEC\"\n[protocols.scancodes]\n0x804d = \"KEY_MUTE\"\n0x8009 = \"KEY_MEDIA\"\n0x8011 = \"KEY_AUDIO\"\n0x8054 = \"KEY_WWW\"\n0x804e = \"KEY_VOLUMEUP\"\n0x80bb = \"KEY_REWIND\"\n0x80bd = \"KEY_FORWARD\"\n0x8056 = \"KEY_VOLUMEDOWN\"\n0x8053 = \"KEY_HOME\"\n0x801b = \"KEY_BACK\"\n0x8026 = \"KEY_UP\"\n0x8025 = \"KEY_LEFT\"\n0x800d = \"KEY_OK\"\n0x8027 = \"KEY_RIGHT\"\n0x8028 = \"KEY_DOWN\"\n0x8049 = \"KEY_MENU\"\n0x8030 = \"KEY_NUMERIC_0\"\n0x8031 = \"KEY_NUMERIC_1\"\n0x8032 = \"KEY_NUMERIC_2\"\n0x8033 = \"KEY_NUMERIC_3\"\n0x8034 = \"KEY_NUMERIC_4\"\n0x8035 = \"KEY_NUMERIC_5\"\n0x8036 = \"KEY_NUMERIC_6\"\n0x8037 = \"KEY_NUMERIC_7\"\n0x8038 = \"KEY_NUMERIC_8\"\n0x8039 = \"KEY_NUMERIC_9\"\n0x8044 = \"KEY_BACKSPACE\"\n0x8051 = \"KEY_POWER\"\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/keymaps/beelink_bt_ir.toml",
    "content": "[[protocols]]\nname = \"beelink_bt_ir\"\nprotocol = \"nec\"\n[protocols.scancodes]\n0x8051 = \"KEY_POWER\"\n0x804d = \"KEY_MUTE\"\n0x8053 = \"KEY_HOME\"\n0x800d = \"KEY_OK\"\n0x8026 = \"KEY_UP\"\n0x8025 = \"KEY_LEFT\"\n0x8027 = \"KEY_RIGHT\"\n0x8028 = \"KEY_DOWN\"\n0x8049 = \"KEY_MENU\"\n0x801b = \"KEY_BACK\"\n0x8056 = \"KEY_VOLUMEDOWN\"\n0x804e = \"KEY_VOLUMEUP\"\n0x8041 = \"KEY_CHANNELUP\"\n0x8042 = \"KEY_CHANNELDOWN\"\n0x8044 = \"KEY_DELETE\"\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/keymaps/beelink_pwr_only.toml",
    "content": "[[protocols]]\nname = \"beelink_pwr_only\"\nprotocol = \"nec\"\n[protocols.scancodes]\n0x8051 = \"KEY_POWER\"\n0x59 = \"KEY_POWER\"\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/keymaps/cubox_i.toml",
    "content": "[[protocols]]\nname = \"cubox_i\"\nprotocol = \"rc6\"\n[protocols.scancodes]\n0x1f020b0 = \"KEY_MEDIA\"\n0x1f02078 = \"KEY_UP\"\n0x1f02044 = \"KEY_ENTER\"\n0x1f020f8 = \"KEY_DOWN\"\n0x1f02004 = \"KEY_LEFT\"\n0x1f02084 = \"KEY_RIGHT\"\n0x1f020c4 = \"KEY_BACKSPACE\"\n0x1f02068 = \"KEY_PLAYPAUSE\"\n0x1f02064 = \"KEY_EPG\"\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/keymaps/kvim.toml",
    "content": "[[protocols]]\nname = \"kvim\"\nprotocol = \"nec\"\n[protocols.scancodes]\n0x14 = \"KEY_POWER\"\n0x07 = \"KEY_ENTER\"\n0x03 = \"KEY_UP\"\n0x02 = \"KEY_DOWN\"\n0x0e = \"KEY_LEFT\"\n0x1a = \"KEY_RIGHT\"\n0x13 = \"KEY_MENU\"\n0x01 = \"KEY_BACK\"\n0x0b = \"KEY_VOLUMEUP\"\n0x58 = \"KEY_VOLUMEDOWN\"\n0x48 = \"KEY_HOME\"\n0x5b = \"KEY_CONTEXT_MENU\"\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/keymaps/kvim2.toml",
    "content": "[[protocols]]\nname = \"kvim2\"\nprotocol = \"nec\"\n[protocols.scancodes]\n0x113 = \"KEY_1\"\n0x112 = \"KEY_2\"\n0x110 = \"KEY_3\"\n0x117 = \"KEY_4\"\n0x116 = \"KEY_5\"\n0x114 = \"KEY_6\"\n0x11b = \"KEY_7\"\n0x11a = \"KEY_8\"\n0x118 = \"KEY_9\"\n0x11e = \"KEY_0\"\n0x158 = \"KEY_MENU\"\n0x104 = \"KEY_CHANNELUP\"\n0x106 = \"KEY_CHANNELDOWN\"\n0x148 = \"KEY_VOLUMEUP\"\n0x10b = \"KEY_VOLUMEDOWN\"\n0x150 = \"KEY_HOME\"\n0x115 = \"KEY_RIGHT\"\n0x154 = \"KEY_LEFT\"\n0x159 = \"KEY_UP\"\n0x151 = \"KEY_DOWN\"\n0x155 = \"KEY_ENTER\"\n0x141 = \"KEY_MUTE\"\n0x119 = \"KEY_BACK\"\n0x11d = \"KEY_INFO\"\n0x107 = \"KEY_STOP\"\n0x105 = \"KEY_PREVIOUSSONG\"\n0x101 = \"KEY_NEXTSONG\"\n0x100 = \"KEY_POWER\"\n0x140 = \"KEY_REWIND\"\n0x103 = \"KEY_FASTFORWARD\"\n0x144 = \"KEY_PLAYPAUSE\"\n0x109 = \"KEY_FAVORITES\"\n0x15c = \"KEY_EPG\"\n0x11f = \"KEY_RECORD\"\n0x111 = \"KEY_ESC\"\n0x10a = \"KEY_RED\"\n0x14d = \"KEY_GREEN\"\n0x10e = \"KEY_YELLOW\"\n0x10c = \"KEY_BLUE\"\n0x149 = \"KEY_LANGUAGE\"\n0x108 = \"KEY_SUBTITLE\"\n0x10d = \"KEY_CONTEXT_MENU\"\n0x14c = \"KEY_CONFIG\"\n0x145 = \"KEY_COMPOSE\"\n0x111 = \"KEY_TEXT\"\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/keymaps/mecool.toml",
    "content": "[[protocols]]\nname = \"mecool\"\nprotocol = \"nec\"\n[protocols.scancodes]\n0x52 = \"KEY_1\"\n0x50 = \"KEY_2\"\n0x10 = \"KEY_3\"\n0x56 = \"KEY_4\"\n0x54 = \"KEY_5\"\n0x14 = \"KEY_6\"\n0x4e = \"KEY_7\"\n0x4c = \"KEY_8\"\n0x0c = \"KEY_9\"\n0x0f = \"KEY_0\"\n0x45 = \"KEY_MENU\"\n0x55 = \"KEY_CHANNELUP\"\n0x15 = \"KEY_CHANNELDOWN\"\n0x13 = \"KEY_VOLUMEUP\"\n0x17 = \"KEY_VOLUMEDOWN\"\n0x0d = \"KEY_HOME\"\n0x1b = \"KEY_RIGHT\"\n0x5a = \"KEY_LEFT\"\n0x06 = \"KEY_UP\"\n0x16 = \"KEY_DOWN\"\n0x1a = \"KEY_ENTER\"\n0x19 = \"KEY_MUTE\"\n0x05 = \"KEY_BACK\"\n0x02 = \"KEY_INFO\"\n0x44 = \"KEY_STOP\"\n0x08 = \"KEY_PREVIOUSSONG\"\n0x0b = \"KEY_NEXTSONG\"\n0x59 = \"KEY_POWER\"\n0x4a = \"KEY_REWIND\"\n0x48 = \"KEY_FASTFORWARD\"\n0x46 = \"KEY_PLAYPAUSE\"\n0x1f = \"KEY_FAVORITES\"\n0x4d = \"KEY_EPG\"\n0x04 = \"KEY_RECORD\"\n0x51 = \"KEY_ESC\"\n0x42 = \"KEY_RED\"\n0x40 = \"KEY_GREEN\"\n0x00 = \"KEY_YELLOW\"\n0x03 = \"KEY_BLUE\"\n0x01 = \"KEY_LANGUAGE\"\n0x09 = \"KEY_SUBTITLE\"\n0x12 = \"KEY_CONTEXT_MENU\"\n0x11 = \"KEY_COMPOSE\"\n0x58 = \"KEY_CONFIG\"\n0x18 = \"KEY_TEXT\"\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/keymaps/minix_neo_pwr_only.toml",
    "content": "[[protocols]]\nname = \"minix_neo_pwr_only\"\nprotocol = \"nec\"\n[protocols.scancodes]\n0x118 = \"KEY_POWER\"\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/keymaps/tanix.toml",
    "content": "[[protocols]]\nname = \"tanix\"\nprotocol = \"nec\"\n[protocols.scancodes]\n0x40404d = \"KEY_POWER\"\n0x404043 = \"KEY_MUTE\"\n0x40400b = \"KEY_UP\"\n0x40400e = \"KEY_DOWN\"\n0x404010 = \"KEY_LEFT\"\n0x404011 = \"KEY_RIGHT\"\n0x40400d = \"KEY_ENTER\"\n0x40401a = \"KEY_HOME\"\n0x404045 = \"KEY_MENU\"\n0x404042 = \"KEY_BACK\"\n0x404018 = \"KEY_VOLUMEUP\"\n0x404017 = \"KEY_VOLUMEDOWN\"\n0x404047 = \"KEY_PLAYPAUSE\"\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/keymaps/xbox_360.toml",
    "content": "[[protocols]]\nname = \"Xbox 360\"\nprotocol = \"rc6\"\nvariant = \"rc6_mce\"\n[protocols.scancodes]\n0x800f7400 = \"KEY_NUMERIC_0\"\n0x800f7401 = \"KEY_NUMERIC_1\"\n0x800f7402 = \"KEY_NUMERIC_2\"\n0x800f7403 = \"KEY_NUMERIC_3\"\n0x800f7404 = \"KEY_NUMERIC_4\"\n0x800f7405 = \"KEY_NUMERIC_5\"\n0x800f7406 = \"KEY_NUMERIC_6\"\n0x800f7407 = \"KEY_NUMERIC_7\"\n0x800f7408 = \"KEY_NUMERIC_8\"\n0x800f7409 = \"KEY_NUMERIC_9\"\n0x800f740a = \"KEY_DELETE\"\n0x800f740b = \"KEY_ENTER\"\n0x800f740c = \"KEY_SLEEP\"\n0x800f740d = \"KEY_MEDIA\"\n0x800f7464 = \"KEY_MEDIA\"\n0x800f740e = \"KEY_MUTE\"\n0x800f740f = \"KEY_INFO\"\n0x800f7410 = \"KEY_VOLUMEUP\"\n0x800f7411 = \"KEY_VOLUMEDOWN\"\n0x800f7412 = \"KEY_CHANNELUP\"\n0x800f746C = \"KEY_CHANNELUP\"\n0x800f7413 = \"KEY_CHANNELDOWN\"\n0x800f746D = \"KEY_CHANNELDOWN\"\n0x800f7414 = \"KEY_FASTFORWARD\"\n0x800f7415 = \"KEY_REWIND\"\n0x800f7416 = \"KEY_PLAY\"\n0x800f7417 = \"KEY_RECORD\"\n0x800f7418 = \"KEY_PAUSE\"\n0x800f7419 = \"KEY_STOP\"\n0x800f741a = \"KEY_NEXT\"\n0x800f741b = \"KEY_PREVIOUS\"\n0x800f741c = \"KEY_NUMERIC_POUND\"\n0x800f741d = \"KEY_NUMERIC_STAR\"\n0x800f741e = \"KEY_UP\"\n0x800f741f = \"KEY_DOWN\"\n0x800f7420 = \"KEY_LEFT\"\n0x800f7421 = \"KEY_RIGHT\"\n0x800f7422 = \"KEY_OK\"\n0x800f7423 = \"KEY_EXIT\"\n0x800f7424 = \"KEY_DVD\"\n0x800f744f = \"KEY_EPG\"\n0x800f7427 = \"KEY_ZOOM\"\n0x800f7432 = \"KEY_MODE\"\n0x800f7433 = \"KEY_PRESENTATION\"\n0x800f7428 = \"KEY_EJECTCD\"\n0x800f743a = \"KEY_BRIGHTNESSUP\"\n0x800f7446 = \"KEY_TV\"\n0x800f7447 = \"KEY_AUDIO\"\n0x800f7448 = \"KEY_PVR\"\n0x800f7449 = \"KEY_CAMERA\"\n0x800f744a = \"KEY_VIDEO\"\n0x800f744c = \"KEY_LANGUAGE\"\n0x800f7451 = \"KEY_TITLE\"\n0x800f744e = \"KEY_PRINT\"\n0x800f7450 = \"KEY_RADIO\"\n0x800f745a = \"KEY_SUBTITLE\"\n0x800f7425 = \"KEY_RED\"\n0x800f7466 = \"KEY_GREEN\"\n0x800f7426 = \"KEY_YELLOW\"\n0x800f7468 = \"KEY_BLUE\"\n0x800f7465 = \"KEY_POWER2\"\n0x800f746e = \"KEY_PLAYPAUSE\"\n0x800f746f = \"KEY_PLAYER\"\n0x800f7480 = \"KEY_BRIGHTNESSDOWN\"\n0x800f7481 = \"KEY_PLAYPAUSE\"\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/keymaps/xbox_one.toml",
    "content": "[[protocols]]\nname = \"Xbox One\"\nprotocol = \"nec\"\nvariant = \"necx\"\n[protocols.scancodes]\n0x80d864 = \"KEY_MEDIA\"\n0x80d820 = \"KEY_LEFT\"\n0x80d821 = \"KEY_RIGHT\"\n0x80d81e = \"KEY_UP\"\n0x80d81f = \"KEY_DOWN\"\n0x80d822 = \"KEY_OK\"\n0x80d823 = \"KEY_EXIT\"\n0x80d80e = \"KEY_MUTE\"\n0x80d810 = \"KEY_VOLUMEUP\"\n0x80d811 = \"KEY_VOLUMEDOWN\"\n0x80d812 = \"KEY_CHANNELUP\"\n0x80d813 = \"KEY_CHANNELDOWN\"\n0x80d814 = \"KEY_FASTFORWARD\"\n0x80d815 = \"KEY_REWIND\"\n0x80d870 = \"KEY_PLAYPAUSE\"\n0x80d819 = \"KEY_STOP\"\n0x80d81a = \"KEY_NEXT\"\n0x80d81b = \"KEY_PREVIOUS\"\n0x80d826 = \"KEY_INFO\"\n0x80d86f = \"KEY_EPG\"\n0x80d86e = \"KEY_ZOOM\"\n0x80d801 = \"KEY_1\"\n0x80d802 = \"KEY_2\"\n0x80d803 = \"KEY_3\"\n0x80d804 = \"KEY_4\"\n0x80d805 = \"KEY_5\"\n0x80d806 = \"KEY_6\"\n0x80d807 = \"KEY_7\"\n0x80d808 = \"KEY_8\"\n0x80d809 = \"KEY_9\"\n0x80d800 = \"KEY_0\"\n0x80d817 = \"KEY_RECORD\"\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/keymaps/zotac.toml",
    "content": "[[protocols]]\nname = \"zotac\"\nprotocol = \"rc6\"\nvariant = \"rc6_mce\"\n[protocols.scancodes]\n0x8034048e = \"KEY_POWER\"\n0x8034043d = \"KEY_SLEEP\"\n0x80340400 = \"KEY_NUMERIC_0\"\n0x80340401 = \"KEY_NUMERIC_1\"\n0x80340402 = \"KEY_NUMERIC_2\"\n0x80340403 = \"KEY_NUMERIC_3\"\n0x80340404 = \"KEY_NUMERIC_4\"\n0x80340405 = \"KEY_NUMERIC_5\"\n0x80340406 = \"KEY_NUMERIC_6\"\n0x80340407 = \"KEY_NUMERIC_7\"\n0x80340408 = \"KEY_NUMERIC_8\"\n0x80340409 = \"KEY_NUMERIC_9\"\n0x80340432 = \"KEY_NUMERIC_POUND\"\n0x80340433 = \"KEY_NUMERIC_STAR\"\n0x8034043a = \"KEY_DELETE\"\n0x80340434 = \"KEY_ENTER\"\n0x8034045d = \"KEY_MEDIA\"\n0x8034040d = \"KEY_MUTE\"\n0x803404cb = \"KEY_INFO\"\n0x80340410 = \"KEY_VOLUMEUP\"\n0x80340411 = \"KEY_VOLUMEDOWN\"\n0x8034041e = \"KEY_CHANNELUP\"\n0x8034041f = \"KEY_CHANNELDOWN\"\n0x80340428 = \"KEY_FASTFORWARD\"\n0x80340429 = \"KEY_REWIND\"\n0x8034042c = \"KEY_PLAY\"\n0x80340437 = \"KEY_RECORD\"\n0x80340430 = \"KEY_PAUSE\"\n0x80340431 = \"KEY_STOP\"\n0x80340420 = \"KEY_NEXT\"\n0x80340421 = \"KEY_PREVIOUS\"\n0x80340458 = \"KEY_UP\"\n0x80340459 = \"KEY_DOWN\"\n0x8034045a = \"KEY_LEFT\"\n0x8034045b = \"KEY_RIGHT\"\n0x8034045c = \"KEY_OK\"\n0x80340483 = \"KEY_EXIT\"\n0x8034043e = \"KEY_EPG\"\n0x8034042f = \"KEY_TITLE\"\n0x8034046d = \"KEY_RED\"\n0x8034046e = \"KEY_GREEN\"\n0x8034046f = \"KEY_YELLOW\"\n0x80340470 = \"KEY_BLUE\"\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n# with 1.0.0 repeat delay is broken. test on upgrade\n\nPKG_NAME=\"v4l-utils\"\nPKG_VERSION=\"1.22.1\"\nPKG_SHA256=\"65c6fbe830a44ca105c443b027182c1b2c9053a91d1e72ad849dfab388b94e31\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://linuxtv.org/\"\nPKG_URL=\"http://linuxtv.org/downloads/v4l-utils/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\n[[ \"${DEVICE}\" != \"Amlogic-old\" ]] && PKG_DEPENDS_TARGET=\"libbpf\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib elfutils gcc-bpf:host ${PKG_DEPENDS_TARGET} systemd zlib\"\nPKG_LONGDESC=\"Linux V4L2 and DVB API utilities and v4l libraries (libv4l).\"\nPKG_STAMP_VAR=\"$IR_REMOTE_KEYMAPS\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--without-jpeg \\\n                           --enable-bpf \\\n                           --enable-static \\\n\t\t\t\t\t\t\t\t\t\t\t\t\t --with-udevdir=/usr/lib/udev/ \\\n                           --disable-shared \\\n                           --disable-doxygen-doc\"\n\npre_configure_target() {\n  # cec-ctl fails to build in subdirs\n  cd ${PKG_BUILD}\n  rm -rf .${TARGET_NAME}\n}\n\nmake_target() {\n  make -C utils/keytable CFLAGS=\"${TARGET_CFLAGS}\"\n  make -C utils/ir-ctl CFLAGS=\"${TARGET_CFLAGS}\"\n  if [ \"${CEC_FRAMEWORK_SUPPORT}\" = \"yes\" ]; then\n    make -C utils/libcecutil CFLAGS=\"${TARGET_CFLAGS}\"\n    make -C utils/cec-ctl CFLAGS=\"${TARGET_CFLAGS}\"\n  fi\n  make -C lib CFLAGS=\"${TARGET_CFLAGS}\"\n  make -C utils/dvb CFLAGS=\"${TARGET_CFLAGS}\"\n  make -C utils/v4l2-ctl CFLAGS=\"${TARGET_CFLAGS}\"\n\n  if [ \"${LIBREELEC_VERSION}\" == \"devel\" ]; then\n    make -C utils/v4l2-compliance CFLAGS=\"${TARGET_CFLAGS}\"\n  fi\n}\n\nmakeinstall_target() {\n  make install DESTDIR=${INSTALL} PREFIX=/usr -C utils/keytable\n  make install DESTDIR=${INSTALL} PREFIX=/usr -C utils/ir-ctl\n  if [ \"${CEC_FRAMEWORK_SUPPORT}\" = \"yes\" ]; then\n    make install DESTDIR=${INSTALL} PREFIX=/usr -C utils/cec-ctl\n  fi\n  make install DESTDIR=${INSTALL} PREFIX=/usr -C utils/dvb\n  make install DESTDIR=${INSTALL} PREFIX=/usr -C utils/v4l2-ctl\n\n  if [ \"${LIBREELEC_VERSION}\" == \"devel\" ]; then\n    make install DESTDIR=${INSTALL} PREFIX=/usr -C utils/v4l2-compliance\n  fi\n\n  cp ${PKG_BUILD}/contrib/lircd2toml.py ${INSTALL}/usr/bin/\n}\n\ncreate_multi_keymap() {\n  local f name map\n  name=\"${1}\"\n  shift 1\n  (\n    for f in \"$@\"; do\n      map=\"${INSTALL}/usr/lib/udev/rc_keymaps/${f}.toml\"\n      [ -e \"${map}\" ] && cat \"${map}\"\n    done\n  ) > ${INSTALL}/usr/lib/udev/rc_keymaps/${name}.toml\n}\n\npost_makeinstall_target() {\n  local f keymap\n\n  rm -rf ${INSTALL}/etc/rc_keymaps\n    ln -sf /storage/.config/rc_keymaps ${INSTALL}/etc/rc_keymaps\n\n  mkdir -p ${INSTALL}/usr/config\n    cp -PR ${PKG_DIR}/config/* ${INSTALL}/usr/config\n\n  rm -rf ${INSTALL}/usr/lib/udev/rules.d\n    mkdir -p ${INSTALL}/usr/lib/udev/rules.d\n    cp -PR ${PKG_DIR}/udev.d/*.rules ${INSTALL}/usr/lib/udev/rules.d\n\n  # install additional keymaps without overwriting upstream maps\n  (\n    set -C\n    for f in ${PKG_DIR}/keymaps/*; do\n      if [ -e ${f} ]; then\n        keymap=$(basename ${f})\n        cat ${f} > ${INSTALL}/usr/lib/udev/rc_keymaps/${keymap}\n      fi\n    done\n  )\n\n  # create multi keymap to support several remotes OOTB\n  if [ -n \"${IR_REMOTE_KEYMAPS}\" ]; then\n    create_multi_keymap libreelec_multi ${IR_REMOTE_KEYMAPS}\n\n    # use multi-keymap instead of default one\n    sed -i '/^\\*\\s*rc-rc6-mce\\s*rc6_mce/d' ${INSTALL}/etc/rc_maps.cfg\n\n    cat << EOF >> ${INSTALL}/etc/rc_maps.cfg\n#\n# Custom LibreELEC configuration starts here\n#\n# use combined multi-table on MCE receivers\n# *\t\trc-rc6-mce\trc6_mce.toml\n*\t\trc-rc6-mce\tlibreelec_multi.toml\n# multi-table for amlogic devices\nmeson-ir\trc-empty\tlibreelec_multi.toml\nEOF\n\n  fi\n}\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/patches/v4l-utils-001-disable-doxygen-in-automake.patch",
    "content": "From 137dd2edea4d6c70b10caebebed4778716070ed2 Mon Sep 17 00:00:00 2001\nFrom: Matthias Reichl <hias@horus.com>\nDate: Sun, 9 Feb 2020 00:16:29 +0100\nSubject: [PATCH] don't include doxygen autotools include\n\nSigned-off-by: Matthias Reichl <hias@horus.com>\n---\n Makefile.am | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile.am b/Makefile.am\nindex d20dfe0f..05dc8c1a 100644\n--- a/Makefile.am\n+++ b/Makefile.am\n@@ -10,7 +10,7 @@\n \n EXTRA_DIST = android-config.h sync-with-kernel.sh bootstrap.sh \\\n \tdoxygen_libdvbv5.cfg include COPYING.libv4l \\\n \tCOPYING.libdvbv5 README.libv4l README.lib-multi-threading \\\n \tTODO.libdvbv5 doc/libdvbv5-index.doc\n \n-include $(top_srcdir)/aminclude.am\n+# include $(top_srcdir)/aminclude.am\n-- \n2.20.1\n\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/patches/v4l-utils-002-support-libbpf-1-0-0.patch",
    "content": "From dce0e3e1e4ea91d3e46098362a880371ec5afe1b Mon Sep 17 00:00:00 2001\nFrom: Sudip Mukherjee <sudipm.mukherjee@gmail.com>\nDate: Tue, 1 Nov 2022 20:25:28 +0000\nSubject: keytable: Convert deprecated libbpf API\n\nThe libbpf APIs bpf_load_program_xattr(), bpf_create_map_node() and\nbpf_create_map_in_map_node() have been deprecated since v0.7. Convert\nthem to use bpf_prog_load() and bpf_map_create().\nAlso, modify config script to add a check for libbpf version.\n\nSigned-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>\nSigned-off-by: Sean Young <sean@mess.org>\n---\n configure.ac              |  2 +-\n utils/keytable/bpf_load.c | 59 ++++++++++++++++++++++++++---------------------\n 2 files changed, 34 insertions(+), 27 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 05298981..9b7c371d 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -564,7 +564,7 @@ AM_CONDITIONAL([WITH_V4L2_CTL_32], [test x${enable_v4l2_ctl_32} = xyes])\n AM_CONDITIONAL([WITH_V4L2_COMPLIANCE], [test x$ac_cv_func_fork = xyes])\n AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_LIBV4L], [test x$ac_cv_func_fork = xyes -a x${enable_v4l2_compliance_libv4l} != xno])\n AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_32], [test x$ac_cv_func_fork = xyes -a x${enable_v4l2_compliance_32} = xyes])\n-PKG_CHECK_MODULES([LIBBPF], [libbpf], [bpf_pc=yes], [bpf_pc=no])\n+PKG_CHECK_MODULES([LIBBPF], [libbpf >= 0.7], [bpf_pc=yes], [bpf_pc=no])\n AM_CONDITIONAL([WITH_BPF],          [test x$enable_bpf != xno -a x$libelf_pkgconfig = xyes -a x$CLANG = xclang -a x$bpf_pc = xyes])\n \n # append -static to libtool compile and link command to enforce static libs\ndiff --git a/utils/keytable/bpf_load.c b/utils/keytable/bpf_load.c\nindex 7c633dac..06098fc3 100644\n--- a/utils/keytable/bpf_load.c\n+++ b/utils/keytable/bpf_load.c\n@@ -63,19 +63,17 @@ struct bpf_file {\n \n static int load_and_attach(int lirc_fd, struct bpf_file *bpf_file, struct bpf_insn *prog, int size)\n {\n-\tstruct bpf_load_program_attr load_attr;\n-\tint fd, err;\n+\tLIBBPF_OPTS(bpf_prog_load_opts, opts);\n+\tint fd, err, insn_cnt;\n \n-\tmemset(&load_attr, 0, sizeof(struct bpf_load_program_attr));\n+\tinsn_cnt = size / sizeof(struct bpf_insn);\n \n-\tload_attr.prog_type = BPF_PROG_TYPE_LIRC_MODE2;\n-\tload_attr.expected_attach_type = BPF_LIRC_MODE2;\n-\tload_attr.name = bpf_file->name;\n-\tload_attr.insns = prog;\n-\tload_attr.insns_cnt = size / sizeof(struct bpf_insn);\n-\tload_attr.license = bpf_file->license;\n+\topts.expected_attach_type = BPF_LIRC_MODE2;\n+\topts.log_buf = bpf_log_buf;\n+\topts.log_size = LOG_BUF_SIZE;\n \n-\tfd = bpf_load_program_xattr(&load_attr, bpf_log_buf, LOG_BUF_SIZE);\n+\tfd = bpf_prog_load(BPF_PROG_TYPE_LIRC_MODE2, bpf_file->name,\n+\t\t\t\tbpf_file->license, prog, insn_cnt, &opts);\n \tif (fd < 0) {\n \t\tprintf(\"bpf_load_program() err=%m\\n%s\", bpf_log_buf);\n \t\treturn -1;\n@@ -95,6 +93,9 @@ static int build_raw_map(struct bpf_map_data *map, struct raw_entry *raw, int nu\n \tint no_patterns, value_size, fd, key, i;\n \tstruct raw_entry *e;\n \tstruct raw_pattern *p;\n+\tLIBBPF_OPTS(bpf_map_create_opts, opts,\n+\t\t.map_flags = map->def.map_flags,\n+\t);\n \n \tno_patterns = 0;\n \n@@ -110,14 +111,13 @@ static int build_raw_map(struct bpf_map_data *map, struct raw_entry *raw, int nu\n \n \tvalue_size = sizeof(struct raw_pattern) + max_length * sizeof(short);\n \n-\tfd = bpf_create_map_node(map->def.type,\n-\t\t\t\t map->name,\n-\t\t\t\t map->def.key_size,\n-\t\t\t\t value_size,\n-\t\t\t\t no_patterns,\n-\t\t\t\t map->def.map_flags,\n-\t\t\t\t numa_node);\n-\n+\topts.numa_node = numa_node;\n+\tfd = bpf_map_create(map->def.type,\n+\t\t\t    map->name,\n+\t\t\t    map->def.key_size,\n+\t\t\t    value_size,\n+\t\t\t    no_patterns,\n+\t\t\t    &opts);\n \tif (fd < 0) {\n \t\tprintf(_(\"failed to create a map: %d %s\\n\"),\n \t\t       errno, strerror(errno));\n@@ -174,27 +174,34 @@ static int load_maps(struct bpf_file *bpf_file, struct raw_entry *raw)\n \n \t\tif (maps[i].def.type == BPF_MAP_TYPE_ARRAY_OF_MAPS ||\n \t\t    maps[i].def.type == BPF_MAP_TYPE_HASH_OF_MAPS) {\n-\t\t\tint inner_map_fd = bpf_file->map_fd[maps[i].def.inner_map_idx];\n+\t\t\tLIBBPF_OPTS(bpf_map_create_opts, opts,\n+\t\t\t\t.inner_map_fd = bpf_file->map_fd[maps[i].def.inner_map_idx],\n+\t\t\t\t.map_flags = maps[i].def.map_flags,\n+\t\t\t\t.numa_node = numa_node,\n+\t\t\t);\n \n-\t\t\tbpf_file->map_fd[i] = bpf_create_map_in_map_node(\n+\t\t\tbpf_file->map_fd[i] = bpf_map_create(\n \t\t\t\t\t\t\tmaps[i].def.type,\n \t\t\t\t\t\t\tmaps[i].name,\n \t\t\t\t\t\t\tmaps[i].def.key_size,\n-\t\t\t\t\t\t\tinner_map_fd,\n+\t\t\t\t\t\t\t4,\n \t\t\t\t\t\t\tmaps[i].def.max_entries,\n-\t\t\t\t\t\t\tmaps[i].def.map_flags,\n-\t\t\t\t\t\t\tnuma_node);\n+\t\t\t\t\t\t\t&opts);\n \t\t} else if (!strcmp(maps[i].name, \"raw_map\")) {\n \t\t\tbpf_file->map_fd[i] = build_raw_map(&maps[i], raw, numa_node);\n \t\t} else {\n-\t\t\tbpf_file->map_fd[i] = bpf_create_map_node(\n+\t\t\tLIBBPF_OPTS(bpf_map_create_opts, opts,\n+\t\t\t\t.map_flags = maps[i].def.map_flags,\n+\t\t\t\t.numa_node = numa_node,\n+\t\t\t);\n+\n+\t\t\tbpf_file->map_fd[i] = bpf_map_create(\n \t\t\t\t\t\t\tmaps[i].def.type,\n \t\t\t\t\t\t\tmaps[i].name,\n \t\t\t\t\t\t\tmaps[i].def.key_size,\n \t\t\t\t\t\t\tmaps[i].def.value_size,\n \t\t\t\t\t\t\tmaps[i].def.max_entries,\n-\t\t\t\t\t\t\tmaps[i].def.map_flags,\n-\t\t\t\t\t\t\tnuma_node);\n+\t\t\t\t\t\t\t&opts);\n \t\t}\n \n \t\tif (bpf_file->map_fd[i] < 0) {\n-- \ncgit v1.2.1\n\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/patches/v4l-utils-003-add-power-on-argument.patch",
    "content": "From 43034e79bdd1385f7410361c0e986adfcf2cdae3 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 8 Dec 2020 09:35:08 -0500\nSubject: [PATCH] add-power-on-argument\n\n---\n utils/keytable/keytable.c | 154 +++++++++++++++++++++++++-------------\n 1 file changed, 102 insertions(+), 52 deletions(-)\n\ndiff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c\nindex 248493a..6f1831a 100644\n--- a/utils/keytable/keytable.c\n+++ b/utils/keytable/keytable.c\n@@ -141,6 +141,7 @@ enum sysfs_protocols {\n \tSYSFS_IMON\t\t= (1 << 14),\n \tSYSFS_RCMM\t\t= (1 << 15),\n \tSYSFS_XBOX_DVD\t\t= (1 << 16),\n+\tSYSFS_IRMP\t\t= (1 << 17),\n \tSYSFS_INVALID\t\t= 0,\n };\n \n@@ -177,6 +178,7 @@ const struct protocol_map_entry protocol_map[] = {\n \t{ \"imon\",\tNULL,\t\tSYSFS_IMON\t},\n \t{ \"rc-mm\",\tNULL,\t\tSYSFS_RCMM\t},\n \t{ \"xbox-dvd\",\tNULL,\t\tSYSFS_XBOX_DVD\t},\n+\t{ \"irmp\",\t\"/irmp_decoder\",\t\tSYSFS_IRMP\t},\n \t{ NULL,\t\tNULL,\t\tSYSFS_INVALID\t},\n };\n \n@@ -266,6 +268,7 @@ static const struct argp_option options[] = {\n \t{\"clear\",\t'c',\t0,\t\t0,\tN_(\"Clears the scancode to keycode mappings\"), 0},\n \t{\"sysdev\",\t's',\tN_(\"SYSDEV\"),\t0,\tN_(\"rc device to control, defaults to rc0 if not specified\"), 0},\n \t{\"test\",\t't',\t0,\t\t0,\tN_(\"test if IR is generating events\"), 0},\n+\t{\"power-key\",\t'u',\t0,\t\t0,\tN_(\"will scan for a compatible power on code\"), 0},\n \t{\"read\",\t'r',\t0,\t\t0,\tN_(\"reads the current scancode/keycode mapping\"), 0},\n \t{\"write\",\t'w',\tN_(\"KEYMAP\"),\t0,\tN_(\"write (adds) the keymap from the specified file\"), 0},\n \t{\"set-key\",\t'k',\tN_(\"SCANKEY\"),\t0,\tN_(\"Change scan/key pairs\"), 0},\n@@ -289,6 +292,7 @@ static int readtable = 0;\n static int clear = 0;\n int debug = 0;\n static int test = 0;\n+static int poweron = 0;\n static int delay = -1;\n static int period = -1;\n static int test_keymap = 0;\n@@ -538,6 +542,9 @@ static error_t parse_opt(int k, char *arg, struct argp_state *state)\n \tcase 't':\n \t\ttest++;\n \t\tbreak;\n+\tcase 'u':\n+\t\tpoweron++;\n+\t\tbreak;\n \tcase 'c':\n \t\tclear++;\n \t\tbreak;\n@@ -1501,12 +1508,14 @@ static void print_scancodes(const struct lirc_scancode *scancodes, unsigned coun\n \t}\n }\n \n-static void test_event(struct rc_device *rc_dev, int fd)\n+static void test_event(struct rc_device *rc_dev, int fd, int power_on)\n {\n \tstruct input_event ev[64];\n \tstruct lirc_scancode sc[64];\n \tint rd, i, lircfd = -1;\n \tunsigned mode;\n+\tunsigned protocol;\n+\tunsigned undefined;\n \n \t/* LIRC reports time in monotonic, set event to same */\n \tmode = CLOCK_MONOTONIC;\n@@ -1526,7 +1535,11 @@ static void test_event(struct rc_device *rc_dev, int fd)\n \t\t}\n \t}\n \n-\tprintf (_(\"Testing events. Please, press CTRL-C to abort.\\n\"));\n+\tif (!power_on)\n+\t\tprintf (_(\"Testing events. Please, press CTRL-C to abort.\\n\"));\n+\telse\n+\t\tprintf (_(\"Waiting for IRMP decode event. Please, press CTRL-C to abort.\\n\"));\n+\n \twhile (1) {\n \t\tstruct pollfd pollstruct[2] = {\n \t\t\t{ .fd = fd, .events = POLLIN },\n@@ -1540,7 +1553,7 @@ static void test_event(struct rc_device *rc_dev, int fd)\n \t\t\tperror(_(\"poll returned error\"));\n \t\t}\n \n-\t\tif (lircfd != -1) {\n+\t\tif (lircfd != -1 && !power_on) {\n \t\t\trd = read(lircfd, sc, sizeof(sc));\n \n \t\t\tif (rd != -1) {\n@@ -1561,54 +1574,88 @@ static void test_event(struct rc_device *rc_dev, int fd)\n \t\t\treturn;\n \t\t}\n \n-\t\tfor (i = 0; i < rd / sizeof(struct input_event); i++) {\n-\t\t\tprintf(_(\"%ld.%06ld: event type %s(0x%02x)\"),\n-\t\t\t\tev[i].input_event_sec, ev[i].input_event_usec,\n-\t\t\t\tget_event_name(events_type, ev[i].type), ev[i].type);\n+\t\tif (!power_on) {\n+\t\t\tfor (i = 0; i < rd / sizeof(struct input_event); i++) {\n+\t\t\t\tprintf(_(\"%ld.%06ld: event type %s(0x%02x)\"),\n+\t\t\t\t\tev[i].input_event_sec, ev[i].input_event_usec,\n+\t\t\t\t\tget_event_name(events_type, ev[i].type), ev[i].type);\n \n-\t\t\tswitch (ev[i].type) {\n-\t\t\tcase EV_SYN:\n-\t\t\t\tprintf(\".\\n\");\n-\t\t\t\tbreak;\n-\t\t\tcase EV_KEY:\n-\t\t\t\tprintf(_(\" key_%s: %s(0x%04x)\\n\"),\n-\t\t\t\t\t(ev[i].value == 0) ? _(\"up\") : _(\"down\"),\n-\t\t\t\t\tget_event_name(key_events, ev[i].code),\n-\t\t\t\t\tev[i].code);\n-\t\t\t\tbreak;\n-\t\t\tcase EV_REL:\n-\t\t\t\tprintf(_(\": %s (0x%04x) value=%d\\n\"),\n-\t\t\t\t\tget_event_name(rel_events, ev[i].code),\n-\t\t\t\t\tev[i].code,\n-\t\t\t\t\tev[i].value);\n-\t\t\t\tbreak;\n-\t\t\tcase EV_ABS:\n-\t\t\t\tprintf(_(\": %s (0x%04x) value=%d\\n\"),\n-\t\t\t\t\tget_event_name(abs_events, ev[i].code),\n-\t\t\t\t\tev[i].code,\n-\t\t\t\t\tev[i].value);\n-\t\t\t\tbreak;\n-\t\t\tcase EV_MSC:\n-\t\t\t\tif (ev[i].code == MSC_SCAN)\n-\t\t\t\t\tprintf(_(\": scancode = 0x%02x\\n\"), ev[i].value);\n-\t\t\t\telse\n-\t\t\t\t\tprintf(_(\": code = %s(0x%02x), value = %d\\n\"),\n-\t\t\t\t\t\tget_event_name(msc_events, ev[i].code),\n+\t\t\t\tswitch (ev[i].type) {\n+\t\t\t\tcase EV_SYN:\n+\t\t\t\t\tprintf(\".\\n\");\n+\t\t\t\t\tbreak;\n+\t\t\t\tcase EV_KEY:\n+\t\t\t\t\tprintf(_(\" key_%s: %s(0x%04x)\\n\"),\n+\t\t\t\t\t\t(ev[i].value == 0) ? _(\"up\") : _(\"down\"),\n+\t\t\t\t\t\tget_event_name(key_events, ev[i].code),\n+\t\t\t\t\t\tev[i].code);\n+\t\t\t\t\tbreak;\n+\t\t\t\tcase EV_REL:\n+\t\t\t\t\tprintf(_(\": %s (0x%04x) value=%d\\n\"),\n+\t\t\t\t\t\tget_event_name(rel_events, ev[i].code),\n+\t\t\t\t\t\tev[i].code,\n+\t\t\t\t\t\tev[i].value);\n+\t\t\t\t\tbreak;\n+\t\t\t\tcase EV_ABS:\n+\t\t\t\t\tprintf(_(\": %s (0x%04x) value=%d\\n\"),\n+\t\t\t\t\t\tget_event_name(abs_events, ev[i].code),\n+\t\t\t\t\t\tev[i].code,\n+\t\t\t\t\t\tev[i].value);\n+\t\t\t\t\tbreak;\n+\t\t\t\tcase EV_MSC:\n+\t\t\t\t\tif (ev[i].code == MSC_SCAN)\n+\t\t\t\t\t\tprintf(_(\": scancode = 0x%02x\\n\"), ev[i].value);\n+\t\t\t\t\telse\n+\t\t\t\t\t\tprintf(_(\": code = %s(0x%02x), value = %d\\n\"),\n+\t\t\t\t\t\t\tget_event_name(msc_events, ev[i].code),\n+\t\t\t\t\t\t\tev[i].code, ev[i].value);\n+\t\t\t\t\tbreak;\n+\t\t\t\tcase EV_REP:\n+\t\t\t\t\tprintf(_(\": value = %d\\n\"), ev[i].value);\n+\t\t\t\t\tbreak;\n+\t\t\t\tcase EV_SW:\n+\t\t\t\tcase EV_LED:\n+\t\t\t\tcase EV_SND:\n+\t\t\t\tcase EV_FF:\n+\t\t\t\tcase EV_PWR:\n+\t\t\t\tcase EV_FF_STATUS:\n+\t\t\t\tdefault:\n+\t\t\t\t\tprintf(_(\": code = 0x%02x, value = %d\\n\"),\n \t\t\t\t\t\tev[i].code, ev[i].value);\n-\t\t\t\tbreak;\n-\t\t\tcase EV_REP:\n-\t\t\t\tprintf(_(\": value = %d\\n\"), ev[i].value);\n-\t\t\t\tbreak;\n-\t\t\tcase EV_SW:\n-\t\t\tcase EV_LED:\n-\t\t\tcase EV_SND:\n-\t\t\tcase EV_FF:\n-\t\t\tcase EV_PWR:\n-\t\t\tcase EV_FF_STATUS:\n-\t\t\tdefault:\n-\t\t\t\tprintf(_(\": code = 0x%02x, value = %d\\n\"),\n-\t\t\t\t\tev[i].code, ev[i].value);\n-\t\t\t\tbreak;\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t} else {\n+\t\t\tfor (i = 0; i < rd / sizeof(struct input_event); i++) {\n+\n+\t\t\t\tswitch (ev[i].type) {\n+\t\t\t\tcase EV_MSC:\n+\t\t\t\t\tif (ev[i].code == MSC_SCAN) {\n+\t\t\t\t\t\tif ((ev[i].value & 0xFFFFFF00) == 0xA0A0A000) {\n+\t\t\t\t\t\t\tprotocol = ev[i].value & 0xFF;\n+\t\t\t\t\t\t\tundefined = 0;\n+\t\t\t\t\t\t\tmode = 0;\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\telse if ((ev[i].value & 0xFFFFFF00) == 0xB0B0B000) {\n+\t\t\t\t\t\t\tprotocol = ev[i].value & 0xFF;\n+\t\t\t\t\t\t\tundefined = 1;\n+\t\t\t\t\t\t\tmode = 0;\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\telse if (!mode) {\n+\t\t\t\t\t\t\tif (!undefined) {\n+\t\t\t\t\t\t\t\tprintf(_(\"Received IRMP code: remotewakeup='0x%08x', decode_type='0x%x', \"), ev[i].value, protocol);\n+\t\t\t\t\t\t\t\tmode = 1;\n+\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\telse\n+\t\t\t\t\t\t\t\tprintf(_(\"Received IRMP code: scancode='0x%08x', IRMP protocol = %d, decode_type is undefined!\\n\"), ev[i].value, protocol);\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\telse if (mode) {\n+\t\t\t\t\t\t\tprintf(_(\"remotewakeupmask='0x%08x'\\n\"), ev[i].value);\n+\t\t\t\t\t\t\tmode = 0;\n+\t\t\t\t\t\t}\n+\t\t\t\t\t}\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n@@ -2047,7 +2094,7 @@ int main(int argc, char *argv[])\n \t\treturn 0;\n \n \t/* Just list all devices */\n-\tif (!clear && !readtable && !keytable && !ch_proto && !cfg.next && !test && delay < 0 && period < 0 && !bpf_protocol) {\n+\tif (!clear && !readtable && !keytable && !ch_proto && !cfg.next && !test && !poweron && delay < 0 && period < 0 && !bpf_protocol) {\n \t\tif (show_sysfs_attribs(&rc_dev, devclass))\n \t\t\treturn -1;\n \n@@ -2153,6 +2200,9 @@ int main(int argc, char *argv[])\n \t/*\n \t * Third step: change protocol\n \t */\n+\tif (poweron)\n+\t\tch_proto = SYSFS_IRMP;\n+\n \tif (ch_proto || bpf_protocol) {\n \t\tif (rc_dev.lirc_name)\n \t\t\tclear_bpf(rc_dev.lirc_name);\n@@ -2203,8 +2253,8 @@ int main(int argc, char *argv[])\n \t\tset_rate(fd, new_delay, new_period);\n \t}\n \n-\tif (test)\n-\t\ttest_event(&rc_dev, fd);\n+\tif (test || poweron)\n+\t\ttest_event(&rc_dev, fd, poweron);\n \n \treturn 0;\n }\n-- \n2.38.1\n\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/patches/v4l-utils-003-enable-bpf-without-clang.patch",
    "content": "From ff65aa88a1ff3f02cc10e5a6e2af865b0c97f4fc Mon Sep 17 00:00:00 2001\nFrom: Matthias Reichl <hias@horus.com>\nDate: Sat, 8 Feb 2020 21:42:06 +0100\nSubject: [PATCH] disable bpf decoder build and drop bpf dependency on clang\n\nSigned-off-by: Matthias Reichl <hias@horus.com>\n---\n configure.ac               | 2 +-\n utils/keytable/Makefile.am | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 3bb1d2a5..7b633473 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -565,7 +565,7 @@\n AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_LIBV4L], [test x$ac_cv_func_fork = xyes -a x${enable_v4l2_compliance_libv4l} != xno])\n AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_32], [test x$ac_cv_func_fork = xyes -a x${enable_v4l2_compliance_32} = xyes])\n PKG_CHECK_MODULES([LIBBPF], [libbpf >= 0.7], [bpf_pc=yes], [bpf_pc=no])\n-AM_CONDITIONAL([WITH_BPF],          [test x$enable_bpf != xno -a x$libelf_pkgconfig = xyes -a x$CLANG = xclang -a x$bpf_pc = xyes])\n+AM_CONDITIONAL([WITH_BPF],          [test x$enable_bpf != xno -a x$libelf_pkgconfig = xyes -a x$bpf_pc = xyes])\n \n # append -static to libtool compile and link command to enforce static libs\n AS_IF([test x$enable_libdvbv5 = xno], [AC_SUBST([ENFORCE_LIBDVBV5_STATIC], [\"-static\"])])\ndiff --git a/utils/keytable/Makefile.am b/utils/keytable/Makefile.am\nindex 4724897e..1c209fe2 100644\n--- a/utils/keytable/Makefile.am\n+++ b/utils/keytable/Makefile.am\n@@ -23,7 +23,7 @@\n if WITH_BPF\n ir_keytable_LDFLAGS += $(LIBELF_LIBS) $(LIBBPF_LIBS)\n ir_keytable_CFLAGS = $(LIBBPF_CFLAGS)\n-SUBDIRS = bpf_protocols\n+# SUBDIRS = bpf_protocols\n endif\n \n EXTRA_DIST = 70-infrared.rules 50-rc_keymap.conf rc_keymaps rc_keymaps_userspace gen_input_events.pl gen_keytables.pl ir-keytable.1 rc_maps.cfg rc_keymap.5\n-- \n2.20.1\n\n"
  },
  {
    "path": "packages/sysutils/v4l-utils/udev.d/70-infrared.rules",
    "content": "\n# Automatically load the proper keymaps after the Remote Controller device\n# creation.\n#\n# User-defined rules can be stored in /storage/.config/rc_maps.cfg. If that\n# file doesn't exist the default rules from /etc/rc_maps.cfg are used.\n\nACTION==\"add\", KERNEL==\"event*\", SUBSYSTEM==\"input\", SUBSYSTEMS==\"rc\", ENV{.rc_sysdev}=\"$id\", GOTO=\"begin\"\nGOTO=\"end\"\n\nLABEL=\"begin\"\n\nENV{.rc_maps_cfg}=\"/etc/rc_maps.cfg\"\nTEST==\"/storage/.config/rc_maps.cfg\", ENV{.rc_maps_cfg}=\"/storage/.config/rc_maps.cfg\"\n\nRUN+=\"/usr/bin/ir-keytable -a $env{.rc_maps_cfg} -s $env{.rc_sysdev}\"\n\nLABEL=\"end\"\n\n"
  },
  {
    "path": "packages/sysutils/wait-time-sync/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"wait-time-sync\"\nPKG_VERSION=\"1.0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A simple tool and systemd service to wait until NTP time is synced\"\n\n\npost_install() {\n  enable_service wait-time-sync.service\n}\n"
  },
  {
    "path": "packages/sysutils/wait-time-sync/sources/Makefile",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\n.PHONY: all\nall: wait-time-sync\n\nPREFIX = /usr\n\n.PHONY: install\ninstall: wait-time-sync\n\tinstall -d $(DESTDIR)$(PREFIX)/bin\n\tinstall $< $(DESTDIR)$(PREFIX)/bin\n"
  },
  {
    "path": "packages/sysutils/wait-time-sync/sources/wait-time-sync.c",
    "content": "/* SPDX-License-Identifier: GPL-2.0 */\n/* Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv) */\n\n#include <sys/timex.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <unistd.h>\n#include <string.h>\n#include <errno.h>\n#include <limits.h>\n\n#define POLL_FREQ 10\n\nvoid usage(char *name)\n{\n  if (!name)\n    name = \"wait-time-sync\";\n\n  printf(\"Usage: %s [-t seconds | --timeout seconds]\\n\", name);\n  exit(2);\n}\n\nint main(int argc, char** argv)\n{\n  unsigned timeout = UINT_MAX;\n  int rc = 0;\n\n  if (argc == 3)\n  {\n    unsigned long val;\n    char *p;\n\n    if (strcmp(argv[1], \"-t\") && strcmp(argv[1], \"--timeout\"))\n      usage(argv[0]);\n    val = strtoul(argv[2], &p, 0);\n    if (*p || val == 0 || val >= UINT_MAX / POLL_FREQ)\n      usage(argv[0]);\n    timeout = (unsigned)val * POLL_FREQ;\n  }\n  else if (argc != 1)\n    usage(argv[0]);\n\n  for ( ; timeout; --timeout)\n  {\n    struct timex tx = {};\n\n    rc = adjtimex(&tx);\n    if (rc != TIME_ERROR)\n      break;\n    usleep(1000000U / POLL_FREQ);\n  }\n\n  return rc == -1 ? errno : !timeout;\n}\n"
  },
  {
    "path": "packages/sysutils/wait-time-sync/system.d/wait-time-sync.service",
    "content": "#  SPDX-License-Identifier: LGPL-2.1+\n#\n#  This file was part of systemd.\n#  Modified by Team LibreELEC (https://libreelec.tv)\n#\n#  systemd is free software; you can redistribute it and/or modify it\n#  under the terms of the GNU Lesser General Public License as published by\n#  the Free Software Foundation; either version 2.1 of the License, or\n#  (at your option) any later version.\n\n[Unit]\nDescription=Wait for Kernel Time Synchronisation\nConditionVirtualization=!container\n\nDefaultDependencies=no\nBefore=time-sync.target shutdown.target\nWants=time-sync.target\nConflicts=shutdown.target\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/wait-time-sync\nTimeoutStartSec=infinity\nRemainAfterExit=yes\n\n[Install]\nWantedBy=sysinit.target\n"
  },
  {
    "path": "packages/testing/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"testing\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"various\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"testing: Metapackage for various packages to test while developing\"\n"
  },
  {
    "path": "packages/textproc/expat/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"expat\"\nPKG_VERSION=\"2.5.0\"\nPKG_SHA256=\"ef2420f0232c087801abf705e89ae65f6257df6b7931d37846a193ef2e8cdcbe\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://libexpat.github.io\"\nPKG_URL=\"https://github.com/libexpat/libexpat/releases/download/R_${PKG_VERSION//./_}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Expat is an XML parser library written in C.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DEXPAT_BUILD_DOCS=OFF \\\n                       -DEXPAT_BUILD_TOOLS=OFF \\\n                       -DEXPAT_BUILD_EXAMPLES=OFF \\\n                       -DEXPAT_BUILD_TESTS=OFF \\\n                       -DEXPAT_SHARED_LIBS=ON\"\nPKG_CMAKE_OPTS_HOST=\"-DEXPAT_BUILD_DOCS=OFF \\\n                     -DEXPAT_BUILD_TOOLS=OFF \\\n                     -DEXPAT_BUILD_EXAMPLES=OFF \\\n                     -DEXPAT_BUILD_TESTS=OFF \\\n                     -DEXPAT_SHARED_LIBS=ON\"\n"
  },
  {
    "path": "packages/textproc/itstool/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"itstool\"\nPKG_VERSION=\"2.0.7\"\nPKG_SHA256=\"6b9a7cd29a12bb95598f5750e8763cee78836a1a207f85b74d8b3275b27e87ca\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"http://itstool.org\"\nPKG_URL=\"http://files.itstool.org/itstool/itstool-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_HOST=\"toolchain libxml2:host\"\nPKG_LONGDESC=\"ITS Tool allows you to translate your XML documents with PO files.\"\nPKG_TOOLCHAIN=\"autotools\"\n"
  },
  {
    "path": "packages/textproc/jsoncpp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"jsoncpp\"\nPKG_VERSION=\"1.9.5\"\nPKG_SHA256=\"f409856e5920c18d0c2fb85276e24ee607d2a09b5e7d5f0a371368903c275da2\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/open-source-parsers/jsoncpp/\"\nPKG_URL=\"https://github.com/open-source-parsers/jsoncpp/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A C++ library for interacting with JSON.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_MESON_OPTS_TARGET=\"-Dtests=false \\\n                       --default-library static\"\n"
  },
  {
    "path": "packages/textproc/libidn2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libidn2\"\nPKG_VERSION=\"2.3.4\"\nPKG_SHA256=\"93caba72b4e051d1f8d4f5a076ab63c99b77faee019b72b9783b267986dbb45f\"\nPKG_LICENSE=\"LGPL3\"\nPKG_SITE=\"https://www.gnu.org/software/libidn/\"\nPKG_URL=\"https://ftpmirror.gnu.org/gnu/libidn/libidn2-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Free software implementation of IDNA2008, Punycode and TR46.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-doc \\\n                           --enable-shared \\\n                           --disable-static\"\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/textproc/libxml2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libxml2\"\nPKG_VERSION=\"2.10.3\"\nPKG_SHA256=\"302bbb86400b8505bebfbf7b3d1986e9aa05073198979f258eed4be481ff5f83\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"http://xmlsoft.org\"\nPKG_URL=\"https://gitlab.gnome.org/GNOME/${PKG_NAME}/-/archive/v${PKG_VERSION}/${PKG_NAME}-v${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_HOST=\"zlib:host Python3:host\"\nPKG_DEPENDS_TARGET=\"toolchain zlib\"\nPKG_LONGDESC=\"The libxml package contains an XML library, which allows you to manipulate XML files.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_ALL=\"ac_cv_header_ansidecl_h=no \\\n                        --enable-static \\\n                        --enable-shared \\\n                        --disable-silent-rules \\\n                        --enable-ipv6 \\\n                        --without-lzma\"\n\nPKG_CONFIGURE_OPTS_HOST=\"${PKG_CONFIGURE_OPTS_ALL} \\\n                         --with-zlib=${TOOLCHAIN} \\\n                         --with-python\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"${PKG_CONFIGURE_OPTS_ALL} \\\n                           --with-zlib=${SYSROOT_PREFIX}/usr \\\n                           --without-python \\\n                           --with-sysroot=${SYSROOT_PREFIX}\"\n\npost_makeinstall_target() {\n  sed -e \"s:\\(['= ]\\)/usr:\\\\1${SYSROOT_PREFIX}/usr:g\" -i ${SYSROOT_PREFIX}/usr/bin/xml2-config\n\n  rm -rf ${INSTALL}/usr/bin\n  rm -rf ${INSTALL}/usr/lib/xml2Conf.sh\n}\n"
  },
  {
    "path": "packages/textproc/libxslt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libxslt\"\nPKG_VERSION=\"1.1.37\"\nPKG_SHA256=\"6dbeb21aa8c938e6a39010901c0e84122bb87225b4af31f76feb4e3a5b138a5c\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"http://xmlsoft.org/xslt/\"\nPKG_URL=\"https://gitlab.gnome.org/GNOME/${PKG_NAME}/-/archive/v${PKG_VERSION}/${PKG_NAME}-v${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_HOST=\"libxml2:host\"\nPKG_DEPENDS_TARGET=\"toolchain libxml2\"\nPKG_LONGDESC=\"A XSLT C library.\"\nPKG_BUILD_FLAGS=\"+pic\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_HOST=\"  ac_cv_header_ansidecl_h=no \\\n                           ac_cv_header_xlocale_h=no \\\n                           --enable-static \\\n                           --disable-shared \\\n                           --without-python \\\n                           --with-libxml-prefix=${TOOLCHAIN} \\\n                           --without-crypto\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_header_ansidecl_h=no \\\n                           ac_cv_header_xlocale_h=no \\\n                           --enable-static \\\n                           --disable-shared \\\n                           --without-python \\\n                           --with-libxml-prefix=${SYSROOT_PREFIX}/usr \\\n                           --without-crypto\"\n\npost_makeinstall_target() {\n  sed -e \"s:\\(['= ]\\)/usr:\\\\1${SYSROOT_PREFIX}/usr:g\" -i ${SYSROOT_PREFIX}/usr/bin/xslt-config\n\n  rm -rf ${INSTALL}/usr/bin/xsltproc\n  rm -rf ${INSTALL}/usr/lib/xsltConf.sh\n}\n"
  },
  {
    "path": "packages/textproc/nlohmann-json/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"nlohmann-json\"\nPKG_VERSION=\"3.11.2\"\nPKG_SHA256=\"d69f9deb6a75e2580465c6c4c5111b89c4dc2fa94e3a85fcd2ffcd9a143d9273\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://nlohmann.github.io/json/\"\nPKG_URL=\"https://github.com/nlohmann/json/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"JSON for Modern C++\"\n# Meson does not provide nlohmann_json*.cmake files which some projects rely on\nPKG_TOOLCHAIN=\"cmake\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DJSON_BuildTests=OFF\"\n"
  },
  {
    "path": "packages/textproc/pugixml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pugixml\"\nPKG_VERSION=\"1.13\"\nPKG_SHA256=\"5c5ad5d7caeb791420408042a7d88c2c6180781bf218feca259fd9d840a888e1\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://pugixml.org/\"\nPKG_URL=\"https://github.com/zeux/pugixml/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Light-weight, simple and fast XML parser for C++ with XPath support.\"\nPKG_BUILD_FLAGS=\"+pic\"\n"
  },
  {
    "path": "packages/textproc/tinyxml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"tinyxml\"\nPKG_VERSION=\"2.6.2\"\nPKG_SHA256=\"8164c9ad48b9028667768a584d62f7760cfbfb90d0dd6214ad174403058da10c\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.grinninglizard.com/tinyxml/\"\nPKG_URL=\"http://mirrors.xbmc.org/build-deps/sources/${PKG_NAME}-${PKG_VERSION}_2.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"TinyXML is a simple, small, C++ XML parser.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared --with-pic\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr\n}\n"
  },
  {
    "path": "packages/textproc/tinyxml2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tinyxml2\"\nPKG_VERSION=\"9.0.0\"\nPKG_SHA256=\"cc2f1417c308b1f6acc54f88eb70771a0bf65f76282ce5c40e54cfe52952702c\"\nPKG_LICENSE=\"zlib\"\nPKG_SITE=\"http://www.grinninglizard.com/tinyxml2/index.html\"\nPKG_URL=\"https://github.com/leethomason/tinyxml2/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"TinyXML2 is a simple, small, C++ XML parser.\"\n\nPKG_MESON_OPTS_TARGET=\"-Ddefault_library=static \\\n                       -Dtests=false\"\n"
  },
  {
    "path": "packages/textproc/xmlstarlet/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"xmlstarlet\"\nPKG_VERSION=\"1.6.1\"\nPKG_SHA256=\"15d838c4f3375332fd95554619179b69e4ec91418a3a5296e7c631b7ed19e7ca\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"http://xmlstar.sourceforge.net\"\nPKG_URL=\"http://netcologne.dl.sourceforge.net/project/xmlstar/${PKG_NAME}/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"libxml2:host libxslt:host\"\nPKG_DEPENDS_TARGET=\"toolchain libxml2 libxslt\"\nPKG_LONGDESC=\"XMLStarlet is a command-line XML utility which allows the modification and validation of XML documents.\"\n\nPKG_CONFIGURE_OPTS_HOST=\"  ac_cv_func_malloc_0_nonnull=yes \\\n                           ac_cv_func_realloc_0_nonnull=yes \\\n                           --enable-static-libs \\\n                           LIBXML_CONFIG=${TOOLCHAIN}/bin/xml2-config \\\n                           LIBXSLT_CONFIG=${TOOLCHAIN}/bin/xslt-config \\\n                           --with-libxml-include-prefix=${TOOLCHAIN}/include/libxml2 \\\n                           --with-libxml-libs-prefix=${TOOLCHAIN}/lib \\\n                           --with-libxslt-include-prefix=${TOOLCHAIN}/include \\\n                           --with-libxslt-libs-prefix=${TOOLCHAIN}/lib\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_func_malloc_0_nonnull=yes \\\n                           ac_cv_func_realloc_0_nonnull=yes \\\n                           --enable-static-libs \\\n                           LIBXML_CONFIG=${SYSROOT_PREFIX}/usr/bin/xml2-config \\\n                           LIBXSLT_CONFIG=${SYSROOT_PREFIX}/usr/bin/xslt-config \\\n                           --with-libxml-include-prefix=${SYSROOT_PREFIX}/usr/include/libxml2 \\\n                           --with-libxml-libs-prefix=${SYSROOT_PREFIX}/usr/lib \\\n                           --with-libxslt-include-prefix=${SYSROOT_PREFIX}/usr/include \\\n                           --with-libxslt-libs-prefix=${SYSROOT_PREFIX}/usr/lib\"\n\npost_makeinstall_host() {\n  ln -sf xml ${TOOLCHAIN}/bin/xmlstarlet\n}\n\npost_makeinstall_target() {\n  ln -sf xml ${INSTALL}/usr/bin/xmlstarlet\n}\n"
  },
  {
    "path": "packages/textproc/xmlstarlet/patches/xmlstarlet-0001-usage2c.awk-fix-wrong-basename-regexp.patch",
    "content": "Upstream-Status: Submitted [sourceforge]\n\nFrom 75d789d0ea9716c9a9ae72f42a2fcfa907cf4a12 Mon Sep 17 00:00:00 2001\nFrom: Matthieu Crapet <mcrapet@gmail.com>\nDate: Mon, 30 Jun 2014 13:52:25 +0200\nSubject: [PATCH] usage2c.awk: fix wrong basename regexp\n\nPreviously not matching with filename argument with absolute path.\n\nSigned-off-by: Matthieu Crapet <mcrapet@gmail.com>\n---\n usage2c.awk | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/usage2c.awk b/usage2c.awk\nindex 94b897a..9aea212 100755\n--- a/usage2c.awk\n+++ b/usage2c.awk\n@@ -6,13 +6,13 @@ BEGIN {\n }\n \n # text in src/foo-bar.txt results in\n-#   static const char foo_text[] = {\n+#   static const char foo_bar[] = {\n #     't', 'h', 'e', ' ', 't', 'e', 'x', 't', ...\n #   }\n length(command_name) == 0 {\n     command_name = FILENAME;\n     sub(/\\.txt$/, \"\", command_name);\n-    sub(/^([^\\/]+\\/)*/, \"\", command_name);\n+    sub(/^.*\\//, \"\", command_name);\n     gsub(/-/, \"_\", command_name);\n     printf(\"static const char %s[] = {\\n\", command_name);\n     progs = 0;\n-- \n2.0.0\n\n"
  },
  {
    "path": "packages/tools/amlogic-boot-fip/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"amlogic-boot-fip\"\nPKG_LICENSE=\"nonfree\"\nPKG_VERSION=\"e96b6a694380ff07d5a9e4be644ffe254bd18512\"\nPKG_SHA256=\"2cc06bc7d5647fd8c0025181fa42c4a8ef0ed16b918a1fa2060ea83c22e47b20\"\nPKG_SITE=\"https://github.com/LibreELEC/amlogic-boot-fip\"\nPKG_URL=\"https://github.com/LibreELEC/amlogic-boot-fip/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"Firmware Image Package (FIP) sources used to sign Amlogic u-boot binaries in LibreELEC images\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_STAMP=\"${UBOOT_SYSTEM}\"\n"
  },
  {
    "path": "packages/tools/atf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC\n\nPKG_NAME=\"atf\"\nPKG_VERSION=\"2.8\"\nPKG_SHA256=\"42256fa354f32b09972e72e0570a0f73698785927f93163b1d1308c485fcb4a6\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"BSD-3c\"\nPKG_SITE=\"https://github.com/ARM-software/arm-trusted-firmware\"\nPKG_URL=\"https://github.com/ARM-software/arm-trusted-firmware/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"ARM Trusted Firmware is a reference implementation of secure world software, including a Secure Monitor executing at Exception Level 3 and various Arm interface standards.\"\nPKG_TOOLCHAIN=\"manual\"\n\n[ -n \"${KERNEL_TOOLCHAIN}\" ] && PKG_DEPENDS_TARGET+=\" gcc-${KERNEL_TOOLCHAIN}:host\"\n\nif [ \"${ATF_PLATFORM}\" = \"rk3399\" ]; then\n  PKG_DEPENDS_TARGET+=\" gcc-arm-none-eabi:host\"\n  export M0_CROSS_COMPILE=\"${TOOLCHAIN}/bin/arm-none-eabi-\"\nfi\n\nmake_target() {\n  if [ \"${ATF_PLATFORM}\" = \"imx8mq\" ]; then\n    CROSS_COMPILE=\"${TARGET_KERNEL_PREFIX}\" LDFLAGS=\"--no-warn-rwx-segments\" CFLAGS=\"--param=min-pagesize=0\" make PLAT=${ATF_PLATFORM} bl31\n  else\n    CROSS_COMPILE=\"${TARGET_KERNEL_PREFIX}\" LDFLAGS=\"--no-warn-rwx-segments\" CFLAGS=\"\" make PLAT=${ATF_PLATFORM} bl31\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/bootloader\n  cp -a build/${ATF_PLATFORM}/release/${ATF_BL31_BINARY:-bl31.bin} ${INSTALL}/usr/share/bootloader\n}\n"
  },
  {
    "path": "packages/tools/bcm2835-bootloader/files/config.txt",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n################################################################################\n# Bootloader configuration\n# config.txt version v1 (do not remove or change this line!)\n################################################################################\n# For more options and information see\n# http://rpf.io/configtxt\n################################################################################\n\n# Default GPU memory split, 76MB are needed for H264 decoder\ngpu_mem=76\n\n# Don't send initial active source message.\n# Avoids bringing CEC (enabled TV) out of standby and channel switch when\n# rebooting.\nhdmi_ignore_cec_init=1\n\n[all]\n################################################################################\n# Use distroconfig-composite.txt instead of distroconfig.txt to enable\n# composite video output.\n# The composite video mode needs to be configured in cmdline.txt:\n# For PAL add: video=Composite-1:720x576@50ie\n# For NTSC add: video=Composite-1:720x480@60ie\n################################################################################\ninclude distroconfig.txt\n#include distroconfig-composite.txt\n\n# uncomment to enable analog audio output\n#dtparam=audio=on\n#audio_pwm_mode=1\n\n# uncomment to enable infrared remote receiver connected to GPIO 18\n#dtoverlay=gpio-ir,gpio_pin=18\n\n"
  },
  {
    "path": "packages/tools/bcm2835-bootloader/files/distroconfig-composite.txt",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)\n\n# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!\ndisplay_auto_detect=1\ndtoverlay=vc4-kms-v3d,composite=1\ndtoverlay=\ndisable_overscan=1\ndisable_fw_kms_setup=1\n"
  },
  {
    "path": "packages/tools/bcm2835-bootloader/files/distroconfig.txt",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!\ndisplay_auto_detect=1\ndtoverlay=vc4-kms-v3d\ndtoverlay=\ndisable_overscan=1\ndisable_fw_kms_setup=1\n"
  },
  {
    "path": "packages/tools/bcm2835-bootloader/files/update.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n[ -z \"$BOOT_ROOT\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"$SYSTEM_ROOT\" ] && SYSTEM_ROOT=\"\"\n\nMIN_CONFIG_TXT_VERSION=1\n\n# mount $BOOT_ROOT r/w\nmount -o remount,rw $BOOT_ROOT\n\n# Something has gone horribly wrong... clean up\n[ -s $BOOT_ROOT/overlays ] || rm -fr $BOOT_ROOT/overlays $BOOT_ROOT/FSCK*.REC\n\n# update bootloader files\ncp -p $SYSTEM_ROOT/usr/share/bootloader/LICENCE* $BOOT_ROOT\nfor f in bootcode.bin fixup.dat start.elf ; do\n  if [ -f \"${SYSTEM_ROOT}/usr/share/bootloader/$f\" ]; then\n    cp -p \"${SYSTEM_ROOT}/usr/share/bootloader/$f\" \"${BOOT_ROOT}\"\n  fi\ndone\n\nrm -f $BOOT_ROOT/bcm283*.dtb # cleanup excess dtb's used by upstream kernels (ie. not LE)\ncp -p $SYSTEM_ROOT/usr/share/bootloader/*.dtb $BOOT_ROOT\ncp -pR $SYSTEM_ROOT/usr/share/bootloader/overlays $BOOT_ROOT\n\n# cleanup unneeded files\nrm -rf $BOOT_ROOT/loader.bin\nrm -rf $BOOT_ROOT/fixup_x.dat\nrm -rf $BOOT_ROOT/start_x.elf\n\n# some config.txt magic\nif [ ! -f $BOOT_ROOT/config.txt ]; then\n  cp -p $SYSTEM_ROOT/usr/share/bootloader/config.txt $BOOT_ROOT\nelse\n  CONFIG_TXT_VERSION=$( \\\n    grep \"^# config.txt version v[0-9]\\+\" $BOOT_ROOT/config.txt | \\\n    head -n 1 | \\\n    sed 's/^# config.txt version v\\([0-9]\\+\\) .*$/\\1/' \\\n  )\n  if [ ${CONFIG_TXT_VERSION:-0} -lt $MIN_CONFIG_TXT_VERSION ]; then\n    mv -f $BOOT_ROOT/config.txt $BOOT_ROOT/config.txt.old\n    cp -p $SYSTEM_ROOT/usr/share/bootloader/config.txt $BOOT_ROOT/config.txt\n    echo \"WARNING incompatible config.txt detected, replacing with default.\"\n    echo \"Previous config.txt has been moved to config.txt.old\"\n  fi\nfi\n\n# Add distro config files\nfor distro in \"$SYSTEM_ROOT/usr/share/bootloader/distroconfig\"*.txt ; do\n  if [ -f \"${distro}\" ]; then\n    cp -p \"${distro}\" $BOOT_ROOT\n  fi\ndone\n\n# mount $BOOT_ROOT r/o\nsync\nmount -o remount,ro $BOOT_ROOT\n"
  },
  {
    "path": "packages/tools/bcm2835-bootloader/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"bcm2835-bootloader\"\nPKG_VERSION=\"fdb9eafae4b83e553593937eae8e77b0193903c3\"\nPKG_SHA256=\"ce45b07afce3279f9d31fe12008c5250de4da5491bd9ced2de2f2ebb563aea80\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"http://www.broadcom.com\"\nPKG_URL=\"${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain linux bcmstat\"\nPKG_LONGDESC=\"bcm2835-bootloader: Tool to create a bootable kernel for RaspberryPi\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/bootloader\n    cp -PRv LICENCE* ${INSTALL}/usr/share/bootloader\n    case \"${DEVICE}\" in\n      RPi4)\n        cp -PRv fixup4x.dat ${INSTALL}/usr/share/bootloader/fixup.dat\n        cp -PRv start4x.elf ${INSTALL}/usr/share/bootloader/start.elf\n        ;;\n      RPi5)\n        ;;\n      *)\n        cp -PRv bootcode.bin ${INSTALL}/usr/share/bootloader\n        cp -PRv fixup_x.dat ${INSTALL}/usr/share/bootloader/fixup.dat\n        cp -PRv start_x.elf ${INSTALL}/usr/share/bootloader/start.elf\n        ;;\n    esac\n\n    find_file_path bootloader/update.sh ${PKG_DIR}/files/update.sh && cp -PRv ${FOUND_PATH} ${INSTALL}/usr/share/bootloader\n    find_file_path bootloader/canupdate.sh && cp -PRv ${FOUND_PATH} ${INSTALL}/usr/share/bootloader\n\n    find_file_path config/distroconfig.txt ${PKG_DIR}/files/distroconfig.txt && cp -PRv ${FOUND_PATH} ${INSTALL}/usr/share/bootloader\n    find_file_path config/distroconfig-composite.txt ${PKG_DIR}/files/distroconfig-composite.txt && cp -PRv ${FOUND_PATH} ${INSTALL}/usr/share/bootloader\n    find_file_path config/config.txt ${PKG_DIR}/files/config.txt && cp -PRv ${FOUND_PATH} ${INSTALL}/usr/share/bootloader\n}\n"
  },
  {
    "path": "packages/tools/bcm2835-bootloader/release",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nmkdir -p $RELEASE_DIR/3rdparty/bootloader\n  cp -PR $INSTALL/usr/share/bootloader/LICENCE* $RELEASE_DIR/3rdparty/bootloader/\n  for f in bootcode.bin fixup.dat start.elf ; do\n    if [ -f \"${INSTALL}/usr/share/bootloader/$f\" ]; then\n      cp -PR \"${INSTALL}/usr/share/bootloader/$f\" \"${RELEASE_DIR}/3rdparty/bootloader/\"\n    fi\n  done\n  cp -PR $INSTALL/usr/share/bootloader/*.dtb $RELEASE_DIR/3rdparty/bootloader/\n  cp -PR $INSTALL/usr/share/bootloader/overlays $RELEASE_DIR/3rdparty/bootloader/\n\n  if [ -f $INSTALL/usr/share/bootloader/config.txt ]; then\n    cp -PR $INSTALL/usr/share/bootloader/config.txt $RELEASE_DIR/3rdparty/bootloader/\n  fi\n  for distro in \"$INSTALL/usr/share/bootloader/distroconfig\"*.txt ; do\n    if [ -f \"${distro}\" ]; then\n      cp -PR \"${distro}\" $RELEASE_DIR/3rdparty/bootloader/\n    fi\n  done\n"
  },
  {
    "path": "packages/tools/bcmstat/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"bcmstat\"\nPKG_VERSION=\"0.5.5\"\nPKG_SHA256=\"faf21907c183ec45ca5a7737a220d3275d24a7d8a387344ed1562849b2d67f27\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/MilhouseVH/bcmstat\"\nPKG_URL=\"https://github.com/MilhouseVH/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"Raspberry Pi monitoring script\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp -PRv bcmstat.sh ${INSTALL}/usr/bin\n    chmod +x ${INSTALL}/usr/bin/*\n}\n"
  },
  {
    "path": "packages/tools/crust/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"crust\"\nPKG_VERSION=\"2e5f355790b5f9cd941f939280adda6b4b6581c0\" # 2021-11-05\nPKG_SHA256=\"6e449dfc870141498082d399d5712fa53bb9e6341856e0a75fd9aaad9e15c38c\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"BSD-3c\"\nPKG_SITE=\"https://github.com/crust-firmware/crust\"\nPKG_URL=\"https://github.com/crust-firmware/crust/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"Crust: Libre SCP firmware for Allwinner sunxi SoCs\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_STAMP=\"${UBOOT_SYSTEM}\"\n\nif [ ! -z \"${UBOOT_SYSTEM}\" ]; then\n  PKG_DEPENDS_TARGET=\"gcc-or1k:host\"\nfi\n\npre_configure_target() {\n  export CROSS_COMPILE=\"or1k-none-elf-\"\n}\n\nmake_target() {\n  if [ -z \"${UBOOT_SYSTEM}\" ]; then\n    echo \"crust is only built when building an image\"\n    exit 0\n  fi\n\n  CRUST_CONFIG=$(${ROOT}/${SCRIPTS}/uboot_helper ${PROJECT} ${DEVICE} ${UBOOT_SYSTEM} crust_config)\n  if [ -z \"${CRUST_CONFIG}\" ]; then\n    echo \"crust_config must be set to build crust firmware\"\n    echo \"see './scripts/uboot_helper' for more information\"\n    exit 0\n  fi\n\n  make distclean\n  if [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ]; then\n    echo \"CONFIG_DEBUG_LOG=y\" >> configs/${CRUST_CONFIG}\n  else\n    echo \"CONFIG_SERIAL=n\" >> configs/${CRUST_CONFIG}\n  fi\n  # Boards with a PMIC need to disable CONFIG_PMIC_SHUTDOWN to get CIR wakeup from suspend\n  echo \"CONFIG_PMIC_SHUTDOWN=n\" >> configs/${CRUST_CONFIG}\n  echo \"CONFIG_CIR=y\" >> configs/${CRUST_CONFIG}\n  echo \"CONFIG_CEC=y\" >> configs/${CRUST_CONFIG}\n  make ${CRUST_CONFIG} BUILDCC=host-gcc\n  make scp\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/bootloader\n  cp -a build/scp/scp.bin ${INSTALL}/usr/share/bootloader\n}\n"
  },
  {
    "path": "packages/tools/crust/patches/fix-binutils-2-39.patch",
    "content": "--- a/Makefile\t2022-08-09 08:48:15.390323604 +0000\n+++ b/Makefile\t2022-08-09 08:49:45.623098723 +0000\n@@ -84,7 +84,8 @@\n \t\t   -Wl,--fatal-warnings \\\n \t\t   -Wl,--gc-sections \\\n \t\t   -Wl,--no-dynamic-linker \\\n-\t\t   -Wl,--no-undefined\n+\t\t   -Wl,--no-undefined \\\n+\t\t   -Wl,--no-warn-rwx-segments\n \n ###############################################################################\n \n"
  },
  {
    "path": "packages/tools/crust/patches/fix-stack.patch",
    "content": "--- a/Makefile\t2021-12-15 20:13:00.978559336 +0000\n+++ b/Makefile\t2021-12-15 20:18:06.344712669 +0000\n@@ -25,6 +25,7 @@\n \t\t   -fdata-sections \\\n \t\t   -ffunction-sections \\\n \t\t   -fno-builtin \\\n+\t\t   -fno-stack-protector \\\n \t\t   -fno-common \\\n \t\t   -fvar-tracking-assignments \\\n \t\t   -g$(if $(CONFIG_DEBUG_INFO),gdb,0) \\\n"
  },
  {
    "path": "packages/tools/dt-overlays/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dt-overlays\"\nPKG_VERSION=\"4352d87db6e85d285673359e80cce87d5e025c64\"\nPKG_SHA256=\"754a0c37a41f8e5d9d179eb1df40b84eb48c0a505a37e39fed5f1ceb35e8e120\"\nPKG_LICENSE=\"GPLv2+ or MIT\"\nPKG_SITE=\"https://github.com/LibreELEC/dt-overlays\"\nPKG_URL=\"https://github.com/LibreELEC/dt-overlays/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"dtc:host\"\nPKG_LONGDESC=\"The Device Tree Overlays\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/bootloader/overlays\n    cp -p overlays/*/*.dtbo ${INSTALL}/usr/share/bootloader/overlays\n}\n"
  },
  {
    "path": "packages/tools/dtc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dtc\"\nPKG_VERSION=\"1.6.1\"\nPKG_SHA256=\"264d355e2e547a4964d55b83b113f89be1aea5e61dbe0547ab798d0fde2be180\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://git.kernel.org/pub/scm/utils/dtc/dtc.git/\"\nPKG_URL=\"https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host zlib:host\"\nPKG_DEPENDS_TARGET=\"toolchain zlib\"\nPKG_LONGDESC=\"The Device Tree Compiler\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_MAKE_OPTS_TARGET=\"dtc fdtput fdtget fdtdump libfdt\"\nPKG_MAKE_OPTS_HOST=\"dtc libfdt\"\n\npre_configure_host() {\n  export LDLIBS_dtc=\"-lz\"\n  export EXTRA_CFLAGS=\"-I${TOOLCHAIN}/include\"\n}\n\npre_make_host() {\n  mkdir -p ${PKG_BUILD}/.${HOST_NAME}\n    cp -a ${PKG_BUILD}/* ${PKG_BUILD}/.${HOST_NAME}\n\n  cd ${PKG_BUILD}/.${HOST_NAME}\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/dtc ${TOOLCHAIN}/bin\n  mkdir -p ${TOOLCHAIN}/lib\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/libfdt/{libfdt.so,libfdt.so.1} ${TOOLCHAIN}/lib\n}\n\npre_make_target() {\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n    cp -a ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}\n\n  cd ${PKG_BUILD}/.${TARGET_NAME}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/dtc ${INSTALL}/usr/bin\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/fdtput ${INSTALL}/usr/bin/\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/fdtget ${INSTALL}/usr/bin\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/fdtdump ${INSTALL}/usr/bin/\n  mkdir -p ${INSTALL}/usr/{include,lib}\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/libfdt/libfdt.a ${SYSROOT_PREFIX}/usr/lib\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/libfdt/fdt.h ${SYSROOT_PREFIX}/usr/include\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/libfdt/libfdt.h ${SYSROOT_PREFIX}/usr/include\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/libfdt/libfdt_env.h ${SYSROOT_PREFIX}/usr/include\n}\n"
  },
  {
    "path": "packages/tools/dtc/patches/dtc-0001-libfdt-soname-version.patch",
    "content": "diff --git a/libfdt/Makefile.libfdt b/libfdt/Makefile.libfdt\nindex e546397..dd71746 100644\n--- a/libfdt/Makefile.libfdt\n+++ b/libfdt/Makefile.libfdt\n@@ -10,7 +10,7 @@ LIBFDT_VERSION = version.lds\n LIBFDT_SRCS = fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c fdt_empty_tree.c \\\n \tfdt_addresses.c fdt_overlay.c fdt_check.c\n LIBFDT_OBJS = $(LIBFDT_SRCS:%.c=%.o)\n-LIBFDT_LIB = libfdt-$(DTC_VERSION).$(SHAREDLIB_EXT)\n+LIBFDT_LIB = libfdt.$(SHAREDLIB_EXT)\n \n libfdt_clean:\n \t@$(VECHO) CLEAN \"(libfdt)\"\n"
  },
  {
    "path": "packages/tools/dtc/patches/dtc-0002-link-with-libfdt-archive.patch",
    "content": "diff --git a/Makefile b/Makefile\nindex f02aa19..dcb728d 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -258,11 +258,11 @@ convert-dtsv0: $(CONVERT_OBJS)\n \n fdtdump:\t$(FDTDUMP_OBJS)\n \n-fdtget:\t$(FDTGET_OBJS) $(LIBFDT_lib)\n+fdtget:\t$(FDTGET_OBJS) $(LIBFDT_archive)\n \n-fdtput:\t$(FDTPUT_OBJS) $(LIBFDT_lib)\n+fdtput:\t$(FDTPUT_OBJS) $(LIBFDT_archive)\n \n-fdtoverlay: $(FDTOVERLAY_OBJS) $(LIBFDT_lib)\n+fdtoverlay: $(FDTOVERLAY_OBJS) $(LIBFDT_archive)\n \n dist:\n \tgit archive --format=tar --prefix=dtc-$(dtc_version)/ HEAD \\\n"
  },
  {
    "path": "packages/tools/dtc/patches/dtc-0003-Add-Amlogic-multi-dtb-and-add-gzipped-dtb-support.patch",
    "content": "From 278b492a6e6485758ed7146f21ba8f64d3ac06bc Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Sat, 18 Jul 2020 17:31:58 +0200\nSubject: [PATCH] Add Amlogic multi-dtb and add gzipped dtb support\n fdtget/fdtput: by the parameter '-a' or '--amlogic-dt-id' the amlogic-dt-id\n can be forced fdtget: by the parameter '-s' or '--scan-multi-dtb' the\n multi-dtb can be scanned for amlogic-dt-ids\n\n---\n Makefile       |   4 +-\n Makefile.dtc   |   1 +\n Makefile.utils |   3 +\n fdtget.c       | 111 ++++++++++++++++++++++++++-\n fdtput.c       | 201 ++++++++++++++++++++++++++++++++++++++++++++++++-\n gzip.c         | 199 ++++++++++++++++++++++++++++++++++++++++++++++++\n gzip.h         |  49 ++++++++++++\n util.c         | 129 ++++++++++++++++++++++++++++++-\n util.h         |  50 ++++++++++++\n 9 files changed, 738 insertions(+), 9 deletions(-)\n create mode 100644 gzip.c\n create mode 100644 gzip.h\n\ndiff --git a/Makefile b/Makefile\nindex dcb728d..ad5585f 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -21,9 +21,9 @@ CONFIG_LOCALVERSION =\n ASSUME_MASK ?= 0\n \n CPPFLAGS = -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK)\n-WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \\\n+WARNINGS = -Wall -Wnested-externs \\\n \t-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow\n-CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)\n+CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS) -lz\n \n BISON = bison\n LEX = flex\ndiff --git a/Makefile.dtc b/Makefile.dtc\nindex 9c467b0..b1efc0a 100644\n--- a/Makefile.dtc\n+++ b/Makefile.dtc\n@@ -13,6 +13,7 @@ DTC_SRCS = \\\n \tlivetree.c \\\n \tsrcpos.c \\\n \ttreesource.c \\\n+\tgzip.c \\\n \tutil.c\n \n ifneq ($(NO_YAML),1)\ndiff --git a/Makefile.utils b/Makefile.utils\nindex 9436b34..fbd7e7f 100644\n--- a/Makefile.utils\n+++ b/Makefile.utils\n@@ -6,6 +6,7 @@\n \n FDTDUMP_SRCS = \\\n \tfdtdump.c \\\n+\tgzip.c \\\n \tutil.c\n \n FDTDUMP_OBJS = $(FDTDUMP_SRCS:%.c=%.o)\n@@ -13,6 +14,7 @@ FDTDUMP_OBJS = $(FDTDUMP_SRCS:%.c=%.o)\n \n FDTGET_SRCS = \\\n \tfdtget.c \\\n+\tgzip.c \\\n \tutil.c\n \n FDTGET_OBJS = $(FDTGET_SRCS:%.c=%.o)\n@@ -20,6 +22,7 @@ FDTGET_OBJS = $(FDTGET_SRCS:%.c=%.o)\n \n FDTPUT_SRCS = \\\n \tfdtput.c \\\n+\tgzip.c \\\n \tutil.c\n \n FDTPUT_OBJS = $(FDTPUT_SRCS:%.c=%.o)\ndiff --git a/fdtget.c b/fdtget.c\nindex 777582e..7c50d44 100644\n--- a/fdtget.c\n+++ b/fdtget.c\n@@ -15,6 +15,8 @@\n #include <stdio.h>\n #include <stdlib.h>\n #include <string.h>\n+#include <errno.h>\n+#include <sys/stat.h>\n \n #include <libfdt.h>\n \n@@ -24,6 +26,7 @@ enum display_mode {\n \tMODE_SHOW_VALUE,\t/* show values for node properties */\n \tMODE_LIST_PROPS,\t/* list the properties for a node */\n \tMODE_LIST_SUBNODES,\t/* list the subnodes of a node */\n+\tMODE_SCAN_MULTIDTB,\t/* scan and list all single dtbs in a multidtb */\n };\n \n /* Holds information which controls our output and options */\n@@ -32,6 +35,7 @@ struct display_info {\n \tint size;\t\t/* data size (1/2/4) */\n \tenum display_mode mode;\t/* display mode that we are using */\n \tconst char *default_val; /* default value if node/property not found */\n+\tchar *amlogic_dt_id;\t/* force amlogic-dt-it for Amlogic multi dtb */\n };\n \n static void report_error(const char *where, int err)\n@@ -256,13 +260,99 @@ static int do_fdtget(struct display_info *disp, const char *filename,\n \tchar *blob;\n \tconst char *prop;\n \tint i, node;\n+\tstruct stat sb;\n+\tuint32_t fdt_addr = 0;\n+\tchar amlogic_dt_id[256] = {0};\n \n \tblob = utilfdt_read(filename, NULL);\n \tif (!blob)\n \t\treturn -1;\n \n+\tif (*(uint32_t *)blob == AML_DT_HEADER_MAGIC) {\n+\t\tuint32_t dt_total = 0;\n+\t\tuint32_t tmp_fdt_addr = 0;\n+\t\tuint32_t aml_dtb_offset_offset;\n+\t\tuint32_t aml_dtb_header_size;\n+\n+\t\tif (disp->mode == MODE_SCAN_MULTIDTB) {\n+\t\t\tutilfdt_get_multidtb_data(blob, &dt_total, &aml_dtb_header_size, &aml_dtb_offset_offset);\n+\t\t\t// list all dtbs in multidtb\n+\t\t\tfor (i = 0; i < dt_total; i++) {\n+\t\t\t\ttmp_fdt_addr = *(uint32_t *)(blob + AML_DT_FIRST_DTB_OFFSET + i * aml_dtb_header_size + aml_dtb_offset_offset);\n+\n+\t\t\t\tif (*(uint32_t *)(blob + tmp_fdt_addr) == DT_HEADER_MAGIC) {\n+\t\t\t\t\tint len;\n+\t\t\t\t\tconst struct fdt_property *dt_id = NULL;\n+\t\t\t\t\tnode = fdt_path_offset(blob + tmp_fdt_addr, \"/\");\n+\t\t\t\t\tif (node < 0)\n+\t\t\t\t\t\tcontinue;\n+\n+\t\t\t\t\tdt_id = fdt_getprop(blob + tmp_fdt_addr, node, \"amlogic-dt-id\", &len);\n+\t\t\t\t\tif (dt_id < 0)\n+\t\t\t\t\t\tcontinue;\n+\n+\t\t\t\t\tfprintf(stderr, \"%d/%d: Found dtb in multi-dtb 'amlogic-dt-id': %s\\n\", i + 1, dt_total, (const char *)dt_id);\n+\t\t\t\t}\n+\t\t\t}\n+\t\t\tfree(blob);\n+\t\t\treturn 0;\n+\t\t}\n+\n+\t\t/* get correct dtb in Amlogic multi-dtb by amlogic-dt-id */\n+\t\tif (disp->amlogic_dt_id || stat(amlogic_dt_id_path, &sb) == 0) {\n+\t\t\tif (utilfdt_get_amlogic_dt_id(disp->amlogic_dt_id, amlogic_dt_id) < 0) {\n+\t\t\t\tfree(blob);\n+\t\t\t\treturn -1;\n+\t\t\t}\n+\n+\t\t\tutilfdt_get_multidtb_data(blob, &dt_total, &aml_dtb_header_size, &aml_dtb_offset_offset);\n+\n+\t\t\t// check all dtbs in multidtb\n+\t\t\tfor (i = 0; i < dt_total; i++) {\n+\t\t\t\ttmp_fdt_addr = *(uint32_t *)(blob + AML_DT_FIRST_DTB_OFFSET + i * aml_dtb_header_size + aml_dtb_offset_offset);\n+\n+\t\t\t\tif (*(uint32_t *)(blob + tmp_fdt_addr) == DT_HEADER_MAGIC) {\n+\t\t\t\t\tint len;\n+\t\t\t\t\tconst struct fdt_property *dt_id = NULL;\n+\t\t\t\t\tnode = fdt_path_offset(blob + tmp_fdt_addr, \"/\");\n+\t\t\t\t\tif (node < 0)\n+\t\t\t\t\t\tcontinue;\n+\n+\t\t\t\t\tdt_id = fdt_getprop(blob + tmp_fdt_addr, node, \"amlogic-dt-id\", &len);\n+\t\t\t\t\tif (dt_id < 0)\n+\t\t\t\t\t\tcontinue;\n+\n+\t\t\t\t\tif (len <= strlen(amlogic_dt_id))\n+\t\t\t\t\t\tcontinue;\n+\n+\t\t\t\t\t// check if correct dtb in multidtb got found\n+\t\t\t\t\tif (!strncmp((const char *)dt_id, amlogic_dt_id, strlen(amlogic_dt_id))) {\n+\t\t\t\t\t\tfdt_addr = tmp_fdt_addr;\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\tif (fdt_addr == 0) {\n+\t\t\t\tfprintf(stderr, \"No matching amlogic-dt-id found for '%s': %d\\n\", amlogic_dt_id, -ENOENT);\n+\t\t\t\tfree(blob);\n+\t\t\t\treturn -1;\n+\t\t\t}\n+\t\t}\n+\t\telse {\n+\t\t\tfprintf(stderr, \"Amlogic-dt-id needed for Amlogic multi-dtb: %d\\n\", -ENOENT);\n+\t\t\tfree(blob);\n+\t\t\treturn -1;\n+\t\t}\n+\t}\n+\telse if (disp->mode == MODE_SCAN_MULTIDTB) {\n+\t\tfprintf(stderr, \"File is not a Amlogic multi-dtb file!\\n\");\n+\t\tfree(blob);\n+\t\treturn -1;\n+\t}\n+\n \tfor (i = 0; i + args_per_step <= arg_count; i += args_per_step) {\n-\t\tnode = fdt_path_offset(blob, arg[i]);\n+\t\tnode = fdt_path_offset(blob + fdt_addr, arg[i]);\n \t\tif (node < 0) {\n \t\t\tif (disp->default_val) {\n \t\t\t\tputs(disp->default_val);\n@@ -275,7 +365,7 @@ static int do_fdtget(struct display_info *disp, const char *filename,\n \t\t}\n \t\tprop = args_per_step == 1 ? NULL : arg[i + 1];\n \n-\t\tif (show_data_for_item(blob, disp, node, prop)) {\n+\t\tif (show_data_for_item(blob + fdt_addr, disp, node, prop)) {\n \t\t\tfree(blob);\n \t\t\treturn -1;\n \t\t}\n@@ -294,12 +384,14 @@ static const char usage_synopsis[] =\n \t\"\\n\"\n \t\"Each value is printed on a new line.\\n\"\n \tUSAGE_TYPE_MSG;\n-static const char usage_short_opts[] = \"t:pld:\" USAGE_COMMON_SHORT_OPTS;\n+static const char usage_short_opts[] = \"t:pld:a:s\" USAGE_COMMON_SHORT_OPTS;\n static struct option const usage_long_opts[] = {\n \t{\"type\",              a_argument, NULL, 't'},\n \t{\"properties\",       no_argument, NULL, 'p'},\n \t{\"list\",             no_argument, NULL, 'l'},\n \t{\"default\",           a_argument, NULL, 'd'},\n+\t{\"amlogic-dt-id\",     a_argument, NULL, 'a'},\n+\t{\"scan-multi-dtb\",   no_argument, NULL, 's'},\n \tUSAGE_COMMON_LONG_OPTS,\n };\n static const char * const usage_opts_help[] = {\n@@ -307,6 +399,8 @@ static const char * const usage_opts_help[] = {\n \t\"List properties for each node\",\n \t\"List subnodes for each node\",\n \t\"Default value to display when the property is missing\",\n+\t\"Forced amlogic-dt-id to be used for multi-dtb\",\n+\t\"Scan and list all single dtb amlogic-dt-ids in multi-dtb\",\n \tUSAGE_COMMON_OPTS_HELP\n };\n \n@@ -331,6 +425,15 @@ int main(int argc, char *argv[])\n \t\t\t\tusage(\"invalid type string\");\n \t\t\tbreak;\n \n+\t\tcase 'a':\n+\t\t\tdisp.amlogic_dt_id = optarg;\n+\t\t\tbreak;\n+\n+\t\tcase 's':\n+\t\t\tdisp.mode = MODE_SCAN_MULTIDTB;\n+\t\t\targs_per_step = 1;\n+\t\t\tbreak;\n+\n \t\tcase 'p':\n \t\t\tdisp.mode = MODE_LIST_PROPS;\n \t\t\targs_per_step = 1;\n@@ -356,7 +459,7 @@ int main(int argc, char *argv[])\n \targc -= optind;\n \n \t/* Allow no arguments, and silently succeed */\n-\tif (!argc)\n+\tif (!argc && (disp.mode != MODE_SCAN_MULTIDTB))\n \t\treturn 0;\n \n \t/* Check for node, property arguments */\ndiff --git a/fdtput.c b/fdtput.c\nindex 428745a..bd907b7 100644\n--- a/fdtput.c\n+++ b/fdtput.c\n@@ -9,6 +9,9 @@\n #include <stdio.h>\n #include <stdlib.h>\n #include <string.h>\n+#include <errno.h>\n+#include <sys/stat.h>\n+#include <byteswap.h>\n \n #include <libfdt.h>\n \n@@ -28,6 +31,7 @@ struct display_info {\n \tint size;\t\t/* data size (1/2/4) */\n \tint verbose;\t\t/* verbose output */\n \tint auto_path;\t\t/* automatically create all path components */\n+\tchar *amlogic_dt_id;\t/* force amlogic-dt-it for Amlogic multi dtb */\n };\n \n \n@@ -311,18 +315,185 @@ static int delete_node(char *blob, const char *node_name)\n \treturn 0;\n }\n \n+static void padSpaces(uint8_t *s, int sz)\n+{\n+\t--sz;\n+\twhile ( sz >= 0 && s[sz] == 0 )\n+\t{\n+\t\ts[sz] = 0x20;\n+\t\t--sz;\n+\t}\n+}\n+\n+static void create_multidtb(char **blob, uint32_t dt_total, uint32_t page_size, char **fdts)\n+{\n+\tuint32_t totalsize = page_size;\n+\tchar *multidtb = xmalloc(totalsize);\n+\tuint32_t fdt_size = page_size;\n+\tuint32_t version = AML_DT_VERSION;\n+\tuint32_t offset = 0;\n+\tint i, len;\n+\tuint32_t blob_old_size;\n+\n+\tif (*(const uint32_t *)(*blob) == AML_DT_HEADER_MAGIC)\n+\t\tblob_old_size = utilfdt_get_multidtb_size(*blob);\n+\telse\n+\t\tblob_old_size = fdt_totalsize(*blob);\n+\n+\tmemset(multidtb, 0, totalsize);\n+\tmemcpy(multidtb + offset, AML_DT_MAGIC, sizeof(uint32_t));\n+\toffset += sizeof(uint32_t);\n+\tmemcpy(multidtb + offset, &version, sizeof(uint32_t));\n+\toffset += sizeof(uint32_t);\n+\tmemcpy(multidtb + offset, &dt_total, sizeof(uint32_t));\n+\toffset += sizeof(uint32_t);\n+\n+\n+\tfor (i = 0; i < dt_total; i++) {\n+\t\tint tmp_node;\n+\t\tconst struct fdt_property *dt_id = NULL;\n+\n+\t\tif (!fdts[i])\n+\t\t\tcontinue;\n+\n+\t\ttmp_node = fdt_path_offset(fdts[i], \"/\");\n+\t\tif (tmp_node >= 0)\n+\t\t\tdt_id = fdt_getprop(fdts[i], tmp_node, \"amlogic-dt-id\", &len);\n+\n+\t\tif (dt_id) {\n+\t\t\tuint8_t data[3][INFO_ENTRY_SIZE + 1] = { {0} };\n+\t\t\tif (sscanf((const char*)dt_id, \"%\" INFO_ENTRY_SIZE_S \"[^_]_%\" INFO_ENTRY_SIZE_S \"[^_]_%\" INFO_ENTRY_SIZE_S \"[^_\\\"]\\\"\",\n+\t\t\t\tdata[0], data[1], data[2]) == 3) {\n+\t\t\t\t\tint a;\n+\t\t\t\t\tfor (a = 0; a < 3; a++){\n+\t\t\t\t\t\tint b;\n+\t\t\t\t\t\tpadSpaces(data[a], INFO_ENTRY_SIZE);\n+\t\t\t\t\t\tfor (b = 0; b < INFO_ENTRY_SIZE/sizeof(uint32_t); ++b) {\n+\t\t\t\t\t\t\tuint32_t val = __bswap_32(*(uint32_t *)(&data[a][b * sizeof(uint32_t)]));\n+\t\t\t\t\t\t\tmemcpy(multidtb + offset, &val, sizeof(uint32_t));\n+\t\t\t\t\t\t\toffset += sizeof(uint32_t);\n+\t\t\t\t\t\t}\n+\t\t\t\t\t}\n+\t\t\t}\n+\t\t\telse\n+\t\t\t\tcontinue;\n+\n+\t\t\tmemcpy(multidtb + offset, &totalsize, sizeof(uint32_t));\n+\t\t\toffset += sizeof(uint32_t);\n+\t\t\tfdt_size = fdt_totalsize(fdts[i]);\n+\t\t\tfdt_size += page_size - (fdt_size % page_size);\n+\t\t\tmemcpy(multidtb + offset, &fdt_size, sizeof(uint32_t));\n+\t\t\toffset += sizeof(uint32_t);\n+\n+\t\t\ttotalsize += fdt_size;\n+\t\t\tmultidtb = xrealloc(multidtb, totalsize);\n+\t\t\tmemset(multidtb + (totalsize - fdt_size), 0, fdt_size);\n+\t\t\tmemcpy(multidtb + (totalsize - fdt_size), fdts[i], fdt_totalsize(fdts[i]));\n+\t\t}\n+\t}\n+\n+\tif (blob_old_size < totalsize)\n+\t\t*blob = xrealloc(*blob, totalsize);\n+\n+\tmemcpy(*blob, multidtb, totalsize);\n+\tfree(multidtb);\n+}\n+\n static int do_fdtput(struct display_info *disp, const char *filename,\n \t\t    char **arg, int arg_count)\n {\n \tchar *value = NULL;\n \tchar *blob;\n \tchar *node;\n-\tint len, ret = 0;\n+\tint i, len, ret = 0;\n+\tstruct stat sb;\n+\tuint32_t dt_total = 0;\n+\tuint32_t page_size = 0;\n+\tuint32_t fdt_addr = 0;\n+\tint fdt_count = 0;\n+\tchar **fdts = NULL;\n+\tchar *fdt;\n+\tchar amlogic_dt_id[256] = {0};\n \n \tblob = utilfdt_read(filename, NULL);\n \tif (!blob)\n \t\treturn -1;\n \n+\tif (*(uint32_t *)blob == AML_DT_HEADER_MAGIC) {\n+\t\t/* get correct dtb in Amlogic multi-dtb by amlogic-dt-id */\n+\t\tif (disp->amlogic_dt_id || stat(amlogic_dt_id_path, &sb) == 0) {\n+\t\t\tuint32_t tmp_fdt_addr = 0;\n+\t\t\tuint32_t tmp_fdt_size = 0;\n+\t\t\tuint32_t aml_dtb_offset_offset;\n+\t\t\tuint32_t aml_dtb_header_size;\n+\n+\t\t\tif (utilfdt_get_amlogic_dt_id(disp->amlogic_dt_id, amlogic_dt_id) < 0) {\n+\t\t\t\tfree(blob);\n+\t\t\t\treturn -1;\n+\t\t\t}\n+\n+\t\t\tutilfdt_get_multidtb_data(blob, &dt_total, &aml_dtb_header_size, &aml_dtb_offset_offset);\n+\n+\t\t\tif (disp->verbose)\n+\t\t\t\tfprintf(stderr, \"Using amlogic-dt-id: %s, total number of dtbs in multidtb: %d\\n\", amlogic_dt_id, dt_total);\n+\n+\t\t\tfdts = xmalloc(dt_total * sizeof(char *));\n+\t\t\tmemset(fdts, 0, dt_total * sizeof(char *));\n+\n+\t\t\t// check all dtbs in multidtb\n+\t\t\tfor (i = 0; i < dt_total; i++) {\n+\t\t\t\ttmp_fdt_addr = *(uint32_t *)(blob + AML_DT_FIRST_DTB_OFFSET + i * aml_dtb_header_size + aml_dtb_offset_offset);\n+\t\t\t\ttmp_fdt_size = fdt_totalsize(blob + tmp_fdt_addr);\n+\n+\t\t\t\tif (!page_size)\n+\t\t\t\t\tpage_size = tmp_fdt_addr;\n+\n+\t\t\t\tif (*(uint32_t *)(blob + tmp_fdt_addr) == DT_HEADER_MAGIC) {\n+\t\t\t\t\tint tmp_node;\n+\t\t\t\t\tconst struct fdt_property *dt_id = NULL;\n+\t\t\t\t\ttmp_node = fdt_path_offset(blob + tmp_fdt_addr, \"/\");\n+\t\t\t\t\tif (tmp_node >= 0)\n+\t\t\t\t\t\tdt_id = fdt_getprop(blob + tmp_fdt_addr, tmp_node, \"amlogic-dt-id\", &len);\n+\n+\t\t\t\t\t// check if correct dtb in multidtb got found\n+\t\t\t\t\tif (dt_id &&\n+\t\t\t\t\t\t\t(len >= strlen(amlogic_dt_id)) &&\n+\t\t\t\t\t\t\t(!strncmp((const char *)dt_id, amlogic_dt_id, strlen(amlogic_dt_id)))) {\n+\t\t\t\t\t\tfdt_addr = tmp_fdt_addr;\n+\t\t\t\t\t}\n+\t\t\t\t\t// make a backup and leave the dtb untouched\n+\t\t\t\t\telse if (fdts) {\n+\t\t\t\t\t\tfdts[fdt_count] = xmalloc(tmp_fdt_size);\n+\t\t\t\t\t\tmemcpy(fdts[fdt_count], blob + tmp_fdt_addr, tmp_fdt_size);\n+\t\t\t\t\t\tfdt_count++;\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\tif (fdt_addr == 0) {\n+\t\t\t\tfprintf(stderr, \"No matching amlogic-dt-id found for '%s': %d\\n\", amlogic_dt_id, -ENOENT);\n+\t\t\t\tif (fdts) {\n+\t\t\t\t\tfor (i = 0; i < (dt_total - 1); i++)\n+\t\t\t\t\t\tfree(fdts[i]);\n+\t\t\t\t\tfree(fdts);\n+\t\t\t\t}\n+\t\t\t\tfree(blob);\n+\t\t\t\treturn -1;\n+\t\t\t}\n+\t\t}\n+\t\telse {\n+\t\t\tfprintf(stderr, \"Amlogic-dt-id needed for Amlogic multi-dtb: %d\\n\", -ENOENT);\n+\t\t\tfree(blob);\n+\t\t\treturn -1;\n+\t\t}\n+\t}\n+\n+\t// allocate new memory for currently used blob\n+\tfdt = blob;\n+\tuint32_t fdt_size = fdt_totalsize(blob + fdt_addr);\n+\tblob = xmalloc(fdt_size);\n+\tmemcpy(blob, fdt + fdt_addr, fdt_size);\n+\n \tswitch (disp->oper) {\n \tcase OPER_WRITE_PROP:\n \t\t/*\n@@ -356,9 +527,30 @@ static int do_fdtput(struct display_info *disp, const char *filename,\n \t}\n \tif (ret >= 0) {\n \t\tfdt_pack(blob);\n+\n+\t\t// add single dtb to multidtb before save to file\n+\t\t// free memory allocated before\n+\t\tfdt_size = fdt_totalsize(blob);\n+\t\tif (fdts) {\n+\t\t\tfdts[fdt_count] = xmalloc(fdt_size);\n+\t\t\tmemcpy(fdts[fdt_count], blob, fdt_size);\n+\t\t\tfree(blob);\n+\t\t\tblob = fdt;\n+\t\t\tcreate_multidtb(&blob, dt_total, page_size, fdts);\n+\t\t}\n+\t\telse {\n+\t\t\tmemcpy(fdt, blob, fdt_size);\n+\t\t\tfree(blob);\n+\t\t\tblob = fdt;\n+\t\t}\n \t\tret = utilfdt_write(filename, blob);\n \t}\n \n+\tif (fdts) {\n+\t\tfor (i = 0; i < (dt_total - 1); i++)\n+\t\t\tfree(fdts[i]);\n+\t\tfree(fdts);\n+\t}\n \tfree(blob);\n \n \tif (value) {\n@@ -378,7 +570,7 @@ static const char usage_synopsis[] =\n \t\"\\n\"\n \t\"The command line arguments are joined together into a single value.\\n\"\n \tUSAGE_TYPE_MSG;\n-static const char usage_short_opts[] = \"crdpt:v\" USAGE_COMMON_SHORT_OPTS;\n+static const char usage_short_opts[] = \"crdpt:va:\" USAGE_COMMON_SHORT_OPTS;\n static struct option const usage_long_opts[] = {\n \t{\"create\",           no_argument, NULL, 'c'},\n \t{\"remove\",\t     no_argument, NULL, 'r'},\n@@ -386,6 +578,7 @@ static struct option const usage_long_opts[] = {\n \t{\"auto-path\",        no_argument, NULL, 'p'},\n \t{\"type\",              a_argument, NULL, 't'},\n \t{\"verbose\",          no_argument, NULL, 'v'},\n+\t{\"amlogic-dt-id\",     a_argument, NULL, 'a'},\n \tUSAGE_COMMON_LONG_OPTS,\n };\n static const char * const usage_opts_help[] = {\n@@ -395,6 +588,7 @@ static const char * const usage_opts_help[] = {\n \t\"Automatically create nodes as needed for the node path\",\n \t\"Type of data\",\n \t\"Display each value decoded from command line\",\n+\t\"Forced amlogic-dt-id to be used for multi-dtb\",\n \tUSAGE_COMMON_OPTS_HELP\n };\n \n@@ -417,6 +611,9 @@ int main(int argc, char *argv[])\n \t\tswitch (opt) {\n \t\tcase_USAGE_COMMON_FLAGS\n \n+\t\tcase 'a':\n+\t\t\tdisp.amlogic_dt_id = optarg;\n+\t\t\tbreak;\n \t\tcase 'c':\n \t\t\tdisp.oper = OPER_CREATE_NODE;\n \t\t\tbreak;\ndiff --git a/gzip.c b/gzip.c\nnew file mode 100644\nindex 0000000..2ed3ac9\n--- /dev/null\n+++ b/gzip.c\n@@ -0,0 +1,199 @@\n+/*\n+ * Simple tool for CoreELEC installation on eMMC\n+ *\n+ * Copyright (C) 2019 Team CoreELEC, vpeter, Portisch\n+ *\n+ *  This program is free software; you can redistribute it and/or modify\n+ *  it under the terms of the GNU General Public License as published by\n+ *  the Free Software Foundation; either version 2 of the License, or\n+ *  (at your option) any later version.\n+ *\n+ *  This program is distributed in the hope that it will be useful,\n+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ *  GNU General Public License for more details.\n+ */\n+\n+#include \"gzip.h\"\n+\n+static void *zalloc(void *x, unsigned items, unsigned size)\n+{\n+  void *p;\n+\n+  size *= items;\n+  size = (size + ZALLOC_ALIGNMENT - 1) & ~(ZALLOC_ALIGNMENT - 1);\n+\n+  p = malloc (size);\n+  return (p);\n+}\n+\n+static void zfree(void *x, void *addr)\n+{\n+  free (addr);\n+}\n+\n+// Uncompress blocks compressed with zlib without headers\n+static int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp,\n+            int stoponerr, int offset)\n+{\n+  z_stream s;\n+  int r;\n+\n+  s.zalloc = zalloc;\n+  s.zfree = zfree;\n+\n+  r = inflateInit2(&s, -MAX_WBITS);\n+  if (r != Z_OK) {\n+    printf (\"Error: inflateInit2() returned %d\\n\", r);\n+    return -1;\n+  }\n+\n+  s.next_in = src + offset;\n+  s.avail_in = *lenp - offset;\n+  s.next_out = dst;\n+  s.avail_out = dstlen;\n+\n+  do {\n+    r = inflate(&s, Z_FINISH);\n+    if (stoponerr == 1 && r != Z_STREAM_END &&\n+        (s.avail_out == 0 || r != Z_BUF_ERROR)) {\n+      printf(\"Error: inflate() returned %d\\n\", r);\n+      inflateEnd(&s);\n+      return -1;\n+    }\n+\n+    s.avail_in = *lenp - offset - (int)(s.next_out - (unsigned char*)dst);\n+  } while (r == Z_BUF_ERROR);\n+\n+  *lenp = s.next_out - (unsigned char *) dst;\n+  inflateEnd(&s);\n+  return 0;\n+}\n+\n+//  Compress blocks with zlib\n+static int zzip(void *dst, unsigned long *lenp, unsigned char *src,\n+    unsigned long srclen, int stoponerr,\n+    int (*func)(unsigned long, unsigned long))\n+{\n+  z_stream s;\n+  int r, flush, orig, window;\n+  unsigned long comp_len, left_len;\n+\n+  if (!srclen)\n+    return 0;\n+\n+#ifndef CONFIG_GZIP\n+  window = MAX_WBITS;\n+#else\n+  window = 2 * MAX_WBITS;\n+#endif\n+  orig = *lenp;\n+  s.zalloc = zalloc;\n+  s.zfree = zfree;\n+  s.opaque = Z_NULL;\n+\n+  r = deflateInit2_(&s, Z_DEFAULT_COMPRESSION, Z_DEFLATED,  window,\n+      DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,\n+      ZLIB_VERSION, sizeof(z_stream));\n+  if (r != Z_OK) {\n+    printf (\"Error: deflateInit2_() returned %d\\n\", r);\n+    return -1;\n+  }\n+\n+  while (srclen > 0) {\n+    comp_len = (srclen > CONFIG_GZIP_COMPRESS_DEF_SZ) ?\n+        CONFIG_GZIP_COMPRESS_DEF_SZ : srclen;\n+\n+    s.next_in = src;\n+    s.avail_in = comp_len;\n+    flush = (srclen > CONFIG_GZIP_COMPRESS_DEF_SZ)?\n+      Z_NO_FLUSH : Z_FINISH;\n+\n+    do {\n+      left_len = (*lenp > CONFIG_GZIP_COMPRESS_DEF_SZ) ?\n+          CONFIG_GZIP_COMPRESS_DEF_SZ : *lenp;\n+      s.next_out = dst;\n+      s.avail_out = left_len;\n+\n+      r = deflate(&s, flush);\n+      if (r == Z_STREAM_ERROR && stoponerr == 1) {\n+        printf(\"Error: deflate() returned %d\\n\", r);\n+        r = -1;\n+        goto bail;\n+      }\n+\n+      if (!func) {\n+        dst += (left_len - s.avail_out);\n+        *lenp -= (left_len - s.avail_out);\n+      } else if (left_len - s.avail_out > 0) {\n+        r = func((unsigned long)dst,\n+          left_len - s.avail_out);\n+        if (r < 0)\n+          goto bail;\n+      }\n+    } while (s.avail_out == 0 && (*lenp > 0));\n+\n+    if (s.avail_in) {\n+      printf(\"Deflate failed to consume %u bytes\", s.avail_in);\n+      r = -1;\n+      goto bail;\n+    }\n+\n+    if (*lenp == 0) {\n+      printf(\"Deflate need more space to compress \"\n+        \"left %lu bytes\\n\", srclen);\n+      r = -1;\n+      goto bail;\n+    }\n+\n+    srclen -= comp_len;\n+    src += comp_len;\n+  }\n+\n+  r = 0;\n+bail:\n+  deflateEnd(&s);\n+  *lenp = orig - *lenp;\n+  return r;\n+}\n+\n+int gzip(void *dst, unsigned long *lenp,\n+    unsigned char *src, unsigned long srclen)\n+{\n+  return zzip(dst, lenp, src, srclen, 1, NULL);\n+}\n+\n+int gunzip(void *dst, int dstlen,\n+    unsigned char *src, unsigned long *lenp)\n+{\n+  int i, flags;\n+\n+  // skip header\n+  i = 10;\n+  flags = src[3];\n+  if (src[2] != Z_DEFLATED || (flags & RESERVED) != 0) {\n+    puts (\"Error: Bad gzipped data\\n\");\n+    return (-1);\n+  }\n+\n+  if ((flags & EXTRA_FIELD) != 0)\n+    i = 12 + src[10] + (src[11] << 8);\n+\n+  if ((flags & ORIG_NAME) != 0)\n+    while (src[i++] != 0)\n+      ;\n+\n+  if ((flags & COMMENT) != 0)\n+    while (src[i++] != 0)\n+      ;\n+\n+  if ((flags & HEAD_CRC) != 0)\n+    i += 2;\n+\n+  if (i >= *lenp) {\n+    puts (\"Error: gunzip out of data in header\\n\");\n+    return (-1);\n+  }\n+\n+  return zunzip(dst, dstlen, src, lenp, 1, i);\n+}\ndiff --git a/gzip.h b/gzip.h\nnew file mode 100644\nindex 0000000..6a03815\n--- /dev/null\n+++ b/gzip.h\n@@ -0,0 +1,49 @@\n+/*\n+ * Simple tool for CoreELEC installation on eMMC\n+ *\n+ * Copyright (C) 2019 Team CoreELEC, vpeter, Portisch\n+ *\n+ *  This program is free software; you can redistribute it and/or modify\n+ *  it under the terms of the GNU General Public License as published by\n+ *  the Free Software Foundation; either version 2 of the License, or\n+ *  (at your option) any later version.\n+ *\n+ *  This program is distributed in the hope that it will be useful,\n+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ *  GNU General Public License for more details.\n+ */\n+\n+#ifndef __ZLIB_H__\n+#define __ZLIB_H__\n+\n+#include <stdio.h>\n+#include <stdlib.h>\n+#include \"zlib.h\"\n+\n+// enable gzip mode of zlib\n+#define     CONFIG_GZIP\n+\n+// Maximum value for memLevel in deflateInit2\n+#define     DEF_MEM_LEVEL                   8\n+\n+#ifndef     CONFIG_GZIP_COMPRESS_DEF_SZ\n+#define     CONFIG_GZIP_COMPRESS_DEF_SZ     0x200\n+#endif\n+\n+#define     ZALLOC_ALIGNMENT                16\n+\n+// gzip flag byte\n+#define     ASCII_FLAG                      0x01 // bit 0 set: file probably ascii text\n+#define     HEAD_CRC                        0x02 // bit 1 set: header CRC present\n+#define     EXTRA_FIELD                     0x04 // bit 2 set: extra field present\n+#define     ORIG_NAME                       0x08 // bit 3 set: original file name present\n+#define     COMMENT                         0x10 // bit 4 set: file comment present\n+#define     RESERVED                        0xE0 // bits 5..7: reserved\n+\n+extern int gzip(void *dst, unsigned long *lenp,\n+    unsigned char *src, unsigned long srclen);\n+extern int gunzip(void *dst, int dstlen,\n+    unsigned char *src, unsigned long *lenp);\n+\n+#endif\ndiff --git a/util.c b/util.c\nindex 40274fb..ae8feda 100644\n--- a/util.c\n+++ b/util.c\n@@ -14,6 +14,7 @@\n #include <string.h>\n #include <assert.h>\n #include <inttypes.h>\n+#include <time.h>\n \n #include <errno.h>\n #include <fcntl.h>\n@@ -23,6 +24,8 @@\n #include \"util.h\"\n #include \"version_gen.h\"\n \n+static void *gzip_buf = NULL;\n+\n char *xstrdup(const char *s)\n {\n \tint len = strlen(s) + 1;\n@@ -238,6 +241,7 @@ int utilfdt_read_err(const char *filename, char **buffp, size_t *len)\n \tchar *buf = NULL;\n \tsize_t bufsize = 1024, offset = 0;\n \tint ret = 0;\n+\tlong unsigned int lenup = GUNZIP_BUF_SIZE;\n \n \t*buffp = NULL;\n \tif (strcmp(filename, \"-\") != 0) {\n@@ -263,6 +267,23 @@ int utilfdt_read_err(const char *filename, char **buffp, size_t *len)\n \t\toffset += ret;\n \t} while (ret != 0);\n \n+\t// if dtb is gzipped extract it and replace allocated buffer\n+\tif (!ret && IS_GZIP_FORMAT(*(uint32_t *)buf)) {\n+\t\tgzip_buf = xmalloc(GUNZIP_BUF_SIZE);\n+\n+\t\tret = gunzip(gzip_buf, GUNZIP_BUF_SIZE, (unsigned char *)buf, &lenup);\n+\t\tif (ret < 0) {\n+\t\t\tfprintf(stderr, \"Failed to decompress gzipped dtb!\\n\");\n+\t\t\tret = errno;\n+\t\t\tfree(gzip_buf);\n+\t\t}\n+\n+\t\tif (!ret) {\n+\t\t\tfree(buf);\n+\t\t\tbuf = gzip_buf;\n+\t\t}\n+\t}\n+\n \t/* Clean up, including closing stdin; return errno on error */\n \tclose(fd);\n \tif (ret)\n@@ -288,6 +309,82 @@ char *utilfdt_read(const char *filename, size_t *len)\n \treturn buff;\n }\n \n+int utilfdt_get_amlogic_dt_id(char *amlogic_dt_id, char *buf)\n+{\n+\t// amlogic_dt_id forced or read by sysfs?\n+\tif (amlogic_dt_id)\n+\t\tstrcpy(buf, amlogic_dt_id);\n+\telse {\n+\t\tFILE *fd = fopen(amlogic_dt_id_path, \"r\");\n+\n+\t\tif (!fd) {\n+\t\t\tfprintf(stderr, \"Failed to open amlogic-dt-id: %d\\n\", -errno);\n+\t\t\treturn -1;\n+\t\t}\n+\n+\t\tif (fgets(buf, 256, fd) == 0) {\n+\t\t\tfprintf(stderr, \"Failed to read amlogic-dt-id: %d\\n\", -errno);\n+\t\t\treturn -1;\n+\t\t}\n+\n+\t\tfclose(fd);\n+\t}\n+\treturn 0;\n+}\n+\n+void utilfdt_get_multidtb_data(const void *blob, uint32_t *dt_total,\n+\tuint32_t *dtb_header_size, uint32_t *dtb_offset)\n+{\n+\tuint32_t dt_tool_version;\n+\tuint32_t aml_each_id_length = 0;\n+\n+\t// version control, compatible with v1\n+\tdt_tool_version = *(uint32_t *)(blob + AML_DT_VERSION_OFFSET);\n+\n+\tif (dt_tool_version == 1)\n+\t\taml_each_id_length = AML_DT_IND_LENGTH_V1;\n+\telse if (dt_tool_version == 2)\n+\t\taml_each_id_length = AML_DT_IND_LENGTH_V2;\n+\n+\t*dtb_offset = aml_each_id_length * AML_DT_ID_VARI_TOTAL;\n+\t*dtb_header_size = 8 + (aml_each_id_length * AML_DT_ID_VARI_TOTAL);\n+\n+\t*dt_total = *(uint32_t *)(blob + AML_DT_TOTAL_DTB_OFFSET);\n+}\n+\n+uint32_t utilfdt_get_multidtb_size(const void *blob)\n+{\n+\tint i;\n+\tuint32_t dt_total = 0;\n+\tuint32_t page_size = 0;\n+\tuint32_t fdt_size = 0;\n+\tuint32_t dt_tool_version;\n+\tuint32_t aml_each_id_length = 0;\n+\tuint32_t aml_dtb_offset_offset;\n+\tuint32_t aml_dtb_header_size;\n+\n+\t// version control, compatible with v1\n+\tdt_tool_version = *(const uint32_t *)(blob + AML_DT_VERSION_OFFSET);\n+\n+\tif (dt_tool_version == 1)\n+\t\taml_each_id_length = AML_DT_IND_LENGTH_V1;\n+\telse if (dt_tool_version == 2)\n+\t\taml_each_id_length = AML_DT_IND_LENGTH_V2;\n+\n+\taml_dtb_offset_offset = aml_each_id_length * AML_DT_ID_VARI_TOTAL;\n+\taml_dtb_header_size = 8 + (aml_each_id_length * AML_DT_ID_VARI_TOTAL);\n+\n+\tdt_total = *(const uint32_t *)(blob + AML_DT_TOTAL_DTB_OFFSET);\n+\n+\tfor (i = 0; i < dt_total; i++) {\n+\t\tif (!page_size)\n+\t\t\tpage_size = *(const uint32_t *)(blob + AML_DT_FIRST_DTB_OFFSET + i * aml_dtb_header_size + aml_dtb_offset_offset);\n+\t\tfdt_size += *(const uint32_t *)(blob + AML_DT_FIRST_DTB_OFFSET + i * aml_dtb_header_size + aml_dtb_offset_offset + 4);\n+\t}\n+\n+\treturn (fdt_size + page_size);\n+}\n+\n int utilfdt_write_err(const char *filename, const void *blob)\n {\n \tint fd = 1;\t/* assume stdout */\n@@ -295,6 +392,8 @@ int utilfdt_write_err(const char *filename, const void *blob)\n \tint offset;\n \tint ret = 0;\n \tconst char *ptr = blob;\n+\tlong unsigned int lenp = GUNZIP_BUF_SIZE;\n+\tvoid *gzip_multi_buf = NULL;\n \n \tif (strcmp(filename, \"-\") != 0) {\n \t\tfd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0666);\n@@ -302,9 +401,35 @@ int utilfdt_write_err(const char *filename, const void *blob)\n \t\t\treturn errno;\n \t}\n \n-\ttotalsize = fdt_totalsize(blob);\n+\tif (*(const uint32_t *)blob == AML_DT_HEADER_MAGIC)\n+\t\ttotalsize = utilfdt_get_multidtb_size(blob);\n+\telse\n+\t\ttotalsize = fdt_totalsize(blob);\n+\n \toffset = 0;\n \n+\t// check if dtb was gzipped when reading\n+\tif (gzip_buf) {\n+\t\ttime_t now = time(NULL);\n+\t\tgzip_multi_buf = xmalloc(GUNZIP_BUF_SIZE);\n+\n+\t\tret = gzip(gzip_multi_buf, &lenp, (unsigned char *)blob, totalsize);\n+\t\tif (ret < 0) {\n+\t\t\tfprintf(stderr, \"Failed to compress dtb!\\n\");\n+\t\t\tret = -errno;\n+\t\t\tif (fd != 1)\n+\t\t\t\tclose(fd);\n+\t\t\tfree(gzip_multi_buf);\n+\t\t\treturn ret < 0 ? -ret : 0;\n+\t\t}\n+\n+\t\t/* add time because older Amlogic u-boot expects a value at this place */\n+\t\tmemcpy(gzip_multi_buf + 4, &now, 4);\n+\n+\t\ttotalsize = lenp;\n+\t\tptr = gzip_multi_buf;\n+\t}\n+\n \twhile (offset < totalsize) {\n \t\tret = write(fd, ptr + offset, totalsize - offset);\n \t\tif (ret < 0) {\n@@ -316,6 +441,8 @@ int utilfdt_write_err(const char *filename, const void *blob)\n \t/* Close the file/stdin; return errno on error */\n \tif (fd != 1)\n \t\tclose(fd);\n+\tif (gzip_multi_buf)\n+\t\tfree(gzip_multi_buf);\n \treturn ret < 0 ? -ret : 0;\n }\n \ndiff --git a/util.h b/util.h\nindex 5a4172d..51b2b23 100644\n--- a/util.h\n+++ b/util.h\n@@ -5,6 +5,7 @@\n #include <stdarg.h>\n #include <stdbool.h>\n #include <getopt.h>\n+#include \"gzip.h\"\n \n /*\n  * Copyright 2011 The Chromium Authors, All Rights Reserved.\n@@ -28,6 +29,23 @@\n #define stringify(s)\tstringify_(s)\n #define stringify_(s)\t#s\n \n+#define amlogic_dt_id_path       \"/proc/device-tree/amlogic-dt-id\"\n+#define DT_HEADER_MAGIC          0xedfe0dd0  // header of dtb file\n+#define AML_DT_HEADER_MAGIC      0x5f4c4d41  // \"AML_\", multi dtbs supported\n+#define AML_DT_MAGIC             \"AML_\"  /* Master DTB magic */\n+#define AML_DT_VERSION           2           // AML version\n+#define IS_GZIP_FORMAT(data)     ((data & (0x0000FFFF)) == (0x00008B1F))\n+#define GUNZIP_BUF_SIZE          (5UL * 1024 * 1024)\n+#define INFO_ENTRY_SIZE          16\n+#define INFO_ENTRY_SIZE_S        \"16\"\n+#define AML_DT_IND_LENGTH_V1     4           // fixed\n+#define AML_DT_IND_LENGTH_V2     16          // fixed\n+#define AML_DT_ID_VARI_TOTAL     3           // total 3 strings\n+// Latest version: v2\n+#define AML_DT_VERSION_OFFSET    4\n+#define AML_DT_TOTAL_DTB_OFFSET  8\n+#define AML_DT_FIRST_DTB_OFFSET  12\n+\n static inline void NORETURN PRINTF(1, 2) die(const char *str, ...)\n {\n \tva_list ap;\n@@ -128,6 +146,38 @@ int utilfdt_write(const char *filename, const void *blob);\n  */\n int utilfdt_write_err(const char *filename, const void *blob);\n \n+/**\n+ * Calculate the totalsize of a multidtb blob and\n+ * returns them. The value returned can be passed to strerror() to obtain\n+ * an error message for the user.\n+ *\n+ * @param blob\t\tPoiner to buffer containing fdt\n+ * @return > 0 if ok, else an errno value representing the error\n+ */\n+uint32_t utilfdt_get_multidtb_size(const void *blob);\n+\n+/**\n+ * Get data of a multidtb blob and returns them.\n+ *\n+ * @param blob\t\t\t\t\t\tPoiner to buffer containing fdt\n+ * @param dt_total\t\t\t\tPoiner to buffer containing dt_total\n+ * @param dtb_header_size\tPoiner to buffer containing dtb_header_size\n+ * @param dtb_offset\t\t\tPoiner to buffer containing dtb_offset\n+ */\n+void utilfdt_get_multidtb_data(const void *blob, uint32_t *dt_total,\n+\tuint32_t *dtb_header_size, uint32_t *dtb_offset);\n+\n+/**\n+ * Get amlogic-dt-id what should be used for multidtb\n+ * returns them. The value returned can be passed to strerror() to obtain\n+ * an error message for the user.\n+ *\n+ * @param amlogic_dt_id\t\tPoiner to buffer containing forced amlogic-dt-id\n+ * @param buf\t\t\t\t\t\t\tPoiner to buffer containing char buffer\n+ * @return 0 if ok, else -1\n+ */\n+int utilfdt_get_amlogic_dt_id(char *amlogic_dt_id, char *buf);\n+\n /**\n  * Decode a data type string. The purpose of this string\n  *\n-- \n2.29.2\n\n"
  },
  {
    "path": "packages/tools/emmctool/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"emmctool\"\nPKG_VERSION=\"1.0\"\nPKG_LICENSE=\"GPLv2\"\nPKG_LONGDESC=\"emmctool: simple tool for writing LibreELEC images to emmc on supported box/board devices\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/emmctool ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/tools/emmctool/scripts/emmctool",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n# ** !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! **\n# This script is not supported on generic box devices. If you choose to\n# modify it to run on other hardware and you brick your device you will\n# receive no support to restore your device. You have been warned!\n\ndo_backup(){\n  do_umount\n  echo \"info: compressing ${EMMC} to ${2}, this will take time\"\n  dd if=\"${EMMC}\" | gzip > of=\"${2}\"\n  echo \"info: compressing completed\"\n}\n\ndo_detect(){\n  # used on LibreComputer LePotato/LaFrite where pre-formatted modules\n  # must be attached after boot (LibreComputer supports this) else the\n  # device always boots to the pre-installed OS on the module.\n  echo \"info: rebinding d0074000.mmc\"\n  echo -n d0074000.mmc > /sys/bus/platform/drivers/meson-gx-mmc/unbind\n  echo -n d0074000.mmc > /sys/bus/platform/drivers/meson-gx-mmc/bind\n  sleep 1\n  parted -s \"${EMMC}\" print\n}\n\ndo_info(){\n  BOOTINFO=$(dd if=\"${BOOT}\" count=2048 2>/dev/null | strings | grep -e '^U-Boot ' | awk '{print $2}')\n  EMMCINFO=$(dd if=\"${EMMC}\" count=2048 2>/dev/null | strings | grep -e '^U-Boot ' | awk '{print $2}')\n  echo \"\"\n  if [ -n \"${BOOTINFO}\" ]; then\n    echo \"info: boot device is $BOOT, U-boot version is ${BOOTINFO}\"\n  else\n    echo \"info: boot device is $BOOT\"\n  fi\n  if [ -n \"${EMMCINFO}\" ]; then\n    echo \"info: emmc device is $EMMC, U-boot version is ${EMMCINFO}\"\n  else\n    echo \"info: emmc device is $EMMC\"\n  fi\n  echo \"\"\n  parted -s \"${EMMC}\" print\n  echo \"\"\n}\n\ndo_labels(){\n  if [ -n \"${2}\" ] && [ -n \"${3}\" ]; then\n    BOOTLABEL=$(echo \"${2}\" | awk 'BEGIN { getline; print toupper($0) }')\n    DISKLABEL=$(echo \"${3}\" | awk 'BEGIN { getline; print toupper($0) }')\n  else\n    BOOTLABEL=\"BOOT\"\n    DISKLABEL=\"DISK\"\n  fi\n  echo \"info: using boot=LABEL=${BOOTLABEL} and disk=LABEL=${DISKLABEL}\"\n  do_umount\n  echo \"info: changing label values on partitions\"\n  fatlabel \"${EMMC}p1\" \"${BOOTLABEL}\"\n  e2label \"${EMMC}p2\" \"${DISKLABEL}\"\n  sleep 1\n  echo \"info: remounting ${EMMC}p1 to /var/media/${BOOTLABEL}\"\n  mkdir -p \"/var/media/${BOOTLABEL}\"\n  mount \"${EMMC}p1\" \"/var/media/${BOOTLABEL}\"\n  echo \"info: remounting ${EMMC}p2 to /var/media/${DISKLABEL}\"\n  mkdir -p \"/var/media/${DISKLABEL}\"\n  mount \"${EMMC}p2\" \"/var/media/${DISKLABEL}\"\n  sleep 1\n  echo \"info: changing label values in extlinux.conf\"\n  sed -i \"s/boot=LABEL=\\w*/boot=LABEL=${BOOTLABEL}/g\" \"/var/media/${BOOTLABEL}/extlinux/extlinux.conf\"\n  sed -i \"s/disk=LABEL=\\w*/disk=LABEL=${DISKLABEL}/g\" \"/var/media/${BOOTLABEL}/extlinux/extlinux.conf\"\n  sleep 1\n  echo \"\"\n  blkid | grep \"${EMMC}p\"\n  echo \"\"\n  cat \"/var/media/${BOOTLABEL}/extlinux/extlinux.conf\"\n  echo \"\"\n}\n\ndo_resize(){\n  if [ -z \"${DISKLABEL}\" ]; then\n    DISKLABEL=$(blkid | grep \"${EMMC}\"p2 | awk -F'\"' '{print $2}')\n  fi\n  do_umount\n  echo \"info: resizing partition ${EMMC}p2 to 100%\"\n  parted -s -m \"${EMMC}\" resizepart 2 100% || parted -s -m \"${EMMC}\" resizepart 2 yes 100%\n  sleep 5\n  do_umount\n  echo \"info: checking filesystem\"\n  e2fsck -f \"${EMMC}p2\"\n  sleep 1\n  echo \"info: resizing filesystem\"\n  resize2fs \"${EMMC}p2\"\n  sync\n  sleep 1\n  echo \"info: remounting ${EMMC}p2 to /var/media/${DISKLABEL}\"\n  mkdir -p \"/var/media/${DISKLABEL}\"\n  mount \"${EMMC}p2\" \"/var/media/${DISKLABEL}\"\n  sleep 1\n  if [ -f \"/var/media/${DISKLABEL}/.please_resize_me\" ]; then\n    rm \"/var/media/${DISKLABEL}/.please_resize_me\"\n  fi\n  parted -s \"${EMMC}\" print\n}\n\ndo_storage(){\n  if [ -n \"${2}\" ]; then\n    DISKLABEL=$(echo \"${2}\" | awk 'BEGIN { getline; print toupper($0) }')\n  else\n    DISKLABEL=\"DISK\"\n  fi\n  do_umount\n  echo \"info: converting emmc for /storage use\"\n  parted -s \"${EMMC}\" mklabel gpt\n  parted -s \"${EMMC}\" -a min unit s mkpart EMMC_STORAGE ext4 34 100%\n  sleep 1\n  mkfs.ext4 \"${EMMC}p1\"\n  sleep 1\n  e2label \"${EMMC}p1\" EMMC_STORAGE\n  echo \"info: changing label values in extlinux.conf\"\n  mount -o remount,rw /flash\n  sleep 1\n  sed -i \"s/disk=LABEL=\\w*/disk=LABEL=${DISKLABEL}/g\" \"/flash/extlinux/extlinux.conf\"\n  mount -o remount,ro /flash\n  sleep 1\n  echo \"\"\n  blkid | grep \"${EMMC}p\"\n  echo \"\"\n  cat \"/flash/extlinux/extlinux.conf\"\n  echo \"\"\n}\n\ndo_umount(){\n  for mount in $(grep \"${EMMC}\" /proc/mounts | awk '{print $1}'); do\n    echo \"info: unmounting $mount\"\n    umount -f \"$mount\"\n    sleep 2\n  done\n}\n\ndo_writeprotect(){\n  echo  \"info: disabling emmc write protection\"\n  echo 0 > \"/sys/block/${EMMC}boot0/force_ro\"\n  echo 0 > \"/sys/block/${EMMC}boot1/force_ro\"\n}\n\ndo_write(){\n  do_umount\n\n  case $(dtname) in\n    radxa,zero*)\n      do_writeprotect\n      ;;\n  esac\n\n  if [ -e \"${2}\" ]; then\n    case \"${2}\" in\n      *box.img.gz|*box.img)\n        echo \"error: ${2} is not a bootable image, aborting!\"\n        exit 1\n        ;;\n      *.img.gz)\n        echo \"info: writing ${2} to ${EMMC}\"\n        gunzip -c \"${2}\" | dd of=\"${EMMC}\" bs=1M\n        ;;\n      *.img)\n        echo \"info: writing ${2} to ${EMMC}\"\n        dd if=\"${2}\" of=\"${EMMC}\" bs=1M\n        ;;\n      *)\n        echo \"error: ${2} is not a valid image file!\"\n        exit 1\n    esac\n  else\n    echo \"error: ${2} not found!\"\n    exit 1\n  fi\n}\n\ndo_zero(){\n  do_umount\n  echo \"info: zeroing ${EMMC}, be patient, this will take time\"\n  dd if=\"/dev/zero\" of=\"${EMMC}\" bs=1M\n  echo \"info: zeroing complete\"\n}\n\ndo_help(){\n  echo \"\"\n  echo \"usage: emmctool (w)rite <filename>    : write <filename>.img/.img.gz to the eMMC module\"\n  echo \"                (b)backup <filename>  : dump the emmc partition to <filename>.img.gz file\"\n  echo \"                (d)etect              : detect an eMMC module attached after boot\"\n  echo \"                (i)nfo                : show info about the eMMC module\"\n  echo \"                (l)abel <boot> <disk> : change eMMC disk labels to <bootlabel> <disklabel>\"\n  echo \"                (r)esize              : resize the storage partition to 100%\"\n  echo \"                (s)storage            : convert emmc for use as /storage (boot from sdcard)\"\n  echo \"                (z)ero                : zero (erase/wipe) the eMMC module\"\n  echo \"                (h)elp                : displays this help message\"\n  echo \"\"\n}\n\nBOOT=$(grep /flash /proc/mounts | awk '{print $1}' | sed 's/p[012]//g')\nEMMC=$(find /dev -name \"mmcblk*rpmb\" | sed 's/rpmb//g' | head -n 1)\n\nif [ -z \"${EMMC}\" ]; then\n  echo \"error: no emmc module detected!\"\n  exit 1\nfi\n\ncase $(dtname) in\n  azw*|bananapi*|friendlyarm*|hardkernel*|khadas*|libretech*|radxa*|wetek*)\n    if [ \"${BOOT}\" = \"${EMMC}\" ]; then\n      do_info\n      echo \"Your device is booted from the eMMC module!\"\n      echo \"\"\n      exit 1\n    fi\n    ;;\n  *)\n    echo \"Your device is not supported!\"\n    echo \"\"\n    exit 1\n    ;;\nesac\n\ncase \"${1}\" in\n  backup)\n    do_backup \"$@\"\n    ;;\n  detect|d)\n    do_detect\n    ;;\n  info|i)\n    do_info\n    ;;\n  labels|l)\n    do_labels \"$@\"\n    ;;\n  resize|r)\n    do_resize\n    ;;\n  storage|s)\n    do_storage \"$@\"\n    ;;\n  write|w)\n    do_write \"$@\"\n    do_resize\n    do_labels\n    ;;\n  zero|z)\n    do_zero\n    ;;\n  *)\n    do_info\n    do_help\n    ;;\nesac\n\nexit\n"
  },
  {
    "path": "packages/tools/exynos-boot-fip/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"exynos-boot-fip\"\nPKG_LICENSE=\"nonfree\"\nPKG_VERSION=\"fb7ab5db7329705b2fe1398842d715d1bbeb33d2\"\nPKG_SHA256=\"271bb3ff90b6e995a55252bfb8de46405cdbd7f506eca2c3e673f911cdb876c1\"\nPKG_SITE=\"https://github.com/chewitt/exynos-boot-fip\"\nPKG_URL=\"https://github.com/chewitt/exynos-boot-fip/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"Firmware Image Package (FIP) sources used with Exynos u-boot binaries in LibreELEC images\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_STAMP=\"${UBOOT_SYSTEM}\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/boot\n    cp -P ${PKG_BUILD}/bl1.bin.hardkernel ${INSTALL}/usr/boot\n    cp -P ${PKG_BUILD}/bl2.bin.hardkernel.720k_uboot ${INSTALL}/usr/boot\n    cp -P ${PKG_BUILD}/tzsw.bin.hardkernel ${INSTALL}/usr/boot\n}\n"
  },
  {
    "path": "packages/tools/flashrom/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"flashrom\"\nPKG_VERSION=\"1.3.0\"\nPKG_SHA256=\"a053234453ccd012e79f3443bdcc61625cf97b7fd7cb4cdd8bfbffbe8b149623\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.flashrom.org/Flashrom\"\nPKG_URL=\"https://download.flashrom.org/releases/${PKG_NAME}-v${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libusb-compat\"\nPKG_LONGDESC=\"flashrom is a utility for identifying, reading, writing, verifying and erasing flash chips. It is designed to flash BIOS/EFI/coreboot/firmware/optionROM images on mainboards, network/graphics/storage controller cards, and various other programmer devices.\"\n\nPKG_MESON_OPTS_TARGET=\"--wrap-mode=nodownload \\\n                       -Dprogrammer=dummy,serprog,buspirate_spi,pony_spi,linux_mtd,linux_spi\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/sbin\n    cp flashrom ${INSTALL}/usr/sbin\n}\n"
  },
  {
    "path": "packages/tools/grub/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"grub\"\nPKG_VERSION=\"635ef55ed1252f92fe3bf70caefd185dcc507c43\" # 2020-12-18\nPKG_SHA256=\"e099d18bdeef5312765f20c6de3384ca9ff03f776f1c7632b1e4bc4d1715a961\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://www.gnu.org/software/grub/index.html\"\nPKG_URL=\"http://git.savannah.gnu.org/cgit/grub.git/snapshot/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain flex freetype:host gettext:host grub:host\"\nPKG_DEPENDS_UNPACK=\"gnulib\"\nPKG_LONGDESC=\"GRUB is a Multiboot boot loader.\"\nPKG_TOOLCHAIN=\"configure\"\n\npre_configure_host() {\n  unset CFLAGS\n  unset CPPFLAGS\n  unset CXXFLAGS\n  unset LDFLAGS\n  unset CPP\n\n  cd ${PKG_BUILD}\n    # keep grub synced with gnulib\n    ./bootstrap --gnulib-srcdir=$(get_build_dir gnulib) --copy --no-git --no-bootstrap-sync --skip-po\n\n  mkdir -p .${HOST_NAME}\n    cd .${HOST_NAME}\n}\n\npre_configure_target() {\n  PKG_CONFIGURE_OPTS_TARGET=\"--target=i386-pc-linux \\\n                             --disable-nls \\\n                             --with-platform=efi\"\n\n  unset CFLAGS\n  unset CPPFLAGS\n  unset CXXFLAGS\n  unset LDFLAGS\n  unset CPP\n\n  cd ${PKG_BUILD}\n    # keep grub synced with gnulib\n    ./bootstrap --gnulib-srcdir=$(get_build_dir gnulib) --copy --no-git --no-bootstrap-sync --skip-po\n\n  mkdir -p .${TARGET_NAME}\n    cd .${TARGET_NAME}\n\n  # configure requires explicit TARGET_PREFIX binaries when cross compiling.\n  export TARGET_CC=\"${TARGET_PREFIX}gcc\"\n  export TARGET_OBJCOPY=\"${TARGET_PREFIX}objcopy\"\n  export TARGET_STRIP=\"${TARGET_PREFIX}strip\"\n  export TARGET_NM=\"${TARGET_PREFIX}nm\"\n  export TARGET_RANLIB=\"${TARGET_PREFIX}ranlib\"\n}\n\nmake_target() {\n  make CC=${CC} \\\n       AR=${AR} \\\n       RANLIB=${RANLIB} \\\n       CFLAGS=\"-I${SYSROOT_PREFIX}/usr/include -fomit-frame-pointer -D_FILE_OFFSET_BITS=64\" \\\n       LDFLAGS=\"-L${SYSROOT_PREFIX}/usr/lib\"\n}\n\nmakeinstall_target() {\n  ${PKG_BUILD}/.${HOST_NAME}/grub-mkimage -d grub-core -o bootia32.efi -O i386-efi -p /EFI/BOOT \\\n    boot chain configfile ext2 fat linux search efi_gop \\\n    efi_uga part_gpt gzio gettext loadenv loadbios memrw\n\n  mkdir -p ${INSTALL}/usr/share/grub\n     cp -P bootia32.efi ${INSTALL}/usr/share/grub\n\n  mkdir -p ${TOOLCHAIN}/share/grub\n     cp -P bootia32.efi ${TOOLCHAIN}/share/grub\n}\n"
  },
  {
    "path": "packages/tools/grub/patches/grub-0001-Fix-Werror-array-bounds-array-subscript-0-is-outside-array-bounds.patch",
    "content": "From acffb81485e35e1f28152949a1c6e1d4dbf5172e Mon Sep 17 00:00:00 2001\nFrom: Michael Chang <mchang@suse.com>\nDate: Mon, 28 Mar 2022 15:00:53 +0800\nSubject: build: Fix -Werror=array-bounds array subscript 0 is outside array\n bounds\n\nThe GRUB is failing to build with GCC-12 in many places like this:\n\n  In function 'init_cbfsdisk',\n      inlined from 'grub_mod_init' at ../../grub-core/fs/cbfs.c:391:3:\n  ../../grub-core/fs/cbfs.c:345:7: error: array subscript 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[]'} [-Werror=array-bounds]\n    345 |   ptr = *(grub_uint32_t *) 0xfffffffc;\n        |   ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis is caused by GCC regression in 11/12 [1]. In a nut shell, the\nwarning is about detected invalid accesses at non-zero offsets to NULL\npointers. Since hardwired constant address is treated as NULL plus an\noffset in the same underlying code, the warning is therefore triggered.\n\nInstead of inserting #pragma all over the places where literal pointers\nare accessed to avoid diagnosing array-bounds, we can try to borrow the\nidea from Linux kernel that the absolute_pointer() macro [2][3] is used\nto disconnect a pointer using literal address from it's original object,\nhence GCC won't be able to make assumptions on the boundary while doing\npointer arithmetic. With that we can greatly reduce the code we have to\ncover up by making initial literal pointer assignment to use the new\nwrapper but not having to track everywhere literal pointers are\naccessed. This also makes code looks cleaner.\n\nPlease note the grub_absolute_pointer() macro requires to be invoked in\na function as long as it is compound expression. Some global variables\nwith literal pointers has been changed to local ones in order to use\ngrub_absolute_pointer() to initialize it. The shuffling is basically done\nin a selective and careful way that the variable's scope doesn't matter\nbeing local or global, for example, the global variable must not get\nmodified at run time throughout. For the record, here's the list of\nglobal variables got shuffled in this patch:\n\n  grub-core/commands/i386/pc/drivemap.c:int13slot\n  grub-core/term/i386/pc/console.c:bios_data_area\n  grub-core/term/ns8250.c:serial_hw_io_addr\n\n[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578\n[2] https://elixir.bootlin.com/linux/v5.16.14/source/include/linux/compiler.h#L180\n[3] https://elixir.bootlin.com/linux/v5.16.14/source/include/linux/compiler-gcc.h#L31\n\nSigned-off-by: Michael Chang <mchang@suse.com>\nReviewed-by: Daniel Kiper <daniel.kiper@oracle.com>\n---\n grub-core/bus/cs5536.c                |  5 +++--\n grub-core/commands/acpi.c             |  4 ++--\n grub-core/commands/efi/loadbios.c     |  9 +++++----\n grub-core/commands/i386/pc/drivemap.c |  8 +++++---\n grub-core/commands/i386/pc/sendkey.c  | 12 ++++++------\n grub-core/disk/i386/pc/biosdisk.c     |  4 ++--\n grub-core/fs/cbfs.c                   |  2 +-\n grub-core/kern/i386/pc/acpi.c         |  4 ++--\n grub-core/kern/i386/pc/mmap.c         |  2 +-\n grub-core/loader/i386/multiboot_mbi.c |  2 +-\n grub-core/loader/multiboot_mbi2.c     |  4 ++--\n grub-core/mmap/i386/pc/mmap.c         | 26 +++++++++++++-------------\n grub-core/net/drivers/i386/pc/pxe.c   | 12 ++++++------\n grub-core/term/i386/pc/console.c      |  5 ++---\n grub-core/term/i386/pc/vga_text.c     |  6 +++---\n grub-core/term/ns8250.c               |  7 ++++++-\n grub-core/video/i386/pc/vbe.c         |  6 +++---\n include/grub/types.h                  | 24 ++++++++++++++++++++++++\n 18 files changed, 87 insertions(+), 55 deletions(-)\n\ndiff --git a/grub-core/bus/cs5536.c b/grub-core/bus/cs5536.c\nindex 8c90ed5..cd0a45e 100644\n--- a/grub-core/bus/cs5536.c\n+++ b/grub-core/bus/cs5536.c\n@@ -331,8 +331,9 @@ grub_cs5536_init_geode (grub_pci_device_t dev)\n \n   {\n     volatile grub_uint32_t *oc;\n-    oc = grub_pci_device_map_range (dev, 0x05022000,\n-\t\t\t\t    GRUB_CS5536_USB_OPTION_REGS_SIZE);\n+\n+    oc = grub_absolute_pointer (grub_pci_device_map_range (dev, 0x05022000,\n+\t\t\t\tGRUB_CS5536_USB_OPTION_REGS_SIZE));\n \n     oc[GRUB_CS5536_USB_OPTION_REG_UOCMUX] =\n       (oc[GRUB_CS5536_USB_OPTION_REG_UOCMUX]\ndiff --git a/grub-core/commands/acpi.c b/grub-core/commands/acpi.c\nindex 1215f2a..fda62f4 100644\n--- a/grub-core/commands/acpi.c\n+++ b/grub-core/commands/acpi.c\n@@ -168,7 +168,7 @@ grub_acpi_create_ebda (void)\n   struct grub_acpi_rsdp_v10 *v1;\n   struct grub_acpi_rsdp_v20 *v2;\n \n-  ebda = (grub_uint8_t *) (grub_addr_t) ((*((grub_uint16_t *)0x40e)) << 4);\n+  ebda = (grub_uint8_t *) (grub_addr_t) ((*((grub_uint16_t *) grub_absolute_pointer (0x40e))) << 4);\n   grub_dprintf (\"acpi\", \"EBDA @%p\\n\", ebda);\n   if (ebda)\n     ebda_kb_len = *(grub_uint16_t *) ebda;\n@@ -298,7 +298,7 @@ grub_acpi_create_ebda (void)\n       *target = 0;\n \n   grub_dprintf (\"acpi\", \"Switching EBDA\\n\");\n-  (*((grub_uint16_t *) 0x40e)) = ((grub_addr_t) targetebda) >> 4;\n+  (*((grub_uint16_t *) grub_absolute_pointer (0x40e))) = ((grub_addr_t) targetebda) >> 4;\n   grub_dprintf (\"acpi\", \"EBDA switched\\n\");\n \n   return GRUB_ERR_NONE;\ndiff --git a/grub-core/commands/efi/loadbios.c b/grub-core/commands/efi/loadbios.c\nindex 5c7725f..574e410 100644\n--- a/grub-core/commands/efi/loadbios.c\n+++ b/grub-core/commands/efi/loadbios.c\n@@ -46,7 +46,7 @@ enable_rom_area (void)\n   grub_uint32_t *rom_ptr;\n   grub_pci_device_t dev = { .bus = 0, .device = 0, .function = 0};\n \n-  rom_ptr = (grub_uint32_t *) VBIOS_ADDR;\n+  rom_ptr = grub_absolute_pointer (VBIOS_ADDR);\n   if (*rom_ptr != BLANK_MEM)\n     {\n       grub_puts_ (N_(\"ROM image is present.\"));\n@@ -96,8 +96,8 @@ fake_bios_data (int use_rom)\n   void *acpi, *smbios;\n   grub_uint16_t *ebda_seg_ptr, *low_mem_ptr;\n \n-  ebda_seg_ptr = (grub_uint16_t *) EBDA_SEG_ADDR;\n-  low_mem_ptr = (grub_uint16_t *) LOW_MEM_ADDR;\n+  ebda_seg_ptr = grub_absolute_pointer (EBDA_SEG_ADDR);\n+  low_mem_ptr = grub_absolute_pointer (LOW_MEM_ADDR);\n   if ((*ebda_seg_ptr) || (*low_mem_ptr))\n     return;\n \n@@ -132,7 +132,8 @@ fake_bios_data (int use_rom)\n   *ebda_seg_ptr = FAKE_EBDA_SEG;\n   *low_mem_ptr = (FAKE_EBDA_SEG >> 6);\n \n-  *((grub_uint16_t *) (FAKE_EBDA_SEG << 4)) = 640 - *low_mem_ptr;\n+  /* *((grub_uint16_t *) (FAKE_EBDA_SEG << 4)) = 640 - *low_mem_ptr; */\n+  *((grub_uint16_t *) (grub_absolute_pointer (FAKE_EBDA_SEG << 4))) = 640 - *low_mem_ptr;\n \n   if (acpi)\n     grub_memcpy ((char *) ((FAKE_EBDA_SEG << 4) + 16), acpi, 1024 - 16);\ndiff --git a/grub-core/commands/i386/pc/drivemap.c b/grub-core/commands/i386/pc/drivemap.c\nindex 3fb22dc..a7ee4c9 100644\n--- a/grub-core/commands/i386/pc/drivemap.c\n+++ b/grub-core/commands/i386/pc/drivemap.c\n@@ -31,9 +31,6 @@\n \n GRUB_MOD_LICENSE (\"GPLv3+\");\n \n-/* Real mode IVT slot (seg:off far pointer) for interrupt 0x13.  */\n-static grub_uint32_t *const int13slot = (grub_uint32_t *) (4 * 0x13);\n-\n /* Remember to update enum opt_idxs accordingly.  */\n static const struct grub_arg_option options[] = {\n   /* TRANSLATORS: In this file \"mapping\" refers to a change GRUB makes so if\n@@ -280,6 +277,8 @@ install_int13_handler (int noret __attribute__ ((unused)))\n   grub_uint8_t *handler_base = 0;\n   /* Address of the map within the deployed bundle.  */\n   int13map_node_t *handler_map;\n+  /* Real mode IVT slot (seg:off far pointer) for interrupt 0x13. */\n+  grub_uint32_t *int13slot = (grub_uint32_t *) grub_absolute_pointer (4 * 0x13);\n \n   int i;\n   int entries = 0;\n@@ -354,6 +353,9 @@ install_int13_handler (int noret __attribute__ ((unused)))\n static grub_err_t\n uninstall_int13_handler (void)\n {\n+  /* Real mode IVT slot (seg:off far pointer) for interrupt 0x13. */\n+  grub_uint32_t *int13slot = (grub_uint32_t *) grub_absolute_pointer (4 * 0x13);\n+\n   if (! grub_drivemap_oldhandler)\n     return GRUB_ERR_NONE;\n \ndiff --git a/grub-core/commands/i386/pc/sendkey.c b/grub-core/commands/i386/pc/sendkey.c\nindex 184befa..282bb5d 100644\n--- a/grub-core/commands/i386/pc/sendkey.c\n+++ b/grub-core/commands/i386/pc/sendkey.c\n@@ -216,12 +216,12 @@ static grub_err_t\n grub_sendkey_postboot (void)\n {\n   /* For convention: pointer to flags.  */\n-  grub_uint32_t *flags = (grub_uint32_t *) 0x417;\n+  grub_uint32_t *flags = grub_absolute_pointer (0x417);\n \n   *flags = oldflags;\n \n-  *((char *) 0x41a) = 0x1e;\n-  *((char *) 0x41c) = 0x1e;\n+  *((char *) grub_absolute_pointer (0x41a)) = 0x1e;\n+  *((char *) grub_absolute_pointer (0x41c)) = 0x1e;\n \n   return GRUB_ERR_NONE;\n }\n@@ -231,13 +231,13 @@ static grub_err_t\n grub_sendkey_preboot (int noret __attribute__ ((unused)))\n {\n   /* For convention: pointer to flags.  */\n-  grub_uint32_t *flags = (grub_uint32_t *) 0x417;\n+  grub_uint32_t *flags = grub_absolute_pointer (0x417);\n \n   oldflags = *flags;\n   \n   /* Set the sendkey.  */\n-  *((char *) 0x41a) = 0x1e;\n-  *((char *) 0x41c) = keylen + 0x1e;\n+  *((char *) grub_absolute_pointer (0x41a)) = 0x1e;\n+  *((char *) grub_absolute_pointer (0x41c)) = keylen + 0x1e;\n   grub_memcpy ((char *) 0x41e, sendkey, 0x20);\n \n   /* Transform \"any ctrl\" to \"right ctrl\" flag.  */\ndiff --git a/grub-core/disk/i386/pc/biosdisk.c b/grub-core/disk/i386/pc/biosdisk.c\nindex 81fd4e8..49e4e8a 100644\n--- a/grub-core/disk/i386/pc/biosdisk.c\n+++ b/grub-core/disk/i386/pc/biosdisk.c\n@@ -367,7 +367,7 @@ grub_biosdisk_open (const char *name, grub_disk_t disk)\n       if (version)\n \t{\n \t  struct grub_biosdisk_drp *drp\n-\t    = (struct grub_biosdisk_drp *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;\n+\t    = (struct grub_biosdisk_drp *) grub_absolute_pointer (GRUB_MEMORY_MACHINE_SCRATCH_ADDR);\n \n \t  /* Clear out the DRP.  */\n \t  grub_memset (drp, 0, sizeof (*drp));\n@@ -654,7 +654,7 @@ grub_disk_biosdisk_fini (void)\n GRUB_MOD_INIT(biosdisk)\n {\n   struct grub_biosdisk_cdrp *cdrp\n-    = (struct grub_biosdisk_cdrp *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;\n+    = (struct grub_biosdisk_cdrp *) grub_absolute_pointer (GRUB_MEMORY_MACHINE_SCRATCH_ADDR);\n   grub_uint8_t boot_drive;\n \n   if (grub_disk_firmware_is_tainted)\ndiff --git a/grub-core/fs/cbfs.c b/grub-core/fs/cbfs.c\nindex 581215e..8ab7106 100644\n--- a/grub-core/fs/cbfs.c\n+++ b/grub-core/fs/cbfs.c\n@@ -342,7 +342,7 @@ init_cbfsdisk (void)\n   grub_uint32_t ptr;\n   struct cbfs_header *head;\n \n-  ptr = *(grub_uint32_t *) 0xfffffffc;\n+  ptr = *((grub_uint32_t *) grub_absolute_pointer (0xfffffffc));\n   head = (struct cbfs_header *) (grub_addr_t) ptr;\n   grub_dprintf (\"cbfs\", \"head=%p\\n\", head);\n \ndiff --git a/grub-core/kern/i386/pc/acpi.c b/grub-core/kern/i386/pc/acpi.c\nindex 297f5d0..0a69eba 100644\n--- a/grub-core/kern/i386/pc/acpi.c\n+++ b/grub-core/kern/i386/pc/acpi.c\n@@ -27,7 +27,7 @@ grub_machine_acpi_get_rsdpv1 (void)\n   grub_uint8_t *ebda, *ptr;\n \n   grub_dprintf (\"acpi\", \"Looking for RSDP. Scanning EBDA\\n\");\n-  ebda = (grub_uint8_t *) ((* ((grub_uint16_t *) 0x40e)) << 4);\n+  ebda = (grub_uint8_t *) ((* ((grub_uint16_t *) grub_absolute_pointer (0x40e))) << 4);\n   ebda_len = * (grub_uint16_t *) ebda;\n   if (! ebda_len) /* FIXME do we really need this check? */\n     goto scan_bios;\n@@ -55,7 +55,7 @@ grub_machine_acpi_get_rsdpv2 (void)\n   grub_uint8_t *ebda, *ptr;\n \n   grub_dprintf (\"acpi\", \"Looking for RSDP. Scanning EBDA\\n\");\n-  ebda = (grub_uint8_t *) ((* ((grub_uint16_t *) 0x40e)) << 4);\n+  ebda = (grub_uint8_t *) ((* ((grub_uint16_t *) grub_absolute_pointer (0x40e))) << 4);\n   ebda_len = * (grub_uint16_t *) ebda;\n   if (! ebda_len) /* FIXME do we really need this check? */\n     goto scan_bios;\ndiff --git a/grub-core/kern/i386/pc/mmap.c b/grub-core/kern/i386/pc/mmap.c\nindex ef2faa2..53fcf45 100644\n--- a/grub-core/kern/i386/pc/mmap.c\n+++ b/grub-core/kern/i386/pc/mmap.c\n@@ -143,7 +143,7 @@ grub_machine_mmap_iterate (grub_memory_hook_t hook, void *hook_data)\n {\n   grub_uint32_t cont = 0;\n   struct grub_machine_mmap_entry *entry\n-    = (struct grub_machine_mmap_entry *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;\n+    = (struct grub_machine_mmap_entry *) grub_absolute_pointer (GRUB_MEMORY_MACHINE_SCRATCH_ADDR);\n   int e820_works = 0;\n \n   while (1)\ndiff --git a/grub-core/loader/i386/multiboot_mbi.c b/grub-core/loader/i386/multiboot_mbi.c\nindex ff1a846..11a6e22 100644\n--- a/grub-core/loader/i386/multiboot_mbi.c\n+++ b/grub-core/loader/i386/multiboot_mbi.c\n@@ -293,7 +293,7 @@ fill_vbe_info (struct multiboot_info *mbi, grub_uint8_t *ptrorig,\n   struct grub_vbe_mode_info_block *mode_info;\n #if GRUB_MACHINE_HAS_VBE\n   grub_vbe_status_t status;\n-  void *scratch = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;\n+  void *scratch = grub_absolute_pointer (GRUB_MEMORY_MACHINE_SCRATCH_ADDR);\n     \n   status = grub_vbe_bios_get_controller_info (scratch);\n   if (status != GRUB_VBE_STATUS_OK)\ndiff --git a/grub-core/loader/multiboot_mbi2.c b/grub-core/loader/multiboot_mbi2.c\nindex 6d680d6..00a4841 100644\n--- a/grub-core/loader/multiboot_mbi2.c\n+++ b/grub-core/loader/multiboot_mbi2.c\n@@ -504,7 +504,7 @@ static void\n fill_vbe_tag (struct multiboot_tag_vbe *tag)\n {\n   grub_vbe_status_t status;\n-  void *scratch = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;\n+  void *scratch = grub_absolute_pointer (GRUB_MEMORY_MACHINE_SCRATCH_ADDR);\n \n   tag->type = MULTIBOOT_TAG_TYPE_VBE;\n   tag->size = 0;\n@@ -577,7 +577,7 @@ retrieve_video_parameters (grub_properly_aligned_t **ptrorig)\n #if defined (GRUB_MACHINE_PCBIOS)\n       {\n \tgrub_vbe_status_t status;\n-\tvoid *scratch = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;\n+\tvoid *scratch = grub_absolute_pointer (GRUB_MEMORY_MACHINE_SCRATCH_ADDR);\n \tstatus = grub_vbe_bios_get_mode (scratch);\n \tvbe_mode = *(grub_uint32_t *) scratch;\n \tif (status != GRUB_VBE_STATUS_OK)\ndiff --git a/grub-core/mmap/i386/pc/mmap.c b/grub-core/mmap/i386/pc/mmap.c\nindex 6ab4f67..b9c5b0a 100644\n--- a/grub-core/mmap/i386/pc/mmap.c\n+++ b/grub-core/mmap/i386/pc/mmap.c\n@@ -80,13 +80,13 @@ preboot (int noreturn __attribute__ ((unused)))\n     = min (grub_mmap_get_post64 (), 0xfc000000ULL) >> 16;\n \n   /* Correct BDA. */\n-  *((grub_uint16_t *) 0x413) = grub_mmap_get_lower () >> 10;\n+  *((grub_uint16_t *) grub_absolute_pointer (0x413)) = grub_mmap_get_lower () >> 10;\n \n   /* Save old interrupt handlers. */\n-  grub_machine_mmaphook_int12offset = *((grub_uint16_t *) 0x48);\n-  grub_machine_mmaphook_int12segment = *((grub_uint16_t *) 0x4a);\n-  grub_machine_mmaphook_int15offset = *((grub_uint16_t *) 0x54);\n-  grub_machine_mmaphook_int15segment = *((grub_uint16_t *) 0x56);\n+  grub_machine_mmaphook_int12offset = *((grub_uint16_t *) grub_absolute_pointer (0x48));\n+  grub_machine_mmaphook_int12segment = *((grub_uint16_t *) grub_absolute_pointer (0x4a));\n+  grub_machine_mmaphook_int15offset = *((grub_uint16_t *) grub_absolute_pointer (0x54));\n+  grub_machine_mmaphook_int15segment = *((grub_uint16_t *) grub_absolute_pointer (0x56));\n \n   grub_dprintf (\"mmap\", \"hooktarget = %p\\n\", hooktarget);\n \n@@ -94,11 +94,11 @@ preboot (int noreturn __attribute__ ((unused)))\n   grub_memcpy (hooktarget, &grub_machine_mmaphook_start,\n \t       &grub_machine_mmaphook_end - &grub_machine_mmaphook_start);\n \n-  *((grub_uint16_t *) 0x4a) = ((grub_addr_t) hooktarget) >> 4;\n-  *((grub_uint16_t *) 0x56) = ((grub_addr_t) hooktarget) >> 4;\n-  *((grub_uint16_t *) 0x48) = &grub_machine_mmaphook_int12\n+  *((grub_uint16_t *) grub_absolute_pointer (0x4a)) = ((grub_addr_t) hooktarget) >> 4;\n+  *((grub_uint16_t *) grub_absolute_pointer (0x56)) = ((grub_addr_t) hooktarget) >> 4;\n+  *((grub_uint16_t *) grub_absolute_pointer (0x48)) = &grub_machine_mmaphook_int12\n     - &grub_machine_mmaphook_start;\n-  *((grub_uint16_t *) 0x54) = &grub_machine_mmaphook_int15\n+  *((grub_uint16_t *) grub_absolute_pointer (0x54)) = &grub_machine_mmaphook_int15\n     - &grub_machine_mmaphook_start;\n \n   return GRUB_ERR_NONE;\n@@ -108,10 +108,10 @@ static grub_err_t\n preboot_rest (void)\n {\n   /* Restore old interrupt handlers. */\n-  *((grub_uint16_t *) 0x48) = grub_machine_mmaphook_int12offset;\n-  *((grub_uint16_t *) 0x4a) = grub_machine_mmaphook_int12segment;\n-  *((grub_uint16_t *) 0x54) = grub_machine_mmaphook_int15offset;\n-  *((grub_uint16_t *) 0x56) = grub_machine_mmaphook_int15segment;\n+  *((grub_uint16_t *) grub_absolute_pointer (0x48)) = grub_machine_mmaphook_int12offset;\n+  *((grub_uint16_t *) grub_absolute_pointer (0x4a)) = grub_machine_mmaphook_int12segment;\n+  *((grub_uint16_t *) grub_absolute_pointer (0x54)) = grub_machine_mmaphook_int15offset;\n+  *((grub_uint16_t *) grub_absolute_pointer (0x56)) = grub_machine_mmaphook_int15segment;\n \n   return GRUB_ERR_NONE;\n }\ndiff --git a/grub-core/net/drivers/i386/pc/pxe.c b/grub-core/net/drivers/i386/pc/pxe.c\nindex 997010c..db17186 100644\n--- a/grub-core/net/drivers/i386/pc/pxe.c\n+++ b/grub-core/net/drivers/i386/pc/pxe.c\n@@ -174,7 +174,7 @@ grub_pxe_recv (struct grub_net_card *dev __attribute__ ((unused)))\n   grub_uint8_t *ptr, *end;\n   struct grub_net_buff *buf;\n \n-  isr = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;\n+  isr = (void *) grub_absolute_pointer (GRUB_MEMORY_MACHINE_SCRATCH_ADDR);\n \n   if (!in_progress)\n     {\n@@ -256,11 +256,11 @@ grub_pxe_send (struct grub_net_card *dev __attribute__ ((unused)),\n   struct grub_pxe_undi_tbd *tbd;\n   char *buf;\n \n-  trans = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;\n+  trans = (void *) grub_absolute_pointer (GRUB_MEMORY_MACHINE_SCRATCH_ADDR);\n   grub_memset (trans, 0, sizeof (*trans));\n-  tbd = (void *) (GRUB_MEMORY_MACHINE_SCRATCH_ADDR + 128);\n+  tbd = (void *) grub_absolute_pointer (GRUB_MEMORY_MACHINE_SCRATCH_ADDR + 128);\n   grub_memset (tbd, 0, sizeof (*tbd));\n-  buf = (void *) (GRUB_MEMORY_MACHINE_SCRATCH_ADDR + 256);\n+  buf = (void *) grub_absolute_pointer (GRUB_MEMORY_MACHINE_SCRATCH_ADDR + 256);\n   grub_memcpy (buf, pack->data, pack->tail - pack->data);\n \n   trans->tbd = SEGOFS ((grub_addr_t) tbd);\n@@ -287,7 +287,7 @@ static grub_err_t\n grub_pxe_open (struct grub_net_card *dev __attribute__ ((unused)))\n {\n   struct grub_pxe_undi_open *ou;\n-  ou = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;\n+  ou = (void *) grub_absolute_pointer (GRUB_MEMORY_MACHINE_SCRATCH_ADDR);\n   grub_memset (ou, 0, sizeof (*ou));\n   ou->pkt_filter = 4;\n   grub_pxe_call (GRUB_PXENV_UNDI_OPEN, ou, pxe_rm_entry);\n@@ -382,7 +382,7 @@ GRUB_MOD_INIT(pxe)\n   if (! pxenv)\n     return;\n \n-  ui = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;\n+  ui = (void *) grub_absolute_pointer (GRUB_MEMORY_MACHINE_SCRATCH_ADDR);\n   grub_memset (ui, 0, sizeof (*ui));\n   grub_pxe_call (GRUB_PXENV_UNDI_GET_INFORMATION, ui, pxe_rm_entry);\n \ndiff --git a/grub-core/term/i386/pc/console.c b/grub-core/term/i386/pc/console.c\nindex d44937c..9403390 100644\n--- a/grub-core/term/i386/pc/console.c\n+++ b/grub-core/term/i386/pc/console.c\n@@ -238,12 +238,11 @@ grub_console_getkey (struct grub_term_input *term __attribute__ ((unused)))\n   return (regs.eax & 0xff) + (('a' - 1) | GRUB_TERM_CTRL);\n }\n \n-static const struct grub_machine_bios_data_area *bios_data_area =\n-  (struct grub_machine_bios_data_area *) GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR;\n-\n static int\n grub_console_getkeystatus (struct grub_term_input *term __attribute__ ((unused)))\n {\n+  const struct grub_machine_bios_data_area *bios_data_area =\n+  (struct grub_machine_bios_data_area *) grub_absolute_pointer (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR);\n   /* conveniently GRUB keystatus is modelled after BIOS one.  */\n   return bios_data_area->keyboard_flag_lower & ~0x80;\n }\ndiff --git a/grub-core/term/i386/pc/vga_text.c b/grub-core/term/i386/pc/vga_text.c\nindex 88fecc5..669d06f 100644\n--- a/grub-core/term/i386/pc/vga_text.c\n+++ b/grub-core/term/i386/pc/vga_text.c\n@@ -45,15 +45,15 @@ GRUB_MOD_LICENSE (\"GPLv3+\");\n static struct grub_term_coordinate grub_curr_pos;\n \n #ifdef __mips__\n-#define VGA_TEXT_SCREEN\t\t((grub_uint16_t *) 0xb00b8000)\n+#define VGA_TEXT_SCREEN\t\t((grub_uint16_t *) grub_absolute_pointer (0xb00b8000))\n #define cr_read grub_vga_cr_read\n #define cr_write grub_vga_cr_write\n #elif defined (MODE_MDA)\n-#define VGA_TEXT_SCREEN\t\t((grub_uint16_t *) 0xb0000)\n+#define VGA_TEXT_SCREEN\t\t((grub_uint16_t *) grub_absolute_pointer (0xb0000))\n #define cr_read grub_vga_cr_bw_read\n #define cr_write grub_vga_cr_bw_write\n #else\n-#define VGA_TEXT_SCREEN\t\t((grub_uint16_t *) 0xb8000)\n+#define VGA_TEXT_SCREEN\t\t((grub_uint16_t *) grub_absolute_pointer (0xb8000))\n #define cr_read grub_vga_cr_read\n #define cr_write grub_vga_cr_write\n #endif\ndiff --git a/grub-core/term/ns8250.c b/grub-core/term/ns8250.c\nindex 5980183..83b2599 100644\n--- a/grub-core/term/ns8250.c\n+++ b/grub-core/term/ns8250.c\n@@ -28,7 +28,6 @@\n \n #ifdef GRUB_MACHINE_PCBIOS\n #include <grub/machine/memory.h>\n-static const unsigned short *serial_hw_io_addr = (const unsigned short *) GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR;\n #define GRUB_SERIAL_PORT_NUM 4\n #else\n #include <grub/machine/serial.h>\n@@ -237,6 +236,9 @@ static struct grub_serial_port com_ports[GRUB_SERIAL_PORT_NUM];\n void\n grub_ns8250_init (void)\n {\n+#ifdef GRUB_MACHINE_PCBIOS\n+  const unsigned short *serial_hw_io_addr = (const unsigned short *) grub_absolute_pointer (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR);\n+#endif\n   unsigned i;\n   for (i = 0; i < GRUB_SERIAL_PORT_NUM; i++)\n     if (serial_hw_io_addr[i])\n@@ -272,6 +274,9 @@ grub_ns8250_init (void)\n grub_port_t\n grub_ns8250_hw_get_port (const unsigned int unit)\n {\n+#ifdef GRUB_MACHINE_PCBIOS\n+  const unsigned short *serial_hw_io_addr = (const unsigned short *) grub_absolute_pointer (GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR);\n+#endif\n   if (unit < GRUB_SERIAL_PORT_NUM\n       && !(dead_ports & (1 << unit)))\n     return serial_hw_io_addr[unit];\ndiff --git a/grub-core/video/i386/pc/vbe.c b/grub-core/video/i386/pc/vbe.c\nindex 0e65b52..a0bb9af 100644\n--- a/grub-core/video/i386/pc/vbe.c\n+++ b/grub-core/video/i386/pc/vbe.c\n@@ -514,7 +514,7 @@ grub_vbe_probe (struct grub_vbe_info_block *info_block)\n \n       /* Use low memory scratch area as temporary storage\n          for VESA BIOS call.  */\n-      vbe_ib = (struct grub_vbe_info_block *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;\n+      vbe_ib = (struct grub_vbe_info_block *) grub_absolute_pointer (GRUB_MEMORY_MACHINE_SCRATCH_ADDR);\n \n       /* Prepare info block.  */\n       grub_memset (vbe_ib, 0, sizeof (*vbe_ib));\n@@ -574,7 +574,7 @@ grub_vbe_get_preferred_mode (unsigned int *width, unsigned int *height)\n \n   /* Use low memory scratch area as temporary storage for VESA BIOS calls.  */\n   flat_panel_info = (struct grub_vbe_flat_panel_info *)\n-    (GRUB_MEMORY_MACHINE_SCRATCH_ADDR + sizeof (struct grub_video_edid_info));\n+    grub_absolute_pointer (GRUB_MEMORY_MACHINE_SCRATCH_ADDR + sizeof (struct grub_video_edid_info));\n \n   if (controller_info.version >= 0x200\n       && (grub_vbe_bios_get_ddc_capabilities (&ddc_level) & 0xff)\n@@ -676,7 +676,7 @@ grub_vbe_set_video_mode (grub_uint32_t vbe_mode,\n \t  == GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL)\n \t{\n \t  struct grub_vbe_palette_data *palette\n-\t    = (struct grub_vbe_palette_data *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;\n+\t    = (struct grub_vbe_palette_data *) grub_absolute_pointer (GRUB_MEMORY_MACHINE_SCRATCH_ADDR);\n \t  unsigned i;\n \n \t  /* Make sure that the BIOS can reach the palette.  */\ndiff --git a/include/grub/types.h b/include/grub/types.h\nindex 0a3ff15..5ae0ced 100644\n--- a/include/grub/types.h\n+++ b/include/grub/types.h\n@@ -340,4 +340,28 @@ static inline void grub_set_unaligned64 (void *ptr, grub_uint64_t val)\n   dd->d = val;\n }\n \n+/*\n+ * The grub_absolute_pointer() macro borrows the idea from Linux kernel of using\n+ * RELOC_HIDE() macro to stop GCC from checking the result of pointer arithmetic\n+ * and also it's conversion to be inside the symbol's boundary [1]. The check\n+ * is sometimes false positive, especially it is controversial to emit the array\n+ * bounds [-Warray-bounds] warning on all hardwired literal pointers since GCC\n+ * 11/12 [2]. Unless a good solution can be settled, for the time being we\n+ * would be in favor of the macro instead of GCC pragmas which cannot match the\n+ * places the warning needs to be ignored in an exact way.\n+ *\n+ * [1] https://lists.linuxcoding.com/kernel/2006-q3/msg17979.html\n+ * [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578\n+ */\n+#if defined(__GNUC__)\n+# define grub_absolute_pointer(val)\t\t\t\t\t\\\n+({\t\t\t\t\t\t\t\t\t\\\n+\tgrub_addr_t __ptr;\t\t\t\t\t\t\\\n+\tasm (\"\" : \"=r\" (__ptr) : \"0\" ((void *) (val)));\t\t\t\\\n+\t(void *) (__ptr);\t\t\t\t\t\t\\\n+})\n+#else\n+# define grub_absolute_pointer(val) ((void *) (val))\n+#endif\n+\n #endif /* ! GRUB_TYPES_HEADER */\n-- \ncgit v1.1\n\n"
  },
  {
    "path": "packages/tools/grub/patches/grub-0002-lib-reed-solomon-Fix-array-subscript-0-outside-array-bounds.patch",
    "content": "From 3ce13d974b887338ae972c79b41ff6fc0eee6388 Mon Sep 17 00:00:00 2001\nFrom: Michael Chang <mchang@suse.com>\nDate: Mon, 28 Mar 2022 15:00:54 +0800\nSubject: lib/reed_solomon: Fix array subscript 0 is outside array bounds\n\nThe grub_absolute_pointer() is a compound expression that can only work\nwithin a function. We are out of luck here when the pointer variables\nrequire global definition due to ATTRIBUTE_TEXT that have to use fully\ninitialized global definition because of the way linkers work.\n\n  static gf_single_t * const gf_powx ATTRIBUTE_TEXT = (void *) 0x100000;\n\nFor the reason given above, use GCC diagnostic pragmas to suppress the\narray-bounds warning.\n\nSigned-off-by: Michael Chang <mchang@suse.com>\nReviewed-by: Daniel Kiper <daniel.kiper@oracle.com>\n---\n grub-core/lib/reed_solomon.c | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\ndiff --git a/grub-core/lib/reed_solomon.c b/grub-core/lib/reed_solomon.c\nindex 82779a2..562bd2e 100644\n--- a/grub-core/lib/reed_solomon.c\n+++ b/grub-core/lib/reed_solomon.c\n@@ -102,6 +102,11 @@ static gf_single_t errvals[256];\n static gf_single_t eqstat[65536 + 256];\n #endif\n \n+#if __GNUC__ == 12\n+#pragma GCC diagnostic push\n+#pragma GCC diagnostic ignored \"-Warray-bounds\"\n+#endif\n+\n static gf_single_t\n gf_mul (gf_single_t a, gf_single_t b)\n {\n@@ -319,6 +324,10 @@ decode_block (gf_single_t *ptr, grub_size_t s,\n     }\n }\n \n+#if __GNUC__ == 12\n+#pragma GCC diagnostic pop\n+#endif\n+\n #if !defined (STANDALONE)\n static void\n encode_block (gf_single_t *ptr, grub_size_t s,\n-- \ncgit v1.1\n\n"
  },
  {
    "path": "packages/tools/grub/patches/grub-gnulib-acprereq-2-64.patch",
    "content": "--- a/configure.ac\t2020-12-18 22:18:04.000000000 +0000\n+++ b/configure.ac\t2021-01-17 05:55:10.946679960 +0000\n@@ -49,7 +49,7 @@\n program_prefix=\"${save_program_prefix}\"\n \n AM_INIT_AUTOMAKE([1.11])\n-AC_PREREQ(2.63)\n+AC_PREREQ([2.64])\n AC_CONFIG_SRCDIR([include/grub/dl.h])\n AC_CONFIG_HEADER([config-util.h])\n \n"
  },
  {
    "path": "packages/tools/hdparm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"hdparm\"\nPKG_VERSION=\"9.65\"\nPKG_SHA256=\"d14929f910d060932e717e9382425d47c2e7144235a53713d55a94f7de535a4b\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"http://sourceforge.net/projects/hdparm/\"\nPKG_URL=\"${SOURCEFORGE_SRC}/${PKG_NAME}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Shell utility to access/tune ioctl features of the Linux IDE driver and IDE drives.\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/sbin\n    cp -a ${PKG_BUILD}/hdparm ${INSTALL}/usr/sbin\n}\n"
  },
  {
    "path": "packages/tools/hdparm/patches/hdparm-9.42-cflags.patch",
    "content": "diff -Naur hdparm-9.39/Makefile hdparm-9.39.patch/Makefile\n--- hdparm-9.39/Makefile\t2012-01-06 17:05:37.000000000 +0100\n+++ hdparm-9.39.patch/Makefile\t2012-07-28 05:22:53.271127964 +0200\n@@ -13,7 +13,7 @@\n CC ?= gcc\n STRIP ?= strip\n \n-CFLAGS := -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS)\n+CFLAGS := -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS)\n \n LDFLAGS = -s\n #LDFLAGS = -s -static\n"
  },
  {
    "path": "packages/tools/hdparm/udev.d/61-cdrom.rules",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n# only do anything on block devices which are not removed\nACTION!=\"add|change\", GOTO=\"cdrom_end\"\n\n# /dev/sr, /dev/sr_mod, /dev/srcutree are not valid\nKERNEL==\"sr|sr_mod|srcutree\", GOTO=\"cdrom_end\"\n\n# set CDROM speed\nKERNEL==\"sr*\", RUN+=\"/sbin/hdparm -E8 /dev/%k\"\n\nLABEL=\"cdrom_end\"\n"
  },
  {
    "path": "packages/tools/installer/config/installer.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n# Disklabel for System and Storage partition\n  DISKLABEL_SYSTEM=\"System\"\n  DISKLABEL_STORAGE=\"Storage\"\n\n# Default size of system partition, in MB, eg. 512\n  PARTSIZE_SYSTEM=\"@SYSTEM_SIZE@\"\n\n# Default starting offset for system partition, in sectors (1 sector = 512B), eg. 2048\n  PARTSIZE_SYSTEM_OFFSET=\"@SYSTEM_PART_START@\"\n\n# additional parameters to syslinux\n  SYSLINUX_PARAMETERS=\"@SYSLINUX_PARAMETERS@\"\n\n# enable BIOS update function\n  BIOS_UPDATE=\"no\"\n\n# BIOS file to program\n  BIOS_FILE=\"\"\n\n# location for BIOS backup (with filename)\n  BIOS_BACKUP=\"\"\n\n# color scheme to use for Whiptail/Newt\n# see http://askubuntu.com/questions/776831/whiptail-change-background-color-dynamically-from-magenta\n  WHIPTAIL_COLORS=\"\"\n"
  },
  {
    "path": "packages/tools/installer/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"installer\"\nPKG_VERSION=\"1\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://libreelec.tv/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain busybox newt parted e2fsprogs syslinux grub\"\nPKG_LONGDESC=\"LibreELEC.tv Install manager to install the system on any disk\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_install() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/installer ${INSTALL}/usr/bin\n    sed -e \"s/@DISTRONAME@/${DISTRONAME}/g\" \\\n        -i  ${INSTALL}/usr/bin/installer\n\n  mkdir -p ${INSTALL}/etc\n    find_file_path config/installer.conf\n    cp ${FOUND_PATH} ${INSTALL}/etc\n    sed -e \"s/@SYSTEM_SIZE@/${SYSTEM_SIZE}/g\" \\\n        -e \"s/@SYSTEM_PART_START@/${SYSTEM_PART_START}/g\" \\\n        -e \"s/@SYSLINUX_PARAMETERS@/${SYSLINUX_PARAMETERS}/g\" \\\n        -i ${INSTALL}/etc/installer.conf\n\n  enable_service installer.service\n}\n"
  },
  {
    "path": "packages/tools/installer/scripts/installer",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n# some DOCs:\n\n# list devices:\n# cat /proc/partitions | sed -n \"s/\\ *[0-9][0-9]*\\ *[0-9][0-9]*\\ *[0-9][0-9]*\\ \\([a-z]*\\)$/\\1/p\"\n\n# list all partitionnumbers from /dev/sda:\n# parted -m /dev/sda print | grep -v ^/dev | grep -v ^BYT | cut -f1 -d \":\"\n\n# list device data from /dev/sda:\n# parted -m /dev/sda print | grep /dev/sda\n\n# list mounted partitions:\n# mount | grep ^/dev\n\n# list modelnumber:\n# parted -m /dev/sda print | grep /dev/sda | cut -f7 -d \":\" | sed \"s/;//\"\n# list size:\n# parted -m /dev/sda print | grep /dev/sda | cut -f2 -d \":\"\n\n# exclude mounted partitions\n# for i in `cat /proc/mounts | grep ^/dev/ | cut -f1 -d \" \" | sed \"s/[0-9]//\"`; do TEST=\"$TEST `echo \"| grep -v $i\"`\"; done\n\n# disable Ctrl+C - can be very dangerous\ntrap '' 2\n\n[ -f /etc/installer.conf ] && . /etc/installer.conf || exit 0\n\ndbglg() {\n  # Acts just like echo cmd, with automatic redirection\n\n  echo \"\" >> $LOGFILE\n  echo \"#################################################################\" >> $LOGFILE\n  echo \"# $@\" >> $LOGFILE\n  echo \"#################################################################\" >> $LOGFILE\n  echo \"\" >> $LOGFILE\n}\n\nlog_system_status() {\n  echo \"# cat /proc/mounts\"\n  cat /proc/mounts\n  echo\n\n  echo \"# df\"\n  df\n  echo\n\n  echo \"# df -h\"\n  df -h\n  echo\n\n  echo \"# parted -s -m -l\"\n  parted -s -m -l\n  echo\n\n  echo \"# blkid\"\n  blkid\n  echo\n\n  echo \"# UEFI (if directory exists)\"\n  ls -la /sys/firmware/efi\n  echo\n\n  echo \"# Disk sizes (bytes)\"\n  grep . /sys/block/*/size\n  echo\n}\n\nget_device_unmount() {\n  # get all unmounted devices\n  # usage: get_devices_unmount\n  # uses:     -\n  # provides: DEVICES\n\n  DEVICES=\"\"\n  DEVICES=$(parted -s -m -l 2>/dev/null | grep -E '^/dev/sd|^/dev/mmcblk|^/dev/nvme' | grep -E -v '^[^:]*rpmb|^[^:]*boot' | cut -f1 -d \":\")\n\n  for i in $(cat /proc/mounts | grep -E '^/dev/sd' | cut -f1 -d \" \" | sed \"s/[0-9].*$//\"); do\n    DEVICES=$(echo $DEVICES | sed -e \"s|$i||\")\n  done\n\n  for i in $(cat /proc/mounts | grep -E '^/dev/mmcblk' | cut -f1 -d \" \" | sed \"s/p.*$//\"); do\n    DEVICES=$(echo $DEVICES | sed -e \"s|$i||\")\n  done\n\n  for i in $(cat /proc/mounts | grep -E '^/dev/nvme' | cut -f1 -d \" \" | sed \"s/p.*$//\"); do\n    DEVICES=$(echo $DEVICES | sed -e \"s|$i||\")\n  done\n}\n\nget_partition() {\n  # get all partitions of a specifed device\n  # usage:    get_partitions /dev/sda\n  # uses:     -\n  # provides: PARTITIONS\n\n  PARTITIONS=$(parted -s -m $1 print | grep -v ^/dev | grep -v BYT | cut -f1 -d \":\")\n}\n\ncreate_device_list() {\n  # creates device list to use in menus\n  # usage:    create_devices_list\n  # uses:     get_device_unmount\n  # provides: DEVICE_MODEL, DEVICE_SIZE, DEVICE_LIST, DEVICE_NAME,\n  #           DEVICES (get_device_unmount)\n\n  DEVICE_MODEL=\"\"\n  DEVICE_SIZE=\"\"\n  DEVICE_LIST=\"\"\n  DEVICE_NAME=\"\"\n\n  get_device_unmount\n\n  if [ \"$DEVICES\" = \"\" ]; then\n    msg_no_device\n    return 1\n  fi\n\n  for i in $DEVICES; do\n    DEVICE_MODEL=$(parted -s $i -m print | grep ^$i | cut -f7 -d \":\" | sed \"s/;//\")\n    DEVICE_SIZE=$(parted -s $i -m print | grep ^$i | cut -f2 -d \":\")\n    DEVICE_NAME=$(echo $DEVICE_MODEL ${DEVICE_SIZE} | sed 's/ /_/g')\n    DEVICE_LIST=\"$DEVICE_LIST $i $DEVICE_NAME\"\n  done\n  return 0\n}\n\ndo_install_quick() {\n  # show menu\n  MSG_TITLE=\"QUICK INSTALL MENU\"\n  MSG_MENU=\"\\nUse the up/down arrows to select the device you wish to install to.\\n\\nPlease select a device:\"\n  MSG_CANCEL=\"Back\"\n\n  create_device_list || return\n\n  whiptail --backtitle \"$BACKTITLE\" --cancel-button \"$MSG_CANCEL\" \\\n    $DIALOG_OPTIONS --title \"$MSG_TITLE\" --menu \"$MSG_MENU\" 20 50 5 \\\n    $DEVICE_LIST 2> $TMPDIR/device_for_install\n  [ $? -ne 0 ] && return\n\n  # now we must do everything\n  INSTALL_DEVICE=$(cat \"$TMPDIR/device_for_install\")\n  INSTALL_DEVICE_FULL=$(echo $DEVICE_LIST | sed \"s|.*$INSTALL_DEVICE \\([^ ]*\\).*|$INSTALL_DEVICE \\1|\")\n\n  case $INSTALL_DEVICE in\n    \"/dev/mmcblk\"*|\"/dev/nvme\"*)\n      PART1=\"p1\"\n      PART2=\"p2\"\n      ;;\n    *)\n      PART1=\"1\"\n      PART2=\"2\"\n      ;;\n  esac\n\n  prompt_gpt\n  prompt_backup_unpack\n\n  # check for confirmation (twice!)\n  MSG_TITLE=\"Confirmation before installing\"\n  MSG_DETAIL=\"\\nIf you continue the contents of the target disk will be wiped out:\\n\\n$INSTALL_DEVICE_FULL\\n\\n\"\n  DIALOG_OPTIONS=\"--defaultno\"\n  whiptail --backtitle \"$BACKTITLE\" --title \"$MSG_TITLE\" \\\n    $DIALOG_OPTIONS --yesno \"$MSG_DETAIL\" 0 0\n  [ $? -ne 0 ] && return\n\n  MSG_TITLE=\"Confirmation before installing\"\n  MSG_DETAIL=\"\\nThis is last chance to abort the installation!\\n\\nIf you continue the target disk will be wiped out:\\n\\n$INSTALL_DEVICE_FULL\\n\\n\\n\"\n  DIALOG_OPTIONS=\"--defaultno\"\n  whiptail --backtitle \"$BACKTITLE\" --title \"$MSG_TITLE\" \\\n    $DIALOG_OPTIONS --yesno \"$MSG_DETAIL\" 0 0\n  [ $? -ne 0 ] && return\n\n  # start the progress bar (whiptail --gauge)\n  {\n    # remove all partitions\n    msg_progress_install \"1\" \"Get all partitions $INSTALL_DEVICE\"\n    get_partition $INSTALL_DEVICE 2>>$LOGFILE\n\n    msg_progress_install \"5\" \"Wiping disk $INSTALL_DEVICE\"\n    dd if=/dev/zero of=$INSTALL_DEVICE bs=4096 count=1024 2>>$LOGFILE\n\n    # create 2 new partitions (first $PARTSIZE_SYSTEM, second rest)\n    msg_progress_install \"7\"  \"Creating label on $INSTALL_DEVICE\"\n    if [ \"$GPT\" = \"1\" ]; then\n      parted -s $INSTALL_DEVICE mklabel gpt >> $LOGFILE 2>&1\n    else\n      parted -s $INSTALL_DEVICE mklabel msdos >> $LOGFILE 2>&1\n    fi\n\n    msg_progress_install \"9\" \"Writing Master Boot Record on $INSTALL_DEVICE\"\n    if [ \"$GPT\" = \"1\" ]; then\n      cat /usr/share/syslinux/gptmbr.bin > $INSTALL_DEVICE\n    else\n      cat /usr/share/syslinux/mbr.bin > $INSTALL_DEVICE\n    fi\n\n    partsize_system_start=$PARTSIZE_SYSTEM_OFFSET\n    partsize_system_end=$(((PARTSIZE_SYSTEM * 1024 * 1024 / 512) + partsize_system_start - 1))\n    partsize_storage_start=$((partsize_system_end + 1))\n    partsize_storage_end=-1024\n\n    msg_progress_install \"10\" \"Creating partition on $INSTALL_DEVICE\"\n    if [ \"$GPT\" = \"1\" ]; then\n      parted -s $INSTALL_DEVICE unit s mkpart $DISKLABEL_SYSTEM fat16 -- $partsize_system_start $partsize_system_end >> $LOGFILE 2>&1\n    else\n      parted -s $INSTALL_DEVICE unit s mkpart primary fat16 -- $partsize_system_start $partsize_system_end >> $LOGFILE 2>&1\n    fi\n\n    msg_progress_install \"13\" \"Creating partition on $INSTALL_DEVICE\"\n    if [ \"$GPT\" = \"1\" ]; then\n      parted -s $INSTALL_DEVICE unit s mkpart $DISKLABEL_STORAGE ext4 -- $partsize_storage_start $partsize_storage_end >> $LOGFILE 2>&1\n    else\n      parted -s $INSTALL_DEVICE unit s mkpart primary ext4 -- $partsize_storage_start $partsize_storage_end >> $LOGFILE 2>&1\n    fi\n\n    msg_progress_install \"16\" \"Setup bootflag on partition 1 of $INSTALL_DEVICE\"\n    parted -s $INSTALL_DEVICE set 1 boot on >> $LOGFILE 2>&1\n    if [ \"$GPT\" = \"1\" ]; then\n      parted -s $INSTALL_DEVICE set 1 legacy_boot on >> $LOGFILE 2>&1\n    fi\n\n    msg_progress_install \"20\" \"Tell the kernel we have a new partition table on $INSTALL_DEVICE\"\n    partprobe $INSTALL_DEVICE >> $LOGFILE 2>&1\n\n    # create filesystem\n    msg_progress_install \"23\" \"Creating filesystem on ${INSTALL_DEVICE}1\"\n    mkfs.vfat -F 16 ${INSTALL_DEVICE}${PART1} >> $LOGFILE 2>&1\n\n    msg_progress_install \"25\" \"Set uuid and disklabel $DISKLABEL_SYSTEM on ${INSTALL_DEVICE}${PART1}\"\n    dosfslabel ${INSTALL_DEVICE}${PART1}  $DISKLABEL_SYSTEM >> $LOGFILE 2>&1\n\n    msg_progress_install \"28\" \"Creating filesystem on ${INSTALL_DEVICE}${PART2}\"\n    mke2fs -t ext4 -m 0 ${INSTALL_DEVICE}${PART2} >> $LOGFILE 2>&1\n\n    msg_progress_install \"30\" \"Set uuid and disklabel $DISKLABEL_STORAGE on ${INSTALL_DEVICE}${PART2}\"\n    tune2fs -U random -L $DISKLABEL_STORAGE  ${INSTALL_DEVICE}${PART2} >> $LOGFILE 2>&1\n\n    UUID_SYSTEM=\"$(blkid --output udev ${INSTALL_DEVICE}${PART1} | grep ^ID_FS_UUID= | cut -d= -f2)\"\n    UUID_STORAGE=\"$(blkid --output udev ${INSTALL_DEVICE}${PART2} | grep ^ID_FS_UUID= | cut -d= -f2)\"\n\n    echo \"\" >> $LOGFILE\n    echo \"UUID_SYSTEM : ${UUID_SYSTEM}\" >> $LOGFILE\n    echo \"UUID_STORAGE: ${UUID_STORAGE}\" >> $LOGFILE\n\n    # mount system partition\n    msg_progress_install \"35\" \"Creating $TMPDIR/part1\"\n    mkdir -p $TMPDIR/part1 >> $LOGFILE 2>&1\n\n    msg_progress_install \"40\" \"Mounting ${INSTALL_DEVICE}${PART1} to $TMPDIR/part1\"\n    mount -t vfat ${INSTALL_DEVICE}${PART1} $TMPDIR/part1 >> $LOGFILE 2>&1\n\n    # installing syslinux\n    msg_progress_install \"50\" \"Installing syslinux to $TMPDIR/part1\"\n    syslinux -i ${INSTALL_DEVICE}${PART1} >> $LOGFILE 2>&1\n\n    # install system files\n    msg_progress_install \"60\" \"Installing Kernel\"\n    cp \"/flash/$IMAGE_KERNEL\" $TMPDIR/part1/KERNEL >> $LOGFILE 2>&1\n\n    msg_progress_install \"65\" \"Installing System\"\n    cp \"/flash/$IMAGE_SYSTEM\" $TMPDIR/part1/SYSTEM >> $LOGFILE 2>&1\n    sync\n\n    # configuring bootloader\n    msg_progress_install \"80\" \"Setup bootloader with boot label = $DISKLABEL_SYSTEM and disk label = $DISKLABEL_STORAGE\"\n    mkdir -p $TMPDIR/part1/EFI/BOOT\n    cat << EOF > $TMPDIR/part1/syslinux.cfg\nDEFAULT linux\nPROMPT 0\n\nLABEL linux\n KERNEL /KERNEL\n APPEND boot=UUID=$UUID_SYSTEM disk=UUID=$UUID_STORAGE $SYSLINUX_PARAMETERS quiet\nEOF\n\n    cat << EOF > $TMPDIR/part1/EFI/BOOT/grub.cfg\nset timeout=\"0\"\nset default=\"LibreELEC\"\n\nmenuentry \"LibreELEC\" {\n\tsearch --set -f /KERNEL\n\tlinux /KERNEL boot=UUID=$UUID_SYSTEM disk=UUID=$UUID_STORAGE quiet\n}\nEOF\n\n    # uefi boot / hybrid mode\n    cp /usr/share/syslinux/bootx64.efi $TMPDIR/part1/EFI/BOOT\n    cp /usr/share/syslinux/ldlinux.e64 $TMPDIR/part1/EFI/BOOT\n    cp /usr/share/grub/bootia32.efi $TMPDIR/part1/EFI/BOOT\n    sync\n\n    # umount system partition, remove mountpoint\n    msg_progress_install \"85\" \"Unmount $TMPDIR/part1\"\n    umount $TMPDIR/part1 >> $LOGFILE 2>&1\n\n    msg_progress_install \"87\" \"Remove $TMPDIR/part1\"\n    rmdir $TMPDIR/part1 >> $LOGFILE 2>&1\n\n    if [ \"$BACKUP_UNPACK\" = \"1\" ]; then\n      # mount storage partition\n      msg_progress_install \"89\" \"Creating $TMPDIR/part2\"\n      mkdir -p $TMPDIR/part2 >> $LOGFILE 2>&1\n\n      msg_progress_install \"90\" \"Mounting ${INSTALL_DEVICE}${PART2} to $TMPDIR/part2\"\n      mount -t ext4 ${INSTALL_DEVICE}${PART2} $TMPDIR/part2 >> $LOGFILE 2>&1\n\n      msg_progress_install \"92\" \"Restoring backup\"\n      [ -f /flash/backup.tar.bz2 ] && tar -xjf /flash/backup.tar.bz2 -C $TMPDIR/part2 >> $LOGFILE 2>&1\n      [ -f /flash/backup.zip ] && unzip -qq /flash/backup.zip -d $TMPDIR/part2 >> $LOGFILE 2>&1\n      sync\n\n      # umount system partition, remove mountpoint\n      msg_progress_install \"97\" \"Unmount $TMPDIR/part2\"\n      umount $TMPDIR/part2 >> $LOGFILE 2>&1\n\n      msg_progress_install \"100\" \"Remove $TMPDIR/part2\"\n      rmdir $TMPDIR/part2 >> $LOGFILE 2>&1\n    fi\n  } | whiptail --backtitle \"$BACKTITLE\" --gauge \"Please wait while your system is being setup ...\" 6 73 0\n\n  # install complete\n  MSG_TITLE=\"@DISTRONAME@ Install Complete\"\n  MSG_DETAIL=\"You may now remove the install media and reboot.\\n\"\n  whiptail --backtitle \"$BACKTITLE\" --title \"$MSG_TITLE\" --msgbox \"$MSG_DETAIL\" 7 52\n}\n\nmsg_no_device() {\n  # show a warning dialog if we dont find not mounted devices for install and return to main menu\n  MSG_TITLE=\"WARNING\"\n  MSG_INFOBOX=\" No devices were found. \"\n\n  whiptail --backtitle \"$BACKTITLE\" --title \"$MSG_TITLE\" --msgbox \"$MSG_INFOBOX\" 9 73\n}\n\nmsg_progress_install() {\n  # update the whiptail gauge window\n\n  dbglg \"$2\"\n  sleep .3\n  echo XXX\n  echo $1\n  echo \"$2 ...\"\n  echo XXX\n}\n\nprompt_gpt() {\n  GPT=\"0\"\n  UEFI=\"0\"\n  # Get size in GB.\n  # 2^41 bytes is the DOS limit (2199023255552 bytes, 2.2TB). Use GUID Partition Table.>= 2200GB\n  INSTALL_DEVICE_SIZE=$(($(cat /sys/block/${INSTALL_DEVICE#/dev/}/size)*512/1000/1000/1000))\n  if [ \"$INSTALL_DEVICE_SIZE\" -ge 2200 ] 2>/dev/null; then\n    GPT=\"1\"\n  fi\n  # force gpt + uefi in uefi boot mode\n  if [ -d /sys/firmware/efi ]; then\n    UEFI=\"1\"\n    GPT=\"1\"\n  fi\n}\n\nprompt_backup_unpack() {\n  # Prompt for unpacking backup files to /storage\n  # usage:    prompt_backup_unpack\n  # uses:\n  # provides: BACKUP_UNPACK\n  BACKUP_UNPACK=\"0\"\n  if [ -f /flash/backup.tar.bz2 -o -f /flash/backup.zip ]; then\n    MSG_TITLE=\"Restore backup files\"\n    MSG_DETAIL=\"Restore backup files to storage partition.\\nFile backup.tar.bz2 or/and backup.zip exist on\\ninstallation USB stick.\"\n    DIALOG_OPTIONS=\"--defaultno\"\n    if whiptail --backtitle \"$BACKTITLE\" --title \"$MSG_TITLE\" $DIALOG_OPTIONS --yesno \"$MSG_DETAIL\" 0 0; then\n      BACKUP_UNPACK=\"1\"\n    fi\n  fi\n}\n\nmenu_main() {\n  # show the mainmenu\n  MSG_TITLE=\"MAIN MENU\"\n  MSG_MENU=\"\\nWelcome to @DISTRONAME@ installation tool! \\\n\\n\nThis tool is used to copy @DISTRONAME@ from the installation media \\\nto your disk or other device. You'll be up and running in no time! \\\nPlease note that the contents of the disk you choose will be wiped \\\nout during the installation. \\\n\\n\\nPlease select:\"\n  MSG_CANCEL=\"Close\"\n\n  whiptail --backtitle \"$BACKTITLE\" --cancel-button \"$MSG_CANCEL\" \\\n    --title \"$MSG_TITLE\" --menu \"$MSG_MENU\" 18 73 4 \\\n      1 \"Install @DISTRONAME@\" \\\n      2 \"View installation log\" \\\n      3 \"Save installation log\" \\\n      4 \"Reboot\" 2> $TMPDIR/mainmenu\n\n  case $? in\n    0)\n      ITEM_MAINMENU=$(cat \"$TMPDIR/mainmenu\")\n      case $ITEM_MAINMENU in\n        1) do_install_quick;;\n        2) logfile_show;;\n        3) logfile_save;;\n        4) do_reboot;;\n      esac\n      ;;\n    1)\n      do_reboot\n      ;;\n    255)\n      do_poweroff\n      ;;\n  esac\n}\n\nlogfile_show() {\n  whiptail --textbox \"$LOGFILE\" 20 73 --scrolltext --backtitle \"$BACKTITLE\"\n}\n\nlogfile_save() {\n  mount -o remount,rw /flash\n\n  mkdir -p $(dirname $LOGBACKUP)\n  cp $LOGFILE $LOGBACKUP\n  sync\n\n  mount -o remount,ro /flash\n\n  MSG_TITLE=\"@DISTRONAME@ Log Saved\"\n  MSG_DETAIL=\"Log location: ${LOGBACKUP}\\n\"\n  whiptail --backtitle \"$BACKTITLE\" --title \"$MSG_TITLE\" --msgbox \"$MSG_DETAIL\" 7 52\n}\n\ndo_reboot() {\n  # reboot on request\n  clear\n  sync\n  reboot -f\n}\n\ndo_poweroff() {\n  # powerdown on request\n  clear\n  sync\n  poweroff -f\n}\n\n# setup needed variables\nOS_VERSION=$(lsb_release)\nBACKTITLE=\"@DISTRONAME@ Installer - $OS_VERSION\"\n\nTMPDIR=\"/tmp/installer\"\nLOGFILE=\"$TMPDIR/install.log\"\nLOGBACKUP=\"/flash/logs/$(date +%Y%m%d%H%M%S).log\"\n\nexport COLORTERM=\"1\"\nexport NEWT_COLORS=\"$WHIPTAIL_COLORS\"\n\nIMAGE_KERNEL=\"KERNEL\"\nIMAGE_SYSTEM=\"SYSTEM\"\nfor arg in $(cat /proc/cmdline); do\n  case $arg in\n    BOOT_IMAGE=*)\n      IMAGE_KERNEL=\"${arg#*=}\"\n      [ \"${IMAGE_KERNEL:0:1}\" = \"/\" ] && IMAGE_KERNEL=\"${IMAGE_KERNEL:1}\"\n      ;;\n    SYSTEM_IMAGE=*)\n      IMAGE_SYSTEM=\"${arg#*=}\"\n      [ \"${IMAGE_SYSTEM:0:1}\" = \"/\" ] && IMAGE_SYSTEM=\"${IMAGE_SYSTEM:1}\"\n      ;;\n  esac\ndone\n\n# prepare temporary directory\nrm -rf $TMPDIR\nmkdir -p $TMPDIR\n\n#create log file\necho \"@DISTRONAME@ Installer - $OS_VERSION started at:\" > $LOGFILE\ndate >> $LOGFILE\n\ndbglg \"System status\"\nlog_system_status >> $LOGFILE 2>&1\n\n# generate the en_US.UTF-8 locale to enable line drawing\nmkdir -p $TMPDIR/locale\nlocaledef -i en_US -f UTF-8 $TMPDIR/locale/en_US.UTF-8\nexport LOCPATH=$TMPDIR/locale\nexport LC_ALL=en_US.UTF-8\n\n# main\n\nwhile true; do\n  clear\n  menu_main\ndone\n\n# exit cleanly\nexit 0\n"
  },
  {
    "path": "packages/tools/installer/system.d/installer.service",
    "content": "[Unit]\nDescription=XBMC Media Center\nRequires=installer.target\n\n[Service]\nExecStart=/usr/bin/installer\nType=idle\nStandardInput=tty-force\nStandardOutput=inherit\nStandardError=inherit\nKillMode=process\n\n# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash\n# terminates cleanly.\nKillSignal=SIGHUP\n\n[Install]\nWantedBy=installer.target\n"
  },
  {
    "path": "packages/tools/installer/system.d/installer.target",
    "content": "[Unit]\nDescription=OpenELEC installer\nRequires=basic.target\nAfter=basic.target\nConflicts=rescue.target multi-user.target graphical.target\nAllowIsolate=yes\n"
  },
  {
    "path": "packages/tools/megatools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"megatools\"\nPKG_VERSION=\"1.10.3\"\nPKG_SHA256=\"8dc1ca348633fd49de7eb832b323e8dc295f1c55aefb484d30e6475218558bdb\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://ftp.debian.org/debian/pool/main/m/megatools/megatools_1.10.3.orig.tar.gz\"\nPKG_URL=\"https://xff.cz/megatools/builds/megatools-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain glib openssl curl\"\nPKG_LONGDESC=\"Megatools is a collection of programs for accessing Mega.nz service from a command line of your desktop or server.\"\nPKG_TOOLCHAIN=\"configure\"\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-docs\"\n"
  },
  {
    "path": "packages/tools/mkbootimg/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mkbootimg\"\nPKG_VERSION=\"6668fc24a3130ab003aae9fda95bcd4110617de9\"\nPKG_SHA256=\"d84870e055414d638a3e7eb4b7a3ebf415899841218f24cb3647d06ecf6ddb17\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://android.googlesource.com/platform/system/core/+/master/mkbootimg/\"\nPKG_URL=\"https://github.com/codesnake/mkbootimg/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_LONGDESC=\"mkbootimg: Creates kernel boot images for Android\"\n\nmakeinstall_host() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/include\n  cp mkbootimg ${TOOLCHAIN}/bin/\n}\n"
  },
  {
    "path": "packages/tools/mtools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mtools\"\nPKG_VERSION=\"4.0.42\"\nPKG_SHA256=\"64bfdfde4d82af6b22f3c1c72c3e231cbb618f4c2309cc46f54d16d5502ccf15\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.gnu.org/software/mtools/\"\nPKG_URL=\"http://ftpmirror.gnu.org/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_LONGDESC=\"mtools: A collection of utilities to access MS-DOS disks\"\nPKG_TOOLCHAIN=\"autotools\"\n"
  },
  {
    "path": "packages/tools/mtools/patches/mtools-05-fix-install.patch",
    "content": "removes installing of floppyd, manuals and info\nshould fix occasional mtools installation problems few of us had\n\n--- a/Makefile.in\t2010-10-17 17:41:09.000000000 +0200\n+++ b/Makefile.in\t2016-04-28 11:42:28.015052786 +0200\n@@ -236,8 +236,8 @@\n uninstall-info:\n \tcd $(DESTDIR)$(infodir) && rm -f mtools.info*\n \n-install:\t$(DESTDIR)$(bindir)/mtools @BINFLOPPYD@ install-man install-links \\\n-\t\t$(DESTDIR)$(bindir)/mkmanifest install-scripts install-info\n+install:\t$(DESTDIR)$(bindir)/mtools install-links \\\n+\t\t$(DESTDIR)$(bindir)/mkmanifest install-scripts\n \n uninstall:\tuninstall-bin uninstall-man uninstall-links \\\n \t\tuninstall-scripts\n"
  },
  {
    "path": "packages/tools/nano/config/nanorc",
    "content": "include /usr/share/nano/*.nanorc\n"
  },
  {
    "path": "packages/tools/nano/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"nano\"\nPKG_VERSION=\"7.1\"\nPKG_SHA256=\"57ba751e9b7519f0f6ddee505202e387c75dde440c1f7aa1b9310cc381406836\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.nano-editor.org/\"\nPKG_URL=\"https://www.nano-editor.org/dist/v${PKG_VERSION%%.*}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses\"\nPKG_LONGDESC=\"Nano is an enhanced clone of the Pico text editor.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-utf8 \\\n                           --disable-nls \\\n                           --disable-libmagic \\\n                           --disable-wrapping\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/share/nano\n\n  mkdir -p ${INSTALL}/etc\n  cp -a ${PKG_DIR}/config/* ${INSTALL}/etc/\n\n  mkdir -p ${INSTALL}/usr/share/nano\n  for FILE_TYPES in \\\n    css \\\n    html \\\n    java \\\n    javascript \\\n    json \\\n    php \\\n    python \\\n    sh \\\n    xml\n  do\n    cp -a ${PKG_BUILD}/syntax/${FILE_TYPES}.nanorc ${INSTALL}/usr/share/nano/\n  done\n}\n"
  },
  {
    "path": "packages/tools/nano/profile.d/52-nano.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nexport EDITOR=\"nano\"\n"
  },
  {
    "path": "packages/tools/newt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"newt\"\nPKG_VERSION=\"0.52.23\"\nPKG_SHA256=\"caa372907b14ececfe298f0d512a62f41d33b290610244a58aed07bbc5ada12a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://pagure.io/newt\"\nPKG_URL=\"https://releases.pagure.org/newt/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain slang popt\"\nPKG_LONGDESC=\"Newt is a programming library for color text mode, widget based user interfaces.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-nls \\\n                           --without-python \\\n                           --without-tcl\"\n\npre_configure_target() {\n # newt fails to build in subdirs\n cd ${PKG_BUILD}\n rm -rf .${TARGET_NAME}\n}\n\npre_configure_host() {\n # newt fails to build in subdirs\n cd ${PKG_BUILD}\n rm -rf .${HOST_NAME}\n}\n"
  },
  {
    "path": "packages/tools/plymouth-lite/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"plymouth-lite\"\nPKG_VERSION=\"0.6.0\"\nPKG_SHA256=\"fa7b581bdd38c5751668243ff9d2ebaee7c45753358cbb310fb50cfcd3a8081b\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.meego.com\"\nPKG_URL=\"${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_INIT=\"toolchain gcc:init libpng\"\nPKG_LONGDESC=\"Boot splash screen based on Fedora's Plymouth code\"\n\npre_configure_init() {\n  # plymouth-lite dont support to build in subdirs\n  cd ${PKG_BUILD}\n    rm -rf .${TARGET_NAME}-init\n}\n\nmakeinstall_init() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp ply-image ${INSTALL}/usr/bin\n\n  mkdir -p ${INSTALL}/splash\n    find_file_path splash/splash.conf && cp ${FOUND_PATH} ${INSTALL}/splash\n     if [ \"${DEVICE}\" == \"OdroidGoAdvance\" ]; then\n\t\tfind_file_path \"splash/splash-odroidgoa.png\" && cp ${FOUND_PATH} ${INSTALL}/splash/splash-1080.png\n    else\n\t\tfind_file_path \"splash/splash-*.png\" && cp ${FOUND_PATH} ${INSTALL}/splash\n    fi\n}\n"
  },
  {
    "path": "packages/tools/plymouth-lite/patches/plymouth-lite-0.6.0-01-fix-build.patch",
    "content": "--- plymouth-lite-0.6.0/Makefile~\t2009-07-22 11:22:32.000000000 -0700\n+++ plymouth-lite-0.6.0/Makefile\t2009-07-22 11:22:32.000000000 -0700\n@@ -1,6 +1,6 @@\n \n ply-image: ply-image.c ply-frame-buffer.c Makefile\n-\tgcc -O2 -march=core2 -mtune=generic -lm `pkg-config --cflags libpng12` `pkg-config --libs libpng12` ply-image.c ply-frame-buffer.c -o ply-image\n+\t$(CC) $(CFLAGS) `pkg-config --cflags libpng`  ply-image.c ply-frame-buffer.c -o ply-image  -lm `pkg-config --libs libpng` -lm -lz\n \t\n clean:\n \trm -f ply-image *~ gmon.out\n"
  },
  {
    "path": "packages/tools/plymouth-lite/patches/plymouth-lite-0.6.0-02-libpng_1.4.0.patch",
    "content": "diff -Naur plymouth-lite-0.6.0/ply-image.c plymouth-lite-0.6.0.patch/ply-image.c\n--- plymouth-lite-0.6.0/ply-image.c\t2009-02-19 12:16:36.000000000 +0100\n+++ plymouth-lite-0.6.0.patch/ply-image.c\t2010-02-08 01:30:05.336856616 +0100\n@@ -220,7 +220,7 @@\n     png_set_palette_to_rgb (png);\n \n   if ((color_type == PNG_COLOR_TYPE_GRAY) && (bits_per_pixel < 8))\n-    png_set_gray_1_2_4_to_8 (png);\n+    png_set_expand_gray_1_2_4_to_8 (png);\n \n   if (png_get_valid (png, info, PNG_INFO_tRNS))\n     png_set_tRNS_to_alpha (png);\n"
  },
  {
    "path": "packages/tools/plymouth-lite/patches/plymouth-lite-0.6.0-11-cursor.patch",
    "content": "--- plymouth-lite-0.6.0/ply-image.c~\t2009-03-06 16:20:52.000000000 -0800\n+++ plymouth-lite-0.6.0/ply-image.c\t2009-03-06 16:20:52.000000000 -0800\n@@ -439,7 +439,7 @@\n \n   exit_code = 0;\n \n-//  hide_cursor ();\n+  hide_cursor ();\n \n   if (argc == 1)\n     image = ply_image_new (\"/usr/share/plymouth/splash.png\");\n"
  },
  {
    "path": "packages/tools/plymouth-lite/patches/plymouth-lite-0.6.0-12-resize.patch",
    "content": "diff -urN plymouth-lite-0.6.0/ply-frame-buffer.c plymouth-lite-0.6.0.change/ply-frame-buffer.c\n--- plymouth-lite-0.6.0/ply-frame-buffer.c\t2009-02-19 19:14:24.000000000 +0800\n+++ plymouth-lite-0.6.0.change/ply-frame-buffer.c\t2009-06-13 17:44:05.000000000 +0800\n@@ -47,41 +47,6 @@\n #define PLY_FRAME_BUFFER_DEFAULT_FB_DEVICE_NAME \"/dev/fb0\"\n #endif\n \n-struct _ply_frame_buffer\n-{\n-  char *device_name;\n-  int   device_fd;\n-\n-  char *map_address;\n-  size_t size;\n-\n-  uint32_t *shadow_buffer;\n-\n-  uint32_t red_bit_position;\n-  uint32_t green_bit_position;\n-  uint32_t blue_bit_position;\n-  uint32_t alpha_bit_position;\n-\n-  uint32_t bits_for_red;\n-  uint32_t bits_for_green;\n-  uint32_t bits_for_blue;\n-  uint32_t bits_for_alpha;\n-\n-  int32_t dither_red;\n-  int32_t dither_green;\n-  int32_t dither_blue;\n-\n-  unsigned int bytes_per_pixel;\n-  unsigned int row_stride;\n-\n-  ply_frame_buffer_area_t area;\n-  ply_frame_buffer_area_t area_to_flush;\n-\n-  void (*flush)(ply_frame_buffer_t *buffer);\n-\n-  int pause_count;\n-};\n-\n static bool ply_frame_buffer_open_device (ply_frame_buffer_t  *buffer);\n static void ply_frame_buffer_close_device (ply_frame_buffer_t *buffer);\n static bool ply_frame_buffer_query_device (ply_frame_buffer_t *buffer);\ndiff -urN plymouth-lite-0.6.0/ply-frame-buffer.h plymouth-lite-0.6.0.change/ply-frame-buffer.h\n--- plymouth-lite-0.6.0/ply-frame-buffer.h\t2009-02-19 17:35:54.000000000 +0800\n+++ plymouth-lite-0.6.0.change/ply-frame-buffer.h\t2009-06-13 17:31:42.000000000 +0800\n@@ -38,6 +38,41 @@\n   unsigned long height;\n };\n \n+struct _ply_frame_buffer\n+{\n+  char *device_name;\n+  int   device_fd;\n+\n+  char *map_address;\n+  size_t size;\n+\n+  uint32_t *shadow_buffer;\n+\n+  uint32_t red_bit_position;\n+  uint32_t green_bit_position;\n+  uint32_t blue_bit_position;\n+  uint32_t alpha_bit_position;\n+\n+  uint32_t bits_for_red;\n+  uint32_t bits_for_green;\n+  uint32_t bits_for_blue;\n+  uint32_t bits_for_alpha;\n+\n+  int32_t dither_red;\n+  int32_t dither_green;\n+  int32_t dither_blue;\n+\n+  unsigned int bytes_per_pixel;\n+  unsigned int row_stride;\n+\n+  ply_frame_buffer_area_t area;\n+  ply_frame_buffer_area_t area_to_flush;\n+\n+  void (*flush)(ply_frame_buffer_t *buffer);\n+\n+  int pause_count;\n+};\n+\n #define PLY_FRAME_BUFFER_COLOR_TO_PIXEL_VALUE(r,g,b,a)                        \\\n     (((uint8_t) (CLAMP (a * 255.0, 0.0, 255.0)) << 24)                        \\\n       | ((uint8_t) (CLAMP (r * 255.0, 0.0, 255.0)) << 16)                     \\\ndiff -urN plymouth-lite-0.6.0/ply-image.c plymouth-lite-0.6.0.change/ply-image.c\n--- plymouth-lite-0.6.0/ply-image.c\t2009-02-19 19:16:36.000000000 +0800\n+++ plymouth-lite-0.6.0.change/ply-image.c\t2009-06-13 17:42:52.000000000 +0800\n@@ -43,6 +43,7 @@\n #include <png.h>\n \n #include <linux/fb.h>\n+#include \"ply-frame-buffer.h\"\n \n #define MIN(a,b) ((a) <= (b)? (a) : (b))\n #define MAX(a,b) ((a) >= (b)? (a) : (b))\n@@ -464,6 +465,8 @@\n       return exit_code;\n     }\n \n+  image = ply_image_resize(image, buffer->area.width, buffer->area.height);\n+\n   animate_at_time (buffer, image);\n \n   ply_frame_buffer_close (buffer);\n"
  },
  {
    "path": "packages/tools/plymouth-lite/patches/plymouth-lite-0.6.0-21-16bpp.patch",
    "content": "--- plymouth-lite-0.6.0/ply-frame-buffer.c\t2015-07-02 01:04:37.625076373 +0100\n+++ plymouth-lite-0.6.0.patch/ply-frame-buffer.c\t2015-07-02 01:04:42.973076293 +0100\n@@ -184,6 +184,58 @@\n     }\n }\n \n+static void\n+flush_xbgr32 (ply_frame_buffer_t *buffer)\n+{\n+  unsigned long x1, y1, x2, y2, x, y;\n+  char *dst, *src;\n+\n+  x1 = buffer->area_to_flush.x;\n+  y1 = buffer->area_to_flush.y;\n+  x2 = x1 + buffer->area_to_flush.width;\n+  y2 = y1 + buffer->area_to_flush.height;\n+\n+  for (y = y1; y < y2; y++)\n+    {\n+     dst = &buffer->map_address[(y * buffer->row_stride + x1) * 4];\n+     src = (char *) &buffer->shadow_buffer[y * buffer->area.width + x1];\n+\n+     for (x = x1; x < x2; x++)\n+       {\n+         dst[0] = src[2];\n+         dst[1] = src[1];\n+         dst[2] = src[0];\n+         dst[3] = src[3];\n+         dst += 4;\n+         src += 4;\n+       }\n+    }\n+}\n+\n+static void\n+flush_rgb16 (ply_frame_buffer_t *buffer)\n+{\n+  unsigned long x1, y1, x2, y2, x, y;\n+  unsigned short *dst; unsigned char *src;\n+\n+  x1 = buffer->area_to_flush.x;\n+  y1 = buffer->area_to_flush.y;\n+  x2 = x1 + buffer->area_to_flush.width;\n+  y2 = y1 + buffer->area_to_flush.height;\n+\n+  for (y = y1; y < y2; y++)\n+    {\n+     dst = (unsigned short *)&buffer->map_address[(y * buffer->row_stride + x1) * 2];\n+     src = (unsigned char *) &buffer->shadow_buffer[y * buffer->area.width + x1];\n+\n+     for (x = x1; x < x2; x++)\n+       {\n+         *dst++ = (src[0]>>3) << 0 | (src[1]>>2) << 5 | (src[2]>>3) << 11;\n+         src += 4;\n+       }\n+    }\n+}\n+\n static const char const *p_visual(int visual)\n {\n   static const char const *visuals[] =\n@@ -300,6 +352,16 @@\n       buffer->green_bit_position == 8 && buffer->bits_for_green == 8 &&\n       buffer->blue_bit_position == 0 && buffer->bits_for_blue == 8)\n     buffer->flush = flush_xrgb32;\n+  else if (buffer->bytes_per_pixel == 4 &&\n+           buffer->red_bit_position == 0 && buffer->bits_for_red == 8 &&\n+           buffer->green_bit_position == 8 && buffer->bits_for_green == 8 &&\n+           buffer->blue_bit_position == 16 && buffer->bits_for_blue == 8)\n+    buffer->flush = flush_xbgr32;\n+  else if (buffer->bytes_per_pixel == 2 &&\n+           buffer->red_bit_position == 11 && buffer->bits_for_red == 5 &&\n+           buffer->green_bit_position == 5 && buffer->bits_for_green == 6 &&\n+           buffer->blue_bit_position == 0 && buffer->bits_for_blue == 5)\n+    buffer->flush = flush_rgb16;\n   else\n     buffer->flush = flush_generic;\n \n"
  },
  {
    "path": "packages/tools/plymouth-lite/patches/plymouth-lite-0.6.0-22-link-static.patch",
    "content": "diff --git a/Makefile b/Makefile\nindex 6ab27ef..17d12a0 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1,6 +1,6 @@\n \n ply-image: ply-image.c ply-frame-buffer.c Makefile\n-\t$(CC) $(CFLAGS) `pkg-config --cflags libpng`  ply-image.c ply-frame-buffer.c -o ply-image  -lm `pkg-config --libs libpng` -lm -lz\n+\t$(CC) $(CFLAGS) -Wl,-Bstatic `pkg-config --cflags libpng`  ply-image.c ply-frame-buffer.c -o ply-image `pkg-config --libs libpng` -lz -Wl,-Bdynamic -lc -lm $(LDFLAGS)\n \t\n clean:\n \trm -f ply-image *~ gmon.out\n@@ -11,4 +11,3 @@ install: ply-image\n \tcp ply-image $(DESTDIR)/usr/bin\n \tcp splash.png $(DESTDIR)/usr/share/plymouth/splash.png\n \t\n-\t\n\\ No newline at end of file\n"
  },
  {
    "path": "packages/tools/populatefs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"populatefs\"\nPKG_VERSION=\"1.0\"\nPKG_SHA256=\"e5845404188b5da3afb11229ecb38646cc1562b61400035774dbc237c3b706d2\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/lipnitsk/populatefs\"\nPKG_URL=\"https://github.com/lipnitsk/${PKG_NAME}/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"e2fsprogs:host\"\nPKG_LONGDESC=\"populatefs: Tool for replacing genext2fs when creating ext4 images\"\nPKG_BUILD_FLAGS=\"+pic:host\"\n\nmake_host() {\n  make EXTRA_LIBS=\"-lcom_err -lpthread\"\n}\n\nmakeinstall_host() {\n  ${STRIP} src/populatefs\n\n  mkdir -p ${TOOLCHAIN}/sbin\n  cp src/populatefs ${TOOLCHAIN}/sbin\n}\n"
  },
  {
    "path": "packages/tools/populatefs/patches/fix-compilation-issue.patch",
    "content": "diff -Nur a/src/mod_path.c b/src/mod_path.c\n--- a/src/mod_path.c\t2016-02-24 04:15:10.000000000 +0100\n+++ b/src/mod_path.c\t2018-08-22 16:58:11.884462070 +0200\n@@ -1,6 +1,7 @@\n #include <stdio.h>\n #include <stdlib.h>\n #include <string.h>\n+#include <sys/sysmacros.h>\n #include <sys/types.h>\n #include <sys/stat.h>\n #include <unistd.h>\n"
  },
  {
    "path": "packages/tools/procps-ng/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"procps-ng\"\nPKG_VERSION=\"3.3.17\"\nPKG_SHA256=\"8374d281f91e5fc9bb9ea8dc991b25331e3a2b0299b46f22c633f7fb6bcb0764\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://gitlab.com/procps-ng/procps\"\nPKG_URL=\"https://gitlab.com/procps-ng/procps/-/archive/v${PKG_VERSION}/procps-v${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses\"\nPKG_LONGDESC=\"Command line and full screen utilities for browsing procfs.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_func_malloc_0_nonnull=yes \\\n                           ac_cv_func_realloc_0_nonnull=yes \\\n                           --disable-shared \\\n                           --disable-modern-top \\\n                           --enable-static\"\n\nPKG_MAKE_OPTS_TARGET=\"free top/top proc/libprocps.la proc/libprocps.pc\"\n\nPKG_MAKEINSTALL_OPTS_TARGET=\"install-libLTLIBRARIES install-pkgconfigDATA install-proc_libprocps_la_includeHEADERS\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/free ${INSTALL}/usr/bin\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/top/top ${INSTALL}/usr/bin\n\n  make DESTDIR=${SYSROOT_PREFIX} -j1 ${PKG_MAKEINSTALL_OPTS_TARGET}\n}\n"
  },
  {
    "path": "packages/tools/qemu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"qemu\"\nPKG_VERSION=\"7.2.0\"\nPKG_SHA256=\"5b49ce2687744dad494ae90a898c52204a3406e84d072482a1e1be854eeb2157\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.qemu.org\"\nPKG_URL=\"https://download.qemu.org/qemu-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"toolchain:host glib:host pixman:host Python3:host zlib:host\"\nPKG_LONGDESC=\"QEMU is a generic and open source machine emulator and virtualizer.\"\nPKG_TOOLCHAIN=\"configure\"\n\npre_configure_host() {\n  HOST_CONFIGURE_OPTS=\"\\\n    --bindir=${TOOLCHAIN}/bin \\\n    --extra-cflags=-I${TOOLCHAIN}/include \\\n    --extra-ldflags=-L${TOOLCHAIN}/lib \\\n    --libexecdir=${TOOLCHAIN}/lib \\\n    --localstatedir=${TOOLCHAIN}/var \\\n    --prefix=${TOOLCHAIN} \\\n    --sbindir=${TOOLCHAIN}/sbin \\\n    --sysconfdir=${TOOLCHAIN}/etc \\\n    --enable-tools \\\n    --enable-malloc=system \\\n    --disable-attr \\\n    --disable-auth-pam \\\n    --disable-blobs \\\n    --disable-capstone \\\n    --disable-curl \\\n    --disable-debug-info \\\n    --disable-debug-mutex \\\n    --disable-debug-tcg \\\n    --disable-docs \\\n    --disable-gcrypt \\\n    --disable-gnutls \\\n    --disable-system \\\n    --disable-vnc \\\n    --disable-werror \\\n    --disable-xkbcommon \\\n    --disable-zstd \\\n    --target-list=$TARGET_ARCH-linux-user\"\n}\n\nmakeinstall_host() {\n  mkdir -p $TOOLCHAIN/bin\n    cp ${PKG_BUILD}/.${HOST_NAME}/qemu-img ${TOOLCHAIN}/bin\n    cp ${PKG_BUILD}/.${HOST_NAME}/qemu-${TARGET_ARCH} ${TOOLCHAIN}/bin\n}\n"
  },
  {
    "path": "packages/tools/rkbin/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rkbin\"\nif [ \"$DEVICE\" == \"OdroidGoAdvance\" ] || [ \"$DEVICE\" == \"GameForce\" ]; then\nPKG_VERSION=\"5e54e6c0bbc0141985aca17adcebf3692cdc7f78\"\nPKG_SHA256=\"39289966b39c7bd5b2e5031d12f071e1aa80b80dc83c74b8658b3c119b6d5fd5\"\nelse\nPKG_VERSION=\"b0c100f1a260d807df450019774993c761beb79d\"\nPKG_SHA256=\"c6ebf8ab556e071e3b067540e95aecff650143f0c97e129cd40c837a4f11a881\"\nfi\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"https://github.com/rockchip-linux/rkbin\"\nPKG_URL=\"https://github.com/rockchip-linux/rkbin/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"rkbin: Rockchip Firmware and Tool Binaries\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "packages/tools/rpi-eeprom/config/rpi-eeprom-update",
    "content": "# Use direct path to firmware as update script doesn't dereference sym links.\nFIRMWARE_ROOT=\"/usr/lib/kernel-overlays/base/lib/firmware/raspberrypi/bootloader\"\nFIRMWARE_BACKUP_DIR=\"/storage/.config/rpifw-backup\"\nBOOTFS=${BOOTFS:-/flash}\n"
  },
  {
    "path": "packages/tools/rpi-eeprom/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rpi-eeprom\"\nPKG_VERSION=\"8855da988935f0c09ed4cc772103d4c5408a1afb\"\nPKG_SHA256=\"8e41bd0b9d01526a38882a6a73fe78a5460a5dfa5d89ba98f9ed61ab14bdad1d\"\nPKG_LICENSE=\"BSD-3/custom\"\nPKG_SITE=\"https://github.com/raspberrypi/rpi-eeprom\"\nPKG_URL=\"https://github.com/raspberrypi/rpi-eeprom/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"pciutils\"\nPKG_LONGDESC=\"rpi-eeprom: firmware, config and scripts to update RPi4 SPI bootloader\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  \n  if [ \"${DEVICE}\" = \"RPi4\" ]; then\n    _variant=\"2711\"\n  else\n    _variant=\"2712\"\n  fi\n\n  DESTDIR=${INSTALL}/$(get_kernel_overlay_dir)/lib/firmware/raspberrypi/bootloader-${_variant}\n\n  mkdir -p ${DESTDIR}\n    _dirs=\"default latest\"\n\n    for _maindir in ${_dirs}; do\n      for _dir in ${PKG_BUILD}/firmware-${_variant}/${_maindir} ${PKG_BUILD}/firmware-${_variant}/${_maindir}-*; do\n        [ -d \"${_dir}\" ] || continue\n\n        _basedir=\"$(basename \"${_dir}\")\"\n\n        mkdir -p ${DESTDIR}/${_basedir}\n          cp -PRv ${_dir}/recovery.bin ${DESTDIR}/${_basedir}\n\n          # Bootloader SPI\n          PKG_FW_FILE=\"$(ls -1 /${_dir}/pieeprom-* 2>/dev/null | tail -1)\"\n          [ -n \"${PKG_FW_FILE}\" ] && cp -PRv \"${PKG_FW_FILE}\" ${DESTDIR}/${_basedir}\n\n          if [ \"${DEVICE}\" = \"RPi4\" ]; then\n            # VIA USB3\n            PKG_FW_FILE=\"$(ls -1 ${_dir}/vl805-*.bin 2>/dev/null | tail -1)\"\n            [ -n \"${PKG_FW_FILE}\" ] && cp -PRv \"${PKG_FW_FILE}\" ${DESTDIR}/${_basedir}\n          fi\n      done\n    done\n\n    # also create legacy naming symlinks\n    ln -s default ${DESTDIR}/critical\n    ln -s latest ${DESTDIR}/stable\n\n  mkdir -p ${INSTALL}/usr/bin\n    cp -PRv ${PKG_DIR}/source/rpi-eeprom-update ${INSTALL}/usr/bin\n    cp -PRv ${PKG_BUILD}/rpi-eeprom-update ${INSTALL}/usr/bin/.rpi-eeprom-update.real\n    cp -PRv ${PKG_BUILD}/rpi-eeprom-config ${INSTALL}/usr/bin\n    cp -PRv ${PKG_BUILD}/rpi-eeprom-digest ${INSTALL}/usr/bin\n\n  mkdir -p ${INSTALL}/etc/default\n    cp -PRv ${PKG_DIR}/config/* ${INSTALL}/etc/default\n}\n"
  },
  {
    "path": "packages/tools/rpi-eeprom/source/rpi-eeprom-update",
    "content": "#!/bin/sh\n\n# If read-only then mount writeable, and restore read-only on exit\n# This means we don't restore read-only if /flash is already writeable\nif [ -n \"$(grep \" /flash \" /proc/mounts | grep \"[[:space:]]ro[[:space:],]\")\" ]; then\n  trap \"mount -o remount,ro /flash\" EXIT\n  mount -o remount,rw /flash\nfi\n\nsh /usr/bin/.rpi-eeprom-update.real $@\n"
  },
  {
    "path": "packages/tools/splash-image/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020 present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"splash-image\"\nPKG_VERSION=\"82aaea90d1845e0988371791b5e568b8122ca294\"\nPKG_SHA256=\"febccc1e6b6a7d5b79ca7e283a1c09ed965001373ce6956e7d3057aca4c92a65\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"https://github.com/CoreELEC/splash-image/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_INIT=\"toolchain gcc:init glibc libspng zlib\"\nPKG_LONGDESC=\"Boot splash screen supporting animation by single RGBA png files\"\n\nmakeinstall_init() {\n  mkdir -p $INSTALL/usr/bin\n    cp splash-image $INSTALL/usr/bin\n\n  mkdir -p $INSTALL/splash/progress\n    find_file_path \"splash/${DEVICE}/splash-*.png\" && cp ${FOUND_PATH} $INSTALL/splash || :\n    find_file_path \"splash/${DEVICE}/progress/splash-*\" && cp ${FOUND_PATH} $INSTALL/splash/progress || :\n}\n"
  },
  {
    "path": "packages/tools/syslinux/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"syslinux\"\nPKG_VERSION=\"6.03\"\nPKG_SHA256=\"26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://syslinux.zytor.com/\"\nPKG_URL=\"http://www.kernel.org/pub/linux/utils/boot/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"util-linux:host\"\nPKG_DEPENDS_TARGET=\"toolchain util-linux e2fsprogs syslinux:host\"\nPKG_LONGDESC=\"The SYSLINUX project covers lightweight linux bootloaders.\"\n\npre_configure_target() {\n  PKG_MAKE_OPTS_TARGET=\"CC=${CC} AR=${AR} RANLIB=${RANLIB} installer\"\n\n# Unset all compiler FLAGS\n  unset CFLAGS\n  unset CPPFLAGS\n  unset CXXFLAGS\n  unset LDFLAGS\n}\n\npre_build_target() {\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n  cp -RP ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}\n}\n\npre_build_host() {\n  mkdir -p ${PKG_BUILD}/.${HOST_NAME}\n  cp -RP ${PKG_BUILD}/* ${PKG_BUILD}/.${HOST_NAME}\n}\n\npre_make_target() {\n  cd .${TARGET_NAME}\n}\n\npre_make_host() {\n  cd .${HOST_NAME}\n}\n\nmake_host() {\n  make CC=${CC} \\\n       AR=${AR} \\\n       RANLIB=${RANLIB} \\\n       CFLAGS=\"-I${TOOLCHAIN}/include -I${PKG_BUILD}/libinstaller -I${PKG_BUILD}/libfat -I${PKG_BUILD}/bios -I${PKG_BUILD}/utils -fomit-frame-pointer -D_FILE_OFFSET_BITS=64\" \\\n       LDFLAGS=\"-L${TOOLCHAIN}/lib\" \\\n       installer\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp bios/linux/syslinux ${TOOLCHAIN}/bin\n    cp bios/mtools/syslinux ${TOOLCHAIN}/bin/syslinux.mtools\n\n  mkdir -p ${TOOLCHAIN}/share/syslinux\n    cp bios/mbr/mbr.bin ${TOOLCHAIN}/share/syslinux\n    cp bios/mbr/gptmbr.bin ${TOOLCHAIN}/share/syslinux\n    cp efi64/efi/syslinux.efi ${TOOLCHAIN}/share/syslinux/bootx64.efi\n    cp efi64/com32/elflink/ldlinux/ldlinux.e64  ${TOOLCHAIN}/share/syslinux\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp bios/linux/syslinux ${INSTALL}/usr/bin\n\n  ${STRIP} ${INSTALL}/usr/bin/syslinux\n\n  mkdir -p ${INSTALL}/usr/share/syslinux\n    cp bios/mbr/mbr.bin ${INSTALL}/usr/share/syslinux\n    cp bios/mbr/gptmbr.bin ${INSTALL}/usr/share/syslinux\n    cp efi64/efi/syslinux.efi ${INSTALL}/usr/share/syslinux/bootx64.efi\n    cp efi64/com32/elflink/ldlinux/ldlinux.e64  ${INSTALL}/usr/share/syslinux\n}\n"
  },
  {
    "path": "packages/tools/syslinux/patches/syslinux-0001-fix-build-with-glibc_2.28.patch",
    "content": "From 1a74985b2a404639b08882c57f3147229605dfd5 Mon Sep 17 00:00:00 2001\nFrom: Mike Frysinger <vapier@gentoo.org>\nDate: Tue, 19 Apr 2016 06:50:31 -0400\nSubject: [PATCH] extlinux: pull in sys/sysmacros.h for major/minor/makedev\n\nThese functions are defined in sys/sysmacros.h, so add the include to\nmain.c.  This is already handled correctly in mountinfo.c.  Otherwise\nwe get build failures like:\n\nmain.o: In function 'find_device_sysfs':\nextlinux/main.c:1131: undefined reference to 'minor'\n\nSigned-off-by: Mike Frysinger <vapier@gentoo.org>\nSigned-off-by: Gene Cumm <gene.cumm@gmail.com>\n---\n extlinux/main.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/extlinux/main.c b/extlinux/main.c\nindex a7ebd49..ebff7ea 100644\n--- a/extlinux/main.c\n+++ b/extlinux/main.c\n@@ -38,6 +38,7 @@\n #include <sysexits.h>\n #include <sys/ioctl.h>\n #include <sys/stat.h>\n+#include <sys/sysmacros.h>\n #include <sys/types.h>\n #include <sys/mount.h>\n #include <sys/vfs.h>\n-- \n2.10.5.GIT\n\n"
  },
  {
    "path": "packages/tools/syslinux/patches/syslinux-0002-fix-build-with-glibc_2.36.patch",
    "content": "--- a/libinstaller/linuxioctl.h\t2022-07-17 12:45:43.459729359 +0000\n+++ b/libinstaller/linuxioctl.h\t2022-07-17 12:58:50.204815753 +0000\n@@ -16,7 +16,13 @@\n #include <linux/fd.h>\t\t/* Floppy geometry */\n #include <linux/hdreg.h>\t/* Hard disk geometry */\n \n-#include <linux/fs.h>\t\t/* FIGETBSZ, FIBMAP, FS_IOC_* */\n+#define FIBMAP\t   _IO(0x00,1)\t/* bmap access */\n+#define FIGETBSZ   _IO(0x00,2)\t/* get the block size used for bmap */\n+\n+#define\tFS_IOC_GETFLAGS\t\t\t_IOR('f', 1, long)\n+#define\tFS_IOC_SETFLAGS\t\t\t_IOW('f', 2, long)\n+\n+#define FS_IMMUTABLE_FL\t\t\t0x00000010 /* Immutable file */\n \n #undef SECTOR_SIZE\t\t/* Defined in msdos_fs.h for no good reason */\n #undef SECTOR_BITS\n"
  },
  {
    "path": "packages/tools/texturecache.py/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"texturecache.py\"\nPKG_VERSION=\"2.5.4\"\nPKG_SHA256=\"0717c2e62dc3f809e8754be2c83d2c7d0f92188741eb425d5377c1d326d25276\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/MilhouseVH/texturecache.py\"\nPKG_URL=\"https://github.com/MilhouseVH/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"The Swiss Army knife for Kodi\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp -PRv texturecache.py ${INSTALL}/usr/bin\n    cp -PRv tools/mklocal.py ${INSTALL}/usr/bin\n    chmod +x ${INSTALL}/usr/bin/*\n}\n"
  },
  {
    "path": "packages/tools/u-boot/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"u-boot\"\nPKG_VERSION=\"2022.10\"\nPKG_SHA256=\"50b4482a505bc281ba8470c399a3c26e145e29b23500bc35c50debd7fa46bdf8\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://ftp.denx.de/pub/u-boot/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain openssl:host pkg-config:host Python3:host swig:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\n\nPKG_STAMP=\"${UBOOT_SYSTEM} ${UBOOT_TARGET}\"\n\n[ -n \"${KERNEL_TOOLCHAIN}\" ] && PKG_DEPENDS_TARGET+=\" gcc-${KERNEL_TOOLCHAIN}:host\"\n\nif [ -n \"${UBOOT_FIRMWARE}\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${UBOOT_FIRMWARE}\"\n  PKG_DEPENDS_UNPACK+=\" ${UBOOT_FIRMWARE}\"\nfi\n\nPKG_NEED_UNPACK=\"${PROJECT_DIR}/${PROJECT}/bootloader\"\n[ -n \"${DEVICE}\" ] && PKG_NEED_UNPACK+=\" ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/bootloader\"\n\npost_patch() {\n  if [ -n \"${UBOOT_SYSTEM}\" ] && find_file_path bootloader/config; then\n    PKG_CONFIG_FILE=\"${PKG_BUILD}/configs/$(${ROOT}/${SCRIPTS}/uboot_helper ${PROJECT} ${DEVICE} ${UBOOT_SYSTEM} config)\"\n    if [ -f \"${PKG_CONFIG_FILE}\" ]; then\n      cat ${FOUND_PATH} >> \"${PKG_CONFIG_FILE}\"\n    fi\n  fi\n}\n\nmake_target() {\n  # U-Boot needs host openssl for tools - make sure it finds right one\n  # setup_pkg_config_host is required\n  setup_pkg_config_host\n  if [ -z \"${UBOOT_SYSTEM}\" ]; then\n    echo \"UBOOT_SYSTEM must be set to build an image\"\n    echo \"see './scripts/uboot_helper' for more information\"\n  else\n    [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n    DEBUG=${PKG_DEBUG} CROSS_COMPILE=\"${TARGET_KERNEL_PREFIX}\" LDFLAGS=\"\" ARCH=arm make mrproper\n    [ -n \"${UBOOT_FIRMWARE}\" ] && find_file_path bootloader/firmware && . ${FOUND_PATH}\n    DEBUG=${PKG_DEBUG} CROSS_COMPILE=\"${TARGET_KERNEL_PREFIX}\" LDFLAGS=\"\" ARCH=arm make HOSTCC=\"${HOST_CC}\" HOSTCFLAGS=\"-I${TOOLCHAIN}/include\" HOSTLDFLAGS=\"${HOST_LDFLAGS}\" $(${ROOT}/${SCRIPTS}/uboot_helper ${PROJECT} ${DEVICE} ${UBOOT_SYSTEM} config)\n    DEBUG=${PKG_DEBUG} CROSS_COMPILE=\"${TARGET_KERNEL_PREFIX}\" LDFLAGS=\"\" ARCH=arm _python_sysroot=\"${TOOLCHAIN}\" _python_prefix=/ _python_exec_prefix=/ make ${UBOOT_TARGET} HOSTCC=\"${HOST_CC}\" HOSTCFLAGS=\"-I${TOOLCHAIN}/include\" HOSTLDFLAGS=\"${HOST_LDFLAGS}\" HOSTSTRIP=\"true\" CONFIG_MKIMAGE_DTC_PATH=\"scripts/dtc/dtc\"\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/bootloader\n\n    # Only install u-boot.img et al when building a board specific image\n    if [ -n \"${UBOOT_SYSTEM}\" ]; then\n      find_file_path bootloader/install && . ${FOUND_PATH}\n    fi\n\n    # Always install the update script\n    find_file_path bootloader/update.sh && cp -av ${FOUND_PATH} ${INSTALL}/usr/share/bootloader\n\n    # Always install the canupdate script\n    if find_file_path bootloader/canupdate.sh; then\n      cp -av ${FOUND_PATH} ${INSTALL}/usr/share/bootloader\n      sed -e \"s/@PROJECT@/${DEVICE:-${PROJECT}}/g\" \\\n          -i ${INSTALL}/usr/share/bootloader/canupdate.sh\n    fi\n}\n"
  },
  {
    "path": "packages/tools/u-boot-script/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"u-boot-script\"\nPKG_VERSION=\"1.0\"\nPKG_LICENSE=\"GPL\"\nPKG_DEPENDS_TARGET=\"u-boot-tools:host\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_LONGDESC=\"Compile scripts for u-boot environment.\"\n\nPKG_NEED_UNPACK=\"${PROJECT_DIR}/${PROJECT}/bootloader\"\n[ -n \"${DEVICE}\" ] && PKG_NEED_UNPACK+=\" ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/bootloader\"\n\nmake_target() {\n  if find_dir_path bootloader/scripts; then\n    for src in ${FOUND_PATH}/*.src; do\n      mkimage -A ${TARGET_KERNEL_ARCH} -O linux -T script -C none -d \"${src}\" \"$(basename ${src} .src)\"\n    done\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/bootloader\n    cp -a ${PKG_BUILD}/* ${INSTALL}/usr/share/bootloader/\n}\n"
  },
  {
    "path": "packages/tools/u-boot-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"u-boot-tools\"\nPKG_VERSION=\"$(get_pkg_version u-boot)\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"\"\nPKG_DEPENDS_HOST=\"ccache:host bison:host flex:host openssl:host pkg-config:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_DEPENDS_UNPACK+=\" u-boot\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/u-boot/u-boot-${PKG_VERSION}.tar.gz -C ${PKG_BUILD}\n}\n\nmake_host() {\n  make qemu-x86_64_defconfig HOSTCC=\"${HOST_CC}\" HOSTCFLAGS=\"-I${TOOLCHAIN}/include\" HOSTLDFLAGS=\"${HOST_LDFLAGS}\"\n  make tools-only HOSTCC=\"${HOST_CC}\" HOSTCFLAGS=\"-I${TOOLCHAIN}/include\" HOSTLDFLAGS=\"${HOST_LDFLAGS}\"\n}\n\nmake_target() {\n  : # host-only package\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp tools/mkimage ${TOOLCHAIN}/bin\n}\n"
  },
  {
    "path": "packages/virtual/alsa/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"alsa\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.alsa-project.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain alsa-lib alsa-utils alsa-topology-conf alsa-ucm-conf\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"Matapackage to install all alsa components.\"\n"
  },
  {
    "path": "packages/virtual/autotools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"autotools\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.openelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_HOST=\"ccache:host autoconf:host automake:host intltool:host libtool:host autoconf-archive:host\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"autotools: Metapackage\"\n"
  },
  {
    "path": "packages/virtual/corefonts/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"corefonts\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.openelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"corefonts is a Metapackage for installing fonts\"\n\nif [ -n \"${CUSTOM_FONTS}\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${CUSTOM_FONTS}\"\nelse\n  PKG_DEPENDS_TARGET+=\" liberation-fonts-ttf\"\nfi\n"
  },
  {
    "path": "packages/virtual/debug/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"debug\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.openelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain gdb edid-decode memtester strace\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"debug is a Metapackage for installing debugging tools\"\n\n# configure GPU drivers and dependencies:\n  get_graphicdrivers\n\nif [ \"${VDPAU_SUPPORT}\" = \"yes\" -a \"${DISPLAYSERVER}\" = \"x11\" ]; then\n  PKG_DEPENDS_TARGET+=\" vdpauinfo\"\nfi\n\nif [ \"${VAAPI_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" libva-utils\"\nfi\n\nif [ \"${VALGRIND}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" valgrind\"\nfi\n\nif [ \"${REMOTE_GDB}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" gdb:host\"\nfi\n"
  },
  {
    "path": "packages/virtual/image/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"image\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_DEPENDS_TARGET=\"toolchain squashfs-tools:host dosfstools:host fakeroot:host kmod:host mtools:host populatefs:host libc gcc linux linux-drivers linux-firmware ${BOOTLOADER} busybox util-linux corefonts network misc-packages debug exfatprogs\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"Root package used to build and create complete image\"\n\n# Bash is default shell\nPKG_DEPENDS_TARGET+=\" bash\"\n\n# Graphic support\n[ ! \"${DISPLAYSERVER}\" = \"no\" ] && PKG_DEPENDS_TARGET+=\" ${DISPLAYSERVER}\"\n\n# Multimedia support\n[ ! \"${MEDIACENTER}\" = \"no\" ] && PKG_DEPENDS_TARGET+=\" mediacenter\"\n\n# Sound support\n[ \"${ALSA_SUPPORT}\" = \"yes\" ] && PKG_DEPENDS_TARGET+=\" alsa\"\n\n[ \"${PULSEAUDIO_SUPPORT}\" = \"yes\" ] && PKG_DEPENDS_TARGET+=\" pulseaudio\"\n\n[ \"${PIPEWIRE_SUPPORT}\" = \"yes\" ] && PKG_DEPENDS_TARGET+=\" pipewire wireplumber\"\n\nif [ \"${PULSEAUDIO_SUPPORT}\" = \"yes\" -a \"${PIPEWIRE_SUPPORT}\" = \"yes\" ]; then\n  die \"PULSEAUDIO_SUPPORT and PIPEWIRE_SUPPORT cannot be enabled together\"\nfi\n\n# Automounter support\n[ \"${UDEVIL}\" = \"yes\" ] && PKG_DEPENDS_TARGET+=\" udevil\"\n\n# EXFAT support\n[ \"$EXFAT\" = \"yes\" ] && PKG_DEPENDS_TARGET+=\" exfat\"\n\n# HFS filesystem tools\n[ \"${HFSTOOLS}\" = \"yes\" ] && PKG_DEPENDS_TARGET+=\" diskdev_cmds\"\n\n# NTFS 3G support\n[ \"${NTFS3G}\" = \"yes\" ] && PKG_DEPENDS_TARGET+=\" ntfs-3g_ntfsprogs\"\n\n# Remote support\n[ \"${REMOTE_SUPPORT}\" = \"yes\" ] && PKG_DEPENDS_TARGET+=\" remote\"\n\n# Virtual image creation support\n[ \"${PROJECT}\" = \"Generic\" ] && PKG_DEPENDS_TARGET+=\" virtual\"\n\n# Installer support\n[ \"${INSTALLER_SUPPORT}\" = \"yes\" ] && PKG_DEPENDS_TARGET+=\" installer\"\n\n# Devtools... (not for Release)\n[ \"${TESTING}\" = \"yes\" ] && PKG_DEPENDS_TARGET+=\" testing\"\n\n# OEM packages\n[ \"${OEM_SUPPORT}\" = \"yes\" ] && PKG_DEPENDS_TARGET+=\" oem\"\n\ntrue\n"
  },
  {
    "path": "packages/virtual/initramfs/config/initramfs.conf",
    "content": "dir /dev 0755 0 0\nnod /dev/console 0600 0 0 c 5 1\n\ndir usr 0755 0 0\nslink lib usr/lib 0777 0 0\nslink bin usr/bin 0777 0 0\nslink sbin usr/sbin 0777 0 0\n"
  },
  {
    "path": "packages/virtual/initramfs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"initramfs\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.openelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_INIT=\"libc:init busybox:init splash-image:init util-linux:init e2fsprogs:init dosfstools:init terminus-font:init bkeymaps:init fakeroot:host\"\nPKG_DEPENDS_TARGET=\"toolchain initramfs:init\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"Metapackage for installing initramfs\"\n\nif [ \"${ISCSI_SUPPORT}\" = yes ]; then\n  PKG_DEPENDS_INIT+=\" open-iscsi:init\"\nfi\n\nif [ \"${INITRAMFS_PARTED_SUPPORT}\" = yes ]; then\n  PKG_DEPENDS_INIT+=\" parted:init\"\nfi\n\nfor i in ${PKG_DEPENDS_INIT}; do\n  PKG_NEED_UNPACK+=\" $(get_pkg_directory ${i})\"\ndone\n\npost_install() {\n  if [ \"$BUILD_ANDROID_BOOTIMG\" = \"yes\" ]; then\n  ( \n    cd $BUILD/initramfs\n\n    ln -sfn /usr/lib  $BUILD/initramfs/lib\n    ln -sfn /usr/bin  $BUILD/initramfs/bin\n    ln -sfn /usr/sbin $BUILD/initramfs/sbin\n\n    mkdir -p $BUILD/image\n    fakeroot -- sh -c \\\n      \"mkdir -p dev; mknod -m 600 dev/console c 5 1; find . | cpio -H newc -ov -R 0:0 > $BUILD/image/initramfs.cpio\"\n  )\n  fi\n} \n"
  },
  {
    "path": "packages/virtual/libc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libc\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain glibc tz libidn2\"\nPKG_DEPENDS_INIT=\"toolchain glibc:init\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"Meta package for installing various tools and libs needed for libc\"\n\nif [ \"${ARM_MEM_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" arm-mem\"\n  PKG_DEPENDS_INIT+=\" arm-mem:init\"\nfi\n"
  },
  {
    "path": "packages/virtual/linux-drivers/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"linux-drivers\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain ${ADDITIONAL_DRIVERS}\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"linux-drivers is a Meta package to install additional drivers\"\n\nif [ \"${DRIVER_ADDONS_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${DRIVER_ADDONS} driverselect\"\nfi\n"
  },
  {
    "path": "packages/virtual/linux-firmware/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"linux-firmware\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain ${FIRMWARE}\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"linux-firmware is a meta-package to install various free firmware drivers\"\n"
  },
  {
    "path": "packages/virtual/mediacenter/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mediacenter\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain ${MEDIACENTER}\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"Mediacenter: Metapackage\"\n\nif [ \"${MEDIACENTER}\" = \"kodi\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${MEDIACENTER}-theme-${SKIN_DEFAULT}\"\n\n  for i in ${SKINS}; do\n    PKG_DEPENDS_TARGET+=\" ${MEDIACENTER}-theme-${i}\"\n  done\n\n# python-based tool for kodi management\n  PKG_DEPENDS_TARGET+=\" texturecache.py\"\n\n# some python stuff needed for various addons\n  PKG_DEPENDS_TARGET=\"${PKG_DEPENDS_TARGET} Pillow \\\n                                          simplejson \\\n                                          pycryptodome\"\n\n# settings addon\n  if [ -n \"${DISTRO_PKG_SETTINGS}\" ]; then\n    PKG_DEPENDS_TARGET+=\" ${DISTRO_PKG_SETTINGS}\"\n  fi\n\n# other packages\n  PKG_DEPENDS_TARGET+=\" xmlstarlet\"\n\n  if [ \"${JOYSTICK_SUPPORT}\" = \"yes\" ]; then\n    PKG_DEPENDS_TARGET+=\" peripheral.joystick\"\n  fi\n\n  get_graphicdrivers\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"(crocus|i915|iris)\"; then\n    PKG_DEPENDS_TARGET+=\" intel-vaapi-driver media-driver\"\n  fi\n\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"nvidia-ng\"; then\n    PKG_DEPENDS_TARGET+=\" nvidia-vaapi-driver\"\n  fi\nfi\n"
  },
  {
    "path": "packages/virtual/misc-packages/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"misc-packages\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain ${ADDITIONAL_PACKAGES}\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"misc-packages: Metapackage for miscellaneous packages\"\n\n# Entware support\nif [ \"$ENTWARE_SUPPORT\" = \"yes\" ]; then\n  ln -sf /storage/.opt $INSTALL/opt\n  PKG_DEPENDS_TARGET+=\" entware\"\nfi\n"
  },
  {
    "path": "packages/virtual/network/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"network\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"various\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain connman netbase ethtool openssh iw wireless-regdb rsync nss\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"Metapackage for various packages to install network support\"\n\nif [ \"${BLUETOOTH_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" bluez\"\nfi\n\nif [ \"${SAMBA_SERVER}\" = \"yes\" ] || [ \"${SAMBA_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" samba\"\nfi\n\nif [ \"${OPENVPN_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" openvpn\"\nfi\n\nif [ \"${WIREGUARD_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" wireguard-tools\"\n\n  if [[ \"${DEVICE}\" = \"Amlogic-n\"* ]]; then\n    PKG_DEPENDS_TARGET=\"${PKG_DEPENDS_TARGET} wireguard-linux-compat\"\n  fi\nfi\n\nif [ \"${ISCSI_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" open-iscsi\"\nfi\n"
  },
  {
    "path": "packages/virtual/remote/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"remote\"\nPKG_VERSION=\"1\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.openelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain eventlircd libirman v4l-utils evrepeat\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"Meta package for installing various tools needed for remote support\"\n"
  },
  {
    "path": "packages/virtual/toolchain/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"toolchain\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_HOST=\"autoconf:host autoconf-archive:host automake:host bison:host configtools:host cmake:host flex:host intltool:host libtool:host ninja:host make:host meson:host openssl:host p7zip:host pigz:host sed:host xmlstarlet:host xz:host\"\nPKG_DEPENDS_TARGET=\"toolchain:host gcc:host\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"LibreELEC.tv' toolchain to compile all packages\"\n"
  },
  {
    "path": "packages/virtual/virtual/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"virtual\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.libreelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"qemu:host\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"virtual is a Meta package to install Virtual project extra dependencies\"\n\nget_graphicdrivers\n\nlistcontains \"${GRAPHIC_DRIVERS}\" \"vmware\" && PKG_DEPENDS_TARGET+=\" open-vm-tools\" || true\n"
  },
  {
    "path": "packages/virtual/wl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"wl\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://wayland.freedesktop.org/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"Wayland is intended as a simpler replacement for X, easier to develop and maintain.\"\n\n# Compositor\nif [ -n \"${WINDOWMANAGER}\" -a \"${WINDOWMANAGER}\" != \"no\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${WINDOWMANAGER}\"\nfi\n\n# Tools for wlroots based compositors\nif [  \"${WINDOWMANAGER}\" = \"sway\" ]; then\n  PKG_DEPENDS_TARGET+=\" wlr-randr\"\nfi\n\n# NVIDIA drivers for Linux\nif listcontains \"${GRAPHIC_DRIVERS}\" \"nvidia-ng\"; then\n  PKG_DEPENDS_TARGET+=\" nvidia\"\nfi\n"
  },
  {
    "path": "packages/virtual/x11/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"x11\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.X.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain xorg-server\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"X11 is the Windowing system\"\n\n# Additional packages we need for using xorg-server:\n# Fonts\n  PKG_DEPENDS_TARGET+=\" encodings font-xfree86-type1 font-bitstream-type1 font-misc-misc\"\n\n# Server\n  PKG_DEPENDS_TARGET+=\" xkeyboard-config xkbcomp\"\n\n# Tools\n  PKG_DEPENDS_TARGET+=\" xrandr setxkbmap\"\n\nif [ -n \"${WINDOWMANAGER}\" -a \"${WINDOWMANAGER}\" != \"no\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${WINDOWMANAGER}\"\nfi\n\nget_graphicdrivers\n\n# Drivers\nif [ -n \"${LIBINPUT}\" ]; then\n  PKG_DEPENDS_TARGET+=\" xf86-input-libinput\"\nelse\n  PKG_DEPENDS_TARGET+=\" xf86-input-evdev xf86-input-synaptics\"\nfi\n\nfor drv in ${XORG_DRIVERS}; do\n  PKG_DEPENDS_TARGET+=\" xf86-video-${drv}\"\ndone\n"
  },
  {
    "path": "packages/wayland/compositor/sway/config/colorscheme",
    "content": "## Base16 Black Metal (Dark Funeral)\n# Author: metalelf0   (https://github.com/metalelf0)\n# Source: base16-sway (https://github.com/rkubosz/base16-sway)\n\nset $base00 #000000\nset $base01 #121212\nset $base02 #222222\nset $base03 #333333\nset $base04 #999999\nset $base05 #c1c1c1\nset $base06 #999999\nset $base07 #c1c1c1\nset $base08 #5f8787\nset $base09 #aaaaaa\nset $base0A #5f81a5\nset $base0B #d0dfee\nset $base0C #aaaaaa\nset $base0D #888888\nset $base0E #999999\nset $base0F #444444\n"
  },
  {
    "path": "packages/wayland/compositor/sway/config/config",
    "content": "# Default config for sway\n#\n# Copy this to ~/.config/sway/config and edit it to your liking.\n#\n# Read `man 5 sway` for a complete reference.\n# Load prefered color scheme\ninclude colorscheme\n# Logo key. Use Mod1 for Alt.\nset $mod Mod4\n# Home row direction keys, like vim\nset $left h\nset $down j\nset $up k\nset $right l\n# Your preferred terminal emulator\nset $term foot.sh\n# Your preferred application launcher\n# Note: pass the final command to swaymsg so that the resulting window can be opened\n# on the original workspace that the command was run on.\nset $highlight $base0A\nset $prompt $base0B\nset $menu bemenu-run -p \"#\" -l 10 --scrollbar autohide -i -w --tf \"$prompt\" --hf \"$highlight\" --sf \"$highlight\" --scf \"$highlight\" --no-exec | xargs swaymsg exec --\n\n### Output configuration\n#\n# Default wallpaper (more resolutions are available in /usr/share/sway/)\noutput * bg /usr/share/sway/libreelec-wallpaper-2160.png fill\n\n# hide_cursor hides the cursor image after the specified timeout (in milliseconds) has elapsed with no activity on that cursor\nseat * hide_cursor 3000\n\n#\n# Example configuration:\n#\n#   output HDMI-A-1 resolution 1920x1080 position 1920,0\n#\n# You can get the names of your outputs by running: swaymsg -t get_outputs\n\n### Idle configuration\n#\n# Example configuration:\n#\n# exec swayidle -w \\\n#          timeout 300 'swaylock -f -c 000000' \\\n#          timeout 600 'swaymsg \"output * dpms off\"' resume 'swaymsg \"output * dpms on\"' \\\n#          before-sleep 'swaylock -f -c 000000'\n#\n# This will lock your screen after 300 seconds of inactivity, then turn off\n# your displays after another 300 seconds, and turn your screens back on when\n# resumed. It will also lock your screen before your computer goes to sleep.\n\n### Input configuration\n#\n# Example configuration:\n#\n#   input \"2:14:SynPS/2_Synaptics_TouchPad\" {\n#       dwt enabled\n#       tap enabled\n#       natural_scroll enabled\n#       middle_emulation enabled\n#   }\n#\n# You can get the names of your inputs by running: swaymsg -t get_inputs\n# Read `man 5 sway-input` for more information about this section.\n\n# Set keyboard layout (default US)\ninput * {\n    xkb_layout \"us\"\n}\n\n### Key bindings\n#\n# Basics:\n#\n    # Start a terminal\n    bindsym $mod+Return exec $term\n\n    # Kill focused window\n    bindsym $mod+Shift+q kill\n\n    # Start your launcher\n    bindsym $mod+d exec $menu\n\n    # Drag floating windows by holding down $mod and left mouse button.\n    # Resize them with right mouse button + $mod.\n    # Despite the name, also works for non-floating windows.\n    # Change normal to inverse to use left mouse button for resizing and right\n    # mouse button for dragging.\n    floating_modifier $mod normal\n\n    # Reload the configuration file\n    bindsym $mod+Shift+c reload\n\n    # Exit sway (logs you out of your Wayland session)\n    bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'\n#\n# Moving around:\n#\n    # Move your focus around\n    bindsym $mod+$left focus left\n    bindsym $mod+$down focus down\n    bindsym $mod+$up focus up\n    bindsym $mod+$right focus right\n    # Or use $mod+[up|down|left|right]\n    bindsym $mod+Left focus left\n    bindsym $mod+Down focus down\n    bindsym $mod+Up focus up\n    bindsym $mod+Right focus right\n\n    # Move the focused window with the same, but add Shift\n    bindsym $mod+Shift+$left move left\n    bindsym $mod+Shift+$down move down\n    bindsym $mod+Shift+$up move up\n    bindsym $mod+Shift+$right move right\n    # Ditto, with arrow keys\n    bindsym $mod+Shift+Left move left\n    bindsym $mod+Shift+Down move down\n    bindsym $mod+Shift+Up move up\n    bindsym $mod+Shift+Right move right\n#\n# Workspaces:\n#\n    # Switch to workspace\n    bindsym $mod+1 workspace number 1\n    bindsym $mod+2 workspace number 2\n    bindsym $mod+3 workspace number 3\n    bindsym $mod+4 workspace number 4\n    bindsym $mod+5 workspace number 5\n    bindsym $mod+6 workspace number 6\n    bindsym $mod+7 workspace number 7\n    bindsym $mod+8 workspace number 8\n    bindsym $mod+9 workspace number 9\n    bindsym $mod+0 workspace number 10\n    # Move focused container to workspace\n    bindsym $mod+Shift+1 move container to workspace number 1\n    bindsym $mod+Shift+2 move container to workspace number 2\n    bindsym $mod+Shift+3 move container to workspace number 3\n    bindsym $mod+Shift+4 move container to workspace number 4\n    bindsym $mod+Shift+5 move container to workspace number 5\n    bindsym $mod+Shift+6 move container to workspace number 6\n    bindsym $mod+Shift+7 move container to workspace number 7\n    bindsym $mod+Shift+8 move container to workspace number 8\n    bindsym $mod+Shift+9 move container to workspace number 9\n    bindsym $mod+Shift+0 move container to workspace number 10\n    # Note: workspaces can have any name you want, not just numbers.\n    # We just use 1-10 as the default.\n#\n# Layout stuff:\n#\n    # You can \"split\" the current object of your focus with\n    # $mod+b or $mod+v, for horizontal and vertical splits\n    # respectively.\n    bindsym $mod+b splith\n    bindsym $mod+v splitv\n\n    # Switch the current container between different layout styles\n    bindsym $mod+s layout stacking\n    bindsym $mod+w layout tabbed\n    bindsym $mod+e layout toggle split\n\n    # Make the current focus fullscreen\n    bindsym $mod+f fullscreen\n\n    # Toggle the current focus between tiling and floating mode\n    bindsym $mod+Shift+space floating toggle\n\n    # Swap focus between the tiling area and the floating area\n    bindsym $mod+space focus mode_toggle\n\n    # Move focus to the parent container\n    bindsym $mod+a focus parent\n#\n# Scratchpad:\n#\n    # Sway has a \"scratchpad\", which is a bag of holding for windows.\n    # You can send windows there and get them back later.\n\n    # Move the currently focused window to the scratchpad\n    bindsym $mod+Shift+minus move scratchpad\n\n    # Show the next scratchpad window or hide the focused scratchpad window.\n    # If there are multiple scratchpad windows, this command cycles through them.\n    bindsym $mod+minus scratchpad show\n#\n# Resizing containers:\n#\nmode \"resize\" {\n    # left will shrink the containers width\n    # right will grow the containers width\n    # up will shrink the containers height\n    # down will grow the containers height\n    bindsym $left resize shrink width 10px\n    bindsym $down resize grow height 10px\n    bindsym $up resize shrink height 10px\n    bindsym $right resize grow width 10px\n\n    # Ditto, with arrow keys\n    bindsym Left resize shrink width 10px\n    bindsym Down resize grow height 10px\n    bindsym Up resize shrink height 10px\n    bindsym Right resize grow width 10px\n\n    # Return to default mode\n    bindsym Return mode \"default\"\n    bindsym Escape mode \"default\"\n}\nbindsym $mod+r mode \"resize\"\n\n#\n# Status Bar:\n#\n# Read `man 5 sway-bar` for more information about this section.\nbar {\n    position top\n\n    # When the status_command prints a new line to stdout, swaybar updates.\n    # The default just shows the current date and time.\n    status_command while date +'%a %e %b %G - %k:%M'; do sleep 1; done\n\n    colors {\n        background $base00\n        separator  $base01\n        statusline $base04\n\n        # State             Border  BG      Text\n        focused_workspace   $base05 $base0D $base00\n        active_workspace    $base05 $base03 $base00\n        inactive_workspace  $base03 $base01 $base05\n        urgent_workspace    $base08 $base08 $base00\n        binding_mode        $base00 $base0A $base00    }\n}\n\n# Basic color configuration using the Base16 variables for windows and borders.\n# Property Name         Border  BG      Text    Indicator Child Border\nclient.focused          $base05 $base0D $base00 $base0D $base0D\nclient.focused_inactive $base01 $base01 $base05 $base03 $base01\nclient.unfocused        $base01 $base00 $base05 $base01 $base01\nclient.urgent           $base08 $base08 $base00 $base08 $base08\nclient.placeholder      $base00 $base00 $base05 $base00 $base00\nclient.background       $base07\n\n# Load etc config\ninclude /etc/sway/config.d/*\n"
  },
  {
    "path": "packages/wayland/compositor/sway/config/sway-daemon.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n# Pass config args to Sway e.g. --unsupported-gpu for NVIDIA GPUs\nSWAY_DAEMON_CONF=\"\"\n"
  },
  {
    "path": "packages/wayland/compositor/sway/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"sway\"\nPKG_VERSION=\"1.8.1\"\nPKG_SHA256=\"e9f575761342fc8fe0cfeea80c90f32ddfa8c543572fec179f40922346f47dff\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://swaywm.org/\"\nPKG_URL=\"https://github.com/swaywm/sway/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain wayland wayland-protocols libdrm libxkbcommon libinput cairo pango libjpeg-turbo dbus json-c wlroots gdk-pixbuf swaybg foot bemenu\"\nPKG_LONGDESC=\"i3-compatible Wayland compositor\"\n\nPKG_MESON_OPTS_TARGET=\"-Ddefault-wallpaper=false \\\n                       -Dzsh-completions=false \\\n                       -Dbash-completions=false \\\n                       -Dfish-completions=false \\\n                       -Dswaybar=true \\\n                       -Dswaynag=true \\\n                       -Dxwayland=disabled \\\n                       -Dtray=disabled \\\n                       -Dgdk-pixbuf=enabled \\\n                       -Dman-pages=disabled \\\n                       -Dsd-bus-provider=auto\"\n\npre_configure_target() {\n  # sway does not build without -Wno flags as all warnings being treated as errors\n  export TARGET_CFLAGS=$(echo \"${TARGET_CFLAGS} -Wno-unused-variable\")\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/sway\n    cp ${PKG_DIR}/scripts/sway.sh     ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/sway-config ${INSTALL}/usr/lib/sway\n\n  # install config & wallpaper\n  mkdir -p ${INSTALL}/usr/share/sway\n    cp ${PKG_DIR}/config/* ${INSTALL}/usr/share/sway\n    find_file_path \"splash/splash-2160.png\" && cp ${FOUND_PATH} ${INSTALL}/usr/share/sway/libreelec-wallpaper-2160.png\n\n  # clean up\n  safe_remove ${INSTALL}/etc\n  safe_remove ${INSTALL}/usr/share/wayland-sessions\n}\n\npost_install() {\n  enable_service sway.service\n}\n"
  },
  {
    "path": "packages/wayland/compositor/sway/patches/sway-100.01-static-ipc-socket.patch",
    "content": "--- a/sway/ipc-server.c\n+++ b/sway/ipc-server.c\n@@ -140,7 +140,7 @@ struct sockaddr_un *ipc_user_sockaddr(vo\n \t\tdir = \"/tmp\";\n \t}\n \tif (path_size <= snprintf(ipc_sockaddr->sun_path, path_size,\n-\t\t\t\"%s/sway-ipc.%u.%i.sock\", dir, getuid(), getpid())) {\n+\t\t\t\"%s/sway-ipc.%u.sock\", dir, getuid())) {\n \t\tsway_abort(\"Socket path won't fit into ipc_sockaddr->sun_path\");\n \t}\n \n"
  },
  {
    "path": "packages/wayland/compositor/sway/patches/sway-100.02-allow-running-as-root.patch",
    "content": "--- a/sway/main.c\n+++ b/sway/main.c\n@@ -151,7 +151,8 @@\n }\n \n static bool detect_suid(void) {\n-\tif (geteuid() != 0 && getegid() != 0) {\n+\tif (geteuid() == 0 && getegid() == 0) {\n+\t\tsway_log(SWAY_INFO, \"Running sway as root user\");\n \t\treturn false;\n \t}\n \n@@ -309,11 +310,6 @@\n \t\t}\n \t}\n \n-\t// SUID operation is deprecated, so block it for now.\n-\tif (detect_suid()) {\n-\t\texit(EXIT_FAILURE);\n-\t}\n-\n \t// Since wayland requires XDG_RUNTIME_DIR to be set, abort with just the\n \t// clear error message (when not running as an IPC client).\n \tif (!getenv(\"XDG_RUNTIME_DIR\") && optind == argc) {\n@@ -363,6 +359,11 @@\n \t\treturn 0;\n \t}\n \n+\t// SUID operation is deprecated, so block it for now.\n+\tif (detect_suid()) {\n+\t\texit(EXIT_FAILURE);\n+\t}\n+\n \tdetect_proprietary(allow_unsupported_gpu);\n \tincrease_nofile_limit();\n \n\n"
  },
  {
    "path": "packages/wayland/compositor/sway/patches/sway-100.03-do-not-use-git-version.patch",
    "content": "--- a/meson.build\n+++ b/meson.build\n@@ -158,18 +158,6 @@\n add_project_arguments('-DSYSCONFDIR=\"/@0@\"'.format(join_paths(prefix, sysconfdir)), language : 'c')\n \n version = '\"@0@\"'.format(meson.project_version())\n-git = find_program('git', native: true, required: false)\n-if git.found()\n-\tgit_commit = run_command([git, 'rev-parse', '--short', 'HEAD'], check: false)\n-\tgit_branch = run_command([git, 'rev-parse', '--abbrev-ref', 'HEAD'], check: false)\n-\tif git_commit.returncode() == 0 and git_branch.returncode() == 0\n-\t\tversion = '\"@0@-@1@ (\" __DATE__ \", branch \\'@2@\\')\"'.format(\n-\t\t\tmeson.project_version(),\n-\t\t\tgit_commit.stdout().strip(),\n-\t\t\tgit_branch.stdout().strip(),\n-\t\t)\n-\tendif\n-endif\n add_project_arguments('-DSWAY_VERSION=@0@'.format(version), language: 'c')\n \n # Compute the relative path used by compiler invocations.\n\n"
  },
  {
    "path": "packages/wayland/compositor/sway/profile.d/04-sway.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nexport WAYLAND_DISPLAY=wayland-1\nexport XDG_RUNTIME_DIR=/var/run/0-runtime-dir\nexport SWAYSOCK=\"${XDG_RUNTIME_DIR}/sway-ipc.0.sock\"\n"
  },
  {
    "path": "packages/wayland/compositor/sway/scripts/sway-config",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nexport XDG_RUNTIME_DIR=/var/run/0-runtime-dir\nexport WAYLAND_DISPLAY=wayland-1\nSWAY_DAEMON_ARGS=\"\"\n\nSWAY_RUNTIME_DIR=/var/run/sway\nSWAY_CONFIG_BASEDIR=/storage/.config/sway\nSWAY_CONFIG_SHAREDIR=/usr/share/sway\n\nSWAY_CONFIG_COLOR=${SWAY_CONFIG_BASEDIR}/colorscheme\nSWAY_CONFIG_COLOR_DEFAULT=${SWAY_CONFIG_SHAREDIR}/colorscheme\nSWAY_CONFIG_DAEMON=${SWAY_CONFIG_BASEDIR}/sway-daemon.conf\nSWAY_CONFIG_DAEMON_DEFAULT=${SWAY_CONFIG_SHAREDIR}/sway-daemon.conf\nSWAY_CONFIG_USER=${SWAY_CONFIG_BASEDIR}/config\nSWAY_CONFIG_USER_DEFAULT=${SWAY_CONFIG_SHAREDIR}/config\nSWAY_CONFIG_RUN=${SWAY_RUNTIME_DIR}/sway-daemon.conf\n\nif [ ! -d \"$XDG_RUNTIME_DIR\" ]; then\n  mkdir \"$XDG_RUNTIME_DIR\"\n  chmod 0700 \"$XDG_RUNTIME_DIR\"\nfi\n\nif [ ! -d \"$SWAY_RUNTIME_DIR\" ]; then\n  mkdir \"$SWAY_RUNTIME_DIR\"\nfi\n\nif [ ! -f ${SWAY_CONFIG_USER} ]; then\n  mkdir -p ${SWAY_CONFIG_BASEDIR}\n    cp ${SWAY_CONFIG_USER_DEFAULT} ${SWAY_CONFIG_BASEDIR}\nfi\n\nif [ ! -f ${SWAY_CONFIG_COLOR} ]; then\n  cp ${SWAY_CONFIG_COLOR_DEFAULT} ${SWAY_CONFIG_BASEDIR}\nfi\n\nif [ ! -f ${SWAY_CONFIG_DAEMON} ]; then\n  cp ${SWAY_CONFIG_DAEMON_DEFAULT} ${SWAY_CONFIG_BASEDIR}\nfi\n\nif [ -f ${SWAY_CONFIG_DAEMON} ] ; then\n   SWAY_DAEMON_CONF=$(cat ${SWAY_CONFIG_DAEMON} | grep -E '^SWAY_DAEMON_CONF=' | cut -d \"\\\"\" -f2)\nfi\n\necho SWAY_DAEMON_ARGS=\\\"${SWAY_DAEMON_CONF} ${SWAY_DAEMON_ARGS}\\\" > ${SWAY_CONFIG_RUN}\n"
  },
  {
    "path": "packages/wayland/compositor/sway/scripts/sway.sh",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\n. /run/sway/sway-daemon.conf\nSWAY_LOG_FILE=/var/log/sway.log\n\nif [ ! -z \"$(lsmod | grep 'nvidia')\" ]; then\n  export WLR_NO_HARDWARE_CURSORS=1\n  SWAY_GPU_ARGS=\"--unsupported-gpu\"\nfi\n\n# start sway, even if no input devices are connected\nexport WLR_LIBINPUT_NO_DEVICES=1\n\nlogger -t Sway \"### Starting Sway with -V ${SWAY_GPU_ARGS} ${SWAY_DAEMON_ARGS}\"\n/usr/bin/sway -V ${SWAY_GPU_ARGS} ${SWAY_DAEMON_ARGS} > ${SWAY_LOG_FILE} 2>&1\n"
  },
  {
    "path": "packages/wayland/compositor/sway/system.d/sway.service",
    "content": "[Unit]\nDescription=Sway Wayland Compositor\nBefore=graphical.target kodi.service\nAfter=multi-user.target\nConditionKernelCommandLine=!installer\n\n[Service]\nEnvironment=HOME=/storage\nEnvironment=XDG_RUNTIME_DIR=/var/run/0-runtime-dir\nEnvironmentFile=/usr/share/sway/sway-daemon.conf\nEnvironmentFile=-/run/sway/sway-daemon.conf\nWorkingDirectory=/storage\nExecStartPre=-/usr/lib/sway/sway-config\nExecStart=/usr/bin/sway.sh\nRestart=always\nRestartSec=5\n\n[Install]\nAlias=display-manager.service\nWantedBy=graphical.target\n"
  },
  {
    "path": "packages/wayland/lib/fcft/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"fcft\"\nPKG_VERSION=\"3.1.5\"\nPKG_SHA256=\"8a7e09c887edce97f8780dba8a060026c3551da48252819400d7af1c5eacf871\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://codeberg.org/dnkl/fcft\"\nPKG_URL=\"https://codeberg.org/dnkl/fcft/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain pixman fontconfig freetype tllist\"\nPKG_LONGDESC=\"A simple library for font loading and glyph rasterization using FontConfig, FreeType and pixman.\"\n\nPKG_MESON_OPTS_TARGET=\"-Ddocs=disabled \\\n                       -Dgrapheme-shaping=disabled \\\n                       -Drun-shaping=disabled \\\n                       -Dtest-text-shaping=false \\\n                       -Dexamples=false\"\n"
  },
  {
    "path": "packages/wayland/lib/hwdata/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"hwdata\"\nPKG_VERSION=\"0.367\"\nPKG_SHA256=\"7221ee5827775f7ff2cf1ff31008fbe07757c455c0a7c4ff9e8c797d4f382994\"\nPKG_LICENSE=\"GPL-2.0\"\nPKG_SITE=\"https://github.com/vcrhonek/hwdata\"\nPKG_URL=\"https://github.com/vcrhonek/hwdata/archive/refs/tags/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"hwdata contains various hardware identification and configuration data, such as the pci.ids and usb.ids databases\"\n\npre_configure_target() {\n# hwdata fails to build in subdirs\n  cd ${PKG_BUILD}\n    rm -rf .${TARGET_NAME}\n\n    sed -i \"s&@prefix@|&@prefix@|${PKG_INSTALL}&\" Makefile\n    sed -i \"s&prefix=@prefix@&prefix=/usr&\" hwdata.pc.in\n}\n"
  },
  {
    "path": "packages/wayland/lib/seatd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"seatd\"\nPKG_VERSION=\"0.7.0\"\nPKG_SHA256=\"210ddf8efa1149cde4dd35908bef8e9e63c2edaa0cdb5435f2e6db277fafff3c\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://git.sr.ht/~kennylevinsen/seatd\"\nPKG_URL=\"https://git.sr.ht/~kennylevinsen/seatd/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain systemd\"\nPKG_LONGDESC=\"A minimal seat management daemon, and a universal seat management library.\"\n\nPKG_MESON_OPTS_TARGET=\"-Dlibseat-logind=systemd \\\n                       -Dlibseat-seatd=enabled \\\n                       -Dlibseat-builtin=disabled \\\n                       -Dserver=enabled \\\n                       -Dexamples=disabled \\\n                       -Dman-pages=disabled\"\n\npre_configure_target() {\n  # seatd does not build without -Wno flags as all warnings being treated as errors\n  export TARGET_CFLAGS=$(echo \"${TARGET_CFLAGS} -Wno-unused-parameter\")\n}\n\npost_install() {\n  enable_service seatd.service\n}\n"
  },
  {
    "path": "packages/wayland/lib/seatd/system.d/seatd.service",
    "content": "[Unit]\nDescription=Seat Management Daemon\nBefore=graphical.target sway.service\nAfter=multi-user.target\nConditionKernelCommandLine=!installer\n\n[Service]\nExecStart=/usr/bin/seatd -u root\nRestart=always\nRestartSec=1\n\n[Install]\nAlias=seat-management-daemon.service\nWantedBy=graphical.target\n"
  },
  {
    "path": "packages/wayland/lib/tllist/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"tllist\"\nPKG_VERSION=\"1.1.0\"\nPKG_SHA256=\"0e7b7094a02550dd80b7243bcffc3671550b0f1d8ba625e4dff52517827d5d23\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://codeberg.org/dnkl/tllist\"\nPKG_URL=\"https://codeberg.org/dnkl/tllist/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A C header file only implementation of a typed linked list.\"\n"
  },
  {
    "path": "packages/wayland/lib/wlroots/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"wlroots\"\nPKG_VERSION=\"0.16.2\"\nPKG_SHA256=\"afea2cc740344c4e86749cf4908e07692e183cb14a3db854d24dec454c664b88\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://gitlab.freedesktop.org/wlroots/wlroots/\"\nPKG_URL=\"https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain hwdata libinput libxkbcommon pixman libdrm wayland wayland-protocols seatd\"\nPKG_LONGDESC=\"A modular Wayland compositor library\"\n\nconfigure_package() {\n  # OpenGLES Support\n  if [ \"${OPENGLES_SUPPORT}\" = \"yes\" ]; then\n    PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\n  fi\n}\n\nPKG_MESON_OPTS_TARGET=\"-Dxcb-errors=disabled \\\n                       -Dxwayland=disabled \\\n                       -Dexamples=false \\\n                       -Drenderers=gles2\"\n\npre_configure_target() {\n  # wlroots does not build without -Wno flags as all warnings being treated as errors\n  export TARGET_CFLAGS=$(echo \"${TARGET_CFLAGS} -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-function\")\n}\n"
  },
  {
    "path": "packages/wayland/libinput/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libinput\"\nPKG_VERSION=\"1.22.1\"\nPKG_SHA256=\"e13f6f118cfbbdc0b6e0edd5e3504abd96a8d0e33dc67cba31c6942c449f77af\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.freedesktop.org/wiki/Software/libinput/\"\nPKG_URL=\"https://gitlab.freedesktop.org/libinput/libinput/-/archive/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain systemd libevdev mtdev\"\nPKG_LONGDESC=\"libinput is a library to handle input devices in Wayland compositors and to provide a generic X.Org input driver.\"\n\nPKG_MESON_OPTS_TARGET=\"-Dlibwacom=false \\\n                       -Ddebug-gui=false \\\n                       -Dtests=false \\\n                       -Ddocumentation=false\"\n"
  },
  {
    "path": "packages/wayland/libxkbcommon/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libxkbcommon\"\nPKG_VERSION=\"1.5.0\"\nPKG_SHA256=\"560f11c4bbbca10f495f3ef7d3a6aa4ca62b4f8fb0b52e7d459d18a26e46e017\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://xkbcommon.org\"\nPKG_URL=\"https://xkbcommon.org/download/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain xkeyboard-config libxml2\"\nPKG_LONGDESC=\"xkbcommon is a library to handle keyboard descriptions.\"\n\nPKG_MESON_OPTS_TARGET=\"-Denable-docs=false\"\n\nif [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n  PKG_MESON_OPTS_TARGET+=\" -Denable-x11=true \\\n                           -Denable-wayland=false\"\nelif [ \"${DISPLAYSERVER}\" = \"wl\" ]; then\n  PKG_DEPENDS_TARGET+=\" wayland wayland-protocols\"\n  PKG_MESON_OPTS_TARGET+=\" -Denable-x11=false \\\n                           -Denable-wayland=true\"\nelse\n  PKG_MESON_OPTS_TARGET+=\" -Denable-x11=false \\\n                           -Denable-wayland=false\"\nfi\n\npre_configure_target() {\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    TARGET_LDFLAGS=\"${LDFLAGS} -lXau -lxcb\"\n  fi\n}\n"
  },
  {
    "path": "packages/wayland/mtdev/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"mtdev\"\nPKG_VERSION=\"1.1.6\"\nPKG_SHA256=\"15d7b28da8ac71d8bc8c9287c2045fd174267bc740bec10cfda332dc1204e0e0\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"http://bitmath.org\"\nPKG_URL=\"http://bitmath.org/code/mtdev/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"The mtdev is a stand-alone library which transforms all variants of kernel MT events to the slotted type B protocol.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared\"\n"
  },
  {
    "path": "packages/wayland/util/bemenu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"bemenu\"\nPKG_VERSION=\"0.6.14\"\nPKG_SHA256=\"bc945776f94901d0898d19725d3a4c3e1f5bc90712a5bae9ec98d89d24603a9d\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/Cloudef/bemenu\"\nPKG_URL=\"https://github.com/Cloudef/bemenu/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain glib wayland wayland-protocols cairo pango libxkbcommon\"\nPKG_LONGDESC=\"Dynamic menu library and client program inspired by dmenu\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_MAKE_OPTS_TARGET=\"PREFIX=/usr clients wayland\"\n\nmakeinstall_target(){\n  make DESTDIR=${INSTALL} PREFIX=/usr install-libs install-bins install-wayland install-pkgconfig\n}\n\npost_makeinstall_target(){\n  ln -sf libbemenu.so.${PKG_VERSION} ${INSTALL}/usr/lib/libbemenu.so.0\n}\n"
  },
  {
    "path": "packages/wayland/util/foot/config/foot.ini",
    "content": "# -*- conf -*-\n\n# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)\nterm=xterm\n# login-shell=no\n\n# app-id=foot\ntitle=foo terminal\n# locked-title=no\n\nfont=monospace:size=12\n# font-bold=<bold variant of regular font>\n# font-italic=<italic variant of regular font>\n# font-bold-italic=<bold+italic variant of regular font>\n# line-height=<font metrics>\n# letter-spacing=0\n# horizontal-letter-offset=0\n# vertical-letter-offset=0\n# underline-offset=<font metrics>\n# box-drawings-uses-font-glyphs=no\ndpi-aware=auto\n\n# initial-window-size-pixels=700x500  # Or,\n# initial-window-size-chars=<COLSxROWS>\n# initial-window-mode=windowed\n# pad=2x2                             # optionally append 'center'\n# resize-delay-ms=100\n\n# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body}\n\n# bold-text-in-bright=no\n# bell=none\n# word-delimiters=,│`|:\"'()[]{}<>\n# selection-target=primary\n# workers=<number of logical CPUs>\n\n[bell]\n# urgent=no\n# notify=no\n# command=\n# command-focused=no\n\n[scrollback]\n# lines=1000\n# multiplier=3.0\n# indicator-position=relative\n# indicator-format=\n\n[url]\n# launch=xdg-open ${url}\n# label-letters=sadfjklewcmpgh\n# osc8-underline=url-mode\n# protocols=http, https, ftp, ftps, file, gemini, gopher\n# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+=\"'\n\n[cursor]\nstyle=beam\ncolor=000000 eeeeee\nblink=yes\n# beam-thickness=1.5\n# underline-thickness=<font underline thickness>\n\n[mouse]\n# hide-when-typing=no\n# alternate-scroll-mode=yes\n\n[colors]\nalpha=0.95\nbackground=000000\nforeground=eeeeee\nregular0=1c1c1c  # black\nregular1=af005f  # red\nregular2=5faf00  # green\nregular3=d7af5f  # yellow\nregular4=5fafd7  # blue\nregular5=808080  # magenta\nregular6=d7875f  # cyan\nregular7=d0d0d0  # white\nbright0=bcbcbc   # bright black\nbright1=5faf5f   # bright red\nbright2=afd700   # bright green\nbright3=af87d7   # bright yellow\nbright4=ffaf00   # bright blue\nbright5=ff5faf   # bright magenta\nbright6=00afaf   # bright cyan\nbright7=5f8787   # bright white\n#selection-foreground=1c1c1c\n#selection-background=af87d7\n\n## Normal/regular colors (color palette 0-7)\n# regular0=222222  # black\n# regular1=cc9393  # red\n# regular2=7f9f7f  # green\n# regular3=d0bf8f  # yellow\n# regular4=6ca0a3  # blue\n# regular5=dc8cc3  # magenta\n# regular6=93e0e3  # cyan\n# regular7=dcdccc  # white\n\n## Bright colors (color palette 8-15)\n# bright0=666666   # bright black\n# bright1=dca3a3   # bright red\n# bright2=bfebbf   # bright green\n# bright3=f0dfaf   # bright yellow\n# bright4=8cd0d3   # bright blue\n# bright5=fcace3   # bright magenta\n# bright6=b3ffff   # bright cyan\n# bright7=ffffff   # bright white\n\n## dimmed colors (see foot.ini(5) man page)\n# dim0=<not set>\n# ...\n# dim7=<not-set>\n\n## The remaining 256-color palette\n# 16 = <256-color palette #16>\n# ...\n# 255 = <256-color palette #255>\n\n## Misc colors\n# selection-foreground=<inverse foreground/background>\n# selection-background=<inverse foreground/background>\n# jump-labels=<regular0> <regular3>\n# urls=<regular3>\n# scrollback-indicator=<regular0> <bright4>\n\n[csd]\n# preferred=server\n# size=26\n# font=<primary font>\n# color=<foreground color>\n# border-width=0\n# border-color=<csd.color>\n# button-width=26\n# button-color=<background color>\n# button-minimize-color=<regular4>\n# button-maximize-color=<regular2>\n# button-close-color=<regular1>\n\n[key-bindings]\n# scrollback-up-page=Shift+Page_Up\n# scrollback-up-half-page=none\n# scrollback-up-line=none\n# scrollback-down-page=Shift+Page_Down\n# scrollback-down-half-page=none\n# scrollback-down-line=none\n# clipboard-copy=Control+Shift+c\n# clipboard-paste=Control+Shift+v\n# primary-paste=Shift+Insert\n# search-start=Control+Shift+r\n# font-increase=Control+plus Control+equal Control+KP_Add\n# font-decrease=Control+minus Control+KP_Subtract\n# font-reset=Control+0 Control+KP_0\n# spawn-terminal=Control+Shift+n\n# minimize=none\n# maximize=none\n# fullscreen=none\n# pipe-visible=[sh -c \"xurls | fuzzel | xargs -r firefox\"] none\n# pipe-scrollback=[sh -c \"xurls | fuzzel | xargs -r firefox\"] none\n# pipe-selected=[xargs -r firefox] none\n# show-urls-launch=Control+Shift+u\n# show-urls-copy=none\n# noop=none\n\n[search-bindings]\n# cancel=Control+g Control+c Escape\n# commit=Return\n# find-prev=Control+r\n# find-next=Control+s\n# cursor-left=Left Control+b\n# cursor-left-word=Control+Left Mod1+b\n# cursor-right=Right Control+f\n# cursor-right-word=Control+Right Mod1+f\n# cursor-home=Home Control+a\n# cursor-end=End Control+e\n# delete-prev=BackSpace\n# delete-prev-word=Mod1+BackSpace Control+BackSpace\n# delete-next=Delete\n# delete-next-word=Mod1+d Control+Delete\n# extend-to-word-boundary=Control+w\n# extend-to-next-whitespace=Control+Shift+w\n# clipboard-paste=Control+v Control+y\n# primary-paste=Shift+Insert\n\n[url-bindings]\n# cancel=Control+g Control+c Control+d Escape\n# toggle-url-visible=t\n\n[mouse-bindings]\n# primary-paste=BTN_MIDDLE\n# select-begin=BTN_LEFT\n# select-begin-block=Control+BTN_LEFT\n# select-extend=BTN_RIGHT\n# select-extend-character-wise=Control+BTN_RIGHT\n# select-word=BTN_LEFT-2\n# select-word-whitespace=Control+BTN_LEFT-2\n# select-row=BTN_LEFT-3\n"
  },
  {
    "path": "packages/wayland/util/foot/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"foot\"\nPKG_VERSION=\"1.13.1\"\nPKG_SHA256=\"604f777fdaccfc1ee2d20376cc5688a819dcd6b7113725880cc973194fd6c737\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://codeberg.org/dnkl/foot/\"\nPKG_URL=\"https://codeberg.org/dnkl/foot/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses wayland wayland-protocols pixman fontconfig libxkbcommon fcft\"\nPKG_LONGDESC=\"A fast, lightweight and minimalistic Wayland terminal emulator\"\n\nPKG_MESON_OPTS_TARGET=\"-Ddocs=disabled \\\n                       -Dthemes=false \\\n                       -Dime=false \\\n                       -Dgrapheme-clustering=auto \\\n                       -Dterminfo=disabled \\\n                       -Ddefault-terminfo=xterm\"\n\npost_makeinstall_target(){\n  # clean up\n  safe_remove ${INSTALL}/usr/share/*\n\n  # install scripts\n  mkdir -p ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/foot.sh ${INSTALL}/usr/bin\n\n  # install config\n  mkdir -p ${INSTALL}/usr/share/foot\n    cp ${PKG_DIR}/config/foot.ini ${INSTALL}/usr/share/foot\n}\n"
  },
  {
    "path": "packages/wayland/util/foot/scripts/foot.sh",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nFOOT_CONFIG_DIR=/storage/.config/foot\nFOOT_CONFIG_DEFAULT=/usr/share/foot/foot.ini\nFOOT_LOG_FILE=/var/log/foot.log\n\nif [ ! -f ${FOOT_CONFIG_DIR}/foot.ini ]; then\n  mkdir -p ${FOOT_CONFIG_DIR}\n    cp ${FOOT_CONFIG_DEFAULT} ${FOOT_CONFIG_DIR}\nfi\n\nif [ -z \"${LOCPATH}\" ]; then\n  export LOCPATH=\"/storage/.cache/locpath\"\nfi\n\n/usr/bin/foot > ${FOOT_LOG_FILE} 2>&1\n"
  },
  {
    "path": "packages/wayland/util/swaybg/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"swaybg\"\nPKG_VERSION=\"1.2.0\"\nPKG_SHA256=\"cfeab55b983da24352407279556c035b495890422578812d9a9c0bba1dc3ce75\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://swaywm.org/\"\nPKG_URL=\"https://github.com/swaywm/swaybg/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain wayland wayland-protocols cairo pango gdk-pixbuf\"\nPKG_LONGDESC=\"Wallpaper tool for Wayland compositors\"\n\nPKG_MESON_OPTS_TARGET=\"-Dgdk-pixbuf=enabled \\\n                       -Dman-pages=disabled\"\n\npre_configure_target() {\n  # swaybg does not build without -Wno flags as all warnings being treated as errors\n  export TARGET_CFLAGS=$(echo \"${TARGET_CFLAGS} -Wno-maybe-uninitialized\")\n}\n"
  },
  {
    "path": "packages/wayland/util/wlr-randr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"wlr-randr\"\nPKG_VERSION=\"0.3.0\"\nPKG_SHA256=\"f6e0bea3b41673adbc0ab707d5d93bfdcd3fc6f43c46377565865c3440f81eb4\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://git.sr.ht/~emersion/wlr-randr\"\nPKG_URL=\"https://git.sr.ht/~emersion/wlr-randr/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain wayland\"\nPKG_LONGDESC=\"Utility to manage outputs of a Wayland compositor.\"\n"
  },
  {
    "path": "packages/wayland/wayland/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"wayland\"\nPKG_VERSION=\"1.21.0\"\nPKG_SHA256=\"6dc64d7fc16837a693a51cfdb2e568db538bfdc9f457d4656285bb9594ef11ac\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://wayland.freedesktop.org/\"\nPKG_URL=\"https://gitlab.freedesktop.org/wayland/wayland/-/releases/${PKG_VERSION}/downloads/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"libffi:host expat:host libxml2:host\"\nPKG_DEPENDS_TARGET=\"toolchain wayland:host libffi expat libxml2\"\nPKG_LONGDESC=\"a display server protocol\"\n\nPKG_MESON_OPTS_HOST=\"-Dlibraries=false \\\n                     -Dscanner=true \\\n                     -Dtests=false \\\n                     -Ddocumentation=false \\\n                     -Ddtd_validation=false\"\n\nPKG_MESON_OPTS_TARGET=\"-Dlibraries=true \\\n                       -Dscanner=false \\\n                       -Dtests=false \\\n                       -Ddocumentation=false \\\n                       -Ddtd_validation=false\"\n\npre_configure_target() {\n  # wayland does not build with NDEBUG (requires assert for tests)\n  export TARGET_CFLAGS=$(echo ${TARGET_CFLAGS} | sed -e \"s|-DNDEBUG||g\")\n}\n\npost_makeinstall_host() {\n  cp ${TOOLCHAIN}/lib/pkgconfig/wayland-scanner.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig/\n}\n"
  },
  {
    "path": "packages/wayland/wayland-protocols/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"wayland-protocols\"\nPKG_VERSION=\"1.31\"\nPKG_SHA256=\"a07fa722ed87676ec020d867714bc9a2f24c464da73912f39706eeef5219e238\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://wayland.freedesktop.org/\"\nPKG_URL=\"https://gitlab.freedesktop.org/wayland/${PKG_NAME}/-/releases/${PKG_VERSION}/downloads/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain wayland:host\"\nPKG_LONGDESC=\"Specifications of extended Wayland protocols\"\n\nPKG_MESON_OPTS_TARGET=\"-Dtests=false\"\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}\n}\n"
  },
  {
    "path": "packages/wayland/waylandpp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"waylandpp\"\nPKG_VERSION=\"1.0.0\"\nPKG_SHA256=\"b20b45917382c6b87e9380130c9a1a1c563da2f498de5830df12fbce326dd9f5\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/NilsBrause/waylandpp\"\nPKG_URL=\"https://github.com/NilsBrause/waylandpp/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host pugixml:host\"\nPKG_DEPENDS_TARGET=\"toolchain pugixml:host waylandpp:host wayland\"\nPKG_LONGDESC=\"Wayland C++ bindings\"\n\nconfigure_package() {\n  if [ \"${OPENGL_SUPPORT}\" = \"yes\" ]; then\n    PKG_DEPENDS_TARGET+=\" ${OPENGL}\"\n  elif [ \"${OPENGLES_SUPPORT}\" = \"yes\" ]; then\n    PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\n  fi\n}\n\nPKG_CMAKE_OPTS_HOST=\"-DBUILD_SCANNER=ON \\\n                     -DBUILD_LIBRARIES=OFF\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_SCANNER=OFF \\\n                       -DBUILD_LIBRARIES=ON \\\n                       -DCMAKE_CROSSCOMPILING=ON \\\n                       -DWAYLAND_SCANNERPP=${TOOLCHAIN}/bin/wayland-scanner++\"\n"
  },
  {
    "path": "packages/wayland/weston/config/weston.ini",
    "content": "[core]\nidle-time=0\n\n[shell]\n\nbackground-image=/usr/share/weston/libreelec-wallpaper-2160.png\nbackground-type=scale-crop\nbackground-color=0x00000000\nclock-format=minutes-24h\nlocking=false\n\n[launcher]\npath=/usr/lib/kodi/kodi.bin\nicon=/usr/share/kodi/media/icon16x16.png\n\n[launcher]\nicon=/usr/share/weston/terminal.png\npath=/usr/bin/weston-terminal\n"
  },
  {
    "path": "packages/wayland/weston/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"weston\"\nPKG_VERSION=\"11.0.1\"\nPKG_SHA256=\"a413f68c252957fc3191c3650823ec356ae8c124ccc0cb440da5cdc4e2cb9e57\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://wayland.freedesktop.org/\"\nPKG_URL=\"https://gitlab.freedesktop.org/wayland/weston/uploads/f5648c818fba5432edc3ea63c4db4813/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain wayland wayland-protocols libdrm libxkbcommon libinput cairo pango libjpeg-turbo dbus seatd\"\nPKG_LONGDESC=\"Reference implementation of a Wayland compositor\"\n\nPKG_MESON_OPTS_TARGET=\"-Dbackend-drm=true \\\n                       -Dbackend-drm-screencast-vaapi=false \\\n                       -Dbackend-headless=false \\\n                       -Dbackend-rdp=false \\\n                       -Dscreenshare=false \\\n                       -Dbackend-wayland=false \\\n                       -Dbackend-x11=false \\\n                       -Dbackend-default=drm \\\n                       -Drenderer-gl=true \\\n                       -Dxwayland=false \\\n                       -Dsystemd=true \\\n                       -Dremoting=false \\\n                       -Dpipewire=false \\\n                       -Dshell-desktop=true \\\n                       -Dshell-fullscreen=false \\\n                       -Dshell-ivi=false \\\n                       -Dshell-kiosk=false \\\n                       -Ddesktop-shell-client-default=\"weston-desktop-shell\" \\\n                       -Dcolor-management-lcms=false \\\n                       -Dlauncher-logind=false \\\n                       -Dlauncher-libseat=true \\\n                       -Dimage-jpeg=true \\\n                       -Dimage-webp=false \\\n                       -Dtools=['terminal']\n                       -Ddemo-clients=false \\\n                       -Dsimple-clients=[] \\\n                       -Dresize-pool=false \\\n                       -Dwcap-decode=false \\\n                       -Dtest-junit-xml=false \\\n                       -Dtest-skip-is-failure=false \\\n                       -Ddoc=false\"\n\npre_configure_target() {\n  # weston does not build with NDEBUG (requires assert for tests)\n  export TARGET_CFLAGS=$(echo ${TARGET_CFLAGS} | sed -e \"s|-DNDEBUG||g\")\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/weston\n    cp ${PKG_DIR}/scripts/weston-config ${INSTALL}/usr/lib/weston\n\n  mkdir -p ${INSTALL}/usr/share/weston\n    cp ${PKG_DIR}/config/weston.ini ${INSTALL}/usr/share/weston\n    find_file_path \"splash/splash-2160.png\" && cp ${FOUND_PATH} ${INSTALL}/usr/share/weston/libreelec-wallpaper-2160.png\n\n  safe_remove ${INSTALL}/usr/share/wayland-sessions\n}\n\npost_install() {\n  enable_service weston.service\n}\n"
  },
  {
    "path": "packages/wayland/weston/profile.d/04-weston.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nexport WAYLAND_DISPLAY=wayland-1\nexport XDG_RUNTIME_DIR=/var/run/0-runtime-dir\n"
  },
  {
    "path": "packages/wayland/weston/scripts/weston-config",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nexport XDG_RUNTIME_DIR=/var/run/0-runtime-dir\n\nif [ ! -d \"$XDG_RUNTIME_DIR\" ]; then\n  mkdir \"$XDG_RUNTIME_DIR\"\n  chmod 0700 \"$XDG_RUNTIME_DIR\"\nfi\n\nif [ ! -f /storage/.config/weston.ini ]; then\n  cp /usr/share/weston/weston.ini /storage/.config/weston.ini\nfi\n"
  },
  {
    "path": "packages/wayland/weston/system.d/weston.service",
    "content": "[Unit]\nDescription=Weston Launcher\nBefore=graphical.target\nAfter=multi-user.target\nConditionKernelCommandLine=!installer\n\n[Service]\nEnvironment=HOME=/storage\nEnvironment=XDG_RUNTIME_DIR=/var/run/0-runtime-dir\nWorkingDirectory=/storage\nExecStartPre=-/usr/lib/weston/weston-config\nExecStart=/usr/bin/weston --tty=1 --log=/var/log/weston.log\nRestart=always\nRestartSec=10\n\n[Install]\nAlias=display-manager.service\nWantedBy=graphical.target\n"
  },
  {
    "path": "packages/web/curl/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"curl\"\nPKG_VERSION=\"7.86.0\"\nPKG_SHA256=\"2d61116e5f485581f6d59865377df4463f2e788677ac43222b496d4e49fb627b\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://curl.haxx.se\"\nPKG_URL=\"https://curl.haxx.se/download/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain zlib openssl rtmpdump libidn2 nghttp2\"\nPKG_LONGDESC=\"Client and library for (HTTP, HTTPS, FTP, ...) transfers.\"\nPKG_TOOLCHAIN=\"configure\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_lib_rtmp_RTMP_Init=yes \\\n                           ac_cv_header_librtmp_rtmp_h=yes \\\n                           --disable-debug \\\n                           --enable-optimize \\\n                           --enable-warnings \\\n                           --disable-curldebug \\\n                           --disable-ares \\\n                           --enable-largefile \\\n                           --enable-http \\\n                           --enable-ftp \\\n                           --enable-file \\\n                           --disable-ldap \\\n                           --disable-ldaps \\\n                           --enable-rtsp \\\n                           --enable-proxy \\\n                           --disable-dict \\\n                           --disable-telnet \\\n                           --disable-tftp \\\n                           --disable-pop3 \\\n                           --disable-imap \\\n                           --disable-smb \\\n                           --disable-smtp \\\n                           --disable-gopher \\\n                           --disable-mqtt \\\n                           --disable-manual \\\n                           --enable-libgcc \\\n                           --enable-ipv6 \\\n                           --enable-versioned-symbols \\\n                           --enable-nonblocking \\\n                           --enable-threaded-resolver \\\n                           --enable-verbose \\\n                           --disable-sspi \\\n                           --enable-crypto-auth \\\n                           --enable-cookies \\\n                           --enable-symbol-hiding \\\n                           --disable-soname-bump \\\n                           --with-gnu-ld \\\n                           --without-krb4 \\\n                           --without-spnego \\\n                           --without-gssapi \\\n                           --with-zlib \\\n                           --without-brotli \\\n                           --without-zstd \\\n                           --without-egd-socket \\\n                           --enable-thread \\\n                           --with-random=/dev/urandom \\\n                           --without-gnutls \\\n                           --with-ssl \\\n                           --without-mbedtls \\\n                           --without-nss \\\n                           --with-ca-bundle=/run/libreelec/cacert.pem \\\n                           --without-ca-path \\\n                           --without-libpsl \\\n                           --without-libssh2 \\\n                           --with-librtmp \\\n                           --with-libidn2 \\\n                           --with-nghttp2\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/share/zsh\n\n  rm -rf ${INSTALL}/usr/bin/${PKG_NAME}-config\n  cp ${PKG_NAME}-config ${TOOLCHAIN}/bin\n  sed -e \"s:\\(['= ]\\)/usr:\\\\1${PKG_ORIG_SYSROOT_PREFIX}/usr:g\" -i ${TOOLCHAIN}/bin/${PKG_NAME}-config\n  chmod +x ${TOOLCHAIN}/bin/${PKG_NAME}-config\n}\n"
  },
  {
    "path": "packages/web/libmicrohttpd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libmicrohttpd\"\nPKG_VERSION=\"0.9.75\"\nPKG_SHA256=\"9278907a6f571b391aab9644fd646a5108ed97311ec66f6359cebbedb0a4e3bb\"\nPKG_LICENSE=\"LGPLv2.1\"\nPKG_SITE=\"http://www.gnu.org/software/libmicrohttpd/\"\nPKG_URL=\"http://ftpmirror.gnu.org/libmicrohttpd/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gnutls\"\nPKG_LONGDESC=\"A small C library that is supposed to make it easy to run an HTTP server as part of another application.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-shared \\\n                           --enable-static \\\n                           --disable-examples \\\n                           --disable-curl \\\n                           --enable-https\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/web/nghttp2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"nghttp2\"\nPKG_VERSION=\"1.51.0\"\nPKG_SHA256=\"66aa76d97c143f42295405a31413e5e7d157968dad9f957bb4b015b598882e6b\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"http://www.linuxfromscratch.org/blfs/view/cvs/basicnet/nghttp2.html\"\nPKG_URL=\"https://github.com/nghttp2/nghttp2/releases/download/v${PKG_VERSION}/nghttp2-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"nghttp2 is an implementation of HTTP/2 and its header compression algorithm, HPACK.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DENABLE_DOC=OFF \\\n                       -DENABLE_FAILMALLOC=OFF \\\n                       -DENABLE_LIB_ONLY=ON \\\n                       -DENABLE_SHARED_LIB=ON \\\n                       -DENABLE_STATIC_LIB=OFF\"\n\npost_makeinstall_target() {\n  rm -r \"${INSTALL}/usr/share\"\n}\n"
  },
  {
    "path": "packages/x11/app/setxkbmap/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"setxkbmap\"\nPKG_VERSION=\"1.3.3\"\nPKG_SHA256=\"b560c678da6930a0da267304fa3a41cc5df39a96a5e23d06f14984c87b6f587b\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/app/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libX11 libxkbfile xrandr\"\nPKG_LONGDESC=\"Setxkbmap sets the keyboard using the X Keyboard Extension.\"\n"
  },
  {
    "path": "packages/x11/app/setxkbmap/udev.d/98-xorg-xkb.rules",
    "content": "ACTION!=\"add|change\", GOTO=\"xorg_xkb_end\"\nSUBSYSTEM!=\"input\", GOTO=\"xorg_xkb_end\"\nKERNEL!=\"event*\", GOTO=\"xorg_xkb_end\"\n\nENV{ID_INPUT_KEY}==\"?*\", IMPORT{file}=\"/storage/.cache/xkb/layout\"\n\nLABEL=\"xorg_xkb_end\"\n\n"
  },
  {
    "path": "packages/x11/app/xkbcomp/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xkbcomp\"\nPKG_VERSION=\"1.4.6\"\nPKG_SHA256=\"fa50d611ef41e034487af7bd8d8c718df53dd18002f591cca16b0384afc58e98\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/app/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libX11 libxkbfile\"\nPKG_LONGDESC=\"The xkbcomp keymap compiler converts a description of an XKB keymap into one of several output formats.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-xkb-config-root=${XORG_PATH_XKB}\"\n"
  },
  {
    "path": "packages/x11/app/xrandr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xrandr\"\nPKG_VERSION=\"1.5.2\"\nPKG_SHA256=\"c8bee4790d9058bacc4b6246456c58021db58a87ddda1a9d0139bf5f18f1f240\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/app/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libXrandr\"\nPKG_LONGDESC=\"Xrandr is a primitive command line interface to the RandR extension and used to set the screen size, orientation and/or reflection.\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin/xkeystone\n}\n"
  },
  {
    "path": "packages/x11/data/xkeyboard-config/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xkeyboard-config\"\nPKG_VERSION=\"2.38\"\nPKG_SHA256=\"0690a91bab86b18868f3eee6d41e9ec4ce6894f655443d490a2184bfac56c872\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://www.x.org/releases/individual/data/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros\"\nPKG_LONGDESC=\"X keyboard extension data files.\"\n\nconfigure_package() {\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_DEPENDS_TARGET+=\" xkbcomp\"\n  fi\n}\n\npre_configure_target() {\n  PKG_MESON_OPTS_TARGET=\"-Dcompat-rules=true\"\n\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_MESON_OPTS_TARGET+=\" -Dxorg-rules-symlinks=true\"\n  else\n    PKG_MESON_OPTS_TARGET+=\" -Dxorg-rules-symlinks=false\"\n  fi\n}\n"
  },
  {
    "path": "packages/x11/driver/xf86-input-evdev/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xf86-input-evdev\"\nPKG_VERSION=\"2.10.6\"\nPKG_SHA256=\"8726073e81861bc7b2321e76272cbdbd33c7e1a121535a9827977265b9033ec0\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.X.org\"\nPKG_URL=\"http://xorg.freedesktop.org/archive/individual/driver/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain xorg-server util-macros libevdev mtdev systemd\"\nPKG_LONGDESC=\"Evdev is an Xorg input driver for Linux's generic event devices.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-silent-rules \\\n                           --with-xorg-module-dir=${XORG_PATH_MODULES} \\\n                           --with-gnu-ld\"\n"
  },
  {
    "path": "packages/x11/driver/xf86-input-libinput/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xf86-input-libinput\"\nPKG_VERSION=\"1.2.1\"\nPKG_SHA256=\"8151db5b9ddb317c0ce92dcb62da9a8db5079e5b8a95b60abc854da21e7e971b\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"http://www.freedesktop.org/wiki/Software/libinput/\"\nPKG_URL=\"http://xorg.freedesktop.org/archive/individual/driver/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libinput\"\nPKG_LONGDESC=\"This is an X driver based on libinput.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-xorg-module-dir=${XORG_PATH_MODULES}\"\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/X11/xorg.conf.d\n    cp ${PKG_BUILD}/conf/*-libinput.conf ${INSTALL}/usr/share/X11/xorg.conf.d\n}\n"
  },
  {
    "path": "packages/x11/driver/xf86-input-synaptics/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xf86-input-synaptics\"\nPKG_VERSION=\"1.9.2\"\nPKG_SHA256=\"b8fa4aab913fc63754bbd6439e020658c412743a055201ddf212760593962c38\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://lists.freedesktop.org/mailman/listinfo/xorg\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/driver/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain xorg-server libXi libXext libevdev\"\nPKG_LONGDESC=\"Synaptics touchpad driver for X.Org.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-xorg-module-dir=${XORG_PATH_MODULES}\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-amdgpu/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xf86-video-amdgpu\"\nPKG_VERSION=\"22.0.0\"\nPKG_SHA256=\"9d23fb602915dc3ccde92aa4d1e9485e7e54eaae2f41f485e55eb20761778266\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.x.org/wiki/RadeonFeature/\"\nPKG_URL=\"https://www.x.org/archive/individual/driver/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libdrm xorg-server\"\nPKG_LONGDESC=\"Xorg driver for AMD Radeon GPUs using the amdgpu kernel driver.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-udev \\\n                           --enable-glamor \\\n                           --with-xorg-module-dir=${XORG_PATH_MODULES}\"\n\npost_makeinstall_target() {\n  rm -r ${INSTALL}/usr/share\n  mkdir -p ${INSTALL}/etc/X11\n    cp ${PKG_BUILD}/conf/10-amdgpu.conf ${INSTALL}/etc/X11/xorg-amdgpu.conf\n}\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-ati/config/xorg-radeon.conf",
    "content": "Section \"Device\"\n        Identifier  \"AMD Graphics\"\n        Driver      \"radeon\"\n\n        # uncomment the following options to use DRI3 and glamor, otherwise DRI2 and exa\n        # Option      \"DRI3\"        \"1\"\n        # Option      \"AccelMethod\" \"glamor\"\nEndsection\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-ati/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xf86-video-ati\"\nPKG_VERSION=\"19.1.0\"\nPKG_SHA256=\"659f5a1629eea5f5334d9b39b18e6807a63aa1efa33c1236d9cc53acbb223c49\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.x.org/wiki/RadeonFeature/\"\nPKG_URL=\"http://xorg.freedesktop.org/archive/individual/driver/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain xorg-server\"\nPKG_LONGDESC=\"ATI/AMD Radeon video driver for the Xorg X server.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-glamor \\\n                           --with-xorg-module-dir=${XORG_PATH_MODULES}\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/etc/X11\n    cp ${PKG_DIR}/config/*.conf ${INSTALL}/etc/X11\n}\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-ati/patches/xf86-video-ati-999.01-fix-gcc-10.patch",
    "content": "From f223035f4ffcff2a9296d1e907a5193f8e8845a3 Mon Sep 17 00:00:00 2001\nFrom: Adam Jackson <ajax@redhat.com>\nDate: Tue, 4 Feb 2020 16:38:06 -0500\nSubject: [PATCH] Fix link failure with gcc 10\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nWithout the 'extern' this looks like a definition not just a\ndeclaration, in every file that includes the header. gcc 10 is stricter\nabout this kind of multiple definition.\n\nReviewed-by: Michel Dänzer <mdaenzer@redhat.com>\n---\n src/drmmode_display.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/src/drmmode_display.h b/src/drmmode_display.h\nindex 96eaef0a..8cd8a0a6 100644\n--- a/src/drmmode_display.h\n+++ b/src/drmmode_display.h\n@@ -262,7 +262,7 @@ Bool drmmode_wait_vblank(xf86CrtcPtr crtc, drmVBlankSeqType type,\n \t\t\t uint64_t *ust, uint32_t *result_seq);\n \n \n-miPointerSpriteFuncRec drmmode_sprite_funcs;\n+extern miPointerSpriteFuncRec drmmode_sprite_funcs;\n \n \n #endif\n-- \n2.26.2\n\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-ati/patches/xf86-video-ati-999.02-cleanup-terminology-to-use-primary-secondary.patch",
    "content": "From 8da3e4561ef82bb78c9a17b8cd8bf139b9cfd680 Mon Sep 17 00:00:00 2001\nFrom: Dave Airlie <airlied@redhat.com>\nDate: Mon, 13 Jul 2020 09:11:28 +1000\nSubject: [PATCH] ati: cleanup terminology to use primary/secondary\n\nThe X server changed some API/ABIs here.\n\nBased on amdgpu patch by Michel\n---\n man/radeon.man        |  2 +-\n src/compat-api.h      |  6 ++++\n src/drmmode_display.c |  4 +--\n src/evergreen_state.h |  2 +-\n src/r600_state.h      |  2 +-\n src/radeon.h          | 10 +++---\n src/radeon_exa.c      |  2 +-\n src/radeon_glamor.c   |  2 +-\n src/radeon_kms.c      | 74 +++++++++++++++++++++----------------------\n 9 files changed, 55 insertions(+), 49 deletions(-)\n\ndiff --git a/man/radeon.man b/man/radeon.man\nindex dcebf537..247dcdb7 100644\n--- a/man/radeon.man\n+++ b/man/radeon.man\n@@ -290,7 +290,7 @@ on. If this option is set, the default value of the property is 'on' or 'off'\n accordingly. If this option isn't set, the default value of the property is\n .B auto,\n which means that TearFree is on for rotated outputs, outputs with RandR\n-transforms applied and for RandR 1.4 slave outputs, otherwise off.\n+transforms applied and for RandR 1.4 secondary outputs, otherwise off.\n .TP\n .BI \"Option \\*qAccelMethod\\*q \\*q\" \"string\" \\*q\n Chooses between available acceleration architectures.  Valid values are\ndiff --git a/src/compat-api.h b/src/compat-api.h\nindex f4e7524f..def6d3e4 100644\n--- a/src/compat-api.h\n+++ b/src/compat-api.h\n@@ -34,4 +34,10 @@\n #define BLOCKHANDLER_ARGS pScreen, pTimeout, pReadmask\n #endif\n \n+#if ABI_VIDEODRV_VERSION < SET_ABI_VERSION(25, 2)\n+#define current_primary current_master\n+#define primary_pixmap master_pixmap\n+#define secondary_dst slave_dst\n+#endif\n+\n #endif\ndiff --git a/src/drmmode_display.c b/src/drmmode_display.c\nindex 72f96a0c..3099a729 100644\n--- a/src/drmmode_display.c\n+++ b/src/drmmode_display.c\n@@ -720,7 +720,7 @@ drmmode_crtc_prime_scanout_update(xf86CrtcPtr crtc, DisplayModePtr mode,\n \t\txorg_list_for_each_entry(dirty, &screen->pixmap_dirty_list,\n \t\t\t\t\t ent) {\n \t\t\tif (radeon_dirty_src_equals(dirty, drmmode_crtc->prime_scanout_pixmap)) {\n-\t\t\t\tdirty->slave_dst =\n+\t\t\t\tdirty->secondary_dst =\n \t\t\t\t\tdrmmode_crtc->scanout[scanout_id].pixmap;\n \t\t\t\tbreak;\n \t\t\t}\n@@ -1356,7 +1356,7 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)\n \n \txorg_list_for_each_entry(dirty, &screen->pixmap_dirty_list, ent) {\n \t\tif (radeon_dirty_src_equals(dirty, drmmode_crtc->prime_scanout_pixmap)) {\n-\t\t\tPixmapStopDirtyTracking(dirty->src, dirty->slave_dst);\n+\t\t\tPixmapStopDirtyTracking(dirty->src, dirty->secondary_dst);\n \t\t\tbreak;\n \t\t}\n \t}\ndiff --git a/src/evergreen_state.h b/src/evergreen_state.h\nindex 7e54e1c7..34ba87b6 100644\n--- a/src/evergreen_state.h\n+++ b/src/evergreen_state.h\n@@ -350,7 +350,7 @@ extern void *RADEONEXACreatePixmap2(ScreenPtr pScreen, int width, int height,\n \t\t\t\t    int *new_pitch);\n extern void RADEONEXADestroyPixmap(ScreenPtr pScreen, void *driverPriv);\n extern Bool RADEONEXAPixmapIsOffscreen(PixmapPtr pPix);\n-extern Bool RADEONEXASharePixmapBacking(PixmapPtr ppix, ScreenPtr slave, void **handle_p);\n+extern Bool RADEONEXASharePixmapBacking(PixmapPtr ppix, ScreenPtr secondary, void **handle_p);\n extern Bool RADEONEXASetSharedPixmapBacking(PixmapPtr ppix, void *handle);\n \n #endif\ndiff --git a/src/r600_state.h b/src/r600_state.h\nindex 34345996..567c3ca2 100644\n--- a/src/r600_state.h\n+++ b/src/r600_state.h\n@@ -321,6 +321,6 @@ extern void *RADEONEXACreatePixmap2(ScreenPtr pScreen, int width, int height,\n \t\t\t\t    int *new_pitch);\n extern void RADEONEXADestroyPixmap(ScreenPtr pScreen, void *driverPriv);\n extern Bool RADEONEXAPixmapIsOffscreen(PixmapPtr pPix);\n-extern Bool RADEONEXASharePixmapBacking(PixmapPtr ppix, ScreenPtr slave, void **handle_p);\n+extern Bool RADEONEXASharePixmapBacking(PixmapPtr ppix, ScreenPtr secondary, void **handle_p);\n extern Bool RADEONEXASetSharedPixmapBacking(PixmapPtr ppix, void *handle);\n #endif\ndiff --git a/src/radeon.h b/src/radeon.h\nindex e4a2ba66..68d7756a 100644\n--- a/src/radeon.h\n+++ b/src/radeon.h\n@@ -182,18 +182,18 @@ typedef enum {\n \n \n static inline ScreenPtr\n-radeon_master_screen(ScreenPtr screen)\n+radeon_primary_screen(ScreenPtr screen)\n {\n-    if (screen->current_master)\n-\treturn screen->current_master;\n+    if (screen->current_primary)\n+\treturn screen->current_primary;\n \n     return screen;\n }\n \n static inline ScreenPtr\n-radeon_dirty_master(PixmapDirtyUpdatePtr dirty)\n+radeon_dirty_primary(PixmapDirtyUpdatePtr dirty)\n {\n-    return radeon_master_screen(dirty->slave_dst->drawable.pScreen);\n+    return radeon_primary_screen(dirty->secondary_dst->drawable.pScreen);\n }\n \n static inline DrawablePtr\ndiff --git a/src/radeon_exa.c b/src/radeon_exa.c\nindex 268155ed..320ff992 100644\n--- a/src/radeon_exa.c\n+++ b/src/radeon_exa.c\n@@ -282,7 +282,7 @@ void RADEONEXADestroyPixmap(ScreenPtr pScreen, void *driverPriv)\n     free(driverPriv);\n }\n \n-Bool RADEONEXASharePixmapBacking(PixmapPtr ppix, ScreenPtr slave, void **fd_handle)\n+Bool RADEONEXASharePixmapBacking(PixmapPtr ppix, ScreenPtr seconndary, void **fd_handle)\n {\n     struct radeon_exa_pixmap_priv *driver_priv = exaGetPixmapDriverPrivate(ppix);\n \ndiff --git a/src/radeon_glamor.c b/src/radeon_glamor.c\nindex f1098381..ccf99941 100644\n--- a/src/radeon_glamor.c\n+++ b/src/radeon_glamor.c\n@@ -366,7 +366,7 @@ radeon_glamor_set_pixmap_bo(DrawablePtr drawable, PixmapPtr pixmap)\n \n \n static Bool\n-radeon_glamor_share_pixmap_backing(PixmapPtr pixmap, ScreenPtr slave,\n+radeon_glamor_share_pixmap_backing(PixmapPtr pixmap, ScreenPtr secondary,\n \t\t\t\t   void **handle_p)\n {\n \tScreenPtr screen = pixmap->drawable.pScreen;\ndiff --git a/src/radeon_kms.c b/src/radeon_kms.c\nindex b3db7c41..62962d61 100644\n--- a/src/radeon_kms.c\n+++ b/src/radeon_kms.c\n@@ -559,8 +559,8 @@ dirty_region(PixmapDirtyUpdatePtr dirty)\n \tif (dirty->rotation != RR_Rotate_0) {\n \t\tdstregion = transform_region(damageregion,\n \t\t\t\t\t     &dirty->f_inverse,\n-\t\t\t\t\t     dirty->slave_dst->drawable.width,\n-\t\t\t\t\t     dirty->slave_dst->drawable.height);\n+\t\t\t\t\t     dirty->secondary_dst->drawable.width,\n+\t\t\t\t\t     dirty->secondary_dst->drawable.height);\n \t} else\n #endif\n \t{\n@@ -568,7 +568,7 @@ dirty_region(PixmapDirtyUpdatePtr dirty)\n \n \t    dstregion = RegionDuplicate(damageregion);\n \t    RegionTranslate(dstregion, -dirty->x, -dirty->y);\n-\t    PixmapRegionInit(&pixregion, dirty->slave_dst);\n+\t    PixmapRegionInit(&pixregion, dirty->secondary_dst);\n \t    RegionIntersect(dstregion, dstregion, &pixregion);\n \t    RegionUninit(&pixregion);\n \t}\n@@ -585,8 +585,8 @@ redisplay_dirty(PixmapDirtyUpdatePtr dirty, RegionPtr region)\n \tif (RegionNil(region))\n \t\tgoto out;\n \n-\tif (dirty->slave_dst->master_pixmap)\n-\t    DamageRegionAppend(&dirty->slave_dst->drawable, region);\n+\tif (dirty->secondary_dst->primary_pixmap)\n+\t    DamageRegionAppend(&dirty->secondary_dst->drawable, region);\n \n #ifdef HAS_DIRTYTRACKING_ROTATION\n \tPixmapSyncDirtyHelper(dirty);\n@@ -595,8 +595,8 @@ redisplay_dirty(PixmapDirtyUpdatePtr dirty, RegionPtr region)\n #endif\n \n \tradeon_cs_flush_indirect(src_scrn);\n-\tif (dirty->slave_dst->master_pixmap)\n-\t    DamageRegionProcessPending(&dirty->slave_dst->drawable);\n+\tif (dirty->secondary_dst->primary_pixmap)\n+\t    DamageRegionProcessPending(&dirty->secondary_dst->drawable);\n \n out:\n \tDamageEmpty(dirty->damage);\n@@ -613,12 +613,12 @@ radeon_prime_scanout_update_abort(xf86CrtcPtr crtc, void *event_data)\n void\n radeon_sync_shared_pixmap(PixmapDirtyUpdatePtr dirty)\n {\n-    ScreenPtr master_screen = radeon_dirty_master(dirty);\n+    ScreenPtr primary_screen = radeon_dirty_primary(dirty);\n     PixmapDirtyUpdatePtr ent;\n     RegionPtr region;\n \n-    xorg_list_for_each_entry(ent, &master_screen->pixmap_dirty_list, ent) {\n-\tif (!radeon_dirty_src_equals(dirty, ent->slave_dst))\n+    xorg_list_for_each_entry(ent, &primary_screen->pixmap_dirty_list, ent) {\n+\tif (!radeon_dirty_src_equals(dirty, ent->secondary_dst))\n \t    continue;\n \n \tregion = dirty_region(ent);\n@@ -631,45 +631,45 @@ radeon_sync_shared_pixmap(PixmapDirtyUpdatePtr dirty)\n #if HAS_SYNC_SHARED_PIXMAP\n \n static Bool\n-master_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)\n+primary_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)\n {\n-    ScreenPtr master_screen = radeon_dirty_master(dirty);\n+    ScreenPtr primary_screen = radeon_dirty_primary(dirty);\n \n-    return !!master_screen->SyncSharedPixmap;\n+    return !!primary_screen->SyncSharedPixmap;\n }\n \n static Bool\n-slave_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)\n+secondary_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)\n {\n-    ScreenPtr slave_screen = dirty->slave_dst->drawable.pScreen;\n+    ScreenPtr secondary_screen = dirty->secondary_dst->drawable.pScreen;\n \n-    return !!slave_screen->SyncSharedPixmap;\n+    return !!secondary_screen->SyncSharedPixmap;\n }\n \n static void\n call_sync_shared_pixmap(PixmapDirtyUpdatePtr dirty)\n {\n-    ScreenPtr master_screen = radeon_dirty_master(dirty);\n+    ScreenPtr primary_screen = radeon_dirty_primary(dirty);\n \n-    master_screen->SyncSharedPixmap(dirty);\n+    primary_screen->SyncSharedPixmap(dirty);\n }\n \n #else /* !HAS_SYNC_SHARED_PIXMAP */\n \n static Bool\n-master_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)\n+primary_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)\n {\n-    ScrnInfoPtr master_scrn = xf86ScreenToScrn(radeon_dirty_master(dirty));\n+    ScrnInfoPtr primary_scrn = xf86ScreenToScrn(radeon_dirty_primary(dirty));\n \n-    return master_scrn->driverName == scrn->driverName;\n+    return primary_scrn->driverName == scrn->driverName;\n }\n \n static Bool\n-slave_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)\n+secondary_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)\n {\n-    ScrnInfoPtr slave_scrn = xf86ScreenToScrn(dirty->slave_dst->drawable.pScreen);\n+    ScrnInfoPtr secondary_scrn = xf86ScreenToScrn(dirty->secondary_dst->drawable.pScreen);\n \n-    return slave_scrn->driverName == scrn->driverName;\n+    return secondary_scrn->driverName == scrn->driverName;\n }\n \n static void\n@@ -684,12 +684,12 @@ call_sync_shared_pixmap(PixmapDirtyUpdatePtr dirty)\n static xf86CrtcPtr\n radeon_prime_dirty_to_crtc(PixmapDirtyUpdatePtr dirty)\n {\n-    ScreenPtr screen = dirty->slave_dst->drawable.pScreen;\n+    ScreenPtr screen = dirty->secondary_dst->drawable.pScreen;\n     ScrnInfoPtr scrn = xf86ScreenToScrn(screen);\n     xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);\n     int c;\n \n-    /* Find the CRTC which is scanning out from this slave pixmap */\n+    /* Find the CRTC which is scanning out from this secondary pixmap */\n     for (c = 0; c < xf86_config->num_crtc; c++) {\n \txf86CrtcPtr xf86_crtc = xf86_config->crtc[c];\n \tdrmmode_crtc_private_ptr drmmode_crtc = xf86_crtc->driver_private;\n@@ -714,7 +714,7 @@ radeon_prime_scanout_do_update(xf86CrtcPtr crtc, unsigned scanout_id)\n \tif (radeon_dirty_src_equals(dirty, drmmode_crtc->prime_scanout_pixmap)) {\n \t    RegionPtr region;\n \n-\t    if (master_has_sync_shared_pixmap(scrn, dirty))\n+\t    if (primary_has_sync_shared_pixmap(scrn, dirty))\n \t\tcall_sync_shared_pixmap(dirty);\n \n \t    region = dirty_region(dirty);\n@@ -727,7 +727,7 @@ radeon_prime_scanout_do_update(xf86CrtcPtr crtc, unsigned scanout_id)\n \t\tradeon_cs_flush_indirect(scrn);\n \t\tRegionCopy(&drmmode_crtc->scanout_last_region, region);\n \t\tRegionTranslate(region, -crtc->x, -crtc->y);\n-\t\tdirty->slave_dst = drmmode_crtc->scanout[scanout_id].pixmap;\n+\t\tdirty->secondary_dst = drmmode_crtc->scanout[scanout_id].pixmap;\n \t    }\n \n \t    redisplay_dirty(dirty, region);\n@@ -754,7 +754,7 @@ radeon_prime_scanout_update_handler(xf86CrtcPtr crtc, uint32_t frame, uint64_t u\n static void\n radeon_prime_scanout_update(PixmapDirtyUpdatePtr dirty)\n {\n-    ScreenPtr screen = dirty->slave_dst->drawable.pScreen;\n+    ScreenPtr screen = dirty->secondary_dst->drawable.pScreen;\n     ScrnInfoPtr scrn = xf86ScreenToScrn(screen);\n     RADEONEntPtr pRADEONEnt = RADEONEntPriv(scrn);\n     xf86CrtcPtr xf86_crtc = radeon_prime_dirty_to_crtc(dirty);\n@@ -818,7 +818,7 @@ radeon_prime_scanout_update(PixmapDirtyUpdatePtr dirty)\n static void\n radeon_prime_scanout_flip(PixmapDirtyUpdatePtr ent)\n {\n-    ScreenPtr screen = ent->slave_dst->drawable.pScreen;\n+    ScreenPtr screen = ent->secondary_dst->drawable.pScreen;\n     ScrnInfoPtr scrn = xf86ScreenToScrn(screen);\n     RADEONEntPtr pRADEONEnt = RADEONEntPriv(scrn);\n     xf86CrtcPtr crtc = radeon_prime_dirty_to_crtc(ent);\n@@ -893,11 +893,11 @@ radeon_dirty_update(ScrnInfoPtr scrn)\n \t\tif (screen->isGPU) {\n \t\t\tPixmapDirtyUpdatePtr region_ent = ent;\n \n-\t\t\tif (master_has_sync_shared_pixmap(scrn, ent)) {\n-\t\t\t\tScreenPtr master_screen = radeon_dirty_master(ent);\n+\t\t\tif (primary_has_sync_shared_pixmap(scrn, ent)) {\n+\t\t\t\tScreenPtr primary_screen = radeon_dirty_primary(ent);\n \n-\t\t\t\txorg_list_for_each_entry(region_ent, &master_screen->pixmap_dirty_list, ent) {\n-\t\t\t\t\tif (radeon_dirty_src_equals(ent, region_ent->slave_dst))\n+\t\t\t\txorg_list_for_each_entry(region_ent, &primary_screen->pixmap_dirty_list, ent) {\n+\t\t\t\t\tif (radeon_dirty_src_equals(ent, region_ent->secondary_dst))\n \t\t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n@@ -921,7 +921,7 @@ radeon_dirty_update(ScrnInfoPtr scrn)\n \n \t\t\tRegionDestroy(region);\n \t\t} else {\n-\t\t\tif (slave_has_sync_shared_pixmap(scrn, ent))\n+\t\t\tif (secondary_has_sync_shared_pixmap(scrn, ent))\n \t\t\t\tcontinue;\n \n \t\t\tregion = dirty_region(ent);\n@@ -1216,7 +1216,7 @@ static void RADEONBlockHandler_KMS(BLOCKHANDLER_ARGS_DECL)\n     (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS);\n     pScreen->BlockHandler = RADEONBlockHandler_KMS;\n \n-    if (!xf86ScreenToScrn(radeon_master_screen(pScreen))->vtSema)\n+    if (!xf86ScreenToScrn(radeon_primary_screen(pScreen))->vtSema)\n \treturn;\n \n     if (!pScreen->isGPU)\n@@ -2584,7 +2584,7 @@ CARD32 cleanup_black_fb(OsTimerPtr timer, CARD32 now, pointer data)\n     xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);\n     int c;\n \n-    if (xf86ScreenToScrn(radeon_master_screen(screen))->vtSema)\n+    if (xf86ScreenToScrn(radeon_primary_screen(screen))->vtSema)\n \treturn 0;\n \n     /* Unreference the all-black FB created by RADEONLeaveVT_KMS. After\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-intel/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xf86-video-intel\"\nPKG_VERSION=\"31486f40f8e8f8923ca0799aea84b58799754564\"\nPKG_SHA256=\"e47eb678c681d80df138e897ee27c79f9b42e3517d55b1f0684e9a70361c8218\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.x.org/wiki/IntelGraphicsDriver/\"\nPKG_URL=\"https://gitlab.freedesktop.org/xorg/driver/${PKG_NAME}/-/archive/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain libXcomposite libXxf86vm libXdamage libdrm util-macros systemd xorg-server\"\nPKG_LONGDESC=\"Open-source Xorg graphics driver for Intel graphics.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-backlight \\\n                           --disable-backlight-helper \\\n                           --disable-gen4asm \\\n                           --enable-udev \\\n                           --disable-tools \\\n                           --enable-dri \\\n                           --disable-dri1 \\\n                           --enable-dri2 \\\n                           --enable-dri3 \\\n                           --enable-kms --enable-kms-only \\\n                           --disable-ums --disable-ums-only \\\n                           --enable-sna \\\n                           --enable-uxa \\\n                           --disable-xvmc \\\n                           --disable-xaa \\\n                           --disable-dga \\\n                           --disable-tear-free \\\n                           --disable-create2 \\\n                           --disable-async-swap \\\n                           --with-xorg-module-dir=${XORG_PATH_MODULES}\"\n\nif [ \"${VULKAN_SUPPORT}\" = \"yes\" ]; then\n  PKG_CONFIGURE_OPTS_TARGET+=\" --with-default-dri=3\"\nelse\n  PKG_CONFIGURE_OPTS_TARGET+=\" --with-default-dri=2\"\nfi\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/share/polkit-1\n}\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-intel/patches/xf86-video-intel-100.01-prefer-iris-and-crocus-over-i965.patch",
    "content": "--- /src/sna/sna_dri2.c\n+++ /src/sna/sna_dri2.c\n@@ -3707,8 +3707,10 @@\n \t\t\treturn has_i830_dri() ? \"i830\" : \"i915\";\n \t\telse if (sna->kgem.gen < 040)\n \t\t\treturn \"i915\";\n+\t\telse if (sna->kgem.gen < 0100)\n+\t\t\treturn \"crocus\";\n \t\telse\n-\t\t\treturn \"i965\";\n+\t\t\treturn \"iris\";\n \t}\n \n \treturn s;\n\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia/config/xorg-nvidia.conf",
    "content": "Section \"Device\"\n    Identifier     \"nvidia\"\n    Driver         \"nvidia\"\n    Option         \"DynamicTwinView\" \"False\"\n    Option         \"NoFlip\" \"false\"\n    Option         \"NoLogo\" \"true\"\n    Option         \"ConnectToAcpid\" \"0\"\n    Option         \"ModeValidation\" \"NoVesaModes, NoXServerModes\"\n    Option         \"HWCursor\" \"false\"\n    # To put Xorg in debug mode change \"false\" to \"true\" in the line below:\n    Option         \"ModeDebug\" \"false\"\n    # To use a local edid.bin file uncomment the 4 lines below (change DFP-0 to match your card)\n#    Option         \"ConnectedMonitor\" \"DFP-0\"\n#    Option         \"CustomEDID\" \"DFP-0:/storage/.config/edid.bin\"\n#    Option         \"IgnoreEDID\" \"false\"\n#    Option         \"UseEDID\" \"true\"\nEndSection\n\nSection \"Screen\"\n    Identifier     \"screen\"\n    Device         \"nvidia\"\n    DefaultDepth    24\n    Option         \"ColorRange\" \"Full\"\n#    Option         \"ColorRange\" \"Limited\"\n#    Option         \"ColorSpace\" \"RGB\"\n    SubSection     \"Display\"\n        Depth       24\n    EndSubSection\nEndSection\n\nSection \"Extensions\"\n    Option         \"Composite\" \"false\"\nEndSection\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xf86-video-nvidia\"\n# Remember to run \"python3 packages/x11/driver/xf86-video-nvidia/scripts/make_nvidia_udev.py\" and commit\n# changes to \"packages/x11/driver/xf86-video-nvidia/udev.d/96-nvidia.rules\" whenever bumping version.\n# The build host may require installation of python3-lxml and python3-requests packages.\nPKG_VERSION=\"470.161.03\"\nPKG_SHA256=\"b318c15d519898fd60c64ef73fdd331045884a1d97d811a25fbced544b5be6ad\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"https://www.nvidia.com/en-us/drivers/unix/\"\nPKG_URL=\"http://us.download.nvidia.com/XFree86/Linux-x86_64/${PKG_VERSION}/NVIDIA-Linux-x86_64-${PKG_VERSION}-no-compat32.run\"\nPKG_DEPENDS_TARGET=\"util-macros xorg-server libvdpau libglvnd\"\nPKG_LONGDESC=\"The Xorg driver for NVIDIA GPUs supporting the GeForce 600 Series & above.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_KERNEL_PKG=\"yes\"\n\nif [ \"${VULKAN_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${VULKAN} vulkan-tools\"\nfi\n\nunpack() {\n  [ -d ${PKG_BUILD} ] && rm -rf ${PKG_BUILD}\n\n  sh ${SOURCES}/${PKG_NAME}/${PKG_SOURCE_NAME} --extract-only --target ${PKG_BUILD}\n}\n\nmake_target() {\n  unset LDFLAGS\n\n  cd kernel\n    make module CC=${CC} LD=${LD} SYSSRC=$(kernel_path) SYSOUT=$(kernel_path)\n    ${STRIP} --strip-debug nvidia.ko\n  cd ..\n}\n\nmakeinstall_target() {\n  # Linux kernel modules\n  mkdir -p ${INSTALL}/usr/lib/nvidia\n    cp -P kernel/nvidia.ko ${INSTALL}/usr/lib/nvidia\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/nvidia\n    ln -sf /var/lib/nvidia.ko      ${INSTALL}/$(get_full_module_dir)/nvidia/nvidia.ko\n    cp -P kernel/nvidia-uvm.ko     ${INSTALL}/$(get_full_module_dir)/nvidia\n    cp -P kernel/nvidia-modeset.ko ${INSTALL}/$(get_full_module_dir)/nvidia\n\n  # X driver\n  mkdir -p ${INSTALL}/${XORG_PATH_MODULES}/drivers\n    cp -P nvidia_drv.so ${INSTALL}/${XORG_PATH_MODULES}/drivers/nvidia-main_drv.so\n    ln -sf /var/lib/nvidia_drv.so ${INSTALL}/${XORG_PATH_MODULES}/drivers/nvidia_drv.so\n\n  # GLX extension module for X\n  mkdir -p ${INSTALL}/${XORG_PATH_MODULES}/extensions\n  # rename to avoid conflicts with X.Org-Server module libglx.so\n    cp -P libglxserver_nvidia.so.${PKG_VERSION} ${INSTALL}/${XORG_PATH_MODULES}/extensions/libglx_nvidia.so\n\n  # Xorg config\n  mkdir -p ${INSTALL}/etc/X11\n    cp ${PKG_DIR}/config/*.conf ${INSTALL}/etc/X11\n\n  # GLX\n  mkdir -p ${INSTALL}/usr/lib\n    cp -P libGLX_nvidia.so.${PKG_VERSION} ${INSTALL}/usr/lib/libGLX_nvidia.so.0\n\n  # GLVND\n  mkdir -p ${INSTALL}/usr/share/glvnd/egl_vendor.d\n    cp -p 10_nvidia.json ${INSTALL}/usr/share/glvnd/egl_vendor.d\n\n  # OpenGL / EGL\n  mkdir -p ${INSTALL}/usr/lib\n    cp -p libEGL_nvidia.so.${PKG_VERSION}  ${INSTALL}/usr/lib/\n    ln -sf libEGL_nvidia.so.${PKG_VERSION} ${INSTALL}/usr/lib/libEGL_nvidia.so.0\n    ln -sf libEGL_nvidia.so.0              ${INSTALL}/usr/lib/libEGL_nvidia.so\n\n  # OpenGL core\n  mkdir -p ${INSTALL}/usr/lib\n    cp -p libnvidia-eglcore.so.${PKG_VERSION}  ${INSTALL}/usr/lib/\n    cp -P libnvidia-glcore.so.${PKG_VERSION}   ${INSTALL}/usr/lib\n    cp -p libnvidia-glsi.so.${PKG_VERSION}     ${INSTALL}/usr/lib\n\n  # Install Vulkan ICD & SPIR-V lib\n  if [ \"${VULKAN_SUPPORT}\" = \"yes\" ]; then\n    mkdir -p ${INSTALL}/usr/lib\n      cp -P libnvidia-glvkspirv.so.${PKG_VERSION} ${INSTALL}/usr/lib\n    mkdir -p ${INSTALL}/usr/share/vulkan/icd.d\n      cp -P nvidia_icd.json ${INSTALL}/usr/share/vulkan/icd.d\n    mkdir -p ${INSTALL}/usr/share/vulkan/implicit_layer.d\n      cp -P nvidia_layers.json ${INSTALL}/usr/share/vulkan/icd.d\n  fi\n\n  # nvidia-tls\n  mkdir -p ${INSTALL}/usr/lib\n    cp -P libnvidia-tls.so.${PKG_VERSION} ${INSTALL}/usr/lib\n\n  # NVIDIA Management Library (NVML) / System Management Interface\n  mkdir -p ${INSTALL}/usr/bin\n    ln -s /var/lib/nvidia-smi ${INSTALL}/usr/bin/nvidia-smi\n    cp nvidia-smi ${INSTALL}/usr/bin/nvidia-main-smi\n\n  mkdir -p ${INSTALL}/usr/lib\n    cp -P libnvidia-ml.so.${PKG_VERSION} ${INSTALL}/usr/lib\n    ln -sf /var/lib/libnvidia-ml.so.1 ${INSTALL}/usr/lib/libnvidia-ml.so.1\n\n  # Tool for manipulating X server configuration files\n  mkdir -p ${INSTALL}/usr/bin\n    ln -s /var/lib/nvidia-xconfig ${INSTALL}/usr/bin/nvidia-xconfig\n    cp nvidia-xconfig ${INSTALL}/usr/bin/nvidia-main-xconfig\n\n  # VDPAU\n  mkdir -p ${INSTALL}/usr/lib/vdpau\n    cp libvdpau_nvidia.so* ${INSTALL}/usr/lib/vdpau/libvdpau_nvidia-main.so.1\n    ln -sf /var/lib/libvdpau_nvidia.so ${INSTALL}/usr/lib/vdpau/libvdpau_nvidia.so\n    ln -sf /var/lib/libvdpau_nvidia.so.1 ${INSTALL}/usr/lib/vdpau/libvdpau_nvidia.so.1\n\n  # App profiles\n  mkdir -p ${INSTALL}/usr/share/nvidia\n    cp -P nvidia-application-profiles-${PKG_VERSION}-rc ${INSTALL}/usr/share/nvidia\n}\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia/scripts/compare_nvidia.py",
    "content": "#!/usr/bin/env python3\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv\n\nimport re\nimport os\nimport requests\nimport sys\n\ntry:\n  from lxml import html\nexcept:\n  print('lxml module not installed.\\n\\nOn Ubuntu, use \"sudo apt install python3-lxml\"')\n  sys.exit(1)\n\ncategory = {\n             1: 'Nvidia Geforce GPUs',\n             2: 'Nvidia Quadro GPUs',\n             3: 'Nvidia NVS GPUs',\n             4: 'Nvidia Tesla GPUs',\n           }\n\nversions = []\nunique_ids = {}\nall_ids = {i: [] for i in range(1, len(category))}\n\ndef id_in_version(id, ids):\n  if any(id == value for value in ids):\n    return \"x\"\n  else:\n    return \" \"\n\nif len(sys.argv) <= 1:\n  print(\"Usage: python compare_nvidia.py <version> ...\")\n  exit()\n\nfor version in sys.argv[1:]:\n  versions.append(version)\n\nfor version in versions:\n  url = 'http://us.download.nvidia.com/XFree86/Linux-x86_64/' + version + '/README/supportedchips.html'\n\n  headers = {\n    'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1',\n  }\n\n  page = requests.get(url, headers=headers)\n  tree = html.fromstring(page.content)\n\n  # These are the tables we want to use (gpu's supported by the current driver)\n  # NVIDIA GeForce GPUs = 1\n  # NVIDIA Quadro GPUs = 2\n  # NVIDIA NVS GPUs = 3\n  # NVIDIA Tesla GPUs = 4\n\n  ids = {}\n  unique_ids[version] = {}\n\n  for table in range(1, len(category)):\n    new_ids = tree.xpath('//html/body/div[@class=\"appendix\"]/div[@class=\"informaltable\"][' + str(table) + ']/table/tbody/tr[starts-with(@id, \"devid\")]/td[2]//text()')\n    new_labels = tree.xpath('//html/body/div[@class=\"appendix\"]/div[@class=\"informaltable\"][' + str(table) + ']/table/tbody/tr[starts-with(@id, \"devid\")]/td[1]//text()')\n\n    # nvidia seems to like to change the way they do things...\n    if not new_ids:\n      new_ids = tree.xpath('//html/body/div[@class=\"appendix\"]/div[@class=\"informaltable\"][' + str(table) + ']/table/tbody/tr[starts-with(@id, \"0x\")]/td[2]//text()')\n      new_labels = tree.xpath('//html/body/div[@class=\"appendix\"]/div[@class=\"informaltable\"][' + str(table) + ']/table/tbody/tr[starts-with(@id, \"0x\")]/td[1]//text()')\n\n      # just to make sure we get the raw id without 0x in front\n      new_ids = [re.sub(r\"^0x\", '', id) for id in new_ids]\n\n    # If three IDs are listed, the first is the PCI Device ID, the second is the PCI Subsystem Vendor ID, and the third is the PCI Subsystem Device ID.\n    # We only want the PCI Device ID (the first value)\n    new_ids = [id.split()[0].lower() for id in new_ids]\n\n    # Sort and remove duplicate ID's\n    ids[table] = sorted(set(zip(new_ids, new_labels)))\n\n    # Add ids to list of all ids from all drivers being queried\n    all_ids[table].extend(ids[table])\n\n  # Add the ids for the specific driver version\n  unique_ids[version] = ids\n\nprint(\"%s\\t\" % (\"ID\"), end='')\nfor version in versions:\n  print(\"%s\\t\" % (version), end='')\nprint(\"Card Name\")\n\nprint(\"-----------------------------------------------------------------------------------------------\")\n\nfor table in all_ids:\n  all_ids[table] = sorted(set(all_ids[table]))\n  print(\"%s\" % (category[table]))\n  print(\"-----------------------------------------------------------------------------------------------\")\n  for id in all_ids[table]:\n    print(\"%s\\t\" % (id[0]), end='')\n    for version in versions:\n      print(\"%s\\t\" % (id_in_version(id, unique_ids[version][table])), end='')\n    print(\"%s\\t\" % (id[1]), end='')\n    print(\"\")\n  print(\"-----------------------------------------------------------------------------------------------\\n\")\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia/scripts/make_nvidia_udev.py",
    "content": "#!/usr/bin/env python3\n\nimport os, sys\nimport requests\n\ntry:\n  from lxml import html\nexcept:\n  print('lxml module not installed.\\n\\nOn Ubuntu, use \"sudo apt install python3-lxml\"')\n  sys.exit(1)\n\n__cwd__     = os.path.dirname(os.path.realpath(__file__))\n__rules__    = __cwd__ + '/../udev.d/96-nvidia.rules'\n__package__ = __cwd__ + '/../package.mk'\n\n# Get the Nvidia driver version currently being used\nfor line in open(__package__, 'r'):\n if \"PKG_VERSION\" in line:\n   __version__ = line.split('=')[1].replace('\"','').strip()\n   break\n\nurl = 'http://us.download.nvidia.com/XFree86/Linux-x86_64/' + __version__ + '/README/supportedchips.html'\n\nheaders = {\n  'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1',\n}\n\npage = requests.get(url, headers=headers)\ntree = html.fromstring(page.content)\n\n# These are the tables we want to use (gpu's supported by the current driver)\n# NVIDIA GeForce GPUs = 1\n# NVIDIA Quadro GPUs = 2\n# NVIDIA NVS GPUs = 3\n# NVIDIA Tesla GPUs = 4\n\nids = []\nfor table in range(1, 5):\n  ids = ids + tree.xpath('//html/body/div[@class=\"appendix\"]/div[@class=\"informaltable\"][' + str(table) + ']/table/tbody/tr[starts-with(@id, \"devid\")]/td[2]//text()')\n\n# If three IDs are listed, the first is the PCI Device ID, the second is the PCI Subsystem Vendor ID, and the third is the PCI Subsystem Device ID.\n# We only want the PCI Device ID (the first value)\nunique_ids = []\nfor id in ids:\n    unique_ids.append(id.split()[0].lower())\n\n# Sort and remove duplicate ID's\nunique_ids = sorted(set(unique_ids))\n\n# Write the rules to the file\nwith open(__rules__, 'w') as f:\n  f.write('ACTION!=\"add|change\", GOTO=\"end_video\"\\n')\n  f.write('SUBSYSTEM==\"pci\", ATTR{class}==\"0x030000\", ATTR{vendor}==\"0x10de\", GOTO=\"subsystem_pci\"\\n')\n  f.write('GOTO=\"end_video\"\\n\\n')\n  f.write('LABEL=\"subsystem_pci\"\\n')\n  for id in unique_ids:\n    f.write('ATTR{device}==\"0x' + str(id) + '\", GOTO=\"configure_nvidia\"\\n')\n  f.write('GOTO=\"configure_nvidia-legacy\"\\n\\n')\n  f.write('LABEL=\"configure_nvidia\"\\n')\n  f.write('ENV{xorg_driver}=\"nvidia\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"xorg-configure@nvidia.service\"\\n')\n  f.write('GOTO=\"end_video\"\\n\\n')\n  f.write('LABEL=\"configure_nvidia-legacy\"\\n')\n  f.write('ENV{xorg_driver}=\"nvidia\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"xorg-configure@nvidia-legacy.service\"\\n')\n  f.write('GOTO=\"end_video\"\\n\\n')\n  f.write('LABEL=\"end_video\"\\n')\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia/udev.d/96-nvidia.rules",
    "content": "ACTION!=\"add|change\", GOTO=\"end_video\"\nSUBSYSTEM==\"pci\", ATTR{class}==\"0x030000\", ATTR{vendor}==\"0x10de\", GOTO=\"subsystem_pci\"\nGOTO=\"end_video\"\n\nLABEL=\"subsystem_pci\"\nATTR{device}==\"0x0fc0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x0fc1\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x0fc2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x0fc6\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x0fc8\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x0fc9\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x0fd2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x0fe3\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x0ff3\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x0ff9\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x0ffa\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x0ffd\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x0ffe\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x0fff\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1001\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1004\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1005\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1007\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1008\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x100a\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x100c\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1021\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1022\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1023\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1024\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1026\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1027\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1028\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1029\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x102a\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x102d\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x103a\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x103c\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1180\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1183\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1184\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1185\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1187\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1188\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1189\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x118e\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x118f\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1193\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1194\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1195\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1199\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x11b4\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x11ba\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x11c0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x11c2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x11c3\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x11c4\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x11c5\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x11c6\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x11c8\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x11cb\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x11e3\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x11fa\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1280\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1281\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1282\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1284\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1286\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1287\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1288\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1289\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x128b\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1290\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1292\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1295\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1299\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1340\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1341\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1344\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1346\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1347\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1348\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1349\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x134b\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x134d\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x134e\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x134f\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x137a\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x137b\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x137d\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1380\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1381\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1382\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1390\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1391\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1392\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1393\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1398\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1399\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x139a\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x139b\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x139c\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x139d\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13b0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13b1\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13b2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13b3\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13b4\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13b6\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13b9\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13ba\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13bb\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13bc\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13c0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13c2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13d7\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13d8\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13d9\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13da\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13f0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13f1\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13f2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13f3\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13f8\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13f9\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13fa\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x13fb\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1401\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1402\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1406\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1407\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1427\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1430\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1431\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1436\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x15f0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x15f7\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x15f8\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x15f9\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1617\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1618\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1619\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x161a\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1667\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x174d\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x174e\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x179c\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x17c2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x17c8\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x17f0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x17f1\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x17fd\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1b00\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1b02\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1b06\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1b30\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1b38\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1b80\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1b81\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1b82\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1b83\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1b84\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1b87\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1ba0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1ba1\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1ba2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1bb0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1bb1\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1bb3\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1bb4\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1bb5\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1bb6\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1bb7\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1bb8\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1bb9\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1bbb\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1bc7\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1be0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1be1\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c02\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c03\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c04\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c06\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c07\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c09\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c20\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c21\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c22\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c23\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c30\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c31\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c60\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c61\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c62\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c81\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c82\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c83\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c8c\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c8d\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c8f\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c90\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c91\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c92\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c94\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1c96\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1cb1\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1cb2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1cb3\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1cb6\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1cba\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1cbb\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1cbc\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1cbd\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1cfa\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1cfb\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1d01\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1d02\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1d10\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1d11\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1d12\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1d13\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1d16\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1d33\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1d34\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1d52\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1d81\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1db1\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1db3\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1db4\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1db5\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1db6\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1db7\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1db8\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1dba\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1df0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1df2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1df5\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1df6\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1e02\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1e04\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1e07\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1e09\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1e30\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1e36\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1e78\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1e81\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1e82\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1e84\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1e87\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1e89\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1e90\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1e91\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1e93\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1eb0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1eb1\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1eb4\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1eb5\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1eb6\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1eb8\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1ec2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1ec7\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1ed0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1ed1\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1ed3\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1ef5\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f02\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f03\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f06\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f07\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f08\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f09\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f0a\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f0b\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f10\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f11\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f12\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f14\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f15\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f36\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f42\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f47\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f50\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f51\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f54\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f55\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f76\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f82\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f91\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f95\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f96\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f97\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f98\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f99\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f9c\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f9d\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1f9f\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1fa0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1fb0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1fb1\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1fb2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1fb6\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1fb7\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1fb8\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1fb9\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1fba\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1fbb\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1fbc\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1fdd\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1ff0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1ff2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x1ff9\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x20b0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x20b1\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x20b2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x20b3\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x20b5\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x20b6\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x20b7\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x20f0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x20f1\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x20f2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2182\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2184\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2187\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2188\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2189\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2191\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2192\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x21c4\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x21d1\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2203\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2204\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2206\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2208\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x220a\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x220d\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2216\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2230\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2231\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2232\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2235\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2236\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2237\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2414\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2420\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2438\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2460\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2482\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2484\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2486\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2487\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2488\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2489\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x248a\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x249c\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x249d\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x24a0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x24b0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x24b6\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x24b7\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x24b8\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x24b9\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x24ba\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x24bb\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x24dc\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x24dd\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x24e0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x24fa\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2503\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2504\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2507\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2508\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2520\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2523\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2531\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2560\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2563\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x2571\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25a0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25a2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25a5\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25a6\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25a7\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25a9\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25b6\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25b8\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25b9\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25ba\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25bb\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25e0\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25e2\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25e5\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25f9\", GOTO=\"configure_nvidia\"\nATTR{device}==\"0x25fa\", GOTO=\"configure_nvidia\"\nGOTO=\"configure_nvidia-legacy\"\n\nLABEL=\"configure_nvidia\"\nENV{xorg_driver}=\"nvidia\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"xorg-configure@nvidia.service\"\nGOTO=\"end_video\"\n\nLABEL=\"configure_nvidia-legacy\"\nENV{xorg_driver}=\"nvidia\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"xorg-configure@nvidia-legacy.service\"\nGOTO=\"end_video\"\n\nLABEL=\"end_video\"\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia-legacy/config/xorg-nvidia-legacy.conf",
    "content": "Section \"Device\"\n    Identifier     \"nvidia\"\n    Driver         \"nvidia\"\n    Option         \"DynamicTwinView\" \"False\"\n    Option         \"NoFlip\" \"false\"\n    Option         \"NoLogo\" \"true\"\n    Option         \"ConnectToAcpid\" \"0\"\n    Option         \"ModeValidation\" \"NoVesaModes, NoXServerModes\"\n    Option         \"HWCursor\" \"false\"\n    # To put Xorg in debug mode change \"false\" to \"true\" in the line below:\n    Option         \"ModeDebug\" \"false\"\n    # To use a local edid.bin file uncomment the 4 lines below (change DFP-0 to match your card)\n#    Option         \"ConnectedMonitor\" \"DFP-0\"\n#    Option         \"CustomEDID\" \"DFP-0:/storage/.config/edid.bin\"\n#    Option         \"IgnoreEDID\" \"false\"\n#    Option         \"UseEDID\" \"true\"\nEndSection\n\nSection \"Screen\"\n    Identifier     \"screen\"\n    Device         \"nvidia\"\n    DefaultDepth    24\n    Option         \"ColorRange\" \"Full\"\n#    Option         \"ColorRange\" \"Limited\"\n#    Option         \"ColorSpace\" \"RGB\"\n    SubSection     \"Display\"\n        Depth       24\n    EndSubSection\nEndSection\n\nSection \"Extensions\"\n    Option         \"Composite\" \"false\"\nEndSection\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia-legacy/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xf86-video-nvidia-legacy\"\nPKG_VERSION=\"340.108\"\nPKG_SHA256=\"995d44fef587ff5284497a47a95d71adbee0c13020d615e940ac928f180f5b77\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"https://www.nvidia.com/en-us/drivers/unix/\"\nPKG_URL=\"http://us.download.nvidia.com/XFree86/Linux-x86_64/${PKG_VERSION}/NVIDIA-Linux-x86_64-${PKG_VERSION}-no-compat32.run\"\nPKG_DEPENDS_TARGET=\"util-macros xorg-server libvdpau\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"The Xorg driver for NVIDIA GPUs supporting the GeForce 500 Series & older devices.\"\n\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_KERNEL_PKG=\"yes\"\n\nunpack() {\n  [ -d ${PKG_BUILD} ] && rm -rf ${PKG_BUILD}\n\n  sh ${SOURCES}/${PKG_NAME}/${PKG_SOURCE_NAME} --extract-only --target ${PKG_BUILD}\n}\n\nmake_target() {\n  unset LDFLAGS\n\n  cd kernel\n    make module CC=${CC} LD=${LD} SYSSRC=$(kernel_path) SYSOUT=$(kernel_path)\n    ${STRIP} --strip-debug nvidia.ko\n  cd ..\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/${XORG_PATH_MODULES}/drivers\n    cp -P nvidia_drv.so ${INSTALL}/${XORG_PATH_MODULES}/drivers/nvidia-legacy_drv.so\n    ln -sf /var/lib/nvidia_drv.so ${INSTALL}/${XORG_PATH_MODULES}/drivers/nvidia_drv.so\n\n  mkdir -p ${INSTALL}/${XORG_PATH_MODULES}/extensions\n  # rename to not conflicting with Mesa libGL.so\n    cp -P libglx.so* ${INSTALL}/${XORG_PATH_MODULES}/extensions/libglx_nvidia-legacy.so\n\n  mkdir -p ${INSTALL}/etc/X11\n    cp ${PKG_DIR}/config/*.conf ${INSTALL}/etc/X11\n\n  mkdir -p ${INSTALL}/usr/lib\n    cp -P libnvidia-glcore.so.${PKG_VERSION} ${INSTALL}/usr/lib\n    cp -P libnvidia-ml.so.${PKG_VERSION} ${INSTALL}/usr/lib\n      ln -sf /var/lib/libnvidia-ml.so.1 ${INSTALL}/usr/lib/libnvidia-ml.so.1\n    cp -P tls/libnvidia-tls.so.${PKG_VERSION} ${INSTALL}/usr/lib\n  # rename to not conflicting with Mesa libGL.so\n    cp -P libGL.so* ${INSTALL}/usr/lib/libGL_nvidia-legacy.so.1\n\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/nvidia\n    ln -sf /var/lib/nvidia.ko ${INSTALL}/$(get_full_module_dir)/nvidia/nvidia.ko\n\n  mkdir -p ${INSTALL}/usr/lib/nvidia-legacy\n    cp kernel/nvidia.ko ${INSTALL}/usr/lib/nvidia-legacy\n\n  mkdir -p ${INSTALL}/usr/bin\n    ln -s /var/lib/nvidia-smi ${INSTALL}/usr/bin/nvidia-smi\n    cp nvidia-smi ${INSTALL}/usr/bin/nvidia-legacy-smi\n    ln -s /var/lib/nvidia-xconfig ${INSTALL}/usr/bin/nvidia-xconfig\n    cp nvidia-xconfig ${INSTALL}/usr/bin/nvidia-legacy-xconfig\n\n  mkdir -p ${INSTALL}/usr/lib/vdpau\n    cp libvdpau_nvidia.so* ${INSTALL}/usr/lib/vdpau/libvdpau_nvidia-legacy.so.1\n    ln -sf /var/lib/libvdpau_nvidia.so ${INSTALL}/usr/lib/vdpau/libvdpau_nvidia.so\n    ln -sf /var/lib/libvdpau_nvidia.so.1 ${INSTALL}/usr/lib/vdpau/libvdpau_nvidia.so.1\n}\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-100.01-kernel-5.7.patch",
    "content": "From 2154cc447a2377cfd60a7b7c5b619e689ebf71b1 Mon Sep 17 00:00:00 2001\nFrom: graysky <graysky@archlinux.us>\nDate: Thu, 22 Oct 2020 06:58:53 -0400\nSubject: [PATCH 1/3] kernel-5.7\n\ncredit: https://gitlab.manjaro.org/packages?utf8=%E2%9C%93&filter=nvidia-340xx\n---\n kernel/Makefile              |   5 +\n kernel/conftest.sh           |  81 +++++++++++++\n kernel/dkms.conf             |   8 +-\n kernel/nv-drm.c              | 229 ++++++++++++++++++++++++++++++++++-\n kernel/nv-linux.h            |  49 ++++++++\n kernel/nv-procfs.c           |  20 +++\n kernel/nv-time.h             |   9 +-\n kernel/nv.c                  |   2 +-\n kernel/os-interface.c        |   8 +-\n kernel/uvm/Makefile          |   1 +\n kernel/uvm/conftest.sh       |   4 +\n kernel/uvm/nvidia_uvm_lite.c |  29 ++++-\n 12 files changed, 431 insertions(+), 14 deletions(-)\n\ndiff --git a/kernel/Makefile b/kernel/Makefile\nindex 125a690..2597080 100644\n--- a/kernel/Makefile\n+++ b/kernel/Makefile\n@@ -108,12 +108,14 @@ COMPILE_TESTS = \\\n \tacquire_console_sem \\\n \tconsole_lock \\\n \tkmem_cache_create \\\n+\tkmem_cache_create_usercopy \\\n \touter_flush_all \\\n \ton_each_cpu \\\n \tsmp_call_function \\\n \tnvmap_support \\\n \tacpi_evaluate_integer \\\n \tioremap_cache \\\n+\tioremap_nocache \\\n \tioremap_wc \\\n \tproc_dir_entry \\\n \tINIT_WORK \\\n@@ -122,6 +124,7 @@ COMPILE_TESTS = \\\n \tpci_domain_nr \\\n \tpci_dma_mapping_error \\\n \tfile_operations \\\n+\tproc_ops \\\n \tsg_alloc_table \\\n \tsg_init_table \\\n \tpci_get_domain_bus_and_slot \\\n@@ -147,6 +150,8 @@ COMPILE_TESTS = \\\n \tvm_fault_present \\\n \tvm_fault_has_address \\\n \tdrm_driver_unload_has_int_return_type \\\n+\tdrm_get_pci_dev \\\n+\tdrm_pci_init \\\n \tdrm_legacy_pci_init \\\n \ttimer_setup \\\n \tdo_gettimeofday \\\ndiff --git a/kernel/conftest.sh b/kernel/conftest.sh\nindex b7a85f0..a5225e5 100755\n--- a/kernel/conftest.sh\n+++ b/kernel/conftest.sh\n@@ -176,6 +176,7 @@ test_headers() {\n     FILES=\"$FILES linux/ktime.h\"\n     FILES=\"$FILES linux/file.h\"\n \n+    FILES_ARCH=\"$FILES_ARCH asm/pgtable.h\"\n     FILES_ARCH=\"$FILES_ARCH asm/set_memory.h\"\n \n     translate_and_find_header_files $HEADERS      $FILES\n@@ -440,6 +441,9 @@ compile_test() {\n             # Determine if the set_memory_array_uc() function is present.\n             #\n             CODE=\"\n+            #if defined(NV_ASM_PGTABLE_H_PRESENT)\n+            #include <asm/pgtable.h>\n+            #endif\n             #if defined(NV_ASM_SET_MEMORY_H_PRESENT)\n             #include <asm/set_memory.h>\n             #else\n@@ -914,6 +918,21 @@ compile_test() {\n             fi\n         ;;\n \n+        kmem_cache_create_usercopy)\n+            #\n+            # Determine if the kmem_cache_create_usercopy function exists.\n+            #\n+            # This function was added by:\n+            #   2017-06-10  8eb8284b412906181357c2b0110d879d5af95e52\n+            CODE=\"\n+            #include <linux/slab.h>\n+            void kmem_cache_create_usercopy(void) {\n+                kmem_cache_create_usercopy();\n+            }\"\n+\n+            compile_check_conftest \"$CODE\" \"NV_KMEM_CACHE_CREATE_USERCOPY_PRESENT\" \"\" \"functions\"\n+        ;;\n+\n         smp_call_function)\n             #\n             # Determine if the smp_call_function() function is\n@@ -1188,6 +1207,22 @@ compile_test() {\n             compile_check_conftest \"$CODE\" \"NV_IOREMAP_CACHE_PRESENT\" \"\" \"functions\"\n         ;;\n \n+        ioremap_nocache)\n+            #\n+            # Determine if the ioremap_nocache() function is present.\n+            #\n+            # Removed by commit 4bdc0d676a64 (\"remove ioremap_nocache and\n+            # devm_ioremap_nocache\") in v5.6 (2020-01-06)\n+            #\n+            CODE=\"\n+            #include <asm/io.h>\n+            void conftest_ioremap_nocache(void) {\n+                ioremap_nocache();\n+            }\"\n+\n+            compile_check_conftest \"$CODE\" \"NV_IOREMAP_NOCACHE_PRESENT\" \"\" \"functions\"\n+        ;;\n+\n         ioremap_wc)\n             #\n             # Determine if the ioremap_wc() function is present.\n@@ -1371,6 +1406,16 @@ compile_test() {\n             compile_check_conftest \"$CODE\" \"NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL\" \"\" \"types\"\n         ;;\n \n+        proc_ops)\n+            CODE=\"\n+            #include <linux/proc_fs.h>\n+            int conftest_proc_ops(void) {\n+                return offsetof(struct proc_ops, proc_open);\n+            }\"\n+\n+            compile_check_conftest \"$CODE\" \"NV_HAVE_PROC_OPS\" \"\" \"types\"\n+        ;;\n+\n         sg_init_table)\n             #\n             # Determine if the sg_init_table() function is present.\n@@ -2044,6 +2089,42 @@ compile_test() {\n             compile_check_conftest \"$CODE\" \"NV_DRM_DRIVER_UNLOAD_HAS_INT_RETURN_TYPE\" \"\" \"types\"\n         ;;\n \n+        drm_get_pci_dev)\n+            #\n+            # Determine if drm_get_pci_dev() is present.\n+            #\n+            CODE=\"\n+            #if defined(NV_DRM_DRMP_H_PRESENT)\n+            #include <drm/drmP.h>\n+            #endif\n+\n+            #if defined(NV_DRM_DRM_PCI_H_PRESENT)\n+            #include <drm/drm_pci.h>\n+            #endif\n+\n+            void conftest_drm_legacy_pci_init(void) {\n+                drm_get_pci_dev();\n+            }\"\n+\n+            compile_check_conftest \"$CODE\" \"NV_DRM_GET_PCI_DEV_PRESENT\" \"\" \"functions\"\n+        ;;\n+\n+        drm_pci_init)\n+            #\n+            # Determine if drm_pci_init() is present.\n+            #\n+            CODE=\"\n+            #if defined(NV_DRM_DRMP_H_PRESENT)\n+            #include <drm/drmP.h>\n+            #endif\n+\n+            void conftest_drm_legacy_pci_init(void) {\n+                drm_pci_init();\n+            }\"\n+\n+            compile_check_conftest \"$CODE\" \"NV_DRM_PCI_INIT_PRESENT\" \"\" \"functions\"\n+        ;;\n+\n         drm_legacy_pci_init)\n             #\n             # Determine if drm_legacy_pci_init() is present. drm_pci_init() was\ndiff --git a/kernel/dkms.conf b/kernel/dkms.conf\nindex 79a02ae..3140f03 100644\n--- a/kernel/dkms.conf\n+++ b/kernel/dkms.conf\n@@ -1,7 +1,13 @@\n+if [ -x /usr/bin/nproc ]; then\n+  num_cpu_cores=$(nproc)\n+else\n+  num_cpu_cores=1\n+fi\n+\n PACKAGE_NAME=\"nvidia\"\n PACKAGE_VERSION=\"340.108\"\n BUILT_MODULE_NAME[0]=\"$PACKAGE_NAME\"\n DEST_MODULE_LOCATION[0]=\"/kernel/drivers/video\"\n-MAKE[0]=\"make module KERNEL_UNAME=${kernelver}\"\n+MAKE[0]=\"make -j$num_cpu_cores module KERNEL_UNAME=${kernelver}\"\n CLEAN=\"make clean\"\n AUTOINSTALL=\"yes\"\ndiff --git a/kernel/nv-drm.c b/kernel/nv-drm.c\nindex 0d1cdbf..85db07e 100644\n--- a/kernel/nv-drm.c\n+++ b/kernel/nv-drm.c\n@@ -50,9 +50,236 @@\n #if defined(NV_DRM_LEGACY_PCI_INIT_PRESENT)\n #define nv_drm_pci_init drm_legacy_pci_init\n #define nv_drm_pci_exit drm_legacy_pci_exit\n-#else\n+#elif defined(NV_DRM_PCI_INIT_PRESENT)\n #define nv_drm_pci_init drm_pci_init\n #define nv_drm_pci_exit drm_pci_exit\n+#else\n+#if defined(NV_DRM_GET_PCI_DEV_PRESENT)\n+#define nv_drm_get_pci_dev drm_get_pci_dev\n+#else\n+#include <drm/drm_agpsupport.h>\n+\n+struct nv_drm_agp_head {\n+    struct agp_kern_info agp_info;\n+    struct list_head memory;\n+    unsigned long mode;\n+    struct agp_bridge_data *bridge;\n+    int enabled;\n+    int acquired;\n+    unsigned long base;\n+    int agp_mtrr;\n+    int cant_use_aperture;\n+    unsigned long page_mask;\n+};\n+\n+struct nv_drm_agp_mem {\n+    unsigned long handle;\n+    struct agp_memory *memory;\n+    unsigned long bound;\n+    int pages;\n+    struct list_head head;\n+};\n+\n+/*\n+ * Code from drm_agp_init/nv_drm_{free,unbind}_agp\n+ * Extracted from commit: 5b8b9d0c6d0e0f1993c6c56deaf9646942c49d94, file: drivers/gpu/drm/drm_agpsupport.c\n+ */\n+struct drm_agp_head *nv_drm_agp_init(struct drm_device *dev)\n+{\n+    struct nv_drm_agp_head *head = NULL;\n+\n+    head = kzalloc(sizeof(*head), GFP_KERNEL);\n+    if (!head)\n+        return NULL;\n+    head->bridge = agp_find_bridge(dev->pdev);\n+    if (!head->bridge) {\n+        head->bridge = agp_backend_acquire(dev->pdev);\n+        if (!head->bridge) {\n+            kfree(head);\n+            return NULL;\n+        }\n+        agp_copy_info(head->bridge, &head->agp_info);\n+        agp_backend_release(head->bridge);\n+    } else {\n+        agp_copy_info(head->bridge, &head->agp_info);\n+    }\n+    if (head->agp_info.chipset == NOT_SUPPORTED) {\n+        kfree(head);\n+        return NULL;\n+    }\n+    INIT_LIST_HEAD(&head->memory);\n+    head->cant_use_aperture = head->agp_info.cant_use_aperture;\n+    head->page_mask = head->agp_info.page_mask;\n+    head->base = head->agp_info.aper_base;\n+    return (struct drm_agp_head *)head;\n+}\n+\n+void nv_drm_free_agp(struct agp_memory *handle, int pages)\n+{\n+    agp_free_memory(handle);\n+}\n+\n+int nv_drm_unbind_agp(struct agp_memory *handle)\n+{\n+    return agp_unbind_memory(handle);\n+}\n+\n+/*\n+ * Code from drm_pci_agp_{clear,destroy,init}/drm_get_pci_dev\n+ * Extracted from commit: 5b8b9d0c6d0e0f1993c6c56deaf9646942c49d94, file: drivers/gpu/drm/drm_pci.c\n+ */\n+static void nv_drm_pci_agp_init(struct drm_device *dev)\n+{\n+    if (drm_core_check_feature(dev, DRIVER_USE_AGP)) {\n+        if (pci_find_capability(dev->pdev, PCI_CAP_ID_AGP))\n+            dev->agp = nv_drm_agp_init(dev);\n+        if (dev->agp) {\n+            dev->agp->agp_mtrr = arch_phys_wc_add(\n+                dev->agp->agp_info.aper_base,\n+                dev->agp->agp_info.aper_size *\n+                1024 * 1024);\n+        }\n+    }\n+}\n+\n+void nv_drm_legacy_agp_clear(struct drm_device *dev)\n+{\n+    struct nv_drm_agp_mem *entry, *tempe;\n+\n+    if (!dev->agp)\n+        return;\n+    if (!drm_core_check_feature(dev, DRIVER_LEGACY))\n+        return;\n+\n+    list_for_each_entry_safe(entry, tempe, &dev->agp->memory, head) {\n+        if (entry->bound)\n+            nv_drm_unbind_agp(entry->memory);\n+        nv_drm_free_agp(entry->memory, entry->pages);\n+        kfree(entry);\n+    }\n+    INIT_LIST_HEAD(&dev->agp->memory);\n+\n+    if (dev->agp->acquired)\n+        drm_agp_release(dev);\n+\n+    dev->agp->acquired = 0;\n+    dev->agp->enabled = 0;\n+}\n+\n+void nv_drm_pci_agp_destroy(struct drm_device *dev)\n+{\n+    if (dev->agp) {\n+        arch_phys_wc_del(dev->agp->agp_mtrr);\n+        nv_drm_legacy_agp_clear(dev);\n+        kfree(dev->agp);\n+        dev->agp = NULL;\n+    }\n+}\n+\n+static int nv_drm_get_pci_dev(struct pci_dev *pdev,\n+               const struct pci_device_id *ent,\n+               struct drm_driver *driver)\n+{\n+    struct drm_device *dev;\n+    int ret;\n+\n+    DRM_DEBUG(\"\\n\");\n+\n+    dev = drm_dev_alloc(driver, &pdev->dev);\n+    if (IS_ERR(dev))\n+        return PTR_ERR(dev);\n+\n+    ret = pci_enable_device(pdev);\n+    if (ret)\n+        goto err_free;\n+\n+    dev->pdev = pdev;\n+#ifdef __alpha__\n+    dev->hose = pdev->sysdata;\n+#endif\n+\n+    if (drm_core_check_feature(dev, DRIVER_MODESET))\n+        pci_set_drvdata(pdev, dev);\n+\n+    nv_drm_pci_agp_init(dev);\n+\n+    ret = drm_dev_register(dev, ent->driver_data);\n+    if (ret)\n+        goto err_agp;\n+\n+    /* No locking needed since shadow-attach is single-threaded since it may\n+     * only be called from the per-driver module init hook. */\n+    if (drm_core_check_feature(dev, DRIVER_LEGACY))\n+        list_add_tail(&dev->legacy_dev_list, &driver->legacy_dev_list);\n+\n+    return 0;\n+\n+err_agp:\n+    nv_drm_pci_agp_destroy(dev);\n+    pci_disable_device(pdev);\n+err_free:\n+    drm_dev_put(dev);\n+    return ret;\n+}\n+#endif\n+\n+/*\n+ * Code from drm_legacy_pci_{init,exit}\n+ * Extracted from tag: v5.6.3, file: drivers/gpu/drm/drm_pci.c\n+ */\n+int nv_drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver)\n+{\n+    struct pci_dev *pdev = NULL;\n+    const struct pci_device_id *pid;\n+    int i;\n+\n+    DRM_DEBUG(\"\\n\");\n+\n+    if (WARN_ON(!(driver->driver_features & DRIVER_LEGACY)))\n+        return -EINVAL;\n+\n+    /* If not using KMS, fall back to stealth mode manual scanning. */\n+    INIT_LIST_HEAD(&driver->legacy_dev_list);\n+    for (i = 0; pdriver->id_table[i].vendor != 0; i++) {\n+        pid = &pdriver->id_table[i];\n+\n+        /* Loop around setting up a DRM device for each PCI device\n+         * matching our ID and device class.  If we had the internal\n+         * function that pci_get_subsys and pci_get_class used, we'd\n+         * be able to just pass pid in instead of doing a two-stage\n+         * thing.\n+         */\n+        pdev = NULL;\n+        while ((pdev =\n+            pci_get_subsys(pid->vendor, pid->device, pid->subvendor,\n+                       pid->subdevice, pdev)) != NULL) {\n+            if ((pdev->class & pid->class_mask) != pid->class)\n+                continue;\n+\n+            /* stealth mode requires a manual probe */\n+            pci_dev_get(pdev);\n+            nv_drm_get_pci_dev(pdev, pid, driver);\n+        }\n+    }\n+    return 0;\n+}\n+\n+void nv_drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver)\n+{\n+    struct drm_device *dev, *tmp;\n+    DRM_DEBUG(\"\\n\");\n+\n+    if (!(driver->driver_features & DRIVER_LEGACY)) {\n+        WARN_ON(1);\n+    } else {\n+        list_for_each_entry_safe(dev, tmp, &driver->legacy_dev_list,\n+                     legacy_dev_list) {\n+            list_del(&dev->legacy_dev_list);\n+            drm_put_dev(dev);\n+        }\n+    }\n+    DRM_INFO(\"Module unloaded\\n\");\n+}\n #endif\n \n extern nv_linux_state_t *nv_linux_devices;\ndiff --git a/kernel/nv-linux.h b/kernel/nv-linux.h\nindex a1d2c68..83e6433 100644\n--- a/kernel/nv-linux.h\n+++ b/kernel/nv-linux.h\n@@ -688,11 +688,16 @@ extern nv_spinlock_t km_lock;\n         VM_ALLOC_RECORD(ptr, size, \"vm_ioremap\"); \\\n     }\n \n+#if defined(NV_IOREMAP_NOCACHE_PRESENT)\n #define NV_IOREMAP_NOCACHE(ptr, physaddr, size) \\\n     { \\\n         (ptr) = ioremap_nocache(physaddr, size); \\\n         VM_ALLOC_RECORD(ptr, size, \"vm_ioremap_nocache\"); \\\n     }\n+#else\n+#define NV_IOREMAP_NOCACHE(ptr, physaddr, size) \\\n+    NV_IOREMAP(ptr, physaddr, size)\n+#endif\n \n #if defined(NV_IOREMAP_CACHE_PRESENT)\n #define NV_IOREMAP_CACHE(ptr, physaddr, size)            \\\n@@ -774,6 +779,17 @@ extern nv_spinlock_t km_lock;\n #error \"NV_KMEM_CACHE_CREATE() undefined (kmem_cache_create() unavailable)!\"\n #endif\n \n+#if defined(NV_KMEM_CACHE_CREATE_USERCOPY_PRESENT)\n+#define NV_KMEM_CACHE_CREATE_USERCOPY(kmem_cache, name, type)       \\\n+    {                                                               \\\n+        kmem_cache = kmem_cache_create_usercopy(name, sizeof(type), \\\n+                        0, 0, 0, sizeof(type), NULL);               \\\n+    }\n+#else\n+#define NV_KMEM_CACHE_CREATE_USERCOPY(kmem_cache, name, type)       \\\n+        NV_KMEM_CACHE_CREATE(kmem_cache, name, type)\n+#endif\n+\n #define NV_KMEM_CACHE_ALLOC(ptr, kmem_cache, type)              \\\n     {                                                           \\\n         (ptr) = kmem_cache_alloc(kmem_cache, GFP_KERNEL);       \\\n@@ -1971,6 +1987,19 @@ extern NvU32 nv_assign_gpu_count;\n     })\n #endif\n \n+#if defined(NV_HAVE_PROC_OPS)\n+#define NV_CREATE_PROC_FILE(filename,parent,__name,__data)               \\\n+   ({                                                                    \\\n+        struct proc_dir_entry *__entry;                                  \\\n+        int mode = (S_IFREG | S_IRUGO);                                  \\\n+        const struct proc_ops *fops = &nv_procfs_##__name##_fops;        \\\n+        if (fops->proc_write != 0)                                       \\\n+            mode |= S_IWUSR;                                             \\\n+        __entry = NV_CREATE_PROC_ENTRY(filename, mode, parent, fops,     \\\n+            __data);                                                     \\\n+        __entry;                                                         \\\n+    })\n+#else\n #define NV_CREATE_PROC_FILE(filename,parent,__name,__data)               \\\n    ({                                                                    \\\n         struct proc_dir_entry *__entry;                                  \\\n@@ -1982,6 +2011,7 @@ extern NvU32 nv_assign_gpu_count;\n             __data);                                                     \\\n         __entry;                                                         \\\n     })\n+#endif\n \n /*\n  * proc_mkdir_mode exists in Linux 2.6.9, but isn't exported until Linux 3.0.\n@@ -2023,6 +2053,24 @@ extern NvU32 nv_assign_gpu_count;\n     remove_proc_entry(entry->name, entry->parent);\n #endif\n \n+#if defined(NV_HAVE_PROC_OPS)\n+#define NV_DEFINE_PROCFS_SINGLE_FILE(__name)                                  \\\n+    static int nv_procfs_open_##__name(                                       \\\n+        struct inode *inode,                                                  \\\n+        struct file *filep                                                    \\\n+    )                                                                         \\\n+    {                                                                         \\\n+        return single_open(filep, nv_procfs_read_##__name,                    \\\n+            NV_PDE_DATA(inode));                                              \\\n+    }                                                                         \\\n+                                                                              \\\n+    static const struct proc_ops nv_procfs_##__name##_fops = {                \\\n+        .proc_open       = nv_procfs_open_##__name,                           \\\n+        .proc_read       = seq_read,                                          \\\n+        .proc_lseek      = seq_lseek,                                         \\\n+        .proc_release    = single_release,                                    \\\n+    };\n+#else\n #define NV_DEFINE_PROCFS_SINGLE_FILE(__name)                                  \\\n     static int nv_procfs_open_##__name(                                       \\\n         struct inode *inode,                                                  \\\n@@ -2040,6 +2088,7 @@ extern NvU32 nv_assign_gpu_count;\n         .llseek     = seq_lseek,                                              \\\n         .release    = single_release,                                         \\\n     };\n+#endif\n \n #endif  /* CONFIG_PROC_FS */\n \ndiff --git a/kernel/nv-procfs.c b/kernel/nv-procfs.c\nindex ebca3e8..9365c3c 100644\n--- a/kernel/nv-procfs.c\n+++ b/kernel/nv-procfs.c\n@@ -409,6 +409,15 @@ done:\n     return ((status < 0) ? status : (int)count);\n }\n \n+#if defined(NV_HAVE_PROC_OPS)\n+static struct proc_ops nv_procfs_registry_fops = {\n+    .proc_open    = nv_procfs_open_registry,\n+    .proc_read    = seq_read,\n+    .proc_write   = nv_procfs_write_file,\n+    .proc_lseek   = seq_lseek,\n+    .proc_release = nv_procfs_close_registry,\n+};\n+#else\n static struct file_operations nv_procfs_registry_fops = {\n     .owner   = THIS_MODULE,\n     .open    = nv_procfs_open_registry,\n@@ -417,6 +426,7 @@ static struct file_operations nv_procfs_registry_fops = {\n     .llseek  = seq_lseek,\n     .release = nv_procfs_close_registry,\n };\n+#endif\n \n static int\n nv_procfs_read_unbind_lock(\n@@ -538,6 +548,15 @@ done:\n     return rc;\n }\n \n+#if defined(NV_HAVE_PROC_OPS)\n+static struct proc_ops nv_procfs_unbind_lock_fops = {\n+    .proc_open    = nv_procfs_open_unbind_lock,\n+    .proc_read    = seq_read,\n+    .proc_write   = nv_procfs_write_file,\n+    .proc_lseek   = seq_lseek,\n+    .proc_release = nv_procfs_close_unbind_lock,\n+};\n+#else\n static struct file_operations nv_procfs_unbind_lock_fops = {\n     .owner   = THIS_MODULE,\n     .open    = nv_procfs_open_unbind_lock,\n@@ -546,6 +565,7 @@ static struct file_operations nv_procfs_unbind_lock_fops = {\n     .llseek  = seq_lseek,\n     .release = nv_procfs_close_unbind_lock,\n };\n+#endif\n \n static int\n nv_procfs_read_text_file(\ndiff --git a/kernel/nv-time.h b/kernel/nv-time.h\nindex a34ceb2..780f8bc 100644\n--- a/kernel/nv-time.h\n+++ b/kernel/nv-time.h\n@@ -28,7 +28,12 @@\n #include <linux/ktime.h>\n #endif\n \n-static inline void nv_gettimeofday(struct timeval *tv)\n+struct nv_timeval {\n+    __kernel_long_t      tv_sec;\n+    __kernel_suseconds_t tv_usec;\n+};\n+\n+static inline void nv_gettimeofday(struct nv_timeval *tv)\n {\n #ifdef NV_DO_GETTIMEOFDAY_PRESENT\n     do_gettimeofday(tv);\n@@ -37,7 +42,7 @@ static inline void nv_gettimeofday(struct timeval *tv)\n \n     ktime_get_real_ts64(&now);\n \n-    *tv = (struct timeval) {\n+    *tv = (struct nv_timeval) {\n         .tv_sec = now.tv_sec,\n         .tv_usec = now.tv_nsec/1000,\n     };\ndiff --git a/kernel/nv.c b/kernel/nv.c\nindex a167be9..a218f83 100644\n--- a/kernel/nv.c\n+++ b/kernel/nv.c\n@@ -752,7 +752,7 @@ int __init nvidia_init_module(void)\n     NV_SPIN_LOCK_INIT(&km_lock);\n #endif\n \n-    NV_KMEM_CACHE_CREATE(nv_stack_t_cache, NV_STACK_CACHE_STR, nv_stack_t);\n+    NV_KMEM_CACHE_CREATE_USERCOPY(nv_stack_t_cache, NV_STACK_CACHE_STR, nv_stack_t);\n     if (nv_stack_t_cache == NULL)\n     {\n         nv_printf(NV_DBG_ERRORS, \"NVRM: stack cache allocation failed!\\n\");\ndiff --git a/kernel/os-interface.c b/kernel/os-interface.c\nindex 7190b26..0c0dc05 100644\n--- a/kernel/os-interface.c\n+++ b/kernel/os-interface.c\n@@ -439,7 +439,7 @@ RM_STATUS NV_API_CALL os_get_current_time(\n     NvU32 *useconds\n )\n {\n-    struct timeval tm;\n+    struct nv_timeval tm;\n \n     nv_gettimeofday(&tm);\n \n@@ -474,7 +474,7 @@ RM_STATUS NV_API_CALL os_delay_us(NvU32 MicroSeconds)\n     unsigned long usec;\n \n #ifdef NV_CHECK_DELAY_ACCURACY\n-    struct timeval tm1, tm2;\n+    struct nv_timeval tm1, tm2;\n \n     nv_gettimeofday(&tm1);\n #endif\n@@ -514,9 +514,9 @@ RM_STATUS NV_API_CALL os_delay(NvU32 MilliSeconds)\n     unsigned long MicroSeconds;\n     unsigned long jiffies;\n     unsigned long mdelay_safe_msec;\n-    struct timeval tm_end, tm_aux;\n+    struct nv_timeval tm_end, tm_aux;\n #ifdef NV_CHECK_DELAY_ACCURACY\n-    struct timeval tm_start;\n+    struct nv_timeval tm_start;\n #endif\n \n     nv_gettimeofday(&tm_aux);\ndiff --git a/kernel/uvm/Makefile b/kernel/uvm/Makefile\nindex 0cad8ff..043a08d 100644\n--- a/kernel/uvm/Makefile\n+++ b/kernel/uvm/Makefile\n@@ -207,6 +207,7 @@ ccflags-y += $(EXTRA_CFLAGS)\n \n RM_MODULE_SYMVERS:= $(RM_OUT_DIR)/Module.symvers\n UVM_MODULE_SYMVERS:= $(obj)/Module.symvers\n+KBUILD_EXTRA_SYMBOLS:= $(UVM_MODULE_SYMVERS)\n \n module $(MODULE_NAME).ko: $(UVM_MODULE_SYMVERS) debug_diagnostics_printing\n \ndiff --git a/kernel/uvm/conftest.sh b/kernel/uvm/conftest.sh\nindex b7a85f0..33e2a63 100755\n--- a/kernel/uvm/conftest.sh\n+++ b/kernel/uvm/conftest.sh\n@@ -176,6 +176,7 @@ test_headers() {\n     FILES=\"$FILES linux/ktime.h\"\n     FILES=\"$FILES linux/file.h\"\n \n+    FILES_ARCH=\"$FILES_ARCH asm/pgtable.h\"\n     FILES_ARCH=\"$FILES_ARCH asm/set_memory.h\"\n \n     translate_and_find_header_files $HEADERS      $FILES\n@@ -440,6 +441,9 @@ compile_test() {\n             # Determine if the set_memory_array_uc() function is present.\n             #\n             CODE=\"\n+            #if defined(NV_ASM_PGTABLE_H_PRESENT)\n+            #include <asm/pgtable.h>\n+            #endif\n             #if defined(NV_ASM_SET_MEMORY_H_PRESENT)\n             #include <asm/set_memory.h>\n             #else\ndiff --git a/kernel/uvm/nvidia_uvm_lite.c b/kernel/uvm/nvidia_uvm_lite.c\nindex 6943e7c..9a7e3b6 100644\n--- a/kernel/uvm/nvidia_uvm_lite.c\n+++ b/kernel/uvm/nvidia_uvm_lite.c\n@@ -131,8 +131,8 @@ static\n RM_STATUS _preexisting_error_on_channel(UvmGpuMigrationTracking *pMigTracker,\n                                          UvmCommitRecord *pRecord);\n \n-static void _set_timeout_in_usec(struct timeval *src,\n-                                 struct timeval *result,\n+static void _set_timeout_in_usec(struct nv_timeval *src,\n+                                 struct nv_timeval *result,\n                                  unsigned long timeoutInUsec)\n {\n     if (!src || !result)\n@@ -820,7 +820,13 @@ done:\n }\n \n #if defined(NV_VM_OPERATIONS_STRUCT_HAS_FAULT)\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)\n+vm_fault_t _fault(struct vm_fault *vmf)\n+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)\n+int _fault(struct vm_fault *vmf)\n+#else\n int _fault(struct vm_area_struct *vma, struct vm_fault *vmf)\n+#endif\n {\n #if defined(NV_VM_FAULT_HAS_ADDRESS)\n     unsigned long vaddr = vmf->address;\n@@ -828,8 +834,15 @@ int _fault(struct vm_area_struct *vma, struct vm_fault *vmf)\n     unsigned long vaddr = (unsigned long)vmf->virtual_address;\n #endif\n     struct page *page = NULL;\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)\n+    vm_fault_t retval;\n+#else\n     int retval;\n \n+#endif\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)\n+   struct vm_area_struct *vma = vmf->vma;\n+#endif\n     retval = _fault_common(vma, vaddr, &page, vmf->flags);\n \n     vmf->page = page;\n@@ -868,7 +881,13 @@ static struct vm_operations_struct uvmlite_vma_ops =\n // it's dealing with anonymous mapping (see handle_pte_fault).\n //\n #if defined(NV_VM_OPERATIONS_STRUCT_HAS_FAULT)\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)\n+vm_fault_t _sigbus_fault(struct vm_fault *vmf)\n+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)\n+int _sigbus_fault(struct vm_fault *vmf)\n+#else\n int _sigbus_fault(struct vm_area_struct *vma, struct vm_fault *vmf)\n+#endif\n {\n     vmf->page = NULL;\n     return VM_FAULT_SIGBUS;\n@@ -1992,9 +2011,9 @@ void umvlite_destroy_per_process_gpu_resources(UvmGpuUuid *gpuUuidStruct)\n static RM_STATUS _check_ecc_errors(UvmGpuMigrationTracking *pMigTracker,\n                                     NvBool *pIsEccErrorSet)\n {\n-    struct timeval eccErrorStartTime = {0};\n-    struct timeval eccErrorCurrentTime = {0};\n-    struct timeval eccTimeout = {0};\n+    struct nv_timeval eccErrorStartTime = {0};\n+    struct nv_timeval eccErrorCurrentTime = {0};\n+    struct nv_timeval eccTimeout = {0};\n     NvBool bEccErrorTimeout = NV_FALSE;\n     NvBool bEccIncomingError = NV_FALSE;\n     unsigned rmInterruptSet = 0;\n-- \n2.29.0\n\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-100.02-kernel-5.8.patch",
    "content": "From 2cc3342b4b3c96bcc4062513011d35c079b009a2 Mon Sep 17 00:00:00 2001\nFrom: graysky <graysky@archlinux.us>\nDate: Thu, 22 Oct 2020 06:59:59 -0400\nSubject: [PATCH 2/3] kernel-5.8\n\ncredit: https://launchpad.net/~kelebek333/+archive/ubuntu/nvidia-legacy/+packages\nextracted from: https://launchpadlibrarian.net/492468557/nvidia-graphics-drivers-340_340.108-1lmtrfocal3_340.108-2lmtrfocal.diff.gz\n---\n kernel/nv-linux.h                | 8 ++++++++\n kernel/nvidia-modules-common.mk  | 1 +\n kernel/os-mlock.c                | 8 ++++++++\n kernel/uvm/nvidia_uvm_lite_api.c | 4 ++++\n 4 files changed, 21 insertions(+)\n\ndiff --git a/kernel/nv-linux.h b/kernel/nv-linux.h\nindex 83e6433..d055552 100644\n--- a/kernel/nv-linux.h\n+++ b/kernel/nv-linux.h\n@@ -669,11 +669,19 @@ extern nv_spinlock_t km_lock;\n #  define KM_FREE_RECORD(a,b,c)\n #endif\n \n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)\n+#define NV_VMALLOC(ptr, size)                     \\\n+    {                                             \\\n+        (ptr) = __vmalloc(size, GFP_KERNEL);      \\\n+        VM_ALLOC_RECORD(ptr, size, \"vm_vmalloc\"); \\\n+    }\n+#else\n #define NV_VMALLOC(ptr, size)                               \\\n     {                                                       \\\n         (ptr) = __vmalloc(size, GFP_KERNEL, PAGE_KERNEL);   \\\n         VM_ALLOC_RECORD(ptr, size, \"vm_vmalloc\");           \\\n     }\n+#endif\n \n #define NV_VFREE(ptr, size)                         \\\n     {                                               \\\ndiff --git a/kernel/nvidia-modules-common.mk b/kernel/nvidia-modules-common.mk\nindex b94591b..0e4c228 100644\n--- a/kernel/nvidia-modules-common.mk\n+++ b/kernel/nvidia-modules-common.mk\n@@ -222,6 +222,7 @@ build-sanity-checks:\n define BUILD_MODULE_RULE\n  $(1): build-sanity-checks $(3)\n \t@echo \"NVIDIA: calling KBUILD...\"; \\\n+\ttouch .nv-kernel.o.cmd; \\\n \t$$(MAKE) \"CC=$$(CC)\" NV_MODULE_SUFFIX=$$(strip $(2)) $$(KBUILD_PARAMS) modules; \\\n \techo \"NVIDIA: left KBUILD.\"; \\\n \tif ! [ -f $(1) ]; then \\\ndiff --git a/kernel/os-mlock.c b/kernel/os-mlock.c\nindex 8a1fa2f..fc50543 100644\n--- a/kernel/os-mlock.c\n+++ b/kernel/os-mlock.c\n@@ -44,11 +44,19 @@ RM_STATUS NV_API_CALL os_lock_user_pages(\n         return rmStatus;\n     }\n \n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)\n+    down_read(&mm->mmap_lock);\n+    ret = NV_GET_USER_PAGES((unsigned long)address,\n+                            page_count, write, force, user_pages, NULL);\n+    up_read(&mm->mmap_lock);\n+    pinned = ret;\n+#else\n     down_read(&mm->mmap_sem);\n     ret = NV_GET_USER_PAGES((unsigned long)address,\n                             page_count, write, force, user_pages, NULL);\n     up_read(&mm->mmap_sem);\n     pinned = ret;\n+#endif\n \n     if (ret < 0)\n     {\ndiff --git a/kernel/uvm/nvidia_uvm_lite_api.c b/kernel/uvm/nvidia_uvm_lite_api.c\nindex 8448eb6..97a4818 100644\n--- a/kernel/uvm/nvidia_uvm_lite_api.c\n+++ b/kernel/uvm/nvidia_uvm_lite_api.c\n@@ -30,6 +30,10 @@\n #include \"uvm_gpu_ops_tests.h\"\n #endif\n \n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)\n+#define mmap_sem mmap_lock\n+#endif\n+\n //\n // nvidia_uvm_lite_api.c\n //\n-- \n2.29.0\n\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-100.03-kernel-5.9.patch",
    "content": "From fea401df7500bfbead5a42b1e74560dbddf2f5a3 Mon Sep 17 00:00:00 2001\nFrom: graysky <graysky@archlinux.us>\nDate: Thu, 22 Oct 2020 07:00:35 -0400\nSubject: [PATCH 3/3] kernel-5.9\n\ncredit: https://github.com/warpme/minimyth2/blob/master/script/nvidia/nvidia-340.108/files/nvidia-340.108-fix-5.9-kernel-compile.patch\n---\n kernel/nv-drm.c               | 8 ++++++++\n kernel/nv-linux.h             | 9 +++++++--\n kernel/nv.c                   | 4 ++++\n kernel/uvm/nvidia_uvm_linux.h | 2 ++\n 4 files changed, 21 insertions(+), 2 deletions(-)\n\ndiff --git a/kernel/nv-drm.c b/kernel/nv-drm.c\nindex 85db07e..f0c1299 100644\n--- a/kernel/nv-drm.c\n+++ b/kernel/nv-drm.c\n@@ -415,7 +415,11 @@ static struct drm_driver nv_drm_driver = {\n     .set_busid = drm_pci_set_busid,\n #endif\n \n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)\n+    .gem_free_object_unlocked = nv_gem_free,\n+#else\n     .gem_free_object = nv_gem_free,\n+#endif\n \n     .prime_handle_to_fd = drm_gem_prime_handle_to_fd,\n     .gem_prime_export = drm_gem_prime_export,\n@@ -511,8 +515,12 @@ RM_STATUS NV_API_CALL nv_alloc_os_descriptor_handle(\n \n #if defined(NV_DRM_GEM_OBJECT_PUT_UNLOCKED_PRESENT)\n     drm_gem_object_put_unlocked(&nv_obj->base);\n+#else\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)\n+    drm_gem_object_put_locked(&nv_obj->base);\n #else\n     drm_gem_object_unreference_unlocked(&nv_obj->base);\n+#endif\n #endif\n \n     status = RM_OK;\ndiff --git a/kernel/nv-linux.h b/kernel/nv-linux.h\nindex d055552..524a8fe 100644\n--- a/kernel/nv-linux.h\n+++ b/kernel/nv-linux.h\n@@ -136,8 +136,10 @@\n \n #if defined(NVCPU_X86_64) && !defined(HAVE_COMPAT_IOCTL)\n #include <linux/syscalls.h>         /* sys_ioctl()                      */\n+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0)\n #include <linux/ioctl32.h>          /* register_ioctl32_conversion()    */\n #endif\n+#endif\n \n #if !defined(NV_FILE_OPERATIONS_HAS_IOCTL) && \\\n   !defined(NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL)\n@@ -2249,10 +2251,13 @@ static inline NvU64 nv_node_end_pfn(int nid)\n                                             pages, vmas, NULL);\n \n         #else\n-\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)\n+               return get_user_pages_remote(mm, start, nr_pages, flags,\n+                                            pages, vmas, NULL);\n+#else\n                return get_user_pages_remote(tsk, mm, start, nr_pages, flags,\n                                             pages, vmas);\n-\n+#endif\n         #endif\n \n         }\ndiff --git a/kernel/nv.c b/kernel/nv.c\nindex a218f83..be4e0f8 100644\n--- a/kernel/nv.c\n+++ b/kernel/nv.c\n@@ -2785,7 +2785,11 @@ nvidia_probe\n \n #if defined(CONFIG_VGA_ARB)\n #if defined(VGA_DEFAULT_DEVICE)\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)\n+    vga_get(VGA_DEFAULT_DEVICE, VGA_RSRC_LEGACY_MASK, 0);\n+#else\n     vga_tryget(VGA_DEFAULT_DEVICE, VGA_RSRC_LEGACY_MASK);\n+#endif\n #endif\n     vga_set_legacy_decoding(dev, VGA_RSRC_NONE);\n #endif\ndiff --git a/kernel/uvm/nvidia_uvm_linux.h b/kernel/uvm/nvidia_uvm_linux.h\nindex 1625209..efc181f 100644\n--- a/kernel/uvm/nvidia_uvm_linux.h\n+++ b/kernel/uvm/nvidia_uvm_linux.h\n@@ -158,8 +158,10 @@\n \n #if defined(NVCPU_X86_64) && !defined(HAVE_COMPAT_IOCTL)\n #include <linux/syscalls.h>         /* sys_ioctl()                      */\n+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0)\n #include <linux/ioctl32.h>          /* register_ioctl32_conversion()    */\n #endif\n+#endif\n \n #if !defined(NV_FILE_OPERATIONS_HAS_IOCTL) && \\\n   !defined(NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL)\n-- \n2.29.0\n\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-100.04-kernel-5.10.patch",
    "content": "https://github.com/warpme/minimyth2/tree/master/script/nvidia/nvidia-340.108/files\n\ndiff -Naur NVIDIA-Linux-x86_64-340.108-old/kernel/nv-drm.c NVIDIA-Linux-x86_64-340.108-new/kernel/nv-drm.c\n--- NVIDIA-Linux-x86_64-340.108-old/kernel/nv-drm.c\t2020-12-13 19:10:56.759999937 +0100\n+++ NVIDIA-Linux-x86_64-340.108-new/kernel/nv-drm.c\t2020-12-13 19:09:02.039999925 +0100\n@@ -322,8 +322,11 @@\n {\n     struct nv_gem_object *nv_obj = container_of(obj, struct nv_gem_object, base);\n     int page_count = obj->size >> PAGE_SHIFT;\n-\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)\n+    return drm_prime_pages_to_sg(obj->dev, nv_obj->pages, page_count);\n+#else\n     return drm_prime_pages_to_sg(nv_obj->pages, page_count);\n+#endif\n }\n \n static void* nv_gem_prime_vmap(\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-100.05-kernel-5.11.patch",
    "content": "diff -Naur NVIDIA-Linux-x86_64-340.108-old/kernel/conftest.sh NVIDIA-Linux-x86_64-340.108-new/kernel/conftest.sh\n--- NVIDIA-Linux-x86_64-340.108-old/kernel/conftest.sh\t2021-05-24 20:08:18.743742335 +0200\n+++ NVIDIA-Linux-x86_64-340.108-new/kernel/conftest.sh\t2021-05-24 20:13:18.019314390 +0200\n@@ -1578,21 +1578,21 @@\n             #include <drm/drm_drv.h>\n             #endif\n \n-            #if defined(NV_DRM_DRM_PRIME_H_PRESENT)\n-            #include <drm/drm_prime.h>\n-            #endif\n-\n             #if !defined(CONFIG_DRM) && !defined(CONFIG_DRM_MODULE)\n             #error DRM not enabled\n             #endif\n+\n             void conftest_drm_available(void) {\n                 struct drm_driver drv;\n-                drv.gem_prime_pin = 0;\n-                drv.gem_prime_get_sg_table = 0;\n-                drv.gem_prime_vmap = 0;\n-                drv.gem_prime_vunmap = 0;\n-                (void)drm_gem_prime_import;\n-                (void)drm_gem_prime_export;\n+\n+                /* 2013-10-02 1bb72532ac260a2d3982b40bdd4c936d779d0d16 */\n+                (void)drm_dev_alloc;\n+\n+                /* 2013-10-02 c22f0ace1926da399d9a16dfaf09174c1b03594c */\n+                (void)drm_dev_register;\n+\n+                /* 2013-10-02 c3a49737ef7db0bdd4fcf6cf0b7140a883e32b2a */\n+                (void)drm_dev_unregister;\n             }\"\n \n             compile_check_conftest \"$CODE\" \"NV_DRM_AVAILABLE\" \"\" \"generic\"\ndiff -Naur NVIDIA-Linux-x86_64-340.108-old/kernel/nv-drm.c NVIDIA-Linux-x86_64-340.108-new/kernel/nv-drm.c\n--- NVIDIA-Linux-x86_64-340.108-old/kernel/nv-drm.c\t2021-05-24 20:08:18.779739237 +0200\n+++ NVIDIA-Linux-x86_64-340.108-new/kernel/nv-drm.c\t2021-05-24 20:42:13.443288819 +0200\n@@ -60,6 +60,8 @@\n #else\n #include <drm/drm_agpsupport.h>\n \n+#include \"linux/dma-buf.h\"\n+\n struct nv_drm_agp_head {\n     struct agp_kern_info agp_info;\n     struct list_head memory;\n@@ -210,8 +212,10 @@\n \n     /* No locking needed since shadow-attach is single-threaded since it may\n      * only be called from the per-driver module init hook. */\n+#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 10, 0)\n     if (drm_core_check_feature(dev, DRIVER_LEGACY))\n         list_add_tail(&dev->legacy_dev_list, &driver->legacy_dev_list);\n+#endif\n \n     return 0;\n \n@@ -239,8 +243,10 @@\n     if (WARN_ON(!(driver->driver_features & DRIVER_LEGACY)))\n         return -EINVAL;\n \n+#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 10, 0)\n     /* If not using KMS, fall back to stealth mode manual scanning. */\n     INIT_LIST_HEAD(&driver->legacy_dev_list);\n+#endif\n     for (i = 0; pdriver->id_table[i].vendor != 0; i++) {\n         pid = &pdriver->id_table[i];\n \n@@ -273,11 +279,13 @@\n     if (!(driver->driver_features & DRIVER_LEGACY)) {\n         WARN_ON(1);\n     } else {\n+#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 10, 0)\n         list_for_each_entry_safe(dev, tmp, &driver->legacy_dev_list,\n                      legacy_dev_list) {\n             list_del(&dev->legacy_dev_list);\n             drm_put_dev(dev);\n         }\n+#endif\n     }\n     DRM_INFO(\"Module unloaded\\n\");\n }\n@@ -402,6 +410,39 @@\n     .llseek = noop_llseek,\n };\n \n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)\n+struct sg_table *nv_drm_gem_prime_get_sg_table(struct drm_gem_object *gem)\n+{\n+    return nv_gem_prime_get_sg_table(gem);\n+}\n+\n+static int nv_drm_gem_vmap(struct drm_gem_object *gem,\n+                           struct dma_buf_map *map)\n+{\n+    map->vaddr = nv_gem_prime_vmap(gem);\n+    if (map->vaddr == NULL) {\n+        return -ENOMEM;\n+    }\n+    map->is_iomem = true;\n+    return 0;\n+}\n+\n+static void nv_drm_gem_vunmap(struct drm_gem_object *gem,\n+                              struct dma_buf_map *map)\n+{\n+    nv_gem_prime_vunmap(gem, map->vaddr);\n+    map->vaddr = NULL;\n+}\n+\n+static struct drm_gem_object_funcs nv_drm_gem_object_funcs = {\n+  .free = nv_gem_free,\n+  .export = drm_gem_prime_export,\n+  .get_sg_table = nv_drm_gem_prime_get_sg_table,\n+  .vmap = nv_drm_gem_vmap,\n+  .vunmap = nv_drm_gem_vunmap,\n+};\n+#endif\n+\n static struct drm_driver nv_drm_driver = {\n \n     .driver_features = DRIVER_GEM\n@@ -420,17 +461,19 @@\n     .set_busid = drm_pci_set_busid,\n #endif\n \n-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)\n-    .gem_free_object_unlocked = nv_gem_free,\n-#else\n+#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 8, 0)\n     .gem_free_object = nv_gem_free,\n+#elif LINUX_VERSION_CODE <= KERNEL_VERSION(5, 10, 0)\n+    .gem_free_object_unlocked = nv_gem_free,\n #endif\n \n     .prime_handle_to_fd = drm_gem_prime_handle_to_fd,\n+#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 10, 0)\n     .gem_prime_export = drm_gem_prime_export,\n     .gem_prime_get_sg_table = nv_gem_prime_get_sg_table,\n     .gem_prime_vmap = nv_gem_prime_vmap,\n     .gem_prime_vunmap = nv_gem_prime_vunmap,\n+#endif\n \n     .name = \"nvidia-drm\",\n     .desc = \"NVIDIA DRM driver\",\ndiff -Naur NVIDIA-Linux-x86_64-340.108-old/kernel/nv-linux.h NVIDIA-Linux-x86_64-340.108-new/kernel/nv-linux.h\n--- NVIDIA-Linux-x86_64-340.108-old/kernel/nv-linux.h\t2021-05-24 20:08:18.775739581 +0200\n+++ NVIDIA-Linux-x86_64-340.108-new/kernel/nv-linux.h\t2021-05-24 20:09:18.748287771 +0200\n@@ -119,7 +119,9 @@\n #include <asm/tlbflush.h>           /* flush_tlb(), flush_tlb_all()     */\n #include <linux/cpu.h>              /* CPU hotplug support              */\n #endif\n-#include <asm/kmap_types.h>         /* page table entry lookup          */\n+#if LINUX_VERSION_CODE\t< KERNEL_VERSION(5, 11,\t0)\n+\t#include <asm/kmap_types.h>         /* page table entry lookup          */\n+#endif\n \n #include <linux/pci.h>              /* pci_find_class, etc              */\n #include <linux/interrupt.h>        /* tasklets, interrupt helpers      */\ndiff -Naur NVIDIA-Linux-x86_64-340.108-old/kernel/uvm/nvidia_uvm_linux.h NVIDIA-Linux-x86_64-340.108-new/kernel/uvm/nvidia_uvm_linux.h\n--- NVIDIA-Linux-x86_64-340.108-old/kernel/uvm/nvidia_uvm_linux.h\t2021-05-24 20:08:18.775739581 +0200\n+++ NVIDIA-Linux-x86_64-340.108-new/kernel/uvm/nvidia_uvm_linux.h\t2021-05-24 20:09:18.749287739 +0200\n@@ -141,7 +141,9 @@\n #if !defined(NV_VMWARE)\n #include <asm/tlbflush.h>           /* flush_tlb(), flush_tlb_all()     */\n #endif\n-#include <asm/kmap_types.h>         /* page table entry lookup          */\n+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0)\n+\t#include <asm/kmap_types.h>         /* page table entry lookup          */\n+#endif\n \n #include <linux/interrupt.h>        /* tasklets, interrupt helpers      */\n #include <linux/timer.h>\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-100.06-kernel-5.14.patch",
    "content": "diff -Naur NVIDIA-Linux-x86_64-340.108-no-compat32.5.13/kernel/nv-drm.c NVIDIA-Linux-x86_64-340.108-no-compat32.5.14/kernel/nv-drm.c\n--- NVIDIA-Linux-x86_64-340.108-no-compat32.5.13/kernel/nv-drm.c\t2021-07-25 10:29:29.336505688 +0200\n+++ NVIDIA-Linux-x86_64-340.108-no-compat32.5.14/kernel/nv-drm.c\t2021-09-16 16:49:10.929858547 +0200\n@@ -57,8 +57,11 @@\n #if defined(NV_DRM_GET_PCI_DEV_PRESENT)\n #define nv_drm_get_pci_dev drm_get_pci_dev\n #else\n+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)\n #include <drm/drm_agpsupport.h>\n-\n+#else\n+#include <drm/drm_legacy.h>\n+#endif\n #include \"linux/dma-buf.h\"\n \n struct nv_drm_agp_head {\n@@ -82,6 +85,11 @@\n     struct list_head head;\n };\n \n+struct nv_drm_extra_priv_data {\n+    struct pci_dev *pdev;\n+    struct drm_agp_head *agp;\n+};\n+\n /*\n  * Code from drm_agp_init/nv_drm_{free,unbind}_agp\n  * Extracted from commit: 5b8b9d0c6d0e0f1993c6c56deaf9646942c49d94, file: drivers/gpu/drm/drm_agpsupport.c\n@@ -89,13 +97,14 @@\n struct drm_agp_head *nv_drm_agp_init(struct drm_device *dev)\n {\n     struct nv_drm_agp_head *head = NULL;\n+    struct nv_drm_extra_priv_data *extra = dev->dev_private;\n \n     head = kzalloc(sizeof(*head), GFP_KERNEL);\n     if (!head)\n         return NULL;\n-    head->bridge = agp_find_bridge(dev->pdev);\n+    head->bridge = agp_find_bridge(extra->pdev);\n     if (!head->bridge) {\n-        head->bridge = agp_backend_acquire(dev->pdev);\n+        head->bridge = agp_backend_acquire(extra->pdev);\n         if (!head->bridge) {\n             kfree(head);\n             return NULL;\n@@ -133,48 +142,71 @@\n static void nv_drm_pci_agp_init(struct drm_device *dev)\n {\n     if (drm_core_check_feature(dev, DRIVER_USE_AGP)) {\n-        if (pci_find_capability(dev->pdev, PCI_CAP_ID_AGP))\n-            dev->agp = nv_drm_agp_init(dev);\n-        if (dev->agp) {\n-            dev->agp->agp_mtrr = arch_phys_wc_add(\n-                dev->agp->agp_info.aper_base,\n-                dev->agp->agp_info.aper_size *\n+        struct nv_drm_extra_priv_data *extra = dev->dev_private;\n+\n+        if (pci_find_capability(extra->pdev, PCI_CAP_ID_AGP))\n+            extra->agp = nv_drm_agp_init(dev);\n+        if (extra->agp) {\n+            extra->agp->agp_mtrr = arch_phys_wc_add(\n+                extra->agp->agp_info.aper_base,\n+                extra->agp->agp_info.aper_size *\n                 1024 * 1024);\n         }\n     }\n }\n \n+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)\n+\n+#else\n+/* copied from v5.14.5 */\n+int nv_drm_legacy_agp_release(struct drm_device *dev)\n+{\n+    struct nv_drm_extra_priv_data *extra = dev->dev_private;\n+\n+    if (!extra->agp || !extra->agp->acquired)\n+        return -EINVAL;\n+    agp_backend_release(extra->agp->bridge);\n+    extra->agp->acquired = 0;\n+    return 0;\n+}\n+#endif\n+\n void nv_drm_legacy_agp_clear(struct drm_device *dev)\n {\n     struct nv_drm_agp_mem *entry, *tempe;\n+    struct nv_drm_extra_priv_data *extra = dev->dev_private;\n \n-    if (!dev->agp)\n+    if (!extra->agp)\n         return;\n     if (!drm_core_check_feature(dev, DRIVER_LEGACY))\n         return;\n \n-    list_for_each_entry_safe(entry, tempe, &dev->agp->memory, head) {\n+    list_for_each_entry_safe(entry, tempe, &extra->agp->memory, head) {\n         if (entry->bound)\n             nv_drm_unbind_agp(entry->memory);\n         nv_drm_free_agp(entry->memory, entry->pages);\n         kfree(entry);\n     }\n-    INIT_LIST_HEAD(&dev->agp->memory);\n+    INIT_LIST_HEAD(&extra->agp->memory);\n \n-    if (dev->agp->acquired)\n+    if (extra->agp->acquired)\n+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)\n         drm_agp_release(dev);\n-\n-    dev->agp->acquired = 0;\n-    dev->agp->enabled = 0;\n+#else\n+        nv_drm_legacy_agp_release(dev);\n+#endif\n+    extra->agp->acquired = 0;\n+    extra->agp->enabled = 0;\n }\n \n void nv_drm_pci_agp_destroy(struct drm_device *dev)\n {\n-    if (dev->agp) {\n-        arch_phys_wc_del(dev->agp->agp_mtrr);\n+    struct nv_drm_extra_priv_data *extra = dev->dev_private;\n+    if (extra->agp) {\n+        arch_phys_wc_del(extra->agp->agp_mtrr);\n         nv_drm_legacy_agp_clear(dev);\n-        kfree(dev->agp);\n-        dev->agp = NULL;\n+        kfree(extra->agp);\n+        extra->agp = NULL;\n     }\n }\n \n@@ -183,6 +215,7 @@\n                struct drm_driver *driver)\n {\n     struct drm_device *dev;\n+    struct nv_drm_extra_priv_data *extra;\n     int ret;\n \n     DRM_DEBUG(\"\\n\");\n@@ -191,11 +224,18 @@\n     if (IS_ERR(dev))\n         return PTR_ERR(dev);\n \n+    extra = kzalloc(sizeof(*extra), GFP_KERNEL);\n+    if (IS_ERR(extra))\n+        goto err_free;\n+\n+    extra->pdev = pdev;\n+\n     ret = pci_enable_device(pdev);\n     if (ret)\n-        goto err_free;\n+        goto err_free2;\n \n-    dev->pdev = pdev;\n+    /* use the not used (i hope) dev_private to store deprecated/legacy pointers */\n+    dev->dev_private = extra;\n #ifdef __alpha__\n     dev->hose = pdev->sysdata;\n #endif\n@@ -221,6 +261,8 @@\n err_agp:\n     nv_drm_pci_agp_destroy(dev);\n     pci_disable_device(pdev);\n+err_free2:\n+    kfree(extra);\n err_free:\n     drm_dev_put(dev);\n     return ret;\n@@ -303,10 +345,11 @@\n )\n {\n     nv_linux_state_t *nvl;\n+    struct nv_drm_extra_priv_data *extra = dev->dev_private;\n \n     for (nvl = nv_linux_devices; nvl != NULL; nvl = nvl->next)\n     {\n-        if (nvl->dev == dev->pdev)\n+        if (nvl->dev == extra->pdev)\n         {\n             nvl->drm = dev;\n             return 0;\n@@ -327,10 +370,11 @@\n )\n {\n     nv_linux_state_t *nvl;\n+    struct nv_drm_extra_priv_data *extra = dev->dev_private;\n \n     for (nvl = nv_linux_devices; nvl != NULL; nvl = nvl->next)\n     {\n-        if (nvl->dev == dev->pdev)\n+        if (nvl->dev == extra->pdev)\n         {\n             BUG_ON(nvl->drm != dev);\n             nvl->drm = NULL;\ndiff -Naur NVIDIA-Linux-x86_64-340.108-no-compat32.5.13/kernel/os-interface.c NVIDIA-Linux-x86_64-340.108-no-compat32.5.14/kernel/os-interface.c\n--- NVIDIA-Linux-x86_64-340.108-no-compat32.5.13/kernel/os-interface.c\t2021-07-25 10:29:29.083168593 +0200\n+++ NVIDIA-Linux-x86_64-340.108-no-compat32.5.14/kernel/os-interface.c\t2021-09-16 13:17:43.345906445 +0200\n@@ -549,7 +549,11 @@\n         // the requested timeout has expired, loop until less\n         // than a jiffie of the desired delay remains.\n         //\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)\n+        current->__state = TASK_INTERRUPTIBLE;\n+#else\n         current->state = TASK_INTERRUPTIBLE;\n+#endif\n         do\n         {\n             schedule_timeout(jiffies);\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-100.07-kernel-5.15.patch",
    "content": "diff -Naur NVIDIA-Linux-x86_64-340.108-old/kernel/nv-drm.c NVIDIA-Linux-x86_64-340.108-new/kernel/nv-drm.c\n--- NVIDIA-Linux-x86_64-340.108-old/kernel/nv-drm.c\t2021-11-06 20:08:18.779739237 +0200\n+++ NVIDIA-Linux-x86_64-340.108-new/kernel/nv-drm.c\t2021-11-06 20:42:13.443288819 +0200\n@@ -529,7 +529,9 @@ RM_STATUS NV_API_CALL nv_alloc_os_descri\n #if defined(NV_DRM_GEM_OBJECT_PUT_UNLOCKED_PRESENT)\n     drm_gem_object_put_unlocked(&nv_obj->base);\n #else\n-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)\n+    drm_gem_object_put(&nv_obj->base);\n+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)\n     drm_gem_object_put_locked(&nv_obj->base);\n #else\n     drm_gem_object_unreference_unlocked(&nv_obj->base);\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-100.08-kernel-5.16.patch",
    "content": "--- a/kernel/os-interface.h\t2019-12-11 22:04:24.000000000 +0000\n+++ b/kernel/os-interface.h\t2022-01-10 02:04:26.740899810 +0000\n@@ -24,7 +24,12 @@\n *                                                                           *\n \\***************************************************************************/\n \n+#include <linux/version.h>\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)\n+#include <linux/stdarg.h>\n+#else\n #include <stdarg.h>\n+#endif\n \n /*\n  * Define away Microsoft compiler extensions when possible\n--- a/kernel/nv.h\t2019-12-11 22:04:24.000000000 +0000\n+++ b/kernel/nv.h\t2022-01-10 02:29:07.828733372 +0000\n@@ -13,7 +13,12 @@\n #define _NV_H_\n \n #include <nvtypes.h>\n+#include <linux/version.h>\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)\n+#include <linux/stdarg.h>\n+#else\n #include <stdarg.h>\n+#endif\n \n #if !defined(NV_MIN)\n #define NV_MIN(_a,_b) ((_a) < (_b) ? (_a) : (_b))\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-100.09-kernel-5.17.patch",
    "content": "--- a/kernel/nv-linux.h\t2022-02-20 00:41:53.585928825 +0000\n+++ b/kernel/nv-linux.h\t2022-02-20 00:43:04.285797471 +0000\n@@ -2051,11 +2051,15 @@\n         __entry;                                               \\\n     })\n \n+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)\n #if defined(NV_PDE_DATA_PRESENT)\n # define NV_PDE_DATA(inode) PDE_DATA(inode)\n #else\n # define NV_PDE_DATA(inode) PDE(inode)->data\n #endif\n+#else\n+# define NV_PDE_DATA(inode) inode->i_private\n+#endif\n \n #if defined(NV_PROC_REMOVE_PRESENT)\n # define NV_REMOVE_PROC_ENTRY(entry)                           \\\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-100.10-kernel-5.18.patch",
    "content": "diff -Nur a/kernel/nv-vm.c b/kernel/nv-vm.c\n--- a/kernel/nv-vm.c\t2019-12-11 22:04:24.000000000 +0000\n+++ b/kernel/nv-vm.c\t2022-04-25 01:28:55.889120175 +0000\n@@ -169,12 +169,12 @@\n \n static inline int nv_map_sg(struct pci_dev *dev, struct scatterlist *sg)\n {\n-    return pci_map_sg(dev, sg, 1, PCI_DMA_BIDIRECTIONAL);\n+    return dma_map_sg(&dev->dev, sg, 1, DMA_BIDIRECTIONAL);\n }\n \n static inline void nv_unmap_sg(struct pci_dev *dev, struct scatterlist *sg)\n {\n-    pci_unmap_sg(dev, sg, 1, PCI_DMA_BIDIRECTIONAL);\n+    dma_unmap_sg(&dev->dev, sg, 1, DMA_BIDIRECTIONAL);\n }\n \n #define NV_MAP_SG_MAX_RETRIES 16\n--- a/kernel/nv-dma.c\t2019-12-11 22:04:24.000000000 +0000\n+++ b/kernel/nv-dma.c\t2022-04-25 01:52:11.243235749 +0000\n@@ -136,10 +136,10 @@\n         return status;\n     }\n \n-    dma_map->sg_map_count = pci_map_sg(dma_map->dev,\n+    dma_map->sg_map_count = dma_map_sg(&dma_map->dev->dev,\n             NV_DMA_MAP_SCATTERLIST(dma_map),\n             NV_DMA_MAP_SCATTERLIST_LENGTH(dma_map),\n-            PCI_DMA_BIDIRECTIONAL);\n+            DMA_BIDIRECTIONAL);\n     if (dma_map->sg_map_count == 0)\n     {\n         nv_printf(NV_DBG_ERRORS,\n@@ -211,8 +211,8 @@\n \n     if (dma_map->sg_map_count != 0)\n     {\n-        pci_unmap_sg(dma_map->dev, NV_DMA_MAP_SCATTERLIST(dma_map),\n-                NV_DMA_MAP_SCATTERLIST_LENGTH(dma_map), PCI_DMA_BIDIRECTIONAL);\n+        dma_unmap_sg(&dma_map->dev->dev, NV_DMA_MAP_SCATTERLIST(dma_map),\n+                NV_DMA_MAP_SCATTERLIST_LENGTH(dma_map), DMA_BIDIRECTIONAL);\n     }\n \n     *priv = dma_map->user_pages;\n--- a/kernel/nv-drm.c\t2022-04-25 01:59:40.255544206 +0000\n+++ b/kernel/nv-drm.c\t2022-04-25 02:08:28.231217905 +0000\n@@ -459,7 +459,7 @@\n }\n \n static int nv_drm_gem_vmap(struct drm_gem_object *gem,\n-                           struct dma_buf_map *map)\n+                           struct iosys_map *map)\n {\n     map->vaddr = nv_gem_prime_vmap(gem);\n     if (map->vaddr == NULL) {\n@@ -470,7 +470,7 @@\n }\n \n static void nv_drm_gem_vunmap(struct drm_gem_object *gem,\n-                              struct dma_buf_map *map)\n+                              struct iosys_map *map)\n {\n     nv_gem_prime_vunmap(gem, map->vaddr);\n     map->vaddr = NULL;\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-100.11-kernel-6.0.patch",
    "content": "--- a/kernel/nv-acpi.c\t2019-12-11 22:04:24.000000000 +0000\n+++ b/kernel/nv-acpi.c\t2022-08-29 08:50:01.383913160 +0000\n@@ -16,6 +16,9 @@\n #include \"nv-reg.h\"\n \n-#if defined(NV_LINUX_ACPI_EVENTS_SUPPORTED)\n+#include <linux/version.h>\n+// Rel.commit \"ACPI: bus: Drop unused list heads from struct acpi_device\" (Rafael J. Wysocki, 4 Jun 2022)\n+// Disable ACPI support due to more GPL stuff (acpi_dev_for_each_child is only GPL-exported)\n+#if defined(NV_LINUX_ACPI_EVENTS_SUPPORTED) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0))\n static RM_STATUS   nv_acpi_extract_integer (const union acpi_object *, void *, NvU32, NvU32 *);\n static RM_STATUS   nv_acpi_extract_buffer  (const union acpi_object *, void *, NvU32, NvU32 *);\n static RM_STATUS   nv_acpi_extract_package (const union acpi_object *, void *, NvU32, NvU32 *);\n"
  },
  {
    "path": "packages/x11/driver/xf86-video-vmware/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xf86-video-vmware\"\nPKG_VERSION=\"13.4.0\"\nPKG_SHA256=\"aed31ee5ed5ecc6e2226705383e7ad06f7602c1376a295305f376b17af3eb81a\"\nPKG_ARCH=\"x86_64\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.vmware.com\"\nPKG_URL=\"https://xorg.freedesktop.org/releases/individual/driver/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain mesa libX11 xorg-server\"\nPKG_LONGDESC=\"xf86-video-vmware: The Xorg driver for vmware video\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-vmwarectrl-client \\\n                           --with-xorg-module-dir=${XORG_PATH_MODULES}\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/x11/font/encodings/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"encodings\"\nPKG_VERSION=\"1.0.6\"\nPKG_SHA256=\"77e301de661f35a622b18f60b555a7e7d8c4d5f43ed41410e830d5ac9084fc26\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/font/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros font-util:host\"\nPKG_LONGDESC=\"X font encoding meta files.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-gzip-small-encodings \\\n                           --enable-gzip-large-encodings \\\n                           --with-fontrootdir=/usr/share/fonts\"\n"
  },
  {
    "path": "packages/x11/font/font-bitstream-type1/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"font-bitstream-type1\"\nPKG_VERSION=\"1.0.3\"\nPKG_SHA256=\"c6ea0569adad2c577f140328dc3302e729cb1b1ea90cd0025caf380625f8a688\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.X.org\"\nPKG_URL=\"http://xorg.freedesktop.org/archive/individual/font/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros font-xfree86-type1\"\nPKG_LONGDESC=\"Bitstream font family.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-fontrootdir=/usr/share/fonts\"\n\npost_install() {\n  mkfontdir ${INSTALL}/usr/share/fonts/Type1\n  mkfontscale ${INSTALL}/usr/share/fonts/Type1\n}\n"
  },
  {
    "path": "packages/x11/font/font-cursor-misc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"font-cursor-misc\"\nPKG_VERSION=\"1.0.3\"\nPKG_SHA256=\"17363eb35eece2e08144da5f060c70103b59d0972b4f4d77fd84c9a7a2dba635\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.X.org\"\nPKG_URL=\"http://xorg.freedesktop.org/archive/individual/font/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros font-util:host\"\nPKG_LONGDESC=\"X11 cursor fonts.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-fontrootdir=/usr/share/fonts\"\n\npost_install() {\n  mkfontdir ${INSTALL}/usr/share/fonts/misc\n  mkfontscale ${INSTALL}/usr/share/fonts/misc\n}\n"
  },
  {
    "path": "packages/x11/font/font-misc-misc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"font-misc-misc\"\nPKG_VERSION=\"1.1.2\"\nPKG_SHA256=\"b8e77940e4e1769dc47ef1805918d8c9be37c708735832a07204258bacc11794\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.X.org\"\nPKG_URL=\"http://xorg.freedesktop.org/archive/individual/font/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros font-util font-cursor-misc\"\nPKG_LONGDESC=\"A misc. public domain font.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-fontrootdir=/usr/share/fonts \\\n                           --disable-silent-rules \\\n                           --enable-iso8859-1 \\\n                           --enable-iso8859-2 \\\n                           --disable-iso8859-3 \\\n                           --disable-iso8859-4 \\\n                           --enable-iso8859-5 \\\n                           --enable-iso8859-7 \\\n                           --enable-iso8859-8 \\\n                           --enable-iso8859-9 \\\n                           --disable-iso8859-10 \\\n                           --disable-iso8859-11 \\\n                           --disable-iso8859-13 \\\n                           --enable-iso8859-14 \\\n                           --enable-iso8859-15 \\\n                           --disable-iso8859-16 \\\n                           --disable-koi8-r \\\n                           --disable-jisx0201\"\n\nPKG_MAKE_OPTS_TARGET=\"UTIL_DIR=${SYSROOT_PREFIX}/usr/share/fonts/util/\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/fonts/misc\n    cp 6x13-ISO8859-1.pcf.gz ${INSTALL}/usr/share/fonts/misc\n}\n\npost_install() {\n  mkfontdir ${INSTALL}/usr/share/fonts/misc\n  mkfontscale ${INSTALL}/usr/share/fonts/misc\n}\n"
  },
  {
    "path": "packages/x11/font/font-util/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"font-util\"\nPKG_VERSION=\"1.3.3\"\nPKG_SHA256=\"e791c890779c40056ab63aaed5e031bb6e2890a98418ca09c534e6261a2eebd2\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/font/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros\"\nPKG_DEPENDS_HOST=\"util-macros\"\nPKG_LONGDESC=\"X.org font utilities.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-fontrootdir=/usr/share/fonts \\\n                           --with-mapdir=/usr/share/fonts/util\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/x11/font/font-xfree86-type1/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"font-xfree86-type1\"\nPKG_VERSION=\"1.0.4\"\nPKG_SHA256=\"caebf42aec7be7f3bd40e0f232d6f34881b853dc84acfcdf7458358701fbe34a\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.X.org\"\nPKG_URL=\"http://xorg.freedesktop.org/releases/individual/font/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros\"\nPKG_LONGDESC=\"A Xfree86 Inc. Type1 font.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-fontrootdir=/usr/share/fonts\"\n\npost_install() {\n  mkfontdir ${INSTALL}/usr/share/fonts/Type1\n  mkfontscale ${INSTALL}/usr/share/fonts/Type1\n}\n"
  },
  {
    "path": "packages/x11/font/liberation-fonts-ttf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"liberation-fonts-ttf\"\nPKG_VERSION=\"2.1.5\"\nPKG_SHA256=\"7191c669bf38899f73a2094ed00f7b800553364f90e2637010a69c0e268f25d0\"\nPKG_LICENSE=\"OFL-1.1\"\nPKG_SITE=\"https://github.com/liberationfonts/liberation-fonts\"\nPKG_URL=\"https://github.com/liberationfonts/liberation-fonts/files/7261482/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros\"\nPKG_LONGDESC=\"This packages included the high-quality and open-sourced TrueType vector fonts.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/fonts/liberation\n    cp *.ttf ${INSTALL}/usr/share/fonts/liberation\n}\n\npost_install() {\n  mkfontdir ${INSTALL}/usr/share/fonts/liberation\n  mkfontscale ${INSTALL}/usr/share/fonts/liberation\n}\n"
  },
  {
    "path": "packages/x11/lib/libICE/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libICE\"\nPKG_VERSION=\"1.1.1\"\nPKG_SHA256=\"03e77afaf72942c7ac02ccebb19034e6e20f456dcf8dddadfeb572aa5ad3e451\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros xtrans\"\nPKG_LONGDESC=\"X Inter-Client Exchange (ICE) protocol library.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           --disable-ipv6 \\\n                           --without-xmlto\"\n"
  },
  {
    "path": "packages/x11/lib/libSM/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libSM\"\nPKG_VERSION=\"1.2.4\"\nPKG_SHA256=\"fdcbe51e4d1276b1183da77a8a4e74a137ca203e0bcfb20972dd5f3347e97b84\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.X.org\"\nPKG_URL=\"http://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros util-linux libICE\"\nPKG_LONGDESC=\"This package provides the main interface to the X11 Session Management library.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           --with-libuuid \\\n                           --without-xmlto \\\n                           --without-fop\"\n"
  },
  {
    "path": "packages/x11/lib/libX11/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2017 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libX11\"\nPKG_VERSION=\"1.8.4\"\nPKG_SHA256=\"c9a287a5aefa9804ce3cfafcf516fe96ed3f7e8e45c0e2ee59e84c86757df518\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.x.org/\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros xtrans libXau libxcb xorgproto\"\nPKG_LONGDESC=\"LibX11 is the main X11 library containing all the client-side code to access the X11 windowing system.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-loadable-i18n \\\n                           --disable-loadable-xcursor \\\n                           --enable-xthreads \\\n                           --disable-xcms \\\n                           --enable-xlocale \\\n                           --disable-xlocaledir \\\n                           --enable-xkb \\\n                           --with-keysymdefdir=${SYSROOT_PREFIX}/usr/include/X11 \\\n                           --disable-xf86bigfont \\\n                           --enable-malloc0returnsnull \\\n                           --disable-specs \\\n                           --without-xmlto \\\n                           --without-fop \\\n                           --enable-composecache \\\n                           --disable-lint-library \\\n                           --disable-ipv6 \\\n                           --without-launchd \\\n                           --without-lint\"\n"
  },
  {
    "path": "packages/x11/lib/libX11/patches/libX11-disable_nls_tests.patch",
    "content": "diff -Naur libX11-1.6.0/nls/Makefile.am libX11-1.6.0.patch/nls/Makefile.am\n--- libX11-1.6.0/nls/Makefile.am\t2013-06-04 04:21:16.000000000 +0200\n+++ libX11-1.6.0.patch/nls/Makefile.am\t2013-06-04 17:07:11.962522739 +0200\n@@ -36,10 +36,10 @@\n         < locale.dir.l1 > locale.dir.l2\n \tcat locale.dir.l2 locale.dir.l1 > locale.dir\n \n-if HAVE_PERL\n-LOG_COMPILER = $(PERL)\n-TESTS = compose-check.pl\n-endif HAVE_PERL\n+# if HAVE_PERL\n+# LOG_COMPILER = $(PERL)\n+# TESTS = compose-check.pl\n+# endif HAVE_PERL\n \n \n # Per-locale data files\n"
  },
  {
    "path": "packages/x11/lib/libXau/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXau\"\nPKG_VERSION=\"1.0.11\"\nPKG_SHA256=\"f3fa3282f5570c3f6bd620244438dbfbdd580fc80f02f549587a0f8ab329bbeb\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros xorgproto\"\nPKG_LONGDESC=\"X authorization file management libary\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared --enable-xthreads\"\n"
  },
  {
    "path": "packages/x11/lib/libXcomposite/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXcomposite\"\nPKG_VERSION=\"0.4.6\"\nPKG_SHA256=\"fe40bcf0ae1a09070eba24088a5eb9810efe57453779ec1e20a55080c6dc2c87\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libXfixes libXext libX11\"\nPKG_LONGDESC=\"X Composite Library\"\nPKG_BUILD_FLAGS=\"+pic\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/x11/lib/libXdamage/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXdamage\"\nPKG_VERSION=\"1.1.6\"\nPKG_SHA256=\"52733c1f5262fca35f64e7d5060c6fcd81a880ba8e1e65c9621cf0727afb5d11\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libX11 libXfixes\"\nPKG_LONGDESC=\"LibXdamage provides an X Window System client interface to the DAMAGE extension to the X protocol.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/x11/lib/libXext/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXext\"\nPKG_VERSION=\"1.3.5\"\nPKG_SHA256=\"db14c0c895c57ea33a8559de8cb2b93dc76c42ea4a39e294d175938a133d7bca\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libX11\"\nPKG_LONGDESC=\"LibXext provides an X Window System client interface to several extensions to the X protocol.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-malloc0returnsnull --without-xmlto\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/x11/lib/libXfixes/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXfixes\"\nPKG_VERSION=\"6.0.0\"\nPKG_SHA256=\"a7c1a24da53e0b46cac5aea79094b4b2257321c621b258729bc3139149245b4c\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libX11\"\nPKG_LONGDESC=\"X Fixes Library\"\nPKG_BUILD_FLAGS=\"+pic\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/x11/lib/libXfont2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXfont2\"\nPKG_VERSION=\"2.0.6\"\nPKG_SHA256=\"74ca20017eb0fb3f56d8d5e60685f560fc85e5ff3d84c61c4cb891e40c27aef4\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros xtrans freetype libfontenc\"\nPKG_LONGDESC=\"X font Library\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-ipv6 \\\n                           --enable-freetype \\\n                           --enable-builtins \\\n                           --disable-pcfformat \\\n                           --disable-bdfformat \\\n                           --disable-snfformat \\\n                           --enable-fc \\\n                           --with-gnu-ld \\\n                           --without-xmlto\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/x11/lib/libXi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXi\"\nPKG_VERSION=\"1.8\"\nPKG_SHA256=\"2ed181446a61c7337576467870bc5336fc9e222a281122d96c4d39a3298bba00\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.x.org/\"\nPKG_URL=\"https://www.x.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libX11 libXfixes libXext\"\nPKG_LONGDESC=\"LibXi provides an X Window System client interface to the XINPUT extension to the X protocol.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-malloc0returnsnull \\\n                           --disable-silent-rules \\\n                           --disable-docs \\\n                           --disable-specs \\\n                           --without-xmlto \\\n                           --without-fop \\\n                           --without-xsltproc \\\n                           --without-asciidoc \\\n                           --with-gnu-ld\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/x11/lib/libXinerama/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXinerama\"\nPKG_VERSION=\"1.1.5\"\nPKG_SHA256=\"5094d1f0fcc1828cb1696d0d39d9e866ae32520c54d01f618f1a3c1e30c2085c\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libXext\"\nPKG_LONGDESC=\"libXinerama is the Xinerama library.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared --enable-malloc0returnsnull\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/x11/lib/libXrandr/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXrandr\"\nPKG_VERSION=\"1.5.3\"\nPKG_SHA256=\"897639014a78e1497704d669c5dd5682d721931a4452c89a7ba62676064eb428\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libX11 libXrender libXext\"\nPKG_LONGDESC=\"Xrandr is a simple library designed to interface the X Resize and Rotate Extension.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-malloc0returnsnull\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/x11/lib/libXrender/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXrender\"\nPKG_VERSION=\"0.9.11\"\nPKG_SHA256=\"bc53759a3a83d1ff702fb59641b3d2f7c56e05051fa0cfa93501166fa782dc24\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libX11\"\nPKG_LONGDESC=\"The X Rendering Extension introduces digital image composition within the X Window System.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-malloc0returnsnull\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/x11/lib/libXt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXt\"\nPKG_VERSION=\"1.2.1\"\nPKG_SHA256=\"679cc08f1646dbd27f5e48ffe8dd49406102937109130caab02ca32c083a3d60\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.X.org\"\nPKG_URL=\"http://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libX11 libSM\"\nPKG_LONGDESC=\"libXt provides the X Toolkit Intrinsics library, an abstract widget library upon which other toolkits are based.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static \\\n                           --disable-shared \\\n                           --with-gnu-ld \\\n                           --enable-malloc0returnsnull\"\n\npre_make_target() {\n  make -C util CC=${HOST_CC} \\\n               CFLAGS=\"${HOST_CFLAGS} \" \\\n               LDFLAGS=\"${HOST_LDFLAGS}\" \\\n               makestrs\n}\n"
  },
  {
    "path": "packages/x11/lib/libXtst/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXtst\"\nPKG_VERSION=\"1.2.4\"\nPKG_SHA256=\"84f5f30b9254b4ffee14b5b0940e2622153b0d3aed8286a3c5b7eeb340ca33c8\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.X.org\"\nPKG_URL=\"http://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libXext libXi libX11\"\nPKG_LONGDESC=\"The Xtst Library\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-gnu-ld --without-xmlto\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n"
  },
  {
    "path": "packages/x11/lib/libXxf86vm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libXxf86vm\"\nPKG_VERSION=\"1.1.5\"\nPKG_SHA256=\"247fef48b3e0e7e67129e41f1e789e8d006ba47dba1c0cdce684b9b703f888e7\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.X.org\"\nPKG_URL=\"http://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libX11 libXext\"\nPKG_LONGDESC=\"The libxxf86vm provides an interface to the server extension XFree86-VidModeExtension.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared --enable-malloc0returnsnull\"\n"
  },
  {
    "path": "packages/x11/lib/libfontenc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libfontenc\"\nPKG_VERSION=\"1.1.7\"\nPKG_SHA256=\"c0d36991faee06551ddbaf5d99266e97becdc05edfae87a833c3ff7bf73cfec2\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros zlib font-util xorgproto\"\nPKG_LONGDESC=\"Libfontenc is a library which helps font libraries portably determine and deal with different encodings of fonts.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared\"\n"
  },
  {
    "path": "packages/x11/lib/libpciaccess/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libpciaccess\"\nPKG_VERSION=\"0.17\"\nPKG_SHA256=\"74283ba3c974913029e7a547496a29145b07ec51732bbb5b5c58d5025ad95b73\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://freedesktop.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros zlib\"\nPKG_LONGDESC=\"X.org libpciaccess library.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_header_asm_mtrr_h=set \\\n                           --with-pciids-path=/usr/share \\\n                           --with-zlib \"\n\npre_configure_target() {\n  CFLAGS+=\" -D_LARGEFILE64_SOURCE\"\n}\n"
  },
  {
    "path": "packages/x11/lib/libxcb/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libxcb\"\nPKG_VERSION=\"1.15\"\nPKG_SHA256=\"cc38744f817cf6814c847e2df37fcb8997357d72fa4bcbc228ae0fe47219a059\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://xcb.freedesktop.org\"\nPKG_URL=\"http://xcb.freedesktop.org/dist/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros Python3:host xcb-proto libpthread-stubs libXau\"\nPKG_LONGDESC=\"X C-language Bindings library.\"\nPKG_BUILD_FLAGS=\"+pic\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-screensaver \\\n                           --disable-xprint \\\n                           --disable-selinux \\\n                           --disable-xvmc\"\n\npre_configure_target() {\n  PYTHON_LIBDIR=${SYSROOT_PREFIX}/usr/lib/${PKG_PYTHON_VERSION}\n  PYTHON_TOOLCHAIN_PATH=${PYTHON_LIBDIR}/site-packages\n\n  PKG_CONFIG+=\" --define-variable=pythondir=${PYTHON_TOOLCHAIN_PATH}\"\n  PKG_CONFIG+=\" --define-variable=xcbincludedir=${SYSROOT_PREFIX}/usr/share/xcb\"\n}\n"
  },
  {
    "path": "packages/x11/lib/libxcvt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libxcvt\"\nPKG_VERSION=\"0.1.2\"\nPKG_SHA256=\"0561690544796e25cfbd71806ba1b0d797ffe464e9796411123e79450f71db38\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://gitlab.freedesktop.org/xorg/lib/libxcvt\"\nPKG_URL=\"https://www.x.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"libxcvt is a library providing a standalone version of the X server implementation of the VESA CVT standard timing modelines generator.\"\nPKG_BUILD_FLAGS=\"+pic\"\n"
  },
  {
    "path": "packages/x11/lib/libxkbfile/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libxkbfile\"\nPKG_VERSION=\"1.1.2\"\nPKG_SHA256=\"b8a3784fac420b201718047cfb6c2d5ee7e8b9481564c2667b4215f6616644b1\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros libX11\"\nPKG_LONGDESC=\"Libxkbfile provides an interface to read and manipulate description files for XKB, the X11 keyboard configuration extension.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--enable-static --disable-shared\"\n"
  },
  {
    "path": "packages/x11/lib/libxshmfence/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"libxshmfence\"\nPKG_VERSION=\"1.3.2\"\nPKG_SHA256=\"870df257bc40b126d91b5a8f1da6ca8a524555268c50b59c0acd1a27f361606f\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros xorgproto\"\nPKG_LONGDESC=\"libxshmfence is the Shared memory 'SyncFence' synchronization primitive.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic\"\n"
  },
  {
    "path": "packages/x11/lib/pixman/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"pixman\"\nPKG_VERSION=\"0.42.2\"\nPKG_SHA256=\"5747d2ec498ad0f1594878cc897ef5eb6c29e91c53b899f7f71b506785fc1376\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.x.org/\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros\"\nPKG_LONGDESC=\"Pixman is a generic library for manipulating pixel regions, contains low-level pixel manipulation routines.\"\nPKG_TOOLCHAIN=\"configure\"\n\nif [ \"${TARGET_ARCH}\" = arm ]; then\n  if target_has_feature neon; then\n    PIXMAN_NEON=\"--enable-arm-neon\"\n  else\n    PIXMAN_NEON=\"--disable-arm-neon\"\n  fi\n  PIXMAN_CONFIG=\"--disable-mmx --disable-sse2 --disable-vmx --enable-arm-simd ${PIXMAN_NEON} --disable-arm-iwmmxt\"\nelif [ \"${TARGET_ARCH}\" = aarch64 ]; then\n  PIXMAN_CONFIG=\"--disable-mmx --disable-sse2 --disable-vmx --disable-arm-simd --disable-arm-neon --disable-arm-iwmmxt\"\nelif [ \"${TARGET_ARCH}\" = x86_64  ]; then\n  PIXMAN_CONFIG=\"--enable-mmx --enable-sse2 --disable-ssse3 --disable-vmx --disable-arm-simd --disable-arm-neon\"\nfi\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-openmp \\\n                           --disable-loongson-mmi \\\n                           ${PIXMAN_CONFIG} \\\n                           --disable-mips-dspr2 \\\n                           --enable-gcc-inline-asm \\\n                           --disable-timers \\\n                           --disable-gtk \\\n                           --disable-libpng \\\n                           --with-gnu-ld\"\n\npost_makeinstall_target() {\n  cp ${SYSROOT_PREFIX}/usr/lib/pkgconfig/pixman-1.pc \\\n     ${SYSROOT_PREFIX}/usr/lib/pkgconfig/pixman.pc\n  cp -rf ${SYSROOT_PREFIX}/usr/include/pixman-1 \\\n     ${SYSROOT_PREFIX}/usr/include/pixman\n}\n"
  },
  {
    "path": "packages/x11/lib/xtrans/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xtrans\"\nPKG_VERSION=\"1.4.0\"\nPKG_SHA256=\"377c4491593c417946efcd2c7600d1e62639f7a8bbca391887e2c4679807d773\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.X.org\"\nPKG_URL=\"http://xorg.freedesktop.org/archive/individual/lib/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros\"\nPKG_LONGDESC=\"Abstract network code for X.\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--without-xmlto\"\n\npost_makeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n    cp xtrans.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n}\n"
  },
  {
    "path": "packages/x11/other/fluxbox/config/apps",
    "content": "[app] (name=.*)\n  [maximized] {yes}\n[end]\n"
  },
  {
    "path": "packages/x11/other/fluxbox/config/init",
    "content": "! If you're looking for settings to configure, they won't be saved here until\n! you change something in the fluxbox configuration menu.\n\nsession.keyFile: /storage/.fluxbox/keys\nsession.configVersion:\t13\nsession.screen0.defaultDeco: NONE\nsession.screen0.rootCommand: fbsetroot -solid black\nsession.screen0.autoRaise: True\nsession.screen0.fullMaximization: True\nsession.screen0.workspaces: 0\nsession.screen0.focusModel: StrictMouseFocus\nsession.screen0.focusNewWindows: True\nsession.screen0.focusLastWindow: True\n"
  },
  {
    "path": "packages/x11/other/fluxbox/config/keys",
    "content": "# This is all we need\n# alt-tab\nMod1 Tab :NextWindow {groups} (workspace=[current])\nMod1 Shift Tab :PrevWindow {groups} (workspace=[current])\n\n# current window commands\nMod1 F10 :Maximize\nMod1 F11 :Fullscreen\nMod1 Escape :Close\n\n# Normal window movement\nOnTitlebar Move1 :StartMoving\nOnLeftGrip Move1 :StartResizing bottomleft\nOnRightGrip Move1 :StartResizing bottomright\nOnWindowBorder Move1 :StartMoving\n\n# alt + left/right click to move/resize a window\nOnWindow Mod1 Mouse1 :MacroCmd {Raise} {Focus} {StartMoving}\nOnWindow Mod1 Mouse3 :MacroCmd {Raise} {Focus} {StartResizing NearestCorner}\n"
  },
  {
    "path": "packages/x11/other/fluxbox/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"fluxbox\"\n# dont bump or go back to ratpoison then f*** all 3rdparty stuff.\nPKG_VERSION=\"1.3.7\"\nPKG_SHA256=\"fc8c75fe94c54ed5a5dd3fd4a752109f8949d6df67a48e5b11a261403c382ec0\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://fluxbox.org/\"\nPKG_URL=\"http://sourceforge.net/projects/fluxbox/files/fluxbox/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain libX11 libXrandr libXext libXrender\"\nPKG_LONGDESC=\"Fluxbox is a windowmanager for X that was based on the Blackbox 0.61.1 code.\"\nPKG_TOOLCHAIN=\"autotools\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"ac_cv_func_realloc_0_nonnull=yes \\\n                           ac_cv_func_malloc_0_nonnull=yes \\\n                           --disable-toolbar \\\n                           --disable-slit \\\n                           --disable-systray \\\n                           --enable-ewmh \\\n                           --disable-xpm \\\n                           --disable-xft \\\n                           --disable-fribidi \\\n                           --disable-debug \\\n                           --disable-test \\\n                           --disable-nls \\\n                           --disable-imlib2\"\n\npost_install() {\n  enable_service windowmanager.service\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin/fbrun\n  rm -rf ${INSTALL}/usr/bin/fbsetbg\n  rm -rf ${INSTALL}/usr/bin/fluxbox-generate_menu\n  rm -rf ${INSTALL}/usr/bin/fluxbox-remote\n  rm -rf ${INSTALL}/usr/bin/startfluxbox\n\n  rm -rf ${INSTALL}/usr/share/fluxbox/styles\n\n  cp ${PKG_DIR}/config/apps ${INSTALL}/usr/share/fluxbox/\n  cp ${PKG_DIR}/config/init ${INSTALL}/usr/share/fluxbox/\n  cp ${PKG_DIR}/config/keys ${INSTALL}/usr/share/fluxbox/\n}\n"
  },
  {
    "path": "packages/x11/other/fluxbox/patches/fluxbox-01_hack-avoid-potential-SIGFPE-in-Menu-updateMenu.patch",
    "content": "From 540dc69955cddd5db24a8a9e16db8162fc0ddd10 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Fri, 25 Apr 2014 13:02:35 +0300\nSubject: [PATCH] hack: avoid potential SIGFPE in Menu::updateMenu()\n\n---\n src/FbTk/Menu.cc |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff -Naur fluxbox-1.3.7/src/FbTk/Menu.cc fluxbox-1.3.7.patch/src/FbTk/Menu.cc\n--- fluxbox-1.3.7/src/FbTk/Menu.cc\t2015-02-08 11:44:45.357187009 +0100\n+++ fluxbox-1.3.7.patch/src/FbTk/Menu.cc\t2015-02-15 21:37:37.322872231 +0100\n@@ -390,6 +390,7 @@\n }\n \n void Menu::updateMenu() {\n+    return; // because nobody cares\n \n     int bevel = theme()->bevelWidth();\n     int bw = theme()->borderWidth();\n"
  },
  {
    "path": "packages/x11/other/fluxbox/patches/fluxbox-02_hide-useless-errors.patch",
    "content": "From 86981018ce0963d93a45270abe379a705a055edf Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Mon, 16 Jun 2014 19:55:02 +0300\nSubject: [PATCH] hide useless errors\n\n---\n src/FbTk/Resource.cc |    2 --\n src/FbTk/Resource.hh |    2 --\n 2 files changed, 0 insertions(+), 4 deletions(-)\n\ndiff --git a/src/FbTk/Resource.cc b/src/FbTk/Resource.cc\nindex 4be85de..f7c7273 100644\n--- a/src/FbTk/Resource.cc\n+++ b/src/FbTk/Resource.cc\n@@ -91,8 +91,6 @@ bool ResourceManager::load(const char *filename) {\n             resource->setFromString(value.addr);\n         else {\n             _FB_USES_NLS;\n-            cerr<<_FBTK_CONSOLETEXT(Error, FailedRead, \"Failed to read\", \"Couldn't load a resource (following)\")<<\": \"<<resource->name()<<endl;\n-            cerr<<_FBTK_CONSOLETEXT(Error, UsingDefault, \"Setting default value\", \"Falling back to default value for resource\")<<endl;\n             resource->setDefaultValue();\n         }\n     }\ndiff --git a/src/FbTk/Resource.hh b/src/FbTk/Resource.hh\nindex 8c9d645..348f7e2 100644\n--- a/src/FbTk/Resource.hh\n+++ b/src/FbTk/Resource.hh\n@@ -216,8 +216,6 @@ void ResourceManager::addResource(Resource<T> &r) {\n                        r.altName().c_str(), &value_type, &value)) {\n         r.setFromString(value.addr);\n     } else {\n-        std::cerr<<\"Failed to read: \"<<r.name()<<std::endl;\n-        std::cerr<<\"Setting default value\"<<std::endl;\n         r.setDefaultValue();\n     }\n \n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/x11/other/fluxbox/patches/fluxbox-03_fixes-bug-1138.patch",
    "content": "From 22866c4d30f5b289c429c5ca88d800200db4fc4f Mon Sep 17 00:00:00 2001\nFrom: John Sennesael <john@aminking.com>\nDate: Mon, 2 Nov 2015 15:14:32 -0600\nSubject: fixes bug #1138\n\n---\n util/fluxbox-remote.cc | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/util/fluxbox-remote.cc b/util/fluxbox-remote.cc\nindex 59852e6..504015b 100644\n--- a/util/fluxbox-remote.cc\n+++ b/util/fluxbox-remote.cc\n@@ -73,7 +73,7 @@ int main(int argc, char **argv) {\n     if (strcmp(cmd, \"result\") == 0) {\n         XTextProperty text_prop;\n         if (XGetTextProperty(disp, root, &text_prop, atom_result) != 0\n-            && text_prop.value > 0\n+            && text_prop.value != 0\n             && text_prop.nitems > 0) {\n \n             printf(\"%s\", text_prop.value);\n-- \ncgit v0.11.2\n\n"
  },
  {
    "path": "packages/x11/other/fluxbox/patches/fluxbox-dont_build_fbrun.patch",
    "content": "diff -Naur fluxbox-1.3.6/Makefile.am fluxbox-1.3.6.patch/Makefile.am\n--- fluxbox-1.3.6/Makefile.am\t2015-01-05 15:14:15.320478262 +0100\n+++ fluxbox-1.3.6.patch/Makefile.am\t2015-01-10 20:39:20.376934793 +0100\n@@ -79,7 +79,6 @@\n include src/Makemodule.am\n include src/tests/Makemodule.am\n include util/Makemodule.am\n-include util/fbrun/Makemodule.am\n \n uninstall-hook:\n \trmdir $(DESTDIR)$(pkgdatadir)\n"
  },
  {
    "path": "packages/x11/other/fluxbox/system.d/windowmanager.service",
    "content": "[Unit]\nDescription=Fluxbox Window Manager\nRequires=xorg.service\nAfter=xorg.service\nBefore=kodi.service\n\n[Service]\nEnvironment=DISPLAY=:0\nEnvironment=HOME=/storage\nExecStart=/usr/bin/fluxbox\nKillMode=process\nRestart=always\nRestartSec=1\nStartLimitInterval=0\nTimeoutStopSec=1s\n\n[Install]\nWantedBy=graphical.target\n"
  },
  {
    "path": "packages/x11/other/fontconfig/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"fontconfig\"\nPKG_VERSION=\"2.14.1\"\nPKG_SHA256=\"ae480e9ca34382790312ff062c625ec70df94d6d9a9366e2b2b3d525f7f90387\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.freedesktop.org/wiki/Software/fontconfig/\"\nPKG_URL=\"https://www.freedesktop.org/software/fontconfig/release/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain util-linux util-macros freetype libxml2 zlib expat\"\nPKG_LONGDESC=\"Fontconfig is a library for font customization and configuration.\"\nPKG_TOOLCHAIN=\"configure\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--with-arch=${TARGET_ARCH} \\\n                           --with-cache-dir=/storage/.cache/fontconfig \\\n                           --with-default-fonts=/usr/share/fonts \\\n                           --without-add-fonts \\\n                           --disable-dependency-tracking \\\n                           --disable-docs \\\n                           --disable-rpath\"\n\npre_configure_target() {\n# ensure we dont use '-O3' optimization.\n  CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-O3|-O2|\")\n  CXXFLAGS=$(echo ${CXXFLAGS} | sed -e \"s|-O3|-O2|\")\n  CFLAGS+=\" -I${PKG_BUILD}\"\n  CXXFLAGS+=\" -I${PKG_BUILD}\"\n}\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/x11/proto/xcb-proto/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xcb-proto\"\nPKG_VERSION=\"1.15.2\"\nPKG_SHA256=\"7072beb1f680a2fe3f9e535b797c146d22528990c72f63ddb49d2f350a3653ed\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/proto/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros Python3:host\"\nPKG_LONGDESC=\"X C-language Bindings protocol headers.\"\n\npost_makeinstall_target() {\n  python_remove_source\n}\n"
  },
  {
    "path": "packages/x11/proto/xorgproto/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xorgproto\"\nPKG_VERSION=\"2022.2\"\nPKG_SHA256=\"5d13dbf2be08f95323985de53352c4f352713860457b95ccaf894a647ac06b9e\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"https://www.X.org\"\nPKG_URL=\"https://xorg.freedesktop.org/archive/individual/proto/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros\"\nPKG_LONGDESC=\"combined X.Org X11 Protocol headers\"\n\nPKG_MESON_OPTS_TARGET=\"-Dlegacy=false\"\n"
  },
  {
    "path": "packages/x11/util/util-macros/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"util-macros\"\nPKG_VERSION=\"1.19.3\"\nPKG_SHA256=\"0f812e6e9d2786ba8f54b960ee563c0663ddbe2434bf24ff193f5feab1f31971\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.X.org\"\nPKG_URL=\"http://xorg.freedesktop.org/archive/individual/util/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"X.org autoconf utilities such as M4 macros.\"\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/usr\n}\n"
  },
  {
    "path": "packages/x11/util/xorg-launch-helper/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"xorg-launch-helper\"\nPKG_VERSION=\"4\"\nPKG_SHA256=\"a7f8809a1810212506893ac5c62d8d17fee7a980fb10d59d1bef36f694767be5\"\nPKG_LICENSE=\"GPL-2\"\nPKG_SITE=\"https://github.com/sofar/xorg-launch-helper\"\nPKG_URL=\"http://foo-projects.org/~sofar/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain systemd\"\nPKG_LONGDESC=\"Xorg-launch-helper is a small utility that transforms the X server process (XOrg) into a daemon.\"\nPKG_TOOLCHAIN=\"autotools\"\n\npre_configure_target() {\n  export LIBS=\"-lsystemd\"\n}\n\npost_makeinstall_target() {\n  # do not install systemd services\n  rm -rf ${INSTALL}/usr/lib\n  mkdir -p ${INSTALL}/usr/bin\n  cp -P ${PKG_DIR}/scripts/xorg-launch ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "packages/x11/util/xorg-launch-helper/patches/xorg-launch-helper-automake-1.14.patch",
    "content": "diff -Naur xorg-launch-helper-4/configure.ac xorg-launch-helper-4.patch/configure.ac\n--- xorg-launch-helper-4/configure.ac\t2012-10-23 21:17:54.000000000 +0200\n+++ xorg-launch-helper-4.patch/configure.ac\t2013-12-06 15:57:17.948725894 +0100\n@@ -3,7 +3,7 @@\n \n AC_PREREQ([2.68])\n AC_INIT([xorg-launch-helper], [4], [auke-jan.h.kok@intel.com])\n-AM_INIT_AUTOMAKE([-Wall -Werror foreign])\n+AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])\n AC_CONFIG_FILES([Makefile])\n AC_CONFIG_SRCDIR([src/main.c])\n AC_CONFIG_HEADERS([config.h])\n"
  },
  {
    "path": "packages/x11/util/xorg-launch-helper/patches/xorg-launch-helper-dont-check-for-libsystemd-daemon.patch",
    "content": "From 9cd13bb39f2a8ce5d458f5a33010b5c9c5edf131 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Thu, 20 Feb 2014 16:34:57 +0200\nSubject: [PATCH] dont check for libsystemd-daemon\n\n---\n configure.ac |    3 ---\n 1 files changed, 0 insertions(+), 3 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex ceb8dd8..bc199c5 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -20,9 +20,6 @@ AC_CHECK_LIB([rt], [main], ,\n \t     AC_MSG_ERROR([librt is required but was not found]))\n \n PKG_CHECK_MODULES([SYSTEMD], [systemd])\n-PKG_CHECK_MODULES([LIBSYSTEMD_DAEMON], [libsystemd-daemon])\n-AC_SUBST(LIBSYSTEMD_DAEMON_CFLAGS)\n-AC_SUBST(LIBSYSTEMD_DAEMON_LIBS)\n \n AC_ARG_WITH([systemduserunitdir], AC_HELP_STRING([--with-systemduserunitdir=DIR],\n \t[path to systemd user service directory]), [path_systemduserunit=${withval}],\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/x11/util/xorg-launch-helper/patches/xorg-launch-helper-increase-timeout.patch",
    "content": "From 1e220cb2947f5c9ec5d5e35c7e2eb8b7dd728fca Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Fri, 22 Nov 2013 14:18:56 +0200\nSubject: [PATCH] increase timeout\n\n---\n src/main.c |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/src/main.c b/src/main.c\nindex 49e2d43..3c556b5 100644\n--- a/src/main.c\n+++ b/src/main.c\n@@ -85,14 +85,14 @@ int main(int argc, char **argv)\n \n \t\t/* setup sighandler for main thread */\n \t\tclock_gettime(CLOCK_REALTIME, &tv);\n-\t\ttv.tv_sec += 10;\n+\t\ttv.tv_sec += 30;\n \n \t\tpthread_mutex_lock(&notify_mutex);\n \t\terr = pthread_cond_timedwait(&notify_condition, &notify_mutex, &tv);\n \t\tpthread_mutex_unlock(&notify_mutex);\n \n \t\tif (err == ETIMEDOUT) {\n-\t\t\tfprintf(stderr, \"X server startup timed out (10secs). This indicates an\"\n+\t\t\tfprintf(stderr, \"X server startup timed out (30secs). This indicates an\"\n \t\t\t\t\"an issue in the server configuration or drivers.\\n\");\n \t\t\texit(EXIT_FAILURE);\n \t\t}\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "packages/x11/util/xorg-launch-helper/scripts/xorg-launch",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n# wait for xorg-configure@.service\n# max 10 seconds\nARGS_FILE=\"/run/libreelec/xorg-settings.conf\"\nfor i in $(seq 1 40) ; do\n  if [ -e \"$ARGS_FILE\" ] ; then\n    break\n  fi\n  usleep 250000\ndone\n\nif [ -e \"$ARGS_FILE\" ] ; then\n  . /run/libreelec/xorg-settings.conf\n  exec xorg-launch-helper $@ $XORG_ARGS\nelse\n  echo \"\" > /dev/tty1\n  echo \"failed to start xorg.\" > /dev/tty1\n  echo \"is your GPU supported?\" > /dev/tty1\n  echo \"\" > /dev/tty1\n  lspci -nn > /dev/tty1\n  echo \"\" > /dev/tty1\n  sleep 30\nfi\n"
  },
  {
    "path": "packages/x11/xserver/xorg-server/debug.d/xorg.conf",
    "content": "XORG_DEBUG=\"-logverbose 6 -verbose 6\"\n"
  },
  {
    "path": "packages/x11/xserver/xorg-server/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"xorg-server\"\nPKG_VERSION=\"21.1.7\"\nPKG_SHA256=\"d9c60b2dd0ec52326ca6ab20db0e490b1ff4f566f59ca742d6532e92795877bb\"\nPKG_LICENSE=\"OSS\"\nPKG_SITE=\"http://www.X.org\"\nPKG_URL=\"https://www.x.org/releases/individual/xserver/${PKG_NAME}-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain util-macros font-util xorgproto libpciaccess libX11 libXfont2 libXinerama libxcvt libxshmfence libxkbfile libdrm openssl freetype pixman systemd xorg-launch-helper\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory xf86-video-nvidia) $(get_pkg_directory xf86-video-nvidia-legacy)\"\nPKG_LONGDESC=\"X.Org Server is the free and open-source implementation of the X Window System display server.\"\n\nget_graphicdrivers\n\nPKG_MESON_OPTS_TARGET=\"-Dxorg=true \\\n                       -Dxephyr=false \\\n                       -Dxnest=false \\\n                       -Dxvfb=false \\\n                       -Dxwin=false \\\n                       -Dxquartz=false \\\n                       -Dbuilder_addr=${BUILDER_NAME} \\\n                       -Dlog_dir=\"/var/log\" \\\n                       -Dmodule_dir=${XORG_PATH_MODULES} \\\n                       -Ddefault_font_path=\"/usr/share/fonts/misc,built-ins\" \\\n                       -Dxdmcp=false \\\n                       -Dxdm-auth-1=false \\\n                       -Dsecure-rpc=false \\\n                       -Dipv6=false \\\n                       -Dinput_thread=true \\\n                       -Dxkb_dir=${XORG_PATH_XKB} \\\n                       -Dxkb_output_dir=\"/var/cache/xkb\" \\\n                       -Dvendor_name=\"LibreELEC\" \\\n                       -Dvendor_name_short=\"LE\" \\\n                       -Dvendor_web=\"https://libreelec.tv/\" \\\n                       -Dlisten_tcp=false \\\n                       -Dlisten_unix=true \\\n                       -Dlisten_local=false \\\n                       -Dint10=x86emu \\\n                       -Dpciaccess=true \\\n                       -Dudev=true \\\n                       -Dudev_kms=true \\\n                       -Dhal=false \\\n                       -Dsystemd_logind=false \\\n                       -Dvgahw=true \\\n                       -Ddpms=true \\\n                       -Dxf86bigfont=false \\\n                       -Dscreensaver=false \\\n                       -Dxres=true \\\n                       -Dxace=false \\\n                       -Dxselinux=false \\\n                       -Dxinerama=true \\\n                       -Dxcsecurity=false \\\n                       -Dxv=true \\\n                       -Dxvmc=false \\\n                       -Ddga=true \\\n                       -Dlinux_apm=false \\\n                       -Dlinux_acpi=false \\\n                       -Dmitshm=true \\\n                       -Dsha1=\"libcrypto\" \\\n                       -Ddri2=true \\\n                       -Ddri3=true \\\n                       -Ddrm=true \\\n                       -Dxpbproxy=false \\\n                       -Dlibunwind=false \\\n                       -Ddocs=false \\\n                       -Ddevel-docs=false\"\n\nif [ ! \"${OPENGL}\" = \"no\" ]; then\n  PKG_DEPENDS_TARGET+=\" ${OPENGL} libepoxy\"\n  PKG_MESON_OPTS_TARGET+=\" -Dglx=true \\\n                           -Ddri1=true \\\n                           -Dglamor=true\"\nelse\n  PKG_MESON_OPTS_TARGET+=\" -Dglx=false \\\n                           -Ddri1=false \\\n                           -Dglamor=false\"\nfi\n\nif [ \"${COMPOSITE_SUPPORT}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET+=\" libXcomposite\"\nfi\n\npost_makeinstall_target() {\n  rm -rf ${INSTALL}/var/cache/xkb\n\n  mkdir -p ${INSTALL}/usr/lib/xorg\n    cp -P ${PKG_DIR}/scripts/xorg-configure ${INSTALL}/usr/lib/xorg\n      sed -i -e \"s|@NVIDIA_VERSION@|$(get_pkg_version xf86-video-nvidia)|g\" ${INSTALL}/usr/lib/xorg/xorg-configure\n      sed -i -e \"s|@NVIDIA_LEGACY_VERSION@|$(get_pkg_version xf86-video-nvidia-legacy)|g\" ${INSTALL}/usr/lib/xorg/xorg-configure\n\n  if [ ! \"${OPENGL}\" = \"no\" ]; then\n    if [ -f ${INSTALL}/usr/lib/xorg/modules/extensions/libglx.so ]; then\n      mv ${INSTALL}/usr/lib/xorg/modules/extensions/libglx.so \\\n         ${INSTALL}/usr/lib/xorg/modules/extensions/libglx_mesa.so # rename for cooperate with nvidia drivers\n      ln -sf /var/lib/libglx.so ${INSTALL}/usr/lib/xorg/modules/extensions/libglx.so\n    fi\n  fi\n\n  mkdir -p ${INSTALL}/etc/X11\n    if find_file_path config/xorg.conf; then\n      cp ${FOUND_PATH} ${INSTALL}/etc/X11\n    fi\n}\n\npost_install() {\n  enable_service xorg.service\n}\n"
  },
  {
    "path": "packages/x11/xserver/xorg-server/patches/xorg-server-100.01-detect-radeon.patch",
    "content": "From 7b147dfef7a2ce8247710660d2b95d84100aaad7 Mon Sep 17 00:00:00 2001\nFrom: SupervisedThinking <supervisedthinking@gmail.com>\nDate: Tue, 19 Oct 2021 18:22:38 +0200\nSubject: [PATCH] Detect GPUs as \"radeon\" instead \"ati\"\n\n---\n hw/xfree86/common/xf86pciBus.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c\nindex aeeed8be66..5c22bd4080 100644\n--- a/hw/xfree86/common/xf86pciBus.c\n+++ b/hw/xfree86/common/xf86pciBus.c\n@@ -1106,7 +1106,7 @@ xf86VideoPtrToDriverList(struct pci_device *dev, XF86MatchedDrivers *md)\n         driverList[0] = \"ast\";\n         break;\n     case 0x1002:\n-        driverList[0] = \"ati\";\n+        driverList[0] = \"radeon\";\n         break;\n     case 0x102c:\n         driverList[0] = \"chips\";\n"
  },
  {
    "path": "packages/x11/xserver/xorg-server/patches/xorg-server-100.02-add-fedora-extra-modes-list.patch",
    "content": "From aff7aded0cc546491b29b37b093846921ab7378a Mon Sep 17 00:00:00 2001\nFrom: SupervisedThinking <supervisedthinking@gmail.com>\nDate: Tue, 19 Oct 2021 18:23:20 +0200\nSubject: [PATCH] Fedora extra modes list added by Adam Jackson\n <ajax@redhat.com>\n\n---\n hw/xfree86/common/extramodes | 59 ++++++++++++++++++++++++++++++++++++\n 1 file changed, 59 insertions(+)\n\ndiff --git a/hw/xfree86/common/extramodes b/hw/xfree86/common/extramodes\nindex 006b5cba17..3caa3bf015 100644\n--- a/hw/xfree86/common/extramodes\n+++ b/hw/xfree86/common/extramodes\n@@ -3,16 +3,75 @@\n //\n // $XFree86: xc/programs/Xserver/hw/xfree86/etc/extramodes,v 1.5 2002/06/05 19:43:05 dawes Exp $\n //\n+// NOTE:  Please keep all video modes sorted in order of X res, then Y res for\n+//        ease of maintenance and readability.\n \n # 832x624 @ 75Hz (74.55Hz) (fix if the official/Apple spec is different) hsync: 49.725kHz\n ModeLine \"832x624\" 57.284 832  864  928 1152  624  625  628  667 -Hsync -Vsync\n \n+# 1152x864 @ 60.00 Hz (GTF) hsync: 53.70 kHz; pclk: 81.62 MHz\n+Modeline \"1152x864\"  81.62  1152 1216 1336 1520  864 865 868 895  -HSync +Vsync\n+\n+# 1152x864 @ 70.00 Hz (GTF) hsync: 63.00 kHz; pclk: 96.77 MHz\n+Modeline \"1152x864\"  96.77  1152 1224 1344 1536  864 865 868 900  -HSync +Vsync\n+\n+# 1152x864 @ 75.00 Hz (GTF) hsync: 67.65 kHz; pclk: 104.99 MHz\n+Modeline \"1152x864\"  104.99  1152 1224 1352 1552  864 865 868 902  -HSync +Vsync\n+\n+# 1152x864 @ 85.00 Hz (GTF) hsync: 77.10 kHz; pclk: 119.65 MHz\n+Modeline \"1152x864\"  119.65  1152 1224 1352 1552  864 865 868 907  -HSync +Vsync\n+\n+# 1152x864 @ 85Hz (Red Hat custom modeline)\n+ModeLine \"1152x864\"  121.5 1152 1216 1344 1568    864  865  868  911 +hsync -vsync\n+\n+# 1152x864 @ 100.00 Hz (GTF) hsync: 91.50 kHz; pclk: 143.47 MHz\n+Modeline \"1152x864\"  143.47  1152 1232 1360 1568  864 865 868 915  -HSync +Vsync\n+\n+# 1360x768 59.96 Hz (CVT) hsync: 47.37 kHz; pclk: 72.00 MHz\n+Modeline \"1360x768\"   72.00  1360 1408 1440 1520  768 771 781 790 +hsync -vsync\n+\n+# 1360x768 59.80 Hz (CVT) hsync: 47.72 kHz; pclk: 84.75 MHz\n+Modeline \"1360x768\"   84.75  1360 1432 1568 1776  768 771 781 798 -hsync +vsync\n+\n # 1400x1050 @ 60Hz (VESA GTF) hsync: 65.5kHz\n ModeLine \"1400x1050\" 122.0 1400 1488 1640 1880   1050 1052 1064 1082 +hsync +vsync\n \n+# 1400x1050 @ 70.00 Hz (GTF) hsync: 76.51 kHz; pclk: 145.06 MHz\n+Modeline \"1400x1050\"  145.06  1400 1496 1648 1896  1050 1051 1054 1093  -HSync +Vsync\n+\n # 1400x1050 @ 75Hz (VESA GTF) hsync: 82.2kHz\n ModeLine \"1400x1050\" 155.8 1400 1464 1784 1912   1050 1052 1064 1090 +hsync +vsync\n \n+# 1400x1050 @ 85.00 Hz (GTF) hsync: 93.76 kHz; pclk: 179.26 MHz\n+Modeline \"1400x1050\"  179.26  1400 1504 1656 1912  1050 1051 1054 1103  -HSync +Vsync\n+\n+# 1440x900 @ 60.00 Hz (CVT) field rate 59.89 Hz; hsync: 55.93 kHz; pclk: 106.50 MHz\n+Modeline \"1440x900\"  106.50  1440 1520 1672 1904  900 903 909 934  -HSync +Vsync\n+\n+# 1600x1024 for SGI 1600 SW\n+ModeLine \"1600x1024\" 103.125 1600 1600 1656 1664 1024 1024 1029 1030 +Hsync +Vsync\n+\n+# 1680x1050 59.88 Hz (CVT 1.76MA-R) hsync: 64.67 kHz; pclk: 119.00 MHz\n+Modeline \"1680x1050\"  119.00  1680 1728 1760 1840  1050 1053 1059 1080 +hsync -vsync\n+\n+# 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz\n+Modeline \"1680x1050\"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync\n+\n+# 1680x1050 69.88 Hz (CVT) hsync: 76.58 kHz; pclk: 174.00 MHz\n+Modeline \"1680x1050\"  174.00  1680 1800 1976 2272  1050 1053 1059 1096 -hsync +vsync\n+\n+# 1680x1050 74.89 Hz (CVT 1.76MA) hsync: 82.31 kHz; pclk: 187.00 MHz\n+Modeline \"1680x1050\"  187.00  1680 1800 1976 2272  1050 1053 1059 1099 -hsync +vsync\n+\n+# 1680x1050 84.94 Hz (CVT 1.76MA) hsync: 93.86 kHz; pclk: 214.75 MHz\n+Modeline \"1680x1050\"  214.75  1680 1808 1984 2288  1050 1053 1059 1105 -hsync +vsync\n+\n+# 1920x1080 59.93 Hz (CVT 2.07M9-R) hsync: 66.59 kHz; pclk: 138.50 MHz\n+Modeline \"1920x1080\"  138.50  1920 1968 2000 2080  1080 1083 1088 1111 +hsync -vsync\n+\n+# 1920x1200 59.95 Hz (CVT 2.30MA-R) hsync: 74.04 kHz; pclk: 154.00 MHz\n+Modeline \"1920x1200\"  154.00  1920 1968 2000 2080  1200 1203 1209 1235 +hsync -vsync\n+\n # 1920x1440 @ 85Hz (VESA GTF) hsync: 128.5kHz\n Modeline \"1920x1440\" 341.35  1920 2072 2288 2656  1440 1441 1444 1512 -hsync +vsync\n \n"
  },
  {
    "path": "packages/x11/xserver/xorg-server/profile.d/11-xorg-server.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nDISPLAY=\":0.0\"\nexport DISPLAY\n\n"
  },
  {
    "path": "packages/x11/xserver/xorg-server/scripts/xorg-configure",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n################################################################################\n# creating needed directories and symlinks\n################################################################################\n\nmkdir -p /var/lib\nmkdir -p /var/run\n\n# HACK. we have xorg-configure@%. so nice race\n# can happen on multi-gpu setups\nif [ -e /var/run/xorg-configure.done ] ; then\n  exit 0\nfi\n\ntouch /var/run/xorg-configure.done\nlogger -t Xorg \"creating needed directories and symlinks for driver: \"${1}\"\"\n\n##############################################################################\n# setup xorg.conf paths\n##############################################################################\n\nlogger -t Xorg \"### setup xorg.conf paths ###\"\n\n  XORG_CONF_USER=\"/storage/.config/xorg.conf\"\n  XORG_CONF_USER_DRV=\"/storage/.config/xorg-${1}.conf\"\n  XORG_CONF_DEFAULT=\"/etc/X11/xorg.conf\"\n  XORG_CONF_DEFAULT_DRV=\"/etc/X11/xorg-${1}.conf\"\n\n##############################################################################\n# creating start options\n##############################################################################\n\nlogger -t Xorg \"### creating start options ###\"\n\n  XORG_ARGS=\"-s 0 -noreset -allowMouseOpenFail\"\n\n  # load user defined xorg.conf, if exist\n  if [ -f \"${XORG_CONF_USER}\" ]; then\n    XORG_ARGS=\"${XORG_ARGS} -config ${XORG_CONF_USER}\"\n  elif [ -f \"${XORG_CONF_USER_DRV}\" ]; then\n    XORG_ARGS=\"${XORG_ARGS} -config ${XORG_CONF_USER_DRV}\"\n  elif [ -f \"${XORG_CONF_DEFAULT}\" ]; then\n    XORG_ARGS=\"${XORG_ARGS} -config ${XORG_CONF_DEFAULT}\"\n  elif [ -f \"$XORG_CONF_DEFAULT_DRV\" ]; then\n    XORG_ARGS=\"${XORG_ARGS} -config ${XORG_CONF_DEFAULT_DRV}\"\n  fi\n\n##############################################################################\n# creating needed directories and symlinks\n##############################################################################\n\nlogger -t Xorg \"### creating needed directories and symlinks ###\"\n\n  # Used to support GeForce 600 Series & newer\n  if [ \"${1}\" = \"nvidia\" ]; then\n    ln -sf /usr/lib/xorg/modules/extensions/libglx_nvidia.so /var/lib/libglx.so\n    ln -sf /usr/lib/libnvidia-ml.so.@NVIDIA_VERSION@ /var/lib/libnvidia-ml.so.1\n    ln -sf /usr/lib/xorg/modules/drivers/nvidia-main_drv.so /var/lib/nvidia_drv.so\n    ln -sf /usr/lib/nvidia/nvidia.ko /var/lib/nvidia.ko\n    ln -sf /usr/lib/vdpau/libvdpau_nvidia-main.so.1 /var/lib/libvdpau_nvidia.so.1\n    ln -sf /usr/lib/vdpau/libvdpau_nvidia-main.so.1 /var/lib/libvdpau_nvidia.so\n    ln -sf /usr/bin/nvidia-main-smi /var/lib/nvidia-smi\n    ln -sf /usr/bin/nvidia-main-xconfig /var/lib/nvidia-xconfig\n    insmod /var/lib/nvidia.ko\n    # GL/GLX (GLVND)\n    ln -sf /usr/lib/libGL_glvnd.so.1 /var/lib/libGL.so\n    ln -sf /usr/lib/libGLX_glvnd.so.0 /var/lib/libGLX.so\n    # indirect rendering\n    ln -sf /usr/lib/libGLX_nvidia.so.0 /var/lib/libGLX_indirect.so.0\n    XORG_ARGS=\"${XORG_ARGS} -ignoreABI\"\n  # Used to support GeForce 500 Series & older\n  elif [ \"${1}\" = \"nvidia-legacy\" ]; then\n    ln -sf /usr/lib/libGL_nvidia-legacy.so.1 /var/lib/libGL.so\n    ln -sf /usr/lib/xorg/modules/extensions/libglx_nvidia-legacy.so /var/lib/libglx.so\n    ln -sf /usr/lib/libnvidia-ml.so.@NVIDIA_LEGACY_VERSION@ /var/lib/libnvidia-ml.so.1\n    ln -sf /usr/lib/xorg/modules/drivers/nvidia-legacy_drv.so /var/lib/nvidia_drv.so\n    ln -sf /usr/lib/nvidia-legacy/nvidia.ko /var/lib/nvidia.ko\n    ln -sf /usr/lib/vdpau/libvdpau_nvidia-legacy.so.1 /var/lib/libvdpau_nvidia.so.1\n    ln -sf /usr/lib/vdpau/libvdpau_nvidia-legacy.so.1 /var/lib/libvdpau_nvidia.so\n    ln -sf /usr/bin/nvidia-legacy-smi /var/lib/nvidia-smi\n    ln -sf /usr/bin/nvidia-legacy-xconfig /var/lib/nvidia-xconfig\n    insmod /var/lib/nvidia.ko\n    # GLX (NON-GLVND)\n    ln -sf /usr/lib/libGL_nvidia-legacy.so.1 /var/lib/libGLX.so\n    # indirect rendering\n    ln -sf /usr/lib/libGL_nvidia-legacy.so.1 /var/lib/libGLX_indirect.so.0\n    XORG_ARGS=\"${XORG_ARGS} -ignoreABI\"\n  # Used for AMD & Intel GPUs supported by MESA 3D\n  else\n    ln -sf /usr/lib/xorg/modules/extensions/libglx_mesa.so /var/lib/libglx.so\n    # GL/GLX (GLVND)\n    ln -sf /usr/lib/libGL_glvnd.so.1 /var/lib/libGL.so\n    ln -sf /usr/lib/libGLX_glvnd.so.0 /var/lib/libGLX.so\n    # indirect rendering\n    ln -sf /usr/lib/libGLX_mesa.so.0 /var/lib/libGLX_indirect.so.0\n  fi\n\n################################################################################\n# setup xorg-settings.conf\n################################################################################\n\nlogger -t Xorg \"### starting Xorg with '${DISPLAY} vt01 ${XORG_ARGS}' ###\"\n  mkdir -p /run/libreelec\n  echo \"XORG_ARGS=\\\"${XORG_ARGS}\\\"\" > /run/libreelec/xorg-settings.conf\n\n"
  },
  {
    "path": "packages/x11/xserver/xorg-server/system.d/xorg-configure@.service",
    "content": "[Unit]\nDescription=configure Xorg Server for %i\n\nConditionKernelCommandLine=!installer\n\n[Service]\nType=oneshot\nExecStart=/usr/lib/xorg/xorg-configure %i\nRemainAfterExit=yes\n"
  },
  {
    "path": "packages/x11/xserver/xorg-server/system.d/xorg.service",
    "content": "[Unit]\nDescription=Xorg Server\nBefore=graphical.target kodi.service\nAfter=multi-user.target\nConditionKernelCommandLine=!installer\n\n[Service]\nType=notify\nEnvironmentFile=-/run/libreelec/debug/xorg.conf\nExecStart=/usr/bin/xorg-launch -nolisten tcp vt01 $XORG_DEBUG\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=graphical.target\n"
  },
  {
    "path": "packages/x11/xserver/xorg-server/tmpfiles.d/z_90_xorg-server.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nd    /var/cache/xkb  0755 root root - -\n"
  },
  {
    "path": "packages/x11/xserver/xorg-server/udev.d/97-xorg.rules",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nACTION!=\"add|change\", GOTO=\"end_video\"\n\n# xorg_start only does something for subsystem \"pci\" and \"video\" class.\nSUBSYSTEM==\"pci\", ATTR{class}==\"0x030000\", GOTO=\"subsystem_pci\"\nGOTO=\"end_video\"\n\n# check for drivers using the pci substem\nLABEL=\"subsystem_pci\"\nDRIVER==\"i915\", ENV{xorg_driver}=\"i915\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"xorg-configure@i915.service\"\nDRIVER==\"amdgpu\", ENV{xorg_driver}=\"amdgpu\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"xorg-configure@amdgpu.service\"\nDRIVER==\"radeon\", ENV{xorg_driver}=\"radeon\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"xorg-configure@radeon.service\"\nDRIVER==\"vmwgfx\", ENV{xorg_driver}=\"vmware\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"xorg-configure@vmware.service\"\nDRIVER==\"virtio-pci\", ENV{xorg_driver}=\"modesetting\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"xorg-configure@modesetting.service\"\nGOTO=\"end_video\"\n\nLABEL=\"end_video\"\n"
  },
  {
    "path": "projects/ARM/README.md",
    "content": "The ARM project provides device targets used for compiling a common set of binary add-ons for use in ARM SoC projects and devices, and an \"everything disabled\" distro config to reduce individual or bulk add-on compile time. Current device targets are:\n\n- ARMv7\n- ARMv8\n"
  },
  {
    "path": "projects/ARM/devices/ARMv7/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    TARGET_CPU=\"cortex-a8\"\n    TARGET_FLOAT=\"hard\"\n    TARGET_FPU=\"neon-vfpv3\"\n\n  # OpenGL-ES implementation to use\n    OPENGLES=\"mesa\"\n\n  # Graphic drivers to use\n    GRAPHIC_DRIVERS=\"lima\"\n\n  # KODI Player implementation to use\n    KODIPLAYER_DRIVER=\"$OPENGLES\"\n\n  # Mali GPU family\n    MALI_FAMILY=\"450\"\n"
  },
  {
    "path": "projects/ARM/devices/ARMv8/options",
    "content": "################################################################################\n# setup device defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"neon-fp-armv8\"\n        ;;\n    esac\n\n  # OpenGL-ES implementation to use\n    OPENGLES=\"mesa\"\n\n  # Graphic drivers to use\n    GRAPHIC_DRIVERS=\"lima\"\n\n  # KODI Player implementation to use\n    KODIPLAYER_DRIVER=\"$OPENGLES\"\n\n  # Mali GPU family\n    MALI_FAMILY=\"450\"\n    \n"
  },
  {
    "path": "projects/ARM/linux/linux.aarch64.conf",
    "content": "# dummy\n\n"
  },
  {
    "path": "projects/ARM/linux/linux.arm.conf",
    "content": "# dummy\n\n"
  },
  {
    "path": "projects/ARM/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # Bootloader to use (syslinux / u-boot / bcm2835-bootloader)\n    BOOTLOADER=\"u-boot\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"\"\n\n  # Kernel to use. values can be:\n    LINUX=\"default\"\n\n\n################################################################################\n# setup build defaults\n################################################################################\n\n  # Project CFLAGS\n    PROJECT_CFLAGS=\"\"\n\n  # SquashFS compression method (gzip / lzo / xz / zstd)\n    SQUASHFS_COMPRESSION=\"zstd\"\n\n\n################################################################################\n# setup project defaults\n################################################################################\n\n  # install extra subtitle Fonts for KODI (yes / no)\n    KODI_EXTRA_FONTS=\"no\"\n\n  # build and install PulseAudio support (yes / no)\n    PULSEAUDIO_SUPPORT=\"yes\"\n\n  # build and install with BluRay support (yes / no)\n    KODI_BLURAY_SUPPORT=\"no\"\n\n  # build and install with BD+ support\n    BLURAY_BDPLUS_SUPPORT=\"no\"\n\n  # build and install with AACS support\n    BLURAY_AACS_SUPPORT=\"no\"\n\n  # build and install with DVDCSS support\n    KODI_DVDCSS_SUPPORT=\"no\"\n\n  # additional drivers to install\n    ADDITIONAL_DRIVERS+=\"\"\n\n  # build and install bluetooth support (yes / no)\n    BLUETOOTH_SUPPORT=\"no\"\n\n  # build and install with KODI webfrontend (yes / no)\n    KODI_WEBSERVER_SUPPORT=\"no\"\n\n  # build and install Avahi (Zeroconf) daemon (yes / no)\n    AVAHI_DAEMON=\"no\"\n\n  # build with UPnP support (yes / no)\n    KODI_UPNP_SUPPORT=\"no\"\n\n  # build with MySQL support (mariadb / none)\n    KODI_MYSQL_SUPPORT=\"no\"\n\n  # build xbmc with optical drive support (yes / no)\n    KODI_OPTICAL_SUPPORT=\"no\"\n\n  # build with AirPlay support (stream videos from iDevices to KODI) (yes / no)\n    KODI_AIRPLAY_SUPPORT=\"no\"\n\n  # build with AirTunes support (stream music from iDevices to KODI) (yes / no)\n    KODI_AIRTUNES_SUPPORT=\"no\"\n\n  # build with libnfs support (mounting nfs shares with KODI) (yes / no)\n    KODI_NFS_SUPPORT=\"no\"\n\n  # build with Samba Client support (mounting SAMBA shares with KODI) (yes / no)\n    KODI_SAMBA_SUPPORT=\"no\"\n\n  # build with NFS support (mounting nfs shares via the OS) (yes / no)\n    NFS_SUPPORT=\"no\"\n\n  # build with Samba Client support (mounting samba shares via the OS) (yes / no)\n    SAMBA_SUPPORT=\"no\"\n\n  # build and install Samba Server (yes / no)\n    SAMBA_SERVER=\"no\"\n\n  # build and install SFTP Server (yes / no)\n    SFTP_SERVER=\"no\"\n\n  # build and install OpenVPN support (yes / no)\n    OPENVPN_SUPPORT=\"no\"\n\n  # build and install WireGuard support (yes / no)\n    WIREGUARD_SUPPORT=\"no\"\n\n  # build and install diskmounter support (udevil)\n    UDEVIL=\"no\"\n\n  # build and install hfs filesystem utilities (yes / no)\n    HFSTOOLS=\"no\"\n\n  # Xorg Graphic drivers to use (all / r300,r600,nvidia)\n    GRAPHIC_DRIVERS=\"mesa\"\n\n  # build and install remote support (yes / no)\n    REMOTE_SUPPORT=\"no\"\n\n  # build and install Joystick support (yes / no)\n    JOYSTICK_SUPPORT=\"no\"\n\n  # build and install CEC adapter support (yes / no)\n    CEC_SUPPORT=\"no\"\n\n  # build and install CEC framework support (yes / no)\n    CEC_FRAMEWORK_SUPPORT=\"no\"\n\n  # build and install iSCSI support - iscsistart (yes / no)\n    ISCSI_SUPPORT=\"no\"\n\n  # build with swap support (yes / no)\n    SWAP_SUPPORT=\"no\"\n\n  # additional packages to install\n    ADDITIONAL_PACKAGES+=\"\"\n\n  # build with installer (yes / no)\n    INSTALLER_SUPPORT=\"no\"\n\n  # build and install nano text editor (yes / no)\n    NANO_EDITOR=\"no\"\n\n  # cron support (yes / no)\n    CRON_SUPPORT=\"no\"\n\n  # OpenGL(X) implementation to use (no / mesa)\n    OPENGL=\"no\"\n\n  # Vulkan implementation to use (vulkan-loader / no)\n    VULKAN=\"no\"\n\n  # Displayserver to use (wl / no)\n    DISPLAYSERVER=\"no\"\n\n  # Windowmanager to use (weston / no)\n    WINDOWMANAGER=\"no\"\n\n  # additional Firmware to use\n    FIRMWARE=\"\"\n"
  },
  {
    "path": "projects/Allwinner/bootloader/config",
    "content": "# CONFIG_VIDEO_DE2 is not set\n# CONFIG_USB_EHCI_HCD is not set\n# CONFIG_USB_OHCI_HCD is not set\n# CONFIG_SUN8I_EMAC is not set\nCONFIG_BOOTDELAY=0\nCONFIG_MACPWR=\"\"\n# CONFIG_EFI_LOADER is not set\nCONFIG_SPL_LOAD_FIT=y\nCONFIG_SPL_FIT_IMAGE_TINY=y\n"
  },
  {
    "path": "projects/Allwinner/bootloader/firmware",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n[ -n \"$ATF_PLATFORM\" ] && cp -av $(get_install_dir atf)/usr/share/bootloader/bl31.bin .\n\nCRUST_CONFIG=$($ROOT/$SCRIPTS/uboot_helper $PROJECT $DEVICE $UBOOT_SYSTEM crust_config)\n[ -n \"$CRUST_CONFIG\" ] && cp -av $(get_install_dir crust)/usr/share/bootloader/scp.bin .\n\n# Suppress errors from uboot_helper so u-boot properly builds with and without crust\ntrue\n"
  },
  {
    "path": "projects/Allwinner/bootloader/install",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\ncp -av u-boot-sunxi-with-spl.bin $INSTALL/usr/share/bootloader\n"
  },
  {
    "path": "projects/Allwinner/bootloader/mkimage",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/u-boot-sunxi-with-spl.bin\" ]; then\n  echo \"Writing U-Boot to $(basename $DISK)\"\n  dd if=\"$RELEASE_DIR/3rdparty/bootloader/u-boot-sunxi-with-spl.bin\" of=\"$DISK\" bs=1K seek=8 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\nfi\n"
  },
  {
    "path": "projects/Allwinner/bootloader/release",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nSRCDIR=\"$BUILD/image/system/usr/share/bootloader\"\nDSTDIR=\"$RELEASE_DIR/3rdparty/bootloader\"\n\nmkdir -p \"$DSTDIR/overlays\"\n  if [ -n \"$UBOOT_SYSTEM\" ]; then\n    cp -a \"$SRCDIR/u-boot-sunxi-with-spl.bin\" \"$DSTDIR\"\n  fi\n\n  cp -a \"$SRCDIR\"/sun*-${DEVICE,,}-*.dtb \"$DSTDIR\"\n\n  cp -a \"$SRCDIR\"/overlays/sun*-${DEVICE,,}-*.dtbo \"$DSTDIR\"/overlays > /dev/null 2>&1 || true\n"
  },
  {
    "path": "projects/Allwinner/bootloader/update.sh",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n[ -z \"$BOOT_ROOT\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"$BOOT_PART\" ] && BOOT_PART=$(df \"$BOOT_ROOT\" | tail -1 | awk {' print $1 '})\nif [ -z \"$BOOT_DISK\" ]; then\n  case $BOOT_PART in\n    /dev/sd[a-z][0-9]*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,[0-9]*,,g\")\n      ;;\n    /dev/mmcblk*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,p[0-9]*,,g\")\n      ;;\n  esac\nfi\n\n# mount $BOOT_ROOT r/w\n  mount -o remount,rw $BOOT_ROOT\n\n# update Device Tree Blobs\n  for all_dtb in /flash/*.dtb; do\n    dtb=$(basename $all_dtb)\n    if [ -f $SYSTEM_ROOT/usr/share/bootloader/$dtb ]; then\n      echo \"*** updating Device Tree Blob: $dtb ...\"\n      cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT\n    fi\n  done\n\n# update Device Tree Overlays\n  if [ -d $SYSTEM_ROOT/usr/share/bootloader/overlays ]; then\n    echo \"*** updating Device Tree Overlays ...\"\n    mkdir -p /flash/overlays\n    cp -p $SYSTEM_ROOT/usr/share/bootloader/overlays/* /flash/overlays\n  fi\n\n# update bootloader files\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/u-boot-sunxi-with-spl.bin ]; then\n    echo \"*** updating U-Boot on: $BOOT_DISK ...\"\n    dd if=$SYSTEM_ROOT/usr/share/bootloader/u-boot-sunxi-with-spl.bin of=\"$BOOT_DISK\" bs=1k seek=8 conv=fsync &>/dev/null\n  fi\n\n# mount $BOOT_ROOT r/o\n  sync\n  mount -o remount,ro $BOOT_ROOT\n"
  },
  {
    "path": "projects/Allwinner/devices/A64/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc+crypto\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"crypto-neon-fp-armv8\"\n        ;;\n    esac\n\n  # Kernel target\n    KERNEL_TARGET=\"Image\"\n\n  # U-Boot firmware package(s) to use\n    UBOOT_FIRMWARE=\"atf crust\"\n\n  # ATF platform\n    ATF_PLATFORM=\"sun50i_a64\"\n\n  # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q)\n    OPENGLES=\"mesa\"\n\n  # Mali GPU family\n    MALI_FAMILY=\"400\"\n\n  # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)\n    KODIPLAYER_DRIVER=\"$OPENGLES\"\n\n  # set the addon project\n    ADDON_PROJECT=\"ARMv8\"\n"
  },
  {
    "path": "projects/Allwinner/devices/H2-plus/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      arm)\n        # TARGET_CPU:\n        # arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d\n        # arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c\n        # arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t\n        # arm720t arm740t strongarm strongarm110 strongarm1100\n        # strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t\n        # arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi\n        # arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e\n        # arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s\n        # arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4\n        # cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312.\n        TARGET_CPU=\"cortex-a7\"\n\n        # TARGET_FLOAT:\n        # Specifies which floating-point ABI to use. Permissible values are:\n        # soft hard\n        TARGET_FLOAT=\"hard\"\n\n        # TARGET_FPU:\n        # This specifies what floating point hardware (or hardware emulation) is\n        # available on the target. Permissible names are:\n        # fpa fpe2 fpe3 maverick vfp vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16\n        # vfpv3xd vfpv3xd-fp16 neon neon-fp16 vfpv4 vfpv4-d16 fpv4-sp-d16\n        # neon-vfpv4.\n        TARGET_FPU=\"neon-vfpv4\"\n        ;;\n    esac\n\n  # Kernel target\n    KERNEL_TARGET=\"zImage\"\n\n  # U-Boot firmware package(s) to use\n    UBOOT_FIRMWARE=\"crust\"\n\n  # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q)\n    OPENGLES=\"mesa\"\n\n  # Mali GPU family\n    MALI_FAMILY=\"400\"\n\n  # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)\n    KODIPLAYER_DRIVER=\"$OPENGLES\"\n\n  # set the addon project\n    ADDON_PROJECT=\"ARMv7\"\n"
  },
  {
    "path": "projects/Allwinner/devices/H2-plus/patches/u-boot/0001-DO-NOT-MERGE-sunxi-psci-Delegate-PSCI-to-SCPI.patch",
    "content": "From 470309271de34eb8c24138f1ac15bd37966ed01a Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 9 Oct 2021 23:01:05 -0500\nSubject: [PATCH 13/13] [DO NOT MERGE] sunxi: psci: Delegate PSCI to SCPI\n\nThis adds a new PSCI implementation which communicates with SCP firmware\nrunning on the AR100 using the SCPI protocol. This allows it to support\nthe full set of PSCI v1.1 features, including CPU idle states, system\nsuspend, and multiple reset methods.\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n arch/arm/cpu/armv7/Kconfig           |   2 +-\n arch/arm/cpu/armv7/sunxi/Makefile    |   2 +-\n arch/arm/cpu/armv7/sunxi/psci-scpi.c | 451 +++++++++++++++++++++++++++\n 3 files changed, 453 insertions(+), 2 deletions(-)\n create mode 100644 arch/arm/cpu/armv7/sunxi/psci-scpi.c\n\ndiff --git a/arch/arm/cpu/armv7/Kconfig b/arch/arm/cpu/armv7/Kconfig\nindex 06b477619334..948f4e8276fe 100644\n--- a/arch/arm/cpu/armv7/Kconfig\n+++ b/arch/arm/cpu/armv7/Kconfig\n@@ -44,7 +44,7 @@ config ARMV7_PSCI\n choice\n \tprompt \"Supported PSCI version\"\n \tdepends on ARMV7_PSCI\n-\tdefault ARMV7_PSCI_0_1 if ARCH_SUNXI\n+\tdefault ARMV7_PSCI_1_1 if ARCH_SUNXI\n \tdefault ARMV7_PSCI_1_0\n \thelp\n \t  Select the supported PSCI version.\ndiff --git a/arch/arm/cpu/armv7/sunxi/Makefile b/arch/arm/cpu/armv7/sunxi/Makefile\nindex 1d40d6a18dca..4a0c16deb459 100644\n--- a/arch/arm/cpu/armv7/sunxi/Makefile\n+++ b/arch/arm/cpu/armv7/sunxi/Makefile\n@@ -11,7 +11,7 @@ obj-$(CONFIG_MACH_SUN6I)\t+= tzpc.o\n obj-$(CONFIG_MACH_SUN8I_H3)\t+= tzpc.o\n \n ifndef CONFIG_SPL_BUILD\n-obj-$(CONFIG_ARMV7_PSCI)\t+= psci.o\n+obj-$(CONFIG_ARMV7_PSCI)\t+= psci-scpi.o\n endif\n \n ifdef CONFIG_SPL_BUILD\ndiff --git a/arch/arm/cpu/armv7/sunxi/psci-scpi.c b/arch/arm/cpu/armv7/sunxi/psci-scpi.c\nnew file mode 100644\nindex 000000000000..b3849b366e31\n--- /dev/null\n+++ b/arch/arm/cpu/armv7/sunxi/psci-scpi.c\n@@ -0,0 +1,451 @@\n+// SPDX-License-Identifier: GPL-2.0\n+/*\n+ * Copyright (C) 2016 Chen-Yu Tsai <wens@csie.org>\n+ * Copyright (C) 2018-2021 Samuel Holland <samuel@sholland.org>\n+ */\n+\n+#include <common.h>\n+#include <asm/arch/cpu.h>\n+#include <asm/arch/cpucfg.h>\n+#include <asm/armv7.h>\n+#include <asm/gic.h>\n+#include <asm/io.h>\n+#include <asm/psci.h>\n+#include <asm/secure.h>\n+#include <asm/system.h>\n+\n+#define\tGICD_BASE\t\t(SUNXI_GIC400_BASE + GIC_DIST_OFFSET)\n+#define\tGICC_BASE\t\t(SUNXI_GIC400_BASE + GIC_CPU_OFFSET_A15)\n+\n+#define HW_ON\t\t\t0\n+#define HW_OFF\t\t\t1\n+#define HW_STANDBY\t\t2\n+\n+#define MPIDR_AFFLVL0(mpidr)\t(mpidr & 0xf)\n+#define MPIDR_AFFLVL1(mpidr)\t(mpidr >> 8 & 0xf)\n+\n+#define SCPI_SHMEM_BASE\t\t0x0004be00\n+#define SCPI_SHMEM\t\t((struct scpi_shmem *)SCPI_SHMEM_BASE)\n+\n+#define SCPI_RX_CHANNEL\t\t1\n+#define SCPI_TX_CHANNEL\t\t0\n+#define SCPI_VIRTUAL_CHANNEL\tBIT(0)\n+\n+#define SCPI_MESSAGE_SIZE\t0x100\n+#define SCPI_PAYLOAD_SIZE\t(SCPI_MESSAGE_SIZE - sizeof(struct scpi_header))\n+\n+#define SUNXI_MSGBOX_BASE\t0x01c17000\n+#define REMOTE_IRQ_STAT_REG\t(SUNXI_MSGBOX_BASE + 0x0050)\n+#define LOCAL_IRQ_STAT_REG\t(SUNXI_MSGBOX_BASE + 0x0070)\n+#define MSG_STAT_REG(n)\t\t(SUNXI_MSGBOX_BASE + 0x0140 + 0x4 * (n))\n+#define MSG_DATA_REG(n)\t\t(SUNXI_MSGBOX_BASE + 0x0180 + 0x4 * (n))\n+\n+#define RX_IRQ(n)\t\tBIT(0 + 2 * (n))\n+#define TX_IRQ(n)\t\tBIT(1 + 2 * (n))\n+\n+enum {\n+\tCORE_POWER_LEVEL\t\t= 0,\n+\tCLUSTER_POWER_LEVEL\t\t= 1,\n+\tCSS_POWER_LEVEL\t\t\t= 2,\n+};\n+\n+enum {\n+\tSCPI_CMD_SCP_READY\t\t= 0x01,\n+\tSCPI_CMD_SET_CSS_POWER_STATE\t= 0x03,\n+\tSCPI_CMD_GET_CSS_POWER_STATE\t= 0x04,\n+\tSCPI_CMD_SET_SYS_POWER_STATE\t= 0x05,\n+};\n+\n+enum {\n+\tSCPI_E_OK\t\t\t= 0,\n+\tSCPI_E_PARAM\t\t\t= 1,\n+\tSCPI_E_ALIGN\t\t\t= 2,\n+\tSCPI_E_SIZE\t\t\t= 3,\n+\tSCPI_E_HANDLER\t\t\t= 4,\n+\tSCPI_E_ACCESS\t\t\t= 5,\n+\tSCPI_E_RANGE\t\t\t= 6,\n+\tSCPI_E_TIMEOUT\t\t\t= 7,\n+\tSCPI_E_NOMEM\t\t\t= 8,\n+\tSCPI_E_PWRSTATE\t\t\t= 9,\n+\tSCPI_E_SUPPORT\t\t\t= 10,\n+\tSCPI_E_DEVICE\t\t\t= 11,\n+\tSCPI_E_BUSY\t\t\t= 12,\n+\tSCPI_E_OS\t\t\t= 13,\n+\tSCPI_E_DATA\t\t\t= 14,\n+\tSCPI_E_STATE\t\t\t= 15,\n+};\n+\n+enum {\n+\tSCPI_POWER_ON\t\t\t= 0x00,\n+\tSCPI_POWER_RETENTION\t\t= 0x01,\n+\tSCPI_POWER_OFF\t\t\t= 0x03,\n+};\n+\n+enum {\n+\tSCPI_SYSTEM_SHUTDOWN\t\t= 0x00,\n+\tSCPI_SYSTEM_REBOOT\t\t= 0x01,\n+\tSCPI_SYSTEM_RESET\t\t= 0x02,\n+};\n+\n+struct scpi_header {\n+\tu8\t\t\tcommand;\n+\tu8\t\t\tsender;\n+\tu16\t\t\tsize;\n+\tu32\t\t\tstatus;\n+};\n+\n+struct scpi_message {\n+\tstruct scpi_header\theader;\n+\tu8\t\t\tpayload[SCPI_PAYLOAD_SIZE];\n+};\n+\n+struct scpi_shmem {\n+\tstruct scpi_message\trx;\n+\tstruct scpi_message\ttx;\n+};\n+\n+static bool __secure_data gic_dist_init;\n+\n+static u32 __secure_data lock;\n+\n+static inline u32 __secure read_mpidr(void)\n+{\n+\tu32 val;\n+\n+\tasm volatile (\"mrc p15, 0, %0, c0, c0, 5\" : \"=r\" (val));\n+\n+\treturn val;\n+}\n+\n+static void __secure scpi_begin_command(void)\n+{\n+\tu32 mpidr = read_mpidr();\n+\n+\tdo {\n+\t\twhile (readl(&lock));\n+\t\twritel(mpidr, &lock);\n+\t\tdsb();\n+\t} while (readl(&lock) != mpidr);\n+\twhile (readl(REMOTE_IRQ_STAT_REG) & RX_IRQ(SCPI_TX_CHANNEL));\n+}\n+\n+static void __secure scpi_send_command(void)\n+{\n+\twritel(SCPI_VIRTUAL_CHANNEL, MSG_DATA_REG(SCPI_TX_CHANNEL));\n+}\n+\n+static void __secure scpi_wait_response(void)\n+{\n+\twhile (!readl(MSG_STAT_REG(SCPI_RX_CHANNEL)));\n+}\n+\n+static void __secure scpi_end_command(void)\n+{\n+\twhile (readl(MSG_STAT_REG(SCPI_RX_CHANNEL)))\n+\t\treadl(MSG_DATA_REG(SCPI_RX_CHANNEL));\n+\twritel(RX_IRQ(SCPI_RX_CHANNEL), LOCAL_IRQ_STAT_REG);\n+\twritel(0, &lock);\n+}\n+\n+static void __secure scpi_set_css_power_state(u32 target_cpu, u32 core_state,\n+\t\t\t\t\t      u32 cluster_state, u32 css_state)\n+{\n+\tstruct scpi_shmem *shmem = SCPI_SHMEM;\n+\n+\tscpi_begin_command();\n+\n+\tshmem->tx.header.command = SCPI_CMD_SET_CSS_POWER_STATE;\n+\tshmem->tx.header.size = 4;\n+\n+\tshmem->tx.payload[0] = target_cpu    >> 4 | target_cpu;\n+\tshmem->tx.payload[1] = cluster_state << 4 | core_state;\n+\tshmem->tx.payload[2] = css_state;\n+\tshmem->tx.payload[3] = 0;\n+\n+\tscpi_send_command();\n+\tscpi_end_command();\n+}\n+\n+static s32 __secure scpi_get_css_power_state(u32 target_cpu, u8 *core_states,\n+\t\t\t\t\t     u8 *cluster_state)\n+{\n+\tstruct scpi_shmem *shmem = SCPI_SHMEM;\n+\tu32 cluster = MPIDR_AFFLVL1(target_cpu);\n+\tu32 offset;\n+\ts32 ret;\n+\n+\tscpi_begin_command();\n+\n+\tshmem->tx.header.command = SCPI_CMD_GET_CSS_POWER_STATE;\n+\tshmem->tx.header.size = 0;\n+\n+\tscpi_send_command();\n+\tscpi_wait_response();\n+\n+\tfor (offset = 0; offset < shmem->rx.header.size; offset += 2) {\n+\t\tif ((shmem->rx.payload[offset] & 0xf) == cluster) {\n+\t\t\t*cluster_state = shmem->rx.payload[offset+0] >> 4;\n+\t\t\t*core_states   = shmem->rx.payload[offset+1];\n+\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\tret = shmem->rx.header.status;\n+\n+\tscpi_end_command();\n+\n+\treturn ret;\n+}\n+\n+static s32 __secure scpi_set_sys_power_state(u32 sys_state)\n+{\n+\tstruct scpi_shmem *shmem = SCPI_SHMEM;\n+\ts32 ret;\n+\n+\tscpi_begin_command();\n+\n+\tshmem->tx.header.command = SCPI_CMD_SET_SYS_POWER_STATE;\n+\tshmem->tx.header.size = 1;\n+\n+\tshmem->tx.payload[0] = sys_state;\n+\n+\tscpi_send_command();\n+\tscpi_wait_response();\n+\n+\tret = shmem->rx.header.status;\n+\n+\tscpi_end_command();\n+\n+\treturn ret;\n+}\n+\n+void psci_enable_smp(void);\n+\n+static s32 __secure psci_suspend_common(u32 pc, u32 context_id, u32 core_state,\n+\t\t\t\t\tu32 cluster_state, u32 css_state)\n+\n+{\n+\tu32 target_cpu = read_mpidr();\n+\n+\tif (core_state == SCPI_POWER_OFF)\n+\t\tpsci_save(MPIDR_AFFLVL0(target_cpu), pc, context_id);\n+\tif (css_state == SCPI_POWER_OFF)\n+\t\tgic_dist_init = true;\n+\n+\tscpi_set_css_power_state(target_cpu, core_state,\n+\t\t\t\t cluster_state, css_state);\n+\n+\tpsci_cpu_off_common();\n+\n+\twfi();\n+\n+\tpsci_enable_smp();\n+\n+\treturn ARM_PSCI_RET_SUCCESS;\n+}\n+\n+u32 __secure psci_version(void)\n+{\n+\treturn ARM_PSCI_VER_1_1;\n+}\n+\n+s32 __secure psci_cpu_suspend(u32 __always_unused function_id,\n+\t\t\t      u32 power_state, u32 pc, u32 context_id)\n+{\n+\treturn psci_suspend_common(pc, context_id,\n+\t\t\t\t   power_state >> 0 & 0xf,\n+\t\t\t\t   power_state >> 4 & 0xf,\n+\t\t\t\t   power_state >> 8 & 0xf);\n+}\n+\n+s32 __secure psci_cpu_off(void)\n+{\n+\tu32 pc = 0, context_id = 0;\n+\n+\treturn psci_suspend_common(pc, context_id, SCPI_POWER_OFF,\n+\t\t\t\t   SCPI_POWER_OFF, SCPI_POWER_ON);\n+}\n+\n+s32 __secure psci_cpu_on(u32 __always_unused function_id,\n+\t\t\t u32 target_cpu, u32 pc, u32 context_id)\n+{\n+\tpsci_save(MPIDR_AFFLVL0(target_cpu), pc, context_id);\n+\n+\tscpi_set_css_power_state(target_cpu, SCPI_POWER_ON,\n+\t\t\t\t SCPI_POWER_ON, SCPI_POWER_ON);\n+\n+\treturn ARM_PSCI_RET_SUCCESS;\n+}\n+\n+s32 __secure psci_affinity_info(u32 function_id,\n+\t\t\t\tu32 target_cpu, u32 power_level)\n+{\n+\tif (power_level != CORE_POWER_LEVEL)\n+\t\treturn ARM_PSCI_RET_INVAL;\n+\n+\t/* This happens to have the same HW_ON/HW_OFF encoding. */\n+\treturn psci_node_hw_state(function_id, target_cpu, power_level);\n+}\n+\n+void __secure psci_system_off(void)\n+{\n+\tscpi_set_sys_power_state(SCPI_SYSTEM_SHUTDOWN);\n+\n+\t/* Wait to be turned off. */\n+\tfor (;;) wfi();\n+}\n+\n+void __secure psci_system_reset(void)\n+{\n+\tscpi_set_sys_power_state(SCPI_SYSTEM_REBOOT);\n+\n+\t/* Wait to be turned off. */\n+\tfor (;;) wfi();\n+}\n+\n+s32 __secure psci_features(u32 __always_unused function_id,\n+\t\t\t   u32 psci_fid)\n+{\n+\tswitch (psci_fid) {\n+\tcase ARM_PSCI_0_2_FN_PSCI_VERSION:\n+\tcase ARM_PSCI_0_2_FN_CPU_SUSPEND:\n+\tcase ARM_PSCI_0_2_FN_CPU_OFF:\n+\tcase ARM_PSCI_0_2_FN_CPU_ON:\n+\tcase ARM_PSCI_0_2_FN_AFFINITY_INFO:\n+\tcase ARM_PSCI_0_2_FN_SYSTEM_OFF:\n+\tcase ARM_PSCI_0_2_FN_SYSTEM_RESET:\n+\tcase ARM_PSCI_1_0_FN_PSCI_FEATURES:\n+\tcase ARM_PSCI_1_0_FN_CPU_DEFAULT_SUSPEND:\n+\tcase ARM_PSCI_1_0_FN_NODE_HW_STATE:\n+\tcase ARM_PSCI_1_0_FN_SYSTEM_SUSPEND:\n+\tcase ARM_PSCI_1_1_FN_SYSTEM_RESET2:\n+\t\treturn ARM_PSCI_RET_SUCCESS;\n+\tdefault:\n+\t\treturn ARM_PSCI_RET_NI;\n+\t}\n+}\n+\n+s32 __secure psci_cpu_default_suspend(u32 __always_unused function_id,\n+\t\t\t\t      u32 pc, u32 context_id)\n+{\n+\treturn psci_suspend_common(pc, context_id, SCPI_POWER_OFF,\n+\t\t\t\t   SCPI_POWER_OFF, SCPI_POWER_RETENTION);\n+}\n+\n+s32 __secure psci_node_hw_state(u32 __always_unused function_id,\n+\t\t\t\tu32 target_cpu, u32 power_level)\n+{\n+\tu32 core = MPIDR_AFFLVL0(target_cpu);\n+\tu8 core_states, cluster_state;\n+\n+\tif (power_level >= CSS_POWER_LEVEL)\n+\t\treturn HW_ON;\n+\tif (scpi_get_css_power_state(target_cpu, &core_states, &cluster_state))\n+\t\treturn ARM_PSCI_RET_NI;\n+\tif (power_level == CLUSTER_POWER_LEVEL) {\n+\t\tif (cluster_state == SCPI_POWER_ON)\n+\t\t\treturn HW_ON;\n+\t\tif (cluster_state < SCPI_POWER_OFF)\n+\t\t\treturn HW_STANDBY;\n+\t\treturn HW_OFF;\n+\t}\n+\n+\treturn (core_states & BIT(core)) ? HW_ON : HW_OFF;\n+}\n+\n+s32 __secure psci_system_suspend(u32 __always_unused function_id,\n+\t\t\t\t u32 pc, u32 context_id)\n+{\n+\treturn psci_suspend_common(pc, context_id, SCPI_POWER_OFF,\n+\t\t\t\t   SCPI_POWER_OFF, SCPI_POWER_OFF);\n+}\n+\n+s32 __secure psci_system_reset2(u32 __always_unused function_id,\n+\t\t\t\tu32 reset_type, u32 cookie)\n+{\n+\ts32 ret;\n+\n+\tif (reset_type)\n+\t\treturn ARM_PSCI_RET_INVAL;\n+\n+\tret = scpi_set_sys_power_state(SCPI_SYSTEM_RESET);\n+\tif (ret)\n+\t\treturn ARM_PSCI_RET_INVAL;\n+\n+\t/* Wait to be turned off. */\n+\tfor (;;) wfi();\n+}\n+\n+/*\n+ * R40 is different from other single cluster SoCs. The secondary core\n+ * entry address register is in the SRAM controller address range.\n+ */\n+#define SUN8I_R40_SRAMC_SOFT_ENTRY_REG0\t\t(0xbc)\n+\n+#ifdef CONFIG_MACH_SUN8I_R40\n+/* secondary core entry address is programmed differently on R40 */\n+static void __secure sunxi_set_entry_address(void *entry)\n+{\n+\twritel((u32)entry,\n+\t       SUNXI_SRAMC_BASE + SUN8I_R40_SRAMC_SOFT_ENTRY_REG0);\n+}\n+#else\n+static void __secure sunxi_set_entry_address(void *entry)\n+{\n+\tstruct sunxi_cpucfg_reg *cpucfg =\n+\t\t(struct sunxi_cpucfg_reg *)SUNXI_CPUCFG_BASE;\n+\n+\twritel((u32)entry, &cpucfg->priv0);\n+\n+\tif (IS_ENABLED(CONFIG_MACH_SUN8I_H3)) {\n+\t\t/* Redirect CPU 0 to the secure monitor via the resume shim. */\n+\t\twritel(0x16aaefe8, &cpucfg->super_standy_flag);\n+\t\twritel(0xaa16efe8, &cpucfg->super_standy_flag);\n+\t\twritel(SUNXI_RESUME_BASE, &cpucfg->priv1);\n+\t}\n+}\n+#endif\n+\n+void __secure psci_arch_init(void)\n+{\n+\tstatic bool __secure_data one_time_init = true;\n+\n+\tif (one_time_init) {\n+\t\t/* Set secondary core power-on PC. */\n+\t\tsunxi_set_entry_address(psci_cpu_entry);\n+\n+\t\t/* Wait for the SCP firmware to boot. */\n+\t\tscpi_begin_command();\n+\t\tscpi_wait_response();\n+\t\tscpi_end_command();\n+\n+\t\tone_time_init = false;\n+\t}\n+\n+\t/*\n+\t * Copied from arch/arm/cpu/armv7/virt-v7.c\n+\t * See also gic_resume() in arch/arm/mach-imx/mx7/psci-mx7.c\n+\t */\n+\tif (gic_dist_init) {\n+\t\tu32 i, itlinesnr;\n+\n+\t\t/* enable the GIC distributor */\n+\t\twritel(readl(GICD_BASE + GICD_CTLR) | 0x03, GICD_BASE + GICD_CTLR);\n+\n+\t\t/* TYPER[4:0] contains an encoded number of available interrupts */\n+\t\titlinesnr = readl(GICD_BASE + GICD_TYPER) & 0x1f;\n+\n+\t\t/* set all bits in the GIC group registers to one to allow access\n+\t\t * from non-secure state. The first 32 interrupts are private per\n+\t\t * CPU and will be set later when enabling the GIC for each core\n+\t\t */\n+\t\tfor (i = 1; i <= itlinesnr; i++)\n+\t\t\twritel((unsigned)-1, GICD_BASE + GICD_IGROUPRn + 4 * i);\n+\n+\t\tgic_dist_init = false;\n+\t}\n+\n+\t/* Be cool with non-secure. */\n+\twritel(0xff, GICC_BASE + GICC_PMR);\n+}\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Allwinner/devices/H2-plus/patches/u-boot/0007-sunxi-psci-Add-support-for-H3-CPU-0-hotplug.patch",
    "content": "From f15f4f36e023aaaeacdbebe16736119d1be3ac6b Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 9 Oct 2021 17:12:57 -0500\nSubject: [PATCH 07/13] sunxi: psci: Add support for H3 CPU 0 hotplug\n\nDue to a bug in the H3 SoC, where the CPU 0 hotplug flag cannot be\nwritten, resuming CPU 0 requires using the \"Super Standby\" code path in\nthe BROM instead of the hotplug path. This path requires jumping to an\neGON image in SRAM.\n\nAdd support to the build system to generate this eGON image and include\nit in the FIT, and add code to direct the BROM to its location in SRAM.\n\nSince the Super Standby code path in the BROM initializes the CPU and\nAHB1 clocks to 24 MHz, those registers need to be restored after control\npasses back to U-Boot. Furthermore, because the BROM lowers the AHB1\nclock divider to /1 before switching to the lower-frequency parent,\nPLL_PERIPH0 must be bypassed to prevent AHB1 from temporarily running at\n600 MHz. Otherwise, this locks up the SoC.\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n Makefile                        | 17 +++++++++++++++++\n arch/arm/cpu/armv7/sunxi/psci.c | 31 +++++++++++++++++++++++++++++++\n arch/arm/dts/sunxi-u-boot.dtsi  | 23 ++++++++++++++++++++++-\n include/configs/sun8i.h         |  4 ++++\n 4 files changed, 74 insertions(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex f911f7034430..9edcadfa9c47 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -984,6 +984,23 @@ endif\n endif\n endif\n \n+ifeq ($(CONFIG_MACH_SUN8I_H3)$(CONFIG_ARMV7_PSCI),yy)\n+INPUTS-$(CONFIG_ARMV7_PSCI) += u-boot-resume.img\n+\n+MKIMAGEFLAGS_u-boot-resume.img := -B 0x400 -T sunxi_egon\n+\n+u-boot-resume.img: u-boot-resume.bin\n+\t$(call if_changed,mkimage)\n+\n+OBJCOPYFLAGS_u-boot-resume.bin := -O binary\n+\n+u-boot-resume.bin: u-boot-resume.o\n+\t$(call if_changed,objcopy)\n+\n+u-boot-resume.S: u-boot\n+\t@sed -En 's/(0x[[:xdigit:]]+) +psci_cpu_entry/ldr pc, =\\1/p' $<.map > $@\n+endif\n+\n INPUTS-$(CONFIG_X86) += u-boot-x86-start16.bin u-boot-x86-reset16.bin \\\n \t$(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \\\n \t$(if $(CONFIG_TPL_X86_16BIT_INIT),tpl/u-boot-tpl.bin)\ndiff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/psci.c\nindex 3448fe2edcaa..299bd3ba65e0 100644\n--- a/arch/arm/cpu/armv7/sunxi/psci.c\n+++ b/arch/arm/cpu/armv7/sunxi/psci.c\n@@ -10,6 +10,7 @@\n #include <common.h>\n #include <asm/cache.h>\n \n+#include <asm/arch/clock.h>\n #include <asm/arch/cpu.h>\n #include <asm/arch/cpucfg.h>\n #include <asm/arch/prcm.h>\n@@ -141,6 +142,13 @@ static void __secure sunxi_set_entry_address(void *entry)\n \t\t(struct sunxi_cpucfg_reg *)SUNXI_CPUCFG_BASE;\n \n \twritel((u32)entry, &cpucfg->priv0);\n+\n+\tif (IS_ENABLED(CONFIG_MACH_SUN8I_H3)) {\n+\t\t/* Redirect CPU 0 to the secure monitor via the resume shim. */\n+\t\twritel(0x16aaefe8, &cpucfg->super_standy_flag);\n+\t\twritel(0xaa16efe8, &cpucfg->super_standy_flag);\n+\t\twritel(SUNXI_RESUME_BASE, &cpucfg->priv1);\n+\t}\n }\n #endif\n \n@@ -255,9 +263,12 @@ out:\n int __secure psci_cpu_on(u32 __always_unused unused, u32 mpidr, u32 pc,\n \t\t\t u32 context_id)\n {\n+\tstruct sunxi_ccm_reg *ccu = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;\n \tstruct sunxi_cpucfg_reg *cpucfg =\n \t\t(struct sunxi_cpucfg_reg *)SUNXI_CPUCFG_BASE;\n \tu32 cpu = (mpidr & 0x3);\n+\tu32 cpu_clk;\n+\tu32 bus_clk;\n \n \t/* store target PC and context id */\n \tpsci_save(cpu, pc, context_id);\n@@ -274,12 +285,32 @@ int __secure psci_cpu_on(u32 __always_unused unused, u32 mpidr, u32 pc,\n \t/* Lock CPU (Disable external debug access) */\n \tclrbits_le32(&cpucfg->dbg_ctrl1, BIT(cpu));\n \n+\tif (IS_ENABLED(CONFIG_MACH_SUN8I_H3) && cpu == 0) {\n+\t\t/* Save registers that will be clobbered by the BROM. */\n+\t\tcpu_clk = readl(&ccu->cpu_axi_cfg);\n+\t\tbus_clk = readl(&ccu->ahb1_apb1_div);\n+\n+\t\t/* Bypass PLL_PERIPH0 so AHB1 frequency does not spike. */\n+\t\tsetbits_le32(&ccu->pll6_cfg, BIT(25));\n+\t}\n+\n \t/* Power up target CPU */\n \tsunxi_cpu_set_power(cpu, true);\n \n \t/* De-assert reset on target CPU */\n \twritel(BIT(1) | BIT(0), &cpucfg->cpu[cpu].rst);\n \n+\tif (IS_ENABLED(CONFIG_MACH_SUN8I_H3) && cpu == 0) {\n+\t\t/* Spin until the BROM has clobbered the clock registers. */\n+\t\twhile (readl(&ccu->ahb1_apb1_div) != 0x00001100);\n+\n+\t\t/* Restore the registers and turn off PLL_PERIPH0 bypass. */\n+\t\twritel(cpu_clk, &ccu->cpu_axi_cfg);\n+\t\twritel(bus_clk, &ccu->ahb1_apb1_div);\n+\n+\t\tclrbits_le32(&ccu->pll6_cfg, BIT(25));\n+\t}\n+\n \t/* Unlock CPU (Disable external debug access) */\n \tsetbits_le32(&cpucfg->dbg_ctrl1, BIT(cpu));\n \ndiff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi\nindex ad1f97632979..a2c74da81aa9 100644\n--- a/arch/arm/dts/sunxi-u-boot.dtsi\n+++ b/arch/arm/dts/sunxi-u-boot.dtsi\n@@ -6,7 +6,11 @@\n #define ARCH \"arm\"\n #endif\n \n-#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN50I_H5)\n+#if defined(CONFIG_MACH_SUN8I_H3)\n+#ifdef CONFIG_ARMV7_PSCI\n+#define RESUME_ADDR\tSUNXI_RESUME_BASE\n+#endif\n+#elif defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN50I_H5)\n #define BL31_ADDR\t0x00044000\n #define SCP_ADDR\t0x00050000\n #elif defined(CONFIG_MACH_SUN50I_H6)\n@@ -74,6 +78,20 @@\n \t\t\t\t};\n #endif\n \n+#ifdef RESUME_ADDR\n+\t\t\t\tresume {\n+\t\t\t\t\tdescription = \"Super Standby resume image\";\n+\t\t\t\t\ttype = \"standalone\";\n+\t\t\t\t\tarch = ARCH;\n+\t\t\t\t\tcompression = \"none\";\n+\t\t\t\t\tload = <RESUME_ADDR>;\n+\n+\t\t\t\t\tblob-ext {\n+\t\t\t\t\t\tfilename = \"u-boot-resume.img\";\n+\t\t\t\t\t};\n+\t\t\t\t};\n+#endif\n+\n #ifdef SCP_ADDR\n \t\t\t\tscp {\n \t\t\t\t\tdescription = \"SCP firmware\";\n@@ -107,6 +125,9 @@\n \t\t\t\t\tfirmware = \"uboot\";\n #endif\n \t\t\t\t\tloadables =\n+#ifdef RESUME_ADDR\n+\t\t\t\t\t\t    \"resume\",\n+#endif\n #ifdef SCP_ADDR\n \t\t\t\t\t\t    \"scp\",\n #endif\ndiff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h\nindex 563635636624..2f0d69bdfce2 100644\n--- a/include/configs/sunxi-common.h\n+++ b/include/configs/sunxi-common.h\n@@ -15,6 +15,12 @@\n #include <asm/arch/cpu.h>\n #include <linux/stringify.h>\n \n+#ifdef SUNXI_SRAM_A2_SIZE\n+#define SUNXI_RESUME_BASE\t\t(CONFIG_ARMV7_SECURE_BASE + \\\n+\t\t\t\t\t CONFIG_ARMV7_SECURE_MAX_SIZE)\n+#define SUNXI_RESUME_SIZE\t\t1024\n+#endif\n+\n /* Serial & console */\n #define CONFIG_SYS_NS16550_SERIAL\n /* ns16550 reg in the low bits of cpu reg */\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Allwinner/devices/H2-plus/patches/u-boot/0010-sunxi-Enable-support-for-SCP-firmware-on-H3.patch",
    "content": "From 92657de6d2ac3ae100a4d78cc37c729142f1a59b Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 17 Apr 2021 13:33:54 -0500\nSubject: [PATCH 10/13] sunxi: Enable support for SCP firmware on H3\n\nNow that issues with the BROM have been sorted out, we can implement\nPSCI system suspend on H3 by delegating to SCP firmware. Let's start by\nincluding the firmware in the FIT image and starting the coprocessor if\nvalid firmware is loaded.\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n arch/arm/dts/sunxi-u-boot.dtsi | 1 +\n board/sunxi/board.c            | 8 ++++++++\n include/configs/sun8i.h        | 3 +++\n 3 files changed, 12 insertions(+)\n\ndiff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi\nindex a2c74da81aa9..ce062fe94052 100644\n--- a/arch/arm/dts/sunxi-u-boot.dtsi\n+++ b/arch/arm/dts/sunxi-u-boot.dtsi\n@@ -9,6 +9,7 @@\n #if defined(CONFIG_MACH_SUN8I_H3)\n #ifdef CONFIG_ARMV7_PSCI\n #define RESUME_ADDR\tSUNXI_RESUME_BASE\n+#define SCP_ADDR\tSUNXI_SCP_BASE\n #endif\n #elif defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN50I_H5)\n #define BL31_ADDR\t0x00044000\ndiff --git a/board/sunxi/board.c b/board/sunxi/board.c\nindex 2b7d655678d0..a25cd11f1124 100644\n--- a/board/sunxi/board.c\n+++ b/board/sunxi/board.c\n@@ -18,6 +18,7 @@\n #include <init.h>\n #include <log.h>\n #include <mmc.h>\n+#include <remoteproc.h>\n #include <axp_pmic.h>\n #include <generic-phy.h>\n #include <phy-sun4i-usb.h>\n@@ -957,6 +958,13 @@ int board_late_init(void)\n \tusb_ether_init();\n #endif\n \n+#ifdef SUNXI_SCP_BASE\n+\tif (!rproc_load(0, SUNXI_SCP_BASE, SUNXI_SCP_MAX_SIZE)) {\n+\t\tputs(\"Starting SCP...\\n\");\n+\t\trproc_start(0);\n+\t}\n+#endif\n+\n \treturn 0;\n }\n \ndiff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h\nindex 2f0d69bdfce2..fda5b235a3e0 100644\n--- a/include/configs/sunxi-common.h\n+++ b/include/configs/sunxi-common.h\n@@ -26,6 +26,9 @@\n #define SUNXI_RESUME_BASE\t\t(CONFIG_ARMV7_SECURE_BASE + \\\n \t\t\t\t\t CONFIG_ARMV7_SECURE_MAX_SIZE)\n #define SUNXI_RESUME_SIZE\t\t1024\n+\n+#define SUNXI_SCP_BASE\t\t\t(SUNXI_RESUME_BASE + SUNXI_RESUME_SIZE)\n+#define SUNXI_SCP_MAX_SIZE\t\t(16 * 1024)\n #endif\n \n /*\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Allwinner/devices/H3/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      arm)\n        # TARGET_CPU:\n        # arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d\n        # arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c\n        # arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t\n        # arm720t arm740t strongarm strongarm110 strongarm1100\n        # strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t\n        # arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi\n        # arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e\n        # arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s\n        # arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4\n        # cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312.\n        TARGET_CPU=\"cortex-a7\"\n\n        # TARGET_FLOAT:\n        # Specifies which floating-point ABI to use. Permissible values are:\n        # soft hard\n        TARGET_FLOAT=\"hard\"\n\n        # TARGET_FPU:\n        # This specifies what floating point hardware (or hardware emulation) is\n        # available on the target. Permissible names are:\n        # fpa fpe2 fpe3 maverick vfp vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16\n        # vfpv3xd vfpv3xd-fp16 neon neon-fp16 vfpv4 vfpv4-d16 fpv4-sp-d16\n        # neon-vfpv4.\n        TARGET_FPU=\"neon-vfpv4\"\n        ;;\n    esac\n\n  # Kernel target\n    KERNEL_TARGET=\"zImage\"\n\n  # U-Boot firmware package(s) to use\n    UBOOT_FIRMWARE=\"crust\"\n\n  # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q)\n    OPENGLES=\"mesa\"\n\n  # Mali GPU family\n    MALI_FAMILY=\"400\"\n\n  # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)\n    KODIPLAYER_DRIVER=\"$OPENGLES\"\n\n  # set the addon project\n    ADDON_PROJECT=\"ARMv7\"\n"
  },
  {
    "path": "projects/Allwinner/devices/H3/patches/u-boot/0001-DO-NOT-MERGE-sunxi-psci-Delegate-PSCI-to-SCPI.patch",
    "content": "From 470309271de34eb8c24138f1ac15bd37966ed01a Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 9 Oct 2021 23:01:05 -0500\nSubject: [PATCH 13/13] [DO NOT MERGE] sunxi: psci: Delegate PSCI to SCPI\n\nThis adds a new PSCI implementation which communicates with SCP firmware\nrunning on the AR100 using the SCPI protocol. This allows it to support\nthe full set of PSCI v1.1 features, including CPU idle states, system\nsuspend, and multiple reset methods.\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n arch/arm/cpu/armv7/Kconfig           |   2 +-\n arch/arm/cpu/armv7/sunxi/Makefile    |   2 +-\n arch/arm/cpu/armv7/sunxi/psci-scpi.c | 451 +++++++++++++++++++++++++++\n 3 files changed, 453 insertions(+), 2 deletions(-)\n create mode 100644 arch/arm/cpu/armv7/sunxi/psci-scpi.c\n\ndiff --git a/arch/arm/cpu/armv7/Kconfig b/arch/arm/cpu/armv7/Kconfig\nindex 06b477619334..948f4e8276fe 100644\n--- a/arch/arm/cpu/armv7/Kconfig\n+++ b/arch/arm/cpu/armv7/Kconfig\n@@ -44,7 +44,7 @@ config ARMV7_PSCI\n choice\n \tprompt \"Supported PSCI version\"\n \tdepends on ARMV7_PSCI\n-\tdefault ARMV7_PSCI_0_1 if ARCH_SUNXI\n+\tdefault ARMV7_PSCI_1_1 if ARCH_SUNXI\n \tdefault ARMV7_PSCI_1_0\n \thelp\n \t  Select the supported PSCI version.\ndiff --git a/arch/arm/cpu/armv7/sunxi/Makefile b/arch/arm/cpu/armv7/sunxi/Makefile\nindex 1d40d6a18dca..4a0c16deb459 100644\n--- a/arch/arm/cpu/armv7/sunxi/Makefile\n+++ b/arch/arm/cpu/armv7/sunxi/Makefile\n@@ -13,7 +13,7 @@ obj-$(CONFIG_MACH_SUN6I)\t+= tzpc.o\n obj-$(CONFIG_MACH_SUN8I)\t+= sram.o\n \n ifndef CONFIG_SPL_BUILD\n-obj-$(CONFIG_ARMV7_PSCI)\t+= psci.o\n+obj-$(CONFIG_ARMV7_PSCI)\t+= psci-scpi.o\n endif\n \n ifdef CONFIG_SPL_BUILD\ndiff --git a/arch/arm/cpu/armv7/sunxi/psci-scpi.c b/arch/arm/cpu/armv7/sunxi/psci-scpi.c\nnew file mode 100644\nindex 000000000000..b3849b366e31\n--- /dev/null\n+++ b/arch/arm/cpu/armv7/sunxi/psci-scpi.c\n@@ -0,0 +1,451 @@\n+// SPDX-License-Identifier: GPL-2.0\n+/*\n+ * Copyright (C) 2016 Chen-Yu Tsai <wens@csie.org>\n+ * Copyright (C) 2018-2021 Samuel Holland <samuel@sholland.org>\n+ */\n+\n+#include <common.h>\n+#include <asm/arch/cpu.h>\n+#include <asm/arch/cpucfg.h>\n+#include <asm/armv7.h>\n+#include <asm/gic.h>\n+#include <asm/io.h>\n+#include <asm/psci.h>\n+#include <asm/secure.h>\n+#include <asm/system.h>\n+\n+#define\tGICD_BASE\t\t(SUNXI_GIC400_BASE + GIC_DIST_OFFSET)\n+#define\tGICC_BASE\t\t(SUNXI_GIC400_BASE + GIC_CPU_OFFSET_A15)\n+\n+#define HW_ON\t\t\t0\n+#define HW_OFF\t\t\t1\n+#define HW_STANDBY\t\t2\n+\n+#define MPIDR_AFFLVL0(mpidr)\t(mpidr & 0xf)\n+#define MPIDR_AFFLVL1(mpidr)\t(mpidr >> 8 & 0xf)\n+\n+#define SCPI_SHMEM_BASE\t\t0x0004be00\n+#define SCPI_SHMEM\t\t((struct scpi_shmem *)SCPI_SHMEM_BASE)\n+\n+#define SCPI_RX_CHANNEL\t\t1\n+#define SCPI_TX_CHANNEL\t\t0\n+#define SCPI_VIRTUAL_CHANNEL\tBIT(0)\n+\n+#define SCPI_MESSAGE_SIZE\t0x100\n+#define SCPI_PAYLOAD_SIZE\t(SCPI_MESSAGE_SIZE - sizeof(struct scpi_header))\n+\n+#define SUNXI_MSGBOX_BASE\t0x01c17000\n+#define REMOTE_IRQ_STAT_REG\t(SUNXI_MSGBOX_BASE + 0x0050)\n+#define LOCAL_IRQ_STAT_REG\t(SUNXI_MSGBOX_BASE + 0x0070)\n+#define MSG_STAT_REG(n)\t\t(SUNXI_MSGBOX_BASE + 0x0140 + 0x4 * (n))\n+#define MSG_DATA_REG(n)\t\t(SUNXI_MSGBOX_BASE + 0x0180 + 0x4 * (n))\n+\n+#define RX_IRQ(n)\t\tBIT(0 + 2 * (n))\n+#define TX_IRQ(n)\t\tBIT(1 + 2 * (n))\n+\n+enum {\n+\tCORE_POWER_LEVEL\t\t= 0,\n+\tCLUSTER_POWER_LEVEL\t\t= 1,\n+\tCSS_POWER_LEVEL\t\t\t= 2,\n+};\n+\n+enum {\n+\tSCPI_CMD_SCP_READY\t\t= 0x01,\n+\tSCPI_CMD_SET_CSS_POWER_STATE\t= 0x03,\n+\tSCPI_CMD_GET_CSS_POWER_STATE\t= 0x04,\n+\tSCPI_CMD_SET_SYS_POWER_STATE\t= 0x05,\n+};\n+\n+enum {\n+\tSCPI_E_OK\t\t\t= 0,\n+\tSCPI_E_PARAM\t\t\t= 1,\n+\tSCPI_E_ALIGN\t\t\t= 2,\n+\tSCPI_E_SIZE\t\t\t= 3,\n+\tSCPI_E_HANDLER\t\t\t= 4,\n+\tSCPI_E_ACCESS\t\t\t= 5,\n+\tSCPI_E_RANGE\t\t\t= 6,\n+\tSCPI_E_TIMEOUT\t\t\t= 7,\n+\tSCPI_E_NOMEM\t\t\t= 8,\n+\tSCPI_E_PWRSTATE\t\t\t= 9,\n+\tSCPI_E_SUPPORT\t\t\t= 10,\n+\tSCPI_E_DEVICE\t\t\t= 11,\n+\tSCPI_E_BUSY\t\t\t= 12,\n+\tSCPI_E_OS\t\t\t= 13,\n+\tSCPI_E_DATA\t\t\t= 14,\n+\tSCPI_E_STATE\t\t\t= 15,\n+};\n+\n+enum {\n+\tSCPI_POWER_ON\t\t\t= 0x00,\n+\tSCPI_POWER_RETENTION\t\t= 0x01,\n+\tSCPI_POWER_OFF\t\t\t= 0x03,\n+};\n+\n+enum {\n+\tSCPI_SYSTEM_SHUTDOWN\t\t= 0x00,\n+\tSCPI_SYSTEM_REBOOT\t\t= 0x01,\n+\tSCPI_SYSTEM_RESET\t\t= 0x02,\n+};\n+\n+struct scpi_header {\n+\tu8\t\t\tcommand;\n+\tu8\t\t\tsender;\n+\tu16\t\t\tsize;\n+\tu32\t\t\tstatus;\n+};\n+\n+struct scpi_message {\n+\tstruct scpi_header\theader;\n+\tu8\t\t\tpayload[SCPI_PAYLOAD_SIZE];\n+};\n+\n+struct scpi_shmem {\n+\tstruct scpi_message\trx;\n+\tstruct scpi_message\ttx;\n+};\n+\n+static bool __secure_data gic_dist_init;\n+\n+static u32 __secure_data lock;\n+\n+static inline u32 __secure read_mpidr(void)\n+{\n+\tu32 val;\n+\n+\tasm volatile (\"mrc p15, 0, %0, c0, c0, 5\" : \"=r\" (val));\n+\n+\treturn val;\n+}\n+\n+static void __secure scpi_begin_command(void)\n+{\n+\tu32 mpidr = read_mpidr();\n+\n+\tdo {\n+\t\twhile (readl(&lock));\n+\t\twritel(mpidr, &lock);\n+\t\tdsb();\n+\t} while (readl(&lock) != mpidr);\n+\twhile (readl(REMOTE_IRQ_STAT_REG) & RX_IRQ(SCPI_TX_CHANNEL));\n+}\n+\n+static void __secure scpi_send_command(void)\n+{\n+\twritel(SCPI_VIRTUAL_CHANNEL, MSG_DATA_REG(SCPI_TX_CHANNEL));\n+}\n+\n+static void __secure scpi_wait_response(void)\n+{\n+\twhile (!readl(MSG_STAT_REG(SCPI_RX_CHANNEL)));\n+}\n+\n+static void __secure scpi_end_command(void)\n+{\n+\twhile (readl(MSG_STAT_REG(SCPI_RX_CHANNEL)))\n+\t\treadl(MSG_DATA_REG(SCPI_RX_CHANNEL));\n+\twritel(RX_IRQ(SCPI_RX_CHANNEL), LOCAL_IRQ_STAT_REG);\n+\twritel(0, &lock);\n+}\n+\n+static void __secure scpi_set_css_power_state(u32 target_cpu, u32 core_state,\n+\t\t\t\t\t      u32 cluster_state, u32 css_state)\n+{\n+\tstruct scpi_shmem *shmem = SCPI_SHMEM;\n+\n+\tscpi_begin_command();\n+\n+\tshmem->tx.header.command = SCPI_CMD_SET_CSS_POWER_STATE;\n+\tshmem->tx.header.size = 4;\n+\n+\tshmem->tx.payload[0] = target_cpu    >> 4 | target_cpu;\n+\tshmem->tx.payload[1] = cluster_state << 4 | core_state;\n+\tshmem->tx.payload[2] = css_state;\n+\tshmem->tx.payload[3] = 0;\n+\n+\tscpi_send_command();\n+\tscpi_end_command();\n+}\n+\n+static s32 __secure scpi_get_css_power_state(u32 target_cpu, u8 *core_states,\n+\t\t\t\t\t     u8 *cluster_state)\n+{\n+\tstruct scpi_shmem *shmem = SCPI_SHMEM;\n+\tu32 cluster = MPIDR_AFFLVL1(target_cpu);\n+\tu32 offset;\n+\ts32 ret;\n+\n+\tscpi_begin_command();\n+\n+\tshmem->tx.header.command = SCPI_CMD_GET_CSS_POWER_STATE;\n+\tshmem->tx.header.size = 0;\n+\n+\tscpi_send_command();\n+\tscpi_wait_response();\n+\n+\tfor (offset = 0; offset < shmem->rx.header.size; offset += 2) {\n+\t\tif ((shmem->rx.payload[offset] & 0xf) == cluster) {\n+\t\t\t*cluster_state = shmem->rx.payload[offset+0] >> 4;\n+\t\t\t*core_states   = shmem->rx.payload[offset+1];\n+\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\tret = shmem->rx.header.status;\n+\n+\tscpi_end_command();\n+\n+\treturn ret;\n+}\n+\n+static s32 __secure scpi_set_sys_power_state(u32 sys_state)\n+{\n+\tstruct scpi_shmem *shmem = SCPI_SHMEM;\n+\ts32 ret;\n+\n+\tscpi_begin_command();\n+\n+\tshmem->tx.header.command = SCPI_CMD_SET_SYS_POWER_STATE;\n+\tshmem->tx.header.size = 1;\n+\n+\tshmem->tx.payload[0] = sys_state;\n+\n+\tscpi_send_command();\n+\tscpi_wait_response();\n+\n+\tret = shmem->rx.header.status;\n+\n+\tscpi_end_command();\n+\n+\treturn ret;\n+}\n+\n+void psci_enable_smp(void);\n+\n+static s32 __secure psci_suspend_common(u32 pc, u32 context_id, u32 core_state,\n+\t\t\t\t\tu32 cluster_state, u32 css_state)\n+\n+{\n+\tu32 target_cpu = read_mpidr();\n+\n+\tif (core_state == SCPI_POWER_OFF)\n+\t\tpsci_save(MPIDR_AFFLVL0(target_cpu), pc, context_id);\n+\tif (css_state == SCPI_POWER_OFF)\n+\t\tgic_dist_init = true;\n+\n+\tscpi_set_css_power_state(target_cpu, core_state,\n+\t\t\t\t cluster_state, css_state);\n+\n+\tpsci_cpu_off_common();\n+\n+\twfi();\n+\n+\tpsci_enable_smp();\n+\n+\treturn ARM_PSCI_RET_SUCCESS;\n+}\n+\n+u32 __secure psci_version(void)\n+{\n+\treturn ARM_PSCI_VER_1_1;\n+}\n+\n+s32 __secure psci_cpu_suspend(u32 __always_unused function_id,\n+\t\t\t      u32 power_state, u32 pc, u32 context_id)\n+{\n+\treturn psci_suspend_common(pc, context_id,\n+\t\t\t\t   power_state >> 0 & 0xf,\n+\t\t\t\t   power_state >> 4 & 0xf,\n+\t\t\t\t   power_state >> 8 & 0xf);\n+}\n+\n+s32 __secure psci_cpu_off(void)\n+{\n+\tu32 pc = 0, context_id = 0;\n+\n+\treturn psci_suspend_common(pc, context_id, SCPI_POWER_OFF,\n+\t\t\t\t   SCPI_POWER_OFF, SCPI_POWER_ON);\n+}\n+\n+s32 __secure psci_cpu_on(u32 __always_unused function_id,\n+\t\t\t u32 target_cpu, u32 pc, u32 context_id)\n+{\n+\tpsci_save(MPIDR_AFFLVL0(target_cpu), pc, context_id);\n+\n+\tscpi_set_css_power_state(target_cpu, SCPI_POWER_ON,\n+\t\t\t\t SCPI_POWER_ON, SCPI_POWER_ON);\n+\n+\treturn ARM_PSCI_RET_SUCCESS;\n+}\n+\n+s32 __secure psci_affinity_info(u32 function_id,\n+\t\t\t\tu32 target_cpu, u32 power_level)\n+{\n+\tif (power_level != CORE_POWER_LEVEL)\n+\t\treturn ARM_PSCI_RET_INVAL;\n+\n+\t/* This happens to have the same HW_ON/HW_OFF encoding. */\n+\treturn psci_node_hw_state(function_id, target_cpu, power_level);\n+}\n+\n+void __secure psci_system_off(void)\n+{\n+\tscpi_set_sys_power_state(SCPI_SYSTEM_SHUTDOWN);\n+\n+\t/* Wait to be turned off. */\n+\tfor (;;) wfi();\n+}\n+\n+void __secure psci_system_reset(void)\n+{\n+\tscpi_set_sys_power_state(SCPI_SYSTEM_REBOOT);\n+\n+\t/* Wait to be turned off. */\n+\tfor (;;) wfi();\n+}\n+\n+s32 __secure psci_features(u32 __always_unused function_id,\n+\t\t\t   u32 psci_fid)\n+{\n+\tswitch (psci_fid) {\n+\tcase ARM_PSCI_0_2_FN_PSCI_VERSION:\n+\tcase ARM_PSCI_0_2_FN_CPU_SUSPEND:\n+\tcase ARM_PSCI_0_2_FN_CPU_OFF:\n+\tcase ARM_PSCI_0_2_FN_CPU_ON:\n+\tcase ARM_PSCI_0_2_FN_AFFINITY_INFO:\n+\tcase ARM_PSCI_0_2_FN_SYSTEM_OFF:\n+\tcase ARM_PSCI_0_2_FN_SYSTEM_RESET:\n+\tcase ARM_PSCI_1_0_FN_PSCI_FEATURES:\n+\tcase ARM_PSCI_1_0_FN_CPU_DEFAULT_SUSPEND:\n+\tcase ARM_PSCI_1_0_FN_NODE_HW_STATE:\n+\tcase ARM_PSCI_1_0_FN_SYSTEM_SUSPEND:\n+\tcase ARM_PSCI_1_1_FN_SYSTEM_RESET2:\n+\t\treturn ARM_PSCI_RET_SUCCESS;\n+\tdefault:\n+\t\treturn ARM_PSCI_RET_NI;\n+\t}\n+}\n+\n+s32 __secure psci_cpu_default_suspend(u32 __always_unused function_id,\n+\t\t\t\t      u32 pc, u32 context_id)\n+{\n+\treturn psci_suspend_common(pc, context_id, SCPI_POWER_OFF,\n+\t\t\t\t   SCPI_POWER_OFF, SCPI_POWER_RETENTION);\n+}\n+\n+s32 __secure psci_node_hw_state(u32 __always_unused function_id,\n+\t\t\t\tu32 target_cpu, u32 power_level)\n+{\n+\tu32 core = MPIDR_AFFLVL0(target_cpu);\n+\tu8 core_states, cluster_state;\n+\n+\tif (power_level >= CSS_POWER_LEVEL)\n+\t\treturn HW_ON;\n+\tif (scpi_get_css_power_state(target_cpu, &core_states, &cluster_state))\n+\t\treturn ARM_PSCI_RET_NI;\n+\tif (power_level == CLUSTER_POWER_LEVEL) {\n+\t\tif (cluster_state == SCPI_POWER_ON)\n+\t\t\treturn HW_ON;\n+\t\tif (cluster_state < SCPI_POWER_OFF)\n+\t\t\treturn HW_STANDBY;\n+\t\treturn HW_OFF;\n+\t}\n+\n+\treturn (core_states & BIT(core)) ? HW_ON : HW_OFF;\n+}\n+\n+s32 __secure psci_system_suspend(u32 __always_unused function_id,\n+\t\t\t\t u32 pc, u32 context_id)\n+{\n+\treturn psci_suspend_common(pc, context_id, SCPI_POWER_OFF,\n+\t\t\t\t   SCPI_POWER_OFF, SCPI_POWER_OFF);\n+}\n+\n+s32 __secure psci_system_reset2(u32 __always_unused function_id,\n+\t\t\t\tu32 reset_type, u32 cookie)\n+{\n+\ts32 ret;\n+\n+\tif (reset_type)\n+\t\treturn ARM_PSCI_RET_INVAL;\n+\n+\tret = scpi_set_sys_power_state(SCPI_SYSTEM_RESET);\n+\tif (ret)\n+\t\treturn ARM_PSCI_RET_INVAL;\n+\n+\t/* Wait to be turned off. */\n+\tfor (;;) wfi();\n+}\n+\n+/*\n+ * R40 is different from other single cluster SoCs. The secondary core\n+ * entry address register is in the SRAM controller address range.\n+ */\n+#define SUN8I_R40_SRAMC_SOFT_ENTRY_REG0\t\t(0xbc)\n+\n+#ifdef CONFIG_MACH_SUN8I_R40\n+/* secondary core entry address is programmed differently on R40 */\n+static void __secure sunxi_set_entry_address(void *entry)\n+{\n+\twritel((u32)entry,\n+\t       SUNXI_SRAMC_BASE + SUN8I_R40_SRAMC_SOFT_ENTRY_REG0);\n+}\n+#else\n+static void __secure sunxi_set_entry_address(void *entry)\n+{\n+\tstruct sunxi_cpucfg_reg *cpucfg =\n+\t\t(struct sunxi_cpucfg_reg *)SUNXI_CPUCFG_BASE;\n+\n+\twritel((u32)entry, &cpucfg->priv0);\n+\n+\tif (IS_ENABLED(CONFIG_MACH_SUN8I_H3)) {\n+\t\t/* Redirect CPU 0 to the secure monitor via the resume shim. */\n+\t\twritel(0x16aaefe8, &cpucfg->super_standy_flag);\n+\t\twritel(0xaa16efe8, &cpucfg->super_standy_flag);\n+\t\twritel(SUNXI_RESUME_BASE, &cpucfg->priv1);\n+\t}\n+}\n+#endif\n+\n+void __secure psci_arch_init(void)\n+{\n+\tstatic bool __secure_data one_time_init = true;\n+\n+\tif (one_time_init) {\n+\t\t/* Set secondary core power-on PC. */\n+\t\tsunxi_set_entry_address(psci_cpu_entry);\n+\n+\t\t/* Wait for the SCP firmware to boot. */\n+\t\tscpi_begin_command();\n+\t\tscpi_wait_response();\n+\t\tscpi_end_command();\n+\n+\t\tone_time_init = false;\n+\t}\n+\n+\t/*\n+\t * Copied from arch/arm/cpu/armv7/virt-v7.c\n+\t * See also gic_resume() in arch/arm/mach-imx/mx7/psci-mx7.c\n+\t */\n+\tif (gic_dist_init) {\n+\t\tu32 i, itlinesnr;\n+\n+\t\t/* enable the GIC distributor */\n+\t\twritel(readl(GICD_BASE + GICD_CTLR) | 0x03, GICD_BASE + GICD_CTLR);\n+\n+\t\t/* TYPER[4:0] contains an encoded number of available interrupts */\n+\t\titlinesnr = readl(GICD_BASE + GICD_TYPER) & 0x1f;\n+\n+\t\t/* set all bits in the GIC group registers to one to allow access\n+\t\t * from non-secure state. The first 32 interrupts are private per\n+\t\t * CPU and will be set later when enabling the GIC for each core\n+\t\t */\n+\t\tfor (i = 1; i <= itlinesnr; i++)\n+\t\t\twritel((unsigned)-1, GICD_BASE + GICD_IGROUPRn + 4 * i);\n+\n+\t\tgic_dist_init = false;\n+\t}\n+\n+\t/* Be cool with non-secure. */\n+\twritel(0xff, GICC_BASE + GICC_PMR);\n+}\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Allwinner/devices/H3/patches/u-boot/0007-sunxi-psci-Add-support-for-H3-CPU-0-hotplug.patch",
    "content": "From f15f4f36e023aaaeacdbebe16736119d1be3ac6b Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 9 Oct 2021 17:12:57 -0500\nSubject: [PATCH 07/13] sunxi: psci: Add support for H3 CPU 0 hotplug\n\nDue to a bug in the H3 SoC, where the CPU 0 hotplug flag cannot be\nwritten, resuming CPU 0 requires using the \"Super Standby\" code path in\nthe BROM instead of the hotplug path. This path requires jumping to an\neGON image in SRAM.\n\nAdd support to the build system to generate this eGON image and include\nit in the FIT, and add code to direct the BROM to its location in SRAM.\n\nSince the Super Standby code path in the BROM initializes the CPU and\nAHB1 clocks to 24 MHz, those registers need to be restored after control\npasses back to U-Boot. Furthermore, because the BROM lowers the AHB1\nclock divider to /1 before switching to the lower-frequency parent,\nPLL_PERIPH0 must be bypassed to prevent AHB1 from temporarily running at\n600 MHz. Otherwise, this locks up the SoC.\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n Makefile                        | 17 +++++++++++++++++\n arch/arm/cpu/armv7/sunxi/psci.c | 31 +++++++++++++++++++++++++++++++\n arch/arm/dts/sunxi-u-boot.dtsi  | 23 ++++++++++++++++++++++-\n include/configs/sun8i.h         |  4 ++++\n 4 files changed, 74 insertions(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex f911f7034430..9edcadfa9c47 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -984,6 +984,23 @@ endif\n endif\n endif\n \n+ifeq ($(CONFIG_MACH_SUN8I_H3)$(CONFIG_ARMV7_PSCI),yy)\n+INPUTS-$(CONFIG_ARMV7_PSCI) += u-boot-resume.img\n+\n+MKIMAGEFLAGS_u-boot-resume.img := -B 0x400 -T sunxi_egon\n+\n+u-boot-resume.img: u-boot-resume.bin\n+\t$(call if_changed,mkimage)\n+\n+OBJCOPYFLAGS_u-boot-resume.bin := -O binary\n+\n+u-boot-resume.bin: u-boot-resume.o\n+\t$(call if_changed,objcopy)\n+\n+u-boot-resume.S: u-boot\n+\t@sed -En 's/(0x[[:xdigit:]]+) +psci_cpu_entry/ldr pc, =\\1/p' $<.map > $@\n+endif\n+\n INPUTS-$(CONFIG_X86) += u-boot-x86-start16.bin u-boot-x86-reset16.bin \\\n \t$(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \\\n \t$(if $(CONFIG_TPL_X86_16BIT_INIT),tpl/u-boot-tpl.bin)\ndiff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/psci.c\nindex 3448fe2edcaa..299bd3ba65e0 100644\n--- a/arch/arm/cpu/armv7/sunxi/psci.c\n+++ b/arch/arm/cpu/armv7/sunxi/psci.c\n@@ -10,6 +10,7 @@\n #include <common.h>\n #include <asm/cache.h>\n \n+#include <asm/arch/clock.h>\n #include <asm/arch/cpu.h>\n #include <asm/arch/cpucfg.h>\n #include <asm/arch/prcm.h>\n@@ -141,6 +142,13 @@ static void __secure sunxi_set_entry_address(void *entry)\n \t\t(struct sunxi_cpucfg_reg *)SUNXI_CPUCFG_BASE;\n \n \twritel((u32)entry, &cpucfg->priv0);\n+\n+\tif (IS_ENABLED(CONFIG_MACH_SUN8I_H3)) {\n+\t\t/* Redirect CPU 0 to the secure monitor via the resume shim. */\n+\t\twritel(0x16aaefe8, &cpucfg->super_standy_flag);\n+\t\twritel(0xaa16efe8, &cpucfg->super_standy_flag);\n+\t\twritel(SUNXI_RESUME_BASE, &cpucfg->priv1);\n+\t}\n }\n #endif\n \n@@ -255,9 +263,12 @@ out:\n int __secure psci_cpu_on(u32 __always_unused unused, u32 mpidr, u32 pc,\n \t\t\t u32 context_id)\n {\n+\tstruct sunxi_ccm_reg *ccu = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;\n \tstruct sunxi_cpucfg_reg *cpucfg =\n \t\t(struct sunxi_cpucfg_reg *)SUNXI_CPUCFG_BASE;\n \tu32 cpu = (mpidr & 0x3);\n+\tu32 cpu_clk;\n+\tu32 bus_clk;\n \n \t/* store target PC and context id */\n \tpsci_save(cpu, pc, context_id);\n@@ -274,12 +285,32 @@ int __secure psci_cpu_on(u32 __always_unused unused, u32 mpidr, u32 pc,\n \t/* Lock CPU (Disable external debug access) */\n \tclrbits_le32(&cpucfg->dbg_ctrl1, BIT(cpu));\n \n+\tif (IS_ENABLED(CONFIG_MACH_SUN8I_H3) && cpu == 0) {\n+\t\t/* Save registers that will be clobbered by the BROM. */\n+\t\tcpu_clk = readl(&ccu->cpu_axi_cfg);\n+\t\tbus_clk = readl(&ccu->ahb1_apb1_div);\n+\n+\t\t/* Bypass PLL_PERIPH0 so AHB1 frequency does not spike. */\n+\t\tsetbits_le32(&ccu->pll6_cfg, BIT(25));\n+\t}\n+\n \t/* Power up target CPU */\n \tsunxi_cpu_set_power(cpu, true);\n \n \t/* De-assert reset on target CPU */\n \twritel(BIT(1) | BIT(0), &cpucfg->cpu[cpu].rst);\n \n+\tif (IS_ENABLED(CONFIG_MACH_SUN8I_H3) && cpu == 0) {\n+\t\t/* Spin until the BROM has clobbered the clock registers. */\n+\t\twhile (readl(&ccu->ahb1_apb1_div) != 0x00001100);\n+\n+\t\t/* Restore the registers and turn off PLL_PERIPH0 bypass. */\n+\t\twritel(cpu_clk, &ccu->cpu_axi_cfg);\n+\t\twritel(bus_clk, &ccu->ahb1_apb1_div);\n+\n+\t\tclrbits_le32(&ccu->pll6_cfg, BIT(25));\n+\t}\n+\n \t/* Unlock CPU (Disable external debug access) */\n \tsetbits_le32(&cpucfg->dbg_ctrl1, BIT(cpu));\n \ndiff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi\nindex ad1f97632979..a2c74da81aa9 100644\n--- a/arch/arm/dts/sunxi-u-boot.dtsi\n+++ b/arch/arm/dts/sunxi-u-boot.dtsi\n@@ -6,7 +6,11 @@\n #define ARCH \"arm\"\n #endif\n \n-#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN50I_H5)\n+#if defined(CONFIG_MACH_SUN8I_H3)\n+#ifdef CONFIG_ARMV7_PSCI\n+#define RESUME_ADDR\tSUNXI_RESUME_BASE\n+#endif\n+#elif defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN50I_H5)\n #define BL31_ADDR\t0x00044000\n #define SCP_ADDR\t0x00050000\n #elif defined(CONFIG_MACH_SUN50I_H6)\n@@ -74,6 +78,20 @@\n \t\t\t\t};\n #endif\n \n+#ifdef RESUME_ADDR\n+\t\t\t\tresume {\n+\t\t\t\t\tdescription = \"Super Standby resume image\";\n+\t\t\t\t\ttype = \"standalone\";\n+\t\t\t\t\tarch = ARCH;\n+\t\t\t\t\tcompression = \"none\";\n+\t\t\t\t\tload = <RESUME_ADDR>;\n+\n+\t\t\t\t\tblob-ext {\n+\t\t\t\t\t\tfilename = \"u-boot-resume.img\";\n+\t\t\t\t\t};\n+\t\t\t\t};\n+#endif\n+\n #ifdef SCP_ADDR\n \t\t\t\tscp {\n \t\t\t\t\tdescription = \"SCP firmware\";\n@@ -107,6 +125,9 @@\n \t\t\t\t\tfirmware = \"uboot\";\n #endif\n \t\t\t\t\tloadables =\n+#ifdef RESUME_ADDR\n+\t\t\t\t\t\t    \"resume\",\n+#endif\n #ifdef SCP_ADDR\n \t\t\t\t\t\t    \"scp\",\n #endif\ndiff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h\nindex 563635636624..2f0d69bdfce2 100644\n--- a/include/configs/sunxi-common.h\n+++ b/include/configs/sunxi-common.h\n@@ -15,6 +15,12 @@\n #include <asm/arch/cpu.h>\n #include <linux/stringify.h>\n \n+#ifdef SUNXI_SRAM_A2_SIZE\n+#define SUNXI_RESUME_BASE\t\t(CONFIG_ARMV7_SECURE_BASE + \\\n+\t\t\t\t\t CONFIG_ARMV7_SECURE_MAX_SIZE)\n+#define SUNXI_RESUME_SIZE\t\t1024\n+#endif\n+\n /* Serial & console */\n #define CONFIG_SYS_NS16550_SERIAL\n /* ns16550 reg in the low bits of cpu reg */\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Allwinner/devices/H3/patches/u-boot/0010-sunxi-Enable-support-for-SCP-firmware-on-H3.patch",
    "content": "From 92657de6d2ac3ae100a4d78cc37c729142f1a59b Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 17 Apr 2021 13:33:54 -0500\nSubject: [PATCH 10/13] sunxi: Enable support for SCP firmware on H3\n\nNow that issues with the BROM have been sorted out, we can implement\nPSCI system suspend on H3 by delegating to SCP firmware. Let's start by\nincluding the firmware in the FIT image and starting the coprocessor if\nvalid firmware is loaded.\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n arch/arm/dts/sunxi-u-boot.dtsi | 1 +\n board/sunxi/board.c            | 8 ++++++++\n include/configs/sun8i.h        | 3 +++\n 3 files changed, 12 insertions(+)\n\ndiff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi\nindex a2c74da81aa9..ce062fe94052 100644\n--- a/arch/arm/dts/sunxi-u-boot.dtsi\n+++ b/arch/arm/dts/sunxi-u-boot.dtsi\n@@ -9,6 +9,7 @@\n #if defined(CONFIG_MACH_SUN8I_H3)\n #ifdef CONFIG_ARMV7_PSCI\n #define RESUME_ADDR\tSUNXI_RESUME_BASE\n+#define SCP_ADDR\tSUNXI_SCP_BASE\n #endif\n #elif defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN50I_H5)\n #define BL31_ADDR\t0x00044000\ndiff --git a/board/sunxi/board.c b/board/sunxi/board.c\nindex 2b7d655678d0..a25cd11f1124 100644\n--- a/board/sunxi/board.c\n+++ b/board/sunxi/board.c\n@@ -18,6 +18,7 @@\n #include <init.h>\n #include <log.h>\n #include <mmc.h>\n+#include <remoteproc.h>\n #include <axp_pmic.h>\n #include <generic-phy.h>\n #include <phy-sun4i-usb.h>\n@@ -957,6 +958,13 @@ int board_late_init(void)\n \tusb_ether_init();\n #endif\n \n+#ifdef SUNXI_SCP_BASE\n+\tif (!rproc_load(0, SUNXI_SCP_BASE, SUNXI_SCP_MAX_SIZE)) {\n+\t\tputs(\"Starting SCP...\\n\");\n+\t\trproc_start(0);\n+\t}\n+#endif\n+\n \treturn 0;\n }\n \ndiff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h\nindex 2f0d69bdfce2..fda5b235a3e0 100644\n--- a/include/configs/sunxi-common.h\n+++ b/include/configs/sunxi-common.h\n@@ -26,6 +26,9 @@\n #define SUNXI_RESUME_BASE\t\t(CONFIG_ARMV7_SECURE_BASE + \\\n \t\t\t\t\t CONFIG_ARMV7_SECURE_MAX_SIZE)\n #define SUNXI_RESUME_SIZE\t\t1024\n+\n+#define SUNXI_SCP_BASE\t\t\t(SUNXI_RESUME_BASE + SUNXI_RESUME_SIZE)\n+#define SUNXI_SCP_MAX_SIZE\t\t(16 * 1024)\n #endif\n \n /*\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Allwinner/devices/H5/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc+crypto\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"crypto-neon-fp-armv8\"\n        ;;\n    esac\n\n  # Kernel target\n    KERNEL_TARGET=\"Image\"\n\n  # U-Boot firmware package(s) to use\n    UBOOT_FIRMWARE=\"atf crust\"\n\n  # ATF platform\n    ATF_PLATFORM=\"sun50i_a64\"\n\n  # OpenGL-ES implementation to use\n    OPENGLES=\"mesa\"\n\n  # Mali GPU family\n    MALI_FAMILY=\"450\"\n\n  # KODI Player implementation to use\n    KODIPLAYER_DRIVER=\"$OPENGLES\"\n\n  # set the addon project\n    ADDON_PROJECT=\"ARMv8\"\n"
  },
  {
    "path": "projects/Allwinner/devices/H6/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc+crypto\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"crypto-neon-fp-armv8\"\n        ;;\n    esac\n\n  # Kernel target\n    KERNEL_TARGET=\"Image\"\n\n  # U-Boot firmware package(s) to use\n    UBOOT_FIRMWARE=\"atf crust\"\n\n  # ATF platform\n    ATF_PLATFORM=\"sun50i_h6\"\n\n  # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q)\n    OPENGLES=\"mesa\"\n\n  # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)\n    KODIPLAYER_DRIVER=\"$OPENGLES\"\n\n  # set the addon project\n    ADDON_PROJECT=\"ARMv8\"\n\n  # additional kernel parameters\n    EXTRA_CMDLINE=\"$EXTRA_CMDLINE\"\n"
  },
  {
    "path": "projects/Allwinner/devices/R40/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      arm)\n        # TARGET_CPU:\n        # arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d\n        # arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c\n        # arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t\n        # arm720t arm740t strongarm strongarm110 strongarm1100\n        # strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t\n        # arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi\n        # arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e\n        # arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s\n        # arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4\n        # cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312.\n        TARGET_CPU=\"cortex-a7\"\n\n        # TARGET_FLOAT:\n        # Specifies which floating-point ABI to use. Permissible values are:\n        # soft hard\n        TARGET_FLOAT=\"hard\"\n\n        # TARGET_FPU:\n        # This specifies what floating point hardware (or hardware emulation) is\n        # available on the target. Permissible names are:\n        # fpa fpe2 fpe3 maverick vfp vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16\n        # vfpv3xd vfpv3xd-fp16 neon neon-fp16 vfpv4 vfpv4-d16 fpv4-sp-d16\n        # neon-vfpv4.\n        TARGET_FPU=\"neon-vfpv4\"\n        ;;\n    esac\n\n  # Kernel target\n    KERNEL_TARGET=\"zImage\"\n\n  # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q)\n    OPENGLES=\"mesa\"\n\n  # Mali GPU family\n    MALI_FAMILY=\"400\"\n\n  # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)\n    KODIPLAYER_DRIVER=\"$OPENGLES\"\n\n  # set the addon project\n    ADDON_PROJECT=\"ARMv7\"\n"
  },
  {
    "path": "projects/Allwinner/filesystem/usr/bin/cputemp",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nTEMP=\"$(cat /sys/class/thermal/thermal_zone0/temp)\"\necho \"$(( $TEMP / 1000 )) C\"\n"
  },
  {
    "path": "projects/Allwinner/filesystem/usr/bin/gputemp",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nif [ -f /sys/class/thermal/thermal_zone1/temp ]; then\n   TEMP=\"$(cat /sys/class/thermal/thermal_zone1/temp)\"\nelse\n   TEMP=\"$(cat /sys/class/thermal/thermal_zone0/temp)\"\nfi\necho \"$(( $TEMP / 1000 )) C\"\n"
  },
  {
    "path": "projects/Allwinner/filesystem/usr/bin/install2emmc",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nTMP=/tmp/mnt/\n\nSYSTEM_SIZE=@SYSTEM_SIZE@\nUUID_SYSTEM=\"$(date '+%d%m')-$(date '+%M%S')\"\nUUID_STORAGE=\"$(uuidgen)\"\nBOOT=$(grep /flash /proc/mounts | awk '{print $1}' | sed 's/p[012]//g')\nDISK=\"\"\n\nfor TYPE in /sys/class/block/mmcblk*/device/type; do\n  if grep -q \"MMC\" \"${TYPE}\"; then\n    DISK=\"/dev/$(echo \"${TYPE}\" | awk -F/ '{print $5}')\"\n    break\n  fi\ndone\n\nif [ -z \"${DISK}\" ]; then\n  echo \"Can't find eMMC module!\"\n  exit 1\nfi\n\nif [ \"${BOOT}\" = \"${DISK}\" ]; then\n  echo \"Your device is booted from the eMMC module!\"\n  exit 1\nfi\n\necho \"\"\necho -e \"\\033[36m===============================\"\necho \"Installing @DISTRONAME@ to eMMC\"\necho -e \"===============================\\033[37m\"\necho \"\"\necho \"eMMC found at ${DISK}\"\necho \"\"\n\nif [ ! -b \"${DISK}\" ]; then\n    echo \"Error: eMMC not found.\"\n    exit 1\nfi\n\necho \"\"\necho -n \"WARNING: ALL DATA ON eMMC WILL BE ERASED! Continue (y/N)?  \"\nread -n 1 ANSWER\n\nif [ ! \"${ANSWER}\" = \"y\" ]; then\n  echo \"\"\n  echo \"Aborting...\"\n  exit 0\nfi\necho \"\"\n\numount ${DISK}* > /dev/null 2>&1\n\necho \"Erasing eMMC ...\"\ndd if=/dev/zero of=\"${DISK}\" bs=1M count=1 conv=fsync > /dev/null 2>&1\n\necho \"Creating partitions\"\nparted -s \"${DISK}\" mklabel msdos\nparted -s \"${DISK}\" -a optimal mkpart primary fat32 0% ${SYSTEM_SIZE}MiB\nparted -s \"${DISK}\" set 1 boot on\nparted -s \"${DISK}\" -a optimal mkpart primary ext4 ${SYSTEM_SIZE}MiB 100%\nsync\n\necho \"Creating filesystems\"\ndd if=/dev/zero of=\"${DISK}p1\" bs=1M count=1 conv=fsync > /dev/null 2>&1\nmkfs.vfat -n SYSTEM -i ${UUID_SYSTEM//-/} ${DISK}p1 > /dev/null 2>&1\ndd if=/dev/zero of=\"${DISK}p2\" bs=1M count=1 conv=fsync > /dev/null 2>&1\nmkfs.ext4 -L STORAGE -U ${UUID_STORAGE} ${DISK}p2 > /dev/null 2>&1\nsync\n\necho \"Installing bootloader\"\ndd if=\"${BOOT}\" skip=8 of=\"${DISK}\" bs=1k seek=8 count=768 conv=fsync > /dev/null 2>&1\n\necho \"Copying system files\"\n\nmkdir -p ${TMP}\n\nmount -t vfat ${DISK}p1 ${TMP}\n\ncp -R /flash/. ${TMP}/\nsync\n\necho \"Adjusting partition UUIDs\"\n\nsed -i \"s/boot=UUID=[0-9a-f\\-]*/boot=UUID=${UUID_SYSTEM}/g\" ${TMP}/extlinux/extlinux.conf\nsed -i \"s/disk=UUID=[0-9a-f\\-]*/disk=UUID=${UUID_STORAGE}/g\" ${TMP}/extlinux/extlinux.conf\n\numount ${TMP}\n\necho \"Done\"\n"
  },
  {
    "path": "projects/Allwinner/filesystem/usr/lib/systemd/sleep.conf.d/memonly.conf",
    "content": "[Sleep]\nSuspendState=mem\n"
  },
  {
    "path": "projects/Allwinner/filesystem/usr/share/alsa/cards/H3_Audio_Codec.conf",
    "content": "#\n# Configuration for H3 analog output\n#\n\n<confdir:pcm/front.conf>\n\nH3_Audio_Codec.pcm.front.0 {\n\t@args [ CARD ]\n\t@args.CARD {\n\t\ttype string\n\t}\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tname \"Line Out Playback Volume\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional false\n\t\t\t\tvalue 31\n\t\t\t}\n\t\t\t{\n\t\t\t\tname \"Line Out Playback Switch\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional false\n\t\t\t\tvalue [ on on ]\n\t\t\t}\n\t\t]\n\t}\n}\n"
  },
  {
    "path": "projects/Allwinner/filesystem/usr/share/alsa/cards/simple-card.conf",
    "content": "#\n# Configuration for HDMI\n#\n\n<confdir:pcm/hdmi.conf>\n\nsimple-card.pcm.hdmi.\"allwinner-hdmi\" {\n\t@args [ CARD DEVICE AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.DEVICE { type integer }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t\tdevice $DEVICE\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tinterface PCM\n\t\t\t\tname \"IEC958 Playback Default\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional true\n\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n\t\t\t}\n\t\t]\n\t}\n\thint.device $DEVICE\n}\n\nsimple-card.pcm.hdmi.0 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\n\t@func refer\n\tname {\n\t\t@func concat\n\t\tstrings [\n\t\t\t\"cards.simple-card.pcm.hdmi.\"\n\t\t\t{ @func card_name card $CARD }\n\t\t\t\":CARD=\" $CARD \",\"\n\t\t\t\"DEVICE=0,\"\n\t\t\t\"AES0=\" $AES0 \",\"\n\t\t\t\"AES1=\" $AES1 \",\"\n\t\t\t\"AES2=\" $AES2 \",\"\n\t\t\t\"AES3=\" $AES3\n\t\t]\n\t}\n\tdefault {\n\t\t# point to non-existent device\n\t\tcard $CARD\n\t\tdevice 999\n\t\thint.device 999\n\t}\n\n}\n\n#\n# Configuration for SPDIF\n#\n\n<confdir:pcm/iec958.conf>\n\nsimple-card.pcm.iec958.\"On-board SPDIF\" \"cards.simple-card.pcm.iec958.sun50i-h6-spdif\"\n\nsimple-card.pcm.iec958.\"sun50i-h6-spdif\" {\n\t@args [ CARD DEVICE AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.DEVICE { type integer }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t\tdevice $DEVICE\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tinterface PCM\n\t\t\t\tname \"IEC958 Playback Default\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional true\n\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n\t\t\t}\n\t\t]\n\t}\n\thint.device $DEVICE\n}\n\nsimple-card.pcm.iec958.0 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\t@func refer\n\tname {\n\t\t@func concat\n\t\tstrings [\n\t\t\t\"cards.simple-card.pcm.iec958.\"\n\t\t\t{ @func card_name card $CARD }\n\t\t\t\":CARD=\" $CARD \",\"\n\t\t\t\"DEVICE=0,\"\n\t\t\t\"AES0=\" $AES0 \",\"\n\t\t\t\"AES1=\" $AES1 \",\"\n\t\t\t\"AES2=\" $AES2 \",\"\n\t\t\t\"AES3=\" $AES3\n\t\t]\n\t}\n\tdefault {\n\t\t# point to non-existent device\n\t\tcard $CARD\n\t\tdevice 999\n\t\thint.device 999\n\t}\n}\n"
  },
  {
    "path": "projects/Allwinner/filesystem/usr/share/alsa/cards/sun50i-a64-audi.conf",
    "content": "#\n# Configuration for A64 analog output\n#\n\n<confdir:pcm/front.conf>\n\nsun50i-a64-audi.pcm.front.0 {\n\t@args [ CARD ]\n\t@args.CARD {\n\t\ttype string\n\t}\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tname \"Line Out Playback Volume\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional false\n\t\t\t\tvalue 31\n\t\t\t}\n\t\t\t{\n\t\t\t\tname \"Line Out Playback Switch\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional false\n\t\t\t\tvalue [ on on ]\n\t\t\t}\n\t\t]\n\t}\n}\n"
  },
  {
    "path": "projects/Allwinner/kodi/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n\n  <section id=\"system\">\n    <category id=\"display\">\n      <group id=\"1\">\n        <setting id=\"videoscreen.limitedrange\">\n          <default>false</default>\n          <visible>false</visible>\n        </setting>\n        <setting id=\"videoscreen.limitguisize\">\n          <visible>false</visible>\n          <default>3</default>\n        </setting>\n      </group>\n    </category>\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.audiodevice\">\n          <default>ALSA:hdmi:CARD=allwinnerhdmi,DEV=0</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n</settings>\n"
  },
  {
    "path": "projects/Allwinner/linux/linux.aarch64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm64 6.1.63 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"aarch64-none-elf-gcc-12.2.0 (GCC) 12.2.0\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=120200\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23900\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23900\nCONFIG_LLD_VERSION=0\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\nCONFIG_LOCALVERSION_AUTO=y\nCONFIG_BUILD_SALT=\"\"\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_SYSVIPC_COMPAT=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\n# CONFIG_WATCH_QUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y\nCONFIG_GENERIC_IRQ_IPI=y\nCONFIG_GENERIC_MSI_IRQ=y\nCONFIG_GENERIC_MSI_IRQ_DOMAIN=y\nCONFIG_IRQ_MSI_IOMMU=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\nCONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_CONTEXT_TRACKING=y\nCONFIG_CONTEXT_TRACKING_IDLE=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\n# CONFIG_NO_HZ is not set\nCONFIG_HIGH_RES_TIMERS=y\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\nCONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\nCONFIG_BPF_JIT=y\n# CONFIG_BPF_JIT_ALWAYS_ON is not set\nCONFIG_BPF_JIT_DEFAULT_ON=y\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# end of BPF subsystem\n\nCONFIG_PREEMPT_BUILD=y\n# CONFIG_PREEMPT_NONE is not set\n# CONFIG_PREEMPT_VOLUNTARY is not set\nCONFIG_PREEMPT=y\nCONFIG_PREEMPT_COUNT=y\nCONFIG_PREEMPTION=y\n# CONFIG_PREEMPT_DYNAMIC is not set\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\nCONFIG_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_SCHED_AVG_IRQ=y\nCONFIG_SCHED_THERMAL_PRESSURE=y\nCONFIG_BSD_PROCESS_ACCT=y\nCONFIG_BSD_PROCESS_ACCT_V3=y\nCONFIG_TASKSTATS=y\nCONFIG_TASK_DELAY_ACCT=y\nCONFIG_TASK_XACCT=y\nCONFIG_TASK_IO_ACCOUNTING=y\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\nCONFIG_PREEMPT_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_RCU=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\n# end of RCU Subsystem\n\nCONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=17\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# CONFIG_UCLAMP_TASK is not set\n# end of Scheduler features\n\nCONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y\nCONFIG_CC_HAS_INT128=y\nCONFIG_CC_IMPLICIT_FALLTHROUGH=\"-Wimplicit-fallthrough=5\"\nCONFIG_GCC11_NO_ARRAY_BOUNDS=y\nCONFIG_CC_NO_ARRAY_BOUNDS=y\nCONFIG_ARCH_SUPPORTS_INT128=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\n# CONFIG_CGROUP_FAVOR_DYNMODS is not set\nCONFIG_MEMCG=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_BLK_CGROUP=y\nCONFIG_CGROUP_WRITEBACK=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\nCONFIG_CGROUP_PIDS=y\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_CGROUP_PERF=y\nCONFIG_CGROUP_BPF=y\n# CONFIG_CGROUP_MISC is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_TIME_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_CHECKPOINT_RESTORE is not set\nCONFIG_SCHED_AUTOGROUP=y\n# CONFIG_SYSFS_DEPRECATED is not set\n# CONFIG_RELAY is not set\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"@INITRAMFS_SOURCE@\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\n# CONFIG_RD_GZIP is not set\n# CONFIG_RD_BZIP2 is not set\n# CONFIG_RD_LZMA is not set\n# CONFIG_RD_XZ is not set\n# CONFIG_RD_LZO is not set\nCONFIG_RD_LZ4=y\nCONFIG_RD_ZSTD=y\nCONFIG_INITRAMFS_COMPRESSION_LZ4=y\n# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set\n# CONFIG_INITRAMFS_COMPRESSION_NONE is not set\n# CONFIG_BOOT_CONFIG is not set\nCONFIG_INITRAMFS_PRESERVE_MTIME=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\nCONFIG_EXPERT=y\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\n# CONFIG_SGETMASK_SYSCALL is not set\n# CONFIG_SYSFS_SYSCALL is not set\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\nCONFIG_KALLSYMS_ALL=y\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_DEBUG_RSEQ is not set\n# CONFIG_EMBEDDED is not set\nCONFIG_HAVE_PERF_EVENTS=y\n# CONFIG_PC104 is not set\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_SYSTEM_DATA_VERIFICATION=y\nCONFIG_PROFILING=y\n# end of General setup\n\nCONFIG_ARM64=y\nCONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_64BIT=y\nCONFIG_MMU=y\nCONFIG_ARM64_PAGE_SHIFT=12\nCONFIG_ARM64_CONT_PTE_SHIFT=4\nCONFIG_ARM64_CONT_PMD_SHIFT=4\nCONFIG_ARCH_MMAP_RND_BITS_MIN=18\nCONFIG_ARCH_MMAP_RND_BITS_MAX=33\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_NO_IOPORT_MAP=y\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_GENERIC_BUG=y\nCONFIG_GENERIC_BUG_RELATIVE_POINTERS=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CSUM=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y\nCONFIG_SMP=y\nCONFIG_KERNEL_MODE_NEON=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_PGTABLE_LEVELS=4\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_ARCH_PROC_KCORE_TEXT=y\n\n#\n# Platform selection\n#\n# CONFIG_ARCH_ACTIONS is not set\nCONFIG_ARCH_SUNXI=y\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_APPLE is not set\n# CONFIG_ARCH_BCM is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_BITMAIN is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_SPARX5 is not set\n# CONFIG_ARCH_K3 is not set\n# CONFIG_ARCH_LG1K is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_KEEMBAY is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_MESON is not set\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_NXP is not set\n# CONFIG_ARCH_NPCM is not set\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_REALTEK is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_ROCKCHIP is not set\n# CONFIG_ARCH_SEATTLE is not set\n# CONFIG_ARCH_INTEL_SOCFPGA is not set\n# CONFIG_ARCH_SYNQUACER is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_SPRD is not set\n# CONFIG_ARCH_THUNDER is not set\n# CONFIG_ARCH_THUNDER2 is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_VISCONTI is not set\n# CONFIG_ARCH_XGENE is not set\n# CONFIG_ARCH_ZYNQMP is not set\n# end of Platform selection\n\n#\n# Kernel Features\n#\n\n#\n# ARM errata workarounds via the alternatives framework\n#\n# CONFIG_AMPERE_ERRATUM_AC03_CPU_38 is not set\nCONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y\nCONFIG_ARM64_ERRATUM_826319=y\nCONFIG_ARM64_ERRATUM_827319=y\nCONFIG_ARM64_ERRATUM_824069=y\nCONFIG_ARM64_ERRATUM_819472=y\n# CONFIG_ARM64_ERRATUM_832075 is not set\n# CONFIG_ARM64_ERRATUM_1742098 is not set\nCONFIG_ARM64_ERRATUM_845719=y\nCONFIG_ARM64_ERRATUM_843419=y\nCONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y\n# CONFIG_ARM64_ERRATUM_1024718 is not set\n# CONFIG_ARM64_ERRATUM_1418040 is not set\n# CONFIG_ARM64_ERRATUM_1165522 is not set\n# CONFIG_ARM64_ERRATUM_1319367 is not set\n# CONFIG_ARM64_ERRATUM_1530923 is not set\n# CONFIG_ARM64_ERRATUM_2441007 is not set\n# CONFIG_ARM64_ERRATUM_1286807 is not set\n# CONFIG_ARM64_ERRATUM_1463225 is not set\n# CONFIG_ARM64_ERRATUM_1542419 is not set\n# CONFIG_ARM64_ERRATUM_1508412 is not set\n# CONFIG_ARM64_ERRATUM_2051678 is not set\n# CONFIG_ARM64_ERRATUM_2077057 is not set\n# CONFIG_ARM64_ERRATUM_2658417 is not set\n# CONFIG_ARM64_ERRATUM_2054223 is not set\n# CONFIG_ARM64_ERRATUM_2067961 is not set\n# CONFIG_ARM64_ERRATUM_2441009 is not set\n# CONFIG_ARM64_ERRATUM_2966298 is not set\n# CONFIG_CAVIUM_ERRATUM_22375 is not set\n# CONFIG_CAVIUM_ERRATUM_23154 is not set\n# CONFIG_CAVIUM_ERRATUM_27456 is not set\n# CONFIG_CAVIUM_ERRATUM_30115 is not set\n# CONFIG_CAVIUM_TX2_ERRATUM_219 is not set\n# CONFIG_FUJITSU_ERRATUM_010001 is not set\n# CONFIG_HISILICON_ERRATUM_161600802 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_1003 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_1009 is not set\n# CONFIG_QCOM_QDF2400_ERRATUM_0065 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_E1041 is not set\n# CONFIG_NVIDIA_CARMEL_CNP_ERRATUM is not set\n# CONFIG_SOCIONEXT_SYNQUACER_PREITS is not set\n# end of ARM errata workarounds via the alternatives framework\n\nCONFIG_ARM64_4K_PAGES=y\n# CONFIG_ARM64_16K_PAGES is not set\n# CONFIG_ARM64_64K_PAGES is not set\n# CONFIG_ARM64_VA_BITS_39 is not set\nCONFIG_ARM64_VA_BITS_48=y\nCONFIG_ARM64_VA_BITS=48\nCONFIG_ARM64_PA_BITS_48=y\nCONFIG_ARM64_PA_BITS=48\n# CONFIG_CPU_BIG_ENDIAN is not set\nCONFIG_CPU_LITTLE_ENDIAN=y\nCONFIG_SCHED_MC=y\n# CONFIG_SCHED_CLUSTER is not set\n# CONFIG_SCHED_SMT is not set\nCONFIG_NR_CPUS=8\nCONFIG_HOTPLUG_CPU=y\n# CONFIG_NUMA is not set\n# CONFIG_HZ_100 is not set\nCONFIG_HZ_250=y\n# CONFIG_HZ_300 is not set\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=250\nCONFIG_SCHED_HRTICK=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_CC_HAVE_SHADOW_CALL_STACK=y\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\nCONFIG_KEXEC=y\n# CONFIG_KEXEC_FILE is not set\nCONFIG_CRASH_DUMP=y\nCONFIG_TRANS_TABLE=y\n# CONFIG_XEN is not set\nCONFIG_ARCH_FORCE_MAX_ORDER=11\nCONFIG_UNMAP_KERNEL_AT_EL0=y\nCONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y\nCONFIG_RODATA_FULL_DEFAULT_ENABLED=y\n# CONFIG_ARM64_SW_TTBR0_PAN is not set\nCONFIG_ARM64_TAGGED_ADDR_ABI=y\nCONFIG_COMPAT=y\nCONFIG_KUSER_HELPERS=y\n# CONFIG_COMPAT_ALIGNMENT_FIXUPS is not set\n# CONFIG_ARMV8_DEPRECATED is not set\n\n#\n# ARMv8.1 architectural features\n#\n# CONFIG_ARM64_HW_AFDBM is not set\n# CONFIG_ARM64_PAN is not set\nCONFIG_AS_HAS_LDAPR=y\nCONFIG_AS_HAS_LSE_ATOMICS=y\n# CONFIG_ARM64_USE_LSE_ATOMICS is not set\n# end of ARMv8.1 architectural features\n\n#\n# ARMv8.2 architectural features\n#\nCONFIG_AS_HAS_ARMV8_2=y\nCONFIG_AS_HAS_SHA3=y\n# CONFIG_ARM64_PMEM is not set\n# CONFIG_ARM64_RAS_EXTN is not set\n# CONFIG_ARM64_CNP is not set\n# end of ARMv8.2 architectural features\n\n#\n# ARMv8.3 architectural features\n#\n# CONFIG_ARM64_PTR_AUTH is not set\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET=y\nCONFIG_CC_HAS_SIGN_RETURN_ADDRESS=y\nCONFIG_AS_HAS_PAC=y\nCONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y\n# end of ARMv8.3 architectural features\n\n#\n# ARMv8.4 architectural features\n#\n# CONFIG_ARM64_AMU_EXTN is not set\nCONFIG_AS_HAS_ARMV8_4=y\n# CONFIG_ARM64_TLB_RANGE is not set\n# end of ARMv8.4 architectural features\n\n#\n# ARMv8.5 architectural features\n#\nCONFIG_AS_HAS_ARMV8_5=y\n# CONFIG_ARM64_BTI is not set\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI=y\n# CONFIG_ARM64_E0PD is not set\nCONFIG_ARM64_AS_HAS_MTE=y\n# end of ARMv8.5 architectural features\n\n#\n# ARMv8.7 architectural features\n#\n# end of ARMv8.7 architectural features\n\nCONFIG_ARM64_SVE=y\nCONFIG_ARM64_SME=y\nCONFIG_ARM64_MODULE_PLTS=y\n# CONFIG_ARM64_PSEUDO_NMI is not set\nCONFIG_RELOCATABLE=y\n# CONFIG_RANDOMIZE_BASE is not set\nCONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y\nCONFIG_STACKPROTECTOR_PER_TASK=y\nCONFIG_ARCH_NR_GPIO=0\n# end of Kernel Features\n\n#\n# Boot options\n#\nCONFIG_CMDLINE=\"\"\n# CONFIG_EFI is not set\n# end of Boot options\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_SUSPEND_SKIP_SYNC is not set\nCONFIG_HIBERNATE_CALLBACKS=y\nCONFIG_HIBERNATION=y\nCONFIG_HIBERNATION_SNAPSHOT_DEV=y\nCONFIG_PM_STD_PARTITION=\"\"\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_USERSPACE_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\nCONFIG_PM=y\n# CONFIG_PM_DEBUG is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\nCONFIG_WQ_POWER_EFFICIENT_DEFAULT=y\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\n# CONFIG_ENERGY_MODEL is not set\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARCH_HIBERNATION_HEADER=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\n# end of Power management options\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\nCONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\nCONFIG_DT_IDLE_STATES=y\nCONFIG_DT_IDLE_GENPD=y\n\n#\n# ARM CPU Idle Drivers\n#\nCONFIG_ARM_PSCI_CPUIDLE=y\nCONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y\n# end of ARM CPU Idle Drivers\n# end of CPU Idle\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=m\nCONFIG_CPU_FREQ_GOV_USERSPACE=m\nCONFIG_CPU_FREQ_GOV_ONDEMAND=m\nCONFIG_CPU_FREQ_GOV_CONSERVATIVE=m\nCONFIG_CPU_FREQ_GOV_SCHEDUTIL=y\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\nCONFIG_CPUFREQ_DT_PLATDEV=y\nCONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM=y\nCONFIG_ARM_SCPI_CPUFREQ=y\n# end of CPU Frequency scaling\n# end of CPU Power Management\n\nCONFIG_HAVE_KVM=y\n# CONFIG_VIRTUALIZATION is not set\n\n#\n# General architecture-dependent options\n#\nCONFIG_CRASH_CORE=y\nCONFIG_KEXEC_CORE=y\n# CONFIG_KPROBES is not set\nCONFIG_JUMP_LABEL=y\n# CONFIG_STATIC_KEYS_SELFTEST is not set\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_HAVE_IOREMAP_PROT=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y\nCONFIG_HAVE_FUNCTION_ERROR_INJECTION=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_KEEPINITRD=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_ARCH_HAS_SET_DIRECT_MAP=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_WANTS_NO_INSTR=y\nCONFIG_HAVE_ASM_MODVERSIONS=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y\nCONFIG_MMU_GATHER_TABLE_FREE=y\nCONFIG_MMU_GATHER_RCU_TABLE_FREE=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_HAVE_ALIGNED_STRUCT_PAGE=y\nCONFIG_HAVE_CMPXCHG_LOCAL=y\nCONFIG_HAVE_CMPXCHG_DOUBLE=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_ARCH_STACKLEAK=y\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_ARCH_SUPPORTS_SHADOW_CALL_STACK=y\n# CONFIG_SHADOW_CALL_STACK is not set\nCONFIG_ARCH_SUPPORTS_LTO_CLANG=y\nCONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y\nCONFIG_LTO_NONE=y\nCONFIG_ARCH_SUPPORTS_CFI_CLANG=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOVE_PUD=y\nCONFIG_HAVE_MOVE_PMD=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_HAVE_ARCH_HUGE_VMAP=y\nCONFIG_HAVE_ARCH_HUGE_VMALLOC=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_ARCH_MMAP_RND_BITS=18\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=11\nCONFIG_PAGE_SIZE_LESS_THAN_64KB=y\nCONFIG_PAGE_SIZE_LESS_THAN_256KB=y\nCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y\nCONFIG_RANDOMIZE_KSTACK_OFFSET=y\n# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\nCONFIG_HAVE_ARCH_COMPILER_H=y\nCONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_HAS_RELR=y\nCONFIG_HAVE_PREEMPT_DYNAMIC=y\nCONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y\nCONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y\nCONFIG_ARCH_HAVE_TRACE_MMIO_ACCESS=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGINS is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/sbin/modprobe\"\n# CONFIG_TRIM_UNUSED_KSYMS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\n# CONFIG_BLOCK_LEGACY_AUTOLOAD is not set\nCONFIG_BLK_CGROUP_RWSTAT=y\nCONFIG_BLK_DEV_BSG_COMMON=y\nCONFIG_BLK_DEV_BSGLIB=y\nCONFIG_BLK_DEV_INTEGRITY=y\nCONFIG_BLK_DEV_INTEGRITY_T10=y\n# CONFIG_BLK_DEV_ZONED is not set\nCONFIG_BLK_DEV_THROTTLING=y\n# CONFIG_BLK_DEV_THROTTLING_LOW is not set\n# CONFIG_BLK_WBT is not set\nCONFIG_BLK_CGROUP_IOLATENCY=y\n# CONFIG_BLK_CGROUP_IOCOST is not set\n# CONFIG_BLK_CGROUP_IOPRIO is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\n# CONFIG_PARTITION_ADVANCED is not set\nCONFIG_MSDOS_PARTITION=y\nCONFIG_EFI_PARTITION=y\n# end of Partition Types\n\nCONFIG_BLOCK_COMPAT=y\nCONFIG_BLK_PM=y\nCONFIG_BLOCK_HOLDER_DEPRECATED=y\nCONFIG_BLK_MQ_STACKING=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\n# CONFIG_IOSCHED_BFQ is not set\n# end of IO Schedulers\n\nCONFIG_ASN1=y\nCONFIG_UNINLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_USE_QUEUED_SPINLOCKS=y\nCONFIG_QUEUED_SPINLOCKS=y\nCONFIG_ARCH_USE_QUEUED_RWLOCKS=y\nCONFIG_QUEUED_RWLOCKS=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_ARCH_HAS_SYSCALL_WRAPPER=y\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_ARCH_BINFMT_ELF_STATE=y\nCONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y\nCONFIG_ARCH_HAVE_ELF_PROT=y\nCONFIG_ARCH_USE_GNU_PROPERTY=y\nCONFIG_ELFCORE=y\n# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set\nCONFIG_BINFMT_SCRIPT=y\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\nCONFIG_SWAP=y\n# CONFIG_ZSWAP is not set\n\n#\n# SLAB allocator options\n#\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# end of SLAB allocator options\n\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\n# CONFIG_COMPAT_BRK is not set\nCONFIG_SPARSEMEM=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_FAST_GUP=y\nCONFIG_ARCH_KEEP_MEMBLOCK=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_EXCLUSIVE_SYSTEM_RAM=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y\n# CONFIG_MEMORY_HOTPLUG is not set\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y\nCONFIG_COMPACTION=y\nCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1\n# CONFIG_PAGE_REPORTING is not set\nCONFIG_MIGRATION=y\nCONFIG_ARCH_ENABLE_THP_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\nCONFIG_PHYS_ADDR_T_64BIT=y\nCONFIG_KSM=y\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y\nCONFIG_MEMORY_FAILURE=y\n# CONFIG_HWPOISON_INJECT is not set\nCONFIG_ARCH_WANTS_THP_SWAP=y\nCONFIG_TRANSPARENT_HUGEPAGE=y\nCONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y\n# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set\nCONFIG_THP_SWAP=y\n# CONFIG_READ_ONLY_THP_FOR_FS is not set\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\nCONFIG_CMA_DEBUGFS=y\nCONFIG_CMA_SYSFS=y\nCONFIG_CMA_AREAS=7\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CACHE_LINE_SIZE=y\nCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y\nCONFIG_ARCH_HAS_PTE_DEVMAP=y\nCONFIG_ARCH_HAS_ZONE_DMA_SET=y\nCONFIG_ZONE_DMA=y\nCONFIG_ZONE_DMA32=y\nCONFIG_VM_EVENT_COUNTERS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\nCONFIG_ARCH_HAS_PTE_SPECIAL=y\nCONFIG_SECRETMEM=y\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_USERFAULTFD is not set\n# CONFIG_LRU_GEN is not set\nCONFIG_LOCK_MM_AND_FIND_VMA=y\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\nCONFIG_NET_INGRESS=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_INTERFACE is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_XFRM_ESP=y\n# CONFIG_NET_KEY is not set\n# CONFIG_XDP_SOCKETS is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=y\n# CONFIG_IP_MROUTE is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=y\n# CONFIG_INET_ESP_OFFLOAD is not set\n# CONFIG_INET_ESPINTCP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=y\nCONFIG_INET_DIAG=y\nCONFIG_INET_TCP_DIAG=y\n# CONFIG_INET_UDP_DIAG is not set\n# CONFIG_INET_RAW_DIAG is not set\n# CONFIG_INET_DIAG_DESTROY is not set\n# CONFIG_TCP_CONG_ADVANCED is not set\nCONFIG_TCP_CONG_CUBIC=y\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_IPV6_VTI is not set\nCONFIG_IPV6_SIT=y\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\nCONFIG_IPV6_FOU=m\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_NETLABEL is not set\n# CONFIG_MPTCP is not set\n# CONFIG_NETWORK_SECMARK is not set\nCONFIG_NET_PTP_CLASSIFY=y\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\nCONFIG_NETFILTER_EGRESS=y\nCONFIG_NETFILTER_NETLINK=m\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\n# CONFIG_NETFILTER_NETLINK_LOG is not set\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\nCONFIG_NF_LOG_SYSLOG=m\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_ZONES is not set\nCONFIG_NF_CONNTRACK_PROCFS=y\nCONFIG_NF_CONNTRACK_EVENTS=y\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\nCONFIG_NF_CT_PROTO_DCCP=y\nCONFIG_NF_CT_PROTO_SCTP=y\nCONFIG_NF_CT_PROTO_UDPLITE=y\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\n# CONFIG_NF_CONNTRACK_IRC is not set\n# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\n# CONFIG_NF_CONNTRACK_SIP is not set\nCONFIG_NF_CONNTRACK_TFTP=m\nCONFIG_NF_CT_NETLINK=m\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=y\nCONFIG_NF_NAT_MASQUERADE=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\nCONFIG_NETFILTER_XTABLES_COMPAT=y\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\nCONFIG_NETFILTER_XT_TARGET_CHECKSUM=m\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\nCONFIG_NETFILTER_XT_TARGET_LOG=m\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\n# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\n# CONFIG_NETFILTER_XT_MATCH_OWNER is not set\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\n# CONFIG_NETFILTER_XT_MATCH_STATE is not set\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\nCONFIG_IP_VS=m\n# CONFIG_IP_VS_IPV6 is not set\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_MH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n# CONFIG_IP_VS_TWOS is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS MH scheduler\n#\nCONFIG_IP_VS_MH_TAB_INDEX=12\n\n#\n# IPVS application helper\n#\n# CONFIG_IP_VS_FTP is not set\nCONFIG_IP_VS_NFCT=y\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\nCONFIG_NF_LOG_IPV4=m\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_SECURITY is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\nCONFIG_NF_LOG_IPV6=m\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_MATCH_SRH is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\n# CONFIG_IP6_NF_SECURITY is not set\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\n# CONFIG_NET_SCH_FQ_CODEL is not set\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_FLOW is not set\nCONFIG_NET_CLS_CGROUP=m\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\nCONFIG_NET_L3_MASTER_DEV=y\n# CONFIG_QRTR is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_PCPU_DEV_REFCNT=y\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_SOCK_RX_QUEUE_MAPPING=y\nCONFIG_XPS=y\nCONFIG_CGROUP_NET_PRIO=y\nCONFIG_CGROUP_NET_CLASSID=y\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\nCONFIG_BT_RFCOMM_TTY=y\nCONFIG_BT_BNEP=m\nCONFIG_BT_BNEP_MC_FILTER=y\nCONFIG_BT_BNEP_PROTO_FILTER=y\nCONFIG_BT_HIDP=m\n# CONFIG_BT_HS is not set\nCONFIG_BT_LE=y\nCONFIG_BT_LEDS=y\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\n# CONFIG_BT_DEBUGFS is not set\n# CONFIG_BT_SELFTEST is not set\n# CONFIG_BT_FEATURE_DEBUG is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_QCA=m\nCONFIG_BT_MTK=m\nCONFIG_BT_HCIBTUSB=m\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\n# CONFIG_BT_HCIBTUSB_MTK is not set\nCONFIG_BT_HCIBTUSB_RTL=y\n# CONFIG_BT_HCIBTSDIO is not set\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_SERDEV=y\nCONFIG_BT_HCIUART_H4=y\nCONFIG_BT_HCIUART_NOKIA=m\nCONFIG_BT_HCIUART_BCSP=y\nCONFIG_BT_HCIUART_ATH3K=y\nCONFIG_BT_HCIUART_LL=y\nCONFIG_BT_HCIUART_3WIRE=y\nCONFIG_BT_HCIUART_INTEL=y\nCONFIG_BT_HCIUART_BCM=y\nCONFIG_BT_HCIUART_RTL=y\nCONFIG_BT_HCIUART_QCA=y\nCONFIG_BT_HCIUART_AG6XX=y\nCONFIG_BT_HCIUART_MRVL=y\nCONFIG_BT_HCIBCM203X=m\nCONFIG_BT_HCIBPA10X=m\nCONFIG_BT_HCIBFUSB=m\nCONFIG_BT_HCIVHCI=m\nCONFIG_BT_MRVL=m\nCONFIG_BT_MRVL_SDIO=m\nCONFIG_BT_ATH3K=m\n# CONFIG_BT_MTKSDIO is not set\nCONFIG_BT_MTKUART=m\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_SPY=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=m\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\nCONFIG_CFG80211_CRDA_SUPPORT=y\nCONFIG_CFG80211_WEXT=y\nCONFIG_LIB80211=m\nCONFIG_LIB80211_CRYPT_WEP=m\nCONFIG_LIB80211_CRYPT_CCMP=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=m\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=m\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_PAGE_POOL=y\n# CONFIG_PAGE_POOL_STATS is not set\nCONFIG_FAILOVER=y\nCONFIG_ETHTOOL_NETLINK=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\nCONFIG_HAVE_PCI=y\n# CONFIG_PCI is not set\n# CONFIG_PCCARD is not set\n\n#\n# Generic Driver Options\n#\n# CONFIG_UEVENT_HELPER is not set\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\n# CONFIG_DEVTMPFS_SAFE is not set\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\nCONFIG_FW_CACHE=y\n# CONFIG_FW_UPLOAD is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\nCONFIG_ALLOW_DEV_COREDUMP=y\nCONFIG_DEV_COREDUMP=y\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_SOC_BUS=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\nCONFIG_BRCMSTB_GISB_ARB=y\n# CONFIG_MOXTET is not set\nCONFIG_SUN50I_DE2_BUS=y\nCONFIG_SUNXI_RSB=y\nCONFIG_VEXPRESS_CONFIG=y\n# CONFIG_MHI_BUS is not set\n# CONFIG_MHI_BUS_EP is not set\n# end of Bus devices\n\n# CONFIG_CONNECTOR is not set\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\n# CONFIG_ARM_SCMI_PROTOCOL is not set\n# end of ARM System Control and Management Interface Protocol\n\nCONFIG_ARM_SCPI_PROTOCOL=y\nCONFIG_ARM_SCPI_POWER_DOMAIN=y\n# CONFIG_FIRMWARE_MEMMAP is not set\n# CONFIG_ARM_FFA_TRANSPORT is not set\n# CONFIG_GOOGLE_FIRMWARE is not set\nCONFIG_ARM_PSCI_FW=y\n# CONFIG_ARM_PSCI_CHECKER is not set\nCONFIG_HAVE_ARM_SMCCC=y\nCONFIG_HAVE_ARM_SMCCC_DISCOVERY=y\nCONFIG_ARM_SMCCC_SOC_ID=y\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n\n#\n# Partition parsers\n#\n# CONFIG_MTD_AR7_PARTS is not set\n# CONFIG_MTD_CMDLINE_PARTS is not set\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AFS_PARTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\n# end of Partition parsers\n\n#\n# User Modules And Translation Layers\n#\nCONFIG_MTD_BLKDEVS=y\nCONFIG_MTD_BLOCK=y\n\n#\n# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK.\n#\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\n# CONFIG_MTD_OOPS is not set\n# CONFIG_MTD_SWAP is not set\n# CONFIG_MTD_PARTITIONED_MASTER is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\n# CONFIG_MTD_CFI is not set\n# CONFIG_MTD_JEDECPROBE is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n# end of RAM/ROM/Flash chip drivers\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_PLATRAM is not set\n# end of Mapping drivers for chip access\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_DATAFLASH is not set\n# CONFIG_MTD_MCHP23K256 is not set\n# CONFIG_MTD_MCHP48L640 is not set\n# CONFIG_MTD_SST25L is not set\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\n# end of Self-contained MTD device drivers\n\n#\n# NAND\n#\n# CONFIG_MTD_ONENAND is not set\n# CONFIG_MTD_RAW_NAND is not set\n# CONFIG_MTD_SPI_NAND is not set\n\n#\n# ECC engine support\n#\n# CONFIG_MTD_NAND_ECC_SW_HAMMING is not set\n# CONFIG_MTD_NAND_ECC_SW_BCH is not set\n# CONFIG_MTD_NAND_ECC_MXIC is not set\n# end of ECC engine support\n# end of NAND\n\n#\n# LPDDR & LPDDR2 PCM memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\n# end of LPDDR & LPDDR2 PCM memory drivers\n\nCONFIG_MTD_SPI_NOR=y\nCONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y\n# CONFIG_MTD_SPI_NOR_SWP_DISABLE is not set\nCONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y\n# CONFIG_MTD_SPI_NOR_SWP_KEEP is not set\n# CONFIG_MTD_UBI is not set\n# CONFIG_MTD_HYPERBUS is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_DYNAMIC=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\nCONFIG_OF_RESOLVE=y\nCONFIG_OF_OVERLAY=y\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_CDROM=y\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=8\n# CONFIG_BLK_DEV_DRBD is not set\nCONFIG_BLK_DEV_NBD=y\n# CONFIG_BLK_DEV_RAM is not set\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_UBLK is not set\n\n#\n# NVME Support\n#\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TCP is not set\n# CONFIG_NVME_TARGET is not set\n# end of NVME Support\n\n#\n# Misc devices\n#\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\nCONFIG_SRAM=y\n# CONFIG_XILINX_SDFEC is not set\n# CONFIG_HISI_HIKEY_USB is not set\n# CONFIG_OPEN_DICE is not set\n# CONFIG_VCPU_STALL_DETECTOR is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\nCONFIG_EEPROM_AT25=m\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_EEPROM_EE1004 is not set\n# end of EEPROM support\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n# CONFIG_ECHO is not set\n# CONFIG_MISC_RTSX_USB is not set\n# CONFIG_UACCE is not set\n# CONFIG_PVPANIC is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_PROC_FS is not set\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_CHR_DEV_SG=m\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_CHR_DEV_SCH is not set\nCONFIG_SCSI_CONSTANTS=y\n# CONFIG_SCSI_LOGGING is not set\n# CONFIG_SCSI_SCAN_ASYNC is not set\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\nCONFIG_SCSI_SAS_ATTRS=y\nCONFIG_SCSI_SAS_LIBSAS=y\nCONFIG_SCSI_SAS_ATA=y\nCONFIG_SCSI_SAS_HOST_SMP=y\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\nCONFIG_SCSI_HISI_SAS=y\n# CONFIG_SCSI_HISI_SAS_DEBUGFS_DEFAULT_ENABLE is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\nCONFIG_ATA=y\nCONFIG_SATA_HOST=y\nCONFIG_ATA_VERBOSE_ERROR=y\nCONFIG_ATA_FORCE=y\nCONFIG_SATA_PMP=y\n\n#\n# Controllers with non-SFF native interface\n#\nCONFIG_SATA_AHCI_PLATFORM=y\n# CONFIG_AHCI_DWC is not set\nCONFIG_AHCI_CEVA=y\n# CONFIG_AHCI_SUNXI is not set\nCONFIG_AHCI_XGENE=y\nCONFIG_AHCI_QORIQ=y\nCONFIG_ATA_SFF=y\n\n#\n# SFF controllers with custom DMA interface\n#\nCONFIG_ATA_BMDMA=y\n\n#\n# SATA SFF controllers with BMDMA\n#\n# CONFIG_SATA_DWC is not set\n\n#\n# PATA SFF controllers with BMDMA\n#\n\n#\n# PIO-only SFF controllers\n#\nCONFIG_PATA_PLATFORM=y\nCONFIG_PATA_OF_PLATFORM=y\n\n#\n# Generic fallback / legacy drivers\n#\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\n# CONFIG_DM_DEBUG is not set\nCONFIG_DM_BUFIO=m\n# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\n# CONFIG_DM_UNSTRIPED is not set\n# CONFIG_DM_CRYPT is not set\n# CONFIG_DM_SNAPSHOT is not set\nCONFIG_DM_THIN_PROVISIONING=m\n# CONFIG_DM_CACHE is not set\n# CONFIG_DM_WRITECACHE is not set\n# CONFIG_DM_EBS is not set\n# CONFIG_DM_ERA is not set\n# CONFIG_DM_CLONE is not set\n# CONFIG_DM_MIRROR is not set\n# CONFIG_DM_RAID is not set\n# CONFIG_DM_ZERO is not set\n# CONFIG_DM_MULTIPATH is not set\n# CONFIG_DM_DELAY is not set\n# CONFIG_DM_DUST is not set\n# CONFIG_DM_UEVENT is not set\n# CONFIG_DM_FLAKEY is not set\n# CONFIG_DM_VERITY is not set\n# CONFIG_DM_SWITCH is not set\n# CONFIG_DM_LOG_WRITES is not set\n# CONFIG_DM_INTEGRITY is not set\n# CONFIG_TARGET_CORE is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\nCONFIG_DUMMY=m\nCONFIG_WIREGUARD=m\n# CONFIG_WIREGUARD_DEBUG is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\nCONFIG_MACVTAP=m\nCONFIG_IPVLAN_L3S=y\nCONFIG_IPVLAN=m\n# CONFIG_IPVTAP is not set\nCONFIG_VXLAN=m\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_AMT is not set\n# CONFIG_MACSEC is not set\n# CONFIG_NETCONSOLE is not set\nCONFIG_TUN=y\nCONFIG_TAP=m\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\nCONFIG_NLMON=m\nCONFIG_ETHERNET=y\nCONFIG_NET_VENDOR_ALACRITECH=y\nCONFIG_NET_VENDOR_ALLWINNER=y\n# CONFIG_SUN4I_EMAC is not set\n# CONFIG_ALTERA_TSE is not set\nCONFIG_NET_VENDOR_AMAZON=y\nCONFIG_NET_VENDOR_AMD=y\nCONFIG_AMD_XGBE=y\nCONFIG_NET_VENDOR_AQUANTIA=y\nCONFIG_NET_VENDOR_ARC=y\n# CONFIG_NET_VENDOR_ASIX is not set\nCONFIG_NET_VENDOR_BROADCOM=y\n# CONFIG_B44 is not set\n# CONFIG_BCMGENET is not set\n# CONFIG_SYSTEMPORT is not set\nCONFIG_NET_VENDOR_CADENCE=y\nCONFIG_MACB=y\nCONFIG_MACB_USE_HWSTAMP=y\nCONFIG_NET_VENDOR_CAVIUM=y\nCONFIG_NET_VENDOR_CORTINA=y\n# CONFIG_GEMINI_ETHERNET is not set\n# CONFIG_NET_VENDOR_DAVICOM is not set\n# CONFIG_DNET is not set\n# CONFIG_NET_VENDOR_ENGLEDER is not set\nCONFIG_NET_VENDOR_EZCHIP=y\n# CONFIG_EZCHIP_NPS_MANAGEMENT_ENET is not set\n# CONFIG_NET_VENDOR_FUNGIBLE is not set\n# CONFIG_NET_VENDOR_GOOGLE is not set\nCONFIG_NET_VENDOR_HISILICON=y\nCONFIG_HIX5HD2_GMAC=y\n# CONFIG_HISI_FEMAC is not set\n# CONFIG_HIP04_ETH is not set\nCONFIG_HNS_MDIO=y\nCONFIG_HNS=y\nCONFIG_HNS_DSAF=y\nCONFIG_HNS_ENET=y\nCONFIG_NET_VENDOR_HUAWEI=y\nCONFIG_NET_VENDOR_I825XX=y\nCONFIG_NET_VENDOR_INTEL=y\n# CONFIG_NET_VENDOR_WANGXUN is not set\n# CONFIG_NET_VENDOR_ADI is not set\n# CONFIG_NET_VENDOR_LITEX is not set\nCONFIG_NET_VENDOR_MARVELL=y\nCONFIG_MVMDIO=y\nCONFIG_NET_VENDOR_MELLANOX=y\n# CONFIG_MLXSW_CORE is not set\n# CONFIG_MLXFW is not set\nCONFIG_NET_VENDOR_MICREL=y\n# CONFIG_KS8842 is not set\n# CONFIG_KS8851 is not set\n# CONFIG_KS8851_MLL is not set\nCONFIG_NET_VENDOR_MICROCHIP=y\n# CONFIG_ENC28J60 is not set\n# CONFIG_ENCX24J600 is not set\nCONFIG_NET_VENDOR_MICROSEMI=y\n# CONFIG_NET_VENDOR_MICROSOFT is not set\nCONFIG_NET_VENDOR_NI=y\n# CONFIG_NI_XGE_MANAGEMENT_ENET is not set\nCONFIG_NET_VENDOR_NATSEMI=y\nCONFIG_NET_VENDOR_NETRONOME=y\nCONFIG_NET_VENDOR_8390=y\n# CONFIG_ETHOC is not set\n# CONFIG_NET_VENDOR_PENSANDO is not set\nCONFIG_NET_VENDOR_QUALCOMM=y\n# CONFIG_QCA7000_SPI is not set\n# CONFIG_QCA7000_UART is not set\nCONFIG_QCOM_EMAC=m\n# CONFIG_RMNET is not set\nCONFIG_NET_VENDOR_RENESAS=y\nCONFIG_NET_VENDOR_ROCKER=y\nCONFIG_NET_VENDOR_SAMSUNG=y\n# CONFIG_SXGBE_ETH is not set\nCONFIG_NET_VENDOR_SEEQ=y\nCONFIG_NET_VENDOR_SOLARFLARE=y\nCONFIG_NET_VENDOR_SMSC=y\nCONFIG_SMC91X=y\nCONFIG_SMSC911X=y\nCONFIG_NET_VENDOR_SOCIONEXT=y\nCONFIG_NET_VENDOR_STMICRO=y\nCONFIG_STMMAC_ETH=y\n# CONFIG_STMMAC_SELFTESTS is not set\nCONFIG_STMMAC_PLATFORM=y\n# CONFIG_DWMAC_DWC_QOS_ETH is not set\nCONFIG_DWMAC_GENERIC=y\nCONFIG_DWMAC_SUNXI=m\nCONFIG_DWMAC_SUN8I=m\n# CONFIG_DWMAC_INTEL_PLAT is not set\nCONFIG_NET_VENDOR_SYNOPSYS=y\n# CONFIG_DWC_XLGMAC is not set\n# CONFIG_NET_VENDOR_VERTEXCOM is not set\nCONFIG_NET_VENDOR_VIA=y\n# CONFIG_VIA_VELOCITY is not set\nCONFIG_NET_VENDOR_WIZNET=y\n# CONFIG_WIZNET_W5100 is not set\n# CONFIG_WIZNET_W5300 is not set\n# CONFIG_NET_VENDOR_XILINX is not set\nCONFIG_PHYLINK=y\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\nCONFIG_AC200_PHY=y\n# CONFIG_AMD_PHY is not set\n# CONFIG_ADIN_PHY is not set\n# CONFIG_ADIN1100_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=m\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM54140_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\nCONFIG_MARVELL_PHY=m\nCONFIG_MARVELL_10G_PHY=m\n# CONFIG_MARVELL_88X2222_PHY is not set\n# CONFIG_MAXLINEAR_GPHY is not set\n# CONFIG_MEDIATEK_GE_PHY is not set\nCONFIG_MICREL_PHY=y\nCONFIG_MICROCHIP_PHY=m\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\nCONFIG_MOTORCOMM_PHY=y\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_NXP_TJA11XX_PHY is not set\nCONFIG_AT803X_PHY=m\n# CONFIG_QSEMI_PHY is not set\nCONFIG_REALTEK_PHY=y\n# CONFIG_RENESAS_PHY is not set\nCONFIG_ROCKCHIP_PHY=y\nCONFIG_SMSC_PHY=m\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_DP83TD510_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\n# CONFIG_PSE_CONTROLLER is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_OF_MDIO=y\nCONFIG_MDIO_DEVRES=y\n# CONFIG_MDIO_SUN4I is not set\nCONFIG_MDIO_BITBANG=y\n# CONFIG_MDIO_BCM_UNIMAC is not set\n# CONFIG_MDIO_GPIO is not set\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_OCTEON is not set\n# CONFIG_MDIO_IPQ4019 is not set\n# CONFIG_MDIO_IPQ8064 is not set\n\n#\n# MDIO Multiplexers\n#\nCONFIG_MDIO_BUS_MUX=y\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set\nCONFIG_MDIO_BUS_MUX_MMIOREG=y\n\n#\n# PCS device drivers\n#\nCONFIG_PCS_XPCS=y\n# end of PCS device drivers\n\n# CONFIG_PPP is not set\n# CONFIG_SLIP is not set\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\nCONFIG_USB_PEGASUS=m\nCONFIG_USB_RTL8150=m\nCONFIG_USB_RTL8152=m\nCONFIG_USB_LAN78XX=m\nCONFIG_USB_USBNET=m\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\n# CONFIG_USB_NET_CDC_EEM is not set\nCONFIG_USB_NET_CDC_NCM=m\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\nCONFIG_USB_NET_DM9601=m\n# CONFIG_USB_NET_SR9700 is not set\nCONFIG_USB_NET_SR9800=m\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=m\n# CONFIG_USB_NET_GL620A is not set\nCONFIG_USB_NET_NET1080=m\nCONFIG_USB_NET_PLUSB=m\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\nCONFIG_USB_NET_CDC_SUBSET_ENABLE=m\nCONFIG_USB_NET_CDC_SUBSET=m\n# CONFIG_USB_ALI_M5632 is not set\n# CONFIG_USB_AN2720 is not set\nCONFIG_USB_BELKIN=y\nCONFIG_USB_ARMLINUX=y\n# CONFIG_USB_EPSON2888 is not set\n# CONFIG_USB_KC2190 is not set\nCONFIG_USB_NET_ZAURUS=m\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\n# CONFIG_USB_HSO is not set\n# CONFIG_USB_NET_INT51X1 is not set\n# CONFIG_USB_IPHETH is not set\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\n# CONFIG_USB_NET_AQC111 is not set\nCONFIG_USB_RTL8153_ECM=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\n# CONFIG_ATH9K is not set\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\n# CONFIG_CARL9170_HWRNG is not set\nCONFIG_ATH6KL=m\n# CONFIG_ATH6KL_SDIO is not set\nCONFIG_ATH6KL_USB=m\n# CONFIG_ATH6KL_DEBUG is not set\nCONFIG_AR5523=m\nCONFIG_ATH10K=m\nCONFIG_ATH10K_CE=y\n# CONFIG_ATH10K_SDIO is not set\nCONFIG_ATH10K_USB=m\n# CONFIG_ATH10K_DEBUG is not set\n# CONFIG_ATH10K_DEBUGFS is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\nCONFIG_AT76C50X_USB=m\nCONFIG_WLAN_VENDOR_BROADCOM=y\n# CONFIG_B43 is not set\n# CONFIG_B43LEGACY is not set\nCONFIG_BRCMUTIL=m\n# CONFIG_BRCMSMAC is not set\nCONFIG_BRCMFMAC=m\nCONFIG_BRCMFMAC_PROTO_BCDC=y\nCONFIG_BRCMFMAC_SDIO=y\nCONFIG_BRCMFMAC_USB=y\n# CONFIG_BRCM_TRACING is not set\n# CONFIG_BRCMDBG is not set\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\nCONFIG_WLAN_VENDOR_INTERSIL=y\n# CONFIG_HOSTAP is not set\n# CONFIG_P54_COMMON is not set\nCONFIG_WLAN_VENDOR_MARVELL=y\nCONFIG_LIBERTAS=m\nCONFIG_LIBERTAS_USB=m\n# CONFIG_LIBERTAS_SDIO is not set\n# CONFIG_LIBERTAS_SPI is not set\n# CONFIG_LIBERTAS_DEBUG is not set\n# CONFIG_LIBERTAS_MESH is not set\nCONFIG_LIBERTAS_THINFIRM=m\n# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set\nCONFIG_LIBERTAS_THINFIRM_USB=m\nCONFIG_MWIFIEX=m\nCONFIG_MWIFIEX_SDIO=m\nCONFIG_MWIFIEX_USB=m\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_MT76_CORE=m\nCONFIG_MT76_LEDS=y\nCONFIG_MT76_USB=m\nCONFIG_MT76x02_LIB=m\nCONFIG_MT76x02_USB=m\nCONFIG_MT76_CONNAC_LIB=m\nCONFIG_MT76x0_COMMON=m\nCONFIG_MT76x0U=m\nCONFIG_MT76x2_COMMON=m\nCONFIG_MT76x2U=m\nCONFIG_MT7615_COMMON=m\nCONFIG_MT7663_USB_SDIO_COMMON=m\nCONFIG_MT7663U=m\n# CONFIG_MT7663S is not set\n# CONFIG_MT7921S is not set\n# CONFIG_MT7921U is not set\n# CONFIG_WLAN_VENDOR_MICROCHIP is not set\n# CONFIG_WLAN_VENDOR_PURELIFI is not set\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=m\n# CONFIG_RTL8192CU is not set\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\nCONFIG_RTW88=m\nCONFIG_RTW88_CORE=m\nCONFIG_RTW88_SDIO=m\nCONFIG_RTW88_USB=m\nCONFIG_RTW88_8822B=m\nCONFIG_RTW88_8822C=m\nCONFIG_RTW88_8723D=m\nCONFIG_RTW88_8821C=m\nCONFIG_RTW88_8822BS=m\nCONFIG_RTW88_8822BU=m\nCONFIG_RTW88_8822CS=m\nCONFIG_RTW88_8822CU=m\nCONFIG_RTW88_8723DU=m\nCONFIG_RTW88_8821CS=m\nCONFIG_RTW88_8821CU=m\n# CONFIG_RTW88_DEBUG is not set\n# CONFIG_RTW88_DEBUGFS is not set\n# CONFIG_RTW89 is not set\n# CONFIG_WLAN_VENDOR_RSI is not set\n# CONFIG_WLAN_VENDOR_SILABS is not set\n# CONFIG_WLAN_VENDOR_ST is not set\n# CONFIG_WLAN_VENDOR_TI is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\nCONFIG_USB_ZD1201=m\nCONFIG_ZD1211RW=m\n# CONFIG_ZD1211RW_DEBUG is not set\n# CONFIG_WLAN_VENDOR_QUANTENNA is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\n# CONFIG_NETDEVSIM is not set\nCONFIG_NET_FAILOVER=y\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\nCONFIG_INPUT_MATRIXKMAP=y\nCONFIG_INPUT_VIVALDIFMAP=y\n\n#\n# Userland interfaces\n#\n# CONFIG_INPUT_MOUSEDEV is not set\nCONFIG_INPUT_JOYDEV=y\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\nCONFIG_KEYBOARD_ADC=m\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\nCONFIG_KEYBOARD_ATKBD=y\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=y\nCONFIG_KEYBOARD_GPIO_POLLED=y\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_PINEPHONE is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_SUN4I_LRADC is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\n# CONFIG_KEYBOARD_CYPRESS_SF is not set\n# CONFIG_INPUT_MOUSE is not set\nCONFIG_INPUT_JOYSTICK=y\n# CONFIG_JOYSTICK_ANALOG is not set\n# CONFIG_JOYSTICK_A3D is not set\n# CONFIG_JOYSTICK_ADC is not set\n# CONFIG_JOYSTICK_ADI is not set\n# CONFIG_JOYSTICK_COBRA is not set\n# CONFIG_JOYSTICK_GF2K is not set\n# CONFIG_JOYSTICK_GRIP is not set\n# CONFIG_JOYSTICK_GRIP_MP is not set\n# CONFIG_JOYSTICK_GUILLEMOT is not set\n# CONFIG_JOYSTICK_INTERACT is not set\n# CONFIG_JOYSTICK_SIDEWINDER is not set\n# CONFIG_JOYSTICK_TMDC is not set\n# CONFIG_JOYSTICK_IFORCE is not set\n# CONFIG_JOYSTICK_WARRIOR is not set\n# CONFIG_JOYSTICK_MAGELLAN is not set\n# CONFIG_JOYSTICK_SPACEORB is not set\n# CONFIG_JOYSTICK_SPACEBALL is not set\n# CONFIG_JOYSTICK_STINGER is not set\n# CONFIG_JOYSTICK_TWIDJOY is not set\n# CONFIG_JOYSTICK_ZHENHUA is not set\n# CONFIG_JOYSTICK_AS5011 is not set\n# CONFIG_JOYSTICK_JOYDUMP is not set\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\n# CONFIG_JOYSTICK_PSXPAD_SPI is not set\n# CONFIG_JOYSTICK_PXRC is not set\n# CONFIG_JOYSTICK_QWIIC is not set\n# CONFIG_JOYSTICK_FSIA6B is not set\n# CONFIG_JOYSTICK_SENSEHAT is not set\n# CONFIG_INPUT_TABLET is not set\nCONFIG_INPUT_TOUCHSCREEN=y\n# CONFIG_TOUCHSCREEN_ADS7846 is not set\n# CONFIG_TOUCHSCREEN_AD7877 is not set\n# CONFIG_TOUCHSCREEN_AD7879 is not set\n# CONFIG_TOUCHSCREEN_ADC is not set\n# CONFIG_TOUCHSCREEN_AR1021_I2C is not set\nCONFIG_TOUCHSCREEN_ATMEL_MXT=m\n# CONFIG_TOUCHSCREEN_ATMEL_MXT_T37 is not set\n# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_BU21013 is not set\n# CONFIG_TOUCHSCREEN_BU21029 is not set\n# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMA140 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set\n# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set\n# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set\n# CONFIG_TOUCHSCREEN_DYNAPRO is not set\n# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set\n# CONFIG_TOUCHSCREEN_EETI is not set\n# CONFIG_TOUCHSCREEN_EGALAX is not set\n# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set\n# CONFIG_TOUCHSCREEN_EXC3000 is not set\n# CONFIG_TOUCHSCREEN_FUJITSU is not set\n# CONFIG_TOUCHSCREEN_GOODIX is not set\n# CONFIG_TOUCHSCREEN_HIDEEP is not set\n# CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set\n# CONFIG_TOUCHSCREEN_ILI210X is not set\n# CONFIG_TOUCHSCREEN_ILITEK is not set\n# CONFIG_TOUCHSCREEN_S6SY761 is not set\n# CONFIG_TOUCHSCREEN_GUNZE is not set\n# CONFIG_TOUCHSCREEN_EKTF2127 is not set\n# CONFIG_TOUCHSCREEN_ELAN is not set\n# CONFIG_TOUCHSCREEN_ELO is not set\n# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set\n# CONFIG_TOUCHSCREEN_WACOM_I2C is not set\n# CONFIG_TOUCHSCREEN_MAX11801 is not set\n# CONFIG_TOUCHSCREEN_MCS5000 is not set\n# CONFIG_TOUCHSCREEN_MMS114 is not set\n# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set\n# CONFIG_TOUCHSCREEN_MSG2638 is not set\n# CONFIG_TOUCHSCREEN_MTOUCH is not set\n# CONFIG_TOUCHSCREEN_IMAGIS is not set\n# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set\n# CONFIG_TOUCHSCREEN_INEXIO is not set\n# CONFIG_TOUCHSCREEN_MK712 is not set\n# CONFIG_TOUCHSCREEN_PENMOUNT is not set\n# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set\n# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set\n# CONFIG_TOUCHSCREEN_TOUCHWIN is not set\n# CONFIG_TOUCHSCREEN_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set\n# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set\n# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set\n# CONFIG_TOUCHSCREEN_TSC_SERIO is not set\n# CONFIG_TOUCHSCREEN_TSC2004 is not set\n# CONFIG_TOUCHSCREEN_TSC2005 is not set\n# CONFIG_TOUCHSCREEN_TSC2007 is not set\n# CONFIG_TOUCHSCREEN_RM_TS is not set\n# CONFIG_TOUCHSCREEN_SILEAD is not set\n# CONFIG_TOUCHSCREEN_SIS_I2C is not set\n# CONFIG_TOUCHSCREEN_ST1232 is not set\n# CONFIG_TOUCHSCREEN_STMFTS is not set\n# CONFIG_TOUCHSCREEN_SUN4I is not set\n# CONFIG_TOUCHSCREEN_SUR40 is not set\n# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set\n# CONFIG_TOUCHSCREEN_SX8654 is not set\n# CONFIG_TOUCHSCREEN_TPS6507X is not set\n# CONFIG_TOUCHSCREEN_ZET6223 is not set\n# CONFIG_TOUCHSCREEN_ZFORCE is not set\n# CONFIG_TOUCHSCREEN_COLIBRI_VF50 is not set\n# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set\n# CONFIG_TOUCHSCREEN_IQS5XX is not set\n# CONFIG_TOUCHSCREEN_ZINITIX is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_AXP20X_PEK=y\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\n# CONFIG_INPUT_RK805_PWRKEY is not set\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IBM_PANEL is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_IQS7222 is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\nCONFIG_RMI4_CORE=m\n# CONFIG_RMI4_I2C is not set\n# CONFIG_RMI4_SPI is not set\n# CONFIG_RMI4_SMB is not set\nCONFIG_RMI4_F03=y\nCONFIG_RMI4_F03_SERIO=m\nCONFIG_RMI4_2D_SENSOR=y\nCONFIG_RMI4_F11=y\nCONFIG_RMI4_F12=y\nCONFIG_RMI4_F30=y\n# CONFIG_RMI4_F34 is not set\n# CONFIG_RMI4_F3A is not set\n# CONFIG_RMI4_F54 is not set\n# CONFIG_RMI4_F55 is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_SERIO_SERPORT=m\nCONFIG_SERIO_AMBAKMI=y\nCONFIG_SERIO_LIBPS2=y\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_SERIO_SUN4I_PS2 is not set\n# CONFIG_SERIO_GPIO_PS2 is not set\n# CONFIG_USERIO is not set\n# CONFIG_GAMEPORT is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\nCONFIG_LEGACY_PTYS=y\nCONFIG_LEGACY_PTY_COUNT=16\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\nCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y\nCONFIG_SERIAL_8250_16550A_VARIANTS=y\n# CONFIG_SERIAL_8250_FINTEK is not set\nCONFIG_SERIAL_8250_CONSOLE=y\nCONFIG_SERIAL_8250_DMA=y\nCONFIG_SERIAL_8250_NR_UARTS=4\nCONFIG_SERIAL_8250_RUNTIME_UARTS=4\nCONFIG_SERIAL_8250_EXTENDED=y\n# CONFIG_SERIAL_8250_MANY_PORTS is not set\nCONFIG_SERIAL_8250_SHARE_IRQ=y\n# CONFIG_SERIAL_8250_DETECT_IRQ is not set\n# CONFIG_SERIAL_8250_RSA is not set\nCONFIG_SERIAL_8250_DWLIB=y\nCONFIG_SERIAL_8250_FSL=y\nCONFIG_SERIAL_8250_DW=y\n# CONFIG_SERIAL_8250_RT288X is not set\nCONFIG_SERIAL_OF_PLATFORM=y\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\nCONFIG_SERIAL_AMBA_PL011=y\nCONFIG_SERIAL_AMBA_PL011_CONSOLE=y\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_SIFIVE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\nCONFIG_SERIAL_XILINX_PS_UART=y\nCONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\nCONFIG_SERIAL_MCTRL_GPIO=y\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NULL_TTY is not set\n# CONFIG_HVC_DCC is not set\n# CONFIG_RPMSG_TTY is not set\nCONFIG_SERIAL_DEV_BUS=y\nCONFIG_SERIAL_DEV_CTRL_TTYPORT=y\n# CONFIG_TTY_PRINTK is not set\n# CONFIG_VIRTIO_CONSOLE is not set\n# CONFIG_IPMI_HANDLER is not set\n# CONFIG_IPMB_DEVICE_INTERFACE is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_BA431 is not set\n# CONFIG_HW_RANDOM_CCTRNG is not set\n# CONFIG_HW_RANDOM_XIPHERA is not set\nCONFIG_HW_RANDOM_ARM_SMCCC_TRNG=m\nCONFIG_DEVMEM=y\nCONFIG_TCG_TPM=y\nCONFIG_HW_RANDOM_TPM=y\n# CONFIG_TCG_TIS is not set\n# CONFIG_TCG_TIS_SPI is not set\n# CONFIG_TCG_TIS_I2C is not set\n# CONFIG_TCG_TIS_I2C_CR50 is not set\n# CONFIG_TCG_TIS_I2C_ATMEL is not set\nCONFIG_TCG_TIS_I2C_INFINEON=y\n# CONFIG_TCG_TIS_I2C_NUVOTON is not set\n# CONFIG_TCG_VTPM_PROXY is not set\n# CONFIG_TCG_TIS_ST33ZP24_I2C is not set\n# CONFIG_TCG_TIS_ST33ZP24_SPI is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\nCONFIG_RANDOM_TRUST_CPU=y\n# CONFIG_RANDOM_TRUST_BOOTLOADER is not set\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\nCONFIG_I2C_MUX_PCA954x=y\n# CONFIG_I2C_MUX_PINCTRL is not set\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_DEMUX_PINCTRL is not set\n# CONFIG_I2C_MUX_MLXCPLD is not set\n# end of Multiplexer I2C Chip support\n\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CADENCE is not set\n# CONFIG_I2C_CBUS_GPIO is not set\nCONFIG_I2C_DESIGNWARE_CORE=y\n# CONFIG_I2C_DESIGNWARE_SLAVE is not set\nCONFIG_I2C_DESIGNWARE_PLATFORM=y\n# CONFIG_I2C_EMEV2 is not set\n# CONFIG_I2C_GPIO is not set\nCONFIG_I2C_MV64XXX=y\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\nCONFIG_I2C_RK3X=y\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\nCONFIG_I2C_SLAVE=y\n# CONFIG_I2C_SLAVE_EEPROM is not set\n# CONFIG_I2C_SLAVE_TESTUNIT is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\nCONFIG_SPI_MEM=y\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\n# CONFIG_SPI_BITBANG is not set\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_CADENCE_QUADSPI is not set\n# CONFIG_SPI_CADENCE_XSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_NXP_FLEXSPI is not set\n# CONFIG_SPI_GPIO is not set\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_MICROCHIP_CORE is not set\n# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set\n# CONFIG_SPI_OC_TINY is not set\nCONFIG_SPI_PL022=y\nCONFIG_SPI_ROCKCHIP=y\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_SIFIVE is not set\n# CONFIG_SPI_SUN4I is not set\nCONFIG_SPI_SUN6I=y\n# CONFIG_SPI_MXIC is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_AMD is not set\n\n#\n# SPI Multiplexer support\n#\n# CONFIG_SPI_MUX is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=m\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\nCONFIG_SPI_DYNAMIC=y\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\nCONFIG_PTP_1588_CLOCK_KVM=y\n# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set\n# CONFIG_PTP_1588_CLOCK_IDTCM is not set\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_GENERIC_PINCTRL_GROUPS=y\nCONFIG_PINMUX=y\nCONFIG_GENERIC_PINMUX_FUNCTIONS=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\nCONFIG_PINCTRL_AXP209=y\n# CONFIG_PINCTRL_CY8C95X0 is not set\nCONFIG_PINCTRL_MAX77620=y\n# CONFIG_PINCTRL_MCP23S08 is not set\n# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set\n# CONFIG_PINCTRL_OCELOT is not set\n# CONFIG_PINCTRL_RK805 is not set\nCONFIG_PINCTRL_SINGLE=y\n# CONFIG_PINCTRL_STMFX is not set\n# CONFIG_PINCTRL_SX150X is not set\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\nCONFIG_PINCTRL_SUNXI=y\n# CONFIG_PINCTRL_SUN4I_A10 is not set\n# CONFIG_PINCTRL_SUN5I is not set\n# CONFIG_PINCTRL_SUN6I_A31 is not set\n# CONFIG_PINCTRL_SUN6I_A31_R is not set\n# CONFIG_PINCTRL_SUN8I_A23 is not set\n# CONFIG_PINCTRL_SUN8I_A33 is not set\n# CONFIG_PINCTRL_SUN8I_A83T is not set\n# CONFIG_PINCTRL_SUN8I_A83T_R is not set\n# CONFIG_PINCTRL_SUN8I_A23_R is not set\n# CONFIG_PINCTRL_SUN8I_H3 is not set\nCONFIG_PINCTRL_SUN8I_H3_R=y\n# CONFIG_PINCTRL_SUN8I_V3S is not set\n# CONFIG_PINCTRL_SUN9I_A80 is not set\n# CONFIG_PINCTRL_SUN9I_A80_R is not set\n# CONFIG_PINCTRL_SUN20I_D1 is not set\nCONFIG_PINCTRL_SUN50I_A64=y\nCONFIG_PINCTRL_SUN50I_A64_R=y\n# CONFIG_PINCTRL_SUN50I_A100 is not set\n# CONFIG_PINCTRL_SUN50I_A100_R is not set\nCONFIG_PINCTRL_SUN50I_H5=y\nCONFIG_PINCTRL_SUN50I_H6=y\nCONFIG_PINCTRL_SUN50I_H6_R=y\nCONFIG_PINCTRL_SUN50I_H616=y\nCONFIG_PINCTRL_SUN50I_H616_R=y\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_SYSFS=y\nCONFIG_GPIO_CDEV=y\nCONFIG_GPIO_CDEV_V1=y\nCONFIG_GPIO_GENERIC=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_CADENCE is not set\nCONFIG_GPIO_DWAPB=y\n# CONFIG_GPIO_FTGPIO010 is not set\nCONFIG_GPIO_GENERIC_PLATFORM=y\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_LOGICVC is not set\nCONFIG_GPIO_MB86S7X=y\nCONFIG_GPIO_PL061=y\n# CONFIG_GPIO_SIFIVE is not set\n# CONFIG_GPIO_SYSCON is not set\nCONFIG_GPIO_XGENE=y\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_GW_PLD is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\nCONFIG_GPIO_PCA953X=y\nCONFIG_GPIO_PCA953X_IRQ=y\n# CONFIG_GPIO_PCA9570 is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\nCONFIG_GPIO_MAX77620=y\n# end of MFD GPIO expanders\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n# end of SPI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_SIM is not set\n# end of Virtual GPIO drivers\n\n# CONFIG_W1 is not set\nCONFIG_POWER_RESET=y\nCONFIG_POWER_RESET_BRCMSTB=y\n# CONFIG_POWER_RESET_GPIO is not set\n# CONFIG_POWER_RESET_GPIO_RESTART is not set\n# CONFIG_POWER_RESET_LTC2952 is not set\nCONFIG_POWER_RESET_REGULATOR=y\n# CONFIG_POWER_RESET_RESTART is not set\nCONFIG_POWER_RESET_VEXPRESS=y\nCONFIG_POWER_RESET_XGENE=y\nCONFIG_POWER_RESET_SYSCON=y\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\nCONFIG_REBOOT_MODE=y\nCONFIG_SYSCON_REBOOT_MODE=y\n# CONFIG_NVMEM_REBOOT_MODE is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\nCONFIG_POWER_SUPPLY_HWMON=y\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_IP5XXX_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SAMSUNG_SDI is not set\nCONFIG_BATTERY_SBS=m\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\nCONFIG_BATTERY_BQ27XXX=y\nCONFIG_BATTERY_BQ27XXX_I2C=y\n# CONFIG_BATTERY_BQ27XXX_DT_UPDATES_NVM is not set\nCONFIG_AXP20X_POWER=y\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_MAX77976 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_RK817 is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_UCS1002 is not set\n# CONFIG_CHARGER_BD99954 is not set\n# CONFIG_BATTERY_UG3105 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM1177 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_AHT10 is not set\n# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set\n# CONFIG_SENSORS_AS370 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_AXI_FAN_CONTROL is not set\nCONFIG_SENSORS_ARM_SCPI=y\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_CORSAIR_CPRO is not set\n# CONFIG_SENSORS_CORSAIR_PSU is not set\n# CONFIG_SENSORS_DRIVETEMP is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\n# CONFIG_SENSORS_GPIO_FAN is not set\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IIO_HWMON is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2947_I2C is not set\n# CONFIG_SENSORS_LTC2947_SPI is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC2992 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX127 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX31730 is not set\n# CONFIG_SENSORS_MAX31760 is not set\n# CONFIG_SENSORS_MAX6620 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_TPS23861 is not set\n# CONFIG_SENSORS_MR75203 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\nCONFIG_SENSORS_LM90=m\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT6775_I2C is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_NZXT_KRAKEN2 is not set\n# CONFIG_SENSORS_NZXT_SMART2 is not set\n# CONFIG_SENSORS_OCC_P8_I2C is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\n# CONFIG_SENSORS_PWM_FAN is not set\n# CONFIG_SENSORS_SBTSI is not set\n# CONFIG_SENSORS_SBRMI is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHT4x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC2305 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\nCONFIG_SENSORS_INA2XX=m\n# CONFIG_SENSORS_INA238 is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_TMP464 is not set\n# CONFIG_SENSORS_TMP513 is not set\n# CONFIG_SENSORS_VEXPRESS is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_NETLINK is not set\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\n# CONFIG_THERMAL_WRITABLE_TRIPS is not set\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\nCONFIG_CPU_THERMAL=y\nCONFIG_CPU_FREQ_THERMAL=y\n# CONFIG_DEVFREQ_THERMAL is not set\nCONFIG_THERMAL_EMULATION=y\n# CONFIG_THERMAL_MMIO is not set\n# CONFIG_MAX77620_THERMAL is not set\nCONFIG_SUN8I_THERMAL=y\n# CONFIG_GENERIC_ADC_THERMAL is not set\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\nCONFIG_WATCHDOG_OPEN_TIMEOUT=0\n# CONFIG_WATCHDOG_SYSFS is not set\n# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\nCONFIG_ARM_SP805_WATCHDOG=y\n# CONFIG_ARM_SBSA_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\n# CONFIG_DW_WATCHDOG is not set\nCONFIG_SUNXI_WATCHDOG=y\n# CONFIG_MAX63XX_WATCHDOG is not set\n# CONFIG_MAX77620_WATCHDOG is not set\n# CONFIG_ARM_SMC_WATCHDOG is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\n# CONFIG_SSB is not set\nCONFIG_BCMA_POSSIBLE=y\n# CONFIG_BCMA is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_SUN4I_GPADC is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AC100 is not set\nCONFIG_MFD_AC200=y\nCONFIG_MFD_AXP20X=y\nCONFIG_MFD_AXP20X_I2C=y\nCONFIG_MFD_AXP20X_RSB=y\n# CONFIG_MFD_MADERA is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_GATEWORKS_GSC is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_MP2629 is not set\nCONFIG_MFD_HI6421_PMIC=y\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\nCONFIG_MFD_MAX77620=y\n# CONFIG_MFD_MAX77650 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77714 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6370 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_MFD_OCELOT is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_NTXEC is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_SY7636A is not set\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RT5120 is not set\n# CONFIG_MFD_RC5T583 is not set\nCONFIG_MFD_RK808=y\n# CONFIG_MFD_RN5T618 is not set\nCONFIG_MFD_SEC_CORE=y\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_STMPE is not set\n# CONFIG_MFD_SUN6I_PRCM is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\nCONFIG_MFD_WL1273_CORE=m\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_LOCHNAGAR is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_MFD_ROHM_BD718XX is not set\n# CONFIG_MFD_ROHM_BD71828 is not set\n# CONFIG_MFD_ROHM_BD957XMUF is not set\n# CONFIG_MFD_STPMIC1 is not set\n# CONFIG_MFD_STMFX is not set\n# CONFIG_MFD_ATC260X_I2C is not set\n# CONFIG_MFD_QCOM_PM8008 is not set\nCONFIG_MFD_VEXPRESS_SYSREG=y\n# CONFIG_RAVE_SP_CORE is not set\n# CONFIG_MFD_INTEL_M10_BMC is not set\n# CONFIG_MFD_RSMU_I2C is not set\n# CONFIG_MFD_RSMU_SPI is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\nCONFIG_REGULATOR_AXP20X=y\n# CONFIG_REGULATOR_DA9121 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\nCONFIG_REGULATOR_FAN53555=y\n# CONFIG_REGULATOR_FAN53880 is not set\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_HI6421 is not set\nCONFIG_REGULATOR_HI6421V530=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\nCONFIG_REGULATOR_MAX77620=y\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MAX20086 is not set\n# CONFIG_REGULATOR_MAX77826 is not set\n# CONFIG_REGULATOR_MCP16502 is not set\n# CONFIG_REGULATOR_MP5416 is not set\n# CONFIG_REGULATOR_MP8859 is not set\n# CONFIG_REGULATOR_MP886X is not set\n# CONFIG_REGULATOR_MPQ7920 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PF8X00 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\nCONFIG_REGULATOR_PWM=y\n# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set\nCONFIG_REGULATOR_RK808=y\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT5190A is not set\n# CONFIG_REGULATOR_RT5759 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\n# CONFIG_REGULATOR_S2MPA01 is not set\nCONFIG_REGULATOR_S2MPS11=y\n# CONFIG_REGULATOR_S5M8767 is not set\n# CONFIG_REGULATOR_SLG51000 is not set\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_SY8824X is not set\n# CONFIG_REGULATOR_SY8827N is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS6286X is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\nCONFIG_REGULATOR_VCTRL=m\n# CONFIG_REGULATOR_VEXPRESS is not set\nCONFIG_RC_CORE=y\nCONFIG_BPF_LIRC_MODE2=y\nCONFIG_LIRC=y\nCONFIG_RC_MAP=y\nCONFIG_RC_DECODERS=y\nCONFIG_IR_IMON_DECODER=y\nCONFIG_IR_JVC_DECODER=y\nCONFIG_IR_MCE_KBD_DECODER=y\nCONFIG_IR_NEC_DECODER=y\nCONFIG_IR_RC5_DECODER=y\nCONFIG_IR_RC6_DECODER=y\nCONFIG_IR_RCMM_DECODER=y\nCONFIG_IR_SANYO_DECODER=y\nCONFIG_IR_SHARP_DECODER=y\nCONFIG_IR_SONY_DECODER=y\nCONFIG_IR_XMP_DECODER=y\nCONFIG_RC_DEVICES=y\nCONFIG_IR_GPIO_CIR=m\nCONFIG_IR_GPIO_TX=m\n# CONFIG_IR_HIX5HD2 is not set\nCONFIG_IR_IGORPLUGUSB=m\nCONFIG_IR_IGUANA=m\nCONFIG_IR_IMON=m\nCONFIG_IR_IMON_RAW=m\nCONFIG_IR_MCEUSB=m\n# CONFIG_IR_PWM_TX is not set\nCONFIG_IR_REDRAT3=m\n# CONFIG_IR_SERIAL is not set\n# CONFIG_IR_SPI is not set\nCONFIG_IR_STREAMZAP=m\nCONFIG_IR_SUNXI=m\nCONFIG_IR_TOY=m\nCONFIG_IR_TTUSBIR=m\nCONFIG_RC_ATI_REMOTE=m\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_RC_XBOX_DVD=y\nCONFIG_CEC_CORE=y\nCONFIG_CEC_NOTIFIER=y\nCONFIG_CEC_PIN=y\n\n#\n# CEC support\n#\n# CONFIG_MEDIA_CEC_RC is not set\n# CONFIG_CEC_PIN_ERROR_INJ is not set\nCONFIG_MEDIA_CEC_SUPPORT=y\n# CONFIG_CEC_CH7322 is not set\n# CONFIG_CEC_GPIO is not set\nCONFIG_USB_PULSE8_CEC=m\nCONFIG_USB_RAINSHADOW_CEC=m\n# end of CEC support\n\nCONFIG_MEDIA_SUPPORT=y\nCONFIG_MEDIA_SUPPORT_FILTER=y\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\nCONFIG_MEDIA_RADIO_SUPPORT=y\n# CONFIG_MEDIA_SDR_SUPPORT is not set\nCONFIG_MEDIA_PLATFORM_SUPPORT=y\n# CONFIG_MEDIA_TEST_SUPPORT is not set\n# end of Media device types\n\nCONFIG_VIDEO_DEV=y\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_DVB_CORE=y\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2_I2C=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_VIDEO_TUNER=m\nCONFIG_V4L2_H264=m\nCONFIG_V4L2_VP9=m\nCONFIG_V4L2_MEM2MEM_DEV=y\nCONFIG_V4L2_FWNODE=y\nCONFIG_V4L2_ASYNC=y\nCONFIG_VIDEOBUF_GEN=m\nCONFIG_VIDEOBUF_VMALLOC=m\n# end of Video4Linux options\n\n#\n# Media controller options\n#\nCONFIG_MEDIA_CONTROLLER_DVB=y\nCONFIG_MEDIA_CONTROLLER_REQUEST_API=y\n# end of Media controller options\n\n#\n# Digital TV options\n#\n# CONFIG_DVB_MMAP is not set\nCONFIG_DVB_NET=y\nCONFIG_DVB_MAX_ADAPTERS=16\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set\n# CONFIG_DVB_ULE_DEBUG is not set\n# end of Digital TV options\n\n#\n# Media drivers\n#\n\n#\n# Drivers filtered as selected at 'Filter media drivers'\n#\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_USB_S2255 is not set\n# CONFIG_VIDEO_USBTV is not set\nCONFIG_USB_VIDEO_CLASS=m\n# CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV is not set\n\n#\n# Analog TV USB devices\n#\nCONFIG_VIDEO_GO7007=m\nCONFIG_VIDEO_GO7007_USB=m\nCONFIG_VIDEO_GO7007_LOADER=m\nCONFIG_VIDEO_GO7007_USB_S2250_BOARD=m\nCONFIG_VIDEO_HDPVR=m\nCONFIG_VIDEO_PVRUSB2=m\nCONFIG_VIDEO_PVRUSB2_SYSFS=y\nCONFIG_VIDEO_PVRUSB2_DVB=y\n# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set\nCONFIG_VIDEO_STK1160_COMMON=m\nCONFIG_VIDEO_STK1160=m\n\n#\n# Analog/digital TV USB devices\n#\nCONFIG_VIDEO_AU0828=m\nCONFIG_VIDEO_AU0828_V4L2=y\nCONFIG_VIDEO_AU0828_RC=y\nCONFIG_VIDEO_CX231XX=m\nCONFIG_VIDEO_CX231XX_RC=y\nCONFIG_VIDEO_CX231XX_ALSA=m\nCONFIG_VIDEO_CX231XX_DVB=m\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_AS102=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\n# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_DVBSKY=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_DVB_USB_ZD1301=m\nCONFIG_DVB_USB=m\n# CONFIG_DVB_USB_DEBUG is not set\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_CXUSB=m\nCONFIG_DVB_USB_CXUSB_ANALOG=y\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_DIB3000MC=m\nCONFIG_DVB_USB_DIBUSB_MB=m\nCONFIG_DVB_USB_DIBUSB_MB_FAULTY=y\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_DTT200U=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_OPERA1=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_SMS_USB_DRV=m\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\nCONFIG_VIDEO_EM28XX=m\nCONFIG_VIDEO_EM28XX_V4L2=m\nCONFIG_VIDEO_EM28XX_ALSA=m\nCONFIG_VIDEO_EM28XX_DVB=m\nCONFIG_VIDEO_EM28XX_RC=m\nCONFIG_RADIO_ADAPTERS=y\nCONFIG_RADIO_SAA7706H=m\nCONFIG_RADIO_SHARK=m\nCONFIG_RADIO_SHARK2=m\nCONFIG_RADIO_SI4713=m\nCONFIG_RADIO_TEA575X=m\nCONFIG_RADIO_TEA5764=m\nCONFIG_RADIO_TEF6862=m\nCONFIG_RADIO_WL1273=m\nCONFIG_USB_DSBR=m\nCONFIG_USB_KEENE=m\nCONFIG_USB_MA901=m\nCONFIG_USB_MR800=m\nCONFIG_USB_RAREMONO=m\nCONFIG_RADIO_SI470X=m\nCONFIG_USB_SI470X=m\nCONFIG_I2C_SI470X=m\nCONFIG_USB_SI4713=m\nCONFIG_PLATFORM_SI4713=m\nCONFIG_I2C_SI4713=m\nCONFIG_MEDIA_PLATFORM_DRIVERS=y\n# CONFIG_V4L_PLATFORM_DRIVERS is not set\nCONFIG_DVB_PLATFORM_DRIVERS=y\nCONFIG_V4L_MEM2MEM_DRIVERS=y\n# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set\n\n#\n# Allegro DVT media platform drivers\n#\n\n#\n# Amlogic media platform drivers\n#\n\n#\n# Amphion drivers\n#\n\n#\n# Aspeed media platform drivers\n#\n\n#\n# Atmel media platform drivers\n#\n\n#\n# Cadence media platform drivers\n#\n# CONFIG_VIDEO_CADENCE_CSI2RX is not set\n# CONFIG_VIDEO_CADENCE_CSI2TX is not set\n\n#\n# Chips&Media media platform drivers\n#\n\n#\n# Intel media platform drivers\n#\n\n#\n# Marvell media platform drivers\n#\n\n#\n# Mediatek media platform drivers\n#\n\n#\n# NVidia media platform drivers\n#\n\n#\n# NXP media platform drivers\n#\n\n#\n# Qualcomm media platform drivers\n#\n\n#\n# Renesas media platform drivers\n#\n\n#\n# Rockchip media platform drivers\n#\n\n#\n# Samsung media platform drivers\n#\n\n#\n# STMicroelectronics media platform drivers\n#\n\n#\n# Sunxi media platform drivers\n#\nCONFIG_VIDEO_SUN8I_DEINTERLACE=m\nCONFIG_VIDEO_SUN50I_DEINTERLACE=m\nCONFIG_VIDEO_SUN8I_ROTATE=m\n\n#\n# Texas Instruments drivers\n#\n\n#\n# Verisilicon media platform drivers\n#\nCONFIG_VIDEO_HANTRO=m\nCONFIG_VIDEO_HANTRO_SUNXI=y\n\n#\n# VIA media platform drivers\n#\n\n#\n# Xilinx media platform drivers\n#\n\n#\n# MMC/SDIO DVB adapters\n#\n# CONFIG_SMS_SDIO_DRV is not set\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_TTPCI_EEPROM=m\nCONFIG_VIDEO_CX2341X=m\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\nCONFIG_VIDEOBUF2_CORE=y\nCONFIG_VIDEOBUF2_V4L2=y\nCONFIG_VIDEOBUF2_MEMOPS=y\nCONFIG_VIDEOBUF2_DMA_CONTIG=y\nCONFIG_VIDEOBUF2_VMALLOC=m\n# end of Media drivers\n\n#\n# Media ancillary drivers\n#\nCONFIG_MEDIA_ATTACH=y\n\n#\n# IR I2C driver auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_IR_I2C=y\nCONFIG_VIDEO_CAMERA_SENSOR=y\n# CONFIG_VIDEO_AR0521 is not set\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_HI846 is not set\n# CONFIG_VIDEO_HI847 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_IMX412 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\nCONFIG_VIDEO_MT9V011=m\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_OG01A1B is not set\n# CONFIG_VIDEO_OV02A10 is not set\n# CONFIG_VIDEO_OV08D10 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\nCONFIG_VIDEO_OV2640=m\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5693 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV7251 is not set\nCONFIG_VIDEO_OV7640=m\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9282 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# Audio decoders, processors and mixers\n#\nCONFIG_VIDEO_CS3308=m\nCONFIG_VIDEO_CS5345=m\nCONFIG_VIDEO_CS53L32A=m\nCONFIG_VIDEO_MSP3400=m\nCONFIG_VIDEO_SONY_BTF_MPX=m\nCONFIG_VIDEO_TDA1997X=m\nCONFIG_VIDEO_TDA7432=m\nCONFIG_VIDEO_TDA9840=m\nCONFIG_VIDEO_TEA6415C=m\nCONFIG_VIDEO_TEA6420=m\nCONFIG_VIDEO_TLV320AIC23B=m\nCONFIG_VIDEO_TVAUDIO=m\nCONFIG_VIDEO_UDA1342=m\nCONFIG_VIDEO_VP27SMPX=m\nCONFIG_VIDEO_WM8739=m\nCONFIG_VIDEO_WM8775=m\n# end of Audio decoders, processors and mixers\n\n#\n# RDS decoders\n#\nCONFIG_VIDEO_SAA6588=m\n# end of RDS decoders\n\n#\n# Video decoders\n#\nCONFIG_VIDEO_ADV7180=m\nCONFIG_VIDEO_ADV7183=m\nCONFIG_VIDEO_ADV748X=m\nCONFIG_VIDEO_ADV7604=m\nCONFIG_VIDEO_ADV7604_CEC=y\nCONFIG_VIDEO_ADV7842=m\nCONFIG_VIDEO_ADV7842_CEC=y\nCONFIG_VIDEO_BT819=m\nCONFIG_VIDEO_BT856=m\nCONFIG_VIDEO_BT866=m\n# CONFIG_VIDEO_ISL7998X is not set\nCONFIG_VIDEO_KS0127=m\nCONFIG_VIDEO_MAX9286=m\nCONFIG_VIDEO_ML86V7667=m\nCONFIG_VIDEO_SAA7110=m\nCONFIG_VIDEO_SAA711X=m\nCONFIG_VIDEO_TC358743=m\nCONFIG_VIDEO_TC358743_CEC=y\nCONFIG_VIDEO_TVP514X=m\nCONFIG_VIDEO_TVP5150=m\nCONFIG_VIDEO_TVP7002=m\nCONFIG_VIDEO_TW2804=m\nCONFIG_VIDEO_TW9903=m\nCONFIG_VIDEO_TW9906=m\nCONFIG_VIDEO_TW9910=m\nCONFIG_VIDEO_VPX3220=m\n\n#\n# Video and audio decoders\n#\nCONFIG_VIDEO_SAA717X=m\nCONFIG_VIDEO_CX25840=m\n# end of Video decoders\n\n#\n# Video encoders\n#\nCONFIG_VIDEO_AD9389B=m\nCONFIG_VIDEO_ADV7170=m\nCONFIG_VIDEO_ADV7175=m\nCONFIG_VIDEO_ADV7343=m\nCONFIG_VIDEO_ADV7393=m\nCONFIG_VIDEO_ADV7511=m\nCONFIG_VIDEO_ADV7511_CEC=y\nCONFIG_VIDEO_AK881X=m\nCONFIG_VIDEO_SAA7127=m\nCONFIG_VIDEO_SAA7185=m\nCONFIG_VIDEO_THS8200=m\n# end of Video encoders\n\n#\n# Video improvement chips\n#\nCONFIG_VIDEO_UPD64031A=m\nCONFIG_VIDEO_UPD64083=m\n# end of Video improvement chips\n\n#\n# Audio/Video compression chips\n#\nCONFIG_VIDEO_SAA6752HS=m\n# end of Audio/Video compression chips\n\n#\n# SDR tuner chips\n#\n# end of SDR tuner chips\n\n#\n# Miscellaneous helper chips\n#\nCONFIG_VIDEO_I2C=m\nCONFIG_VIDEO_M52790=m\n# CONFIG_VIDEO_ST_MIPID02 is not set\nCONFIG_VIDEO_THS7303=m\n# end of Miscellaneous helper chips\n\n#\n# Media SPI Adapters\n#\nCONFIG_CXD2880_SPI_DRV=m\nCONFIG_VIDEO_GS1662=m\n# end of Media SPI Adapters\n\nCONFIG_MEDIA_TUNER=y\n\n#\n# Customize TV tuners\n#\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_IT913X=m\nCONFIG_MEDIA_TUNER_M88RS6000T=m\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_MC44S803=y\nCONFIG_MEDIA_TUNER_MSI001=m\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT20XX=y\nCONFIG_MEDIA_TUNER_MT2131=m\nCONFIG_MEDIA_TUNER_MT2266=m\nCONFIG_MEDIA_TUNER_MXL301RF=m\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\nCONFIG_MEDIA_TUNER_QM1D1B0004=m\nCONFIG_MEDIA_TUNER_QM1D1C0042=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_R820T=m\nCONFIG_MEDIA_TUNER_SI2157=m\nCONFIG_MEDIA_TUNER_SIMPLE=y\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_TDA18250=m\nCONFIG_MEDIA_TUNER_TDA18271=y\nCONFIG_MEDIA_TUNER_TDA827X=y\nCONFIG_MEDIA_TUNER_TDA8290=y\nCONFIG_MEDIA_TUNER_TDA9887=y\nCONFIG_MEDIA_TUNER_TEA5761=y\nCONFIG_MEDIA_TUNER_TEA5767=y\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_XC2028=y\nCONFIG_MEDIA_TUNER_XC4000=y\nCONFIG_MEDIA_TUNER_XC5000=y\n# end of Customize TV tuners\n\n#\n# Customise DVB Frontends\n#\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_M88DS3103=m\nCONFIG_DVB_MXL5XX=m\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\nCONFIG_DVB_STV0910=m\nCONFIG_DVB_STV6110x=m\nCONFIG_DVB_STV6111=m\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_MN88472=m\nCONFIG_DVB_MN88473=m\nCONFIG_DVB_SI2165=m\nCONFIG_DVB_TDA18271C2DD=m\n\n#\n# DVB-S (satellite) frontends\n#\nCONFIG_DVB_CX24110=m\nCONFIG_DVB_CX24116=m\nCONFIG_DVB_CX24117=m\nCONFIG_DVB_CX24120=m\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_DS3000=m\nCONFIG_DVB_MB86A16=m\nCONFIG_DVB_MT312=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_TDA10071=m\nCONFIG_DVB_TDA10086=m\nCONFIG_DVB_TDA8083=m\nCONFIG_DVB_TDA8261=m\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_TS2020=m\nCONFIG_DVB_TUA6100=m\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TUNER_ITD1000=m\nCONFIG_DVB_VES1X93=m\nCONFIG_DVB_ZL10036=m\nCONFIG_DVB_ZL10039=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_AS102_FE=m\nCONFIG_DVB_CX22700=m\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_CXD2841ER=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\nCONFIG_DVB_DIB9000=m\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_GP8PSK_FE=m\nCONFIG_DVB_L64781=m\nCONFIG_DVB_MT352=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\nCONFIG_DVB_S5H1432=m\nCONFIG_DVB_SI2168=m\nCONFIG_DVB_SP887X=m\nCONFIG_DVB_STV0367=m\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_ZD1301_DEMOD=m\nCONFIG_DVB_ZL10353=m\nCONFIG_DVB_CXD2880=m\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_STV0297=m\nCONFIG_DVB_TDA10021=m\nCONFIG_DVB_TDA10023=m\nCONFIG_DVB_VES1820=m\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_AU8522=m\nCONFIG_DVB_AU8522_DTV=m\nCONFIG_DVB_AU8522_V4L=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LGDT3306A=m\nCONFIG_DVB_LGDT330X=m\nCONFIG_DVB_MXL692=m\nCONFIG_DVB_NXT200X=m\nCONFIG_DVB_OR51132=m\nCONFIG_DVB_OR51211=m\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_S5H1411=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\nCONFIG_DVB_S921=m\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_MN88443X=m\nCONFIG_DVB_TC90522=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_A8293=m\nCONFIG_DVB_AF9033=m\nCONFIG_DVB_ASCOT2E=m\nCONFIG_DVB_ATBM8830=m\nCONFIG_DVB_HELENE=m\nCONFIG_DVB_HORUS3A=m\nCONFIG_DVB_ISL6405=m\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_IX2505V=m\nCONFIG_DVB_LGS8GL5=m\nCONFIG_DVB_LGS8GXX=m\nCONFIG_DVB_LNBH25=m\nCONFIG_DVB_LNBH29=m\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_M88RS2000=m\nCONFIG_DVB_TDA665x=m\nCONFIG_DVB_DRX39XYJ=m\n\n#\n# Common Interface (EN50221) controller drivers\n#\nCONFIG_DVB_CXD2099=m\nCONFIG_DVB_SP2=m\n# end of Customise DVB Frontends\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\nCONFIG_DRM=y\n# CONFIG_DRM_DEBUG_MM is not set\nCONFIG_DRM_KMS_HELPER=y\n# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set\n# CONFIG_DRM_DEBUG_MODESET_LOCK is not set\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\n# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\nCONFIG_DRM_DISPLAY_HELPER=y\nCONFIG_DRM_DISPLAY_DP_HELPER=y\nCONFIG_DRM_DISPLAY_HDMI_HELPER=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_GEM_DMA_HELPER=y\nCONFIG_DRM_GEM_SHMEM_HELPER=m\nCONFIG_DRM_SCHED=m\n\n#\n# I2C encoder or helper chips\n#\nCONFIG_DRM_I2C_CH7006=m\nCONFIG_DRM_I2C_SIL164=m\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_KOMEDA is not set\n# end of ARM devices\n\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_USE_LVDS is not set\n# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set\nCONFIG_DRM_SUN4I=y\n# CONFIG_DRM_SUN6I_DSI is not set\nCONFIG_DRM_SUN8I_DW_HDMI=y\nCONFIG_DRM_SUN8I_MIXER=y\nCONFIG_DRM_SUN8I_TCON_TOP=y\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set\n# CONFIG_DRM_PANEL_ARM_VERSATILE is not set\n# CONFIG_DRM_PANEL_LVDS is not set\n# CONFIG_DRM_PANEL_SIMPLE is not set\n# CONFIG_DRM_PANEL_EDP is not set\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set\n# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LB035Q02 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set\n# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set\n# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set\n# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set\n# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set\n# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set\n# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set\n# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set\n# CONFIG_DRM_PANEL_TPO_TPG110 is not set\n# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_CHRONTEL_CH7033 is not set\n# CONFIG_DRM_DISPLAY_CONNECTOR is not set\n# CONFIG_DRM_ITE_IT6505 is not set\n# CONFIG_DRM_LONTIUM_LT8912B is not set\n# CONFIG_DRM_LONTIUM_LT9211 is not set\n# CONFIG_DRM_LONTIUM_LT9611 is not set\n# CONFIG_DRM_LONTIUM_LT9611UXC is not set\n# CONFIG_DRM_ITE_IT66121 is not set\n# CONFIG_DRM_LVDS_CODEC is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NWL_MIPI_DSI is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_PARADE_PS8640 is not set\n# CONFIG_DRM_SIL_SII8620 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_SII9234 is not set\nCONFIG_DRM_SIMPLE_BRIDGE=y\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\n# CONFIG_DRM_TOSHIBA_TC358762 is not set\n# CONFIG_DRM_TOSHIBA_TC358764 is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TOSHIBA_TC358768 is not set\n# CONFIG_DRM_TOSHIBA_TC358775 is not set\n# CONFIG_DRM_TI_DLPC3433 is not set\n# CONFIG_DRM_TI_TFP410 is not set\n# CONFIG_DRM_TI_SN65DSI83 is not set\n# CONFIG_DRM_TI_SN65DSI86 is not set\n# CONFIG_DRM_TI_TPD12S015 is not set\nCONFIG_DRM_ANALOGIX_ANX6345=m\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\nCONFIG_DRM_ANALOGIX_DP=m\n# CONFIG_DRM_ANALOGIX_ANX7625 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_CDNS_MHDP8546 is not set\nCONFIG_DRM_DW_HDMI=y\n# CONFIG_DRM_DW_HDMI_AHB_AUDIO is not set\nCONFIG_DRM_DW_HDMI_I2S_AUDIO=y\n# CONFIG_DRM_DW_HDMI_GP_AUDIO is not set\nCONFIG_DRM_DW_HDMI_CEC=y\n# end of Display Interface Bridges\n\n# CONFIG_DRM_ETNAVIV is not set\n# CONFIG_DRM_HISI_KIRIN is not set\n# CONFIG_DRM_LOGICVC is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_PANEL_MIPI_DBI is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_TINYDRM_HX8357D is not set\n# CONFIG_TINYDRM_ILI9163 is not set\n# CONFIG_TINYDRM_ILI9225 is not set\n# CONFIG_TINYDRM_ILI9341 is not set\n# CONFIG_TINYDRM_ILI9486 is not set\n# CONFIG_TINYDRM_MI0283QT is not set\n# CONFIG_TINYDRM_REPAPER is not set\n# CONFIG_TINYDRM_ST7586 is not set\n# CONFIG_TINYDRM_ST7735R is not set\n# CONFIG_DRM_PL111 is not set\nCONFIG_DRM_LIMA=m\nCONFIG_DRM_PANFROST=m\n# CONFIG_DRM_TIDSS is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_SSD130X is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_DRM_NOMODESET=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\nCONFIG_FB_MODE_HELPERS=y\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\nCONFIG_LCD_CLASS_DEVICE=m\n# CONFIG_LCD_L4F00242T03 is not set\n# CONFIG_LCD_LMS283GF05 is not set\n# CONFIG_LCD_LTV350QV is not set\n# CONFIG_LCD_ILI922X is not set\n# CONFIG_LCD_ILI9320 is not set\n# CONFIG_LCD_TDO24M is not set\n# CONFIG_LCD_VGG2432A4 is not set\n# CONFIG_LCD_PLATFORM is not set\n# CONFIG_LCD_AMS369FG06 is not set\n# CONFIG_LCD_LMS501KF03 is not set\n# CONFIG_LCD_HX8357 is not set\n# CONFIG_LCD_OTM3225A is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\n# CONFIG_BACKLIGHT_KTD253 is not set\nCONFIG_BACKLIGHT_PWM=m\n# CONFIG_BACKLIGHT_QCOM_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\nCONFIG_BACKLIGHT_LP855X=m\n# CONFIG_BACKLIGHT_GPIO is not set\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n# CONFIG_BACKLIGHT_LED is not set\n# end of Backlight & LCD device support\n\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_DUMMY_CONSOLE_COLUMNS=80\nCONFIG_DUMMY_CONSOLE_ROWS=25\nCONFIG_FRAMEBUFFER_CONSOLE=y\n# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\n# end of Console display driver support\n\n# CONFIG_LOGO is not set\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_HWDEP=m\nCONFIG_SND_RAWMIDI=m\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\n# CONFIG_SND_HRTIMER is not set\n# CONFIG_SND_DYNAMIC_MINORS is not set\nCONFIG_SND_SUPPORT_OLD_API=y\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_CTL_INPUT_VALIDATION is not set\n# CONFIG_SND_SEQUENCER is not set\nCONFIG_SND_DRIVERS=y\n# CONFIG_SND_DUMMY is not set\n# CONFIG_SND_ALOOP is not set\n# CONFIG_SND_MTPAV is not set\n# CONFIG_SND_SERIAL_U16550 is not set\n# CONFIG_SND_SERIAL_GENERIC is not set\n# CONFIG_SND_MPU401 is not set\n\n#\n# HD-Audio\n#\n# end of HD-Audio\n\nCONFIG_SND_HDA_PREALLOC_SIZE=64\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=m\nCONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y\n# CONFIG_SND_USB_UA101 is not set\n# CONFIG_SND_USB_CAIAQ is not set\n# CONFIG_SND_USB_6FIRE is not set\n# CONFIG_SND_USB_HIFACE is not set\n# CONFIG_SND_BCD2000 is not set\n# CONFIG_SND_USB_POD is not set\n# CONFIG_SND_USB_PODHD is not set\n# CONFIG_SND_USB_TONEPORT is not set\n# CONFIG_SND_USB_VARIAX is not set\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\n# CONFIG_SND_SOC_ADI is not set\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_AMD_ACP_CONFIG is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_AUDMIX is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_FSL_MICFIL is not set\n# CONFIG_SND_SOC_FSL_XCVR is not set\n# CONFIG_SND_SOC_FSL_RPMSG is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n#\n# Allwinner SoC Audio support\n#\nCONFIG_SND_SUN4I_CODEC=y\nCONFIG_SND_SUN8I_CODEC=y\nCONFIG_SND_SUN8I_CODEC_ANALOG=y\nCONFIG_SND_SUN50I_CODEC_ANALOG=y\nCONFIG_SND_SUN4I_I2S=y\nCONFIG_SND_SUN4I_SPDIF=y\nCONFIG_SND_SUN50I_DMIC=y\nCONFIG_SND_SUN8I_ADDA_PR_REGMAP=y\n# end of Allwinner SoC Audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_SPI is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\n# CONFIG_SND_SOC_ADAU7002 is not set\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4375 is not set\n# CONFIG_SND_SOC_AK4458 is not set\n# CONFIG_SND_SOC_AK4554 is not set\nCONFIG_SND_SOC_AK4613=m\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_AW8738 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS35L41_SPI is not set\n# CONFIG_SND_SOC_CS35L41_I2C is not set\n# CONFIG_SND_SOC_CS35L45_SPI is not set\n# CONFIG_SND_SOC_CS35L45_I2C is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS42L83 is not set\n# CONFIG_SND_SOC_CS4234 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\n# CONFIG_SND_SOC_DA7213 is not set\n# CONFIG_SND_SOC_DMIC is not set\nCONFIG_SND_SOC_HDMI_CODEC=y\n# CONFIG_SND_SOC_ES7134 is not set\n# CONFIG_SND_SOC_ES7241 is not set\n# CONFIG_SND_SOC_ES8316 is not set\n# CONFIG_SND_SOC_ES8326 is not set\n# CONFIG_SND_SOC_ES8328_I2C is not set\n# CONFIG_SND_SOC_ES8328_SPI is not set\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_HDA is not set\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\n# CONFIG_SND_SOC_MAX98088 is not set\n# CONFIG_SND_SOC_MAX98357A is not set\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98520 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX98396 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM179X_SPI is not set\n# CONFIG_SND_SOC_PCM186X_I2C is not set\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3060_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\n# CONFIG_SND_SOC_PCM5102A is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK3328 is not set\n# CONFIG_SND_SOC_RK817 is not set\n# CONFIG_SND_SOC_RT5616 is not set\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\n# CONFIG_SND_SOC_RT5659 is not set\n# CONFIG_SND_SOC_RT9120 is not set\n# CONFIG_SND_SOC_SGTL5000 is not set\n# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\nCONFIG_SND_SOC_SPDIF=y\n# CONFIG_SND_SOC_SRC4XXX_I2C is not set\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS2780 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805M is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320ADC3XXX is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731_I2C is not set\n# CONFIG_SND_SOC_WM8731_SPI is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8940 is not set\n# CONFIG_SND_SOC_WM8960 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_ZL38060 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8821 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\n# end of CODEC drivers\n\nCONFIG_SND_SIMPLE_CARD_UTILS=y\nCONFIG_SND_SIMPLE_CARD=y\nCONFIG_SND_AUDIO_GRAPH_CARD=y\n# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set\n# CONFIG_SND_TEST_COMPONENT is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\n# CONFIG_HID_APPLEIR is not set\nCONFIG_HID_ASUS=m\nCONFIG_HID_AUREAL=m\n# CONFIG_HID_BELKIN is not set\n# CONFIG_HID_BETOP_FF is not set\nCONFIG_HID_BIGBEN_FF=m\nCONFIG_HID_CHERRY=y\nCONFIG_HID_CHICONY=y\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\nCONFIG_HID_CYPRESS=y\nCONFIG_HID_DRAGONRISE=m\nCONFIG_DRAGONRISE_FF=y\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\nCONFIG_HID_EZKEY=y\n# CONFIG_HID_FT260 is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\nCONFIG_HID_GLORIOUS=m\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\nCONFIG_HID_KYE=m\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_VRC2 is not set\n# CONFIG_HID_XIAOMI is not set\nCONFIG_HID_GYRATION=m\n# CONFIG_HID_ICADE is not set\nCONFIG_HID_ITE=y\n# CONFIG_HID_JABRA is not set\nCONFIG_HID_TWINHAN=m\nCONFIG_HID_KENSINGTON=y\n# CONFIG_HID_LCPOWER is not set\n# CONFIG_HID_LED is not set\n# CONFIG_HID_LENOVO is not set\n# CONFIG_HID_LETSKETCH is not set\nCONFIG_HID_LOGITECH=y\n# CONFIG_HID_LOGITECH_DJ is not set\nCONFIG_HID_LOGITECH_HIDPP=m\nCONFIG_LOGITECH_FF=y\nCONFIG_LOGIRUMBLEPAD2_FF=y\nCONFIG_LOGIG940_FF=y\nCONFIG_LOGIWHEELS_FF=y\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_MEGAWORLD_FF is not set\n# CONFIG_HID_REDRAGON is not set\nCONFIG_HID_MICROSOFT=y\nCONFIG_HID_MONTEREY=y\nCONFIG_HID_MULTITOUCH=m\nCONFIG_HID_NINTENDO=m\nCONFIG_NINTENDO_FF=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\nCONFIG_HID_ORTEK=m\nCONFIG_HID_OUYA=m\nCONFIG_HID_PANTHERLORD=m\nCONFIG_PANTHERLORD_FF=y\nCONFIG_HID_PENMOUNT=m\nCONFIG_HID_PETALYNX=m\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PXRC is not set\n# CONFIG_HID_RAZER is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\nCONFIG_HID_SAMSUNG=m\n# CONFIG_HID_SEMITEK is not set\n# CONFIG_HID_SIGMAMICRO is not set\nCONFIG_HID_SONY=m\nCONFIG_SONY_FF=y\n# CONFIG_HID_SPEEDLINK is not set\nCONFIG_HID_STEAM=m\n# CONFIG_HID_STEELSERIES is not set\nCONFIG_HID_SUNPLUS=m\nCONFIG_HID_RMI=m\n# CONFIG_HID_GREENASIA is not set\nCONFIG_HID_SMARTJOYPLUS=m\nCONFIG_SMARTJOYPLUS_FF=y\nCONFIG_HID_TIVO=m\nCONFIG_HID_TOPSEED=m\n# CONFIG_HID_TOPRE is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\nCONFIG_HID_WIIMOTE=m\nCONFIG_HID_XINMO=m\n# CONFIG_HID_ZEROPLUS is not set\nCONFIG_HID_ZYDACRON=m\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n# end of USB HID support\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID_OF is not set\n# CONFIG_I2C_HID_OF_ELAN is not set\n# CONFIG_I2C_HID_OF_GOODIX is not set\n# end of I2C HID support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\nCONFIG_USB_ULPI_BUS=y\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\n# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\nCONFIG_USB_OTG=y\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set\n# CONFIG_USB_OTG_FSM is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\n# CONFIG_USB_MON is not set\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\n# CONFIG_USB_XHCI_DBGCAP is not set\n# CONFIG_USB_XHCI_PCI_RENESAS is not set\nCONFIG_USB_XHCI_PLATFORM=y\nCONFIG_USB_EHCI_HCD=y\nCONFIG_USB_EHCI_ROOT_HUB_TT=y\nCONFIG_USB_EHCI_TT_NEWSCHED=y\n# CONFIG_USB_EHCI_FSL is not set\nCONFIG_USB_EHCI_HCD_PLATFORM=y\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\nCONFIG_USB_OHCI_HCD=y\nCONFIG_USB_OHCI_HCD_PLATFORM=y\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=m\n# CONFIG_USB_PRINTER is not set\n# CONFIG_USB_WDM is not set\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\nCONFIG_USB_UAS=y\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\nCONFIG_USB_MUSB_HDRC=y\n# CONFIG_USB_MUSB_HOST is not set\n# CONFIG_USB_MUSB_GADGET is not set\nCONFIG_USB_MUSB_DUAL_ROLE=y\n\n#\n# Platform Glue Layer\n#\nCONFIG_USB_MUSB_SUNXI=y\n\n#\n# MUSB DMA mode\n#\n# CONFIG_MUSB_PIO_ONLY is not set\nCONFIG_USB_DWC3=y\n# CONFIG_USB_DWC3_ULPI is not set\n# CONFIG_USB_DWC3_HOST is not set\n# CONFIG_USB_DWC3_GADGET is not set\nCONFIG_USB_DWC3_DUAL_ROLE=y\n\n#\n# Platform Glue Driver Support\n#\nCONFIG_USB_DWC3_OF_SIMPLE=y\nCONFIG_USB_DWC2=y\n# CONFIG_USB_DWC2_HOST is not set\n\n#\n# Gadget/Dual-role mode requires USB Gadget support to be enabled\n#\n# CONFIG_USB_DWC2_PERIPHERAL is not set\nCONFIG_USB_DWC2_DUAL_ROLE=y\n# CONFIG_USB_DWC2_DEBUG is not set\n# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set\nCONFIG_USB_CHIPIDEA=y\nCONFIG_USB_CHIPIDEA_UDC=y\nCONFIG_USB_CHIPIDEA_HOST=y\nCONFIG_USB_CHIPIDEA_MSM=y\nCONFIG_USB_CHIPIDEA_IMX=y\nCONFIG_USB_CHIPIDEA_GENERIC=y\nCONFIG_USB_CHIPIDEA_TEGRA=y\nCONFIG_USB_ISP1760=y\nCONFIG_USB_ISP1760_HCD=y\nCONFIG_USB_ISP1761_UDC=y\n# CONFIG_USB_ISP1760_HOST_ROLE is not set\n# CONFIG_USB_ISP1760_GADGET_ROLE is not set\nCONFIG_USB_ISP1760_DUAL_ROLE=y\n\n#\n# USB port drivers\n#\n# CONFIG_USB_SERIAL is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\n# CONFIG_USB_EZUSB_FX2 is not set\n# CONFIG_USB_HUB_USB251XB is not set\nCONFIG_USB_HSIC_USB3503=y\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n# CONFIG_USB_ONBOARD_HUB is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\nCONFIG_NOP_USB_XCEIV=y\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\nCONFIG_USB_ULPI=y\nCONFIG_USB_ULPI_VIEWPORT=y\n# end of USB Physical Layer drivers\n\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\n# CONFIG_USB_GADGET_DEBUG_FILES is not set\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=2\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\nCONFIG_USB_SNP_CORE=y\nCONFIG_USB_SNP_UDC_PLAT=y\n# CONFIG_USB_M66592 is not set\nCONFIG_USB_BDC_UDC=y\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_GADGET_XILINX is not set\n# CONFIG_USB_MAX3420_UDC is not set\n# CONFIG_USB_DUMMY_HCD is not set\n# end of USB Peripheral Controller\n\n# CONFIG_USB_CONFIGFS is not set\n\n#\n# USB Gadget precomposed configurations\n#\n# CONFIG_USB_ZERO is not set\n# CONFIG_USB_AUDIO is not set\n# CONFIG_USB_ETH is not set\n# CONFIG_USB_G_NCM is not set\n# CONFIG_USB_GADGETFS is not set\n# CONFIG_USB_FUNCTIONFS is not set\n# CONFIG_USB_MASS_STORAGE is not set\n# CONFIG_USB_G_SERIAL is not set\n# CONFIG_USB_MIDI_GADGET is not set\n# CONFIG_USB_G_PRINTER is not set\n# CONFIG_USB_CDC_COMPOSITE is not set\n# CONFIG_USB_G_ACM_MS is not set\n# CONFIG_USB_G_MULTI is not set\n# CONFIG_USB_G_HID is not set\n# CONFIG_USB_G_DBGP is not set\n# CONFIG_USB_G_WEBCAM is not set\n# CONFIG_USB_RAW_GADGET is not set\n# end of USB Gadget precomposed configurations\n\n# CONFIG_TYPEC is not set\nCONFIG_USB_ROLE_SWITCH=y\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\n# CONFIG_PWRSEQ_SD8787 is not set\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_DEBUG is not set\nCONFIG_MMC_ARMMMCI=y\nCONFIG_MMC_STM32_SDMMC=y\nCONFIG_MMC_SDHCI=y\nCONFIG_MMC_SDHCI_PLTFM=y\nCONFIG_MMC_SDHCI_OF_ARASAN=y\n# CONFIG_MMC_SDHCI_OF_AT91 is not set\n# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set\nCONFIG_MMC_SDHCI_CADENCE=y\nCONFIG_MMC_SDHCI_F_SDH30=y\n# CONFIG_MMC_SDHCI_MILBEAUT is not set\nCONFIG_MMC_SPI=y\nCONFIG_MMC_DW=y\nCONFIG_MMC_DW_PLTFM=y\n# CONFIG_MMC_DW_BLUEFIELD is not set\nCONFIG_MMC_DW_EXYNOS=y\nCONFIG_MMC_DW_HI3798CV200=y\nCONFIG_MMC_DW_K3=y\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_SUNXI=y\nCONFIG_MMC_CQHCI=y\n# CONFIG_MMC_HSQ is not set\n# CONFIG_MMC_MTK is not set\nCONFIG_MMC_SDHCI_XENON=y\n# CONFIG_MMC_SDHCI_OMAP is not set\n# CONFIG_MMC_SDHCI_AM654 is not set\nCONFIG_SCSI_UFSHCD=m\n# CONFIG_SCSI_UFS_BSG is not set\n# CONFIG_SCSI_UFS_HPB is not set\n# CONFIG_SCSI_UFS_HWMON is not set\nCONFIG_SCSI_UFSHCD_PLATFORM=m\n# CONFIG_SCSI_UFS_CDNS_PLATFORM is not set\n# CONFIG_SCSI_UFS_DWC_TC_PLATFORM is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\n# CONFIG_LEDS_CLASS_FLASH is not set\n# CONFIG_LEDS_CLASS_MULTICOLOR is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AN30259A is not set\n# CONFIG_LEDS_AW2013 is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_EL15203000 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_LP55XX_COMMON is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\nCONFIG_LEDS_PWM=y\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\nCONFIG_LEDS_SYSCON=y\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_SPI_BYTE is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\n\n#\n# RGB LED drivers\n#\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\n# CONFIG_LEDS_TRIGGER_TIMER is not set\n# CONFIG_LEDS_TRIGGER_ONESHOT is not set\nCONFIG_LEDS_TRIGGER_DISK=y\n# CONFIG_LEDS_TRIGGER_MTD is not set\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\n# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set\nCONFIG_LEDS_TRIGGER_CPU=y\n# CONFIG_LEDS_TRIGGER_ACTIVITY is not set\n# CONFIG_LEDS_TRIGGER_GPIO is not set\nCONFIG_LEDS_TRIGGER_DEFAULT_ON=y\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\n# CONFIG_LEDS_TRIGGER_TRANSIENT is not set\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\nCONFIG_LEDS_TRIGGER_PANIC=y\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\n# CONFIG_LEDS_TRIGGER_AUDIO is not set\n# CONFIG_LEDS_TRIGGER_TTY is not set\n\n#\n# Simple LED drivers\n#\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_SUPPORT=y\n# CONFIG_EDAC is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_HYM8563 is not set\n# CONFIG_RTC_DRV_MAX6900 is not set\nCONFIG_RTC_DRV_MAX77686=y\n# CONFIG_RTC_DRV_NCT3018Y is not set\nCONFIG_RTC_DRV_RK808=m\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\n# CONFIG_RTC_DRV_PCF8563 is not set\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\nCONFIG_RTC_DRV_S5M=y\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\nCONFIG_RTC_DRV_DS3232=y\nCONFIG_RTC_DRV_DS3232_HWMON=y\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\nCONFIG_RTC_DRV_PL031=y\nCONFIG_RTC_DRV_SUN6I=y\n# CONFIG_RTC_DRV_CADENCE is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_VIRTUAL_CHANNELS=y\nCONFIG_DMA_OF=y\n# CONFIG_ALTERA_MSGDMA is not set\n# CONFIG_AMBA_PL08X is not set\nCONFIG_BCM_SBA_RAID=m\nCONFIG_DMA_SUN6I=y\n# CONFIG_DW_AXI_DMAC is not set\n# CONFIG_FSL_EDMA is not set\n# CONFIG_FSL_QDMA is not set\n# CONFIG_INTEL_IDMA64 is not set\nCONFIG_MV_XOR_V2=y\nCONFIG_PL330_DMA=y\n# CONFIG_XILINX_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DPDMA is not set\nCONFIG_QCOM_HIDMA_MGMT=y\nCONFIG_QCOM_HIDMA=y\n# CONFIG_DW_DMAC is not set\n# CONFIG_SF_PDMA is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\nCONFIG_DMA_ENGINE_RAID=y\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\n# CONFIG_UDMABUF is not set\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\nCONFIG_DMABUF_HEAPS=y\n# CONFIG_DMABUF_SYSFS_STATS is not set\nCONFIG_DMABUF_HEAPS_SYSTEM=y\nCONFIG_DMABUF_HEAPS_CMA=y\n# end of DMABUF options\n\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\n# CONFIG_VIRTIO_MENU is not set\n# CONFIG_VDPA is not set\n# CONFIG_VHOST_MENU is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# end of Microsoft Hyper-V guest support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_RTLLIB is not set\nCONFIG_RTL8723BS=m\n# CONFIG_R8712U is not set\nCONFIG_R8188EU=m\n# CONFIG_VT6656 is not set\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16240 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7816 is not set\n# end of Analog to digital converters\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n# end of Analog digital bi-direction converters\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n# end of Direct Digital Synthesis\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n# end of Network Analyzer, Impedance Converters\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7854 is not set\n# end of Active energy metering IC\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S1210 is not set\n# end of Resolver to digital converters\n# end of IIO staging drivers\n\nCONFIG_STAGING_MEDIA=y\n# CONFIG_VIDEO_MAX96712 is not set\nCONFIG_VIDEO_SUNXI=y\nCONFIG_VIDEO_SUNXI_CEDRUS=y\nCONFIG_STAGING_MEDIA_DEPRECATED=y\n# CONFIG_VIDEO_CPIA2 is not set\n# CONFIG_VIDEO_STKWEBCAM is not set\nCONFIG_VIDEO_TM6000=m\nCONFIG_VIDEO_TM6000_ALSA=m\nCONFIG_VIDEO_TM6000_DVB=m\n# CONFIG_USB_ZR364XX is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_KS7010 is not set\n# CONFIG_PI433 is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_FIELDBUS_DEV is not set\n# CONFIG_GOLDFISH is not set\n# CONFIG_CHROME_PLATFORMS is not set\n# CONFIG_MELLANOX_PLATFORM is not set\n# CONFIG_SURFACE_PLATFORMS is not set\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Clock driver for ARM Reference designs\n#\n# CONFIG_CLK_ICST is not set\n# CONFIG_CLK_SP810 is not set\n# CONFIG_CLK_VEXPRESS_OSC is not set\n# end of Clock driver for ARM Reference designs\n\n# CONFIG_LMK04832 is not set\n# CONFIG_COMMON_CLK_MAX77686 is not set\n# CONFIG_COMMON_CLK_MAX9485 is not set\n# CONFIG_COMMON_CLK_RK808 is not set\nCONFIG_COMMON_CLK_SCPI=y\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\n# CONFIG_COMMON_CLK_S2MPS11 is not set\n# CONFIG_COMMON_CLK_AXI_CLKGEN is not set\n# CONFIG_COMMON_CLK_XGENE is not set\nCONFIG_COMMON_CLK_PWM=y\n# CONFIG_COMMON_CLK_RS9_PCIE is not set\n# CONFIG_COMMON_CLK_VC5 is not set\n# CONFIG_COMMON_CLK_VC7 is not set\n# CONFIG_COMMON_CLK_FIXED_MMIO is not set\nCONFIG_SUNXI_CCU=y\nCONFIG_SUN50I_A64_CCU=y\n# CONFIG_SUN50I_A100_CCU is not set\n# CONFIG_SUN50I_A100_R_CCU is not set\nCONFIG_SUN50I_H6_CCU=y\nCONFIG_SUN50I_H616_CCU=y\nCONFIG_SUN50I_H6_R_CCU=y\nCONFIG_SUN6I_RTC_CCU=y\nCONFIG_SUN8I_H3_CCU=y\nCONFIG_SUN8I_DE2_CCU=y\nCONFIG_SUN8I_R_CCU=y\n# CONFIG_XILINX_VCU is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\nCONFIG_HWSPINLOCK=y\nCONFIG_HWSPINLOCK_SUN6I=y\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\nCONFIG_CLKSRC_MMIO=y\nCONFIG_SUN4I_TIMER=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y\nCONFIG_FSL_ERRATUM_A008585=y\nCONFIG_HISILICON_ERRATUM_161010101=y\nCONFIG_ARM64_ERRATUM_858921=y\nCONFIG_SUN50I_ERRATUM_UNKNOWN1=y\n# CONFIG_MICROCHIP_PIT64B is not set\n# end of Clock Source drivers\n\nCONFIG_MAILBOX=y\nCONFIG_ARM_MHU=y\n# CONFIG_ARM_MHU_V2 is not set\nCONFIG_PLATFORM_MHU=y\n# CONFIG_PL320_MBOX is not set\n# CONFIG_ALTERA_MBOX is not set\n# CONFIG_MAILBOX_TEST is not set\nCONFIG_SUN6I_MSGBOX=y\nCONFIG_IOMMU_IOVA=y\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\nCONFIG_IOMMU_IO_PGTABLE=y\nCONFIG_IOMMU_IO_PGTABLE_LPAE=y\n# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set\n# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set\n# CONFIG_IOMMU_IO_PGTABLE_DART is not set\n# end of Generic IOMMU Pagetable Support\n\n# CONFIG_IOMMU_DEBUGFS is not set\nCONFIG_IOMMU_DEFAULT_DMA_STRICT=y\n# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set\n# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set\nCONFIG_OF_IOMMU=y\nCONFIG_IOMMU_DMA=y\nCONFIG_SUN50I_IOMMU=y\n# CONFIG_ARM_SMMU is not set\n# CONFIG_ARM_SMMU_V3 is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\nCONFIG_RPMSG=y\n# CONFIG_RPMSG_CHAR is not set\n# CONFIG_RPMSG_CTRL is not set\n# CONFIG_RPMSG_NS is not set\nCONFIG_RPMSG_QCOM_GLINK=y\nCONFIG_RPMSG_QCOM_GLINK_RPM=y\n# CONFIG_RPMSG_VIRTIO is not set\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\nCONFIG_SOC_BRCMSTB=y\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# CONFIG_QUICC_ENGINE is not set\n# CONFIG_FSL_RCPM is not set\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# fujitsu SoC drivers\n#\n# end of fujitsu SoC drivers\n\n#\n# i.MX SoC drivers\n#\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# CONFIG_LITEX_SOC_CONTROLLER is not set\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# end of Qualcomm SoC drivers\n\nCONFIG_SUNXI_MBUS=y\nCONFIG_SUNXI_SRAM=y\nCONFIG_SOC_TI=y\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y\n# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set\n# CONFIG_DEVFREQ_GOV_POWERSAVE is not set\n# CONFIG_DEVFREQ_GOV_USERSPACE is not set\n# CONFIG_DEVFREQ_GOV_PASSIVE is not set\n\n#\n# DEVFREQ Drivers\n#\nCONFIG_ARM_SUN8I_A33_MBUS_DEVFREQ=y\n# CONFIG_PM_DEVFREQ_EVENT is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_FSA9480 is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_PTN5150 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\nCONFIG_EXTCON_USB_GPIO=y\nCONFIG_MEMORY=y\n# CONFIG_ARM_PL172_MPMC is not set\nCONFIG_IIO=y\nCONFIG_IIO_BUFFER=y\n# CONFIG_IIO_BUFFER_CB is not set\n# CONFIG_IIO_BUFFER_DMA is not set\n# CONFIG_IIO_BUFFER_DMAENGINE is not set\n# CONFIG_IIO_BUFFER_HW_CONSUMER is not set\nCONFIG_IIO_KFIFO_BUF=m\n# CONFIG_IIO_TRIGGERED_BUFFER is not set\n# CONFIG_IIO_CONFIGFS is not set\nCONFIG_IIO_TRIGGER=y\nCONFIG_IIO_CONSUMERS_PER_TRIGGER=2\n# CONFIG_IIO_SW_DEVICE is not set\n# CONFIG_IIO_SW_TRIGGER is not set\n# CONFIG_IIO_TRIGGERED_EVENT is not set\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADXL313_I2C is not set\n# CONFIG_ADXL313_SPI is not set\n# CONFIG_ADXL345_I2C is not set\n# CONFIG_ADXL345_SPI is not set\n# CONFIG_ADXL355_I2C is not set\n# CONFIG_ADXL355_SPI is not set\n# CONFIG_ADXL367_SPI is not set\n# CONFIG_ADXL367_I2C is not set\n# CONFIG_ADXL372_SPI is not set\n# CONFIG_ADXL372_I2C is not set\n# CONFIG_BMA180 is not set\n# CONFIG_BMA220 is not set\n# CONFIG_BMA400 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_BMI088_ACCEL is not set\n# CONFIG_DA280 is not set\n# CONFIG_DA311 is not set\n# CONFIG_DMARD06 is not set\n# CONFIG_DMARD09 is not set\n# CONFIG_DMARD10 is not set\n# CONFIG_FXLS8962AF_I2C is not set\n# CONFIG_FXLS8962AF_SPI is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MC3230 is not set\n# CONFIG_MMA7455_I2C is not set\n# CONFIG_MMA7455_SPI is not set\n# CONFIG_MMA7660 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MSA311 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_MXC6255 is not set\n# CONFIG_SCA3000 is not set\n# CONFIG_SCA3300 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7091R5 is not set\n# CONFIG_AD7124 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7266 is not set\n# CONFIG_AD7280 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7292 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7606_IFACE_PARALLEL is not set\n# CONFIG_AD7606_IFACE_SPI is not set\n# CONFIG_AD7766 is not set\n# CONFIG_AD7768_1 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD7949 is not set\n# CONFIG_AD799X is not set\n# CONFIG_ADI_AXI_ADC is not set\n# CONFIG_AXP20X_ADC is not set\n# CONFIG_AXP288_ADC is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_ENVELOPE_DETECTOR is not set\n# CONFIG_HI8435 is not set\n# CONFIG_HX711 is not set\n# CONFIG_INA2XX_ADC is not set\n# CONFIG_LTC2471 is not set\n# CONFIG_LTC2485 is not set\n# CONFIG_LTC2496 is not set\n# CONFIG_LTC2497 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX11100 is not set\n# CONFIG_MAX1118 is not set\n# CONFIG_MAX11205 is not set\n# CONFIG_MAX1241 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MAX9611 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_MCP3911 is not set\n# CONFIG_NAU7802 is not set\n# CONFIG_RICHTEK_RTQ6056 is not set\n# CONFIG_SD_ADC_MODULATOR is not set\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC0832 is not set\n# CONFIG_TI_ADC084S021 is not set\n# CONFIG_TI_ADC12138 is not set\n# CONFIG_TI_ADC108S102 is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_TI_ADC161S626 is not set\n# CONFIG_TI_ADS1015 is not set\n# CONFIG_TI_ADS7950 is not set\n# CONFIG_TI_ADS8344 is not set\n# CONFIG_TI_ADS8688 is not set\n# CONFIG_TI_ADS124S08 is not set\n# CONFIG_TI_ADS131E08 is not set\n# CONFIG_TI_TLC4541 is not set\n# CONFIG_TI_TSC2046 is not set\n# CONFIG_VF610_ADC is not set\n# CONFIG_XILINX_XADC is not set\n# end of Analog to digital converters\n\n#\n# Analog to digital and digital to analog converters\n#\n# CONFIG_AD74413R is not set\n# end of Analog to digital and digital to analog converters\n\n#\n# Analog Front Ends\n#\n# CONFIG_IIO_RESCALE is not set\n# end of Analog Front Ends\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n# CONFIG_ADA4250 is not set\n# CONFIG_HMC425 is not set\n# end of Amplifiers\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7746 is not set\n# end of Capacitance to digital converters\n\n#\n# Chemical Sensors\n#\n# CONFIG_ATLAS_PH_SENSOR is not set\n# CONFIG_ATLAS_EZO_SENSOR is not set\n# CONFIG_BME680 is not set\n# CONFIG_CCS811 is not set\n# CONFIG_IAQCORE is not set\n# CONFIG_PMS7003 is not set\n# CONFIG_SCD30_CORE is not set\n# CONFIG_SCD4X is not set\n# CONFIG_SENSIRION_SGP30 is not set\n# CONFIG_SENSIRION_SGP40 is not set\n# CONFIG_SPS30_I2C is not set\n# CONFIG_SPS30_SERIAL is not set\n# CONFIG_SENSEAIR_SUNRISE_CO2 is not set\n# CONFIG_VZ89X is not set\n# end of Chemical Sensors\n\n#\n# Hid Sensor IIO Common\n#\n# end of Hid Sensor IIO Common\n\n#\n# IIO SCMI Sensors\n#\n# end of IIO SCMI Sensors\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n# end of SSP Sensor Common\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD3552R is not set\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5592R is not set\n# CONFIG_AD5593R is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_LTC2688 is not set\n# CONFIG_AD5686_SPI is not set\n# CONFIG_AD5696_I2C is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5758 is not set\n# CONFIG_AD5761 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5766 is not set\n# CONFIG_AD5770R is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7293 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_AD8801 is not set\n# CONFIG_DPOT_DAC is not set\n# CONFIG_DS4424 is not set\n# CONFIG_LTC1660 is not set\n# CONFIG_LTC2632 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n# CONFIG_TI_DAC082S085 is not set\n# CONFIG_TI_DAC5571 is not set\n# CONFIG_TI_DAC7311 is not set\n# CONFIG_TI_DAC7612 is not set\n# CONFIG_VF610_DAC is not set\n# end of Digital to analog converters\n\n#\n# IIO dummy driver\n#\n# end of IIO dummy driver\n\n#\n# Filters\n#\n# CONFIG_ADMV8818 is not set\n# end of Filters\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n# end of Clock Generator/Distribution\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n# CONFIG_ADF4371 is not set\n# CONFIG_ADMV1013 is not set\n# CONFIG_ADMV1014 is not set\n# CONFIG_ADMV4420 is not set\n# CONFIG_ADRF6780 is not set\n# end of Phase-Locked Loop (PLL) frequency synthesizers\n# end of Frequency Synthesizers DDS/PLL\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS290 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_FXAS21002C is not set\n# CONFIG_MPU3050_I2C is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n# end of Digital gyroscope sensors\n\n#\n# Health Sensors\n#\n\n#\n# Heart Rate Monitors\n#\n# CONFIG_AFE4403 is not set\n# CONFIG_AFE4404 is not set\n# CONFIG_MAX30100 is not set\n# CONFIG_MAX30102 is not set\n# end of Heart Rate Monitors\n# end of Health Sensors\n\n#\n# Humidity sensors\n#\n# CONFIG_AM2315 is not set\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HDC2010 is not set\n# CONFIG_HTS221 is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n# end of Humidity sensors\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16460 is not set\n# CONFIG_ADIS16475 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_BMI160_I2C is not set\n# CONFIG_BMI160_SPI is not set\n# CONFIG_BOSCH_BNO055_SERIAL is not set\n# CONFIG_BOSCH_BNO055_I2C is not set\n# CONFIG_FXOS8700_I2C is not set\n# CONFIG_FXOS8700_SPI is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_ICM42600_I2C is not set\n# CONFIG_INV_ICM42600_SPI is not set\n# CONFIG_INV_MPU6050_I2C is not set\n# CONFIG_INV_MPU6050_SPI is not set\n# CONFIG_IIO_ST_LSM6DSX is not set\n# CONFIG_IIO_ST_LSM9DS0 is not set\n# end of Inertial measurement units\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_ADUX1020 is not set\n# CONFIG_AL3010 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_AS73211 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_BH1780 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM3605 is not set\n# CONFIG_CM36651 is not set\n# CONFIG_GP2AP002 is not set\n# CONFIG_GP2AP020A00F is not set\n# CONFIG_SENSORS_ISL29018 is not set\n# CONFIG_SENSORS_ISL29028 is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_LTRF216A is not set\n# CONFIG_LV0104CS is not set\n# CONFIG_MAX44000 is not set\n# CONFIG_MAX44009 is not set\n# CONFIG_NOA1305 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_SI1133 is not set\n# CONFIG_SI1145 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_ST_UVIS25 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\n# CONFIG_SENSORS_TSL2563 is not set\n# CONFIG_TSL2583 is not set\n# CONFIG_TSL2591 is not set\n# CONFIG_TSL2772 is not set\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VCNL4035 is not set\n# CONFIG_VEML6030 is not set\n# CONFIG_VEML6070 is not set\n# CONFIG_VL6180 is not set\n# CONFIG_ZOPT2201 is not set\n# end of Light sensors\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8974 is not set\n# CONFIG_AK8975 is not set\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN_I2C is not set\n# CONFIG_BMC150_MAGN_SPI is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n# CONFIG_SENSORS_RM3100_I2C is not set\n# CONFIG_SENSORS_RM3100_SPI is not set\n# CONFIG_YAMAHA_YAS530 is not set\n# end of Magnetometer sensors\n\n#\n# Multiplexers\n#\n# CONFIG_IIO_MUX is not set\n# end of Multiplexers\n\n#\n# Inclinometer sensors\n#\n# end of Inclinometer sensors\n\n#\n# Triggers - standalone\n#\n# CONFIG_IIO_INTERRUPT_TRIGGER is not set\n# CONFIG_IIO_SYSFS_TRIGGER is not set\n# end of Triggers - standalone\n\n#\n# Linear and angular position sensors\n#\n# end of Linear and angular position sensors\n\n#\n# Digital potentiometers\n#\n# CONFIG_AD5110 is not set\n# CONFIG_AD5272 is not set\n# CONFIG_DS1803 is not set\n# CONFIG_MAX5432 is not set\n# CONFIG_MAX5481 is not set\n# CONFIG_MAX5487 is not set\n# CONFIG_MCP4018 is not set\n# CONFIG_MCP4131 is not set\n# CONFIG_MCP4531 is not set\n# CONFIG_MCP41010 is not set\n# CONFIG_TPL0102 is not set\n# end of Digital potentiometers\n\n#\n# Digital potentiostats\n#\n# CONFIG_LMP91000 is not set\n# end of Digital potentiostats\n\n#\n# Pressure sensors\n#\n# CONFIG_ABP060MG is not set\n# CONFIG_BMP280 is not set\n# CONFIG_DLHL60D is not set\n# CONFIG_DPS310 is not set\n# CONFIG_HP03 is not set\n# CONFIG_ICP10100 is not set\n# CONFIG_MPL115_I2C is not set\n# CONFIG_MPL115_SPI is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n# CONFIG_HP206C is not set\n# CONFIG_ZPA2326 is not set\n# end of Pressure sensors\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n# end of Lightning sensors\n\n#\n# Proximity and distance sensors\n#\n# CONFIG_ISL29501 is not set\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_MB1232 is not set\n# CONFIG_PING is not set\n# CONFIG_RFD77402 is not set\n# CONFIG_SRF04 is not set\n# CONFIG_SX9310 is not set\n# CONFIG_SX9324 is not set\n# CONFIG_SX9360 is not set\n# CONFIG_SX9500 is not set\n# CONFIG_SRF08 is not set\n# CONFIG_VCNL3020 is not set\n# CONFIG_VL53L0X_I2C is not set\n# end of Proximity and distance sensors\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1200 is not set\n# end of Resolver to digital converters\n\n#\n# Temperature sensors\n#\n# CONFIG_LTC2983 is not set\n# CONFIG_MAXIM_THERMOCOUPLE is not set\n# CONFIG_MLX90614 is not set\n# CONFIG_MLX90632 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TMP007 is not set\n# CONFIG_TMP117 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\n# CONFIG_MAX31856 is not set\n# CONFIG_MAX31865 is not set\n# end of Temperature sensors\n\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_DEBUG is not set\n# CONFIG_PWM_ATMEL_TCB is not set\n# CONFIG_PWM_CLK is not set\n# CONFIG_PWM_FSL_FTM is not set\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_PWM_SUN4I=y\n# CONFIG_PWM_XILINX is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\nCONFIG_ARM_GIC_V3=y\nCONFIG_ARM_GIC_V3_ITS=y\n# CONFIG_AL_FIC is not set\nCONFIG_SUN6I_R_INTC=y\nCONFIG_SUNXI_NMI_INTC=y\n# CONFIG_XILINX_INTC is not set\nCONFIG_PARTITION_PERCPU=y\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\nCONFIG_ARCH_HAS_RESET_CONTROLLER=y\nCONFIG_RESET_CONTROLLER=y\nCONFIG_RESET_SIMPLE=y\nCONFIG_RESET_SUNXI=y\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_RESET_TI_TPS380X is not set\n\n#\n# PHY Subsystem\n#\nCONFIG_GENERIC_PHY=y\nCONFIG_PHY_XGENE=y\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\nCONFIG_PHY_SUN4I_USB=y\n# CONFIG_PHY_SUN6I_MIPI_DPHY is not set\n# CONFIG_PHY_SUN9I_USB is not set\nCONFIG_PHY_SUN50I_USB3=y\n\n#\n# PHY drivers for Broadcom platforms\n#\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# end of PHY drivers for Broadcom platforms\n\n# CONFIG_PHY_CADENCE_TORRENT is not set\n# CONFIG_PHY_CADENCE_DPHY is not set\n# CONFIG_PHY_CADENCE_DPHY_RX is not set\n# CONFIG_PHY_CADENCE_SIERRA is not set\n# CONFIG_PHY_CADENCE_SALVO is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_LAN966X_SERDES is not set\n# CONFIG_PHY_CPCAP_USB is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\n# CONFIG_PHY_OCELOT_SERDES is not set\nCONFIG_PHY_QCOM_USB_HS=y\n# CONFIG_PHY_QCOM_USB_HSIC is not set\nCONFIG_PHY_SAMSUNG_USB2=y\n# CONFIG_PHY_TUSB1210 is not set\n# end of PHY Subsystem\n\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\n# CONFIG_ARM_CMN is not set\nCONFIG_ARM_PMU=y\n# CONFIG_ARM_DSU_PMU is not set\n# CONFIG_ARM_SPE_PMU is not set\n# end of Performance monitor support\n\nCONFIG_RAS=y\n\n#\n# Android\n#\n# CONFIG_ANDROID_BINDER_IPC is not set\n# end of Android\n\n# CONFIG_LIBNVDIMM is not set\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\n# CONFIG_NVMEM_RMEM is not set\nCONFIG_NVMEM_SUNXI_SID=y\nCONFIG_NVMEM_U_BOOT_ENV=y\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\n# CONFIG_TEE is not set\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\n# CONFIG_PECI is not set\n# CONFIG_HTE is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_VALIDATE_FS_PARSER=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\n# CONFIG_REISERFS_FS is not set\n# CONFIG_JFS_FS is not set\nCONFIG_XFS_FS=m\nCONFIG_XFS_SUPPORT_V4=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\nCONFIG_F2FS_FS=m\nCONFIG_F2FS_STAT_FS=y\nCONFIG_F2FS_FS_XATTR=y\nCONFIG_F2FS_FS_POSIX_ACL=y\n# CONFIG_F2FS_FS_SECURITY is not set\n# CONFIG_F2FS_CHECK_FS is not set\n# CONFIG_F2FS_FAULT_INJECTION is not set\nCONFIG_F2FS_FS_COMPRESSION=y\nCONFIG_F2FS_FS_LZO=y\nCONFIG_F2FS_FS_LZORLE=y\nCONFIG_F2FS_FS_LZ4=y\nCONFIG_F2FS_FS_LZ4HC=y\nCONFIG_F2FS_FS_ZSTD=y\nCONFIG_F2FS_IOSTAT=y\n# CONFIG_F2FS_UNFAIR_RWSEM is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\nCONFIG_FANOTIFY_ACCESS_PERMISSIONS=y\nCONFIG_QUOTA=y\n# CONFIG_QUOTA_NETLINK_INTERFACE is not set\nCONFIG_PRINT_QUOTA_WARNING=y\n# CONFIG_QUOTA_DEBUG is not set\n# CONFIG_QFMT_V1 is not set\n# CONFIG_QFMT_V2 is not set\nCONFIG_QUOTACTL=y\nCONFIG_AUTOFS4_FS=y\nCONFIG_AUTOFS_FS=y\nCONFIG_FUSE_FS=m\nCONFIG_CUSE=m\n# CONFIG_VIRTIO_FS is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_XINO_AUTO is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n\n#\n# Caches\n#\n# CONFIG_FSCACHE is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=y\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=m\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=m\n# CONFIG_NTFS3_64BIT_CLUSTER is not set\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\n# CONFIG_PROC_KCORE is not set\nCONFIG_PROC_VMCORE=y\n# CONFIG_PROC_VMCORE_DEVICE_DUMP is not set\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_TMPFS_INODE64 is not set\nCONFIG_ARCH_SUPPORTS_HUGETLBFS=y\n# CONFIG_HUGETLBFS is not set\nCONFIG_MEMFD_CREATE=y\nCONFIG_ARCH_HAS_GIGANTIC_PAGE=y\nCONFIG_CONFIGFS_FS=y\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\n# CONFIG_HFS_FS is not set\n# CONFIG_HFSPLUS_FS is not set\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_JFFS2_FS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\n# CONFIG_SQUASHFS_FILE_CACHE is not set\nCONFIG_SQUASHFS_FILE_DIRECT=y\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\nCONFIG_SQUASHFS_XATTR=y\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\nCONFIG_PSTORE=y\nCONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240\nCONFIG_PSTORE_DEFLATE_COMPRESS=y\n# CONFIG_PSTORE_LZO_COMPRESS is not set\n# CONFIG_PSTORE_LZ4_COMPRESS is not set\n# CONFIG_PSTORE_LZ4HC_COMPRESS is not set\n# CONFIG_PSTORE_842_COMPRESS is not set\n# CONFIG_PSTORE_ZSTD_COMPRESS is not set\nCONFIG_PSTORE_COMPRESS=y\nCONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y\nCONFIG_PSTORE_COMPRESS_DEFAULT=\"deflate\"\n# CONFIG_PSTORE_CONSOLE is not set\n# CONFIG_PSTORE_PMSG is not set\n# CONFIG_PSTORE_RAM is not set\n# CONFIG_PSTORE_BLK is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EROFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\n# CONFIG_NFS_SWAP is not set\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\n# CONFIG_NFS_V4_1_MIGRATION is not set\nCONFIG_NFS_V4_SECURITY_LABEL=y\nCONFIG_ROOT_NFS=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFS_DISABLE_UDP_SUPPORT=y\n# CONFIG_NFS_V4_2_READ_PLUS is not set\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_COMMON=y\nCONFIG_NFS_V4_2_SSC_HELPER=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS2=y\nCONFIG_CIFS_ALLOW_INSECURE_LEGACY=y\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\nCONFIG_CIFS_DEBUG=y\n# CONFIG_CIFS_DEBUG2 is not set\n# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\n# CONFIG_CIFS_SWN_UPCALL is not set\n# CONFIG_CIFS_ROOT is not set\n# CONFIG_SMB_SERVER is not set\nCONFIG_SMBFS=y\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_KEYS_REQUEST_CACHE is not set\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_BIG_KEYS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\nCONFIG_KEY_DH_OPERATIONS=y\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\nCONFIG_SECURITY=y\nCONFIG_SECURITYFS=y\n# CONFIG_SECURITY_NETWORK is not set\n# CONFIG_SECURITY_PATH is not set\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\n# CONFIG_SECURITY_SMACK is not set\n# CONFIG_SECURITY_TOMOYO is not set\n# CONFIG_SECURITY_APPARMOR is not set\n# CONFIG_SECURITY_LOADPIN is not set\n# CONFIG_SECURITY_YAMA is not set\n# CONFIG_SECURITY_SAFESETID is not set\n# CONFIG_SECURITY_LOCKDOWN_LSM is not set\n# CONFIG_SECURITY_LANDLOCK is not set\nCONFIG_INTEGRITY=y\n# CONFIG_INTEGRITY_SIGNATURE is not set\n# CONFIG_IMA is not set\n# CONFIG_EVM is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_LSM=\"yama,loadpin,safesetid,integrity\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n\nCONFIG_RANDSTRUCT_NONE=y\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=m\nCONFIG_ASYNC_TX_DISABLE_PQ_VAL_DMA=y\nCONFIG_ASYNC_TX_DISABLE_XOR_VAL_DMA=y\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_CRYPTD=y\nCONFIG_CRYPTO_AUTHENC=y\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_ENGINE=y\n# end of Crypto core or helper\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_DH=y\n# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set\nCONFIG_CRYPTO_ECC=m\nCONFIG_CRYPTO_ECDH=m\n# CONFIG_CRYPTO_ECDSA is not set\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\n# CONFIG_CRYPTO_CURVE25519 is not set\n# end of Public-key cryptography\n\n#\n# Block ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\n# CONFIG_CRYPTO_ARIA is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\nCONFIG_CRYPTO_SM4=y\n# CONFIG_CRYPTO_SM4_GENERIC is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n# end of Block ciphers\n\n#\n# Length-preserving ciphers and modes\n#\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_ARC4 is not set\nCONFIG_CRYPTO_CHACHA20=m\nCONFIG_CRYPTO_CBC=y\n# CONFIG_CRYPTO_CFB is not set\nCONFIG_CRYPTO_CTR=y\n# CONFIG_CRYPTO_CTS is not set\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_HCTR2 is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_OFB is not set\n# CONFIG_CRYPTO_PCBC is not set\n# CONFIG_CRYPTO_XTS is not set\nCONFIG_CRYPTO_NHPOLY1305=y\n# end of Length-preserving ciphers and modes\n\n#\n# AEAD (authenticated encryption with associated data) ciphers\n#\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\n# CONFIG_CRYPTO_ESSIV is not set\n# end of AEAD (authenticated encryption with associated data) ciphers\n\n#\n# Hashes, digests, and MACs\n#\nCONFIG_CRYPTO_BLAKE2B=m\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\nCONFIG_CRYPTO_POLYVAL=y\n# CONFIG_CRYPTO_POLY1305 is not set\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\nCONFIG_CRYPTO_SHA3=m\nCONFIG_CRYPTO_SM3=y\nCONFIG_CRYPTO_SM3_GENERIC=m\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_VMAC is not set\n# CONFIG_CRYPTO_WP512 is not set\n# CONFIG_CRYPTO_XCBC is not set\nCONFIG_CRYPTO_XXHASH=m\n# end of Hashes, digests, and MACs\n\n#\n# CRCs (cyclic redundancy checks)\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=m\nCONFIG_CRYPTO_CRCT10DIF=y\nCONFIG_CRYPTO_CRC64_ROCKSOFT=y\n# end of CRCs (cyclic redundancy checks)\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=y\n# CONFIG_CRYPTO_LZO is not set\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n# end of Compression\n\n#\n# Random number generation\n#\nCONFIG_CRYPTO_ANSI_CPRNG=y\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_KDF800108_CTR=y\n# end of Random number generation\n\n#\n# Userspace interface\n#\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\nCONFIG_CRYPTO_USER_API_AEAD=y\nCONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y\n# end of Userspace interface\n\nCONFIG_CRYPTO_HASH_INFO=y\nCONFIG_CRYPTO_NHPOLY1305_NEON=y\nCONFIG_CRYPTO_CHACHA20_NEON=y\n\n#\n# Accelerated Cryptographic Algorithms for CPU (arm64)\n#\nCONFIG_CRYPTO_GHASH_ARM64_CE=y\nCONFIG_CRYPTO_POLY1305_NEON=y\nCONFIG_CRYPTO_SHA1_ARM64_CE=y\nCONFIG_CRYPTO_SHA256_ARM64=y\nCONFIG_CRYPTO_SHA2_ARM64_CE=y\nCONFIG_CRYPTO_SHA512_ARM64=y\nCONFIG_CRYPTO_SHA512_ARM64_CE=y\n# CONFIG_CRYPTO_SHA3_ARM64 is not set\nCONFIG_CRYPTO_SM3_NEON=y\n# CONFIG_CRYPTO_SM3_ARM64_CE is not set\nCONFIG_CRYPTO_POLYVAL_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64=y\nCONFIG_CRYPTO_AES_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64_CE_BLK=y\nCONFIG_CRYPTO_AES_ARM64_NEON_BLK=y\nCONFIG_CRYPTO_AES_ARM64_BS=y\n# CONFIG_CRYPTO_SM4_ARM64_CE is not set\nCONFIG_CRYPTO_SM4_ARM64_CE_BLK=y\nCONFIG_CRYPTO_SM4_ARM64_NEON_BLK=y\nCONFIG_CRYPTO_AES_ARM64_CE_CCM=y\nCONFIG_CRYPTO_CRCT10DIF_ARM64_CE=y\n# end of Accelerated Cryptographic Algorithms for CPU (arm64)\n\nCONFIG_CRYPTO_HW=y\nCONFIG_CRYPTO_DEV_ALLWINNER=y\n# CONFIG_CRYPTO_DEV_SUN4I_SS is not set\nCONFIG_CRYPTO_DEV_SUN8I_CE=y\n# CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG is not set\nCONFIG_CRYPTO_DEV_SUN8I_CE_HASH=y\nCONFIG_CRYPTO_DEV_SUN8I_CE_PRNG=y\nCONFIG_CRYPTO_DEV_SUN8I_CE_TRNG=y\nCONFIG_CRYPTO_DEV_SUN8I_SS=y\n# CONFIG_CRYPTO_DEV_SUN8I_SS_DEBUG is not set\nCONFIG_CRYPTO_DEV_SUN8I_SS_PRNG=y\nCONFIG_CRYPTO_DEV_SUN8I_SS_HASH=y\n# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set\n# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set\n# CONFIG_CRYPTO_DEV_CCP is not set\n# CONFIG_CRYPTO_DEV_SAFEXCEL is not set\n# CONFIG_CRYPTO_DEV_CCREE is not set\n# CONFIG_CRYPTO_DEV_HISI_SEC is not set\n# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n# CONFIG_FIPS_SIGNATURE_SELFTEST is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\nCONFIG_RAID6_PQ_BENCHMARK=y\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\n# CONFIG_CORDIC is not set\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_ARCH_HAS_FAST_MULTIPLIER=y\nCONFIG_ARCH_USE_SYM_ANNOTATIONS=y\nCONFIG_INDIRECT_PIO=y\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_UTILS=y\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=m\nCONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CHACHA_GENERIC=y\nCONFIG_CRYPTO_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=y\nCONFIG_CRYPTO_LIB_CURVE25519=y\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_POLY1305_GENERIC=y\nCONFIG_CRYPTO_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=y\nCONFIG_CRYPTO_LIB_SHA1=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_CRC_CCITT=m\nCONFIG_CRC16=y\nCONFIG_CRC_T10DIF=y\nCONFIG_CRC64_ROCKSOFT=y\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\nCONFIG_CRC64=y\n# CONFIG_CRC4 is not set\nCONFIG_CRC7=y\nCONFIG_LIBCRC32C=m\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=y\nCONFIG_AUDIT_ARCH_COMPAT_GENERIC=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=y\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_COMPRESS=m\nCONFIG_LZ4HC_COMPRESS=m\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMMON=y\nCONFIG_ZSTD_COMPRESS=m\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\nCONFIG_XZ_DEC_X86=y\nCONFIG_XZ_DEC_POWERPC=y\nCONFIG_XZ_DEC_IA64=y\nCONFIG_XZ_DEC_ARM=y\nCONFIG_XZ_DEC_ARMTHUMB=y\nCONFIG_XZ_DEC_SPARC=y\n# CONFIG_XZ_DEC_MICROLZMA is not set\nCONFIG_XZ_DEC_BCJ=y\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_LZ4=y\nCONFIG_DECOMPRESS_ZSTD=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_DMA=y\nCONFIG_DMA_OPS=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_DMA_DECLARE_COHERENT=y\nCONFIG_ARCH_HAS_SETUP_DMA_OPS=y\nCONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y\nCONFIG_ARCH_HAS_DMA_PREP_COHERENT=y\nCONFIG_SWIOTLB=y\n# CONFIG_DMA_RESTRICTED_POOL is not set\nCONFIG_DMA_NONCOHERENT_MMAP=y\nCONFIG_DMA_COHERENT_POOL=y\nCONFIG_DMA_DIRECT_REMAP=y\nCONFIG_DMA_CMA=y\nCONFIG_DMA_PERNUMA_CMA=y\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=384\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\n# CONFIG_FORCE_NR_CPUS is not set\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_GENERIC_VDSO_TIME_NS=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\nCONFIG_SG_POOL=y\nCONFIG_ARCH_STACKWALK=y\nCONFIG_STACKDEPOT=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_GENERIC_IOREMAP=y\nCONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\n# CONFIG_STACKTRACE_BUILD_ID is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\n# CONFIG_DYNAMIC_DEBUG is not set\n# CONFIG_DYNAMIC_DEBUG_CORE is not set\nCONFIG_SYMBOLIC_ERRNAME=y\nCONFIG_DEBUG_BUGVERBOSE=y\n# end of printk and dmesg options\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_DEBUG_INFO=y\nCONFIG_AS_HAS_NON_CONST_LEB128=y\n# CONFIG_DEBUG_INFO_NONE is not set\nCONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\n# CONFIG_DEBUG_INFO_REDUCED is not set\n# CONFIG_DEBUG_INFO_COMPRESSED is not set\n# CONFIG_DEBUG_INFO_SPLIT is not set\n# CONFIG_DEBUG_INFO_BTF is not set\n# CONFIG_GDB_SCRIPTS is not set\nCONFIG_FRAME_WARN=2048\n# CONFIG_STRIP_ASM_SYMS is not set\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\n# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B is not set\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_VMLINUX_MAP is not set\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=\"\"\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\nCONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_ARCH_KCSAN=y\nCONFIG_HAVE_KCSAN_COMPILER=y\n# CONFIG_KCSAN is not set\n# end of Generic Kernel Debugging Instruments\n\n#\n# Networking Debugging\n#\n# CONFIG_NET_DEV_REFCNT_TRACKER is not set\n# CONFIG_NET_NS_REFCNT_TRACKER is not set\n# CONFIG_DEBUG_NET is not set\n# end of Networking Debugging\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_TABLE_CHECK is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\nCONFIG_ARCH_HAS_DEBUG_WX=y\n# CONFIG_DEBUG_WX is not set\nCONFIG_GENERIC_PTDUMP=y\n# CONFIG_PTDUMP_DEBUGFS is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SHRINKER_DEBUG is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\nCONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y\n# CONFIG_DEBUG_VM is not set\n# CONFIG_DEBUG_VM_PGTABLE is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\nCONFIG_DEBUG_MEMORY_INIT=y\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_SW_TAGS=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_KASAN_SW_TAGS=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\n# CONFIG_SOFTLOCKUP_DETECTOR is not set\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\n# CONFIG_SCHED_DEBUG is not set\nCONFIG_SCHED_INFO=y\n# CONFIG_SCHEDSTATS is not set\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\n# CONFIG_DEBUG_PREEMPT is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_RWSEMS is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# CONFIG_CSD_LOCK_WAIT_DEBUG is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_DEBUG_MAPLE_TREE is not set\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\nCONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACING_SUPPORT=y\n# CONFIG_FTRACE is not set\n# CONFIG_SAMPLES is not set\nCONFIG_STRICT_DEVMEM=y\n# CONFIG_IO_STRICT_DEVMEM is not set\n\n#\n# arm64 Debugging\n#\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_ARM64_RELOC_TEST is not set\n# CONFIG_CORESIGHT is not set\n# end of arm64 Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\nCONFIG_RUNTIME_TESTING_MENU=y\n# CONFIG_LKDTM is not set\n# CONFIG_TEST_MIN_HEAP is not set\n# CONFIG_TEST_DIV64 is not set\n# CONFIG_BACKTRACE_SELF_TEST is not set\n# CONFIG_TEST_REF_TRACKER is not set\n# CONFIG_RBTREE_TEST is not set\n# CONFIG_REED_SOLOMON_TEST is not set\n# CONFIG_INTERVAL_TREE_TEST is not set\n# CONFIG_PERCPU_TEST is not set\n# CONFIG_ATOMIC64_SELFTEST is not set\n# CONFIG_TEST_HEXDUMP is not set\n# CONFIG_STRING_SELFTEST is not set\n# CONFIG_TEST_STRING_HELPERS is not set\n# CONFIG_TEST_STRSCPY is not set\n# CONFIG_TEST_KSTRTOX is not set\n# CONFIG_TEST_PRINTF is not set\n# CONFIG_TEST_SCANF is not set\n# CONFIG_TEST_BITMAP is not set\n# CONFIG_TEST_UUID is not set\n# CONFIG_TEST_XARRAY is not set\n# CONFIG_TEST_MAPLE_TREE is not set\n# CONFIG_TEST_RHASHTABLE is not set\n# CONFIG_TEST_SIPHASH is not set\n# CONFIG_TEST_IDA is not set\n# CONFIG_TEST_LKM is not set\n# CONFIG_TEST_BITOPS is not set\n# CONFIG_TEST_VMALLOC is not set\n# CONFIG_TEST_USER_COPY is not set\n# CONFIG_TEST_BPF is not set\n# CONFIG_TEST_BLACKHOLE_DEV is not set\n# CONFIG_FIND_BIT_BENCHMARK is not set\n# CONFIG_TEST_FIRMWARE is not set\n# CONFIG_TEST_SYSCTL is not set\n# CONFIG_TEST_UDELAY is not set\n# CONFIG_TEST_STATIC_KEYS is not set\n# CONFIG_TEST_KMOD is not set\n# CONFIG_TEST_MEMCAT_P is not set\n# CONFIG_TEST_MEMINIT is not set\n# CONFIG_TEST_FREE_PAGES is not set\nCONFIG_ARCH_USE_MEMTEST=y\nCONFIG_MEMTEST=y\n# end of Kernel Testing and Coverage\n\n#\n# Rust hacking\n#\n# end of Rust hacking\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/Allwinner/linux/linux.arm.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm 6.1.63 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"armv7ve-libreelec-linux-gnueabihf-gcc-12.2.0 (GCC) 12.2.0\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=120200\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23900\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23900\nCONFIG_LLD_VERSION=0\nCONFIG_CC_CAN_LINK=y\nCONFIG_CC_CAN_LINK_STATIC=y\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\nCONFIG_LOCALVERSION_AUTO=y\nCONFIG_BUILD_SALT=\"\"\nCONFIG_HAVE_KERNEL_GZIP=y\nCONFIG_HAVE_KERNEL_LZMA=y\nCONFIG_HAVE_KERNEL_XZ=y\nCONFIG_HAVE_KERNEL_LZO=y\nCONFIG_HAVE_KERNEL_LZ4=y\n# CONFIG_KERNEL_GZIP is not set\n# CONFIG_KERNEL_LZMA is not set\n# CONFIG_KERNEL_XZ is not set\n# CONFIG_KERNEL_LZO is not set\nCONFIG_KERNEL_LZ4=y\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\n# CONFIG_WATCH_QUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y\nCONFIG_GENERIC_IRQ_IPI=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_GENERIC_IRQ_MULTI_HANDLER=y\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\nCONFIG_CONTEXT_TRACKING=y\nCONFIG_CONTEXT_TRACKING_IDLE=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\n# CONFIG_BPF_JIT is not set\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# end of BPF subsystem\n\nCONFIG_PREEMPT_BUILD=y\n# CONFIG_PREEMPT_NONE is not set\n# CONFIG_PREEMPT_VOLUNTARY is not set\nCONFIG_PREEMPT=y\nCONFIG_PREEMPT_COUNT=y\nCONFIG_PREEMPTION=y\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\nCONFIG_SCHED_THERMAL_PRESSURE=y\n# CONFIG_BSD_PROCESS_ACCT is not set\n# CONFIG_TASKSTATS is not set\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\nCONFIG_PREEMPT_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_RCU=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\n# end of RCU Subsystem\n\nCONFIG_IKCONFIG=m\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=17\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# CONFIG_UCLAMP_TASK is not set\n# end of Scheduler features\n\nCONFIG_CC_IMPLICIT_FALLTHROUGH=\"-Wimplicit-fallthrough=5\"\nCONFIG_GCC11_NO_ARRAY_BOUNDS=y\nCONFIG_CC_NO_ARRAY_BOUNDS=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\n# CONFIG_CGROUP_FAVOR_DYNMODS is not set\nCONFIG_MEMCG=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_BLK_CGROUP=y\nCONFIG_CGROUP_WRITEBACK=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\nCONFIG_CGROUP_PIDS=y\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_CGROUP_PERF=y\nCONFIG_CGROUP_BPF=y\n# CONFIG_CGROUP_MISC is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_CHECKPOINT_RESTORE is not set\n# CONFIG_SCHED_AUTOGROUP is not set\n# CONFIG_SYSFS_DEPRECATED is not set\nCONFIG_RELAY=y\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"@INITRAMFS_SOURCE@\"\n# CONFIG_INITRAMFS_FORCE is not set\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\nCONFIG_RD_GZIP=y\n# CONFIG_RD_BZIP2 is not set\n# CONFIG_RD_LZMA is not set\n# CONFIG_RD_XZ is not set\n# CONFIG_RD_LZO is not set\n# CONFIG_RD_LZ4 is not set\nCONFIG_RD_ZSTD=y\n# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set\n# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set\nCONFIG_INITRAMFS_COMPRESSION_NONE=y\n# CONFIG_BOOT_CONFIG is not set\nCONFIG_INITRAMFS_PRESERVE_MTIME=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_EXPERT=y\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\n# CONFIG_SGETMASK_SYSCALL is not set\nCONFIG_SYSFS_SYSCALL=y\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\n# CONFIG_KALLSYMS_ALL is not set\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_DEBUG_RSEQ is not set\n# CONFIG_EMBEDDED is not set\nCONFIG_HAVE_PERF_EVENTS=y\nCONFIG_PERF_USE_VMALLOC=y\n# CONFIG_PC104 is not set\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_SYSTEM_DATA_VERIFICATION=y\n# CONFIG_PROFILING is not set\n# end of General setup\n\nCONFIG_ARM=y\nCONFIG_ARM_HAS_GROUP_RELOCS=y\nCONFIG_SYS_SUPPORTS_APM_EMULATION=y\nCONFIG_HAVE_PROC_CPU=y\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_ARM_PATCH_PHYS_VIRT=y\nCONFIG_GENERIC_BUG=y\nCONFIG_PGTABLE_LEVELS=2\n\n#\n# System Type\n#\nCONFIG_MMU=y\nCONFIG_ARCH_MMAP_RND_BITS_MIN=8\nCONFIG_ARCH_MMAP_RND_BITS_MAX=16\nCONFIG_ARCH_MULTIPLATFORM=y\n\n#\n# Platform selection\n#\n\n#\n# CPU Core family selection\n#\n# CONFIG_ARCH_MULTI_V6 is not set\nCONFIG_ARCH_MULTI_V7=y\nCONFIG_ARCH_MULTI_V6_V7=y\n# end of Platform selection\n\n# CONFIG_ARCH_VIRT is not set\n# CONFIG_ARCH_AIROHA is not set\n# CONFIG_ARCH_ACTIONS is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_ARTPEC is not set\n# CONFIG_ARCH_ASPEED is not set\n# CONFIG_ARCH_AT91 is not set\n# CONFIG_ARCH_BCM is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_DIGICOLOR is not set\n# CONFIG_ARCH_DOVE is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_HIGHBANK is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_HPE is not set\n# CONFIG_ARCH_MXC is not set\n# CONFIG_ARCH_KEYSTONE is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_MESON is not set\n# CONFIG_ARCH_MILBEAUT is not set\n# CONFIG_ARCH_MMP is not set\n# CONFIG_ARCH_MSTARV7 is not set\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_NPCM is not set\n\n#\n# TI OMAP/AM/DM/DRA Family\n#\n# CONFIG_ARCH_OMAP3 is not set\n# CONFIG_ARCH_OMAP4 is not set\n# CONFIG_SOC_OMAP5 is not set\n# CONFIG_SOC_AM33XX is not set\n# CONFIG_SOC_AM43XX is not set\n# CONFIG_SOC_DRA7XX is not set\n# end of TI OMAP/AM/DM/DRA Family\n\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_RDA is not set\n# CONFIG_ARCH_REALTEK is not set\n# CONFIG_ARCH_ROCKCHIP is not set\n# CONFIG_ARCH_S5PV210 is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_INTEL_SOCFPGA is not set\n# CONFIG_PLAT_SPEAR is not set\n# CONFIG_ARCH_STI is not set\n# CONFIG_ARCH_STM32 is not set\n# CONFIG_ARCH_SUNPLUS is not set\nCONFIG_ARCH_SUNXI=y\n# CONFIG_MACH_SUN4I is not set\n# CONFIG_MACH_SUN5I is not set\n# CONFIG_MACH_SUN6I is not set\n# CONFIG_MACH_SUN7I is not set\nCONFIG_MACH_SUN8I=y\n# CONFIG_MACH_SUN9I is not set\nCONFIG_ARCH_SUNXI_MC_SMP=y\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_U8500 is not set\n# CONFIG_ARCH_REALVIEW is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_WM8850 is not set\n# CONFIG_ARCH_ZYNQ is not set\n\n#\n# Processor Type\n#\nCONFIG_CPU_V7=y\nCONFIG_CPU_THUMB_CAPABLE=y\nCONFIG_CPU_32v6K=y\nCONFIG_CPU_32v7=y\nCONFIG_CPU_ABRT_EV7=y\nCONFIG_CPU_PABRT_V7=y\nCONFIG_CPU_CACHE_V7=y\nCONFIG_CPU_CACHE_VIPT=y\nCONFIG_CPU_COPY_V6=y\nCONFIG_CPU_TLB_V7=y\nCONFIG_CPU_HAS_ASID=y\nCONFIG_CPU_CP15=y\nCONFIG_CPU_CP15_MMU=y\n\n#\n# Processor Features\n#\n# CONFIG_ARM_LPAE is not set\nCONFIG_ARM_THUMB=y\n# CONFIG_ARM_THUMBEE is not set\nCONFIG_ARM_VIRT_EXT=y\nCONFIG_SWP_EMULATE=y\nCONFIG_CPU_LITTLE_ENDIAN=y\n# CONFIG_CPU_BIG_ENDIAN is not set\n# CONFIG_CPU_ICACHE_DISABLE is not set\n# CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND is not set\n# CONFIG_CPU_BPREDICT_DISABLE is not set\nCONFIG_CPU_SPECTRE=y\n# CONFIG_HARDEN_BRANCH_PREDICTOR is not set\nCONFIG_HARDEN_BRANCH_HISTORY=y\nCONFIG_KUSER_HELPERS=y\nCONFIG_VDSO=y\nCONFIG_OUTER_CACHE=y\nCONFIG_OUTER_CACHE_SYNC=y\nCONFIG_MIGHT_HAVE_CACHE_L2X0=y\nCONFIG_CACHE_L2X0=y\n# CONFIG_CACHE_L2X0_PMU is not set\n# CONFIG_PL310_ERRATA_588369 is not set\n# CONFIG_PL310_ERRATA_727915 is not set\n# CONFIG_PL310_ERRATA_753970 is not set\n# CONFIG_PL310_ERRATA_769419 is not set\nCONFIG_ARM_L1_CACHE_SHIFT_6=y\nCONFIG_ARM_L1_CACHE_SHIFT=6\nCONFIG_ARM_DMA_MEM_BUFFERABLE=y\nCONFIG_ARM_HEAVY_MB=y\nCONFIG_DEBUG_ALIGN_RODATA=y\n# CONFIG_ARM_ERRATA_430973 is not set\n# CONFIG_ARM_ERRATA_643719 is not set\n# CONFIG_ARM_ERRATA_720789 is not set\n# CONFIG_ARM_ERRATA_754322 is not set\n# CONFIG_ARM_ERRATA_754327 is not set\n# CONFIG_ARM_ERRATA_764369 is not set\n# CONFIG_ARM_ERRATA_764319 is not set\n# CONFIG_ARM_ERRATA_775420 is not set\n# CONFIG_ARM_ERRATA_798181 is not set\n# CONFIG_ARM_ERRATA_773022 is not set\n# CONFIG_ARM_ERRATA_818325_852422 is not set\n# CONFIG_ARM_ERRATA_821420 is not set\n# CONFIG_ARM_ERRATA_825619 is not set\n# CONFIG_ARM_ERRATA_857271 is not set\n# CONFIG_ARM_ERRATA_852421 is not set\n# CONFIG_ARM_ERRATA_852423 is not set\n# CONFIG_ARM_ERRATA_857272 is not set\n# end of System Type\n\n#\n# Bus support\n#\n# CONFIG_ARM_ERRATA_814220 is not set\n# end of Bus support\n\n#\n# Kernel Features\n#\nCONFIG_HAVE_SMP=y\nCONFIG_SMP=y\nCONFIG_SMP_ON_UP=y\nCONFIG_CURRENT_POINTER_IN_TPIDRURO=y\nCONFIG_IRQSTACKS=y\nCONFIG_ARM_CPU_TOPOLOGY=y\n# CONFIG_SCHED_MC is not set\n# CONFIG_SCHED_SMT is not set\nCONFIG_HAVE_ARM_ARCH_TIMER=y\n# CONFIG_MCPM is not set\n# CONFIG_BIG_LITTLE is not set\nCONFIG_VMSPLIT_3G=y\n# CONFIG_VMSPLIT_3G_OPT is not set\n# CONFIG_VMSPLIT_2G is not set\n# CONFIG_VMSPLIT_1G is not set\nCONFIG_PAGE_OFFSET=0xC0000000\nCONFIG_NR_CPUS=8\nCONFIG_HOTPLUG_CPU=y\nCONFIG_ARM_PSCI=y\nCONFIG_ARCH_NR_GPIO=416\nCONFIG_HZ_FIXED=0\nCONFIG_HZ_100=y\n# CONFIG_HZ_200 is not set\n# CONFIG_HZ_250 is not set\n# CONFIG_HZ_300 is not set\n# CONFIG_HZ_500 is not set\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=100\nCONFIG_SCHED_HRTICK=y\n# CONFIG_THUMB2_KERNEL is not set\nCONFIG_ARM_PATCH_IDIV=y\nCONFIG_AEABI=y\n# CONFIG_OABI_COMPAT is not set\nCONFIG_ARCH_SELECT_MEMORY_MODEL=y\nCONFIG_ARCH_FLATMEM_ENABLE=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_HIGHMEM=y\nCONFIG_HIGHPTE=y\nCONFIG_CPU_SW_DOMAIN_PAN=y\nCONFIG_HW_PERF_EVENTS=y\n# CONFIG_ARM_MODULE_PLTS is not set\nCONFIG_ARCH_FORCE_MAX_ORDER=11\nCONFIG_ALIGNMENT_TRAP=y\n# CONFIG_UACCESS_WITH_MEMCPY is not set\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\n# CONFIG_XEN is not set\nCONFIG_CC_HAVE_STACKPROTECTOR_TLS=y\n# end of Kernel Features\n\n#\n# Boot options\n#\nCONFIG_USE_OF=y\nCONFIG_ATAGS=y\n# CONFIG_UNUSED_BOARD_FILES is not set\n# CONFIG_DEPRECATED_PARAM_STRUCT is not set\nCONFIG_ZBOOT_ROM_TEXT=0\nCONFIG_ZBOOT_ROM_BSS=0\n# CONFIG_ARM_APPENDED_DTB is not set\nCONFIG_CMDLINE=\"root=/dev/ram0 rdinit=/init\"\n# CONFIG_CMDLINE_FROM_BOOTLOADER is not set\nCONFIG_CMDLINE_EXTEND=y\n# CONFIG_CMDLINE_FORCE is not set\n# CONFIG_KEXEC is not set\n# CONFIG_CRASH_DUMP is not set\nCONFIG_AUTO_ZRELADDR=y\n# CONFIG_EFI is not set\n# end of Boot options\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\n# CONFIG_CPU_FREQ_STAT is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=y\n# CONFIG_CPU_FREQ_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\nCONFIG_CPU_FREQ_GOV_SCHEDUTIL=y\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\nCONFIG_CPUFREQ_DT_PLATDEV=y\n# CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM is not set\n# end of CPU Frequency scaling\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\nCONFIG_CPU_IDLE_GOV_LADDER=y\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\n\n#\n# ARM CPU Idle Drivers\n#\n# CONFIG_ARM_CPUIDLE is not set\n# CONFIG_ARM_PSCI_CPUIDLE is not set\n# CONFIG_ARM_HIGHBANK_CPUIDLE is not set\n# end of ARM CPU Idle Drivers\n# end of CPU Idle\n# end of CPU Power Management\n\n#\n# Floating point emulation\n#\n\n#\n# At least one emulation must be selected\n#\nCONFIG_VFP=y\nCONFIG_VFPv3=y\nCONFIG_NEON=y\n# CONFIG_KERNEL_MODE_NEON is not set\n# end of Floating point emulation\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_SUSPEND_SKIP_SYNC is not set\n# CONFIG_HIBERNATION is not set\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_USERSPACE_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\nCONFIG_PM=y\n# CONFIG_PM_DEBUG is not set\n# CONFIG_APM_EMULATION is not set\nCONFIG_PM_CLK=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_CPU_PM=y\n# CONFIG_ENERGY_MODEL is not set\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\nCONFIG_ARM_CPU_SUSPEND=y\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\n# end of Power management options\n\nCONFIG_AS_VFP_VMRS_FPINST=y\n\n#\n# General architecture-dependent options\n#\n# CONFIG_KPROBES is not set\n# CONFIG_JUMP_LABEL is not set\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_ARCH_USE_BUILTIN_BSWAP=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_HAVE_OPTPROBES=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_KEEPINITRD=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_ARCH_HAS_CPU_FINALIZE_INIT=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_32BIT_OFF_T=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_ARCH_WANT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_STACKPROTECTOR=y\n# CONFIG_STACKPROTECTOR is not set\nCONFIG_LTO_NONE=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_REL=y\nCONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y\nCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_HAVE_EXIT_THREAD=y\nCONFIG_ARCH_MMAP_RND_BITS=8\nCONFIG_PAGE_SIZE_LESS_THAN_64KB=y\nCONFIG_PAGE_SIZE_LESS_THAN_256KB=y\nCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_ARCH_OPTIONAL_KERNEL_RWX=y\nCONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_HAVE_ARCH_PFN_VALID=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGINS is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/sbin/modprobe\"\n# CONFIG_TRIM_UNUSED_KSYMS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\n# CONFIG_BLOCK_LEGACY_AUTOLOAD is not set\nCONFIG_BLK_CGROUP_RWSTAT=y\nCONFIG_BLK_DEV_BSG_COMMON=y\nCONFIG_BLK_DEV_BSGLIB=y\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_DEV_ZONED is not set\nCONFIG_BLK_DEV_THROTTLING=y\n# CONFIG_BLK_DEV_THROTTLING_LOW is not set\n# CONFIG_BLK_WBT is not set\nCONFIG_BLK_CGROUP_IOLATENCY=y\n# CONFIG_BLK_CGROUP_IOCOST is not set\n# CONFIG_BLK_CGROUP_IOPRIO is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\nCONFIG_MAC_PARTITION=y\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\nCONFIG_LDM_PARTITION=y\n# CONFIG_LDM_DEBUG is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\n# CONFIG_CMDLINE_PARTITION is not set\n# end of Partition Types\n\nCONFIG_BLK_PM=y\nCONFIG_BLOCK_HOLDER_DEPRECATED=y\nCONFIG_BLK_MQ_STACKING=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\n# CONFIG_IOSCHED_BFQ is not set\n# end of IO Schedulers\n\nCONFIG_ASN1=y\nCONFIG_UNINLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\n# CONFIG_BINFMT_ELF_FDPIC is not set\nCONFIG_ELFCORE=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\nCONFIG_ARCH_HAS_BINFMT_FLAT=y\n# CONFIG_BINFMT_FLAT is not set\nCONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\nCONFIG_SWAP=y\n# CONFIG_ZSWAP is not set\n\n#\n# SLAB allocator options\n#\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# end of SLAB allocator options\n\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\nCONFIG_COMPAT_BRK=y\nCONFIG_SELECT_MEMORY_MODEL=y\nCONFIG_FLATMEM_MANUAL=y\n# CONFIG_SPARSEMEM_MANUAL is not set\nCONFIG_FLATMEM=y\nCONFIG_ARCH_KEEP_MEMBLOCK=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_COMPACTION=y\nCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1\n# CONFIG_PAGE_REPORTING is not set\nCONFIG_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\nCONFIG_BOUNCE=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_WANT_GENERAL_HUGETLB=y\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\nCONFIG_CMA_DEBUGFS=y\nCONFIG_CMA_SYSFS=y\nCONFIG_CMA_AREAS=7\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y\nCONFIG_VM_EVENT_COUNTERS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\nCONFIG_KMAP_LOCAL=y\nCONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_USERFAULTFD is not set\n# CONFIG_LRU_GEN is not set\nCONFIG_LOCK_MM_AND_FIND_VMA=y\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_NET_INGRESS=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_INTERFACE is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_XFRM_ESP=y\n# CONFIG_NET_KEY is not set\n# CONFIG_XDP_SOCKETS is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=y\nCONFIG_IP_MROUTE_COMMON=y\nCONFIG_IP_MROUTE=y\n# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set\n# CONFIG_IP_PIMSM_V1 is not set\n# CONFIG_IP_PIMSM_V2 is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=y\n# CONFIG_INET_ESP_OFFLOAD is not set\n# CONFIG_INET_ESPINTCP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=y\n# CONFIG_INET_DIAG is not set\n# CONFIG_TCP_CONG_ADVANCED is not set\nCONFIG_TCP_CONG_CUBIC=y\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_IPV6_VTI is not set\nCONFIG_IPV6_SIT=y\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\nCONFIG_IPV6_FOU=m\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_MPTCP is not set\n# CONFIG_NETWORK_SECMARK is not set\nCONFIG_NET_PTP_CLASSIFY=y\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\nCONFIG_NETFILTER_EGRESS=y\nCONFIG_NETFILTER_NETLINK=m\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\n# CONFIG_NETFILTER_NETLINK_LOG is not set\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\n# CONFIG_NF_LOG_SYSLOG is not set\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_ZONES is not set\nCONFIG_NF_CONNTRACK_PROCFS=y\n# CONFIG_NF_CONNTRACK_EVENTS is not set\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\nCONFIG_NF_CT_PROTO_DCCP=y\nCONFIG_NF_CT_PROTO_SCTP=y\nCONFIG_NF_CT_PROTO_UDPLITE=y\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\n# CONFIG_NF_CONNTRACK_IRC is not set\n# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\n# CONFIG_NF_CONNTRACK_SIP is not set\nCONFIG_NF_CONNTRACK_TFTP=m\nCONFIG_NF_CT_NETLINK=m\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=y\nCONFIG_NF_NAT_MASQUERADE=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\n# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\n# CONFIG_NETFILTER_XT_MATCH_OWNER is not set\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\n# CONFIG_NETFILTER_XT_MATCH_STATE is not set\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\nCONFIG_IP_VS=m\n# CONFIG_IP_VS_IPV6 is not set\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_MH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n# CONFIG_IP_VS_TWOS is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS MH scheduler\n#\nCONFIG_IP_VS_MH_TAB_INDEX=12\n\n#\n# IPVS application helper\n#\n# CONFIG_IP_VS_FTP is not set\nCONFIG_IP_VS_NFCT=y\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\n# CONFIG_NF_LOG_IPV6 is not set\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_MATCH_SRH is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\n# CONFIG_NET_SCH_FQ_CODEL is not set\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_FLOW is not set\nCONFIG_NET_CLS_CGROUP=m\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\nCONFIG_NET_L3_MASTER_DEV=y\n# CONFIG_QRTR is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_PCPU_DEV_REFCNT=y\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_SOCK_RX_QUEUE_MAPPING=y\nCONFIG_XPS=y\nCONFIG_CGROUP_NET_PRIO=y\nCONFIG_CGROUP_NET_CLASSID=y\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\nCONFIG_BT_RFCOMM_TTY=y\nCONFIG_BT_BNEP=m\nCONFIG_BT_BNEP_MC_FILTER=y\nCONFIG_BT_BNEP_PROTO_FILTER=y\nCONFIG_BT_HIDP=m\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\nCONFIG_BT_LEDS=y\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\n# CONFIG_BT_DEBUGFS is not set\n# CONFIG_BT_SELFTEST is not set\n# CONFIG_BT_FEATURE_DEBUG is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_QCA=m\nCONFIG_BT_MTK=m\nCONFIG_BT_HCIBTUSB=m\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\n# CONFIG_BT_HCIBTUSB_MTK is not set\nCONFIG_BT_HCIBTUSB_RTL=y\nCONFIG_BT_HCIBTSDIO=m\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_SERDEV=y\nCONFIG_BT_HCIUART_H4=y\n# CONFIG_BT_HCIUART_NOKIA is not set\nCONFIG_BT_HCIUART_BCSP=y\nCONFIG_BT_HCIUART_ATH3K=y\nCONFIG_BT_HCIUART_LL=y\nCONFIG_BT_HCIUART_3WIRE=y\nCONFIG_BT_HCIUART_INTEL=y\nCONFIG_BT_HCIUART_BCM=y\nCONFIG_BT_HCIUART_RTL=y\nCONFIG_BT_HCIUART_QCA=y\nCONFIG_BT_HCIUART_AG6XX=y\nCONFIG_BT_HCIUART_MRVL=y\nCONFIG_BT_HCIBCM203X=m\nCONFIG_BT_HCIBPA10X=m\nCONFIG_BT_HCIBFUSB=m\nCONFIG_BT_HCIVHCI=m\nCONFIG_BT_MRVL=m\nCONFIG_BT_MRVL_SDIO=m\nCONFIG_BT_ATH3K=m\n# CONFIG_BT_MTKSDIO is not set\nCONFIG_BT_MTKUART=m\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_SPY=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=m\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\nCONFIG_CFG80211_CRDA_SUPPORT=y\nCONFIG_CFG80211_WEXT=y\nCONFIG_LIB80211=m\nCONFIG_LIB80211_CRYPT_WEP=m\nCONFIG_LIB80211_CRYPT_CCMP=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=m\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=m\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\nCONFIG_RFKILL_GPIO=m\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_PAGE_POOL=y\n# CONFIG_PAGE_POOL_STATS is not set\n# CONFIG_FAILOVER is not set\nCONFIG_ETHTOOL_NETLINK=y\n\n#\n# Device Drivers\n#\nCONFIG_HAVE_PCI=y\n# CONFIG_PCI is not set\n# CONFIG_PCCARD is not set\n\n#\n# Generic Driver Options\n#\n# CONFIG_UEVENT_HELPER is not set\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\n# CONFIG_DEVTMPFS_SAFE is not set\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\nCONFIG_FW_CACHE=y\n# CONFIG_FW_UPLOAD is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\nCONFIG_ALLOW_DEV_COREDUMP=y\nCONFIG_DEV_COREDUMP=y\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_SOC_BUS=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\nCONFIG_ARM_CCI=y\nCONFIG_ARM_CCI400_COMMON=y\nCONFIG_ARM_CCI400_PORT_CTRL=y\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_MOXTET is not set\nCONFIG_SUN50I_DE2_BUS=y\nCONFIG_SUNXI_RSB=y\n# CONFIG_VEXPRESS_CONFIG is not set\n# CONFIG_MHI_BUS is not set\n# CONFIG_MHI_BUS_EP is not set\n# end of Bus devices\n\n# CONFIG_CONNECTOR is not set\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\n# CONFIG_ARM_SCMI_PROTOCOL is not set\n# end of ARM System Control and Management Interface Protocol\n\n# CONFIG_FIRMWARE_MEMMAP is not set\n# CONFIG_FW_CFG_SYSFS is not set\n# CONFIG_TRUSTED_FOUNDATIONS is not set\n# CONFIG_GOOGLE_FIRMWARE is not set\nCONFIG_ARM_PSCI_FW=y\n# CONFIG_ARM_PSCI_CHECKER is not set\nCONFIG_HAVE_ARM_SMCCC=y\nCONFIG_HAVE_ARM_SMCCC_DISCOVERY=y\nCONFIG_ARM_SMCCC_SOC_ID=y\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\n# CONFIG_MTD is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_DYNAMIC=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\nCONFIG_OF_RESOLVE=y\nCONFIG_OF_OVERLAY=y\nCONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_CDROM=y\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=0\n# CONFIG_BLK_DEV_DRBD is not set\nCONFIG_BLK_DEV_NBD=y\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=16\nCONFIG_BLK_DEV_RAM_SIZE=4096\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_UBLK is not set\n\n#\n# NVME Support\n#\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TCP is not set\n# CONFIG_NVME_TARGET is not set\n# end of NVME Support\n\n#\n# Misc devices\n#\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\n# CONFIG_SRAM is not set\n# CONFIG_XILINX_SDFEC is not set\n# CONFIG_OPEN_DICE is not set\n# CONFIG_VCPU_STALL_DETECTOR is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\n# CONFIG_EEPROM_AT25 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_EEPROM_EE1004 is not set\n# end of EEPROM support\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n# CONFIG_ECHO is not set\n# CONFIG_MISC_RTSX_USB is not set\n# CONFIG_PVPANIC is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\nCONFIG_SCSI_PROC_FS=y\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_CHR_DEV_SG=m\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_CHR_DEV_SCH is not set\nCONFIG_SCSI_CONSTANTS=y\n# CONFIG_SCSI_LOGGING is not set\n# CONFIG_SCSI_SCAN_ASYNC is not set\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\nCONFIG_ATA=y\nCONFIG_SATA_HOST=y\nCONFIG_ATA_VERBOSE_ERROR=y\nCONFIG_ATA_FORCE=y\nCONFIG_SATA_PMP=y\n\n#\n# Controllers with non-SFF native interface\n#\n# CONFIG_SATA_AHCI_PLATFORM is not set\n# CONFIG_AHCI_DWC is not set\n# CONFIG_AHCI_CEVA is not set\nCONFIG_AHCI_SUNXI=y\n# CONFIG_AHCI_QORIQ is not set\nCONFIG_ATA_SFF=y\n\n#\n# SFF controllers with custom DMA interface\n#\nCONFIG_ATA_BMDMA=y\n\n#\n# SATA SFF controllers with BMDMA\n#\n# CONFIG_SATA_DWC is not set\n\n#\n# PATA SFF controllers with BMDMA\n#\n\n#\n# PIO-only SFF controllers\n#\n# CONFIG_PATA_OF_PLATFORM is not set\n\n#\n# Generic fallback / legacy drivers\n#\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\n# CONFIG_DM_DEBUG is not set\nCONFIG_DM_BUFIO=m\n# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\n# CONFIG_DM_UNSTRIPED is not set\n# CONFIG_DM_CRYPT is not set\n# CONFIG_DM_SNAPSHOT is not set\nCONFIG_DM_THIN_PROVISIONING=m\n# CONFIG_DM_CACHE is not set\n# CONFIG_DM_WRITECACHE is not set\n# CONFIG_DM_ERA is not set\n# CONFIG_DM_CLONE is not set\n# CONFIG_DM_MIRROR is not set\n# CONFIG_DM_RAID is not set\n# CONFIG_DM_ZERO is not set\n# CONFIG_DM_MULTIPATH is not set\n# CONFIG_DM_DELAY is not set\n# CONFIG_DM_DUST is not set\n# CONFIG_DM_UEVENT is not set\n# CONFIG_DM_FLAKEY is not set\n# CONFIG_DM_VERITY is not set\n# CONFIG_DM_SWITCH is not set\n# CONFIG_DM_LOG_WRITES is not set\n# CONFIG_DM_INTEGRITY is not set\n# CONFIG_TARGET_CORE is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\nCONFIG_DUMMY=m\nCONFIG_WIREGUARD=m\n# CONFIG_WIREGUARD_DEBUG is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\n# CONFIG_MACVTAP is not set\nCONFIG_IPVLAN_L3S=y\nCONFIG_IPVLAN=m\n# CONFIG_IPVTAP is not set\nCONFIG_VXLAN=m\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_AMT is not set\n# CONFIG_MACSEC is not set\nCONFIG_NETCONSOLE=y\n# CONFIG_NETCONSOLE_DYNAMIC is not set\nCONFIG_NETPOLL=y\nCONFIG_NET_POLL_CONTROLLER=y\nCONFIG_TUN=y\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\nCONFIG_NLMON=m\nCONFIG_ETHERNET=y\nCONFIG_NET_VENDOR_ALACRITECH=y\nCONFIG_NET_VENDOR_ALLWINNER=y\nCONFIG_SUN4I_EMAC=y\n# CONFIG_ALTERA_TSE is not set\nCONFIG_NET_VENDOR_AMAZON=y\nCONFIG_NET_VENDOR_AQUANTIA=y\n# CONFIG_NET_VENDOR_ARC is not set\n# CONFIG_NET_VENDOR_ASIX is not set\n# CONFIG_NET_VENDOR_BROADCOM is not set\n# CONFIG_NET_VENDOR_CADENCE is not set\n# CONFIG_NET_VENDOR_CAVIUM is not set\n# CONFIG_NET_VENDOR_CIRRUS is not set\nCONFIG_NET_VENDOR_CORTINA=y\n# CONFIG_GEMINI_ETHERNET is not set\n# CONFIG_NET_VENDOR_DAVICOM is not set\n# CONFIG_DNET is not set\n# CONFIG_NET_VENDOR_ENGLEDER is not set\nCONFIG_NET_VENDOR_EZCHIP=y\n# CONFIG_EZCHIP_NPS_MANAGEMENT_ENET is not set\n# CONFIG_NET_VENDOR_FARADAY is not set\n# CONFIG_NET_VENDOR_FUNGIBLE is not set\n# CONFIG_NET_VENDOR_GOOGLE is not set\nCONFIG_NET_VENDOR_HISILICON=y\n# CONFIG_HIX5HD2_GMAC is not set\n# CONFIG_HISI_FEMAC is not set\n# CONFIG_HIP04_ETH is not set\n# CONFIG_HNS_DSAF is not set\n# CONFIG_HNS_ENET is not set\n# CONFIG_NET_VENDOR_HUAWEI is not set\n# CONFIG_NET_VENDOR_INTEL is not set\n# CONFIG_NET_VENDOR_WANGXUN is not set\n# CONFIG_NET_VENDOR_ADI is not set\n# CONFIG_NET_VENDOR_LITEX is not set\n# CONFIG_NET_VENDOR_MARVELL is not set\n# CONFIG_NET_VENDOR_MELLANOX is not set\n# CONFIG_NET_VENDOR_MICREL is not set\n# CONFIG_NET_VENDOR_MICROCHIP is not set\nCONFIG_NET_VENDOR_MICROSEMI=y\n# CONFIG_NET_VENDOR_MICROSOFT is not set\nCONFIG_NET_VENDOR_NI=y\n# CONFIG_NI_XGE_MANAGEMENT_ENET is not set\n# CONFIG_NET_VENDOR_NATSEMI is not set\nCONFIG_NET_VENDOR_NETRONOME=y\n# CONFIG_ETHOC is not set\n# CONFIG_NET_VENDOR_PENSANDO is not set\nCONFIG_NET_VENDOR_QUALCOMM=y\n# CONFIG_QCA7000_SPI is not set\n# CONFIG_QCA7000_UART is not set\n# CONFIG_QCOM_EMAC is not set\n# CONFIG_RMNET is not set\nCONFIG_NET_VENDOR_RENESAS=y\nCONFIG_NET_VENDOR_ROCKER=y\n# CONFIG_NET_VENDOR_SAMSUNG is not set\n# CONFIG_NET_VENDOR_SEEQ is not set\nCONFIG_NET_VENDOR_SOLARFLARE=y\n# CONFIG_NET_VENDOR_SMSC is not set\nCONFIG_NET_VENDOR_SOCIONEXT=y\nCONFIG_NET_VENDOR_STMICRO=y\nCONFIG_STMMAC_ETH=y\n# CONFIG_STMMAC_SELFTESTS is not set\nCONFIG_STMMAC_PLATFORM=y\n# CONFIG_DWMAC_DWC_QOS_ETH is not set\nCONFIG_DWMAC_GENERIC=y\nCONFIG_DWMAC_SUNXI=y\nCONFIG_DWMAC_SUN8I=y\n# CONFIG_DWMAC_INTEL_PLAT is not set\nCONFIG_NET_VENDOR_SYNOPSYS=y\n# CONFIG_DWC_XLGMAC is not set\n# CONFIG_NET_VENDOR_VERTEXCOM is not set\n# CONFIG_NET_VENDOR_VIA is not set\n# CONFIG_NET_VENDOR_WIZNET is not set\n# CONFIG_NET_VENDOR_XILINX is not set\nCONFIG_PHYLINK=y\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AC200_PHY is not set\n# CONFIG_AMD_PHY is not set\n# CONFIG_ADIN_PHY is not set\n# CONFIG_ADIN1100_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=m\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM54140_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MARVELL_88X2222_PHY is not set\n# CONFIG_MAXLINEAR_GPHY is not set\n# CONFIG_MEDIATEK_GE_PHY is not set\nCONFIG_MICREL_PHY=y\nCONFIG_MICROCHIP_PHY=y\nCONFIG_MICROCHIP_T1_PHY=y\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_MOTORCOMM_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_NXP_TJA11XX_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_QSEMI_PHY is not set\nCONFIG_REALTEK_PHY=y\n# CONFIG_RENESAS_PHY is not set\n# CONFIG_ROCKCHIP_PHY is not set\nCONFIG_SMSC_PHY=y\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_DP83TD510_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\nCONFIG_MICREL_KS8995MA=y\n# CONFIG_PSE_CONTROLLER is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_OF_MDIO=y\nCONFIG_MDIO_DEVRES=y\nCONFIG_MDIO_SUN4I=y\n# CONFIG_MDIO_BITBANG is not set\n# CONFIG_MDIO_BCM_UNIMAC is not set\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_IPQ4019 is not set\n# CONFIG_MDIO_IPQ8064 is not set\n\n#\n# MDIO Multiplexers\n#\nCONFIG_MDIO_BUS_MUX=y\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n\n#\n# PCS device drivers\n#\nCONFIG_PCS_XPCS=y\n# end of PCS device drivers\n\nCONFIG_PPP=m\nCONFIG_PPP_BSDCOMP=m\nCONFIG_PPP_DEFLATE=m\n# CONFIG_PPP_FILTER is not set\nCONFIG_PPP_MPPE=m\n# CONFIG_PPP_MULTILINK is not set\nCONFIG_PPPOE=m\nCONFIG_PPP_ASYNC=m\nCONFIG_PPP_SYNC_TTY=m\n# CONFIG_SLIP is not set\nCONFIG_SLHC=m\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\n# CONFIG_USB_PEGASUS is not set\n# CONFIG_USB_RTL8150 is not set\nCONFIG_USB_RTL8152=y\n# CONFIG_USB_LAN78XX is not set\nCONFIG_USB_USBNET=m\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\n# CONFIG_USB_NET_CDC_EEM is not set\nCONFIG_USB_NET_CDC_NCM=m\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\n# CONFIG_USB_NET_DM9601 is not set\n# CONFIG_USB_NET_SR9700 is not set\n# CONFIG_USB_NET_SR9800 is not set\n# CONFIG_USB_NET_SMSC75XX is not set\n# CONFIG_USB_NET_SMSC95XX is not set\n# CONFIG_USB_NET_GL620A is not set\nCONFIG_USB_NET_NET1080=m\n# CONFIG_USB_NET_PLUSB is not set\n# CONFIG_USB_NET_MCS7830 is not set\nCONFIG_USB_NET_RNDIS_HOST=m\nCONFIG_USB_NET_CDC_SUBSET_ENABLE=m\nCONFIG_USB_NET_CDC_SUBSET=m\n# CONFIG_USB_ALI_M5632 is not set\n# CONFIG_USB_AN2720 is not set\nCONFIG_USB_BELKIN=y\nCONFIG_USB_ARMLINUX=y\n# CONFIG_USB_EPSON2888 is not set\n# CONFIG_USB_KC2190 is not set\nCONFIG_USB_NET_ZAURUS=m\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\n# CONFIG_USB_HSO is not set\n# CONFIG_USB_NET_INT51X1 is not set\nCONFIG_USB_IPHETH=m\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\n# CONFIG_USB_NET_AQC111 is not set\nCONFIG_USB_RTL8153_ECM=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\n# CONFIG_ATH9K is not set\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\nCONFIG_CARL9170_HWRNG=y\nCONFIG_ATH6KL=m\n# CONFIG_ATH6KL_SDIO is not set\nCONFIG_ATH6KL_USB=m\n# CONFIG_ATH6KL_DEBUG is not set\nCONFIG_AR5523=m\nCONFIG_ATH10K=m\nCONFIG_ATH10K_CE=y\n# CONFIG_ATH10K_SDIO is not set\nCONFIG_ATH10K_USB=m\n# CONFIG_ATH10K_DEBUG is not set\n# CONFIG_ATH10K_DEBUGFS is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\nCONFIG_AT76C50X_USB=m\nCONFIG_WLAN_VENDOR_BROADCOM=y\nCONFIG_B43=m\nCONFIG_B43_BCMA=y\nCONFIG_B43_SSB=y\nCONFIG_B43_BUSES_BCMA_AND_SSB=y\n# CONFIG_B43_BUSES_BCMA is not set\n# CONFIG_B43_BUSES_SSB is not set\n# CONFIG_B43_SDIO is not set\nCONFIG_B43_BCMA_PIO=y\nCONFIG_B43_PIO=y\nCONFIG_B43_PHY_G=y\nCONFIG_B43_PHY_N=y\nCONFIG_B43_PHY_LP=y\nCONFIG_B43_PHY_HT=y\nCONFIG_B43_LEDS=y\nCONFIG_B43_HWRNG=y\n# CONFIG_B43_DEBUG is not set\n# CONFIG_B43LEGACY is not set\nCONFIG_BRCMUTIL=m\n# CONFIG_BRCMSMAC is not set\nCONFIG_BRCMFMAC=m\nCONFIG_BRCMFMAC_PROTO_BCDC=y\nCONFIG_BRCMFMAC_SDIO=y\nCONFIG_BRCMFMAC_USB=y\n# CONFIG_BRCM_TRACING is not set\n# CONFIG_BRCMDBG is not set\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\n# CONFIG_WLAN_VENDOR_INTERSIL is not set\nCONFIG_WLAN_VENDOR_MARVELL=y\nCONFIG_LIBERTAS=m\nCONFIG_LIBERTAS_USB=m\n# CONFIG_LIBERTAS_SDIO is not set\n# CONFIG_LIBERTAS_SPI is not set\n# CONFIG_LIBERTAS_DEBUG is not set\n# CONFIG_LIBERTAS_MESH is not set\nCONFIG_LIBERTAS_THINFIRM=m\n# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set\nCONFIG_LIBERTAS_THINFIRM_USB=m\nCONFIG_MWIFIEX=m\n# CONFIG_MWIFIEX_SDIO is not set\nCONFIG_MWIFIEX_USB=m\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_MT76_CORE=m\nCONFIG_MT76_LEDS=y\nCONFIG_MT76_USB=m\nCONFIG_MT76x02_LIB=m\nCONFIG_MT76x02_USB=m\nCONFIG_MT76_CONNAC_LIB=m\nCONFIG_MT76x0_COMMON=m\nCONFIG_MT76x0U=m\nCONFIG_MT76x2_COMMON=m\nCONFIG_MT76x2U=m\nCONFIG_MT7615_COMMON=m\nCONFIG_MT7663_USB_SDIO_COMMON=m\nCONFIG_MT7663U=m\n# CONFIG_MT7663S is not set\n# CONFIG_MT7921S is not set\n# CONFIG_MT7921U is not set\nCONFIG_WLAN_VENDOR_MICROCHIP=y\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\n# CONFIG_WLAN_VENDOR_PURELIFI is not set\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=m\n# CONFIG_RTL8192CU is not set\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\nCONFIG_RTW88=m\nCONFIG_RTW88_CORE=m\nCONFIG_RTW88_SDIO=m\nCONFIG_RTW88_USB=m\nCONFIG_RTW88_8822B=m\nCONFIG_RTW88_8822C=m\nCONFIG_RTW88_8723D=m\nCONFIG_RTW88_8821C=m\nCONFIG_RTW88_8822BS=m\nCONFIG_RTW88_8822BU=m\nCONFIG_RTW88_8822CS=m\nCONFIG_RTW88_8822CU=m\nCONFIG_RTW88_8723DU=m\nCONFIG_RTW88_8821CS=m\nCONFIG_RTW88_8821CU=m\n# CONFIG_RTW88_DEBUG is not set\n# CONFIG_RTW88_DEBUGFS is not set\n# CONFIG_RTW89 is not set\n# CONFIG_WLAN_VENDOR_RSI is not set\n# CONFIG_WLAN_VENDOR_SILABS is not set\n# CONFIG_WLAN_VENDOR_ST is not set\n# CONFIG_WLAN_VENDOR_TI is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\nCONFIG_USB_ZD1201=m\nCONFIG_ZD1211RW=m\n# CONFIG_ZD1211RW_DEBUG is not set\n# CONFIG_WLAN_VENDOR_QUANTENNA is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\n# CONFIG_NETDEVSIM is not set\n# CONFIG_NET_FAILOVER is not set\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\n# CONFIG_INPUT_MATRIXKMAP is not set\nCONFIG_INPUT_VIVALDIFMAP=y\n\n#\n# Userland interfaces\n#\n# CONFIG_INPUT_MOUSEDEV is not set\nCONFIG_INPUT_JOYDEV=y\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADC is not set\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\nCONFIG_KEYBOARD_ATKBD=y\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=y\nCONFIG_KEYBOARD_GPIO_POLLED=y\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_PINEPHONE is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\nCONFIG_KEYBOARD_SUN4I_LRADC=y\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\n# CONFIG_KEYBOARD_CYPRESS_SF is not set\n# CONFIG_INPUT_MOUSE is not set\nCONFIG_INPUT_JOYSTICK=y\n# CONFIG_JOYSTICK_ANALOG is not set\n# CONFIG_JOYSTICK_A3D is not set\n# CONFIG_JOYSTICK_ADC is not set\n# CONFIG_JOYSTICK_ADI is not set\n# CONFIG_JOYSTICK_COBRA is not set\n# CONFIG_JOYSTICK_GF2K is not set\n# CONFIG_JOYSTICK_GRIP is not set\n# CONFIG_JOYSTICK_GRIP_MP is not set\n# CONFIG_JOYSTICK_GUILLEMOT is not set\n# CONFIG_JOYSTICK_INTERACT is not set\n# CONFIG_JOYSTICK_SIDEWINDER is not set\n# CONFIG_JOYSTICK_TMDC is not set\n# CONFIG_JOYSTICK_IFORCE is not set\n# CONFIG_JOYSTICK_WARRIOR is not set\n# CONFIG_JOYSTICK_MAGELLAN is not set\n# CONFIG_JOYSTICK_SPACEORB is not set\n# CONFIG_JOYSTICK_SPACEBALL is not set\n# CONFIG_JOYSTICK_STINGER is not set\n# CONFIG_JOYSTICK_TWIDJOY is not set\n# CONFIG_JOYSTICK_ZHENHUA is not set\n# CONFIG_JOYSTICK_AS5011 is not set\n# CONFIG_JOYSTICK_JOYDUMP is not set\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\n# CONFIG_JOYSTICK_PSXPAD_SPI is not set\n# CONFIG_JOYSTICK_PXRC is not set\n# CONFIG_JOYSTICK_QWIIC is not set\n# CONFIG_JOYSTICK_FSIA6B is not set\n# CONFIG_JOYSTICK_SENSEHAT is not set\n# CONFIG_INPUT_TABLET is not set\n# CONFIG_INPUT_TOUCHSCREEN is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_AXP20X_PEK=y\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_IQS7222 is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\nCONFIG_RMI4_CORE=m\n# CONFIG_RMI4_I2C is not set\n# CONFIG_RMI4_SPI is not set\n# CONFIG_RMI4_SMB is not set\nCONFIG_RMI4_F03=y\nCONFIG_RMI4_F03_SERIO=m\nCONFIG_RMI4_2D_SENSOR=y\nCONFIG_RMI4_F11=y\nCONFIG_RMI4_F12=y\nCONFIG_RMI4_F30=y\n# CONFIG_RMI4_F34 is not set\n# CONFIG_RMI4_F3A is not set\n# CONFIG_RMI4_F54 is not set\n# CONFIG_RMI4_F55 is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_SERIO_SERPORT=y\nCONFIG_SERIO_LIBPS2=y\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_SERIO_SUN4I_PS2 is not set\n# CONFIG_SERIO_GPIO_PS2 is not set\n# CONFIG_USERIO is not set\n# CONFIG_GAMEPORT is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\nCONFIG_LEGACY_PTYS=y\nCONFIG_LEGACY_PTY_COUNT=256\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\nCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y\nCONFIG_SERIAL_8250_16550A_VARIANTS=y\n# CONFIG_SERIAL_8250_FINTEK is not set\nCONFIG_SERIAL_8250_CONSOLE=y\nCONFIG_SERIAL_8250_DMA=y\nCONFIG_SERIAL_8250_NR_UARTS=8\nCONFIG_SERIAL_8250_RUNTIME_UARTS=8\n# CONFIG_SERIAL_8250_EXTENDED is not set\nCONFIG_SERIAL_8250_DWLIB=y\nCONFIG_SERIAL_8250_FSL=y\nCONFIG_SERIAL_8250_DW=y\n# CONFIG_SERIAL_8250_RT288X is not set\nCONFIG_SERIAL_OF_PLATFORM=y\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_SIFIVE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_ST_ASC is not set\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\nCONFIG_SERIAL_MCTRL_GPIO=y\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NULL_TTY is not set\n# CONFIG_HVC_DCC is not set\nCONFIG_SERIAL_DEV_BUS=y\nCONFIG_SERIAL_DEV_CTRL_TTYPORT=y\n# CONFIG_TTY_PRINTK is not set\n# CONFIG_VIRTIO_CONSOLE is not set\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=m\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_BA431 is not set\n# CONFIG_HW_RANDOM_CCTRNG is not set\n# CONFIG_HW_RANDOM_XIPHERA is not set\nCONFIG_HW_RANDOM_ARM_SMCCC_TRNG=m\nCONFIG_DEVMEM=y\n# CONFIG_TCG_TPM is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\nCONFIG_RANDOM_TRUST_CPU=y\n# CONFIG_RANDOM_TRUST_BOOTLOADER is not set\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\n# CONFIG_I2C_MUX_PINCTRL is not set\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_DEMUX_PINCTRL is not set\n# CONFIG_I2C_MUX_MLXCPLD is not set\n# end of Multiplexer I2C Chip support\n\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CBUS_GPIO is not set\n# CONFIG_I2C_DESIGNWARE_PLATFORM is not set\n# CONFIG_I2C_EMEV2 is not set\n# CONFIG_I2C_GPIO is not set\nCONFIG_I2C_MV64XXX=y\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_RK3X is not set\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\n# CONFIG_SPI_MEM is not set\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\n# CONFIG_SPI_BITBANG is not set\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_CADENCE_QUADSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_NXP_FLEXSPI is not set\n# CONFIG_SPI_GPIO is not set\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_MICROCHIP_CORE is not set\n# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set\n# CONFIG_SPI_OC_TINY is not set\n# CONFIG_SPI_ROCKCHIP is not set\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_SIFIVE is not set\nCONFIG_SPI_SUN4I=y\nCONFIG_SPI_SUN6I=y\n# CONFIG_SPI_MXIC is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_AMD is not set\n\n#\n# SPI Multiplexer support\n#\n# CONFIG_SPI_MUX is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=m\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\nCONFIG_SPI_DYNAMIC=y\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\nCONFIG_PTP_1588_CLOCK_KVM=y\n# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set\n# CONFIG_PTP_1588_CLOCK_IDTCM is not set\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\nCONFIG_PINCTRL_AXP209=y\n# CONFIG_PINCTRL_CY8C95X0 is not set\n# CONFIG_PINCTRL_MCP23S08 is not set\n# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set\n# CONFIG_PINCTRL_OCELOT is not set\n# CONFIG_PINCTRL_SINGLE is not set\n# CONFIG_PINCTRL_STMFX is not set\n# CONFIG_PINCTRL_SX150X is not set\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\nCONFIG_PINCTRL_SUNXI=y\nCONFIG_PINCTRL_SUN4I_A10=y\n# CONFIG_PINCTRL_SUN5I is not set\n# CONFIG_PINCTRL_SUN6I_A31 is not set\n# CONFIG_PINCTRL_SUN6I_A31_R is not set\n# CONFIG_PINCTRL_SUN8I_A23 is not set\n# CONFIG_PINCTRL_SUN8I_A33 is not set\n# CONFIG_PINCTRL_SUN8I_A83T is not set\n# CONFIG_PINCTRL_SUN8I_A83T_R is not set\n# CONFIG_PINCTRL_SUN8I_A23_R is not set\nCONFIG_PINCTRL_SUN8I_H3=y\nCONFIG_PINCTRL_SUN8I_H3_R=y\n# CONFIG_PINCTRL_SUN8I_V3S is not set\n# CONFIG_PINCTRL_SUN9I_A80 is not set\n# CONFIG_PINCTRL_SUN9I_A80_R is not set\n# CONFIG_PINCTRL_SUN20I_D1 is not set\n# CONFIG_PINCTRL_SUN50I_A64 is not set\n# CONFIG_PINCTRL_SUN50I_A64_R is not set\n# CONFIG_PINCTRL_SUN50I_A100 is not set\n# CONFIG_PINCTRL_SUN50I_A100_R is not set\n# CONFIG_PINCTRL_SUN50I_H5 is not set\n# CONFIG_PINCTRL_SUN50I_H6 is not set\n# CONFIG_PINCTRL_SUN50I_H6_R is not set\n# CONFIG_PINCTRL_SUN50I_H616 is not set\n# CONFIG_PINCTRL_SUN50I_H616_R is not set\nCONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_SYSFS=y\nCONFIG_GPIO_CDEV=y\nCONFIG_GPIO_CDEV_V1=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_CADENCE is not set\n# CONFIG_GPIO_DWAPB is not set\n# CONFIG_GPIO_FTGPIO010 is not set\n# CONFIG_GPIO_GENERIC_PLATFORM is not set\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_LOGICVC is not set\n# CONFIG_GPIO_MB86S7X is not set\n# CONFIG_GPIO_MPC8XXX is not set\n# CONFIG_GPIO_SIFIVE is not set\n# CONFIG_GPIO_SYSCON is not set\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_ZEVIO is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_GW_PLD is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\n# CONFIG_GPIO_PCA953X is not set\n# CONFIG_GPIO_PCA9570 is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\n# CONFIG_HTC_EGPIO is not set\n# end of MFD GPIO expanders\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n# end of SPI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_SIM is not set\n# end of Virtual GPIO drivers\n\n# CONFIG_W1 is not set\n# CONFIG_POWER_RESET is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\nCONFIG_POWER_SUPPLY_HWMON=y\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_IP5XXX_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SAMSUNG_SDI is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_CHARGER_AXP20X is not set\n# CONFIG_BATTERY_AXP20X is not set\nCONFIG_AXP20X_POWER=y\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_MAX77976 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_UCS1002 is not set\n# CONFIG_CHARGER_BD99954 is not set\n# CONFIG_BATTERY_UG3105 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM1177 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_AHT10 is not set\n# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set\n# CONFIG_SENSORS_AS370 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_AXI_FAN_CONTROL is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_CORSAIR_CPRO is not set\n# CONFIG_SENSORS_CORSAIR_PSU is not set\n# CONFIG_SENSORS_DRIVETEMP is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\n# CONFIG_SENSORS_GPIO_FAN is not set\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IIO_HWMON is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2947_I2C is not set\n# CONFIG_SENSORS_LTC2947_SPI is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC2992 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX127 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX31730 is not set\n# CONFIG_SENSORS_MAX31760 is not set\n# CONFIG_SENSORS_MAX6620 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_TPS23861 is not set\n# CONFIG_SENSORS_MR75203 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775_I2C is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_NZXT_KRAKEN2 is not set\n# CONFIG_SENSORS_NZXT_SMART2 is not set\n# CONFIG_SENSORS_OCC_P8_I2C is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\n# CONFIG_SENSORS_PWM_FAN is not set\n# CONFIG_SENSORS_SBTSI is not set\n# CONFIG_SENSORS_SBRMI is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHT4x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC2305 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_INA238 is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_TMP464 is not set\n# CONFIG_SENSORS_TMP513 is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_NETLINK is not set\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\n# CONFIG_THERMAL_WRITABLE_TRIPS is not set\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\nCONFIG_CPU_THERMAL=y\nCONFIG_CPU_FREQ_THERMAL=y\nCONFIG_DEVFREQ_THERMAL=y\n# CONFIG_THERMAL_EMULATION is not set\n# CONFIG_THERMAL_MMIO is not set\nCONFIG_SUN8I_THERMAL=y\nCONFIG_GENERIC_ADC_THERMAL=y\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\nCONFIG_WATCHDOG_OPEN_TIMEOUT=0\n# CONFIG_WATCHDOG_SYSFS is not set\n# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\n# CONFIG_FTWDT010_WATCHDOG is not set\n# CONFIG_DW_WATCHDOG is not set\nCONFIG_SUNXI_WATCHDOG=y\n# CONFIG_MAX63XX_WATCHDOG is not set\n# CONFIG_ARM_SMC_WATCHDOG is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\nCONFIG_SSB=m\nCONFIG_SSB_BLOCKIO=y\nCONFIG_SSB_SDIOHOST_POSSIBLE=y\n# CONFIG_SSB_SDIOHOST is not set\n# CONFIG_SSB_DRIVER_GPIO is not set\nCONFIG_BCMA_POSSIBLE=y\nCONFIG_BCMA=m\nCONFIG_BCMA_BLOCKIO=y\n# CONFIG_BCMA_HOST_SOC is not set\n# CONFIG_BCMA_DRIVER_GMAC_CMN is not set\n# CONFIG_BCMA_DRIVER_GPIO is not set\n# CONFIG_BCMA_DEBUG is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_ACT8945A is not set\nCONFIG_MFD_SUN4I_GPADC=y\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AC100 is not set\n# CONFIG_MFD_AC200 is not set\nCONFIG_MFD_AXP20X=y\nCONFIG_MFD_AXP20X_I2C=y\nCONFIG_MFD_AXP20X_RSB=y\n# CONFIG_MFD_MADERA is not set\n# CONFIG_MFD_ASIC3 is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_GATEWORKS_GSC is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_MP2629 is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77620 is not set\n# CONFIG_MFD_MAX77650 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77714 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6370 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_MFD_OCELOT is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_NTXEC is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_PM8XXX is not set\n# CONFIG_MFD_SY7636A is not set\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RT5120 is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_RK808 is not set\n# CONFIG_MFD_RN5T618 is not set\n# CONFIG_MFD_SEC_CORE is not set\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SUN6I_PRCM=y\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\nCONFIG_MFD_WL1273_CORE=m\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_T7L66XB is not set\n# CONFIG_MFD_TC6387XB is not set\n# CONFIG_MFD_TC6393XB is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_LOCHNAGAR is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_MFD_ROHM_BD718XX is not set\n# CONFIG_MFD_ROHM_BD71828 is not set\n# CONFIG_MFD_ROHM_BD957XMUF is not set\n# CONFIG_MFD_STPMIC1 is not set\n# CONFIG_MFD_STMFX is not set\n# CONFIG_MFD_ATC260X_I2C is not set\n# CONFIG_MFD_QCOM_PM8008 is not set\n# CONFIG_RAVE_SP_CORE is not set\n# CONFIG_MFD_INTEL_M10_BMC is not set\n# CONFIG_MFD_RSMU_I2C is not set\n# CONFIG_MFD_RSMU_SPI is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\nCONFIG_REGULATOR_AXP20X=y\n# CONFIG_REGULATOR_DA9121 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\n# CONFIG_REGULATOR_FAN53880 is not set\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MAX20086 is not set\n# CONFIG_REGULATOR_MAX77826 is not set\n# CONFIG_REGULATOR_MCP16502 is not set\n# CONFIG_REGULATOR_MP5416 is not set\n# CONFIG_REGULATOR_MP8859 is not set\n# CONFIG_REGULATOR_MP886X is not set\n# CONFIG_REGULATOR_MPQ7920 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PF8X00 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\n# CONFIG_REGULATOR_PWM is not set\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT5190A is not set\n# CONFIG_REGULATOR_RT5759 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\n# CONFIG_REGULATOR_SLG51000 is not set\nCONFIG_REGULATOR_SY8106A=y\n# CONFIG_REGULATOR_SY8824X is not set\n# CONFIG_REGULATOR_SY8827N is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS6286X is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\n# CONFIG_REGULATOR_VCTRL is not set\nCONFIG_RC_CORE=y\nCONFIG_BPF_LIRC_MODE2=y\nCONFIG_LIRC=y\nCONFIG_RC_MAP=y\nCONFIG_RC_DECODERS=y\nCONFIG_IR_IMON_DECODER=y\nCONFIG_IR_JVC_DECODER=y\nCONFIG_IR_MCE_KBD_DECODER=y\nCONFIG_IR_NEC_DECODER=y\nCONFIG_IR_RC5_DECODER=y\nCONFIG_IR_RC6_DECODER=y\nCONFIG_IR_RCMM_DECODER=y\nCONFIG_IR_SANYO_DECODER=y\nCONFIG_IR_SHARP_DECODER=y\nCONFIG_IR_SONY_DECODER=y\nCONFIG_IR_XMP_DECODER=y\nCONFIG_RC_DEVICES=y\nCONFIG_IR_GPIO_CIR=m\nCONFIG_IR_GPIO_TX=m\n# CONFIG_IR_HIX5HD2 is not set\nCONFIG_IR_IGORPLUGUSB=m\nCONFIG_IR_IGUANA=m\nCONFIG_IR_IMON=m\nCONFIG_IR_IMON_RAW=m\nCONFIG_IR_MCEUSB=m\n# CONFIG_IR_PWM_TX is not set\nCONFIG_IR_REDRAT3=m\n# CONFIG_IR_SERIAL is not set\n# CONFIG_IR_SPI is not set\nCONFIG_IR_STREAMZAP=m\nCONFIG_IR_SUNXI=y\nCONFIG_IR_TOY=m\nCONFIG_IR_TTUSBIR=m\nCONFIG_RC_ATI_REMOTE=m\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_RC_XBOX_DVD=y\nCONFIG_CEC_CORE=y\nCONFIG_CEC_NOTIFIER=y\nCONFIG_CEC_PIN=y\n\n#\n# CEC support\n#\n# CONFIG_MEDIA_CEC_RC is not set\n# CONFIG_CEC_PIN_ERROR_INJ is not set\nCONFIG_MEDIA_CEC_SUPPORT=y\n# CONFIG_CEC_CH7322 is not set\nCONFIG_CEC_GPIO=m\nCONFIG_USB_PULSE8_CEC=m\nCONFIG_USB_RAINSHADOW_CEC=m\n# end of CEC support\n\nCONFIG_MEDIA_SUPPORT=y\n# CONFIG_MEDIA_SUPPORT_FILTER is not set\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\nCONFIG_MEDIA_RADIO_SUPPORT=y\nCONFIG_MEDIA_SDR_SUPPORT=y\nCONFIG_MEDIA_PLATFORM_SUPPORT=y\nCONFIG_MEDIA_TEST_SUPPORT=y\n# end of Media device types\n\n#\n# Media core support\n#\nCONFIG_VIDEO_DEV=y\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_DVB_CORE=y\n# end of Media core support\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2_I2C=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_VIDEO_TUNER=m\nCONFIG_V4L2_MEM2MEM_DEV=y\nCONFIG_V4L2_FWNODE=y\nCONFIG_V4L2_ASYNC=y\nCONFIG_VIDEOBUF_GEN=m\nCONFIG_VIDEOBUF_VMALLOC=m\n# end of Video4Linux options\n\n#\n# Media controller options\n#\nCONFIG_MEDIA_CONTROLLER_DVB=y\nCONFIG_MEDIA_CONTROLLER_REQUEST_API=y\n# end of Media controller options\n\n#\n# Digital TV options\n#\n# CONFIG_DVB_MMAP is not set\nCONFIG_DVB_NET=y\nCONFIG_DVB_MAX_ADAPTERS=16\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set\n# CONFIG_DVB_ULE_DEBUG is not set\n# end of Digital TV options\n\n#\n# Media drivers\n#\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_USB_S2255 is not set\n# CONFIG_VIDEO_USBTV is not set\nCONFIG_USB_VIDEO_CLASS=m\n# CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV is not set\n\n#\n# Analog TV USB devices\n#\nCONFIG_VIDEO_GO7007=m\nCONFIG_VIDEO_GO7007_USB=m\nCONFIG_VIDEO_GO7007_LOADER=m\nCONFIG_VIDEO_GO7007_USB_S2250_BOARD=m\nCONFIG_VIDEO_HDPVR=m\nCONFIG_VIDEO_PVRUSB2=m\nCONFIG_VIDEO_PVRUSB2_SYSFS=y\nCONFIG_VIDEO_PVRUSB2_DVB=y\n# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set\nCONFIG_VIDEO_STK1160_COMMON=m\nCONFIG_VIDEO_STK1160=m\n\n#\n# Analog/digital TV USB devices\n#\nCONFIG_VIDEO_AU0828=m\nCONFIG_VIDEO_AU0828_V4L2=y\nCONFIG_VIDEO_AU0828_RC=y\n# CONFIG_VIDEO_CX231XX is not set\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_AS102=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\n# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_DVBSKY=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_DVB_USB_ZD1301=m\nCONFIG_DVB_USB=m\n# CONFIG_DVB_USB_DEBUG is not set\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_CXUSB=m\nCONFIG_DVB_USB_CXUSB_ANALOG=y\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_DIB3000MC=m\nCONFIG_DVB_USB_DIBUSB_MB=m\n# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_DTT200U=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_OPERA1=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_SMS_USB_DRV=m\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\n# CONFIG_VIDEO_EM28XX is not set\n\n#\n# Software defined radio USB devices\n#\n# CONFIG_USB_AIRSPY is not set\n# CONFIG_USB_HACKRF is not set\n# CONFIG_USB_MSI2500 is not set\nCONFIG_RADIO_ADAPTERS=y\nCONFIG_RADIO_SAA7706H=m\nCONFIG_RADIO_SHARK=m\nCONFIG_RADIO_SHARK2=m\nCONFIG_RADIO_SI4713=m\nCONFIG_RADIO_TEA575X=m\nCONFIG_RADIO_TEA5764=m\nCONFIG_RADIO_TEF6862=m\nCONFIG_RADIO_WL1273=m\nCONFIG_USB_DSBR=m\nCONFIG_USB_KEENE=m\nCONFIG_USB_MA901=m\nCONFIG_USB_MR800=m\nCONFIG_USB_RAREMONO=m\nCONFIG_RADIO_SI470X=m\nCONFIG_USB_SI470X=m\nCONFIG_I2C_SI470X=m\nCONFIG_USB_SI4713=m\nCONFIG_PLATFORM_SI4713=m\nCONFIG_I2C_SI4713=m\nCONFIG_MEDIA_PLATFORM_DRIVERS=y\n# CONFIG_V4L_PLATFORM_DRIVERS is not set\n# CONFIG_SDR_PLATFORM_DRIVERS is not set\n# CONFIG_DVB_PLATFORM_DRIVERS is not set\nCONFIG_V4L_MEM2MEM_DRIVERS=y\n# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set\n\n#\n# Allegro DVT media platform drivers\n#\n\n#\n# Amlogic media platform drivers\n#\n\n#\n# Amphion drivers\n#\n\n#\n# Aspeed media platform drivers\n#\n\n#\n# Atmel media platform drivers\n#\n\n#\n# Cadence media platform drivers\n#\n# CONFIG_VIDEO_CADENCE_CSI2RX is not set\n# CONFIG_VIDEO_CADENCE_CSI2TX is not set\n\n#\n# Chips&Media media platform drivers\n#\n\n#\n# Intel media platform drivers\n#\n\n#\n# Marvell media platform drivers\n#\n\n#\n# Mediatek media platform drivers\n#\n\n#\n# NVidia media platform drivers\n#\n\n#\n# NXP media platform drivers\n#\n\n#\n# Qualcomm media platform drivers\n#\n\n#\n# Renesas media platform drivers\n#\n\n#\n# Rockchip media platform drivers\n#\n\n#\n# Samsung media platform drivers\n#\n\n#\n# STMicroelectronics media platform drivers\n#\n\n#\n# Sunxi media platform drivers\n#\nCONFIG_VIDEO_SUN8I_DEINTERLACE=m\n# CONFIG_VIDEO_SUN50I_DEINTERLACE is not set\nCONFIG_VIDEO_SUN8I_ROTATE=m\n\n#\n# Texas Instruments drivers\n#\n\n#\n# Verisilicon media platform drivers\n#\n# CONFIG_VIDEO_HANTRO is not set\n\n#\n# VIA media platform drivers\n#\n\n#\n# Xilinx media platform drivers\n#\n\n#\n# MMC/SDIO DVB adapters\n#\n# CONFIG_SMS_SDIO_DRV is not set\n# CONFIG_V4L_TEST_DRIVERS is not set\n# CONFIG_DVB_TEST_DRIVERS is not set\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_TTPCI_EEPROM=m\nCONFIG_VIDEO_CX2341X=m\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\nCONFIG_VIDEOBUF2_CORE=y\nCONFIG_VIDEOBUF2_V4L2=y\nCONFIG_VIDEOBUF2_MEMOPS=y\nCONFIG_VIDEOBUF2_DMA_CONTIG=y\nCONFIG_VIDEOBUF2_VMALLOC=m\n# end of Media drivers\n\n#\n# Media ancillary drivers\n#\nCONFIG_MEDIA_ATTACH=y\n\n#\n# IR I2C driver auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_IR_I2C=y\nCONFIG_VIDEO_CAMERA_SENSOR=y\n# CONFIG_VIDEO_AR0521 is not set\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_HI846 is not set\n# CONFIG_VIDEO_HI847 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_IMX412 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\n# CONFIG_VIDEO_MT9V011 is not set\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_OG01A1B is not set\n# CONFIG_VIDEO_OV02A10 is not set\n# CONFIG_VIDEO_OV08D10 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\n# CONFIG_VIDEO_OV2640 is not set\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5693 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV7251 is not set\nCONFIG_VIDEO_OV7640=m\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9282 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# Audio decoders, processors and mixers\n#\nCONFIG_VIDEO_CS3308=m\nCONFIG_VIDEO_CS5345=m\nCONFIG_VIDEO_CS53L32A=m\nCONFIG_VIDEO_MSP3400=m\nCONFIG_VIDEO_SONY_BTF_MPX=m\nCONFIG_VIDEO_TDA1997X=m\nCONFIG_VIDEO_TDA7432=m\nCONFIG_VIDEO_TDA9840=m\nCONFIG_VIDEO_TEA6415C=m\nCONFIG_VIDEO_TEA6420=m\nCONFIG_VIDEO_TLV320AIC23B=m\nCONFIG_VIDEO_TVAUDIO=m\nCONFIG_VIDEO_UDA1342=m\nCONFIG_VIDEO_VP27SMPX=m\nCONFIG_VIDEO_WM8739=m\nCONFIG_VIDEO_WM8775=m\n# end of Audio decoders, processors and mixers\n\n#\n# RDS decoders\n#\nCONFIG_VIDEO_SAA6588=m\n# end of RDS decoders\n\n#\n# Video decoders\n#\nCONFIG_VIDEO_ADV7180=m\nCONFIG_VIDEO_ADV7183=m\nCONFIG_VIDEO_ADV748X=m\nCONFIG_VIDEO_ADV7604=m\nCONFIG_VIDEO_ADV7604_CEC=y\nCONFIG_VIDEO_ADV7842=m\nCONFIG_VIDEO_ADV7842_CEC=y\nCONFIG_VIDEO_BT819=m\nCONFIG_VIDEO_BT856=m\nCONFIG_VIDEO_BT866=m\n# CONFIG_VIDEO_ISL7998X is not set\nCONFIG_VIDEO_KS0127=m\n# CONFIG_VIDEO_MAX9286 is not set\nCONFIG_VIDEO_ML86V7667=m\nCONFIG_VIDEO_SAA7110=m\nCONFIG_VIDEO_SAA711X=m\nCONFIG_VIDEO_TC358743=m\nCONFIG_VIDEO_TC358743_CEC=y\nCONFIG_VIDEO_TVP514X=m\nCONFIG_VIDEO_TVP5150=m\nCONFIG_VIDEO_TVP7002=m\nCONFIG_VIDEO_TW2804=m\nCONFIG_VIDEO_TW9903=m\nCONFIG_VIDEO_TW9906=m\nCONFIG_VIDEO_TW9910=m\nCONFIG_VIDEO_VPX3220=m\n\n#\n# Video and audio decoders\n#\nCONFIG_VIDEO_SAA717X=m\nCONFIG_VIDEO_CX25840=m\n# end of Video decoders\n\n#\n# Video encoders\n#\nCONFIG_VIDEO_AD9389B=m\nCONFIG_VIDEO_ADV7170=m\nCONFIG_VIDEO_ADV7175=m\nCONFIG_VIDEO_ADV7343=m\nCONFIG_VIDEO_ADV7393=m\nCONFIG_VIDEO_ADV7511=m\nCONFIG_VIDEO_ADV7511_CEC=y\nCONFIG_VIDEO_AK881X=m\nCONFIG_VIDEO_SAA7127=m\nCONFIG_VIDEO_SAA7185=m\nCONFIG_VIDEO_THS8200=m\n# end of Video encoders\n\n#\n# Video improvement chips\n#\nCONFIG_VIDEO_UPD64031A=m\nCONFIG_VIDEO_UPD64083=m\n# end of Video improvement chips\n\n#\n# Audio/Video compression chips\n#\nCONFIG_VIDEO_SAA6752HS=m\n# end of Audio/Video compression chips\n\n#\n# SDR tuner chips\n#\nCONFIG_SDR_MAX2175=m\n# end of SDR tuner chips\n\n#\n# Miscellaneous helper chips\n#\nCONFIG_VIDEO_I2C=m\nCONFIG_VIDEO_M52790=m\nCONFIG_VIDEO_ST_MIPID02=m\nCONFIG_VIDEO_THS7303=m\n# end of Miscellaneous helper chips\n\n#\n# Media SPI Adapters\n#\n# CONFIG_CXD2880_SPI_DRV is not set\nCONFIG_VIDEO_GS1662=m\n# end of Media SPI Adapters\n\nCONFIG_MEDIA_TUNER=y\n\n#\n# Customize TV tuners\n#\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_IT913X=m\nCONFIG_MEDIA_TUNER_M88RS6000T=m\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_MC44S803=y\nCONFIG_MEDIA_TUNER_MSI001=m\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT20XX=y\nCONFIG_MEDIA_TUNER_MT2131=m\nCONFIG_MEDIA_TUNER_MT2266=m\nCONFIG_MEDIA_TUNER_MXL301RF=m\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\nCONFIG_MEDIA_TUNER_QM1D1B0004=m\nCONFIG_MEDIA_TUNER_QM1D1C0042=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_R820T=m\nCONFIG_MEDIA_TUNER_SI2157=m\nCONFIG_MEDIA_TUNER_SIMPLE=y\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_TDA18250=m\nCONFIG_MEDIA_TUNER_TDA18271=y\nCONFIG_MEDIA_TUNER_TDA827X=y\nCONFIG_MEDIA_TUNER_TDA8290=y\nCONFIG_MEDIA_TUNER_TDA9887=y\nCONFIG_MEDIA_TUNER_TEA5761=y\nCONFIG_MEDIA_TUNER_TEA5767=y\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_XC2028=y\nCONFIG_MEDIA_TUNER_XC4000=y\nCONFIG_MEDIA_TUNER_XC5000=y\n# end of Customize TV tuners\n\n#\n# Customise DVB Frontends\n#\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_M88DS3103=m\nCONFIG_DVB_MXL5XX=m\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\nCONFIG_DVB_STV0910=m\nCONFIG_DVB_STV6110x=m\nCONFIG_DVB_STV6111=m\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_MN88472=m\nCONFIG_DVB_MN88473=m\nCONFIG_DVB_SI2165=m\nCONFIG_DVB_TDA18271C2DD=m\n\n#\n# DVB-S (satellite) frontends\n#\nCONFIG_DVB_CX24110=m\nCONFIG_DVB_CX24116=m\nCONFIG_DVB_CX24117=m\nCONFIG_DVB_CX24120=m\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_DS3000=m\nCONFIG_DVB_MB86A16=m\nCONFIG_DVB_MT312=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_TDA10071=m\nCONFIG_DVB_TDA10086=m\nCONFIG_DVB_TDA8083=m\nCONFIG_DVB_TDA8261=m\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_TS2020=m\nCONFIG_DVB_TUA6100=m\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TUNER_ITD1000=m\nCONFIG_DVB_VES1X93=m\nCONFIG_DVB_ZL10036=m\nCONFIG_DVB_ZL10039=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_AS102_FE=m\nCONFIG_DVB_CX22700=m\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_CXD2841ER=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\nCONFIG_DVB_DIB9000=m\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_GP8PSK_FE=m\nCONFIG_DVB_L64781=m\nCONFIG_DVB_MT352=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\nCONFIG_DVB_RTL2832_SDR=m\nCONFIG_DVB_S5H1432=m\nCONFIG_DVB_SI2168=m\nCONFIG_DVB_SP887X=m\nCONFIG_DVB_STV0367=m\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_ZD1301_DEMOD=m\nCONFIG_DVB_ZL10353=m\nCONFIG_DVB_CXD2880=m\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_STV0297=m\nCONFIG_DVB_TDA10021=m\nCONFIG_DVB_TDA10023=m\nCONFIG_DVB_VES1820=m\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_AU8522=m\nCONFIG_DVB_AU8522_DTV=m\nCONFIG_DVB_AU8522_V4L=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LGDT3306A=m\nCONFIG_DVB_LGDT330X=m\n# CONFIG_DVB_MXL692 is not set\nCONFIG_DVB_NXT200X=m\nCONFIG_DVB_OR51132=m\nCONFIG_DVB_OR51211=m\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_S5H1411=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\nCONFIG_DVB_S921=m\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_MN88443X=m\nCONFIG_DVB_TC90522=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_A8293=m\nCONFIG_DVB_AF9033=m\nCONFIG_DVB_ASCOT2E=m\nCONFIG_DVB_ATBM8830=m\nCONFIG_DVB_HELENE=m\nCONFIG_DVB_HORUS3A=m\nCONFIG_DVB_ISL6405=m\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_IX2505V=m\nCONFIG_DVB_LGS8GL5=m\nCONFIG_DVB_LGS8GXX=m\nCONFIG_DVB_LNBH25=m\nCONFIG_DVB_LNBH29=m\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_M88RS2000=m\nCONFIG_DVB_TDA665x=m\nCONFIG_DVB_DRX39XYJ=m\n\n#\n# Common Interface (EN50221) controller drivers\n#\nCONFIG_DVB_CXD2099=m\nCONFIG_DVB_SP2=m\n# end of Customise DVB Frontends\n\n#\n# Tools to develop new frontends\n#\n# CONFIG_DVB_DUMMY_FE is not set\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\nCONFIG_APERTURE_HELPERS=y\n# CONFIG_IMX_IPUV3_CORE is not set\nCONFIG_DRM=y\nCONFIG_DRM_MIPI_DSI=y\n# CONFIG_DRM_DEBUG_MM is not set\nCONFIG_DRM_KMS_HELPER=y\n# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set\n# CONFIG_DRM_DEBUG_MODESET_LOCK is not set\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\n# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\nCONFIG_DRM_DISPLAY_HELPER=y\nCONFIG_DRM_DISPLAY_HDMI_HELPER=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_GEM_DMA_HELPER=y\nCONFIG_DRM_GEM_SHMEM_HELPER=m\nCONFIG_DRM_SCHED=m\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_KOMEDA is not set\n# end of ARM devices\n\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\n# CONFIG_DRM_EXYNOS is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_ARMADA is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_USE_LVDS is not set\n# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set\nCONFIG_DRM_SUN4I=y\nCONFIG_DRM_SUN4I_HDMI=y\nCONFIG_DRM_SUN4I_HDMI_CEC=y\nCONFIG_DRM_SUN4I_BACKEND=y\nCONFIG_DRM_SUN6I_DSI=y\nCONFIG_DRM_SUN8I_DW_HDMI=y\nCONFIG_DRM_SUN8I_MIXER=y\nCONFIG_DRM_SUN8I_TCON_TOP=y\n# CONFIG_DRM_OMAP is not set\n# CONFIG_DRM_TILCDC is not set\n# CONFIG_DRM_FSL_DCU is not set\n# CONFIG_DRM_STM is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set\n# CONFIG_DRM_PANEL_ARM_VERSATILE is not set\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\n# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LB035Q02 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set\n# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set\n# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set\n# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set\n# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_CHRONTEL_CH7033 is not set\nCONFIG_DRM_DISPLAY_CONNECTOR=m\n# CONFIG_DRM_ITE_IT6505 is not set\n# CONFIG_DRM_LONTIUM_LT8912B is not set\n# CONFIG_DRM_LONTIUM_LT9211 is not set\n# CONFIG_DRM_LONTIUM_LT9611 is not set\n# CONFIG_DRM_LONTIUM_LT9611UXC is not set\n# CONFIG_DRM_ITE_IT66121 is not set\n# CONFIG_DRM_LVDS_CODEC is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NWL_MIPI_DSI is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_PARADE_PS8640 is not set\n# CONFIG_DRM_SIL_SII8620 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_SII9234 is not set\nCONFIG_DRM_SIMPLE_BRIDGE=m\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\n# CONFIG_DRM_TOSHIBA_TC358762 is not set\n# CONFIG_DRM_TOSHIBA_TC358764 is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TOSHIBA_TC358768 is not set\n# CONFIG_DRM_TOSHIBA_TC358775 is not set\n# CONFIG_DRM_TI_DLPC3433 is not set\n# CONFIG_DRM_TI_TFP410 is not set\n# CONFIG_DRM_TI_SN65DSI83 is not set\n# CONFIG_DRM_TI_SN65DSI86 is not set\n# CONFIG_DRM_TI_TPD12S015 is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_ANALOGIX_ANX7625 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_CDNS_MHDP8546 is not set\nCONFIG_DRM_DW_HDMI=y\n# CONFIG_DRM_DW_HDMI_AHB_AUDIO is not set\nCONFIG_DRM_DW_HDMI_I2S_AUDIO=y\n# CONFIG_DRM_DW_HDMI_GP_AUDIO is not set\nCONFIG_DRM_DW_HDMI_CEC=y\n# end of Display Interface Bridges\n\n# CONFIG_DRM_STI is not set\n# CONFIG_DRM_ETNAVIV is not set\n# CONFIG_DRM_LOGICVC is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_PANEL_MIPI_DBI is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_TINYDRM_HX8357D is not set\n# CONFIG_TINYDRM_ILI9163 is not set\n# CONFIG_TINYDRM_ILI9225 is not set\n# CONFIG_TINYDRM_ILI9341 is not set\n# CONFIG_TINYDRM_ILI9486 is not set\n# CONFIG_TINYDRM_MI0283QT is not set\n# CONFIG_TINYDRM_REPAPER is not set\n# CONFIG_TINYDRM_ST7586 is not set\n# CONFIG_TINYDRM_ST7735R is not set\n# CONFIG_DRM_PL111 is not set\n# CONFIG_DRM_TVE200 is not set\nCONFIG_DRM_LIMA=m\n# CONFIG_DRM_PANFROST is not set\n# CONFIG_DRM_MCDE is not set\n# CONFIG_DRM_TIDSS is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_SSD130X is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_DRM_NOMODESET=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\n# CONFIG_FB_MODE_HELPERS is not set\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\nCONFIG_FB_SIMPLE=y\n# CONFIG_FB_SSD1307 is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\n# CONFIG_LCD_CLASS_DEVICE is not set\n# CONFIG_BACKLIGHT_CLASS_DEVICE is not set\n# end of Backlight & LCD device support\n\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_FRAMEBUFFER_CONSOLE=y\n# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\n# end of Console display driver support\n\n# CONFIG_LOGO is not set\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_HWDEP=m\nCONFIG_SND_RAWMIDI=m\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\n# CONFIG_SND_HRTIMER is not set\n# CONFIG_SND_DYNAMIC_MINORS is not set\nCONFIG_SND_SUPPORT_OLD_API=y\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_CTL_INPUT_VALIDATION is not set\n# CONFIG_SND_SEQUENCER is not set\nCONFIG_SND_DRIVERS=y\n# CONFIG_SND_DUMMY is not set\n# CONFIG_SND_ALOOP is not set\n# CONFIG_SND_MTPAV is not set\n# CONFIG_SND_SERIAL_U16550 is not set\n# CONFIG_SND_SERIAL_GENERIC is not set\n# CONFIG_SND_MPU401 is not set\n\n#\n# HD-Audio\n#\n# end of HD-Audio\n\nCONFIG_SND_HDA_PREALLOC_SIZE=64\nCONFIG_SND_ARM=y\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=m\nCONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y\n# CONFIG_SND_USB_UA101 is not set\n# CONFIG_SND_USB_CAIAQ is not set\n# CONFIG_SND_USB_6FIRE is not set\n# CONFIG_SND_USB_HIFACE is not set\n# CONFIG_SND_BCD2000 is not set\n# CONFIG_SND_USB_POD is not set\n# CONFIG_SND_USB_PODHD is not set\n# CONFIG_SND_USB_TONEPORT is not set\n# CONFIG_SND_USB_VARIAX is not set\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\n# CONFIG_SND_SOC_ADI is not set\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_AMD_ACP_CONFIG is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_AUDMIX is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_FSL_MICFIL is not set\n# CONFIG_SND_SOC_FSL_XCVR is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n#\n# Allwinner SoC Audio support\n#\nCONFIG_SND_SUN4I_CODEC=y\nCONFIG_SND_SUN8I_CODEC=y\nCONFIG_SND_SUN8I_CODEC_ANALOG=y\nCONFIG_SND_SUN4I_I2S=y\nCONFIG_SND_SUN4I_SPDIF=y\n# CONFIG_SND_SUN50I_DMIC is not set\nCONFIG_SND_SUN8I_ADDA_PR_REGMAP=y\n# end of Allwinner SoC Audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_SPI is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\n# CONFIG_SND_SOC_ADAU7002 is not set\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4375 is not set\n# CONFIG_SND_SOC_AK4458 is not set\n# CONFIG_SND_SOC_AK4554 is not set\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_AW8738 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS35L41_SPI is not set\n# CONFIG_SND_SOC_CS35L41_I2C is not set\n# CONFIG_SND_SOC_CS35L45_SPI is not set\n# CONFIG_SND_SOC_CS35L45_I2C is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS42L83 is not set\n# CONFIG_SND_SOC_CS4234 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\n# CONFIG_SND_SOC_DA7213 is not set\n# CONFIG_SND_SOC_DMIC is not set\nCONFIG_SND_SOC_HDMI_CODEC=y\n# CONFIG_SND_SOC_ES7134 is not set\n# CONFIG_SND_SOC_ES7241 is not set\n# CONFIG_SND_SOC_ES8316 is not set\n# CONFIG_SND_SOC_ES8326 is not set\n# CONFIG_SND_SOC_ES8328_I2C is not set\n# CONFIG_SND_SOC_ES8328_SPI is not set\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_HDA is not set\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\n# CONFIG_SND_SOC_MAX98088 is not set\n# CONFIG_SND_SOC_MAX98357A is not set\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98520 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX98396 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM179X_SPI is not set\n# CONFIG_SND_SOC_PCM186X_I2C is not set\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3060_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\n# CONFIG_SND_SOC_PCM5102A is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK3328 is not set\n# CONFIG_SND_SOC_RT5616 is not set\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\n# CONFIG_SND_SOC_RT5659 is not set\n# CONFIG_SND_SOC_RT9120 is not set\n# CONFIG_SND_SOC_SGTL5000 is not set\n# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\nCONFIG_SND_SOC_SPDIF=y\n# CONFIG_SND_SOC_SRC4XXX_I2C is not set\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS2780 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805M is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320ADC3XXX is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731_I2C is not set\n# CONFIG_SND_SOC_WM8731_SPI is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8940 is not set\n# CONFIG_SND_SOC_WM8960 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_ZL38060 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8821 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\n# end of CODEC drivers\n\nCONFIG_SND_SIMPLE_CARD_UTILS=y\nCONFIG_SND_SIMPLE_CARD=y\nCONFIG_SND_AUDIO_GRAPH_CARD=y\n# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set\n# CONFIG_SND_TEST_COMPONENT is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\n# CONFIG_HID_APPLEIR is not set\nCONFIG_HID_ASUS=m\nCONFIG_HID_AUREAL=m\n# CONFIG_HID_BELKIN is not set\n# CONFIG_HID_BETOP_FF is not set\nCONFIG_HID_BIGBEN_FF=m\nCONFIG_HID_CHERRY=y\nCONFIG_HID_CHICONY=y\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\nCONFIG_HID_CYPRESS=y\nCONFIG_HID_DRAGONRISE=m\nCONFIG_DRAGONRISE_FF=y\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\nCONFIG_HID_EZKEY=y\n# CONFIG_HID_FT260 is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\nCONFIG_HID_GLORIOUS=m\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\nCONFIG_HID_KYE=m\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_VRC2 is not set\n# CONFIG_HID_XIAOMI is not set\nCONFIG_HID_GYRATION=m\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_ITE is not set\n# CONFIG_HID_JABRA is not set\nCONFIG_HID_TWINHAN=m\nCONFIG_HID_KENSINGTON=y\n# CONFIG_HID_LCPOWER is not set\n# CONFIG_HID_LED is not set\n# CONFIG_HID_LENOVO is not set\n# CONFIG_HID_LETSKETCH is not set\nCONFIG_HID_LOGITECH=y\n# CONFIG_HID_LOGITECH_DJ is not set\nCONFIG_HID_LOGITECH_HIDPP=m\nCONFIG_LOGITECH_FF=y\nCONFIG_LOGIRUMBLEPAD2_FF=y\nCONFIG_LOGIG940_FF=y\nCONFIG_LOGIWHEELS_FF=y\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_MEGAWORLD_FF is not set\n# CONFIG_HID_REDRAGON is not set\nCONFIG_HID_MICROSOFT=y\nCONFIG_HID_MONTEREY=y\nCONFIG_HID_MULTITOUCH=m\nCONFIG_HID_NINTENDO=m\nCONFIG_NINTENDO_FF=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\nCONFIG_HID_ORTEK=m\nCONFIG_HID_OUYA=y\nCONFIG_HID_PANTHERLORD=m\nCONFIG_PANTHERLORD_FF=y\nCONFIG_HID_PENMOUNT=m\nCONFIG_HID_PETALYNX=m\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PXRC is not set\n# CONFIG_HID_RAZER is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\nCONFIG_HID_SAMSUNG=m\n# CONFIG_HID_SEMITEK is not set\n# CONFIG_HID_SIGMAMICRO is not set\nCONFIG_HID_SONY=m\nCONFIG_SONY_FF=y\n# CONFIG_HID_SPEEDLINK is not set\nCONFIG_HID_STEAM=m\n# CONFIG_HID_STEELSERIES is not set\nCONFIG_HID_SUNPLUS=m\nCONFIG_HID_RMI=m\n# CONFIG_HID_GREENASIA is not set\nCONFIG_HID_SMARTJOYPLUS=m\nCONFIG_SMARTJOYPLUS_FF=y\nCONFIG_HID_TIVO=m\nCONFIG_HID_TOPSEED=m\n# CONFIG_HID_TOPRE is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\nCONFIG_HID_WIIMOTE=m\nCONFIG_HID_XINMO=m\n# CONFIG_HID_ZEROPLUS is not set\nCONFIG_HID_ZYDACRON=m\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n# end of USB HID support\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID_OF is not set\n# CONFIG_I2C_HID_OF_ELAN is not set\n# CONFIG_I2C_HID_OF_GOODIX is not set\n# end of I2C HID support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_USB_ULPI_BUS is not set\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\n# CONFIG_USB_OTG is not set\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\nCONFIG_USB_MON=m\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\n# CONFIG_USB_XHCI_HCD is not set\nCONFIG_USB_EHCI_HCD=y\n# CONFIG_USB_EHCI_ROOT_HUB_TT is not set\nCONFIG_USB_EHCI_TT_NEWSCHED=y\n# CONFIG_USB_EHCI_FSL is not set\nCONFIG_USB_EHCI_HCD_PLATFORM=y\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\nCONFIG_USB_OHCI_HCD=y\nCONFIG_USB_OHCI_HCD_PLATFORM=y\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_BCMA is not set\n# CONFIG_USB_HCD_SSB is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=m\n# CONFIG_USB_PRINTER is not set\n# CONFIG_USB_WDM is not set\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\nCONFIG_USB_UAS=y\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\nCONFIG_USB_MUSB_HDRC=y\n# CONFIG_USB_MUSB_HOST is not set\n# CONFIG_USB_MUSB_GADGET is not set\nCONFIG_USB_MUSB_DUAL_ROLE=y\n\n#\n# Platform Glue Layer\n#\nCONFIG_USB_MUSB_SUNXI=y\n\n#\n# MUSB DMA mode\n#\n# CONFIG_MUSB_PIO_ONLY is not set\n# CONFIG_USB_DWC3 is not set\n# CONFIG_USB_DWC2 is not set\n# CONFIG_USB_CHIPIDEA is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=m\n# CONFIG_USB_SERIAL_GENERIC is not set\n# CONFIG_USB_SERIAL_SIMPLE is not set\n# CONFIG_USB_SERIAL_AIRCABLE is not set\n# CONFIG_USB_SERIAL_ARK3116 is not set\n# CONFIG_USB_SERIAL_BELKIN is not set\n# CONFIG_USB_SERIAL_CH341 is not set\n# CONFIG_USB_SERIAL_WHITEHEAT is not set\n# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set\n# CONFIG_USB_SERIAL_CP210X is not set\n# CONFIG_USB_SERIAL_CYPRESS_M8 is not set\n# CONFIG_USB_SERIAL_EMPEG is not set\n# CONFIG_USB_SERIAL_FTDI_SIO is not set\n# CONFIG_USB_SERIAL_VISOR is not set\n# CONFIG_USB_SERIAL_IPAQ is not set\n# CONFIG_USB_SERIAL_IR is not set\n# CONFIG_USB_SERIAL_EDGEPORT is not set\n# CONFIG_USB_SERIAL_EDGEPORT_TI is not set\n# CONFIG_USB_SERIAL_F81232 is not set\n# CONFIG_USB_SERIAL_F8153X is not set\n# CONFIG_USB_SERIAL_GARMIN is not set\n# CONFIG_USB_SERIAL_IPW is not set\n# CONFIG_USB_SERIAL_IUU is not set\n# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set\n# CONFIG_USB_SERIAL_KEYSPAN is not set\n# CONFIG_USB_SERIAL_KLSI is not set\n# CONFIG_USB_SERIAL_KOBIL_SCT is not set\n# CONFIG_USB_SERIAL_MCT_U232 is not set\n# CONFIG_USB_SERIAL_METRO is not set\n# CONFIG_USB_SERIAL_MOS7720 is not set\n# CONFIG_USB_SERIAL_MOS7840 is not set\n# CONFIG_USB_SERIAL_MXUPORT is not set\n# CONFIG_USB_SERIAL_NAVMAN is not set\n# CONFIG_USB_SERIAL_PL2303 is not set\n# CONFIG_USB_SERIAL_OTI6858 is not set\n# CONFIG_USB_SERIAL_QCAUX is not set\n# CONFIG_USB_SERIAL_QUALCOMM is not set\n# CONFIG_USB_SERIAL_SPCP8X5 is not set\n# CONFIG_USB_SERIAL_SAFE is not set\n# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set\n# CONFIG_USB_SERIAL_SYMBOL is not set\n# CONFIG_USB_SERIAL_TI is not set\n# CONFIG_USB_SERIAL_CYBERJACK is not set\n# CONFIG_USB_SERIAL_OPTION is not set\n# CONFIG_USB_SERIAL_OMNINET is not set\n# CONFIG_USB_SERIAL_OPTICON is not set\n# CONFIG_USB_SERIAL_XSENS_MT is not set\n# CONFIG_USB_SERIAL_WISHBONE is not set\n# CONFIG_USB_SERIAL_SSU100 is not set\n# CONFIG_USB_SERIAL_QT2 is not set\n# CONFIG_USB_SERIAL_UPD78F0730 is not set\n# CONFIG_USB_SERIAL_XR is not set\n# CONFIG_USB_SERIAL_DEBUG is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\n# CONFIG_USB_EZUSB_FX2 is not set\n# CONFIG_USB_HUB_USB251XB is not set\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n# CONFIG_USB_ONBOARD_HUB is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\nCONFIG_NOP_USB_XCEIV=y\n# CONFIG_AM335X_PHY_USB is not set\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\n# CONFIG_USB_ULPI is not set\n# end of USB Physical Layer drivers\n\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\n# CONFIG_USB_GADGET_DEBUG_FILES is not set\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=2\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FUSB300 is not set\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\n# CONFIG_USB_SNP_UDC_PLAT is not set\n# CONFIG_USB_M66592 is not set\n# CONFIG_USB_BDC_UDC is not set\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_GADGET_XILINX is not set\n# CONFIG_USB_MAX3420_UDC is not set\n# CONFIG_USB_DUMMY_HCD is not set\n# end of USB Peripheral Controller\n\n# CONFIG_USB_CONFIGFS is not set\n\n#\n# USB Gadget precomposed configurations\n#\n# CONFIG_USB_ZERO is not set\n# CONFIG_USB_AUDIO is not set\n# CONFIG_USB_ETH is not set\n# CONFIG_USB_G_NCM is not set\n# CONFIG_USB_GADGETFS is not set\n# CONFIG_USB_FUNCTIONFS is not set\n# CONFIG_USB_MASS_STORAGE is not set\n# CONFIG_USB_G_SERIAL is not set\n# CONFIG_USB_MIDI_GADGET is not set\n# CONFIG_USB_G_PRINTER is not set\n# CONFIG_USB_CDC_COMPOSITE is not set\n# CONFIG_USB_G_ACM_MS is not set\n# CONFIG_USB_G_MULTI is not set\n# CONFIG_USB_G_HID is not set\n# CONFIG_USB_G_DBGP is not set\n# CONFIG_USB_G_WEBCAM is not set\n# CONFIG_USB_RAW_GADGET is not set\n# end of USB Gadget precomposed configurations\n\n# CONFIG_TYPEC is not set\n# CONFIG_USB_ROLE_SWITCH is not set\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\n# CONFIG_PWRSEQ_SD8787 is not set\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=8\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_DEBUG is not set\n# CONFIG_MMC_SDHCI is not set\n# CONFIG_MMC_SPI is not set\n# CONFIG_MMC_DW is not set\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_SUNXI=y\n# CONFIG_MMC_CQHCI is not set\n# CONFIG_MMC_HSQ is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\n# CONFIG_LEDS_CLASS_FLASH is not set\n# CONFIG_LEDS_CLASS_MULTICOLOR is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AN30259A is not set\n# CONFIG_LEDS_AW2013 is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_EL15203000 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_LP55XX_COMMON is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\n# CONFIG_LEDS_PWM is not set\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_SYSCON is not set\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_SPI_BYTE is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\n\n#\n# RGB LED drivers\n#\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\n# CONFIG_LEDS_TRIGGER_TIMER is not set\n# CONFIG_LEDS_TRIGGER_ONESHOT is not set\nCONFIG_LEDS_TRIGGER_DISK=y\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\n# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set\n# CONFIG_LEDS_TRIGGER_CPU is not set\n# CONFIG_LEDS_TRIGGER_ACTIVITY is not set\n# CONFIG_LEDS_TRIGGER_GPIO is not set\nCONFIG_LEDS_TRIGGER_DEFAULT_ON=y\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\n# CONFIG_LEDS_TRIGGER_TRANSIENT is not set\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\n# CONFIG_LEDS_TRIGGER_PANIC is not set\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\n# CONFIG_LEDS_TRIGGER_AUDIO is not set\n# CONFIG_LEDS_TRIGGER_TTY is not set\n\n#\n# Simple LED drivers\n#\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_ATOMIC_SCRUB=y\nCONFIG_EDAC_SUPPORT=y\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\n# CONFIG_RTC_INTF_SYSFS is not set\n# CONFIG_RTC_INTF_PROC is not set\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_HYM8563 is not set\n# CONFIG_RTC_DRV_MAX6900 is not set\n# CONFIG_RTC_DRV_NCT3018Y is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\n# CONFIG_RTC_DRV_PCF8563 is not set\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\n# CONFIG_RTC_DRV_DS3232 is not set\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_CMOS is not set\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\nCONFIG_RTC_DRV_SUN6I=y\n# CONFIG_RTC_DRV_CADENCE is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_VIRTUAL_CHANNELS=y\nCONFIG_DMA_OF=y\n# CONFIG_ALTERA_MSGDMA is not set\nCONFIG_DMA_SUN6I=y\n# CONFIG_DW_AXI_DMAC is not set\n# CONFIG_FSL_EDMA is not set\n# CONFIG_FSL_QDMA is not set\n# CONFIG_INTEL_IDMA64 is not set\n# CONFIG_NBPFAXI_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DPDMA is not set\n# CONFIG_QCOM_HIDMA_MGMT is not set\n# CONFIG_QCOM_HIDMA is not set\n# CONFIG_DW_DMAC is not set\n# CONFIG_SF_PDMA is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\n# CONFIG_UDMABUF is not set\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\nCONFIG_DMABUF_HEAPS=y\n# CONFIG_DMABUF_SYSFS_STATS is not set\nCONFIG_DMABUF_HEAPS_SYSTEM=y\nCONFIG_DMABUF_HEAPS_CMA=y\n# end of DMABUF options\n\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\n# CONFIG_VIRTIO_MENU is not set\n# CONFIG_VDPA is not set\n# CONFIG_VHOST_MENU is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# end of Microsoft Hyper-V guest support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_RTLLIB is not set\n# CONFIG_RTL8723BS is not set\n# CONFIG_R8712U is not set\nCONFIG_R8188EU=m\n# CONFIG_VT6656 is not set\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16240 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7816 is not set\n# end of Analog to digital converters\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n# end of Analog digital bi-direction converters\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n# end of Direct Digital Synthesis\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n# end of Network Analyzer, Impedance Converters\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7854 is not set\n# end of Active energy metering IC\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S1210 is not set\n# end of Resolver to digital converters\n# end of IIO staging drivers\n\nCONFIG_STAGING_MEDIA=y\n# CONFIG_VIDEO_MAX96712 is not set\nCONFIG_VIDEO_SUNXI=y\nCONFIG_VIDEO_SUNXI_CEDRUS=y\nCONFIG_STAGING_MEDIA_DEPRECATED=y\n# CONFIG_VIDEO_CPIA2 is not set\n# CONFIG_VIDEO_STKWEBCAM is not set\nCONFIG_VIDEO_TM6000=m\nCONFIG_VIDEO_TM6000_ALSA=m\nCONFIG_VIDEO_TM6000_DVB=m\n# CONFIG_USB_ZR364XX is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_KS7010 is not set\n# CONFIG_PI433 is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_FIELDBUS_DEV is not set\n# CONFIG_GOLDFISH is not set\n# CONFIG_CHROME_PLATFORMS is not set\n# CONFIG_MELLANOX_PLATFORM is not set\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Clock driver for ARM Reference designs\n#\n# CONFIG_CLK_ICST is not set\n# CONFIG_CLK_SP810 is not set\n# end of Clock driver for ARM Reference designs\n\n# CONFIG_LMK04832 is not set\n# CONFIG_COMMON_CLK_MAX9485 is not set\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\n# CONFIG_COMMON_CLK_AXI_CLKGEN is not set\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_RS9_PCIE is not set\n# CONFIG_COMMON_CLK_VC5 is not set\n# CONFIG_COMMON_CLK_VC7 is not set\n# CONFIG_COMMON_CLK_FIXED_MMIO is not set\nCONFIG_CLK_SUNXI=y\nCONFIG_CLK_SUNXI_CLOCKS=y\n# CONFIG_CLK_SUNXI_PRCM_SUN6I is not set\n# CONFIG_CLK_SUNXI_PRCM_SUN8I is not set\n# CONFIG_CLK_SUNXI_PRCM_SUN9I is not set\nCONFIG_SUNXI_CCU=y\n# CONFIG_SUN6I_RTC_CCU is not set\n# CONFIG_SUN8I_A23_CCU is not set\n# CONFIG_SUN8I_A33_CCU is not set\n# CONFIG_SUN8I_A83T_CCU is not set\nCONFIG_SUN8I_H3_CCU=y\n# CONFIG_SUN8I_V3S_CCU is not set\nCONFIG_SUN8I_DE2_CCU=y\nCONFIG_SUN8I_R40_CCU=y\nCONFIG_SUN8I_R_CCU=y\n# CONFIG_XILINX_VCU is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\n# CONFIG_HWSPINLOCK is not set\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\nCONFIG_CLKSRC_MMIO=y\nCONFIG_SUN4I_TIMER=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\n# CONFIG_MICROCHIP_PIT64B is not set\n# end of Clock Source drivers\n\n# CONFIG_MAILBOX is not set\n# CONFIG_IOMMU_SUPPORT is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\n# CONFIG_RPMSG_VIRTIO is not set\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\n# CONFIG_SOC_BRCMSTB is not set\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# CONFIG_QUICC_ENGINE is not set\n# CONFIG_FSL_RCPM is not set\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# fujitsu SoC drivers\n#\n# end of fujitsu SoC drivers\n\n#\n# i.MX SoC drivers\n#\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# CONFIG_LITEX_SOC_CONTROLLER is not set\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# end of Qualcomm SoC drivers\n\nCONFIG_SUNXI_MBUS=y\nCONFIG_SUNXI_SRAM=y\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y\nCONFIG_DEVFREQ_GOV_PERFORMANCE=y\nCONFIG_DEVFREQ_GOV_POWERSAVE=y\nCONFIG_DEVFREQ_GOV_USERSPACE=y\nCONFIG_DEVFREQ_GOV_PASSIVE=y\n\n#\n# DEVFREQ Drivers\n#\nCONFIG_ARM_SUN8I_A33_MBUS_DEVFREQ=y\nCONFIG_PM_DEVFREQ_EVENT=y\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_FSA9480 is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_PTN5150 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\n# CONFIG_EXTCON_USB_GPIO is not set\n# CONFIG_MEMORY is not set\nCONFIG_IIO=y\nCONFIG_IIO_BUFFER=y\n# CONFIG_IIO_BUFFER_CB is not set\n# CONFIG_IIO_BUFFER_DMA is not set\n# CONFIG_IIO_BUFFER_DMAENGINE is not set\n# CONFIG_IIO_BUFFER_HW_CONSUMER is not set\n# CONFIG_IIO_KFIFO_BUF is not set\n# CONFIG_IIO_TRIGGERED_BUFFER is not set\nCONFIG_IIO_CONFIGFS=y\n# CONFIG_IIO_TRIGGER is not set\n# CONFIG_IIO_SW_DEVICE is not set\nCONFIG_IIO_SW_TRIGGER=y\n# CONFIG_IIO_TRIGGERED_EVENT is not set\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADXL313_I2C is not set\n# CONFIG_ADXL313_SPI is not set\n# CONFIG_ADXL345_I2C is not set\n# CONFIG_ADXL345_SPI is not set\n# CONFIG_ADXL355_I2C is not set\n# CONFIG_ADXL355_SPI is not set\n# CONFIG_ADXL367_SPI is not set\n# CONFIG_ADXL367_I2C is not set\n# CONFIG_ADXL372_SPI is not set\n# CONFIG_ADXL372_I2C is not set\n# CONFIG_BMA180 is not set\n# CONFIG_BMA220 is not set\n# CONFIG_BMA400 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_BMI088_ACCEL is not set\n# CONFIG_DA280 is not set\n# CONFIG_DA311 is not set\n# CONFIG_DMARD06 is not set\n# CONFIG_DMARD09 is not set\n# CONFIG_DMARD10 is not set\n# CONFIG_FXLS8962AF_I2C is not set\n# CONFIG_FXLS8962AF_SPI is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MC3230 is not set\n# CONFIG_MMA7455_I2C is not set\n# CONFIG_MMA7455_SPI is not set\n# CONFIG_MMA7660 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MSA311 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_MXC6255 is not set\n# CONFIG_SCA3000 is not set\n# CONFIG_SCA3300 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7091R5 is not set\n# CONFIG_AD7124 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7266 is not set\n# CONFIG_AD7280 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7292 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7606_IFACE_PARALLEL is not set\n# CONFIG_AD7606_IFACE_SPI is not set\n# CONFIG_AD7766 is not set\n# CONFIG_AD7768_1 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD7949 is not set\n# CONFIG_AD799X is not set\n# CONFIG_ADI_AXI_ADC is not set\nCONFIG_AXP20X_ADC=y\n# CONFIG_AXP288_ADC is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_ENVELOPE_DETECTOR is not set\n# CONFIG_HI8435 is not set\n# CONFIG_HX711 is not set\n# CONFIG_INA2XX_ADC is not set\n# CONFIG_LTC2471 is not set\n# CONFIG_LTC2485 is not set\n# CONFIG_LTC2496 is not set\n# CONFIG_LTC2497 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX11100 is not set\n# CONFIG_MAX1118 is not set\n# CONFIG_MAX11205 is not set\n# CONFIG_MAX1241 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MAX9611 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_MCP3911 is not set\n# CONFIG_NAU7802 is not set\n# CONFIG_RICHTEK_RTQ6056 is not set\n# CONFIG_SD_ADC_MODULATOR is not set\nCONFIG_SUN4I_GPADC=y\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC0832 is not set\n# CONFIG_TI_ADC084S021 is not set\n# CONFIG_TI_ADC12138 is not set\n# CONFIG_TI_ADC108S102 is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_TI_ADC161S626 is not set\n# CONFIG_TI_ADS1015 is not set\n# CONFIG_TI_ADS7950 is not set\n# CONFIG_TI_ADS8344 is not set\n# CONFIG_TI_ADS8688 is not set\n# CONFIG_TI_ADS124S08 is not set\n# CONFIG_TI_ADS131E08 is not set\n# CONFIG_TI_TLC4541 is not set\n# CONFIG_TI_TSC2046 is not set\n# CONFIG_VF610_ADC is not set\n# CONFIG_XILINX_XADC is not set\n# end of Analog to digital converters\n\n#\n# Analog to digital and digital to analog converters\n#\n# CONFIG_AD74413R is not set\n# end of Analog to digital and digital to analog converters\n\n#\n# Analog Front Ends\n#\n# CONFIG_IIO_RESCALE is not set\n# end of Analog Front Ends\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n# CONFIG_ADA4250 is not set\n# CONFIG_HMC425 is not set\n# end of Amplifiers\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7746 is not set\n# end of Capacitance to digital converters\n\n#\n# Chemical Sensors\n#\n# CONFIG_ATLAS_PH_SENSOR is not set\n# CONFIG_ATLAS_EZO_SENSOR is not set\n# CONFIG_BME680 is not set\n# CONFIG_CCS811 is not set\n# CONFIG_IAQCORE is not set\n# CONFIG_PMS7003 is not set\n# CONFIG_SCD30_CORE is not set\n# CONFIG_SCD4X is not set\n# CONFIG_SENSIRION_SGP30 is not set\n# CONFIG_SENSIRION_SGP40 is not set\n# CONFIG_SPS30_I2C is not set\n# CONFIG_SPS30_SERIAL is not set\n# CONFIG_SENSEAIR_SUNRISE_CO2 is not set\n# CONFIG_VZ89X is not set\n# end of Chemical Sensors\n\n#\n# Hid Sensor IIO Common\n#\n# end of Hid Sensor IIO Common\n\n#\n# IIO SCMI Sensors\n#\n# end of IIO SCMI Sensors\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n# end of SSP Sensor Common\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD3552R is not set\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5592R is not set\n# CONFIG_AD5593R is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_LTC2688 is not set\n# CONFIG_AD5686_SPI is not set\n# CONFIG_AD5696_I2C is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5758 is not set\n# CONFIG_AD5761 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5766 is not set\n# CONFIG_AD5770R is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7293 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_AD8801 is not set\n# CONFIG_DPOT_DAC is not set\n# CONFIG_DS4424 is not set\n# CONFIG_LTC1660 is not set\n# CONFIG_LTC2632 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n# CONFIG_TI_DAC082S085 is not set\n# CONFIG_TI_DAC5571 is not set\n# CONFIG_TI_DAC7311 is not set\n# CONFIG_TI_DAC7612 is not set\n# CONFIG_VF610_DAC is not set\n# end of Digital to analog converters\n\n#\n# IIO dummy driver\n#\n# end of IIO dummy driver\n\n#\n# Filters\n#\n# end of Filters\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n# end of Clock Generator/Distribution\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n# CONFIG_ADF4371 is not set\n# CONFIG_ADMV1013 is not set\n# CONFIG_ADMV4420 is not set\n# CONFIG_ADRF6780 is not set\n# end of Phase-Locked Loop (PLL) frequency synthesizers\n# end of Frequency Synthesizers DDS/PLL\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS290 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_FXAS21002C is not set\n# CONFIG_MPU3050_I2C is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n# end of Digital gyroscope sensors\n\n#\n# Health Sensors\n#\n\n#\n# Heart Rate Monitors\n#\n# CONFIG_AFE4403 is not set\n# CONFIG_AFE4404 is not set\n# CONFIG_MAX30100 is not set\n# CONFIG_MAX30102 is not set\n# end of Heart Rate Monitors\n# end of Health Sensors\n\n#\n# Humidity sensors\n#\n# CONFIG_AM2315 is not set\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HDC2010 is not set\n# CONFIG_HTS221 is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n# end of Humidity sensors\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16460 is not set\n# CONFIG_ADIS16475 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_BMI160_I2C is not set\n# CONFIG_BMI160_SPI is not set\n# CONFIG_BOSCH_BNO055_SERIAL is not set\n# CONFIG_BOSCH_BNO055_I2C is not set\n# CONFIG_FXOS8700_I2C is not set\n# CONFIG_FXOS8700_SPI is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_ICM42600_I2C is not set\n# CONFIG_INV_ICM42600_SPI is not set\n# CONFIG_INV_MPU6050_I2C is not set\n# CONFIG_INV_MPU6050_SPI is not set\n# CONFIG_IIO_ST_LSM6DSX is not set\n# CONFIG_IIO_ST_LSM9DS0 is not set\n# end of Inertial measurement units\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_ADUX1020 is not set\n# CONFIG_AL3010 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_AS73211 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_BH1780 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM3605 is not set\n# CONFIG_CM36651 is not set\n# CONFIG_GP2AP002 is not set\n# CONFIG_GP2AP020A00F is not set\n# CONFIG_SENSORS_ISL29018 is not set\n# CONFIG_SENSORS_ISL29028 is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_LTRF216A is not set\n# CONFIG_LV0104CS is not set\n# CONFIG_MAX44000 is not set\n# CONFIG_MAX44009 is not set\n# CONFIG_NOA1305 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_SI1133 is not set\n# CONFIG_SI1145 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_ST_UVIS25 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\n# CONFIG_SENSORS_TSL2563 is not set\n# CONFIG_TSL2583 is not set\n# CONFIG_TSL2591 is not set\n# CONFIG_TSL2772 is not set\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VCNL4035 is not set\n# CONFIG_VEML6030 is not set\n# CONFIG_VEML6070 is not set\n# CONFIG_VL6180 is not set\n# CONFIG_ZOPT2201 is not set\n# end of Light sensors\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8974 is not set\n# CONFIG_AK8975 is not set\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN_I2C is not set\n# CONFIG_BMC150_MAGN_SPI is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n# CONFIG_SENSORS_RM3100_I2C is not set\n# CONFIG_SENSORS_RM3100_SPI is not set\n# CONFIG_YAMAHA_YAS530 is not set\n# end of Magnetometer sensors\n\n#\n# Multiplexers\n#\n# CONFIG_IIO_MUX is not set\n# end of Multiplexers\n\n#\n# Inclinometer sensors\n#\n# end of Inclinometer sensors\n\n#\n# Linear and angular position sensors\n#\n# end of Linear and angular position sensors\n\n#\n# Digital potentiometers\n#\n# CONFIG_AD5110 is not set\n# CONFIG_AD5272 is not set\n# CONFIG_DS1803 is not set\n# CONFIG_MAX5432 is not set\n# CONFIG_MAX5481 is not set\n# CONFIG_MAX5487 is not set\n# CONFIG_MCP4018 is not set\n# CONFIG_MCP4131 is not set\n# CONFIG_MCP4531 is not set\n# CONFIG_MCP41010 is not set\n# CONFIG_TPL0102 is not set\n# end of Digital potentiometers\n\n#\n# Digital potentiostats\n#\n# CONFIG_LMP91000 is not set\n# end of Digital potentiostats\n\n#\n# Pressure sensors\n#\n# CONFIG_ABP060MG is not set\n# CONFIG_BMP280 is not set\n# CONFIG_DLHL60D is not set\n# CONFIG_DPS310 is not set\n# CONFIG_HP03 is not set\n# CONFIG_ICP10100 is not set\n# CONFIG_MPL115_I2C is not set\n# CONFIG_MPL115_SPI is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n# CONFIG_HP206C is not set\n# CONFIG_ZPA2326 is not set\n# end of Pressure sensors\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n# end of Lightning sensors\n\n#\n# Proximity and distance sensors\n#\n# CONFIG_ISL29501 is not set\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_MB1232 is not set\n# CONFIG_PING is not set\n# CONFIG_RFD77402 is not set\n# CONFIG_SRF04 is not set\n# CONFIG_SX9310 is not set\n# CONFIG_SX9324 is not set\n# CONFIG_SX9360 is not set\n# CONFIG_SX9500 is not set\n# CONFIG_SRF08 is not set\n# CONFIG_VCNL3020 is not set\n# CONFIG_VL53L0X_I2C is not set\n# end of Proximity and distance sensors\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1200 is not set\n# end of Resolver to digital converters\n\n#\n# Temperature sensors\n#\n# CONFIG_LTC2983 is not set\n# CONFIG_MAXIM_THERMOCOUPLE is not set\n# CONFIG_MLX90614 is not set\n# CONFIG_MLX90632 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TMP007 is not set\n# CONFIG_TMP117 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\n# CONFIG_MAX31856 is not set\n# CONFIG_MAX31865 is not set\n# end of Temperature sensors\n\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_DEBUG is not set\n# CONFIG_PWM_ATMEL_TCB is not set\n# CONFIG_PWM_CLK is not set\n# CONFIG_PWM_FSL_FTM is not set\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_PWM_SUN4I=y\n# CONFIG_PWM_XILINX is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\n# CONFIG_AL_FIC is not set\nCONFIG_SUN6I_R_INTC=y\nCONFIG_SUNXI_NMI_INTC=y\n# CONFIG_XILINX_INTC is not set\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\nCONFIG_ARCH_HAS_RESET_CONTROLLER=y\nCONFIG_RESET_CONTROLLER=y\nCONFIG_RESET_SIMPLE=y\nCONFIG_RESET_SUNXI=y\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_RESET_TI_TPS380X is not set\n\n#\n# PHY Subsystem\n#\nCONFIG_GENERIC_PHY=y\nCONFIG_GENERIC_PHY_MIPI_DPHY=y\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\nCONFIG_PHY_SUN4I_USB=y\nCONFIG_PHY_SUN6I_MIPI_DPHY=y\nCONFIG_PHY_SUN9I_USB=y\nCONFIG_PHY_SUN50I_USB3=y\n\n#\n# PHY drivers for Broadcom platforms\n#\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# end of PHY drivers for Broadcom platforms\n\n# CONFIG_PHY_CADENCE_TORRENT is not set\n# CONFIG_PHY_CADENCE_DPHY is not set\n# CONFIG_PHY_CADENCE_DPHY_RX is not set\n# CONFIG_PHY_CADENCE_SIERRA is not set\n# CONFIG_PHY_CADENCE_SALVO is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_LAN966X_SERDES is not set\n# CONFIG_PHY_CPCAP_USB is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\n# CONFIG_PHY_OCELOT_SERDES is not set\n# end of PHY Subsystem\n\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\nCONFIG_ARM_PMU=y\n# end of Performance monitor support\n\n# CONFIG_RAS is not set\n\n#\n# Android\n#\n# CONFIG_ANDROID_BINDER_IPC is not set\n# end of Android\n\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\n# CONFIG_NVMEM_RMEM is not set\nCONFIG_NVMEM_SUNXI_SID=y\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\n# CONFIG_TEE is not set\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\n# CONFIG_PECI is not set\n# CONFIG_HTE is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_VALIDATE_FS_PARSER=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\nCONFIG_XFS_SUPPORT_V4=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\nCONFIG_F2FS_FS=m\nCONFIG_F2FS_STAT_FS=y\nCONFIG_F2FS_FS_XATTR=y\nCONFIG_F2FS_FS_POSIX_ACL=y\n# CONFIG_F2FS_FS_SECURITY is not set\n# CONFIG_F2FS_CHECK_FS is not set\n# CONFIG_F2FS_FAULT_INJECTION is not set\nCONFIG_F2FS_FS_COMPRESSION=y\nCONFIG_F2FS_FS_LZO=y\nCONFIG_F2FS_FS_LZORLE=y\nCONFIG_F2FS_FS_LZ4=y\nCONFIG_F2FS_FS_LZ4HC=y\nCONFIG_F2FS_FS_ZSTD=y\nCONFIG_F2FS_IOSTAT=y\n# CONFIG_F2FS_UNFAIR_RWSEM is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\n# CONFIG_FANOTIFY is not set\n# CONFIG_QUOTA is not set\nCONFIG_AUTOFS4_FS=y\nCONFIG_AUTOFS_FS=y\nCONFIG_FUSE_FS=m\n# CONFIG_CUSE is not set\n# CONFIG_VIRTIO_FS is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n\n#\n# Caches\n#\n# CONFIG_FSCACHE is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=y\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=m\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=m\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\nCONFIG_MEMFD_CREATE=y\nCONFIG_CONFIGFS_FS=y\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\nCONFIG_HFS_FS=y\nCONFIG_HFSPLUS_FS=y\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\n# CONFIG_SQUASHFS_FILE_CACHE is not set\nCONFIG_SQUASHFS_FILE_DIRECT=y\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\nCONFIG_SQUASHFS_XATTR=y\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\n# CONFIG_PSTORE is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EROFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\nCONFIG_NFS_V3_ACL=y\nCONFIG_NFS_V4=y\nCONFIG_NFS_SWAP=y\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\nCONFIG_NFS_V4_1_MIGRATION=y\nCONFIG_ROOT_NFS=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFS_DISABLE_UDP_SUPPORT=y\nCONFIG_NFS_V4_2_READ_PLUS=y\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_ACL_SUPPORT=y\nCONFIG_NFS_COMMON=y\nCONFIG_NFS_V4_2_SSC_HELPER=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\nCONFIG_SUNRPC_SWAP=y\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS2=y\nCONFIG_CIFS_ALLOW_INSECURE_LEGACY=y\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\nCONFIG_CIFS_DEBUG=y\n# CONFIG_CIFS_DEBUG2 is not set\n# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\n# CONFIG_CIFS_SWN_UPCALL is not set\n# CONFIG_CIFS_ROOT is not set\n# CONFIG_SMB_SERVER is not set\nCONFIG_SMBFS=y\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_KEYS_REQUEST_CACHE is not set\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_BIG_KEYS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\nCONFIG_KEY_DH_OPERATIONS=y\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY is not set\nCONFIG_SECURITYFS=y\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_LSM=\"yama,loadpin,safesetid,integrity\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n\nCONFIG_RANDSTRUCT_NONE=y\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\n# CONFIG_CRYPTO_CRYPTD is not set\nCONFIG_CRYPTO_AUTHENC=y\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_ENGINE=m\n# end of Crypto core or helper\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_DH=y\n# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set\nCONFIG_CRYPTO_ECC=m\nCONFIG_CRYPTO_ECDH=m\nCONFIG_CRYPTO_ECDSA=m\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\n# CONFIG_CRYPTO_CURVE25519 is not set\n# end of Public-key cryptography\n\n#\n# Block ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\n# CONFIG_CRYPTO_ARIA is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\n# CONFIG_CRYPTO_SM4_GENERIC is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n# end of Block ciphers\n\n#\n# Length-preserving ciphers and modes\n#\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_ARC4 is not set\n# CONFIG_CRYPTO_CHACHA20 is not set\nCONFIG_CRYPTO_CBC=y\n# CONFIG_CRYPTO_CFB is not set\nCONFIG_CRYPTO_CTR=y\n# CONFIG_CRYPTO_CTS is not set\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_HCTR2 is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_OFB is not set\n# CONFIG_CRYPTO_PCBC is not set\n# CONFIG_CRYPTO_XTS is not set\n# end of Length-preserving ciphers and modes\n\n#\n# AEAD (authenticated encryption with associated data) ciphers\n#\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\n# CONFIG_CRYPTO_ESSIV is not set\n# end of AEAD (authenticated encryption with associated data) ciphers\n\n#\n# Hashes, digests, and MACs\n#\nCONFIG_CRYPTO_BLAKE2B=m\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\n# CONFIG_CRYPTO_POLY1305 is not set\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\n# CONFIG_CRYPTO_SM3_GENERIC is not set\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_VMAC is not set\n# CONFIG_CRYPTO_WP512 is not set\n# CONFIG_CRYPTO_XCBC is not set\nCONFIG_CRYPTO_XXHASH=m\n# end of Hashes, digests, and MACs\n\n#\n# CRCs (cyclic redundancy checks)\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=m\n# CONFIG_CRYPTO_CRCT10DIF is not set\n# end of CRCs (cyclic redundancy checks)\n\n#\n# Compression\n#\n# CONFIG_CRYPTO_DEFLATE is not set\n# CONFIG_CRYPTO_LZO is not set\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n# end of Compression\n\n#\n# Random number generation\n#\n# CONFIG_CRYPTO_ANSI_CPRNG is not set\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_KDF800108_CTR=y\n# end of Random number generation\n\n#\n# Userspace interface\n#\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\nCONFIG_CRYPTO_USER_API_AEAD=y\nCONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y\n# end of Userspace interface\n\nCONFIG_CRYPTO_HASH_INFO=y\n\n#\n# Accelerated Cryptographic Algorithms for CPU (arm)\n#\nCONFIG_CRYPTO_POLY1305_ARM=y\nCONFIG_CRYPTO_BLAKE2S_ARM=y\nCONFIG_CRYPTO_SHA1_ARM=y\nCONFIG_CRYPTO_SHA256_ARM=y\nCONFIG_CRYPTO_SHA512_ARM=y\nCONFIG_CRYPTO_AES_ARM=y\nCONFIG_CRYPTO_CHACHA20_NEON=y\n# end of Accelerated Cryptographic Algorithms for CPU (arm)\n\nCONFIG_CRYPTO_HW=y\nCONFIG_CRYPTO_DEV_ALLWINNER=y\nCONFIG_CRYPTO_DEV_SUN4I_SS=m\n# CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG is not set\n# CONFIG_CRYPTO_DEV_SUN4I_SS_DEBUG is not set\nCONFIG_CRYPTO_DEV_SUN8I_CE=m\n# CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG is not set\nCONFIG_CRYPTO_DEV_SUN8I_CE_HASH=y\nCONFIG_CRYPTO_DEV_SUN8I_CE_PRNG=y\nCONFIG_CRYPTO_DEV_SUN8I_CE_TRNG=y\nCONFIG_CRYPTO_DEV_SUN8I_SS=m\n# CONFIG_CRYPTO_DEV_SUN8I_SS_DEBUG is not set\nCONFIG_CRYPTO_DEV_SUN8I_SS_PRNG=y\nCONFIG_CRYPTO_DEV_SUN8I_SS_HASH=y\n# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set\n# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set\n# CONFIG_CRYPTO_DEV_SAFEXCEL is not set\n# CONFIG_CRYPTO_DEV_CCREE is not set\n# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n# CONFIG_FIPS_SIGNATURE_SELFTEST is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\nCONFIG_RAID6_PQ_BENCHMARK=y\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_CORDIC=m\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_UTILS=y\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=m\nCONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=y\nCONFIG_CRYPTO_LIB_CURVE25519=y\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=y\nCONFIG_CRYPTO_LIB_SHA1=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_CRC_CCITT=y\nCONFIG_CRC16=y\n# CONFIG_CRC_T10DIF is not set\n# CONFIG_CRC64_ROCKSOFT is not set\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC64 is not set\n# CONFIG_CRC4 is not set\n# CONFIG_CRC7 is not set\nCONFIG_LIBCRC32C=m\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=m\nCONFIG_LZO_COMPRESS=m\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_COMPRESS=m\nCONFIG_LZ4HC_COMPRESS=m\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMMON=y\nCONFIG_ZSTD_COMPRESS=m\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\nCONFIG_XZ_DEC_X86=y\nCONFIG_XZ_DEC_POWERPC=y\nCONFIG_XZ_DEC_IA64=y\nCONFIG_XZ_DEC_ARM=y\nCONFIG_XZ_DEC_ARMTHUMB=y\nCONFIG_XZ_DEC_SPARC=y\n# CONFIG_XZ_DEC_MICROLZMA is not set\nCONFIG_XZ_DEC_BCJ=y\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_GZIP=y\nCONFIG_DECOMPRESS_ZSTD=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_DMA_OPS=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_DMA_DECLARE_COHERENT=y\nCONFIG_ARCH_HAS_SETUP_DMA_OPS=y\nCONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y\nCONFIG_DMA_NONCOHERENT_MMAP=y\nCONFIG_DMA_CMA=y\n# CONFIG_DMA_PERNUMA_CMA is not set\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=320\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\n# CONFIG_FORCE_NR_CPUS is not set\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_GENERIC_VDSO_32=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\nCONFIG_SG_POOL=y\nCONFIG_STACKDEPOT=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\n# CONFIG_STACKTRACE_BUILD_ID is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\n# CONFIG_DYNAMIC_DEBUG is not set\n# CONFIG_DYNAMIC_DEBUG_CORE is not set\nCONFIG_SYMBOLIC_ERRNAME=y\n# CONFIG_DEBUG_BUGVERBOSE is not set\n# end of printk and dmesg options\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_AS_HAS_NON_CONST_LEB128=y\nCONFIG_DEBUG_INFO_NONE=y\n# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\nCONFIG_FRAME_WARN=1024\n# CONFIG_STRIP_ASM_SYMS is not set\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\n# CONFIG_VMLINUX_MAP is not set\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=\"\"\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_KCSAN_COMPILER=y\n# end of Generic Kernel Debugging Instruments\n\n#\n# Networking Debugging\n#\n# CONFIG_NET_DEV_REFCNT_TRACKER is not set\n# CONFIG_NET_NS_REFCNT_TRACKER is not set\n# CONFIG_DEBUG_NET is not set\n# end of Networking Debugging\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\n# CONFIG_DEBUG_WX is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SHRINKER_DEBUG is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\n# CONFIG_DEBUG_VM is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\nCONFIG_DEBUG_MEMORY_INIT=y\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\n# CONFIG_DEBUG_KMAP_LOCAL is not set\n# CONFIG_DEBUG_HIGHMEM is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\n# CONFIG_SOFTLOCKUP_DETECTOR is not set\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\n# CONFIG_SCHED_DEBUG is not set\n# CONFIG_SCHEDSTATS is not set\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\nCONFIG_DEBUG_PREEMPT=y\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_RWSEMS is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_DEBUG_MAPLE_TREE is not set\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\nCONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_HAVE_BUILDTIME_MCOUNT_SORT=y\nCONFIG_TRACING_SUPPORT=y\n# CONFIG_FTRACE is not set\n# CONFIG_SAMPLES is not set\n# CONFIG_STRICT_DEVMEM is not set\n\n#\n# arm Debugging\n#\n# CONFIG_ARM_PTDUMP_DEBUGFS is not set\n# CONFIG_UNWINDER_FRAME_POINTER is not set\nCONFIG_UNWINDER_ARM=y\nCONFIG_ARM_UNWIND=y\n# CONFIG_BACKTRACE_VERBOSE is not set\n# CONFIG_DEBUG_USER is not set\n# CONFIG_DEBUG_LL is not set\nCONFIG_DEBUG_LL_INCLUDE=\"mach/debug-macro.S\"\nCONFIG_UNCOMPRESS_INCLUDE=\"debug/uncompress.h\"\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_CORESIGHT is not set\n# end of arm Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\nCONFIG_RUNTIME_TESTING_MENU=y\n# CONFIG_LKDTM is not set\n# CONFIG_TEST_MIN_HEAP is not set\n# CONFIG_TEST_DIV64 is not set\n# CONFIG_BACKTRACE_SELF_TEST is not set\n# CONFIG_TEST_REF_TRACKER is not set\n# CONFIG_RBTREE_TEST is not set\n# CONFIG_REED_SOLOMON_TEST is not set\n# CONFIG_INTERVAL_TREE_TEST is not set\n# CONFIG_PERCPU_TEST is not set\n# CONFIG_ATOMIC64_SELFTEST is not set\n# CONFIG_TEST_HEXDUMP is not set\n# CONFIG_STRING_SELFTEST is not set\n# CONFIG_TEST_STRING_HELPERS is not set\n# CONFIG_TEST_STRSCPY is not set\n# CONFIG_TEST_KSTRTOX is not set\n# CONFIG_TEST_PRINTF is not set\n# CONFIG_TEST_SCANF is not set\n# CONFIG_TEST_BITMAP is not set\n# CONFIG_TEST_UUID is not set\n# CONFIG_TEST_XARRAY is not set\n# CONFIG_TEST_MAPLE_TREE is not set\n# CONFIG_TEST_RHASHTABLE is not set\n# CONFIG_TEST_SIPHASH is not set\n# CONFIG_TEST_IDA is not set\n# CONFIG_TEST_LKM is not set\n# CONFIG_TEST_BITOPS is not set\n# CONFIG_TEST_VMALLOC is not set\n# CONFIG_TEST_USER_COPY is not set\n# CONFIG_TEST_BPF is not set\n# CONFIG_TEST_BLACKHOLE_DEV is not set\n# CONFIG_FIND_BIT_BENCHMARK is not set\n# CONFIG_TEST_FIRMWARE is not set\n# CONFIG_TEST_SYSCTL is not set\n# CONFIG_TEST_UDELAY is not set\n# CONFIG_TEST_STATIC_KEYS is not set\n# CONFIG_TEST_KMOD is not set\n# CONFIG_TEST_MEMCAT_P is not set\n# CONFIG_TEST_MEMINIT is not set\n# CONFIG_TEST_FREE_PAGES is not set\nCONFIG_ARCH_USE_MEMTEST=y\n# CONFIG_MEMTEST is not set\n# end of Kernel Testing and Coverage\n\n#\n# Rust hacking\n#\n# end of Rust hacking\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/Allwinner/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # Bootloader to use (syslinux / u-boot / bcm2835-bootloader)\n    BOOTLOADER=\"u-boot\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"dtbs\"\n\n  # Additional kernel dependencies\n    KERNEL_EXTRA_DEPENDS_TARGET=\"lz4:host\"\n\n  # Kernel to use. values can be:\n  # default:  default mainline kernel\n    LINUX=\"default\"\n\n    EXTRA_CMDLINE=\"console=ttyS0,115200 console=tty1\"\n\n################################################################################\n# setup build defaults\n################################################################################\n\n  # Project CFLAGS\n    PROJECT_CFLAGS=\"\"\n\n  # SquashFS compression method (gzip / lzo / xz / zstd)\n    SQUASHFS_COMPRESSION=\"zstd\"\n\n################################################################################\n# setup project defaults\n################################################################################\n\n  # OpenGL(X) implementation to use (no / mesa)\n    OPENGL=\"no\"\n\n  # Vulkan implementation to use (vulkan-loader / no)\n    VULKAN=\"no\"\n\n  # Displayserver to use (wl / no)\n    DISPLAYSERVER=\"no\"\n\n  # Windowmanager to use (weston / no)\n    WINDOWMANAGER=\"no\"\n\n  # Xorg Graphic drivers to use (all / lima,panfrost)\n  # Space separated list is supported,\n  # e.g. GRAPHIC_DRIVERS=\"lima panfrost\"\n    GRAPHIC_DRIVERS=\"lima panfrost\"\n\n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware\"\n\n  # build and install CEC framework support (yes / no)\n    CEC_FRAMEWORK_SUPPORT=\"yes\"\n\n  # build with installer (yes / no)\n    INSTALLER_SUPPORT=\"no\"\n\n  # debug tty path\n    DEBUG_TTY=\"/dev/console\"\n\n  # additional packages to install:\n    ADDITIONAL_PACKAGES+=\" dt-overlays\"\n"
  },
  {
    "path": "projects/Allwinner/patches/atf/0001-refactor-fdt-introduce-common-fdt_node_is_enabled.patch",
    "content": "From 49b268ce3036b2645c3a0caeaefb625f7a2d5982 Mon Sep 17 00:00:00 2001\nFrom: Andre Przywara <andre.przywara@arm.com>\nDate: Fri, 3 Feb 2023 11:11:18 +0000\nSubject: [PATCH] refactor(fdt): introduce common fdt_node_is_enabled()\n\nThere are several users in the tree which want to check whether a given\nFDT node is enabled or not: the \"status\" property holds that\ninformation. So far all those users provide private implementations,\nsome of them having issues.\n\nExport a generic implementation of that function in fdt_wrappers.h, as\na \"static inline\" function to not increase code size.\nAlso replace the existing implementation in Arm's fconf code, which had\na tiny bug in needlessly using the property length:\n\"status = [6f 6b 61 79 20];\" would pass the check, where it should not.\nThe proper solution is also simpler: status must be a string, and\nstrings must be NUL-terminated in a DT. strcmp() would terminate on the\nfirst NUL in *either* of the two strings it compares, so it would never\nwalk beyond the property boundary in the DTB.\n\nChange-Id: I9d89093432f127c09add6cf5c93a725bc534e5de\nSigned-off-by: Andre Przywara <andre.przywara@arm.com>\n---\n include/common/fdt_wrappers.h               | 10 ++++++++++\n plat/arm/common/fconf/fconf_ethosn_getter.c | 15 ---------------\n 2 files changed, 10 insertions(+), 15 deletions(-)\n\ndiff --git a/include/common/fdt_wrappers.h b/include/common/fdt_wrappers.h\nindex 2929fc23d5bb..b16510f3d971 100644\n--- a/include/common/fdt_wrappers.h\n+++ b/include/common/fdt_wrappers.h\n@@ -10,6 +10,7 @@\n #define FDT_WRAPPERS_H\n \n #include <libfdt_env.h>\n+#include <libfdt.h>\n \n /* Number of cells, given total length in bytes. Each cell is 4 bytes long */\n #define NCELLS(len) ((len) / 4U)\n@@ -53,6 +54,15 @@ static inline uint32_t fdt_blob_size(const void *dtb)\n \treturn fdt32_to_cpu(dtb_header[1]);\n }\n \n+static inline bool fdt_node_is_enabled(const void *fdt, int node)\n+{\n+\tint len;\n+\tconst void *prop = fdt_getprop(fdt, node, \"status\", &len);\n+\n+\t/* A non-existing status property means the device is enabled. */\n+\treturn (prop == NULL) || (len == 5 && strcmp(prop, \"okay\") == 0);\n+}\n+\n #define fdt_for_each_compatible_node(dtb, node, compatible_str)       \\\n for (node = fdt_node_offset_by_compatible(dtb, -1, compatible_str);   \\\n      node >= 0;                                                       \\\ndiff --git a/plat/arm/common/fconf/fconf_ethosn_getter.c b/plat/arm/common/fconf/fconf_ethosn_getter.c\nindex 0b48a9816338..251471e63b6a 100644\n--- a/plat/arm/common/fconf/fconf_ethosn_getter.c\n+++ b/plat/arm/common/fconf/fconf_ethosn_getter.c\n@@ -20,21 +20,6 @@ struct ethosn_sub_allocator_t {\n \tuint32_t stream_id;\n };\n \n-static bool fdt_node_is_enabled(const void *fdt, int node)\n-{\n-\tint len;\n-\tconst char *node_status;\n-\n-\tnode_status = fdt_getprop(fdt, node, \"status\", &len);\n-\tif (node_status == NULL ||\n-\t    (len == 5 && /* Includes null character */\n-\t     strncmp(node_status, \"okay\", 4U) == 0)) {\n-\t\treturn true;\n-\t}\n-\n-\treturn false;\n-}\n-\n static bool fdt_node_has_reserved_memory(const void *fdt, int dev_node)\n {\n \treturn fdt_get_property(fdt, dev_node, \"memory-region\", NULL) != NULL;\n-- \n2.39.1\n\n"
  },
  {
    "path": "projects/Allwinner/patches/atf/0002-fix-allwinner-check-RSB-availability-in-DT-on-H6.patch",
    "content": "From 8168cbaf31c876e20197dd3c5401292e24e8ae80 Mon Sep 17 00:00:00 2001\nFrom: Andre Przywara <andre.przywara@arm.com>\nDate: Wed, 1 Feb 2023 22:28:37 +0000\nSubject: [PATCH] fix(allwinner): check RSB availability in DT on H6\n\nAt the moment we access the RSB bus on all Allwinner H6 boards\nunconditionally, even though some boards do not have any PMIC at all,\nwhile others have some I2C devices connected to the same pins.\nThe latter case is just fragile, but the first case leads to a hang on\nat least one board, as reported by Jernej.\n\nScan the devicetree, to check for the availability of the RSB bus node.\nProceed only if the RSB DT node is actually enabled.\n\nChange-Id: Iea7dcfe3e085e173334d098ec4ddcb6c4b085771\nSigned-off-by: Andre Przywara <andre.przywara@arm.com>\nReported-by: Jernej Skrabec <jernej.skrabec@gmail.com>\n---\n plat/allwinner/sun50i_h6/sunxi_power.c | 9 ++++++++-\n 1 file changed, 8 insertions(+), 1 deletion(-)\n\ndiff --git a/plat/allwinner/sun50i_h6/sunxi_power.c b/plat/allwinner/sun50i_h6/sunxi_power.c\nindex d298e6b8adaf..1257076dfd1b 100644\n--- a/plat/allwinner/sun50i_h6/sunxi_power.c\n+++ b/plat/allwinner/sun50i_h6/sunxi_power.c\n@@ -8,8 +8,10 @@\n #include <errno.h>\n \n #include <common/debug.h>\n+#include <common/fdt_wrappers.h>\n #include <drivers/allwinner/axp.h>\n #include <drivers/allwinner/sunxi_rsb.h>\n+#include <libfdt.h>\n #include <lib/mmio.h>\n \n #include <sunxi_cpucfg.h>\n@@ -63,7 +65,12 @@ static int rsb_init(void)\n \n int sunxi_pmic_setup(uint16_t socid, const void *fdt)\n {\n-\tint ret;\n+\tint node, ret;\n+\n+\tnode = fdt_node_offset_by_compatible(fdt, 0, \"allwinner,sun8i-a23-rsb\");\n+\tif ((node < 0) || !fdt_node_is_enabled(fdt, node)) {\n+\t\treturn -ENODEV;\n+\t}\n \n \tINFO(\"PMIC: Probing AXP805 on RSB\\n\");\n \n-- \n2.39.1\n\n"
  },
  {
    "path": "projects/Allwinner/patches/atf/0003-sunxi-Don-t-enable-referenced-regulators.patch",
    "content": "From 89a2da7c8bae95cf9225015489736e2fc434f4d9 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Sat, 2 Jan 2021 16:35:31 +0100\nSubject: [PATCH] sunxi: Don't enable referenced regulators\n\nThis break certain devices which need appropriate power on sequence.\n---\n drivers/allwinner/axp/common.c | 3 ---\n 1 file changed, 3 deletions(-)\n\n--- a/drivers/allwinner/axp/common.c\n+++ b/drivers/allwinner/axp/common.c\n@@ -112,9 +112,6 @@ static bool should_enable_regulator(const void *fdt,\n \tif (is_node_disabled(fdt, node)) {\n \t\treturn false;\n \t}\n-\tif (fdt_getprop(fdt, node, \"phandle\", NULL) != NULL) {\n-\t\treturn true;\n-\t}\n \tif (fdt_getprop(fdt, node, \"regulator-always-on\", NULL) != NULL) {\n \t\treturn true;\n \t}\n"
  },
  {
    "path": "projects/Allwinner/patches/ffmpeg/0001-WIP-deint-filter.patch",
    "content": "From 39069d9cc03a42cd497dd6b9756116ff4b684a5d Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Tue, 3 Dec 2019 21:01:18 +0100\nSubject: [PATCH] WIP deint filter\n\n---\n libavfilter/Makefile                 |   1 +\n libavfilter/allfilters.c             |   1 +\n libavfilter/vf_deinterlace_v4l2m2m.c | 879 +++++++++++++++++++++++++++\n 3 files changed, 881 insertions(+)\n create mode 100644 libavfilter/vf_deinterlace_v4l2m2m.c\n\ndiff --git a/libavfilter/Makefile b/libavfilter/Makefile\nindex 512354065305..625fd29f9313 100644\n--- a/libavfilter/Makefile\n+++ b/libavfilter/Makefile\n@@ -218,6 +218,7 @@ OBJS-$(CONFIG_DEFLATE_FILTER)                += vf_neighbor.o\n OBJS-$(CONFIG_DEFLICKER_FILTER)              += vf_deflicker.o\n OBJS-$(CONFIG_DEINTERLACE_QSV_FILTER)        += vf_deinterlace_qsv.o\n OBJS-$(CONFIG_DEINTERLACE_VAAPI_FILTER)      += vf_deinterlace_vaapi.o vaapi_vpp.o\n+OBJS-$(CONFIG_DEINTERLACE_V4L2M2M_FILTER)    += vf_deinterlace_v4l2m2m.o\n OBJS-$(CONFIG_DEJUDDER_FILTER)               += vf_dejudder.o\n OBJS-$(CONFIG_DELOGO_FILTER)                 += vf_delogo.o\n OBJS-$(CONFIG_DENOISE_VAAPI_FILTER)          += vf_misc_vaapi.o vaapi_vpp.o\ndiff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c\nindex 1183e4026751..fe5a2e8c02e8 100644\n--- a/libavfilter/allfilters.c\n+++ b/libavfilter/allfilters.c\n@@ -204,6 +204,7 @@ extern AVFilter ff_vf_dedot;\n extern AVFilter ff_vf_deflate;\n extern AVFilter ff_vf_deflicker;\n extern AVFilter ff_vf_deinterlace_qsv;\n+extern AVFilter ff_vf_deinterlace_v4l2m2m;\n extern AVFilter ff_vf_deinterlace_vaapi;\n extern AVFilter ff_vf_dejudder;\n extern AVFilter ff_vf_delogo;\ndiff --git a/libavfilter/vf_deinterlace_v4l2m2m.c b/libavfilter/vf_deinterlace_v4l2m2m.c\nnew file mode 100644\nindex 000000000000..1029e5b620fd\n--- /dev/null\n+++ b/libavfilter/vf_deinterlace_v4l2m2m.c\n@@ -0,0 +1,879 @@\n+/*\n+ * This file is part of FFmpeg.\n+ *\n+ * FFmpeg is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * FFmpeg is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with FFmpeg; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ */\n+\n+/**\n+ * @file\n+ * deinterlace video filter - V4L2 M2M\n+ */\n+\n+#include <drm_fourcc.h>\n+\n+#include <linux/videodev2.h>\n+\n+#include <dirent.h>\n+#include <fcntl.h>\n+#include <poll.h>\n+#include <stdatomic.h>\n+#include <stdio.h>\n+#include <string.h>\n+#include <sys/ioctl.h>\n+#include <sys/mman.h>\n+#include <unistd.h>\n+\n+#include \"libavutil/avassert.h\"\n+#include \"libavutil/avstring.h\"\n+#include \"libavutil/common.h\"\n+#include \"libavutil/hwcontext.h\"\n+#include \"libavutil/hwcontext_drm.h\"\n+#include \"libavutil/internal.h\"\n+#include \"libavutil/mathematics.h\"\n+#include \"libavutil/opt.h\"\n+#include \"libavutil/pixdesc.h\"\n+#include \"libavutil/time.h\"\n+\n+#include \"avfilter.h\"\n+#include \"formats.h\"\n+#include \"internal.h\"\n+#include \"video.h\"\n+\n+typedef struct V4L2Queue V4L2Queue;\n+typedef struct DeintV4L2M2MContextShared DeintV4L2M2MContextShared;\n+\n+typedef struct V4L2PlaneInfo {\n+    int bytesperline;\n+    size_t length;\n+} V4L2PlaneInfo;\n+\n+typedef struct V4L2Buffer {\n+    int enqueued;\n+    int reenqueue;\n+    int fd;\n+    struct v4l2_buffer buffer;\n+    struct v4l2_plane planes[VIDEO_MAX_PLANES];\n+    int num_planes;\n+    V4L2PlaneInfo plane_info[VIDEO_MAX_PLANES];\n+    AVDRMFrameDescriptor drm_frame;\n+    V4L2Queue *q;\n+} V4L2Buffer;\n+\n+typedef struct V4L2Queue {\n+    struct v4l2_format format;\n+    int num_buffers;\n+    V4L2Buffer *buffers;\n+    DeintV4L2M2MContextShared *ctx;\n+} V4L2Queue;\n+\n+typedef struct DeintV4L2M2MContextShared {\n+    int fd;\n+    int done;\n+    int width;\n+    int height;\n+    int orig_width;\n+    int orig_height;\n+    atomic_uint refcount;\n+\n+    AVBufferRef *hw_frames_ctx;\n+\n+    int frame_count;\n+    AVFrame *frames[2];\n+\n+    V4L2Queue output;\n+    V4L2Queue capture;\n+} DeintV4L2M2MContextShared;\n+\n+typedef struct DeintV4L2M2MContext {\n+    const AVClass *class;\n+\n+    DeintV4L2M2MContextShared *shared;\n+} DeintV4L2M2MContext;\n+\n+static int deint_v4l2m2m_prepare_context(DeintV4L2M2MContextShared *ctx)\n+{\n+    struct v4l2_capability cap;\n+    int ret;\n+\n+    memset(&cap, 0, sizeof(cap));\n+    ret = ioctl(ctx->fd, VIDIOC_QUERYCAP, &cap);\n+    if (ret < 0)\n+        return ret;\n+\n+    if (!(cap.capabilities & V4L2_CAP_STREAMING))\n+        return AVERROR(EINVAL);\n+\n+    if (cap.capabilities & V4L2_CAP_VIDEO_M2M) {\n+        ctx->capture.format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;\n+        ctx->output.format.type = V4L2_BUF_TYPE_VIDEO_OUTPUT;\n+\n+        return 0;\n+    }\n+\n+    if (cap.capabilities & V4L2_CAP_VIDEO_M2M_MPLANE) {\n+        ctx->capture.format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;\n+        ctx->output.format.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;\n+\n+        return 0;\n+    }\n+\n+    return AVERROR(EINVAL);\n+}\n+\n+static int deint_v4l2m2m_try_format(V4L2Queue *queue)\n+{\n+    struct v4l2_format *fmt        = &queue->format;\n+    DeintV4L2M2MContextShared *ctx = queue->ctx;\n+    int ret, field;\n+\n+    ret = ioctl(ctx->fd, VIDIOC_G_FMT, fmt);\n+    if (ret)\n+        av_log(NULL, AV_LOG_ERROR, \"VIDIOC_G_FMT failed: %d\\n\", ret);\n+\n+    if (V4L2_TYPE_IS_OUTPUT(fmt->type))\n+        field = V4L2_FIELD_INTERLACED_TB;\n+    else\n+        field = V4L2_FIELD_NONE;\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) {\n+        fmt->fmt.pix_mp.pixelformat = V4L2_PIX_FMT_NV12;\n+        fmt->fmt.pix_mp.field = field;\n+        fmt->fmt.pix_mp.width = ctx->width;\n+        fmt->fmt.pix_mp.height = ctx->height;\n+    } else {\n+        fmt->fmt.pix.pixelformat = V4L2_PIX_FMT_NV12;\n+        fmt->fmt.pix.field = field;\n+        fmt->fmt.pix.width = ctx->width;\n+        fmt->fmt.pix.height = ctx->height;\n+    }\n+\n+    ret = ioctl(ctx->fd, VIDIOC_TRY_FMT, fmt);\n+    if (ret)\n+        return AVERROR(EINVAL);\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) {\n+        if (fmt->fmt.pix_mp.pixelformat != V4L2_PIX_FMT_NV12 ||\n+            fmt->fmt.pix_mp.field != field) {\n+            av_log(NULL, AV_LOG_DEBUG, \"format not supported for type %d\\n\", fmt->type);\n+\n+            return AVERROR(EINVAL);\n+        }\n+    } else {\n+        if (fmt->fmt.pix.pixelformat != V4L2_PIX_FMT_NV12 ||\n+            fmt->fmt.pix.field != field) {\n+            av_log(NULL, AV_LOG_DEBUG, \"format not supported for type %d\\n\", fmt->type);\n+\n+            return AVERROR(EINVAL);\n+        }\n+    }\n+\n+    return 0;\n+}\n+\n+static int deint_v4l2m2m_set_format(V4L2Queue *queue, uint32_t field, int width, int height)\n+{\n+    struct v4l2_format *fmt        = &queue->format;\n+    DeintV4L2M2MContextShared *ctx = queue->ctx;\n+    int ret;\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(fmt->type)) {\n+        fmt->fmt.pix_mp.field = field;\n+        fmt->fmt.pix_mp.width = width;\n+        fmt->fmt.pix_mp.height = height;\n+        /* TODO: bytesperline and imagesize */\n+    } else {\n+        fmt->fmt.pix.field = field;\n+        fmt->fmt.pix.width = width;\n+        fmt->fmt.pix.height = height;\n+        fmt->fmt.pix.sizeimage = 0;\n+        fmt->fmt.pix.bytesperline = 0;\n+    }\n+\n+    ret = ioctl(ctx->fd, VIDIOC_S_FMT, fmt);\n+    if (ret)\n+        av_log(NULL, AV_LOG_ERROR, \"VIDIOC_S_FMT failed: %d\\n\", ret);\n+\n+    return ret;\n+}\n+\n+static int deint_v4l2m2m_probe_device(DeintV4L2M2MContextShared *ctx, char *node)\n+{\n+    int ret;\n+\n+    ctx->fd = open(node, O_RDWR | O_NONBLOCK, 0);\n+    if (ctx->fd < 0)\n+        return AVERROR(errno);\n+\n+    ret = deint_v4l2m2m_prepare_context(ctx);\n+    if (ret)\n+        goto fail;\n+\n+    ret = deint_v4l2m2m_try_format(&ctx->capture);\n+    if (ret)\n+        goto fail;\n+\n+    ret = deint_v4l2m2m_try_format(&ctx->output);\n+    if (ret)\n+        goto fail;\n+\n+    return 0;\n+\n+fail:\n+    close(ctx->fd);\n+    ctx->fd = -1;\n+\n+    return ret;\n+}\n+\n+static int deint_v4l2m2m_find_device(DeintV4L2M2MContextShared *ctx)\n+{\n+    int ret = AVERROR(EINVAL);\n+    struct dirent *entry;\n+    char node[PATH_MAX];\n+    DIR *dirp;\n+\n+    dirp = opendir(\"/dev\");\n+    if (!dirp)\n+        return AVERROR(errno);\n+\n+    for (entry = readdir(dirp); entry; entry = readdir(dirp)) {\n+\n+        if (strncmp(entry->d_name, \"video\", 5))\n+            continue;\n+\n+        snprintf(node, sizeof(node), \"/dev/%s\", entry->d_name);\n+        av_log(NULL, AV_LOG_DEBUG, \"probing device %s\\n\", node);\n+        ret = deint_v4l2m2m_probe_device(ctx, node);\n+        if (!ret)\n+            break;\n+    }\n+\n+    closedir(dirp);\n+\n+    if (ret) {\n+        av_log(NULL, AV_LOG_ERROR, \"Could not find a valid device\\n\");\n+        ctx->fd = -1;\n+\n+        return ret;\n+    }\n+\n+    av_log(NULL, AV_LOG_INFO, \"Using device %s\\n\", node);\n+\n+    return 0;\n+}\n+\n+static int deint_v4l2m2m_enqueue_buffer(V4L2Buffer *buf)\n+{\n+    int ret;\n+\n+    ret = ioctl(buf->q->ctx->fd, VIDIOC_QBUF, &buf->buffer);\n+    if (ret < 0)\n+        return AVERROR(errno);\n+\n+    buf->enqueued = 1;\n+\n+    return 0;\n+}\n+\n+static int v4l2_buffer_export_drm(V4L2Buffer* avbuf)\n+{\n+    struct v4l2_exportbuffer expbuf;\n+    int i, ret;\n+\n+    for (i = 0; i < avbuf->num_planes; i++) {\n+        memset(&expbuf, 0, sizeof(expbuf));\n+\n+        expbuf.index = avbuf->buffer.index;\n+        expbuf.type = avbuf->buffer.type;\n+        expbuf.plane = i;\n+\n+        ret = ioctl(avbuf->q->ctx->fd, VIDIOC_EXPBUF, &expbuf);\n+        if (ret < 0)\n+            return AVERROR(errno);\n+\n+        avbuf->fd = expbuf.fd;\n+\n+        if (V4L2_TYPE_IS_MULTIPLANAR(avbuf->buffer.type)) {\n+            /* drm frame */\n+            avbuf->drm_frame.objects[i].size = avbuf->buffer.m.planes[i].length;\n+            avbuf->drm_frame.objects[i].fd = expbuf.fd;\n+            avbuf->drm_frame.objects[i].format_modifier = DRM_FORMAT_MOD_LINEAR;\n+        } else {\n+            /* drm frame */\n+            avbuf->drm_frame.objects[0].size = avbuf->buffer.length;\n+            avbuf->drm_frame.objects[0].fd = expbuf.fd;\n+            avbuf->drm_frame.objects[0].format_modifier = DRM_FORMAT_MOD_LINEAR;\n+        }\n+    }\n+\n+    return 0;\n+}\n+\n+static int deint_v4l2m2m_allocate_buffers(V4L2Queue *queue)\n+{\n+    struct v4l2_format *fmt = &queue->format;\n+    DeintV4L2M2MContextShared *ctx = queue->ctx;\n+    struct v4l2_requestbuffers req;\n+    int ret, i, j, multiplanar;\n+    uint32_t memory;\n+\n+    memory = V4L2_TYPE_IS_OUTPUT(fmt->type) ?\n+        V4L2_MEMORY_DMABUF : V4L2_MEMORY_MMAP;\n+\n+    multiplanar = V4L2_TYPE_IS_MULTIPLANAR(fmt->type);\n+\n+    memset(&req, 0, sizeof(req));\n+    req.count = queue->num_buffers;\n+    req.memory = memory;\n+    req.type = fmt->type;\n+\n+    ret = ioctl(ctx->fd, VIDIOC_REQBUFS, &req);\n+    if (ret < 0) {\n+        av_log(NULL, AV_LOG_ERROR, \"VIDIOC_REQBUFS failed: %s\\n\", strerror(errno));\n+\n+        return AVERROR(errno);\n+    }\n+\n+    queue->num_buffers = req.count;\n+    queue->buffers = av_mallocz(queue->num_buffers * sizeof(V4L2Buffer));\n+    if (!queue->buffers) {\n+        av_log(NULL, AV_LOG_ERROR, \"malloc enomem\\n\");\n+\n+        return AVERROR(ENOMEM);\n+    }\n+\n+    for (i = 0; i < queue->num_buffers; i++) {\n+        V4L2Buffer *buf = &queue->buffers[i];\n+\n+        buf->enqueued = 0;\n+        buf->fd = -1;\n+        buf->q = queue;\n+\n+        buf->buffer.type = fmt->type;\n+        buf->buffer.memory = memory;\n+        buf->buffer.index = i;\n+\n+        if (multiplanar) {\n+            buf->buffer.length = VIDEO_MAX_PLANES;\n+            buf->buffer.m.planes = buf->planes;\n+        }\n+\n+        ret = ioctl(ctx->fd, VIDIOC_QUERYBUF, &buf->buffer);\n+        if (ret < 0) {\n+            ret = AVERROR(errno);\n+\n+            goto fail;\n+        }\n+\n+        if (multiplanar)\n+            buf->num_planes = buf->buffer.length;\n+        else\n+            buf->num_planes = 1;\n+\n+        for (j = 0; j < buf->num_planes; j++) {\n+            V4L2PlaneInfo *info = &buf->plane_info[j];\n+\n+            if (multiplanar) {\n+                info->bytesperline = fmt->fmt.pix_mp.plane_fmt[j].bytesperline;\n+                info->length = buf->buffer.m.planes[j].length;\n+            } else {\n+                info->bytesperline = fmt->fmt.pix.bytesperline;\n+                info->length = buf->buffer.length;\n+            }\n+        }\n+\n+        if (!V4L2_TYPE_IS_OUTPUT(fmt->type)) {\n+            ret = deint_v4l2m2m_enqueue_buffer(buf);\n+            if (ret)\n+                goto fail;\n+\n+            ret = v4l2_buffer_export_drm(buf);\n+            if (ret)\n+                goto fail;\n+        }\n+    }\n+\n+    return 0;\n+\n+fail:\n+    for (i = 0; i < queue->num_buffers; i++)\n+        if (queue->buffers[i].fd >= 0)\n+            close(queue->buffers[i].fd);\n+    av_free(queue->buffers);\n+    queue->buffers = NULL;\n+\n+    return ret;\n+}\n+\n+static int deint_v4l2m2m_streamon(V4L2Queue *queue)\n+{\n+    int type = queue->format.type;\n+    int ret;\n+\n+    ret = ioctl(queue->ctx->fd, VIDIOC_STREAMON, &type);\n+    if (ret < 0)\n+        return AVERROR(errno);\n+\n+    return 0;\n+}\n+\n+static int deint_v4l2m2m_streamoff(V4L2Queue *queue)\n+{\n+    int type = queue->format.type;\n+    int ret;\n+\n+    ret = ioctl(queue->ctx->fd, VIDIOC_STREAMOFF, &type);\n+    if (ret < 0)\n+        return AVERROR(errno);\n+\n+    return 0;\n+}\n+\n+static V4L2Buffer* deint_v4l2m2m_dequeue_buffer(V4L2Queue *queue, int timeout)\n+{\n+    struct v4l2_plane planes[VIDEO_MAX_PLANES];\n+    DeintV4L2M2MContextShared *ctx = queue->ctx;\n+    struct v4l2_buffer buf = { 0 };\n+    V4L2Buffer* avbuf = NULL;\n+    struct pollfd pfd;\n+    short events;\n+    int ret;\n+\n+    if (V4L2_TYPE_IS_OUTPUT(queue->format.type))\n+        events =  POLLOUT | POLLWRNORM;\n+    else\n+        events = POLLIN | POLLRDNORM;\n+\n+    pfd.events = events;\n+    pfd.fd = ctx->fd;\n+\n+    for (;;) {\n+        ret = poll(&pfd, 1, timeout);\n+        if (ret > 0)\n+            break;\n+        if (errno == EINTR)\n+            continue;\n+        return NULL;\n+    }\n+\n+    if (pfd.revents & POLLERR)\n+        return NULL;\n+\n+    if (pfd.revents & events) {\n+        memset(&buf, 0, sizeof(buf));\n+        buf.memory = V4L2_MEMORY_MMAP;\n+        buf.type = queue->format.type;\n+        if (V4L2_TYPE_IS_MULTIPLANAR(queue->format.type)) {\n+            memset(planes, 0, sizeof(planes));\n+            buf.length = VIDEO_MAX_PLANES;\n+            buf.m.planes = planes;\n+        }\n+\n+        ret = ioctl(ctx->fd, VIDIOC_DQBUF, &buf);\n+        if (ret) {\n+            if (errno != EAGAIN)\n+                av_log(NULL, AV_LOG_DEBUG, \"VIDIOC_DQBUF, errno (%s)\\n\",\n+                       av_err2str(AVERROR(errno)));\n+            return NULL;\n+        }\n+\n+        avbuf = &queue->buffers[buf.index];\n+        avbuf->enqueued = 0;\n+        avbuf->buffer = buf;\n+        if (V4L2_TYPE_IS_MULTIPLANAR(queue->format.type)) {\n+            memcpy(avbuf->planes, planes, sizeof(planes));\n+            avbuf->buffer.m.planes = avbuf->planes;\n+        }\n+\n+        return avbuf;\n+    }\n+\n+    return NULL;\n+}\n+\n+static V4L2Buffer *deint_v4l2m2m_find_free_buf(V4L2Queue *queue)\n+{\n+    int i;\n+\n+    for (i = 0; i < queue->num_buffers; i++)\n+        if (!queue->buffers[i].enqueued)\n+            return &queue->buffers[i];\n+\n+    return NULL;\n+}\n+\n+static int deint_v4l2m2m_enqueue(V4L2Queue *queue, const AVFrame* frame)\n+{\n+    AVDRMFrameDescriptor *drm_desc = (AVDRMFrameDescriptor *)frame->data[0];\n+    V4L2Buffer *buf;\n+    int i;\n+\n+    if (V4L2_TYPE_IS_OUTPUT(queue->format.type))\n+        while (deint_v4l2m2m_dequeue_buffer(queue, 0));\n+\n+    buf = deint_v4l2m2m_find_free_buf(queue);\n+    if (!buf)\n+        return AVERROR(ENOMEM);\n+\n+    if (V4L2_TYPE_IS_MULTIPLANAR(buf->buffer.type))\n+        for (i = 0; i < drm_desc->nb_objects; i++)\n+            buf->buffer.m.planes[i].m.fd = drm_desc->objects[i].fd;\n+    else\n+        buf->buffer.m.fd = drm_desc->objects[0].fd;\n+\n+    return deint_v4l2m2m_enqueue_buffer(buf);\n+}\n+\n+static void deint_v4l2m2m_destroy_context(DeintV4L2M2MContextShared *ctx)\n+{\n+    if (atomic_fetch_sub(&ctx->refcount, 1) == 1) {\n+        V4L2Queue *capture = &ctx->capture;\n+        V4L2Queue *output  = &ctx->output;\n+        int i;\n+\n+        av_log(NULL, AV_LOG_DEBUG, \"%s - destroying context\\n\", __func__);\n+\n+        if (ctx->fd >= 0) {\n+            deint_v4l2m2m_streamoff(capture);\n+            deint_v4l2m2m_streamoff(output);\n+        }\n+\n+        if (capture->buffers)\n+            for (i = 0; i < capture->num_buffers; i++) {\n+                capture->buffers[i].q = NULL;\n+                if (capture->buffers[i].fd >= 0)\n+                    close(capture->buffers[i].fd);\n+            }\n+\n+        for (i = 0; i < ctx->frame_count; i++)\n+            av_frame_free(&ctx->frames[i]);\n+\n+        av_buffer_unref(&ctx->hw_frames_ctx);\n+\n+        if (capture->buffers)\n+            av_free(capture->buffers);\n+\n+        if (output->buffers)\n+            av_free(output->buffers);\n+\n+        if (ctx->fd >= 0) {\n+            close(ctx->fd);\n+            ctx->fd = -1;\n+        }\n+\n+        av_free(ctx);\n+    }\n+}\n+\n+static void v4l2_free_buffer(void *opaque, uint8_t *unused)\n+{\n+    V4L2Buffer *buf                = opaque;\n+    DeintV4L2M2MContextShared *ctx = buf->q->ctx;\n+\n+    if (!ctx->done)\n+        deint_v4l2m2m_enqueue_buffer(buf);\n+\n+    deint_v4l2m2m_destroy_context(ctx);\n+}\n+\n+static uint8_t *v4l2_get_drm_frame(V4L2Buffer *avbuf, int height)\n+{\n+    AVDRMFrameDescriptor *drm_desc = &avbuf->drm_frame;\n+    AVDRMLayerDescriptor *layer;\n+\n+    /* fill the DRM frame descriptor */\n+    drm_desc->nb_objects = avbuf->num_planes;\n+    drm_desc->nb_layers = 1;\n+\n+    layer = &drm_desc->layers[0];\n+    layer->nb_planes = avbuf->num_planes;\n+\n+    for (int i = 0; i < avbuf->num_planes; i++) {\n+        layer->planes[i].object_index = i;\n+        layer->planes[i].offset = 0;\n+        layer->planes[i].pitch = avbuf->plane_info[i].bytesperline;\n+    }\n+\n+    layer->format = DRM_FORMAT_NV12;\n+\n+    if (avbuf->num_planes == 1) {\n+        layer->nb_planes = 2;\n+\n+        layer->planes[1].object_index = 0;\n+        layer->planes[1].offset = avbuf->plane_info[0].bytesperline * height;\n+        layer->planes[1].pitch = avbuf->plane_info[0].bytesperline;\n+    }\n+\n+    return (uint8_t *)drm_desc;\n+}\n+\n+static int deint_v4l2m2m_dequeue_frame(V4L2Queue *queue, AVFrame* frame, int timeout)\n+{\n+    DeintV4L2M2MContextShared *ctx = queue->ctx;\n+    V4L2Buffer* avbuf;\n+\n+    avbuf = deint_v4l2m2m_dequeue_buffer(queue, timeout);\n+    if (!avbuf) {\n+        av_log(NULL, AV_LOG_ERROR, \"dequeueing failed\\n\");\n+        return AVERROR(EINVAL);\n+    }\n+\n+    frame->buf[0] = av_buffer_create((uint8_t *) &avbuf->drm_frame,\n+                            sizeof(avbuf->drm_frame), v4l2_free_buffer,\n+                            avbuf, AV_BUFFER_FLAG_READONLY);\n+    if (!frame->buf[0])\n+        return AVERROR(ENOMEM);\n+\n+    atomic_fetch_add(&ctx->refcount, 1);\n+\n+    frame->data[0] = (uint8_t *)v4l2_get_drm_frame(avbuf, ctx->orig_height);\n+    frame->format = AV_PIX_FMT_DRM_PRIME;\n+    frame->hw_frames_ctx = av_buffer_ref(ctx->hw_frames_ctx);\n+    frame->height = ctx->height;\n+    frame->width = ctx->width;\n+\n+    if (avbuf->buffer.flags & V4L2_BUF_FLAG_ERROR) {\n+        av_log(NULL, AV_LOG_ERROR, \"driver decode error\\n\");\n+        frame->decode_error_flags |= FF_DECODE_ERROR_INVALID_BITSTREAM;\n+    }\n+\n+    return 0;\n+}\n+\n+static int deint_v4l2m2m_dequeue(AVFilterContext *avctx, AVFrame *input_frame, int field)\n+{\n+    DeintV4L2M2MContext *priv      = avctx->priv;\n+    DeintV4L2M2MContextShared *ctx = priv->shared;\n+    AVFilterLink *outlink          = avctx->outputs[0];\n+    AVFrame *output_frame;\n+    int err;\n+\n+    output_frame = av_frame_alloc();\n+\n+    if (!output_frame)\n+        return AVERROR(ENOMEM);\n+\n+    err = deint_v4l2m2m_dequeue_frame(&ctx->capture, output_frame, 500);\n+    if (err < 0) {\n+        av_log(priv, AV_LOG_ERROR, \"no frame (field %d)\\n\", field);\n+        goto fail;\n+    }\n+\n+    err = av_frame_copy_props(output_frame, input_frame);\n+    if (err < 0)\n+        goto fail;\n+\n+    output_frame->interlaced_frame = 0;\n+\n+    if (field == 0) {\n+        output_frame->pts *= 2;\n+    } else {\n+        int64_t cur_pts  = ctx->frames[0]->pts;\n+        int64_t next_pts = ctx->frames[1]->pts;\n+\n+        if (next_pts != AV_NOPTS_VALUE && cur_pts != AV_NOPTS_VALUE) {\n+            output_frame->pts = next_pts + cur_pts;\n+        } else {\n+            output_frame->pts = AV_NOPTS_VALUE;\n+        }\n+    }\n+    av_log(priv, AV_LOG_DEBUG, \"pts: %\"PRId64\" (field %d)\\n\", output_frame->pts, field);\n+\n+    return ff_filter_frame(outlink, output_frame);\n+\n+fail:\n+    av_frame_free(&output_frame);\n+    return err;\n+}\n+\n+static int deint_v4l2m2m_config_props(AVFilterLink *outlink)\n+{\n+    AVFilterLink *inlink           = outlink->src->inputs[0];\n+    AVFilterContext *avctx         = outlink->src;\n+    DeintV4L2M2MContext *priv      = avctx->priv;\n+    DeintV4L2M2MContextShared *ctx = priv->shared;\n+    int ret;\n+\n+    ctx->height = avctx->inputs[0]->h;\n+    ctx->width = avctx->inputs[0]->w;\n+\n+    outlink->frame_rate = av_mul_q(inlink->frame_rate,\n+                                   (AVRational){ 2, 1 });\n+    outlink->time_base  = av_mul_q(inlink->time_base,\n+                                   (AVRational){ 1, 2 });\n+\n+    ret = deint_v4l2m2m_find_device(ctx);\n+    if (ret)\n+        return ret;\n+\n+    if (!inlink->hw_frames_ctx) {\n+        av_log(priv, AV_LOG_ERROR, \"No hw context provided on input\\n\");\n+        return AVERROR(EINVAL);\n+    }\n+\n+    ctx->hw_frames_ctx = av_buffer_ref(inlink->hw_frames_ctx);\n+    if (!ctx->hw_frames_ctx)\n+            return AVERROR(ENOMEM);\n+\n+    return 0;\n+}\n+\n+static int deint_v4l2m2m_query_formats(AVFilterContext *avctx)\n+{\n+    static const enum AVPixelFormat pixel_formats[] = {\n+        AV_PIX_FMT_DRM_PRIME,\n+        AV_PIX_FMT_NONE,\n+    };\n+\n+    return ff_set_common_formats(avctx, ff_make_format_list(pixel_formats));\n+}\n+\n+static int deint_v4l2m2m_filter_frame(AVFilterLink *link, AVFrame *in)\n+{\n+    AVFilterContext *avctx         = link->dst;\n+    DeintV4L2M2MContext *priv      = avctx->priv;\n+    DeintV4L2M2MContextShared *ctx = priv->shared;\n+    V4L2Queue *capture             = &ctx->capture;\n+    V4L2Queue *output              = &ctx->output;\n+    int ret;\n+\n+    av_log(priv, AV_LOG_DEBUG, \"input pts: %\"PRId64\"\\n\", in->pts);\n+    if (!ctx->frame_count) {\n+        AVDRMFrameDescriptor *drm_desc = (AVDRMFrameDescriptor *)in->data[0];\n+        unsigned int field;\n+\n+        ctx->orig_width = drm_desc->layers[0].planes[0].pitch;\n+        ctx->orig_height = drm_desc->layers[0].planes[1].offset / ctx->orig_width;\n+\n+        if (in->top_field_first)\n+            field = V4L2_FIELD_INTERLACED_TB;\n+        else\n+            field = V4L2_FIELD_INTERLACED_BT;\n+\n+        ret = deint_v4l2m2m_set_format(output, field, ctx->orig_width, ctx->orig_height);\n+        if (ret)\n+            return ret;\n+\n+\tret = deint_v4l2m2m_set_format(capture, V4L2_FIELD_NONE, ctx->orig_width, ctx->orig_height);\n+        if (ret)\n+            return ret;\n+\n+        ret = deint_v4l2m2m_allocate_buffers(capture);\n+        if (ret)\n+            return ret;\n+\n+        ret = deint_v4l2m2m_streamon(capture);\n+        if (ret)\n+            return ret;\n+\n+        ret = deint_v4l2m2m_allocate_buffers(output);\n+        if (ret)\n+            return ret;\n+\n+        ret = deint_v4l2m2m_streamon(output);\n+        if (ret)\n+            return ret;\n+    }\n+\n+    if (ctx->frame_count < 2) {\n+        ctx->frames[ctx->frame_count++] = in;\n+    } else {\n+        av_frame_free(&ctx->frames[0]);\n+        ctx->frames[0] = ctx->frames[1];\n+        ctx->frames[1] = in;\n+    }\n+\n+    ret = deint_v4l2m2m_enqueue(output, in);\n+    if (ret)\n+        return ret;\n+\n+    if (ctx->frame_count == 2) {\n+        ret = deint_v4l2m2m_dequeue(avctx, ctx->frames[0], 0);\n+        if (ret)\n+            return ret;\n+\n+        ret = deint_v4l2m2m_dequeue(avctx, ctx->frames[0], 1);\n+        if (ret)\n+            return ret;\n+    }\n+\n+    return 0;\n+}\n+\n+static av_cold int deint_v4l2m2m_init(AVFilterContext *avctx)\n+{\n+    DeintV4L2M2MContext *priv = avctx->priv;\n+    DeintV4L2M2MContextShared *ctx;\n+\n+    ctx = av_mallocz(sizeof(DeintV4L2M2MContextShared));\n+    if (!ctx)\n+        return AVERROR(ENOMEM);\n+\n+    priv->shared = ctx;\n+    ctx->fd = -1;\n+    ctx->output.ctx = ctx;\n+    ctx->output.num_buffers = 6;\n+    ctx->capture.ctx = ctx;\n+    ctx->capture.num_buffers = 6;\n+    ctx->done = 0;\n+    atomic_init(&ctx->refcount, 1);\n+\n+    return 0;\n+}\n+\n+static void deint_v4l2m2m_uninit(AVFilterContext *avctx)\n+{\n+    DeintV4L2M2MContext *priv = avctx->priv;\n+    DeintV4L2M2MContextShared *ctx = priv->shared;\n+\n+    ctx->done = 1;\n+    deint_v4l2m2m_destroy_context(ctx);\n+}\n+\n+static const AVOption deinterlace_v4l2m2m_options[] = {\n+    { NULL },\n+};\n+\n+AVFILTER_DEFINE_CLASS(deinterlace_v4l2m2m);\n+\n+static const AVFilterPad deint_v4l2m2m_inputs[] = {\n+    {\n+        .name         = \"default\",\n+        .type         = AVMEDIA_TYPE_VIDEO,\n+        .filter_frame = deint_v4l2m2m_filter_frame,\n+    },\n+    { NULL }\n+};\n+\n+static const AVFilterPad deint_v4l2m2m_outputs[] = {\n+    {\n+        .name          = \"default\",\n+        .type          = AVMEDIA_TYPE_VIDEO,\n+        .config_props  = deint_v4l2m2m_config_props,\n+    },\n+    { NULL }\n+};\n+\n+AVFilter ff_vf_deinterlace_v4l2m2m = {\n+    .name           = \"deinterlace_v4l2m2m\",\n+    .description    = NULL_IF_CONFIG_SMALL(\"V4L2 M2M deinterlacer\"),\n+    .priv_size      = sizeof(DeintV4L2M2MContext),\n+    .init           = &deint_v4l2m2m_init,\n+    .uninit         = &deint_v4l2m2m_uninit,\n+    .query_formats  = &deint_v4l2m2m_query_formats,\n+    .inputs         = deint_v4l2m2m_inputs,\n+    .outputs        = deint_v4l2m2m_outputs,\n+    .priv_class     = &deinterlace_v4l2m2m_class,\n+};\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/Allwinner/patches/ffmpeg/0002-libavfilter-v4l2deinterlace-dequeue-both-destination.patch",
    "content": "From 6bea46839ba23bffaa093bb9ed805d571aaa66ea Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Wed, 30 Sep 2020 21:11:34 +0200\nSubject: [PATCH] libavfilter: v4l2deinterlace: dequeue both destination\n buffers on time\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n libavfilter/vf_deinterlace_v4l2m2m.c | 140 +++++++++++++++++----------\n 1 file changed, 88 insertions(+), 52 deletions(-)\n\ndiff --git a/libavfilter/vf_deinterlace_v4l2m2m.c b/libavfilter/vf_deinterlace_v4l2m2m.c\nindex 1029e5b620fd..72d28333ffa7 100644\n--- a/libavfilter/vf_deinterlace_v4l2m2m.c\n+++ b/libavfilter/vf_deinterlace_v4l2m2m.c\n@@ -89,8 +89,14 @@ typedef struct DeintV4L2M2MContextShared {\n \n     AVBufferRef *hw_frames_ctx;\n \n-    int frame_count;\n-    AVFrame *frames[2];\n+    /*\n+     * TODO: check if its really neccessary to hold this\n+     * ref, it's only used for freeing av_frame on decoding\n+     * end/abort\n+     */\n+    AVFrame *cur_in_frame;\n+    AVFrame *prev_in_frame;\n+    unsigned int field_order;\n \n     V4L2Queue output;\n     V4L2Queue capture;\n@@ -557,8 +563,11 @@ static void deint_v4l2m2m_destroy_context(DeintV4L2M2MContextShared *ctx)\n                     close(capture->buffers[i].fd);\n             }\n \n-        for (i = 0; i < ctx->frame_count; i++)\n-            av_frame_free(&ctx->frames[i]);\n+\tif (ctx->cur_in_frame)\n+\t\tav_frame_free(&ctx->cur_in_frame);\n+\n+\tif (ctx->prev_in_frame)\n+\t\tav_frame_free(&ctx->prev_in_frame);\n \n         av_buffer_unref(&ctx->hw_frames_ctx);\n \n@@ -652,49 +661,79 @@ static int deint_v4l2m2m_dequeue_frame(V4L2Queue *queue, AVFrame* frame, int tim\n     return 0;\n }\n \n-static int deint_v4l2m2m_dequeue(AVFilterContext *avctx, AVFrame *input_frame, int field)\n+static int deint_v4l2m2m_dequeue(AVFilterContext *avctx, AVFrame *input_frame)\n {\n     DeintV4L2M2MContext *priv      = avctx->priv;\n     DeintV4L2M2MContextShared *ctx = priv->shared;\n     AVFilterLink *outlink          = avctx->outputs[0];\n-    AVFrame *output_frame;\n+    AVFrame *output_frame_1, *output_frame_2;\n+    int64_t first_pts = AV_NOPTS_VALUE;\n     int err;\n \n-    output_frame = av_frame_alloc();\n+    av_log(priv, AV_LOG_DEBUG, \"input pts: %\"PRId64\" (field %d)\\n\",\n+          input_frame->pts, ctx->field_order);\n \n-    if (!output_frame)\n+    output_frame_1 = av_frame_alloc();\n+    if (!output_frame_1)\n         return AVERROR(ENOMEM);\n \n-    err = deint_v4l2m2m_dequeue_frame(&ctx->capture, output_frame, 500);\n+    err = deint_v4l2m2m_dequeue_frame(&ctx->capture, output_frame_1, 500);\n     if (err < 0) {\n-        av_log(priv, AV_LOG_ERROR, \"no frame (field %d)\\n\", field);\n-        goto fail;\n+        av_log(priv, AV_LOG_ERROR, \"no 1st frame (field %d)\\n\", ctx->field_order);\n+        goto fail_out1;\n     }\n \n-    err = av_frame_copy_props(output_frame, input_frame);\n+    err = av_frame_copy_props(output_frame_1, input_frame);\n     if (err < 0)\n-        goto fail;\n+        goto fail_out1;\n \n-    output_frame->interlaced_frame = 0;\n+    output_frame_1->interlaced_frame = 0;\n \n-    if (field == 0) {\n-        output_frame->pts *= 2;\n-    } else {\n-        int64_t cur_pts  = ctx->frames[0]->pts;\n-        int64_t next_pts = ctx->frames[1]->pts;\n+    output_frame_2 = av_frame_alloc();\n+    if (!output_frame_2) {\n+        err = AVERROR(ENOMEM);\n+        goto fail_out1;\n+    }\n+\n+    err = deint_v4l2m2m_dequeue_frame(&ctx->capture, output_frame_2, 500);\n+    if (err < 0) {\n+        av_log(priv, AV_LOG_ERROR, \"no 2nd frame (field %d)\\n\", ctx->field_order);\n+        goto fail_out2;\n+    }\n+\n+    err = av_frame_copy_props(output_frame_2, input_frame);\n+    if (err < 0)\n+        goto fail_out2;\n+\n+    output_frame_2->interlaced_frame = 0;\n \n-        if (next_pts != AV_NOPTS_VALUE && cur_pts != AV_NOPTS_VALUE) {\n-            output_frame->pts = next_pts + cur_pts;\n-        } else {\n-            output_frame->pts = AV_NOPTS_VALUE;\n-        }\n+    if (ctx->prev_in_frame && ctx->prev_in_frame->pts != AV_NOPTS_VALUE\n+       && input_frame->pts != AV_NOPTS_VALUE) {\n+      first_pts = (ctx->prev_in_frame->pts + input_frame->pts) / 2;\n+      av_log(priv, AV_LOG_DEBUG, \"calculated first pts %\"PRId64\"\\n\", first_pts);\n     }\n-    av_log(priv, AV_LOG_DEBUG, \"pts: %\"PRId64\" (field %d)\\n\", output_frame->pts, field);\n \n-    return ff_filter_frame(outlink, output_frame);\n+    output_frame_1->pts = first_pts;\n+\n+    err = ff_filter_frame(outlink, output_frame_1);\n+    if (err < 0) {\n+        av_frame_free(&output_frame_2);\n+        return err;\n+    }\n+    err = ff_filter_frame(outlink, output_frame_2);\n+\n+    if (err < 0)\n+        return err;\n+\n+    av_log(priv, AV_LOG_DEBUG, \"1st frame pts: %\"PRId64\" 2nd frame pts: %\"PRId64\" first pts: %\"PRId64\" (field %d)\\n\",\n+           output_frame_1->pts, output_frame_2->pts, first_pts, ctx->field_order);\n+\n+    return 0;\n \n-fail:\n-    av_frame_free(&output_frame);\n+fail_out2:\n+    av_frame_free(&output_frame_2);\n+fail_out1:\n+    av_frame_free(&output_frame_1);\n     return err;\n }\n \n@@ -749,20 +788,22 @@ static int deint_v4l2m2m_filter_frame(AVFilterLink *link, AVFrame *in)\n     V4L2Queue *output              = &ctx->output;\n     int ret;\n \n-    av_log(priv, AV_LOG_DEBUG, \"input pts: %\"PRId64\"\\n\", in->pts);\n-    if (!ctx->frame_count) {\n+    av_log(priv, AV_LOG_DEBUG, \"input pts: %\"PRId64\" field :%d interlaced: %d\\n\",\n+          in->pts, in->top_field_first, in->interlaced_frame);\n+\n+    ctx->cur_in_frame = in;\n+\n+    if (ctx->field_order == V4L2_FIELD_ANY) {\n         AVDRMFrameDescriptor *drm_desc = (AVDRMFrameDescriptor *)in->data[0];\n-        unsigned int field;\n-\n         ctx->orig_width = drm_desc->layers[0].planes[0].pitch;\n         ctx->orig_height = drm_desc->layers[0].planes[1].offset / ctx->orig_width;\n \n-        if (in->top_field_first)\n-            field = V4L2_FIELD_INTERLACED_TB;\n+\tif (in->top_field_first)\n+            ctx->field_order = V4L2_FIELD_INTERLACED_TB;\n         else\n-            field = V4L2_FIELD_INTERLACED_BT;\n+            ctx->field_order = V4L2_FIELD_INTERLACED_BT;\n \n-        ret = deint_v4l2m2m_set_format(output, field, ctx->orig_width, ctx->orig_height);\n+        ret = deint_v4l2m2m_set_format(output, ctx->field_order, ctx->orig_width, ctx->orig_height);\n         if (ret)\n             return ret;\n \n@@ -787,27 +828,19 @@ static int deint_v4l2m2m_filter_frame(AVFilterLink *link, AVFrame *in)\n             return ret;\n     }\n \n-    if (ctx->frame_count < 2) {\n-        ctx->frames[ctx->frame_count++] = in;\n-    } else {\n-        av_frame_free(&ctx->frames[0]);\n-        ctx->frames[0] = ctx->frames[1];\n-        ctx->frames[1] = in;\n-    }\n-\n     ret = deint_v4l2m2m_enqueue(output, in);\n     if (ret)\n         return ret;\n \n-    if (ctx->frame_count == 2) {\n-        ret = deint_v4l2m2m_dequeue(avctx, ctx->frames[0], 0);\n-        if (ret)\n-            return ret;\n+    ret = deint_v4l2m2m_dequeue(avctx, in);\n+    if (ret)\n+        return ret;\n \n-        ret = deint_v4l2m2m_dequeue(avctx, ctx->frames[0], 1);\n-        if (ret)\n-            return ret;\n-    }\n+    if (ctx->prev_in_frame)\n+\tav_frame_free(&ctx->prev_in_frame);\n+\n+    ctx->prev_in_frame = in;\n+    ctx->cur_in_frame = NULL;\n \n     return 0;\n }\n@@ -828,6 +861,9 @@ static av_cold int deint_v4l2m2m_init(AVFilterContext *avctx)\n     ctx->capture.ctx = ctx;\n     ctx->capture.num_buffers = 6;\n     ctx->done = 0;\n+    ctx->field_order = V4L2_FIELD_ANY;\n+    ctx->cur_in_frame = NULL;\n+    ctx->prev_in_frame = NULL;\n     atomic_init(&ctx->refcount, 1);\n \n     return 0;\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/Allwinner/patches/ffmpeg/0003-v4l2_request-revert-changes.patch",
    "content": "From 0770ca82391fb60084080b2fd235cc039a3b8314 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Sun, 25 Apr 2021 10:40:56 +0000\nSubject: [PATCH] v4l2_request: revert changes\n\n---\n libavcodec/v4l2_request.c      | 10 +++-------\n libavcodec/v4l2_request_h264.c |  8 ++++----\n 2 files changed, 7 insertions(+), 11 deletions(-)\n\ndiff --git a/libavcodec/v4l2_request.c b/libavcodec/v4l2_request.c\nindex 5234b5049b0d..1e513ee5df8d 100644\n--- a/libavcodec/v4l2_request.c\n+++ b/libavcodec/v4l2_request.c\n@@ -142,14 +142,12 @@ static int v4l2_request_queue_buffer(V4L2RequestContext *ctx, int request_fd, V4\n         .type = buf->buffer.type,\n         .memory = buf->buffer.memory,\n         .index = buf->index,\n-        .timestamp.tv_usec = ctx->timestamp,\n+        .timestamp.tv_usec = buf->index + 1,\n         .bytesused = buf->used,\n         .request_fd = request_fd,\n         .flags = ((request_fd >= 0) ? V4L2_BUF_FLAG_REQUEST_FD : 0) | flags,\n     };\n \n-    buf->buffer.timestamp = buffer.timestamp;\n-\n     if (V4L2_TYPE_IS_MULTIPLANAR(buf->buffer.type)) {\n         planes[0].bytesused = buf->used;\n         buffer.bytesused = 0;\n@@ -239,9 +237,6 @@ static int v4l2_request_queue_decode(AVCodecContext *avctx, AVFrame *frame, stru\n \n     av_log(avctx, AV_LOG_DEBUG, \"%s: avctx=%p used=%u controls=%d index=%d fd=%d request_fd=%d first_slice=%d last_slice=%d\\n\", __func__, avctx, req->output.used, count, req->capture.index, req->capture.fd, req->request_fd, first_slice, last_slice);\n \n-    if (first_slice)\n-        ctx->timestamp++;\n-\n     ret = v4l2_request_set_controls(ctx, req->request_fd, control, count);\n     if (ret < 0) {\n         av_log(avctx, AV_LOG_ERROR, \"%s: set controls failed for request %d, %s (%d)\\n\", __func__, req->request_fd, strerror(errno), errno);\n@@ -693,7 +688,6 @@ int ff_v4l2_request_init(AVCodecContext *avctx, uint32_t pixelformat, uint32_t b\n \n     ctx->media_fd = -1;\n     ctx->video_fd = -1;\n-    ctx->timestamp = 0;\n \n     udev = udev_new();\n     if (!udev) {\n@@ -827,6 +821,8 @@ static int v4l2_request_buffer_alloc(AVCodecContext *avctx, V4L2RequestBuffer *b\n         return ret;\n     }\n \n+    buf->buffer.timestamp.tv_usec = buf->index + 1;\n+\n     if (V4L2_TYPE_IS_OUTPUT(type)) {\n         void *addr = mmap(NULL, buf->size, PROT_READ | PROT_WRITE, MAP_SHARED, ctx->video_fd, V4L2_TYPE_IS_MULTIPLANAR(type) ? buf->buffer.m.planes[0].m.mem_offset : buf->buffer.m.offset);\n         if (addr == MAP_FAILED) {\ndiff --git a/libavcodec/v4l2_request_h264.c b/libavcodec/v4l2_request_h264.c\nindex 88da8f0a2db0..a14028336a39 100644\n--- a/libavcodec/v4l2_request_h264.c\n+++ b/libavcodec/v4l2_request_h264.c\n@@ -252,7 +252,7 @@ static int v4l2_request_h264_start_frame(AVCodecContext *avctx,\n \n     fill_dpb(&controls->decode_params, h);\n \n-    controls->first_slice = !FIELD_PICTURE(h) || h->first_field;\n+    controls->first_slice = 1;\n     controls->num_slices = 0;\n \n     return ff_v4l2_request_reset_frame(avctx, h->cur_pic_ptr->f);\n@@ -383,8 +383,7 @@ static int v4l2_request_h264_decode_slice(AVCodecContext *avctx, const uint8_t *\n \n static int v4l2_request_h264_end_frame(AVCodecContext *avctx)\n {\n-    const H264Context *h = avctx->priv_data;\n-    return v4l2_request_h264_queue_decode(avctx, !FIELD_PICTURE(h) || !h->first_field);\n+    return v4l2_request_h264_queue_decode(avctx, 1);\n }\n \n static int v4l2_request_h264_set_controls(AVCodecContext *avctx)\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0001-Input-axp20x-pek-allow-wakeup-after-shutdown.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 2 Jan 2021 15:52:27 -0600\nSubject: [PATCH] Input: axp20x-pek - allow wakeup after shutdown\n\nWhile the AXP20x PMIC handles the power button itself after shutting\ndown, it is not always possible to use the PMIC's built-in shutdown\nfeature, such as when other wakeup sources are needed (for example, an\nIR remote or wake-on-LAN) that require firmware support. In that case,\nthe PMIC remains on, but suspended, until the board is powered back on.\n\nDuring this \"fake\" off state, IRQ configuration is similar to system\nsleep, where enable_irq_wake() must be call on an IRQ for it to be\nwakeup capable. Run the suspend callback to arm the power button IRQs\nduring the shutdown process, so the power button works in this state.\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n drivers/input/misc/axp20x-pek.c | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)\n\n--- a/drivers/input/misc/axp20x-pek.c\n+++ b/drivers/input/misc/axp20x-pek.c\n@@ -354,7 +354,7 @@ static int axp20x_pek_probe(struct platf\n \treturn 0;\n }\n \n-static int __maybe_unused axp20x_pek_suspend(struct device *dev)\n+static int axp20x_pek_suspend(struct device *dev)\n {\n \tstruct axp20x_pek *axp20x_pek = dev_get_drvdata(dev);\n \n@@ -413,6 +413,11 @@ static const struct dev_pm_ops axp20x_pe\n #endif\n };\n \n+static void axp20x_pek_shutdown(struct platform_device *pdev)\n+{\n+\taxp20x_pek_suspend(&pdev->dev);\n+}\n+\n static const struct platform_device_id axp_pek_id_match[] = {\n \t{\n \t\t.name = \"axp20x-pek\",\n@@ -428,6 +433,7 @@ MODULE_DEVICE_TABLE(platform, axp_pek_id\n \n static struct platform_driver axp20x_pek_driver = {\n \t.probe\t\t= axp20x_pek_probe,\n+\t.shutdown\t= axp20x_pek_shutdown,\n \t.id_table\t= axp_pek_id_match,\n \t.driver\t\t= {\n \t\t.name\t\t= \"axp20x-pek\",\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0002-clk-Implement-protected-clocks-for-all-OF-clock-prov.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sun, 29 Dec 2019 20:23:28 -0600\nSubject: [PATCH] clk: Implement protected-clocks for all OF clock providers\n\nThis is a generic implementation of the \"protected-clocks\" property from\nthe common clock binding. It allows firmware to inform the OS about\nclocks that must not be disabled while the OS is running.\n\nThis implementation comes with some caveats:\n\n1) Clocks that have CLK_IS_CRITICAL in their init data are prepared/\nenabled before they are attached to the clock tree. protected-clocks are\nonly protected once the clock provider is added, which is generally\nafter all of the clocks it provides have been registered. This leaves a\nwindow of opportunity where something could disable or modify the clock,\nsuch as a driver running on another CPU, or the clock core itself. There\nis a comment to this effect in __clk_core_init():\n\n  /*\n   * Enable CLK_IS_CRITICAL clocks so newly added critical clocks\n   * don't get accidentally disabled when walking the orphan tree and\n   * reparenting clocks\n   */\n\nSimilarly, these clocks will be enabled after they are first reparented,\nunlike other CLK_IS_CRITICAL clocks. See the comment in\nclk_core_reparent_orphans_nolock():\n\n  /*\n   * We need to use __clk_set_parent_before() and _after() to\n   * to properly migrate any prepare/enable count of the orphan\n   * clock. This is important for CLK_IS_CRITICAL clocks, which\n   * are enabled during init but might not have a parent yet.\n   */\n\nIdeally we could detect protected clocks before they are reparented, but\nthere are two problems with that:\n\n  a) From the clock core's perspective, hw->init is const.\n\n  b) The clock core doesn't see the device_node until __clk_register is\n     called on the first clock.\n\nSo the only \"race-free\" way to detect protected-clocks is to do it in\nthe middle of __clk_register, between when core->flags is initialized\nand calling __clk_core_init(). That requires scanning the device tree\nagain for each clock, which is part of why I didn't do it that way.\n\n2) __clk_protect needs to be idempotent, for two reasons:\n\n  a) Clocks with CLK_IS_CRITICAL in their init data are already\n     prepared/enabled, and we don't want to prepare/enable them again.\n\n  b) of_clk_set_defaults() is called twice for (at least some) clock\n     controllers registered with CLK_OF_DECLARE. It is called first in\n     of_clk_add_provider()/of_clk_add_hw_provider() inside clk_init_cb,\n     and again afterward in of_clk_init(). The second call in\n     of_clk_init() may be unnecessary, but verifying that would require\n     auditing all users of CLK_OF_DECLARE to ensure they called one of\n     the of_clk_add{,_hw}_provider functions.\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n drivers/clk/clk-conf.c | 54 ++++++++++++++++++++++++++++++++++++++++++\n drivers/clk/clk.c      | 31 ++++++++++++++++++++++++\n drivers/clk/clk.h      |  2 ++\n 3 files changed, 87 insertions(+)\n\n--- a/drivers/clk/clk-conf.c\n+++ b/drivers/clk/clk-conf.c\n@@ -11,6 +11,54 @@\n #include <linux/of.h>\n #include <linux/printk.h>\n \n+#include \"clk.h\"\n+\n+static int __set_clk_flags(struct device_node *node)\n+{\n+\tstruct of_phandle_args clkspec;\n+\tstruct property *prop;\n+\tint i, index = 0, rc;\n+\tconst __be32 *cur;\n+\tstruct clk *clk;\n+\tu32 nr_cells;\n+\n+\trc = of_property_read_u32(node, \"#clock-cells\", &nr_cells);\n+\tif (rc < 0) {\n+\t\tpr_err(\"clk: missing #clock-cells property on %pOF\\n\", node);\n+\t\treturn rc;\n+\t}\n+\n+\tclkspec.np         = node;\n+\tclkspec.args_count = nr_cells;\n+\n+\tof_property_for_each_u32(node, \"protected-clocks\", prop, cur, clkspec.args[0]) {\n+\t\t/* read the remainder of the clock specifier */\n+\t\tfor (i = 1; i < nr_cells; ++i) {\n+\t\t\tcur = of_prop_next_u32(prop, cur, &clkspec.args[i]);\n+\t\t\tif (!cur) {\n+\t\t\t\tpr_err(\"clk: invalid value of protected-clocks\"\n+\t\t\t\t       \" property at %pOF\\n\", node);\n+\t\t\t\treturn -EINVAL;\n+\t\t\t}\n+\t\t}\n+\t\tclk = of_clk_get_from_provider(&clkspec);\n+\t\tif (IS_ERR(clk)) {\n+\t\t\tif (PTR_ERR(clk) != -EPROBE_DEFER)\n+\t\t\t\tpr_err(\"clk: couldn't get protected clock\"\n+\t\t\t\t       \" %u for %pOF\\n\", index, node);\n+\t\t\treturn PTR_ERR(clk);\n+\t\t}\n+\n+\t\trc = __clk_protect(clk);\n+\t\tif (rc < 0)\n+\t\t\tpr_warn(\"clk: failed to protect %s: %d\\n\",\n+\t\t\t\t__clk_get_name(clk), rc);\n+\t\tclk_put(clk);\n+\t\tindex++;\n+\t}\n+\treturn 0;\n+}\n+\n static int __set_clk_parents(struct device_node *node, bool clk_supplier)\n {\n \tstruct of_phandle_args clkspec;\n@@ -135,6 +183,12 @@ int of_clk_set_defaults(struct device_no\n \tif (!node)\n \t\treturn 0;\n \n+\tif (clk_supplier) {\n+\t\trc = __set_clk_flags(node);\n+\t\tif (rc < 0)\n+\t\t\treturn rc;\n+\t}\n+\n \trc = __set_clk_parents(node, clk_supplier);\n \tif (rc < 0)\n \t\treturn rc;\n--- a/drivers/clk/clk.c\n+++ b/drivers/clk/clk.c\n@@ -4271,6 +4271,37 @@ struct clk *devm_clk_hw_get_clk(struct d\n EXPORT_SYMBOL_GPL(devm_clk_hw_get_clk);\n \n /*\n+ * clk-conf helpers\n+ */\n+\n+int __clk_protect(struct clk *clk)\n+{\n+\tstruct clk_core *core = clk->core;\n+\tint ret = 0;\n+\n+\tclk_prepare_lock();\n+\n+\t/*\n+\t * If CLK_IS_CRITICAL was set in the clock's init data, then\n+\t * the clock was already prepared/enabled when it was added.\n+\t */\n+\tif (core->flags & CLK_IS_CRITICAL)\n+\t\tgoto out;\n+\n+\tcore->flags |= CLK_IS_CRITICAL;\n+\tret = clk_core_prepare(core);\n+\tif (ret)\n+\t\tgoto out;\n+\n+\tret = clk_core_enable_lock(core);\n+\n+out:\n+\tclk_prepare_unlock();\n+\n+\treturn ret;\n+}\n+\n+/*\n  * clkdev helpers\n  */\n \n--- a/drivers/clk/clk.h\n+++ b/drivers/clk/clk.h\n@@ -24,6 +24,7 @@ struct clk_hw *clk_find_hw(const char *d\n #ifdef CONFIG_COMMON_CLK\n struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,\n \t\t\t      const char *dev_id, const char *con_id);\n+int __clk_protect(struct clk *clk);\n void __clk_put(struct clk *clk);\n #else\n /* All these casts to avoid ifdefs in clkdev... */\n@@ -33,6 +34,7 @@ clk_hw_create_clk(struct device *dev, st\n {\n \treturn (struct clk *)hw;\n }\n+static inline int __clk_protect(struct clk *clk) { return 0; }\n static inline void __clk_put(struct clk *clk) { }\n \n #endif\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0003-Revert-clk-qcom-Support-protected-clocks-property.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Mon, 30 Dec 2019 12:39:31 -0600\nSubject: [PATCH] Revert \"clk: qcom: Support 'protected-clocks' property\"\n\nNow that protected-clocks is handled in the clk core, this\ndriver-specific implementation is redundant.\n\nThis reverts commit b181b3b801da8893c8eb706e448dd5111b02de60.\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n drivers/clk/qcom/common.c | 18 ------------------\n 1 file changed, 18 deletions(-)\n\n--- a/drivers/clk/qcom/common.c\n+++ b/drivers/clk/qcom/common.c\n@@ -194,22 +194,6 @@ int qcom_cc_register_sleep_clk(struct de\n }\n EXPORT_SYMBOL_GPL(qcom_cc_register_sleep_clk);\n \n-/* Drop 'protected-clocks' from the list of clocks to register */\n-static void qcom_cc_drop_protected(struct device *dev, struct qcom_cc *cc)\n-{\n-\tstruct device_node *np = dev->of_node;\n-\tstruct property *prop;\n-\tconst __be32 *p;\n-\tu32 i;\n-\n-\tof_property_for_each_u32(np, \"protected-clocks\", prop, p, i) {\n-\t\tif (i >= cc->num_rclks)\n-\t\t\tcontinue;\n-\n-\t\tcc->rclks[i] = NULL;\n-\t}\n-}\n-\n static struct clk_hw *qcom_cc_clk_hw_get(struct of_phandle_args *clkspec,\n \t\t\t\t\t void *data)\n {\n@@ -272,8 +256,6 @@ int qcom_cc_really_probe(struct platform\n \tcc->rclks = rclks;\n \tcc->num_rclks = num_clks;\n \n-\tqcom_cc_drop_protected(dev, cc);\n-\n \tfor (i = 0; i < num_clk_hws; i++) {\n \t\tret = devm_clk_hw_register(dev, clk_hws[i]);\n \t\tif (ret)\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0004-DO-NOT-MERGE-ARM-dts-sunxi-h3-h5-Protect-SCP-clocks.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Wed, 1 Jan 2020 16:03:46 -0600\nSubject: [PATCH] [DO NOT MERGE] ARM: dts: sunxi: h3/h5: Protect SCP clocks\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n arch/arm/boot/dts/sunxi-h3-h5.dtsi | 2 ++\n 1 file changed, 2 insertions(+)\n\n--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi\n+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi\n@@ -388,6 +388,7 @@\n \t\t\treg = <0x01c20000 0x400>;\n \t\t\tclocks = <&osc24M>, <&rtc 0>;\n \t\t\tclock-names = \"hosc\", \"losc\";\n+\t\t\tprotected-clocks = <CLK_BUS_MSGBOX>;\n \t\t\t#clock-cells = <1>;\n \t\t\t#reset-cells = <1>;\n \t\t};\n@@ -876,6 +877,7 @@\n \t\t\tclocks = <&osc24M>, <&rtc 0>, <&rtc 2>,\n \t\t\t\t <&ccu CLK_PLL_PERIPH0>;\n \t\t\tclock-names = \"hosc\", \"losc\", \"iosc\", \"pll-periph\";\n+\t\t\tprotected-clocks = <CLK_APB0_TWD>;\n \t\t\t#clock-cells = <1>;\n \t\t\t#reset-cells = <1>;\n \t\t};\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0005-DO-NOT-MERGE-arm64-dts-allwinner-a64-Protect-SCP-clo.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Mon, 30 Dec 2019 15:10:32 -0600\nSubject: [PATCH] [DO NOT MERGE] arm64: dts: allwinner: a64: Protect SCP clocks\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 2 ++\n 1 file changed, 2 insertions(+)\n\n--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi\n@@ -646,6 +646,7 @@\n \t\t\treg = <0x01c20000 0x400>;\n \t\t\tclocks = <&osc24M>, <&rtc 0>;\n \t\t\tclock-names = \"hosc\", \"losc\";\n+\t\t\tprotected-clocks = <CLK_BUS_MSGBOX>;\n \t\t\t#clock-cells = <1>;\n \t\t\t#reset-cells = <1>;\n \t\t};\n@@ -1267,6 +1268,7 @@\n \t\t\tclocks = <&osc24M>, <&rtc 0>, <&rtc 2>,\n \t\t\t\t <&ccu CLK_PLL_PERIPH0>;\n \t\t\tclock-names = \"hosc\", \"losc\", \"iosc\", \"pll-periph\";\n+\t\t\tprotected-clocks = <CLK_APB0_TWD>;\n \t\t\t#clock-cells = <1>;\n \t\t\t#reset-cells = <1>;\n \t\t};\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0006-DO-NOT-MERGE-arm64-dts-allwinner-h6-Protect-SCP-cloc.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Wed, 1 Jan 2020 16:04:01 -0600\nSubject: [PATCH] [DO NOT MERGE] arm64: dts: allwinner: h6: Protect SCP clocks\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 2 ++\n 1 file changed, 2 insertions(+)\n\n--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi\n@@ -230,6 +230,7 @@\n \t\t\treg = <0x03001000 0x1000>;\n \t\t\tclocks = <&osc24M>, <&rtc 0>, <&rtc 2>;\n \t\t\tclock-names = \"hosc\", \"losc\", \"iosc\";\n+\t\t\tprotected-clocks = <CLK_BUS_MSGBOX>;\n \t\t\t#clock-cells = <1>;\n \t\t\t#reset-cells = <1>;\n \t\t};\n@@ -925,6 +926,7 @@\n \t\t\tclocks = <&osc24M>, <&rtc 0>, <&rtc 2>,\n \t\t\t\t <&ccu CLK_PLL_PERIPH0>;\n \t\t\tclock-names = \"hosc\", \"losc\", \"iosc\", \"pll-periph\";\n+\t\t\tprotected-clocks = <CLK_R_APB1_TWD>;\n \t\t\t#clock-cells = <1>;\n \t\t\t#reset-cells = <1>;\n \t\t};\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0007-rtc-sun6i-Allow-RTC-wakeup-after-shutdown.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 2 Jan 2021 15:52:27 -0600\nSubject: [PATCH] rtc: sun6i: Allow RTC wakeup after shutdown\n\nOnly IRQs that have enable_irq_wake() called on them can wake the system\nfrom sleep or after it has been shut down. Currently, the RTC alarm can\nonly wake the system from sleep. Run the suspend callback to arm the IRQ\nduring the shutdown process, so the RTC alarm also works after shutdown.\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n drivers/rtc/rtc-sun6i.c | 10 +++++++---\n 1 file changed, 7 insertions(+), 3 deletions(-)\n\n--- a/drivers/rtc/rtc-sun6i.c\n+++ b/drivers/rtc/rtc-sun6i.c\n@@ -641,7 +641,6 @@ static const struct rtc_class_ops sun6i_\n \t.alarm_irq_enable\t= sun6i_rtc_alarm_irq_enable\n };\n \n-#ifdef CONFIG_PM_SLEEP\n /* Enable IRQ wake on suspend, to wake up from RTC. */\n static int sun6i_rtc_suspend(struct device *dev)\n {\n@@ -654,7 +653,7 @@ static int sun6i_rtc_suspend(struct devi\n }\n \n /* Disable IRQ wake on resume. */\n-static int sun6i_rtc_resume(struct device *dev)\n+static int __maybe_unused sun6i_rtc_resume(struct device *dev)\n {\n \tstruct sun6i_rtc_dev *chip = dev_get_drvdata(dev);\n \n@@ -663,7 +662,6 @@ static int sun6i_rtc_resume(struct devic\n \n \treturn 0;\n }\n-#endif\n \n static SIMPLE_DEV_PM_OPS(sun6i_rtc_pm_ops,\n \tsun6i_rtc_suspend, sun6i_rtc_resume);\n@@ -735,6 +733,11 @@ static int sun6i_rtc_probe(struct platfo\n \treturn 0;\n }\n \n+static void sun6i_rtc_shutdown(struct platform_device *pdev)\n+{\n+\tsun6i_rtc_suspend(&pdev->dev);\n+}\n+\n /*\n  * As far as RTC functionality goes, all models are the same. The\n  * datasheets claim that different models have different number of\n@@ -755,6 +758,7 @@ MODULE_DEVICE_TABLE(of, sun6i_rtc_dt_ids\n \n static struct platform_driver sun6i_rtc_driver = {\n \t.probe\t\t= sun6i_rtc_probe,\n+\t.shutdown\t= sun6i_rtc_shutdown,\n \t.driver\t\t= {\n \t\t.name\t\t= \"sun6i-rtc\",\n \t\t.of_match_table = sun6i_rtc_dt_ids,\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0009-firmware-arm_scpi-Support-unidirectional-mailbox-cha.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Tue, 5 Mar 2019 22:02:41 -0600\nSubject: [PATCH] firmware: arm_scpi: Support unidirectional mailbox channels\n\nSome mailbox controllers have only unidirectional channels, so we need a\npair of them for each SCPI channel. If a mbox-names property is present,\nlook for \"rx\" and \"tx\" mbox channels; otherwise, the existing behavior\nis preserved, and a single mbox channel is used for each SCPI channel.\n\nNote that since the mailbox framework only supports a single phandle\nwith each name (mbox_request_channel_byname always returns the first\none), this new mode only supports a single SCPI channel.\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n drivers/firmware/arm_scpi.c | 58 +++++++++++++++++++++++++++++--------\n 1 file changed, 46 insertions(+), 12 deletions(-)\n\n--- a/drivers/firmware/arm_scpi.c\n+++ b/drivers/firmware/arm_scpi.c\n@@ -231,7 +231,8 @@ struct scpi_xfer {\n \n struct scpi_chan {\n \tstruct mbox_client cl;\n-\tstruct mbox_chan *chan;\n+\tstruct mbox_chan *rx_chan;\n+\tstruct mbox_chan *tx_chan;\n \tvoid __iomem *tx_payload;\n \tvoid __iomem *rx_payload;\n \tstruct list_head rx_pending;\n@@ -505,7 +506,7 @@ static int scpi_send_message(u8 idx, voi\n \tmsg->rx_len = rx_len;\n \treinit_completion(&msg->done);\n \n-\tret = mbox_send_message(scpi_chan->chan, msg);\n+\tret = mbox_send_message(scpi_chan->tx_chan, msg);\n \tif (ret < 0 || !rx_buf)\n \t\tgoto out;\n \n@@ -856,8 +857,13 @@ static void scpi_free_channels(void *dat\n \tstruct scpi_drvinfo *info = data;\n \tint i;\n \n-\tfor (i = 0; i < info->num_chans; i++)\n-\t\tmbox_free_channel(info->channels[i].chan);\n+\tfor (i = 0; i < info->num_chans; i++) {\n+\t\tstruct scpi_chan *pchan = &info->channels[i];\n+\n+\t\tif (pchan->tx_chan != pchan->rx_chan)\n+\t\t\tmbox_free_channel(pchan->tx_chan);\n+\t\tmbox_free_channel(pchan->rx_chan);\n+\t}\n }\n \n static int scpi_remove(struct platform_device *pdev)\n@@ -913,6 +919,7 @@ static int scpi_probe(struct platform_de\n \tstruct device *dev = &pdev->dev;\n \tstruct device_node *np = dev->of_node;\n \tstruct scpi_drvinfo *scpi_drvinfo;\n+\tbool use_mbox_names = false;\n \n \tscpi_drvinfo = devm_kzalloc(dev, sizeof(*scpi_drvinfo), GFP_KERNEL);\n \tif (!scpi_drvinfo)\n@@ -926,6 +933,14 @@ static int scpi_probe(struct platform_de\n \t\tdev_err(dev, \"no mboxes property in '%pOF'\\n\", np);\n \t\treturn -ENODEV;\n \t}\n+\tif (of_get_property(dev->of_node, \"mbox-names\", NULL)) {\n+\t\tuse_mbox_names = true;\n+\t\tif (count != 2) {\n+\t\t\tdev_err(dev, \"need exactly 2 mboxes with mbox-names\\n\");\n+\t\t\treturn -ENODEV;\n+\t\t}\n+\t\tcount /= 2;\n+\t}\n \n \tscpi_info->channels = devm_kcalloc(dev, count, sizeof(struct scpi_chan),\n \t\t\t\t\t   GFP_KERNEL);\n@@ -974,15 +989,34 @@ static int scpi_probe(struct platform_de\n \t\tmutex_init(&pchan->xfers_lock);\n \n \t\tret = scpi_alloc_xfer_list(dev, pchan);\n-\t\tif (!ret) {\n-\t\t\tpchan->chan = mbox_request_channel(cl, idx);\n-\t\t\tif (!IS_ERR(pchan->chan))\n-\t\t\t\tcontinue;\n-\t\t\tret = PTR_ERR(pchan->chan);\n-\t\t\tif (ret != -EPROBE_DEFER)\n-\t\t\t\tdev_err(dev, \"failed to get channel%d err %d\\n\",\n-\t\t\t\t\tidx, ret);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\n+\t\tif (use_mbox_names) {\n+\t\t\tpchan->rx_chan = mbox_request_channel_byname(cl, \"rx\");\n+\t\t\tif (IS_ERR(pchan->rx_chan)) {\n+\t\t\t\tret = PTR_ERR(pchan->rx_chan);\n+\t\t\t\tgoto fail;\n+\t\t\t}\n+\t\t\tpchan->tx_chan = mbox_request_channel_byname(cl, \"tx\");\n+\t\t\tif (IS_ERR(pchan->rx_chan)) {\n+\t\t\t\tret = PTR_ERR(pchan->tx_chan);\n+\t\t\t\tgoto fail;\n+\t\t\t}\n+\t\t} else {\n+\t\t\tpchan->rx_chan = mbox_request_channel(cl, idx);\n+\t\t\tif (IS_ERR(pchan->rx_chan)) {\n+\t\t\t\tret = PTR_ERR(pchan->rx_chan);\n+\t\t\t\tgoto fail;\n+\t\t\t}\n+\t\t\tpchan->tx_chan = pchan->rx_chan;\n \t\t}\n+\t\tcontinue;\n+\n+fail:\n+\t\tif (ret != -EPROBE_DEFER)\n+\t\t\tdev_err(dev, \"failed to get channel%d err %d\\n\",\n+\t\t\t\tidx, ret);\n \t\treturn ret;\n \t}\n \n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0010-ARM-dts-sunxi-h3-h5-Add-SCPI-protocol.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Wed, 1 Jan 2020 16:12:36 -0600\nSubject: [PATCH] ARM: dts: sunxi: h3/h5: Add SCPI protocol\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n arch/arm/boot/dts/sun8i-h3.dtsi              | 13 +++++++++++++\n arch/arm/boot/dts/sunxi-h3-h5.dtsi           |  7 +++++++\n arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 13 +++++++++++++\n 3 files changed, 33 insertions(+)\n\n--- a/arch/arm/boot/dts/sun8i-h3.dtsi\n+++ b/arch/arm/boot/dts/sun8i-h3.dtsi\n@@ -170,6 +170,19 @@\n \t\t\t#size-cells = <1>;\n \t\t\tranges;\n \n+\t\t\tsram_a2: sram@40000 {\n+\t\t\t\tcompatible = \"mmio-sram\";\n+\t\t\t\treg = <0x00040000 0xc000>;\n+\t\t\t\t#address-cells = <1>;\n+\t\t\t\t#size-cells = <1>;\n+\t\t\t\tranges = <0 0x00040000 0xc000>;\n+\n+\t\t\t\tscpi_sram: scpi-sram@bc00 {\n+\t\t\t\t\tcompatible = \"arm,scp-shmem\";\n+\t\t\t\t\treg = <0xbc00 0x200>;\n+\t\t\t\t};\n+\t\t\t};\n+\n \t\t\tsram_c: sram@1d00000 {\n \t\t\t\tcompatible = \"mmio-sram\";\n \t\t\t\treg = <0x01d00000 0x80000>;\n--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi\n+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi\n@@ -105,6 +105,13 @@\n \t\tstatus = \"disabled\";\n \t};\n \n+\tscpi_protocol: scpi {\n+\t\tcompatible = \"arm,scpi\";\n+\t\tmboxes = <&msgbox 2>, <&msgbox 3>;\n+\t\tmbox-names = \"tx\", \"rx\";\n+\t\tshmem = <&scpi_sram>;\n+\t};\n+\n \tsoc {\n \t\tcompatible = \"simple-bus\";\n \t\t#address-cells = <1>;\n--- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi\n@@ -86,6 +86,19 @@\n \t\t\t#size-cells = <1>;\n \t\t\tranges;\n \n+\t\t\tsram_a2: sram@40000 {\n+\t\t\t\tcompatible = \"mmio-sram\";\n+\t\t\t\treg = <0x00040000 0x14000>;\n+\t\t\t\t#address-cells = <1>;\n+\t\t\t\t#size-cells = <1>;\n+\t\t\t\tranges = <0 0x00040000 0x14000>;\n+\n+\t\t\t\tscpi_sram: scpi-sram@13c00 {\n+\t\t\t\t\tcompatible = \"arm,scp-shmem\";\n+\t\t\t\t\treg = <0x13c00 0x200>;\n+\t\t\t\t};\n+\t\t\t};\n+\n \t\t\tsram_c1: sram@18000 {\n \t\t\t\tcompatible = \"mmio-sram\";\n \t\t\t\treg = <0x00018000 0x1c000>;\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0011-arm64-dts-allwinner-a64-Add-SCPI-protocol.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 14 Dec 2019 20:52:53 -0600\nSubject: [PATCH] arm64: dts: allwinner: a64: Add SCPI protocol\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 20 +++++++++++++++++++\n 1 file changed, 20 insertions(+)\n\n--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi\n@@ -130,6 +130,13 @@\n \t\tmethod = \"smc\";\n \t};\n \n+\tscpi_protocol: scpi {\n+\t\tcompatible = \"arm,scpi\";\n+\t\tmboxes = <&msgbox 2>, <&msgbox 3>;\n+\t\tmbox-names = \"tx\", \"rx\";\n+\t\tshmem = <&scpi_sram>;\n+\t};\n+\n \tsound: sound {\n \t\t#address-cells = <1>;\n \t\t#size-cells = <0>;\n@@ -344,6 +351,19 @@\n \t\t\t#size-cells = <1>;\n \t\t\tranges;\n \n+\t\t\tsram_a2: sram@40000 {\n+\t\t\t\tcompatible = \"mmio-sram\";\n+\t\t\t\treg = <0x00040000 0x14000>;\n+\t\t\t\t#address-cells = <1>;\n+\t\t\t\t#size-cells = <1>;\n+\t\t\t\tranges = <0 0x00040000 0x14000>;\n+\n+\t\t\t\tscpi_sram: scpi-sram@13c00 {\n+\t\t\t\t\tcompatible = \"arm,scp-shmem\";\n+\t\t\t\t\treg = <0x13c00 0x200>;\n+\t\t\t\t};\n+\t\t\t};\n+\n \t\t\tsram_c: sram@18000 {\n \t\t\t\tcompatible = \"mmio-sram\";\n \t\t\t\treg = <0x00018000 0x28000>;\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0012-arm64-dts-allwinner-h6-Add-SCPI-protocol.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 14 Dec 2019 20:54:40 -0600\nSubject: [PATCH] arm64: dts: allwinner: h6: Add SCPI protocol\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 20 ++++++++++++++++++++\n 1 file changed, 20 insertions(+)\n\n--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi\n@@ -88,6 +88,13 @@\n \t\tmethod = \"smc\";\n \t};\n \n+\tscpi_protocol: scpi {\n+\t\tcompatible = \"arm,scpi\";\n+\t\tmboxes = <&msgbox 2>, <&msgbox 3>;\n+\t\tmbox-names = \"tx\", \"rx\";\n+\t\tshmem = <&scpi_sram>;\n+\t};\n+\n \ttimer {\n \t\tcompatible = \"arm,armv8-timer\";\n \t\tarm,no-tick-in-suspend;\n@@ -196,6 +203,19 @@\n \t\t\t#size-cells = <1>;\n \t\t\tranges;\n \n+\t\t\tsram_a2: sram@100000 {\n+\t\t\t\tcompatible = \"mmio-sram\";\n+\t\t\t\treg = <0x00100000 0x18000>;\n+\t\t\t\t#address-cells = <1>;\n+\t\t\t\t#size-cells = <1>;\n+\t\t\t\tranges = <0 0x00100000 0x18000>;\n+\n+\t\t\t\tscpi_sram: scpi-sram@17c00 {\n+\t\t\t\t\tcompatible = \"arm,scp-shmem\";\n+\t\t\t\t\treg = <0x17c00 0x200>;\n+\t\t\t\t};\n+\t\t\t};\n+\n \t\t\tsram_c: sram@28000 {\n \t\t\t\tcompatible = \"mmio-sram\";\n \t\t\t\treg = <0x00028000 0x1e000>;\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0013-ASoC-hdmi-codec-fix-channel-allocation.patch",
    "content": "From 91b69779e0875e58d8973b2938a1cc4b7a1c455b Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sun, 25 Mar 2018 22:17:06 +0200\nSubject: [PATCH 22/44] ASoC: hdmi-codec: fix channel allocation\n\n---\n sound/soc/codecs/hdmi-codec.c | 113 ++++++++++++++++------------------\n 1 file changed, 52 insertions(+), 61 deletions(-)\n\n--- a/sound/soc/codecs/hdmi-codec.c\n+++ b/sound/soc/codecs/hdmi-codec.c\n@@ -194,78 +194,69 @@ static const struct snd_pcm_chmap_elem h\n  */\n static const struct hdmi_codec_cea_spk_alloc hdmi_codec_channel_alloc[] = {\n \t{ .ca_id = 0x00, .n_ch = 2,\n-\t  .mask = FL | FR},\n-\t/* 2.1 */\n-\t{ .ca_id = 0x01, .n_ch = 4,\n-\t  .mask = FL | FR | LFE},\n-\t/* Dolby Surround */\n+\t  .mask = FL | FR },\n+\t{ .ca_id = 0x03, .n_ch = 4,\n+\t  .mask = FL | FR | LFE | FC },\n \t{ .ca_id = 0x02, .n_ch = 4,\n \t  .mask = FL | FR | FC },\n-\t/* surround51 */\n+\t{ .ca_id = 0x01, .n_ch = 4,\n+\t  .mask = FL | FR | LFE },\n \t{ .ca_id = 0x0b, .n_ch = 6,\n-\t  .mask = FL | FR | LFE | FC | RL | RR},\n-\t/* surround40 */\n-\t{ .ca_id = 0x08, .n_ch = 6,\n-\t  .mask = FL | FR | RL | RR },\n-\t/* surround41 */\n-\t{ .ca_id = 0x09, .n_ch = 6,\n-\t  .mask = FL | FR | LFE | RL | RR },\n-\t/* surround50 */\n+\t  .mask = FL | FR | LFE | FC | RL | RR },\n \t{ .ca_id = 0x0a, .n_ch = 6,\n \t  .mask = FL | FR | FC | RL | RR },\n-\t/* 6.1 */\n-\t{ .ca_id = 0x0f, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FC | RL | RR | RC },\n-\t/* surround71 */\n+\t{ .ca_id = 0x09, .n_ch = 6,\n+\t  .mask = FL | FR | LFE | RL | RR },\n+\t{ .ca_id = 0x08, .n_ch = 6,\n+\t  .mask = FL | FR | RL | RR },\n+\t{ .ca_id = 0x07, .n_ch = 6,\n+\t  .mask = FL | FR | LFE | FC | RC },\n+\t{ .ca_id = 0x06, .n_ch = 6,\n+\t  .mask = FL | FR | FC | RC },\n+\t{ .ca_id = 0x05, .n_ch = 6,\n+\t  .mask = FL | FR | LFE | RC },\n+\t{ .ca_id = 0x04, .n_ch = 6,\n+\t  .mask = FL | FR | RC },\n \t{ .ca_id = 0x13, .n_ch = 8,\n \t  .mask = FL | FR | LFE | FC | RL | RR | RLC | RRC },\n-\t/* others */\n-\t{ .ca_id = 0x03, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FC },\n-\t{ .ca_id = 0x04, .n_ch = 8,\n-\t  .mask = FL | FR | RC},\n-\t{ .ca_id = 0x05, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RC },\n-\t{ .ca_id = 0x06, .n_ch = 8,\n-\t  .mask = FL | FR | FC | RC },\n-\t{ .ca_id = 0x07, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FC | RC },\n-\t{ .ca_id = 0x0c, .n_ch = 8,\n-\t  .mask = FL | FR | RC | RL | RR },\n-\t{ .ca_id = 0x0d, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RL | RR | RC },\n-\t{ .ca_id = 0x0e, .n_ch = 8,\n-\t  .mask = FL | FR | FC | RL | RR | RC },\n-\t{ .ca_id = 0x10, .n_ch = 8,\n-\t  .mask = FL | FR | RL | RR | RLC | RRC },\n-\t{ .ca_id = 0x11, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RL | RR | RLC | RRC },\n+\t{ .ca_id = 0x1f, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | FC | RL | RR | FLC | FRC },\n \t{ .ca_id = 0x12, .n_ch = 8,\n \t  .mask = FL | FR | FC | RL | RR | RLC | RRC },\n-\t{ .ca_id = 0x14, .n_ch = 8,\n-\t  .mask = FL | FR | FLC | FRC },\n-\t{ .ca_id = 0x15, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FLC | FRC },\n-\t{ .ca_id = 0x16, .n_ch = 8,\n-\t  .mask = FL | FR | FC | FLC | FRC },\n-\t{ .ca_id = 0x17, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FC | FLC | FRC },\n-\t{ .ca_id = 0x18, .n_ch = 8,\n-\t  .mask = FL | FR | RC | FLC | FRC },\n-\t{ .ca_id = 0x19, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RC | FLC | FRC },\n-\t{ .ca_id = 0x1a, .n_ch = 8,\n-\t  .mask = FL | FR | RC | FC | FLC | FRC },\n-\t{ .ca_id = 0x1b, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RC | FC | FLC | FRC },\n-\t{ .ca_id = 0x1c, .n_ch = 8,\n-\t  .mask = FL | FR | RL | RR | FLC | FRC },\n-\t{ .ca_id = 0x1d, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RL | RR | FLC | FRC },\n \t{ .ca_id = 0x1e, .n_ch = 8,\n \t  .mask = FL | FR | FC | RL | RR | FLC | FRC },\n-\t{ .ca_id = 0x1f, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FC | RL | RR | FLC | FRC },\n+\t{ .ca_id = 0x11, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RL | RR | RLC | RRC },\n+\t{ .ca_id = 0x1d, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RL | RR | FLC | FRC },\n+\t{ .ca_id = 0x10, .n_ch = 8,\n+\t  .mask = FL | FR | RL | RR | RLC | RRC },\n+\t{ .ca_id = 0x1c, .n_ch = 8,\n+\t  .mask = FL | FR | RL | RR | FLC | FRC },\n+\t{ .ca_id = 0x0f, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | FC | RL | RR | RC },\n+\t{ .ca_id = 0x1b, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RC | FC | FLC | FRC },\n+\t{ .ca_id = 0x0e, .n_ch = 8,\n+\t  .mask = FL | FR | FC | RL | RR | RC },\n+\t{ .ca_id = 0x1a, .n_ch = 8,\n+\t  .mask = FL | FR | RC | FC | FLC | FRC },\n+\t{ .ca_id = 0x0d, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RL | RR | RC },\n+\t{ .ca_id = 0x19, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RC | FLC | FRC },\n+\t{ .ca_id = 0x0c, .n_ch = 8,\n+\t  .mask = FL | FR | RC | RL | RR },\n+\t{ .ca_id = 0x18, .n_ch = 8,\n+\t  .mask = FL | FR | RC | FLC | FRC },\n+\t{ .ca_id = 0x17, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | FC | FLC | FRC },\n+\t{ .ca_id = 0x16, .n_ch = 8,\n+\t  .mask = FL | FR | FC | FLC | FRC },\n+\t{ .ca_id = 0x15, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | FLC | FRC },\n+\t{ .ca_id = 0x14, .n_ch = 8,\n+\t  .mask = FL | FR | FLC | FRC },\n };\n \n struct hdmi_codec_priv {\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0014-drm_call_drm_atomic_helper_shutdown_at_shutdown.patch",
    "content": "Subject: [PATCH] drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers\nFrom: Douglas Anderson <dianders@chromium.org>\nDate: Fri, 01 Sep 2023 16:39:53 -0700\nMIME-Version: 1.0\nContent-Type: text/plain; charset=\"utf-8\"\nContent-Transfer-Encoding: 7bit\n\nBased on grepping through the source code these drivers appear to be\nmissing a call to drm_atomic_helper_shutdown() at system shutdown\ntime. Among other things, this means that if a panel is in use that it\nwon't be cleanly powered off at system shutdown time.\n\nThe fact that we should call drm_atomic_helper_shutdown() in the case\nof OS shutdown/restart comes straight out of the kernel doc \"driver\ninstance overview\" in drm_drv.c.\n\nAll of the drivers in this patch were fairly straightforward to fix\nsince they already had a call to drm_atomic_helper_shutdown() at\nremove/unbind time but were just lacking one at system shutdown. The\nonly hitch is that some of these drivers use the component model to\nregister/unregister their DRM devices. The shutdown callback is part\nof the original device. The typical solution here, based on how other\nDRM drivers do this, is to keep track of whether the device is bound\nbased on drvdata. In most cases the drvdata is the drm_device, so we\ncan just make sure it is NULL when the device is not bound. In some\ndrivers, this required minor code changes. To make things simpler,\ndrm_atomic_helper_shutdown() has been modified to consider a NULL\ndrm_device as a noop in the patch (\"drm/atomic-helper:\ndrm_atomic_helper_shutdown(NULL) should be a noop\").\n\nSuggested-by: Maxime Ripard <mripard@kernel.org>\nSigned-off-by: Douglas Anderson <dianders@chromium.org>\nAcked-by: Maxime Ripard <mripard@kernel.org>\nLink: https://lore.kernel.org/r/20230901163944.RFT.2.I9115e5d094a43e687978b0699cc1fe9f2a3452ea@changeid\n---\n<snip>\ndiff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c\nindex 6a8dfc022d3c..35d7a7ffd208 100644\n--- a/drivers/gpu/drm/sun4i/sun4i_drv.c\n+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c\n@@ -413,6 +413,11 @@ static void sun4i_drv_remove(struct platform_device *pdev)\n \tcomponent_master_del(&pdev->dev, &sun4i_drv_master_ops);\n }\n \n+static void sun4i_drv_shutdown(struct platform_device *pdev)\n+{\n+\tdrm_atomic_helper_shutdown(platform_get_drvdata(pdev));\n+}\n+\n static const struct of_device_id sun4i_drv_of_table[] = {\n \t{ .compatible = \"allwinner,sun4i-a10-display-engine\" },\n \t{ .compatible = \"allwinner,sun5i-a10s-display-engine\" },\n@@ -437,6 +442,7 @@ MODULE_DEVICE_TABLE(of, sun4i_drv_of_table);\n static struct platform_driver sun4i_drv_platform_driver = {\n \t.probe\t\t= sun4i_drv_probe,\n \t.remove\t\t= sun4i_drv_remove,\n+\t.shutdown\t= sun4i_drv_shutdown,\n \t.driver\t\t= {\n \t\t.name\t\t= \"sun4i-drm\",\n \t\t.of_match_table\t= sun4i_drv_of_table,\n<snip>\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0020-media-cedrus-Add-callback-for-buffer-cleanup.patch",
    "content": "From b6d288bb8823e11114297d1e406ccd977106aaf9 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Sat, 9 Nov 2019 13:06:15 +0100\nSubject: [PATCH 28/44] media: cedrus: Add callback for buffer cleanup\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n drivers/staging/media/sunxi/cedrus/cedrus.h       |  1 +\n drivers/staging/media/sunxi/cedrus/cedrus_video.c | 13 +++++++++++++\n 2 files changed, 14 insertions(+)\n\n--- a/drivers/staging/media/sunxi/cedrus/cedrus.h\n+++ b/drivers/staging/media/sunxi/cedrus/cedrus.h\n@@ -166,6 +166,7 @@ struct cedrus_dec_ops {\n \tint (*start)(struct cedrus_ctx *ctx);\n \tvoid (*stop)(struct cedrus_ctx *ctx);\n \tvoid (*trigger)(struct cedrus_ctx *ctx);\n+\tvoid (*buf_cleanup)(struct cedrus_ctx *ctx, struct cedrus_buffer *buf);\n };\n \n struct cedrus_variant {\n--- a/drivers/staging/media/sunxi/cedrus/cedrus_video.c\n+++ b/drivers/staging/media/sunxi/cedrus/cedrus_video.c\n@@ -469,6 +469,18 @@ static int cedrus_buf_prepare(struct vb2\n \treturn 0;\n }\n \n+static void cedrus_buf_cleanup(struct vb2_buffer *vb)\n+{\n+\tstruct vb2_queue *vq = vb->vb2_queue;\n+\tstruct cedrus_ctx *ctx = vb2_get_drv_priv(vq);\n+\tstruct cedrus_dev *dev = ctx->dev;\n+\tstruct cedrus_dec_ops *ops = dev->dec_ops[ctx->current_codec];\n+\n+\tif (!V4L2_TYPE_IS_OUTPUT(vq->type) && ops->buf_cleanup)\n+\t\tops->buf_cleanup(ctx,\n+\t\t\t\t vb2_to_cedrus_buffer(vq->bufs[vb->index]));\n+}\n+\n static int cedrus_start_streaming(struct vb2_queue *vq, unsigned int count)\n {\n \tstruct cedrus_ctx *ctx = vb2_get_drv_priv(vq);\n@@ -551,6 +563,7 @@ static void cedrus_buf_request_complete(\n static struct vb2_ops cedrus_qops = {\n \t.queue_setup\t\t= cedrus_queue_setup,\n \t.buf_prepare\t\t= cedrus_buf_prepare,\n+\t.buf_cleanup\t\t= cedrus_buf_cleanup,\n \t.buf_queue\t\t= cedrus_buf_queue,\n \t.buf_out_validate\t= cedrus_buf_out_validate,\n \t.buf_request_complete\t= cedrus_buf_request_complete,\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0021-media-cedrus-hevc-Improve-buffer-management.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Sat, 9 Nov 2019 13:22:05 +0100\nSubject: [PATCH] media: cedrus: hevc: Improve buffer management\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n drivers/staging/media/sunxi/cedrus/cedrus.h   |   9 +-\n .../staging/media/sunxi/cedrus/cedrus_h265.c  | 119 ++++++++++--------\n 2 files changed, 69 insertions(+), 59 deletions(-)\n\ndiff --git a/drivers/staging/media/sunxi/cedrus/cedrus.h b/drivers/staging/media/sunxi/cedrus/cedrus.h\nindex ab7653c8915e..54a860ec738d 100644\n--- a/drivers/staging/media/sunxi/cedrus/cedrus.h\n+++ b/drivers/staging/media/sunxi/cedrus/cedrus.h\n@@ -106,6 +106,11 @@ struct cedrus_buffer {\n \t\t\tunsigned int\t\t\tposition;\n \t\t\tenum cedrus_h264_pic_type\tpic_type;\n \t\t} h264;\n+\t\tstruct {\n+\t\t\tvoid\t\t*mv_col_buf;\n+\t\t\tdma_addr_t\tmv_col_buf_dma;\n+\t\t\tssize_t\t\tmv_col_buf_size;\n+\t\t} h265;\n \t} codec;\n };\n \n@@ -139,10 +144,6 @@ struct cedrus_ctx {\n \t\t\tssize_t\t\tintra_pred_buf_size;\n \t\t} h264;\n \t\tstruct {\n-\t\t\tvoid\t\t*mv_col_buf;\n-\t\t\tdma_addr_t\tmv_col_buf_addr;\n-\t\t\tssize_t\t\tmv_col_buf_size;\n-\t\t\tssize_t\t\tmv_col_buf_unit_size;\n \t\t\tvoid\t\t*neighbor_info_buf;\n \t\t\tdma_addr_t\tneighbor_info_buf_addr;\n \t\t\tvoid\t\t*entry_points_buf;\ndiff --git a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c b/drivers/staging/media/sunxi/cedrus/cedrus_h265.c\nindex 4b01d3881214..4d425196d415 100644\n--- a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c\n+++ b/drivers/staging/media/sunxi/cedrus/cedrus_h265.c\n@@ -91,26 +91,65 @@ static void cedrus_h265_sram_write_data(struct cedrus_dev *dev, void *data,\n \n static inline dma_addr_t\n cedrus_h265_frame_info_mv_col_buf_addr(struct cedrus_ctx *ctx,\n-\t\t\t\t       unsigned int index, unsigned int field)\n+\t\t\t\t       unsigned int index,\n+\t\t\t\t       const struct v4l2_ctrl_hevc_sps *sps)\n {\n-\treturn ctx->codec.h265.mv_col_buf_addr + index *\n-\t       ctx->codec.h265.mv_col_buf_unit_size +\n-\t       field * ctx->codec.h265.mv_col_buf_unit_size / 2;\n+\tstruct cedrus_buffer *cedrus_buf = NULL;\n+\tstruct vb2_buffer *buf = NULL;\n+\tstruct vb2_queue *vq;\n+\n+\tvq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE);\n+\tif (vq)\n+\t\tbuf = vb2_get_buffer(vq, index);\n+\n+\tif (buf)\n+\t\tcedrus_buf = vb2_to_cedrus_buffer(buf);\n+\n+\tif (!cedrus_buf)\n+\t\treturn 0;\n+\n+\tif (!cedrus_buf->codec.h265.mv_col_buf_size) {\n+\t\tunsigned int log2_max_luma_coding_block_size;\n+\t\tunsigned int ctb_size_luma;\n+\n+\t\tlog2_max_luma_coding_block_size =\n+\t\t\tsps->log2_min_luma_coding_block_size_minus3 + 3 +\n+\t\t\tsps->log2_diff_max_min_luma_coding_block_size;\n+\t\tctb_size_luma = 1 << log2_max_luma_coding_block_size;\n+\n+\t\tcedrus_buf->codec.h265.mv_col_buf_size =\n+\t\t\tDIV_ROUND_UP(sps->pic_width_in_luma_samples, ctb_size_luma) *\n+\t\t\tDIV_ROUND_UP(sps->pic_height_in_luma_samples, ctb_size_luma) *\n+\t\t\tCEDRUS_H265_MV_COL_BUF_UNIT_CTB_SIZE + SZ_1K;\n+\n+\t\tcedrus_buf->codec.h265.mv_col_buf =\n+\t\t\tdma_alloc_attrs(ctx->dev->dev,\n+\t\t\t\t\tcedrus_buf->codec.h265.mv_col_buf_size,\n+\t\t\t\t\t&cedrus_buf->codec.h265.mv_col_buf_dma,\n+\t\t\t\t\tGFP_KERNEL, DMA_ATTR_NO_KERNEL_MAPPING);\n+\n+\t\tif (!cedrus_buf->codec.h265.mv_col_buf) {\n+\t\t\tcedrus_buf->codec.h265.mv_col_buf_size = 0;\n+\t\t\tcedrus_buf->codec.h265.mv_col_buf_dma = 0;\n+\t\t}\n+\t}\n+\n+\treturn cedrus_buf->codec.h265.mv_col_buf_dma;\n }\n \n static void cedrus_h265_frame_info_write_single(struct cedrus_ctx *ctx,\n \t\t\t\t\t\tunsigned int index,\n \t\t\t\t\t\tbool field_pic,\n \t\t\t\t\t\tu32 pic_order_cnt[],\n-\t\t\t\t\t\tstruct vb2_buffer *buf)\n+\t\t\t\t\t\tstruct vb2_buffer *buf,\n+\t\t\t\t\t\tconst struct v4l2_ctrl_hevc_sps *sps)\n {\n \tstruct cedrus_dev *dev = ctx->dev;\n \tdma_addr_t dst_luma_addr = cedrus_dst_buf_addr(ctx, buf, 0);\n \tdma_addr_t dst_chroma_addr = cedrus_dst_buf_addr(ctx, buf, 1);\n \tdma_addr_t mv_col_buf_addr[2] = {\n-\t\tcedrus_h265_frame_info_mv_col_buf_addr(ctx, buf->index, 0),\n-\t\tcedrus_h265_frame_info_mv_col_buf_addr(ctx, buf->index,\n-\t\t\t\t\t\t       field_pic ? 1 : 0)\n+\t\tcedrus_h265_frame_info_mv_col_buf_addr(ctx, buf->index, sps),\n+\t\tcedrus_h265_frame_info_mv_col_buf_addr(ctx, buf->index, sps)\n \t};\n \tu32 offset = VE_DEC_H265_SRAM_OFFSET_FRAME_INFO +\n \t\t     VE_DEC_H265_SRAM_OFFSET_FRAME_INFO_UNIT * index;\n@@ -134,7 +173,8 @@ static void cedrus_h265_frame_info_write_single(struct cedrus_ctx *ctx,\n \n static void cedrus_h265_frame_info_write_dpb(struct cedrus_ctx *ctx,\n \t\t\t\t\t     const struct v4l2_hevc_dpb_entry *dpb,\n-\t\t\t\t\t     u8 num_active_dpb_entries)\n+\t\t\t\t\t     u8 num_active_dpb_entries,\n+\t\t\t\t\t     const struct v4l2_ctrl_hevc_sps *sps)\n {\n \tstruct vb2_queue *vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx,\n \t\t\t\t\t       V4L2_BUF_TYPE_VIDEO_CAPTURE);\n@@ -149,7 +189,7 @@ static void cedrus_h265_frame_info_write_dpb(struct cedrus_ctx *ctx,\n \n \t\tcedrus_h265_frame_info_write_single(ctx, i, dpb[i].field_pic,\n \t\t\t\t\t\t    pic_order_cnt,\n-\t\t\t\t\t\t    buf);\n+\t\t\t\t\t\t    buf, sps);\n \t}\n }\n \n@@ -388,36 +428,6 @@ static void cedrus_h265_setup(struct cedrus_ctx *ctx,\n \twidth_in_ctb_luma =\n \t\tDIV_ROUND_UP(sps->pic_width_in_luma_samples, ctb_size_luma);\n \n-\t/* MV column buffer size and allocation. */\n-\tif (!ctx->codec.h265.mv_col_buf_size) {\n-\t\tunsigned int num_buffers =\n-\t\t\trun->dst->vb2_buf.vb2_queue->num_buffers;\n-\n-\t\t/*\n-\t\t * Each CTB requires a MV col buffer with a specific unit size.\n-\t\t * Since the address is given with missing lsb bits, 1 KiB is\n-\t\t * added to each buffer to ensure proper alignment.\n-\t\t */\n-\t\tctx->codec.h265.mv_col_buf_unit_size =\n-\t\t\tDIV_ROUND_UP(ctx->src_fmt.width, ctb_size_luma) *\n-\t\t\tDIV_ROUND_UP(ctx->src_fmt.height, ctb_size_luma) *\n-\t\t\tCEDRUS_H265_MV_COL_BUF_UNIT_CTB_SIZE + SZ_1K;\n-\n-\t\tctx->codec.h265.mv_col_buf_size = num_buffers *\n-\t\t\tctx->codec.h265.mv_col_buf_unit_size;\n-\n-\t\t/* Buffer is never accessed by CPU, so we can skip kernel mapping. */\n-\t\tctx->codec.h265.mv_col_buf =\n-\t\t\tdma_alloc_attrs(dev->dev,\n-\t\t\t\t\tctx->codec.h265.mv_col_buf_size,\n-\t\t\t\t\t&ctx->codec.h265.mv_col_buf_addr,\n-\t\t\t\t\tGFP_KERNEL, DMA_ATTR_NO_KERNEL_MAPPING);\n-\t\tif (!ctx->codec.h265.mv_col_buf) {\n-\t\t\tctx->codec.h265.mv_col_buf_size = 0;\n-\t\t\treturn -ENOMEM;\n-\t\t}\n-\t}\n-\n \t/* Activate H265 engine. */\n \tcedrus_engine_enable(ctx, CEDRUS_CODEC_H265);\n \n@@ -672,7 +681,7 @@ static void cedrus_h265_setup(struct cedrus_ctx *ctx,\n \n \t/* Write decoded picture buffer in pic list. */\n \tcedrus_h265_frame_info_write_dpb(ctx, decode_params->dpb,\n-\t\t\t\t\t decode_params->num_active_dpb_entries);\n+\t\t\t\t\t decode_params->num_active_dpb_entries, sps);\n \n \t/* Output frame. */\n \n@@ -683,7 +692,7 @@ static void cedrus_h265_setup(struct cedrus_ctx *ctx,\n \tcedrus_h265_frame_info_write_single(ctx, output_pic_list_index,\n \t\t\t\t\t    slice_params->pic_struct != 0,\n \t\t\t\t\t    pic_order_cnt,\n-\t\t\t\t\t    &run->dst->vb2_buf);\n+\t\t\t\t\t    &run->dst->vb2_buf, sps);\n \n \tcedrus_write(dev, VE_DEC_H265_OUTPUT_FRAME_IDX, output_pic_list_index);\n \n@@ -732,9 +741,6 @@ static int cedrus_h265_start(struct cedrus_ctx *ctx)\n {\n \tstruct cedrus_dev *dev = ctx->dev;\n \n-\t/* The buffer size is calculated at setup time. */\n-\tctx->codec.h265.mv_col_buf_size = 0;\n-\n \t/* Buffer is never accessed by CPU, so we can skip kernel mapping. */\n \tctx->codec.h265.neighbor_info_buf =\n \t\tdma_alloc_attrs(dev->dev, CEDRUS_H265_NEIGHBOR_INFO_BUF_SIZE,\n@@ -761,15 +767,6 @@ static void cedrus_h265_stop(struct cedrus_ctx *ctx)\n {\n \tstruct cedrus_dev *dev = ctx->dev;\n \n-\tif (ctx->codec.h265.mv_col_buf_size > 0) {\n-\t\tdma_free_attrs(dev->dev, ctx->codec.h265.mv_col_buf_size,\n-\t\t\t       ctx->codec.h265.mv_col_buf,\n-\t\t\t       ctx->codec.h265.mv_col_buf_addr,\n-\t\t\t       DMA_ATTR_NO_KERNEL_MAPPING);\n-\n-\t\tctx->codec.h265.mv_col_buf_size = 0;\n-\t}\n-\n \tdma_free_attrs(dev->dev, CEDRUS_H265_NEIGHBOR_INFO_BUF_SIZE,\n \t\t       ctx->codec.h265.neighbor_info_buf,\n \t\t       ctx->codec.h265.neighbor_info_buf_addr,\n@@ -786,6 +783,17 @@ static void cedrus_h265_trigger(struct cedrus_ctx *ctx)\n \tcedrus_write(dev, VE_DEC_H265_TRIGGER, VE_DEC_H265_TRIGGER_DEC_SLICE);\n }\n \n+static void cedrus_h265_buf_cleanup(struct cedrus_ctx *ctx,\n+\t\t\t\t    struct cedrus_buffer *buf)\n+{\n+\tif (buf->codec.h265.mv_col_buf_size)\n+\t\tdma_free_attrs(ctx->dev->dev,\n+\t\t\t       buf->codec.h265.mv_col_buf_size,\n+\t\t\t       buf->codec.h265.mv_col_buf,\n+\t\t\t       buf->codec.h265.mv_col_buf_dma,\n+\t\t\t       DMA_ATTR_NO_KERNEL_MAPPING);\n+}\n+\n struct cedrus_dec_ops cedrus_dec_ops_h265 = {\n \t.irq_clear\t= cedrus_h265_irq_clear,\n \t.irq_disable\t= cedrus_h265_irq_disable,\n@@ -794,4 +802,5 @@ struct cedrus_dec_ops cedrus_dec_ops_h265 = {\n \t.start\t\t= cedrus_h265_start,\n \t.stop\t\t= cedrus_h265_stop,\n \t.trigger\t= cedrus_h265_trigger,\n+\t.buf_cleanup\t= cedrus_h265_buf_cleanup,\n };\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0022-media-cedrus-h264-Improve-buffer-management.patch",
    "content": "From a881ce25cba8e45c6a86b5a680981c3b14b5b1e1 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Sat, 9 Nov 2019 14:12:42 +0100\nSubject: [PATCH 30/44] media: cedrus: h264: Improve buffer management\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n drivers/staging/media/sunxi/cedrus/cedrus.h   |  3 +\n .../staging/media/sunxi/cedrus/cedrus_h264.c  | 93 ++++++++-----------\n 2 files changed, 44 insertions(+), 52 deletions(-)\n\n--- a/drivers/staging/media/sunxi/cedrus/cedrus.h\n+++ b/drivers/staging/media/sunxi/cedrus/cedrus.h\n@@ -104,6 +104,9 @@ struct cedrus_buffer {\n \t\tstruct {\n \t\t\tunsigned int\t\t\tposition;\n \t\t\tenum cedrus_h264_pic_type\tpic_type;\n+\t\t\tvoid\t\t*mv_col_buf;\n+\t\t\tdma_addr_t\tmv_col_buf_dma;\n+\t\t\tssize_t\t\tmv_col_buf_size;\n \t\t} h264;\n \t\tstruct {\n \t\t\tvoid\t\t*mv_col_buf;\n--- a/drivers/staging/media/sunxi/cedrus/cedrus_h264.c\n+++ b/drivers/staging/media/sunxi/cedrus/cedrus_h264.c\n@@ -55,16 +55,14 @@ static void cedrus_h264_write_sram(struc\n }\n \n static dma_addr_t cedrus_h264_mv_col_buf_addr(struct cedrus_ctx *ctx,\n-\t\t\t\t\t      unsigned int position,\n+\t\t\t\t\t      struct cedrus_buffer *buf,\n \t\t\t\t\t      unsigned int field)\n {\n-\tdma_addr_t addr = ctx->codec.h264.mv_col_buf_dma;\n+\tdma_addr_t addr = buf->codec.h264.mv_col_buf_dma;\n \n-\t/* Adjust for the position */\n-\taddr += position * ctx->codec.h264.mv_col_buf_field_size * 2;\n-\n-\t/* Adjust for the field */\n-\taddr += field * ctx->codec.h264.mv_col_buf_field_size;\n+ \t/* Adjust for the field */\n+\tif (field)\n+\t\taddr += buf->codec.h264.mv_col_buf_size / 2;\n \n \treturn addr;\n }\n@@ -76,7 +74,6 @@ static void cedrus_fill_ref_pic(struct c\n \t\t\t\tstruct cedrus_h264_sram_ref_pic *pic)\n {\n \tstruct vb2_buffer *vbuf = &buf->m2m_buf.vb.vb2_buf;\n-\tunsigned int position = buf->codec.h264.position;\n \n \tpic->top_field_order_cnt = cpu_to_le32(top_field_order_cnt);\n \tpic->bottom_field_order_cnt = cpu_to_le32(bottom_field_order_cnt);\n@@ -85,9 +82,9 @@ static void cedrus_fill_ref_pic(struct c\n \tpic->luma_ptr = cpu_to_le32(cedrus_buf_addr(vbuf, &ctx->dst_fmt, 0));\n \tpic->chroma_ptr = cpu_to_le32(cedrus_buf_addr(vbuf, &ctx->dst_fmt, 1));\n \tpic->mv_col_top_ptr =\n-\t\tcpu_to_le32(cedrus_h264_mv_col_buf_addr(ctx, position, 0));\n+\t\tcpu_to_le32(cedrus_h264_mv_col_buf_addr(ctx, buf, 0));\n \tpic->mv_col_bot_ptr =\n-\t\tcpu_to_le32(cedrus_h264_mv_col_buf_addr(ctx, position, 1));\n+\t\tcpu_to_le32(cedrus_h264_mv_col_buf_addr(ctx, buf, 1));\n }\n \n static void cedrus_write_frame_list(struct cedrus_ctx *ctx,\n@@ -146,6 +143,28 @@ static void cedrus_write_frame_list(stru\n \toutput_buf = vb2_to_cedrus_buffer(&run->dst->vb2_buf);\n \toutput_buf->codec.h264.position = position;\n \n+\tif (!output_buf->codec.h264.mv_col_buf_size) {\n+\t\tconst struct v4l2_ctrl_h264_sps *sps = run->h264.sps;\n+\t\tunsigned int field_size;\n+\n+\t\tfield_size = DIV_ROUND_UP(ctx->src_fmt.width, 16) *\n+\t\t\tDIV_ROUND_UP(ctx->src_fmt.height, 16) * 16;\n+\t\tif (!(sps->flags & V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE))\n+\t\t\tfield_size = field_size * 2;\n+\t\tif (!(sps->flags & V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY))\n+\t\t\tfield_size = field_size * 2;\n+\n+\t\toutput_buf->codec.h264.mv_col_buf_size = field_size * 2;\n+\t\toutput_buf->codec.h264.mv_col_buf =\n+\t\t\tdma_alloc_attrs(dev->dev,\n+\t\t\t\t\toutput_buf->codec.h264.mv_col_buf_size,\n+\t\t\t\t\t&output_buf->codec.h264.mv_col_buf_dma,\n+\t\t\t\t\tGFP_KERNEL, DMA_ATTR_NO_KERNEL_MAPPING);\n+\n+\t\tif (!output_buf->codec.h264.mv_col_buf)\n+\t\t\toutput_buf->codec.h264.mv_col_buf_size = 0;\n+\t}\n+\n \tif (decode->flags & V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC)\n \t\toutput_buf->codec.h264.pic_type = CEDRUS_H264_PIC_TYPE_FIELD;\n \telse if (sps->flags & V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD)\n@@ -516,8 +535,6 @@ static int cedrus_h264_start(struct cedr\n {\n \tstruct cedrus_dev *dev = ctx->dev;\n \tunsigned int pic_info_size;\n-\tunsigned int field_size;\n-\tunsigned int mv_col_size;\n \tint ret;\n \n \t/* Formula for picture buffer size is taken from CedarX source. */\n@@ -560,38 +577,6 @@ static int cedrus_h264_start(struct cedr\n \t\tgoto err_pic_buf;\n \t}\n \n-\tfield_size = DIV_ROUND_UP(ctx->src_fmt.width, 16) *\n-\t\tDIV_ROUND_UP(ctx->src_fmt.height, 16) * 16;\n-\n-\t/*\n-\t * FIXME: This is actually conditional to\n-\t * V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE not being set, we\n-\t * might have to rework this if memory efficiency ever is\n-\t * something we need to work on.\n-\t */\n-\tfield_size = field_size * 2;\n-\n-\t/*\n-\t * FIXME: This is actually conditional to\n-\t * V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY not being set, we might\n-\t * have to rework this if memory efficiency ever is something\n-\t * we need to work on.\n-\t */\n-\tfield_size = field_size * 2;\n-\tctx->codec.h264.mv_col_buf_field_size = field_size;\n-\n-\tmv_col_size = field_size * 2 * CEDRUS_H264_FRAME_NUM;\n-\tctx->codec.h264.mv_col_buf_size = mv_col_size;\n-\tctx->codec.h264.mv_col_buf =\n-\t\tdma_alloc_attrs(dev->dev,\n-\t\t\t\tctx->codec.h264.mv_col_buf_size,\n-\t\t\t\t&ctx->codec.h264.mv_col_buf_dma,\n-\t\t\t\tGFP_KERNEL, DMA_ATTR_NO_KERNEL_MAPPING);\n-\tif (!ctx->codec.h264.mv_col_buf) {\n-\t\tret = -ENOMEM;\n-\t\tgoto err_neighbor_buf;\n-\t}\n-\n \tif (ctx->src_fmt.width > 2048) {\n \t\t/*\n \t\t * Formulas for deblock and intra prediction buffer sizes\n@@ -606,7 +592,7 @@ static int cedrus_h264_start(struct cedr\n \t\t\t\t\t   GFP_KERNEL);\n \t\tif (!ctx->codec.h264.deblk_buf) {\n \t\t\tret = -ENOMEM;\n-\t\t\tgoto err_mv_col_buf;\n+\t\t\tgoto err_neighbor_buf;\n \t\t}\n \n \t\t/*\n@@ -633,12 +619,6 @@ err_deblk_buf:\n \t\t\t  ctx->codec.h264.deblk_buf,\n \t\t\t  ctx->codec.h264.deblk_buf_dma);\n \n-err_mv_col_buf:\n-\tdma_free_attrs(dev->dev, ctx->codec.h264.mv_col_buf_size,\n-\t\t       ctx->codec.h264.mv_col_buf,\n-\t\t       ctx->codec.h264.mv_col_buf_dma,\n-\t\t       DMA_ATTR_NO_KERNEL_MAPPING);\n-\n err_neighbor_buf:\n \tdma_free_attrs(dev->dev, CEDRUS_NEIGHBOR_INFO_BUF_SIZE,\n \t\t       ctx->codec.h264.neighbor_info_buf,\n@@ -654,10 +635,6 @@ static void cedrus_h264_stop(struct cedr\n {\n \tstruct cedrus_dev *dev = ctx->dev;\n \n-\tdma_free_attrs(dev->dev, ctx->codec.h264.mv_col_buf_size,\n-\t\t       ctx->codec.h264.mv_col_buf,\n-\t\t       ctx->codec.h264.mv_col_buf_dma,\n-\t\t       DMA_ATTR_NO_KERNEL_MAPPING);\n \tdma_free_attrs(dev->dev, CEDRUS_NEIGHBOR_INFO_BUF_SIZE,\n \t\t       ctx->codec.h264.neighbor_info_buf,\n \t\t       ctx->codec.h264.neighbor_info_buf_dma,\n@@ -681,6 +659,17 @@ static void cedrus_h264_trigger(struct c\n \t\t     VE_H264_TRIGGER_TYPE_AVC_SLICE_DECODE);\n }\n \n+static void cedrus_h264_buf_cleanup(struct cedrus_ctx *ctx,\n+\t\t\t\t    struct cedrus_buffer *buf)\n+{\n+\tif (buf->codec.h264.mv_col_buf_size)\n+\t\tdma_free_attrs(ctx->dev->dev,\n+\t\t\t       buf->codec.h264.mv_col_buf_size,\n+\t\t\t       buf->codec.h264.mv_col_buf,\n+\t\t\t       buf->codec.h264.mv_col_buf_dma,\n+\t\t\t       DMA_ATTR_NO_KERNEL_MAPPING);\n+}\n+\n struct cedrus_dec_ops cedrus_dec_ops_h264 = {\n \t.irq_clear\t= cedrus_h264_irq_clear,\n \t.irq_disable\t= cedrus_h264_irq_disable,\n@@ -689,4 +677,5 @@ struct cedrus_dec_ops cedrus_dec_ops_h26\n \t.start\t\t= cedrus_h264_start,\n \t.stop\t\t= cedrus_h264_stop,\n \t.trigger\t= cedrus_h264_trigger,\n+\t.buf_cleanup\t= cedrus_h264_buf_cleanup,\n };\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0024-WIP-dw-hdmi-cec-sleep-100ms-on-error.patch",
    "content": "From f826ffb93b1ba0cfb9a5cfa3403813674331d4e0 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Tue, 26 Feb 2019 20:45:14 +0000\nSubject: [PATCH 34/44] WIP: dw-hdmi-cec: sleep 100ms on error\n\n---\n drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c | 18 ++++++++++++++++--\n 1 file changed, 16 insertions(+), 2 deletions(-)\n\n--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c\n+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c\n@@ -4,6 +4,7 @@\n  *\n  * Copyright (C) 2015-2017 Russell King.\n  */\n+#include <linux/delay.h>\n #include <linux/interrupt.h>\n #include <linux/io.h>\n #include <linux/module.h>\n@@ -129,8 +130,15 @@ static irqreturn_t dw_hdmi_cec_hardirq(i\n \n \tdw_hdmi_write(cec, stat, HDMI_IH_CEC_STAT0);\n \n-\tif (stat & CEC_STAT_ERROR_INIT) {\n-\t\tcec->tx_status = CEC_TX_STATUS_ERROR;\n+\t/* Status with both done and error_initiator bits have been seen\n+\t * on Rockchip RK3328 devices, transmit attempt seems to have failed\n+\t * when this happens, report as low drive and block cec-framework\n+\t * 100ms before core retransmits the failed message, this seems to\n+\t * mitigate the issue with failed transmit attempts.\n+\t */\n+\tif ((stat & (CEC_STAT_DONE|CEC_STAT_ERROR_INIT)) == (CEC_STAT_DONE|CEC_STAT_ERROR_INIT)) {\n+\t\tpr_info(\"dw_hdmi_cec_hardirq: stat=%02x LOW_DRIVE\\n\", stat);\n+\t\tcec->tx_status = CEC_TX_STATUS_LOW_DRIVE;\n \t\tcec->tx_done = true;\n \t\tret = IRQ_WAKE_THREAD;\n \t} else if (stat & CEC_STAT_DONE) {\n@@ -141,6 +149,10 @@ static irqreturn_t dw_hdmi_cec_hardirq(i\n \t\tcec->tx_status = CEC_TX_STATUS_NACK;\n \t\tcec->tx_done = true;\n \t\tret = IRQ_WAKE_THREAD;\n+\t} else if (stat & CEC_STAT_ERROR_INIT) {\n+\t\tcec->tx_status = CEC_TX_STATUS_ERROR;\n+\t\tcec->tx_done = true;\n+\t\tret = IRQ_WAKE_THREAD;\n \t}\n \n \tif (stat & CEC_STAT_EOM) {\n@@ -173,6 +185,8 @@ static irqreturn_t dw_hdmi_cec_thread(in\n \n \tif (cec->tx_done) {\n \t\tcec->tx_done = false;\n+\t\tif (cec->tx_status == CEC_TX_STATUS_LOW_DRIVE)\n+\t\t\tmsleep(100);\n \t\tcec_transmit_attempt_done(adap, cec->tx_status);\n \t}\n \tif (cec->rx_done) {\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0027-drm-sun4i-mixer-Add-caching-support.patch",
    "content": "From 2e5d4ca1c07ddf06f8c3b18fd73baea7ce711169 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Sun, 19 Jul 2020 11:37:41 +0200\nSubject: [PATCH 37/44] drm/sun4i: mixer: Add caching support\n\nMost registers are not safe to read out so enable cache in regmap.\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n drivers/gpu/drm/sun4i/sun8i_mixer.c | 12 ++++++++++++\n 1 file changed, 12 insertions(+)\n\n--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c\n+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c\n@@ -346,11 +346,23 @@ static const struct sunxi_engine_ops sun\n \t.layers_init\t= sun8i_layers_init,\n };\n \n+static bool sun8i_mixer_volatile_reg(struct device *dev, unsigned int reg)\n+{\n+\tswitch (reg) {\n+\tcase SUN8I_MIXER_GLOBAL_STATUS:\n+\tcase SUN8I_MIXER_GLOBAL_DBUFF:\n+\t\treturn true;\n+\t}\n+\treturn false;\n+}\n+\n static const struct regmap_config sun8i_mixer_regmap_config = {\n+\t.cache_type\t= REGCACHE_FLAT,\n \t.reg_bits\t= 32,\n \t.val_bits\t= 32,\n \t.reg_stride\t= 4,\n \t.max_register\t= 0xffffc, /* guessed */\n+\t.volatile_reg\t= sun8i_mixer_volatile_reg,\n };\n \n static int sun8i_mixer_of_get_id(struct device_node *node)\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0028-mfd-Add-support-for-AC200.patch",
    "content": "From 59adceb6f34521c0f1a229f20ee9961269daa539 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Fri, 16 Aug 2019 16:38:21 +0200\nSubject: [PATCH 38/44] mfd: Add support for AC200\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n drivers/mfd/Kconfig       |   9 ++\n drivers/mfd/Makefile      |   1 +\n drivers/mfd/ac200.c       | 150 +++++++++++++++++++++++++++\n include/linux/mfd/ac200.h | 209 ++++++++++++++++++++++++++++++++++++++\n 4 files changed, 369 insertions(+)\n create mode 100644 drivers/mfd/ac200.c\n create mode 100644 include/linux/mfd/ac200.h\n\n--- a/drivers/mfd/Kconfig\n+++ b/drivers/mfd/Kconfig\n@@ -178,6 +178,15 @@ config MFD_AC100\n \t  This driver include only the core APIs. You have to select individual\n \t  components like codecs or RTC under the corresponding menus.\n \n+config MFD_AC200\n+\ttristate \"X-Powers AC200\"\n+\tselect MFD_CORE\n+\tdepends on I2C\n+\thelp\n+\t  If you say Y here you get support for the X-Powers AC200 IC.\n+\t  This driver include only the core APIs. You have to select individual\n+\t  components like Ethernet PHY or RTC under the corresponding menus.\n+\n config MFD_AXP20X\n \ttristate\n \tselect MFD_CORE\n--- a/drivers/mfd/Makefile\n+++ b/drivers/mfd/Makefile\n@@ -142,6 +142,7 @@ obj-$(CONFIG_MFD_DA9052_SPI)\t+= da9052-s\n obj-$(CONFIG_MFD_DA9052_I2C)\t+= da9052-i2c.o\n \n obj-$(CONFIG_MFD_AC100)\t\t+= ac100.o\n+obj-$(CONFIG_MFD_AC200)\t\t+= ac200.o\n obj-$(CONFIG_MFD_AXP20X)\t+= axp20x.o\n obj-$(CONFIG_MFD_AXP20X_I2C)\t+= axp20x-i2c.o\n obj-$(CONFIG_MFD_AXP20X_RSB)\t+= axp20x-rsb.o\n--- /dev/null\n+++ b/drivers/mfd/ac200.c\n@@ -0,0 +1,148 @@\n+// SPDX-License-Identifier: GPL-2.0-only\n+/*\n+ * MFD core driver for X-Powers' AC200 IC\n+ *\n+ * The AC200 is a chip which is co-packaged with Allwinner H6 SoC and\n+ * includes analog audio codec, analog TV encoder, ethernet PHY, eFuse\n+ * and RTC.\n+ *\n+ * Copyright (c) 2019 Jernej Skrabec <jernej.skrabec@siol.net>\n+ *\n+ * Based on AC100 driver with following copyrights:\n+ * Copyright (2016) Chen-Yu Tsai\n+ */\n+\n+#include <linux/i2c.h>\n+#include <linux/kernel.h>\n+#include <linux/mfd/core.h>\n+#include <linux/mfd/ac200.h>\n+#include <linux/module.h>\n+#include <linux/of.h>\n+\n+static const struct regmap_range_cfg ac200_range_cfg[] = {\n+\t{\n+\t\t.range_min = AC200_SYS_VERSION,\n+\t\t.range_max = AC200_IC_CHARA1,\n+\t\t.selector_reg = AC200_TWI_REG_ADDR_H,\n+\t\t.selector_mask = 0xff,\n+\t\t.selector_shift = 0,\n+\t\t.window_start = 0,\n+\t\t.window_len = 256,\n+\t}\n+};\n+\n+static const struct regmap_config ac200_regmap_config = {\n+\t.reg_bits\t= 8,\n+\t.val_bits\t= 16,\n+\t.ranges\t\t= ac200_range_cfg,\n+\t.num_ranges\t= ARRAY_SIZE(ac200_range_cfg),\n+\t.max_register\t= AC200_IC_CHARA1,\n+};\n+\n+static struct mfd_cell ac200_cells[] = {\n+\t{\n+\t\t.name\t\t= \"ac200-codec\",\n+\t\t.of_compatible\t= \"x-powers,ac200-codec\",\n+\t}, {\n+\t\t.name\t\t= \"ac200-efuse\",\n+\t\t.of_compatible\t= \"x-powers,ac200-efuse\",\n+\t}, {\n+\t\t.name\t\t= \"ac200-ephy\",\n+\t\t.of_compatible\t= \"x-powers,ac200-ephy\",\n+\t}, {\n+\t\t.name\t\t= \"ac200-rtc\",\n+\t\t.of_compatible\t= \"x-powers,ac200-rtc\",\n+\t}, {\n+\t\t.name\t\t= \"ac200-tve\",\n+\t\t.of_compatible\t= \"x-powers,ac200-tve\",\n+\t},\n+};\n+\n+static int ac200_i2c_probe(struct i2c_client *i2c,\n+\t\t\t   const struct i2c_device_id *id)\n+{\n+\tstruct device *dev = &i2c->dev;\n+\tstruct ac200_dev *ac200;\n+\tint ret;\n+\n+\tac200 = devm_kzalloc(dev, sizeof(*ac200), GFP_KERNEL);\n+\tif (!ac200)\n+\t\treturn -ENOMEM;\n+\n+\ti2c_set_clientdata(i2c, ac200);\n+\n+\tac200->clk = devm_clk_get(dev, NULL);\n+\tif (IS_ERR(ac200->clk)) {\n+\t\tret = PTR_ERR(ac200->clk);\n+\t\tdev_err(dev, \"Can't obtain the clock: %d\\n\", ret);\n+\t\treturn ret;\n+\t}\n+\n+\tac200->regmap = devm_regmap_init_i2c(i2c, &ac200_regmap_config);\n+\tif (IS_ERR(ac200->regmap)) {\n+\t\tret = PTR_ERR(ac200->regmap);\n+\t\tdev_err(dev, \"Regmap init failed: %d\\n\", ret);\n+\t\treturn ret;\n+\t}\n+\n+\tret = clk_prepare_enable(ac200->clk);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = regmap_write(ac200->regmap, AC200_SYS_CONTROL, 0);\n+\tif (ret)\n+\t\tgoto err;\n+\n+\tret = regmap_write(ac200->regmap, AC200_SYS_CONTROL, 1);\n+\tif (ret)\n+\t\tgoto err;\n+\n+\tret = devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, ac200_cells,\n+\t\t\t\t   ARRAY_SIZE(ac200_cells), NULL, 0, NULL);\n+\tif (ret) {\n+\t\tdev_err(dev, \"Failed to add MFD devices: %d\\n\", ret);\n+\t\tgoto err;\n+\t}\n+\n+\treturn 0;\n+\n+err:\n+\tclk_disable_unprepare(ac200->clk);\n+\treturn ret;\n+}\n+\n+void ac200_i2c_remove(struct i2c_client *i2c)\n+{\n+\tstruct ac200_dev *ac200 = i2c_get_clientdata(i2c);\n+\n+\tregmap_write(ac200->regmap, AC200_SYS_CONTROL, 0);\n+\n+\tclk_disable_unprepare(ac200->clk);\n+}\n+\n+static const struct i2c_device_id ac200_ids[] = {\n+\t{ \"ac200\", },\n+\t{ /* sentinel */ }\n+};\n+MODULE_DEVICE_TABLE(i2c, ac200_ids);\n+\n+static const struct of_device_id ac200_of_match[] = {\n+\t{ .compatible = \"x-powers,ac200\" },\n+\t{ /* sentinel */ }\n+};\n+MODULE_DEVICE_TABLE(of, ac200_of_match);\n+\n+static struct i2c_driver ac200_i2c_driver = {\n+\t.driver = {\n+\t\t.name\t= \"ac200\",\n+\t\t.of_match_table\t= of_match_ptr(ac200_of_match),\n+\t},\n+\t.probe\t= ac200_i2c_probe,\n+\t.remove = ac200_i2c_remove,\n+\t.id_table = ac200_ids,\n+};\n+module_i2c_driver(ac200_i2c_driver);\n+\n+MODULE_DESCRIPTION(\"MFD core driver for AC200\");\n+MODULE_AUTHOR(\"Jernej Skrabec <jernej.skrabec@siol.net>\");\n+MODULE_LICENSE(\"GPL v2\");\n--- /dev/null\n+++ b/include/linux/mfd/ac200.h\n@@ -0,0 +1,209 @@\n+/* SPDX-License-Identifier: GPL-2.0-only */\n+/*\n+ * AC200 register list\n+ *\n+ * Copyright (C) 2019 Jernej Skrabec <jernej.skrabec@siol.net>\n+ */\n+\n+#ifndef __LINUX_MFD_AC200_H\n+#define __LINUX_MFD_AC200_H\n+\n+#include <linux/clk.h>\n+#include <linux/regmap.h>\n+\n+/* interface registers (can be accessed from any page) */\n+#define AC200_TWI_CHANGE_TO_RSB\t\t0x3E\n+#define AC200_TWI_PAD_DELAY\t\t0xC4\n+#define AC200_TWI_REG_ADDR_H\t\t0xFE\n+\n+/* General registers */\n+#define AC200_SYS_VERSION\t\t0x0000\n+#define AC200_SYS_CONTROL\t\t0x0002\n+#define AC200_SYS_IRQ_ENABLE\t\t0x0004\n+#define AC200_SYS_IRQ_STATUS\t\t0x0006\n+#define AC200_SYS_CLK_CTL\t\t0x0008\n+#define AC200_SYS_DLDO_OSC_CTL\t\t0x000A\n+#define AC200_SYS_PLL_CTL0\t\t0x000C\n+#define AC200_SYS_PLL_CTL1\t\t0x000E\n+#define AC200_SYS_AUDIO_CTL0\t\t0x0010\n+#define AC200_SYS_AUDIO_CTL1\t\t0x0012\n+#define AC200_SYS_EPHY_CTL0\t\t0x0014\n+#define AC200_SYS_EPHY_CTL1\t\t0x0016\n+#define AC200_SYS_TVE_CTL0\t\t0x0018\n+#define AC200_SYS_TVE_CTL1\t\t0x001A\n+\n+/* Audio Codec registers */\n+#define AC200_AC_SYS_CLK_CTL\t\t0x2000\n+#define AC200_SYS_MOD_RST\t\t0x2002\n+#define AC200_SYS_SAMP_CTL\t\t0x2004\n+#define AC200_I2S_CTL\t\t\t0x2100\n+#define AC200_I2S_CLK\t\t\t0x2102\n+#define AC200_I2S_FMT0\t\t\t0x2104\n+#define AC200_I2S_FMT1\t\t\t0x2108\n+#define AC200_I2S_MIX_SRC\t\t0x2114\n+#define AC200_I2S_MIX_GAIN\t\t0x2116\n+#define AC200_I2S_DACDAT_DVC\t\t0x2118\n+#define AC200_I2S_ADCDAT_DVC\t\t0x211A\n+#define AC200_AC_DAC_DPC\t\t0x2200\n+#define AC200_AC_DAC_MIX_SRC\t\t0x2202\n+#define AC200_AC_DAC_MIX_GAIN\t\t0x2204\n+#define AC200_DACA_OMIXER_CTRL\t\t0x2220\n+#define AC200_OMIXER_SR\t\t\t0x2222\n+#define AC200_LINEOUT_CTRL\t\t0x2224\n+#define AC200_AC_ADC_DPC\t\t0x2300\n+#define AC200_MBIAS_CTRL\t\t0x2310\n+#define AC200_ADC_MIC_CTRL\t\t0x2320\n+#define AC200_ADCMIXER_SR\t\t0x2322\n+#define AC200_ANALOG_TUNING0\t\t0x232A\n+#define AC200_ANALOG_TUNING1\t\t0x232C\n+#define AC200_AC_AGC_SEL\t\t0x2480\n+#define AC200_ADC_DAPLCTRL\t\t0x2500\n+#define AC200_ADC_DAPRCTRL\t\t0x2502\n+#define AC200_ADC_DAPLSTA\t\t0x2504\n+#define AC200_ADC_DAPRSTA\t\t0x2506\n+#define AC200_ADC_DAPLTL\t\t0x2508\n+#define AC200_ADC_DAPRTL\t\t0x250A\n+#define AC200_ADC_DAPLHAC\t\t0x250C\n+#define AC200_ADC_DAPLLAC\t\t0x250E\n+#define AC200_ADC_DAPRHAC\t\t0x2510\n+#define AC200_ADC_DAPRLAC\t\t0x2512\n+#define AC200_ADC_DAPLDT\t\t0x2514\n+#define AC200_ADC_DAPLAT\t\t0x2516\n+#define AC200_ADC_DAPRDT\t\t0x2518\n+#define AC200_ADC_DAPRAT\t\t0x251A\n+#define AC200_ADC_DAPNTH\t\t0x251C\n+#define AC200_ADC_DAPLHNAC\t\t0x251E\n+#define AC200_ADC_DAPLLNAC\t\t0x2520\n+#define AC200_ADC_DAPRHNAC\t\t0x2522\n+#define AC200_ADC_DAPRLNAC\t\t0x2524\n+#define AC200_AC_DAPHHPFC\t\t0x2526\n+#define AC200_AC_DAPLHPFC\t\t0x2528\n+#define AC200_AC_DAPOPT\t\t\t0x252A\n+#define AC200_AC_DAC_DAPCTRL\t\t0x3000\n+#define AC200_AC_DRC_HHPFC\t\t0x3002\n+#define AC200_AC_DRC_LHPFC\t\t0x3004\n+#define AC200_AC_DRC_CTRL\t\t0x3006\n+#define AC200_AC_DRC_LPFHAT\t\t0x3008\n+#define AC200_AC_DRC_LPFLAT\t\t0x300A\n+#define AC200_AC_DRC_RPFHAT\t\t0x300C\n+#define AC200_AC_DRC_RPFLAT\t\t0x300E\n+#define AC200_AC_DRC_LPFHRT\t\t0x3010\n+#define AC200_AC_DRC_LPFLRT\t\t0x3012\n+#define AC200_AC_DRC_RPFHRT\t\t0x3014\n+#define AC200_AC_DRC_RPFLRT\t\t0x3016\n+#define AC200_AC_DRC_LRMSHAT\t\t0x3018\n+#define AC200_AC_DRC_LRMSLAT\t\t0x301A\n+#define AC200_AC_DRC_RRMSHAT\t\t0x301C\n+#define AC200_AC_DRC_RRMSLAT\t\t0x301E\n+#define AC200_AC_DRC_HCT\t\t0x3020\n+#define AC200_AC_DRC_LCT\t\t0x3022\n+#define AC200_AC_DRC_HKC\t\t0x3024\n+#define AC200_AC_DRC_LKC\t\t0x3026\n+#define AC200_AC_DRC_HOPC\t\t0x3028\n+#define AC200_AC_DRC_LOPC\t\t0x302A\n+#define AC200_AC_DRC_HLT\t\t0x302C\n+#define AC200_AC_DRC_LLT\t\t0x302E\n+#define AC200_AC_DRC_HKI\t\t0x3030\n+#define AC200_AC_DRC_LKI\t\t0x3032\n+#define AC200_AC_DRC_HOPL\t\t0x3034\n+#define AC200_AC_DRC_LOPL\t\t0x3036\n+#define AC200_AC_DRC_HET\t\t0x3038\n+#define AC200_AC_DRC_LET\t\t0x303A\n+#define AC200_AC_DRC_HKE\t\t0x303C\n+#define AC200_AC_DRC_LKE\t\t0x303E\n+#define AC200_AC_DRC_HOPE\t\t0x3040\n+#define AC200_AC_DRC_LOPE\t\t0x3042\n+#define AC200_AC_DRC_HKN\t\t0x3044\n+#define AC200_AC_DRC_LKN\t\t0x3046\n+#define AC200_AC_DRC_SFHAT\t\t0x3048\n+#define AC200_AC_DRC_SFLAT\t\t0x304A\n+#define AC200_AC_DRC_SFHRT\t\t0x304C\n+#define AC200_AC_DRC_SFLRT\t\t0x304E\n+#define AC200_AC_DRC_MXGHS\t\t0x3050\n+#define AC200_AC_DRC_MXGLS\t\t0x3052\n+#define AC200_AC_DRC_MNGHS\t\t0x3054\n+#define AC200_AC_DRC_MNGLS\t\t0x3056\n+#define AC200_AC_DRC_EPSHC\t\t0x3058\n+#define AC200_AC_DRC_EPSLC\t\t0x305A\n+#define AC200_AC_DRC_HPFHGAIN\t\t0x305E\n+#define AC200_AC_DRC_HPFLGAIN\t\t0x3060\n+#define AC200_AC_DRC_BISTCR\t\t0x3100\n+#define AC200_AC_DRC_BISTST\t\t0x3102\n+\n+/* TVE registers */\n+#define AC200_TVE_CTL0\t\t\t0x4000\n+#define AC200_TVE_CTL1\t\t\t0x4002\n+#define AC200_TVE_MOD0\t\t\t0x4004\n+#define AC200_TVE_MOD1\t\t\t0x4006\n+#define AC200_TVE_DAC_CFG0\t\t0x4008\n+#define AC200_TVE_DAC_CFG1\t\t0x400A\n+#define AC200_TVE_YC_DELAY\t\t0x400C\n+#define AC200_TVE_YC_FILTER\t\t0x400E\n+#define AC200_TVE_BURST_FRQ0\t\t0x4010\n+#define AC200_TVE_BURST_FRQ1\t\t0x4012\n+#define AC200_TVE_FRONT_PORCH\t\t0x4014\n+#define AC200_TVE_BACK_PORCH\t\t0x4016\n+#define AC200_TVE_TOTAL_LINE\t\t0x401C\n+#define AC200_TVE_FIRST_ACTIVE\t\t0x401E\n+#define AC200_TVE_BLACK_LEVEL\t\t0x4020\n+#define AC200_TVE_BLANK_LEVEL\t\t0x4022\n+#define AC200_TVE_PLUG_EN\t\t0x4030\n+#define AC200_TVE_PLUG_IRQ_EN\t\t0x4032\n+#define AC200_TVE_PLUG_IRQ_STA\t\t0x4034\n+#define AC200_TVE_PLUG_STA\t\t0x4038\n+#define AC200_TVE_PLUG_DEBOUNCE\t\t0x4040\n+#define AC200_TVE_DAC_TEST\t\t0x4042\n+#define AC200_TVE_PLUG_PULSE_LEVEL\t0x40F4\n+#define AC200_TVE_PLUG_PULSE_START\t0x40F8\n+#define AC200_TVE_PLUG_PULSE_PERIOD\t0x40FA\n+#define AC200_TVE_IF_CTL\t\t0x5000\n+#define AC200_TVE_IF_TIM0\t\t0x5008\n+#define AC200_TVE_IF_TIM1\t\t0x500A\n+#define AC200_TVE_IF_TIM2\t\t0x500C\n+#define AC200_TVE_IF_TIM3\t\t0x500E\n+#define AC200_TVE_IF_SYNC0\t\t0x5010\n+#define AC200_TVE_IF_SYNC1\t\t0x5012\n+#define AC200_TVE_IF_SYNC2\t\t0x5014\n+#define AC200_TVE_IF_TIM4\t\t0x5016\n+#define AC200_TVE_IF_STATUS\t\t0x5018\n+\n+/* EPHY registers */\n+#define AC200_EPHY_CTL\t\t\t0x6000\n+#define AC200_EPHY_BIST\t\t\t0x6002\n+\n+/* eFuse registers (0x8000 - 0x9FFF, layout unknown) */\n+\n+/* RTC registers */\n+#define AC200_LOSC_CTRL0\t\t0xA000\n+#define AC200_LOSC_CTRL1\t\t0xA002\n+#define AC200_LOSC_AUTO_SWT_STA\t\t0xA004\n+#define AC200_INTOSC_CLK_PRESCAL\t0xA008\n+#define AC200_RTC_YY_MM_DD0\t\t0xA010\n+#define AC200_RTC_YY_MM_DD1\t\t0xA012\n+#define AC200_RTC_HH_MM_SS0\t\t0xA014\n+#define AC200_RTC_HH_MM_SS1\t\t0xA016\n+#define AC200_ALARM0_CUR_VLU0\t\t0xA024\n+#define AC200_ALARM0_CUR_VLU1\t\t0xA026\n+#define AC200_ALARM0_ENABLE\t\t0xA028\n+#define AC200_ALARM0_IRQ_EN\t\t0xA02C\n+#define AC200_ALARM0_IRQ_STA\t\t0xA030\n+#define AC200_ALARM1_WK_HH_MM_SS0\t0xA040\n+#define AC200_ALARM1_WK_HH_MM_SS1\t0xA042\n+#define AC200_ALARM1_ENABLE\t\t0xA044\n+#define AC200_ALARM1_IRQ_EN\t\t0xA048\n+#define AC200_ALARM1_IRQ_STA\t\t0xA04C\n+#define AC200_ALARM_CONFIG\t\t0xA050\n+#define AC200_LOSC_OUT_GATING\t\t0xA060\n+#define AC200_GP_DATA(x)\t\t(0xA100 + (x) * 2)\n+#define AC200_RTC_DEB\t\t\t0xA170\n+#define AC200_GPL_HOLD_OUTPUT\t\t0xA180\n+#define AC200_VDD_RTC\t\t\t0xA190\n+#define AC200_IC_CHARA0\t\t\t0xA1F0\n+#define AC200_IC_CHARA1\t\t\t0xA1F2\n+\n+struct ac200_dev {\n+\tstruct clk\t*clk;\n+\tstruct regmap\t*regmap;\n+};\n+\n+#endif /* __LINUX_MFD_AC200_H */\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0029-net-phy-Add-support-for-AC200-EPHY.patch",
    "content": "From cbf68fb141747879e2e6c43584c1e1e3b4d77683 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Fri, 16 Aug 2019 16:38:57 +0200\nSubject: [PATCH 39/44] net: phy: Add support for AC200 EPHY\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n drivers/net/phy/Kconfig  |   7 ++\n drivers/net/phy/Makefile |   1 +\n drivers/net/phy/ac200.c  | 234 +++++++++++++++++++++++++++++++++++++++\n 3 files changed, 242 insertions(+)\n create mode 100644 drivers/net/phy/ac200.c\n\n--- a/drivers/net/phy/Kconfig\n+++ b/drivers/net/phy/Kconfig\n@@ -63,6 +63,13 @@ config SFP\n \n comment \"MII PHY device drivers\"\n \n+config AC200_PHY\n+\ttristate \"AC200 EPHY\"\n+\tdepends on NVMEM\n+\tdepends on OF\n+\thelp\n+\t  Fast ethernet PHY as found in X-Powers AC200 multi-function device.\n+\n config AMD_PHY\n \ttristate \"AMD PHYs\"\n \thelp\n--- a/drivers/net/phy/Makefile\n+++ b/drivers/net/phy/Makefile\n@@ -30,6 +30,7 @@ obj-$(CONFIG_SFP)\t\t+= sfp.o\n sfp-obj-$(CONFIG_SFP)\t\t+= sfp-bus.o\n obj-y\t\t\t\t+= $(sfp-obj-y) $(sfp-obj-m)\n \n+obj-$(CONFIG_AC200_PHY)\t\t+= ac200.o\n obj-$(CONFIG_ADIN_PHY)\t\t+= adin.o\n obj-$(CONFIG_AMD_PHY)\t\t+= amd.o\n aquantia-objs\t\t\t+= aquantia_main.o\n--- /dev/null\n+++ b/drivers/net/phy/ac200.c\n@@ -0,0 +1,234 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+/**\n+ * Driver for AC200 Ethernet PHY\n+ *\n+ * Copyright (c) 2019 Jernej Skrabec <jernej.skrabec@siol.net>\n+ */\n+\n+#include <linux/kernel.h>\n+#include <linux/module.h>\n+#include <linux/mfd/ac200.h>\n+#include <linux/nvmem-consumer.h>\n+#include <linux/of.h>\n+#include <linux/phy.h>\n+#include <linux/platform_device.h>\n+\n+#define AC200_EPHY_ID\t\t\t0x00441400\n+#define AC200_EPHY_ID_MASK\t\t0x0ffffff0\n+\n+/* macros for system ephy control 0 register */\n+#define AC200_EPHY_RESET_INVALID\tBIT(0)\n+#define AC200_EPHY_SYSCLK_GATING\tBIT(1)\n+\n+/* macros for system ephy control 1 register */\n+#define AC200_EPHY_E_EPHY_MII_IO_EN\tBIT(0)\n+#define AC200_EPHY_E_LNK_LED_IO_EN\tBIT(1)\n+#define AC200_EPHY_E_SPD_LED_IO_EN\tBIT(2)\n+#define AC200_EPHY_E_DPX_LED_IO_EN\tBIT(3)\n+\n+/* macros for ephy control register */\n+#define AC200_EPHY_SHUTDOWN\t\tBIT(0)\n+#define AC200_EPHY_LED_POL\t\tBIT(1)\n+#define AC200_EPHY_CLK_SEL\t\tBIT(2)\n+#define AC200_EPHY_ADDR(x)\t\t(((x) & 0x1F) << 4)\n+#define AC200_EPHY_XMII_SEL\t\tBIT(11)\n+#define AC200_EPHY_CALIB(x)\t\t(((x) & 0xF) << 12)\n+\n+struct ac200_ephy_dev {\n+\tstruct phy_driver\t*ephy;\n+\tstruct regmap\t\t*regmap;\n+};\n+\n+static char *ac200_phy_name = \"AC200 EPHY\";\n+\n+static void disable_intelligent_ieee(struct phy_device *phydev)\n+{\n+\tunsigned int value;\n+\n+\tphy_write(phydev, 0x1f, 0x0100);\t/* switch to page 1 */\n+\tvalue = phy_read(phydev, 0x17);\n+\tvalue &= ~BIT(3);\t\t\t/* disable IEEE */\n+\tphy_write(phydev, 0x17, value);\n+\tphy_write(phydev, 0x1f, 0x0000);\t/* switch to page 0 */\n+}\n+\n+static void disable_802_3az_ieee(struct phy_device *phydev)\n+{\n+\tunsigned int value;\n+\n+\tphy_write(phydev, 0xd, 0x7);\n+\tphy_write(phydev, 0xe, 0x3c);\n+\tphy_write(phydev, 0xd, BIT(14) | 0x7);\n+\tvalue = phy_read(phydev, 0xe);\n+\tvalue &= ~BIT(1);\n+\tphy_write(phydev, 0xd, 0x7);\n+\tphy_write(phydev, 0xe, 0x3c);\n+\tphy_write(phydev, 0xd, BIT(14) | 0x7);\n+\tphy_write(phydev, 0xe, value);\n+\n+\tphy_write(phydev, 0x1f, 0x0200);\t/* switch to page 2 */\n+\tphy_write(phydev, 0x18, 0x0000);\n+}\n+\n+static int ac200_ephy_config_init(struct phy_device *phydev)\n+{\n+\tconst struct ac200_ephy_dev *priv = phydev->drv->driver_data;\n+\tunsigned int value;\n+\tint ret;\n+\n+\tphy_write(phydev, 0x1f, 0x0100);\t/* Switch to Page 1 */\n+\tphy_write(phydev, 0x12, 0x4824);\t/* Disable APS */\n+\n+\tphy_write(phydev, 0x1f, 0x0200);\t/* Switch to Page 2 */\n+\tphy_write(phydev, 0x18, 0x0000);\t/* PHYAFE TRX optimization */\n+\n+\tphy_write(phydev, 0x1f, 0x0600);\t/* Switch to Page 6 */\n+\tphy_write(phydev, 0x14, 0x708f);\t/* PHYAFE TX optimization */\n+\tphy_write(phydev, 0x13, 0xF000);\t/* PHYAFE RX optimization */\n+\tphy_write(phydev, 0x15, 0x1530);\n+\n+\tphy_write(phydev, 0x1f, 0x0800);\t/* Switch to Page 6 */\n+\tphy_write(phydev, 0x18, 0x00bc);\t/* PHYAFE TRX optimization */\n+\n+\tdisable_intelligent_ieee(phydev);\t/* Disable Intelligent IEEE */\n+\tdisable_802_3az_ieee(phydev);\t\t/* Disable 802.3az IEEE */\n+\tphy_write(phydev, 0x1f, 0x0000);\t/* Switch to Page 0 */\n+\n+\tvalue = (phydev->interface == PHY_INTERFACE_MODE_RMII) ?\n+\t\tAC200_EPHY_XMII_SEL : 0;\n+\tret = regmap_update_bits(priv->regmap, AC200_EPHY_CTL,\n+\t\t\t\t AC200_EPHY_XMII_SEL, value);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\t/* FIXME: This is probably H6 specific */\n+\tvalue = phy_read(phydev, 0x13);\n+\tvalue |= BIT(12);\n+\tphy_write(phydev, 0x13, value);\n+\n+\treturn 0;\n+}\n+\n+static const struct mdio_device_id __maybe_unused ac200_ephy_phy_tbl[] = {\n+\t{ AC200_EPHY_ID, AC200_EPHY_ID_MASK },\n+\t{ /* sentinel */ }\n+};\n+MODULE_DEVICE_TABLE(mdio, ac200_ephy_phy_tbl);\n+\n+static int ac200_ephy_probe(struct platform_device *pdev)\n+{\n+\tstruct ac200_dev *ac200 = dev_get_drvdata(pdev->dev.parent);\n+\tstruct device *dev = &pdev->dev;\n+\tstruct ac200_ephy_dev *priv;\n+\tstruct nvmem_cell *calcell;\n+\tstruct phy_driver *ephy;\n+\tu16 *caldata, calib;\n+\tsize_t callen;\n+\tint ret;\n+\n+\tpriv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);\n+\tif (!priv)\n+\t\treturn -ENOMEM;\n+\n+\tephy = devm_kzalloc(dev, sizeof(*ephy), GFP_KERNEL);\n+\tif (!ephy)\n+\t\treturn -ENOMEM;\n+\n+\tcalcell = devm_nvmem_cell_get(dev, \"ephy_calib\");\n+\tif (IS_ERR(calcell)) {\n+\t\tdev_err(dev, \"Unable to find calibration data!\\n\");\n+\t\treturn PTR_ERR(calcell);\n+\t}\n+\n+\tcaldata = nvmem_cell_read(calcell, &callen);\n+\tif (IS_ERR(caldata)) {\n+\t\tdev_err(dev, \"Unable to read calibration data!\\n\");\n+\t\treturn PTR_ERR(caldata);\n+\t}\n+\n+\tif (callen != 2) {\n+\t\tdev_err(dev, \"Calibration data has wrong length: 2 != %lu\\n\",\n+\t\t\tcallen);\n+\t\tkfree(caldata);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tcalib = *caldata + 3;\n+\tkfree(caldata);\n+\n+\tephy->phy_id = AC200_EPHY_ID;\n+\tephy->phy_id_mask = AC200_EPHY_ID_MASK;\n+\tephy->name = ac200_phy_name;\n+\tephy->driver_data = priv;\n+\tephy->soft_reset = genphy_soft_reset;\n+\tephy->config_init = ac200_ephy_config_init;\n+\tephy->suspend = genphy_suspend;\n+\tephy->resume = genphy_resume;\n+\n+\tpriv->ephy = ephy;\n+\tpriv->regmap = ac200->regmap;\n+\tplatform_set_drvdata(pdev, priv);\n+\n+\tret = regmap_write(ac200->regmap, AC200_SYS_EPHY_CTL0,\n+\t\t\t   AC200_EPHY_RESET_INVALID |\n+\t\t\t   AC200_EPHY_SYSCLK_GATING);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = regmap_write(ac200->regmap, AC200_SYS_EPHY_CTL1,\n+\t\t\t   AC200_EPHY_E_EPHY_MII_IO_EN |\n+\t\t\t   AC200_EPHY_E_LNK_LED_IO_EN |\n+\t\t\t   AC200_EPHY_E_SPD_LED_IO_EN |\n+\t\t\t   AC200_EPHY_E_DPX_LED_IO_EN);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = regmap_write(ac200->regmap, AC200_EPHY_CTL,\n+\t\t\t   AC200_EPHY_LED_POL |\n+\t\t\t   AC200_EPHY_CLK_SEL |\n+\t\t\t   AC200_EPHY_ADDR(1) |\n+\t\t\t   AC200_EPHY_CALIB(calib));\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = phy_driver_register(priv->ephy, THIS_MODULE);\n+\tif (ret) {\n+\t\tdev_err(dev, \"Unable to register phy\\n\");\n+\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int ac200_ephy_remove(struct platform_device *pdev)\n+{\n+\tstruct ac200_ephy_dev *priv = platform_get_drvdata(pdev);\n+\n+\tphy_driver_unregister(priv->ephy);\n+\n+\tregmap_write(priv->regmap, AC200_EPHY_CTL, AC200_EPHY_SHUTDOWN);\n+\tregmap_write(priv->regmap, AC200_SYS_EPHY_CTL1, 0);\n+\tregmap_write(priv->regmap, AC200_SYS_EPHY_CTL0, 0);\n+\n+\treturn 0;\n+}\n+\n+static const struct of_device_id ac200_ephy_match[] = {\n+\t{ .compatible = \"x-powers,ac200-ephy\" },\n+\t{ /* sentinel */ }\n+};\n+MODULE_DEVICE_TABLE(of, ac200_ephy_match);\n+\n+static struct platform_driver ac200_ephy_driver = {\n+\t.probe\t\t= ac200_ephy_probe,\n+\t.remove\t\t= ac200_ephy_remove,\n+\t.driver\t\t= {\n+\t\t.name\t\t= \"ac200-ephy\",\n+\t\t.of_match_table\t= ac200_ephy_match,\n+\t},\n+};\n+module_platform_driver(ac200_ephy_driver);\n+\n+MODULE_AUTHOR(\"Jernej Skrabec <jernej.skrabec@siol.net>\");\n+MODULE_DESCRIPTION(\"AC200 Ethernet PHY driver\");\n+MODULE_LICENSE(\"GPL\");\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0030-wip-H6-deinterlace.patch",
    "content": "From 91c70ea17b58c9205c35cd43a3dd8266bbe035b1 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Mon, 25 May 2020 19:06:07 +0200\nSubject: [PATCH 40/44] wip: H6 deinterlace\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n .../media/platform/sunxi/sunxi50i-di/Kconfig  |   14 +\n drivers/media/platform/sunxi/Makefile         |    1 +\n .../media/platform/sunxi/sun50i-di/Makefile   |    2 +\n .../platform/sunxi/sun50i-di/sun50i-di.c      | 1134 +++++++++++++++++\n .../platform/sunxi/sun50i-di/sun50i-di.h      |  172 +++\n 5 files changed, 1322 insertions(+)\n create mode 100644 drivers/media/platform/sunxi/sun50i-di/Makefile\n create mode 100644 drivers/media/platform/sunxi/sun50i-di/sun50i-di.c\n create mode 100644 drivers/media/platform/sunxi/sun50i-di/sun50i-di.h\n\n--- /dev/null\n+++ b/drivers/media/platform/sunxi/sun50i-di/Kconfig\n@@ -0,0 +1,14 @@\n+# SPDX-License-Identifier: GPL-2.0-only\n+config VIDEO_SUN50I_DEINTERLACE\n+\ttristate \"Allwinner Deinterlace v2 driver\"\n+\tdepends on V4L_MEM2MEM_DRIVERS\n+\tdepends on VIDEO_DEV\n+\tdepends on ARCH_SUNXI || COMPILE_TEST\n+\tdepends on COMMON_CLK && OF\n+\tdepends on PM\n+\tselect VIDEOBUF2_DMA_CONTIG\n+\tselect V4L2_MEM2MEM_DEV\n+\thelp\n+\t   Support for the Allwinner deinterlace v2 unit found on\n+\t   some SoCs, like H6.\n+\t   To compile this driver as a module choose m here.\n--- a/drivers/media/platform/sunxi/Makefile\n+++ b/drivers/media/platform/sunxi/Makefile\n@@ -3,4 +3,5 @@\n obj-y\t\t+= sun4i-csi/\n obj-y\t\t+= sun6i-csi/\n obj-y\t\t+= sun8i-di/\n+obj-y\t\t+= sun50i-di/\n obj-y\t\t+= sun8i-rotate/\n--- /dev/null\n+++ b/drivers/media/platform/sunxi/sun50i-di/Makefile\n@@ -0,0 +1,2 @@\n+# SPDX-License-Identifier: GPL-2.0\n+obj-$(CONFIG_VIDEO_SUN50I_DEINTERLACE) += sun50i-di.o\n--- /dev/null\n+++ b/drivers/media/platform/sunxi/sun50i-di/sun50i-di.c\n@@ -0,0 +1,1137 @@\n+// SPDX-License-Identifier: GPL-2.0\n+/*\n+ * Allwinner sun50i deinterlacer driver\n+ *\n+ * Copyright (C) 2020 Jernej Skrabec <jernej.skrabec@siol.net>\n+ *\n+ * Based on vim2m driver.\n+ */\n+\n+#include <linux/clk.h>\n+#include <linux/interrupt.h>\n+#include <linux/io.h>\n+#include <linux/iopoll.h>\n+#include <linux/module.h>\n+#include <linux/of.h>\n+#include <linux/of_device.h>\n+#include <linux/pm_runtime.h>\n+#include <linux/reset.h>\n+\n+#include <media/v4l2-device.h>\n+#include <media/v4l2-ioctl.h>\n+#include <media/v4l2-mem2mem.h>\n+\n+#include \"sun50i-di.h\"\n+\n+#define FLAG_SIZE (DEINTERLACE_MAX_WIDTH * DEINTERLACE_MAX_HEIGHT / 4)\n+\n+static u32 deinterlace_formats[] = {\n+\tV4L2_PIX_FMT_NV12,\n+\tV4L2_PIX_FMT_NV21,\n+\tV4L2_PIX_FMT_YUV420,\n+\tV4L2_PIX_FMT_NV16,\n+\tV4L2_PIX_FMT_NV61,\n+\tV4L2_PIX_FMT_YUV422P\n+};\n+\n+static inline u32 deinterlace_read(struct deinterlace_dev *dev, u32 reg)\n+{\n+\treturn readl(dev->base + reg);\n+}\n+\n+static inline void deinterlace_write(struct deinterlace_dev *dev,\n+\t\t\t\t     u32 reg, u32 value)\n+{\n+\twritel(value, dev->base + reg);\n+}\n+\n+static inline void deinterlace_set_bits(struct deinterlace_dev *dev,\n+\t\t\t\t\tu32 reg, u32 bits)\n+{\n+\tu32 val = readl(dev->base + reg);\n+\n+\tval |= bits;\n+\n+\twritel(val, dev->base + reg);\n+}\n+\n+static inline void deinterlace_clr_set_bits(struct deinterlace_dev *dev,\n+\t\t\t\t\t    u32 reg, u32 clr, u32 set)\n+{\n+\tu32 val = readl(dev->base + reg);\n+\n+\tval &= ~clr;\n+\tval |= set;\n+\n+\twritel(val, dev->base + reg);\n+}\n+\n+static void deinterlace_device_run(void *priv)\n+{\n+\tu32 width, height, reg, msk, pitch[3], offset[2], fmt;\n+\tdma_addr_t buf, prev, curr, next, addr[4][3];\n+\tstruct deinterlace_ctx *ctx = priv;\n+\tstruct deinterlace_dev *dev = ctx->dev;\n+\tstruct vb2_v4l2_buffer *src, *dst;\n+\tunsigned int val;\n+\tbool motion;\n+\n+\tsrc = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);\n+\tdst = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);\n+\n+\tv4l2_m2m_buf_copy_metadata(src, dst, true);\n+\n+\tfmt = ctx->src_fmt.pixelformat;\n+\n+\tdeinterlace_write(dev, DEINTERLACE_IN_FLAG_ADDR, ctx->flag1_buf_dma);\n+\tdeinterlace_write(dev, DEINTERLACE_OUT_FLAG_ADDR, ctx->flag2_buf_dma);\n+\tdeinterlace_write(dev, DEINTERLACE_FLAG_ADDRH, 0);\n+\tdeinterlace_write(dev, DEINTERLACE_FLAG_PITCH, 0x200);\n+\tif (device_iommu_mapped(dev->dev))\n+\t\tdeinterlace_set_bits(dev, DEINTERLACE_CTRL,\n+\t\t\t\t     DEINTERLACE_CTRL_IOMMU_EN);\n+\n+\twidth = ctx->src_fmt.width;\n+\theight = ctx->src_fmt.height;\n+\n+\treg = DEINTERLACE_SIZE_WIDTH(width);\n+\treg |= DEINTERLACE_SIZE_HEIGHT(height);\n+\tdeinterlace_write(dev, DEINTERLACE_SIZE, reg);\n+\n+\tswitch (fmt) {\n+\tcase V4L2_PIX_FMT_NV12:\n+\tcase V4L2_PIX_FMT_NV21:\n+\t\treg = DEINTERLACE_FORMAT_YUV420SP;\n+\t\tbreak;\n+\tcase V4L2_PIX_FMT_YUV420:\n+\t\treg = DEINTERLACE_FORMAT_YUV420P;\n+\t\tbreak;\n+\tcase V4L2_PIX_FMT_NV16:\n+\tcase V4L2_PIX_FMT_NV61:\n+\t\treg = DEINTERLACE_FORMAT_YUV422SP;\n+\t\tbreak;\n+\tcase V4L2_PIX_FMT_YUV422P:\n+\t\treg = DEINTERLACE_FORMAT_YUV422P;\n+\t\tbreak;\n+\t}\n+\tdeinterlace_write(dev, DEINTERLACE_FORMAT, reg);\n+\n+\tpitch[0] = ctx->src_fmt.bytesperline;\n+\tswitch (fmt) {\n+\tcase V4L2_PIX_FMT_YUV420:\n+\tcase V4L2_PIX_FMT_YUV422P:\n+\t\tpitch[1] = pitch[0] / 2;\n+\t\tpitch[2] = pitch[1];\n+\t\tbreak;\n+\tcase V4L2_PIX_FMT_NV12:\n+\tcase V4L2_PIX_FMT_NV21:\n+\tcase V4L2_PIX_FMT_NV16:\n+\tcase V4L2_PIX_FMT_NV61:\n+\t\tpitch[1] = pitch[0];\n+\t\tpitch[2] = 0;\n+\t\tbreak;\n+\t}\n+\n+\tdeinterlace_write(dev, DEINTERLACE_IN_PITCH0, pitch[0] * 2);\n+\tdeinterlace_write(dev, DEINTERLACE_IN_PITCH1, pitch[1] * 2);\n+\tdeinterlace_write(dev, DEINTERLACE_IN_PITCH2, pitch[2] * 2);\n+\tdeinterlace_write(dev, DEINTERLACE_OUT_PITCH0, pitch[0]);\n+\tdeinterlace_write(dev, DEINTERLACE_OUT_PITCH1, pitch[1]);\n+\tdeinterlace_write(dev, DEINTERLACE_OUT_PITCH2, pitch[2]);\n+\n+\toffset[0] = pitch[0] * height;\n+\tswitch (fmt) {\n+\tcase V4L2_PIX_FMT_YUV420:\n+\t\toffset[1] = offset[0] + offset[0] / 4;\n+\t\tbreak;\n+\tcase V4L2_PIX_FMT_YUV422P:\n+\t\toffset[1] = offset[0] + offset[0] / 2;\n+\t\tbreak;\n+\tdefault:\n+\t\toffset[1] = 0;\n+\t\tbreak;\n+\t}\n+\n+\tbuf = vb2_dma_contig_plane_dma_addr(&src->vb2_buf, 0);\n+\tnext = buf;\n+\tif (ctx->prev[0])\n+\t\tbuf = vb2_dma_contig_plane_dma_addr(&ctx->prev[0]->vb2_buf, 0);\n+\tcurr = buf;\n+\tif (ctx->prev[1])\n+\t\tbuf = vb2_dma_contig_plane_dma_addr(&ctx->prev[1]->vb2_buf, 0);\n+\tprev = buf;\n+\n+\tif (ctx->first_field == 0) {\n+\t\tif (ctx->field == 0) {\n+\t\t\taddr[0][0] = prev;\n+\t\t\taddr[0][1] = prev + offset[0];\n+\t\t\taddr[0][2] = prev + offset[1];\n+\t\t\taddr[1][0] = prev + pitch[0];\n+\t\t\taddr[1][1] = prev + offset[0] + pitch[1];\n+\t\t\taddr[1][2] = prev + offset[1] + pitch[2];\n+\t\t\taddr[2][0] = curr;\n+\t\t\taddr[2][1] = curr + offset[0];\n+\t\t\taddr[2][2] = curr + offset[1];\n+\t\t\taddr[3][0] = curr + pitch[0];\n+\t\t\taddr[3][1] = curr + offset[0] + pitch[1];\n+\t\t\taddr[3][2] = curr + offset[1] + pitch[2];\n+\t\t} else {\n+\t\t\taddr[0][0] = prev + pitch[0];\n+\t\t\taddr[0][1] = prev + offset[0] + pitch[1];\n+\t\t\taddr[0][2] = prev + offset[1] + pitch[2];\n+\t\t\taddr[1][0] = curr;\n+\t\t\taddr[1][1] = curr + offset[0];\n+\t\t\taddr[1][2] = curr + offset[1];\n+\t\t\taddr[2][0] = curr + pitch[0];\n+\t\t\taddr[2][1] = curr + offset[0] + pitch[1];\n+\t\t\taddr[2][2] = curr + offset[1] + pitch[2];\n+\t\t\taddr[3][0] = next;\n+\t\t\taddr[3][1] = next + offset[0];\n+\t\t\taddr[3][2] = next + offset[1];\n+\t\t}\n+\t} else {\n+\t\tif (ctx->field == 0) {\n+\t\t\taddr[0][0] = prev;\n+\t\t\taddr[0][1] = prev + offset[0];\n+\t\t\taddr[0][2] = prev + offset[1];\n+\t\t\taddr[1][0] = curr + pitch[0];\n+\t\t\taddr[1][1] = curr + offset[0] + pitch[1];\n+\t\t\taddr[1][2] = curr + offset[1] + pitch[2];\n+\t\t\taddr[2][0] = curr;\n+\t\t\taddr[2][1] = curr + offset[0];\n+\t\t\taddr[2][2] = curr + offset[1];\n+\t\t\taddr[3][0] = next + pitch[0];\n+\t\t\taddr[3][1] = next + offset[0] + pitch[1];\n+\t\t\taddr[3][2] = next + offset[1] + pitch[2];\n+\t\t} else {\n+\t\t\taddr[0][0] = prev + pitch[0];\n+\t\t\taddr[0][1] = prev + offset[0] + pitch[1];\n+\t\t\taddr[0][2] = prev + offset[1] + pitch[2];\n+\t\t\taddr[1][0] = prev;\n+\t\t\taddr[1][1] = prev + offset[0];\n+\t\t\taddr[1][2] = prev + offset[1];\n+\t\t\taddr[2][0] = curr + pitch[0];\n+\t\t\taddr[2][1] = curr + offset[0] + pitch[1];\n+\t\t\taddr[2][2] = curr + offset[1] + pitch[2];\n+\t\t\taddr[3][0] = curr;\n+\t\t\taddr[3][1] = curr + offset[0];\n+\t\t\taddr[3][2] = curr + offset[1];\n+\t\t}\n+\t}\n+\n+\tdeinterlace_write(dev, DEINTERLACE_IN0_ADDR0, addr[0][0]);\n+\tdeinterlace_write(dev, DEINTERLACE_IN0_ADDR1, addr[0][1]);\n+\tdeinterlace_write(dev, DEINTERLACE_IN0_ADDR2, addr[0][2]);\n+\n+\tdeinterlace_write(dev, DEINTERLACE_IN1_ADDR0, addr[1][0]);\n+\tdeinterlace_write(dev, DEINTERLACE_IN1_ADDR1, addr[1][1]);\n+\tdeinterlace_write(dev, DEINTERLACE_IN1_ADDR2, addr[1][2]);\n+\n+\tdeinterlace_write(dev, DEINTERLACE_IN2_ADDR0, addr[2][0]);\n+\tdeinterlace_write(dev, DEINTERLACE_IN2_ADDR1, addr[2][1]);\n+\tdeinterlace_write(dev, DEINTERLACE_IN2_ADDR2, addr[2][2]);\n+\n+\tdeinterlace_write(dev, DEINTERLACE_IN3_ADDR0, addr[3][0]);\n+\tdeinterlace_write(dev, DEINTERLACE_IN3_ADDR1, addr[3][1]);\n+\tdeinterlace_write(dev, DEINTERLACE_IN3_ADDR2, addr[3][2]);\n+\n+\tbuf = vb2_dma_contig_plane_dma_addr(&dst->vb2_buf, 0);\n+\tdeinterlace_write(dev, DEINTERLACE_OUT_ADDR0, buf);\n+\tdeinterlace_write(dev, DEINTERLACE_OUT_ADDR1, buf + offset[0]);\n+\tdeinterlace_write(dev, DEINTERLACE_OUT_ADDR2, buf + offset[1]);\n+\n+\tif (ctx->first_field == 0)\n+\t\tval = 4;\n+\telse\n+\t\tval = 5;\n+\n+\treg = DEINTERLACE_INTP_PARAM0_LUMA_CUR_FAC_MODE(val);\n+\treg |= DEINTERLACE_INTP_PARAM0_CHROMA_CUR_FAC_MODE(val);\n+\tmsk = DEINTERLACE_INTP_PARAM0_LUMA_CUR_FAC_MODE_MSK;\n+\tmsk |= DEINTERLACE_INTP_PARAM0_CHROMA_CUR_FAC_MODE_MSK;\n+\tdeinterlace_clr_set_bits(dev, DEINTERLACE_INTP_PARAM0, msk, reg);\n+\n+\treg = DEINTERLACE_POLAR_FIELD(ctx->field);\n+\tdeinterlace_write(dev, DEINTERLACE_POLAR, reg);\n+\n+\tmotion = ctx->prev[0] && ctx->prev[1];\n+\treg = DEINTERLACE_MODE_DEINT_LUMA;\n+\tif (motion)\n+\t\treg |= DEINTERLACE_MODE_MOTION_EN;\n+\treg |= DEINTERLACE_MODE_INTP_EN;\n+\treg |= DEINTERLACE_MODE_AUTO_UPD_MODE(ctx->first_field);\n+\treg |= DEINTERLACE_MODE_DEINT_CHROMA;\n+\tif (!motion)\n+\t\treg |= DEINTERLACE_MODE_FIELD_MODE;\n+\tdeinterlace_write(dev, DEINTERLACE_MODE, reg);\n+\n+\tdeinterlace_set_bits(dev, DEINTERLACE_INT_CTRL,\n+\t\t\t     DEINTERLACE_INT_EN);\n+\n+\tdeinterlace_set_bits(dev, DEINTERLACE_CTRL,\n+\t\t\t     DEINTERLACE_CTRL_START);\n+}\n+\n+static int deinterlace_job_ready(void *priv)\n+{\n+\tstruct deinterlace_ctx *ctx = priv;\n+\n+\treturn v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx) >= 1 &&\n+\t       v4l2_m2m_num_dst_bufs_ready(ctx->fh.m2m_ctx) >= 2;\n+}\n+\n+static void deinterlace_job_abort(void *priv)\n+{\n+\tstruct deinterlace_ctx *ctx = priv;\n+\n+\t/* Will cancel the transaction in the next interrupt handler */\n+\tctx->aborting = 1;\n+}\n+\n+static irqreturn_t deinterlace_irq(int irq, void *data)\n+{\n+\tstruct deinterlace_dev *dev = data;\n+\tstruct vb2_v4l2_buffer *src, *dst;\n+\tstruct deinterlace_ctx *ctx;\n+\tunsigned int val;\n+\n+\tctx = v4l2_m2m_get_curr_priv(dev->m2m_dev);\n+\tif (!ctx) {\n+\t\tv4l2_err(&dev->v4l2_dev,\n+\t\t\t \"Instance released before the end of transaction\\n\");\n+\t\treturn IRQ_NONE;\n+\t}\n+\n+\tval = deinterlace_read(dev, DEINTERLACE_STATUS);\n+\tif (!(val & DEINTERLACE_STATUS_FINISHED))\n+\t\treturn IRQ_NONE;\n+\n+\tdeinterlace_write(dev, DEINTERLACE_INT_CTRL, 0);\n+\tdeinterlace_set_bits(dev, DEINTERLACE_STATUS,\n+\t\t\t     DEINTERLACE_STATUS_FINISHED);\n+\tdeinterlace_clr_set_bits(dev, DEINTERLACE_CTRL,\n+\t\t\t\t DEINTERLACE_CTRL_START, 0);\n+\n+\tdst = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);\n+\tv4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE);\n+\n+\tif (ctx->field != ctx->first_field || ctx->aborting) {\n+\t\tctx->field = ctx->first_field;\n+\n+\t\tsrc = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx);\n+\t\tif (ctx->prev[1])\n+\t\t\tv4l2_m2m_buf_done(ctx->prev[1], VB2_BUF_STATE_DONE);\n+\t\tctx->prev[1] = ctx->prev[0];\n+\t\tctx->prev[0] = src;\n+\n+\t\tv4l2_m2m_job_finish(ctx->dev->m2m_dev, ctx->fh.m2m_ctx);\n+\t} else {\n+\t\tctx->field = !ctx->first_field;\n+\t\tdeinterlace_device_run(ctx);\n+\t}\n+\n+\treturn IRQ_HANDLED;\n+}\n+\n+static void deinterlace_init(struct deinterlace_dev *dev)\n+{\n+\tu32 reg;\n+\n+\tdeinterlace_write(dev, DEINTERLACE_OUT_PATH, 0);\n+\n+\treg = DEINTERLACE_MD_PARAM0_MIN_LUMA_TH(4);\n+\treg |= DEINTERLACE_MD_PARAM0_MAX_LUMA_TH(12);\n+\treg |= DEINTERLACE_MD_PARAM0_AVG_LUMA_SHIFT(6);\n+\treg |= DEINTERLACE_MD_PARAM0_TH_SHIFT(1);\n+\tdeinterlace_write(dev, DEINTERLACE_MD_PARAM0, reg);\n+\n+\treg = DEINTERLACE_MD_PARAM1_MOV_FAC_NONEDGE(2);\n+\tdeinterlace_write(dev, DEINTERLACE_MD_PARAM1, reg);\n+\n+\treg = DEINTERLACE_MD_PARAM2_CHROMA_SPATIAL_TH(128);\n+\treg |= DEINTERLACE_MD_PARAM2_CHROMA_DIFF_TH(5);\n+\treg |= DEINTERLACE_MD_PARAM2_PIX_STATIC_TH(3);\n+\tdeinterlace_write(dev, DEINTERLACE_MD_PARAM2, reg);\n+\n+\treg = DEINTERLACE_INTP_PARAM0_ANGLE_LIMIT(20);\n+\treg |= DEINTERLACE_INTP_PARAM0_ANGLE_CONST_TH(5);\n+\treg |= DEINTERLACE_INTP_PARAM0_LUMA_CUR_FAC_MODE(1);\n+\treg |= DEINTERLACE_INTP_PARAM0_CHROMA_CUR_FAC_MODE(1);\n+\tdeinterlace_write(dev, DEINTERLACE_INTP_PARAM0, reg);\n+\n+\treg = DEINTERLACE_MD_CH_PARAM_BLEND_MODE(1);\n+\treg |= DEINTERLACE_MD_CH_PARAM_FONT_PRO_EN;\n+\treg |= DEINTERLACE_MD_CH_PARAM_FONT_PRO_TH(48);\n+\treg |= DEINTERLACE_MD_CH_PARAM_FONT_PRO_FAC(4);\n+\tdeinterlace_write(dev, DEINTERLACE_MD_CH_PARAM, reg);\n+\n+\treg = DEINTERLACE_INTP_PARAM1_A(4);\n+\treg |= DEINTERLACE_INTP_PARAM1_EN;\n+\treg |= DEINTERLACE_INTP_PARAM1_C(10);\n+\treg |= DEINTERLACE_INTP_PARAM1_CMAX(64);\n+\treg |= DEINTERLACE_INTP_PARAM1_MAXRAT(2);\n+\tdeinterlace_write(dev, DEINTERLACE_INTP_PARAM1, reg);\n+\n+\t/* only 32-bit addresses are supported, so high bits are always 0 */\n+\tdeinterlace_write(dev, DEINTERLACE_IN0_ADDRH, 0);\n+\tdeinterlace_write(dev, DEINTERLACE_IN1_ADDRH, 0);\n+\tdeinterlace_write(dev, DEINTERLACE_IN2_ADDRH, 0);\n+\tdeinterlace_write(dev, DEINTERLACE_IN3_ADDRH, 0);\n+\tdeinterlace_write(dev, DEINTERLACE_OUT_ADDRH, 0);\n+}\n+\n+static inline struct deinterlace_ctx *deinterlace_file2ctx(struct file *file)\n+{\n+\treturn container_of(file->private_data, struct deinterlace_ctx, fh);\n+}\n+\n+static bool deinterlace_check_format(u32 pixelformat)\n+{\n+\tunsigned int i;\n+\n+\tfor (i = 0; i < ARRAY_SIZE(deinterlace_formats); i++)\n+\t\tif (deinterlace_formats[i] == pixelformat)\n+\t\t\treturn true;\n+\n+\treturn false;\n+}\n+\n+static void deinterlace_prepare_format(struct v4l2_pix_format *pix_fmt)\n+{\n+\tunsigned int bytesperline = pix_fmt->bytesperline;\n+\tunsigned int height = pix_fmt->height;\n+\tunsigned int width = pix_fmt->width;\n+\tunsigned int sizeimage;\n+\n+\twidth = clamp(width, DEINTERLACE_MIN_WIDTH,\n+\t\t      DEINTERLACE_MAX_WIDTH);\n+\theight = clamp(height, DEINTERLACE_MIN_HEIGHT,\n+\t\t       DEINTERLACE_MAX_HEIGHT);\n+\n+\t/* try to respect userspace wishes about pitch */\n+\tbytesperline = ALIGN(bytesperline, 2);\n+\tif (bytesperline < ALIGN(width, 2))\n+\t\tbytesperline = ALIGN(width, 2);\n+\n+\t/* luma */\n+\tsizeimage = bytesperline * height;\n+\t/* chroma */\n+\tswitch (pix_fmt->pixelformat) {\n+\tcase V4L2_PIX_FMT_NV12:\n+\tcase V4L2_PIX_FMT_NV21:\n+\tcase V4L2_PIX_FMT_YUV420:\n+\t\tsizeimage += bytesperline * height / 2;\n+\t\tbreak;\n+\tcase V4L2_PIX_FMT_NV16:\n+\tcase V4L2_PIX_FMT_NV61:\n+\tcase V4L2_PIX_FMT_YUV422P:\n+\t\tsizeimage += bytesperline * height;\n+\t\tbreak;\n+\t}\n+\n+\tif (pix_fmt->sizeimage < sizeimage)\n+\t\tpix_fmt->sizeimage = sizeimage;\n+\n+\tpix_fmt->width = width;\n+\tpix_fmt->height = height;\n+\tpix_fmt->bytesperline = bytesperline;\n+}\n+\n+static int deinterlace_querycap(struct file *file, void *priv,\n+\t\t\t\tstruct v4l2_capability *cap)\n+{\n+\tstrscpy(cap->driver, DEINTERLACE_NAME, sizeof(cap->driver));\n+\tstrscpy(cap->card, DEINTERLACE_NAME, sizeof(cap->card));\n+\tsnprintf(cap->bus_info, sizeof(cap->bus_info),\n+\t\t \"platform:%s\", DEINTERLACE_NAME);\n+\n+\treturn 0;\n+}\n+\n+static int deinterlace_enum_fmt(struct file *file, void *priv,\n+\t\t\t\tstruct v4l2_fmtdesc *f)\n+{\n+\tif (f->index < ARRAY_SIZE(deinterlace_formats)) {\n+\t\tf->pixelformat = deinterlace_formats[f->index];\n+\n+\t\treturn 0;\n+\t}\n+\n+\treturn -EINVAL;\n+}\n+\n+static int deinterlace_enum_framesizes(struct file *file, void *priv,\n+\t\t\t\t       struct v4l2_frmsizeenum *fsize)\n+{\n+\tif (fsize->index != 0)\n+\t\treturn -EINVAL;\n+\n+\tif (!deinterlace_check_format(fsize->pixel_format))\n+\t\treturn -EINVAL;\n+\n+\tfsize->type = V4L2_FRMSIZE_TYPE_STEPWISE;\n+\tfsize->stepwise.min_width = DEINTERLACE_MIN_WIDTH;\n+\tfsize->stepwise.min_height = DEINTERLACE_MIN_HEIGHT;\n+\tfsize->stepwise.max_width = DEINTERLACE_MAX_WIDTH;\n+\tfsize->stepwise.max_height = DEINTERLACE_MAX_HEIGHT;\n+\tfsize->stepwise.step_width = 2;\n+\n+\tswitch (fsize->pixel_format) {\n+\tcase V4L2_PIX_FMT_NV12:\n+\tcase V4L2_PIX_FMT_NV21:\n+\tcase V4L2_PIX_FMT_YUV420:\n+\t\tfsize->stepwise.step_height = 2;\n+\t\tbreak;\n+\tcase V4L2_PIX_FMT_NV16:\n+\tcase V4L2_PIX_FMT_NV61:\n+\tcase V4L2_PIX_FMT_YUV422P:\n+\t\tfsize->stepwise.step_height = 1;\n+\t\tbreak;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int deinterlace_set_cap_format(struct deinterlace_ctx *ctx,\n+\t\t\t\t      struct v4l2_pix_format *f)\n+{\n+\tif (!deinterlace_check_format(ctx->src_fmt.pixelformat))\n+\t\treturn -EINVAL;\n+\n+\tf->pixelformat = ctx->src_fmt.pixelformat;\n+\tf->field = V4L2_FIELD_NONE;\n+\tf->width = ctx->src_fmt.width;\n+\tf->height = ctx->src_fmt.height;\n+\n+\tdeinterlace_prepare_format(f);\n+\n+\treturn 0;\n+}\n+\n+static int deinterlace_g_fmt_vid_cap(struct file *file, void *priv,\n+\t\t\t\t     struct v4l2_format *f)\n+{\n+\tstruct deinterlace_ctx *ctx = deinterlace_file2ctx(file);\n+\n+\tf->fmt.pix = ctx->dst_fmt;\n+\n+\treturn 0;\n+}\n+\n+static int deinterlace_g_fmt_vid_out(struct file *file, void *priv,\n+\t\t\t\t     struct v4l2_format *f)\n+{\n+\tstruct deinterlace_ctx *ctx = deinterlace_file2ctx(file);\n+\n+\tf->fmt.pix = ctx->src_fmt;\n+\n+\treturn 0;\n+}\n+\n+static int deinterlace_try_fmt_vid_cap(struct file *file, void *priv,\n+\t\t\t\t       struct v4l2_format *f)\n+{\n+\tstruct deinterlace_ctx *ctx = deinterlace_file2ctx(file);\n+\n+\treturn deinterlace_set_cap_format(ctx, &f->fmt.pix);\n+}\n+\n+static int deinterlace_try_fmt_vid_out(struct file *file, void *priv,\n+\t\t\t\t       struct v4l2_format *f)\n+{\n+\tif (!deinterlace_check_format(f->fmt.pix.pixelformat))\n+\t\tf->fmt.pix.pixelformat = deinterlace_formats[0];\n+\n+\tif (f->fmt.pix.field != V4L2_FIELD_INTERLACED_TB &&\n+\t    f->fmt.pix.field != V4L2_FIELD_INTERLACED_BT &&\n+\t    f->fmt.pix.field != V4L2_FIELD_INTERLACED)\n+\t\tf->fmt.pix.field = V4L2_FIELD_INTERLACED;\n+\n+\tdeinterlace_prepare_format(&f->fmt.pix);\n+\n+\treturn 0;\n+}\n+\n+static int deinterlace_s_fmt_vid_cap(struct file *file, void *priv,\n+\t\t\t\t     struct v4l2_format *f)\n+{\n+\tstruct deinterlace_ctx *ctx = deinterlace_file2ctx(file);\n+\tstruct vb2_queue *vq;\n+\tint ret;\n+\n+\tret = deinterlace_try_fmt_vid_cap(file, priv, f);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tvq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type);\n+\tif (vb2_is_busy(vq))\n+\t\treturn -EBUSY;\n+\n+\tctx->dst_fmt = f->fmt.pix;\n+\n+\treturn 0;\n+}\n+\n+static int deinterlace_s_fmt_vid_out(struct file *file, void *priv,\n+\t\t\t\t     struct v4l2_format *f)\n+{\n+\tstruct deinterlace_ctx *ctx = deinterlace_file2ctx(file);\n+\tstruct vb2_queue *vq;\n+\tint ret;\n+\n+\tret = deinterlace_try_fmt_vid_out(file, priv, f);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tvq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type);\n+\tif (vb2_is_busy(vq))\n+\t\treturn -EBUSY;\n+\n+\t/*\n+\t * Capture queue has to be also checked, because format and size\n+\t * depends on output format and size.\n+\t */\n+\tvq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE);\n+\tif (vb2_is_busy(vq))\n+\t\treturn -EBUSY;\n+\n+\tctx->src_fmt = f->fmt.pix;\n+\n+\t/* Propagate colorspace information to capture. */\n+\tctx->dst_fmt.colorspace = f->fmt.pix.colorspace;\n+\tctx->dst_fmt.xfer_func = f->fmt.pix.xfer_func;\n+\tctx->dst_fmt.ycbcr_enc = f->fmt.pix.ycbcr_enc;\n+\tctx->dst_fmt.quantization = f->fmt.pix.quantization;\n+\n+\treturn deinterlace_set_cap_format(ctx, &ctx->dst_fmt);\n+}\n+\n+static const struct v4l2_ioctl_ops deinterlace_ioctl_ops = {\n+\t.vidioc_querycap\t\t= deinterlace_querycap,\n+\n+\t.vidioc_enum_framesizes\t\t= deinterlace_enum_framesizes,\n+\n+\t.vidioc_enum_fmt_vid_cap\t= deinterlace_enum_fmt,\n+\t.vidioc_g_fmt_vid_cap\t\t= deinterlace_g_fmt_vid_cap,\n+\t.vidioc_try_fmt_vid_cap\t\t= deinterlace_try_fmt_vid_cap,\n+\t.vidioc_s_fmt_vid_cap\t\t= deinterlace_s_fmt_vid_cap,\n+\n+\t.vidioc_enum_fmt_vid_out\t= deinterlace_enum_fmt,\n+\t.vidioc_g_fmt_vid_out\t\t= deinterlace_g_fmt_vid_out,\n+\t.vidioc_try_fmt_vid_out\t\t= deinterlace_try_fmt_vid_out,\n+\t.vidioc_s_fmt_vid_out\t\t= deinterlace_s_fmt_vid_out,\n+\n+\t.vidioc_reqbufs\t\t\t= v4l2_m2m_ioctl_reqbufs,\n+\t.vidioc_querybuf\t\t= v4l2_m2m_ioctl_querybuf,\n+\t.vidioc_qbuf\t\t\t= v4l2_m2m_ioctl_qbuf,\n+\t.vidioc_dqbuf\t\t\t= v4l2_m2m_ioctl_dqbuf,\n+\t.vidioc_prepare_buf\t\t= v4l2_m2m_ioctl_prepare_buf,\n+\t.vidioc_create_bufs\t\t= v4l2_m2m_ioctl_create_bufs,\n+\t.vidioc_expbuf\t\t\t= v4l2_m2m_ioctl_expbuf,\n+\n+\t.vidioc_streamon\t\t= v4l2_m2m_ioctl_streamon,\n+\t.vidioc_streamoff\t\t= v4l2_m2m_ioctl_streamoff,\n+};\n+\n+static int deinterlace_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers,\n+\t\t\t\t   unsigned int *nplanes, unsigned int sizes[],\n+\t\t\t\t   struct device *alloc_devs[])\n+{\n+\tstruct deinterlace_ctx *ctx = vb2_get_drv_priv(vq);\n+\tstruct v4l2_pix_format *pix_fmt;\n+\n+\tif (V4L2_TYPE_IS_OUTPUT(vq->type))\n+\t\tpix_fmt = &ctx->src_fmt;\n+\telse\n+\t\tpix_fmt = &ctx->dst_fmt;\n+\n+\tif (*nplanes) {\n+\t\tif (sizes[0] < pix_fmt->sizeimage)\n+\t\t\treturn -EINVAL;\n+\t} else {\n+\t\tsizes[0] = pix_fmt->sizeimage;\n+\t\t*nplanes = 1;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int deinterlace_buf_prepare(struct vb2_buffer *vb)\n+{\n+\tstruct vb2_queue *vq = vb->vb2_queue;\n+\tstruct deinterlace_ctx *ctx = vb2_get_drv_priv(vq);\n+\tstruct v4l2_pix_format *pix_fmt;\n+\n+\tif (V4L2_TYPE_IS_OUTPUT(vq->type))\n+\t\tpix_fmt = &ctx->src_fmt;\n+\telse\n+\t\tpix_fmt = &ctx->dst_fmt;\n+\n+\tif (vb2_plane_size(vb, 0) < pix_fmt->sizeimage)\n+\t\treturn -EINVAL;\n+\n+\tvb2_set_plane_payload(vb, 0, pix_fmt->sizeimage);\n+\n+\treturn 0;\n+}\n+\n+static void deinterlace_buf_queue(struct vb2_buffer *vb)\n+{\n+\tstruct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);\n+\tstruct deinterlace_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);\n+\n+\tv4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf);\n+}\n+\n+static void deinterlace_queue_cleanup(struct vb2_queue *vq, u32 state)\n+{\n+\tstruct deinterlace_ctx *ctx = vb2_get_drv_priv(vq);\n+\tstruct vb2_v4l2_buffer *vbuf;\n+\n+\tdo {\n+\t\tif (V4L2_TYPE_IS_OUTPUT(vq->type))\n+\t\t\tvbuf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx);\n+\t\telse\n+\t\t\tvbuf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);\n+\n+\t\tif (vbuf)\n+\t\t\tv4l2_m2m_buf_done(vbuf, state);\n+\t} while (vbuf);\n+\n+\tif (V4L2_TYPE_IS_OUTPUT(vq->type)) {\n+\t\tif (ctx->prev[0])\n+\t\t\tv4l2_m2m_buf_done(ctx->prev[0], state);\n+\t\tif (ctx->prev[1])\n+\t\t\tv4l2_m2m_buf_done(ctx->prev[1], state);\n+\t}\n+}\n+\n+static int deinterlace_start_streaming(struct vb2_queue *vq, unsigned int count)\n+{\n+\tstruct deinterlace_ctx *ctx = vb2_get_drv_priv(vq);\n+\tstruct device *dev = ctx->dev->dev;\n+\tint ret;\n+\n+\tif (V4L2_TYPE_IS_OUTPUT(vq->type)) {\n+\t\tret = pm_runtime_get_sync(dev);\n+\t\tif (ret < 0) {\n+\t\t\tdev_err(dev, \"Failed to enable module\\n\");\n+\n+\t\t\tgoto err_runtime_get;\n+\t\t}\n+\n+\t\tctx->first_field =\n+\t\t\tctx->src_fmt.field == V4L2_FIELD_INTERLACED_BT;\n+\t\tctx->field = ctx->first_field;\n+\n+\t\tctx->prev[0] = NULL;\n+\t\tctx->prev[1] = NULL;\n+\t\tctx->aborting = 0;\n+\n+\t\tctx->flag1_buf = dma_alloc_coherent(dev, FLAG_SIZE,\n+\t\t\t\t\t\t    &ctx->flag1_buf_dma,\n+\t\t\t\t\t\t    GFP_KERNEL);\n+\t\tif (!ctx->flag1_buf) {\n+\t\t\tret = -ENOMEM;\n+\n+\t\t\tgoto err_no_mem1;\n+\t\t}\n+\n+\t\tctx->flag2_buf = dma_alloc_coherent(dev, FLAG_SIZE,\n+\t\t\t\t\t\t    &ctx->flag2_buf_dma,\n+\t\t\t\t\t\t    GFP_KERNEL);\n+\t\tif (!ctx->flag2_buf) {\n+\t\t\tret = -ENOMEM;\n+\n+\t\t\tgoto err_no_mem2;\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+\n+err_no_mem2:\n+\tdma_free_coherent(dev, FLAG_SIZE, ctx->flag1_buf,\n+\t\t\t  ctx->flag1_buf_dma);\n+err_no_mem1:\n+\tpm_runtime_put(dev);\n+err_runtime_get:\n+\tdeinterlace_queue_cleanup(vq, VB2_BUF_STATE_QUEUED);\n+\n+\treturn ret;\n+}\n+\n+static void deinterlace_stop_streaming(struct vb2_queue *vq)\n+{\n+\tstruct deinterlace_ctx *ctx = vb2_get_drv_priv(vq);\n+\n+\tif (V4L2_TYPE_IS_OUTPUT(vq->type)) {\n+\t\tstruct device *dev = ctx->dev->dev;\n+\n+\t\tdma_free_coherent(dev, FLAG_SIZE, ctx->flag1_buf,\n+\t\t\t\t  ctx->flag1_buf_dma);\n+\t\tdma_free_coherent(dev, FLAG_SIZE, ctx->flag2_buf,\n+\t\t\t\t  ctx->flag2_buf_dma);\n+\n+\t\tpm_runtime_put(dev);\n+\t}\n+\n+\tdeinterlace_queue_cleanup(vq, VB2_BUF_STATE_ERROR);\n+}\n+\n+static const struct vb2_ops deinterlace_qops = {\n+\t.queue_setup\t\t= deinterlace_queue_setup,\n+\t.buf_prepare\t\t= deinterlace_buf_prepare,\n+\t.buf_queue\t\t= deinterlace_buf_queue,\n+\t.start_streaming\t= deinterlace_start_streaming,\n+\t.stop_streaming\t\t= deinterlace_stop_streaming,\n+\t.wait_prepare\t\t= vb2_ops_wait_prepare,\n+\t.wait_finish\t\t= vb2_ops_wait_finish,\n+};\n+\n+static int deinterlace_queue_init(void *priv, struct vb2_queue *src_vq,\n+\t\t\t\t  struct vb2_queue *dst_vq)\n+{\n+\tstruct deinterlace_ctx *ctx = priv;\n+\tint ret;\n+\n+\tsrc_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;\n+\tsrc_vq->io_modes = VB2_MMAP | VB2_DMABUF;\n+\tsrc_vq->drv_priv = ctx;\n+\tsrc_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);\n+\tsrc_vq->min_buffers_needed = 1;\n+\tsrc_vq->ops = &deinterlace_qops;\n+\tsrc_vq->mem_ops = &vb2_dma_contig_memops;\n+\tsrc_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;\n+\tsrc_vq->lock = &ctx->dev->dev_mutex;\n+\tsrc_vq->dev = ctx->dev->dev;\n+\n+\tret = vb2_queue_init(src_vq);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tdst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;\n+\tdst_vq->io_modes = VB2_MMAP | VB2_DMABUF;\n+\tdst_vq->drv_priv = ctx;\n+\tdst_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);\n+\tdst_vq->min_buffers_needed = 2;\n+\tdst_vq->ops = &deinterlace_qops;\n+\tdst_vq->mem_ops = &vb2_dma_contig_memops;\n+\tdst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;\n+\tdst_vq->lock = &ctx->dev->dev_mutex;\n+\tdst_vq->dev = ctx->dev->dev;\n+\n+\tret = vb2_queue_init(dst_vq);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\treturn 0;\n+}\n+\n+static int deinterlace_open(struct file *file)\n+{\n+\tstruct deinterlace_dev *dev = video_drvdata(file);\n+\tstruct deinterlace_ctx *ctx = NULL;\n+\tint ret;\n+\n+\tif (mutex_lock_interruptible(&dev->dev_mutex))\n+\t\treturn -ERESTARTSYS;\n+\n+\tctx = kzalloc(sizeof(*ctx), GFP_KERNEL);\n+\tif (!ctx) {\n+\t\tmutex_unlock(&dev->dev_mutex);\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\t/* default output format */\n+\tctx->src_fmt.pixelformat = deinterlace_formats[0];\n+\tctx->src_fmt.field = V4L2_FIELD_INTERLACED;\n+\tctx->src_fmt.width = 640;\n+\tctx->src_fmt.height = 480;\n+\tdeinterlace_prepare_format(&ctx->src_fmt);\n+\n+\t/* default capture format */\n+\tctx->dst_fmt.pixelformat = deinterlace_formats[0];\n+\tctx->dst_fmt.field = V4L2_FIELD_NONE;\n+\tctx->dst_fmt.width = 640;\n+\tctx->dst_fmt.height = 480;\n+\tdeinterlace_prepare_format(&ctx->dst_fmt);\n+\n+\tv4l2_fh_init(&ctx->fh, video_devdata(file));\n+\tfile->private_data = &ctx->fh;\n+\tctx->dev = dev;\n+\n+\tctx->fh.m2m_ctx = v4l2_m2m_ctx_init(dev->m2m_dev, ctx,\n+\t\t\t\t\t    &deinterlace_queue_init);\n+\tif (IS_ERR(ctx->fh.m2m_ctx)) {\n+\t\tret = PTR_ERR(ctx->fh.m2m_ctx);\n+\t\tgoto err_free;\n+\t}\n+\n+\tv4l2_fh_add(&ctx->fh);\n+\n+\tmutex_unlock(&dev->dev_mutex);\n+\n+\treturn 0;\n+\n+err_free:\n+\tkfree(ctx);\n+\tmutex_unlock(&dev->dev_mutex);\n+\n+\treturn ret;\n+}\n+\n+static int deinterlace_release(struct file *file)\n+{\n+\tstruct deinterlace_dev *dev = video_drvdata(file);\n+\tstruct deinterlace_ctx *ctx = container_of(file->private_data,\n+\t\t\t\t\t\t   struct deinterlace_ctx, fh);\n+\n+\tmutex_lock(&dev->dev_mutex);\n+\n+\tv4l2_fh_del(&ctx->fh);\n+\tv4l2_fh_exit(&ctx->fh);\n+\tv4l2_m2m_ctx_release(ctx->fh.m2m_ctx);\n+\n+\tkfree(ctx);\n+\n+\tmutex_unlock(&dev->dev_mutex);\n+\n+\treturn 0;\n+}\n+\n+static const struct v4l2_file_operations deinterlace_fops = {\n+\t.owner\t\t= THIS_MODULE,\n+\t.open\t\t= deinterlace_open,\n+\t.release\t= deinterlace_release,\n+\t.poll\t\t= v4l2_m2m_fop_poll,\n+\t.unlocked_ioctl\t= video_ioctl2,\n+\t.mmap\t\t= v4l2_m2m_fop_mmap,\n+};\n+\n+static const struct video_device deinterlace_video_device = {\n+\t.name\t\t= DEINTERLACE_NAME,\n+\t.vfl_dir\t= VFL_DIR_M2M,\n+\t.fops\t\t= &deinterlace_fops,\n+\t.ioctl_ops\t= &deinterlace_ioctl_ops,\n+\t.minor\t\t= -1,\n+\t.release\t= video_device_release_empty,\n+\t.device_caps\t= V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING,\n+};\n+\n+static const struct v4l2_m2m_ops deinterlace_m2m_ops = {\n+\t.device_run\t= deinterlace_device_run,\n+\t.job_ready\t= deinterlace_job_ready,\n+\t.job_abort\t= deinterlace_job_abort,\n+};\n+\n+static int deinterlace_probe(struct platform_device *pdev)\n+{\n+\tstruct deinterlace_dev *dev;\n+\tstruct video_device *vfd;\n+\tstruct resource *res;\n+\tint irq, ret;\n+\n+\tdev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);\n+\tif (!dev)\n+\t\treturn -ENOMEM;\n+\n+\tdev->vfd = deinterlace_video_device;\n+\tdev->dev = &pdev->dev;\n+\n+\tirq = platform_get_irq(pdev, 0);\n+\tif (irq <= 0)\n+\t\treturn irq;\n+\n+\tret = devm_request_irq(dev->dev, irq, deinterlace_irq,\n+\t\t\t       0, dev_name(dev->dev), dev);\n+\tif (ret) {\n+\t\tdev_err(dev->dev, \"Failed to request IRQ\\n\");\n+\n+\t\treturn ret;\n+\t}\n+\n+\tret = of_dma_configure(dev->dev, dev->dev->of_node, true);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tres = platform_get_resource(pdev, IORESOURCE_MEM, 0);\n+\tdev->base = devm_ioremap_resource(&pdev->dev, res);\n+\tif (IS_ERR(dev->base))\n+\t\treturn PTR_ERR(dev->base);\n+\n+\tdev->bus_clk = devm_clk_get(dev->dev, \"bus\");\n+\tif (IS_ERR(dev->bus_clk)) {\n+\t\tdev_err(dev->dev, \"Failed to get bus clock\\n\");\n+\n+\t\treturn PTR_ERR(dev->bus_clk);\n+\t}\n+\n+\tdev->mod_clk = devm_clk_get(dev->dev, \"mod\");\n+\tif (IS_ERR(dev->mod_clk)) {\n+\t\tdev_err(dev->dev, \"Failed to get mod clock\\n\");\n+\n+\t\treturn PTR_ERR(dev->mod_clk);\n+\t}\n+\n+\tdev->ram_clk = devm_clk_get(dev->dev, \"ram\");\n+\tif (IS_ERR(dev->ram_clk)) {\n+\t\tdev_err(dev->dev, \"Failed to get ram clock\\n\");\n+\n+\t\treturn PTR_ERR(dev->ram_clk);\n+\t}\n+\n+\tdev->rstc = devm_reset_control_get(dev->dev, NULL);\n+\tif (IS_ERR(dev->rstc)) {\n+\t\tdev_err(dev->dev, \"Failed to get reset control\\n\");\n+\n+\t\treturn PTR_ERR(dev->rstc);\n+\t}\n+\n+\tmutex_init(&dev->dev_mutex);\n+\n+\tret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev);\n+\tif (ret) {\n+\t\tdev_err(dev->dev, \"Failed to register V4L2 device\\n\");\n+\n+\t\treturn ret;\n+\t}\n+\n+\tvfd = &dev->vfd;\n+\tvfd->lock = &dev->dev_mutex;\n+\tvfd->v4l2_dev = &dev->v4l2_dev;\n+\n+\tsnprintf(vfd->name, sizeof(vfd->name), \"%s\",\n+\t\t deinterlace_video_device.name);\n+\tvideo_set_drvdata(vfd, dev);\n+\n+\tret = video_register_device(vfd, VFL_TYPE_VIDEO, 0);\n+\tif (ret) {\n+\t\tv4l2_err(&dev->v4l2_dev, \"Failed to register video device\\n\");\n+\n+\t\tgoto err_v4l2;\n+\t}\n+\n+\tv4l2_info(&dev->v4l2_dev,\n+\t\t  \"Device registered as /dev/video%d\\n\", vfd->num);\n+\n+\tdev->m2m_dev = v4l2_m2m_init(&deinterlace_m2m_ops);\n+\tif (IS_ERR(dev->m2m_dev)) {\n+\t\tv4l2_err(&dev->v4l2_dev,\n+\t\t\t \"Failed to initialize V4L2 M2M device\\n\");\n+\t\tret = PTR_ERR(dev->m2m_dev);\n+\n+\t\tgoto err_video;\n+\t}\n+\n+\tplatform_set_drvdata(pdev, dev);\n+\n+\tpm_runtime_enable(dev->dev);\n+\n+\treturn 0;\n+\n+err_video:\n+\tvideo_unregister_device(&dev->vfd);\n+err_v4l2:\n+\tv4l2_device_unregister(&dev->v4l2_dev);\n+\n+\treturn ret;\n+}\n+\n+static int deinterlace_remove(struct platform_device *pdev)\n+{\n+\tstruct deinterlace_dev *dev = platform_get_drvdata(pdev);\n+\n+\tv4l2_m2m_release(dev->m2m_dev);\n+\tvideo_unregister_device(&dev->vfd);\n+\tv4l2_device_unregister(&dev->v4l2_dev);\n+\n+\tpm_runtime_force_suspend(&pdev->dev);\n+\n+\treturn 0;\n+}\n+\n+static int deinterlace_runtime_resume(struct device *device)\n+{\n+\tstruct deinterlace_dev *dev = dev_get_drvdata(device);\n+\tint ret;\n+\n+\tret = clk_prepare_enable(dev->bus_clk);\n+\tif (ret) {\n+\t\tdev_err(dev->dev, \"Failed to enable bus clock\\n\");\n+\n+\t\treturn ret;\n+\t}\n+\n+\tret = clk_prepare_enable(dev->mod_clk);\n+\tif (ret) {\n+\t\tdev_err(dev->dev, \"Failed to enable mod clock\\n\");\n+\n+\t\tgoto err_bus_clk;\n+\t}\n+\n+\tret = clk_prepare_enable(dev->ram_clk);\n+\tif (ret) {\n+\t\tdev_err(dev->dev, \"Failed to enable ram clock\\n\");\n+\n+\t\tgoto err_mod_clk;\n+\t}\n+\n+\tret = reset_control_deassert(dev->rstc);\n+\tif (ret) {\n+\t\tdev_err(dev->dev, \"Failed to apply reset\\n\");\n+\n+\t\tgoto err_ram_clk;\n+\t}\n+\n+\tdeinterlace_init(dev);\n+\n+\treturn 0;\n+\n+err_ram_clk:\n+\tclk_disable_unprepare(dev->ram_clk);\n+err_mod_clk:\n+\tclk_disable_unprepare(dev->mod_clk);\n+err_bus_clk:\n+\tclk_disable_unprepare(dev->bus_clk);\n+\n+\treturn ret;\n+}\n+\n+static int deinterlace_runtime_suspend(struct device *device)\n+{\n+\tstruct deinterlace_dev *dev = dev_get_drvdata(device);\n+\n+\treset_control_assert(dev->rstc);\n+\n+\tclk_disable_unprepare(dev->ram_clk);\n+\tclk_disable_unprepare(dev->mod_clk);\n+\tclk_disable_unprepare(dev->bus_clk);\n+\n+\treturn 0;\n+}\n+\n+static const struct of_device_id deinterlace_dt_match[] = {\n+\t{ .compatible = \"allwinner,sun50i-h6-deinterlace\" },\n+\t{ /* sentinel */ }\n+};\n+MODULE_DEVICE_TABLE(of, deinterlace_dt_match);\n+\n+static const struct dev_pm_ops deinterlace_pm_ops = {\n+\t.runtime_resume\t\t= deinterlace_runtime_resume,\n+\t.runtime_suspend\t= deinterlace_runtime_suspend,\n+};\n+\n+static struct platform_driver deinterlace_driver = {\n+\t.probe\t\t= deinterlace_probe,\n+\t.remove\t\t= deinterlace_remove,\n+\t.driver\t\t= {\n+\t\t.name\t\t= DEINTERLACE_NAME,\n+\t\t.of_match_table\t= deinterlace_dt_match,\n+\t\t.pm\t\t= &deinterlace_pm_ops,\n+\t},\n+};\n+module_platform_driver(deinterlace_driver);\n+\n+MODULE_LICENSE(\"GPL v2\");\n+MODULE_AUTHOR(\"Jernej Skrabec <jernej.skrabec@siol.net>\");\n+MODULE_DESCRIPTION(\"Allwinner Deinterlace driver\");\n--- /dev/null\n+++ b/drivers/media/platform/sunxi/sun50i-di/sun50i-di.h\n@@ -0,0 +1,172 @@\n+/* SPDX-License-Identifier: GPL-2.0 */\n+/*\n+ * Allwinner Deinterlace driver\n+ *\n+ * Copyright (C) 2020 Jernej Skrabec <jernej.skrabec@siol.net>\n+ */\n+\n+#ifndef _SUN8I_DEINTERLACE_H_\n+#define _SUN8I_DEINTERLACE_H_\n+\n+#include <media/v4l2-device.h>\n+#include <media/v4l2-mem2mem.h>\n+#include <media/videobuf2-v4l2.h>\n+#include <media/videobuf2-dma-contig.h>\n+\n+#include <linux/platform_device.h>\n+\n+#define DEINTERLACE_NAME\t\t\"sun50i-di\"\n+\n+#define DEINTERLACE_CTRL\t\t\t0x00\n+#define DEINTERLACE_CTRL_START\t\t\t\tBIT(0)\n+#define DEINTERLACE_CTRL_IOMMU_EN\t\t\tBIT(16)\n+#define DEINTERLACE_CTRL_RESET\t\t\t\tBIT(31)\n+\n+#define DEINTERLACE_INT_CTRL\t\t\t0x04\n+#define DEINTERLACE_INT_EN\t\t\t\tBIT(0)\n+\n+#define DEINTERLACE_STATUS\t\t\t0x08\n+#define DEINTERLACE_STATUS_FINISHED\t\t\tBIT(0)\n+#define DEINTERLACE_STATUS_BUSY\t\t\t\tBIT(8)\n+\n+#define DEINTERLACE_SIZE\t\t\t0x10\n+#define DEINTERLACE_SIZE_WIDTH(w) \\\n+\t(((w) - 1) & 0x7ff)\n+#define DEINTERLACE_SIZE_HEIGHT(h) \\\n+\t((((h) - 1) & 0x7ff) << 16)\n+\n+#define DEINTERLACE_FORMAT\t\t\t0x14\n+#define DEINTERLACE_FORMAT_YUV420P\t\t\t0\n+#define DEINTERLACE_FORMAT_YUV420SP\t\t\t1\n+#define DEINTERLACE_FORMAT_YUV422P\t\t\t2\n+#define DEINTERLACE_FORMAT_YUV422SP\t\t\t3\n+\n+#define DEINTERLACE_POLAR\t\t\t0x18\n+#define DEINTERLACE_POLAR_FIELD(x)\t\t\t((x) & 1)\n+\n+/* all pitch registers accept 16-bit values */\n+#define DEINTERLACE_IN_PITCH0\t\t\t0x20\n+#define DEINTERLACE_IN_PITCH1\t\t\t0x24\n+#define DEINTERLACE_IN_PITCH2\t\t\t0x28\n+#define DEINTERLACE_OUT_PITCH0\t\t\t0x30\n+#define DEINTERLACE_OUT_PITCH1\t\t\t0x34\n+#define DEINTERLACE_OUT_PITCH2\t\t\t0x38\n+#define DEINTERLACE_FLAG_PITCH\t\t\t0x40\n+#define DEINTERLACE_IN0_ADDR0\t\t\t0x50\n+#define DEINTERLACE_IN0_ADDR1\t\t\t0x54\n+#define DEINTERLACE_IN0_ADDR2\t\t\t0x58\n+#define DEINTERLACE_IN0_ADDRH\t\t\t0x5c\n+#define DEINTERLACE_IN1_ADDR0\t\t\t0x60\n+#define DEINTERLACE_IN1_ADDR1\t\t\t0x64\n+#define DEINTERLACE_IN1_ADDR2\t\t\t0x68\n+#define DEINTERLACE_IN1_ADDRH\t\t\t0x6c\n+#define DEINTERLACE_IN2_ADDR0\t\t\t0x70\n+#define DEINTERLACE_IN2_ADDR1\t\t\t0x74\n+#define DEINTERLACE_IN2_ADDR2\t\t\t0x78\n+#define DEINTERLACE_IN2_ADDRH\t\t\t0x7c\n+#define DEINTERLACE_IN3_ADDR0\t\t\t0x80\n+#define DEINTERLACE_IN3_ADDR1\t\t\t0x84\n+#define DEINTERLACE_IN3_ADDR2\t\t\t0x88\n+#define DEINTERLACE_IN3_ADDRH\t\t\t0x8c\n+#define DEINTERLACE_OUT_ADDR0\t\t\t0x90\n+#define DEINTERLACE_OUT_ADDR1\t\t\t0x94\n+#define DEINTERLACE_OUT_ADDR2\t\t\t0x98\n+#define DEINTERLACE_OUT_ADDRH\t\t\t0x9c\n+#define DEINTERLACE_IN_FLAG_ADDR\t\t0xa0\n+#define DEINTERLACE_OUT_FLAG_ADDR\t\t0xa4\n+#define DEINTERLACE_FLAG_ADDRH\t\t\t0xa8\n+\n+#define DEINTERLACE_ADDRH0(x)\t\t\t\t((x) & 0xff)\n+#define DEINTERLACE_ADDRH1(x)\t\t\t\t(((x) & 0xff) << 8)\n+#define DEINTERLACE_ADDRH2(x)\t\t\t\t(((x) & 0xff) << 16)\n+\n+#define DEINTERLACE_MODE\t\t\t0xb0\n+#define DEINTERLACE_MODE_DEINT_LUMA\t\t\tBIT(0)\n+#define DEINTERLACE_MODE_MOTION_EN\t\t\tBIT(4)\n+#define DEINTERLACE_MODE_INTP_EN\t\t\tBIT(5)\n+#define DEINTERLACE_MODE_AUTO_UPD_MODE(x)\t\t(((x) & 3) << 12)\n+#define DEINTERLACE_MODE_DEINT_CHROMA\t\t\tBIT(16)\n+#define DEINTERLACE_MODE_FIELD_MODE\t\t\tBIT(31)\n+\n+#define DEINTERLACE_MD_PARAM0\t\t\t0xb4\n+#define DEINTERLACE_MD_PARAM0_MIN_LUMA_TH(x)\t\t((x) & 0xff)\n+#define DEINTERLACE_MD_PARAM0_MAX_LUMA_TH(x)\t\t(((x) & 0xff) << 8)\n+#define DEINTERLACE_MD_PARAM0_AVG_LUMA_SHIFT(x)\t\t(((x) & 0xf) << 16)\n+#define DEINTERLACE_MD_PARAM0_TH_SHIFT(x)\t\t(((x) & 0xf) << 24)\n+\n+#define DEINTERLACE_MD_PARAM1\t\t\t0xb8\n+#define DEINTERLACE_MD_PARAM1_MOV_FAC_NONEDGE(x)\t(((x) & 0x3) << 28)\n+\n+#define DEINTERLACE_MD_PARAM2\t\t\t0xbc\n+#define DEINTERLACE_MD_PARAM2_CHROMA_SPATIAL_TH(x)\t(((x) & 0xff) << 8)\n+#define DEINTERLACE_MD_PARAM2_CHROMA_DIFF_TH(x)\t\t(((x) & 0xff) << 16)\n+#define DEINTERLACE_MD_PARAM2_PIX_STATIC_TH(x)\t\t(((x) & 0x3) << 28)\n+\n+#define DEINTERLACE_INTP_PARAM0\t\t\t0xc0\n+#define DEINTERLACE_INTP_PARAM0_ANGLE_LIMIT(x)\t\t((x) & 0x1f)\n+#define DEINTERLACE_INTP_PARAM0_ANGLE_CONST_TH(x)\t(((x) & 7) << 8)\n+#define DEINTERLACE_INTP_PARAM0_LUMA_CUR_FAC_MODE(x)\t(((x) & 7) << 16)\n+#define DEINTERLACE_INTP_PARAM0_LUMA_CUR_FAC_MODE_MSK\t(7 << 16)\n+#define DEINTERLACE_INTP_PARAM0_CHROMA_CUR_FAC_MODE(x)\t(((x) & 7) << 20)\n+#define DEINTERLACE_INTP_PARAM0_CHROMA_CUR_FAC_MODE_MSK\t(7 << 20)\n+\n+#define DEINTERLACE_MD_CH_PARAM\t\t\t0xc4\n+#define DEINTERLACE_MD_CH_PARAM_BLEND_MODE(x)\t\t((x) & 0xf)\n+#define DEINTERLACE_MD_CH_PARAM_FONT_PRO_EN\t\tBIT(8)\n+#define DEINTERLACE_MD_CH_PARAM_FONT_PRO_TH(x)\t\t(((x) & 0xff) << 16)\n+#define DEINTERLACE_MD_CH_PARAM_FONT_PRO_FAC(x)\t\t(((x) & 0x1f) << 24)\n+\n+#define DEINTERLACE_INTP_PARAM1\t\t\t0xc8\n+#define DEINTERLACE_INTP_PARAM1_A(x)\t\t\t((x) & 7)\n+#define DEINTERLACE_INTP_PARAM1_EN\t\t\tBIT(3)\n+#define DEINTERLACE_INTP_PARAM1_C(x)\t\t\t(((x) & 0xf) << 4)\n+#define DEINTERLACE_INTP_PARAM1_CMAX(x)\t\t\t(((x) & 0xff) << 8)\n+#define DEINTERLACE_INTP_PARAM1_MAXRAT(x)\t\t(((x) & 3) << 16)\n+\n+#define DEINTERLACE_OUT_PATH\t\t\t0x200\n+\n+#define DEINTERLACE_MIN_WIDTH\t2U\n+#define DEINTERLACE_MIN_HEIGHT\t2U\n+#define DEINTERLACE_MAX_WIDTH\t2048U\n+#define DEINTERLACE_MAX_HEIGHT\t1100U\n+\n+struct deinterlace_ctx {\n+\tstruct v4l2_fh\t\tfh;\n+\tstruct deinterlace_dev\t*dev;\n+\n+\tstruct v4l2_pix_format\tsrc_fmt;\n+\tstruct v4l2_pix_format\tdst_fmt;\n+\n+\tvoid\t\t\t*flag1_buf;\n+\tdma_addr_t\t\tflag1_buf_dma;\n+\n+\tvoid\t\t\t*flag2_buf;\n+\tdma_addr_t\t\tflag2_buf_dma;\n+\n+\tstruct vb2_v4l2_buffer\t*prev[2];\n+\n+\tunsigned int\t\tfirst_field;\n+\tunsigned int\t\tfield;\n+\n+\tint\t\t\taborting;\n+};\n+\n+struct deinterlace_dev {\n+\tstruct v4l2_device\tv4l2_dev;\n+\tstruct video_device\tvfd;\n+\tstruct device\t\t*dev;\n+\tstruct v4l2_m2m_dev\t*m2m_dev;\n+\n+\t/* Device file mutex */\n+\tstruct mutex\t\tdev_mutex;\n+\n+\tvoid __iomem\t\t*base;\n+\n+\tstruct clk\t\t*bus_clk;\n+\tstruct clk\t\t*mod_clk;\n+\tstruct clk\t\t*ram_clk;\n+\n+\tstruct reset_control\t*rstc;\n+};\n+\n+#endif\n--- a/drivers/media/platform/sunxi/Kconfig\t2022-04-17 20:57:31.000000000 +0000\n+++ b/drivers/media/platform/sunxi/Kconfig\t2022-04-23 13:22:19.652398021 +0000\n@@ -5,4 +5,5 @@\n source \"drivers/media/platform/sunxi/sun4i-csi/Kconfig\"\n source \"drivers/media/platform/sunxi/sun6i-csi/Kconfig\"\n source \"drivers/media/platform/sunxi/sun8i-di/Kconfig\"\n+source \"drivers/media/platform/sunxi/sun50i-di/Kconfig\"\n source \"drivers/media/platform/sunxi/sun8i-rotate/Kconfig\"\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0031-arm64-dts-h6-deinterlace.patch",
    "content": "From c009b3b707bbde30fa6ff49ca3075160524ea7b9 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Tue, 26 May 2020 20:08:27 +0200\nSubject: [PATCH 41/44] arm64: dts: h6 deinterlace\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 11 +++++++++++\n 1 file changed, 11 insertions(+)\n\n--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi\n@@ -160,6 +160,18 @@\n \t\t\t};\n \t\t};\n\n+\t\tdeinterlace: deinterlace@1420000 {\n+\t\t\tcompatible = \"allwinner,sun50i-h6-deinterlace\";\n+\t\t\treg = <0x01420000 0x2000>;\n+\t\t\tclocks = <&ccu CLK_BUS_DEINTERLACE>,\n+\t\t\t\t <&ccu CLK_DEINTERLACE>,\n+\t\t\t\t <&ccu CLK_MBUS_DEINTERLACE>;\n+\t\t\tclock-names = \"bus\", \"mod\", \"ram\";\n+\t\t\tresets = <&ccu RST_BUS_DEINTERLACE>;\n+\t\t\tinterrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;\n+\t\t\tiommus = <&iommu 2>;\n+\t\t};\n+\n \t\tvideo-codec@1c0e000 {\n \t\t\tcompatible = \"allwinner,sun50i-h6-video-engine\";\n \t\t\treg = <0x01c0e000 0x2000>;\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0033-WIP-I2S-multi-channel.patch",
    "content": "From a19b428a02224e0e01fff4738bbf0632942d18a1 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Fri, 15 Jan 2021 00:13:54 +0100\nSubject: [PATCH 43/44] WIP: I2S multi channel\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n sound/soc/sunxi/sun4i-i2s.c | 137 +++++++++++++++++++++++++-----------\n 1 file changed, 97 insertions(+), 40 deletions(-)\n\n--- a/sound/soc/sunxi/sun4i-i2s.c\n+++ b/sound/soc/sunxi/sun4i-i2s.c\n@@ -23,7 +23,7 @@\n \n #define SUN4I_I2S_CTRL_REG\t\t0x00\n #define SUN4I_I2S_CTRL_SDO_EN_MASK\t\tGENMASK(11, 8)\n-#define SUN4I_I2S_CTRL_SDO_EN(sdo)\t\t\tBIT(8 + (sdo))\n+#define SUN4I_I2S_CTRL_SDO_EN(lines)\t\t(((1 << (lines)) - 1) << 8)\n #define SUN4I_I2S_CTRL_MODE_MASK\t\tBIT(5)\n #define SUN4I_I2S_CTRL_MODE_SLAVE\t\t\t(1 << 5)\n #define SUN4I_I2S_CTRL_MODE_MASTER\t\t\t(0 << 5)\n@@ -120,8 +120,8 @@\n #define SUN8I_I2S_CHAN_CFG_TX_SLOT_NUM_MASK\tGENMASK(3, 0)\n #define SUN8I_I2S_CHAN_CFG_TX_SLOT_NUM(chan)\t((chan) - 1)\n \n-#define SUN8I_I2S_TX_CHAN_MAP_REG\t0x44\n-#define SUN8I_I2S_TX_CHAN_SEL_REG\t0x34\n+#define SUN8I_I2S_TX_CHAN_MAP_REG(i)\t(0x44 + 4 * (i))\n+#define SUN8I_I2S_TX_CHAN_SEL_REG(i)\t(0x34 + 4 * (i))\n #define SUN8I_I2S_TX_CHAN_OFFSET_MASK\t\tGENMASK(13, 12)\n #define SUN8I_I2S_TX_CHAN_OFFSET(offset)\t((offset) << 12)\n #define SUN8I_I2S_TX_CHAN_EN_MASK\t\tGENMASK(11, 4)\n@@ -198,7 +198,7 @@ struct sun4i_i2s_quirks {\n \t * @slots: channels per frame + padding slots, regardless of format\n \t * @slot_width: bits per sample + padding bits, regardless of format\n \t */\n-\tint\t(*set_chan_cfg)(const struct sun4i_i2s *i2s,\n+\tint\t(*set_chan_cfg)(struct sun4i_i2s *i2s,\n \t\t\t\tunsigned int channels,\tunsigned int slots,\n \t\t\t\tunsigned int slot_width);\n \tint\t(*set_fmt)(const struct sun4i_i2s *i2s, unsigned int fmt);\n@@ -214,6 +214,7 @@ struct sun4i_i2s {\n \tunsigned int\tmclk_freq;\n \tunsigned int\tslots;\n \tunsigned int\tslot_width;\n+\tunsigned int\tlines;\n \n \tstruct snd_dmaengine_dai_dma_data\tcapture_dma_data;\n \tstruct snd_dmaengine_dai_dma_data\tplayback_dma_data;\n@@ -454,7 +455,7 @@ static int sun8i_i2s_get_sr_wss(unsigned\n \treturn -EINVAL;\n }\n \n-static int sun4i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s,\n+static int sun4i_i2s_set_chan_cfg(struct sun4i_i2s *i2s,\n \t\t\t\t  unsigned int channels, unsigned int slots,\n \t\t\t\t  unsigned int slot_width)\n {\n@@ -473,20 +474,42 @@ static int sun4i_i2s_set_chan_cfg(const\n \treturn 0;\n }\n \n-static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s,\n+static int sun8i_i2s_set_chan_cfg(struct sun4i_i2s *i2s,\n \t\t\t\t  unsigned int channels, unsigned int slots,\n \t\t\t\t  unsigned int slot_width)\n {\n-\tunsigned int lrck_period;\n+\tunsigned int lrck_period, val;\n+\tint i;\n+\n+\ti2s->lines = (channels + 1) / 2;\n+\n+\t/* Enable the required output lines */\n+\tregmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG,\n+\t\t\t   SUN4I_I2S_CTRL_SDO_EN_MASK,\n+\t\t\t   SUN4I_I2S_CTRL_SDO_EN(i2s->lines));\n \n \t/* Map the channels for playback and capture */\n-\tregmap_write(i2s->regmap, SUN8I_I2S_TX_CHAN_MAP_REG, 0x76543210);\n+\tregmap_write(i2s->regmap, SUN8I_I2S_TX_CHAN_MAP_REG(0), 0x76543210);\n+\tregmap_write(i2s->regmap, SUN8I_I2S_TX_CHAN_MAP_REG(1), 0x32);\n+\tregmap_write(i2s->regmap, SUN8I_I2S_TX_CHAN_MAP_REG(2), 0x54);\n+\tregmap_write(i2s->regmap, SUN8I_I2S_TX_CHAN_MAP_REG(3), 0x76);\n \tregmap_write(i2s->regmap, SUN8I_I2S_RX_CHAN_MAP_REG, 0x76543210);\n \n \t/* Configure the channels */\n-\tregmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG,\n-\t\t\t   SUN4I_I2S_CHAN_SEL_MASK,\n-\t\t\t   SUN4I_I2S_CHAN_SEL(channels));\n+\tfor (i = 0; i < 4; i++) {\n+\t\tif (channels <= i * 2)\n+\t\t\tval = 0;\n+\t\telse if (channels == i * 2 + 1)\n+\t\t\tval = 1;\n+\t\telse\n+\t\t\tval = 2;\n+\t\tregmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG(i),\n+\t\t\t\t   SUN4I_I2S_CHAN_SEL_MASK |\n+\t\t\t\t   SUN8I_I2S_TX_CHAN_EN_MASK,\n+\t\t\t\t   SUN4I_I2S_CHAN_SEL(val) |\n+\t\t\t\t   SUN8I_I2S_TX_CHAN_EN(val));\n+\t}\n+\n \tregmap_update_bits(i2s->regmap, SUN8I_I2S_RX_CHAN_SEL_REG,\n \t\t\t   SUN4I_I2S_CHAN_SEL_MASK,\n \t\t\t   SUN4I_I2S_CHAN_SEL(channels));\n@@ -518,36 +541,54 @@ static int sun8i_i2s_set_chan_cfg(const\n \t\t\t   SUN8I_I2S_FMT0_LRCK_PERIOD_MASK,\n \t\t\t   SUN8I_I2S_FMT0_LRCK_PERIOD(lrck_period));\n \n-\tregmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG,\n-\t\t\t   SUN8I_I2S_TX_CHAN_EN_MASK,\n-\t\t\t   SUN8I_I2S_TX_CHAN_EN(channels));\n-\n \treturn 0;\n }\n \n-static int sun50i_h6_i2s_set_chan_cfg(const struct sun4i_i2s *i2s,\n+static int sun50i_h6_i2s_set_chan_cfg(struct sun4i_i2s *i2s,\n \t\t\t\t      unsigned int channels, unsigned int slots,\n \t\t\t\t      unsigned int slot_width)\n {\n-\tunsigned int lrck_period;\n+\tunsigned int lrck_period, val;\n+\tint i;\n+\n+\ti2s->lines = (channels + 1) / 2;\n+\n+\t/* Enable the required output lines */\n+\tregmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG,\n+\t\t\t   SUN4I_I2S_CTRL_SDO_EN_MASK,\n+\t\t\t   SUN4I_I2S_CTRL_SDO_EN(i2s->lines));\n \n \t/* Map the channels for playback and capture */\n \tregmap_write(i2s->regmap, SUN50I_H6_I2S_TX_CHAN_MAP0_REG(0), 0xFEDCBA98);\n \tregmap_write(i2s->regmap, SUN50I_H6_I2S_TX_CHAN_MAP1_REG(0), 0x76543210);\n+\tregmap_write(i2s->regmap, SUN50I_H6_I2S_TX_CHAN_MAP1_REG(1), 0x32);\n+\tregmap_write(i2s->regmap, SUN50I_H6_I2S_TX_CHAN_MAP1_REG(2), 0x54);\n+\tregmap_write(i2s->regmap, SUN50I_H6_I2S_TX_CHAN_MAP1_REG(3), 0x76);\n \tif (i2s->variant->num_din_pins > 1) {\n \t\tregmap_write(i2s->regmap, SUN50I_R329_I2S_RX_CHAN_MAP0_REG, 0x0F0E0D0C);\n \t\tregmap_write(i2s->regmap, SUN50I_R329_I2S_RX_CHAN_MAP1_REG, 0x0B0A0908);\n \t\tregmap_write(i2s->regmap, SUN50I_R329_I2S_RX_CHAN_MAP2_REG, 0x07060504);\n \t\tregmap_write(i2s->regmap, SUN50I_R329_I2S_RX_CHAN_MAP3_REG, 0x03020100);\n \t} else {\n \t\tregmap_write(i2s->regmap, SUN50I_H6_I2S_RX_CHAN_MAP0_REG, 0xFEDCBA98);\n \t\tregmap_write(i2s->regmap, SUN50I_H6_I2S_RX_CHAN_MAP1_REG, 0x76543210);\n \t}\n \n \t/* Configure the channels */\n-\tregmap_update_bits(i2s->regmap, SUN50I_H6_I2S_TX_CHAN_SEL_REG(0),\n-\t\t\t   SUN50I_H6_I2S_TX_CHAN_SEL_MASK,\n-\t\t\t   SUN50I_H6_I2S_TX_CHAN_SEL(channels));\n+\tfor (i = 0; i < 4; i++) {\n+\t\tif (channels <= i * 2)\n+\t\t\tval = 0;\n+\t\telse if (channels == i * 2 + 1)\n+\t\t\tval = 1;\n+\t\telse\n+\t\t\tval = 2;\n+\t\tregmap_update_bits(i2s->regmap, SUN50I_H6_I2S_TX_CHAN_SEL_REG(i),\n+\t\t\t\t   SUN50I_H6_I2S_TX_CHAN_SEL_MASK |\n+\t\t\t\t   SUN50I_H6_I2S_TX_CHAN_EN_MASK,\n+\t\t\t\t   SUN50I_H6_I2S_TX_CHAN_SEL(val) |\n+\t\t\t\t   SUN50I_H6_I2S_TX_CHAN_EN(val));\n+\t}\n+\n \tregmap_update_bits(i2s->regmap, SUN50I_H6_I2S_RX_CHAN_SEL_REG,\n \t\t\t   SUN50I_H6_I2S_TX_CHAN_SEL_MASK,\n \t\t\t   SUN50I_H6_I2S_TX_CHAN_SEL(channels));\n@@ -579,10 +620,6 @@ static int sun50i_h6_i2s_set_chan_cfg(co\n \t\t\t   SUN8I_I2S_FMT0_LRCK_PERIOD_MASK,\n \t\t\t   SUN8I_I2S_FMT0_LRCK_PERIOD(lrck_period));\n \n-\tregmap_update_bits(i2s->regmap, SUN50I_H6_I2S_TX_CHAN_SEL_REG(0),\n-\t\t\t   SUN50I_H6_I2S_TX_CHAN_EN_MASK,\n-\t\t\t   SUN50I_H6_I2S_TX_CHAN_EN(channels));\n-\n \treturn 0;\n }\n \n@@ -727,6 +764,7 @@ static int sun8i_i2s_set_soc_fmt(const s\n {\n \tu32 mode, val;\n \tu8 offset;\n+\tint i;\n \n \t/*\n \t * DAI clock polarity\n@@ -794,9 +832,10 @@ static int sun8i_i2s_set_soc_fmt(const s\n \n \tregmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG,\n \t\t\t   SUN8I_I2S_CTRL_MODE_MASK, mode);\n-\tregmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG,\n-\t\t\t   SUN8I_I2S_TX_CHAN_OFFSET_MASK,\n-\t\t\t   SUN8I_I2S_TX_CHAN_OFFSET(offset));\n+\tfor (i = 0; i < 4; i++)\n+\t\tregmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG(i),\n+\t\t\t\t   SUN8I_I2S_TX_CHAN_OFFSET_MASK,\n+\t\t\t\t   SUN8I_I2S_TX_CHAN_OFFSET(offset));\n \tregmap_update_bits(i2s->regmap, SUN8I_I2S_RX_CHAN_SEL_REG,\n \t\t\t   SUN8I_I2S_TX_CHAN_OFFSET_MASK,\n \t\t\t   SUN8I_I2S_TX_CHAN_OFFSET(offset));\n@@ -834,6 +873,7 @@ static int sun50i_h6_i2s_set_soc_fmt(con\n {\n \tu32 mode, val;\n \tu8 offset;\n+\tint i;\n \n \t/*\n \t * DAI clock polarity\n@@ -901,9 +941,10 @@ static int sun50i_h6_i2s_set_soc_fmt(con\n \n \tregmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG,\n \t\t\t   SUN8I_I2S_CTRL_MODE_MASK, mode);\n-\tregmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG,\n-\t\t\t   SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET_MASK,\n-\t\t\t   SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET(offset));\n+\tfor (i = 0; i < 4; i++)\n+\t\tregmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG(i),\n+\t\t\t\t   SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET_MASK,\n+\t\t\t\t   SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET(offset));\n \tregmap_update_bits(i2s->regmap, SUN50I_H6_I2S_RX_CHAN_SEL_REG,\n \t\t\t   SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET_MASK,\n \t\t\t   SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET(offset));\n@@ -1212,8 +1253,14 @@ static const struct reg_default sun8i_i2\n \t{ SUN4I_I2S_DMA_INT_CTRL_REG, 0x00000000 },\n \t{ SUN4I_I2S_CLK_DIV_REG, 0x00000000 },\n \t{ SUN8I_I2S_CHAN_CFG_REG, 0x00000000 },\n-\t{ SUN8I_I2S_TX_CHAN_SEL_REG, 0x00000000 },\n-\t{ SUN8I_I2S_TX_CHAN_MAP_REG, 0x00000000 },\n+\t{ SUN8I_I2S_TX_CHAN_SEL_REG(0), 0x00000000 },\n+\t{ SUN8I_I2S_TX_CHAN_SEL_REG(1), 0x00000000 },\n+\t{ SUN8I_I2S_TX_CHAN_SEL_REG(2), 0x00000000 },\n+\t{ SUN8I_I2S_TX_CHAN_SEL_REG(3), 0x00000000 },\n+\t{ SUN8I_I2S_TX_CHAN_MAP_REG(0), 0x00000000 },\n+\t{ SUN8I_I2S_TX_CHAN_MAP_REG(1), 0x00000000 },\n+\t{ SUN8I_I2S_TX_CHAN_MAP_REG(2), 0x00000000 },\n+\t{ SUN8I_I2S_TX_CHAN_MAP_REG(3), 0x00000000 },\n \t{ SUN8I_I2S_RX_CHAN_SEL_REG, 0x00000000 },\n \t{ SUN8I_I2S_RX_CHAN_MAP_REG, 0x00000000 },\n };\n@@ -1227,8 +1274,17 @@ static const struct reg_default sun50i_h\n \t{ SUN4I_I2S_CLK_DIV_REG, 0x00000000 },\n \t{ SUN8I_I2S_CHAN_CFG_REG, 0x00000000 },\n \t{ SUN50I_H6_I2S_TX_CHAN_SEL_REG(0), 0x00000000 },\n+\t{ SUN50I_H6_I2S_TX_CHAN_SEL_REG(1), 0x00000000 },\n+\t{ SUN50I_H6_I2S_TX_CHAN_SEL_REG(2), 0x00000000 },\n+\t{ SUN50I_H6_I2S_TX_CHAN_SEL_REG(3), 0x00000000 },\n \t{ SUN50I_H6_I2S_TX_CHAN_MAP0_REG(0), 0x00000000 },\n \t{ SUN50I_H6_I2S_TX_CHAN_MAP1_REG(0), 0x00000000 },\n+\t{ SUN50I_H6_I2S_TX_CHAN_MAP0_REG(1), 0x00000000 },\n+\t{ SUN50I_H6_I2S_TX_CHAN_MAP1_REG(1), 0x00000000 },\n+\t{ SUN50I_H6_I2S_TX_CHAN_MAP0_REG(2), 0x00000000 },\n+\t{ SUN50I_H6_I2S_TX_CHAN_MAP1_REG(2), 0x00000000 },\n+\t{ SUN50I_H6_I2S_TX_CHAN_MAP0_REG(3), 0x00000000 },\n+\t{ SUN50I_H6_I2S_TX_CHAN_MAP1_REG(3), 0x00000000 },\n \t{ SUN50I_H6_I2S_RX_CHAN_SEL_REG, 0x00000000 },\n \t{ SUN50I_H6_I2S_RX_CHAN_MAP0_REG, 0x00000000 },\n \t{ SUN50I_H6_I2S_RX_CHAN_MAP1_REG, 0x00000000 },\n@@ -1301,7 +1357,7 @@ static int sun4i_i2s_runtime_resume(stru\n \t/* Enable the first output line */\n \tregmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG,\n \t\t\t   SUN4I_I2S_CTRL_SDO_EN_MASK,\n-\t\t\t   SUN4I_I2S_CTRL_SDO_EN(0));\n+\t\t\t   SUN4I_I2S_CTRL_SDO_EN(i2s->lines));\n \n \tret = clk_prepare_enable(i2s->mod_clk);\n \tif (ret) {\n@@ -1562,6 +1618,7 @@ static int sun4i_i2s_probe(struct platfo\n \n \ti2s->capture_dma_data.addr = res->start + SUN4I_I2S_FIFO_RX_REG;\n \ti2s->capture_dma_data.maxburst = 8;\n+\ti2s->lines = 1;\n \n \tpm_runtime_enable(&pdev->dev);\n \tif (!pm_runtime_enabled(&pdev->dev)) {\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0034-HACK-h3-h5-Add-HDMI-sound-card.patch",
    "content": "From d0428e1d4b2a1a3d640f6052646e0f8ca7fc2d53 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Sat, 16 Jan 2021 10:57:58 +0100\nSubject: [PATCH 44/44] HACK: h3/h5: Add HDMI sound card\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n arch/arm/boot/dts/sunxi-h3-h5.dtsi | 20 +++++++++++++++++++-\n 1 file changed, 19 insertions(+), 1 deletion(-)\n\n--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi\n+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi\n@@ -77,6 +77,24 @@\n \t\t};\n \t};\n \n+\tsound_hdmi: sound {\n+\t\tcompatible = \"simple-audio-card\";\n+\t\tsimple-audio-card,format = \"i2s\";\n+\t\tsimple-audio-card,name = \"allwinner-hdmi\";\n+\t\tsimple-audio-card,mclk-fs = <128>;\n+\t\tsimple-audio-card,frame-inversion;\n+\n+\t\tsimple-audio-card,codec {\n+\t\t\tsound-dai = <&hdmi>;\n+\t\t};\n+\n+\t\tsimple-audio-card,cpu {\n+\t\t\tsound-dai = <&i2s2>;\n+\t\t\tdai-tdm-slot-num = <2>;\n+\t\t\tdai-tdm-slot-width = <32>;\n+\t\t};\n+\t};\n+\n \tclocks {\n \t\t#address-cells = <1>;\n \t\t#size-cells = <1>;\n@@ -678,10 +696,9 @@\n \t\t\tinterrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;\n \t\t\tclocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>;\n \t\t\tclock-names = \"apb\", \"mod\";\n-\t\t\tdmas = <&dma 27>;\n+\t\t\tdmas = <&dma 27>, <&dma 27>;\n \t\t\tresets = <&ccu RST_BUS_I2S2>;\n-\t\t\tdma-names = \"tx\";\n-\t\t\tstatus = \"disabled\";\n+\t\t\tdma-names = \"rx\", \"tx\";\n \t\t};\n \n \t\tcodec: codec@1c22c00 {\n@@ -815,6 +832,7 @@\n \t\t};\n \n \t\thdmi: hdmi@1ee0000 {\n+\t\t\t#sound-dai-cells = <0>;\n \t\t\tcompatible = \"allwinner,sun8i-h3-dw-hdmi\",\n \t\t\t\t     \"allwinner,sun8i-a83t-dw-hdmi\";\n \t\t\treg = <0x01ee0000 0x10000>;\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0036-wip-h3-h5-cvbs.patch",
    "content": "From 24545292c40900c0871381b8697ade70aa9e3bdf Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Wed, 20 Jan 2021 22:15:36 +0100\nSubject: [PATCH] wip h3/h5 cvbs\n\n---\n arch/arm/boot/dts/sun8i-h3.dtsi              | 22 +++++\n arch/arm/boot/dts/sunxi-h3-h5.dtsi           | 95 +++++++++++++++++++-\n arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 22 +++++\n drivers/clk/sunxi-ng/ccu-sun8i-h3.c          | 14 ++-\n drivers/gpu/drm/sun4i/Makefile               |  2 +-\n drivers/gpu/drm/sun4i/sun4i_tv.c             | 35 +++++++-\n drivers/gpu/drm/sun4i/sun8i_mixer.c          | 44 ++++++++-\n drivers/gpu/drm/sun4i/sun8i_mixer.h          |  5 +-\n 8 files changed, 227 insertions(+), 12 deletions(-)\n\ndiff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi\nindex 448dd325f8c3..d896dc5502f5 100644\n--- a/arch/arm/boot/dts/sun8i-h3.dtsi\n+++ b/arch/arm/boot/dts/sun8i-h3.dtsi\n@@ -252,6 +252,20 @@ ths: thermal-sensor@1c25000 {\n \t\t\tnvmem-cell-names = \"calibration\";\n \t\t\t#thermal-sensor-cells = <0>;\n \t\t};\n+\n+\t\ttve: tv-encoder@1e00000 {\n+\t\t\tcompatible = \"allwinner,sun8i-h3-tv-encoder\";\n+\t\t\treg = <0x01e00000 0x1000>;\n+\t\t\tclocks = <&ccu CLK_BUS_TVE>;\n+\t\t\tresets = <&ccu RST_BUS_TVE>;\n+\t\t\tstatus = \"disabled\";\n+\n+\t\t\tport {\n+\t\t\t\ttve_in_tcon1: endpoint {\n+\t\t\t\t\tremote-endpoint = <&tcon1_out_tve>;\n+\t\t\t\t};\n+\t\t\t};\n+\t\t};\n \t};\n \n \tthermal-zones {\n@@ -299,6 +313,10 @@ &mbus {\n \tcompatible = \"allwinner,sun8i-h3-mbus\";\n };\n \n+&mixer1 {\n+\tresets = <&display_clocks RST_WB>;\n+};\n+\n &mmc0 {\n \tcompatible = \"allwinner,sun7i-a20-mmc\";\n \tclocks = <&ccu CLK_BUS_MMC0>,\n@@ -346,3 +364,7 @@ &rtc {\n &sid {\n \tcompatible = \"allwinner,sun8i-h3-sid\";\n };\n+\n+&tcon1_out_tve {\n+\tremote-endpoint = <&tve_in_tcon1>;\n+};\ndiff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi\nindex 3d37a6a586b6..152029413784 100644\n--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi\n+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi\n@@ -119,7 +119,7 @@ osc32k: osc32k_clk {\n \n \tde: display-engine {\n \t\tcompatible = \"allwinner,sun8i-h3-display-engine\";\n-\t\tallwinner,pipelines = <&mixer0>;\n+\t\tallwinner,pipelines = <&mixer0>, <&mixer1>;\n \t\tstatus = \"disabled\";\n \t};\n \n@@ -163,11 +163,50 @@ ports {\n \t\t\t\t#size-cells = <0>;\n \n \t\t\t\tmixer0_out: port@1 {\n+\t\t\t\t\t#address-cells = <1>;\n+\t\t\t\t\t#size-cells = <0>;\n \t\t\t\t\treg = <1>;\n \n-\t\t\t\t\tmixer0_out_tcon0: endpoint {\n+\t\t\t\t\tmixer0_out_tcon0: endpoint@0 {\n+\t\t\t\t\t\treg = <0>;\n \t\t\t\t\t\tremote-endpoint = <&tcon0_in_mixer0>;\n \t\t\t\t\t};\n+\n+\t\t\t\t\tmixer0_out_tcon1: endpoint@1 {\n+\t\t\t\t\t\treg = <1>;\n+\t\t\t\t\t\tremote-endpoint = <&tcon1_in_mixer0>;\n+\t\t\t\t\t};\n+\t\t\t\t};\n+\t\t\t};\n+\t\t};\n+\n+\t\tmixer1: mixer@1200000 {\n+\t\t\tcompatible = \"allwinner,sun8i-h3-de2-mixer-1\";\n+\t\t\treg = <0x01200000 0x100000>;\n+\t\t\tclocks = <&display_clocks CLK_BUS_MIXER1>,\n+\t\t\t\t <&display_clocks CLK_MIXER1>;\n+\t\t\tclock-names = \"bus\",\n+\t\t\t\t      \"mod\";\n+\t\t\t/* reset is added by SoC dtsi */\n+\n+\t\t\tports {\n+\t\t\t\t#address-cells = <1>;\n+\t\t\t\t#size-cells = <0>;\n+\n+\t\t\t\tmixer1_out: port@1 {\n+\t\t\t\t\t#address-cells = <1>;\n+\t\t\t\t\t#size-cells = <0>;\n+\t\t\t\t\treg = <1>;\n+\n+\t\t\t\t\tmixer1_out_tcon0: endpoint@0 {\n+\t\t\t\t\t\treg = <0>;\n+\t\t\t\t\t\tremote-endpoint = <&tcon0_in_mixer1>;\n+\t\t\t\t\t};\n+\n+\t\t\t\t\tmixer1_out_tcon1: endpoint@1 {\n+\t\t\t\t\t\treg = <1>;\n+\t\t\t\t\t\tremote-endpoint = <&tcon1_in_mixer1>;\n+\t\t\t\t\t};\n \t\t\t\t};\n \t\t\t};\n \t\t};\n@@ -196,11 +235,19 @@ ports {\n \t\t\t\t#size-cells = <0>;\n \n \t\t\t\ttcon0_in: port@0 {\n+\t\t\t\t\t#address-cells = <1>;\n+\t\t\t\t\t#size-cells = <0>;\n \t\t\t\t\treg = <0>;\n \n-\t\t\t\t\ttcon0_in_mixer0: endpoint {\n+\t\t\t\t\ttcon0_in_mixer0: endpoint@0 {\n+\t\t\t\t\t\treg = <0>;\n \t\t\t\t\t\tremote-endpoint = <&mixer0_out_tcon0>;\n \t\t\t\t\t};\n+\n+\t\t\t\t\ttcon0_in_mixer1: endpoint@1 {\n+\t\t\t\t\t\treg = <1>;\n+\t\t\t\t\t\tremote-endpoint = <&mixer1_out_tcon0>;\n+\t\t\t\t\t};\n \t\t\t\t};\n \n \t\t\t\ttcon0_out: port@1 {\n@@ -216,6 +263,48 @@ tcon0_out_hdmi: endpoint@1 {\n \t\t\t};\n \t\t};\n \n+\t\ttcon1: lcd-controller@1c0d000 {\n+\t\t\tcompatible = \"allwinner,sun8i-h3-tcon-tv\",\n+\t\t\t\t     \"allwinner,sun8i-a83t-tcon-tv\";\n+\t\t\treg = <0x01c0d000 0x1000>;\n+\t\t\tinterrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;\n+\t\t\tclocks = <&ccu CLK_BUS_TCON1>, <&ccu CLK_TVE>;\n+\t\t\tclock-names = \"ahb\", \"tcon-ch1\";\n+\t\t\tresets = <&ccu RST_BUS_TCON1>;\n+\t\t\treset-names = \"lcd\";\n+\n+\t\t\tports {\n+\t\t\t\t#address-cells = <1>;\n+\t\t\t\t#size-cells = <0>;\n+\n+\t\t\t\ttcon1_in: port@0 {\n+\t\t\t\t\t#address-cells = <1>;\n+\t\t\t\t\t#size-cells = <0>;\n+\t\t\t\t\treg = <0>;\n+\n+\t\t\t\t\ttcon1_in_mixer0: endpoint@0 {\n+\t\t\t\t\t\treg = <0>;\n+\t\t\t\t\t\tremote-endpoint = <&mixer0_out_tcon1>;\n+\t\t\t\t\t};\n+\n+\t\t\t\t\ttcon1_in_mixer1: endpoint@1 {\n+\t\t\t\t\t\treg = <1>;\n+\t\t\t\t\t\tremote-endpoint = <&mixer1_out_tcon1>;\n+\t\t\t\t\t};\n+\t\t\t\t};\n+\n+\t\t\t\ttcon1_out: port@1 {\n+\t\t\t\t\t#address-cells = <1>;\n+\t\t\t\t\t#size-cells = <0>;\n+\t\t\t\t\treg = <1>;\n+\n+\t\t\t\t\ttcon1_out_tve: endpoint@1 {\n+\t\t\t\t\t\treg = <1>;\n+\t\t\t\t\t};\n+\t\t\t\t};\n+\t\t\t};\n+\t\t};\n+\n \t\tmmc0: mmc@1c0f000 {\n \t\t\t/* compatible and clocks are in per SoC .dtsi file */\n \t\t\treg = <0x01c0f000 0x1000>;\ndiff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi\nindex 4f00ae227cce..d30c85948ac5 100644\n--- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi\n@@ -197,6 +197,20 @@ ths: thermal-sensor@1c25000 {\n \t\t\tnvmem-cell-names = \"calibration\";\n \t\t\t#thermal-sensor-cells = <1>;\n \t\t};\n+\n+\t\ttve: tv-encoder@1e40000 {\n+\t\t\tcompatible = \"allwinner,sun50i-h5-tv-encoder\";\n+\t\t\treg = <0x01e40000 0x1000>;\n+\t\t\tclocks = <&ccu CLK_BUS_TVE>;\n+\t\t\tresets = <&ccu RST_BUS_TVE>;\n+\t\t\tstatus = \"disabled\";\n+\n+\t\t\tport {\n+\t\t\t\ttve_in_tcon1: endpoint {\n+\t\t\t\t\tremote-endpoint = <&tcon1_out_tve>;\n+\t\t\t\t};\n+\t\t\t};\n+\t\t};\n \t};\n \n \tthermal-zones {\n@@ -250,6 +264,10 @@ &mbus {\n \tcompatible = \"allwinner,sun50i-h5-mbus\";\n };\n \n+&mixer1 {\n+\tresets = <&display_clocks RST_MIXER1>;\n+};\n+\n &mmc0 {\n \tcompatible = \"allwinner,sun50i-h5-mmc\",\n \t\t     \"allwinner,sun50i-a64-mmc\";\n@@ -285,3 +303,7 @@ &rtc {\n &sid {\n \tcompatible = \"allwinner,sun50i-h5-sid\";\n };\n+\n+&tcon1_out_tve {\n+\tremote-endpoint = <&tve_in_tcon1>;\n+};\ndiff --git a/drivers/clk/sunxi-ng/ccu-sun8i-h3.c b/drivers/clk/sunxi-ng/ccu-sun8i-h3.c\nindex e058cf691aea..0b0df6d6bc9c 100644\n--- a/drivers/clk/sunxi-ng/ccu-sun8i-h3.c\n+++ b/drivers/clk/sunxi-ng/ccu-sun8i-h3.c\n@@ -458,8 +458,18 @@ static SUNXI_CCU_M_WITH_MUX_GATE(tcon_clk, \"tcon\", tcon_parents,\n \t\t\t\t CLK_SET_RATE_PARENT);\n \n static const char * const tve_parents[] = { \"pll-de\", \"pll-periph1\" };\n-static SUNXI_CCU_M_WITH_MUX_GATE(tve_clk, \"tve\", tve_parents,\n-\t\t\t\t 0x120, 0, 4, 24, 3, BIT(31), 0);\n+struct ccu_div tve_clk = {\n+\t.enable\t= BIT(31),\n+\t.div\t= _SUNXI_CCU_DIV(0, 4),\n+\t.mux\t= _SUNXI_CCU_MUX(24, 3),\n+\t.fixed_post_div = 16,\n+\t.common\t= {\n+\t\t.reg\t\t= 0x120,\n+\t\t.features\t= CCU_FEATURE_FIXED_POSTDIV,\n+\t\t.hw.init\t= CLK_HW_INIT_PARENTS(\"tve\", tve_parents,\n+\t\t\t\t\t\t      &ccu_div_ops, 0),\n+\t},\n+};\n \n static const char * const deinterlace_parents[] = { \"pll-periph0\", \"pll-periph1\" };\n static SUNXI_CCU_M_WITH_MUX_GATE(deinterlace_clk, \"deinterlace\", deinterlace_parents,\ndiff --git a/drivers/gpu/drm/sun4i/Makefile b/drivers/gpu/drm/sun4i/Makefile\nindex 0d04f2447b01..7b151994e904 100644\n--- a/drivers/gpu/drm/sun4i/Makefile\n+++ b/drivers/gpu/drm/sun4i/Makefile\n@@ -16,7 +16,7 @@ sun8i-drm-hdmi-y\t\t+= sun8i_hdmi_phy_clk.o\n \n sun8i-mixer-y\t\t\t+= sun8i_mixer.o sun8i_ui_layer.o \\\n \t\t\t\t   sun8i_vi_layer.o sun8i_ui_scaler.o \\\n-\t\t\t\t   sun8i_vi_scaler.o sun8i_csc.o\n+\t\t\t\t   sun8i_vi_scaler.o sun8i_csc.o sun4i_tv.o\n \n sun4i-tcon-y\t\t\t+= sun4i_crtc.o\n sun4i-tcon-y\t\t\t+= sun4i_dotclock.o\ndiff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c\nindex 94883abe0dfd..9c7090a0d52a 100644\n--- a/drivers/gpu/drm/sun4i/sun4i_tv.c\n+++ b/drivers/gpu/drm/sun4i/sun4i_tv.c\n@@ -10,6 +10,7 @@\n #include <linux/component.h>\n #include <linux/module.h>\n #include <linux/of_address.h>\n+#include <linux/of_device.h>\n #include <linux/platform_device.h>\n #include <linux/regmap.h>\n #include <linux/reset.h>\n@@ -167,6 +168,11 @@ struct tv_mode {\n \tconst struct resync_parameters\t*resync_params;\n };\n \n+struct sun4i_tv_quirks {\n+\tunsigned int calibration;\n+\tunsigned int unknown : 1;\n+};\n+\n struct sun4i_tv {\n \tstruct drm_connector\tconnector;\n \tstruct drm_encoder\tencoder;\n@@ -527,7 +533,7 @@ static const struct regmap_config sun4i_tv_regmap_config = {\n \t.reg_bits\t= 32,\n \t.val_bits\t= 32,\n \t.reg_stride\t= 4,\n-\t.max_register\t= SUN4I_TVE_WSS_DATA2_REG,\n+\t.max_register\t= 0x400,\n \t.name\t\t= \"tv-encoder\",\n };\n \n@@ -537,13 +543,19 @@ static int sun4i_tv_bind(struct device *dev, struct device *master,\n \tstruct platform_device *pdev = to_platform_device(dev);\n \tstruct drm_device *drm = data;\n \tstruct sun4i_drv *drv = drm->dev_private;\n+\tconst struct sun4i_tv_quirks *quirks;\n \tstruct sun4i_tv *tv;\n \tvoid __iomem *regs;\n \tint ret;\n \n+\tquirks = of_device_get_match_data(dev);\n+\tif (!quirks)\n+\t\treturn -EINVAL;\n+\n \ttv = devm_kzalloc(dev, sizeof(*tv), GFP_KERNEL);\n \tif (!tv)\n \t\treturn -ENOMEM;\n+\n \ttv->drv = drv;\n \tdev_set_drvdata(dev, tv);\n \n@@ -580,6 +592,11 @@ static int sun4i_tv_bind(struct device *dev, struct device *master,\n \t}\n \tclk_prepare_enable(tv->clk);\n \n+\tif (quirks->calibration)\n+\t\tregmap_write(tv->regs, 0x304, quirks->calibration);\n+\tif (quirks->unknown)\n+\t\tregmap_write(tv->regs, 0x30c, 0x00101110);\n+\n \tdrm_encoder_helper_add(&tv->encoder,\n \t\t\t       &sun4i_tv_helper_funcs);\n \tret = drm_simple_encoder_init(drm, &tv->encoder,\n@@ -648,8 +665,22 @@ static int sun4i_tv_remove(struct platform_device *pdev)\n \treturn 0;\n }\n \n+static const struct sun4i_tv_quirks a10_quirks = {\n+};\n+\n+static const struct sun4i_tv_quirks h3_quirks = {\n+\t.calibration = 0x02000c00,\n+};\n+\n+static const struct sun4i_tv_quirks h5_quirks = {\n+\t.calibration = 0x02850000,\n+\t.unknown = 1,\n+};\n+\n static const struct of_device_id sun4i_tv_of_table[] = {\n-\t{ .compatible = \"allwinner,sun4i-a10-tv-encoder\" },\n+\t{ .compatible = \"allwinner,sun4i-a10-tv-encoder\", .data = &a10_quirks },\n+\t{ .compatible = \"allwinner,sun8i-h3-tv-encoder\", .data = &h3_quirks },\n+\t{ .compatible = \"allwinner,sun50i-h5-tv-encoder\", .data = &h5_quirks },\n \t{ }\n };\n MODULE_DEVICE_TABLE(of, sun4i_tv_of_table);\ndiff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c\nindex f5291170bf5e..490e8e74450f 100644\n--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c\n+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c\n@@ -32,6 +32,12 @@ struct de2_fmt_info {\n \tu32\tde2_fmt;\n };\n \n+static const u32 sun8i_rgb2yuv_coef[12] = {\n+\t0x00000107, 0x00000204, 0x00000064, 0x00004200,\n+\t0x00001f68, 0x00001ed6, 0x000001c2, 0x00020200,\n+\t0x000001c2, 0x00001e87, 0x00001fb7, 0x00020200,\n+};\n+\n static const struct de2_fmt_info de2_formats[] = {\n \t{\n \t\t.drm_fmt = DRM_FORMAT_ARGB8888,\n@@ -327,10 +333,29 @@ static void sun8i_mixer_mode_set(struct sunxi_engine *engine,\n \t\t\t interlaced ? \"on\" : \"off\");\n }\n \n+static void sun8i_mixer_apply_color_correction(struct sunxi_engine *engine)\n+{\n+\tDRM_DEBUG_DRIVER(\"Applying RGB to YUV color correction\\n\");\n+\n+\tregmap_bulk_write(engine->regs, SUN8I_MIXER_DCSC_COEF_REG(0),\n+\t\t\t  sun8i_rgb2yuv_coef, 12);\n+\tregmap_write(engine->regs, SUN8I_MIXER_DCSC_EN, 1);\n+}\n+\n+static void sun8i_mixer_disable_color_correction(struct sunxi_engine *engine)\n+{\n+\tDRM_DEBUG_DRIVER(\"Disabling color correction\\n\");\n+\n+\t/* Disable color correction */\n+\tregmap_write(engine->regs, SUN8I_MIXER_DCSC_EN, 0);\n+}\n+\n static const struct sunxi_engine_ops sun8i_engine_ops = {\n-\t.commit\t\t= sun8i_mixer_commit,\n-\t.layers_init\t= sun8i_layers_init,\n-\t.mode_set\t= sun8i_mixer_mode_set,\n+\t.commit\t\t\t\t= sun8i_mixer_commit,\n+\t.layers_init\t\t\t= sun8i_layers_init,\n+\t.mode_set\t\t\t= sun8i_mixer_mode_set,\n+\t.apply_color_correction\t\t= sun8i_mixer_apply_color_correction,\n+\t.disable_color_correction\t= sun8i_mixer_disable_color_correction,\n };\n \n static bool sun8i_mixer_volatile_reg(struct device *dev, unsigned int reg)\n@@ -600,6 +625,15 @@ static const struct sun8i_mixer_cfg sun8i_h3_mixer0_cfg = {\n \t.vi_num\t\t= 1,\n };\n \n+static const struct sun8i_mixer_cfg sun8i_h3_mixer1_cfg = {\n+\t.ccsc\t\t= 1,\n+\t.mod_rate\t= 432000000,\n+\t.scaler_mask\t= 0x3,\n+\t.scanline_yuv\t= 2048,\n+\t.ui_num\t\t= 1,\n+\t.vi_num\t\t= 1,\n+};\n+\n static const struct sun8i_mixer_cfg sun8i_r40_mixer0_cfg = {\n \t.ccsc\t\t= CCSC_MIXER0_LAYOUT,\n \t.mod_rate\t= 297000000,\n@@ -686,6 +720,10 @@ static const struct of_device_id sun8i_mixer_of_table[] = {\n \t\t.compatible = \"allwinner,sun8i-h3-de2-mixer-0\",\n \t\t.data = &sun8i_h3_mixer0_cfg,\n \t},\n+\t{\n+\t\t.compatible = \"allwinner,sun8i-h3-de2-mixer-1\",\n+\t\t.data = &sun8i_h3_mixer1_cfg,\n+\t},\n \t{\n \t\t.compatible = \"allwinner,sun8i-r40-de2-mixer-0\",\n \t\t.data = &sun8i_r40_mixer0_cfg,\ndiff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.h b/drivers/gpu/drm/sun4i/sun8i_mixer.h\nindex 85c94884fb9a..28cdaf0044d9 100644\n--- a/drivers/gpu/drm/sun4i/sun8i_mixer.h\n+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.h\n@@ -118,6 +118,10 @@\n /* format 20 is packed YVU444 10-bit */\n /* format 21 is packed YUV444 10-bit */\n \n+/* The DCSC sub-engine is used to do color space conversation */\n+#define SUN8I_MIXER_DCSC_EN\t\t\t0xb0000\n+#define SUN8I_MIXER_DCSC_COEF_REG(x)\t\t(0xb0010 + 0x4 * (x))\n+\n /*\n  * Sub-engines listed bellow are unused for now. The EN registers are here only\n  * to be used to disable these sub-engines.\n@@ -128,7 +132,6 @@\n #define SUN8I_MIXER_PEAK_EN\t\t\t0xa6000\n #define SUN8I_MIXER_ASE_EN\t\t\t0xa8000\n #define SUN8I_MIXER_FCC_EN\t\t\t0xaa000\n-#define SUN8I_MIXER_DCSC_EN\t\t\t0xb0000\n \n #define SUN50I_MIXER_FCE_EN\t\t\t0x70000\n #define SUN50I_MIXER_PEAK_EN\t\t\t0x70800\n-- \n2.37.3\n\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0039-HACK-a64-Add-HDMI-sound-card.patch",
    "content": "From ff9ed48eb584e583e20509af6cde1ba80ebd3edd Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Sat, 16 Jan 2021 10:49:00 +0100\nSubject: [PATCH] HACK: a64: Add HDMI sound card\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 20 ++++++++++++++++++-\n 1 file changed, 19 insertions(+), 1 deletion(-)\n\n--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi\n@@ -166,6 +166,24 @@\n \t\t};\n \t};\n \n+\tsound_hdmi: sound_hdmi {\n+\t\tcompatible = \"simple-audio-card\";\n+\t\tsimple-audio-card,format = \"i2s\";\n+\t\tsimple-audio-card,name = \"allwinner-hdmi\";\n+\t\tsimple-audio-card,mclk-fs = <128>;\n+\t\tsimple-audio-card,frame-inversion;\n+\n+\t\tsimple-audio-card,codec {\n+\t\t\tsound-dai = <&hdmi>;\n+\t\t};\n+\n+\t\tsimple-audio-card,cpu {\n+\t\t\tsound-dai = <&i2s2>;\n+\t\t\tdai-tdm-slot-num = <2>;\n+\t\t\tdai-tdm-slot-width = <32>;\n+\t\t};\n+\t};\n+\n \ttimer {\n \t\tcompatible = \"arm,armv8-timer\";\n \t\tallwinner,erratum-unknown1;\n@@ -918,7 +936,6 @@\n \t\t\tresets = <&ccu RST_BUS_I2S2>;\n \t\t\tdma-names = \"rx\", \"tx\";\n \t\t\tdmas = <&dma 27>, <&dma 27>;\n-\t\t\tstatus = \"disabled\";\n \t\t};\n \n \t\tdai: dai@1c22c00 {\n@@ -1218,6 +1235,7 @@\n \t\t};\n \n \t\thdmi: hdmi@1ee0000 {\n+\t\t\t#sound-dai-cells = <0>;\n \t\t\tcompatible = \"allwinner,sun50i-a64-dw-hdmi\",\n \t\t\t\t     \"allwinner,sun8i-a83t-dw-hdmi\";\n \t\t\treg = <0x01ee0000 0x10000>;\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0041-bpi-m2u-analog-codec.patch",
    "content": "From 958ad802878443a2f5f06f5f3c796d163fd03ca9 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Mon, 24 Aug 2020 16:35:54 +0200\nSubject: [PATCH 16/17] dts: enable analog codec\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n .../boot/dts/sun8i-r40-bananapi-m2-ultra.dts  |  9 ++++\n arch/arm/boot/dts/sun8i-r40.dtsi              | 42 +++++++++++++++++++\n 2 files changed, 51 insertions(+)\n\n--- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts\n+++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts\n@@ -113,6 +113,15 @@\n \tstatus = \"okay\";\n };\n \n+&codec {\n+\tallwinner,audio-routing =\n+\t\t\"Headphone\", \"HP\",\n+\t\t\"Headphone\", \"HPCOM\",\n+\t\t\"MIC1\", \"Mic\",\n+\t\t\"Mic\",  \"MBIAS\";\n+\tstatus = \"okay\";\n+};\n+\n &de {\n \tstatus = \"okay\";\n };\n--- a/arch/arm/boot/dts/sun8i-r40.dtsi\n+++ b/arch/arm/boot/dts/sun8i-r40.dtsi\n@@ -736,6 +736,25 @@\n \t\t\tstatus = \"disabled\";\n \t\t};\n \n+\t\tcodec: codec@01c22c00 {\n+\t\t\t#sound-dai-cells = <0>;\n+\t\t\tcompatible = \"allwinner,sun8i-h3-codec\";\n+\t\t\treg = <0x01c22c00 0x300>;\n+\t\t\tinterrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;\n+\t\t\tclocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_CODEC>;\n+\t\t\tclock-names = \"apb\", \"codec\";\n+\t\t\tresets = <&ccu RST_BUS_CODEC>;\n+\t\t\tdmas = <&dma 19>, <&dma 19>;\n+\t\t\tdma-names = \"rx\", \"tx\";\n+\t\t\tallwinner,codec-analog-controls = <&codec_analog>;\n+\t\t\tstatus = \"disabled\";\n+\t\t};\n+\n+\t\tcodec_analog: codec-analog@01c22f00 {\n+\t\t\tcompatible = \"allwinner,sun8i-a23-codec-analog\";\n+\t\t\treg = <0x01c22f00 0x4>;\n+\t\t};\n+\n \t\tths: thermal-sensor@1c24c00 {\n \t\t\tcompatible = \"allwinner,sun8i-r40-ths\";\n \t\t\treg = <0x01c24c00 0x100>;\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0042-r40-hdmi-audio-wip.patch",
    "content": "From 4347f8f825bf0a775ab552ca37eaa2204fb65188 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Sun, 16 Aug 2020 11:01:11 +0200\nSubject: [PATCH 17/17] r40 hdmi audio wip\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n arch/arm/boot/dts/sun8i-r40.dtsi | 19 +++++++++++++++++++\n 1 file changed, 19 insertions(+)\n\n--- a/arch/arm/boot/dts/sun8i-r40.dtsi\n+++ b/arch/arm/boot/dts/sun8i-r40.dtsi\n@@ -111,6 +111,24 @@\n \t\tstatus = \"disabled\";\n \t};\n \n+\tsound_hdmi: sound {\n+\t\tcompatible = \"simple-audio-card\";\n+\t\tsimple-audio-card,format = \"i2s\";\n+\t\tsimple-audio-card,name = \"allwinner-hdmi\";\n+\t\tsimple-audio-card,mclk-fs = <128>;\n+\t\tsimple-audio-card,frame-inversion;\n+\n+\t\tsimple-audio-card,codec {\n+\t\t\tsound-dai = <&hdmi>;\n+\t\t};\n+\n+\t\tsimple-audio-card,cpu {\n+\t\t\tsound-dai = <&i2s2>;\n+\t\t\tdai-tdm-slot-num = <2>;\n+\t\t\tdai-tdm-slot-width = <32>;\n+\t\t};\n+\t};\n+\n \tthermal-zones {\n \t\tcpu_thermal: cpu0-thermal {\n \t\t\t/* milliseconds */\n@@ -1186,6 +1217,7 @@\n \t\t};\n \n \t\thdmi: hdmi@1ee0000 {\n+\t\t\t#sound-dai-cells = <0>;\n \t\t\tcompatible = \"allwinner,sun8i-r40-dw-hdmi\",\n \t\t\t\t     \"allwinner,sun8i-a83t-dw-hdmi\";\n \t\t\treg = <0x01ee0000 0x10000>;\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0043-HACK-h6-Add-HDMI-sound-card.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Sat, 16 Jan 2021 10:58:14 +0100\nSubject: [PATCH] HACK: h6: Add HDMI sound card\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 20 +++++++++++++++++++-\n 1 file changed, 19 insertions(+), 1 deletion(-)\n\n--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi\n@@ -108,6 +108,24 @@\n \t\t\t(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;\n \t};\n \n+\tsound_hdmi: sound {\n+\t\tcompatible = \"simple-audio-card\";\n+\t\tsimple-audio-card,format = \"i2s\";\n+\t\tsimple-audio-card,name = \"allwinner-hdmi\";\n+\t\tsimple-audio-card,mclk-fs = <128>;\n+\t\tsimple-audio-card,frame-inversion;\n+\n+\t\tsimple-audio-card,codec {\n+\t\t\tsound-dai = <&hdmi>;\n+\t\t};\n+\n+\t\tsimple-audio-card,cpu {\n+\t\t\tsound-dai = <&i2s1>;\n+\t\t\tdai-tdm-slot-num = <2>;\n+\t\t\tdai-tdm-slot-width = <32>;\n+\t\t};\n+\t};\n+\n \tsoc {\n \t\tcompatible = \"simple-bus\";\n \t\t#address-cells = <1>;\n@@ -664,7 +682,6 @@\n \t\t\tdmas = <&dma 4>, <&dma 4>;\n \t\t\tresets = <&ccu RST_BUS_I2S1>;\n \t\t\tdma-names = \"rx\", \"tx\";\n-\t\t\tstatus = \"disabled\";\n \t\t};\n \n \t\tspdif: spdif@5093000 {\n@@ -801,6 +818,7 @@\n \t\t};\n \n \t\thdmi: hdmi@6000000 {\n+\t\t\t#sound-dai-cells = <0>;\n \t\t\tcompatible = \"allwinner,sun50i-h6-dw-hdmi\";\n \t\t\treg = <0x06000000 0x10000>;\n \t\t\treg-io-width = <1>;\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0044-net-stmmac-sun8i-Use-devm_regulator_get-for-PHY-regu.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Ondrej Jirman <megous@megous.com>\nDate: Wed, 27 Mar 2019 13:21:06 +0100\nSubject: [PATCH] net: stmmac: sun8i: Use devm_regulator_get for PHY regulator\n\nUse devm_regulator_get instead of devm_regulator_get_optional and rely\non dummy supply. This avoids NULL checks before regulator_enable/disable\ncalls.\n\nThis path also improves error reporting, because we now report both\nuse of dummy supply and error during registration with more detail,\ninstead of generic info level message \"No regulator found\" that\nwas reported previously on errors and lack of regulator property in DT.\n\nFinally, we'll be adding further optional regulators, and the overall\ncode will be simpler.\n\nSigned-off-by: Ondrej Jirman <megous@megous.com>\n---\n .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 23 ++++++++-----------\n 1 file changed, 10 insertions(+), 13 deletions(-)\n\n--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c\n+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c\n@@ -571,12 +571,10 @@ static int sun8i_dwmac_init(struct platf\n \tstruct sunxi_priv_data *gmac = priv;\n \tint ret;\n \n-\tif (gmac->regulator) {\n-\t\tret = regulator_enable(gmac->regulator);\n-\t\tif (ret) {\n-\t\t\tdev_err(&pdev->dev, \"Fail to enable regulator\\n\");\n-\t\t\treturn ret;\n-\t\t}\n+\tret = regulator_enable(gmac->regulator);\n+\tif (ret) {\n+\t\tdev_err(&pdev->dev, \"Fail to enable regulator\\n\");\n+\t\treturn ret;\n \t}\n \n \tret = clk_prepare_enable(gmac->tx_clk);\n@@ -1045,8 +1043,7 @@ static void sun8i_dwmac_exit(struct plat\n \n \tclk_disable_unprepare(gmac->tx_clk);\n \n-\tif (gmac->regulator)\n-\t\tregulator_disable(gmac->regulator);\n+\tregulator_disable(gmac->regulator);\n }\n \n static void sun8i_dwmac_set_mac_loopback(void __iomem *ioaddr, bool enable)\n@@ -1174,12 +1171,12 @@ static int sun8i_dwmac_probe(struct plat\n \t}\n \n \t/* Optional regulator for PHY */\n-\tgmac->regulator = devm_regulator_get_optional(dev, \"phy\");\n+\tgmac->regulator = devm_regulator_get(dev, \"phy\");\n \tif (IS_ERR(gmac->regulator)) {\n-\t\tif (PTR_ERR(gmac->regulator) == -EPROBE_DEFER)\n-\t\t\treturn -EPROBE_DEFER;\n-\t\tdev_info(dev, \"No regulator found\\n\");\n-\t\tgmac->regulator = NULL;\n+\t\tret = PTR_ERR(gmac->regulator);\n+\t\tif (ret != -EPROBE_DEFER)\n+\t\t\tdev_err(dev, \"Failed to get PHY regulator (%d)\\n\", ret);\n+\t\treturn ret;\n \t}\n \n \t/* The \"GMAC clock control\" register might be located in the\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0045-net-stmmac-sun8i-Rename-PHY-regulator-variable-to-re.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Ondrej Jirman <megous@megous.com>\nDate: Tue, 20 Aug 2019 14:29:29 +0200\nSubject: [PATCH] net: stmmac: sun8i: Rename PHY regulator variable to\n regulator_phy\n\nWe'll be adding further optional regulators, and this makes it clearer\nwhat the regulator is for.\n\nSigned-off-by: Ondrej Jirman <megous@megous.com>\n---\n .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 39 +++++++++----------\n 1 file changed, 19 insertions(+), 20 deletions(-)\n\n--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c\n+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c\n@@ -57,18 +57,20 @@ struct emac_variant {\n };\n \n /* struct sunxi_priv_data - hold all sunxi private data\n- * @ephy_clk:\treference to the optional EPHY clock for the internal PHY\n- * @regulator:\treference to the optional regulator\n- * @rst_ephy:\treference to the optional EPHY reset for the internal PHY\n- * @variant:\treference to the current board variant\n- * @regmap:\tregmap for using the syscon\n- * @internal_phy_powered: Does the internal PHY is enabled\n- * @use_internal_phy: Is the internal PHY selected for use\n- * @mux_handle:\tInternal pointer used by mdio-mux lib\n+ * @ephy_clk:\t\t\treference to the optional EPHY clock for\n+ *\t\t\t\tthe internal PHY\n+ * @regulator_phy:\t\treference to the optional regulator\n+ * @rst_ephy:\t\t\treference to the optional EPHY reset for\n+ *\t\t\t\tthe internal PHY\n+ * @variant:\t\t\treference to the current board variant\n+ * @regmap:\t\t\tregmap for using the syscon\n+ * @internal_phy_powered:\tDoes the internal PHY is enabled\n+ * @use_internal_phy:\t\tIs the internal PHY selected for use\n+ * @mux_handle:\t\t\tInternal pointer used by mdio-mux lib\n  */\n struct sunxi_priv_data {\n \tstruct clk *ephy_clk;\n-\tstruct regulator *regulator;\n+\tstruct regulator *regulator_phy;\n \tstruct reset_control *rst_ephy;\n \tconst struct emac_variant *variant;\n \tstruct regmap_field *regmap_field;\n@@ -571,9 +573,9 @@ static int sun8i_dwmac_init(struct platf\n \tstruct sunxi_priv_data *gmac = priv;\n \tint ret;\n \n-\tret = regulator_enable(gmac->regulator);\n+\tret = regulator_enable(gmac->regulator_phy);\n \tif (ret) {\n-\t\tdev_err(&pdev->dev, \"Fail to enable regulator\\n\");\n+\t\tdev_err(&pdev->dev, \"Fail to enable PHY regulator\\n\");\n \t\treturn ret;\n \t}\n \n@@ -594,8 +596,7 @@ static int sun8i_dwmac_init(struct platf\n err_disable_clk:\n \tclk_disable_unprepare(gmac->tx_clk);\n err_disable_regulator:\n-\tif (gmac->regulator)\n-\t\tregulator_disable(gmac->regulator);\n+\tregulator_disable(gmac->regulator_phy);\n \n \treturn ret;\n }\n@@ -1043,7 +1044,7 @@ static void sun8i_dwmac_exit(struct plat\n \n \tclk_disable_unprepare(gmac->tx_clk);\n \n-\tregulator_disable(gmac->regulator);\n+\tregulator_disable(gmac->regulator_phy);\n }\n \n static void sun8i_dwmac_set_mac_loopback(void __iomem *ioaddr, bool enable)\n@@ -1171,11 +1172,9 @@ static int sun8i_dwmac_probe(struct plat\n \t}\n \n \t/* Optional regulator for PHY */\n-\tgmac->regulator = devm_regulator_get(dev, \"phy\");\n-\tif (IS_ERR(gmac->regulator)) {\n-\t\tret = PTR_ERR(gmac->regulator);\n-\t\tif (ret != -EPROBE_DEFER)\n-\t\t\tdev_err(dev, \"Failed to get PHY regulator (%d)\\n\", ret);\n+\tgmac->regulator_phy = devm_regulator_get(dev, \"phy\");\n+\tif (IS_ERR(gmac->regulator_phy)) {\n+\t\tdev_err_probe(dev, ret, \"Failed to get PHY regulator\\n\");\n \t\treturn ret;\n \t}\n \n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0046-net-stmmac-sun8i-Add-support-for-enabling-a-regulato.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Ondrej Jirman <megous@megous.com>\nDate: Tue, 20 Aug 2019 14:31:38 +0200\nSubject: [PATCH] net: stmmac: sun8i: Add support for enabling a regulator for\n PHY I/O pins\n\nOrange Pi 3 has two regulators that power the Realtek RTL8211E. According\nto the phy datasheet, both regulators need to be enabled at the same time.\n\nAdd support for the second optional regulator, \"phy-io\", to the glue\ndriver.\n\nSigned-off-by: Ondrej Jirman <megous@megous.com>\n---\n .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 23 ++++++++++++++++++-\n 1 file changed, 22 insertions(+), 1 deletion(-)\n\n--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c\n+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c\n@@ -61,6 +61,8 @@ struct emac_variant {\n  * @ephy_clk:\t\t\treference to the optional EPHY clock for\n  *\t\t\t\tthe internal PHY\n  * @regulator_phy:\t\treference to the optional regulator\n+ * @regulator_phy_io:\t\treference to the optional regulator for\n+ *\t\t\t\tPHY I/O pins\n  * @rst_ephy:\t\t\treference to the optional EPHY reset for\n  *\t\t\t\tthe internal PHY\n  * @variant:\t\t\treference to the current board variant\n@@ -73,6 +75,7 @@\n struct sunxi_priv_data {\n \tstruct clk *ephy_clk;\n \tstruct regulator *regulator_phy;\n+\tstruct regulator *regulator_phy_io;\n \tstruct reset_control *rst_ephy;\n \tconst struct emac_variant *variant;\n \tstruct regmap_field *regmap_field;\n@@ -573,10 +576,16 @@ static int sun8i_dwmac_init(struct platf\n \tstruct sunxi_priv_data *gmac = priv;\n \tint ret;\n \n+\tret = regulator_enable(gmac->regulator_phy_io);\n+\tif (ret) {\n+\t\tdev_err(&pdev->dev, \"Fail to enable PHY I/O regulator\\n\");\n+\t\treturn ret;\n+\t}\n+\n \tret = regulator_enable(gmac->regulator_phy);\n \tif (ret) {\n \t\tdev_err(&pdev->dev, \"Fail to enable PHY regulator\\n\");\n-\t\treturn ret;\n+\t\tgoto err_disable_regulator_phy_io;\n \t}\n \n \tret = clk_prepare_enable(gmac->tx_clk);\n@@ -597,6 +606,8 @@ err_disable_clk:\n \tclk_disable_unprepare(gmac->tx_clk);\n err_disable_regulator:\n \tregulator_disable(gmac->regulator_phy);\n+err_disable_regulator_phy_io:\n+\tregulator_disable(gmac->regulator_phy_io);\n \n \treturn ret;\n }\n@@ -1045,6 +1056,7 @@ static void sun8i_dwmac_exit(struct plat\n \tclk_disable_unprepare(gmac->tx_clk);\n \n \tregulator_disable(gmac->regulator_phy);\n+\tregulator_disable(gmac->regulator_phy_io);\n }\n \n static void sun8i_dwmac_set_mac_loopback(void __iomem *ioaddr, bool enable)\n@@ -1178,6 +1190,15 @@ static int sun8i_dwmac_probe(struct plat\n \t\treturn ret;\n \t}\n \n+\t/* Optional regulator for PHY I/O pins */\n+\tgmac->regulator_phy_io = devm_regulator_get(dev, \"phy-io\");\n+\tif (IS_ERR(gmac->regulator_phy_io)) {\n+\t\tret = PTR_ERR(gmac->regulator_phy_io);\n+\t\tif (ret != -EPROBE_DEFER)\n+\t\t\tdev_err(dev, \"Failed to get PHY I/O regulator (%d)\\n\", ret);\n+\t\treturn ret;\n+\t}\n+\n \t/* The \"GMAC clock control\" register might be located in the\n \t * CCU address range (on the R40), or the system control address\n \t * range (on most other sun8i and later SoCs).\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0047-arm64-dts-allwinner-orange-pi-3-Enable-ethernet.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Ondrej Jirman <megous@megous.com>\nDate: Tue, 20 Aug 2019 14:54:48 +0200\nSubject: [PATCH] arm64: dts: allwinner: orange-pi-3: Enable ethernet\n\nOrange Pi 3 has two regulators that power the Realtek RTL8211E\nPHY. According to the datasheet, both regulators need to be enabled\nat the same time, or that \"phy-io\" should be enabled slightly earlier\nthan \"phy\" regulator.\n\nRTL8211E/RTL8211EG datasheet says:\n\n  Note 4: 2.5V (or 1.8/1.5V) RGMII power should be risen simultaneously\n  or slightly earlier than 3.3V power. Rising 2.5V (or 1.8/1.5V) power\n  later than 3.3V power may lead to errors.\n\nThe driver ensures the regulator enable ordering. The timing is set\nin DT via startup-delay-us.\n\nWe also need to wait at least 30ms after power-up/reset, before\naccessing the PHY registers.\n\nAll values of RX/TX delay were tested exhaustively and a middle one\nof the range of working values was chosen.\n\nSigned-off-by: Ondrej Jirman <megous@megous.com>\n---\n .../dts/allwinner/sun50i-h6-orangepi-3.dts    | 40 +++++++++++++++++++\n 1 file changed, 40 insertions(+)\n\n--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts\n@@ -15,6 +15,7 @@\n \taliases {\n \t\tserial0 = &uart0;\n \t\tserial1 = &uart1;\n+\t\tethernet0 = &emac;\n \t};\n \n \tchosen {\n@@ -64,6 +65,15 @@\n \t\tregulator-always-on;\n \t};\n \n+\treg_gmac_2v5: gmac-2v5 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"gmac-2v5\";\n+\t\tregulator-min-microvolt = <2500000>;\n+\t\tregulator-max-microvolt = <2500000>;\n+\t\tenable-active-high;\n+\t\tgpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */\n+\t};\n+\n \treg_vcc33_wifi: vcc33-wifi {\n \t\t/* Always on 3.3V regulator for WiFi and BT */\n \t\tcompatible = \"regulator-fixed\";\n@@ -128,6 +138,35 @@\n \t};\n };\n \n+&emac {\n+\tpinctrl-names = \"default\";\n+\tpinctrl-0 = <&ext_rgmii_pins>;\n+\tphy-mode = \"rgmii-txid\";\n+\tphy-handle = <&ext_rgmii_phy>;\n+\t/*\n+\t * The board uses 2.5V RGMII signalling. Power sequence to enable\n+\t * the phy is to enable GMAC-2V5 and GMAC-3V (aldo2) power rails\n+\t * at the same time and to wait 100ms. The driver enables phy-io\n+\t * first. Delay is achieved with enable-ramp-delay on reg_aldo2.\n+\t */\n+\tphy-supply = <&reg_aldo2>;\n+\tphy-io-supply = <&reg_gmac_2v5>;\n+\tallwinner,rx-delay-ps = <1500>;\n+\tallwinner,tx-delay-ps = <700>;\n+\tstatus = \"okay\";\n+};\n+\n+&mdio {\n+\text_rgmii_phy: ethernet-phy@1 {\n+\t\tcompatible = \"ethernet-phy-ieee802.3-c22\";\n+\t\treg = <1>;\n+\n+\t\treset-gpios = <&pio 3 14 GPIO_ACTIVE_LOW>; /* PD14 */\n+\t\treset-assert-us = <15000>;\n+\t\treset-deassert-us = <40000>;\n+\t};\n+};\n+\n &mmc0 {\n \tvmmc-supply = <&reg_cldo1>;\n \tcd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */\n@@ -211,6 +250,7 @@\n \t\t\t\tregulator-min-microvolt = <3300000>;\n \t\t\t\tregulator-max-microvolt = <3300000>;\n \t\t\t\tregulator-name = \"vcc33-audio-tv-ephy-mac\";\n+\t\t\t\tregulator-enable-ramp-delay = <100000>;\n \t\t\t};\n \n \t\t\t/* ALDO3 is shorted to CLDO1 */\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0048-arm64-allwinner-dts-h6-enable-USB3-port-on-Pine-H64.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Icenowy Zheng <icenowy@aosc.io>\nDate: Mon, 25 Dec 2017 12:10:59 +0800\nSubject: [PATCH] arm64: allwinner: dts: h6: enable USB3 port on Pine H64\n\nPine H64 board have a USB3 port, which is connected to the USB3 pins of\nthe H6 SoC, and the 5V power supply is controlled via GPIO (shared with\nthe power USB ports).\n\nEnable this port.\n\nSigned-off-by: Icenowy Zheng <icenowy@aosc.io>\nReviewed-by: Chen-Yu Tsai <wens@csie.org>\n---\n arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\n--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts\n@@ -97,6 +97,10 @@\n \tstatus = \"okay\";\n };\n \n+&dwc3 {\n+\tstatus = \"okay\";\n+};\n+\n &emac {\n \tpinctrl-names = \"default\";\n \tpinctrl-0 = <&ext_rgmii_pins>;\n@@ -332,3 +336,8 @@\n \tusb3_vbus-supply = <&reg_usb_vbus>;\n \tstatus = \"okay\";\n };\n+\n+&usb3phy {\n+\tphy-supply = <&reg_usb_vbus>;\n+\tstatus = \"okay\";\n+};\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0049-arm64-dts-allwinner-h6-Add-AC200-EPHY-related-nodes.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Fri, 16 Aug 2019 16:40:20 +0200\nSubject: [PATCH] arm64: dts: allwinner: h6: Add AC200 EPHY related nodes\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 56 ++++++++++++++++++++\n 1 file changed, 56 insertions(+)\n\n--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi\n@@ -16,6 +16,16 @@\n \t#address-cells = <1>;\n \t#size-cells = <1>;\n \n+\tac200_pwm_clk: ac200_clk {\n+\t\tcompatible = \"pwm-clock\";\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <24000000>;\n+\t\tpinctrl-names = \"default\";\n+\t\tpinctrl-0 = <&pwm1_pin>;\n+\t\tpwms = <&pwm 1 42 0>;\n+\t\tstatus = \"disabled\";\n+\t};\n+\n \tcpus {\n \t\t#address-cells = <1>;\n \t\t#size-cells = <0>;\n@@ -319,6 +329,10 @@\n \t\t\tcpu_speed_grade: cpu-speed-grade@1c {\n \t\t\t\treg = <0x1c 0x4>;\n \t\t\t};\n+\n+\t\t\tephy_calib: ephy_calib@2c {\n+\t\t\t\treg = <0x2c 0x2>;\n+\t\t\t};\n \t\t};\n \n \t\ttimer@3009000 {\n@@ -373,6 +387,13 @@\n \t\t\t\tdrive-strength = <40>;\n \t\t\t};\n \n+\t\t\text_rmii_pins: rmii_pins {\n+\t\t\t\tpins = \"PA0\", \"PA1\", \"PA2\", \"PA3\", \"PA4\",\n+\t\t\t\t       \"PA5\", \"PA6\", \"PA7\", \"PA8\", \"PA9\";\n+\t\t\t\tfunction = \"emac\";\n+\t\t\t\tdrive-strength = <40>;\n+\t\t\t};\n+\n \t\t\thdmi_pins: hdmi-pins {\n \t\t\t\tpins = \"PH8\", \"PH9\", \"PH10\";\n \t\t\t\tfunction = \"hdmi\";\n@@ -393,6 +414,11 @@\n \t\t\t\tfunction = \"i2c2\";\n \t\t\t};\n \n+\t\t\ti2c3_pins: i2c3-pins {\n+\t\t\t\tpins = \"PB17\", \"PB18\";\n+\t\t\t\tfunction = \"i2c3\";\n+\t\t\t};\n+\n \t\t\tmmc0_pins: mmc0-pins {\n \t\t\t\tpins = \"PF0\", \"PF1\", \"PF2\", \"PF3\",\n \t\t\t\t       \"PF4\", \"PF5\";\n@@ -419,6 +445,11 @@\n \t\t\t\tbias-pull-up;\n \t\t\t};\n \n+\t\t\tpwm1_pin: pwm1-pin {\n+\t\t\t\tpins = \"PB19\";\n+\t\t\t\tfunction = \"pwm1\";\n+\t\t\t};\n+\n \t\t\t/omit-if-no-ref/\n \t\t\tspi0_pins: spi0-pins {\n \t\t\t\tpins = \"PC0\", \"PC2\", \"PC3\";\n@@ -652,6 +683,31 @@\n \t\t\t#size-cells = <0>;\n \t\t};\n \n+\t\ti2c3: i2c@5002c00 {\n+\t\t\tcompatible = \"allwinner,sun6i-a31-i2c\";\n+\t\t\treg = <0x05002c00 0x400>;\n+\t\t\tinterrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;\n+\t\t\tclocks = <&ccu CLK_BUS_I2C3>;\n+\t\t\tresets = <&ccu RST_BUS_I2C3>;\n+\t\t\tpinctrl-names = \"default\";\n+\t\t\tpinctrl-0 = <&i2c3_pins>;\n+\t\t\tstatus = \"disabled\";\n+\t\t\t#address-cells = <1>;\n+\t\t\t#size-cells = <0>;\n+\n+\t\t\tac200: mfd@10 {\n+\t\t\t\tcompatible = \"x-powers,ac200\";\n+\t\t\t\treg = <0x10>;\n+\t\t\t\tclocks = <&ac200_pwm_clk>;\n+\n+\t\t\t\tac200_ephy: phy {\n+\t\t\t\t\tcompatible = \"x-powers,ac200-ephy\";\n+\t\t\t\t\tnvmem-cells = <&ephy_calib>;\n+\t\t\t\t\tnvmem-cell-names = \"ephy_calib\";\n+\t\t\t\t};\n+\t\t\t};\n+\t\t};\n+\n \t\temac: ethernet@5020000 {\n \t\t\tcompatible = \"allwinner,sun50i-h6-emac\",\n \t\t\t\t     \"allwinner,sun50i-a64-emac\";\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0051-arm64-dts-allwinner-h6-tanix-tx6-enable-ethernet.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Sat, 24 Aug 2019 01:03:05 +0200\nSubject: [PATCH] arm64: dts: allwinner: h6: tanix-tx6: enable ethernet\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n .../dts/allwinner/sun50i-h6-tanix.dtsi     | 28 +++++++++++++++++++\n 1 file changed, 28 insertions(+)\n\n--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi\n@@ -13,6 +13,7 @@\n \n / {\n \taliases {\n+\t\tethernet0 = &emac;\n \t\tserial0 = &uart0;\n \t};\n \n@@ -54,6 +55,10 @@\n \t};\n };\n \n+&ac200_pwm_clk {\n+\tstatus = \"okay\";\n+};\n+\n &cpu0 {\n \tcpu-supply = <&reg_vdd_cpu_gpu>;\n };\n@@ -74,6 +79,14 @@\n \tstatus = \"okay\";\n };\n \n+&emac {\n+\tpinctrl-names = \"default\";\n+\tpinctrl-0 = <&ext_rmii_pins>;\n+\tphy-mode = \"rmii\";\n+\tphy-handle = <&ext_rmii_phy>;\n+\tstatus = \"okay\";\n+};\n+\n &gpu {\n \tmali-supply = <&reg_vdd_cpu_gpu>;\n \tstatus = \"okay\";\n@@ -89,6 +102,17 @@\n \t};\n };\n \n+&i2c3 {\n+\tstatus = \"okay\";\n+};\n+\n+&mdio {\n+\text_rmii_phy: ethernet-phy@1 {\n+\t\tcompatible = \"ethernet-phy-ieee802.3-c22\";\n+\t\treg = <1>;\n+\t};\n+};\n+\n &mmc0 {\n \tpinctrl-names = \"default\";\n \tpinctrl-0 = <&mmc0_pins>;\n@@ -119,6 +143,10 @@\n \tvcc-pg-supply = <&reg_vcc1v8>;\n };\n \n+&pwm {\n+\tstatus = \"okay\";\n+};\n+\n &r_ir {\n \tstatus = \"okay\";\n };\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0052-arm64-allwinner-h6-Enable-USB3-for-OrangePi-Lite2.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Sebastian Meyer <git-commit@mailhell.seb7.de>\nDate: Mon, 3 Feb 2020 21:27:47 +0100\nSubject: [PATCH] arm64: allwinner: h6: Enable USB3 for OrangePi Lite2\n\nSigned-off-by: Sebastian Meyer <git-commit@mailhell.seb7.de>\n---\n .../allwinner/sun50i-h6-orangepi-lite2.dts    | 19 +++++++++++++++++++\n 1 file changed, 19 insertions(+)\n\n--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts\n@@ -11,6 +11,16 @@\n \t\tserial1 = &uart1; /* BT-UART */\n \t};\n \n+\treg_usb_vbus: vbus {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"usb-vbus\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tstartup-delay-us = <100000>;\n+\t\tgpio = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 USB0-DRVVBUS */\n+\t\tenable-active-high;\n+\t};\n+\n \twifi_pwrseq: wifi_pwrseq {\n \t\tcompatible = \"mmc-pwrseq-simple\";\n \t\tclocks = <&rtc 1>;\n@@ -20,6 +30,10 @@\n \t};\n };\n \n+&dwc3 {\n+\tstatus = \"okay\";\n+};\n+\n &mmc1 {\n \tvmmc-supply = <&reg_cldo2>;\n \tvqmmc-supply = <&reg_bldo3>;\n@@ -72,3 +86,8 @@\n \t\tmax-speed = <1500000>;\n \t};\n };\n+\n+&usb3phy {\n+\tphy-supply = <&reg_usb_vbus>;\n+\tstatus = \"okay\";\n+};\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0053-mmc-sunxi-fix-unusuable-eMMC-on-some-H6-boards-by-di.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?=\n <alejandro.gonzalez.correo@gmail.com>\nDate: Sun, 25 Aug 2019 17:05:58 +0200\nSubject: [PATCH] mmc: sunxi: fix unusuable eMMC on some H6 boards by disabling\n DDR\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nSome Allwinner H6 boards have timing problems when dealing with\nDDR-capable eMMC cards. These boards include the Pine H64 and Tanix TX6.\n\nThese timing problems result in out of sync communication between the\ndriver and the eMMC, which renders the memory unsuable for every\noperation but some basic commmands, like reading the status register.\n\nThe cause of these timing problems is not yet well known, but they go\naway by disabling DDR mode operation in the driver. Like on some H5\nboards, it might be that the traces are not precise enough to support\nthese speeds. However, Jernej Skrabec compared the BSP driver with this\ndriver, and found that the BSP driver configures pinctrl to operate at\n1.8 V when entering DDR mode (although 3.3 V operation is supported), while\nthe mainline kernel lacks any mechanism to switch voltages dynamically.\nFinally, other possible cause might be some timing parameter that is\ndifferent on the H6 with respect to other SoCs.\n\nTherefore, as this fix works reliably, the kernel lacks the required\ndynamic pinctrl control for now and a slow eMMC is better than a not\nworking eMMC, just disable DDR operation for now on H6-compatible\ndevices.\n\nSigned-off-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>\n---\n drivers/mmc/host/sunxi-mmc.c | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)\n\n--- a/drivers/mmc/host/sunxi-mmc.c\n+++ b/drivers/mmc/host/sunxi-mmc.c\n@@ -1421,14 +1421,17 @@ static int sunxi_mmc_probe(struct platfo\n \n \t/*\n \t * Some H5 devices do not have signal traces precise enough to\n-\t * use HS DDR mode for their eMMC chips.\n+\t * use HS DDR mode for their eMMC chips. Other H6 devices operate\n+\t * unreliably on HS DDR mode, too.\n \t *\n \t * We still enable HS DDR modes for all the other controller\n-\t * variants that support them.\n+\t * variants that support them properly.\n \t */\n \tif ((host->cfg->clk_delays || host->use_new_timings) &&\n \t    !of_device_is_compatible(pdev->dev.of_node,\n-\t\t\t\t     \"allwinner,sun50i-h5-emmc\"))\n+\t\t\t\t     \"allwinner,sun50i-h5-emmc\") &&\n+\t    !of_device_is_compatible(pdev->dev.of_node,\n+\t\t\t\t     \"allwinner,sun50i-h6-emmc\"))\n \t\tmmc->caps      |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR;\n \n \tret = mmc_of_parse(mmc);\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0054-arm64-dts-allwinner-h6-tanix-tx6-enable-rtw88-wifi-in-dts.patch",
    "content": "From ba918badf612c19b4e31a57b2ff4baa06e99d7d5 Mon Sep 17 00:00:00 2001\nFrom: heitbaum <rudi@heitbaum.com>\nDate: Sun, 23 May 2021 06:37:45 +0000\nSubject: [PATCH] Allwinner: linux: add wifi node for rtl8822cs (rtw88)\n\nAdd and enable dts node for rtw88 (rtl8822cs sdio)\n\n# udevadm info /sys/bus/sdio/devices/mmc1\\:0001\\:1/\nP: /devices/platform/soc/4021000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1\nL: 0\nE:\nDEVPATH=/devices/platform/soc/4021000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1\nE: OF_NAME=sdio-wifi\nE: OF_FULLNAME=/soc/mmc@4021000/sdio-wifi@1\nE: OF_COMPATIBLE_N=0\nE: SDIO_CLASS=07\nE: SDIO_ID=024C:C822\nE: SDIO_REVISION=0.0\nE: MODALIAS=sdio:c07v024CdC822\nE: SUBSYSTEM=sdio\n\n---\n .../dts/allwinner/sun50i-h6-tanix-tx6.dtsi     | 17 +++++++++++++++++\n 1 file changed, 17 insertions(+)\n\n--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi\n@@ -52,6 +52,16 @@\n \t\tregulator-max-microvolt = <3300000>;\n \t};\n \n+\treg_vcc_wifi_io: vcc-wifi-io {\n+\t\t/* Always on 1.8V/300mA regulator for WiFi and BT IO */\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"vcc-wifi-io\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tregulator-always-on;\n+\t\tvin-supply = <&reg_vcc3v3>;\n+\t};\n+\n \treg_vdd_cpu_gpu: regulator-vdd-cpu-gpu {\n \t\tcompatible = \"regulator-fixed\";\n \t\tregulator-name = \"vdd-cpu-gpu\";\n@@ -159,6 +169,13 @@\n \tbus-width = <4>;\n \tnon-removable;\n \tstatus = \"okay\";\n+\n+\trtl8822cs: sdio-wifi@1 {\n+\t\treg = <1>;\n+\t\tinterrupt-parent = <&r_pio>;\n+\t\tinterrupts = <1 0 IRQ_TYPE_LEVEL_LOW>; /* PM0 */\n+\t\tinterrupt-names = \"host-wake\";\n+\t};\n };\n \n &mmc2 {\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0055-WIp-10-bit-HEVC-support.patch",
    "content": "From 54389b5956af51023b073a08eeb7a746a4a37119 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@siol.net>\nDate: Sun, 15 Mar 2020 21:35:39 +0100\nSubject: [PATCH 31/44] WIp: 10-bit HEVC support\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n drivers/staging/media/sunxi/cedrus/cedrus.c   |  4 +--\n .../staging/media/sunxi/cedrus/cedrus_h265.c  | 12 ++++++++\n .../staging/media/sunxi/cedrus/cedrus_regs.h  |  4 +++\n .../staging/media/sunxi/cedrus/cedrus_video.c | 30 +++++++++++++++----\n .../staging/media/sunxi/cedrus/cedrus_video.h |  2 +-\n 5 files changed, 44 insertions(+), 8 deletions(-)\n\n--- a/drivers/staging/media/sunxi/cedrus/cedrus.c\n+++ b/drivers/staging/media/sunxi/cedrus/cedrus.c\n@@ -289,7 +289,7 @@ static int cedrus_open(struct file *file\n \t\tgoto err_ctrls;\n \t}\n \tctx->dst_fmt.pixelformat = V4L2_PIX_FMT_NV12_32L32;\n-\tcedrus_prepare_format(&ctx->dst_fmt);\n+\tcedrus_prepare_format(&ctx->dst_fmt, 0);\n \tctx->src_fmt.pixelformat = V4L2_PIX_FMT_MPEG2_SLICE;\n \t/*\n \t * TILED_NV12 has more strict requirements, so copy the width and\n@@ -297,7 +297,7 @@ static int cedrus_open(struct file *file\n \t */\n \tctx->src_fmt.width = ctx->dst_fmt.width;\n \tctx->src_fmt.height = ctx->dst_fmt.height;\n-\tcedrus_prepare_format(&ctx->src_fmt);\n+\tcedrus_prepare_format(&ctx->src_fmt, 0);\n \n \tv4l2_fh_add(&ctx->fh);\n \n--- a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c\n+++ b/drivers/staging/media/sunxi/cedrus/cedrus_h265.c\n@@ -534,6 +534,18 @@ static void cedrus_h265_setup(struct ced\n \n \tcedrus_write(dev, VE_DEC_H265_DEC_PCM_CTRL, reg);\n \n+\tif (sps->bit_depth_luma_minus8 == 2) {\n+\t\tunsigned int size;\n+\n+\t\tsize = ALIGN(ctx->src_fmt.width, 16) * ALIGN(ctx->src_fmt.height, 16);\n+\n+\t\treg = (size * 3) / 2;\n+\t\tcedrus_write(dev, VE_DEC_H265_OFFSET_ADDR_FIRST_OUT, reg);\n+\n+\t\treg = DIV_ROUND_UP(ctx->src_fmt.width, 4);\n+\t\tcedrus_write(dev, VE_DEC_H265_10BIT_CONFIGURE, ALIGN(reg, 32));\n+\t}\n+\n \t/* PPS. */\n \n \treg = VE_DEC_H265_DEC_PPS_CTRL0_PPS_CR_QP_OFFSET(pps->pps_cr_qp_offset) |\n--- a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h\n+++ b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h\n@@ -499,6 +499,10 @@\n \n #define VE_DEC_H265_LOW_ADDR\t\t\t(VE_ENGINE_DEC_H265 + 0x80)\n \n+#define VE_DEC_H265_OFFSET_ADDR_FIRST_OUT\t(VE_ENGINE_DEC_H265 + 0x84)\n+#define VE_DEC_H265_OFFSET_ADDR_SECOND_OUT\t(VE_ENGINE_DEC_H265 + 0x88)\n+#define VE_DEC_H265_10BIT_CONFIGURE\t\t(VE_ENGINE_DEC_H265 + 0x8c)\n+\n #define VE_DEC_H265_LOW_ADDR_PRIMARY_CHROMA(a) \\\n \tSHIFT_AND_MASK_BITS(a, 31, 24)\n #define VE_DEC_H265_LOW_ADDR_SECONDARY_CHROMA(a) \\\n--- a/drivers/staging/media/sunxi/cedrus/cedrus_video.c\n+++ b/drivers/staging/media/sunxi/cedrus/cedrus_video.c\n@@ -100,7 +100,7 @@ static struct cedrus_format *cedrus_find\n \treturn &cedrus_formats[i];\n }\n \n-void cedrus_prepare_format(struct v4l2_pix_format *pix_fmt)\n+void cedrus_prepare_format(struct v4l2_pix_format *pix_fmt, int extended)\n {\n \tunsigned int width = pix_fmt->width;\n \tunsigned int height = pix_fmt->height;\n@@ -155,6 +155,17 @@ void cedrus_prepare_format(struct v4l2_p\n \t\tbreak;\n \t}\n \n+\tif (extended) {\n+\t\tunsigned int extra_size;\n+\n+\t\textra_size = DIV_ROUND_UP(pix_fmt->width, 4);\n+\t\textra_size = ALIGN(extra_size, 32);\n+\t\textra_size *= ALIGN(pix_fmt->height, 16) * 3;\n+\t\textra_size /= 2;\n+\n+\t\tsizeimage += extra_size;\n+\t}\n+\n \tpix_fmt->width = width;\n \tpix_fmt->height = height;\n \n@@ -247,17 +258,27 @@ static int cedrus_try_fmt_vid_cap(struct\n \tstruct cedrus_ctx *ctx = cedrus_file2ctx(file);\n \tstruct cedrus_dev *dev = ctx->dev;\n \tstruct v4l2_pix_format *pix_fmt = &f->fmt.pix;\n+\tconst struct v4l2_ctrl_hevc_sps *sps;\n \tstruct cedrus_format *fmt =\n \t\tcedrus_find_format(pix_fmt->pixelformat, CEDRUS_DECODE_DST,\n \t\t\t\t   dev->capabilities);\n+\tint extended;\n \n \tif (!fmt)\n \t\treturn -EINVAL;\n \n+\tsps = cedrus_find_control_data(ctx, V4L2_CID_STATELESS_HEVC_SPS);\n+\n+\t/* The 10-bitHEVC decoder needs extra size on the output buffer. */\n+\textended = ctx->src_fmt.pixelformat == V4L2_PIX_FMT_HEVC_SLICE &&\n+\tsps->bit_depth_luma_minus8 == 2;\n+\n \tpix_fmt->pixelformat = fmt->pixelformat;\n \tpix_fmt->width = ctx->src_fmt.width;\n \tpix_fmt->height = ctx->src_fmt.height;\n-\tcedrus_prepare_format(pix_fmt);\n+\n+\tpix_fmt->pixelformat = fmt->pixelformat;\n+\tcedrus_prepare_format(pix_fmt, extended);\n \n \treturn 0;\n }\n@@ -275,8 +296,7 @@ static int cedrus_try_fmt_vid_out(struct\n \tif (!fmt)\n \t\treturn -EINVAL;\n \n-\tpix_fmt->pixelformat = fmt->pixelformat;\n-\tcedrus_prepare_format(pix_fmt);\n+\tcedrus_prepare_format(pix_fmt, 0);\n \n \treturn 0;\n }\n@@ -357,7 +377,7 @@ static int cedrus_s_fmt_vid_out(struct f\n \tctx->dst_fmt.quantization = f->fmt.pix.quantization;\n \tctx->dst_fmt.width = ctx->src_fmt.width;\n \tctx->dst_fmt.height = ctx->src_fmt.height;\n-\tcedrus_prepare_format(&ctx->dst_fmt);\n+\tcedrus_prepare_format(&ctx->dst_fmt, 0);\n \n \treturn 0;\n }\n--- a/drivers/staging/media/sunxi/cedrus/cedrus_video.h\n+++ b/drivers/staging/media/sunxi/cedrus/cedrus_video.h\n@@ -26,6 +26,6 @@ extern const struct v4l2_ioctl_ops cedru\n \n int cedrus_queue_init(void *priv, struct vb2_queue *src_vq,\n \t\t      struct vb2_queue *dst_vq);\n-void cedrus_prepare_format(struct v4l2_pix_format *pix_fmt);\n+void cedrus_prepare_format(struct v4l2_pix_format *pix_fmt, int extended);\n \n #endif\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0056-bluetooth-btrtl-add-hci-ver-rtl8822cs.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Rudi Heitbaum <rudi@heitbaum.com>\nDate: Sat, 15 Jan 2022 08:09:20 +0000\nSubject: [PATCH] linux: bluetooth btrtl: add hci_ver 0x8 for rtl8822cs_bt\n\nAs found on Tanix TX6.\n\nAdd the missing id hci_ver = 0x8 to the ic_id_table[]\n\nBefore:\n\n[   11.288818] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c lmp_ver=08 lmp_subver=8822\n[   11.512883] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c lmp_ver=08 lmp_subver=8822\n[   11.512940] Bluetooth: hci0: RTL: unknown IC info, lmp subver 8822, hci rev 000c, hci ver 0008\n[   11.512957] Bluetooth: hci0: RTL: no config loaded\n\nAfter:\n\n[   12.642167] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c lmp_ver=08 lmp_subver=8822\n[   12.671911] Bluetooth: hci0: RTL: rom_version status=0 version=3\n[   12.671961] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cs_fw.bin\n[   12.706248] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cs_config.bin\n[   12.730251] Bluetooth: hci0: RTL: cfg_sz 33, total sz 40737\n[   13.318832] Bluetooth: hci0: RTL: fw version 0x05a91a4a\n\nSigned-off-by: Rudi Heitbaum <rudi@heitbaum.com>\n---\n drivers/bluetooth/btrtl.c | 10 +++++++++-\n 1 file changed, 9 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c\n--- a/drivers/bluetooth/btrtl.c\t2022-01-09 22:55:34.000000000 +0000\n+++ b/drivers/bluetooth/btrtl.c\t2022-01-15 07:12:21.102080089 +0000\n@@ -148,7 +148,15 @@\n \t  .fw_name  = \"rtl_bt/rtl8761bu_fw.bin\",\n \t  .cfg_name = \"rtl_bt/rtl8761bu_config\" },\n \n+ \t/* 8822C (hci ver 0008) with UART interface */\n+\t{ IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0x8, HCI_UART),\n+\t  .config_needed = true,\n+\t  .has_rom_version = true,\n+\t  .has_msft_ext = true,\n+\t  .fw_name  = \"rtl_bt/rtl8822cs_fw.bin\",\n+\t  .cfg_name = \"rtl_bt/rtl8822cs_config\" },\n+\n-\t/* 8822C with UART interface */\n+\t/* 8822C (hci ver 000a) with UART interface */\n \t{ IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0xa, HCI_UART),\n \t  .config_needed = true,\n \t  .has_rom_version = true,\n--\n2.25.1\n\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0057-HACK-Disable-MBUS-due-to-fw_devlink-on.patch",
    "content": "From a497a69951518aa93bd622755379a6f607e3ce5d Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\nDate: Sat, 25 Sep 2021 16:21:41 +0200\nSubject: [PATCH] HACK: Disable MBUS due to fw_devlink=on\n\n---\n arch/arm/boot/dts/sun8i-r40.dtsi              | 1 +\n arch/arm/boot/dts/sun8i-h3.dtsi               | 1 +\n 2 files changed, 2 insertions(+)\n\ndiff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi\nindex 291f4784e86c..173edaff4c9b 100644\n--- a/arch/arm/boot/dts/sun8i-r40.dtsi\n+++ b/arch/arm/boot/dts/sun8i-r40.dtsi\n@@ -949,6 +949,7 @@ mbus: dram-controller@1c62000 {\n \t\t\t#size-cells = <1>;\n \t\t\tdma-ranges = <0x00000000 0x40000000 0x80000000>;\n \t\t\t#interconnect-cells = <1>;\n+\t\t\tstatus = \"disabled\";\n \t\t};\n \n \t\ttcon_top: tcon-top@1c70000 {\ndiff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi\nindex eac2349a2380..3c08f5ee2780 100644\n--- a/arch/arm/boot/dts/sun8i-h3.dtsi\n+++ b/arch/arm/boot/dts/sun8i-h3.dtsi\n@@ -297,6 +297,7 @@ &display_clocks {\n \n &mbus {\n \tcompatible = \"allwinner,sun8i-h3-mbus\";\n+\tstatus = \"disabled\";\n };\n \n &mmc0 {\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0058-WIP-OPi3-DT-fixes.patch",
    "content": "From 59cc76036f42c7f7baa17cb46e6e19cf3a6a62bb Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\nDate: Sun, 26 Sep 2021 09:31:45 +0200\nSubject: [PATCH] WIP: OPi3 DT fixes\n\n---\n .../dts/allwinner/sun50i-h6-orangepi-3.dts    | 72 +++++++++----------\n 1 file changed, 35 insertions(+), 37 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts\nindex c45d7b7fb39a..af92d92d85a3 100644\n--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts\n@@ -63,27 +63,7 @@ reg_vcc5v: vcc5v {\n \t\tregulator-max-microvolt = <5000000>;\n \t\tregulator-always-on;\n \t};\n-\n-\treg_vcc33_wifi: vcc33-wifi {\n-\t\t/* Always on 3.3V regulator for WiFi and BT */\n-\t\tcompatible = \"regulator-fixed\";\n-\t\tregulator-name = \"vcc33-wifi\";\n-\t\tregulator-min-microvolt = <3300000>;\n-\t\tregulator-max-microvolt = <3300000>;\n-\t\tregulator-always-on;\n-\t\tvin-supply = <&reg_vcc5v>;\n-\t};\n-\n-\treg_vcc_wifi_io: vcc-wifi-io {\n-\t\t/* Always on 1.8V/300mA regulator for WiFi and BT IO */\n-\t\tcompatible = \"regulator-fixed\";\n-\t\tregulator-name = \"vcc-wifi-io\";\n-\t\tregulator-min-microvolt = <1800000>;\n-\t\tregulator-max-microvolt = <1800000>;\n-\t\tregulator-always-on;\n-\t\tvin-supply = <&reg_vcc33_wifi>;\n-\t};\n-\n+\t\n \twifi_pwrseq: wifi-pwrseq {\n \t\tcompatible = \"mmc-pwrseq-simple\";\n \t\tclocks = <&rtc 1>;\n@@ -136,8 +116,8 @@ &mmc0 {\n };\n \n &mmc1 {\n-\tvmmc-supply = <&reg_vcc33_wifi>;\n-\tvqmmc-supply = <&reg_vcc_wifi_io>;\n+\tvmmc-supply = <&reg_cldo2>;\n+\tvqmmc-supply = <&reg_bldo3>;\n \tmmc-pwrseq = <&wifi_pwrseq>;\n \tbus-width = <4>;\n \tnon-removable;\n@@ -172,13 +152,17 @@ &ohci3 {\n &pio {\n \tvcc-pc-supply = <&reg_bldo2>;\n \tvcc-pd-supply = <&reg_cldo1>;\n-\tvcc-pg-supply = <&reg_vcc_wifi_io>;\n+\tvcc-pg-supply = <&reg_bldo3>;\n };\n \n &r_ir {\n \tstatus = \"okay\";\n };\n \n+&r_pio {\n+\tvcc-pm-supply = <&reg_bldo3>;\n+};\n+\n &r_rsb {\n \tstatus = \"okay\";\n \n@@ -234,13 +218,12 @@ reg_bldo2: bldo2 {\n \t\t\t\tregulator-max-microvolt = <1800000>;\n \t\t\t\tregulator-name = \"vcc-efuse-pcie-hdmi-pc\";\n \t\t\t};\n-\n-\t\t\tbldo3 {\n-\t\t\t\t/* unused */\n-\t\t\t};\n-\n-\t\t\tbldo4 {\n-\t\t\t\t/* unused */\n+\t\t\t\n+\t\t\treg_bldo3: bldo3 {\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <1800000>;\n+\t\t\t\tregulator-max-microvolt = <1800000>;\n+\t\t\t\tregulator-name = \"vcc-dcxoio\";\n \t\t\t};\n \n \t\t\treg_cldo1: cldo1 {\n@@ -250,19 +233,34 @@ reg_cldo1: cldo1 {\n \t\t\t\tregulator-name = \"vcc33-io-pd-emmc-sd-usb-uart-2\";\n \t\t\t};\n \n-\t\t\tcldo2 {\n-\t\t\t\t/* unused */\n+\t\t\treg_cldo2: cldo2 {\n+\t\t\t\t/*\n+\t\t\t\t * This regulator is connected with CLDO3.\n+\t\t\t\t * Before the kernel can support synchronized\n+\t\t\t\t * enable of coupled regulators, keep them\n+\t\t\t\t * both always on as a ugly hack.\n+\t\t\t\t */\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <3300000>;\n+\t\t\t\tregulator-max-microvolt = <3300000>;\n+\t\t\t\tregulator-name = \"vcc-wifi-1\";\n \t\t\t};\n \n \t\t\tcldo3 {\n-\t\t\t\t/* unused */\n+\t\t\t\t/*\n+\t\t\t\t * This regulator is connected with CLDO2.\n+\t\t\t\t * See the comments for CLDO2.\n+\t\t\t\t */\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <3300000>;\n+\t\t\t\tregulator-max-microvolt = <3300000>;\n+\t\t\t\tregulator-name = \"vcc-wifi-2\";\n \t\t\t};\n \n \t\t\treg_dcdca: dcdca {\n \t\t\t\tregulator-always-on;\n-\t\t\t\tregulator-min-microvolt = <800000>;\n-\t\t\t\tregulator-max-microvolt = <1160000>;\n-\t\t\t\tregulator-ramp-delay = <2500>;\n+\t\t\t\tregulator-min-microvolt = <810000>;\n+\t\t\t\tregulator-max-microvolt = <1080000>;\n \t\t\t\tregulator-name = \"vdd-cpu\";\n \t\t\t};\n \n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0060-WIP-drm-bridge-synopsys-Fix-CEC-not-working-after-power.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Fri, 22 Oct 2021 11:17:30 +0200\nSubject: [PATCH] WIP: drm/bridge: synopsys: Fix CEC not working after\n power-cyclying\n\nThis fixes standby -> power-on on Rockchip platform for, at least,\nRK3288/RK3328/RK3399 where CEC wasn't working after powering on again.\nIt might differ for other phy implementations:\nThe whole HPD-detection part shoud be reworked and we should in general\navoid to rely in RX_SENSE phy status (at least for HDMI), since it differs\ndepending on sink's implementation.\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 14 ++++++++------\n 1 file changed, 8 insertions(+), 6 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\nindex 92e621f2714f..7551e3ab77d6 100644\n--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n@@ -3179,12 +3179,6 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)\n \t\t\t\t       phy_stat & HDMI_PHY_HPD,\n \t\t\t\t       phy_stat & HDMI_PHY_RX_SENSE);\n \n-\t\tif ((phy_stat & (HDMI_PHY_RX_SENSE | HDMI_PHY_HPD)) == 0) {\n-\t\t\tmutex_lock(&hdmi->cec_notifier_mutex);\n-\t\t\tcec_notifier_phys_addr_invalidate(hdmi->cec_notifier);\n-\t\t\tmutex_unlock(&hdmi->cec_notifier_mutex);\n-\t\t}\n-\n \t\tif (phy_stat & HDMI_PHY_HPD)\n \t\t\tstatus = connector_status_connected;\n \n@@ -3201,6 +3195,14 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)\n \t\t\tdrm_helper_hpd_irq_event(hdmi->bridge.dev);\n \t\t\tdrm_bridge_hpd_notify(&hdmi->bridge, status);\n \t\t}\n+\n+\t\tif (status == connector_status_disconnected &&\n+\t\t    (phy_stat & HDMI_PHY_RX_SENSE) &&\n+\t\t    (phy_int_pol & HDMI_PHY_RX_SENSE)) {\n+\t\t\tmutex_lock(&hdmi->cec_notifier_mutex);\n+\t\t\tcec_notifier_phys_addr_invalidate(hdmi->cec_notifier);\n+\t\t\tmutex_unlock(&hdmi->cec_notifier_mutex);\n+\t\t}\n \t}\n \n \thdmi_writeb(hdmi, intr_stat, HDMI_IH_PHY_STAT0);\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0061-media--cedrus--Don-t-CPU-map-source-buffers.patch",
    "content": "From 566615d14dd8b4a5dbc06f158cb35450b1105e35 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\nDate: Tue, 4 Oct 2022 20:36:18 +0200\nSubject: [PATCH] media: cedrus: Don't CPU map source buffers\n\nThere is no need to access source buffers via CPU, so let's disable\nthat. This will lower amount of virtual memory needed on 32-bit ARM\nSoCs.\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\n---\n drivers/staging/media/sunxi/cedrus/cedrus_video.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/drivers/staging/media/sunxi/cedrus/cedrus_video.c b/drivers/staging/media/sunxi/cedrus/cedrus_video.c\nindex f1eb94197a3d6c..8967f221f359f9 100644\n--- a/drivers/staging/media/sunxi/cedrus/cedrus_video.c\n+++ b/drivers/staging/media/sunxi/cedrus/cedrus_video.c\n@@ -601,6 +601,7 @@ int cedrus_queue_init(void *priv, struct vb2_queue *src_vq,\n \n \tsrc_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;\n \tsrc_vq->io_modes = VB2_MMAP | VB2_DMABUF;\n+\tsrc_vq->dma_attrs = DMA_ATTR_NO_KERNEL_MAPPING;\n \tsrc_vq->drv_priv = ctx;\n \tsrc_vq->buf_struct_size = sizeof(struct cedrus_buffer);\n \tsrc_vq->ops = &cedrus_qops;\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0063-HACK-SW-CEC-implementation-for-H3.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\nDate: Mon, 11 Oct 2021 20:13:41 +0200\nSubject: [PATCH] HACK: SW CEC implementation for H3\n\nMany H3 boards lack 32768 Hz external oscillator, so internal RC is used\ninstead. However, it's too unstable for CEC. Use SW implementation\ninstead. That makes it usable, albeit sensitive to cpufreq changes.\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\n---\n drivers/gpu/drm/sun4i/Kconfig          |  2 +\n drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h  | 13 ++++\n drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 83 +++++++++++++++++++++++++-\n 3 files changed, 96 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/sun4i/Kconfig b/drivers/gpu/drm/sun4i/Kconfig\nindex 5755f0432e77..b93eb2fb52ce 100644\n--- a/drivers/gpu/drm/sun4i/Kconfig\n+++ b/drivers/gpu/drm/sun4i/Kconfig\n@@ -56,6 +56,8 @@ config DRM_SUN8I_DW_HDMI\n \ttristate \"Support for Allwinner version of DesignWare HDMI\"\n \tdepends on DRM_SUN4I\n \tselect DRM_DW_HDMI\n+\tselect CEC_CORE\n+\tselect CEC_PIN\n \thelp\n \t  Choose this option if you have an Allwinner SoC with the\n \t  DesignWare HDMI controller with custom HDMI PHY. If M is\ndiff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h\nindex bffe1b9cd3dc..61c97619cba1 100644\n--- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h\n+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h\n@@ -13,6 +13,8 @@\n #include <linux/regmap.h>\n #include <linux/regulator/consumer.h>\n #include <linux/reset.h>\n+#include <media/cec-notifier.h>\n+#include <media/cec-pin.h>\n \n #define SUN8I_HDMI_PHY_DBG_CTRL_REG\t0x0000\n #define SUN8I_HDMI_PHY_DBG_CTRL_PX_LOCK\t\tBIT(0)\n@@ -145,6 +147,13 @@\n #define SUN8I_HDMI_PHY_ANA_STS_RCAL_MASK\tGENMASK(5, 0)\n \n #define SUN8I_HDMI_PHY_CEC_REG\t\t0x003c\n+#define SUN8I_HDMI_PHY_CEC_PIN_CTRL\t\tBIT(7)\n+/*\n+ * Documentation says that this bit is output enable. However,\n+ * it seems that this bit is actually output disable.\n+ */\n+#define SUN8I_HDMI_PHY_CEC_OUT_DIS\t\tBIT(2)\n+#define SUN8I_HDMI_PHY_CEC_IN_DATA\t\tBIT(1)\n \n struct sun8i_hdmi_phy;\n \n@@ -164,6 +173,8 @@ struct sun8i_hdmi_phy_variant {\n };\n \n struct sun8i_hdmi_phy {\n+\tstruct cec_adapter\t\t*cec_adapter;\n+\tstruct cec_notifier\t\t*cec_notifier;\n \tstruct clk\t\t\t*clk_bus;\n \tstruct clk\t\t\t*clk_mod;\n \tstruct clk\t\t\t*clk_phy;\n@@ -174,6 +185,8 @@ struct sun8i_hdmi_phy {\n \tstruct regmap\t\t\t*regs;\n \tstruct reset_control\t\t*rst_phy;\n \tconst struct sun8i_hdmi_phy_variant *variant;\n+\tunsigned int \t\t\tdisable_cec : 1;\n+\tunsigned int \t\t\tbit_bang_cec : 1;\n };\n \n struct sun8i_dw_hdmi_quirks {\ndiff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c\nindex b64d93da651d..e2936e7745b8 100644\n--- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c\n+++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c\n@@ -506,8 +506,9 @@\n \tregmap_update_bits(phy->regs, SUN8I_HDMI_PHY_PLL_CFG1_REG,\n \t\t\t   SUN8I_HDMI_PHY_PLL_CFG1_CKIN_SEL_MSK, 0);\n \n-\t/* set HW control of CEC pins */\n-\tregmap_write(phy->regs, SUN8I_HDMI_PHY_CEC_REG, 0);\n+\t/* manual control of CEC pins */\n+\tregmap_write(phy->regs, SUN8I_HDMI_PHY_CEC_REG,\n+\t\t     phy->bit_bang_cec ? SUN8I_HDMI_PHY_CEC_PIN_CTRL : 0);\n \n \t/* read calibration data */\n \tregmap_read(phy->regs, SUN8I_HDMI_PHY_ANA_STS_REG, &val);\n@@ -584,8 +585,47 @@\n \t\tplat_data->cur_ctr = variant->cur_ctr;\n \t\tplat_data->phy_config = variant->phy_cfg;\n \t}\n+\tplat_data->disable_cec = phy->disable_cec;\n }\n \n+static int sun8i_hdmi_phy_cec_pin_read(struct cec_adapter *adap)\n+{\n+\tstruct sun8i_hdmi_phy *phy = cec_get_drvdata(adap);\n+\tunsigned int val;\n+\n+\tregmap_read(phy->regs, SUN8I_HDMI_PHY_CEC_REG, &val);\n+\n+\treturn val & SUN8I_HDMI_PHY_CEC_IN_DATA;\n+}\n+\n+static void sun8i_hdmi_phy_cec_pin_low(struct cec_adapter *adap)\n+{\n+\tstruct sun8i_hdmi_phy *phy = cec_get_drvdata(adap);\n+\n+\t/* Start driving the CEC pin low */\n+\tregmap_write(phy->regs, SUN8I_HDMI_PHY_CEC_REG,\n+\t\t     SUN8I_HDMI_PHY_CEC_PIN_CTRL);\n+}\n+\n+static void sun8i_hdmi_phy_cec_pin_high(struct cec_adapter *adap)\n+{\n+\tstruct sun8i_hdmi_phy *phy = cec_get_drvdata(adap);\n+\n+\t/*\n+\t * Stop driving the CEC pin, the pull up will take over\n+\t * unless another CEC device is driving the pin low.\n+\t */\n+\tregmap_write(phy->regs, SUN8I_HDMI_PHY_CEC_REG,\n+\t\t     SUN8I_HDMI_PHY_CEC_PIN_CTRL |\n+\t\t     SUN8I_HDMI_PHY_CEC_OUT_DIS);\n+}\n+\n+static const struct cec_pin_ops sun8i_hdmi_phy_cec_pin_ops = {\n+\t.read = sun8i_hdmi_phy_cec_pin_read,\n+\t.low = sun8i_hdmi_phy_cec_pin_low,\n+\t.high = sun8i_hdmi_phy_cec_pin_high,\n+};\n+\n static const struct regmap_config sun8i_hdmi_phy_regmap_config = {\n \t.reg_bits\t= 32,\n \t.val_bits\t= 32,\n@@ -653,6 +693,7 @@\n {\n \tstruct platform_device *pdev = of_find_device_by_node(node);\n \tstruct sun8i_hdmi_phy *phy;\n+\tint ret;\n \n \tif (!pdev)\n \t\treturn -EPROBE_DEFER;\n@@ -666,8 +707,35 @@\n \thdmi->phy = phy;\n \n \tput_device(&pdev->dev);\n+\t\n+\tif (phy->bit_bang_cec) {\n+\t\tphy->cec_adapter =\n+\t\t\tcec_pin_allocate_adapter(&sun8i_hdmi_phy_cec_pin_ops,\n+\t\t\t\t\t\t phy, \"sun8i-cec\",\n+\t\t\t\t\t\t CEC_CAP_DEFAULTS);\n+\t\tret = PTR_ERR_OR_ZERO(phy->cec_adapter);\n+\t\tif (ret < 0)\n+\t\t\treturn 0;\n+\n+\t\tphy->cec_notifier = cec_notifier_cec_adap_register(hdmi->dev, NULL, phy->cec_adapter);\n+\t\tif (!phy->cec_notifier) {\n+\t\t\tret = -ENOMEM;\n+\t\t\tgoto err_delete_cec_adapter;\n+\t\t}\n+\n+\t\tret = cec_register_adapter(phy->cec_adapter, hdmi->dev);\n+\t\tif (ret < 0)\n+\t\t\tgoto err_put_cec_notifier;\n+\t}\n \n \treturn 0;\n+\n+err_put_cec_notifier:\n+\tcec_notifier_cec_adap_unregister(phy->cec_notifier, phy->cec_adapter);\n+err_delete_cec_adapter:\n+\tcec_delete_adapter(phy->cec_adapter);\n+\n+\treturn ret;\n }\n \n static int sun8i_hdmi_phy_probe(struct platform_device *pdev)\n@@ -682,6 +750,14 @@\n \n \tphy->variant = of_device_get_match_data(dev);\n \tphy->dev = dev;\n+\tphy->disable_cec = of_machine_is_compatible(\"roofull,beelink-x2\") ||\n+\t\t\t   of_machine_is_compatible(\"friendlyarm,nanopi-m1\") ||\n+\t\t\t   of_machine_is_compatible(\"xunlong,orangepi-lite\") ||\n+\t\t\t   of_machine_is_compatible(\"xunlong,orangepi-one\") ||\n+\t\t\t   of_machine_is_compatible(\"xunlong,orangepi-pc-plus\") ||\n+\t\t\t   of_machine_is_compatible(\"xunlong,orangepi-plus2e\");\n+\tphy->bit_bang_cec = phy->disable_cec &&\n+\t\t\t    !of_machine_is_compatible(\"roofull,beelink-x2\");\n \n \tregs = devm_platform_ioremap_resource(pdev, 0);\n \tif (IS_ERR(regs))\n@@ -728,8 +804,19 @@\n \treturn 0;\n }\n \n+static int sun8i_hdmi_phy_remove(struct platform_device *pdev)\n+{\n+\tstruct sun8i_hdmi_phy *phy = platform_get_drvdata(pdev);\n+\n+\tcec_notifier_cec_adap_unregister(phy->cec_notifier, phy->cec_adapter);\n+\tcec_unregister_adapter(phy->cec_adapter);\n+\n+\treturn 0;\n+}\n+\n struct platform_driver sun8i_hdmi_phy_driver = {\n \t.probe  = sun8i_hdmi_phy_probe,\n+\t.remove = sun8i_hdmi_phy_remove,\n \t.driver = {\n \t\t.name = \"sun8i-hdmi-phy\",\n \t\t.of_match_table = sun8i_hdmi_phy_of_table,\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0065-wip-fix-H6-4k-60.patch",
    "content": "From edc858b1d62ce5ffd8b8d10cc62425af15d48a91 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\nDate: Wed, 8 Dec 2021 20:42:45 +0100\nSubject: [PATCH] wip: fix H6 4k@60\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\n---\n drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 7 +++++++\n drivers/gpu/drm/bridge/synopsys/dw-hdmi.h | 4 ++++\n drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c    | 2 +-\n 3 files changed, 12 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\nindex f08d0fded61f..bcd839a3ce80 100644\n--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n@@ -1488,6 +1488,8 @@ static int hdmi_phy_configure_dwc_hdmi_3d_tx(struct dw_hdmi *hdmi,\n \t/* Override and disable clock termination. */\n \tdw_hdmi_phy_i2c_write(hdmi, HDMI_3D_TX_PHY_CKCALCTRL_OVERRIDE,\n \t\t\t      HDMI_3D_TX_PHY_CKCALCTRL);\n+\tif (mpixelclock == 594000000)\n+\t\tdw_hdmi_phy_i2c_write(hdmi, 0x8006, HDMI_3D_TX_PHY_MSM_CTRL);\n \n \treturn 0;\n }\n@@ -2166,6 +2168,8 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi,\n \thdmi->hdmi_data.hdcp_enable = 0;\n \thdmi->hdmi_data.video_mode.mdataenablepolarity = true;\n \n+\thdmi_writeb(hdmi, HDMI_FC_GCP_SET_AVMUTE, HDMI_FC_GCP);\n+\n \t/* HDMI Initialization Step B.1 */\n \thdmi_av_composer(hdmi, &connector->display_info, mode);\n \n@@ -2205,6 +2209,9 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi,\n \thdmi_video_sample(hdmi);\n \thdmi_tx_hdcp_config(hdmi);\n \n+\tmsleep(100);\n+\thdmi_writeb(hdmi, HDMI_FC_GCP_CLEAR_AVMUTE, HDMI_FC_GCP);\n+\n \tdw_hdmi_clear_overflow(hdmi);\n \n \treturn 0;\ndiff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.h b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.h\nindex 1999db05bc3b..05182418efbb 100644\n--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.h\n+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.h\n@@ -842,6 +842,10 @@ enum {\n \tHDMI_FC_AVICONF3_QUANT_RANGE_LIMITED = 0x00,\n \tHDMI_FC_AVICONF3_QUANT_RANGE_FULL = 0x04,\n \n+/* HDMI_FC_GCP */\n+\tHDMI_FC_GCP_SET_AVMUTE = 0x2,\n+\tHDMI_FC_GCP_CLEAR_AVMUTE = 0x1,\n+\n /* FC_DBGFORCE field values */\n \tHDMI_FC_DBGFORCE_FORCEAUDIO = 0x10,\n \tHDMI_FC_DBGFORCE_FORCEVIDEO = 0x1,\ndiff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c\nindex b64d93da651d..b70bc9de761f 100644\n--- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c\n+++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c\n@@ -90,7 +90,7 @@ static const struct dw_hdmi_mpll_config sun50i_h6_mpll_cfg[] = {\n \t\t},\n \t},  {\n \t\t594000000, {\n-\t\t\t{ 0x1a40, 0x0003 },\n+\t\t\t{ 0x1a7c, 0x0003 },\n \t\t\t{ 0x3b4c, 0x0003 },\n \t\t\t{ 0x5a64, 0x0003 },\n \t\t},\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0066-arm64-dts-allwinner-h6-Fix-Cedrus-IOMMU-again.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\nDate: Wed, 12 Oct 2022 23:01:04 +0200\nSubject: [PATCH] arm64: dts: allwinner: h6: Fix Cedrus IOMMU, again\n\nCedrus actually uses two IOMMU channels. Add the second one.\n\nFixes: 62a8ccf3a248 (\"arm64: dts: allwinner: h6: Fix Cedrus IOMMU usage\")\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\n---\n arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi\nindex e897559d9a89..436cc2a02d1a 100644\n--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi\n@@ -172,7 +172,7 @@ video-codec@1c0e000 {\n \t\t\tresets = <&ccu RST_BUS_VE>;\n \t\t\tinterrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;\n \t\t\tallwinner,sram = <&ve_sram 1>;\n-\t\t\tiommus = <&iommu 3>;\n+\t\t\tiommus = <&iommu 1>, <&iommu 3>;\n \t\t};\n \n \t\tgpu: gpu@1800000 {\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0073-iommu-sun50i-Allow-page-sizes-multiple-of-4096.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\nDate: Fri, 14 Oct 2022 20:15:43 +0200\nSubject: [PATCH] iommu/sun50i: Allow page sizes multiple of 4096\n\nWhile peripheral supports only 4K page sizes, we can easily emulate\nsupport for bigger page sizes, up to 1M. This is done by making multiple\nentries in map function or clearing multiple entries in unmap.\n\nThis considerably lowers overhead.\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\n---\n drivers/iommu/sun50i-iommu.c | 44 +++++++++++++++++++++---------------\n 1 file changed, 26 insertions(+), 18 deletions(-)\n\ndiff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c\nindex d7c5e9b1a087..9944266c4f58 100644\n--- a/drivers/iommu/sun50i-iommu.c\n+++ b/drivers/iommu/sun50i-iommu.c\n@@ -593,10 +593,12 @@ static int sun50i_iommu_map(struct iommu_domain *domain, unsigned long iova,\n {\n \tstruct sun50i_iommu_domain *sun50i_domain = to_sun50i_domain(domain);\n \tstruct sun50i_iommu *iommu = sun50i_domain->iommu;\n-\tu32 pte_index;\n+\tu32 pte_index, pages, i;\n \tu32 *page_table, *pte_addr;\n \tint ret = 0;\n \n+\tpages = size / SPAGE_SIZE;\n+\n \tpage_table = sun50i_dte_get_page_table(sun50i_domain, iova, gfp);\n \tif (IS_ERR(page_table)) {\n \t\tret = PTR_ERR(page_table);\n@@ -604,18 +606,21 @@ static int sun50i_iommu_map(struct iommu_domain *domain, unsigned long iova,\n \t}\n \n \tpte_index = sun50i_iova_get_pte_index(iova);\n-\tpte_addr = &page_table[pte_index];\n-\tif (unlikely(sun50i_pte_is_page_valid(*pte_addr))) {\n-\t\tphys_addr_t page_phys = sun50i_pte_get_page_address(*pte_addr);\n-\t\tdev_err(iommu->dev,\n-\t\t\t\"iova %pad already mapped to %pa cannot remap to %pa prot: %#x\\n\",\n-\t\t\t&iova, &page_phys, &paddr, prot);\n-\t\tret = -EBUSY;\n-\t\tgoto out;\n+\tfor (i = 0; i < pages; i++) {\n+\t\tpte_addr = &page_table[pte_index + i];\n+\t\tif (unlikely(sun50i_pte_is_page_valid(*pte_addr))) {\n+\t\t\tphys_addr_t page_phys = sun50i_pte_get_page_address(*pte_addr);\n+\t\t\tdev_err(iommu->dev,\n+\t\t\t\t\"iova %pad already mapped to %pa cannot remap to %pa prot: %#x\\n\",\n+\t\t\t\t&iova, &page_phys, &paddr, prot);\n+\t\t\tret = -EBUSY;\n+\t\t\tgoto out;\n+\t\t}\n+\t\t*pte_addr = sun50i_mk_pte(paddr, prot);\n+\t\tpaddr += SPAGE_SIZE;\n \t}\n \n-\t*pte_addr = sun50i_mk_pte(paddr, prot);\n-\tsun50i_table_flush(sun50i_domain, pte_addr, 1);\n+\tsun50i_table_flush(sun50i_domain, &page_table[pte_index], pages);\n \n out:\n \treturn ret;\n@@ -626,8 +631,10 @@ static size_t sun50i_iommu_unmap(struct iommu_domain *domain, unsigned long iova\n {\n \tstruct sun50i_iommu_domain *sun50i_domain = to_sun50i_domain(domain);\n \tphys_addr_t pt_phys;\n+\tu32 dte, pages, i;\n \tu32 *pte_addr;\n-\tu32 dte;\n+\n+\tpages = size / SPAGE_SIZE;\n \n \tdte = sun50i_domain->dt[sun50i_iova_get_dte_index(iova)];\n \tif (!sun50i_dte_is_pt_valid(dte))\n@@ -636,13 +643,14 @@ static size_t sun50i_iommu_unmap(struct iommu_domain *domain, unsigned long iova\n \tpt_phys = sun50i_dte_get_pt_address(dte);\n \tpte_addr = (u32 *)phys_to_virt(pt_phys) + sun50i_iova_get_pte_index(iova);\n \n-\tif (!sun50i_pte_is_page_valid(*pte_addr))\n-\t\treturn 0;\n+\tfor (i = 0; i < pages; i++)\n+\t\tif (!sun50i_pte_is_page_valid(pte_addr[i]))\n+\t\t\treturn 0;\n \n-\tmemset(pte_addr, 0, sizeof(*pte_addr));\n-\tsun50i_table_flush(sun50i_domain, pte_addr, 1);\n+\tmemset(pte_addr, 0, sizeof(*pte_addr) * pages);\n+\tsun50i_table_flush(sun50i_domain, pte_addr, pages);\n \n-\treturn SZ_4K;\n+\treturn size;\n }\n \n static phys_addr_t sun50i_iommu_iova_to_phys(struct iommu_domain *domain,\n@@ -828,7 +836,7 @@ static int sun50i_iommu_of_xlate(struct device *dev,\n }\n \n static const struct iommu_ops sun50i_iommu_ops = {\n-\t.pgsize_bitmap\t= SZ_4K,\n+\t.pgsize_bitmap\t= 0x1ff000,\n \t.device_group\t= sun50i_iommu_device_group,\n \t.domain_alloc\t= sun50i_iommu_domain_alloc,\n \t.of_xlate\t= sun50i_iommu_of_xlate,\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0075-Revert-drm-sun4i-dw-hdmi-Fix-ddc-en-GPIO-consumer-co.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\nDate: Fri, 14 Oct 2022 23:35:13 +0200\nSubject: [PATCH] Revert \"drm/sun4i: dw-hdmi: Fix ddc-en GPIO consumer\n conflict\"\n\nThis reverts commit 920169041baa0a7497ed702aa97d6a2d6285efd3.\n---\n drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 54 +++++++++++++++++++++++++--\n drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h |  2 +\n 2 files changed, 52 insertions(+), 4 deletions(-)\n\ndiff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c\nindex 477cb6985b4d..a8d75fd7e9f4 100644\n--- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c\n+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c\n@@ -93,10 +93,34 @@ static u32 sun8i_dw_hdmi_find_possible_crtcs(struct drm_device *drm,\n \treturn crtcs;\n }\n \n+static int sun8i_dw_hdmi_find_connector_pdev(struct device *dev,\n+\t\t\t\t\t     struct platform_device **pdev_out)\n+{\n+\tstruct platform_device *pdev;\n+\tstruct device_node *remote;\n+\n+\tremote = of_graph_get_remote_node(dev->of_node, 1, -1);\n+\tif (!remote)\n+\t\treturn -ENODEV;\n+\n+\tif (!of_device_is_compatible(remote, \"hdmi-connector\")) {\n+\t\tof_node_put(remote);\n+\t\treturn -ENODEV;\n+\t}\n+\n+\tpdev = of_find_device_by_node(remote);\n+\tof_node_put(remote);\n+\tif (!pdev)\n+\t\treturn -ENODEV;\n+\n+\t*pdev_out = pdev;\n+\treturn 0;\n+}\n+\n static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master,\n \t\t\t      void *data)\n {\n-\tstruct platform_device *pdev = to_platform_device(dev);\n+\tstruct platform_device *pdev = to_platform_device(dev), *connector_pdev;\n \tstruct dw_hdmi_plat_data *plat_data;\n \tstruct drm_device *drm = data;\n \tstruct device_node *phy_node;\n@@ -143,16 +167,30 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master,\n \t\treturn dev_err_probe(dev, PTR_ERR(hdmi->regulator),\n \t\t\t\t     \"Couldn't get regulator\\n\");\n \n+\tret = sun8i_dw_hdmi_find_connector_pdev(dev, &connector_pdev);\n+\tif (!ret) {\n+\t\thdmi->ddc_en = gpiod_get_optional(&connector_pdev->dev,\n+\t\t\t\t\t\t  \"ddc-en\", GPIOD_OUT_HIGH);\n+\t\tplatform_device_put(connector_pdev);\n+\n+\t\tif (IS_ERR(hdmi->ddc_en)) {\n+\t\t\tdev_err(dev, \"Couldn't get ddc-en gpio\\n\");\n+\t\t\treturn PTR_ERR(hdmi->ddc_en);\n+\t\t}\n+\t}\n+\n \tret = regulator_enable(hdmi->regulator);\n \tif (ret) {\n \t\tdev_err(dev, \"Failed to enable regulator\\n\");\n-\t\treturn ret;\n+\t\tgoto err_unref_ddc_en;\n \t}\n \n+\tgpiod_set_value(hdmi->ddc_en, 1);\n+\n \tret = reset_control_deassert(hdmi->rst_ctrl);\n \tif (ret) {\n \t\tdev_err(dev, \"Could not deassert ctrl reset control\\n\");\n-\t\tgoto err_disable_regulator;\n+\t\tgoto err_disable_ddc_en;\n \t}\n \n \tret = clk_prepare_enable(hdmi->clk_tmds);\n@@ -207,8 +245,12 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master,\n \tclk_disable_unprepare(hdmi->clk_tmds);\n err_assert_ctrl_reset:\n \treset_control_assert(hdmi->rst_ctrl);\n-err_disable_regulator:\n+err_disable_ddc_en:\n+\tgpiod_set_value(hdmi->ddc_en, 0);\n \tregulator_disable(hdmi->regulator);\n+err_unref_ddc_en:\n+\tif (hdmi->ddc_en)\n+\t\tgpiod_put(hdmi->ddc_en);\n \n \treturn ret;\n }\n@@ -222,7 +264,11 @@ static void sun8i_dw_hdmi_unbind(struct device *dev, struct device *master,\n \tsun8i_hdmi_phy_deinit(hdmi->phy);\n \tclk_disable_unprepare(hdmi->clk_tmds);\n \treset_control_assert(hdmi->rst_ctrl);\n+\tgpiod_set_value(hdmi->ddc_en, 0);\n \tregulator_disable(hdmi->regulator);\n+\n+\tif (hdmi->ddc_en)\n+\t\tgpiod_put(hdmi->ddc_en);\n }\n \n static const struct component_ops sun8i_dw_hdmi_ops = {\ndiff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h\nindex ab80d52a70bb..f082b8ecfe2c 100644\n--- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h\n+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h\n@@ -9,6 +9,7 @@\n #include <drm/bridge/dw_hdmi.h>\n #include <drm/drm_encoder.h>\n #include <linux/clk.h>\n+#include <linux/gpio/consumer.h>\n #include <linux/regmap.h>\n #include <linux/regulator/consumer.h>\n #include <linux/reset.h>\n@@ -187,6 +188,7 @@ struct sun8i_dw_hdmi {\n \tstruct regulator\t\t*regulator;\n \tconst struct sun8i_dw_hdmi_quirks *quirks;\n \tstruct reset_control\t\t*rst_ctrl;\n+\tstruct gpio_desc\t\t*ddc_en;\n };\n \n extern struct platform_driver sun8i_hdmi_phy_driver;\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0076-net-phy-add-support-for-motorcomm-yt8531c-phy.patch",
    "content": "From git@z Thu Jan  1 00:00:00 1970\nSubject: [PATCH] net: phy: add support for Motorcomm yt8531C phy\nFrom: Peter Geis <pgwipeout@gmail.com>\nDate: Sun, 09 Oct 2022 22:24:05 +0300\nMessage-Id: <20221009192405.97118-1-f.kardame@manjaro.org>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=\"utf-8\"\nContent-Transfer-Encoding: 7bit\n\nThis patch adds support for Motorcomm YT8531C which is\nused in OrangePi 3 LTS, OrangePi 4 LTS and OrangePi 800\nCurrently being used by Manjaro Arm kernel\n\nSigned-off-by: Peter Geis <pgwipeout@gmail.com>\nSigned-off-by: Furkan Kardame <f.kardame@manjaro.org>\n---\n drivers/net/phy/motorcomm.c | 90 +++++++++++++++++++++++++++++++++++++\n 1 file changed, 90 insertions(+)\n\ndiff --git a/drivers/net/phy/motorcomm.c b/drivers/net/phy/motorcomm.c\nindex 7e6ac2c5e..cbc8ef15d 100644\n--- a/drivers/net/phy/motorcomm.c\n+++ b/drivers/net/phy/motorcomm.c\n@@ -10,6 +10,7 @@\n #include <linux/phy.h>\n \n #define PHY_ID_YT8511\t\t0x0000010a\n+#define PHY_ID_YT8531\t\t0x4f51e91b\n \n #define YT8511_PAGE_SELECT\t0x1e\n #define YT8511_PAGE\t\t0x1f\n@@ -38,6 +39,38 @@\n #define YT8511_DELAY_FE_TX_EN\t(0xf << 12)\n #define YT8511_DELAY_FE_TX_DIS\t(0x2 << 12)\n \n+#define YT8531_RGMII_CONFIG1\t0xa003\n+\n+/* TX Gig-E Delay is bits 3:0, default 0x1\n+ * TX Fast-E Delay is bits 7:4, default 0xf\n+ * RX Delay is bits 13:10, default 0x0\n+ * Delay = 150ps * N\n+ * On = 2000ps, off = 50ps\n+ */\n+#define YT8531_DELAY_GE_TX_EN\t(0xd << 0)\n+#define YT8531_DELAY_GE_TX_DIS\t(0x0 << 0)\n+#define YT8531_DELAY_FE_TX_EN\t(0xd << 4)\n+#define YT8531_DELAY_FE_TX_DIS\t(0x0 << 4)\n+#define YT8531_DELAY_RX_EN\t(0xd << 10)\n+#define YT8531_DELAY_RX_DIS\t(0x0 << 10)\n+#define YT8531_DELAY_MASK\t(GENMASK(13, 10) | GENMASK(7, 0))\n+\n+#define YT8531_SYNCE_CFG\t0xa012\n+\n+/* Clk src config is bits 3:1\n+ * 3b000 src from pll\n+ * 3b001 src from rx_clk\n+ * 3b010 src from serdes\n+ * 3b011 src from ptp_in\n+ * 3b100 src from 25mhz refclk *default*\n+ * 3b101 src from 25mhz ssc\n+ * Clk rate select is bit 4\n+ * 1b0 25mhz clk output *default*\n+ * 1b1 125mhz clk output\n+ * Clkout enable is bit 6\n+ */\n+#define YT8531_CLKCFG_125M\t(BIT(6) | BIT(4) | (0x0 < 1))\n+\n static int yt8511_read_page(struct phy_device *phydev)\n {\n \treturn __phy_read(phydev, YT8511_PAGE_SELECT);\n@@ -111,6 +145,51 @@ static int yt8511_config_init(struct phy_device *phydev)\n \treturn phy_restore_page(phydev, oldpage, ret);\n }\n \n+static int yt8531_config_init(struct phy_device *phydev)\n+{\n+\tint oldpage, ret = 0;\n+\tunsigned int val;\n+\n+\toldpage = phy_select_page(phydev, YT8531_RGMII_CONFIG1);\n+\tif (oldpage < 0)\n+\t\tgoto err_restore_page;\n+\n+\t/* set rgmii delay mode */\n+\tswitch (phydev->interface) {\n+\tcase PHY_INTERFACE_MODE_RGMII:\n+\t\tval = YT8531_DELAY_RX_DIS | YT8531_DELAY_GE_TX_DIS | YT8531_DELAY_FE_TX_DIS;\n+\t\tbreak;\n+\tcase PHY_INTERFACE_MODE_RGMII_RXID:\n+\t\tval = YT8531_DELAY_RX_EN | YT8531_DELAY_GE_TX_DIS | YT8531_DELAY_FE_TX_DIS;\n+\t\tbreak;\n+\tcase PHY_INTERFACE_MODE_RGMII_TXID:\n+\t\tval = YT8531_DELAY_RX_DIS | YT8531_DELAY_GE_TX_EN | YT8531_DELAY_FE_TX_EN;\n+\t\tbreak;\n+\tcase PHY_INTERFACE_MODE_RGMII_ID:\n+\t\tval = YT8531_DELAY_RX_EN | YT8531_DELAY_GE_TX_EN | YT8531_DELAY_FE_TX_EN;\n+\t\tbreak;\n+\tdefault: /* do not support other modes */\n+\t\tret = -EOPNOTSUPP;\n+\t\tgoto err_restore_page;\n+\t}\n+\n+\tret = __phy_modify(phydev, YT8511_PAGE, YT8531_DELAY_MASK, val);\n+\tif (ret < 0)\n+\t\tgoto err_restore_page;\n+\n+\t/* set clock mode to 125mhz */\n+\tret = __phy_write(phydev, YT8511_PAGE_SELECT, YT8531_SYNCE_CFG);\n+\tif (ret < 0)\n+\t\tgoto err_restore_page;\n+\n+\tret = __phy_write(phydev, YT8511_PAGE, YT8531_CLKCFG_125M);\n+\tif (ret < 0)\n+\t\tgoto err_restore_page;\n+\n+err_restore_page:\n+\treturn phy_restore_page(phydev, oldpage, ret);\n+}\n+\n static struct phy_driver motorcomm_phy_drvs[] = {\n \t{\n \t\tPHY_ID_MATCH_EXACT(PHY_ID_YT8511),\n@@ -120,7 +200,16 @@ static struct phy_driver motorcomm_phy_drvs[] = {\n \t\t.resume\t\t= genphy_resume,\n \t\t.read_page\t= yt8511_read_page,\n \t\t.write_page\t= yt8511_write_page,\n+\t}, {\n+\t\tPHY_ID_MATCH_EXACT(PHY_ID_YT8531),\n+\t\t.name\t\t= \"YT8531 Gigabit Ethernet\",\n+\t\t.config_init\t= yt8531_config_init,\n+\t\t.suspend\t= genphy_suspend,\n+\t\t.resume\t\t= genphy_resume,\n+\t\t.read_page\t= yt8511_read_page,\n+\t\t.write_page\t= yt8511_write_page,\n \t},\n+\n };\n \n module_phy_driver(motorcomm_phy_drvs);\n@@ -131,6 +220,7 @@ MODULE_LICENSE(\"GPL\");\n \n static const struct mdio_device_id __maybe_unused motorcomm_tbl[] = {\n \t{ PHY_ID_MATCH_EXACT(PHY_ID_YT8511) },\n+\t{ PHY_ID_MATCH_EXACT(PHY_ID_YT8531) },\n \t{ /* sentinal */ }\n };\n \n-- \n2.37.3\n\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0077-OrangePi-3-LTS-support.patch",
    "content": "From 72b6fa8ce7faa765ad0aa0491f9f4a907107b80e Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\nDate: Sun, 29 Jan 2023 22:19:45 +0100\nSubject: [PATCH] OrangePi 3 LTS support\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\n---\n arch/arm64/boot/dts/allwinner/Makefile        |   1 +\n .../allwinner/sun50i-h6-orangepi-3-lts.dts    | 313 ++++++++++++++++++\n 2 files changed, 314 insertions(+)\n create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3-lts.dts\n\ndiff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile\nindex 6a96494a2e0a..ace8159a6324 100644\n--- a/arch/arm64/boot/dts/allwinner/Makefile\n+++ b/arch/arm64/boot/dts/allwinner/Makefile\n@@ -32,6 +32,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus.dtb\n dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb\n dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-beelink-gs1.dtb\n dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-3.dtb\n+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-3-lts.dtb\n dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-lite2.dtb\n dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-one-plus.dtb\n dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb\ndiff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3-lts.dts\nnew file mode 100644\nindex 000000000000..6a5df1103a90\n--- /dev/null\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3-lts.dts\n@@ -0,0 +1,313 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+// Copyright (C) 2023 Jernej Skrabec <jernej.skrabec@gmail.com>\n+// Based on sun50i-h6-orangepi-3.dts, which is:\n+// Copyright (C) 2019 Ondřej Jirman <megous@megous.com>\n+\n+/dts-v1/;\n+\n+#include \"sun50i-h6.dtsi\"\n+#include \"sun50i-h6-cpu-opp.dtsi\"\n+\n+#include <dt-bindings/gpio/gpio.h>\n+\n+/ {\n+\tmodel = \"OrangePi 3 LTS\";\n+\tcompatible = \"xunlong,orangepi-3-lts\", \"allwinner,sun50i-h6\";\n+\n+\taliases {\n+\t\tethernet0 = &emac;\n+\t\tserial0 = &uart0;\n+\t};\n+\n+\tchosen {\n+\t\tstdout-path = \"serial0:115200n8\";\n+\t};\n+\n+\tconnector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\tddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_con_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_out_con>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\text_osc32k: ext_osc32k_clk {\n+\t\t#clock-cells = <0>;\n+\t\tcompatible = \"fixed-clock\";\n+\t\tclock-frequency = <32768>;\n+\t\tclock-output-names = \"ext_osc32k\";\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-0 {\n+\t\t\tlabel = \"orangepi:red:power\";\n+\t\t\tgpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */\n+\t\t\tdefault-state = \"on\";\n+\t\t};\n+\n+\t\tled-1 {\n+\t\t\tlabel = \"orangepi:green:status\";\n+\t\t\tgpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */\n+\t\t};\n+\t};\n+\n+\treg_gmac_3v3: gmac-3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"gmac-3v3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tstartup-delay-us = <150000>;\n+\t\tenable-active-high;\n+\t\tgpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */\n+\t};\n+\n+\treg_vcc5v: vcc5v {\n+\t\t/* board wide 5V supply directly from the DC jack */\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"vcc-5v\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tregulator-always-on;\n+\t};\n+};\n+\n+&cpu0 {\n+\tcpu-supply = <&reg_dcdca>;\n+};\n+\n+&de {\n+\tstatus = \"okay\";\n+};\n+\n+&dwc3 {\n+\tstatus = \"okay\";\n+};\n+\n+&ehci0 {\n+\tstatus = \"okay\";\n+};\n+\n+&ehci3 {\n+\tstatus = \"okay\";\n+};\n+\n+&emac {\n+\tpinctrl-names = \"default\";\n+\tpinctrl-0 = <&ext_rgmii_pins>;\n+\tphy-mode = \"rgmii\";\n+\tphy-handle = <&ext_rgmii_phy>;\n+\tphy-supply = <&reg_gmac_3v3>;\n+\tallwinner,rx-delay-ps = <200>;\n+\tallwinner,tx-delay-ps = <300>;\n+\tstatus = \"okay\";\n+};\n+\n+&gpu {\n+\tmali-supply = <&reg_dcdcc>;\n+\tstatus = \"okay\";\n+};\n+\n+&hdmi {\n+\thvcc-supply = <&reg_bldo2>;\n+\tstatus = \"okay\";\n+};\n+\n+&hdmi_out {\n+\thdmi_out_con: endpoint {\n+\t\tremote-endpoint = <&hdmi_con_in>;\n+\t};\n+};\n+\n+&mdio {\n+\text_rgmii_phy: ethernet-phy@1 {\n+\t\tcompatible = \"ethernet-phy-ieee802.3-c22\";\n+\t\treg = <1>;\n+\n+\t\treset-gpios = <&pio 3 14 GPIO_ACTIVE_LOW>; /* PD14 */\n+\t\treset-assert-us = <15000>;\n+\t\treset-deassert-us = <40000>;\n+\t};\n+};\n+\n+&mmc0 {\n+\tvmmc-supply = <&reg_cldo1>;\n+\tcd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */\n+\tbus-width = <4>;\n+\tstatus = \"okay\";\n+};\n+\n+&mmc2 {\n+\tvmmc-supply = <&reg_cldo1>;\n+\tvqmmc-supply = <&reg_bldo2>;\n+\tcap-mmc-hw-reset;\n+\tnon-removable;\n+\tbus-width = <8>;\n+\tstatus = \"okay\";\n+};\n+\n+&ohci0 {\n+\tstatus = \"okay\";\n+};\n+\n+&ohci3 {\n+\tstatus = \"okay\";\n+};\n+\n+&pio {\n+\tvcc-pc-supply = <&reg_bldo2>;\n+\tvcc-pd-supply = <&reg_cldo1>;\n+\tvcc-pg-supply = <&reg_bldo3>;\n+};\n+\n+&r_ir {\n+\tstatus = \"okay\";\n+};\n+\n+&r_i2c {\n+\tstatus = \"okay\";\n+\n+\taxp805: pmic@36 {\n+\t\tcompatible = \"x-powers,axp805\", \"x-powers,axp806\";\n+\t\treg = <0x36>;\n+\t\tinterrupt-parent = <&r_intc>;\n+\t\tinterrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;\n+\t\tinterrupt-controller;\n+\t\t#interrupt-cells = <1>;\n+\t\tx-powers,self-working-mode;\n+\t\tvina-supply = <&reg_vcc5v>;\n+\t\tvinb-supply = <&reg_vcc5v>;\n+\t\tvinc-supply = <&reg_vcc5v>;\n+\t\tvind-supply = <&reg_vcc5v>;\n+\t\tvine-supply = <&reg_vcc5v>;\n+\t\taldoin-supply = <&reg_vcc5v>;\n+\t\tbldoin-supply = <&reg_vcc5v>;\n+\t\tcldoin-supply = <&reg_vcc5v>;\n+\n+\t\tregulators {\n+\t\t\treg_aldo1: aldo1 {\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <3300000>;\n+\t\t\t\tregulator-max-microvolt = <3300000>;\n+\t\t\t\tregulator-name = \"vcc-pl-led-ir\";\n+\t\t\t};\n+\n+\t\t\treg_aldo2: aldo2 {\n+\t\t\t\tregulator-min-microvolt = <3300000>;\n+\t\t\t\tregulator-max-microvolt = <3300000>;\n+\t\t\t\tregulator-name = \"vcc33-audio-tv-ephy-mac\";\n+\t\t\t};\n+\n+\t\t\t/* ALDO3 is shorted to CLDO1 */\n+\t\t\treg_aldo3: aldo3 {\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <3300000>;\n+\t\t\t\tregulator-max-microvolt = <3300000>;\n+\t\t\t\tregulator-name = \"vcc33-io-pd-emmc-sd-usb-uart-1\";\n+\t\t\t};\n+\n+\t\t\treg_bldo1: bldo1 {\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <1800000>;\n+\t\t\t\tregulator-max-microvolt = <1800000>;\n+\t\t\t\tregulator-name = \"vcc18-dram-bias-pll\";\n+\t\t\t};\n+\n+\t\t\treg_bldo2: bldo2 {\n+\t\t\t\tregulator-min-microvolt = <1800000>;\n+\t\t\t\tregulator-max-microvolt = <1800000>;\n+\t\t\t\tregulator-name = \"vcc-efuse-pcie-hdmi-pc\";\n+\t\t\t};\n+\n+\t\t\treg_bldo3: bldo3 {\n+\t\t\t\tregulator-min-microvolt = <1800000>;\n+\t\t\t\tregulator-max-microvolt = <1800000>;\n+\t\t\t\tregulator-name = \"vcc-pm-pg-dcxoio-wifi\";\n+\t\t\t};\n+\n+\t\t\tbldo4 {\n+\t\t\t\t/* unused */\n+\t\t\t};\n+\n+\t\t\treg_cldo1: cldo1 {\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <3300000>;\n+\t\t\t\tregulator-max-microvolt = <3300000>;\n+\t\t\t\tregulator-name = \"vcc33-io-pd-emmc-sd-usb-uart-2\";\n+\t\t\t};\n+\n+\t\t\tcldo2 {\n+\t\t\t\t/* unused */\n+\t\t\t};\n+\n+\t\t\tcldo3 {\n+\t\t\t\t/* unused */\n+\t\t\t};\n+\n+\t\t\treg_dcdca: dcdca {\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <800000>;\n+\t\t\t\tregulator-max-microvolt = <1160000>;\n+\t\t\t\tregulator-ramp-delay = <2500>;\n+\t\t\t\tregulator-name = \"vdd-cpu\";\n+\t\t\t};\n+\n+\t\t\treg_dcdcc: dcdcc {\n+\t\t\t\tregulator-enable-ramp-delay = <32000>;\n+\t\t\t\tregulator-min-microvolt = <810000>;\n+\t\t\t\tregulator-max-microvolt = <1080000>;\n+\t\t\t\tregulator-ramp-delay = <2500>;\n+\t\t\t\tregulator-name = \"vdd-gpu\";\n+\t\t\t};\n+\n+\t\t\treg_dcdcd: dcdcd {\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <960000>;\n+\t\t\t\tregulator-max-microvolt = <960000>;\n+\t\t\t\tregulator-name = \"vdd-sys\";\n+\t\t\t};\n+\n+\t\t\treg_dcdce: dcdce {\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <1200000>;\n+\t\t\t\tregulator-max-microvolt = <1200000>;\n+\t\t\t\tregulator-name = \"vcc-dram\";\n+\t\t\t};\n+\n+\t\t\tsw {\n+\t\t\t\t/* unused */\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&rtc {\n+\tclocks = <&ext_osc32k>;\n+};\n+\n+&uart0 {\n+\tpinctrl-names = \"default\";\n+\tpinctrl-0 = <&uart0_ph_pins>;\n+\tstatus = \"okay\";\n+};\n+\n+&usb2otg {\n+\tdr_mode = \"host\";\n+\tstatus = \"okay\";\n+};\n+\n+&usb2phy {\n+\tusb0_id_det-gpios = <&pio 2 15 GPIO_ACTIVE_HIGH>; /* PC15 */\n+\tusb0_vbus-supply = <&reg_vcc5v>;\n+\tusb3_vbus-supply = <&reg_vcc5v>;\n+\tstatus = \"okay\";\n+};\n+\n+&usb3phy {\n+\tstatus = \"okay\";\n+};\n-- \n2.39.1\n\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0100-tanix-mmc-rtw88-keep-power-in-suspend.patch",
    "content": "--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi\t2022-06-25 14:21:11.340219073 +0000\n+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi\t2022-06-26 09:52:05.018133375 +0000\n@@ -168,6 +168,7 @@\n \tmmc-pwrseq = <&wifi_pwrseq>;\n \tbus-width = <4>;\n \tnon-removable;\n+\tkeep-power-in-suspend;\n \tstatus = \"okay\";\n \n \trtl8822cs: sdio-wifi@1 {\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0101-Bluetooth-btrtl-Add-support-for-RTL8822BS.patch",
    "content": "From 32206b30a6b4333ce50d6443585f7b9b65323ef1 Mon Sep 17 00:00:00 2001\nFrom: Rudi Heitbaum <rudi@heitbaum.com>\nDate: Sun, 14 May 2023 05:16:12 +0000\nSubject: [PATCH v2] Bluetooth: btrtl: Add support for RTL8822BS UART\n\nAdd a RTL8822BS UART with hci_ver = 0x07. This is similar to RTL8822CS\nobserved on the Tanix TX6 Android set-top box. But the previous\ngeneration of chip. The RTL8822BS requires the\nBROKEN_LOCAL_EXT_FEATURES_PAGE_2 quirk.\n\nReported-by: kernel test robot <lkp@intel.com>\nCloses: https://lore.kernel.org/oe-kbuild-all/202305141828.USyPW8CP-lkp@intel.com/\nSigned-off-by: Rudi Heitbaum <rudi@heitbaum.com>\n---\n drivers/bluetooth/btrtl.c  | 13 ++++++++++++-\n 1 files changed, 12 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c\nindex 2915c82d719d..8368858dda70 100644\n--- a/drivers/bluetooth/btrtl.c\n+++ b/drivers/bluetooth/btrtl.c\n@@ -234,7 +234,15 @@ static const struct id_table ic_id_table[] = {\n \t  .fw_name  = \"rtl_bt/rtl8822cu_fw.bin\",\n \t  .cfg_name = \"rtl_bt/rtl8822cu_config\" },\n \n-\t/* 8822B */\n+\t/* 8822BS with UART interface */\n+\t{ IC_INFO(RTL_ROM_LMP_8822B, 0xb, 0x7, HCI_UART),\n+\t  .config_needed = true,\n+\t  .has_rom_version = true,\n+\t  .has_msft_ext = true,\n+\t  .fw_name  = \"rtl_bt/rtl8822bs_fw.bin\",\n+\t  .cfg_name = \"rtl_bt/rtl8822bs_config\" },\n+\n+\t/* 8822BU with USB interface */\n \t{ IC_INFO(RTL_ROM_LMP_8822B, 0xb, 0x7, HCI_USB),\n \t  .config_needed = true,\n \t  .has_rom_version = true,\n@@ -1182,6 +1190,9 @@ void btrtl_set_quirks(struct hci_dev *hdev, struct btrtl_device_info *btrtl_dev)\n \n \t\thci_set_aosp_capable(hdev);\n \t\tbreak;\n+\tcase CHIP_ID_8822B:\n+\t\tset_bit(HCI_QUIRK_BROKEN_LOCAL_EXT_FEATURES_PAGE_2, &hdev->quirks);\n+\t\tfallthrough;\n \tdefault:\n \t\trtl_dev_dbg(hdev, \"Central-peripheral role not enabled.\");\n \t\trtl_dev_dbg(hdev, \"WBS supported not enabled.\");\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0105-ARM-dts-sun8i-r40-Add-interconnect-to-video-codec.patch",
    "content": "From 667a93ec571a2a8f2487c258c928936d73b7fa14 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\nDate: Sun, 19 Feb 2023 13:02:31 +0100\nSubject: [PATCH] ARM: dts: sun8i-r40: Add interconnect to video-codec\n\nVideo codec needs interconnect, so driver knows that it needs to adjust\nDMA addresses.\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\n---\n arch/arm/boot/dts/sun8i-r40.dtsi | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi\nindex 4ef26d8f5340..a5b1f1e3900d 100644\n--- a/arch/arm/boot/dts/sun8i-r40.dtsi\n+++ b/arch/arm/boot/dts/sun8i-r40.dtsi\n@@ -338,6 +338,8 @@ video-codec@1c0e000 {\n \t\t\tresets = <&ccu RST_BUS_VE>;\n \t\t\tinterrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;\n \t\t\tallwinner,sram = <&ve_sram 1>;\n+\t\t\tinterconnects = <&mbus 4>;\n+\t\t\tinterconnect-names = \"dma-mem\";\n \t\t};\n \n \t\tmmc0: mmc@1c0f000 {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0106-media-cedrus-h265-Fix-configuring-bitstream-size.patch",
    "content": "From 6fba61d436ed9d610e1001860e2fcdf2ccf96803 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\nDate: Sat, 7 Oct 2023 08:36:47 +0200\nSubject: [PATCH 14/23] media: cedrus: h265: Fix configuring bitstream size\n\nbit_size field holds size of slice, not slice + header. Because of HW\nquirks, driver can't program in just slice, but also preceeding header.\nBut that means that currently used bit_size is wrong (too small).\nInstead, just use size of whole buffer. There is no harm in doing this.\n\nFixes: 86caab29da78 (\"media: cedrus: Add HEVC/H.265 decoding support\")\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\n---\n drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 10 ++++------\n 1 file changed, 4 insertions(+), 6 deletions(-)\n\ndiff --git a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c b/drivers/staging/media/sunxi/cedrus/cedrus_h265.c\nindex fc9297232456..16c822637dc6 100644\n--- a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c\n+++ b/drivers/staging/media/sunxi/cedrus/cedrus_h265.c\n@@ -454,11 +454,11 @@ static int cedrus_h265_setup(struct cedrus_ctx *ctx, struct cedrus_run *run)\n \tunsigned int ctb_addr_x, ctb_addr_y;\n \tstruct cedrus_buffer *cedrus_buf;\n \tdma_addr_t src_buf_addr;\n-\tdma_addr_t src_buf_end_addr;\n \tu32 chroma_log2_weight_denom;\n \tu32 num_entry_point_offsets;\n \tu32 output_pic_list_index;\n \tu32 pic_order_cnt[2];\n+\tsize_t slice_bytes;\n \tu8 padding;\n \tint count;\n \tu32 reg;\n@@ -468,6 +468,7 @@ static int cedrus_h265_setup(struct cedrus_ctx *ctx, struct cedrus_run *run)\n \tdecode_params = run->h265.decode_params;\n \tpred_weight_table = &slice_params->pred_weight_table;\n \tnum_entry_point_offsets = slice_params->num_entry_point_offsets;\n+\tslice_bytes = vb2_get_plane_payload(&run->src->vb2_buf, 0);\n \n \t/*\n \t * If entry points offsets are present, we should get them\n@@ -490,7 +491,7 @@ static int cedrus_h265_setup(struct cedrus_ctx *ctx, struct cedrus_run *run)\n \n \tcedrus_write(dev, VE_DEC_H265_BITS_OFFSET, 0);\n \n-\treg = slice_params->bit_size;\n+\treg = slice_bytes * 8;\n \tcedrus_write(dev, VE_DEC_H265_BITS_LEN, reg);\n \n \t/* Source beginning and end addresses. */\n@@ -504,10 +505,7 @@ static int cedrus_h265_setup(struct cedrus_ctx *ctx, struct cedrus_run *run)\n \n \tcedrus_write(dev, VE_DEC_H265_BITS_ADDR, reg);\n \n-\tsrc_buf_end_addr = src_buf_addr +\n-\t\t\t   DIV_ROUND_UP(slice_params->bit_size, 8);\n-\n-\treg = VE_DEC_H265_BITS_END_ADDR_BASE(src_buf_end_addr);\n+\treg = VE_DEC_H265_BITS_END_ADDR_BASE(src_buf_addr + slice_bytes);\n \tcedrus_write(dev, VE_DEC_H265_BITS_END_ADDR, reg);\n \n \t/* Coding tree block address */\n-- \n2.42.0\n\n"
  },
  {
    "path": "projects/Allwinner/patches/linux/0107-wip-media-sunxi-sun8i-di-fix-race-condition.patch",
    "content": "From 239ce64f28fce7cc035a857bb5ed6f51ad6795c8 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\nDate: Thu, 19 Oct 2023 19:16:18 +0200\nSubject: [PATCH] wip: media: sunxi: sun8i-di: fix race condition\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\n---\n .../media/platform/sunxi/sun8i-di/sun8i-di.c  | 69 ++++++++++---------\n 1 file changed, 35 insertions(+), 34 deletions(-)\n\ndiff --git a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c\nindex 90ab1d77b6a5..f7ff0937828c 100644\n--- a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c\n+++ b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c\n@@ -66,6 +66,7 @@ static void deinterlace_device_run(void *priv)\n \tstruct vb2_v4l2_buffer *src, *dst;\n \tunsigned int hstep, vstep;\n \tdma_addr_t addr;\n+\tint i;\n \n \tsrc = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);\n \tdst = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);\n@@ -160,6 +161,26 @@ static void deinterlace_device_run(void *priv)\n \tdeinterlace_write(dev, DEINTERLACE_CH1_HORZ_FACT, hstep);\n \tdeinterlace_write(dev, DEINTERLACE_CH1_VERT_FACT, vstep);\n \n+\t/* neutral filter coefficients */\n+\tdeinterlace_set_bits(dev, DEINTERLACE_FRM_CTRL,\n+\t\t\t     DEINTERLACE_FRM_CTRL_COEF_ACCESS);\n+\treadl_poll_timeout(dev->base + DEINTERLACE_STATUS, val,\n+\t\t\t   val & DEINTERLACE_STATUS_COEF_STATUS, 2, 40);\n+\n+\tfor (i = 0; i < 32; i++) {\n+\t\tdeinterlace_write(dev, DEINTERLACE_CH0_HORZ_COEF0 + i * 4,\n+\t\t\t\t  DEINTERLACE_IDENTITY_COEF);\n+\t\tdeinterlace_write(dev, DEINTERLACE_CH0_VERT_COEF + i * 4,\n+\t\t\t\t  DEINTERLACE_IDENTITY_COEF);\n+\t\tdeinterlace_write(dev, DEINTERLACE_CH1_HORZ_COEF0 + i * 4,\n+\t\t\t\t  DEINTERLACE_IDENTITY_COEF);\n+\t\tdeinterlace_write(dev, DEINTERLACE_CH1_VERT_COEF + i * 4,\n+\t\t\t\t  DEINTERLACE_IDENTITY_COEF);\n+\t}\n+\n+\tdeinterlace_clr_set_bits(dev, DEINTERLACE_FRM_CTRL,\n+\t\t\t\t DEINTERLACE_FRM_CTRL_COEF_ACCESS, 0);\n+\n \tdeinterlace_clr_set_bits(dev, DEINTERLACE_FIELD_CTRL,\n \t\t\t\t DEINTERLACE_FIELD_CTRL_FIELD_CNT_MSK,\n \t\t\t\t DEINTERLACE_FIELD_CTRL_FIELD_CNT(ctx->field));\n@@ -248,7 +269,6 @@ static irqreturn_t deinterlace_irq(int irq, void *data)\n static void deinterlace_init(struct deinterlace_dev *dev)\n {\n \tu32 val;\n-\tint i;\n \n \tdeinterlace_write(dev, DEINTERLACE_BYPASS,\n \t\t\t  DEINTERLACE_BYPASS_CSC);\n@@ -284,27 +304,7 @@ static void deinterlace_init(struct deinterlace_dev *dev)\n \n \tdeinterlace_clr_set_bits(dev, DEINTERLACE_CHROMA_DIFF,\n \t\t\t\t DEINTERLACE_CHROMA_DIFF_TH_MSK,\n-\t\t\t\t DEINTERLACE_CHROMA_DIFF_TH(5));\n-\n-\t/* neutral filter coefficients */\n-\tdeinterlace_set_bits(dev, DEINTERLACE_FRM_CTRL,\n-\t\t\t     DEINTERLACE_FRM_CTRL_COEF_ACCESS);\n-\treadl_poll_timeout(dev->base + DEINTERLACE_STATUS, val,\n-\t\t\t   val & DEINTERLACE_STATUS_COEF_STATUS, 2, 40);\n-\n-\tfor (i = 0; i < 32; i++) {\n-\t\tdeinterlace_write(dev, DEINTERLACE_CH0_HORZ_COEF0 + i * 4,\n-\t\t\t\t  DEINTERLACE_IDENTITY_COEF);\n-\t\tdeinterlace_write(dev, DEINTERLACE_CH0_VERT_COEF + i * 4,\n-\t\t\t\t  DEINTERLACE_IDENTITY_COEF);\n-\t\tdeinterlace_write(dev, DEINTERLACE_CH1_HORZ_COEF0 + i * 4,\n-\t\t\t\t  DEINTERLACE_IDENTITY_COEF);\n-\t\tdeinterlace_write(dev, DEINTERLACE_CH1_VERT_COEF + i * 4,\n-\t\t\t\t  DEINTERLACE_IDENTITY_COEF);\n-\t}\n-\n-\tdeinterlace_clr_set_bits(dev, DEINTERLACE_FRM_CTRL,\n-\t\t\t\t DEINTERLACE_FRM_CTRL_COEF_ACCESS, 0);\n+\t\t\t\t DEINTERLACE_CHROMA_DIFF_TH(31));\n }\n \n static inline struct deinterlace_ctx *deinterlace_file2ctx(struct file *file)\n@@ -929,11 +929,18 @@ static int deinterlace_runtime_resume(struct device *device)\n \t\treturn ret;\n \t}\n \n+\tret = reset_control_deassert(dev->rstc);\n+\tif (ret) {\n+\t\tdev_err(dev->dev, \"Failed to apply reset\\n\");\n+\n+\t\tgoto err_exclusive_rate;\n+\t}\n+\n \tret = clk_prepare_enable(dev->bus_clk);\n \tif (ret) {\n \t\tdev_err(dev->dev, \"Failed to enable bus clock\\n\");\n \n-\t\tgoto err_exclusive_rate;\n+\t\tgoto err_rst;\n \t}\n \n \tret = clk_prepare_enable(dev->mod_clk);\n@@ -950,23 +957,16 @@ static int deinterlace_runtime_resume(struct device *device)\n \t\tgoto err_mod_clk;\n \t}\n \n-\tret = reset_control_deassert(dev->rstc);\n-\tif (ret) {\n-\t\tdev_err(dev->dev, \"Failed to apply reset\\n\");\n-\n-\t\tgoto err_ram_clk;\n-\t}\n-\n \tdeinterlace_init(dev);\n \n \treturn 0;\n \n-err_ram_clk:\n-\tclk_disable_unprepare(dev->ram_clk);\n err_mod_clk:\n \tclk_disable_unprepare(dev->mod_clk);\n err_bus_clk:\n \tclk_disable_unprepare(dev->bus_clk);\n+err_rst:\n+\treset_control_assert(dev->rstc);\n err_exclusive_rate:\n \tclk_rate_exclusive_put(dev->mod_clk);\n \n@@ -977,11 +977,12 @@ static int deinterlace_runtime_suspend(struct device *device)\n {\n \tstruct deinterlace_dev *dev = dev_get_drvdata(device);\n \n-\treset_control_assert(dev->rstc);\n-\n \tclk_disable_unprepare(dev->ram_clk);\n \tclk_disable_unprepare(dev->mod_clk);\n \tclk_disable_unprepare(dev->bus_clk);\n+\n+\treset_control_assert(dev->rstc);\n+\n \tclk_rate_exclusive_put(dev->mod_clk);\n \n \treturn 0;\n-- \n2.42.0\n\n"
  },
  {
    "path": "projects/Allwinner/patches/u-boot/0001-Kconfig-Remove-an-impossible-condition.patch",
    "content": "From 7b4ff873927b131df05449df873cdf91958517a8 Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 9 Oct 2021 10:40:45 -0500\nSubject: [PATCH 01/13] Kconfig: Remove an impossible condition\n\nARCH_SUNXI selects BINMAN, so the condition \"!BINMAN && ARCH_SUNXI\"\nis impossible.\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n Kconfig | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Kconfig b/Kconfig\nindex 931a22806e4e..ede20d74c948 100644\n--- a/Kconfig\n+++ b/Kconfig\n@@ -359,7 +359,7 @@ config BUILD_TARGET\n \tdefault \"u-boot-spl.kwb\" if ARCH_MVEBU && SPL\n \tdefault \"u-boot-elf.srec\" if RCAR_GEN3\n \tdefault \"u-boot.itb\" if !BINMAN && SPL_LOAD_FIT && (ARCH_ROCKCHIP || \\\n-\t\t\t\tARCH_SUNXI || RISCV || ARCH_ZYNQMP)\n+\t\t\t\tRISCV || ARCH_ZYNQMP)\n \tdefault \"u-boot.kwb\" if ARCH_KIRKWOOD\n \tdefault \"u-boot-with-spl.bin\" if ARCH_AT91 && SPL_NAND_SUPPORT\n \tdefault \"u-boot-with-spl.imx\" if ARCH_MX6 && SPL\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Allwinner/patches/u-boot/0002-binman-Prevent-entries-in-a-section-from-overlapping.patch",
    "content": "From a2f92f02abaae9df68759586102438df6f8d5efb Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 9 Oct 2021 10:43:56 -0500\nSubject: [PATCH 02/13] binman: Prevent entries in a section from overlapping\n\nCurrently, if the \"offset\" property is given for an entry, the section's\nrunning offset is completely ignored. This causes entries to overlap if\nthe provided offset is less than the size of the entries earlier in the\nsection. Avoid the overlap by only using the provided offset when it is\ngreater than the running offset.\n\nThe motivation for this change is the rule used by SPL to find U-Boot on\nsunxi boards: U-Boot starts 32 KiB after the start of SPL, unless SPL is\nlarger than 32 KiB, in which case U-Boot immediately follows SPL.\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n tools/binman/entry.py | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/tools/binman/entry.py b/tools/binman/entry.py\nindex 70222718ea93..61822eb5e44f 100644\n--- a/tools/binman/entry.py\n+++ b/tools/binman/entry.py\n@@ -404,7 +404,9 @@ class Entry(object):\n             if self.offset_unset:\n                 self.Raise('No offset set with offset-unset: should another '\n                            'entry provide this correct offset?')\n-            self.offset = tools.align(offset, self.align)\n+        elif self.offset > offset:\n+            offset = self.offset\n+        self.offset = tools.align(offset, self.align)\n         needed = self.pad_before + self.contents_size + self.pad_after\n         needed = tools.align(needed, self.align_size)\n         size = self.size\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Allwinner/patches/u-boot/0003-sunxi-binman-Enable-SPL-FIT-loading-for-32-bit-SoCs.patch",
    "content": "From 45a9ce4ec981ab55b4a4374879348496877df75d Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 17 Apr 2021 13:33:54 -0500\nSubject: [PATCH 03/13] sunxi: binman: Enable SPL FIT loading for 32-bit SoCs\n\nNow that Crust (SCP firmware) has support for H3, we need a FIT image to\nload it. H3 also needs to load a SoC-specific eGon blob to support CPU 0\nhotplug.\n\nUpdate the binman description to work on either 32-bit or 64-bit SoCs:\n - Make BL31 optional, since it is not used on 32-bit SoCs (though BL32\n   may be used in the future).\n - Explicitly set the minimum offset of the FIT to 32 KiB, since SPL on\n   some boards is still only 24 KiB large even with FIT support enabled.\n   CONFIG_SPL_PAD_TO cannot be used because it is not defined for H616.\n\nFIT unlocks more features (signatures, multiple DTBs, etc.), so enable\nit by default. A10 (sun4i) only has 24 KiB of SRAM A1, so it needs\nSPL_FIT_IMAGE_TINY. For simplicity, enable that option everywhere.\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n arch/arm/Kconfig               |  1 +\n arch/arm/dts/sunxi-u-boot.dtsi | 46 ++++++++++++++++++++++------------\n common/spl/Kconfig             |  3 +--\n 3 files changed, 32 insertions(+), 18 deletions(-)\n\ndiff --git a/arch/arm/Kconfig b/arch/arm/Kconfig\nindex ebb19272708d..cb321b6afac3 100644\n--- a/arch/arm/Kconfig\n+++ b/arch/arm/Kconfig\n@@ -1032,6 +1032,7 @@ config ARCH_SUNXI\n \timply SPL_GPIO\n \timply SPL_LIBCOMMON_SUPPORT\n \timply SPL_LIBGENERIC_SUPPORT\n+\timply SPL_LOAD_FIT\n \timply SPL_MMC if MMC\n \timply SPL_POWER\n \timply SPL_SERIAL\ndiff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi\nindex 4a6ed3a7dd5c..ad1f97632979 100644\n--- a/arch/arm/dts/sunxi-u-boot.dtsi\n+++ b/arch/arm/dts/sunxi-u-boot.dtsi\n@@ -1,13 +1,19 @@\n #include <config.h>\n \n-#ifdef CONFIG_MACH_SUN50I_H6\n-#define BL31_ADDR 0x104000\n-#define  SCP_ADDR 0x114000\n+#ifdef CONFIG_ARM64\n+#define ARCH \"arm64\"\n+#else\n+#define ARCH \"arm\"\n+#endif\n+\n+#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN50I_H5)\n+#define BL31_ADDR\t0x00044000\n+#define SCP_ADDR\t0x00050000\n+#elif defined(CONFIG_MACH_SUN50I_H6)\n+#define BL31_ADDR\t0x00104000\n+#define SCP_ADDR\t0x00114000\n #elif defined(CONFIG_MACH_SUN50I_H616)\n-#define BL31_ADDR 0x40000000\n-#else\n-#define BL31_ADDR  0x44000\n-#define  SCP_ADDR  0x50000\n+#define BL31_ADDR\t0x40000000\n #endif\n \n / {\n@@ -30,30 +36,33 @@\n \t\t\tfilename = \"spl/sunxi-spl.bin\";\n \t\t};\n \n-#ifdef CONFIG_ARM64\n+#ifdef CONFIG_SPL_LOAD_FIT\n \t\tfit {\n-\t\t\tdescription = \"Configuration to load ATF before U-Boot\";\n+\t\t\tdescription = \"Configuration to load U-Boot and firmware\";\n+\t\t\toffset = <32768>;\n \t\t\t#address-cells = <1>;\n \t\t\tfit,fdt-list = \"of-list\";\n \n \t\t\timages {\n \t\t\t\tuboot {\n-\t\t\t\t\tdescription = \"U-Boot (64-bit)\";\n+\t\t\t\t\tdescription = \"U-Boot\";\n \t\t\t\t\ttype = \"standalone\";\n \t\t\t\t\tos = \"u-boot\";\n-\t\t\t\t\tarch = \"arm64\";\n+\t\t\t\t\tarch = ARCH;\n \t\t\t\t\tcompression = \"none\";\n \t\t\t\t\tload = <CONFIG_SYS_TEXT_BASE>;\n+\t\t\t\t\tentry = <CONFIG_SYS_TEXT_BASE>;\n \n \t\t\t\t\tu-boot-nodtb {\n \t\t\t\t\t};\n \t\t\t\t};\n \n+#ifdef BL31_ADDR\n \t\t\t\tatf {\n \t\t\t\t\tdescription = \"ARM Trusted Firmware\";\n \t\t\t\t\ttype = \"firmware\";\n \t\t\t\t\tos = \"arm-trusted-firmware\";\n-\t\t\t\t\tarch = \"arm64\";\n+\t\t\t\t\tarch = ARCH;\n \t\t\t\t\tcompression = \"none\";\n \t\t\t\t\tload = <BL31_ADDR>;\n \t\t\t\t\tentry = <BL31_ADDR>;\n@@ -63,6 +72,7 @@\n \t\t\t\t\t\tmissing-msg = \"atf-bl31-sunxi\";\n \t\t\t\t\t};\n \t\t\t\t};\n+#endif\n \n #ifdef SCP_ADDR\n \t\t\t\tscp {\n@@ -91,19 +101,23 @@\n \n \t\t\t\t@config-SEQ {\n \t\t\t\t\tdescription = \"NAME\";\n+#ifdef BL31_ADDR\n \t\t\t\t\tfirmware = \"atf\";\n-#ifndef SCP_ADDR\n-\t\t\t\t\tloadables = \"uboot\";\n #else\n-\t\t\t\t\tloadables = \"scp\", \"uboot\";\n+\t\t\t\t\tfirmware = \"uboot\";\n #endif\n+\t\t\t\t\tloadables =\n+#ifdef SCP_ADDR\n+\t\t\t\t\t\t    \"scp\",\n+#endif\n+\t\t\t\t\t\t    \"uboot\";\n \t\t\t\t\tfdt = \"fdt-SEQ\";\n \t\t\t\t};\n \t\t\t};\n \t\t};\n #else\n \t\tu-boot-img {\n-\t\t\toffset = <CONFIG_SPL_PAD_TO>;\n+\t\t\toffset = <32768>;\n \t\t};\n #endif\n \t};\ndiff --git a/common/spl/Kconfig b/common/spl/Kconfig\nindex 8a8a971a91e1..374818c05741 100644\n--- a/common/spl/Kconfig\n+++ b/common/spl/Kconfig\n@@ -442,8 +442,7 @@ config SPL_MD5\n config SPL_FIT_IMAGE_TINY\n \tbool \"Remove functionality from SPL FIT loading to reduce size\"\n \tdepends on SPL_FIT\n-\tdefault y if MACH_SUN50I || MACH_SUN50I_H5 || SUN50I_GEN_H6\n-\tdefault y if ARCH_IMX8M || ARCH_IMX9\n+\tdefault y if ARCH_IMX8M || ARCH_IMX9 || ARCH_SUNXI\n \thelp\n \t  Enable this to reduce the size of the FIT image loading code\n \t  in SPL, if space for the SPL binary is very tight.\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Allwinner/patches/u-boot/0005-sunxi-psci-Avoid-hanging-when-CPU-0-is-hot-unplugged.patch",
    "content": "From c7bb6bf4bcee8577c3af0e2345c1bdc0925f9468 Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 9 Oct 2021 22:00:22 -0500\nSubject: [PATCH 05/13] sunxi: psci: Avoid hanging when CPU 0 is hot-unplugged\n\nDo not try to send an SGI from CPU 0 to itself. Since FIQs are masked\nwhen entering monitor mode, this will hang. Plus, CPU 0 cannot fully\npower itself off anyway. Instead, have it turn FIQs back on and continue\nservicing SGIs from other cores.\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n arch/arm/cpu/armv7/sunxi/psci.c | 20 +++++++++++++++++---\n 1 file changed, 17 insertions(+), 3 deletions(-)\n\ndiff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/psci.c\nindex 1ac50f558a40..3448fe2edcaa 100644\n--- a/arch/arm/cpu/armv7/sunxi/psci.c\n+++ b/arch/arm/cpu/armv7/sunxi/psci.c\n@@ -38,6 +38,15 @@\n #define SUN8I_R40_PWR_CLAMP(cpu)\t\t(0x120 + (cpu) * 0x4)\n #define SUN8I_R40_SRAMC_SOFT_ENTRY_REG0\t\t(0xbc)\n \n+static inline u32 __secure cp15_read_mpidr(void)\n+{\n+\tu32 val;\n+\n+\tasm volatile (\"mrc p15, 0, %0, c0, c0, 5\" : \"=r\" (val));\n+\n+\treturn val;\n+}\n+\n static void __secure cp15_write_cntp_tval(u32 tval)\n {\n \tasm volatile (\"mcr p15, 0, %0, c14, c2, 0\" : : \"r\" (tval));\n@@ -281,9 +290,14 @@ s32 __secure psci_cpu_off(void)\n {\n \tpsci_cpu_off_common();\n \n-\t/* Ask CPU0 via SGI15 to pull the rug... */\n-\twritel(BIT(16) | 15, GICD_BASE + GICD_SGIR);\n-\tdsb();\n+\tif (cp15_read_mpidr() & 3) {\n+\t\t/* Ask CPU0 via SGI15 to pull the rug... */\n+\t\twritel(BIT(16) | 15, GICD_BASE + GICD_SGIR);\n+\t\tdsb();\n+\t} else {\n+\t\t/* Unmask FIQs to service SGI15. */\n+\t\tasm volatile (\"cpsie f\");\n+\t}\n \n \t/* Wait to be turned off */\n \twhile (1)\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Allwinner/patches/u-boot/0008-remoteproc-Add-a-driver-for-the-Allwinner-AR100.patch",
    "content": "From 9f1a0739ddd535b25fe07f7be9cc18aeaa5181c7 Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 9 Oct 2021 14:58:27 -0500\nSubject: [PATCH 08/13] remoteproc: Add a driver for the Allwinner AR100\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n drivers/remoteproc/Kconfig             |   9 ++\n drivers/remoteproc/Makefile            |   1 +\n drivers/remoteproc/sun6i_ar100_rproc.c | 111 +++++++++++++++++++++++++\n 3 files changed, 121 insertions(+)\n create mode 100644 drivers/remoteproc/sun6i_ar100_rproc.c\n\ndiff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig\nindex 24e536463bbd..9789623ebee5 100644\n--- a/drivers/remoteproc/Kconfig\n+++ b/drivers/remoteproc/Kconfig\n@@ -41,6 +41,15 @@ config REMOTEPROC_STM32_COPRO\n \t  Say 'y' here to add support for STM32 Cortex-M4 coprocessors via the\n \t  remoteproc framework.\n \n+config REMOTEPROC_SUN6I_AR100\n+\tbool \"Support for Allwinner AR100 SCP\"\n+\tselect REMOTEPROC\n+\tdepends on ARCH_SUNXI\n+\thelp\n+\t  Say 'y' here to support Allwinner's AR100 System Control Processor\n+\t  (SCP), found in various sun6i/sun8i/sun50i family SoCs, through the\n+\t  remoteproc framework.\n+\n config REMOTEPROC_TI_K3_ARM64\n \tbool \"Support for TI's K3 based ARM64 remoteproc driver\"\n \tselect REMOTEPROC\ndiff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile\nindex f0e83451d66f..022e64f2053e 100644\n--- a/drivers/remoteproc/Makefile\n+++ b/drivers/remoteproc/Makefile\n@@ -10,6 +10,7 @@ obj-$(CONFIG_$(SPL_)REMOTEPROC) += rproc-uclass.o rproc-elf-loader.o\n obj-$(CONFIG_K3_SYSTEM_CONTROLLER) += k3_system_controller.o\n obj-$(CONFIG_REMOTEPROC_SANDBOX) += sandbox_testproc.o\n obj-$(CONFIG_REMOTEPROC_STM32_COPRO) += stm32_copro.o\n+obj-$(CONFIG_REMOTEPROC_SUN6I_AR100) += sun6i_ar100_rproc.o\n obj-$(CONFIG_REMOTEPROC_TI_K3_ARM64) += ti_k3_arm64_rproc.o\n obj-$(CONFIG_REMOTEPROC_TI_K3_DSP) += ti_k3_dsp_rproc.o\n obj-$(CONFIG_REMOTEPROC_TI_K3_R5F) += ti_k3_r5f_rproc.o\ndiff --git a/drivers/remoteproc/sun6i_ar100_rproc.c b/drivers/remoteproc/sun6i_ar100_rproc.c\nnew file mode 100644\nindex 000000000000..c94f6c752bdd\n--- /dev/null\n+++ b/drivers/remoteproc/sun6i_ar100_rproc.c\n@@ -0,0 +1,111 @@\n+// SPDX-License-Identifier: GPL-2.0\n+\n+#include <dm.h>\n+#include <errno.h>\n+#include <remoteproc.h>\n+#include <asm/io.h>\n+\n+#define SUNXI_SCP_MAGIC\t\t\t0xb4400012\n+\n+#define OR1K_VEC_FIRST\t\t\t0x01\n+#define OR1K_VEC_LAST\t\t\t0x0e\n+#define OR1K_VEC_ADDR(n)\t\t(0x100 * (n))\n+\n+struct sun6i_ar100_rproc_priv {\n+\tvoid\t*cfg_base;\n+\tulong\tsram_base;\n+};\n+\n+static int sun6i_ar100_rproc_load(struct udevice *dev, ulong addr, ulong size)\n+{\n+\tstruct sun6i_ar100_rproc_priv *priv = dev_get_priv(dev);\n+\n+\t/* Check for a valid SCP firmware. */\n+\tif (readl_relaxed(addr) != SUNXI_SCP_MAGIC)\n+\t\treturn -ENOENT;\n+\n+\t/* Program exception vectors to the firmware entry point. */\n+\tfor (u32 i = OR1K_VEC_FIRST; i <= OR1K_VEC_LAST; ++i) {\n+\t\tulong vector = priv->sram_base + OR1K_VEC_ADDR(i);\n+\t\tulong offset = addr - vector;\n+\n+\t\twritel_relaxed(offset >> 2, vector);\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int sun6i_ar100_rproc_start(struct udevice *dev)\n+{\n+\tstruct sun6i_ar100_rproc_priv *priv = dev_get_priv(dev);\n+\n+\tsetbits_le32(priv->cfg_base, BIT(0));\n+\n+\treturn 0;\n+}\n+\n+static int sun6i_ar100_rproc_stop(struct udevice *dev)\n+{\n+\tstruct sun6i_ar100_rproc_priv *priv = dev_get_priv(dev);\n+\n+\tclrbits_le32(priv->cfg_base, BIT(0));\n+\n+\treturn 0;\n+}\n+\n+static int sun6i_ar100_rproc_reset(struct udevice *dev)\n+{\n+\tint ret;\n+\n+\tret = sun6i_ar100_rproc_stop(dev);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\treturn sun6i_ar100_rproc_start(dev);\n+}\n+\n+static int sun6i_ar100_rproc_is_running(struct udevice *dev)\n+{\n+\tstruct sun6i_ar100_rproc_priv *priv = dev_get_priv(dev);\n+\n+\treturn !(readl_relaxed(priv->cfg_base) & BIT(0));\n+}\n+\n+static const struct dm_rproc_ops sun6i_ar100_rproc_ops = {\n+\t.load\t\t= sun6i_ar100_rproc_load,\n+\t.start\t\t= sun6i_ar100_rproc_start,\n+\t.stop\t\t= sun6i_ar100_rproc_stop,\n+\t.reset\t\t= sun6i_ar100_rproc_reset,\n+\t.is_running\t= sun6i_ar100_rproc_is_running,\n+};\n+\n+static int sun6i_ar100_rproc_probe(struct udevice *dev)\n+{\n+\tstruct sun6i_ar100_rproc_priv *priv = dev_get_priv(dev);\n+\tstruct ofnode_phandle_args sram_handle;\n+\tint ret;\n+\n+\tpriv->cfg_base = dev_read_addr_ptr(dev);\n+\n+\tret = dev_read_phandle_with_args(dev, \"sram\", NULL, 0, 0, &sram_handle);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tpriv->sram_base = ofnode_get_addr(sram_handle.node);\n+\n+\treturn 0;\n+}\n+\n+static const struct udevice_id sun6i_ar100_rproc_ids[] = {\n+\t{ .compatible = \"allwinner,sun6i-a31-ar100\" },\n+\t{ }\n+};\n+\n+U_BOOT_DRIVER(sun6i_ar100_rproc) = {\n+\t.name\t\t= \"sun6i_ar100_rproc\",\n+\t.id\t\t= UCLASS_REMOTEPROC,\n+\t.of_match\t= sun6i_ar100_rproc_ids,\n+\t.probe\t\t= sun6i_ar100_rproc_probe,\n+\t.priv_auto\t= sizeof(struct sun6i_ar100_rproc_priv),\n+\t.ops\t\t= &sun6i_ar100_rproc_ops,\n+};\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Allwinner/patches/u-boot/0009-arm-dts-sunxi-h3-Add-nodes-for-AR100-remoteproc.patch",
    "content": "From 910c452284dfbc086d9dfb18feb1b6c1b95f2eeb Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 9 Oct 2021 15:04:16 -0500\nSubject: [PATCH 09/13] arm: dts: sunxi: h3: Add nodes for AR100 remoteproc\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n arch/arm/dts/sun8i-h3.dtsi | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)\n\ndiff --git a/arch/arm/dts/sun8i-h3.dtsi b/arch/arm/dts/sun8i-h3.dtsi\nindex 4e89701df91f..076f0716da46 100644\n--- a/arch/arm/dts/sun8i-h3.dtsi\n+++ b/arch/arm/dts/sun8i-h3.dtsi\n@@ -170,6 +170,14 @@\n \t\t\t#size-cells = <1>;\n \t\t\tranges;\n \n+\t\t\tsram_a2: sram@40000 {\n+\t\t\t\tcompatible = \"mmio-sram\";\n+\t\t\t\treg = <0x00040000 0xc000>;\n+\t\t\t\t#address-cells = <1>;\n+\t\t\t\t#size-cells = <1>;\n+\t\t\t\tranges = <0 0x00040000 0xc000>;\n+\t\t\t};\n+\n \t\t\tsram_c: sram@1d00000 {\n \t\t\t\tcompatible = \"mmio-sram\";\n \t\t\t\treg = <0x01d00000 0x80000>;\n@@ -239,6 +247,12 @@\n \t\t\tnvmem-cell-names = \"calibration\";\n \t\t\t#thermal-sensor-cells = <0>;\n \t\t};\n+\n+\t\tremoteproc@1f01c00 {\n+\t\t\tcompatible = \"allwinner,sun6i-a31-ar100\";\n+\t\t\treg = <0x01f01c00 0x400>;\n+\t\t\tsram = <&sram_a2>;\n+\t\t};\n \t};\n \n \tthermal-zones {\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Allwinner/patches/u-boot/0010-sunxi-Add-OrangePi-3-LTS-board.patch",
    "content": "From 65a3bafb3f5a8c83b678b59cb4b7bb87d12e7cd0 Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\nDate: Tue, 7 Feb 2023 17:43:14 +0100\nSubject: [PATCH] sunxi: Add OrangePi 3 LTS board\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\n---\n arch/arm/dts/Makefile                     |   1 +\n arch/arm/dts/sun50i-h6-orangepi-3-lts.dts | 313 ++++++++++++++++++++++\n configs/orangepi_3_lts_defconfig          |  19 ++\n 3 files changed, 333 insertions(+)\n create mode 100644 arch/arm/dts/sun50i-h6-orangepi-3-lts.dts\n create mode 100644 configs/orangepi_3_lts_defconfig\n\ndiff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile\nindex 965895bc2a3c..501400635fa9 100644\n--- a/arch/arm/dts/Makefile\n+++ b/arch/arm/dts/Makefile\n@@ -702,6 +702,7 @@ dtb-$(CONFIG_MACH_SUN50I_H5) += \\\n dtb-$(CONFIG_MACH_SUN50I_H6) += \\\n \tsun50i-h6-beelink-gs1.dtb \\\n \tsun50i-h6-orangepi-3.dtb \\\n+\tsun50i-h6-orangepi-3-lts.dtb \\\n \tsun50i-h6-orangepi-lite2.dtb \\\n \tsun50i-h6-orangepi-one-plus.dtb \\\n \tsun50i-h6-pine-h64.dtb \\\ndiff --git a/arch/arm/dts/sun50i-h6-orangepi-3-lts.dts b/arch/arm/dts/sun50i-h6-orangepi-3-lts.dts\nnew file mode 100644\nindex 000000000000..6a5df1103a90\n--- /dev/null\n+++ b/arch/arm/dts/sun50i-h6-orangepi-3-lts.dts\n@@ -0,0 +1,313 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+// Copyright (C) 2023 Jernej Skrabec <jernej.skrabec@gmail.com>\n+// Based on sun50i-h6-orangepi-3.dts, which is:\n+// Copyright (C) 2019 Ondřej Jirman <megous@megous.com>\n+\n+/dts-v1/;\n+\n+#include \"sun50i-h6.dtsi\"\n+#include \"sun50i-h6-cpu-opp.dtsi\"\n+\n+#include <dt-bindings/gpio/gpio.h>\n+\n+/ {\n+\tmodel = \"OrangePi 3 LTS\";\n+\tcompatible = \"xunlong,orangepi-3-lts\", \"allwinner,sun50i-h6\";\n+\n+\taliases {\n+\t\tethernet0 = &emac;\n+\t\tserial0 = &uart0;\n+\t};\n+\n+\tchosen {\n+\t\tstdout-path = \"serial0:115200n8\";\n+\t};\n+\n+\tconnector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\tddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_con_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_out_con>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\text_osc32k: ext_osc32k_clk {\n+\t\t#clock-cells = <0>;\n+\t\tcompatible = \"fixed-clock\";\n+\t\tclock-frequency = <32768>;\n+\t\tclock-output-names = \"ext_osc32k\";\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-0 {\n+\t\t\tlabel = \"orangepi:red:power\";\n+\t\t\tgpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */\n+\t\t\tdefault-state = \"on\";\n+\t\t};\n+\n+\t\tled-1 {\n+\t\t\tlabel = \"orangepi:green:status\";\n+\t\t\tgpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */\n+\t\t};\n+\t};\n+\n+\treg_gmac_3v3: gmac-3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"gmac-3v3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tstartup-delay-us = <150000>;\n+\t\tenable-active-high;\n+\t\tgpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */\n+\t};\n+\n+\treg_vcc5v: vcc5v {\n+\t\t/* board wide 5V supply directly from the DC jack */\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"vcc-5v\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tregulator-always-on;\n+\t};\n+};\n+\n+&cpu0 {\n+\tcpu-supply = <&reg_dcdca>;\n+};\n+\n+&de {\n+\tstatus = \"okay\";\n+};\n+\n+&dwc3 {\n+\tstatus = \"okay\";\n+};\n+\n+&ehci0 {\n+\tstatus = \"okay\";\n+};\n+\n+&ehci3 {\n+\tstatus = \"okay\";\n+};\n+\n+&emac {\n+\tpinctrl-names = \"default\";\n+\tpinctrl-0 = <&ext_rgmii_pins>;\n+\tphy-mode = \"rgmii\";\n+\tphy-handle = <&ext_rgmii_phy>;\n+\tphy-supply = <&reg_gmac_3v3>;\n+\tallwinner,rx-delay-ps = <200>;\n+\tallwinner,tx-delay-ps = <300>;\n+\tstatus = \"okay\";\n+};\n+\n+&gpu {\n+\tmali-supply = <&reg_dcdcc>;\n+\tstatus = \"okay\";\n+};\n+\n+&hdmi {\n+\thvcc-supply = <&reg_bldo2>;\n+\tstatus = \"okay\";\n+};\n+\n+&hdmi_out {\n+\thdmi_out_con: endpoint {\n+\t\tremote-endpoint = <&hdmi_con_in>;\n+\t};\n+};\n+\n+&mdio {\n+\text_rgmii_phy: ethernet-phy@1 {\n+\t\tcompatible = \"ethernet-phy-ieee802.3-c22\";\n+\t\treg = <1>;\n+\n+\t\treset-gpios = <&pio 3 14 GPIO_ACTIVE_LOW>; /* PD14 */\n+\t\treset-assert-us = <15000>;\n+\t\treset-deassert-us = <40000>;\n+\t};\n+};\n+\n+&mmc0 {\n+\tvmmc-supply = <&reg_cldo1>;\n+\tcd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */\n+\tbus-width = <4>;\n+\tstatus = \"okay\";\n+};\n+\n+&mmc2 {\n+\tvmmc-supply = <&reg_cldo1>;\n+\tvqmmc-supply = <&reg_bldo2>;\n+\tcap-mmc-hw-reset;\n+\tnon-removable;\n+\tbus-width = <8>;\n+\tstatus = \"okay\";\n+};\n+\n+&ohci0 {\n+\tstatus = \"okay\";\n+};\n+\n+&ohci3 {\n+\tstatus = \"okay\";\n+};\n+\n+&pio {\n+\tvcc-pc-supply = <&reg_bldo2>;\n+\tvcc-pd-supply = <&reg_cldo1>;\n+\tvcc-pg-supply = <&reg_bldo3>;\n+};\n+\n+&r_ir {\n+\tstatus = \"okay\";\n+};\n+\n+&r_i2c {\n+\tstatus = \"okay\";\n+\n+\taxp805: pmic@36 {\n+\t\tcompatible = \"x-powers,axp805\", \"x-powers,axp806\";\n+\t\treg = <0x36>;\n+\t\tinterrupt-parent = <&r_intc>;\n+\t\tinterrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;\n+\t\tinterrupt-controller;\n+\t\t#interrupt-cells = <1>;\n+\t\tx-powers,self-working-mode;\n+\t\tvina-supply = <&reg_vcc5v>;\n+\t\tvinb-supply = <&reg_vcc5v>;\n+\t\tvinc-supply = <&reg_vcc5v>;\n+\t\tvind-supply = <&reg_vcc5v>;\n+\t\tvine-supply = <&reg_vcc5v>;\n+\t\taldoin-supply = <&reg_vcc5v>;\n+\t\tbldoin-supply = <&reg_vcc5v>;\n+\t\tcldoin-supply = <&reg_vcc5v>;\n+\n+\t\tregulators {\n+\t\t\treg_aldo1: aldo1 {\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <3300000>;\n+\t\t\t\tregulator-max-microvolt = <3300000>;\n+\t\t\t\tregulator-name = \"vcc-pl-led-ir\";\n+\t\t\t};\n+\n+\t\t\treg_aldo2: aldo2 {\n+\t\t\t\tregulator-min-microvolt = <3300000>;\n+\t\t\t\tregulator-max-microvolt = <3300000>;\n+\t\t\t\tregulator-name = \"vcc33-audio-tv-ephy-mac\";\n+\t\t\t};\n+\n+\t\t\t/* ALDO3 is shorted to CLDO1 */\n+\t\t\treg_aldo3: aldo3 {\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <3300000>;\n+\t\t\t\tregulator-max-microvolt = <3300000>;\n+\t\t\t\tregulator-name = \"vcc33-io-pd-emmc-sd-usb-uart-1\";\n+\t\t\t};\n+\n+\t\t\treg_bldo1: bldo1 {\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <1800000>;\n+\t\t\t\tregulator-max-microvolt = <1800000>;\n+\t\t\t\tregulator-name = \"vcc18-dram-bias-pll\";\n+\t\t\t};\n+\n+\t\t\treg_bldo2: bldo2 {\n+\t\t\t\tregulator-min-microvolt = <1800000>;\n+\t\t\t\tregulator-max-microvolt = <1800000>;\n+\t\t\t\tregulator-name = \"vcc-efuse-pcie-hdmi-pc\";\n+\t\t\t};\n+\n+\t\t\treg_bldo3: bldo3 {\n+\t\t\t\tregulator-min-microvolt = <1800000>;\n+\t\t\t\tregulator-max-microvolt = <1800000>;\n+\t\t\t\tregulator-name = \"vcc-pm-pg-dcxoio-wifi\";\n+\t\t\t};\n+\n+\t\t\tbldo4 {\n+\t\t\t\t/* unused */\n+\t\t\t};\n+\n+\t\t\treg_cldo1: cldo1 {\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <3300000>;\n+\t\t\t\tregulator-max-microvolt = <3300000>;\n+\t\t\t\tregulator-name = \"vcc33-io-pd-emmc-sd-usb-uart-2\";\n+\t\t\t};\n+\n+\t\t\tcldo2 {\n+\t\t\t\t/* unused */\n+\t\t\t};\n+\n+\t\t\tcldo3 {\n+\t\t\t\t/* unused */\n+\t\t\t};\n+\n+\t\t\treg_dcdca: dcdca {\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <800000>;\n+\t\t\t\tregulator-max-microvolt = <1160000>;\n+\t\t\t\tregulator-ramp-delay = <2500>;\n+\t\t\t\tregulator-name = \"vdd-cpu\";\n+\t\t\t};\n+\n+\t\t\treg_dcdcc: dcdcc {\n+\t\t\t\tregulator-enable-ramp-delay = <32000>;\n+\t\t\t\tregulator-min-microvolt = <810000>;\n+\t\t\t\tregulator-max-microvolt = <1080000>;\n+\t\t\t\tregulator-ramp-delay = <2500>;\n+\t\t\t\tregulator-name = \"vdd-gpu\";\n+\t\t\t};\n+\n+\t\t\treg_dcdcd: dcdcd {\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <960000>;\n+\t\t\t\tregulator-max-microvolt = <960000>;\n+\t\t\t\tregulator-name = \"vdd-sys\";\n+\t\t\t};\n+\n+\t\t\treg_dcdce: dcdce {\n+\t\t\t\tregulator-always-on;\n+\t\t\t\tregulator-min-microvolt = <1200000>;\n+\t\t\t\tregulator-max-microvolt = <1200000>;\n+\t\t\t\tregulator-name = \"vcc-dram\";\n+\t\t\t};\n+\n+\t\t\tsw {\n+\t\t\t\t/* unused */\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&rtc {\n+\tclocks = <&ext_osc32k>;\n+};\n+\n+&uart0 {\n+\tpinctrl-names = \"default\";\n+\tpinctrl-0 = <&uart0_ph_pins>;\n+\tstatus = \"okay\";\n+};\n+\n+&usb2otg {\n+\tdr_mode = \"host\";\n+\tstatus = \"okay\";\n+};\n+\n+&usb2phy {\n+\tusb0_id_det-gpios = <&pio 2 15 GPIO_ACTIVE_HIGH>; /* PC15 */\n+\tusb0_vbus-supply = <&reg_vcc5v>;\n+\tusb3_vbus-supply = <&reg_vcc5v>;\n+\tstatus = \"okay\";\n+};\n+\n+&usb3phy {\n+\tstatus = \"okay\";\n+};\ndiff --git a/configs/orangepi_3_lts_defconfig b/configs/orangepi_3_lts_defconfig\nnew file mode 100644\nindex 000000000000..41a9af4ef67a\n--- /dev/null\n+++ b/configs/orangepi_3_lts_defconfig\n@@ -0,0 +1,19 @@\n+CONFIG_ARM=y\n+CONFIG_ARCH_SUNXI=y\n+CONFIG_DEFAULT_DEVICE_TREE=\"sun50i-h6-orangepi-3-lts\"\n+CONFIG_SPL=y\n+CONFIG_MACH_SUN50I_H6=y\n+CONFIG_SUNXI_DRAM_H6_LPDDR3=y\n+CONFIG_MMC0_CD_PIN=\"PF6\"\n+CONFIG_MMC_SUNXI_SLOT_EXTRA=2\n+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set\n+CONFIG_SPL_STACK=0x118000\n+CONFIG_SYS_PBSIZE=1024\n+CONFIG_SYS_BOOTM_LEN=0x2000000\n+CONFIG_PHY_SUN50I_USB3=y\n+CONFIG_USB_XHCI_HCD=y\n+CONFIG_USB_XHCI_DWC3=y\n+CONFIG_USB_EHCI_HCD=y\n+CONFIG_USB_OHCI_HCD=y\n+CONFIG_USB_DWC3=y\n+# CONFIG_USB_DWC3_GADGET is not set\n-- \n2.39.1\n\n"
  },
  {
    "path": "projects/Allwinner/patches/u-boot/0011-arm-psci-Add-definitions-for-PSCI-v1.1.patch",
    "content": "From 7719c6f06b698b3a32248dea61710f222ee8d7a1 Mon Sep 17 00:00:00 2001\nFrom: Samuel Holland <samuel@sholland.org>\nDate: Sat, 9 Oct 2021 22:43:26 -0500\nSubject: [PATCH 11/13] arm: psci: Add definitions for PSCI v1.1\n\nAdd the new option, function IDs, and prototypes for PSCI v1.1\nimplementations. In the process, fix some issues with the existing\ndefinitions:\n - Fix the incorrectly-named ARM_PSCI_0_2_FN64_SYSTEM_RESET2.\n - Replace the deprecated \"affinity_level\" naming with \"power_level\".\n\nSigned-off-by: Samuel Holland <samuel@sholland.org>\n---\n arch/arm/cpu/armv7/Kconfig    |  3 +++\n arch/arm/cpu/armv8/fwcall.c   |  2 +-\n arch/arm/include/asm/psci.h   |  9 +++++++--\n arch/arm/include/asm/system.h | 14 +++++++++-----\n arch/arm/lib/psci-dt.c        |  2 ++\n 5 files changed, 22 insertions(+), 8 deletions(-)\n\ndiff --git a/arch/arm/cpu/armv7/Kconfig b/arch/arm/cpu/armv7/Kconfig\nindex 60bb0a9e1ec4..06b477619334 100644\n--- a/arch/arm/cpu/armv7/Kconfig\n+++ b/arch/arm/cpu/armv7/Kconfig\n@@ -49,6 +49,9 @@ choice\n \thelp\n \t  Select the supported PSCI version.\n \n+config ARMV7_PSCI_1_1\n+\tbool \"PSCI V1.1\"\n+\n config ARMV7_PSCI_1_0\n \tbool \"PSCI V1.0\"\n \ndiff --git a/arch/arm/cpu/armv8/fwcall.c b/arch/arm/cpu/armv8/fwcall.c\nindex 16914dc1eed6..87de09979b18 100644\n--- a/arch/arm/cpu/armv8/fwcall.c\n+++ b/arch/arm/cpu/armv8/fwcall.c\n@@ -103,7 +103,7 @@ void __noreturn psci_system_reset2(u32 reset_level, u32 cookie)\n {\n \tstruct pt_regs regs;\n \n-\tregs.regs[0] = ARM_PSCI_0_2_FN64_SYSTEM_RESET2;\n+\tregs.regs[0] = ARM_PSCI_1_1_FN64_SYSTEM_RESET2;\n \tregs.regs[1] = PSCI_RESET2_TYPE_VENDOR | reset_level;\n \tregs.regs[2] = cookie;\n \tif (use_smc_for_psci)\ndiff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h\nindex 67e9234066b0..aa351867eee7 100644\n--- a/arch/arm/include/asm/psci.h\n+++ b/arch/arm/include/asm/psci.h\n@@ -22,8 +22,9 @@\n #include <linux/bitops.h>\n #endif\n \n-#define ARM_PSCI_VER_1_0\t\t(0x00010000)\n #define ARM_PSCI_VER_0_2\t\t(0x00000002)\n+#define ARM_PSCI_VER_1_0\t\t(0x00010000)\n+#define ARM_PSCI_VER_1_1\t\t(0x00010001)\n \n /* PSCI 0.1 interface */\n #define ARM_PSCI_FN_BASE\t\t0x95c1ba5e\n@@ -68,7 +69,6 @@\n #define ARM_PSCI_0_2_FN64_AFFINITY_INFO\t\tARM_PSCI_0_2_FN64(4)\n #define ARM_PSCI_0_2_FN64_MIGRATE\t\tARM_PSCI_0_2_FN64(5)\n #define ARM_PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU\tARM_PSCI_0_2_FN64(7)\n-#define ARM_PSCI_0_2_FN64_SYSTEM_RESET2\t\tARM_PSCI_0_2_FN64(18)\n \n /* PSCI 1.0 interface */\n #define ARM_PSCI_1_0_FN_PSCI_FEATURES\t\tARM_PSCI_0_2_FN(10)\n@@ -86,6 +86,11 @@\n #define ARM_PSCI_1_0_FN64_STAT_RESIDENCY\tARM_PSCI_0_2_FN64(16)\n #define ARM_PSCI_1_0_FN64_STAT_COUNT\t\tARM_PSCI_0_2_FN64(17)\n \n+/* PSCI 1.1 interface */\n+#define ARM_PSCI_1_1_FN_SYSTEM_RESET2\t\tARM_PSCI_0_2_FN(18)\n+\n+#define ARM_PSCI_1_1_FN64_SYSTEM_RESET2\t\tARM_PSCI_0_2_FN64(18)\n+\n /* 1KB stack per core */\n #define ARM_PSCI_STACK_SHIFT\t10\n #define ARM_PSCI_STACK_SIZE\t(1 << ARM_PSCI_STACK_SHIFT)\ndiff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h\nindex f75eea16b36c..02effcc6cc38 100644\n--- a/arch/arm/include/asm/system.h\n+++ b/arch/arm/include/asm/system.h\n@@ -556,17 +556,21 @@ void mmu_page_table_flush(unsigned long start, unsigned long stop);\n #ifdef CONFIG_ARMV7_PSCI\n void psci_arch_cpu_entry(void);\n void psci_arch_init(void);\n+\n u32 psci_version(void);\n-s32 psci_features(u32 function_id, u32 psci_fid);\n+s32 psci_cpu_suspend(u32 function_id, u32 power_state, u32 pc, u32 context_id);\n s32 psci_cpu_off(void);\n-s32 psci_cpu_on(u32 function_id, u32 target_cpu, u32 pc,\n-\t\tu32 context_id);\n-s32 psci_affinity_info(u32 function_id, u32 target_affinity,\n-\t\t       u32  lowest_affinity_level);\n+s32 psci_cpu_on(u32 function_id, u32 target_cpu, u32 pc, u32 context_id);\n+s32 psci_affinity_info(u32 function_id, u32 target_affinity, u32 power_level);\n u32 psci_migrate_info_type(void);\n void psci_system_off(void);\n void psci_system_reset(void);\n+s32 psci_features(u32 function_id, u32 psci_fid);\n+s32 psci_cpu_default_suspend(u32 function_id, u32 pc, u32 context_id);\n+s32 psci_node_hw_state(u32 function_id, u32 target_cpu, u32 power_level);\n+s32 psci_system_suspend(u32 function_id, u32 pc, u32 context_id);\n+s32 psci_system_reset2(u32 function_id, u32 reset_type, u32 cookie);\n #endif\n \n #endif /* __ASSEMBLY__ */\n \ndiff --git a/arch/arm/lib/psci-dt.c b/arch/arm/lib/psci-dt.c\nindex 903b3357048a..ea9d1c8355c2 100644\n--- a/arch/arm/lib/psci-dt.c\n+++ b/arch/arm/lib/psci-dt.c\n@@ -66,6 +66,8 @@ int fdt_psci(void *fdt)\n init_psci_node:\n #if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)\n \tpsci_ver = sec_firmware_support_psci_version();\n+#elif defined(CONFIG_ARMV7_PSCI_1_1)\n+\tpsci_ver = ARM_PSCI_VER_1_1;\n #elif defined(CONFIG_ARMV7_PSCI_1_0) || defined(CONFIG_ARMV8_PSCI)\n \tpsci_ver = ARM_PSCI_VER_1_0;\n #elif defined(CONFIG_ARMV7_PSCI_0_2)\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Allwinner/patches/u-boot/0012-DO-NOT-MERGE-sunxi-Enable-remoteproc-on-H3.patch",
    "content": "From 3fe205fc0e4c81cddbd3b7adacf29e0819f3672f Mon Sep 17 00:00:00 2001\nFrom: Jernej Skrabec <jernej.skrabec@gmail.com>\nDate: Tue, 12 Oct 2021 20:45:10 +0200\nSubject: [PATCH] [DO NOT MERGE] sunxi: Enable remoteproc on H3\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\n---\n arch/arm/mach-sunxi/Kconfig | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig\nindex 1d4a4fdd0c59..4414b847b7e4 100644\n--- a/arch/arm/mach-sunxi/Kconfig\n+++ b/arch/arm/mach-sunxi/Kconfig\n@@ -295,6 +295,7 @@ config MACH_SUN8I_H3\n \tselect CPU_V7_HAS_VIRT\n \tselect ARCH_SUPPORT_PSCI\n \tselect MACH_SUNXI_H3_H5\n+\tselect REMOTEPROC_SUN6I_AR100\n \tselect ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT\n \n config MACH_SUN8I_R40\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Allwinner/patches/u-boot/0013-sunxi-mmc-increase-stabilization-delay-from-1ms-to-20ms.patch",
    "content": "From: Da Xue <da@libre.computer>\nDate: Thu, 21 Jul 2022 18:08:21 -0400\n\nSome users experienced problems booting u-boot from SPL hanging here:\n\nTrying to boot from MMC1 or Trying to boot from MMC2\n\nThis seems to occur with both MicroSD and eMMC modules on ALL-H3-CC.\nIncreasing the delay after mmc reset fixes these boot problems.\nSome MicroSD cards are impacted more than others so it is possible that\nMicroSD internals need time to stabilize. Below is some failure data.\n\nsandisk ultra   64gb 9/20 with 1ms,  20/20 with 10ms\nsandisk ultra   16gb 2/20 with 1ms,  20/20 with 10ms\nsandisk extreme 16gb 6/20 with 10ms, 20/20 with 20ms\n\nA quick comparison of schematics show series resistors for ESD\nprotection on the MicroSD GPIOs not present on all H3/H5 boards.\nIt is not known if this is related to the issue.\n\nThis patch adds a fixed 20ms delay to mmc init to mitigate the problem.\nIf boot time optimization is required and the platform does not require\nthe delay. The delay can be replaced with:\n\nwritel(SUNXI_MMC_GCTRL_RESET, &priv->reg->gctrl);\nif (wait_for_bit_le32( &priv->reg->gctrl,\nSUNXI_MMC_GCTRL_RESET, false, 20, false)) {\nprintf(\"%s: Timeout\\n\", __func__);\nreturn -ETIMEDOUT;\n}\n\nSigned-off-by: Da Xue <da@libre.computer>\n---\n drivers/mmc/sunxi_mmc.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c\nindex 1bb7b6d0e9..f7942b69ce 100644\n--- a/drivers/mmc/sunxi_mmc.c\n+++ b/drivers/mmc/sunxi_mmc.c\n@@ -297,7 +297,7 @@ static int sunxi_mmc_core_init(struct mmc *mmc)\n \n \t/* Reset controller */\n \twritel(SUNXI_MMC_GCTRL_RESET, &priv->reg->gctrl);\n-\tudelay(1000);\n+\tudelay(20000);\n \n \treturn 0;\n }\n"
  },
  {
    "path": "projects/Allwinner/patches/u-boot/0014-sunxi-dram-Fix-incorrect-ram-size-detection-for-some-H6-boards.patch",
    "content": "From: Gunjan Gupta <viraniac@gmail.com>\nSubject: [PATCH 1/1] sunxi: dram: Fix incorrect ram size detection for some H6\n boards\nDate: Sun,  1 Oct 2023 21:43:32 +0530\n\nOn some H6 boards like Orange Pi 3 LTS, some times U-Boot fails to detect\nram size correctly. Instead of 2GB thats available, it detects 4GB of ram\nand then SPL just hangs there making board not to boot further.\n\nOn debugging, I found that the rows value were being determined correctly,\nbut columns were sometimes off by one value. I found that adding some\ndelay after the mctl_core_init call along with making use of dsb in the\nstart of the mctl_mem_matches solves the issue.\n\nSigned-off-by: Gunjan Gupta <viraniac@gmail.com>\n---\n\n arch/arm/mach-sunxi/dram_helpers.c   | 1 +\n arch/arm/mach-sunxi/dram_sun50i_h6.c | 2 ++\n 2 files changed, 3 insertions(+)\n\ndiff --git a/arch/arm/mach-sunxi/dram_helpers.c b/arch/arm/mach-sunxi/dram_helpers.c\nindex cdf2750f1c..5758c58e07 100644\n--- a/arch/arm/mach-sunxi/dram_helpers.c\n+++ b/arch/arm/mach-sunxi/dram_helpers.c\n@@ -32,6 +32,7 @@ void mctl_await_completion(u32 *reg, u32 mask, u32 val)\n #ifndef CONFIG_MACH_SUNIV\n bool mctl_mem_matches(u32 offset)\n {\n+\tdsb();\n \t/* Try to write different values to RAM at two addresses */\n \twritel(0, CFG_SYS_SDRAM_BASE);\n \twritel(0xaa55aa55, (ulong)CFG_SYS_SDRAM_BASE + offset);\ndiff --git a/arch/arm/mach-sunxi/dram_sun50i_h6.c b/arch/arm/mach-sunxi/dram_sun50i_h6.c\nindex bff2e42513..a031a845f5 100644\n--- a/arch/arm/mach-sunxi/dram_sun50i_h6.c\n+++ b/arch/arm/mach-sunxi/dram_sun50i_h6.c\n@@ -623,6 +623,8 @@ static void mctl_auto_detect_dram_size(struct dram_para *para)\n \tpara->cols = 11;\n \tmctl_core_init(para);\n \n+\tudelay(50);\n+\n \tfor (para->cols = 8; para->cols < 11; para->cols++) {\n \t\t/* 8 bits per byte and 16/32 bit width */\n \t\tif (mctl_mem_matches(1 << (para->cols + 1 +\n"
  },
  {
    "path": "projects/Amlogic/README.md",
    "content": "# Amlogic\n\nThis project is for Amlogic SoC devices\n\n## Links\n\n* http://linux-meson.com\n\n## Useful debug commands\n\n* `cat /sys/kernel/debug/cec/cec0/status`\n* `cat /sys/kernel/debug/clk/clk_summary`\n* `cat /sys/class/drm/card0-HDMI-A-1/status`\n* `hexdump -C /sys/class/drm/card0-HDMI-A-1/edid`\n* `edid-decode /sys/class/drm/card0-HDMI-A-1/edid`\n* `cat /sys/kernel/debug/dma_buf/bufinfo`\n"
  },
  {
    "path": "projects/Amlogic/bootloader/box.ini",
    "content": "WETEK-UBOOT-CONFIG\n\n# This is a helper file for WeTek Hub and Play2 devices.\n# It is not used and safe to delete on every other device.\n\nfatload mmc 0 1020000 s905_autoscript\nautoscr 1020000\n"
  },
  {
    "path": "projects/Amlogic/bootloader/canupdate.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n# detect legacy kernel installs and abort to prevent upgrades\ncase $(uname -r) in\n  3.14*|4.9*)\n    echo \"Updates from Amlogic vendor kernels are not supported!\"\n    sleep 10\n    exit 1\n    ;;\nesac\n\n# allow upgrades between aarch64 and arm images\nPROJECT=$(\"$1\" | cut -d. -f1)\nif [ \"$1\" = \"${PROJECT}.aarch64\" -o \"$1\" = \"${PROJECT}.arm\" ]; then\n  exit 0\nelse\n  exit 1\nfi\n"
  },
  {
    "path": "projects/Amlogic/bootloader/config",
    "content": "CONFIG_LZ4=y\nCONFIG_LZO=y\nCONFIG_LZMA=y\nCONFIG_BOOTDELAY=0\nCONFIG_EFI_LOADER=n\n"
  },
  {
    "path": "projects/Amlogic/bootloader/install",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\necho \"${BOOTLOADER}: creating u-boot.bin\"\n\nDESTDIR=\"${PKG_BUILD}/fip\"\nmkdir -p \"${DESTDIR}\"\n\nFIPDIR=\"$(get_build_dir amlogic-boot-fip)\"\n\ncase \"${UBOOT_SYSTEM}\" in\n  box|\"\")\n    # no-op, use vendor booloader\n    ;;\n  *)\n    mkdir \"${DESTDIR}/tmp\"\n    (cd \"${FIPDIR}\" || exit; ./build-fip.sh \"${UBOOT_SYSTEM}\" \"$(get_build_dir \"${BOOTLOADER}\")/u-boot.bin\" \"${DESTDIR}\" \"${DESTDIR}/tmp\")\n    rm -fr \"${DESTDIR}/tmp\"\n    ;;\nesac\n\n# Clean up after previous build\nrm -rf \"${INSTALL}\"/usr/share/bootloader/boot.ini\nrm -rf \"${INSTALL}\"/usr/share/bootloader/u-boot*\n\n# Install u-boot\nmkdir -p \"${INSTALL}/usr/share/bootloader\"\nif [ \"${UBOOT_SYSTEM}\" != \"box\" ]; then\n  if [ -f \"${DESTDIR}/u-boot.bin.sd.bin\" ]; then\n    cp -av \"${DESTDIR}/u-boot.bin.sd.bin\" \"${INSTALL}/usr/share/bootloader\"\n    # If target/u-boot exists, cache the signed bin\n    [ -d \"${ROOT}/target/u-boot\" ] && cp -av \"${DESTDIR}/u-boot.bin.sd.bin\" \"${ROOT}/target/u-boot/u-boot.bin.sd.bin-${UBOOT_SYSTEM}\"\n  fi\n  if [ -f \"${DESTDIR}/u-boot.bin\" ]; then\n    cp -av \"${DESTDIR}/u-boot.bin\" \"${INSTALL}/usr/share/bootloader\"\n    # If target/u-boot exists, cache the signed bin\n    [ -d \"${ROOT}/target/u-boot\" ] && cp -av \"${DESTDIR}/u-boot.bin\" \"${ROOT}/target/u-boot/u-boot.bin-${UBOOT_SYSTEM}\"\n  fi\nfi\n\n# Install boot.ini if it exists\nif find_file_path bootloader/\"${UBOOT_SYSTEM}\".ini; then\n  cp -av \"${FOUND_PATH}\" \"${INSTALL}/usr/share/bootloader/boot.ini\"\nfi\n"
  },
  {
    "path": "projects/Amlogic/bootloader/mkimage",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"\"\n\nmkimage_uboot(){\n  echo \"image: writing u-boot to $(basename $DISK)\"\n  dd if=\"$INSTALL/usr/share/bootloader/u-boot.bin.sd.bin\" of=\"$DISK\" conv=fsync,notrunc bs=1 count=440 >\"$SAVE_ERROR\" 2>&1 || show_error\n  dd if=\"$INSTALL/usr/share/bootloader/u-boot.bin.sd.bin\" of=\"$DISK\" conv=fsync,notrunc bs=512 skip=1 seek=1 >\"$SAVE_ERROR\" 2>&1 || show_error\n}\n\nmkimage_autoscripts(){\n  echo \"image: copying autoscript files\"\n  mcopy -s -o ${RELEASE_DIR}/3rdparty/bootloader/*script ::\n  mcopy -s -o ${RELEASE_DIR}/3rdparty/bootloader/*.scr ::\n  touch \"$RELEASE_DIR/3rdparty/bootloader/aml_autoscript.zip\"\n}\n\nmkimage_bootini(){\n  if [ -f ${RELEASE_DIR}/3rdparty/bootloader/boot.ini ]; then\n    echo \"image: copying boot.ini\"\n    mcopy -s -o ${RELEASE_DIR}/3rdparty/bootloader/boot.ini ::\n  fi\n}\n\nmkimage_uEnv(){\n  echo \"image: creating uEnv.ini\"\ncat << EOF > \"${LE_TMP}/uEnv.ini\"\ndtb_name=/dtb/${DTB}\nbootargs=boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}\nEOF\n  mcopy -s \"${LE_TMP}/uEnv.ini\" ::\n}\n\nmkimage_extlinux(){\n  echo \"image: copying exlinux.conf\"\n  mkdir -p \"${LE_TMP}/extlinux\"\n  cat << EOF > \"${LE_TMP}/extlinux/extlinux.conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDT /${DTB}\n  APPEND boot=LABEL=${DISTRO_BOOTLABEL} disk=LABEL=${DISTRO_DISKLABEL} quiet ${EXTRA_CMDLINE}\nEOF\n  mcopy -s -o \"${LE_TMP}/extlinux\" ::\n}\n\nmkimage_extlinux_fdtdir(){\n  echo \"image: copying exlinux.conf\"\n  mkdir -p \"${LE_TMP}/extlinux\"\n  cat << EOF > \"${LE_TMP}/extlinux/extlinux.conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDTDIR /\n  APPEND boot=LABEL=${DISTRO_BOOTLABEL} disk=LABEL=${DISTRO_DISKLABEL} quiet ${EXTRA_CMDLINE}\nEOF\n  mcopy -s -o \"${LE_TMP}/extlinux\" ::\n}\n\nmkimage_dtb(){\n  if [ \"$DTB\" != \"@@DTB_NAME@@\" ]; then\n    echo \"image: copying device tree\"\n    mcopy -s -o \"${RELEASE_DIR}/3rdparty/bootloader/dtb/$DTB\" ::\n    if [ \"$DTB\" = \"meson-g12b-odroid-n2.dtb\" ]; then\n      mcopy -s -o \"${RELEASE_DIR}/3rdparty/bootloader/dtb/meson-g12b-odroid-n2-plus.dtb\" ::\n    elif [ \"$DTB\" = \"meson-g12b-gtking.dtb\" ]; then\n      mcopy -s -o \"${RELEASE_DIR}/3rdparty/bootloader/dtb/meson-g12b-gtking-pro.dtb\" ::\n      mcopy -s -o \"${RELEASE_DIR}/3rdparty/bootloader/dtb/meson-g12b-gsking-x.dtb\" ::\n    elif [ \"$DTB\" = \"meson-gxl-s905x-libretech-cc.dtb\" ]; then\n      mcopy -s -o \"${RELEASE_DIR}/3rdparty/bootloader/dtb/meson-gxl-s905x-libretech-cc-v2.dtb\" ::\n    elif [ \"$DTB\" = \"meson-sm1-odroid-c4.dtb\" ]; then\n      mcopy -s -o \"${RELEASE_DIR}/3rdparty/bootloader/dtb/meson-sm1-odroid-hc4.dtb\" ::\n    fi\n  else\n    echo \"image: copying device trees\"\n    mcopy -s -o \"${RELEASE_DIR}/3rdparty/bootloader/dtb\" ::\n  fi\n}\n\ncase \"${UBOOT_SYSTEM}\" in\n  box|\"\")\n    DTB=\"@@DTB_NAME@@\"\n    mkimage_uEnv\n    mkimage_autoscripts\n    mkimage_bootini\n    mkimage_dtb\n    ;;\n  odroid-n2|odroid-c4)\n    mkimage_uboot\n    mkimage_extlinux_fdtdir\n    mkimage_dtb\n    ;;\n  bananapi*|khadas*|lafrite|lepotato|nanopi-k2|odroid*|radxa*|wetek*)\n    mkimage_uboot\n    mkimage_extlinux\n    mkimage_dtb\n    ;;\n  *)\n    mkimage_uEnv\n    mkimage_autoscripts\n    mkimage_bootini\n    mkimage_extlinux\n    mkimage_uboot\n    mkimage_dtb\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic/bootloader/release",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nSRCDIR=\"$BUILD/image/system/usr/share/bootloader\"\nDSTDIR=\"$RELEASE_DIR/3rdparty/bootloader\"\n\nmkdir -p \"$DSTDIR\"\n  cp -a \"$SRCDIR\"/*.scr \"$SRCDIR\"/*script \"$DSTDIR\"\n\n  if find_file_path \"bootloader/${UBOOT_SYSTEM}.ini\"; then\n    cp -av \"${FOUND_PATH}\" \"$DSTDIR/boot.ini\"\n  fi\n\nmkdir -p \"$DSTDIR/dtb\"\n  case ${DEVICE:-$PROJECT} in\n    AMLGX)\n      cp -a \"$SRCDIR\"/*gxbb*.dtb \"$DSTDIR/dtb\"\n      cp -a \"$SRCDIR\"/*gxl*.dtb \"$DSTDIR/dtb\"\n      cp -a \"$SRCDIR\"/*gxm*.dtb \"$DSTDIR/dtb\"\n      cp -a \"$SRCDIR\"/*g12a*.dtb \"$DSTDIR/dtb\"\n      cp -a \"$SRCDIR\"/*g12b*.dtb \"$DSTDIR/dtb\"\n      cp -a \"$SRCDIR\"/*sm1*.dtb \"$DSTDIR/dtb\"\n      ;;\n  esac\n"
  },
  {
    "path": "projects/Amlogic/bootloader/scripts/aml_autoscript.src",
    "content": "defenv\nsetenv bootcmd 'run start_autoscript; run storeboot'\nsetenv start_autoscript 'mmcinfo && run start_mmc_autoscript; usb start && run start_usb_autoscript; run start_emmc_autoscript'\nsetenv start_emmc_autoscript 'fatload mmc 1 1020000 emmc_autoscript && autoscr 1020000'\nsetenv start_mmc_autoscript 'fatload mmc 0 1020000 s905_autoscript && autoscr 1020000'\nsetenv start_usb_autoscript 'for usbdev in 0 1 2 3; do fatload usb ${usbdev} 1020000 s905_autoscript && autoscr 1020000; done'\nsetenv system_part b\nsetenv upgrade_step 2\nsaveenv\nsleep 1\nreboot\n"
  },
  {
    "path": "projects/Amlogic/bootloader/scripts/boot.scr.src",
    "content": "load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}uEnv.ini && env import -t ${kernel_addr_r} ${filesize}\nload ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}KERNEL\nload ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${dtb_name}\nbootm ${kernel_addr_r} - ${fdt_addr_r}\n"
  },
  {
    "path": "projects/Amlogic/bootloader/scripts/emmc_autoscript.src",
    "content": "setenv env_addr 0x1040000\nsetenv boot_start 'bootm ${loadaddr} - ${dtb_mem_addr}'\nsetenv addmac 'if printenv mac; then setenv bootargs ${bootargs} mac=${mac}; elif printenv eth_mac; then setenv bootargs ${bootargs} mac=${eth_mac}; fi'\nsetenv try_boot_start 'if fatload ${devtype} ${devnum} ${loadaddr} KERNEL; then fatload ${devtype} ${devnum} ${env_addr} uEnv.ini && env import -t ${env_addr} ${filesize} && run addmac; fatload ${devtype} ${devnum} ${dtb_mem_addr} ${dtb_name} && run boot_start; fi'\nsetenv devtype mmc\nsetenv devnum 1\nrun try_boot_start\n"
  },
  {
    "path": "projects/Amlogic/bootloader/scripts/s905_autoscript.src",
    "content": "if fatload mmc 0 0x1000000 u-boot.ext; then go 0x1000000; fi;\nif fatload usb 0 0x1000000 u-boot.ext; then go 0x1000000; fi;\nsetenv env_addr 0x1040000\nsetenv boot_start 'bootm ${loadaddr} - ${dtb_mem_addr}'\nsetenv addmac 'if printenv mac; then setenv bootargs ${bootargs} mac=${mac}; elif printenv eth_mac; then setenv bootargs ${bootargs} mac=${eth_mac}; fi'\nsetenv try_boot_start 'if fatload ${devtype} ${devnum} ${loadaddr} KERNEL; then fatload ${devtype} ${devnum} ${env_addr} uEnv.ini && env import -t ${env_addr} ${filesize} && run addmac; fatload ${devtype} ${devnum} ${dtb_mem_addr} ${dtb_name} && run boot_start; fi'\nsetenv devtype mmc\nsetenv devnum 0\nrun try_boot_start\nsetenv devtype usb\nfor devnum in 0 1 2 3 ; do run try_boot_start ; done\n"
  },
  {
    "path": "projects/Amlogic/bootloader/update.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n[ -z \"$SYSTEM_ROOT\" ] && SYSTEM_ROOT=\"\"\n[ -z \"$BOOT_ROOT\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"$BOOT_PART\" ] && BOOT_PART=$(df \"$BOOT_ROOT\" | tail -1 | awk {' print $1 '})\n\n# identify the boot device\n  if [ -z \"$BOOT_DISK\" ]; then\n    case $BOOT_PART in\n      /dev/sd[a-z][0-9]*)\n        BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,[0-9]*,,g\")\n        ;;\n      /dev/mmcblk*)\n        BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,p[0-9]*,,g\")\n        ;;\n    esac\n  fi\n\n# mount $BOOT_ROOT rw\n  mount -o remount,rw $BOOT_ROOT\n\n# update extlinux device trees\n  if [ -f $BOOT_ROOT/extlinux/extlinux.conf ]; then\n    for dtbfile in $BOOT_ROOT/*.dtb ; do\n      dtb=$(basename $dtbfile)\n      echo \"Updating $dtb\"\n      cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT/ 2>/dev/null || true\n    done\n  fi\n\n# update box device trees\n  if [ -f $BOOT_ROOT/uEnv.ini ]; then\n    for dtbfile in $BOOT_ROOT/dtb/*.dtb ; do\n      dtb=$(basename $dtbfile)\n      echo \"Updating $dtb\"\n      cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT/dtb/ 2>/dev/null || true\n    done\n  fi\n\n# update u-boot scripts\n  if [ -f $BOOT_ROOT/uEnv.ini ]; then\n    for scriptfile in $SYSTEM_ROOT/usr/share/bootloader/*_autoscript* $SYSTEM_ROOT/usr/share/bootloader/*.scr ; do\n      script=$(basename $scriptfile)\n      echo \"Updating $script\"\n      cp -p $SYSTEM_ROOT/usr/share/bootloader/$script $BOOT_ROOT/ 2>/dev/null || true\n    done\n  fi\n\n# mount $BOOT_ROOT ro\n  sync\n  mount -o remount,ro $BOOT_ROOT\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/options",
    "content": "################################################################################\n# setup device defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc+fp+simd\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"neon-fp-armv8\"\n        ;;\n    esac\n\n  # OpenGL-ES implementation to use\n    OPENGLES=\"mesa\"\n\n  # Graphic drivers to use\n    GRAPHIC_DRIVERS=\"lima panfrost\"\n\n  # KODI Player implementation to use\n    KODIPLAYER_DRIVER=\"$OPENGLES\"\n\n  # Mali GPU family\n    MALI_FAMILY=\"450 t820 g31 g52\"\n\n  # Set the addon project\n    ADDON_PROJECT=\"ARMv8\"\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0001-LOCAL-set-meson-gx-cma-pool-to-896MB.patch",
    "content": "From c5478965aad09d2ebc682438e5474f7606e06eb2 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 13 Apr 2019 05:41:51 +0000\nSubject: [PATCH 001/120] LOCAL: set meson-gx cma pool to 896MB\n\nThis change sets the CMA pool to a larger 896MB! value for vdec use\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi\nindex 80d86780cb6b..7f20b90e11da 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi\n@@ -58,7 +58,7 @@ secmon_reserved_bl32: secmon@5300000 {\n \t\tlinux,cma {\n \t\t\tcompatible = \"shared-dma-pool\";\n \t\t\treusable;\n-\t\t\tsize = <0x0 0x10000000>;\n+\t\t\tsize = <0x0 0x38000000>;\n \t\t\talignment = <0x0 0x400000>;\n \t\t\tlinux,cma-default;\n \t\t};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0002-LOCAL-set-meson-g12-cma-pool-to-896MB.patch",
    "content": "From f442bde4d5400279042a90b8af49e4631eac3133 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 14 Aug 2019 19:58:14 +0000\nSubject: [PATCH 002/120] LOCAL: set meson-g12 cma pool to 896MB\n\nThis change sets the CMA pool to a larger 896MB! value for vdec use\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi\nindex 131a8a5a9f5a..d2b6fa8034ea 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi\n@@ -116,7 +116,7 @@ secmon_reserved_bl32: secmon@5300000 {\n \t\tlinux,cma {\n \t\t\tcompatible = \"shared-dma-pool\";\n \t\t\treusable;\n-\t\t\tsize = <0x0 0x10000000>;\n+\t\t\tsize = <0x0 0x38000000>;\n \t\t\talignment = <0x0 0x400000>;\n \t\t\tlinux,cma-default;\n \t\t};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0003-LOCAL-arm64-fix-Kodi-sysinfo-CPU-information.patch",
    "content": "From 79decc6d434e12c4bb2fc6c88073ab210bc8c8cb Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 13 Apr 2019 05:45:18 +0000\nSubject: [PATCH 003/120] LOCAL: arm64: fix Kodi sysinfo CPU information\n\nThis allows the CPU information to show in the Kodi sysinfo screen, e.g.\n\n\"ARMv8 Processor rev 4 (v81)\" on Amlogic devices\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/kernel/cpuinfo.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c\nindex 28d4f442b0bc..d46cea365be4 100644\n--- a/arch/arm64/kernel/cpuinfo.c\n+++ b/arch/arm64/kernel/cpuinfo.c\n@@ -170,8 +170,7 @@ static int c_show(struct seq_file *m, void *v)\n \t\t * \"processor\".  Give glibc what it expects.\n \t\t */\n \t\tseq_printf(m, \"processor\\t: %d\\n\", i);\n-\t\tif (compat)\n-\t\t\tseq_printf(m, \"model name\\t: ARMv8 Processor rev %d (%s)\\n\",\n+\t\tseq_printf(m, \"model name\\t: ARMv8 Processor rev %d (%s)\\n\",\n \t\t\t\t   MIDR_REVISION(midr), COMPAT_ELF_PLATFORM);\n \n \t\tseq_printf(m, \"BogoMIPS\\t: %lu.%02lu\\n\",\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0004-LOCAL-arm64-meson-add-Amlogic-Meson-GX-PM-Suspend.patch",
    "content": "From 4430a4f8e570fc70b2053fc4970758bc0976fda9 Mon Sep 17 00:00:00 2001\nFrom: Neil Armstrong <narmstrong@baylibre.com>\nDate: Thu, 3 Nov 2016 15:29:23 +0100\nSubject: [PATCH 004/120] LOCAL: arm64: meson: add Amlogic Meson GX PM Suspend\n\nThe Amlogic Meson GX SoCs uses a non-standard argument to the\nPSCI CPU_SUSPEND call to enter system suspend.\n\nImplement such call within platform_suspend_ops.\n\nSigned-off-by: Neil Armstrong <narmstrong@baylibre.com>\n---\n drivers/firmware/meson/Kconfig       |  6 ++\n drivers/firmware/meson/Makefile      |  1 +\n drivers/firmware/meson/meson_gx_pm.c | 86 ++++++++++++++++++++++++++++\n 3 files changed, 93 insertions(+)\n create mode 100644 drivers/firmware/meson/meson_gx_pm.c\n\ndiff --git a/drivers/firmware/meson/Kconfig b/drivers/firmware/meson/Kconfig\nindex f2fdd3756648..d3ead92ac61b 100644\n--- a/drivers/firmware/meson/Kconfig\n+++ b/drivers/firmware/meson/Kconfig\n@@ -9,3 +9,9 @@ config MESON_SM\n \tdepends on ARM64_4K_PAGES\n \thelp\n \t  Say y here to enable the Amlogic secure monitor driver\n+\n+config MESON_GX_PM\n+\tbool\n+\tdefault ARCH_MESON if ARM64\n+\thelp\n+\t  Say y here to enable the Amlogic GX SoC Power Management\ndiff --git a/drivers/firmware/meson/Makefile b/drivers/firmware/meson/Makefile\nindex c6c09483b622..0193cdfee32f 100644\n--- a/drivers/firmware/meson/Makefile\n+++ b/drivers/firmware/meson/Makefile\n@@ -1,2 +1,3 @@\n # SPDX-License-Identifier: GPL-2.0-only\n obj-$(CONFIG_MESON_SM) +=\tmeson_sm.o\n+obj-$(CONFIG_MESON_GX_PM) +=\tmeson_gx_pm.o\ndiff --git a/drivers/firmware/meson/meson_gx_pm.c b/drivers/firmware/meson/meson_gx_pm.c\nnew file mode 100644\nindex 000000000000..c104c2e4c77f\n--- /dev/null\n+++ b/drivers/firmware/meson/meson_gx_pm.c\n@@ -0,0 +1,86 @@\n+/*\n+ * Amlogic Meson GX Power Management\n+ *\n+ * Copyright (c) 2016 Baylibre, SAS.\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ *\n+ * This program is free software; you can redistribute it and/or modify it\n+ * under the terms of version 2 of the GNU General Public License as\n+ * published by the Free Software Foundation.\n+ *\n+ * This program is distributed in the hope that it will be useful, but WITHOUT\n+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n+ * more details.\n+ */\n+\n+#include <linux/module.h>\n+#include <linux/of.h>\n+#include <linux/platform_device.h>\n+#include <linux/suspend.h>\n+#include <linux/arm-smccc.h>\n+\n+#include <uapi/linux/psci.h>\n+\n+#include <asm/suspend.h>\n+\n+/*\n+ * The Amlogic GX SoCs uses a special argument value to the\n+ * PSCI CPU_SUSPEND method to enter SUSPEND_MEM.\n+ */\n+\n+#define MESON_SUSPEND_PARAM\t0x0010000\n+#define PSCI_FN_NATIVE(version, name)\tPSCI_##version##_FN64_##name\n+\n+static int meson_gx_suspend_finish(unsigned long arg)\n+{\n+\tstruct arm_smccc_res res;\n+\n+\tarm_smccc_smc(PSCI_FN_NATIVE(0_2, CPU_SUSPEND), arg,\n+\t\t      virt_to_phys(cpu_resume), 0, 0, 0, 0, 0, &res);\n+\n+\treturn res.a0;\n+}\n+\n+static int meson_gx_suspend_enter(suspend_state_t state)\n+{\n+\tswitch (state) {\n+\tcase PM_SUSPEND_MEM:\n+\t\treturn cpu_suspend(MESON_SUSPEND_PARAM,\n+\t\t\t\t   meson_gx_suspend_finish);\n+\t}\n+\n+\treturn -EINVAL;\n+}\n+\n+static const struct platform_suspend_ops meson_gx_pm_ops = {\n+\t\t.enter = meson_gx_suspend_enter,\n+\t\t.valid = suspend_valid_only_mem,\n+};\n+\n+static const struct of_device_id meson_gx_pm_match[] = {\n+\t{ .compatible = \"amlogic,meson-gx-pm\", },\n+\t{ /* sentinel */ },\n+};\n+MODULE_DEVICE_TABLE(of, meson_gx_pm_match);\n+\n+static int meson_gx_pm_probe(struct platform_device *pdev)\n+{\n+\tsuspend_set_ops(&meson_gx_pm_ops);\n+\n+\treturn 0;\n+}\n+\n+static struct platform_driver meson_gx_pm_driver = {\n+\t.probe = meson_gx_pm_probe,\n+\t.driver = {\n+\t\t.name = \"meson-gx-pm\",\n+\t\t.of_match_table = meson_gx_pm_match,\n+\t},\n+};\n+\n+module_platform_driver(meson_gx_pm_driver);\n+\n+MODULE_AUTHOR(\"Neil Armstrong <narmstrong@baylibre.com>\");\n+MODULE_DESCRIPTION(\"Amlogic Meson GX PM driver\");\n+MODULE_LICENSE(\"GPL v2\");\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0005-LOCAL-arm64-dts-meson-add-support-for-GX-PM-and-Virt.patch",
    "content": "From dbe7af745c89a0824b90c8f0dcf9bb4cc0f48d4c Mon Sep 17 00:00:00 2001\nFrom: Neil Armstrong <narmstrong@baylibre.com>\nDate: Thu, 3 Nov 2016 15:29:25 +0100\nSubject: [PATCH 005/120] LOCAL: arm64: dts: meson: add support for GX PM and\n Virtual RTC\n\nSigned-off-by: Neil Armstrong <narmstrong@baylibre.com>\n---\n arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi\nindex 7f20b90e11da..f39de6ead2fb 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi\n@@ -221,6 +221,10 @@ sm: secure-monitor {\n \t\t};\n \t};\n \n+\tsystem-suspend {\n+\t\tcompatible = \"amlogic,meson-gx-pm\";\n+\t};\n+\n \tefuse: efuse {\n \t\tcompatible = \"amlogic,meson-gx-efuse\", \"amlogic,meson-gxbb-efuse\";\n \t\t#address-cells = <1>;\n@@ -459,6 +463,11 @@ clkc_AO: clock-controller {\n \t\t\t\t};\n \t\t\t};\n \n+\t\t\tvrtc: rtc@a8 {\n+\t\t\t\tcompatible = \"amlogic,meson-vrtc\";\n+\t\t\t\treg = <0x0 0x000a8 0x0 0x4>;\n+\t\t\t};\n+\n \t\t\tcec_AO: cec@100 {\n \t\t\t\tcompatible = \"amlogic,meson-gx-ao-cec\";\n \t\t\t\treg = <0x0 0x00100 0x0 0x14>;\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0006-LOCAL-arm64-dts-meson-add-rtc-vrtc-aliases-to-Khadas.patch",
    "content": "From 08655d3530269d8c17410a6dc3fde69e9c23fe2f Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 21 Jan 2021 01:35:36 +0000\nSubject: [PATCH 006/120] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to\n Khadas VIM\n\nAdd aliases to ensure the vrtc time (which normally proves first) is /dev/rtc1\nwhile the onboard rtc chip claims /dev/rtc0.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts\nindex 6ab1cc125b96..24af15e18026 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts\n@@ -29,6 +29,8 @@ button-function {\n \taliases {\n \t\tserial2 = &uart_AO_B;\n \t\tethernet0 = &ethmac;\n+\t\trtc0 = &rtc;\n+\t\trtc1 = &vrtc;\n \t};\n \n \tgpio-keys-polled {\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0007-LOCAL-arm64-dts-meson-add-rtc-vrtc-aliases-to-Khadas.patch",
    "content": "From 35731fd9e4a198dbd96911828de0270f7f7fcfe9 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 6 Nov 2021 13:01:08 +0000\nSubject: [PATCH 007/120] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to\n Khadas VIM2\n\nAdd aliases to ensure the vrtc time (which normally proves first) is /dev/rtc1\nwhile the onboard rtc chip claims /dev/rtc0.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts\nindex f43c45daf7eb..6d396c1be3d6 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts\n@@ -18,6 +18,8 @@ / {\n \taliases {\n \t\tserial0 = &uart_AO;\n \t\tserial2 = &uart_AO_B;\n+\t\trtc0 = &rtc;\n+\t\trtc1 = &vrtc;\n \t};\n \n \tchosen {\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0008-LOCAL-arm64-dts-meson-add-rtc-vrtc-aliases-to-Minix-.patch",
    "content": "From 54396343f2c349acae2c8c31fd07719f3f71577f Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Mon, 1 Feb 2021 19:27:40 +0000\nSubject: [PATCH 008/120] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to\n Minix NEO U9-H\n\nAdd node aliases to prevent meson-vrtc from claiming /dev/rtc0\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts\nindex b8ef3bd8b840..0920e7b096f5 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts\n@@ -14,6 +14,11 @@ / {\n \tcompatible = \"minix,neo-u9h\", \"amlogic,s912\", \"amlogic,meson-gxm\";\n \tmodel = \"Minix Neo U9-H\";\n \n+\taliases {\n+\t\trtc0 = &rtc;\n+\t\trtc1 = &vrtc;\n+\t};\n+\n \tleds {\n \t\tcompatible = \"gpio-leds\";\n \n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0009-LOCAL-ALSA-Assign-internal-PCM-chmap-ELD-IEC958-kctl.patch",
    "content": "From 6f81de193a1d33648341c8d3a702a070dc71c133 Mon Sep 17 00:00:00 2001\nFrom: Anssi Hannula <anssi.hannula@iki.fi>\nDate: Sun, 17 Apr 2022 04:37:48 +0000\nSubject: [PATCH 009/120] LOCAL: ALSA: Assign internal PCM chmap/ELD/IEC958\n kctls to device 0\n\nOn SoC sound devices utilizing codec2codec DAI links with a HDMI codec\nthe kctls for chmap, ELD, IEC958 are currently created using the\ninternal PCM device numbers. This causes userspace to not see the\nactual channel mapping.\n\nAffected devices include LibreTech LePotato and Wetek Play 2.\n\nThe proper fix would be not create these kctls for internal PCMs and\ninstead create them for the real userspace-visible PCMs, somehow\nforwarding the controls between the HDMI codec and the real PCM.\n\nAs a workaround, simply use device=0 for all channel map controls and\nSoC HDMI codec controls for internal PCM devices.\n\nSigned-off-by: Anssi Hannula <anssi.hannula@iki.fi>\n---\n sound/core/pcm_lib.c          | 5 ++++-\n sound/soc/codecs/hdmi-codec.c | 3 ++-\n 2 files changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c\nindex 8b6aeb8a78f7..eee05d447dec 100644\n--- a/sound/core/pcm_lib.c\n+++ b/sound/core/pcm_lib.c\n@@ -2514,7 +2514,10 @@ int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream,\n \t\tknew.name = \"Playback Channel Map\";\n \telse\n \t\tknew.name = \"Capture Channel Map\";\n-\tknew.device = pcm->device;\n+\tif (pcm->internal && pcm->device)\n+\t\tdev_info(pcm->card->dev, \"workaround active: internal PCM chmap controls mapped to device 0\\n\");\n+\telse\n+\t\tknew.device = pcm->device;\n \tknew.count = pcm->streams[stream].substream_count;\n \tknew.private_value = private_value;\n \tinfo->kctl = snd_ctl_new1(&knew, info);\ndiff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c\nindex 0b1cdb2d6049..bbc33161bcca 100644\n--- a/sound/soc/codecs/hdmi-codec.c\n+++ b/sound/soc/codecs/hdmi-codec.c\n@@ -793,7 +793,8 @@ static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtime *rtd,\n \t\tif (!kctl)\n \t\t\treturn -ENOMEM;\n \n-\t\tkctl->id.device = rtd->pcm->device;\n+\t\tif (!rtd->pcm->internal)\n+\t\t\tkctl->id.device = rtd->pcm->device;\n \t\tret = snd_ctl_add(rtd->card->snd_card, kctl);\n \t\tif (ret < 0)\n \t\t\treturn ret;\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0010-LOCAL-usb-hub-disable-autosuspend-for-Genesys-Logic-.patch",
    "content": "From 6101cde6d49a5d6c4ed4535131dbce78f3523eb9 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Mon, 3 Jan 2022 10:44:17 +0000\nSubject: [PATCH 010/120] LOCAL: usb: hub: disable autosuspend for Genesys\n Logic Hubs\n\nDisable autosuspend in Genesys Logic hubs to allow USB devices on the\nOdroid C2 board to be used. The alternative to this patch is setting\nusbcore.autosuspend=-1 in boot params.\n\nThis patch only impacts GXBB devices as GXL/GXM onwards use the newer\ndwc3 core which does not have the problem.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n drivers/usb/core/hub.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c\nindex 1abe43ddb75f..7889811e5516 100644\n--- a/drivers/usb/core/hub.c\n+++ b/drivers/usb/core/hub.c\n@@ -5799,7 +5799,7 @@ static const struct usb_device_id hub_id_table[] = {\n \t\t\t| USB_DEVICE_ID_MATCH_INT_CLASS,\n       .idVendor = USB_VENDOR_GENESYS_LOGIC,\n       .bInterfaceClass = USB_CLASS_HUB,\n-      .driver_info = HUB_QUIRK_CHECK_PORT_AUTOSUSPEND},\n+      .driver_info = HUB_QUIRK_DISABLE_AUTOSUSPEND},\n     { .match_flags = USB_DEVICE_ID_MATCH_VENDOR\n \t\t\t| USB_DEVICE_ID_MATCH_PRODUCT,\n       .idVendor = USB_VENDOR_TEXAS_INSTRUMENTS,\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0011-LOCAL-of-partial-revert-of-fdt.c-changes.patch",
    "content": "From 012c3d681e1370c701cc666027871817bfc0ec6d Mon Sep 17 00:00:00 2001\nFrom: Stefan Agner <stefan@agner.ch>\nDate: Wed, 15 Sep 2021 05:00:45 +0000\nSubject: [PATCH 011/120] LOCAL: of: partial revert of fdt.c changes\n\nThis resolves reports similar to the below which are present in dmesg\nsince Linux 5.10; which are also causing crashes in some distros:\n\n[    0.000000] OF: fdt: Reserved memory: failed to reserve memory for node 'secmon@5000000': base 0x0000000005000000, size 3 MiB\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n drivers/of/fdt.c | 9 ---------\n 1 file changed, 9 deletions(-)\n\ndiff --git a/drivers/of/fdt.c b/drivers/of/fdt.c\nindex d1a68b6d03b3..81508e8b34d2 100644\n--- a/drivers/of/fdt.c\n+++ b/drivers/of/fdt.c\n@@ -480,15 +480,6 @@ static int __init early_init_dt_reserve_memory(phys_addr_t base,\n \t\t\t\t\t       phys_addr_t size, bool nomap)\n {\n \tif (nomap) {\n-\t\t/*\n-\t\t * If the memory is already reserved (by another region), we\n-\t\t * should not allow it to be marked nomap, but don't worry\n-\t\t * if the region isn't memory as it won't be mapped.\n-\t\t */\n-\t\tif (memblock_overlaps_region(&memblock.memory, base, size) &&\n-\t\t    memblock_is_region_reserved(base, size))\n-\t\t\treturn -EBUSY;\n-\n \t\treturn memblock_mark_nomap(base, size);\n \t}\n \treturn memblock_reserve(base, size);\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0012-FROMGIT-FIXES-drm-meson-meson_venc-Relax-the-support.patch",
    "content": "From 8f94ff5bdfe66ddbaafd35beb20b77fd3a1790f8 Mon Sep 17 00:00:00 2001\nFrom: Carlo Caione <ccaione@baylibre.com>\nDate: Mon, 13 Feb 2023 10:32:09 +0100\nSubject: [PATCH 012/120] FROMGIT(FIXES): drm/meson/meson_venc: Relax the\n supported mode checks\n\nRelax a bit the supported modes list by including also 480x1920 and\n400x1280. This was actually tested on real hardware and it works\ncorrectly.\n\nSigned-off-by: Carlo Caione <ccaione@baylibre.com>\n---\n drivers/gpu/drm/meson/meson_venc.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/meson/meson_venc.c b/drivers/gpu/drm/meson/meson_venc.c\nindex 3c55ed003359..fcd532db19c1 100644\n--- a/drivers/gpu/drm/meson/meson_venc.c\n+++ b/drivers/gpu/drm/meson/meson_venc.c\n@@ -866,10 +866,10 @@ meson_venc_hdmi_supported_mode(const struct drm_display_mode *mode)\n \t\t\t    DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_NVSYNC))\n \t\treturn MODE_BAD;\n \n-\tif (mode->hdisplay < 640 || mode->hdisplay > 1920)\n+\tif (mode->hdisplay < 400 || mode->hdisplay > 1920)\n \t\treturn MODE_BAD_HVALUE;\n \n-\tif (mode->vdisplay < 480 || mode->vdisplay > 1200)\n+\tif (mode->vdisplay < 480 || mode->vdisplay > 1920)\n \t\treturn MODE_BAD_VVALUE;\n \n \treturn MODE_OK;\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0014-FROMGIT-6.2-Revert-arm64-dts-meson-sm1-odroid-hc4-di.patch",
    "content": "From df013bc124b5814849cf5d4d97027432752d976d Mon Sep 17 00:00:00 2001\nFrom: Pierre-Olivier Mercier <nemunaire@nemunai.re>\nDate: Wed, 4 Jan 2023 15:19:06 +0000\nSubject: [PATCH 014/120] FROMGIT(6.2): Revert \"arm64: dts:\n meson-sm1-odroid-hc4: disable unused USB PHY0\"\n\nThis reverts commit 703e84d6615a4a95fb504c8f2e4c9426b86f3930.\n\nUSB device enumeration was not working on Odroid HC4 as both USB2 PHYs\nneed to be enabled. This is inherited from the GLX USB design [0].\n\n[0]: https://lore.kernel.org/all/20170814224542.18257-1-martin.blumenstingl@googlemail.com/T/\nLink: https://lore.kernel.org/all/Y6okoXpwF%2FLZewhv@nemunai.re/\nSigned-off-by: Pierre-Olivier Mercier <nemunaire@nemunai.re>\n---\n arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts | 8 ++------\n 1 file changed, 2 insertions(+), 6 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts\nindex 3d642d739c35..74088e7280fe 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts\n@@ -139,10 +139,6 @@ flash@0 {\n };\n \n &usb {\n-\tphys = <&usb2_phy1>;\n-\tphy-names = \"usb2-phy1\";\n-};\n-\n-&usb2_phy0 {\n-\tstatus = \"disabled\";\n+\tphys = <&usb2_phy0>, <&usb2_phy1>;\n+\tphy-names = \"usb2-phy0\", \"usb2-phy1\";\n };\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0015-FROMGIT-6.3-arm64-dts-meson-add-Broadcom-WiFi-to-P21.patch",
    "content": "From bc574310bb7aad62c46aeee3a7e590df1f5ae0e7 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 13 Jan 2022 03:50:01 +0000\nSubject: [PATCH 015/120] FROMGIT(6.3): arm64: dts: meson: add Broadcom WiFi to\n P212 dtsi\n\nThe P212 has a combined WiFi/BT module. The BT side is already enabled\nin the dtsi but the WiFi side is not. Let's enable the WiFi module.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi\nindex 05cb2f5e5c36..7055057d7942 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi\n@@ -125,6 +125,11 @@ &sd_emmc_a {\n \n \tvmmc-supply = <&vddao_3v3>;\n \tvqmmc-supply = <&vddio_boot>;\n+\n+\tbrcmf: wifi@1 {\n+\t\treg = <1>;\n+\t\tcompatible = \"brcm,bcm4329-fmac\";\n+\t};\n };\n \n /* SD card */\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0016-FROMGIT-6.3-arm64-dts-meson-move-pwm_ef-node-in-P212.patch",
    "content": "From 127106564fbef4f111b65f556affddef25d73764 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 13 Jan 2022 03:56:12 +0000\nSubject: [PATCH 016/120] FROMGIT(6.3): arm64: dts: meson: move pwm_ef node in\n P212 dtsi\n\nCosmetic-only change to alpha-sort the pwm_ef node.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../boot/dts/amlogic/meson-gxl-s905x-p212.dtsi   | 16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi\nindex 7055057d7942..a150cc0e18ff 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi\n@@ -97,6 +97,14 @@ &ir {\n \tpinctrl-names = \"default\";\n };\n \n+&pwm_ef {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&pwm_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&clkc CLKID_FCLK_DIV4>;\n+\tclock-names = \"clkin0\";\n+};\n+\n &saradc {\n \tstatus = \"okay\";\n \tvref-supply = <&vddio_ao18>;\n@@ -170,14 +178,6 @@ &sd_emmc_c {\n \tvqmmc-supply = <&vddio_boot>;\n };\n \n-&pwm_ef {\n-\tstatus = \"okay\";\n-\tpinctrl-0 = <&pwm_e_pins>;\n-\tpinctrl-names = \"default\";\n-\tclocks = <&clkc CLKID_FCLK_DIV4>;\n-\tclock-names = \"clkin0\";\n-};\n-\n /* This is connected to the Bluetooth module: */\n &uart_A {\n \tstatus = \"okay\";\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0017-FROMGIT-6.3-arm64-dts-meson-remove-WiFi-BT-nodes-fro.patch",
    "content": "From 0097b59b870692e148373b4fe171b227295d296b Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 13 Jan 2022 03:58:58 +0000\nSubject: [PATCH 017/120] FROMGIT(6.3): arm64: dts: meson: remove WiFi/BT nodes\n from Khadas VIM1\n\nThe Broadcom WiFi/BT SDIO nodes are now inherited from the P212 common dtsi\nso we can remove them from the VIM1 board dts.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../dts/amlogic/meson-gxl-s905x-khadas-vim.dts    | 15 ---------------\n 1 file changed, 15 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts\nindex 24af15e18026..5ed1e9313003 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts\n@@ -221,21 +221,6 @@ &pwm_ef {\n \n &sd_emmc_a {\n \tmax-frequency = <100000000>;\n-\n-\tbrcmf: wifi@1 {\n-\t\treg = <1>;\n-\t\tcompatible = \"brcm,bcm4329-fmac\";\n-\t};\n-};\n-\n-&uart_A {\n-\tbluetooth {\n-\t\tcompatible = \"brcm,bcm43438-bt\";\n-\t\tshutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n-\t\tmax-speed = <2000000>;\n-\t\tclocks = <&wifi32k>;\n-\t\tclock-names = \"lpo\";\n-\t};\n };\n \n /* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0018-FROMGIT-6.3-arm64-dts-meson-add-audio-playback-to-S9.patch",
    "content": "From da97eaeea4e9583bee58cc05afc29462a7d42403 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 13 Jan 2022 04:30:44 +0000\nSubject: [PATCH 018/120] FROMGIT(6.3): arm64: dts: meson: add audio playback\n to S905X-P212 dts\n\nAdd support for the HDMI and Analogue i2s audio outputs.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../boot/dts/amlogic/meson-gxl-s905x-p212.dts | 70 +++++++++++++++++++\n 1 file changed, 70 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts\nindex 2602940c2077..c2bc7cec476d 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts\n@@ -7,11 +7,19 @@\n /dts-v1/;\n \n #include \"meson-gxl-s905x-p212.dtsi\"\n+#include <dt-bindings/sound/meson-aiu.h>\n \n / {\n \tcompatible = \"amlogic,p212\", \"amlogic,s905x\", \"amlogic,meson-gxl\";\n \tmodel = \"Amlogic Meson GXL (S905X) P212 Development Board\";\n \n+\tdio2133: analog-amplifier {\n+\t\tcompatible = \"simple-audio-amplifier\";\n+\t\tsound-name-prefix = \"AU2\";\n+\t\tVCC-supply = <&hdmi_5v>;\n+\t\tenable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;\n+\t};\n+\n \tcvbs-connector {\n \t\tcompatible = \"composite-video-connector\";\n \n@@ -32,6 +40,68 @@ hdmi_connector_in: endpoint {\n \t\t\t};\n \t\t};\n \t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,gx-sound-card\";\n+\t\tmodel = \"S905X-P212\";\n+\t\taudio-aux-devs = <&dio2133>;\n+\t\taudio-widgets = \"Line\", \"Lineout\";\n+\t\taudio-routing = \"AU2 INL\", \"ACODEC LOLN\",\n+\t\t\t\t\"AU2 INR\", \"ACODEC LORN\",\n+\t\t\t\t\"Lineout\", \"AU2 OUTL\",\n+\t\t\t\t\"Lineout\", \"AU2 OUTR\";\n+\t\tassigned-clocks = <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>,\n+\t\t\t\t  <&clkc CLKID_MPLL2>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_I2S>;\n+\t\t\t};\n+\n+\t\t\tcodec-1 {\n+\t\t\t\tsound-dai = <&aiu AIU_ACODEC CTRL_I2S>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&aiu AIU_ACODEC CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&acodec>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&acodec {\n+\tAVDD-supply = <&vddio_ao18>;\n+\tstatus = \"okay\";\n+};\n+\n+&aiu {\n+\tstatus = \"okay\";\n };\n \n &cec_AO {\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0019-FROMGIT-6.3-dt-bindings-reset-meson-g12a-Add-missing.patch",
    "content": "From 6dafa687717b7d33cdecbc0494cca51f5b754251 Mon Sep 17 00:00:00 2001\nFrom: Tomeu Vizoso <tomeu.vizoso@collabora.com>\nDate: Wed, 30 Nov 2022 12:03:14 +0000\nSubject: [PATCH 019/120] FROMGIT(6.3): dt-bindings: reset: meson-g12a: Add\n missing NNA reset\n\nDoesn't appear in the TRM I have, but it is used by the downstream\ngalcore driver.\n\nSigned-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>\nAcked-by: Neil Armstrong <neil.armstrong@linaro.org>\nAcked-by: Philipp Zabel <p.zabel@pengutronix.de>\nReviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n include/dt-bindings/reset/amlogic,meson-g12a-reset.h | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/include/dt-bindings/reset/amlogic,meson-g12a-reset.h b/include/dt-bindings/reset/amlogic,meson-g12a-reset.h\nindex 6d487c5eba2c..45f6b8a951d0 100644\n--- a/include/dt-bindings/reset/amlogic,meson-g12a-reset.h\n+++ b/include/dt-bindings/reset/amlogic,meson-g12a-reset.h\n@@ -69,7 +69,9 @@\n #define RESET_PARSER_FETCH\t\t72\n #define RESET_CTL\t\t\t73\n #define RESET_PARSER_TOP\t\t74\n-/*\t\t\t\t\t75-77\t*/\n+/*\t\t\t\t\t75\t*/\n+#define RESET_NNA\t\t\t76\n+/*\t\t\t\t\t77\t*/\n #define RESET_DVALIN\t\t\t78\n #define RESET_HDMITX\t\t\t79\n /*\t\t\t\t\t80-95\t*/\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0020-FROMGIT-6.3-dt-bindings-power-Add-G12A-NNA-power-dom.patch",
    "content": "From 7327250ae9d136ee318b4f9d0537b965df324111 Mon Sep 17 00:00:00 2001\nFrom: Tomeu Vizoso <tomeu.vizoso@collabora.com>\nDate: Wed, 30 Nov 2022 12:04:02 +0000\nSubject: [PATCH 020/120] FROMGIT(6.3): dt-bindings: power: Add G12A NNA power\n domain\n\nAdd define for the NNA power domain for the NPU in the G12A.\n\nSigned-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>\nAcked-by: Neil Armstrong <neil.armstrong@linaro.org>\nReviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n include/dt-bindings/power/meson-g12a-power.h | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/include/dt-bindings/power/meson-g12a-power.h b/include/dt-bindings/power/meson-g12a-power.h\nindex bb5e67a842de..93b03bdd60b7 100644\n--- a/include/dt-bindings/power/meson-g12a-power.h\n+++ b/include/dt-bindings/power/meson-g12a-power.h\n@@ -9,5 +9,6 @@\n \n #define PWRC_G12A_VPU_ID\t\t0\n #define PWRC_G12A_ETH_ID\t\t1\n+#define PWRC_G12A_NNA_ID\t\t2\n \n #endif\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0021-FROMGIT-6.3-soc-amlogic-meson-pwrc-Add-NNA-power-dom.patch",
    "content": "From 17a33be46d9bf9f977855c631a6303c99abd002e Mon Sep 17 00:00:00 2001\nFrom: Tomeu Vizoso <tomeu.vizoso@collabora.com>\nDate: Wed, 30 Nov 2022 12:04:51 +0000\nSubject: [PATCH 021/120] FROMGIT(6.3): soc: amlogic: meson-pwrc: Add NNA power\n domain for A311D\n\nBased on power initialization sequence in downstream driver.\n\nSigned-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>\nReviewed-by: Neil Armstrong <neil.armstrong@linaro.org>\nReviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/soc/amlogic/meson-ee-pwrc.c | 17 +++++++++++++++++\n 1 file changed, 17 insertions(+)\n\ndiff --git a/drivers/soc/amlogic/meson-ee-pwrc.c b/drivers/soc/amlogic/meson-ee-pwrc.c\nindex dd5f2a13ceb5..dfbf0b1c7d29 100644\n--- a/drivers/soc/amlogic/meson-ee-pwrc.c\n+++ b/drivers/soc/amlogic/meson-ee-pwrc.c\n@@ -46,6 +46,9 @@\n #define HHI_NANOQ_MEM_PD_REG1\t\t(0x47 << 2)\n #define HHI_VPU_MEM_PD_REG2\t\t(0x4d << 2)\n \n+#define G12A_HHI_NANOQ_MEM_PD_REG0\t(0x43 << 2)\n+#define G12A_HHI_NANOQ_MEM_PD_REG1\t(0x44 << 2)\n+\n struct meson_ee_pwrc;\n struct meson_ee_pwrc_domain;\n \n@@ -106,6 +109,13 @@ static struct meson_ee_pwrc_top_domain sm1_pwrc_usb = SM1_EE_PD(17);\n static struct meson_ee_pwrc_top_domain sm1_pwrc_pci = SM1_EE_PD(18);\n static struct meson_ee_pwrc_top_domain sm1_pwrc_ge2d = SM1_EE_PD(19);\n \n+static struct meson_ee_pwrc_top_domain g12a_pwrc_nna = {\t\\\n+\t\t.sleep_reg = GX_AO_RTI_GEN_PWR_SLEEP0, \t\t\\\n+\t\t.sleep_mask = BIT(16) | BIT(17),\t\t\\\n+\t\t.iso_reg = GX_AO_RTI_GEN_PWR_ISO0, \t\t\\\n+\t\t.iso_mask = BIT(16) | BIT(17), \t\t\t\\\n+\t};\n+\n /* Memory PD Domains */\n \n #define VPU_MEMPD(__reg)\t\t\t\t\t\\\n@@ -217,6 +227,11 @@ static struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_audio[] = {\n \t{ HHI_AUDIO_MEM_PD_REG0, GENMASK(27, 26) },\n };\n \n+static struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_nna[] = {\n+\t{ G12A_HHI_NANOQ_MEM_PD_REG0, GENMASK(31, 0) },\n+\t{ G12A_HHI_NANOQ_MEM_PD_REG1, GENMASK(23, 0) },\n+};\n+\n #define VPU_PD(__name, __top_pd, __mem, __is_pwr_off, __resets, __clks)\t\\\n \t{\t\t\t\t\t\t\t\t\\\n \t\t.name = __name,\t\t\t\t\t\t\\\n@@ -253,6 +268,8 @@ static struct meson_ee_pwrc_domain_desc g12a_pwrc_domains[] = {\n \t[PWRC_G12A_VPU_ID]  = VPU_PD(\"VPU\", &gx_pwrc_vpu, g12a_pwrc_mem_vpu,\n \t\t\t\t     pwrc_ee_is_powered_off, 11, 2),\n \t[PWRC_G12A_ETH_ID] = MEM_PD(\"ETH\", meson_pwrc_mem_eth),\n+\t[PWRC_G12A_NNA_ID] = TOP_PD(\"NNA\", &g12a_pwrc_nna, g12a_pwrc_mem_nna,\n+\t\t\t\t    pwrc_ee_is_powered_off),\n };\n \n static struct meson_ee_pwrc_domain_desc gxbb_pwrc_domains[] = {\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0022-FROMGIT-6.3-arm64-dts-Add-DT-node-for-the-VIPNano-QI.patch",
    "content": "From f34fad413355b9fb666b61cc9e8df7156bbbb7b6 Mon Sep 17 00:00:00 2001\nFrom: Tomeu Vizoso <tomeu.vizoso@collabora.com>\nDate: Wed, 30 Nov 2022 12:05:46 +0000\nSubject: [PATCH 022/120] FROMGIT(6.3): arm64: dts: Add DT node for the\n VIPNano-QI on the A311D\n\nThis \"NPU\" is very similar to the Vivante GPUs and Etnaviv works well\nwith it with just a few small changes.\n\nSigned-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>\nReviewed-by: Neil Armstrong <neil.armstrong@linaro.org>\n---\n arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi    | 12 ++++++++++++\n .../dts/amlogic/meson-g12b-a311d-khadas-vim3.dts     |  4 ++++\n 2 files changed, 16 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi\nindex d2b6fa8034ea..c90066823250 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi\n@@ -11,6 +11,7 @@\n #include <dt-bindings/interrupt-controller/arm-gic.h>\n #include <dt-bindings/reset/amlogic,meson-g12a-reset.h>\n #include <dt-bindings/thermal/thermal.h>\n+#include <dt-bindings/power/meson-g12a-power.h>\n \n / {\n \tinterrupt-parent = <&gic>;\n@@ -2484,4 +2485,15 @@ xtal: xtal-clk {\n \t\t#clock-cells = <0>;\n \t};\n \n+\tnpu: npu@ff100000 {\n+\t\tstatus = \"disabled\";\n+\t\tcompatible = \"vivante,gc\";\n+\t\treg = <0x0 0xff100000 0x0 0x20000>;\n+\t\tinterrupts = <0 147 4>;\n+\t\tclocks = <&clkc CLKID_NNA_CORE_CLK>,\n+\t\t\t <&clkc CLKID_NNA_AXI_CLK>;\n+\t\tclock-names = \"core\", \"bus\";\n+\t\tresets = <&reset RESET_NNA>;\n+\t\tpower-domains = <&pwrc PWRC_G12A_NNA_ID>;\n+\t};\n };\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts\nindex 124a80901084..73f3d87dcefd 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts\n@@ -15,6 +15,10 @@ / {\n \tcompatible = \"khadas,vim3\", \"amlogic,a311d\", \"amlogic,g12b\";\n };\n \n+&npu {\n+\tstatus = \"okay\";\n+};\n+\n /*\n  * The VIM3 on-board  MCU can mux the PCIe/USB3.0 shared differential\n  * lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0023-FROMGIT-6.3-drm-etnaviv-Add-nn_core_count-to-chip-fe.patch",
    "content": "From 32817c57b6cc75595d60ea68ccc0c7c767d46898 Mon Sep 17 00:00:00 2001\nFrom: Tomeu Vizoso <tomeu.vizoso@collabora.com>\nDate: Sat, 3 Dec 2022 06:01:47 +0000\nSubject: [PATCH 023/120] FROMGIT(6.3): drm/etnaviv: Add nn_core_count to chip\n feature struct\n\nWe will use these for differentiating between GPUs and NPUs, as the\ndownstream driver does.\n\nSigned-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>\n---\n drivers/gpu/drm/etnaviv/etnaviv_gpu.h  | 3 +++\n drivers/gpu/drm/etnaviv/etnaviv_hwdb.c | 4 ++++\n 2 files changed, 7 insertions(+)\n\ndiff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h\nindex 85eddd492774..c8f3ad2031ce 100644\n--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h\n+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h\n@@ -50,6 +50,9 @@ struct etnaviv_chip_identity {\n \t/* Number of shader cores. */\n \tu32 shader_core_count;\n \n+\t/* Number of Neural Network cores. */\n+\tu32 nn_core_count;\n+\n \t/* Size of the vertex cache. */\n \tu32 vertex_cache_size;\n \ndiff --git a/drivers/gpu/drm/etnaviv/etnaviv_hwdb.c b/drivers/gpu/drm/etnaviv/etnaviv_hwdb.c\nindex f2fc645c7956..44df273a5aae 100644\n--- a/drivers/gpu/drm/etnaviv/etnaviv_hwdb.c\n+++ b/drivers/gpu/drm/etnaviv/etnaviv_hwdb.c\n@@ -16,6 +16,7 @@ static const struct etnaviv_chip_identity etnaviv_chip_identities[] = {\n \t\t.register_max = 64,\n \t\t.thread_count = 128,\n \t\t.shader_core_count = 1,\n+\t\t.nn_core_count = 0,\n \t\t.vertex_cache_size = 8,\n \t\t.vertex_output_buffer_size = 1024,\n \t\t.pixel_pipes = 1,\n@@ -47,6 +48,7 @@ static const struct etnaviv_chip_identity etnaviv_chip_identities[] = {\n \t\t.register_max = 64,\n \t\t.thread_count = 512,\n \t\t.shader_core_count = 2,\n+\t\t.nn_core_count = 0,\n \t\t.vertex_cache_size = 16,\n \t\t.vertex_output_buffer_size = 1024,\n \t\t.pixel_pipes = 1,\n@@ -78,6 +80,7 @@ static const struct etnaviv_chip_identity etnaviv_chip_identities[] = {\n \t\t.register_max = 64,\n \t\t.thread_count = 512,\n \t\t.shader_core_count = 2,\n+\t\t.nn_core_count = 0,\n \t\t.vertex_cache_size = 16,\n \t\t.vertex_output_buffer_size = 1024,\n \t\t.pixel_pipes = 1,\n@@ -109,6 +112,7 @@ static const struct etnaviv_chip_identity etnaviv_chip_identities[] = {\n \t\t.register_max = 64,\n \t\t.thread_count = 1024,\n \t\t.shader_core_count = 4,\n+\t\t.nn_core_count = 0,\n \t\t.vertex_cache_size = 16,\n \t\t.vertex_output_buffer_size = 1024,\n \t\t.pixel_pipes = 2,\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0024-FROMGIT-6.3-drm-etnaviv-Warn-when-probing-on-NPUs.patch",
    "content": "From b3155f8944de71787491aa1cedbf079939539de7 Mon Sep 17 00:00:00 2001\nFrom: Tomeu Vizoso <tomeu.vizoso@collabora.com>\nDate: Sat, 3 Dec 2022 06:02:31 +0000\nSubject: [PATCH 024/120] FROMGIT(6.3): drm/etnaviv: Warn when probing on NPUs\n\nUserspace is still not making full use of the hardware, so we don't know\nyet if changes to the UAPI won't be needed. Warn about it.\n\nSigned-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>\n---\n drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c\nindex f667e7906d1f..2fb70c73cf71 100644\n--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c\n+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c\n@@ -772,6 +772,10 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)\n \t\tgoto fail;\n \t}\n \n+\tif (gpu->identity.nn_core_count > 0)\n+\t\tdev_warn(gpu->dev, \"etnaviv has been instantiated on a NPU, \"\n+                                   \"for which the UAPI is still experimental\\n\");\n+\n \t/* Exclude VG cores with FE2.0 */\n \tif (gpu->identity.features & chipFeatures_PIPE_VG &&\n \t    gpu->identity.features & chipFeatures_FE20) {\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0025-FROMGIT-6.3-drm-etnaviv-add-HWDB-entry-for-VIPNano-Q.patch",
    "content": "From 3e9c8855643486b4f793bd13fbfc759058524062 Mon Sep 17 00:00:00 2001\nFrom: Tomeu Vizoso <tomeu.vizoso@collabora.com>\nDate: Sat, 3 Dec 2022 06:03:16 +0000\nSubject: [PATCH 025/120] FROMGIT(6.3): drm/etnaviv: add HWDB entry for\n VIPNano-QI.7120.0055\n\nThis is a compute-only module marketed towards AI and vision\nacceleration. This particular version can be found on the Amlogic A311D\nSoC.\n\nThe feature bits are taken from the Khadas downstream kernel driver\n6.4.4.3.310723AAA.\n\nSigned-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>\n---\n drivers/gpu/drm/etnaviv/etnaviv_hwdb.c | 31 ++++++++++++++++++++++++++\n 1 file changed, 31 insertions(+)\n\ndiff --git a/drivers/gpu/drm/etnaviv/etnaviv_hwdb.c b/drivers/gpu/drm/etnaviv/etnaviv_hwdb.c\nindex 44df273a5aae..66b8ad6c7d26 100644\n--- a/drivers/gpu/drm/etnaviv/etnaviv_hwdb.c\n+++ b/drivers/gpu/drm/etnaviv/etnaviv_hwdb.c\n@@ -134,6 +134,37 @@ static const struct etnaviv_chip_identity etnaviv_chip_identities[] = {\n \t\t.minor_features10 = 0x90044250,\n \t\t.minor_features11 = 0x00000024,\n \t},\n+\t{\n+\t\t.model = 0x8000,\n+\t\t.revision = 0x7120,\n+\t\t.product_id = 0x45080009,\n+\t\t.customer_id = 0x88,\n+\t\t.eco_id = 0,\n+\t\t.stream_count = 8,\n+\t\t.register_max = 64,\n+\t\t.thread_count = 256,\n+\t\t.shader_core_count = 1,\n+\t\t.vertex_cache_size = 16,\n+\t\t.vertex_output_buffer_size = 1024,\n+\t\t.pixel_pipes = 1,\n+\t\t.instruction_count = 512,\n+\t\t.num_constants = 320,\n+\t\t.buffer_size = 0,\n+\t\t.varyings_count = 16,\n+\t\t.features = 0xe0287cac,\n+\t\t.minor_features0 = 0xc1799eff,\n+\t\t.minor_features1 = 0xfefbfadb,\n+\t\t.minor_features2 = 0xeb9d6fbf,\n+\t\t.minor_features3 = 0xedfffced,\n+\t\t.minor_features4 = 0xd30dafc7,\n+\t\t.minor_features5 = 0x7b5ac333,\n+\t\t.minor_features6 = 0xfc8ee200,\n+\t\t.minor_features7 = 0x03fffa6f,\n+\t\t.minor_features8 = 0x00fe0ef0,\n+\t\t.minor_features9 = 0x0088003c,\n+\t\t.minor_features10 = 0x108048c0,\n+\t\t.minor_features11 = 0x00000010,\n+\t},\n };\n \n bool etnaviv_fill_identity_from_hwdb(struct etnaviv_gpu *gpu)\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0026-FROMGIT-6.3-arm64-dts-Fix-NPU-power-domain-reference.patch",
    "content": "From 2a3a6c002d0055ae280e94bdcff00088c60e56a6 Mon Sep 17 00:00:00 2001\nFrom: Tomeu Vizoso <tomeu.vizoso@collabora.com>\nDate: Sat, 3 Dec 2022 06:04:00 +0000\nSubject: [PATCH 026/120] FROMGIT(6.3): arm64: dts: Fix NPU power domain\n references in Amlogic G12-based SoCs\n\nThe power sequence is different between SoCs in that family, so get the\nright bits for each one.\n\nSigned-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>\n---\n arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 --\n arch/arm64/boot/dts/amlogic/meson-g12b.dtsi       | 4 ++++\n arch/arm64/boot/dts/amlogic/meson-sm1.dtsi        | 4 ++++\n 3 files changed, 8 insertions(+), 2 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi\nindex c90066823250..bb2e86073261 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi\n@@ -11,7 +11,6 @@\n #include <dt-bindings/interrupt-controller/arm-gic.h>\n #include <dt-bindings/reset/amlogic,meson-g12a-reset.h>\n #include <dt-bindings/thermal/thermal.h>\n-#include <dt-bindings/power/meson-g12a-power.h>\n \n / {\n \tinterrupt-parent = <&gic>;\n@@ -2494,6 +2493,5 @@ npu: npu@ff100000 {\n \t\t\t <&clkc CLKID_NNA_AXI_CLK>;\n \t\tclock-names = \"core\", \"bus\";\n \t\tresets = <&reset RESET_NNA>;\n-\t\tpower-domains = <&pwrc PWRC_G12A_NNA_ID>;\n \t};\n };\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi\nindex ee8fcae9f9f0..886380b5a96f 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi\n@@ -139,3 +139,7 @@ map1 {\n &mali {\n \tdma-coherent;\n };\n+\n+&npu {\n+\tpower-domains = <&pwrc PWRC_G12A_NNA_ID>;\n+};\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi\nindex 80737731af3f..318a16aa4433 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi\n@@ -543,3 +543,7 @@ &vpu {\n &usb {\n \tpower-domains = <&pwrc PWRC_SM1_USB_ID>;\n };\n+\n+&npu {\n+\tpower-domains = <&pwrc PWRC_SM1_NNA_ID>;\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0027-FROMGIT-6.3-clk-meson-mpll-Switch-from-.round_rate-t.patch",
    "content": "From 3a1d65dcdcdd2201dacf97eb5394bec9f4677297 Mon Sep 17 00:00:00 2001\nFrom: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nDate: Mon, 26 Dec 2022 04:41:46 +0000\nSubject: [PATCH 027/120] FROMGIT(6.3): clk: meson: mpll: Switch from\n .round_rate to .determine_rate\n\nclk_ops.round_rate will be removed at some point. It's replacement is\n.determine_rate. Switch clk-mpll over to use .determine_rate.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/clk/meson/clk-mpll.c | 20 +++++++++++++-------\n 1 file changed, 13 insertions(+), 7 deletions(-)\n\ndiff --git a/drivers/clk/meson/clk-mpll.c b/drivers/clk/meson/clk-mpll.c\nindex fc9df4860872..20255e129b37 100644\n--- a/drivers/clk/meson/clk-mpll.c\n+++ b/drivers/clk/meson/clk-mpll.c\n@@ -87,16 +87,22 @@ static unsigned long mpll_recalc_rate(struct clk_hw *hw,\n \treturn rate < 0 ? 0 : rate;\n }\n \n-static long mpll_round_rate(struct clk_hw *hw,\n-\t\t\t    unsigned long rate,\n-\t\t\t    unsigned long *parent_rate)\n+static int mpll_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)\n {\n \tstruct clk_regmap *clk = to_clk_regmap(hw);\n \tstruct meson_clk_mpll_data *mpll = meson_clk_mpll_data(clk);\n \tunsigned int sdm, n2;\n+\tlong rate;\n+\n+\tparams_from_rate(req->rate, req->best_parent_rate, &sdm, &n2,\n+\t\t\t mpll->flags);\n \n-\tparams_from_rate(rate, *parent_rate, &sdm, &n2, mpll->flags);\n-\treturn rate_from_params(*parent_rate, sdm, n2);\n+\trate = rate_from_params(req->best_parent_rate, sdm, n2);\n+\tif (rate < 0)\n+\t\treturn rate;\n+\n+\treq->rate = rate;\n+\treturn 0;\n }\n \n static int mpll_set_rate(struct clk_hw *hw,\n@@ -157,13 +163,13 @@ static int mpll_init(struct clk_hw *hw)\n \n const struct clk_ops meson_clk_mpll_ro_ops = {\n \t.recalc_rate\t= mpll_recalc_rate,\n-\t.round_rate\t= mpll_round_rate,\n+\t.determine_rate\t= mpll_determine_rate,\n };\n EXPORT_SYMBOL_GPL(meson_clk_mpll_ro_ops);\n \n const struct clk_ops meson_clk_mpll_ops = {\n \t.recalc_rate\t= mpll_recalc_rate,\n-\t.round_rate\t= mpll_round_rate,\n+\t.determine_rate\t= mpll_determine_rate,\n \t.set_rate\t= mpll_set_rate,\n \t.init\t\t= mpll_init,\n };\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0028-FROMGIT-6.3-clk-meson-dualdiv-switch-from-.round_rat.patch",
    "content": "From 6239c914d58c0517ccc5f1386918da94c03c2508 Mon Sep 17 00:00:00 2001\nFrom: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nDate: Mon, 26 Dec 2022 04:42:41 +0000\nSubject: [PATCH 028/120] FROMGIT(6.3): clk: meson: dualdiv: switch from\n .round_rate to .determine_rate\n\nclk_ops.round_rate will be removed at some point. It's replacement is\n.determine_rate. Switch clk-dualdiv over to use .determine_rate.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/clk/meson/clk-dualdiv.c | 21 +++++++++++++--------\n 1 file changed, 13 insertions(+), 8 deletions(-)\n\ndiff --git a/drivers/clk/meson/clk-dualdiv.c b/drivers/clk/meson/clk-dualdiv.c\nindex c5ca23a5e3e8..feae49a8f6dc 100644\n--- a/drivers/clk/meson/clk-dualdiv.c\n+++ b/drivers/clk/meson/clk-dualdiv.c\n@@ -86,18 +86,23 @@ __dualdiv_get_setting(unsigned long rate, unsigned long parent_rate,\n \treturn (struct meson_clk_dualdiv_param *)&table[best_i];\n }\n \n-static long meson_clk_dualdiv_round_rate(struct clk_hw *hw, unsigned long rate,\n-\t\t\t\t\t unsigned long *parent_rate)\n+static int meson_clk_dualdiv_determine_rate(struct clk_hw *hw,\n+\t\t\t\t\t    struct clk_rate_request *req)\n {\n \tstruct clk_regmap *clk = to_clk_regmap(hw);\n \tstruct meson_clk_dualdiv_data *dualdiv = meson_clk_dualdiv_data(clk);\n-\tconst struct meson_clk_dualdiv_param *setting =\n-\t\t__dualdiv_get_setting(rate, *parent_rate, dualdiv);\n+\tconst struct meson_clk_dualdiv_param *setting;\n \n-\tif (!setting)\n-\t\treturn meson_clk_dualdiv_recalc_rate(hw, *parent_rate);\n+\tsetting = __dualdiv_get_setting(req->rate, req->best_parent_rate,\n+\t\t\t\t\tdualdiv);\n+\tif (setting)\n+\t\treq->rate = __dualdiv_param_to_rate(req->best_parent_rate,\n+\t\t\t\t\t\t    setting);\n+\telse\n+\t\treq->rate = meson_clk_dualdiv_recalc_rate(hw,\n+\t\t\t\t\t\t\t  req->best_parent_rate);\n \n-\treturn __dualdiv_param_to_rate(*parent_rate, setting);\n+\treturn 0;\n }\n \n static int meson_clk_dualdiv_set_rate(struct clk_hw *hw, unsigned long rate,\n@@ -122,7 +127,7 @@ static int meson_clk_dualdiv_set_rate(struct clk_hw *hw, unsigned long rate,\n \n const struct clk_ops meson_clk_dualdiv_ops = {\n \t.recalc_rate\t= meson_clk_dualdiv_recalc_rate,\n-\t.round_rate\t= meson_clk_dualdiv_round_rate,\n+\t.determine_rate\t= meson_clk_dualdiv_determine_rate,\n \t.set_rate\t= meson_clk_dualdiv_set_rate,\n };\n EXPORT_SYMBOL_GPL(meson_clk_dualdiv_ops);\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0029-FROMGIT-6.3-clk-meson-sclk-div-switch-from-.round_ra.patch",
    "content": "From 450b9f39897989b1f1f9c1efe5a07417d7ef04cf Mon Sep 17 00:00:00 2001\nFrom: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nDate: Mon, 26 Dec 2022 04:43:33 +0000\nSubject: [PATCH 029/120] FROMGIT(6.3): clk: meson: sclk-div: switch from\n .round_rate to .determine_rate\n\nclk_ops.round_rate will be removed at some point. It's replacement is\n.determine_rate. Switch sclk-div over to use .determine_rate.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/clk/meson/sclk-div.c | 11 ++++++-----\n 1 file changed, 6 insertions(+), 5 deletions(-)\n\ndiff --git a/drivers/clk/meson/sclk-div.c b/drivers/clk/meson/sclk-div.c\nindex 76d31c0a3342..d12c45c4c261 100644\n--- a/drivers/clk/meson/sclk-div.c\n+++ b/drivers/clk/meson/sclk-div.c\n@@ -96,16 +96,17 @@ static int sclk_div_bestdiv(struct clk_hw *hw, unsigned long rate,\n \treturn bestdiv;\n }\n \n-static long sclk_div_round_rate(struct clk_hw *hw, unsigned long rate,\n-\t\t\t\tunsigned long *prate)\n+static int sclk_div_determine_rate(struct clk_hw *hw,\n+\t\t\t\t   struct clk_rate_request *req)\n {\n \tstruct clk_regmap *clk = to_clk_regmap(hw);\n \tstruct meson_sclk_div_data *sclk = meson_sclk_div_data(clk);\n \tint div;\n \n-\tdiv = sclk_div_bestdiv(hw, rate, prate, sclk);\n+\tdiv = sclk_div_bestdiv(hw, req->rate, &req->best_parent_rate, sclk);\n+\treq->rate = DIV_ROUND_UP_ULL((u64)req->best_parent_rate, div);\n \n-\treturn DIV_ROUND_UP_ULL((u64)*prate, div);\n+\treturn 0;\n }\n \n static void sclk_apply_ratio(struct clk_regmap *clk,\n@@ -237,7 +238,7 @@ static int sclk_div_init(struct clk_hw *hw)\n \n const struct clk_ops meson_sclk_div_ops = {\n \t.recalc_rate\t= sclk_div_recalc_rate,\n-\t.round_rate\t= sclk_div_round_rate,\n+\t.determine_rate\t= sclk_div_determine_rate,\n \t.set_rate\t= sclk_div_set_rate,\n \t.enable\t\t= sclk_div_enable,\n \t.disable\t= sclk_div_disable,\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0030-FROMGIT-6.3-clk-meson-clk-cpu-dyndiv-switch-from-.ro.patch",
    "content": "From 900d5cb13f3c1b7ced0586497190be1ed96a4742 Mon Sep 17 00:00:00 2001\nFrom: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nDate: Mon, 26 Dec 2022 04:44:26 +0000\nSubject: [PATCH 030/120] FROMGIT(6.3): clk: meson: clk-cpu-dyndiv: switch from\n .round_rate to .determine_rate\n\nclk_ops.round_rate will be removed at some point. It's replacement is\n.determine_rate. Switch clk-cpu-dyndiv over to use .determine_rate.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/clk/meson/clk-cpu-dyndiv.c | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)\n\ndiff --git a/drivers/clk/meson/clk-cpu-dyndiv.c b/drivers/clk/meson/clk-cpu-dyndiv.c\nindex 36976927fe82..8778c149d26a 100644\n--- a/drivers/clk/meson/clk-cpu-dyndiv.c\n+++ b/drivers/clk/meson/clk-cpu-dyndiv.c\n@@ -27,14 +27,13 @@ static unsigned long meson_clk_cpu_dyndiv_recalc_rate(struct clk_hw *hw,\n \t\t\t\t   NULL, 0, data->div.width);\n }\n \n-static long meson_clk_cpu_dyndiv_round_rate(struct clk_hw *hw,\n-\t\t\t\t\t    unsigned long rate,\n-\t\t\t\t\t    unsigned long *prate)\n+static int meson_clk_cpu_dyndiv_determine_rate(struct clk_hw *hw,\n+\t\t\t\t\t       struct clk_rate_request *req)\n {\n \tstruct clk_regmap *clk = to_clk_regmap(hw);\n \tstruct meson_clk_cpu_dyndiv_data *data = meson_clk_cpu_dyndiv_data(clk);\n \n-\treturn divider_round_rate(hw, rate, prate, NULL, data->div.width, 0);\n+\treturn divider_determine_rate(hw, req, NULL, data->div.width, 0);\n }\n \n static int meson_clk_cpu_dyndiv_set_rate(struct clk_hw *hw, unsigned long rate,\n@@ -63,7 +62,7 @@ static int meson_clk_cpu_dyndiv_set_rate(struct clk_hw *hw, unsigned long rate,\n \n const struct clk_ops meson_clk_cpu_dyndiv_ops = {\n \t.recalc_rate = meson_clk_cpu_dyndiv_recalc_rate,\n-\t.round_rate = meson_clk_cpu_dyndiv_round_rate,\n+\t.determine_rate = meson_clk_cpu_dyndiv_determine_rate,\n \t.set_rate = meson_clk_cpu_dyndiv_set_rate,\n };\n EXPORT_SYMBOL_GPL(meson_clk_cpu_dyndiv_ops);\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0031-FROMGIT-6.3-arm64-dts-meson-make-dts-use-gpio-fan-ma.patch",
    "content": "From 6e28630c533846d7c79bb388a1cc1e13650e45b6 Mon Sep 17 00:00:00 2001\nFrom: David Heidelberg <david@ixit.cz>\nDate: Sat, 27 Nov 2021 07:23:35 +0000\nSubject: [PATCH 031/120] FROMGIT(6.3): arm64: dts: meson: make dts use\n gpio-fan matrix instead of array\n\nNo functional changes.\n\nAdjust to comply with dt-schema requirements\nand make possible to validate values.\n\nSigned-off-by: David Heidelberg <david@ixit.cz>\nAcked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 9 +++++----\n 1 file changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts\nindex 6d396c1be3d6..9b0c7e9d0620 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts\n@@ -54,10 +54,11 @@ gpio_fan: gpio-fan {\n \t\tgpios = <&gpio GPIODV_14 GPIO_ACTIVE_HIGH\n \t\t\t &gpio GPIODV_15 GPIO_ACTIVE_HIGH>;\n \t\t/* Dummy RPM values since fan is optional */\n-\t\tgpio-fan,speed-map = <0 0\n-\t\t\t\t      1 1\n-\t\t\t\t      2 2\n-\t\t\t\t      3 3>;\n+\t\tgpio-fan,speed-map =\n+\t\t\t\t<0 0>,\n+\t\t\t\t<1 1>,\n+\t\t\t\t<2 2>,\n+\t\t\t\t<3 3>;\n \t\t#cooling-cells = <2>;\n \t};\n \n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0032-FROMGIT-6.3-arm64-dts-meson-meson-sm1-bananapi-m5-co.patch",
    "content": "From 67e3334c533941ed976a3d6390c4553a0a4bf660 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 25 Jan 2023 08:10:48 +0000\nSubject: [PATCH 032/120] FROMGIT(6.3): arm64: dts: meson:\n meson-sm1-bananapi-m5: convert to dtsi\n\nConvert the BPI-M5 dts into meson-sm1-bananapi.dtsi to support the\naddition of new boards based on the same design.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../dts/amlogic/meson-sm1-bananapi-m5.dts     | 427 +----------------\n .../boot/dts/amlogic/meson-sm1-bananapi.dtsi  | 435 ++++++++++++++++++\n 2 files changed, 436 insertions(+), 426 deletions(-)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-bananapi.dtsi\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts\nindex 38ebe98ba9c6..34b3238ee0a0 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts\n@@ -6,10 +6,7 @@\n \n /dts-v1/;\n \n-#include \"meson-sm1.dtsi\"\n-#include <dt-bindings/leds/common.h>\n-#include <dt-bindings/input/linux-event-codes.h>\n-#include <dt-bindings/gpio/meson-g12a-gpio.h>\n+#include \"meson-sm1-bananapi.dtsi\"\n #include <dt-bindings/sound/meson-g12a-toacodec.h>\n #include <dt-bindings/sound/meson-g12a-tohdmitx.h>\n \n@@ -17,28 +14,6 @@ / {\n \tcompatible = \"bananapi,bpi-m5\", \"amlogic,sm1\";\n \tmodel = \"Banana Pi BPI-M5\";\n \n-\tadc-keys {\n-\t\tcompatible = \"adc-keys\";\n-\t\tio-channels = <&saradc 2>;\n-\t\tio-channel-names = \"buttons\";\n-\t\tkeyup-threshold-microvolt = <1800000>;\n-\n-\t\tbutton-sw3 {\n-\t\t\tlabel = \"SW3\";\n-\t\t\tlinux,code = <BTN_3>;\n-\t\t\tpress-threshold-microvolt = <1700000>;\n-\t\t};\n-\t};\n-\n-\taliases {\n-\t\tserial0 = &uart_AO;\n-\t\tethernet0 = &ethmac;\n-\t};\n-\n-\tchosen {\n-\t\tstdout-path = \"serial0:115200n8\";\n-\t};\n-\n \t/* TOFIX: handle CVBS_DET on SARADC channel 0 */\n \tcvbs-connector {\n \t\tcompatible = \"composite-video-connector\";\n@@ -50,150 +25,6 @@ cvbs_connector_in: endpoint {\n \t\t};\n \t};\n \n-\temmc_pwrseq: emmc-pwrseq {\n-\t\tcompatible = \"mmc-pwrseq-emmc\";\n-\t\treset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;\n-\t};\n-\n-\tgpio-keys {\n-\t\tcompatible = \"gpio-keys\";\n-\n-\t\tkey {\n-\t\t\tlabel = \"SW1\";\n-\t\t\tlinux,code = <BTN_1>;\n-\t\t\tgpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;\n-\t\t\tinterrupt-parent = <&gpio_intc>;\n-\t\t\tinterrupts = <3 IRQ_TYPE_EDGE_BOTH>;\n-\t\t};\n-\t};\n-\n-\thdmi-connector {\n-\t\tcompatible = \"hdmi-connector\";\n-\t\ttype = \"a\";\n-\n-\t\tport {\n-\t\t\thdmi_connector_in: endpoint {\n-\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n-\t\t\t};\n-\t\t};\n-\t};\n-\n-\tleds {\n-\t\tcompatible = \"gpio-leds\";\n-\n-\t\tgreen {\n-\t\t\tcolor = <LED_COLOR_ID_GREEN>;\n-\t\t\tfunction = LED_FUNCTION_STATUS;\n-\t\t\tgpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;\n-\t\t};\n-\n-\t\tblue {\n-\t\t\tcolor = <LED_COLOR_ID_BLUE>;\n-\t\t\tfunction = LED_FUNCTION_STATUS;\n-\t\t\tgpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_LOW>;\n-\t\t\tlinux,default-trigger = \"heartbeat\";\n-\t\t};\n-\t};\n-\n-\tmemory@0 {\n-\t\tdevice_type = \"memory\";\n-\t\treg = <0x0 0x0 0x0 0x40000000>;\n-\t};\n-\n-\temmc_1v8: regulator-emmc_1v8 {\n-\t\tcompatible = \"regulator-fixed\";\n-\t\tregulator-name = \"EMMC_1V8\";\n-\t\tregulator-min-microvolt = <1800000>;\n-\t\tregulator-max-microvolt = <1800000>;\n-\t\tvin-supply = <&vddao_3v3>;\n-\t\tregulator-always-on;\n-\t};\n-\n-\tdc_in: regulator-dc_in {\n-\t\tcompatible = \"regulator-fixed\";\n-\t\tregulator-name = \"DC_IN\";\n-\t\tregulator-min-microvolt = <5000000>;\n-\t\tregulator-max-microvolt = <5000000>;\n-\t\tregulator-always-on;\n-\t};\n-\n-\tvddio_c: regulator-vddio_c {\n-\t\tcompatible = \"regulator-gpio\";\n-\t\tregulator-name = \"VDDIO_C\";\n-\t\tregulator-min-microvolt = <1800000>;\n-\t\tregulator-max-microvolt = <3300000>;\n-\n-\t\tenable-gpio = <&gpio_ao GPIOE_2 GPIO_OPEN_DRAIN>;\n-\t\tenable-active-high;\n-\t\tregulator-always-on;\n-\n-\t\tgpios = <&gpio_ao GPIOAO_6 GPIO_OPEN_DRAIN>;\n-\t\tgpios-states = <1>;\n-\n-\t\tstates = <1800000 0>,\n-\t\t\t <3300000 1>;\n-\t};\n-\n-\ttflash_vdd: regulator-tflash_vdd {\n-\t\tcompatible = \"regulator-fixed\";\n-\t\tregulator-name = \"TFLASH_VDD\";\n-\t\tregulator-min-microvolt = <3300000>;\n-\t\tregulator-max-microvolt = <3300000>;\n-\t\tvin-supply = <&dc_in>;\n-\t\tgpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;\n-\t\tenable-active-high;\n-\t\tregulator-always-on;\n-\t};\n-\n-\tvddao_1v8: regulator-vddao_1v8 {\n-\t\tcompatible = \"regulator-fixed\";\n-\t\tregulator-name = \"VDDAO_1V8\";\n-\t\tregulator-min-microvolt = <1800000>;\n-\t\tregulator-max-microvolt = <1800000>;\n-\t\tvin-supply = <&vddao_3v3>;\n-\t\tregulator-always-on;\n-\t};\n-\n-\tvddao_3v3: regulator-vddao_3v3 {\n-\t\tcompatible = \"regulator-fixed\";\n-\t\tregulator-name = \"VDDAO_3V3\";\n-\t\tregulator-min-microvolt = <3300000>;\n-\t\tregulator-max-microvolt = <3300000>;\n-\t\tvin-supply = <&dc_in>;\n-\t\tregulator-always-on;\n-\t};\n-\n-\tvddcpu: regulator-vddcpu {\n-\t\t/*\n-\t\t * SY8120B1ABC DC/DC Regulator.\n-\t\t */\n-\t\tcompatible = \"pwm-regulator\";\n-\n-\t\tregulator-name = \"VDDCPU\";\n-\t\tregulator-min-microvolt = <690000>;\n-\t\tregulator-max-microvolt = <1050000>;\n-\n-\t\tpwm-supply = <&dc_in>;\n-\n-\t\tpwms = <&pwm_AO_cd 1 1250 0>;\n-\t\tpwm-dutycycle-range = <100 0>;\n-\n-\t\tregulator-boot-on;\n-\t\tregulator-always-on;\n-\t};\n-\n-\t/* USB Hub Power Enable */\n-\tvl_pwr_en: regulator-vl_pwr_en {\n-\t\tcompatible = \"regulator-fixed\";\n-\t\tregulator-name = \"VL_PWR_EN\";\n-\t\tregulator-min-microvolt = <5000000>;\n-\t\tregulator-max-microvolt = <5000000>;\n-\t\tvin-supply = <&dc_in>;\n-\n-\t\tgpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;\n-\t\tenable-active-high;\n-\t};\n-\n \tsound {\n \t\tcompatible = \"amlogic,axg-sound-card\";\n \t\tmodel = \"BPI-M5\";\n@@ -319,68 +150,17 @@ &acodec {\n \tstatus = \"okay\";\n };\n \n-&arb {\n-\tstatus = \"okay\";\n-};\n \n &clkc_audio {\n \tstatus = \"okay\";\n };\n \n-&cpu0 {\n-\tcpu-supply = <&vddcpu>;\n-\toperating-points-v2 = <&cpu_opp_table>;\n-\tclocks = <&clkc CLKID_CPU_CLK>;\n-\tclock-latency = <50000>;\n-};\n-\n-&cpu1 {\n-\tcpu-supply = <&vddcpu>;\n-\toperating-points-v2 = <&cpu_opp_table>;\n-\tclocks = <&clkc CLKID_CPU1_CLK>;\n-\tclock-latency = <50000>;\n-};\n-\n-&cpu2 {\n-\tcpu-supply = <&vddcpu>;\n-\toperating-points-v2 = <&cpu_opp_table>;\n-\tclocks = <&clkc CLKID_CPU2_CLK>;\n-\tclock-latency = <50000>;\n-};\n-\n-&cpu3 {\n-\tcpu-supply = <&vddcpu>;\n-\toperating-points-v2 = <&cpu_opp_table>;\n-\tclocks = <&clkc CLKID_CPU3_CLK>;\n-\tclock-latency = <50000>;\n-};\n-\n &cvbs_vdac_port {\n \tcvbs_vdac_out: endpoint {\n \t\tremote-endpoint = <&cvbs_connector_in>;\n \t};\n };\n \n-&ext_mdio {\n-\texternal_phy: ethernet-phy@0 {\n-\t\t/* Realtek RTL8211F (0x001cc916) */\n-\t\treg = <0>;\n-\t\tmax-speed = <1000>;\n-\n-\t\tinterrupt-parent = <&gpio_intc>;\n-\t\t/* MAC_INTR on GPIOZ_14 */\n-\t\tinterrupts = <26 IRQ_TYPE_LEVEL_LOW>;\n-\t};\n-};\n-\n-&ethmac {\n-\tpinctrl-0 = <&eth_pins>, <&eth_rgmii_pins>;\n-\tpinctrl-names = \"default\";\n-\tstatus = \"okay\";\n-\tphy-mode = \"rgmii-txid\";\n-\tphy-handle = <&external_phy>;\n-};\n-\n &frddr_a {\n \tstatus = \"okay\";\n };\n@@ -393,192 +173,6 @@ &frddr_c {\n \tstatus = \"okay\";\n };\n \n-&gpio {\n-\tgpio-line-names =\n-\t\t/* GPIOZ */\n-\t\t\"ETH_MDIO\", /* GPIOZ_0 */\n-\t\t\"ETH_MDC\", /* GPIOZ_1 */\n-\t\t\"ETH_RXCLK\", /* GPIOZ_2 */\n-\t\t\"ETH_RX_DV\", /* GPIOZ_3 */\n-\t\t\"ETH_RXD0\", /* GPIOZ_4 */\n-\t\t\"ETH_RXD1\", /* GPIOZ_5 */\n-\t\t\"ETH_RXD2\", /* GPIOZ_6 */\n-\t\t\"ETH_RXD3\", /* GPIOZ_7 */\n-\t\t\"ETH_TXCLK\", /* GPIOZ_8 */\n-\t\t\"ETH_TXEN\", /* GPIOZ_9 */\n-\t\t\"ETH_TXD0\", /* GPIOZ_10 */\n-\t\t\"ETH_TXD1\", /* GPIOZ_11 */\n-\t\t\"ETH_TXD2\", /* GPIOZ_12 */\n-\t\t\"ETH_TXD3\", /* GPIOZ_13 */\n-\t\t\"ETH_INTR\", /* GPIOZ_14 */\n-\t\t\"ETH_NRST\", /* GPIOZ_15 */\n-\t\t/* GPIOH */\n-\t\t\"HDMI_SDA\", /* GPIOH_0 */\n-\t\t\"HDMI_SCL\", /* GPIOH_1 */\n-\t\t\"HDMI_HPD\", /* GPIOH_2 */\n-\t\t\"HDMI_CEC\", /* GPIOH_3 */\n-\t\t\"VL-RST_N\", /* GPIOH_4 */\n-\t\t\"CON1-P36\", /* GPIOH_5 */\n-\t\t\"VL-PWREN\", /* GPIOH_6 */\n-\t\t\"WiFi_3V3_1V8\", /* GPIOH_7 */\n-\t\t\"TFLASH_VDD_EN\", /* GPIOH_8 */\n-\t\t/* BOOT */\n-\t\t\"eMMC_D0\", /* BOOT_0 */\n-\t\t\"eMMC_D1\", /* BOOT_1 */\n-\t\t\"eMMC_D2\", /* BOOT_2 */\n-\t\t\"eMMC_D3\", /* BOOT_3 */\n-\t\t\"eMMC_D4\", /* BOOT_4 */\n-\t\t\"eMMC_D5\", /* BOOT_5 */\n-\t\t\"eMMC_D6\", /* BOOT_6 */\n-\t\t\"eMMC_D7\", /* BOOT_7 */\n-\t\t\"eMMC_CLK\", /* BOOT_8 */\n-\t\t\"\",\n-\t\t\"eMMC_CMD\", /* BOOT_10 */\n-\t\t\"\",\n-\t\t\"eMMC_RST#\", /* BOOT_12 */\n-\t\t\"eMMC_DS\", /* BOOT_13 */\n-\t\t\"\", \"\",\n-\t\t/* GPIOC */\n-\t\t\"SD_D0_B\", /* GPIOC_0 */\n-\t\t\"SD_D1_B\", /* GPIOC_1 */\n-\t\t\"SD_D2_B\", /* GPIOC_2 */\n-\t\t\"SD_D3_B\", /* GPIOC_3 */\n-\t\t\"SD_CLK_B\", /* GPIOC_4 */\n-\t\t\"SD_CMD_B\", /* GPIOC_5 */\n-\t\t\"CARD_EN_DET\", /* GPIOC_6 */\n-\t\t\"\",\n-\t\t/* GPIOA */\n-\t\t\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\",\n-\t\t\"\", \"\", \"\", \"\", \"\", \"\",\n-\t\t\"CON1-P27\", /* GPIOA_14 */\n-\t\t\"CON1-P28\", /* GPIOA_15 */\n-\t\t/* GPIOX */\n-\t\t\"CON1-P16\", /* GPIOX_0 */\n-\t\t\"CON1-P18\", /* GPIOX_1 */\n-\t\t\"CON1-P22\", /* GPIOX_2 */\n-\t\t\"CON1-P11\", /* GPIOX_3 */\n-\t\t\"CON1-P13\", /* GPIOX_4 */\n-\t\t\"CON1-P07\", /* GPIOX_5 */\n-\t\t\"CON1-P33\", /* GPIOX_6 */\n-\t\t\"CON1-P15\", /* GPIOX_7 */\n-\t\t\"CON1-P19\", /* GPIOX_8 */\n-\t\t\"CON1-P21\", /* GPIOX_9 */\n-\t\t\"CON1-P24\", /* GPIOX_10 */\n-\t\t\"CON1-P23\", /* GPIOX_11 */\n-\t\t\"CON1-P08\", /* GPIOX_12 */\n-\t\t\"CON1-P10\", /* GPIOX_13 */\n-\t\t\"CON1-P29\", /* GPIOX_14 */\n-\t\t\"CON1-P31\", /* GPIOX_15 */\n-\t\t\"CON1-P26\", /* GPIOX_16 */\n-\t\t\"CON1-P03\", /* GPIOX_17 */\n-\t\t\"CON1-P05\", /* GPIOX_18 */\n-\t\t\"CON1-P32\"; /* GPIOX_19 */\n-\n-\t/*\n-\t * WARNING: The USB Hub on the BPI-M5 needs a reset signal\n-\t * to be turned high in order to be detected by the USB Controller\n-\t * This signal should be handled by a USB specific power sequence\n-\t * in order to reset the Hub when USB bus is powered down.\n-\t */\n-\tusb-hub {\n-\t\tgpio-hog;\n-\t\tgpios = <GPIOH_4 GPIO_ACTIVE_HIGH>;\n-\t\toutput-high;\n-\t\tline-name = \"usb-hub-reset\";\n-\t};\n-};\n-\n-&gpio_ao {\n-\tgpio-line-names =\n-\t\t/* GPIOAO */\n-\t\t\"DEBUG TX\", /* GPIOAO_0 */\n-\t\t\"DEBUG RX\", /* GPIOAO_1 */\n-\t\t\"SYS_LED2\", /* GPIOAO_2 */\n-\t\t\"UPDATE_KEY\", /* GPIOAO_3 */\n-\t\t\"CON1-P40\", /* GPIOAO_4 */\n-\t\t\"IR_IN\", /* GPIOAO_5 */\n-\t\t\"TF_3V3N_1V8_EN\", /* GPIOAO_6 */\n-\t\t\"CON1-P35\", /* GPIOAO_7 */\n-\t\t\"CON1-P12\", /* GPIOAO_8 */\n-\t\t\"CON1-P37\", /* GPIOAO_9 */\n-\t\t\"CON1-P38\", /* GPIOAO_10 */\n-\t\t\"SYS_LED\", /* GPIOAO_11 */\n-\t\t/* GPIOE */\n-\t\t\"VDDEE_PWM\", /* GPIOE_0 */\n-\t\t\"VDDCPU_PWM\", /* GPIOE_1 */\n-\t\t\"TF_PWR_EN\"; /* GPIOE_2 */\n-};\n-\n-&hdmi_tx {\n-\tstatus = \"okay\";\n-\tpinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;\n-\tpinctrl-names = \"default\";\n-\thdmi-supply = <&dc_in>;\n-};\n-\n-&hdmi_tx_tmds_port {\n-\thdmi_tx_tmds_out: endpoint {\n-\t\tremote-endpoint = <&hdmi_connector_in>;\n-\t};\n-};\n-\n-&ir {\n-\tstatus = \"okay\";\n-\tpinctrl-0 = <&remote_input_ao_pins>;\n-\tpinctrl-names = \"default\";\n-};\n-\n-&pwm_AO_cd {\n-\tpinctrl-0 = <&pwm_ao_d_e_pins>;\n-\tpinctrl-names = \"default\";\n-\tclocks = <&xtal>;\n-\tclock-names = \"clkin1\";\n-\tstatus = \"okay\";\n-};\n-\n-&saradc {\n-\tstatus = \"okay\";\n-\tvref-supply = <&vddao_1v8>;\n-};\n-\n-/* SD card */\n-&sd_emmc_b {\n-\tstatus = \"okay\";\n-\tpinctrl-0 = <&sdcard_c_pins>;\n-\tpinctrl-1 = <&sdcard_clk_gate_c_pins>;\n-\tpinctrl-names = \"default\", \"clk-gate\";\n-\n-\tbus-width = <4>;\n-\tcap-sd-highspeed;\n-\tmax-frequency = <50000000>;\n-\tdisable-wp;\n-\n-\t/* TOFIX: SD card is barely usable in SDR modes */\n-\n-\tcd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;\n-\tvmmc-supply = <&tflash_vdd>;\n-\tvqmmc-supply = <&vddio_c>;\n-};\n-\n-/* eMMC */\n-&sd_emmc_c {\n-\tstatus = \"okay\";\n-\tpinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;\n-\tpinctrl-1 = <&emmc_clk_gate_pins>;\n-\tpinctrl-names = \"default\", \"clk-gate\";\n-\n-\tbus-width = <8>;\n-\tcap-mmc-highspeed;\n-\tmmc-ddr-1_8v;\n-\tmmc-hs200-1_8v;\n-\tmax-frequency = <200000000>;\n-\tdisable-wp;\n-\n-\tmmc-pwrseq = <&emmc_pwrseq>;\n-\tvmmc-supply = <&vddao_3v3>;\n-\tvqmmc-supply = <&emmc_1v8>;\n-};\n-\n &tdmif_b {\n \tstatus = \"okay\";\n };\n@@ -626,22 +220,3 @@ &toddr_b {\n &toddr_c {\n \tstatus = \"okay\";\n };\n-\n-&uart_AO {\n-\tstatus = \"okay\";\n-\tpinctrl-0 = <&uart_ao_a_pins>;\n-\tpinctrl-names = \"default\";\n-};\n-\n-&usb {\n-\tstatus = \"okay\";\n-};\n-\n-&usb2_phy0 {\n-\tphy-supply = <&dc_in>;\n-};\n-\n-&usb2_phy1 {\n-\t/* Enable the hub which is connected to this port */\n-\tphy-supply = <&vl_pwr_en>;\n-};\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi.dtsi\nnew file mode 100644\nindex 000000000000..c914f1148185\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi.dtsi\n@@ -0,0 +1,435 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2021 BayLibre SAS\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ */\n+\n+#include \"meson-sm1.dtsi\"\n+#include <dt-bindings/leds/common.h>\n+#include <dt-bindings/input/linux-event-codes.h>\n+#include <dt-bindings/gpio/meson-g12a-gpio.h>\n+\n+/ {\n+\tadc_keys {\n+\t\tcompatible = \"adc-keys\";\n+\t\tio-channels = <&saradc 2>;\n+\t\tio-channel-names = \"buttons\";\n+\t\tkeyup-threshold-microvolt = <1800000>;\n+\n+\t\tkey {\n+\t\t\tlabel = \"SW3\";\n+\t\t\tlinux,code = <BTN_3>;\n+\t\t\tpress-threshold-microvolt = <1700000>;\n+\t\t};\n+\t};\n+\n+\taliases {\n+\t\tserial0 = &uart_AO;\n+\t\tethernet0 = &ethmac;\n+\t};\n+\n+\tchosen {\n+\t\tstdout-path = \"serial0:115200n8\";\n+\t};\n+\n+\temmc_pwrseq: emmc-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-emmc\";\n+\t\treset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;\n+\t};\n+\n+\tgpio-keys {\n+\t\tcompatible = \"gpio-keys\";\n+\n+\t\tkey {\n+\t\t\tlabel = \"SW1\";\n+\t\t\tlinux,code = <BTN_1>;\n+\t\t\tgpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;\n+\t\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t\tinterrupts = <3 IRQ_TYPE_EDGE_BOTH>;\n+\t\t};\n+\t};\n+\n+\thdmi-connector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-green {\n+\t\t\tcolor = <LED_COLOR_ID_GREEN>;\n+\t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tgpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;\n+\t\t};\n+\n+\t\tled-blue {\n+\t\t\tcolor = <LED_COLOR_ID_BLUE>;\n+\t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tgpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_LOW>;\n+\t\t\tlinux,default-trigger = \"heartbeat\";\n+\t\t};\n+\t};\n+\n+\tmemory@0 {\n+\t\tdevice_type = \"memory\";\n+\t\treg = <0x0 0x0 0x0 0x40000000>;\n+\t};\n+\n+\temmc_1v8: regulator-emmc_1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"EMMC_1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vddao_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tdc_in: regulator-dc_in {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"DC_IN\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddio_c: regulator-vddio_c {\n+\t\tcompatible = \"regulator-gpio\";\n+\t\tregulator-name = \"VDDIO_C\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\n+\t\tenable-gpio = <&gpio_ao GPIOE_2 GPIO_OPEN_DRAIN>;\n+\t\tenable-active-high;\n+\t\tregulator-always-on;\n+\n+\t\tgpios = <&gpio_ao GPIOAO_6 GPIO_OPEN_DRAIN>;\n+\t\tgpios-states = <1>;\n+\n+\t\tstates = <1800000 0>,\n+\t\t\t <3300000 1>;\n+\t};\n+\n+\ttflash_vdd: regulator-tflash_vdd {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"TFLASH_VDD\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&dc_in>;\n+\t\tgpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;\n+\t\tenable-active-high;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddao_1v8: regulator-vddao_1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDAO_1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vddao_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddao_3v3: regulator-vddao_3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDAO_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&dc_in>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddcpu: regulator-vddcpu {\n+\t\t/*\n+\t\t * SY8120B1ABC DC/DC Regulator.\n+\t\t */\n+\t\tcompatible = \"pwm-regulator\";\n+\n+\t\tregulator-name = \"VDDCPU\";\n+\t\tregulator-min-microvolt = <690000>;\n+\t\tregulator-max-microvolt = <1050000>;\n+\n+\t\tpwm-supply = <&dc_in>;\n+\n+\t\tpwms = <&pwm_AO_cd 1 1250 0>;\n+\t\tpwm-dutycycle-range = <100 0>;\n+\n+\t\tregulator-boot-on;\n+\t\tregulator-always-on;\n+\t};\n+\n+\t/* USB Hub Power Enable */\n+\tvl_pwr_en: regulator-vl_pwr_en {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VL_PWR_EN\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tvin-supply = <&dc_in>;\n+\n+\t\tgpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;\n+\t\tenable-active-high;\n+\t};\n+};\n+\n+&arb {\n+\tstatus = \"okay\";\n+};\n+\n+&cpu0 {\n+\tcpu-supply = <&vddcpu>;\n+\toperating-points-v2 = <&cpu_opp_table>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu1 {\n+\tcpu-supply = <&vddcpu>;\n+\toperating-points-v2 = <&cpu_opp_table>;\n+\tclocks = <&clkc CLKID_CPU1_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu2 {\n+\tcpu-supply = <&vddcpu>;\n+\toperating-points-v2 = <&cpu_opp_table>;\n+\tclocks = <&clkc CLKID_CPU2_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu3 {\n+\tcpu-supply = <&vddcpu>;\n+\toperating-points-v2 = <&cpu_opp_table>;\n+\tclocks = <&clkc CLKID_CPU3_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&ext_mdio {\n+\texternal_phy: ethernet-phy@0 {\n+\t\t/* Realtek RTL8211F (0x001cc916) */\n+\t\treg = <0>;\n+\t\tmax-speed = <1000>;\n+\n+\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t/* MAC_INTR on GPIOZ_14 */\n+\t\tinterrupts = <26 IRQ_TYPE_LEVEL_LOW>;\n+\t};\n+};\n+\n+&ethmac {\n+\tpinctrl-0 = <&eth_pins>, <&eth_rgmii_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"okay\";\n+\tphy-mode = \"rgmii-txid\";\n+\tphy-handle = <&external_phy>;\n+};\n+\n+&gpio {\n+\tgpio-line-names =\n+\t\t/* GPIOZ */\n+\t\t\"ETH_MDIO\", /* GPIOZ_0 */\n+\t\t\"ETH_MDC\", /* GPIOZ_1 */\n+\t\t\"ETH_RXCLK\", /* GPIOZ_2 */\n+\t\t\"ETH_RX_DV\", /* GPIOZ_3 */\n+\t\t\"ETH_RXD0\", /* GPIOZ_4 */\n+\t\t\"ETH_RXD1\", /* GPIOZ_5 */\n+\t\t\"ETH_RXD2\", /* GPIOZ_6 */\n+\t\t\"ETH_RXD3\", /* GPIOZ_7 */\n+\t\t\"ETH_TXCLK\", /* GPIOZ_8 */\n+\t\t\"ETH_TXEN\", /* GPIOZ_9 */\n+\t\t\"ETH_TXD0\", /* GPIOZ_10 */\n+\t\t\"ETH_TXD1\", /* GPIOZ_11 */\n+\t\t\"ETH_TXD2\", /* GPIOZ_12 */\n+\t\t\"ETH_TXD3\", /* GPIOZ_13 */\n+\t\t\"ETH_INTR\", /* GPIOZ_14 */\n+\t\t\"ETH_NRST\", /* GPIOZ_15 */\n+\t\t/* GPIOH */\n+\t\t\"HDMI_SDA\", /* GPIOH_0 */\n+\t\t\"HDMI_SCL\", /* GPIOH_1 */\n+\t\t\"HDMI_HPD\", /* GPIOH_2 */\n+\t\t\"HDMI_CEC\", /* GPIOH_3 */\n+\t\t\"VL-RST_N\", /* GPIOH_4 */\n+\t\t\"CON1-P36\", /* GPIOH_5 */\n+\t\t\"VL-PWREN\", /* GPIOH_6 */\n+\t\t\"WiFi_3V3_1V8\", /* GPIOH_7 */\n+\t\t\"TFLASH_VDD_EN\", /* GPIOH_8 */\n+\t\t/* BOOT */\n+\t\t\"eMMC_D0\", /* BOOT_0 */\n+\t\t\"eMMC_D1\", /* BOOT_1 */\n+\t\t\"eMMC_D2\", /* BOOT_2 */\n+\t\t\"eMMC_D3\", /* BOOT_3 */\n+\t\t\"eMMC_D4\", /* BOOT_4 */\n+\t\t\"eMMC_D5\", /* BOOT_5 */\n+\t\t\"eMMC_D6\", /* BOOT_6 */\n+\t\t\"eMMC_D7\", /* BOOT_7 */\n+\t\t\"eMMC_CLK\", /* BOOT_8 */\n+\t\t\"\",\n+\t\t\"eMMC_CMD\", /* BOOT_10 */\n+\t\t\"\",\n+\t\t\"eMMC_RST#\", /* BOOT_12 */\n+\t\t\"eMMC_DS\", /* BOOT_13 */\n+\t\t\"\", \"\",\n+\t\t/* GPIOC */\n+\t\t\"SD_D0_B\", /* GPIOC_0 */\n+\t\t\"SD_D1_B\", /* GPIOC_1 */\n+\t\t\"SD_D2_B\", /* GPIOC_2 */\n+\t\t\"SD_D3_B\", /* GPIOC_3 */\n+\t\t\"SD_CLK_B\", /* GPIOC_4 */\n+\t\t\"SD_CMD_B\", /* GPIOC_5 */\n+\t\t\"CARD_EN_DET\", /* GPIOC_6 */\n+\t\t\"\",\n+\t\t/* GPIOA */\n+\t\t\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\",\n+\t\t\"\", \"\", \"\", \"\", \"\", \"\",\n+\t\t\"CON1-P27\", /* GPIOA_14 */\n+\t\t\"CON1-P28\", /* GPIOA_15 */\n+\t\t/* GPIOX */\n+\t\t\"CON1-P16\", /* GPIOX_0 */\n+\t\t\"CON1-P18\", /* GPIOX_1 */\n+\t\t\"CON1-P22\", /* GPIOX_2 */\n+\t\t\"CON1-P11\", /* GPIOX_3 */\n+\t\t\"CON1-P13\", /* GPIOX_4 */\n+\t\t\"CON1-P07\", /* GPIOX_5 */\n+\t\t\"CON1-P33\", /* GPIOX_6 */\n+\t\t\"CON1-P15\", /* GPIOX_7 */\n+\t\t\"CON1-P19\", /* GPIOX_8 */\n+\t\t\"CON1-P21\", /* GPIOX_9 */\n+\t\t\"CON1-P24\", /* GPIOX_10 */\n+\t\t\"CON1-P23\", /* GPIOX_11 */\n+\t\t\"CON1-P08\", /* GPIOX_12 */\n+\t\t\"CON1-P10\", /* GPIOX_13 */\n+\t\t\"CON1-P29\", /* GPIOX_14 */\n+\t\t\"CON1-P31\", /* GPIOX_15 */\n+\t\t\"CON1-P26\", /* GPIOX_16 */\n+\t\t\"CON1-P03\", /* GPIOX_17 */\n+\t\t\"CON1-P05\", /* GPIOX_18 */\n+\t\t\"CON1-P32\"; /* GPIOX_19 */\n+\n+\t/*\n+\t * WARNING: The USB Hub needs a reset signal to be turned high in\n+\t * order to be detected by the USB Controller. This signal should\n+\t * be handled by a USB specific power sequence to reset the Hub\n+\t * when the USB bus is powered down.\n+\t */\n+\tusb-hub {\n+\t\tgpio-hog;\n+\t\tgpios = <GPIOH_4 GPIO_ACTIVE_HIGH>;\n+\t\toutput-high;\n+\t\tline-name = \"usb-hub-reset\";\n+\t};\n+};\n+\n+&gpio_ao {\n+\tgpio-line-names =\n+\t\t/* GPIOAO */\n+\t\t\"DEBUG TX\", /* GPIOAO_0 */\n+\t\t\"DEBUG RX\", /* GPIOAO_1 */\n+\t\t\"SYS_LED2\", /* GPIOAO_2 */\n+\t\t\"UPDATE_KEY\", /* GPIOAO_3 */\n+\t\t\"CON1-P40\", /* GPIOAO_4 */\n+\t\t\"IR_IN\", /* GPIOAO_5 */\n+\t\t\"TF_3V3N_1V8_EN\", /* GPIOAO_6 */\n+\t\t\"CON1-P35\", /* GPIOAO_7 */\n+\t\t\"CON1-P12\", /* GPIOAO_8 */\n+\t\t\"CON1-P37\", /* GPIOAO_9 */\n+\t\t\"CON1-P38\", /* GPIOAO_10 */\n+\t\t\"SYS_LED\", /* GPIOAO_11 */\n+\t\t/* GPIOE */\n+\t\t\"VDDEE_PWM\", /* GPIOE_0 */\n+\t\t\"VDDCPU_PWM\", /* GPIOE_1 */\n+\t\t\"TF_PWR_EN\"; /* GPIOE_2 */\n+};\n+\n+&hdmi_tx {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-supply = <&dc_in>;\n+};\n+\n+&hdmi_tx_tmds_port {\n+\thdmi_tx_tmds_out: endpoint {\n+\t\tremote-endpoint = <&hdmi_connector_in>;\n+\t};\n+};\n+\n+&ir {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&remote_input_ao_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&pwm_AO_cd {\n+\tpinctrl-0 = <&pwm_ao_d_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin1\";\n+\tstatus = \"okay\";\n+};\n+\n+&saradc {\n+\tstatus = \"okay\";\n+\tvref-supply = <&vddao_1v8>;\n+};\n+\n+/* SD card */\n+&sd_emmc_b {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&sdcard_c_pins>;\n+\tpinctrl-1 = <&sdcard_clk_gate_c_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tmax-frequency = <50000000>;\n+\tdisable-wp;\n+\n+\t/* TOFIX: SD card is barely usable in SDR modes */\n+\n+\tcd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;\n+\tvmmc-supply = <&tflash_vdd>;\n+\tvqmmc-supply = <&vddio_c>;\n+};\n+\n+/* eMMC */\n+&sd_emmc_c {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;\n+\tpinctrl-1 = <&emmc_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <8>;\n+\tcap-mmc-highspeed;\n+\tmmc-ddr-1_8v;\n+\tmmc-hs200-1_8v;\n+\tmax-frequency = <200000000>;\n+\tdisable-wp;\n+\n+\tmmc-pwrseq = <&emmc_pwrseq>;\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&emmc_1v8>;\n+};\n+\n+&uart_AO {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_ao_a_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&usb {\n+\tstatus = \"okay\";\n+};\n+\n+&usb2_phy0 {\n+\tphy-supply = <&dc_in>;\n+};\n+\n+&usb2_phy1 {\n+\t/* Enable the hub which is connected to this port */\n+\tphy-supply = <&vl_pwr_en>;\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0033-FROMGIT-6.3-dt-bindings-arm-amlogic-add-support-for-.patch",
    "content": "From 654df5af5a8feddbb6407c100061a1412a5f8238 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 25 Jan 2023 09:28:27 +0000\nSubject: [PATCH 033/120] FROMGIT(6.3): dt-bindings: arm: amlogic: add support\n for BananaPi M2-Pro\n\nBPI-M2-PRO is based upon the BPI-M5 using the Amlogic SM1 (S905X3) chipset.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex 9fda2436c618..d63f6b899f25 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -175,6 +175,7 @@ properties:\n           - enum:\n               - amediatech,x96-air\n               - amediatech,x96-air-gbit\n+              - bananapi,bpi-m2-pro\n               - bananapi,bpi-m5\n               - cyx,a95xf3-air\n               - cyx,a95xf3-air-gbit\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0034-FROMGIT-6.3-arm64-dts-meson-add-support-for-BananaPi.patch",
    "content": "From 2c38c04f66a209ef843a74c47d5ad55049a45fee Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 25 Jan 2023 08:13:28 +0000\nSubject: [PATCH 034/120] FROMGIT(6.3): arm64: dts: meson: add support for\n BananaPi M2-Pro\n\nBPI-M2-PRO is based upon the BPI-M5 design except for a different\nphysical board layout and the following changes:\n\n- USB 3.0 ports reduced from 4x to 2x\n- 3.5mm Combined CVBS/Audio Jack removed\n- RTL8821BU WiFi/BT module (internal USB connected)\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |  1 +\n .../dts/amlogic/meson-sm1-bananapi-m2-pro.dts | 98 +++++++++++++++++++\n 2 files changed, 99 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m2-pro.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex e213aeebb774..5e5433718c6e 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -59,6 +59,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-s4-s805x2-aq222.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-gbit.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-sm1-bananapi-m2-pro.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-sm1-bananapi-m5.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-sm1-h96-max.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m2-pro.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m2-pro.dts\nnew file mode 100644\nindex 000000000000..4890d5d9a4f7\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m2-pro.dts\n@@ -0,0 +1,98 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2021 BayLibre SAS\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-sm1-bananapi.dtsi\"\n+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>\n+\n+/ {\n+\tcompatible = \"bananapi,bpi-m2-pro\", \"amlogic,sm1\";\n+\tmodel = \"Banana Pi BPI-M2-PRO\";\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,axg-sound-card\";\n+\t\tmodel = \"BPI-M2-PRO\";\n+\t\taudio-aux-devs = <&tdmout_b>;\n+\t\taudio-routing = \"TDMOUT_B IN 0\", \"FRDDR_A OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 1\", \"FRDDR_B OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 2\", \"FRDDR_C OUT 1\",\n+\t\t\t\t\"TDM_B Playback\", \"TDMOUT_B OUT\";\n+\n+\t\tassigned-clocks = <&clkc CLKID_MPLL2>,\n+\t\t\t\t  <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&frddr_a>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&frddr_b>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&frddr_c>;\n+\t\t};\n+\n+\t\t/* 8ch hdmi interface */\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&tdmif_b>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tdai-tdm-slot-tx-mask-0 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-1 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-2 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-3 = <1 1>;\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* hdmi glue */\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&clkc_audio {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_a {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_b {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_c {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmif_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmout_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tohdmitx {\n+\tstatus = \"okay\";\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0035-FROMGIT-6.3-dt-bindings-arm-amlogic-add-support-for-.patch",
    "content": "From b71a8761891cdca7af133b91aaef4f485e7542b3 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 16 Feb 2022 07:27:07 +0000\nSubject: [PATCH 035/120] FROMGIT(6.3): dt-bindings: arm: amlogic: add support\n for Radxa Zero2\n\nThe Radxa Zero2 is a small form-factor SBC using the Amlogic\nA311D chip.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\nAcked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex d63f6b899f25..7ded40b309a4 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -154,6 +154,7 @@ properties:\n         items:\n           - enum:\n               - khadas,vim3\n+              - radxa,zero2\n           - const: amlogic,a311d\n           - const: amlogic,g12b\n \n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0036-FROMGIT-6.3-arm64-dts-meson-add-support-for-Radxa-Ze.patch",
    "content": "From 263e11fb9680d32705f0980569dc32a412818488 Mon Sep 17 00:00:00 2001\nFrom: Yuntian Zhang <yt@radxa.com>\nDate: Fri, 14 Jan 2022 15:50:02 +0000\nSubject: [PATCH 036/120] FROMGIT(6.3): arm64: dts: meson: add support for\n Radxa Zero2\n\nRadxa Zero2 is a small form factor SBC based on the Amlogic A311D\nchipset that ships in a number of eMMC configurations:\n\n- Amlogic A311D (Quad A73 + Dual A53) CPU\n- 4GB LPDDR4 RAM\n- 32/64/128GB eMMC\n- Mali G52-MP4 GPU\n- HDMI 2.1 output (micro)\n- BCM4345 WiFi (2.4/5GHz a/b/g/n/ac) and BT 5.0\n- 1x USB 2.0 port - Type C (OTG)\n- 1x USB 3.0 port - Type C (Host)\n- 1x micro SD Card slot\n- 40 Pin GPIO header\n\nSigned-off-by: Yuntian Zhang <yt@radxa.com>\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |   1 +\n .../dts/amlogic/meson-g12b-radxa-zero2.dts    | 489 ++++++++++++++++++\n 2 files changed, 490 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex 5e5433718c6e..5d5ec22a469e 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -14,6 +14,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-radxa-zero2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts\nnew file mode 100644\nindex 000000000000..9a60c5ec2072\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts\n@@ -0,0 +1,489 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2019 BayLibre, SAS\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ * Copyright (c) 2019 Christian Hewitt <christianshewitt@gmail.com>\n+ * Copyright (c) 2022 Radxa Limited\n+ * Author: Yuntian Zhang <yt@radxa.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-g12b-a311d.dtsi\"\n+#include <dt-bindings/input/input.h>\n+#include <dt-bindings/leds/common.h>\n+#include <dt-bindings/gpio/meson-g12a-gpio.h>\n+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>\n+\n+/ {\n+\tcompatible = \"radxa,zero2\", \"amlogic,a311d\", \"amlogic,g12b\";\n+\tmodel = \"Radxa Zero2\";\n+\n+\taliases {\n+\t\tserial0 = &uart_AO;\n+\t\tserial2 = &uart_A;\n+\t};\n+\n+\tchosen {\n+\t\tstdout-path = \"serial0:115200n8\";\n+\t};\n+\n+\tmemory@0 {\n+\t\tdevice_type = \"memory\";\n+\t\treg = <0x0 0x0 0x0 0x80000000>;\n+\t};\n+\n+\tgpio-keys-polled {\n+\t\tcompatible = \"gpio-keys-polled\";\n+\t\tpoll-interval = <100>;\n+\t\tpower-button {\n+\t\t\tlabel = \"power\";\n+\t\t\tlinux,code = <KEY_POWER>;\n+\t\t\tgpios = <&gpio_ao GPIOAO_3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;\n+\t\t};\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-green {\n+\t\t\tcolor = <LED_COLOR_ID_GREEN>;\n+\t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tgpios = <&gpio GPIOA_12 GPIO_ACTIVE_HIGH>;\n+\t\t\tlinux,default-trigger = \"heartbeat\";\n+\t\t};\n+\t};\n+\n+\thdmi-connector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\temmc_pwrseq: emmc-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-emmc\";\n+\t\treset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;\n+\t};\n+\n+\tsdio_pwrseq: sdio-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-simple\";\n+\t\treset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"ext_clock\";\n+\t};\n+\n+\tao_5v: regulator-ao-5v {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"AO_5V\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvcc_1v8: regulator-vcc-1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vcc_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvcc_3v3: regulator-vcc-3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&vddao_3v3>;\n+\t\tregulator-always-on;\n+\t\t/* FIXME: actually controlled by VDDCPU_B_EN */\n+\t};\n+\n+\tvddao_1v8: regulator-vddao-1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDIO_AO1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vddao_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddao_3v3: regulator-vddao-3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDAO_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&ao_5v>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddcpu_a: regulator-vddcpu-a {\n+\t\t/*\n+\t\t * MP8756GD Regulator.\n+\t\t */\n+\t\tcompatible = \"pwm-regulator\";\n+\n+\t\tregulator-name = \"VDDCPU_A\";\n+\t\tregulator-min-microvolt = <730000>;\n+\t\tregulator-max-microvolt = <1022000>;\n+\n+\t\tpwm-supply = <&ao_5v>;\n+\n+\t\tpwms = <&pwm_ab 0 1250 0>;\n+\t\tpwm-dutycycle-range = <100 0>;\n+\n+\t\tregulator-boot-on;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddcpu_b: regulator-vddcpu-b {\n+\t\t/*\n+\t\t * Silergy SY8120B1ABC Regulator.\n+\t\t */\n+\t\tcompatible = \"pwm-regulator\";\n+\n+\t\tregulator-name = \"VDDCPU_B\";\n+\t\tregulator-min-microvolt = <730000>;\n+\t\tregulator-max-microvolt = <1022000>;\n+\n+\t\tpwm-supply = <&ao_5v>;\n+\n+\t\tpwms = <&pwm_AO_cd 1 1250 0>;\n+\t\tpwm-dutycycle-range = <100 0>;\n+\n+\t\tregulator-boot-on;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,axg-sound-card\";\n+\t\tmodel = \"RADXA-ZERO2\";\n+\t\taudio-aux-devs = <&tdmout_b>;\n+\t\taudio-routing = \"TDMOUT_B IN 0\", \"FRDDR_A OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 1\", \"FRDDR_B OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 2\", \"FRDDR_C OUT 1\",\n+\t\t\t\t\"TDM_B Playback\", \"TDMOUT_B OUT\";\n+\n+\t\tassigned-clocks = <&clkc CLKID_MPLL2>,\n+\t\t\t\t  <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&frddr_a>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&frddr_b>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&frddr_c>;\n+\t\t};\n+\n+\t\t/* 8ch hdmi interface */\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&tdmif_b>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tdai-tdm-slot-tx-mask-0 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-1 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-2 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-3 = <1 1>;\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* hdmi glue */\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\twifi32k: clock-0 {\n+\t\tcompatible = \"pwm-clock\";\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tpwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */\n+\t};\n+};\n+\n+&arb {\n+\tstatus = \"okay\";\n+};\n+\n+&cec_AO {\n+\tpinctrl-0 = <&cec_ao_a_h_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"disabled\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&cecb_AO {\n+\tpinctrl-0 = <&cec_ao_b_h_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"okay\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&clkc_audio {\n+\tstatus = \"okay\";\n+};\n+\n+&cpu0 {\n+\tcpu-supply = <&vddcpu_b>;\n+\toperating-points-v2 = <&cpu_opp_table_0>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu1 {\n+\tcpu-supply = <&vddcpu_b>;\n+\toperating-points-v2 = <&cpu_opp_table_0>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu100 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu101 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu102 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu103 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&frddr_a {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_b {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_c {\n+\tstatus = \"okay\";\n+};\n+\n+&gpio {\n+\tgpio-line-names =\n+\t\t/* GPIOZ */\n+\t\t\"PIN_27\", \"PIN_28\", \"PIN_7\", \"PIN_11\", \"PIN_13\", \"PIN_15\", \"PIN_18\", \"PIN_40\",\n+\t\t\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\",\n+\t\t/* GPIOH */\n+\t\t\"\", \"\", \"\", \"\", \"PIN_19\", \"PIN_21\", \"PIN_24\", \"PIN_23\",\n+\t\t\"\",\n+\t\t/* BOOT */\n+\t\t\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\",\n+\t\t\"\", \"\", \"\", \"\", \"EMMC_PWRSEQ\", \"\", \"\", \"\",\n+\t\t/* GPIOC */\n+\t\t\"\", \"\", \"\", \"\", \"\", \"\", \"SD_CD\", \"PIN_36\",\n+\t\t/* GPIOA */\n+\t\t\"PIN_32\", \"PIN_12\", \"PIN_35\", \"\", \"\", \"PIN_38\", \"\", \"\",\n+\t\t\"\", \"\", \"\", \"\", \"LED_GREEN\", \"PIN_31\", \"PIN_3\", \"PIN_5\",\n+\t\t/* GPIOX */\n+\t\t\"\", \"\", \"\", \"\", \"\", \"\", \"SDIO_PWRSEQ\", \"\",\n+\t\t\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\",\n+\t\t\"\", \"BT_SHUTDOWN\", \"\", \"\";\n+};\n+\n+&gpio_ao {\n+\tgpio-line-names =\n+\t\t/* GPIOAO */\n+\t\t\"PIN_8\", \"PIN_10\", \"\", \"BTN_POWER\", \"\", \"\", \"\", \"PIN_29\",\n+\t\t\"PIN_33\", \"PIN_37\", \"FAN\", \"\",\n+\t\t/* GPIOE */\n+\t\t\"\", \"\", \"\";\n+};\n+\n+&hdmi_tx {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-supply = <&ao_5v>;\n+};\n+\n+&hdmi_tx_tmds_port {\n+\thdmi_tx_tmds_out: endpoint {\n+\t\tremote-endpoint = <&hdmi_connector_in>;\n+\t};\n+};\n+\n+&ir {\n+\tstatus = \"disabled\";\n+\tpinctrl-0 = <&remote_input_ao_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&pwm_ab {\n+\tpinctrl-0 = <&pwm_a_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin0\";\n+\tstatus = \"okay\";\n+};\n+\n+&pwm_ef {\n+\tpinctrl-0 = <&pwm_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin2\";\n+\tstatus = \"okay\";\n+};\n+\n+&pwm_AO_ab {\n+\tpinctrl-0 = <&pwm_ao_a_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin3\";\n+\tstatus = \"okay\";\n+};\n+\n+&pwm_AO_cd {\n+\tpinctrl-0 = <&pwm_ao_d_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin4\";\n+\tstatus = \"okay\";\n+};\n+\n+&saradc {\n+\tstatus = \"okay\";\n+\tvref-supply = <&vddao_1v8>;\n+};\n+\n+/* SDIO */\n+&sd_emmc_a {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&sdio_pins>;\n+\tpinctrl-1 = <&sdio_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\t#address-cells = <1>;\n+\t#size-cells = <0>;\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tmax-frequency = <100000000>;\n+\n+\tnon-removable;\n+\tdisable-wp;\n+\n+\t/* WiFi firmware requires power to be kept while in suspend */\n+\tkeep-power-in-suspend;\n+\n+\tmmc-pwrseq = <&sdio_pwrseq>;\n+\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddao_1v8>;\n+\n+\tbrcmf: wifi@1 {\n+\t\treg = <1>;\n+\t\tcompatible = \"brcm,bcm4329-fmac\";\n+\t};\n+};\n+\n+/* SD card */\n+&sd_emmc_b {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&sdcard_c_pins>;\n+\tpinctrl-1 = <&sdcard_clk_gate_c_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tmax-frequency = <50000000>;\n+\tdisable-wp;\n+\n+\tcd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddao_3v3>;\n+};\n+\n+/* eMMC */\n+&sd_emmc_c {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;\n+\tpinctrl-1 = <&emmc_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <8>;\n+\tcap-mmc-highspeed;\n+\tmmc-ddr-1_8v;\n+\tmmc-hs200-1_8v;\n+\tmax-frequency = <200000000>;\n+\tdisable-wp;\n+\n+\tmmc-pwrseq = <&emmc_pwrseq>;\n+\tvmmc-supply = <&vcc_3v3>;\n+\tvqmmc-supply = <&vcc_1v8>;\n+};\n+\n+&tdmif_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmout_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tohdmitx {\n+\tstatus = \"okay\";\n+};\n+\n+&uart_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"brcm,bcm43438-bt\";\n+\t\tshutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\tmax-speed = <2000000>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"lpo\";\n+\t};\n+};\n+\n+&uart_AO {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_ao_a_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&usb {\n+\tstatus = \"okay\";\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0037-FROMGIT-6.4-dt-bindings-net-add-amlogic-gxl-mdio-mul.patch",
    "content": "From be94b9629bc355647bda972f92e0887d3a94c17f Mon Sep 17 00:00:00 2001\nFrom: Jerome Brunet <jbrunet@baylibre.com>\nDate: Mon, 30 Jan 2023 16:16:15 +0100\nSubject: [PATCH 037/120] FROMGIT(6.4): dt-bindings: net: add amlogic gxl mdio\n multiplexer\n\nAdd documentation for the MDIO bus multiplexer found on the Amlogic GXL\nSoC family\n\nReviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>\nSigned-off-by: Jerome Brunet <jbrunet@baylibre.com>\n---\n .../bindings/net/amlogic,gxl-mdio-mux.yaml    | 64 +++++++++++++++++++\n 1 file changed, 64 insertions(+)\n create mode 100644 Documentation/devicetree/bindings/net/amlogic,gxl-mdio-mux.yaml\n\ndiff --git a/Documentation/devicetree/bindings/net/amlogic,gxl-mdio-mux.yaml b/Documentation/devicetree/bindings/net/amlogic,gxl-mdio-mux.yaml\nnew file mode 100644\nindex 000000000000..27ae004dbea0\n--- /dev/null\n+++ b/Documentation/devicetree/bindings/net/amlogic,gxl-mdio-mux.yaml\n@@ -0,0 +1,64 @@\n+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause\n+%YAML 1.2\n+---\n+$id: http://devicetree.org/schemas/net/amlogic,gxl-mdio-mux.yaml#\n+$schema: http://devicetree.org/meta-schemas/core.yaml#\n+\n+title: Amlogic GXL MDIO bus multiplexer\n+\n+maintainers:\n+  - Jerome Brunet <jbrunet@baylibre.com>\n+\n+description:\n+  This is a special case of a MDIO bus multiplexer. It allows to choose between\n+  the internal mdio bus leading to the embedded 10/100 PHY or the external\n+  MDIO bus on the Amlogic GXL SoC family.\n+\n+allOf:\n+  - $ref: mdio-mux.yaml#\n+\n+properties:\n+  compatible:\n+    const: amlogic,gxl-mdio-mux\n+\n+  reg:\n+    maxItems: 1\n+\n+  clocks:\n+    maxItems: 1\n+\n+  clock-names:\n+    items:\n+      - const: ref\n+\n+required:\n+  - compatible\n+  - reg\n+  - clocks\n+  - clock-names\n+\n+unevaluatedProperties: false\n+\n+examples:\n+  - |\n+    eth_phy_mux: mdio@558 {\n+      compatible = \"amlogic,gxl-mdio-mux\";\n+      reg = <0x558 0xc>;\n+      #address-cells = <1>;\n+      #size-cells = <0>;\n+      clocks = <&refclk>;\n+      clock-names = \"ref\";\n+      mdio-parent-bus = <&mdio0>;\n+\n+      external_mdio: mdio@0 {\n+        reg = <0x0>;\n+        #address-cells = <1>;\n+        #size-cells = <0>;\n+      };\n+\n+      internal_mdio: mdio@1 {\n+        reg = <0x1>;\n+        #address-cells = <1>;\n+        #size-cells = <0>;\n+      };\n+    };\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0038-FROMGIT-6.4-net-mdio-add-amlogic-gxl-mdio-mux-suppor.patch",
    "content": "From 7246aabe2dcaced67c24646712e930e931177c71 Mon Sep 17 00:00:00 2001\nFrom: Jerome Brunet <jbrunet@baylibre.com>\nDate: Mon, 30 Jan 2023 16:16:16 +0100\nSubject: [PATCH 038/120] FROMGIT(6.4): net: mdio: add amlogic gxl mdio mux\n support\n\nAdd support for the mdio mux and internal phy glue of the GXL SoC\nfamily\n\nReported-by: Da Xue <da@lessconfused.com>\nSigned-off-by: Jerome Brunet <jbrunet@baylibre.com>\nReviewed-by: Andrew Lunn <andrew@lunn.ch>\n---\n drivers/net/mdio/Kconfig              |  11 ++\n drivers/net/mdio/Makefile             |   1 +\n drivers/net/mdio/mdio-mux-meson-gxl.c | 164 ++++++++++++++++++++++++++\n 3 files changed, 176 insertions(+)\n create mode 100644 drivers/net/mdio/mdio-mux-meson-gxl.c\n\ndiff --git a/drivers/net/mdio/Kconfig b/drivers/net/mdio/Kconfig\nindex bfa16826a6e1..90309980686e 100644\n--- a/drivers/net/mdio/Kconfig\n+++ b/drivers/net/mdio/Kconfig\n@@ -215,6 +215,17 @@ config MDIO_BUS_MUX_MESON_G12A\n \t  the amlogic g12a SoC. The multiplexers connects either the external\n \t  or the internal MDIO bus to the parent bus.\n \n+config MDIO_BUS_MUX_MESON_GXL\n+\ttristate \"Amlogic GXL based MDIO bus multiplexer\"\n+\tdepends on ARCH_MESON || COMPILE_TEST\n+\tdepends on OF_MDIO && HAS_IOMEM && COMMON_CLK\n+\tselect MDIO_BUS_MUX\n+\tdefault m if ARCH_MESON\n+\thelp\n+\t  This module provides a driver for the MDIO multiplexer/glue of\n+\t  the amlogic GXL SoC. The multiplexer connects either the external\n+\t  or the internal MDIO bus to the parent bus.\n+\n config MDIO_BUS_MUX_BCM6368\n \ttristate \"Broadcom BCM6368 MDIO bus multiplexers\"\n \tdepends on OF && OF_MDIO && (BMIPS_GENERIC || COMPILE_TEST)\ndiff --git a/drivers/net/mdio/Makefile b/drivers/net/mdio/Makefile\nindex 15f8dc4042ce..7d4cb4c11e4e 100644\n--- a/drivers/net/mdio/Makefile\n+++ b/drivers/net/mdio/Makefile\n@@ -28,5 +28,6 @@ obj-$(CONFIG_MDIO_BUS_MUX_BCM6368)\t+= mdio-mux-bcm6368.o\n obj-$(CONFIG_MDIO_BUS_MUX_BCM_IPROC)\t+= mdio-mux-bcm-iproc.o\n obj-$(CONFIG_MDIO_BUS_MUX_GPIO)\t\t+= mdio-mux-gpio.o\n obj-$(CONFIG_MDIO_BUS_MUX_MESON_G12A)\t+= mdio-mux-meson-g12a.o\n+obj-$(CONFIG_MDIO_BUS_MUX_MESON_GXL)\t+= mdio-mux-meson-gxl.o\n obj-$(CONFIG_MDIO_BUS_MUX_MMIOREG) \t+= mdio-mux-mmioreg.o\n obj-$(CONFIG_MDIO_BUS_MUX_MULTIPLEXER) \t+= mdio-mux-multiplexer.o\ndiff --git a/drivers/net/mdio/mdio-mux-meson-gxl.c b/drivers/net/mdio/mdio-mux-meson-gxl.c\nnew file mode 100644\nindex 000000000000..76188575ca1f\n--- /dev/null\n+++ b/drivers/net/mdio/mdio-mux-meson-gxl.c\n@@ -0,0 +1,164 @@\n+// SPDX-License-Identifier: GPL-2.0\n+/* Copyright (c) 2022 Baylibre, SAS.\n+ * Author: Jerome Brunet <jbrunet@baylibre.com>\n+ */\n+\n+#include <linux/bitfield.h>\n+#include <linux/delay.h>\n+#include <linux/clk.h>\n+#include <linux/io.h>\n+#include <linux/mdio-mux.h>\n+#include <linux/module.h>\n+#include <linux/platform_device.h>\n+\n+#define ETH_REG2\t\t0x0\n+#define  REG2_PHYID\t\tGENMASK(21, 0)\n+#define   EPHY_GXL_ID\t\t0x110181\n+#define  REG2_LEDACT\t\tGENMASK(23, 22)\n+#define  REG2_LEDLINK\t\tGENMASK(25, 24)\n+#define  REG2_DIV4SEL\t\tBIT(27)\n+#define  REG2_ADCBYPASS\t\tBIT(30)\n+#define  REG2_CLKINSEL\t\tBIT(31)\n+#define ETH_REG3\t\t0x4\n+#define  REG3_ENH\t\tBIT(3)\n+#define  REG3_CFGMODE\t\tGENMASK(6, 4)\n+#define  REG3_AUTOMDIX\t\tBIT(7)\n+#define  REG3_PHYADDR\t\tGENMASK(12, 8)\n+#define  REG3_PWRUPRST\t\tBIT(21)\n+#define  REG3_PWRDOWN\t\tBIT(22)\n+#define  REG3_LEDPOL\t\tBIT(23)\n+#define  REG3_PHYMDI\t\tBIT(26)\n+#define  REG3_CLKINEN\t\tBIT(29)\n+#define  REG3_PHYIP\t\tBIT(30)\n+#define  REG3_PHYEN\t\tBIT(31)\n+#define ETH_REG4\t\t0x8\n+#define  REG4_PWRUPRSTSIG\tBIT(0)\n+\n+#define MESON_GXL_MDIO_EXTERNAL_ID 0\n+#define MESON_GXL_MDIO_INTERNAL_ID 1\n+\n+struct gxl_mdio_mux {\n+\tvoid __iomem *regs;\n+\tvoid *mux_handle;\n+};\n+\n+static void gxl_enable_internal_mdio(struct gxl_mdio_mux *priv)\n+{\n+\tu32 val;\n+\n+\t/* Setup the internal phy */\n+\tval = (REG3_ENH |\n+\t       FIELD_PREP(REG3_CFGMODE, 0x7) |\n+\t       REG3_AUTOMDIX |\n+\t       FIELD_PREP(REG3_PHYADDR, 8) |\n+\t       REG3_LEDPOL |\n+\t       REG3_PHYMDI |\n+\t       REG3_CLKINEN |\n+\t       REG3_PHYIP);\n+\n+\twritel(REG4_PWRUPRSTSIG, priv->regs + ETH_REG4);\n+\twritel(val, priv->regs + ETH_REG3);\n+\tmdelay(10);\n+\n+\t/* NOTE: The HW kept the phy id configurable at runtime.\n+\t * The id below is arbitrary. It is the one used in the vendor code.\n+\t * The only constraint is that it must match the one in\n+\t * drivers/net/phy/meson-gxl.c to properly match the PHY.\n+\t */\n+\twritel(FIELD_PREP(REG2_PHYID, EPHY_GXL_ID),\n+\t       priv->regs + ETH_REG2);\n+\n+\t/* Enable the internal phy */\n+\tval |= REG3_PHYEN;\n+\twritel(val, priv->regs + ETH_REG3);\n+\twritel(0, priv->regs + ETH_REG4);\n+\n+\t/* The phy needs a bit of time to power up */\n+\tmdelay(10);\n+}\n+\n+static void gxl_enable_external_mdio(struct gxl_mdio_mux *priv)\n+{\n+\t/* Reset the mdio bus mux to the external phy */\n+\twritel(0, priv->regs + ETH_REG3);\n+}\n+\n+static int gxl_mdio_switch_fn(int current_child, int desired_child,\n+\t\t\t      void *data)\n+{\n+\tstruct gxl_mdio_mux *priv = dev_get_drvdata(data);\n+\n+\tif (current_child == desired_child)\n+\t\treturn 0;\n+\n+\tswitch (desired_child) {\n+\tcase MESON_GXL_MDIO_EXTERNAL_ID:\n+\t\tgxl_enable_external_mdio(priv);\n+\t\tbreak;\n+\tcase MESON_GXL_MDIO_INTERNAL_ID:\n+\t\tgxl_enable_internal_mdio(priv);\n+\t\tbreak;\n+\tdefault:\n+\t\treturn -EINVAL;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static const struct of_device_id gxl_mdio_mux_match[] = {\n+\t{ .compatible = \"amlogic,gxl-mdio-mux\", },\n+\t{},\n+};\n+MODULE_DEVICE_TABLE(of, gxl_mdio_mux_match);\n+\n+static int gxl_mdio_mux_probe(struct platform_device *pdev)\n+{\n+\tstruct device *dev = &pdev->dev;\n+\tstruct gxl_mdio_mux *priv;\n+\tstruct clk *rclk;\n+\tint ret;\n+\n+\tpriv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);\n+\tif (!priv)\n+\t\treturn -ENOMEM;\n+\tplatform_set_drvdata(pdev, priv);\n+\n+\tpriv->regs = devm_platform_ioremap_resource(pdev, 0);\n+\tif (IS_ERR(priv->regs))\n+\t\treturn PTR_ERR(priv->regs);\n+\n+\trclk = devm_clk_get_enabled(dev, \"ref\");\n+\tif (IS_ERR(rclk))\n+\t\treturn dev_err_probe(dev, PTR_ERR(rclk),\n+\t\t\t\t     \"failed to get reference clock\\n\");\n+\n+\tret = mdio_mux_init(dev, dev->of_node, gxl_mdio_switch_fn,\n+\t\t\t    &priv->mux_handle, dev, NULL);\n+\tif (ret)\n+\t\tdev_err_probe(dev, ret, \"mdio multiplexer init failed\\n\");\n+\n+\treturn ret;\n+}\n+\n+static int gxl_mdio_mux_remove(struct platform_device *pdev)\n+{\n+\tstruct gxl_mdio_mux *priv = platform_get_drvdata(pdev);\n+\n+\tmdio_mux_uninit(priv->mux_handle);\n+\n+\treturn 0;\n+}\n+\n+static struct platform_driver gxl_mdio_mux_driver = {\n+\t.probe\t\t= gxl_mdio_mux_probe,\n+\t.remove\t\t= gxl_mdio_mux_remove,\n+\t.driver\t\t= {\n+\t\t.name\t= \"gxl-mdio-mux\",\n+\t\t.of_match_table = gxl_mdio_mux_match,\n+\t},\n+};\n+module_platform_driver(gxl_mdio_mux_driver);\n+\n+MODULE_DESCRIPTION(\"Amlogic GXL MDIO multiplexer driver\");\n+MODULE_AUTHOR(\"Jerome Brunet <jbrunet@baylibre.com>\");\n+MODULE_LICENSE(\"GPL\");\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0039-FROMGIT-6.4-mmc-meson-gx-remove-meson_mmc_get_cd.patch",
    "content": "From 3f94f73ae5c31ac0c009e2867a25077cd63df251 Mon Sep 17 00:00:00 2001\nFrom: Heiner Kallweit <hkallweit1@gmail.com>\nDate: Sun, 12 Feb 2023 22:43:32 +0100\nSubject: [PATCH 039/120] FROMGIT(6.4): mmc: meson-gx: remove meson_mmc_get_cd\n\nMMC core only checks whether return value of .get_cd() equals zero.\nTherefore -ENOSYS and 1 are effectively the same and the function\ncan be removed.\n\nSigned-off-by: Heiner Kallweit <hkallweit1@gmail.com>\n---\n drivers/mmc/host/meson-gx-mmc.c | 16 +---------------\n 1 file changed, 1 insertion(+), 15 deletions(-)\n\ndiff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c\nindex 5c94ad4661ce..a1051a853f91 100644\n--- a/drivers/mmc/host/meson-gx-mmc.c\n+++ b/drivers/mmc/host/meson-gx-mmc.c\n@@ -1083,20 +1083,6 @@ static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id)\n \treturn IRQ_HANDLED;\n }\n \n-/*\n- * NOTE: we only need this until the GPIO/pinctrl driver can handle\n- * interrupts.  For now, the MMC core will use this for polling.\n- */\n-static int meson_mmc_get_cd(struct mmc_host *mmc)\n-{\n-\tint status = mmc_gpio_get_cd(mmc);\n-\n-\tif (status == -ENOSYS)\n-\t\treturn 1; /* assume present */\n-\n-\treturn status;\n-}\n-\n static void meson_mmc_cfg_init(struct meson_host *host)\n {\n \tu32 cfg = 0;\n@@ -1165,7 +1151,7 @@ static void meson_mmc_ack_sdio_irq(struct mmc_host *mmc)\n static const struct mmc_host_ops meson_mmc_ops = {\n \t.request\t= meson_mmc_request,\n \t.set_ios\t= meson_mmc_set_ios,\n-\t.get_cd         = meson_mmc_get_cd,\n+\t.get_cd         = mmc_gpio_get_cd,\n \t.pre_req\t= meson_mmc_pre_req,\n \t.post_req\t= meson_mmc_post_req,\n \t.execute_tuning = meson_mmc_resampling_tuning,\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0040-FROMGIT-6.4-media-meson-vdec-remove-redundant-if-sta.patch",
    "content": "From 5142ba301edc43cc70ca708aafa84cf1b2b32feb Mon Sep 17 00:00:00 2001\nFrom: Benjamin Roszak <benjamin545@gmail.com>\nDate: Thu, 15 Jul 2021 14:32:33 -0400\nSubject: [PATCH 040/120] FROMGIT(6.4): media: meson: vdec: remove redundant if\n statement\n\nChecking if sess->fmt_out->pixfmt is V4L2_PIX_FMT_VP9 was already done as a\ncondition to enter the if statement where this additional check is made.\n\nSigned-off-by: Benjamin Roszak <benjamin545@gmail.com>\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n drivers/staging/media/meson/vdec/esparser.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/drivers/staging/media/meson/vdec/esparser.c b/drivers/staging/media/meson/vdec/esparser.c\nindex 86ccc8937afc..7b15fc54efe4 100644\n--- a/drivers/staging/media/meson/vdec/esparser.c\n+++ b/drivers/staging/media/meson/vdec/esparser.c\n@@ -314,8 +314,7 @@ esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf)\n \t\t\tnum_dst_bufs = codec_ops->num_pending_bufs(sess);\n \n \t\tnum_dst_bufs += v4l2_m2m_num_dst_bufs_ready(sess->m2m_ctx);\n-\t\tif (sess->fmt_out->pixfmt == V4L2_PIX_FMT_VP9)\n-\t\t\tnum_dst_bufs -= 3;\n+\t\tnum_dst_bufs -= 3;\n \n \t\tif (esparser_vififo_get_free_space(sess) < payload_size ||\n \t\t    atomic_read(&sess->esparser_queued_bufs) >= num_dst_bufs)\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0041-FROMGIT-6.4-dt-bindings-media-rc-add-rc-dreambox-bin.patch",
    "content": "From 1b5d94d6c98f76a33fcc98f09a9e2c414cb6c4ee Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 1 Feb 2023 08:53:39 +0000\nSubject: [PATCH 041/120] FROMGIT(6.4): dt-bindings: media: rc: add rc-dreambox\n binding\n\nAdd a binding for the rc-dreambox remote keymap\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/media/rc.yaml | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/devicetree/bindings/media/rc.yaml b/Documentation/devicetree/bindings/media/rc.yaml\nindex e732b7f3a635..e7d2ae5a7eb9 100644\n--- a/Documentation/devicetree/bindings/media/rc.yaml\n+++ b/Documentation/devicetree/bindings/media/rc.yaml\n@@ -55,6 +55,7 @@ properties:\n       - rc-dm1105-nec\n       - rc-dntv-live-dvb-t\n       - rc-dntv-live-dvbt-pro\n+      - rc-dreambox\n       - rc-dtt200u\n       - rc-dvbsky\n       - rc-dvico-mce\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0042-FROMGIT-6.4-media-rc-add-common-keymap-for-Dreambox-.patch",
    "content": "From c86408e487a66dc5664c3002da54478eb103228c Mon Sep 17 00:00:00 2001\nFrom: Emanuel Strobel <emanuel.strobel@yahoo.com>\nDate: Mon, 5 Apr 2021 17:57:57 +0000\nSubject: [PATCH 042/120] FROMGIT(6.4): media: rc: add common keymap for\n Dreambox RC10/RC0 and RC20/RC-BT remotes\n\nAdd a common keymap for the RC10/RC0 and RC20/RC-BT remotes used with\nthe Dreambox One and Dreambox Two DVB-S/T boxes. The maps are combined\nsince the IR codes do not conflict and both boxes have shipped with\nboth remote designs over time.\n\nBoth remote types can be programmed to control TVs, so include non-IR\nkeys that are used to switch-to or toggle the remote mode:\n\n- DREAM in RC10/RC0 switches to (Dreambox) STB control mode\n- TV in RC10/RC0 switches to TV control mode\n- MODE in RC20/RC-BT toggles between STB/TV/BT control modes\n\nIn the RC20 keymap the Android MIC (voice search) key maps to KEY_HELP\nand EXIT is mapped to KEY_ESC to replicate the go-backwards navigation\nbehaviour in the Android vendor OS that ships on Dreambox devices.\n\nSigned-off-by: Emanuel Strobel <emanuel.strobel@yahoo.com>\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n drivers/media/rc/keymaps/Makefile      |   1 +\n drivers/media/rc/keymaps/rc-dreambox.c | 151 +++++++++++++++++++++++++\n include/media/rc-map.h                 |   1 +\n 3 files changed, 153 insertions(+)\n create mode 100644 drivers/media/rc/keymaps/rc-dreambox.c\n\ndiff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile\nindex f513ff5caf4e..6931c89fca99 100644\n--- a/drivers/media/rc/keymaps/Makefile\n+++ b/drivers/media/rc/keymaps/Makefile\n@@ -37,6 +37,7 @@ obj-$(CONFIG_RC_MAP) += \\\n \t\t\trc-dm1105-nec.o \\\n \t\t\trc-dntv-live-dvb-t.o \\\n \t\t\trc-dntv-live-dvbt-pro.o \\\n+\t\t\trc-dreambox.o \\\n \t\t\trc-dtt200u.o \\\n \t\t\trc-dvbsky.o \\\n \t\t\trc-dvico-mce.o \\\ndiff --git a/drivers/media/rc/keymaps/rc-dreambox.c b/drivers/media/rc/keymaps/rc-dreambox.c\nnew file mode 100644\nindex 000000000000..dea024fa3a22\n--- /dev/null\n+++ b/drivers/media/rc/keymaps/rc-dreambox.c\n@@ -0,0 +1,151 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+/*\n+ * Copyright (c) 2021 Emanuel Strobel <emanuel.strobel@yahoo.com>\n+ */\n+\n+#include <media/rc-map.h>\n+#include <linux/module.h>\n+\n+/*\n+ * Keytable for Dreambox RC10/RC0 and RC20/RC-BT remote controls\n+ *\n+ * Keys that are not IR addressable:\n+ *\n+ * // DREAM switches to STB control mode\n+ * // TV switches to TV control mode\n+ * // MODE toggles STB/TV/BT control modes\n+ *\n+ */\n+\n+static struct rc_map_table dreambox[] = {\n+\t/* Dreambox RC10/RC0/RCU-BT remote */\n+\t{ 0x3200, KEY_POWER },\n+\n+\t// DREAM\n+\t{ 0x3290, KEY_HELP },\n+\t// TV\n+\n+\t{ 0x3201, KEY_1 },\n+\t{ 0x3202, KEY_2 },\n+\t{ 0x3203, KEY_3 },\n+\t{ 0x3204, KEY_4 },\n+\t{ 0x3205, KEY_5 },\n+\t{ 0x3206, KEY_6 },\n+\t{ 0x3207, KEY_7 },\n+\t{ 0x3208, KEY_8 },\n+\t{ 0x3209, KEY_9 },\n+\t{ 0x320a, KEY_PREVIOUS },\n+\t{ 0x320b, KEY_0 },\n+\t{ 0x320c, KEY_NEXT },\n+\n+\t{ 0x321f, KEY_RED },\n+\t{ 0x3220, KEY_GREEN },\n+\t{ 0x3221, KEY_YELLOW },\n+\t{ 0x3222, KEY_BLUE },\n+\n+\t{ 0x3210, KEY_INFO },\n+\t{ 0x3212, KEY_MENU },\n+\t{ 0x320e, KEY_AUDIO },\n+\t{ 0x3218, KEY_PVR },\n+\n+\t{ 0x3213, KEY_LEFT },\n+\t{ 0x3211, KEY_UP },\n+\t{ 0x3215, KEY_RIGHT },\n+\t{ 0x3217, KEY_DOWN },\n+\t{ 0x3214, KEY_OK },\n+\n+\t{ 0x3219, KEY_VOLUMEUP },\n+\t{ 0x321c, KEY_VOLUMEDOWN },\n+\n+\t{ 0x321d, KEY_ESC }, // EXIT\n+\t{ 0x321a, KEY_MUTE },\n+\n+\t{ 0x321b, KEY_PAGEUP },\n+\t{ 0x321e, KEY_PAGEDOWN },\n+\n+\t{ 0x3223, KEY_PREVIOUSSONG },\n+\t{ 0x3224, KEY_PLAYPAUSE },\n+\t{ 0x3225, KEY_STOP },\n+\t{ 0x3226, KEY_NEXTSONG },\n+\n+\t{ 0x3227, KEY_TV },\n+\t{ 0x3228, KEY_RADIO },\n+\t{ 0x3229, KEY_TEXT },\n+\t{ 0x322a, KEY_RECORD },\n+\n+\t/* Dreambox RC20/RC-BT */\n+\t{ 0x3407, KEY_MUTE },\n+\t// MODE\n+\t{ 0x3401, KEY_POWER },\n+\n+\t{ 0x3432, KEY_PREVIOUSSONG },\n+\t{ 0x3433, KEY_PLAYPAUSE },\n+\t{ 0x3435, KEY_NEXTSONG },\n+\n+\t{ 0x3436, KEY_RECORD },\n+\t{ 0x3434, KEY_STOP },\n+\t{ 0x3425, KEY_TEXT },\n+\n+\t{ 0x341f, KEY_RED },\n+\t{ 0x3420, KEY_GREEN },\n+\t{ 0x3421, KEY_YELLOW },\n+\t{ 0x3422, KEY_BLUE },\n+\n+\t{ 0x341b, KEY_INFO },\n+\t{ 0x341c, KEY_MENU },\n+\t{ 0x3430, KEY_AUDIO },\n+\t{ 0x3431, KEY_PVR },\n+\n+\t{ 0x3414, KEY_LEFT },\n+\t{ 0x3411, KEY_UP },\n+\t{ 0x3416, KEY_RIGHT },\n+\t{ 0x3419, KEY_DOWN },\n+\t{ 0x3415, KEY_OK },\n+\n+\t{ 0x3413, KEY_VOLUMEUP },\n+\t{ 0x3418, KEY_VOLUMEDOWN },\n+\n+\t{ 0x3412, KEY_ESC }, // EXIT\n+\t{ 0x3426, KEY_HELP }, // MIC\n+\n+\t{ 0x3417, KEY_PAGEUP },\n+\t{ 0x341a, KEY_PAGEDOWN },\n+\n+\t{ 0x3404, KEY_1 },\n+\t{ 0x3405, KEY_2 },\n+\t{ 0x3406, KEY_3 },\n+\t{ 0x3408, KEY_4 },\n+\t{ 0x3409, KEY_5 },\n+\t{ 0x340a, KEY_6 },\n+\t{ 0x340c, KEY_7 },\n+\t{ 0x340d, KEY_8 },\n+\t{ 0x340e, KEY_9 },\n+\t{ 0x340b, KEY_PREVIOUS },\n+\t{ 0x3410, KEY_0 },\n+\t{ 0x340f, KEY_NEXT },\n+};\n+\n+static struct rc_map_list dreambox_map = {\n+\t.map = {\n+\t\t.scan     = dreambox,\n+\t\t.size     = ARRAY_SIZE(dreambox),\n+\t\t.rc_proto = RC_PROTO_NEC,\n+\t\t.name     = RC_MAP_DREAMBOX,\n+\t}\n+};\n+\n+static int __init init_rc_map_dreambox(void)\n+{\n+\treturn rc_map_register(&dreambox_map);\n+}\n+\n+static void __exit exit_rc_map_dreambox(void)\n+{\n+\trc_map_unregister(&dreambox_map);\n+}\n+\n+module_init(init_rc_map_dreambox)\n+module_exit(exit_rc_map_dreambox)\n+\n+MODULE_LICENSE(\"GPL\");\n+MODULE_AUTHOR(\"Emanuel Strobel <emanuel.strobel@yahoo.com>\");\ndiff --git a/include/media/rc-map.h b/include/media/rc-map.h\nindex 793b54342dff..94ee968d4722 100644\n--- a/include/media/rc-map.h\n+++ b/include/media/rc-map.h\n@@ -241,6 +241,7 @@ struct rc_map *rc_map_get(const char *name);\n #define RC_MAP_DM1105_NEC                \"rc-dm1105-nec\"\n #define RC_MAP_DNTV_LIVE_DVB_T           \"rc-dntv-live-dvb-t\"\n #define RC_MAP_DNTV_LIVE_DVBT_PRO        \"rc-dntv-live-dvbt-pro\"\n+#define RC_MAP_DREAMBOX                  \"rc-dreambox\"\n #define RC_MAP_DTT200U                   \"rc-dtt200u\"\n #define RC_MAP_DVBSKY                    \"rc-dvbsky\"\n #define RC_MAP_DVICO_MCE\t\t \"rc-dvico-mce\"\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0043-FROMGIT-6.4-dt-bindings-media-rc-add-rc-beelink-mxii.patch",
    "content": "From b2ab233ef1556f2e210c6fe88ea7fca11b52092c Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 4 Feb 2023 06:42:20 +0000\nSubject: [PATCH 043/120] FROMGIT(6.4): dt-bindings: media: rc: add\n rc-beelink-mxiii\n\nAdd a binding for the rc-beelink-mxiii remote keymap\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/media/rc.yaml | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/devicetree/bindings/media/rc.yaml b/Documentation/devicetree/bindings/media/rc.yaml\nindex e7d2ae5a7eb9..deeda4bb8dae 100644\n--- a/Documentation/devicetree/bindings/media/rc.yaml\n+++ b/Documentation/devicetree/bindings/media/rc.yaml\n@@ -39,6 +39,7 @@ properties:\n       - rc-avertv-303\n       - rc-azurewave-ad-tu700\n       - rc-beelink-gs1\n+      - rc-beelink-mxiii\n       - rc-behold\n       - rc-behold-columbus\n       - rc-budget-ci-old\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0044-FROMGIT-6.4-media-rc-add-Beelink-Mini-MXIII-keymap.patch",
    "content": "From 428bfd6a70cdf2dba7e39568e2cb5a3c283c0bb6 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 8 Dec 2021 15:33:47 +0000\nSubject: [PATCH 044/120] FROMGIT(6.4): media: rc: add Beelink Mini MXIII\n keymap\n\nAdd a keymap for the simple IR (NEC) remote used with the Beelink\nMini MXIII Android STB device.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n drivers/media/rc/keymaps/Makefile           |  1 +\n drivers/media/rc/keymaps/rc-beelink-mxiii.c | 57 +++++++++++++++++++++\n include/media/rc-map.h                      |  1 +\n 3 files changed, 59 insertions(+)\n create mode 100644 drivers/media/rc/keymaps/rc-beelink-mxiii.c\n\ndiff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile\nindex 6931c89fca99..f19558fdab0c 100644\n--- a/drivers/media/rc/keymaps/Makefile\n+++ b/drivers/media/rc/keymaps/Makefile\n@@ -22,6 +22,7 @@ obj-$(CONFIG_RC_MAP) += \\\n \t\t\trc-avertv-303.o \\\n \t\t\trc-azurewave-ad-tu700.o \\\n \t\t\trc-beelink-gs1.o \\\n+\t\t\trc-beelink-mxiii.o \\\n \t\t\trc-behold-columbus.o \\\n \t\t\trc-behold.o \\\n \t\t\trc-budget-ci-old.o \\\ndiff --git a/drivers/media/rc/keymaps/rc-beelink-mxiii.c b/drivers/media/rc/keymaps/rc-beelink-mxiii.c\nnew file mode 100644\nindex 000000000000..01180cd92205\n--- /dev/null\n+++ b/drivers/media/rc/keymaps/rc-beelink-mxiii.c\n@@ -0,0 +1,57 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+/*\n+ * Copyright (C) 2019 Christian Hewitt <christianshewitt@gmail.com>\n+ *\n+ */\n+\n+#include <media/rc-map.h>\n+#include <linux/module.h>\n+\n+/*\n+ * Keytable for the Beelink Mini MXIII remote control\n+ *\n+ */\n+\n+static struct rc_map_table beelink_mxiii[] = {\n+\t{ 0xb2dc, KEY_POWER },\n+\n+\t{ 0xb288, KEY_MUTE },\n+\t{ 0xb282, KEY_HOME },\n+\n+\t{ 0xb2ca, KEY_UP },\n+\t{ 0xb299, KEY_LEFT },\n+\t{ 0xb2ce, KEY_OK },\n+\t{ 0xb2c1, KEY_RIGHT },\n+\t{ 0xb2d2, KEY_DOWN },\n+\n+\t{ 0xb2c5, KEY_MENU },\n+\t{ 0xb29a, KEY_BACK },\n+\n+\t{ 0xb281, KEY_VOLUMEDOWN },\n+\t{ 0xb280, KEY_VOLUMEUP },\n+};\n+\n+static struct rc_map_list beelink_mxiii_map = {\n+\t.map = {\n+\t\t.scan     = beelink_mxiii,\n+\t\t.size     = ARRAY_SIZE(beelink_mxiii),\n+\t\t.rc_proto = RC_PROTO_NEC,\n+\t\t.name     = RC_MAP_BEELINK_MXIII,\n+\t}\n+};\n+\n+static int __init init_rc_map_beelink_mxiii(void)\n+{\n+\treturn rc_map_register(&beelink_mxiii_map);\n+}\n+\n+static void __exit exit_rc_map_beelink_mxiii(void)\n+{\n+\trc_map_unregister(&beelink_mxiii_map);\n+}\n+\n+module_init(init_rc_map_beelink_mxiii)\n+module_exit(exit_rc_map_beelink_mxiii)\n+\n+MODULE_LICENSE(\"GPL\");\n+MODULE_AUTHOR(\"Christian Hewitt <christianshewitt@gmail.com\");\ndiff --git a/include/media/rc-map.h b/include/media/rc-map.h\nindex 94ee968d4722..4676545ffd8f 100644\n--- a/include/media/rc-map.h\n+++ b/include/media/rc-map.h\n@@ -225,6 +225,7 @@ struct rc_map *rc_map_get(const char *name);\n #define RC_MAP_AVERTV_303                \"rc-avertv-303\"\n #define RC_MAP_AZUREWAVE_AD_TU700        \"rc-azurewave-ad-tu700\"\n #define RC_MAP_BEELINK_GS1               \"rc-beelink-gs1\"\n+#define RC_MAP_BEELINK_MXIII             \"rc-beelink-mxiii\"\n #define RC_MAP_BEHOLD                    \"rc-behold\"\n #define RC_MAP_BEHOLD_COLUMBUS           \"rc-behold-columbus\"\n #define RC_MAP_BUDGET_CI_OLD             \"rc-budget-ci-old\"\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0045-FROMGIT-6.4-arm64-dts-meson-gxbb-kii-pro-sort-and-ti.patch",
    "content": "From 5c659c53668a1a8dbe101959142bb9e468a7cd87 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Fri, 10 Feb 2023 02:16:12 +0000\nSubject: [PATCH 045/120] FROMGIT(6.4): arm64: dts: meson: gxbb-kii-pro: sort\n and tidy the dts\n\nAlpha-sort the nodes, move the default line in the LED node to where it's\nnormally found, and remove excess spacing. No functional changes.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\nTested-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>\nReviewed-by: Neil Armstrong <neil.armstrong@linaro.org>\n---\n .../boot/dts/amlogic/meson-gxbb-kii-pro.dts   | 31 ++++++++-----------\n 1 file changed, 13 insertions(+), 18 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts\nindex 5f2d4317ecfb..73ad0f5110f3 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts\n@@ -6,10 +6,10 @@\n /dts-v1/;\n \n #include \"meson-gxbb-p20x.dtsi\"\n-\n #include <dt-bindings/gpio/gpio.h>\n #include <dt-bindings/input/input.h>\n #include <dt-bindings/leds/common.h>\n+\n / {\n \tcompatible = \"videostrong,kii-pro\", \"amlogic,meson-gxbb\";\n \tmodel = \"Videostrong KII Pro\";\n@@ -18,9 +18,9 @@ leds {\n \t\tcompatible = \"gpio-leds\";\n \t\tled {\n \t\t\tgpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;\n-\t\t\tdefault-state = \"off\";\n \t\t\tcolor = <LED_COLOR_ID_RED>;\n \t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tdefault-state = \"off\";\n \t\t};\n \t};\n \n@@ -34,24 +34,8 @@ button-reset {\n \t\t\tgpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;\n \t\t};\n \t};\n-\n };\n \n-\n-\n-&uart_A {\n-\tstatus = \"okay\";\n-\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n-\tpinctrl-names = \"default\";\n-\tuart-has-rtscts;\n-\n-\tbluetooth {\n-\t\tcompatible = \"brcm,bcm4335a0\";\n-\t};\n-};\n-\n-\n-\n &ethmac {\n \tstatus = \"okay\";\n \tpinctrl-0 = <&eth_rmii_pins>;\n@@ -78,3 +62,14 @@ eth_phy0: ethernet-phy@0 {\n &ir {\n \tlinux,rc-map-name = \"rc-videostrong-kii-pro\";\n };\n+\n+&uart_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"brcm,bcm4335a0\";\n+\t};\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0046-FROMGIT-6.4-arm64-dts-meson-gxbb-kii-pro-complete-th.patch",
    "content": "From eb1e3d228629c1946aef18c7337c5bc0e2694610 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Fri, 10 Feb 2023 02:21:08 +0000\nSubject: [PATCH 046/120] FROMGIT(6.4): arm64: dts: meson: gxbb-kii-pro:\n complete the bluetooth node\n\nAdd missing content to the bluetooth node to align it with the content\nused in (all) other GXBB dts files.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\nTested-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>\nReviewed-by: Neil Armstrong <neil.armstrong@linaro.org>\n---\n arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts\nindex 73ad0f5110f3..a800e8955c4a 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts\n@@ -71,5 +71,10 @@ &uart_A {\n \n \tbluetooth {\n \t\tcompatible = \"brcm,bcm4335a0\";\n+\t\tshutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>;\n+\t\thost-wakeup-gpios = <&gpio GPIOX_21 GPIO_ACTIVE_HIGH>;\n+\t\tmax-speed = <2000000>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"lpo\";\n \t};\n };\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0047-FROMGIT-6.4-arm64-dts-meson-gxbb-kii-pro-add-initial.patch",
    "content": "From 52fdf527ce95b5c7347cde0f0105b3003a834ac8 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Fri, 10 Feb 2023 02:29:00 +0000\nSubject: [PATCH 047/120] FROMGIT(6.4): arm64: dts: meson: gxbb-kii-pro: add\n initial audio support\n\nAdd initial support for HDMI and S/PDIF audio output.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\nTested-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>\nReviewed-by: Neil Armstrong <neil.armstrong@linaro.org>\n---\n .../boot/dts/amlogic/meson-gxbb-kii-pro.dts   | 60 +++++++++++++++++++\n 1 file changed, 60 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts\nindex a800e8955c4a..e238f1f10124 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts\n@@ -9,11 +9,19 @@\n #include <dt-bindings/gpio/gpio.h>\n #include <dt-bindings/input/input.h>\n #include <dt-bindings/leds/common.h>\n+#include <dt-bindings/sound/meson-aiu.h>\n \n / {\n \tcompatible = \"videostrong,kii-pro\", \"amlogic,meson-gxbb\";\n \tmodel = \"Videostrong KII Pro\";\n \n+\tspdif_dit: audio-codec-0 {\n+\t\t#sound-dai-cells = <0>;\n+\t\tcompatible = \"linux,spdif-dit\";\n+\t\tstatus = \"okay\";\n+\t\tsound-name-prefix = \"DIT\";\n+\t};\n+\n \tleds {\n \t\tcompatible = \"gpio-leds\";\n \t\tled {\n@@ -34,6 +42,58 @@ button-reset {\n \t\t\tgpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;\n \t\t};\n \t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,gx-sound-card\";\n+\t\tmodel = \"KII-PRO\";\n+\t\tassigned-clocks = <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>,\n+\t\t\t\t  <&clkc CLKID_MPLL2>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_I2S>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&spdif_dit>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&aiu {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&spdif_out_y_pins>;\n+\tpinctrl-names = \"default\";\n };\n \n &ethmac {\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0048-FROMGIT-6.4-dt-bindings-arm-amlogic-Document-the-boa.patch",
    "content": "From dafb23b2d7961125dc39553fa6b2ffb1b892a8b5 Mon Sep 17 00:00:00 2001\nFrom: Neil Armstrong <neil.armstrong@linaro.org>\nDate: Fri, 3 Mar 2023 18:37:57 +0100\nSubject: [PATCH 048/120] FROMGIT(6.4): dt-bindings: arm: amlogic: Document the\n boards with the BPI-CM4 connected\n\nThe BPI-CM4 module with an Amlogic A311D SoC is a module compatible\nwith the Raspberry Pi CM4 specifications.\n\nDocument the boards using this module, by specifying the BananaPi CM4\ncompatible in addition to the baseboard compatible.\n\nSigned-off-by: Neil Armstrong <neil.armstrong@linaro.org>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 8 ++++++++\n 1 file changed, 8 insertions(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex 7ded40b309a4..94f68e7c85ed 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -158,6 +158,14 @@ properties:\n           - const: amlogic,a311d\n           - const: amlogic,g12b\n \n+      - description: Boards using the BPI-CM4 module with Amlogic Meson G12B A311D SoC\n+        items:\n+          - enum:\n+              - bananapi,bpi-cm4io\n+          - const: bananapi,bpi-cm4\n+          - const: amlogic,a311d\n+          - const: amlogic,g12b\n+\n       - description: Boards with the Amlogic Meson G12B S922X SoC\n         items:\n           - enum:\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0049-FROMGIT-6.4-arm64-dts-amlogic-Add-initial-support-fo.patch",
    "content": "From b76cd699a611d0fb168b6204489b8f2e41311b6b Mon Sep 17 00:00:00 2001\nFrom: Neil Armstrong <neil.armstrong@linaro.org>\nDate: Sat, 4 Mar 2023 07:14:17 +0000\nSubject: [PATCH 049/120] FROMGIT(6.4): arm64: dts: amlogic: Add initial\n support for BPI-CM4 module with BPI-CM4IO baseboard\n\nAdd support for both the BananaPi BPI-CM4 module and the BananaPi\nbaseboard which is comnpatible with the RaspberryPi CM4IO baseboard.\n\nThe BananaPi BPI-CM4 module follows the CM4 specifications at [1],\nbut with a single HDMI port and a since DSI output.\n\nThe current CM4IO baseboard DT should work fine on the Raspberry CM4\nbaseboard and other derivatives baseboards, but proper DT should\nbe written for other baseboards.\n\nThe split is done so it's easy to describe a new CM4 baseboard, enabling\nonly the necessary HW used on the baseboard.\n\n[1] https://datasheets.raspberrypi.com/cm4io/cm4io-datasheet.pdf\n\nSigned-off-by: Neil Armstrong <neil.armstrong@linaro.org>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |   1 +\n .../amlogic/meson-g12b-bananapi-cm4-cm4io.dts | 165 ++++++++\n .../dts/amlogic/meson-g12b-bananapi-cm4.dtsi  | 388 ++++++++++++++++++\n 3 files changed, 554 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-bananapi-cm4-cm4io.dts\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-bananapi-cm4.dtsi\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex 5d5ec22a469e..f5845e565efb 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -9,6 +9,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-bananapi-cm4-cm4io.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gsking-x.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi-cm4-cm4io.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi-cm4-cm4io.dts\nnew file mode 100644\nindex 000000000000..1b0c3881c6a1\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi-cm4-cm4io.dts\n@@ -0,0 +1,165 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2023 Neil Armstrong <neil.armstrong@linaro.org>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-g12b-bananapi-cm4.dtsi\"\n+#include <dt-bindings/input/input.h>\n+#include <dt-bindings/leds/common.h>\n+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>\n+\n+/ {\n+\tcompatible = \"bananapi,bpi-cm4io\", \"bananapi,bpi-cm4\", \"amlogic,a311d\", \"amlogic,g12b\";\n+\tmodel = \"BananaPi BPI-CM4IO Baseboard with BPI-CM4 Module\";\n+\n+\taliases {\n+\t\tethernet0 = &ethmac;\n+\t\ti2c0 = &i2c1;\n+\t\ti2c1 = &i2c3;\n+\t};\n+\n+\tadc-keys {\n+\t\tcompatible = \"adc-keys\";\n+\t\tio-channels = <&saradc 2>;\n+\t\tio-channel-names = \"buttons\";\n+\t\tkeyup-threshold-microvolt = <1710000>;\n+\n+\t\tbutton-function {\n+\t\t\tlabel = \"Function\";\n+\t\t\tlinux,code = <KEY_FN>;\n+\t\t\tpress-threshold-microvolt = <10000>;\n+\t\t};\n+\t};\n+\n+\thdmi_connector: hdmi-connector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-blue {\n+\t\t\tcolor = <LED_COLOR_ID_BLUE>;\n+\t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tgpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;\n+\t\t\tlinux,default-trigger = \"heartbeat\";\n+\t\t};\n+\n+\t\tled-green {\n+\t\t\tcolor = <LED_COLOR_ID_GREEN>;\n+\t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tgpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;\n+\t\t};\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,axg-sound-card\";\n+\t\tmodel = \"BPI-CM4IO\";\n+\t\taudio-aux-devs = <&tdmout_b>;\n+\t\taudio-routing =\t\"TDMOUT_B IN 0\", \"FRDDR_A OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 1\", \"FRDDR_B OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 2\", \"FRDDR_C OUT 1\",\n+\t\t\t\t\"TDM_B Playback\", \"TDMOUT_B OUT\";\n+\n+\t\tassigned-clocks = <&clkc CLKID_MPLL2>,\n+\t\t\t\t  <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&frddr_a>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&frddr_b>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&frddr_c>;\n+\t\t};\n+\n+\t\t/* 8ch hdmi interface */\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&tdmif_b>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tdai-tdm-slot-tx-mask-0 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-1 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-2 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-3 = <1 1>;\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* hdmi glue */\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&cecb_AO {\n+\tstatus = \"okay\";\n+};\n+\n+&ethmac {\n+\tstatus = \"okay\";\n+};\n+\n+&hdmi_tx {\n+\tstatus = \"okay\";\n+};\n+\n+&hdmi_tx_tmds_port {\n+\thdmi_tx_tmds_out: endpoint {\n+\t\tremote-endpoint = <&hdmi_connector_in>;\n+\t};\n+};\n+\n+/* CSI port */\n+&i2c1 {\n+\tstatus = \"okay\";\n+};\n+\n+/* DSI port for touchscreen */\n+&i2c3 {\n+\tstatus = \"okay\";\n+};\n+\n+/* miniPCIe port with USB + SIM slot */\n+&pcie {\n+\tstatus = \"okay\";\n+};\n+\n+&sd_emmc_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tohdmitx {\n+\tstatus = \"okay\";\n+};\n+\n+/* Peripheral Only USB-C port */\n+&usb {\n+\tdr_mode = \"peripheral\";\n+\n+\tstatus = \"okay\";\n+};\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi-cm4.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi-cm4.dtsi\nnew file mode 100644\nindex 000000000000..dc0988c82694\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi-cm4.dtsi\n@@ -0,0 +1,388 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2023 Neil Armstrong <neil.armstrong@linaro.org>\n+ */\n+\n+#include \"meson-g12b-a311d.dtsi\"\n+#include <dt-bindings/gpio/meson-g12a-gpio.h>\n+\n+/ {\n+\taliases {\n+\t\tserial0 = &uart_AO;\n+\t\trtc1 = &vrtc;\n+\t};\n+\n+\tchosen {\n+\t\tstdout-path = \"serial0:115200n8\";\n+\t};\n+\n+\temmc_pwrseq: emmc-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-emmc\";\n+\t\treset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;\n+\t};\n+\n+\tmemory@0 {\n+\t\tdevice_type = \"memory\";\n+\t\treg = <0x0 0x0 0x0 0x40000000>;\n+\t};\n+\n+\tsdio_pwrseq: sdio-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-simple\";\n+\t\treset-gpios = <&gpio GPIOAO_6 GPIO_ACTIVE_LOW>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"ext_clock\";\n+\t};\n+\n+\temmc_1v8: regulator-emmc_1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"EMMC_1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vddao_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tdc_in: regulator-dc-in {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"DC_IN\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddio_c: regulator-vddio-c {\n+\t\tcompatible = \"regulator-gpio\";\n+\t\tregulator-name = \"VDDIO_C\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\n+\t\tenable-gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>;\n+\t\tenable-active-high;\n+\t\tregulator-always-on;\n+\n+\t\tgpios = <&gpio_ao GPIOAO_9 GPIO_OPEN_DRAIN>;\n+\t\tgpios-states = <1>;\n+\n+\t\tstates = <1800000 0>,\n+\t\t\t <3300000 1>;\n+\t};\n+\n+\tvddao_1v8: regulator-vddao-1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDAO_1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vddao_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddao_3v3: regulator-vddao-3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDAO_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&dc_in>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddcpu_a: regulator-vddcpu-a {\n+\t\t/*\n+\t\t * MP8756GD DC/DC Regulator.\n+\t\t */\n+\t\tcompatible = \"pwm-regulator\";\n+\n+\t\tregulator-name = \"VDDCPU_A\";\n+\t\tregulator-min-microvolt = <680000>;\n+\t\tregulator-max-microvolt = <1040000>;\n+\n+\t\tpwm-supply = <&dc_in>;\n+\n+\t\tpwms = <&pwm_ab 0 1250 0>;\n+\t\tpwm-dutycycle-range = <100 0>;\n+\n+\t\tregulator-boot-on;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddcpu_b: regulator-vddcpu-b {\n+\t\t/*\n+\t\t * SY8120B1ABC DC/DC Regulator.\n+\t\t */\n+\t\tcompatible = \"pwm-regulator\";\n+\n+\t\tregulator-name = \"VDDCPU_B\";\n+\t\tregulator-min-microvolt = <680000>;\n+\t\tregulator-max-microvolt = <1040000>;\n+\n+\t\tpwm-supply = <&dc_in>;\n+\n+\t\tpwms = <&pwm_AO_cd 1 1250 0>;\n+\t\tpwm-dutycycle-range = <100 0>;\n+\n+\t\tregulator-boot-on;\n+\t\tregulator-always-on;\n+\t};\n+\n+\twifi32k: wifi32k {\n+\t\tcompatible = \"pwm-clock\";\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tpwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */\n+\t};\n+};\n+\n+&arb {\n+\tstatus = \"okay\";\n+};\n+\n+&clkc_audio {\n+\tstatus = \"okay\";\n+};\n+\n+&cec_AO {\n+\tpinctrl-0 = <&cec_ao_a_h_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&cecb_AO {\n+\tpinctrl-0 = <&cec_ao_b_h_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&cpu0 {\n+\tcpu-supply = <&vddcpu_b>;\n+\toperating-points-v2 = <&cpu_opp_table_0>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu1 {\n+\tcpu-supply = <&vddcpu_b>;\n+\toperating-points-v2 = <&cpu_opp_table_0>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu100 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu101 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu102 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu103 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&ext_mdio {\n+\texternal_phy: ethernet-phy@0 {\n+\t\t/* Realtek RTL8211F (0x001cc916) */\n+\t\treg = <0>;\n+\t\tmax-speed = <1000>;\n+\n+\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t/* MAC_INTR on GPIOZ_14 */\n+\t\tinterrupts = <26 IRQ_TYPE_LEVEL_LOW>;\n+\t};\n+};\n+\n+/* Ethernet to be enabled in baseboard DT */\n+&ethmac {\n+\tpinctrl-0 = <&eth_pins>, <&eth_rgmii_pins>;\n+\tpinctrl-names = \"default\";\n+\tphy-mode = \"rgmii-txid\";\n+\tphy-handle = <&external_phy>;\n+};\n+\n+&frddr_a {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_b {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_c {\n+\tstatus = \"okay\";\n+};\n+\n+/* HDMI to be enabled in baseboard DT */\n+&hdmi_tx {\n+\tpinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-supply = <&dc_in>;\n+};\n+\n+/* \"Camera\" I2C bus */\n+&i2c1 {\n+\tpinctrl-0 = <&i2c1_sda_h6_pins>, <&i2c1_sck_h7_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+/* Main I2C bus */\n+&i2c2 {\n+\tpinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+/* \"ID\" I2C bus */\n+&i2c3 {\n+\tpinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&pcie {\n+\treset-gpios = <&gpio GPIOA_8 GPIO_ACTIVE_LOW>;\n+};\n+\n+&pwm_ab {\n+\tpinctrl-0 = <&pwm_a_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin0\";\n+\n+\tstatus = \"okay\";\n+};\n+\n+&pwm_ef {\n+\tpinctrl-0 = <&pwm_e_pins>;\n+\tpinctrl-names = \"default\";\n+\n+\tstatus = \"okay\";\n+};\n+\n+&pwm_AO_cd {\n+\tpinctrl-0 = <&pwm_ao_d_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin1\";\n+\n+\tstatus = \"okay\";\n+};\n+\n+&saradc {\n+\tvref-supply = <&vddao_1v8>;\n+\n+\tstatus = \"okay\";\n+};\n+\n+/* on-module SDIO WiFi */\n+&sd_emmc_a {\n+\tpinctrl-0 = <&sdio_pins>;\n+\tpinctrl-1 = <&sdio_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\t#address-cells = <1>;\n+\t#size-cells = <0>;\n+\n+\tbus-width = <4>;\n+\tsd-uhs-sdr104;\n+\tmax-frequency = <50000000>;\n+\n+\tnon-removable;\n+\tdisable-wp;\n+\n+\t/* WiFi firmware requires power in suspend */\n+\tkeep-power-in-suspend;\n+\n+\tmmc-pwrseq = <&sdio_pwrseq>;\n+\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddao_3v3>;\n+\n+\tstatus = \"okay\";\n+\n+\trtl8822cs: wifi@1 {\n+\t\treg = <1>;\n+\t};\n+};\n+\n+/* SD card to be enabled in baseboard DT */\n+&sd_emmc_b {\n+\tpinctrl-0 = <&sdcard_c_pins>;\n+\tpinctrl-1 = <&sdcard_clk_gate_c_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tmax-frequency = <50000000>;\n+\tdisable-wp;\n+\n+\tcd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddio_c>;\n+};\n+\n+/* on-module eMMC */\n+&sd_emmc_c {\n+\tpinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;\n+\tpinctrl-1 = <&emmc_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <8>;\n+\tcap-mmc-highspeed;\n+\tmmc-ddr-1_8v;\n+\tmmc-hs200-1_8v;\n+\tmax-frequency = <200000000>;\n+\tdisable-wp;\n+\n+\tmmc-pwrseq = <&emmc_pwrseq>;\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddao_1v8>;\n+\n+\tstatus = \"okay\";\n+};\n+\n+&tdmif_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmout_b {\n+\tstatus = \"okay\";\n+};\n+\n+/* on-module UART BT */\n+&uart_A {\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tstatus = \"okay\";\n+\n+\tbluetooth {\n+\t\tcompatible = \"realtek,rtl8822cs-bt\";\n+\t\tenable-gpios  = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\thost-wake-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;\n+\t\tdevice-wake-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>;\n+\t};\n+};\n+\n+&uart_AO {\n+\tpinctrl-0 = <&uart_ao_a_pins>;\n+\tpinctrl-names = \"default\";\n+\n+\tstatus = \"okay\";\n+};\n+\n+&usb {\n+\tphys = <&usb2_phy0>, <&usb2_phy1>;\n+\tphy-names = \"usb2-phy0\", \"usb2-phy1\";\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0051-FROMLIST-v5-dt-bindings-vendor-prefixes-Add-Titan-Mi.patch",
    "content": "From 022946dc830b928d2361e87501c7fca8505d6910 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>\nDate: Sun, 20 Feb 2022 08:23:12 +0000\nSubject: [PATCH 051/120] FROMLIST(v5): dt-bindings: vendor-prefixes: Add Titan\n Micro Electronics\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nAssign vendor prefix \"titanmec\", matching their domain name.\n\nAcked-by: Rob Herring <robh@kernel.org>\nSigned-off-by: Andreas Färber <afaerber@suse.de>\nSigned-off-by: Heiner Kallweit <hkallweit1@gmail.com>\n---\n Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml\nindex 6e323a380294..9570cc9e0e06 100644\n--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml\n+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml\n@@ -1303,6 +1303,8 @@ patternProperties:\n     description: Texas Instruments\n   \"^tianma,.*\":\n     description: Tianma Micro-electronics Co., Ltd.\n+  \"^titanmec,.*\":\n+    description: Shenzhen Titan Micro Electronics Co., Ltd.\n   \"^tlm,.*\":\n     description: Trusted Logic Mobility\n   \"^tmt,.*\":\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0052-FROMLIST-v5-dt-bindings-auxdisplay-Add-Titan-Micro-E.patch",
    "content": "From 94060333363a0241442deb5b993655188901840d Mon Sep 17 00:00:00 2001\nFrom: Heiner Kallweit <hkallweit1@gmail.com>\nDate: Sun, 20 Feb 2022 08:24:47 +0000\nSubject: [PATCH 052/120] FROMLIST(v5): dt-bindings: auxdisplay: Add Titan\n Micro Electronics TM1628\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nAdd a YAML schema binding for TM1628 auxdisplay\n(7/11-segment LED) controller.\n\nThis patch is partially based on previous RFC work from\nAndreas Färber <afaerber@suse.de>.\n\nCo-developed-by: Andreas Färber <afaerber@suse.de>\nSigned-off-by: Andreas Färber <afaerber@suse.de>\nSigned-off-by: Heiner Kallweit <hkallweit1@gmail.com>\n---\n .../bindings/auxdisplay/titanmec,tm1628.yaml  | 82 +++++++++++++++++++\n 1 file changed, 82 insertions(+)\n create mode 100644 Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml\n\ndiff --git a/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml b/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml\nnew file mode 100644\nindex 000000000000..d9cbbc950aab\n--- /dev/null\n+++ b/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml\n@@ -0,0 +1,82 @@\n+# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)\n+%YAML 1.2\n+---\n+$id: http://devicetree.org/schemas/leds/titanmec,tm1628.yaml#\n+$schema: http://devicetree.org/meta-schemas/core.yaml#\n+\n+title: Titan Micro Electronics TM1628 LED controller\n+\n+properties:\n+  compatible:\n+    enum:\n+    - titanmec,tm1628\n+\n+  reg:\n+    maxItems: 1\n+\n+  grid:\n+    description:\n+      Mapping of display digit position to grid number.\n+      This implicitly defines the display size.\n+    $ref: /schemas/types.yaml#/definitions/uint8-array\n+    minItems: 1\n+    maxItems: 7\n+\n+  segment-mapping:\n+    description:\n+      Mapping of 7 segment display segments A-G to bit numbers 1-12.\n+    $ref: /schemas/types.yaml#/definitions/uint8-array\n+    minItems: 7\n+    maxItems: 7\n+\n+  \"#address-cells\":\n+    const: 2\n+\n+  \"#size-cells\":\n+    const: 0\n+\n+required:\n+  - compatible\n+  - reg\n+\n+patternProperties:\n+  \"^.*@[1-7],([1-9]|1[0-6])$\":\n+    type: object\n+    description: |\n+      Properties for a single LED.\n+\n+    properties:\n+      reg:\n+        description: |\n+          1-based grid number, followed by 1-based segment bit number.\n+        maxItems: 1\n+\n+    required:\n+      - reg\n+\n+examples:\n+  - |\n+    #include <dt-bindings/leds/common.h>\n+\n+    spi {\n+        #address-cells = <1>;\n+        #size-cells = <0>;\n+\n+        led-controller@0 {\n+            compatible = \"titanmec,tm1628\";\n+            reg = <0>;\n+            spi-3-wire;\n+            spi-lsb-first;\n+            spi-max-frequency = <500000>;\n+            grid = /bits/ 8 <4 3 2 1>;\n+            segment-mapping = /bits/ 8 <4 5 6 1 2 3 7>;\n+            #address-cells = <2>;\n+            #size-cells = <0>;\n+\n+            alarmn@5,4 {\n+                reg = <5 4>;\n+                function = LED_FUNCTION_ALARM;\n+            };\n+        };\n+    };\n+...\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0053-FROMLIST-v5-docs-ABI-document-tm1628-attribute-displ.patch",
    "content": "From a53c2bef9b9f389914eb410e73b02b5099266708 Mon Sep 17 00:00:00 2001\nFrom: Heiner Kallweit <hkallweit1@gmail.com>\nDate: Sun, 20 Feb 2022 08:26:27 +0000\nSubject: [PATCH 053/120] FROMLIST(v5): docs: ABI: document tm1628 attribute\n display-text\n\nDocument the attribute for reading / writing the text to be displayed on\nthe 7 segment display.\n\nSigned-off-by: Heiner Kallweit <hkallweit1@gmail.com>\n---\n Documentation/ABI/testing/sysfs-devices-auxdisplay-tm1628 | 7 +++++++\n 1 file changed, 7 insertions(+)\n create mode 100644 Documentation/ABI/testing/sysfs-devices-auxdisplay-tm1628\n\ndiff --git a/Documentation/ABI/testing/sysfs-devices-auxdisplay-tm1628 b/Documentation/ABI/testing/sysfs-devices-auxdisplay-tm1628\nnew file mode 100644\nindex 000000000000..382757e721af\n--- /dev/null\n+++ b/Documentation/ABI/testing/sysfs-devices-auxdisplay-tm1628\n@@ -0,0 +1,7 @@\n+What:\t\t/sys/devices/.../display-text\n+Date:\t\tFebruary 2022\n+Contact:\tHeiner Kallweit <hkallweit1@gmail.com>\n+Description:\n+\t\tThe text to be displayed on the 7 segment display.\n+\t\tAny printable character is allowed as input, but some\n+\t\tcan not be displayed in a readable way with 7 segments.\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0054-FROMLIST-v5-auxdisplay-add-support-for-Titanmec-TM16.patch",
    "content": "From e64e545d0880e5617042ae8d28e60a455a689a78 Mon Sep 17 00:00:00 2001\nFrom: Heiner Kallweit <hkallweit1@gmail.com>\nDate: Mon, 4 Apr 2022 18:51:20 +0000\nSubject: [PATCH 054/120] FROMLIST(v5): auxdisplay: add support for Titanmec\n TM1628 7 segment display controller\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nThis patch adds support for the Titanmec TM1628 7 segment display\ncontroller. It's based on previous RFC work from Andreas Färber.\nThe RFC version placed the driver in the LED subsystem, but this was\nNAK'ed by the LED maintainer. Therefore I moved the driver to\n/drivers/auxdisplay what seems most reasonable to me.\n\nFurther changes to the RFC version:\n- Driver can be built also w/o LED class support, for displays that\n  don't have any symbols to be exposed as LED's.\n- Simplified the code and rewrote a lot of it.\n- Driver is now kind of a MVP, but functionality should be sufficient\n  for most use cases.\n- Use the existing 7 segment support in uapi/linux/map_to_7segment.h\n  as suggested by Geert Uytterhoeven.\n\nNote: There's a number of chips from other manufacturers that are\n      almost identical, e.g. FD628, SM1628. Only difference I saw so\n      far is that they partially support other display modes.\n      TM1628: 6x12, 7x11\n      SM1628C: 4x13, 5x12, 6x11, 7x10\n      For typical displays on devices using these chips this\n      difference shouldn't matter.\n\nSuccessfully tested on a TX3 Mini TV box that has an SM1628C and a\ndisplay with 4 digits and 7 symbols.\n\nCo-developed-by: Andreas Färber <afaerber@suse.de>\nSigned-off-by: Andreas Färber <afaerber@suse.de>\nSigned-off-by: Heiner Kallweit <hkallweit1@gmail.com>\n---\n drivers/auxdisplay/Kconfig  |  11 ++\n drivers/auxdisplay/Makefile |   1 +\n drivers/auxdisplay/tm1628.c | 376 ++++++++++++++++++++++++++++++++++++\n 3 files changed, 388 insertions(+)\n create mode 100644 drivers/auxdisplay/tm1628.c\n\ndiff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig\nindex 64012cda4d12..2764afc5c5d9 100644\n--- a/drivers/auxdisplay/Kconfig\n+++ b/drivers/auxdisplay/Kconfig\n@@ -203,6 +203,17 @@ config ARM_CHARLCD\n \t  line and the Linux version on the second line, but that's\n \t  still useful.\n \n+config TM1628\n+\ttristate \"TM1628 driver for LED 7/11 segment displays\"\n+\tdepends on SPI\n+\tdepends on OF || COMPILE_TEST\n+\thelp\n+\t  Say Y to enable support for Titan Micro Electronics TM1628\n+\t  LED controller.\n+\n+\t  It's a 3-wire SPI device controlling a two-dimensional grid of\n+\t  LEDs. Dimming is applied to all outputs through an internal PWM.\n+\n menuconfig PARPORT_PANEL\n \ttristate \"Parallel port LCD/Keypad Panel support\"\n \tdepends on PARPORT\ndiff --git a/drivers/auxdisplay/Makefile b/drivers/auxdisplay/Makefile\nindex 6968ed4d3f0a..7728e17e1c5a 100644\n--- a/drivers/auxdisplay/Makefile\n+++ b/drivers/auxdisplay/Makefile\n@@ -14,3 +14,4 @@ obj-$(CONFIG_HT16K33)\t\t+= ht16k33.o\n obj-$(CONFIG_PARPORT_PANEL)\t+= panel.o\n obj-$(CONFIG_LCD2S)\t\t+= lcd2s.o\n obj-$(CONFIG_LINEDISP)\t\t+= line-display.o\n+obj-$(CONFIG_TM1628)\t\t+= tm1628.o\ndiff --git a/drivers/auxdisplay/tm1628.c b/drivers/auxdisplay/tm1628.c\nnew file mode 100644\nindex 000000000000..4d99a7aa077b\n--- /dev/null\n+++ b/drivers/auxdisplay/tm1628.c\n@@ -0,0 +1,376 @@\n+// SPDX-License-Identifier: GPL-2.0-or-later\n+/*\n+ * Titan Micro Electronics TM1628 LED controller\n+ *\n+ * Copyright (c) 2019 Andreas Färber\n+ * Copyright (c) 2022 Heiner Kallweit\n+ */\n+\n+#include <linux/ctype.h>\n+#include <linux/delay.h>\n+#include <linux/leds.h>\n+#include <linux/module.h>\n+#include <linux/property.h>\n+#include <linux/spi/spi.h>\n+#include <uapi/linux/map_to_7segment.h>\n+\n+#define TM1628_CMD_DISPLAY_MODE\t\t(0 << 6)\n+#define TM1628_DISPLAY_MODE_6_12\t0x02\n+#define TM1628_DISPLAY_MODE_7_11\t0x03\n+\n+#define TM1628_CMD_DATA\t\t\t(1 << 6)\n+#define TM1628_DATA_TEST_MODE\t\tBIT(3)\n+#define TM1628_DATA_FIXED_ADDR\t\tBIT(2)\n+#define TM1628_DATA_WRITE_DATA\t\t0x00\n+#define TM1628_DATA_READ_DATA\t\t0x02\n+\n+#define TM1628_CMD_DISPLAY_CTRL\t\t(2 << 6)\n+#define TM1628_DISPLAY_CTRL_DISPLAY_ON\tBIT(3)\n+\n+#define TM1628_CMD_SET_ADDRESS\t\t(3 << 6)\n+\n+#define TM1628_BRIGHTNESS_MAX\t\t7\n+#define NUM_LED_SEGS\t\t\t7\n+\n+/* Physical limits, depending on the mode the chip may support less */\n+#define MAX_GRID_SIZE\t\t\t7\n+#define MAX_SEGMENT_NUM\t\t\t16\n+\n+struct tm1628_led {\n+\tstruct led_classdev\tleddev;\n+\tstruct tm1628\t\t*ctrl;\n+\tu32\t\t\tgrid;\n+\tu32\t\t\tseg;\n+};\n+\n+struct tm1628 {\n+\tstruct spi_device\t\t*spi;\n+\t__le16\t\t\t\tdata[MAX_GRID_SIZE];\n+\tstruct mutex\t\t\tdisp_lock;\n+\tchar\t\t\t\ttext[MAX_GRID_SIZE + 1];\n+\tu8\t\t\t\tsegment_mapping[NUM_LED_SEGS];\n+\tu8\t\t\t\tgrid[MAX_GRID_SIZE];\n+\tint\t\t\t\tgrid_size;\n+\tstruct tm1628_led\t\tleds[];\n+};\n+\n+/* Command 1: Display Mode Setting */\n+static int tm1628_set_display_mode(struct spi_device *spi, u8 grid_mode)\n+{\n+\tconst u8 cmd = TM1628_CMD_DISPLAY_MODE | grid_mode;\n+\n+\treturn spi_write(spi, &cmd, 1);\n+}\n+\n+/* Command 3: Address Setting */\n+static int tm1628_set_address(struct spi_device *spi, u8 offset)\n+{\n+\tconst u8 cmd = TM1628_CMD_SET_ADDRESS | (offset * sizeof(__le16));\n+\n+\treturn spi_write(spi, &cmd, 1);\n+}\n+\n+/* Command 2: Data Setting */\n+static int tm1628_write_data(struct spi_device *spi, unsigned int offset,\n+\t\t\t     unsigned int len)\n+{\n+\tstruct tm1628 *s = spi_get_drvdata(spi);\n+\tconst u8 cmd = TM1628_CMD_DATA | TM1628_DATA_WRITE_DATA;\n+\tstruct spi_transfer xfers[] = {\n+\t\t{\n+\t\t\t.tx_buf = &cmd,\n+\t\t\t.len = 1,\n+\t\t},\n+\t\t{\n+\t\t\t.tx_buf = (__force void *)(s->data + offset),\n+\t\t\t.len = len * sizeof(__le16),\n+\t\t},\n+\t};\n+\n+\tif (offset + len > MAX_GRID_SIZE) {\n+\t\tdev_err(&spi->dev, \"Invalid data address offset %u len %u\\n\",\n+\t\t\toffset, len);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\ttm1628_set_address(spi, offset);\n+\n+\treturn spi_sync_transfer(spi, xfers, ARRAY_SIZE(xfers));\n+}\n+\n+/* Command 4: Display Control */\n+static int tm1628_set_display_ctrl(struct spi_device *spi, bool on)\n+{\n+\tu8 cmd = TM1628_CMD_DISPLAY_CTRL | TM1628_BRIGHTNESS_MAX;\n+\n+\tif (on)\n+\t\tcmd |= TM1628_DISPLAY_CTRL_DISPLAY_ON;\n+\n+\treturn spi_write(spi, &cmd, 1);\n+}\n+\n+static int tm1628_show_text(struct tm1628 *s)\n+{\n+\tstatic SEG7_CONVERSION_MAP(map_seg7, MAP_ASCII7SEG_ALPHANUM);\n+\tint msg_len, i, ret;\n+\n+\tmsg_len = strlen(s->text);\n+\n+\tmutex_lock(&s->disp_lock);\n+\n+\tfor (i = 0; i < s->grid_size; i++) {\n+\t\tint pos = s->grid[i] - 1;\n+\t\tint j, char7_raw, char7;\n+\n+\t\tif (i >= msg_len) {\n+\t\t\ts->data[pos] = 0;\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\tchar7_raw = map_to_seg7(&map_seg7, s->text[i]);\n+\n+\t\tfor (j = 0, char7 = 0; j < NUM_LED_SEGS; j++) {\n+\t\t\tif (char7_raw & BIT(j))\n+\t\t\t\tchar7 |= BIT(s->segment_mapping[j] - 1);\n+\t\t}\n+\n+\t\ts->data[pos] = cpu_to_le16(char7);\n+\t}\n+\n+\tret = tm1628_write_data(s->spi, 0, s->grid_size);\n+\n+\tmutex_unlock(&s->disp_lock);\n+\n+\treturn ret;\n+}\n+\n+static int tm1628_led_set_brightness(struct led_classdev *led_cdev,\n+\t\t\t\t     enum led_brightness brightness)\n+{\n+\tstruct tm1628_led *led = container_of(led_cdev, struct tm1628_led, leddev);\n+\tstruct tm1628 *s = led->ctrl;\n+\tint ret, offset = led->grid - 1;\n+\t__le16 bit = cpu_to_le16(BIT(led->seg - 1));\n+\n+\tmutex_lock(&s->disp_lock);\n+\n+\tif (brightness == LED_OFF)\n+\t\ts->data[offset] &= ~bit;\n+\telse\n+\t\ts->data[offset] |= bit;\n+\n+\tret = tm1628_write_data(s->spi, offset, 1);\n+\n+\tmutex_unlock(&s->disp_lock);\n+\n+\treturn ret;\n+}\n+\n+static enum led_brightness tm1628_led_get_brightness(struct led_classdev *led_cdev)\n+{\n+\tstruct tm1628_led *led = container_of(led_cdev, struct tm1628_led, leddev);\n+\tstruct tm1628 *s = led->ctrl;\n+\tint offset = led->grid - 1;\n+\t__le16 bit = cpu_to_le16(BIT(led->seg - 1));\n+\tbool on;\n+\n+\tmutex_lock(&s->disp_lock);\n+\ton = s->data[offset] & bit;\n+\tmutex_unlock(&s->disp_lock);\n+\n+\treturn on ? LED_ON : LED_OFF;\n+}\n+\n+static int tm1628_register_led(struct tm1628 *s, struct fwnode_handle *node,\n+\t\t\t       u32 grid, u32 seg, struct tm1628_led *led)\n+{\n+\tstruct device *dev = &s->spi->dev;\n+\tstruct led_init_data init_data = { .fwnode = node };\n+\n+\tled->ctrl = s;\n+\tled->grid = grid;\n+\tled->seg  = seg;\n+\tled->leddev.max_brightness = LED_ON;\n+\tled->leddev.brightness_set_blocking = tm1628_led_set_brightness;\n+\tled->leddev.brightness_get = tm1628_led_get_brightness;\n+\n+\treturn devm_led_classdev_register_ext(dev, &led->leddev, &init_data);\n+}\n+\n+static ssize_t display_text_show(struct device *dev, struct device_attribute *attr,\n+\t\t\t\t char *buf)\n+{\n+\tstruct tm1628 *s = dev_get_drvdata(dev);\n+\n+\treturn sysfs_emit(buf, \"%s\\n\", s->text);\n+}\n+\n+static ssize_t display_text_store(struct device *dev, struct device_attribute *attr,\n+\t\t\t\t  const char *buf, size_t count)\n+{\n+\tstruct tm1628 *s = dev_get_drvdata(dev);\n+\tint ret, i;\n+\n+\tfor (i = 0; i < count && i < s->grid_size && isprint(buf[i]); i++)\n+\t\ts->text[i] = buf[i];\n+\n+\ts->text[i] = '\\0';\n+\n+\tret = tm1628_show_text(s);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\treturn count;\n+}\n+\n+static const DEVICE_ATTR_RW(display_text);\n+\n+static int tm1628_spi_probe(struct spi_device *spi)\n+{\n+\tstruct fwnode_handle *child;\n+\tunsigned int num_leds;\n+\tstruct tm1628 *s;\n+\tint ret, i;\n+\n+\tnum_leds = device_get_child_node_count(&spi->dev);\n+\n+\ts = devm_kzalloc(&spi->dev, struct_size(s, leds, num_leds), GFP_KERNEL);\n+\tif (!s)\n+\t\treturn -ENOMEM;\n+\n+\ts->spi = spi;\n+\tspi_set_drvdata(spi, s);\n+\n+\tmutex_init(&s->disp_lock);\n+\n+\t/* According to TM1628 datasheet */\n+\tmsleep(200);\n+\n+\t/* Clear screen */\n+\tret = tm1628_write_data(spi, 0, MAX_GRID_SIZE);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\t/* For now we support 6x12 mode only. This should be sufficient for most use cases */\n+\tret = tm1628_set_display_mode(spi, TM1628_DISPLAY_MODE_6_12);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = tm1628_set_display_ctrl(spi, true);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tnum_leds = 0;\n+\n+\tif (!IS_REACHABLE(CONFIG_LEDS_CLASS))\n+\t\tgoto no_leds;\n+\n+\tdevice_for_each_child_node(&spi->dev, child) {\n+\t\tu32 reg[2];\n+\n+\t\tret = fwnode_property_read_u32_array(child, \"reg\", reg, 2);\n+\t\tif (ret) {\n+\t\t\tdev_err(&spi->dev, \"Reading %s reg property failed (%d)\\n\",\n+\t\t\t\tfwnode_get_name(child), ret);\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\tif (reg[0] == 0 || reg[0] > MAX_GRID_SIZE) {\n+\t\t\tdev_err(&spi->dev, \"Invalid grid %u at %s\\n\",\n+\t\t\t\treg[0], fwnode_get_name(child));\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\tif (reg[1] == 0 || reg[1] > MAX_SEGMENT_NUM) {\n+\t\t\tdev_err(&spi->dev, \"Invalid segment %u at %s\\n\",\n+\t\t\t\treg[1], fwnode_get_name(child));\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\tret = tm1628_register_led(s, child, reg[0], reg[1], s->leds + num_leds);\n+\t\tif (ret) {\n+\t\t\tdev_err(&spi->dev, \"Failed to register LED %s (%d)\\n\",\n+\t\t\t\tfwnode_get_name(child), ret);\n+\t\t\tcontinue;\n+\t\t}\n+\t\tnum_leds++;\n+\t}\n+\n+no_leds:\n+\tret = device_property_count_u8(&spi->dev, \"titanmec,grid\");\n+\tif (ret < 1 || ret > MAX_GRID_SIZE) {\n+\t\tdev_err(&spi->dev, \"Invalid display length (%d)\\n\", ret);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\ts->grid_size = ret;\n+\n+\tret = device_property_read_u8_array(&spi->dev, \"titanmec,grid\", s->grid, s->grid_size);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tfor (i = 0; i < s->grid_size; i++) {\n+\t\tif (s->grid[i] < 1 || s->grid[i] > s->grid_size)\n+\t\t\treturn -EINVAL;\n+\t}\n+\n+\tret = device_property_read_u8_array(&spi->dev, \"titanmec,segment-mapping\",\n+\t\t\t\t\t    s->segment_mapping, NUM_LED_SEGS);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tfor (i = 0; i < NUM_LED_SEGS; i++) {\n+\t\tif (s->segment_mapping[i] < 1 || s->segment_mapping[i] > MAX_SEGMENT_NUM)\n+\t\t\treturn -EINVAL;\n+\t}\n+\n+\tret = device_create_file(&spi->dev, &dev_attr_display_text);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tdev_info(&spi->dev, \"Configured display with %u digits and %u symbols\\n\",\n+\t\t s->grid_size, num_leds);\n+\n+\treturn 0;\n+}\n+\n+static void tm1628_spi_remove(struct spi_device *spi)\n+{\n+\tdevice_remove_file(&spi->dev, &dev_attr_display_text);\n+\ttm1628_set_display_ctrl(spi, false);\n+}\n+\n+static void tm1628_spi_shutdown(struct spi_device *spi)\n+{\n+\ttm1628_set_display_ctrl(spi, false);\n+}\n+\n+static const struct of_device_id tm1628_spi_of_matches[] = {\n+\t{ .compatible = \"titanmec,tm1628\" },\n+\t{}\n+};\n+MODULE_DEVICE_TABLE(of, tm1628_spi_of_matches);\n+\n+static const struct spi_device_id tm1628_spi_id_table[] = {\n+\t{ \"tm1628\" },\n+\t{},\n+};\n+MODULE_DEVICE_TABLE(spi, tm1628_spi_id_table);\n+\n+static struct spi_driver tm1628_spi_driver = {\n+\t.probe = tm1628_spi_probe,\n+\t.remove = tm1628_spi_remove,\n+\t.shutdown = tm1628_spi_shutdown,\n+\t.id_table = tm1628_spi_id_table,\n+\n+\t.driver = {\n+\t\t.name = \"tm1628\",\n+\t\t.of_match_table = tm1628_spi_of_matches,\n+\t},\n+};\n+module_spi_driver(tm1628_spi_driver);\n+\n+MODULE_DESCRIPTION(\"TM1628 LED controller driver\");\n+MODULE_AUTHOR(\"Andreas Färber <afaerber@suse.de>\");\n+MODULE_AUTHOR(\"Heiner Kallweit <hkallweit1@gmail.com>\");\n+MODULE_LICENSE(\"GPL\");\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0055-FROMLIST-v5-arm64-dts-meson-gxl-s905w-tx3-mini-add-s.patch",
    "content": "From 136c5d1f6275026217be5741df24816a3875e7a4 Mon Sep 17 00:00:00 2001\nFrom: Heiner Kallweit <hkallweit1@gmail.com>\nDate: Mon, 4 Apr 2022 18:52:34 +0000\nSubject: [PATCH 055/120] FROMLIST(v5): arm64: dts: meson-gxl-s905w-tx3-mini:\n add support for the 7 segment display\n\nThis patch adds support for the 7 segment display of the device.\n\nSigned-off-by: Heiner Kallweit <hkallweit1@gmail.com>\n---\n .../dts/amlogic/meson-gxl-s905w-tx3-mini.dts  | 59 +++++++++++++++++++\n 1 file changed, 59 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905w-tx3-mini.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905w-tx3-mini.dts\nindex 6705c2082a78..ae0d8d7b1e19 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905w-tx3-mini.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905w-tx3-mini.dts\n@@ -10,6 +10,7 @@\n \n #include \"meson-gxl-s905x.dtsi\"\n #include \"meson-gx-p23x-q20x.dtsi\"\n+#include <dt-bindings/leds/common.h>\n \n / {\n \tcompatible = \"oranth,tx3-mini\", \"amlogic,s905w\", \"amlogic,meson-gxl\";\n@@ -19,6 +20,64 @@ memory@0 {\n \t\tdevice_type = \"memory\";\n \t\treg = <0x0 0x0 0x0 0x40000000>; /* 1 GiB or 2 GiB */\n \t};\n+\n+\tspi {\n+\t\tcompatible = \"spi-gpio\";\n+\t\tsck-gpios = <&gpio GPIODV_27  GPIO_ACTIVE_HIGH>;\n+\t\tmosi-gpios = <&gpio GPIODV_26 GPIO_ACTIVE_HIGH>;\n+\t\tcs-gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;\n+\t\tnum-chipselects = <1>;\n+\t\t#address-cells = <1>;\n+\t\t#size-cells = <0>;\n+\n+\t\ttm1628: led-controller@0 {\n+\t\t\tcompatible = \"titanmec,tm1628\";\n+\t\t\treg = <0>;\n+\t\t\tspi-3wire;\n+\t\t\tspi-lsb-first;\n+\t\t\tspi-rx-delay-us = <1>;\n+\t\t\tspi-max-frequency = <500000>;\n+\t\t\t#address-cells = <2>;\n+\t\t\t#size-cells = <0>;\n+\n+\t\t\ttitanmec,segment-mapping = /bits/ 8 <4 5 6 1 2 3 7>;\n+\t\t\ttitanmec,grid = /bits/ 8 <4 3 2 1>;\n+\n+\t\t\talarm@5,1 {\n+\t\t\t\treg = <5 1>;\n+\t\t\t\tfunction = LED_FUNCTION_ALARM;\n+\t\t\t};\n+\n+\t\t\tusb@5,2 {\n+\t\t\t\treg = <5 2>;\n+\t\t\t\tfunction = LED_FUNCTION_USB;\n+\t\t\t};\n+\t\t\tplay@5,3 {\n+\t\t\t\treg = <5 3>;\n+\t\t\t\tfunction = \"play\";\n+\t\t\t};\n+\n+\t\t\tpause@5,4 {\n+\t\t\t\treg = <5 4>;\n+\t\t\t\tfunction = \"pause\";\n+\t\t\t};\n+\n+\t\t\tcolon@5,5 {\n+\t\t\t\treg = <5 5>;\n+\t\t\t\tfunction = \"colon\";\n+\t\t\t};\n+\n+\t\t\tlan@5,6 {\n+\t\t\t\treg = <5 6>;\n+\t\t\t\tfunction = LED_FUNCTION_LAN;\n+\t\t\t};\n+\n+\t\t\twlan@5,7 {\n+\t\t\t\treg = <5 7>;\n+\t\t\t\tfunction = LED_FUNCTION_WLAN;\n+\t\t\t};\n+\t\t};\n+\t};\n };\n \n &ir {\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0056-FROMLIST-v5-MAINTAINERS-Add-entry-for-tm1628-auxdisp.patch",
    "content": "From fbc5936b6016a740768dcd2ac99be9691750e649 Mon Sep 17 00:00:00 2001\nFrom: Heiner Kallweit <hkallweit1@gmail.com>\nDate: Mon, 4 Apr 2022 18:53:32 +0000\nSubject: [PATCH 056/120] FROMLIST(v5): MAINTAINERS: Add entry for tm1628\n auxdisplay driver\n\nSigned-off-by: Heiner Kallweit <hkallweit1@gmail.com>\n---\n MAINTAINERS | 7 +++++++\n 1 file changed, 7 insertions(+)\n\ndiff --git a/MAINTAINERS b/MAINTAINERS\nindex 350d7e3ba94f..93e294dc03c0 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -20728,6 +20728,13 @@ W:\thttp://sourceforge.net/projects/tlan/\n F:\tDocumentation/networking/device_drivers/ethernet/ti/tlan.rst\n F:\tdrivers/net/ethernet/ti/tlan.*\n \n+TM1628 LED CONTROLLER DRIVER\n+M:\tHeiner Kallweit <hkallweit1@gmail.com>\n+S:\tMaintained\n+F:\tDocumentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml\n+F:\tDocumentation/ABI/testing/sysfs-devices-auxdisplay-tm1628\n+F:\tdrivers/auxdisplay/tm1628.c\n+\n TM6000 VIDEO4LINUX DRIVER\n M:\tMauro Carvalho Chehab <mchehab@kernel.org>\n L:\tlinux-media@vger.kernel.org\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0057-FROMLIST-v1-ASoC-hdmi-codec-reorder-channel-allocati.patch",
    "content": "From fdcff6282a2fcb2afb2751c33f22ea245002b068 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sun, 23 Dec 2018 02:24:38 +0100\nSubject: [PATCH 057/120] FROMLIST(v1): ASoC: hdmi-codec: reorder channel\n allocation list\n\nWrong channel allocation is selected by hdmi_codec_get_ch_alloc_table_idx().\n\nE.g when ELD reports FL|FR|LFE|FC|RL|RR or FL|FR|LFE|FC|RL|RR|RC|RLC|RRC\n\nca_id 0x01 with speaker mask FL|FR|LFE gets selected instead of\nca_id 0x03 with speaker mask FL|FR|LFE|FC for 4 channels\n\nand\n\nca_id 0x04 with speaker mask FL|FR|RC gets selected instead of\nca_id 0x0b with speaker mask FL|FR|LFE|FC|RL|RR for 6 channels\n\nFix this by reorder the channel allocation list with\nmost specific speaker mask at the top.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n sound/soc/codecs/hdmi-codec.c | 140 +++++++++++++++++++---------------\n 1 file changed, 77 insertions(+), 63 deletions(-)\n\ndiff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c\nindex bbc33161bcca..7a5c26208149 100644\n--- a/sound/soc/codecs/hdmi-codec.c\n+++ b/sound/soc/codecs/hdmi-codec.c\n@@ -184,84 +184,97 @@ static const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = {\n /*\n  * hdmi_codec_channel_alloc: speaker configuration available for CEA\n  *\n- * This is an ordered list that must match with hdmi_codec_8ch_chmaps struct\n+ * This is an ordered list where ca_id must exist in hdmi_codec_8ch_chmaps\n  * The preceding ones have better chances to be selected by\n  * hdmi_codec_get_ch_alloc_table_idx().\n  */\n static const struct hdmi_codec_cea_spk_alloc hdmi_codec_channel_alloc[] = {\n \t{ .ca_id = 0x00, .n_ch = 2,\n-\t  .mask = FL | FR},\n-\t/* 2.1 */\n-\t{ .ca_id = 0x01, .n_ch = 4,\n-\t  .mask = FL | FR | LFE},\n-\t/* Dolby Surround */\n+\t  .mask = FL | FR },\n+\t{ .ca_id = 0x03, .n_ch = 4,\n+\t  .mask = FL | FR | LFE | FC },\n \t{ .ca_id = 0x02, .n_ch = 4,\n \t  .mask = FL | FR | FC },\n-\t/* surround51 */\n+\t{ .ca_id = 0x01, .n_ch = 4,\n+\t  .mask = FL | FR | LFE },\n \t{ .ca_id = 0x0b, .n_ch = 6,\n-\t  .mask = FL | FR | LFE | FC | RL | RR},\n-\t/* surround40 */\n-\t{ .ca_id = 0x08, .n_ch = 6,\n-\t  .mask = FL | FR | RL | RR },\n-\t/* surround41 */\n-\t{ .ca_id = 0x09, .n_ch = 6,\n-\t  .mask = FL | FR | LFE | RL | RR },\n-\t/* surround50 */\n+\t  .mask = FL | FR | LFE | FC | RL | RR },\n \t{ .ca_id = 0x0a, .n_ch = 6,\n \t  .mask = FL | FR | FC | RL | RR },\n-\t/* 6.1 */\n-\t{ .ca_id = 0x0f, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FC | RL | RR | RC },\n-\t/* surround71 */\n+\t{ .ca_id = 0x09, .n_ch = 6,\n+\t  .mask = FL | FR | LFE | RL | RR },\n+\t{ .ca_id = 0x08, .n_ch = 6,\n+\t  .mask = FL | FR | RL | RR },\n+\t{ .ca_id = 0x07, .n_ch = 6,\n+\t  .mask = FL | FR | LFE | FC | RC },\n+\t{ .ca_id = 0x06, .n_ch = 6,\n+\t  .mask = FL | FR | FC | RC },\n+\t{ .ca_id = 0x05, .n_ch = 6,\n+\t  .mask = FL | FR | LFE | RC },\n+\t{ .ca_id = 0x04, .n_ch = 6,\n+\t  .mask = FL | FR | RC },\n \t{ .ca_id = 0x13, .n_ch = 8,\n \t  .mask = FL | FR | LFE | FC | RL | RR | RLC | RRC },\n-\t/* others */\n-\t{ .ca_id = 0x03, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FC },\n-\t{ .ca_id = 0x04, .n_ch = 8,\n-\t  .mask = FL | FR | RC},\n-\t{ .ca_id = 0x05, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RC },\n-\t{ .ca_id = 0x06, .n_ch = 8,\n-\t  .mask = FL | FR | FC | RC },\n-\t{ .ca_id = 0x07, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FC | RC },\n-\t{ .ca_id = 0x0c, .n_ch = 8,\n-\t  .mask = FL | FR | RC | RL | RR },\n-\t{ .ca_id = 0x0d, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RL | RR | RC },\n-\t{ .ca_id = 0x0e, .n_ch = 8,\n-\t  .mask = FL | FR | FC | RL | RR | RC },\n-\t{ .ca_id = 0x10, .n_ch = 8,\n-\t  .mask = FL | FR | RL | RR | RLC | RRC },\n-\t{ .ca_id = 0x11, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RL | RR | RLC | RRC },\n+\t{ .ca_id = 0x1f, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | FC | RL | RR | FLC | FRC },\n \t{ .ca_id = 0x12, .n_ch = 8,\n \t  .mask = FL | FR | FC | RL | RR | RLC | RRC },\n-\t{ .ca_id = 0x14, .n_ch = 8,\n-\t  .mask = FL | FR | FLC | FRC },\n-\t{ .ca_id = 0x15, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FLC | FRC },\n-\t{ .ca_id = 0x16, .n_ch = 8,\n-\t  .mask = FL | FR | FC | FLC | FRC },\n-\t{ .ca_id = 0x17, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FC | FLC | FRC },\n-\t{ .ca_id = 0x18, .n_ch = 8,\n-\t  .mask = FL | FR | RC | FLC | FRC },\n-\t{ .ca_id = 0x19, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RC | FLC | FRC },\n-\t{ .ca_id = 0x1a, .n_ch = 8,\n-\t  .mask = FL | FR | RC | FC | FLC | FRC },\n-\t{ .ca_id = 0x1b, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RC | FC | FLC | FRC },\n-\t{ .ca_id = 0x1c, .n_ch = 8,\n-\t  .mask = FL | FR | RL | RR | FLC | FRC },\n-\t{ .ca_id = 0x1d, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RL | RR | FLC | FRC },\n \t{ .ca_id = 0x1e, .n_ch = 8,\n \t  .mask = FL | FR | FC | RL | RR | FLC | FRC },\n-\t{ .ca_id = 0x1f, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FC | RL | RR | FLC | FRC },\n+\t{ .ca_id = 0x11, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RL | RR | RLC | RRC },\n+\t{ .ca_id = 0x1d, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RL | RR | FLC | FRC },\n+\t{ .ca_id = 0x10, .n_ch = 8,\n+\t  .mask = FL | FR | RL | RR | RLC | RRC },\n+\t{ .ca_id = 0x1c, .n_ch = 8,\n+\t  .mask = FL | FR | RL | RR | FLC | FRC },\n+\t{ .ca_id = 0x0f, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | FC | RL | RR | RC },\n+\t{ .ca_id = 0x1b, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RC | FC | FLC | FRC },\n+\t{ .ca_id = 0x0e, .n_ch = 8,\n+\t  .mask = FL | FR | FC | RL | RR | RC },\n+\t{ .ca_id = 0x1a, .n_ch = 8,\n+\t  .mask = FL | FR | RC | FC | FLC | FRC },\n+\t{ .ca_id = 0x0d, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RL | RR | RC },\n+\t{ .ca_id = 0x19, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RC | FLC | FRC },\n+\t{ .ca_id = 0x0c, .n_ch = 8,\n+\t  .mask = FL | FR | RC | RL | RR },\n+\t{ .ca_id = 0x18, .n_ch = 8,\n+\t  .mask = FL | FR | RC | FLC | FRC },\n+\t{ .ca_id = 0x17, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | FC | FLC | FRC },\n+\t{ .ca_id = 0x16, .n_ch = 8,\n+\t  .mask = FL | FR | FC | FLC | FRC },\n+\t{ .ca_id = 0x15, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | FLC | FRC },\n+\t{ .ca_id = 0x14, .n_ch = 8,\n+\t  .mask = FL | FR | FLC | FRC },\n+\t{ .ca_id = 0x0b, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | FC | RL | RR },\n+\t{ .ca_id = 0x0a, .n_ch = 8,\n+\t  .mask = FL | FR | FC | RL | RR },\n+\t{ .ca_id = 0x09, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RL | RR },\n+\t{ .ca_id = 0x08, .n_ch = 8,\n+\t  .mask = FL | FR | RL | RR },\n+\t{ .ca_id = 0x07, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | FC | RC },\n+\t{ .ca_id = 0x06, .n_ch = 8,\n+\t  .mask = FL | FR | FC | RC },\n+\t{ .ca_id = 0x05, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RC },\n+\t{ .ca_id = 0x04, .n_ch = 8,\n+\t  .mask = FL | FR | RC },\n+\t{ .ca_id = 0x03, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | FC },\n+\t{ .ca_id = 0x02, .n_ch = 8,\n+\t  .mask = FL | FR | FC },\n+\t{ .ca_id = 0x01, .n_ch = 8,\n+\t  .mask = FL | FR | LFE },\n };\n \n struct hdmi_codec_priv {\n@@ -370,7 +383,8 @@ static int hdmi_codec_chmap_ctl_get(struct snd_kcontrol *kcontrol,\n \tstruct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol);\n \tstruct hdmi_codec_priv *hcp = info->private_data;\n \n-\tmap = info->chmap[hcp->chmap_idx].map;\n+\tif (hcp->chmap_idx != HDMI_CODEC_CHMAP_IDX_UNKNOWN)\n+\t\tmap = info->chmap[hcp->chmap_idx].map;\n \n \tfor (i = 0; i < info->max_channels; i++) {\n \t\tif (hcp->chmap_idx == HDMI_CODEC_CHMAP_IDX_UNKNOWN)\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0058-FROMLIST-v1-media-meson-vdec-esparser-check-parsing-.patch",
    "content": "From 89e62d3e8515a1f51b415b255b7200bdf8f1209d Mon Sep 17 00:00:00 2001\nFrom: Neil Armstrong <narmstrong@baylibre.com>\nDate: Mon, 22 Nov 2021 09:15:21 +0000\nSubject: [PATCH 058/120] FROMLIST(v1): media: meson: vdec: esparser: check\n parsing state with hardware write pointer\n\nAlso check the hardware write pointer to check if ES Parser has stalled.\n\nSigned-off-by: Neil Armstrong <narmstrong@baylibre.com>\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n drivers/staging/media/meson/vdec/esparser.c | 15 +++++++++++----\n 1 file changed, 11 insertions(+), 4 deletions(-)\n\ndiff --git a/drivers/staging/media/meson/vdec/esparser.c b/drivers/staging/media/meson/vdec/esparser.c\nindex 7b15fc54efe4..1904d58875ad 100644\n--- a/drivers/staging/media/meson/vdec/esparser.c\n+++ b/drivers/staging/media/meson/vdec/esparser.c\n@@ -300,6 +300,7 @@ esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf)\n \tu32 num_dst_bufs = 0;\n \tu32 offset;\n \tu32 pad_size;\n+\tu32 wp, wp2;\n \n \t/*\n \t * When max ref frame is held by VP9, this should be -= 3 to prevent a\n@@ -353,15 +354,21 @@ esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf)\n \t}\n \n \tpad_size = esparser_pad_start_code(core, vb, payload_size);\n+\twp = amvdec_read_parser(core, PARSER_VIDEO_WP);\n \tret = esparser_write_data(core, phy, payload_size + pad_size);\n+\twp2 = amvdec_read_parser(core, PARSER_VIDEO_WP);\n \n \tif (ret <= 0) {\n-\t\tdev_warn(core->dev, \"esparser: input parsing error\\n\");\n-\t\tamvdec_remove_ts(sess, vb->timestamp);\n-\t\tv4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR);\n \t\tamvdec_write_parser(core, PARSER_FETCH_CMD, 0);\n \n-\t\treturn 0;\n+\t\tif (ret < 0 || wp2 == wp) {\n+\t\t\tdev_err(core->dev, \"esparser: input parsing error ret %d (%x <=> %x)\\n\",\n+\t\t\t\tret, wp, wp2);\n+\t\t\tamvdec_remove_ts(sess, vb->timestamp);\n+\t\t\tv4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR);\n+\n+\t\t\treturn 0;\n+\t\t}\n \t}\n \n \tatomic_inc(&sess->esparser_queued_bufs);\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0059-FROMLIST-v2-media-meson-vdec-implement-10bit-bitstre.patch",
    "content": "From 88671c6347d92c258d84e6448d2f0590ed8766d4 Mon Sep 17 00:00:00 2001\nFrom: Benjamin Roszak <benjamin545@gmail.com>\nDate: Mon, 23 Jan 2023 10:56:46 +0000\nSubject: [PATCH 059/120] FROMLIST(v2): media: meson: vdec: implement 10bit\n bitstream handling\n\nIn order to support 10bit bitstream decoding, buffers and MMU\nhandling must be cleaned up to support either downscale output\nfrom compressed 10bit decoding to uncompressed 8bit NV12 output\nor to compressed 10bit proprietary encoded frame format.\n\nFor that, \"am21c\" name is moved to \"amfbc\" to reflect the upstream\nAmlogic Compressed framebuffer modifier naming.\n\nCompressed frame buffers allocation is also cleaned up so it\ncan be shared with the HEVC decoder implementation.\n\nSigned-off-by: Benjamin Roszak <benjamin545@gmail.com>\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n drivers/staging/media/meson/vdec/codec_h264.c |   3 +-\n .../media/meson/vdec/codec_hevc_common.c      | 161 +++++++++++-------\n .../media/meson/vdec/codec_hevc_common.h      |   3 +-\n drivers/staging/media/meson/vdec/codec_vp9.c  |  35 ++--\n drivers/staging/media/meson/vdec/esparser.c   |   1 +\n drivers/staging/media/meson/vdec/vdec.h       |   1 +\n .../staging/media/meson/vdec/vdec_helpers.c   |  44 +++--\n .../staging/media/meson/vdec/vdec_helpers.h   |  10 +-\n 8 files changed, 161 insertions(+), 97 deletions(-)\n\ndiff --git a/drivers/staging/media/meson/vdec/codec_h264.c b/drivers/staging/media/meson/vdec/codec_h264.c\nindex c61128fc4bb9..d53c9a464bde 100644\n--- a/drivers/staging/media/meson/vdec/codec_h264.c\n+++ b/drivers/staging/media/meson/vdec/codec_h264.c\n@@ -353,7 +353,8 @@ static void codec_h264_src_change(struct amvdec_session *sess)\n \t\tframe_width, frame_height, crop_right, crop_bottom);\n \n \tcodec_h264_set_par(sess);\n-\tamvdec_src_change(sess, frame_width, frame_height, h264->max_refs + 5);\n+\tamvdec_src_change(sess, frame_width, frame_height,\n+\t\t\t  h264->max_refs + 5, 8);\n }\n \n /*\ndiff --git a/drivers/staging/media/meson/vdec/codec_hevc_common.c b/drivers/staging/media/meson/vdec/codec_hevc_common.c\nindex 0315cc0911cd..1c74b4837dcb 100644\n--- a/drivers/staging/media/meson/vdec/codec_hevc_common.c\n+++ b/drivers/staging/media/meson/vdec/codec_hevc_common.c\n@@ -30,8 +30,11 @@ const u16 vdec_hevc_parser_cmd[] = {\n void codec_hevc_setup_decode_head(struct amvdec_session *sess, int is_10bit)\n {\n \tstruct amvdec_core *core = sess->core;\n-\tu32 body_size = amvdec_am21c_body_size(sess->width, sess->height);\n-\tu32 head_size = amvdec_am21c_head_size(sess->width, sess->height);\n+\tu32 use_mmu = codec_hevc_use_mmu(core->platform->revision,\n+\t\t\t\t\t sess->pixfmt_cap, is_10bit);\n+\tu32 body_size = amvdec_amfbc_body_size(sess->width, sess->height,\n+\t\t\t\t\t       is_10bit, use_mmu);\n+\tu32 head_size = amvdec_amfbc_head_size(sess->width, sess->height);\n \n \tif (!codec_hevc_use_fbc(sess->pixfmt_cap, is_10bit)) {\n \t\t/* Enable 2-plane reference read mode */\n@@ -39,9 +42,17 @@ void codec_hevc_setup_decode_head(struct amvdec_session *sess, int is_10bit)\n \t\treturn;\n \t}\n \n+\t/* enable mem saving mode for 8-bit */\n+\tif (!is_10bit)\n+\t\tamvdec_write_dos_bits(core, HEVC_SAO_CTRL5, BIT(9));\n+\telse\n+\t\tamvdec_clear_dos_bits(core, HEVC_SAO_CTRL5, BIT(9));\n+\n \tif (codec_hevc_use_mmu(core->platform->revision,\n \t\t\t       sess->pixfmt_cap, is_10bit))\n \t\tamvdec_write_dos(core, HEVCD_MPP_DECOMP_CTL1, BIT(4));\n+\telse if (!is_10bit)\n+\t\tamvdec_write_dos(core, HEVCD_MPP_DECOMP_CTL1, BIT(3));\n \telse\n \t\tamvdec_write_dos(core, HEVCD_MPP_DECOMP_CTL1, 0);\n \n@@ -73,7 +84,7 @@ static void codec_hevc_setup_buffers_gxbb(struct amvdec_session *sess,\n \n \t\tidx = vb->index;\n \n-\t\tif (codec_hevc_use_downsample(sess->pixfmt_cap, is_10bit))\n+\t\tif (codec_hevc_use_fbc(sess->pixfmt_cap, is_10bit))\n \t\t\tbuf_y_paddr = comm->fbc_buffer_paddr[idx];\n \t\telse\n \t\t\tbuf_y_paddr = vb2_dma_contig_plane_dma_addr(vb, 0);\n@@ -114,8 +125,8 @@ static void codec_hevc_setup_buffers_gxl(struct amvdec_session *sess,\n {\n \tstruct amvdec_core *core = sess->core;\n \tstruct v4l2_m2m_buffer *buf;\n-\tu32 revision = core->platform->revision;\n \tu32 pixfmt_cap = sess->pixfmt_cap;\n+\tconst u32 revision = core->platform->revision;\n \tint i;\n \n \tamvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_CONF_ADDR,\n@@ -127,12 +138,14 @@ static void codec_hevc_setup_buffers_gxl(struct amvdec_session *sess,\n \t\tdma_addr_t buf_uv_paddr = 0;\n \t\tu32 idx = vb->index;\n \n-\t\tif (codec_hevc_use_mmu(revision, pixfmt_cap, is_10bit))\n-\t\t\tbuf_y_paddr = comm->mmu_header_paddr[idx];\n-\t\telse if (codec_hevc_use_downsample(pixfmt_cap, is_10bit))\n-\t\t\tbuf_y_paddr = comm->fbc_buffer_paddr[idx];\n-\t\telse\n+\t\tif (codec_hevc_use_downsample(pixfmt_cap, is_10bit)) {\n+\t\t\tif (codec_hevc_use_mmu(revision, pixfmt_cap, is_10bit))\n+\t\t\t\tbuf_y_paddr = comm->mmu_header_paddr[idx];\n+\t\t\telse\n+\t\t\t\tbuf_y_paddr = comm->fbc_buffer_paddr[idx];\n+\t\t} else {\n \t\t\tbuf_y_paddr = vb2_dma_contig_plane_dma_addr(vb, 0);\n+\t\t}\n \n \t\tamvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_DATA,\n \t\t\t\t buf_y_paddr >> 5);\n@@ -150,60 +163,67 @@ static void codec_hevc_setup_buffers_gxl(struct amvdec_session *sess,\n \t\tamvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_DATA_ADDR, 0);\n }\n \n-void codec_hevc_free_fbc_buffers(struct amvdec_session *sess,\n+void codec_hevc_free_mmu_headers(struct amvdec_session *sess,\n \t\t\t\t struct codec_hevc_common *comm)\n {\n \tstruct device *dev = sess->core->dev;\n-\tu32 am21_size = amvdec_am21c_size(sess->width, sess->height);\n \tint i;\n \n \tfor (i = 0; i < MAX_REF_PIC_NUM; ++i) {\n-\t\tif (comm->fbc_buffer_vaddr[i]) {\n-\t\t\tdma_free_coherent(dev, am21_size,\n-\t\t\t\t\t  comm->fbc_buffer_vaddr[i],\n-\t\t\t\t\t  comm->fbc_buffer_paddr[i]);\n-\t\t\tcomm->fbc_buffer_vaddr[i] = NULL;\n+\t\tif (comm->mmu_header_vaddr[i]) {\n+\t\t\tdma_free_coherent(dev, MMU_COMPRESS_HEADER_SIZE,\n+\t\t\t\t\t  comm->mmu_header_vaddr[i],\n+\t\t\t\t\t  comm->mmu_header_paddr[i]);\n+\t\t\tcomm->mmu_header_vaddr[i] = NULL;\n \t\t}\n \t}\n }\n-EXPORT_SYMBOL_GPL(codec_hevc_free_fbc_buffers);\n+EXPORT_SYMBOL_GPL(codec_hevc_free_mmu_headers);\n \n-static int codec_hevc_alloc_fbc_buffers(struct amvdec_session *sess,\n+static int codec_hevc_alloc_mmu_headers(struct amvdec_session *sess,\n \t\t\t\t\tstruct codec_hevc_common *comm)\n {\n \tstruct device *dev = sess->core->dev;\n \tstruct v4l2_m2m_buffer *buf;\n-\tu32 am21_size = amvdec_am21c_size(sess->width, sess->height);\n \n \tv4l2_m2m_for_each_dst_buf(sess->m2m_ctx, buf) {\n \t\tu32 idx = buf->vb.vb2_buf.index;\n \t\tdma_addr_t paddr;\n-\t\tvoid *vaddr = dma_alloc_coherent(dev, am21_size, &paddr,\n-\t\t\t\t\t\t GFP_KERNEL);\n+\t\tvoid *vaddr = dma_alloc_coherent(dev, MMU_COMPRESS_HEADER_SIZE,\n+\t\t\t\t\t\t &paddr, GFP_KERNEL);\n \t\tif (!vaddr) {\n-\t\t\tcodec_hevc_free_fbc_buffers(sess, comm);\n+\t\t\tcodec_hevc_free_mmu_headers(sess, comm);\n \t\t\treturn -ENOMEM;\n \t\t}\n \n-\t\tcomm->fbc_buffer_vaddr[idx] = vaddr;\n-\t\tcomm->fbc_buffer_paddr[idx] = paddr;\n+\t\tcomm->mmu_header_vaddr[idx] = vaddr;\n+\t\tcomm->mmu_header_paddr[idx] = paddr;\n \t}\n \n \treturn 0;\n }\n \n-void codec_hevc_free_mmu_headers(struct amvdec_session *sess,\n+void codec_hevc_free_fbc_buffers(struct amvdec_session *sess,\n \t\t\t\t struct codec_hevc_common *comm)\n {\n \tstruct device *dev = sess->core->dev;\n+\tu32 use_mmu;\n+\tu32 am21_size;\n \tint i;\n \n+\tuse_mmu = codec_hevc_use_mmu(sess->core->platform->revision,\n+\t\t\t\t     sess->pixfmt_cap,\n+\t\t\t\tsess->bitdepth == 10 ? 1 : 0);\n+\n+\tam21_size = amvdec_amfbc_size(sess->width, sess->height,\n+\t\t\t\t      sess->bitdepth == 10 ? 1 : 0, use_mmu);\n+\n \tfor (i = 0; i < MAX_REF_PIC_NUM; ++i) {\n-\t\tif (comm->mmu_header_vaddr[i]) {\n-\t\t\tdma_free_coherent(dev, MMU_COMPRESS_HEADER_SIZE,\n-\t\t\t\t\t  comm->mmu_header_vaddr[i],\n-\t\t\t\t\t  comm->mmu_header_paddr[i]);\n-\t\t\tcomm->mmu_header_vaddr[i] = NULL;\n+\t\tif (comm->fbc_buffer_vaddr[i]) {\n+\t\t\tdma_free_coherent(dev, am21_size,\n+\t\t\t\t\t  comm->fbc_buffer_vaddr[i],\n+\t\t\t\t\t  comm->fbc_buffer_paddr[i]);\n+\t\t\tcomm->fbc_buffer_vaddr[i] = NULL;\n \t\t}\n \t}\n \n@@ -213,33 +233,50 @@ void codec_hevc_free_mmu_headers(struct amvdec_session *sess,\n \t\t\t\t  comm->mmu_map_paddr);\n \t\tcomm->mmu_map_vaddr = NULL;\n \t}\n+\n+\tcodec_hevc_free_mmu_headers(sess, comm);\n }\n-EXPORT_SYMBOL_GPL(codec_hevc_free_mmu_headers);\n+EXPORT_SYMBOL_GPL(codec_hevc_free_fbc_buffers);\n \n-static int codec_hevc_alloc_mmu_headers(struct amvdec_session *sess,\n+static int codec_hevc_alloc_fbc_buffers(struct amvdec_session *sess,\n \t\t\t\t\tstruct codec_hevc_common *comm)\n {\n \tstruct device *dev = sess->core->dev;\n \tstruct v4l2_m2m_buffer *buf;\n+\tu32 use_mmu;\n+\tu32 am21_size;\n+\tconst u32 revision = sess->core->platform->revision;\n+\tconst u32 is_10bit = sess->bitdepth == 10 ? 1 : 0;\n+\tint ret;\n \n-\tcomm->mmu_map_vaddr = dma_alloc_coherent(dev, MMU_MAP_SIZE,\n-\t\t\t\t\t\t &comm->mmu_map_paddr,\n-\t\t\t\t\t\t GFP_KERNEL);\n-\tif (!comm->mmu_map_vaddr)\n-\t\treturn -ENOMEM;\n+\tuse_mmu = codec_hevc_use_mmu(revision, sess->pixfmt_cap,\n+\t\t\t\t     is_10bit);\n+\n+\tam21_size = amvdec_amfbc_size(sess->width, sess->height,\n+\t\t\t\t      is_10bit, use_mmu);\n \n \tv4l2_m2m_for_each_dst_buf(sess->m2m_ctx, buf) {\n \t\tu32 idx = buf->vb.vb2_buf.index;\n \t\tdma_addr_t paddr;\n-\t\tvoid *vaddr = dma_alloc_coherent(dev, MMU_COMPRESS_HEADER_SIZE,\n-\t\t\t\t\t\t &paddr, GFP_KERNEL);\n+\n+\t\tvoid *vaddr = dma_alloc_coherent(dev, am21_size, &paddr,\n+\t\t\t\t\t\t GFP_KERNEL);\n \t\tif (!vaddr) {\n-\t\t\tcodec_hevc_free_mmu_headers(sess, comm);\n+\t\t\tcodec_hevc_free_fbc_buffers(sess, comm);\n \t\t\treturn -ENOMEM;\n \t\t}\n \n-\t\tcomm->mmu_header_vaddr[idx] = vaddr;\n-\t\tcomm->mmu_header_paddr[idx] = paddr;\n+\t\tcomm->fbc_buffer_vaddr[idx] = vaddr;\n+\t\tcomm->fbc_buffer_paddr[idx] = paddr;\n+\t}\n+\n+\tif (codec_hevc_use_mmu(revision, sess->pixfmt_cap, is_10bit) &&\n+\t    codec_hevc_use_downsample(sess->pixfmt_cap, is_10bit)) {\n+\t\tret = codec_hevc_alloc_mmu_headers(sess, comm);\n+\t\tif (ret) {\n+\t\t\tcodec_hevc_free_fbc_buffers(sess, comm);\n+\t\t\treturn ret;\n+\t\t}\n \t}\n \n \treturn 0;\n@@ -250,21 +287,24 @@ int codec_hevc_setup_buffers(struct amvdec_session *sess,\n \t\t\t     int is_10bit)\n {\n \tstruct amvdec_core *core = sess->core;\n+\tstruct device *dev = core->dev;\n \tint ret;\n \n-\tif (codec_hevc_use_downsample(sess->pixfmt_cap, is_10bit)) {\n-\t\tret = codec_hevc_alloc_fbc_buffers(sess, comm);\n-\t\tif (ret)\n-\t\t\treturn ret;\n+\tif (codec_hevc_use_mmu(core->platform->revision,\n+\t\t\t       sess->pixfmt_cap, is_10bit)) {\n+\t\tcomm->mmu_map_vaddr = dma_alloc_coherent(dev, MMU_MAP_SIZE,\n+\t\t\t\t\t\t\t &comm->mmu_map_paddr,\n+\t\t\t\t\t\t\t GFP_KERNEL);\n+\t\tif (!comm->mmu_map_vaddr)\n+\t\t\treturn -ENOMEM;\n \t}\n \n \tif (codec_hevc_use_mmu(core->platform->revision,\n-\t\t\t       sess->pixfmt_cap, is_10bit)) {\n-\t\tret = codec_hevc_alloc_mmu_headers(sess, comm);\n-\t\tif (ret) {\n-\t\t\tcodec_hevc_free_fbc_buffers(sess, comm);\n+\t\t\t       sess->pixfmt_cap, is_10bit) ||\n+\t    codec_hevc_use_downsample(sess->pixfmt_cap, is_10bit)) {\n+\t\tret = codec_hevc_alloc_fbc_buffers(sess, comm);\n+\t\tif (ret)\n \t\t\treturn ret;\n-\t\t}\n \t}\n \n \tif (core->platform->revision == VDEC_REVISION_GXBB)\n@@ -278,19 +318,24 @@ EXPORT_SYMBOL_GPL(codec_hevc_setup_buffers);\n \n void codec_hevc_fill_mmu_map(struct amvdec_session *sess,\n \t\t\t     struct codec_hevc_common *comm,\n-\t\t\t     struct vb2_buffer *vb)\n+\t\t\t     struct vb2_buffer *vb,\n+\t\t\t     u32 is_10bit)\n {\n-\tu32 size = amvdec_am21c_size(sess->width, sess->height);\n-\tu32 nb_pages = size / PAGE_SIZE;\n+\tu32 use_mmu;\n+\tu32 size;\n+\tu32 nb_pages;\n \tu32 *mmu_map = comm->mmu_map_vaddr;\n \tu32 first_page;\n \tu32 i;\n \n-\tif (sess->pixfmt_cap == V4L2_PIX_FMT_NV12M)\n-\t\tfirst_page = comm->fbc_buffer_paddr[vb->index] >> PAGE_SHIFT;\n-\telse\n-\t\tfirst_page = vb2_dma_contig_plane_dma_addr(vb, 0) >> PAGE_SHIFT;\n+\tuse_mmu = codec_hevc_use_mmu(sess->core->platform->revision,\n+\t\t\t\t     sess->pixfmt_cap, is_10bit);\n+\n+\tsize = amvdec_amfbc_size(sess->width, sess->height, is_10bit,\n+\t\t\t\t use_mmu);\n \n+\tnb_pages = size / PAGE_SIZE;\n+\tfirst_page = comm->fbc_buffer_paddr[vb->index] >> PAGE_SHIFT;\n \tfor (i = 0; i < nb_pages; ++i)\n \t\tmmu_map[i] = first_page + i;\n }\ndiff --git a/drivers/staging/media/meson/vdec/codec_hevc_common.h b/drivers/staging/media/meson/vdec/codec_hevc_common.h\nindex cf072b8a9da2..13f9f1d90a94 100644\n--- a/drivers/staging/media/meson/vdec/codec_hevc_common.h\n+++ b/drivers/staging/media/meson/vdec/codec_hevc_common.h\n@@ -64,6 +64,7 @@ int codec_hevc_setup_buffers(struct amvdec_session *sess,\n \n void codec_hevc_fill_mmu_map(struct amvdec_session *sess,\n \t\t\t     struct codec_hevc_common *comm,\n-\t\t\t     struct vb2_buffer *vb);\n+\t\t\t     struct vb2_buffer *vb,\n+\t\t\t     u32 is_10bit);\n \n #endif\ndiff --git a/drivers/staging/media/meson/vdec/codec_vp9.c b/drivers/staging/media/meson/vdec/codec_vp9.c\nindex 897f5d7a6aad..33b758cded77 100644\n--- a/drivers/staging/media/meson/vdec/codec_vp9.c\n+++ b/drivers/staging/media/meson/vdec/codec_vp9.c\n@@ -458,12 +458,6 @@ struct codec_vp9 {\n \tstruct list_head ref_frames_list;\n \tu32 frames_num;\n \n-\t/* In case of downsampling (decoding with FBC but outputting in NV12M),\n-\t * we need to allocate additional buffers for FBC.\n-\t */\n-\tvoid      *fbc_buffer_vaddr[MAX_REF_PIC_NUM];\n-\tdma_addr_t fbc_buffer_paddr[MAX_REF_PIC_NUM];\n-\n \tint ref_frame_map[REF_FRAMES];\n \tint next_ref_frame_map[REF_FRAMES];\n \tstruct vp9_frame *frame_refs[REFS_PER_FRAME];\n@@ -901,11 +895,8 @@ static void codec_vp9_set_sao(struct amvdec_session *sess,\n \t\tbuf_y_paddr =\n \t\t       vb2_dma_contig_plane_dma_addr(vb, 0);\n \n-\tif (codec_hevc_use_fbc(sess->pixfmt_cap, vp9->is_10bit)) {\n-\t\tval = amvdec_read_dos(core, HEVC_SAO_CTRL5) & ~0xff0200;\n-\t\tamvdec_write_dos(core, HEVC_SAO_CTRL5, val);\n+\tif (codec_hevc_use_fbc(sess->pixfmt_cap, vp9->is_10bit))\n \t\tamvdec_write_dos(core, HEVC_CM_BODY_START_ADDR, buf_y_paddr);\n-\t}\n \n \tif (sess->pixfmt_cap == V4L2_PIX_FMT_NV12M) {\n \t\tbuf_y_paddr =\n@@ -920,8 +911,13 @@ static void codec_vp9_set_sao(struct amvdec_session *sess,\n \n \tif (codec_hevc_use_mmu(core->platform->revision, sess->pixfmt_cap,\n \t\t\t       vp9->is_10bit)) {\n-\t\tamvdec_write_dos(core, HEVC_CM_HEADER_START_ADDR,\n-\t\t\t\t vp9->common.mmu_header_paddr[vb->index]);\n+\t\tdma_addr_t header_adr;\n+\n+\t\tif (codec_hevc_use_downsample(sess->pixfmt_cap, vp9->is_10bit))\n+\t\t\theader_adr = vp9->common.mmu_header_paddr[vb->index];\n+\t\telse\n+\t\t\theader_adr = vb2_dma_contig_plane_dma_addr(vb, 0);\n+\t\tamvdec_write_dos(core, HEVC_CM_HEADER_START_ADDR, header_adr);\n \t\t/* use HEVC_CM_HEADER_START_ADDR */\n \t\tamvdec_write_dos_bits(core, HEVC_SAO_CTRL5, BIT(10));\n \t}\n@@ -1148,9 +1144,13 @@ static void codec_vp9_set_mc(struct amvdec_session *sess,\n {\n \tstruct amvdec_core *core = sess->core;\n \tu32 scale = 0;\n+\tu32 use_mmu;\n \tu32 sz;\n \tint i;\n \n+\tuse_mmu = codec_hevc_use_mmu(core->platform->revision,\n+\t\t\t\t     sess->pixfmt_cap, vp9->is_10bit);\n+\n \tamvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_ACCCONFIG_ADDR, 1);\n \tcodec_vp9_set_refs(sess, vp9);\n \tamvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_ACCCONFIG_ADDR,\n@@ -1166,8 +1166,9 @@ static void codec_vp9_set_mc(struct amvdec_session *sess,\n \t\t    vp9->frame_refs[i]->height != vp9->height)\n \t\t\tscale = 1;\n \n-\t\tsz = amvdec_am21c_body_size(vp9->frame_refs[i]->width,\n-\t\t\t\t\t    vp9->frame_refs[i]->height);\n+\t\tsz = amvdec_amfbc_body_size(vp9->frame_refs[i]->width,\n+\t\t\t\t\t    vp9->frame_refs[i]->height,\n+\t\t\t\t\t    vp9->is_10bit, use_mmu);\n \n \t\tamvdec_write_dos(core, VP9D_MPP_REFINFO_DATA,\n \t\t\t\t vp9->frame_refs[i]->width);\n@@ -1283,7 +1284,8 @@ static void codec_vp9_process_frame(struct amvdec_session *sess)\n \tif (codec_hevc_use_mmu(core->platform->revision, sess->pixfmt_cap,\n \t\t\t       vp9->is_10bit))\n \t\tcodec_hevc_fill_mmu_map(sess, &vp9->common,\n-\t\t\t\t\t&vp9->cur_frame->vbuf->vb2_buf);\n+\t\t\t\t\t&vp9->cur_frame->vbuf->vb2_buf,\n+\t\t\t\t\tvp9->is_10bit);\n \n \tintra_only = param->p.show_frame ? 0 : param->p.intra_only;\n \n@@ -2132,7 +2134,8 @@ static irqreturn_t codec_vp9_threaded_isr(struct amvdec_session *sess)\n \n \tcodec_vp9_fetch_rpm(sess);\n \tif (codec_vp9_process_rpm(vp9)) {\n-\t\tamvdec_src_change(sess, vp9->width, vp9->height, 16);\n+\t\tamvdec_src_change(sess, vp9->width, vp9->height, 16,\n+\t\t\t\t  vp9->is_10bit ? 10 : 8);\n \n \t\t/* No frame is actually processed */\n \t\tvp9->cur_frame = NULL;\ndiff --git a/drivers/staging/media/meson/vdec/esparser.c b/drivers/staging/media/meson/vdec/esparser.c\nindex 1904d58875ad..3cd29ab4f979 100644\n--- a/drivers/staging/media/meson/vdec/esparser.c\n+++ b/drivers/staging/media/meson/vdec/esparser.c\n@@ -320,6 +320,7 @@ esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf)\n \t\tif (esparser_vififo_get_free_space(sess) < payload_size ||\n \t\t    atomic_read(&sess->esparser_queued_bufs) >= num_dst_bufs)\n \t\t\treturn -EAGAIN;\n+\n \t} else if (esparser_vififo_get_free_space(sess) < payload_size) {\n \t\treturn -EAGAIN;\n \t}\ndiff --git a/drivers/staging/media/meson/vdec/vdec.h b/drivers/staging/media/meson/vdec/vdec.h\nindex 0906b8fb5cc6..a48170fe4cff 100644\n--- a/drivers/staging/media/meson/vdec/vdec.h\n+++ b/drivers/staging/media/meson/vdec/vdec.h\n@@ -244,6 +244,7 @@ struct amvdec_session {\n \tu32 width;\n \tu32 height;\n \tu32 colorspace;\n+\tu32 bitdepth;\n \tu8 ycbcr_enc;\n \tu8 quantization;\n \tu8 xfer_func;\ndiff --git a/drivers/staging/media/meson/vdec/vdec_helpers.c b/drivers/staging/media/meson/vdec/vdec_helpers.c\nindex 7d2a75653250..fef76142f0c5 100644\n--- a/drivers/staging/media/meson/vdec/vdec_helpers.c\n+++ b/drivers/staging/media/meson/vdec/vdec_helpers.c\n@@ -50,32 +50,40 @@ void amvdec_write_parser(struct amvdec_core *core, u32 reg, u32 val)\n }\n EXPORT_SYMBOL_GPL(amvdec_write_parser);\n \n-/* 4 KiB per 64x32 block */\n-u32 amvdec_am21c_body_size(u32 width, u32 height)\n+/* AMFBC body is made out of 64x32 blocks with varying block size */\n+u32 amvdec_amfbc_body_size(u32 width, u32 height, u32 is_10bit, u32 use_mmu)\n {\n \tu32 width_64 = ALIGN(width, 64) / 64;\n \tu32 height_32 = ALIGN(height, 32) / 32;\n+\tu32 blk_size = 4096;\n \n-\treturn SZ_4K * width_64 * height_32;\n+\tif (!is_10bit) {\n+\t\tif (use_mmu)\n+\t\t\tblk_size = 3200;\n+\t\telse\n+\t\t\tblk_size = 3072;\n+\t}\n+\n+\treturn blk_size * width_64 * height_32;\n }\n-EXPORT_SYMBOL_GPL(amvdec_am21c_body_size);\n+EXPORT_SYMBOL_GPL(amvdec_amfbc_body_size);\n \n /* 32 bytes per 128x64 block */\n-u32 amvdec_am21c_head_size(u32 width, u32 height)\n+u32 amvdec_amfbc_head_size(u32 width, u32 height)\n {\n \tu32 width_128 = ALIGN(width, 128) / 128;\n \tu32 height_64 = ALIGN(height, 64) / 64;\n \n \treturn 32 * width_128 * height_64;\n }\n-EXPORT_SYMBOL_GPL(amvdec_am21c_head_size);\n+EXPORT_SYMBOL_GPL(amvdec_amfbc_head_size);\n \n-u32 amvdec_am21c_size(u32 width, u32 height)\n+u32 amvdec_amfbc_size(u32 width, u32 height, u32 is_10bit, u32 use_mmu)\n {\n-\treturn ALIGN(amvdec_am21c_body_size(width, height) +\n-\t\t     amvdec_am21c_head_size(width, height), SZ_64K);\n+\treturn ALIGN(amvdec_amfbc_body_size(width, height, is_10bit, use_mmu) +\n+\t\t     amvdec_amfbc_head_size(width, height), SZ_64K);\n }\n-EXPORT_SYMBOL_GPL(amvdec_am21c_size);\n+EXPORT_SYMBOL_GPL(amvdec_amfbc_size);\n \n static int canvas_alloc(struct amvdec_session *sess, u8 *canvas_id)\n {\n@@ -440,7 +448,7 @@ void amvdec_set_par_from_dar(struct amvdec_session *sess,\n EXPORT_SYMBOL_GPL(amvdec_set_par_from_dar);\n \n void amvdec_src_change(struct amvdec_session *sess, u32 width,\n-\t\t       u32 height, u32 dpb_size)\n+\t\t       u32 height, u32 dpb_size, u32 bitdepth)\n {\n \tstatic const struct v4l2_event ev = {\n \t\t.type = V4L2_EVENT_SOURCE_CHANGE,\n@@ -448,25 +456,27 @@ void amvdec_src_change(struct amvdec_session *sess, u32 width,\n \n \tv4l2_ctrl_s_ctrl(sess->ctrl_min_buf_capture, dpb_size);\n \n+\tsess->bitdepth = bitdepth;\n+\n \t/*\n \t * Check if the capture queue is already configured well for our\n-\t * usecase. If so, keep decoding with it and do not send the event\n+\t * usecase. If so, keep decoding with it.\n \t */\n \tif (sess->streamon_cap &&\n \t    sess->width == width &&\n \t    sess->height == height &&\n \t    dpb_size <= sess->num_dst_bufs) {\n \t\tsess->fmt_out->codec_ops->resume(sess);\n-\t\treturn;\n+\t} else {\n+\t\tsess->status = STATUS_NEEDS_RESUME;\n+\t\tsess->changed_format = 0;\n \t}\n \n-\tsess->changed_format = 0;\n \tsess->width = width;\n \tsess->height = height;\n-\tsess->status = STATUS_NEEDS_RESUME;\n \n-\tdev_dbg(sess->core->dev, \"Res. changed (%ux%u), DPB size %u\\n\",\n-\t\twidth, height, dpb_size);\n+\tdev_dbg(sess->core->dev, \"Res. changed (%ux%u), DPB %u, bitdepth %u\\n\",\n+\t\twidth, height, dpb_size, bitdepth);\n \tv4l2_event_queue_fh(&sess->fh, &ev);\n }\n EXPORT_SYMBOL_GPL(amvdec_src_change);\ndiff --git a/drivers/staging/media/meson/vdec/vdec_helpers.h b/drivers/staging/media/meson/vdec/vdec_helpers.h\nindex 4bf3e61d081b..1a711679d26a 100644\n--- a/drivers/staging/media/meson/vdec/vdec_helpers.h\n+++ b/drivers/staging/media/meson/vdec/vdec_helpers.h\n@@ -27,9 +27,10 @@ void amvdec_clear_dos_bits(struct amvdec_core *core, u32 reg, u32 val);\n u32 amvdec_read_parser(struct amvdec_core *core, u32 reg);\n void amvdec_write_parser(struct amvdec_core *core, u32 reg, u32 val);\n \n-u32 amvdec_am21c_body_size(u32 width, u32 height);\n-u32 amvdec_am21c_head_size(u32 width, u32 height);\n-u32 amvdec_am21c_size(u32 width, u32 height);\n+/* Helpers for the Amlogic compressed framebuffer format */\n+u32 amvdec_amfbc_body_size(u32 width, u32 height, u32 is_10bit, u32 use_mmu);\n+u32 amvdec_amfbc_head_size(u32 width, u32 height);\n+u32 amvdec_amfbc_size(u32 width, u32 height, u32 is_10bit, u32 use_mmu);\n \n /**\n  * amvdec_dst_buf_done_idx() - Signal that a buffer is done decoding\n@@ -77,9 +78,10 @@ void amvdec_set_par_from_dar(struct amvdec_session *sess,\n  * @width: picture width detected by the hardware\n  * @height: picture height detected by the hardware\n  * @dpb_size: Decoded Picture Buffer size (= amount of buffers for decoding)\n+ * @bitdepth: Bit depth (usually 10 or 8) of the coded content\n  */\n void amvdec_src_change(struct amvdec_session *sess, u32 width,\n-\t\t       u32 height, u32 dpb_size);\n+\t\t       u32 height, u32 dpb_size, u32 bitdepth);\n \n /**\n  * amvdec_abort() - Abort the current decoding session\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0060-FROMLIST-v2-media-meson-vdec-add-HEVC-decode-codec.patch",
    "content": "From bc74e7054ac07e488d17c25f7c30660fcff5fb4d Mon Sep 17 00:00:00 2001\nFrom: Maxime Jourdan <mjourdan@baylibre.com>\nDate: Mon, 23 Jan 2023 11:07:04 +0000\nSubject: [PATCH 060/120] FROMLIST(v2): media: meson: vdec: add HEVC decode\n codec\n\nAdd initial HEVC codec for the Amlogic GXBB/GXL/GXM SoCs using\nthe common \"HEVC\" decoder driver.\n\nSigned-off-by: Maxime Jourdan <mjourdan@baylibre.com>\n[codec alignment to upstream changes and frame handling improvements]\nSigned-off-by: Benjamin Roszak <benjamin545@gmail.com>\n---\n drivers/staging/media/meson/vdec/Makefile     |    2 +-\n drivers/staging/media/meson/vdec/codec_hevc.c | 1462 +++++++++++++++++\n drivers/staging/media/meson/vdec/codec_hevc.h |   13 +\n drivers/staging/media/meson/vdec/esparser.c   |    3 +-\n drivers/staging/media/meson/vdec/hevc_regs.h  |    1 +\n .../staging/media/meson/vdec/vdec_platform.c  |   37 +\n 6 files changed, 1516 insertions(+), 2 deletions(-)\n create mode 100644 drivers/staging/media/meson/vdec/codec_hevc.c\n create mode 100644 drivers/staging/media/meson/vdec/codec_hevc.h\n\ndiff --git a/drivers/staging/media/meson/vdec/Makefile b/drivers/staging/media/meson/vdec/Makefile\nindex 6e726af84ac9..16f848e456b9 100644\n--- a/drivers/staging/media/meson/vdec/Makefile\n+++ b/drivers/staging/media/meson/vdec/Makefile\n@@ -3,6 +3,6 @@\n \n meson-vdec-objs = esparser.o vdec.o vdec_helpers.o vdec_platform.o\n meson-vdec-objs += vdec_1.o vdec_hevc.o\n-meson-vdec-objs += codec_mpeg12.o codec_h264.o codec_hevc_common.o codec_vp9.o\n+meson-vdec-objs += codec_mpeg12.o codec_h264.o codec_hevc_common.o codec_vp9.o codec_hevc.o\n \n obj-$(CONFIG_VIDEO_MESON_VDEC) += meson-vdec.o\ndiff --git a/drivers/staging/media/meson/vdec/codec_hevc.c b/drivers/staging/media/meson/vdec/codec_hevc.c\nnew file mode 100644\nindex 000000000000..fcaaa1ad50b8\n--- /dev/null\n+++ b/drivers/staging/media/meson/vdec/codec_hevc.c\n@@ -0,0 +1,1462 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+/*\n+ * Copyright (C) 2018 Maxime Jourdan <mjourdan@baylibre.com>\n+ * Copyright (C) 2015 Amlogic, Inc. All rights reserved.\n+ */\n+\n+#include <media/v4l2-mem2mem.h>\n+#include <media/videobuf2-dma-contig.h>\n+\n+#include \"codec_hevc.h\"\n+#include \"dos_regs.h\"\n+#include \"hevc_regs.h\"\n+#include \"vdec_helpers.h\"\n+#include \"codec_hevc_common.h\"\n+\n+/* HEVC reg mapping */\n+#define HEVC_DEC_STATUS_REG\tHEVC_ASSIST_SCRATCH_0\n+\t#define HEVC_ACTION_DONE\t0xff\n+#define HEVC_RPM_BUFFER\t\tHEVC_ASSIST_SCRATCH_1\n+#define HEVC_SHORT_TERM_RPS\tHEVC_ASSIST_SCRATCH_2\n+#define HEVC_VPS_BUFFER\t\tHEVC_ASSIST_SCRATCH_3\n+#define HEVC_SPS_BUFFER\t\tHEVC_ASSIST_SCRATCH_4\n+#define HEVC_PPS_BUFFER\t\tHEVC_ASSIST_SCRATCH_5\n+#define HEVC_SAO_UP\t\tHEVC_ASSIST_SCRATCH_6\n+#define HEVC_STREAM_SWAP_BUFFER HEVC_ASSIST_SCRATCH_7\n+#define H265_MMU_MAP_BUFFER\tHEVC_ASSIST_SCRATCH_7\n+#define HEVC_STREAM_SWAP_BUFFER2 HEVC_ASSIST_SCRATCH_8\n+#define HEVC_sao_mem_unit\tHEVC_ASSIST_SCRATCH_9\n+#define HEVC_SAO_ABV\t\tHEVC_ASSIST_SCRATCH_A\n+#define HEVC_sao_vb_size\tHEVC_ASSIST_SCRATCH_B\n+#define HEVC_SAO_VB\t\tHEVC_ASSIST_SCRATCH_C\n+#define HEVC_SCALELUT\t\tHEVC_ASSIST_SCRATCH_D\n+#define HEVC_WAIT_FLAG\t\tHEVC_ASSIST_SCRATCH_E\n+#define RPM_CMD_REG\t\tHEVC_ASSIST_SCRATCH_F\n+#define LMEM_DUMP_ADR\t\tHEVC_ASSIST_SCRATCH_F\n+#define DEBUG_REG1\t\tHEVC_ASSIST_SCRATCH_G\n+#define HEVC_DECODE_MODE2\tHEVC_ASSIST_SCRATCH_H\n+#define NAL_SEARCH_CTL\t\tHEVC_ASSIST_SCRATCH_I\n+#define HEVC_DECODE_MODE\tHEVC_ASSIST_SCRATCH_J\n+\t#define DECODE_MODE_SINGLE 0\n+#define DECODE_STOP_POS\t\tHEVC_ASSIST_SCRATCH_K\n+#define HEVC_AUX_ADR\t\tHEVC_ASSIST_SCRATCH_L\n+#define HEVC_AUX_DATA_SIZE\tHEVC_ASSIST_SCRATCH_M\n+#define HEVC_DECODE_SIZE\tHEVC_ASSIST_SCRATCH_N\n+\n+#define AMRISC_MAIN_REQ\t\t 0x04\n+\n+/* HEVC Constants */\n+#define MAX_REF_PIC_NUM\t\t24\n+#define MAX_REF_ACTIVE\t\t16\n+#define MAX_TILE_COL_NUM\t10\n+#define MAX_TILE_ROW_NUM\t20\n+#define MAX_SLICE_NUM\t\t800\n+#define INVALID_POC\t\t0x80000000\n+\n+/* HEVC Workspace layout */\n+#define MPRED_MV_BUF_SIZE 0x120000\n+\n+#define IPP_SIZE\t0x4000\n+#define SAO_ABV_SIZE\t0x30000\n+#define SAO_VB_SIZE\t0x30000\n+#define SH_TM_RPS_SIZE\t0x800\n+#define VPS_SIZE\t0x800\n+#define SPS_SIZE\t0x800\n+#define PPS_SIZE\t0x2000\n+#define SAO_UP_SIZE\t0x2800\n+#define SWAP_BUF_SIZE\t0x800\n+#define SWAP_BUF2_SIZE\t0x800\n+#define SCALELUT_SIZE\t0x8000\n+#define DBLK_PARA_SIZE\t0x20000\n+#define DBLK_DATA_SIZE\t0x80000\n+#define DBLK_DATA2_SIZE\t0x80000\n+#define MMU_VBH_SIZE\t0x5000\n+#define MPRED_ABV_SIZE\t0x8000\n+#define MPRED_MV_SIZE\t(MPRED_MV_BUF_SIZE * MAX_REF_PIC_NUM)\n+#define RPM_BUF_SIZE\t0x100\n+#define LMEM_SIZE\t0xA00\n+\n+#define IPP_OFFSET       0x00\n+#define SAO_ABV_OFFSET   (IPP_OFFSET + IPP_SIZE)\n+#define SAO_VB_OFFSET    (SAO_ABV_OFFSET + SAO_ABV_SIZE)\n+#define SH_TM_RPS_OFFSET (SAO_VB_OFFSET + SAO_VB_SIZE)\n+#define VPS_OFFSET       (SH_TM_RPS_OFFSET + SH_TM_RPS_SIZE)\n+#define SPS_OFFSET       (VPS_OFFSET + VPS_SIZE)\n+#define PPS_OFFSET       (SPS_OFFSET + SPS_SIZE)\n+#define SAO_UP_OFFSET    (PPS_OFFSET + PPS_SIZE)\n+#define SWAP_BUF_OFFSET  (SAO_UP_OFFSET + SAO_UP_SIZE)\n+#define SWAP_BUF2_OFFSET (SWAP_BUF_OFFSET + SWAP_BUF_SIZE)\n+#define SCALELUT_OFFSET  (SWAP_BUF2_OFFSET + SWAP_BUF2_SIZE)\n+#define DBLK_PARA_OFFSET (SCALELUT_OFFSET + SCALELUT_SIZE)\n+#define DBLK_DATA_OFFSET (DBLK_PARA_OFFSET + DBLK_PARA_SIZE)\n+#define DBLK_DATA2_OFFSET (DBLK_DATA_OFFSET + DBLK_DATA_SIZE)\n+#define MMU_VBH_OFFSET   (DBLK_DATA2_OFFSET + DBLK_DATA2_SIZE)\n+#define MPRED_ABV_OFFSET (MMU_VBH_OFFSET + MMU_VBH_SIZE)\n+#define MPRED_MV_OFFSET  (MPRED_ABV_OFFSET + MPRED_ABV_SIZE)\n+#define RPM_OFFSET       (MPRED_MV_OFFSET + MPRED_MV_SIZE)\n+#define LMEM_OFFSET      (RPM_OFFSET + RPM_BUF_SIZE)\n+\n+/* ISR decode status */\n+#define HEVC_DEC_IDLE                        0x0\n+#define HEVC_NAL_UNIT_VPS                    0x1\n+#define HEVC_NAL_UNIT_SPS                    0x2\n+#define HEVC_NAL_UNIT_PPS                    0x3\n+#define HEVC_NAL_UNIT_CODED_SLICE_SEGMENT    0x4\n+#define HEVC_CODED_SLICE_SEGMENT_DAT         0x5\n+#define HEVC_SLICE_DECODING                  0x6\n+#define HEVC_NAL_UNIT_SEI                    0x7\n+#define HEVC_SLICE_SEGMENT_DONE              0x8\n+#define HEVC_NAL_SEARCH_DONE                 0x9\n+#define HEVC_DECPIC_DATA_DONE                0xa\n+#define HEVC_DECPIC_DATA_ERROR               0xb\n+#define HEVC_SEI_DAT                         0xc\n+#define HEVC_SEI_DAT_DONE                    0xd\n+\n+/* RPM misc_flag0 */\n+#define PCM_LOOP_FILTER_DISABLED_FLAG_BIT\t\t0\n+#define PCM_ENABLE_FLAG_BIT\t\t\t\t1\n+#define LOOP_FILER_ACROSS_TILES_ENABLED_FLAG_BIT\t2\n+#define PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED_FLAG_BIT\t3\n+#define DEBLOCKING_FILTER_OVERRIDE_ENABLED_FLAG_BIT\t4\n+#define PPS_DEBLOCKING_FILTER_DISABLED_FLAG_BIT\t\t5\n+#define DEBLOCKING_FILTER_OVERRIDE_FLAG_BIT\t\t6\n+#define SLICE_DEBLOCKING_FILTER_DISABLED_FLAG_BIT\t7\n+#define SLICE_SAO_LUMA_FLAG_BIT\t\t\t\t8\n+#define SLICE_SAO_CHROMA_FLAG_BIT\t\t\t9\n+#define SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED_FLAG_BIT 10\n+\n+/* Constants for HEVC_MPRED_CTRL1 */\n+#define AMVP_MAX_NUM_CANDS_MEM\t3\n+#define AMVP_MAX_NUM_CANDS\t2\n+#define NUM_CHROMA_MODE\t\t5\n+#define DM_CHROMA_IDX\t\t36\n+\n+/* Buffer sizes */\n+#define SIZE_WORKSPACE ALIGN(LMEM_OFFSET + LMEM_SIZE, 64 * SZ_1K)\n+#define SIZE_AUX (SZ_1K * 16)\n+#define SIZE_FRAME_MMU (0x1200 * 4)\n+#define RPM_SIZE 0x80\n+#define RPS_USED_BIT 14\n+\n+/* Data received from the HW in this form, do not rearrange */\n+union rpm_param {\n+\tstruct {\n+\t\tu16 data[RPM_SIZE];\n+\t} l;\n+\tstruct {\n+\t\tu16 CUR_RPS[MAX_REF_ACTIVE];\n+\t\tu16 num_ref_idx_l0_active;\n+\t\tu16 num_ref_idx_l1_active;\n+\t\tu16 slice_type;\n+\t\tu16 slice_temporal_mvp_enable_flag;\n+\t\tu16 dependent_slice_segment_flag;\n+\t\tu16 slice_segment_address;\n+\t\tu16 num_title_rows_minus1;\n+\t\tu16 pic_width_in_luma_samples;\n+\t\tu16 pic_height_in_luma_samples;\n+\t\tu16 log2_min_coding_block_size_minus3;\n+\t\tu16 log2_diff_max_min_coding_block_size;\n+\t\tu16 log2_max_pic_order_cnt_lsb_minus4;\n+\t\tu16 POClsb;\n+\t\tu16 collocated_from_l0_flag;\n+\t\tu16 collocated_ref_idx;\n+\t\tu16 log2_parallel_merge_level;\n+\t\tu16 five_minus_max_num_merge_cand;\n+\t\tu16 sps_num_reorder_pics_0;\n+\t\tu16 modification_flag;\n+\t\tu16 tiles_flags;\n+\t\tu16 num_tile_columns_minus1;\n+\t\tu16 num_tile_rows_minus1;\n+\t\tu16 tile_width[8];\n+\t\tu16 tile_height[8];\n+\t\tu16 misc_flag0;\n+\t\tu16 pps_beta_offset_div2;\n+\t\tu16 pps_tc_offset_div2;\n+\t\tu16 slice_beta_offset_div2;\n+\t\tu16 slice_tc_offset_div2;\n+\t\tu16 pps_cb_qp_offset;\n+\t\tu16 pps_cr_qp_offset;\n+\t\tu16 first_slice_segment_in_pic_flag;\n+\t\tu16 m_temporalId;\n+\t\tu16 m_nalUnitType;\n+\t\tu16 vui_num_units_in_tick_hi;\n+\t\tu16 vui_num_units_in_tick_lo;\n+\t\tu16 vui_time_scale_hi;\n+\t\tu16 vui_time_scale_lo;\n+\t\tu16 bit_depth;\n+\t\tu16 profile_etc;\n+\t\tu16 sei_frame_field_info;\n+\t\tu16 video_signal_type;\n+\t\tu16 modification_list[0x20];\n+\t\tu16 conformance_window_flag;\n+\t\tu16 conf_win_left_offset;\n+\t\tu16 conf_win_right_offset;\n+\t\tu16 conf_win_top_offset;\n+\t\tu16 conf_win_bottom_offset;\n+\t\tu16 chroma_format_idc;\n+\t\tu16 color_description;\n+\t\tu16 aspect_ratio_idc;\n+\t\tu16 sar_width;\n+\t\tu16 sar_height;\n+\t} p;\n+};\n+\n+enum nal_unit_type {\n+\tNAL_UNIT_CODED_SLICE_BLA\t= 16,\n+\tNAL_UNIT_CODED_SLICE_BLANT\t= 17,\n+\tNAL_UNIT_CODED_SLICE_BLA_N_LP\t= 18,\n+\tNAL_UNIT_CODED_SLICE_IDR\t= 19,\n+\tNAL_UNIT_CODED_SLICE_IDR_N_LP\t= 20,\n+};\n+\n+enum slice_type {\n+\tB_SLICE = 0,\n+\tP_SLICE = 1,\n+\tI_SLICE = 2,\n+};\n+\n+/* A frame being decoded */\n+struct hevc_frame {\n+\tstruct list_head list;\n+\tstruct vb2_v4l2_buffer *vbuf;\n+\tu32 offset;\n+\tu32 poc;\n+\n+\tint referenced;\n+\tint show;\n+\tu32 num_reorder_pic;\n+\n+\tu32 cur_slice_idx;\n+\tu32 cur_slice_type;\n+\n+\t/* 2 lists (L0/L1) ; 800 slices ; 16 refs */\n+\tu32 ref_poc_list[2][MAX_SLICE_NUM][MAX_REF_ACTIVE];\n+\tu32 ref_num[2];\n+};\n+\n+struct codec_hevc {\n+\t/* Protect the data structure */\n+\tstruct mutex lock;\n+\n+\t/* Common part of the HEVC decoder */\n+\tstruct codec_hevc_common common;\n+\n+\t/* Buffer for the HEVC Workspace */\n+\tvoid      *workspace_vaddr;\n+\tdma_addr_t workspace_paddr;\n+\n+\t/* AUX buffer */\n+\tvoid      *aux_vaddr;\n+\tdma_addr_t aux_paddr;\n+\n+\t/* Contains many information parsed from the bitstream */\n+\tunion rpm_param rpm_param;\n+\n+\t/* Information computed from the RPM */\n+\tu32 lcu_size; // Largest Coding Unit\n+\tu32 lcu_x_num;\n+\tu32 lcu_y_num;\n+\tu32 lcu_total;\n+\n+\t/* Current Frame being handled */\n+\tstruct hevc_frame *cur_frame;\n+\tu32 curr_poc;\n+\t/* Collocated Reference Picture */\n+\tstruct hevc_frame *col_frame;\n+\tu32 col_poc;\n+\n+\t/* All ref frames used by the HW at a given time */\n+\tstruct list_head ref_frames_list;\n+\tu32 frames_num;\n+\n+\t/* Coded resolution reported by the hardware */\n+\tu32 width, height;\n+\t/* Resolution minus the conformance window offsets */\n+\tu32 dst_width, dst_height;\n+\n+\tu32 prev_tid0_poc;\n+\tu32 slice_segment_addr;\n+\tu32 slice_addr;\n+\tu32 ldc_flag;\n+\n+\t/* Whether we detected the bitstream as 10-bit */\n+\tint is_10bit;\n+};\n+\n+static u32 codec_hevc_num_pending_bufs(struct amvdec_session *sess)\n+{\n+\tstruct codec_hevc *hevc;\n+\tu32 ret;\n+\n+\thevc = sess->priv;\n+\tif (!hevc)\n+\t\treturn 0;\n+\n+\tmutex_lock(&hevc->lock);\n+\tret = hevc->frames_num;\n+\tmutex_unlock(&hevc->lock);\n+\n+\treturn ret;\n+}\n+\n+/* Update the L0 and L1 reference lists for a given frame */\n+static void codec_hevc_update_frame_refs(struct amvdec_session *sess,\n+\t\t\t\t\t struct hevc_frame *frame)\n+{\n+\tstruct codec_hevc *hevc = sess->priv;\n+\tunion rpm_param *params = &hevc->rpm_param;\n+\tint num_ref_idx_l0_active =\n+\t\t(params->p.num_ref_idx_l0_active > MAX_REF_ACTIVE) ?\n+\t\tMAX_REF_ACTIVE : params->p.num_ref_idx_l0_active;\n+\tint num_ref_idx_l1_active =\n+\t\t(params->p.num_ref_idx_l1_active > MAX_REF_ACTIVE) ?\n+\t\tMAX_REF_ACTIVE : params->p.num_ref_idx_l1_active;\n+\tint ref_picset0[MAX_REF_ACTIVE] = { 0 };\n+\tint ref_picset1[MAX_REF_ACTIVE] = { 0 };\n+\tu16 *mod_list = params->p.modification_list;\n+\tint num_neg = 0;\n+\tint num_pos = 0;\n+\tint total_num;\n+\tint i;\n+\n+\tfor (i = 0; i < MAX_REF_ACTIVE; i++) {\n+\t\tframe->ref_poc_list[0][frame->cur_slice_idx][i] = 0;\n+\t\tframe->ref_poc_list[1][frame->cur_slice_idx][i] = 0;\n+\t}\n+\n+\tfor (i = 0; i < MAX_REF_ACTIVE; i++) {\n+\t\tu16 cur_rps = params->p.CUR_RPS[i];\n+\t\tint delt = cur_rps & ((1 << (RPS_USED_BIT - 1)) - 1);\n+\n+\t\tif (cur_rps & 0x8000)\n+\t\t\tbreak;\n+\n+\t\tif (!((cur_rps >> RPS_USED_BIT) & 1))\n+\t\t\tcontinue;\n+\n+\t\tif ((cur_rps >> (RPS_USED_BIT - 1)) & 1) {\n+\t\t\tref_picset0[num_neg] =\n+\t\t\t       frame->poc - ((1 << (RPS_USED_BIT - 1)) - delt);\n+\t\t\tnum_neg++;\n+\t\t} else {\n+\t\t\tref_picset1[num_pos] = frame->poc + delt;\n+\t\t\tnum_pos++;\n+\t\t}\n+\t}\n+\n+\ttotal_num = num_neg + num_pos;\n+\n+\tif (total_num <= 0)\n+\t\tgoto end;\n+\n+\tfor (i = 0; i < num_ref_idx_l0_active; i++) {\n+\t\tint cidx;\n+\n+\t\tif (params->p.modification_flag & 0x1)\n+\t\t\tcidx = mod_list[i];\n+\t\telse\n+\t\t\tcidx = i % total_num;\n+\n+\t\tframe->ref_poc_list[0][frame->cur_slice_idx][i] =\n+\t\t\tcidx >= num_neg ? ref_picset1[cidx - num_neg] :\n+\t\t\tref_picset0[cidx];\n+\t}\n+\n+\tif (params->p.slice_type != B_SLICE)\n+\t\tgoto end;\n+\n+\tif (params->p.modification_flag & 0x2) {\n+\t\tfor (i = 0; i < num_ref_idx_l1_active; i++) {\n+\t\t\tint cidx;\n+\n+\t\t\tif (params->p.modification_flag & 0x1)\n+\t\t\t\tcidx = mod_list[num_ref_idx_l0_active + i];\n+\t\t\telse\n+\t\t\t\tcidx = mod_list[i];\n+\n+\t\t\tframe->ref_poc_list[1][frame->cur_slice_idx][i] =\n+\t\t\t\t(cidx >= num_pos) ? ref_picset0[cidx - num_pos]\n+\t\t\t\t: ref_picset1[cidx];\n+\t\t}\n+\t} else {\n+\t\tfor (i = 0; i < num_ref_idx_l1_active; i++) {\n+\t\t\tint cidx = i % total_num;\n+\n+\t\t\tframe->ref_poc_list[1][frame->cur_slice_idx][i] =\n+\t\t\t\tcidx >= num_pos ? ref_picset0[cidx - num_pos] :\n+\t\t\t\tref_picset1[cidx];\n+\t\t}\n+\t}\n+\n+end:\n+\tframe->ref_num[0] = num_ref_idx_l0_active;\n+\tframe->ref_num[1] = num_ref_idx_l1_active;\n+\n+\tdev_dbg(sess->core->dev,\n+\t\t\"Frame %u; slice %u; slice_type %u; num_l0 %u; num_l1 %u\\n\",\n+\t\tframe->poc, frame->cur_slice_idx, params->p.slice_type,\n+\t\tframe->ref_num[0], frame->ref_num[1]);\n+}\n+\n+static void codec_hevc_update_ldc_flag(struct codec_hevc *hevc)\n+{\n+\tstruct hevc_frame *frame = hevc->cur_frame;\n+\tu32 slice_type = frame->cur_slice_type;\n+\tu32 slice_idx = frame->cur_slice_idx;\n+\tint i;\n+\n+\thevc->ldc_flag = 0;\n+\n+\tif (slice_type == I_SLICE)\n+\t\treturn;\n+\n+\thevc->ldc_flag = 1;\n+\tfor (i = 0; (i < frame->ref_num[0]) && hevc->ldc_flag; i++) {\n+\t\tif (frame->ref_poc_list[0][slice_idx][i] > frame->poc) {\n+\t\t\thevc->ldc_flag = 0;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\tif (slice_type == P_SLICE)\n+\t\treturn;\n+\n+\tfor (i = 0; (i < frame->ref_num[1]) && hevc->ldc_flag; i++) {\n+\t\tif (frame->ref_poc_list[1][slice_idx][i] > frame->poc) {\n+\t\t\thevc->ldc_flag = 0;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+}\n+\n+/* Tag \"old\" frames that are no longer referenced */\n+static void codec_hevc_update_referenced(struct codec_hevc *hevc)\n+{\n+\tunion rpm_param *param = &hevc->rpm_param;\n+\tstruct hevc_frame *frame;\n+\tint i;\n+\tu32 curr_poc = hevc->curr_poc;\n+\n+\tlist_for_each_entry(frame, &hevc->ref_frames_list, list) {\n+\t\tint is_referenced = 0;\n+\t\tu32 poc_tmp;\n+\n+\t\tif (!frame->referenced)\n+\t\t\tcontinue;\n+\n+\t\tfor (i = 0; i < MAX_REF_ACTIVE; i++) {\n+\t\t\tint delt;\n+\n+\t\t\tif (param->p.CUR_RPS[i] & 0x8000)\n+\t\t\t\tbreak;\n+\n+\t\t\tdelt = param->p.CUR_RPS[i] &\n+\t\t\t       ((1 << (RPS_USED_BIT - 1)) - 1);\n+\t\t\tif (param->p.CUR_RPS[i] & (1 << (RPS_USED_BIT - 1))) {\n+\t\t\t\tpoc_tmp = curr_poc -\n+\t\t\t\t      ((1 << (RPS_USED_BIT - 1)) - delt);\n+\t\t\t} else {\n+\t\t\t\tpoc_tmp = curr_poc + delt;\n+\t\t\t}\n+\n+\t\t\tif (poc_tmp == frame->poc) {\n+\t\t\t\tis_referenced = 1;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\n+\t\tframe->referenced = is_referenced;\n+\t}\n+}\n+\n+static struct hevc_frame *\n+codec_hevc_get_next_ready_frame(struct codec_hevc *hevc)\n+{\n+\tstruct hevc_frame *tmp, *ret = NULL;\n+\tu32 poc = INT_MAX;\n+\n+\tlist_for_each_entry(tmp, &hevc->ref_frames_list, list) {\n+\t\tif ((tmp->poc < poc) && tmp->show) {\n+\t\t\tret = tmp;\n+\t\t\tpoc = tmp->poc;\n+\t\t}\n+\t}\n+\n+\treturn ret;\n+}\n+\n+/* Try to output as many frames as possible */\n+static void codec_hevc_show_frames(struct amvdec_session *sess)\n+{\n+\tstruct hevc_frame *tmp, *n;\n+\tstruct codec_hevc *hevc = sess->priv;\n+\n+\twhile ((tmp = codec_hevc_get_next_ready_frame(hevc))) {\n+\t\tif (hevc->curr_poc &&\n+\t\t    (hevc->frames_num <= tmp->num_reorder_pic))\n+\t\t\tbreak;\n+\n+\t\tdev_dbg(sess->core->dev, \"DONE frame poc %u; vbuf %u\\n\",\n+\t\t\ttmp->poc, tmp->vbuf->vb2_buf.index);\n+\t\tamvdec_dst_buf_done_offset(sess, tmp->vbuf, tmp->offset,\n+\t\t\t\t\t   V4L2_FIELD_NONE, false);\n+\n+\t\ttmp->show = 0;\n+\t\thevc->frames_num--;\n+\t}\n+\n+\t/* clean output frame buffer */\n+\tlist_for_each_entry_safe(tmp, n, &hevc->ref_frames_list, list) {\n+\t\tif (tmp->referenced || tmp->show)\n+\t\t\tcontinue;\n+\n+\t\tlist_del(&tmp->list);\n+\t\tkfree(tmp);\n+\t}\n+}\n+\n+static int\n+codec_hevc_setup_workspace(struct amvdec_session *sess,\n+\t\t\t   struct codec_hevc *hevc)\n+{\n+\tstruct amvdec_core *core = sess->core;\n+\tu32 revision = core->platform->revision;\n+\tdma_addr_t wkaddr;\n+\n+\t/* Allocate some memory for the HEVC decoder's state */\n+\thevc->workspace_vaddr = dma_alloc_coherent(core->dev, SIZE_WORKSPACE,\n+\t\t\t\t\t\t   &wkaddr, GFP_KERNEL);\n+\tif (!hevc->workspace_vaddr)\n+\t\treturn -ENOMEM;\n+\n+\thevc->workspace_paddr = wkaddr;\n+\n+\tamvdec_write_dos(core, HEVCD_IPP_LINEBUFF_BASE, wkaddr + IPP_OFFSET);\n+\tamvdec_write_dos(core, HEVC_RPM_BUFFER, wkaddr + RPM_OFFSET);\n+\tamvdec_write_dos(core, HEVC_SHORT_TERM_RPS, wkaddr + SH_TM_RPS_OFFSET);\n+\tamvdec_write_dos(core, HEVC_VPS_BUFFER, wkaddr + VPS_OFFSET);\n+\tamvdec_write_dos(core, HEVC_SPS_BUFFER, wkaddr + SPS_OFFSET);\n+\tamvdec_write_dos(core, HEVC_PPS_BUFFER, wkaddr + PPS_OFFSET);\n+\tamvdec_write_dos(core, HEVC_SAO_UP, wkaddr + SAO_UP_OFFSET);\n+\n+\tif (codec_hevc_use_mmu(revision, sess->pixfmt_cap, hevc->is_10bit)) {\n+\t\tamvdec_write_dos(core, HEVC_SAO_MMU_VH0_ADDR,\n+\t\t\t\t wkaddr + MMU_VBH_OFFSET);\n+\t\tamvdec_write_dos(core, HEVC_SAO_MMU_VH1_ADDR,\n+\t\t\t\t wkaddr + MMU_VBH_OFFSET + (MMU_VBH_SIZE / 2));\n+\n+\t\tif (revision >= VDEC_REVISION_G12A)\n+\t\t\tamvdec_write_dos(core, HEVC_ASSIST_MMU_MAP_ADDR,\n+\t\t\t\t\t hevc->common.mmu_map_paddr);\n+\t\telse\n+\t\t\tamvdec_write_dos(core, H265_MMU_MAP_BUFFER,\n+\t\t\t\t\t hevc->common.mmu_map_paddr);\n+\t} else if (revision < VDEC_REVISION_G12A) {\n+\t\tamvdec_write_dos(core, HEVC_STREAM_SWAP_BUFFER,\n+\t\t\t\t wkaddr + SWAP_BUF_OFFSET);\n+\t\tamvdec_write_dos(core, HEVC_STREAM_SWAP_BUFFER2,\n+\t\t\t\t wkaddr + SWAP_BUF2_OFFSET);\n+\t}\n+\n+\tamvdec_write_dos(core, HEVC_SCALELUT, wkaddr + SCALELUT_OFFSET);\n+\tamvdec_write_dos(core, HEVC_DBLK_CFG4, wkaddr + DBLK_PARA_OFFSET);\n+\tamvdec_write_dos(core, HEVC_DBLK_CFG5, wkaddr + DBLK_DATA_OFFSET);\n+\tif (revision >= VDEC_REVISION_G12A)\n+\t\tamvdec_write_dos(core, HEVC_DBLK_CFGE,\n+\t\t\t\t wkaddr + DBLK_DATA2_OFFSET);\n+\n+\tamvdec_write_dos(core, LMEM_DUMP_ADR, wkaddr + LMEM_OFFSET);\n+\n+\treturn 0;\n+}\n+\n+static int codec_hevc_start(struct amvdec_session *sess)\n+{\n+\tstruct amvdec_core *core = sess->core;\n+\tstruct codec_hevc *hevc;\n+\tu32 val;\n+\tint i;\n+\tint ret;\n+\n+\thevc = kzalloc(sizeof(*hevc), GFP_KERNEL);\n+\tif (!hevc)\n+\t\treturn -ENOMEM;\n+\n+\tINIT_LIST_HEAD(&hevc->ref_frames_list);\n+\thevc->curr_poc = INVALID_POC;\n+\n+\tret = codec_hevc_setup_workspace(sess, hevc);\n+\tif (ret)\n+\t\tgoto free_hevc;\n+\n+\tval = BIT(0); /* stream_fetch_enable */\n+\tif (core->platform->revision >= VDEC_REVISION_G12A)\n+\t\tval |= (0xf << 25); /* arwlen_axi_max */\n+\tamvdec_write_dos_bits(core, HEVC_STREAM_CONTROL, val);\n+\n+\tval = amvdec_read_dos(core, HEVC_PARSER_INT_CONTROL) & 0x03ffffff;\n+\tval |= (3 << 29) | BIT(27) | BIT(24) | BIT(22) | BIT(7) | BIT(4) |\n+\t       BIT(0);\n+\tamvdec_write_dos(core, HEVC_PARSER_INT_CONTROL, val);\n+\tamvdec_write_dos_bits(core, HEVC_SHIFT_STATUS, BIT(1) | BIT(0));\n+\tamvdec_write_dos(core, HEVC_SHIFT_CONTROL,\n+\t\t\t (3 << 6) | BIT(5) | BIT(2) | BIT(0));\n+\tamvdec_write_dos(core, HEVC_CABAC_CONTROL, 1);\n+\tamvdec_write_dos(core, HEVC_PARSER_CORE_CONTROL, 1);\n+\tamvdec_write_dos(core, HEVC_DEC_STATUS_REG, 0);\n+\n+\tamvdec_write_dos(core, HEVC_IQIT_SCALELUT_WR_ADDR, 0);\n+\tfor (i = 0; i < 1024; ++i)\n+\t\tamvdec_write_dos(core, HEVC_IQIT_SCALELUT_DATA, 0);\n+\n+\tamvdec_write_dos(core, HEVC_DECODE_SIZE, 0);\n+\n+\tamvdec_write_dos(core, HEVC_PARSER_CMD_WRITE, BIT(16));\n+\tfor (i = 0; i < ARRAY_SIZE(vdec_hevc_parser_cmd); ++i)\n+\t\tamvdec_write_dos(core, HEVC_PARSER_CMD_WRITE,\n+\t\t\t\t vdec_hevc_parser_cmd[i]);\n+\n+\tamvdec_write_dos(core, HEVC_PARSER_CMD_SKIP_0, PARSER_CMD_SKIP_CFG_0);\n+\tamvdec_write_dos(core, HEVC_PARSER_CMD_SKIP_1, PARSER_CMD_SKIP_CFG_1);\n+\tamvdec_write_dos(core, HEVC_PARSER_CMD_SKIP_2, PARSER_CMD_SKIP_CFG_2);\n+\tamvdec_write_dos(core, HEVC_PARSER_IF_CONTROL,\n+\t\t\t BIT(5) | BIT(2) | BIT(0));\n+\n+\tamvdec_write_dos(core, HEVCD_IPP_TOP_CNTL, BIT(0));\n+\tamvdec_write_dos(core, HEVCD_IPP_TOP_CNTL, BIT(1));\n+\n+\tamvdec_write_dos(core, HEVC_WAIT_FLAG, 1);\n+\n+\t/* clear mailbox interrupt */\n+\tamvdec_write_dos(core, HEVC_ASSIST_MBOX1_CLR_REG, 1);\n+\t/* enable mailbox interrupt */\n+\tamvdec_write_dos(core, HEVC_ASSIST_MBOX1_MASK, 1);\n+\t/* disable PSCALE for hardware sharing */\n+\tamvdec_write_dos(core, HEVC_PSCALE_CTRL, 0);\n+\t/* Let the uCode do all the parsing */\n+\tamvdec_write_dos(core, NAL_SEARCH_CTL, 0xc);\n+\n+\tamvdec_write_dos(core, DECODE_STOP_POS, 0);\n+\tamvdec_write_dos(core, HEVC_DECODE_MODE, DECODE_MODE_SINGLE);\n+\tamvdec_write_dos(core, HEVC_DECODE_MODE2, 0);\n+\n+\t/* AUX buffers */\n+\thevc->aux_vaddr = dma_alloc_coherent(core->dev, SIZE_AUX,\n+\t\t\t\t\t     &hevc->aux_paddr, GFP_KERNEL);\n+\tif (!hevc->aux_vaddr) {\n+\t\tret = -ENOMEM;\n+\t\tgoto free_hevc;\n+\t}\n+\n+\tamvdec_write_dos(core, HEVC_AUX_ADR, hevc->aux_paddr);\n+\tamvdec_write_dos(core, HEVC_AUX_DATA_SIZE,\n+\t\t\t (((SIZE_AUX) >> 4) << 16) | 0);\n+\tmutex_init(&hevc->lock);\n+\tsess->priv = hevc;\n+\n+\treturn 0;\n+\n+free_hevc:\n+\tkfree(hevc);\n+\treturn ret;\n+}\n+\n+static void codec_hevc_flush_output(struct amvdec_session *sess)\n+{\n+\tstruct codec_hevc *hevc = sess->priv;\n+\tstruct hevc_frame *tmp, *n;\n+\n+\twhile ((tmp = codec_hevc_get_next_ready_frame(hevc))) {\n+\t\tamvdec_dst_buf_done(sess, tmp->vbuf, V4L2_FIELD_NONE);\n+\t\ttmp->show = 0;\n+\t\thevc->frames_num--;\n+\t}\n+\n+\tlist_for_each_entry_safe(tmp, n, &hevc->ref_frames_list, list) {\n+\t\tlist_del(&tmp->list);\n+\t\tkfree(tmp);\n+\t}\n+}\n+\n+static int codec_hevc_stop(struct amvdec_session *sess)\n+{\n+\tstruct codec_hevc *hevc = sess->priv;\n+\tstruct amvdec_core *core = sess->core;\n+\n+\tmutex_lock(&hevc->lock);\n+\tcodec_hevc_flush_output(sess);\n+\n+\tif (hevc->workspace_vaddr)\n+\t\tdma_free_coherent(core->dev, SIZE_WORKSPACE,\n+\t\t\t\t  hevc->workspace_vaddr,\n+\t\t\t\t  hevc->workspace_paddr);\n+\n+\tif (hevc->aux_vaddr)\n+\t\tdma_free_coherent(core->dev, SIZE_AUX,\n+\t\t\t\t  hevc->aux_vaddr, hevc->aux_paddr);\n+\n+\tcodec_hevc_free_fbc_buffers(sess, &hevc->common);\n+\tmutex_unlock(&hevc->lock);\n+\tmutex_destroy(&hevc->lock);\n+\n+\treturn 0;\n+}\n+\n+static struct hevc_frame *\n+codec_hevc_get_frame_by_poc(struct codec_hevc *hevc, u32 poc)\n+{\n+\tstruct hevc_frame *tmp;\n+\n+\tlist_for_each_entry(tmp, &hevc->ref_frames_list, list) {\n+\t\tif (tmp->poc == poc)\n+\t\t\treturn tmp;\n+\t}\n+\n+\treturn NULL;\n+}\n+\n+static struct hevc_frame *\n+codec_hevc_prepare_new_frame(struct amvdec_session *sess)\n+{\n+\tstruct amvdec_core *core = sess->core;\n+\tstruct hevc_frame *new_frame = NULL;\n+\tstruct codec_hevc *hevc = sess->priv;\n+\tstruct vb2_v4l2_buffer *vbuf;\n+\tunion rpm_param *params = &hevc->rpm_param;\n+\n+\tnew_frame = kzalloc(sizeof(*new_frame), GFP_KERNEL);\n+\tif (!new_frame)\n+\t\treturn NULL;\n+\n+\tvbuf = v4l2_m2m_dst_buf_remove(sess->m2m_ctx);\n+\tif (!vbuf) {\n+\t\tdev_err(sess->core->dev, \"No dst buffer available\\n\");\n+\t\treturn NULL;\n+\t}\n+\n+\tnew_frame->vbuf = vbuf;\n+\tnew_frame->referenced = 1;\n+\tnew_frame->show = 1;\n+\tnew_frame->poc = hevc->curr_poc;\n+\tnew_frame->cur_slice_type = params->p.slice_type;\n+\tnew_frame->num_reorder_pic = params->p.sps_num_reorder_pics_0;\n+\tnew_frame->offset = amvdec_read_dos(core, HEVC_SHIFT_BYTE_COUNT);\n+\n+\tlist_add_tail(&new_frame->list, &hevc->ref_frames_list);\n+\thevc->frames_num++;\n+\n+\treturn new_frame;\n+}\n+\n+static void\n+codec_hevc_set_sao(struct amvdec_session *sess, struct hevc_frame *frame)\n+{\n+\tstruct amvdec_core *core = sess->core;\n+\tstruct codec_hevc *hevc = sess->priv;\n+\tstruct vb2_buffer *vb = &frame->vbuf->vb2_buf;\n+\tunion rpm_param *param = &hevc->rpm_param;\n+\tu32 pic_height_cu =\n+\t\t(hevc->height + hevc->lcu_size - 1) / hevc->lcu_size;\n+\tu32 sao_mem_unit = (hevc->lcu_size == 16 ? 9 :\n+\t\t\t   hevc->lcu_size == 32 ? 14 : 24) << 4;\n+\tu32 sao_vb_size = (sao_mem_unit + (2 << 4)) * pic_height_cu;\n+\tu32 misc_flag0 = param->p.misc_flag0;\n+\tdma_addr_t buf_y_paddr;\n+\tdma_addr_t buf_u_v_paddr;\n+\tu32 slice_deblocking_filter_disabled_flag;\n+\tu32 val, val_2;\n+\n+\tval = (amvdec_read_dos(core, HEVC_SAO_CTRL0) & ~0xf) |\n+\t      ilog2(hevc->lcu_size);\n+\tamvdec_write_dos(core, HEVC_SAO_CTRL0, val);\n+\n+\tamvdec_write_dos(core, HEVC_SAO_PIC_SIZE,\n+\t\t\t hevc->width | (hevc->height << 16));\n+\tamvdec_write_dos(core, HEVC_SAO_PIC_SIZE_LCU,\n+\t\t\t (hevc->lcu_x_num - 1) | (hevc->lcu_y_num - 1) << 16);\n+\n+\tif (codec_hevc_use_downsample(sess->pixfmt_cap, hevc->is_10bit) ||\n+\t    codec_hevc_use_mmu(core->platform->revision, sess->pixfmt_cap,\n+\t\t\t       hevc->is_10bit))\n+\t\tbuf_y_paddr =\n+\t\t     hevc->common.fbc_buffer_paddr[vb->index];\n+\telse\n+\t\tbuf_y_paddr =\n+\t\t       vb2_dma_contig_plane_dma_addr(vb, 0);\n+\n+\tif (codec_hevc_use_fbc(sess->pixfmt_cap, hevc->is_10bit)) {\n+\t\tval = amvdec_read_dos(core, HEVC_SAO_CTRL5) & ~0xff0000;\n+\t\tamvdec_write_dos(core, HEVC_SAO_CTRL5, val);\n+\t\tamvdec_write_dos(core, HEVC_CM_BODY_START_ADDR, buf_y_paddr);\n+\t}\n+\n+\tif (sess->pixfmt_cap == V4L2_PIX_FMT_NV12M) {\n+\t\tbuf_y_paddr =\n+\t\t       vb2_dma_contig_plane_dma_addr(vb, 0);\n+\t\tbuf_u_v_paddr =\n+\t\t       vb2_dma_contig_plane_dma_addr(vb, 1);\n+\t\tamvdec_write_dos(core, HEVC_SAO_Y_START_ADDR, buf_y_paddr);\n+\t\tamvdec_write_dos(core, HEVC_SAO_C_START_ADDR, buf_u_v_paddr);\n+\t\tamvdec_write_dos(core, HEVC_SAO_Y_WPTR, buf_y_paddr);\n+\t\tamvdec_write_dos(core, HEVC_SAO_C_WPTR, buf_u_v_paddr);\n+\t}\n+\n+\tif (codec_hevc_use_mmu(core->platform->revision, sess->pixfmt_cap,\n+\t\t\t       hevc->is_10bit)) {\n+\t\tdma_addr_t header_adr = vb2_dma_contig_plane_dma_addr(vb, 0);\n+\n+\t\tif (codec_hevc_use_downsample(sess->pixfmt_cap, hevc->is_10bit))\n+\t\t\theader_adr = hevc->common.mmu_header_paddr[vb->index];\n+\t\tamvdec_write_dos(core, HEVC_CM_HEADER_START_ADDR, header_adr);\n+\t\t/* use HEVC_CM_HEADER_START_ADDR */\n+\t\tamvdec_write_dos_bits(core, HEVC_SAO_CTRL5, BIT(10));\n+\t\tamvdec_write_dos_bits(core, HEVC_SAO_CTRL9, BIT(0));\n+\t}\n+\n+\tamvdec_write_dos(core, HEVC_SAO_Y_LENGTH,\n+\t\t\t amvdec_get_output_size(sess));\n+\tamvdec_write_dos(core, HEVC_SAO_C_LENGTH,\n+\t\t\t (amvdec_get_output_size(sess) / 2));\n+\n+\tif (frame->cur_slice_idx == 0) {\n+\t\tif (core->platform->revision >= VDEC_REVISION_G12A) {\n+\t\t\tif (core->platform->revision >= VDEC_REVISION_SM1)\n+\t\t\t\tval = 0xfc << 8;\n+\t\t\telse\n+\t\t\t\tval = 0x54 << 8;\n+\n+\t\t\t/* enable first, compressed write */\n+\t\t\tif (codec_hevc_use_fbc(sess->pixfmt_cap,\n+\t\t\t\t\t       hevc->is_10bit))\n+\t\t\t\tval |= BIT(8);\n+\n+\t\t\t/* enable second, uncompressed write */\n+\t\t\tif (sess->pixfmt_cap == V4L2_PIX_FMT_NV12M)\n+\t\t\t\tval |= BIT(9);\n+\n+\t\t\t/* dblk pipeline mode=1 for performance */\n+\t\t\tif (hevc->width >= 1280)\n+\t\t\t\tval |= BIT(4);\n+\n+\t\t\tamvdec_write_dos(core, HEVC_DBLK_CFGB, val);\n+\t\t\tamvdec_write_dos(core, HEVC_DBLK_STS1 + 16, BIT(28));\n+\t\t}\n+\n+\t\tamvdec_write_dos(core, HEVC_DBLK_CFG2,\n+\t\t\t\t hevc->width | (hevc->height << 16));\n+\n+\t\tval = 0;\n+\t\tif ((misc_flag0 >> PCM_ENABLE_FLAG_BIT) & 0x1)\n+\t\t\tval |= ((misc_flag0 >>\n+\t\t\t\t PCM_LOOP_FILTER_DISABLED_FLAG_BIT) & 0x1) << 3;\n+\n+\t\tval |= (param->p.pps_cb_qp_offset & 0x1f) << 4;\n+\t\tval |= (param->p.pps_cr_qp_offset & 0x1f) << 9;\n+\t\tval |= (hevc->lcu_size == 64) ? 0 :\n+\t\t       ((hevc->lcu_size == 32) ? 1 : 2);\n+\t\tamvdec_write_dos(core, HEVC_DBLK_CFG1, val);\n+\t}\n+\n+\tval = amvdec_read_dos(core, HEVC_SAO_CTRL1) & ~0x3ff3;\n+\tval |= 0xff0; /* Set endianness for 2-bytes swaps (nv12) */\n+\tif (core->platform->revision < VDEC_REVISION_G12A) {\n+\t\tif (!codec_hevc_use_fbc(sess->pixfmt_cap, hevc->is_10bit))\n+\t\t\tval |= BIT(0); /* disable cm compression */\n+\t\t/* TOFIX: Handle Amlogic Framebuffer compression */\n+\t}\n+\n+\tamvdec_write_dos(core, HEVC_SAO_CTRL1, val);\n+\n+\tif (!codec_hevc_use_fbc(sess->pixfmt_cap, hevc->is_10bit)) {\n+\t\t/* no downscale for NV12 */\n+\t\tval = amvdec_read_dos(core, HEVC_SAO_CTRL5) & ~0xff0000;\n+\t\tamvdec_write_dos(core, HEVC_SAO_CTRL5, val);\n+\t}\n+\n+\tval = amvdec_read_dos(core, HEVCD_IPP_AXIIF_CONFIG) & ~0x30;\n+\tval |= 0xf;\n+\tamvdec_write_dos(core, HEVCD_IPP_AXIIF_CONFIG, val);\n+\n+\tval = 0;\n+\tval_2 = amvdec_read_dos(core, HEVC_SAO_CTRL0);\n+\tval_2 &= (~0x300);\n+\n+\tslice_deblocking_filter_disabled_flag = (misc_flag0 >>\n+\t\t\tSLICE_DEBLOCKING_FILTER_DISABLED_FLAG_BIT) & 0x1;\n+\tif ((misc_flag0 & (1 << DEBLOCKING_FILTER_OVERRIDE_ENABLED_FLAG_BIT)) &&\n+\t    (misc_flag0 & (1 << DEBLOCKING_FILTER_OVERRIDE_FLAG_BIT))) {\n+\t\tval |= slice_deblocking_filter_disabled_flag << 2;\n+\n+\t\tif (!slice_deblocking_filter_disabled_flag) {\n+\t\t\tval |= (param->p.slice_beta_offset_div2 & 0xf) << 3;\n+\t\t\tval |= (param->p.slice_tc_offset_div2 & 0xf) << 7;\n+\t\t}\n+\t} else {\n+\t\tval |=\n+\t\t\t((misc_flag0 >>\n+\t\t\t  PPS_DEBLOCKING_FILTER_DISABLED_FLAG_BIT) & 0x1) << 2;\n+\n+\t\tif (((misc_flag0 >> PPS_DEBLOCKING_FILTER_DISABLED_FLAG_BIT) &\n+\t\t\t0x1) == 0) {\n+\t\t\tval |= (param->p.pps_beta_offset_div2 & 0xf) << 3;\n+\t\t\tval |= (param->p.pps_tc_offset_div2 & 0xf) << 7;\n+\t\t}\n+\t}\n+\tif ((misc_flag0 & (1 << PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED_FLAG_BIT)) &&\n+\t    ((misc_flag0 & (1 << SLICE_SAO_LUMA_FLAG_BIT)) ||\n+\t   (misc_flag0 & (1 << SLICE_SAO_CHROMA_FLAG_BIT)) ||\n+\t   (!slice_deblocking_filter_disabled_flag))) {\n+\t\tval |=\n+\t\t\t((misc_flag0 >>\n+\t\t\t  SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED_FLAG_BIT)\n+\t\t\t & 0x1)\t<< 1;\n+\t\tval_2 |=\n+\t\t\t((misc_flag0 >>\n+\t\t\t  SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED_FLAG_BIT)\n+\t\t\t& 0x1) << 9;\n+\t} else {\n+\t\tval |=\n+\t\t\t((misc_flag0 >>\n+\t\t\t  PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED_FLAG_BIT)\n+\t\t\t & 0x1) << 1;\n+\t\tval_2 |=\n+\t\t\t((misc_flag0 >>\n+\t\t\t  PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED_FLAG_BIT)\n+\t\t\t & 0x1) << 9;\n+\t}\n+\n+\tamvdec_write_dos(core, HEVC_DBLK_CFG9, val);\n+\tamvdec_write_dos(core, HEVC_SAO_CTRL0, val_2);\n+\n+\tamvdec_write_dos(core, HEVC_sao_mem_unit, sao_mem_unit);\n+\tamvdec_write_dos(core, HEVC_SAO_ABV,\n+\t\t\t hevc->workspace_paddr + SAO_ABV_OFFSET);\n+\tamvdec_write_dos(core, HEVC_sao_vb_size, sao_vb_size);\n+\tamvdec_write_dos(core, HEVC_SAO_VB,\n+\t\t\t hevc->workspace_paddr + SAO_VB_OFFSET);\n+}\n+\n+static dma_addr_t codec_hevc_get_frame_mv_paddr(struct codec_hevc *hevc,\n+\t\t\t\t\t\tstruct hevc_frame *frame)\n+{\n+\treturn hevc->workspace_paddr + MPRED_MV_OFFSET +\n+\t\t(frame->vbuf->vb2_buf.index * MPRED_MV_BUF_SIZE);\n+}\n+\n+static void\n+codec_hevc_set_mpred_ctrl(struct amvdec_core *core, struct codec_hevc *hevc)\n+{\n+\tunion rpm_param *param = &hevc->rpm_param;\n+\tu32 slice_type = param->p.slice_type;\n+\tu32 lcu_size_log2 = ilog2(hevc->lcu_size);\n+\tu32 val;\n+\n+\tval = slice_type |\n+\t      MPRED_CTRL0_ABOVE_EN |\n+\t      MPRED_CTRL0_MV_WR_EN |\n+\t      MPRED_CTRL0_BUF_LINEAR |\n+\t      (lcu_size_log2 << 16) |\n+\t      (3 << 20) | /* cu_size_log2 */\n+\t      (param->p.log2_parallel_merge_level << 24);\n+\n+\tif (slice_type != I_SLICE)\n+\t\tval |= MPRED_CTRL0_MV_RD_EN;\n+\n+\tif (param->p.collocated_from_l0_flag)\n+\t\tval |= MPRED_CTRL0_COL_FROM_L0;\n+\n+\tif (param->p.slice_temporal_mvp_enable_flag)\n+\t\tval |= MPRED_CTRL0_TMVP;\n+\n+\tif (hevc->ldc_flag)\n+\t\tval |= MPRED_CTRL0_LDC;\n+\n+\tif (param->p.dependent_slice_segment_flag)\n+\t\tval |= MPRED_CTRL0_NEW_SLI_SEG;\n+\n+\tif (param->p.slice_segment_address == 0)\n+\t\tval |= MPRED_CTRL0_NEW_PIC |\n+\t\t       MPRED_CTRL0_NEW_TILE;\n+\n+\tamvdec_write_dos(core, HEVC_MPRED_CTRL0, val);\n+\n+\tval = (5 - param->p.five_minus_max_num_merge_cand) |\n+\t      (AMVP_MAX_NUM_CANDS << 4) |\n+\t      (AMVP_MAX_NUM_CANDS_MEM << 8) |\n+\t      (NUM_CHROMA_MODE << 12) |\n+\t      (DM_CHROMA_IDX << 16);\n+\tamvdec_write_dos(core, HEVC_MPRED_CTRL1, val);\n+}\n+\n+static void codec_hevc_set_mpred_mv(struct amvdec_core *core,\n+\t\t\t\t    struct codec_hevc *hevc,\n+\t\t\t\t    struct hevc_frame *frame,\n+\t\t\t\t    struct hevc_frame *col_frame)\n+{\n+\tunion rpm_param *param = &hevc->rpm_param;\n+\tu32 lcu_size_log2 = ilog2(hevc->lcu_size);\n+\tu32 mv_mem_unit = lcu_size_log2 == 6 ? 0x200 :\n+\t\t\t  lcu_size_log2 == 5 ? 0x80 : 0x20;\n+\tdma_addr_t col_mv_rd_start_addr, col_mv_rd_ptr, col_mv_rd_end_addr;\n+\tdma_addr_t mpred_mv_wr_ptr;\n+\n+\tamvdec_read_dos(core, HEVC_MPRED_CURR_LCU);\n+\n+\tcol_mv_rd_start_addr = codec_hevc_get_frame_mv_paddr(hevc, col_frame);\n+\tmpred_mv_wr_ptr = codec_hevc_get_frame_mv_paddr(hevc, frame) +\n+\t\t\t  (hevc->slice_addr * mv_mem_unit);\n+\tcol_mv_rd_ptr = col_mv_rd_start_addr +\n+\t\t\t(hevc->slice_addr * mv_mem_unit);\n+\tcol_mv_rd_end_addr = col_mv_rd_start_addr +\n+\t\t\t     (hevc->lcu_total * mv_mem_unit);\n+\n+\tamvdec_write_dos(core, HEVC_MPRED_MV_WR_START_ADDR,\n+\t\t\t codec_hevc_get_frame_mv_paddr(hevc, frame));\n+\tamvdec_write_dos(core, HEVC_MPRED_MV_RD_START_ADDR,\n+\t\t\t col_mv_rd_start_addr);\n+\n+\tif (param->p.slice_segment_address == 0) {\n+\t\tamvdec_write_dos(core, HEVC_MPRED_ABV_START_ADDR,\n+\t\t\t\t hevc->workspace_paddr + MPRED_ABV_OFFSET);\n+\t\tamvdec_write_dos(core, HEVC_MPRED_MV_WPTR, mpred_mv_wr_ptr);\n+\t\tamvdec_write_dos(core, HEVC_MPRED_MV_RPTR,\n+\t\t\t\t col_mv_rd_start_addr);\n+\t} else {\n+\t\tamvdec_write_dos(core, HEVC_MPRED_MV_RPTR, col_mv_rd_ptr);\n+\t}\n+\n+\tamvdec_write_dos(core, HEVC_MPRED_MV_RD_END_ADDR, col_mv_rd_end_addr);\n+}\n+\n+/* Update motion prediction with the current slice */\n+static void codec_hevc_set_mpred(struct amvdec_session *sess,\n+\t\t\t\t struct hevc_frame *frame,\n+\t\t\t\t struct hevc_frame *col_frame)\n+{\n+\tstruct amvdec_core *core = sess->core;\n+\tstruct codec_hevc *hevc = sess->priv;\n+\tu32 *ref_num = frame->ref_num;\n+\tu32 *ref_poc_l0 = frame->ref_poc_list[0][frame->cur_slice_idx];\n+\tu32 *ref_poc_l1 = frame->ref_poc_list[1][frame->cur_slice_idx];\n+\tu32 val;\n+\tint i;\n+\n+\tcodec_hevc_set_mpred_ctrl(core, hevc);\n+\tcodec_hevc_set_mpred_mv(core, hevc, frame, col_frame);\n+\n+\tamvdec_write_dos(core, HEVC_MPRED_PIC_SIZE,\n+\t\t\t hevc->width | (hevc->height << 16));\n+\n+\tval = ((hevc->lcu_x_num - 1) | (hevc->lcu_y_num - 1) << 16);\n+\tamvdec_write_dos(core, HEVC_MPRED_PIC_SIZE_LCU, val);\n+\n+\tamvdec_write_dos(core, HEVC_MPRED_REF_NUM,\n+\t\t\t (ref_num[1] << 8) | ref_num[0]);\n+\tamvdec_write_dos(core, HEVC_MPRED_REF_EN_L0, (1 << ref_num[0]) - 1);\n+\tamvdec_write_dos(core, HEVC_MPRED_REF_EN_L1, (1 << ref_num[1]) - 1);\n+\n+\tamvdec_write_dos(core, HEVC_MPRED_CUR_POC, hevc->curr_poc);\n+\tamvdec_write_dos(core, HEVC_MPRED_COL_POC, hevc->col_poc);\n+\n+\tfor (i = 0; i < MAX_REF_ACTIVE; ++i) {\n+\t\tamvdec_write_dos(core, HEVC_MPRED_L0_REF00_POC + i * 4,\n+\t\t\t\t ref_poc_l0[i]);\n+\t\tamvdec_write_dos(core, HEVC_MPRED_L1_REF00_POC + i * 4,\n+\t\t\t\t ref_poc_l1[i]);\n+\t}\n+}\n+\n+/*  motion compensation reference cache controller */\n+static void codec_hevc_set_mcrcc(struct amvdec_session *sess)\n+{\n+\tstruct amvdec_core *core = sess->core;\n+\tstruct codec_hevc *hevc = sess->priv;\n+\tu32 val, val_2;\n+\tint l0_cnt = 0;\n+\tint l1_cnt = 0x7fff;\n+\n+\tif (!codec_hevc_use_fbc(sess->pixfmt_cap, hevc->is_10bit)) {\n+\t\tl0_cnt = hevc->cur_frame->ref_num[0];\n+\t\tl1_cnt = hevc->cur_frame->ref_num[1];\n+\t}\n+\n+\tif (hevc->cur_frame->cur_slice_type == I_SLICE) {\n+\t\tamvdec_write_dos(core, HEVCD_MCRCC_CTL1, 0);\n+\t\treturn;\n+\t}\n+\n+\tif (hevc->cur_frame->cur_slice_type == P_SLICE) {\n+\t\tamvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_ACCCONFIG_ADDR,\n+\t\t\t\t BIT(1));\n+\t\tval = amvdec_read_dos(core, HEVCD_MPP_ANC_CANVAS_DATA_ADDR);\n+\t\tval &= 0xffff;\n+\t\tval |= (val << 16);\n+\t\tamvdec_write_dos(core, HEVCD_MCRCC_CTL2, val);\n+\n+\t\tif (l0_cnt == 1) {\n+\t\t\tamvdec_write_dos(core, HEVCD_MCRCC_CTL3, val);\n+\t\t} else {\n+\t\t\tval = amvdec_read_dos(core,\n+\t\t\t\t\t      HEVCD_MPP_ANC_CANVAS_DATA_ADDR);\n+\t\t\tval &= 0xffff;\n+\t\t\tval |= (val << 16);\n+\t\t\tamvdec_write_dos(core, HEVCD_MCRCC_CTL3, val);\n+\t\t}\n+\t} else { /* B_SLICE */\n+\t\tamvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_ACCCONFIG_ADDR, 0);\n+\t\tval = amvdec_read_dos(core, HEVCD_MPP_ANC_CANVAS_DATA_ADDR);\n+\t\tval &= 0xffff;\n+\t\tval |= (val << 16);\n+\t\tamvdec_write_dos(core, HEVCD_MCRCC_CTL2, val);\n+\n+\t\tamvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_ACCCONFIG_ADDR,\n+\t\t\t\t BIT(12) | BIT(1));\n+\t\tval_2 = amvdec_read_dos(core, HEVCD_MPP_ANC_CANVAS_DATA_ADDR);\n+\t\tval_2 &= 0xffff;\n+\t\tval_2 |= (val_2 << 16);\n+\t\tif (val == val_2 && l1_cnt > 1) {\n+\t\t\tval_2 = amvdec_read_dos(core,\n+\t\t\t\t\t\tHEVCD_MPP_ANC_CANVAS_DATA_ADDR);\n+\t\t\tval_2 &= 0xffff;\n+\t\t\tval_2 |= (val_2 << 16);\n+\t\t}\n+\t\tamvdec_write_dos(core, HEVCD_MCRCC_CTL3, val);\n+\t}\n+\n+\t/* enable mcrcc progressive-mode */\n+\tamvdec_write_dos(core, HEVCD_MCRCC_CTL1, 0xff0);\n+}\n+\n+static void codec_hevc_set_ref_list(struct amvdec_session *sess,\n+\t\t\t\t    u32 ref_num, u32 *ref_poc_list)\n+{\n+\tstruct codec_hevc *hevc = sess->priv;\n+\tstruct hevc_frame *ref_frame;\n+\tstruct amvdec_core *core = sess->core;\n+\tint i;\n+\tu32 buf_id_y;\n+\tu32 buf_id_uv;\n+\n+\tfor (i = 0; i < ref_num; i++) {\n+\t\tref_frame = codec_hevc_get_frame_by_poc(hevc, ref_poc_list[i]);\n+\n+\t\tif (!ref_frame) {\n+\t\t\tdev_warn(core->dev, \"Couldn't find ref. frame %u\\n\",\n+\t\t\t\t ref_poc_list[i]);\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\tif (codec_hevc_use_fbc(sess->pixfmt_cap, hevc->is_10bit)) {\n+\t\t\tbuf_id_y = ref_frame->vbuf->vb2_buf.index;\n+\t\t\tbuf_id_uv = buf_id_y;\n+\t\t} else {\n+\t\t\tbuf_id_y = ref_frame->vbuf->vb2_buf.index * 2;\n+\t\t\tbuf_id_uv = buf_id_y + 1;\n+\t\t}\n+\n+\t\tamvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_DATA_ADDR,\n+\t\t\t\t (buf_id_uv << 16) |\n+\t\t\t\t (buf_id_uv << 8) |\n+\t\t\t\t buf_id_y);\n+\t}\n+}\n+\n+static void codec_hevc_set_mc(struct amvdec_session *sess,\n+\t\t\t      struct hevc_frame *frame)\n+{\n+\tstruct amvdec_core *core = sess->core;\n+\n+\tif (frame->cur_slice_type == I_SLICE)\n+\t\treturn;\n+\n+\tamvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_ACCCONFIG_ADDR, 1);\n+\tcodec_hevc_set_ref_list(sess, frame->ref_num[0],\n+\t\t\t\tframe->ref_poc_list[0][frame->cur_slice_idx]);\n+\n+\tif (frame->cur_slice_type == P_SLICE)\n+\t\treturn;\n+\n+\tamvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_ACCCONFIG_ADDR,\n+\t\t\t BIT(12) | BIT(0));\n+\tcodec_hevc_set_ref_list(sess, frame->ref_num[1],\n+\t\t\t\tframe->ref_poc_list[1][frame->cur_slice_idx]);\n+}\n+\n+static void codec_hevc_update_col_frame(struct codec_hevc *hevc)\n+{\n+\tstruct hevc_frame *cur_frame = hevc->cur_frame;\n+\tunion rpm_param *param = &hevc->rpm_param;\n+\tu32 list_no = 0;\n+\tu32 col_ref = param->p.collocated_ref_idx;\n+\tu32 col_from_l0 = param->p.collocated_from_l0_flag;\n+\tu32 cur_slice_idx = cur_frame->cur_slice_idx;\n+\n+\tif (cur_frame->cur_slice_type == B_SLICE)\n+\t\tlist_no = 1 - col_from_l0;\n+\n+\tif (col_ref >= cur_frame->ref_num[list_no])\n+\t\thevc->col_poc = INVALID_POC;\n+\telse\n+\t\thevc->col_poc = cur_frame->ref_poc_list[list_no]\n+\t\t\t\t\t\t       [cur_slice_idx]\n+\t\t\t\t\t\t       [col_ref];\n+\n+\tif (cur_frame->cur_slice_type == I_SLICE)\n+\t\tgoto end;\n+\n+\tif (hevc->col_poc != INVALID_POC)\n+\t\thevc->col_frame = codec_hevc_get_frame_by_poc(hevc,\n+\t\t\t\t\t\t\t      hevc->col_poc);\n+\telse\n+\t\thevc->col_frame = hevc->cur_frame;\n+\n+end:\n+\tif (!hevc->col_frame)\n+\t\thevc->col_frame = hevc->cur_frame;\n+}\n+\n+static void codec_hevc_update_pocs(struct amvdec_session *sess)\n+{\n+\tstruct codec_hevc *hevc = sess->priv;\n+\tunion rpm_param *param = &hevc->rpm_param;\n+\tu32 nal_unit_type = param->p.m_nalUnitType;\n+\tu32 temporal_id = param->p.m_temporalId & 0x7;\n+\tint max_poc_lsb =\n+\t\t1 << (param->p.log2_max_pic_order_cnt_lsb_minus4 + 4);\n+\tint prev_poc_lsb;\n+\tint prev_poc_msb;\n+\tint poc_msb;\n+\tint poc_lsb = param->p.POClsb;\n+\n+\tif (nal_unit_type == NAL_UNIT_CODED_SLICE_IDR ||\n+\t    nal_unit_type == NAL_UNIT_CODED_SLICE_IDR_N_LP) {\n+\t\thevc->curr_poc = 0;\n+\t\tif ((temporal_id - 1) == 0)\n+\t\t\thevc->prev_tid0_poc = hevc->curr_poc;\n+\n+\t\treturn;\n+\t}\n+\n+\tprev_poc_lsb = hevc->prev_tid0_poc % max_poc_lsb;\n+\tprev_poc_msb = hevc->prev_tid0_poc - prev_poc_lsb;\n+\n+\tif ((poc_lsb < prev_poc_lsb) &&\n+\t    ((prev_poc_lsb - poc_lsb) >= (max_poc_lsb / 2)))\n+\t\tpoc_msb = prev_poc_msb + max_poc_lsb;\n+\telse if ((poc_lsb > prev_poc_lsb) &&\n+\t\t ((poc_lsb - prev_poc_lsb) > (max_poc_lsb / 2)))\n+\t\tpoc_msb = prev_poc_msb - max_poc_lsb;\n+\telse\n+\t\tpoc_msb = prev_poc_msb;\n+\n+\tif (nal_unit_type == NAL_UNIT_CODED_SLICE_BLA   ||\n+\t    nal_unit_type == NAL_UNIT_CODED_SLICE_BLANT ||\n+\t    nal_unit_type == NAL_UNIT_CODED_SLICE_BLA_N_LP)\n+\t\tpoc_msb = 0;\n+\n+\thevc->curr_poc = (poc_msb + poc_lsb);\n+\tif ((temporal_id - 1) == 0)\n+\t\thevc->prev_tid0_poc = hevc->curr_poc;\n+}\n+\n+static void codec_hevc_process_segment_header(struct amvdec_session *sess)\n+{\n+\tstruct codec_hevc *hevc = sess->priv;\n+\tunion rpm_param *param = &hevc->rpm_param;\n+\n+\tif (param->p.first_slice_segment_in_pic_flag == 0) {\n+\t\thevc->slice_segment_addr = param->p.slice_segment_address;\n+\t\tif (!param->p.dependent_slice_segment_flag)\n+\t\t\thevc->slice_addr = hevc->slice_segment_addr;\n+\t} else {\n+\t\thevc->slice_segment_addr = 0;\n+\t\thevc->slice_addr = 0;\n+\t}\n+\n+\tcodec_hevc_update_pocs(sess);\n+}\n+\n+static int codec_hevc_process_segment(struct amvdec_session *sess)\n+{\n+\tstruct codec_hevc *hevc = sess->priv;\n+\tstruct amvdec_core *core = sess->core;\n+\tunion rpm_param *param = &hevc->rpm_param;\n+\tu32 slice_segment_address = param->p.slice_segment_address;\n+\n+\t/* First slice: new frame */\n+\tif (slice_segment_address == 0) {\n+\t\tcodec_hevc_update_referenced(hevc);\n+\t\tcodec_hevc_show_frames(sess);\n+\n+\t\thevc->cur_frame = codec_hevc_prepare_new_frame(sess);\n+\t\tif (!hevc->cur_frame)\n+\t\t\treturn -1;\n+\t} else {\n+\t\thevc->cur_frame->cur_slice_idx++;\n+\t}\n+\n+\tcodec_hevc_update_frame_refs(sess, hevc->cur_frame);\n+\tcodec_hevc_update_col_frame(hevc);\n+\tcodec_hevc_update_ldc_flag(hevc);\n+\tif (codec_hevc_use_mmu(core->platform->revision, sess->pixfmt_cap,\n+\t\t\t       hevc->is_10bit))\n+\t\tcodec_hevc_fill_mmu_map(sess, &hevc->common,\n+\t\t\t\t\t&hevc->cur_frame->vbuf->vb2_buf,\n+\t\t\t\t\thevc->is_10bit);\n+\tcodec_hevc_set_mc(sess, hevc->cur_frame);\n+\tcodec_hevc_set_mcrcc(sess);\n+\tcodec_hevc_set_mpred(sess, hevc->cur_frame, hevc->col_frame);\n+\tcodec_hevc_set_sao(sess, hevc->cur_frame);\n+\n+\tamvdec_write_dos_bits(core, HEVC_WAIT_FLAG, BIT(1));\n+\tamvdec_write_dos(core, HEVC_DEC_STATUS_REG,\n+\t\t\t HEVC_CODED_SLICE_SEGMENT_DAT);\n+\n+\t/* Interrupt the firmware's processor */\n+\tamvdec_write_dos(core, HEVC_MCPU_INTR_REQ, AMRISC_MAIN_REQ);\n+\n+\treturn 0;\n+}\n+\n+static int codec_hevc_process_rpm(struct codec_hevc *hevc)\n+{\n+\tunion rpm_param *param = &hevc->rpm_param;\n+\tint src_changed = 0;\n+\tu32 dst_width, dst_height;\n+\tu32 lcu_size;\n+\tu32 is_10bit = 0;\n+\n+\tif (param->p.slice_segment_address\t||\n+\t    !param->p.pic_width_in_luma_samples\t||\n+\t    !param->p.pic_height_in_luma_samples)\n+\t\treturn 0;\n+\n+\tif (param->p.bit_depth)\n+\t\tis_10bit = 1;\n+\n+\thevc->width = param->p.pic_width_in_luma_samples;\n+\thevc->height = param->p.pic_height_in_luma_samples;\n+\tdst_width = hevc->width;\n+\tdst_height = hevc->height;\n+\n+\tlcu_size = 1 << (param->p.log2_min_coding_block_size_minus3 +\n+\t\t   3 + param->p.log2_diff_max_min_coding_block_size);\n+\n+\thevc->lcu_x_num = (hevc->width + lcu_size - 1) / lcu_size;\n+\thevc->lcu_y_num = (hevc->height + lcu_size - 1) / lcu_size;\n+\thevc->lcu_total = hevc->lcu_x_num * hevc->lcu_y_num;\n+\n+\tif (param->p.conformance_window_flag) {\n+\t\tu32 sub_width = 1, sub_height = 1;\n+\n+\t\tswitch (param->p.chroma_format_idc) {\n+\t\tcase 1:\n+\t\t\tsub_height = 2;\n+\t\t\tfallthrough;\n+\t\tcase 2:\n+\t\t\tsub_width = 2;\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tdst_width -= sub_width *\n+\t\t\t     (param->p.conf_win_left_offset +\n+\t\t\t      param->p.conf_win_right_offset);\n+\t\tdst_height -= sub_height *\n+\t\t\t      (param->p.conf_win_top_offset +\n+\t\t\t       param->p.conf_win_bottom_offset);\n+\t}\n+\n+\tif (dst_width != hevc->dst_width ||\n+\t    dst_height != hevc->dst_height ||\n+\t    lcu_size != hevc->lcu_size ||\n+\t    is_10bit != hevc->is_10bit)\n+\t\tsrc_changed = 1;\n+\n+\thevc->dst_width = dst_width;\n+\thevc->dst_height = dst_height;\n+\thevc->lcu_size = lcu_size;\n+\thevc->is_10bit = is_10bit;\n+\n+\treturn src_changed;\n+}\n+\n+/*\n+ * The RPM section within the workspace contains\n+ * many information regarding the parsed bitstream\n+ */\n+static void codec_hevc_fetch_rpm(struct amvdec_session *sess)\n+{\n+\tstruct codec_hevc *hevc = sess->priv;\n+\tu16 *rpm_vaddr = hevc->workspace_vaddr + RPM_OFFSET;\n+\tint i, j;\n+\n+\tfor (i = 0; i < RPM_SIZE; i += 4) {\n+\t\tfor (j = 0; j < 4; j++)\n+\t\t\thevc->rpm_param.l.data[i + j] =\n+\t\t\t\trpm_vaddr[i + 3 - j];\n+\t}\n+}\n+\n+static void codec_hevc_resume(struct amvdec_session *sess)\n+{\n+\tstruct codec_hevc *hevc = sess->priv;\n+\n+\tif (codec_hevc_setup_buffers(sess, &hevc->common, hevc->is_10bit)) {\n+\t\tamvdec_abort(sess);\n+\t\treturn;\n+\t}\n+\n+\tcodec_hevc_setup_decode_head(sess, hevc->is_10bit);\n+\tcodec_hevc_process_segment_header(sess);\n+\tif (codec_hevc_process_segment(sess))\n+\t\tamvdec_abort(sess);\n+}\n+\n+static irqreturn_t codec_hevc_threaded_isr(struct amvdec_session *sess)\n+{\n+\tstruct amvdec_core *core = sess->core;\n+\tstruct codec_hevc *hevc = sess->priv;\n+\tu32 dec_status = amvdec_read_dos(core, HEVC_DEC_STATUS_REG);\n+\n+\tif (!hevc)\n+\t\treturn IRQ_HANDLED;\n+\n+\tmutex_lock(&hevc->lock);\n+\tif (dec_status != HEVC_SLICE_SEGMENT_DONE) {\n+\t\tdev_err(core->dev_dec, \"Unrecognized dec_status: %08X\\n\",\n+\t\t\tdec_status);\n+\t\tamvdec_abort(sess);\n+\t\tgoto unlock;\n+\t}\n+\n+\tsess->keyframe_found = 1;\n+\tcodec_hevc_fetch_rpm(sess);\n+\tif (codec_hevc_process_rpm(hevc)) {\n+\t\tamvdec_src_change(sess, hevc->dst_width, hevc->dst_height, 16,\n+\t\t\t\t  hevc->is_10bit ? 10 : 8);\n+\t\tgoto unlock;\n+\t}\n+\n+\tcodec_hevc_process_segment_header(sess);\n+\tif (codec_hevc_process_segment(sess))\n+\t\tamvdec_abort(sess);\n+\n+unlock:\n+\tmutex_unlock(&hevc->lock);\n+\treturn IRQ_HANDLED;\n+}\n+\n+static irqreturn_t codec_hevc_isr(struct amvdec_session *sess)\n+{\n+\treturn IRQ_WAKE_THREAD;\n+}\n+\n+struct amvdec_codec_ops codec_hevc_ops = {\n+\t.start = codec_hevc_start,\n+\t.stop = codec_hevc_stop,\n+\t.isr = codec_hevc_isr,\n+\t.threaded_isr = codec_hevc_threaded_isr,\n+\t.num_pending_bufs = codec_hevc_num_pending_bufs,\n+\t.drain = codec_hevc_flush_output,\n+\t.resume = codec_hevc_resume,\n+};\ndiff --git a/drivers/staging/media/meson/vdec/codec_hevc.h b/drivers/staging/media/meson/vdec/codec_hevc.h\nnew file mode 100644\nindex 000000000000..f2f9b2464df1\n--- /dev/null\n+++ b/drivers/staging/media/meson/vdec/codec_hevc.h\n@@ -0,0 +1,13 @@\n+/* SPDX-License-Identifier: GPL-2.0+ */\n+/*\n+ * Copyright (C) 2018 Maxime Jourdan <maxi.jourdan@wanadoo.fr>\n+ */\n+\n+#ifndef __MESON_VDEC_CODEC_HEVC_H_\n+#define __MESON_VDEC_CODEC_HEVC_H_\n+\n+#include \"vdec.h\"\n+\n+extern struct amvdec_codec_ops codec_hevc_ops;\n+\n+#endif\ndiff --git a/drivers/staging/media/meson/vdec/esparser.c b/drivers/staging/media/meson/vdec/esparser.c\nindex 3cd29ab4f979..6988348ce714 100644\n--- a/drivers/staging/media/meson/vdec/esparser.c\n+++ b/drivers/staging/media/meson/vdec/esparser.c\n@@ -310,7 +310,8 @@ esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf)\n \t * they could pause when there is no capture buffer available and\n \t * resume on this notification.\n \t */\n-\tif (sess->fmt_out->pixfmt == V4L2_PIX_FMT_VP9) {\n+\tif (sess->fmt_out->pixfmt == V4L2_PIX_FMT_VP9 ||\n+\t    sess->fmt_out->pixfmt == V4L2_PIX_FMT_HEVC) {\n \t\tif (codec_ops->num_pending_bufs)\n \t\t\tnum_dst_bufs = codec_ops->num_pending_bufs(sess);\n \ndiff --git a/drivers/staging/media/meson/vdec/hevc_regs.h b/drivers/staging/media/meson/vdec/hevc_regs.h\nindex 0392f41a1eed..e7eabdd2b119 100644\n--- a/drivers/staging/media/meson/vdec/hevc_regs.h\n+++ b/drivers/staging/media/meson/vdec/hevc_regs.h\n@@ -205,6 +205,7 @@\n #define HEVC_CM_HEADER_START_ADDR 0xd8a0\n #define HEVC_CM_HEADER_LENGTH 0xd8a4\n #define HEVC_CM_HEADER_OFFSET 0xd8ac\n+#define HEVC_SAO_CTRL9 0xd8b4\n #define HEVC_SAO_MMU_VH0_ADDR 0xd8e8\n #define HEVC_SAO_MMU_VH1_ADDR 0xd8ec\n \ndiff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c\nindex 88c9d72e1c83..ea2aa0e8cf0b 100644\n--- a/drivers/staging/media/meson/vdec/vdec_platform.c\n+++ b/drivers/staging/media/meson/vdec/vdec_platform.c\n@@ -11,10 +11,23 @@\n #include \"vdec_hevc.h\"\n #include \"codec_mpeg12.h\"\n #include \"codec_h264.h\"\n+#include \"codec_hevc.h\"\n #include \"codec_vp9.h\"\n \n static const struct amvdec_format vdec_formats_gxbb[] = {\n \t{\n+\t\t.pixfmt = V4L2_PIX_FMT_HEVC,\n+\t\t.min_buffers = 4,\n+\t\t.max_buffers = 24,\n+\t\t.max_width = 3840,\n+\t\t.max_height = 2160,\n+\t\t.vdec_ops = &vdec_hevc_ops,\n+\t\t.codec_ops = &codec_hevc_ops,\n+\t\t.firmware_path = \"meson/vdec/gxl_hevc.bin\",\n+\t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },\n+\t\t.flags = V4L2_FMT_FLAG_COMPRESSED |\n+\t\t\t V4L2_FMT_FLAG_DYN_RESOLUTION,\n+\t}, {\n \t\t.pixfmt = V4L2_PIX_FMT_H264,\n \t\t.min_buffers = 2,\n \t\t.max_buffers = 24,\n@@ -64,6 +77,18 @@ static const struct amvdec_format vdec_formats_gxl[] = {\n \t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },\n \t\t.flags = V4L2_FMT_FLAG_COMPRESSED |\n \t\t\t V4L2_FMT_FLAG_DYN_RESOLUTION,\n+\t}, {\n+\t\t.pixfmt = V4L2_PIX_FMT_HEVC,\n+\t\t.min_buffers = 4,\n+\t\t.max_buffers = 24,\n+\t\t.max_width = 3840,\n+\t\t.max_height = 2160,\n+\t\t.vdec_ops = &vdec_hevc_ops,\n+\t\t.codec_ops = &codec_hevc_ops,\n+\t\t.firmware_path = \"meson/vdec/gxl_hevc.bin\",\n+\t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },\n+\t\t.flags = V4L2_FMT_FLAG_COMPRESSED |\n+\t\t\t V4L2_FMT_FLAG_DYN_RESOLUTION,\n \t}, {\n \t\t.pixfmt = V4L2_PIX_FMT_H264,\n \t\t.min_buffers = 2,\n@@ -114,6 +139,18 @@ static const struct amvdec_format vdec_formats_gxm[] = {\n \t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },\n \t\t.flags = V4L2_FMT_FLAG_COMPRESSED |\n \t\t\t V4L2_FMT_FLAG_DYN_RESOLUTION,\n+\t}, {\n+\t\t.pixfmt = V4L2_PIX_FMT_HEVC,\n+\t\t.min_buffers = 4,\n+\t\t.max_buffers = 24,\n+\t\t.max_width = 3840,\n+\t\t.max_height = 2160,\n+\t\t.vdec_ops = &vdec_hevc_ops,\n+\t\t.codec_ops = &codec_hevc_ops,\n+\t\t.firmware_path = \"meson/vdec/gxl_hevc.bin\",\n+\t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },\n+\t\t.flags = V4L2_FMT_FLAG_COMPRESSED |\n+\t\t\t V4L2_FMT_FLAG_DYN_RESOLUTION,\n \t}, {\n \t\t.pixfmt = V4L2_PIX_FMT_H264,\n \t\t.min_buffers = 2,\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0061-FROMLIST-v2-dt-bindings-serial-amlogic-meson-uart-Ad.patch",
    "content": "From f9e1f4f9ae2a9390cc8bde8742f4454acc29ff0f Mon Sep 17 00:00:00 2001\nFrom: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nDate: Wed, 22 Feb 2023 21:41:53 +0100\nSubject: [PATCH 061/120] FROMLIST(v2): dt-bindings: serial:\n amlogic,meson-uart: Add compatible string for G12A\n\nAmlogic G12A SoCs gained a new \"divide XTAL by 2\" bit. Everything else\n(we know about) is identical to the UART IP on GX (GXBB/GXL/GXM) SoCs.\nAdd a new compatible string for this SoC so this new bit can be managed\naccordingly while keeping \"amlogic,meson-gx-uart\" as fallback compatible\nstring.\n\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n .../bindings/serial/amlogic,meson-uart.yaml   | 28 +++++++++++++------\n 1 file changed, 19 insertions(+), 9 deletions(-)\n\ndiff --git a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml\nindex 7822705ad16c..644d52859497 100644\n--- a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml\n+++ b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml\n@@ -23,21 +23,31 @@ properties:\n   compatible:\n     oneOf:\n       - description: Always-on power domain UART controller\n-        items:\n+        oneOf:\n+          - items:\n+              - enum:\n+                  - amlogic,meson6-uart\n+                  - amlogic,meson8-uart\n+                  - amlogic,meson8b-uart\n+                  - amlogic,meson-gx-uart\n+                  - amlogic,meson-s4-uart\n+              - const: amlogic,meson-ao-uart\n+          - items:\n+              - const: amlogic,meson-g12a-uart\n+              - const: amlogic,meson-gx-uart\n+              - const: amlogic,meson-ao-uart\n+      - description: Everything-Else power domain UART controller\n+        oneOf:\n           - enum:\n               - amlogic,meson6-uart\n               - amlogic,meson8-uart\n               - amlogic,meson8b-uart\n               - amlogic,meson-gx-uart\n+              - amlogic,meson-g12a-uart\n               - amlogic,meson-s4-uart\n-          - const: amlogic,meson-ao-uart\n-      - description: Everything-Else power domain UART controller\n-        enum:\n-          - amlogic,meson6-uart\n-          - amlogic,meson8-uart\n-          - amlogic,meson8b-uart\n-          - amlogic,meson-gx-uart\n-          - amlogic,meson-s4-uart\n+          - items:\n+              - const: amlogic,meson-g12a-uart\n+              - const: amlogic,meson-gx-uart\n \n   reg:\n     maxItems: 1\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0062-FROMLIST-v2-tty-serial-meson-Add-a-new-compatible-st.patch",
    "content": "From 6784e19cbe62900c5524fe8e2b5b6216f7fb2ae5 Mon Sep 17 00:00:00 2001\nFrom: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nDate: Wed, 22 Feb 2023 21:44:16 +0100\nSubject: [PATCH 062/120] FROMLIST(v2): tty: serial: meson: Add a new\n compatible string for the G12A SoC\n\nAmlogic Meson G12A (and later) SoCs also have the \"divide XTAL by 2\" bit\nas the S4 UART controllers. Add a new compatible string for these SoCs\nand enable the has_xtal_div2 flag for them.\n\nTested-by: Christian Hewitt <christianshewitt@gmail.com>\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n drivers/tty/serial/meson_uart.c | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c\nindex 056243c12836..931965d2fecc 100644\n--- a/drivers/tty/serial/meson_uart.c\n+++ b/drivers/tty/serial/meson_uart.c\n@@ -780,7 +780,7 @@ static int meson_uart_remove(struct platform_device *pdev)\n \treturn 0;\n }\n \n-static struct meson_uart_data s4_uart_data = {\n+static struct meson_uart_data meson_g12a_uart_data = {\n \t.has_xtal_div2 = true,\n };\n \n@@ -789,9 +789,13 @@ static const struct of_device_id meson_uart_dt_match[] = {\n \t{ .compatible = \"amlogic,meson8-uart\" },\n \t{ .compatible = \"amlogic,meson8b-uart\" },\n \t{ .compatible = \"amlogic,meson-gx-uart\" },\n+\t{\n+\t\t.compatible = \"amlogic,meson-g12a-uart\",\n+\t\t.data = (void *)&meson_g12a_uart_data,\n+\t},\n \t{\n \t\t.compatible = \"amlogic,meson-s4-uart\",\n-\t\t.data = (void *)&s4_uart_data,\n+\t\t.data = (void *)&meson_g12a_uart_data,\n \t},\n \t{ /* sentinel */ },\n };\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0063-FROMLIST-v2-arm64-dts-meson-g12-common-Use-the-G12A-.patch",
    "content": "From 9bf0bf029cc3ddea57cab66ea49db0d69048ee99 Mon Sep 17 00:00:00 2001\nFrom: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\nDate: Wed, 22 Feb 2023 21:47:16 +0100\nSubject: [PATCH 063/120] FROMLIST(v2): arm64: dts: meson-g12-common: Use the\n G12A UART compatible string\n\nSwitch meson-12-common.dtsi to use the Meson G12A specific UART\ncompatible string. This enables the \"divide XTAL by 2\" divider which\nimproves support for UART attached Bluetooth modules (for example\nRTL8822CS) running at a baud rate of 1500000. Without dividing XTAL\n(24MHz) by 2 a baud rate of 1500000 cannot be generated cleanly and the\nresulting jitter breaks communication with the module.\n\nTested-by: Christian Hewitt <christianshewitt@gmail.com>\nSigned-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>\n---\n arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 15 ++++++++++-----\n 1 file changed, 10 insertions(+), 5 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi\nindex bb2e86073261..ec78283d9a9e 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi\n@@ -2040,7 +2040,8 @@ pwm_AO_cd: pwm@2000 {\n \t\t\t};\n \n \t\t\tuart_AO: serial@3000 {\n-\t\t\t\tcompatible = \"amlogic,meson-gx-uart\",\n+\t\t\t\tcompatible = \"amlogic,meson-g12a-uart\",\n+\t\t\t\t\t     \"amlogic,meson-gx-uart\",\n \t\t\t\t\t     \"amlogic,meson-ao-uart\";\n \t\t\t\treg = <0x0 0x3000 0x0 0x18>;\n \t\t\t\tinterrupts = <GIC_SPI 193 IRQ_TYPE_EDGE_RISING>;\n@@ -2050,7 +2051,8 @@ uart_AO: serial@3000 {\n \t\t\t};\n \n \t\t\tuart_AO_B: serial@4000 {\n-\t\t\t\tcompatible = \"amlogic,meson-gx-uart\",\n+\t\t\t\tcompatible = \"amlogic,meson-g12a-uart\",\n+\t\t\t\t\t     \"amlogic,meson-gx-uart\",\n \t\t\t\t\t     \"amlogic,meson-ao-uart\";\n \t\t\t\treg = <0x0 0x4000 0x0 0x18>;\n \t\t\t\tinterrupts = <GIC_SPI 197 IRQ_TYPE_EDGE_RISING>;\n@@ -2287,7 +2289,8 @@ clk_msr: clock-measure@18000 {\n \t\t\t};\n \n \t\t\tuart_C: serial@22000 {\n-\t\t\t\tcompatible = \"amlogic,meson-gx-uart\";\n+\t\t\t\tcompatible = \"amlogic,meson-g12a-uart\",\n+\t\t\t\t\t     \"amlogic,meson-gx-uart\";\n \t\t\t\treg = <0x0 0x22000 0x0 0x18>;\n \t\t\t\tinterrupts = <GIC_SPI 93 IRQ_TYPE_EDGE_RISING>;\n \t\t\t\tclocks = <&xtal>, <&clkc CLKID_UART2>, <&xtal>;\n@@ -2296,7 +2299,8 @@ uart_C: serial@22000 {\n \t\t\t};\n \n \t\t\tuart_B: serial@23000 {\n-\t\t\t\tcompatible = \"amlogic,meson-gx-uart\";\n+\t\t\t\tcompatible = \"amlogic,meson-g12a-uart\",\n+\t\t\t\t\t     \"amlogic,meson-gx-uart\";\n \t\t\t\treg = <0x0 0x23000 0x0 0x18>;\n \t\t\t\tinterrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>;\n \t\t\t\tclocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>;\n@@ -2305,7 +2309,8 @@ uart_B: serial@23000 {\n \t\t\t};\n \n \t\t\tuart_A: serial@24000 {\n-\t\t\t\tcompatible = \"amlogic,meson-gx-uart\";\n+\t\t\t\tcompatible = \"amlogic,meson-g12a-uart\",\n+\t\t\t\t\t     \"amlogic,meson-gx-uart\";\n \t\t\t\treg = <0x0 0x24000 0x0 0x18>;\n \t\t\t\tinterrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;\n \t\t\t\tclocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>;\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0064-WIP-media-meson-vdec-disable-MPEG1-MPEG2-hardware-de.patch",
    "content": "From 866fcbd4b9f8e1f3502ab857a23a7a19f2d0ba9e Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 5 Jan 2023 15:16:46 +0000\nSubject: [PATCH 064/120] WIP: media: meson: vdec: disable MPEG1/MPEG2 hardware\n decoding\n\nThe MPEG1/2 decoder is broken and nobody has volunteered to poke\ncode and fix it. As media is almost never over 1080p resolution\nboards should be able to software decode it. So lets just disable\nhardware decoding for now.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../staging/media/meson/vdec/vdec_platform.c  | 110 ------------------\n 1 file changed, 110 deletions(-)\n\ndiff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c\nindex ea2aa0e8cf0b..1c0d188929dc 100644\n--- a/drivers/staging/media/meson/vdec/vdec_platform.c\n+++ b/drivers/staging/media/meson/vdec/vdec_platform.c\n@@ -39,28 +39,6 @@ static const struct amvdec_format vdec_formats_gxbb[] = {\n \t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },\n \t\t.flags = V4L2_FMT_FLAG_COMPRESSED |\n \t\t\t V4L2_FMT_FLAG_DYN_RESOLUTION,\n-\t}, {\n-\t\t.pixfmt = V4L2_PIX_FMT_MPEG1,\n-\t\t.min_buffers = 8,\n-\t\t.max_buffers = 8,\n-\t\t.max_width = 1920,\n-\t\t.max_height = 1080,\n-\t\t.vdec_ops = &vdec_1_ops,\n-\t\t.codec_ops = &codec_mpeg12_ops,\n-\t\t.firmware_path = \"meson/vdec/gxl_mpeg12.bin\",\n-\t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },\n-\t\t.flags = V4L2_FMT_FLAG_COMPRESSED,\n-\t}, {\n-\t\t.pixfmt = V4L2_PIX_FMT_MPEG2,\n-\t\t.min_buffers = 8,\n-\t\t.max_buffers = 8,\n-\t\t.max_width = 1920,\n-\t\t.max_height = 1080,\n-\t\t.vdec_ops = &vdec_1_ops,\n-\t\t.codec_ops = &codec_mpeg12_ops,\n-\t\t.firmware_path = \"meson/vdec/gxl_mpeg12.bin\",\n-\t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },\n-\t\t.flags = V4L2_FMT_FLAG_COMPRESSED,\n \t},\n };\n \n@@ -101,28 +79,6 @@ static const struct amvdec_format vdec_formats_gxl[] = {\n \t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },\n \t\t.flags = V4L2_FMT_FLAG_COMPRESSED |\n \t\t\t V4L2_FMT_FLAG_DYN_RESOLUTION,\n-\t}, {\n-\t\t.pixfmt = V4L2_PIX_FMT_MPEG1,\n-\t\t.min_buffers = 8,\n-\t\t.max_buffers = 8,\n-\t\t.max_width = 1920,\n-\t\t.max_height = 1080,\n-\t\t.vdec_ops = &vdec_1_ops,\n-\t\t.codec_ops = &codec_mpeg12_ops,\n-\t\t.firmware_path = \"meson/vdec/gxl_mpeg12.bin\",\n-\t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },\n-\t\t.flags = V4L2_FMT_FLAG_COMPRESSED,\n-\t}, {\n-\t\t.pixfmt = V4L2_PIX_FMT_MPEG2,\n-\t\t.min_buffers = 8,\n-\t\t.max_buffers = 8,\n-\t\t.max_width = 1920,\n-\t\t.max_height = 1080,\n-\t\t.vdec_ops = &vdec_1_ops,\n-\t\t.codec_ops = &codec_mpeg12_ops,\n-\t\t.firmware_path = \"meson/vdec/gxl_mpeg12.bin\",\n-\t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },\n-\t\t.flags = V4L2_FMT_FLAG_COMPRESSED,\n \t},\n };\n \n@@ -163,28 +119,6 @@ static const struct amvdec_format vdec_formats_gxm[] = {\n \t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },\n \t\t.flags = V4L2_FMT_FLAG_COMPRESSED |\n \t\t\t V4L2_FMT_FLAG_DYN_RESOLUTION,\n-\t}, {\n-\t\t.pixfmt = V4L2_PIX_FMT_MPEG1,\n-\t\t.min_buffers = 8,\n-\t\t.max_buffers = 8,\n-\t\t.max_width = 1920,\n-\t\t.max_height = 1080,\n-\t\t.vdec_ops = &vdec_1_ops,\n-\t\t.codec_ops = &codec_mpeg12_ops,\n-\t\t.firmware_path = \"meson/vdec/gxl_mpeg12.bin\",\n-\t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },\n-\t\t.flags = V4L2_FMT_FLAG_COMPRESSED,\n-\t}, {\n-\t\t.pixfmt = V4L2_PIX_FMT_MPEG2,\n-\t\t.min_buffers = 8,\n-\t\t.max_buffers = 8,\n-\t\t.max_width = 1920,\n-\t\t.max_height = 1080,\n-\t\t.vdec_ops = &vdec_1_ops,\n-\t\t.codec_ops = &codec_mpeg12_ops,\n-\t\t.firmware_path = \"meson/vdec/gxl_mpeg12.bin\",\n-\t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },\n-\t\t.flags = V4L2_FMT_FLAG_COMPRESSED,\n \t},\n };\n \n@@ -213,28 +147,6 @@ static const struct amvdec_format vdec_formats_g12a[] = {\n \t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },\n \t\t.flags = V4L2_FMT_FLAG_COMPRESSED |\n \t\t\t V4L2_FMT_FLAG_DYN_RESOLUTION,\n-\t}, {\n-\t\t.pixfmt = V4L2_PIX_FMT_MPEG1,\n-\t\t.min_buffers = 8,\n-\t\t.max_buffers = 8,\n-\t\t.max_width = 1920,\n-\t\t.max_height = 1080,\n-\t\t.vdec_ops = &vdec_1_ops,\n-\t\t.codec_ops = &codec_mpeg12_ops,\n-\t\t.firmware_path = \"meson/vdec/gxl_mpeg12.bin\",\n-\t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },\n-\t\t.flags = V4L2_FMT_FLAG_COMPRESSED,\n-\t}, {\n-\t\t.pixfmt = V4L2_PIX_FMT_MPEG2,\n-\t\t.min_buffers = 8,\n-\t\t.max_buffers = 8,\n-\t\t.max_width = 1920,\n-\t\t.max_height = 1080,\n-\t\t.vdec_ops = &vdec_1_ops,\n-\t\t.codec_ops = &codec_mpeg12_ops,\n-\t\t.firmware_path = \"meson/vdec/gxl_mpeg12.bin\",\n-\t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },\n-\t\t.flags = V4L2_FMT_FLAG_COMPRESSED,\n \t},\n };\n \n@@ -263,28 +175,6 @@ static const struct amvdec_format vdec_formats_sm1[] = {\n \t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },\n \t\t.flags = V4L2_FMT_FLAG_COMPRESSED |\n \t\t\t V4L2_FMT_FLAG_DYN_RESOLUTION,\n-\t}, {\n-\t\t.pixfmt = V4L2_PIX_FMT_MPEG1,\n-\t\t.min_buffers = 8,\n-\t\t.max_buffers = 8,\n-\t\t.max_width = 1920,\n-\t\t.max_height = 1080,\n-\t\t.vdec_ops = &vdec_1_ops,\n-\t\t.codec_ops = &codec_mpeg12_ops,\n-\t\t.firmware_path = \"meson/vdec/gxl_mpeg12.bin\",\n-\t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },\n-\t\t.flags = V4L2_FMT_FLAG_COMPRESSED,\n-\t}, {\n-\t\t.pixfmt = V4L2_PIX_FMT_MPEG2,\n-\t\t.min_buffers = 8,\n-\t\t.max_buffers = 8,\n-\t\t.max_width = 1920,\n-\t\t.max_height = 1080,\n-\t\t.vdec_ops = &vdec_1_ops,\n-\t\t.codec_ops = &codec_mpeg12_ops,\n-\t\t.firmware_path = \"meson/vdec/gxl_mpeg12.bin\",\n-\t\t.pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },\n-\t\t.flags = V4L2_FMT_FLAG_COMPRESSED,\n \t},\n };\n \n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0065-WIP-arm64-dts-meson-set-p212-p23x-q20x-SDIO-to-100MH.patch",
    "content": "From 705f27c026178c3cc9af1142fcbea2f686e034a5 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Tue, 18 Jan 2022 15:09:12 +0000\nSubject: [PATCH 065/120] WIP: arm64: dts: meson: set p212/p23x/q20x SDIO to\n 100MHz\n\nAmlogic datasheets describe 50MHz max-frequency for SDIO on GXL/GXM but\nreal-world tests on an assortment of GXL and GXM boards show noteable\nincreases in throughput when max-frequency is 100MHz, so let's use it.\n\nBefore results from a p231 device:\n\nConnecting to host 192.168.0.1, port 5201\nReverse mode, remote host 192.168.0.1 is sending\n[  5] local 192.168.0.41 port 42550 connected to 192.168.0.1 port 5201\n[ ID] Interval           Transfer     Bitrate\n[  5]   0.00-1.00   sec  8.84 MBytes  74.2 Mbits/sec\n[  5]   1.00-2.00   sec  9.60 MBytes  80.5 Mbits/sec\n[  5]   2.00-3.00   sec  9.07 MBytes  76.1 Mbits/sec\n[  5]   3.00-4.00   sec  9.14 MBytes  76.6 Mbits/sec\n[  5]   4.00-5.00   sec  9.26 MBytes  77.7 Mbits/sec\n[  5]   5.00-6.00   sec  9.08 MBytes  76.2 Mbits/sec\n[  5]   6.00-7.00   sec  9.11 MBytes  76.4 Mbits/sec\n[  5]   7.00-8.00   sec  8.65 MBytes  72.5 Mbits/sec\n[  5]   8.00-9.00   sec  9.24 MBytes  77.5 Mbits/sec\n[  5]   9.00-10.00  sec  8.57 MBytes  71.9 Mbits/sec\n- - - - - - - - - - - - - - - - - - - - - - - - -\n[ ID] Interval           Transfer     Bitrate         Retr\n[  5]   0.00-10.27  sec  94.1 MBytes  76.8 Mbits/sec    0             sender\n[  5]   0.00-10.00  sec  90.6 MBytes  76.0 Mbits/sec                  receiver\n\nclock:\t\t50000000 Hz\nactual clock:\t50000000 Hz\nvdd:\t\t21 (3.3 ~ 3.4 V)\nbus mode:\t2 (push-pull)\nchip select:\t0 (don't care)\npower mode:\t2 (on)\nbus width:\t2 (4 bits)\ntiming spec:\t2 (sd high-speed)\nsignal voltage:\t1 (1.80 V)\ndriver type:\t0 (driver type B)\n\nAfter results from a p231 device:\n\nConnecting to host 192.168.0.1, port 5201\nReverse mode, remote host 192.168.0.1 is sending\n[  5] local 192.168.0.41 port 58534 connected to 192.168.0.1 port 5201\n[ ID] Interval           Transfer     Bitrate\n[  5]   0.00-1.00   sec  12.6 MBytes   106 Mbits/sec\n[  5]   1.00-2.00   sec  13.0 MBytes   109 Mbits/sec\n[  5]   2.00-3.00   sec  12.8 MBytes   107 Mbits/sec\n[  5]   3.00-4.00   sec  13.2 MBytes   111 Mbits/sec\n[  5]   4.00-5.00   sec  12.4 MBytes   104 Mbits/sec\n[  5]   5.00-6.00   sec  11.2 MBytes  93.9 Mbits/sec\n[  5]   6.00-7.00   sec  12.3 MBytes   103 Mbits/sec\n[  5]   7.00-8.00   sec  12.3 MBytes   103 Mbits/sec\n[  5]   8.00-9.00   sec  12.5 MBytes   105 Mbits/sec\n[  5]   9.00-10.00  sec  12.3 MBytes   103 Mbits/sec\n- - - - - - - - - - - - - - - - - - - - - - - - -\n[ ID] Interval           Transfer     Bitrate         Retr\n[  5]   0.00-10.22  sec   127 MBytes   104 Mbits/sec    0             sender\n[  5]   0.00-10.00  sec   125 MBytes   105 Mbits/sec                  receiver\n\nclock:\t\t100000000 Hz\nactual clock:\t100000000 Hz\nvdd:\t\t21 (3.3 ~ 3.4 V)\nbus mode:\t2 (push-pull)\nchip select:\t0 (don't care)\npower mode:\t2 (on)\nbus width:\t2 (4 bits)\ntiming spec:\t6 (sd uhs SDR104)\nsignal voltage:\t1 (1.80 V)\ndriver type:\t0 (driver type B)\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi   | 2 +-\n arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi\nindex dafc841f7c16..8d315508360d 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi\n@@ -259,7 +259,7 @@ &sd_emmc_a {\n \n \tbus-width = <4>;\n \tcap-sd-highspeed;\n-\tmax-frequency = <50000000>;\n+\tmax-frequency = <100000000>;\n \n \tnon-removable;\n \tdisable-wp;\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi\nindex a150cc0e18ff..b3d7b8613d6d 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi\n@@ -121,7 +121,7 @@ &sd_emmc_a {\n \n \tbus-width = <4>;\n \tcap-sd-highspeed;\n-\tmax-frequency = <50000000>;\n+\tmax-frequency = <100000000>;\n \n \tnon-removable;\n \tdisable-wp;\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0066-WIP-arm64-dts-meson-add-UHS-SDIO-capabilities-to-p21.patch",
    "content": "From fb0a50ba250cb8b6c328e32b5132f29a7ada0488 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 19 Jan 2022 06:45:06 +0000\nSubject: [PATCH 066/120] WIP: arm64: dts: meson: add UHS SDIO capabilities to\n p212/p23x/q20x\n\nAdd UHS capabilities to the SDIO node to enable 100MHz speeds.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi   | 4 ++++\n arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 4 ++++\n 2 files changed, 8 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi\nindex 8d315508360d..b0d008fc5f7a 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi\n@@ -259,6 +259,10 @@ &sd_emmc_a {\n \n \tbus-width = <4>;\n \tcap-sd-highspeed;\n+\tsd-uhs-sdr12;\n+\tsd-uhs-sdr25;\n+\tsd-uhs-sdr50;\n+\tsd-uhs-sdr104;\n \tmax-frequency = <100000000>;\n \n \tnon-removable;\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi\nindex b3d7b8613d6d..6eec4e81592b 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi\n@@ -121,6 +121,10 @@ &sd_emmc_a {\n \n \tbus-width = <4>;\n \tcap-sd-highspeed;\n+\tsd-uhs-sdr12;\n+\tsd-uhs-sdr25;\n+\tsd-uhs-sdr50;\n+\tsd-uhs-sdr104;\n \tmax-frequency = <100000000>;\n \n \tnon-removable;\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0067-WIP-arm64-dts-meson-remove-SDIO-node-from-Khadas-VIM.patch",
    "content": "From dac1058a8890451e943cd3dd82a04b23436928b2 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Tue, 18 Jan 2022 15:18:32 +0000\nSubject: [PATCH 067/120] WIP: arm64: dts: meson: remove SDIO node from Khadas\n VIM1\n\nNow that SDIO 100MHz max-frequency is inherited from the p212 dtsi we\ncan drop the node from the board dts.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ----\n 1 file changed, 4 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts\nindex 5ed1e9313003..fb0dd920882f 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts\n@@ -219,10 +219,6 @@ &pwm_ef {\n \tpinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>;\n };\n \n-&sd_emmc_a {\n-\tmax-frequency = <100000000>;\n-};\n-\n /* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */\n &uart_AO {\n \tstatus = \"okay\";\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0068-WIP-arm64-dts-meson-add-audio-playback-to-p201.patch",
    "content": "From 8aadc1cc8f6f3ff75b071c935e2f885fd735ba81 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Fri, 15 May 2020 07:52:47 +0000\nSubject: [PATCH 068/120] WIP: arm64: dts: meson: add audio playback to p201\n\nAdd initial audio support limited to HDMI i2s.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../boot/dts/amlogic/meson-gxbb-p201.dts      | 40 +++++++++++++++++++\n 1 file changed, 40 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts\nindex 150a82f3b2d7..22bd0070146b 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts\n@@ -8,10 +8,50 @@\n /dts-v1/;\n \n #include \"meson-gxbb-p20x.dtsi\"\n+#include <dt-bindings/sound/meson-aiu.h>\n \n / {\n \tcompatible = \"amlogic,p201\", \"amlogic,meson-gxbb\";\n \tmodel = \"Amlogic Meson GXBB P201 Development Board\";\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,gx-sound-card\";\n+\t\tmodel = \"P201\";\n+\t\tassigned-clocks = <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>,\n+\t\t\t\t  <&clkc CLKID_MPLL2>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_I2S>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&aiu {\n+\tstatus = \"okay\";\n };\n \n &ethmac {\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0069-WIP-arm64-dts-meson-add-audio-playback-to-p200.patch",
    "content": "From a44b679ac6004a5a9a3c28ed744e597df0c840b5 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Fri, 15 May 2020 07:56:15 +0000\nSubject: [PATCH 069/120] WIP: arm64: dts: meson: add audio playback to p200\n\nAdd initial support limited to HDMI i2s and SPDIF (LPCM).\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../boot/dts/amlogic/meson-gxbb-p200.dts      | 61 +++++++++++++++++++\n 1 file changed, 61 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts\nindex 3c93d1898b40..27b3ab20f070 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts\n@@ -9,11 +9,19 @@\n \n #include \"meson-gxbb-p20x.dtsi\"\n #include <dt-bindings/input/input.h>\n+#include <dt-bindings/sound/meson-aiu.h>\n \n / {\n \tcompatible = \"amlogic,p200\", \"amlogic,meson-gxbb\";\n \tmodel = \"Amlogic Meson GXBB P200 Development Board\";\n \n+\tspdif_dit: audio-codec-0 {\n+\t\t#sound-dai-cells = <0>;\n+\t\tcompatible = \"linux,spdif-dit\";\n+\t\tstatus = \"okay\";\n+\t\tsound-name-prefix = \"DIT\";\n+\t};\n+\n \tavdd18_usb_adc: regulator-avdd18_usb_adc {\n \t\tcompatible = \"regulator-fixed\";\n \t\tregulator-name = \"AVDD18_USB_ADC\";\n@@ -57,6 +65,59 @@ button-menu {\n \t\t\tpress-threshold-microvolt = <0>; /* 0% */\n \t\t};\n \t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,gx-sound-card\";\n+\t\tmodel = \"P200\";\n+\t\tassigned-clocks = <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>,\n+\t\t\t\t  <&clkc CLKID_MPLL2>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_I2S>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&spdif_dit>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&aiu {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&spdif_out_y_pins>;\n+\tpinctrl-names = \"default\";\n };\n \n &ethmac {\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0070-WIP-arm64-dts-meson-add-audio-playback-to-u200.patch",
    "content": "From 76dfcdd0088bbc374551c52759be7223f8752074 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sun, 17 May 2020 05:00:55 +0000\nSubject: [PATCH 070/120] WIP: arm64: dts: meson: add audio playback to u200\n\nAdd initial support limited to HDMI i2s and SPDIF (LPCM).\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../boot/dts/amlogic/meson-g12a-u200.dts      | 130 ++++++++++++++++++\n 1 file changed, 130 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts\nindex 4b5d11e56364..61a85c27a463 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts\n@@ -8,6 +8,7 @@\n #include \"meson-g12a.dtsi\"\n #include <dt-bindings/gpio/gpio.h>\n #include <dt-bindings/gpio/meson-g12a-gpio.h>\n+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>\n \n / {\n \tcompatible = \"amlogic,u200\", \"amlogic,g12a\";\n@@ -18,6 +19,13 @@ aliases {\n \t\tethernet0 = &ethmac;\n \t};\n \n+\tspdif_dit: audio-codec-1 {\n+\t\t#sound-dai-cells = <0>;\n+\t\tcompatible = \"linux,spdif-dit\";\n+\t\tstatus = \"okay\";\n+\t\tsound-name-prefix = \"DIT\";\n+\t};\n+\n \tchosen {\n \t\tstdout-path = \"serial0:115200n8\";\n \t};\n@@ -147,6 +155,90 @@ vddcpu: regulator-vddcpu {\n \t\tregulator-boot-on;\n \t\tregulator-always-on;\n \t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,axg-sound-card\";\n+\t\tmodel = \"U200\";\n+\t\taudio-aux-devs = <&tdmout_b>;\n+\t\taudio-routing = \"TDMOUT_B IN 0\", \"FRDDR_A OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 1\", \"FRDDR_B OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 2\", \"FRDDR_C OUT 1\",\n+\t\t\t\t\"TDM_B Playback\", \"TDMOUT_B OUT\",\n+\t\t\t\t\"SPDIFOUT IN 0\", \"FRDDR_A OUT 3\",\n+\t\t\t\t\"SPDIFOUT IN 1\", \"FRDDR_B OUT 3\",\n+\t\t\t\t\"SPDIFOUT IN 2\", \"FRDDR_C OUT 3\";\n+\n+\t\tassigned-clocks = <&clkc CLKID_MPLL2>,\n+\t\t\t\t  <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&frddr_a>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&frddr_b>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&frddr_c>;\n+\t\t};\n+\n+\t\t/* 8ch hdmi interface */\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&tdmif_b>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tdai-tdm-slot-tx-mask-0 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-1 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-2 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-3 = <1 1>;\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* spdif hdmi or toslink interface */\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&spdifout>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&spdif_dit>;\n+\t\t\t};\n+\n+\t\t\tcodec-1 {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* spdif hdmi interface */\n+\t\tdai-link-5 {\n+\t\t\tsound-dai = <&spdifout_b>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* hdmi glue */\n+\t\tdai-link-6 {\n+\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&arb {\n+\tstatus = \"okay\";\n };\n \n &cec_AO {\n@@ -163,6 +255,10 @@ &cecb_AO {\n \thdmi-phandle = <&hdmi_tx>;\n };\n \n+&clkc_audio {\n+\tstatus = \"okay\";\n+};\n+\n &cpu0 {\n \tcpu-supply = <&vddcpu>;\n \toperating-points-v2 = <&cpu_opp_table>;\n@@ -203,6 +299,18 @@ &ethmac {\n \tphy-mode = \"rmii\";\n };\n \n+&frddr_a {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_b {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_c {\n+\tstatus = \"okay\";\n+};\n+\n &hdmi_tx {\n \tstatus = \"okay\";\n \tpinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;\n@@ -288,6 +396,28 @@ &sd_emmc_c {\n \tvqmmc-supply = <&flash_1v8>;\n };\n \n+&spdifout {\n+\tpinctrl-0 = <&spdif_out_h_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"okay\";\n+};\n+\n+&spdifout_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmif_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmout_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tohdmitx {\n+\tstatus = \"okay\";\n+};\n+\n &uart_AO {\n \tstatus = \"okay\";\n \tpinctrl-0 = <&uart_ao_a_pins>;\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0071-WIP-arm64-dts-meson-add-Headphone-output-to-Beelink-.patch",
    "content": "From c60ca77b02dd6904ffbd5418138a5880a822b460 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 27 Nov 2021 13:50:06 +0000\nSubject: [PATCH 071/120] WIP: arm64: dts: meson: add Headphone output to\n Beelink GT-King\n\nAdd support for the Headphone audio DAC built-in to the S922X chip.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../boot/dts/amlogic/meson-g12b-gtking.dts    | 120 +++++++++++++++++-\n 1 file changed, 113 insertions(+), 7 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts\nindex 5d96c1449050..a441975cbfb0 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts\n@@ -8,6 +8,7 @@\n /dts-v1/;\n \n #include \"meson-g12b-w400.dtsi\"\n+#include <dt-bindings/sound/meson-g12a-toacodec.h>\n #include <dt-bindings/sound/meson-g12a-tohdmitx.h>\n \n / {\n@@ -29,14 +30,37 @@ spdif_dit: audio-codec-1 {\n \tsound {\n \t\tcompatible = \"amlogic,axg-sound-card\";\n \t\tmodel = \"GTKING\";\n-\t\taudio-aux-devs = <&tdmout_b>;\n+\t\taudio-widgets = \"Line\", \"Lineout\";\n+\t\taudio-aux-devs = <&tdmout_b>, <&tdmout_c>,\n+\t\t\t\t <&tdmin_a>, <&tdmin_b>, <&tdmin_c>;\n \t\taudio-routing = \"TDMOUT_B IN 0\", \"FRDDR_A OUT 1\",\n \t\t\t\t\"TDMOUT_B IN 1\", \"FRDDR_B OUT 1\",\n \t\t\t\t\"TDMOUT_B IN 2\", \"FRDDR_C OUT 1\",\n \t\t\t\t\"TDM_B Playback\", \"TDMOUT_B OUT\",\n+\t\t\t\t\"TDMOUT_C IN 0\", \"FRDDR_A OUT 2\",\n+\t\t\t\t\"TDMOUT_C IN 1\", \"FRDDR_B OUT 2\",\n+\t\t\t\t\"TDMOUT_C IN 2\", \"FRDDR_C OUT 2\",\n+\t\t\t\t\"TDM_C Playback\", \"TDMOUT_C OUT\",\n+\t\t\t\t\"TDMIN_A IN 4\", \"TDM_B Loopback\",\n+\t\t\t\t\"TDMIN_B IN 4\", \"TDM_B Loopback\",\n+\t\t\t\t\"TDMIN_C IN 4\", \"TDM_B Loopback\",\n+\t\t\t\t\"TDMIN_A IN 5\", \"TDM_C Loopback\",\n+\t\t\t\t\"TDMIN_B IN 5\", \"TDM_C Loopback\",\n+\t\t\t\t\"TDMIN_C IN 5\", \"TDM_C Loopback\",\n+\t\t\t\t\"TODDR_A IN 0\", \"TDMIN_A OUT\",\n+\t\t\t\t\"TODDR_B IN 0\", \"TDMIN_A OUT\",\n+\t\t\t\t\"TODDR_C IN 0\", \"TDMIN_A OUT\",\n+\t\t\t\t\"TODDR_A IN 1\", \"TDMIN_B OUT\",\n+\t\t\t\t\"TODDR_B IN 1\", \"TDMIN_B OUT\",\n+\t\t\t\t\"TODDR_C IN 1\", \"TDMIN_B OUT\",\n+\t\t\t\t\"TODDR_A IN 2\", \"TDMIN_C OUT\",\n+\t\t\t\t\"TODDR_B IN 2\", \"TDMIN_C OUT\",\n+\t\t\t\t\"TODDR_C IN 2\", \"TDMIN_C OUT\",\n \t\t\t\t\"SPDIFOUT IN 0\", \"FRDDR_A OUT 3\",\n \t\t\t\t\"SPDIFOUT IN 1\", \"FRDDR_B OUT 3\",\n-\t\t\t\t\"SPDIFOUT IN 2\", \"FRDDR_C OUT 3\";\n+\t\t\t\t\"SPDIFOUT IN 2\", \"FRDDR_C OUT 3\",\n+\t\t\t\t\"Lineout\", \"ACODEC LOLP\",\n+\t\t\t\t\"Lineout\", \"ACODEC LORP\";\n \n \t\tassigned-clocks = <&clkc CLKID_MPLL2>,\n \t\t\t\t  <&clkc CLKID_MPLL0>,\n@@ -59,8 +83,20 @@ dai-link-2 {\n \t\t\tsound-dai = <&frddr_c>;\n \t\t};\n \n-\t\t/* 8ch hdmi interface */\n \t\tdai-link-3 {\n+\t\t\tsound-dai = <&toddr_a>;\n+\t\t};\n+\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&toddr_b>;\n+\t\t};\n+\n+\t\tdai-link-5 {\n+\t\t\tsound-dai = <&toddr_c>;\n+\t\t};\n+\n+\t\t/* 8ch hdmi interface */\n+\t\tdai-link-6 {\n \t\t\tsound-dai = <&tdmif_b>;\n \t\t\tdai-format = \"i2s\";\n \t\t\tdai-tdm-slot-tx-mask-0 = <1 1>;\n@@ -69,13 +105,17 @@ dai-link-3 {\n \t\t\tdai-tdm-slot-tx-mask-3 = <1 1>;\n \t\t\tmclk-fs = <256>;\n \n-\t\t\tcodec {\n+\t\t\tcodec-0 {\n \t\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;\n \t\t\t};\n+\n+\t\t\tcodec-1 {\n+\t\t\t\tsound-dai = <&toacodec TOACODEC_IN_B>;\n+\t\t\t};\n \t\t};\n \n \t\t/* spdif hdmi or toslink interface */\n-\t\tdai-link-4 {\n+\t\tdai-link-7 {\n \t\t\tsound-dai = <&spdifout>;\n \n \t\t\tcodec-0 {\n@@ -88,7 +128,7 @@ codec-1 {\n \t\t};\n \n \t\t/* spdif hdmi interface */\n-\t\tdai-link-5 {\n+\t\tdai-link-8 {\n \t\t\tsound-dai = <&spdifout_b>;\n \n \t\t\tcodec {\n@@ -96,17 +136,47 @@ codec {\n \t\t\t};\n \t\t};\n \n+\t\t/* i2s jack output interface */\n+\t\tdai-link-9 {\n+\t\t\tsound-dai = <&tdmif_c>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tdai-tdm-slot-tx-mask-0 = <1 1>;\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;\n+\t\t\t};\n+\n+\t\t\tcodec-1 {\n+\t\t\t\tsound-dai = <&toacodec TOACODEC_IN_C>;\n+\t\t\t};\n+\t\t};\n+\n \t\t/* hdmi glue */\n-\t\tdai-link-6 {\n+\t\tdai-link-10 {\n \t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;\n \n \t\t\tcodec {\n \t\t\t\tsound-dai = <&hdmi_tx>;\n \t\t\t};\n \t\t};\n+\n+\t\t/* acodec glue */\n+\t\tdai-link-11 {\n+\t\t\tsound-dai = <&toacodec TOACODEC_OUT>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&acodec>;\n+\t\t\t};\n+\t\t};\n \t};\n };\n \n+&acodec {\n+\tAVDD-supply = <&vddao_1v8>;\n+\tstatus = \"okay\";\n+};\n+\n &arb {\n \tstatus = \"okay\";\n };\n@@ -154,10 +224,46 @@ &tdmif_b {\n \tstatus = \"okay\";\n };\n \n+&tdmif_c {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmin_a {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmin_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmin_c {\n+\tstatus = \"okay\";\n+};\n+\n &tdmout_b {\n \tstatus = \"okay\";\n };\n \n+&tdmout_c {\n+\tstatus = \"okay\";\n+};\n+\n+&toacodec {\n+\tstatus = \"okay\";\n+};\n+\n+&toddr_a {\n+\tstatus = \"okay\";\n+};\n+\n+&toddr_b {\n+\tstatus = \"okay\";\n+};\n+\n+&toddr_c {\n+\tstatus = \"okay\";\n+};\n+\n &tohdmitx {\n \tstatus = \"okay\";\n };\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0072-WIP-dt-bindings-arm-amlogic-add-support-for-the-Tani.patch",
    "content": "From d7ec2bf4d082d383dd2f3a77cbf46bb10261ea59 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 29 Feb 2020 15:13:02 +0000\nSubject: [PATCH 072/120] WIP: dt-bindings: arm: amlogic: add support for the\n Tanix TX5 Max\n\nThe Oranth (Tanix) TX5 Max is based on the Amlogic U200 reference\nboard with an S905X2 chip.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex 94f68e7c85ed..845a5eb56ff3 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -146,6 +146,7 @@ properties:\n           - enum:\n               - amediatech,x96-max\n               - amlogic,u200\n+              - oranth,tx5-max\n               - radxa,zero\n               - seirobotics,sei510\n           - const: amlogic,g12a\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0073-WIP-arm64-dts-meson-add-support-for-the-Tanix-TX5-Ma.patch",
    "content": "From e842f0a1b8d3454ac9a166c992986fe9bc5af99f Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sun, 20 Oct 2019 04:06:59 +0000\nSubject: [PATCH 073/120] WIP: arm64: dts: meson: add support for the Tanix TX5\n Max\n\nThe Tanix TX5 Max is based on the Amlogic U200 reference design\nusing the S905X2 chipset. Hardware specification:\n\n- 4GB LPDDR4 RAM\n- 32GB eMMC storage\n- 10/100/1000 Base-T Ethernet using External RGMII PHY\n- 802.11 a/b/g/b/ac + BT 4.1 sdio wireless\n- HDMI 2.0 (4k@60p) video\n- Composite video + 2-channel audio output on 3.5mm jack\n- S/PDIF audio output\n- 1x USB 3.0\n- 1x USB 2.0\n- 1x micro SD card slot\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |   1 +\n .../dts/amlogic/meson-g12a-tanix-tx5max.dts   | 481 ++++++++++++++++++\n 2 files changed, 482 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12a-tanix-tx5max.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex f5845e565efb..5897fd0f594b 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -6,6 +6,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-axg-jethome-jethub-j110-rev-3.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12a-radxa-zero.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-g12a-tanix-tx5max.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-tanix-tx5max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-tanix-tx5max.dts\nnew file mode 100644\nindex 000000000000..0e55427ca398\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-tanix-tx5max.dts\n@@ -0,0 +1,481 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2018 BayLibre SAS. All rights reserved.\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-g12a.dtsi\"\n+#include <dt-bindings/gpio/gpio.h>\n+#include <dt-bindings/gpio/meson-g12a-gpio.h>\n+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>\n+\n+/ {\n+\tcompatible = \"oranth,tx5-max\", \"amlogic,g12a\";\n+\tmodel = \"Tanix TX5 Max\";\n+\n+\taliases {\n+\t\tserial0 = &uart_AO;\n+\t\tethernet0 = &ethmac;\n+\t};\n+\n+\tspdif_dit: audio-codec-1 {\n+\t\t#sound-dai-cells = <0>;\n+\t\tcompatible = \"linux,spdif-dit\";\n+\t\tstatus = \"okay\";\n+\t\tsound-name-prefix = \"DIT\";\n+\t};\n+\n+\tchosen {\n+\t\tstdout-path = \"serial0:115200n8\";\n+\t};\n+\tmemory@0 {\n+\t\tdevice_type = \"memory\";\n+\t\treg = <0x0 0x0 0x0 0x40000000>;\n+\t};\n+\n+\tcvbs-connector {\n+\t\tcompatible = \"composite-video-connector\";\n+\n+\t\tport {\n+\t\t\tcvbs_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&cvbs_vdac_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\thdmi-connector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\temmc_pwrseq: emmc-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-emmc\";\n+\t\treset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;\n+\t};\n+\n+\tsdio_pwrseq: sdio-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-simple\";\n+\t\treset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"ext_clock\";\n+\t};\n+\n+\tflash_1v8: regulator-flash_1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"FLASH_1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vcc_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tdc_in: regulator-dc_in {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"DC_IN\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvcc_1v8: regulator-vcc_1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vcc_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvcc_3v3: regulator-vcc_3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&vddao_3v3>;\n+\t\tregulator-always-on;\n+\t\t/* FIXME: actually controlled by VDDCPU_B_EN */\n+\t};\n+\n+\tvcc_5v: regulator-vcc_5v {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_5V\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tvin-supply = <&dc_in>;\n+\n+\t\tgpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;\n+\t\tenable-active-low;\n+\t};\n+\n+\tvddao_1v8: regulator-vddao_1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDAO_1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vddao_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddao_3v3: regulator-vddao_3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDAO_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&dc_in>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddcpu: regulator-vddcpu {\n+\t\tcompatible = \"pwm-regulator\";\n+\n+\t\tregulator-name = \"VDDCPU\";\n+\t\tregulator-min-microvolt = <721000>;\n+\t\tregulator-max-microvolt = <1022000>;\n+\n+\t\tvin-supply = <&dc_in>;\n+\n+\t\tpwms = <&pwm_AO_cd 1 1250 0>;\n+\t\tpwm-dutycycle-range = <100 0>;\n+\n+\t\tregulator-boot-on;\n+\t\tregulator-always-on;\n+\t};\n+\n+\twifi32k: wifi32k {\n+\t\tcompatible = \"pwm-clock\";\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tpwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,axg-sound-card\";\n+\t\tmodel = \"TANIX-TX5MAX\";\n+\t\taudio-aux-devs = <&tdmout_b>;\n+\t\taudio-routing = \"TDMOUT_B IN 0\", \"FRDDR_A OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 1\", \"FRDDR_B OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 2\", \"FRDDR_C OUT 1\",\n+\t\t\t\t\"TDM_B Playback\", \"TDMOUT_B OUT\",\n+\t\t\t\t\"SPDIFOUT IN 0\", \"FRDDR_A OUT 3\",\n+\t\t\t\t\"SPDIFOUT IN 1\", \"FRDDR_B OUT 3\",\n+\t\t\t\t\"SPDIFOUT IN 2\", \"FRDDR_C OUT 3\";\n+\n+\t\tassigned-clocks = <&clkc CLKID_MPLL2>,\n+\t\t\t\t  <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&frddr_a>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&frddr_b>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&frddr_c>;\n+\t\t};\n+\n+\t\t/* 8ch hdmi interface */\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&tdmif_b>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tdai-tdm-slot-tx-mask-0 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-1 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-2 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-3 = <1 1>;\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* spdif hdmi or toslink interface */\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&spdifout>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&spdif_dit>;\n+\t\t\t};\n+\n+\t\t\tcodec-1 {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* spdif hdmi interface */\n+\t\tdai-link-5 {\n+\t\t\tsound-dai = <&spdifout_b>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* hdmi glue */\n+\t\tdai-link-6 {\n+\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&arb {\n+\tstatus = \"okay\";\n+};\n+\n+&cec_AO {\n+\tpinctrl-0 = <&cec_ao_a_h_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"disabled\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&cecb_AO {\n+\tpinctrl-0 = <&cec_ao_b_h_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"okay\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&clkc_audio {\n+\tstatus = \"okay\";\n+};\n+\n+&cpu0 {\n+\tcpu-supply = <&vddcpu>;\n+\toperating-points-v2 = <&cpu_opp_table>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu1 {\n+\tcpu-supply = <&vddcpu>;\n+\toperating-points-v2 = <&cpu_opp_table>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu2 {\n+\tcpu-supply = <&vddcpu>;\n+\toperating-points-v2 = <&cpu_opp_table>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu3 {\n+\tcpu-supply = <&vddcpu>;\n+\toperating-points-v2 = <&cpu_opp_table>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cvbs_vdac_port {\n+\tcvbs_vdac_out: endpoint {\n+\t\tremote-endpoint = <&cvbs_connector_in>;\n+\t};\n+};\n+\n+&frddr_a {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_b {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_c {\n+\tstatus = \"okay\";\n+};\n+\n+&hdmi_tx {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-supply = <&vcc_5v>;\n+};\n+\n+&hdmi_tx_tmds_port {\n+\thdmi_tx_tmds_out: endpoint {\n+\t\tremote-endpoint = <&hdmi_connector_in>;\n+\t};\n+};\n+\n+&ir {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&remote_input_ao_pins>;\n+\tpinctrl-names = \"default\";\n+\tlinux,rc-map-name = \"rc-tx5max\";\n+};\n+\n+&pwm_AO_cd {\n+\tpinctrl-0 = <&pwm_ao_d_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin1\";\n+\tstatus = \"okay\";\n+};\n+\n+&ext_mdio {\n+\texternal_phy: ethernet-phy@0 {\n+\t\t/* Realtek RTL8211F (0x001cc916) */\n+\t\treg = <0>;\n+\t\tmax-speed = <1000>;\n+\t\teee-broken-1000t;\n+\n+\t\treset-assert-us = <10000>;\n+\t\treset-deassert-us = <80000>;\n+\t\treset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;\n+\n+\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t/* MAC_INTR on GPIOZ_14 */\n+\t\tinterrupts = <26 IRQ_TYPE_LEVEL_LOW>;\n+\t};\n+};\n+\n+&ethmac {\n+\tpinctrl-0 = <&eth_pins>, <&eth_rgmii_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"okay\";\n+\tphy-mode = \"rgmii\";\n+\tphy-handle = <&external_phy>;\n+\tamlogic,tx-delay-ns = <2>;\n+};\n+\n+&pwm_ef {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&pwm_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin0\";\n+};\n+\n+&uart_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"brcm,bcm43438-bt\";\n+\t\tshutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\tmax-speed = <2000000>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"lpo\";\n+\t};\n+};\n+\n+&uart_AO {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_ao_a_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&usb {\n+\tstatus = \"okay\";\n+\tdr_mode = \"host\";\n+};\n+\n+/* SDIO */\n+&sd_emmc_a {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&sdio_pins>;\n+\tpinctrl-1 = <&sdio_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\t#address-cells = <1>;\n+\t#size-cells = <0>;\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tsd-uhs-sdr50;\n+\tmax-frequency = <100000000>;\n+\n+\tnon-removable;\n+\tdisable-wp;\n+\n+\t/* WiFi firmware requires power to be kept while in suspend */\n+\tkeep-power-in-suspend;\n+\n+\tmmc-pwrseq = <&sdio_pwrseq>;\n+\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddao_1v8>;\n+\n+\tbrcmf: wifi@1 {\n+\t\treg = <1>;\n+\t\tcompatible = \"brcm,bcm4329-fmac\";\n+\t};\n+};\n+\n+/* SD card */\n+&sd_emmc_b {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&sdcard_c_pins>;\n+\tpinctrl-1 = <&sdcard_clk_gate_c_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tmax-frequency = <100000000>;\n+\tdisable-wp;\n+\n+\tcd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddao_3v3>;\n+};\n+\n+/* eMMC */\n+&sd_emmc_c {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;\n+\tpinctrl-1 = <&emmc_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <8>;\n+\tcap-mmc-highspeed;\n+\tmax-frequency = <100000000>;\n+\tnon-removable;\n+\tdisable-wp;\n+\n+\tmmc-pwrseq = <&emmc_pwrseq>;\n+\tvmmc-supply = <&vcc_3v3>;\n+\tvqmmc-supply = <&flash_1v8>;\n+};\n+\n+&spdifout {\n+\tpinctrl-0 = <&spdif_out_h_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"okay\";\n+};\n+\n+&spdifout_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmif_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmout_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tohdmitx {\n+\tstatus = \"okay\";\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0074-WIP-arm64-dts-meson-add-multiple-MeCool-device-trees.patch",
    "content": "From 98656236664654dc5163a60522ed69d7e3f99823 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Mon, 21 Oct 2019 03:58:06 +0000\nSubject: [PATCH 074/120] WIP: arm64: dts: meson: add multiple MeCool device\n trees\n\nThis adds initial device trees for a range of MeCool devices based on various\nAmlogic GXBB, GXL and GXM reference designs. The current purpose is to allow\ndevices to be associated with their respective IR remote keymaps. It also\nprepares for the addition of DVB support in the future.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          | 11 ++++++\n .../dts/amlogic/meson-gxbb-mecool-ki-plus.dts | 34 +++++++++++++++++++\n .../dts/amlogic/meson-gxbb-mecool-kii-pro.dts | 34 +++++++++++++++++++\n .../meson-gxl-s905d-mecool-ki-plus.dts        | 21 ++++++++++++\n .../amlogic/meson-gxl-s905d-mecool-ki-pro.dts | 16 +++++++++\n .../meson-gxl-s905d-mecool-m8s-plus.dts       | 16 +++++++++\n 6 files changed, 132 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-ki-plus.dts\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-kii-pro.dts\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-ki-plus.dts\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-ki-pro.dts\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-m8s-plus.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex 5897fd0f594b..be7cc188706a 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -20,6 +20,8 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-radxa-zero2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-mecool-ki-plus.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-mecool-kii-pro.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb\n@@ -33,12 +35,21 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-wetek-play2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s805x-libretech-ac.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s805x-p241.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-libretech-pc.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-mecool-ki-plus.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-mecool-ki-pro.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-mecool-kii-pro.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-mecool-m8s-plus.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p230.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p231.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-phicomm-n1.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-sml5442tw.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-vero4k-plus.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-hwacom-amazetv.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-khadas-vim.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc-v2.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-jethome-jethub-j80.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-p281.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-tx3-mini.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-ki-plus.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-ki-plus.dts\nnew file mode 100644\nindex 000000000000..cb422633a8f9\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-ki-plus.dts\n@@ -0,0 +1,34 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+\n+/*\n+ * Author: Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+#include \"meson-gxbb-p201.dts\"\n+\n+/ {\n+\tcompatible = \"videostrong,gxbb-ki-plus\", \"amlogic,meson-gxbb\";\n+\tmodel = \"MeCool KI Plus\";\n+\n+\tclock: meson_clock {\n+\t\tcompatible = \"amlogic, gxbb-clock\";\n+\t\treg = <0x0 0xc883c000 0x0 0x1000>,\n+\t\t      <0x0 0xc8100000 0x0 0x1000>;\n+\t\t#clock-cells = <1>;\n+\t\t#reset-cells = <1>;\n+\t\tsys_max = <1536000000>;\n+\t};\n+\n+\tmemory@0 {\n+\t\tdevice_type = \"memory\";\n+\t\treg = <0x0 0x0 0x0 0x40000000>;\n+\t};\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-mecool-ki-plus\";\n+};\n+\n+&usb_pwr {\n+\tgpio = <>;\n+};\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-kii-pro.dts\nnew file mode 100644\nindex 000000000000..0dbcf0f7dbd9\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-mecool-kii-pro.dts\n@@ -0,0 +1,34 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+\n+/*\n+ * Author: Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+#include \"meson-gxbb-p201.dts\"\n+\n+/ {\n+\tcompatible = \"videostrong,gxbb-kii-pro\", \"amlogic,meson-gxbb\";\n+\tmodel = \"MeCool KII Pro\";\n+\n+\tclock: meson_clock {\n+\t\tcompatible = \"amlogic, gxbb-clock\";\n+\t\treg = <0x0 0xc883c000 0x0 0x1000>,\n+\t\t      <0x0 0xc8100000 0x0 0x1000>;\n+\t\t#clock-cells = <1>;\n+\t\t#reset-cells = <1>;\n+\t\tsys_max = <1536000000>;\n+\t};\n+\n+\tmemory@0 {\n+\t\tdevice_type = \"memory\";\n+\t\treg = <0x0 0x0 0x0 0x40000000>;\n+\t};\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-mecool-kii-pro\";\n+};\n+\n+&usb_pwr {\n+\tgpio = <>;\n+};\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-ki-plus.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-ki-plus.dts\nnew file mode 100644\nindex 000000000000..b4aed5d0dbdf\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-ki-plus.dts\n@@ -0,0 +1,21 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+\n+/*\n+ * Author: Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+#include \"meson-gxl-s905d-p231.dts\"\n+\n+/ {\n+\tcompatible = \"videostrong,gxl-ki-plus\", \"amlogic,s905d\", \"amlogic,meson-gxl\";\n+\tmodel = \"MeCool KI Plus\";\n+\n+\tmemory@0 {\n+\t\tdevice_type = \"memory\";\n+\t\treg = <0x0 0x0 0x0 0x40000000>;\n+\t};\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-mecool-ki-plus\";\n+};\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-ki-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-ki-pro.dts\nnew file mode 100644\nindex 000000000000..af695620728c\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-ki-pro.dts\n@@ -0,0 +1,16 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+\n+/*\n+ * Author: Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+#include \"meson-gxl-s905d-p230.dts\"\n+\n+/ {\n+\tcompatible = \"videostrong,gxl-ki-pro\", \"amlogic,s905d\", \"amlogic,meson-gxl\";\n+\tmodel = \"MeCool KI Pro\";\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-mecool-ki-pro\";\n+};\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-m8s-plus.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-m8s-plus.dts\nnew file mode 100644\nindex 000000000000..3ddcf59d2649\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-m8s-plus.dts\n@@ -0,0 +1,16 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+\n+/*\n+ * Author: Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+#include \"meson-gxl-s905d-p231.dts\"\n+\n+/ {\n+\tcompatible = \"videostrong,gxl-kii-pro\", \"amlogic,s905d\", \"amlogic,meson-gxl\";\n+\tmodel = \"MeCool M8S Plus\";\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-mecool-m8s-plus\";\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0075-WIP-dt-bindings-arm-amlogic-add-support-for-Minix-NE.patch",
    "content": "From 821b974dba480063ad5c60d83bd28441ba164f7c Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sun, 11 Apr 2021 05:50:13 +0000\nSubject: [PATCH 075/120] WIP: dt-bindings: arm: amlogic: add support for Minix\n NEO-U1\n\nThe Minix NEO-U1 is an Android STB based on the Amlogic P200 (GXBB)\nreference design with an S905 chip.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex 845a5eb56ff3..657af6e662ea 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -58,6 +58,7 @@ properties:\n               - amlogic,p201\n               - friendlyarm,nanopi-k2\n               - hardkernel,odroid-c2\n+              - minix,neo-u1\n               - nexbox,a95x\n               - videostrong,kii-pro\n               - wetek,hub\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0076-WIP-arm64-dts-meson-add-initial-device-tree-for-Mini.patch",
    "content": "From d498d3a2fbd330d5f85f75b0f752351fe6745d53 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sun, 11 Apr 2021 05:52:14 +0000\nSubject: [PATCH 076/120] WIP: arm64: dts: meson: add initial device-tree for\n Minix NEO-U1\n\nThe Minix NEO-U1 is an Android STB based on the Amlogic P200 (GXBB)\nreference design with an S905-H chip and the following specs:\n\n- 2GB DDR3 RAM\n- 16GB eMMC\n- 10/100/1000 Base-T Ethernet\n- AP6356 Wireless (802.11 b/g/n/ac, BT 5.0)\n- HDMI 2.1 video\n- S/PDIF optical output\n- ES8323 DAC\n- 3x USB 2.0 port\n- 1x USB micro OTG port\n- RTC chip (hym8563)\n- IR receiver\n- 1x Power LED (white)\n- 1x Update/Reset button (underside)\n- 1x micro SD card slot\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |   1 +\n .../dts/amlogic/meson-gxbb-minix-neo-u1.dts   | 189 ++++++++++++++++++\n 2 files changed, 190 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-minix-neo-u1.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex be7cc188706a..c310be848a62 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -22,6 +22,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-mecool-ki-plus.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-mecool-kii-pro.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-minix-neo-u1.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-minix-neo-u1.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-minix-neo-u1.dts\nnew file mode 100644\nindex 000000000000..5343e90f9f34\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-minix-neo-u1.dts\n@@ -0,0 +1,189 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2021 Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-gxbb-p20x.dtsi\"\n+#include <dt-bindings/gpio/gpio.h>\n+#include <dt-bindings/input/input.h>\n+#include <dt-bindings/leds/common.h>\n+#include <dt-bindings/sound/meson-aiu.h>\n+\n+/ {\n+\tcompatible = \"minix,neo-u1\", \"amlogic,meson-gxbb\";\n+\tmodel = \"Minix NEO U1\";\n+\n+\taliases {\n+\t\trtc0 = &rtc;\n+\t};\n+\n+\tspdif_dit: audio-codec-0 {\n+\t\t#sound-dai-cells = <0>;\n+\t\tcompatible = \"linux,spdif-dit\";\n+\t\tstatus = \"okay\";\n+\t\tsound-name-prefix = \"DIT\";\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-status {\n+\t\t\tcolor = <LED_COLOR_ID_WHITE>;\n+\t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tgpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;\n+\t\t\tdefault-state = \"on\";\n+\t\t};\n+\t};\n+\n+\tgpio-keys-polled {\n+\t\tcompatible = \"gpio-keys-polled\";\n+\t\t#address-cells = <1>;\n+\t\t#size-cells = <0>;\n+\t\tpoll-interval = <20>;\n+\n+\t\tbutton-reset {\n+\t\t\tlabel = \"reset\";\n+\t\t\tlinux,code = <KEY_POWER>;\n+\t\t\tgpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;\n+\t\t};\n+\t};\n+\n+\tavdd18_usb_adc: regulator-avdd18_usb_adc {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"AVDD18_USB_ADC\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,gx-sound-card\";\n+\t\tmodel = \"MINIX-NEO\";\n+\t\tassigned-clocks = <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>,\n+\t\t\t\t  <&clkc CLKID_MPLL2>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_I2S>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&spdif_dit>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&aiu {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&spdif_out_y_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&ethmac {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&eth_rgmii_pins>;\n+\tpinctrl-names = \"default\";\n+\n+\tphy-handle = <&eth_phy0>;\n+\tphy-mode = \"rgmii\";\n+\n+\tamlogic,tx-delay-ns = <2>;\n+\n+\tmdio {\n+\t\tcompatible = \"snps,dwmac-mdio\";\n+\t\t#address-cells = <1>;\n+\t\t#size-cells = <0>;\n+\n+\t\teth_phy0: ethernet-phy@0 {\n+\t\t\t/* Realtek RTL8211F (0x001cc916) */\n+\t\t\treg = <0>;\n+\n+\t\t\treset-assert-us = <10000>;\n+\t\t\treset-deassert-us = <80000>;\n+\t\t\treset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;\n+\n+\t\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t\t/* MAC_INTR on GPIOZ_15 */\n+\t\t\tinterrupts = <29 IRQ_TYPE_LEVEL_LOW>;\n+\t\t};\n+\t};\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-minix-neo\";\n+};\n+\n+&i2c_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&i2c_a_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&i2c_B {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&i2c_b_pins>;\n+\tpinctrl-names = \"default\";\n+\n+\trtc: rtc@51 {\n+\t\tstatus = \"okay\";\n+\t\tcompatible = \"haoyu,hym8563\";\n+\t\treg = <0x51>;\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tclock-output-names = \"xin32k\";\n+\t\twakeup-source;\n+\t};\n+};\n+\n+&saradc {\n+\tstatus = \"okay\";\n+\tvref-supply = <&avdd18_usb_adc>;\n+};\n+\n+/* This is connected to the Bluetooth module: */\n+&uart_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"bcm43438-bt\";\n+\t\tshutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\tmax-speed = <2000000>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"lpo\";\n+\t};\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0077-LOCAL-arm64-dts-meson-add-rtc-vrtc-aliases-to-Minix-.patch",
    "content": "From e262438bbff7de98affac0b45496fc1e96cab49e Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Fri, 19 Aug 2022 21:32:21 +0000\nSubject: [PATCH 077/120] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to\n Minix NEO-U1\n\nAdd node aliases to prevent meson-vrtc from claiming /dev/rtc0\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/meson-gxbb-minix-neo-u1.dts | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-minix-neo-u1.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-minix-neo-u1.dts\nindex 5343e90f9f34..5900ee92ca28 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-minix-neo-u1.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-minix-neo-u1.dts\n@@ -17,6 +17,7 @@ / {\n \n \taliases {\n \t\trtc0 = &rtc;\n+\t\trtc1 = &vrtc;\n \t};\n \n \tspdif_dit: audio-codec-0 {\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0078-WIP-dt-bindings-arm-amlogic-add-support-for-Beelink-.patch",
    "content": "From 13fcb2cd934993bf97d27f11db35f2a478d173b4 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 8 Dec 2021 15:28:50 +0000\nSubject: [PATCH 078/120] WIP: dt-bindings: arm: amlogic: add support for\n Beelink Mini MXIII\n\nThe Beelink Mini MXIII is an Android STB based on the Amlogic P200\n(GXBB) reference design with an S905 chip.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex 657af6e662ea..a0ea076b7b4d 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -56,6 +56,7 @@ properties:\n           - enum:\n               - amlogic,p200\n               - amlogic,p201\n+              - beelink,mini-mxiii\n               - friendlyarm,nanopi-k2\n               - hardkernel,odroid-c2\n               - minix,neo-u1\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0079-WIP-arm64-dts-meson-add-support-for-Beelink-Mini-MXI.patch",
    "content": "From 7202d36700ce8a77703bcc0d1ee1b0ba1346927a Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 8 Dec 2021 15:26:00 +0000\nSubject: [PATCH 079/120] WIP: arm64: dts: meson: add support for Beelink Mini\n MXIII\n\nThis is a GXBB board that ships in two variants, one with\na Broadcom SDIO module, and a second with RTL8723BS.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |   1 +\n .../amlogic/meson-gxbb-beelink-mini-mxiii.dts | 172 ++++++++++++++++++\n 2 files changed, 173 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-beelink-mini-mxiii.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex c310be848a62..f27222c9d292 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -20,6 +20,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-radxa-zero2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-beelink-mini-mxiii.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-mecool-ki-plus.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-mecool-kii-pro.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-minix-neo-u1.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-beelink-mini-mxiii.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-beelink-mini-mxiii.dts\nnew file mode 100644\nindex 000000000000..3d99ca93e1d5\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-beelink-mini-mxiii.dts\n@@ -0,0 +1,172 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2021 Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-gxbb-p20x.dtsi\"\n+#include <dt-bindings/gpio/gpio.h>\n+#include <dt-bindings/input/input.h>\n+#include <dt-bindings/leds/common.h>\n+#include <dt-bindings/sound/meson-aiu.h>\n+\n+/ {\n+\tcompatible = \"beelink,mini-mxiii\", \"amlogic,meson-gxbb\";\n+\tmodel = \"Beelink Mini MXIII\";\n+\n+\tspdif_dit: audio-codec-0 {\n+\t\t#sound-dai-cells = <0>;\n+\t\tcompatible = \"linux,spdif-dit\";\n+\t\tstatus = \"okay\";\n+\t\tsound-name-prefix = \"DIT\";\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-power {\n+\t\t\t/* Red in Standby */\n+\t\t\tcolor = <LED_COLOR_ID_GREEN>;\n+\t\t\tfunction = LED_FUNCTION_POWER;\n+\t\t\tgpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;\n+\t\t\tdefault-state = \"on\";\n+\t\t};\n+\t};\n+\n+\tgpio-keys-polled {\n+\t\tcompatible = \"gpio-keys-polled\";\n+\t\t#address-cells = <1>;\n+\t\t#size-cells = <0>;\n+\t\tpoll-interval = <20>;\n+\n+\t\tbutton-reset {\n+\t\t\tlabel = \"reset\";\n+\t\t\tlinux,code = <KEY_POWER>;\n+\t\t\tgpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;\n+\t\t};\n+\t};\n+\n+\tavdd18_usb_adc: regulator-avdd18_usb_adc {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"AVDD18_USB_ADC\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,gx-sound-card\";\n+\t\tmodel = \"MINI-MXIII\";\n+\t\tassigned-clocks = <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>,\n+\t\t\t\t  <&clkc CLKID_MPLL2>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_I2S>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&spdif_dit>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&aiu {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&spdif_out_y_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&ethmac {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&eth_rgmii_pins>;\n+\tpinctrl-names = \"default\";\n+\n+\tphy-handle = <&eth_phy0>;\n+\tphy-mode = \"rgmii\";\n+\n+\tamlogic,tx-delay-ns = <2>;\n+\n+\tmdio {\n+\t\tcompatible = \"snps,dwmac-mdio\";\n+\t\t#address-cells = <1>;\n+\t\t#size-cells = <0>;\n+\n+\t\teth_phy0: ethernet-phy@0 {\n+\t\t\t/* Realtek RTL8211F (0x001cc916) */\n+\t\t\treg = <0>;\n+\n+\t\t\treset-assert-us = <10000>;\n+\t\t\treset-deassert-us = <80000>;\n+\t\t\treset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;\n+\n+\t\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t\t/* MAC_INTR on GPIOZ_15 */\n+\t\t\tinterrupts = <29 IRQ_TYPE_LEVEL_LOW>;\n+\t\t};\n+\t};\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-beelink-mxiii\";\n+};\n+\n+&saradc {\n+\tstatus = \"okay\";\n+\tvref-supply = <&avdd18_usb_adc>;\n+};\n+\n+/* Realtek Wireless SDIO Module */\n+&sd_emmc_a {\n+\t/delete-node/ brcmf;\n+\n+\trtl8723bs: wifi@1 {\n+\t\treg = <1>;\n+\t\tcompatible = \"realtek,rtl8723bs\";\n+\t};\n+};\n+\n+/* Connected to the Bluetooth module */\n+&uart_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"realtek,rtl8723bs-bt\";\n+\t\tenable-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>;\n+\t\thost-wake-gpios = <&gpio GPIOX_21 GPIO_ACTIVE_HIGH>;\n+\t};\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0080-WIP-media-rc-add-keymap-for-MeCool-M8S-Pro-W-remote.patch",
    "content": "From 895414b87c0d4e345c304d48bd39cdf1b3408e81 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sun, 16 Jan 2022 08:48:02 +0000\nSubject: [PATCH 080/120] WIP: media: rc: add keymap for MeCool M8S Pro W\n remote\n\nAdd a keymap and bindings for the simple IR (NEC) remote used with\nthe MeCool M8S Pro W Android STB device.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../devicetree/bindings/media/rc.yaml         |  1 +\n drivers/media/rc/keymaps/Makefile             |  2 +\n .../media/rc/keymaps/rc-mecool-m8s-pro-w.c    | 75 +++++++++++++++++++\n include/media/rc-map.h                        |  1 +\n 4 files changed, 79 insertions(+)\n create mode 100644 drivers/media/rc/keymaps/rc-mecool-m8s-pro-w.c\n\ndiff --git a/Documentation/devicetree/bindings/media/rc.yaml b/Documentation/devicetree/bindings/media/rc.yaml\nindex deeda4bb8dae..37583861376e 100644\n--- a/Documentation/devicetree/bindings/media/rc.yaml\n+++ b/Documentation/devicetree/bindings/media/rc.yaml\n@@ -95,6 +95,7 @@ properties:\n       - rc-manli\n       - rc-mecool-kii-pro\n       - rc-mecool-kiii-pro\n+      - rc-mecool-m8s-pro-w\n       - rc-medion-x10\n       - rc-medion-x10-digitainer\n       - rc-medion-x10-or2x\ndiff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile\nindex f19558fdab0c..f1fba08d8ed4 100644\n--- a/drivers/media/rc/keymaps/Makefile\n+++ b/drivers/media/rc/keymaps/Makefile\n@@ -76,6 +76,8 @@ obj-$(CONFIG_RC_MAP) += \\\n \t\t\trc-manli.o \\\n \t\t\trc-mecool-kiii-pro.o \\\n \t\t\trc-mecool-kii-pro.o \\\n+\t\t\trc-mecool-m8s-pro-w.o \\\n+\t\t\trc-medion-x10.o \\\n \t\t\trc-medion-x10-digitainer.o \\\n \t\t\trc-medion-x10.o \\\n \t\t\trc-medion-x10-or2x.o \\\ndiff --git a/drivers/media/rc/keymaps/rc-mecool-m8s-pro-w.c b/drivers/media/rc/keymaps/rc-mecool-m8s-pro-w.c\nnew file mode 100644\nindex 000000000000..9024b999d5a9\n--- /dev/null\n+++ b/drivers/media/rc/keymaps/rc-mecool-m8s-pro-w.c\n@@ -0,0 +1,75 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+//\n+// Copyright (C) 2022 Christian Hewitt <christianshewitt@gmail.com>\n+\n+#include <media/rc-map.h>\n+#include <linux/module.h>\n+\n+//\n+// Keytable for the MeCool M8S Pro W remote control\n+//\n+\n+static struct rc_map_table mecool_m8s_pro_w[] = {\n+\n+\t{ 0x59, KEY_POWER },\n+\n+\t// TV CONTROLS\n+\n+\t{ 0x08, KEY_PREVIOUS },\n+\t{ 0x0b, KEY_NEXT },\n+\t{ 0x18, KEY_TEXT }, // INTERNET\n+\t{ 0x19, KEY_MUTE },\n+\t{ 0x13, KEY_VOLUMEUP },\n+\t{ 0x17, KEY_VOLUMEDOWN },\n+\n+\t{ 0x0d, KEY_HOME },\n+\t{ 0x05, KEY_BACK },\n+\n+\t{ 0x06, KEY_UP },\n+\t{ 0x5a, KEY_LEFT },\n+\t{ 0x1b, KEY_RIGHT },\n+\t{ 0x1a, KEY_ENTER },\n+\t{ 0x16, KEY_DOWN },\n+\n+\t{ 0x45, KEY_MENU },\n+\t{ 0x12, KEY_CONTEXT_MENU }, // MOUSE\n+\n+\t{ 0x52, KEY_NUMERIC_1 },\n+\t{ 0x50, KEY_NUMERIC_2 },\n+\t{ 0x10, KEY_NUMERIC_3 },\n+\t{ 0x56, KEY_NUMERIC_4 },\n+\t{ 0x54, KEY_NUMERIC_5 },\n+\t{ 0x14, KEY_NUMERIC_6 },\n+\t{ 0x4e, KEY_NUMERIC_7 },\n+\t{ 0x4c, KEY_NUMERIC_8 },\n+\t{ 0x0c, KEY_NUMERIC_9 },\n+\t{ 0x22, KEY_INFO }, // SEARCH\n+\t{ 0x0f, KEY_NUMERIC_0 },\n+\t{ 0x51, KEY_BACKSPACE },\n+\n+};\n+\n+static struct rc_map_list mecool_m8s_pro_w_map = {\n+\t.map = {\n+\t\t.scan     = mecool_m8s_pro_w,\n+\t\t.size     = ARRAY_SIZE(mecool_m8s_pro_w),\n+\t\t.rc_proto = RC_PROTO_NEC,\n+\t\t.name     = RC_MAP_MECOOL_M8S_PRO_W,\n+\t}\n+};\n+\n+static int __init init_rc_map_mecool_m8s_pro_w(void)\n+{\n+\treturn rc_map_register(&mecool_m8s_pro_w_map);\n+}\n+\n+static void __exit exit_rc_map_mecool_m8s_pro_w(void)\n+{\n+\trc_map_unregister(&mecool_m8s_pro_w_map);\n+}\n+\n+module_init(init_rc_map_mecool_m8s_pro_w)\n+module_exit(exit_rc_map_mecool_m8s_pro_w)\n+\n+MODULE_LICENSE(\"GPL\");\n+MODULE_AUTHOR(\"Christian Hewitt <christianshewitt@gmail.com\");\ndiff --git a/include/media/rc-map.h b/include/media/rc-map.h\nindex 4676545ffd8f..4c4eaaf02ac1 100644\n--- a/include/media/rc-map.h\n+++ b/include/media/rc-map.h\n@@ -282,6 +282,7 @@ struct rc_map *rc_map_get(const char *name);\n #define RC_MAP_MANLI                     \"rc-manli\"\n #define RC_MAP_MECOOL_KII_PRO            \"rc-mecool-kii-pro\"\n #define RC_MAP_MECOOL_KIII_PRO           \"rc-mecool-kiii-pro\"\n+#define RC_MAP_MECOOL_M8S_PRO_W          \"rc-mecool-m8s-pro-w\"\n #define RC_MAP_MEDION_X10                \"rc-medion-x10\"\n #define RC_MAP_MEDION_X10_DIGITAINER     \"rc-medion-x10-digitainer\"\n #define RC_MAP_MEDION_X10_OR2X           \"rc-medion-x10-or2x\"\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0081-WIP-dt-bindings-arm-amlogic-add-support-for-MeCool-M.patch",
    "content": "From f16b6edb5e3e984a4dab17906af225280ff6d543 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sun, 16 Jan 2022 08:15:36 +0000\nSubject: [PATCH 081/120] WIP: dt-bindings: arm: amlogic: add support for\n MeCool M8S Pro W\n\nThe MeCool M8S Pro W is an Android STB based on the Amlogic P281\n(GXL) reference design with an S905W chip.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex a0ea076b7b4d..70706c8d5ed8 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -89,6 +89,7 @@ properties:\n               - amlogic,p281\n               - oranth,tx3-mini\n               - jethome,jethub-j80\n+              - videostrong,gxl-m8s-pro-w\n           - const: amlogic,s905w\n           - const: amlogic,meson-gxl\n \n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0082-WIP-arm64-dts-meson-add-support-for-MeCool-M8S-Pro-W.patch",
    "content": "From 8dbd84116d2dd92367fe327292e71104c84f5b0c Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sun, 16 Jan 2022 08:17:41 +0000\nSubject: [PATCH 082/120] WIP: arm64: dts: meson: add support for MeCool M8S\n Pro W\n\nMeCool M8S Pro W is an Android STB based on the Amlogic P281 (GXL)\nreference design with an S905W chip and the following specs:\n\n- 2GB DDR3 RAM\n- 16GB eMMC\n- 10/100 Base-T Ethernet\n- SSV6051P Wireless (802.11 b/g/n)\n- HDMI 2.0 video\n- 1x 3.5mm AV jack\n- 2x USB 2.0 port\n- IR receiver\n- 1x Power LED (blue)\n- 1x Update/Reset button (underside)\n- 1x micro SD card slot\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../meson-gxl-s905w-mecool-m8s-pro-w.dts      | 30 +++++++++++++++++++\n 1 file changed, 30 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905w-mecool-m8s-pro-w.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905w-mecool-m8s-pro-w.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905w-mecool-m8s-pro-w.dts\nnew file mode 100644\nindex 000000000000..a5bbe7315471\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905w-mecool-m8s-pro-w.dts\n@@ -0,0 +1,30 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2018 Martin Blumenstingl <martin.blumenstingl@googlemail.com>.\n+ * Based on meson-gxl-s905d-p231.dts:\n+ * - Copyright (c) 2016 Endless Computers, Inc.\n+ *   Author: Carlo Caione <carlo@endlessm.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-gxl-s905x.dtsi\"\n+#include \"meson-gx-p23x-q20x.dtsi\"\n+\n+/ {\n+\tcompatible = \"videostrong,gxl-m8s-pro-w\", \"amlogic,s905w\", \"amlogic,meson-gxl\";\n+\tmodel = \"MeCool M8S Pro W\";\n+\n+\tmemory@0 {\n+\t\tdevice_type = \"memory\";\n+\t\treg = <0x0 0x0 0x0 0x80000000>;\n+\t};\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-mecool-m8s-pro-w\";\n+};\n+\n+&usb {\n+\tdr_mode = \"host\";\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0083-WIP-dt-bindings-arm-amlogic-add-Vero-4K-binding.patch",
    "content": "From 98ae62b3a7453b7210a56a97b0d78d5772f5d797 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 19 Jan 2022 02:40:20 +0000\nSubject: [PATCH 083/120] WIP: dt-bindings: arm: amlogic: add Vero 4K binding\n\nAdd the board binding for the OSMC Vero 4K STB device\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex 70706c8d5ed8..63a2093cb626 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -102,6 +102,7 @@ properties:\n               - libretech,aml-s905x-cc\n               - libretech,aml-s905x-cc-v2\n               - nexbox,a95x\n+              - osmc,vero4k\n           - const: amlogic,s905x\n           - const: amlogic,meson-gxl\n \n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0084-WIP-arm64-dts-meson-add-support-for-OSMC-Vero-4K.patch",
    "content": "From 3cf39f2b0406b2d6c9eaf85e1e8e920448357ba1 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 19 Jan 2022 04:06:17 +0000\nSubject: [PATCH 084/120] WIP: arm64: dts: meson: add support for OSMC Vero 4K\n\nThe OSMC Vero 4K device is based on the Amlogic S905X (P212) reference\ndesign with the following specifications:\n\n- 2GB DDR4 RAM\n- 16GB eMMC\n- HDMI 2.1 video\n- S/PDIF optical output\n- AV output\n- 10/100 Ethernet\n- AP6255 Wireless (802.11 a/b/g/n/ac, BT 4.2)\n- 2x USB 2.0 ports (1x OTG)\n- IR receiver (internal)\n- IR extender port (external)\n- 1x micro SD card slot\n- 1x Power LED (red)\n- 1x Reset button (in AV jack)\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |   1 +\n .../dts/amlogic/meson-gxl-s905x-vero4k.dts    | 180 ++++++++++++++++++\n 2 files changed, 181 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-vero4k.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex f27222c9d292..2c4c83cc0a04 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -52,6 +52,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc-v2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-vero4k.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-jethome-jethub-j80.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-p281.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-tx3-mini.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-vero4k.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-vero4k.dts\nnew file mode 100644\nindex 000000000000..6196153e424d\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-vero4k.dts\n@@ -0,0 +1,180 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Author: Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-gxl-s905x-p212.dtsi\"\n+#include <dt-bindings/input/input.h>\n+#include <dt-bindings/leds/common.h>\n+#include <dt-bindings/sound/meson-aiu.h>\n+\n+/ {\n+\tcompatible = \"osmc,vero4k\", \"amlogic,s905x\", \"amlogic,meson-gxl\";\n+\tmodel = \"OSMC Vero 4K\";\n+\n+\treserved-memory {\n+\t\t/* 32 MiB reserved for ARM Trusted Firmware (BL32) */\n+\t\tsecmon_reserved_bl32: secmon@5300000 {\n+\t\t\treg = <0x0 0x05300000 0x0 0x2000000>;\n+\t\t\tno-map;\n+\t\t};\n+\t};\n+\n+\tgpio-keys-polled {\n+\t\tcompatible = \"gpio-keys-polled\";\n+\t\t#address-cells = <1>;\n+\t\t#size-cells = <0>;\n+\t\tpoll-interval = <20>;\n+\n+\t\tbutton@0 {\n+\t\t\tlabel = \"power\";\n+\t\t\tlinux,code = <KEY_POWER>;\n+\t\t\tgpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;\n+\t\t};\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-standby {\n+\t\t\tcolor = <LED_COLOR_ID_RED>;\n+\t\t\tfunction = LED_FUNCTION_POWER;\n+\t\t\tgpios = <&gpio GPIODV_24 GPIO_ACTIVE_LOW>;\n+\t\t\tdefault-state = \"off\";\n+\t\t\tpanic-indicator;\n+\t\t};\n+\t};\n+\n+\tdio2133: analog-amplifier {\n+\t\tcompatible = \"simple-audio-amplifier\";\n+\t\tsound-name-prefix = \"AU2\";\n+\t\tVCC-supply = <&hdmi_5v>;\n+\t\tenable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;\n+\t};\n+\n+\tcvbs-connector {\n+\t\tcompatible = \"composite-video-connector\";\n+\n+\t\tport {\n+\t\t\tcvbs_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&cvbs_vdac_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\thdmi-connector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,gx-sound-card\";\n+\t\tmodel = \"VERO4K\";\n+\t\taudio-aux-devs = <&dio2133>;\n+\t\taudio-widgets = \"Line\", \"Lineout\";\n+\t\taudio-routing = \"AU2 INL\", \"ACODEC LOLN\",\n+\t\t\t\t\"AU2 INR\", \"ACODEC LORN\",\n+\t\t\t\t\"Lineout\", \"AU2 OUTL\",\n+\t\t\t\t\"Lineout\", \"AU2 OUTR\";\n+\t\tassigned-clocks = <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>,\n+\t\t\t\t  <&clkc CLKID_MPLL2>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_I2S>;\n+\t\t\t};\n+\n+\t\t\tcodec-1 {\n+\t\t\t\tsound-dai = <&aiu AIU_ACODEC CTRL_I2S>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&aiu AIU_ACODEC CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&acodec>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&acodec {\n+\tAVDD-supply = <&vddio_ao18>;\n+\tstatus = \"okay\";\n+};\n+\n+&aiu {\n+\tstatus = \"okay\";\n+};\n+\n+&cec_AO {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&ao_cec_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&cvbs_vdac_port {\n+\tcvbs_vdac_out: endpoint {\n+\t\tremote-endpoint = <&cvbs_connector_in>;\n+\t};\n+};\n+\n+&ethmac {\n+        phy-mode = \"rmii\";\n+        phy-handle = <&internal_phy>;\n+};\n+\n+&hdmi_tx {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-supply = <&hdmi_5v>;\n+};\n+\n+&hdmi_tx_tmds_port {\n+\thdmi_tx_tmds_out: endpoint {\n+\t\tremote-endpoint = <&hdmi_connector_in>;\n+\t};\n+};\n+\n+&internal_phy {\n+        pinctrl-0 = <&eth_link_led_pins>, <&eth_act_led_pins>;\n+        pinctrl-names = \"default\";\n+};\n+\n+/* This UART is brought out to the DB9 connector */\n+&uart_AO {\n+\tstatus = \"okay\";\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0085-WIP-arm64-dts-meson-sm1-x96-air-add-RTL8822CS-WiFi-a.patch",
    "content": "From 98494cbc35117a83cff5e0c23d200243bdff4f43 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Tue, 12 Apr 2022 11:21:21 +0000\nSubject: [PATCH 085/120] WIP: arm64: dts: meson: sm1-x96-air: add RTL8822CS\n WiFi and Bluetooth support\n\nAdd support for the RTL8822CS WiFi and BT module on the board.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../dts/amlogic/meson-sm1-x96-air-gbit.dts    | 24 +++++++++++++++++++\n 1 file changed, 24 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-gbit.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-gbit.dts\nindex 7e1a74046ba5..9217db5bdcea 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-gbit.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-gbit.dts\n@@ -13,6 +13,10 @@ / {\n \tcompatible = \"amediatech,x96-air-gbit\", \"amlogic,sm1\";\n \tmodel = \"Shenzhen Amediatech Technology Co., Ltd X96 Air\";\n \n+\taliases {\n+\t\tserial2 = &uart_A;\n+\t};\n+\n \tsound {\n \t\tcompatible = \"amlogic,axg-sound-card\";\n \t\tmodel = \"X96-AIR\";\n@@ -120,6 +124,12 @@ &ir {\n \tlinux,rc-map-name = \"rc-x96max\";\n };\n \n+&sd_emmc_a {\n+\trtl8822cs: wifi@1 {\n+\t\treg = <1>;\n+\t};\n+};\n+\n &tdmif_b {\n \tstatus = \"okay\";\n };\n@@ -131,3 +141,17 @@ &tdmout_b {\n &tohdmitx {\n \tstatus = \"okay\";\n };\n+\n+&uart_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"realtek,rtl8822cs-bt\";\n+\t\tenable-gpios  = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\thost-wake-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;\n+\t\tdevice-wake-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>;\n+\t};\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0086-WIP-media-rc-add-keymap-for-Venz-V10-remote.patch",
    "content": "From bbb4c8b01cf73f2e600b1d67b742d515e1f2e6d1 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sun, 10 Apr 2022 11:51:38 +0000\nSubject: [PATCH 086/120] WIP: media: rc: add keymap for Venz V10 remote\n\nAdd a keymap and bindings for the IR (NEC) remote used with\nthe Venz V10 Android STB device.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../devicetree/bindings/media/rc.yaml         |  1 +\n drivers/media/rc/keymaps/Makefile             |  1 +\n drivers/media/rc/keymaps/rc-venz-v10.c        | 92 +++++++++++++++++++\n include/media/rc-map.h                        |  1 +\n 4 files changed, 95 insertions(+)\n create mode 100644 drivers/media/rc/keymaps/rc-venz-v10.c\n\ndiff --git a/Documentation/devicetree/bindings/media/rc.yaml b/Documentation/devicetree/bindings/media/rc.yaml\nindex 37583861376e..f390a5d2c82d 100644\n--- a/Documentation/devicetree/bindings/media/rc.yaml\n+++ b/Documentation/devicetree/bindings/media/rc.yaml\n@@ -152,6 +152,7 @@ properties:\n       - rc-videomate-tv-pvr\n       - rc-videostrong-kii-pro\n       - rc-vega-s9x\n+      - rc-venz-v10\n       - rc-wetek-hub\n       - rc-wetek-play2\n       - rc-winfast\ndiff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile\nindex f1fba08d8ed4..03bc9a8d355e 100644\n--- a/drivers/media/rc/keymaps/Makefile\n+++ b/drivers/media/rc/keymaps/Makefile\n@@ -129,6 +129,7 @@ obj-$(CONFIG_RC_MAP) += \\\n \t\t\trc-twinhan1027.o \\\n \t\t\trc-twinhan-dtv-cab-ci.o \\\n \t\t\trc-vega-s9x.o \\\n+\t\t\trc-venz-v10.o \\\n \t\t\trc-videomate-m1f.o \\\n \t\t\trc-videomate-s350.o \\\n \t\t\trc-videomate-tv-pvr.o \\\ndiff --git a/drivers/media/rc/keymaps/rc-venz-v10.c b/drivers/media/rc/keymaps/rc-venz-v10.c\nnew file mode 100644\nindex 000000000000..f0a99a31a1d7\n--- /dev/null\n+++ b/drivers/media/rc/keymaps/rc-venz-v10.c\n@@ -0,0 +1,92 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+//\n+// Copyright (C) 2022 Christian Hewitt <christianshewitt@gmail.com>\n+\n+#include <media/rc-map.h>\n+#include <linux/module.h>\n+\n+//\n+// Keytable for the Venz V10 remote control\n+//\n+\n+static struct rc_map_table venz_v10[] = {\n+\t{ 0x847912, KEY_POWER },\n+\t{ 0x847903, KEY_MUTE },\n+\n+\t{ 0x847921, KEY_EPG },\n+\t{ 0x847922, KEY_ZOOMIN },\n+\t{ 0x847923, KEY_ZOOMOUT },\n+\t{ 0x847924, KEY_SCREEN }, // LAUNCHER\n+\n+\t// UP\n+\t// DOWN\n+\t// LEFT\n+\t// RIGHT\n+\n+\t{ 0x847904, KEY_FAVORITES }, // TV-SYS\n+\t{ 0x84790a, KEY_INFO }, // RATIO\n+\t{ 0x84791f, KEY_LANGUAGE }, // TRACK\n+\t{ 0x84791e, KEY_SUBTITLE }, // SUB-T\n+\n+\t{ 0x847929, KEY_RED },\n+\t{ 0x847930, KEY_GREEN },\n+\t{ 0x847931, KEY_YELLOW },\n+\t{ 0x847932, KEY_BLUE },\n+\n+\t{ 0x847906, KEY_HOME },\n+\t{ 0x84791b, KEY_CONFIG },\n+\n+\t{ 0x847905, KEY_UP },\n+\t{ 0x847907, KEY_LEFT },\n+\t{ 0x847908, KEY_OK },\n+\t{ 0x847909, KEY_RIGHT },\n+\t{ 0x847900, KEY_DOWN },\n+\n+\t{ 0x847920, KEY_CONTEXT_MENU },\n+\t{ 0x84791a, KEY_BACK },\n+\n+\t{ 0x847910, KEY_VOLUMEUP },\n+\t{ 0x84790f, KEY_VOLUMEDOWN },\n+\t{ 0x847919, KEY_PLAYPAUSE },\n+\t{ 0x84791c, KEY_STOP },\n+\t{ 0x84791d, KEY_PREVIOUS },\n+\t{ 0x847928, KEY_NEXT },\n+\n+\t{ 0x84790b, KEY_1 },\n+\t{ 0x84790c, KEY_2 },\n+\t{ 0x84790d, KEY_3 },\n+\t{ 0x84790e, KEY_4 },\n+\t{ 0x847911, KEY_5 },\n+\t{ 0x847927, KEY_6 },\n+\t{ 0x847913, KEY_7 },\n+\t{ 0x847914, KEY_8 },\n+\t{ 0x847915, KEY_9 },\n+\t{ 0x847916, KEY_MENU }, // MOUSE\n+\t{ 0x847917, KEY_0 },\n+\t{ 0x847918, KEY_DELETE },\n+};\n+\n+static struct rc_map_list venz_v10_map = {\n+\t.map = {\n+\t\t.scan     = venz_v10,\n+\t\t.size     = ARRAY_SIZE(venz_v10),\n+\t\t.rc_proto = RC_PROTO_NEC,\n+\t\t.name     = RC_MAP_VENZ_V10,\n+\t}\n+};\n+\n+static int __init init_rc_map_venz_v10(void)\n+{\n+\treturn rc_map_register(&venz_v10_map);\n+}\n+\n+static void __exit exit_rc_map_venz_v10(void)\n+{\n+\trc_map_unregister(&venz_v10_map);\n+}\n+\n+module_init(init_rc_map_venz_v10)\n+module_exit(exit_rc_map_venz_v10)\n+\n+MODULE_LICENSE(\"GPL\");\n+MODULE_AUTHOR(\"Christian Hewitt <christianshewitt@gmail.com\");\ndiff --git a/include/media/rc-map.h b/include/media/rc-map.h\nindex 4c4eaaf02ac1..dadd4d27a760 100644\n--- a/include/media/rc-map.h\n+++ b/include/media/rc-map.h\n@@ -334,6 +334,7 @@ struct rc_map *rc_map_get(const char *name);\n #define RC_MAP_TT_1500                   \"rc-tt-1500\"\n #define RC_MAP_TWINHAN_DTV_CAB_CI        \"rc-twinhan-dtv-cab-ci\"\n #define RC_MAP_TWINHAN_VP1027_DVBS       \"rc-twinhan1027\"\n+#define RC_MAP_VENZ_V10                  \"rc-venz-v10\"\n #define RC_MAP_VEGA_S9X                  \"rc-vega-s9x\"\n #define RC_MAP_VIDEOMATE_K100            \"rc-videomate-k100\"\n #define RC_MAP_VIDEOMATE_S350            \"rc-videomate-s350\"\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0087-WIP-dt-bindings-arm-amlogic-add-S905L-and-Venz-V10-b.patch",
    "content": "From 45cee9708bfc6c1418d3a23513ea7af22bf56bd7 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 9 Apr 2022 06:27:50 +0000\nSubject: [PATCH 087/120] WIP: dt-bindings: arm: amlogic: add S905L and Venz\n V10 bindings\n\nAdd SOC bindings for S905L devices and the board binding for Venz V10.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 7 +++++++\n 1 file changed, 7 insertions(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex 63a2093cb626..5ff3e7f43a51 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -83,6 +83,13 @@ properties:\n           - const: amlogic,s805x\n           - const: amlogic,meson-gxl\n \n+      - description: Boards with the Amlogic Meson GXL S905L SoC\n+        items:\n+          - enum:\n+              - venz,v10\n+          - const: amlogic,s905l\n+          - const: amlogic,meson-gxl\n+\n       - description: Boards with the Amlogic Meson GXL S905W SoC\n         items:\n           - enum:\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0088-WIP-arm64-dts-meson-add-support-for-Venz-V10.patch",
    "content": "From 5cd1412e6bb2a6e445b6e6e8bb35c3f2e74bbf4f Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 9 Apr 2022 06:21:58 +0000\nSubject: [PATCH 088/120] WIP: arm64: dts: meson: add support for Venz V10\n\nThe Venz V10 is an Android STB based on the Amlogic P212 (GXL)\nreference design with an S905L chip and the following specs:\n\n- 1GB DDR3 RAM\n- 8GB eMMC\n- 10/100 Base-T Ethernet\n- RTL8189ES Wireless (802.11 b/g/n)\n- HDMI 2.0b video\n- 1x 3.5mm AV jack\n- 2x USB 2.0 port\n- IR receiver\n- 1x Update/Reset button (underside)\n- 1x micro SD card slot\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |   1 +\n .../dts/amlogic/meson-gxl-s905l-venz-v10.dts  | 326 ++++++++++++++++++\n 2 files changed, 327 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905l-venz-v10.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex 2c4c83cc0a04..81e8195509b4 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -46,6 +46,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p231.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-phicomm-n1.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-sml5442tw.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-vero4k-plus.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905l-venz-v10.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-hwacom-amazetv.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-khadas-vim.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905l-venz-v10.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905l-venz-v10.dts\nnew file mode 100644\nindex 000000000000..553377fce051\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905l-venz-v10.dts\n@@ -0,0 +1,326 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2016 Endless Computers, Inc.\n+ * Author: Carlo Caione <carlo@endlessm.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-gxl-s905x.dtsi\"\n+#include <dt-bindings/gpio/gpio.h>\n+#include <dt-bindings/leds/common.h>\n+#include <dt-bindings/sound/meson-aiu.h>\n+\n+/ {\n+\tcompatible = \"venz,v10\", \"amlogic,s905l\", \"amlogic,meson-gxl\";\n+\tmodel = \"Venz V10\";\n+\n+\taliases {\n+\t\tserial0 = &uart_AO;\n+\t\tethernet0 = &ethmac;\n+\t\twlan0 = &rtl8189;\n+\t};\n+\n+\tchosen {\n+\t\tstdout-path = \"serial0:115200n8\";\n+\t};\n+\n+\tmemory@0 {\n+\t\tdevice_type = \"memory\";\n+\t\treg = <0x0 0x0 0x0 0x80000000>;\n+\t};\n+\n+\tdio2133: analog-amplifier {\n+\t\tcompatible = \"simple-audio-amplifier\";\n+\t\tsound-name-prefix = \"AU2\";\n+\t\tVCC-supply = <&hdmi_5v>;\n+\t\tenable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-standby {\n+\t\t\tcolor = <LED_COLOR_ID_BLUE>;\n+\t\t\tfunction = LED_FUNCTION_POWER;\n+\t\t\tgpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;\n+\t\t\tdefault-state = \"on\";\n+                };\n+        };\n+\n+\tcvbs-connector {\n+\t\tcompatible = \"composite-video-connector\";\n+\n+\t\tport {\n+\t\t\tcvbs_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&cvbs_vdac_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\thdmi-connector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\thdmi_5v: regulator-hdmi-5v {\n+\t\tcompatible = \"regulator-fixed\";\n+\n+\t\tregulator-name = \"HDMI_5V\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\n+\t\tgpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;\n+\t\tenable-active-high;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddio_boot: regulator-vddio_boot {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDIO_BOOT\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t};\n+\n+\tvddao_3v3: regulator-vddao_3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDAO_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t};\n+\n+\tvddio_ao18: regulator-vddio_ao18 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDIO_AO18\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t};\n+\n+\tvcc_3v3: regulator-vcc_3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t};\n+\n+\temmc_pwrseq: emmc-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-emmc\";\n+\t\treset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;\n+\t};\n+\n+\twifi32k: wifi32k {\n+\t\tcompatible = \"pwm-clock\";\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tpwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */\n+\t};\n+\n+\tsdio_pwrseq: sdio-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-simple\";\n+\t\treset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"ext_clock\";\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,gx-sound-card\";\n+\t\tmodel = \"VENZ-V10\";\n+\t\taudio-aux-devs = <&dio2133>;\n+\t\taudio-widgets = \"Line\", \"Lineout\";\n+\t\taudio-routing = \"AU2 INL\", \"ACODEC LOLN\",\n+\t\t\t\t\"AU2 INR\", \"ACODEC LORN\",\n+\t\t\t\t\"Lineout\", \"AU2 OUTL\",\n+\t\t\t\t\"Lineout\", \"AU2 OUTR\";\n+\t\tassigned-clocks = <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>,\n+\t\t\t\t  <&clkc CLKID_MPLL2>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_I2S>;\n+\t\t\t};\n+\n+\t\t\tcodec-1 {\n+\t\t\t\tsound-dai = <&aiu AIU_ACODEC CTRL_I2S>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&aiu AIU_ACODEC CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&acodec>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&acodec {\n+\tAVDD-supply = <&vddio_ao18>;\n+\tstatus = \"okay\";\n+};\n+\n+&aiu {\n+\tstatus = \"okay\";\n+};\n+\n+&cec_AO {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&ao_cec_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&cvbs_vdac_port {\n+\tcvbs_vdac_out: endpoint {\n+\t\tremote-endpoint = <&cvbs_connector_in>;\n+\t};\n+};\n+\n+&ethmac {\n+\tstatus = \"okay\";\n+};\n+\n+&hdmi_tx {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-supply = <&hdmi_5v>;\n+};\n+\n+&hdmi_tx_tmds_port {\n+\thdmi_tx_tmds_out: endpoint {\n+\t\tremote-endpoint = <&hdmi_connector_in>;\n+\t};\n+};\n+\n+&ir {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&remote_input_ao_pins>;\n+\tpinctrl-names = \"default\";\n+\tlinux,rc-map-name = \"rc-venz-v10\";\n+};\n+\n+&pwm_ef {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&pwm_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&clkc CLKID_FCLK_DIV4>;\n+\tclock-names = \"clkin0\";\n+};\n+\n+&saradc {\n+\tstatus = \"okay\";\n+\tvref-supply = <&vddio_ao18>;\n+};\n+\n+/* Wireless SDIO Module */\n+&sd_emmc_a {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&sdio_pins>;\n+\tpinctrl-1 = <&sdio_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\t#address-cells = <1>;\n+\t#size-cells = <0>;\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tmax-frequency = <100000000>;\n+\n+\tnon-removable;\n+\tdisable-wp;\n+\n+\t/* WiFi firmware requires power to be kept while in suspend */\n+\tkeep-power-in-suspend;\n+\n+\tmmc-pwrseq = <&sdio_pwrseq>;\n+\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddio_boot>;\n+\n+\trtl8189: wifi@1 {\n+\t\treg = <1>;\n+\t};\n+};\n+\n+/* SD card */\n+&sd_emmc_b {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&sdcard_pins>;\n+\tpinctrl-1 = <&sdcard_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tmax-frequency = <50000000>;\n+\tdisable-wp;\n+\n+\tcd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;\n+\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddio_boot>;\n+};\n+\n+/* eMMC */\n+&sd_emmc_c {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;\n+\tpinctrl-1 = <&emmc_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <8>;\n+\tcap-mmc-highspeed;\n+\tmax-frequency = <200000000>;\n+\tnon-removable;\n+\tdisable-wp;\n+\tmmc-ddr-1_8v;\n+\tmmc-hs200-1_8v;\n+\n+\tmmc-pwrseq = <&emmc_pwrseq>;\n+\tvmmc-supply = <&vcc_3v3>;\n+\tvqmmc-supply = <&vddio_boot>;\n+};\n+\n+/* This UART is brought out to the DB9 connector */\n+&uart_AO {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_ao_a_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&usb {\n+\tstatus = \"okay\";\n+\tdr_mode = \"host\";\n+};\n+\n+&usb2_phy0 {\n+\t/* HDMI_5V is the supply for the USB VBUS */\n+\tphy-supply = <&hdmi_5v>;\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0089-WIP-dt-bindings-vendor-prefixes-add-tbee-prefix.patch",
    "content": "From de812cac86ea6d25dbe3d0e0862f762749519be4 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 6 Jul 2022 05:15:41 +0000\nSubject: [PATCH 089/120] WIP: dt-bindings: vendor-prefixes: add tbee prefix\n\nQUIDBox, Lda. are the Portuguese manufacturer of 'TBee' branded\nAndroid Set-Top Box devices.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml\nindex 9570cc9e0e06..369bd0c826a1 100644\n--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml\n+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml\n@@ -1263,6 +1263,8 @@ patternProperties:\n   \"^synopsys,.*\":\n     description: Synopsys, Inc. (deprecated, use snps)\n     deprecated: true\n+  \"^tbee,.*\":\n+    description: QUIDBox Lda.\n   \"^tbs,.*\":\n     description: TBS Technologies\n   \"^tbs-biometrics,.*\":\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0090-WIP-dt-bindings-arm-amlogic-add-TBee-Box-binding.patch",
    "content": "From 74edd1397576e08df2de0fb5944ddbd85d47172b Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 6 Jul 2022 05:05:11 +0000\nSubject: [PATCH 090/120] WIP: dt-bindings: arm: amlogic: add TBee Box binding\n\nAdd the board binding for the TBee Box.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex 5ff3e7f43a51..9e410dc8d0c5 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -110,6 +110,7 @@ properties:\n               - libretech,aml-s905x-cc-v2\n               - nexbox,a95x\n               - osmc,vero4k\n+              - tbee,box\n           - const: amlogic,s905x\n           - const: amlogic,meson-gxl\n \n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0091-WIP-arm64-dts-meson-add-support-for-TBee-Box.patch",
    "content": "From c2965f88c61c79d8cb6378b3c5f7849c7e5fa487 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 6 Jul 2022 05:23:12 +0000\nSubject: [PATCH 091/120] WIP: arm64: dts: meson: add support for TBee Box\n\nThe TBee Box is an Android STB based on the Amlogic P212 (GXL)\nreference design with an S905X chip and the following specs:\n\n- 2GB DDR3 RAM\n- 16GB eMMC\n- 10/100 Base-T Ethernet\n- QCA9377 Wireless (802.11 a/b/g/n, Bluetooth 4.0)\n- HDMI 2.0b video\n- 3x USB 2.0 ports\n- 1x USB WebCam (Sonix Technology)\n- IR receiver\n- 1x Update/Reset button (underside)\n- 1x Power LED (blue, front)\n- 1x SD card slot (full-size)\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |   1 +\n .../boot/dts/amlogic/meson-gxl-s905x-tbee.dts | 153 ++++++++++++++++++\n 2 files changed, 154 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-tbee.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex 81e8195509b4..48459c7f8f1e 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -53,6 +53,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc-v2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-tbee.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-vero4k.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-jethome-jethub-j80.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-p281.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-tbee.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-tbee.dts\nnew file mode 100644\nindex 000000000000..3584d87c1916\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-tbee.dts\n@@ -0,0 +1,153 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2016 Endless Computers, Inc.\n+ * Author: Carlo Caione <carlo@endlessm.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-gxl-s905x-p212.dtsi\"\n+#include <dt-bindings/sound/meson-aiu.h>\n+\n+/ {\n+\tcompatible = \"tbee,box\", \"amlogic,s905x\", \"amlogic,meson-gxl\";\n+\tmodel = \"TBee-Box\";\n+\n+\tdio2133: analog-amplifier {\n+\t\tcompatible = \"simple-audio-amplifier\";\n+\t\tsound-name-prefix = \"AU2\";\n+\t\tVCC-supply = <&hdmi_5v>;\n+\t\tenable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;\n+\t};\n+\n+\tcvbs-connector {\n+\t\tcompatible = \"composite-video-connector\";\n+\n+\t\tport {\n+\t\t\tcvbs_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&cvbs_vdac_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\thdmi-connector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,gx-sound-card\";\n+\t\tmodel = \"TBEE-BOX\";\n+\t\taudio-aux-devs = <&dio2133>;\n+\t\taudio-widgets = \"Line\", \"Lineout\";\n+\t\taudio-routing = \"AU2 INL\", \"ACODEC LOLN\",\n+\t\t\t\t\"AU2 INR\", \"ACODEC LORN\",\n+\t\t\t\t\"Lineout\", \"AU2 OUTL\",\n+\t\t\t\t\"Lineout\", \"AU2 OUTR\";\n+\t\tassigned-clocks = <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>,\n+\t\t\t\t  <&clkc CLKID_MPLL2>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_I2S>;\n+\t\t\t};\n+\n+\t\t\tcodec-1 {\n+\t\t\t\tsound-dai = <&aiu AIU_ACODEC CTRL_I2S>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&aiu AIU_ACODEC CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&acodec>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&acodec {\n+\tAVDD-supply = <&vddio_ao18>;\n+\tstatus = \"okay\";\n+};\n+\n+&aiu {\n+\tstatus = \"okay\";\n+};\n+\n+&cec_AO {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&ao_cec_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&cvbs_vdac_port {\n+\tcvbs_vdac_out: endpoint {\n+\t\tremote-endpoint = <&cvbs_connector_in>;\n+\t};\n+};\n+\n+&hdmi_tx {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-supply = <&hdmi_5v>;\n+};\n+\n+&hdmi_tx_tmds_port {\n+\thdmi_tx_tmds_out: endpoint {\n+\t\tremote-endpoint = <&hdmi_connector_in>;\n+\t};\n+};\n+\n+/* This is connected to the Bluetooth module: */\n+&uart_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"qcom,qca9377-bt\";\n+\t\tenable-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\tmax-speed = <2000000>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"lpo\";\n+\t};\n+};\n+\n+/* This UART is brought out to the DB9 connector */\n+&uart_AO {\n+\tstatus = \"okay\";\n+};\n+\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0092-WIP-dt-bindings-arm-amlogic-add-Beelink-GT1-binding.patch",
    "content": "From 9d8461e4e3f8f54ba7b3a9ced9eb627d4f03376e Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sun, 24 Jul 2022 08:50:28 +0000\nSubject: [PATCH 092/120] WIP: dt-bindings: arm: amlogic: add Beelink GT1\n binding\n\nAdd the board binding for the Shenzen AZW (Beelink) GT1 Android\nSet-Top Box device.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex 9e410dc8d0c5..658702b68afe 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -132,6 +132,7 @@ properties:\n           - enum:\n               - amlogic,q200\n               - amlogic,q201\n+              - azw,gt1\n               - azw,gt1-ultimate\n               - khadas,vim2\n               - kingnovel,r-box-pro\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0093-WIP-arm64-dts-meson-add-support-for-Beelink-GT1.patch",
    "content": "From 265a4f2df88d969f26edc1303bc0f6b1527d54d1 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 6 Jul 2022 10:01:03 +0000\nSubject: [PATCH 093/120] WIP: arm64: dts: meson: add support for Beelink GT1\n\nThe Beelink GT1 is based on the Amlogic S912 (Q200) reference\ndesign with the following specifications:\n\n- 2GB DDR3 RAM\n- 16GB eMMC\n- HDMI 2.1 video\n- S/PDIF optical output\n- 10/100/1000 Ethernet\n- QCA9377 Wireless (802.11 a/b/g/n, BT 4.0)\n- 2x USB 2.0 ports\n- IR receiver (internal)\n- 1x micro SD card slot\n- 1x Power LED (white)\n- 1x Reset button (underneath)\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |   1 +\n arch/arm64/boot/dts/amlogic/meson-gxm-gt1.dts | 126 ++++++++++++++++++\n 2 files changed, 127 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-gt1.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex 48459c7f8f1e..187c83c4c61e 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -64,6 +64,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc-v2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxm-gt1.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxm-gt1-ultimate.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxm-khadas-vim2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxm-mecool-kiii-pro.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-gt1.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-gt1.dts\nnew file mode 100644\nindex 000000000000..c7cdb15a4810\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-gt1.dts\n@@ -0,0 +1,126 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-gxm.dtsi\"\n+#include \"meson-gx-p23x-q20x.dtsi\"\n+#include <dt-bindings/input/input.h>\n+#include <dt-bindings/leds/common.h>\n+\n+/ {\n+\tcompatible = \"azw,gt1\", \"amlogic,s912\", \"amlogic,meson-gxm\";\n+\tmodel = \"Beelink GT1\";\n+\n+\taliases {\n+\t\trtc0 = &rtc;\n+\t\trtc1 = &vrtc;\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-white {\n+\t\t\tcolor = <LED_COLOR_ID_WHITE>;\n+\t\t\tfunction = LED_FUNCTION_POWER;\n+\t\t\tgpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;\n+\t\t\tdefault-state = \"on\";\n+\t\t\tpanic-indicator;\n+\t\t};\n+\t};\n+\n+\tadc-keys {\n+\t\tcompatible = \"adc-keys\";\n+\t\tio-channels = <&saradc 0>;\n+\t\tio-channel-names = \"buttons\";\n+\t\tkeyup-threshold-microvolt = <1710000>;\n+\n+\t\tbutton-function {\n+\t\t\tlabel = \"update\";\n+\t\t\tlinux,code = <KEY_VENDOR>;\n+\t\t\tpress-threshold-microvolt = <10000>;\n+\t\t};\n+\t};\n+};\n+\n+&ethmac {\n+\tpinctrl-0 = <&eth_pins>;\n+\tpinctrl-names = \"default\";\n+\n+\tphy-handle = <&external_phy>;\n+\tphy-mode = \"rgmii\";\n+\n+\tamlogic,tx-delay-ns = <2>;\n+};\n+\n+&external_mdio {\n+\texternal_phy: ethernet-phy@0 {\n+\t\t/* Realtek RTL8211F (0x2009087f) */\n+\t\treg = <0>;\n+\t\tmax-speed = <1000>;\n+\n+\t\treset-assert-us = <10000>;\n+\t\treset-deassert-us = <80000>;\n+\t\treset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;\n+\n+\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t/* MAC_INTR on GPIOZ_15 */\n+\t\tinterrupts = <25 IRQ_TYPE_LEVEL_LOW>;\n+\t};\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-beelink-gs1\";\n+};\n+\n+&i2c_B {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&i2c_b_pins>;\n+\tpinctrl-names = \"default\";\n+\n+\trtc: rtc@51 {\n+\t\tcompatible = \"haoyu,hym8563\";\n+\t\treg = <0x51>;\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tclock-output-names = \"xin32k\";\n+\t\twakeup-source;\n+\t};\n+};\n+\n+&pinctrl_periphs {\n+\t/* Ensure the phy irq pin is properly configured as input */\n+\teth_phy_irq_pin: eth-phy-irq {\n+\t\tmux {\n+\t\t\tgroups = \"GPIOZ_15\";\n+\t\t\tfunction = \"gpio_periphs\";\n+\t\t\tbias-disable;\n+\t\t\toutput-disable;\n+\t\t};\n+\t};\n+};\n+\n+&sd_emmc_a {\n+\t/* QCA9377 WiFi */\n+\tath10k: wifi@1 {\n+\t\treg = <1>;\n+\t\tcompatible = \"qcom,ath10k\";\n+\t};\n+};\n+\n+&uart_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"qcom,qca9377-bt\";\n+\t\tshutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\tmax-speed = <2000000>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"lpo\";\n+\t};\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0094-WIP-arm64-dts-meson-add-vcc_5v-regulator-to-WeTek-dt.patch",
    "content": "From 2652e86837fdb21477d62ef1645e463da9139536 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 27 Jul 2022 10:27:10 +0000\nSubject: [PATCH 094/120] WIP: arm64: dts: meson: add vcc_5v regulator to WeTek\n dtsi\n\nAdd the vcc_5v regulator used by the audio DAC chip\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 7 +++++++\n 1 file changed, 7 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi\nindex 94dafb955301..caa63f5edf03 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi\n@@ -71,6 +71,13 @@ vddio_ao18: regulator-vddio_ao18 {\n \t\tregulator-always-on;\n \t};\n \n+\tvcc_5v: regulator-vcc_5v {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_5V\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t};\n+\n \tvcc_3v3: regulator-vcc_3v3 {\n \t\tcompatible = \"regulator-fixed\";\n \t\tregulator-name = \"VCC_3V3\";\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0095-WIP-arm64-dts-meson-add-audio-lineout-to-WeTek-Play2.patch",
    "content": "From 80342953ec8e2d955dfa2abfa522d0b165e6d1be Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 27 Jul 2022 13:39:23 +0000\nSubject: [PATCH 095/120] WIP: arm64: dts: meson: add audio lineout to WeTek\n Play2\n\nAdd support for the ES7134LV headphone output on the WeTek Play2\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../boot/dts/amlogic/meson-gxbb-wetek-play2.dts   | 15 ++++++++++++++-\n 1 file changed, 14 insertions(+), 1 deletion(-)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts\nindex 505ffcd8eb76..e206d658d157 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts\n@@ -21,6 +21,13 @@ spdif_dit: audio-codec-0 {\n \t\tsound-name-prefix = \"DIT\";\n \t};\n \n+\ti2s_codec: audio-codec-1 {\n+\t\t#sound-dai-cells = <0>;\n+\t\tcompatible = \"everest,es7134\";\n+\t\tVDD-supply = <&vcc_5v>;\n+\t\tstatus = \"okay\";\n+\t};\n+\n \tleds {\n \t\tled-wifi {\n \t\t\tlabel = \"wetek-play:wifi-status\";\n@@ -74,6 +81,10 @@ dai-link-2 {\n \t\t\tcodec-0 {\n \t\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_I2S>;\n \t\t\t};\n+\n+\t\t\tcodec-1 {\n+\t\t\t\tsound-dai = <&i2s_codec>;\n+\t\t\t};\n \t\t};\n \n \t\tdai-link-3 {\n@@ -96,7 +107,9 @@ codec-0 {\n \n &aiu {\n \tstatus = \"okay\";\n-\tpinctrl-0 = <&spdif_out_y_pins>;\n+\tpinctrl-0 = <&i2s_am_clk_pins>, <&i2s_out_ao_clk_pins>,\n+\t\t    <&i2s_out_lr_clk_pins>, <&i2s_out_ch01_ao_pins>,\n+\t\t    <&spdif_out_y_pins>;\n \tpinctrl-names = \"default\";\n };\n \n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0096-WIP-arm64-dts-amlogic-fix-cvbs-disable-on-WeTek-Hub.patch",
    "content": "From 6c308ef81cfef32b67d12c4f3ab19cc71c19d41e Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Fri, 29 Jul 2022 08:29:20 +0000\nSubject: [PATCH 096/120] WIP: arm64: dts: amlogic: fix cvbs disable on WeTek\n Hub\n\nThe original submission in commit d537d289de06 (\"ARM64: dts: meson-gxbb:\nAdd support for WeTek Hub and Play\") shows cvbs output as disabled, but\nthis appears to have been dropped accidentally when moving WeTek boards\nto a common dtsi. The Hub does not have cvbs hardware so let's fix and\nreinstate the disable.\n\nFixes fb72c03e0e32 (\"ARM64: dts: meson-gxbb-wetek: add a wetek specific dtsi to cleanup hub and play2\")\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts\nindex 58733017eda8..23bea3fe9501 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts\n@@ -13,6 +13,10 @@ / {\n \tcompatible = \"wetek,hub\", \"amlogic,meson-gxbb\";\n \tmodel = \"WeTek Hub\";\n \n+\tcvbs-connector {\n+\t\tstatus = \"disabled\";\n+\t};\n+\n \tsound {\n \t\tcompatible = \"amlogic,gx-sound-card\";\n \t\tmodel = \"WETEK-HUB\";\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0097-WIP-ASoC-dt-bindings-add-compatible-for-es8323-i2c.patch",
    "content": "From b10501e41c8bede399b8465a9f02de357726f940 Mon Sep 17 00:00:00 2001\nFrom: Romain Perier <romain.perier@collabora.com>\nDate: Sun, 14 Aug 2022 04:21:16 +0000\nSubject: [PATCH 097/120] WIP: ASoC: dt-bindings: add compatible for es8323-i2c\n\nAdd a compatible for the everest,es8323 audio codec used with a number\nof Amlogic and Rockchip board devices.\n\nSigned-off-by: Romain Perier <romain.perier@collabora.com>\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\nAcked-by: Rob Herring <robh@kernel.org>\n---\n Documentation/devicetree/bindings/sound/es8328.txt | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/devicetree/bindings/sound/es8328.txt b/Documentation/devicetree/bindings/sound/es8328.txt\nindex 33fbf058c997..86b6d6e99732 100644\n--- a/Documentation/devicetree/bindings/sound/es8328.txt\n+++ b/Documentation/devicetree/bindings/sound/es8328.txt\n@@ -4,7 +4,10 @@ This device supports both I2C and SPI.\n \n Required properties:\n \n-  - compatible  : Should be \"everest,es8328\" or \"everest,es8388\"\n+  - compatible  : Should be one of the following:\n+\t- \"everest,es8323\"\n+\t- \"everest,es8328\"\n+\t- \"everest,es8388\"\n   - DVDD-supply : Regulator providing digital core supply voltage 1.8 - 3.6V\n   - AVDD-supply : Regulator providing analog supply voltage 3.3V\n   - PVDD-supply : Regulator providing digital IO supply voltage 1.8 - 3.6V\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0098-WIP-ASoC-codecs-add-support-for-ES8323.patch",
    "content": "From a1c69fc092755a59b25b7a90be3c97796bc77dc7 Mon Sep 17 00:00:00 2001\nFrom: Romain Perier <romain.perier@collabora.com>\nDate: Sun, 14 Aug 2022 04:29:32 +0000\nSubject: [PATCH 098/120] WIP: ASoC: codecs: add support for ES8323\n\nThe ES8323 is compatible with the existing ES8328 codec driver, so add\ncompatibles allowing it to be used.\n\nSigned-off-by: Romain Perier <romain.perier@collabora.com>\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n sound/soc/codecs/es8328-i2c.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/sound/soc/codecs/es8328-i2c.c b/sound/soc/codecs/es8328-i2c.c\nindex 68072e99fcc7..57c7de5cfa05 100644\n--- a/sound/soc/codecs/es8328-i2c.c\n+++ b/sound/soc/codecs/es8328-i2c.c\n@@ -16,6 +16,7 @@\n #include \"es8328.h\"\n \n static const struct i2c_device_id es8328_id[] = {\n+\t{ \"es8323\", 0 },\n \t{ \"es8328\", 0 },\n \t{ \"es8388\", 0 },\n \t{ }\n@@ -23,6 +24,7 @@ static const struct i2c_device_id es8328_id[] = {\n MODULE_DEVICE_TABLE(i2c, es8328_id);\n \n static const struct of_device_id es8328_of_match[] = {\n+\t{ .compatible = \"everest,es8323\", },\n \t{ .compatible = \"everest,es8328\", },\n \t{ .compatible = \"everest,es8388\", },\n \t{ }\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0099-WIP-dt-bindings-add-dream-vendor-prefix.patch",
    "content": "From eefcf6ac4648114ce7c0d818ee0a2c32508d09f6 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Mon, 5 Apr 2021 13:47:52 +0000\nSubject: [PATCH 099/120] WIP: dt-bindings: add dream vendor prefix\n\nAdd vendor prefix for Dream Property GmbH\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml\nindex 369bd0c826a1..a585da02832e 100644\n--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml\n+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml\n@@ -350,6 +350,8 @@ patternProperties:\n     description: DPTechnics\n   \"^dragino,.*\":\n     description: Dragino Technology Co., Limited\n+  \"^dream,.*\":\n+    description: Dream Property GmbH\n   \"^ds,.*\":\n     description: DaSheng, Inc.\n   \"^dserve,.*\":\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0100-WIP-dt-bindings-arm-amlogic-add-support-for-Dreambox.patch",
    "content": "From 04dd3e0b7c2b58a169dbfc93dca5e16b1eac18da Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Mon, 5 Apr 2021 13:48:34 +0000\nSubject: [PATCH 100/120] WIP: dt-bindings: arm: amlogic: add support for\n Dreambox One/Two\n\nThe Dreambox One and Dreambox Two are DVBS/T2 receiver boxes based\non the Amlogic W400 reference board with an S922X chip.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex 658702b68afe..b7ade343feaf 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -186,6 +186,8 @@ properties:\n               - azw,gsking-x\n               - azw,gtking\n               - azw,gtking-pro\n+              - dream,dreambox-one\n+              - dream,dreambox-two\n               - hardkernel,odroid-n2\n               - hardkernel,odroid-n2-plus\n               - khadas,vim3\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0101-WIP-arm64-dts-meson-add-initial-device-trees-for-Dre.patch",
    "content": "From 98ea0ea77819bebf2f5cfdb07020edabdd5cfbb0 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Mon, 5 Apr 2021 13:51:20 +0000\nSubject: [PATCH 101/120] WIP: arm64: dts: meson: add initial device-trees for\n Dreambox One/Two\n\nDreambox One and Dreambox Two are based on the Amlogic W400 reference\nboard with an S922X chip and the following specs:\n\n- 2GB DDR3 RAM\n- 16GB eMMC\n- 10/100/1000 Base-T Ethernet\n- AP6356 Wireless (802.11 b/g/n/ac, BT 5.0)\n- HDMI 2.1 video\n- S/PDIF optical output\n- 2x DVB-S2/T2\n- Smartcard Reader Slot\n- 2x USB 2.0 port (1x micro-USB for service)\n- 1x USB 3.0 port\n- IR receiver\n- 1x Power LED (blue)\n- 1x Power button (top)\n- 1x Update/Reset button (underside)\n- 1x micro SD card slot\n\nDreambox Two differences:\n\n- 3\" Colour LCD display (MIPI-DSI)\n- Common Interface Slot\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |   2 +\n .../dts/amlogic/meson-g12b-dreambox-one.dts   |  13 ++\n .../dts/amlogic/meson-g12b-dreambox-two.dts   |  13 ++\n .../boot/dts/amlogic/meson-g12b-dreambox.dtsi | 160 ++++++++++++++++++\n 4 files changed, 188 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-dreambox-one.dts\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-dreambox-two.dts\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex 187c83c4c61e..bc50ca8b0e79 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -11,6 +11,8 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-bananapi-cm4-cm4io.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-dreambox-one.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-dreambox-two.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gsking-x.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox-one.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox-one.dts\nnew file mode 100644\nindex 000000000000..ce3f18ad044a\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox-one.dts\n@@ -0,0 +1,13 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2019 Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-g12b-dreambox.dtsi\"\n+\n+/ {\n+\tcompatible = \"dream,dreambox-one\", \"amlogic,g12b\";\n+\tmodel = \"Dreambox One\";\n+};\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox-two.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox-two.dts\nnew file mode 100644\nindex 000000000000..b63bbb01036e\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox-two.dts\n@@ -0,0 +1,13 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2019 Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-g12b-dreambox.dtsi\"\n+\n+/ {\n+\tcompatible = \"dream,dreambox-two\", \"amlogic,g12b\";\n+\tmodel = \"Dreambox Two\";\n+};\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi\nnew file mode 100644\nindex 000000000000..14b2827b592d\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi\n@@ -0,0 +1,160 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2021 Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+#include \"meson-g12b-w400.dtsi\"\n+#include <dt-bindings/gpio/gpio.h>\n+#include <dt-bindings/leds/common.h>\n+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>\n+\n+/ {\n+        cvbs-connector {\n+\t\tstatus = \"disabled\";\n+        };\n+\n+\tsdio_pwrseq: sdio-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-simple\";\n+\t\treset-gpios = <&gpio GPIOA_11 GPIO_ACTIVE_LOW>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"ext_clock\";\n+\t};\n+\n+\tspdif_dit: audio-codec-1 {\n+\t\t#sound-dai-cells = <0>;\n+\t\tcompatible = \"linux,spdif-dit\";\n+\t\tstatus = \"okay\";\n+\t\tsound-name-prefix = \"DIT\";\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,axg-sound-card\";\n+\t\tmodel = \"DREAMBOX\";\n+\t\taudio-aux-devs = <&tdmout_b>;\n+\t\taudio-routing = \"TDMOUT_B IN 0\", \"FRDDR_A OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 1\", \"FRDDR_B OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 2\", \"FRDDR_C OUT 1\",\n+\t\t\t\t\"TDM_B Playback\", \"TDMOUT_B OUT\",\n+\t\t\t\t\"SPDIFOUT IN 0\", \"FRDDR_A OUT 3\",\n+\t\t\t\t\"SPDIFOUT IN 1\", \"FRDDR_B OUT 3\",\n+\t\t\t\t\"SPDIFOUT IN 2\", \"FRDDR_C OUT 3\";\n+\n+\t\tassigned-clocks = <&clkc CLKID_MPLL2>,\n+\t\t\t\t  <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&frddr_a>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&frddr_b>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&frddr_c>;\n+\t\t};\n+\n+\t\t/* 8ch hdmi interface */\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&tdmif_b>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tdai-tdm-slot-tx-mask-0 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-1 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-2 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-3 = <1 1>;\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* spdif hdmi or toslink interface */\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&spdifout>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&spdif_dit>;\n+\t\t\t};\n+\n+\t\t\tcodec-1 {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* spdif hdmi interface */\n+\t\tdai-link-5 {\n+\t\t\tsound-dai = <&spdifout_b>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* hdmi glue */\n+\t\tdai-link-6 {\n+\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&arb {\n+\tstatus = \"okay\";\n+};\n+\n+&clkc_audio {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_a {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_b {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_c {\n+\tstatus = \"okay\";\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-dreambox\";\n+};\n+\n+&saradc {\n+\tstatus = \"okay\";\n+\tvref-supply = <&vddao_1v8>;\n+};\n+\n+&spdifout {\n+\tpinctrl-0 = <&spdif_out_h_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"okay\";\n+};\n+\n+&spdifout_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmif_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmout_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tohdmitx {\n+\tstatus = \"okay\";\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0102-WIP-dt-bindings-arm-amlogic-add-support-for-Ugoos-AM.patch",
    "content": "From 740b7806615c9781caa1f40e390b6075764bb85e Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 15 Dec 2022 04:27:45 +0000\nSubject: [PATCH 102/120] WIP: dt-bindings: arm: amlogic: add support for Ugoos\n AM6 plus\n\nThe AM6 plus is a revised version of the AM6 Android box based\non the Amlogic W400 reference board, but now with an S922XJ to\nbump CPU speeds (rev C silicon) and add Dolby Vision features.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex b7ade343feaf..a1ec954a8b8b 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -192,6 +192,7 @@ properties:\n               - hardkernel,odroid-n2-plus\n               - khadas,vim3\n               - ugoos,am6\n+              - ugoos,am6-plus\n           - const: amlogic,s922x\n           - const: amlogic,g12b\n \n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0103-WIP-arm64-dts-meson-add-support-for-Ugoos-AM6-Plus.patch",
    "content": "From 65a60781fde14e49a5dd4c422cc909b61542cc50 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 15 Dec 2022 05:29:31 +0000\nSubject: [PATCH 103/120] WIP: arm64: dts: meson: add support for Ugoos AM6\n Plus\n\nThe Ugoos AM6 Plus is based on the Amlogic W400 (G12B) reference design\nusing the S922XJ (S922X rev-C with Dolby Vision license) chipset.\n\nHardware specifications:\n\n- 2GB/4GB LPDDR4 RAM\n- 16GB/32GB eMMC storage\n- 10/100/1000 Base-T Ethernet using External RGMII PHY\n- 802.11 a/b/g/b/ac + BT 5.0 sdio wireless (Ampak 6398S)\n- HDMI 2.0 (4k@60p) video\n- Composite video + 2-channel audio output on 3.5mm jack\n- S/PDIF audio output\n- Aux input\n- 1x USB 3.0\n- 3x USB 2.0\n- 1x micro SD card slot\n- 1x power button (rear)\n\nSuggested-by: Furkan Kardame <f.kardame@manjaro.org>\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |   1 +\n .../dts/amlogic/meson-g12b-ugoos-am6-plus.dts | 221 ++++++++++++++++++\n 2 files changed, 222 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6-plus.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex bc50ca8b0e79..615b1c496a34 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -21,6 +21,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-radxa-zero2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6-plus.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-beelink-mini-mxiii.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-mecool-ki-plus.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6-plus.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6-plus.dts\nnew file mode 100644\nindex 000000000000..dd5a9665a996\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6-plus.dts\n@@ -0,0 +1,221 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2019 BayLibre, SAS\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ * Copyright (c) 2019 Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-g12b-w400.dtsi\"\n+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>\n+\n+/ {\n+\tcompatible = \"ugoos,am6-plus\", \"amlogic,s922x\", \"amlogic,g12b\";\n+\tmodel = \"Ugoos AM6 Plus\";\n+\n+\taliases {\n+\t\trtc0 = &rtc;\n+\t\trtc1 = &vrtc;\n+\t};\n+\n+\tgpio-keys-polled {\n+\t\tcompatible = \"gpio-keys-polled\";\n+\t\tpoll-interval = <100>;\n+\n+\t\tpower-button {\n+\t\t\tlabel = \"power\";\n+\t\t\tlinux,code = <KEY_POWER>;\n+\t\t\tgpios = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>;\n+\t\t};\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-green {\n+\t\t\tlabel = \"power:green\";\n+\t\t\tgpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;\n+\t\t\tdefault-state = \"on\";\n+\t\t};\n+\t};\n+\n+\tspdif_dit: audio-codec-1 {\n+\t\t#sound-dai-cells = <0>;\n+\t\tcompatible = \"linux,spdif-dit\";\n+\t\tstatus = \"okay\";\n+\t\tsound-name-prefix = \"DIT\";\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,axg-sound-card\";\n+\t\tmodel = \"AM6-PLUS\";\n+\t\taudio-aux-devs = <&tdmout_b>;\n+\t\taudio-routing = \"TDMOUT_B IN 0\", \"FRDDR_A OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 1\", \"FRDDR_B OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 2\", \"FRDDR_C OUT 1\",\n+\t\t\t\t\"TDM_B Playback\", \"TDMOUT_B OUT\",\n+\t\t\t\t\"SPDIFOUT IN 0\", \"FRDDR_A OUT 3\",\n+\t\t\t\t\"SPDIFOUT IN 1\", \"FRDDR_B OUT 3\",\n+\t\t\t\t\"SPDIFOUT IN 2\", \"FRDDR_C OUT 3\";\n+\n+\t\tassigned-clocks = <&clkc CLKID_MPLL2>,\n+\t\t\t\t  <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&frddr_a>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&frddr_b>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&frddr_c>;\n+\t\t};\n+\n+\t\t/* 8ch hdmi interface */\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&tdmif_b>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tdai-tdm-slot-tx-mask-0 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-1 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-2 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-3 = <1 1>;\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* spdif hdmi or toslink interface */\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&spdifout>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&spdif_dit>;\n+\t\t\t};\n+\n+\t\t\tcodec-1 {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* spdif hdmi interface */\n+\t\tdai-link-5 {\n+\t\t\tsound-dai = <&spdifout_b>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* hdmi glue */\n+\t\tdai-link-6 {\n+\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&arb {\n+\tstatus = \"okay\";\n+};\n+\n+&clkc_audio {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_a {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_b {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_c {\n+\tstatus = \"okay\";\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-khadas\";\n+};\n+\n+&i2c3 {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;\n+\tpinctrl-names = \"default\";\n+\n+\trtc: rtc@51 {\n+\t\tcompatible = \"haoyu,hym8563\";\n+\t\treg = <0x51>;\n+\t};\n+};\n+\n+&spdifout {\n+\tpinctrl-0 = <&spdif_out_h_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"okay\";\n+};\n+\n+&spdifout_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmif_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmout_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tohdmitx {\n+\tstatus = \"okay\";\n+};\n+\n+&uart_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"brcm,bcm43438-bt\";\n+\t\tshutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\tmax-speed = <2000000>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"lpo\";\n+\t};\n+};\n+\n+&uart_AO {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_ao_a_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&usb {\n+\tstatus = \"okay\";\n+\tdr_mode = \"host\";\n+\tvbus-supply = <&usb_pwr_en>;\n+};\n+\n+&usb2_phy0 {\n+\tphy-supply = <&usb1_pow>;\n+};\n+\n+&usb2_phy1 {\n+\tphy-supply = <&usb1_pow>;\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0104-WIP-arm64-dts-meson-add-support-for-MeCool-M8S-Pro-P.patch",
    "content": "From ebe052f07c62ef9836b8fbdd6a4a56c70d55587e Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Tue, 24 Jan 2023 16:57:20 +0000\nSubject: [PATCH 104/120] WIP: arm64: dts: meson: add support for MeCool M8S\n Pro Plus\n\nThis is an S905X device based on the P212 reference design, but\nwith an S908CS WiFi/BT module that is not currently supported.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |   1 +\n .../meson-gxl-s905x-mecool-m8s-pro-plus.dts   | 150 ++++++++++++++++++\n 2 files changed, 151 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-mecool-m8s-pro-plus.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex 615b1c496a34..43ffbe9e359e 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -54,6 +54,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-hwacom-amazetv.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-khadas-vim.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc-v2.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-mecool-m8s-pro-plus.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-tbee.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-mecool-m8s-pro-plus.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-mecool-m8s-pro-plus.dts\nnew file mode 100644\nindex 000000000000..84772ce12e00\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-mecool-m8s-pro-plus.dts\n@@ -0,0 +1,150 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2016 Endless Computers, Inc.\n+ * Author: Carlo Caione <carlo@endlessm.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-gxl-s905x-p212.dtsi\"\n+#include <dt-bindings/sound/meson-aiu.h>\n+\n+/ {\n+\tcompatible = \"videostrong,mecool-m8s-pro-plus\", \"amlogic,s905x\", \"amlogic,meson-gxl\";\n+\tmodel = \"MeCool M8S Pro Plus\";\n+\n+\tdio2133: analog-amplifier {\n+\t\tcompatible = \"simple-audio-amplifier\";\n+\t\tsound-name-prefix = \"AU2\";\n+\t\tVCC-supply = <&hdmi_5v>;\n+\t\tenable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;\n+\t};\n+\n+\tcvbs-connector {\n+\t\tcompatible = \"composite-video-connector\";\n+\n+\t\tport {\n+\t\t\tcvbs_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&cvbs_vdac_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\thdmi-connector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,gx-sound-card\";\n+\t\tmodel = \"MECOOL-M8S\";\n+\t\taudio-aux-devs = <&dio2133>;\n+\t\taudio-widgets = \"Line\", \"Lineout\";\n+\t\taudio-routing = \"AU2 INL\", \"ACODEC LOLN\",\n+\t\t\t\t\"AU2 INR\", \"ACODEC LORN\",\n+\t\t\t\t\"Lineout\", \"AU2 OUTL\",\n+\t\t\t\t\"Lineout\", \"AU2 OUTR\";\n+\t\tassigned-clocks = <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>,\n+\t\t\t\t  <&clkc CLKID_MPLL2>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_I2S>;\n+\t\t\t};\n+\n+\t\t\tcodec-1 {\n+\t\t\t\tsound-dai = <&aiu AIU_ACODEC CTRL_I2S>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&aiu AIU_ACODEC CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&acodec>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&acodec {\n+\tAVDD-supply = <&vddio_ao18>;\n+\tstatus = \"okay\";\n+};\n+\n+&aiu {\n+\tstatus = \"okay\";\n+};\n+\n+&cec_AO {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&ao_cec_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&cvbs_vdac_port {\n+\tcvbs_vdac_out: endpoint {\n+\t\tremote-endpoint = <&cvbs_connector_in>;\n+\t};\n+};\n+\n+&hdmi_tx {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-supply = <&hdmi_5v>;\n+};\n+\n+&hdmi_tx_tmds_port {\n+\thdmi_tx_tmds_out: endpoint {\n+\t\tremote-endpoint = <&hdmi_connector_in>;\n+\t};\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-mecool-m8s-pro\";\n+};\n+\n+/* S9082C WiFi */\n+&sd_emmc_a {\n+\tstatus = \"disabled\";\n+};\n+\n+/* S9082C Bluetooth */\n+&uart_A {\n+\tstatus = \"disabled\";\n+};\n+\n+/* This UART is brought out to the DB9 connector */\n+&uart_AO {\n+\tstatus = \"okay\";\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0105-WIP-arm64-dts-meson-radxa-zero2-add-pwm-fan-support.patch",
    "content": "From 84eeb2347773a89ae03b936c4ba36267b6dcb28f Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Mon, 30 Jan 2023 05:09:18 +0000\nSubject: [PATCH 105/120] WIP: arm64: dts: meson: radxa-zero2: add pwm-fan\n support\n\nThe A311D on Zero2 needs active cooling and the board includes a header to\nconnect a simple fan. Add pwm-fan support with basic thermal properties so\nthe fan runs when connected.\n\nSuggested-by: Yuntian Zhang <yt@radxa.com>\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../dts/amlogic/meson-g12b-radxa-zero2.dts    | 27 +++++++++++++++++++\n 1 file changed, 27 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts\nindex 9a60c5ec2072..567a443356fe 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts\n@@ -33,6 +33,15 @@ memory@0 {\n \t\treg = <0x0 0x0 0x0 0x80000000>;\n \t};\n \n+\tfan0: pwm-fan {\n+\t\tcompatible = \"pwm-fan\";\n+\t\t#cooling-cells = <2>;\n+\t\tcooling-min-state = <0>;\n+\t\tcooling-max-state = <4>;\n+\t\tcooling-levels = <0 64 128 192 255>;\n+\t\tpwms = <&pwm_AO_ab 0 40000 0>;\n+\t};\n+\n \tgpio-keys-polled {\n \t\tcompatible = \"gpio-keys-polled\";\n \t\tpoll-interval = <100>;\n@@ -286,6 +295,24 @@ &cpu103 {\n \tclock-latency = <50000>;\n };\n \n+&cpu_thermal {\n+\tcooling-maps {\n+\t\tmap0 {\n+\t\t\ttrip = <&cpu_passive>;\n+\t\t\tcooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;\n+\t\t};\n+\t};\n+};\n+\n+&ddr_thermal {\n+\tcooling-maps {\n+\t\tmap0 {\n+\t\t\ttrip = <&ddr_passive>;\n+\t\t\tcooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;\n+\t\t};\n+\t};\n+};\n+\n &frddr_a {\n \tstatus = \"okay\";\n };\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0106-WIP-dt-bindings-arm-amlogic-add-support-for-Tanix-TX.patch",
    "content": "From d9dd54c8b2d2f7ec05e42392205a67b20dba4e83 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 9 Feb 2023 09:59:58 +0000\nSubject: [PATCH 106/120] WIP: dt-bindings: arm: amlogic: add support for Tanix\n TX9 Pro\n\nThe Oranth Tanix TX9 Pro is an Android STB using the Amlogic S912 chip\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex a1ec954a8b8b..dea5d15da404 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -139,6 +139,7 @@ properties:\n               - libretech,aml-s912-pc\n               - minix,neo-u9h\n               - nexbox,a1\n+              - oranth,tx9-pro\n               - tronsmart,vega-s96\n               - videostrong,gxm-kiii-pro\n               - wetek,core2\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0107-WIP-arm64-dts-meson-add-initial-device-tree-for-Tani.patch",
    "content": "From 551f6b28a561c121f00222c0f101c75dfad93d4b Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 9 Feb 2023 10:01:14 +0000\nSubject: [PATCH 107/120] WIP: arm64: dts: meson: add initial device-tree for\n Tanix TX9 Pro\n\nOranth Tanix TX9 Pro is based on the Amlogic Q200 reference design with\nan S912 chip and the following specs:\n\n- 3GB DDR3 RAM\n- 32GB eMMC\n- 10/100/1000 Base-T Ethernet\n- AP6356 Wireless (802.11 b/g/n/ac, BT 5.0)\n- HDMI 2.0a video\n- VFD for clock/status\n- 2x USB 2.0 ports\n- IR receiver\n- 1x Power LED (white)\n- 1x Update/Reset button (underside)\n- 1x micro SD card slot\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |  1 +\n .../boot/dts/amlogic/meson-gxm-tx9-pro.dts    | 90 +++++++++++++++++++\n 2 files changed, 91 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-tx9-pro.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex 43ffbe9e359e..8b4155e0140c 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -78,6 +78,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q200.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q201.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxm-tx9-pro.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-s4-s805x2-aq222.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-tx9-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-tx9-pro.dts\nnew file mode 100644\nindex 000000000000..9a62176cfe5a\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-tx9-pro.dts\n@@ -0,0 +1,90 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2016 Endless Computers, Inc.\n+ * Author: Carlo Caione <carlo@endlessm.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-gxm.dtsi\"\n+#include \"meson-gx-p23x-q20x.dtsi\"\n+#include <dt-bindings/input/input.h>\n+\n+/ {\n+\tcompatible = \"oranth,tx9-pro\", \"amlogic,s912\", \"amlogic,meson-gxm\";\n+\tmodel = \"Tanix TX9 Pro\";\n+\n+\tadc-keys {\n+\t\tcompatible = \"adc-keys\";\n+\t\tio-channels = <&saradc 0>;\n+\t\tio-channel-names = \"buttons\";\n+\t\tkeyup-threshold-microvolt = <1710000>;\n+\n+\t\tbutton-function {\n+\t\t\tlabel = \"Update\";\n+\t\t\tlinux,code = <KEY_VENDOR>;\n+\t\t\tpress-threshold-microvolt = <10000>;\n+\t\t};\n+\t};\n+\n+\tgpio-keys-polled {\n+\t\tcompatible = \"gpio-keys-polled\";\n+\t\tpoll-interval = <100>;\n+\n+\t\tbutton {\n+\t\t\tlabel = \"power\";\n+\t\t\tlinux,code = <KEY_POWER>;\n+\t\t\tgpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;\n+\t\t};\n+\t};\n+};\n+\n+&ethmac {\n+\tpinctrl-0 = <&eth_pins>;\n+\tpinctrl-names = \"default\";\n+\tphy-handle = <&external_phy>;\n+\tamlogic,tx-delay-ns = <2>;\n+\tphy-mode = \"rgmii\";\n+};\n+\n+&external_mdio {\n+\texternal_phy: ethernet-phy@0 {\n+\t\t/* Realtek RTL8211F (0x001cc916) */\n+\t\treg = <0>;\n+\t\tmax-speed = <1000>;\n+\n+\t\treset-assert-us = <10000>;\n+\t\treset-deassert-us = <80000>;\n+\t\treset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;\n+\n+\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t/* MAC_INTR on GPIOZ_15 */\n+\t\tinterrupts = <25 IRQ_TYPE_LEVEL_LOW>;\n+\t};\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-tanix-tx3mini\";\n+};\n+\n+&sd_emmc_a {\n+\tbrcmf: wifi@1 {\n+\t\treg = <1>;\n+\t\tcompatible = \"brcm,bcm4329-fmac\";\n+\t};\n+};\n+\n+&uart_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"brcm,bcm43438-bt\";\n+\t\tshutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\tmax-speed = <2000000>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"lpo\";\n+\t};\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0108-WIP-arm64-dts-meson-add-7-segment-display-to-Tanix-T.patch",
    "content": "From 0b2aaaf3f86a0b904b45cb7ef30ae5804a2b95b9 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 9 Feb 2023 10:11:39 +0000\nSubject: [PATCH 108/120] WIP: arm64: dts: meson: add 7-segment display to\n Tanix TX9 Pro\n\nAdd support for the 7-segment VFD display of the device\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../boot/dts/amlogic/meson-gxm-tx9-pro.dts    | 59 +++++++++++++++++++\n 1 file changed, 59 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-tx9-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-tx9-pro.dts\nindex 9a62176cfe5a..2dcff00794b9 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxm-tx9-pro.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-tx9-pro.dts\n@@ -9,6 +9,7 @@\n #include \"meson-gxm.dtsi\"\n #include \"meson-gx-p23x-q20x.dtsi\"\n #include <dt-bindings/input/input.h>\n+#include <dt-bindings/leds/common.h>\n \n / {\n \tcompatible = \"oranth,tx9-pro\", \"amlogic,s912\", \"amlogic,meson-gxm\";\n@@ -37,6 +38,64 @@ button {\n \t\t\tgpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;\n \t\t};\n \t};\n+\n+\tspi {\n+\t\tcompatible = \"spi-gpio\";\n+\t\tsck-gpios = <&gpio GPIODV_27  GPIO_ACTIVE_HIGH>;\n+\t\tmosi-gpios = <&gpio GPIODV_26 GPIO_ACTIVE_HIGH>;\n+\t\tcs-gpios = <&gpio GPIODV_4 GPIO_ACTIVE_LOW>;\n+\t\tnum-chipselects = <1>;\n+\t\t#address-cells = <1>;\n+\t\t#size-cells = <0>;\n+\n+\t\ttm1628: led-controller@0 {\n+\t\t\tcompatible = \"titanmec,tm1628\";\n+\t\t\treg = <0>;\n+\t\t\tspi-3wire;\n+\t\t\tspi-lsb-first;\n+\t\t\tspi-rx-delay-us = <1>;\n+\t\t\tspi-max-frequency = <500000>;\n+\t\t\t#address-cells = <2>;\n+\t\t\t#size-cells = <0>;\n+\n+\t\t\ttitanmec,segment-mapping = /bits/ 8 <4 5 6 1 2 3 7>;\n+\t\t\ttitanmec,grid = /bits/ 8 <4 3 2 1>;\n+\n+\t\t\talarm@5,1 {\n+\t\t\t\treg = <5 1>;\n+\t\t\t\tfunction = LED_FUNCTION_ALARM;\n+\t\t\t};\n+\n+\t\t\tusb@5,2 {\n+\t\t\t\treg = <5 2>;\n+\t\t\t\tfunction = LED_FUNCTION_USB;\n+\t\t\t};\n+\t\t\tplay@5,3 {\n+\t\t\t\treg = <5 3>;\n+\t\t\t\tfunction = \"play\";\n+\t\t\t};\n+\n+\t\t\tpause@5,4 {\n+\t\t\t\treg = <5 4>;\n+\t\t\t\tfunction = \"pause\";\n+\t\t\t};\n+\n+\t\t\tcolon@5,5 {\n+\t\t\t\treg = <5 5>;\n+\t\t\t\tfunction = \"colon\";\n+\t\t\t};\n+\n+\t\t\tlan@5,6 {\n+\t\t\t\treg = <5 6>;\n+\t\t\t\tfunction = LED_FUNCTION_LAN;\n+\t\t\t};\n+\n+\t\t\twlan@5,7 {\n+\t\t\t\treg = <5 7>;\n+\t\t\t\tfunction = LED_FUNCTION_WLAN;\n+\t\t\t};\n+\t\t};\n+\t};\n };\n \n &ethmac {\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0109-WIP-net-phy-add-support-for-Maxio-MAE0621A.patch",
    "content": "From dbcc56c1a71911850208663846c93f80307eb455 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sun, 12 Feb 2023 10:45:54 +0000\nSubject: [PATCH 109/120] WIP: net: phy: add support for Maxio MAE0621A\n\nMaxio MAE0621A is the external PHY found in some Amlogic set-top box\ndevices based on the S905D chipset.\n\nSigned-off-by: Zhao Yang <yang_zhao@maxio-tech.com>\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../net/ethernet/stmicro/stmmac/stmmac_main.c |   7 +\n drivers/net/phy/Kconfig                       |   5 +\n drivers/net/phy/Makefile                      |   1 +\n drivers/net/phy/maxio.c                       | 262 ++++++++++++++++++\n drivers/net/phy/phy_device.c                  |   9 +\n 5 files changed, 284 insertions(+)\n create mode 100644 drivers/net/phy/maxio.c\n\ndiff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c\nindex 84e1740b12f1..ed48b963653e 100644\n--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c\n+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c\n@@ -7477,6 +7477,8 @@ static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue)\n \tnetdev_tx_reset_queue(netdev_get_tx_queue(priv->dev, queue));\n }\n \n+#define MAXIO_PHY_MAE0621A_ID 0x7b744411\n+\n /**\n  * stmmac_reset_queues_param - reset queue parameters\n  * @priv: device pointer\n@@ -7553,6 +7555,11 @@ int stmmac_resume(struct device *dev)\n \tstmmac_free_tx_skbufs(priv);\n \tstmmac_clear_descriptors(priv, &priv->dma_conf);\n \n+\tif (ndev->phydev->drv->config_init) {\n+\t\tif (ndev->phydev->phy_id == MAXIO_PHY_MAE0621A_ID)\n+\t\t\tndev->phydev->drv->config_init(ndev->phydev);\n+\t}\n+\n \tstmmac_hw_setup(ndev, false);\n \tstmmac_init_coalesce(priv);\n \tstmmac_set_rx_mode(ndev);\ndiff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig\nindex c57a0262fb64..9262cf995743 100644\n--- a/drivers/net/phy/Kconfig\n+++ b/drivers/net/phy/Kconfig\n@@ -287,6 +287,11 @@ config AT803X_PHY\n \t  Currently supports the AR8030, AR8031, AR8033, AR8035 and internal\n \t  QCA8337(Internal qca8k PHY) model\n \n+config MAXIO_PHY\n+\ttristate \"MAXIO PHYs\"\n+\thelp\n+\t  Supports the Maxio MAExxxx PHYs.\n+\n config QSEMI_PHY\n \ttristate \"Quality Semiconductor PHYs\"\n \thelp\ndiff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile\nindex f7138d3c896b..11fbac4e4b6d 100644\n--- a/drivers/net/phy/Makefile\n+++ b/drivers/net/phy/Makefile\n@@ -67,6 +67,7 @@ obj-$(CONFIG_LXT_PHY)\t\t+= lxt.o\n obj-$(CONFIG_MARVELL_10G_PHY)\t+= marvell10g.o\n obj-$(CONFIG_MARVELL_PHY)\t+= marvell.o\n obj-$(CONFIG_MARVELL_88X2222_PHY)\t+= marvell-88x2222.o\n+obj-$(CONFIG_MAXIO_PHY)\t\t+= maxio.o\n obj-$(CONFIG_MAXLINEAR_GPHY)\t+= mxl-gpy.o\n obj-$(CONFIG_MEDIATEK_GE_PHY)\t+= mediatek-ge.o\n obj-$(CONFIG_MESON_GXL_PHY)\t+= meson-gxl.o\ndiff --git a/drivers/net/phy/maxio.c b/drivers/net/phy/maxio.c\nnew file mode 100644\nindex 000000000000..8d4db24b7ed1\n--- /dev/null\n+++ b/drivers/net/phy/maxio.c\n@@ -0,0 +1,262 @@\n+// SPDX-License-Identifier: GPL-2.0-or-later\n+/*\n+ * ^^ LICENSE TO BE CONFIRMED ^^\n+ *\n+ * Driver for Maxio PHYs\n+ *\n+ * Copyright (c) 2004 maxio technology, Inc.\n+ *\n+ */\n+\n+#include <linux/bitops.h>\n+#include <linux/phy.h>\n+#include <linux/module.h>\n+#include <linux/delay.h>\n+#include <linux/device.h>\n+#include <linux/timer.h>\n+#include <linux/netdevice.h>\n+\n+#define MAXIO_PAGE_SELECT\t\t0x1f\n+#define MAXIO_MAE0621A_INER\t\t0x12\n+#define MAXIO_MAE0621A_INER_LINK_STATUS\tBIT(4)\n+#define MAXIO_MAE0621A_INSR\t\t0x1d\n+#define MAXIO_MAE0621A_TX_DELAY\t\t(BIT(6) | BIT(7))\n+#define MAXIO_MAE0621A_RX_DELAY\t\t(BIT(4) | BIT(5))\n+#define MAXIO_MAE0621A_CLK_MODE_REG\t0x02\n+#define MAXIO_MAE0621A_WORK_STATUS_REG\t0x1d\n+\n+int maxio_read_paged(struct phy_device *phydev, int page, u32 regnum)\n+{\n+\tint ret = 0, oldpage;\n+\n+\toldpage = phy_read(phydev, MAXIO_PAGE_SELECT);\n+\tif (oldpage >= 0) {\n+\t\tphy_write(phydev, MAXIO_PAGE_SELECT, page);\n+\t\tret = phy_read(phydev, regnum);\n+\t}\n+\tphy_write(phydev, MAXIO_PAGE_SELECT, oldpage);\n+\n+\treturn ret;\n+}\n+\n+int maxio_write_paged(struct phy_device *phydev, int page, u32 regnum, u16 val)\n+{\n+\tint ret = 0, oldpage;\n+\n+\toldpage = phy_read(phydev, MAXIO_PAGE_SELECT);\n+\tif (oldpage >= 0) {\n+\t\tphy_write(phydev, MAXIO_PAGE_SELECT, page);\n+\t\tret = phy_write(phydev, regnum, val);\n+\t}\n+\tphy_write(phydev, MAXIO_PAGE_SELECT, oldpage);\n+\n+\treturn ret;\n+}\n+\n+static int maxio_mae0621a_clk_init(struct phy_device *phydev)\n+{\n+\tu32 workmode, clkmode, oldpage;\n+\n+\toldpage = phy_read(phydev, MAXIO_PAGE_SELECT);\n+\tif (oldpage == 0xFFFF)\n+\t\toldpage = phy_read(phydev, MAXIO_PAGE_SELECT);\n+\n+\t/* soft reset */\n+\tphy_write(phydev, MAXIO_PAGE_SELECT, 0x0);\n+\tphy_write(phydev, MII_BMCR, BMCR_RESET | phy_read(phydev, MII_BMCR));\n+\n+\t/* get workmode */\n+\tphy_write(phydev, MAXIO_PAGE_SELECT, 0xa43);\n+\tworkmode = phy_read(phydev, MAXIO_MAE0621A_WORK_STATUS_REG);\n+\n+\t/* get clkmode */\n+\tphy_write(phydev,  MAXIO_PAGE_SELECT, 0xd92);\n+\tclkmode = phy_read(phydev, MAXIO_MAE0621A_CLK_MODE_REG);\n+\n+\t/* abnormal */\n+\tif (0 == (workmode & BIT(5))) {\n+\t\tif (0 == (clkmode & BIT(8))) {\n+\t\t\t/* oscillator */\n+\t\t\tphy_write(phydev, 0x02, clkmode | BIT(8));\n+\t\t\tpr_debug(\"maxio: mae0621a_clk_init clkmode 0x210a: 0x%x\\n\",\n+\t\t\t\tphydev->phy_id);\n+\t\t} else {\n+\t\t\t/* crystal */\n+\t\t\tpr_debug(\"maxio: mae0621a_clk_init clkmode 0x200a: 0x%x\\n\",\n+\t\t\t\tphydev->phy_id);\n+\t\t\tphy_write(phydev, 0x02, clkmode & (~BIT(8)));\n+\t\t}\n+\t}\n+\n+\tphy_write(phydev, MAXIO_PAGE_SELECT, 0x0);\n+\tphy_write(phydev, MAXIO_PAGE_SELECT, oldpage);\n+\n+\treturn 0;\n+}\n+\n+static int maxio_read_mmd(struct phy_device *phydev, int devnum, u16 regnum)\n+{\n+\tint ret = 0, oldpage;\n+\n+\toldpage = phy_read(phydev, MAXIO_PAGE_SELECT);\n+\n+\tif (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_ADV) {\n+\t\t/* eee info */\n+\t\tphy_write(phydev, MAXIO_PAGE_SELECT, 0);\n+\t\tphy_write(phydev, 0xd, MDIO_MMD_AN);\n+\t\tphy_write(phydev, 0xe, MDIO_AN_EEE_ADV);\n+\t\tphy_write(phydev, 0xd, 0x4000 | MDIO_MMD_AN);\n+\t\tret = phy_read(phydev, 0x0e);\n+\t} else {\n+\t\tret = -EOPNOTSUPP;\n+\t}\n+\tphy_write(phydev, MAXIO_PAGE_SELECT, oldpage);\n+\n+\treturn ret;\n+}\n+\n+static int maxio_write_mmd(struct phy_device *phydev, int devnum, u16 regnum, u16 val)\n+{\n+\tint ret = 0, oldpage;\n+\n+\toldpage = phy_read(phydev, MAXIO_PAGE_SELECT);\n+\n+\tif (devnum == MDIO_MMD_AN && regnum == MDIO_AN_EEE_ADV) {\n+\t\t/* eee info */\n+\t\tphy_write(phydev, MAXIO_PAGE_SELECT, 0);\n+\t\tret |= phy_write(phydev, 0xd, MDIO_MMD_AN);\n+\t\tret |= phy_write(phydev, 0xe, MDIO_AN_EEE_ADV);\n+\t\tret |= phy_write(phydev, 0xd, 0x4000 | MDIO_MMD_AN);\n+\t\tret |= phy_write(phydev, 0xe, val);\n+\t\tmsleep(100);\n+\t\tret |= genphy_restart_aneg(phydev);\n+\t} else {\n+\t\tret = -EOPNOTSUPP;\n+\t}\n+\tphy_write(phydev, MAXIO_PAGE_SELECT, oldpage);\n+\n+\treturn ret;\n+}\n+\n+static int maxio_mae0621a_config_aneg(struct phy_device *phydev)\n+{\n+\treturn genphy_config_aneg(phydev);\n+}\n+\n+static int maxio_mae0621a_config_init(struct phy_device *phydev)\n+{\n+\tstruct device *dev = &phydev->mdio.dev;\n+\tu16 val;\n+\tint ret;\n+\tu32 broken = 0;\n+\n+\tmaxio_mae0621a_clk_init(phydev);\n+\n+\t/* disable eee */\n+\tpr_debug(\"eee value: 0x%x\\n\", maxio_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV));\n+\tmaxio_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, 0);\n+\tpr_debug(\"eee value: 0x%x\\n\", maxio_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV));\n+\tbroken |= MDIO_EEE_100TX;\n+\tbroken |= MDIO_EEE_1000T;\n+\tphydev->eee_broken_modes = broken;\n+\n+\t/* enable auto_speed_down */\n+\tret = maxio_write_paged(phydev, 0xd8f, 0x0, 0x300);\n+\n+\t/* adjust tx/rx delay */\n+\tswitch (phydev->interface) {\n+\tcase PHY_INTERFACE_MODE_RGMII:\n+\t\tval = 0x0;\n+\t\tbreak;\n+\tcase PHY_INTERFACE_MODE_RGMII_ID:\n+\t\tval = MAXIO_MAE0621A_TX_DELAY | MAXIO_MAE0621A_RX_DELAY;\n+\t\tbreak;\n+\tcase PHY_INTERFACE_MODE_RGMII_RXID:\n+\t\tval = MAXIO_MAE0621A_RX_DELAY;\n+\t\tbreak;\n+\tcase PHY_INTERFACE_MODE_RGMII_TXID:\n+\t\tval = MAXIO_MAE0621A_TX_DELAY;\n+\t\tbreak;\n+\tdefault:\n+\t\t/* leave delays as-is. */\n+\t\tgoto delay_skip;\n+\t}\n+\n+\tret = maxio_read_paged(phydev, 0xd96, 0x0);\n+\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"Failed to update the TX delay register\\n\");\n+\t\treturn ret;\n+\t}\n+\tret = maxio_write_paged(phydev, 0xd96, 0x0, val | ret);\n+\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"Failed to update the TX delay register\\n\");\n+\t\treturn ret;\n+\t} else if (ret == 0) {\n+\t\tdev_dbg(dev,\n+\t\t\t\"2ns  delay was already %s (by pin-strapping RXD1 or bootloader configuration)\\n\",\n+\t\t\tval ? \"enabled\" : \"disabled\");\n+\t}\n+delay_skip:\n+\n+\tphy_write(phydev, MII_BMCR, BMCR_RESET | phy_read(phydev, MII_BMCR));\n+\tmsleep(20);\n+\tphy_write(phydev, MAXIO_PAGE_SELECT, 0x0);\n+\n+\treturn 0;\n+}\n+\n+static int maxio_mae0621a_resume(struct phy_device *phydev)\n+{\n+\tint ret = genphy_resume(phydev);\n+\n+\tret |= phy_write(phydev, MII_BMCR, BMCR_RESET | phy_read(phydev, MII_BMCR));\n+\n+\tmsleep(20);\n+\n+\treturn ret;\n+}\n+\n+int maxio_mae0621a_suspend(struct phy_device *phydev)\n+{\n+\tgenphy_suspend(phydev);\n+\tphy_write(phydev, MAXIO_PAGE_SELECT, 0);\n+\n+\treturn 0;\n+}\n+\n+static int maxio_mae0621a_status(struct phy_device *phydev)\n+{\n+\treturn genphy_read_status(phydev);\n+}\n+\n+static int maxio_mae0621a_probe(struct phy_device *phydev)\n+{\n+\tint ret = maxio_mae0621a_clk_init(phydev);\n+\n+\tmdelay(100);\n+\n+\treturn ret;\n+}\n+\n+static struct phy_driver maxio_nc_drvs[] = {\n+\t{\n+\t\t.phy_id\t\t= 0x7b744411,\n+\t\t.phy_id_mask\t= 0x7fffffff,\n+\t\t.name\t\t= \"MAE0621A Gigabit Ethernet\",\n+\t\t.features\t= PHY_GBIT_FEATURES,\n+\t\t.probe\t\t= maxio_mae0621a_probe,\n+\t\t.config_init\t= maxio_mae0621a_config_init,\n+\t\t.config_aneg\t= maxio_mae0621a_config_aneg,\n+\t\t.read_status\t= maxio_mae0621a_status,\n+\t\t.suspend\t= maxio_mae0621a_suspend,\n+\t\t.resume\t\t= maxio_mae0621a_resume,\n+\t},\n+};\n+\n+module_phy_driver(maxio_nc_drvs);\n+\n+MODULE_DESCRIPTION(\"Maxio PHY Driver\");\n+MODULE_AUTHOR(\"Zhao Yang <yang_zhao@maxio-tech.com>\");\n+MODULE_LICENSE(\"GPL\");\ndiff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c\nindex 8cff61dbc4b5..d27a396b0905 100644\n--- a/drivers/net/phy/phy_device.c\n+++ b/drivers/net/phy/phy_device.c\n@@ -844,6 +844,15 @@ static int get_phy_c22_id(struct mii_bus *bus, int addr, u32 *phy_id)\n {\n \tint phy_reg;\n \n+#ifdef CONFIG_MAXIO_PHY\n+\t/**\n+\t * An MDIO connects to multiple PHYs requiring write before read.\n+\t * This operation does not affect one MDIO connected to a single PHY\n+\t * MII_PHYSID2 is a read-only register and writing to it has no effect\n+\t */\n+\tmdiobus_write(bus, addr, MII_PHYSID2, 0);\n+#endif\n+\n \t/* Grab the bits from PHYIR1, and put them in the upper half */\n \tphy_reg = mdiobus_read(bus, addr, MII_PHYSID1);\n \tif (phy_reg < 0) {\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0110-WIP-dt-bindings-add-sunvell-vendor-prefix.patch",
    "content": "From ecd545158c8a7a097246012838dc9e06cb616c53 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Mon, 13 Feb 2023 11:38:16 +0000\nSubject: [PATCH 110/120] WIP: dt-bindings: add sunvell vendor prefix\n\nAdd vendor prefix for Shenzhen Sunvell Electronics Co., Ltd\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml\nindex a585da02832e..290bc7b7bc5f 100644\n--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml\n+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml\n@@ -1250,6 +1250,8 @@ patternProperties:\n     description: Sundance DSP Inc.\n   \"^sunplus,.*\":\n     description: Sunplus Technology Co., Ltd.\n+  \"^sunvell,.*\":\n+    description: Shenzhen Sunvell Electronics Co., Ltd\n   \"^SUNW,.*\":\n     description: Sun Microsystems, Inc\n   \"^supermicro,.*\":\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0111-WIP-dt-bindings-media-rc-add-rc-sunvell-t95z-plus.patch",
    "content": "From 60054b9f599a0bfca817da045fd8d0458395fd0b Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Mon, 13 Feb 2023 18:36:56 +0000\nSubject: [PATCH 111/120] WIP: dt-bindings: media: rc: add rc-sunvell-t95z-plus\n\nAdd a binding for the rc-sunvell-t95z-plus remote keymap\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/media/rc.yaml | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/devicetree/bindings/media/rc.yaml b/Documentation/devicetree/bindings/media/rc.yaml\nindex f390a5d2c82d..98946af589a0 100644\n--- a/Documentation/devicetree/bindings/media/rc.yaml\n+++ b/Documentation/devicetree/bindings/media/rc.yaml\n@@ -128,6 +128,7 @@ properties:\n       - rc-reddo\n       - rc-snapstream-firefly\n       - rc-streamzap\n+      - rc-sunvell-t95z-plus\n       - rc-su3000\n       - rc-tanix-tx3mini\n       - rc-tanix-tx5max\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0112-WIP-media-rc-add-keymap-for-Sunvell-T95Z-Plus.patch",
    "content": "From 2e8380078a0b306ba9f71dcfca1f8c5ccf0152f0 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Mon, 13 Feb 2023 19:03:10 +0000\nSubject: [PATCH 112/120] WIP: media: rc: add keymap for Sunvell T95Z Plus\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n drivers/media/rc/keymaps/Makefile             |  1 +\n .../media/rc/keymaps/rc-sunvell-t95z-plus.c   | 75 +++++++++++++++++++\n include/media/rc-map.h                        |  1 +\n 3 files changed, 77 insertions(+)\n create mode 100644 drivers/media/rc/keymaps/rc-sunvell-t95z-plus.c\n\ndiff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile\nindex 03bc9a8d355e..17547c0bcbde 100644\n--- a/drivers/media/rc/keymaps/Makefile\n+++ b/drivers/media/rc/keymaps/Makefile\n@@ -109,6 +109,7 @@ obj-$(CONFIG_RC_MAP) += \\\n \t\t\trc-reddo.o \\\n \t\t\trc-snapstream-firefly.o \\\n \t\t\trc-streamzap.o \\\n+\t\t\trc-sunvell-t95z-plus.o \\\n \t\t\trc-su3000.o \\\n \t\t\trc-tanix-tx3mini.o \\\n \t\t\trc-tanix-tx5max.o \\\ndiff --git a/drivers/media/rc/keymaps/rc-sunvell-t95z-plus.c b/drivers/media/rc/keymaps/rc-sunvell-t95z-plus.c\nnew file mode 100644\nindex 000000000000..aaaf6b1c0045\n--- /dev/null\n+++ b/drivers/media/rc/keymaps/rc-sunvell-t95z-plus.c\n@@ -0,0 +1,75 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+/*\n+ * Copyright (c) 2023 Christian Hewitt <christianshewitt@gmail.com\n+ */\n+\n+#include <media/rc-map.h>\n+#include <linux/module.h>\n+\n+/*\n+ * Keytable for Sunvell T95Z Plus remote control\n+ *\n+ */\n+\n+static struct rc_map_table sunvell_t95z_plus[] = {\n+\t{ 0xdf1c, KEY_POWER },\n+\t// TV CONTROLS\n+\n+\t{ 0xdf4b, KEY_PREVIOUS },\n+\t{ 0xdf01, KEY_SCREEN }, // TV\n+\t{ 0xdf5d, KEY_VOLUMEUP },\n+\n+\t{ 0xdf4f, KEY_NEXT },\n+\t{ 0xdf5f, KEY_FAVORITES }, // KODI\n+\t{ 0xdf5c, KEY_VOLUMEDOWN },\n+\n+\t{ 0xdf42, KEY_HOME },\n+\t{ 0xdf0a, KEY_BACK },\n+\n+\t{ 0xdf1a, KEY_UP },\n+\t{ 0xdf47, KEY_LEFT },\n+\t{ 0xdf06, KEY_ENTER },\n+\t{ 0xdf07, KEY_RIGHT },\n+\t{ 0xdf48, KEY_DOWN },\n+\n+\t{ 0xdf03, KEY_INFO }, // MOUSE\n+\t{ 0xdf18, KEY_MENU },\n+\n+\t{ 0xdf54, KEY_1 },\n+\t{ 0xdf16, KEY_2 },\n+\t{ 0xdf15, KEY_3 },\n+\t{ 0xdf50, KEY_4 },\n+\t{ 0xdf12, KEY_5 },\n+\t{ 0xdf11, KEY_6 },\n+\t{ 0xdf4c, KEY_7 },\n+\t{ 0xdf0e, KEY_8 },\n+\t{ 0xdf0d, KEY_9 },\n+\t{ 0xdf41, KEY_WWW }, // WORLD\n+\t{ 0xdf0c, KEY_0 },\n+\t{ 0xdf10, KEY_DELETE },\n+};\n+\n+static struct rc_map_list sunvell_t95z_plus_map = {\n+\t.map = {\n+\t\t.scan     = sunvell_t95z_plus,\n+\t\t.size     = ARRAY_SIZE(sunvell_t95z_plus),\n+\t\t.rc_proto = RC_PROTO_NEC,\n+\t\t.name     = RC_MAP_SUNVELL_T95Z_PLUS,\n+\t}\n+};\n+\n+static int __init init_rc_map_sunvell_t95z_plus(void)\n+{\n+\treturn rc_map_register(&sunvell_t95z_plus_map);\n+}\n+\n+static void __exit exit_rc_map_sunvell_t95z_plus(void)\n+{\n+\trc_map_unregister(&sunvell_t95z_plus_map);\n+}\n+\n+module_init(init_rc_map_sunvell_t95z_plus)\n+module_exit(exit_rc_map_sunvell_t95z_plus)\n+\n+MODULE_LICENSE(\"GPL\");\n+MODULE_AUTHOR(\"Christian Hewitt <christianshewitt@gmail.com>\");\ndiff --git a/include/media/rc-map.h b/include/media/rc-map.h\nindex dadd4d27a760..b561b122e498 100644\n--- a/include/media/rc-map.h\n+++ b/include/media/rc-map.h\n@@ -315,6 +315,7 @@ struct rc_map *rc_map_get(const char *name);\n #define RC_MAP_REDDO                     \"rc-reddo\"\n #define RC_MAP_SNAPSTREAM_FIREFLY        \"rc-snapstream-firefly\"\n #define RC_MAP_STREAMZAP                 \"rc-streamzap\"\n+#define RC_MAP_SUNVELL_T95Z_PLUS         \"rc-sunvell-t95z-plus\"\n #define RC_MAP_SU3000                    \"rc-su3000\"\n #define RC_MAP_TANIX_TX3MINI             \"rc-tanix-tx3mini\"\n #define RC_MAP_TANIX_TX5MAX              \"rc-tanix-tx5max\"\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0113-WIP-dt-bindings-arm-amlogic-add-support-for-Sunvell-.patch",
    "content": "From 3cba9548f0cd3d983ffa349516afdb0adf4a62ee Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Mon, 13 Feb 2023 11:41:09 +0000\nSubject: [PATCH 113/120] WIP: dt-bindings: arm: amlogic: add support for\n Sunvell T95Z Plus\n\nSunvell T95Z Plus is an Android STB based on the Amlogic Q200 reference\nboard with S912 chip.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex dea5d15da404..800ecbc6efa6 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -140,6 +140,7 @@ properties:\n               - minix,neo-u9h\n               - nexbox,a1\n               - oranth,tx9-pro\n+              - sunvell,t95z-plus\n               - tronsmart,vega-s96\n               - videostrong,gxm-kiii-pro\n               - wetek,core2\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0114-WIP-arm64-dts-meson-add-support-for-Sunvell-T95Z-Plu.patch",
    "content": "From 44e39b9ad7a1094d7cfd788481a219138cf34336 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Mon, 13 Feb 2023 11:46:39 +0000\nSubject: [PATCH 114/120] WIP: arm64: dts: meson: add support for Sunvell T95Z\n Plus\n\nSunvell T95Z Pluz is based on the Amlogic Q200 reference design with\nan S912 chip and the following specifications:\n\n- 2GB DDR3 RAM\n- 16GB eMMC\n- 10/100/1000 Base-T Ethernet\n- AP6255 Wireless (802.11 b/g/n/ac, BT 4.1)\n- HDMI 2.0a video\n- FTD628 VFD for clock/status\n- 2x USB 2.0 ports\n- IR receiver\n- 1x Power LED (white)\n- 1x Update/Reset button (underside)\n- 1x micro SD card slot\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |  1 +\n .../boot/dts/amlogic/meson-gxm-t95z-plus.dts  | 91 +++++++++++++++++++\n 2 files changed, 92 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-t95z-plus.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex 8b4155e0140c..8ce0c8697c94 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -79,6 +79,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q201.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxm-tx9-pro.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-gxm-t95z-plus.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-s4-s805x2-aq222.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-t95z-plus.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-t95z-plus.dts\nnew file mode 100644\nindex 000000000000..30ed5b6d325f\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-t95z-plus.dts\n@@ -0,0 +1,91 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-gxm.dtsi\"\n+#include \"meson-gx-p23x-q20x.dtsi\"\n+#include <dt-bindings/input/input.h>\n+#include <dt-bindings/leds/common.h>\n+\n+/ {\n+\tcompatible = \"sunvell,t95z-plus\", \"amlogic,s912\", \"amlogic,meson-gxm\";\n+\tmodel = \"Sunvell T95Z Plus\";\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-white {\n+\t\t\tcolor = <LED_COLOR_ID_WHITE>;\n+\t\t\tfunction = LED_FUNCTION_POWER;\n+\t\t\tgpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;\n+\t\t\tdefault-state = \"on\";\n+\t\t\tpanic-indicator;\n+\t\t};\n+\t};\n+\n+\tadc-keys {\n+\t\tcompatible = \"adc-keys\";\n+\t\tio-channels = <&saradc 0>;\n+\t\tio-channel-names = \"buttons\";\n+\t\tkeyup-threshold-microvolt = <1710000>;\n+\n+\t\tbutton-function {\n+\t\t\tlabel = \"update\";\n+\t\t\tlinux,code = <KEY_VENDOR>;\n+\t\t\tpress-threshold-microvolt = <10000>;\n+\t\t};\n+\t};\n+};\n+\n+&ethmac {\n+\tpinctrl-0 = <&eth_pins>;\n+\tpinctrl-names = \"default\";\n+\n+\tphy-handle = <&external_phy>;\n+\tphy-mode = \"rgmii\";\n+\n+\tamlogic,tx-delay-ns = <2>;\n+};\n+\n+&external_mdio {\n+\texternal_phy: ethernet-phy@1 {\n+\t\t/* ZTE ZX2AA500 */\n+\t\tcompatible = \"ethernet-phy-id0381.5c11\",\n+\t\t\t     \"ethernet-phy-ieee802.3-c22\";\n+\t\treg = <1>;\n+\t\tmax-speed = <1000>;\n+\n+\t\treset-assert-us = <10000>;\n+\t\treset-deassert-us = <80000>;\n+\t\treset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;\n+\n+\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t/* MAC_INTR on GPIOZ_15 */\n+\t\tinterrupts = <25 IRQ_TYPE_LEVEL_LOW>;\n+\t};\n+};\n+\n+&sd_emmc_a {\n+\tbrcmf: wifi@1 {\n+\t\treg = <1>;\n+\t\tcompatible = \"brcm,bcm4329-fmac\";\n+\t};\n+};\n+\n+&uart_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"brcm,bcm43438-bt\";\n+\t\tshutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\tmax-speed = <2000000>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"lpo\";\n+\t};\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0115-WIP-arm64-dts-meson-add-SPI-VFD-to-Sunvell-T95Z-Plus.patch",
    "content": "From af63c7cf2d001f7c3e86c310e8e0c42e681c1e8a Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Mon, 13 Feb 2023 13:11:14 +0000\nSubject: [PATCH 115/120] WIP: arm64: dts: meson: add SPI VFD to Sunvell T95Z\n Plus\n\nmaking guesses at the config..\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../boot/dts/amlogic/meson-gxm-t95z-plus.dts  | 79 ++++++++++++++++++-\n 1 file changed, 77 insertions(+), 2 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-t95z-plus.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-t95z-plus.dts\nindex 30ed5b6d325f..5f4bd19d5d77 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gxm-t95z-plus.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-t95z-plus.dts\n@@ -17,11 +17,18 @@ / {\n \tleds {\n \t\tcompatible = \"gpio-leds\";\n \n-\t\tled-white {\n-\t\t\tcolor = <LED_COLOR_ID_WHITE>;\n+\t\tled-green {\n+\t\t\tcolor = <LED_COLOR_ID_GREEN>;\n \t\t\tfunction = LED_FUNCTION_POWER;\n \t\t\tgpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;\n \t\t\tdefault-state = \"on\";\n+\t\t};\n+\n+\t\tled-blue {\n+\t\t\tcolor = <LED_COLOR_ID_BLUE>;\n+\t\t\tfunction = LED_FUNCTION_POWER;\n+\t\t\tgpios = <&gpio GPIODV_25 GPIO_ACTIVE_HIGH>;\n+\t\t\tdefault-state = \"off\";\n \t\t\tpanic-indicator;\n \t\t};\n \t};\n@@ -38,6 +45,74 @@ button-function {\n \t\t\tpress-threshold-microvolt = <10000>;\n \t\t};\n \t};\n+\n+\tspi {\n+\t\tcompatible = \"spi-gpio\";\n+\n+\t\t/* T95Z v1 (enabled) */\n+\t\tsck-gpios = <&gpio GPIODV_22 GPIO_ACTIVE_HIGH>;\n+\t\tmosi-gpios = <&gpio GPIODV_23 GPIO_ACTIVE_HIGH>;\n+\t\tcs-gpios = <&gpio GPIODV_21 GPIO_ACTIVE_LOW>;\n+\n+\t\t/* T95Z v2 (disabled)\n+\t\tsck-gpios = <&gpio GPIODV_19 GPIO_ACTIVE_HIGH>;\n+\t\tmosi-gpios = <&gpio GPIODV_18 GPIO_ACTIVE_HIGH>;\n+\t\tcs-gpios = <&gpio GPIODV_20 GPIO_ACTIVE_LOW>;\n+\t\t*/\n+\n+\t\tnum-chipselects = <1>;\n+\t\t#address-cells = <1>;\n+\t\t#size-cells = <0>;\n+\n+\t\ttm1628: led-controller@0 {\n+\t\t\tcompatible = \"titanmec,tm1628\";\n+\t\t\treg = <0>;\n+\t\t\tspi-3wire;\n+\t\t\tspi-lsb-first;\n+\t\t\tspi-rx-delay-us = <1>;\n+\t\t\tspi-max-frequency = <500000>;\n+\t\t\t#address-cells = <2>;\n+\t\t\t#size-cells = <0>;\n+\n+\t\t\ttitanmec,segment-mapping = /bits/ 8 <4 5 6 1 2 3 7>;\n+\t\t\ttitanmec,grid = /bits/ 8 <2 3 4 5 1>;\n+\n+\t\t\talarm@1,1 {\n+\t\t\t\treg = <1 1>;\n+\t\t\t\tfunction = LED_FUNCTION_ALARM;\n+\t\t\t};\n+\n+\t\t\tusb@1,2 {\n+\t\t\t\treg = <1 2>;\n+\t\t\t\tfunction = LED_FUNCTION_USB;\n+\t\t\t};\n+\n+\t\t\tplay@1,3 {\n+\t\t\t\treg = <1 3>;\n+\t\t\t\tfunction = \"play\";\n+\t\t\t};\n+\n+\t\t\tpause@1,4 {\n+\t\t\t\treg = <1 4>;\n+\t\t\t\tfunction = \"pause\";\n+\t\t\t};\n+\n+\t\t\tcolon@1,5 {\n+\t\t\t\treg = <1 5>;\n+\t\t\t\tfunction = \"colon\";\n+\t\t\t};\n+\n+\t\t\tlan@1,6 {\n+\t\t\t\treg = <1 6>;\n+\t\t\t\tfunction = LED_FUNCTION_LAN;\n+\t\t\t};\n+\n+\t\t\twlan@1,7 {\n+\t\t\t\treg = <1 7>;\n+\t\t\t\tfunction = LED_FUNCTION_WLAN;\n+\t\t\t};\n+\t\t};\n+\t};\n };\n \n &ethmac {\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0116-WIP-dt-bindings-arm-amlogic-add-support-for-BananaPi.patch",
    "content": "From b5c002dd9e9e461be065de69ee0e6d25ac32eeb4 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Fri, 17 Feb 2023 19:25:18 +0000\nSubject: [PATCH 116/120] WIP: dt-bindings: arm: amlogic: add support for\n BananaPi M2S variants\n\nBananaPi M2S ships in two variants with Amlogic S922X or A311D chips.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n Documentation/devicetree/bindings/arm/amlogic.yaml | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml\nindex 800ecbc6efa6..fb93a6e51061 100644\n--- a/Documentation/devicetree/bindings/arm/amlogic.yaml\n+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml\n@@ -169,6 +169,7 @@ properties:\n       - description: Boards with the Amlogic Meson G12B A311D SoC\n         items:\n           - enum:\n+              - bananapi,bpi-m2s\n               - khadas,vim3\n               - radxa,zero2\n           - const: amlogic,a311d\n@@ -188,8 +189,10 @@ properties:\n               - azw,gsking-x\n               - azw,gtking\n               - azw,gtking-pro\n+              - bananapi,bpi-m2s\n               - dream,dreambox-one\n               - dream,dreambox-two\n+              - hardkernel,odroid-go-ultra\n               - hardkernel,odroid-n2\n               - hardkernel,odroid-n2-plus\n               - khadas,vim3\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0117-WIP-arm64-dts-meson-add-support-for-BananaPi-M2S-var.patch",
    "content": "From e3881a15e8b7bae508479ca00187ccc44f6435f2 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Fri, 17 Feb 2023 09:22:24 +0000\nSubject: [PATCH 117/120] WIP: arm64: dts: meson: add support for BananaPi M2S\n variants\n\nBananaPi M2S ships in Amlogic S922X and A311D variants with the\nfollowing common specifications:\n\n- 16GB eMMC\n- HDMI 2.1a video\n- 2x 10/100/1000 Base-T Ethernet (1x RTL8211F, 1x RTL811H)\n- 2x USB 2.0 ports\n- 2x Status LED's (green/blue)\n- 1x Power/Reset button\n- 1x micro SD card slot\n- 40-pin GPIO header\n- PWM fan header\n- UART header\n\nThe S992X variant has:\n- 2GB LPDDR4 RAM\n\nThe A311D variant has:\n\n- 4GB LPDDR4 RAM\n- NPU (5.0 TOPS)\n- MIPI DSI header\n- MIPI CSI header\n\nAn optional RTL8822CS SDIO WiFi/BT mezzanine is available for\nboth board variants.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/Makefile          |   2 +\n .../amlogic/meson-g12b-a311d-bananapi-m2s.dts |  37 ++\n .../boot/dts/amlogic/meson-g12b-bananapi.dtsi | 521 ++++++++++++++++++\n .../amlogic/meson-g12b-s922x-bananapi-m2s.dts |  14 +\n 4 files changed, 574 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-a311d-bananapi-m2s.dts\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-bananapi.dtsi\n create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-s922x-bananapi-m2s.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex 8ce0c8697c94..172355a2afb0 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -9,6 +9,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12a-tanix-tx5max.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-bananapi-m2s.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-bananapi-cm4-cm4io.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-dreambox-one.dtb\n@@ -19,6 +20,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-radxa-zero2.dtb\n+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-bananapi-m2s.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb\n dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6-plus.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-bananapi-m2s.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-bananapi-m2s.dts\nnew file mode 100644\nindex 000000000000..ac6f7ae1d103\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-bananapi-m2s.dts\n@@ -0,0 +1,37 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2023 Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-g12b-a311d.dtsi\"\n+#include \"meson-g12b-bananapi.dtsi\"\n+\n+/ {\n+\tcompatible = \"bananapi,bpi-m2s\", \"amlogic,a311d\", \"amlogic,g12b\";\n+\tmodel = \"BananaPi M2S\";\n+\n+\taliases {\n+\t\ti2c0 = &i2c1;\n+\t\ti2c1 = &i2c3;\n+\t};\n+};\n+\n+/* Camera (CSI) bus */\n+&i2c1 {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&i2c1_sda_h6_pins>, <&i2c1_sck_h7_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+/* Display (DSI) bus */\n+&i2c3 {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&npu {\n+\tstatus = \"okay\";\n+};\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi.dtsi\nnew file mode 100644\nindex 000000000000..d02b50a0f7a8\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi.dtsi\n@@ -0,0 +1,521 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2019 BayLibre, SAS\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ * Copyright (c) 2023 Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+#include <dt-bindings/input/input.h>\n+#include <dt-bindings/leds/common.h>\n+#include <dt-bindings/gpio/meson-g12a-gpio.h>\n+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>\n+\n+/ {\n+\taliases {\n+\t\tserial0 = &uart_AO;\n+\t\tethernet0 = &ethmac;\n+\t\trtc1 = &vrtc;\n+\t};\n+\n+\tchosen {\n+\t\tstdout-path = \"serial0:115200n8\";\n+\t};\n+\n+\tmemory@0 {\n+\t\tdevice_type = \"memory\";\n+\t\treg = <0x0 0x0 0x0 0x80000000>; /* 2 GiB or 4 GiB */\n+\t};\n+\n+\tadc-keys {\n+\t\tcompatible = \"adc-keys\";\n+\t\tio-channels = <&saradc 2>;\n+\t\tio-channel-names = \"buttons\";\n+\t\tkeyup-threshold-microvolt = <1710000>;\n+\n+\t\tbutton-function {\n+\t\t\tlabel = \"RST\";\n+\t\t\tlinux,code = <KEY_POWER>;\n+\t\t\tpress-threshold-microvolt = <10000>;\n+\t\t};\n+\t};\n+\n+\temmc_pwrseq: emmc-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-emmc\";\n+\t\treset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;\n+\t};\n+\n+\tfan0: pwm-fan {\n+\t\tcompatible = \"pwm-fan\";\n+\t\t#cooling-cells = <2>;\n+\t\tcooling-min-state = <0>;\n+\t\tcooling-max-state = <3>;\n+\t\tcooling-levels = <0 120 170 220>;\n+\t\tpwms = <&pwm_cd 1 40000 0>;\n+\t};\n+\n+\thdmi-connector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tblue {\n+\t\t\tcolor = <LED_COLOR_ID_BLUE>;\n+\t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tgpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_LOW>;\n+\t\t\tlinux,default-trigger = \"heartbeat\";\n+\t\t};\n+\n+\t\tgreen {\n+\t\t\tcolor = <LED_COLOR_ID_GREEN>;\n+\t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tgpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;\n+\t\t};\n+\t};\n+\n+\tsdio_pwrseq: sdio-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-simple\";\n+\t\treset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"ext_clock\";\n+\t};\n+\n+\twifi32k: wifi32k {\n+\t\tcompatible = \"pwm-clock\";\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tpwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */\n+\t};\n+\n+\tdc_in: regulator-dc-in {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"DC_IN\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvcc_5v: regulator-vcc-5v {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_5V\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tvin-supply = <&dc_in>;\n+\n+\t\tgpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;\n+\t\tenable-active-high;\n+\t};\n+\n+\tvcc_3v3: regulator-vcc-3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&vsys_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvcc_1v8: regulator-vcc-1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vcc_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddao_1v8: regulator-vddao-1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDIO_AO1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vsys_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddcpu_a: regulator-vddcpu-a {\n+\t\tcompatible = \"pwm-regulator\";\n+\t\tregulator-name = \"VDDCPU_A\";\n+\t\tregulator-min-microvolt = <690000>;\n+\t\tregulator-max-microvolt = <1050000>;\n+\t\tpwm-supply = <&dc_in>;\n+\t\tpwms = <&pwm_ab 0 1250 0>;\n+\t\tpwm-dutycycle-range = <100 0>;\n+\t\tregulator-boot-on;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddcpu_b: regulator-vddcpu-b {\n+\t\tcompatible = \"pwm-regulator\";\n+\t\tregulator-name = \"VDDCPU_B\";\n+\t\tregulator-min-microvolt = <690000>;\n+\t\tregulator-max-microvolt = <1050000>;\n+\t\tpwm-supply = <&vsys_3v3>;\n+\t\tpwms = <&pwm_AO_cd 1 1250 0>;\n+\t\tpwm-dutycycle-range = <100 0>;\n+\t\tregulator-boot-on;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvsys_3v3: regulator-vsys-3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VSYS_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&dc_in>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\temmc_1v8: regulator-emmc-1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"EMMC_AO1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vcc_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tusb_pwr: regulator-usb-pwr {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"USB_PWR\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tvin-supply = <&vcc_5v>;\n+\n+\t\tgpio = <&gpio GPIOA_6 GPIO_ACTIVE_HIGH>;\n+\t\tenable-active-high;\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,axg-sound-card\";\n+\t\tmodel = \"BPI-M2S\";\n+\t\taudio-aux-devs = <&tdmout_b>;\n+\t\taudio-routing = \"TDMOUT_B IN 0\", \"FRDDR_A OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 1\", \"FRDDR_B OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 2\", \"FRDDR_C OUT 1\",\n+\t\t\t\t\"TDM_B Playback\", \"TDMOUT_B OUT\";\n+\n+\t\tassigned-clocks = <&clkc CLKID_MPLL2>,\n+\t\t\t\t  <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&frddr_a>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&frddr_b>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&frddr_c>;\n+\t\t};\n+\n+\t\t/* 8ch hdmi interface */\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&tdmif_b>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tdai-tdm-slot-tx-mask-0 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-1 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-2 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-3 = <1 1>;\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* hdmi glue */\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&arb {\n+\tstatus = \"okay\";\n+};\n+\n+&clkc_audio {\n+\tstatus = \"okay\";\n+};\n+\n+&cecb_AO {\n+\tpinctrl-0 = <&cec_ao_b_h_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"okay\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&cpu0 {\n+\tcpu-supply = <&vddcpu_b>;\n+\toperating-points-v2 = <&cpu_opp_table_0>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu1 {\n+\tcpu-supply = <&vddcpu_b>;\n+\toperating-points-v2 = <&cpu_opp_table_0>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu100 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu101 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu102 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu103 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&ethmac {\n+\tpinctrl-0 = <&eth_pins>, <&eth_rgmii_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"okay\";\n+\tphy-mode = \"rgmii\";\n+\tphy-handle = <&external_phy>;\n+\tamlogic,tx-delay-ns = <2>;\n+};\n+\n+&ext_mdio {\n+\texternal_phy: ethernet-phy@0 {\n+\t\t/* Realtek RTL8211F (0x001cc916) */\n+\t\treg = <0>;\n+\t\tmax-speed = <1000>;\n+\n+\t\treset-assert-us = <10000>;\n+\t\treset-deassert-us = <80000>;\n+\t\treset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;\n+\n+\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t/* MAC_INTR on GPIOZ_14 */\n+\t\tinterrupts = <26 IRQ_TYPE_LEVEL_LOW>;\n+\t};\n+};\n+\n+&frddr_a {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_b {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_c {\n+\tstatus = \"okay\";\n+};\n+\n+&hdmi_tx {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-supply = <&vcc_5v>;\n+};\n+\n+&hdmi_tx_tmds_port {\n+\thdmi_tx_tmds_out: endpoint {\n+\t\tremote-endpoint = <&hdmi_connector_in>;\n+\t};\n+};\n+\n+/* Main i2c bus */\n+&i2c2 {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&pcie {\n+\tstatus = \"okay\";\n+\treset-gpios = <&gpio GPIOA_8 GPIO_ACTIVE_LOW>;\n+};\n+\n+&pwm_ab {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&pwm_a_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin0\";\n+};\n+\n+&pwm_cd {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&pwm_d_x6_pins>;\n+\tpinctrl-names = \"default\";\n+\tpwm-gpios = <&gpio GPIOAO_10 GPIO_ACTIVE_HIGH>;\n+};\n+\n+&pwm_ef {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&pwm_e_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&pwm_AO_cd {\n+\tpinctrl-0 = <&pwm_ao_d_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin1\";\n+\tstatus = \"okay\";\n+};\n+\n+&saradc {\n+\tstatus = \"okay\";\n+\tvref-supply = <&vddao_1v8>;\n+};\n+\n+/* SDIO */\n+&sd_emmc_a {\n+\t/* enable if WiFi/BT board connected */\n+\tstatus = \"disabled\";\n+\tpinctrl-0 = <&sdio_pins>;\n+\tpinctrl-1 = <&sdio_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\t#address-cells = <1>;\n+\t#size-cells = <0>;\n+\n+\tbus-width = <4>;\n+\tsd-uhs-sdr104;\n+\tmax-frequency = <50000000>;\n+\n+\tnon-removable;\n+\tdisable-wp;\n+\n+\t/* WiFi firmware requires power in suspend */\n+\tkeep-power-in-suspend;\n+\n+\tmmc-pwrseq = <&sdio_pwrseq>;\n+\n+\tvmmc-supply = <&vsys_3v3>;\n+\tvqmmc-supply = <&vddao_1v8>;\n+\n+\trtl8822cs: wifi@1 {\n+\t\treg = <1>;\n+\t};\n+};\n+\n+/* SD card */\n+&sd_emmc_b {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&sdcard_c_pins>;\n+\tpinctrl-1 = <&sdcard_clk_gate_c_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tmax-frequency = <50000000>;\n+\tdisable-wp;\n+\n+\tcd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;\n+\tvmmc-supply = <&vsys_3v3>;\n+\tvqmmc-supply = <&vsys_3v3>;\n+};\n+\n+/* eMMC */\n+&sd_emmc_c {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;\n+\tpinctrl-1 = <&emmc_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <8>;\n+\tcap-mmc-highspeed;\n+\tmmc-ddr-1_8v;\n+\tmmc-hs200-1_8v;\n+\tmax-frequency = <200000000>;\n+\tdisable-wp;\n+\n+\tmmc-pwrseq = <&emmc_pwrseq>;\n+\tvmmc-supply = <&vcc_3v3>;\n+\tvqmmc-supply = <&emmc_1v8>;\n+};\n+\n+&tdmif_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmout_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tohdmitx {\n+\tstatus = \"okay\";\n+};\n+\n+&uart_A {\n+\t/* enable if WiFi/BT board connected */\n+\tstatus = \"disabled\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"realtek,rtl8822cs-bt\";\n+\t\tenable-gpios  = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\thost-wake-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;\n+\t\tdevice-wake-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>;\n+\t};\n+};\n+\n+&uart_AO {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_ao_a_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&usb2_phy0 {\n+\tphy-supply = <&dc_in>;\n+};\n+\n+&usb2_phy1 {\n+\tphy-supply = <&usb_pwr>;\n+};\n+\n+&usb3_pcie_phy {\n+\tphy-supply = <&usb_pwr>;\n+};\n+\n+&usb {\n+\tstatus = \"okay\";\n+\tdr_mode = \"peripheral\";\n+\tphys = <&usb2_phy0>, <&usb2_phy1>;\n+\tphy-names = \"usb2-phy0\", \"usb2-phy1\";\n+};\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-s922x-bananapi-m2s.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-s922x-bananapi-m2s.dts\nnew file mode 100644\nindex 000000000000..7f66f263a2ce\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-s922x-bananapi-m2s.dts\n@@ -0,0 +1,14 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2023 Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-g12b-s922x.dtsi\"\n+#include \"meson-g12b-bananapi.dtsi\"\n+\n+/ {\n+\tcompatible = \"bananapi,bpi-m2s\", \"amlogic,s922x\", \"amlogic,g12b\";\n+\tmodel = \"BananaPi M2S\";\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0118-WIP-arm64-dts-meson-p23x-q20x-fix-usb-init-don-t-for.patch",
    "content": "From eebf83427d051da9c8424ab5c351d98e31256c95 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Tue, 14 Feb 2023 08:28:00 +0000\nSubject: [PATCH 118/120] WIP: arm64: dts: meson: p23x-q20x: fix usb init -\n don't force otg\n\nForcing OTG in the p23x-q20x dtsi causes USB problems on multiple boards:\n\n[    1.246056] dwc2 c9100000.usb: supply vusb_d not found, using dummy regulator\n[    1.246442] dwc2 c9100000.usb: supply vusb_a not found, using dummy regulator\n[    1.258386] dwc2 c9100000.usb: dwc2_core_reset: HANG! Soft Reset timeout GRSTCTL_CSFTRST\n[    1.258404] dwc2: probe of c9100000.usb failed with error -16\n\nUsing 'peripheral' mode clears the error but still leaves boards without working\nUSB ports. Using 'host' mode results in working USB ports:\n\n[    1.760353] dwc2 c9100000.usb: supply vusb_d not found, using dummy regulator\n[    1.760706] dwc2 c9100000.usb: supply vusb_a not found, using dummy regulator\n[    1.761307] dwc2 c9100000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM\n\nDefine 'host' dr_mode as a safer default for all GXL/GXM boards that\nconsume the common dtsi.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi\nindex b0d008fc5f7a..025cefd6939a 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi\n+++ b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi\n@@ -324,5 +324,5 @@ &uart_AO {\n \n &usb {\n \tstatus = \"okay\";\n-\tdr_mode = \"otg\";\n+\tdr_mode = \"host\";\n };\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0119-WIP-arm64-dts-meson-add-WiFi-BT-support-to-BananaPi-.patch",
    "content": "From 9aac0fbe0ef9eb783562b52461504fd221efe92b Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Tue, 7 Mar 2023 13:17:16 +0000\nSubject: [PATCH 119/120] WIP: arm64: dts: meson: add WiFi/BT support to\n BananaPi M5\n\nThe BPI-M5 has an optional RTL8822CS WiFi/BT mezzanine board. Describe\nthe board but mark the sd_mmc_a and uart_A nodes disabled so they can\nbe enabled via overlay or fdtput when the baord is connected.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../dts/amlogic/meson-sm1-bananapi-m5.dts     | 59 +++++++++++++++++++\n 1 file changed, 59 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts\nindex 34b3238ee0a0..0b434572a789 100644\n--- a/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts\n+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts\n@@ -25,6 +25,20 @@ cvbs_connector_in: endpoint {\n \t\t};\n \t};\n \n+\tsdio_pwrseq: sdio-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-simple\";\n+\t\treset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"ext_clock\";\n+\t};\n+\n+\twifi32k: wifi32k {\n+\t\tcompatible = \"pwm-clock\";\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tpwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */\n+\t};\n+\n \tsound {\n \t\tcompatible = \"amlogic,axg-sound-card\";\n \t\tmodel = \"BPI-M5\";\n@@ -173,6 +187,36 @@ &frddr_c {\n \tstatus = \"okay\";\n };\n \n+/* SDIO */\n+&sd_emmc_a {\n+\t/* enable if WiFi/BT board connected */\n+\tstatus = \"disabled\";\n+\tpinctrl-0 = <&sdio_pins>;\n+\tpinctrl-1 = <&sdio_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\t#address-cells = <1>;\n+\t#size-cells = <0>;\n+\n+\tbus-width = <4>;\n+\tsd-uhs-sdr104;\n+\tmax-frequency = <50000000>;\n+\n+\tnon-removable;\n+\tdisable-wp;\n+\n+\t/* WiFi firmware requires power in suspend */\n+\tkeep-power-in-suspend;\n+\n+\tmmc-pwrseq = <&sdio_pwrseq>;\n+\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddao_1v8>;\n+\n+\trtl8822cs: wifi@1 {\n+\t\treg = <1>;\n+\t};\n+};\n+\n &tdmif_b {\n \tstatus = \"okay\";\n };\n@@ -220,3 +264,18 @@ &toddr_b {\n &toddr_c {\n \tstatus = \"okay\";\n };\n+\n+&uart_A {\n+\t/* enable if WiFi/BT board connected */\n+\tstatus = \"disabled\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"realtek,rtl8822cs-bt\";\n+\t\tenable-gpios  = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\thost-wake-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;\n+\t\tdevice-wake-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>;\n+\t};\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0120-WIP-media-meson-vdec-fix-memory-leak-of-new_frame.patch",
    "content": "From ffd9b1381e35fb4244a7173dfa8fbddfcc37c195 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Tue, 14 Mar 2023 01:13:15 +0000\nSubject: [PATCH 120/120] WIP: media: meson: vdec: fix memory leak of\n 'new_frame'\n\nReported-by: kernel test robot <lkp@intel.com>\nReported-by: Dan Carpenter <error27@gmail.com>\nLink: https://lore.kernel.org/r/202303120441.YFGHDOya-lkp@intel.com/\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n drivers/staging/media/meson/vdec/codec_hevc.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/drivers/staging/media/meson/vdec/codec_hevc.c b/drivers/staging/media/meson/vdec/codec_hevc.c\nindex fcaaa1ad50b8..b0d8623c3c7d 100644\n--- a/drivers/staging/media/meson/vdec/codec_hevc.c\n+++ b/drivers/staging/media/meson/vdec/codec_hevc.c\n@@ -731,6 +731,7 @@ codec_hevc_prepare_new_frame(struct amvdec_session *sess)\n \tvbuf = v4l2_m2m_dst_buf_remove(sess->m2m_ctx);\n \tif (!vbuf) {\n \t\tdev_err(sess->core->dev, \"No dst buffer available\\n\");\n+\t\tkfree(new_frame);\n \t\treturn NULL;\n \t}\n \n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/filesystem/usr/bin/cputemp",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\ncase $(dtsoc) in\n  amlogic,g12*|amlogic,sm1)\n    TEMP=$(cat /sys/devices/virtual/thermal/thermal_zone1/temp)\n    ;;\n  *)\n    TEMP=$(cat /sys/class/hwmon/hwmon0/temp1_input)\n    ;;\nesac\n\nTEMP=\"$(( $TEMP / 1000 ))\"\necho \"${TEMP} C\"\n"
  },
  {
    "path": "projects/Amlogic/kodi/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n\n  <section id=\"system\">\n    <category id=\"display\">\n      <group id=\"1\">\n        <setting id=\"videoscreen.screenmode\">\n          <visible>true</visible>\n          <default>0192001080060.00000pstd</default>\n        </setting>\n        <setting id=\"videoscreen.limitedrange\">\n          <visible>false</visible>\n        </setting>\n        <setting id=\"videoscreen.limitguisize\">\n          <visible>true</visible>\n          <default>3</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n</settings>\n"
  },
  {
    "path": "projects/Amlogic/linux/linux.aarch64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm64 6.1.19 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"aarch64-none-elf-gcc-12.2.0 (GCC) 12.2.0\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=120200\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23900\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23900\nCONFIG_LLD_VERSION=0\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_BUILD_SALT=\"\"\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_SYSVIPC_COMPAT=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\n# CONFIG_WATCH_QUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_IRQ_IPI=y\nCONFIG_GENERIC_MSI_IRQ=y\nCONFIG_GENERIC_MSI_IRQ_DOMAIN=y\nCONFIG_IRQ_MSI_IOMMU=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\nCONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_CONTEXT_TRACKING=y\nCONFIG_CONTEXT_TRACKING_IDLE=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\n# CONFIG_NO_HZ is not set\nCONFIG_HIGH_RES_TIMERS=y\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\nCONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\n# CONFIG_BPF_JIT is not set\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# end of BPF subsystem\n\nCONFIG_PREEMPT_BUILD=y\n# CONFIG_PREEMPT_NONE is not set\n# CONFIG_PREEMPT_VOLUNTARY is not set\nCONFIG_PREEMPT=y\nCONFIG_PREEMPT_COUNT=y\nCONFIG_PREEMPTION=y\n# CONFIG_PREEMPT_DYNAMIC is not set\n# CONFIG_SCHED_CORE is not set\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\nCONFIG_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_SCHED_AVG_IRQ=y\n# CONFIG_BSD_PROCESS_ACCT is not set\n# CONFIG_TASKSTATS is not set\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\nCONFIG_PREEMPT_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_RCU=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\n# end of RCU Subsystem\n\nCONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=18\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# end of Scheduler features\n\nCONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y\nCONFIG_CC_HAS_INT128=y\nCONFIG_CC_IMPLICIT_FALLTHROUGH=\"-Wimplicit-fallthrough=5\"\nCONFIG_GCC11_NO_ARRAY_BOUNDS=y\nCONFIG_GCC12_NO_ARRAY_BOUNDS=y\nCONFIG_CC_NO_ARRAY_BOUNDS=y\nCONFIG_ARCH_SUPPORTS_INT128=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\n# CONFIG_CGROUP_FAVOR_DYNMODS is not set\nCONFIG_MEMCG=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_BLK_CGROUP=y\nCONFIG_CGROUP_WRITEBACK=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\nCONFIG_CGROUP_PIDS=y\nCONFIG_CGROUP_RDMA=y\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_CGROUP_PERF=y\nCONFIG_CGROUP_BPF=y\n# CONFIG_CGROUP_MISC is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_TIME_NS=y\nCONFIG_IPC_NS=y\n# CONFIG_USER_NS is not set\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_CHECKPOINT_RESTORE is not set\nCONFIG_SCHED_AUTOGROUP=y\n# CONFIG_SYSFS_DEPRECATED is not set\nCONFIG_RELAY=y\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"@INITRAMFS_SOURCE@\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\n# CONFIG_RD_GZIP is not set\n# CONFIG_RD_BZIP2 is not set\n# CONFIG_RD_LZMA is not set\n# CONFIG_RD_XZ is not set\n# CONFIG_RD_LZO is not set\n# CONFIG_RD_LZ4 is not set\n# CONFIG_RD_ZSTD is not set\nCONFIG_INITRAMFS_COMPRESSION_NONE=y\nCONFIG_BOOT_CONFIG=y\n# CONFIG_BOOT_CONFIG_EMBED is not set\nCONFIG_INITRAMFS_PRESERVE_MTIME=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\nCONFIG_EXPERT=y\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\nCONFIG_SGETMASK_SYSCALL=y\nCONFIG_SYSFS_SYSCALL=y\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\nCONFIG_KALLSYMS_ALL=y\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_DEBUG_RSEQ is not set\nCONFIG_EMBEDDED=y\nCONFIG_HAVE_PERF_EVENTS=y\n# CONFIG_PC104 is not set\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_SYSTEM_DATA_VERIFICATION=y\nCONFIG_PROFILING=y\n# end of General setup\n\nCONFIG_ARM64=y\nCONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_64BIT=y\nCONFIG_MMU=y\nCONFIG_ARM64_PAGE_SHIFT=12\nCONFIG_ARM64_CONT_PTE_SHIFT=4\nCONFIG_ARM64_CONT_PMD_SHIFT=4\nCONFIG_ARCH_MMAP_RND_BITS_MIN=18\nCONFIG_ARCH_MMAP_RND_BITS_MAX=33\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_GENERIC_BUG=y\nCONFIG_GENERIC_BUG_RELATIVE_POINTERS=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CSUM=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y\nCONFIG_SMP=y\nCONFIG_KERNEL_MODE_NEON=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_PGTABLE_LEVELS=4\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_ARCH_PROC_KCORE_TEXT=y\n\n#\n# Platform selection\n#\n# CONFIG_ARCH_ACTIONS is not set\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_APPLE is not set\n# CONFIG_ARCH_BCM is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_BITMAIN is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_SPARX5 is not set\n# CONFIG_ARCH_K3 is not set\n# CONFIG_ARCH_LG1K is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_KEEMBAY is not set\n# CONFIG_ARCH_MEDIATEK is not set\nCONFIG_ARCH_MESON=y\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_NXP is not set\n# CONFIG_ARCH_NPCM is not set\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_REALTEK is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_ROCKCHIP is not set\n# CONFIG_ARCH_SEATTLE is not set\n# CONFIG_ARCH_INTEL_SOCFPGA is not set\n# CONFIG_ARCH_SYNQUACER is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_SPRD is not set\n# CONFIG_ARCH_THUNDER is not set\n# CONFIG_ARCH_THUNDER2 is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_VISCONTI is not set\n# CONFIG_ARCH_XGENE is not set\n# CONFIG_ARCH_ZYNQMP is not set\n# end of Platform selection\n\n#\n# Kernel Features\n#\n\n#\n# ARM errata workarounds via the alternatives framework\n#\nCONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y\nCONFIG_ARM64_ERRATUM_826319=y\nCONFIG_ARM64_ERRATUM_827319=y\nCONFIG_ARM64_ERRATUM_824069=y\nCONFIG_ARM64_ERRATUM_819472=y\nCONFIG_ARM64_ERRATUM_832075=y\nCONFIG_ARM64_ERRATUM_1742098=y\nCONFIG_ARM64_ERRATUM_845719=y\nCONFIG_ARM64_ERRATUM_843419=y\nCONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y\nCONFIG_ARM64_ERRATUM_1024718=y\nCONFIG_ARM64_ERRATUM_1418040=y\nCONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y\nCONFIG_ARM64_ERRATUM_1165522=y\nCONFIG_ARM64_ERRATUM_1319367=y\nCONFIG_ARM64_ERRATUM_1530923=y\nCONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y\nCONFIG_ARM64_ERRATUM_2441007=y\nCONFIG_ARM64_ERRATUM_1286807=y\nCONFIG_ARM64_ERRATUM_1463225=y\nCONFIG_ARM64_ERRATUM_1542419=y\nCONFIG_ARM64_ERRATUM_1508412=y\nCONFIG_ARM64_ERRATUM_2051678=y\n# CONFIG_ARM64_ERRATUM_2077057 is not set\nCONFIG_ARM64_ERRATUM_2658417=y\nCONFIG_ARM64_WORKAROUND_TSB_FLUSH_FAILURE=y\nCONFIG_ARM64_ERRATUM_2054223=y\nCONFIG_ARM64_ERRATUM_2067961=y\nCONFIG_ARM64_ERRATUM_2441009=y\nCONFIG_ARM64_ERRATUM_2457168=y\n# CONFIG_CAVIUM_ERRATUM_22375 is not set\n# CONFIG_CAVIUM_ERRATUM_23154 is not set\n# CONFIG_CAVIUM_ERRATUM_27456 is not set\n# CONFIG_CAVIUM_ERRATUM_30115 is not set\n# CONFIG_CAVIUM_TX2_ERRATUM_219 is not set\n# CONFIG_FUJITSU_ERRATUM_010001 is not set\n# CONFIG_HISILICON_ERRATUM_161600802 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_1003 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_1009 is not set\n# CONFIG_QCOM_QDF2400_ERRATUM_0065 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_E1041 is not set\n# CONFIG_NVIDIA_CARMEL_CNP_ERRATUM is not set\n# CONFIG_SOCIONEXT_SYNQUACER_PREITS is not set\n# end of ARM errata workarounds via the alternatives framework\n\nCONFIG_ARM64_4K_PAGES=y\n# CONFIG_ARM64_16K_PAGES is not set\n# CONFIG_ARM64_64K_PAGES is not set\n# CONFIG_ARM64_VA_BITS_39 is not set\nCONFIG_ARM64_VA_BITS_48=y\nCONFIG_ARM64_VA_BITS=48\nCONFIG_ARM64_PA_BITS_48=y\nCONFIG_ARM64_PA_BITS=48\n# CONFIG_CPU_BIG_ENDIAN is not set\nCONFIG_CPU_LITTLE_ENDIAN=y\nCONFIG_SCHED_MC=y\n# CONFIG_SCHED_CLUSTER is not set\nCONFIG_SCHED_SMT=y\nCONFIG_NR_CPUS=8\nCONFIG_HOTPLUG_CPU=y\n# CONFIG_NUMA is not set\n# CONFIG_HZ_100 is not set\nCONFIG_HZ_250=y\n# CONFIG_HZ_300 is not set\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=250\nCONFIG_SCHED_HRTICK=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_CC_HAVE_SHADOW_CALL_STACK=y\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\n# CONFIG_KEXEC is not set\n# CONFIG_KEXEC_FILE is not set\n# CONFIG_CRASH_DUMP is not set\n# CONFIG_XEN is not set\nCONFIG_ARCH_FORCE_MAX_ORDER=11\nCONFIG_UNMAP_KERNEL_AT_EL0=y\nCONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y\nCONFIG_RODATA_FULL_DEFAULT_ENABLED=y\n# CONFIG_ARM64_SW_TTBR0_PAN is not set\nCONFIG_ARM64_TAGGED_ADDR_ABI=y\nCONFIG_COMPAT=y\nCONFIG_KUSER_HELPERS=y\n# CONFIG_COMPAT_ALIGNMENT_FIXUPS is not set\nCONFIG_ARMV8_DEPRECATED=y\n# CONFIG_SWP_EMULATION is not set\n# CONFIG_CP15_BARRIER_EMULATION is not set\n# CONFIG_SETEND_EMULATION is not set\n\n#\n# ARMv8.1 architectural features\n#\nCONFIG_ARM64_HW_AFDBM=y\nCONFIG_ARM64_PAN=y\nCONFIG_AS_HAS_LDAPR=y\nCONFIG_AS_HAS_LSE_ATOMICS=y\nCONFIG_ARM64_LSE_ATOMICS=y\nCONFIG_ARM64_USE_LSE_ATOMICS=y\n# end of ARMv8.1 architectural features\n\n#\n# ARMv8.2 architectural features\n#\nCONFIG_AS_HAS_ARMV8_2=y\nCONFIG_AS_HAS_SHA3=y\n# CONFIG_ARM64_PMEM is not set\nCONFIG_ARM64_RAS_EXTN=y\nCONFIG_ARM64_CNP=y\n# end of ARMv8.2 architectural features\n\n#\n# ARMv8.3 architectural features\n#\nCONFIG_ARM64_PTR_AUTH=y\nCONFIG_ARM64_PTR_AUTH_KERNEL=y\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET=y\nCONFIG_CC_HAS_SIGN_RETURN_ADDRESS=y\nCONFIG_AS_HAS_PAC=y\nCONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y\n# end of ARMv8.3 architectural features\n\n#\n# ARMv8.4 architectural features\n#\nCONFIG_ARM64_AMU_EXTN=y\nCONFIG_AS_HAS_ARMV8_4=y\nCONFIG_ARM64_TLB_RANGE=y\n# end of ARMv8.4 architectural features\n\n#\n# ARMv8.5 architectural features\n#\nCONFIG_AS_HAS_ARMV8_5=y\nCONFIG_ARM64_BTI=y\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI=y\nCONFIG_ARM64_E0PD=y\nCONFIG_ARM64_AS_HAS_MTE=y\nCONFIG_ARM64_MTE=y\n# end of ARMv8.5 architectural features\n\n#\n# ARMv8.7 architectural features\n#\nCONFIG_ARM64_EPAN=y\n# end of ARMv8.7 architectural features\n\nCONFIG_ARM64_SVE=y\nCONFIG_ARM64_SME=y\nCONFIG_ARM64_MODULE_PLTS=y\nCONFIG_ARM64_PSEUDO_NMI=y\n# CONFIG_ARM64_DEBUG_PRIORITY_MASKING is not set\nCONFIG_RELOCATABLE=y\nCONFIG_RANDOMIZE_BASE=y\nCONFIG_RANDOMIZE_MODULE_REGION_FULL=y\nCONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y\nCONFIG_STACKPROTECTOR_PER_TASK=y\nCONFIG_ARCH_NR_GPIO=0\n# end of Kernel Features\n\n#\n# Boot options\n#\nCONFIG_CMDLINE=\"\"\n# CONFIG_EFI is not set\n# end of Boot options\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_SUSPEND_SKIP_SYNC is not set\n# CONFIG_HIBERNATION is not set\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_USERSPACE_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\nCONFIG_PM=y\n# CONFIG_PM_DEBUG is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\n# CONFIG_ENERGY_MODEL is not set\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\n# end of Power management options\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\n\n#\n# ARM CPU Idle Drivers\n#\n# CONFIG_ARM_PSCI_CPUIDLE is not set\n# end of ARM CPU Idle Drivers\n# end of CPU Idle\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=y\nCONFIG_CPU_FREQ_GOV_USERSPACE=y\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\nCONFIG_CPUFREQ_DT_PLATDEV=y\nCONFIG_ARM_SCPI_CPUFREQ=y\n# end of CPU Frequency scaling\n# end of CPU Power Management\n\nCONFIG_HAVE_KVM=y\n# CONFIG_VIRTUALIZATION is not set\n\n#\n# General architecture-dependent options\n#\nCONFIG_ARCH_HAS_SUBPAGE_FAULTS=y\n# CONFIG_KPROBES is not set\nCONFIG_JUMP_LABEL=y\n# CONFIG_STATIC_KEYS_SELFTEST is not set\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_HAVE_IOREMAP_PROT=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y\nCONFIG_HAVE_FUNCTION_ERROR_INJECTION=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_KEEPINITRD=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_ARCH_HAS_SET_DIRECT_MAP=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_WANTS_NO_INSTR=y\nCONFIG_HAVE_ASM_MODVERSIONS=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y\nCONFIG_MMU_GATHER_TABLE_FREE=y\nCONFIG_MMU_GATHER_RCU_TABLE_FREE=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_HAVE_ALIGNED_STRUCT_PAGE=y\nCONFIG_HAVE_CMPXCHG_LOCAL=y\nCONFIG_HAVE_CMPXCHG_DOUBLE=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_ARCH_STACKLEAK=y\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_ARCH_SUPPORTS_SHADOW_CALL_STACK=y\n# CONFIG_SHADOW_CALL_STACK is not set\nCONFIG_ARCH_SUPPORTS_LTO_CLANG=y\nCONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y\nCONFIG_LTO_NONE=y\nCONFIG_ARCH_SUPPORTS_CFI_CLANG=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOVE_PUD=y\nCONFIG_HAVE_MOVE_PMD=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_HAVE_ARCH_HUGE_VMAP=y\nCONFIG_HAVE_ARCH_HUGE_VMALLOC=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_ARCH_MMAP_RND_BITS=18\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=11\nCONFIG_PAGE_SIZE_LESS_THAN_64KB=y\nCONFIG_PAGE_SIZE_LESS_THAN_256KB=y\nCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y\nCONFIG_RANDOMIZE_KSTACK_OFFSET=y\n# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\nCONFIG_HAVE_ARCH_COMPILER_H=y\nCONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_HAS_RELR=y\nCONFIG_HAVE_PREEMPT_DYNAMIC=y\nCONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y\nCONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y\nCONFIG_ARCH_HAVE_TRACE_MMIO_ACCESS=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\nCONFIG_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/sbin/modprobe\"\n# CONFIG_TRIM_UNUSED_KSYMS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\nCONFIG_BLOCK_LEGACY_AUTOLOAD=y\nCONFIG_BLK_CGROUP_RWSTAT=y\nCONFIG_BLK_DEV_BSG_COMMON=y\nCONFIG_BLK_DEV_BSGLIB=y\nCONFIG_BLK_DEV_INTEGRITY=y\nCONFIG_BLK_DEV_INTEGRITY_T10=y\n# CONFIG_BLK_DEV_ZONED is not set\nCONFIG_BLK_DEV_THROTTLING=y\n# CONFIG_BLK_DEV_THROTTLING_LOW is not set\n# CONFIG_BLK_WBT is not set\nCONFIG_BLK_CGROUP_IOLATENCY=y\n# CONFIG_BLK_CGROUP_IOCOST is not set\n# CONFIG_BLK_CGROUP_IOPRIO is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\nCONFIG_MAC_PARTITION=y\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\nCONFIG_LDM_PARTITION=y\n# CONFIG_LDM_DEBUG is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\n# CONFIG_CMDLINE_PARTITION is not set\n# end of Partition Types\n\nCONFIG_BLOCK_COMPAT=y\nCONFIG_BLK_MQ_PCI=y\nCONFIG_BLK_PM=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\n# CONFIG_IOSCHED_BFQ is not set\n# end of IO Schedulers\n\nCONFIG_PADATA=y\nCONFIG_ASN1=y\nCONFIG_UNINLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_USE_QUEUED_SPINLOCKS=y\nCONFIG_QUEUED_SPINLOCKS=y\nCONFIG_ARCH_USE_QUEUED_RWLOCKS=y\nCONFIG_QUEUED_RWLOCKS=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_ARCH_HAS_SYSCALL_WRAPPER=y\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_ARCH_BINFMT_ELF_STATE=y\nCONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y\nCONFIG_ARCH_HAVE_ELF_PROT=y\nCONFIG_ARCH_USE_GNU_PROPERTY=y\nCONFIG_ELFCORE=y\n# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set\nCONFIG_BINFMT_SCRIPT=y\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\nCONFIG_SWAP=y\n# CONFIG_ZSWAP is not set\n\n#\n# SLAB allocator options\n#\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# end of SLAB allocator options\n\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\n# CONFIG_COMPAT_BRK is not set\nCONFIG_SPARSEMEM=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_FAST_GUP=y\nCONFIG_ARCH_KEEP_MEMBLOCK=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y\n# CONFIG_MEMORY_HOTPLUG is not set\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y\nCONFIG_COMPACTION=y\nCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1\n# CONFIG_PAGE_REPORTING is not set\nCONFIG_MIGRATION=y\nCONFIG_ARCH_ENABLE_THP_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\nCONFIG_PHYS_ADDR_T_64BIT=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y\nCONFIG_MEMORY_FAILURE=y\n# CONFIG_HWPOISON_INJECT is not set\nCONFIG_ARCH_WANTS_THP_SWAP=y\nCONFIG_TRANSPARENT_HUGEPAGE=y\nCONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y\n# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set\nCONFIG_THP_SWAP=y\n# CONFIG_READ_ONLY_THP_FOR_FS is not set\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\nCONFIG_CMA_DEBUGFS=y\n# CONFIG_CMA_SYSFS is not set\nCONFIG_CMA_AREAS=7\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CACHE_LINE_SIZE=y\nCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y\nCONFIG_ARCH_HAS_PTE_DEVMAP=y\nCONFIG_ARCH_HAS_ZONE_DMA_SET=y\nCONFIG_ZONE_DMA=y\nCONFIG_ZONE_DMA32=y\nCONFIG_ARCH_USES_HIGH_VMA_FLAGS=y\nCONFIG_VM_EVENT_COUNTERS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\nCONFIG_ARCH_HAS_PTE_SPECIAL=y\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_USERFAULTFD is not set\n# CONFIG_LRU_GEN is not set\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\nCONFIG_NET_INGRESS=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\nCONFIG_TLS=y\n# CONFIG_TLS_DEVICE is not set\n# CONFIG_TLS_TOE is not set\n# CONFIG_XFRM_USER is not set\n# CONFIG_NET_KEY is not set\n# CONFIG_XDP_SOCKETS is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=m\nCONFIG_IP_MROUTE_COMMON=y\nCONFIG_IP_MROUTE=y\n# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set\n# CONFIG_IP_PIMSM_V1 is not set\n# CONFIG_IP_PIMSM_V2 is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\n# CONFIG_INET_ESP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=m\n# CONFIG_INET_DIAG is not set\nCONFIG_TCP_CONG_ADVANCED=y\n# CONFIG_TCP_CONG_BIC is not set\nCONFIG_TCP_CONG_CUBIC=y\n# CONFIG_TCP_CONG_WESTWOOD is not set\nCONFIG_TCP_CONG_HTCP=m\nCONFIG_TCP_CONG_HSTCP=m\n# CONFIG_TCP_CONG_HYBLA is not set\nCONFIG_TCP_CONG_VEGAS=m\n# CONFIG_TCP_CONG_NV is not set\nCONFIG_TCP_CONG_SCALABLE=m\n# CONFIG_TCP_CONG_LP is not set\nCONFIG_TCP_CONG_VENO=m\nCONFIG_TCP_CONG_YEAH=m\nCONFIG_TCP_CONG_ILLINOIS=m\n# CONFIG_TCP_CONG_DCTCP is not set\nCONFIG_TCP_CONG_CDG=m\n# CONFIG_TCP_CONG_BBR is not set\nCONFIG_DEFAULT_CUBIC=y\n# CONFIG_DEFAULT_RENO is not set\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_IPV6_VTI is not set\nCONFIG_IPV6_SIT=m\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\nCONFIG_IPV6_FOU=m\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_MPTCP is not set\n# CONFIG_NETWORK_SECMARK is not set\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\nCONFIG_NETFILTER_EGRESS=y\nCONFIG_NETFILTER_NETLINK=m\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\nCONFIG_NETFILTER_NETLINK_LOG=m\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\n# CONFIG_NF_LOG_SYSLOG is not set\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_ZONES is not set\n# CONFIG_NF_CONNTRACK_PROCFS is not set\n# CONFIG_NF_CONNTRACK_EVENTS is not set\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\n# CONFIG_NF_CT_PROTO_DCCP is not set\n# CONFIG_NF_CT_PROTO_SCTP is not set\n# CONFIG_NF_CT_PROTO_UDPLITE is not set\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\nCONFIG_NF_CONNTRACK_IRC=m\nCONFIG_NF_CONNTRACK_BROADCAST=m\nCONFIG_NF_CONNTRACK_NETBIOS_NS=m\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\nCONFIG_NF_CONNTRACK_SIP=m\n# CONFIG_NF_CONNTRACK_TFTP is not set\nCONFIG_NF_CT_NETLINK=m\n# CONFIG_NETFILTER_NETLINK_GLUE_CT is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_IRC=m\nCONFIG_NF_NAT_SIP=m\nCONFIG_NF_NAT_MASQUERADE=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\nCONFIG_NETFILTER_XTABLES_COMPAT=y\n\n#\n# Xtables combined modules\n#\n# CONFIG_NETFILTER_XT_MARK is not set\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\n# CONFIG_NETFILTER_XT_TARGET_REDIRECT is not set\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\nCONFIG_NETFILTER_XT_MATCH_IPRANGE=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\nCONFIG_NETFILTER_XT_MATCH_OWNER=m\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\nCONFIG_NETFILTER_XT_MATCH_STATE=m\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\n# CONFIG_IP_VS is not set\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\n# CONFIG_IP_NF_TARGET_REDIRECT is not set\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\n# CONFIG_NF_LOG_IPV6 is not set\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_MATCH_SRH is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\nCONFIG_IP6_NF_NAT=m\n# CONFIG_IP6_NF_TARGET_MASQUERADE is not set\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\n# CONFIG_BRIDGE_VLAN_FILTERING is not set\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\nCONFIG_NET_SCH_FQ_CODEL=y\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_RSVP is not set\n# CONFIG_NET_CLS_RSVP6 is not set\n# CONFIG_NET_CLS_FLOW is not set\n# CONFIG_NET_CLS_CGROUP is not set\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\n# CONFIG_NET_L3_MASTER_DEV is not set\n# CONFIG_QRTR is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_PCPU_DEV_REFCNT=y\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_SOCK_RX_QUEUE_MAPPING=y\nCONFIG_XPS=y\n# CONFIG_CGROUP_NET_PRIO is not set\n# CONFIG_CGROUP_NET_CLASSID is not set\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\nCONFIG_BT_RFCOMM_TTY=y\n# CONFIG_BT_BNEP is not set\nCONFIG_BT_HIDP=m\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_LEDS is not set\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\n# CONFIG_BT_DEBUGFS is not set\n# CONFIG_BT_SELFTEST is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_QCA=m\nCONFIG_BT_MTK=m\nCONFIG_BT_HCIBTUSB=m\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\nCONFIG_BT_HCIBTUSB_MTK=y\nCONFIG_BT_HCIBTUSB_RTL=y\nCONFIG_BT_HCIBTSDIO=m\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_SERDEV=y\nCONFIG_BT_HCIUART_H4=y\n# CONFIG_BT_HCIUART_NOKIA is not set\n# CONFIG_BT_HCIUART_BCSP is not set\n# CONFIG_BT_HCIUART_ATH3K is not set\n# CONFIG_BT_HCIUART_LL is not set\nCONFIG_BT_HCIUART_3WIRE=y\n# CONFIG_BT_HCIUART_INTEL is not set\nCONFIG_BT_HCIUART_BCM=y\nCONFIG_BT_HCIUART_RTL=y\nCONFIG_BT_HCIUART_QCA=y\n# CONFIG_BT_HCIUART_AG6XX is not set\n# CONFIG_BT_HCIUART_MRVL is not set\n# CONFIG_BT_HCIBCM203X is not set\n# CONFIG_BT_HCIBPA10X is not set\n# CONFIG_BT_HCIBFUSB is not set\n# CONFIG_BT_HCIVHCI is not set\n# CONFIG_BT_MRVL is not set\n# CONFIG_BT_ATH3K is not set\nCONFIG_BT_MTKSDIO=m\nCONFIG_BT_MTKUART=m\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\nCONFIG_STREAM_PARSER=y\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=m\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\n# CONFIG_CFG80211_CRDA_SUPPORT is not set\nCONFIG_CFG80211_WEXT=y\nCONFIG_LIB80211=m\nCONFIG_LIB80211_CRYPT_WEP=m\nCONFIG_LIB80211_CRYPT_CCMP=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=m\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=m\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_PAGE_POOL=y\n# CONFIG_PAGE_POOL_STATS is not set\n# CONFIG_FAILOVER is not set\nCONFIG_ETHTOOL_NETLINK=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\nCONFIG_HAVE_PCI=y\nCONFIG_PCI=y\nCONFIG_PCI_DOMAINS=y\nCONFIG_PCI_DOMAINS_GENERIC=y\nCONFIG_PCI_SYSCALL=y\n# CONFIG_PCIEPORTBUS is not set\nCONFIG_PCIEASPM=y\nCONFIG_PCIEASPM_DEFAULT=y\n# CONFIG_PCIEASPM_POWERSAVE is not set\n# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set\n# CONFIG_PCIEASPM_PERFORMANCE is not set\n# CONFIG_PCIE_PTM is not set\nCONFIG_PCI_MSI=y\nCONFIG_PCI_MSI_IRQ_DOMAIN=y\nCONFIG_PCI_QUIRKS=y\n# CONFIG_PCI_DEBUG is not set\n# CONFIG_PCI_STUB is not set\n# CONFIG_PCI_IOV is not set\n# CONFIG_PCI_PRI is not set\n# CONFIG_PCI_PASID is not set\n# CONFIG_PCIE_BUS_TUNE_OFF is not set\nCONFIG_PCIE_BUS_DEFAULT=y\n# CONFIG_PCIE_BUS_SAFE is not set\n# CONFIG_PCIE_BUS_PERFORMANCE is not set\n# CONFIG_PCIE_BUS_PEER2PEER is not set\nCONFIG_VGA_ARB=y\nCONFIG_VGA_ARB_MAX_GPUS=16\n# CONFIG_HOTPLUG_PCI is not set\n\n#\n# PCI controller drivers\n#\n# CONFIG_PCI_FTPCI100 is not set\n# CONFIG_PCI_HOST_GENERIC is not set\n# CONFIG_PCIE_XILINX is not set\n# CONFIG_PCI_XGENE is not set\n# CONFIG_PCIE_ALTERA is not set\n# CONFIG_PCI_HOST_THUNDER_PEM is not set\n# CONFIG_PCI_HOST_THUNDER_ECAM is not set\n# CONFIG_PCIE_MICROCHIP_HOST is not set\n\n#\n# DesignWare PCI Core Support\n#\nCONFIG_PCIE_DW=y\nCONFIG_PCIE_DW_HOST=y\n# CONFIG_PCIE_DW_PLAT_HOST is not set\n# CONFIG_PCI_HISI is not set\n# CONFIG_PCIE_KIRIN is not set\nCONFIG_PCI_MESON=y\n# CONFIG_PCIE_AL is not set\n# end of DesignWare PCI Core Support\n\n#\n# Mobiveil PCIe Core Support\n#\n# end of Mobiveil PCIe Core Support\n\n#\n# Cadence PCIe controllers support\n#\n# CONFIG_PCIE_CADENCE_PLAT_HOST is not set\n# CONFIG_PCI_J721E_HOST is not set\n# end of Cadence PCIe controllers support\n# end of PCI controller drivers\n\n#\n# PCI Endpoint\n#\n# CONFIG_PCI_ENDPOINT is not set\n# end of PCI Endpoint\n\n#\n# PCI switch controller drivers\n#\n# CONFIG_PCI_SW_SWITCHTEC is not set\n# end of PCI switch controller drivers\n\n# CONFIG_CXL_BUS is not set\n# CONFIG_PCCARD is not set\n# CONFIG_RAPIDIO is not set\n\n#\n# Generic Driver Options\n#\n# CONFIG_UEVENT_HELPER is not set\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\n# CONFIG_DEVTMPFS_SAFE is not set\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\nCONFIG_FW_CACHE=y\n# CONFIG_FW_UPLOAD is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\n# CONFIG_ALLOW_DEV_COREDUMP is not set\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_SOC_BUS=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_MOXTET is not set\n# CONFIG_VEXPRESS_CONFIG is not set\n# CONFIG_MHI_BUS is not set\n# CONFIG_MHI_BUS_EP is not set\n# end of Bus devices\n\n# CONFIG_CONNECTOR is not set\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\n# CONFIG_ARM_SCMI_PROTOCOL is not set\n# end of ARM System Control and Management Interface Protocol\n\nCONFIG_ARM_SCPI_PROTOCOL=y\nCONFIG_ARM_SCPI_POWER_DOMAIN=y\n# CONFIG_FIRMWARE_MEMMAP is not set\n# CONFIG_FW_CFG_SYSFS is not set\n# CONFIG_ARM_FFA_TRANSPORT is not set\n# CONFIG_GOOGLE_FIRMWARE is not set\nCONFIG_MESON_SM=y\nCONFIG_MESON_GX_PM=y\nCONFIG_ARM_PSCI_FW=y\n# CONFIG_ARM_PSCI_CHECKER is not set\nCONFIG_HAVE_ARM_SMCCC=y\nCONFIG_HAVE_ARM_SMCCC_DISCOVERY=y\nCONFIG_ARM_SMCCC_SOC_ID=y\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n\n#\n# Partition parsers\n#\n# CONFIG_MTD_AR7_PARTS is not set\n# CONFIG_MTD_CMDLINE_PARTS is not set\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AFS_PARTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\n# end of Partition parsers\n\n#\n# User Modules And Translation Layers\n#\nCONFIG_MTD_BLKDEVS=y\nCONFIG_MTD_BLOCK=y\n\n#\n# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK.\n#\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\n# CONFIG_MTD_OOPS is not set\n# CONFIG_MTD_SWAP is not set\n# CONFIG_MTD_PARTITIONED_MASTER is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\n# CONFIG_MTD_CFI is not set\n# CONFIG_MTD_JEDECPROBE is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n# end of RAM/ROM/Flash chip drivers\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_INTEL_VR_NOR is not set\n# CONFIG_MTD_PLATRAM is not set\n# end of Mapping drivers for chip access\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_PMC551 is not set\n# CONFIG_MTD_DATAFLASH is not set\n# CONFIG_MTD_MCHP23K256 is not set\n# CONFIG_MTD_MCHP48L640 is not set\n# CONFIG_MTD_SST25L is not set\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\n# end of Self-contained MTD device drivers\n\n#\n# NAND\n#\n# CONFIG_MTD_ONENAND is not set\n# CONFIG_MTD_RAW_NAND is not set\n# CONFIG_MTD_SPI_NAND is not set\n\n#\n# ECC engine support\n#\n# CONFIG_MTD_NAND_ECC_SW_HAMMING is not set\n# CONFIG_MTD_NAND_ECC_SW_BCH is not set\n# CONFIG_MTD_NAND_ECC_MXIC is not set\n# end of ECC engine support\n# end of NAND\n\n#\n# LPDDR & LPDDR2 PCM memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\n# end of LPDDR & LPDDR2 PCM memory drivers\n\nCONFIG_MTD_SPI_NOR=y\nCONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y\n# CONFIG_MTD_SPI_NOR_SWP_DISABLE is not set\nCONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y\n# CONFIG_MTD_SPI_NOR_SWP_KEEP is not set\n# CONFIG_MTD_UBI is not set\n# CONFIG_MTD_HYPERBUS is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_DYNAMIC=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\nCONFIG_OF_RESOLVE=y\nCONFIG_OF_OVERLAY=y\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_CDROM=y\n# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=0\n# CONFIG_BLK_DEV_DRBD is not set\nCONFIG_BLK_DEV_NBD=y\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=16\nCONFIG_BLK_DEV_RAM_SIZE=4096\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_UBLK is not set\n\n#\n# NVME Support\n#\n# CONFIG_BLK_DEV_NVME is not set\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TCP is not set\n# CONFIG_NVME_TARGET is not set\n# end of NVME Support\n\n#\n# Misc devices\n#\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_PHANTOM is not set\n# CONFIG_TIFM_CORE is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_HI6421V600_IRQ is not set\n# CONFIG_HP_ILO is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\n# CONFIG_SRAM is not set\n# CONFIG_DW_XDATA_PCIE is not set\n# CONFIG_PCI_ENDPOINT_TEST is not set\n# CONFIG_XILINX_SDFEC is not set\n# CONFIG_HISI_HIKEY_USB is not set\n# CONFIG_OPEN_DICE is not set\n# CONFIG_VCPU_STALL_DETECTOR is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\nCONFIG_EEPROM_AT24=m\n# CONFIG_EEPROM_AT25 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_EEPROM_EE1004 is not set\n# end of EEPROM support\n\n# CONFIG_CB710_CORE is not set\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n# CONFIG_VMWARE_VMCI is not set\n# CONFIG_GENWQE is not set\n# CONFIG_ECHO is not set\n# CONFIG_BCM_VK is not set\n# CONFIG_MISC_ALCOR_PCI is not set\n# CONFIG_MISC_RTSX_PCI is not set\n# CONFIG_MISC_RTSX_USB is not set\n# CONFIG_HABANA_AI is not set\n# CONFIG_UACCE is not set\n# CONFIG_PVPANIC is not set\n# CONFIG_GP_PCI1XXXX is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_PROC_FS is not set\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_CHR_DEV_SG=m\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\n# CONFIG_SCSI_SCAN_ASYNC is not set\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\nCONFIG_SCSI_SAS_ATTRS=y\nCONFIG_SCSI_SAS_LIBSAS=y\nCONFIG_SCSI_SAS_HOST_SMP=y\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_CXGB3_ISCSI is not set\n# CONFIG_SCSI_CXGB4_ISCSI is not set\n# CONFIG_SCSI_BNX2_ISCSI is not set\n# CONFIG_BE2ISCSI is not set\n# CONFIG_BLK_DEV_3W_XXXX_RAID is not set\n# CONFIG_SCSI_HPSA is not set\n# CONFIG_SCSI_3W_9XXX is not set\n# CONFIG_SCSI_3W_SAS is not set\n# CONFIG_SCSI_ACARD is not set\n# CONFIG_SCSI_AACRAID is not set\n# CONFIG_SCSI_AIC7XXX is not set\n# CONFIG_SCSI_AIC79XX is not set\n# CONFIG_SCSI_AIC94XX is not set\n# CONFIG_SCSI_HISI_SAS is not set\n# CONFIG_SCSI_MVSAS is not set\n# CONFIG_SCSI_MVUMI is not set\n# CONFIG_SCSI_ADVANSYS is not set\n# CONFIG_SCSI_ARCMSR is not set\n# CONFIG_SCSI_ESAS2R is not set\n# CONFIG_MEGARAID_NEWGEN is not set\n# CONFIG_MEGARAID_LEGACY is not set\n# CONFIG_MEGARAID_SAS is not set\n# CONFIG_SCSI_MPT3SAS is not set\n# CONFIG_SCSI_MPT2SAS is not set\n# CONFIG_SCSI_MPI3MR is not set\n# CONFIG_SCSI_SMARTPQI is not set\n# CONFIG_SCSI_HPTIOP is not set\n# CONFIG_SCSI_BUSLOGIC is not set\n# CONFIG_SCSI_MYRB is not set\n# CONFIG_SCSI_MYRS is not set\n# CONFIG_SCSI_SNIC is not set\n# CONFIG_SCSI_DMX3191D is not set\n# CONFIG_SCSI_FDOMAIN_PCI is not set\n# CONFIG_SCSI_IPS is not set\n# CONFIG_SCSI_INITIO is not set\n# CONFIG_SCSI_INIA100 is not set\n# CONFIG_SCSI_STEX is not set\n# CONFIG_SCSI_SYM53C8XX_2 is not set\n# CONFIG_SCSI_IPR is not set\n# CONFIG_SCSI_QLOGIC_1280 is not set\n# CONFIG_SCSI_QLA_ISCSI is not set\n# CONFIG_SCSI_DC395x is not set\n# CONFIG_SCSI_AM53C974 is not set\n# CONFIG_SCSI_WD719X is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_PMCRAID is not set\n# CONFIG_SCSI_PM8001 is not set\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\nCONFIG_ATA=m\nCONFIG_SATA_HOST=y\nCONFIG_ATA_VERBOSE_ERROR=y\nCONFIG_ATA_FORCE=y\nCONFIG_SATA_PMP=y\n\n#\n# Controllers with non-SFF native interface\n#\nCONFIG_SATA_AHCI=m\nCONFIG_SATA_MOBILE_LPM_POLICY=0\nCONFIG_SATA_AHCI_PLATFORM=m\n# CONFIG_AHCI_DWC is not set\n# CONFIG_AHCI_CEVA is not set\n# CONFIG_AHCI_QORIQ is not set\n# CONFIG_SATA_INIC162X is not set\n# CONFIG_SATA_ACARD_AHCI is not set\n# CONFIG_SATA_SIL24 is not set\nCONFIG_ATA_SFF=y\n\n#\n# SFF controllers with custom DMA interface\n#\n# CONFIG_PDC_ADMA is not set\n# CONFIG_SATA_QSTOR is not set\n# CONFIG_SATA_SX4 is not set\nCONFIG_ATA_BMDMA=y\n\n#\n# SATA SFF controllers with BMDMA\n#\n# CONFIG_ATA_PIIX is not set\n# CONFIG_SATA_MV is not set\n# CONFIG_SATA_NV is not set\n# CONFIG_SATA_PROMISE is not set\n# CONFIG_SATA_SIL is not set\n# CONFIG_SATA_SIS is not set\n# CONFIG_SATA_SVW is not set\n# CONFIG_SATA_ULI is not set\n# CONFIG_SATA_VIA is not set\n# CONFIG_SATA_VITESSE is not set\n\n#\n# PATA SFF controllers with BMDMA\n#\n# CONFIG_PATA_ALI is not set\n# CONFIG_PATA_AMD is not set\n# CONFIG_PATA_ARTOP is not set\n# CONFIG_PATA_ATIIXP is not set\n# CONFIG_PATA_ATP867X is not set\n# CONFIG_PATA_CMD64X is not set\n# CONFIG_PATA_CYPRESS is not set\n# CONFIG_PATA_EFAR is not set\n# CONFIG_PATA_HPT366 is not set\n# CONFIG_PATA_HPT37X is not set\n# CONFIG_PATA_HPT3X2N is not set\n# CONFIG_PATA_HPT3X3 is not set\n# CONFIG_PATA_IT8213 is not set\n# CONFIG_PATA_IT821X is not set\n# CONFIG_PATA_JMICRON is not set\n# CONFIG_PATA_MARVELL is not set\n# CONFIG_PATA_NETCELL is not set\n# CONFIG_PATA_NINJA32 is not set\n# CONFIG_PATA_NS87415 is not set\n# CONFIG_PATA_OLDPIIX is not set\n# CONFIG_PATA_OPTIDMA is not set\n# CONFIG_PATA_PDC2027X is not set\n# CONFIG_PATA_PDC_OLD is not set\n# CONFIG_PATA_RADISYS is not set\n# CONFIG_PATA_RDC is not set\n# CONFIG_PATA_SCH is not set\n# CONFIG_PATA_SERVERWORKS is not set\n# CONFIG_PATA_SIL680 is not set\n# CONFIG_PATA_SIS is not set\n# CONFIG_PATA_TOSHIBA is not set\n# CONFIG_PATA_TRIFLEX is not set\n# CONFIG_PATA_VIA is not set\n# CONFIG_PATA_WINBOND is not set\n\n#\n# PIO-only SFF controllers\n#\n# CONFIG_PATA_CMD640_PCI is not set\n# CONFIG_PATA_MPIIX is not set\n# CONFIG_PATA_NS87410 is not set\n# CONFIG_PATA_OPTI is not set\n# CONFIG_PATA_OF_PLATFORM is not set\n# CONFIG_PATA_RZ1000 is not set\n\n#\n# Generic fallback / legacy drivers\n#\n# CONFIG_ATA_GENERIC is not set\n# CONFIG_PATA_LEGACY is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\n# CONFIG_BLK_DEV_DM is not set\n# CONFIG_TARGET_CORE is not set\n# CONFIG_FUSION is not set\n\n#\n# IEEE 1394 (FireWire) support\n#\n# CONFIG_FIREWIRE is not set\n# CONFIG_FIREWIRE_NOSY is not set\n# end of IEEE 1394 (FireWire) support\n\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\n# CONFIG_DUMMY is not set\nCONFIG_WIREGUARD=m\n# CONFIG_WIREGUARD_DEBUG is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_FC is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\n# CONFIG_MACVTAP is not set\n# CONFIG_IPVLAN is not set\n# CONFIG_VXLAN is not set\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_AMT is not set\n# CONFIG_MACSEC is not set\nCONFIG_NETCONSOLE=y\nCONFIG_NETCONSOLE_DYNAMIC=y\nCONFIG_NETPOLL=y\nCONFIG_NET_POLL_CONTROLLER=y\nCONFIG_TUN=y\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\nCONFIG_NLMON=m\n# CONFIG_ARCNET is not set\nCONFIG_ETHERNET=y\n# CONFIG_NET_VENDOR_3COM is not set\n# CONFIG_NET_VENDOR_ADAPTEC is not set\n# CONFIG_NET_VENDOR_AGERE is not set\n# CONFIG_NET_VENDOR_ALACRITECH is not set\n# CONFIG_NET_VENDOR_ALTEON is not set\n# CONFIG_ALTERA_TSE is not set\n# CONFIG_NET_VENDOR_AMAZON is not set\n# CONFIG_NET_VENDOR_AMD is not set\n# CONFIG_NET_VENDOR_AQUANTIA is not set\n# CONFIG_NET_VENDOR_ARC is not set\nCONFIG_NET_VENDOR_ASIX=y\n# CONFIG_SPI_AX88796C is not set\n# CONFIG_NET_VENDOR_ATHEROS is not set\n# CONFIG_NET_VENDOR_BROADCOM is not set\n# CONFIG_NET_VENDOR_CADENCE is not set\n# CONFIG_NET_VENDOR_CAVIUM is not set\n# CONFIG_NET_VENDOR_CHELSIO is not set\n# CONFIG_NET_VENDOR_CISCO is not set\n# CONFIG_NET_VENDOR_CORTINA is not set\n# CONFIG_NET_VENDOR_DAVICOM is not set\n# CONFIG_DNET is not set\n# CONFIG_NET_VENDOR_DEC is not set\n# CONFIG_NET_VENDOR_DLINK is not set\n# CONFIG_NET_VENDOR_EMULEX is not set\n# CONFIG_NET_VENDOR_ENGLEDER is not set\n# CONFIG_NET_VENDOR_EZCHIP is not set\n# CONFIG_NET_VENDOR_FUNGIBLE is not set\n# CONFIG_NET_VENDOR_GOOGLE is not set\n# CONFIG_NET_VENDOR_HISILICON is not set\n# CONFIG_NET_VENDOR_HUAWEI is not set\n# CONFIG_NET_VENDOR_INTEL is not set\n# CONFIG_NET_VENDOR_WANGXUN is not set\n# CONFIG_JME is not set\n# CONFIG_NET_VENDOR_ADI is not set\n# CONFIG_NET_VENDOR_LITEX is not set\n# CONFIG_NET_VENDOR_MARVELL is not set\n# CONFIG_NET_VENDOR_MELLANOX is not set\n# CONFIG_NET_VENDOR_MICREL is not set\n# CONFIG_NET_VENDOR_MICROCHIP is not set\n# CONFIG_NET_VENDOR_MICROSEMI is not set\n# CONFIG_NET_VENDOR_MICROSOFT is not set\n# CONFIG_NET_VENDOR_MYRI is not set\n# CONFIG_FEALNX is not set\n# CONFIG_NET_VENDOR_NI is not set\n# CONFIG_NET_VENDOR_NATSEMI is not set\n# CONFIG_NET_VENDOR_NETERION is not set\n# CONFIG_NET_VENDOR_NETRONOME is not set\n# CONFIG_NET_VENDOR_NVIDIA is not set\n# CONFIG_NET_VENDOR_OKI is not set\n# CONFIG_ETHOC is not set\n# CONFIG_NET_VENDOR_PACKET_ENGINES is not set\n# CONFIG_NET_VENDOR_PENSANDO is not set\n# CONFIG_NET_VENDOR_QLOGIC is not set\n# CONFIG_NET_VENDOR_BROCADE is not set\n# CONFIG_NET_VENDOR_QUALCOMM is not set\n# CONFIG_NET_VENDOR_RDC is not set\nCONFIG_NET_VENDOR_REALTEK=y\n# CONFIG_8139CP is not set\n# CONFIG_8139TOO is not set\nCONFIG_R8169=y\n# CONFIG_NET_VENDOR_RENESAS is not set\n# CONFIG_NET_VENDOR_ROCKER is not set\n# CONFIG_NET_VENDOR_SAMSUNG is not set\n# CONFIG_NET_VENDOR_SEEQ is not set\n# CONFIG_NET_VENDOR_SILAN is not set\n# CONFIG_NET_VENDOR_SIS is not set\n# CONFIG_NET_VENDOR_SOLARFLARE is not set\n# CONFIG_NET_VENDOR_SMSC is not set\n# CONFIG_NET_VENDOR_SOCIONEXT is not set\nCONFIG_NET_VENDOR_STMICRO=y\nCONFIG_STMMAC_ETH=y\nCONFIG_STMMAC_SELFTESTS=y\nCONFIG_STMMAC_PLATFORM=y\n# CONFIG_DWMAC_DWC_QOS_ETH is not set\nCONFIG_DWMAC_GENERIC=y\nCONFIG_DWMAC_MESON=y\n# CONFIG_DWMAC_INTEL_PLAT is not set\n# CONFIG_DWMAC_LOONGSON is not set\n# CONFIG_STMMAC_PCI is not set\n# CONFIG_NET_VENDOR_SUN is not set\n# CONFIG_NET_VENDOR_SYNOPSYS is not set\n# CONFIG_NET_VENDOR_TEHUTI is not set\n# CONFIG_NET_VENDOR_TI is not set\n# CONFIG_NET_VENDOR_VERTEXCOM is not set\n# CONFIG_NET_VENDOR_VIA is not set\n# CONFIG_NET_VENDOR_WIZNET is not set\n# CONFIG_NET_VENDOR_XILINX is not set\n# CONFIG_FDDI is not set\n# CONFIG_HIPPI is not set\nCONFIG_PHYLINK=y\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\nCONFIG_LED_TRIGGER_PHY=y\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\nCONFIG_MESON_GXL_PHY=y\n# CONFIG_ADIN_PHY is not set\n# CONFIG_ADIN1100_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=m\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM54140_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\nCONFIG_ICPLUS_PHY=y\n# CONFIG_LXT_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\nCONFIG_MARVELL_PHY=y\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MARVELL_88X2222_PHY is not set\n# CONFIG_MAXLINEAR_GPHY is not set\n# CONFIG_MEDIATEK_GE_PHY is not set\nCONFIG_MICREL_PHY=y\nCONFIG_MICROCHIP_PHY=y\n# CONFIG_MICROCHIP_T1_PHY is not set\nCONFIG_MICROSEMI_PHY=y\n# CONFIG_MOTORCOMM_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_NXP_TJA11XX_PHY is not set\n# CONFIG_AT803X_PHY is not set\nCONFIG_MAXIO_PHY=y\n# CONFIG_QSEMI_PHY is not set\nCONFIG_REALTEK_PHY=y\n# CONFIG_RENESAS_PHY is not set\n# CONFIG_ROCKCHIP_PHY is not set\nCONFIG_SMSC_PHY=m\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_DP83TD510_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\n# CONFIG_PSE_CONTROLLER is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_OF_MDIO=y\nCONFIG_MDIO_DEVRES=y\nCONFIG_MDIO_BITBANG=y\n# CONFIG_MDIO_BCM_UNIMAC is not set\nCONFIG_MDIO_GPIO=y\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_OCTEON is not set\n# CONFIG_MDIO_IPQ4019 is not set\n# CONFIG_MDIO_IPQ8064 is not set\n# CONFIG_MDIO_THUNDER is not set\n\n#\n# MDIO Multiplexers\n#\nCONFIG_MDIO_BUS_MUX=y\nCONFIG_MDIO_BUS_MUX_MESON_G12A=y\nCONFIG_MDIO_BUS_MUX_MESON_GXL=y\nCONFIG_MDIO_BUS_MUX_GPIO=y\nCONFIG_MDIO_BUS_MUX_MULTIPLEXER=y\nCONFIG_MDIO_BUS_MUX_MMIOREG=y\n\n#\n# PCS device drivers\n#\nCONFIG_PCS_XPCS=y\n# end of PCS device drivers\n\nCONFIG_PPP=m\nCONFIG_PPP_BSDCOMP=m\nCONFIG_PPP_DEFLATE=m\n# CONFIG_PPP_FILTER is not set\nCONFIG_PPP_MPPE=m\n# CONFIG_PPP_MULTILINK is not set\nCONFIG_PPPOE=m\nCONFIG_PPP_ASYNC=m\nCONFIG_PPP_SYNC_TTY=m\n# CONFIG_SLIP is not set\nCONFIG_SLHC=m\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\n# CONFIG_USB_PEGASUS is not set\nCONFIG_USB_RTL8150=y\nCONFIG_USB_RTL8152=y\nCONFIG_USB_LAN78XX=m\nCONFIG_USB_USBNET=m\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\n# CONFIG_USB_NET_CDC_EEM is not set\n# CONFIG_USB_NET_CDC_NCM is not set\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\nCONFIG_USB_NET_DM9601=m\n# CONFIG_USB_NET_SR9700 is not set\n# CONFIG_USB_NET_SR9800 is not set\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=m\n# CONFIG_USB_NET_GL620A is not set\n# CONFIG_USB_NET_NET1080 is not set\n# CONFIG_USB_NET_PLUSB is not set\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\n# CONFIG_USB_NET_CDC_SUBSET is not set\nCONFIG_USB_NET_ZAURUS=m\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\nCONFIG_USB_NET_QMI_WWAN=m\nCONFIG_USB_HSO=m\n# CONFIG_USB_NET_INT51X1 is not set\nCONFIG_USB_IPHETH=m\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\n# CONFIG_USB_NET_AQC111 is not set\nCONFIG_USB_RTL8153_ECM=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\n# CONFIG_ADM8211 is not set\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\n# CONFIG_ATH5K is not set\n# CONFIG_ATH5K_PCI is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\nCONFIG_ATH9K=m\n# CONFIG_ATH9K_PCI is not set\n# CONFIG_ATH9K_AHB is not set\n# CONFIG_ATH9K_DEBUGFS is not set\n# CONFIG_ATH9K_DYNACK is not set\n# CONFIG_ATH9K_WOW is not set\nCONFIG_ATH9K_RFKILL=y\nCONFIG_ATH9K_CHANNEL_CONTEXT=y\nCONFIG_ATH9K_PCOEM=y\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\nCONFIG_ATH9K_HWRNG=y\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\nCONFIG_CARL9170_HWRNG=y\nCONFIG_ATH6KL=m\n# CONFIG_ATH6KL_SDIO is not set\nCONFIG_ATH6KL_USB=m\n# CONFIG_ATH6KL_DEBUG is not set\nCONFIG_AR5523=m\n# CONFIG_WIL6210 is not set\nCONFIG_ATH10K=m\nCONFIG_ATH10K_CE=y\n# CONFIG_ATH10K_PCI is not set\nCONFIG_ATH10K_SDIO=m\nCONFIG_ATH10K_USB=m\n# CONFIG_ATH10K_DEBUG is not set\n# CONFIG_ATH10K_DEBUGFS is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\n# CONFIG_ATH11K is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\n# CONFIG_ATMEL is not set\n# CONFIG_AT76C50X_USB is not set\nCONFIG_WLAN_VENDOR_BROADCOM=y\nCONFIG_B43=m\nCONFIG_B43_BCMA=y\nCONFIG_B43_SSB=y\nCONFIG_B43_BUSES_BCMA_AND_SSB=y\n# CONFIG_B43_BUSES_BCMA is not set\n# CONFIG_B43_BUSES_SSB is not set\nCONFIG_B43_PCI_AUTOSELECT=y\nCONFIG_B43_PCICORE_AUTOSELECT=y\n# CONFIG_B43_SDIO is not set\nCONFIG_B43_BCMA_PIO=y\nCONFIG_B43_PIO=y\nCONFIG_B43_PHY_G=y\nCONFIG_B43_PHY_N=y\nCONFIG_B43_PHY_LP=y\nCONFIG_B43_PHY_HT=y\nCONFIG_B43_LEDS=y\nCONFIG_B43_HWRNG=y\n# CONFIG_B43_DEBUG is not set\n# CONFIG_B43LEGACY is not set\nCONFIG_BRCMUTIL=m\n# CONFIG_BRCMSMAC is not set\nCONFIG_BRCMFMAC=m\nCONFIG_BRCMFMAC_PROTO_BCDC=y\nCONFIG_BRCMFMAC_SDIO=y\n# CONFIG_BRCMFMAC_USB is not set\n# CONFIG_BRCMFMAC_PCIE is not set\n# CONFIG_BRCM_TRACING is not set\nCONFIG_BRCMDBG=y\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\n# CONFIG_IPW2100 is not set\n# CONFIG_IPW2200 is not set\n# CONFIG_IWL4965 is not set\n# CONFIG_IWL3945 is not set\n# CONFIG_IWLWIFI is not set\nCONFIG_WLAN_VENDOR_INTERSIL=y\n# CONFIG_HOSTAP is not set\n# CONFIG_HERMES is not set\nCONFIG_P54_COMMON=m\nCONFIG_P54_USB=m\n# CONFIG_P54_PCI is not set\n# CONFIG_P54_SPI is not set\nCONFIG_P54_LEDS=y\nCONFIG_WLAN_VENDOR_MARVELL=y\n# CONFIG_LIBERTAS is not set\n# CONFIG_LIBERTAS_THINFIRM is not set\n# CONFIG_MWIFIEX is not set\n# CONFIG_MWL8K is not set\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_MT76_CORE=m\nCONFIG_MT76_LEDS=y\nCONFIG_MT76_USB=m\nCONFIG_MT76_SDIO=m\nCONFIG_MT76x02_LIB=m\nCONFIG_MT76x02_USB=m\nCONFIG_MT76_CONNAC_LIB=m\nCONFIG_MT76x0_COMMON=m\nCONFIG_MT76x0U=m\n# CONFIG_MT76x0E is not set\nCONFIG_MT76x2_COMMON=m\n# CONFIG_MT76x2E is not set\nCONFIG_MT76x2U=m\n# CONFIG_MT7603E is not set\nCONFIG_MT7615_COMMON=m\n# CONFIG_MT7615E is not set\nCONFIG_MT7663_USB_SDIO_COMMON=m\nCONFIG_MT7663U=m\nCONFIG_MT7663S=m\n# CONFIG_MT7915E is not set\n# CONFIG_MT7921E is not set\n# CONFIG_MT7921S is not set\n# CONFIG_MT7921U is not set\nCONFIG_WLAN_VENDOR_MICROCHIP=y\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\n# CONFIG_WLAN_VENDOR_PURELIFI is not set\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\n# CONFIG_RT2400PCI is not set\n# CONFIG_RT2500PCI is not set\n# CONFIG_RT61PCI is not set\n# CONFIG_RT2800PCI is not set\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\n# CONFIG_RTL8180 is not set\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=m\nCONFIG_RTL8192CE=m\nCONFIG_RTL8192SE=m\nCONFIG_RTL8192DE=m\nCONFIG_RTL8723AE=m\nCONFIG_RTL8723BE=m\nCONFIG_RTL8188EE=m\nCONFIG_RTL8192EE=m\nCONFIG_RTL8821AE=m\nCONFIG_RTL8192CU=m\nCONFIG_RTLWIFI=m\nCONFIG_RTLWIFI_PCI=m\nCONFIG_RTLWIFI_USB=m\nCONFIG_RTLWIFI_DEBUG=y\nCONFIG_RTL8192C_COMMON=m\nCONFIG_RTL8723_COMMON=m\nCONFIG_RTLBTCOEXIST=m\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\nCONFIG_RTW88=m\nCONFIG_RTW88_CORE=m\nCONFIG_RTW88_SDIO=m\nCONFIG_RTW88_USB=m\nCONFIG_RTW88_8822B=m\nCONFIG_RTW88_8822C=m\nCONFIG_RTW88_8723D=m\nCONFIG_RTW88_8821C=m\n# CONFIG_RTW88_8822BE is not set\nCONFIG_RTW88_8822BS=m\nCONFIG_RTW88_8822BU=m\n# CONFIG_RTW88_8822CE is not set\nCONFIG_RTW88_8822CS=m\nCONFIG_RTW88_8822CU=m\n# CONFIG_RTW88_8723DE is not set\nCONFIG_RTW88_8723DU=m\n# CONFIG_RTW88_8821CE is not set\nCONFIG_RTW88_8821CS=m\nCONFIG_RTW88_8821CU=m\n# CONFIG_RTW88_DEBUG is not set\n# CONFIG_RTW88_DEBUGFS is not set\n# CONFIG_RTW89 is not set\nCONFIG_WLAN_VENDOR_RSI=y\n# CONFIG_RSI_91X is not set\n# CONFIG_WLAN_VENDOR_SILABS is not set\n# CONFIG_WLAN_VENDOR_ST is not set\n# CONFIG_WLAN_VENDOR_TI is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\nCONFIG_USB_ZD1201=m\nCONFIG_ZD1211RW=m\n# CONFIG_ZD1211RW_DEBUG is not set\n# CONFIG_WLAN_VENDOR_QUANTENNA is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\n# CONFIG_VMXNET3 is not set\n# CONFIG_NETDEVSIM is not set\n# CONFIG_NET_FAILOVER is not set\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\n# CONFIG_INPUT_MATRIXKMAP is not set\n\n#\n# Userland interfaces\n#\nCONFIG_INPUT_MOUSEDEV=y\n# CONFIG_INPUT_MOUSEDEV_PSAUX is not set\nCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024\nCONFIG_INPUT_MOUSEDEV_SCREEN_Y=768\nCONFIG_INPUT_JOYDEV=y\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADC is not set\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\n# CONFIG_KEYBOARD_ATKBD is not set\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=m\nCONFIG_KEYBOARD_GPIO_POLLED=m\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_PINEPHONE is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\n# CONFIG_KEYBOARD_CYPRESS_SF is not set\nCONFIG_INPUT_MOUSE=y\n# CONFIG_MOUSE_PS2 is not set\n# CONFIG_MOUSE_SERIAL is not set\n# CONFIG_MOUSE_APPLETOUCH is not set\n# CONFIG_MOUSE_BCM5974 is not set\n# CONFIG_MOUSE_CYAPA is not set\n# CONFIG_MOUSE_ELAN_I2C is not set\n# CONFIG_MOUSE_VSXXXAA is not set\n# CONFIG_MOUSE_GPIO is not set\n# CONFIG_MOUSE_SYNAPTICS_I2C is not set\n# CONFIG_MOUSE_SYNAPTICS_USB is not set\nCONFIG_INPUT_JOYSTICK=y\n# CONFIG_JOYSTICK_ANALOG is not set\n# CONFIG_JOYSTICK_A3D is not set\n# CONFIG_JOYSTICK_ADC is not set\n# CONFIG_JOYSTICK_ADI is not set\n# CONFIG_JOYSTICK_COBRA is not set\n# CONFIG_JOYSTICK_GF2K is not set\n# CONFIG_JOYSTICK_GRIP is not set\n# CONFIG_JOYSTICK_GRIP_MP is not set\n# CONFIG_JOYSTICK_GUILLEMOT is not set\n# CONFIG_JOYSTICK_INTERACT is not set\n# CONFIG_JOYSTICK_SIDEWINDER is not set\n# CONFIG_JOYSTICK_TMDC is not set\n# CONFIG_JOYSTICK_IFORCE is not set\n# CONFIG_JOYSTICK_WARRIOR is not set\n# CONFIG_JOYSTICK_MAGELLAN is not set\n# CONFIG_JOYSTICK_SPACEORB is not set\n# CONFIG_JOYSTICK_SPACEBALL is not set\n# CONFIG_JOYSTICK_STINGER is not set\n# CONFIG_JOYSTICK_TWIDJOY is not set\n# CONFIG_JOYSTICK_ZHENHUA is not set\n# CONFIG_JOYSTICK_AS5011 is not set\n# CONFIG_JOYSTICK_JOYDUMP is not set\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\nCONFIG_JOYSTICK_PSXPAD_SPI=m\nCONFIG_JOYSTICK_PSXPAD_SPI_FF=y\n# CONFIG_JOYSTICK_PXRC is not set\n# CONFIG_JOYSTICK_QWIIC is not set\n# CONFIG_JOYSTICK_FSIA6B is not set\n# CONFIG_JOYSTICK_SENSEHAT is not set\n# CONFIG_INPUT_TABLET is not set\n# CONFIG_INPUT_TOUCHSCREEN is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\n# CONFIG_INPUT_RK805_PWRKEY is not set\nCONFIG_INPUT_GPIO_ROTARY_ENCODER=m\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IBM_PANEL is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_IQS7222 is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\nCONFIG_RMI4_CORE=y\n# CONFIG_RMI4_I2C is not set\n# CONFIG_RMI4_SPI is not set\n# CONFIG_RMI4_SMB is not set\nCONFIG_RMI4_F03=y\nCONFIG_RMI4_F03_SERIO=y\nCONFIG_RMI4_2D_SENSOR=y\nCONFIG_RMI4_F11=y\nCONFIG_RMI4_F12=y\nCONFIG_RMI4_F30=y\n# CONFIG_RMI4_F34 is not set\n# CONFIG_RMI4_F3A is not set\n# CONFIG_RMI4_F54 is not set\n# CONFIG_RMI4_F55 is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_SERIO_SERPORT=y\n# CONFIG_SERIO_AMBAKMI is not set\n# CONFIG_SERIO_PCIPS2 is not set\n# CONFIG_SERIO_LIBPS2 is not set\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_SERIO_GPIO_PS2 is not set\n# CONFIG_USERIO is not set\n# CONFIG_GAMEPORT is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\n# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set\n# CONFIG_SERIAL_8250_16550A_VARIANTS is not set\n# CONFIG_SERIAL_8250_FINTEK is not set\nCONFIG_SERIAL_8250_CONSOLE=y\nCONFIG_SERIAL_8250_PCI=y\nCONFIG_SERIAL_8250_EXAR=y\nCONFIG_SERIAL_8250_NR_UARTS=1\nCONFIG_SERIAL_8250_RUNTIME_UARTS=0\nCONFIG_SERIAL_8250_EXTENDED=y\n# CONFIG_SERIAL_8250_MANY_PORTS is not set\nCONFIG_SERIAL_8250_SHARE_IRQ=y\n# CONFIG_SERIAL_8250_DETECT_IRQ is not set\n# CONFIG_SERIAL_8250_RSA is not set\nCONFIG_SERIAL_8250_DWLIB=y\nCONFIG_SERIAL_8250_FSL=y\nCONFIG_SERIAL_8250_DW=y\n# CONFIG_SERIAL_8250_RT288X is not set\nCONFIG_SERIAL_8250_PERICOM=y\nCONFIG_SERIAL_OF_PLATFORM=y\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\n# CONFIG_SERIAL_AMBA_PL011 is not set\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\nCONFIG_SERIAL_MESON=y\nCONFIG_SERIAL_MESON_CONSOLE=y\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_JSM is not set\n# CONFIG_SERIAL_SIFIVE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_RP2 is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\nCONFIG_SERIAL_MCTRL_GPIO=y\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NOZOMI is not set\n# CONFIG_NULL_TTY is not set\n# CONFIG_HVC_DCC is not set\nCONFIG_SERIAL_DEV_BUS=y\nCONFIG_SERIAL_DEV_CTRL_TTYPORT=y\n# CONFIG_TTY_PRINTK is not set\n# CONFIG_VIRTIO_CONSOLE is not set\n# CONFIG_IPMI_HANDLER is not set\n# CONFIG_IPMB_DEVICE_INTERFACE is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_BA431 is not set\nCONFIG_HW_RANDOM_MESON=y\nCONFIG_HW_RANDOM_OPTEE=m\n# CONFIG_HW_RANDOM_CCTRNG is not set\n# CONFIG_HW_RANDOM_XIPHERA is not set\nCONFIG_HW_RANDOM_ARM_SMCCC_TRNG=y\n# CONFIG_HW_RANDOM_CN10K is not set\n# CONFIG_APPLICOM is not set\nCONFIG_DEVMEM=y\nCONFIG_DEVPORT=y\n# CONFIG_TCG_TPM is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\n# CONFIG_RANDOM_TRUST_CPU is not set\n# CONFIG_RANDOM_TRUST_BOOTLOADER is not set\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\nCONFIG_I2C_MUX_PCA954x=y\nCONFIG_I2C_MUX_PINCTRL=y\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_DEMUX_PINCTRL is not set\n# CONFIG_I2C_MUX_MLXCPLD is not set\n# end of Multiplexer I2C Chip support\n\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# PC SMBus host controller drivers\n#\n# CONFIG_I2C_ALI1535 is not set\n# CONFIG_I2C_ALI1563 is not set\n# CONFIG_I2C_ALI15X3 is not set\n# CONFIG_I2C_AMD756 is not set\n# CONFIG_I2C_AMD8111 is not set\n# CONFIG_I2C_I801 is not set\n# CONFIG_I2C_ISCH is not set\n# CONFIG_I2C_PIIX4 is not set\n# CONFIG_I2C_NFORCE2 is not set\n# CONFIG_I2C_NVIDIA_GPU is not set\n# CONFIG_I2C_SIS5595 is not set\n# CONFIG_I2C_SIS630 is not set\n# CONFIG_I2C_SIS96X is not set\n# CONFIG_I2C_VIA is not set\n# CONFIG_I2C_VIAPRO is not set\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CADENCE is not set\n# CONFIG_I2C_CBUS_GPIO is not set\nCONFIG_I2C_DESIGNWARE_CORE=y\n# CONFIG_I2C_DESIGNWARE_SLAVE is not set\nCONFIG_I2C_DESIGNWARE_PLATFORM=y\n# CONFIG_I2C_DESIGNWARE_PCI is not set\n# CONFIG_I2C_EMEV2 is not set\nCONFIG_I2C_GPIO=y\n# CONFIG_I2C_GPIO_FAULT_INJECTOR is not set\nCONFIG_I2C_MESON=y\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_RK3X is not set\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_THUNDERX is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_PCI1XXXX is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\nCONFIG_I2C_SLAVE=y\n# CONFIG_I2C_SLAVE_EEPROM is not set\n# CONFIG_I2C_SLAVE_TESTUNIT is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\nCONFIG_SPI_MEM=y\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\nCONFIG_SPI_BITBANG=y\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_CADENCE_QUADSPI is not set\n# CONFIG_SPI_CADENCE_XSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_NXP_FLEXSPI is not set\nCONFIG_SPI_GPIO=y\n# CONFIG_SPI_FSL_SPI is not set\nCONFIG_SPI_MESON_SPICC=y\nCONFIG_SPI_MESON_SPIFC=y\n# CONFIG_SPI_MICROCHIP_CORE is not set\n# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set\n# CONFIG_SPI_OC_TINY is not set\nCONFIG_SPI_PL022=y\n# CONFIG_SPI_PXA2XX is not set\n# CONFIG_SPI_ROCKCHIP is not set\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_SIFIVE is not set\n# CONFIG_SPI_MXIC is not set\n# CONFIG_SPI_THUNDERX is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_AMD is not set\n\n#\n# SPI Multiplexer support\n#\n# CONFIG_SPI_MUX is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=m\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\nCONFIG_SPI_DYNAMIC=y\nCONFIG_SPMI=y\n# CONFIG_SPMI_HISI3670 is not set\n# CONFIG_HSI is not set\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\n# CONFIG_PTP_1588_CLOCK is not set\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_CY8C95X0 is not set\n# CONFIG_PINCTRL_MCP23S08 is not set\n# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set\n# CONFIG_PINCTRL_OCELOT is not set\n# CONFIG_PINCTRL_RK805 is not set\n# CONFIG_PINCTRL_SINGLE is not set\n# CONFIG_PINCTRL_STMFX is not set\n# CONFIG_PINCTRL_SX150X is not set\nCONFIG_PINCTRL_MESON=y\nCONFIG_PINCTRL_MESON_GXBB=y\nCONFIG_PINCTRL_MESON_GXL=y\nCONFIG_PINCTRL_MESON8_PMX=y\nCONFIG_PINCTRL_MESON_AXG=y\nCONFIG_PINCTRL_MESON_AXG_PMX=y\nCONFIG_PINCTRL_MESON_G12A=y\nCONFIG_PINCTRL_MESON_A1=y\nCONFIG_PINCTRL_MESON_S4=y\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_SYSFS=y\nCONFIG_GPIO_CDEV=y\nCONFIG_GPIO_CDEV_V1=y\nCONFIG_GPIO_GENERIC=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_CADENCE is not set\nCONFIG_GPIO_DWAPB=y\n# CONFIG_GPIO_EXAR is not set\n# CONFIG_GPIO_FTGPIO010 is not set\nCONFIG_GPIO_GENERIC_PLATFORM=y\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_LOGICVC is not set\n# CONFIG_GPIO_MB86S7X is not set\n# CONFIG_GPIO_PL061 is not set\n# CONFIG_GPIO_SIFIVE is not set\n# CONFIG_GPIO_SYSCON is not set\n# CONFIG_GPIO_XGENE is not set\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_GW_PLD is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\nCONFIG_GPIO_PCA953X=m\n# CONFIG_GPIO_PCA953X_IRQ is not set\n# CONFIG_GPIO_PCA9570 is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\n# end of MFD GPIO expanders\n\n#\n# PCI GPIO expanders\n#\n# CONFIG_GPIO_BT8XX is not set\n# CONFIG_GPIO_PCI_IDIO_16 is not set\n# CONFIG_GPIO_PCIE_IDIO_24 is not set\n# CONFIG_GPIO_RDC321X is not set\n# end of PCI GPIO expanders\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n# end of SPI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_SIM is not set\n# end of Virtual GPIO drivers\n\n# CONFIG_W1 is not set\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_BRCMSTB is not set\nCONFIG_POWER_RESET_GPIO=y\nCONFIG_POWER_RESET_GPIO_RESTART=y\n# CONFIG_POWER_RESET_LTC2952 is not set\nCONFIG_POWER_RESET_REGULATOR=y\nCONFIG_POWER_RESET_RESTART=y\n# CONFIG_POWER_RESET_XGENE is not set\nCONFIG_POWER_RESET_SYSCON=y\nCONFIG_POWER_RESET_SYSCON_POWEROFF=y\nCONFIG_REBOOT_MODE=y\nCONFIG_SYSCON_REBOOT_MODE=y\n# CONFIG_NVMEM_REBOOT_MODE is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\nCONFIG_POWER_SUPPLY_HWMON=y\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_IP5XXX_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SAMSUNG_SDI is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_MAX77976 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_RK817 is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_UCS1002 is not set\n# CONFIG_CHARGER_BD99954 is not set\n# CONFIG_BATTERY_UG3105 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM1177 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_AHT10 is not set\n# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set\n# CONFIG_SENSORS_AS370 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_AXI_FAN_CONTROL is not set\nCONFIG_SENSORS_ARM_SCPI=y\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_CORSAIR_CPRO is not set\n# CONFIG_SENSORS_CORSAIR_PSU is not set\n# CONFIG_SENSORS_DRIVETEMP is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_I5K_AMB is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\nCONFIG_SENSORS_GPIO_FAN=m\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IIO_HWMON is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2947_I2C is not set\n# CONFIG_SENSORS_LTC2947_SPI is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC2992 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX127 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX31730 is not set\n# CONFIG_SENSORS_MAX31760 is not set\n# CONFIG_SENSORS_MAX6620 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_TPS23861 is not set\n# CONFIG_SENSORS_MR75203 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT6775_I2C is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_NZXT_KRAKEN2 is not set\n# CONFIG_SENSORS_NZXT_SMART2 is not set\n# CONFIG_SENSORS_OCC_P8_I2C is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\nCONFIG_SENSORS_PWM_FAN=m\n# CONFIG_SENSORS_SBTSI is not set\n# CONFIG_SENSORS_SBRMI is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHT4x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_SIS5595 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC2305 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_INA238 is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_TMP464 is not set\n# CONFIG_SENSORS_TMP513 is not set\n# CONFIG_SENSORS_VIA686A is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_VT8231 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_NETLINK is not set\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\n# CONFIG_THERMAL_WRITABLE_TRIPS is not set\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\n# CONFIG_CPU_THERMAL is not set\nCONFIG_DEVFREQ_THERMAL=y\n# CONFIG_THERMAL_EMULATION is not set\n# CONFIG_THERMAL_MMIO is not set\nCONFIG_AMLOGIC_THERMAL=y\n# CONFIG_GENERIC_ADC_THERMAL is not set\nCONFIG_KHADAS_MCU_FAN_THERMAL=m\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\nCONFIG_WATCHDOG_OPEN_TIMEOUT=0\n# CONFIG_WATCHDOG_SYSFS is not set\n# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_ARM_SBSA_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\n# CONFIG_DW_WATCHDOG is not set\n# CONFIG_MAX63XX_WATCHDOG is not set\nCONFIG_MESON_GXBB_WATCHDOG=y\nCONFIG_MESON_WATCHDOG=y\n# CONFIG_ARM_SMC_WATCHDOG is not set\n# CONFIG_ALIM7101_WDT is not set\n# CONFIG_I6300ESB_WDT is not set\n# CONFIG_HP_WATCHDOG is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# PCI-based Watchdog Cards\n#\n# CONFIG_PCIPCWATCHDOG is not set\n# CONFIG_WDTPCI is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\nCONFIG_SSB=m\nCONFIG_SSB_SPROM=y\nCONFIG_SSB_BLOCKIO=y\nCONFIG_SSB_PCIHOST_POSSIBLE=y\nCONFIG_SSB_PCIHOST=y\nCONFIG_SSB_B43_PCI_BRIDGE=y\nCONFIG_SSB_SDIOHOST_POSSIBLE=y\n# CONFIG_SSB_SDIOHOST is not set\nCONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y\nCONFIG_SSB_DRIVER_PCICORE=y\n# CONFIG_SSB_DRIVER_GPIO is not set\nCONFIG_BCMA_POSSIBLE=y\nCONFIG_BCMA=m\nCONFIG_BCMA_BLOCKIO=y\nCONFIG_BCMA_HOST_PCI_POSSIBLE=y\nCONFIG_BCMA_HOST_PCI=y\n# CONFIG_BCMA_HOST_SOC is not set\nCONFIG_BCMA_DRIVER_PCI=y\n# CONFIG_BCMA_DRIVER_GMAC_CMN is not set\n# CONFIG_BCMA_DRIVER_GPIO is not set\n# CONFIG_BCMA_DEBUG is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AXP20X_I2C is not set\n# CONFIG_MFD_MADERA is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_GATEWORKS_GSC is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_MP2629 is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_MFD_HI6421_SPMI is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_LPC_ICH is not set\n# CONFIG_LPC_SCH is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_JANZ_CMODIO is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77620 is not set\n# CONFIG_MFD_MAX77650 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77714 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6370 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_MFD_OCELOT is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_NTXEC is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_SY7636A is not set\n# CONFIG_MFD_RDC321X is not set\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RT5120 is not set\n# CONFIG_MFD_RC5T583 is not set\nCONFIG_MFD_RK808=y\n# CONFIG_MFD_RN5T618 is not set\nCONFIG_MFD_SEC_CORE=y\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_VX855 is not set\n# CONFIG_MFD_LOCHNAGAR is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_MFD_ROHM_BD718XX is not set\n# CONFIG_MFD_ROHM_BD71828 is not set\n# CONFIG_MFD_ROHM_BD957XMUF is not set\n# CONFIG_MFD_STPMIC1 is not set\n# CONFIG_MFD_STMFX is not set\n# CONFIG_MFD_ATC260X_I2C is not set\nCONFIG_MFD_KHADAS_MCU=m\n# CONFIG_MFD_QCOM_PM8008 is not set\n# CONFIG_RAVE_SP_CORE is not set\n# CONFIG_MFD_INTEL_M10_BMC is not set\n# CONFIG_MFD_RSMU_I2C is not set\n# CONFIG_MFD_RSMU_SPI is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\n# CONFIG_REGULATOR_DA9121 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\n# CONFIG_REGULATOR_FAN53880 is not set\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MAX20086 is not set\n# CONFIG_REGULATOR_MAX77826 is not set\n# CONFIG_REGULATOR_MCP16502 is not set\n# CONFIG_REGULATOR_MP5416 is not set\n# CONFIG_REGULATOR_MP8859 is not set\n# CONFIG_REGULATOR_MP886X is not set\n# CONFIG_REGULATOR_MPQ7920 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_MT6315 is not set\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PF8X00 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\nCONFIG_REGULATOR_PWM=y\n# CONFIG_REGULATOR_QCOM_SPMI is not set\n# CONFIG_REGULATOR_QCOM_USB_VBUS is not set\n# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set\n# CONFIG_REGULATOR_RK808 is not set\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT5190A is not set\n# CONFIG_REGULATOR_RT5759 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\n# CONFIG_REGULATOR_S2MPA01 is not set\n# CONFIG_REGULATOR_S2MPS11 is not set\n# CONFIG_REGULATOR_S5M8767 is not set\n# CONFIG_REGULATOR_SLG51000 is not set\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_SY8824X is not set\n# CONFIG_REGULATOR_SY8827N is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS6286X is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\n# CONFIG_REGULATOR_VCTRL is not set\n# CONFIG_REGULATOR_QCOM_LABIBB is not set\nCONFIG_RC_CORE=y\nCONFIG_BPF_LIRC_MODE2=y\nCONFIG_LIRC=y\nCONFIG_RC_MAP=m\nCONFIG_RC_DECODERS=y\nCONFIG_IR_IMON_DECODER=m\nCONFIG_IR_JVC_DECODER=m\nCONFIG_IR_MCE_KBD_DECODER=m\nCONFIG_IR_NEC_DECODER=m\nCONFIG_IR_RC5_DECODER=m\nCONFIG_IR_RC6_DECODER=m\nCONFIG_IR_RCMM_DECODER=m\nCONFIG_IR_SANYO_DECODER=m\nCONFIG_IR_SHARP_DECODER=m\nCONFIG_IR_SONY_DECODER=m\nCONFIG_IR_XMP_DECODER=m\nCONFIG_RC_DEVICES=y\nCONFIG_IR_GPIO_CIR=m\nCONFIG_IR_GPIO_TX=m\n# CONFIG_IR_HIX5HD2 is not set\nCONFIG_IR_IGORPLUGUSB=m\nCONFIG_IR_IGUANA=m\nCONFIG_IR_IMON=m\nCONFIG_IR_IMON_RAW=m\nCONFIG_IR_MCEUSB=m\nCONFIG_IR_MESON=m\n# CONFIG_IR_MESON_TX is not set\nCONFIG_IR_PWM_TX=m\nCONFIG_IR_REDRAT3=m\n# CONFIG_IR_SERIAL is not set\n# CONFIG_IR_SPI is not set\nCONFIG_IR_STREAMZAP=m\nCONFIG_IR_TOY=m\nCONFIG_IR_TTUSBIR=m\nCONFIG_RC_ATI_REMOTE=m\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_RC_XBOX_DVD=m\nCONFIG_CEC_CORE=y\nCONFIG_CEC_NOTIFIER=y\n\n#\n# CEC support\n#\n# CONFIG_MEDIA_CEC_RC is not set\nCONFIG_MEDIA_CEC_SUPPORT=y\n# CONFIG_CEC_CH7322 is not set\nCONFIG_CEC_MESON_AO=y\nCONFIG_CEC_MESON_G12A_AO=y\n# CONFIG_CEC_GPIO is not set\n# CONFIG_USB_PULSE8_CEC is not set\n# CONFIG_USB_RAINSHADOW_CEC is not set\n# end of CEC support\n\nCONFIG_MEDIA_SUPPORT=y\n# CONFIG_MEDIA_SUPPORT_FILTER is not set\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\nCONFIG_MEDIA_RADIO_SUPPORT=y\nCONFIG_MEDIA_SDR_SUPPORT=y\nCONFIG_MEDIA_PLATFORM_SUPPORT=y\nCONFIG_MEDIA_TEST_SUPPORT=y\n# end of Media device types\n\n#\n# Media core support\n#\nCONFIG_VIDEO_DEV=y\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_DVB_CORE=y\n# end of Media core support\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2_I2C=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_VIDEO_TUNER=m\nCONFIG_V4L2_MEM2MEM_DEV=m\n# end of Video4Linux options\n\n#\n# Media controller options\n#\nCONFIG_MEDIA_CONTROLLER_DVB=y\n# end of Media controller options\n\n#\n# Digital TV options\n#\n# CONFIG_DVB_MMAP is not set\nCONFIG_DVB_NET=y\nCONFIG_DVB_MAX_ADAPTERS=8\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set\n# CONFIG_DVB_ULE_DEBUG is not set\n# end of Digital TV options\n\n#\n# Media drivers\n#\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_USB_S2255 is not set\nCONFIG_VIDEO_USBTV=m\nCONFIG_USB_VIDEO_CLASS=m\n# CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV is not set\n\n#\n# Analog TV USB devices\n#\n# CONFIG_VIDEO_GO7007 is not set\nCONFIG_VIDEO_HDPVR=m\nCONFIG_VIDEO_PVRUSB2=m\nCONFIG_VIDEO_PVRUSB2_SYSFS=y\nCONFIG_VIDEO_PVRUSB2_DVB=y\n# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set\nCONFIG_VIDEO_STK1160_COMMON=m\nCONFIG_VIDEO_STK1160=m\n\n#\n# Analog/digital TV USB devices\n#\nCONFIG_VIDEO_AU0828=m\nCONFIG_VIDEO_AU0828_V4L2=y\nCONFIG_VIDEO_AU0828_RC=y\nCONFIG_VIDEO_CX231XX=m\nCONFIG_VIDEO_CX231XX_RC=y\n# CONFIG_VIDEO_CX231XX_ALSA is not set\nCONFIG_VIDEO_CX231XX_DVB=m\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_AS102=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\n# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_DVBSKY=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_DVB_USB_ZD1301=m\nCONFIG_DVB_USB=m\n# CONFIG_DVB_USB_DEBUG is not set\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_CXUSB=m\n# CONFIG_DVB_USB_CXUSB_ANALOG is not set\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_DIB3000MC=m\nCONFIG_DVB_USB_DIBUSB_MB=m\nCONFIG_DVB_USB_DIBUSB_MB_FAULTY=y\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_DTT200U=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_OPERA1=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_SMS_USB_DRV=m\n# CONFIG_DVB_TTUSB_BUDGET is not set\n# CONFIG_DVB_TTUSB_DEC is not set\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\nCONFIG_VIDEO_EM28XX=m\n# CONFIG_VIDEO_EM28XX_V4L2 is not set\n# CONFIG_VIDEO_EM28XX_ALSA is not set\nCONFIG_VIDEO_EM28XX_DVB=m\nCONFIG_VIDEO_EM28XX_RC=m\n\n#\n# Software defined radio USB devices\n#\n# CONFIG_USB_AIRSPY is not set\n# CONFIG_USB_HACKRF is not set\n# CONFIG_USB_MSI2500 is not set\n# CONFIG_MEDIA_PCI_SUPPORT is not set\n# CONFIG_RADIO_ADAPTERS is not set\nCONFIG_MEDIA_PLATFORM_DRIVERS=y\n# CONFIG_V4L_PLATFORM_DRIVERS is not set\n# CONFIG_SDR_PLATFORM_DRIVERS is not set\n# CONFIG_DVB_PLATFORM_DRIVERS is not set\nCONFIG_V4L_MEM2MEM_DRIVERS=y\nCONFIG_VIDEO_MEM2MEM_DEINTERLACE=m\n\n#\n# Allegro DVT media platform drivers\n#\n\n#\n# Amlogic media platform drivers\n#\n# CONFIG_VIDEO_MESON_GE2D is not set\n\n#\n# Amphion drivers\n#\n\n#\n# Aspeed media platform drivers\n#\n\n#\n# Atmel media platform drivers\n#\n\n#\n# Cadence media platform drivers\n#\n# CONFIG_VIDEO_CADENCE_CSI2RX is not set\n# CONFIG_VIDEO_CADENCE_CSI2TX is not set\n\n#\n# Chips&Media media platform drivers\n#\n\n#\n# Intel media platform drivers\n#\n\n#\n# Marvell media platform drivers\n#\n\n#\n# Mediatek media platform drivers\n#\n\n#\n# NVidia media platform drivers\n#\n\n#\n# NXP media platform drivers\n#\n\n#\n# Qualcomm media platform drivers\n#\n\n#\n# Renesas media platform drivers\n#\n\n#\n# Rockchip media platform drivers\n#\n\n#\n# Samsung media platform drivers\n#\n\n#\n# STMicroelectronics media platform drivers\n#\n\n#\n# Sunxi media platform drivers\n#\n\n#\n# Texas Instruments drivers\n#\n\n#\n# Verisilicon media platform drivers\n#\n\n#\n# VIA media platform drivers\n#\n\n#\n# Xilinx media platform drivers\n#\n\n#\n# MMC/SDIO DVB adapters\n#\n# CONFIG_SMS_SDIO_DRV is not set\n# CONFIG_V4L_TEST_DRIVERS is not set\n# CONFIG_DVB_TEST_DRIVERS is not set\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_TTPCI_EEPROM=m\nCONFIG_VIDEO_CX2341X=m\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\nCONFIG_VIDEOBUF2_CORE=m\nCONFIG_VIDEOBUF2_V4L2=m\nCONFIG_VIDEOBUF2_MEMOPS=m\nCONFIG_VIDEOBUF2_DMA_CONTIG=m\nCONFIG_VIDEOBUF2_VMALLOC=m\n# end of Media drivers\n\n#\n# Media ancillary drivers\n#\nCONFIG_MEDIA_ATTACH=y\n\n#\n# IR I2C driver auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_IR_I2C=m\n\n#\n# Camera sensor devices\n#\n# CONFIG_VIDEO_AR0521 is not set\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_HI846 is not set\n# CONFIG_VIDEO_HI847 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_IMX412 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\n# CONFIG_VIDEO_MT9V011 is not set\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_OG01A1B is not set\n# CONFIG_VIDEO_OV02A10 is not set\n# CONFIG_VIDEO_OV08D10 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\n# CONFIG_VIDEO_OV2640 is not set\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5693 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV7251 is not set\n# CONFIG_VIDEO_OV7640 is not set\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9282 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n# end of Camera sensor devices\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# Audio decoders, processors and mixers\n#\n# CONFIG_VIDEO_CS3308 is not set\n# CONFIG_VIDEO_CS5345 is not set\nCONFIG_VIDEO_CS53L32A=m\nCONFIG_VIDEO_MSP3400=m\n# CONFIG_VIDEO_SONY_BTF_MPX is not set\n# CONFIG_VIDEO_TDA1997X is not set\n# CONFIG_VIDEO_TDA7432 is not set\n# CONFIG_VIDEO_TDA9840 is not set\n# CONFIG_VIDEO_TEA6415C is not set\n# CONFIG_VIDEO_TEA6420 is not set\n# CONFIG_VIDEO_TLV320AIC23B is not set\n# CONFIG_VIDEO_TVAUDIO is not set\n# CONFIG_VIDEO_UDA1342 is not set\n# CONFIG_VIDEO_VP27SMPX is not set\n# CONFIG_VIDEO_WM8739 is not set\nCONFIG_VIDEO_WM8775=m\n# end of Audio decoders, processors and mixers\n\n#\n# RDS decoders\n#\n# CONFIG_VIDEO_SAA6588 is not set\n# end of RDS decoders\n\n#\n# Video decoders\n#\n# CONFIG_VIDEO_ADV7180 is not set\n# CONFIG_VIDEO_ADV7183 is not set\n# CONFIG_VIDEO_ADV748X is not set\n# CONFIG_VIDEO_ADV7604 is not set\n# CONFIG_VIDEO_ADV7842 is not set\n# CONFIG_VIDEO_BT819 is not set\n# CONFIG_VIDEO_BT856 is not set\n# CONFIG_VIDEO_BT866 is not set\n# CONFIG_VIDEO_ISL7998X is not set\n# CONFIG_VIDEO_KS0127 is not set\n# CONFIG_VIDEO_MAX9286 is not set\n# CONFIG_VIDEO_ML86V7667 is not set\n# CONFIG_VIDEO_SAA7110 is not set\nCONFIG_VIDEO_SAA711X=m\n# CONFIG_VIDEO_TC358743 is not set\n# CONFIG_VIDEO_TVP514X is not set\n# CONFIG_VIDEO_TVP5150 is not set\n# CONFIG_VIDEO_TVP7002 is not set\n# CONFIG_VIDEO_TW2804 is not set\n# CONFIG_VIDEO_TW9903 is not set\n# CONFIG_VIDEO_TW9906 is not set\n# CONFIG_VIDEO_TW9910 is not set\n# CONFIG_VIDEO_VPX3220 is not set\n\n#\n# Video and audio decoders\n#\n# CONFIG_VIDEO_SAA717X is not set\nCONFIG_VIDEO_CX25840=m\n# end of Video decoders\n\n#\n# Video encoders\n#\n# CONFIG_VIDEO_AD9389B is not set\n# CONFIG_VIDEO_ADV7170 is not set\n# CONFIG_VIDEO_ADV7175 is not set\n# CONFIG_VIDEO_ADV7343 is not set\n# CONFIG_VIDEO_ADV7393 is not set\n# CONFIG_VIDEO_ADV7511 is not set\n# CONFIG_VIDEO_AK881X is not set\n# CONFIG_VIDEO_SAA7127 is not set\n# CONFIG_VIDEO_SAA7185 is not set\n# CONFIG_VIDEO_THS8200 is not set\n# end of Video encoders\n\n#\n# Video improvement chips\n#\n# CONFIG_VIDEO_UPD64031A is not set\n# CONFIG_VIDEO_UPD64083 is not set\n# end of Video improvement chips\n\n#\n# Audio/Video compression chips\n#\n# CONFIG_VIDEO_SAA6752HS is not set\n# end of Audio/Video compression chips\n\n#\n# SDR tuner chips\n#\n# CONFIG_SDR_MAX2175 is not set\n# end of SDR tuner chips\n\n#\n# Miscellaneous helper chips\n#\n# CONFIG_VIDEO_I2C is not set\n# CONFIG_VIDEO_M52790 is not set\n# CONFIG_VIDEO_ST_MIPID02 is not set\n# CONFIG_VIDEO_THS7303 is not set\n# end of Miscellaneous helper chips\n\n#\n# Media SPI Adapters\n#\nCONFIG_CXD2880_SPI_DRV=m\n# CONFIG_VIDEO_GS1662 is not set\n# end of Media SPI Adapters\n\nCONFIG_MEDIA_TUNER=y\n\n#\n# Customize TV tuners\n#\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_IT913X=m\n# CONFIG_MEDIA_TUNER_M88RS6000T is not set\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_MC44S803=y\n# CONFIG_MEDIA_TUNER_MSI001 is not set\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT20XX=y\n# CONFIG_MEDIA_TUNER_MT2131 is not set\nCONFIG_MEDIA_TUNER_MT2266=m\n# CONFIG_MEDIA_TUNER_MXL301RF is not set\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\n# CONFIG_MEDIA_TUNER_QM1D1B0004 is not set\nCONFIG_MEDIA_TUNER_QM1D1C0042=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_R820T=m\nCONFIG_MEDIA_TUNER_SI2157=m\nCONFIG_MEDIA_TUNER_SIMPLE=y\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_TDA18250=m\nCONFIG_MEDIA_TUNER_TDA18271=y\nCONFIG_MEDIA_TUNER_TDA827X=y\nCONFIG_MEDIA_TUNER_TDA8290=y\nCONFIG_MEDIA_TUNER_TDA9887=y\nCONFIG_MEDIA_TUNER_TEA5761=y\nCONFIG_MEDIA_TUNER_TEA5767=y\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_XC2028=y\nCONFIG_MEDIA_TUNER_XC4000=y\nCONFIG_MEDIA_TUNER_XC5000=y\n# end of Customize TV tuners\n\n#\n# Customise DVB Frontends\n#\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_M88DS3103=m\n# CONFIG_DVB_MXL5XX is not set\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\n# CONFIG_DVB_STV0910 is not set\nCONFIG_DVB_STV6110x=m\n# CONFIG_DVB_STV6111 is not set\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_MN88472=m\nCONFIG_DVB_MN88473=m\nCONFIG_DVB_SI2165=m\nCONFIG_DVB_TDA18271C2DD=m\n\n#\n# DVB-S (satellite) frontends\n#\n# CONFIG_DVB_CX24110 is not set\nCONFIG_DVB_CX24116=m\n# CONFIG_DVB_CX24117 is not set\nCONFIG_DVB_CX24120=m\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_DS3000=m\n# CONFIG_DVB_MB86A16 is not set\nCONFIG_DVB_MT312=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_TDA10071=m\nCONFIG_DVB_TDA10086=m\n# CONFIG_DVB_TDA8083 is not set\n# CONFIG_DVB_TDA8261 is not set\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_TS2020=m\n# CONFIG_DVB_TUA6100 is not set\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TUNER_ITD1000=m\n# CONFIG_DVB_VES1X93 is not set\n# CONFIG_DVB_ZL10036 is not set\nCONFIG_DVB_ZL10039=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_AS102_FE=m\n# CONFIG_DVB_CX22700 is not set\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_CXD2841ER=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\n# CONFIG_DVB_DIB9000 is not set\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_GP8PSK_FE=m\n# CONFIG_DVB_L64781 is not set\nCONFIG_DVB_MT352=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\nCONFIG_DVB_RTL2832_SDR=m\n# CONFIG_DVB_S5H1432 is not set\nCONFIG_DVB_SI2168=m\n# CONFIG_DVB_SP887X is not set\n# CONFIG_DVB_STV0367 is not set\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_ZD1301_DEMOD=m\nCONFIG_DVB_ZL10353=m\n# CONFIG_DVB_CXD2880 is not set\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_STV0297=m\n# CONFIG_DVB_TDA10021 is not set\nCONFIG_DVB_TDA10023=m\n# CONFIG_DVB_VES1820 is not set\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_AU8522=m\nCONFIG_DVB_AU8522_DTV=m\nCONFIG_DVB_AU8522_V4L=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LGDT3306A=m\nCONFIG_DVB_LGDT330X=m\nCONFIG_DVB_MXL692=m\nCONFIG_DVB_NXT200X=m\n# CONFIG_DVB_OR51132 is not set\n# CONFIG_DVB_OR51211 is not set\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_S5H1411=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\nCONFIG_DVB_S921=m\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\n# CONFIG_DVB_MN88443X is not set\nCONFIG_DVB_TC90522=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_A8293=m\nCONFIG_DVB_AF9033=m\n# CONFIG_DVB_ASCOT2E is not set\nCONFIG_DVB_ATBM8830=m\n# CONFIG_DVB_HELENE is not set\n# CONFIG_DVB_HORUS3A is not set\n# CONFIG_DVB_ISL6405 is not set\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_IX2505V=m\n# CONFIG_DVB_LGS8GL5 is not set\nCONFIG_DVB_LGS8GXX=m\n# CONFIG_DVB_LNBH25 is not set\n# CONFIG_DVB_LNBH29 is not set\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_M88RS2000=m\n# CONFIG_DVB_TDA665x is not set\nCONFIG_DVB_DRX39XYJ=m\n\n#\n# Common Interface (EN50221) controller drivers\n#\n# CONFIG_DVB_CXD2099 is not set\nCONFIG_DVB_SP2=m\n# end of Customise DVB Frontends\n\n#\n# Tools to develop new frontends\n#\nCONFIG_DVB_DUMMY_FE=m\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\nCONFIG_APERTURE_HELPERS=y\nCONFIG_DRM=y\n# CONFIG_DRM_DEBUG_MM is not set\nCONFIG_DRM_KMS_HELPER=y\n# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set\nCONFIG_DRM_DEBUG_MODESET_LOCK=y\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\n# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\nCONFIG_DRM_DISPLAY_HELPER=y\nCONFIG_DRM_DISPLAY_HDMI_HELPER=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_GEM_DMA_HELPER=y\nCONFIG_DRM_GEM_SHMEM_HELPER=m\nCONFIG_DRM_SCHED=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_KOMEDA is not set\n# end of ARM devices\n\n# CONFIG_DRM_RADEON is not set\n# CONFIG_DRM_AMDGPU is not set\n# CONFIG_DRM_NOUVEAU is not set\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\n# CONFIG_DRM_VMWGFX is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_AST is not set\n# CONFIG_DRM_MGAG200 is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_USE_LVDS is not set\n# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set\n# CONFIG_DRM_QXL is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set\n# CONFIG_DRM_PANEL_ARM_VERSATILE is not set\n# CONFIG_DRM_PANEL_LVDS is not set\n# CONFIG_DRM_PANEL_SIMPLE is not set\n# CONFIG_DRM_PANEL_EDP is not set\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set\n# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LB035Q02 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set\n# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set\n# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set\n# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set\n# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set\n# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set\n# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set\n# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set\n# CONFIG_DRM_PANEL_TPO_TPG110 is not set\n# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_CHRONTEL_CH7033 is not set\nCONFIG_DRM_DISPLAY_CONNECTOR=y\n# CONFIG_DRM_ITE_IT6505 is not set\n# CONFIG_DRM_LONTIUM_LT8912B is not set\n# CONFIG_DRM_LONTIUM_LT9211 is not set\n# CONFIG_DRM_LONTIUM_LT9611 is not set\n# CONFIG_DRM_LONTIUM_LT9611UXC is not set\n# CONFIG_DRM_ITE_IT66121 is not set\n# CONFIG_DRM_LVDS_CODEC is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NWL_MIPI_DSI is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_PARADE_PS8640 is not set\n# CONFIG_DRM_SIL_SII8620 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_SII9234 is not set\n# CONFIG_DRM_SIMPLE_BRIDGE is not set\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\n# CONFIG_DRM_TOSHIBA_TC358762 is not set\n# CONFIG_DRM_TOSHIBA_TC358764 is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TOSHIBA_TC358768 is not set\n# CONFIG_DRM_TOSHIBA_TC358775 is not set\n# CONFIG_DRM_TI_DLPC3433 is not set\n# CONFIG_DRM_TI_TFP410 is not set\n# CONFIG_DRM_TI_SN65DSI83 is not set\n# CONFIG_DRM_TI_SN65DSI86 is not set\n# CONFIG_DRM_TI_TPD12S015 is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_ANALOGIX_ANX7625 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_CDNS_MHDP8546 is not set\nCONFIG_DRM_DW_HDMI=y\n# CONFIG_DRM_DW_HDMI_AHB_AUDIO is not set\nCONFIG_DRM_DW_HDMI_I2S_AUDIO=y\n# CONFIG_DRM_DW_HDMI_GP_AUDIO is not set\n# CONFIG_DRM_DW_HDMI_CEC is not set\n# end of Display Interface Bridges\n\nCONFIG_DRM_ETNAVIV=y\nCONFIG_DRM_ETNAVIV_THERMAL=y\n# CONFIG_DRM_HISI_HIBMC is not set\n# CONFIG_DRM_HISI_KIRIN is not set\n# CONFIG_DRM_LOGICVC is not set\nCONFIG_DRM_MESON=y\nCONFIG_DRM_MESON_DW_HDMI=y\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_BOCHS is not set\n# CONFIG_DRM_CIRRUS_QEMU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_PANEL_MIPI_DBI is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_TINYDRM_HX8357D is not set\n# CONFIG_TINYDRM_ILI9163 is not set\n# CONFIG_TINYDRM_ILI9225 is not set\n# CONFIG_TINYDRM_ILI9341 is not set\n# CONFIG_TINYDRM_ILI9486 is not set\n# CONFIG_TINYDRM_MI0283QT is not set\n# CONFIG_TINYDRM_REPAPER is not set\n# CONFIG_TINYDRM_ST7586 is not set\n# CONFIG_TINYDRM_ST7735R is not set\n# CONFIG_DRM_PL111 is not set\nCONFIG_DRM_LIMA=m\nCONFIG_DRM_PANFROST=m\n# CONFIG_DRM_TIDSS is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_SSD130X is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_DRM_NOMODESET=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\nCONFIG_FB_MODE_HELPERS=y\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_CIRRUS is not set\n# CONFIG_FB_PM2 is not set\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_CYBER2000 is not set\n# CONFIG_FB_ASILIANT is not set\n# CONFIG_FB_IMSTT is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_NVIDIA is not set\n# CONFIG_FB_RIVA is not set\n# CONFIG_FB_I740 is not set\n# CONFIG_FB_MATROX is not set\n# CONFIG_FB_RADEON is not set\n# CONFIG_FB_ATY128 is not set\n# CONFIG_FB_ATY is not set\n# CONFIG_FB_S3 is not set\n# CONFIG_FB_SAVAGE is not set\n# CONFIG_FB_SIS is not set\n# CONFIG_FB_NEOMAGIC is not set\n# CONFIG_FB_KYRO is not set\n# CONFIG_FB_3DFX is not set\n# CONFIG_FB_VOODOO1 is not set\n# CONFIG_FB_VT8623 is not set\n# CONFIG_FB_TRIDENT is not set\n# CONFIG_FB_ARK is not set\n# CONFIG_FB_PM3 is not set\n# CONFIG_FB_CARMINE is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_MB862XX is not set\nCONFIG_FB_SIMPLE=y\n# CONFIG_FB_SSD1307 is not set\n# CONFIG_FB_SM712 is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\n# CONFIG_LCD_CLASS_DEVICE is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\n# CONFIG_BACKLIGHT_KTD253 is not set\n# CONFIG_BACKLIGHT_PWM is not set\n# CONFIG_BACKLIGHT_QCOM_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\nCONFIG_BACKLIGHT_GPIO=y\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n# CONFIG_BACKLIGHT_LED is not set\n# end of Backlight & LCD device support\n\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_DUMMY_CONSOLE_COLUMNS=80\nCONFIG_DUMMY_CONSOLE_ROWS=25\nCONFIG_FRAMEBUFFER_CONSOLE=y\n# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\n# end of Console display driver support\n\n# CONFIG_LOGO is not set\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_HWDEP=m\nCONFIG_SND_RAWMIDI=m\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\n# CONFIG_SND_HRTIMER is not set\nCONFIG_SND_DYNAMIC_MINORS=y\nCONFIG_SND_MAX_CARDS=32\nCONFIG_SND_SUPPORT_OLD_API=y\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_CTL_INPUT_VALIDATION is not set\nCONFIG_SND_VMASTER=y\n# CONFIG_SND_SEQUENCER is not set\n# CONFIG_SND_DRIVERS is not set\n# CONFIG_SND_PCI is not set\n\n#\n# HD-Audio\n#\n# end of HD-Audio\n\nCONFIG_SND_HDA_PREALLOC_SIZE=64\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=m\nCONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y\nCONFIG_SND_USB_UA101=m\nCONFIG_SND_USB_CAIAQ=m\nCONFIG_SND_USB_CAIAQ_INPUT=y\nCONFIG_SND_USB_6FIRE=m\nCONFIG_SND_USB_HIFACE=m\nCONFIG_SND_BCD2000=m\nCONFIG_SND_USB_LINE6=m\nCONFIG_SND_USB_POD=m\nCONFIG_SND_USB_PODHD=m\nCONFIG_SND_USB_TONEPORT=m\nCONFIG_SND_USB_VARIAX=m\nCONFIG_SND_SOC=y\n# CONFIG_SND_SOC_ADI is not set\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_AMD_ACP_CONFIG is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_AUDMIX is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_FSL_MICFIL is not set\n# CONFIG_SND_SOC_FSL_XCVR is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\n\n#\n# ASoC support for Amlogic platforms\n#\nCONFIG_SND_MESON_AIU=y\nCONFIG_SND_MESON_AXG_FIFO=y\nCONFIG_SND_MESON_AXG_FRDDR=y\nCONFIG_SND_MESON_AXG_TODDR=y\nCONFIG_SND_MESON_AXG_TDM_FORMATTER=y\nCONFIG_SND_MESON_AXG_TDM_INTERFACE=y\nCONFIG_SND_MESON_AXG_TDMIN=y\nCONFIG_SND_MESON_AXG_TDMOUT=y\nCONFIG_SND_MESON_AXG_SOUND_CARD=y\nCONFIG_SND_MESON_AXG_SPDIFOUT=y\nCONFIG_SND_MESON_AXG_SPDIFIN=y\nCONFIG_SND_MESON_AXG_PDM=y\nCONFIG_SND_MESON_CARD_UTILS=y\nCONFIG_SND_MESON_CODEC_GLUE=y\nCONFIG_SND_MESON_GX_SOUND_CARD=y\nCONFIG_SND_MESON_G12A_TOACODEC=y\nCONFIG_SND_MESON_G12A_TOHDMITX=y\nCONFIG_SND_SOC_MESON_T9015=y\n# end of ASoC support for Amlogic platforms\n\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_SPI is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\n# CONFIG_SND_SOC_ADAU7002 is not set\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4375 is not set\n# CONFIG_SND_SOC_AK4458 is not set\n# CONFIG_SND_SOC_AK4554 is not set\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_AW8738 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS35L41_SPI is not set\n# CONFIG_SND_SOC_CS35L41_I2C is not set\n# CONFIG_SND_SOC_CS35L45_SPI is not set\n# CONFIG_SND_SOC_CS35L45_I2C is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS42L83 is not set\n# CONFIG_SND_SOC_CS4234 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\n# CONFIG_SND_SOC_DA7213 is not set\n# CONFIG_SND_SOC_DMIC is not set\nCONFIG_SND_SOC_HDMI_CODEC=y\nCONFIG_SND_SOC_ES7134=y\n# CONFIG_SND_SOC_ES7241 is not set\n# CONFIG_SND_SOC_ES8316 is not set\n# CONFIG_SND_SOC_ES8326 is not set\nCONFIG_SND_SOC_ES8328=y\nCONFIG_SND_SOC_ES8328_I2C=y\n# CONFIG_SND_SOC_ES8328_SPI is not set\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_HDA is not set\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\n# CONFIG_SND_SOC_MAX98088 is not set\nCONFIG_SND_SOC_MAX98357A=y\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98520 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX98396 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_ANALOG is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM179X_SPI is not set\n# CONFIG_SND_SOC_PCM186X_I2C is not set\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3060_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\n# CONFIG_SND_SOC_PCM5102A is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK3328 is not set\n# CONFIG_SND_SOC_RK817 is not set\n# CONFIG_SND_SOC_RT5616 is not set\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\n# CONFIG_SND_SOC_RT5659 is not set\n# CONFIG_SND_SOC_RT9120 is not set\n# CONFIG_SND_SOC_SGTL5000 is not set\nCONFIG_SND_SOC_SIMPLE_AMPLIFIER=y\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\nCONFIG_SND_SOC_SPDIF=y\n# CONFIG_SND_SOC_SRC4XXX_I2C is not set\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS2780 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805M is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320ADC3XXX is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731_I2C is not set\n# CONFIG_SND_SOC_WM8731_SPI is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8940 is not set\n# CONFIG_SND_SOC_WM8960 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_ZL38060 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8821 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\n# end of CODEC drivers\n\nCONFIG_SND_SIMPLE_CARD_UTILS=y\nCONFIG_SND_SIMPLE_CARD=y\nCONFIG_SND_AUDIO_GRAPH_CARD=y\n# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set\n# CONFIG_SND_TEST_COMPONENT is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\n# CONFIG_HID_APPLEIR is not set\nCONFIG_HID_ASUS=y\nCONFIG_HID_AUREAL=y\n# CONFIG_HID_BELKIN is not set\n# CONFIG_HID_BETOP_FF is not set\nCONFIG_HID_BIGBEN_FF=m\nCONFIG_HID_CHERRY=y\nCONFIG_HID_CHICONY=y\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\nCONFIG_HID_CYPRESS=y\nCONFIG_HID_DRAGONRISE=m\nCONFIG_DRAGONRISE_FF=y\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\nCONFIG_HID_EZKEY=y\n# CONFIG_HID_FT260 is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_GLORIOUS is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\nCONFIG_HID_KYE=y\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_VRC2 is not set\n# CONFIG_HID_XIAOMI is not set\nCONFIG_HID_GYRATION=y\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_ITE is not set\n# CONFIG_HID_JABRA is not set\nCONFIG_HID_TWINHAN=y\nCONFIG_HID_KENSINGTON=y\n# CONFIG_HID_LCPOWER is not set\n# CONFIG_HID_LED is not set\nCONFIG_HID_LENOVO=y\n# CONFIG_HID_LETSKETCH is not set\nCONFIG_HID_LOGITECH=y\nCONFIG_HID_LOGITECH_DJ=y\nCONFIG_HID_LOGITECH_HIDPP=y\nCONFIG_LOGITECH_FF=y\nCONFIG_LOGIRUMBLEPAD2_FF=y\nCONFIG_LOGIG940_FF=y\nCONFIG_LOGIWHEELS_FF=y\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_MEGAWORLD_FF is not set\n# CONFIG_HID_REDRAGON is not set\nCONFIG_HID_MICROSOFT=y\nCONFIG_HID_MONTEREY=y\nCONFIG_HID_MULTITOUCH=m\nCONFIG_HID_NINTENDO=y\nCONFIG_NINTENDO_FF=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\nCONFIG_HID_ORTEK=y\nCONFIG_HID_OUYA=y\nCONFIG_HID_PANTHERLORD=y\nCONFIG_PANTHERLORD_FF=y\nCONFIG_HID_PENMOUNT=y\nCONFIG_HID_PETALYNX=y\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PXRC is not set\n# CONFIG_HID_RAZER is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\nCONFIG_HID_SAMSUNG=y\n# CONFIG_HID_SEMITEK is not set\n# CONFIG_HID_SIGMAMICRO is not set\nCONFIG_HID_SONY=y\nCONFIG_SONY_FF=y\n# CONFIG_HID_SPEEDLINK is not set\nCONFIG_HID_STEAM=m\n# CONFIG_HID_STEELSERIES is not set\nCONFIG_HID_SUNPLUS=y\nCONFIG_HID_RMI=y\n# CONFIG_HID_GREENASIA is not set\nCONFIG_HID_SMARTJOYPLUS=m\nCONFIG_SMARTJOYPLUS_FF=y\nCONFIG_HID_TIVO=y\nCONFIG_HID_TOPSEED=y\n# CONFIG_HID_TOPRE is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\nCONFIG_HID_WIIMOTE=m\nCONFIG_HID_XINMO=y\n# CONFIG_HID_ZEROPLUS is not set\nCONFIG_HID_ZYDACRON=y\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n# end of USB HID support\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID_OF is not set\n# CONFIG_I2C_HID_OF_ELAN is not set\n# CONFIG_I2C_HID_OF_GOODIX is not set\n# end of I2C HID support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_USB_ULPI_BUS is not set\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\n# CONFIG_USB_PCI is not set\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\nCONFIG_USB_OTG=y\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set\n# CONFIG_USB_OTG_FSM is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\nCONFIG_USB_MON=m\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\n# CONFIG_USB_XHCI_DBGCAP is not set\n# CONFIG_USB_XHCI_PCI_RENESAS is not set\nCONFIG_USB_XHCI_PLATFORM=y\nCONFIG_USB_EHCI_HCD=y\nCONFIG_USB_EHCI_ROOT_HUB_TT=y\nCONFIG_USB_EHCI_TT_NEWSCHED=y\n# CONFIG_USB_EHCI_FSL is not set\nCONFIG_USB_EHCI_HCD_PLATFORM=y\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\nCONFIG_USB_OHCI_HCD=y\nCONFIG_USB_OHCI_HCD_PLATFORM=y\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_BCMA is not set\n# CONFIG_USB_HCD_SSB is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=m\n# CONFIG_USB_PRINTER is not set\nCONFIG_USB_WDM=m\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\nCONFIG_USB_UAS=y\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\n# CONFIG_USB_MUSB_HDRC is not set\nCONFIG_USB_DWC3=y\n# CONFIG_USB_DWC3_HOST is not set\n# CONFIG_USB_DWC3_GADGET is not set\nCONFIG_USB_DWC3_DUAL_ROLE=y\n\n#\n# Platform Glue Driver Support\n#\nCONFIG_USB_DWC3_MESON_G12A=y\nCONFIG_USB_DWC3_OF_SIMPLE=y\nCONFIG_USB_DWC2=y\n# CONFIG_USB_DWC2_HOST is not set\n\n#\n# Gadget/Dual-role mode requires USB Gadget support to be enabled\n#\n# CONFIG_USB_DWC2_PERIPHERAL is not set\nCONFIG_USB_DWC2_DUAL_ROLE=y\n# CONFIG_USB_DWC2_DEBUG is not set\n# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set\n# CONFIG_USB_CHIPIDEA is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=m\nCONFIG_USB_SERIAL_GENERIC=y\n# CONFIG_USB_SERIAL_SIMPLE is not set\n# CONFIG_USB_SERIAL_AIRCABLE is not set\n# CONFIG_USB_SERIAL_ARK3116 is not set\n# CONFIG_USB_SERIAL_BELKIN is not set\nCONFIG_USB_SERIAL_CH341=m\n# CONFIG_USB_SERIAL_WHITEHEAT is not set\n# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set\nCONFIG_USB_SERIAL_CP210X=m\n# CONFIG_USB_SERIAL_CYPRESS_M8 is not set\n# CONFIG_USB_SERIAL_EMPEG is not set\nCONFIG_USB_SERIAL_FTDI_SIO=m\n# CONFIG_USB_SERIAL_VISOR is not set\n# CONFIG_USB_SERIAL_IPAQ is not set\n# CONFIG_USB_SERIAL_IR is not set\n# CONFIG_USB_SERIAL_EDGEPORT is not set\n# CONFIG_USB_SERIAL_EDGEPORT_TI is not set\n# CONFIG_USB_SERIAL_F81232 is not set\n# CONFIG_USB_SERIAL_F8153X is not set\n# CONFIG_USB_SERIAL_GARMIN is not set\n# CONFIG_USB_SERIAL_IPW is not set\nCONFIG_USB_SERIAL_IUU=m\n# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set\n# CONFIG_USB_SERIAL_KEYSPAN is not set\n# CONFIG_USB_SERIAL_KLSI is not set\n# CONFIG_USB_SERIAL_KOBIL_SCT is not set\n# CONFIG_USB_SERIAL_MCT_U232 is not set\n# CONFIG_USB_SERIAL_METRO is not set\n# CONFIG_USB_SERIAL_MOS7720 is not set\n# CONFIG_USB_SERIAL_MOS7840 is not set\n# CONFIG_USB_SERIAL_MXUPORT is not set\n# CONFIG_USB_SERIAL_NAVMAN is not set\nCONFIG_USB_SERIAL_PL2303=m\n# CONFIG_USB_SERIAL_OTI6858 is not set\n# CONFIG_USB_SERIAL_QCAUX is not set\n# CONFIG_USB_SERIAL_QUALCOMM is not set\n# CONFIG_USB_SERIAL_SPCP8X5 is not set\n# CONFIG_USB_SERIAL_SAFE is not set\n# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set\n# CONFIG_USB_SERIAL_SYMBOL is not set\n# CONFIG_USB_SERIAL_TI is not set\n# CONFIG_USB_SERIAL_CYBERJACK is not set\n# CONFIG_USB_SERIAL_OPTION is not set\n# CONFIG_USB_SERIAL_OMNINET is not set\n# CONFIG_USB_SERIAL_OPTICON is not set\n# CONFIG_USB_SERIAL_XSENS_MT is not set\n# CONFIG_USB_SERIAL_WISHBONE is not set\n# CONFIG_USB_SERIAL_SSU100 is not set\n# CONFIG_USB_SERIAL_QT2 is not set\n# CONFIG_USB_SERIAL_UPD78F0730 is not set\n# CONFIG_USB_SERIAL_XR is not set\n# CONFIG_USB_SERIAL_DEBUG is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\n# CONFIG_USB_EZUSB_FX2 is not set\n# CONFIG_USB_HUB_USB251XB is not set\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\nCONFIG_USB_ONBOARD_HUB=y\n\n#\n# USB Physical Layer drivers\n#\n# CONFIG_NOP_USB_XCEIV is not set\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\nCONFIG_USB_ULPI=y\nCONFIG_USB_ULPI_VIEWPORT=y\n# end of USB Physical Layer drivers\n\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\n# CONFIG_USB_GADGET_DEBUG_FILES is not set\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=2\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\n# CONFIG_USB_SNP_UDC_PLAT is not set\n# CONFIG_USB_M66592 is not set\n# CONFIG_USB_BDC_UDC is not set\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_GADGET_XILINX is not set\n# CONFIG_USB_MAX3420_UDC is not set\n# CONFIG_USB_DUMMY_HCD is not set\n# end of USB Peripheral Controller\n\n# CONFIG_USB_CONFIGFS is not set\n\n#\n# USB Gadget precomposed configurations\n#\n# CONFIG_USB_ZERO is not set\n# CONFIG_USB_AUDIO is not set\n# CONFIG_USB_ETH is not set\n# CONFIG_USB_G_NCM is not set\n# CONFIG_USB_GADGETFS is not set\n# CONFIG_USB_FUNCTIONFS is not set\n# CONFIG_USB_MASS_STORAGE is not set\n# CONFIG_USB_G_SERIAL is not set\n# CONFIG_USB_MIDI_GADGET is not set\n# CONFIG_USB_G_PRINTER is not set\n# CONFIG_USB_CDC_COMPOSITE is not set\n# CONFIG_USB_G_ACM_MS is not set\n# CONFIG_USB_G_MULTI is not set\n# CONFIG_USB_G_HID is not set\n# CONFIG_USB_G_DBGP is not set\n# CONFIG_USB_G_WEBCAM is not set\n# CONFIG_USB_RAW_GADGET is not set\n# end of USB Gadget precomposed configurations\n\nCONFIG_TYPEC=m\nCONFIG_TYPEC_TCPM=m\nCONFIG_TYPEC_TCPCI=m\n# CONFIG_TYPEC_RT1711H is not set\n# CONFIG_TYPEC_TCPCI_MAXIM is not set\nCONFIG_TYPEC_FUSB302=m\nCONFIG_TYPEC_UCSI=m\n# CONFIG_UCSI_CCG is not set\n# CONFIG_UCSI_STM32G0 is not set\n# CONFIG_TYPEC_TPS6598X is not set\n# CONFIG_TYPEC_ANX7411 is not set\n# CONFIG_TYPEC_RT1719 is not set\n# CONFIG_TYPEC_HD3SS3220 is not set\n# CONFIG_TYPEC_STUSB160X is not set\n# CONFIG_TYPEC_WUSB3801 is not set\n\n#\n# USB Type-C Multiplexer/DeMultiplexer Switch support\n#\n# CONFIG_TYPEC_MUX_FSA4480 is not set\n# CONFIG_TYPEC_MUX_PI3USB30532 is not set\n# end of USB Type-C Multiplexer/DeMultiplexer Switch support\n\n#\n# USB Type-C Alternate Mode drivers\n#\n# CONFIG_TYPEC_DP_ALTMODE is not set\n# end of USB Type-C Alternate Mode drivers\n\nCONFIG_USB_ROLE_SWITCH=y\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_DEBUG is not set\n# CONFIG_MMC_ARMMMCI is not set\n# CONFIG_MMC_SDHCI is not set\nCONFIG_MMC_MESON_GX=y\n# CONFIG_MMC_MESON_MX_SDIO is not set\n# CONFIG_MMC_TIFM_SD is not set\nCONFIG_MMC_SPI=y\n# CONFIG_MMC_CB710 is not set\n# CONFIG_MMC_VIA_SDMMC is not set\n# CONFIG_MMC_DW is not set\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\n# CONFIG_MMC_CQHCI is not set\n# CONFIG_MMC_HSQ is not set\n# CONFIG_MMC_TOSHIBA_PCI is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\n# CONFIG_LEDS_CLASS_FLASH is not set\n# CONFIG_LEDS_CLASS_MULTICOLOR is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AN30259A is not set\n# CONFIG_LEDS_AW2013 is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_EL15203000 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_LP55XX_COMMON is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\nCONFIG_LEDS_PWM=y\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\nCONFIG_LEDS_SYSCON=y\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_SPI_BYTE is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\n\n#\n# RGB LED drivers\n#\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\n# CONFIG_LEDS_TRIGGER_TIMER is not set\n# CONFIG_LEDS_TRIGGER_ONESHOT is not set\n# CONFIG_LEDS_TRIGGER_DISK is not set\n# CONFIG_LEDS_TRIGGER_MTD is not set\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\n# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set\nCONFIG_LEDS_TRIGGER_CPU=y\n# CONFIG_LEDS_TRIGGER_ACTIVITY is not set\nCONFIG_LEDS_TRIGGER_GPIO=y\nCONFIG_LEDS_TRIGGER_DEFAULT_ON=y\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\n# CONFIG_LEDS_TRIGGER_TRANSIENT is not set\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\n# CONFIG_LEDS_TRIGGER_PANIC is not set\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\n# CONFIG_LEDS_TRIGGER_AUDIO is not set\n# CONFIG_LEDS_TRIGGER_TTY is not set\n\n#\n# Simple LED drivers\n#\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_SUPPORT=y\n# CONFIG_EDAC is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\nCONFIG_RTC_DRV_HYM8563=m\n# CONFIG_RTC_DRV_MAX6900 is not set\n# CONFIG_RTC_DRV_NCT3018Y is not set\n# CONFIG_RTC_DRV_RK808 is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\nCONFIG_RTC_DRV_PCF8563=m\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n# CONFIG_RTC_DRV_S5M is not set\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\nCONFIG_RTC_DRV_DS3232=y\nCONFIG_RTC_DRV_DS3232_HWMON=y\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_OPTEE is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\nCONFIG_RTC_DRV_MESON_VRTC=m\n# CONFIG_RTC_DRV_PL030 is not set\nCONFIG_RTC_DRV_PL031=y\n# CONFIG_RTC_DRV_CADENCE is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\n# CONFIG_DMADEVICES is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\nCONFIG_UDMABUF=y\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\nCONFIG_DMABUF_HEAPS=y\n# CONFIG_DMABUF_SYSFS_STATS is not set\nCONFIG_DMABUF_HEAPS_SYSTEM=y\nCONFIG_DMABUF_HEAPS_CMA=y\n# end of DMABUF options\n\nCONFIG_AUXDISPLAY=y\n# CONFIG_HD44780 is not set\n# CONFIG_IMG_ASCII_LCD is not set\n# CONFIG_HT16K33 is not set\n# CONFIG_LCD2S is not set\nCONFIG_TM1628=m\n# CONFIG_CHARLCD_BL_OFF is not set\n# CONFIG_CHARLCD_BL_ON is not set\nCONFIG_CHARLCD_BL_FLASH=y\n# CONFIG_UIO is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\n# CONFIG_VIRTIO_MENU is not set\n# CONFIG_VDPA is not set\n# CONFIG_VHOST_MENU is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# end of Microsoft Hyper-V guest support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\nCONFIG_RTL8192U=m\nCONFIG_RTLLIB=m\nCONFIG_RTLLIB_CRYPTO_CCMP=m\nCONFIG_RTLLIB_CRYPTO_TKIP=m\nCONFIG_RTLLIB_CRYPTO_WEP=m\n# CONFIG_RTL8192E is not set\nCONFIG_RTL8723BS=m\nCONFIG_R8712U=m\nCONFIG_R8188EU=m\n# CONFIG_RTS5208 is not set\n# CONFIG_VT6655 is not set\n# CONFIG_VT6656 is not set\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16240 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7816 is not set\n# end of Analog to digital converters\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n# end of Analog digital bi-direction converters\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n# end of Direct Digital Synthesis\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n# end of Network Analyzer, Impedance Converters\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7854 is not set\n# end of Active energy metering IC\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S1210 is not set\n# end of Resolver to digital converters\n# end of IIO staging drivers\n\n# CONFIG_FB_SM750 is not set\nCONFIG_STAGING_MEDIA=y\n# CONFIG_VIDEO_MAX96712 is not set\nCONFIG_VIDEO_MESON_VDEC=m\n# CONFIG_STAGING_MEDIA_DEPRECATED is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_KS7010 is not set\n# CONFIG_PI433 is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_FIELDBUS_DEV is not set\n# CONFIG_QLGE is not set\n# CONFIG_VME_BUS is not set\n# CONFIG_GOLDFISH is not set\n# CONFIG_CHROME_PLATFORMS is not set\n# CONFIG_MELLANOX_PLATFORM is not set\n# CONFIG_SURFACE_PLATFORMS is not set\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Clock driver for ARM Reference designs\n#\n# CONFIG_CLK_ICST is not set\n# CONFIG_CLK_SP810 is not set\n# end of Clock driver for ARM Reference designs\n\n# CONFIG_LMK04832 is not set\n# CONFIG_COMMON_CLK_MAX9485 is not set\nCONFIG_COMMON_CLK_RK808=y\nCONFIG_COMMON_CLK_SCPI=y\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\n# CONFIG_COMMON_CLK_S2MPS11 is not set\n# CONFIG_COMMON_CLK_AXI_CLKGEN is not set\n# CONFIG_COMMON_CLK_XGENE is not set\nCONFIG_COMMON_CLK_PWM=y\n# CONFIG_COMMON_CLK_RS9_PCIE is not set\n# CONFIG_COMMON_CLK_VC5 is not set\n# CONFIG_COMMON_CLK_VC7 is not set\nCONFIG_COMMON_CLK_FIXED_MMIO=y\n\n#\n# Clock support for Amlogic platforms\n#\nCONFIG_COMMON_CLK_MESON_REGMAP=y\nCONFIG_COMMON_CLK_MESON_DUALDIV=y\nCONFIG_COMMON_CLK_MESON_MPLL=y\nCONFIG_COMMON_CLK_MESON_PHASE=y\nCONFIG_COMMON_CLK_MESON_PLL=y\nCONFIG_COMMON_CLK_MESON_SCLK_DIV=y\nCONFIG_COMMON_CLK_MESON_VID_PLL_DIV=y\nCONFIG_COMMON_CLK_MESON_AO_CLKC=y\nCONFIG_COMMON_CLK_MESON_EE_CLKC=y\nCONFIG_COMMON_CLK_MESON_CPU_DYNDIV=y\nCONFIG_COMMON_CLK_GXBB=y\nCONFIG_COMMON_CLK_AXG=y\nCONFIG_COMMON_CLK_AXG_AUDIO=y\nCONFIG_COMMON_CLK_G12A=y\n# end of Clock support for Amlogic platforms\n\n# CONFIG_XILINX_VCU is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\n# CONFIG_HWSPINLOCK is not set\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y\nCONFIG_FSL_ERRATUM_A008585=y\n# CONFIG_HISILICON_ERRATUM_161010101 is not set\nCONFIG_ARM64_ERRATUM_858921=y\n# CONFIG_MICROCHIP_PIT64B is not set\n# end of Clock Source drivers\n\nCONFIG_MAILBOX=y\nCONFIG_ARM_MHU=y\n# CONFIG_ARM_MHU_V2 is not set\nCONFIG_PLATFORM_MHU=y\n# CONFIG_PL320_MBOX is not set\n# CONFIG_ALTERA_MBOX is not set\n# CONFIG_MAILBOX_TEST is not set\nCONFIG_IOMMU_IOVA=y\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\nCONFIG_IOMMU_IO_PGTABLE=y\nCONFIG_IOMMU_IO_PGTABLE_LPAE=y\n# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set\n# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set\n# CONFIG_IOMMU_IO_PGTABLE_DART is not set\n# end of Generic IOMMU Pagetable Support\n\n# CONFIG_IOMMU_DEBUGFS is not set\nCONFIG_IOMMU_DEFAULT_DMA_STRICT=y\n# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set\n# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set\nCONFIG_OF_IOMMU=y\nCONFIG_IOMMU_DMA=y\n# CONFIG_ARM_SMMU is not set\n# CONFIG_ARM_SMMU_V3 is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\n# CONFIG_RPMSG_QCOM_GLINK_RPM is not set\n# CONFIG_RPMSG_VIRTIO is not set\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\nCONFIG_MESON_CANVAS=y\nCONFIG_MESON_CLK_MEASURE=y\nCONFIG_MESON_GX_SOCINFO=y\nCONFIG_MESON_GX_PM_DOMAINS=y\nCONFIG_MESON_EE_PM_DOMAINS=y\nCONFIG_MESON_SECURE_PM_DOMAINS=y\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\n# CONFIG_SOC_BRCMSTB is not set\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# CONFIG_QUICC_ENGINE is not set\n# CONFIG_FSL_RCPM is not set\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# fujitsu SoC drivers\n#\n# end of fujitsu SoC drivers\n\n#\n# i.MX SoC drivers\n#\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# CONFIG_LITEX_SOC_CONTROLLER is not set\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# end of Qualcomm SoC drivers\n\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=m\nCONFIG_DEVFREQ_GOV_PERFORMANCE=m\n# CONFIG_DEVFREQ_GOV_POWERSAVE is not set\n# CONFIG_DEVFREQ_GOV_USERSPACE is not set\n# CONFIG_DEVFREQ_GOV_PASSIVE is not set\n\n#\n# DEVFREQ Drivers\n#\n# CONFIG_PM_DEVFREQ_EVENT is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_FSA9480 is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_PTN5150 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\nCONFIG_EXTCON_USB_GPIO=y\n# CONFIG_EXTCON_USBC_TUSB320 is not set\n# CONFIG_MEMORY is not set\nCONFIG_IIO=y\nCONFIG_IIO_BUFFER=y\n# CONFIG_IIO_BUFFER_CB is not set\n# CONFIG_IIO_BUFFER_DMA is not set\n# CONFIG_IIO_BUFFER_DMAENGINE is not set\n# CONFIG_IIO_BUFFER_HW_CONSUMER is not set\nCONFIG_IIO_KFIFO_BUF=m\nCONFIG_IIO_TRIGGERED_BUFFER=m\n# CONFIG_IIO_CONFIGFS is not set\nCONFIG_IIO_TRIGGER=y\nCONFIG_IIO_CONSUMERS_PER_TRIGGER=2\n# CONFIG_IIO_SW_DEVICE is not set\n# CONFIG_IIO_SW_TRIGGER is not set\n# CONFIG_IIO_TRIGGERED_EVENT is not set\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADXL313_I2C is not set\n# CONFIG_ADXL313_SPI is not set\n# CONFIG_ADXL345_I2C is not set\n# CONFIG_ADXL345_SPI is not set\n# CONFIG_ADXL355_I2C is not set\n# CONFIG_ADXL355_SPI is not set\n# CONFIG_ADXL367_SPI is not set\n# CONFIG_ADXL367_I2C is not set\n# CONFIG_ADXL372_SPI is not set\n# CONFIG_ADXL372_I2C is not set\n# CONFIG_BMA180 is not set\n# CONFIG_BMA220 is not set\n# CONFIG_BMA400 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_BMI088_ACCEL is not set\n# CONFIG_DA280 is not set\n# CONFIG_DA311 is not set\n# CONFIG_DMARD06 is not set\n# CONFIG_DMARD09 is not set\n# CONFIG_DMARD10 is not set\n# CONFIG_FXLS8962AF_I2C is not set\n# CONFIG_FXLS8962AF_SPI is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MC3230 is not set\n# CONFIG_MMA7455_I2C is not set\n# CONFIG_MMA7455_SPI is not set\n# CONFIG_MMA7660 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MSA311 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_MXC6255 is not set\n# CONFIG_SCA3000 is not set\n# CONFIG_SCA3300 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7091R5 is not set\n# CONFIG_AD7124 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7266 is not set\n# CONFIG_AD7280 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7292 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7606_IFACE_PARALLEL is not set\n# CONFIG_AD7606_IFACE_SPI is not set\n# CONFIG_AD7766 is not set\n# CONFIG_AD7768_1 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD7949 is not set\n# CONFIG_AD799X is not set\n# CONFIG_ADI_AXI_ADC is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_ENVELOPE_DETECTOR is not set\n# CONFIG_HI8435 is not set\n# CONFIG_HX711 is not set\n# CONFIG_INA2XX_ADC is not set\n# CONFIG_LTC2471 is not set\n# CONFIG_LTC2485 is not set\n# CONFIG_LTC2496 is not set\n# CONFIG_LTC2497 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX11100 is not set\n# CONFIG_MAX1118 is not set\n# CONFIG_MAX11205 is not set\n# CONFIG_MAX1241 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MAX9611 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_MCP3911 is not set\nCONFIG_MESON_SARADC=y\n# CONFIG_NAU7802 is not set\n# CONFIG_QCOM_SPMI_IADC is not set\n# CONFIG_QCOM_SPMI_VADC is not set\n# CONFIG_QCOM_SPMI_ADC5 is not set\n# CONFIG_RICHTEK_RTQ6056 is not set\n# CONFIG_SD_ADC_MODULATOR is not set\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC0832 is not set\n# CONFIG_TI_ADC084S021 is not set\n# CONFIG_TI_ADC12138 is not set\n# CONFIG_TI_ADC108S102 is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_TI_ADC161S626 is not set\n# CONFIG_TI_ADS1015 is not set\n# CONFIG_TI_ADS7950 is not set\n# CONFIG_TI_ADS8344 is not set\n# CONFIG_TI_ADS8688 is not set\n# CONFIG_TI_ADS124S08 is not set\n# CONFIG_TI_ADS131E08 is not set\n# CONFIG_TI_TLC4541 is not set\n# CONFIG_TI_TSC2046 is not set\n# CONFIG_VF610_ADC is not set\n# CONFIG_XILINX_XADC is not set\n# end of Analog to digital converters\n\n#\n# Analog to digital and digital to analog converters\n#\n# CONFIG_AD74413R is not set\n# end of Analog to digital and digital to analog converters\n\n#\n# Analog Front Ends\n#\n# CONFIG_IIO_RESCALE is not set\n# end of Analog Front Ends\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n# CONFIG_ADA4250 is not set\n# CONFIG_HMC425 is not set\n# end of Amplifiers\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7746 is not set\n# end of Capacitance to digital converters\n\n#\n# Chemical Sensors\n#\n# CONFIG_ATLAS_PH_SENSOR is not set\n# CONFIG_ATLAS_EZO_SENSOR is not set\n# CONFIG_BME680 is not set\n# CONFIG_CCS811 is not set\n# CONFIG_IAQCORE is not set\n# CONFIG_PMS7003 is not set\n# CONFIG_SCD30_CORE is not set\n# CONFIG_SCD4X is not set\n# CONFIG_SENSIRION_SGP30 is not set\n# CONFIG_SENSIRION_SGP40 is not set\n# CONFIG_SPS30_I2C is not set\n# CONFIG_SPS30_SERIAL is not set\n# CONFIG_SENSEAIR_SUNRISE_CO2 is not set\n# CONFIG_VZ89X is not set\n# end of Chemical Sensors\n\n#\n# Hid Sensor IIO Common\n#\n# end of Hid Sensor IIO Common\n\n#\n# IIO SCMI Sensors\n#\n# end of IIO SCMI Sensors\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n# end of SSP Sensor Common\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD3552R is not set\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5592R is not set\n# CONFIG_AD5593R is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_LTC2688 is not set\n# CONFIG_AD5686_SPI is not set\n# CONFIG_AD5696_I2C is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5758 is not set\n# CONFIG_AD5761 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5766 is not set\n# CONFIG_AD5770R is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7293 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_AD8801 is not set\n# CONFIG_DPOT_DAC is not set\n# CONFIG_DS4424 is not set\n# CONFIG_LTC1660 is not set\n# CONFIG_LTC2632 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n# CONFIG_TI_DAC082S085 is not set\n# CONFIG_TI_DAC5571 is not set\n# CONFIG_TI_DAC7311 is not set\n# CONFIG_TI_DAC7612 is not set\n# CONFIG_VF610_DAC is not set\n# end of Digital to analog converters\n\n#\n# IIO dummy driver\n#\n# end of IIO dummy driver\n\n#\n# Filters\n#\n# CONFIG_ADMV8818 is not set\n# end of Filters\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n# end of Clock Generator/Distribution\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n# CONFIG_ADF4371 is not set\n# CONFIG_ADMV1013 is not set\n# CONFIG_ADMV1014 is not set\n# CONFIG_ADMV4420 is not set\n# CONFIG_ADRF6780 is not set\n# end of Phase-Locked Loop (PLL) frequency synthesizers\n# end of Frequency Synthesizers DDS/PLL\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS290 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_FXAS21002C is not set\n# CONFIG_MPU3050_I2C is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n# end of Digital gyroscope sensors\n\n#\n# Health Sensors\n#\n\n#\n# Heart Rate Monitors\n#\n# CONFIG_AFE4403 is not set\n# CONFIG_AFE4404 is not set\n# CONFIG_MAX30100 is not set\n# CONFIG_MAX30102 is not set\n# end of Heart Rate Monitors\n# end of Health Sensors\n\n#\n# Humidity sensors\n#\n# CONFIG_AM2315 is not set\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HDC2010 is not set\n# CONFIG_HTS221 is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n# end of Humidity sensors\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16460 is not set\n# CONFIG_ADIS16475 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_BMI160_I2C is not set\n# CONFIG_BMI160_SPI is not set\n# CONFIG_BOSCH_BNO055_SERIAL is not set\n# CONFIG_BOSCH_BNO055_I2C is not set\n# CONFIG_FXOS8700_I2C is not set\n# CONFIG_FXOS8700_SPI is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_ICM42600_I2C is not set\n# CONFIG_INV_ICM42600_SPI is not set\n# CONFIG_INV_MPU6050_I2C is not set\n# CONFIG_INV_MPU6050_SPI is not set\n# CONFIG_IIO_ST_LSM6DSX is not set\n# CONFIG_IIO_ST_LSM9DS0 is not set\n# end of Inertial measurement units\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_ADUX1020 is not set\n# CONFIG_AL3010 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_AS73211 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_BH1780 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM3605 is not set\n# CONFIG_CM36651 is not set\n# CONFIG_GP2AP002 is not set\n# CONFIG_GP2AP020A00F is not set\n# CONFIG_SENSORS_ISL29018 is not set\n# CONFIG_SENSORS_ISL29028 is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_LTRF216A is not set\n# CONFIG_LV0104CS is not set\n# CONFIG_MAX44000 is not set\n# CONFIG_MAX44009 is not set\n# CONFIG_NOA1305 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_SI1133 is not set\n# CONFIG_SI1145 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_ST_UVIS25 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\n# CONFIG_SENSORS_TSL2563 is not set\n# CONFIG_TSL2583 is not set\n# CONFIG_TSL2591 is not set\n# CONFIG_TSL2772 is not set\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VCNL4035 is not set\n# CONFIG_VEML6030 is not set\n# CONFIG_VEML6070 is not set\n# CONFIG_VL6180 is not set\n# CONFIG_ZOPT2201 is not set\n# end of Light sensors\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8974 is not set\n# CONFIG_AK8975 is not set\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN_I2C is not set\n# CONFIG_BMC150_MAGN_SPI is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n# CONFIG_SENSORS_RM3100_I2C is not set\n# CONFIG_SENSORS_RM3100_SPI is not set\n# CONFIG_YAMAHA_YAS530 is not set\n# end of Magnetometer sensors\n\n#\n# Multiplexers\n#\n# CONFIG_IIO_MUX is not set\n# end of Multiplexers\n\n#\n# Inclinometer sensors\n#\n# end of Inclinometer sensors\n\n#\n# Triggers - standalone\n#\n# CONFIG_IIO_INTERRUPT_TRIGGER is not set\n# CONFIG_IIO_SYSFS_TRIGGER is not set\n# end of Triggers - standalone\n\n#\n# Linear and angular position sensors\n#\n# end of Linear and angular position sensors\n\n#\n# Digital potentiometers\n#\n# CONFIG_AD5110 is not set\n# CONFIG_AD5272 is not set\n# CONFIG_DS1803 is not set\n# CONFIG_MAX5432 is not set\n# CONFIG_MAX5481 is not set\n# CONFIG_MAX5487 is not set\n# CONFIG_MCP4018 is not set\n# CONFIG_MCP4131 is not set\n# CONFIG_MCP4531 is not set\n# CONFIG_MCP41010 is not set\n# CONFIG_TPL0102 is not set\n# end of Digital potentiometers\n\n#\n# Digital potentiostats\n#\n# CONFIG_LMP91000 is not set\n# end of Digital potentiostats\n\n#\n# Pressure sensors\n#\n# CONFIG_ABP060MG is not set\n# CONFIG_BMP280 is not set\n# CONFIG_DLHL60D is not set\n# CONFIG_DPS310 is not set\n# CONFIG_HP03 is not set\n# CONFIG_ICP10100 is not set\n# CONFIG_MPL115_I2C is not set\n# CONFIG_MPL115_SPI is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n# CONFIG_HP206C is not set\n# CONFIG_ZPA2326 is not set\n# end of Pressure sensors\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n# end of Lightning sensors\n\n#\n# Proximity and distance sensors\n#\n# CONFIG_ISL29501 is not set\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_MB1232 is not set\n# CONFIG_PING is not set\n# CONFIG_RFD77402 is not set\n# CONFIG_SRF04 is not set\n# CONFIG_SX9310 is not set\n# CONFIG_SX9324 is not set\n# CONFIG_SX9360 is not set\n# CONFIG_SX9500 is not set\n# CONFIG_SRF08 is not set\n# CONFIG_VCNL3020 is not set\n# CONFIG_VL53L0X_I2C is not set\n# end of Proximity and distance sensors\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1200 is not set\n# end of Resolver to digital converters\n\n#\n# Temperature sensors\n#\n# CONFIG_LTC2983 is not set\n# CONFIG_MAXIM_THERMOCOUPLE is not set\n# CONFIG_MLX90614 is not set\n# CONFIG_MLX90632 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TMP007 is not set\n# CONFIG_TMP117 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\n# CONFIG_MAX31856 is not set\n# CONFIG_MAX31865 is not set\n# end of Temperature sensors\n\n# CONFIG_NTB is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_DEBUG is not set\n# CONFIG_PWM_ATMEL_TCB is not set\n# CONFIG_PWM_CLK is not set\n# CONFIG_PWM_DWC is not set\n# CONFIG_PWM_FSL_FTM is not set\nCONFIG_PWM_MESON=y\n# CONFIG_PWM_PCA9685 is not set\n# CONFIG_PWM_XILINX is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\nCONFIG_ARM_GIC_V2M=y\nCONFIG_ARM_GIC_V3=y\nCONFIG_ARM_GIC_V3_ITS=y\nCONFIG_ARM_GIC_V3_ITS_PCI=y\n# CONFIG_AL_FIC is not set\n# CONFIG_XILINX_INTC is not set\nCONFIG_PARTITION_PERCPU=y\nCONFIG_MESON_IRQ_GPIO=y\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\nCONFIG_RESET_CONTROLLER=y\nCONFIG_RESET_MESON=y\nCONFIG_RESET_MESON_AUDIO_ARB=y\n# CONFIG_RESET_SIMPLE is not set\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_RESET_TI_TPS380X is not set\n\n#\n# PHY Subsystem\n#\nCONFIG_GENERIC_PHY=y\nCONFIG_GENERIC_PHY_MIPI_DPHY=y\n# CONFIG_PHY_XGENE is not set\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\nCONFIG_PHY_MESON8B_USB2=y\nCONFIG_PHY_MESON_GXL_USB2=y\nCONFIG_PHY_MESON_G12A_MIPI_DPHY_ANALOG=y\nCONFIG_PHY_MESON_G12A_USB2=y\nCONFIG_PHY_MESON_G12A_USB3_PCIE=y\nCONFIG_PHY_MESON_AXG_PCIE=y\nCONFIG_PHY_MESON_AXG_MIPI_PCIE_ANALOG=y\nCONFIG_PHY_MESON_AXG_MIPI_DPHY=y\n\n#\n# PHY drivers for Broadcom platforms\n#\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# end of PHY drivers for Broadcom platforms\n\n# CONFIG_PHY_CADENCE_TORRENT is not set\n# CONFIG_PHY_CADENCE_DPHY is not set\n# CONFIG_PHY_CADENCE_DPHY_RX is not set\n# CONFIG_PHY_CADENCE_SIERRA is not set\n# CONFIG_PHY_CADENCE_SALVO is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_LAN966X_SERDES is not set\n# CONFIG_PHY_CPCAP_USB is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\n# CONFIG_PHY_OCELOT_SERDES is not set\n# CONFIG_PHY_SAMSUNG_USB2 is not set\n# end of PHY Subsystem\n\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\n# CONFIG_ARM_CMN is not set\n# CONFIG_ARM_PMU is not set\n# CONFIG_ARM_DSU_PMU is not set\n# CONFIG_ARM_SPE_PMU is not set\n# CONFIG_HISI_PCIE_PMU is not set\n# CONFIG_HNS3_PMU is not set\n# end of Performance monitor support\n\nCONFIG_RAS=y\n# CONFIG_USB4 is not set\n\n#\n# Android\n#\n# CONFIG_ANDROID_BINDER_IPC is not set\n# end of Android\n\n# CONFIG_LIBNVDIMM is not set\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\nCONFIG_NVMEM_MESON_EFUSE=y\n# CONFIG_NVMEM_MESON_MX_EFUSE is not set\n# CONFIG_NVMEM_RMEM is not set\n# CONFIG_NVMEM_SPMI_SDAM is not set\n# CONFIG_NVMEM_U_BOOT_ENV is not set\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# CONFIG_HISI_PTT is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\nCONFIG_TEE=y\nCONFIG_OPTEE=y\nCONFIG_MULTIPLEXER=y\n\n#\n# Multiplexer drivers\n#\n# CONFIG_MUX_ADG792A is not set\n# CONFIG_MUX_ADGS1408 is not set\n# CONFIG_MUX_GPIO is not set\n# CONFIG_MUX_MMIO is not set\n# end of Multiplexer drivers\n\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\n# CONFIG_PECI is not set\n# CONFIG_HTE is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_VALIDATE_FS_PARSER=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\nCONFIG_XFS_SUPPORT_V4=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\nCONFIG_F2FS_FS=m\nCONFIG_F2FS_STAT_FS=y\n# CONFIG_F2FS_FS_XATTR is not set\nCONFIG_F2FS_CHECK_FS=y\n# CONFIG_F2FS_FAULT_INJECTION is not set\n# CONFIG_F2FS_FS_COMPRESSION is not set\nCONFIG_F2FS_IOSTAT=y\n# CONFIG_F2FS_UNFAIR_RWSEM is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\n# CONFIG_QUOTA is not set\nCONFIG_AUTOFS4_FS=y\nCONFIG_AUTOFS_FS=y\nCONFIG_FUSE_FS=m\n# CONFIG_CUSE is not set\n# CONFIG_VIRTIO_FS is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_XINO_AUTO is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n\n#\n# Caches\n#\nCONFIG_NETFS_SUPPORT=y\n# CONFIG_NETFS_STATS is not set\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_CACHEFILES is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=y\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=m\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=m\n# CONFIG_NTFS3_64BIT_CLUSTER is not set\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\n# CONFIG_PROC_KCORE is not set\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_TMPFS_INODE64 is not set\nCONFIG_ARCH_SUPPORTS_HUGETLBFS=y\n# CONFIG_HUGETLBFS is not set\nCONFIG_MEMFD_CREATE=y\nCONFIG_ARCH_HAS_GIGANTIC_PAGE=y\nCONFIG_CONFIGFS_FS=y\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\nCONFIG_HFS_FS=m\nCONFIG_HFSPLUS_FS=m\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_JFFS2_FS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\n# CONFIG_SQUASHFS_FILE_CACHE is not set\nCONFIG_SQUASHFS_FILE_DIRECT=y\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\n# CONFIG_PSTORE is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EROFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\nCONFIG_NFS_SWAP=y\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\nCONFIG_NFS_V4_1_MIGRATION=y\nCONFIG_ROOT_NFS=y\nCONFIG_NFS_FSCACHE=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFS_DISABLE_UDP_SUPPORT=y\n# CONFIG_NFS_V4_2_READ_PLUS is not set\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_COMMON=y\nCONFIG_NFS_V4_2_SSC_HELPER=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\nCONFIG_SUNRPC_SWAP=y\nCONFIG_RPCSEC_GSS_KRB5=m\n# CONFIG_SUNRPC_DISABLE_INSECURE_ENCTYPES is not set\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS2=y\nCONFIG_CIFS_ALLOW_INSECURE_LEGACY=y\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\nCONFIG_CIFS_DEBUG=y\n# CONFIG_CIFS_DEBUG2 is not set\n# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\n# CONFIG_CIFS_SWN_UPCALL is not set\nCONFIG_CIFS_FSCACHE=y\n# CONFIG_CIFS_ROOT is not set\n# CONFIG_SMB_SERVER is not set\nCONFIG_SMBFS_COMMON=y\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_KEYS_REQUEST_CACHE is not set\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_BIG_KEYS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\nCONFIG_KEY_DH_OPERATIONS=y\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY is not set\n# CONFIG_SECURITYFS is not set\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_LSM=\"yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_GCC_PLUGIN_STACKLEAK is not set\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n\nCONFIG_RANDSTRUCT_NONE=y\n# CONFIG_RANDSTRUCT_FULL is not set\n# CONFIG_RANDSTRUCT_PERFORMANCE is not set\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\nCONFIG_CRYPTO_PCRYPT=y\nCONFIG_CRYPTO_CRYPTD=y\n# CONFIG_CRYPTO_AUTHENC is not set\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_ENGINE=y\n# end of Crypto core or helper\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_DH=y\n# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set\nCONFIG_CRYPTO_ECC=m\nCONFIG_CRYPTO_ECDH=m\n# CONFIG_CRYPTO_ECDSA is not set\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\n# CONFIG_CRYPTO_CURVE25519 is not set\n# end of Public-key cryptography\n\n#\n# Block ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\n# CONFIG_CRYPTO_ARIA is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\nCONFIG_CRYPTO_SM4=y\n# CONFIG_CRYPTO_SM4_GENERIC is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n# end of Block ciphers\n\n#\n# Length-preserving ciphers and modes\n#\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_ARC4 is not set\nCONFIG_CRYPTO_CHACHA20=y\nCONFIG_CRYPTO_CBC=y\nCONFIG_CRYPTO_CFB=m\nCONFIG_CRYPTO_CTR=y\nCONFIG_CRYPTO_CTS=m\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_HCTR2 is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_OFB is not set\n# CONFIG_CRYPTO_PCBC is not set\n# CONFIG_CRYPTO_XTS is not set\nCONFIG_CRYPTO_NHPOLY1305=y\n# end of Length-preserving ciphers and modes\n\n#\n# AEAD (authenticated encryption with associated data) ciphers\n#\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=m\n# CONFIG_CRYPTO_ESSIV is not set\n# end of AEAD (authenticated encryption with associated data) ciphers\n\n#\n# Hashes, digests, and MACs\n#\nCONFIG_CRYPTO_BLAKE2B=m\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\nCONFIG_CRYPTO_MICHAEL_MIC=m\nCONFIG_CRYPTO_POLYVAL=y\n# CONFIG_CRYPTO_POLY1305 is not set\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\nCONFIG_CRYPTO_SM3=y\n# CONFIG_CRYPTO_SM3_GENERIC is not set\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_VMAC is not set\n# CONFIG_CRYPTO_WP512 is not set\n# CONFIG_CRYPTO_XCBC is not set\nCONFIG_CRYPTO_XXHASH=y\n# end of Hashes, digests, and MACs\n\n#\n# CRCs (cyclic redundancy checks)\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=y\nCONFIG_CRYPTO_CRCT10DIF=y\nCONFIG_CRYPTO_CRC64_ROCKSOFT=y\n# end of CRCs (cyclic redundancy checks)\n\n#\n# Compression\n#\n# CONFIG_CRYPTO_DEFLATE is not set\n# CONFIG_CRYPTO_LZO is not set\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n# end of Compression\n\n#\n# Random number generation\n#\nCONFIG_CRYPTO_ANSI_CPRNG=y\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_KDF800108_CTR=y\n# end of Random number generation\n\n#\n# Userspace interface\n#\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\n# CONFIG_CRYPTO_USER_API_AEAD is not set\nCONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y\n# end of Userspace interface\n\nCONFIG_CRYPTO_HASH_INFO=y\nCONFIG_CRYPTO_NHPOLY1305_NEON=y\nCONFIG_CRYPTO_CHACHA20_NEON=y\n\n#\n# Accelerated Cryptographic Algorithms for CPU (arm64)\n#\nCONFIG_CRYPTO_GHASH_ARM64_CE=y\nCONFIG_CRYPTO_POLY1305_NEON=y\nCONFIG_CRYPTO_SHA1_ARM64_CE=y\nCONFIG_CRYPTO_SHA256_ARM64=y\nCONFIG_CRYPTO_SHA2_ARM64_CE=y\nCONFIG_CRYPTO_SHA512_ARM64=y\nCONFIG_CRYPTO_SHA512_ARM64_CE=y\n# CONFIG_CRYPTO_SHA3_ARM64 is not set\n# CONFIG_CRYPTO_SM3_NEON is not set\nCONFIG_CRYPTO_SM3_ARM64_CE=y\nCONFIG_CRYPTO_POLYVAL_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64=y\nCONFIG_CRYPTO_AES_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64_CE_BLK=y\nCONFIG_CRYPTO_AES_ARM64_NEON_BLK=y\nCONFIG_CRYPTO_AES_ARM64_BS=y\n# CONFIG_CRYPTO_SM4_ARM64_CE is not set\nCONFIG_CRYPTO_SM4_ARM64_CE_BLK=y\nCONFIG_CRYPTO_SM4_ARM64_NEON_BLK=y\nCONFIG_CRYPTO_AES_ARM64_CE_CCM=y\nCONFIG_CRYPTO_CRCT10DIF_ARM64_CE=y\n# end of Accelerated Cryptographic Algorithms for CPU (arm64)\n\nCONFIG_CRYPTO_HW=y\n# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set\n# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set\n# CONFIG_CRYPTO_DEV_CCP is not set\n# CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set\n# CONFIG_CRYPTO_DEV_QAT_C3XXX is not set\n# CONFIG_CRYPTO_DEV_QAT_C62X is not set\n# CONFIG_CRYPTO_DEV_QAT_4XXX is not set\n# CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set\n# CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set\n# CONFIG_CRYPTO_DEV_QAT_C62XVF is not set\n# CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set\n# CONFIG_CRYPTO_DEV_CAVIUM_ZIP is not set\n# CONFIG_CRYPTO_DEV_SAFEXCEL is not set\n# CONFIG_CRYPTO_DEV_CCREE is not set\n# CONFIG_CRYPTO_DEV_HISI_SEC is not set\nCONFIG_CRYPTO_DEV_AMLOGIC_GXL=y\n# CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n# CONFIG_FIPS_SIGNATURE_SELFTEST is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\n# CONFIG_RAID6_PQ_BENCHMARK is not set\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_CORDIC=m\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_ARCH_HAS_FAST_MULTIPLIER=y\nCONFIG_ARCH_USE_SYM_ANNOTATIONS=y\n# CONFIG_INDIRECT_PIO is not set\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_UTILS=y\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=m\nCONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CHACHA_GENERIC=y\nCONFIG_CRYPTO_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=y\nCONFIG_CRYPTO_LIB_CURVE25519=y\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_POLY1305_GENERIC=y\nCONFIG_CRYPTO_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=y\nCONFIG_CRYPTO_LIB_SHA1=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_CRC_CCITT=m\nCONFIG_CRC16=y\nCONFIG_CRC_T10DIF=y\nCONFIG_CRC64_ROCKSOFT=y\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\nCONFIG_CRC64=y\n# CONFIG_CRC4 is not set\nCONFIG_CRC7=y\nCONFIG_LIBCRC32C=m\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=y\nCONFIG_AUDIT_ARCH_COMPAT_GENERIC=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=m\nCONFIG_LZO_COMPRESS=m\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMMON=y\nCONFIG_ZSTD_COMPRESS=m\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\n# CONFIG_XZ_DEC_X86 is not set\n# CONFIG_XZ_DEC_POWERPC is not set\n# CONFIG_XZ_DEC_IA64 is not set\n# CONFIG_XZ_DEC_ARM is not set\n# CONFIG_XZ_DEC_ARMTHUMB is not set\n# CONFIG_XZ_DEC_SPARC is not set\n# CONFIG_XZ_DEC_MICROLZMA is not set\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_DMA_OPS=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_DMA_DECLARE_COHERENT=y\nCONFIG_ARCH_HAS_SETUP_DMA_OPS=y\nCONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y\nCONFIG_ARCH_HAS_DMA_PREP_COHERENT=y\nCONFIG_SWIOTLB=y\n# CONFIG_DMA_RESTRICTED_POOL is not set\nCONFIG_DMA_NONCOHERENT_MMAP=y\nCONFIG_DMA_COHERENT_POOL=y\nCONFIG_DMA_DIRECT_REMAP=y\nCONFIG_DMA_CMA=y\n# CONFIG_DMA_PERNUMA_CMA is not set\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=256\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\n# CONFIG_FORCE_NR_CPUS is not set\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_GENERIC_VDSO_TIME_NS=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\nCONFIG_SG_POOL=y\nCONFIG_ARCH_STACKWALK=y\nCONFIG_STACKDEPOT=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_GENERIC_IOREMAP=y\nCONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\n# CONFIG_STACKTRACE_BUILD_ID is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\nCONFIG_DYNAMIC_DEBUG_CORE=y\nCONFIG_SYMBOLIC_ERRNAME=y\nCONFIG_DEBUG_BUGVERBOSE=y\n# end of printk and dmesg options\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_AS_HAS_NON_CONST_LEB128=y\nCONFIG_DEBUG_INFO_NONE=y\n# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\nCONFIG_FRAME_WARN=2048\nCONFIG_STRIP_ASM_SYMS=y\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\n# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B is not set\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_VMLINUX_MAP is not set\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=\"\"\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\nCONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_ARCH_KCSAN=y\nCONFIG_HAVE_KCSAN_COMPILER=y\n# CONFIG_KCSAN is not set\n# end of Generic Kernel Debugging Instruments\n\n#\n# Networking Debugging\n#\n# CONFIG_NET_DEV_REFCNT_TRACKER is not set\n# CONFIG_NET_NS_REFCNT_TRACKER is not set\n# CONFIG_DEBUG_NET is not set\n# end of Networking Debugging\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_TABLE_CHECK is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\nCONFIG_ARCH_HAS_DEBUG_WX=y\n# CONFIG_DEBUG_WX is not set\nCONFIG_GENERIC_PTDUMP=y\n# CONFIG_PTDUMP_DEBUGFS is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SHRINKER_DEBUG is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\nCONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y\n# CONFIG_DEBUG_VM is not set\n# CONFIG_DEBUG_VM_PGTABLE is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\n# CONFIG_DEBUG_MEMORY_INIT is not set\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_SW_TAGS=y\nCONFIG_HAVE_ARCH_KASAN_HW_TAGS=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_KASAN_SW_TAGS=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\n# CONFIG_SOFTLOCKUP_DETECTOR is not set\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\n# CONFIG_SCHED_DEBUG is not set\n# CONFIG_SCHEDSTATS is not set\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\nCONFIG_DEBUG_PREEMPT=y\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\nCONFIG_DEBUG_RT_MUTEXES=y\nCONFIG_DEBUG_SPINLOCK=y\nCONFIG_DEBUG_MUTEXES=y\nCONFIG_DEBUG_WW_MUTEX_SLOWPATH=y\nCONFIG_DEBUG_RWSEMS=y\nCONFIG_DEBUG_LOCK_ALLOC=y\nCONFIG_LOCKDEP=y\nCONFIG_LOCKDEP_BITS=15\nCONFIG_LOCKDEP_CHAINS_BITS=16\nCONFIG_LOCKDEP_STACK_TRACE_BITS=19\nCONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14\nCONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS=12\n# CONFIG_DEBUG_LOCKDEP is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# CONFIG_CSD_LOCK_WAIT_DEBUG is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_DEBUG_MAPLE_TREE is not set\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\nCONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACING_SUPPORT=y\n# CONFIG_FTRACE is not set\n# CONFIG_SAMPLES is not set\n# CONFIG_STRICT_DEVMEM is not set\n\n#\n# arm64 Debugging\n#\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_ARM64_RELOC_TEST is not set\n# CONFIG_CORESIGHT is not set\n# end of arm64 Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\n# CONFIG_RUNTIME_TESTING_MENU is not set\nCONFIG_ARCH_USE_MEMTEST=y\n# CONFIG_MEMTEST is not set\n# end of Kernel Testing and Coverage\n\n#\n# Rust hacking\n#\n# end of Rust hacking\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/Amlogic/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # Bootloader to use (syslinux / u-boot / bcm2835-bootloader)\n    BOOTLOADER=\"u-boot\"\n\n  # U-Boot firmware package(s) to use\n    UBOOT_FIRMWARE=\"amlogic-boot-fip u-boot-script\"\n\n  # Kernel to use\n    LINUX=\"amlogic\"\n\n  # Kernel target\n    KERNEL_TARGET=\"uImage.lzo\"\n\n  # Kernel uImage load address\n    KERNEL_UIMAGE_LOADADDR=\"0x1080000\"\n\n  # Kernel uImage entry address\n    KERNEL_UIMAGE_ENTRYADDR=\"0x1080000\"\n\n  # Additional kernel make parameters\n    KERNEL_MAKE_EXTRACMD=\"dtbs\"\n\n  # kernel serial console\n    EXTRA_CMDLINE=\"systemd.debug_shell=ttyAML0 console=ttyAML0,115200n8 console=tty0\"\n\n################################################################################\n# setup build defaults\n################################################################################\n\n  # Project CFLAGS\n    PROJECT_CFLAGS=\"\"\n\n  # SquashFS compression method (gzip / lzo / xz / zstd)\n    SQUASHFS_COMPRESSION=\"zstd\"\n\n################################################################################\n# setup project defaults\n################################################################################\n\n  # OpenGL(X) implementation to use (no / mesa)\n    OPENGL=\"no\"\n\n  # Vulkan implementation to use (vulkan-loader / no)\n    VULKAN=\"no\"\n\n  # Displayserver to use (wl / no)\n    DISPLAYSERVER=\"no\"\n\n  # Windowmanager to use (weston / no)\n    WINDOWMANAGER=\"no\"\n\n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"dvb-firmware brcmfmac_sdio-firmware kernel-firmware\"\n\n  # build with installer (yes / no)\n    INSTALLER_SUPPORT=\"no\"\n\n  # additional drivers to install:\n  # for a list of additional drivers see packages/linux-drivers\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_DRIVERS+=\" DRIVER1 DRIVER2\"\n    ADDITIONAL_DRIVERS+=\"\"\n\n  # build and install driver addons (yes / no)\n    DRIVER_ADDONS_SUPPORT=\"no\"\n\n  # driver addons to install:\n  # for a list of additional drivers see packages/linux-driver-addons\n  # Space separated list is supported,\n    DRIVER_ADDONS=\"crazycat dvb-latest\"\n\n  # additional packages to install:\n    ADDITIONAL_PACKAGES+=\" dtc ethmactool emmctool flashrom pciutils\"\n\n  # use the kernel CEC framework for libcec (yes / no)\n    CEC_FRAMEWORK_SUPPORT=\"yes\"\n\n  # debug tty path\n    DEBUG_TTY=\"/dev/ttyAML0\"\n"
  },
  {
    "path": "projects/Amlogic/packages/systemd/scripts/cpufreq",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nSYS_CPUFREQ_GOV=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)\n\nif [ \"${SYS_CPUFREQ_GOV}\" = \"ondemand\" ]; then\n  for io_is_busy in $(find /sys/devices/system/cpu -name io_is_busy); do\n    echo 1 > \"${io_is_busy}\"\n  done\n  for up_threshold in $(find /sys/devices/system/cpu -name up_threshold); do\n    echo 50 > \"${up_threshold}\"\n  done\n  for sampling_rate in $(find /sys/devices/system/cpu -name sampling_rate); do\n    echo 100000 > \"${sampling_rate}\"\n  done\n  for sampling_down_factor in $(find /sys/devices/system/cpu -name sampling_down_factor); do\n    echo 50 > \"${sampling_down_factor}\"\n  done\nelse\n  echo \"cpufreq: settings not found for current cpu governor.\" | systemd-cat -p info\nfi\n"
  },
  {
    "path": "projects/Amlogic/patches/alsa-lib/amlogic-0001-WIP-add-confs-for-gx-sound-card-and-axg-sound-card.patch",
    "content": "From 34dbf4272c3036a7e8b208ad8dc35a035918af66 Mon Sep 17 00:00:00 2001\nFrom: chewitt <christianshewitt@gmail.com>\nDate: Thu, 14 May 2020 13:31:34 +0000\nSubject: [PATCH 1/2] WIP: add confs for gx-sound-card and axg-sound-card\n\n---\n src/conf/cards/axg-sound-card.conf | 87 ++++++++++++++++++++++++++++++\n src/conf/cards/gx-sound-card.conf  | 87 ++++++++++++++++++++++++++++++\n 2 files changed, 174 insertions(+)\n create mode 100644 src/conf/cards/axg-sound-card.conf\n create mode 100644 src/conf/cards/gx-sound-card.conf\n\ndiff --git a/src/conf/cards/axg-sound-card.conf b/src/conf/cards/axg-sound-card.conf\nnew file mode 100644\nindex 00000000..f3caaed0\n--- /dev/null\n+++ b/src/conf/cards/axg-sound-card.conf\n@@ -0,0 +1,87 @@\n+# SPDX-License-Identifier: GPL-2.0\n+# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n+\n+#\n+# Configuration for Amlogic AXG audio\n+#\n+\n+axg-sound-card.pcm.default {\n+\t@args [ CARD ]\n+\t@args.CARD { type string }\n+\ttype softvol\n+\tslave.pcm {\n+\t\ttype plug\n+\t\tslave {\n+\t\t\tpcm {\n+\t\t\t\ttype hw\n+\t\t\t\tcard $CARD\n+\t\t\t\tdevice 0\n+\t\t\t}\n+\t\t}\n+\t}\n+\tcontrol {\n+\t\tname \"PCM Playback Volume\"\n+\t\tcard $CARD\n+\t}\n+}\n+\n+<confdir:pcm/hdmi.conf>\n+\n+axg-sound-card.pcm.hdmi.0 {\n+\t@args [ CARD AES0 AES1 AES2 AES3 ]\n+\t@args.CARD { type string }\n+\t@args.AES0 { type integer }\n+\t@args.AES1 { type integer }\n+\t@args.AES2 { type integer }\n+\t@args.AES3 { type integer }\n+\ttype hooks\n+\tslave.pcm {\n+\t\ttype hw\n+\t\tcard $CARD\n+\t\tdevice 0\n+\t}\n+\thooks.0 {\n+\t\ttype ctl_elems\n+\t\thook_args [\n+\t\t\t{\n+\t\t\t\tname \"IEC958 Playback Default\"\n+\t\t\t\tinterface PCM\n+\t\t\t\tlock true\n+\t\t\t\tpreserve true\n+\t\t\t\toptional true\n+\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n+\t\t\t}\n+\t\t]\n+\t}\n+}\n+\n+<confdir:pcm/iec958.conf>\n+\n+axg-sound-card.pcm.iec958.0 {\n+\t@args [ CARD AES0 AES1 AES2 AES3 ]\n+\t@args.CARD { type string }\n+\t@args.AES0 { type integer }\n+\t@args.AES1 { type integer }\n+\t@args.AES2 { type integer }\n+\t@args.AES3 { type integer }\n+\ttype hooks\n+\tslave.pcm {\n+\t\ttype hw\n+\t\tcard $CARD\n+\t\tdevice 1\n+\t}\n+\thooks.0 {\n+\t\ttype ctl_elems\n+\t\thook_args [\n+\t\t\t{\n+\t\t\t\tname \"IEC958 Playback Default\"\n+\t\t\t\tinterface PCM\n+\t\t\t\tlock true\n+\t\t\t\tpreserve true\n+\t\t\t\toptional true\n+\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n+\t\t\t}\n+\t\t]\n+\t}\n+\thint.device 1\n+}\ndiff --git a/src/conf/cards/gx-sound-card.conf b/src/conf/cards/gx-sound-card.conf\nnew file mode 100644\nindex 00000000..b669a260\n--- /dev/null\n+++ b/src/conf/cards/gx-sound-card.conf\n@@ -0,0 +1,87 @@\n+# SPDX-License-Identifier: GPL-2.0\n+# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n+\n+#\n+# Configuration for Amlogic AIU audio\n+#\n+\n+gx-sound-card.pcm.default {\n+\t@args [ CARD ]\n+\t@args.CARD { type string }\n+\ttype softvol\n+\tslave.pcm {\n+\t\ttype plug\n+\t\tslave {\n+\t\t\tpcm {\n+\t\t\t\ttype hw\n+\t\t\t\tcard $CARD\n+\t\t\t\tdevice 0\n+\t\t\t}\n+\t\t}\n+\t}\n+\tcontrol {\n+\t\tname \"PCM Playback Volume\"\n+\t\tcard $CARD\n+\t}\n+}\n+\n+<confdir:pcm/hdmi.conf>\n+\n+gx-sound-card.pcm.hdmi.0 {\n+\t@args [ CARD AES0 AES1 AES2 AES3 ]\n+\t@args.CARD { type string }\n+\t@args.AES0 { type integer }\n+\t@args.AES1 { type integer }\n+\t@args.AES2 { type integer }\n+\t@args.AES3 { type integer }\n+\ttype hooks\n+\tslave.pcm {\n+\t\ttype hw\n+\t\tcard $CARD\n+\t\tdevice 0\n+\t}\n+\thooks.0 {\n+\t\ttype ctl_elems\n+\t\thook_args [\n+\t\t\t{\n+\t\t\t\tname \"IEC958 Playback Default\"\n+\t\t\t\tinterface PCM\n+\t\t\t\tlock true\n+\t\t\t\tpreserve true\n+\t\t\t\toptional true\n+\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n+\t\t\t}\n+\t\t]\n+\t}\n+}\n+\n+<confdir:pcm/iec958.conf>\n+\n+gx-sound-card.pcm.iec958.0 {\n+\t@args [ CARD AES0 AES1 AES2 AES3 ]\n+\t@args.CARD { type string }\n+\t@args.AES0 { type integer }\n+\t@args.AES1 { type integer }\n+\t@args.AES2 { type integer }\n+\t@args.AES3 { type integer }\n+\ttype hooks\n+\tslave.pcm {\n+\t\ttype hw\n+\t\tcard $CARD\n+\t\tdevice 1\n+\t}\n+\thooks.0 {\n+\t\ttype ctl_elems\n+\t\thook_args [\n+\t\t\t{\n+\t\t\t\tname \"IEC958 Playback Default\"\n+\t\t\t\tinterface PCM\n+\t\t\t\tlock true\n+\t\t\t\tpreserve true\n+\t\t\t\toptional true\n+\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n+\t\t\t}\n+\t\t]\n+\t}\n+\thint.device 1\n+}\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/alsa-lib/amlogic-0002-WIP-add-Amlogic-cards-to-Makefile.am.patch",
    "content": "From 2891f697cbfea4f0bf60bc476e78ab25947ac810 Mon Sep 17 00:00:00 2001\nFrom: chewitt <christianshewitt@gmail.com>\nDate: Fri, 15 May 2020 06:12:43 +0000\nSubject: [PATCH 2/2] WIP: add Amlogic cards to Makefile.am\n\n---\n src/conf/cards/Makefile.am | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am\nindex 00999f01..dc2881d7 100644\n--- a/src/conf/cards/Makefile.am\n+++ b/src/conf/cards/Makefile.am\n@@ -12,6 +12,7 @@ cfg_files = aliases.conf \\\n \tAudigy2.conf \\\n \tAureon51.conf \\\n \tAureon71.conf \\\n+\taxg-sound-card.conf \\\n \tCA0106.conf \\\n \tCMI8338.conf \\\n \tCMI8338-SWIEC.conf \\\n@@ -29,6 +30,7 @@ cfg_files = aliases.conf \\\n \tFWSpeakers.conf \\\n \tFireWave.conf \\\n \tGUS.conf \\\n+\tgx-sound-card.conf \\\n \tHDA-Intel.conf \\\n \tHdmiLpeAudio.conf \\\n \tICE1712.conf \\\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/ffmpeg/ffmpeg-hevc-001.patch",
    "content": "From 5da6d4bdf0ce603d48415dcbc657e56a050a8d24 Mon Sep 17 00:00:00 2001\nFrom: John Cox <jc@kynesim.co.uk>\nDate: Wed, 11 Jan 2023 16:30:37 +0000\nSubject: [PATCH] v4l2_m2m_dec: Fix initial pkt send if no extradata\n\n---\n libavcodec/v4l2_m2m_dec.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c\nindex b58657021c..d540d00bdd 100644\n--- a/libavcodec/v4l2_m2m_dec.c\n+++ b/libavcodec/v4l2_m2m_dec.c\n@@ -240,7 +240,7 @@ copy_extradata(AVCodecContext * const avctx,\n     else\n         len = src_len < 0 ? AVERROR(EINVAL) : src_len;\n \n-    // Zero length is OK but we swant to stop - -ve is error val\n+    // Zero length is OK but we want to stop - -ve is error val\n     if (len <= 0)\n         return len;\n \n@@ -533,7 +533,7 @@ static int try_enqueue_src(AVCodecContext * const avctx, V4L2m2mContext * const\n \n     if (s->extdata_sent)\n         ret = ff_v4l2_context_enqueue_packet(&s->output, &s->buf_pkt, NULL, 0);\n-    else if (s->extdata_data)\n+    else\n         ret = ff_v4l2_context_enqueue_packet(&s->output, &s->buf_pkt, s->extdata_data, s->extdata_size);\n \n     if (ret == AVERROR(EAGAIN)) {\n"
  },
  {
    "path": "projects/Amlogic/patches/ffmpeg/ffmpeg-hevc-002.patch",
    "content": "From 89a5440ab5110d5460c4919865016e66b9dfbc48 Mon Sep 17 00:00:00 2001\nFrom: John Cox <jc@kynesim.co.uk>\nDate: Wed, 11 Jan 2023 18:34:04 +0000\nSubject: [PATCH] Make capture timeout long once we've started getting frames\n\n---\n libavcodec/v4l2_m2m.h     |  1 +\n libavcodec/v4l2_m2m_dec.c | 10 ++++++++--\n 2 files changed, 9 insertions(+), 2 deletions(-)\n\ndiff --git a/libavcodec/v4l2_m2m.h b/libavcodec/v4l2_m2m.h\nindex 058cec5033..87f81febd2 100644\n--- a/libavcodec/v4l2_m2m.h\n+++ b/libavcodec/v4l2_m2m.h\n@@ -88,6 +88,7 @@ typedef struct V4L2m2mContext {\n \n     /* null frame/packet received */\n     int draining;\n+    int running;\n     AVPacket buf_pkt;\n \n     /* Reference to self; only valid while codec is active. */\ndiff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c\nindex d540d00bdd..6078811404 100644\n--- a/libavcodec/v4l2_m2m_dec.c\n+++ b/libavcodec/v4l2_m2m_dec.c\n@@ -622,7 +622,7 @@ static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame)\n             const int t =\n                 src_rv == NQ_Q_FULL ? -1 :\n                 src_rv == NQ_DRAINING ? 300 :\n-                prefer_dq ? 5 : 0;\n+                prefer_dq ? (s->running ? 100 : 5) : 0;\n \n             // Dequeue frame will unref any previous contents of frame\n             // if it returns success so we don't need an explicit unref\n@@ -639,6 +639,11 @@ static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame)\n                 }\n             }\n \n+            if (s->running != (dst_rv == 0) && prefer_dq) {\n+                s->running = (dst_rv == 0);\n+                av_log(avctx, AV_LOG_VERBOSE, \"%s running\\n\", s->running ? \"Start\" : \"Stop\");\n+            }\n+\n             if (dst_rv == 0)\n                 set_best_effort_pts(avctx, &s->pts_stat, frame);\n \n@@ -1006,7 +1011,8 @@ static void v4l2_decode_flush(AVCodecContext *avctx)\n \n     // resend extradata\n     s->extdata_sent = 0;\n-    // clear EOS status vars\n+    // clear status vars\n+    s->running = 0;\n     s->draining = 0;\n     output->done = 0;\n     capture->done = 0;\n"
  },
  {
    "path": "projects/Amlogic/patches/ffmpeg/ffmpeg-hevc-003.patch",
    "content": "From 840aae6cdcc1b1d3ef11da1c33a7ed6519a64cd6 Mon Sep 17 00:00:00 2001\nFrom: John Cox <jc@kynesim.co.uk>\nDate: Fri, 13 Jan 2023 17:56:55 +0000\nSubject: [PATCH] Be much more relaxed before long timeout\n\n---\n libavcodec/v4l2_m2m.h     |  2 +-\n libavcodec/v4l2_m2m_dec.c | 20 ++++++++++++--------\n 2 files changed, 13 insertions(+), 9 deletions(-)\n\ndiff --git a/libavcodec/v4l2_m2m.h b/libavcodec/v4l2_m2m.h\nindex 87f81febd2..c109b21d08 100644\n--- a/libavcodec/v4l2_m2m.h\n+++ b/libavcodec/v4l2_m2m.h\n@@ -66,7 +66,7 @@ typedef struct pts_stats_s\n \n typedef struct xlat_track_s {\n     unsigned int track_no;\n-    int64_t last_pts;\n+    int64_t last_pts;    // Last valid PTS decoded\n     int64_t last_opaque;\n     V4L2m2mTrackEl track_els[FF_V4L2_M2M_TRACK_SIZE];\n } xlat_track_t;\ndiff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c\nindex 6078811404..2bd113facb 100644\n--- a/libavcodec/v4l2_m2m_dec.c\n+++ b/libavcodec/v4l2_m2m_dec.c\n@@ -590,7 +590,7 @@ static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame)\n \n     do {\n         const int pending = xlat_pending(&s->xlat);\n-        const int prefer_dq = (pending > 3);\n+        const int prefer_dq = (pending > 4);\n         const int last_src_rv = src_rv;\n \n         av_log(avctx, AV_LOG_TRACE, \"Pending=%d, src_rv=%d, req_pkt=%d\\n\", pending, src_rv, s->req_pkt);\n@@ -619,10 +619,14 @@ static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame)\n         // (b) enqueue returned a status indicating that decode should be attempted\n         if (dst_rv != 0 && TRY_DQ(src_rv)) {\n             // Pick a timeout depending on state\n+            // The pending count isn't completely reliable so it is good enough\n+            // hint that we want a frame but not good enough to require it in\n+            // all cases; however if it has got > 31 that exceeds its margin of\n+            // error so require a frame to prevent ridiculous levels of latency\n             const int t =\n                 src_rv == NQ_Q_FULL ? -1 :\n                 src_rv == NQ_DRAINING ? 300 :\n-                prefer_dq ? (s->running ? 100 : 5) : 0;\n+                prefer_dq ? (s->running && pending > 31 ? 100 : 5) : 0;\n \n             // Dequeue frame will unref any previous contents of frame\n             // if it returns success so we don't need an explicit unref\n@@ -639,13 +643,13 @@ static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame)\n                 }\n             }\n \n-            if (s->running != (dst_rv == 0) && prefer_dq) {\n-                s->running = (dst_rv == 0);\n-                av_log(avctx, AV_LOG_VERBOSE, \"%s running\\n\", s->running ? \"Start\" : \"Stop\");\n-            }\n-\n-            if (dst_rv == 0)\n+            if (dst_rv == 0) {\n                 set_best_effort_pts(avctx, &s->pts_stat, frame);\n+                if (!s->running) {\n+                    s->running = 1;\n+                    av_log(avctx, AV_LOG_VERBOSE, \"Decode running\\n\");\n+                }\n+            }\n \n             if (dst_rv == AVERROR(EAGAIN) && src_rv == NQ_DRAINING) {\n                 av_log(avctx, AV_LOG_WARNING, \"Timeout in drain - assume EOF\");\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0001-LOCAL-configs-meson64-prevent-stdout-stderr-on-video.patch",
    "content": "From 95ed57b0ca24cde1d7547878101c62f552cb1160 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Fri, 13 Nov 2020 02:09:36 +0000\nSubject: [PATCH 01/25] LOCAL: configs: meson64: prevent stdout/stderr on\n videoconsole\n\nSeveral devices have CONFIG_DM_VIDEO enabled which causes stdout/stderr\nto appear on videoconsole, so remove videoconsole from STDOUT so that\nearly u-boot boot remains silent unless using the uart/serial console.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n include/configs/meson64.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/include/configs/meson64.h b/include/configs/meson64.h\nindex 40803ee9da..05b1fcb9fd 100644\n--- a/include/configs/meson64.h\n+++ b/include/configs/meson64.h\n@@ -18,7 +18,7 @@\n \n /* For splashscreen */\n #ifdef CONFIG_DM_VIDEO\n-#define STDOUT_CFG \"vidconsole,serial\"\n+#define STDOUT_CFG \"serial\"\n #else\n #define STDOUT_CFG \"serial\"\n #endif\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0002-LOCAL-configs-meson64-remove-amlogic-so-fdtdir-finds.patch",
    "content": "From d16384b766e1704470f678589e01d288fbb94960 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 22 Apr 2021 06:52:50 +0000\nSubject: [PATCH 02/25] LOCAL: configs: meson64: remove /amlogic so fdtdir\n finds LE boot files\n\n---\n include/configs/meson64.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/include/configs/meson64.h b/include/configs/meson64.h\nindex 05b1fcb9fd..c4af944382 100644\n--- a/include/configs/meson64.h\n+++ b/include/configs/meson64.h\n@@ -89,7 +89,7 @@\n \t\"pxefile_addr_r=0x01080000\\0\" \\\n \t\"fdtoverlay_addr_r=0x01000000\\0\" \\\n \t\"ramdisk_addr_r=0x13000000\\0\" \\\n-\t\"fdtfile=amlogic/\" CONFIG_DEFAULT_DEVICE_TREE \".dtb\\0\" \\\n+\t\"fdtfile=/\" CONFIG_DEFAULT_DEVICE_TREE \".dtb\\0\" \\\n \tBOOTENV\n #endif\n \n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0003-LOCAL-board-amlogic-odroid-n2-remove-amlogic-prefix-.patch",
    "content": "From a9fc1d56916fbcf4e00a1dd7543c9f53d697477a Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Tue, 3 Aug 2021 18:42:55 +0000\nSubject: [PATCH 03/25] LOCAL: board: amlogic: odroid-n2: remove /amlogic/\n prefix for dtb path\n\nRemove the /amlogic/ prefix to align with current LE dtb locations.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n board/amlogic/odroid-n2/odroid-n2.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/board/amlogic/odroid-n2/odroid-n2.c b/board/amlogic/odroid-n2/odroid-n2.c\nindex 2135457edd..ec1f4efc11 100644\n--- a/board/amlogic/odroid-n2/odroid-n2.c\n+++ b/board/amlogic/odroid-n2/odroid-n2.c\n@@ -63,7 +63,7 @@ static void odroid_set_fdtfile(char *soc, char *variant)\n {\n \tchar s[128];\n \n-\tsnprintf(s, sizeof(s), \"amlogic/meson-%s-odroid-%s.dtb\", soc, variant);\n+\tsnprintf(s, sizeof(s), \"meson-%s-odroid-%s.dtb\", soc, variant);\n \tenv_set(\"fdtfile\", s);\n }\n \n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0004-BACKPORT-arm64-dts-meson-nanopi-k2-readd-PHY-reset-p.patch",
    "content": "From 7d8355053316d3f760a5ac14156e77e27aa5f6d5 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Tue, 25 Oct 2022 14:24:21 +0000\nSubject: [PATCH 04/25] BACKPORT: arm64: dts: meson: nanopi-k2: readd PHY reset\n properties\n\nThe sync of device-tree/bindings in 11a48a5a18c6 (\"Linux 5.6-rc2\") causes\nEthernet to break on some GXBB boards; the PHY seems to need proper reset\ntiming to function in u-boot and Linux. Re-add the old PHY reset binding\nfor dwmac until we support new bindings in the PHY node. This borrows the\nsame fix applied to the Odroid C2 board [0].\n\n[0] https://lists.denx.de/pipermail/u-boot/2021-April/446658.html\n\nFixes: dd5f2351e99a (\"arm64: dts: meson: sync dt and bindings from v5.6-rc2\")\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm/dts/meson-gxbb-nanopi-k2-u-boot.dtsi | 7 +++++++\n 1 file changed, 7 insertions(+)\n\ndiff --git a/arch/arm/dts/meson-gxbb-nanopi-k2-u-boot.dtsi b/arch/arm/dts/meson-gxbb-nanopi-k2-u-boot.dtsi\nindex c35158d7e9..2a245bbe7f 100644\n--- a/arch/arm/dts/meson-gxbb-nanopi-k2-u-boot.dtsi\n+++ b/arch/arm/dts/meson-gxbb-nanopi-k2-u-boot.dtsi\n@@ -5,3 +5,10 @@\n  */\n \n #include \"meson-gx-u-boot.dtsi\"\n+\n+&ethmac {\n+\tsnps,reset-gpio = <&gpio GPIOZ_14 0>;\n+\tsnps,reset-delays-us = <0 10000 1000000>;\n+\tsnps,reset-active-low;\n+};\n+\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0005-WIP-ARM-dts-import-WeTek-Hub-Play2-DTs-from-Linux-5..patch",
    "content": "From f72090a5d057a18fa8bceec0400c212012f56126 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Tue, 20 Apr 2021 05:19:43 +0000\nSubject: [PATCH 05/25] WIP: ARM: dts: import WeTek Hub/Play2 DTs from Linux\n 5.19\n\nImport the WeTek common dtsi and Hub/Play2 device-trees.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm/dts/Makefile                         |   2 +\n arch/arm/dts/meson-gxbb-wetek-hub-u-boot.dtsi |   7 +\n arch/arm/dts/meson-gxbb-wetek-hub.dts         |  58 ++++\n .../dts/meson-gxbb-wetek-play2-u-boot.dtsi    |   7 +\n arch/arm/dts/meson-gxbb-wetek-play2.dts       | 121 ++++++++\n arch/arm/dts/meson-gxbb-wetek.dtsi            | 292 ++++++++++++++++++\n 6 files changed, 487 insertions(+)\n create mode 100644 arch/arm/dts/meson-gxbb-wetek-hub-u-boot.dtsi\n create mode 100644 arch/arm/dts/meson-gxbb-wetek-hub.dts\n create mode 100644 arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi\n create mode 100644 arch/arm/dts/meson-gxbb-wetek-play2.dts\n create mode 100644 arch/arm/dts/meson-gxbb-wetek.dtsi\n\ndiff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile\nindex 965895bc2a..4a1ac8ecaf 100644\n--- a/arch/arm/dts/Makefile\n+++ b/arch/arm/dts/Makefile\n@@ -181,6 +181,8 @@ dtb-$(CONFIG_ARCH_MESON) += \\\n \tmeson-gxbb-nanopi-k2.dtb \\\n \tmeson-gxbb-p200.dtb \\\n \tmeson-gxbb-p201.dtb \\\n+\tmeson-gxbb-wetek-hub.dtb \\\n+\tmeson-gxbb-wetek-play2.dtb \\\n \tmeson-gxl-s805x-libretech-ac.dtb \\\n \tmeson-gxl-s905d-libretech-pc.dtb \\\n \tmeson-gxl-s905w-jethome-jethub-j80.dtb \\\ndiff --git a/arch/arm/dts/meson-gxbb-wetek-hub-u-boot.dtsi b/arch/arm/dts/meson-gxbb-wetek-hub-u-boot.dtsi\nnew file mode 100644\nindex 0000000000..c35158d7e9\n--- /dev/null\n+++ b/arch/arm/dts/meson-gxbb-wetek-hub-u-boot.dtsi\n@@ -0,0 +1,7 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2019 BayLibre, SAS.\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ */\n+\n+#include \"meson-gx-u-boot.dtsi\"\ndiff --git a/arch/arm/dts/meson-gxbb-wetek-hub.dts b/arch/arm/dts/meson-gxbb-wetek-hub.dts\nnew file mode 100644\nindex 0000000000..58733017ed\n--- /dev/null\n+++ b/arch/arm/dts/meson-gxbb-wetek-hub.dts\n@@ -0,0 +1,58 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2016 BayLibre, Inc.\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-gxbb-wetek.dtsi\"\n+#include <dt-bindings/sound/meson-aiu.h>\n+\n+/ {\n+\tcompatible = \"wetek,hub\", \"amlogic,meson-gxbb\";\n+\tmodel = \"WeTek Hub\";\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,gx-sound-card\";\n+\t\tmodel = \"WETEK-HUB\";\n+\t\tassigned-clocks = <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>,\n+\t\t\t\t  <&clkc CLKID_MPLL2>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_I2S>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&aiu {\n+\tstatus = \"okay\";\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-wetek-hub\";\n+};\ndiff --git a/arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi b/arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi\nnew file mode 100644\nindex 0000000000..c35158d7e9\n--- /dev/null\n+++ b/arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi\n@@ -0,0 +1,7 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2019 BayLibre, SAS.\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ */\n+\n+#include \"meson-gx-u-boot.dtsi\"\ndiff --git a/arch/arm/dts/meson-gxbb-wetek-play2.dts b/arch/arm/dts/meson-gxbb-wetek-play2.dts\nnew file mode 100644\nindex 0000000000..6eae692792\n--- /dev/null\n+++ b/arch/arm/dts/meson-gxbb-wetek-play2.dts\n@@ -0,0 +1,121 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2016 BayLibre, Inc.\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-gxbb-wetek.dtsi\"\n+#include <dt-bindings/input/input.h>\n+#include <dt-bindings/sound/meson-aiu.h>\n+\n+/ {\n+\tcompatible = \"wetek,play2\", \"amlogic,meson-gxbb\";\n+\tmodel = \"WeTek Play 2\";\n+\n+\tspdif_dit: audio-codec-0 {\n+\t\t#sound-dai-cells = <0>;\n+\t\tcompatible = \"linux,spdif-dit\";\n+\t\tstatus = \"okay\";\n+\t\tsound-name-prefix = \"DIT\";\n+\t};\n+\n+\tleds {\n+\t\tled-wifi {\n+\t\t\tlabel = \"wetek-play:wifi-status\";\n+\t\t\tgpios = <&gpio GPIODV_26 GPIO_ACTIVE_HIGH>;\n+\t\t\tdefault-state = \"off\";\n+\t\t};\n+\n+\t\tled-ethernet {\n+\t\t\tlabel = \"wetek-play:ethernet-status\";\n+\t\t\tgpios = <&gpio GPIODV_27 GPIO_ACTIVE_HIGH>;\n+\t\t\tdefault-state = \"off\";\n+\t\t};\n+\t};\n+\n+\tgpio-keys-polled {\n+\t\tcompatible = \"gpio-keys-polled\";\n+\t\t#address-cells = <1>;\n+\t\t#size-cells = <0>;\n+\t\tpoll-interval = <100>;\n+\n+\t\tbutton@0 {\n+\t\t\tlabel = \"reset\";\n+\t\t\tlinux,code = <KEY_RESTART>;\n+\t\t\tgpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;\n+\t\t};\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,gx-sound-card\";\n+\t\tmodel = \"WETEK-PLAY2\";\n+\t\tassigned-clocks = <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>,\n+\t\t\t\t  <&clkc CLKID_MPLL2>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_I2S>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&spdif_dit>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&aiu AIU_HDMI CTRL_OUT>;\n+\n+\t\t\tcodec-0 {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&aiu {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&spdif_out_y_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&i2c_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&i2c_a_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&usb1_phy {\n+\tstatus = \"okay\";\n+};\n+\n+&usb1 {\n+\tstatus = \"okay\";\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-wetek-play2\";\n+};\ndiff --git a/arch/arm/dts/meson-gxbb-wetek.dtsi b/arch/arm/dts/meson-gxbb-wetek.dtsi\nnew file mode 100644\nindex 0000000000..3c3eeb148e\n--- /dev/null\n+++ b/arch/arm/dts/meson-gxbb-wetek.dtsi\n@@ -0,0 +1,292 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2016 Andreas Färber\n+ * Copyright (c) 2016 BayLibre, Inc.\n+ * Author: Kevin Hilman <khilman@kernel.org>\n+ */\n+\n+#include \"meson-gxbb.dtsi\"\n+#include <dt-bindings/gpio/gpio.h>\n+#include <dt-bindings/leds/common.h>\n+\n+/ {\n+\taliases {\n+\t\tserial0 = &uart_AO;\n+\t\tethernet0 = &ethmac;\n+\t};\n+\n+\tchosen {\n+\t\tstdout-path = \"serial0:115200n8\";\n+\t};\n+\n+\tmemory@0 {\n+\t\tdevice_type = \"memory\";\n+\t\treg = <0x0 0x0 0x0 0x40000000>;\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-blue {\n+\t\t\t/* red in suspend or power-off */\n+\t\t\tcolor = <LED_COLOR_ID_BLUE>;\n+\t\t\tfunction = LED_FUNCTION_POWER;\n+\t\t\tgpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;\n+\t\t\tdefault-state = \"on\";\n+\t\t\tpanic-indicator;\n+\t\t};\n+\t};\n+\n+\tusb_pwr: regulator-usb-pwrs {\n+\t\tcompatible = \"regulator-fixed\";\n+\n+\t\tregulator-name = \"USB_PWR\";\n+\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\n+\t\tgpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;\n+\t\tenable-active-high;\n+\t};\n+\n+\tvddio_boot: regulator-vddio_boot {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDIO_BOOT\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t};\n+\n+\tvddao_3v3: regulator-vddao_3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDAO_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t};\n+\n+\tvddio_ao18: regulator-vddio_ao18 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDIO_AO18\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvcc_3v3: regulator-vcc_3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t};\n+\n+\temmc_pwrseq: emmc-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-emmc\";\n+\t\treset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;\n+\t};\n+\n+\twifi32k: wifi32k {\n+\t\tcompatible = \"pwm-clock\";\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tpwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */\n+\t};\n+\n+\tsdio_pwrseq: sdio-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-simple\";\n+\t\treset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"ext_clock\";\n+\t};\n+\n+\tcvbs-connector {\n+\t\tcompatible = \"composite-video-connector\";\n+\n+\t\tport {\n+\t\t\tcvbs_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&cvbs_vdac_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\thdmi-connector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&cec_AO {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&ao_cec_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&cvbs_vdac_port {\n+\tcvbs_vdac_out: endpoint {\n+\t\tremote-endpoint = <&cvbs_connector_in>;\n+\t};\n+};\n+\n+&ethmac {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&eth_rgmii_pins>;\n+\tpinctrl-names = \"default\";\n+\n+\tphy-handle = <&eth_phy0>;\n+\tphy-mode = \"rgmii\";\n+\n+\tamlogic,tx-delay-ns = <2>;\n+\n+\tmdio {\n+\t\tcompatible = \"snps,dwmac-mdio\";\n+\t\t#address-cells = <1>;\n+\t\t#size-cells = <0>;\n+\n+\t\teth_phy0: ethernet-phy@0 {\n+\t\t\t/* Realtek RTL8211F (0x001cc916) */\n+\t\t\treg = <0>;\n+\n+\t\t\treset-assert-us = <10000>;\n+\t\t\treset-deassert-us = <80000>;\n+\t\t\treset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;\n+\n+\t\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t\t/* MAC_INTR on GPIOZ_15 */\n+\t\t\tinterrupts = <29 IRQ_TYPE_LEVEL_LOW>;\n+\t\t};\n+\t};\n+};\n+\n+&hdmi_tx {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-supply = <&vddio_ao18>;\n+};\n+\n+&hdmi_tx_tmds_port {\n+\thdmi_tx_tmds_out: endpoint {\n+\t\tremote-endpoint = <&hdmi_connector_in>;\n+\t};\n+};\n+\n+&ir {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&remote_input_ao_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&pwm_ef {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&pwm_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&clkc CLKID_FCLK_DIV4>;\n+\tclock-names = \"clkin0\";\n+};\n+\n+&saradc {\n+\tstatus = \"okay\";\n+\tvref-supply = <&vddio_ao18>;\n+};\n+\n+/* Wireless SDIO Module */\n+&sd_emmc_a {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&sdio_pins>;\n+\tpinctrl-1 = <&sdio_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\t#address-cells = <1>;\n+\t#size-cells = <0>;\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tmax-frequency = <50000000>;\n+\n+\tnon-removable;\n+\tdisable-wp;\n+\n+\t/* WiFi firmware requires power to be kept while in suspend */\n+\tkeep-power-in-suspend;\n+\n+\tmmc-pwrseq = <&sdio_pwrseq>;\n+\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddio_boot>;\n+\n+\tbrcmf: wifi@1 {\n+\t\treg = <1>;\n+\t\tcompatible = \"brcm,bcm4329-fmac\";\n+\t};\n+};\n+\n+/* SD card */\n+&sd_emmc_b {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&sdcard_pins>;\n+\tpinctrl-1 = <&sdcard_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tmax-frequency = <100000000>;\n+\tdisable-wp;\n+\n+\tcd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;\n+\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vcc_3v3>;\n+};\n+\n+/* eMMC */\n+&sd_emmc_c {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;\n+\tpinctrl-1 = <&emmc_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <8>;\n+\tcap-mmc-highspeed;\n+\tmax-frequency = <50000000>;\n+\tnon-removable;\n+\tdisable-wp;\n+\tmmc-ddr-1_8v;\n+\tmmc-hs200-1_8v;\n+\n+\tmmc-pwrseq = <&emmc_pwrseq>;\n+\tvmmc-supply = <&vcc_3v3>;\n+\tvqmmc-supply = <&vddio_boot>;\n+};\n+\n+/* This is connected to the Bluetooth module: */\n+&uart_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"brcm,bcm43438-bt\";\n+\t\tshutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>;\n+\t};\n+};\n+\n+/* This UART is brought out to the DB9 connector */\n+&uart_AO {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_ao_a_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&usb0_phy {\n+\tstatus = \"okay\";\n+\tphy-supply = <&usb_pwr>;\n+};\n+\n+&usb0 {\n+\tstatus = \"okay\";\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0006-WIP-ARM-dts-use-snps-reset-on-WeTek-devices-to-fix-E.patch",
    "content": "From 4df4197e1eb7e257d0c4dda60a7ff427fbd47c6f Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Tue, 20 Apr 2021 05:29:19 +0000\nSubject: [PATCH 06/25] WIP: ARM: dts: use snps,reset on WeTek devices to fix\n Ethernet\n\nThe sync of the device tree and dt-bindings from Linux v5.6-rc2\n11a48a5a18c6 (\"Linux 5.6-rc2\") causes Ethernet to break on both\nWeTek devices. The PHY seems to need proper reset timing to be\nfunctional in U-Boot and Linux afterwards. Re-add the old PHY\nreset bindings for dwmac until we support the new bindings in\nthe PHY node.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm/dts/meson-gxbb-wetek-hub-u-boot.dtsi   | 7 +++++++\n arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi | 7 +++++++\n 2 files changed, 14 insertions(+)\n\ndiff --git a/arch/arm/dts/meson-gxbb-wetek-hub-u-boot.dtsi b/arch/arm/dts/meson-gxbb-wetek-hub-u-boot.dtsi\nindex c35158d7e9..2a245bbe7f 100644\n--- a/arch/arm/dts/meson-gxbb-wetek-hub-u-boot.dtsi\n+++ b/arch/arm/dts/meson-gxbb-wetek-hub-u-boot.dtsi\n@@ -5,3 +5,10 @@\n  */\n \n #include \"meson-gx-u-boot.dtsi\"\n+\n+&ethmac {\n+\tsnps,reset-gpio = <&gpio GPIOZ_14 0>;\n+\tsnps,reset-delays-us = <0 10000 1000000>;\n+\tsnps,reset-active-low;\n+};\n+\ndiff --git a/arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi b/arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi\nindex c35158d7e9..2a245bbe7f 100644\n--- a/arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi\n+++ b/arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi\n@@ -5,3 +5,10 @@\n  */\n \n #include \"meson-gx-u-boot.dtsi\"\n+\n+&ethmac {\n+\tsnps,reset-gpio = <&gpio GPIOZ_14 0>;\n+\tsnps,reset-delays-us = <0 10000 1000000>;\n+\tsnps,reset-active-low;\n+};\n+\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0007-WIP-boards-amlogic-add-board-files-for-wetek-gxbb-de.patch",
    "content": "From cec8965a83baea925ac82ca0be5dac3cc1823915 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 22 Apr 2021 05:45:29 +0000\nSubject: [PATCH 07/25] WIP: boards: amlogic: add board files for wetek-gxbb\n devices\n\nThese support the WeTek Hub and Play2 devices.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n board/amlogic/wetek-gxbb/MAINTAINERS  |  8 +++++\n board/amlogic/wetek-gxbb/Makefile     |  6 ++++\n board/amlogic/wetek-gxbb/wetek-gxbb.c | 50 +++++++++++++++++++++++++++\n 3 files changed, 64 insertions(+)\n create mode 100644 board/amlogic/wetek-gxbb/MAINTAINERS\n create mode 100644 board/amlogic/wetek-gxbb/Makefile\n create mode 100644 board/amlogic/wetek-gxbb/wetek-gxbb.c\n\ndiff --git a/board/amlogic/wetek-gxbb/MAINTAINERS b/board/amlogic/wetek-gxbb/MAINTAINERS\nnew file mode 100644\nindex 0000000000..8aaa82ce17\n--- /dev/null\n+++ b/board/amlogic/wetek-gxbb/MAINTAINERS\n@@ -0,0 +1,8 @@\n+WETEK-GXBB\n+M:\tChristian Hewitt <christianshewitt@gmail.com>\n+S:\tMaintained\n+L:\tu-boot-amlogic@groups.io\n+F:\tboard/amlogic/wetek-gxbb/\n+F:\tconfigs/wetek-hub_defconfig\n+F:\tconfigs/wetek-play2_defconfig\n+F:\tdoc/board/amlogic/wetek-gxbb.rst\ndiff --git a/board/amlogic/wetek-gxbb/Makefile b/board/amlogic/wetek-gxbb/Makefile\nnew file mode 100644\nindex 0000000000..7a5266b028\n--- /dev/null\n+++ b/board/amlogic/wetek-gxbb/Makefile\n@@ -0,0 +1,6 @@\n+# SPDX-License-Identifier: GPL-2.0+\n+#\n+# (C) Copyright 2020 BayLibre, SAS\n+# Author: Neil Armstrong <narmstrong@baylibre.com>\n+\n+obj-y\t:= wetek-gxbb.o\ndiff --git a/board/amlogic/wetek-gxbb/wetek-gxbb.c b/board/amlogic/wetek-gxbb/wetek-gxbb.c\nnew file mode 100644\nindex 0000000000..fb07eefa53\n--- /dev/null\n+++ b/board/amlogic/wetek-gxbb/wetek-gxbb.c\n@@ -0,0 +1,50 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+/*\n+ * (C) Copyright 2016 Beniamino Galvani <b.galvani@gmail.com>\n+ */\n+\n+#include <common.h>\n+#include <dm.h>\n+#include <env.h>\n+#include <init.h>\n+#include <net.h>\n+#include <asm/io.h>\n+#include <asm/arch/gx.h>\n+#include <asm/arch/sm.h>\n+#include <asm/arch/eth.h>\n+#include <asm/arch/mem.h>\n+\n+#define EFUSE_MAC_OFFSET\t0\n+#define EFUSE_MAC_SIZE\t\t12\n+#define MAC_ADDR_LEN\t\t6\n+\n+int misc_init_r(void)\n+{\n+\tu8 mac_addr[MAC_ADDR_LEN];\n+\tchar efuse_mac_addr[EFUSE_MAC_SIZE], tmp[3];\n+\tssize_t len;\n+\n+\tif (!eth_env_get_enetaddr(\"ethaddr\", mac_addr)) {\n+\t\tlen = meson_sm_read_efuse(EFUSE_MAC_OFFSET,\n+\t\t\t\t\t  efuse_mac_addr, EFUSE_MAC_SIZE);\n+\t\tif (len != EFUSE_MAC_SIZE)\n+\t\t\treturn 0;\n+\n+\t\t/* MAC is stored in ASCII format, 1bytes = 2characters */\n+\t\tfor (int i = 0; i < 6; i++) {\n+\t\t\ttmp[0] = efuse_mac_addr[i * 2];\n+\t\t\ttmp[1] = efuse_mac_addr[i * 2 + 1];\n+\t\t\ttmp[2] = '\\0';\n+\t\t\tmac_addr[i] = simple_strtoul(tmp, NULL, 16);\n+\t\t}\n+\n+\t\tif (is_valid_ethaddr(mac_addr))\n+\t\t\teth_env_set_enetaddr(\"ethaddr\", mac_addr);\n+\t\telse\n+\t\t\tmeson_generate_serial_ethaddr();\n+\n+\t\teth_env_get_enetaddr(\"ethaddr\", mac_addr);\n+\t}\n+\n+\treturn 0;\n+}\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0008-WIP-boards-amlogic-add-WeTek-Hub-defconfig.patch",
    "content": "From 8b7dfec310b69a5b7cafacbe11a3ca36b497c78c Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 27 Feb 2021 06:03:00 +0000\nSubject: [PATCH 08/25] WIP: boards: amlogic: add WeTek Hub defconfig\n\nSigned-of-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n configs/wetek-hub_defconfig | 71 +++++++++++++++++++++++++++++++++++++\n 1 file changed, 71 insertions(+)\n create mode 100644 configs/wetek-hub_defconfig\n\ndiff --git a/configs/wetek-hub_defconfig b/configs/wetek-hub_defconfig\nnew file mode 100644\nindex 0000000000..9ad263ca2c\n--- /dev/null\n+++ b/configs/wetek-hub_defconfig\n@@ -0,0 +1,71 @@\n+CONFIG_ARM=y\n+CONFIG_SYS_BOARD=\"wetek-gxbb\"\n+CONFIG_ARCH_MESON=y\n+CONFIG_SYS_TEXT_BASE=0x01000000\n+CONFIG_SYS_LOAD_ADDR=0x1000000\n+CONFIG_NR_DRAM_BANKS=1\n+CONFIG_ENV_SIZE=0x2000\n+CONFIG_DM_GPIO=y\n+CONFIG_DEBUG_UART_BASE=0xc81004c0\n+CONFIG_DEBUG_UART_CLOCK=24000000\n+CONFIG_IDENT_STRING=\" wetek-hub\"\n+CONFIG_DEFAULT_DEVICE_TREE=\"meson-gxbb-wetek-hub\"\n+CONFIG_DEBUG_UART=y\n+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y\n+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000\n+CONFIG_OF_BOARD_SETUP=y\n+# CONFIG_DISPLAY_CPUINFO is not set\n+CONFIG_MISC_INIT_R=y\n+# CONFIG_CMD_BDI is not set\n+# CONFIG_CMD_IMI is not set\n+CONFIG_CMD_ADC=y\n+CONFIG_CMD_GPIO=y\n+CONFIG_CMD_I2C=y\n+# CONFIG_CMD_LOADS is not set\n+CONFIG_CMD_MMC=y\n+CONFIG_CMD_USB=y\n+# CONFIG_CMD_SETEXPR is not set\n+CONFIG_CMD_REGULATOR=y\n+CONFIG_OF_CONTROL=y\n+CONFIG_SYS_RELOC_GD_ENV_ADDR=y\n+CONFIG_NET_RANDOM_ETHADDR=y\n+CONFIG_SARADC_MESON=y\n+CONFIG_DM_I2C=y\n+CONFIG_SYS_I2C_MESON=y\n+CONFIG_DM_MMC=y\n+CONFIG_MMC_MESON_GX=y\n+CONFIG_PHY_REALTEK=y\n+CONFIG_DM_ETH=y\n+CONFIG_ETH_DESIGNWARE_MESON8B=y\n+CONFIG_PHY=y\n+CONFIG_MESON_GXBB_USB_PHY=y\n+CONFIG_PINCTRL=y\n+CONFIG_PINCTRL_MESON_GXBB=y\n+CONFIG_POWER_DOMAIN=y\n+CONFIG_MESON_EE_POWER_DOMAIN=y\n+CONFIG_DM_REGULATOR=y\n+CONFIG_DM_REGULATOR_FIXED=y\n+CONFIG_DM_REGULATOR_GPIO=y\n+CONFIG_DM_RESET=y\n+CONFIG_DEBUG_UART_ANNOUNCE=y\n+CONFIG_DEBUG_UART_SKIP_INIT=y\n+CONFIG_MESON_SERIAL=y\n+CONFIG_SYSINFO=y\n+CONFIG_SYSINFO_SMBIOS=y\n+CONFIG_USB=y\n+CONFIG_DM_USB=y\n+CONFIG_USB_DWC2=y\n+CONFIG_USB_KEYBOARD=y\n+CONFIG_DM_VIDEO=y\n+# CONFIG_VIDEO_BPP8 is not set\n+# CONFIG_VIDEO_BPP16 is not set\n+CONFIG_SYS_WHITE_ON_BLACK=y\n+CONFIG_VIDEO_MESON=y\n+CONFIG_VIDEO_DT_SIMPLEFB=y\n+CONFIG_SPLASH_SCREEN=y\n+CONFIG_SPLASH_SCREEN_ALIGN=y\n+CONFIG_VIDEO_BMP_RLE8=y\n+CONFIG_BMP_16BPP=y\n+CONFIG_BMP_24BPP=y\n+CONFIG_BMP_32BPP=y\n+CONFIG_OF_LIBFDT_OVERLAY=y\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0009-WIP-boards-amlogic-add-WeTek-Play2-defconfig.patch",
    "content": "From e45b57304c28592eae3ad386559abb6dd3a7a802 Mon Sep 17 00:00:00 2001\nFrom: chewitt <christianshewitt@gmail.com>\nDate: Sat, 27 Feb 2021 06:04:00 +0000\nSubject: [PATCH 09/25] WIP: boards: amlogic: add WeTek Play2 defconfig\n\nSigned-off-by: Christian Hewittt <christianshewitt@gmail.com>\n---\n configs/wetek-play2_defconfig | 71 +++++++++++++++++++++++++++++++++++\n 1 file changed, 71 insertions(+)\n create mode 100644 configs/wetek-play2_defconfig\n\ndiff --git a/configs/wetek-play2_defconfig b/configs/wetek-play2_defconfig\nnew file mode 100644\nindex 0000000000..624679f90c\n--- /dev/null\n+++ b/configs/wetek-play2_defconfig\n@@ -0,0 +1,71 @@\n+CONFIG_ARM=y\n+CONFIG_SYS_BOARD=\"wetek-gxbb\"\n+CONFIG_ARCH_MESON=y\n+CONFIG_SYS_TEXT_BASE=0x01000000\n+CONFIG_SYS_LOAD_ADDR=0x1000000\n+CONFIG_NR_DRAM_BANKS=1\n+CONFIG_ENV_SIZE=0x2000\n+CONFIG_DM_GPIO=y\n+CONFIG_DEBUG_UART_BASE=0xc81004c0\n+CONFIG_DEBUG_UART_CLOCK=24000000\n+CONFIG_IDENT_STRING=\" wetek-play2\"\n+CONFIG_DEFAULT_DEVICE_TREE=\"meson-gxbb-wetek-play2\"\n+CONFIG_DEBUG_UART=y\n+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y\n+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000\n+CONFIG_OF_BOARD_SETUP=y\n+# CONFIG_DISPLAY_CPUINFO is not set\n+CONFIG_MISC_INIT_R=y\n+# CONFIG_CMD_BDI is not set\n+# CONFIG_CMD_IMI is not set\n+CONFIG_CMD_ADC=y\n+CONFIG_CMD_GPIO=y\n+CONFIG_CMD_I2C=y\n+# CONFIG_CMD_LOADS is not set\n+CONFIG_CMD_MMC=y\n+CONFIG_CMD_USB=y\n+# CONFIG_CMD_SETEXPR is not set\n+CONFIG_CMD_REGULATOR=y\n+CONFIG_OF_CONTROL=y\n+CONFIG_SYS_RELOC_GD_ENV_ADDR=y\n+CONFIG_NET_RANDOM_ETHADDR=y\n+CONFIG_SARADC_MESON=y\n+CONFIG_DM_I2C=y\n+CONFIG_SYS_I2C_MESON=y\n+CONFIG_DM_MMC=y\n+CONFIG_MMC_MESON_GX=y\n+CONFIG_PHY_REALTEK=y\n+CONFIG_DM_ETH=y\n+CONFIG_ETH_DESIGNWARE_MESON8B=y\n+CONFIG_PHY=y\n+CONFIG_MESON_GXBB_USB_PHY=y\n+CONFIG_PINCTRL=y\n+CONFIG_PINCTRL_MESON_GXBB=y\n+CONFIG_POWER_DOMAIN=y\n+CONFIG_MESON_EE_POWER_DOMAIN=y\n+CONFIG_DM_REGULATOR=y\n+CONFIG_DM_REGULATOR_FIXED=y\n+CONFIG_DM_REGULATOR_GPIO=y\n+CONFIG_DM_RESET=y\n+CONFIG_DEBUG_UART_ANNOUNCE=y\n+CONFIG_DEBUG_UART_SKIP_INIT=y\n+CONFIG_MESON_SERIAL=y\n+CONFIG_SYSINFO=y\n+CONFIG_SYSINFO_SMBIOS=y\n+CONFIG_USB=y\n+CONFIG_DM_USB=y\n+CONFIG_USB_DWC2=y\n+CONFIG_USB_KEYBOARD=y\n+CONFIG_DM_VIDEO=y\n+# CONFIG_VIDEO_BPP8 is not set\n+# CONFIG_VIDEO_BPP16 is not set\n+CONFIG_SYS_WHITE_ON_BLACK=y\n+CONFIG_VIDEO_MESON=y\n+CONFIG_VIDEO_DT_SIMPLEFB=y\n+CONFIG_SPLASH_SCREEN=y\n+CONFIG_SPLASH_SCREEN_ALIGN=y\n+CONFIG_VIDEO_BMP_RLE8=y\n+CONFIG_BMP_16BPP=y\n+CONFIG_BMP_24BPP=y\n+CONFIG_BMP_32BPP=y\n+CONFIG_OF_LIBFDT_OVERLAY=y\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0010-WIP-ARM-dts-add-support-for-Radxa-Zero2.patch",
    "content": "From 7a49690898b3af72646df09784b8cdd9b1b593fd Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 15 Jan 2022 06:17:23 +0000\nSubject: [PATCH 10/25] WIP: ARM: dts: add support for Radxa Zero2\n\nImport the initial dts (WIP) from chewitt/amlogic-5.16.y\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm/dts/Makefile                         |   1 +\n .../dts/meson-g12b-radxa-zero2-u-boot.dtsi    |   7 +\n arch/arm/dts/meson-g12b-radxa-zero2.dts       | 493 ++++++++++++++++++\n 3 files changed, 501 insertions(+)\n create mode 100644 arch/arm/dts/meson-g12b-radxa-zero2-u-boot.dtsi\n create mode 100644 arch/arm/dts/meson-g12b-radxa-zero2.dts\n\ndiff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile\nindex 4a1ac8ecaf..926ae0aae4 100644\n--- a/arch/arm/dts/Makefile\n+++ b/arch/arm/dts/Makefile\n@@ -202,6 +202,7 @@ dtb-$(CONFIG_ARCH_MESON) += \\\n \tmeson-g12b-gsking-x.dtb \\\n \tmeson-g12b-odroid-n2.dtb \\\n \tmeson-g12b-odroid-n2-plus.dtb \\\n+\tmeson-g12b-radxa-zero2.dtb \\\n \tmeson-sm1-bananapi-m5.dtb \\\n \tmeson-sm1-khadas-vim3l.dtb \\\n \tmeson-sm1-odroid-c4.dtb \\\ndiff --git a/arch/arm/dts/meson-g12b-radxa-zero2-u-boot.dtsi b/arch/arm/dts/meson-g12b-radxa-zero2-u-boot.dtsi\nnew file mode 100644\nindex 0000000000..236f2468dc\n--- /dev/null\n+++ b/arch/arm/dts/meson-g12b-radxa-zero2-u-boot.dtsi\n@@ -0,0 +1,7 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2019 BayLibre, SAS.\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ */\n+\n+#include \"meson-g12-common-u-boot.dtsi\"\ndiff --git a/arch/arm/dts/meson-g12b-radxa-zero2.dts b/arch/arm/dts/meson-g12b-radxa-zero2.dts\nnew file mode 100644\nindex 0000000000..f0c9ef8592\n--- /dev/null\n+++ b/arch/arm/dts/meson-g12b-radxa-zero2.dts\n@@ -0,0 +1,493 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2019 BayLibre, SAS\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ * Copyright (c) 2019 Christian Hewitt <christianshewitt@gmail.com>\n+ * Copyright (c) 2022 Radxa Limited\n+ * Author: Yuntian Zhang <yt@radxa.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-g12b-a311d.dtsi\"\n+#include <dt-bindings/input/input.h>\n+#include <dt-bindings/leds/common.h>\n+#include <dt-bindings/gpio/meson-g12a-gpio.h>\n+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>\n+\n+/ {\n+\tcompatible = \"radxa,zero2\", \"amlogic,a311d\", \"amlogic,g12b\";\n+\tmodel = \"Radxa Zero2\";\n+\n+\taliases {\n+\t\tserial0 = &uart_AO;\n+\t\tserial2 = &uart_A;\n+\t};\n+\n+\tchosen {\n+\t\tstdout-path = \"serial0:115200n8\";\n+\t};\n+\n+\tmemory@0 {\n+\t\tdevice_type = \"memory\";\n+\t\treg = <0x0 0x0 0x0 0x80000000>;\n+\t};\n+\n+\tgpio-keys-polled {\n+\t\tcompatible = \"gpio-keys-polled\";\n+\t\tpoll-interval = <100>;\n+\t\tpower-button {\n+\t\t\tlabel = \"power\";\n+\t\t\tlinux,code = <KEY_POWER>;\n+\t\t\tgpios = <&gpio_ao GPIOAO_3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;\n+\t\t};\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-green {\n+\t\t\tcolor = <LED_COLOR_ID_GREEN>;\n+\t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tgpios = <&gpio GPIOA_12 GPIO_ACTIVE_HIGH>;\n+\t\t\tlinux,default-trigger = \"heartbeat\";\n+\t\t};\n+\t};\n+\n+\tcvbs-connector {\n+\t\tstatus = \"disabled\";\n+\t\tcompatible = \"composite-video-connector\";\n+\n+\t\tport {\n+\t\t\tcvbs_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&cvbs_vdac_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\thdmi-connector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\temmc_pwrseq: emmc-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-emmc\";\n+\t\treset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;\n+\t};\n+\n+\tsdio_pwrseq: sdio-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-simple\";\n+\t\treset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"ext_clock\";\n+\t};\n+\n+\tao_5v: regulator-ao_5v {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"AO_5V\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvcc_1v8: regulator-vcc_1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vcc_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvcc_3v3: regulator-vcc_3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&vddao_3v3>;\n+\t\tregulator-always-on;\n+\t\t/* FIXME: actually controlled by VDDCPU_B_EN */\n+\t};\n+\n+\tvddao_1v8: regulator-vddao_1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDIO_AO1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vddao_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddao_3v3: regulator-vddao_3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDAO_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&ao_5v>;\n+\t\tregulator-always-on;\n+\t};\n+\t\n+\tvddcpu_a: regulator-vddcpu-a {\n+\t\t/*\n+\t\t * MP8756GD Regulator.\n+\t\t */\n+\t\tcompatible = \"pwm-regulator\";\n+\n+\t\tregulator-name = \"VDDCPU_A\";\n+\t\tregulator-min-microvolt = <730000>;\n+\t\tregulator-max-microvolt = <1022000>;\n+\n+\t\tpwm-supply = <&ao_5v>;\n+\n+\t\tpwms = <&pwm_ab 0 1250 0>;\n+\t\tpwm-dutycycle-range = <100 0>;\n+\n+\t\tregulator-boot-on;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddcpu_b: regulator-vddcpu-b {\n+\t\t/*\n+\t\t * Silergy SY8120B1ABC Regulator.\n+\t\t */\n+\t\tcompatible = \"pwm-regulator\";\n+\n+\t\tregulator-name = \"VDDCPU_B\";\n+\t\tregulator-min-microvolt = <730000>;\n+\t\tregulator-max-microvolt = <1022000>;\n+\n+\t\tpwm-supply = <&ao_5v>;\n+\n+\t\tpwms = <&pwm_AO_cd 1 1250 0>;\n+\t\tpwm-dutycycle-range = <100 0>;\n+\n+\t\tregulator-boot-on;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,axg-sound-card\";\n+\t\tmodel = \"RADXA-ZERO2\";\n+\t\taudio-aux-devs = <&tdmout_b>;\n+\t\taudio-routing = \"TDMOUT_B IN 0\", \"FRDDR_A OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 1\", \"FRDDR_B OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 2\", \"FRDDR_C OUT 1\",\n+\t\t\t\t\"TDM_B Playback\", \"TDMOUT_B OUT\";\n+\n+\t\tassigned-clocks = <&clkc CLKID_MPLL2>,\n+\t\t\t\t  <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&frddr_a>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&frddr_b>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&frddr_c>;\n+\t\t};\n+\n+\t\t/* 8ch hdmi interface */\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&tdmif_b>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tdai-tdm-slot-tx-mask-0 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-1 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-2 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-3 = <1 1>;\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* hdmi glue */\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\twifi32k: wifi32k {\n+\t\tcompatible = \"pwm-clock\";\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tpwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */\n+\t};\n+};\n+\n+&arb {\n+\tstatus = \"okay\";\n+};\n+\n+&cec_AO {\n+\tpinctrl-0 = <&cec_ao_a_h_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"disabled\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&cecb_AO {\n+\tpinctrl-0 = <&cec_ao_b_h_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"okay\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&clkc_audio {\n+\tstatus = \"okay\";\n+};\n+\n+&cpu0 {\n+\tcpu-supply = <&vddcpu_b>;\n+\toperating-points-v2 = <&cpu_opp_table_0>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu1 {\n+\tcpu-supply = <&vddcpu_b>;\n+\toperating-points-v2 = <&cpu_opp_table_0>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu100 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu101 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu102 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu103 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cvbs_vdac_port {\n+\tcvbs_vdac_out: endpoint {\n+\t\tremote-endpoint = <&cvbs_connector_in>;\n+\t};\n+};\n+\n+&frddr_a {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_b {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_c {\n+\tstatus = \"okay\";\n+};\n+\n+&gpio {\n+\tgpio-line-names =\n+\t\t/* GPIOZ */\n+\t\t\"PIN_27\", \"PIN_28\", \"PIN_7\", \"PIN_11\", \"PIN_13\", \"PIN_15\", \"PIN_18\", \"PIN_40\",\n+\t\t\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\",\n+\t\t/* GPIOH */\n+\t\t\"\", \"\", \"\", \"\", \"PIN_19\", \"PIN_21\", \"PIN_24\", \"PIN_23\",\n+\t\t\"\",\n+\t\t/* BOOT */\n+\t\t\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\",\n+\t\t\"\", \"\", \"\", \"\", \"EMMC_PWRSEQ\", \"\", \"\", \"\",\n+\t\t/* GPIOC */\n+\t\t\"\", \"\", \"\", \"\", \"\", \"\", \"SD_CD\", \"PIN_36\",\n+\t\t/* GPIOA */\n+\t\t\"PIN_32\", \"PIN_12\", \"PIN_35\", \"\", \"\", \"PIN_38\", \"\", \"\",\n+\t\t\"\", \"\", \"\", \"\", \"LED_GREEN\", \"PIN_31\", \"PIN_3\", \"PIN_5\",\n+\t\t/* GPIOX */\n+\t\t\"\", \"\", \"\", \"\", \"\", \"\", \"SDIO_PWRSEQ\", \"\",\n+\t\t\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\",\n+\t\t\"\", \"BT_SHUTDOWN\", \"\", \"\";\n+};\n+\n+&gpio_ao {\n+\tgpio-line-names =\n+\t\t/* GPIOAO */\n+\t\t\"PIN_8\", \"PIN_10\", \"\", \"BTN_POWER\", \"\", \"\", \"\", \"PIN_29\",\n+\t\t\"PIN_33\", \"PIN_37\", \"FAN\", \"\",\n+\t\t/* GPIOE */\n+\t\t\"\", \"\", \"\";\n+};\n+\n+&hdmi_tx {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-supply = <&ao_5v>;\n+};\n+\n+&hdmi_tx_tmds_port {\n+\thdmi_tx_tmds_out: endpoint {\n+\t\tremote-endpoint = <&hdmi_connector_in>;\n+\t};\n+};\n+\n+&ir {\n+\tstatus = \"disabled\";\n+\tpinctrl-0 = <&remote_input_ao_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&pwm_ab {\n+\tpinctrl-0 = <&pwm_a_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin0\";\n+\tstatus = \"okay\";\n+};\n+\n+&pwm_ef {\n+\tpinctrl-0 = <&pwm_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin2\";\n+\tstatus = \"okay\";\n+};\n+\n+&pwm_AO_cd {\n+\tpinctrl-0 = <&pwm_ao_d_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin4\";\n+\tstatus = \"okay\";\n+};\n+\n+&saradc {\n+\tstatus = \"okay\";\n+\tvref-supply = <&vddao_1v8>;\n+};\n+\n+/* SDIO */\n+&sd_emmc_a {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&sdio_pins>;\n+\tpinctrl-1 = <&sdio_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\t#address-cells = <1>;\n+\t#size-cells = <0>;\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tmax-frequency = <100000000>;\n+\n+\tnon-removable;\n+\tdisable-wp;\n+\n+\t/* WiFi firmware requires power to be kept while in suspend */\n+\tkeep-power-in-suspend;\n+\n+\tmmc-pwrseq = <&sdio_pwrseq>;\n+\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddao_1v8>;\n+\n+\tbrcmf: wifi@1 {\n+\t\treg = <1>;\n+\t\tcompatible = \"brcm,bcm4329-fmac\";\n+\t};\n+};\n+\n+/* SD card */\n+&sd_emmc_b {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&sdcard_c_pins>;\n+\tpinctrl-1 = <&sdcard_clk_gate_c_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tmax-frequency = <50000000>;\n+\tdisable-wp;\n+\n+\tcd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddao_3v3>;\n+};\n+\n+/* eMMC */\n+&sd_emmc_c {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;\n+\tpinctrl-1 = <&emmc_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <8>;\n+\tcap-mmc-highspeed;\n+\tmmc-ddr-1_8v;\n+\tmmc-hs200-1_8v;\n+\tmax-frequency = <200000000>;\n+\tdisable-wp;\n+\n+\tmmc-pwrseq = <&emmc_pwrseq>;\n+\tvmmc-supply = <&vcc_3v3>;\n+\tvqmmc-supply = <&vcc_1v8>;\n+};\n+\n+&tdmif_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmout_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tohdmitx {\n+\tstatus = \"okay\";\n+};\n+\n+&uart_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"brcm,bcm43438-bt\";\n+\t\tshutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\tmax-speed = <2000000>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"lpo\";\n+\t};\n+};\n+\n+&usb {\n+\tstatus = \"okay\";\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0011-WIP-boards-amlogic-add-Radxa-Zero2-defconfig.patch",
    "content": "From e7babbfd6c66c20e81e9d728a6a4384a9a5885dd Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 15 Jan 2022 06:23:29 +0000\nSubject: [PATCH 11/25] WIP: boards: amlogic: add Radxa Zero2 defconfig\n\nAdd a defconfig for the Radxa Zero2 SBC, using an Amlogic A311D chip.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n board/amlogic/w400/MAINTAINERS |  1 +\n configs/radxa-zero2_defconfig  | 77 ++++++++++++++++++++++++++++++++++\n 2 files changed, 78 insertions(+)\n create mode 100644 configs/radxa-zero2_defconfig\n\ndiff --git a/board/amlogic/w400/MAINTAINERS b/board/amlogic/w400/MAINTAINERS\nindex 96ccda2001..caad41577d 100644\n--- a/board/amlogic/w400/MAINTAINERS\n+++ b/board/amlogic/w400/MAINTAINERS\n@@ -3,4 +3,5 @@ M:\tNeil Armstrong <neil.armstrong@linaro.org>\n S:\tMaintained\n L:\tu-boot-amlogic@groups.io\n F:\tboard/amlogic/w400/\n+F:\tconfigs/radxa-zero2_defconfig\n F:\tdoc/board/amlogic/w400.rst\ndiff --git a/configs/radxa-zero2_defconfig b/configs/radxa-zero2_defconfig\nnew file mode 100644\nindex 0000000000..3ef3c9c143\n--- /dev/null\n+++ b/configs/radxa-zero2_defconfig\n@@ -0,0 +1,77 @@\n+CONFIG_ARM=y\n+CONFIG_ARCH_MESON=y\n+CONFIG_SYS_TEXT_BASE=0x01000000\n+CONFIG_NR_DRAM_BANKS=1\n+CONFIG_ENV_SIZE=0x2000\n+CONFIG_DM_GPIO=y\n+CONFIG_DEFAULT_DEVICE_TREE=\"meson-g12b-radxa-zero2\"\n+CONFIG_MESON_G12A=y\n+CONFIG_DEBUG_UART_BASE=0xff803000\n+CONFIG_DEBUG_UART_CLOCK=24000000\n+CONFIG_IDENT_STRING=\" radxa-zero2\"\n+CONFIG_SYS_LOAD_ADDR=0x1000000\n+CONFIG_DEBUG_UART=y\n+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y\n+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000\n+CONFIG_REMAKE_ELF=y\n+CONFIG_OF_BOARD_SETUP=y\n+# CONFIG_DISPLAY_CPUINFO is not set\n+CONFIG_MISC_INIT_R=y\n+CONFIG_SYS_MAXARGS=32\n+# CONFIG_CMD_BDI is not set\n+# CONFIG_CMD_IMI is not set\n+CONFIG_CMD_GPIO=y\n+# CONFIG_CMD_LOADS is not set\n+CONFIG_CMD_MMC=y\n+CONFIG_CMD_USB=y\n+CONFIG_CMD_USB_MASS_STORAGE=y\n+# CONFIG_CMD_SETEXPR is not set\n+CONFIG_CMD_REGULATOR=y\n+CONFIG_OF_CONTROL=y\n+CONFIG_SYS_RELOC_GD_ENV_ADDR=y\n+CONFIG_NET_RANDOM_ETHADDR=y\n+CONFIG_MMC_MESON_GX=y\n+CONFIG_MTD=y\n+CONFIG_DM_MTD=y\n+# CONFIG_PHY_REALTEK is not set\n+CONFIG_DM_MDIO=y\n+CONFIG_DM_MDIO_MUX=y\n+# CONFIG_ETH_DESIGNWARE_MESON8B is not set\n+CONFIG_MDIO_MUX_MESON_G12A=y\n+CONFIG_MESON_G12A_USB_PHY=y\n+CONFIG_PINCTRL=y\n+CONFIG_PINCTRL_MESON_G12A=y\n+CONFIG_POWER_DOMAIN=y\n+CONFIG_MESON_EE_POWER_DOMAIN=y\n+CONFIG_DM_REGULATOR=y\n+CONFIG_DM_REGULATOR_FIXED=y\n+CONFIG_DM_RESET=y\n+CONFIG_DEBUG_UART_ANNOUNCE=y\n+CONFIG_DEBUG_UART_SKIP_INIT=y\n+CONFIG_MESON_SERIAL=y\n+CONFIG_USB=y\n+CONFIG_USB_XHCI_HCD=y\n+CONFIG_USB_XHCI_DWC3=y\n+CONFIG_USB_DWC3=y\n+# CONFIG_USB_DWC3_GADGET is not set\n+CONFIG_USB_DWC3_MESON_G12A=y\n+CONFIG_USB_KEYBOARD=y\n+CONFIG_USB_GADGET=y\n+CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e\n+CONFIG_USB_GADGET_PRODUCT_NUM=0xfada\n+CONFIG_USB_GADGET_DWC2_OTG=y\n+CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y\n+CONFIG_USB_GADGET_DOWNLOAD=y\n+CONFIG_DM_VIDEO=y\n+# CONFIG_VIDEO_BPP8 is not set\n+# CONFIG_VIDEO_BPP16 is not set\n+CONFIG_SYS_WHITE_ON_BLACK=y\n+CONFIG_VIDEO_MESON=y\n+CONFIG_VIDEO_DT_SIMPLEFB=y\n+CONFIG_SPLASH_SCREEN=y\n+CONFIG_SPLASH_SCREEN_ALIGN=y\n+CONFIG_VIDEO_BMP_RLE8=y\n+CONFIG_BMP_16BPP=y\n+CONFIG_BMP_24BPP=y\n+CONFIG_BMP_32BPP=y\n+CONFIG_OF_LIBFDT_OVERLAY=y\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0012-WIP-doc-boards-amlogic-update-for-Radxa-Zero2.patch",
    "content": "From 2fc65ac09a5698b9e2060890de1cd3310a237658 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 15 Jan 2022 06:35:47 +0000\nSubject: [PATCH 12/25] WIP: doc: boards: amlogic: update for Radxa Zero2\n\nAdd documentation bits for the Radxa Zero2\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n board/amlogic/w400/MAINTAINERS                |  1 +\n doc/board/amlogic/index.rst                   |  3 +-\n .../{radxa-zero.rst => radxa-zero2.rst}       | 29 ++++++++++---------\n 3 files changed, 18 insertions(+), 15 deletions(-)\n rename doc/board/amlogic/{radxa-zero.rst => radxa-zero2.rst} (76%)\n\ndiff --git a/board/amlogic/w400/MAINTAINERS b/board/amlogic/w400/MAINTAINERS\nindex caad41577d..6e1ef9b8b8 100644\n--- a/board/amlogic/w400/MAINTAINERS\n+++ b/board/amlogic/w400/MAINTAINERS\n@@ -5,3 +5,4 @@ L:\tu-boot-amlogic@groups.io\n F:\tboard/amlogic/w400/\n F:\tconfigs/radxa-zero2_defconfig\n F:\tdoc/board/amlogic/w400.rst\n+F:\tdoc/board/amlogic/radxa-zero2.rst\ndiff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst\nindex 4d407f9362..f0b92e4209 100644\n--- a/doc/board/amlogic/index.rst\n+++ b/doc/board/amlogic/index.rst\n@@ -19,7 +19,7 @@ This matrix concerns the actual source code version.\n |                               | Nanopi-K2 | Khadas-VIM      | Libretech-PC | JetHub J100 | SEI510     | Khadas-VIM3 | Khadas-VIM3L |\n |                               | P200      | LibreTech-CC v1 | WeTek Core2  |             | Radxa Zero | GT-King/Pro | Odroid-C4    |\n |                               | P201      | LibreTech-AC v2 |              |             |            | GSKing-X    | Odroid-HC4   |\n-|                               |           | JetHub J80      |              |             |            |             | BananaPi-M5  |\n+|                               |           | JetHub J80      |              |             |            | Radxa Zero2 | BananaPi-M5  |\n +-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+\n | UART                          | **Yes**   | **Yes**         | **Yes**      | **Yes**     | **Yes**    | **Yes**     | **Yes**      |\n +-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+\n@@ -110,6 +110,7 @@ Board Documentation\n    p212\n    q200\n    radxa-zero\n+   radxa-zero2\n    s400\n    sei510\n    sei610\ndiff --git a/doc/board/amlogic/radxa-zero.rst b/doc/board/amlogic/radxa-zero2.rst\nsimilarity index 76%\nrename from doc/board/amlogic/radxa-zero.rst\nrename to doc/board/amlogic/radxa-zero2.rst\nindex f5611f52ec..95a42a05d0 100644\n--- a/doc/board/amlogic/radxa-zero.rst\n+++ b/doc/board/amlogic/radxa-zero2.rst\n@@ -1,18 +1,17 @@\n .. SPDX-License-Identifier: GPL-2.0+\n \n-U-Boot for Radxa Zero\n-=====================\n+U-Boot for Radxa Zero2\n+======================\n \n-Radxa Zero is a small form factor SBC based on the Amlogic S905Y2\n-chipset that ships in a number of RAM/eMMC configurations:\n+Radxa Zero2 is a small form factor SBC based on the Amlogic A311D\n+chipset that ships in a number of eMMC configurations:\n \n-Boards with 512MB/1GB LPDDR4 RAM have no eMMC storage and BCM43436\n-wireless (2.4GHz b/g/n) while 2GB/4GB boards have 8/16/32/64/128GB\n-eMMC storage and BCM4345 wireless (2.4/5GHz a/b/g/n/ac).\n-\n-- Amlogic S905Y2 quad-core Cortex-A53\n-- Mali G31-MP2 GPU\n+- Amlogic A311D (Quad A73 + Dual A53) CPU\n+- 4GB LPDDR4 RAM\n+- 32/64/128GB eMMC\n+- Mali G52-MP4 GPU\n - HDMI 2.1 output (micro)\n+- BCM4345 WiFi (2.4/5GHz a/b/g/n/ac) and BT 5.0\n - 1x USB 2.0 port - Type C (OTG)\n - 1x USB 3.0 port - Type C (Host)\n - 1x micro SD Card slot\n@@ -20,6 +19,7 @@ eMMC storage and BCM4345 wireless (2.4/5GHz a/b/g/n/ac).\n \n Schematics are available on the manufacturer website:\n \n+** TO-DO ** (provide updated URL)\n https://dl.radxa.com/zero/docs/hw/RADAX_ZERO_V13_SCH_20210309.pdf\n \n U-Boot compilation\n@@ -28,7 +28,7 @@ U-Boot compilation\n .. code-block:: bash\n \n     $ export CROSS_COMPILE=aarch64-none-elf-\n-    $ make radxa-zero_defconfig\n+    $ make radxa-zero2_defconfig\n     $ make\n \n Image creation\n@@ -42,6 +42,7 @@ git trees published by the board vendor:\n \n .. code-block:: bash\n \n+    ** TO-DO ** UPDATE URLs\n     $ git clone -b radxa-zero-v2021.07 https://github.com/radxa/u-boot.git\n     $ git clone https://github.com/radxa/fip.git\n \n@@ -54,11 +55,11 @@ git trees published by the board vendor:\n     $ export CROSS_COMPILE=/opt/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/aarch64-none-elf-\n     $ export ARCH=arm\n     $ cd u-boot\n-    $ make radxa-zero_defconfig\n+    $ make radxa-zero2_defconfig\n     $ make\n \n-    $ cp u-boot.bin ../fip/radxa-zero/bl33.bin\n-    $ cd ../fip/radxa-zero\n+    $ cp u-boot.bin ../fip/radxa-zero2/bl33.bin\n+    $ cd ../fip/radxa-zero2\n     $ make\n \n This will generate:\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0013-WIP-ARM-dts-import-Beelink-GT1-DT-from-Linux-5.21.patch",
    "content": "From 7ce3779954032f9ac2591a02df06282115032cb3 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 7 Jul 2022 10:24:03 +0000\nSubject: [PATCH 13/25] WIP: ARM: dts: import Beelink GT1 DT from Linux 5.21\n\nImport the Beelink GT1 device-tree.\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n .../dts/meson-gxm-gt1-ultimate-u-boot.dtsi    |  7 ++\n arch/arm/dts/meson-gxm-gt1-ultimate.dts       | 91 +++++++++++++++++++\n 2 files changed, 98 insertions(+)\n create mode 100644 arch/arm/dts/meson-gxm-gt1-ultimate-u-boot.dtsi\n create mode 100644 arch/arm/dts/meson-gxm-gt1-ultimate.dts\n\ndiff --git a/arch/arm/dts/meson-gxm-gt1-ultimate-u-boot.dtsi b/arch/arm/dts/meson-gxm-gt1-ultimate-u-boot.dtsi\nnew file mode 100644\nindex 0000000000..39270ea71c\n--- /dev/null\n+++ b/arch/arm/dts/meson-gxm-gt1-ultimate-u-boot.dtsi\n@@ -0,0 +1,7 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2019 BayLibre, SAS.\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ */\n+\n+#include \"meson-gxl-u-boot.dtsi\"\ndiff --git a/arch/arm/dts/meson-gxm-gt1-ultimate.dts b/arch/arm/dts/meson-gxm-gt1-ultimate.dts\nnew file mode 100644\nindex 0000000000..2c267884cc\n--- /dev/null\n+++ b/arch/arm/dts/meson-gxm-gt1-ultimate.dts\n@@ -0,0 +1,91 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-gxm.dtsi\"\n+#include \"meson-gx-p23x-q20x.dtsi\"\n+#include <dt-bindings/input/input.h>\n+#include <dt-bindings/leds/common.h>\n+\n+/ {\n+\tcompatible = \"azw,gt1-ultimate\", \"amlogic,s912\", \"amlogic,meson-gxm\";\n+\tmodel = \"Beelink GT1 Ultimate\";\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-white {\n+\t\t\tcolor = <LED_COLOR_ID_WHITE>;\n+\t\t\tfunction = LED_FUNCTION_POWER;\n+\t\t\tgpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;\n+\t\t\tdefault-state = \"on\";\n+\t\t\tpanic-indicator;\n+\t\t};\n+\t};\n+\n+\tadc-keys {\n+\t\tcompatible = \"adc-keys\";\n+\t\tio-channels = <&saradc 0>;\n+\t\tio-channel-names = \"buttons\";\n+\t\tkeyup-threshold-microvolt = <1710000>;\n+\n+\t\tbutton-function {\n+\t\t\tlabel = \"update\";\n+\t\t\tlinux,code = <KEY_VENDOR>;\n+\t\t\tpress-threshold-microvolt = <10000>;\n+\t\t};\n+\t};\n+};\n+\n+&ethmac {\n+\tpinctrl-0 = <&eth_pins>;\n+\tpinctrl-names = \"default\";\n+\tphy-handle = <&external_phy>;\n+\tamlogic,tx-delay-ns = <2>;\n+\tphy-mode = \"rgmii\";\n+};\n+\n+&external_mdio {\n+\texternal_phy: ethernet-phy@0 {\n+\t\t/* Realtek RTL8211F (0x001cc916) */\n+\t\treg = <0>;\n+\t\tmax-speed = <1000>;\n+\n+\t\treset-assert-us = <10000>;\n+\t\treset-deassert-us = <80000>;\n+\t\treset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;\n+\n+\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t/* MAC_INTR on GPIOZ_15 */\n+\t\tinterrupts = <25 IRQ_TYPE_LEVEL_LOW>;\n+\t};\n+};\n+\n+&ir {\n+\tlinux,rc-map-name = \"rc-beelink-gs1\";\n+};\n+\n+&sd_emmc_a {\n+\tbrcmf: wifi@1 {\n+\t\treg = <1>;\n+\t\tcompatible = \"brcm,bcm4329-fmac\";\n+\t};\n+};\n+\n+&uart_A {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"brcm,bcm43438-bt\";\n+\t\tshutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\tmax-speed = <2000000>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"lpo\";\n+\t};\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0014-WIP-boards-amlogic-add-Beelink-GT1-defconfig.patch",
    "content": "From 7416bc16b956d7b9b2761ac5511c6b51ac8b4ca1 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 7 Jul 2022 10:27:01 +0000\nSubject: [PATCH 14/25] WIP: boards: amlogic: add Beelink GT1 defconfig\n\nAdd a board config for Beelink GT1 devices\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n configs/beelink-gt1_defconfig | 71 +++++++++++++++++++++++++++++++++++\n 1 file changed, 71 insertions(+)\n create mode 100644 configs/beelink-gt1_defconfig\n\ndiff --git a/configs/beelink-gt1_defconfig b/configs/beelink-gt1_defconfig\nnew file mode 100644\nindex 0000000000..77ffc9aa49\n--- /dev/null\n+++ b/configs/beelink-gt1_defconfig\n@@ -0,0 +1,71 @@\n+CONFIG_ARM=y\n+CONFIG_ARCH_MESON=y\n+CONFIG_SYS_TEXT_BASE=0x01000000\n+CONFIG_NR_DRAM_BANKS=1\n+CONFIG_ENV_SIZE=0x2000\n+CONFIG_DM_GPIO=y\n+CONFIG_DEFAULT_DEVICE_TREE=\"meson-gxm-gt1-ultimate\"\n+CONFIG_MESON_GXM=y\n+CONFIG_DEBUG_UART_BASE=0xc81004c0\n+CONFIG_DEBUG_UART_CLOCK=24000000\n+CONFIG_IDENT_STRING=\" beelink-gt1\"\n+CONFIG_SYS_LOAD_ADDR=0x1000000\n+CONFIG_DEBUG_UART=y\n+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y\n+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000\n+CONFIG_REMAKE_ELF=y\n+CONFIG_OF_BOARD_SETUP=y\n+# CONFIG_DISPLAY_CPUINFO is not set\n+CONFIG_MISC_INIT_R=y\n+# CONFIG_CMD_BDI is not set\n+# CONFIG_CMD_IMI is not set\n+CONFIG_CMD_ADC=y\n+CONFIG_CMD_GPIO=y\n+# CONFIG_CMD_LOADS is not set\n+CONFIG_CMD_MMC=y\n+CONFIG_CMD_USB=y\n+CONFIG_CMD_USB_MASS_STORAGE=y\n+# CONFIG_CMD_SETEXPR is not set\n+CONFIG_CMD_REGULATOR=y\n+CONFIG_OF_CONTROL=y\n+CONFIG_SYS_RELOC_GD_ENV_ADDR=y\n+CONFIG_SARADC_MESON=y\n+CONFIG_MMC_MESON_GX=y\n+CONFIG_MTD=y\n+CONFIG_DM_MTD=y\n+CONFIG_PHY_REALTEK=y\n+CONFIG_DM_ETH=y\n+CONFIG_DM_MDIO=y\n+CONFIG_DM_MDIO_MUX=y\n+CONFIG_ETH_DESIGNWARE_MESON8B=y\n+CONFIG_MDIO_MUX_MMIOREG=y\n+CONFIG_MESON_GXL_USB_PHY=y\n+CONFIG_PINCTRL=y\n+CONFIG_PINCTRL_MESON_GXL=y\n+CONFIG_POWER_DOMAIN=y\n+CONFIG_MESON_GX_VPU_POWER_DOMAIN=y\n+CONFIG_DM_REGULATOR=y\n+CONFIG_DM_REGULATOR_FIXED=y\n+CONFIG_DM_RESET=y\n+CONFIG_DEBUG_UART_ANNOUNCE=y\n+CONFIG_DEBUG_UART_SKIP_INIT=y\n+CONFIG_MESON_SERIAL=y\n+CONFIG_USB=y\n+CONFIG_USB_XHCI_HCD=y\n+CONFIG_USB_XHCI_DWC3=y\n+CONFIG_USB_DWC3=y\n+# CONFIG_USB_DWC3_GADGET is not set\n+CONFIG_USB_DWC3_MESON_GXL=y\n+CONFIG_USB_KEYBOARD=y\n+CONFIG_USB_GADGET=y\n+CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e\n+CONFIG_USB_GADGET_PRODUCT_NUM=0xfada\n+CONFIG_USB_GADGET_DWC2_OTG=y\n+CONFIG_USB_GADGET_DOWNLOAD=y\n+CONFIG_DM_VIDEO=y\n+# CONFIG_VIDEO_BPP8 is not set\n+# CONFIG_VIDEO_BPP16 is not set\n+CONFIG_SYS_WHITE_ON_BLACK=y\n+CONFIG_VIDEO_MESON=y\n+CONFIG_VIDEO_DT_SIMPLEFB=y\n+CONFIG_OF_LIBFDT_OVERLAY=y\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0015-WIP-doc-boards-amlogic-update-for-Beelink-GT1.patch",
    "content": "From 5c21b65a0efdae590e0d0ecd1191078725e4abf4 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Thu, 14 Jul 2022 19:38:41 +0000\nSubject: [PATCH 15/25] WIP: doc: boards: amlogic: update for Beelink GT1\n\nAdd documentation bits for the Beelink GT1 and GT1-Ultimate\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n board/amlogic/q200/MAINTAINERS    |  2 +\n doc/board/amlogic/beelink-gt1.rst | 98 +++++++++++++++++++++++++++++++\n doc/board/amlogic/index.rst       |  9 +--\n 3 files changed, 105 insertions(+), 4 deletions(-)\n create mode 100644 doc/board/amlogic/beelink-gt1.rst\n\ndiff --git a/board/amlogic/q200/MAINTAINERS b/board/amlogic/q200/MAINTAINERS\nindex 9c84cca27e..46beffe17f 100644\n--- a/board/amlogic/q200/MAINTAINERS\n+++ b/board/amlogic/q200/MAINTAINERS\n@@ -4,9 +4,11 @@ S:\tMaintained\n L:\tu-boot-amlogic@groups.io\n F:\tboard/amlogic/q200/\n F:\tinclude/configs/q200.h\n+F:\tconfigs/beelink-gt1_defconfig\n F:\tconfigs/khadas-vim2_defconfig\n F:\tconfigs/libretech-s905d-pc_defconfig\n F:\tconfigs/libretech-s912-pc_defconfig\n F:\tconfigs/wetek-core2_defconfig\n+F:\tdoc/board/amlogic/beelink-gt1.rst\n F:\tdoc/board/amlogic/khadas-vim2.rst\n F:\tdoc/board/amlogic/wetek-core2.rst\ndiff --git a/doc/board/amlogic/beelink-gt1.rst b/doc/board/amlogic/beelink-gt1.rst\nnew file mode 100644\nindex 0000000000..28a7c4366f\n--- /dev/null\n+++ b/doc/board/amlogic/beelink-gt1.rst\n@@ -0,0 +1,98 @@\n+.. SPDX-License-Identifier: GPL-2.0+\n+\n+U-Boot for Beelink GT1/GT1-Ultimate\n+===================================\n+\n+The Shenzen AZW (Beelink) GT1 and GT1-Ultimate are based on the Amlogic\n+Q200 reference board with an S912 chip.\n+\n+- 2GB or 3GB DDR3 RAM\n+- 32GB eMMC\n+- HDMI 2.1 video\n+- S/PDIF optical output\n+- 10/100/1000 Ethernet\n+- AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.2)\n+- 3x USB 2.0 ports\n+- IR receiver\n+- 1x micro SD card slot\n+- 1x Power LED (white)\n+- 1x Reset button (internal)\n+\n+Beelink do not provide public schematics, but have been willing\n+to share them with known distro developers on request.\n+\n+U-Boot compilation\n+------------------\n+\n+.. code-block:: bash\n+\n+    $ export CROSS_COMPILE=aarch64-none-elf-\n+    $ make beelink-gt1_defconfig\n+    $ make\n+\n+Image creation\n+--------------\n+\n+Amlogic does not provide sources for the firmware and for tools needed\n+to create the bootloader image. Beelink have provided the Amlogic SDK\n+u-boot sources to known distro developers on-request, allowing FIPs to\n+be generated. The GT1 (2GB) and GT1-Ultimate (3GB) models differ in \n+RAM size and original Beelink devices use the same spec RAM chips and\n+can share the same boot FIPs:\n+\n+https://github.com/LibreELEC/amlogic-boot-fip/tree/master/beelink-gt1\n+\n+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `beelink-gt1`\n+\n+.. code-block:: bash\n+\n+    $ wget https://github.com/LibreELEC/amlogic-boot-fip/archive/master.zip\n+    $ unzip master.zip\n+    $ export FIPDIR=$PWD/amlogic-boot-fip/beelink-gt1\n+\n+Go back to the mainline U-Boot source tree then:\n+\n+.. code-block:: bash\n+\n+    $ mkdir fip\n+    $ cp $FIPDIR/* fip/\n+    $ cp u-boot.bin fip/bl33.bin\n+\n+    $ sh fip/blx_fix.sh \\\n+    \t fip/bl30.bin \\\n+    \t fip/zero_tmp \\\n+    \t fip/bl30_zero.bin \\\n+    \t fip/bl301.bin \\\n+    \t fip/bl301_zero.bin \\\n+    \t fip/bl30_new.bin \\\n+    \t bl30\n+\n+    $ python fip/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0\n+\n+    $ sh fip/blx_fix.sh \\\n+         fip/bl2_acs.bin \\\n+         fip/zero_tmp \\\n+         fip/bl2_zero.bin \\\n+         fip/bl21.bin \\\n+         fip/bl21_zero.bin \\\n+         fip/bl2_new.bin \\\n+         bl2\n+\n+    $ fip/gxl/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin\n+    $ fip/gxl/aml_encrypt_gxl --bl3enc --input fip/bl31.img\n+    $ fip/gxl/aml_encrypt_gxl --bl3enc --input fip/bl33.bin\n+    $ fip/gxl/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig\n+    $ fip/gxl/aml_encrypt_gxl --bootmk \\\n+                              --output fip/u-boot.bin \\\n+                              --bl2 fip/bl2.n.bin.sig \\\n+                              --bl30 fip/bl30_new.bin.enc \\\n+                              --bl31 fip/bl31.img.enc \\\n+                              --bl33 fip/bl33.bin.enc\n+\n+And then write the image to SD or eMMC with:\n+\n+.. code-block:: bash\n+\n+    $ DEV=/dev/your_sd_device\n+    $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1\n+    $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440\ndiff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst\nindex f0b92e4209..b8b6f9b98a 100644\n--- a/doc/board/amlogic/index.rst\n+++ b/doc/board/amlogic/index.rst\n@@ -15,10 +15,10 @@ This matrix concerns the actual source code version.\n |                               |           | S805X           | S905D        |             | S905D2     | A311D       | S905D3       |\n |                               |           | S905W           |              |             | S905Y2     |             |              |\n +===============================+===========+=================+==============+=============+============+=============+==============+\n-| Boards                        | Odroid-C2 | P212            | Khadas VIM2  | S400        | U200       | Odroid-N2   | SEI610       |\n-|                               | Nanopi-K2 | Khadas-VIM      | Libretech-PC | JetHub J100 | SEI510     | Khadas-VIM3 | Khadas-VIM3L |\n-|                               | P200      | LibreTech-CC v1 | WeTek Core2  |             | Radxa Zero | GT-King/Pro | Odroid-C4    |\n-|                               | P201      | LibreTech-AC v2 |              |             |            | GSKing-X    | Odroid-HC4   |\n+| Boards                        | Odroid-C2 | P212            | Beelink GT1  | S400        | U200       | Odroid-N2   | SEI610       |\n+|                               | Nanopi-K2 | Khadas-VIM      | Khadas VIM2  | JetHub J100 | SEI510     | Khadas-VIM3 | Khadas-VIM3L |\n+|                               | P200      | LibreTech-CC v1 | Libretech-PC |             | Radxa Zero | GT-King/Pro | Odroid-C4    |\n+|                               | P201      | LibreTech-AC v2 | WeTek Core2  |             |            | GSKing-X    | Odroid-HC4   |\n |                               |           | JetHub J80      |              |             |            | Radxa Zero2 | BananaPi-M5  |\n +-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+\n | UART                          | **Yes**   | **Yes**         | **Yes**      | **Yes**     | **Yes**    | **Yes**     | **Yes**      |\n@@ -93,6 +93,7 @@ Board Documentation\n \n    beelink-gtking\n    beelink-gtkingpro\n+   beelink-gt1\n    jethub-j100\n    jethub-j80\n    khadas-vim2\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0016-WIP-ARM-dts-convert-bananapi-m5-to-dtsi.patch",
    "content": "From 0addaf5179afa1c985f493035a1dca8f1b23a4ed Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Fri, 17 Feb 2023 05:37:13 +0000\nSubject: [PATCH 16/25] WIP: ARM: dts: convert bananapi-m5 to dtsi\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm/dts/meson-sm1-bananapi-m5.dts | 426 +-----------------------\n arch/arm/dts/meson-sm1-bananapi.dtsi   | 435 +++++++++++++++++++++++++\n 2 files changed, 436 insertions(+), 425 deletions(-)\n create mode 100644 arch/arm/dts/meson-sm1-bananapi.dtsi\n\ndiff --git a/arch/arm/dts/meson-sm1-bananapi-m5.dts b/arch/arm/dts/meson-sm1-bananapi-m5.dts\nindex effaa138b5..34b3238ee0 100644\n--- a/arch/arm/dts/meson-sm1-bananapi-m5.dts\n+++ b/arch/arm/dts/meson-sm1-bananapi-m5.dts\n@@ -6,10 +6,7 @@\n \n /dts-v1/;\n \n-#include \"meson-sm1.dtsi\"\n-#include <dt-bindings/leds/common.h>\n-#include <dt-bindings/input/linux-event-codes.h>\n-#include <dt-bindings/gpio/meson-g12a-gpio.h>\n+#include \"meson-sm1-bananapi.dtsi\"\n #include <dt-bindings/sound/meson-g12a-toacodec.h>\n #include <dt-bindings/sound/meson-g12a-tohdmitx.h>\n \n@@ -17,28 +14,6 @@\n \tcompatible = \"bananapi,bpi-m5\", \"amlogic,sm1\";\n \tmodel = \"Banana Pi BPI-M5\";\n \n-\tadc_keys {\n-\t\tcompatible = \"adc-keys\";\n-\t\tio-channels = <&saradc 2>;\n-\t\tio-channel-names = \"buttons\";\n-\t\tkeyup-threshold-microvolt = <1800000>;\n-\n-\t\tkey {\n-\t\t\tlabel = \"SW3\";\n-\t\t\tlinux,code = <BTN_3>;\n-\t\t\tpress-threshold-microvolt = <1700000>;\n-\t\t};\n-\t};\n-\n-\taliases {\n-\t\tserial0 = &uart_AO;\n-\t\tethernet0 = &ethmac;\n-\t};\n-\n-\tchosen {\n-\t\tstdout-path = \"serial0:115200n8\";\n-\t};\n-\n \t/* TOFIX: handle CVBS_DET on SARADC channel 0 */\n \tcvbs-connector {\n \t\tcompatible = \"composite-video-connector\";\n@@ -50,150 +25,6 @@\n \t\t};\n \t};\n \n-\temmc_pwrseq: emmc-pwrseq {\n-\t\tcompatible = \"mmc-pwrseq-emmc\";\n-\t\treset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;\n-\t};\n-\n-\tgpio-keys {\n-\t\tcompatible = \"gpio-keys\";\n-\n-\t\tkey {\n-\t\t\tlabel = \"SW1\";\n-\t\t\tlinux,code = <BTN_1>;\n-\t\t\tgpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;\n-\t\t\tinterrupt-parent = <&gpio_intc>;\n-\t\t\tinterrupts = <3 IRQ_TYPE_EDGE_BOTH>;\n-\t\t};\n-\t};\n-\n-\thdmi-connector {\n-\t\tcompatible = \"hdmi-connector\";\n-\t\ttype = \"a\";\n-\n-\t\tport {\n-\t\t\thdmi_connector_in: endpoint {\n-\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n-\t\t\t};\n-\t\t};\n-\t};\n-\n-\tleds {\n-\t\tcompatible = \"gpio-leds\";\n-\n-\t\tgreen {\n-\t\t\tcolor = <LED_COLOR_ID_GREEN>;\n-\t\t\tfunction = LED_FUNCTION_STATUS;\n-\t\t\tgpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;\n-\t\t};\n-\n-\t\tblue {\n-\t\t\tcolor = <LED_COLOR_ID_BLUE>;\n-\t\t\tfunction = LED_FUNCTION_STATUS;\n-\t\t\tgpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_LOW>;\n-\t\t\tlinux,default-trigger = \"heartbeat\";\n-\t\t};\n-\t};\n-\n-\tmemory@0 {\n-\t\tdevice_type = \"memory\";\n-\t\treg = <0x0 0x0 0x0 0x40000000>;\n-\t};\n-\n-\temmc_1v8: regulator-emmc_1v8 {\n-\t\tcompatible = \"regulator-fixed\";\n-\t\tregulator-name = \"EMMC_1V8\";\n-\t\tregulator-min-microvolt = <1800000>;\n-\t\tregulator-max-microvolt = <1800000>;\n-\t\tvin-supply = <&vddao_3v3>;\n-\t\tregulator-always-on;\n-\t};\n-\n-\tdc_in: regulator-dc_in {\n-\t\tcompatible = \"regulator-fixed\";\n-\t\tregulator-name = \"DC_IN\";\n-\t\tregulator-min-microvolt = <5000000>;\n-\t\tregulator-max-microvolt = <5000000>;\n-\t\tregulator-always-on;\n-\t};\n-\n-\tvddio_c: regulator-vddio_c {\n-\t\tcompatible = \"regulator-gpio\";\n-\t\tregulator-name = \"VDDIO_C\";\n-\t\tregulator-min-microvolt = <1800000>;\n-\t\tregulator-max-microvolt = <3300000>;\n-\n-\t\tenable-gpio = <&gpio GPIOE_2 GPIO_ACTIVE_HIGH>;\n-\t\tenable-active-high;\n-\t\tregulator-always-on;\n-\n-\t\tgpios = <&gpio_ao GPIOAO_6 GPIO_OPEN_DRAIN>;\n-\t\tgpios-states = <1>;\n-\n-\t\tstates = <1800000 0>,\n-\t\t\t <3300000 1>;\n-\t};\n-\n-\ttflash_vdd: regulator-tflash_vdd {\n-\t\tcompatible = \"regulator-fixed\";\n-\t\tregulator-name = \"TFLASH_VDD\";\n-\t\tregulator-min-microvolt = <3300000>;\n-\t\tregulator-max-microvolt = <3300000>;\n-\t\tvin-supply = <&dc_in>;\n-\t\tgpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;\n-\t\tenable-active-high;\n-\t\tregulator-always-on;\n-\t};\n-\n-\tvddao_1v8: regulator-vddao_1v8 {\n-\t\tcompatible = \"regulator-fixed\";\n-\t\tregulator-name = \"VDDAO_1V8\";\n-\t\tregulator-min-microvolt = <1800000>;\n-\t\tregulator-max-microvolt = <1800000>;\n-\t\tvin-supply = <&vddao_3v3>;\n-\t\tregulator-always-on;\n-\t};\n-\n-\tvddao_3v3: regulator-vddao_3v3 {\n-\t\tcompatible = \"regulator-fixed\";\n-\t\tregulator-name = \"VDDAO_3V3\";\n-\t\tregulator-min-microvolt = <3300000>;\n-\t\tregulator-max-microvolt = <3300000>;\n-\t\tvin-supply = <&dc_in>;\n-\t\tregulator-always-on;\n-\t};\n-\n-\tvddcpu: regulator-vddcpu {\n-\t\t/*\n-\t\t * SY8120B1ABC DC/DC Regulator.\n-\t\t */\n-\t\tcompatible = \"pwm-regulator\";\n-\n-\t\tregulator-name = \"VDDCPU\";\n-\t\tregulator-min-microvolt = <690000>;\n-\t\tregulator-max-microvolt = <1050000>;\n-\n-\t\tvin-supply = <&dc_in>;\n-\n-\t\tpwms = <&pwm_AO_cd 1 1250 0>;\n-\t\tpwm-dutycycle-range = <100 0>;\n-\n-\t\tregulator-boot-on;\n-\t\tregulator-always-on;\n-\t};\n-\n-\t/* USB Hub Power Enable */\n-\tvl_pwr_en: regulator-vl_pwr_en {\n-\t\tcompatible = \"regulator-fixed\";\n-\t\tregulator-name = \"VL_PWR_EN\";\n-\t\tregulator-min-microvolt = <5000000>;\n-\t\tregulator-max-microvolt = <5000000>;\n-\t\tvin-supply = <&dc_in>;\n-\n-\t\tgpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;\n-\t\tenable-active-high;\n-\t};\n-\n \tsound {\n \t\tcompatible = \"amlogic,axg-sound-card\";\n \t\tmodel = \"BPI-M5\";\n@@ -319,68 +150,17 @@\n \tstatus = \"okay\";\n };\n \n-&arb {\n-\tstatus = \"okay\";\n-};\n \n &clkc_audio {\n \tstatus = \"okay\";\n };\n \n-&cpu0 {\n-\tcpu-supply = <&vddcpu>;\n-\toperating-points-v2 = <&cpu_opp_table>;\n-\tclocks = <&clkc CLKID_CPU_CLK>;\n-\tclock-latency = <50000>;\n-};\n-\n-&cpu1 {\n-\tcpu-supply = <&vddcpu>;\n-\toperating-points-v2 = <&cpu_opp_table>;\n-\tclocks = <&clkc CLKID_CPU1_CLK>;\n-\tclock-latency = <50000>;\n-};\n-\n-&cpu2 {\n-\tcpu-supply = <&vddcpu>;\n-\toperating-points-v2 = <&cpu_opp_table>;\n-\tclocks = <&clkc CLKID_CPU2_CLK>;\n-\tclock-latency = <50000>;\n-};\n-\n-&cpu3 {\n-\tcpu-supply = <&vddcpu>;\n-\toperating-points-v2 = <&cpu_opp_table>;\n-\tclocks = <&clkc CLKID_CPU3_CLK>;\n-\tclock-latency = <50000>;\n-};\n-\n &cvbs_vdac_port {\n \tcvbs_vdac_out: endpoint {\n \t\tremote-endpoint = <&cvbs_connector_in>;\n \t};\n };\n \n-&ext_mdio {\n-\texternal_phy: ethernet-phy@0 {\n-\t\t/* Realtek RTL8211F (0x001cc916) */\n-\t\treg = <0>;\n-\t\tmax-speed = <1000>;\n-\n-\t\tinterrupt-parent = <&gpio_intc>;\n-\t\t/* MAC_INTR on GPIOZ_14 */\n-\t\tinterrupts = <26 IRQ_TYPE_LEVEL_LOW>;\n-\t};\n-};\n-\n-&ethmac {\n-\tpinctrl-0 = <&eth_pins>, <&eth_rgmii_pins>;\n-\tpinctrl-names = \"default\";\n-\tstatus = \"okay\";\n-\tphy-mode = \"rgmii-txid\";\n-\tphy-handle = <&external_phy>;\n-};\n-\n &frddr_a {\n \tstatus = \"okay\";\n };\n@@ -393,191 +173,6 @@\n \tstatus = \"okay\";\n };\n \n-&gpio {\n-\tgpio-line-names =\n-\t\t/* GPIOZ */\n-\t\t\"ETH_MDIO\", /* GPIOZ_0 */\n-\t\t\"ETH_MDC\", /* GPIOZ_1 */\n-\t\t\"ETH_RXCLK\", /* GPIOZ_2 */\n-\t\t\"ETH_RX_DV\", /* GPIOZ_3 */\n-\t\t\"ETH_RXD0\", /* GPIOZ_4 */\n-\t\t\"ETH_RXD1\", /* GPIOZ_5 */\n-\t\t\"ETH_RXD2\", /* GPIOZ_6 */\n-\t\t\"ETH_RXD3\", /* GPIOZ_7 */\n-\t\t\"ETH_TXCLK\", /* GPIOZ_8 */\n-\t\t\"ETH_TXEN\", /* GPIOZ_9 */\n-\t\t\"ETH_TXD0\", /* GPIOZ_10 */\n-\t\t\"ETH_TXD1\", /* GPIOZ_11 */\n-\t\t\"ETH_TXD2\", /* GPIOZ_12 */\n-\t\t\"ETH_TXD3\", /* GPIOZ_13 */\n-\t\t\"ETH_INTR\", /* GPIOZ_14 */\n-\t\t\"ETH_NRST\", /* GPIOZ_15 */\n-\t\t/* GPIOH */\n-\t\t\"HDMI_SDA\", /* GPIOH_0 */\n-\t\t\"HDMI_SCL\", /* GPIOH_1 */\n-\t\t\"HDMI_HPD\", /* GPIOH_2 */\n-\t\t\"HDMI_CEC\", /* GPIOH_3 */\n-\t\t\"VL-RST_N\", /* GPIOH_4 */\n-\t\t\"CON1-P36\", /* GPIOH_5 */\n-\t\t\"VL-PWREN\", /* GPIOH_6 */\n-\t\t\"WiFi_3V3_1V8\", /* GPIOH_7 */\n-\t\t\"TFLASH_VDD_EN\", /* GPIOH_8 */\n-\t\t/* BOOT */\n-\t\t\"eMMC_D0\", /* BOOT_0 */\n-\t\t\"eMMC_D1\", /* BOOT_1 */\n-\t\t\"eMMC_D2\", /* BOOT_2 */\n-\t\t\"eMMC_D3\", /* BOOT_3 */\n-\t\t\"eMMC_D4\", /* BOOT_4 */\n-\t\t\"eMMC_D5\", /* BOOT_5 */\n-\t\t\"eMMC_D6\", /* BOOT_6 */\n-\t\t\"eMMC_D7\", /* BOOT_7 */\n-\t\t\"eMMC_CLK\", /* BOOT_8 */\n-\t\t\"\",\n-\t\t\"eMMC_CMD\", /* BOOT_10 */\n-\t\t\"\",\n-\t\t\"eMMC_RST#\", /* BOOT_12 */\n-\t\t\"eMMC_DS\", /* BOOT_13 */\n-\t\t/* GPIOC */\n-\t\t\"SD_D0_B\", /* GPIOC_0 */\n-\t\t\"SD_D1_B\", /* GPIOC_1 */\n-\t\t\"SD_D2_B\", /* GPIOC_2 */\n-\t\t\"SD_D3_B\", /* GPIOC_3 */\n-\t\t\"SD_CLK_B\", /* GPIOC_4 */\n-\t\t\"SD_CMD_B\", /* GPIOC_5 */\n-\t\t\"CARD_EN_DET\", /* GPIOC_6 */\n-\t\t\"\",\n-\t\t/* GPIOA */\n-\t\t\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\",\n-\t\t\"\", \"\", \"\", \"\", \"\", \"\",\n-\t\t\"CON1-P27\", /* GPIOA_14 */\n-\t\t\"CON1-P28\", /* GPIOA_15 */\n-\t\t/* GPIOX */\n-\t\t\"CON1-P16\", /* GPIOX_0 */\n-\t\t\"CON1-P18\", /* GPIOX_1 */\n-\t\t\"CON1-P22\", /* GPIOX_2 */\n-\t\t\"CON1-P11\", /* GPIOX_3 */\n-\t\t\"CON1-P13\", /* GPIOX_4 */\n-\t\t\"CON1-P07\", /* GPIOX_5 */\n-\t\t\"CON1-P33\", /* GPIOX_6 */\n-\t\t\"CON1-P15\", /* GPIOX_7 */\n-\t\t\"CON1-P19\", /* GPIOX_8 */\n-\t\t\"CON1-P21\", /* GPIOX_9 */\n-\t\t\"CON1-P24\", /* GPIOX_10 */\n-\t\t\"CON1-P23\", /* GPIOX_11 */\n-\t\t\"CON1-P08\", /* GPIOX_12 */\n-\t\t\"CON1-P10\", /* GPIOX_13 */\n-\t\t\"CON1-P29\", /* GPIOX_14 */\n-\t\t\"CON1-P31\", /* GPIOX_15 */\n-\t\t\"CON1-P26\", /* GPIOX_16 */\n-\t\t\"CON1-P03\", /* GPIOX_17 */\n-\t\t\"CON1-P05\", /* GPIOX_18 */\n-\t\t\"CON1-P32\"; /* GPIOX_19 */\n-\n-\t/*\n-\t * WARNING: The USB Hub on the BPI-M5 needs a reset signal\n-\t * to be turned high in order to be detected by the USB Controller\n-\t * This signal should be handled by a USB specific power sequence\n-\t * in order to reset the Hub when USB bus is powered down.\n-\t */\n-\tusb-hub {\n-\t\tgpio-hog;\n-\t\tgpios = <GPIOH_4 GPIO_ACTIVE_HIGH>;\n-\t\toutput-high;\n-\t\tline-name = \"usb-hub-reset\";\n-\t};\n-};\n-\n-&gpio_ao {\n-\tgpio-line-names =\n-\t\t/* GPIOAO */\n-\t\t\"DEBUG TX\", /* GPIOAO_0 */\n-\t\t\"DEBUG RX\", /* GPIOAO_1 */\n-\t\t\"SYS_LED2\", /* GPIOAO_2 */\n-\t\t\"UPDATE_KEY\", /* GPIOAO_3 */\n-\t\t\"CON1-P40\", /* GPIOAO_4 */\n-\t\t\"IR_IN\", /* GPIOAO_5 */\n-\t\t\"TF_3V3N_1V8_EN\", /* GPIOAO_6 */\n-\t\t\"CON1-P35\", /* GPIOAO_7 */\n-\t\t\"CON1-P12\", /* GPIOAO_8 */\n-\t\t\"CON1-P37\", /* GPIOAO_9 */\n-\t\t\"CON1-P38\", /* GPIOAO_10 */\n-\t\t\"SYS_LED\", /* GPIOAO_11 */\n-\t\t/* GPIOE */\n-\t\t\"VDDEE_PWM\", /* GPIOE_0 */\n-\t\t\"VDDCPU_PWM\", /* GPIOE_1 */\n-\t\t\"TF_PWR_EN\"; /* GPIOE_2 */\n-};\n-\n-&hdmi_tx {\n-\tstatus = \"okay\";\n-\tpinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;\n-\tpinctrl-names = \"default\";\n-\thdmi-supply = <&dc_in>;\n-};\n-\n-&hdmi_tx_tmds_port {\n-\thdmi_tx_tmds_out: endpoint {\n-\t\tremote-endpoint = <&hdmi_connector_in>;\n-\t};\n-};\n-\n-&ir {\n-\tstatus = \"okay\";\n-\tpinctrl-0 = <&remote_input_ao_pins>;\n-\tpinctrl-names = \"default\";\n-};\n-\n-&pwm_AO_cd {\n-\tpinctrl-0 = <&pwm_ao_d_e_pins>;\n-\tpinctrl-names = \"default\";\n-\tclocks = <&xtal>;\n-\tclock-names = \"clkin1\";\n-\tstatus = \"okay\";\n-};\n-\n-&saradc {\n-\tstatus = \"okay\";\n-\tvref-supply = <&vddao_1v8>;\n-};\n-\n-/* SD card */\n-&sd_emmc_b {\n-\tstatus = \"okay\";\n-\tpinctrl-0 = <&sdcard_c_pins>;\n-\tpinctrl-1 = <&sdcard_clk_gate_c_pins>;\n-\tpinctrl-names = \"default\", \"clk-gate\";\n-\n-\tbus-width = <4>;\n-\tcap-sd-highspeed;\n-\tmax-frequency = <50000000>;\n-\tdisable-wp;\n-\n-\t/* TOFIX: SD card is barely usable in SDR modes */\n-\n-\tcd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;\n-\tvmmc-supply = <&tflash_vdd>;\n-\tvqmmc-supply = <&vddio_c>;\n-};\n-\n-/* eMMC */\n-&sd_emmc_c {\n-\tstatus = \"okay\";\n-\tpinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;\n-\tpinctrl-1 = <&emmc_clk_gate_pins>;\n-\tpinctrl-names = \"default\", \"clk-gate\";\n-\n-\tbus-width = <8>;\n-\tcap-mmc-highspeed;\n-\tmmc-ddr-1_8v;\n-\tmmc-hs200-1_8v;\n-\tmax-frequency = <200000000>;\n-\tdisable-wp;\n-\n-\tmmc-pwrseq = <&emmc_pwrseq>;\n-\tvmmc-supply = <&vddao_3v3>;\n-\tvqmmc-supply = <&emmc_1v8>;\n-};\n-\n &tdmif_b {\n \tstatus = \"okay\";\n };\n@@ -625,22 +220,3 @@\n &toddr_c {\n \tstatus = \"okay\";\n };\n-\n-&uart_AO {\n-\tstatus = \"okay\";\n-\tpinctrl-0 = <&uart_ao_a_pins>;\n-\tpinctrl-names = \"default\";\n-};\n-\n-&usb {\n-\tstatus = \"okay\";\n-};\n-\n-&usb2_phy0 {\n-\tphy-supply = <&dc_in>;\n-};\n-\n-&usb2_phy1 {\n-\t/* Enable the hub which is connected to this port */\n-\tphy-supply = <&vl_pwr_en>;\n-};\ndiff --git a/arch/arm/dts/meson-sm1-bananapi.dtsi b/arch/arm/dts/meson-sm1-bananapi.dtsi\nnew file mode 100644\nindex 0000000000..c914f11481\n--- /dev/null\n+++ b/arch/arm/dts/meson-sm1-bananapi.dtsi\n@@ -0,0 +1,435 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2021 BayLibre SAS\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ */\n+\n+#include \"meson-sm1.dtsi\"\n+#include <dt-bindings/leds/common.h>\n+#include <dt-bindings/input/linux-event-codes.h>\n+#include <dt-bindings/gpio/meson-g12a-gpio.h>\n+\n+/ {\n+\tadc_keys {\n+\t\tcompatible = \"adc-keys\";\n+\t\tio-channels = <&saradc 2>;\n+\t\tio-channel-names = \"buttons\";\n+\t\tkeyup-threshold-microvolt = <1800000>;\n+\n+\t\tkey {\n+\t\t\tlabel = \"SW3\";\n+\t\t\tlinux,code = <BTN_3>;\n+\t\t\tpress-threshold-microvolt = <1700000>;\n+\t\t};\n+\t};\n+\n+\taliases {\n+\t\tserial0 = &uart_AO;\n+\t\tethernet0 = &ethmac;\n+\t};\n+\n+\tchosen {\n+\t\tstdout-path = \"serial0:115200n8\";\n+\t};\n+\n+\temmc_pwrseq: emmc-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-emmc\";\n+\t\treset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;\n+\t};\n+\n+\tgpio-keys {\n+\t\tcompatible = \"gpio-keys\";\n+\n+\t\tkey {\n+\t\t\tlabel = \"SW1\";\n+\t\t\tlinux,code = <BTN_1>;\n+\t\t\tgpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;\n+\t\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t\tinterrupts = <3 IRQ_TYPE_EDGE_BOTH>;\n+\t\t};\n+\t};\n+\n+\thdmi-connector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-green {\n+\t\t\tcolor = <LED_COLOR_ID_GREEN>;\n+\t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tgpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;\n+\t\t};\n+\n+\t\tled-blue {\n+\t\t\tcolor = <LED_COLOR_ID_BLUE>;\n+\t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tgpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_LOW>;\n+\t\t\tlinux,default-trigger = \"heartbeat\";\n+\t\t};\n+\t};\n+\n+\tmemory@0 {\n+\t\tdevice_type = \"memory\";\n+\t\treg = <0x0 0x0 0x0 0x40000000>;\n+\t};\n+\n+\temmc_1v8: regulator-emmc_1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"EMMC_1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vddao_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tdc_in: regulator-dc_in {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"DC_IN\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddio_c: regulator-vddio_c {\n+\t\tcompatible = \"regulator-gpio\";\n+\t\tregulator-name = \"VDDIO_C\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\n+\t\tenable-gpio = <&gpio_ao GPIOE_2 GPIO_OPEN_DRAIN>;\n+\t\tenable-active-high;\n+\t\tregulator-always-on;\n+\n+\t\tgpios = <&gpio_ao GPIOAO_6 GPIO_OPEN_DRAIN>;\n+\t\tgpios-states = <1>;\n+\n+\t\tstates = <1800000 0>,\n+\t\t\t <3300000 1>;\n+\t};\n+\n+\ttflash_vdd: regulator-tflash_vdd {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"TFLASH_VDD\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&dc_in>;\n+\t\tgpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;\n+\t\tenable-active-high;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddao_1v8: regulator-vddao_1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDAO_1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vddao_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddao_3v3: regulator-vddao_3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDAO_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&dc_in>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddcpu: regulator-vddcpu {\n+\t\t/*\n+\t\t * SY8120B1ABC DC/DC Regulator.\n+\t\t */\n+\t\tcompatible = \"pwm-regulator\";\n+\n+\t\tregulator-name = \"VDDCPU\";\n+\t\tregulator-min-microvolt = <690000>;\n+\t\tregulator-max-microvolt = <1050000>;\n+\n+\t\tpwm-supply = <&dc_in>;\n+\n+\t\tpwms = <&pwm_AO_cd 1 1250 0>;\n+\t\tpwm-dutycycle-range = <100 0>;\n+\n+\t\tregulator-boot-on;\n+\t\tregulator-always-on;\n+\t};\n+\n+\t/* USB Hub Power Enable */\n+\tvl_pwr_en: regulator-vl_pwr_en {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VL_PWR_EN\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tvin-supply = <&dc_in>;\n+\n+\t\tgpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;\n+\t\tenable-active-high;\n+\t};\n+};\n+\n+&arb {\n+\tstatus = \"okay\";\n+};\n+\n+&cpu0 {\n+\tcpu-supply = <&vddcpu>;\n+\toperating-points-v2 = <&cpu_opp_table>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu1 {\n+\tcpu-supply = <&vddcpu>;\n+\toperating-points-v2 = <&cpu_opp_table>;\n+\tclocks = <&clkc CLKID_CPU1_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu2 {\n+\tcpu-supply = <&vddcpu>;\n+\toperating-points-v2 = <&cpu_opp_table>;\n+\tclocks = <&clkc CLKID_CPU2_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu3 {\n+\tcpu-supply = <&vddcpu>;\n+\toperating-points-v2 = <&cpu_opp_table>;\n+\tclocks = <&clkc CLKID_CPU3_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&ext_mdio {\n+\texternal_phy: ethernet-phy@0 {\n+\t\t/* Realtek RTL8211F (0x001cc916) */\n+\t\treg = <0>;\n+\t\tmax-speed = <1000>;\n+\n+\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t/* MAC_INTR on GPIOZ_14 */\n+\t\tinterrupts = <26 IRQ_TYPE_LEVEL_LOW>;\n+\t};\n+};\n+\n+&ethmac {\n+\tpinctrl-0 = <&eth_pins>, <&eth_rgmii_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"okay\";\n+\tphy-mode = \"rgmii-txid\";\n+\tphy-handle = <&external_phy>;\n+};\n+\n+&gpio {\n+\tgpio-line-names =\n+\t\t/* GPIOZ */\n+\t\t\"ETH_MDIO\", /* GPIOZ_0 */\n+\t\t\"ETH_MDC\", /* GPIOZ_1 */\n+\t\t\"ETH_RXCLK\", /* GPIOZ_2 */\n+\t\t\"ETH_RX_DV\", /* GPIOZ_3 */\n+\t\t\"ETH_RXD0\", /* GPIOZ_4 */\n+\t\t\"ETH_RXD1\", /* GPIOZ_5 */\n+\t\t\"ETH_RXD2\", /* GPIOZ_6 */\n+\t\t\"ETH_RXD3\", /* GPIOZ_7 */\n+\t\t\"ETH_TXCLK\", /* GPIOZ_8 */\n+\t\t\"ETH_TXEN\", /* GPIOZ_9 */\n+\t\t\"ETH_TXD0\", /* GPIOZ_10 */\n+\t\t\"ETH_TXD1\", /* GPIOZ_11 */\n+\t\t\"ETH_TXD2\", /* GPIOZ_12 */\n+\t\t\"ETH_TXD3\", /* GPIOZ_13 */\n+\t\t\"ETH_INTR\", /* GPIOZ_14 */\n+\t\t\"ETH_NRST\", /* GPIOZ_15 */\n+\t\t/* GPIOH */\n+\t\t\"HDMI_SDA\", /* GPIOH_0 */\n+\t\t\"HDMI_SCL\", /* GPIOH_1 */\n+\t\t\"HDMI_HPD\", /* GPIOH_2 */\n+\t\t\"HDMI_CEC\", /* GPIOH_3 */\n+\t\t\"VL-RST_N\", /* GPIOH_4 */\n+\t\t\"CON1-P36\", /* GPIOH_5 */\n+\t\t\"VL-PWREN\", /* GPIOH_6 */\n+\t\t\"WiFi_3V3_1V8\", /* GPIOH_7 */\n+\t\t\"TFLASH_VDD_EN\", /* GPIOH_8 */\n+\t\t/* BOOT */\n+\t\t\"eMMC_D0\", /* BOOT_0 */\n+\t\t\"eMMC_D1\", /* BOOT_1 */\n+\t\t\"eMMC_D2\", /* BOOT_2 */\n+\t\t\"eMMC_D3\", /* BOOT_3 */\n+\t\t\"eMMC_D4\", /* BOOT_4 */\n+\t\t\"eMMC_D5\", /* BOOT_5 */\n+\t\t\"eMMC_D6\", /* BOOT_6 */\n+\t\t\"eMMC_D7\", /* BOOT_7 */\n+\t\t\"eMMC_CLK\", /* BOOT_8 */\n+\t\t\"\",\n+\t\t\"eMMC_CMD\", /* BOOT_10 */\n+\t\t\"\",\n+\t\t\"eMMC_RST#\", /* BOOT_12 */\n+\t\t\"eMMC_DS\", /* BOOT_13 */\n+\t\t\"\", \"\",\n+\t\t/* GPIOC */\n+\t\t\"SD_D0_B\", /* GPIOC_0 */\n+\t\t\"SD_D1_B\", /* GPIOC_1 */\n+\t\t\"SD_D2_B\", /* GPIOC_2 */\n+\t\t\"SD_D3_B\", /* GPIOC_3 */\n+\t\t\"SD_CLK_B\", /* GPIOC_4 */\n+\t\t\"SD_CMD_B\", /* GPIOC_5 */\n+\t\t\"CARD_EN_DET\", /* GPIOC_6 */\n+\t\t\"\",\n+\t\t/* GPIOA */\n+\t\t\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\",\n+\t\t\"\", \"\", \"\", \"\", \"\", \"\",\n+\t\t\"CON1-P27\", /* GPIOA_14 */\n+\t\t\"CON1-P28\", /* GPIOA_15 */\n+\t\t/* GPIOX */\n+\t\t\"CON1-P16\", /* GPIOX_0 */\n+\t\t\"CON1-P18\", /* GPIOX_1 */\n+\t\t\"CON1-P22\", /* GPIOX_2 */\n+\t\t\"CON1-P11\", /* GPIOX_3 */\n+\t\t\"CON1-P13\", /* GPIOX_4 */\n+\t\t\"CON1-P07\", /* GPIOX_5 */\n+\t\t\"CON1-P33\", /* GPIOX_6 */\n+\t\t\"CON1-P15\", /* GPIOX_7 */\n+\t\t\"CON1-P19\", /* GPIOX_8 */\n+\t\t\"CON1-P21\", /* GPIOX_9 */\n+\t\t\"CON1-P24\", /* GPIOX_10 */\n+\t\t\"CON1-P23\", /* GPIOX_11 */\n+\t\t\"CON1-P08\", /* GPIOX_12 */\n+\t\t\"CON1-P10\", /* GPIOX_13 */\n+\t\t\"CON1-P29\", /* GPIOX_14 */\n+\t\t\"CON1-P31\", /* GPIOX_15 */\n+\t\t\"CON1-P26\", /* GPIOX_16 */\n+\t\t\"CON1-P03\", /* GPIOX_17 */\n+\t\t\"CON1-P05\", /* GPIOX_18 */\n+\t\t\"CON1-P32\"; /* GPIOX_19 */\n+\n+\t/*\n+\t * WARNING: The USB Hub needs a reset signal to be turned high in\n+\t * order to be detected by the USB Controller. This signal should\n+\t * be handled by a USB specific power sequence to reset the Hub\n+\t * when the USB bus is powered down.\n+\t */\n+\tusb-hub {\n+\t\tgpio-hog;\n+\t\tgpios = <GPIOH_4 GPIO_ACTIVE_HIGH>;\n+\t\toutput-high;\n+\t\tline-name = \"usb-hub-reset\";\n+\t};\n+};\n+\n+&gpio_ao {\n+\tgpio-line-names =\n+\t\t/* GPIOAO */\n+\t\t\"DEBUG TX\", /* GPIOAO_0 */\n+\t\t\"DEBUG RX\", /* GPIOAO_1 */\n+\t\t\"SYS_LED2\", /* GPIOAO_2 */\n+\t\t\"UPDATE_KEY\", /* GPIOAO_3 */\n+\t\t\"CON1-P40\", /* GPIOAO_4 */\n+\t\t\"IR_IN\", /* GPIOAO_5 */\n+\t\t\"TF_3V3N_1V8_EN\", /* GPIOAO_6 */\n+\t\t\"CON1-P35\", /* GPIOAO_7 */\n+\t\t\"CON1-P12\", /* GPIOAO_8 */\n+\t\t\"CON1-P37\", /* GPIOAO_9 */\n+\t\t\"CON1-P38\", /* GPIOAO_10 */\n+\t\t\"SYS_LED\", /* GPIOAO_11 */\n+\t\t/* GPIOE */\n+\t\t\"VDDEE_PWM\", /* GPIOE_0 */\n+\t\t\"VDDCPU_PWM\", /* GPIOE_1 */\n+\t\t\"TF_PWR_EN\"; /* GPIOE_2 */\n+};\n+\n+&hdmi_tx {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-supply = <&dc_in>;\n+};\n+\n+&hdmi_tx_tmds_port {\n+\thdmi_tx_tmds_out: endpoint {\n+\t\tremote-endpoint = <&hdmi_connector_in>;\n+\t};\n+};\n+\n+&ir {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&remote_input_ao_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&pwm_AO_cd {\n+\tpinctrl-0 = <&pwm_ao_d_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin1\";\n+\tstatus = \"okay\";\n+};\n+\n+&saradc {\n+\tstatus = \"okay\";\n+\tvref-supply = <&vddao_1v8>;\n+};\n+\n+/* SD card */\n+&sd_emmc_b {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&sdcard_c_pins>;\n+\tpinctrl-1 = <&sdcard_clk_gate_c_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tmax-frequency = <50000000>;\n+\tdisable-wp;\n+\n+\t/* TOFIX: SD card is barely usable in SDR modes */\n+\n+\tcd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;\n+\tvmmc-supply = <&tflash_vdd>;\n+\tvqmmc-supply = <&vddio_c>;\n+};\n+\n+/* eMMC */\n+&sd_emmc_c {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;\n+\tpinctrl-1 = <&emmc_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <8>;\n+\tcap-mmc-highspeed;\n+\tmmc-ddr-1_8v;\n+\tmmc-hs200-1_8v;\n+\tmax-frequency = <200000000>;\n+\tdisable-wp;\n+\n+\tmmc-pwrseq = <&emmc_pwrseq>;\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&emmc_1v8>;\n+};\n+\n+&uart_AO {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_ao_a_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&usb {\n+\tstatus = \"okay\";\n+};\n+\n+&usb2_phy0 {\n+\tphy-supply = <&dc_in>;\n+};\n+\n+&usb2_phy1 {\n+\t/* Enable the hub which is connected to this port */\n+\tphy-supply = <&vl_pwr_en>;\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0017-WIP-ARM-dts-add-support-for-BananaPi-M2-Pro.patch",
    "content": "From dbf80e3d843cb58b9098d7c0e24c9ab1208003a7 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Fri, 17 Feb 2023 05:38:46 +0000\nSubject: [PATCH 17/25] WIP: ARM: dts: add support for BananaPi M2-Pro\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm/dts/Makefile                         |  1 +\n .../dts/meson-sm1-bananapi-m2-pro-u-boot.dtsi | 13 +++\n arch/arm/dts/meson-sm1-bananapi-m2-pro.dts    | 98 +++++++++++++++++++\n 3 files changed, 112 insertions(+)\n create mode 100644 arch/arm/dts/meson-sm1-bananapi-m2-pro-u-boot.dtsi\n create mode 100644 arch/arm/dts/meson-sm1-bananapi-m2-pro.dts\n\ndiff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile\nindex 926ae0aae4..4e9fa81e18 100644\n--- a/arch/arm/dts/Makefile\n+++ b/arch/arm/dts/Makefile\n@@ -203,6 +203,7 @@ dtb-$(CONFIG_ARCH_MESON) += \\\n \tmeson-g12b-odroid-n2.dtb \\\n \tmeson-g12b-odroid-n2-plus.dtb \\\n \tmeson-g12b-radxa-zero2.dtb \\\n+\tmeson-sm1-bananapi-m2-pro.dtb \\\n \tmeson-sm1-bananapi-m5.dtb \\\n \tmeson-sm1-khadas-vim3l.dtb \\\n \tmeson-sm1-odroid-c4.dtb \\\ndiff --git a/arch/arm/dts/meson-sm1-bananapi-m2-pro-u-boot.dtsi b/arch/arm/dts/meson-sm1-bananapi-m2-pro-u-boot.dtsi\nnew file mode 100644\nindex 0000000000..a86fdb5668\n--- /dev/null\n+++ b/arch/arm/dts/meson-sm1-bananapi-m2-pro-u-boot.dtsi\n@@ -0,0 +1,13 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2021 BayLibre, SAS\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ */\n+\n+#include \"meson-sm1-u-boot.dtsi\"\n+\n+&ethmac {\n+\tsnps,reset-gpio = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;\n+\tsnps,reset-delays-us = <0 10000 1000000>;\n+\tsnps,reset-active-low;\n+};\ndiff --git a/arch/arm/dts/meson-sm1-bananapi-m2-pro.dts b/arch/arm/dts/meson-sm1-bananapi-m2-pro.dts\nnew file mode 100644\nindex 0000000000..4890d5d9a4\n--- /dev/null\n+++ b/arch/arm/dts/meson-sm1-bananapi-m2-pro.dts\n@@ -0,0 +1,98 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2021 BayLibre SAS\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-sm1-bananapi.dtsi\"\n+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>\n+\n+/ {\n+\tcompatible = \"bananapi,bpi-m2-pro\", \"amlogic,sm1\";\n+\tmodel = \"Banana Pi BPI-M2-PRO\";\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,axg-sound-card\";\n+\t\tmodel = \"BPI-M2-PRO\";\n+\t\taudio-aux-devs = <&tdmout_b>;\n+\t\taudio-routing = \"TDMOUT_B IN 0\", \"FRDDR_A OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 1\", \"FRDDR_B OUT 1\",\n+\t\t\t\t\"TDMOUT_B IN 2\", \"FRDDR_C OUT 1\",\n+\t\t\t\t\"TDM_B Playback\", \"TDMOUT_B OUT\";\n+\n+\t\tassigned-clocks = <&clkc CLKID_MPLL2>,\n+\t\t\t\t  <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\t\tstatus = \"okay\";\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&frddr_a>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&frddr_b>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&frddr_c>;\n+\t\t};\n+\n+\t\t/* 8ch hdmi interface */\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&tdmif_b>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tdai-tdm-slot-tx-mask-0 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-1 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-2 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-3 = <1 1>;\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* hdmi glue */\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&clkc_audio {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_a {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_b {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_c {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmif_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmout_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tohdmitx {\n+\tstatus = \"okay\";\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0018-WIP-boards-add-BananaPi-M2-Pro-defconfig.patch",
    "content": "From 0be895d75648124c0bd8d7fce1fe61c3dbacbe5f Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Fri, 17 Feb 2023 05:41:36 +0000\nSubject: [PATCH 18/25] WIP: boards: add BananaPi M2-Pro defconfig\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n configs/bananapi-m2-pro_defconfig | 76 +++++++++++++++++++++++++++++++\n 1 file changed, 76 insertions(+)\n create mode 100644 configs/bananapi-m2-pro_defconfig\n\ndiff --git a/configs/bananapi-m2-pro_defconfig b/configs/bananapi-m2-pro_defconfig\nnew file mode 100644\nindex 0000000000..1c2b8ab95e\n--- /dev/null\n+++ b/configs/bananapi-m2-pro_defconfig\n@@ -0,0 +1,76 @@\n+CONFIG_ARM=y\n+CONFIG_ARCH_MESON=y\n+CONFIG_SYS_TEXT_BASE=0x01000000\n+CONFIG_NR_DRAM_BANKS=1\n+CONFIG_ENV_SIZE=0x2000\n+CONFIG_DM_GPIO=y\n+CONFIG_DEFAULT_DEVICE_TREE=\"meson-sm1-bananapi-m2-pro\"\n+CONFIG_MESON_G12A=y\n+CONFIG_DEBUG_UART_BASE=0xff803000\n+CONFIG_DEBUG_UART_CLOCK=24000000\n+CONFIG_IDENT_STRING=\"bpi-m2-pro\"\n+CONFIG_SYS_LOAD_ADDR=0x1000000\n+CONFIG_DEBUG_UART=y\n+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y\n+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000\n+CONFIG_REMAKE_ELF=y\n+CONFIG_OF_BOARD_SETUP=y\n+# CONFIG_DISPLAY_CPUINFO is not set\n+CONFIG_MISC_INIT_R=y\n+CONFIG_SYS_MAXARGS=32\n+# CONFIG_CMD_BDI is not set\n+# CONFIG_CMD_IMI is not set\n+CONFIG_CMD_GPIO=y\n+# CONFIG_CMD_LOADS is not set\n+CONFIG_CMD_MMC=y\n+CONFIG_CMD_USB=y\n+CONFIG_CMD_USB_MASS_STORAGE=y\n+# CONFIG_CMD_SETEXPR is not set\n+CONFIG_CMD_REGULATOR=y\n+CONFIG_OF_CONTROL=y\n+CONFIG_SYS_RELOC_GD_ENV_ADDR=y\n+CONFIG_ADC=y\n+CONFIG_SARADC_MESON=y\n+CONFIG_MMC_MESON_GX=y\n+CONFIG_PHY_REALTEK=y\n+CONFIG_DM_MDIO=y\n+CONFIG_DM_MDIO_MUX=y\n+CONFIG_ETH_DESIGNWARE_MESON8B=y\n+CONFIG_MDIO_MUX_MESON_G12A=y\n+CONFIG_MESON_G12A_USB_PHY=y\n+CONFIG_PINCTRL=y\n+CONFIG_PINCTRL_MESON_G12A=y\n+CONFIG_POWER_DOMAIN=y\n+CONFIG_MESON_EE_POWER_DOMAIN=y\n+CONFIG_DM_REGULATOR=y\n+CONFIG_DM_REGULATOR_FIXED=y\n+CONFIG_DM_RESET=y\n+CONFIG_DEBUG_UART_ANNOUNCE=y\n+CONFIG_DEBUG_UART_SKIP_INIT=y\n+CONFIG_MESON_SERIAL=y\n+CONFIG_USB=y\n+CONFIG_USB_XHCI_HCD=y\n+CONFIG_USB_XHCI_DWC3=y\n+CONFIG_USB_DWC3=y\n+# CONFIG_USB_DWC3_GADGET is not set\n+CONFIG_USB_DWC3_MESON_G12A=y\n+CONFIG_USB_KEYBOARD=y\n+CONFIG_USB_GADGET=y\n+CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e\n+CONFIG_USB_GADGET_PRODUCT_NUM=0xfada\n+CONFIG_USB_GADGET_DWC2_OTG=y\n+CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y\n+CONFIG_USB_GADGET_DOWNLOAD=y\n+CONFIG_DM_VIDEO=y\n+# CONFIG_VIDEO_BPP8 is not set\n+# CONFIG_VIDEO_BPP16 is not set\n+CONFIG_SYS_WHITE_ON_BLACK=y\n+CONFIG_VIDEO_MESON=y\n+CONFIG_VIDEO_DT_SIMPLEFB=y\n+CONFIG_SPLASH_SCREEN=y\n+CONFIG_SPLASH_SCREEN_ALIGN=y\n+CONFIG_VIDEO_BMP_RLE8=y\n+CONFIG_BMP_16BPP=y\n+CONFIG_BMP_24BPP=y\n+CONFIG_BMP_32BPP=y\n+CONFIG_OF_LIBFDT_OVERLAY=y\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0019-WIP-docs-boards-amlogic-update-for-BananaPi-M2-Pro.patch",
    "content": "From b4870c47202687c6a6880b449c97a2e32ec3d278 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Fri, 17 Feb 2023 05:49:44 +0000\nSubject: [PATCH 19/25] WIP: docs: boards: amlogic: update for BananaPi M2-Pro\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n board/amlogic/u200/MAINTAINERS | 1 +\n doc/board/amlogic/index.rst    | 5 +++--\n 2 files changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/board/amlogic/u200/MAINTAINERS b/board/amlogic/u200/MAINTAINERS\nindex 47cec234a1..2a2d9d4c49 100644\n--- a/board/amlogic/u200/MAINTAINERS\n+++ b/board/amlogic/u200/MAINTAINERS\n@@ -4,6 +4,7 @@ S:\tMaintained\n L:\tu-boot-amlogic@groups.io\n F:\tboard/amlogic/u200/\n F:\tconfigs/u200_defconfig\n+F:\tconfigs/bananapi-m2-pro_defconfig\n F:\tconfigs/bananapi-m5_defconfig\n F:\tconfigs/radxa-zero_defconfig\n F:\tdoc/board/amlogic/u200.rst\ndiff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst\nindex b8b6f9b98a..629284fca9 100644\n--- a/doc/board/amlogic/index.rst\n+++ b/doc/board/amlogic/index.rst\n@@ -19,7 +19,8 @@ This matrix concerns the actual source code version.\n |                               | Nanopi-K2 | Khadas-VIM      | Khadas VIM2  | JetHub J100 | SEI510     | Khadas-VIM3 | Khadas-VIM3L |\n |                               | P200      | LibreTech-CC v1 | Libretech-PC |             | Radxa Zero | GT-King/Pro | Odroid-C4    |\n |                               | P201      | LibreTech-AC v2 | WeTek Core2  |             |            | GSKing-X    | Odroid-HC4   |\n-|                               |           | JetHub J80      |              |             |            | Radxa Zero2 | BananaPi-M5  |\n+|                               |           | JetHub J80      |              |             |            | Radxa Zero2 | BPi-M2-Pro   |\n+|                               |           |                 |              |             |            | Radxa Zero2 | BPi-M5       |\n +-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+\n | UART                          | **Yes**   | **Yes**         | **Yes**      | **Yes**     | **Yes**    | **Yes**     | **Yes**      |\n +-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+\n@@ -37,7 +38,7 @@ This matrix concerns the actual source code version.\n +-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+\n | Multi-core                    | **Yes**   | **Yes**         | **Yes**      | **Yes**     | **Yes**    | **Yes**     | **Yes**      |\n +-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+\n-| Fuse access                   | **Yes**   | **Yes**         |**Yes**       |**Yes**      |**Yes**     |**Yes**      | **Yes**      |\n+| Fuse access                   | **Yes**   | **Yes**         | **Yes**      | **Yes**     | **Yes**    | **Yes**     | **Yes**      |\n +-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+\n | SPI (FC)                      | **Yes**   | **Yes**         | **Yes**      | **Yes**     |**Yes**     | **Yes**     | No           |\n +-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0020-WIP-boards-add-BananaPi-M2S-defconfig.patch",
    "content": "From 665eff902425685a2278e393a89452276e4ea665 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 18 Feb 2023 08:06:04 +0000\nSubject: [PATCH 20/25] WIP: boards: add BananaPi M2S defconfig\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n configs/bananapi-m2s_defconfig | 82 ++++++++++++++++++++++++++++++++++\n 1 file changed, 82 insertions(+)\n create mode 100644 configs/bananapi-m2s_defconfig\n\ndiff --git a/configs/bananapi-m2s_defconfig b/configs/bananapi-m2s_defconfig\nnew file mode 100644\nindex 0000000000..7a35ea623d\n--- /dev/null\n+++ b/configs/bananapi-m2s_defconfig\n@@ -0,0 +1,82 @@\n+CONFIG_ARM=y\n+CONFIG_ARCH_MESON=y\n+CONFIG_SYS_TEXT_BASE=0x01000000\n+CONFIG_NR_DRAM_BANKS=1\n+CONFIG_ENV_SIZE=0x2000\n+CONFIG_DM_GPIO=y\n+CONFIG_DEFAULT_DEVICE_TREE=\"meson-g12b-a311d-bananapi-m2s\"\n+CONFIG_MESON_G12A=y\n+CONFIG_DEBUG_UART_BASE=0xff803000\n+CONFIG_DEBUG_UART_CLOCK=24000000\n+CONFIG_IDENT_STRING=\" bpi-m2s\"\n+CONFIG_SYS_LOAD_ADDR=0x1000000\n+CONFIG_DEBUG_UART=y\n+CONFIG_AHCI=y\n+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y\n+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000\n+CONFIG_REMAKE_ELF=y\n+CONFIG_OF_BOARD_SETUP=y\n+# CONFIG_DISPLAY_CPUINFO is not set\n+CONFIG_MISC_INIT_R=y\n+CONFIG_SYS_MAXARGS=32\n+# CONFIG_CMD_BDI is not set\n+# CONFIG_CMD_IMI is not set\n+CONFIG_CMD_GPIO=y\n+# CONFIG_CMD_LOADS is not set\n+CONFIG_CMD_MMC=y\n+CONFIG_CMD_PCI=y\n+CONFIG_CMD_USB=y\n+CONFIG_CMD_USB_MASS_STORAGE=y\n+# CONFIG_CMD_SETEXPR is not set\n+CONFIG_CMD_REGULATOR=y\n+CONFIG_OF_CONTROL=y\n+CONFIG_SYS_RELOC_GD_ENV_ADDR=y\n+CONFIG_ADC=y\n+CONFIG_SARADC_MESON=y\n+CONFIG_AHCI_PCI=y\n+CONFIG_MMC_MESON_GX=y\n+CONFIG_PHY_REALTEK=y\n+CONFIG_DM_MDIO=y\n+CONFIG_DM_MDIO_MUX=y\n+CONFIG_ETH_DESIGNWARE_MESON8B=y\n+CONFIG_MDIO_MUX_MESON_G12A=y\n+CONFIG_PCI=y\n+CONFIG_PCIE_DW_MESON=y\n+CONFIG_MESON_G12A_USB_PHY=y\n+CONFIG_PINCTRL=y\n+CONFIG_PINCTRL_MESON_G12A=y\n+CONFIG_POWER_DOMAIN=y\n+CONFIG_MESON_EE_POWER_DOMAIN=y\n+CONFIG_DM_REGULATOR=y\n+CONFIG_DM_REGULATOR_FIXED=y\n+CONFIG_DM_REGULATOR_GPIO=y\n+CONFIG_DM_RESET=y\n+CONFIG_DEBUG_UART_ANNOUNCE=y\n+CONFIG_DEBUG_UART_SKIP_INIT=y\n+CONFIG_MESON_SERIAL=y\n+CONFIG_USB=y\n+CONFIG_USB_XHCI_HCD=y\n+CONFIG_USB_XHCI_DWC3=y\n+CONFIG_USB_DWC3=y\n+# CONFIG_USB_DWC3_GADGET is not set\n+CONFIG_USB_DWC3_MESON_G12A=y\n+CONFIG_USB_KEYBOARD=y\n+CONFIG_USB_GADGET=y\n+CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e\n+CONFIG_USB_GADGET_PRODUCT_NUM=0xfada\n+CONFIG_USB_GADGET_DWC2_OTG=y\n+CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y\n+CONFIG_USB_GADGET_DOWNLOAD=y\n+CONFIG_DM_VIDEO=y\n+# CONFIG_VIDEO_BPP8 is not set\n+# CONFIG_VIDEO_BPP16 is not set\n+CONFIG_SYS_WHITE_ON_BLACK=y\n+CONFIG_VIDEO_MESON=y\n+CONFIG_VIDEO_DT_SIMPLEFB=y\n+CONFIG_SPLASH_SCREEN=y\n+CONFIG_SPLASH_SCREEN_ALIGN=y\n+CONFIG_VIDEO_BMP_RLE8=y\n+CONFIG_BMP_16BPP=y\n+CONFIG_BMP_24BPP=y\n+CONFIG_BMP_32BPP=y\n+CONFIG_OF_LIBFDT_OVERLAY=y\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0021-WIP-docs-boards-amlogic-update-for-BananaPi-M2S.patch",
    "content": "From e1484036ca5e032a9039ed2f361f2b123a8efd64 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 18 Feb 2023 08:08:42 +0000\nSubject: [PATCH 21/25] WIP: docs: boards: amlogic: update for BananaPi M2S\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n board/amlogic/w400/MAINTAINERS | 2 ++\n doc/board/amlogic/index.rst    | 2 +-\n 2 files changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/board/amlogic/w400/MAINTAINERS b/board/amlogic/w400/MAINTAINERS\nindex 6e1ef9b8b8..d4b4d4f91d 100644\n--- a/board/amlogic/w400/MAINTAINERS\n+++ b/board/amlogic/w400/MAINTAINERS\n@@ -3,6 +3,8 @@ M:\tNeil Armstrong <neil.armstrong@linaro.org>\n S:\tMaintained\n L:\tu-boot-amlogic@groups.io\n F:\tboard/amlogic/w400/\n+F:\tconfigs/bananapi-m2s_defconfig\n F:\tconfigs/radxa-zero2_defconfig\n F:\tdoc/board/amlogic/w400.rst\n+F:\tdoc/board/amlogic/bananapi-m2s.rst\n F:\tdoc/board/amlogic/radxa-zero2.rst\ndiff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst\nindex 629284fca9..fd8d4185f8 100644\n--- a/doc/board/amlogic/index.rst\n+++ b/doc/board/amlogic/index.rst\n@@ -20,7 +20,7 @@ This matrix concerns the actual source code version.\n |                               | P200      | LibreTech-CC v1 | Libretech-PC |             | Radxa Zero | GT-King/Pro | Odroid-C4    |\n |                               | P201      | LibreTech-AC v2 | WeTek Core2  |             |            | GSKing-X    | Odroid-HC4   |\n |                               |           | JetHub J80      |              |             |            | Radxa Zero2 | BPi-M2-Pro   |\n-|                               |           |                 |              |             |            | Radxa Zero2 | BPi-M5       |\n+|                               |           |                 |              |             |            | BPI-M2S     | BPi-M5       |\n +-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+\n | UART                          | **Yes**   | **Yes**         | **Yes**      | **Yes**     | **Yes**    | **Yes**     | **Yes**      |\n +-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0022-WIP-ARM-dts-add-support-for-BananaPi-M2S.patch",
    "content": "From 821819ff0d9185954b251d5fd197b5b67cdd08d3 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 18 Feb 2023 07:59:25 +0000\nSubject: [PATCH 22/25] WIP: ARM: dts: add support for BananaPi M2S\n\nImport the device-tree from Linux 6.x\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm/dts/Makefile                         |   1 +\n .../arm/dts/meson-g12b-a311d-bananapi-m2s.dts |  14 +\n arch/arm/dts/meson-g12b-bananapi-u-boot.dtsi  |  13 +\n arch/arm/dts/meson-g12b-bananapi.dtsi         | 551 ++++++++++++++++++\n .../arm/dts/meson-g12b-s922x-bananapi-m2s.dts |  14 +\n 5 files changed, 593 insertions(+)\n create mode 100644 arch/arm/dts/meson-g12b-a311d-bananapi-m2s.dts\n create mode 100644 arch/arm/dts/meson-g12b-bananapi-u-boot.dtsi\n create mode 100644 arch/arm/dts/meson-g12b-bananapi.dtsi\n create mode 100644 arch/arm/dts/meson-g12b-s922x-bananapi-m2s.dts\n\ndiff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile\nindex 4e9fa81e18..788fec93a3 100644\n--- a/arch/arm/dts/Makefile\n+++ b/arch/arm/dts/Makefile\n@@ -196,6 +196,7 @@ dtb-$(CONFIG_ARCH_MESON) += \\\n \tmeson-g12a-radxa-zero.dtb \\\n \tmeson-g12a-sei510.dtb \\\n \tmeson-g12a-u200.dtb \\\n+\tmeson-g12b-a311d-bananapi-m2s.dtb \\\n \tmeson-g12b-a311d-khadas-vim3.dtb \\\n \tmeson-g12b-gtking.dtb \\\n \tmeson-g12b-gtking-pro.dtb \\\ndiff --git a/arch/arm/dts/meson-g12b-a311d-bananapi-m2s.dts b/arch/arm/dts/meson-g12b-a311d-bananapi-m2s.dts\nnew file mode 100644\nindex 0000000000..f6c950919b\n--- /dev/null\n+++ b/arch/arm/dts/meson-g12b-a311d-bananapi-m2s.dts\n@@ -0,0 +1,14 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2023 Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-g12b-a311d.dtsi\"\n+#include \"meson-g12b-bananapi.dtsi\"\n+\n+/ {\n+\tcompatible = \"bananapi,bpi-m2s\", \"amlogic,a311d\", \"amlogic,g12b\";\n+\tmodel = \"BananaPi M2S\";\n+};\ndiff --git a/arch/arm/dts/meson-g12b-bananapi-u-boot.dtsi b/arch/arm/dts/meson-g12b-bananapi-u-boot.dtsi\nnew file mode 100644\nindex 0000000000..a92f9e9ff1\n--- /dev/null\n+++ b/arch/arm/dts/meson-g12b-bananapi-u-boot.dtsi\n@@ -0,0 +1,13 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2019 BayLibre, SAS.\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ */\n+\n+#include \"meson-g12-common-u-boot.dtsi\"\n+\n+/* SARADC is needed for proper board variant detection */\n+&saradc {\n+\tstatus = \"okay\";\n+\tvref-supply = <&vddao_1v8>;\n+};\ndiff --git a/arch/arm/dts/meson-g12b-bananapi.dtsi b/arch/arm/dts/meson-g12b-bananapi.dtsi\nnew file mode 100644\nindex 0000000000..3a9f36ad4e\n--- /dev/null\n+++ b/arch/arm/dts/meson-g12b-bananapi.dtsi\n@@ -0,0 +1,551 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2023 Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+#include <dt-bindings/input/input.h>\n+#include <dt-bindings/leds/common.h>\n+#include <dt-bindings/gpio/meson-g12a-gpio.h>\n+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>\n+\n+/ {\n+\taliases {\n+\t\tserial0 = &uart_AO;\n+\t\tserial2 = &uart_A;\n+\t\tethernet0 = &ethmac;\n+\t};\n+\n+\tchosen {\n+\t\tstdout-path = \"serial0:115200n8\";\n+\t};\n+\n+\tmemory@0 {\n+\t\tdevice_type = \"memory\";\n+\t\treg = <0x0 0x0 0x0 0x80000000>;\n+\t};\n+\n+\tadc-keys {\n+\t\tcompatible = \"adc-keys\";\n+\t\tio-channels = <&saradc 2>;\n+\t\tio-channel-names = \"buttons\";\n+\t\tkeyup-threshold-microvolt = <1800000>;\n+\n+\t\tbutton-function {\n+\t\t\tlabel = \"RST\";\n+\t\t\tlinux,code = <KEY_POWER>;\n+\t\t\tpress-threshold-microvolt = <40000>;\n+\t\t};\n+\t};\n+\n+\temmc_pwrseq: emmc-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-emmc\";\n+\t\treset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;\n+\t};\n+\n+\tfan0: pwm-fan {\n+\t\tcompatible = \"pwm-fan\";\n+\t\t#cooling-cells = <2>;\n+\t\tcooling-min-state = <0>;\n+\t\tcooling-max-state = <3>;\n+\t\tcooling-levels = <0 120 170 220>;\n+\t\tpwms = <&pwm_cd 1 40000 0>;\n+\t};\n+\n+\thdmi-connector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tgreen {\n+\t\t\tcolor = <LED_COLOR_ID_GREEN>;\n+\t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tgpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;\n+\t\t};\n+\n+\t\tblue {\n+\t\t\tcolor = <LED_COLOR_ID_BLUE>;\n+\t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tgpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_LOW>;\n+\t\t\tlinux,default-trigger = \"heartbeat\";\n+\t\t};\n+\t};\n+\n+\tsdio_pwrseq: sdio-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-simple\";\n+\t\treset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"ext_clock\";\n+\t};\n+\n+\twifi32k: wifi32k {\n+\t\tcompatible = \"pwm-clock\";\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tpwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */\n+\t};\n+\n+\tdc_in: regulator-dc_in {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"DC_IN\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvcc_5v: regulator-vcc_5v {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_5V\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tvin-supply = <&dc_in>;\n+\n+\t\tgpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;\n+\t\tenable-active-high;\n+\t};\n+\n+\tvcc_3v3: regulator-vcc_3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&vsys_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvcc_1v8: regulator-vcc_1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VCC_1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vcc_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddao_1v8: regulator-vddao_1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDIO_AO1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vsys_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddcpu_a: regulator-vddcpu-a {\n+\t\tcompatible = \"pwm-regulator\";\n+\t\tregulator-name = \"VDDCPU_A\";\n+\t\tregulator-min-microvolt = <690000>;\n+\t\tregulator-max-microvolt = <1050000>;\n+\t\tpwm-supply = <&dc_in>;\n+\t\tpwms = <&pwm_ab 0 1250 0>;\n+\t\tpwm-dutycycle-range = <100 0>;\n+\t\tregulator-boot-on;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddcpu_b: regulator-vddcpu-b {\n+\t\tcompatible = \"pwm-regulator\";\n+\t\tregulator-name = \"VDDCPU_B\";\n+\t\tregulator-min-microvolt = <690000>;\n+\t\tregulator-max-microvolt = <1050000>;\n+\t\tpwm-supply = <&vsys_3v3>;\n+\t\tpwms = <&pwm_AO_cd 1 1250 0>;\n+\t\tpwm-dutycycle-range = <100 0>;\n+\t\tregulator-boot-on;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvsys_3v3: regulator-vsys_3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VSYS_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&dc_in>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\temmc_1v8: regulator-emmc_1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"EMMC_AO1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vcc_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tusb_pwr: regulator-usb_pwr {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"USB_PWR\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tvin-supply = <&vcc_5v>;\n+\n+\t\tgpio = <&gpio GPIOA_6 GPIO_ACTIVE_HIGH>;\n+\t\tenable-active-high;\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,axg-sound-card\";\n+\t\tmodel = \"BPI-M2S\";\n+\t\taudio-aux-devs = <&tdmin_a>, <&tdmout_a>;\n+\t\taudio-routing = \"TDMOUT_A IN 0\", \"FRDDR_A OUT 0\",\n+\t\t\t\t\"TDMOUT_A IN 1\", \"FRDDR_B OUT 0\",\n+\t\t\t\t\"TDMOUT_A IN 2\", \"FRDDR_C OUT 0\",\n+\t\t\t\t\"TDM_A Playback\", \"TDMOUT_A OUT\",\n+\t\t\t\t\"TDMIN_A IN 0\", \"TDM_A Capture\",\n+\t\t\t\t\"TDMIN_A IN 3\", \"TDM_A Loopback\",\n+\t\t\t\t\"TODDR_A IN 0\", \"TDMIN_A OUT\",\n+\t\t\t\t\"TODDR_B IN 0\", \"TDMIN_A OUT\",\n+\t\t\t\t\"TODDR_C IN 0\", \"TDMIN_A OUT\";\n+\n+\t\tassigned-clocks = <&clkc CLKID_MPLL2>,\n+\t\t\t\t  <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&frddr_a>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&frddr_b>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&frddr_c>;\n+\t\t};\n+\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&toddr_a>;\n+\t\t};\n+\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&toddr_b>;\n+\t\t};\n+\n+\t\tdai-link-5 {\n+\t\t\tsound-dai = <&toddr_c>;\n+\t\t};\n+\n+\t\t/* 8ch hdmi interface */\n+\t\tdai-link-6 {\n+\t\t\tsound-dai = <&tdmif_a>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tdai-tdm-slot-tx-mask-0 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-1 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-2 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-3 = <1 1>;\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* hdmi glue */\n+\t\tdai-link-7 {\n+\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&arb {\n+\tstatus = \"okay\";\n+};\n+\n+&clkc_audio {\n+\tstatus = \"okay\";\n+};\n+\n+&cec_AO {\n+\tpinctrl-0 = <&cec_ao_a_h_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"disabled\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&cecb_AO {\n+\tpinctrl-0 = <&cec_ao_b_h_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"okay\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&cpu0 {\n+\tcpu-supply = <&vddcpu_b>;\n+\toperating-points-v2 = <&cpu_opp_table_0>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu1 {\n+\tcpu-supply = <&vddcpu_b>;\n+\toperating-points-v2 = <&cpu_opp_table_0>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu100 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu101 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu102 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu103 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&ethmac {\n+\tpinctrl-0 = <&eth_pins>, <&eth_rgmii_pins>;\n+\tpinctrl-names = \"default\";\n+\tstatus = \"okay\";\n+\tphy-mode = \"rgmii\";\n+\tphy-handle = <&external_phy>;\n+\tamlogic,tx-delay-ns = <2>;\n+};\n+\n+&ext_mdio {\n+\texternal_phy: ethernet-phy@0 {\n+\t\t/* Realtek RTL8211F (0x001cc916) */\n+\t\treg = <0>;\n+\t\tmax-speed = <1000>;\n+\n+\t\treset-assert-us = <10000>;\n+\t\treset-deassert-us = <80000>;\n+\t\treset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;\n+\n+\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t/* MAC_INTR on GPIOZ_14 */\n+\t\tinterrupts = <26 IRQ_TYPE_LEVEL_LOW>;\n+\t};\n+};\n+\n+&frddr_a {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_b {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_c {\n+\tstatus = \"okay\";\n+};\n+\n+&hdmi_tx {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-supply = <&vcc_5v>;\n+};\n+\n+&hdmi_tx_tmds_port {\n+\thdmi_tx_tmds_out: endpoint {\n+\t\tremote-endpoint = <&hdmi_connector_in>;\n+\t};\n+};\n+\n+&pcie {\n+\tstatus = \"okay\";\n+\treset-gpios = <&gpio GPIOA_8 GPIO_ACTIVE_LOW>;\n+};\n+\n+&pwm_ab {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&pwm_a_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin0\";\n+};\n+\n+&pwm_cd {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&pwm_d_x6_pins>;\n+\tpinctrl-names = \"default\";\n+\tpwm-gpios = <&gpio GPIOAO_10 GPIO_ACTIVE_HIGH>;\n+};\n+\n+&pwm_ef {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&pwm_e_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&pwm_AO_cd {\n+\tpinctrl-0 = <&pwm_ao_d_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin1\";\n+\tstatus = \"okay\";\n+};\n+\n+&saradc {\n+\tstatus = \"okay\";\n+\tvref-supply = <&vddao_1v8>;\n+};\n+\n+/* SDIO */\n+&sd_emmc_a {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&sdio_pins>;\n+\tpinctrl-1 = <&sdio_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\t#address-cells = <1>;\n+\t#size-cells = <0>;\n+\n+\tbus-width = <4>;\n+\tsd-uhs-sdr104;\n+\tmax-frequency = <50000000>;\n+\n+\tnon-removable;\n+\tdisable-wp;\n+\n+\t/* WiFi firmware requires power to be kept while in suspend */\n+\tkeep-power-in-suspend;\n+\n+\tmmc-pwrseq = <&sdio_pwrseq>;\n+\n+\tvmmc-supply = <&vsys_3v3>;\n+\tvqmmc-supply = <&vddao_1v8>;\n+\n+\trtl8822cs: wifi@1 {\n+\t\treg = <1>;\n+\t};\n+};\n+\n+/* SD card */\n+&sd_emmc_b {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&sdcard_c_pins>;\n+\tpinctrl-1 = <&sdcard_clk_gate_c_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tmax-frequency = <50000000>;\n+\tdisable-wp;\n+\n+\tcd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;\n+\tvmmc-supply = <&vsys_3v3>;\n+\tvqmmc-supply = <&vsys_3v3>;\n+};\n+\n+/* eMMC */\n+&sd_emmc_c {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;\n+\tpinctrl-1 = <&emmc_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <8>;\n+\tcap-mmc-highspeed;\n+\tmmc-ddr-1_8v;\n+\tmmc-hs200-1_8v;\n+\tmax-frequency = <200000000>;\n+\tdisable-wp;\n+\n+\tmmc-pwrseq = <&emmc_pwrseq>;\n+\tvmmc-supply = <&vcc_3v3>;\n+\tvqmmc-supply = <&emmc_1v8>;\n+};\n+\n+&tdmif_a {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmin_a {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmout_a {\n+\tstatus = \"okay\";\n+};\n+\n+&toddr_a {\n+\tstatus = \"okay\";\n+};\n+\n+&toddr_b {\n+\tstatus = \"okay\";\n+};\n+\n+&toddr_c {\n+\tstatus = \"okay\";\n+};\n+\n+&tohdmitx {\n+\tstatus = \"okay\";\n+};\n+\n+&uart_A {\n+\tstatus = \"disabled\";\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tbluetooth {\n+\t\tcompatible = \"realtek,rtl8822cs-bt\";\n+\t\tenable-gpios  = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\thost-wake-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;\n+\t\tdevice-wake-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>;\n+\t\tmax-speed = <2000000>;\n+\t};\n+};\n+\n+&uart_AO {\n+\tstatus = \"okay\";\n+\tpinctrl-0 = <&uart_ao_a_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&usb2_phy0 {\n+\tphy-supply = <&dc_in>;\n+};\n+\n+&usb2_phy1 {\n+\tphy-supply = <&usb_pwr>;\n+};\n+\n+&usb3_pcie_phy {\n+\tphy-supply = <&usb_pwr>;\n+};\n+\n+&usb {\n+\tstatus = \"okay\";\n+\tdr_mode = \"peripheral\";\n+\tphys = <&usb2_phy0>, <&usb2_phy1>;\n+\tphy-names = \"usb2-phy0\", \"usb2-phy1\";\n+};\ndiff --git a/arch/arm/dts/meson-g12b-s922x-bananapi-m2s.dts b/arch/arm/dts/meson-g12b-s922x-bananapi-m2s.dts\nnew file mode 100644\nindex 0000000000..7f66f263a2\n--- /dev/null\n+++ b/arch/arm/dts/meson-g12b-s922x-bananapi-m2s.dts\n@@ -0,0 +1,14 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2023 Christian Hewitt <christianshewitt@gmail.com>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-g12b-s922x.dtsi\"\n+#include \"meson-g12b-bananapi.dtsi\"\n+\n+/ {\n+\tcompatible = \"bananapi,bpi-m2s\", \"amlogic,s922x\", \"amlogic,g12b\";\n+\tmodel = \"BananaPi M2S\";\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0023-WIP-boards-add-BananaPi-CM4IO-defconfig.patch",
    "content": "From 27b889069d184c4b6678d8dc46eef0788e385823 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 4 Mar 2023 07:33:24 +0000\nSubject: [PATCH 23/25] WIP: boards: add BananaPi CM4IO defconfig\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n configs/bananapi-cm4io_defconfig | 82 ++++++++++++++++++++++++++++++++\n 1 file changed, 82 insertions(+)\n create mode 100644 configs/bananapi-cm4io_defconfig\n\ndiff --git a/configs/bananapi-cm4io_defconfig b/configs/bananapi-cm4io_defconfig\nnew file mode 100644\nindex 0000000000..22442a9351\n--- /dev/null\n+++ b/configs/bananapi-cm4io_defconfig\n@@ -0,0 +1,82 @@\n+CONFIG_ARM=y\n+CONFIG_ARCH_MESON=y\n+CONFIG_SYS_TEXT_BASE=0x01000000\n+CONFIG_NR_DRAM_BANKS=1\n+CONFIG_ENV_SIZE=0x2000\n+CONFIG_DM_GPIO=y\n+CONFIG_DEFAULT_DEVICE_TREE=\"meson-g12b-bananapi-cm4-cm4io\"\n+CONFIG_MESON_G12A=y\n+CONFIG_DEBUG_UART_BASE=0xff803000\n+CONFIG_DEBUG_UART_CLOCK=24000000\n+CONFIG_IDENT_STRING=\" bpi-cm4io\"\n+CONFIG_SYS_LOAD_ADDR=0x1000000\n+CONFIG_DEBUG_UART=y\n+CONFIG_AHCI=y\n+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y\n+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000\n+CONFIG_REMAKE_ELF=y\n+CONFIG_OF_BOARD_SETUP=y\n+# CONFIG_DISPLAY_CPUINFO is not set\n+CONFIG_MISC_INIT_R=y\n+CONFIG_SYS_MAXARGS=32\n+# CONFIG_CMD_BDI is not set\n+# CONFIG_CMD_IMI is not set\n+CONFIG_CMD_GPIO=y\n+# CONFIG_CMD_LOADS is not set\n+CONFIG_CMD_MMC=y\n+CONFIG_CMD_PCI=y\n+CONFIG_CMD_USB=y\n+CONFIG_CMD_USB_MASS_STORAGE=y\n+# CONFIG_CMD_SETEXPR is not set\n+CONFIG_CMD_REGULATOR=y\n+CONFIG_OF_CONTROL=y\n+CONFIG_SYS_RELOC_GD_ENV_ADDR=y\n+CONFIG_ADC=y\n+CONFIG_SARADC_MESON=y\n+CONFIG_AHCI_PCI=y\n+CONFIG_MMC_MESON_GX=y\n+CONFIG_PHY_REALTEK=y\n+CONFIG_DM_MDIO=y\n+CONFIG_DM_MDIO_MUX=y\n+CONFIG_ETH_DESIGNWARE_MESON8B=y\n+CONFIG_MDIO_MUX_MESON_G12A=y\n+CONFIG_PCI=y\n+CONFIG_PCIE_DW_MESON=y\n+CONFIG_MESON_G12A_USB_PHY=y\n+CONFIG_PINCTRL=y\n+CONFIG_PINCTRL_MESON_G12A=y\n+CONFIG_POWER_DOMAIN=y\n+CONFIG_MESON_EE_POWER_DOMAIN=y\n+CONFIG_DM_REGULATOR=y\n+CONFIG_DM_REGULATOR_FIXED=y\n+CONFIG_DM_REGULATOR_GPIO=y\n+CONFIG_DM_RESET=y\n+CONFIG_DEBUG_UART_ANNOUNCE=y\n+CONFIG_DEBUG_UART_SKIP_INIT=y\n+CONFIG_MESON_SERIAL=y\n+CONFIG_USB=y\n+CONFIG_USB_XHCI_HCD=y\n+CONFIG_USB_XHCI_DWC3=y\n+CONFIG_USB_DWC3=y\n+# CONFIG_USB_DWC3_GADGET is not set\n+CONFIG_USB_DWC3_MESON_G12A=y\n+CONFIG_USB_KEYBOARD=y\n+CONFIG_USB_GADGET=y\n+CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e\n+CONFIG_USB_GADGET_PRODUCT_NUM=0xfada\n+CONFIG_USB_GADGET_DWC2_OTG=y\n+CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y\n+CONFIG_USB_GADGET_DOWNLOAD=y\n+CONFIG_DM_VIDEO=y\n+# CONFIG_VIDEO_BPP8 is not set\n+# CONFIG_VIDEO_BPP16 is not set\n+CONFIG_SYS_WHITE_ON_BLACK=y\n+CONFIG_VIDEO_MESON=y\n+CONFIG_VIDEO_DT_SIMPLEFB=y\n+CONFIG_SPLASH_SCREEN=y\n+CONFIG_SPLASH_SCREEN_ALIGN=y\n+CONFIG_VIDEO_BMP_RLE8=y\n+CONFIG_BMP_16BPP=y\n+CONFIG_BMP_24BPP=y\n+CONFIG_BMP_32BPP=y\n+CONFIG_OF_LIBFDT_OVERLAY=y\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0024-WIP-docs-boards-amlogic-update-for-BananaPi-CM4IO.patch",
    "content": "From 80343fe9cb591f3448de8fdf2e33c60bb37af68f Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 4 Mar 2023 07:35:49 +0000\nSubject: [PATCH 24/25] WIP: docs: boards: amlogic: update for BananaPi CM4IO\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n board/amlogic/w400/MAINTAINERS | 2 ++\n doc/board/amlogic/index.rst    | 3 ++-\n 2 files changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/board/amlogic/w400/MAINTAINERS b/board/amlogic/w400/MAINTAINERS\nindex d4b4d4f91d..7d9bea8454 100644\n--- a/board/amlogic/w400/MAINTAINERS\n+++ b/board/amlogic/w400/MAINTAINERS\n@@ -3,8 +3,10 @@ M:\tNeil Armstrong <neil.armstrong@linaro.org>\n S:\tMaintained\n L:\tu-boot-amlogic@groups.io\n F:\tboard/amlogic/w400/\n+F:\tconfigs/bananapi-cm4io_defconfig\n F:\tconfigs/bananapi-m2s_defconfig\n F:\tconfigs/radxa-zero2_defconfig\n F:\tdoc/board/amlogic/w400.rst\n+F:\tdoc/board/amlogic/bananapi-cm4io.rst\n F:\tdoc/board/amlogic/bananapi-m2s.rst\n F:\tdoc/board/amlogic/radxa-zero2.rst\ndiff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst\nindex fd8d4185f8..f15c86b9ff 100644\n--- a/doc/board/amlogic/index.rst\n+++ b/doc/board/amlogic/index.rst\n@@ -20,7 +20,8 @@ This matrix concerns the actual source code version.\n |                               | P200      | LibreTech-CC v1 | Libretech-PC |             | Radxa Zero | GT-King/Pro | Odroid-C4    |\n |                               | P201      | LibreTech-AC v2 | WeTek Core2  |             |            | GSKing-X    | Odroid-HC4   |\n |                               |           | JetHub J80      |              |             |            | Radxa Zero2 | BPi-M2-Pro   |\n-|                               |           |                 |              |             |            | BPI-M2S     | BPi-M5       |\n+|                               |           |                 |              |             |            | BPI-CM4IO   | BPi-M5       |\n+|                               |           |                 |              |             |            | BPI-M2S     |              |\n +-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+\n | UART                          | **Yes**   | **Yes**         | **Yes**      | **Yes**     | **Yes**    | **Yes**     | **Yes**      |\n +-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic/patches/u-boot/u-boot-0025-WIP-ARM-dts-add-support-for-BananaPi-CM4IO.patch",
    "content": "From dd543d9ffb5b860ad4e4e733b596236e2ed0ad7f Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sat, 4 Mar 2023 07:39:41 +0000\nSubject: [PATCH 25/25] WIP: ARM: dts: add support for BananaPi CM4IO\n\nImport the device-tree from Linux 6.x\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm/dts/Makefile                         |   1 +\n .../meson-g12b-bananapi-cm4-cm4io-u-boot.dtsi |   7 +\n .../arm/dts/meson-g12b-bananapi-cm4-cm4io.dts | 165 ++++++++\n arch/arm/dts/meson-g12b-bananapi-cm4.dtsi     | 388 ++++++++++++++++++\n 4 files changed, 561 insertions(+)\n create mode 100644 arch/arm/dts/meson-g12b-bananapi-cm4-cm4io-u-boot.dtsi\n create mode 100644 arch/arm/dts/meson-g12b-bananapi-cm4-cm4io.dts\n create mode 100644 arch/arm/dts/meson-g12b-bananapi-cm4.dtsi\n\ndiff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile\nindex 788fec93a3..9348093806 100644\n--- a/arch/arm/dts/Makefile\n+++ b/arch/arm/dts/Makefile\n@@ -198,6 +198,7 @@ dtb-$(CONFIG_ARCH_MESON) += \\\n \tmeson-g12a-u200.dtb \\\n \tmeson-g12b-a311d-bananapi-m2s.dtb \\\n \tmeson-g12b-a311d-khadas-vim3.dtb \\\n+\tmeson-g12b-bananapi-cm4-cm4io.dtb \\\n \tmeson-g12b-gtking.dtb \\\n \tmeson-g12b-gtking-pro.dtb \\\n \tmeson-g12b-gsking-x.dtb \\\ndiff --git a/arch/arm/dts/meson-g12b-bananapi-cm4-cm4io-u-boot.dtsi b/arch/arm/dts/meson-g12b-bananapi-cm4-cm4io-u-boot.dtsi\nnew file mode 100644\nindex 0000000000..236f2468dc\n--- /dev/null\n+++ b/arch/arm/dts/meson-g12b-bananapi-cm4-cm4io-u-boot.dtsi\n@@ -0,0 +1,7 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2019 BayLibre, SAS.\n+ * Author: Neil Armstrong <narmstrong@baylibre.com>\n+ */\n+\n+#include \"meson-g12-common-u-boot.dtsi\"\ndiff --git a/arch/arm/dts/meson-g12b-bananapi-cm4-cm4io.dts b/arch/arm/dts/meson-g12b-bananapi-cm4-cm4io.dts\nnew file mode 100644\nindex 0000000000..2c4a5b3f1b\n--- /dev/null\n+++ b/arch/arm/dts/meson-g12b-bananapi-cm4-cm4io.dts\n@@ -0,0 +1,165 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2023 Neil Armstrong <neil.armstrong@linaro.org>\n+ */\n+\n+/dts-v1/;\n+\n+#include \"meson-g12b-bananapi-cm4.dtsi\"\n+#include <dt-bindings/input/input.h>\n+#include <dt-bindings/leds/common.h>\n+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>\n+\n+/ {\n+\tcompatible = \"bananapi,bpi-cm4io\", \"bananapi,bpi-cm4\", \"amlogic,a311d\", \"amlogic,g12b\";\n+\tmodel = \"BananaPi BPI-CM4IO Baseboard with BPI-CM4 Module\";\n+\n+\taliases {\n+\t\tethernet0 = &ethmac;\n+\t\ti2c0 = &i2c1;\n+\t\ti2c1 = &i2c3;\n+\t};\n+\n+\tadc-keys {\n+\t\tcompatible = \"adc-keys\";\n+\t\tio-channels = <&saradc 2>;\n+\t\tio-channel-names = \"buttons\";\n+\t\tkeyup-threshold-microvolt = <1710000>;\n+\n+\t\tbutton-function {\n+\t\t\tlabel = \"Function\";\n+\t\t\tlinux,code = <KEY_FN>;\n+\t\t\tpress-threshold-microvolt = <10000>;\n+\t\t};\n+\t};\n+\n+\thdmi_connector: hdmi-connector {\n+\t\tcompatible = \"hdmi-connector\";\n+\t\ttype = \"a\";\n+\n+\t\tport {\n+\t\t\thdmi_connector_in: endpoint {\n+\t\t\t\tremote-endpoint = <&hdmi_tx_tmds_out>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\tleds {\n+\t\tcompatible = \"gpio-leds\";\n+\n+\t\tled-blue {\n+\t\t\tcolor = <LED_COLOR_ID_BLUE>;\n+\t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tgpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;\n+\t\t\tlinux,default-trigger = \"heartbeat\";\n+\t\t};\n+\n+\t\tled-green {\n+\t\t\tcolor = <LED_COLOR_ID_GREEN>;\n+\t\t\tfunction = LED_FUNCTION_STATUS;\n+\t\t\tgpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;\n+\t\t};\n+\t};\n+\n+\tsound {\n+\t\tcompatible = \"amlogic,axg-sound-card\";\n+\t\tmodel = \"BPI-CM4IO\";\n+\t\taudio-aux-devs = <&tdmout_b>;\n+\t\taudio-routing =\t\"TDMOUT_B IN 0\", \"FRDDR_A OUT 0\",\n+\t\t\t\t\"TDMOUT_B IN 1\", \"FRDDR_B OUT 0\",\n+\t\t\t\t\"TDMOUT_B IN 2\", \"FRDDR_C OUT 0\",\n+\t\t\t\t\"TDM_B Playback\", \"TDMOUT_B OUT\";\n+\n+\t\tassigned-clocks = <&clkc CLKID_MPLL2>,\n+\t\t\t\t  <&clkc CLKID_MPLL0>,\n+\t\t\t\t  <&clkc CLKID_MPLL1>;\n+\t\tassigned-clock-parents = <0>, <0>, <0>;\n+\t\tassigned-clock-rates = <294912000>,\n+\t\t\t\t       <270950400>,\n+\t\t\t\t       <393216000>;\n+\n+\t\tdai-link-0 {\n+\t\t\tsound-dai = <&frddr_a>;\n+\t\t};\n+\n+\t\tdai-link-1 {\n+\t\t\tsound-dai = <&frddr_b>;\n+\t\t};\n+\n+\t\tdai-link-2 {\n+\t\t\tsound-dai = <&frddr_c>;\n+\t\t};\n+\n+\t\t/* 8ch hdmi interface */\n+\t\tdai-link-3 {\n+\t\t\tsound-dai = <&tdmif_b>;\n+\t\t\tdai-format = \"i2s\";\n+\t\t\tdai-tdm-slot-tx-mask-0 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-1 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-2 = <1 1>;\n+\t\t\tdai-tdm-slot-tx-mask-3 = <1 1>;\n+\t\t\tmclk-fs = <256>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;\n+\t\t\t};\n+\t\t};\n+\n+\t\t/* hdmi glue */\n+\t\tdai-link-4 {\n+\t\t\tsound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;\n+\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&hdmi_tx>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&cecb_AO {\n+\tstatus = \"okay\";\n+};\n+\n+&ethmac {\n+\tstatus = \"okay\";\n+};\n+\n+&hdmi_tx {\n+\tstatus = \"okay\";\n+};\n+\n+&hdmi_tx_tmds_port {\n+\thdmi_tx_tmds_out: endpoint {\n+\t\tremote-endpoint = <&hdmi_connector_in>;\n+\t};\n+};\n+\n+/* CSI port */\n+&i2c1 {\n+\tstatus = \"okay\";\n+};\n+\n+/* DSI port for touchscreen */\n+&i2c3 {\n+\tstatus = \"okay\";\n+};\n+\n+/* miniPCIe port with USB + SIM slot */\n+&pcie {\n+\tstatus = \"okay\";\n+};\n+\n+&sd_emmc_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tohdmitx {\n+\tstatus = \"okay\";\n+};\n+\n+/* Peripheral Only USB-C port */\n+&usb {\n+\tdr_mode = \"peripheral\";\n+\n+\tstatus = \"okay\";\n+};\ndiff --git a/arch/arm/dts/meson-g12b-bananapi-cm4.dtsi b/arch/arm/dts/meson-g12b-bananapi-cm4.dtsi\nnew file mode 100644\nindex 0000000000..dc0988c826\n--- /dev/null\n+++ b/arch/arm/dts/meson-g12b-bananapi-cm4.dtsi\n@@ -0,0 +1,388 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (c) 2023 Neil Armstrong <neil.armstrong@linaro.org>\n+ */\n+\n+#include \"meson-g12b-a311d.dtsi\"\n+#include <dt-bindings/gpio/meson-g12a-gpio.h>\n+\n+/ {\n+\taliases {\n+\t\tserial0 = &uart_AO;\n+\t\trtc1 = &vrtc;\n+\t};\n+\n+\tchosen {\n+\t\tstdout-path = \"serial0:115200n8\";\n+\t};\n+\n+\temmc_pwrseq: emmc-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-emmc\";\n+\t\treset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;\n+\t};\n+\n+\tmemory@0 {\n+\t\tdevice_type = \"memory\";\n+\t\treg = <0x0 0x0 0x0 0x40000000>;\n+\t};\n+\n+\tsdio_pwrseq: sdio-pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-simple\";\n+\t\treset-gpios = <&gpio GPIOAO_6 GPIO_ACTIVE_LOW>;\n+\t\tclocks = <&wifi32k>;\n+\t\tclock-names = \"ext_clock\";\n+\t};\n+\n+\temmc_1v8: regulator-emmc_1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"EMMC_1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vddao_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tdc_in: regulator-dc-in {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"DC_IN\";\n+\t\tregulator-min-microvolt = <5000000>;\n+\t\tregulator-max-microvolt = <5000000>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddio_c: regulator-vddio-c {\n+\t\tcompatible = \"regulator-gpio\";\n+\t\tregulator-name = \"VDDIO_C\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\n+\t\tenable-gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>;\n+\t\tenable-active-high;\n+\t\tregulator-always-on;\n+\n+\t\tgpios = <&gpio_ao GPIOAO_9 GPIO_OPEN_DRAIN>;\n+\t\tgpios-states = <1>;\n+\n+\t\tstates = <1800000 0>,\n+\t\t\t <3300000 1>;\n+\t};\n+\n+\tvddao_1v8: regulator-vddao-1v8 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDAO_1V8\";\n+\t\tregulator-min-microvolt = <1800000>;\n+\t\tregulator-max-microvolt = <1800000>;\n+\t\tvin-supply = <&vddao_3v3>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddao_3v3: regulator-vddao-3v3 {\n+\t\tcompatible = \"regulator-fixed\";\n+\t\tregulator-name = \"VDDAO_3V3\";\n+\t\tregulator-min-microvolt = <3300000>;\n+\t\tregulator-max-microvolt = <3300000>;\n+\t\tvin-supply = <&dc_in>;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddcpu_a: regulator-vddcpu-a {\n+\t\t/*\n+\t\t * MP8756GD DC/DC Regulator.\n+\t\t */\n+\t\tcompatible = \"pwm-regulator\";\n+\n+\t\tregulator-name = \"VDDCPU_A\";\n+\t\tregulator-min-microvolt = <680000>;\n+\t\tregulator-max-microvolt = <1040000>;\n+\n+\t\tpwm-supply = <&dc_in>;\n+\n+\t\tpwms = <&pwm_ab 0 1250 0>;\n+\t\tpwm-dutycycle-range = <100 0>;\n+\n+\t\tregulator-boot-on;\n+\t\tregulator-always-on;\n+\t};\n+\n+\tvddcpu_b: regulator-vddcpu-b {\n+\t\t/*\n+\t\t * SY8120B1ABC DC/DC Regulator.\n+\t\t */\n+\t\tcompatible = \"pwm-regulator\";\n+\n+\t\tregulator-name = \"VDDCPU_B\";\n+\t\tregulator-min-microvolt = <680000>;\n+\t\tregulator-max-microvolt = <1040000>;\n+\n+\t\tpwm-supply = <&dc_in>;\n+\n+\t\tpwms = <&pwm_AO_cd 1 1250 0>;\n+\t\tpwm-dutycycle-range = <100 0>;\n+\n+\t\tregulator-boot-on;\n+\t\tregulator-always-on;\n+\t};\n+\n+\twifi32k: wifi32k {\n+\t\tcompatible = \"pwm-clock\";\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tpwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */\n+\t};\n+};\n+\n+&arb {\n+\tstatus = \"okay\";\n+};\n+\n+&clkc_audio {\n+\tstatus = \"okay\";\n+};\n+\n+&cec_AO {\n+\tpinctrl-0 = <&cec_ao_a_h_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&cecb_AO {\n+\tpinctrl-0 = <&cec_ao_b_h_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-phandle = <&hdmi_tx>;\n+};\n+\n+&cpu0 {\n+\tcpu-supply = <&vddcpu_b>;\n+\toperating-points-v2 = <&cpu_opp_table_0>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu1 {\n+\tcpu-supply = <&vddcpu_b>;\n+\toperating-points-v2 = <&cpu_opp_table_0>;\n+\tclocks = <&clkc CLKID_CPU_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu100 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu101 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu102 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&cpu103 {\n+\tcpu-supply = <&vddcpu_a>;\n+\toperating-points-v2 = <&cpub_opp_table_1>;\n+\tclocks = <&clkc CLKID_CPUB_CLK>;\n+\tclock-latency = <50000>;\n+};\n+\n+&ext_mdio {\n+\texternal_phy: ethernet-phy@0 {\n+\t\t/* Realtek RTL8211F (0x001cc916) */\n+\t\treg = <0>;\n+\t\tmax-speed = <1000>;\n+\n+\t\tinterrupt-parent = <&gpio_intc>;\n+\t\t/* MAC_INTR on GPIOZ_14 */\n+\t\tinterrupts = <26 IRQ_TYPE_LEVEL_LOW>;\n+\t};\n+};\n+\n+/* Ethernet to be enabled in baseboard DT */\n+&ethmac {\n+\tpinctrl-0 = <&eth_pins>, <&eth_rgmii_pins>;\n+\tpinctrl-names = \"default\";\n+\tphy-mode = \"rgmii-txid\";\n+\tphy-handle = <&external_phy>;\n+};\n+\n+&frddr_a {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_b {\n+\tstatus = \"okay\";\n+};\n+\n+&frddr_c {\n+\tstatus = \"okay\";\n+};\n+\n+/* HDMI to be enabled in baseboard DT */\n+&hdmi_tx {\n+\tpinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;\n+\tpinctrl-names = \"default\";\n+\thdmi-supply = <&dc_in>;\n+};\n+\n+/* \"Camera\" I2C bus */\n+&i2c1 {\n+\tpinctrl-0 = <&i2c1_sda_h6_pins>, <&i2c1_sck_h7_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+/* Main I2C bus */\n+&i2c2 {\n+\tpinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+/* \"ID\" I2C bus */\n+&i2c3 {\n+\tpinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;\n+\tpinctrl-names = \"default\";\n+};\n+\n+&pcie {\n+\treset-gpios = <&gpio GPIOA_8 GPIO_ACTIVE_LOW>;\n+};\n+\n+&pwm_ab {\n+\tpinctrl-0 = <&pwm_a_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin0\";\n+\n+\tstatus = \"okay\";\n+};\n+\n+&pwm_ef {\n+\tpinctrl-0 = <&pwm_e_pins>;\n+\tpinctrl-names = \"default\";\n+\n+\tstatus = \"okay\";\n+};\n+\n+&pwm_AO_cd {\n+\tpinctrl-0 = <&pwm_ao_d_e_pins>;\n+\tpinctrl-names = \"default\";\n+\tclocks = <&xtal>;\n+\tclock-names = \"clkin1\";\n+\n+\tstatus = \"okay\";\n+};\n+\n+&saradc {\n+\tvref-supply = <&vddao_1v8>;\n+\n+\tstatus = \"okay\";\n+};\n+\n+/* on-module SDIO WiFi */\n+&sd_emmc_a {\n+\tpinctrl-0 = <&sdio_pins>;\n+\tpinctrl-1 = <&sdio_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\t#address-cells = <1>;\n+\t#size-cells = <0>;\n+\n+\tbus-width = <4>;\n+\tsd-uhs-sdr104;\n+\tmax-frequency = <50000000>;\n+\n+\tnon-removable;\n+\tdisable-wp;\n+\n+\t/* WiFi firmware requires power in suspend */\n+\tkeep-power-in-suspend;\n+\n+\tmmc-pwrseq = <&sdio_pwrseq>;\n+\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddao_3v3>;\n+\n+\tstatus = \"okay\";\n+\n+\trtl8822cs: wifi@1 {\n+\t\treg = <1>;\n+\t};\n+};\n+\n+/* SD card to be enabled in baseboard DT */\n+&sd_emmc_b {\n+\tpinctrl-0 = <&sdcard_c_pins>;\n+\tpinctrl-1 = <&sdcard_clk_gate_c_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <4>;\n+\tcap-sd-highspeed;\n+\tmax-frequency = <50000000>;\n+\tdisable-wp;\n+\n+\tcd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddio_c>;\n+};\n+\n+/* on-module eMMC */\n+&sd_emmc_c {\n+\tpinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;\n+\tpinctrl-1 = <&emmc_clk_gate_pins>;\n+\tpinctrl-names = \"default\", \"clk-gate\";\n+\n+\tbus-width = <8>;\n+\tcap-mmc-highspeed;\n+\tmmc-ddr-1_8v;\n+\tmmc-hs200-1_8v;\n+\tmax-frequency = <200000000>;\n+\tdisable-wp;\n+\n+\tmmc-pwrseq = <&emmc_pwrseq>;\n+\tvmmc-supply = <&vddao_3v3>;\n+\tvqmmc-supply = <&vddao_1v8>;\n+\n+\tstatus = \"okay\";\n+};\n+\n+&tdmif_b {\n+\tstatus = \"okay\";\n+};\n+\n+&tdmout_b {\n+\tstatus = \"okay\";\n+};\n+\n+/* on-module UART BT */\n+&uart_A {\n+\tpinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;\n+\tpinctrl-names = \"default\";\n+\tuart-has-rtscts;\n+\n+\tstatus = \"okay\";\n+\n+\tbluetooth {\n+\t\tcompatible = \"realtek,rtl8822cs-bt\";\n+\t\tenable-gpios  = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\thost-wake-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;\n+\t\tdevice-wake-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>;\n+\t};\n+};\n+\n+&uart_AO {\n+\tpinctrl-0 = <&uart_ao_a_pins>;\n+\tpinctrl-names = \"default\";\n+\n+\tstatus = \"okay\";\n+};\n+\n+&usb {\n+\tphys = <&usb2_phy0>, <&usb2_phy1>;\n+\tphy-names = \"usb2-phy0\", \"usb2-phy1\";\n+};\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/LaFrite_boot.ini",
    "content": "LIBRETECH-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"EmuELEC\"\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\nsetenv uenv_addr 0x13000000\n\n#showlogo 1080p60hz 1920 1080 boot-logo-1080.bmp.gz\n\nfatload ${device} ${mmc_dev}:1 ${loadaddr} kernel.img\nfatload ${device} ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\n\nif fatload ${device} ${mmc_dev}:1 ${uenv_addr} resolution.ini; then env import -t ${uenv_addr} $filesize; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif fatload ${device} ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nif test \"${keymap}\" != \"\"; then setenv consoleopt \"${consoleopt} keymap=${keymap}\"; fi\nsetenv displayopt \"vout=${vout},en logo=osd0,loaded,0x3dc00000 frac_rate_policy=${frac_rate_policy} native_4k_gui=0 hdr_policy=1 consoleblank=0\"\nsetenv bootargs \"${consoleopt} ${rootopt} ${displayopt} ${coreelec}\"\n\n# Device tree modifications\nbootm start\nbootm loados\nbootm fdt\n\nbootm prep\n\n# Boot the board\nbootm go\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/LePotato_boot.ini",
    "content": "LIBRETECH-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"EmuELEC\"\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\nsetenv emmc_timeout \"0\"\nsetenv uenv_addr 0x13000000\n\n#showlogo 1080p60hz 1920 1080 boot-logo-1080.bmp.gz\n\nfatload ${device} ${mmc_dev}:1 ${loadaddr} kernel.img\nfatload ${device} ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\n\nif fatload ${device} ${mmc_dev}:1 ${uenv_addr} resolution.ini; then env import -t ${uenv_addr} $filesize; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif fatload ${device} ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nif test \"${emmc_timeout}\" = \"1\"; then showlogo 1080p60hz 1920 1080 timeout-logo-1080.bmp.gz; sleep 30; mmc dev 1; mmc dev 0; fi\nif test \"${keymap}\" != \"\"; then setenv consoleopt \"${consoleopt} keymap=${keymap}\"; fi\nsetenv displayopt \"vout=${vout},en logo=osd0,loaded,0x3dc00000 frac_rate_policy=${frac_rate_policy} native_4k_gui=0 hdr_policy=1 consoleblank=0\"\nsetenv bootargs \"${consoleopt} ${rootopt} ${displayopt} ${coreelec}\"\n\n# Device tree modifications\nbootm start\nbootm loados\nbootm fdt\n\nbootm prep\n\n# Boot the board\nbootm go\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/Odroid_C4_boot.ini",
    "content": "ODROIDC4-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"EmuELEC\"\nsetenv remotewakeup \"0x23dc4db2\"\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\nsetenv native_4k_gui \"0\"\n\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\n\nsetenv dtb_mem_addr 0x1000000\nsetenv uenv_addr 0x13000000\n\nif load mmc ${mmc_dev}:1 ${uenv_addr} resolution.ini; then env import -t ${uenv_addr} $filesize; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif load mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nsetenv irsetup \"remotewakeup=${remotewakeup} decode_type=${decode_type} remotewakeupmask=${remotewakeupmask}\"\nif test \"${usbopts}\" != \"\"; then setenv usbopts \"usbopts=${usbopts}\"; fi\nif test \"${usbpower}\" != \"\"; then setenv usbpower \"enable_system_power=${usbpower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a55}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a55}\"; fi\nif test \"${modeline}\" != \"\"; then setenv cmode \"modeline=${modeline}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\nif test \"${keymap}\" != \"\"; then setenv consoleopt \"${consoleopt} keymap=${keymap}\"; fi\nsetenv displayopt \"vout=${vout},en logo=osd0,loaded,0x3d800000 frac_rate_policy=${frac_rate_policy} native_4k_gui=${native_4k_gui} hdr_policy=1\"\nsetenv initargs \"${rootopt} ${consoleopt} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${irsetup} ${usbpower} ${gpiopower} ${usbopts} ${cmode}\"\nsetenv bootargs \"${initargs} ${displayopt} ${coreelec}\"\n\nload mmc ${mmc_dev}:1 ${loadaddr} kernel.img\nload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\nbootm start\nbooti ${loadaddr} - ${dtb_mem_addr}\nbootm\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/Odroid_HC4_boot.ini",
    "content": "ODROIDC4-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"EmuELEC\"\nsetenv remotewakeup \"0x23dc4db2\"\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv heartbeat \"1\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\nsetenv native_4k_gui \"0\"\n\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\n\nsetenv dtb_mem_addr 0x1000000\nsetenv uenv_addr 0x13000000\n\nif load mmc ${mmc_dev}:1 ${uenv_addr} resolution.ini; then env import -t ${uenv_addr} $filesize; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif load mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nsetenv irsetup \"remotewakeup=${remotewakeup} decode_type=${decode_type} remotewakeupmask=${remotewakeupmask}\"\nif test \"${usbopts}\" != \"\"; then setenv usbopts \"usbopts=${usbopts}\"; fi\nif test \"${usbpower}\" != \"\"; then setenv usbpower \"enable_system_power=${usbpower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a55}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a55}\"; fi\nif test \"${modeline}\" != \"\"; then setenv cmode \"modeline=${modeline}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\nif test \"${keymap}\" != \"\"; then setenv consoleopt \"${consoleopt} keymap=${keymap}\"; fi\nsetenv displayopt \"vout=${vout},en logo=osd0,loaded,0x3d800000 frac_rate_policy=${frac_rate_policy} native_4k_gui=${native_4k_gui} hdr_policy=1\"\nsetenv initargs \"${rootopt} ${consoleopt} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${irsetup} ${usbpower} ${gpiopower} ${usbopts} ${cmode}\"\nsetenv bootargs \"${initargs} ${displayopt} ${coreelec}\"\n\nload mmc ${mmc_dev}:1 ${loadaddr} kernel.img\nload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\nbootm start\nif test \"${heartbeat}\" = \"0\"; then fdt set /leds/blueled linux,default-trigger \"none\"; fi\nbooti ${loadaddr} - ${dtb_mem_addr}\nbootm\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/Odroid_N2L_boot.ini",
    "content": "ODROIDN2-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"EmuELEC\"\nsetenv remotewakeup \"0x23dc4db2\"\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\nsetenv native_4k_gui \"0\"\n\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\n\nsetenv dtb_mem_addr 0x1000000\nsetenv uenv_addr 0x13000000\n\nif load mmc ${mmc_dev}:1 ${uenv_addr} resolution.ini; then env import -t ${uenv_addr} $filesize; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif load mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nsetenv irsetup \"remotewakeup=${remotewakeup} decode_type=${decode_type} remotewakeupmask=${remotewakeupmask}\"\nif test \"${usbopts}\" != \"\"; then setenv usbopts \"usbopts=${usbopts}\"; fi\nif test \"${usbpower}\" != \"\"; then setenv usbpower \"enable_system_power=${usbpower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a73}\" != \"\"; then setenv max_freq_a73 \"max_freq_a73=${max_freq_a73}\"; fi\nif test \"${modeline}\" != \"\"; then setenv cmode \"modeline=${modeline}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\nif test \"${keymap}\" != \"\"; then setenv consoleopt \"${consoleopt} keymap=${keymap}\"; fi\nsetenv displayopt \"vout=${vout},en logo=osd0,loaded,0x3d800000 frac_rate_policy=${frac_rate_policy} native_4k_gui=${native_4k_gui} hdr_policy=1\"\nsetenv initargs \"${rootopt} ${consoleopt} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${irsetup} ${usbpower} ${gpiopower} ${usbopts} ${cmode}\"\nsetenv bootargs \"${initargs} ${displayopt} ${coreelec}\"\n\nload mmc ${mmc_dev}:1 ${loadaddr} kernel.img\nload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\nbootm start\nbooti ${loadaddr} - ${dtb_mem_addr}\nbootm\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/Odroid_N2_boot.ini",
    "content": "ODROIDN2-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"EmuELEC\"\nsetenv remotewakeup \"0x23dc4db2\"\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\nsetenv native_4k_gui \"0\"\n\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\n\nsetenv dtb_mem_addr 0x1000000\nsetenv uenv_addr 0x13000000\n\nif load mmc ${mmc_dev}:1 ${uenv_addr} resolution.ini; then env import -t ${uenv_addr} $filesize; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif load mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nsetenv irsetup \"remotewakeup=${remotewakeup} decode_type=${decode_type} remotewakeupmask=${remotewakeupmask}\"\nif test \"${usbopts}\" != \"\"; then setenv usbopts \"usbopts=${usbopts}\"; fi\nif test \"${usbpower}\" != \"\"; then setenv usbpower \"enable_system_power=${usbpower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a73}\" != \"\"; then setenv max_freq_a73 \"max_freq_a73=${max_freq_a73}\"; fi\nif test \"${modeline}\" != \"\"; then setenv cmode \"modeline=${modeline}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\nif test \"${keymap}\" != \"\"; then setenv consoleopt \"${consoleopt} keymap=${keymap}\"; fi\nsetenv displayopt \"vout=${vout},en logo=osd0,loaded,0x3d800000 frac_rate_policy=${frac_rate_policy} native_4k_gui=${native_4k_gui} hdr_policy=1\"\nsetenv initargs \"${rootopt} ${consoleopt} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${irsetup} ${usbpower} ${gpiopower} ${usbopts} ${cmode}\"\nsetenv bootargs \"${initargs} ${displayopt} ${coreelec}\"\n\nload mmc ${mmc_dev}:1 ${loadaddr} kernel.img\nload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\nbootm start\nbooti ${loadaddr} - ${dtb_mem_addr}\nbootm\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/Radxa_Zero2_boot.ini",
    "content": "RADXA_ZERO2-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"CoreELEC\"\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\nsetenv native_4k_gui \"0\"\n\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\n\nsetenv dtb_mem_addr 0x1000000\nsetenv uenv_addr 0x13000000\n\nif load mmc ${mmc_dev}:1 ${uenv_addr} resolution.ini; then env import -t ${uenv_addr} $filesize; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif load mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nsetenv irsetup \"remotewakeup=${remotewakeup} decode_type=${decode_type} remotewakeupmask=${remotewakeupmask}\"\nif test \"${usbopts}\" != \"\"; then setenv usbopts \"usbopts=${usbopts}\"; fi\nif test \"${usbpower}\" != \"\"; then setenv usbpower \"enable_system_power=${usbpower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a73}\" != \"\"; then setenv max_freq_a73 \"max_freq_a73=${max_freq_a73}\"; fi\nif test \"${modeline}\" != \"\"; then setenv cmode \"modeline=${modeline}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\nif test \"${keymap}\" != \"\"; then setenv consoleopt \"${consoleopt} keymap=${keymap}\"; fi\nsetenv displayopt \"vout=${vout},en logo=osd0,loaded,0x3d800000 frac_rate_policy=${frac_rate_policy} native_4k_gui=${native_4k_gui} hdr_policy=1\"\nsetenv initargs \"${rootopt} ${consoleopt} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${irsetup} ${usbpower} ${gpiopower} ${usbopts} ${cmode}\"\nsetenv bootargs \"${initargs} ${displayopt} ${coreelec}\"\n\nload mmc ${mmc_dev}:1 ${loadaddr} kernel.img\nload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\nbootm start\nbooti ${loadaddr} - ${dtb_mem_addr}\nbootm\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/Radxa_Zero_boot.ini",
    "content": "RADXA_ZERO-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"EmuELEC\"\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\nsetenv native_4k_gui \"0\"\n\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\n\nsetenv dtb_mem_addr 0x1000000\nsetenv uenv_addr 0x13000000\n\nif load mmc ${mmc_dev}:1 ${uenv_addr} resolution.ini; then env import -t ${uenv_addr} $filesize; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif load mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nsetenv irsetup \"remotewakeup=${remotewakeup} decode_type=${decode_type} remotewakeupmask=${remotewakeupmask}\"\nif test \"${usbopts}\" != \"\"; then setenv usbopts \"usbopts=${usbopts}\"; fi\nif test \"${usbpower}\" != \"\"; then setenv usbpower \"enable_system_power=${usbpower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a73}\" != \"\"; then setenv max_freq_a73 \"max_freq_a73=${max_freq_a73}\"; fi\nif test \"${modeline}\" != \"\"; then setenv cmode \"modeline=${modeline}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\nif test \"${keymap}\" != \"\"; then setenv consoleopt \"${consoleopt} keymap=${keymap}\"; fi\nsetenv displayopt \"vout=${vout},en logo=osd0,loaded,0x3d800000 frac_rate_policy=${frac_rate_policy} native_4k_gui=${native_4k_gui} hdr_policy=1\"\nsetenv initargs \"${rootopt} ${consoleopt} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${irsetup} ${usbpower} ${gpiopower} ${usbopts} ${cmode}\"\nsetenv bootargs \"${initargs} ${displayopt} ${coreelec}\"\n\nload mmc ${mmc_dev}:1 ${loadaddr} kernel.img\nload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\nbootm start\nbooti ${loadaddr} - ${dtb_mem_addr}\nbootm\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/canupdate.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.tv)\n\n# detect legacy kernel installs and abort to prevent upgrades\nif [ \"$(uname -r)\" = \"3.14.29\" ]; then\n  echo \"Update from 3.14 is not supported!\"\n  sleep 10\n  exit 1\nfi\n\nDEVICE_OLD=$(echo \"${1}\" | cut -d. -f1)\nDEVICE_NEW=$(echo \"${2}\" | cut -d. -f1)\n\n# allow upgrades between aarch64 and arm images on same device\nif [ \"${DEVICE_OLD}\" = \"${DEVICE_NEW}\" ]; then\n  exit 0\nelse\n  exit 1\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/config.ini",
    "content": "#------------------------------------------------------------------------------------------------------\n#\n# config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# Console Setup\n#\n# consoleopt='console=ttyS0,115200 console=tty0 no_console_suspend'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# CPU Frequency Control\n#\n# WARNING!!! WARNING!!! WARNING!!!\n#   Before changing anything here please read the wiki entry at:\n#   https://wiki.odroid.com/odroid-n2/application_note/software/set_cpu_freq\n#\n# max_freq_a73='1800'\n# max_freq_a53='1896'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# HDMI CEC Control\n#   Set by CoreELEC Settings\n#\n# cec_func_config='7f'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# HDMI CEC OSD Name\n#   Set by CoreELEC Settings\n#\n# cec_osd_name='EmuELEC'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# IR setup\n#   Setup a custom keycode to wake the N2/C4 from suspend or poweroff\n#   You can stop kodi and eventlircd and use \"ir-keytable -u\" to obtain a compatible u-boot\n#   IR keycode\n#   This setting will require a injected bl301 blob.\n#\n# remotewakeup='0x31ce4db2'\n#\n#   decode_type can be one of the following:\n#   NEC='0x0', DUOKAN='0x1', TOSHIBA='0x2', RCA='0x3', RC5='0x4', RC6A='0x5', NEC_TOSHIBA_2IN1='0x6',\n#   NEC_RCA_2IN1='0x7', RCMM='0x8', NEC_RC5_2IN1='0x9', NEC_RC5_2IN1='0xa', RC6='0xb'\n#   This setting will require a injected bl301 blob.\n#\n# decode_type='0x0' # NEC\n#\n#   remote power key mask:\n#   Some IR protocols implement a toggle bit, this can be ignored by the \"and\" mask:\n#   RC5='0x37ff', RC6='0x1effff', RC6A='0xffff7fff'\n#   This setting will require a injected bl301 blob.\n#\n# remotewakeupmask='0xffffffff'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# WOL Setting, 0=off/1=on\n#   Set by CoreELEC Settings\n#\n# wol=1\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# Power Off and Wake Up using GPIO Key Button\n#   Valid options for Odroid N2/C4 are 476,477,478,479,480,481,483,484,485,486,487,488,489,490,491,492\n#   Valid option for Khadas VIM3 is 503\n#\n# gpiopower=476 # (pin 16 of J2 header)\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# USB specific options\n#\n# usbopts='usb-xhci.tablesize=2'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# USB Power Control\n#   Set by CoreELEC Settings\n#\n# usbpower=0\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# HDMI custom mode\n#   You can use this setting to set a custom video mode\n#   modeline \"horpixels,verpixels,pixel_clock,hor_freq,ver_freq,hdisp,hsyncstart,hsyncend,htotal,vdisp,\n#             vsyncstart,vsyncend,vtotal,hsync_polarity,vsync_polarity,progress_mode\"\n#\n#   Example for 1920x1080p@60hz\n# modeline='1920,1080,148500,67500,60,1920,2008,2052,2200,1080,1084,1088,1125,1,1,1'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# VOUT mode\n#   You can use this setting to set a specific video mode at boot.\n#\n# vout='1080p60hz'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# Fractional Refresh Rate\n#   You can use this setting to set a fractional refresh rate. So for example if vout mode it set to\n#   1080p60hz then setting this to 1 will make the refresh rate switch to 59.97hz instead of the modes\n#   default of 60hz. In this example setting it to 0 will keep the modes default of 60hz.\n#\n# frac_rate_policy='0'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# Busybox console keyboard layout\n#   Set by CoreELEC Settings\n#\n# keymap='uk'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# CoreELEC Developer Options\n#   Valid options are: textmode debugging progress nofsck nosplash noram overlay quiet ssh\n#\n# coreelec='quiet'\n#\n#------------------------------------------------------------------------------------------------------\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/dtb.conf",
    "content": "<dtb>\n  <multidtb name=\"g12b_s922x_beelink_gt_king.dtb\" subdevice=\"\">\n    <file>g12b_s922x_beelink_gt_king_rev_a.dtb</file>\n    <file>g12b_s922x_beelink_gt_king.dtb</file>\n  </multidtb>\n  <multidtb name=\"g12b_s922x_beelink_gs_king_x.dtb\" subdevice=\"\">\n    <file>g12b_s922x_beelink_gs_king_x_rev_a.dtb</file>\n    <file>g12b_s922x_beelink_gs_king_x.dtb</file>\n  </multidtb>\n  <multidtb name=\"g12a_s905x2_beelink_gt_mini_a.dtb\" subdevice=\"\">\n    <file>g12a_s905x2_beelink_gt_mini_a_2g.dtb</file>\n    <file>g12a_s905x2_beelink_gt_mini_a_4g.dtb</file>\n  </multidtb>\n  <multidtb name=\"g12a_s905x2_beelink_gt1_mini.dtb\" subdevice=\"\">\n    <file>g12a_s905x2_beelink_gt1_mini_2g.dtb</file>\n    <file>g12a_s905x2_beelink_gt1_mini_4g.dtb</file>\n  </multidtb>\n  <multidtb name=\"sm1_s905x3_beelink_gt1mini2.dtb\" subdevice=\"\">\n    <file>sm1_s905x3_beelink_gt1mini2_2g.dtb</file>\n    <file>sm1_s905x3_beelink_gt1mini2_4g.dtb</file>\n  </multidtb>\n  <multidtb name=\"g12b_s922x_odroid_n2.dtb\" subdevice=\"Odroid_N2\">\n    <file>g12b_s922x_odroid_n2.dtb</file>\n    <file>g12b_s922x_odroid_n2plus.dtb</file>\n    <file>g12b_s922x_odroid_n2plus_rev_c.dtb</file>\n  </multidtb>\n  <multidtb name=\"g12b_s922x_ugoos_am6.dtb\" subdevice=\"\">\n    <file>g12b_s922x_ugoos_am6_rev_a_2g.dtb</file>\n    <file>g12b_s922x_ugoos_am6_rev_a_4g.dtb</file>\n    <file>g12b_s922x_ugoos_am6_2g.dtb</file>\n    <file>g12b_s922x_ugoos_am6_4g.dtb</file>\n  </multidtb>\n  <multidtb name=\"g12b_s922x_ugoos_am6b.dtb\" subdevice=\"\">\n    <file>g12b_s922x_ugoos_am6b_rev_a_2g.dtb</file>\n    <file>g12b_s922x_ugoos_am6b_rev_a_4g.dtb</file>\n    <file>g12b_s922x_ugoos_am6b_2g.dtb</file>\n    <file>g12b_s922x_ugoos_am6b_4g.dtb</file>\n  </multidtb>\n  <multidtb name=\"gxl_p212_lepotato.dtb\" subdevice=\"LePotato\">\n    <file>gxl_p212_1g_lepotato.dtb</file>\n    <file>gxl_p212_2g_lepotato.dtb</file>\n  </multidtb>\n  <multidtb name=\"g12b_bananapi_m2s.dtb\" subdevice=\"\">\n    <file>g12b_a311d_bananapi_m2s.dtb</file>\n    <file>g12b_s922x_bananapi_m2s.dtb</file>\n  </multidtb>\n  <multidtb name=\"sc2_s905x4_buzztv_x5.dtb\" subdevice=\"\">\n    <file>sc2_s905x4_buzztv_x5_2g.dtb</file>\n    <file>sc2_s905x4_buzztv_x5_2g_1gbit.dtb</file>\n    <file>sc2_s905x4_buzztv_x5_4g.dtb</file>\n    <file>sc2_s905x4_buzztv_x5_4g_1gbit.dtb</file>\n  </multidtb>\n  <migratedtb coreelec-dt-id=\"g12b_s922x_odroid_n2_dvb\" subdevice=\"Odroid_N2\">\n    <migratedtid>g12b_s922x_odroid_n2</migratedtid>\n    <migratecmd>fdtput -t s -a g12b_w400_a $BOOT_ROOT/dtb.img /dvb status okay</migratecmd>\n  </migratedtb>\n  <migratedtb coreelec-dt-id=\"g12b_s922x_odroid_n2plus_dvb\" subdevice=\"Odroid_N2\">\n    <migratedtid>g12b_s922x_odroid_n2plus</migratedtid>\n    <migratecmd>fdtput -t s -a g12b_w400_b $BOOT_ROOT/dtb.img /dvb status okay &amp;&amp;\n                fdtput -t s -a g12b_w400_c $BOOT_ROOT/dtb.img /dvb status okay</migratecmd>\n  </migratedtb>\n  <migratedtb coreelec-dt-id=\"sm1_s905x3_odroid_c4_dvb\" subdevice=\"Odroid_C4\">\n    <migratedtid>sm1_s905x3_odroid_c4</migratedtid>\n    <migratecmd>fdtput -t s $BOOT_ROOT/dtb.img /dvb status okay</migratecmd>\n  </migratedtb>\n  <migratedtb coreelec-dt-id=\"sm1_s905x3_4g_1gbit_slowsdio\" subdevice=\"\">\n    <migratedtid>sm1_s905x3_4g_1gbit</migratedtid>\n    <migratecmd>fdtput -t s $BOOT_ROOT/dtb.img /sdio/sdio f_max 170000000</migratecmd>\n  </migratedtb>\n  <migratedtb coreelec-dt-id=\"g12b_s922x_ugoos_am6\" subdevice=\"\">\n    <migratedtid>g12b_s922x_ugoos_am6_2g</migratedtid>\n  </migratedtb>\n  <migratedtb coreelec-dt-id=\"g12b_s922x_ugoos_am6_rev_a\" subdevice=\"\">\n    <migratedtid>g12b_s922x_ugoos_am6_rev_a_2g</migratedtid>\n  </migratedtb>\n</dtb>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/dtb.xml",
    "content": "<?xml version=\"1.0\"?>\n<dtb-settings version=\"0\">\n\n  <sys_led status=\"on\" version=\"0\">\n    <sys_led_on name=\"on\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>default-on</value>\n      </cmd>\n    </sys_led_on>\n    <sys_led_heartbeat name=\"heartbeat\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>heartbeat</value>\n      </cmd>\n    </sys_led_heartbeat>\n    <sys_led_rc_feedback name=\"rc feedback\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>rc-feedback</value>\n      </cmd>\n    </sys_led_rc_feedback>\n    <sys_led_sd name=\"sd\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>sd</value>\n      </cmd>\n    </sys_led_sd>\n    <sys_led_emmc name=\"emmc\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>emmc</value>\n      </cmd>\n    </sys_led_emmc>\n    <sys_led_off name=\"off\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>none</value>\n      </cmd>\n    </sys_led_off>\n  </sys_led>\n\n  <red_led status=\"off\" version=\"0\">\n    <red_led_on name=\"on\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>default-on</value>\n      </cmd>\n    </red_led_on>\n    <red_led_heartbeat name=\"heartbeat\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>heartbeat</value>\n      </cmd>\n    </red_led_heartbeat>\n    <red_led_rc_feedback name=\"rc feedback\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>rc-feedback</value>\n      </cmd>\n    </red_led_rc_feedback>\n    <red_led_sd name=\"sd\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>sd</value>\n      </cmd>\n    </red_led_sd>\n    <red_led_emmc name=\"emmc\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>emmc</value>\n      </cmd>\n    </red_led_emmc>\n    <red_led_off name=\"off\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>none</value>\n      </cmd>\n    </red_led_off>\n  </red_led>\n\n  <green_led status=\"off\" version=\"0\">\n    <green_led_on name=\"on\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>default-on</value>\n      </cmd>\n    </green_led_on>\n    <green_led_heartbeat name=\"heartbeat\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>heartbeat</value>\n      </cmd>\n    </green_led_heartbeat>\n    <green_led_rc_feedback name=\"rc feedback\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>rc-feedback</value>\n      </cmd>\n    </green_led_rc_feedback>\n    <green_led_sd name=\"sd\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>sd</value>\n      </cmd>\n    </green_led_sd>\n    <green_led_emmc name=\"emmc\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>emmc</value>\n      </cmd>\n    </green_led_emmc>\n    <green_led_off name=\"off\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>none</value>\n      </cmd>\n    </green_led_off>\n  </green_led>\n\n  <spicc0 status=\"off\" version=\"0\">\n    <spicc0_on name=\"on\">\n      <cmd path=\"/soc/cbus@ffd00000/spi@13000 status\" type=\"s\" >\n        <value>okay</value>\n      </cmd>\n      <cmd path=\"/soc/cbus@ffd00000/spi@13000/spidev@0 status\" type=\"s\" >\n        <value>okay</value>\n      </cmd>\n    </spicc0_on>\n    <spicc0_off name=\"off\">\n      <cmd path=\"/soc/cbus@ffd00000/spi@13000 status\" type=\"s\" >\n        <value>disabled</value>\n      </cmd>\n      <cmd path=\"/soc/cbus@ffd00000/spi@13000/spidev@0 status\" type=\"s\" >\n        <value>disabled</value>\n      </cmd>\n    </spicc0_off>\n  </spicc0>\n\n  <spicc1 status=\"off\" version=\"0\">\n    <spicc1_on name=\"on\">\n      <cmd path=\"/soc/cbus@ffd00000/spi@15000 status\" type=\"s\" >\n        <value>okay</value>\n      </cmd>\n      <cmd path=\"/soc/cbus@ffd00000/spi@15000/spidev@0 status\" type=\"s\" >\n        <value>okay</value>\n      </cmd>\n    </spicc1_on>\n    <spicc1_off name=\"off\">\n      <cmd path=\"/soc/cbus@ffd00000/spi@15000 status\" type=\"s\" >\n        <value>disabled</value>\n      </cmd>\n      <cmd path=\"/soc/cbus@ffd00000/spi@15000/spidev@0 status\" type=\"s\" >\n        <value>disabled</value>\n      </cmd>\n    </spicc1_off>\n  </spicc1>\n\n  <dvb status=\"off\" version=\"2\">\n    <dvb_on name=\"on\">\n      <cmd path=\"/dvb status\" type=\"s\" >\n        <value>okay</value>\n      </cmd>\n    </dvb_on>\n    <dvb_off name=\"off\">\n      <cmd path=\"/dvb status\" type=\"s\" >\n        <value>disabled</value>\n      </cmd>\n    </dvb_off>\n  </dvb>\n\n  <remote_type status=\"NEC\" version=\"0\">\n    <remote_type_nec name=\"NEC\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>1</value>\n      </cmd>\n    </remote_type_nec>\n    <remote_type_legacy_nec name=\"LEGACY NEC\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>255</value>\n      </cmd>\n    </remote_type_legacy_nec>\n    <remote_type_duokan name=\"DUOKAN\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>2</value>\n      </cmd>\n    </remote_type_duokan>\n    <remote_type_xmp_1 name=\"XMP_1\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>3</value>\n      </cmd>\n    </remote_type_xmp_1>\n    <remote_type_rc5 name=\"RC5\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>4</value>\n      </cmd>\n    </remote_type_rc5>\n    <remote_type_rc6 name=\"RC6\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>5</value>\n      </cmd>\n    </remote_type_rc6>\n    <remote_type_toshiba name=\"TOSHIBA\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>6</value>\n      </cmd>\n    </remote_type_toshiba>\n    <remote_type_rca name=\"RCA\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>8</value>\n      </cmd>\n    </remote_type_rca>\n  </remote_type>\n\n  <emmc status=\"HS200\" version=\"0\">\n    <high_speed name=\"HS200,HS400\">\n      <cmd path=\"/emmc/emmc caps2\" type=\"s\" >\n        <value>MMC_CAP2_HS200</value>\n        <value>MMC_CAP2_HS400</value>\n      </cmd>\n    </high_speed>\n    <normal_speed name=\"HS200\">\n      <cmd path=\"/emmc/emmc caps2\" type=\"s\" >\n        <value>MMC_CAP2_HS200</value>\n      </cmd>\n    </normal_speed>\n  </emmc>\n\n  <slowsdio status=\"normal\" version=\"0\">\n    <slow_sdio name=\"slow\">\n      <cmd path=\"/sdio/sdio f_max\" type=\"u\" >\n        <value>170000000</value>\n      </cmd>\n    </slow_sdio>\n    <normal_sdio name=\"normal\">\n      <cmd path=\"/sdio/sdio f_max\" type=\"u\" >\n        <value>200000000</value>\n      </cmd>\n    </normal_sdio>\n  </slowsdio>\n\n  <int_ext_phy status=\"default\" dt_id=\"khadas_vim3\" version=\"1\">\n    <ext_phy name=\"default\">\n      <cmd path=\"/ethernet@ff3f0000 internal_phy\" type=\"i\" >\n        <value>0</value>\n      </cmd>\n      <cmd path=\"/ethernet@ff3f0000 mc_val\" type=\"x\" >\n        <value>0x1621</value>\n      </cmd>\n    </ext_phy>\n    <int_phy name=\"M.2 Slot\">\n      <cmd path=\"/ethernet@ff3f0000 internal_phy\" type=\"i\" >\n        <value>1</value>\n      </cmd>\n      <cmd path=\"/ethernet@ff3f0000 mc_val\" type=\"x\" >\n        <value>0x4BE04</value>\n      </cmd>\n    </int_phy>\n  </int_ext_phy>\n\n  <k_usb3_pcie status=\"USB3\" dt_id=\"khadas_vim3*\" version=\"0\">\n    <k_usb3 name=\"USB3\">\n      <cmd path=\"/usb3phy@ffe09080 status\" type=\"s\" >\n        <value>okay</value>\n      </cmd>\n      <cmd path=\"/pcieA@fc000000 status\" type=\"s\" >\n        <value>disabled</value>\n      </cmd>\n    </k_usb3>\n    <k_pcie name=\"PCIE\">\n      <cmd path=\"/usb3phy@ffe09080 status\" type=\"s\" >\n        <value>disabled</value>\n      </cmd>\n      <cmd path=\"/pcieA@fc000000 status\" type=\"s\" >\n        <value>okay</value>\n      </cmd>\n    </k_pcie>\n  </k_usb3_pcie>\n\n  <ip1001 status=\"migrated\" dt_id=\"sm1_s905x3*1gbit\" version=\"1\">\n    <ip1001_n_a name=\"n/a\">\n      <cmd path=\"/ethernet@ff3f0000 mc_val\" type=\"x\" >\n        <value>0x1621</value>\n      </cmd>\n      <cmd path=\"/ethernet@ff3f0000 cali_val\" type=\"x\" >\n        <value>0x10000</value>\n      </cmd>\n      <cmd path=\"/ethernet@ff3f0000 rx_delay\" type=\"i\" >\n        <value>0</value>\n      </cmd>\n      <cmd path=\"/ethernet@ff3f0000 auto_cali_idx\" type=\"i\" >\n        <value>0</value>\n      </cmd>\n    </ip1001_n_a>\n    <ip1001_a name=\"assembled\">\n      <cmd path=\"/ethernet@ff3f0000 mc_val\" type=\"x\" >\n        <value>0x1609</value>\n      </cmd>\n      <cmd path=\"/ethernet@ff3f0000 cali_val\" type=\"x\" >\n        <value>0xc0000</value>\n      </cmd>\n      <cmd path=\"/ethernet@ff3f0000 rx_delay\" option=\"d\" />\n      <cmd path=\"/ethernet@ff3f0000 auto_cali_idx\" option=\"d\" />\n    </ip1001_a>\n  </ip1001>\n\n  <smartchip status=\"migrated\" dt_id=\"gxl_*\" version=\"1\">\n    <smartchip_disabled name=\"Disabled\">\n      <cmd path=\"/smartchip_wifi_driver/ compatible\" type=\"s\" >\n        <value>smartchip,disabled</value>\n      </cmd>\n      <cmd path=\"/sdio@d0070000/sdio dmode\" option=\"d\" />\n    </smartchip_disabled>\n    <s9083s name=\"S-9083\">\n      <cmd path=\"/smartchip_wifi_driver/ compatible\" type=\"s\" >\n        <value>smartchip,s9083s</value>\n      </cmd>\n      <cmd path=\"/sdio@d0070000/sdio dmode\" type=\"s\" >\n        <value>pio</value>\n      </cmd>\n    </s9083s>\n    <s9188s name=\"S-9188\">\n      <cmd path=\"/smartchip_wifi_driver/ compatible\" type=\"s\" >\n        <value>smartchip,s9188s</value>\n      </cmd>\n      <cmd path=\"/sdio@d0070000/sdio dmode\" type=\"s\" >\n        <value>pio</value>\n      </cmd>\n    </s9188s>\n    <richv300 name=\"RICHV300\">\n      <cmd path=\"/smartchip_wifi_driver/ compatible\" type=\"s\" >\n        <value>smartchip,richv300s</value>\n      </cmd>\n      <cmd path=\"/sdio@d0070000/sdio dmode\" type=\"s\" >\n        <value>pio</value>\n      </cmd>\n    </richv300>\n  </smartchip>\n\n</dtb-settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/mkbootimg",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nDTBIMG_PATH=\"arch/$TARGET_KERNEL_ARCH/boot\"\nDTB_PATH=\"${DTBIMG_PATH}/dts/amlogic\"\nANDROID_BOOTIMG_SECOND=\"\"\n\nSUBDEVICES+=\" Generic\"\nfor device in $SUBDEVICES; do\n  DTB_BLOBS_PATH=${DTB_PATH}/${device}\n  mkdir -p ${DTB_BLOBS_PATH}\n  if [ \"$device\" = \"Generic\" ]; then\n    for dtblob in $KERNEL_UBOOT_EXTRA_TARGET; do\n      cp ${DTB_PATH}/$dtblob ${DTB_BLOBS_PATH} 2>/dev/null || :\n    done\n  else\n    MULTIDTB_BLOB=\"\"\n    find_file_path bootloader/dtb.conf\n    MULTIDTB_CONF=\"${FOUND_PATH}\"\n    if [ -f ${MULTIDTB_CONF} ]; then\n      multidtb_cnt=$(xmlstarlet sel -t -c \"count(//dtb/multidtb)\" ${MULTIDTB_CONF})\n      cnt_m=1\n      while [ $cnt_m -le $multidtb_cnt ]; do\n        multidtb=$(xmlstarlet sel -t -v \"//dtb/multidtb[$cnt_m]/@name\" ${MULTIDTB_CONF}) || :\n        subdevice=$(xmlstarlet sel -t -v \"//dtb/multidtb[$cnt_m]/@subdevice\" ${MULTIDTB_CONF}) || :\n        if [ \"$device\" = \"$subdevice\" ]; then\n          echo \"Device tree multidtb subdevice: ${device}, ${multidtb%%.*}.dtb\"\n          MULTIDTB_BLOB=\"${multidtb%%.*}.dtb\"\n          break\n        fi\n        cnt_m=$((cnt_m+1))\n      done\n    fi\n    if [ -n \"${MULTIDTB_BLOB}\" ]; then\n      cp ${DTB_PATH}/${MULTIDTB_BLOB} ${DTB_BLOBS_PATH}/${device}_dtb.dtb 2>/dev/null || :\n    else\n      cp ${DTB_PATH}/*${device,,}.dtb ${DTB_BLOBS_PATH} 2>/dev/null || :\n    fi\n  fi\n  DTB_BLOBS=($(ls ${DTB_BLOBS_PATH}/*.dtb 2>/dev/null || true))\n  DTB_BLOBS_COUNT=${#DTB_BLOBS[@]}\n  DTB_BLOB_OUTPUT=${DTBIMG_PATH}/${device}_dtb.img\n  if [ \"$DTB_BLOBS_COUNT\" -gt 1 ]; then\n    $TOOLCHAIN/bin/dtbTool -c -o ${DTB_BLOB_OUTPUT} -p scripts/dtc/ ${DTB_BLOBS_PATH}\n  elif [ \"$DTB_BLOBS_COUNT\" -eq 1 ]; then\n    cp -PR $DTB_BLOBS $DTB_BLOB_OUTPUT\n  fi\ndone\n\nif [ -f ${DTBIMG_PATH}/Generic_dtb.img ]; then\n  ANDROID_BOOTIMG_SECOND=\"--second ${DTBIMG_PATH}/Generic_dtb.img\"\nfi\n\nLDFLAGS=\"\" mkbootimg --kernel arch/$TARGET_KERNEL_ARCH/boot/$KERNEL_TARGET --ramdisk $BUILD/image/initramfs.cpio \\\n  $ANDROID_BOOTIMG_SECOND $ANDROID_BOOTIMG_OPTIONS --output arch/$TARGET_KERNEL_ARCH/boot/boot.img\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/mkimage",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\n# copy amlogic autoscript files to part1 if needed\nif [ \"${SUBDEVICE}\" != \"Odroid_N2\" ] && [ \"${SUBDEVICE}\" != \"Odroid_N2L\" ] && [ \"${SUBDEVICE}\" != \"Odroid_C4\" ] && [ \"${SUBDEVICE}\" != \"Odroid_HC4\" ] && [ \"${SUBDEVICE}\" != \"LePotato\" ] && [ \"${SUBDEVICE}\" != \"LaFrite\" ] && [ \"${SUBDEVICE:0:10}\" != \"Radxa_Zero\" ]; then\n  for f in $RELEASE_DIR/3rdparty/bootloader/*autoscript; do\n    [ -e \"$f\" ] && mcopy \"$f\" ::\n  done\nfi\n\nif [ -f $RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_cfgload ]; then\n  mcopy -s $RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_cfgload \"::/cfgload\"\nfi\n\n# copy device trees to part1\nfor dtb in $RELEASE_DIR/3rdparty/bootloader/device_trees $RELEASE_DIR/3rdparty/bootloader/*.dtb $RELEASE_DIR/3rdparty/bootloader/dtb.img ; do\n  [ -e \"$dtb\" ] && mcopy -s \"$dtb\" ::\ndone\n\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/config.ini\" ]; then\n  mcopy $RELEASE_DIR/3rdparty/bootloader/config.ini ::\nfi\n\nif [ \"${SUBDEVICE}\" != \"Generic\" ]; then\n  if [ -f \"$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_dtb.img\" ]; then\n    mcopy $RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_dtb.img \"::/dtb.img\"\n  fi\n  if [ -f \"$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_u-boot\" ] && [ \"${SUBDEVICE}\" != \"LaFrite\" ] ; then\n    echo \"Writing u-boot to $(basename $DISK)\"\n    dd if=\"$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_u-boot\" of=\"$DISK\" conv=fsync,notrunc bs=1 count=112 >\"$SAVE_ERROR\" 2>&1 || show_error\n    dd if=\"$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_u-boot\" of=\"$DISK\" conv=fsync,notrunc bs=512 skip=1 seek=1 >\"$SAVE_ERROR\" 2>&1 || show_error\n  fi\n\n  if [ -f \"$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_boot.ini\" ]; then\n    cp -p \"$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_boot.ini\" \"$LE_TMP/boot.ini\"\n    sed -e \"s/@BOOT_UUID@/$UUID_SYSTEM/\" \\\n        -e \"s/@DISK_UUID@/$UUID_STORAGE/\" \\\n        -i \"$LE_TMP/boot.ini\"\n    mcopy \"$LE_TMP/boot.ini\" ::\n  fi\n\n  if [ \"${SUBDEVICE}\" == \"Odroid_N2\" -o \"${SUBDEVICE}\" == \"Odroid_N2L\" -o \"${SUBDEVICE}\" == \"Odroid_C4\" -o \"${SUBDEVICE}\" == \"Odroid_HC4\" ]; then\n    if [ -f \"$RELEASE_DIR/3rdparty/bootloader/hk-boot-logo-1080.bmp.gz\" ]; then\n      mcopy $RELEASE_DIR/3rdparty/bootloader/hk-boot-logo-1080.bmp.gz \"::/boot-logo-1080.bmp.gz\"\n    fi\n    if [ -f \"$RELEASE_DIR/3rdparty/bootloader/timeout-logo-1080.bmp.gz\" ]; then\n      mcopy $RELEASE_DIR/3rdparty/bootloader/timeout-logo-1080.bmp.gz ::\n    fi\n  fi\n\n  if [ \"${SUBDEVICE}\" == \"LePotato\" -o \"${SUBDEVICE}\" == \"LaFrite\" ]; then\n    if [ -f \"$RELEASE_DIR/3rdparty/bootloader/boot-logo-1080.bmp.gz\" ]; then\n      mcopy $RELEASE_DIR/3rdparty/bootloader/boot-logo-1080.bmp.gz ::\n    fi\n    if [ -f \"$RELEASE_DIR/3rdparty/bootloader/timeout-logo-1080.bmp.gz\" ]; then\n      mcopy $RELEASE_DIR/3rdparty/bootloader/timeout-logo-1080.bmp.gz ::\n    fi\n    if [ -f \"$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_chain_u-boot\" ]; then\n      mcopy $RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_chain_u-boot \"::/u-boot.bin\"\n    fi\n    if [ -f \"$RELEASE_DIR/3rdparty/bootloader/libretech_chain_boot\" ]; then\n      mcopy $RELEASE_DIR/3rdparty/bootloader/libretech_chain_boot \"::/boot.scr\"\n    fi\n  fi\n\n  if [ \"${SUBDEVICE:0:10}\" == \"Radxa_Zero\" ]; then\n    if [ -f \"$RELEASE_DIR/3rdparty/bootloader/radxa-boot-logo-1080.bmp.gz\" ]; then\n      mcopy $RELEASE_DIR/3rdparty/bootloader/radxa-boot-logo-1080.bmp.gz \"::/boot-logo-1080.bmp.gz\"\n    fi\n  fi\n\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/release",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nmkdir -p $RELEASE_DIR/3rdparty/bootloader\n  cp -a $INSTALL/usr/share/bootloader/* $RELEASE_DIR/3rdparty/bootloader\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/scripts/Generic_cfgload.src",
    "content": "echo \"Using device ${device}, number ${devnr}, partition ${partnr}, EmuELEC on eMMC: ${ce_on_emmc}\"\n\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\nsetenv native_4k_gui \"0\"\n\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=LABEL=EMUELEC disk=LABEL=STORAGE\"\nif test \"${ce_on_emmc}\" = \"yes\"; then setenv rootopt \"BOOT_IMAGE=kernel.img boot=LABEL=CE_FLASH disk=FOLDER=/dev/CE_STORAGE\"; fi\n\nif fatload ${device} ${devnr}:${partnr} ${loadaddr} resolution.ini; then env import -t ${loadaddr} ${filesize}; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif fatload ${device} ${devnr}:${partnr} ${loadaddr} config.ini; then env import -t ${loadaddr} ${filesize}; fi\n\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a73}\" != \"\"; then setenv max_freq_a73 \"max_freq_a73=${max_freq_a73}\"; fi\nif test \"${modeline}\" != \"\"; then setenv cmode \"modeline=${modeline}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\nif test \"${keymap}\" != \"\"; then setenv consoleopt \"${consoleopt} keymap=${keymap}\"; fi\nif test \"${loadaddr_kernel}\" != \"\"; then setenv loadaddr \"${loadaddr_kernel}\"; fi\nsetenv displayopt \"vout=${vout},en logo=osd0,loaded,${fb_addr} frac_rate_policy=${frac_rate_policy} native_4k_gui=${native_4k_gui} hdmitx=${hdmitx} hdr_policy=1\"\nsetenv initargs \"${rootopt} ${consoleopt} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${gpiopower} ${usbopts} ${cmode}\"\nsetenv bootargs \"${bootargs} ${initargs} ${displayopt} ${coreelec}\"\n\nfatload ${device} ${devnr}:${partnr} ${loadaddr} kernel.img\nfatload ${device} ${devnr}:${partnr} ${dtb_mem_addr} dtb.img\n\nbootm ${loadaddr}\nbootm start\nbootm loados\nbootm prep\nbootm go\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/scripts/aml_autoscript.src",
    "content": "defenv\nsetenv bootfromnand 0\nsetenv upgrade_step 2\nsetenv ce_on_emmc \"no\"\nsetenv sddtb 'if fatload mmc 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi'\nsetenv usbdtb 'if fatload usb 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi'\nsetenv cfgloadsd 'if fatload mmc 0:1 ${loadaddr} cfgload; then setenv device mmc; setenv devnr 0; setenv partnr 1; autoscr ${loadaddr}; fi'\nsetenv cfgloadusb 'if fatload usb 0:1 ${loadaddr} cfgload; then setenv device usb; setenv devnr 0; setenv partnr 1; autoscr ${loadaddr}; fi'\nsetenv cfgloademmc 'for p in 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18; do if fatload mmc 1:${p} ${loadaddr} cfgload; then setenv device mmc; setenv devnr 1; setenv partnr ${p}; setenv ce_on_emmc \"yes\"; autoscr ${loadaddr}; fi; done;'\nsetenv bootfromsd 'if mmcinfo; then run cfgloadsd; if fatload mmc 0 ${loadaddr} kernel.img; then run sddtb; setenv bootargs ${bootargs} bootfromsd; bootm; fi; fi'\nsetenv bootfromusb 'usb start 0; run cfgloadusb; if fatload usb 0 ${loadaddr} kernel.img; then run usbdtb; setenv bootargs ${bootargs} bootfromusb; bootm; fi'\nsetenv bootfromemmc 'run cfgloademmc'\nsetenv bootcmd 'if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; else run bootfromsd; run bootfromusb; run bootfromemmc; fi; run storeboot'\n\nsaveenv\nrun storeargs\nrun bootfromsd\nrun bootfromusb\nrun bootfromemmc\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/scripts/libretech_chain_boot.src",
    "content": "load mmc 0 0x1000000 u-boot.bin\nload usb 0 0x1000000 u-boot.bin\nload mmc 1 0x1000000 u-boot.bin\ngo 0x1000000\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/bootloader/update.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\n# use chroot because of running xmlstarlet and other binaries build with newer glibc\nif [ \"${SYSTEM_ROOT}\" = \"/update\" ]; then\n  # run from init\n  # unset SYSTEM_ROOT because we are chroot-ing and /update become new / anyway\n  unset SYSTEM_ROOT\n\n  # mount some folders from old root\n  mount -o bind /tmp /update/var\n\n  for folder in proc sys dev tmp run flash storage; do\n    [ -d /${folder} ] && mount -o bind /${folder} /update/${folder}\n  done\n\n  /usr/bin/busybox chroot /update /usr/share/bootloader/update.sh\n\n  # umount folders\n  for folder in proc sys dev tmp run flash storage; do\n    [ -d /${folder} ] && umount /update/${folder}\n  done\n\n  umount /update/var\n\n  # set it back just in case\n  SYSTEM_ROOT=\"/update\"\n  exit 0\nfi\n\n# change to writable folder\ncd /tmp\n\n[ -z \"$BOOT_ROOT\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"$BOOT_PART\" ] && BOOT_PART=$(df \"$BOOT_ROOT\" | tail -1 | awk {' print $1 '})\nif [ -z \"$BOOT_DISK\" ]; then\n  case $BOOT_PART in\n    /dev/sd[a-z][0-9]*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,[0-9]*,,g\")\n      ;;\n    /dev/mmcblk*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,p[0-9]*,,g\")\n      ;;\n  esac\nfi\n\nmount -o rw,remount $BOOT_ROOT\n\nDT_ID=\"\"\nSUBDEVICE=\"\"\n\nfor arg in $(cat /proc/cmdline); do\n  case $arg in\n    boot=*)\n      boot=\"${arg#*=}\"\n      case $boot in\n        /dev/mmc*)\n          BOOT_UUID=\"$(blkid $boot | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          BOOT_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" $boot \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n        FOLDER=*)\n          BOOT_UUID=\"$(blkid ${boot#*=} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n      esac\n\n      DT_ID=$(dtname)\n      MIGRATE_DTB=\"\"\n      if [ -n \"$DT_ID\" ]; then\n        SUBDEVICE=\"Generic\"\n        # modify DT_ID, SUBDEVICE and MIGRATE_DTB by dtb.conf\n        [ -f /usr/bin/convert_dtname ] && . /usr/bin/convert_dtname $DT_ID\n\n        case $DT_ID in\n          *odroid_c4*)\n            SUBDEVICE=\"Odroid_C4\"\n            ;;\n          *odroid_hc4*)\n            SUBDEVICE=\"Odroid_HC4\"\n            ;;\n          *lafrite)\n            SUBDEVICE=\"LaFrite\"\n            ;;\n          *radxa_zero)\n            SUBDEVICE=\"Radxa_Zero\"\n            ;;\n          *radxa_zero2)\n            SUBDEVICE=\"Radxa_Zero2\"\n            ;;\n        esac\n      fi\n\n      UPDATE_DTB_SOURCE=\"/usr/share/bootloader/device_trees/$DT_ID.dtb\"\n      if [ -n \"$DT_ID\" -a -f \"$UPDATE_DTB_SOURCE\" ]; then\n        echo \"Updating device tree with $DT_ID.dtb...\"\n        case $BOOT_PART in\n          /dev/coreelec)\n            dd if=/dev/zero of=/dev/dtb bs=256k count=1 status=none\n            dd if=\"$UPDATE_DTB_SOURCE\" of=/dev/dtb bs=256k status=none\n            rm -f \"$BOOT_ROOT/dtb.img\" # this should not exist, remove if it does\n            ;;\n          *)\n            cp -f \"$UPDATE_DTB_SOURCE\" \"$BOOT_ROOT/dtb.img\"\n            ;;\n        esac\n        [ -n \"$MIGRATE_DTB\" ] && eval $MIGRATE_DTB\n      fi\n\n      for all_dtb in /flash/*.dtb ; do\n        if [ -f $all_dtb ]; then\n          dtb=$(basename $all_dtb)\n          if [ -f /usr/share/bootloader/$dtb ]; then\n            echo \"Updating $dtb...\"\n            cp -p /usr/share/bootloader/$dtb $BOOT_ROOT\n          fi\n        fi\n      done\n      ;;\n\n    disk=*)\n      disk=\"${arg#*=}\"\n      case $disk in\n        /dev/mmc*)\n          DISK_UUID=\"$(blkid $disk | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          DISK_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" $disk \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n        FOLDER=*)\n          DISK_UUID=\"$(blkid ${disk#*=} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n      esac\n      ;;\n  esac\ndone\n\nif [ -d $BOOT_ROOT/device_trees ]; then\n  echo \"Updating device_trees folder...\"\n  rm $BOOT_ROOT/device_trees/*.dtb\n  cp -p /usr/share/bootloader/device_trees/*.dtb $BOOT_ROOT/device_trees/\nfi\n\nif [ -f /usr/share/bootloader/${SUBDEVICE}_boot.ini ]; then\n  echo \"Updating boot.ini with ${SUBDEVICE}_boot.ini...\"\n  cp -p /usr/share/bootloader/${SUBDEVICE}_boot.ini $BOOT_ROOT/boot.ini\n  sed -e \"s/@BOOT_UUID@/$BOOT_UUID/\" \\\n      -e \"s/@DISK_UUID@/$DISK_UUID/\" \\\n      -i $BOOT_ROOT/boot.ini\nfi\n\nif [ -f /usr/share/bootloader/config.ini ]; then\n  if [ ! -f $BOOT_ROOT/config.ini ]; then\n    echo \"Creating config.ini...\"\n    cp -p /usr/share/bootloader/config.ini $BOOT_ROOT/config.ini\n  fi\nfi\n\nif [ -f $BOOT_ROOT/dtb.xml ]; then\n  if [ -f /usr/lib/coreelec/dtb-xml ]; then\n    echo \"Updating dtb.img by dtb.xml...\"\n    /usr/lib/coreelec/dtb-xml\n  fi\nfi\n\nif [ \"${SUBDEVICE}\" == \"Odroid_N2\" -o \"${SUBDEVICE}\" == \"Odroid_N2L\" -o \"${SUBDEVICE}\" == \"Odroid_C4\" -o \"${SUBDEVICE}\" == \"Odroid_HC4\" ]; then\n  if [ -f /usr/share/bootloader/hk-boot-logo-1080.bmp.gz ]; then\n    echo \"Updating boot logos...\"\n    cp -p /usr/share/bootloader/hk-boot-logo-1080.bmp.gz $BOOT_ROOT/boot-logo-1080.bmp.gz\n  fi\nfi\n\nif [ \"${SUBDEVICE}\" == \"LePotato\" -o \"${SUBDEVICE}\" == \"LaFrite\" ]; then\n  if [ -f /usr/share/bootloader/boot-logo-1080.bmp.gz ]; then\n    echo \"Updating boot logos...\"\n    cp -p /usr/share/bootloader/boot-logo-1080.bmp.gz $BOOT_ROOT/boot-logo-1080.bmp.gz\n  fi\nfi\n\nif [ \"${SUBDEVICE:0:10}\" == \"Radxa_Zero\" ]; then\n  if [ -f /usr/share/bootloader/radxa-boot-logo-1080.bmp.gz ]; then\n    echo \"Updating boot logos...\"\n    cp -p /usr/share/bootloader/radxa-boot-logo-1080.bmp.gz $BOOT_ROOT/boot-logo-1080.bmp.gz\n  fi\nfi\n\nif [ -f /usr/share/bootloader/${SUBDEVICE}_u-boot -a ! -e /dev/env ]; then\n  echo \"Updating u-boot on: $BOOT_DISK...\"\n  dd if=/usr/share/bootloader/${SUBDEVICE}_u-boot of=$BOOT_DISK conv=fsync bs=1 count=112 status=none\n  dd if=/usr/share/bootloader/${SUBDEVICE}_u-boot of=$BOOT_DISK conv=fsync bs=512 skip=1 seek=1 status=none\nfi\n\nif [ -f $BOOT_ROOT/boot.scr ]; then\n  if [ -f /usr/share/bootloader/${SUBDEVICE}_chain_u-boot ]; then\n    echo \"Updating chain loaded u-boot...\"\n    cp -p /usr/share/bootloader/${SUBDEVICE}_chain_u-boot $BOOT_ROOT/u-boot.bin\n  fi\n  if [ \"${SUBDEVICE}\" == \"LePotato\"  -o \"${SUBDEVICE}\" == \"LaFrite\" ]; then\n    if [ -f /usr/share/bootloader/libretech_chain_boot ]; then\n      echo \"Updating boot.scr...\"\n      cp -p /usr/share/bootloader/libretech_chain_boot $BOOT_ROOT/boot.scr\n    fi\n  fi\nfi\n\nif [ -f $BOOT_ROOT/aml_autoscript ]; then\n  if [ -f /usr/share/bootloader/aml_autoscript ]; then\n    echo \"Updating aml_autoscript...\"\n    cp -p /usr/share/bootloader/aml_autoscript $BOOT_ROOT\n    if [ -e /dev/env ]; then\n      mkdir -p /var/lock\n      dd if=$BOOT_ROOT/aml_autoscript bs=72 skip=1 status=none | \\\n      while read line; do\n        cmd=$(echo $line | sed -n \"s|^setenv \\(.*\\)|fw_setenv -c /etc/fw_env.config \\1|gp\")\n        [ -n \"$cmd\" ] && eval $cmd\n      done\n    fi\n  fi\n  if [ -f /usr/share/bootloader/${SUBDEVICE}_cfgload ]; then\n    echo \"Updating cfgload...\"\n    cp -p /usr/share/bootloader/${SUBDEVICE}_cfgload $BOOT_ROOT/cfgload\n  fi\n  /usr/lib/coreelec/check-bl301\n  if [ ${?} = 1 ]; then\n    echo \"Found custom CoreELEC BL301, running inject_bl301 tool...\"\n    inject_bl301 -Y &>/dev/null\n  fi\nfi\n\nmount -o ro,remount $BOOT_ROOT\n\n# Leave a hint that we just did an update\necho \"UPDATE\" > /storage/.config/boot.hint\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/filesystem/usr/lib/coreelec/smp-affinity.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nSMP=\"../smp_affinity\"\nMESONIR=\"`find /proc/irq/ -name ir-meson`\"\nETH0=\"`find /proc/irq/ -name eth0`\"\nVDEC0=\"`find /proc/irq/ -name vdec-0`\"\nVDEC1=\"`find /proc/irq/ -name vdec-1`\"\nPREDI=\"`find /proc/irq/ -name pre_di`\"\nAFIFO0=\"`find /proc/irq/ -name afifo0`\"\nAOCEC=\"`find /proc/irq/ -name hdmi_aocec*`\"\nUSB3=\"`find /proc/irq/ -name xhci-hcd:usb1`\"\nIRQ=\"$AOCEC $ETH0 $USB3 $VDEC0 $VDEC1 $AFIFO0 $MESONIR $PREDI\"\n\ncpu=1\nfor i in $IRQ; do\n    if [ -f \"$i/$SMP\" ];then\n        [ ! -d \"/sys/devices/system/cpu/cpu$cpu\" ] && cpu=1\n        aff=$((1 << $cpu))\n        haff=`printf '%x\\n' $aff`\n        echo \"echo $haff > $i/$SMP\"\n        echo $haff > $i/$SMP\n        cpu=$((cpu + 1))\n    fi\ndone\n\nexit 0\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/filesystem/usr/lib/kodi/aml-hdmimonitor.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nHDMI_UNPLUGGED=0\nwhile :; do\n  ! grep -q . /sys/class/amhdmitx/amhdmitx0/disp_cap &&\n    grep -q 0 /sys/class/amhdmitx/amhdmitx0/hpd_state &&\n    HDMI_UNPLUGGED=1 && sleep 2 && continue ||\n  break\ndone\n\nif [ $HDMI_UNPLUGGED = 1 ]\nthen systemctl restart kodi\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/filesystem/usr/lib/systemd/system/kodi-aml-hdmimonitor.service",
    "content": "[Unit]\nDescription=Kodi Amlogic HDMI connection monitor\nAfter=kodi.service\n\n[Service]\nType=simple\nExecStart=/usr/lib/kodi/aml-hdmimonitor.sh\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/filesystem/usr/sbin/installtoemmc",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nDISTRO_BOOTLABEL=\"EMUELEC\"\nDISTRO_DISKLABEL=\"STORAGE\"\nSYSTEM_PART_START=8192\nSYSTEM_SIZE=1500\nSYSTEM_PART_END=$(( ${SYSTEM_PART_START} + (${SYSTEM_SIZE} * 1024 * 1024 / 512) - 1 ))\nSTORAGE_PART_START=$(( ${SYSTEM_PART_END} + 1 ))\n\nSYSTEM_BLKDEV=$(readlink -f /dev/block/$(mountpoint -d /flash))\nBLKDEVNAME=$(ls /sys/class/mmc_host/emmc/emmc*/block 2> /dev/null)\nBLKDEV=\"/dev/${BLKDEVNAME}\"\nBOOT_PART=\"${BLKDEV}p1\"\nSTORAGE_PART=\"${BLKDEV}p2\"\nNEWBOOT=/var/media/NEWBOOT\nNEWSTORAGE=/var/media/NEWSTORAGE\nDT_ID=$(dtname)\n\numount_all() {\n  mounted=$(cat /proc/mounts | grep \"${BLKDEV}\" | awk '{ print $1 }')\n  if [ -n \"$mounted\" ]; then\n    echo \"Unmount all partitions from ${BLKDEVNAME}...\"\n    umount $mounted\n    sleep 2\n  fi\n}\n\nconfirm_move() {\nif [ -z \"$BLKDEVNAME\" ]; then\n  echo \"eMMC not found.\"\n  exit 0\nfi\necho \"--------------------------------------------------\"\necho \"\"\necho \"This script will now erase the eMMC on your device\"\necho \"All data on this eMMC will be lost forever!\"\necho \"\"\nread -p \"Type \\\"yes\\\" if you know what you are doing or anything else to exit: \" choice\ncase \"$choice\" in\n  yes) install_to_emmc ;;\n    *) exit 0 ;;\nesac\n\n}\n\ninstall_to_emmc() {\n\n  #stop kodi\n  echo \"Stopping Kodi...\"\n  systemctl stop kodi\n\n  # umount\n  umount_all\n\n  # nuke it\n  echo \"Delete all partitions...\"\n  dd if=/dev/zero of=${BLKDEV} bs=512 count=1\n\n  # create partitions\n  echo \"Create new partitions...\"\n  parted -s \"${BLKDEV}\" mklabel \"msdos\"\n  parted -s \"${BLKDEV}\" -a min unit s mkpart primary fat32 \"${SYSTEM_PART_START}\" \"${SYSTEM_PART_END}\"\n  parted -s \"${BLKDEV}\" set 1 boot on\n  parted -s \"${BLKDEV}\" -a min unit s mkpart primary ext4 \"${STORAGE_PART_START}\" \"100%\"\n  sync\n\n  # Flash u-boot\n  echo \"Flash Bootloader...\"\n  dd if=/usr/share/bootloader/${DEVICE}_u-boot of=${BLKDEV} conv=fsync bs=1 count=112 status=none\n  dd if=/usr/share/bootloader/${DEVICE}_u-boot of=${BLKDEV} conv=fsync bs=512 skip=1 seek=1 status=none\n  sync\n\n  # create fs for new /flash\n  echo \"Create Filesystem for new flash partition...\"\n  mkfs.vfat -n \"${DISTRO_BOOTLABEL}\" \"${BOOT_PART}\" ; sync\n\n  # create fs for new /storage\n  echo \"Create Filesystem for new storage partition...\"\n  mke2fs -F -q -L \"${DISTRO_DISKLABEL}\" -t ext4 -m 0 \"${STORAGE_PART}\" ; sync\n\n  # umount again\n  umount_all\n\n  # mount\n  echo \"Mount new partitions...\"\n  mkdir -p \"${NEWBOOT}\" \"${NEWSTORAGE}\"\n  mount \"${BOOT_PART}\" \"${NEWBOOT}\"\n  mount \"${STORAGE_PART}\" \"${NEWSTORAGE}\"\n\n  # cp /flash files\n  echo \"Copy /flash files to new flash partition...\"\n  cp -a /flash/kernel.img /flash/SYSTEM /flash/dtb.img ${NEWBOOT}\n  echo \"Copy template boot.ini...\"\n  cp -a /usr/share/bootloader/${DEVICE}_boot.ini ${NEWBOOT}/boot.ini\n  echo \"Copy config.ini...\"\n  if [ -e /flash/config.ini ]; then\n    cp -a /flash/config.ini ${NEWBOOT}\n  else\n    cp -a /usr/share/bootloader/config.ini ${NEWBOOT}\n  fi\n  sync\n\n  # set our new UUID's\n  BOOT_UUID=\"$(blkid ${BOOT_PART} | sed 's/.* UUID=\"//;s/\".*//g')\"\n  STORAGE_UUID=\"$(blkid ${STORAGE_PART} | sed 's/.* UUID=\"//;s/\".*//g')\"\n  echo \"Set UUIDs in new boot.ini...\"\n  sed -e \"s/@BOOT_UUID@/$BOOT_UUID/\" \\\n      -e \"s/@DISK_UUID@/$STORAGE_UUID/\" \\\n      -i ${NEWBOOT}/boot.ini\n\n  # check if there is enough space\n  space_available=$(df \"${NEWSTORAGE}\" | awk 'NR==2 { print $4 }')\n  space_required=$(df \"/storage/\" | awk 'NR==2 { print $3 }')\n  if [ $space_available -ge $space_required ]; then\n    # rsync userdata\n    echo \"Rsync /storage files to new storage partition...\"\n    rsync -Pa /storage/ $NEWSTORAGE/\n  else\n    echo \"Not enough space on the new storage partition. Skipping... \"\n  fi\n\n  umount_all\n\n  echo \"All done! Please poweroff your device and remove the SD/USB.\"\n  echo \"Enjoy!\"\n}\n\nif [ \"$SYSTEM_BLKDEV\" = \"/dev/block\" -o \"$SYSTEM_BLKDEV\" = \"$BOOT_PART\" ]; then\n  echo \"No no no no no! Don't use that script from eMMC otherwise it will eat your data!\"\n  exit 1\nfi\n\ncase $DT_ID in\n  *odroid_n2*)\n    DEVICE=\"Odroid_N2\"\n    ;;\n  *)\n    echo \"This script is only for Odroid N2. It won't work on other devices!\"\n    exit 1\n    ;;\nesac\n\necho $DEVICE\n\nif [ \"$DEVICE\" = \"Odroid_N2\" ]; then\n  echo \"This script will help you move a EmuELEC install on to an Odroid_N2 eMMC module\"\n  echo \"from an existing EmuELEC install on an SD card or USB drive.\"\n  echo \"\"\n  echo \"Before begining you will need to have an eMMC properly attached to your N2.\"\n  echo \"You will also need to start your N2 with the boot mode switch in the SPI position\"\n  echo \"and boot your existing SD card or USB install using the petitboot menu.\"\n  echo \"After you move your EmuELEC install to the eMMC module you can return the\"\n  echo \"boot mode switch to the MMC position for regular use.\"\n  echo \"\"\n  echo \"Make sure when adding or removing the eMMC module or when toggling the boot mode\"\n  echo \"switch that your Odroid N2 is powered off.\"\n  echo \"\"\n  read -p \"Type \\\"yes\\\" if you know what you are doing or anything else to exit: \" choice\n  case \"$choice\" in\n    yes) confirm_move ;;\n      *) exit 0 ;;\n  esac\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/initramfs/platform_init",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\ndisplay_mode=$(cat /sys/class/display/mode)\n# default values\ndisplay_mode_user=\"1080p60hz\"\nfrac_rate_policy_user=\"0\"\n\nfor arg in $(cat /proc/cmdline); do\n  case ${arg} in\n    bootfrom*)\n      bootfromext=1\n      ;;\n    BOOT_IMAGE=*)\n      BOOT_IMAGE=${arg#*=}\n      ;;\n    boot=*)\n      boot=${arg#*=}\n      ;;\n    disk=*)\n      disk=${arg#*=}\n      ;;\n    frac_rate_policy=*)\n      frac_rate_policy_user=${arg#*=}\n      ;;\n    vout=*)\n      vout=${arg#*=}\n      display_mode_user=${vout%%,*}\n      # implementation not yet finished by Amlogic\n      #frac_rate_policy_user=\"0\"\n      #if [ -z ${vout##*frac*} ]; then\n      #  frac_rate_policy_user=\"1\"\n      #fi\n      ;;\n    native_4k_gui=*)\n      native_4k_gui=${arg#*=}\n      ;;\n  esac\ndone\n\n# Add information where to run CoreELEC from\nif [ -z \"$BOOT_IMAGE\" -o -z \"$boot\" -o -z \"$disk\" ]; then\n  cmdline=$(cat /proc/cmdline)\n  if [ -n \"$bootfromext\" ]; then\n    cmdline=\"$cmdline BOOT_IMAGE=kernel.img boot=LABEL=@BOOT_LABEL@ disk=LABEL=@DISK_LABEL@\"\n  fi\n  echo \"$cmdline\" > /proc/cmdline\nfi\n\n# Enable HDMI output if cable is connected and not already enabled by u-boot\nif [ \"$(cat /sys/class/amhdmitx/amhdmitx0/hpd_state)\" != \"0\" ]; then\n  frac_rate_policy=$(cat /sys/devices/virtual/amhdmitx/amhdmitx0/frac_rate_policy)\n  if [ \"${frac_rate_policy}\" != \"${frac_rate_policy_user}\" ]; then\n    display_mode=\"null\"\n    echo \"${display_mode}\" > /sys/class/display/mode\n    echo \"${frac_rate_policy_user}\" > /sys/devices/virtual/amhdmitx/amhdmitx0/frac_rate_policy\n  fi\n  if [ \"${display_mode}\" != \"${display_mode_user}\" ]; then\n    echo \"${display_mode_user}\" > /sys/class/display/mode\n    display_mode=\"${display_mode_user}\"\n  fi\nfi\n\n# Set framebuffer geometry to match the resolution\ncase $display_mode in\n  *x*)   RES=${display_mode%%[ip]*} X=${RES%%x*} Y=${RES##*x};;\n  480*)            X=720  Y=480  ;;\n  576*)            X=720  Y=576  ;;\n  720p*)           X=1280 Y=720  ;;\n  2160p*)          X=3840 Y=2160 ;;\n  *)               X=1920 Y=1080 ;;\nesac\n\nif [ \"$native_4k_gui\" != \"1\" -a $X -gt 1920 ]; then\n  X=1920\n  Y=1080\nfi\n\nY_VIRT=$(($Y * 2))\n\nif [[ \"${EE_DEVICE}\" == \"Amlogic\" ]]; then \n  fbset -fb /dev/fb0 -g $X $Y 1920 2160 32\nelse\n  fbset -fb /dev/fb0 -g $X $Y $X $Y_VIRT 32\nfi\nfbset -fb /dev/fb1 -g 32 32 32 32 32\necho 0 > /sys/class/graphics/fb0/free_scale\necho 0 > /sys/class/graphics/fb1/free_scale\necho 1 > /sys/class/video/disable_video\n\n# Enable scaling for 4K output\nif [ \"$native_4k_gui\" != \"1\" ]; then\n  case $display_mode in\n    4k*|smpte*|2160*)\n      echo 0 0 1919 1079 > /sys/class/graphics/fb0/free_scale_axis\n      echo 0 0 3839 2159 > /sys/class/graphics/fb0/window_axis\n      echo 0x10001 > /sys/class/graphics/fb0/free_scale\n    ;;\n  esac\nfi\n\n# Enable framebuffer device\necho 0 > /sys/class/graphics/fb0/blank\n\n# Blank fb1 to prevent static noise\necho 1 > /sys/class/graphics/fb1/blank\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/kodi/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n  <section id=\"system\">\n    <category id=\"display\">\n      <group id=\"1\">\n        <setting id=\"videoscreen.limitedrange\">\n          <visible>false</visible>\n        </setting>\n      </group>\n    </category>\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.config\">\n          <default>3</default>\n        </setting>\n        <setting id=\"audiooutput.streamnoise\">\n          <default>false</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n  <section id=\"player\">\n    <category id=\"videoplayer\">\n      <group id=\"2\">\n        <setting id=\"videoplayer.adjustrefreshrate\">\n          <default>2</default> <!-- ADJUST_REFRESHRATE_ON_STARTSTOP -->\n          <constraints>\n            <options>\n              <option label=\"351\">0</option> <!-- ADJUST_REFRESHRATE_OFF -->\n              <option label=\"36036\">2</option> <!-- ADJUST_REFRESHRATE_ON_STARTSTOP -->\n              <option label=\"36050\">3</option> <!-- ADJUST_REFRESHRATE_ON_START -->\n            </options>\n          </constraints>\n        </setting>\n      </group>\n    </category>\n  </section>\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/kodi/g12x/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n  <section id=\"system\">\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.audiodevice\">\n          <default>ALSA:surround71:CARD=AMLAUGESOUND,DEV=0</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/kodi/gxx/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n  <section id=\"system\">\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.audiodevice\">\n          <default>ALSA:hdmi:CARD=AMLMESONAUDIO,DEV=0</default>\n        </setting>\n        <setting id=\"audiooutput.streamsilence\">\n          <default>0</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/linux/linux.aarch64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm64 4.9.269 Kernel Configuration\n#\nCONFIG_ARM64=y\nCONFIG_64BIT=y\nCONFIG_ARCH_PHYS_ADDR_T_64BIT=y\nCONFIG_MMU=y\nCONFIG_DEBUG_RODATA=y\nCONFIG_ARM64_PAGE_SHIFT=12\nCONFIG_ARM64_CONT_SHIFT=4\nCONFIG_ARCH_MMAP_RND_BITS_MIN=18\nCONFIG_ARCH_MMAP_RND_BITS_MAX=24\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_RWSEM_XCHGADD_ALGORITHM=y\nCONFIG_GENERIC_BUG=y\nCONFIG_GENERIC_BUG_RELATIVE_POINTERS=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CSUM=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ZONE_DMA=y\nCONFIG_HAVE_GENERIC_RCU_GUP=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_SMP=y\nCONFIG_SWIOTLB=y\nCONFIG_IOMMU_HELPER=y\nCONFIG_KERNEL_MODE_NEON=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_PGTABLE_LEVELS=3\nCONFIG_DEFCONFIG_LIST=\"/lib/modules/$UNAME_RELEASE/.config\"\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_EXTABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=64\nCONFIG_CROSS_COMPILE=\"\"\n# CONFIG_COMPILE_TEST is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SWAP=y\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_FHANDLE is not set\n# CONFIG_USELIB is not set\nCONFIG_AUDIT=y\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\nCONFIG_AUDITSYSCALL=y\nCONFIG_AUDIT_WATCH=y\nCONFIG_AUDIT_TREE=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_MSI_IRQ=y\nCONFIG_GENERIC_MSI_IRQ_DOMAIN=y\nCONFIG_HANDLE_DOMAIN_IRQ=y\n# CONFIG_IRQ_DOMAIN_DEBUG is not set\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\nCONFIG_ARCH_CLOCKSOURCE_DATA=y\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\nCONFIG_SCHED_WALT=y\nCONFIG_BSD_PROCESS_ACCT=y\n# CONFIG_BSD_PROCESS_ACCT_V3 is not set\nCONFIG_TASKSTATS=y\nCONFIG_TASK_DELAY_ACCT=y\nCONFIG_TASK_XACCT=y\nCONFIG_TASK_IO_ACCOUNTING=y\n# CONFIG_PSI is not set\n\n#\n# RCU Subsystem\n#\nCONFIG_PREEMPT_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\n# CONFIG_TASKS_RCU is not set\nCONFIG_RCU_STALL_COMMON=y\n# CONFIG_TREE_RCU_TRACE is not set\n# CONFIG_RCU_EXPEDITE_BOOT is not set\nCONFIG_BUILD_BIN2C=y\nCONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y\nCONFIG_LOG_BUF_SHIFT=19\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_GENERIC_SCHED_CLOCK=y\nCONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y\nCONFIG_CGROUPS=y\nCONFIG_CGROUP_DEBUG=y\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CGROUP_PIDS=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_CPUACCT=y\n# CONFIG_CGROUP_SCHEDTUNE is not set\nCONFIG_PAGE_COUNTER=y\nCONFIG_MEMCG=y\n# CONFIG_MEMCG_SWAP is not set\n# CONFIG_BLK_CGROUP is not set\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\n# CONFIG_CFS_BANDWIDTH is not set\nCONFIG_RT_GROUP_SCHED=y\n# CONFIG_CGROUP_PERF is not set\nCONFIG_CGROUP_BPF=y\nCONFIG_SOCK_CGROUP_DATA=y\n# CONFIG_CHECKPOINT_RESTORE is not set\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_SCHED_AUTOGROUP is not set\nCONFIG_SCHED_TUNE=y\nCONFIG_DEFAULT_USE_ENERGY_AWARE=y\n# CONFIG_SYSFS_DEPRECATED is not set\nCONFIG_RELAY=y\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\" \"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\nCONFIG_RD_GZIP=y\nCONFIG_RD_BZIP2=y\nCONFIG_RD_LZMA=y\nCONFIG_RD_XZ=y\nCONFIG_RD_LZO=y\nCONFIG_RD_LZ4=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\nCONFIG_BPF=y\nCONFIG_EXPERT=y\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\n# CONFIG_SGETMASK_SYSCALL is not set\nCONFIG_SYSFS_SYSCALL=y\n# CONFIG_SYSCTL_SYSCALL is not set\nCONFIG_KALLSYMS=y\nCONFIG_KALLSYMS_ALL=y\n# CONFIG_KALLSYMS_ABSOLUTE_PERCPU is not set\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_BPF_SYSCALL=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_ADVISE_SYSCALLS=y\n# CONFIG_USERFAULTFD is not set\nCONFIG_PCI_QUIRKS=y\nCONFIG_MEMBARRIER=y\nCONFIG_EMBEDDED=y\nCONFIG_HAVE_PERF_EVENTS=y\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\nCONFIG_VM_EVENT_COUNTERS=y\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_MEMCG_SYSFS_ON is not set\n# CONFIG_COMPAT_BRK is not set\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\n# CONFIG_SLAB_FREELIST_RANDOM is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# CONFIG_SYSTEM_DATA_VERIFICATION is not set\nCONFIG_PROFILING=y\nCONFIG_TRACEPOINTS=y\nCONFIG_KEXEC_CORE=y\n# CONFIG_KPROBES is not set\nCONFIG_JUMP_LABEL=y\n# CONFIG_STATIC_KEYS_SELFTEST is not set\n# CONFIG_UPROBES is not set\n# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_DMA_API_DEBUG=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_HAVE_RCU_TABLE_FREE=y\nCONFIG_HAVE_ALIGNED_STRUCT_PAGE=y\nCONFIG_HAVE_CMPXCHG_LOCAL=y\nCONFIG_HAVE_CMPXCHG_DOUBLE=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP_FILTER=y\nCONFIG_HAVE_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGINS is not set\nCONFIG_HAVE_CC_STACKPROTECTOR=y\n# CONFIG_CC_STACKPROTECTOR is not set\n# CONFIG_CC_STACKPROTECTOR_NONE is not set\n# CONFIG_CC_STACKPROTECTOR_REGULAR is not set\nCONFIG_CC_STACKPROTECTOR_STRONG=y\n# CONFIG_CC_STACKPROTECTOR_STRONG_AMLOGIC is not set\n# CONFIG_LTO is not set\nCONFIG_ARCH_SUPPORTS_LTO_CLANG=y\nCONFIG_LTO_NONE=y\n# CONFIG_LTO_CLANG is not set\nCONFIG_HAVE_CONTEXT_TRACKING=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_HAVE_ARCH_HUGE_VMAP=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_ARCH_MMAP_RND_BITS=18\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=11\n# CONFIG_HAVE_ARCH_HASH is not set\n# CONFIG_ISA_BUS_API is not set\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\n# CONFIG_CPU_NO_EFFICIENT_FFS is not set\n# CONFIG_HAVE_ARCH_VMAP_STACK is not set\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\nCONFIG_HAVE_GENERIC_DMA_COHERENT=y\nCONFIG_SLABINFO=y\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\nCONFIG_MODVERSIONS=y\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\n# CONFIG_MODULE_COMPRESS is not set\n# CONFIG_TRIM_UNUSED_KSYMS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\nCONFIG_BLK_DEV_BSG=y\nCONFIG_BLK_DEV_BSGLIB=y\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_CMDLINE_PARSER is not set\n\n#\n# Partition Types\n#\n# CONFIG_PARTITION_ADVANCED is not set\nCONFIG_MSDOS_PARTITION=y\nCONFIG_EFI_PARTITION=y\nCONFIG_BLOCK_COMPAT=y\nCONFIG_BLK_MQ_PCI=y\n\n#\n# IO Schedulers\n#\nCONFIG_IOSCHED_NOOP=y\nCONFIG_IOSCHED_DEADLINE=y\nCONFIG_IOSCHED_CFQ=y\n# CONFIG_DEFAULT_DEADLINE is not set\n# CONFIG_DEFAULT_CFQ is not set\nCONFIG_DEFAULT_NOOP=y\nCONFIG_DEFAULT_IOSCHED=\"noop\"\nCONFIG_ASN1=y\nCONFIG_UNINLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_FREEZER=y\n\n#\n# Platform selection\n#\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_BCM2835 is not set\n# CONFIG_ARCH_BCM_IPROC is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_BRCMSTB is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_LAYERSCAPE is not set\n# CONFIG_ARCH_LG1K is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_MESON is not set\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_ROCKCHIP is not set\n# CONFIG_ARCH_SEATTLE is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_STRATIX10 is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_SPRD is not set\n# CONFIG_ARCH_THUNDER is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_VULCAN is not set\n# CONFIG_ARCH_XGENE is not set\n# CONFIG_ARCH_ZX is not set\n# CONFIG_ARCH_ZYNQMP is not set\n\n#\n# Bus support\n#\nCONFIG_PCI=y\nCONFIG_PCI_DOMAINS=y\nCONFIG_PCI_DOMAINS_GENERIC=y\nCONFIG_PCI_SYSCALL=y\nCONFIG_PCIEPORTBUS=y\nCONFIG_PCIEAER=y\n# CONFIG_PCIE_ECRC is not set\n# CONFIG_PCIEAER_INJECT is not set\nCONFIG_PCIEASPM=y\n# CONFIG_PCIEASPM_DEBUG is not set\nCONFIG_PCIEASPM_DEFAULT=y\n# CONFIG_PCIEASPM_POWERSAVE is not set\n# CONFIG_PCIEASPM_PERFORMANCE is not set\nCONFIG_PCIE_PME=y\nCONFIG_PCIE_DPC=y\nCONFIG_PCIE_PTM=y\nCONFIG_PCI_BUS_ADDR_T_64BIT=y\nCONFIG_PCI_MSI=y\nCONFIG_PCI_MSI_IRQ_DOMAIN=y\n# CONFIG_PCI_DEBUG is not set\n# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set\n# CONFIG_PCI_STUB is not set\n# CONFIG_PCI_IOV is not set\n# CONFIG_PCI_PRI is not set\n# CONFIG_PCI_PASID is not set\n# CONFIG_HOTPLUG_PCI is not set\n\n#\n# PCI host controller drivers\n#\nCONFIG_PCIE_DW_PLAT=y\nCONFIG_PCIE_DW=y\n# CONFIG_PCI_HOST_GENERIC is not set\n# CONFIG_PCI_HISI is not set\n# CONFIG_PCI_HOST_THUNDER_PEM is not set\n# CONFIG_PCI_HOST_THUNDER_ECAM is not set\n\n#\n# Kernel Features\n#\n\n#\n# ARM errata workarounds via the alternatives framework\n#\nCONFIG_ARM64_ERRATUM_826319=y\nCONFIG_ARM64_ERRATUM_827319=y\nCONFIG_ARM64_ERRATUM_824069=y\nCONFIG_ARM64_ERRATUM_819472=y\nCONFIG_ARM64_ERRATUM_832075=y\nCONFIG_ARM64_ERRATUM_845719=y\nCONFIG_ARM64_ERRATUM_843419=y\nCONFIG_ARM64_ERRATUM_1024718=y\nCONFIG_CAVIUM_ERRATUM_22375=y\nCONFIG_CAVIUM_ERRATUM_23154=y\nCONFIG_CAVIUM_ERRATUM_27456=y\nCONFIG_QCOM_QDF2400_ERRATUM_0065=y\nCONFIG_ARM64_4K_PAGES=y\n# CONFIG_ARM64_16K_PAGES is not set\n# CONFIG_ARM64_64K_PAGES is not set\nCONFIG_ARM64_VA_BITS_39=y\n# CONFIG_ARM64_VA_BITS_48 is not set\nCONFIG_ARM64_VA_BITS=39\n# CONFIG_CPU_BIG_ENDIAN is not set\nCONFIG_SCHED_MC=y\n# CONFIG_SCHED_SMT is not set\nCONFIG_NR_CPUS=8\nCONFIG_HOTPLUG_CPU=y\n# CONFIG_NUMA is not set\n# CONFIG_PREEMPT_NONE is not set\n# CONFIG_PREEMPT_VOLUNTARY is not set\nCONFIG_PREEMPT=y\nCONFIG_PREEMPT_COUNT=y\n# CONFIG_HZ_100 is not set\nCONFIG_HZ_250=y\n# CONFIG_HZ_300 is not set\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=250\nCONFIG_SCHED_HRTICK=y\nCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y\nCONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_ARCH_SPARSEMEM_DEFAULT=y\nCONFIG_ARCH_SELECT_MEMORY_MODEL=y\nCONFIG_HAVE_ARCH_PFN_VALID=y\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_SYS_SUPPORTS_HUGETLBFS=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_ARCH_HAS_CACHE_LINE_SIZE=y\nCONFIG_SELECT_MEMORY_MODEL=y\nCONFIG_SPARSEMEM_MANUAL=y\nCONFIG_SPARSEMEM=y\nCONFIG_HAVE_MEMORY_PRESENT=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_MEMBLOCK=y\nCONFIG_NO_BOOTMEM=y\nCONFIG_MEMORY_ISOLATION=y\n# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_COMPACTION=y\nCONFIG_MIGRATION=y\nCONFIG_PHYS_ADDR_T_64BIT=y\nCONFIG_BOUNCE=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=32768\n# CONFIG_TRANSPARENT_HUGEPAGE is not set\n# CONFIG_CLEANCACHE is not set\n# CONFIG_FRONTSWAP is not set\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\nCONFIG_CMA_DEBUGFS=y\nCONFIG_CMA_AREAS=15\n# CONFIG_ZPOOL is not set\n# CONFIG_ZBUD is not set\nCONFIG_ZSMALLOC=y\n# CONFIG_PGTABLE_MAPPING is not set\n# CONFIG_ZSMALLOC_STAT is not set\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_FRAME_VECTOR=y\nCONFIG_SECCOMP=y\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\nCONFIG_KEXEC=y\n# CONFIG_XEN is not set\nCONFIG_FORCE_MAX_ZONEORDER=11\n# CONFIG_UNMAP_KERNEL_AT_EL0 is not set\n# CONFIG_HARDEN_BRANCH_PREDICTOR is not set\n# CONFIG_ARM64_SSBD is not set\nCONFIG_ARMV8_DEPRECATED=y\nCONFIG_SWP_EMULATION=y\nCONFIG_CP15_BARRIER_EMULATION=y\nCONFIG_SETEND_EMULATION=y\n# CONFIG_ARM64_SW_TTBR0_PAN is not set\n\n#\n# ARMv8.1 architectural features\n#\nCONFIG_ARM64_HW_AFDBM=y\nCONFIG_ARM64_PAN=y\n# CONFIG_ARM64_LSE_ATOMICS is not set\nCONFIG_ARM64_VHE=y\n\n#\n# ARMv8.2 architectural features\n#\nCONFIG_ARM64_UAO=y\nCONFIG_ARM64_MODULE_CMODEL_LARGE=y\nCONFIG_ARM64_MODULE_PLTS=y\nCONFIG_RELOCATABLE=y\nCONFIG_RANDOMIZE_BASE=y\n\n#\n# Boot options\n#\nCONFIG_CMDLINE=\"systemd.show_status=auto\"\n# CONFIG_CMDLINE_FROM_BOOTLOADER is not set\nCONFIG_CMDLINE_EXTEND=y\n# CONFIG_CMDLINE_FORCE is not set\n# CONFIG_EFI is not set\n# CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE is not set\n\n#\n# Userspace binary formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_ELFCORE=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\n# CONFIG_HAVE_AOUT is not set\nCONFIG_BINFMT_MISC=y\nCONFIG_COREDUMP=y\nCONFIG_COMPAT=y\nCONFIG_SYSVIPC_COMPAT=y\nCONFIG_KEYS_COMPAT=y\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_SUSPEND_SKIP_SYNC is not set\n# CONFIG_HIBERNATION is not set\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\nCONFIG_PM_AUTOSLEEP=y\nCONFIG_PM_WAKELOCKS=y\nCONFIG_PM_WAKELOCKS_LIMIT=100\nCONFIG_PM_WAKELOCKS_GC=y\nCONFIG_PM=y\n# CONFIG_PM_DEBUG is not set\nCONFIG_PM_OPP=y\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\nCONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\nCONFIG_DT_IDLE_STATES=y\n\n#\n# ARM CPU Idle Drivers\n#\nCONFIG_ARM_CPUIDLE=y\n# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_STAT_DETAILS is not set\nCONFIG_CPU_FREQ_TIMES=y\nCONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\n# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set\n# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set\n\n#\n# CPU frequency scaling drivers\n#\n# CONFIG_CPUFREQ_DT is not set\nCONFIG_ARM_BIG_LITTLE_CPUFREQ=y\n# CONFIG_ARM_DT_BL_CPUFREQ is not set\n# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set\nCONFIG_ARM_SCPI_CPUFREQ=y\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\n# CONFIG_UNIX_DIAG is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\nCONFIG_XFRM_INTERFACE=y\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\n# CONFIG_NET_KEY is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=m\nCONFIG_IP_MROUTE=y\n# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set\n# CONFIG_IP_PIMSM_V1 is not set\n# CONFIG_IP_PIMSM_V2 is not set\n# CONFIG_SYN_COOKIES is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=y\n# CONFIG_INET_IPCOMP is not set\n# CONFIG_INET_XFRM_TUNNEL is not set\nCONFIG_INET_TUNNEL=m\n# CONFIG_INET_XFRM_MODE_TRANSPORT is not set\n# CONFIG_INET_XFRM_MODE_TUNNEL is not set\n# CONFIG_INET_XFRM_MODE_BEET is not set\n# CONFIG_INET_DIAG is not set\nCONFIG_TCP_CONG_ADVANCED=y\n# CONFIG_TCP_CONG_BIC is not set\nCONFIG_TCP_CONG_CUBIC=y\n# CONFIG_TCP_CONG_WESTWOOD is not set\n# CONFIG_TCP_CONG_HTCP is not set\n# CONFIG_TCP_CONG_HSTCP is not set\n# CONFIG_TCP_CONG_HYBLA is not set\n# CONFIG_TCP_CONG_VEGAS is not set\n# CONFIG_TCP_CONG_NV is not set\n# CONFIG_TCP_CONG_SCALABLE is not set\n# CONFIG_TCP_CONG_LP is not set\n# CONFIG_TCP_CONG_VENO is not set\n# CONFIG_TCP_CONG_YEAH is not set\n# CONFIG_TCP_CONG_ILLINOIS is not set\n# CONFIG_TCP_CONG_DCTCP is not set\n# CONFIG_TCP_CONG_CDG is not set\nCONFIG_TCP_CONG_BBR=y\nCONFIG_DEFAULT_CUBIC=y\n# CONFIG_DEFAULT_BBR is not set\n# CONFIG_DEFAULT_RENO is not set\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_INET6_XFRM_TUNNEL is not set\n# CONFIG_INET6_TUNNEL is not set\n# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set\n# CONFIG_INET6_XFRM_MODE_TUNNEL is not set\n# CONFIG_INET6_XFRM_MODE_BEET is not set\n# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set\nCONFIG_IPV6_SIT=m\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\nCONFIG_IPV6_FOU=m\n# CONFIG_IPV6_FOU_TUNNEL is not set\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\nCONFIG_NETLABEL=y\n# CONFIG_ANDROID_PARANOID_NETWORK is not set\nCONFIG_NETWORK_SECMARK=y\nCONFIG_NET_PTP_CLASSIFY=y\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\n# CONFIG_NETFILTER_DEBUG is not set\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\n# CONFIG_NETFILTER_INGRESS is not set\nCONFIG_NETFILTER_NETLINK=m\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\nCONFIG_NETFILTER_NETLINK_LOG=m\nCONFIG_NF_CONNTRACK=m\nCONFIG_NF_CONNTRACK_MARK=y\n# CONFIG_NF_CONNTRACK_SECMARK is not set\n# CONFIG_NF_CONNTRACK_PROCFS is not set\n# CONFIG_NF_CONNTRACK_EVENTS is not set\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CT_PROTO_DCCP is not set\n# CONFIG_NF_CT_PROTO_SCTP is not set\n# CONFIG_NF_CT_PROTO_UDPLITE is not set\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\nCONFIG_NF_CONNTRACK_IRC=m\nCONFIG_NF_CONNTRACK_BROADCAST=m\nCONFIG_NF_CONNTRACK_NETBIOS_NS=m\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\nCONFIG_NF_CONNTRACK_SIP=m\nCONFIG_NF_CONNTRACK_TFTP=m\nCONFIG_NF_CT_NETLINK=m\n# CONFIG_NF_CT_NETLINK_TIMEOUT is not set\n# CONFIG_NETFILTER_NETLINK_GLUE_CT is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_NEEDED=y\n# CONFIG_NF_NAT_AMANDA is not set\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_IRC=m\nCONFIG_NF_NAT_SIP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=m\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\nCONFIG_NETFILTER_XT_CONNMARK=m\n# CONFIG_NETFILTER_XT_SET is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\nCONFIG_NETFILTER_XT_MATCH_BPF=m\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\n# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\nCONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m\nCONFIG_NETFILTER_XT_MATCH_CONNMARK=m\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\nCONFIG_NETFILTER_XT_MATCH_ECN=m\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\nCONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m\nCONFIG_NETFILTER_XT_MATCH_HELPER=m\nCONFIG_NETFILTER_XT_MATCH_HL=m\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\nCONFIG_NETFILTER_XT_MATCH_IPRANGE=m\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\nCONFIG_NETFILTER_XT_MATCH_L2TP=m\nCONFIG_NETFILTER_XT_MATCH_LENGTH=m\nCONFIG_NETFILTER_XT_MATCH_LIMIT=m\nCONFIG_NETFILTER_XT_MATCH_MAC=m\nCONFIG_NETFILTER_XT_MATCH_MARK=m\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\nCONFIG_NETFILTER_XT_MATCH_OWNER=m\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA2 is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\nCONFIG_NETFILTER_XT_MATCH_STATE=m\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\nCONFIG_IP_SET=m\nCONFIG_IP_SET_MAX=256\nCONFIG_IP_SET_BITMAP_IP=m\nCONFIG_IP_SET_BITMAP_IPMAC=m\nCONFIG_IP_SET_BITMAP_PORT=m\nCONFIG_IP_SET_HASH_IP=m\nCONFIG_IP_SET_HASH_IPMARK=m\nCONFIG_IP_SET_HASH_IPPORT=m\nCONFIG_IP_SET_HASH_IPPORTIP=m\nCONFIG_IP_SET_HASH_IPPORTNET=m\nCONFIG_IP_SET_HASH_MAC=m\nCONFIG_IP_SET_HASH_NETPORTNET=m\nCONFIG_IP_SET_HASH_NET=m\nCONFIG_IP_SET_HASH_NETNET=m\nCONFIG_IP_SET_HASH_NETPORT=m\nCONFIG_IP_SET_HASH_NETIFACE=m\nCONFIG_IP_SET_LIST_SET=m\nCONFIG_IP_VS=m\nCONFIG_IP_VS_IPV6=y\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_AH_ESP is not set\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS application helper\n#\nCONFIG_IP_VS_FTP=m\nCONFIG_IP_VS_NFCT=y\nCONFIG_IP_VS_PE_SIP=m\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\nCONFIG_NF_CONNTRACK_IPV4=m\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_NF_NAT_IPV4=m\nCONFIG_NF_NAT_MASQUERADE_IPV4=m\n# CONFIG_NF_NAT_PPTP is not set\n# CONFIG_NF_NAT_H323 is not set\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_SECURITY is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n\n#\n# IPv6: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV6=m\nCONFIG_NF_CONNTRACK_IPV6=m\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\n# CONFIG_NF_LOG_IPV6 is not set\nCONFIG_NF_NAT_IPV6=m\nCONFIG_NF_NAT_MASQUERADE_IPV6=m\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\n# CONFIG_IP6_NF_SECURITY is not set\nCONFIG_IP6_NF_NAT=m\n# CONFIG_IP6_NF_TARGET_MASQUERADE is not set\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\nCONFIG_HAVE_NET_DSA=y\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\n# CONFIG_DECNET is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_IPX is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\nCONFIG_NET_SCH_FQ_CODEL=y\nCONFIG_NET_SCH_FQ=y\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n\n#\n# Classification\n#\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_TCINDEX is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_RSVP is not set\n# CONFIG_NET_CLS_RSVP6 is not set\n# CONFIG_NET_CLS_FLOW is not set\n# CONFIG_NET_CLS_CGROUP is not set\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\nCONFIG_NET_L3_MASTER_DEV=y\n# CONFIG_NET_NCSI is not set\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_XPS=y\n# CONFIG_CGROUP_NET_PRIO is not set\n# CONFIG_CGROUP_NET_CLASSID is not set\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_JIT is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\n# CONFIG_IRDA is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\nCONFIG_BT_RFCOMM_TTY=y\n# CONFIG_BT_BNEP is not set\nCONFIG_BT_HIDP=m\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_LEDS is not set\n# CONFIG_BT_SELFTEST is not set\n# CONFIG_BT_DEBUGFS is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_QCA=m\nCONFIG_BT_HCIBTUSB=m\nCONFIG_BT_HCIBTUSB_BCM=y\nCONFIG_BT_HCIBTUSB_RTL=y\n# CONFIG_BT_HCIBTSDIO is not set\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_H4=y\nCONFIG_BT_HCIUART_BCSP=y\nCONFIG_BT_HCIUART_ATH3K=y\nCONFIG_BT_HCIUART_LL=y\nCONFIG_BT_HCIUART_3WIRE=y\nCONFIG_BT_HCIUART_INTEL=y\nCONFIG_BT_HCIUART_BCM=y\nCONFIG_BT_HCIUART_QCA=y\nCONFIG_BT_HCIUART_AG6XX=y\nCONFIG_BT_HCIUART_MRVL=y\nCONFIG_BT_HCIBCM203X=m\nCONFIG_BT_HCIBPA10X=m\nCONFIG_BT_HCIBFUSB=m\nCONFIG_BT_HCIVHCI=m\nCONFIG_BT_MRVL=m\nCONFIG_BT_MRVL_SDIO=m\nCONFIG_BT_ATH3K=m\nCONFIG_AF_RXRPC=m\n# CONFIG_AF_RXRPC_IPV6 is not set\n# CONFIG_AF_RXRPC_INJECT_LOSS is not set\n# CONFIG_AF_RXRPC_DEBUG is not set\n# CONFIG_RXKAD is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_STREAM_PARSER is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=y\nCONFIG_NL80211_TESTMODE=y\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\n# CONFIG_CFG80211_INTERNAL_REGDB is not set\nCONFIG_CFG80211_CRDA_SUPPORT=y\nCONFIG_CFG80211_WEXT=y\nCONFIG_LIB80211=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=y\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_MINSTREL_HT=y\n# CONFIG_MAC80211_RC_MINSTREL_VHT is not set\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\n# CONFIG_WIMAX is not set\nCONFIG_RFKILL=y\nCONFIG_RFKILL_PM=y\nCONFIG_RFKILL_LEDS=y\n# CONFIG_RFKILL_INPUT is not set\n# CONFIG_RFKILL_REGULATOR is not set\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\nCONFIG_CEPH_LIB=m\n# CONFIG_CEPH_LIB_PRETTYDEBUG is not set\n# CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set\nCONFIG_NFC=m\nCONFIG_NFC_DIGITAL=m\nCONFIG_NFC_NCI=m\nCONFIG_NFC_NCI_SPI=m\nCONFIG_NFC_NCI_UART=m\nCONFIG_NFC_HCI=m\nCONFIG_NFC_SHDLC=y\n\n#\n# Near Field Communication (NFC) devices\n#\nCONFIG_NFC_TRF7970A=m\nCONFIG_NFC_SIM=m\nCONFIG_NFC_PORT100=m\nCONFIG_NFC_FDP=m\nCONFIG_NFC_FDP_I2C=m\nCONFIG_NFC_PN544=m\nCONFIG_NFC_PN544_I2C=m\nCONFIG_NFC_PN533=m\nCONFIG_NFC_PN533_USB=m\nCONFIG_NFC_PN533_I2C=m\nCONFIG_NFC_MICROREAD=m\nCONFIG_NFC_MICROREAD_I2C=m\nCONFIG_NFC_MRVL=m\nCONFIG_NFC_MRVL_USB=m\nCONFIG_NFC_MRVL_UART=m\nCONFIG_NFC_MRVL_I2C=m\nCONFIG_NFC_MRVL_SPI=m\nCONFIG_NFC_ST21NFCA=m\nCONFIG_NFC_ST21NFCA_I2C=m\nCONFIG_NFC_ST_NCI=m\nCONFIG_NFC_ST_NCI_I2C=m\nCONFIG_NFC_ST_NCI_SPI=m\nCONFIG_NFC_NXP_NCI=m\nCONFIG_NFC_NXP_NCI_I2C=m\nCONFIG_NFC_S3FWRN5=m\nCONFIG_NFC_S3FWRN5_I2C=m\nCONFIG_NFC_ST95HF=m\nCONFIG_LWTUNNEL=y\nCONFIG_DST_CACHE=y\n# CONFIG_NET_DEVLINK is not set\nCONFIG_MAY_USE_DEVLINK=y\nCONFIG_HAVE_EBPF_JIT=y\n\n#\n# Device Drivers\n#\nCONFIG_AMLOGIC_DRIVER=y\nCONFIG_AMLOGIC_MODIFY=y\n# CONFIG_AMLOGIC_SYNC_20210524 is not set\n\n#\n# Amlogic Device Drivers\n#\nCONFIG_AMLOGIC_CPUFREQ=y\nCONFIG_AMLOGIC_MESON_CPUFREQ=y\nCONFIG_AMLOGIC_UART=y\nCONFIG_AMLOGIC_SERIAL_MESON_CONSOLE=y\n# CONFIG_AMLOGIC_PRINTK_NOBLOCK_MODE is not set\nCONFIG_AMLOGIC_IOMAP=y\nCONFIG_AMLOGIC_PINCTRL=y\nCONFIG_AMLOGIC_PINCTRL_MESON_GXL=y\nCONFIG_AMLOGIC_PINCTRL_MESON_AXG=y\nCONFIG_AMLOGIC_PINCTRL_MESON_TXLX=y\nCONFIG_AMLOGIC_PINCTRL_MESON_G12A=y\n# CONFIG_AMLOGIC_PINCTRL_MESON_TXL is not set\n# CONFIG_AMLOGIC_PINCTRL_MESON_TL1 is not set\n# CONFIG_AMLOGIC_PINCTRL_MESON_TM2 is not set\nCONFIG_AMLOGIC_PINCTRL_MESON_SC2=y\nCONFIG_AMLOGIC_PINCONF_MESON_G12A=y\nCONFIG_AMLOGIC_PINCTRL_MESON8_PMX=y\nCONFIG_AMLOGIC_PINCTRL_MESON_AXG_PMX=y\n\n#\n# USB Support\n#\nCONFIG_AMLOGIC_USB=y\nCONFIG_AMLOGIC_USB_DWC_OTG_HCD=y\nCONFIG_AMLOGIC_USB_HOST_ELECT_TEST=y\nCONFIG_AMLOGIC_USBPHY=y\nCONFIG_AMLOGIC_USB2PHY=y\nCONFIG_AMLOGIC_USB3PHY=y\n\n#\n# I2C Hardware Bus support\n#\nCONFIG_AMLOGIC_I2C=y\nCONFIG_AMLOGIC_I2C_SLAVE=y\nCONFIG_AMLOGIC_I2C_MASTER=y\n\n#\n# AMLOGIC SPI Hardware bus support\n#\nCONFIG_AMLOGIC_SPICC_MASTER=y\n# CONFIG_AMLOGIC_SPICC_SLAVE is not set\nCONFIG_AMLOGIC_SEC=y\nCONFIG_AMLOGIC_CPU_VERSION=y\nCONFIG_AMLOGIC_MESON64_VERSION=y\n# CONFIG_AMLOGIC_M8B_MESON32_VERSION is not set\nCONFIG_AMLOGIC_CPU_INFO=y\n\n#\n# MESON MHU mailbox Support\n#\nCONFIG_AMLOGIC_MHU_MBOX=y\nCONFIG_ARM_SCPI_PROTOCOL=y\nCONFIG_AMLOGIC_REG_ACCESS=y\nCONFIG_AMLOGIC_TIMER=y\n# CONFIG_AMLOGIC_LOCAL_TIMER is not set\nCONFIG_AMLOGIC_BC_TIMER=y\nCONFIG_AMLOGIC_CLK=y\nCONFIG_AMLOGIC_COMMON_CLK_SCPI=y\n# CONFIG_AMLOGIC_M8B_CLK is not set\nCONFIG_AMLOGIC_GX_CLK=y\n\n#\n# Amlogic Crypto Support\n#\nCONFIG_AMLOGIC_CRYPTO=y\nCONFIG_AMLOGIC_CRYPTO_DMA=y\n# CONFIG_AMLOGIC_CRYPTO_BLKMV is not set\nCONFIG_AMLOGIC_INPUT=y\n# CONFIG_AMLOGIC_AVIN_DETECT is not set\nCONFIG_AMLOGIC_INPUT_KEYBOARD=y\nCONFIG_AMLOGIC_ADC_KEYPADS=y\nCONFIG_AMLOGIC_GPIO_KEY=y\n# CONFIG_AMLOGIC_PCA9557_KEYPAD is not set\nCONFIG_AMLOGIC_REMOTE=y\nCONFIG_AMLOGIC_MESON_REMOTE=m\nCONFIG_AMLOGIC_TOUCHSCREEN=y\nCONFIG_AMLOGIC_TOUCHSCREEN_FTS=y\nCONFIG_AMLOGIC_TOUCHSCREEN_GT1X=y\nCONFIG_AMLOGIC_TOUCHSCREEN_GT9XX=y\n# CONFIG_AMLOGIC_TOUCHSCREEN_HYN_CST2XX is not set\n# CONFIG_AMLOGIC_SENSOR is not set\n\n#\n# EFUSE Support\n#\nCONFIG_AMLOGIC_EFUSE=y\n# CONFIG_AMLOGIC_EFUSE_WRITE_VERSION_PERMIT is not set\nCONFIG_AMLOGIC_REBOOT=y\nCONFIG_AMLOGIC_GX_REBOOT=y\n# CONFIG_AMLOGIC_M8B_REBOOT is not set\nCONFIG_AMLOGIC_INTERNAL_PHY=y\nCONFIG_AMLOGIC_CPU_HOTPLUG=y\nCONFIG_AMLOGIC_PWM=y\nCONFIG_AMLOGIC_PWM_V2=y\n\n#\n# Amlogic dvb configuration\n#\n# CONFIG_AMLOGIC_DVB is not set\nCONFIG_AMLOGIC_DVB_COMPAT=y\n\n#\n# Amlogic multimedia configuration\n#\nCONFIG_AMLOGIC_MEDIA_ENABLE=y\nCONFIG_AMLOGIC_MEDIA_COMMON=y\nCONFIG_AMLOGIC_MEDIA_DRIVERS=y\nCONFIG_AMLOGIC_MEDIA_MULTI_DEC=y\n# CONFIG_AMLOGIC_AVSP_LONG_CABAC is not set\nCONFIG_AMLOGIC_MEDIA_CODEC_MM=y\n\n#\n# Canvas management driver\n#\nCONFIG_AMLOGIC_MEDIA_CANVAS=y\n\n#\n# Amlogic GE2D Module\n#\nCONFIG_AMLOGIC_MEDIA_GE2D=y\n# CONFIG_AMLOGIC_MEDIA_GE2D_MORE_SECURITY is not set\n\n#\n# ION support\n#\nCONFIG_AMLOGIC_ION=y\n\n#\n# RDMA management driver\n#\nCONFIG_AMLOGIC_MEDIA_RDMA=y\nCONFIG_AMLOGIC_MEDIA_VSYNC_RDMA=y\n# CONFIG_AMLOGIC_UVM_CORE is not set\n# CONFIG_AMLOGIC_UVM_ALLOCATOR is not set\n# CONFIG_AMLOGIC_ION_DELAY_ALLOC is not set\nCONFIG_AMLOGIC_MEDIA_VFM=y\n\n#\n# Amlogic VPU Driver Support\n#\nCONFIG_AMLOGIC_VPU=y\n# CONFIG_AMLOGIC_VPU_DYNAMIC_ADJ is not set\nCONFIG_AMLOGIC_VIDEOBUF_RESOURCE=m\n\n#\n# LUT DMA management driver\n#\n# CONFIG_AMLOGIC_MEDIA_LUT_DMA is not set\n\n#\n# ResManage driver\n#\n# CONFIG_AMLOGIC_MEDIA_RESMANAGE is not set\n\n#\n# VPU SECURITY driver\n#\n# CONFIG_AMLOGIC_MEDIA_SECURITY is not set\n\n#\n# Amlogic Video Sink Driver Support\n#\nCONFIG_AMLOGIC_MEDIA_VIDEO=y\nCONFIG_AMLOGIC_MEDIA_VIDEOCAPTURE=y\n\n#\n# Amlogic Vout Driver Support\n#\nCONFIG_AMLOGIC_VOUT=y\nCONFIG_AMLOGIC_VOUT_CLK_SERVE=y\nCONFIG_AMLOGIC_VDAC=y\nCONFIG_AMLOGIC_CVBS_OUTPUT=y\nCONFIG_AMLOGIC_WSS=y\n\n#\n# Amlogic HDMITX Module\n#\nCONFIG_AMLOGIC_HDMITX=y\n\n#\n# Amlogic LCD Output Module\n#\nCONFIG_AMLOGIC_LCD=y\nCONFIG_AMLOGIC_LCD_TV=y\nCONFIG_AMLOGIC_LCD_TABLET=y\nCONFIG_AMLOGIC_LCD_EXTERN=y\n# CONFIG_AMLOGIC_LCD_EXTERN_I2C_T5800Q is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_I2C_ANX6862_7911 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_I2C_DLPC3439 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_I2C_ANX6345 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_I2C_CS602 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_SPI_LD070WS2 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_MIPI_KD080D13 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_MIPI_N070ICN is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_MIPI_TV070WSM is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_MIPI_ST7701 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_MIPI_P070ACB is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_MIPI_TL050FHV02CT is not set\n\n#\n# Amlogic Backlight Support\n#\nCONFIG_AMLOGIC_BACKLIGHT=y\nCONFIG_AMLOGIC_BL_EXTERN=y\nCONFIG_AMLOGIC_BL_EXTERN_I2C_LP8556=y\nCONFIG_AMLOGIC_BL_EXTERN_MIPI_LT070ME05=y\nCONFIG_AMLOGIC_LOCAL_DIMMING=y\nCONFIG_CONFIG_AML_LOCAL_DIMMING_IW7038=y\nCONFIG_CONFIG_AML_LOCAL_DIMMING_IW7027=y\nCONFIG_AMLOGIC_VOUT_SERVE=y\nCONFIG_AMLOGIC_VOUT2_SERVE=y\n\n#\n# Amlogic Peripheral_lcd Support\n#\n# CONFIG_AMLOGIC_PERIPHERAL_LCD is not set\n\n#\n# Amlogic OSD Module\n#\nCONFIG_AMLOGIC_MEDIA_FB=y\n# CONFIG_AMLOGIC_MEDIA_FB_OSD_SYNC_FENCE is not set\nCONFIG_AMLOGIC_MEDIA_FB_OSD_VSYNC_RDMA=y\nCONFIG_AMLOGIC_MEDIA_FB_OSD2_ENABLE=y\nCONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR=y\n\n#\n# Amlogic OSD_EXT Module\n#\n# CONFIG_AMLOGIC_MEDIA_FB_EXT is not set\n\n#\n# Deinterlace driver\n#\nCONFIG_AMLOGIC_MEDIA_DEINTERLACE=y\n\n#\n# DI_MULTI driver\n#\n\n#\n# DI_LOCAL driver\n#\n\n#\n# Input drivers\n#\n# CONFIG_AMLOGIC_MEDIA_VIN is not set\n\n#\n# Amlogic Video Processor Support\n#\nCONFIG_AMLOGIC_MEDIA_VIDEO_PROCESSOR=y\n\n#\n# V4L2 Video Support\n#\nCONFIG_AMLOGIC_V4L_VIDEO=m\n# CONFIG_AMLOGIC_V4L_VIDEO2 is not set\n\n#\n# Post Process Manager driver\n#\nCONFIG_AMLOGIC_POST_PROCESS_MANAGER=y\nCONFIG_AMLOGIC_POST_PROCESS_MANAGER_PPSCALER=y\n# CONFIG_AMLOGIC_POST_PROCESS_MANAGER_3D_PROCESS is not set\n\n#\n# Amlogic ion video support\n#\n# CONFIG_AMLOGIC_VIDEOBUF2_ION is not set\n\n#\n# Amlogic picture decoder support\n#\n# CONFIG_AMLOGIC_PIC_DEC is not set\n\n#\n# Amlogic videosync support\n#\n# CONFIG_AMLOGIC_VIDEOSYNC is not set\n\n#\n# Amlogic v4l video support\n#\n# CONFIG_AMLOGIC_V4L_VIDEO3 is not set\n\n#\n# Amlogic video_composer support\n#\n# CONFIG_AMLOGIC_VIDEO_COMPOSER is not set\n\n#\n# Amlogic video tunnel support\n#\n# CONFIG_AMLOGIC_VIDEO_TUNNEL is not set\n\n#\n# Amlogic Enhancement drivers\n#\nCONFIG_AMLOGIC_MEDIA_ENHANCEMENT=y\n\n#\n# Amlogic VECM Drivers\n#\n\n#\n# Amlogic amvecm Driver\n#\nCONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM=y\n\n#\n# Amlogic amdolby_vision Drivers\n#\n\n#\n# Amlogic amdolby_vision Driver\n#\nCONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION=y\n\n#\n# Amlogic amprime_sl Drivers\n#\n\n#\n# Amlogic amprime_sl Driver\n#\n# CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_PRIME_SL is not set\n# CONFIG_AMLOGIC_MEDIA_GDC is not set\n\n#\n# Amlogic multimedia algorithm configuration\n#\n# CONFIG_AMLOGIC_MEDIA_ALGORITHM is not set\n\n#\n# Amlogic Camera Support\n#\n# CONFIG_AMLOGIC_VIDEO_CAPTURE is not set\n# CONFIG_AMLOGIC_VIDEOIN_MANAGER is not set\n# CONFIG_AMLOGIC_MEDIA_MSYNC is not set\n\n#\n# Amlogic DTV driver\n#\n# CONFIG_AMLOGIC_DTV_DEMOD is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n\n#\n# Multimedia Card support\n#\nCONFIG_AMLOGIC_MMC=y\n# CONFIG_AMLOGIC_M8B_MMC is not set\n\n#\n# Meson NAND Device Support\n#\nCONFIG_AMLOGIC_NAND=y\n\n#\n# Meson8B NAND Device Support\n#\nCONFIG_AMLOGIC_VRTC=y\nCONFIG_AMLOGIC_SMARTCARD=y\nCONFIG_AMLOGIC_CEC=y\nCONFIG_AMLOGIC_AO_CEC=y\n\n#\n# unifykey Support\n#\nCONFIG_AMLOGIC_UNIFYKEY=y\nCONFIG_AMLOGIC_V8_UNIFYKEY=y\n# CONFIG_AMLOGIC_V7_UNIFYKEY is not set\n\n#\n# Amlogic temperature sensor\n#\nCONFIG_AMLOGIC_TEMP_SENSOR=y\nCONFIG_AMLOGIC_GX_TEMP_SENSOR=y\nCONFIG_AMLOGIC_CPUCORE_THERMAL=y\nCONFIG_AMLOGIC_GPU_THERMAL=y\nCONFIG_AMLOGIC_GPUCORE_THERMAL=y\n\n#\n# Audio Interface\n#\nCONFIG_AMLOGIC_AMAUDIO=y\n\n#\n# Amlogic Audio Interface V2\n#\nCONFIG_AMLOGIC_AMAUDIO2=y\n# CONFIG_AMLKARAOKE is not set\n\n#\n# AMLOGIC Audio DSP process\n#\nCONFIG_AMLOGIC_AUDIO_DSP=y\n\n#\n# AMLOGIC Audio Info\n#\nCONFIG_AMLOGIC_AUDIO_INFO=y\n\n#\n# Meson core pm driver\n#\nCONFIG_AMLOGIC_SUSPEND=y\nCONFIG_AMLOGIC_GX_SUSPEND=y\nCONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND=y\nCONFIG_AMLOGIC_LED=y\nCONFIG_AMLOGIC_LED_SYS=y\n# CONFIG_AMLOGIC_LEDS_TLC59116 is not set\n# CONFIG_AMLOGIC_LEDS_STATE is not set\nCONFIG_AMLOGIC_JTAG=y\nCONFIG_AMLOGIC_JTAG_MESON=y\nCONFIG_AMLOGIC_WDT=y\nCONFIG_AMLOGIC_WDT_MESON=y\nCONFIG_AMLOGIC_WDT_MESON_V3=y\n\n#\n# ESM Support\n#\nCONFIG_AMLOGIC_ESM=y\nCONFIG_AMLOGIC_WIFI=y\nCONFIG_AMLOGIC_BT_DEVICE=y\n\n#\n# AMLOGIC DVB EXTERN support\n#\n# CONFIG_AMLOGIC_DVB_EXTERN is not set\n\n#\n# DVB AUCPU support\n#\nCONFIG_AMLOGIC_AUCPU=y\n\n#\n# AMLOGIC DVB demux/dsc support\n#\nCONFIG_AMLOGIC_DVB_DMX=m\n\n#\n# DVB COMPAT support\n#\nCONFIG_AMLOGIC_POWER=y\n# CONFIG_AMLOGIC_PMU_OF is not set\n# CONFIG_AMLOGIC_PMU is not set\n# CONFIG_AMLOGIC_M8B_DVFS is not set\n\n#\n# Multimedia Card support\n#\nCONFIG_AMLOGIC_PCIE=y\n# CONFIG_AMLOGIC_IRBLASTER_CORE is not set\nCONFIG_AMLOGIC_IIO=y\n\n#\n# Analog to digital converters\n#\nCONFIG_AMLOGIC_SARADC=y\nCONFIG_AMLOGIC_DDR_TOOL=y\n# CONFIG_AMLOGIC_DDR_WINDOW_TOOL is not set\nCONFIG_AMLOGIC_DDR_BANDWIDTH=y\nCONFIG_AMLOGIC_DDR_BANDWIDTH_GX=y\nCONFIG_AMLOGIC_DMC_MONITOR=y\nCONFIG_AMLOGIC_DMC_MONITOR_GX=y\n# CONFIG_AMLOGIC_DRM is not set\n# CONFIG_AMLOGIC_SM is not set\nCONFIG_AMLOGIC_TEE=y\n# CONFIG_AMLOGIC_LEDRING is not set\nCONFIG_AMLOGIC_MEMORY_EXTEND=y\n# CONFIG_AMLOGIC_PAGE_TRACE is not set\nCONFIG_AMLOGIC_RAMDUMP=y\nCONFIG_AMLOGIC_CMA=y\n# CONFIG_AMLOGIC_VMAP is not set\n# CONFIG_AMLOGIC_WATCHPOINT is not set\nCONFIG_AMLOGIC_GPIO_IRQ=y\n\n#\n# Amlogic ATV driver\n#\n# CONFIG_AMLOGIC_ATV_DEMOD is not set\nCONFIG_AMLOGIC_DEBUG=y\nCONFIG_AMLOGIC_DEBUG_LOCKUP=y\n# CONFIG_AMLOGIC_DEBUG_ATRACE is not set\n# CONFIG_AMLOGIC_DEBUG_SCRAMBLER_RAMOOPS is not set\n\n#\n# Amlogic defend img file update support\n#\nCONFIG_AMLOGIC_DEFENDKEY=y\n# CONFIG_AMLOGIC_BATTERY_DUMMY is not set\n# CONFIG_AMLOGIC_CHARGER_DUMMY is not set\n\n#\n# Meson SPI NOR Flash Support\n#\nCONFIG_SPI_AML_SPIFC=y\nCONFIG_DOLBY_FW=y\n# CONFIG_AMLOGIC_IRCUT is not set\n\n#\n# AMLOGIC HiFi4DSP process\n#\n# CONFIG_AMLOGIC_HIFI4DSP is not set\n# CONFIG_AMLOGIC_PIXEL_PROBE is not set\n\n#\n# AMLOGIC firmware boot\n#\n# CONFIG_AMLOGIC_FIRMWARE is not set\nCONFIG_AMLOGIC_RESET_MESON=y\n\n#\n# AMLOGIC DVB EXTERN support\n#\n\n#\n# DVB AUCPU support\n#\n\n#\n# AMLOGIC DVB demux/dsc support\n#\n\n#\n# DVB COMPAT support\n#\nCONFIG_AMLOGIC_SOC_INFO=y\nCONFIG_ARM_AMBA=y\n\n#\n# Generic Driver Options\n#\nCONFIG_UEVENT_HELPER=y\nCONFIG_UEVENT_HELPER_PATH=\"/sbin/hotplug\"\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\nCONFIG_FW_LOADER=y\nCONFIG_FIRMWARE_IN_KERNEL=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set\nCONFIG_WANT_DEV_COREDUMP=y\nCONFIG_ALLOW_DEV_COREDUMP=y\nCONFIG_DEV_COREDUMP=y\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_SYS_HYPERVISOR is not set\n# CONFIG_GENERIC_CPU_DEVICES is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_FENCE_TRACE is not set\nCONFIG_DMA_CMA=y\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=8\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n\n#\n# Bus devices\n#\n# CONFIG_ARM_CCI400_PMU is not set\n# CONFIG_ARM_CCI5xx_PMU is not set\n# CONFIG_ARM_CCN is not set\n# CONFIG_VEXPRESS_CONFIG is not set\nCONFIG_CONNECTOR=y\nCONFIG_PROC_EVENTS=y\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\nCONFIG_MTD_CMDLINE_PARTS=y\n# CONFIG_MTD_AFS_PARTS is not set\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AR7_PARTS is not set\n\n#\n# User Modules And Translation Layers\n#\nCONFIG_MTD_BLKDEVS=y\nCONFIG_MTD_BLOCK=y\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\nCONFIG_MTD_OOPS=y\n# CONFIG_MTD_SWAP is not set\n# CONFIG_MTD_PARTITIONED_MASTER is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\n# CONFIG_MTD_CFI is not set\n# CONFIG_MTD_JEDECPROBE is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\n# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set\n# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set\n# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\n# CONFIG_MTD_CFI_I4 is not set\n# CONFIG_MTD_CFI_I8 is not set\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_INTEL_VR_NOR is not set\n# CONFIG_MTD_PLATRAM is not set\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_PMC551 is not set\n# CONFIG_MTD_DATAFLASH is not set\n# CONFIG_MTD_M25P80 is not set\n# CONFIG_MTD_SST25L is not set\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\nCONFIG_MTD_NAND_IDS=y\nCONFIG_MTD_NAND_ECC=y\n# CONFIG_MTD_NAND_ECC_SMC is not set\nCONFIG_MTD_NAND=y\n# CONFIG_MTD_NAND_ECC_BCH is not set\n# CONFIG_MTD_SM_COMMON is not set\n# CONFIG_MTD_NAND_DENALI_PCI is not set\n# CONFIG_MTD_NAND_DENALI_DT is not set\n# CONFIG_MTD_NAND_GPIO is not set\n# CONFIG_MTD_NAND_OMAP_BCH_BUILD is not set\n# CONFIG_MTD_NAND_RICOH is not set\n# CONFIG_MTD_NAND_DISKONCHIP is not set\n# CONFIG_MTD_NAND_DOCG4 is not set\n# CONFIG_MTD_NAND_CAFE is not set\n# CONFIG_MTD_NAND_NANDSIM is not set\n# CONFIG_MTD_NAND_BRCMNAND is not set\n# CONFIG_MTD_NAND_PLATFORM is not set\n# CONFIG_MTD_NAND_HISI504 is not set\n# CONFIG_MTD_NAND_MTK is not set\n# CONFIG_MTD_ONENAND is not set\n\n#\n# LPDDR & LPDDR2 PCM memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\nCONFIG_MTD_SPI_NOR=y\n# CONFIG_MTD_MT81xx_NOR is not set\nCONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y\nCONFIG_MTD_UBI=y\nCONFIG_MTD_UBI_WL_THRESHOLD=4096\nCONFIG_MTD_UBI_BEB_LIMIT=20\n# CONFIG_MTD_UBI_FASTMAP is not set\n# CONFIG_MTD_UBI_GLUEBI is not set\n# CONFIG_MTD_UBI_BLOCK is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_ADDRESS_PCI=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_NET=y\nCONFIG_OF_MDIO=y\nCONFIG_OF_PCI=y\nCONFIG_OF_PCI_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\n# CONFIG_OF_OVERLAY is not set\nCONFIG_PARPORT=y\n# CONFIG_PARPORT_GSC is not set\n# CONFIG_PARPORT_AX88796 is not set\n# CONFIG_PARPORT_1284 is not set\nCONFIG_PARPORT_ODROID=y\nCONFIG_PARPORT_NOT_PC=y\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\n# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set\nCONFIG_ZRAM=m\n# CONFIG_ZRAM_WRITEBACK is not set\n# CONFIG_ZRAM_MEMORY_TRACKING is not set\n# CONFIG_BLK_CPQ_CISS_DA is not set\n# CONFIG_BLK_DEV_DAC960 is not set\n# CONFIG_BLK_DEV_UMEM is not set\n# CONFIG_BLK_DEV_COW_COMMON is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=8\n# CONFIG_BLK_DEV_CRYPTOLOOP is not set\nCONFIG_BLK_DEV_DRBD=m\n# CONFIG_DRBD_FAULT_INJECTION is not set\nCONFIG_BLK_DEV_NBD=m\n# CONFIG_BLK_DEV_SKD is not set\n# CONFIG_BLK_DEV_OSD is not set\n# CONFIG_BLK_DEV_SX8 is not set\nCONFIG_BLK_DEV_RAM=m\nCONFIG_BLK_DEV_RAM_COUNT=16\nCONFIG_BLK_DEV_RAM_SIZE=4096\nCONFIG_CDROM_PKTCDVD=m\nCONFIG_CDROM_PKTCDVD_BUFFERS=8\nCONFIG_CDROM_PKTCDVD_WCACHE=y\nCONFIG_ATA_OVER_ETH=m\nCONFIG_VIRTIO_BLK=y\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_RSXX is not set\nCONFIG_NVME_CORE=y\nCONFIG_BLK_DEV_NVME=y\nCONFIG_BLK_DEV_NVME_SCSI=y\nCONFIG_NVME_FABRICS=y\nCONFIG_NVME_TARGET=y\nCONFIG_NVME_TARGET_LOOP=y\n\n#\n# Misc devices\n#\nCONFIG_SENSORS_LIS3LV02D=m\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_PHANTOM is not set\n# CONFIG_SGI_IOC4 is not set\n# CONFIG_TIFM_CORE is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_HP_ILO is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_TI_DAC7512 is not set\n# CONFIG_USB_SWITCH_FSA9480 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\n# CONFIG_SRAM is not set\nCONFIG_UID_SYS_STATS=y\n# CONFIG_UID_SYS_STATS_DEBUG is not set\n# CONFIG_MEMORY_STATE_TIME is not set\nCONFIG_KHADAS_MCU=y\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\nCONFIG_EEPROM_AT24=y\nCONFIG_EEPROM_AT25=m\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_CB710_CORE is not set\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\nCONFIG_SENSORS_LIS3_SPI=m\nCONFIG_SENSORS_LIS3_I2C=m\n\n#\n# Altera FPGA firmware download module\n#\n# CONFIG_ALTERA_STAPL is not set\n\n#\n# Intel MIC Bus Driver\n#\n\n#\n# SCIF Bus Driver\n#\n\n#\n# VOP Bus Driver\n#\n\n#\n# Intel MIC Host Driver\n#\n\n#\n# Intel MIC Card Driver\n#\n\n#\n# SCIF Driver\n#\n\n#\n# Intel MIC Coprocessor State Management (COSM) Drivers\n#\n\n#\n# VOP Driver\n#\n# CONFIG_GENWQE is not set\n# CONFIG_ECHO is not set\n# CONFIG_CXL_BASE is not set\n# CONFIG_CXL_AFU_DRIVER_OPS is not set\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_NETLINK is not set\nCONFIG_SCSI_MQ_DEFAULT=y\nCONFIG_SCSI_PROC_FS=y\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\n# CONFIG_CHR_DEV_OSST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_BLK_DEV_SR_VENDOR=y\nCONFIG_CHR_DEV_SG=y\nCONFIG_CHR_DEV_SCH=m\nCONFIG_SCSI_CONSTANTS=y\nCONFIG_SCSI_LOGGING=y\nCONFIG_SCSI_SCAN_ASYNC=y\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_CXGB3_ISCSI is not set\n# CONFIG_SCSI_CXGB4_ISCSI is not set\n# CONFIG_SCSI_BNX2_ISCSI is not set\n# CONFIG_BE2ISCSI is not set\n# CONFIG_BLK_DEV_3W_XXXX_RAID is not set\n# CONFIG_SCSI_HPSA is not set\n# CONFIG_SCSI_3W_9XXX is not set\n# CONFIG_SCSI_3W_SAS is not set\n# CONFIG_SCSI_ACARD is not set\n# CONFIG_SCSI_AACRAID is not set\n# CONFIG_SCSI_AIC7XXX is not set\n# CONFIG_SCSI_AIC79XX is not set\n# CONFIG_SCSI_AIC94XX is not set\n# CONFIG_SCSI_HISI_SAS is not set\n# CONFIG_SCSI_MVSAS is not set\n# CONFIG_SCSI_MVUMI is not set\n# CONFIG_SCSI_ADVANSYS is not set\n# CONFIG_SCSI_ARCMSR is not set\n# CONFIG_SCSI_ESAS2R is not set\n# CONFIG_MEGARAID_NEWGEN is not set\n# CONFIG_MEGARAID_LEGACY is not set\n# CONFIG_MEGARAID_SAS is not set\n# CONFIG_SCSI_MPT3SAS is not set\n# CONFIG_SCSI_MPT2SAS is not set\n# CONFIG_SCSI_SMARTPQI is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_SCSI_HPTIOP is not set\n# CONFIG_SCSI_SNIC is not set\n# CONFIG_SCSI_DMX3191D is not set\n# CONFIG_SCSI_FUTURE_DOMAIN is not set\n# CONFIG_SCSI_IPS is not set\n# CONFIG_SCSI_INITIO is not set\n# CONFIG_SCSI_INIA100 is not set\n# CONFIG_SCSI_STEX is not set\n# CONFIG_SCSI_SYM53C8XX_2 is not set\n# CONFIG_SCSI_IPR is not set\n# CONFIG_SCSI_QLOGIC_1280 is not set\n# CONFIG_SCSI_QLA_ISCSI is not set\n# CONFIG_SCSI_DC395x is not set\n# CONFIG_SCSI_AM53C974 is not set\n# CONFIG_SCSI_WD719X is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_PMCRAID is not set\n# CONFIG_SCSI_PM8001 is not set\n# CONFIG_SCSI_VIRTIO is not set\n# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set\n# CONFIG_SCSI_DH is not set\nCONFIG_SCSI_OSD_INITIATOR=m\nCONFIG_SCSI_OSD_ULD=m\nCONFIG_SCSI_OSD_DPRINT_SENSE=1\n# CONFIG_SCSI_OSD_DEBUG is not set\nCONFIG_HAVE_PATA_PLATFORM=y\nCONFIG_ATA=y\n# CONFIG_ATA_NONSTANDARD is not set\nCONFIG_ATA_VERBOSE_ERROR=y\nCONFIG_SATA_PMP=y\n\n#\n# Controllers with non-SFF native interface\n#\nCONFIG_SATA_AHCI=y\nCONFIG_SATA_AHCI_PLATFORM=y\n# CONFIG_AHCI_CEVA is not set\n# CONFIG_AHCI_QORIQ is not set\n# CONFIG_SATA_INIC162X is not set\n# CONFIG_SATA_ACARD_AHCI is not set\n# CONFIG_SATA_SIL24 is not set\nCONFIG_ATA_SFF=y\n\n#\n# SFF controllers with custom DMA interface\n#\n# CONFIG_PDC_ADMA is not set\n# CONFIG_SATA_QSTOR is not set\n# CONFIG_SATA_SX4 is not set\nCONFIG_ATA_BMDMA=y\n\n#\n# SATA SFF controllers with BMDMA\n#\n# CONFIG_ATA_PIIX is not set\n# CONFIG_SATA_MV is not set\n# CONFIG_SATA_NV is not set\n# CONFIG_SATA_PROMISE is not set\n# CONFIG_SATA_SIL is not set\n# CONFIG_SATA_SIS is not set\n# CONFIG_SATA_SVW is not set\n# CONFIG_SATA_ULI is not set\n# CONFIG_SATA_VIA is not set\n# CONFIG_SATA_VITESSE is not set\n\n#\n# PATA SFF controllers with BMDMA\n#\n# CONFIG_PATA_ALI is not set\n# CONFIG_PATA_AMD is not set\n# CONFIG_PATA_ARTOP is not set\n# CONFIG_PATA_ATIIXP is not set\n# CONFIG_PATA_ATP867X is not set\n# CONFIG_PATA_CMD64X is not set\n# CONFIG_PATA_CYPRESS is not set\n# CONFIG_PATA_EFAR is not set\n# CONFIG_PATA_HPT366 is not set\n# CONFIG_PATA_HPT37X is not set\n# CONFIG_PATA_HPT3X2N is not set\n# CONFIG_PATA_HPT3X3 is not set\n# CONFIG_PATA_IT8213 is not set\n# CONFIG_PATA_IT821X is not set\n# CONFIG_PATA_JMICRON is not set\n# CONFIG_PATA_MARVELL is not set\n# CONFIG_PATA_NETCELL is not set\n# CONFIG_PATA_NINJA32 is not set\n# CONFIG_PATA_NS87415 is not set\n# CONFIG_PATA_OLDPIIX is not set\n# CONFIG_PATA_OPTIDMA is not set\n# CONFIG_PATA_PDC2027X is not set\n# CONFIG_PATA_PDC_OLD is not set\n# CONFIG_PATA_RADISYS is not set\n# CONFIG_PATA_RDC is not set\n# CONFIG_PATA_SCH is not set\n# CONFIG_PATA_SERVERWORKS is not set\n# CONFIG_PATA_SIL680 is not set\n# CONFIG_PATA_SIS is not set\n# CONFIG_PATA_TOSHIBA is not set\n# CONFIG_PATA_TRIFLEX is not set\n# CONFIG_PATA_VIA is not set\n# CONFIG_PATA_WINBOND is not set\n\n#\n# PIO-only SFF controllers\n#\n# CONFIG_PATA_CMD640_PCI is not set\n# CONFIG_PATA_MPIIX is not set\n# CONFIG_PATA_NS87410 is not set\n# CONFIG_PATA_OPTI is not set\n# CONFIG_PATA_PLATFORM is not set\n# CONFIG_PATA_RZ1000 is not set\n\n#\n# Generic fallback / legacy drivers\n#\n# CONFIG_ATA_GENERIC is not set\n# CONFIG_PATA_LEGACY is not set\nCONFIG_MD=y\nCONFIG_BLK_DEV_MD=m\nCONFIG_MD_LINEAR=m\nCONFIG_MD_RAID0=m\nCONFIG_MD_RAID1=m\nCONFIG_MD_RAID10=m\nCONFIG_MD_RAID456=m\nCONFIG_MD_MULTIPATH=m\nCONFIG_MD_FAULTY=m\nCONFIG_BCACHE=m\n# CONFIG_BCACHE_DEBUG is not set\n# CONFIG_BCACHE_CLOSURES_DEBUG is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\nCONFIG_DM_MQ_DEFAULT=y\nCONFIG_DM_DEBUG=y\nCONFIG_DM_BUFIO=m\nCONFIG_DM_DEBUG_BLOCK_STACK_TRACING=y\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\nCONFIG_DM_CRYPT=m\nCONFIG_DM_SNAPSHOT=m\nCONFIG_DM_THIN_PROVISIONING=m\nCONFIG_DM_CACHE=m\nCONFIG_DM_CACHE_SMQ=m\nCONFIG_DM_CACHE_CLEANER=m\nCONFIG_DM_ERA=m\nCONFIG_DM_MIRROR=m\nCONFIG_DM_LOG_USERSPACE=m\nCONFIG_DM_RAID=m\nCONFIG_DM_ZERO=m\nCONFIG_DM_MULTIPATH=m\nCONFIG_DM_MULTIPATH_QL=m\nCONFIG_DM_MULTIPATH_ST=m\nCONFIG_DM_DELAY=m\nCONFIG_DM_UEVENT=y\nCONFIG_DM_FLAKEY=m\nCONFIG_DM_VERITY=m\nCONFIG_DM_VERITY_FEC=y\n# CONFIG_DM_SWITCH is not set\nCONFIG_DM_LOG_WRITES=m\nCONFIG_DM_VERITY_AVB=m\n# CONFIG_DM_ANDROID_VERITY_AT_MOST_ONCE_DEFAULT_ENABLED is not set\n# CONFIG_DM_BOW is not set\n# CONFIG_TARGET_CORE is not set\n# CONFIG_FUSION is not set\n\n#\n# IEEE 1394 (FireWire) support\n#\n# CONFIG_FIREWIRE is not set\n# CONFIG_FIREWIRE_NOSY is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\nCONFIG_BONDING=m\nCONFIG_DUMMY=m\nCONFIG_EQUALIZER=m\n# CONFIG_NET_FC is not set\nCONFIG_NET_TEAM=m\nCONFIG_NET_TEAM_MODE_BROADCAST=m\nCONFIG_NET_TEAM_MODE_ROUNDROBIN=m\nCONFIG_NET_TEAM_MODE_RANDOM=m\nCONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m\nCONFIG_NET_TEAM_MODE_LOADBALANCE=m\nCONFIG_MACVLAN=m\nCONFIG_MACVTAP=m\nCONFIG_IPVLAN=m\nCONFIG_VXLAN=m\nCONFIG_GENEVE=m\nCONFIG_GTP=m\nCONFIG_MACSEC=m\nCONFIG_NETCONSOLE=m\n# CONFIG_NETCONSOLE_DYNAMIC is not set\nCONFIG_NETPOLL=y\nCONFIG_NET_POLL_CONTROLLER=y\nCONFIG_TUN=m\nCONFIG_TUN_VNET_CROSS_LE=y\nCONFIG_VETH=y\nCONFIG_VIRTIO_NET=m\n# CONFIG_NLMON is not set\n# CONFIG_ARCNET is not set\n\n#\n# CAIF transport drivers\n#\n\n#\n# Distributed Switch Architecture drivers\n#\nCONFIG_ETHERNET=y\n# CONFIG_NET_VENDOR_3COM is not set\n# CONFIG_NET_VENDOR_ADAPTEC is not set\n# CONFIG_NET_VENDOR_AGERE is not set\n# CONFIG_NET_VENDOR_ALTEON is not set\n# CONFIG_ALTERA_TSE is not set\n# CONFIG_NET_VENDOR_AMAZON is not set\n# CONFIG_NET_VENDOR_AMD is not set\n# CONFIG_NET_VENDOR_ARC is not set\n# CONFIG_NET_VENDOR_ATHEROS is not set\n# CONFIG_NET_VENDOR_AURORA is not set\n# CONFIG_NET_CADENCE is not set\n# CONFIG_NET_VENDOR_BROADCOM is not set\n# CONFIG_NET_VENDOR_BROCADE is not set\n# CONFIG_NET_VENDOR_CAVIUM is not set\n# CONFIG_NET_VENDOR_CHELSIO is not set\n# CONFIG_NET_VENDOR_CISCO is not set\n# CONFIG_DNET is not set\n# CONFIG_NET_VENDOR_DEC is not set\n# CONFIG_NET_VENDOR_DLINK is not set\n# CONFIG_NET_VENDOR_EMULEX is not set\n# CONFIG_NET_VENDOR_EZCHIP is not set\n# CONFIG_NET_VENDOR_EXAR is not set\n# CONFIG_NET_VENDOR_HISILICON is not set\n# CONFIG_NET_VENDOR_HP is not set\nCONFIG_NET_VENDOR_INTEL=y\n# CONFIG_E100 is not set\n# CONFIG_E1000 is not set\n# CONFIG_E1000E is not set\n# CONFIG_IGB is not set\n# CONFIG_IGBVF is not set\n# CONFIG_IXGB is not set\n# CONFIG_IXGBE is not set\n# CONFIG_IXGBEVF is not set\n# CONFIG_I40E is not set\n# CONFIG_I40EVF is not set\n# CONFIG_FM10K is not set\nCONFIG_NET_VENDOR_I825XX=y\n# CONFIG_JME is not set\nCONFIG_NET_VENDOR_MARVELL=y\n# CONFIG_MVMDIO is not set\n# CONFIG_MVNETA_BM is not set\n# CONFIG_SKGE is not set\n# CONFIG_SKY2 is not set\n# CONFIG_NET_VENDOR_MELLANOX is not set\nCONFIG_NET_VENDOR_MICREL=y\n# CONFIG_KS8851 is not set\n# CONFIG_KS8851_MLL is not set\n# CONFIG_KSZ884X_PCI is not set\nCONFIG_NET_VENDOR_MICROCHIP=y\n# CONFIG_ENC28J60 is not set\n# CONFIG_ENCX24J600 is not set\n# CONFIG_NET_VENDOR_MYRI is not set\n# CONFIG_FEALNX is not set\nCONFIG_NET_VENDOR_NATSEMI=y\n# CONFIG_NATSEMI is not set\n# CONFIG_NS83820 is not set\nCONFIG_NET_VENDOR_NETRONOME=y\n# CONFIG_NFP_NETVF is not set\nCONFIG_NET_VENDOR_8390=y\n# CONFIG_NE2K_PCI is not set\n# CONFIG_NET_VENDOR_NVIDIA is not set\n# CONFIG_NET_VENDOR_OKI is not set\n# CONFIG_ETHOC is not set\n# CONFIG_NET_PACKET_ENGINE is not set\n# CONFIG_NET_VENDOR_QLOGIC is not set\nCONFIG_NET_VENDOR_QUALCOMM=y\n# CONFIG_QCA7000 is not set\n# CONFIG_QCOM_EMAC is not set\nCONFIG_NET_VENDOR_REALTEK=y\n# CONFIG_8139CP is not set\n# CONFIG_8139TOO is not set\nCONFIG_R8169=m\nCONFIG_NET_VENDOR_RENESAS=y\n# CONFIG_NET_VENDOR_RDC is not set\nCONFIG_NET_VENDOR_ROCKER=y\nCONFIG_NET_VENDOR_SAMSUNG=y\n# CONFIG_SXGBE_ETH is not set\nCONFIG_NET_VENDOR_SEEQ=y\n# CONFIG_NET_VENDOR_SILAN is not set\n# CONFIG_NET_VENDOR_SIS is not set\n# CONFIG_SFC is not set\nCONFIG_NET_VENDOR_SMSC=y\n# CONFIG_SMC91X is not set\n# CONFIG_EPIC100 is not set\n# CONFIG_SMSC911X is not set\n# CONFIG_SMSC9420 is not set\nCONFIG_NET_VENDOR_STMICRO=y\nCONFIG_STMMAC_ETH=y\nCONFIG_STMMAC_PLATFORM=y\nCONFIG_STMMAC_JL2XX1=y\nCONFIG_DWMAC_GENERIC=y\nCONFIG_DWMAC_MESON=y\nCONFIG_AMLOGIC_ETH_PRIVE=y\n# CONFIG_STMMAC_PCI is not set\n# CONFIG_NET_VENDOR_SUN is not set\nCONFIG_NET_VENDOR_SYNOPSYS=y\n# CONFIG_SYNOPSYS_DWC_ETH_QOS is not set\n# CONFIG_NET_VENDOR_TEHUTI is not set\n# CONFIG_NET_VENDOR_TI is not set\nCONFIG_NET_VENDOR_VIA=y\n# CONFIG_VIA_RHINE is not set\n# CONFIG_VIA_VELOCITY is not set\nCONFIG_NET_VENDOR_WIZNET=y\n# CONFIG_WIZNET_W5100 is not set\n# CONFIG_WIZNET_W5300 is not set\n# CONFIG_FDDI is not set\n# CONFIG_HIPPI is not set\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n\n#\n# MDIO bus device drivers\n#\n# CONFIG_MDIO_BCM_UNIMAC is not set\n# CONFIG_MDIO_BITBANG is not set\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_OCTEON is not set\n# CONFIG_MDIO_THUNDER is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\nCONFIG_FIXED_PHY=y\nCONFIG_ICPLUS_PHY=y\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MICREL_PHY is not set\nCONFIG_MICROCHIP_PHY=m\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_QSEMI_PHY is not set\nCONFIG_REALTEK_PHY=y\nCONFIG_MAXIO_PHY=y\n# CONFIG_SMSC_PHY is not set\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\nCONFIG_PPP=m\nCONFIG_PPP_BSDCOMP=m\nCONFIG_PPP_DEFLATE=m\nCONFIG_PPP_FILTER=y\nCONFIG_PPP_MPPE=m\nCONFIG_PPP_MULTILINK=y\nCONFIG_PPPOE=m\nCONFIG_PPPOLAC=m\nCONFIG_PPPOPNS=m\nCONFIG_PPP_ASYNC=m\nCONFIG_PPP_SYNC_TTY=m\nCONFIG_SLIP=m\nCONFIG_SLHC=m\nCONFIG_SLIP_COMPRESSED=y\nCONFIG_SLIP_SMART=y\nCONFIG_SLIP_MODE_SLIP6=y\nCONFIG_USB_NET_DRIVERS=y\nCONFIG_USB_CATC=m\nCONFIG_USB_KAWETH=m\nCONFIG_USB_PEGASUS=m\nCONFIG_USB_RTL8150=m\n# CONFIG_USB_RTL8152 is not set\nCONFIG_USB_LAN78XX=m\nCONFIG_USB_USBNET=m\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\nCONFIG_USB_NET_CDC_EEM=m\nCONFIG_USB_NET_CDC_NCM=m\nCONFIG_USB_NET_HUAWEI_CDC_NCM=m\nCONFIG_USB_NET_CDC_MBIM=m\nCONFIG_USB_NET_DM9601=m\nCONFIG_USB_NET_SR9700=m\nCONFIG_USB_NET_SR9800=m\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=m\nCONFIG_USB_NET_GL620A=m\nCONFIG_USB_NET_NET1080=m\nCONFIG_USB_NET_PLUSB=m\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\nCONFIG_USB_NET_CDC_SUBSET_ENABLE=m\nCONFIG_USB_NET_CDC_SUBSET=m\nCONFIG_USB_ALI_M5632=y\nCONFIG_USB_AN2720=y\nCONFIG_USB_BELKIN=y\nCONFIG_USB_ARMLINUX=y\nCONFIG_USB_EPSON2888=y\nCONFIG_USB_KC2190=y\nCONFIG_USB_NET_ZAURUS=m\nCONFIG_USB_NET_CX82310_ETH=m\nCONFIG_USB_NET_KALMIA=m\nCONFIG_USB_NET_QMI_WWAN=m\nCONFIG_USB_HSO=m\nCONFIG_USB_NET_INT51X1=m\nCONFIG_USB_IPHETH=m\nCONFIG_USB_SIERRA_NET=m\nCONFIG_USB_VL600=m\nCONFIG_USB_NET_CH9200=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\n# CONFIG_ADM8211 is not set\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\n# CONFIG_ATH5K is not set\n# CONFIG_ATH5K_PCI is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\nCONFIG_ATH9K=m\n# CONFIG_ATH9K_PCI is not set\n# CONFIG_ATH9K_AHB is not set\n# CONFIG_ATH9K_DEBUGFS is not set\n# CONFIG_ATH9K_DYNACK is not set\n# CONFIG_ATH9K_WOW is not set\nCONFIG_ATH9K_RFKILL=y\n# CONFIG_ATH9K_CHANNEL_CONTEXT is not set\nCONFIG_ATH9K_PCOEM=y\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\n# CONFIG_ATH9K_HWRNG is not set\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\n# CONFIG_CARL9170_HWRNG is not set\n# CONFIG_ATH6KL is not set\nCONFIG_AR5523=m\n# CONFIG_WIL6210 is not set\nCONFIG_ATH10K=m\n# CONFIG_ATH10K_PCI is not set\n# CONFIG_ATH10K_DEBUG is not set\n# CONFIG_ATH10K_DEBUGFS is not set\n# CONFIG_ATH10K_TRACING is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\n# CONFIG_ATMEL is not set\nCONFIG_AT76C50X_USB=m\nCONFIG_WLAN_VENDOR_BROADCOM=y\n# CONFIG_B43 is not set\n# CONFIG_B43LEGACY is not set\n# CONFIG_BRCMSMAC is not set\n# CONFIG_BRCMFMAC is not set\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\n# CONFIG_IPW2100 is not set\n# CONFIG_IPW2200 is not set\n# CONFIG_IWL4965 is not set\n# CONFIG_IWL3945 is not set\n# CONFIG_IWLWIFI is not set\nCONFIG_WLAN_VENDOR_INTERSIL=y\n# CONFIG_HOSTAP is not set\n# CONFIG_HERMES is not set\n# CONFIG_P54_COMMON is not set\n# CONFIG_PRISM54 is not set\nCONFIG_WLAN_VENDOR_MARVELL=y\n# CONFIG_LIBERTAS is not set\n# CONFIG_LIBERTAS_THINFIRM is not set\n# CONFIG_MWIFIEX is not set\n# CONFIG_MWL8K is not set\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\n# CONFIG_RT2400PCI is not set\n# CONFIG_RT2500PCI is not set\n# CONFIG_RT61PCI is not set\n# CONFIG_RT2800PCI is not set\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\n# CONFIG_RTL8180 is not set\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=y\n# CONFIG_RTL8192CE is not set\n# CONFIG_RTL8192SE is not set\n# CONFIG_RTL8192DE is not set\n# CONFIG_RTL8723AE is not set\n# CONFIG_RTL8723BE is not set\n# CONFIG_RTL8188EE is not set\n# CONFIG_RTL8192EE is not set\n# CONFIG_RTL8821AE is not set\n# CONFIG_RTL8192CU is not set\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\nCONFIG_WLAN_VENDOR_RSI=y\n# CONFIG_RSI_91X is not set\nCONFIG_WLAN_VENDOR_ST=y\n# CONFIG_CW1200 is not set\nCONFIG_WLAN_VENDOR_TI=y\n# CONFIG_WL1251 is not set\n# CONFIG_WL12XX is not set\n# CONFIG_WL18XX is not set\n# CONFIG_WLCORE is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\nCONFIG_USB_ZD1201=m\nCONFIG_ZD1211RW=m\n# CONFIG_ZD1211RW_DEBUG is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n\n#\n# Enable WiMAX (Networking options) to see the WiMAX drivers\n#\n# CONFIG_WAN is not set\n# CONFIG_VMXNET3 is not set\n# CONFIG_ISDN is not set\n# CONFIG_NVM is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\nCONFIG_INPUT_POLLDEV=y\n# CONFIG_INPUT_SPARSEKMAP is not set\n# CONFIG_INPUT_MATRIXKMAP is not set\n\n#\n# Userland interfaces\n#\nCONFIG_INPUT_MOUSEDEV=y\nCONFIG_INPUT_MOUSEDEV_PSAUX=y\nCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024\nCONFIG_INPUT_MOUSEDEV_SCREEN_Y=768\nCONFIG_INPUT_JOYDEV=m\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n# CONFIG_INPUT_KEYRESET is not set\n# CONFIG_INPUT_KEYCOMBO is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADC is not set\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\nCONFIG_KEYBOARD_ATKBD=y\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\n# CONFIG_KEYBOARD_GPIO is not set\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\nCONFIG_INPUT_MOUSE=y\nCONFIG_MOUSE_PS2=y\nCONFIG_MOUSE_PS2_ALPS=y\nCONFIG_MOUSE_PS2_BYD=y\nCONFIG_MOUSE_PS2_LOGIPS2PP=y\nCONFIG_MOUSE_PS2_SYNAPTICS=y\nCONFIG_MOUSE_PS2_CYPRESS=y\nCONFIG_MOUSE_PS2_TRACKPOINT=y\n# CONFIG_MOUSE_PS2_ELANTECH is not set\n# CONFIG_MOUSE_PS2_SENTELIC is not set\n# CONFIG_MOUSE_PS2_TOUCHKIT is not set\nCONFIG_MOUSE_PS2_FOCALTECH=y\n# CONFIG_MOUSE_SERIAL is not set\n# CONFIG_MOUSE_APPLETOUCH is not set\n# CONFIG_MOUSE_BCM5974 is not set\n# CONFIG_MOUSE_CYAPA is not set\n# CONFIG_MOUSE_ELAN_I2C is not set\n# CONFIG_MOUSE_VSXXXAA is not set\n# CONFIG_MOUSE_GPIO is not set\n# CONFIG_MOUSE_SYNAPTICS_I2C is not set\n# CONFIG_MOUSE_SYNAPTICS_USB is not set\nCONFIG_INPUT_JOYSTICK=y\nCONFIG_JOYSTICK_ANALOG=m\nCONFIG_JOYSTICK_A3D=m\nCONFIG_JOYSTICK_ADI=m\nCONFIG_JOYSTICK_COBRA=m\nCONFIG_JOYSTICK_GF2K=m\nCONFIG_JOYSTICK_GRIP=m\nCONFIG_JOYSTICK_GRIP_MP=m\nCONFIG_JOYSTICK_GUILLEMOT=m\nCONFIG_JOYSTICK_INTERACT=m\nCONFIG_JOYSTICK_SIDEWINDER=m\nCONFIG_JOYSTICK_TMDC=m\nCONFIG_JOYSTICK_IFORCE=m\nCONFIG_JOYSTICK_IFORCE_USB=y\nCONFIG_JOYSTICK_IFORCE_232=y\nCONFIG_JOYSTICK_WARRIOR=m\nCONFIG_JOYSTICK_MAGELLAN=m\nCONFIG_JOYSTICK_SPACEORB=m\nCONFIG_JOYSTICK_SPACEBALL=m\nCONFIG_JOYSTICK_STINGER=m\nCONFIG_JOYSTICK_TWIDJOY=m\nCONFIG_JOYSTICK_ZHENHUA=m\n# CONFIG_JOYSTICK_DB9 is not set\nCONFIG_JOYSTICK_GAMECON=y\n# CONFIG_JOYSTICK_TURBOGRAFX is not set\nCONFIG_JOYSTICK_AS5011=m\nCONFIG_JOYSTICK_JOYDUMP=m\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\n# CONFIG_JOYSTICK_WALKERA0701 is not set\n# CONFIG_INPUT_TABLET is not set\nCONFIG_INPUT_TOUCHSCREEN=y\nCONFIG_TOUCHSCREEN_PROPERTIES=y\nCONFIG_TOUCHSCREEN_ADS7846=m\n# CONFIG_TOUCHSCREEN_AD7877 is not set\n# CONFIG_TOUCHSCREEN_AD7879 is not set\n# CONFIG_TOUCHSCREEN_AR1021_I2C is not set\n# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set\n# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_BU21013 is not set\n# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set\n# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set\n# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set\n# CONFIG_TOUCHSCREEN_DYNAPRO is not set\n# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set\n# CONFIG_TOUCHSCREEN_EETI is not set\n# CONFIG_TOUCHSCREEN_EGALAX is not set\n# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set\n# CONFIG_TOUCHSCREEN_FUJITSU is not set\n# CONFIG_TOUCHSCREEN_GOODIX is not set\n# CONFIG_TOUCHSCREEN_ILI210X is not set\n# CONFIG_TOUCHSCREEN_GUNZE is not set\n# CONFIG_TOUCHSCREEN_EKTF2127 is not set\n# CONFIG_TOUCHSCREEN_ELAN is not set\n# CONFIG_TOUCHSCREEN_ELO is not set\n# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set\n# CONFIG_TOUCHSCREEN_WACOM_I2C is not set\n# CONFIG_TOUCHSCREEN_MAX11801 is not set\n# CONFIG_TOUCHSCREEN_MCS5000 is not set\n# CONFIG_TOUCHSCREEN_MMS114 is not set\n# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set\n# CONFIG_TOUCHSCREEN_MTOUCH is not set\n# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set\n# CONFIG_TOUCHSCREEN_INEXIO is not set\n# CONFIG_TOUCHSCREEN_MK712 is not set\n# CONFIG_TOUCHSCREEN_PENMOUNT is not set\n# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set\n# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set\n# CONFIG_TOUCHSCREEN_TOUCHWIN is not set\n# CONFIG_TOUCHSCREEN_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set\n# CONFIG_TOUCHSCREEN_WM97XX is not set\n# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set\n# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set\n# CONFIG_TOUCHSCREEN_TSC_SERIO is not set\n# CONFIG_TOUCHSCREEN_TSC2004 is not set\n# CONFIG_TOUCHSCREEN_TSC2005 is not set\n# CONFIG_TOUCHSCREEN_TSC2007 is not set\n# CONFIG_TOUCHSCREEN_RM_TS is not set\n# CONFIG_TOUCHSCREEN_SILEAD is not set\n# CONFIG_TOUCHSCREEN_SIS_I2C is not set\n# CONFIG_TOUCHSCREEN_ST1232 is not set\n# CONFIG_TOUCHSCREEN_SUR40 is not set\n# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set\n# CONFIG_TOUCHSCREEN_SX8654 is not set\n# CONFIG_TOUCHSCREEN_TPS6507X is not set\n# CONFIG_TOUCHSCREEN_ZFORCE is not set\nCONFIG_TOUCHSCREEN_DWAV_USB_MT=m\n# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_MPU3050 is not set\n# CONFIG_INPUT_GP2A is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_TILT_POLLED is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_GPIO is not set\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\n# CONFIG_RMI4_CORE is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_SERIO_SERPORT=y\n# CONFIG_SERIO_PARKBD is not set\n# CONFIG_SERIO_AMBAKMI is not set\n# CONFIG_SERIO_PCIPS2 is not set\nCONFIG_SERIO_LIBPS2=y\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_USERIO is not set\nCONFIG_GAMEPORT=m\n# CONFIG_GAMEPORT_NS558 is not set\n# CONFIG_GAMEPORT_L4 is not set\n# CONFIG_GAMEPORT_EMU10K1 is not set\n# CONFIG_GAMEPORT_FM801 is not set\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_NOZOMI is not set\n# CONFIG_N_GSM is not set\n# CONFIG_TRACE_SINK is not set\n# CONFIG_LDISC_AUTOLOAD is not set\nCONFIG_DEVMEM=y\nCONFIG_DEVKMEM=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\n# CONFIG_SERIAL_8250 is not set\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\n# CONFIG_SERIAL_AMBA_PL011 is not set\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_JSM is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_IFX6X60 is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_RP2 is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_TTY_PRINTK is not set\nCONFIG_HVC_DRIVER=y\n# CONFIG_HVC_DCC is not set\nCONFIG_VIRTIO_CONSOLE=m\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_VIRTIO is not set\nCONFIG_HW_RANDOM_MESON=y\n# CONFIG_HW_RANDOM_CAVIUM is not set\n# CONFIG_APPLICOM is not set\n\n#\n# PCMCIA character devices\n#\n# CONFIG_RAW_DRIVER is not set\n# CONFIG_TCG_TPM is not set\nCONFIG_DEVPORT=y\n# CONFIG_XILLYBUS is not set\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\n# CONFIG_I2C_MUX_PINCTRL is not set\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_DEMUX_PINCTRL is not set\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# PC SMBus host controller drivers\n#\n# CONFIG_I2C_ALI1535 is not set\n# CONFIG_I2C_ALI1563 is not set\n# CONFIG_I2C_ALI15X3 is not set\n# CONFIG_I2C_AMD756 is not set\n# CONFIG_I2C_AMD8111 is not set\n# CONFIG_I2C_I801 is not set\n# CONFIG_I2C_ISCH is not set\n# CONFIG_I2C_PIIX4 is not set\n# CONFIG_I2C_NFORCE2 is not set\n# CONFIG_I2C_SIS5595 is not set\n# CONFIG_I2C_SIS630 is not set\n# CONFIG_I2C_SIS96X is not set\n# CONFIG_I2C_VIA is not set\n# CONFIG_I2C_VIAPRO is not set\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CADENCE is not set\n# CONFIG_I2C_CBUS_GPIO is not set\n# CONFIG_I2C_DESIGNWARE_PLATFORM is not set\n# CONFIG_I2C_DESIGNWARE_PCI is not set\n# CONFIG_I2C_EMEV2 is not set\n# CONFIG_I2C_GPIO is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_PXA_PCI is not set\n# CONFIG_I2C_RK3X is not set\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_THUNDERX is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_PARPORT is not set\n# CONFIG_I2C_PARPORT_LIGHT is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\nCONFIG_SPI=y\nCONFIG_SPI_DEBUG=y\nCONFIG_SPI_MASTER=y\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\nCONFIG_SPI_BITBANG=y\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_DESIGNWARE is not set\nCONFIG_SPI_GPIO=y\n# CONFIG_SPI_FSL_SPI is not set\nCONFIG_SPI_MESON_SPICC=m\n# CONFIG_SPI_OC_TINY is not set\n# CONFIG_SPI_PL022 is not set\n# CONFIG_SPI_PXA2XX is not set\n# CONFIG_SPI_PXA2XX_PCI is not set\n# CONFIG_SPI_ROCKCHIP is not set\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_THUNDERX is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=m\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_DYNAMIC is not set\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\n\n#\n# PPS support\n#\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_PARPORT is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\nCONFIG_PINCTRL=y\n\n#\n# Pin controllers\n#\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_AMD is not set\n# CONFIG_PINCTRL_SINGLE is not set\nCONFIG_GPIOLIB=y\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_SYSFS=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_DWAPB is not set\n# CONFIG_GPIO_GENERIC_PLATFORM is not set\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_PL061 is not set\n# CONFIG_GPIO_SYSCON is not set\n# CONFIG_GPIO_VX855 is not set\n# CONFIG_GPIO_XGENE is not set\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_ZX is not set\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADP5588 is not set\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\nCONFIG_GPIO_PCA953X=y\n# CONFIG_GPIO_PCA953X_IRQ is not set\nCONFIG_GPIO_PCF857X=m\n# CONFIG_GPIO_SX150X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# CONFIG_GPIO_TS4900 is not set\n\n#\n# MFD GPIO expanders\n#\n\n#\n# PCI GPIO expanders\n#\n# CONFIG_GPIO_AMD8111 is not set\n# CONFIG_GPIO_BT8XX is not set\n# CONFIG_GPIO_ML_IOH is not set\n# CONFIG_GPIO_RDC321X is not set\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n\n#\n# SPI or I2C GPIO expanders\n#\n# CONFIG_GPIO_MCP23S08 is not set\n\n#\n# USB GPIO expanders\n#\nCONFIG_W1=m\nCONFIG_W1_CON=y\n\n#\n# 1-wire Bus Masters\n#\n# CONFIG_W1_MASTER_MATROX is not set\n# CONFIG_W1_MASTER_DS2490 is not set\n# CONFIG_W1_MASTER_DS2482 is not set\n# CONFIG_W1_MASTER_DS1WM is not set\nCONFIG_W1_MASTER_GPIO=m\n\n#\n# 1-wire Slaves\n#\nCONFIG_W1_SLAVE_THERM=m\n# CONFIG_W1_SLAVE_SMEM is not set\n# CONFIG_W1_SLAVE_DS2408 is not set\n# CONFIG_W1_SLAVE_DS2413 is not set\n# CONFIG_W1_SLAVE_DS2406 is not set\n# CONFIG_W1_SLAVE_DS2423 is not set\n# CONFIG_W1_SLAVE_DS2431 is not set\n# CONFIG_W1_SLAVE_DS2433 is not set\n# CONFIG_W1_SLAVE_DS2760 is not set\n# CONFIG_W1_SLAVE_DS2780 is not set\n# CONFIG_W1_SLAVE_DS2781 is not set\n# CONFIG_W1_SLAVE_DS28E04 is not set\n# CONFIG_W1_SLAVE_BQ27000 is not set\n# CONFIG_POWER_AVS is not set\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_GPIO is not set\n# CONFIG_POWER_RESET_GPIO_RESTART is not set\n# CONFIG_POWER_RESET_LTC2952 is not set\n# CONFIG_POWER_RESET_RESTART is not set\n# CONFIG_POWER_RESET_XGENE is not set\n# CONFIG_POWER_RESET_SYSCON is not set\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\n# CONFIG_SYSCON_REBOOT_MODE is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_CHARGER_RT9455 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_VID is not set\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_ARM_SCPI is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_I5K_AMB is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\n# CONFIG_SENSORS_GPIO_FAN is not set\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IIO_HWMON is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\nCONFIG_SENSORS_PWM_FAN=y\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_SIS5595 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH56XX_COMMON is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS1015 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_VIA686A is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_VT8231 is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\nCONFIG_THERMAL_WRITABLE_TRIPS=y\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set\nCONFIG_THERMAL_GOV_FAIR_SHARE=y\nCONFIG_THERMAL_GOV_STEP_WISE=y\nCONFIG_THERMAL_GOV_BANG_BANG=y\nCONFIG_THERMAL_GOV_USER_SPACE=y\nCONFIG_THERMAL_GOV_POWER_ALLOCATOR=y\nCONFIG_CPU_THERMAL=y\n# CONFIG_CLOCK_THERMAL is not set\nCONFIG_DEVFREQ_THERMAL=y\n# CONFIG_THERMAL_EMULATION is not set\n# CONFIG_QORIQ_THERMAL is not set\n\n#\n# ACPI INT340X thermal drivers\n#\n# CONFIG_GENERIC_ADC_THERMAL is not set\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\n# CONFIG_WATCHDOG_SYSFS is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_ARM_SBSA_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\n# CONFIG_DW_WATCHDOG is not set\n# CONFIG_MAX63XX_WATCHDOG is not set\n# CONFIG_ALIM7101_WDT is not set\n# CONFIG_I6300ESB_WDT is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# PCI-based Watchdog Cards\n#\n# CONFIG_PCIPCWATCHDOG is not set\n# CONFIG_WDTPCI is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\nCONFIG_SSB_POSSIBLE=y\n\n#\n# Sonics Silicon Backplane\n#\n# CONFIG_SSB is not set\nCONFIG_BCMA_POSSIBLE=y\n\n#\n# Broadcom specific AMBA\n#\n# CONFIG_BCMA is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=m\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_AXP20X_I2C is not set\n# CONFIG_MFD_CROS_EC is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_EXYNOS_LPASS is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_LPC_ICH is not set\n# CONFIG_LPC_SCH is not set\n# CONFIG_INTEL_SOC_PMIC is not set\n# CONFIG_MFD_JANZ_CMODIO is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77620 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_UCB1400_CORE is not set\n# CONFIG_MFD_RDC321X is not set\n# CONFIG_MFD_RTSX_PCI is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RTSX_USB is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_RK808 is not set\n# CONFIG_MFD_RN5T618 is not set\n# CONFIG_MFD_SEC_CORE is not set\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_SMSC is not set\n# CONFIG_ABX500_CORE is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_MFD_TPS80031 is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_TMIO is not set\n# CONFIG_MFD_VX855 is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\n# CONFIG_REGULATOR_ANATOP is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\n# CONFIG_REGULATOR_GPIO is not set\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\nCONFIG_REGULATOR_PWM=y\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS6524X is not set\nCONFIG_MEDIA_SUPPORT=m\n\n#\n# Multimedia core support\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\n# CONFIG_MEDIA_RADIO_SUPPORT is not set\nCONFIG_MEDIA_SDR_SUPPORT=y\nCONFIG_MEDIA_RC_SUPPORT=y\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_MEDIA_CONTROLLER_DVB=y\nCONFIG_VIDEO_DEV=m\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\nCONFIG_VIDEO_V4L2=m\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\n# CONFIG_VIDEO_PCI_SKELETON is not set\nCONFIG_VIDEO_TUNER=m\nCONFIG_V4L2_MEM2MEM_DEV=m\nCONFIG_VIDEOBUF_GEN=m\nCONFIG_VIDEOBUF_VMALLOC=m\nCONFIG_VIDEOBUF_DVB=m\nCONFIG_VIDEOBUF2_CORE=m\nCONFIG_VIDEOBUF2_MEMOPS=m\nCONFIG_VIDEOBUF2_DMA_CONTIG=m\nCONFIG_VIDEOBUF2_VMALLOC=m\nCONFIG_DVB_CORE=m\nCONFIG_DVB_NET=y\nCONFIG_TTPCI_EEPROM=m\nCONFIG_DVB_MAX_ADAPTERS=8\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n\n#\n# Media drivers\n#\nCONFIG_RC_CORE=m\nCONFIG_RC_MAP=m\nCONFIG_RC_DECODERS=y\nCONFIG_IR_IRMP_DECODER=m\nCONFIG_LIRC=m\nCONFIG_IR_LIRC_CODEC=m\nCONFIG_IR_NEC_DECODER=m\nCONFIG_IR_RC5_DECODER=m\nCONFIG_IR_RC6_DECODER=m\nCONFIG_IR_JVC_DECODER=m\nCONFIG_IR_SONY_DECODER=m\nCONFIG_IR_SANYO_DECODER=m\nCONFIG_IR_SHARP_DECODER=m\nCONFIG_IR_MCE_KBD_DECODER=m\nCONFIG_IR_XMP_DECODER=m\nCONFIG_RC_DEVICES=y\nCONFIG_RC_ATI_REMOTE=m\n# CONFIG_IR_HIX5HD2 is not set\n# CONFIG_IR_IMON is not set\nCONFIG_IR_MCEUSB=m\nCONFIG_IR_MESON=m\n# CONFIG_IR_REDRAT3 is not set\n# CONFIG_IR_STREAMZAP is not set\n# CONFIG_IR_IGORPLUGUSB is not set\n# CONFIG_IR_IGUANA is not set\n# CONFIG_IR_TTUSBIR is not set\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_IR_GPIO_CIR=m\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\nCONFIG_USB_VIDEO_CLASS=m\nCONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y\nCONFIG_USB_GSPCA=m\nCONFIG_USB_M5602=m\nCONFIG_USB_STV06XX=m\nCONFIG_USB_GL860=m\nCONFIG_USB_GSPCA_BENQ=m\nCONFIG_USB_GSPCA_CONEX=m\nCONFIG_USB_GSPCA_CPIA1=m\nCONFIG_USB_GSPCA_DTCS033=m\nCONFIG_USB_GSPCA_ETOMS=m\nCONFIG_USB_GSPCA_FINEPIX=m\nCONFIG_USB_GSPCA_JEILINJ=m\nCONFIG_USB_GSPCA_JL2005BCD=m\nCONFIG_USB_GSPCA_KINECT=m\nCONFIG_USB_GSPCA_KONICA=m\nCONFIG_USB_GSPCA_MARS=m\nCONFIG_USB_GSPCA_MR97310A=m\nCONFIG_USB_GSPCA_NW80X=m\nCONFIG_USB_GSPCA_OV519=m\nCONFIG_USB_GSPCA_OV534=m\nCONFIG_USB_GSPCA_OV534_9=m\nCONFIG_USB_GSPCA_PAC207=m\nCONFIG_USB_GSPCA_PAC7302=m\nCONFIG_USB_GSPCA_PAC7311=m\nCONFIG_USB_GSPCA_SE401=m\nCONFIG_USB_GSPCA_SN9C2028=m\nCONFIG_USB_GSPCA_SN9C20X=m\nCONFIG_USB_GSPCA_SONIXB=m\nCONFIG_USB_GSPCA_SONIXJ=m\nCONFIG_USB_GSPCA_SPCA500=m\nCONFIG_USB_GSPCA_SPCA501=m\nCONFIG_USB_GSPCA_SPCA505=m\nCONFIG_USB_GSPCA_SPCA506=m\nCONFIG_USB_GSPCA_SPCA508=m\nCONFIG_USB_GSPCA_SPCA561=m\nCONFIG_USB_GSPCA_SPCA1528=m\nCONFIG_USB_GSPCA_SQ905=m\nCONFIG_USB_GSPCA_SQ905C=m\nCONFIG_USB_GSPCA_SQ930X=m\nCONFIG_USB_GSPCA_STK014=m\nCONFIG_USB_GSPCA_STK1135=m\nCONFIG_USB_GSPCA_STV0680=m\nCONFIG_USB_GSPCA_SUNPLUS=m\nCONFIG_USB_GSPCA_T613=m\nCONFIG_USB_GSPCA_TOPRO=m\nCONFIG_USB_GSPCA_TOUPTEK=m\nCONFIG_USB_GSPCA_TV8532=m\nCONFIG_USB_GSPCA_VC032X=m\nCONFIG_USB_GSPCA_VICAM=m\nCONFIG_USB_GSPCA_XIRLINK_CIT=m\nCONFIG_USB_GSPCA_ZC3XX=m\nCONFIG_USB_PWC=m\n# CONFIG_USB_PWC_DEBUG is not set\nCONFIG_USB_PWC_INPUT_EVDEV=y\nCONFIG_VIDEO_CPIA2=m\nCONFIG_USB_ZR364XX=m\nCONFIG_USB_STKWEBCAM=m\nCONFIG_USB_S2255=m\nCONFIG_VIDEO_USBTV=m\n\n#\n# Analog TV USB devices\n#\n# CONFIG_VIDEO_PVRUSB2 is not set\n# CONFIG_VIDEO_HDPVR is not set\n# CONFIG_VIDEO_USBVISION is not set\nCONFIG_VIDEO_STK1160_COMMON=m\n# CONFIG_VIDEO_STK1160_AC97 is not set\nCONFIG_VIDEO_STK1160=m\n# CONFIG_VIDEO_GO7007 is not set\n\n#\n# Analog/digital TV USB devices\n#\nCONFIG_VIDEO_AU0828=m\nCONFIG_VIDEO_AU0828_V4L2=y\nCONFIG_VIDEO_AU0828_RC=y\nCONFIG_VIDEO_CX231XX=m\nCONFIG_VIDEO_CX231XX_RC=y\nCONFIG_VIDEO_CX231XX_ALSA=m\nCONFIG_VIDEO_CX231XX_DVB=m\nCONFIG_VIDEO_TM6000=m\nCONFIG_VIDEO_TM6000_ALSA=m\nCONFIG_VIDEO_TM6000_DVB=m\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_USB=m\nCONFIG_DVB_USB_DEBUG=y\nCONFIG_DVB_USB_DIB3000MC=m\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_DIBUSB_MB=m\nCONFIG_DVB_USB_DIBUSB_MB_FAULTY=y\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_CXUSB=m\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_DTT200U=m\nCONFIG_DVB_USB_OPERA1=m\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_FRIIO=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_DVB_USB_DVBSKY=m\n# CONFIG_DVB_TTUSB_BUDGET is not set\n# CONFIG_DVB_TTUSB_DEC is not set\nCONFIG_SMS_USB_DRV=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\nCONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG=y\nCONFIG_DVB_AS102=m\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\nCONFIG_VIDEO_EM28XX=m\nCONFIG_VIDEO_EM28XX_V4L2=m\nCONFIG_VIDEO_EM28XX_ALSA=m\nCONFIG_VIDEO_EM28XX_DVB=m\n# CONFIG_VIDEO_EM28XX_RC is not set\n\n#\n# Software defined radio USB devices\n#\nCONFIG_USB_AIRSPY=m\nCONFIG_USB_HACKRF=m\nCONFIG_USB_MSI2500=m\n# CONFIG_MEDIA_PCI_SUPPORT is not set\n# CONFIG_V4L_PLATFORM_DRIVERS is not set\n# CONFIG_V4L_MEM2MEM_DRIVERS is not set\n# CONFIG_V4L_TEST_DRIVERS is not set\n# CONFIG_DVB_PLATFORM_DRIVERS is not set\n\n#\n# Supported MMC/SDIO adapters\n#\n# CONFIG_SMS_SDIO_DRV is not set\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_VIDEO_CX2341X=m\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_DVB_B2C2_FLEXCOP_DEBUG=y\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\n\n#\n# Media ancillary drivers (tuners, sensors, i2c, spi, frontends)\n#\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\nCONFIG_MEDIA_ATTACH=y\nCONFIG_VIDEO_IR_I2C=m\n\n#\n# Audio decoders, processors and mixers\n#\nCONFIG_VIDEO_MSP3400=m\n\n#\n# RDS decoders\n#\n\n#\n# Video decoders\n#\nCONFIG_VIDEO_SAA711X=m\nCONFIG_VIDEO_TVP5150=m\n\n#\n# Video and audio decoders\n#\nCONFIG_VIDEO_CX25840=m\n\n#\n# Video encoders\n#\n\n#\n# Camera sensor devices\n#\nCONFIG_VIDEO_MT9V011=m\n\n#\n# Flash devices\n#\n\n#\n# Video improvement chips\n#\n\n#\n# Audio/Video compression chips\n#\n\n#\n# Miscellaneous helper chips\n#\n\n#\n# Sensors used on soc_camera driver\n#\nCONFIG_MEDIA_TUNER=m\nCONFIG_MEDIA_TUNER_SIMPLE=m\nCONFIG_MEDIA_TUNER_TDA8290=m\nCONFIG_MEDIA_TUNER_TDA827X=m\nCONFIG_MEDIA_TUNER_TDA18271=m\nCONFIG_MEDIA_TUNER_TDA18272=m\nCONFIG_MEDIA_TUNER_TDA9887=m\nCONFIG_MEDIA_TUNER_MSI001=m\nCONFIG_MEDIA_TUNER_MT20XX=m\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT2266=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_XC2028=m\nCONFIG_MEDIA_TUNER_XC5000=m\nCONFIG_MEDIA_TUNER_XC4000=m\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\nCONFIG_MEDIA_TUNER_MC44S803=m\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_SI2157=m\nCONFIG_MEDIA_TUNER_IT913X=m\nCONFIG_MEDIA_TUNER_R820T=m\nCONFIG_MEDIA_TUNER_QM1D1C0042=m\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\nCONFIG_DVB_STV6110x=m\nCONFIG_DVB_M88DS3103=m\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_TDA18271C2DD=m\nCONFIG_DVB_SI2165=m\nCONFIG_DVB_MN88472=m\nCONFIG_DVB_MN88473=m\n\n#\n# DVB-S (satellite) frontends\n#\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_MT312=m\nCONFIG_DVB_ZL10039=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_TDA10086=m\nCONFIG_DVB_TUNER_ITD1000=m\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_CX24116=m\nCONFIG_DVB_CX24120=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_TS2020=m\nCONFIG_DVB_DS3000=m\nCONFIG_DVB_TDA10071=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_MT352=m\nCONFIG_DVB_ZL10353=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\nCONFIG_DVB_RTL2832_SDR=m\nCONFIG_DVB_SI2168=m\nCONFIG_DVB_AS102_FE=m\nCONFIG_DVB_GP8PSK_FE=m\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_TDA10023=m\nCONFIG_DVB_STV0297=m\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_NXT200X=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LGDT330X=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LGDT3306A=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_AU8522=m\nCONFIG_DVB_AU8522_DTV=m\nCONFIG_DVB_AU8522_V4L=m\nCONFIG_DVB_S5H1411=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_S921=m\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_TC90522=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_DRX39XYJ=m\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_A8293=m\nCONFIG_DVB_SP2=m\nCONFIG_DVB_LGS8GXX=m\nCONFIG_DVB_ATBM8830=m\nCONFIG_DVB_IX2505V=m\nCONFIG_DVB_M88RS2000=m\nCONFIG_DVB_AF9033=m\n\n#\n# Tools to develop new frontends\n#\n# CONFIG_DVB_DUMMY_FE is not set\n\n#\n# Graphics support\n#\n# CONFIG_VGA_ARB is not set\nCONFIG_DRM=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\nCONFIG_DRM_KMS_HELPER=y\nCONFIG_DRM_KMS_FB_HELPER=y\nCONFIG_DRM_FBDEV_EMULATION=y\n# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_RADEON is not set\n# CONFIG_DRM_AMDGPU is not set\n\n#\n# ACP (Audio CoProcessor) Configuration\n#\n# CONFIG_DRM_NOUVEAU is not set\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_AST is not set\n# CONFIG_DRM_MGAG200 is not set\n# CONFIG_DRM_CIRRUS_QEMU is not set\n# CONFIG_DRM_QXL is not set\n# CONFIG_DRM_BOCHS is not set\n# CONFIG_DRM_VIRTIO_GPU is not set\nCONFIG_DRM_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_DUMB_VGA_DAC is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_HISI_KIRIN is not set\n# CONFIG_DRM_LEGACY is not set\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\n# CONFIG_FB_DDC is not set\n# CONFIG_FB_BOOT_VESA_SUPPORT is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\n# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\n# CONFIG_FB_SVGALIB is not set\n# CONFIG_FB_MACMODES is not set\nCONFIG_FB_BACKLIGHT=y\n# CONFIG_FB_MODE_HELPERS is not set\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_CIRRUS is not set\n# CONFIG_FB_PM2 is not set\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_CYBER2000 is not set\n# CONFIG_FB_ASILIANT is not set\n# CONFIG_FB_IMSTT is not set\n# CONFIG_FB_UVESA is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_NVIDIA is not set\n# CONFIG_FB_RIVA is not set\n# CONFIG_FB_I740 is not set\n# CONFIG_FB_MATROX is not set\n# CONFIG_FB_RADEON is not set\n# CONFIG_FB_ATY128 is not set\n# CONFIG_FB_ATY is not set\n# CONFIG_FB_S3 is not set\n# CONFIG_FB_SAVAGE is not set\n# CONFIG_FB_SIS is not set\n# CONFIG_FB_NEOMAGIC is not set\n# CONFIG_FB_KYRO is not set\n# CONFIG_FB_3DFX is not set\n# CONFIG_FB_VOODOO1 is not set\n# CONFIG_FB_VT8623 is not set\n# CONFIG_FB_TRIDENT is not set\n# CONFIG_FB_ARK is not set\n# CONFIG_FB_PM3 is not set\n# CONFIG_FB_CARMINE is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_MB862XX is not set\n# CONFIG_FB_BROADSHEET is not set\n# CONFIG_FB_AUO_K190X is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# CONFIG_FB_SM712 is not set\nCONFIG_BACKLIGHT_LCD_SUPPORT=y\nCONFIG_LCD_CLASS_DEVICE=m\n# CONFIG_LCD_L4F00242T03 is not set\n# CONFIG_LCD_LMS283GF05 is not set\n# CONFIG_LCD_LTV350QV is not set\n# CONFIG_LCD_ILI922X is not set\n# CONFIG_LCD_ILI9320 is not set\n# CONFIG_LCD_TDO24M is not set\n# CONFIG_LCD_VGG2432A4 is not set\n# CONFIG_LCD_PLATFORM is not set\n# CONFIG_LCD_S6E63M0 is not set\n# CONFIG_LCD_LD9040 is not set\n# CONFIG_LCD_AMS369FG06 is not set\n# CONFIG_LCD_LMS501KF03 is not set\n# CONFIG_LCD_HX8357 is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\nCONFIG_BACKLIGHT_GENERIC=y\n# CONFIG_BACKLIGHT_PWM is not set\n# CONFIG_BACKLIGHT_PM8941_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\n# CONFIG_BACKLIGHT_GPIO is not set\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_VGASTATE is not set\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_DUMMY_CONSOLE_COLUMNS=80\nCONFIG_DUMMY_CONSOLE_ROWS=25\nCONFIG_FRAMEBUFFER_CONSOLE=m\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_LOGO is not set\nCONFIG_SOUND=y\nCONFIG_SOUND_OSS_CORE=y\nCONFIG_SOUND_OSS_CORE_PRECLAIM=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_HWDEP=y\nCONFIG_SND_RAWMIDI=y\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\nCONFIG_SND_SEQUENCER=y\n# CONFIG_SND_SEQ_DUMMY is not set\nCONFIG_SND_OSSEMUL=y\nCONFIG_SND_MIXER_OSS=m\nCONFIG_SND_PCM_OSS=m\nCONFIG_SND_PCM_OSS_PLUGINS=y\nCONFIG_SND_PCM_TIMER=y\n# CONFIG_SND_SEQUENCER_OSS is not set\nCONFIG_SND_HRTIMER=m\nCONFIG_SND_SEQ_HRTIMER_DEFAULT=y\nCONFIG_SND_DYNAMIC_MINORS=y\nCONFIG_SND_MAX_CARDS=32\nCONFIG_SND_SUPPORT_OLD_API=y\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\n# CONFIG_SND_DEBUG is not set\nCONFIG_SND_VMASTER=y\nCONFIG_SND_RAWMIDI_SEQ=y\n# CONFIG_SND_OPL3_LIB_SEQ is not set\n# CONFIG_SND_OPL4_LIB_SEQ is not set\n# CONFIG_SND_SBAWE_SEQ is not set\n# CONFIG_SND_EMU10K1_SEQ is not set\nCONFIG_SND_MPU401_UART=m\nCONFIG_SND_AC97_CODEC=m\nCONFIG_SND_DRIVERS=y\nCONFIG_SND_DUMMY=m\nCONFIG_SND_ALOOP=m\n# CONFIG_SND_VIRMIDI is not set\nCONFIG_SND_MTPAV=m\nCONFIG_SND_SERIAL_U16550=m\nCONFIG_SND_MPU401=m\n# CONFIG_SND_AC97_POWER_SAVE is not set\nCONFIG_SND_PCI=y\n# CONFIG_SND_AD1889 is not set\n# CONFIG_SND_ALS300 is not set\n# CONFIG_SND_ALI5451 is not set\n# CONFIG_SND_ATIIXP is not set\n# CONFIG_SND_ATIIXP_MODEM is not set\n# CONFIG_SND_AU8810 is not set\n# CONFIG_SND_AU8820 is not set\n# CONFIG_SND_AU8830 is not set\n# CONFIG_SND_AW2 is not set\n# CONFIG_SND_AZT3328 is not set\n# CONFIG_SND_BT87X is not set\n# CONFIG_SND_CA0106 is not set\n# CONFIG_SND_CMIPCI is not set\n# CONFIG_SND_OXYGEN is not set\n# CONFIG_SND_CS4281 is not set\n# CONFIG_SND_CS46XX is not set\n# CONFIG_SND_CTXFI is not set\n# CONFIG_SND_DARLA20 is not set\n# CONFIG_SND_GINA20 is not set\n# CONFIG_SND_LAYLA20 is not set\n# CONFIG_SND_DARLA24 is not set\n# CONFIG_SND_GINA24 is not set\n# CONFIG_SND_LAYLA24 is not set\n# CONFIG_SND_MONA is not set\n# CONFIG_SND_MIA is not set\n# CONFIG_SND_ECHO3G is not set\n# CONFIG_SND_INDIGO is not set\n# CONFIG_SND_INDIGOIO is not set\n# CONFIG_SND_INDIGODJ is not set\n# CONFIG_SND_INDIGOIOX is not set\n# CONFIG_SND_INDIGODJX is not set\n# CONFIG_SND_EMU10K1 is not set\n# CONFIG_SND_EMU10K1X is not set\n# CONFIG_SND_ENS1370 is not set\n# CONFIG_SND_ENS1371 is not set\n# CONFIG_SND_ES1938 is not set\n# CONFIG_SND_ES1968 is not set\n# CONFIG_SND_FM801 is not set\n# CONFIG_SND_HDSP is not set\n# CONFIG_SND_HDSPM is not set\n# CONFIG_SND_ICE1712 is not set\n# CONFIG_SND_ICE1724 is not set\n# CONFIG_SND_INTEL8X0 is not set\n# CONFIG_SND_INTEL8X0M is not set\n# CONFIG_SND_KORG1212 is not set\n# CONFIG_SND_LOLA is not set\n# CONFIG_SND_LX6464ES is not set\n# CONFIG_SND_MAESTRO3 is not set\n# CONFIG_SND_MIXART is not set\n# CONFIG_SND_NM256 is not set\n# CONFIG_SND_PCXHR is not set\n# CONFIG_SND_RIPTIDE is not set\n# CONFIG_SND_RME32 is not set\n# CONFIG_SND_RME96 is not set\n# CONFIG_SND_RME9652 is not set\n# CONFIG_SND_SE6X is not set\n# CONFIG_SND_SONICVIBES is not set\n# CONFIG_SND_TRIDENT is not set\n# CONFIG_SND_VIA82XX is not set\n# CONFIG_SND_VIA82XX_MODEM is not set\n# CONFIG_SND_VIRTUOSO is not set\n# CONFIG_SND_VX222 is not set\n# CONFIG_SND_YMFPCI is not set\n\n#\n# HD-Audio\n#\n# CONFIG_SND_HDA_INTEL is not set\nCONFIG_SND_HDA_PREALLOC_SIZE=64\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=y\nCONFIG_SND_USB_UA101=m\nCONFIG_SND_USB_CAIAQ=m\nCONFIG_SND_USB_CAIAQ_INPUT=y\nCONFIG_SND_USB_6FIRE=m\nCONFIG_SND_USB_HIFACE=m\nCONFIG_SND_BCD2000=m\nCONFIG_SND_USB_LINE6=m\nCONFIG_SND_USB_POD=m\nCONFIG_SND_USB_PODHD=m\nCONFIG_SND_USB_TONEPORT=m\nCONFIG_SND_USB_VARIAX=m\nCONFIG_SND_SOC=y\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU7002 is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4554 is not set\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_ES8328 is not set\nCONFIG_SND_SOC_ES8388=y\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM179X_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\nCONFIG_SND_SOC_RL6231=y\n# CONFIG_SND_SOC_RT5616 is not set\n# CONFIG_SND_SOC_RT5631 is not set\nCONFIG_SND_SOC_RT5651=y\n# CONFIG_SND_SOC_RT5677_SPI is not set\n# CONFIG_SND_SOC_SGTL5000 is not set\n# CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set\nCONFIG_SND_SOC_SPDIF=m\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC3X is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731 is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8960 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\nCONFIG_AMLOGIC_SND_SOC_CODECS=y\nCONFIG_AMLOGIC_SND_CODEC_DUMMY_CODEC=y\nCONFIG_AMLOGIC_SND_CODEC_PCM2BT=y\nCONFIG_AMLOGIC_SND_CODEC_PDM_DUMMY_CODEC=y\nCONFIG_AMLOGIC_SND_CODEC_AMLT9015=y\n# CONFIG_AMLOGIC_SND_CODEC_AMLT9015S is not set\n# CONFIG_AMLOGIC_SND_CODEC_PMU3 is not set\n# CONFIG_AMLOGIC_SND_SOC_TAS5805 is not set\nCONFIG_AMLOGIC_SND_CODEC_TXLX_ACODEC=y\n# CONFIG_AMLOGIC_SND_CODEC_TL1_ACODEC is not set\n# CONFIG_AMLOGIC_SND_SOC_TAS5782M is not set\nCONFIG_AMLOGIC_SND_SOC_TAS5707=y\nCONFIG_AMLOGIC_SND_SOC_ES8316=y\nCONFIG_AMLOGIC_SND_SOC_TLV320ADC3101=y\nCONFIG_AMLOGIC_SND_SOC_PCM186X=y\nCONFIG_AMLOGIC_SND_SOC_SSM3525=y\nCONFIG_AMLOGIC_SND_SOC_SSM3515=y\nCONFIG_AMLOGIC_SND_SOC_TAS575X=y\n# CONFIG_AMLOGIC_SND_SOC_ES7243 is not set\nCONFIG_AMLOGIC_SND_SOC_AD82584F=y\n# CONFIG_AMLOGIC_SND_SOC_CS42528 is not set\n# CONFIG_SND_SIMPLE_CARD is not set\n# CONFIG_SND_SIMPLE_SCU_CARD is not set\nCONFIG_AMLOGIC_SND_SOC=y\nCONFIG_AMLOGIC_SND_SOC_MESON=y\nCONFIG_AMLOGIC_SND_SOC_AUGE=y\nCONFIG_AMLOGIC_SND_SPLIT_MODE=y\nCONFIG_AMLOGIC_SND_SPLIT_MODE_MMAP=y\nCONFIG_AMLOGIC_SND_SOC_COMMON=y\n# CONFIG_SOUND_PRIME is not set\nCONFIG_AC97_BUS=m\n\n#\n# HID support\n#\nCONFIG_HID=y\nCONFIG_HID_BATTERY_STRENGTH=y\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=m\nCONFIG_HID_ACRUX=m\nCONFIG_HID_ACRUX_FF=y\nCONFIG_HID_APPLE=m\nCONFIG_HID_APPLEIR=m\nCONFIG_HID_AUREAL=m\nCONFIG_HID_BELKIN=m\nCONFIG_HID_BETOP_FF=m\nCONFIG_HID_CHERRY=m\nCONFIG_HID_CHICONY=m\nCONFIG_HID_CORSAIR=m\nCONFIG_HID_PRODIKEYS=m\nCONFIG_HID_CMEDIA=m\nCONFIG_HID_CP2112=m\nCONFIG_HID_CYPRESS=m\nCONFIG_HID_DRAGONRISE=m\nCONFIG_DRAGONRISE_FF=y\nCONFIG_HID_EMS_FF=m\nCONFIG_HID_ELECOM=m\nCONFIG_HID_ELO=m\nCONFIG_HID_EZKEY=m\nCONFIG_HID_GEMBIRD=m\nCONFIG_HID_GFRM=m\nCONFIG_HID_HOLTEK=m\nCONFIG_HOLTEK_FF=y\nCONFIG_HID_GT683R=m\nCONFIG_HID_KEYTOUCH=m\nCONFIG_HID_KYE=m\nCONFIG_HID_UCLOGIC=m\nCONFIG_HID_WALTOP=m\nCONFIG_HID_GYRATION=m\nCONFIG_HID_ICADE=m\nCONFIG_HID_TWINHAN=m\nCONFIG_HID_KENSINGTON=m\nCONFIG_HID_LCPOWER=m\nCONFIG_HID_LED=m\nCONFIG_HID_LENOVO=m\nCONFIG_HID_LOGITECH=m\nCONFIG_HID_LOGITECH_DJ=m\nCONFIG_HID_LOGITECH_HIDPP=m\nCONFIG_LOGITECH_FF=y\nCONFIG_LOGIRUMBLEPAD2_FF=y\nCONFIG_LOGIG940_FF=y\n# CONFIG_LOGIWHEELS_FF is not set\nCONFIG_HID_MAGICMOUSE=m\nCONFIG_HID_MICROSOFT=m\nCONFIG_HID_MONTEREY=m\nCONFIG_HID_MULTITOUCH=m\n# CONFIG_HID_NINTENDO is not set\nCONFIG_HID_NTRIG=m\nCONFIG_HID_ORTEK=m\nCONFIG_HID_PANTHERLORD=m\nCONFIG_PANTHERLORD_FF=y\nCONFIG_HID_PENMOUNT=m\nCONFIG_HID_PETALYNX=m\nCONFIG_HID_PICOLCD=m\nCONFIG_HID_PICOLCD_FB=y\nCONFIG_HID_PICOLCD_BACKLIGHT=y\nCONFIG_HID_PICOLCD_LCD=y\nCONFIG_HID_PICOLCD_LEDS=y\nCONFIG_HID_PICOLCD_CIR=y\nCONFIG_HID_PLANTRONICS=m\nCONFIG_HID_PLAYSTATION=m\n# CONFIG_PLAYSTATION_FF is not set\nCONFIG_HID_PRIMAX=m\nCONFIG_HID_ROCCAT=m\nCONFIG_HID_SAITEK=m\nCONFIG_HID_SAMSUNG=m\nCONFIG_HID_SONY=m\nCONFIG_SONY_FF=y\nCONFIG_HID_SPEEDLINK=m\nCONFIG_HID_STEAM=m\nCONFIG_HID_STEELSERIES=m\nCONFIG_HID_SUNPLUS=m\nCONFIG_HID_RMI=m\nCONFIG_HID_GREENASIA=m\nCONFIG_GREENASIA_FF=y\nCONFIG_HID_SMARTJOYPLUS=m\nCONFIG_SMARTJOYPLUS_FF=y\nCONFIG_HID_TIVO=m\nCONFIG_HID_TOPSEED=m\nCONFIG_HID_THINGM=m\nCONFIG_HID_THRUSTMASTER=m\nCONFIG_THRUSTMASTER_FF=y\nCONFIG_HID_WACOM=m\nCONFIG_HID_WIIMOTE=m\nCONFIG_HID_XINMO=m\nCONFIG_HID_XPADNEO=m\nCONFIG_HID_ZEROPLUS=m\nCONFIG_ZEROPLUS_FF=y\nCONFIG_HID_ZYDACRON=m\nCONFIG_HID_SENSOR_HUB=m\nCONFIG_HID_SENSOR_CUSTOM_SENSOR=m\nCONFIG_HID_ALPS=m\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID is not set\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_DYNAMIC_MINORS is not set\n# CONFIG_USB_OTG is not set\n# CONFIG_USB_OTG_WHITELIST is not set\n# CONFIG_USB_OTG_BLACKLIST_HUB is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\n# CONFIG_USB_MON is not set\n# CONFIG_USB_WUSB_CBAF is not set\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\nCONFIG_USB_XHCI_PCI=y\nCONFIG_USB_XHCI_PLATFORM=y\nCONFIG_USB_EHCI_HCD=y\n# CONFIG_USB_EHCI_ROOT_HUB_TT is not set\nCONFIG_USB_EHCI_TT_NEWSCHED=y\nCONFIG_USB_EHCI_PCI=y\n# CONFIG_USB_EHCI_HCD_PLATFORM is not set\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_ISP1362_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\nCONFIG_USB_OHCI_HCD=y\nCONFIG_USB_OHCI_HCD_PCI=y\n# CONFIG_USB_OHCI_HCD_PLATFORM is not set\n# CONFIG_USB_UHCI_HCD is not set\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=y\n# CONFIG_USB_PRINTER is not set\nCONFIG_USB_WDM=m\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\n# CONFIG_USB_UAS is not set\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_MUSB_HDRC is not set\nCONFIG_USB_DWC3=y\nCONFIG_USB_DWC3_HOST=y\n# CONFIG_USB_DWC3_GADGET is not set\n# CONFIG_USB_DWC3_DUAL_ROLE is not set\n\n#\n# Platform Glue Driver Support\n#\nCONFIG_USB_DWC3_PCI=y\nCONFIG_USB_DWC3_OF_SIMPLE=y\n# CONFIG_USB_DWC2 is not set\n# CONFIG_USB_CHIPIDEA is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=y\nCONFIG_USB_SERIAL_CONSOLE=y\nCONFIG_USB_SERIAL_GENERIC=y\nCONFIG_USB_SERIAL_SIMPLE=m\nCONFIG_USB_SERIAL_AIRCABLE=m\nCONFIG_USB_SERIAL_ARK3116=m\nCONFIG_USB_SERIAL_BELKIN=m\nCONFIG_USB_SERIAL_CH341=m\nCONFIG_USB_SERIAL_WHITEHEAT=m\nCONFIG_USB_SERIAL_DIGI_ACCELEPORT=m\nCONFIG_USB_SERIAL_CP210X=m\nCONFIG_USB_SERIAL_CYPRESS_M8=m\nCONFIG_USB_SERIAL_EMPEG=m\nCONFIG_USB_SERIAL_FTDI_SIO=m\nCONFIG_USB_SERIAL_VISOR=m\nCONFIG_USB_SERIAL_IPAQ=m\nCONFIG_USB_SERIAL_IR=m\nCONFIG_USB_SERIAL_EDGEPORT=m\nCONFIG_USB_SERIAL_EDGEPORT_TI=m\nCONFIG_USB_SERIAL_F81232=m\nCONFIG_USB_SERIAL_GARMIN=m\nCONFIG_USB_SERIAL_IPW=m\nCONFIG_USB_SERIAL_IUU=m\nCONFIG_USB_SERIAL_KEYSPAN_PDA=m\nCONFIG_USB_SERIAL_KEYSPAN=m\nCONFIG_USB_SERIAL_KEYSPAN_MPR=y\nCONFIG_USB_SERIAL_KEYSPAN_USA28=y\nCONFIG_USB_SERIAL_KEYSPAN_USA28X=y\nCONFIG_USB_SERIAL_KEYSPAN_USA28XA=y\nCONFIG_USB_SERIAL_KEYSPAN_USA28XB=y\nCONFIG_USB_SERIAL_KEYSPAN_USA19=y\nCONFIG_USB_SERIAL_KEYSPAN_USA18X=y\nCONFIG_USB_SERIAL_KEYSPAN_USA19W=y\nCONFIG_USB_SERIAL_KEYSPAN_USA19QW=y\nCONFIG_USB_SERIAL_KEYSPAN_USA19QI=y\nCONFIG_USB_SERIAL_KEYSPAN_USA49W=y\nCONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y\nCONFIG_USB_SERIAL_KLSI=m\nCONFIG_USB_SERIAL_KOBIL_SCT=m\nCONFIG_USB_SERIAL_MCT_U232=m\nCONFIG_USB_SERIAL_METRO=m\nCONFIG_USB_SERIAL_MOS7720=m\nCONFIG_USB_SERIAL_MOS7840=m\nCONFIG_USB_SERIAL_MXUPORT=m\nCONFIG_USB_SERIAL_NAVMAN=m\nCONFIG_USB_SERIAL_PL2303=m\nCONFIG_USB_SERIAL_OTI6858=m\nCONFIG_USB_SERIAL_QCAUX=m\nCONFIG_USB_SERIAL_QUALCOMM=m\nCONFIG_USB_SERIAL_SPCP8X5=m\nCONFIG_USB_SERIAL_SAFE=m\nCONFIG_USB_SERIAL_SAFE_PADDED=y\nCONFIG_USB_SERIAL_SIERRAWIRELESS=m\nCONFIG_USB_SERIAL_SYMBOL=m\nCONFIG_USB_SERIAL_TI=m\nCONFIG_USB_SERIAL_CYBERJACK=m\nCONFIG_USB_SERIAL_XIRCOM=m\nCONFIG_USB_SERIAL_WWAN=m\nCONFIG_USB_SERIAL_OPTION=m\nCONFIG_USB_SERIAL_OMNINET=m\nCONFIG_USB_SERIAL_OPTICON=m\nCONFIG_USB_SERIAL_XSENS_MT=m\nCONFIG_USB_SERIAL_WISHBONE=m\nCONFIG_USB_SERIAL_SSU100=m\nCONFIG_USB_SERIAL_QT2=m\nCONFIG_USB_SERIAL_DEBUG=m\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\nCONFIG_USB_EZUSB_FX2=m\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\n# CONFIG_USB_OTG_WAKELOCK is not set\n# CONFIG_NOP_USB_XCEIV is not set\n# CONFIG_USB_GPIO_VBUS is not set\nCONFIG_USB_ISP1301=y\n# CONFIG_USB_ULPI is not set\n# CONFIG_DUAL_ROLE_USB_INTF is not set\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\n# CONFIG_USB_GADGET_DEBUG_FILES is not set\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=2\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\n# CONFIG_USB_M66592 is not set\n# CONFIG_USB_BDC_UDC is not set\n# CONFIG_USB_AMD5536UDC is not set\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_NET2280 is not set\n# CONFIG_USB_GOKU is not set\n# CONFIG_USB_EG20T is not set\n# CONFIG_USB_GADGET_XILINX is not set\n# CONFIG_USB_DUMMY_HCD is not set\nCONFIG_USB_LIBCOMPOSITE=y\nCONFIG_USB_U_ETHER=y\nCONFIG_USB_F_RNDIS=y\nCONFIG_USB_F_FS=y\nCONFIG_USB_F_MIDI=y\nCONFIG_USB_F_MTP=y\nCONFIG_USB_F_PTP=y\nCONFIG_USB_F_AUDIO_SRC=y\nCONFIG_USB_F_ACC=y\nCONFIG_USB_CONFIGFS=y\n# CONFIG_USB_CONFIGFS_SERIAL is not set\n# CONFIG_USB_CONFIGFS_ACM is not set\n# CONFIG_USB_CONFIGFS_OBEX is not set\n# CONFIG_USB_CONFIGFS_NCM is not set\n# CONFIG_USB_CONFIGFS_ECM is not set\n# CONFIG_USB_CONFIGFS_ECM_SUBSET is not set\nCONFIG_USB_CONFIGFS_RNDIS=y\n# CONFIG_USB_CONFIGFS_EEM is not set\n# CONFIG_USB_CONFIGFS_MASS_STORAGE is not set\n# CONFIG_USB_CONFIGFS_F_LB_SS is not set\nCONFIG_USB_CONFIGFS_F_FS=y\nCONFIG_USB_CONFIGFS_F_MTP=y\nCONFIG_USB_CONFIGFS_F_PTP=y\nCONFIG_USB_CONFIGFS_F_ACC=y\nCONFIG_USB_CONFIGFS_F_AUDIO_SRC=y\nCONFIG_USB_CONFIGFS_UEVENT=y\n# CONFIG_USB_CONFIGFS_F_UAC1 is not set\n# CONFIG_USB_CONFIGFS_F_UAC2 is not set\nCONFIG_USB_CONFIGFS_F_MIDI=y\n# CONFIG_USB_CONFIGFS_F_HID is not set\n# CONFIG_USB_CONFIGFS_F_UVC is not set\n# CONFIG_USB_CONFIGFS_F_PRINTER is not set\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_USB_ULPI_BUS is not set\n# CONFIG_UWB is not set\nCONFIG_MMC=y\n# CONFIG_MMC_DEBUG is not set\nCONFIG_PWRSEQ_EMMC=y\nCONFIG_PWRSEQ_SIMPLE=y\n# CONFIG_MMC_EMBEDDED_SDIO is not set\n# CONFIG_MMC_PARANOID_SD_INIT is not set\n\n#\n# MMC/SD/SDIO Card Drivers\n#\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\nCONFIG_MMC_BLOCK_BOUNCE=y\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n# CONFIG_MMC_SIMULATE_MAX_SPEED is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\nCONFIG_MMC_ARMMMCI=y\n# CONFIG_MMC_SDHCI is not set\n# CONFIG_MMC_TIFM_SD is not set\n# CONFIG_MMC_SPI is not set\n# CONFIG_MMC_CB710 is not set\n# CONFIG_MMC_VIA_SDMMC is not set\n# CONFIG_MMC_DW is not set\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\n# CONFIG_MMC_TOSHIBA_PCI is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\n# CONFIG_LEDS_CLASS_FLASH is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP5521 is not set\n# CONFIG_LEDS_LP5523 is not set\n# CONFIG_LEDS_LP5562 is not set\n# CONFIG_LEDS_LP8501 is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\nCONFIG_LEDS_PWM=y\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\nCONFIG_LEDS_IS31FL32XX=m\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_SYSCON is not set\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\nCONFIG_LEDS_TRIGGER_TIMER=y\nCONFIG_LEDS_TRIGGER_ONESHOT=y\n# CONFIG_LEDS_TRIGGER_DISK is not set\n# CONFIG_LEDS_TRIGGER_MTD is not set\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\nCONFIG_LEDS_TRIGGER_BACKLIGHT=y\nCONFIG_LEDS_TRIGGER_CPU=y\nCONFIG_LEDS_TRIGGER_GPIO=y\nCONFIG_LEDS_TRIGGER_DEFAULT_ON=y\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\nCONFIG_LEDS_TRIGGER_TRANSIENT=y\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\nCONFIG_LEDS_TRIGGER_PANIC=y\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_SUPPORT=y\n# CONFIG_EDAC is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\nCONFIG_RTC_DRV_HYM8563=y\nCONFIG_RTC_DRV_HYM8563_SHW_PATCH=y\n# CONFIG_RTC_DRV_MAX6900 is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\nCONFIG_RTC_DRV_PCF8563=y\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\n# CONFIG_RTC_DRV_DS3232 is not set\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\n# CONFIG_RTC_DRV_PL031 is not set\n# CONFIG_RTC_DRV_SNVS is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set\n# CONFIG_DMADEVICES is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\nCONFIG_SW_SYNC=y\n# CONFIG_AUXDISPLAY is not set\nCONFIG_UIO=y\n# CONFIG_UIO_CIF is not set\nCONFIG_UIO_PDRV_GENIRQ=y\n# CONFIG_UIO_DMEM_GENIRQ is not set\n# CONFIG_UIO_AEC is not set\n# CONFIG_UIO_SERCOS3 is not set\n# CONFIG_UIO_PCI_GENERIC is not set\n# CONFIG_UIO_NETX is not set\n# CONFIG_UIO_PRUSS is not set\n# CONFIG_UIO_MF624 is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\nCONFIG_VIRTIO=y\n\n#\n# Virtio drivers\n#\n# CONFIG_VIRTIO_PCI is not set\n# CONFIG_VIRTIO_BALLOON is not set\n# CONFIG_VIRTIO_INPUT is not set\nCONFIG_VIRTIO_MMIO=y\n# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set\n\n#\n# Microsoft Hyper-V guest support\n#\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_COMEDI is not set\n# CONFIG_RTL8192U is not set\nCONFIG_RTLLIB=m\nCONFIG_RTLLIB_CRYPTO_CCMP=m\nCONFIG_RTLLIB_CRYPTO_TKIP=m\nCONFIG_RTLLIB_CRYPTO_WEP=m\n# CONFIG_RTL8192E is not set\nCONFIG_R8712U=m\n# CONFIG_R8188EU is not set\n# CONFIG_RTS5208 is not set\n# CONFIG_VT6655 is not set\n# CONFIG_VT6656 is not set\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADIS16240 is not set\n# CONFIG_SCA3000 is not set\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7606 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7816 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7280 is not set\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7152 is not set\n# CONFIG_AD7746 is not set\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16060 is not set\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n\n#\n# Light sensors\n#\n# CONFIG_SENSORS_ISL29018 is not set\n# CONFIG_SENSORS_ISL29028 is not set\n# CONFIG_TSL2583 is not set\n# CONFIG_TSL2x7x is not set\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7753 is not set\n# CONFIG_ADE7754 is not set\n# CONFIG_ADE7758 is not set\n# CONFIG_ADE7759 is not set\n# CONFIG_ADE7854 is not set\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1200 is not set\n# CONFIG_AD2S1210 is not set\n\n#\n# Triggers - standalone\n#\n# CONFIG_FB_SM750 is not set\n# CONFIG_FB_XGI is not set\n\n#\n# Speakup console speech\n#\n# CONFIG_SPEAKUP is not set\nCONFIG_STAGING_MEDIA=y\n# CONFIG_MEDIA_CEC is not set\n# CONFIG_DVB_CXD2099 is not set\nCONFIG_LIRC_STAGING=y\n# CONFIG_LIRC_BT829 is not set\n# CONFIG_LIRC_IMON is not set\n# CONFIG_LIRC_SASEM is not set\n# CONFIG_LIRC_SERIAL is not set\n# CONFIG_LIRC_SIR is not set\n# CONFIG_LIRC_ZILOG is not set\n\n#\n# Android\n#\n# CONFIG_ASHMEM is not set\n# CONFIG_ANDROID_LOGGER is not set\n# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set\n# CONFIG_ANDROID_VSOC is not set\nCONFIG_ION=y\n# CONFIG_ION_TEST is not set\n# CONFIG_ION_DUMMY is not set\n# CONFIG_ION_OF is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_MTD_SPINAND_MT29F is not set\n# CONFIG_LNET is not set\n# CONFIG_DGNC is not set\n# CONFIG_GS_FPGABOOT is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\nCONFIG_FB_TFT=m\nCONFIG_FB_TFT_AGM1264K_FL=m\nCONFIG_FB_TFT_BD663474=m\nCONFIG_FB_TFT_HX8340BN=m\nCONFIG_FB_TFT_HX8347D=m\nCONFIG_FB_TFT_HX8353D=m\nCONFIG_FB_TFT_HX8357D=m\nCONFIG_FB_TFT_ILI9163=m\nCONFIG_FB_TFT_ILI9320=m\nCONFIG_FB_TFT_ILI9325=m\nCONFIG_FB_TFT_ILI9340=m\nCONFIG_FB_TFT_ILI9341=m\nCONFIG_FB_TFT_ILI9481=m\nCONFIG_FB_TFT_ILI9486=m\nCONFIG_FB_TFT_PCD8544=m\nCONFIG_FB_TFT_RA8875=m\nCONFIG_FB_TFT_S6D02A1=m\nCONFIG_FB_TFT_S6D1121=m\nCONFIG_FB_TFT_SSD1289=m\nCONFIG_FB_TFT_SSD1305=m\nCONFIG_FB_TFT_SSD1306=m\nCONFIG_FB_TFT_SSD1325=m\nCONFIG_FB_TFT_SSD1331=m\nCONFIG_FB_TFT_SSD1351=m\nCONFIG_FB_TFT_ST7735R=m\nCONFIG_FB_TFT_ST7789V=m\nCONFIG_FB_TFT_TINYLCD=m\nCONFIG_FB_TFT_TLS8204=m\nCONFIG_FB_TFT_UC1611=m\nCONFIG_FB_TFT_UC1701=m\nCONFIG_FB_TFT_UPD161704=m\nCONFIG_FB_TFT_WATTEROTT=m\nCONFIG_FB_FLEX=m\nCONFIG_FB_TFT_FBTFT_DEVICE=m\n# CONFIG_FSL_MC_BUS is not set\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\n# CONFIG_MOST is not set\n# CONFIG_KS7010 is not set\n# CONFIG_GREYBUS is not set\n# CONFIG_GOLDFISH is not set\n# CONFIG_CHROME_PLATFORMS is not set\nCONFIG_CLKDEV_LOOKUP=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Common Clock Framework\n#\n# CONFIG_COMMON_CLK_VERSATILE is not set\n# CONFIG_COMMON_CLK_SCPI is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\n# CONFIG_CLK_QORIQ is not set\nCONFIG_COMMON_CLK_XGENE=y\n# CONFIG_COMMON_CLK_NXP is not set\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_PXA is not set\n# CONFIG_COMMON_CLK_PIC32 is not set\n\n#\n# Hardware Spinlock drivers\n#\n\n#\n# Clock Source drivers\n#\nCONFIG_CLKSRC_OF=y\nCONFIG_CLKSRC_PROBE=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\n# CONFIG_ARM_ARCH_TIMER_VCT_ACCESS is not set\nCONFIG_FSL_ERRATUM_A008585=y\n# CONFIG_ARM_TIMER_SP804 is not set\n# CONFIG_ATMEL_PIT is not set\n# CONFIG_SH_TIMER_CMT is not set\n# CONFIG_SH_TIMER_MTU2 is not set\n# CONFIG_SH_TIMER_TMU is not set\n# CONFIG_EM_TIMER_STI is not set\nCONFIG_MAILBOX=y\n# CONFIG_ARM_MHU is not set\n# CONFIG_PLATFORM_MHU is not set\n# CONFIG_PL320_MBOX is not set\n# CONFIG_ALTERA_MBOX is not set\n# CONFIG_MAILBOX_TEST is not set\n# CONFIG_BCM_PDC_MBOX is not set\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\n# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set\n# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set\nCONFIG_IOMMU_IOVA=y\nCONFIG_OF_IOMMU=y\nCONFIG_IOMMU_DMA=y\n# CONFIG_ARM_SMMU is not set\n# CONFIG_ARM_SMMU_V3 is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_STE_MODEM_RPROC is not set\n\n#\n# Rpmsg drivers\n#\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Broadcom SoC drivers\n#\n# CONFIG_SUNXI_SRAM is not set\n# CONFIG_SOC_TI is not set\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y\nCONFIG_DEVFREQ_GOV_PERFORMANCE=y\nCONFIG_DEVFREQ_GOV_POWERSAVE=y\nCONFIG_DEVFREQ_GOV_USERSPACE=y\n# CONFIG_DEVFREQ_GOV_PASSIVE is not set\n\n#\n# DEVFREQ Drivers\n#\n# CONFIG_PM_DEVFREQ_EVENT is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_QCOM_SPMI_MISC is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\n# CONFIG_EXTCON_USB_GPIO is not set\n# CONFIG_MEMORY is not set\nCONFIG_IIO=y\nCONFIG_IIO_BUFFER=y\n# CONFIG_IIO_BUFFER_CB is not set\nCONFIG_IIO_KFIFO_BUF=y\n# CONFIG_IIO_CONFIGFS is not set\n# CONFIG_IIO_TRIGGER is not set\n# CONFIG_IIO_SW_DEVICE is not set\n# CONFIG_IIO_SW_TRIGGER is not set\n\n#\n# Accelerometers\n#\n# CONFIG_BMA180 is not set\n# CONFIG_BMA220 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_DMARD06 is not set\n# CONFIG_DMARD09 is not set\n# CONFIG_HID_SENSOR_ACCEL_3D is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MC3230 is not set\n# CONFIG_MMA7455_I2C is not set\n# CONFIG_MMA7455_SPI is not set\n# CONFIG_MMA7660 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_MXC6255 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7266 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD799X is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_HI8435 is not set\n# CONFIG_INA2XX_ADC is not set\n# CONFIG_LTC2485 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_NAU7802 is not set\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC0832 is not set\n# CONFIG_TI_ADC12138 is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_TI_ADC161S626 is not set\n# CONFIG_TI_ADS1015 is not set\n# CONFIG_TI_ADS8688 is not set\n# CONFIG_VF610_ADC is not set\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n\n#\n# Chemical Sensors\n#\n# CONFIG_ATLAS_PH_SENSOR is not set\n# CONFIG_IAQCORE is not set\n# CONFIG_VZ89X is not set\n\n#\n# Hid Sensor IIO Common\n#\n# CONFIG_HID_SENSOR_IIO_COMMON is not set\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5592R is not set\n# CONFIG_AD5593R is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_AD5686 is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5761 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_AD8801 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n# CONFIG_VF610_DAC is not set\n\n#\n# IIO dummy driver\n#\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_HID_SENSOR_GYRO_3D is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n\n#\n# Health Sensors\n#\n\n#\n# Heart Rate Monitors\n#\n# CONFIG_AFE4403 is not set\n# CONFIG_AFE4404 is not set\n# CONFIG_MAX30100 is not set\n\n#\n# Humidity sensors\n#\n# CONFIG_AM2315 is not set\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_BMI160_I2C is not set\n# CONFIG_BMI160_SPI is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_MPU6050_I2C is not set\n# CONFIG_INV_MPU6050_SPI is not set\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_BH1780 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM36651 is not set\n# CONFIG_GP2AP020A00F is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_HID_SENSOR_ALS is not set\n# CONFIG_HID_SENSOR_PROX is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_MAX44000 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_SI1145 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\n# CONFIG_SENSORS_TSL2563 is not set\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VEML6070 is not set\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8974 is not set\n# CONFIG_AK8975 is not set\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN_I2C is not set\n# CONFIG_BMC150_MAGN_SPI is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_HID_SENSOR_MAGNETOMETER_3D is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n\n#\n# Inclinometer sensors\n#\n# CONFIG_HID_SENSOR_INCLINOMETER_3D is not set\n# CONFIG_HID_SENSOR_DEVICE_ROTATION is not set\n\n#\n# Digital potentiometers\n#\n# CONFIG_DS1803 is not set\n# CONFIG_MAX5487 is not set\n# CONFIG_MCP4131 is not set\n# CONFIG_MCP4531 is not set\n# CONFIG_TPL0102 is not set\n\n#\n# Pressure sensors\n#\n# CONFIG_BMP280 is not set\n# CONFIG_HID_SENSOR_PRESS is not set\n# CONFIG_HP03 is not set\n# CONFIG_MPL115_I2C is not set\n# CONFIG_MPL115_SPI is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n# CONFIG_HP206C is not set\n# CONFIG_ZPA2326 is not set\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n\n#\n# Proximity sensors\n#\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_SX9500 is not set\n\n#\n# Temperature sensors\n#\n# CONFIG_MAXIM_THERMOCOUPLE is not set\n# CONFIG_MLX90614 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\n# CONFIG_NTB is not set\n# CONFIG_VME_BUS is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_FSL_FTM is not set\nCONFIG_PWM_GPIO=y\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\nCONFIG_ARM_GIC_V2M=y\nCONFIG_ARM_GIC_V3=y\nCONFIG_ARM_GIC_V3_ITS=y\nCONFIG_PARTITION_PERCPU=y\n# CONFIG_IPACK_BUS is not set\nCONFIG_RESET_CONTROLLER=y\nCONFIG_GPIO_RESET_CONTROLLER=y\n# CONFIG_RESET_ATH79 is not set\n# CONFIG_RESET_BERLIN is not set\n# CONFIG_RESET_LPC18XX is not set\n# CONFIG_RESET_MESON is not set\n# CONFIG_RESET_PISTACHIO is not set\n# CONFIG_RESET_SOCFPGA is not set\n# CONFIG_RESET_STM32 is not set\n# CONFIG_RESET_SUNXI is not set\n# CONFIG_TI_SYSCON_RESET is not set\n# CONFIG_RESET_ZYNQ is not set\n# CONFIG_FMC is not set\n\n#\n# PHY Subsystem\n#\n# CONFIG_GENERIC_PHY is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# CONFIG_PHY_XGENE is not set\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\nCONFIG_ARM_PMU=y\nCONFIG_RAS=y\n# CONFIG_THUNDERBOLT is not set\n\n#\n# Android\n#\nCONFIG_ANDROID=y\n# CONFIG_ANDROID_BINDER_IPC is not set\n# CONFIG_LIBNVDIMM is not set\nCONFIG_NVMEM=y\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n\n#\n# FPGA Configuration Support\n#\n# CONFIG_FPGA is not set\n# CONFIG_TEE is not set\n\n#\n# Bootloader Drivers\n#\nCONFIG_BL301_MANAGER=y\n\n#\n# Firmware Drivers\n#\nCONFIG_ARM_PSCI_FW=y\nCONFIG_ARM_SCPI_POWER_DOMAIN=y\n# CONFIG_FIRMWARE_MEMMAP is not set\n# CONFIG_FW_CFG_SYSFS is not set\nCONFIG_HAVE_ARM_SMCCC=y\n# CONFIG_MESON_SM is not set\n# CONFIG_ACPI is not set\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_ENCRYPTION is not set\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_NILFS2_FS is not set\n# CONFIG_F2FS_FS is not set\n# CONFIG_FS_DAX is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=m\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\nCONFIG_MANDATORY_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\n# CONFIG_FANOTIFY_ACCESS_PERMISSIONS is not set\nCONFIG_QUOTA=y\n# CONFIG_QUOTA_NETLINK_INTERFACE is not set\nCONFIG_PRINT_QUOTA_WARNING=y\n# CONFIG_QUOTA_DEBUG is not set\nCONFIG_QUOTA_TREE=y\n# CONFIG_QFMT_V1 is not set\nCONFIG_QFMT_V2=y\nCONFIG_QUOTACTL=y\nCONFIG_AUTOFS4_FS=y\nCONFIG_FUSE_FS=m\n# CONFIG_CUSE is not set\nCONFIG_OVERLAY_FS=m\n\n#\n# Caches\n#\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_HISTOGRAM is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_FSCACHE_OBJECT_LIST is not set\n# CONFIG_CACHEFILES is not set\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=y\nCONFIG_UDF_NLS=y\n\n#\n# DOS/FAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=936\nCONFIG_FAT_DEFAULT_IOCHARSET=\"utf8\"\nCONFIG_FAT_DEFAULT_UTF8=y\nCONFIG_EXFAT_FS=y\nCONFIG_EXFAT_DEFAULT_CODEPAGE=936\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\nCONFIG_EXFAT_VIRTUAL_XATTR=y\nCONFIG_EXFAT_VIRTUAL_XATTR_SELINUX_LABEL=\"u:object_r:exfat:s0\"\n# CONFIG_EXFAT_DEBUG is not set\n# CONFIG_EXFAT_UEVENT is not set\n# CONFIG_NTFS_FS is not set\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\n# CONFIG_PROC_KCORE is not set\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_PROC_UID=y\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_HUGETLBFS is not set\n# CONFIG_HUGETLB_PAGE is not set\nCONFIG_ARCH_HAS_GIGANTIC_PAGE=y\nCONFIG_CONFIGFS_FS=y\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\n# CONFIG_SDCARD_FS is not set\nCONFIG_HFS_FS=y\nCONFIG_HFSPLUS_FS=y\n# CONFIG_HFSPLUS_FS_POSIX_ACL is not set\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_JFFS2_FS is not set\n# CONFIG_UBIFS_FS is not set\n# CONFIG_LOGFS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\nCONFIG_SQUASHFS_FILE_CACHE=y\n# CONFIG_SQUASHFS_FILE_DIRECT is not set\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\n# CONFIG_PSTORE is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EXOFS_FS is not set\nCONFIG_ORE=m\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\nCONFIG_NFS_SWAP=y\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_PNFS_OBJLAYOUT=m\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\nCONFIG_NFS_V4_1_MIGRATION=y\nCONFIG_NFS_V4_SECURITY_LABEL=y\nCONFIG_ROOT_NFS=y\nCONFIG_NFS_FSCACHE=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFSD=m\nCONFIG_NFSD_V3=y\n# CONFIG_NFSD_V3_ACL is not set\n# CONFIG_NFSD_V4 is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_COMMON=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\nCONFIG_SUNRPC_SWAP=y\nCONFIG_RPCSEC_GSS_KRB5=m\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS=y\nCONFIG_CIFS_STATS2=y\n# CONFIG_CIFS_WEAK_PW_HASH is not set\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\n# CONFIG_CIFS_DEBUG is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\nCONFIG_CIFS_SMB2=y\nCONFIG_CIFS_SMB311=y\nCONFIG_CIFS_FSCACHE=y\n# CONFIG_NCP_FS is not set\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\nCONFIG_NLS_CODEPAGE_936=y\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_VIRTUALIZATION is not set\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\n\n#\n# Compile-time checks and compiler options\n#\n# CONFIG_DEBUG_INFO is not set\nCONFIG_ENABLE_WARN_DEPRECATED=y\nCONFIG_ENABLE_MUST_CHECK=y\nCONFIG_FRAME_WARN=0\n# CONFIG_STRIP_ASM_SYMS is not set\n# CONFIG_READABLE_ASM is not set\n# CONFIG_UNUSED_SYMBOLS is not set\n# CONFIG_PAGE_OWNER is not set\nCONFIG_DEBUG_FS=y\n# CONFIG_HEADERS_CHECK is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_DEBUG_KERNEL=y\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_PAGE_REF is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_DEBUG_VM is not set\n# CONFIG_DEBUG_MEMORY_INIT is not set\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_HAVE_ARCH_KASAN=y\n# CONFIG_KASAN is not set\nCONFIG_ARCH_HAS_KCOV=y\n# CONFIG_KCOV is not set\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Lockups and Hangs\n#\nCONFIG_LOCKUP_DETECTOR=y\nCONFIG_HARDLOCKUP_DETECTOR_OTHER_CPU=y\nCONFIG_HARDLOCKUP_DETECTOR=y\n# CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set\nCONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0\n# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set\nCONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0\nCONFIG_DETECT_HUNG_TASK=y\nCONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120\n# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set\nCONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0\nCONFIG_WQ_WATCHDOG=y\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=5\nCONFIG_SCHED_DEBUG=y\nCONFIG_SCHED_INFO=y\nCONFIG_PANIC_ON_RT_THROTTLING=y\nCONFIG_SCHEDSTATS=y\nCONFIG_SCHED_STACK_END_CHECK=y\n# CONFIG_DEBUG_TIMEKEEPING is not set\nCONFIG_TIMER_STATS=y\n# CONFIG_DEBUG_PREEMPT is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\nCONFIG_DEBUG_ATOMIC_SLEEP=y\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\nCONFIG_STACKTRACE=y\n# CONFIG_DEBUG_KOBJECT is not set\nCONFIG_HAVE_DEBUG_BUGVERBOSE=y\n# CONFIG_DEBUG_BUGVERBOSE is not set\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PI_LIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_PROVE_RCU is not set\n# CONFIG_SPARSE_RCU_POINTER is not set\n# CONFIG_TORTURE_TEST is not set\n# CONFIG_RCU_PERF_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_TRACING=y\nCONFIG_GENERIC_TRACER=y\nCONFIG_TRACING_SUPPORT=y\nCONFIG_FTRACE=y\nCONFIG_FUNCTION_TRACER=y\nCONFIG_FUNCTION_GRAPH_TRACER=y\n# CONFIG_PREEMPTIRQ_EVENTS is not set\n# CONFIG_IRQSOFF_TRACER is not set\n# CONFIG_PREEMPT_TRACER is not set\n# CONFIG_SCHED_TRACER is not set\n# CONFIG_HWLAT_TRACER is not set\nCONFIG_FTRACE_SYSCALLS=y\n# CONFIG_TRACER_SNAPSHOT is not set\nCONFIG_BRANCH_PROFILE_NONE=y\n# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set\n# CONFIG_PROFILE_ALL_BRANCHES is not set\nCONFIG_STACK_TRACER=y\n# CONFIG_BLK_DEV_IO_TRACE is not set\n# CONFIG_PROBE_EVENTS is not set\nCONFIG_DYNAMIC_FTRACE=y\nCONFIG_FUNCTION_PROFILER=y\nCONFIG_FTRACE_MCOUNT_RECORD=y\n# CONFIG_FTRACE_STARTUP_TEST is not set\n# CONFIG_TRACEPOINT_BENCHMARK is not set\n# CONFIG_RING_BUFFER_BENCHMARK is not set\n# CONFIG_RING_BUFFER_STARTUP_TEST is not set\n# CONFIG_TRACE_ENUM_MAP_FILE is not set\nCONFIG_TRACING_EVENTS_GPIO=y\n\n#\n# Runtime Testing\n#\n# CONFIG_LKDTM is not set\n# CONFIG_TEST_LIST_SORT is not set\n# CONFIG_BACKTRACE_SELF_TEST is not set\n# CONFIG_RBTREE_TEST is not set\n# CONFIG_INTERVAL_TREE_TEST is not set\n# CONFIG_PERCPU_TEST is not set\n# CONFIG_ATOMIC64_SELFTEST is not set\n# CONFIG_ASYNC_RAID6_TEST is not set\n# CONFIG_TEST_HEXDUMP is not set\n# CONFIG_TEST_STRING_HELPERS is not set\n# CONFIG_TEST_KSTRTOX is not set\n# CONFIG_TEST_PRINTF is not set\n# CONFIG_TEST_BITMAP is not set\n# CONFIG_TEST_UUID is not set\n# CONFIG_TEST_RHASHTABLE is not set\n# CONFIG_TEST_HASH is not set\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_TEST_LKM is not set\n# CONFIG_TEST_USER_COPY is not set\n# CONFIG_TEST_BPF is not set\n# CONFIG_TEST_FIRMWARE is not set\n# CONFIG_TEST_UDELAY is not set\n# CONFIG_MEMTEST is not set\n# CONFIG_TEST_STATIC_KEYS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_SAMPLES is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\nCONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y\n# CONFIG_ARCH_WANTS_UBSAN_NO_NULL is not set\n# CONFIG_UBSAN is not set\nCONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y\n# CONFIG_STRICT_DEVMEM is not set\n# CONFIG_ARM64_PTDUMP is not set\nCONFIG_AMLOGIC_USER_FAULT=y\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set\nCONFIG_DEBUG_SET_MODULE_RONX=y\n# CONFIG_DEBUG_ALIGN_RODATA is not set\n# CONFIG_CORESIGHT is not set\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_BIG_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\n# CONFIG_KEY_DH_OPERATIONS is not set\nCONFIG_SECURITY_DMESG_RESTRICT=y\nCONFIG_SECURITY_PERF_EVENTS_RESTRICT=y\nCONFIG_SECURITY=y\nCONFIG_SECURITYFS=y\nCONFIG_SECURITY_NETWORK=y\n# CONFIG_SECURITY_NETWORK_XFRM is not set\nCONFIG_SECURITY_PATH=y\nCONFIG_LSM_MMAP_MIN_ADDR=0\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\nCONFIG_HAVE_ARCH_HARDENED_USERCOPY=y\nCONFIG_HARDENED_USERCOPY=y\n# CONFIG_HARDENED_USERCOPY_PAGESPAN is not set\nCONFIG_SECURITY_SELINUX=y\n# CONFIG_SECURITY_SELINUX_BOOTPARAM is not set\n# CONFIG_SECURITY_SELINUX_DISABLE is not set\nCONFIG_SECURITY_SELINUX_DEVELOP=y\nCONFIG_SECURITY_SELINUX_AVC_STATS=y\nCONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=0\nCONFIG_SECURITY_SMACK=y\n# CONFIG_SECURITY_SMACK_BRINGUP is not set\n# CONFIG_SECURITY_SMACK_NETFILTER is not set\n# CONFIG_SECURITY_SMACK_APPEND_SIGNALS is not set\n# CONFIG_SECURITY_TOMOYO is not set\n# CONFIG_SECURITY_APPARMOR is not set\n# CONFIG_SECURITY_LOADPIN is not set\n# CONFIG_SECURITY_YAMA is not set\nCONFIG_INTEGRITY=y\n# CONFIG_INTEGRITY_SIGNATURE is not set\nCONFIG_INTEGRITY_AUDIT=y\n# CONFIG_IMA is not set\n# CONFIG_EVM is not set\nCONFIG_DEFAULT_SECURITY_SELINUX=y\n# CONFIG_DEFAULT_SECURITY_SMACK is not set\n# CONFIG_DEFAULT_SECURITY_DAC is not set\nCONFIG_DEFAULT_SECURITY=\"selinux\"\nCONFIG_XOR_BLOCKS=m\nCONFIG_ASYNC_CORE=m\nCONFIG_ASYNC_MEMCPY=m\nCONFIG_ASYNC_XOR=m\nCONFIG_ASYNC_PQ=m\nCONFIG_ASYNC_RAID6_RECOV=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_BLKCIPHER=y\nCONFIG_CRYPTO_BLKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\n# CONFIG_CRYPTO_RSA is not set\n# CONFIG_CRYPTO_DH is not set\n# CONFIG_CRYPTO_ECDH is not set\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_WORKQUEUE=y\nCONFIG_CRYPTO_CRYPTD=y\n# CONFIG_CRYPTO_MCRYPTD is not set\nCONFIG_CRYPTO_AUTHENC=y\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_ABLK_HELPER=y\n\n#\n# Authenticated Encryption with Associated Data\n#\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\n\n#\n# Block modes\n#\nCONFIG_CRYPTO_CBC=y\nCONFIG_CRYPTO_CTR=y\nCONFIG_CRYPTO_CTS=y\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_PCBC is not set\nCONFIG_CRYPTO_XTS=y\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_ADIANTUM is not set\n\n#\n# Hash modes\n#\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_HMAC=y\n# CONFIG_CRYPTO_XCBC is not set\n# CONFIG_CRYPTO_VMAC is not set\n\n#\n# Digest\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=y\nCONFIG_CRYPTO_CRCT10DIF=y\nCONFIG_CRYPTO_GHASH=y\n# CONFIG_CRYPTO_POLY1305 is not set\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\nCONFIG_CRYPTO_MICHAEL_MIC=y\n# CONFIG_CRYPTO_RMD128 is not set\n# CONFIG_CRYPTO_RMD160 is not set\n# CONFIG_CRYPTO_RMD256 is not set\n# CONFIG_CRYPTO_RMD320 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\n# CONFIG_CRYPTO_TGR192 is not set\n# CONFIG_CRYPTO_WP512 is not set\n\n#\n# Ciphers\n#\nCONFIG_CRYPTO_AES=y\nCONFIG_CRYPTO_ANUBIS=m\nCONFIG_CRYPTO_ARC4=y\nCONFIG_CRYPTO_BLOWFISH=m\nCONFIG_CRYPTO_BLOWFISH_COMMON=m\nCONFIG_CRYPTO_CAMELLIA=m\nCONFIG_CRYPTO_CAST_COMMON=m\nCONFIG_CRYPTO_CAST5=m\nCONFIG_CRYPTO_CAST6=m\nCONFIG_CRYPTO_DES=y\nCONFIG_CRYPTO_FCRYPT=m\nCONFIG_CRYPTO_KHAZAD=m\nCONFIG_CRYPTO_SALSA20=m\nCONFIG_CRYPTO_CHACHA20=m\nCONFIG_CRYPTO_SEED=m\nCONFIG_CRYPTO_SERPENT=m\nCONFIG_CRYPTO_TEA=m\nCONFIG_CRYPTO_TWOFISH=y\nCONFIG_CRYPTO_TWOFISH_COMMON=y\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=y\nCONFIG_CRYPTO_LZO=y\nCONFIG_CRYPTO_842=m\nCONFIG_CRYPTO_LZ4=m\nCONFIG_CRYPTO_LZ4HC=m\nCONFIG_CRYPTO_ZSTD=m\n\n#\n# Random Number Generation\n#\nCONFIG_CRYPTO_ANSI_CPRNG=y\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\n# CONFIG_CRYPTO_USER_API_AEAD is not set\nCONFIG_CRYPTO_HASH_INFO=y\nCONFIG_CRYPTO_HW=y\n# CONFIG_CRYPTO_DEV_CCP is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\n# CONFIG_PKCS7_MESSAGE_PARSER is not set\n\n#\n# Certificates for signature checking\n#\n# CONFIG_SYSTEM_TRUSTED_KEYRING is not set\nCONFIG_ARM64_CRYPTO=y\nCONFIG_CRYPTO_SHA1_ARM64_CE=y\nCONFIG_CRYPTO_SHA2_ARM64_CE=y\nCONFIG_CRYPTO_GHASH_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64_CE=y\n# CONFIG_CRYPTO_AES_ARM64_CE_CCM is not set\nCONFIG_CRYPTO_AES_ARM64_CE_BLK=y\n# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set\n# CONFIG_CRYPTO_CRC32_ARM64 is not set\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_GENERIC_IO=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_CRC_CCITT=y\nCONFIG_CRC16=y\nCONFIG_CRC_T10DIF=y\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\nCONFIG_CRC7=y\nCONFIG_LIBCRC32C=y\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=m\nCONFIG_AUDIT_GENERIC=y\nCONFIG_AUDIT_ARCH_COMPAT_GENERIC=y\nCONFIG_AUDIT_COMPAT_GENERIC=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_842_COMPRESS=m\nCONFIG_842_DECOMPRESS=m\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=y\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_COMPRESS=m\nCONFIG_LZ4HC_COMPRESS=m\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMPRESS=m\nCONFIG_ZSTD_DECOMPRESS=m\nCONFIG_XZ_DEC=y\nCONFIG_XZ_DEC_X86=y\nCONFIG_XZ_DEC_POWERPC=y\nCONFIG_XZ_DEC_IA64=y\nCONFIG_XZ_DEC_ARM=y\nCONFIG_XZ_DEC_ARMTHUMB=y\nCONFIG_XZ_DEC_SPARC=y\nCONFIG_XZ_DEC_BCJ=y\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_GZIP=y\nCONFIG_DECOMPRESS_BZIP2=y\nCONFIG_DECOMPRESS_LZMA=y\nCONFIG_DECOMPRESS_XZ=y\nCONFIG_DECOMPRESS_LZO=y\nCONFIG_DECOMPRESS_LZ4=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_REED_SOLOMON=y\nCONFIG_REED_SOLOMON_ENC8=y\nCONFIG_REED_SOLOMON_DEC8=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_LRU_CACHE=m\nCONFIG_CLZ_TAB=y\n# CONFIG_CORDIC is not set\n# CONFIG_DDR is not set\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_FONT_SUPPORT=m\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\n# CONFIG_SG_SPLIT is not set\nCONFIG_SG_POOL=y\nCONFIG_ARCH_HAS_SG_CHAIN=y\nCONFIG_SBITMAP=y\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        # TARGET_CPU:\n        # arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d\n        # arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c\n        # arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t\n        # arm720t arm740t strongarm strongarm110 strongarm1100\n        # strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t\n        # arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi\n        # arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e\n        # arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s\n        # arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4\n        # cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312.\n        #\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a73.cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc+fp+simd\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"neon-fp-armv8\"\n        ;;\n    esac\n\n  # Bootloader to use (syslinux / u-boot / atv-bootloader / bcm2835-bootloader)\n    BOOTLOADER=\"u-boot\"\n\n  # Kernel target\n    KERNEL_TARGET=\"Image.lzo\"\n\n  # Kernel extra targets to build\n    KERNEL_UBOOT_EXTRA_TARGET=\"\"\n\n  # Build Android kernel image using mkbootimg\n    BUILD_ANDROID_BOOTIMG=\"yes\"\n\n  # Additional options to be passed to Android mkbootimg\n    ANDROID_BOOTIMG_OPTIONS=\"--base 0x0 --kernel_offset 0x1080000\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"dtbs\"\n\n  # Additional kernel dependencies\n    KERNEL_EXTRA_DEPENDS_TARGET=\"\"\n\n  # Kernel to use. values can be:\n  # default:  default mainline kernel\n    LINUX=\"amlogic-4.9\"\n\n  # kernel image name\n    KERNEL_NAME=\"kernel.img\"\n\n################################################################################\n# setup build defaults\n################################################################################\n\n  # Project CFLAGS\n    PROJECT_CFLAGS=\"\"\n\n  # SquashFS compression method (gzip / lzo / xz)\n    SQUASHFS_COMPRESSION=\"lzo\"\n\n################################################################################\n# setup project defaults\n################################################################################\n\n  # build and install ALSA Audio support (yes / no)\n    ALSA_SUPPORT=\"yes\"\n\n  # OpenGL(X) implementation to use (no / Mesa)\n    OPENGL=\"no\"\n\n  # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q / opengl-meson)\n    OPENGLES=\"opengl-meson\"\n\n  # include uvesafb support (yes / no)\n    UVESAFB_SUPPORT=\"no\"\n\n  # Displayserver to use (x11 / no)\n    DISPLAYSERVER=\"no\"\n\n  # Windowmanager to use (fluxbox / none)\n    WINDOWMANAGER=\"none\"\n\n  # Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia,nouveau)\n  # Space separated list is supported,\n  # e.g. GRAPHIC_DRIVERS=\"i915 i965 r300 r600 radeonsi nvidia nouveau\"\n    GRAPHIC_DRIVERS=\"\"\n\n  # Use a vendor specific KODI repo\n    KODI_VENDOR=\"amlogic-4.9\"\n\n  # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap / libamcodec)\n    KODIPLAYER_DRIVER=\"libamcodec\"\n\n  # Modules to install in initramfs for early boot\n    INITRAMFS_MODULES=\"font softcursor bitblit fbcon\"\n\n  # additional drivers to install:\n  # for a list of additinoal drivers see packages/linux-drivers\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_DRIVERS=\"DRIVER1 DRIVER2\"\n    ADDITIONAL_DRIVERS+=\" uwe5631-aml RTL8812AU RTL8822BU-aml RTL8822CS-aml RTL8822CU-aml\n                        RTL8852BS-aml RTL8152-aml w1-aml RTL8192CU RTL8192DU RTL8192EU RTL8188EU RTL8821CU\n                        ssv6xxx-aml mt7668-wifi-bt RTL8188FTV-aml RTL8189ES-aml RTL8189FS-aml\n                        RTL8723BS-aml RTL8822BS-aml RTL8821CS-aml qca9377-aml\n                        qca6174-aml smartchip\"\n\n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware-aml rtkbt-firmware-aml qca-firmware-aml\"\n\n  # build and install ATV IR remote support (yes / no)\n    ATVCLIENT_SUPPORT=\"no\"\n\n  # Amlogic IR remote support (yes / no)\n    AMREMOTE_SUPPORT=\"yes\"\n\n  # build and install iSCSI support - iscsistart (yes / no)\n    ISCSI_SUPPORT=\"no\"\n\n  # build with installer (yes / no)\n    INSTALLER_SUPPORT=\"no\"\n\n  # build and install driver addons (yes / no)\n    DRIVER_ADDONS_SUPPORT=\"no\"\n\n  # driver addons to install:\n  # for a list of additinoal drivers see packages/linux-driver-addons\n  # Space separated list is supported,\n    DRIVER_ADDONS=\"\"\n\n  # additional packages to install:\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_PACKAGES=\"PACKAGE1 PACKAGE2\"\n  # ADDITIONAL_PACKAGES+=\"\"\n\n  # add OOTB support for IR remote\n  # IR_REMOTE_KEYMAPS+=\"\"\n\n  # build with entware installer\n    ENTWARE_SUPPORT=\"yes\"\n    ENTWARE_ARCH=\"aarch64-k3.10\"\n\n  # CoreELEC Subdevices\n    SUBDEVICES=\"Odroid_N2 Odroid_N2L Odroid_C4 Odroid_HC4 LePotato LaFrite Radxa_Zero Radxa_Zero2\"\n\n  # TEE supported SoC\n    TEE_SOC=\"S905X4\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/opengl-meson/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"opengl-meson\"\nPKG_VERSION=\"7bddce621a0c1e0cc12cfc8b707e93eb37fc0f82\"\nPKG_SHA256=\"15400e78b918b15743b815c195be472899d4243143e405a7b50d5be1cd07ffd1\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"http://openlinux.amlogic.com:8000/download/ARM/filesystem/\"\nPKG_URL=\"https://github.com/CoreELEC/opengl-meson/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain opentee_linuxdriver\"\nPKG_LONGDESC=\"OpenGL ES pre-compiled libraries for Mali GPUs found in Amlogic Meson SoCs.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n\tmkdir -p ${INSTALL}/usr/lib\nif [[ \"${ARCH}\" == \"arm\" ]]; then\n    cp -p lib/eabihf/gondul/r12p0/fbdev/libMali.so ${INSTALL}/usr/lib/libMali.gondul.so\n    cp -p lib/eabihf/dvalin/r12p0/fbdev/libMali.so ${INSTALL}/usr/lib/libMali.dvalin.so\n    cp -p lib/eabihf/m450/r7p0/fbdev/libMali.so ${INSTALL}/usr/lib/libMali.m450.so\n    \n    mkdir -p ${SYSROOT_PREFIX}/usr/lib\n\t\tcp -p lib/eabihf/gondul/r12p0/fbdev/libMali.so ${SYSROOT_PREFIX}/usr/lib\nelse\n    cp -p lib/arm64/gondul/r12p0/fbdev/libMali.so ${INSTALL}/usr/lib/libMali.gondul.so\n    cp -p lib/arm64/dvalin/r12p0/fbdev/libMali.so ${INSTALL}/usr/lib/libMali.dvalin.so\n    cp -p lib/arm64/m450/r7p0/fbdev/libMali.so ${INSTALL}/usr/lib/libMali.m450.so\n    \n    mkdir -p ${SYSROOT_PREFIX}/usr/lib\n\t\tcp -p lib/arm64/gondul/r12p0/fbdev/libMali.so ${SYSROOT_PREFIX}/usr/lib\nfi\n\n    ln -sf /var/lib/libMali.so ${INSTALL}/usr/lib/libMali.so\n\t\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libmali.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libmali.so.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libEGL.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libEGL.so.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libEGL.so.1.0.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLES_CM.so.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so.1.0.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so.1.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so.2\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so.2.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so.2.0.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so.3\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so.3.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so.3.0.0\n\n# install headers and libraries to TOOLCHAIN\n\tcp -rf ${PKG_BUILD}/include/* ${SYSROOT_PREFIX}/usr/include\n\tcp -rf ${PKG_BUILD}/pkgconfig/* ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n\tcp ${SYSROOT_PREFIX}/usr/include/EGL_platform/platform_fbdev/* ${SYSROOT_PREFIX}/usr/include/EGL\n\trm -rf ${SYSROOT_PREFIX}/usr/include/EGL_platform\n\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libmali.so\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libMali.so.0\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libEGL.so\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libEGL.so.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libEGL.so.1.0.0\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLES_CM.so.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv1_CM.so\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv1_CM.so.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv1_CM.so.1.0.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv1_CM.so.1.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv2.so\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv2.so.2\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv2.so.2.0\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv2.so.2.0.0\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv3.so\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv3.so.3\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv3.so.3.0\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv3.so.3.0.0\n\n  mkdir -p ${INSTALL}/usr/sbin\n    cp $PKG_DIR/scripts/libmali-overlay-setup ${INSTALL}/usr/sbin\n}\n\npost_install() {\n  enable_service unbind-console.service\n  enable_service libmali.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/opengl-meson/scripts/libmali-overlay-setup",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\nmkdir -p /var/lib32\nif grep -q \"g12b\" /proc/device-tree/compatible; then\n    ln -sf /usr/lib/libMali.gondul.so /var/lib/libMali.so\n    ln -sf /usr/lib32/libMali.gondul.so /var/lib32/libMali.so\nelif grep -qE \"g12a|sc2\" /proc/device-tree/compatible; then\n    ln -sf /usr/lib/libMali.dvalin.so /var/lib/libMali.so\n    ln -sf /usr/lib32/libMali.dvalin.so /var/lib32/libMali.so\nelif grep -q \"Gxl\" /proc/device-tree/compatible; then\n    ln -sf /usr/lib/libMali.m450.so /var/lib/libMali.so\n    ln -sf /usr/lib32/libMali.m450.so /var/lib32/libMali.so\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/opengl-meson/sources/pkgconfig/egl.pc",
    "content": "prefix=/usr\nexec_prefix=${prefix}\nlibdir=/usr/lib\nincludedir=${prefix}/include\n\nName: egl\nDescription: libhybris EGL library\n# Set to 7.10 because some package like weston are usually built\n# against mesa and because of that expect certain version from egl.\nVersion: 7.10\nLibs: -L${libdir} -lEGL\nCflags: -I${includedir}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/opengl-meson/sources/pkgconfig/glesv1_cm.pc",
    "content": "prefix=/usr\nexec_prefix=${prefix}\nlibdir=/usr/lib\nincludedir=${prefix}/include\n\nName: glesv1_cm\nDescription: libhybris OpenGL ES 1.1 library\nVersion: 0.1.0\nLibs: -L${libdir} -lGLESv1_CM\nCflags: -I${includedir}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/opengl-meson/sources/pkgconfig/glesv2.pc",
    "content": "prefix=/usr\nexec_prefix=${prefix}\nlibdir=/usr/lib\nincludedir=${prefix}/include\n\nName: glesv2\nDescription: libhybris OpenGL ES 2.0 library\nVersion: 0.1.0\nLibs: -L${libdir} -lGLESv2\nCflags: -I${includedir}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/opengl-meson/sources/pkgconfig/glesv3.pc",
    "content": "prefix=/usr\nexec_prefix=${prefix}\nlibdir=/usr/lib\nincludedir=${prefix}/include\n\nName: glesv3\nDescription: libhybris OpenGL ES 3.0 library\nVersion: 0.1.0\nLibs: -L${libdir} -lGLESv3\nCflags: -I${includedir}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/opengl-meson/system.d/libmali.service",
    "content": "[Unit]\nDescription=Create libMali overlay for specific AML device\nAfter=var.mount\nBefore=kodi.service\n\n[Service]\nType=oneshot\nExecStart=/usr/sbin/libmali-overlay-setup\n\n[Install]\nWantedBy=local-fs.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/opengl-meson/system.d/unbind-console.service",
    "content": "[Unit]\nDescription=Unbind framebuffer console\nConditionPathExists=/sys/class/vtconsole/vtcon1/bind\n\n[Service]\nType=oneshot\nExecStart=/bin/sh -c 'echo 0 > /sys/class/vtconsole/vtcon1/bind'\n\n[Install]\nWantedBy=graphical.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/u-boot/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot\"\nPKG_VERSION=\"1.0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_CANUPDATE=\"${PROJECT}*\"\nPKG_NEED_UNPACK=\"$PROJECT_DIR/$PROJECT/bootloader \"\n\nfor PKG_SUBDEVICE in $SUBDEVICES; do\n  if [ \"${PKG_SUBDEVICE}\" != \"Odroid_HC4\" ]; then\n    PKG_DEPENDS_TARGET+=\" u-boot-${PKG_SUBDEVICE}\"\n    PKG_NEED_UNPACK+=\" $(get_pkg_directory u-boot-${PKG_SUBDEVICE})\"\n  fi\ndone\n\nmake_target() {\n  : # nothing\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/share/bootloader\n\n  # Always install the update script\n  find_file_path bootloader/update.sh && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n  sed -e \"s/@KERNEL_NAME@/$KERNEL_NAME/g\" \\\n      -e \"s/@LEGACY_KERNEL_NAME@/$LEGACY_KERNEL_NAME/g\" \\\n      -e \"s/@LEGACY_DTB_NAME@/$LEGACY_DTB_NAME/g\" \\\n      -i $INSTALL/usr/share/bootloader/update.sh\n\n  # Always install the canupdate script\n  if find_file_path bootloader/canupdate.sh; then\n    cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n  fi\n\n  for PKG_SUBDEVICE in $SUBDEVICES; do\n    unset PKG_UBOOTBIN\n    unset PKG_CHAINUBOOTBIN\n    find_file_path bootloader/${PKG_SUBDEVICE}_boot.ini && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n    if [ \"${PKG_SUBDEVICE:0:9}\" = \"Odroid_N2\" -o \"${PKG_SUBDEVICE}\" = \"Odroid_C4\" -o \"${PKG_SUBDEVICE}\" = \"Odroid_HC4\" -o \"${PKG_SUBDEVICE:0:10}\" = \"Radxa_Zero\" ]; then\n      if [ \"${PKG_SUBDEVICE}\" != \"Odroid_HC4\" ]; then\n        PKG_UBOOTBIN=$(get_build_dir u-boot-${PKG_SUBDEVICE})/sd_fuse/u-boot.bin.sd.bin\n      else\n        PKG_UBOOTBIN=$(get_build_dir u-boot-Odroid_C4)/sd_fuse/u-boot.bin.sd.bin\n      fi\n    elif [ \"${PKG_SUBDEVICE}\" = \"LePotato\" ]; then\n        PKG_UBOOTBIN=$(get_build_dir u-boot-${PKG_SUBDEVICE})/fip/u-boot.bin.sd.bin\n        PKG_CHAINUBOOTBIN=$(get_build_dir u-boot-${PKG_SUBDEVICE})/build/u-boot.bin\n    elif [ \"${PKG_SUBDEVICE}\" = \"LaFrite\" ]; then\n        PKG_CHAINUBOOTBIN=$(get_build_dir u-boot-${PKG_SUBDEVICE})/build/u-boot.bin\n    fi\n    if [ ${PKG_UBOOTBIN} ]; then\n        cp -av ${PKG_UBOOTBIN} $INSTALL/usr/share/bootloader/${PKG_SUBDEVICE}_u-boot\n    fi\n    if [ ${PKG_CHAINUBOOTBIN} ]; then\n        cp -av ${PKG_CHAINUBOOTBIN} $INSTALL/usr/share/bootloader/${PKG_SUBDEVICE}_chain_u-boot\n    fi\n  done\n  find_file_path bootloader/config.ini && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n    sed -e \"s/@PROJECT@/${PKG_CANUPDATE}/g\" \\\n        -i $INSTALL/usr/share/bootloader/canupdate.sh\n  # Copy Hardkernel boot logo\n  find_file_path splash/${DEVICE}/hk-boot-logo-1080.bmp.gz && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n\t# Copy Radxa boot logo\n  find_file_path splash/${DEVICE}/radxa-boot-logo-1080.bmp.gz && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/u-boot-LaFrite/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-LaFrite\"\nPKG_VERSION=\"de12d9be7324f7d26b8721de1eb64715b444bdad\"\nPKG_SHA256=\"f71d5ecb5e11f6f531ae0182c8f1de55468f990c46afdc5a8361b5311bf7da74\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\nconfigure_package() {\n  PKG_UBOOT_CONFIG=\"gxl_p241_v1_defconfig\"\n}\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/gx*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make $PKG_UBOOT_CONFIG\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"$HOST_CC\" HOSTSTRIP=\"true\"\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/u-boot-LePotato/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-LePotato\"\nPKG_VERSION=\"de12d9be7324f7d26b8721de1eb64715b444bdad\"\nPKG_SHA256=\"f71d5ecb5e11f6f531ae0182c8f1de55468f990c46afdc5a8361b5311bf7da74\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\nconfigure_package() {\n  PKG_UBOOT_CONFIG=\"libretech_cc_defconfig\"\n}\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/gx*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make $PKG_UBOOT_CONFIG\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"$HOST_CC\" HOSTSTRIP=\"true\"\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/u-boot-Odroid_C4/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-Odroid_C4\"\nPKG_VERSION=\"43d26e1865333916d7889a586948e11b83b2c558\"\nPKG_SHA256=\"7258b7443d4b8ea2e7d9543c076ecf3cf53c546cff6138cd5f770a536dcabf1f\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nconfigure_package() {\n  PKG_UBOOT_CONFIG=\"odroidc4_defconfig\"\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make $PKG_UBOOT_CONFIG\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"$HOST_CC\" HOSTSTRIP=\"true\"\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/u-boot-Odroid_N2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-Odroid_N2\"\nPKG_VERSION=\"43d26e1865333916d7889a586948e11b83b2c558\"\nPKG_SHA256=\"7258b7443d4b8ea2e7d9543c076ecf3cf53c546cff6138cd5f770a536dcabf1f\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nconfigure_package() {\n  PKG_UBOOT_CONFIG=\"odroidn2_defconfig\"\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make $PKG_UBOOT_CONFIG\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"$HOST_CC\" HOSTSTRIP=\"true\"\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/u-boot-Odroid_N2L/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-Odroid_N2L\"\nPKG_VERSION=\"25aa59079acfc84fec943e18f2240581f6afb8ca\"\nPKG_SHA256=\"cdc7f418655d45a22d278f568104950cac6970758f4537fbb251e076dc392455\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nconfigure_package() {\n  PKG_UBOOT_CONFIG=\"odroidn2l_defconfig\"\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make $PKG_UBOOT_CONFIG\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"$HOST_CC\" HOSTSTRIP=\"true\"\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/u-boot-Radxa_Zero/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-Radxa_Zero\"\nPKG_VERSION=\"43d26e1865333916d7889a586948e11b83b2c558\"\nPKG_SHA256=\"7258b7443d4b8ea2e7d9543c076ecf3cf53c546cff6138cd5f770a536dcabf1f\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nconfigure_package() {\n  PKG_UBOOT_CONFIG=\"radxa_zero_defconfig\"\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make $PKG_UBOOT_CONFIG\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"$HOST_CC\" HOSTSTRIP=\"true\"\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/packages/u-boot-Radxa_Zero2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-Radxa_Zero2\"\nPKG_VERSION=\"43d26e1865333916d7889a586948e11b83b2c558\"\nPKG_SHA256=\"7258b7443d4b8ea2e7d9543c076ecf3cf53c546cff6138cd5f770a536dcabf1f\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nconfigure_package() {\n  PKG_UBOOT_CONFIG=\"radxa_zero2_defconfig\"\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make ${PKG_UBOOT_CONFIG}\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"${HOST_CC}\" HOSTSTRIP=\"true\"\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0001-Android-improve-Dolby-Vision-compatibility.patch",
    "content": "From 9df5de35edf290042854693658f7fb77c14a19c8 Mon Sep 17 00:00:00 2001\nFrom: thexai <58434170+thexai@users.noreply.github.com>\nDate: Wed, 29 Mar 2023 12:30:11 +0200\nSubject: [PATCH 01/21] [Android] improve Dolby Vision compatibility\n\n---\n .../Video/DVDVideoCodecAndroidMediaCodec.cpp        |  8 +++++++-\n xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.h       |  2 ++\n .../VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp      | 13 ++++++++++++-\n xbmc/cores/VideoPlayer/DVDStreamInfo.cpp            |  8 ++++++++\n xbmc/cores/VideoPlayer/DVDStreamInfo.h              |  5 ++++-\n 5 files changed, 33 insertions(+), 3 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\nindex 48050cfb9d..0be40dd87c 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n@@ -512,7 +512,13 @@ bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptio\n                   \"Display: {}, MediaCodec: {}\",\n                   displaySupportsDovi, mediaCodecSupportsDovi);\n \n-        if (displaySupportsDovi && mediaCodecSupportsDovi)\n+        // For Dolby Vision profiles that don't have HDR10 fallback, always use\n+        // the dvhe decoder even if the display not supports Dolby Vision.\n+        // For profiles that has HDR10 fallback (7, 8) is better use HEVC decoder to\n+        // ensure HDR10 output if display is not DV capable.\n+        bool notHasHDR10fallback = (m_hints.dovi.dv_profile == 4 || m_hints.dovi.dv_profile == 5);\n+\n+        if (mediaCodecSupportsDovi && (displaySupportsDovi || notHasHDR10fallback))\n         {\n           m_mime = \"video/dolby-vision\";\n           m_formatname = isDvhe ? \"amc-dvhe\" : \"amc-dvh1\";\ndiff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.h b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.h\nindex 5bf4da346f..43dcd465fb 100644\n--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.h\n+++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.h\n@@ -32,6 +32,7 @@ class IAddonProvider;\n extern \"C\"\n {\n #include <libavcodec/avcodec.h>\n+#include <libavutil/dovi_meta.h>\n #include <libavutil/mastering_display_metadata.h>\n }\n \n@@ -166,6 +167,7 @@ public:\n \n   std::string stereo_mode; // expected stereo mode\n   StreamHdrType hdr_type = StreamHdrType::HDR_TYPE_NONE; // type of HDR for this stream (hdr10, etc)\n+  AVDOVIDecoderConfigurationRecord dovi{};\n   bool bInterlaced; // progressive/interlaced flag\n   bool bUnknownIP; // progressive/interlace unknown\n };\ndiff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp\nindex 66ff48b731..e88b1f1da3 100644\n--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp\n@@ -53,8 +53,10 @@ extern \"C\"\n #include <stdint.h>\n #endif\n \n-extern \"C\" {\n+extern \"C\"\n+{\n #include <libavutil/dict.h>\n+#include <libavutil/dovi_meta.h>\n #include <libavutil/opt.h>\n }\n \n@@ -1719,6 +1721,15 @@ CDemuxStream* CDVDDemuxFFmpeg::AddStream(int streamIdx)\n         int size = 0;\n         uint8_t* side_data = nullptr;\n \n+        if (st->hdr_type == StreamHdrType::HDR_TYPE_DOLBYVISION)\n+        {\n+          side_data = av_stream_get_side_data(pStream, AV_PKT_DATA_DOVI_CONF, &size);\n+          if (side_data && size)\n+          {\n+            st->dovi = *reinterpret_cast<AVDOVIDecoderConfigurationRecord*>(side_data);\n+          }\n+        }\n+\n         side_data = av_stream_get_side_data(pStream, AV_PKT_DATA_MASTERING_DISPLAY_METADATA, &size);\n         if (side_data && size)\n         {\ndiff --git a/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp b/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp\nindex 556a9182c3..0bac726df6 100644\n--- a/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp\n@@ -11,6 +11,8 @@\n #include \"DVDDemuxers/DVDDemux.h\"\n #include \"cores/VideoPlayer/Interface/DemuxCrypto.h\"\n \n+#include <cstring>\n+\n CDVDStreamInfo::CDVDStreamInfo()                                                     { extradata = NULL; Clear(); }\n CDVDStreamInfo::CDVDStreamInfo(const CDVDStreamInfo &right, bool withextradata )     { extradata = NULL; Clear(); Assign(right, withextradata); }\n CDVDStreamInfo::CDVDStreamInfo(const CDemuxStream &right, bool withextradata )       { extradata = NULL; Clear(); Assign(right, withextradata); }\n@@ -63,6 +65,7 @@ void CDVDStreamInfo::Clear()\n   masteringMetadata = nullptr;\n   contentLightMetadata = nullptr;\n   stereo_mode.clear();\n+  dovi = {};\n \n   channels   = 0;\n   samplerate = 0;\n@@ -150,6 +153,9 @@ bool CDVDStreamInfo::Equal(const CDVDStreamInfo& right, int compare)\n   else if (contentLightMetadata || right.contentLightMetadata)\n     return false;\n \n+  if (0 != std::memcmp(&dovi, &right.dovi, sizeof(AVDOVIDecoderConfigurationRecord)))\n+    return false;\n+\n   // AUDIO\n   if( channels      != right.channels\n   ||  samplerate    != right.samplerate\n@@ -234,6 +240,7 @@ void CDVDStreamInfo::Assign(const CDVDStreamInfo& right, bool withextradata)\n   masteringMetadata = right.masteringMetadata;\n   contentLightMetadata = right.contentLightMetadata;\n   stereo_mode = right.stereo_mode;\n+  dovi = right.dovi;\n \n   // AUDIO\n   channels      = right.channels;\n@@ -309,6 +316,7 @@ void CDVDStreamInfo::Assign(const CDemuxStream& right, bool withextradata)\n     masteringMetadata = stream->masteringMetaData;\n     contentLightMetadata = stream->contentLightMetaData;\n     stereo_mode = stream->stereo_mode;\n+    dovi = stream->dovi;\n   }\n   else if (right.type == STREAM_SUBTITLE)\n   {\ndiff --git a/xbmc/cores/VideoPlayer/DVDStreamInfo.h b/xbmc/cores/VideoPlayer/DVDStreamInfo.h\nindex 5c30334f8e..8d2989af75 100644\n--- a/xbmc/cores/VideoPlayer/DVDStreamInfo.h\n+++ b/xbmc/cores/VideoPlayer/DVDStreamInfo.h\n@@ -10,8 +10,10 @@\n \n #include \"DVDDemuxers/DVDDemux.h\"\n \n-extern \"C\" {\n+extern \"C\"\n+{\n #include <libavcodec/avcodec.h>\n+#include <libavutil/dovi_meta.h>\n }\n #include \"DVDClock.h\"\n \n@@ -78,6 +80,7 @@ public:\n   std::shared_ptr<AVMasteringDisplayMetadata> masteringMetadata;\n   std::shared_ptr<AVContentLightMetadata> contentLightMetadata;\n   std::string stereo_mode; // stereoscopic 3d mode\n+  AVDOVIDecoderConfigurationRecord dovi{};\n   CDVDClock *pClock;\n \n   // AUDIO\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0002-Improve-Dolby-Vision-detection-for-Android.patch",
    "content": "From 684e791b37f4a0c60af89c3a28bf1404d4cd0614 Mon Sep 17 00:00:00 2001\nFrom: Serghei Scobici <serghei.scobici@endava.com>\nDate: Sun, 8 Jan 2023 17:08:09 +0200\nSubject: [PATCH 02/21] Improve Dolby Vision detection for Android\n\n---\n .../DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp | 10 ++++++++++\n xbmc/cores/VideoPlayer/DVDStreamInfo.cpp               |  4 ++++\n xbmc/cores/VideoPlayer/DVDStreamInfo.h                 |  1 +\n 3 files changed, 15 insertions(+)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\nindex 0be40dd87c..ae8943655e 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n@@ -501,6 +501,16 @@ bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptio\n       bool isDvhe = (m_hints.codec_tag == MKTAG('d', 'v', 'h', 'e'));\n       bool isDvh1 = (m_hints.codec_tag == MKTAG('d', 'v', 'h', '1'));\n \n+      // some files don't have dvhe or dvh1 tag set up but have Dolby Vision side data\n+      if (!isDvhe && !isDvh1 && m_hints.hdrType == StreamHdrType::HDR_TYPE_DOLBYVISION)\n+      {\n+        // page 10, table 2 from https://professional.dolby.com/siteassets/content-creation/dolby-vision-for-content-creators/dolby-vision-streams-within-the-http-live-streaming-format-v2.0-13-november-2018.pdf\n+        if (m_hints.codec_tag == MKTAG('h', 'v', 'c', '1'))\n+          isDvh1 = true;\n+        else\n+          isDvhe = true;\n+      }\n+\n       if (isDvhe || isDvh1)\n       {\n         bool displaySupportsDovi = CAndroidUtils::GetDisplayHDRCapabilities().SupportsDolbyVision();\ndiff --git a/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp b/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp\nindex 0bac726df6..df9dc537fb 100644\n--- a/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp\n@@ -58,6 +58,7 @@ void CDVDStreamInfo::Clear()\n   ptsinvalid = false;\n   forced_aspect = false;\n   bitsperpixel = 0;\n+  hdrType = StreamHdrType::HDR_TYPE_NONE;\n   colorSpace = AVCOL_SPC_UNSPECIFIED;\n   colorRange = AVCOL_RANGE_UNSPECIFIED;\n   colorPrimaries = AVCOL_PRI_UNSPECIFIED;\n@@ -109,6 +110,7 @@ bool CDVDStreamInfo::Equal(const CDVDStreamInfo& right, int compare)\n   || bitsperpixel != right.bitsperpixel\n   || bitdepth != right.bitdepth\n   || vfr != right.vfr\n+  || hdrType != right.hdrType\n   || colorSpace != right.colorSpace\n   || colorRange != right.colorRange\n   || colorPrimaries != right.colorPrimaries\n@@ -233,6 +235,7 @@ void CDVDStreamInfo::Assign(const CDVDStreamInfo& right, bool withextradata)\n   bitdepth = right.bitdepth;\n   vfr = right.vfr;\n   codecOptions = right.codecOptions;\n+  hdrType = right.hdrType;\n   colorSpace = right.colorSpace;\n   colorRange = right.colorRange;\n   colorPrimaries = right.colorPrimaries;\n@@ -309,6 +312,7 @@ void CDVDStreamInfo::Assign(const CDemuxStream& right, bool withextradata)\n     orientation = stream->iOrientation;\n     bitsperpixel = stream->iBitsPerPixel;\n     bitdepth = stream->bitDepth;\n+    hdrType = stream->hdr_type;\n     colorSpace = stream->colorSpace;\n     colorRange = stream->colorRange;\n     colorPrimaries = stream->colorPrimaries;\ndiff --git a/xbmc/cores/VideoPlayer/DVDStreamInfo.h b/xbmc/cores/VideoPlayer/DVDStreamInfo.h\nindex 8d2989af75..ed94acd6b3 100644\n--- a/xbmc/cores/VideoPlayer/DVDStreamInfo.h\n+++ b/xbmc/cores/VideoPlayer/DVDStreamInfo.h\n@@ -73,6 +73,7 @@ public:\n   int orientation; // orientation of the video in degrees counter clockwise\n   int bitsperpixel;\n   int bitdepth;\n+  StreamHdrType hdrType;\n   AVColorSpace colorSpace;\n   AVColorRange colorRange;\n   AVColorPrimaries colorPrimaries;\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0003-WinSystemAmlogic-rework-EGL-native-window.patch",
    "content": "From 8a013649ea33ea8ce2f4bfd432260de1609eb977 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 6 Oct 2022 16:47:58 +0200\nSubject: [PATCH 03/21] WinSystemAmlogic: rework EGL native window The\n <EGL/fbdev_window.h> include was missing and native window was NULL as\n _FBDEV_WINDOW_H_ was not defined.\n\n---\n xbmc/windowing/amlogic/WinSystemAmlogic.cpp   | 33 ++++++++-----------\n xbmc/windowing/amlogic/WinSystemAmlogic.h     |  4 +--\n .../amlogic/WinSystemAmlogicGLESContext.cpp   |  2 +-\n 3 files changed, 17 insertions(+), 22 deletions(-)\n\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\nindex 3d40e6b24d..0a52b95144 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n@@ -38,8 +38,9 @@\n \n using namespace KODI;\n \n-CWinSystemAmlogic::CWinSystemAmlogic() :\n-  m_libinput(new CLibInputHandler)\n+CWinSystemAmlogic::CWinSystemAmlogic()\n+:  m_nativeWindow(NULL)\n+,  m_libinput(new CLibInputHandler)\n {\n   const char *env_framebuffer = getenv(\"FRAMEBUFFER\");\n \n@@ -53,7 +54,6 @@ CWinSystemAmlogic::CWinSystemAmlogic() :\n   }\n \n   m_nativeDisplay = EGL_NO_DISPLAY;\n-  m_nativeWindow = static_cast<EGLNativeWindowType>(NULL);\n \n   m_displayWidth = 0;\n   m_displayHeight = 0;\n@@ -64,14 +64,6 @@ CWinSystemAmlogic::CWinSystemAmlogic() :\n   m_libinput->Start();\n }\n \n-CWinSystemAmlogic::~CWinSystemAmlogic()\n-{\n-  if(m_nativeWindow)\n-  {\n-    m_nativeWindow = static_cast<EGLNativeWindowType>(NULL);\n-  }\n-}\n-\n bool CWinSystemAmlogic::InitWindowSystem()\n {\n   const std::shared_ptr<CSettings> settings = CServiceBroker::GetSettingsComponent()->GetSettings();\n@@ -146,6 +138,12 @@ bool CWinSystemAmlogic::CreateNewWindow(const std::string& name,\n   m_displayHeight = res.iScreenHeight;\n   m_fRefreshRate  = res.fRefreshRate;\n \n+  if (m_nativeWindow == NULL)\n+    m_nativeWindow = new fbdev_window;\n+\n+  m_nativeWindow->width = m_nWidth;\n+  m_nativeWindow->height = m_nHeight;\n+\n   if ((m_bWindowCreated && aml_get_native_resolution(&current_resolution)) &&\n     current_resolution.iWidth == res.iWidth && current_resolution.iHeight == res.iHeight &&\n     current_resolution.iScreenWidth == res.iScreenWidth && current_resolution.iScreenHeight == res.iScreenHeight &&\n@@ -175,13 +173,6 @@ bool CWinSystemAmlogic::CreateNewWindow(const std::string& name,\n   m_stereo_mode = stereo_mode;\n   m_bFullScreen = fullScreen;\n \n-#ifdef _FBDEV_WINDOW_H_\n-  fbdev_window *nativeWindow = new fbdev_window;\n-  nativeWindow->width = res.iWidth;\n-  nativeWindow->height = res.iHeight;\n-  m_nativeWindow = static_cast<EGLNativeWindowType>(nativeWindow);\n-#endif\n-\n   aml_set_native_resolution(res, m_framebuffer_name, stereo_mode);\n \n   if (!m_delayDispReset)\n@@ -199,7 +190,11 @@ bool CWinSystemAmlogic::CreateNewWindow(const std::string& name,\n \n bool CWinSystemAmlogic::DestroyWindow()\n {\n-  m_nativeWindow = static_cast<EGLNativeWindowType>(NULL);\n+  if (m_nativeWindow != NULL)\n+  {\n+    delete(m_nativeWindow);\n+    m_nativeWindow = NULL;\n+  }\n \n   return true;\n }\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.h b/xbmc/windowing/amlogic/WinSystemAmlogic.h\nindex 7cfb2dc7c3..2c70086caa 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogic.h\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.h\n@@ -14,6 +14,7 @@\n #include \"windowing/WinSystem.h\"\n #include \"threads/SystemClock.h\"\n #include \"system_egl.h\"\n+#include <EGL/fbdev_window.h>\n \n class IDispResource;\n \n@@ -21,7 +22,6 @@ class CWinSystemAmlogic : public CWinSystemBase\n {\n public:\n   CWinSystemAmlogic();\n-  virtual ~CWinSystemAmlogic();\n \n   bool InitWindowSystem() override;\n   bool DestroyWindowSystem() override;\n@@ -42,7 +42,7 @@ public:\n protected:\n   std::string m_framebuffer_name;\n   EGLDisplay m_nativeDisplay;\n-  EGLNativeWindowType m_nativeWindow;\n+  fbdev_window *m_nativeWindow;\n \n   int m_displayWidth;\n   int m_displayHeight;\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\nindex 16ba54a02f..f6cbac696b 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n@@ -74,7 +74,7 @@ bool CWinSystemAmlogicGLESContext::CreateNewWindow(const std::string& name,\n     return false;\n   }\n \n-  if (!m_pGLContext.CreateSurface(m_nativeWindow))\n+  if (!m_pGLContext.CreateSurface(static_cast<EGLNativeWindowType>(m_nativeWindow)))\n   {\n     return false;\n   }\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0004-WinSystemAmlogicGLES-clean-up-GLES-references-on-win.patch",
    "content": "From abad3ebbbea8de81c7f92d5caea3da94d54b0614 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 26 Jan 2023 11:39:43 +0100\nSubject: [PATCH 04/21] WinSystemAmlogicGLES: clean up GLES references on\n window destroy\n\n---\n .../amlogic/WinSystemAmlogicGLESContext.cpp    | 18 +++++++++++++-----\n .../amlogic/WinSystemAmlogicGLESContext.h      |  2 ++\n 2 files changed, 15 insertions(+), 5 deletions(-)\n\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\nindex f6cbac696b..39fbaf03a1 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n@@ -58,17 +58,19 @@ bool CWinSystemAmlogicGLESContext::InitWindowSystem()\n   return true;\n }\n \n+bool CWinSystemAmlogicGLESContext::DestroyWindowSystem()\n+{\n+  m_pGLContext.DestroyContext();\n+  m_pGLContext.Destroy();\n+  return CWinSystemAmlogic::DestroyWindowSystem();\n+}\n+\n bool CWinSystemAmlogicGLESContext::CreateNewWindow(const std::string& name,\n                                                bool fullScreen,\n                                                RESOLUTION_INFO& res)\n {\n   m_pGLContext.DestroySurface();\n \n-  if (!CWinSystemAmlogic::DestroyWindow())\n-  {\n-    return false;\n-  }\n-\n   if (!CWinSystemAmlogic::CreateNewWindow(name, fullScreen, res))\n   {\n     return false;\n@@ -95,6 +97,12 @@ bool CWinSystemAmlogicGLESContext::CreateNewWindow(const std::string& name,\n   return true;\n }\n \n+bool CWinSystemAmlogicGLESContext::DestroyWindow()\n+{\n+  m_pGLContext.DestroySurface();\n+  return CWinSystemAmlogic::DestroyWindow();\n+}\n+\n bool CWinSystemAmlogicGLESContext::ResizeWindow(int newWidth, int newHeight, int newLeft, int newTop)\n {\n   CRenderSystemGLES::ResetRenderSystem(newWidth, newHeight);\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h\nindex d2f0e84e90..7d7467ee1a 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h\n@@ -32,9 +32,11 @@ public:\n   // Implementation of CWinSystemBase via CWinSystemAmlogic\n   CRenderSystemBase *GetRenderSystem() override { return this; }\n   bool InitWindowSystem() override;\n+  bool DestroyWindowSystem() override;\n   bool CreateNewWindow(const std::string& name,\n                        bool fullScreen,\n                        RESOLUTION_INFO& res) override;\n+  bool DestroyWindow() override;\n \n   bool ResizeWindow(int newWidth, int newHeight, int newLeft, int newTop) override;\n   bool SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool blankOtherDisplays) override;\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0005-tools-depends-Add-Rust-toolchain-cargo-c-and-libdovi.patch",
    "content": "From 76387530102fc7c9226e0f4df2561a769f5343aa Mon Sep 17 00:00:00 2001\nFrom: quietvoid <39477805+quietvoid@users.noreply.github.com>\nDate: Sat, 11 Mar 2023 08:39:55 -0500\nSubject: [PATCH 05/21] tools/depends: Add Rust toolchain, cargo-c and libdovi\n dependencies\n\n---\n docs/README.Android.md                       |  4 ++\n tools/depends/Makefile.include.in            |  1 +\n tools/depends/configure.ac                   |  7 +++\n tools/depends/native/Makefile                |  8 +++-\n tools/depends/native/cargo-c/CARGO-C-VERSION |  5 ++\n tools/depends/native/cargo-c/Makefile        | 38 ++++++++++++++++\n tools/depends/native/rustup/Makefile         | 48 ++++++++++++++++++++\n tools/depends/native/rustup/RUSTUP-VERSION   |  5 ++\n tools/depends/target/Makefile                |  4 ++\n tools/depends/target/libdovi/LIBDOVI-VERSION |  6 +++\n tools/depends/target/libdovi/Makefile        | 43 ++++++++++++++++++\n 11 files changed, 168 insertions(+), 1 deletion(-)\n create mode 100644 tools/depends/native/cargo-c/CARGO-C-VERSION\n create mode 100644 tools/depends/native/cargo-c/Makefile\n create mode 100644 tools/depends/native/rustup/Makefile\n create mode 100644 tools/depends/native/rustup/RUSTUP-VERSION\n create mode 100644 tools/depends/target/libdovi/LIBDOVI-VERSION\n create mode 100644 tools/depends/target/libdovi/Makefile\n\ndiff --git a/docs/README.Android.md b/docs/README.Android.md\nindex ecc0dcbbd1..48c7881d4b 100644\n--- a/docs/README.Android.md\n+++ b/docs/README.Android.md\n@@ -236,6 +236,10 @@ make -j$(getconf _NPROCESSORS_ONLN)\n ```\n   FFmpeg configure options, e.g. --enable-vaapi (target)\n \n+```\n+--enable-libdovi=<yes:no>\n+```\n+  enable `libdovi`, for on-the-fly Dolby Vision conversion. Defaults to no.\n \n **Android Specific:**\n \ndiff --git a/tools/depends/Makefile.include.in b/tools/depends/Makefile.include.in\nindex 3a36d20d68..03c27df67b 100644\n--- a/tools/depends/Makefile.include.in\n+++ b/tools/depends/Makefile.include.in\n@@ -31,6 +31,7 @@ SHA512SUM=@SHA512SUM@\n SHA256SUM=@SHA256SUM@\n SHASUM=@SHASUM@\n HASH_TOOL_FLAGS=-c --status\n+ENABLE_LIBDOVI=@use_libdovi@\n \n HAS_ZLIB=@has_zlib@\n NEED_LIBICONV=@need_libiconv@\ndiff --git a/tools/depends/configure.ac b/tools/depends/configure.ac\nindex 79ab65900b..929300b31e 100644\n--- a/tools/depends/configure.ac\n+++ b/tools/depends/configure.ac\n@@ -129,6 +129,11 @@ AC_ARG_WITH([ffmpeg-options],\n   [ffmpeg_options=$withval],\n   [ffmpeg_options=default])\n \n+AC_ARG_ENABLE([libdovi],\n+  [AS_HELP_STRING([--enable-libdovi],\n+  [enable libdovi (optional for android). default is no])],\n+  [use_libdovi=$enableval],\n+  [use_libdovi=no])\n \n if test \"$use_ccache\" = \"yes\"; then\n   AC_CHECK_PROG(HAVE_CCACHE,ccache,\"yes\",\"no\",)\n@@ -717,6 +722,7 @@ AC_SUBST(host_cxxflags)\n AC_SUBST(app_rendersystem)\n AC_SUBST(app_winsystem)\n AC_SUBST(ffmpeg_options)\n+AC_SUBST(use_libdovi)\n \n [\n if test \"x$CCACHE\" = \"x\"\n@@ -853,4 +859,5 @@ echo -e \"depends:\\t\\t $prefix/$deps_dir\"\n if test \"$platform_os\" = \"android\"; then\n   echo -e \"ndk-api-level:\\t $use_ndk_api\"\n   echo -e \"build-tools:\\t $build_tools_path\"\n+  echo -e \"libdovi:\\t $use_libdovi\"\n fi\ndiff --git a/tools/depends/native/Makefile b/tools/depends/native/Makefile\nindex 800270f8a3..7a3db29391 100644\n--- a/tools/depends/native/Makefile\n+++ b/tools/depends/native/Makefile\n@@ -50,6 +50,12 @@ ifeq ($(OS),linux)\n   endif\n endif\n \n+ifeq ($(OS),android)\n+  ifeq ($(ENABLE_LIBDOVI),yes)\n+    NATIVE += rustup cargo-c\n+  endif\n+endif\n+\n .PHONY: $(NATIVE) native\n \n all: native\n@@ -59,6 +65,7 @@ all: native\n autoconf-archive: autoconf\n autoconf: m4\n automake: autoconf\n+cargo-c: pkg-config openssl rustup\n dpkg: automake gettext libtool pkg-config tar\n heimdal: libtool\n JsonSchemaBuilder: automake\n@@ -102,4 +109,3 @@ test-dependencies:\n \n distclean::\n \tfor d in $(NATIVE); do $(MAKE) -C $$d distclean; done\n-\ndiff --git a/tools/depends/native/cargo-c/CARGO-C-VERSION b/tools/depends/native/cargo-c/CARGO-C-VERSION\nnew file mode 100644\nindex 0000000000..3d470c5729\n--- /dev/null\n+++ b/tools/depends/native/cargo-c/CARGO-C-VERSION\n@@ -0,0 +1,5 @@\n+APPNAME=cargo-c\n+BASE_URL=https://github.com/lu-zero/cargo-c/archive\n+VERSION=v0.9.17\n+ARCHIVE=$(VERSION).tar.gz\n+SHA512=529db1de509add6c3ad58932ee16326bf0a2e7d154797adbf2b3755ae98b4f59bf0d01250e75ad4fc63b7ea34579cded7d7c6c3c8b92db6d8e00994062ee136f\ndiff --git a/tools/depends/native/cargo-c/Makefile b/tools/depends/native/cargo-c/Makefile\nnew file mode 100644\nindex 0000000000..3c12014999\n--- /dev/null\n+++ b/tools/depends/native/cargo-c/Makefile\n@@ -0,0 +1,38 @@\n+include ../../Makefile.include CARGO-C-VERSION ../../download-files.include\n+DEPS = ../../Makefile.include Makefile CARGO-C-VERSION ../../download-files.include\n+\n+PREFIX=$(NATIVEPREFIX)\n+PLATFORM=$(NATIVEPLATFORM)\n+\n+export PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig\n+\n+APP=$(PLATFORM)/target/release/$(APPNAME)\n+\n+CARGO_ENV_VARS = RUSTUP_HOME=$(PREFIX)/.rustup \\\n+\tCARGO_HOME=$(PREFIX)/.cargo\n+CARGO = $(CARGO_ENV_VARS) $(PREFIX)/bin/cargo\n+\n+CLEANUP_CMD = [ -e $(PREFIX)/bin/cargo ] \\\n+\t&& $(CARGO) uninstall cargo-c || true\n+\n+all: .installed-$(PLATFORM)\n+\n+$(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE)\n+\trm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)\n+\tcd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)\n+\n+$(APP): $(PLATFORM)\n+\t$(CARGO) build --release --manifest-path $(PLATFORM)/Cargo.toml\n+\n+.installed-$(PLATFORM): $(APP)\n+\t$(CARGO) install --profile release --path $(PLATFORM)\n+\n+\ttouch $@\n+\n+clean:\n+\t$(CLEANUP_CMD)\n+\trm -f .installed-$(PLATFORM)\n+\n+distclean::\n+\t$(CLEANUP_CMD)\n+\trm -rf $(PLATFORM) .installed-$(PLATFORM)\ndiff --git a/tools/depends/native/rustup/Makefile b/tools/depends/native/rustup/Makefile\nnew file mode 100644\nindex 0000000000..67c014b97e\n--- /dev/null\n+++ b/tools/depends/native/rustup/Makefile\n@@ -0,0 +1,48 @@\n+include ../../Makefile.include RUSTUP-VERSION ../../download-files.include\n+DEPS = ../../Makefile.include Makefile RUSTUP-VERSION ../../download-files.include\n+\n+PREFIX=$(NATIVEPREFIX)\n+PLATFORM=$(NATIVEPLATFORM)\n+\n+export RUSTUP_HOME=$(PREFIX)/.rustup\n+export CARGO_HOME=$(PREFIX)/.cargo\n+\n+APP=$(PLATFORM)/bin/$(APPNAME)\n+\n+RUSTUP_ENV_VARS = RUSTUP_HOME=$(PREFIX)/.rustup \\\n+\tCARGO_HOME=$(PREFIX)/.cargo\n+RUSTUP = $(RUSTUP_ENV_VARS) $(PREFIX)/bin/rustup\n+\n+CLEANUP_CMD=[ -e $(PREFIX)/bin/rustup ] \\\n+\t&& $(RUSTUP) self uninstall -y \\\n+\t&& rm -f $(PREFIX)/bin/rustup \\\n+\t&& rm -f $(PREFIX)/bin/cargo || true\n+\n+all: .installed-$(PLATFORM)\n+\n+$(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE)\n+\trm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)\n+\tcd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)\n+\n+$(APP): $(PLATFORM)\n+\tbash $(PLATFORM)/rustup-init.sh --no-modify-path -y\n+\n+.installed-$(PLATFORM): $(APP)\n+\tln -sf $(CARGO_HOME)/bin/rustup $(PREFIX)/bin/rustup\n+\tln -sf $(CARGO_HOME)/bin/cargo $(PREFIX)/bin/cargo\n+\n+\t$(RUSTUP) default stable\n+\n+ifeq ($(CROSS_COMPILING),yes)\n+\t$(RUSTUP) target add $(HOST)\n+endif\n+\n+\ttouch $@\n+\n+clean:\n+\t$(CLEANUP_CMD)\n+\trm -f .installed-$(PLATFORM)\n+\n+distclean::\n+\t$(CLEANUP_CMD)\n+\trm -rf $(PLATFORM) .installed-$(PLATFORM)\ndiff --git a/tools/depends/native/rustup/RUSTUP-VERSION b/tools/depends/native/rustup/RUSTUP-VERSION\nnew file mode 100644\nindex 0000000000..74bd54c23a\n--- /dev/null\n+++ b/tools/depends/native/rustup/RUSTUP-VERSION\n@@ -0,0 +1,5 @@\n+APPNAME=rustup\n+BASE_URL=https://github.com/rust-lang/rustup.rs/archive\n+VERSION=1.25.1\n+ARCHIVE=$(VERSION).tar.gz\n+SHA512=a77cb34ba0c2e7577c8acbd474197aabaa84e3b64b3c42f1d0c328df55c6accbe412aba9a787f0ea2f0654f085475455c9c488b2b6de34ad8889a2716d1e8d0c\ndiff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile\nindex 28d122a602..4e18ed08ef 100644\n--- a/tools/depends/target/Makefile\n+++ b/tools/depends/target/Makefile\n@@ -79,6 +79,10 @@ ifeq ($(OS),android)\n   DEPENDS += dummy-libxbmc libuuid\n   PYMODULE_DEPS = dummy-libxbmc\n   LIBUUID = libuuid\n+\n+  ifeq ($(ENABLE_LIBDOVI),yes)\n+    DEPENDS += libdovi\n+  endif\n endif\n \n DEPENDS := $(filter-out $(EXCLUDED_DEPENDS),$(DEPENDS))\ndiff --git a/tools/depends/target/libdovi/LIBDOVI-VERSION b/tools/depends/target/libdovi/LIBDOVI-VERSION\nnew file mode 100644\nindex 0000000000..1fe73ed11f\n--- /dev/null\n+++ b/tools/depends/target/libdovi/LIBDOVI-VERSION\n@@ -0,0 +1,6 @@\n+LIBNAME=libdovi\n+BASE_URL=https://github.com/quietvoid/dovi_tool/archive\n+VERSION=libdovi-3.1.2\n+ARCHIVE=$(VERSION).tar.gz\n+SHA512=577d5a5916dedbf222150ddb76219325e0e9a7ae91c5978b1b1fd65048d1f548e29aa8ebbbdc836380ec399e2bc105a722515f783be70837dc6403cb34586bb2\n+BYPRODUCT=libdovi.a\ndiff --git a/tools/depends/target/libdovi/Makefile b/tools/depends/target/libdovi/Makefile\nnew file mode 100644\nindex 0000000000..2d868d2fde\n--- /dev/null\n+++ b/tools/depends/target/libdovi/Makefile\n@@ -0,0 +1,43 @@\n+include ../../Makefile.include LIBDOVI-VERSION ../../download-files.include\n+DEPS = ../../Makefile.include Makefile LIBDOVI-VERSION ../../download-files.include\n+\n+LIBDYLIB=$(PLATFORM)/target/$(HOST)/release/$(BYPRODUCT)\n+\n+CARGO_ENV_VARS = RUSTUP_HOME=$(NATIVEPREFIX)/.rustup \\\n+\tCARGO_HOME=$(NATIVEPREFIX)/.cargo\n+CARGO = $(CARGO_ENV_VARS) $(NATIVEPREFIX)/bin/cargo\n+\n+CARGO_BASE_OPTS = --manifest-path $(PLATFORM)/dolby_vision/Cargo.toml\n+ifeq ($(CROSS_COMPILING),yes)\n+  CARGO_BASE_OPTS += --target $(HOST)\n+endif\n+\n+CARGO_BUILD_OPTS = --offline \\\n+\t--frozen \\\n+\t--library-type staticlib \\\n+\t--profile release \\\n+\t--prefix $(PREFIX) \\\n+\t$(CARGO_BASE_OPTS)\n+\n+all: .installed-$(PLATFORM)\n+\n+$(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE)\n+\trm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)\n+\tcd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)\n+\tcd $(PLATFORM);\n+\t$(CARGO) fetch $(CARGO_BASE_OPTS)\n+\n+$(LIBDYLIB): $(PLATFORM)\n+\t$(CARGO) cbuild $(CARGO_BUILD_OPTS)\n+\n+.installed-$(PLATFORM): $(LIBDYLIB)\n+\t$(CARGO) cinstall $(CARGO_BUILD_OPTS)\n+\n+\ttouch $@\n+\n+clean:\n+\tcd $(PLATFORM); $(CARGO) clean\n+\trm -f .installed-$(PLATFORM)\n+\n+distclean::\n+\trm -rf $(PLATFORM) .installed-$(PLATFORM)\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0006-Add-libdovi-as-optional-build-dependency.patch",
    "content": "From e4d478490bdefd7977285e1a5b807525791621c7 Mon Sep 17 00:00:00 2001\nFrom: quietvoid <39477805+quietvoid@users.noreply.github.com>\nDate: Sat, 11 Mar 2023 08:40:00 -0500\nSubject: [PATCH 06/21] Add libdovi as optional build dependency\n\n---\n cmake/modules/FindLibDovi.cmake      | 32 ++++++++++++++++++++++++++++\n cmake/platform/android/android.cmake |  1 +\n 2 files changed, 33 insertions(+)\n create mode 100644 cmake/modules/FindLibDovi.cmake\n\ndiff --git a/cmake/modules/FindLibDovi.cmake b/cmake/modules/FindLibDovi.cmake\nnew file mode 100644\nindex 0000000000..8646ba368a\n--- /dev/null\n+++ b/cmake/modules/FindLibDovi.cmake\n@@ -0,0 +1,32 @@\n+# FindDovi\n+# -------\n+# Finds the libdovi library\n+#\n+# This will define the following variables::\n+#\n+# LIBDOVI_FOUND - system has libdovi\n+# LIBDOVI_INCLUDE_DIRS - the libdovi include directories\n+# LIBDOVI_LIBRARIES - the libdovi libraries\n+# LIBDOVI_DEFINITIONS - the libdovi compile definitions\n+\n+if(PKG_CONFIG_FOUND)\n+  pkg_check_modules(PC_LIBDOVI libdovi QUIET)\n+endif()\n+\n+find_library(LIBDOVI_LIBRARY NAMES dovi libdovi\n+                             PATHS ${PC_LIBDOVI_LIBDIR}\n+)\n+find_path(LIBDOVI_INCLUDE_DIR NAMES libdovi/rpu_parser.h\n+                              PATHS ${PC_LIBDOVI_INCLUDEDIR})\n+\n+include(FindPackageHandleStandardArgs)\n+find_package_handle_standard_args(LibDovi\n+                                  REQUIRED_VARS LIBDOVI_LIBRARY LIBDOVI_INCLUDE_DIR)\n+\n+if(LIBDOVI_FOUND)\n+  set(LIBDOVI_INCLUDE_DIRS ${LIBDOVI_INCLUDE_DIR})\n+  set(LIBDOVI_LIBRARIES ${LIBDOVI_LIBRARY})\n+  set(LIBDOVI_DEFINITIONS -DHAVE_LIBDOVI=1)\n+endif()\n+\n+mark_as_advanced(LIBDOVI_INCLUDE_DIR LIBDOVI_LIBRARY)\ndiff --git a/cmake/platform/android/android.cmake b/cmake/platform/android/android.cmake\nindex 2c4fbb48f2..ca3fad9dce 100644\n--- a/cmake/platform/android/android.cmake\n+++ b/cmake/platform/android/android.cmake\n@@ -1,5 +1,6 @@\n set(PLATFORM_REQUIRED_DEPS LibAndroidJNI OpenGLES EGL LibZip)\n set(APP_RENDER_SYSTEM gles)\n+list(APPEND PLATFORM_OPTIONAL_DEPS LibDovi)\n \n # Store SDK compile version\n set(TARGET_SDK 33)\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0007-Optionally-convert-Dolby-Vision.patch",
    "content": "From 918640afdbf41fa2670b104346ccb11ee2b2a455 Mon Sep 17 00:00:00 2001\nFrom: quietvoid <39477805+quietvoid@users.noreply.github.com>\nDate: Sat, 11 Mar 2023 08:40:03 -0500\nSubject: [PATCH 07/21] Optionally convert Dolby Vision\n\nTo improve compatibility\n---\n .../resources/strings.po                      | 12 +++\n system/settings/settings.xml                  |  9 +++\n .../Video/DVDVideoCodecAndroidMediaCodec.cpp  |  8 ++\n xbmc/settings/Settings.h                      |  1 +\n xbmc/utils/BitstreamConverter.cpp             | 76 ++++++++++++++++++-\n xbmc/utils/BitstreamConverter.h               |  2 +\n 6 files changed, 107 insertions(+), 1 deletion(-)\n\ndiff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po\nindex 27c0c9e8e9..2b2237e431 100644\n--- a/addons/resource.language.en_gb/resources/strings.po\n+++ b/addons/resource.language.en_gb/resources/strings.po\n@@ -23613,3 +23613,15 @@ msgstr \"\"\n msgctxt \"#39189\"\n msgid \"Available only with manual subtitle position\"\n msgstr \"\"\n+\n+#. Title of Dolby Vision RPU conversion setting\n+#: system/settings/settings.xml\n+msgctxt \"#39300\"\n+msgid \"Convert Dolby Vision for compatibility\"\n+msgstr \"\"\n+\n+#. Help text for setting \"Convert Dolby Vision for compatibility\" of label #39300\n+#: system/settings/settings.xml\n+msgctxt \"#39301\"\n+msgid \"Converts Dolby Vision profile 7 to profile 8.1, ignores enhancement layer\"\n+msgstr \"\"\ndiff --git a/system/settings/settings.xml b/system/settings/settings.xml\nindex 3621d3225d..12a58527d9 100755\n--- a/system/settings/settings.xml\n+++ b/system/settings/settings.xml\n@@ -228,6 +228,15 @@\n           <default>true</default>\n           <control type=\"toggle\" />\n         </setting>\n+        <setting id=\"videoplayer.convertdovi\" type=\"boolean\" label=\"39300\" help=\"39301\">\n+          <requirement>HAS_MEDIACODEC</requirement>\n+          <level>2</level>\n+          <default>false</default>\n+          <updates>\n+            <update type=\"change\" />\n+          </updates>\n+          <control type=\"toggle\" />\n+        </setting>\n       </group>\n       <group id=\"4\" label=\"14232\">\n         <setting id=\"videoplayer.stereoscopicplaybackmode\" type=\"integer\" label=\"36520\" help=\"36537\">\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\nindex ae8943655e..2135e7d6f8 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n@@ -543,7 +543,15 @@ bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptio\n         {\n           m_bitstream.reset();\n         }\n+\n+        if (m_bitstream)\n+        {\n+          bool convertDovi = CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n+              CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI);\n+          m_bitstream->SetConvertDovi(convertDovi);\n+        }\n       }\n+\n       break;\n     }\n     case AV_CODEC_ID_WMV3:\ndiff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h\nindex 8ac5485a9b..28e6c9d98d 100644\n--- a/xbmc/settings/Settings.h\n+++ b/xbmc/settings/Settings.h\n@@ -133,6 +133,7 @@ public:\n   static constexpr auto SETTING_VIDEOPLAYER_USESTAGEFRIGHT = \"videoplayer.usestagefright\";\n   static constexpr auto SETTING_VIDEOPLAYER_LIMITGUIUPDATE = \"videoplayer.limitguiupdate\";\n   static constexpr auto SETTING_VIDEOPLAYER_SUPPORTMVC = \"videoplayer.supportmvc\";\n+  static constexpr auto SETTING_VIDEOPLAYER_CONVERTDOVI = \"videoplayer.convertdovi\";\n   static constexpr auto SETTING_MYVIDEOS_SELECTACTION = \"myvideos.selectaction\";\n   static constexpr auto SETTING_MYVIDEOS_USETAGS = \"myvideos.usetags\";\n   static constexpr auto SETTING_MYVIDEOS_EXTRACTFLAGS = \"myvideos.extractflags\";\ndiff --git a/xbmc/utils/BitstreamConverter.cpp b/xbmc/utils/BitstreamConverter.cpp\nindex 52152a4312..c51ac92138 100644\n--- a/xbmc/utils/BitstreamConverter.cpp\n+++ b/xbmc/utils/BitstreamConverter.cpp\n@@ -20,6 +20,13 @@\n \n #include <algorithm>\n \n+extern \"C\"\n+{\n+#ifdef HAVE_LIBDOVI\n+#include <libdovi/rpu_parser.h>\n+#endif\n+}\n+\n enum {\n   AVC_NAL_SLICE=1,\n   AVC_NAL_DPA,\n@@ -269,6 +276,32 @@ static bool has_sei_recovery_point(const uint8_t *p, const uint8_t *end)\n   return false;\n }\n \n+#ifdef HAVE_LIBDOVI\n+// The returned data must be freed with `dovi_data_free`\n+// May be NULL if no conversion was done\n+static const DoviData* convert_dovi_rpu_nal(uint8_t* buf, uint32_t nal_size)\n+{\n+  DoviRpuOpaque* rpu = dovi_parse_unspec62_nalu(buf, nal_size);\n+  const DoviRpuDataHeader* header = dovi_rpu_get_header(rpu);\n+  const DoviData* rpu_data = NULL;\n+\n+  if (header && header->guessed_profile == 7)\n+  {\n+    int ret = dovi_convert_rpu_with_mode(rpu, 2);\n+    if (ret < 0)\n+      goto done;\n+\n+    rpu_data = dovi_write_unspec62_nalu(rpu);\n+  }\n+\n+done:\n+  dovi_rpu_free_header(header);\n+  dovi_rpu_free(rpu);\n+\n+  return rpu_data;\n+}\n+#endif\n+\n ////////////////////////////////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////////////////////////////\n CBitstreamParser::CBitstreamParser() = default;\n@@ -336,6 +369,7 @@ CBitstreamConverter::CBitstreamConverter()\n   m_convert_bytestream = false;\n   m_sps_pps_context.sps_pps_data = NULL;\n   m_start_decode = true;\n+  m_convert_dovi = false;\n }\n \n CBitstreamConverter::~CBitstreamConverter()\n@@ -894,6 +928,10 @@ bool CBitstreamConverter::BitstreamConvert(uint8_t* pData, int iSize, uint8_t **\n   uint32_t cumul_size = 0;\n   const uint8_t *buf_end = buf + buf_size;\n \n+#ifdef HAVE_LIBDOVI\n+  const DoviData* rpu_data = NULL;\n+#endif\n+\n   switch (m_codec)\n   {\n     case AV_CODEC_ID_H264:\n@@ -947,12 +985,48 @@ bool CBitstreamConverter::BitstreamConvert(uint8_t* pData, int iSize, uint8_t **\n     }\n     else\n     {\n-      BitstreamAllocAndCopy(poutbuf, poutbuf_size, NULL, 0, buf, nal_size, unit_type);\n+      bool write_buf = true;\n+      const uint8_t* buf_to_write = buf;\n+      int32_t final_nal_size = nal_size;\n+\n       if (!m_sps_pps_context.first_idr && IsSlice(unit_type))\n       {\n           m_sps_pps_context.first_idr = 1;\n           m_sps_pps_context.idr_sps_pps_seen = 0;\n       }\n+\n+      if (m_convert_dovi)\n+      {\n+        if (unit_type == HEVC_NAL_UNSPEC62)\n+        {\n+#ifdef HAVE_LIBDOVI\n+          // Convert the RPU itself\n+          rpu_data = convert_dovi_rpu_nal(buf, nal_size);\n+          if (rpu_data)\n+          {\n+            buf_to_write = rpu_data->data;\n+            final_nal_size = rpu_data->len;\n+          }\n+#endif\n+        }\n+        else if (unit_type == HEVC_NAL_UNSPEC63)\n+        {\n+          // Ignore the enhancement layer, may or may not help\n+          write_buf = false;\n+        }\n+      }\n+\n+      if (write_buf)\n+        BitstreamAllocAndCopy(poutbuf, poutbuf_size, NULL, 0, buf_to_write, final_nal_size,\n+                              unit_type);\n+\n+#ifdef HAVE_LIBDOVI\n+      if (rpu_data)\n+      {\n+        dovi_data_free(rpu_data);\n+        rpu_data = NULL;\n+      }\n+#endif\n     }\n \n     buf += nal_size;\ndiff --git a/xbmc/utils/BitstreamConverter.h b/xbmc/utils/BitstreamConverter.h\nindex 355818ed8f..4381599b21 100644\n--- a/xbmc/utils/BitstreamConverter.h\n+++ b/xbmc/utils/BitstreamConverter.h\n@@ -104,6 +104,7 @@ public:\n   int               GetExtraSize() const;\n   void              ResetStartDecode(void);\n   bool              CanStartDecode() const;\n+  void SetConvertDovi(bool value) { m_convert_dovi = value; }\n \n   static bool       mpeg2_sequence_header(const uint8_t *data, const uint32_t size, mpeg2_sequence *sequence);\n   static bool       h264_sequence_header(const uint8_t *data, const uint32_t size, h264_sequence *sequence);\n@@ -150,4 +151,5 @@ protected:\n   bool              m_convert_bytestream;\n   AVCodecID         m_codec;\n   bool              m_start_decode;\n+  bool m_convert_dovi;\n };\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0008-tools-depends-Enable-libdovi-by-default.patch",
    "content": "From 733957e20ecb3c1694ac5952a85974da11e5ae22 Mon Sep 17 00:00:00 2001\nFrom: quietvoid <39477805+quietvoid@users.noreply.github.com>\nDate: Sat, 11 Mar 2023 08:40:06 -0500\nSubject: [PATCH 08/21] tools/depends: Enable libdovi by default\n\nTemporarily\n---\n tools/depends/configure.ac | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/tools/depends/configure.ac b/tools/depends/configure.ac\nindex 929300b31e..f084ce9d2b 100644\n--- a/tools/depends/configure.ac\n+++ b/tools/depends/configure.ac\n@@ -133,7 +133,7 @@ AC_ARG_ENABLE([libdovi],\n   [AS_HELP_STRING([--enable-libdovi],\n   [enable libdovi (optional for android). default is no])],\n   [use_libdovi=$enableval],\n-  [use_libdovi=no])\n+  [use_libdovi=yes])\n \n if test \"$use_ccache\" = \"yes\"; then\n   AC_CHECK_PROG(HAVE_CCACHE,ccache,\"yes\",\"no\",)\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0009-libdovi-use-and-adjust-libdovi-for-Amlogic-linux-pla.patch",
    "content": "From c3bf4157843319e7c457a89dd02355347d91507e Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 6 Apr 2023 21:07:55 +0200\nSubject: [PATCH 09/21] libdovi: use and adjust libdovi for Amlogic linux\n platform\n\n---\n cmake/platform/linux/aml.cmake                 |  1 +\n system/settings/settings.xml                   |  9 +++++++--\n tools/depends/target/Makefile                  |  8 ++++----\n .../DVDCodecs/Video/DVDVideoCodecAmlogic.cpp   | 18 ++++++++++++++++++\n 4 files changed, 30 insertions(+), 6 deletions(-)\n\ndiff --git a/cmake/platform/linux/aml.cmake b/cmake/platform/linux/aml.cmake\nindex 4206c283e2..673877bd16 100644\n--- a/cmake/platform/linux/aml.cmake\n+++ b/cmake/platform/linux/aml.cmake\n@@ -1,2 +1,3 @@\n list(APPEND PLATFORM_REQUIRED_DEPS OpenGLES AML EGL LibInput Xkbcommon)\n set(APP_RENDER_SYSTEM gles)\n+list(APPEND PLATFORM_OPTIONAL_DEPS LibDovi)\ndiff --git a/system/settings/settings.xml b/system/settings/settings.xml\nindex 12a58527d9..5268475ca7 100755\n--- a/system/settings/settings.xml\n+++ b/system/settings/settings.xml\n@@ -229,9 +229,14 @@\n           <control type=\"toggle\" />\n         </setting>\n         <setting id=\"videoplayer.convertdovi\" type=\"boolean\" label=\"39300\" help=\"39301\">\n-          <requirement>HAS_MEDIACODEC</requirement>\n+          <requirement>\n+            <or>\n+              <condition>HAS_MEDIACODEC</condition>\n+              <condition>HAVE_AMCODEC</condition>\n+            </or>\n+          </requirement>\n           <level>2</level>\n-          <default>false</default>\n+          <default>true</default>\n           <updates>\n             <update type=\"change\" />\n           </updates>\ndiff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile\nindex 4e18ed08ef..91ea4db5ef 100644\n--- a/tools/depends/target/Makefile\n+++ b/tools/depends/target/Makefile\n@@ -79,10 +79,6 @@ ifeq ($(OS),android)\n   DEPENDS += dummy-libxbmc libuuid\n   PYMODULE_DEPS = dummy-libxbmc\n   LIBUUID = libuuid\n-\n-  ifeq ($(ENABLE_LIBDOVI),yes)\n-    DEPENDS += libdovi\n-  endif\n endif\n \n DEPENDS := $(filter-out $(EXCLUDED_DEPENDS),$(DEPENDS))\n@@ -126,6 +122,10 @@ ifeq ($(OS),linux)\n   endif\n endif\n \n+ifeq ($(ENABLE_LIBDOVI),yes)\n+  DEPENDS += libdovi\n+endif\n+\n .PHONY: $(DEPENDS)\n \n all: .installed-$(PLATFORM)\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\nindex 4ce0c3e48f..9d518f0051 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\n@@ -277,6 +277,24 @@ bool CDVDVideoCodecAmlogic::Open(CDVDStreamInfo &hints, CDVDCodecOptions &option\n       m_pFormatName = \"am-h265\";\n       m_bitstream = new CBitstreamConverter();\n       m_bitstream->Open(m_hints.codec, (uint8_t*)m_hints.extradata, m_hints.extrasize, true);\n+\n+      // check for hevc-hvcC and convert to h265-annex-b\n+      if (m_hints.extradata && !m_hints.cryptoSession)\n+      {\n+        if (m_bitstream && aml_support_dolby_vision())\n+        {\n+          bool convertDovi = CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n+              CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI);\n+          bool user_dv_disable = CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n+              CSettings::SETTING_COREELEC_AMLOGIC_DV_DISABLE);\n+          if (convertDovi && !user_dv_disable)\n+          {\n+            CLog::Log(LOGDEBUG, \"{}::{} - HEVC bitstream profile 7 will be converted to profile 8\", __MODULE_NAME__, __FUNCTION__);\n+            m_bitstream->SetConvertDovi(convertDovi && !user_dv_disable);\n+          }\n+        }\n+      }\n+\n       // make sure we do not leak the existing m_hints.extradata\n       free(m_hints.extradata);\n       m_hints.extrasize = m_bitstream->GetExtraSize();\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0010-AMLCodec-add-support-of-Dolby-Vision.patch",
    "content": "From 75e4138e9b05ba26a2573b930bda53a6e44ccc5e Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Wed, 29 Mar 2023 16:36:49 +0200\nSubject: [PATCH 10/21] AMLCodec: add support of Dolby Vision If 'dovi.ko' is\n available enable the DV option.\n\n---\n .../resources/strings.po                      | 10 +++++\n system/settings/settings.xml                  |  5 +++\n .../VideoPlayer/DVDCodecs/Video/AMLCodec.cpp  | 45 +++++++++++++++++++\n xbmc/settings/Settings.h                      |  1 +\n xbmc/utils/AMLUtils.cpp                       | 20 +++++++++\n xbmc/utils/AMLUtils.h                         |  1 +\n xbmc/windowing/amlogic/WinSystemAmlogic.cpp   | 17 +++++++\n 7 files changed, 99 insertions(+)\n\ndiff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po\nindex 2b2237e431..285d5d07b2 100644\n--- a/addons/resource.language.en_gb/resources/strings.po\n+++ b/addons/resource.language.en_gb/resources/strings.po\n@@ -8669,6 +8669,16 @@ msgctxt \"#14295\"\n msgid \"4:4:4\"\n msgstr \"\"\n \n+#: system/settings/settings.xml\n+msgctxt \"#14296\"\n+msgid \"Disable Dolby Vision support\"\n+msgstr \"\"\n+\n+#: system/settings/settings.xml\n+msgctxt \"#14297\"\n+msgid \"Use this option to disable Dolby Vision support if available.\"\n+msgstr \"\"\n+\n #empty strings from id 14296 to 14300\n \n #. pvr \"channels\" settings group label\ndiff --git a/system/settings/settings.xml b/system/settings/settings.xml\nindex 5268475ca7..1b95376834 100755\n--- a/system/settings/settings.xml\n+++ b/system/settings/settings.xml\n@@ -3681,6 +3681,11 @@\n             <dependency type=\"enable\" setting=\"coreelec.amlogic.sdr2hdr\" operator=\"is\">false</dependency>\n           </dependencies>\n         </setting>\n+        <setting id=\"coreelec.amlogic.disabledolbyvision\" type=\"boolean\" label=\"14296\" help=\"14297\">\n+          <requirement>HAVE_AMCODEC</requirement>\n+          <default>false</default>\n+          <control type=\"toggle\" />\n+        </setting>\n       </group>\n     </category>\n     <category id=\"cache\" label=\"439\" help=\"36399\">\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\nindex 7ae850d048..59777ee196 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n@@ -22,6 +22,7 @@\n #include \"settings/SettingsComponent.h\"\n #include \"utils/AMLUtils.h\"\n #include \"utils/log.h\"\n+#include \"utils/StreamDetails.h\"\n #include \"utils/StringUtils.h\"\n #include \"utils/TimeUtils.h\"\n #include \"ServiceBroker.h\"\n@@ -110,6 +111,7 @@ typedef struct {\n   void          *param;\n   dec_mode_t    dec_mode;\n   enum FRAME_BASE_VIDEO_PATH video_path;\n+  unsigned int  dv_enable;\n } aml_generic_param;\n \n class DllLibamCodecInterface\n@@ -218,6 +220,7 @@ public:\n     p_out->am_sysinfo.param   = p_in->param;\n     p_out->dec_mode           = p_in->dec_mode;\n     p_out->video_path         = p_in->video_path;\n+    p_out->dv_enable          = p_in->dv_enable;\n   }\n };\n \n@@ -1965,6 +1968,15 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n     hints.aspect, video_ratio.num, video_ratio.den);\n   CLog::Log(LOGDEBUG, \"CAMLCodec::OpenDecoder hints.orientation({:d}), hints.forced_aspect({:d}), hints.extrasize({:d})\",\n     hints.orientation, hints.forced_aspect, hints.extrasize);\n+\n+  std::string hdrType = CStreamDetails::HdrTypeToString(hints.hdrType);\n+  if (hdrType.size())\n+    CLog::Log(LOGDEBUG, \"CAMLCodec::OpenDecoder hdr type: {}\", hdrType);\n+\n+  if (hints.hdrType == StreamHdrType::HDR_TYPE_DOLBYVISION)\n+    CLog::Log(LOGDEBUG, \"CAMLCodec::OpenDecoder DOVI: version {:d}.{:d}, profile {:d}\",\n+      hints.dovi.dv_version_major, hints.dovi.dv_version_minor, hints.dovi.dv_profile);\n+\n   m_processInfo.SetVideoDAR(hints.aspect);\n   CLog::Log(LOGDEBUG, \"CAMLCodec::OpenDecoder decoder timeout: {:d}s\",\n     m_decoder_timeout);\n@@ -1984,6 +1996,33 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n   am_private->gcodec.dec_mode    = STREAM_TYPE_FRAME;\n   am_private->gcodec.video_path  = FRAME_BASE_PATH_AMLVIDEO_AMVIDEO;\n \n+  // enable Dolby Vision driver when 'dovi.ko' is available\n+  bool device_support_dv(aml_support_dolby_vision());\n+  bool user_dv_disable(CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_COREELEC_AMLOGIC_DV_DISABLE));\n+  bool dv_enable(device_support_dv && !user_dv_disable && hints.hdrType == StreamHdrType::HDR_TYPE_DOLBYVISION);\n+  CLog::Log(LOGDEBUG, \"CAMLCodec::OpenDecoder {}DV support, {}, DV system is {}\", device_support_dv ? \"\" : \"no \",\n+    user_dv_disable ? \"disabled\" : \"enabled\", dv_enable ? \"enabled\" : \"disabled\");\n+  if (dv_enable)\n+  {\n+    // enable Dolby Vision\n+    CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 1);\n+\n+    am_private->gcodec.dv_enable = 1;\n+    if (hints.dovi.dv_profile == 7 && !CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n+        CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI))\n+    {\n+      CSysfsPath amdolby_vision_debug{\"/sys/class/amdolby_vision/debug\"};\n+      if (amdolby_vision_debug.Exists())\n+        amdolby_vision_debug.Set(\"enable_fel 1\");\n+      am_private->gcodec.dec_mode  = STREAM_TYPE_STREAM;\n+    }\n+  }\n+  else if (device_support_dv)\n+  {\n+    // disable Dolby Vision\n+    CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 0);\n+  }\n+\n   // DEC_CONTROL_FLAG_DISABLE_FAST_POC\n   CSysfsPath(\"/sys/module/amvdec_h264/parameters/dec_control\", 4);\n \n@@ -2241,6 +2280,12 @@ void CAMLCodec::CloseDecoder()\n     free(am_private->vcodec.config);\n   // return tsync to default so external apps work\n   CSysfsPath(\"/sys/class/tsync/enable\", 1);\n+  // disable Dolby Vision driver\n+  //CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 0);\n+  // don't disable it as it would not switch back to non DV mode anymore\n+  CSysfsPath amdolby_vision_debug{\"/sys/class/amdolby_vision/debug\"};\n+  if (amdolby_vision_debug.Exists())\n+    amdolby_vision_debug.Set(\"enable_fel 0\");\n \n   ShowMainVideo(false);\n \ndiff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h\nindex 28e6c9d98d..8e5a31e1d7 100644\n--- a/xbmc/settings/Settings.h\n+++ b/xbmc/settings/Settings.h\n@@ -441,6 +441,7 @@ public:\n   static constexpr auto SETTING_COREELEC_AMLOGIC_LIMIT_CD = \"coreelec.amlogic.limitcd\";\n   static constexpr auto SETTING_COREELEC_AMLOGIC_FORCE_CS = \"coreelec.amlogic.forcecs\";\n   static constexpr auto SETTING_COREELEC_AMLOGIC_DISABLEGUISCALING = \"coreelec.amlogic.disableguiscaling\";\n+  static constexpr auto SETTING_COREELEC_AMLOGIC_DV_DISABLE = \"coreelec.amlogic.disabledolbyvision\";\n   static constexpr auto SETTING_CACHE_HARDDISK = \"cache.harddisk\";\n   static constexpr auto SETTING_CACHEVIDEO_DVDROM = \"cachevideo.dvdrom\";\n   static constexpr auto SETTING_CACHEVIDEO_LAN = \"cachevideo.lan\";\ndiff --git a/xbmc/utils/AMLUtils.cpp b/xbmc/utils/AMLUtils.cpp\nindex 81f74448a8..c9e60d5c5f 100644\n--- a/xbmc/utils/AMLUtils.cpp\n+++ b/xbmc/utils/AMLUtils.cpp\n@@ -148,6 +148,26 @@ bool aml_support_av1()\n   return (has_av1 == 1);\n }\n \n+bool aml_support_dolby_vision()\n+{\n+  static int support_dv = -1;\n+\n+  if (support_dv == -1)\n+  {\n+    CSysfsPath support_info{\"/sys/class/amdolby_vision/support_info\"};\n+    support_dv = 0;\n+    if (support_info.Exists())\n+    {\n+      support_dv = (int)((support_info.Get<int>().value() & 7) == 7);\n+      CSysfsPath ko_info{\"/sys/class/amdolby_vision/ko_info\"};\n+      if (ko_info.Exists())\n+        CLog::Log(LOGDEBUG, \"Amlogic Dolby Vision info: {}\", ko_info.Get<std::string>().value().c_str());\n+    }\n+  }\n+\n+  return (support_dv == 1);\n+}\n+\n bool aml_has_frac_rate_policy()\n {\n   static int has_frac_rate_policy = -1;\ndiff --git a/xbmc/utils/AMLUtils.h b/xbmc/utils/AMLUtils.h\nindex bfb06194bc..25e95d6961 100644\n--- a/xbmc/utils/AMLUtils.h\n+++ b/xbmc/utils/AMLUtils.h\n@@ -56,6 +56,7 @@ bool aml_support_hevc_10bit();\n AML_SUPPORT_H264_4K2K aml_support_h264_4k2k();\n bool aml_support_vp9();\n bool aml_support_av1();\n+bool aml_support_dolby_vision();\n bool aml_has_frac_rate_policy();\n void aml_set_audio_passthrough(bool passthrough);\n bool aml_mode_to_resolution(const char *mode, RESOLUTION_INFO *res);\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\nindex 0a52b95144..616c205e6f 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n@@ -90,6 +90,23 @@ bool CWinSystemAmlogic::InitWindowSystem()\n     CSysfsPath(\"/sys/module/am_vecm/parameters/hdr_mode\", 1);\n   }\n \n+  if (!aml_support_dolby_vision())\n+  {\n+    auto setting = settings->GetSetting(CSettings::SETTING_COREELEC_AMLOGIC_DV_DISABLE);\n+    if (setting)\n+    {\n+      setting->SetVisible(false);\n+      settings->SetBool(CSettings::SETTING_COREELEC_AMLOGIC_DV_DISABLE, false);\n+    }\n+\n+    setting = settings->GetSetting(CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI);\n+    if (setting)\n+    {\n+      setting->SetVisible(false);\n+      settings->SetBool(CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI, true);\n+    }\n+  }\n+\n   m_nativeDisplay = EGL_DEFAULT_DISPLAY;\n \n   CDVDVideoCodecAmlogic::Register();\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0011-libdovi-add-option-to-change-used-mode.patch",
    "content": "From 0fb60a17b2401ab655f5b2674e902545b144795a Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 11 Apr 2023 15:06:33 +0200\nSubject: [PATCH 11/21] libdovi: add option to change used mode Modes:  0:\n Don't modify the RPU  1: Converts the RPU to be MEL compatible  2: Converts\n the RPU to be profile 8.1 compatible.     Both luma and chroma mapping curves\n are set to no-op.     This mode handles source profiles 5, 7 and 8.  3:\n Converts to static profile 8.4  4: Converts to profile 8.1 preserving luma\n and chroma mapping.     Old mode 2 behaviour. Reference:\n https://github.com/quietvoid/dovi_tool/blob/main/dolby_vision/src/rpu/dovi_rpu.rs\n\n---\n .../resources/strings.po                      | 32 ++++++++++++++++++-\n system/settings/settings.xml                  | 16 ++++++++--\n .../VideoPlayer/DVDCodecs/Video/AMLCodec.cpp  |  4 +--\n .../DVDCodecs/Video/DVDVideoCodecAmlogic.cpp  |  7 ++--\n .../Video/DVDVideoCodecAndroidMediaCodec.cpp  |  2 +-\n xbmc/utils/BitstreamConverter.cpp             |  8 ++---\n xbmc/utils/BitstreamConverter.h               |  4 +--\n xbmc/windowing/amlogic/WinSystemAmlogic.cpp   |  2 +-\n 8 files changed, 58 insertions(+), 17 deletions(-)\n\ndiff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po\nindex 285d5d07b2..3b05260f01 100644\n--- a/addons/resource.language.en_gb/resources/strings.po\n+++ b/addons/resource.language.en_gb/resources/strings.po\n@@ -23633,5 +23633,35 @@ msgstr \"\"\n #. Help text for setting \"Convert Dolby Vision for compatibility\" of label #39300\n #: system/settings/settings.xml\n msgctxt \"#39301\"\n-msgid \"Converts Dolby Vision profile 7 to profile 8.1, ignores enhancement layer\"\n+msgid \"Converts Dolby Vision profile 7 by chosen mode\"\n+msgstr \"\"\n+\n+#. Enum value for \"Convert Dolby Vision for compatibility\" of label #39300\n+#: system/settings/settings.xml\n+msgctxt \"#39302\"\n+msgid \"Lossless\"\n+msgstr \"\"\n+\n+#. Enum value for \"Convert Dolby Vision for compatibility\" of label #39300\n+#: system/settings/settings.xml\n+msgctxt \"#39303\"\n+msgid \"Minimal EL\"\n+msgstr \"\"\n+\n+#. Enum value for \"Convert Dolby Vision for compatibility\" of label #39300\n+#: system/settings/settings.xml\n+msgctxt \"#39304\"\n+msgid \"Profile 8.1\"\n+msgstr \"\"\n+\n+#. Enum value for \"Convert Dolby Vision for compatibility\" of label #39300\n+#: system/settings/settings.xml\n+msgctxt \"#39305\"\n+msgid \"Profile 8.4\"\n+msgstr \"\"\n+\n+#. Enum value for \"Convert Dolby Vision for compatibility\" of label #39300\n+#: system/settings/settings.xml\n+msgctxt \"#39306\"\n+msgid \"Profile 8.1 MP\"\n msgstr \"\"\ndiff --git a/system/settings/settings.xml b/system/settings/settings.xml\nindex 1b95376834..7ede7a22bb 100755\n--- a/system/settings/settings.xml\n+++ b/system/settings/settings.xml\n@@ -228,7 +228,7 @@\n           <default>true</default>\n           <control type=\"toggle\" />\n         </setting>\n-        <setting id=\"videoplayer.convertdovi\" type=\"boolean\" label=\"39300\" help=\"39301\">\n+        <setting id=\"videoplayer.convertdovi\" type=\"integer\" label=\"39300\" help=\"39301\">\n           <requirement>\n             <or>\n               <condition>HAS_MEDIACODEC</condition>\n@@ -236,11 +236,21 @@\n             </or>\n           </requirement>\n           <level>2</level>\n-          <default>true</default>\n+          <default>2</default>\n           <updates>\n             <update type=\"change\" />\n           </updates>\n-          <control type=\"toggle\" />\n+          <constraints>\n+            <options>\n+              <option label=\"39302\">0</option>  <!-- Lossless -->\n+              <option label=\"39303\">1</option>  <!-- ToMel -->\n+              <option label=\"39304\">2</option>  <!-- To81 -->\n+              <option label=\"39305\">3</option>  <!-- To84 -->\n+              <option label=\"39306\">4</option>  <!-- To81MappingPreserved -->\n+            </options>\n+          </constraints>\n+          <control type=\"spinner\" format=\"string\" />\n+          <control type=\"edit\" format=\"integer\" />\n         </setting>\n       </group>\n       <group id=\"4\" label=\"14232\">\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\nindex 59777ee196..8a7344d805 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n@@ -2008,8 +2008,8 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n     CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 1);\n \n     am_private->gcodec.dv_enable = 1;\n-    if (hints.dovi.dv_profile == 7 && !CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n-        CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI))\n+    if (hints.dovi.dv_profile == 7 && CServiceBroker::GetSettingsComponent()->GetSettings()->GetInt(\n+        CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI) == 0)\n     {\n       CSysfsPath amdolby_vision_debug{\"/sys/class/amdolby_vision/debug\"};\n       if (amdolby_vision_debug.Exists())\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\nindex 9d518f0051..12f81442d7 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\n@@ -283,14 +283,15 @@ bool CDVDVideoCodecAmlogic::Open(CDVDStreamInfo &hints, CDVDCodecOptions &option\n       {\n         if (m_bitstream && aml_support_dolby_vision())\n         {\n-          bool convertDovi = CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n+          int convertDovi = CServiceBroker::GetSettingsComponent()->GetSettings()->GetInt(\n               CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI);\n           bool user_dv_disable = CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n               CSettings::SETTING_COREELEC_AMLOGIC_DV_DISABLE);\n           if (convertDovi && !user_dv_disable)\n           {\n-            CLog::Log(LOGDEBUG, \"{}::{} - HEVC bitstream profile 7 will be converted to profile 8\", __MODULE_NAME__, __FUNCTION__);\n-            m_bitstream->SetConvertDovi(convertDovi && !user_dv_disable);\n+            CLog::Log(LOGDEBUG, \"{}::{} - HEVC bitstream profile 7 will be converted by chosen mode {:d}\",\n+              __MODULE_NAME__, __FUNCTION__, convertDovi);\n+            m_bitstream->SetConvertDovi(convertDovi);\n           }\n         }\n       }\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\nindex 2135e7d6f8..bba297770e 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n@@ -546,7 +546,7 @@ bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptio\n \n         if (m_bitstream)\n         {\n-          bool convertDovi = CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n+          int convertDovi = CServiceBroker::GetSettingsComponent()->GetSettings()->GetInt(\n               CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI);\n           m_bitstream->SetConvertDovi(convertDovi);\n         }\ndiff --git a/xbmc/utils/BitstreamConverter.cpp b/xbmc/utils/BitstreamConverter.cpp\nindex c51ac92138..53cab7c680 100644\n--- a/xbmc/utils/BitstreamConverter.cpp\n+++ b/xbmc/utils/BitstreamConverter.cpp\n@@ -279,7 +279,7 @@ static bool has_sei_recovery_point(const uint8_t *p, const uint8_t *end)\n #ifdef HAVE_LIBDOVI\n // The returned data must be freed with `dovi_data_free`\n // May be NULL if no conversion was done\n-static const DoviData* convert_dovi_rpu_nal(uint8_t* buf, uint32_t nal_size)\n+static const DoviData* convert_dovi_rpu_nal(uint8_t* buf, uint32_t nal_size, int mode)\n {\n   DoviRpuOpaque* rpu = dovi_parse_unspec62_nalu(buf, nal_size);\n   const DoviRpuDataHeader* header = dovi_rpu_get_header(rpu);\n@@ -287,7 +287,7 @@ static const DoviData* convert_dovi_rpu_nal(uint8_t* buf, uint32_t nal_size)\n \n   if (header && header->guessed_profile == 7)\n   {\n-    int ret = dovi_convert_rpu_with_mode(rpu, 2);\n+    int ret = dovi_convert_rpu_with_mode(rpu, mode);\n     if (ret < 0)\n       goto done;\n \n@@ -369,7 +369,7 @@ CBitstreamConverter::CBitstreamConverter()\n   m_convert_bytestream = false;\n   m_sps_pps_context.sps_pps_data = NULL;\n   m_start_decode = true;\n-  m_convert_dovi = false;\n+  m_convert_dovi = 0;\n }\n \n CBitstreamConverter::~CBitstreamConverter()\n@@ -1001,7 +1001,7 @@ bool CBitstreamConverter::BitstreamConvert(uint8_t* pData, int iSize, uint8_t **\n         {\n #ifdef HAVE_LIBDOVI\n           // Convert the RPU itself\n-          rpu_data = convert_dovi_rpu_nal(buf, nal_size);\n+          rpu_data = convert_dovi_rpu_nal(buf, nal_size, m_convert_dovi);\n           if (rpu_data)\n           {\n             buf_to_write = rpu_data->data;\ndiff --git a/xbmc/utils/BitstreamConverter.h b/xbmc/utils/BitstreamConverter.h\nindex 4381599b21..bbfa3ed361 100644\n--- a/xbmc/utils/BitstreamConverter.h\n+++ b/xbmc/utils/BitstreamConverter.h\n@@ -104,7 +104,7 @@ public:\n   int               GetExtraSize() const;\n   void              ResetStartDecode(void);\n   bool              CanStartDecode() const;\n-  void SetConvertDovi(bool value) { m_convert_dovi = value; }\n+  void SetConvertDovi(int value) { m_convert_dovi = value; }\n \n   static bool       mpeg2_sequence_header(const uint8_t *data, const uint32_t size, mpeg2_sequence *sequence);\n   static bool       h264_sequence_header(const uint8_t *data, const uint32_t size, h264_sequence *sequence);\n@@ -151,5 +151,5 @@ protected:\n   bool              m_convert_bytestream;\n   AVCodecID         m_codec;\n   bool              m_start_decode;\n-  bool m_convert_dovi;\n+  int               m_convert_dovi;\n };\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\nindex 616c205e6f..6f57b7efcb 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n@@ -103,7 +103,7 @@ bool CWinSystemAmlogic::InitWindowSystem()\n     if (setting)\n     {\n       setting->SetVisible(false);\n-      settings->SetBool(CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI, true);\n+      settings->SetInt(CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI, 2);\n     }\n   }\n \n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0012-AMLCodec-add-user-setting-player-led.patch",
    "content": "From d1dc56abe3fff3da1a075e6023aa86265339ef37 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 14 Apr 2023 11:19:44 +0200\nSubject: [PATCH 12/21] AMLCodec: add user setting player led Added the option\n when display led and player led mode is supported by the display.\n\n---\n .../resource.language.en_gb/resources/strings.po | 12 +++++++++++-\n system/settings/settings.xml                     |  6 ++++++\n .../VideoPlayer/DVDCodecs/Video/AMLCodec.cpp     | 12 ++++++++++++\n xbmc/settings/Settings.h                         |  1 +\n xbmc/utils/AMLUtils.cpp                          | 16 ++++++++++++++++\n xbmc/utils/AMLUtils.h                            |  1 +\n xbmc/windowing/amlogic/WinSystemAmlogic.cpp      | 14 ++++++++++++++\n 7 files changed, 61 insertions(+), 1 deletion(-)\n\ndiff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po\nindex 3b05260f01..4c52795d32 100644\n--- a/addons/resource.language.en_gb/resources/strings.po\n+++ b/addons/resource.language.en_gb/resources/strings.po\n@@ -8679,7 +8679,17 @@ msgctxt \"#14297\"\n msgid \"Use this option to disable Dolby Vision support if available.\"\n msgstr \"\"\n \n-#empty strings from id 14296 to 14300\n+#: system/settings/settings.xml\n+msgctxt \"#14298\"\n+msgid \"Use Player Led\"\n+msgstr \"\"\n+\n+#: system/settings/settings.xml\n+msgctxt \"#14299\"\n+msgid \"Use Player Led mode (YCbCr 4:2:2) instead Display Led (RGB tunneling) for Dolby Vision.\"\n+msgstr \"\"\n+\n+#empty strings from id 14300 to 14300\n \n #. pvr \"channels\" settings group label\n #: system/settings/settings.xml\ndiff --git a/system/settings/settings.xml b/system/settings/settings.xml\nindex 7ede7a22bb..d656de67d1 100755\n--- a/system/settings/settings.xml\n+++ b/system/settings/settings.xml\n@@ -3696,6 +3696,12 @@\n           <default>false</default>\n           <control type=\"toggle\" />\n         </setting>\n+        <setting id=\"coreelec.amlogic.useplayerled\" type=\"boolean\" label=\"14298\" help=\"14299\">\n+          <requirement>HAVE_AMCODEC</requirement>\n+          <visible>false</visible>\n+          <default>false</default>\n+          <control type=\"toggle\" />\n+        </setting>\n       </group>\n     </category>\n     <category id=\"cache\" label=\"439\" help=\"36399\">\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\nindex 8a7344d805..1609177451 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n@@ -291,6 +291,8 @@ typedef struct hdr_buf {\n     int size;\n } hdr_buf_t;\n \n+#define FLAG_FORCE_DV_LL        (unsigned int)(0x4000)\n+\n typedef struct am_packet {\n     AVPacket      avpkt;\n     uint64_t      avpts;\n@@ -2007,6 +2009,16 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n     // enable Dolby Vision\n     CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 1);\n \n+    // force player led mode when enabled\n+    CSysfsPath dolby_vision_flags{\"/sys/module/amdolby_vision/parameters/dolby_vision_flags\"};\n+    if (dolby_vision_flags.Exists())\n+    {\n+      if (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_COREELEC_AMLOGIC_USE_PLAYERLED))\n+        dolby_vision_flags.Set(dolby_vision_flags.Get<unsigned int>().value() | FLAG_FORCE_DV_LL);\n+      else\n+        dolby_vision_flags.Set(dolby_vision_flags.Get<unsigned int>().value() & ~(FLAG_FORCE_DV_LL));\n+    }\n+\n     am_private->gcodec.dv_enable = 1;\n     if (hints.dovi.dv_profile == 7 && CServiceBroker::GetSettingsComponent()->GetSettings()->GetInt(\n         CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI) == 0)\ndiff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h\nindex 8e5a31e1d7..f999b284e9 100644\n--- a/xbmc/settings/Settings.h\n+++ b/xbmc/settings/Settings.h\n@@ -442,6 +442,7 @@ public:\n   static constexpr auto SETTING_COREELEC_AMLOGIC_FORCE_CS = \"coreelec.amlogic.forcecs\";\n   static constexpr auto SETTING_COREELEC_AMLOGIC_DISABLEGUISCALING = \"coreelec.amlogic.disableguiscaling\";\n   static constexpr auto SETTING_COREELEC_AMLOGIC_DV_DISABLE = \"coreelec.amlogic.disabledolbyvision\";\n+  static constexpr auto SETTING_COREELEC_AMLOGIC_USE_PLAYERLED = \"coreelec.amlogic.useplayerled\";\n   static constexpr auto SETTING_CACHE_HARDDISK = \"cache.harddisk\";\n   static constexpr auto SETTING_CACHEVIDEO_DVDROM = \"cachevideo.dvdrom\";\n   static constexpr auto SETTING_CACHEVIDEO_LAN = \"cachevideo.lan\";\ndiff --git a/xbmc/utils/AMLUtils.cpp b/xbmc/utils/AMLUtils.cpp\nindex c9e60d5c5f..fd35427e93 100644\n--- a/xbmc/utils/AMLUtils.cpp\n+++ b/xbmc/utils/AMLUtils.cpp\n@@ -56,6 +56,22 @@ int aml_get_cpufamily_id()\n   return aml_cpufamily_id;\n }\n \n+bool aml_dv_support_ll()\n+{\n+  int support_ll = 0;\n+  CRegExp regexp;\n+  regexp.RegComp(\"YCbCr_422_12BIT\");\n+  std::string valstr;\n+  CSysfsPath dv_cap{\"/sys/devices/virtual/amhdmitx/amhdmitx0/dv_cap\"};\n+  if (dv_cap.Exists())\n+  {\n+    valstr = dv_cap.Get<std::string>().value();\n+    support_ll = (regexp.RegFind(valstr) >= 0) ? 1 : 0;\n+  }\n+\n+  return support_ll;\n+}\n+\n static bool aml_support_vcodec_profile(const char *regex)\n {\n   int profile = 0;\ndiff --git a/xbmc/utils/AMLUtils.h b/xbmc/utils/AMLUtils.h\nindex 25e95d6961..16f32b2d0a 100644\n--- a/xbmc/utils/AMLUtils.h\n+++ b/xbmc/utils/AMLUtils.h\n@@ -49,6 +49,7 @@ enum AML_SUPPORT_H264_4K2K\n #define AML_SM1     0x2B\n \n int  aml_get_cpufamily_id();\n+bool aml_dv_support_ll();\n bool aml_support_hevc();\n bool aml_support_hevc_4k2k();\n bool aml_support_hevc_8k4k();\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\nindex 6f57b7efcb..4c5424d136 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n@@ -99,6 +99,13 @@ bool CWinSystemAmlogic::InitWindowSystem()\n       settings->SetBool(CSettings::SETTING_COREELEC_AMLOGIC_DV_DISABLE, false);\n     }\n \n+    setting = settings->GetSetting(CSettings::SETTING_COREELEC_AMLOGIC_USE_PLAYERLED);\n+    if (setting)\n+    {\n+      setting->SetVisible(false);\n+      settings->SetBool(CSettings::SETTING_COREELEC_AMLOGIC_USE_PLAYERLED, false);\n+    }\n+\n     setting = settings->GetSetting(CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI);\n     if (setting)\n     {\n@@ -106,6 +113,13 @@ bool CWinSystemAmlogic::InitWindowSystem()\n       settings->SetInt(CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI, 2);\n     }\n   }\n+  else if (aml_dv_support_ll())\n+  {\n+    CLog::Log(LOGDEBUG, \"CWinSystemAmlogic::InitWindowSystem -- display do support Dolby Vision Low Latency\");\n+    auto setting = settings->GetSetting(CSettings::SETTING_COREELEC_AMLOGIC_USE_PLAYERLED);\n+    if (setting)\n+      setting->SetVisible(true);\n+  }\n \n   m_nativeDisplay = EGL_DEFAULT_DISPLAY;\n \n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0013-Always-force-a-mode-switch-on-resolution-change-on-A.patch",
    "content": "From 077b90bdb547610c24d29da2215325bbae5f1181 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 20 Apr 2023 20:25:25 +0200\nSubject: [PATCH 13/21] Always force a mode switch on resolution change on\n Amlogic platform If the mode switch is really required is checked afterwards\n in WinSystemAmlogic system.\n\n---\n xbmc/windowing/GraphicContext.cpp | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/xbmc/windowing/GraphicContext.cpp b/xbmc/windowing/GraphicContext.cpp\nindex 2688fb999e..d9538ebf46 100644\n--- a/xbmc/windowing/GraphicContext.cpp\n+++ b/xbmc/windowing/GraphicContext.cpp\n@@ -398,6 +398,9 @@ void CGraphicContext::SetVideoResolution(RESOLUTION res, bool forceUpdate)\n void CGraphicContext::SetVideoResolutionInternal(RESOLUTION res, bool forceUpdate)\n {\n   RESOLUTION lastRes = m_Resolution;\n+#if defined(HAS_LIBAMCODEC)\n+  forceUpdate = true;\n+#endif\n \n   // If the user asked us to guess, go with desktop\n   if (!IsValidResolution(res))\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0014-AMLCodec-on-Dolby-Vision-playback-stop-wait-until-vi.patch",
    "content": "From c405fada82ff51a770e18ef5b84b3ac695051d73 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 21 Apr 2023 10:39:45 +0200\nSubject: [PATCH 14/21] AMLCodec: on Dolby Vision playback stop wait until\n video is off The driver need first to clean up on video off.\n\n---\n .../VideoPlayer/DVDCodecs/Video/AMLCodec.cpp  | 19 +++++++++++++++----\n 1 file changed, 15 insertions(+), 4 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\nindex 1609177451..dad0690ef2 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n@@ -2007,7 +2007,7 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n   if (dv_enable)\n   {\n     // enable Dolby Vision\n-    CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 1);\n+    CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 'Y');\n \n     // force player led mode when enabled\n     CSysfsPath dolby_vision_flags{\"/sys/module/amdolby_vision/parameters/dolby_vision_flags\"};\n@@ -2032,7 +2032,7 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n   else if (device_support_dv)\n   {\n     // disable Dolby Vision\n-    CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 0);\n+    CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 'N');\n   }\n \n   // DEC_CONTROL_FLAG_DISABLE_FAST_POC\n@@ -2293,8 +2293,19 @@ void CAMLCodec::CloseDecoder()\n   // return tsync to default so external apps work\n   CSysfsPath(\"/sys/class/tsync/enable\", 1);\n   // disable Dolby Vision driver\n-  //CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 0);\n-  // don't disable it as it would not switch back to non DV mode anymore\n+  CSysfsPath dolby_vision_enable{\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\"};\n+  if (dolby_vision_enable.Exists() && StringUtils::EqualsNoCase(dolby_vision_enable.Get<std::string>().value(), \"Y\"))\n+  {\n+    CSysfsPath dv_video_on{\"/sys/class/amdolby_vision/dv_video_on\"};\n+    if (dv_video_on.Exists())\n+    {\n+      std::chrono::time_point<std::chrono::system_clock> now(std::chrono::system_clock::now());\n+      while(dv_video_on.Get<int>().value() == 1 && (std::chrono::system_clock::now() - now) < std::chrono::seconds(m_decoder_timeout))\n+        usleep(10000); // wait 10ms\n+    }\n+    dolby_vision_enable.Set('N');\n+  }\n+\n   CSysfsPath amdolby_vision_debug{\"/sys/class/amdolby_vision/debug\"};\n   if (amdolby_vision_debug.Exists())\n     amdolby_vision_debug.Set(\"enable_fel 0\");\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0015-WinSystemAmlogic-rework-mode-switch-mechanism.patch",
    "content": "From 36a8072f7e006c4e34100e589a05b3e79f3c06af Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 20 Apr 2023 20:22:41 +0200\nSubject: [PATCH 15/21] WinSystemAmlogic: rework mode switch mechanism Because\n of Dolby Vision it is possible resolution and frequency do not change. But if\n colour subsampling or colour depth is changed a forced mode switch is\n required. Force mode switch by set mode 'null' In special cases a hard mode\n reset is needed like 4k420 to 4kDV.\n\n---\n xbmc/utils/AMLUtils.cpp                       | 10 +-\n xbmc/utils/AMLUtils.h                         |  4 +-\n xbmc/windowing/amlogic/WinSystemAmlogic.cpp   | 46 +++------\n xbmc/windowing/amlogic/WinSystemAmlogic.h     |  6 +-\n .../amlogic/WinSystemAmlogicGLESContext.cpp   | 99 ++++++++++++++++++-\n .../amlogic/WinSystemAmlogicGLESContext.h     |  5 +-\n 6 files changed, 124 insertions(+), 46 deletions(-)\n\ndiff --git a/xbmc/utils/AMLUtils.cpp b/xbmc/utils/AMLUtils.cpp\nindex fd35427e93..33e449408d 100644\n--- a/xbmc/utils/AMLUtils.cpp\n+++ b/xbmc/utils/AMLUtils.cpp\n@@ -412,12 +412,13 @@ bool aml_get_native_resolution(RESOLUTION_INFO *res)\n   return result;\n }\n \n-bool aml_set_native_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name, const int stereo_mode)\n+bool aml_set_native_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name,\n+  const int stereo_mode, bool force_mode_switch)\n {\n   bool result = false;\n \n   aml_handle_display_stereo_mode(RENDER_STEREO_MODE_OFF);\n-  result = aml_set_display_resolution(res, framebuffer_name);\n+  result = aml_set_display_resolution(res, framebuffer_name, force_mode_switch);\n \n   aml_handle_scale(res);\n   aml_handle_display_stereo_mode(stereo_mode);\n@@ -498,7 +499,8 @@ bool aml_probe_resolutions(std::vector<RESOLUTION_INFO> &resolutions)\n   return resolutions.size() > 0;\n }\n \n-bool aml_set_display_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name)\n+bool aml_set_display_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name,\n+  bool force_mode_switch)\n {\n   std::string mode = res.strId.c_str();\n   std::string cur_mode;\n@@ -525,7 +527,7 @@ bool aml_set_display_resolution(const RESOLUTION_INFO &res, std::string framebuf\n     if (amhdmitx0_frac_rate_policy.Exists())\n       cur_fractional_rate = amhdmitx0_frac_rate_policy.Get<int>().value();\n \n-    if (cur_fractional_rate != fractional_rate)\n+    if ((cur_fractional_rate != fractional_rate) || force_mode_switch)\n     {\n       cur_mode = \"null\";\n       if (display_mode.Exists())\ndiff --git a/xbmc/utils/AMLUtils.h b/xbmc/utils/AMLUtils.h\nindex 16f32b2d0a..a944814642 100644\n--- a/xbmc/utils/AMLUtils.h\n+++ b/xbmc/utils/AMLUtils.h\n@@ -62,9 +62,9 @@ bool aml_has_frac_rate_policy();\n void aml_set_audio_passthrough(bool passthrough);\n bool aml_mode_to_resolution(const char *mode, RESOLUTION_INFO *res);\n bool aml_get_native_resolution(RESOLUTION_INFO *res);\n-bool aml_set_native_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name, const int stereo_mode);\n+bool aml_set_native_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name, const int stereo_mode, bool force_mode_switch);\n bool aml_probe_resolutions(std::vector<RESOLUTION_INFO> &resolutions);\n-bool aml_set_display_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name);\n+bool aml_set_display_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name, bool force_mode_switch);\n void aml_handle_scale(const RESOLUTION_INFO &res);\n void aml_handle_display_stereo_mode(const int stereo_mode);\n void aml_enable_freeScale(const RESOLUTION_INFO &res);\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\nindex 4c5424d136..07447b5a55 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n@@ -41,6 +41,7 @@ using namespace KODI;\n CWinSystemAmlogic::CWinSystemAmlogic()\n :  m_nativeWindow(NULL)\n ,  m_libinput(new CLibInputHandler)\n+,  m_force_mode_switch(false)\n {\n   const char *env_framebuffer = getenv(\"FRAMEBUFFER\");\n \n@@ -55,9 +56,6 @@ CWinSystemAmlogic::CWinSystemAmlogic()\n \n   m_nativeDisplay = EGL_NO_DISPLAY;\n \n-  m_displayWidth = 0;\n-  m_displayHeight = 0;\n-\n   m_stereo_mode = RENDER_STEREO_MODE_OFF;\n   m_delayDispReset = false;\n \n@@ -159,32 +157,15 @@ bool CWinSystemAmlogic::CreateNewWindow(const std::string& name,\n                                     bool fullScreen,\n                                     RESOLUTION_INFO& res)\n {\n-  RESOLUTION_INFO current_resolution;\n-  current_resolution.iWidth = current_resolution.iHeight = 0;\n-  RENDER_STEREO_MODE stereo_mode = CServiceBroker::GetWinSystem()->GetGfxContext().GetStereoMode();\n-\n   m_nWidth        = res.iWidth;\n   m_nHeight       = res.iHeight;\n-  m_displayWidth  = res.iScreenWidth;\n-  m_displayHeight = res.iScreenHeight;\n   m_fRefreshRate  = res.fRefreshRate;\n \n   if (m_nativeWindow == NULL)\n     m_nativeWindow = new fbdev_window;\n \n-  m_nativeWindow->width = m_nWidth;\n-  m_nativeWindow->height = m_nHeight;\n-\n-  if ((m_bWindowCreated && aml_get_native_resolution(&current_resolution)) &&\n-    current_resolution.iWidth == res.iWidth && current_resolution.iHeight == res.iHeight &&\n-    current_resolution.iScreenWidth == res.iScreenWidth && current_resolution.iScreenHeight == res.iScreenHeight &&\n-    m_bFullScreen == fullScreen && current_resolution.fRefreshRate == res.fRefreshRate &&\n-    (current_resolution.dwFlags & D3DPRESENTFLAG_MODEMASK) == (res.dwFlags & D3DPRESENTFLAG_MODEMASK) &&\n-    m_stereo_mode == stereo_mode)\n-  {\n-    CLog::Log(LOGDEBUG, \"CWinSystemEGL::CreateNewWindow: No need to create a new window\");\n-    return true;\n-  }\n+  m_nativeWindow->width = res.iWidth;\n+  m_nativeWindow->height = res.iHeight;\n \n   int delay = CServiceBroker::GetSettingsComponent()->GetSettings()->GetInt(\"videoscreen.delayrefreshchange\");\n   if (delay > 0)\n@@ -201,10 +182,9 @@ bool CWinSystemAmlogic::CreateNewWindow(const std::string& name,\n     }\n   }\n \n-  m_stereo_mode = stereo_mode;\n-  m_bFullScreen = fullScreen;\n-\n-  aml_set_native_resolution(res, m_framebuffer_name, stereo_mode);\n+  aml_set_native_resolution(res, m_framebuffer_name, m_stereo_mode, m_force_mode_switch);\n+  // reset force mode switch\n+  m_force_mode_switch = false;\n \n   if (!m_delayDispReset)\n   {\n@@ -216,6 +196,7 @@ bool CWinSystemAmlogic::CreateNewWindow(const std::string& name,\n     }\n   }\n \n+  m_bWindowCreated = true;\n   return true;\n }\n \n@@ -227,6 +208,7 @@ bool CWinSystemAmlogic::DestroyWindow()\n     m_nativeWindow = NULL;\n   }\n \n+  m_bWindowCreated = false;\n   return true;\n }\n \n@@ -310,28 +292,28 @@ bool CWinSystemAmlogic::IsHDRDisplay()\n   {\n     valstr = hdr_cap.Get<std::string>().value();\n     if (valstr.find(\"Traditional HDR: 1\") != std::string::npos)\n-      hdr_caps.SetHDR10();\n+      m_hdr_caps.SetHDR10();\n \n     if (valstr.find(\"HDR10Plus Supported: 1\") != std::string::npos)\n-      hdr_caps.SetHDR10Plus();\n+      m_hdr_caps.SetHDR10Plus();\n \n     if (valstr.find(\"Hybrid Log-Gamma: 1\") != std::string::npos)\n-      hdr_caps.SetHLG();\n+      m_hdr_caps.SetHLG();\n   }\n \n   if (dv_cap.Exists())\n   {\n     valstr = dv_cap.Get<std::string>().value();\n     if (valstr.find(\"DolbyVision RX support list\") != std::string::npos)\n-      hdr_caps.SetDolbyVision();\n+      m_hdr_caps.SetDolbyVision();\n   }\n \n-  return (hdr_caps.SupportsHDR10() | hdr_caps.SupportsHDR10Plus() | hdr_caps.SupportsHLG());\n+  return (m_hdr_caps.SupportsHDR10() | m_hdr_caps.SupportsHDR10Plus() | m_hdr_caps.SupportsHLG());\n }\n \n CHDRCapabilities CWinSystemAmlogic::GetDisplayHDRCapabilities() const\n {\n-  return hdr_caps;\n+  return m_hdr_caps;\n }\n \n bool CWinSystemAmlogic::Hide()\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.h b/xbmc/windowing/amlogic/WinSystemAmlogic.h\nindex 2c70086caa..6bc5ae5046 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogic.h\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.h\n@@ -44,9 +44,6 @@ protected:\n   EGLDisplay m_nativeDisplay;\n   fbdev_window *m_nativeWindow;\n \n-  int m_displayWidth;\n-  int m_displayHeight;\n-\n   RENDER_STEREO_MODE m_stereo_mode;\n \n   bool m_delayDispReset;\n@@ -55,5 +52,6 @@ protected:\n   CCriticalSection m_resourceSection;\n   std::vector<IDispResource*> m_resources;\n   std::unique_ptr<CLibInputHandler> m_libinput;\n-  CHDRCapabilities hdr_caps;\n+  CHDRCapabilities m_hdr_caps;\n+  bool m_force_mode_switch;\n };\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\nindex 39fbaf03a1..f9d94dc34f 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n@@ -8,13 +8,22 @@\n \n #include \"VideoSyncAML.h\"\n #include \"WinSystemAmlogicGLESContext.h\"\n+#include \"platform/linux/SysfsPath.h\"\n+#include \"utils/AMLUtils.h\"\n #include \"utils/log.h\"\n #include \"threads/SingleLock.h\"\n+#include \"windowing/GraphicContext.h\"\n #include \"windowing/WindowSystemFactory.h\"\n \n using namespace KODI;\n using namespace KODI::WINDOWING::AML;\n \n+CWinSystemAmlogicGLESContext::CWinSystemAmlogicGLESContext()\n+:  m_cs(-1)\n+,  m_cd(-1)\n+{\n+}\n+\n void CWinSystemAmlogicGLESContext::Register()\n {\n   KODI::WINDOWING::CWindowSystemFactory::RegisterWindowSystem(CreateWinSystem, \"aml\");\n@@ -69,7 +78,84 @@ bool CWinSystemAmlogicGLESContext::CreateNewWindow(const std::string& name,\n                                                bool fullScreen,\n                                                RESOLUTION_INFO& res)\n {\n-  m_pGLContext.DestroySurface();\n+  RESOLUTION_INFO current_resolution;\n+  current_resolution.iWidth = current_resolution.iHeight = 0;\n+  RENDER_STEREO_MODE stereo_mode = CServiceBroker::GetWinSystem()->GetGfxContext().GetStereoMode();\n+\n+  // check for frac_rate_policy change\n+  int fractional_rate = (res.fRefreshRate == floor(res.fRefreshRate)) ? 0 : 1;\n+  int cur_fractional_rate = fractional_rate;\n+  if (aml_has_frac_rate_policy())\n+  {\n+    CSysfsPath amhdmitx0_frac_rate_policy{\"/sys/class/amhdmitx/amhdmitx0/frac_rate_policy\"};\n+    cur_fractional_rate = amhdmitx0_frac_rate_policy.Get<int>().value();\n+\n+    if (cur_fractional_rate != fractional_rate)\n+      amhdmitx0_frac_rate_policy.Set(fractional_rate);\n+  }\n+\n+  // check for colour subsampling/depth change\n+  CSysfsPath amhdmitx0_cs{\"/sys/class/amhdmitx/amhdmitx0/cs\"};\n+  CSysfsPath amhdmitx0_cd{\"/sys/class/amhdmitx/amhdmitx0/cd\"};\n+  int cs = 0;\n+  int cd = 0;\n+  if (amhdmitx0_cs.Exists() && amhdmitx0_cd.Exists())\n+  {\n+    cs = amhdmitx0_cs.Get<int>().value();\n+    cd = amhdmitx0_cd.Get<int>().value();\n+  }\n+\n+  // get current used resolution\n+  if (!aml_get_native_resolution(&current_resolution))\n+  {\n+    CLog::Log(LOGERROR, \"CWinSystemAmlogicGLESContext::{}: failed to receive current resolution\", __FUNCTION__);\n+    return false;\n+  }\n+\n+  CLog::Log(LOGDEBUG, \"CWinSystemAmlogicGLESContext::{}: \"\n+    \"m_bWindowCreated: {}, \"\n+    \"frac rate {:d}({:d}), \"\n+    \"cs: {:d}({:d}), cd: {:d}({:d})\",\n+    __FUNCTION__,\n+    m_bWindowCreated,\n+    fractional_rate, cur_fractional_rate,\n+    cs, m_cs, cd, m_cd);\n+  CLog::Log(LOGDEBUG, \"CWinSystemAmlogicGLESContext::{}: \"\n+    \"cur: iWidth: {:04d}, iHeight: {:04d}, iScreenWidth: {:04d}, iScreenHeight: {:04d}, fRefreshRate: {:02.2f}, dwFlags: {:02x}\",\n+    __FUNCTION__,\n+    current_resolution.iWidth, current_resolution.iHeight, current_resolution.iScreenWidth, current_resolution.iScreenHeight,\n+    current_resolution.fRefreshRate, current_resolution.dwFlags);\n+  CLog::Log(LOGDEBUG, \"CWinSystemAmlogicGLESContext::{}: \"\n+    \"res: iWidth: {:04d}, iHeight: {:04d}, iScreenWidth: {:04d}, iScreenHeight: {:04d}, fRefreshRate: {:02.2f}, dwFlags: {:02x}\",\n+    __FUNCTION__,\n+    res.iWidth, res.iHeight, res.iScreenWidth, res.iScreenHeight, res.fRefreshRate, res.dwFlags);\n+\n+  // check if mode switch is needed\n+  if (current_resolution.iWidth == res.iWidth && current_resolution.iHeight == res.iHeight &&\n+      current_resolution.iScreenWidth == res.iScreenWidth && current_resolution.iScreenHeight == res.iScreenHeight &&\n+      m_bFullScreen == fullScreen && current_resolution.fRefreshRate == res.fRefreshRate &&\n+      (current_resolution.dwFlags & D3DPRESENTFLAG_MODEMASK) == (res.dwFlags & D3DPRESENTFLAG_MODEMASK) &&\n+      m_stereo_mode == stereo_mode && m_bWindowCreated &&\n+      ((m_cs != -1 && m_cd != -1) && (m_cs == cs && m_cd == cd)) &&\n+      (fractional_rate == cur_fractional_rate))\n+  {\n+    CLog::Log(LOGDEBUG, \"CWinSystemAmlogicGLESContext::{}: No need to create a new window\", __FUNCTION__);\n+    return true;\n+  }\n+\n+  // destroy old window, then create a new one\n+  DestroyWindow();\n+\n+  // check if a forced mode switch is required\n+  if ((current_resolution.iWidth == res.iWidth && current_resolution.iHeight == res.iHeight &&\n+       current_resolution.iScreenWidth == res.iScreenWidth && current_resolution.iScreenHeight == res.iScreenHeight &&\n+       current_resolution.fRefreshRate == res.fRefreshRate) &&\n+       (((m_cs != -1 && m_cd != -1) && (m_cs != cs || m_cd != cd)) ||\n+       (fractional_rate != cur_fractional_rate)))\n+  {\n+    m_force_mode_switch = true;\n+    CLog::Log(LOGDEBUG, \"CWinSystemAmlogicGLESContext::{}: force mode switch\", __FUNCTION__);\n+  }\n \n   if (!CWinSystemAmlogic::CreateNewWindow(name, fullScreen, res))\n   {\n@@ -94,6 +180,16 @@ bool CWinSystemAmlogicGLESContext::CreateNewWindow(const std::string& name,\n       (*i)->OnResetDisplay();\n   }\n \n+  // backup data after mode switch\n+  if (amhdmitx0_cs.Exists() && amhdmitx0_cd.Exists())\n+  {\n+    m_cs = amhdmitx0_cs.Get<int>().value();\n+    m_cd = amhdmitx0_cd.Get<int>().value();\n+  }\n+\n+  m_stereo_mode = stereo_mode;\n+  m_bFullScreen = fullScreen;\n+\n   return true;\n }\n \n@@ -167,4 +263,3 @@ std::unique_ptr<CVideoSync> CWinSystemAmlogicGLESContext::GetVideoSync(void *clo\n   std::unique_ptr<CVideoSync> pVSync(new CVideoSyncAML(clock));\n   return pVSync;\n }\n-\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h\nindex 7d7467ee1a..ef6166692a 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h\n@@ -23,7 +23,7 @@ namespace AML\n class CWinSystemAmlogicGLESContext : public CWinSystemAmlogic, public CRenderSystemGLES\n {\n public:\n-  CWinSystemAmlogicGLESContext() = default;\n+  CWinSystemAmlogicGLESContext();\n   virtual ~CWinSystemAmlogicGLESContext() = default;\n \n   static void Register();\n@@ -53,7 +53,8 @@ protected:\n \n private:\n   CEGLContextUtils m_pGLContext;\n-\n+  int m_cs;\n+  int m_cd;\n };\n \n }\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0016-AMLUtils-add-display-DV-support-check.patch",
    "content": "From e31d8ce8965aef763014ecc5ce00252bb70dd894 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Mon, 22 May 2023 11:23:13 +0200\nSubject: [PATCH 16/21] AMLUtils: add display DV support check\n\n---\n xbmc/utils/AMLUtils.cpp | 16 ++++++++++++++++\n xbmc/utils/AMLUtils.h   |  1 +\n 2 files changed, 17 insertions(+)\n\ndiff --git a/xbmc/utils/AMLUtils.cpp b/xbmc/utils/AMLUtils.cpp\nindex 33e449408d..2d1c1d78b3 100644\n--- a/xbmc/utils/AMLUtils.cpp\n+++ b/xbmc/utils/AMLUtils.cpp\n@@ -56,6 +56,22 @@ int aml_get_cpufamily_id()\n   return aml_cpufamily_id;\n }\n \n+bool aml_display_support_dv()\n+{\n+  int support_dv = 0;\n+  CRegExp regexp;\n+  regexp.RegComp(\"The Rx don't support DolbyVision\");\n+  std::string valstr;\n+  CSysfsPath dv_cap{\"/sys/devices/virtual/amhdmitx/amhdmitx0/dv_cap\"};\n+  if (dv_cap.Exists())\n+  {\n+    valstr = dv_cap.Get<std::string>().value();\n+    support_dv = (regexp.RegFind(valstr) >= 0) ? 0 : 1;\n+  }\n+\n+  return support_dv;\n+}\n+\n bool aml_dv_support_ll()\n {\n   int support_ll = 0;\ndiff --git a/xbmc/utils/AMLUtils.h b/xbmc/utils/AMLUtils.h\nindex a944814642..2f07acbfa1 100644\n--- a/xbmc/utils/AMLUtils.h\n+++ b/xbmc/utils/AMLUtils.h\n@@ -49,6 +49,7 @@ enum AML_SUPPORT_H264_4K2K\n #define AML_SM1     0x2B\n \n int  aml_get_cpufamily_id();\n+bool aml_display_support_dv();\n bool aml_dv_support_ll();\n bool aml_support_hevc();\n bool aml_support_hevc_4k2k();\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0017-AMLCodec-Restart-codec-in-dec_mode-STREAM_TYPE_FRAME.patch",
    "content": "From 40f2d0145580ae8c20a431351b4dbe74aae1f928 Mon Sep 17 00:00:00 2001\nFrom: Arthur Liberman <arthur_liberman@hotmail.com>\nDate: Thu, 28 Dec 2023 00:44:36 +0200\nSubject: [PATCH 17/21] AMLCodec: Restart codec in `dec_mode=STREAM_TYPE_FRAME`\n on DoVi P7 MEL Dolby Vision Profile 7 Minimum Enhancement Layer (MEL) can't\n use `STREAM_TYPE_STREAM` decoder mode. The kernel can detect MEL content, it\n sets `is_mel=true` in sysfs, we detect it, and restart the codec in the\n correct mode\n\n---\n .../VideoPlayer/DVDCodecs/Video/AMLCodec.cpp  | 26 ++++++++++++++++++-\n .../VideoPlayer/DVDCodecs/Video/AMLCodec.h    |  2 ++\n .../DVDCodecs/Video/DVDVideoCodecAmlogic.cpp  | 12 ++++++++-\n .../DVDCodecs/Video/DVDVideoCodecAmlogic.h    |  1 +\n 4 files changed, 39 insertions(+), 2 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\nindex dad0690ef2..3962cb904d 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n@@ -1814,6 +1814,8 @@ CAMLCodec::CAMLCodec(CProcessInfo &processInfo)\n   , m_bufferIndex(-1)\n   , m_state(0)\n   , m_processInfo(processInfo)\n+  , m_is_dv_p7_mel(false)\n+  , m_dolby_vision_wait_delay(0)\n {\n   am_private = new am_private_t;\n   memset(am_private, 0, sizeof(am_private_t));\n@@ -2020,13 +2022,20 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n     }\n \n     am_private->gcodec.dv_enable = 1;\n-    if (hints.dovi.dv_profile == 7 && CServiceBroker::GetSettingsComponent()->GetSettings()->GetInt(\n+    if (!m_is_dv_p7_mel && hints.dovi.dv_profile == 7 && CServiceBroker::GetSettingsComponent()->GetSettings()->GetInt(\n         CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI) == 0)\n     {\n       CSysfsPath amdolby_vision_debug{\"/sys/class/amdolby_vision/debug\"};\n       if (amdolby_vision_debug.Exists())\n         amdolby_vision_debug.Set(\"enable_fel 1\");\n       am_private->gcodec.dec_mode  = STREAM_TYPE_STREAM;\n+\n+      CSysfsPath dolby_vision_wait_delay{\"/sys/module/amdolby_vision/parameters/dolby_vision_wait_delay\"};\n+      if (dolby_vision_wait_delay.Exists())\n+      {\n+        m_dolby_vision_wait_delay = dolby_vision_wait_delay.Get<unsigned int>().value();\n+        CLog::Log(LOGDEBUG, \"CAMLCodec::OpenDecoder DoVi P7 MEL detection frame delay got set to {:d} frames\", m_dolby_vision_wait_delay);\n+      }\n     }\n   }\n   else if (device_support_dv)\n@@ -2642,6 +2651,21 @@ CDVDVideoCodec::VCReturn CAMLCodec::GetPicture(VideoPicture *pVideoPicture)\n     CLog::Log(LOGDEBUG, LOGVIDEO, \"CAMLCodec::GetPicture: index: {:d}, pts: {:.3f}, dur:{:.3f}ms ar:{:.2f} elf:{:d}ms\",\n       m_bufferIndex, pVideoPicture->pts / DVD_TIME_BASE, pVideoPicture->iDuration / 1000, m_hints.aspect, elapsed_since_last_frame.count());\n \n+    if (m_dolby_vision_wait_delay > 0 && !m_is_dv_p7_mel)\n+    {\n+      m_dolby_vision_wait_delay--;\n+      CSysfsPath is_mel{\"/sys/module/amdolby_vision/parameters/is_mel\"};\n+      if (is_mel.Exists())\n+      {\n+        if (is_mel.Get<char>().value() == 'Y')\n+        {\n+          CLog::Log(LOGDEBUG, LOGVIDEO, \"CAMLCodec::GetPicture: DoVi P7 MEL content detected, request to reopen decoder\");\n+          m_is_dv_p7_mel = true;\n+          return CDVDVideoCodec::VC_REOPEN;\n+        }\n+      }\n+    }\n+\n     return CDVDVideoCodec::VC_PICTURE;\n   }\n   else if (m_drain)\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.h\nindex cfc6fafe31..2fe9212845 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.h\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.h\n@@ -109,6 +109,8 @@ private:\n   uint64_t         m_cur_pts;\n   uint64_t         m_last_pts;\n   uint32_t         m_bufferIndex;\n+  bool             m_is_dv_p7_mel;\n+  uint32_t         m_dolby_vision_wait_delay;\n \n   CRect            m_dst_rect;\n   CRect            m_display_rect;\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\nindex 12f81442d7..c2e8518f2d 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\n@@ -436,6 +436,12 @@ void CDVDVideoCodecAmlogic::Reset(void)\n     m_bitstream->ResetStartDecode();\n }\n \n+void CDVDVideoCodecAmlogic::Reopen(void)\n+{\n+  if (m_Codec && !m_Codec->OpenDecoder(m_hints))\n+    CLog::Log(LOGERROR, \"{}: Failed to reopen Amlogic Codec\", __MODULE_NAME__);\n+}\n+\n CDVDVideoCodec::VCReturn CDVDVideoCodecAmlogic::GetPicture(VideoPicture* pVideoPicture)\n {\n   if (!m_Codec)\n@@ -443,7 +449,11 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecAmlogic::GetPicture(VideoPicture* pVideoP\n \n   VCReturn retVal = m_Codec->GetPicture(&m_videobuffer);\n \n-  if (retVal == VC_PICTURE)\n+  if (retVal == VC_REOPEN)\n+  {\n+    m_Codec->CloseDecoder();\n+  }\n+  else if (retVal == VC_PICTURE)\n   {\n     pVideoPicture->SetParams(m_videobuffer);\n \ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.h\nindex 8a1d66e485..b0d422909a 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.h\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.h\n@@ -70,6 +70,7 @@ public:\n   virtual bool Open(CDVDStreamInfo &hints, CDVDCodecOptions &options) override;\n   virtual bool AddData(const DemuxPacket &packet) override;\n   virtual void Reset() override;\n+  virtual void Reopen() override;\n   virtual VCReturn GetPicture(VideoPicture* pVideoPicture) override;\n   virtual void SetSpeed(int iSpeed) override;\n   virtual void SetCodecControl(int flags) override;\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0018-libdovi-change-default-conversion-to-Lossless-for-Am.patch",
    "content": "From d94ce039a9a6dea04fea7fd7156e41eb67ea4164 Mon Sep 17 00:00:00 2001\nFrom: Arthur Liberman <arthur_liberman@hotmail.com>\nDate: Fri, 12 Jan 2024 17:21:47 +0200\nSubject: [PATCH 18/21] libdovi: change default conversion to Lossless for\n Amlogic-ng-dv\n\n---\n system/settings/settings.xml | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/system/settings/settings.xml b/system/settings/settings.xml\nindex d656de67d1..7117ac0394 100755\n--- a/system/settings/settings.xml\n+++ b/system/settings/settings.xml\n@@ -236,7 +236,7 @@\n             </or>\n           </requirement>\n           <level>2</level>\n-          <default>2</default>\n+          <default>0</default>\n           <updates>\n             <update type=\"change\" />\n           </updates>\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0019-AMLCodec-set-also-dolby_vision_ll_policy-when-force-.patch",
    "content": "From 979f3c936539d2944585c27d0b79642c1bdbb38f Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Mon, 15 Jan 2024 09:59:43 +0100\nSubject: [PATCH 19/21] AMLCodec: set also dolby_vision_ll_policy when force\n player led 4.9 kernel does require the policy set as well\n\n---\n xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\nindex 3962cb904d..7d702cd1c4 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n@@ -292,6 +292,8 @@ typedef struct hdr_buf {\n } hdr_buf_t;\n \n #define FLAG_FORCE_DV_LL        (unsigned int)(0x4000)\n+#define DOLBY_VISION_LL_DISABLE (unsigned int)(0)\n+#define DOLBY_VISION_LL_YUV422  (unsigned int)(1)\n \n typedef struct am_packet {\n     AVPacket      avpkt;\n@@ -2013,12 +2015,19 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n \n     // force player led mode when enabled\n     CSysfsPath dolby_vision_flags{\"/sys/module/amdolby_vision/parameters/dolby_vision_flags\"};\n-    if (dolby_vision_flags.Exists())\n+    CSysfsPath dolby_vision_ll_policy{\"/sys/module/amdolby_vision/parameters/dolby_vision_ll_policy\"};\n+    if (dolby_vision_flags.Exists() && dolby_vision_ll_policy.Exists())\n     {\n       if (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_COREELEC_AMLOGIC_USE_PLAYERLED))\n+      {\n         dolby_vision_flags.Set(dolby_vision_flags.Get<unsigned int>().value() | FLAG_FORCE_DV_LL);\n+        dolby_vision_ll_policy.Set(DOLBY_VISION_LL_YUV422);\n+      }\n       else\n+      {\n         dolby_vision_flags.Set(dolby_vision_flags.Get<unsigned int>().value() & ~(FLAG_FORCE_DV_LL));\n+        dolby_vision_ll_policy.Set(DOLBY_VISION_LL_DISABLE);\n+      }\n     }\n \n     am_private->gcodec.dv_enable = 1;\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0020-WinSystemAmlogic-backup-correct-colour-subsampling-a.patch",
    "content": "From f08632775e1a7cb7629e1fe6b970e3e2141d6ad6 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 16 Jan 2024 15:27:55 +0100\nSubject: [PATCH 20/21] WinSystemAmlogic: backup correct colour subsampling and\n colour depth\n\n---\n xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\nindex f9d94dc34f..16b54d8803 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n@@ -183,8 +183,8 @@ bool CWinSystemAmlogicGLESContext::CreateNewWindow(const std::string& name,\n   // backup data after mode switch\n   if (amhdmitx0_cs.Exists() && amhdmitx0_cd.Exists())\n   {\n-    m_cs = amhdmitx0_cs.Get<int>().value();\n-    m_cd = amhdmitx0_cd.Get<int>().value();\n+    m_cs = cs;\n+    m_cd = cd;\n   }\n \n   m_stereo_mode = stereo_mode;\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/0021-AMLCodec-marginal-increase-frame-buffer-levels.patch",
    "content": "From 73a8feac65bcae4e0c55855482cc485edf1630f2 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 16 Jan 2024 15:38:56 +0100\nSubject: [PATCH 21/21] AMLCodec: marginal increase frame buffer levels\n\n---\n xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\nindex 7d702cd1c4..dae7e39ea6 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n@@ -2638,7 +2638,7 @@ CDVDVideoCodec::VCReturn CAMLCodec::GetPicture(VideoPicture *pVideoPicture)\n   if (!m_opened)\n     return CDVDVideoCodec::VC_ERROR;\n \n-  if ((!m_drain && buffer_level > 1.0f) && (ret = DequeueBuffer()) == 0)\n+  if ((!m_drain && buffer_level > 5.0f) && (ret = DequeueBuffer()) == 0)\n   {\n     pVideoPicture->iFlags = 0;\n     m_tp_last_frame = std::chrono::system_clock::now();\n@@ -2679,7 +2679,7 @@ CDVDVideoCodec::VCReturn CAMLCodec::GetPicture(VideoPicture *pVideoPicture)\n   }\n   else if (m_drain)\n     return CDVDVideoCodec::VC_EOF;\n-  else if (buffer_level > 2.0f)\n+  else if (buffer_level > 10.0f)\n     return CDVDVideoCodec::VC_NONE;\n   else if (ret != EAGAIN || elapsed_since_last_frame > std::chrono::seconds(m_decoder_timeout))\n   {\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/kodi/kodi-temp-03-TEMP-fix-OnSettingChanged-signal.patch",
    "content": "From 1090b59aa68165e67a39895d7d648c7ff286ed8d Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Wed, 17 Feb 2021 07:59:09 +0100\nSubject: [PATCH] TEMP: fix OnSettingChanged signal\n\n---\n xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp b/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp\nindex 73816df648..fbd1f54680 100644\n--- a/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp\n+++ b/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp\n@@ -104,6 +104,8 @@ void CGUIDialogPeripheralSettings::OnSettingChanged(const std::shared_ptr<const\n   if (!peripheral)\n     return;\n\n+  peripheral->OnSettingChanged(setting->GetId());\n+\n   if (settingId == SETTING_APPEARANCE)\n   {\n     // Get the controller profile of the new appearance\n--\n2.30.0\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/0001-g12b_s922z_amazon_2nd_gen_cube_dts.patch",
    "content": "From ad806b6b591fdf43b586a3323a963ec49a5ff05e Mon Sep 17 00:00:00 2001\nDate: Wed, 9 Jul 2025 17:19:53 -0400\nSubject: [PATCH] Add DTS for g12b_s922z_amazon_2nd_gen_cube and update\n Makefile\n\n---\n arch/arm64/boot/dts/amlogic/Makefile          |   1 +\n .../g12b_s922z_amazon_2nd_gen_cube.dts        | 511 ++++++++++++++++++\n 2 files changed, 512 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/g12b_s922z_amazon_2nd_gen_cube.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex 9a58fe36b8b4..f216dcf7ca79 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -33,6 +33,7 @@ dtb-$(CONFIG_ARM64) += g12b_s922x_ugoos_am6b_rev_a_2g.dtb\n dtb-$(CONFIG_ARM64) += g12b_s922x_ugoos_am6b_rev_a_4g.dtb\n dtb-$(CONFIG_ARM64) += g12b_s922x_x88_king_rev_a.dtb\n dtb-$(CONFIG_ARM64) += g12b_s922x_bananapi_m2s.dtb\n+dtb-$(CONFIG_ARM64) += g12b_s922z_amazon_2nd_gen_cube.dtb\n dtb-$(CONFIG_ARM64) += sc2_s905x4_2g.dtb\n dtb-$(CONFIG_ARM64) += sc2_s905x4_2g_1gbit.dtb\n dtb-$(CONFIG_ARM64) += sc2_s905x4_4g.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/g12b_s922z_amazon_2nd_gen_cube.dts b/arch/arm64/boot/dts/amlogic/g12b_s922z_amazon_2nd_gen_cube.dts\nnew file mode 100644\nindex 000000000000..b5a54f15ec9b\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/g12b_s922z_amazon_2nd_gen_cube.dts\n@@ -0,0 +1,511 @@\n+#include \"coreelec_g12b.dtsi\"\n+\n+/{\n+\tmodel = \"Amazon Fire TV 2nd gen Cube\";\n+\tcoreelec-dt-id = \"g12b_s922z_amazon_2nd_gen_cube\";\n+\tamlogic-dt-id = \"g12brevb_raven_2g\";\n+\n+\t\n+\tmemory@00000000 {\n+\t\tdevice_type = \"memory\";\n+\t\tlinux,usable-memory = <0x00 0x00 0x00 0x80000000>;\n+\t};\n+\t\n+\treserved-memory {\n+\n+\t\tlinux,secmon {\n+\t\t\tsize = <0x00 0x2400000>;\n+\t\t\talloc-ranges = <0x00 0x5000000 0x00 0x2400000>;\n+\t\t\t/delete-property/ clear-map;\n+\t\t};\n+\t\t\n+\t\tlinux,meson-fb {\n+\t\t\talloc-ranges = <0x00 0x7f800000 0x00 0x800000>;\n+\t\t};\n+\t};\t\t\n+\n+\tbifrost {\n+\n+\t\tdvfs285_cfg {\n+\t\t\tthreshold = <0x64 0xbe>;\n+\t\t};\n+\n+\t\tdvfs500_cfg {\n+\t\t\tthreshold = <0xb4 0xdc>;\n+\t\t};\n+\n+\t\tdvfs666_cfg {\n+\t\t\tthreshold = <0xd2 0xec>;\n+\t\t};\n+\n+\t\tdvfs850_cfg {\n+\t\t\tthreshold = <0xe6 0xff>;\n+\t\t};\n+\t};\n+\t\n+\tsecmon {\n+\t\treserve_mem_size = <0x2300000>;\n+\t};\n+\n+\t/delete-node/ ethernet@ff3f0000;\n+\t\n+\tpinctrl@ff800014 {\n+\t\n+\t\t/delete-node/ jtag_apao_pin;\n+\t\t\n+\t\t/delete-node/ spdifout;\n+\t\t\n+\t\t/delete-node/ spdifout_a_mute;\n+\t};\n+\t\n+\tpinctrl@ff634480 {\n+\t\t\n+\t\t/delete-node/ jtag_apee_pin;\t\t\n+\n+\t\ttdmout_a: tdmout_a {\n+\t\t\tmux {\n+\t\t\t\tgroups = \"tdma_sclk\\0tdma_fs\\0tdma_dout0\";\n+\t\t\t\tfunction = \"tdma_out\";\n+\t\t\t};\n+\t\t};\n+\n+\t\ttdmin_a: tdmin_a {\n+\t\t\tmux {\n+\t\t\t\tgroups = \"tdma_din1\";\n+\t\t\t\tfunction = \"tdma_in\";\n+\t\t\t};\n+\t\t};\n+\n+\t\ttdmc_mclk: tdmc_mclk {\n+\t\t\tmux {\n+\t\t\t\tgroups = \"mclk1_a\";\n+\t\t\t\tfunction = \"mclk1\";\n+\t\t\t};\n+\t\t};\n+\n+\t\ttdmout_c: tdmout_c {\n+\t\t\tmux {\n+\t\t\t\tgroups = \"tdmc_sclk_a\\0tdmc_fs_a\";\n+\t\t\t\tfunction = \"tdmc_out\";\n+\t\t\t\tdrive-strength = <0x03>;\n+\t\t\t};\n+\t\t};\n+\n+\t\ttdmin_c: tdmin_c {\n+\t\t\tmux {\n+\t\t\t\tgroups = \"tdmc_din0_a\";\n+\t\t\t\tfunction = \"tdmc_in\";\n+\t\t\t\tdrive-strength = <0x03>;\n+\t\t\t};\n+\t\t};\n+\n+\t\tspdifin: spdifin {\n+\t\t\tmux {\n+\t\t\t\tgroups = \"spdif_in_h\";\n+\t\t\t\tfunction = \"spdif_in\";\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\tusb3phy@ffe09080 {\n+\t\tgpio-vbus-power = \"GPIOH_4\";\n+\t\tgpios = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;\n+\t};\n+\n+\t/delete-node/ jtag;\n+\t\n+\tsoc {\n+\t\tcbus@ffd00000 {\n+\t\t\ti2c@1c000 {  \n+\t\t\t\t/delete-node/ rt5651@1a;\n+\t\t\t\n+\t\t\t\tis31fl3236@3F {\n+\t\t\t\t\tcompatible = \"issi,is31fl3236,gva\";\n+\t\t\t\t\treg = <0x3f>;\n+\t\t\t\t\t#address-cells = <1>;\n+\t\t\t\t\t#size-cells = <0>;\n+\t\n+\t\t\t\t\tled@1 {\n+\t\t\t\t\t\treg_offset = <1>;\n+\t\t\t\t\t\tlabel = \"led1\";\n+\t\t\t\t\t};\n+\n+\t\t\t\t\tled@2 {\n+\t\t\t\t\t\treg_offset = <2>;\n+\t\t\t\t\t\tlabel = \"led2\";\n+\t\t\t\t\t};\n+\n+\t\t\t\t\tled@3 {\n+\t\t\t\t\t\treg_offset = <3>;\n+\t\t\t\t\t\tlabel = \"led3\";\n+\t\t\t\t\t};\n+\n+\t\t\t\t\tled@4 {\n+\t\t\t\t\t\treg_offset = <4>;\n+\t\t\t\t\t\tlabel = \"led4\";\n+\t\t\t\t\t};\n+\t\t\t\t\t\n+\t\t\t\t\tled@5 {\n+\t\t\t\t\t\treg_offset = <5>;\n+\t\t\t\t\t\tlabel = \"led5\";\n+\t\t\t\t\t};\n+\t\t\t\t\t\n+\t\t\t\t\tled@6 {\n+\t\t\t\t\t\treg_offset = <6>;\n+\t\t\t\t\t\tlabel = \"led6\";\n+\t\t\t\t\t};\n+\n+\t\t\t\t\tled@7 {\n+\t\t\t\t\t\treg_offset = <7>;\n+\t\t\t\t\t\tlabel = \"led7\";\n+\t\t\t\t\t};\n+\n+\t\t\t\t\tled@8 {\n+\t\t\t\t\t\treg_offset = <8>;\n+\t\t\t\t\t\tlabel = \"led8\";\n+\t\t\t\t\t};\n+\n+\t\t\t\t\tled@9 {\n+\t\t\t\t\t\treg_offset = <9>;\n+\t\t\t\t\t\tlabel = \"led9\";\n+\t\t\t\t\t};\n+\n+\t\t\t\t\tled@10 {\n+\t\t\t\t\t\treg_offset = <10>;\n+\t\t\t\t\t\tlabel = \"led10\";\n+\t\t\t\t\t};\n+\t\t\t\t\t\n+\t\t\t\t\tled@11 {\n+\t\t\t\t\t\treg_offset = <11>;\n+\t\t\t\t\t\tlabel = \"led11\";\n+\t\t\t\t\t};\n+\n+\t\t\t\t\tled@12 {\n+\t\t\t\t\t\treg_offset = <12>;\n+\t\t\t\t\t\tlabel = \"led12\";\n+\t\t\t\t\t};\n+\n+\t\t\t\t\tled@13 {\n+\t\t\t\t\t\treg_offset = <13>;\n+\t\t\t\t\t\tlabel = \"led13\";\n+\t\t\t\t\t};\n+\n+\t\t\t\t\tled@14 {\n+\t\t\t\t\t\treg_offset = <14>;\n+\t\t\t\t\t\tlabel = \"led14\";\n+\t\t\t\t\t};\n+\t\t\t\t\t\n+\t\t\t\t\tled@15 {\n+\t\t\t\t\t\treg_offset = <15>;\n+\t\t\t\t\t\tlabel = \"led15\";\n+\t\t\t\t\t};\t\t\t\t\t\t\t\t\t\t\n+\t\t\t\t};\t\n+\t\t\t};\t\t\t\t\t\t\n+\t\t};\n+\n+\t\taobus@ff800000 {\n+\t\t\t\n+\t\t\t/delete-node/ meson-irblaster@14c;\n+\t\t}; \n+\n+\t\taudiobus@0xff642000 {\n+\n+\t\t\taml_tdma: tdma {\n+\t\t\t\tcompatible = \"amlogic, g12a-snd-tdma\";\n+\t\t\t\t#sound-dai-cells = <0x00>;\n+\t\t\t\tdai-tdm-lane-slot-mask-in = <0x00 0x01>;\n+\t\t\t\tdai-tdm-lane-slot-mask-out = <0x01 0x00>;\n+\t\t\t\tdai-tdm-clk-sel = <0x00>;\n+\t\t\t\tclocks = <&clkaudio CLKID_AUDIO_MCLK_A>, \n+\t\t\t\t\t<&clkc CLKID_MPLL1>; \n+\t\t\t\tclock-names = \"mclk\\0clk_srcpll\";\n+\t\t\t\tpinctrl-names = \"tdm_pins\";\n+\t\t\t\tpinctrl-0 = <&tdmout_a>, \n+\t\t\t\t\t<&tdmin_a>;\n+\t\t\t};\n+\n+\t\t\ttdmb {\n+\t\t\t\tclocks = <&clkaudio CLKID_AUDIO_MCLK_B>, \n+\t\t\t\t\t<&clkc CLKID_MPLL0>; \n+\t\t\t\tclock-names = \"mclk\\0clk_srcpll\\0samesource_sysclk\";\n+\t\t\t\tpinctrl-0 = <&tdmb_mclk>, \n+\t\t\t\t\t<&tdmout_b>; \n+\t\t\t};\n+\t\t\t\n+\t\t\tspdif {\n+\t\t\t\tpinctrl-names = \"spdif_pins\";\n+\t\t\t\tpinctrl-0 = <&spdifin>;\n+\t\t\t\t/delete-property/ pinctrl-1;\n+\t\t\t};\n+\t\t};\n+\t};\n+\t\n+\tserial@ffd24000 {\n+\t\tstatus = \"disabled\";\n+\t};\n+\n+\temmc@ffe07000 {\n+\t\temmc {\n+\t\t\t/delete-property/ save_para ;\n+\t\t\t/delete-property/ compute_cmd_delay;\n+\t\t\t/delete-property/ compute_coef;\n+\t\t\tgpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;\n+\t\t\thw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;\n+\t\t\tcaps = \"MMC_CAP_8_BIT_DATA\\0MMC_CAP_MMC_HIGHSPEED\\0MMC_CAP_SD_HIGHSPEED\\0MMC_CAP_NONREMOVABLE\\0MMC_CAP_1_8V_DDR\\0MMC_CAP_HW_RESET\\0MMC_CAP_ERASE\\0MMC_CAP_CMD23\\0MMC_CAP_DRIVER_TYPE_A\";\n+\t\t\tcaps2 = \"MMC_CAP2_HS200\\0MMC_CAP2_HS400\";\n+\t\t};\n+\t};\n+\n+\tsd@ffe05000 {\n+\t\tinterrupts = <0x00 0xbe 0x04>;\n+\n+\t\tsd {\n+\t\t\tcaps = \"MMC_CAP_4_BIT_DATA\\0MMC_CAP_MMC_HIGHSPEED\\0MMC_CAP_SD_HIGHSPEED\\0MMC_CAP_UHS_SDR12\\0MMC_CAP_UHS_SDR25\\0MMC_CAP_UHS_SDR50\\0MMC_CAP_UHS_SDR104\";\n+\t\t\tvol_switch_def = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;\n+\t\t\tvol_switch = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;\n+\t\t\tvol_switch_delay = <0x96>;\n+\t\t\tf_max = <0xbebc200>;\n+\t\t};\n+\n+\t\tsdio {\n+\t\t\tcaps = \"MMC_CAP_4_BIT_DATA\\0MMC_CAP_MMC_HIGHSPEED\\0MMC_CAP_SD_HIGHSPEED\\0MMC_CAP_NONREMOVABLE\\0MMC_CAP_UHS_SDR12\\0MMC_CAP_UHS_SDR25\\0MMC_CAP_UHS_SDR50\\0MMC_CAP_UHS_SDR104\\0MMC_PM_KEEP_POWER\\0MMC_CAP_SDIO_IRQ\";\n+\t\t\tf_min = <0x61a80>;\n+\t\t\tf_max = <0xbebc200>;\n+\t\t};\n+\t};\n+\n+\tsdio@ffe03000 {\n+\t\tmt76x8_pmu_en_gpio = <&gpio GPIOX_15 GPIO_ACTIVE_HIGH>;\n+\t};\n+\n+\tgpioleds {\n+\t\tled_power {\n+\t\t\tgpios = <&gpio GPIOA_4 GPIO_ACTIVE_HIGH>;\n+\t\t\tdefault-state = \"on\";\n+\t\t\tretain-state-shutdown;\n+\t\t};\n+\t};\t\n+\t\n+\tbt-dev {\n+\t\tgpio_en = <&gpio GPIOX_14 GPIO_ACTIVE_HIGH>;\n+\t\t/delete-property/ gpio_reset;\n+\t\t/delete-property/ gpio_hostwake;\n+\t};\n+    \n+\twifi {\n+\t\tpower_on_pin = <&gpio GPIOX_15 GPIO_ACTIVE_HIGH>;\n+\t\tpower_pin_reset = <0x01>;\n+\t\t/delete-property/ dhd_static_buf;\n+\t\t/delete-property/ pinctrl-names;\n+\t\t/delete-property/ pinctrl-0;\n+\t};\n+\n+\twifi_pwm_conf {\n+\n+\t\tpwm_channel1_conf {\n+\t\t\tpwms = <&pwm_ef 0x00 0x7558 0x00>;\n+\t\t\tduty-cycle = <0x3aac>;\n+\t\t};\n+\n+\t\tpwm_channel2_conf {\n+\t\t\tpwms = <&pwm_ef 0x02 0x754e 0x00>;\n+\t\t\tduty-cycle = <0x3aa7>;\n+\t\t};\n+\t};\t\n+\n+\tgpio_keypad {\n+\t\tkey_num = <0x04>;\n+\t\tkey_name = \"mute\\0action\\0volup\\0voldown\";\n+\t\tkey_code = <0xF0 0x74 0x72 0x73>;\n+\t\tkey-gpios =  <&gpio GPIOX_16 GPIO_ACTIVE_HIGH>,\n+\t\t\t<&gpio GPIOX_6 GPIO_ACTIVE_HIGH>,\n+\t\t\t<&gpio GPIOX_12 GPIO_ACTIVE_HIGH>,\n+\t\t\t<&gpio GPIOX_13 GPIO_ACTIVE_HIGH>;\n+\t\tinterrupts = <0x00 0x46 0x01 0x00 0x47 0x02>;\n+\t\tinterrupt-names = \"irq_keyup\\0irq_keydown\";\n+\t\tdetect_mode = <0x00>;\n+\t\t/delete-property/ reg;\n+\t};\n+\t\n+\t/delete-node/ adc_keypad;\n+\t\n+\tmeson-remote {\n+\t\tdemod_enable;\n+\t};\n+\n+\tmeson-ir-tx {\n+\t\tcompatible = \"amlogic,meson-g12a-ir-tx\", \"amlogic,meson-ir-tx\";\n+\t\treg = <0x00 0xff80014c 0x00 0x10>;\n+\t\tpinctrl-names = \"default\";\n+\t\tpinctrl-0 = <&irblaster_pins>;\n+\t\tinterrupts = <0x00 0xc6 0x01>;\n+\t\tclocks = <&clkc CLKID_CLK81>, <&xtal>;\n+\t\tclock-names = \"sysclk\", \"xtal\";\n+\t\tstatus = \"okay\";\n+\t};\n+\n+\tcpu_opp_table0 {\n+\n+\t\topp00 {\n+\t\t\topp-hz = <0x00 0x5f5e100>;\n+\t\t\topp-microvolt = <0xb2778>;\n+\t\t};\n+\n+\t\topp01 {\n+\t\t\topp-hz = <0x00 0xee6b280>;\n+\t\t\topp-microvolt = <0xb2778>;\n+\t\t};\n+\n+\t\topp02 {\n+\t\t\topp-hz = <0x00 0x1dcd6500>;\n+\t\t\topp-microvolt = <0xb2778>;\n+\t\t};\n+\n+\t\topp03 {\n+\t\t\topp-hz = <0x00 0x27c19cc0>;\n+\t\t\topp-microvolt = <0xb2778>;\n+\t\t};\n+\n+\t\topp04 {\n+\t\t\topp-hz = <0x00 0x3b9aca00>;\n+\t\t\topp-microvolt = <0xb9ca8>;\n+\t\t};\n+\n+\t\topp05 {\n+\t\t\topp-hz = <0x00 0x47868c00>;\n+\t\t\topp-microvolt = <0xbeac8>;\n+\t\t};\n+\n+\t\topp06 {\n+\t\t\topp-hz = <0x00 0x5353c980>;\n+\t\t\topp-microvolt = <0xc5ff8>;\n+\t\t};\n+\n+\t\topp07 {\n+\t\t\topp-hz = <0x00 0x5a1f4a00>;\n+\t\t\topp-microvolt = <0xd2348>;\n+\t\t};\n+\n+\t\topp08 {\n+\t\t\topp-hz = <0x00 0x5fd82200>;\n+\t\t\topp-microvolt = <0xdbf88>;\n+\t\t};\n+\n+\t\topp09 {\n+\t\t\topp-hz = <0x00 0x6590fa00>;\n+\t\t\topp-microvolt = <0xe82d8>;\n+\t\t};\n+\n+\t\topp10 {\n+\t\t\topp-hz = <0x00 0x71b9c500>;\n+\t\t\topp-microvolt = <0xf9830>;\n+\t\t};\n+\t\topp11 {\n+\t\t\topp-hz = <0x00 0x7829b800>;\n+\t\t\topp-microvolt = <0xf9830>;\n+\t\t};\t\t\n+\t};\n+\n+\tcpu_opp_table1 {\n+\n+\t\topp00 {\n+\t\t\topp-hz = <0x00 0x5f5e100>;\n+\t\t\topp-microvolt = <0xb2778>;\n+\t\t};\n+\n+\t\topp01 {\n+\t\t\topp-hz = <0x00 0xee6b280>;\n+\t\t\topp-microvolt = <0xb2778>;\n+\t\t};\n+\n+\t\topp02 {\n+\t\t\topp-hz = <0x00 0x1dcd6500>;\n+\t\t\topp-microvolt = <0xb2778>;\n+\t\t};\n+\n+\t\topp03 {\n+\t\t\topp-hz = <0x00 0x27c19cc0>;\n+\t\t\topp-microvolt = <0xb2778>;\n+\t\t};\n+\n+\t\topp04 {\n+\t\t\topp-hz = <0x00 0x3b9aca00>;\n+\t\t\topp-microvolt = <0xb2778>;\n+\t\t};\n+\n+\t\topp05 {\n+\t\t\topp-hz = <0x00 0x47868c00>;\n+\t\t\topp-microvolt = <0xb7598>;\n+\t\t};\n+\n+\t\topp06 {\n+\t\t\topp-hz = <0x00 0x5353c980>;\n+\t\t\topp-microvolt = <0xbc3b8>;\n+\t\t};\n+\n+\t\topp07 {\n+\t\t\topp-hz = <0x00 0x5a1f4a00>;\n+\t\t\topp-microvolt = <0xbc3b8>;\n+\t\t};\n+\n+\t\topp08 {\n+\t\t\topp-hz = <0x00 0x5fd82200>;\n+\t\t\topp-microvolt = <0xbeac8>;\n+\t\t};\n+\n+\t\topp09 {\n+\t\t\topp-hz = <0x00 0x6590fa00>;\n+\t\t\topp-microvolt = <0xc11d8>;\n+\t\t};\n+\n+\t\topp10 {\n+\t\t\topp-hz = <0x00 0x6b49d200>;\n+\t\t\topp-microvolt = <0xcae18>;\n+\t\t};\n+\n+\t\topp11 {\n+\t\t\topp-hz = <0x00 0x71b9c500>;\n+\t\t\topp-microvolt = <0xd2348>;\n+\t\t};\n+\n+\t\topp12 {\n+\t\t\topp-hz = <0x00 0x7829b800>;\n+\t\t\topp-microvolt = <0xde698>;\n+\t\t};\n+\n+\t\topp13 {\n+\t\t\topp-hz = <0x00 0x7d2b7500>;\n+\t\t\topp-microvolt = <0xe82d8>;\n+\t\t};\n+\n+\t\topp14 {\n+\t\t\topp-hz = <0x00 0x839b6800>;\n+\t\t\topp-microvolt = <0xf6d38>;\n+\t\t};\n+\t\topp15 {\n+\t\t\topp-hz = <0x00 0x89544000>;\n+\t\t\topp-microvolt = <0xf6d38>;\n+\t\t};\n+\n+\t\topp16 {\n+\t\t\topp-hz = <0x00 0x8f0d1800>;\n+\t\t\topp-microvolt = <0xf9830>;\n+\t\t};\t\t\n+\t};\n+\n+\tpwmao_d-regulator {\n+\t\tpwms = <&pwm_AO_cd 0x01 0x4e2 0x00>;\n+\t\tregulator-min-microvolt = <0xb0068>;\n+\t\tregulator-max-microvolt = <0xf9830>;\n+\t\tmax-duty-cycle = <0x4e2>;\n+\t\tvoltage-table = <0xf9830 0x00 0xf6d38 0x03 0xf4628 0x06 0xf1f18 0x0a 0xef808 0x0d 0xed0f8 0x10 0xea9e8 0x14 0xe82d8 0x17 0xe5bc8 0x1a 0xe34b8 0x1e 0xe0da8 0x21 0xde698 0x24 0xdbf88 0x28 0xd9878 0x2b 0xd7168 0x2e 0xd4a58 0x32 0xd2348 0x35 0xcfc38 0x38 0xcd528 0x3c 0xcae18 0x3f 0xc8708 0x43 0xc5ff8 0x46 0xc38e8 0x49 0xc11d8 0x4c 0xbeac8 0x50 0xbc3b8 0x53 0xb9ca8 0x56 0xb7598 0x5a 0xb4e88 0x5d 0xb2778 0x60 0xb0068 0x64>;\n+\t};\n+\t\t\n+\tpwmab_a-regulator {\t\n+\t\tpwms = <&pwm_ab 0x00 0x4e2 0x00>;\n+\t\tregulator-min-microvolt = <0xb0068>;\n+\t\tregulator-max-microvolt = <0xf9830>;\n+\t\tmax-duty-cycle = <0x4e2>;\n+\t\tvoltage-table = <0xf9830 0x00 0xf6d38 0x03 0xf4628 0x06 0xf1f18 0x0a 0xef808 0x0d 0xed0f8 0x10 0xea9e8 0x14 0xe82d8 0x17 0xe5bc8 0x1a 0xe34b8 0x1e 0xe0da8 0x21 0xde698 0x24 0xdbf88 0x28 0xd9878 0x2b 0xd7168 0x2e 0xd4a58 0x32 0xd2348 0x35 0xcfc38 0x38 0xcd528 0x3c 0xcae18 0x3f 0xc8708 0x43 0xc5ff8 0x46 0xc38e8 0x49 0xc11d8 0x4c 0xbeac8 0x50 0xbc3b8 0x53 0xb9ca8 0x56 0xb7598 0x5a 0xb4e88 0x5d 0xb2778 0x60 0xb0068 0x64>;\n+\t};\t\n+};\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/0002-amdv-dv-not-enabled-when-dolby_vision_policy-changed.patch",
    "content": "From 7a4a4a239cdaf507a44539aeef91ccd0f8060e13 Mon Sep 17 00:00:00 2001\nFrom: yao liu <yao.liu@amlogic.com>\nDate: Thu, 28 Jul 2022 17:20:49 +0800\nSubject: [PATCH 02/18] amdv: dv not enabled when dolby_vision_policy changed\n [1/1]\n\nPD#SWPL-89319\n\nProblem:\ndv not enabled when dolby_vision_policy changed\n\nSolution:\n1.Config dolby_vision_hdr10_policy for sdr in both\nalways hdr and adaptive hdr mode. SDR processed\nby dv by default.\n2.Add vs12 control for tv, vs12 is not enabled by\ndefault, due to some hdr nts test fail.\n\nVerify:\nt7\n\nChange-Id: Ibf14be850214b5af1ba91ef394d16ca63433317c\nSigned-off-by: yao liu <yao.liu@amlogic.com>\n---\n .../amdolby_vision/amdolby_vision.c           | 49 ++++++++++---------\n 1 file changed, 27 insertions(+), 22 deletions(-)\n\ndiff --git a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\nindex f6a30c011a9c..c59aa708b0c7 100644\n--- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n+++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n@@ -137,19 +137,22 @@ static unsigned int last_dolby_vision_policy;\n /* bit3: follow sink 0: bypass hlg to vpp, 1: process hlg by dolby core */\n /* bit4: follow source 0: bypass hlg to vpp, 1: process hlg by dolby core */\n /* === SDR === */\n-/* bit5: 0: bypass SDR to vpp, 1: process SDR by dolby core */\n-/* set by policy_process */\n+/* bit5: follow sink 0: bypass SDR to vpp, 1: process SDR by dolby core */\n+/* bit6: follow source 0: bypass SDR to vpp, 1: process SDR by dolby core */\n #define HDR_BY_DV_F_SINK 0x1\n #define HDR_BY_DV_F_SRC 0x2\n #define HDRP_BY_DV 0x4\n #define HLG_BY_DV_F_SINK 0x8\n #define HLG_BY_DV_F_SRC 0x10\n-#define SDR_BY_DV 0x20\n+#define SDR_BY_DV_F_SINK 0x20\n+#define SDR_BY_DV_F_SRC 0x40\n \n-static unsigned int dolby_vision_hdr10_policy = HDR_BY_DV_F_SINK;\n+static unsigned int dolby_vision_hdr10_policy;\n module_param(dolby_vision_hdr10_policy, uint, 0664);\n MODULE_PARM_DESC(dolby_vision_hdr10_policy, \"\\n dolby_vision_hdr10_policy\\n\");\n-static unsigned int last_dolby_vision_hdr10_policy = HDR_BY_DV_F_SINK;\n+static unsigned int last_dolby_vision_hdr10_policy;\n+\n+static bool enable_amvs12_for_tv;\n \n /* enable hdmi dv std to stb core */\n static uint hdmi_to_stb_policy = 1;\n@@ -5455,13 +5458,6 @@ static int dolby_vision_policy_process\n \t\t\t\t}\n \t\t\t}\n \t\t}\n-\t\tif (src_format == FORMAT_SDR &&\n-\t\t    (mode_change || *mode == dolby_vision_mode)) {\n-\t\t\tif (*mode == DOLBY_VISION_OUTPUT_MODE_BYPASS)\n-\t\t\t\tdolby_vision_hdr10_policy &= ~SDR_BY_DV;\n-\t\t\telse\n-\t\t\t\tdolby_vision_hdr10_policy |= SDR_BY_DV;\n-\t\t}\n \t\treturn mode_change;\n \t}\n \n@@ -5728,14 +5724,6 @@ static int dolby_vision_policy_process\n \t\t\tmode_change = 1;\n \t\t}\n \t}\n-\n-\tif (src_format == FORMAT_SDR &&\n-\t    (mode_change || *mode == dolby_vision_mode)) {\n-\t\tif (*mode == DOLBY_VISION_OUTPUT_MODE_BYPASS)\n-\t\t\tdolby_vision_hdr10_policy &= ~SDR_BY_DV;\n-\t\telse\n-\t\t\tdolby_vision_hdr10_policy |= SDR_BY_DV;\n-\t}\n \treturn mode_change;\n }\n \n@@ -10580,16 +10568,20 @@ int get_dolby_vision_hdr_policy(void)\n \t\t/* policy == FOLLOW_SRC, check hdr/hlg policy */\n \t\tret |= (dolby_vision_hdr10_policy & HDR_BY_DV_F_SRC) ? 1 : 0;\n \t\tret |= (dolby_vision_hdr10_policy & HLG_BY_DV_F_SRC) ? 2 : 0;\n+\t\tret |= (dolby_vision_hdr10_policy & SDR_BY_DV_F_SRC) ? 0x40 : 0;\n \t} else if (dolby_vision_policy == DOLBY_VISION_FOLLOW_SINK) {\n \t\t/* policy == FOLLOW_SINK, check hdr/hlg policy */\n \t\tret |= (dolby_vision_hdr10_policy & HDR_BY_DV_F_SINK) ? 1 : 0;\n \t\tret |= (dolby_vision_hdr10_policy & HLG_BY_DV_F_SINK) ? 2 : 0;\n+\t\tret |= (dolby_vision_hdr10_policy & SDR_BY_DV_F_SINK) ? 0x20 : 0;\n \t} else {\n \t\t/* policy == FORCE, check hdr/hlg policy */\n \t\tret |= (dolby_vision_hdr10_policy & HDR_BY_DV_F_SRC) ? 1 : 0;\n \t\tret |= (dolby_vision_hdr10_policy & HLG_BY_DV_F_SRC) ? 2 : 0;\n \t\tret |= (dolby_vision_hdr10_policy & HDR_BY_DV_F_SINK) ? 1 : 0;\n \t\tret |= (dolby_vision_hdr10_policy & HLG_BY_DV_F_SINK) ? 2 : 0;\n+\t\tret |= (dolby_vision_hdr10_policy & SDR_BY_DV_F_SINK) ? 0x20 : 0;\n+\t\tret |= (dolby_vision_hdr10_policy & SDR_BY_DV_F_SRC) ? 0x40 : 0;\n \t}\n \treturn ret;\n }\n@@ -11924,6 +11916,13 @@ int register_dv_functions(const struct dolby_vision_func_s *func)\n \t\t\t\tif (!tv_dovi_setting)\n \t\t\t\t\treturn -ENOMEM;\n \t\t\t}\n+\t\t\tdolby_vision_hdr10_policy |= SDR_BY_DV_F_SINK;\n+\t\t\tdolby_vision_hdr10_policy |= HDR_BY_DV_F_SINK;\n+\t\t\tlast_dolby_vision_hdr10_policy = dolby_vision_hdr10_policy;\n+\t\t\tif (ko_info)\n+\t\t\t\tpr_info(\"hdr10_policy %d, ko_info %s\\n\",\n+\t\t\t\t\tdolby_vision_hdr10_policy, ko_info);\n+\n \t\t} else if (func->tv_control_path && !p_funcs_tv) {\n \t\t\tpr_info(\"*** register_dv_tv_functions\\n\");\n \t\t\tif (!ko_info) {\n@@ -11966,6 +11965,14 @@ int register_dv_functions(const struct dolby_vision_func_s *func)\n \t\t\t\tmemset(tv_input_info, 0,\n \t\t\t\t       sizeof(struct tv_input_info_s));\n \t\t\t}\n+\t\t\tif (enable_amvs12_for_tv) {\n+\t\t\t\tdolby_vision_hdr10_policy |= HLG_BY_DV_F_SINK;\n+\t\t\t\tdolby_vision_hdr10_policy |= HDR_BY_DV_F_SINK;\n+\t\t\t}\n+\t\t\tlast_dolby_vision_hdr10_policy = dolby_vision_hdr10_policy;\n+\t\t\tif (ko_info)\n+\t\t\t\tpr_info(\"hdr10_policy %d, ko_info %s\\n\",\n+\t\t\t\t\tdolby_vision_hdr10_policy, ko_info);\n \t\t} else {\n \t\t\treturn ret;\n \t\t}\n@@ -13370,8 +13377,6 @@ static int amdolby_vision_probe(struct platform_device *pdev)\n \tpr_info(\"\\n cpu_id=%d tvmode=%d\\n\", dv_meson_dev.cpu_id, tv_mode);\n \tmemset(devp, 0, (sizeof(struct amdolby_vision_dev_s)));\n \tif (is_meson_tm2_tvmode()) {\n-\t\tdolby_vision_hdr10_policy |= HLG_BY_DV_F_SINK;\n-\t\tpr_info(\"enable DV HLG when follow sink.\\n\");\n \t\tdolby_vision_flags |= FLAG_RX_EMP_VSEM;\n \t\tpr_info(\"enable DV VSEM.\\n\");\n \t}\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/0003-hdmitx-forcely-send-bt.2020-for-all-DV-case-1-2.patch",
    "content": "From 34c8d1baaac620e55bcd1cd565e1ae66a925f995 Mon Sep 17 00:00:00 2001\nFrom: hang cheng <hang.cheng@amlogic.com>\nDate: Wed, 18 May 2022 16:37:23 +0800\nSubject: [PATCH 03/18] hdmitx: forcely send bt.2020 for all DV case [1/2]\n\nPD#SWPL-79072\n\nProblem:\nDolby Vision IDK2.6 kit chapter 4.4.1 Expected AVI-IF\nfor Dolby Vision output, need BT.2020 under all DV\noutput case\n\nSolution:\nforcely send bt.2020 for all DV case\n\nVerify:\nan400\n\nChange-Id: Ie0b74b4c4196ca4d20bbb07cbce99487f9479162\nSigned-off-by: hang cheng <hang.cheng@amlogic.com>\n---\n .../vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c     | 23 +++++++++++--------\n 1 file changed, 14 insertions(+), 9 deletions(-)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\nindex c66d30e2d696..d97b4c2ab736 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n@@ -1911,8 +1911,11 @@ void hdmitx_set_vsif_pkt(enum eotf_type type,\n \t\t\thdmitx_device.hwop.setpacket(HDMI_PACKET_DRM,\n \t\t\t\tNULL, NULL);\n \t\t\thdev->hwop.setpacket(HDMI_PACKET_VEND, VEN_DB1, VEN_HB);\n+\t\t\t/* Dolby Vision Source System-on-Chip Platform Kit Version 2.6:\n+\t\t\t * 4.4.1 Expected AVI-IF for Dolby Vision output, need BT2020 for DV\n+\t\t\t */\n \t\t\thdev->hwop.cntlconfig(hdev, CONF_AVI_BT2020,\n-\t\t\t\tCLR_AVI_BT2020);/*BT709*/\n+\t\t\t\tSET_AVI_BT2020);/*BT.2020*/\n \t\t\tif (tunnel_mode == RGB_8BIT) {\n \t\t\t\thdev->hwop.cntlconfig(hdev,\n \t\t\t\t\tCONF_AVI_RGBYCC_INDIC,\n@@ -2013,8 +2016,11 @@ void hdmitx_set_vsif_pkt(enum eotf_type type,\n \t\t\thdmitx_device.hwop.setpacket(HDMI_PACKET_DRM,\n \t\t\t\tNULL, NULL);\n \t\t\thdev->hwop.setpacket(HDMI_PACKET_VEND, VEN_DB2, VEN_HB);\n+\t\t\t/* Dolby Vision Source System-on-Chip Platform Kit Version 2.6:\n+\t\t\t * 4.4.1 Expected AVI-IF for Dolby Vision output, need BT2020 for DV\n+\t\t\t */\n \t\t\thdev->hwop.cntlconfig(hdev, CONF_AVI_BT2020,\n-\t\t\t\tCLR_AVI_BT2020);/*BT709*/\n+\t\t\t\tSET_AVI_BT2020);/*BT.2020*/\n \t\t\tif (tunnel_mode == RGB_8BIT) {/*RGB444*/\n \t\t\t\thdev->hwop.cntlconfig(hdev,\n \t\t\t\t\tCONF_AVI_RGBYCC_INDIC,\n@@ -2035,13 +2041,12 @@ void hdmitx_set_vsif_pkt(enum eotf_type type,\n \t\t\thdmitx_device.hwop.setpacket(HDMI_PACKET_DRM,\n \t\t\t\tNULL, NULL);\n \t\t\thdev->hwop.setpacket(HDMI_PACKET_VEND, VEN_DB2, VEN_HB);\n-\t\t\tif (hdev->rxcap.colorimetry_data & 0xe0)\n-\t\t\t\t/*if RX support BT2020, then output BT2020*/\n-\t\t\t\thdev->hwop.cntlconfig(hdev, CONF_AVI_BT2020,\n-\t\t\t\t\tSET_AVI_BT2020);/*BT2020*/\n-\t\t\telse\n-\t\t\t\thdev->hwop.cntlconfig(hdev, CONF_AVI_BT2020,\n-\t\t\t\t\tCLR_AVI_BT2020);/*BT709*/\n+\t\t\t/* Dolby vision HDMI Signaling Case25,\n+\t\t\t * UCD323 not declare bt2020 colorimetry,\n+\t\t\t * need to forcely send BT.2020\n+\t\t\t */\n+\t\t\thdev->hwop.cntlconfig(hdev, CONF_AVI_BT2020,\n+\t\t\t\tSET_AVI_BT2020);/*BT2020*/\n \t\t\tif (tunnel_mode == RGB_10_12BIT) {/*10/12bit RGB444*/\n \t\t\t\thdev->hwop.cntlconfig(hdev,\n \t\t\t\t\tCONF_AVI_RGBYCC_INDIC,\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/0004-DT-make-a-copy-from-arm64-to-arm.patch",
    "content": "From 862503c9dec4dd30c98552d88a2e0ed441be4e4c Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 25 May 2023 14:53:10 +0200\nSubject: [PATCH 04/18] DT: make a copy from arm64 to arm\n\n---\n arch/arm/boot/dts/amlogic/Makefile            |  29 +-\n .../arm/boot/dts/amlogic/coreelec_common.dtsi | 264 ++++++++++++++++++\n .../boot/dts/amlogic/coreelec_g12_common.dtsi |  48 ++++\n arch/arm/boot/dts/amlogic/coreelec_g12b.dtsi  |  64 +++++\n .../arm/boot/dts/amlogic/coreelec_g12b_a.dtsi |  64 +++++\n .../dts/amlogic/g12b_s922x_minix_u22xj.dts    | 119 ++++++++\n .../amlogic/g12b_s922x_minix_u22xj_max.dts    | 130 +++++++++\n .../g12b_s922x_minix_u22xj_max_rev_a.dts      |  25 ++\n .../dts/amlogic/g12b_s922x_ugoos_am6_2g.dts   | 101 +++++++\n .../dts/amlogic/g12b_s922x_ugoos_am6_4g.dts   |   9 +\n .../amlogic/g12b_s922x_ugoos_am6_rev_a_2g.dts | 101 +++++++\n .../amlogic/g12b_s922x_ugoos_am6_rev_a_4g.dts |   9 +\n .../dts/amlogic/g12b_s922x_ugoos_am6b_2g.dts  |  29 ++\n .../dts/amlogic/g12b_s922x_ugoos_am6b_4g.dts  |   9 +\n .../g12b_s922x_ugoos_am6b_rev_a_2g.dts        |  29 ++\n .../g12b_s922x_ugoos_am6b_rev_a_4g.dts        |   9 +\n 16 files changed, 1025 insertions(+), 14 deletions(-)\n create mode 100644 arch/arm/boot/dts/amlogic/coreelec_common.dtsi\n create mode 100644 arch/arm/boot/dts/amlogic/coreelec_g12_common.dtsi\n create mode 100644 arch/arm/boot/dts/amlogic/coreelec_g12b.dtsi\n create mode 100644 arch/arm/boot/dts/amlogic/coreelec_g12b_a.dtsi\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max_rev_a.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_2g.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_4g.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_2g.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_4g.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_2g.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_4g.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_2g.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_4g.dts\n\ndiff --git a/arch/arm/boot/dts/amlogic/Makefile b/arch/arm/boot/dts/amlogic/Makefile\nindex 1d819778d955..a481e8b54b2d 100644\n--- a/arch/arm/boot/dts/amlogic/Makefile\n+++ b/arch/arm/boot/dts/amlogic/Makefile\n@@ -1,14 +1,15 @@\n-\n-targets += dtbs\n-\n-DTB_NAMES := $(subst $\\\",,$(CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES))\n-ifneq ($(DTB_NAMES),)\n-DTB_LIST := $(addsuffix .dtb,$(DTB_NAMES))\n-else\n-DTB_LIST := $(dtb-y)\n-endif\n-targets += $(DTB_LIST)\n-\n-dtbs: $(addprefix $(obj)/, $(DTB_LIST))\n-\n-clean-files := *.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_minix_u22xj.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_minix_u22xj_max.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_minix_u22xj_max_rev_a.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6_2g.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6_4g.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6_rev_a_2g.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6_rev_a_4g.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6b_2g.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6b_4g.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6b_rev_a_2g.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6b_rev_a_4g.dtb\n+\n+always\t\t:= $(dtb-y)\n+subdir-y\t:= $(dts-dirs)\n+clean-files\t:= *.dtb\ndiff --git a/arch/arm/boot/dts/amlogic/coreelec_common.dtsi b/arch/arm/boot/dts/amlogic/coreelec_common.dtsi\nnew file mode 100644\nindex 000000000000..5e488953a9c0\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/coreelec_common.dtsi\n@@ -0,0 +1,264 @@\n+#include <dt-bindings/media/rc-map.h>\n+\n+/{\n+\tcoreelec;\n+\t/delete-property/ amlogic-dt-id;\n+\n+\tchosen { };\n+\n+\treserved-memory {\n+\t\tlinux,meson-fb {\n+\t\t\talloc-ranges = <0x77800000 0x800000>;\n+\t\t};\n+\t\tlinux,vdin0_cma {\n+\t\t\tstatus = \"disabled\";\n+\t\t};\n+\t\tlinux,vdin1_cma {\n+\t\t\tstatus = \"disabled\";\n+\t\t};\n+\t\tlinux,isp_cma {\n+\t\t\tstatus = \"disabled\";\n+\t\t};\n+\t\tlinux,adapt_cma {\n+\t\t\tstatus = \"disabled\";\n+\t\t};\n+\t};\n+\n+\tgpioleds {\n+\t\tstatus = \"okay\";\n+\t\t/delete-node/ net_red;\n+\t\t/delete-node/ net_green;\n+\t\t/delete-node/ remote_led;\n+\t\tsys_led {\n+\t\t\t/delete-property/ retain-state-suspended;\n+\t\t\t/delete-property/ default-state;\n+\t\t\tlinux,default-trigger=\"default-on\";\n+\t\t};\n+\t};\n+\n+\tcodec_mm {\n+\t\tclear-map;\n+\t};\n+\n+\tvcodec_dec {\n+\t\tstatus = \"disable\";\n+\t};\n+\n+\tgpio_keypad {\n+\t\treg = <0xFF800000 0x400>;\n+\t};\n+\n+\t/delete-node/ auge_sound;\n+\tauge_sound {\n+\t\tcompatible = \"amlogic, g12a-sound-card\";\n+\t\taml-audio-card,name = \"AML-AUGESOUND\";\n+\t\tavout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;\n+\n+\t\taml-audio-card,dai-link@0 {\n+\t\t\tmclk-fs = <128>;\n+\t\t\tcpu {\n+\t\t\t\tsystem-clock-frequency = <6144000>;\n+\t\t\t};\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&dummy_codec>;\n+\t\t\t};\n+\t\t};\n+\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tformat = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\t\t\tcpu {\n+\t\t\t\tdai-tdm-slot-tx-mask = <1 1>;\n+\t\t\t\tdai-tdm-slot-rx-mask = <1 1>;\n+\t\t\t\tdai-tdm-slot-num = <2>;\n+\t\t\t\tdai-tdm-slot-width = <32>;\n+\t\t\t\tsystem-clock-frequency = <12288000>;\n+\t\t\t};\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&amlogic_codec>;\n+\t\t\t};\n+\t\t};\n+\n+\t\taml-audio-card,dai-link@2 {\n+\t\t\tmclk-fs = <128>;\n+\t\t\tcpu {\n+\t\t\t\tsystem-clock-frequency = <6144000>;\n+\t\t\t};\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&dummy_codec>;\n+\t\t\t};\n+\t\t};\n+\n+\t\taml-audio-card,dai-link@3 {\n+\t\t\tformat = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\t\t\tbitclock-master = <&aml_i2s2hdmi>;\n+\t\t\tframe-master = <&aml_i2s2hdmi>;\n+\t\t\tcpu {\n+\t\t\t\tsound-dai = <&aml_i2s2hdmi>;\n+\t\t\t\tdai-tdm-slot-tx-mask = <1 1>;\n+\t\t\t\tdai-tdm-slot-rx-mask = <1 1>;\n+\t\t\t\tdai-tdm-slot-num = <2>;\n+\t\t\t\tdai-tdm-slot-width = <32>;\n+\t\t\t\tsystem-clock-frequency = <12288000>;\n+\t\t\t};\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&dummy_codec>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\taudiolocker: locker {\n+\t\tstatus = \"okay\";\n+\t};\n+\n+\t/delete-node/ partitions;\n+\t/delete-node/ firmware;\n+\n+\t/delete-node/ rc@0xff808040;\n+\t/delete-node/ custom_maps;\n+\tmeson-ir {\n+\t\tcompatible = \"amlogic,meson6-ir\";\n+\t\t/* Multi-format IR controller */\n+\t\treg = <0xff808040 0x44>;\n+\t\tinterrupts = <0 196 1>;\n+\t\tpinctrl-names = \"default\";\n+\t\tpinctrl-0 = <&remote_pins>;\n+\t\tpulse-inverted;\n+\t\twakeup_protocol = <NEC>; /* force default NEC by <dt-bindings/media/rc-map.h> */\n+\t\tstatus = \"okay\";\n+\t};\n+\tmeson-remote {\n+\t\tcompatible = \"amlogic, aml_remote\";\n+\t\tdev_name = \"meson-remote\";\n+\t\treg = <0xff808040 0x44>, /*Multi-format IR controller*/\n+\t\t\t  <0xff808000 0x20>; /*Legacy IR controller*/\n+\t\tstatus = \"okay\";\n+\t\tprotocol = <REMOTE_TYPE_NEC>;\n+\t\tled_blink = <1>;\n+\t\tled_blink_frq = <100>;\n+\t\tinterrupts = <0 196 1>;\n+\t\tpinctrl-names = \"default\";\n+\t\tpinctrl-0 = <&remote_pins>;\n+\t\tmax_frame_time = <200>; /*set software decoder max frame time*/\n+\t};\n+\n+\tamvideocap {\n+\t\tcompatible = \"amlogic, amvideocap\";\n+\t\tdev_name = \"amvideocap.0\";\n+\t\tstatus = \"okay\";\n+\t\tmax_size = <8>;//8M\n+\t};\n+\n+\topenvfd {\n+\t\tcompatible = \"open,vfd\";\n+\t\tdev_name = \"openvfd\";\n+\t\tstatus = \"okay\";\n+\t};\n+\n+\tdummy_venc: dummy_venc {\n+\t\tstatus = \"disabled\";\n+\t};\n+\n+\t/delete-node/ sensor;\n+\t/delete-node/ iq;\n+\t/delete-node/ demux;\n+\t/delete-node/ dvb;\n+\t/delete-node/ amvdec_656in;\n+\t/delete-node/ aml_cams;\n+\n+\t/delete-node/ lcd;\n+\t/delete-node/ lcd_extern;\n+\t/delete-node/ backlight;\n+\t/delete-node/ bl_pwm_conf;\n+\t/delete-node/ bl_extern;\n+};\n+\n+&meson_fb {\n+\tdisplay_size_default = <1920 1080 1920 2160 32>;\n+\tmem_size = <0x00800000 0x4b80000 0x100000 0x100000 0x800000>;\n+\tmem_alloc = <1>;\n+\t4k2k_fb = <1>;\n+};\n+\n+&i2c0 {\n+\tstatus = \"disabled\";\n+\t/delete-node/ gt9xx@5d;\n+\t/delete-node/ ftxx@38;\n+\t/delete-node/ touchscreen@5d;\n+\t/delete-node/ touchscreen@38;\n+};\n+\n+&i2c2 {\n+\tstatus = \"disabled\";\n+\t/delete-node/ sensor-i2c@6c;\n+};\n+\n+&i2c3 {\n+\t/delete-node/ ad82584f_62@62;\n+\t/delete-node/ tlv320adc3101_32@32;\n+\t/delete-node/ bl_extern_i2c;\n+\t/delete-node/ tas5707_36@36;\n+};\n+\n+&audiobus {\n+\taml_i2s2hdmi: i2s2hdmi {\n+\t\t#sound-dai-cells = <0>;\n+\t\tdai-tdm-lane-slot-mask-out = <1 1 1 1>;\n+\t\tdai-tdm-clk-sel = <2>;\n+\t\tclocks = <&clkaudio CLKID_AUDIO_MCLK_C\n+\t\t\t\t&clkc CLKID_MPLL2>;\n+\t\tclock-names = \"mclk\", \"clk_srcpll\";\n+\t\ti2s2hdmi = <1>;\n+\t\tstatus = \"okay\";\n+\t};\n+\n+\t/delete-node/ tdma;\n+\t/delete-node/ tdm@0;\n+\t/delete-node/ tdmc;\n+\t/delete-node/ tdm@2;\n+\t/delete-node/ tdm@3;\n+\t/delete-node/ pdm;\n+};\n+\n+&pinctrl_periphs {\n+\t/delete-node/ tdmout_a;\n+\t/delete-node/ tdmin_a;\n+\t/delete-node/ tdmc_mclk;\n+\t/delete-node/ tdmout_c;\n+\t/delete-node/ tdmin_c;\n+\t/delete-node/ spdifin;\n+\t/delete-node/ pdmin;\n+\t/delete-node/ bl_pwm_off_pin;\n+\t/delete-node/ clk12_24_z_pins;\n+\t/delete-node/ gen_clk_ee_z;\n+\t/delete-node/ cam_dvp_pins;\n+};\n+\n+&pinctrl_aobus {\n+\t/delete-node/ dvb_s_ts0_pins;\n+};\n+\n+&vdin0 {\n+\tstatus = \"disabled\";\n+};\n+\n+&vdin1 {\n+\tstatus = \"disabled\";\n+};\n+\n+/delete-node/ &nand;\n+\n+&pcie_A {\n+\tstatus = \"disabled\";\n+};\n+\n+&aocec {\n+\t/delete-property/ arc_port_mask;\n+};\n+\n+&sd_emmc_c {\n+\temmc {\n+\t\tcaps2 = \"MMC_CAP2_HS200\";\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/coreelec_g12_common.dtsi b/arch/arm/boot/dts/amlogic/coreelec_g12_common.dtsi\nnew file mode 100644\nindex 000000000000..133405c8e6c3\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/coreelec_g12_common.dtsi\n@@ -0,0 +1,48 @@\n+#include \"coreelec_common.dtsi\"\n+\n+/{\n+\tauge_sound {\n+\t\taml-audio-card,effect = <&audio_effect>;\n+\n+\t\taml-audio-card,dai-link@0 {\n+\t\t\tcontinuous-clock;\n+\t\t\tcpu {\n+\t\t\t\tsound-dai = <&aml_spdif_b>;\n+\t\t\t};\n+\t\t};\n+\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tbitclock-master = <&aml_tdmb>;\n+\t\t\tframe-master = <&aml_tdmb>;\n+\t\t\tcontinuous-clock;\n+\t\t\tcpu {\n+\t\t\t\tsound-dai = <&aml_tdmb>;\n+\t\t\t};\n+\t\t};\n+\n+\t\taml-audio-card,dai-link@2 {\n+\t\t\tcontinuous-clock;\n+\t\t\tcpu {\n+\t\t\t\tsound-dai = <&aml_spdif>;\n+\t\t\t};\n+\t\t};\n+\n+\t\taml-audio-card,dai-link@3 {\n+\t\t\tcontinuous-clock;\n+\t\t};\n+\t};\n+};\n+\n+&audiobus {\n+\taml_i2s2hdmi: i2s2hdmi {\n+\t\tcompatible = \"amlogic, g12a-snd-tdmc\";\n+\t};\n+\n+\taml_spdif: spdif {\n+\t\tpinctrl-0 = <&spdifout>;\n+\t};\n+\n+\taml_spdif_b: spdif_b {\n+\t\tstatus = \"okay\";\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/coreelec_g12b.dtsi b/arch/arm/boot/dts/amlogic/coreelec_g12b.dtsi\nnew file mode 100644\nindex 000000000000..af33b74fa693\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/coreelec_g12b.dtsi\n@@ -0,0 +1,64 @@\n+#include \"g12b_a311d_w400.dts\"\n+#include \"coreelec_g12_common.dtsi\"\n+\n+/{\n+\treserved-memory {\n+\t\tgalcore_reserved:linux,galcore {\n+\t\t\tsize = <0x1000000>;\n+\t\t\talignment = <0x400000>;\n+\t\t};\n+\t};\n+\n+\tcpu_opp_table0: cpu_opp_table0 {\n+\t\topp08 {\n+\t\t\topp-hz = /bits/ 64 <1800000000>;\n+\t\t\topp-microvolt = <1020000>;\n+\t\t};\n+\t};\n+\n+\tcpu_opp_table1: cpu_opp_table1 {\n+\t\topp08 {\n+\t\t\topp-hz = /bits/ 64 <1800000000>;\n+\t\t\topp-microvolt = <830000>;\n+\t\t};\n+\t\topp09 {\n+\t\t\topp-hz = /bits/ 64 <1908000000>;\n+\t\t\topp-microvolt = <860000>;\n+\t\t};\n+\t\topp10 {\n+\t\t\topp-hz = /bits/ 64 <2016000000>;\n+\t\t\topp-microvolt = <910000>;\n+\t\t};\n+\t\topp11 {\n+\t\t\topp-hz = /bits/ 64 <2100000000>;\n+\t\t\topp-microvolt = <960000>;\n+\t\t};\n+\t\topp12 {\n+\t\t\topp-hz = /bits/ 64 <2208000000>;\n+\t\t\topp-microvolt = <1030000>;\n+\t\t};\n+\t};\n+};\n+\n+&ethmac {\n+\tpinctrl-names = \"external_eth_pins\";\n+\tpinctrl-0 = <&external_eth_pins>;\n+\tinternal_phy = <0>;\n+\tauto_cali_idx = <0>;\n+\t/delete-property/ cali_val;\n+\t/delete-property/ mc_val;\n+};\n+\n+&pinctrl_periphs {\n+\ta_uart_pins:a_uart {\n+\t\tmux {\n+\t\t\tgroups = \"uart_tx_a\",\n+\t\t\t\t\"uart_rx_a\",\n+\t\t\t\t\"uart_cts_a\",\n+\t\t\t\t\"uart_rts_a\";\n+\t\t\tfunction = \"uart_a\";\n+\t\t};\n+\n+\t\t/delete-node/ mux1;\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/coreelec_g12b_a.dtsi b/arch/arm/boot/dts/amlogic/coreelec_g12b_a.dtsi\nnew file mode 100644\nindex 000000000000..838b40df7243\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/coreelec_g12b_a.dtsi\n@@ -0,0 +1,64 @@\n+#include \"g12b_a311d_w400_a.dts\"\n+#include \"coreelec_g12_common.dtsi\"\n+\n+/{\n+\treserved-memory {\n+\t\tdi_cma_reserved:linux,di_cma {\n+\t\t\tsize = <0x0>;\n+\t\t};\n+\n+\t\tcodec_mm_cma:linux,codec_mm_cma {\n+\t\t\tsize = <0x1b000000>;\n+\t\t};\n+\n+\t\tgalcore_reserved:linux,galcore {\n+\t\t\tsize = <0x1000000>;\n+\t\t\talignment = <0x400000>;\n+\t\t};\n+\t};\n+\n+\tcpu_opp_table0: cpu_opp_table0 {\n+\t\topp08 {\n+\t\t\topp-hz = /bits/ 64 <1800000000>;\n+\t\t\topp-microvolt = <981000>;\n+\t\t};\n+\t};\n+\n+\tmulti-di {\n+\t\tcompatible = \"amlogic, dim-g12b\";\n+\t\tstatus = \"okay\";\n+\t\t/* 0:use reserved; 1:use cma; 2:use cma as reserved */\n+\t\tflag_cma = <4>; //<1>\n+\t\t//memory-region = <&di_reserved>;\n+\t\tmemory-region = <&di_cma_reserved>;\n+\t\tinterrupts = <0 46 1\n+\t\t\t\t0 40 1>;\n+\t\tinterrupt-names = \"pre_irq\", \"post_irq\";\n+\t\tclocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,\n+\t\t\t<&clkc CLKID_VPU_CLKB_COMP>;\n+\t\tclock-names = \"vpu_clkb_tmp_composite\",\n+\t\t\t\"vpu_clkb_composite\";\n+\t\tclock-range = <334 667>;\n+\t\t/* buffer-size = <3621952>;(yuv422 8bit) */\n+\t\tbuffer-size = <4074560>;/*yuv422 fullpack*/\n+\t\t/* reserve-iomap = \"true\"; */\n+\t\t/* if enable nr10bit, set nr10bit-support to 1 */\n+\t\tpost-wr-support = <1>;\n+\t\tnr10bit-support = <1>;\n+\t\tnrds-enable = <1>;\n+\t\tpps-enable = <1>;\n+\t};\n+\n+\tdeinterlace {\n+\t\tstatus = \"disable\";\n+\t};\n+};\n+\n+&ethmac {\n+\tpinctrl-names = \"external_eth_pins\";\n+\tpinctrl-0 = <&external_eth_pins>;\n+\tinternal_phy = <0>;\n+\tauto_cali_idx = <0>;\n+\t/delete-property/ cali_val;\n+\t/delete-property/ mc_val;\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj.dts\nnew file mode 100644\nindex 000000000000..5186afc7baa7\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj.dts\n@@ -0,0 +1,119 @@\n+#include \"coreelec_g12b_a.dtsi\"\n+\n+/{\n+\tmodel = \"Minix U22-XJ\";\n+\tcoreelec-dt-id = \"g12b_s922x_minix_u22xj\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x0 0xf5000000>;\n+\t};\n+\n+\t/delete-node/ t9015;\n+\t/delete-node/ rtc;\n+\n+\tauge_sound {\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&rt5651>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\t/* Minix original gpio driver settings */\n+\tjw_io_init {\n+\t\tcompatible = \"amlogic, jw_io_control\";\n+\t\tdev_name = \"jw_io_control\";\n+\t\tstatus = \"okay\";\n+\t\thdmi_5v_gpio = <&gpio GPIOH_8 GPIO_ACTIVE_HIGH>;\n+\t\tusb_hub_reset = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;\n+\t\tethernet_reset = <&gpio GPIOZ_15 GPIO_ACTIVE_HIGH>;\n+\t\tethernet_int = <&gpio GPIOZ_14 GPIO_ACTIVE_HIGH>;\n+\t\totg_ctl_gpio = <&gpio GPIOC_7 GPIO_ACTIVE_HIGH>;\n+\t\tearphone_ctl_gpio = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;\n+\t};\n+\n+\tgpio-reset {\n+\t\tcompatible = \"linux,gpio-reset\";\n+\t\tusb_hub_reset {\n+\t\t\tgpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;\n+\t\t\tasserted-state = <0>;\n+\t\t\tduration-ms = <1000>;\n+\t\t};\n+\t};\n+};\n+\n+&pinctrl_periphs {\n+\texternal_eth_pins {\n+\t\tmux {\n+\t\t\tgroups = \"eth_mdio\",\n+\t\t\t\"eth_mdc\",\n+\t\t\t\"eth_rgmii_rx_clk\",\n+\t\t\t\"eth_rx_dv\",\n+\t\t\t\"eth_rxd0\",\n+\t\t\t\"eth_rxd1\",\n+\t\t\t\"eth_rxd2_rgmii\",\n+\t\t\t\"eth_rxd3_rgmii\",\n+\t\t\t\"eth_rgmii_tx_clk\",\n+\t\t\t\"eth_txen\",\n+\t\t\t\"eth_txd0\",\n+\t\t\t\"eth_txd1\",\n+\t\t\t\"eth_txd2_rgmii\",\n+\t\t\t\"eth_txd3_rgmii\";\n+\t\t};\n+\t};\n+};\n+\n+&i2c1 {\n+\tstatus = \"okay\";\n+\tpinctrl-names = \"default\";\n+\tpinctrl-0 = <&i2c1_master_pins3>;\n+\tclock-frequency = <100000>;\n+\n+\t/* Minix power control MCU */\n+\tjw_mcu: jw_mcu@15 {\n+\t\tcompatible = \"everest,jw_mcu\";\n+\t\treg = <0x15>;\n+\t\tmcu_watchdog_gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>;\n+\t\tstatus = \"okay\";\n+\t};\n+\n+\t/* Minix extra control MCU */\n+\tjw_mcu_isp: jw_mcu_isp@35 {\n+\t\tcompatible = \"everest,jw_mcu_isp\";\n+\t\treg = <0x35>;\n+\t\tstatus = \"okay\";\n+\t};\n+\n+\trtc_hym8563: rtc_hym8563@51 {\n+\t\tcompatible = \"haoyu,hym8563\";\n+\t\treg = <0x51>;\n+\t\tirq_gpio = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>;\n+\t};\n+};\n+\n+&i2c3 {\n+\trt5651: rt5651@1a {\n+\t\tcompatible = \"realtek,rt5651\";\n+\t\t#sound-dai-cells = <0>;\n+\t\treg = <0x1a>;\n+\t\tstatus = \"okay\";\n+\t\trealtek,dmic-en = \"false\";\n+\t\trealtek,in2-differential = \"false\";\n+\t};\n+};\n+\n+&sd_emmc_b {\n+\tsd {\n+\t\tvol_switch = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;\n+\t\tvol_switch_18 = <1>;\n+\t};\n+};\n+\n+&ethmac {\n+\tauto_cali_idx = <1>;\n+};\n+\n+&usb3_phy_v2 {\n+\tgpio-vbus-power = \"GPIOH_5\";\n+\tgpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max.dts\nnew file mode 100644\nindex 000000000000..43ceda52dafc\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max.dts\n@@ -0,0 +1,130 @@\n+#include \"coreelec_g12b.dtsi\"\n+\n+/{\n+\tmodel = \"Minix U22-XJ Max\";\n+\tcoreelec-dt-id = \"g12b_s922x_minix_u22xj_max\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x0 0xf5000000>;\n+\t};\n+\n+\t/delete-node/ t9015;\n+\t/delete-node/ rtc;\n+\n+\tauge_sound {\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&es8316>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\t/* Minix original gpio driver settings */\n+\tjw_io_init {\n+\t\tcompatible = \"amlogic, jw_io_control\";\n+\t\tdev_name = \"jw_io_control\";\n+\t\tstatus = \"okay\";\n+\t\thdmi_5v_gpio = <&gpio GPIOH_8 GPIO_ACTIVE_HIGH>;\n+\t\tusb_hub_reset = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;\n+\t\tethernet_reset = <&gpio GPIOZ_15 GPIO_ACTIVE_HIGH>;\n+\t\tethernet_int = <&gpio GPIOZ_14 GPIO_ACTIVE_HIGH>;\n+\t\totg_ctl_gpio = <&gpio GPIOC_7 GPIO_ACTIVE_HIGH>;\n+\t\tearphone_ctl_gpio = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;\n+\t};\n+\n+\tgpio-reset {\n+\t\tcompatible = \"linux,gpio-reset\";\n+\t\tusb_hub_reset {\n+\t\t\tgpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;\n+\t\t\tasserted-state = <0>;\n+\t\t\tduration-ms = <1000>;\n+\t\t};\n+\t};\n+};\n+\n+&pinctrl_periphs {\n+\texternal_eth_pins {\n+\t\tmux {\n+\t\t\tgroups = \"eth_mdio\",\n+\t\t\t\"eth_mdc\",\n+\t\t\t\"eth_rgmii_rx_clk\",\n+\t\t\t\"eth_rx_dv\",\n+\t\t\t\"eth_rxd0\",\n+\t\t\t\"eth_rxd1\",\n+\t\t\t\"eth_rxd2_rgmii\",\n+\t\t\t\"eth_rxd3_rgmii\",\n+\t\t\t\"eth_rgmii_tx_clk\",\n+\t\t\t\"eth_txen\",\n+\t\t\t\"eth_txd0\",\n+\t\t\t\"eth_txd1\",\n+\t\t\t\"eth_txd2_rgmii\",\n+\t\t\t\"eth_txd3_rgmii\";\n+\t\t};\n+\t};\n+};\n+\n+&i2c1 {\n+\tstatus = \"okay\";\n+\tpinctrl-names = \"default\";\n+\tpinctrl-0 = <&i2c1_master_pins3>;\n+\tclock-frequency = <100000>;\n+\n+\t/* Minix power control MCU */\n+\tjw_mcu: jw_mcu@15 {\n+\t\tcompatible = \"everest,jw_mcu\";\n+\t\treg = <0x15>;\n+\t\tmcu_watchdog_gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>;\n+\t\tstatus = \"okay\";\n+\t};\n+\n+\t/* Minix extra control MCU */\n+\tjw_mcu_isp: jw_mcu_isp@35 {\n+\t\tcompatible = \"everest,jw_mcu_isp\";\n+\t\treg = <0x35>;\n+\t\tstatus = \"okay\";\n+\t};\n+\n+\trtc_hym8563: rtc_hym8563@51 {\n+\t\tcompatible = \"haoyu,hym8563\";\n+\t\treg = <0x51>;\n+\t\tirq_gpio = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>;\n+\t};\n+};\n+\n+&i2c3 {\n+\tes8316: es8316@10 {\n+\t\tcompatible = \"everest,es8316\";\n+\t\t#sound-dai-cells = <0>;\n+\t\treg = <0x10>;\n+\t\tstatus = \"okay\";\n+\t};\n+};\n+\n+&sd_emmc_b {\n+\tsd {\n+\t\tjtag_pin = <&gpio GPIOC_0 GPIO_ACTIVE_HIGH>;\n+\t\tvol_switch = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;\n+\t\tvol_switch_18 = <1>;\n+\t};\n+};\n+\n+&pinctrl_periphs {\n+\ta_uart_pins:a_uart {\n+\t\tmux {\n+\t\t\tgroups = \"uart_tx_a\",\n+\t\t\t\t\"uart_rx_a\",\n+\t\t\t\t\"uart_cts_a\",\n+\t\t\t\t\"uart_rts_a\";\n+\t\t};\n+\t\t/delete-node/ mux1;\n+\t};\n+};\n+\n+&ethmac {\n+\tauto_cali_idx = <1>;\n+};\n+\n+&usb3_phy_v2 {\n+\tgpio-vbus-power = \"GPIOH_5\";\n+\tgpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max_rev_a.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max_rev_a.dts\nnew file mode 100644\nindex 000000000000..ead93fb7c127\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max_rev_a.dts\n@@ -0,0 +1,25 @@\n+#include \"g12b_s922x_minix_u22xj.dts\"\n+\n+/{\n+\tmodel = \"Minix U22-XJ Max\";\n+\tcoreelec-dt-id = \"g12b_s922x_minix_u22xj_max_rev_a\";\n+\n+\tauge_sound {\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&es8316>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&i2c3 {\n+\t/delete-node/ rt5651@1a;\n+\n+\tes8316: es8316@10 {\n+\t\tcompatible = \"everest,es8316\";\n+\t\t#sound-dai-cells = <0>;\n+\t\treg = <0x10>;\n+\t\tstatus = \"okay\";\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_2g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_2g.dts\nnew file mode 100644\nindex 000000000000..06a21adb3309\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_2g.dts\n@@ -0,0 +1,101 @@\n+#include \"coreelec_g12b.dtsi\"\n+\n+/{\n+\tmodel = \"UGOOS AM6\";\n+\tcoreelec-dt-id = \"g12b_s922x_ugoos_am6\";\n+\tamlogic-dt-id = \"g12b_AM6_b2g\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x000000 0x80000000>;\n+\t};\n+\n+\tauge_sound {\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&rt5651>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\tgpioleds {\n+\t\tgreen_led {\n+\t\t\tlabel = \"green_led\";\n+\t\t\tgpios = <&gpio GPIOC_7 GPIO_ACTIVE_HIGH>;\n+\t\t\tlinux,default-trigger = \"default-on\";\n+\t\t};\n+\t};\n+\n+\twifi{\n+\t\tpower_on_pin = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;\n+\t};\n+\n+\tgpio_keypad {\n+\t\tkey-gpios = <&gpio_ao  GPIOAO_6  GPIO_ACTIVE_HIGH>;\n+\t};\n+};\n+\n+&usb2_phy_v2 {\n+\tgpio-vbus-power = \"GPIOA_8\";\n+\tgpios = <&gpio GPIOA_8 GPIO_ACTIVE_HIGH>;\n+};\n+\n+&usb3_phy_v2 {\n+\totg = <1>;\n+\tdefault-host; // or default-otg, or nothing for auto\n+\tgpio-vbus-power = \"GPIOAO_7\";\n+\tgpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;\n+};\n+\n+&i2c3 {\n+\trt5651: rt5651@1a {\n+\t\tcompatible = \"realtek,rt5651\";\n+\t\t#sound-dai-cells = <0>;\n+\t\treg = <0x1a>;\n+\t\tstatus = \"okay\";\n+\t\trealtek,dmic-en = \"false\";\n+\t\trealtek,in2-differential = \"false\";\n+\t};\n+\n+\thym8563: hym8563@51 {\n+\t\tcompatible = \"haoyu,hym8563\";\n+\t\treg = <0x51>;\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tclock-output-names = \"xin32k\";\n+\t};\n+};\n+\n+&audiobus {\n+\taml_tdmc: tdmc {\n+\t\tpinctrl-0 = </*&tdmc_mclk &tdmout_c &tdmin_c*/>;\n+\t};\n+\n+\ttdm@3 {\n+\t\tstatus = \"disabled\";\n+\t};\n+}; /* end of audiobus */\n+\n+&pinctrl_aobus {\n+\t/delete-node/ spdifout;\n+\t/delete-node/ spdifout_a_mute;\n+};\n+\n+&pinctrl_periphs {\n+\t/delete-node/ tdmc_mclk;\n+\t/delete-node/ tdmout_c;\n+\t/delete-node/ tdmin_c;\n+\n+\tspdifout: spdifout {\n+\t\tmux { /* GPIOA_11 */\n+\t\t\tgroups = \"spdif_out_a11\";\n+\t\t\tfunction = \"spdif_out\";\n+\t\t};\n+\t};\n+\n+\tspdifout_a_mute: spdifout_a_mute {\n+\t\tmux { /* GPIOA_11 */\n+\t\t\tgroups = \"GPIOA_11\";\n+\t\t\tfunction = \"gpio_periphs\";\n+\t\t};\n+\t};\n+}; /* end of pinctrl_periphs */\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_4g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_4g.dts\nnew file mode 100644\nindex 000000000000..a0004d876792\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_4g.dts\n@@ -0,0 +1,9 @@\n+#include \"g12b_s922x_ugoos_am6_2g.dts\"\n+\n+/{\n+\tamlogic-dt-id = \"g12b_AM6_b4g\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x000000 0xF5000000>;\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_2g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_2g.dts\nnew file mode 100644\nindex 000000000000..5aa71fc3db78\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_2g.dts\n@@ -0,0 +1,101 @@\n+#include \"coreelec_g12b_a.dtsi\"\n+\n+/{\n+\tmodel = \"UGOOS AM6\";\n+\tcoreelec-dt-id = \"g12b_s922x_ugoos_am6_rev_a\";\n+\tamlogic-dt-id = \"g12b_AM6_a2g\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x000000 0x80000000>;\n+\t};\n+\n+\tauge_sound {\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&rt5651>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\tgpioleds {\n+\t\tgreen_led {\n+\t\t\tlabel = \"green_led\";\n+\t\t\tgpios = <&gpio GPIOC_7 GPIO_ACTIVE_HIGH>;\n+\t\t\tlinux,default-trigger = \"default-on\";\n+\t\t};\n+\t};\n+\n+\twifi{\n+\t\tpower_on_pin = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;\n+\t};\n+\n+\tgpio_keypad {\n+\t\tkey-gpios = <&gpio_ao  GPIOAO_6  GPIO_ACTIVE_HIGH>;\n+\t};\n+};\n+\n+&usb2_phy_v2 {\n+\tgpio-vbus-power = \"GPIOA_8\";\n+\tgpios = <&gpio GPIOA_8 GPIO_ACTIVE_HIGH>;\n+};\n+\n+&usb3_phy_v2 {\n+\totg = <1>;\n+\tdefault-host; // or default-otg, or nothing for auto\n+\tgpio-vbus-power = \"GPIOAO_7\";\n+\tgpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;\n+};\n+\n+&i2c3 {\n+\trt5651: rt5651@1a {\n+\t\tcompatible = \"realtek,rt5651\";\n+\t\t#sound-dai-cells = <0>;\n+\t\treg = <0x1a>;\n+\t\tstatus = \"okay\";\n+\t\trealtek,dmic-en = \"false\";\n+\t\trealtek,in2-differential = \"false\";\n+\t};\n+\n+\thym8563: hym8563@51 {\n+\t\tcompatible = \"haoyu,hym8563\";\n+\t\treg = <0x51>;\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tclock-output-names = \"xin32k\";\n+\t};\n+};\n+\n+&audiobus {\n+\taml_tdmc: tdmc {\n+\t\tpinctrl-0 = </*&tdmc_mclk &tdmout_c &tdmin_c*/>;\n+\t};\n+\n+\ttdm@3 {\n+\t\tstatus = \"disabled\";\n+\t};\n+}; /* end of audiobus */\n+\n+&pinctrl_aobus {\n+\t/delete-node/ spdifout;\n+\t/delete-node/ spdifout_a_mute;\n+};\n+\n+&pinctrl_periphs {\n+\t/delete-node/ tdmc_mclk;\n+\t/delete-node/ tdmout_c;\n+\t/delete-node/ tdmin_c;\n+\n+\tspdifout: spdifout {\n+\t\tmux { /* GPIOA_11 */\n+\t\t\tgroups = \"spdif_out_a11\";\n+\t\t\tfunction = \"spdif_out\";\n+\t\t};\n+\t};\n+\n+\tspdifout_a_mute: spdifout_a_mute {\n+\t\tmux { /* GPIOA_11 */\n+\t\t\tgroups = \"GPIOA_11\";\n+\t\t\tfunction = \"gpio_periphs\";\n+\t\t};\n+\t};\n+}; /* end of pinctrl_periphs */\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_4g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_4g.dts\nnew file mode 100644\nindex 000000000000..f1f1eacef83a\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_4g.dts\n@@ -0,0 +1,9 @@\n+#include \"g12b_s922x_ugoos_am6_rev_a_2g.dts\"\n+\n+/{\n+\tamlogic-dt-id = \"g12b_AM6_a4g\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x000000 0xF5000000>;\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_2g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_2g.dts\nnew file mode 100644\nindex 000000000000..a293658b53b3\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_2g.dts\n@@ -0,0 +1,29 @@\n+#include \"g12b_s922x_ugoos_am6_2g.dts\"\n+\n+/{\n+\tmodel = \"UGOOS AM6B\";\n+\tcoreelec-dt-id = \"g12b_s922x_ugoos_am6b\";\n+\tamlogic-dt-id = \"g12b_AM6b_b2g\";\n+\n+\tauge_sound {\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&es8388>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&i2c3 {\n+\t/delete-node/ rt5651@1a;\n+\n+\tes8388: es8388@10 {\n+\t\tstatus = \"okay\";\n+\t\tcompatible = \"everest,es8388\";\n+\t\t#sound-dai-cells = <0>;\n+\t\treg = <0x10>;\n+\t\tdef-vol = <0x1d>;\n+\t\tdef-dacvol = <0x0a>;\n+\t\taux-det-gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_4g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_4g.dts\nnew file mode 100644\nindex 000000000000..adb06b6cf89a\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_4g.dts\n@@ -0,0 +1,9 @@\n+#include \"g12b_s922x_ugoos_am6b_2g.dts\"\n+\n+/{\n+\tamlogic-dt-id = \"g12b_AM6b_b4g\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x000000 0xF5000000>;\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_2g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_2g.dts\nnew file mode 100644\nindex 000000000000..fe5937c28760\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_2g.dts\n@@ -0,0 +1,29 @@\n+#include \"g12b_s922x_ugoos_am6_rev_a_2g.dts\"\n+\n+/{\n+\tmodel = \"UGOOS AM6B\";\n+\tcoreelec-dt-id = \"g12b_s922x_ugoos_am6b_rev_a\";\n+\tamlogic-dt-id = \"g12b_AM6b_a2g\";\n+\n+\tauge_sound {\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&es8388>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&i2c3 {\n+\t/delete-node/ rt5651@1a;\n+\n+\tes8388: es8388@10 {\n+\t\tstatus = \"okay\";\n+\t\tcompatible = \"everest,es8388\";\n+\t\t#sound-dai-cells = <0>;\n+\t\treg = <0x10>;\n+\t\tdef-vol = <0x1d>;\n+\t\tdef-dacvol = <0x0a>;\n+\t\taux-det-gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_4g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_4g.dts\nnew file mode 100644\nindex 000000000000..44d09b2e89d4\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_4g.dts\n@@ -0,0 +1,9 @@\n+#include \"g12b_s922x_ugoos_am6b_rev_a_2g.dts\"\n+\n+/{\n+\tamlogic-dt-id = \"g12b_AM6b_a4g\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x000000 0xF5000000>;\n+\t};\n+};\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/0007-vfm-change-vfm-path-to-match-CE-for-DV.patch",
    "content": "From 4a39e55285b046b7858061626b2e085de96050d7 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Wed, 29 Mar 2023 16:40:49 +0200\nSubject: [PATCH 07/18] vfm: change vfm path to match CE for DV use\n FRAME_BASE_PATH_AMLVIDEO_AMVIDEO path\n\n---\n drivers/amlogic/media/common/vfm/vfm.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/amlogic/media/common/vfm/vfm.c b/drivers/amlogic/media/common/vfm/vfm.c\nindex 4c4e81143732..a4661005bdf1 100644\n--- a/drivers/amlogic/media/common/vfm/vfm.c\n+++ b/drivers/amlogic/media/common/vfm/vfm.c\n@@ -402,7 +402,7 @@ static void vfm_init(void)\n #ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION\n \tchar def_dvbl_id[VFM_NAME_LEN] = \"dvblpath\";\n /*\tchar def_dvbl_chain[] = \"dvbldec dvbl amvideo\";*/\n-\tchar def_dvbl_chain[] = \"dvbldec amvideo\";\n+\tchar def_dvbl_chain[] = \"dvbldec amlvideo ppmgr deinterlace amvideo\";\n \n \tchar def_dvel_id[VFM_NAME_LEN] = \"dvelpath\";\n \tchar def_dvel_chain[] = \"dveldec dvel\";\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/0008-auto-cs-do-not-force-vuy420-on-4k-50-60Hz-when-sourc.patch",
    "content": "From 2fc70ce7b25427b1208f8e2b045be4363df846ea Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 31 Mar 2023 09:30:05 +0200\nSubject: [PATCH 08/18] auto cs: do not force vuy420 on 4k/50/60Hz when source\n is Dolby Vision\n\n---\n .../vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c     | 27 ++++++++++++-------\n 1 file changed, 18 insertions(+), 9 deletions(-)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\nindex d97b4c2ab736..c1b843ccd08b 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n@@ -5502,19 +5502,28 @@ static enum vmode_e hdmitx_validate_vmode(char *mode, unsigned int frac)\n \n \t// force 4k50/60Hz to 420 unless manually set\n \tif (strstr(hdev->fmt_attr, \"rgb\") == NULL &&\n+\t    strstr(hdev->fmt_attr, \"420\") == NULL &&\n \t    strstr(hdev->fmt_attr, \"422\") == NULL &&\n \t    strstr(hdev->fmt_attr, \"444\") == NULL) {\n-\t\tswitch (hdmitx_edid_vic_tab_map_vic(mode)) {\n-\t\t\tcase HDMI_3840x2160p50_16x9:\n-\t\t\tcase HDMI_3840x2160p60_16x9:\n-\t\t\tcase HDMI_4096x2160p50_256x135:\n-\t\t\tcase HDMI_4096x2160p60_256x135:\n-\t\t\tcase HDMI_3840x2160p50_64x27:\n-\t\t\tcase HDMI_3840x2160p60_64x27:\n-\t\t\t\tif (!strstr(mode, \"420\"))\n-\t\t\t\t\tstrncat(mode, \"420\", 3);\n+\t\tswitch (hdev->hdmi_current_eotf_type) {\n+\t\t\tcase EOTF_T_DOLBYVISION:\n+\t\t\tcase EOTF_T_LL_MODE:\n+\t\t\tcase EOTF_T_DV_AHEAD:\n \t\t\t\tbreak;\n \t\t\tdefault:\n+\t\t\t\tswitch (hdmitx_edid_vic_tab_map_vic(mode)) {\n+\t\t\t\t\tcase HDMI_3840x2160p50_16x9:\n+\t\t\t\t\tcase HDMI_3840x2160p60_16x9:\n+\t\t\t\t\tcase HDMI_4096x2160p50_256x135:\n+\t\t\t\t\tcase HDMI_4096x2160p60_256x135:\n+\t\t\t\t\tcase HDMI_3840x2160p50_64x27:\n+\t\t\t\t\tcase HDMI_3840x2160p60_64x27:\n+\t\t\t\t\t\tif (!strstr(mode, \"420\"))\n+\t\t\t\t\t\t\tstrncat(mode, \"420\", 3);\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t\tdefault:\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t}\n \t\t\t\tbreak;\n \t\t}\n \t}\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/0009-dolby_vision-adjust-DV-policy.patch",
    "content": "From 01e054d1db36bc47bac9f45c1c770cac1e6412da Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Wed, 12 Apr 2023 15:38:53 +0200\nSubject: [PATCH 09/18] dolby_vision: adjust DV policy\n\n---\n .../amlogic/media/enhancement/amdolby_vision/amdolby_vision.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\nindex c59aa708b0c7..dc4d2bd2c2e9 100644\n--- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n+++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n@@ -123,7 +123,7 @@ MODULE_PARM_DESC(primary_debug, \"\\n primary_debug\\n\");\n /*\t\telse bypass Dolby Vision */\n /* #define DOLBY_VISION_FORCE_OUTPUT_MODE\t2 */\n \n-static unsigned int dolby_vision_policy = 1;\n+static unsigned int dolby_vision_policy = DOLBY_VISION_FOLLOW_SOURCE;\n module_param(dolby_vision_policy, uint, 0664);\n MODULE_PARM_DESC(dolby_vision_policy, \"\\n dolby_vision_policy\\n\");\n static unsigned int last_dolby_vision_policy;\n@@ -147,7 +147,7 @@ static unsigned int last_dolby_vision_policy;\n #define SDR_BY_DV_F_SINK 0x20\n #define SDR_BY_DV_F_SRC 0x40\n \n-static unsigned int dolby_vision_hdr10_policy;\n+static unsigned int dolby_vision_hdr10_policy = (HDR_BY_DV_F_SRC | HLG_BY_DV_F_SRC | SDR_BY_DV_F_SRC);\n module_param(dolby_vision_hdr10_policy, uint, 0664);\n MODULE_PARM_DESC(dolby_vision_hdr10_policy, \"\\n dolby_vision_hdr10_policy\\n\");\n static unsigned int last_dolby_vision_hdr10_policy;\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/0010-dolby_vision-provide-ATTR-ko_info.patch",
    "content": "From 917ccf3a49f38dd6db6de142972d6730d4b0d40e Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 4 Apr 2023 11:52:13 +0200\nSubject: [PATCH 10/18] dolby_vision: provide ATTR 'ko_info'\n\n---\n .../enhancement/amdolby_vision/amdolby_vision.c      | 12 ++++++++++++\n 1 file changed, 12 insertions(+)\n\ndiff --git a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\nindex dc4d2bd2c2e9..f19c9cf2b98a 100644\n--- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n+++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n@@ -12465,6 +12465,16 @@ static const struct file_operations amdolby_vision_fops = {\n \t.poll = amdolby_vision_poll,\n };\n \n+static ssize_t amdolby_vision_ko_info_show\n+\t\t(struct class *cla,\n+\t\t struct class_attribute *attr, char *buf)\n+{\n+\tif (ko_info)\n+\t\treturn sprintf(buf, \"%s\", ko_info);\n+\telse\n+\t\treturn 0;\n+}\n+\n static const char *amdolby_vision_debug_usage_str = {\n \t\"Usage:\\n\"\n \t\"echo dolby_crc 0/1 > /sys/class/amdolby_vision/debug; dolby_crc insert or clr\\n\"\n@@ -13230,6 +13240,8 @@ static ssize_t  amdolby_vision_crc_show(struct class *cla,\n }\n \n static struct class_attribute amdolby_vision_class_attrs[] = {\n+\t__ATTR(ko_info, 0444,\n+\tamdolby_vision_ko_info_show, NULL),\n \t__ATTR(debug, 0644,\n \tamdolby_vision_debug_show, amdolby_vision_debug_store),\n \t__ATTR(dv_mode, 0644,\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/0011-hdmitx-force-correct-colour-sampling-on-Dolby-Vision.patch",
    "content": "From ffabebaefea3f14771aba270cd0fcd7ff0cd475a Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 14 Apr 2023 08:39:30 +0200\nSubject: [PATCH 11/18] hdmitx: force correct colour sampling on Dolby Vision\n 'fmt_attr' is not set in auto mode. It does require to force correct colour\n sampling and colour depth with Dolby Vision, supported by the used display.\n\n---\n .../vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c     | 143 ++++++++++++++----\n 1 file changed, 113 insertions(+), 30 deletions(-)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\nindex c1b843ccd08b..b8a18129638f 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n@@ -609,6 +609,7 @@ static int set_disp_mode_auto(void)\n \tunsigned char mode[32];\n \tenum hdmi_vic vic = HDMI_Unknown;\n \tint colour_depths[] = { 8, 10, 12, 16 };\n+\tchar* colour_sampling[] = {\"RGB\",\"YUV422\",\"YUV444\",\"YUV420\"};\n \n \tmemset(mode, 0, sizeof(mode));\n \thdev->ready = 0;\n@@ -674,46 +675,128 @@ static int set_disp_mode_auto(void)\n \thdev->para = para;\n \tvic = hdmitx_edid_get_VIC(hdev, mode, 1);\n \n-\tif (strstr(hdev->fmt_attr,\"bit\") != NULL) {\n-\t\tpr_info(\"hdmitx: display colourdepth forced by attr to %d bits (VIC: %d)\\n\", colour_depths[para->cd - COLORDEPTH_24B], vic);\n-\t} else {\n-\t\t// parse and set maximum colourdepth given by edid\n-\t\tif (hdev->rxcap.ColorDeepSupport & 0x78 && hdev->para->cs != COLORSPACE_YUV420) {\n-\t\t\tenum hdmi_color_depth cd;\n-\t\t\tfor (cd = COLORDEPTH_36B; cd >= COLORDEPTH_24B; cd--) {\n-\t\t\t\tif (hdev->rxcap.ColorDeepSupport & (1 << (cd - 1))) {\n-\t\t\t\t\tpara->cd = cd;\n-\t\t\t\t\tbreak;\n+\t// auto detect colour sampling\n+\tif (strstr(hdev->fmt_attr, \"rgb\") == NULL &&\n+\t    strstr(hdev->fmt_attr, \"420\") == NULL &&\n+\t    strstr(hdev->fmt_attr, \"422\") == NULL &&\n+\t    strstr(hdev->fmt_attr, \"444\") == NULL) {\n+\t\t// force colour subsampling when DV mode\n+\t\tswitch (hdev->hdmi_current_eotf_type) {\n+\t\t\tcase EOTF_T_DOLBYVISION:\n+\t\t\tcase EOTF_T_LL_MODE:\n+\t\t\tcase EOTF_T_DV_AHEAD:\n+\t\t\t\t{\n+\t\t\t\t\tint cs = para->cs;\n+\t\t\t\t\tswitch (hdev->hdmi_current_tunnel_mode) {\n+\t\t\t\t\t\tcase RGB_8BIT:\n+\t\t\t\t\t\tcase RGB_10_12BIT:\n+\t\t\t\t\t\t\tpara->cs = COLORSPACE_RGB444;\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\tcase YUV422_BIT12:\n+\t\t\t\t\t\t\tpara->cs = COLORSPACE_YUV422;\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\tcase YUV444_10_12BIT:\n+\t\t\t\t\t\t\tpara->cs = COLORSPACE_YUV444;\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\tdefault:\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t}\n+\t\t\t\t\tif (cs != para->cs)\n+\t\t\t\t\t\tpr_info(\"hdmitx: display colour subsampling is forced to %s by Dolby Vision tunneling\\n\",\n+\t\t\t\t\t\t\tcolour_sampling[para->cs]);\n \t\t\t\t}\n-\t\t\t}\n-\t\t} else if (hdev->rxcap.hf_ieeeoui == HF_IEEEOUI) {\n-\t\t\tif (hdev->rxcap.dc_36bit_420)\n-\t\t\t\tpara->cd = COLORDEPTH_36B;\n-\t\t\telse if (hdev->rxcap.dc_30bit_420)\n-\t\t\t\tpara->cd = COLORDEPTH_30B;\n-\t\t\telse\n-\t\t\t\tpara->cd = COLORDEPTH_24B;\n+\t\t\t\tbreak;\n+\t\t\tdefault:\n+\t\t\t\tbreak;\n \t\t}\n+\t\tpr_info(\"hdmitx: display colour subsampling is auto set to %s (VIC: %d)\\n\",\n+\t\t\tcolour_sampling[para->cs], vic);\n+\t}\n \n+\t// auto detect colourdepth\n+\tif (strstr(hdev->fmt_attr,\"bit\") != NULL) {\n+\t\tpr_info(\"hdmitx: display colourdepth is forced by attr to %d bits (VIC: %d)\\n\",\n+\t\t\tcolour_depths[para->cd - COLORDEPTH_24B], vic);\n+\t} else {\n+\t\t// parse and set maximum colourdepth given by edid\n \t\t// check for colour subsampling limit\n-\t\tswitch (vic & 0xff) {\n-\t\t\tcase HDMI_3840x2160p50_16x9:\n-\t\t\tcase HDMI_3840x2160p60_16x9:\n-\t\t\tcase HDMI_4096x2160p50_256x135:\n-\t\t\tcase HDMI_4096x2160p60_256x135:\n-\t\t\tcase HDMI_3840x2160p50_64x27:\n-\t\t\tcase HDMI_3840x2160p60_64x27:\n-\t\t\t\tif (para->cs == COLORSPACE_RGB444 || para->cs == COLORSPACE_YUV444)\n+\t\tswitch (hdev->hdmi_current_eotf_type) {\n+\t\t\tcase EOTF_T_DOLBYVISION:\n+\t\t\tcase EOTF_T_LL_MODE:\n+\t\t\tcase EOTF_T_DV_AHEAD:\n \t\t\t\t{\n-\t\t\t\t\tpara->cd = COLORDEPTH_24B;\n-\t\t\t\t\tpr_info(\"hdmitx: forced colourdepth to %d bits because of current video information code\\n\", colour_depths[para->cd - COLORDEPTH_24B]);\n+\t\t\t\t\tconst struct dv_info *dv_info = &hdev->rxcap.dv_info;\n+\t\t\t\t\tint cd = para->cd;\n+\t\t\t\t\tswitch (hdev->hdmi_current_tunnel_mode) {\n+\t\t\t\t\t\tcase RGB_8BIT:\n+\t\t\t\t\t\t\t\tpara->cd = COLORDEPTH_24B;\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\tcase RGB_10_12BIT:\n+\t\t\t\t\t\tcase YUV444_10_12BIT:\n+\t\t\t\t\t\t\tif (dv_info->ver == 2) {\n+\t\t\t\t\t\t\t\tswitch (dv_info->sup_10b_12b_444) {\n+\t\t\t\t\t\t\t\t\tcase 1:\n+\t\t\t\t\t\t\t\t\t\tpara->cd = COLORDEPTH_30B;\n+\t\t\t\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\t\t\t\tcase 2:\n+\t\t\t\t\t\t\t\t\t\tpara->cd = COLORDEPTH_36B;\n+\t\t\t\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\t\t\t\tdefault:\n+\t\t\t\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\tcase YUV422_BIT12:\n+\t\t\t\t\t\t\tpara->cd = COLORDEPTH_36B;\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\tdefault:\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t}\n+\n+\t\t\t\t\tif (cd != para->cd)\n+\t\t\t\t\t\tpr_info(\"hdmitx: display colourdepth is forced to %d bits because of Dolby Vision sink capability\\n\",\n+\t\t\t\t\t\t\tcolour_depths[para->cd - COLORDEPTH_24B]);\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tdefault:\n+\t\t\t\tif (hdev->rxcap.ColorDeepSupport & 0x78 && hdev->para->cs != COLORSPACE_YUV420) {\n+\t\t\t\t\tenum hdmi_color_depth cd;\n+\t\t\t\t\tfor (cd = COLORDEPTH_36B; cd >= COLORDEPTH_24B; cd--) {\n+\t\t\t\t\t\tif (hdev->rxcap.ColorDeepSupport & (1 << (cd - 1))) {\n+\t\t\t\t\t\t\tpara->cd = cd;\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\t}\n+\t\t\t\t\t}\n+\t\t\t\t} else if (hdev->rxcap.hf_ieeeoui == HF_IEEEOUI) {\n+\t\t\t\t\tif (hdev->rxcap.dc_36bit_420)\n+\t\t\t\t\t\tpara->cd = COLORDEPTH_36B;\n+\t\t\t\t\telse if (hdev->rxcap.dc_30bit_420)\n+\t\t\t\t\t\tpara->cd = COLORDEPTH_30B;\n+\t\t\t\t\telse\n+\t\t\t\t\t\tpara->cd = COLORDEPTH_24B;\n+\t\t\t\t}\n+\n+\t\t\t\tswitch (vic & 0xff) {\n+\t\t\t\t\tcase HDMI_3840x2160p50_16x9:\n+\t\t\t\t\tcase HDMI_3840x2160p60_16x9:\n+\t\t\t\t\tcase HDMI_4096x2160p50_256x135:\n+\t\t\t\t\tcase HDMI_4096x2160p60_256x135:\n+\t\t\t\t\tcase HDMI_3840x2160p50_64x27:\n+\t\t\t\t\tcase HDMI_3840x2160p60_64x27:\n+\t\t\t\t\t\tif (para->cs == COLORSPACE_RGB444 || para->cs == COLORSPACE_YUV444)\n+\t\t\t\t\t\t{\n+\t\t\t\t\t\t\tpara->cd = COLORDEPTH_24B;\n+\t\t\t\t\t\t\tpr_info(\"hdmitx: display colourdepth is forced to %d bits because of current video information code\\n\",\n+\t\t\t\t\t\t\t\tcolour_depths[para->cd - COLORDEPTH_24B]);\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t\tdefault:\n+\t\t\t\t\t\tbreak;\n \t\t\t\tbreak;\n+\t\t\t}\n \t\t}\n-\n-\t\tpr_info(\"hdmitx: display colourdepth is auto set to %d bits (VIC: %d)\\n\", colour_depths[para->cd - COLORDEPTH_24B], vic);\n+\t\tpr_info(\"hdmitx: display colourdepth is auto set to %d bits (VIC: %d)\\n\",\n+\t\t\tcolour_depths[para->cd - COLORDEPTH_24B], vic);\n \t}\n \n \tif (strncmp(info->name, \"2160p30hz\", strlen(\"2160p30hz\")) == 0) {\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/0012-hdmitx-fix-display-of-current-hdmi-config-with-colou.patch",
    "content": "From 9a8e71e3e66503f1cc8d3143afe1a8db7a3b0fcc Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 14 Apr 2023 09:54:08 +0200\nSubject: [PATCH 12/18] hdmitx: fix display of current hdmi config with colour\n space 422\n\n---\n drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\nindex b8a18129638f..f7d5612727da 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n@@ -2580,7 +2580,7 @@ static ssize_t show_config(struct device *dev,\n \t\tpara = hdev->para;\n \n \t\t// YUV422\n-\t\tif (cs == 1)\n+\t\tif (cs == COLORSPACE_YUV422)\n \t\t\tcd = (~cd & 0x3);\n \n \t\tpos += snprintf(buf+pos, PAGE_SIZE, \"VIC: %d %s\\n\",\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/0013-hdmitx-force-YUV444-on-Dolby-Vision-RGB-on-modes-wit.patch",
    "content": "From 40c1254a2601d4e39656285f5180429e6bb4572a Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 18 Apr 2023 21:56:59 +0200\nSubject: [PATCH 13/18] hdmitx: force YUV444 on Dolby Vision RGB on modes witch\n Otherwise the TV remain black. Reason need to be identified.\n\n---\n drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\nindex f7d5612727da..a0e1b9050182 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n@@ -690,7 +690,7 @@ static int set_disp_mode_auto(void)\n \t\t\t\t\tswitch (hdev->hdmi_current_tunnel_mode) {\n \t\t\t\t\t\tcase RGB_8BIT:\n \t\t\t\t\t\tcase RGB_10_12BIT:\n-\t\t\t\t\t\t\tpara->cs = COLORSPACE_RGB444;\n+\t\t\t\t\t\t\tpara->cs = COLORSPACE_YUV444;\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\tcase YUV422_BIT12:\n \t\t\t\t\t\t\tpara->cs = COLORSPACE_YUV422;\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/0014-hdmitx-provide-colour-subsampling-and-colour-depth-b.patch",
    "content": "From 425141ac7e62cd3c45c1b4a98e22f8d963324b8b Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 20 Apr 2023 20:46:18 +0200\nSubject: [PATCH 14/18] hdmitx: provide colour subsampling and colour depth by\n sysfs These are used by Kodi to be able to detect if a forced mode switch is\n needed.\n\n---\n .../vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c     | 35 +++++++++++++++++++\n 1 file changed, 35 insertions(+)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\nindex a0e1b9050182..9792c4fa3632 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n@@ -909,6 +909,35 @@ ssize_t store_attr(struct device *dev,\n }\n /*aud_mode attr*/\n \n+static ssize_t cs_show(struct device *dev,\n+\t\t\t struct device_attribute *attr, char *buf)\n+{\n+\tint pos = 0;\n+\tint cs = hdmitx_rd_reg(HDMITX_DWC_FC_AVICONF0) & 0x3;\n+\n+\tpos +=\n+\tsnprintf(buf + pos, PAGE_SIZE, \"%d\\n\", cs);\n+\n+\treturn pos;\n+}\n+\n+static ssize_t cd_show(struct device *dev,\n+\t\t\t struct device_attribute *attr, char *buf)\n+{\n+\tint pos = 0;\n+\tint cs = hdmitx_rd_reg(HDMITX_DWC_FC_AVICONF0) & 0x3;\n+\tint cd = (hdmitx_rd_reg(HDMITX_DWC_TX_INVID0) & 0x6) >> 1;\n+\n+\t// YUV422\n+\tif (cs == COLORSPACE_YUV422)\n+\t\tcd = (~cd & 0x3);\n+\n+\tpos +=\n+\tsnprintf(buf + pos, PAGE_SIZE, \"%d\\n\", cd);\n+\n+\treturn pos;\n+}\n+\n void setup_attr(const char *buf)\n {\n \tchar attr[16] = {0};\n@@ -5470,6 +5499,8 @@ static ssize_t show_hdmi_hsty_config(struct device *dev,\n \n static DEVICE_ATTR(disp_mode, 0664, show_disp_mode, store_disp_mode);\n static DEVICE_ATTR(attr, 0664, show_attr, store_attr);\n+static DEVICE_ATTR(cs, 0444, cs_show, NULL);\n+static DEVICE_ATTR(cd, 0444, cd_show, NULL);\n static DEVICE_ATTR(aud_mode, 0644, show_aud_mode, store_aud_mode);\n static DEVICE_ATTR(vid_mute, 0644, show_vid_mute, store_vid_mute);\n static DEVICE_ATTR(edid, 0644, show_edid, store_edid);\n@@ -6938,6 +6969,8 @@ static int amhdmitx_probe(struct platform_device *pdev)\n \thdmitx_device.hdtx_dev = dev;\n \tret = device_create_file(dev, &dev_attr_disp_mode);\n \tret = device_create_file(dev, &dev_attr_attr);\n+\tret = device_create_file(dev, &dev_attr_cs);\n+\tret = device_create_file(dev, &dev_attr_cd);\n \tret = device_create_file(dev, &dev_attr_aud_mode);\n \tret = device_create_file(dev, &dev_attr_vid_mute);\n \tret = device_create_file(dev, &dev_attr_edid);\n@@ -7077,6 +7110,8 @@ static int amhdmitx_remove(struct platform_device *pdev)\n \t/* Remove the cdev */\n \tdevice_remove_file(dev, &dev_attr_disp_mode);\n \tdevice_remove_file(dev, &dev_attr_attr);\n+\tdevice_remove_file(dev, &dev_attr_cs);\n+\tdevice_remove_file(dev, &dev_attr_cd);\n \tdevice_remove_file(dev, &dev_attr_aud_mode);\n \tdevice_remove_file(dev, &dev_attr_vid_mute);\n \tdevice_remove_file(dev, &dev_attr_edid);\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/0015-dolby_vision-provide-Dolby-Vision-video-on-by-sysfs.patch",
    "content": "From 5adfd80ef1d3558af19f926868da714356cee6d6 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 21 Apr 2023 10:37:39 +0200\nSubject: [PATCH 15/18] dolby_vision: provide Dolby Vision video on by sysfs\n\n---\n .../enhancement/amdolby_vision/amdolby_vision.c    | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)\n\ndiff --git a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\nindex f19c9cf2b98a..c0669107392b 100644\n--- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n+++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n@@ -13239,6 +13239,18 @@ static ssize_t  amdolby_vision_crc_show(struct class *cla,\n \treturn sprintf(buf, \"%s\\n\", cur_crc);\n }\n \n+static ssize_t dv_video_on_show\n+\t\t(struct class *cla,\n+\t\t struct class_attribute *attr,\n+\t\t char *buf)\n+{\n+\tssize_t len = 0;\n+\n+\tlen += sprintf(buf + len, \"%d\\n\",\n+\t\t\t\t   is_dolby_vision_video_on());\n+\treturn len;\n+}\n+\n static struct class_attribute amdolby_vision_class_attrs[] = {\n \t__ATTR(ko_info, 0444,\n \tamdolby_vision_ko_info_show, NULL),\n@@ -13286,6 +13298,8 @@ static struct class_attribute amdolby_vision_class_attrs[] = {\n \t__ATTR(use_target_lum_from_cfg, 0644,\n \t       amdolby_vision_use_cfg_target_lum_show,\n \t       amdolby_vision_use_cfg_target_lum_store),\n+\t__ATTR(dv_video_on, 0444,\n+\t       dv_video_on_show, NULL),\n \t__ATTR_NULL\n };\n \n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/0016-hdmitx-add-dolby-vision-support-for-display-current-.patch",
    "content": "From 7f07487547b2e4aa69b09bb0d36849cf2a954b31 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 19 May 2023 10:58:52 +0200\nSubject: [PATCH 16/18] hdmitx: add dolby vision support for display current\n hdmi config\n\n---\n .../media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c    | 14 ++++++++++++--\n 1 file changed, 12 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\nindex 9792c4fa3632..675564ef3005 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n@@ -2590,7 +2590,10 @@ static ssize_t show_config(struct device *dev,\n \tstruct hdmitx_dev *hdev = &hdmitx_device;\n \tint colour_depths[] = { 8, 10, 12, 16 };\n \tchar* pix_fmt[] = {\"RGB\",\"YUV422\",\"YUV444\",\"YUV420\"};\n-\tchar* eotf[] = {\"SDR\",\"HDR\",\"HDR10\",\"HLG\"};\n+\tchar* eotf_hdr[] = {\"unknown\", \"HDR10\",\"HLG\",\"HDR\",\"SDR\"};\n+\tchar* eotf_DV[] = {\"unknown\", \"DV-Std\",\"DV-LL\"};\n+\tchar* eotf_hdr10p[] = {\"unknown\", \"HDR10+\"};\n+\tchar* eotf = eotf_hdr[4];\n \tchar* range[] = {\"default\",\"limited\",\"full\"};\n \tchar* colourimetry[] = {\"default\", \"BT.601\", \"BT.709\", \"xvYCC601\",\"xvYCC709\",\n \t\"sYCC601\",\"Adobe_YCC601\",\"Adobe_RGB\",\"BT.2020c\",\"BT.2020nc\",\"P3 D65\",\"P3 DCI\"};\n@@ -2612,13 +2615,20 @@ static ssize_t show_config(struct device *dev,\n \t\tif (cs == COLORSPACE_YUV422)\n \t\t\tcd = (~cd & 0x3);\n \n+\t\tif (hdmitx_hdr10p_en())\n+\t\t\teotf = eotf_hdr10p[hdmitx_get_cur_hdr10p_st() & ~HDMI_HDR10P_TYPE];\n+\t\telse if (hdmitx_dv_en())\n+\t\t\teotf = eotf_DV[hdmitx_get_cur_dv_st() & ~HDMI_DV_TYPE];\n+\t\telse if (hdmitx_hdr_en())\n+\t\t\teotf = eotf_hdr[hdmitx_get_cur_hdr_st() & ~HDMI_HDR_TYPE];\n+\n \t\tpos += snprintf(buf+pos, PAGE_SIZE, \"VIC: %d %s\\n\",\n \t\t\t\thdmitx_device.cur_VIC, para->name);\n \t\tpos += snprintf(buf + pos, PAGE_SIZE, \"Colour depth: %d-bit\\nColourspace: %s\\nColour range: %s\\nEOTF: %s\\nYCC colour range: %s\\n\",\n \t\t\t\tcolour_depths[cd],\n \t\t\t\tpix_fmt[cs],\n \t\t\t\trange[(hdmitx_rd_reg(HDMITX_DWC_FC_AVICONF2) & 0xc) >> 2],\n-\t\t\t\teotf[(hdmitx_rd_reg(HDMITX_DWC_FC_DRM_PB00) & 7)],\n+\t\t\t\teotf,\n \t\t\t\trange[((hdmitx_rd_reg(HDMITX_DWC_FC_AVICONF3) & 0xc) >> 2) + 1]);\n         if (((hdmitx_rd_reg(HDMITX_DWC_FC_AVICONF1) & 0xc0) >> 6) < 0x3)\n \t\t\tpos += snprintf(buf + pos, PAGE_SIZE, \"Colourimetry: %s\\n\",\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/0018-dolby_vision-add-is_mel-sysfs.patch",
    "content": "From 8a5d9b387b7f53aced94170779d77d1575f0d95c Mon Sep 17 00:00:00 2001\nFrom: Arthur Liberman <arthur_liberman@hotmail.com>\nDate: Wed, 27 Dec 2023 19:32:42 +0200\nSubject: [PATCH 18/18] dolby_vision: add `is_mel` sysfs Set to `true` when\n DoVi Profile 7 Minimum Enhancement Layer (MEL) content is detected This\n signals the application that it needs to switch to\n `dec_mode=STREAM_TYPE_FRAME`\n\n---\n .../media/enhancement/amdolby_vision/amdolby_vision.c       | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\nindex c0669107392b..6b20fbe687f7 100644\n--- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n+++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n@@ -1392,6 +1392,9 @@ static int force_disable_dv_backlight;\n static bool dv_control_backlight_status;\n static bool bypass_all_vpp_pq;\n static int use_target_lum_from_cfg;\n+static bool is_mel = false;\n+module_param(is_mel, bool, 0444);\n+MODULE_PARM_DESC(is_mel, \"\\n is_mel\\n\");\n \n /*0: not debug mode; 1:force bypass vpp pq; 2:force enable vpp pq*/\n /*3: force do nothing*/\n@@ -8229,7 +8232,7 @@ int dolby_vision_parse_metadata(struct vframe_s *vf,\n \t\t\t\tpr_dolby_dbg(\"bypass mel\\n\");\n \t\t\t}\n \t\t\tif (ret_flags == 1)\n-\t\t\t\tmel_flag = true;\n+\t\t\t\tmel_flag = is_mel = true;\n \t\t\tif (!is_dv_standard_es(req.dv_enhance_exist,\n \t\t\t\t\t       ret_flags, w)) {\n \t\t\t\tsrc_format = FORMAT_SDR;\n@@ -12587,6 +12590,7 @@ static ssize_t amdolby_vision_debug_store\n \t\tif (kstrtoul(parm[1], 10, &val) < 0)\n \t\t\treturn -EINVAL;\n \t\tenable_fel = val;\n+\t\tis_mel = false;\n \t\tpr_info(\"enable_fel %d\\n\", enable_fel);\n \t} else if (!strcmp(parm[0], \"ko_info\")) {\n \t\tif (ko_info)\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/linux-010-usbhid-quirks.patch",
    "content": "diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c\nindex e6cfd32..7aa0ff0 100644\n--- a/drivers/hid/usbhid/hid-quirks.c\n+++ b/drivers/hid/usbhid/hid-quirks.c\n@@ -163,6 +163,53 @@ static const struct hid_blacklist {\n \t{ USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_2NES2SNES, HID_QUIRK_MULTI_INPUT },\n \t{ USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_4NES4SNES, HID_QUIRK_MULTI_INPUT },\n \n+// Juyao\n+\t{ 0x0314,0x0326,0x040 },\n+\t{ 0x0314,0x0328,0x040 },\n+\n+// 4NES4SNES\n+\t{ 0x1781,0x0A9D,0x040 },\n+\n+// Retrolink SNES\n+\t{ 0x1292,0x5346,0x040 },\n+\t{ 0x1292,0x5366,0x040 },\n+\n+// Retrobit Atari to USB Driver\n+\t{ 0x1292,0x4154,0x040 },\n+\n+// Retrobit Genesis to PC USB Adapter\n+\t{ 0x1292,0x4745,0x040 },\n+\n+// Retrode\n+\t{ 0x0403,0x97c1,0x040 },\n+\n+// HuiJia  USB GamePad Mayflash Sega Saturn\n+\t{ 0x0e8f,0x3010,0x040 },\n+\n+// HuiJia  USB GamePad Mayflash NES SNES\n+\t{ 0x0079,0x1804,0x040 },\n+\n+// Mayflash Dreamcast\n+\t{ 0x0e8f,0x3013,0x040 },\n+\n+// Xin-Mo 2players 20pins\n+\t{ 0x16c0,0x75e1,0x040 },\n+\n+// Xinmo 18 pins USB THT 2P arcade controller THT 2P arcade controller\n+\t{ 0x16c0,0x05e1,0x040 },\n+\n+// USB PS2 Adapter GreenAsia Electronics\n+\t{ 0xe8f,0x1013,0x040 },\n+\n+// HuiJia  USB GamePad Mayflash N64 - need test\n+\t{ 0xe8f,0x3013,0x040 },\n+\n+// XCSOURCE 2 Encoder USB - Twin USB Gamepad\n+\t{ 0x810,0xe001,0x040 },\n+\n+// 3H Dual Arcade 2Players\n+\t{ 0x16c0,0x05e0,0x040 },\n+\n \t{ 0, 0 }\n };\n \n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/linux-02-fix_bluetooth_reconnect.patch",
    "content": "From 0996abc14470622eece29b66913b082a2eebe5f2 Mon Sep 17 00:00:00 2001\nFrom: Florian Dollinger <dollinger.florian@gmx.de>\nDate: Sun, 7 Jan 2018 23:55:52 +0100\nSubject: [PATCH] The current L2CAP implementation does not change any options if the\n other side respons with \"unknown options\", but does if \"unaccepted options\" is the answer.\n It is up to the implementation to decide on the  effort spent on config negotiations,\n therefore the current implementation is  correct at this point - but many devices\n (like Xbox One S controllers) are not useable this way.\n A workaround for many users therefore is to disable_ertm, since this is often the option\n which is unknown. I would prefer to try it again with altered options instead of globally\n disable ERTM.\n \n In result, I suggest the following patch. It simply adds a new case (L2CAP_CONF_UNKNOWN),\n which does nothing but falling through to L2CAP_CONF_UNACCEPT.\n\nSigned-off-by: Florian Dollinger <dollinger.florian@gmx.de>\n---\n net/bluetooth/l2cap_core.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c\nindex 43ba91c44..388d53bfd 100644\n--- a/net/bluetooth/l2cap_core.c\n+++ b/net/bluetooth/l2cap_core.c\n@@ -4208,6 +4208,7 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn,\n \t\t}\n \t\tgoto done;\n \n+\tcase L2CAP_CONF_UNKNOWN:\n \tcase L2CAP_CONF_UNACCEPT:\n \t\tif (chan->num_conf_rsp <= L2CAP_CONF_MAX_CONF_RSP) {\n \t\t\tchar req[64];\n-- \n2.15.1\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/linux-03-stop-hid-generic-from-grabing-xbone.patch",
    "content": "From 090b784913a5ff0a823510553f97c0d7b1115f57 Mon Sep 17 00:00:00 2001\nFrom: cdu13a <cdu13a@gmail.com>\nDate: Sat, 23 Nov 2019 14:08:13 -0500\nSubject: hid: stop hid-generic from being greedy with the xbox one controller\n\n---\n drivers/hid/hid-core.c | 2 ++\n drivers/hid/hid-ids.h  | 2 ++\n 2 files changed, 4 insertions(+)\n\ndiff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c\nindex f5e17e8ce9ba..188c25a30870 100644\n--- a/drivers/hid/hid-core.c\n+++ b/drivers/hid/hid-core.c\n@@ -2004,6 +2004,8 @@ static const struct hid_device_id hid_have_special_driver[] = {\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_600) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3KV1) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER) },\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_ONE_S) },\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_ONE_S_2016) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_MONTEREY, USB_DEVICE_ID_GENIUS_KB29E) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN) },\ndiff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h\nindex 8b5d1166416a..4d753184436a 100644\n--- a/drivers/hid/hid-ids.h\n+++ b/drivers/hid/hid-ids.h\n@@ -745,6 +745,8 @@\n #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP 0x07dd\n #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP 0x07e9\n #define USB_DEVICE_ID_MS_POWER_COVER     0x07da\n+#define USB_DEVICE_ID_MS_XBOX_ONE_S         0x02fd\n+#define USB_DEVICE_ID_MS_XBOX_ONE_S_2016    0x02e0\n \n #define USB_VENDOR_ID_MOJO\t\t0x8282\n #define USB_DEVICE_ID_RETRO_ADAPTER\t0x3201\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/linux-04-xpadneo.patch",
    "content": "From 25d349d6af1eb1637cb82e9627c32f6225b0e912 Mon Sep 17 00:00:00 2001\nFrom: cdu13a <cdu13a@gmail.com>\nDate: Sat, 23 Nov 2019 14:10:47 -0500\nSubject: hid: add xpadneo driver 0.6.0\n\n---\n drivers/hid/Kconfig       |    7 +\n drivers/hid/Makefile      |    1 +\n drivers/hid/hid-xpadneo.c | 1415 +++++++++++++++++++++++++++++++++++++\n 3 files changed, 1423 insertions(+)\n create mode 100644 drivers/hid/hid-xpadneo.c\n\ndiff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig\nindex 8eed456a67be..4d385d46fb4c 100644\n--- a/drivers/hid/Kconfig\n+++ b/drivers/hid/Kconfig\n@@ -909,6 +909,13 @@ config HID_XINMO\n \tstandard. Currently only supports the Xin-Mo Dual Arcade. Say Y here\n \tif you have a Xin-Mo Dual Arcade controller.\n \n+config HID_XPADNEO\n+\ttristate \"XBOX ONE S and X controller over Bluetooth, including FF\"\n+\tdepends on HID\n+\tselect INPUT_FF_MEMLESS\n+\t---help---\n+\tSupport for Xbox One S and X controllers over BT, including force-feedback.\n+\n config HID_ZEROPLUS\n \ttristate \"Zeroplus based game controller support\"\n \tdepends on HID\ndiff --git a/drivers/hid/Makefile b/drivers/hid/Makefile\nindex 86b2b5785fd2..dfdcb2e64cde 100644\n--- a/drivers/hid/Makefile\n+++ b/drivers/hid/Makefile\n@@ -98,6 +98,7 @@ obj-$(CONFIG_HID_TWINHAN)\t+= hid-twinhan.o\n obj-$(CONFIG_HID_UCLOGIC)\t+= hid-uclogic.o\n obj-$(CONFIG_HID_LED)\t\t+= hid-led.o\n obj-$(CONFIG_HID_XINMO)\t\t+= hid-xinmo.o\n+obj-$(CONFIG_HID_XPADNEO)\t+= hid-xpadneo.o\n obj-$(CONFIG_HID_ZEROPLUS)\t+= hid-zpff.o\n obj-$(CONFIG_HID_ZYDACRON)\t+= hid-zydacron.o\n \ndiff --git a/drivers/hid/hid-xpadneo.c b/drivers/hid/hid-xpadneo.c\nnew file mode 100644\nindex 000000000000..b4847ab6ee1a\n--- /dev/null\n+++ b/drivers/hid/hid-xpadneo.c\n@@ -0,0 +1,1414 @@\n+#define DRV_VER \"0.6.0\"\n+\n+/*\n+ * Force feedback support for XBOX ONE S and X gamepads via Bluetooth\n+ *\n+ * This driver was developed for a student project at fortiss GmbH in Munich.\n+ * Copyright (c) 2017 Florian Dollinger <dollinger.florian@gmx.de>\n+ */\n+\n+#include <linux/hid.h>\n+#include <linux/power_supply.h>\n+#include <linux/input.h>\t/* ff_memless(), ... */\n+#include <linux/module.h>\t/* MODULE_*, module_*, ... */\n+#include <linux/slab.h>\t\t/* kzalloc(), kfree(), ... */\n+#include <linux/delay.h>\t/* mdelay(), ... */\n+#include \"hid-ids.h\"\t\t/* VENDOR_ID... */\n+\n+\n+#define DEBUG\n+\n+\n+/* Module Information */\n+MODULE_LICENSE(\"GPL\");\n+MODULE_AUTHOR(\"Florian Dollinger <dollinger.florian@gmx.de>\");\n+MODULE_DESCRIPTION(\"Linux kernel driver for Xbox ONE S+ gamepads (BT), incl. FF\");\n+MODULE_VERSION(DRV_VER);\n+\n+\n+/* Module Parameters, located at /sys/module/hid_xpadneo/parameters */\n+\n+/* NOTE:\n+ * In general it is not guaranteed that a short variable is no more than\n+ * 16 bit long in C, it depends on the computer architecure. But as a kernel\n+ * module parameter it is, since <params.c> does use kstrtou16 for shorts\n+ * since version 3.14\n+ */\n+\n+#ifdef DEBUG\n+static u8 param_debug_level;\n+module_param_named(debug_level, param_debug_level, byte, 0644);\n+MODULE_PARM_DESC(debug_level, \"(u8) Debug information level: 0 (none) to 3+ (most verbose).\");\n+#endif\n+\n+static u8 param_disable_ff;\n+module_param_named(disable_ff, param_disable_ff, byte, 0644);\n+MODULE_PARM_DESC(disable_ff, \"(u8) Disable FF: 0 (all enabled), 1 (disable main), 2 (disable triggers), 3 (disable all).\");\n+\n+#define PARAM_DISABLE_FF_NONE    0\n+#define PARAM_DISABLE_FF_MAIN    1\n+#define PARAM_DISABLE_FF_TRIGGER 2\n+#define PARAM_DISABLE_FF_ALL     3\n+\n+static bool param_combined_z_axis;\n+module_param_named(combined_z_axis, param_combined_z_axis, bool, 0644);\n+MODULE_PARM_DESC(combined_z_axis, \"(bool) Combine the triggers to form a single axis. 1: combine, 0: do not combine\");\n+\n+static u8 param_trigger_rumble_damping = 4;\n+module_param_named(trigger_rumble_damping, param_trigger_rumble_damping, byte, 0644);\n+MODULE_PARM_DESC(trigger_rumble_damping, \"(u8) Damp the trigger: 1 (none) to 2^8+ (max)\");\n+\n+static u16 param_fake_dev_version = 0x1130;\n+module_param_named(fake_dev_version, param_fake_dev_version, ushort, 0644);\n+MODULE_PARM_DESC(fake_dev_version, \"(u16) Fake device version # to hide from SDL's mappings. 0x0001-0xFFFF: fake version, others: keep original\");\n+\n+\n+/*\n+ * Debug Printk\n+ *\n+ * Prints a debug message to kernel (dmesg)\n+ * only if both is true, this is a DEBUG version and the\n+ * param_debug_level-parameter is equal or higher than the level\n+ * specified in hid_dbg_lvl\n+ */\n+\n+#define DBG_LVL_NONE 0\n+#define DBG_LVL_FEW  1\n+#define DBG_LVL_SOME 2\n+#define DBG_LVL_ALL  3\n+\n+\n+#ifdef DEBUG\n+#define hid_dbg_lvl(lvl, fmt_hdev, fmt_str, ...) \\\n+\tdo { \\\n+\t\tif (param_debug_level >= lvl) \\\n+\t\t\thid_dbg(pr_fmt(fmt_hdev), \\\n+\t\t\t\tpr_fmt(fmt_str), ##__VA_ARGS__); \\\n+\t} while (0)\n+#define dbg_hex_dump_lvl(lvl, fmt_prefix, data, size) \\\n+\tdo { \\\n+\t\tif (param_debug_level >= lvl) \\\n+\t\t\tprint_hex_dump(KERN_DEBUG, pr_fmt(fmt_prefix), \\\n+\t\t\t\tDUMP_PREFIX_NONE, 32, 1, data, size, false); \\\n+\t} while (0)\n+#else\n+#define hid_dbg_lvl(lvl, fmt_hdev, fmt_str, ...) \\\n+\t\tno_printk(KERN_DEBUG pr_fmt(fmt_str), ##__VA_ARGS__)\n+#define dbg_hex_dump_lvl(lvl, fmt_prefix, data, size) \\\n+\t\tno_printk(KERN_DEBUG pr_fmt(fmt_prefix))\n+#endif\n+\n+\n+static DEFINE_IDA(xpadneo_device_id_allocator);\n+\n+/*\n+ * FF Output Report\n+ *\n+ * This is the structure for the rumble output report. For more information\n+ * about this structure please take a look in the hid-report description.\n+ * Please notice that the structs are __packed, therefore there is no \"padding\"\n+ * between the elements (they behave more like an array).\n+ *\n+ */\n+\n+enum {\n+\tFF_ENABLE_NONE          = 0x00,\n+\tFF_ENABLE_RIGHT         = 0x01,\n+\tFF_ENABLE_LEFT          = 0x02,\n+\tFF_ENABLE_RIGHT_TRIGGER = 0x04,\n+\tFF_ENABLE_LEFT_TRIGGER  = 0x08,\n+\tFF_ENABLE_ALL           = 0x0F\n+};\n+\n+struct ff_data {\n+\tu8 enable_actuators;\n+\tu8 magnitude_left_trigger;\n+\tu8 magnitude_right_trigger;\n+\tu8 magnitude_left;\n+\tu8 magnitude_right;\n+\tu8 duration;\n+\tu8 start_delay;\n+\tu8 loop_count;\n+} __packed;\n+\n+struct ff_report {\n+\tu8 report_id;\n+\tstruct ff_data ff;\n+} __packed;\n+\n+/* static variables are zeroed => empty initialization struct */\n+static const struct ff_data ff_clear;\n+\n+\n+/*\n+ * Device Data\n+ *\n+ * We attach information to hdev, which is therefore nearly globally accessible\n+ * via hid_get_drvdata(hdev). It is attached to the hid_device via\n+ * hid_set_drvdata(hdev) at the probing function.\n+ */\n+\n+enum report_type {\n+\tUNKNOWN,\n+\tLINUX,\n+\tWINDOWS\n+};\n+\n+// TODO: avoid data duplication\n+\n+const char *report_type_text[] = {\n+\t\"unknown\",\n+\t\"linux/android\",\n+\t\"windows\"\n+};\n+\n+\n+struct xpadneo_devdata {\n+\t/* mutual exclusion */\n+\tspinlock_t lock;\n+\n+\t/* unique physical device id (randomly assigned) */\n+\tint id;\n+\n+\t/* logical device interfaces */\n+\tstruct hid_device *hdev;\n+\tstruct input_dev *idev;\n+\tstruct power_supply *batt;\n+\n+\t/* report types */\n+\tenum report_type report_descriptor;\n+\tenum report_type report_behaviour;\n+\n+\t/* battery information */\n+\tstruct power_supply_desc batt_desc;\n+\tu8 ps_online;\n+\tu8 ps_present;\n+\tu8 ps_capacity_level;\n+\tu8 ps_status;\n+\n+\t/* axis states */\n+\ts32 last_abs_z;\n+\ts32 last_abs_rz;\n+};\n+\n+\n+void create_ff_pck (struct ff_report *pck, u8 id, u8 en_act,\n+\tu8 mag_lt, u8 mag_rt, u8 mag_l, u8 mag_r,\n+\tu8 start_delay) {\n+\n+\tpck->report_id = id;\n+\n+\tpck->ff.enable_actuators = en_act;\n+\tpck->ff.magnitude_left_trigger = mag_lt;\n+\tpck->ff.magnitude_right_trigger = mag_rt;\n+\tpck->ff.magnitude_left = mag_l;\n+\tpck->ff.magnitude_right = mag_r;\n+\tpck->ff.duration = 0xFF;\n+\tpck->ff.start_delay = start_delay;\n+\tpck->ff.loop_count = 0xFF;\n+\n+\t/* It is up to the Input-Subsystem to start and stop effects as needed.\n+\t * All WE need to do is to play the effect at least 32767 ms long.\n+\t * Take a look here:\n+\t * https://stackoverflow.com/questions/48034091/\n+\t * We therefore simply play the effect as long as possible, which is\n+\t * 2, 55s * 255 = 650, 25s ~ = 10min\n+\t */\n+}\n+\n+/*\n+ * Force Feedback Callback\n+ *\n+ * This function is called by the Input Subsystem.\n+ * The effect data is set in userspace and sent to the driver via ioctl.\n+ */\n+\n+static int xpadneo_ff_play(struct input_dev *dev, void *data,\n+\tstruct ff_effect *effect)\n+{\n+\t/* Q: where is drvdata set to hid_device?\n+\t * A: hid_hw_start (called in probe)\n+\t *    -> hid_connect -> hidinput_connect\n+\t *    -> hidinput_allocate (sets drvdata to hid_device)\n+\t */\n+\n+\tstruct ff_report ff_pck;\n+\tu16 weak, strong, direction, max, max_damped;\n+\tu8 mag_main_right, mag_main_left, mag_trigger_right, mag_trigger_left;\n+\tu8 ff_active;\n+\n+\tconst int fractions_milli[]\n+\t\t= {1000, 962, 854, 691, 500, 309, 146, 38, 0};\n+\tconst int proportions_idx_max = 8;\n+\tu8 index_left, index_right;\n+\tint fraction_TL, fraction_TR;\n+\tu8 trigger_rumble_damping_nonzero;\n+\n+\tenum {\n+\t\tDIRECTION_DOWN  = 0x0000,\n+\t\tDIRECTION_LEFT  = 0x4000,\n+\t\tDIRECTION_UP    = 0x8000,\n+\t\tDIRECTION_RIGHT = 0xC000,\n+\t};\n+\n+\n+\tstruct hid_device *hdev = input_get_drvdata(dev);\n+\n+\tif (param_disable_ff == PARAM_DISABLE_FF_ALL)\n+\t\treturn 0;\n+\n+\tif (effect->type != FF_RUMBLE)\n+\t\treturn 0;\n+\n+\t/* copy data from effect structure at the very beginning */\n+\tweak      = effect->u.rumble.weak_magnitude;\n+\tstrong    = effect->u.rumble.strong_magnitude;\n+\tdirection = effect->direction;\n+\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"playing effect: strong: %#04x, weak: %#04x, direction: %#04x\\n\",\n+\t\tstrong, weak, direction);\n+\n+\t/* calculate the physical magnitudes */\n+\tmag_main_right = (u8)((weak & 0xFF00) >> 8);   /* u16 to u8 */\n+\tmag_main_left  = (u8)((strong & 0xFF00) >> 8); /* u16 to u8 */\n+\n+\n+\t/* get the proportions from a precalculated cosine table\n+\t * calculation goes like:\n+\t * cosine(a) * 1000 =  {1000, 924, 707, 383, 0, -383, -707, -924, -1000}\n+\t * fractions_milli(a) = (1000 + (cosine * 1000)) / 2\n+\t */\n+\n+\tfraction_TL = 0;\n+\tfraction_TR = 0;\n+\n+\tif (direction >= DIRECTION_LEFT && direction <= DIRECTION_RIGHT) {\n+\t\tindex_left = (direction - DIRECTION_LEFT) >> 12;\n+\t\tindex_right = proportions_idx_max - index_left;\n+\n+\t\tfraction_TL = fractions_milli[index_left];\n+\t\tfraction_TR = fractions_milli[index_right];\n+\t}\n+\n+\t/* we want to keep the rumbling at the triggers below the maximum\n+\t* of the weak and strong main rumble\n+\t*/\n+\tmax = mag_main_right > mag_main_left ? mag_main_right : mag_main_left;\n+\n+\t/* the user can change the damping at runtime, hence check the range */\n+\ttrigger_rumble_damping_nonzero\n+\t\t= param_trigger_rumble_damping == 0 ? 1 : param_trigger_rumble_damping;\n+\n+\tmax_damped = max / trigger_rumble_damping_nonzero;\n+\n+\tmag_trigger_left = (u8)((max_damped * fraction_TL) / 1000);\n+\tmag_trigger_right = (u8)((max_damped * fraction_TR) / 1000);\n+\n+\n+\tff_active = FF_ENABLE_ALL;\n+\n+\tif (param_disable_ff & PARAM_DISABLE_FF_TRIGGER)\n+\t\tff_active &= ~(FF_ENABLE_LEFT_TRIGGER | FF_ENABLE_RIGHT_TRIGGER);\n+\n+\tif (param_disable_ff & PARAM_DISABLE_FF_MAIN)\n+\t\tff_active &= ~(FF_ENABLE_LEFT | FF_ENABLE_RIGHT);\n+\n+\n+\tcreate_ff_pck(\n+\t\t&ff_pck, 0x03,\n+\t\tff_active,\n+\t\tmag_trigger_left, mag_trigger_right,\n+\t\tmag_main_left, mag_main_right,\n+\t\t0);\n+\n+\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev,\n+\t\t\"active: %#04x, max: %#04x, prop_left: %#04x, prop_right: %#04x, left trigger: %#04x, right: %#04x\\n\",\n+\t\tff_active,\n+\t\tmax, fraction_TL, fraction_TR,\n+\t\tff_pck.ff.magnitude_left_trigger,\n+\t\tff_pck.ff.magnitude_right_trigger);\n+\n+\thid_hw_output_report(hdev, (u8 *)&ff_pck, sizeof(ff_pck));\n+\n+\treturn 0;\n+}\n+\n+\n+/*\n+ * Device (Gamepad) Initialization\n+ */\n+\n+static int xpadneo_initDevice(struct hid_device *hdev)\n+{\n+\tint error;\n+\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\tstruct input_dev *idev = xdata->idev;\n+\n+\n+\tstruct ff_report ff_pck;\n+\n+\t/* TODO: outsource that */\n+\n+\tff_pck.ff = ff_clear;\n+\n+\t/* 'HELLO' FROM THE OTHER SIDE */\n+\tif (!param_disable_ff) {\n+\t\tff_pck.report_id = 0x03;\n+\t\tff_pck.ff.magnitude_right = 0x80;\n+\t\tff_pck.ff.magnitude_left  = 0x40;\n+\t\tff_pck.ff.magnitude_right_trigger = 0x20;\n+\t\tff_pck.ff.magnitude_left_trigger  = 0x20;\n+\t\tff_pck.ff.duration = 33;\n+\n+\t\tff_pck.ff.enable_actuators = FF_ENABLE_RIGHT;\n+\t\thid_hw_output_report(hdev, (u8 *)&ff_pck, sizeof(ff_pck));\n+\t\tmdelay(330);\n+\n+\t\tff_pck.ff.enable_actuators = FF_ENABLE_LEFT;\n+\t\thid_hw_output_report(hdev, (u8 *)&ff_pck, sizeof(ff_pck));\n+\t\tmdelay(330);\n+\n+\t\tff_pck.ff.enable_actuators\n+\t\t\t= FF_ENABLE_RIGHT_TRIGGER | FF_ENABLE_LEFT_TRIGGER;\n+\t\thid_hw_output_report(hdev, (u8 *)&ff_pck, sizeof(ff_pck));\n+\t\tmdelay(330);\n+\t}\n+\n+\n+\t/* Init Input System for Force Feedback (FF) */\n+\tinput_set_capability(idev, EV_FF, FF_RUMBLE);\n+\terror = input_ff_create_memless(idev, NULL, xpadneo_ff_play);\n+\tif (error)\n+\t\treturn error;\n+\n+\n+\t/*\n+\t * Set default values, otherwise tools which depend on the joystick\n+\t * subsystem, report arbitrary values until the first real event\n+\t * TODO: Is this really necessary?\n+\t */\n+\tinput_report_abs(idev, ABS_X,      0);\n+\tinput_report_abs(idev, ABS_Y,      0);\n+\tinput_report_abs(idev, ABS_Z,      0);\n+\tinput_report_abs(idev, ABS_RX,     0);\n+\tinput_report_abs(idev, ABS_RY,     0);\n+\tinput_report_abs(idev, ABS_RZ,     0);\n+\tinput_report_key(idev, BTN_A,      0);\n+\tinput_report_key(idev, BTN_B,      0);\n+\tinput_report_key(idev, BTN_X,      0);\n+\tinput_report_key(idev, BTN_Y,      0);\n+\tinput_report_key(idev, BTN_TR,     0);\n+\tinput_report_key(idev, BTN_TL,     0);\n+\tinput_report_key(idev, BTN_THUMBL, 0);\n+\tinput_report_key(idev, BTN_THUMBR, 0);\n+\tinput_report_key(idev, BTN_START,  0);\n+\tinput_report_key(idev, BTN_MODE,   0);\n+\tinput_report_key(idev, ABS_HAT0X,  0);\n+\tinput_report_key(idev, ABS_HAT0Y,  0);\n+\tinput_sync(idev);\n+\n+\t/* TODO: - do not hardcode codes and values but\n+\t *         keep them in the mapping structures\n+\t *       - maybe initDevice isn't the right place\n+\t */\n+\n+\treturn 0;\n+}\n+\n+\n+/* Callback function which return the available properties to userspace */\n+static int battery_get_property(struct power_supply *ps,\n+\tenum power_supply_property property, union power_supply_propval *val)\n+{\n+\tstruct xpadneo_devdata *xdata = power_supply_get_drvdata(ps);\n+\tunsigned long flags;\n+\tu8 capacity_level, present, online, status;\n+\n+\tspin_lock_irqsave(&xdata->lock, flags);\n+\tcapacity_level = xdata->ps_capacity_level;\n+\tpresent        = xdata->ps_present;\n+\tonline         = xdata->ps_online;\n+\tstatus         = xdata->ps_status;\n+\tspin_unlock_irqrestore(&xdata->lock, flags);\n+\n+\tswitch (property) {\n+\tcase POWER_SUPPLY_PROP_MANUFACTURER:\n+\t\tval->strval = \"Microsoft\";\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_MODEL_NAME:\n+\t\tval->strval = \"Xbox Wireless Controller\";\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_PRESENT:\n+\t\tval->intval = present;\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_ONLINE:\n+\t\tval->intval = online;\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_SCOPE:\n+\t\tval->intval = POWER_SUPPLY_SCOPE_DEVICE;\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_CAPACITY_LEVEL:\n+\t\tval->intval = capacity_level;\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_STATUS:\n+\t\tval->intval = status;\n+\t\tbreak;\n+\tdefault:\n+\t\treturn -EINVAL;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+\n+static int xpadneo_initBatt(struct hid_device *hdev)\n+{\n+\tint ret = 0;\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\n+\tstatic enum power_supply_property battery_props[] = {\n+\t\t/* is a power supply available? always true */\n+\t\tPOWER_SUPPLY_PROP_PRESENT,\n+\t\t/* critical, low, normal, high, full */\n+\t\tPOWER_SUPPLY_PROP_CAPACITY_LEVEL,\n+\t\t/* powers a specific device */\n+\t\tPOWER_SUPPLY_PROP_SCOPE,\n+\t\t/* charging (full, plugged), not_charging */\n+\t\tPOWER_SUPPLY_PROP_STATUS,\n+\t\t/* cstring - manufacturer name */\n+\t\tPOWER_SUPPLY_PROP_MANUFACTURER,\n+\t\t/* cstring - model name */\n+\t\tPOWER_SUPPLY_PROP_MODEL_NAME,\n+\t\tPOWER_SUPPLY_PROP_ONLINE\n+\t};\n+\n+\n+\tstruct power_supply_config ps_config = {\n+\t\t/* pass the xpadneo_data to the get_property function */\n+\t\t.drv_data = xdata\n+\t};\n+\n+\n+\t/* Set up power supply */\n+\n+\t/* Set the battery capacity to 'full' until we get our first real\n+\t * battery event. Prevents false \"critical low battery\" notifications\n+\t */\n+\txdata->ps_capacity_level = POWER_SUPPLY_CAPACITY_LEVEL_FULL;\n+\n+\t/* NOTE: hdev->uniq is meant to be the MAC address and hence\n+\t *       it should be unique. Unfortunately, here it is not unique\n+\t *       neither is it the bluetooth MAC address.\n+\t *       As a solution we add an unique id for every gamepad.\n+\t */\n+\n+\txdata->batt_desc.name = kasprintf(GFP_KERNEL, \"xpadneo_batt_%pMR_%i\",\n+\t\t\t\thdev->uniq, xdata->id);\n+\tif (!xdata->batt_desc.name)\n+\t\treturn -ENOMEM;\n+\n+\txdata->batt_desc.type = POWER_SUPPLY_TYPE_BATTERY;\n+\n+\t/* Which properties of the battery are accessible? */\n+\txdata->batt_desc.properties = battery_props;\n+\txdata->batt_desc.num_properties = ARRAY_SIZE(battery_props);\n+\n+\t/*\n+\t * We have to offer a function which returns the current\n+\t * property values we defined above. Make sure that\n+\t * the get_property functions covers all properties above.\n+\t */\n+\txdata->batt_desc.get_property = battery_get_property;\n+\n+\n+\t/* Advanced power management emulation */\n+\txdata->batt_desc.use_for_apm = 0;\n+\n+\t/* Register power supply for our gamepad device */\n+\txdata->batt = devm_power_supply_register(&hdev->dev,\n+\t\t\t\t\t\t&xdata->batt_desc, &ps_config);\n+\tif (IS_ERR(xdata->batt)) {\n+\t\tret = PTR_ERR(xdata->batt);\n+\t\thid_err(hdev, \"Unable to register battery device\\n\");\n+\t\tgoto err_free;\n+\t} else {\n+\t\thid_dbg_lvl(DBG_LVL_SOME, hdev, \"battery registered\\n\");\n+\t}\n+\n+\tpower_supply_powers(xdata->batt, &hdev->dev);\n+\n+err_free:\n+\tkfree(xdata->batt_desc.name);\n+\txdata->batt_desc.name = NULL;\n+\n+\treturn ret;\n+}\n+\n+\n+enum mapping_behaviour {\n+\tMAP_IGNORE, /* Completely ignore this field */\n+\tMAP_AUTO,   /* Do not really map it, let hid-core decide */\n+\tMAP_STATIC  /* Map to the values given */\n+};\n+\n+struct input_ev {\n+\t/* Map to which input event (EV_KEY, EV_ABS, ...)? */\n+\tu8 event_type;\n+\t/* Map to which input code (BTN_A, ABS_X, ...)? */\n+\tu16 input_code;\n+};\n+\n+u8 map_hid_to_input_windows(struct hid_usage *usage, struct input_ev *map_to)\n+{\n+\n+\t/*\n+\t * Windows report-descriptor (307 byte):\n+\t *\n+\t * 05 01 09 05 a1 01 85 01 09 01 a1 00 09 30 09 31 15 00 27 ff\n+\t * ff 00 00 95 02 75 10 81 02 c0 09 01 a1 00 09 33 09 34 15 00\n+\t * 27 ff ff 00 00 95 02 75 10 81 02 c0 05 01 09 32 15 00 26 ff\n+\t * 03 95 01 75 0a 81 02 15 00 25 00 75 06 95 01 81 03 05 01 09\n+\t * 35 15 00 26 ff 03 95 01 75 0a 81 02 15 00 25 00 75 06 95 01\n+\t * 81 03 05 01 09 39 15 01 25 08 35 00 46 3b 01 66 14 00 75 04\n+\t * 95 01 81 42 75 04 95 01 15 00 25 00 35 00 45 00 65 00 81 03\n+\t * 05 09 19 01 29 0a 15 00 25 01 75 01 95 0a 81 02 15 00 25 00\n+\t * 75 06 95 01 81 03 05 01 09 80 85 02 a1 00 09 85 15 00 25 01\n+\t * 95 01 75 01 81 02 15 00 25 00 75 07 95 01 81 03 c0 05 0f 09\n+\t * 21 85 03 a1 02 09 97 15 00 25 01 75 04 95 01 91 02 15 00 25\n+\t * 00 75 04 95 01 91 03 09 70 15 00 25 64 75 08 95 04 91 02 09\n+\t * 50 66 01 10 55 0e 15 00 26 ff 00 75 08 95 01 91 02 09 a7 15\n+\t * 00 26 ff 00 75 08 95 01 91 02 65 00 55 00 09 7c 15 00 26 ff\n+\t * 00 75 08 95 01 91 02 c0 85 04 05 06 09 20 15 00 26 ff 00 75\n+\t * 08 95 01 81 02 c0 00\n+\t */\n+\n+\tunsigned int hid_usage = usage->hid & HID_USAGE;\n+\tunsigned int hid_usage_page = usage->hid & HID_USAGE_PAGE;\n+\n+\tswitch (hid_usage_page) {\n+\tcase HID_UP_BUTTON:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0x01:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_A};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x02:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_B};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x03:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_X};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x04:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_Y};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x05:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_TL};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x06:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_TR};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x07:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_SELECT};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x08:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_START};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x09:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_THUMBL};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x0A:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_THUMBR};\n+\t\t\treturn MAP_STATIC;\n+\t\t}\n+\tcase HID_UP_GENDESK:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0x30:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_X};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x31:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_Y};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x32:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_Z};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x33:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RX};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x34:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RY};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x35:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RZ};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x39:\n+\t\t\t*map_to = (struct input_ev){0, 0};\n+\t\t\treturn MAP_AUTO;\n+\t\tcase 0x85:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_MODE};\n+\t\t\treturn MAP_STATIC;\n+\t\t}\n+\t}\n+\n+\treturn MAP_IGNORE;\n+}\n+\n+u8 map_hid_to_input_linux(struct hid_usage *usage, struct input_ev *map_to)\n+{\n+\n+\t/*\n+\t * Linux report-descriptor (335 byte):\n+\t *\n+\t * 05 01 09 05 a1 01 85 01 09 01 a1 00 09 30 09 31 15 00 27 ff\n+\t * ff 00 00 95 02 75 10 81 02 c0 09 01 a1 00 09 32 09 35 15 00\n+\t * 27 ff ff 00 00 95 02 75 10 81 02 c0 05 02 09 c5 15 00 26 ff\n+\t * 03 95 01 75 0a 81 02 15 00 25 00 75 06 95 01 81 03 05 02 09\n+\t * c4 15 00 26 ff 03 95 01 75 0a 81 02 15 00 25 00 75 06 95 01\n+\t * 81 03 05 01 09 39 15 01 25 08 35 00 46 3b 01 66 14 00 75 04\n+\t * 95 01 81 42 75 04 95 01 15 00 25 00 35 00 45 00 65 00 81 03\n+\t * 05 09 19 01 29 0f 15 00 25 01 75 01 95 0f 81 02 15 00 25 00\n+\t * 75 01 95 01 81 03 05 0c 0a 24 02 15 00 25 01 95 01 75 01 81\n+\t * 02 15 00 25 00 75 07 95 01 81 03 05 0c 09 01 85 02 a1 01 05\n+\t * 0c 0a 23 02 15 00 25 01 95 01 75 01 81 02 15 00 25 00 75 07\n+\t * 95 01 81 03 c0 05 0f 09 21 85 03 a1 02 09 97 15 00 25 01 75\n+\t * 04 95 01 91 02 15 00 25 00 75 04 95 01 91 03 09 70 15 00 25\n+\t * 64 75 08 95 04 91 02 09 50 66 01 10 55 0e 15 00 26 ff 00 75\n+\t * 08 95 01 91 02 09 a7 15 00 26 ff 00 75 08 95 01 91 02 65 00\n+\t * 55 00 09 7c 15 00 26 ff 00 75 08 95 01 91 02 c0 85 04 05 06\n+\t * 09 20 15 00 26 ff 00 75 08 95 01 81 02 c0 00\n+\t */\n+\n+\tunsigned int hid_usage = usage->hid & HID_USAGE;\n+\tunsigned int hid_usage_page = usage->hid & HID_USAGE_PAGE;\n+\n+\tswitch (hid_usage_page) {\n+\tcase HID_UP_BUTTON:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0x01:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_A};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x02:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_B};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x04:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_X};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x05:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_Y};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x07:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_TL};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x08:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_TR};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x0C:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_START};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x0E:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_THUMBL};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x0F:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_THUMBR};\n+\t\t\treturn MAP_STATIC;\n+\t\t}\n+\tcase HID_UP_CONSUMER:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0x223:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_MODE};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x224:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_SELECT};\n+\t\t\treturn MAP_STATIC;\n+\t\t}\n+\tcase HID_UP_GENDESK:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0x30:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_X};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x31:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_Y};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x32:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RX};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x35:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RY};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x39:\n+\t\t\t*map_to = (struct input_ev){0, 0};\n+\t\t\treturn MAP_AUTO;\n+\t\t}\n+\tcase HID_UP_SIMULATION:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0xC4:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RZ};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0xC5:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_Z};\n+\t\t\treturn MAP_STATIC;\n+\t\t}\n+\t}\n+\n+\treturn MAP_IGNORE;\n+}\n+\n+\n+/*\n+ * Input Mapping Hook\n+ *\n+ * Invoked at input registering before mapping an usage\n+ * (called once for every hid-usage).\n+ */\n+\n+static int xpadneo_mapping(struct hid_device *hdev, struct hid_input *hi,\n+\t\t\t   struct hid_field *field, struct hid_usage *usage,\n+\t\t\t   unsigned long **bit, int *max)\n+{\n+\t/* Return values */\n+\tenum {\n+\t\tRET_MAP_IGNORE = -1,   /* completely ignore this input */\n+\t\tRET_MAP_AUTO,        /* let hid-core autodetect the mapping */\n+\t\tRET_MAP_STATIC       /* mapped by hand, no further processing */\n+\t};\n+\n+\tstruct input_ev map_to;\n+\tu8 (*perform_mapping)(struct hid_usage *usage, struct input_ev *map_to);\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\n+\n+\tswitch (xdata->report_descriptor) {\n+\tcase LINUX:\n+\t\tperform_mapping = map_hid_to_input_linux;\n+\t\tbreak;\n+\tcase WINDOWS:\n+\t\tperform_mapping = map_hid_to_input_windows;\n+\t\tbreak;\n+\tdefault:\n+\t\treturn RET_MAP_AUTO;\n+\t}\n+\n+\n+\tswitch (perform_mapping(usage, &map_to)) {\n+\tcase MAP_AUTO:\n+\t\thid_dbg_lvl(DBG_LVL_FEW, hdev,\n+\t\t\"UP: 0x%04X, USG: 0x%04X -> automatically\\n\",\n+\t\tusage->hid & HID_USAGE_PAGE, usage->hid & HID_USAGE);\n+\n+\t\treturn RET_MAP_AUTO;\n+\n+\tcase MAP_IGNORE:\n+\t\thid_dbg_lvl(DBG_LVL_FEW, hdev,\n+\t\t\"UP: 0x%04X, USG: 0x%04X -> ignored\\n\",\n+\t\tusage->hid & HID_USAGE_PAGE, usage->hid & HID_USAGE);\n+\n+\t\treturn RET_MAP_IGNORE;\n+\n+\tcase MAP_STATIC:\n+\t\thid_dbg_lvl(DBG_LVL_FEW, hdev,\n+\t\t\"UP: 0x%04X, USG: 0x%04X -> EV: 0x%03X, INP: 0x%03X\\n\",\n+\t\tusage->hid & HID_USAGE_PAGE, usage->hid & HID_USAGE,\n+\t\tmap_to.event_type, map_to.input_code);\n+\n+\t\thid_map_usage_clear(hi, usage, bit, max,\n+\t\t\t\t\tmap_to.event_type, map_to.input_code);\n+\t\treturn RET_MAP_STATIC;\n+\n+\t}\n+\n+\t/* Something went wrong, ignore this field */\n+\treturn RET_MAP_IGNORE;\n+}\n+\n+\n+/*\n+ * Report Descriptor Fixup Hook\n+ *\n+ * You can either modify the original report in place and just\n+ * return the original start address (rdesc) or you reserve a new\n+ * one and return a pointer to it. In the latter, you mostly have to\n+ * modify the rsize value too.\n+ */\n+\n+static u8 *xpadneo_report_fixup(struct hid_device *hdev, u8 *rdesc,\n+\t\t\t\tunsigned int *rsize)\n+{\n+\thid_dbg_lvl(DBG_LVL_SOME, hdev,\t\"REPORT (DESCRIPTOR) FIXUP HOOK\\n\");\n+\tdbg_hex_dump_lvl(DBG_LVL_FEW, \"xpadneo: report-descr: \", rdesc, *rsize);\n+\n+\treturn rdesc;\n+}\n+\n+\n+static void parse_raw_event_battery(struct hid_device *hdev, u8 *data,\n+\t\t\t\t    int reportsize)\n+{\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\tunsigned long flags;\n+\tu8 capacity_level, present, online, status;\n+\n+\n+\t/*  msb          ID 04          lsb\n+\t * +---+---+---+---+---+---+---+---+\n+\t * | O | R | E | C | M | M | L | L |\n+\t * +---+---+---+---+---+---+---+---+\n+\t *\n+\t * O: Online\n+\t * R: Reserved / Unused\n+\t * E: Error (?) / Unknown\n+\t * C: Charging, I mean really charging the battery (P 'n C)\n+\t *              not (only) the power cord powering the controller\n+\t * M M: Mode\n+\t *   00: Powered by USB\n+\t *   01: Powered by (disposable) batteries\n+\t *   10: Powered by Play 'n Charge battery pack (only, no cable)\n+\t * L L: Capacity Level\n+\t *   00: (Super) Critical\n+\t *   01: Low\n+\t *   10: Medium\n+\t *   11: Full\n+\t */\n+\n+\n+\t/* I think \"online\" means whether the dev is online or shutting down */\n+\tonline = (data[1] & 0x80) >> 7;\n+\n+\t/* The _battery_ is only present if not powered by USB */\n+\tpresent = ((data[1] & 0x0C) != 0x00);\n+\n+\t/* Capacity level, only valid as long as the battery is present */\n+\tswitch (data[1] & 0x03) {\n+\tcase 0x00:\n+\t\tcapacity_level = POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL;\n+\t\tbreak;\n+\tcase 0x01:\n+\t\tcapacity_level = POWER_SUPPLY_CAPACITY_LEVEL_LOW;\n+\t\tbreak;\n+\tcase 0x02:\n+\t\tcapacity_level = POWER_SUPPLY_CAPACITY_LEVEL_NORMAL;\n+\t\tbreak;\n+\tcase 0x03:\n+\t\tcapacity_level = POWER_SUPPLY_CAPACITY_LEVEL_HIGH;\n+\t\tbreak;\n+\t}\n+\n+\t/* Is the (Play 'n Charge) battery charging right now? */\n+\tswitch ((data[1] & 0x10) >> 4) {\n+\tcase 0:\n+\t\tstatus = POWER_SUPPLY_STATUS_DISCHARGING;\n+\t\tbreak;\n+\tcase 1:\n+\t\tstatus = POWER_SUPPLY_STATUS_CHARGING;\n+\t\tbreak;\n+\t}\n+\n+\tspin_lock_irqsave(&xdata->lock, flags);\n+\txdata->ps_status = status;\n+\txdata->ps_capacity_level = capacity_level;\n+\txdata->ps_online = online;\n+\txdata->ps_present = present;\n+\tspin_unlock_irqrestore(&xdata->lock, flags);\n+\n+\tpower_supply_changed(xdata->batt);\n+}\n+\n+static void check_report_behaviour(struct hid_device *hdev, u8 *data,\n+\t\t\t\t   int reportsize)\n+{\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\n+\t/*\n+\t * The length of the first input report with an ID of 0x01\n+\t * reveals which report-type the controller is actually\n+\t * sending (windows: 16, or linux: 17).\n+\t */\n+\tif (xdata->report_behaviour == UNKNOWN) {\n+\t\tswitch (reportsize) {\n+\t\tcase 16:\n+\t\t\txdata->report_behaviour = WINDOWS;\n+\t\t\tbreak;\n+\t\tcase 17:\n+\t\t\txdata->report_behaviour = LINUX;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\txdata->report_behaviour = UNKNOWN;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\thid_dbg_lvl(DBG_LVL_SOME, hdev, \"desc: %s, beh: %s\\n\",\n+\t\treport_type_text[xdata->report_descriptor],\n+\t\treport_type_text[xdata->report_behaviour]);\n+\n+\t/* TODO:\n+\t * Maybe the best solution would be to replace the report descriptor\n+\t * in case that the wrong reports are sent. Unfortunately we do not\n+\t * know if the report descriptor is the right one until the first\n+\t * report is sent to us. At this time, the report_fixup hook is\n+\t * already over and the original descriptor is parsed into hdev\n+\t * i.e. report_enum and collection.\n+\t *\n+\t * The next best solution would be to replace the report with\n+\t * ID 0x01 with the right one in report_enum (and collection?).\n+\t * I don't know yet how this would works, perhaps like this:\n+\t * - create a new report struct\n+\t * - fill it by hand\n+\t * - add all neccessary fields (automatic way?)\n+\t *\n+\t * Another way to fix it is:\n+\t * - Register another report with a _new_ ID by hand\n+\t *   (unfortunately we cannot use the same id again)\n+\t * - in raw_event: change the ID from 0x01 to the new one if\n+\t *   necessary. leave it if not.\n+\t *\n+\t * What we currently do is:\n+\t * We examine every report and fire the input events by hand.\n+\t * That's not very generic.\n+\t *\n+\t */\n+\n+\n+\t// TODO:\n+\t// * remove old report using list operations\n+\t// * create new one like they do in hid_register_report\n+\t// * add it to output_reports->report_list and array\n+\n+}\n+\n+/*\n+ * HID Raw Event Hook\n+ */\n+\n+int xpadneo_raw_event(struct hid_device *hdev, struct hid_report *report,\n+\t\t      u8 *data, int reportsize)\n+{\n+\t/* Return Codes */\n+\tenum {\n+\t\tRAWEV_CONT_PROCESSING, /* Let the hid-core autodetect the event */\n+\t\tRAWEV_STOP_PROCESSING  /* Stop further processing */\n+\t};\n+\n+\t//hid_dbg_lvl(DBG_LVL_SOME, hdev, \"RAW EVENT HOOK\\n\");\n+\n+\tdbg_hex_dump_lvl(DBG_LVL_SOME, \"xpadneo: raw_event: \", data, reportsize);\n+\t//hid_dbg_lvl(DBG_LVL_ALL, hdev, \"report->size: %d\\n\", (report->size)/8);\n+\t//hid_dbg_lvl(DBG_LVL_ALL, hdev, \"data size (wo id): %d\\n\", reportsize-1);\n+\n+\n+\tswitch (report->id) {\n+\tcase 01:\n+\t\tcheck_report_behaviour(hdev, data, reportsize);\n+\t\tbreak;\n+\tcase 04:\n+\t\tparse_raw_event_battery(hdev, data, reportsize);\n+\t\treturn RAWEV_STOP_PROCESSING;\n+\t}\n+\n+\t/* Continue processing */\n+\treturn RAWEV_CONT_PROCESSING;\n+}\n+\n+\n+void xpadneo_report(struct hid_device *hdev, struct hid_report *report)\n+{\n+\thid_dbg_lvl(DBG_LVL_SOME, hdev, \"REPORT HOOK\\n\");\n+}\n+\n+\n+/*\n+ * Input Configured Hook\n+ *\n+ * We have to fix up the key-bitmap, because there is\n+ * no DPAD_UP, _RIGHT, _DOWN, _LEFT on the device by default\n+ *\n+ */\n+\n+static int xpadneo_input_configured(struct hid_device *hdev,\n+\t\t\t\t    struct hid_input *hi)\n+{\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\n+\t/* set a pointer to the logical input device at the device structure */\n+\txdata->idev = hi->input;\n+\n+\thid_dbg_lvl(DBG_LVL_SOME, hdev, \"INPUT CONFIGURED HOOK\\n\");\n+\n+\tif (param_fake_dev_version) {\n+\t\txdata->idev->id.version = (u16) param_fake_dev_version;\n+\t\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"Fake device version: 0x%04X\\n\",\n+\t\t\tparam_fake_dev_version);\n+\t}\n+\n+\n+\t// The HID device descriptor defines a range from 0 to 65535 for all\n+\t// absolute axis (like ABS_X), this is in contrary to what the linux\n+\t// gamepad specification defines [–32.768; 32.767].\n+\t// Therefore, we have to set the min, max, fuzz and flat values by hand:\n+\n+\tinput_set_abs_params(xdata->idev, ABS_X, -32768, 32767, 255, 4095);\n+\tinput_set_abs_params(xdata->idev, ABS_Y, -32768, 32767, 255, 4095);\n+\n+\tinput_set_abs_params(xdata->idev, ABS_RX, -32768, 32767, 255, 4095);\n+\tinput_set_abs_params(xdata->idev, ABS_RY, -32768, 32767, 255, 4095);\n+\n+\tif (param_combined_z_axis)\n+\t\tinput_set_abs_params(xdata->idev, ABS_Z, -1024, 1023, 3, 63);\n+\n+\t// furthermore, we need to translate the incoming events to fit within\n+\t// the new range, we will do that in the xpadneo_event() hook.\n+\n+\t// We remove the ABS_RZ event if param_combined_z_axis is enabled\n+\tif (param_combined_z_axis) {\n+\t\t__clear_bit(ABS_RZ, xdata->idev->absbit);\n+\t}\n+\n+\treturn 0;\n+}\n+\n+\n+/*\n+ * Event Hook\n+ *\n+ * This hook is called whenever an event occurs that is listed on\n+ * xpadneo_driver.usage_table (which is NULL in our case, therefore it is\n+ * invoked on every event).\n+ *\n+ * Before we can send additional input events, we have to enable\n+ * the corresponding keys in xpadneo_input_configured.\n+ */\n+\n+int xpadneo_event(struct hid_device *hdev, struct hid_field *field,\n+\t\t  struct hid_usage *usage, __s32 value)\n+{\n+\t/* Return Codes */\n+\tenum {\n+\t\tEV_CONT_PROCESSING, /* Let the hid-core autodetect the event */\n+\t\tEV_STOP_PROCESSING  /* Stop further processing */\n+\t};\n+\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\tstruct input_dev *idev = xdata->idev;\n+\n+\tu16 usg_type = usage->type;\n+\tu16 usg_code = usage->code;\n+\n+\n+\thid_dbg_lvl(DBG_LVL_ALL, hdev,\n+\t\t\"hid-up: %02x, hid-usg: %02x, input-code: %02x, value: %02x\\n\",\n+\t\t(usage->hid & HID_USAGE_PAGE), (usage->hid & HID_USAGE),\n+\t\tusage->code, value);\n+\n+\n+\t// we have to shift the range of the analogues sticks (ABS_X/Y/RX/RY)\n+\t// as already explained in xpadneo_input_configured() above\n+\t// furthermore we need to combine ABS_Z and ABS_RZ if param_combined_z_axis\n+\t// is set\n+\n+\tif (usg_type == EV_ABS) {\n+\t\tif (usg_code == ABS_X || usg_code == ABS_Y\n+\t\t\t\t|| usg_code == ABS_RX || usg_code == ABS_RY) {\n+\t\t\thid_dbg_lvl(DBG_LVL_ALL, hdev, \"shifted axis %02x, old value: %i, new value: %i\\n\", usg_code, value, value - 32768);\n+\t\t\tinput_report_abs(idev, usg_code, value - 32768);\n+\t\t\tgoto sync_and_stop_processing;\n+\t\t}\n+\n+\t\tif (param_combined_z_axis) {\n+\t\t\tif (usg_code == ABS_Z || usg_code == ABS_RZ) {\n+\t\t\t\tif (usg_code == ABS_Z)\n+\t\t\t\t\txdata->last_abs_z = value;\n+\t\t\t\tif (usg_code == ABS_RZ)\n+\t\t\t\t\txdata->last_abs_rz = value;\n+\n+\t\t\t\tinput_report_abs(idev, ABS_Z, 0 - xdata->last_abs_z + xdata->last_abs_rz);\n+\t\t\t\tgoto sync_and_stop_processing;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\n+\n+\n+\t/* TODO:\n+\t * This is a workaround for the wrong report (Windows report but\n+\t * Linux descriptor). We would prefer to fixup the descriptor, but we\n+\t * cannot fix it anymore at the time we recognize the wrong behaviour,\n+\t * hence we will fire the input events by hand.\n+\t */\n+\n+\tif (xdata->report_behaviour == WINDOWS\n+\t\t\t\t\t&& xdata->report_descriptor == LINUX) {\n+\n+\t\t/*\n+\t\t * we fix all buttons by hand. You may think that we\n+\t\t * could do that by using the windows_map too, but it is more\n+\t\t * like an coincidence that this would work in this case:\n+\t\t * It would only, because HID_UP_BUTTONS has no special names\n+\t\t * for the HID_USAGE's, therefore the first button stays 0x01\n+\t\t * on both reports (windows and linux) - it is a 1: 1 mapping.\n+\t\t * But this is not true in general (i.e. for other USAGE_PAGES)\n+\t\t */\n+\n+\t\tif ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) {\n+\t\t\tswitch (usage->hid & HID_USAGE) {\n+\t\t\tcase 0x01:\n+\t\t\t\tinput_report_key(idev, BTN_A, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x02:\n+\t\t\t\tinput_report_key(idev, BTN_B, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x03:\n+\t\t\t\tinput_report_key(idev, BTN_X, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x04:\n+\t\t\t\tinput_report_key(idev, BTN_Y, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x05:\n+\t\t\t\tinput_report_key(idev, BTN_TL, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x06:\n+\t\t\t\tinput_report_key(idev, BTN_TR, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x07:\n+\t\t\t\tinput_report_key(idev, BTN_SELECT, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x08:\n+\t\t\t\tinput_report_key(idev, BTN_START, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x09:\n+\t\t\t\tinput_report_key(idev, BTN_THUMBL, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x0A:\n+\t\t\t\tinput_report_key(idev, BTN_THUMBR, value);\n+\t\t\t\tbreak;\n+\t\t\t}\n+\n+\t\t\thid_dbg_lvl(DBG_LVL_ALL, hdev,\n+\t\t\t\t\"hid-upage: %02x, hid-usage: %02x fixed\\n\",\n+\t\t\t\t(usage->hid & HID_USAGE_PAGE),\n+\t\t\t\t(usage->hid & HID_USAGE));\n+\n+\t\t\tgoto sync_and_stop_processing;\n+\t\t}\n+\t}\n+\n+\treturn EV_CONT_PROCESSING;\n+\n+sync_and_stop_processing:\n+\tinput_sync(idev);\n+\treturn EV_STOP_PROCESSING;\n+\n+}\n+\n+\n+/* Device Probe and Remove Hook */\n+\n+static int xpadneo_probe_device(struct hid_device *hdev,\n+\t\t\t\tconst struct hid_device_id *id)\n+{\n+\tint ret;\n+\tstruct xpadneo_devdata *xdata;\n+\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"probing device: %s\\n\", hdev->name);\n+\n+\n+\t/*\n+\t * Create a per-device data structure which is \"nearly globally\" accessible\n+\t * through hid_get_drvdata. The structure is freed automatically\n+\t * as soon as hdev->dev (the device) is removed, since we use the devm_\n+\t * derivate.\n+\t */\n+\txdata = devm_kzalloc(&hdev->dev, sizeof(*xdata), GFP_KERNEL);\n+\tif (xdata == NULL)\n+\t\treturn -ENOMEM;\n+\n+\txdata->id = ida_simple_get(&xpadneo_device_id_allocator,\n+\t\t\t0, 0, GFP_KERNEL);\n+\n+\txdata->hdev = hdev;\n+\n+\t/* Unknown until first report with ID 01 arrives (see raw_event) */\n+\txdata->report_behaviour = UNKNOWN;\n+\n+\tswitch (hdev->dev_rsize) {\n+\tcase 307:\n+\t\txdata->report_descriptor = WINDOWS;\n+\t\tbreak;\n+\tcase 335:\n+\t\txdata->report_descriptor = LINUX;\n+\t\tbreak;\n+\tdefault:\n+\t\txdata->report_descriptor = UNKNOWN;\n+\t\tbreak;\n+\t}\n+\n+\thid_set_drvdata(hdev, xdata);\n+\n+\n+\t/* Parse the raw report (includes a call to report_fixup) */\n+\tret = hid_parse(hdev);\n+\tif (ret) {\n+\t\thid_err(hdev, \"parse failed\\n\");\n+\t\tgoto return_error;\n+\t}\n+\n+\t/* Debug Output*/\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"driver:\\n\");\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* version: %s\\n\", DRV_VER);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"hdev:\\n\");\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* raw rdesc: (unfixed, see above)\\n\");\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* raw rsize: %u\\n\", hdev->dev_rsize);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* bus: 0x%04X\\n\", hdev->bus);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* report group: %u\\n\", hdev->group);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* vendor: 0x%08X\\n\", hdev->vendor);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* version: 0x%08X\\n\", hdev->version);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* product: 0x%08X\\n\", hdev->product);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* country: %u\\n\", hdev->country);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* driverdata: %lu\\n\", id->driver_data);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* serial: %pMR\\n\", hdev->uniq);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* physical location: %pMR\\n\", hdev->phys);\n+\n+\t/* We start our hardware without FF, we will add it afterwards by hand\n+\t * HID_CONNECT_DEFAULT = (HID_CONNECT_HIDINPUT | HID_CONNECT_HIDRAW\n+\t *                        | HID_CONNECT_HIDDEV | HID_CONNECT_FF)\n+\t * Our Input Device is created automatically since we defined\n+\t * HID_CONNECT_HIDINPUT as one of the flags.\n+\t */\n+\tret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF);\n+\tif (ret) {\n+\t\thid_err(hdev, \"hw start failed\\n\");\n+\t\tgoto return_error;\n+\t}\n+\n+\t/* Call the device initialization routines */\n+\tret = xpadneo_initDevice(hdev);\n+\tif (ret) {\n+\t\thid_err(hdev, \"device initialization failed\\n\");\n+\t\tgoto return_error;\n+\t}\n+\n+\tret = xpadneo_initBatt(hdev);\n+\tif (ret) {\n+\t\thid_err(hdev, \"battery initialization failed\\n\");\n+\t\tgoto return_error;\n+\t}\n+\n+\n+\t/* Everything is fine */\n+\treturn 0;\n+\n+return_error:\n+\treturn ret;\n+}\n+\n+\n+static void xpadneo_remove_device(struct hid_device *hdev)\n+{\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\n+\thid_hw_close(hdev);\n+\n+\t/* Cleaning up here */\n+\tida_simple_remove(&xpadneo_device_id_allocator, xdata->id);\n+\n+\thid_hw_stop(hdev);\n+\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"Goodbye %s!\\n\", hdev->name);\n+}\n+\n+\n+\n+/*\n+ * Device ID Structure, define all supported devices here\n+ */\n+\n+static const struct hid_device_id xpadneo_devices[] = {\n+\n+\t/*\n+\t * The ProductID is somehow related to the Firmware Version,\n+\t * but it somehow changed back from 0x02FD (newer fw) to 0x02E0 (older)\n+\t * and vice versa on one controller here.\n+\t *\n+\t * Unfortunately you cannot tell from product id how the gamepad really\n+\t * behaves on reports, since the newer firmware supports both mappings\n+\t * (the one which is standard in linux and the old one, which is still\n+\t * used in windows).\n+\t */\n+\n+\t/* XBOX ONE S / X */\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, 0x02FD) },\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, 0x02E0) },\n+\t/* SENTINEL VALUE, indicates the end*/\n+\t{ }\n+};\n+\n+static struct hid_driver xpadneo_driver = {\n+\t/* The name of the driver */\n+\t.name = \"xpadneo\",\n+\n+\t/* Which devices is this driver for */\n+\t.id_table = xpadneo_devices,\n+\n+\t/* Hooked as the input device is configured (before it is registered)\n+\t * we need that because we do not configure the input-device ourself\n+\t * but leave it up to hid_hw_start()\n+\t */\n+\t.input_configured = xpadneo_input_configured,\n+\n+\t/* Invoked on input registering before mapping an usage */\n+\t.input_mapping = xpadneo_mapping,\n+\n+\t/* If usage in usage_table, this hook is called */\n+\t.event = xpadneo_event,\n+\n+\t/* Called before report descriptor parsing (NULL means nop) */\n+\t.report_fixup = xpadneo_report_fixup,\n+\n+\t/* Called when a new device is inserted */\n+\t.probe = xpadneo_probe_device,\n+\n+\t/* Called when a device is removed */\n+\t.remove = xpadneo_remove_device,\n+\n+\t/* If report in report_table, this hook is called */\n+\t.raw_event = xpadneo_raw_event,\n+\n+\t.report = xpadneo_report\n+};\n+\n+MODULE_DEVICE_TABLE(hid, xpadneo_devices);\n+\n+\n+\n+/*\n+ * Module Init and Exit\n+ *\n+ * We may replace init and remove by module_hid_driver(xpadneo_driver)\n+ * in future versions, as long as there is nothing special in these two\n+ * functions (but registering and unregistering the driver). Up to now it is\n+ * more useful for us to not \"oversimplify\" the whole driver-registering thing.\n+ *\n+ * Caution: do not use both! (module_hid_driver and hid_(un)register_driver)\n+ */\n+\n+static int __init xpadneo_initModule(void)\n+{\n+\tpr_info(\"%s: hello there!\\n\", xpadneo_driver.name);\n+\n+\treturn hid_register_driver(&xpadneo_driver);\n+}\n+\n+static void __exit xpadneo_exitModule(void)\n+{\n+\thid_unregister_driver(&xpadneo_driver);\n+\n+\tida_destroy(&xpadneo_device_id_allocator);\n+\n+\tpr_info(\"%s: goodbye!\\n\", xpadneo_driver.name);\n+}\n+\n+/*\n+ * Tell the driver system which functions to call at initialization and\n+ * removal of the module\n+ */\n+module_init(xpadneo_initModule);\n+module_exit(xpadneo_exitModule);\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/linux-10-add-compatibility-macro-for-input_event_sec.patch",
    "content": "just define from\nhttps://github.com/torvalds/linux/commit/152194fe9c3f03232b9c0d0264793a7fa4af82f8\n\n--- a/include/uapi/linux/input.h\t2022-08-05 19:02:56.906792582 +0200\n+++ b/include/uapi/linux/input.h\t2022-08-05 19:03:30.788834870 +0200\n@@ -24,6 +24,8 @@\n \n struct input_event {\n \tstruct timeval time;\n+#define input_event_sec time.tv_sec\n+#define input_event_usec time.tv_usec\n \t__u16 type;\n \t__u16 code;\n \t__s32 value;\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/linux-emmc-partitions.patch",
    "content": "--- a/drivers/amlogic/mmc/emmc_partitions.c\t2022-02-04 10:25:30.000000000 +0100\n+++ b/drivers/amlogic/mmc/emmc_partitions.c\t2022-02-09 19:02:04.964174188 +0100\n@@ -1148,12 +1148,10 @@ static int add_emmc_partition(struct gen\n \t\t\tret = add_emmc_each_part(disk, 1+i, offset,\n \t\t\t\t\tsize, 0, pp->name);\n \n-\t\t\tpr_debug(\"[%sp%02d] %20s  offset 0x%012llx, size 0x%012llx %s\\n\",\n+\t\t\tpr_info(\"[%sp%02d] %20s  offset 0x%012llx, size 0x%012llx %s\\n\",\n \t\t\t\t disk->disk_name, 1 + i,\n \t\t\t\t pp->name, offset << 9,\n \t\t\t\t size << 9, IS_ERR(ret) ? \"add fail\" : \"\");\n-\t\t\tif (IS_ERR(ret))\n-\t\t\t\treturn -1;\n \t\t} else {\n \t\t\tpr_info(\"[%s] %s: partition exceeds device capacity:\\n\",\n \t\t\t\t\t__func__, disk->disk_name);\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/linux-temp-02-fo_on_source.patch",
    "content": "diff --git a/drivers/amlogic/media/enhancement/amvecm/amcsc.c b/drivers/amlogic/media/enhancement/amvecm/amcsc.c\nindex ac9a91d9fa8c..6e32156a51d6 100644\n--- a/drivers/amlogic/media/enhancement/amvecm/amcsc.c\n+++ b/drivers/amlogic/media/enhancement/amvecm/amcsc.c\n@@ -3836,8 +3836,7 @@ uint32_t sink_hdr_support(const struct vinfo_s *vinfo)\n \n \t/* when policy == follow sink(0) or force output (2) */\n \t/* use force_output */\n-\tif ((get_force_output() != 0)\n-\t&& (get_hdr_policy() != 1)) {\n+\tif ((get_force_output() != 0)) {\n \t\tswitch (get_force_output()) {\n \t\tcase BT709:\n \t\t\tbreak;\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/linux-uapi-fix_linux-if.h-userspace-compilation-errors.patch",
    "content": "From 2618be7dccf8739b89e1906b64bd8d551af351e6 Mon Sep 17 00:00:00 2001\nFrom: \"Dmitry V. Levin\" <ldv@altlinux.org>\nDate: Mon, 20 Feb 2017 14:58:41 +0300\nSubject: [PATCH] uapi: fix linux/if.h userspace compilation errors\n\nInclude <sys/socket.h> (guarded by ifndef __KERNEL__) to fix\nthe following linux/if.h userspace compilation errors:\n\n/usr/include/linux/if.h:234:19: error: field 'ifru_addr' has incomplete type\n   struct sockaddr ifru_addr;\n/usr/include/linux/if.h:235:19: error: field 'ifru_dstaddr' has incomplete type\n   struct sockaddr ifru_dstaddr;\n/usr/include/linux/if.h:236:19: error: field 'ifru_broadaddr' has incomplete type\n   struct sockaddr ifru_broadaddr;\n/usr/include/linux/if.h:237:19: error: field 'ifru_netmask' has incomplete type\n   struct sockaddr ifru_netmask;\n/usr/include/linux/if.h:238:20: error: field 'ifru_hwaddr' has incomplete type\n   struct  sockaddr ifru_hwaddr;\n\nThis also fixes userspace compilation of the following uapi headers:\n  linux/atmbr2684.h\n  linux/gsmmux.h\n  linux/if_arp.h\n  linux/if_bonding.h\n  linux/if_frad.h\n  linux/if_pppox.h\n  linux/if_tunnel.h\n  linux/netdevice.h\n  linux/route.h\n  linux/wireless.h\n\nAs no uapi header provides a definition of struct sockaddr, inclusion\nof <sys/socket.h> seems to be the most conservative and the only safe\nfix available.\n\nAll current users of <linux/if.h> are very likely to be including\n<sys/socket.h> already because the latter is the sole provider\nof struct sockaddr definition in libc, so adding a uapi header\nwith a definition of struct sockaddr would create a potential\nconflict with <sys/socket.h>.\n\nReplacing struct sockaddr in the definition of struct ifreq with\na different type would create a potential incompatibility with current\nusers of struct ifreq who might rely on ifru_addr et al members being\nof type struct sockaddr.\n\nSigned-off-by: Dmitry V. Levin <ldv@altlinux.org>\nSigned-off-by: David S. Miller <davem@davemloft.net>\n---\n include/uapi/linux/if.h | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/include/uapi/linux/if.h b/include/uapi/linux/if.h\nindex 1158a043342ac6..259617a551f251 100644\n--- a/include/uapi/linux/if.h\n+++ b/include/uapi/linux/if.h\n@@ -24,6 +24,10 @@\n #include <linux/socket.h>\t\t/* for \"struct sockaddr\" et al\t*/\n #include <linux/compiler.h>\t\t/* for \"__user\" et al           */\n \n+#ifndef __KERNEL__\n+#include <sys/socket.h>\t\t\t/* for struct sockaddr.\t\t*/\n+#endif\n+\n #if __UAPI_DEF_IF_IFNAMSIZ\n #define\tIFNAMSIZ\t16\n #endif /* __UAPI_DEF_IF_IFNAMSIZ */\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/linux-z89-emuelec-set-colordepth.patch",
    "content": "From f64e727448cd0d16f69009d4f537eb873e87dfae Mon Sep 17 00:00:00 2001\nFrom: \"Mauro (mdrjr) Ribeiro\" <mauro.ribeiro@hardkernel.com>\nDate: Thu, 22 Nov 2018 13:40:49 +0900\nSubject: [PATCH] osd/fb: set default color format for Linux\n\nChange-Id: I1d95d63215d5567673380740528eff65562bc6df\n---\n drivers/amlogic/media/osd/osd_fb.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/drivers/amlogic/media/osd/osd_fb.c b/drivers/amlogic/media/osd/osd_fb.c\nindex b5d0698f086e..423120459e43 100644\n--- a/drivers/amlogic/media/osd/osd_fb.c\n+++ b/drivers/amlogic/media/osd/osd_fb.c\n@@ -221,11 +221,11 @@ static struct fb_var_screeninfo fb_def_var[] = {\n \t\t.yoffset         = 0,\n \t\t.bits_per_pixel = 32,\n \t\t.grayscale       = 0,\n-\t\t.red             = {0, 0, 0},\n-\t\t.green           = {0, 0, 0},\n-\t\t.blue            = {0, 0, 0},\n-\t\t.transp          = {0, 0, 0},\n-\t\t.nonstd          = 0,\n+\t\t.red             = {16, 8, 0},\n+\t\t.green           = {8, 8, 0},\n+\t\t.blue            = {0, 8, 0},\n+\t\t.transp          = {24, 0, 0},\n+\t\t.nonstd          = 1,\n \t\t.activate        = FB_ACTIVATE_NOW,\n \t\t.height          = -1,\n \t\t.width           = -1,\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/linux-z90-emuelec-gpio-drivers.patch",
    "content": "From d2ca448433c91dedc66fdb1d7dd08090519a1262 Mon Sep 17 00:00:00 2001\nFrom: Dongjin Kim <tobetter@gmail.com>\nDate: Wed, 21 Oct 2020 18:04:44 +0900\nSubject: [PATCH] ODROID-COMMON: add drivers GPIO-based Joystick drivers\n\nSigned-off-by: Dongjin Kim <tobetter@gmail.com>\nChange-Id: I0856df4dec6a05f769b0e325ea8f8200f82b8058\n---\n drivers/input/joystick/gamecon.c |  73 ++++++-\n drivers/parport/Kconfig          |   8 +\n drivers/parport/Makefile         |   3 +-\n drivers/parport/parport_odroid.c | 330 +++++++++++++++++++++++++++++++\n 4 files changed, 412 insertions(+), 2 deletions(-)\n create mode 100644 drivers/parport/parport_odroid.c\n\ndiff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c\nindex eae14d512353a..5bdc48a81a046 100644\n--- a/drivers/input/joystick/gamecon.c\n+++ b/drivers/input/joystick/gamecon.c\n@@ -75,6 +75,7 @@ enum gc_type {\n \tGC_PSX,\n \tGC_DDR,\n \tGC_SNESMOUSE,\n+\tGC_GPIO,\n \tGC_MAX\n };\n \n@@ -107,7 +108,7 @@ static const int gc_status_bit[] = { 0x40, 0x80, 0x20, 0x10, 0x08 };\n static const char *gc_names[] = {\n \tNULL, \"SNES pad\", \"NES pad\", \"NES FourPort\", \"Multisystem joystick\",\n \t\"Multisystem 2-button joystick\", \"N64 controller\", \"PSX controller\",\n-\t\"PSX DDR controller\", \"SNES mouse\"\n+\t\"PSX DDR controller\", \"SNES mouse\", \"GPIO controller\"\n };\n \n /*\n@@ -738,6 +739,65 @@ static void gc_psx_process_packet(struct gc *gc)\n \t}\n }\n \n+/*\n+ * GPIO support\n+ */\n+\n+#define GC_GPIO_BYTES\t\t12\n+\n+static const short gc_gpio_btn[] = {\n+\tBTN_A, BTN_B, BTN_SELECT, BTN_START, BTN_X, BTN_Y, BTN_TL, BTN_TR\n+};\n+\n+static void gc_gpio_read_packet(struct gc *gc,\n+\t\t\t       int data[GC_GPIO_BYTES])\n+{\n+\tint i;\n+\tunsigned char val;\n+\tunsigned char mask;\n+\tunsigned char status_bit[] = {\n+\t\tPARPORT_STATUS_ERROR,\n+\t\tPARPORT_STATUS_SELECT,\n+\t\tPARPORT_STATUS_PAPEROUT,\n+\t\tPARPORT_STATUS_ACK\n+\t};\n+\n+\tval = parport_read_status(gc->pd->port);\n+\tfor (i = 0; i < 4; i++)\n+\t\tdata[i] = (val & status_bit[i]) ? 1 : 0;\n+\n+\tval = parport_read_data(gc->pd->port);\n+\tfor (mask = 1; i < 12; i++, mask <<= 1)\n+\t\tdata[i] = (val & mask) ? 255 : 0;\n+}\n+\n+static void gc_gpio_process_packet(struct gc *gc)\n+{\n+\tstruct gc_pad *pad;\n+\tint i;\n+\n+\tfor (i = 0; i < GC_MAX_DEVICES; i++) {\n+\t\tpad = &gc->pads[i];\n+\t\tif (pad->type == GC_GPIO) {\n+\t\t\tint data[GC_GPIO_BYTES];\n+\t\t\tstruct input_dev *dev = pad->dev;\n+\t\t\tint j;\n+\n+\t\t\tgc_gpio_read_packet(gc, data);\n+\n+\t\t\tinput_report_abs(dev, ABS_X, data[2] - data[3]);\n+\t\t\tinput_report_abs(dev, ABS_Y, data[0] - data[1]);\n+\n+\t\t\tfor (j = 0; j < 8; j++) {\n+\t\t\t\tinput_report_key(dev, gc_gpio_btn[j],\n+\t\t\t\t\t\tdata[4 + j]);\n+\t\t\t}\n+\n+\t\t\tinput_sync(dev);\n+\t\t}\n+\t}\n+}\n+\n /*\n  * gc_timer() initiates reads of console pads data.\n  */\n@@ -777,6 +837,12 @@ static void gc_timer(unsigned long private)\n \tif (gc->pad_count[GC_PSX] || gc->pad_count[GC_DDR])\n \t\tgc_psx_process_packet(gc);\n \n+/*\n+ * GPIO controllers\n+ */\n+\tif (gc->pad_count[GC_GPIO])\n+\t\tgc_gpio_process_packet(gc);\n+\n \tmod_timer(&gc->timer, jiffies + GC_REFRESH_TIME);\n }\n \n@@ -913,6 +979,11 @@ static int gc_setup_pad(struct gc *gc, int idx, int pad_type)\n \t\t\t__set_bit(gc_psx_btn[i], input_dev->keybit);\n \n \t\tbreak;\n+\n+\tcase GC_GPIO:\n+\t\tfor (i = 0; i < 8; i++)\n+\t\t\t__set_bit(gc_gpio_btn[i], input_dev->keybit);\n+\t\tbreak;\n \t}\n \n \terr = input_register_device(pad->dev);\ndiff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig\nindex 44333bd8f9088..95119230419eb 100644\n--- a/drivers/parport/Kconfig\n+++ b/drivers/parport/Kconfig\n@@ -159,6 +159,14 @@ config PARPORT_1284\n \t  transfer modes. Also say Y if you want device ID information to\n \t  appear in /proc/sys/dev/parport/*/autoprobe*. It is safe to say N.\n \n+config PARPORT_ODROID\n+\ttristate \"ODROID builtin port\"\n+\tselect PARPORT_NOT_PC\n+\thelp\n+\t  Say Y here if you need support for the parallel port hardware on\n+\t  ODROID-N2/C4 machines. This code is also available as a module\n+\t  (say M), called parport_odroid. If in doubt, saying N is the safe plan.\n+\n config PARPORT_NOT_PC\n \tbool\n \ndiff --git a/drivers/parport/Makefile b/drivers/parport/Makefile\nindex 696b8d4ca8878..4730c1cacaab6 100644\n--- a/drivers/parport/Makefile\n+++ b/drivers/parport/Makefile\n@@ -18,4 +18,5 @@ obj-$(CONFIG_PARPORT_ATARI)\t+= parport_atari.o\n obj-$(CONFIG_PARPORT_SUNBPP)\t+= parport_sunbpp.o\n obj-$(CONFIG_PARPORT_GSC)\t+= parport_gsc.o\n obj-$(CONFIG_PARPORT_AX88796)\t+= parport_ax88796.o\n-obj-$(CONFIG_PARPORT_IP32)\t+= parport_ip32.o\n\\ No newline at end of file\n+obj-$(CONFIG_PARPORT_IP32)\t+= parport_ip32.o\n+obj-$(CONFIG_PARPORT_ODROID)\t+= parport_odroid.o\ndiff --git a/drivers/parport/parport_odroid.c b/drivers/parport/parport_odroid.c\nnew file mode 100644\nindex 0000000000000..fe0c326e8cab4\n--- /dev/null\n+++ b/drivers/parport/parport_odroid.c\n@@ -0,0 +1,330 @@\n+/* Low-level parallel port routines for ODROID GPIO\n+ *\n+ * Author: Dongjin Kim <tobetter@gmail.com>\n+ *\n+ */\n+\n+#include <linux/module.h>\n+#include <linux/init.h>\n+#include <linux/parport.h>\n+#include <linux/interrupt.h>\n+#include <linux/slab.h>\n+#include <linux/platform_device.h>\n+#include <linux/gpio/consumer.h>\n+\n+#ifdef CONFIG_OF\n+#include <linux/of.h>\n+#include <linux/of_device.h>\n+#include <linux/of_gpio.h>\n+#endif\n+\n+struct parport_odroid_private {\n+\tint nr_data_gpios;\n+\tstruct gpio_desc *data_gpios[8];\n+\tchar *data_label[8];\n+\n+\tint nr_status_gpios;\n+\tstruct gpio_desc *status_gpios[5];\n+\tchar *status_label[8];\n+};\n+\n+static char *status_label[5] = {\n+\t\"error\", \"select\", \"paperout\", \"ack\", \"busy\",\n+};\n+static const unsigned char status_mask[] = {\n+\tPARPORT_STATUS_ERROR,\n+\tPARPORT_STATUS_SELECT,\n+\tPARPORT_STATUS_PAPEROUT,\n+\tPARPORT_STATUS_ACK,\n+\tPARPORT_STATUS_BUSY\n+};\n+\n+static void odroid_write_data(struct parport *p, unsigned char data)\n+{\n+\tint i;\n+\tunsigned char mask = 1;\n+\tstruct parport_odroid_private *priv = p->private_data;\n+\n+\tfor (i = 0; i < priv->nr_data_gpios; i++, mask <<= 1)\n+\t\tgpiod_direction_output(priv->data_gpios[i], !!(data & mask));\n+}\n+\n+static unsigned char odroid_read_data(struct parport *p)\n+{\n+\tint i;\n+\tint val;\n+\tunsigned char mask = 1;\n+\tunsigned char ret = 0;\n+\tstruct parport_odroid_private *priv = p->private_data;\n+\n+\tfor (i = 0; i < priv->nr_data_gpios; i++, mask <<= 1) {\n+\t\tgpiod_direction_input(priv->data_gpios[i]);\n+\t\tval = gpiod_get_value_cansleep(priv->data_gpios[i]);\n+\t\tif (!val)\n+\t\t\tret |= mask;\n+\t}\n+\n+\treturn ret;\n+}\n+\n+static unsigned char control_odroid_to_pc(unsigned char control)\n+{\n+\treturn PARPORT_CONTROL_SELECT |\n+\t      PARPORT_CONTROL_AUTOFD | PARPORT_CONTROL_STROBE;\n+\t/* fake value: interrupt enable, select in, no reset,\n+\tno autolf, no strobe - seems to be closest the wiring diagram */\n+}\n+\n+static void odroid_write_control(struct parport *p, unsigned char control)\n+{\n+\t/* No implementation possible */\n+}\n+\n+static unsigned char odroid_read_control( struct parport *p)\n+{\n+\treturn control_odroid_to_pc(0);\n+}\n+\n+static void odroid_init_state(struct pardevice *dev, struct parport_state *s)\n+{\n+}\n+\n+static void odroid_save_state(struct parport *p, struct parport_state *s)\n+{\n+}\n+\n+static void odroid_restore_state(struct parport *p, struct parport_state *s)\n+{\n+}\n+\n+static unsigned char odroid_frob_control(struct parport *p,\n+\t\tunsigned char mask, unsigned char val)\n+{\n+\treturn 0;\n+}\n+\n+static unsigned char odroid_read_status(struct parport *p)\n+{\n+\tstruct parport_odroid_private *priv = p->private_data;\n+\tunsigned char status = 0;\n+\tint i;\n+\n+\tfor (i = 0; i < priv->nr_status_gpios; i++) {\n+\t\tif (gpiod_get_value_cansleep(priv->status_gpios[i]))\n+\t\t\tstatus |= status_mask[i];\n+\t}\n+\n+\treturn status;\n+}\n+\n+static void odroid_enable_irq(struct parport *p)\n+{\n+}\n+\n+static void odroid_disable_irq(struct parport *p)\n+{\n+}\n+\n+static void odroid_data_forward(struct parport *p)\n+{\n+}\n+\n+static void odroid_data_reverse(struct parport *p)\n+{\n+}\n+\n+static struct parport_operations pp_odroid_ops = {\n+\t.write_data\t= odroid_write_data,\n+\t.read_data\t= odroid_read_data,\n+\n+\t.write_control\t= odroid_write_control,\n+\t.read_control\t= odroid_read_control,\n+\n+\t.init_state\t= odroid_init_state,\n+\t.save_state\t= odroid_save_state,\n+\t.restore_state\t= odroid_restore_state,\n+\n+\t.frob_control\t= odroid_frob_control,\n+\t.read_status\t= odroid_read_status,\n+\n+\t.enable_irq\t= odroid_enable_irq,\n+\t.disable_irq\t= odroid_disable_irq,\n+\n+\t.data_forward\t= odroid_data_forward,\n+\t.data_reverse\t= odroid_data_reverse,\n+\n+\t.epp_write_data\t= parport_ieee1284_epp_write_data,\n+\t.epp_read_data\t= parport_ieee1284_epp_read_data,\n+\t.epp_write_addr\t= parport_ieee1284_epp_write_addr,\n+\t.epp_read_addr\t= parport_ieee1284_epp_read_addr,\n+\n+\t.ecp_write_data\t= parport_ieee1284_ecp_write_data,\n+\t.ecp_read_data\t= parport_ieee1284_ecp_read_data,\n+\t.ecp_write_addr\t= parport_ieee1284_ecp_write_addr,\n+\n+\t.compat_write_data\t= parport_ieee1284_write_compat,\n+\t.nibble_read_data\t= parport_ieee1284_read_nibble,\n+\t.byte_read_data\t\t= parport_ieee1284_read_byte,\n+\n+\t.owner\t\t= THIS_MODULE,\n+};\n+\n+static void odroid_free_datas(struct platform_device *pdev)\n+{\n+\tstruct parport *port = platform_get_drvdata(pdev);\n+\tstruct parport_odroid_private *priv = port->private_data;\n+\tint i;\n+\n+\tfor (i = 0; i < priv->nr_data_gpios; i++) {\n+\t\tif (priv->data_gpios[i])\n+\t\t\tgpiochip_free_own_desc(priv->data_gpios[i]);\n+\t}\n+}\n+\n+static void odroid_free_status(struct platform_device *pdev)\n+{\n+\tstruct parport *port = platform_get_drvdata(pdev);\n+\tstruct parport_odroid_private *priv = port->private_data;\n+\tint i;\n+\n+\tfor (i = 0; i < priv->nr_data_gpios; i++) {\n+\t\tif (priv->status_gpios[i])\n+\t\t\tgpiochip_free_own_desc(priv->status_gpios[i]);\n+\t}\n+}\n+\n+static int odroid_parallel_probe(struct platform_device *pdev)\n+{\n+\tstruct parport *p;\n+\tstruct device_node *np = pdev->dev.of_node;\n+\tstruct parport_odroid_private *priv;\n+\tstruct gpio_desc *desc;\n+\tchar label[64];\n+\tint i;\n+\tint err;\n+\n+\tpriv = kzalloc(sizeof(struct parport_odroid_private), GFP_KERNEL);\n+\tif (!priv) {\n+\t\tprintk(KERN_DEBUG \"parport_odroid: no memory!\\n\");\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\tpriv->nr_data_gpios = of_gpio_named_count(np, \"data-gpios\");\n+\tif (priv->nr_data_gpios != 8) {\n+\t\tdev_err(&pdev->dev, \"parport: invalid data ports\");\n+\t\terr = -EINVAL;\n+\t\tgoto err_desc;\n+\t}\n+\n+\tfor (i = 0; i < priv->nr_data_gpios; i++) {\n+\t\tint gpio = of_get_named_gpio(np, \"data-gpios\", i);\n+\t\tif (gpio < 0) {\n+\t\t\t/* FIXME */\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tdesc = gpio_to_desc(gpio);\n+\n+\t\tsnprintf(label, sizeof(label), \"parport:data%d\", i);\n+\t\tpriv->data_label[i] = kstrdup(label, GFP_KERNEL);\n+\n+\t\tdevm_gpio_request(&pdev->dev, gpio, priv->data_label[i]);\n+\t\tgpiod_direction_input(desc);\n+\t\tgpiod_set_pull(desc, GPIOD_PULL_UP);\n+\n+\t\tpriv->data_gpios[i] = desc;\n+\t};\n+\n+\tpriv->nr_status_gpios = of_gpio_named_count(np, \"status-gpios\");\n+\tif (priv->nr_status_gpios > ARRAY_SIZE(priv->status_gpios))\n+\t\tpriv->nr_status_gpios = ARRAY_SIZE(priv->status_gpios);\n+\n+\tfor (i = 0; i < priv->nr_status_gpios; i++) {\n+\t\tint gpio = of_get_named_gpio(np, \"status-gpios\", i);\n+\n+\t\tif (gpio < 0) {\n+\t\t\terr = -EINVAL;\n+\t\t\tgoto err_gpio_status;\n+\t\t}\n+\n+\t\tdesc = gpio_to_desc(gpio);\n+\n+\t\tsnprintf(label, sizeof(label), \"parport:%s\", status_label[i]);\n+\t\tpriv->status_label[i] = kstrdup(label, GFP_KERNEL);\n+\n+\t\tdevm_gpio_request(&pdev->dev, gpio, priv->status_label[i]);\n+\t\tgpiod_direction_input(desc);\n+\t\tgpiod_set_pull(desc, GPIOD_PULL_UP);\n+\n+\t\tpriv->status_gpios[i] = desc;\n+\t};\n+\n+\tp = parport_register_port(0x308, 0,\n+\t\t\tPARPORT_DMA_NONE, &pp_odroid_ops);\n+\tif (!p) {\n+\t\terr = -EINVAL;\n+\t\tgoto err_register;\n+\t}\n+\n+\tp->private_data = priv;\n+\n+\tparport_announce_port(p);\n+\n+\tplatform_set_drvdata(pdev, p);\n+\n+\treturn 0;\n+\n+err_register:\n+\todroid_free_status(pdev);\n+\n+err_gpio_status:\n+\todroid_free_datas(pdev);\n+\n+err_desc:\n+\tkfree(priv);\n+\treturn err;\n+}\n+\n+static int odroid_parallel_remove(struct platform_device *pdev)\n+{\n+\tstruct parport *port = platform_get_drvdata(pdev);\n+\tstruct parport_odroid_private *priv = port->private_data;\n+\n+\tparport_remove_port(port);\n+\tparport_put_port(port);\n+\todroid_free_status(pdev);\n+\todroid_free_datas(pdev);\n+\tkfree(priv);\n+\n+\treturn 0;\n+}\n+\n+#ifdef CONFIG_OF\n+static const struct of_device_id parport_dt_ids[] = {\n+\t{\n+\t\t.compatible = \"parport,odroid\",\n+\t},\n+\t{},\n+};\n+\n+MODULE_DEVICE_TABLE(of, parport_dt_ids);\n+#endif\n+\n+static struct platform_driver odroid_parallel_driver = {\n+\t.driver   = {\n+\t\t.name\t= \"odroid-parallel\",\n+#ifdef CONFIG_OF\n+\t\t.of_match_table = parport_dt_ids,\n+#endif\n+\t},\n+\t.probe\t= odroid_parallel_probe,\n+\t.remove = odroid_parallel_remove,\n+};\n+\n+module_platform_driver(odroid_parallel_driver);\n+\n+MODULE_AUTHOR(\"Dongjin Kim <tobetter@gmail.com>\");\n+MODULE_DESCRIPTION(\"Parport Driver for ODROID GPIO\");\n+MODULE_SUPPORTED_DEVICE(\"ODROID GPIO Parallel Port\");\n+MODULE_LICENSE(\"GPL\");\n+MODULE_ALIAS(\"platform:odroid-parallel\");\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/linux-z92-emuelec-gpio-dts.patch",
    "content": "From de7d91ba65bc83f797d842a1c44c34f8158b9b19 Mon Sep 17 00:00:00 2001\nFrom: Dongjin Kim <tobetter@gmail.com>\nDate: Fri, 30 Oct 2020 14:05:39 +0900\nSubject: [PATCH] ODROID-COMMON: ARM64/dts: add GPIO-based joystick support\n device tree\n\nSigned-off-by: Dongjin Kim <tobetter@gmail.com>\nChange-Id: I54ebe56b09f5cc66f26718f4486f011fb50dcc0e\n---\n arch/arm64/boot/dts/amlogic/Makefile          |  4 ++\n .../amlogic/g12b_s922x_odroid_n2_joystick.dts | 41 +++++++++++++++++++\n .../g12b_s922x_odroid_n2plus_joystick.dts     | 41 +++++++++++++++++++\n .../amlogic/sm1_s905x3_odroid_c4_joystick.dts | 41 +++++++++++++++++++\n 4 files changed, 127 insertions(+)\n create mode 100644 arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2_joystick.dts\n create mode 100644 arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2plus_joystick.dts\n create mode 100644 arch/arm64/boot/dts/amlogic/sm1_s905x3_odroid_c4_joystick.dts\n\ndiff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile\nindex d006c453ac7ff..2a852a303c355 100644\n--- a/arch/arm64/boot/dts/amlogic/Makefile\n+++ b/arch/arm64/boot/dts/amlogic/Makefile\n@@ -57,6 +57,10 @@ dtb-$(CONFIG_ARM64) += coreelec-gxl/gxl_p241_1g.dtb\n dtb-$(CONFIG_ARM64) += coreelec-gxl/gxl_p241_v2-1g.dtb\n dtb-$(CONFIG_ARM64) += coreelec-gxl/gxl_p241_1g_lafrite.dtb\n \n+dtb-$(CONFIG_ARM64) += g12b_s922x_odroid_n2_joystick.dtb\n+dtb-$(CONFIG_ARM64) += g12b_s922x_odroid_n2plus_joystick.dtb\n+dtb-$(CONFIG_ARM64) += sm1_s905x3_odroid_c4_joystick.dtb\n+dtb-$(CONFIG_ARM64) += g12b_s922x_odroid_n2l_joystick.dtb\n always\t\t:= $(dtb-y)\n subdir-y\t:= $(dts-dirs)\n clean-files\t:= *.dtb\ndiff --git a/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2_joystick.dts b/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2_joystick.dts\nnew file mode 100644\nindex 0000000000000..353ad93776acf\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2_joystick.dts\n@@ -0,0 +1,41 @@\n+#include \"g12b_s922x_odroid_n2plus.dts\"\n+\n+/{\n+\tparport0: parport@0 {\n+\t\tcompatible = \"parport,odroid\";\n+\t\tstatus = \"okay\";\n+\n+\t\tdata-gpios = <&gpio GPIOX_2 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_1 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_8 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_9 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_13 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_16 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_12 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_0 GPIO_ACTIVE_LOW>;\n+\n+\t\tstatus-gpios = <&gpio GPIOA_13 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_3 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_4 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_7 GPIO_ACTIVE_LOW>;\n+\t};\n+\n+\tparport1: parport@1 {\n+\t\tcompatible = \"parport,odroid\";\n+\t\tstatus = \"okay\";\n+\n+\t\tdata-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOA_15 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_6 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOA_14 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOA_4 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOA_12 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_10 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_19 GPIO_ACTIVE_LOW>;\n+\n+\t\tstatus-gpios = <&gpio GPIOX_11 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_14 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_15 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_5 GPIO_ACTIVE_LOW>;\n+\t};\n+};\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2l_joystick.dts\n@@ -0,0 +1,41 @@\n+#include \"g12b_s922x_odroid_n2l.dts\"\n+\n+/{\n+\tparport0: parport@0 {\n+\t\tcompatible = \"parport,odroid\";\n+\t\tstatus = \"okay\";\n+\n+\t\tdata-gpios = <&gpio GPIOX_2 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_1 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_8 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_9 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_13 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_16 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_12 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_0 GPIO_ACTIVE_LOW>;\n+\n+\t\tstatus-gpios = <&gpio GPIOA_13 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_3 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_4 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_7 GPIO_ACTIVE_LOW>;\n+\t};\n+\n+\tparport1: parport@1 {\n+\t\tcompatible = \"parport,odroid\";\n+\t\tstatus = \"okay\";\n+\n+\t\tdata-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOA_15 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_6 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOA_14 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOA_4 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOA_12 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_10 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_19 GPIO_ACTIVE_LOW>;\n+\n+\t\tstatus-gpios = <&gpio GPIOX_11 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_14 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_15 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_5 GPIO_ACTIVE_LOW>;\n+\t};\n+};\ndiff --git a/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2plus_joystick.dts b/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2plus_joystick.dts\nnew file mode 100644\nindex 0000000000000..353ad93776acf\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2plus_joystick.dts\n@@ -0,0 +1,41 @@\n+#include \"g12b_s922x_odroid_n2plus.dts\"\n+\n+/{\n+\tparport0: parport@0 {\n+\t\tcompatible = \"parport,odroid\";\n+\t\tstatus = \"okay\";\n+\n+\t\tdata-gpios = <&gpio GPIOX_2 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_1 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_8 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_9 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_13 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_16 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_12 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_0 GPIO_ACTIVE_LOW>;\n+\n+\t\tstatus-gpios = <&gpio GPIOA_13 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_3 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_4 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_7 GPIO_ACTIVE_LOW>;\n+\t};\n+\n+\tparport1: parport@1 {\n+\t\tcompatible = \"parport,odroid\";\n+\t\tstatus = \"okay\";\n+\n+\t\tdata-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOA_15 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_6 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOA_14 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOA_4 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOA_12 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_10 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_19 GPIO_ACTIVE_LOW>;\n+\n+\t\tstatus-gpios = <&gpio GPIOX_11 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_14 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_15 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_5 GPIO_ACTIVE_LOW>;\n+\t};\n+};\ndiff --git a/arch/arm64/boot/dts/amlogic/sm1_s905x3_odroid_c4_joystick.dts b/arch/arm64/boot/dts/amlogic/sm1_s905x3_odroid_c4_joystick.dts\nnew file mode 100644\nindex 0000000000000..6246ea3111656\n--- /dev/null\n+++ b/arch/arm64/boot/dts/amlogic/sm1_s905x3_odroid_c4_joystick.dts\n@@ -0,0 +1,41 @@\n+#include \"sm1_s905x3_odroid_c4.dts\"\n+\n+/{\n+\tparport0: parport@0 {\n+\t\tcompatible = \"parport,odroid\";\n+\t\tstatus = \"okay\";\n+\n+\t\tdata-gpios = <&gpio GPIOX_2 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_1 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_8 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_9 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_13 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_16 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_12 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_0 GPIO_ACTIVE_LOW>;\n+\n+\t\tstatus-gpios = <&gpio GPIOX_5 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_3 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_4 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_7 GPIO_ACTIVE_LOW>;\n+\t};\n+\n+\tparport1: parport@1 {\n+\t\tcompatible = \"parport,odroid\";\n+\t\tstatus = \"okay\";\n+\n+\t\tdata-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOA_15 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_19 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOA_14 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOH_6 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOH_7 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_10 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOH_5 GPIO_ACTIVE_LOW>;\n+\n+\t\tstatus-gpios = <&gpio GPIOX_11 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_14 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_15 GPIO_ACTIVE_LOW>,\n+\t\t\t<&gpio GPIOX_6 GPIO_ACTIVE_LOW>;\n+\t};\n+};\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/linux-z93-emuelec-refresh-rate-fix-1024x768p60hz.patch",
    "content": "From eb2e483ab16c0399071aa3114a99bd803dc101d4 Mon Sep 17 00:00:00 2001\nFrom: Dongjin Kim <tobetter@gmail.com>\nDate: Sat, 9 Jan 2021 18:59:03 +0900\nSubject: [PATCH] media/hdmitx: improve 1024x768p60hz support\n\nThis patch will fix the issue of distrosed picture at 60.xHz with\ncertain display hardwares.\n\nSigned-off-by: Dongjin Kim <tobetter@gmail.com>\n---\n .../vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c    | 16 +++++\n .../media/vout/hdmitx/hdmi_tx_20/hw/hw_clk.c  |  2 +-\n .../media/vout/hdmitx/hdmi_tx_20/hw/hw_g12a.c | 68 ++++++++++++++++++-\n 3 files changed, 84 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c\nindex beae6aea4c9b..4c34abcca8b9 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c\n@@ -1705,6 +1705,22 @@ static void hdmi_tvenc_set(struct hdmitx_vidpara *param)\n \t\tSOF_LINES = 28;\n \t\tTOTAL_FRAMES = 4;\n \t\tbreak;\n+\tcase HDMIV_1024x768p60hz:\n+\t\tINTERLACE_MODE = 0;\n+\t\tPIXEL_REPEAT_VENC = 0;\n+\t\tPIXEL_REPEAT_HDMI = 0;\n+\t\tACTIVE_PIXELS = (1024*(1+PIXEL_REPEAT_HDMI));\n+\t\tACTIVE_LINES = (768/(1+INTERLACE_MODE));\n+\t\tLINES_F0 = 806;\n+\t\tLINES_F1 = 806;\n+\t\tFRONT_PORCH = 24;\n+\t\tHSYNC_PIXELS = 136;\n+\t\tBACK_PORCH = 160;\n+\t\tEOF_LINES = 3;\n+\t\tVSYNC_LINES = 6;\n+\t\tSOF_LINES = 29;\n+\t\tTOTAL_FRAMES = 4;\n+\t\tbreak;\n \tdefault:\n \t\tbreak;\n \t}\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hw_g12a.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hw_g12a.c\nindex e46b964491b8..9b24cc61f3f9 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hw_g12a.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hw_g12a.c\n@@ -192,6 +192,29 @@ static void set_hpll_hclk_dongle_5940m(void)\n \tpr_info(\"HPLL: 0x%x\\n\", hd_read_reg(P_HHI_HDMI_PLL_CNTL0));\n }\n \n+#define XTAL_FREQ               24000\n+#define HDMI_FRAC_MAX_G12A      131072\n+\n+static unsigned int get_g12a_pll_get_frac(unsigned int m, unsigned int pll_freq)\n+{\n+\tunsigned int parent_freq = XTAL_FREQ;\n+\tunsigned int frac_max = HDMI_FRAC_MAX_G12A;\n+\tunsigned int frac_m;\n+\tunsigned int frac;\n+\n+\tif (pll_freq / m == parent_freq &&\n+\t\t\tpll_freq % m == 0)\n+\t\treturn 0;\n+\n+\tfrac = div_u64((u64)pll_freq * (u64)frac_max, parent_freq);\n+\tfrac_m = m * frac_max;\n+\tif (frac_m > frac)\n+\t\treturn frac_max;\n+\tfrac -= frac_m;\n+\n+\treturn min((u16)frac, (u16)(frac_max - 1));\n+}\n+\n void set_g12a_hpll_clk_out(unsigned int frac_rate, unsigned int clk)\n {\n \tstruct hdmitx_dev *hdev = get_hdmitx_device();\n@@ -366,7 +389,50 @@ void set_g12a_hpll_clk_out(unsigned int frac_rate, unsigned int clk)\n \t\tpr_info(\"HPLL: 0x%x\\n\", hd_read_reg(P_HHI_HDMI_PLL_CNTL0));\n \t\tbreak;\n \tdefault:\n-\t\tpr_info(\"error hpll clk: %d\\n\", clk);\n+\t\t{\n+\t\t\tunsigned int m, m1, m2;\n+\t\t\tunsigned int ret;\n+\t\t\tunsigned int frac;\n+\n+\t\t\t/* calculate m */\n+\t\t\tm = clk / XTAL_FREQ;\n+\t\t\tm &= 0xff;\n+\t\t\thd_write_reg(P_HHI_HDMI_PLL_CNTL0, (m | 0x3b000400));\n+\t\t\tpr_info(\"m1 0x%x, m2 0x%x, m 0x%x\\n\", m1, m2, m);\n+\n+\t\t\t/* calculate frac */\n+\t\t\tfrac = get_g12a_pll_get_frac(m, clk);\n+\t\t\tpr_info(\"m 0x%x, frac 0x%x\\n\", m, frac);\n+\t\t\thd_write_reg(P_HHI_HDMI_PLL_CNTL1, frac);\n+\t\t\thd_write_reg(P_HHI_HDMI_PLL_CNTL2, 0x00000000);\n+\n+\t\t\tif (m >= 0xf7) {\n+\t\t\t\tif (frac < 0x10000) {\n+\t\t\t\t\thd_write_reg(P_HHI_HDMI_PLL_CNTL3, 0x6a685c00);\n+\t\t\t\t\thd_write_reg(P_HHI_HDMI_PLL_CNTL4, 0x11551293);\n+\t\t\t\t} else {\n+\t\t\t\t\thd_write_reg(P_HHI_HDMI_PLL_CNTL3, 0xea68dc00);\n+\t\t\t\t\thd_write_reg(P_HHI_HDMI_PLL_CNTL4, 0x65771290);\n+\t\t\t\t}\n+\t\t\t\thd_write_reg(P_HHI_HDMI_PLL_CNTL5, 0x39270000);\n+\t\t\t\thd_write_reg(P_HHI_HDMI_PLL_CNTL6, 0x55540000);\n+\t\t\t} else {\n+\t\t\t\thd_write_reg(P_HHI_HDMI_PLL_CNTL3, 0x0a691c00);\n+\t\t\t\thd_write_reg(P_HHI_HDMI_PLL_CNTL4, 0x33771290);\n+\t\t\t\thd_write_reg(P_HHI_HDMI_PLL_CNTL5, 0x39270000);\n+\t\t\t\thd_write_reg(P_HHI_HDMI_PLL_CNTL6, 0x50540000);\n+\t\t\t}\n+\n+\t\t\thd_set_reg_bits(P_HHI_HDMI_PLL_CNTL0, 0x0, 29, 1);\n+\t\t\tWAIT_FOR_PLL_LOCKED(P_HHI_HDMI_PLL_CNTL0);\n+\t\t\tpr_info(\"HPLL: 0x%x\\n\", hd_read_reg(P_HHI_HDMI_PLL_CNTL0));\n+\n+\t\t\tret = (((hd_read_reg(P_HHI_HDMI_PLL_CNTL0) >> 30) & 0x3) == 0x3);\n+\t\t\tif (ret)\n+\t\t\t\tpr_info(\"[%s] HPLL set OK!\\n\", __func__);\n+\t\t\telse\n+\t\t\t\tpr_info(\"[%s] Error! Check HPLL track!\\n\", __func__);\n+\t\t}\n \t\tbreak;\n \t}\n }\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/linux-z99-emuelec-bluetoothfix_mediatek.patch",
    "content": "--- a/drivers/bluetooth/btusb.c\n+++ b/drivers/bluetooth/btusb.c\n@@ -64,6 +64,7 @@\n #define BTUSB_BCM2045\t\t0x40000\n #define BTUSB_IFNUM_2\t\t0x80000\n #define BTUSB_CW6622\t\t0x100000\n+#define BTUSB_MEDIATEK\t\t0x200000\n \n static const struct usb_device_id btusb_table[] = {\n \t/* Generic Bluetooth USB device */\n@@ -80,7 +81,7 @@\n \t  .driver_info = BTUSB_BCM_APPLE | BTUSB_IFNUM_2 },\n \n \t/* MediaTek MT76x0E */\n-\t{ USB_DEVICE(0x0e8d, 0x763f) },\n+\t{ USB_DEVICE(0x0e8d, 0x763f), .driver_info = BTUSB_MEDIATEK },\n \n \t/* Broadcom SoftSailing reporting vendor specific */\n \t{ USB_DEVICE(0x0a5c, 0x21e1) },\n@@ -2917,6 +2918,10 @@\n \t\tset_bit(HCI_QUIRK_FIXUP_INQUIRY_MODE, &hdev->quirks);\n \t\tset_bit(HCI_QUIRK_BROKEN_LOCAL_COMMANDS, &hdev->quirks);\n \t}\n+    \n+    if (id->driver_info & BTUSB_MEDIATEK) { \n+\t\tset_bit(HCI_QUIRK_BROKEN_LOCAL_COMMANDS, &hdev->quirks);\n+\t}\n \n \tif (id->driver_info & BTUSB_INTEL_BOOT) {\n \t\thdev->manufacturer = 2;\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng/patches/linux/linux-z99-emuelec-gpio-fix1.patch",
    "content": "From 0ee3dd16e9a84a6b1a99cfc1ba68c8e7dc7545d9 Mon Sep 17 00:00:00 2001\nFrom: Dongjin Kim <tobetter@gmail.com>\nDate: Tue, 10 Nov 2020 03:13:06 +0900\nSubject: [PATCH] ODROID-N2: arm64/dts: fix pinctrl conflict of GPIOA_13 for\n SPDIF\n\nSigned-off-by: Dongjin Kim <tobetter@gmail.com>\n---\n .../boot/dts/amlogic/g12b_s922x_odroid_n2_joystick.dts   | 9 +++++++++\n .../dts/amlogic/g12b_s922x_odroid_n2plus_joystick.dts    | 9 +++++++++\n 2 files changed, 18 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2_joystick.dts b/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2_joystick.dts\nindex 353ad93776acf..9c46f148b11c6 100644\n--- a/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2_joystick.dts\n+++ b/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2_joystick.dts\n@@ -39,3 +39,12 @@\n \t\t\t<&gpio GPIOX_5 GPIO_ACTIVE_LOW>;\n \t};\n };\n+\n+&pinctrl_periphs {\n+\tspdifout: spdifout {\n+\t\tmux {/* GPIOA_11 */\n+\t\t\tgroups = \"spdif_out_a11\";\n+\t\t\tfunction = \"spdif_out\";\n+\t\t};\n+\t};\n+};\ndiff --git a/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2plus_joystick.dts b/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2plus_joystick.dts\nindex 353ad93776acf..9c46f148b11c6 100644\n--- a/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2plus_joystick.dts\n+++ b/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2plus_joystick.dts\n@@ -39,3 +39,12 @@\n \t\t\t<&gpio GPIOX_5 GPIO_ACTIVE_LOW>;\n \t};\n };\n+\n+&pinctrl_periphs {\n+\tspdifout: spdifout {\n+\t\tmux {/* GPIOA_11 */\n+\t\t\tgroups = \"spdif_out_a11\";\n+\t\t\tfunction = \"spdif_out\";\n+\t\t};\n+\t};\n+};\ndiff --git a/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2l_joystick.dts b/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2l_joystick.dts\nindex 353ad93776acf..9c46f148b11c6 100644\n--- a/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2l_joystick.dts\n+++ b/arch/arm64/boot/dts/amlogic/g12b_s922x_odroid_n2l_joystick.dts\n@@ -39,3 +39,12 @@\n \t\t\t<&gpio GPIOX_5 GPIO_ACTIVE_LOW>;\n \t};\n };\n+\n+&pinctrl_periphs {\n+\tspdifout: spdifout {\n+\t\tmux {/* GPIOA_11 */\n+\t\t\tgroups = \"spdif_out_a11\";\n+\t\t\tfunction = \"spdif_out\";\n+\t\t};\n+\t};\n+};\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/bootloader/canupdate.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.tv)\n\n# detect legacy kernel installs and abort to prevent upgrades\nif [[ \"$(uname -r)\" = \"3.14.\"* ]]; then\n  echo \"Update from 3.14 is not supported!\"\n  sleep 10\n  exit 1\nfi\n\nDEVICE_OLD=$(echo \"${1}\" | cut -d. -f1)\nDEVICE_NEW=$(echo \"${2}\" | cut -d. -f1)\n\n# allow upgrades between aarch64 and arm images on same device\nif [ \"${DEVICE_OLD}\" = \"${DEVICE_NEW}\" ]; then\n  exit 0\nelse\n  exit 1\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/bootloader/config.ini",
    "content": "#------------------------------------------------------------------------------------------------------\n#\n# config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# Console Setup\n#\n# consoleopt='console=ttyS0,115200 console=tty0 no_console_suspend'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# CPU Frequency Control\n#\n# WARNING!!! WARNING!!! WARNING!!!\n#   Before changing anything here please read the wiki entry at:\n#   https://wiki.odroid.com/odroid-n2/application_note/software/set_cpu_freq\n#\n# max_freq_a73='1800'\n# max_freq_a53='1896'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# HDMI CEC Control\n#   Set by CoreELEC Settings\n#\n# cec_func_config='7f'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# HDMI CEC OSD Name\n#   Set by CoreELEC Settings\n#\n# cec_osd_name='CoreELEC'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# IR setup\n#   Setup a custom keycode to wake the N2/C4 from suspend or poweroff\n#   You can stop kodi and eventlircd and use \"ir-keytable -u\" to obtain a compatible u-boot\n#   IR keycode\n#   This setting will require a injected bl301 blob.\n#\n# remotewakeup='0x31ce4db2'\n#\n#   decode_type can be one of the following:\n#   NEC='0x0', DUOKAN='0x1', TOSHIBA='0x2', RCA='0x3', RC5='0x4', RC6A='0x5', NEC_TOSHIBA_2IN1='0x6',\n#   NEC_RCA_2IN1='0x7', RCMM='0x8', NEC_RC5_2IN1='0x9', NEC_RC5_2IN1='0xa', RC6='0xb'\n#   This setting will require a injected bl301 blob.\n#\n# decode_type='0x0' # NEC\n#\n#   remote power key mask:\n#   Some IR protocols implement a toggle bit, this can be ignored by the \"and\" mask:\n#   RC5='0x37ff', RC6='0x1effff', RC6A='0xffff7fff'\n#   This setting will require a injected bl301 blob.\n#\n# remotewakeupmask='0xffffffff'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# WOL Setting, 0=off/1=on\n#   Set by CoreELEC Settings\n#\n# wol=1\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# Power Off and Wake Up using GPIO Key Button\n#   Valid options for Odroid N2/C4 are 476,477,478,479,480,481,483,484,485,486,487,488,489,490,491,492\n#   Valid option for Khadas VIM3 is 503\n#\n# gpiopower=476 # (pin 16 of J2 header)\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# USB specific options\n#\n# usbopts='usb-xhci.tablesize=2'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# USB Power Control\n#   Set by CoreELEC Settings\n#\n# usbpower=0\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# HDMI custom mode\n#   You can use this setting to set a custom video mode\n#   modeline \"horpixels,verpixels,pixel_clock,hor_freq,ver_freq,hdisp,hsyncstart,hsyncend,htotal,vdisp,\n#             vsyncstart,vsyncend,vtotal,hsync_polarity,vsync_polarity,progress_mode\"\n#\n#   Example for 1920x1080p@60hz\n# modeline='1920,1080,148500,67500,60,1920,2008,2052,2200,1080,1084,1088,1125,1,1,1'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# VOUT mode\n#   You can use this setting to set a specific video mode at boot.\n#\n# vout='1080p60hz'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# Fractional Refresh Rate\n#   You can use this setting to set a fractional refresh rate. So for example if vout mode it set to\n#   1080p60hz then setting this to 1 will make the refresh rate switch to 59.97hz instead of the modes\n#   default of 60hz. In this example setting it to 0 will keep the modes default of 60hz.\n#\n# frac_rate_policy='0'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# Busybox console keyboard layout\n#   Set by CoreELEC Settings\n#\n# keymap='uk'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# CoreELEC Developer Options\n#   Valid options are: textmode debugging progress nofsck nosplash noram overlay quiet ssh\n#\n# coreelec='quiet'\n#\n#------------------------------------------------------------------------------------------------------\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/bootloader/dtb.conf",
    "content": "<dtb>\n  <multidtb name=\"g12b_s922x_ugoos_am6.dtb\" subdevice=\"\">\n    <file>g12b_s922x_ugoos_am6_rev_a_2g.dtb</file>\n    <file>g12b_s922x_ugoos_am6_rev_a_4g.dtb</file>\n    <file>g12b_s922x_ugoos_am6_2g.dtb</file>\n    <file>g12b_s922x_ugoos_am6_4g.dtb</file>\n  </multidtb>\n  <multidtb name=\"g12b_s922x_ugoos_am6b.dtb\" subdevice=\"\">\n    <file>g12b_s922x_ugoos_am6b_rev_a_2g.dtb</file>\n    <file>g12b_s922x_ugoos_am6b_rev_a_4g.dtb</file>\n    <file>g12b_s922x_ugoos_am6b_2g.dtb</file>\n    <file>g12b_s922x_ugoos_am6b_4g.dtb</file>\n  </multidtb>\n</dtb>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/bootloader/dtb.xml",
    "content": "<?xml version=\"1.0\"?>\n<dtb-settings version=\"0\">\n\n  <sys_led status=\"on\" version=\"0\">\n    <sys_led_on name=\"on\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>default-on</value>\n      </cmd>\n    </sys_led_on>\n    <sys_led_heartbeat name=\"heartbeat\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>heartbeat</value>\n      </cmd>\n    </sys_led_heartbeat>\n    <sys_led_rc_feedback name=\"rc feedback\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>rc-feedback</value>\n      </cmd>\n    </sys_led_rc_feedback>\n    <sys_led_sd name=\"sd\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>sd</value>\n      </cmd>\n    </sys_led_sd>\n    <sys_led_emmc name=\"emmc\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>emmc</value>\n      </cmd>\n    </sys_led_emmc>\n    <sys_led_off name=\"off\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>none</value>\n      </cmd>\n    </sys_led_off>\n  </sys_led>\n\n  <red_led status=\"off\" version=\"0\">\n    <red_led_on name=\"on\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>default-on</value>\n      </cmd>\n    </red_led_on>\n    <red_led_heartbeat name=\"heartbeat\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>heartbeat</value>\n      </cmd>\n    </red_led_heartbeat>\n    <red_led_rc_feedback name=\"rc feedback\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>rc-feedback</value>\n      </cmd>\n    </red_led_rc_feedback>\n    <red_led_sd name=\"sd\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>sd</value>\n      </cmd>\n    </red_led_sd>\n    <red_led_emmc name=\"emmc\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>emmc</value>\n      </cmd>\n    </red_led_emmc>\n    <red_led_off name=\"off\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>none</value>\n      </cmd>\n    </red_led_off>\n  </red_led>\n\n  <green_led status=\"off\" version=\"0\">\n    <green_led_on name=\"on\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>default-on</value>\n      </cmd>\n    </green_led_on>\n    <green_led_heartbeat name=\"heartbeat\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>heartbeat</value>\n      </cmd>\n    </green_led_heartbeat>\n    <green_led_rc_feedback name=\"rc feedback\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>rc-feedback</value>\n      </cmd>\n    </green_led_rc_feedback>\n    <green_led_sd name=\"sd\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>sd</value>\n      </cmd>\n    </green_led_sd>\n    <green_led_emmc name=\"emmc\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>emmc</value>\n      </cmd>\n    </green_led_emmc>\n    <green_led_off name=\"off\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>none</value>\n      </cmd>\n    </green_led_off>\n  </green_led>\n\n  <remote_type status=\"NEC\" version=\"0\">\n    <remote_type_nec name=\"NEC\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>1</value>\n      </cmd>\n    </remote_type_nec>\n    <remote_type_legacy_nec name=\"LEGACY NEC\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>255</value>\n      </cmd>\n    </remote_type_legacy_nec>\n    <remote_type_duokan name=\"DUOKAN\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>2</value>\n      </cmd>\n    </remote_type_duokan>\n    <remote_type_xmp_1 name=\"XMP_1\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>3</value>\n      </cmd>\n    </remote_type_xmp_1>\n    <remote_type_rc5 name=\"RC5\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>4</value>\n      </cmd>\n    </remote_type_rc5>\n    <remote_type_rc6 name=\"RC6\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>5</value>\n      </cmd>\n    </remote_type_rc6>\n    <remote_type_toshiba name=\"TOSHIBA\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>6</value>\n      </cmd>\n    </remote_type_toshiba>\n    <remote_type_rca name=\"RCA\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>8</value>\n      </cmd>\n    </remote_type_rca>\n  </remote_type>\n\n  <emmc status=\"HS200\" version=\"0\">\n    <high_speed name=\"HS200,HS400\">\n      <cmd path=\"/emmc/emmc caps2\" type=\"s\" >\n        <value>MMC_CAP2_HS200</value>\n        <value>MMC_CAP2_HS400</value>\n      </cmd>\n    </high_speed>\n    <normal_speed name=\"HS200\">\n      <cmd path=\"/emmc/emmc caps2\" type=\"s\" >\n        <value>MMC_CAP2_HS200</value>\n      </cmd>\n    </normal_speed>\n  </emmc>\n\n  <slowsdio status=\"normal\" version=\"0\">\n    <slow_sdio name=\"slow\">\n      <cmd path=\"/sdio/sdio f_max\" type=\"u\" >\n        <value>170000000</value>\n      </cmd>\n    </slow_sdio>\n    <normal_sdio name=\"normal\">\n      <cmd path=\"/sdio/sdio f_max\" type=\"u\" >\n        <value>200000000</value>\n      </cmd>\n    </normal_sdio>\n  </slowsdio>\n\n</dtb-settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/bootloader/mkbootimg",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nDTBIMG_PATH=\"arch/$TARGET_KERNEL_ARCH/boot\"\nDTB_PATH=\"${DTBIMG_PATH}/dts/amlogic\"\nANDROID_BOOTIMG_SECOND=\"\"\n\nSUBDEVICES+=\" Generic\"\nfor device in $SUBDEVICES; do\n  DTB_BLOBS_PATH=${DTB_PATH}/${device}\n  mkdir -p ${DTB_BLOBS_PATH}\n  if [ \"$device\" = \"Generic\" ]; then\n    for dtblob in $KERNEL_UBOOT_EXTRA_TARGET; do\n      cp ${DTB_PATH}/$dtblob ${DTB_BLOBS_PATH} 2>/dev/null || :\n    done\n  else\n    MULTIDTB_BLOB=\"\"\n    find_file_path bootloader/dtb.conf\n    MULTIDTB_CONF=\"${FOUND_PATH}\"\n    if [ -f ${MULTIDTB_CONF} ]; then\n      multidtb_cnt=$(xmlstarlet sel -t -c \"count(//dtb/multidtb)\" ${MULTIDTB_CONF})\n      cnt_m=1\n      while [ $cnt_m -le $multidtb_cnt ]; do\n        multidtb=$(xmlstarlet sel -t -v \"//dtb/multidtb[$cnt_m]/@name\" ${MULTIDTB_CONF}) || :\n        subdevice=$(xmlstarlet sel -t -v \"//dtb/multidtb[$cnt_m]/@subdevice\" ${MULTIDTB_CONF}) || :\n        if [ \"$device\" = \"$subdevice\" ]; then\n          echo \"Device tree multidtb subdevice: ${device}, ${multidtb%%.*}.dtb\"\n          MULTIDTB_BLOB=\"${multidtb%%.*}.dtb\"\n          break\n        fi\n        cnt_m=$((cnt_m+1))\n      done\n    fi\n    if [ -n \"${MULTIDTB_BLOB}\" ]; then\n      cp ${DTB_PATH}/${MULTIDTB_BLOB} ${DTB_BLOBS_PATH}/${device}_dtb.dtb 2>/dev/null || :\n    else\n      cp ${DTB_PATH}/*${device,,}.dtb ${DTB_BLOBS_PATH} 2>/dev/null || :\n    fi\n  fi\n  DTB_BLOBS=($(ls ${DTB_BLOBS_PATH}/*.dtb 2>/dev/null || true))\n  DTB_BLOBS_COUNT=${#DTB_BLOBS[@]}\n  DTB_BLOB_OUTPUT=${DTBIMG_PATH}/${device}_dtb.img\n  if [ \"$DTB_BLOBS_COUNT\" -gt 1 ]; then\n    $TOOLCHAIN/bin/dtbTool -c -o ${DTB_BLOB_OUTPUT} -p scripts/dtc/ ${DTB_BLOBS_PATH}\n  elif [ \"$DTB_BLOBS_COUNT\" -eq 1 ]; then\n    cp -PR $DTB_BLOBS $DTB_BLOB_OUTPUT\n  fi\ndone\n\nif [ -f ${DTBIMG_PATH}/Generic_dtb.img ]; then\n  ANDROID_BOOTIMG_SECOND=\"--second ${DTBIMG_PATH}/Generic_dtb.img\"\nfi\n\nLDFLAGS=\"\" mkbootimg --kernel arch/$TARGET_KERNEL_ARCH/boot/$KERNEL_TARGET --ramdisk $BUILD/image/initramfs.cpio \\\n  $ANDROID_BOOTIMG_SECOND $ANDROID_BOOTIMG_OPTIONS --output arch/$TARGET_KERNEL_ARCH/boot/boot.img\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/bootloader/mkimage",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\n# copy amlogic autoscript files to part1 if needed\nfor f in $RELEASE_DIR/3rdparty/bootloader/*autoscript; do\n  [ -e \"$f\" ] && mcopy \"$f\" ::\ndone\n\nif [ -f $RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_cfgload ]; then\n  mcopy -s $RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_cfgload \"::/cfgload\"\nfi\n\n# copy device trees to part1\nfor dtb in $RELEASE_DIR/3rdparty/bootloader/device_trees $RELEASE_DIR/3rdparty/bootloader/*.dtb $RELEASE_DIR/3rdparty/bootloader/dtb.img ; do\n  [ -e \"$dtb\" ] && mcopy -s \"$dtb\" ::\ndone\n\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/config.ini\" ]; then\n  mcopy $RELEASE_DIR/3rdparty/bootloader/config.ini ::\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/bootloader/release",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nmkdir -p $RELEASE_DIR/3rdparty/bootloader\n  cp -a $INSTALL/usr/share/bootloader/* $RELEASE_DIR/3rdparty/bootloader\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/bootloader/scripts/Generic_cfgload.src",
    "content": "echo \"Using device ${device}, number ${devnr}, partition ${partnr}, CoreELEC on eMMC: ${ce_on_emmc}\"\n\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\nsetenv native_4k_gui \"0\"\n\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=LABEL=COREELEC disk=LABEL=STORAGE\"\nif test \"${ce_on_emmc}\" = \"yes\"; then setenv rootopt \"BOOT_IMAGE=kernel.img boot=LABEL=CE_FLASH disk=FOLDER=/dev/CE_STORAGE\"; fi\n\nif fatload ${device} ${devnr}:${partnr} ${loadaddr} resolution.ini; then env import -t ${loadaddr} ${filesize}; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif fatload ${device} ${devnr}:${partnr} ${loadaddr} config.ini; then env import -t ${loadaddr} ${filesize}; fi\n\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a73}\" != \"\"; then setenv max_freq_a73 \"max_freq_a73=${max_freq_a73}\"; fi\nif test \"${modeline}\" != \"\"; then setenv cmode \"modeline=${modeline}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\nif test \"${keymap}\" != \"\"; then setenv consoleopt \"${consoleopt} keymap=${keymap}\"; fi\nif test \"${loadaddr_kernel}\" != \"\"; then setenv loadaddr \"${loadaddr_kernel}\"; fi\nsetenv displayopt \"vout=${vout},en logo=osd0,loaded,${fb_addr} frac_rate_policy=${frac_rate_policy} native_4k_gui=${native_4k_gui} hdmitx=${hdmitx} hdr_policy=1\"\nsetenv initargs \"${rootopt} ${consoleopt} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${gpiopower} ${usbopts} ${cmode}\"\nsetenv bootargs \"${bootargs} ${initargs} ${displayopt} ${coreelec}\"\n\nfatload ${device} ${devnr}:${partnr} ${loadaddr} kernel.img\nfatload ${device} ${devnr}:${partnr} ${dtb_mem_addr} dtb.img\n\nbootm ${loadaddr}\nbootm start\nbootm loados\nbootm prep\nbootm go\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/bootloader/scripts/aml_autoscript.src",
    "content": "defenv\nsetenv bootfromnand 0\nsetenv upgrade_step 2\nsetenv ce_on_emmc \"no\"\nsetenv sddtb 'if fatload mmc 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi'\nsetenv usbdtb 'if fatload usb 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi'\nsetenv cfgloadsd 'if fatload mmc 0:1 ${loadaddr} cfgload; then setenv device mmc; setenv devnr 0; setenv partnr 1; autoscr ${loadaddr}; fi'\nsetenv cfgloadusb 'if fatload usb 0:1 ${loadaddr} cfgload; then setenv device usb; setenv devnr 0; setenv partnr 1; autoscr ${loadaddr}; fi'\nsetenv cfgloademmc 'for p in 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18; do if fatload mmc 1:${p} ${loadaddr} cfgload; then setenv device mmc; setenv devnr 1; setenv partnr ${p}; setenv ce_on_emmc \"yes\"; autoscr ${loadaddr}; fi; done;'\nsetenv bootfromsd 'if mmcinfo; then run cfgloadsd; if fatload mmc 0 ${loadaddr} kernel.img; then run sddtb; setenv bootargs ${bootargs} bootfromsd; bootm; fi; fi'\nsetenv bootfromusb 'usb start 0; run cfgloadusb; if fatload usb 0 ${loadaddr} kernel.img; then run usbdtb; setenv bootargs ${bootargs} bootfromusb; bootm; fi'\nsetenv bootfromemmc 'run cfgloademmc'\nsetenv bootcmd 'if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; else run bootfromsd; run bootfromusb; run bootfromemmc; fi; run storeboot'\n\nsaveenv\nrun storeargs\nrun bootfromsd\nrun bootfromusb\nrun bootfromemmc\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/bootloader/update.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\n# use chroot because of running xmlstarlet and other binaries build with newer glibc\nif [ \"${SYSTEM_ROOT}\" = \"/update\" ]; then\n  # run from init\n  # unset SYSTEM_ROOT because we are chroot-ing and /update become new / anyway\n  unset SYSTEM_ROOT\n\n  # mount some folders from old root\n  mount -o bind /tmp /update/var\n\n  for folder in proc sys dev tmp run flash storage; do\n    [ -d /${folder} ] && mount -o bind /${folder} /update/${folder}\n  done\n\n  /usr/bin/busybox chroot /update /usr/share/bootloader/update.sh\n\n  # umount folders\n  for folder in proc sys dev tmp run flash storage; do\n    [ -d /${folder} ] && umount /update/${folder}\n  done\n\n  umount /update/var\n\n  # set it back just in case\n  SYSTEM_ROOT=\"/update\"\n  exit 0\nfi\n\n# change to writable folder\ncd /tmp\n\n[ -z \"$BOOT_ROOT\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"$BOOT_PART\" ] && BOOT_PART=$(df \"$BOOT_ROOT\" | tail -1 | awk {' print $1 '})\nif [ -z \"$BOOT_DISK\" ]; then\n  case $BOOT_PART in\n    /dev/sd[a-z][0-9]*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,[0-9]*,,g\")\n      ;;\n    /dev/mmcblk*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,p[0-9]*,,g\")\n      ;;\n  esac\nfi\n\nmount -o rw,remount $BOOT_ROOT\n\nDT_ID=\"\"\nSUBDEVICE=\"\"\n\nfor arg in $(cat /proc/cmdline); do\n  case $arg in\n    boot=*)\n      boot=\"${arg#*=}\"\n      case $boot in\n        /dev/mmc*)\n          BOOT_UUID=\"$(blkid $boot | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          BOOT_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" $boot \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n        FOLDER=*)\n          BOOT_UUID=\"$(blkid ${boot#*=} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n      esac\n\n      DT_ID=$(dtname)\n      MIGRATE_DTB=\"\"\n      if [ -n \"$DT_ID\" ]; then\n        SUBDEVICE=\"Generic\"\n        # modify DT_ID, SUBDEVICE and MIGRATE_DTB by dtb.conf\n        [ -f /usr/bin/convert_dtname ] && . /usr/bin/convert_dtname $DT_ID\n      fi\n\n      UPDATE_DTB_SOURCE=\"/usr/share/bootloader/device_trees/$DT_ID.dtb\"\n      if [ -n \"$DT_ID\" -a -f \"$UPDATE_DTB_SOURCE\" ]; then\n        echo \"Updating device tree with $DT_ID.dtb...\"\n        case $BOOT_PART in\n          /dev/coreelec)\n            dd if=/dev/zero of=/dev/dtb bs=256k count=1 status=none\n            dd if=\"$UPDATE_DTB_SOURCE\" of=/dev/dtb bs=256k status=none\n            rm -f \"$BOOT_ROOT/dtb.img\" # this should not exist, remove if it does\n            ;;\n          *)\n            cp -f \"$UPDATE_DTB_SOURCE\" \"$BOOT_ROOT/dtb.img\"\n            ;;\n        esac\n        [ -n \"$MIGRATE_DTB\" ] && eval $MIGRATE_DTB\n      fi\n\n      for all_dtb in /flash/*.dtb ; do\n        if [ -f $all_dtb ]; then\n          dtb=$(basename $all_dtb)\n          if [ -f /usr/share/bootloader/$dtb ]; then\n            echo \"Updating $dtb...\"\n            cp -p /usr/share/bootloader/$dtb $BOOT_ROOT\n          fi\n        fi\n      done\n      ;;\n\n    disk=*)\n      disk=\"${arg#*=}\"\n      case $disk in\n        /dev/mmc*)\n          DISK_UUID=\"$(blkid $disk | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          DISK_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" $disk \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n        FOLDER=*)\n          DISK_UUID=\"$(blkid ${disk#*=} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n      esac\n      ;;\n  esac\ndone\n\nif [ -d $BOOT_ROOT/device_trees ]; then\n  echo \"Updating device_trees folder...\"\n  rm $BOOT_ROOT/device_trees/*.dtb\n  cp -p /usr/share/bootloader/device_trees/*.dtb $BOOT_ROOT/device_trees/\nfi\n\nif [ -f /usr/share/bootloader/config.ini ]; then\n  if [ ! -f $BOOT_ROOT/config.ini ]; then\n    echo \"Creating config.ini...\"\n    cp -p /usr/share/bootloader/config.ini $BOOT_ROOT/config.ini\n  fi\nfi\n\nif [ -f $BOOT_ROOT/dtb.xml ]; then\n  if [ -f /usr/lib/coreelec/dtb-xml ]; then\n    echo \"Updating dtb.img by dtb.xml...\"\n    /usr/lib/coreelec/dtb-xml\n  fi\nfi\n\nif [ -f $BOOT_ROOT/aml_autoscript ]; then\n  if [ -f /usr/share/bootloader/aml_autoscript ]; then\n    echo \"Updating aml_autoscript...\"\n    cp -p /usr/share/bootloader/aml_autoscript $BOOT_ROOT\n    if [ -e /dev/env ]; then\n      mkdir -p /var/lock\n      dd if=$BOOT_ROOT/aml_autoscript bs=72 skip=1 status=none | \\\n      while read line; do\n        cmd=$(echo $line | sed -n \"s|^setenv \\(.*\\)|fw_setenv -c /etc/fw_env.config \\1|gp\")\n        [ -n \"$cmd\" ] && eval $cmd\n      done\n    fi\n  fi\n  if [ -f /usr/share/bootloader/${SUBDEVICE}_cfgload ]; then\n    echo \"Updating cfgload...\"\n    cp -p /usr/share/bootloader/${SUBDEVICE}_cfgload $BOOT_ROOT/cfgload\n  fi\n  /usr/lib/coreelec/check-bl301\n  if [ ${?} = 1 ]; then\n    echo \"Found custom CoreELEC BL301, running inject_bl301 tool...\"\n    inject_bl301 -Y &>/dev/null\n  fi\nfi\n\nmount -o ro,remount $BOOT_ROOT\n\n# Leave a hint that we just did an update\necho \"UPDATE\" > /storage/.config/boot.hint\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/filesystem/usr/lib/coreelec/smp-affinity.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nSMP=\"../smp_affinity\"\nMESONIR=\"`find /proc/irq/ -name ir-meson`\"\nETH0=\"`find /proc/irq/ -name eth0`\"\nVDEC0=\"`find /proc/irq/ -name vdec-0`\"\nVDEC1=\"`find /proc/irq/ -name vdec-1`\"\nPREDI=\"`find /proc/irq/ -name pre_di`\"\nAFIFO0=\"`find /proc/irq/ -name afifo0`\"\nAOCEC=\"`find /proc/irq/ -name hdmi_aocec*`\"\nUSB3=\"`find /proc/irq/ -name xhci-hcd:usb1`\"\nIRQ=\"$AOCEC $ETH0 $USB3 $VDEC0 $VDEC1 $AFIFO0 $MESONIR $PREDI\"\n\ncpu=1\nfor i in $IRQ; do\n    if [ -f \"$i/$SMP\" ];then\n        [ ! -d \"/sys/devices/system/cpu/cpu$cpu\" ] && cpu=1\n        aff=$((1 << $cpu))\n        haff=`printf '%x\\n' $aff`\n        echo \"echo $haff > $i/$SMP\"\n        echo $haff > $i/$SMP\n        cpu=$((cpu + 1))\n    fi\ndone\n\nexit 0\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/filesystem/usr/lib/kodi/aml-hdmimonitor.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nHDMI_UNPLUGGED=0\nwhile :; do\n  ! grep -q . /sys/class/amhdmitx/amhdmitx0/disp_cap &&\n    grep -q 0 /sys/class/amhdmitx/amhdmitx0/hpd_state &&\n    HDMI_UNPLUGGED=1 && sleep 2 && continue ||\n  break\ndone\n\nif [ $HDMI_UNPLUGGED = 1 ]\nthen systemctl restart kodi\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/filesystem/usr/lib/systemd/system/kodi-aml-hdmimonitor.service",
    "content": "[Unit]\nDescription=Kodi Amlogic HDMI connection monitor\nAfter=kodi.service\n\n[Service]\nType=simple\nExecStart=/usr/lib/kodi/aml-hdmimonitor.sh\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/initramfs/platform_init",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\ndisplay_mode=$(cat /sys/class/display/mode)\n# default values\ndisplay_mode_user=\"1080p60hz\"\nfrac_rate_policy_user=\"0\"\n\nfor arg in $(cat /proc/cmdline); do\n  case ${arg} in\n    bootfrom*)\n      bootfromext=1\n      ;;\n    BOOT_IMAGE=*)\n      BOOT_IMAGE=${arg#*=}\n      ;;\n    boot=*)\n      boot=${arg#*=}\n      ;;\n    disk=*)\n      disk=${arg#*=}\n      ;;\n    frac_rate_policy=*)\n      frac_rate_policy_user=${arg#*=}\n      ;;\n    vout=*)\n      vout=${arg#*=}\n      display_mode_user=${vout%%,*}\n      # implementation not yet finished by Amlogic\n      #frac_rate_policy_user=\"0\"\n      #if [ -z ${vout##*frac*} ]; then\n      #  frac_rate_policy_user=\"1\"\n      #fi\n      ;;\n    native_4k_gui=*)\n      native_4k_gui=${arg#*=}\n      ;;\n  esac\ndone\n\n# Add information where to run CoreELEC from\nif [ -z \"$BOOT_IMAGE\" -o -z \"$boot\" -o -z \"$disk\" ]; then\n  cmdline=$(cat /proc/cmdline)\n  if [ -n \"$bootfromext\" ]; then\n    cmdline=\"$cmdline BOOT_IMAGE=kernel.img boot=LABEL=@BOOT_LABEL@ disk=LABEL=@DISK_LABEL@\"\n  fi\n  echo \"$cmdline\" > /proc/cmdline\nfi\n\n# Enable HDMI output if cable is connected and not already enabled by u-boot\nif [ \"$(cat /sys/class/amhdmitx/amhdmitx0/hpd_state)\" != \"0\" ]; then\n  frac_rate_policy=$(cat /sys/devices/virtual/amhdmitx/amhdmitx0/frac_rate_policy)\n  if [ \"${frac_rate_policy}\" != \"${frac_rate_policy_user}\" ]; then\n    display_mode=\"null\"\n    echo \"${display_mode}\" > /sys/class/display/mode\n    echo \"${frac_rate_policy_user}\" > /sys/devices/virtual/amhdmitx/amhdmitx0/frac_rate_policy\n  fi\n  if [ \"${display_mode}\" != \"${display_mode_user}\" ]; then\n    echo \"${display_mode_user}\" > /sys/class/display/mode\n    display_mode=\"${display_mode_user}\"\n  fi\nfi\n\n# Set framebuffer geometry to match the resolution\ncase $display_mode in\n  *x*)   RES=${display_mode%%[ip]*} X=${RES%%x*} Y=${RES##*x};;\n  480*)            X=720  Y=480  ;;\n  576*)            X=720  Y=576  ;;\n  720p*)           X=1280 Y=720  ;;\n  2160p*)          X=3840 Y=2160 ;;\n  *)               X=1920 Y=1080 ;;\nesac\n\nif [ \"$native_4k_gui\" != \"1\" -a $X -gt 1920 ]; then\n  X=1920\n  Y=1080\nfi\n\nY_VIRT=$(($Y * 2))\n\nfbset -fb /dev/fb0 -g $X $Y $X $Y_VIRT 32\nfbset -fb /dev/fb1 -g 32 32 32 32 32\necho 0 > /sys/class/graphics/fb0/free_scale\necho 0 > /sys/class/graphics/fb1/free_scale\necho 1 > /sys/class/video/disable_video\n\n# Enable scaling for 4K output\nif [ \"$native_4k_gui\" != \"1\" ]; then\n  case $display_mode in\n    4k*|smpte*|2160*)\n      echo 0 0 1919 1079 > /sys/class/graphics/fb0/free_scale_axis\n      echo 0 0 3839 2159 > /sys/class/graphics/fb0/window_axis\n      echo 0x10001 > /sys/class/graphics/fb0/free_scale\n    ;;\n  esac\nfi\n\n# Enable framebuffer device\necho 0 > /sys/class/graphics/fb0/blank\n\n# Blank fb1 to prevent static noise\necho 1 > /sys/class/graphics/fb1/blank\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/kodi/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n  <section id=\"system\">\n    <category id=\"display\">\n      <group id=\"1\">\n        <setting id=\"videoscreen.limitedrange\">\n          <visible>false</visible>\n        </setting>\n      </group>\n    </category>\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.config\">\n          <default>3</default>\n        </setting>\n        <setting id=\"audiooutput.streamnoise\">\n          <default>false</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n  <section id=\"player\">\n    <category id=\"videoplayer\">\n      <group id=\"2\">\n        <setting id=\"videoplayer.adjustrefreshrate\">\n          <default>2</default> <!-- ADJUST_REFRESHRATE_ON_STARTSTOP -->\n          <constraints>\n            <options>\n              <option label=\"351\">0</option> <!-- ADJUST_REFRESHRATE_OFF -->\n              <option label=\"36036\">2</option> <!-- ADJUST_REFRESHRATE_ON_STARTSTOP -->\n              <option label=\"36050\">3</option> <!-- ADJUST_REFRESHRATE_ON_START -->\n            </options>\n          </constraints>\n        </setting>\n      </group>\n    </category>\n  </section>\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/kodi/g12x/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n  <section id=\"system\">\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.audiodevice\">\n          <default>ALSA:surround71:CARD=AMLAUGESOUND,DEV=0</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/kodi/gxx/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n  <section id=\"system\">\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.audiodevice\">\n          <default>ALSA:hdmi:CARD=AMLMESONAUDIO,DEV=0</default>\n        </setting>\n        <setting id=\"audiooutput.streamsilence\">\n          <default>0</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/linux/linux.arm.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm 4.9.269 Kernel Configuration\n#\nCONFIG_ARM=y\nCONFIG_ARM_HAS_SG_CHAIN=y\nCONFIG_MIGHT_HAVE_PCI=y\nCONFIG_SYS_SUPPORTS_APM_EMULATION=y\nCONFIG_HAVE_PROC_CPU=y\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_RWSEM_XCHGADD_ALGORITHM=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_VECTORS_BASE=0xffff0000\n# CONFIG_ARM_PATCH_PHYS_VIRT is not set\nCONFIG_PHYS_OFFSET=0x00000000\nCONFIG_GENERIC_BUG=y\nCONFIG_PGTABLE_LEVELS=2\nCONFIG_DEFCONFIG_LIST=\"/lib/modules/$UNAME_RELEASE/.config\"\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_EXTABLE_SORT=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=64\nCONFIG_CROSS_COMPILE=\"\"\n# CONFIG_COMPILE_TEST is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_HAVE_KERNEL_GZIP=y\nCONFIG_HAVE_KERNEL_LZMA=y\nCONFIG_HAVE_KERNEL_XZ=y\nCONFIG_HAVE_KERNEL_LZO=y\nCONFIG_HAVE_KERNEL_LZ4=y\n# CONFIG_KERNEL_GZIP is not set\n# CONFIG_KERNEL_LZMA is not set\n# CONFIG_KERNEL_XZ is not set\nCONFIG_KERNEL_LZO=y\n# CONFIG_KERNEL_LZ4 is not set\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SWAP=y\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_FHANDLE is not set\n# CONFIG_USELIB is not set\nCONFIG_AUDIT=y\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\nCONFIG_AUDITSYSCALL=y\nCONFIG_AUDIT_WATCH=y\nCONFIG_AUDIT_TREE=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_MSI_IRQ=y\nCONFIG_GENERIC_MSI_IRQ_DOMAIN=y\nCONFIG_HANDLE_DOMAIN_IRQ=y\n# CONFIG_IRQ_DOMAIN_DEBUG is not set\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\nCONFIG_ARCH_CLOCKSOURCE_DATA=y\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\nCONFIG_SCHED_WALT=y\nCONFIG_BSD_PROCESS_ACCT=y\n# CONFIG_BSD_PROCESS_ACCT_V3 is not set\nCONFIG_TASKSTATS=y\nCONFIG_TASK_DELAY_ACCT=y\nCONFIG_TASK_XACCT=y\nCONFIG_TASK_IO_ACCOUNTING=y\n# CONFIG_PSI is not set\n\n#\n# RCU Subsystem\n#\nCONFIG_PREEMPT_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\n# CONFIG_TASKS_RCU is not set\nCONFIG_RCU_STALL_COMMON=y\n# CONFIG_TREE_RCU_TRACE is not set\n# CONFIG_RCU_EXPEDITE_BOOT is not set\nCONFIG_BUILD_BIN2C=y\nCONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y\nCONFIG_LOG_BUF_SHIFT=19\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_NMI_LOG_BUF_SHIFT=13\nCONFIG_GENERIC_SCHED_CLOCK=y\nCONFIG_CGROUPS=y\nCONFIG_CGROUP_DEBUG=y\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CGROUP_PIDS=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_CPUACCT=y\n# CONFIG_CGROUP_SCHEDTUNE is not set\nCONFIG_PAGE_COUNTER=y\nCONFIG_MEMCG=y\n# CONFIG_MEMCG_SWAP is not set\n# CONFIG_BLK_CGROUP is not set\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\n# CONFIG_CFS_BANDWIDTH is not set\nCONFIG_RT_GROUP_SCHED=y\n# CONFIG_CGROUP_PERF is not set\nCONFIG_CGROUP_BPF=y\nCONFIG_SOCK_CGROUP_DATA=y\n# CONFIG_CHECKPOINT_RESTORE is not set\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_SCHED_AUTOGROUP is not set\nCONFIG_SCHED_TUNE=y\nCONFIG_DEFAULT_USE_ENERGY_AWARE=y\n# CONFIG_SYSFS_DEPRECATED is not set\nCONFIG_RELAY=y\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\" \"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\nCONFIG_RD_GZIP=y\nCONFIG_RD_BZIP2=y\nCONFIG_RD_LZMA=y\nCONFIG_RD_XZ=y\nCONFIG_RD_LZO=y\nCONFIG_RD_LZ4=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_BPF=y\nCONFIG_EXPERT=y\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\n# CONFIG_SGETMASK_SYSCALL is not set\nCONFIG_SYSFS_SYSCALL=y\n# CONFIG_SYSCTL_SYSCALL is not set\nCONFIG_KALLSYMS=y\nCONFIG_KALLSYMS_ALL=y\n# CONFIG_KALLSYMS_ABSOLUTE_PERCPU is not set\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_PRINTK=y\nCONFIG_PRINTK_NMI=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_BPF_SYSCALL=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_ADVISE_SYSCALLS=y\n# CONFIG_USERFAULTFD is not set\nCONFIG_PCI_QUIRKS=y\nCONFIG_MEMBARRIER=y\nCONFIG_EMBEDDED=y\nCONFIG_HAVE_PERF_EVENTS=y\nCONFIG_PERF_USE_VMALLOC=y\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\nCONFIG_VM_EVENT_COUNTERS=y\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_MEMCG_SYSFS_ON is not set\n# CONFIG_COMPAT_BRK is not set\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\n# CONFIG_SLAB_FREELIST_RANDOM is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# CONFIG_SYSTEM_DATA_VERIFICATION is not set\nCONFIG_PROFILING=y\nCONFIG_TRACEPOINTS=y\nCONFIG_KEXEC_CORE=y\n# CONFIG_OPROFILE is not set\nCONFIG_HAVE_OPROFILE=y\n# CONFIG_KPROBES is not set\nCONFIG_JUMP_LABEL=y\n# CONFIG_STATIC_KEYS_SELFTEST is not set\n# CONFIG_UPROBES is not set\n# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_ARCH_USE_BUILTIN_BSWAP=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_HAVE_OPTPROBES=y\nCONFIG_HAVE_NMI=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_DMA_API_DEBUG=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_ARCH_WANT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP_FILTER=y\nCONFIG_HAVE_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGINS is not set\nCONFIG_HAVE_CC_STACKPROTECTOR=y\n# CONFIG_CC_STACKPROTECTOR is not set\n# CONFIG_CC_STACKPROTECTOR_NONE is not set\n# CONFIG_CC_STACKPROTECTOR_REGULAR is not set\nCONFIG_CC_STACKPROTECTOR_STRONG=y\n# CONFIG_CC_STACKPROTECTOR_STRONG_AMLOGIC is not set\n# CONFIG_LTO is not set\nCONFIG_LTO_NONE=y\nCONFIG_HAVE_CONTEXT_TRACKING=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_REL=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_HAVE_EXIT_THREAD=y\nCONFIG_ARCH_MMAP_RND_BITS_MIN=8\nCONFIG_ARCH_MMAP_RND_BITS_MAX=16\nCONFIG_ARCH_MMAP_RND_BITS=8\n# CONFIG_HAVE_ARCH_HASH is not set\n# CONFIG_ISA_BUS_API is not set\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_OLD_SIGACTION=y\n# CONFIG_CPU_NO_EFFICIENT_FFS is not set\n# CONFIG_HAVE_ARCH_VMAP_STACK is not set\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\nCONFIG_HAVE_GENERIC_DMA_COHERENT=y\nCONFIG_SLABINFO=y\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\nCONFIG_MODVERSIONS=y\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\n# CONFIG_MODULE_COMPRESS is not set\n# CONFIG_TRIM_UNUSED_KSYMS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\nCONFIG_LBDAF=y\nCONFIG_BLK_DEV_BSG=y\nCONFIG_BLK_DEV_BSGLIB=y\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_CMDLINE_PARSER is not set\n\n#\n# Partition Types\n#\n# CONFIG_PARTITION_ADVANCED is not set\nCONFIG_MSDOS_PARTITION=y\nCONFIG_EFI_PARTITION=y\nCONFIG_BLK_MQ_PCI=y\n\n#\n# IO Schedulers\n#\nCONFIG_IOSCHED_NOOP=y\nCONFIG_IOSCHED_DEADLINE=y\nCONFIG_IOSCHED_CFQ=y\n# CONFIG_DEFAULT_DEADLINE is not set\n# CONFIG_DEFAULT_CFQ is not set\nCONFIG_DEFAULT_NOOP=y\nCONFIG_DEFAULT_IOSCHED=\"noop\"\nCONFIG_ASN1=y\nCONFIG_UNINLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_FREEZER=y\n\n#\n# System Type\n#\nCONFIG_MMU=y\nCONFIG_ARCH_MULTIPLATFORM=y\n# CONFIG_ARCH_GEMINI is not set\n# CONFIG_ARCH_EBSA110 is not set\n# CONFIG_ARCH_EP93XX is not set\n# CONFIG_ARCH_FOOTBRIDGE is not set\n# CONFIG_ARCH_NETX is not set\n# CONFIG_ARCH_IOP13XX is not set\n# CONFIG_ARCH_IOP32X is not set\n# CONFIG_ARCH_IOP33X is not set\n# CONFIG_ARCH_IXP4XX is not set\n# CONFIG_ARCH_DOVE is not set\n# CONFIG_ARCH_KS8695 is not set\n# CONFIG_ARCH_W90X900 is not set\n# CONFIG_ARCH_LPC32XX is not set\n# CONFIG_ARCH_PXA is not set\n# CONFIG_ARCH_RPC is not set\n# CONFIG_ARCH_SA1100 is not set\n# CONFIG_ARCH_S3C24XX is not set\n# CONFIG_ARCH_DAVINCI is not set\n# CONFIG_ARCH_OMAP1 is not set\n\n#\n# Multiple platform selection\n#\n\n#\n# CPU Core family selection\n#\n# CONFIG_ARCH_MULTI_V6 is not set\nCONFIG_ARCH_MULTI_V7=y\nCONFIG_ARCH_MULTI_V6_V7=y\n# CONFIG_ARCH_MULTI_CPU_AUTO is not set\nCONFIG_ARCH_VIRT=y\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_ARTPEC is not set\n# CONFIG_ARCH_AT91 is not set\n# CONFIG_ARCH_BCM is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_DIGICOLOR is not set\n# CONFIG_ARCH_HIGHBANK is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_KEYSTONE is not set\nCONFIG_ARCH_MESON=y\n# CONFIG_MACH_MESON6 is not set\n# CONFIG_MACH_MESON8 is not set\n# CONFIG_MACH_MESON8B is not set\nCONFIG_ARM64_A32=y\n# CONFIG_ARCH_MXC is not set\n# CONFIG_ARCH_MEDIATEK is not set\n\n#\n# TI OMAP/AM/DM/DRA Family\n#\n# CONFIG_ARCH_OMAP3 is not set\n# CONFIG_ARCH_OMAP4 is not set\n# CONFIG_SOC_OMAP5 is not set\n# CONFIG_SOC_AM33XX is not set\n# CONFIG_SOC_AM43XX is not set\n# CONFIG_SOC_DRA7XX is not set\n# CONFIG_ARCH_MMP is not set\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_REALVIEW is not set\n# CONFIG_ARCH_ROCKCHIP is not set\n# CONFIG_ARCH_SOCFPGA is not set\n# CONFIG_PLAT_SPEAR is not set\n# CONFIG_ARCH_STI is not set\n# CONFIG_ARCH_S5PV210 is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_SIRF is not set\n# CONFIG_ARCH_TANGO is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_U8500 is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_WM8850 is not set\n# CONFIG_ARCH_ZX is not set\n# CONFIG_ARCH_ZYNQ is not set\n\n#\n# Processor Type\n#\nCONFIG_CPU_V7=y\nCONFIG_CPU_32v6K=y\nCONFIG_CPU_32v7=y\nCONFIG_CPU_ABRT_EV7=y\nCONFIG_CPU_PABRT_V7=y\nCONFIG_CPU_CACHE_V7=y\nCONFIG_CPU_CACHE_VIPT=y\nCONFIG_CPU_COPY_V6=y\nCONFIG_CPU_TLB_V7=y\nCONFIG_CPU_HAS_ASID=y\nCONFIG_CPU_CP15=y\nCONFIG_CPU_CP15_MMU=y\n\n#\n# Processor Features\n#\n# CONFIG_ARM_LPAE is not set\n# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set\nCONFIG_ARM_THUMB=y\nCONFIG_ARM_THUMBEE=y\nCONFIG_ARM_VIRT_EXT=y\nCONFIG_SWP_EMULATE=y\n# CONFIG_CPU_ICACHE_DISABLE is not set\n# CONFIG_CPU_BPREDICT_DISABLE is not set\nCONFIG_CPU_SPECTRE=y\n# CONFIG_HARDEN_BRANCH_PREDICTOR is not set\nCONFIG_KUSER_HELPERS=y\nCONFIG_VDSO=y\n# CONFIG_CACHE_L2X0 is not set\nCONFIG_ARM_L1_CACHE_SHIFT_6=y\nCONFIG_ARM_L1_CACHE_SHIFT=6\nCONFIG_ARM_DMA_MEM_BUFFERABLE=y\nCONFIG_DEBUG_RODATA=y\nCONFIG_DEBUG_ALIGN_RODATA=y\nCONFIG_MULTI_IRQ_HANDLER=y\n# CONFIG_ARM_ERRATA_430973 is not set\n# CONFIG_ARM_ERRATA_643719 is not set\n# CONFIG_ARM_ERRATA_720789 is not set\n# CONFIG_ARM_ERRATA_754322 is not set\n# CONFIG_ARM_ERRATA_754327 is not set\n# CONFIG_ARM_ERRATA_764369 is not set\n# CONFIG_ARM_ERRATA_775420 is not set\n# CONFIG_ARM_ERRATA_798181 is not set\n# CONFIG_ARM_ERRATA_773022 is not set\n# CONFIG_ARM_ERRATA_818325_852422 is not set\n# CONFIG_ARM_ERRATA_821420 is not set\n# CONFIG_ARM_ERRATA_825619 is not set\n# CONFIG_ARM_ERRATA_852421 is not set\n# CONFIG_ARM_ERRATA_852423 is not set\n\n#\n# Bus support\n#\nCONFIG_PCI=y\nCONFIG_PCI_DOMAINS=y\nCONFIG_PCI_DOMAINS_GENERIC=y\nCONFIG_PCI_SYSCALL=y\nCONFIG_PCIEPORTBUS=y\nCONFIG_PCIEAER=y\n# CONFIG_PCIE_ECRC is not set\n# CONFIG_PCIEAER_INJECT is not set\nCONFIG_PCIEASPM=y\n# CONFIG_PCIEASPM_DEBUG is not set\nCONFIG_PCIEASPM_DEFAULT=y\n# CONFIG_PCIEASPM_POWERSAVE is not set\n# CONFIG_PCIEASPM_PERFORMANCE is not set\nCONFIG_PCIE_PME=y\nCONFIG_PCIE_DPC=y\nCONFIG_PCIE_PTM=y\nCONFIG_PCI_MSI=y\nCONFIG_PCI_MSI_IRQ_DOMAIN=y\n# CONFIG_PCI_DEBUG is not set\n# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set\n# CONFIG_PCI_STUB is not set\n# CONFIG_PCI_IOV is not set\n# CONFIG_PCI_PRI is not set\n# CONFIG_PCI_PASID is not set\n# CONFIG_HOTPLUG_PCI is not set\n\n#\n# PCI host controller drivers\n#\nCONFIG_PCIE_DW_PLAT=y\nCONFIG_PCIE_DW=y\n# CONFIG_PCI_HOST_GENERIC is not set\n# CONFIG_PCI_LAYERSCAPE is not set\n# CONFIG_PCIE_ALTERA is not set\n# CONFIG_PCCARD is not set\n\n#\n# Kernel Features\n#\nCONFIG_HAVE_SMP=y\nCONFIG_SMP=y\nCONFIG_SMP_ON_UP=y\nCONFIG_ARM_CPU_TOPOLOGY=y\nCONFIG_SCHED_MC=y\n# CONFIG_SCHED_SMT is not set\nCONFIG_HAVE_ARM_ARCH_TIMER=y\n# CONFIG_MCPM is not set\n# CONFIG_BIG_LITTLE is not set\nCONFIG_VMSPLIT_3G=y\n# CONFIG_VMSPLIT_3G_OPT is not set\n# CONFIG_VMSPLIT_2G is not set\n# CONFIG_VMSPLIT_1G is not set\nCONFIG_PAGE_OFFSET=0xC0000000\nCONFIG_NR_CPUS=8\nCONFIG_HOTPLUG_CPU=y\nCONFIG_ARM_PSCI=y\nCONFIG_ARCH_NR_GPIO=0\n# CONFIG_PREEMPT_NONE is not set\n# CONFIG_PREEMPT_VOLUNTARY is not set\nCONFIG_PREEMPT=y\nCONFIG_PREEMPT_COUNT=y\nCONFIG_HZ_FIXED=0\n# CONFIG_HZ_100 is not set\n# CONFIG_HZ_200 is not set\nCONFIG_HZ_250=y\n# CONFIG_HZ_300 is not set\n# CONFIG_HZ_500 is not set\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=250\nCONFIG_SCHED_HRTICK=y\n# CONFIG_THUMB2_KERNEL is not set\nCONFIG_ARM_PATCH_IDIV=y\nCONFIG_AEABI=y\n# CONFIG_OABI_COMPAT is not set\n# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set\n# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set\nCONFIG_HAVE_ARCH_PFN_VALID=y\nCONFIG_HIGHMEM=y\nCONFIG_HIGHPTE=y\nCONFIG_CPU_SW_DOMAIN_PAN=y\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_ARCH_WANT_GENERAL_HUGETLB=y\n# CONFIG_ARM_MODULE_PLTS is not set\nCONFIG_FLATMEM=y\nCONFIG_FLAT_NODE_MEM_MAP=y\nCONFIG_HAVE_MEMBLOCK=y\nCONFIG_NO_BOOTMEM=y\nCONFIG_MEMORY_ISOLATION=y\n# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_COMPACTION=y\nCONFIG_MIGRATION=y\n# CONFIG_PHYS_ADDR_T_64BIT is not set\nCONFIG_BOUNCE=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=32768\n# CONFIG_CLEANCACHE is not set\n# CONFIG_FRONTSWAP is not set\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\nCONFIG_CMA_DEBUGFS=y\nCONFIG_CMA_AREAS=15\n# CONFIG_ZPOOL is not set\n# CONFIG_ZBUD is not set\nCONFIG_ZSMALLOC=y\n# CONFIG_PGTABLE_MAPPING is not set\n# CONFIG_ZSMALLOC_STAT is not set\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_FRAME_VECTOR=y\nCONFIG_FORCE_MAX_ZONEORDER=11\nCONFIG_ALIGNMENT_TRAP=y\n# CONFIG_UACCESS_WITH_MEMCPY is not set\nCONFIG_SECCOMP=y\nCONFIG_SWIOTLB=y\nCONFIG_IOMMU_HELPER=y\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\n# CONFIG_XEN is not set\n# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set\n\n#\n# Boot options\n#\nCONFIG_USE_OF=y\nCONFIG_ATAGS=y\n# CONFIG_DEPRECATED_PARAM_STRUCT is not set\n# CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE is not set\nCONFIG_ZBOOT_ROM_TEXT=0\nCONFIG_ZBOOT_ROM_BSS=0\n# CONFIG_ARM_APPENDED_DTB is not set\nCONFIG_CMDLINE=\"systemd.show_status=auto\"\n# CONFIG_CMDLINE_FROM_BOOTLOADER is not set\nCONFIG_CMDLINE_EXTEND=y\n# CONFIG_CMDLINE_FORCE is not set\nCONFIG_KEXEC=y\nCONFIG_ATAGS_PROC=y\n# CONFIG_CRASH_DUMP is not set\n# CONFIG_AUTO_ZRELADDR is not set\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_STAT_DETAILS is not set\nCONFIG_CPU_FREQ_TIMES=y\nCONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\n# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\nCONFIG_CPU_FREQ_GOV_INTERACTIVE=y\nCONFIG_CPU_FREQ_GOV_SCHEDUTIL=y\n\n#\n# CPU frequency scaling drivers\n#\n# CONFIG_CPUFREQ_DT is not set\nCONFIG_ARM_BIG_LITTLE_CPUFREQ=y\n# CONFIG_ARM_DT_BL_CPUFREQ is not set\n# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set\nCONFIG_ARM_SCPI_CPUFREQ=y\n# CONFIG_QORIQ_CPUFREQ is not set\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\nCONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\nCONFIG_DT_IDLE_STATES=y\n\n#\n# ARM CPU Idle Drivers\n#\nCONFIG_ARM_CPUIDLE=y\n# CONFIG_ARM_HIGHBANK_CPUIDLE is not set\n# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set\n\n#\n# Floating point emulation\n#\n\n#\n# At least one emulation must be selected\n#\nCONFIG_VFP=y\nCONFIG_VFPv3=y\nCONFIG_NEON=y\nCONFIG_KERNEL_MODE_NEON=y\n\n#\n# Userspace binary formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_ELFCORE=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\n# CONFIG_BINFMT_FLAT is not set\n# CONFIG_HAVE_AOUT is not set\nCONFIG_BINFMT_MISC=y\nCONFIG_COREDUMP=y\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_SUSPEND_SKIP_SYNC is not set\n# CONFIG_HIBERNATION is not set\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\nCONFIG_PM_AUTOSLEEP=y\nCONFIG_PM_WAKELOCKS=y\nCONFIG_PM_WAKELOCKS_LIMIT=100\nCONFIG_PM_WAKELOCKS_GC=y\nCONFIG_PM=y\n# CONFIG_PM_DEBUG is not set\n# CONFIG_APM_EMULATION is not set\nCONFIG_PM_OPP=y\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\nCONFIG_ARM_CPU_SUSPEND=y\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_NET=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\n# CONFIG_UNIX_DIAG is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\nCONFIG_XFRM_INTERFACE=y\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\n# CONFIG_NET_KEY is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=m\nCONFIG_IP_MROUTE=y\n# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set\n# CONFIG_IP_PIMSM_V1 is not set\n# CONFIG_IP_PIMSM_V2 is not set\n# CONFIG_SYN_COOKIES is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=y\n# CONFIG_INET_IPCOMP is not set\n# CONFIG_INET_XFRM_TUNNEL is not set\nCONFIG_INET_TUNNEL=m\n# CONFIG_INET_XFRM_MODE_TRANSPORT is not set\n# CONFIG_INET_XFRM_MODE_TUNNEL is not set\n# CONFIG_INET_XFRM_MODE_BEET is not set\n# CONFIG_INET_DIAG is not set\nCONFIG_TCP_CONG_ADVANCED=y\n# CONFIG_TCP_CONG_BIC is not set\nCONFIG_TCP_CONG_CUBIC=y\n# CONFIG_TCP_CONG_WESTWOOD is not set\n# CONFIG_TCP_CONG_HTCP is not set\n# CONFIG_TCP_CONG_HSTCP is not set\n# CONFIG_TCP_CONG_HYBLA is not set\n# CONFIG_TCP_CONG_VEGAS is not set\n# CONFIG_TCP_CONG_NV is not set\n# CONFIG_TCP_CONG_SCALABLE is not set\n# CONFIG_TCP_CONG_LP is not set\n# CONFIG_TCP_CONG_VENO is not set\n# CONFIG_TCP_CONG_YEAH is not set\n# CONFIG_TCP_CONG_ILLINOIS is not set\n# CONFIG_TCP_CONG_DCTCP is not set\n# CONFIG_TCP_CONG_CDG is not set\nCONFIG_TCP_CONG_BBR=y\nCONFIG_DEFAULT_CUBIC=y\n# CONFIG_DEFAULT_BBR is not set\n# CONFIG_DEFAULT_RENO is not set\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_INET6_XFRM_TUNNEL is not set\n# CONFIG_INET6_TUNNEL is not set\n# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set\n# CONFIG_INET6_XFRM_MODE_TUNNEL is not set\n# CONFIG_INET6_XFRM_MODE_BEET is not set\n# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set\nCONFIG_IPV6_SIT=m\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\nCONFIG_IPV6_FOU=m\n# CONFIG_IPV6_FOU_TUNNEL is not set\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\nCONFIG_NETLABEL=y\n# CONFIG_ANDROID_PARANOID_NETWORK is not set\nCONFIG_NETWORK_SECMARK=y\nCONFIG_NET_PTP_CLASSIFY=y\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\n# CONFIG_NETFILTER_DEBUG is not set\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\n# CONFIG_NETFILTER_INGRESS is not set\nCONFIG_NETFILTER_NETLINK=m\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\nCONFIG_NETFILTER_NETLINK_LOG=m\nCONFIG_NF_CONNTRACK=m\nCONFIG_NF_CONNTRACK_MARK=y\n# CONFIG_NF_CONNTRACK_SECMARK is not set\n# CONFIG_NF_CONNTRACK_PROCFS is not set\n# CONFIG_NF_CONNTRACK_EVENTS is not set\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CT_PROTO_DCCP is not set\n# CONFIG_NF_CT_PROTO_SCTP is not set\n# CONFIG_NF_CT_PROTO_UDPLITE is not set\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\nCONFIG_NF_CONNTRACK_IRC=m\nCONFIG_NF_CONNTRACK_BROADCAST=m\nCONFIG_NF_CONNTRACK_NETBIOS_NS=m\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\nCONFIG_NF_CONNTRACK_SIP=m\nCONFIG_NF_CONNTRACK_TFTP=m\nCONFIG_NF_CT_NETLINK=m\n# CONFIG_NF_CT_NETLINK_TIMEOUT is not set\n# CONFIG_NETFILTER_NETLINK_GLUE_CT is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_NEEDED=y\n# CONFIG_NF_NAT_AMANDA is not set\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_IRC=m\nCONFIG_NF_NAT_SIP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=m\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\nCONFIG_NETFILTER_XT_CONNMARK=m\n# CONFIG_NETFILTER_XT_SET is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\nCONFIG_NETFILTER_XT_MATCH_BPF=m\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\n# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\nCONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m\nCONFIG_NETFILTER_XT_MATCH_CONNMARK=m\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\nCONFIG_NETFILTER_XT_MATCH_ECN=m\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\nCONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m\nCONFIG_NETFILTER_XT_MATCH_HELPER=m\nCONFIG_NETFILTER_XT_MATCH_HL=m\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\nCONFIG_NETFILTER_XT_MATCH_IPRANGE=m\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\nCONFIG_NETFILTER_XT_MATCH_L2TP=m\nCONFIG_NETFILTER_XT_MATCH_LENGTH=m\nCONFIG_NETFILTER_XT_MATCH_LIMIT=m\nCONFIG_NETFILTER_XT_MATCH_MAC=m\nCONFIG_NETFILTER_XT_MATCH_MARK=m\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\nCONFIG_NETFILTER_XT_MATCH_OWNER=m\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA2 is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\nCONFIG_NETFILTER_XT_MATCH_STATE=m\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\nCONFIG_IP_SET=m\nCONFIG_IP_SET_MAX=256\nCONFIG_IP_SET_BITMAP_IP=m\nCONFIG_IP_SET_BITMAP_IPMAC=m\nCONFIG_IP_SET_BITMAP_PORT=m\nCONFIG_IP_SET_HASH_IP=m\nCONFIG_IP_SET_HASH_IPMARK=m\nCONFIG_IP_SET_HASH_IPPORT=m\nCONFIG_IP_SET_HASH_IPPORTIP=m\nCONFIG_IP_SET_HASH_IPPORTNET=m\nCONFIG_IP_SET_HASH_MAC=m\nCONFIG_IP_SET_HASH_NETPORTNET=m\nCONFIG_IP_SET_HASH_NET=m\nCONFIG_IP_SET_HASH_NETNET=m\nCONFIG_IP_SET_HASH_NETPORT=m\nCONFIG_IP_SET_HASH_NETIFACE=m\nCONFIG_IP_SET_LIST_SET=m\nCONFIG_IP_VS=m\nCONFIG_IP_VS_IPV6=y\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_AH_ESP is not set\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS application helper\n#\nCONFIG_IP_VS_FTP=m\nCONFIG_IP_VS_NFCT=y\nCONFIG_IP_VS_PE_SIP=m\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\nCONFIG_NF_CONNTRACK_IPV4=m\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_NF_NAT_IPV4=m\nCONFIG_NF_NAT_MASQUERADE_IPV4=m\n# CONFIG_NF_NAT_PPTP is not set\n# CONFIG_NF_NAT_H323 is not set\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_SECURITY is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n\n#\n# IPv6: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV6=m\nCONFIG_NF_CONNTRACK_IPV6=m\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\n# CONFIG_NF_LOG_IPV6 is not set\nCONFIG_NF_NAT_IPV6=m\nCONFIG_NF_NAT_MASQUERADE_IPV6=m\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\n# CONFIG_IP6_NF_SECURITY is not set\nCONFIG_IP6_NF_NAT=m\n# CONFIG_IP6_NF_TARGET_MASQUERADE is not set\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\nCONFIG_HAVE_NET_DSA=y\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\n# CONFIG_DECNET is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_IPX is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\nCONFIG_NET_SCH_FQ_CODEL=y\nCONFIG_NET_SCH_FQ=y\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n\n#\n# Classification\n#\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_TCINDEX is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_RSVP is not set\n# CONFIG_NET_CLS_RSVP6 is not set\n# CONFIG_NET_CLS_FLOW is not set\n# CONFIG_NET_CLS_CGROUP is not set\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\nCONFIG_NET_L3_MASTER_DEV=y\n# CONFIG_NET_NCSI is not set\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_XPS=y\n# CONFIG_CGROUP_NET_PRIO is not set\n# CONFIG_CGROUP_NET_CLASSID is not set\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_JIT is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\n# CONFIG_IRDA is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\nCONFIG_BT_RFCOMM_TTY=y\n# CONFIG_BT_BNEP is not set\nCONFIG_BT_HIDP=m\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_LEDS is not set\n# CONFIG_BT_SELFTEST is not set\n# CONFIG_BT_DEBUGFS is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_QCA=m\nCONFIG_BT_HCIBTUSB=m\nCONFIG_BT_HCIBTUSB_BCM=y\nCONFIG_BT_HCIBTUSB_RTL=y\n# CONFIG_BT_HCIBTSDIO is not set\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_H4=y\nCONFIG_BT_HCIUART_BCSP=y\nCONFIG_BT_HCIUART_ATH3K=y\nCONFIG_BT_HCIUART_LL=y\nCONFIG_BT_HCIUART_3WIRE=y\nCONFIG_BT_HCIUART_INTEL=y\nCONFIG_BT_HCIUART_BCM=y\nCONFIG_BT_HCIUART_QCA=y\nCONFIG_BT_HCIUART_AG6XX=y\nCONFIG_BT_HCIUART_MRVL=y\nCONFIG_BT_HCIBCM203X=m\nCONFIG_BT_HCIBPA10X=m\nCONFIG_BT_HCIBFUSB=m\nCONFIG_BT_HCIVHCI=m\nCONFIG_BT_MRVL=m\nCONFIG_BT_MRVL_SDIO=m\nCONFIG_BT_ATH3K=m\nCONFIG_AF_RXRPC=m\n# CONFIG_AF_RXRPC_IPV6 is not set\n# CONFIG_AF_RXRPC_INJECT_LOSS is not set\n# CONFIG_AF_RXRPC_DEBUG is not set\n# CONFIG_RXKAD is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_STREAM_PARSER is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=y\nCONFIG_NL80211_TESTMODE=y\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\n# CONFIG_CFG80211_INTERNAL_REGDB is not set\nCONFIG_CFG80211_CRDA_SUPPORT=y\nCONFIG_CFG80211_WEXT=y\nCONFIG_LIB80211=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=y\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_MINSTREL_HT=y\n# CONFIG_MAC80211_RC_MINSTREL_VHT is not set\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\n# CONFIG_WIMAX is not set\nCONFIG_RFKILL=y\nCONFIG_RFKILL_PM=y\nCONFIG_RFKILL_LEDS=y\n# CONFIG_RFKILL_INPUT is not set\n# CONFIG_RFKILL_REGULATOR is not set\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\nCONFIG_CEPH_LIB=m\n# CONFIG_CEPH_LIB_PRETTYDEBUG is not set\n# CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set\nCONFIG_NFC=m\nCONFIG_NFC_DIGITAL=m\nCONFIG_NFC_NCI=m\nCONFIG_NFC_NCI_SPI=m\nCONFIG_NFC_NCI_UART=m\nCONFIG_NFC_HCI=m\nCONFIG_NFC_SHDLC=y\n\n#\n# Near Field Communication (NFC) devices\n#\nCONFIG_NFC_TRF7970A=m\nCONFIG_NFC_SIM=m\nCONFIG_NFC_PORT100=m\nCONFIG_NFC_FDP=m\nCONFIG_NFC_FDP_I2C=m\nCONFIG_NFC_PN544=m\nCONFIG_NFC_PN544_I2C=m\nCONFIG_NFC_PN533=m\nCONFIG_NFC_PN533_USB=m\nCONFIG_NFC_PN533_I2C=m\nCONFIG_NFC_MICROREAD=m\nCONFIG_NFC_MICROREAD_I2C=m\nCONFIG_NFC_MRVL=m\nCONFIG_NFC_MRVL_USB=m\nCONFIG_NFC_MRVL_UART=m\nCONFIG_NFC_MRVL_I2C=m\nCONFIG_NFC_MRVL_SPI=m\nCONFIG_NFC_ST21NFCA=m\nCONFIG_NFC_ST21NFCA_I2C=m\nCONFIG_NFC_ST_NCI=m\nCONFIG_NFC_ST_NCI_I2C=m\nCONFIG_NFC_ST_NCI_SPI=m\nCONFIG_NFC_NXP_NCI=m\nCONFIG_NFC_NXP_NCI_I2C=m\nCONFIG_NFC_S3FWRN5=m\nCONFIG_NFC_S3FWRN5_I2C=m\nCONFIG_NFC_ST95HF=m\nCONFIG_LWTUNNEL=y\nCONFIG_DST_CACHE=y\n# CONFIG_NET_DEVLINK is not set\nCONFIG_MAY_USE_DEVLINK=y\nCONFIG_HAVE_CBPF_JIT=y\n\n#\n# Device Drivers\n#\nCONFIG_AMLOGIC_DRIVER=y\nCONFIG_AMLOGIC_MODIFY=y\n# CONFIG_AMLOGIC_SYNC_20210524 is not set\n\n#\n# Amlogic Device Drivers\n#\nCONFIG_AMLOGIC_CPUFREQ=y\nCONFIG_AMLOGIC_MESON_CPUFREQ=y\nCONFIG_AMLOGIC_INPUT_BOOST=y\nCONFIG_AMLOGIC_INPUT_BOOST_DURATION=1000\nCONFIG_AMLOGIC_UART=y\nCONFIG_AMLOGIC_SERIAL_MESON_CONSOLE=y\n# CONFIG_AMLOGIC_PRINTK_NOBLOCK_MODE is not set\nCONFIG_AMLOGIC_IOMAP=y\nCONFIG_AMLOGIC_PINCTRL=y\n# CONFIG_AMLOGIC_PINCTRL_MESON8B is not set\nCONFIG_AMLOGIC_PINCTRL_MESON_GXL=y\nCONFIG_AMLOGIC_PINCTRL_MESON_AXG=y\nCONFIG_AMLOGIC_PINCTRL_MESON_TXLX=y\nCONFIG_AMLOGIC_PINCTRL_MESON_G12A=y\n# CONFIG_AMLOGIC_PINCTRL_MESON_TXL is not set\n# CONFIG_AMLOGIC_PINCTRL_MESON_TL1 is not set\n# CONFIG_AMLOGIC_PINCTRL_MESON_TM2 is not set\nCONFIG_AMLOGIC_PINCTRL_MESON_SC2=y\nCONFIG_AMLOGIC_PINCONF_MESON_G12A=y\nCONFIG_AMLOGIC_PINCTRL_MESON8_PMX=y\nCONFIG_AMLOGIC_PINCTRL_MESON_AXG_PMX=y\n\n#\n# USB Support\n#\nCONFIG_AMLOGIC_USB=y\nCONFIG_AMLOGIC_USB_DWC_OTG_HCD=y\nCONFIG_AMLOGIC_USB_HOST_ELECT_TEST=y\nCONFIG_AMLOGIC_USBPHY=y\nCONFIG_AMLOGIC_USB2PHY=y\nCONFIG_AMLOGIC_USB3PHY=y\n\n#\n# I2C Hardware Bus support\n#\nCONFIG_AMLOGIC_I2C=y\nCONFIG_AMLOGIC_I2C_SLAVE=y\nCONFIG_AMLOGIC_I2C_MASTER=y\n\n#\n# AMLOGIC SPI Hardware bus support\n#\nCONFIG_AMLOGIC_SPICC_MASTER=y\n# CONFIG_AMLOGIC_SPICC_SLAVE is not set\nCONFIG_AMLOGIC_SEC=y\nCONFIG_AMLOGIC_CPU_VERSION=y\nCONFIG_AMLOGIC_MESON64_VERSION=y\n# CONFIG_AMLOGIC_M8B_MESON32_VERSION is not set\nCONFIG_AMLOGIC_CPU_INFO=y\n\n#\n# MESON MHU mailbox Support\n#\nCONFIG_AMLOGIC_MHU_MBOX=y\nCONFIG_ARM_SCPI_PROTOCOL=y\nCONFIG_AMLOGIC_REG_ACCESS=y\nCONFIG_AMLOGIC_TIMER=y\n# CONFIG_AMLOGIC_LOCAL_TIMER is not set\nCONFIG_AMLOGIC_BC_TIMER=y\nCONFIG_AMLOGIC_CLK=y\nCONFIG_AMLOGIC_COMMON_CLK_SCPI=y\n# CONFIG_AMLOGIC_M8B_CLK is not set\nCONFIG_AMLOGIC_GX_CLK=y\n\n#\n# Amlogic Crypto Support\n#\nCONFIG_AMLOGIC_CRYPTO=y\nCONFIG_AMLOGIC_CRYPTO_DMA=y\n# CONFIG_AMLOGIC_CRYPTO_BLKMV is not set\nCONFIG_AMLOGIC_INPUT=y\n# CONFIG_AMLOGIC_AVIN_DETECT is not set\nCONFIG_AMLOGIC_INPUT_KEYBOARD=y\nCONFIG_AMLOGIC_ADC_KEYPADS=y\nCONFIG_AMLOGIC_GPIO_KEY=y\n# CONFIG_AMLOGIC_PCA9557_KEYPAD is not set\nCONFIG_AMLOGIC_REMOTE=y\nCONFIG_AMLOGIC_MESON_REMOTE=m\nCONFIG_AMLOGIC_TOUCHSCREEN=y\nCONFIG_AMLOGIC_TOUCHSCREEN_FTS=y\nCONFIG_AMLOGIC_TOUCHSCREEN_GT1X=y\nCONFIG_AMLOGIC_TOUCHSCREEN_GT9XX=y\n# CONFIG_AMLOGIC_TOUCHSCREEN_HYN_CST2XX is not set\n# CONFIG_AMLOGIC_SENSOR is not set\n\n#\n# EFUSE Support\n#\nCONFIG_AMLOGIC_EFUSE=y\n# CONFIG_AMLOGIC_EFUSE_WRITE_VERSION_PERMIT is not set\nCONFIG_AMLOGIC_REBOOT=y\nCONFIG_AMLOGIC_GX_REBOOT=y\n# CONFIG_AMLOGIC_M8B_REBOOT is not set\nCONFIG_AMLOGIC_INTERNAL_PHY=y\nCONFIG_AMLOGIC_CPU_HOTPLUG=y\nCONFIG_AMLOGIC_PWM=y\nCONFIG_AMLOGIC_PWM_V2=y\n\n#\n# Amlogic dvb configuration\n#\n# CONFIG_AMLOGIC_DVB is not set\nCONFIG_AMLOGIC_DVB_COMPAT=y\n\n#\n# Amlogic multimedia configuration\n#\nCONFIG_AMLOGIC_MEDIA_ENABLE=y\nCONFIG_AMLOGIC_MEDIA_COMMON=y\nCONFIG_AMLOGIC_MEDIA_DRIVERS=y\nCONFIG_AMLOGIC_MEDIA_MULTI_DEC=y\n# CONFIG_AMLOGIC_AVSP_LONG_CABAC is not set\nCONFIG_AMLOGIC_MEDIA_CODEC_MM=y\n\n#\n# Canvas management driver\n#\nCONFIG_AMLOGIC_MEDIA_CANVAS=y\n\n#\n# Amlogic GE2D Module\n#\nCONFIG_AMLOGIC_MEDIA_GE2D=y\n# CONFIG_AMLOGIC_MEDIA_GE2D_MORE_SECURITY is not set\n\n#\n# ION support\n#\nCONFIG_AMLOGIC_ION=y\n\n#\n# RDMA management driver\n#\nCONFIG_AMLOGIC_MEDIA_RDMA=y\nCONFIG_AMLOGIC_MEDIA_VSYNC_RDMA=y\n# CONFIG_AMLOGIC_UVM_CORE is not set\n# CONFIG_AMLOGIC_UVM_ALLOCATOR is not set\n# CONFIG_AMLOGIC_ION_DELAY_ALLOC is not set\nCONFIG_AMLOGIC_MEDIA_VFM=y\n\n#\n# Amlogic VPU Driver Support\n#\nCONFIG_AMLOGIC_VPU=y\n# CONFIG_AMLOGIC_VPU_DYNAMIC_ADJ is not set\nCONFIG_AMLOGIC_VIDEOBUF_RESOURCE=m\n\n#\n# LUT DMA management driver\n#\n# CONFIG_AMLOGIC_MEDIA_LUT_DMA is not set\n\n#\n# ResManage driver\n#\n# CONFIG_AMLOGIC_MEDIA_RESMANAGE is not set\n\n#\n# VPU SECURITY driver\n#\n# CONFIG_AMLOGIC_MEDIA_SECURITY is not set\n\n#\n# Amlogic Video Sink Driver Support\n#\nCONFIG_AMLOGIC_MEDIA_VIDEO=y\nCONFIG_AMLOGIC_MEDIA_VIDEOCAPTURE=y\n\n#\n# Amlogic Vout Driver Support\n#\nCONFIG_AMLOGIC_VOUT=y\nCONFIG_AMLOGIC_VOUT_CLK_SERVE=y\nCONFIG_AMLOGIC_VDAC=y\nCONFIG_AMLOGIC_CVBS_OUTPUT=y\nCONFIG_AMLOGIC_WSS=y\n\n#\n# Amlogic HDMITX Module\n#\nCONFIG_AMLOGIC_HDMITX=y\n\n#\n# Amlogic LCD Output Module\n#\nCONFIG_AMLOGIC_LCD=y\nCONFIG_AMLOGIC_LCD_TV=y\nCONFIG_AMLOGIC_LCD_TABLET=y\nCONFIG_AMLOGIC_LCD_EXTERN=y\n# CONFIG_AMLOGIC_LCD_EXTERN_I2C_T5800Q is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_I2C_ANX6862_7911 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_I2C_DLPC3439 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_I2C_ANX6345 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_I2C_CS602 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_SPI_LD070WS2 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_MIPI_KD080D13 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_MIPI_N070ICN is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_MIPI_TV070WSM is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_MIPI_ST7701 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_MIPI_P070ACB is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_MIPI_TL050FHV02CT is not set\n\n#\n# Amlogic Backlight Support\n#\nCONFIG_AMLOGIC_BACKLIGHT=y\nCONFIG_AMLOGIC_BL_EXTERN=y\nCONFIG_AMLOGIC_BL_EXTERN_I2C_LP8556=y\nCONFIG_AMLOGIC_BL_EXTERN_MIPI_LT070ME05=y\nCONFIG_AMLOGIC_LOCAL_DIMMING=y\nCONFIG_CONFIG_AML_LOCAL_DIMMING_IW7038=y\nCONFIG_CONFIG_AML_LOCAL_DIMMING_IW7027=y\nCONFIG_AMLOGIC_VOUT_SERVE=y\nCONFIG_AMLOGIC_VOUT2_SERVE=y\n\n#\n# Amlogic Peripheral_lcd Support\n#\n# CONFIG_AMLOGIC_PERIPHERAL_LCD is not set\n\n#\n# Amlogic OSD Module\n#\nCONFIG_AMLOGIC_MEDIA_FB=y\n# CONFIG_AMLOGIC_MEDIA_FB_OSD_SYNC_FENCE is not set\nCONFIG_AMLOGIC_MEDIA_FB_OSD_VSYNC_RDMA=y\nCONFIG_AMLOGIC_MEDIA_FB_OSD2_ENABLE=y\nCONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR=y\n\n#\n# Amlogic OSD_EXT Module\n#\n# CONFIG_AMLOGIC_MEDIA_FB_EXT is not set\n\n#\n# Deinterlace driver\n#\nCONFIG_AMLOGIC_MEDIA_DEINTERLACE=y\n\n#\n# DI_MULTI driver\n#\n\n#\n# DI_LOCAL driver\n#\n\n#\n# Input drivers\n#\n# CONFIG_AMLOGIC_MEDIA_VIN is not set\n\n#\n# Amlogic Video Processor Support\n#\nCONFIG_AMLOGIC_MEDIA_VIDEO_PROCESSOR=y\n\n#\n# V4L2 Video Support\n#\nCONFIG_AMLOGIC_V4L_VIDEO=m\n# CONFIG_AMLOGIC_V4L_VIDEO2 is not set\n\n#\n# Post Process Manager driver\n#\nCONFIG_AMLOGIC_POST_PROCESS_MANAGER=y\nCONFIG_AMLOGIC_POST_PROCESS_MANAGER_PPSCALER=y\n# CONFIG_AMLOGIC_POST_PROCESS_MANAGER_3D_PROCESS is not set\n\n#\n# Amlogic ion video support\n#\n# CONFIG_AMLOGIC_VIDEOBUF2_ION is not set\n\n#\n# Amlogic picture decoder support\n#\n# CONFIG_AMLOGIC_PIC_DEC is not set\n\n#\n# Amlogic videosync support\n#\n# CONFIG_AMLOGIC_VIDEOSYNC is not set\n\n#\n# Amlogic v4l video support\n#\n# CONFIG_AMLOGIC_V4L_VIDEO3 is not set\n\n#\n# Amlogic video_composer support\n#\n# CONFIG_AMLOGIC_VIDEO_COMPOSER is not set\n\n#\n# Amlogic video tunnel support\n#\n# CONFIG_AMLOGIC_VIDEO_TUNNEL is not set\n\n#\n# Amlogic Enhancement drivers\n#\nCONFIG_AMLOGIC_MEDIA_ENHANCEMENT=y\n\n#\n# Amlogic VECM Drivers\n#\n\n#\n# Amlogic amvecm Driver\n#\nCONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM=y\n\n#\n# Amlogic amdolby_vision Drivers\n#\n\n#\n# Amlogic amdolby_vision Driver\n#\nCONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION=y\n\n#\n# Amlogic amprime_sl Drivers\n#\n\n#\n# Amlogic amprime_sl Driver\n#\n# CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_PRIME_SL is not set\n# CONFIG_AMLOGIC_MEDIA_GDC is not set\n\n#\n# Amlogic multimedia algorithm configuration\n#\n# CONFIG_AMLOGIC_MEDIA_ALGORITHM is not set\n\n#\n# Amlogic Camera Support\n#\n# CONFIG_AMLOGIC_VIDEO_CAPTURE is not set\n# CONFIG_AMLOGIC_VIDEOIN_MANAGER is not set\n# CONFIG_AMLOGIC_MEDIA_MSYNC is not set\n\n#\n# Amlogic DTV driver\n#\n# CONFIG_AMLOGIC_DTV_DEMOD is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n\n#\n# Multimedia Card support\n#\nCONFIG_AMLOGIC_MMC=y\n# CONFIG_AMLOGIC_M8B_MMC is not set\n\n#\n# Meson NAND Device Support\n#\nCONFIG_AMLOGIC_NAND=y\n\n#\n# Meson8B NAND Device Support\n#\nCONFIG_AMLOGIC_VRTC=y\nCONFIG_AMLOGIC_SMARTCARD=y\nCONFIG_AMLOGIC_CEC=y\nCONFIG_AMLOGIC_AO_CEC=y\n\n#\n# unifykey Support\n#\nCONFIG_AMLOGIC_UNIFYKEY=y\nCONFIG_AMLOGIC_V8_UNIFYKEY=y\n# CONFIG_AMLOGIC_V7_UNIFYKEY is not set\n\n#\n# Amlogic temperature sensor\n#\nCONFIG_AMLOGIC_TEMP_SENSOR=y\nCONFIG_AMLOGIC_GX_TEMP_SENSOR=y\nCONFIG_AMLOGIC_CPUCORE_THERMAL=y\nCONFIG_AMLOGIC_GPU_THERMAL=y\nCONFIG_AMLOGIC_GPUCORE_THERMAL=y\n\n#\n# Audio Interface\n#\nCONFIG_AMLOGIC_AMAUDIO=y\n\n#\n# Amlogic Audio Interface V2\n#\nCONFIG_AMLOGIC_AMAUDIO2=y\n# CONFIG_AMLKARAOKE is not set\n\n#\n# AMLOGIC Audio DSP process\n#\nCONFIG_AMLOGIC_AUDIO_DSP=y\n\n#\n# AMLOGIC Audio Info\n#\nCONFIG_AMLOGIC_AUDIO_INFO=y\n\n#\n# Meson core pm driver\n#\nCONFIG_AMLOGIC_SUSPEND=y\nCONFIG_AMLOGIC_GX_SUSPEND=y\n# CONFIG_AMLOGIC_M8B_SUSPEND is not set\nCONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND=y\nCONFIG_AMLOGIC_LED=y\nCONFIG_AMLOGIC_LED_SYS=y\n# CONFIG_AMLOGIC_LEDS_TLC59116 is not set\n# CONFIG_AMLOGIC_LEDS_STATE is not set\nCONFIG_AMLOGIC_JTAG=y\nCONFIG_AMLOGIC_JTAG_MESON=y\nCONFIG_AMLOGIC_WDT=y\nCONFIG_AMLOGIC_WDT_MESON=y\nCONFIG_AMLOGIC_WDT_MESON_V3=y\n\n#\n# ESM Support\n#\nCONFIG_AMLOGIC_ESM=y\nCONFIG_AMLOGIC_WIFI=y\nCONFIG_AMLOGIC_BT_DEVICE=y\n\n#\n# AMLOGIC DVB EXTERN support\n#\n# CONFIG_AMLOGIC_DVB_EXTERN is not set\n\n#\n# DVB AUCPU support\n#\nCONFIG_AMLOGIC_AUCPU=y\n\n#\n# AMLOGIC DVB demux/dsc support\n#\nCONFIG_AMLOGIC_DVB_DMX=m\n\n#\n# DVB COMPAT support\n#\nCONFIG_AMLOGIC_POWER=y\n# CONFIG_AMLOGIC_PMU_OF is not set\n# CONFIG_AMLOGIC_PMU is not set\n# CONFIG_AMLOGIC_M8B_DVFS is not set\n\n#\n# Multimedia Card support\n#\nCONFIG_AMLOGIC_PCIE=y\n# CONFIG_AMLOGIC_IRBLASTER_CORE is not set\nCONFIG_AMLOGIC_IIO=y\n\n#\n# Analog to digital converters\n#\nCONFIG_AMLOGIC_SARADC=y\nCONFIG_AMLOGIC_DDR_TOOL=y\n# CONFIG_AMLOGIC_DDR_WINDOW_TOOL is not set\nCONFIG_AMLOGIC_DDR_BANDWIDTH=y\nCONFIG_AMLOGIC_DDR_BANDWIDTH_GX=y\nCONFIG_AMLOGIC_DMC_MONITOR=y\nCONFIG_AMLOGIC_DMC_MONITOR_GX=y\n# CONFIG_AMLOGIC_DRM is not set\n# CONFIG_AMLOGIC_SM is not set\nCONFIG_AMLOGIC_TEE=y\n# CONFIG_AMLOGIC_LEDRING is not set\nCONFIG_AMLOGIC_MEMORY_EXTEND=y\n# CONFIG_AMLOGIC_PAGE_TRACE is not set\nCONFIG_AMLOGIC_RAMDUMP=y\nCONFIG_AMLOGIC_CMA=y\n# CONFIG_AMLOGIC_VMAP is not set\n# CONFIG_AMLOGIC_WATCHPOINT is not set\nCONFIG_AMLOGIC_GPIO_IRQ=y\n\n#\n# Amlogic ATV driver\n#\n# CONFIG_AMLOGIC_ATV_DEMOD is not set\nCONFIG_AMLOGIC_DEBUG=y\nCONFIG_AMLOGIC_DEBUG_LOCKUP=y\n# CONFIG_AMLOGIC_DEBUG_ATRACE is not set\n# CONFIG_AMLOGIC_DEBUG_SCRAMBLER_RAMOOPS is not set\n\n#\n# Amlogic defend img file update support\n#\nCONFIG_AMLOGIC_DEFENDKEY=y\n# CONFIG_AMLOGIC_BATTERY_DUMMY is not set\n# CONFIG_AMLOGIC_CHARGER_DUMMY is not set\n\n#\n# Meson SPI NOR Flash Support\n#\nCONFIG_SPI_AML_SPIFC=y\nCONFIG_DOLBY_FW=y\n# CONFIG_AMLOGIC_IRCUT is not set\n\n#\n# AMLOGIC HiFi4DSP process\n#\n# CONFIG_AMLOGIC_HIFI4DSP is not set\n# CONFIG_AMLOGIC_PIXEL_PROBE is not set\n\n#\n# AMLOGIC firmware boot\n#\n# CONFIG_AMLOGIC_FIRMWARE is not set\nCONFIG_AMLOGIC_RESET_MESON=y\n\n#\n# AMLOGIC DVB EXTERN support\n#\n\n#\n# DVB AUCPU support\n#\n\n#\n# AMLOGIC DVB demux/dsc support\n#\n\n#\n# DVB COMPAT support\n#\nCONFIG_AMLOGIC_SOC_INFO=y\nCONFIG_ARM_AMBA=y\n\n#\n# Generic Driver Options\n#\nCONFIG_UEVENT_HELPER=y\nCONFIG_UEVENT_HELPER_PATH=\"/sbin/hotplug\"\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\nCONFIG_FW_LOADER=y\nCONFIG_FIRMWARE_IN_KERNEL=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set\nCONFIG_WANT_DEV_COREDUMP=y\nCONFIG_ALLOW_DEV_COREDUMP=y\nCONFIG_DEV_COREDUMP=y\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_SYS_HYPERVISOR is not set\n# CONFIG_GENERIC_CPU_DEVICES is not set\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_FENCE_TRACE is not set\nCONFIG_DMA_CMA=y\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=8\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n\n#\n# Bus devices\n#\n# CONFIG_ARM_CCI400_PMU is not set\n# CONFIG_ARM_CCI5xx_PMU is not set\n# CONFIG_ARM_CCN is not set\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_VEXPRESS_CONFIG is not set\nCONFIG_CONNECTOR=y\nCONFIG_PROC_EVENTS=y\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\nCONFIG_MTD_CMDLINE_PARTS=y\n# CONFIG_MTD_AFS_PARTS is not set\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AR7_PARTS is not set\n\n#\n# User Modules And Translation Layers\n#\nCONFIG_MTD_BLKDEVS=y\nCONFIG_MTD_BLOCK=y\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\nCONFIG_MTD_OOPS=y\n# CONFIG_MTD_SWAP is not set\n# CONFIG_MTD_PARTITIONED_MASTER is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\n# CONFIG_MTD_CFI is not set\n# CONFIG_MTD_JEDECPROBE is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\n# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set\n# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set\n# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\n# CONFIG_MTD_CFI_I4 is not set\n# CONFIG_MTD_CFI_I8 is not set\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_INTEL_VR_NOR is not set\n# CONFIG_MTD_PLATRAM is not set\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_PMC551 is not set\n# CONFIG_MTD_DATAFLASH is not set\n# CONFIG_MTD_M25P80 is not set\n# CONFIG_MTD_SST25L is not set\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\nCONFIG_MTD_NAND_IDS=y\nCONFIG_MTD_NAND_ECC=y\n# CONFIG_MTD_NAND_ECC_SMC is not set\nCONFIG_MTD_NAND=y\n# CONFIG_MTD_NAND_ECC_BCH is not set\n# CONFIG_MTD_SM_COMMON is not set\n# CONFIG_MTD_NAND_DENALI_PCI is not set\n# CONFIG_MTD_NAND_DENALI_DT is not set\n# CONFIG_MTD_NAND_GPIO is not set\n# CONFIG_MTD_NAND_OMAP_BCH_BUILD is not set\n# CONFIG_MTD_NAND_RICOH is not set\n# CONFIG_MTD_NAND_DISKONCHIP is not set\n# CONFIG_MTD_NAND_DOCG4 is not set\n# CONFIG_MTD_NAND_CAFE is not set\n# CONFIG_MTD_NAND_NANDSIM is not set\n# CONFIG_MTD_NAND_BRCMNAND is not set\n# CONFIG_MTD_NAND_PLATFORM is not set\n# CONFIG_MTD_NAND_HISI504 is not set\n# CONFIG_MTD_NAND_MTK is not set\n# CONFIG_MTD_ONENAND is not set\n\n#\n# LPDDR & LPDDR2 PCM memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\n# CONFIG_MTD_LPDDR2_NVM is not set\nCONFIG_MTD_SPI_NOR=y\n# CONFIG_MTD_MT81xx_NOR is not set\nCONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y\n# CONFIG_SPI_CADENCE_QUADSPI is not set\nCONFIG_MTD_UBI=y\nCONFIG_MTD_UBI_WL_THRESHOLD=4096\nCONFIG_MTD_UBI_BEB_LIMIT=20\n# CONFIG_MTD_UBI_FASTMAP is not set\n# CONFIG_MTD_UBI_GLUEBI is not set\n# CONFIG_MTD_UBI_BLOCK is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_ADDRESS_PCI=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_NET=y\nCONFIG_OF_MDIO=y\nCONFIG_OF_PCI=y\nCONFIG_OF_PCI_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\n# CONFIG_OF_OVERLAY is not set\nCONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\n# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set\nCONFIG_ZRAM=m\n# CONFIG_ZRAM_WRITEBACK is not set\n# CONFIG_ZRAM_MEMORY_TRACKING is not set\n# CONFIG_BLK_CPQ_CISS_DA is not set\n# CONFIG_BLK_DEV_DAC960 is not set\n# CONFIG_BLK_DEV_UMEM is not set\n# CONFIG_BLK_DEV_COW_COMMON is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=8\n# CONFIG_BLK_DEV_CRYPTOLOOP is not set\nCONFIG_BLK_DEV_DRBD=m\n# CONFIG_DRBD_FAULT_INJECTION is not set\nCONFIG_BLK_DEV_NBD=m\n# CONFIG_BLK_DEV_OSD is not set\n# CONFIG_BLK_DEV_SX8 is not set\nCONFIG_BLK_DEV_RAM=m\nCONFIG_BLK_DEV_RAM_COUNT=16\nCONFIG_BLK_DEV_RAM_SIZE=4096\nCONFIG_CDROM_PKTCDVD=m\nCONFIG_CDROM_PKTCDVD_BUFFERS=8\nCONFIG_CDROM_PKTCDVD_WCACHE=y\nCONFIG_ATA_OVER_ETH=m\n# CONFIG_MG_DISK is not set\nCONFIG_VIRTIO_BLK=y\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_RSXX is not set\nCONFIG_NVME_CORE=y\nCONFIG_BLK_DEV_NVME=y\nCONFIG_BLK_DEV_NVME_SCSI=y\nCONFIG_NVME_FABRICS=y\nCONFIG_NVME_TARGET=y\nCONFIG_NVME_TARGET_LOOP=y\n\n#\n# Misc devices\n#\nCONFIG_SENSORS_LIS3LV02D=m\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_PHANTOM is not set\n# CONFIG_SGI_IOC4 is not set\n# CONFIG_TIFM_CORE is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_HP_ILO is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_TI_DAC7512 is not set\n# CONFIG_USB_SWITCH_FSA9480 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\n# CONFIG_SRAM is not set\nCONFIG_UID_SYS_STATS=y\n# CONFIG_UID_SYS_STATS_DEBUG is not set\n# CONFIG_MEMORY_STATE_TIME is not set\nCONFIG_KHADAS_MCU=y\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\nCONFIG_EEPROM_AT24=y\nCONFIG_EEPROM_AT25=m\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_CB710_CORE is not set\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\nCONFIG_SENSORS_LIS3_SPI=m\nCONFIG_SENSORS_LIS3_I2C=m\n\n#\n# Altera FPGA firmware download module\n#\n# CONFIG_ALTERA_STAPL is not set\n\n#\n# Intel MIC Bus Driver\n#\n\n#\n# SCIF Bus Driver\n#\n\n#\n# VOP Bus Driver\n#\n\n#\n# Intel MIC Host Driver\n#\n\n#\n# Intel MIC Card Driver\n#\n\n#\n# SCIF Driver\n#\n\n#\n# Intel MIC Coprocessor State Management (COSM) Drivers\n#\n\n#\n# VOP Driver\n#\n# CONFIG_ECHO is not set\n# CONFIG_CXL_BASE is not set\n# CONFIG_CXL_AFU_DRIVER_OPS is not set\nCONFIG_HAVE_IDE=y\n# CONFIG_IDE is not set\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_NETLINK is not set\nCONFIG_SCSI_MQ_DEFAULT=y\nCONFIG_SCSI_PROC_FS=y\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\n# CONFIG_CHR_DEV_OSST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_BLK_DEV_SR_VENDOR=y\nCONFIG_CHR_DEV_SG=y\nCONFIG_CHR_DEV_SCH=m\nCONFIG_SCSI_CONSTANTS=y\nCONFIG_SCSI_LOGGING=y\nCONFIG_SCSI_SCAN_ASYNC=y\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_CXGB3_ISCSI is not set\n# CONFIG_SCSI_CXGB4_ISCSI is not set\n# CONFIG_SCSI_BNX2_ISCSI is not set\n# CONFIG_BE2ISCSI is not set\n# CONFIG_BLK_DEV_3W_XXXX_RAID is not set\n# CONFIG_SCSI_HPSA is not set\n# CONFIG_SCSI_3W_9XXX is not set\n# CONFIG_SCSI_3W_SAS is not set\n# CONFIG_SCSI_ACARD is not set\n# CONFIG_SCSI_AACRAID is not set\n# CONFIG_SCSI_AIC7XXX is not set\n# CONFIG_SCSI_AIC79XX is not set\n# CONFIG_SCSI_AIC94XX is not set\n# CONFIG_SCSI_MVSAS is not set\n# CONFIG_SCSI_MVUMI is not set\n# CONFIG_SCSI_ADVANSYS is not set\n# CONFIG_SCSI_ARCMSR is not set\n# CONFIG_SCSI_ESAS2R is not set\n# CONFIG_MEGARAID_NEWGEN is not set\n# CONFIG_MEGARAID_LEGACY is not set\n# CONFIG_MEGARAID_SAS is not set\n# CONFIG_SCSI_MPT3SAS is not set\n# CONFIG_SCSI_MPT2SAS is not set\n# CONFIG_SCSI_SMARTPQI is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_SCSI_HPTIOP is not set\n# CONFIG_SCSI_SNIC is not set\n# CONFIG_SCSI_DMX3191D is not set\n# CONFIG_SCSI_FUTURE_DOMAIN is not set\n# CONFIG_SCSI_IPS is not set\n# CONFIG_SCSI_INITIO is not set\n# CONFIG_SCSI_INIA100 is not set\n# CONFIG_SCSI_STEX is not set\n# CONFIG_SCSI_SYM53C8XX_2 is not set\n# CONFIG_SCSI_IPR is not set\n# CONFIG_SCSI_QLOGIC_1280 is not set\n# CONFIG_SCSI_QLA_ISCSI is not set\n# CONFIG_SCSI_DC395x is not set\n# CONFIG_SCSI_AM53C974 is not set\n# CONFIG_SCSI_NSP32 is not set\n# CONFIG_SCSI_WD719X is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_PMCRAID is not set\n# CONFIG_SCSI_PM8001 is not set\n# CONFIG_SCSI_VIRTIO is not set\n# CONFIG_SCSI_DH is not set\nCONFIG_SCSI_OSD_INITIATOR=m\nCONFIG_SCSI_OSD_ULD=m\nCONFIG_SCSI_OSD_DPRINT_SENSE=1\n# CONFIG_SCSI_OSD_DEBUG is not set\nCONFIG_ATA=y\n# CONFIG_ATA_NONSTANDARD is not set\nCONFIG_ATA_VERBOSE_ERROR=y\nCONFIG_SATA_PMP=y\n\n#\n# Controllers with non-SFF native interface\n#\n# CONFIG_SATA_AHCI is not set\n# CONFIG_SATA_AHCI_PLATFORM is not set\n# CONFIG_AHCI_CEVA is not set\n# CONFIG_AHCI_QORIQ is not set\n# CONFIG_SATA_INIC162X is not set\n# CONFIG_SATA_ACARD_AHCI is not set\n# CONFIG_SATA_SIL24 is not set\nCONFIG_ATA_SFF=y\n\n#\n# SFF controllers with custom DMA interface\n#\n# CONFIG_PDC_ADMA is not set\n# CONFIG_SATA_QSTOR is not set\n# CONFIG_SATA_SX4 is not set\nCONFIG_ATA_BMDMA=y\n\n#\n# SATA SFF controllers with BMDMA\n#\n# CONFIG_ATA_PIIX is not set\n# CONFIG_SATA_MV is not set\n# CONFIG_SATA_NV is not set\n# CONFIG_SATA_PROMISE is not set\n# CONFIG_SATA_SIL is not set\n# CONFIG_SATA_SIS is not set\n# CONFIG_SATA_SVW is not set\n# CONFIG_SATA_ULI is not set\n# CONFIG_SATA_VIA is not set\n# CONFIG_SATA_VITESSE is not set\n\n#\n# PATA SFF controllers with BMDMA\n#\n# CONFIG_PATA_ALI is not set\n# CONFIG_PATA_AMD is not set\n# CONFIG_PATA_ARTOP is not set\n# CONFIG_PATA_ATIIXP is not set\n# CONFIG_PATA_ATP867X is not set\n# CONFIG_PATA_CMD64X is not set\n# CONFIG_PATA_CYPRESS is not set\n# CONFIG_PATA_EFAR is not set\n# CONFIG_PATA_HPT366 is not set\n# CONFIG_PATA_HPT37X is not set\n# CONFIG_PATA_HPT3X2N is not set\n# CONFIG_PATA_HPT3X3 is not set\n# CONFIG_PATA_IT8213 is not set\n# CONFIG_PATA_IT821X is not set\n# CONFIG_PATA_JMICRON is not set\n# CONFIG_PATA_MARVELL is not set\n# CONFIG_PATA_NETCELL is not set\n# CONFIG_PATA_NINJA32 is not set\n# CONFIG_PATA_NS87415 is not set\n# CONFIG_PATA_OLDPIIX is not set\n# CONFIG_PATA_OPTIDMA is not set\n# CONFIG_PATA_PDC2027X is not set\n# CONFIG_PATA_PDC_OLD is not set\n# CONFIG_PATA_RADISYS is not set\n# CONFIG_PATA_RDC is not set\n# CONFIG_PATA_SCH is not set\n# CONFIG_PATA_SERVERWORKS is not set\n# CONFIG_PATA_SIL680 is not set\n# CONFIG_PATA_SIS is not set\n# CONFIG_PATA_TOSHIBA is not set\n# CONFIG_PATA_TRIFLEX is not set\n# CONFIG_PATA_VIA is not set\n# CONFIG_PATA_WINBOND is not set\n\n#\n# PIO-only SFF controllers\n#\n# CONFIG_PATA_CMD640_PCI is not set\n# CONFIG_PATA_MPIIX is not set\n# CONFIG_PATA_NS87410 is not set\n# CONFIG_PATA_OPTI is not set\n# CONFIG_PATA_PLATFORM is not set\n# CONFIG_PATA_RZ1000 is not set\n\n#\n# Generic fallback / legacy drivers\n#\n# CONFIG_ATA_GENERIC is not set\n# CONFIG_PATA_LEGACY is not set\nCONFIG_MD=y\nCONFIG_BLK_DEV_MD=m\nCONFIG_MD_LINEAR=m\nCONFIG_MD_RAID0=m\nCONFIG_MD_RAID1=m\nCONFIG_MD_RAID10=m\nCONFIG_MD_RAID456=m\nCONFIG_MD_MULTIPATH=m\nCONFIG_MD_FAULTY=m\nCONFIG_BCACHE=m\n# CONFIG_BCACHE_DEBUG is not set\n# CONFIG_BCACHE_CLOSURES_DEBUG is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\nCONFIG_DM_MQ_DEFAULT=y\nCONFIG_DM_DEBUG=y\nCONFIG_DM_BUFIO=m\nCONFIG_DM_DEBUG_BLOCK_STACK_TRACING=y\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\nCONFIG_DM_CRYPT=m\nCONFIG_DM_SNAPSHOT=m\nCONFIG_DM_THIN_PROVISIONING=m\nCONFIG_DM_CACHE=m\nCONFIG_DM_CACHE_SMQ=m\nCONFIG_DM_CACHE_CLEANER=m\nCONFIG_DM_ERA=m\nCONFIG_DM_MIRROR=m\nCONFIG_DM_LOG_USERSPACE=m\nCONFIG_DM_RAID=m\nCONFIG_DM_ZERO=m\nCONFIG_DM_MULTIPATH=m\nCONFIG_DM_MULTIPATH_QL=m\nCONFIG_DM_MULTIPATH_ST=m\nCONFIG_DM_DELAY=m\nCONFIG_DM_UEVENT=y\nCONFIG_DM_FLAKEY=m\nCONFIG_DM_VERITY=m\nCONFIG_DM_VERITY_FEC=y\n# CONFIG_DM_SWITCH is not set\nCONFIG_DM_LOG_WRITES=m\nCONFIG_DM_VERITY_AVB=m\n# CONFIG_DM_ANDROID_VERITY_AT_MOST_ONCE_DEFAULT_ENABLED is not set\n# CONFIG_DM_BOW is not set\n# CONFIG_TARGET_CORE is not set\n# CONFIG_FUSION is not set\n\n#\n# IEEE 1394 (FireWire) support\n#\n# CONFIG_FIREWIRE is not set\n# CONFIG_FIREWIRE_NOSY is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\nCONFIG_BONDING=m\nCONFIG_DUMMY=m\nCONFIG_EQUALIZER=m\n# CONFIG_NET_FC is not set\nCONFIG_NET_TEAM=m\nCONFIG_NET_TEAM_MODE_BROADCAST=m\nCONFIG_NET_TEAM_MODE_ROUNDROBIN=m\nCONFIG_NET_TEAM_MODE_RANDOM=m\nCONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m\nCONFIG_NET_TEAM_MODE_LOADBALANCE=m\nCONFIG_MACVLAN=m\nCONFIG_MACVTAP=m\nCONFIG_IPVLAN=m\nCONFIG_VXLAN=m\nCONFIG_GENEVE=m\nCONFIG_GTP=m\nCONFIG_MACSEC=m\nCONFIG_NETCONSOLE=m\n# CONFIG_NETCONSOLE_DYNAMIC is not set\nCONFIG_NETPOLL=y\nCONFIG_NET_POLL_CONTROLLER=y\nCONFIG_TUN=m\nCONFIG_TUN_VNET_CROSS_LE=y\nCONFIG_VETH=y\nCONFIG_VIRTIO_NET=m\n# CONFIG_NLMON is not set\n# CONFIG_ARCNET is not set\n\n#\n# CAIF transport drivers\n#\n\n#\n# Distributed Switch Architecture drivers\n#\nCONFIG_ETHERNET=y\n# CONFIG_NET_VENDOR_3COM is not set\n# CONFIG_NET_VENDOR_ADAPTEC is not set\n# CONFIG_NET_VENDOR_AGERE is not set\n# CONFIG_NET_VENDOR_ALTEON is not set\n# CONFIG_ALTERA_TSE is not set\n# CONFIG_NET_VENDOR_AMAZON is not set\n# CONFIG_NET_VENDOR_AMD is not set\n# CONFIG_NET_VENDOR_ARC is not set\n# CONFIG_NET_VENDOR_ATHEROS is not set\n# CONFIG_NET_VENDOR_AURORA is not set\n# CONFIG_NET_CADENCE is not set\n# CONFIG_NET_VENDOR_BROADCOM is not set\n# CONFIG_NET_VENDOR_BROCADE is not set\n# CONFIG_NET_VENDOR_CAVIUM is not set\n# CONFIG_NET_VENDOR_CHELSIO is not set\n# CONFIG_NET_VENDOR_CIRRUS is not set\n# CONFIG_NET_VENDOR_CISCO is not set\n# CONFIG_DM9000 is not set\n# CONFIG_DNET is not set\n# CONFIG_NET_VENDOR_DEC is not set\n# CONFIG_NET_VENDOR_DLINK is not set\n# CONFIG_NET_VENDOR_EMULEX is not set\n# CONFIG_NET_VENDOR_EZCHIP is not set\n# CONFIG_NET_VENDOR_EXAR is not set\n# CONFIG_NET_VENDOR_FARADAY is not set\n# CONFIG_NET_VENDOR_HISILICON is not set\n# CONFIG_NET_VENDOR_HP is not set\nCONFIG_NET_VENDOR_INTEL=y\n# CONFIG_E100 is not set\n# CONFIG_E1000 is not set\n# CONFIG_E1000E is not set\n# CONFIG_IGB is not set\n# CONFIG_IGBVF is not set\n# CONFIG_IXGB is not set\n# CONFIG_IXGBE is not set\n# CONFIG_IXGBEVF is not set\n# CONFIG_I40E is not set\n# CONFIG_I40EVF is not set\n# CONFIG_FM10K is not set\nCONFIG_NET_VENDOR_I825XX=y\n# CONFIG_JME is not set\nCONFIG_NET_VENDOR_MARVELL=y\n# CONFIG_MVMDIO is not set\n# CONFIG_MVNETA_BM is not set\n# CONFIG_SKGE is not set\n# CONFIG_SKY2 is not set\n# CONFIG_NET_VENDOR_MELLANOX is not set\nCONFIG_NET_VENDOR_MICREL=y\n# CONFIG_KS8851 is not set\n# CONFIG_KS8851_MLL is not set\n# CONFIG_KSZ884X_PCI is not set\nCONFIG_NET_VENDOR_MICROCHIP=y\n# CONFIG_ENC28J60 is not set\n# CONFIG_ENCX24J600 is not set\n# CONFIG_NET_VENDOR_MYRI is not set\n# CONFIG_FEALNX is not set\nCONFIG_NET_VENDOR_NATSEMI=y\n# CONFIG_NATSEMI is not set\n# CONFIG_NS83820 is not set\nCONFIG_NET_VENDOR_NETRONOME=y\n# CONFIG_NFP_NETVF is not set\nCONFIG_NET_VENDOR_8390=y\n# CONFIG_AX88796 is not set\n# CONFIG_NE2K_PCI is not set\n# CONFIG_NET_VENDOR_NVIDIA is not set\n# CONFIG_NET_VENDOR_OKI is not set\n# CONFIG_ETHOC is not set\n# CONFIG_NET_PACKET_ENGINE is not set\n# CONFIG_NET_VENDOR_QLOGIC is not set\nCONFIG_NET_VENDOR_QUALCOMM=y\n# CONFIG_QCA7000 is not set\n# CONFIG_QCOM_EMAC is not set\nCONFIG_NET_VENDOR_REALTEK=y\n# CONFIG_8139CP is not set\n# CONFIG_8139TOO is not set\nCONFIG_R8169=m\nCONFIG_NET_VENDOR_RENESAS=y\n# CONFIG_NET_VENDOR_RDC is not set\nCONFIG_NET_VENDOR_ROCKER=y\nCONFIG_NET_VENDOR_SAMSUNG=y\n# CONFIG_SXGBE_ETH is not set\nCONFIG_NET_VENDOR_SEEQ=y\n# CONFIG_NET_VENDOR_SILAN is not set\n# CONFIG_NET_VENDOR_SIS is not set\n# CONFIG_SFC is not set\nCONFIG_NET_VENDOR_SMSC=y\n# CONFIG_SMC91X is not set\n# CONFIG_EPIC100 is not set\n# CONFIG_SMC911X is not set\n# CONFIG_SMSC911X is not set\n# CONFIG_SMSC9420 is not set\nCONFIG_NET_VENDOR_STMICRO=y\nCONFIG_STMMAC_ETH=y\nCONFIG_STMMAC_PLATFORM=y\nCONFIG_STMMAC_JL2XX1=y\nCONFIG_DWMAC_GENERIC=y\nCONFIG_DWMAC_MESON=y\nCONFIG_AMLOGIC_ETH_PRIVE=y\n# CONFIG_STMMAC_PCI is not set\n# CONFIG_NET_VENDOR_SUN is not set\nCONFIG_NET_VENDOR_SYNOPSYS=y\n# CONFIG_SYNOPSYS_DWC_ETH_QOS is not set\n# CONFIG_NET_VENDOR_TEHUTI is not set\n# CONFIG_NET_VENDOR_TI is not set\nCONFIG_NET_VENDOR_VIA=y\n# CONFIG_VIA_RHINE is not set\n# CONFIG_VIA_VELOCITY is not set\nCONFIG_NET_VENDOR_WIZNET=y\n# CONFIG_WIZNET_W5100 is not set\n# CONFIG_WIZNET_W5300 is not set\n# CONFIG_FDDI is not set\n# CONFIG_HIPPI is not set\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n\n#\n# MDIO bus device drivers\n#\n# CONFIG_MDIO_BCM_UNIMAC is not set\n# CONFIG_MDIO_BITBANG is not set\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n# CONFIG_MDIO_HISI_FEMAC is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\nCONFIG_FIXED_PHY=y\nCONFIG_ICPLUS_PHY=y\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MICREL_PHY is not set\nCONFIG_MICROCHIP_PHY=m\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_QSEMI_PHY is not set\nCONFIG_REALTEK_PHY=y\nCONFIG_MAXIO_PHY=y\n# CONFIG_SMSC_PHY is not set\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\nCONFIG_PPP=m\nCONFIG_PPP_BSDCOMP=m\nCONFIG_PPP_DEFLATE=m\nCONFIG_PPP_FILTER=y\nCONFIG_PPP_MPPE=m\nCONFIG_PPP_MULTILINK=y\nCONFIG_PPPOE=m\nCONFIG_PPPOLAC=m\nCONFIG_PPPOPNS=m\nCONFIG_PPP_ASYNC=m\nCONFIG_PPP_SYNC_TTY=m\nCONFIG_SLIP=m\nCONFIG_SLHC=m\nCONFIG_SLIP_COMPRESSED=y\nCONFIG_SLIP_SMART=y\nCONFIG_SLIP_MODE_SLIP6=y\nCONFIG_USB_NET_DRIVERS=y\nCONFIG_USB_CATC=m\nCONFIG_USB_KAWETH=m\nCONFIG_USB_PEGASUS=m\nCONFIG_USB_RTL8150=m\n# CONFIG_USB_RTL8152 is not set\nCONFIG_USB_LAN78XX=m\nCONFIG_USB_USBNET=m\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\nCONFIG_USB_NET_CDC_EEM=m\nCONFIG_USB_NET_CDC_NCM=m\nCONFIG_USB_NET_HUAWEI_CDC_NCM=m\nCONFIG_USB_NET_CDC_MBIM=m\nCONFIG_USB_NET_DM9601=m\nCONFIG_USB_NET_SR9700=m\nCONFIG_USB_NET_SR9800=m\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=m\nCONFIG_USB_NET_GL620A=m\nCONFIG_USB_NET_NET1080=m\nCONFIG_USB_NET_PLUSB=m\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\nCONFIG_USB_NET_CDC_SUBSET_ENABLE=m\nCONFIG_USB_NET_CDC_SUBSET=m\nCONFIG_USB_ALI_M5632=y\nCONFIG_USB_AN2720=y\nCONFIG_USB_BELKIN=y\nCONFIG_USB_ARMLINUX=y\nCONFIG_USB_EPSON2888=y\nCONFIG_USB_KC2190=y\nCONFIG_USB_NET_ZAURUS=m\nCONFIG_USB_NET_CX82310_ETH=m\nCONFIG_USB_NET_KALMIA=m\nCONFIG_USB_NET_QMI_WWAN=m\nCONFIG_USB_HSO=m\nCONFIG_USB_NET_INT51X1=m\nCONFIG_USB_IPHETH=m\nCONFIG_USB_SIERRA_NET=m\nCONFIG_USB_VL600=m\nCONFIG_USB_NET_CH9200=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\n# CONFIG_ADM8211 is not set\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\n# CONFIG_ATH5K is not set\n# CONFIG_ATH5K_PCI is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\nCONFIG_ATH9K=m\n# CONFIG_ATH9K_PCI is not set\n# CONFIG_ATH9K_AHB is not set\n# CONFIG_ATH9K_DEBUGFS is not set\n# CONFIG_ATH9K_DYNACK is not set\n# CONFIG_ATH9K_WOW is not set\nCONFIG_ATH9K_RFKILL=y\n# CONFIG_ATH9K_CHANNEL_CONTEXT is not set\nCONFIG_ATH9K_PCOEM=y\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\n# CONFIG_ATH9K_HWRNG is not set\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\n# CONFIG_CARL9170_HWRNG is not set\n# CONFIG_ATH6KL is not set\nCONFIG_AR5523=m\n# CONFIG_WIL6210 is not set\nCONFIG_ATH10K=m\n# CONFIG_ATH10K_PCI is not set\n# CONFIG_ATH10K_DEBUG is not set\n# CONFIG_ATH10K_DEBUGFS is not set\n# CONFIG_ATH10K_TRACING is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\n# CONFIG_ATMEL is not set\nCONFIG_AT76C50X_USB=m\nCONFIG_WLAN_VENDOR_BROADCOM=y\n# CONFIG_B43 is not set\n# CONFIG_B43LEGACY is not set\n# CONFIG_BRCMSMAC is not set\n# CONFIG_BRCMFMAC is not set\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\n# CONFIG_IPW2100 is not set\n# CONFIG_IPW2200 is not set\n# CONFIG_IWL4965 is not set\n# CONFIG_IWL3945 is not set\n# CONFIG_IWLWIFI is not set\nCONFIG_WLAN_VENDOR_INTERSIL=y\n# CONFIG_HOSTAP is not set\n# CONFIG_HERMES is not set\n# CONFIG_P54_COMMON is not set\n# CONFIG_PRISM54 is not set\nCONFIG_WLAN_VENDOR_MARVELL=y\n# CONFIG_LIBERTAS is not set\n# CONFIG_LIBERTAS_THINFIRM is not set\n# CONFIG_MWIFIEX is not set\n# CONFIG_MWL8K is not set\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\n# CONFIG_RT2400PCI is not set\n# CONFIG_RT2500PCI is not set\n# CONFIG_RT61PCI is not set\n# CONFIG_RT2800PCI is not set\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\n# CONFIG_RTL8180 is not set\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=y\n# CONFIG_RTL8192CE is not set\n# CONFIG_RTL8192SE is not set\n# CONFIG_RTL8192DE is not set\n# CONFIG_RTL8723AE is not set\n# CONFIG_RTL8723BE is not set\n# CONFIG_RTL8188EE is not set\n# CONFIG_RTL8192EE is not set\n# CONFIG_RTL8821AE is not set\n# CONFIG_RTL8192CU is not set\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\nCONFIG_WLAN_VENDOR_RSI=y\n# CONFIG_RSI_91X is not set\nCONFIG_WLAN_VENDOR_ST=y\n# CONFIG_CW1200 is not set\nCONFIG_WLAN_VENDOR_TI=y\n# CONFIG_WL1251 is not set\n# CONFIG_WL12XX is not set\n# CONFIG_WL18XX is not set\n# CONFIG_WLCORE is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\nCONFIG_USB_ZD1201=m\nCONFIG_ZD1211RW=m\n# CONFIG_ZD1211RW_DEBUG is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n\n#\n# Enable WiMAX (Networking options) to see the WiMAX drivers\n#\n# CONFIG_WAN is not set\n# CONFIG_VMXNET3 is not set\n# CONFIG_ISDN is not set\n# CONFIG_NVM is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\nCONFIG_INPUT_POLLDEV=y\n# CONFIG_INPUT_SPARSEKMAP is not set\n# CONFIG_INPUT_MATRIXKMAP is not set\n\n#\n# Userland interfaces\n#\nCONFIG_INPUT_MOUSEDEV=y\nCONFIG_INPUT_MOUSEDEV_PSAUX=y\nCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024\nCONFIG_INPUT_MOUSEDEV_SCREEN_Y=768\nCONFIG_INPUT_JOYDEV=m\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n# CONFIG_INPUT_KEYRESET is not set\n# CONFIG_INPUT_KEYCOMBO is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADC is not set\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\nCONFIG_KEYBOARD_ATKBD=y\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\n# CONFIG_KEYBOARD_GPIO is not set\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\nCONFIG_INPUT_MOUSE=y\nCONFIG_MOUSE_PS2=y\nCONFIG_MOUSE_PS2_ALPS=y\nCONFIG_MOUSE_PS2_BYD=y\nCONFIG_MOUSE_PS2_LOGIPS2PP=y\nCONFIG_MOUSE_PS2_SYNAPTICS=y\nCONFIG_MOUSE_PS2_CYPRESS=y\nCONFIG_MOUSE_PS2_TRACKPOINT=y\n# CONFIG_MOUSE_PS2_ELANTECH is not set\n# CONFIG_MOUSE_PS2_SENTELIC is not set\n# CONFIG_MOUSE_PS2_TOUCHKIT is not set\nCONFIG_MOUSE_PS2_FOCALTECH=y\n# CONFIG_MOUSE_SERIAL is not set\n# CONFIG_MOUSE_APPLETOUCH is not set\n# CONFIG_MOUSE_BCM5974 is not set\n# CONFIG_MOUSE_CYAPA is not set\n# CONFIG_MOUSE_ELAN_I2C is not set\n# CONFIG_MOUSE_VSXXXAA is not set\n# CONFIG_MOUSE_GPIO is not set\n# CONFIG_MOUSE_SYNAPTICS_I2C is not set\n# CONFIG_MOUSE_SYNAPTICS_USB is not set\nCONFIG_INPUT_JOYSTICK=y\nCONFIG_JOYSTICK_ANALOG=m\nCONFIG_JOYSTICK_A3D=m\nCONFIG_JOYSTICK_ADI=m\nCONFIG_JOYSTICK_COBRA=m\nCONFIG_JOYSTICK_GF2K=m\nCONFIG_JOYSTICK_GRIP=m\nCONFIG_JOYSTICK_GRIP_MP=m\nCONFIG_JOYSTICK_GUILLEMOT=m\nCONFIG_JOYSTICK_INTERACT=m\nCONFIG_JOYSTICK_SIDEWINDER=m\nCONFIG_JOYSTICK_TMDC=m\nCONFIG_JOYSTICK_IFORCE=m\nCONFIG_JOYSTICK_IFORCE_USB=y\nCONFIG_JOYSTICK_IFORCE_232=y\nCONFIG_JOYSTICK_WARRIOR=m\nCONFIG_JOYSTICK_MAGELLAN=m\nCONFIG_JOYSTICK_SPACEORB=m\nCONFIG_JOYSTICK_SPACEBALL=m\nCONFIG_JOYSTICK_STINGER=m\nCONFIG_JOYSTICK_TWIDJOY=m\nCONFIG_JOYSTICK_ZHENHUA=m\nCONFIG_JOYSTICK_AS5011=m\nCONFIG_JOYSTICK_JOYDUMP=m\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\n# CONFIG_INPUT_TABLET is not set\nCONFIG_INPUT_TOUCHSCREEN=y\nCONFIG_TOUCHSCREEN_PROPERTIES=y\nCONFIG_TOUCHSCREEN_ADS7846=m\n# CONFIG_TOUCHSCREEN_AD7877 is not set\n# CONFIG_TOUCHSCREEN_AD7879 is not set\n# CONFIG_TOUCHSCREEN_AR1021_I2C is not set\n# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set\n# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_BU21013 is not set\n# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set\n# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set\n# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set\n# CONFIG_TOUCHSCREEN_DYNAPRO is not set\n# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set\n# CONFIG_TOUCHSCREEN_EETI is not set\n# CONFIG_TOUCHSCREEN_EGALAX is not set\n# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set\n# CONFIG_TOUCHSCREEN_FUJITSU is not set\n# CONFIG_TOUCHSCREEN_GOODIX is not set\n# CONFIG_TOUCHSCREEN_ILI210X is not set\n# CONFIG_TOUCHSCREEN_GUNZE is not set\n# CONFIG_TOUCHSCREEN_EKTF2127 is not set\n# CONFIG_TOUCHSCREEN_ELAN is not set\n# CONFIG_TOUCHSCREEN_ELO is not set\n# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set\n# CONFIG_TOUCHSCREEN_WACOM_I2C is not set\n# CONFIG_TOUCHSCREEN_MAX11801 is not set\n# CONFIG_TOUCHSCREEN_MCS5000 is not set\n# CONFIG_TOUCHSCREEN_MMS114 is not set\n# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set\n# CONFIG_TOUCHSCREEN_MTOUCH is not set\n# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set\n# CONFIG_TOUCHSCREEN_INEXIO is not set\n# CONFIG_TOUCHSCREEN_MK712 is not set\n# CONFIG_TOUCHSCREEN_PENMOUNT is not set\n# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set\n# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set\n# CONFIG_TOUCHSCREEN_TOUCHWIN is not set\n# CONFIG_TOUCHSCREEN_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set\n# CONFIG_TOUCHSCREEN_WM97XX is not set\n# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set\n# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set\n# CONFIG_TOUCHSCREEN_TSC_SERIO is not set\n# CONFIG_TOUCHSCREEN_TSC2004 is not set\n# CONFIG_TOUCHSCREEN_TSC2005 is not set\n# CONFIG_TOUCHSCREEN_TSC2007 is not set\n# CONFIG_TOUCHSCREEN_RM_TS is not set\n# CONFIG_TOUCHSCREEN_SILEAD is not set\n# CONFIG_TOUCHSCREEN_SIS_I2C is not set\n# CONFIG_TOUCHSCREEN_ST1232 is not set\n# CONFIG_TOUCHSCREEN_SUR40 is not set\n# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set\n# CONFIG_TOUCHSCREEN_SX8654 is not set\n# CONFIG_TOUCHSCREEN_TPS6507X is not set\n# CONFIG_TOUCHSCREEN_ZFORCE is not set\nCONFIG_TOUCHSCREEN_DWAV_USB_MT=m\n# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_MPU3050 is not set\n# CONFIG_INPUT_GP2A is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_TILT_POLLED is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_GPIO is not set\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\n# CONFIG_RMI4_CORE is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_SERIO_SERPORT=y\n# CONFIG_SERIO_AMBAKMI is not set\n# CONFIG_SERIO_PCIPS2 is not set\nCONFIG_SERIO_LIBPS2=y\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_USERIO is not set\nCONFIG_GAMEPORT=m\n# CONFIG_GAMEPORT_NS558 is not set\n# CONFIG_GAMEPORT_L4 is not set\n# CONFIG_GAMEPORT_EMU10K1 is not set\n# CONFIG_GAMEPORT_FM801 is not set\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_NOZOMI is not set\n# CONFIG_N_GSM is not set\n# CONFIG_TRACE_SINK is not set\n# CONFIG_LDISC_AUTOLOAD is not set\nCONFIG_DEVMEM=y\nCONFIG_DEVKMEM=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\n# CONFIG_SERIAL_8250 is not set\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\n# CONFIG_SERIAL_AMBA_PL011 is not set\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MESON is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_JSM is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_BCM63XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_IFX6X60 is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_RP2 is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_ST_ASC is not set\n# CONFIG_SERIAL_STM32 is not set\n# CONFIG_TTY_PRINTK is not set\nCONFIG_HVC_DRIVER=y\n# CONFIG_HVC_DCC is not set\nCONFIG_VIRTIO_CONSOLE=m\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_VIRTIO is not set\nCONFIG_HW_RANDOM_MESON=y\n# CONFIG_APPLICOM is not set\n# CONFIG_RAW_DRIVER is not set\n# CONFIG_TCG_TPM is not set\nCONFIG_DEVPORT=y\n# CONFIG_XILLYBUS is not set\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\n# CONFIG_I2C_MUX_PINCTRL is not set\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_DEMUX_PINCTRL is not set\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# PC SMBus host controller drivers\n#\n# CONFIG_I2C_ALI1535 is not set\n# CONFIG_I2C_ALI1563 is not set\n# CONFIG_I2C_ALI15X3 is not set\n# CONFIG_I2C_AMD756 is not set\n# CONFIG_I2C_AMD8111 is not set\n# CONFIG_I2C_I801 is not set\n# CONFIG_I2C_ISCH is not set\n# CONFIG_I2C_PIIX4 is not set\n# CONFIG_I2C_NFORCE2 is not set\n# CONFIG_I2C_SIS5595 is not set\n# CONFIG_I2C_SIS630 is not set\n# CONFIG_I2C_SIS96X is not set\n# CONFIG_I2C_VIA is not set\n# CONFIG_I2C_VIAPRO is not set\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CBUS_GPIO is not set\n# CONFIG_I2C_DESIGNWARE_PLATFORM is not set\n# CONFIG_I2C_DESIGNWARE_PCI is not set\n# CONFIG_I2C_EMEV2 is not set\n# CONFIG_I2C_GPIO is not set\n# CONFIG_I2C_MESON is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_PXA_PCI is not set\n# CONFIG_I2C_RK3X is not set\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_PARPORT_LIGHT is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\nCONFIG_SPI=y\nCONFIG_SPI_DEBUG=y\nCONFIG_SPI_MASTER=y\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\nCONFIG_SPI_BITBANG=y\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_DESIGNWARE is not set\nCONFIG_SPI_GPIO=y\n# CONFIG_SPI_FSL_SPI is not set\nCONFIG_SPI_MESON_SPICC=m\nCONFIG_SPI_MESON_SPIFC=m\n# CONFIG_SPI_OC_TINY is not set\n# CONFIG_SPI_PL022 is not set\n# CONFIG_SPI_PXA2XX is not set\n# CONFIG_SPI_PXA2XX_PCI is not set\n# CONFIG_SPI_ROCKCHIP is not set\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=m\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_DYNAMIC is not set\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\n\n#\n# PPS support\n#\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\nCONFIG_PINCTRL=y\n\n#\n# Pin controllers\n#\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_AMD is not set\n# CONFIG_PINCTRL_SINGLE is not set\nCONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y\nCONFIG_GPIOLIB=y\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_SYSFS=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_DWAPB is not set\n# CONFIG_GPIO_EM is not set\n# CONFIG_GPIO_GENERIC_PLATFORM is not set\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_MPC8XXX is not set\n# CONFIG_GPIO_PL061 is not set\n# CONFIG_GPIO_SYSCON is not set\n# CONFIG_GPIO_VX855 is not set\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_ZEVIO is not set\n# CONFIG_GPIO_ZX is not set\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADP5588 is not set\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\nCONFIG_GPIO_PCA953X=y\n# CONFIG_GPIO_PCA953X_IRQ is not set\nCONFIG_GPIO_PCF857X=m\n# CONFIG_GPIO_SX150X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# CONFIG_GPIO_TS4900 is not set\n\n#\n# MFD GPIO expanders\n#\n# CONFIG_HTC_EGPIO is not set\n\n#\n# PCI GPIO expanders\n#\n# CONFIG_GPIO_AMD8111 is not set\n# CONFIG_GPIO_BT8XX is not set\n# CONFIG_GPIO_ML_IOH is not set\n# CONFIG_GPIO_RDC321X is not set\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n\n#\n# SPI or I2C GPIO expanders\n#\n# CONFIG_GPIO_MCP23S08 is not set\n\n#\n# USB GPIO expanders\n#\nCONFIG_W1=m\nCONFIG_W1_CON=y\n\n#\n# 1-wire Bus Masters\n#\n# CONFIG_W1_MASTER_MATROX is not set\n# CONFIG_W1_MASTER_DS2490 is not set\n# CONFIG_W1_MASTER_DS2482 is not set\n# CONFIG_W1_MASTER_DS1WM is not set\nCONFIG_W1_MASTER_GPIO=m\n\n#\n# 1-wire Slaves\n#\nCONFIG_W1_SLAVE_THERM=m\n# CONFIG_W1_SLAVE_SMEM is not set\n# CONFIG_W1_SLAVE_DS2408 is not set\n# CONFIG_W1_SLAVE_DS2413 is not set\n# CONFIG_W1_SLAVE_DS2406 is not set\n# CONFIG_W1_SLAVE_DS2423 is not set\n# CONFIG_W1_SLAVE_DS2431 is not set\n# CONFIG_W1_SLAVE_DS2433 is not set\n# CONFIG_W1_SLAVE_DS2760 is not set\n# CONFIG_W1_SLAVE_DS2780 is not set\n# CONFIG_W1_SLAVE_DS2781 is not set\n# CONFIG_W1_SLAVE_DS28E04 is not set\n# CONFIG_W1_SLAVE_BQ27000 is not set\n# CONFIG_POWER_AVS is not set\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_BRCMKONA is not set\n# CONFIG_POWER_RESET_BRCMSTB is not set\n# CONFIG_POWER_RESET_GPIO is not set\n# CONFIG_POWER_RESET_GPIO_RESTART is not set\n# CONFIG_POWER_RESET_LTC2952 is not set\n# CONFIG_POWER_RESET_RESTART is not set\n# CONFIG_POWER_RESET_VERSATILE is not set\n# CONFIG_POWER_RESET_SYSCON is not set\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\n# CONFIG_SYSCON_REBOOT_MODE is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_CHARGER_RT9455 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_VID is not set\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_ARM_SCPI is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_I5K_AMB is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\n# CONFIG_SENSORS_GPIO_FAN is not set\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IIO_HWMON is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\nCONFIG_SENSORS_PWM_FAN=y\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_SIS5595 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH56XX_COMMON is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS1015 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_VIA686A is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_VT8231 is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\nCONFIG_THERMAL_WRITABLE_TRIPS=y\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set\nCONFIG_THERMAL_GOV_FAIR_SHARE=y\nCONFIG_THERMAL_GOV_STEP_WISE=y\nCONFIG_THERMAL_GOV_BANG_BANG=y\nCONFIG_THERMAL_GOV_USER_SPACE=y\nCONFIG_THERMAL_GOV_POWER_ALLOCATOR=y\nCONFIG_CPU_THERMAL=y\n# CONFIG_CLOCK_THERMAL is not set\nCONFIG_DEVFREQ_THERMAL=y\n# CONFIG_THERMAL_EMULATION is not set\n# CONFIG_QORIQ_THERMAL is not set\n\n#\n# ACPI INT340X thermal drivers\n#\n# CONFIG_GENERIC_ADC_THERMAL is not set\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\n# CONFIG_WATCHDOG_SYSFS is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\n# CONFIG_DW_WATCHDOG is not set\n# CONFIG_MAX63XX_WATCHDOG is not set\n# CONFIG_MESON_GXBB_WATCHDOG is not set\n# CONFIG_MESON_WATCHDOG is not set\n# CONFIG_ALIM7101_WDT is not set\n# CONFIG_I6300ESB_WDT is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# PCI-based Watchdog Cards\n#\n# CONFIG_PCIPCWATCHDOG is not set\n# CONFIG_WDTPCI is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\nCONFIG_SSB_POSSIBLE=y\n\n#\n# Sonics Silicon Backplane\n#\n# CONFIG_SSB is not set\nCONFIG_BCMA_POSSIBLE=y\n\n#\n# Broadcom specific AMBA\n#\n# CONFIG_BCMA is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=m\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_AXP20X_I2C is not set\n# CONFIG_MFD_CROS_EC is not set\n# CONFIG_MFD_ASIC3 is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_EXYNOS_LPASS is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_LPC_ICH is not set\n# CONFIG_LPC_SCH is not set\n# CONFIG_INTEL_SOC_PMIC is not set\n# CONFIG_MFD_JANZ_CMODIO is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77620 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_UCB1400_CORE is not set\n# CONFIG_MFD_PM8921_CORE is not set\n# CONFIG_MFD_RDC321X is not set\n# CONFIG_MFD_RTSX_PCI is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RTSX_USB is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_RK808 is not set\n# CONFIG_MFD_RN5T618 is not set\n# CONFIG_MFD_SEC_CORE is not set\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_SMSC is not set\n# CONFIG_ABX500_CORE is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_MFD_TPS80031 is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_TMIO is not set\n# CONFIG_MFD_T7L66XB is not set\n# CONFIG_MFD_TC6387XB is not set\n# CONFIG_MFD_TC6393XB is not set\n# CONFIG_MFD_VX855 is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\n# CONFIG_REGULATOR_ANATOP is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\n# CONFIG_REGULATOR_GPIO is not set\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\nCONFIG_REGULATOR_PWM=y\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS6524X is not set\nCONFIG_MEDIA_SUPPORT=m\n\n#\n# Multimedia core support\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\n# CONFIG_MEDIA_RADIO_SUPPORT is not set\nCONFIG_MEDIA_SDR_SUPPORT=y\nCONFIG_MEDIA_RC_SUPPORT=y\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_MEDIA_CONTROLLER_DVB=y\nCONFIG_VIDEO_DEV=m\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\nCONFIG_VIDEO_V4L2=m\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\n# CONFIG_VIDEO_PCI_SKELETON is not set\nCONFIG_VIDEO_TUNER=m\nCONFIG_V4L2_MEM2MEM_DEV=m\nCONFIG_VIDEOBUF_GEN=m\nCONFIG_VIDEOBUF_VMALLOC=m\nCONFIG_VIDEOBUF_DVB=m\nCONFIG_VIDEOBUF2_CORE=m\nCONFIG_VIDEOBUF2_MEMOPS=m\nCONFIG_VIDEOBUF2_DMA_CONTIG=m\nCONFIG_VIDEOBUF2_VMALLOC=m\nCONFIG_DVB_CORE=m\nCONFIG_DVB_NET=y\nCONFIG_TTPCI_EEPROM=m\nCONFIG_DVB_MAX_ADAPTERS=8\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n\n#\n# Media drivers\n#\nCONFIG_RC_CORE=m\nCONFIG_RC_MAP=m\nCONFIG_RC_DECODERS=y\nCONFIG_IR_IRMP_DECODER=m\nCONFIG_LIRC=m\nCONFIG_IR_LIRC_CODEC=m\nCONFIG_IR_NEC_DECODER=m\nCONFIG_IR_RC5_DECODER=m\nCONFIG_IR_RC6_DECODER=m\nCONFIG_IR_JVC_DECODER=m\nCONFIG_IR_SONY_DECODER=m\nCONFIG_IR_SANYO_DECODER=m\nCONFIG_IR_SHARP_DECODER=m\nCONFIG_IR_MCE_KBD_DECODER=m\nCONFIG_IR_XMP_DECODER=m\nCONFIG_RC_DEVICES=y\nCONFIG_RC_ATI_REMOTE=m\n# CONFIG_IR_HIX5HD2 is not set\n# CONFIG_IR_IMON is not set\nCONFIG_IR_MCEUSB=m\nCONFIG_IR_MESON=m\n# CONFIG_IR_REDRAT3 is not set\n# CONFIG_IR_STREAMZAP is not set\n# CONFIG_IR_IGORPLUGUSB is not set\n# CONFIG_IR_IGUANA is not set\n# CONFIG_IR_TTUSBIR is not set\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_IR_GPIO_CIR=m\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\nCONFIG_USB_VIDEO_CLASS=m\nCONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y\nCONFIG_USB_GSPCA=m\nCONFIG_USB_M5602=m\nCONFIG_USB_STV06XX=m\nCONFIG_USB_GL860=m\nCONFIG_USB_GSPCA_BENQ=m\nCONFIG_USB_GSPCA_CONEX=m\nCONFIG_USB_GSPCA_CPIA1=m\nCONFIG_USB_GSPCA_DTCS033=m\nCONFIG_USB_GSPCA_ETOMS=m\nCONFIG_USB_GSPCA_FINEPIX=m\nCONFIG_USB_GSPCA_JEILINJ=m\nCONFIG_USB_GSPCA_JL2005BCD=m\nCONFIG_USB_GSPCA_KINECT=m\nCONFIG_USB_GSPCA_KONICA=m\nCONFIG_USB_GSPCA_MARS=m\nCONFIG_USB_GSPCA_MR97310A=m\nCONFIG_USB_GSPCA_NW80X=m\nCONFIG_USB_GSPCA_OV519=m\nCONFIG_USB_GSPCA_OV534=m\nCONFIG_USB_GSPCA_OV534_9=m\nCONFIG_USB_GSPCA_PAC207=m\nCONFIG_USB_GSPCA_PAC7302=m\nCONFIG_USB_GSPCA_PAC7311=m\nCONFIG_USB_GSPCA_SE401=m\nCONFIG_USB_GSPCA_SN9C2028=m\nCONFIG_USB_GSPCA_SN9C20X=m\nCONFIG_USB_GSPCA_SONIXB=m\nCONFIG_USB_GSPCA_SONIXJ=m\nCONFIG_USB_GSPCA_SPCA500=m\nCONFIG_USB_GSPCA_SPCA501=m\nCONFIG_USB_GSPCA_SPCA505=m\nCONFIG_USB_GSPCA_SPCA506=m\nCONFIG_USB_GSPCA_SPCA508=m\nCONFIG_USB_GSPCA_SPCA561=m\nCONFIG_USB_GSPCA_SPCA1528=m\nCONFIG_USB_GSPCA_SQ905=m\nCONFIG_USB_GSPCA_SQ905C=m\nCONFIG_USB_GSPCA_SQ930X=m\nCONFIG_USB_GSPCA_STK014=m\nCONFIG_USB_GSPCA_STK1135=m\nCONFIG_USB_GSPCA_STV0680=m\nCONFIG_USB_GSPCA_SUNPLUS=m\nCONFIG_USB_GSPCA_T613=m\nCONFIG_USB_GSPCA_TOPRO=m\nCONFIG_USB_GSPCA_TOUPTEK=m\nCONFIG_USB_GSPCA_TV8532=m\nCONFIG_USB_GSPCA_VC032X=m\nCONFIG_USB_GSPCA_VICAM=m\nCONFIG_USB_GSPCA_XIRLINK_CIT=m\nCONFIG_USB_GSPCA_ZC3XX=m\nCONFIG_USB_PWC=m\n# CONFIG_USB_PWC_DEBUG is not set\nCONFIG_USB_PWC_INPUT_EVDEV=y\nCONFIG_VIDEO_CPIA2=m\nCONFIG_USB_ZR364XX=m\nCONFIG_USB_STKWEBCAM=m\nCONFIG_USB_S2255=m\nCONFIG_VIDEO_USBTV=m\n\n#\n# Analog TV USB devices\n#\n# CONFIG_VIDEO_PVRUSB2 is not set\n# CONFIG_VIDEO_HDPVR is not set\n# CONFIG_VIDEO_USBVISION is not set\nCONFIG_VIDEO_STK1160_COMMON=m\n# CONFIG_VIDEO_STK1160_AC97 is not set\nCONFIG_VIDEO_STK1160=m\n# CONFIG_VIDEO_GO7007 is not set\n\n#\n# Analog/digital TV USB devices\n#\nCONFIG_VIDEO_AU0828=m\nCONFIG_VIDEO_AU0828_V4L2=y\nCONFIG_VIDEO_AU0828_RC=y\nCONFIG_VIDEO_CX231XX=m\nCONFIG_VIDEO_CX231XX_RC=y\nCONFIG_VIDEO_CX231XX_ALSA=m\nCONFIG_VIDEO_CX231XX_DVB=m\nCONFIG_VIDEO_TM6000=m\nCONFIG_VIDEO_TM6000_ALSA=m\nCONFIG_VIDEO_TM6000_DVB=m\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_USB=m\nCONFIG_DVB_USB_DEBUG=y\nCONFIG_DVB_USB_DIB3000MC=m\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_DIBUSB_MB=m\nCONFIG_DVB_USB_DIBUSB_MB_FAULTY=y\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_CXUSB=m\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_DTT200U=m\nCONFIG_DVB_USB_OPERA1=m\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_FRIIO=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_DVB_USB_DVBSKY=m\n# CONFIG_DVB_TTUSB_BUDGET is not set\n# CONFIG_DVB_TTUSB_DEC is not set\nCONFIG_SMS_USB_DRV=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\nCONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG=y\nCONFIG_DVB_AS102=m\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\nCONFIG_VIDEO_EM28XX=m\nCONFIG_VIDEO_EM28XX_V4L2=m\nCONFIG_VIDEO_EM28XX_ALSA=m\nCONFIG_VIDEO_EM28XX_DVB=m\n# CONFIG_VIDEO_EM28XX_RC is not set\n\n#\n# Software defined radio USB devices\n#\nCONFIG_USB_AIRSPY=m\nCONFIG_USB_HACKRF=m\nCONFIG_USB_MSI2500=m\n# CONFIG_MEDIA_PCI_SUPPORT is not set\n# CONFIG_V4L_PLATFORM_DRIVERS is not set\n# CONFIG_V4L_MEM2MEM_DRIVERS is not set\n# CONFIG_V4L_TEST_DRIVERS is not set\n# CONFIG_DVB_PLATFORM_DRIVERS is not set\n\n#\n# Supported MMC/SDIO adapters\n#\n# CONFIG_SMS_SDIO_DRV is not set\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_VIDEO_CX2341X=m\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_DVB_B2C2_FLEXCOP_DEBUG=y\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\n\n#\n# Media ancillary drivers (tuners, sensors, i2c, spi, frontends)\n#\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\nCONFIG_MEDIA_ATTACH=y\nCONFIG_VIDEO_IR_I2C=m\n\n#\n# Audio decoders, processors and mixers\n#\nCONFIG_VIDEO_MSP3400=m\n\n#\n# RDS decoders\n#\n\n#\n# Video decoders\n#\nCONFIG_VIDEO_SAA711X=m\nCONFIG_VIDEO_TVP5150=m\n\n#\n# Video and audio decoders\n#\nCONFIG_VIDEO_CX25840=m\n\n#\n# Video encoders\n#\n\n#\n# Camera sensor devices\n#\nCONFIG_VIDEO_MT9V011=m\n\n#\n# Flash devices\n#\n\n#\n# Video improvement chips\n#\n\n#\n# Audio/Video compression chips\n#\n\n#\n# Miscellaneous helper chips\n#\n\n#\n# Sensors used on soc_camera driver\n#\nCONFIG_MEDIA_TUNER=m\nCONFIG_MEDIA_TUNER_SIMPLE=m\nCONFIG_MEDIA_TUNER_TDA8290=m\nCONFIG_MEDIA_TUNER_TDA827X=m\nCONFIG_MEDIA_TUNER_TDA18271=m\nCONFIG_MEDIA_TUNER_TDA18272=m\nCONFIG_MEDIA_TUNER_TDA9887=m\nCONFIG_MEDIA_TUNER_MSI001=m\nCONFIG_MEDIA_TUNER_MT20XX=m\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT2266=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_XC2028=m\nCONFIG_MEDIA_TUNER_XC5000=m\nCONFIG_MEDIA_TUNER_XC4000=m\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\nCONFIG_MEDIA_TUNER_MC44S803=m\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_SI2157=m\nCONFIG_MEDIA_TUNER_IT913X=m\nCONFIG_MEDIA_TUNER_R820T=m\nCONFIG_MEDIA_TUNER_QM1D1C0042=m\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\nCONFIG_DVB_STV6110x=m\nCONFIG_DVB_M88DS3103=m\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_TDA18271C2DD=m\nCONFIG_DVB_SI2165=m\nCONFIG_DVB_MN88472=m\nCONFIG_DVB_MN88473=m\n\n#\n# DVB-S (satellite) frontends\n#\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_MT312=m\nCONFIG_DVB_ZL10039=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_TDA10086=m\nCONFIG_DVB_TUNER_ITD1000=m\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_CX24116=m\nCONFIG_DVB_CX24120=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_TS2020=m\nCONFIG_DVB_DS3000=m\nCONFIG_DVB_TDA10071=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_MT352=m\nCONFIG_DVB_ZL10353=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\nCONFIG_DVB_RTL2832_SDR=m\nCONFIG_DVB_SI2168=m\nCONFIG_DVB_AS102_FE=m\nCONFIG_DVB_GP8PSK_FE=m\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_TDA10023=m\nCONFIG_DVB_STV0297=m\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_NXT200X=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LGDT330X=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LGDT3306A=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_AU8522=m\nCONFIG_DVB_AU8522_DTV=m\nCONFIG_DVB_AU8522_V4L=m\nCONFIG_DVB_S5H1411=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_S921=m\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_TC90522=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_DRX39XYJ=m\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_A8293=m\nCONFIG_DVB_SP2=m\nCONFIG_DVB_LGS8GXX=m\nCONFIG_DVB_ATBM8830=m\nCONFIG_DVB_IX2505V=m\nCONFIG_DVB_M88RS2000=m\nCONFIG_DVB_AF9033=m\n\n#\n# Tools to develop new frontends\n#\n# CONFIG_DVB_DUMMY_FE is not set\n\n#\n# Graphics support\n#\n# CONFIG_VGA_ARB is not set\n# CONFIG_IMX_IPUV3_CORE is not set\nCONFIG_DRM=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\nCONFIG_DRM_KMS_HELPER=y\nCONFIG_DRM_KMS_FB_HELPER=y\nCONFIG_DRM_FBDEV_EMULATION=y\n# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_RADEON is not set\n# CONFIG_DRM_AMDGPU is not set\n\n#\n# ACP (Audio CoProcessor) Configuration\n#\n# CONFIG_DRM_NOUVEAU is not set\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_EXYNOS is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_AST is not set\n# CONFIG_DRM_MGAG200 is not set\n# CONFIG_DRM_CIRRUS_QEMU is not set\n# CONFIG_DRM_ARMADA is not set\n# CONFIG_DRM_OMAP is not set\n# CONFIG_DRM_TILCDC is not set\n# CONFIG_DRM_QXL is not set\n# CONFIG_DRM_BOCHS is not set\n# CONFIG_DRM_VIRTIO_GPU is not set\n# CONFIG_DRM_FSL_DCU is not set\nCONFIG_DRM_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_DUMB_VGA_DAC is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_STI is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_LEGACY is not set\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\n# CONFIG_FB_DDC is not set\n# CONFIG_FB_BOOT_VESA_SUPPORT is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\n# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\n# CONFIG_FB_SVGALIB is not set\n# CONFIG_FB_MACMODES is not set\nCONFIG_FB_BACKLIGHT=y\n# CONFIG_FB_MODE_HELPERS is not set\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_CIRRUS is not set\n# CONFIG_FB_PM2 is not set\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_CYBER2000 is not set\n# CONFIG_FB_ASILIANT is not set\n# CONFIG_FB_IMSTT is not set\n# CONFIG_FB_UVESA is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_NVIDIA is not set\n# CONFIG_FB_RIVA is not set\n# CONFIG_FB_I740 is not set\n# CONFIG_FB_MATROX is not set\n# CONFIG_FB_RADEON is not set\n# CONFIG_FB_ATY128 is not set\n# CONFIG_FB_ATY is not set\n# CONFIG_FB_S3 is not set\n# CONFIG_FB_SAVAGE is not set\n# CONFIG_FB_SIS is not set\n# CONFIG_FB_NEOMAGIC is not set\n# CONFIG_FB_KYRO is not set\n# CONFIG_FB_3DFX is not set\n# CONFIG_FB_VOODOO1 is not set\n# CONFIG_FB_VT8623 is not set\n# CONFIG_FB_TRIDENT is not set\n# CONFIG_FB_ARK is not set\n# CONFIG_FB_PM3 is not set\n# CONFIG_FB_CARMINE is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_MB862XX is not set\n# CONFIG_FB_BROADSHEET is not set\n# CONFIG_FB_AUO_K190X is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# CONFIG_FB_SM712 is not set\nCONFIG_BACKLIGHT_LCD_SUPPORT=y\nCONFIG_LCD_CLASS_DEVICE=m\n# CONFIG_LCD_L4F00242T03 is not set\n# CONFIG_LCD_LMS283GF05 is not set\n# CONFIG_LCD_LTV350QV is not set\n# CONFIG_LCD_ILI922X is not set\n# CONFIG_LCD_ILI9320 is not set\n# CONFIG_LCD_TDO24M is not set\n# CONFIG_LCD_VGG2432A4 is not set\n# CONFIG_LCD_PLATFORM is not set\n# CONFIG_LCD_S6E63M0 is not set\n# CONFIG_LCD_LD9040 is not set\n# CONFIG_LCD_AMS369FG06 is not set\n# CONFIG_LCD_LMS501KF03 is not set\n# CONFIG_LCD_HX8357 is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\nCONFIG_BACKLIGHT_GENERIC=y\n# CONFIG_BACKLIGHT_PWM is not set\n# CONFIG_BACKLIGHT_PM8941_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\n# CONFIG_BACKLIGHT_GPIO is not set\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_VGASTATE is not set\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_FRAMEBUFFER_CONSOLE=m\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_LOGO is not set\nCONFIG_SOUND=y\nCONFIG_SOUND_OSS_CORE=y\nCONFIG_SOUND_OSS_CORE_PRECLAIM=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_HWDEP=y\nCONFIG_SND_RAWMIDI=y\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\nCONFIG_SND_SEQUENCER=y\n# CONFIG_SND_SEQ_DUMMY is not set\nCONFIG_SND_OSSEMUL=y\nCONFIG_SND_MIXER_OSS=m\nCONFIG_SND_PCM_OSS=m\nCONFIG_SND_PCM_OSS_PLUGINS=y\nCONFIG_SND_PCM_TIMER=y\n# CONFIG_SND_SEQUENCER_OSS is not set\nCONFIG_SND_HRTIMER=m\nCONFIG_SND_SEQ_HRTIMER_DEFAULT=y\nCONFIG_SND_DYNAMIC_MINORS=y\nCONFIG_SND_MAX_CARDS=32\nCONFIG_SND_SUPPORT_OLD_API=y\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\n# CONFIG_SND_DEBUG is not set\nCONFIG_SND_VMASTER=y\nCONFIG_SND_RAWMIDI_SEQ=y\n# CONFIG_SND_OPL3_LIB_SEQ is not set\n# CONFIG_SND_OPL4_LIB_SEQ is not set\n# CONFIG_SND_SBAWE_SEQ is not set\n# CONFIG_SND_EMU10K1_SEQ is not set\nCONFIG_SND_MPU401_UART=m\nCONFIG_SND_AC97_CODEC=m\nCONFIG_SND_DRIVERS=y\nCONFIG_SND_DUMMY=m\nCONFIG_SND_ALOOP=m\n# CONFIG_SND_VIRMIDI is not set\nCONFIG_SND_MTPAV=m\nCONFIG_SND_SERIAL_U16550=m\nCONFIG_SND_MPU401=m\n# CONFIG_SND_AC97_POWER_SAVE is not set\nCONFIG_SND_PCI=y\n# CONFIG_SND_AD1889 is not set\n# CONFIG_SND_ATIIXP is not set\n# CONFIG_SND_ATIIXP_MODEM is not set\n# CONFIG_SND_AU8810 is not set\n# CONFIG_SND_AU8820 is not set\n# CONFIG_SND_AU8830 is not set\n# CONFIG_SND_AW2 is not set\n# CONFIG_SND_BT87X is not set\n# CONFIG_SND_CA0106 is not set\n# CONFIG_SND_CMIPCI is not set\n# CONFIG_SND_OXYGEN is not set\n# CONFIG_SND_CS4281 is not set\n# CONFIG_SND_CS46XX is not set\n# CONFIG_SND_CTXFI is not set\n# CONFIG_SND_DARLA20 is not set\n# CONFIG_SND_GINA20 is not set\n# CONFIG_SND_LAYLA20 is not set\n# CONFIG_SND_DARLA24 is not set\n# CONFIG_SND_GINA24 is not set\n# CONFIG_SND_LAYLA24 is not set\n# CONFIG_SND_MONA is not set\n# CONFIG_SND_MIA is not set\n# CONFIG_SND_ECHO3G is not set\n# CONFIG_SND_INDIGO is not set\n# CONFIG_SND_INDIGOIO is not set\n# CONFIG_SND_INDIGODJ is not set\n# CONFIG_SND_INDIGOIOX is not set\n# CONFIG_SND_INDIGODJX is not set\n# CONFIG_SND_ENS1370 is not set\n# CONFIG_SND_ENS1371 is not set\n# CONFIG_SND_FM801 is not set\n# CONFIG_SND_HDSP is not set\n# CONFIG_SND_HDSPM is not set\n# CONFIG_SND_ICE1724 is not set\n# CONFIG_SND_INTEL8X0 is not set\n# CONFIG_SND_INTEL8X0M is not set\n# CONFIG_SND_KORG1212 is not set\n# CONFIG_SND_LOLA is not set\n# CONFIG_SND_LX6464ES is not set\n# CONFIG_SND_MIXART is not set\n# CONFIG_SND_NM256 is not set\n# CONFIG_SND_PCXHR is not set\n# CONFIG_SND_RIPTIDE is not set\n# CONFIG_SND_RME32 is not set\n# CONFIG_SND_RME96 is not set\n# CONFIG_SND_RME9652 is not set\n# CONFIG_SND_SE6X is not set\n# CONFIG_SND_VIA82XX is not set\n# CONFIG_SND_VIA82XX_MODEM is not set\n# CONFIG_SND_VIRTUOSO is not set\n# CONFIG_SND_VX222 is not set\n# CONFIG_SND_YMFPCI is not set\n\n#\n# HD-Audio\n#\n# CONFIG_SND_HDA_INTEL is not set\nCONFIG_SND_HDA_PREALLOC_SIZE=64\nCONFIG_SND_ARM=y\n# CONFIG_SND_ARMAACI is not set\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=y\nCONFIG_SND_USB_UA101=m\nCONFIG_SND_USB_CAIAQ=m\nCONFIG_SND_USB_CAIAQ_INPUT=y\nCONFIG_SND_USB_6FIRE=m\nCONFIG_SND_USB_HIFACE=m\nCONFIG_SND_BCD2000=m\nCONFIG_SND_USB_LINE6=m\nCONFIG_SND_USB_POD=m\nCONFIG_SND_USB_PODHD=m\nCONFIG_SND_USB_TONEPORT=m\nCONFIG_SND_USB_VARIAX=m\nCONFIG_SND_SOC=y\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU7002 is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4554 is not set\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_ES8328 is not set\nCONFIG_SND_SOC_ES8388=y\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM179X_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\nCONFIG_SND_SOC_RL6231=y\n# CONFIG_SND_SOC_RT5616 is not set\n# CONFIG_SND_SOC_RT5631 is not set\nCONFIG_SND_SOC_RT5651=y\n# CONFIG_SND_SOC_RT5677_SPI is not set\n# CONFIG_SND_SOC_SGTL5000 is not set\n# CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set\nCONFIG_SND_SOC_SPDIF=m\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC3X is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731 is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8960 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\nCONFIG_AMLOGIC_SND_SOC_CODECS=y\nCONFIG_AMLOGIC_SND_CODEC_DUMMY_CODEC=y\nCONFIG_AMLOGIC_SND_CODEC_PCM2BT=y\nCONFIG_AMLOGIC_SND_CODEC_PDM_DUMMY_CODEC=y\nCONFIG_AMLOGIC_SND_CODEC_AMLT9015=y\n# CONFIG_AMLOGIC_SND_CODEC_AMLT9015S is not set\n# CONFIG_AMLOGIC_SND_CODEC_PMU3 is not set\n# CONFIG_AMLOGIC_SND_SOC_TAS5805 is not set\nCONFIG_AMLOGIC_SND_CODEC_TXLX_ACODEC=y\n# CONFIG_AMLOGIC_SND_CODEC_TL1_ACODEC is not set\n# CONFIG_AMLOGIC_SND_SOC_TAS5782M is not set\nCONFIG_AMLOGIC_SND_SOC_TAS5707=y\nCONFIG_AMLOGIC_SND_SOC_ES8316=y\nCONFIG_AMLOGIC_SND_SOC_TLV320ADC3101=y\nCONFIG_AMLOGIC_SND_SOC_PCM186X=y\nCONFIG_AMLOGIC_SND_SOC_SSM3525=y\nCONFIG_AMLOGIC_SND_SOC_SSM3515=y\nCONFIG_AMLOGIC_SND_SOC_TAS575X=y\n# CONFIG_AMLOGIC_SND_SOC_ES7243 is not set\nCONFIG_AMLOGIC_SND_SOC_AD82584F=y\n# CONFIG_AMLOGIC_SND_SOC_CS42528 is not set\n# CONFIG_SND_SIMPLE_CARD is not set\n# CONFIG_SND_SIMPLE_SCU_CARD is not set\nCONFIG_AMLOGIC_SND_SOC=y\nCONFIG_AMLOGIC_SND_SOC_MESON=y\nCONFIG_AMLOGIC_SND_SOC_AUGE=y\nCONFIG_AMLOGIC_SND_SPLIT_MODE=y\n# CONFIG_AMLOGIC_SND_SPLIT_MODE_MMAP is not set\nCONFIG_AMLOGIC_SND_SOC_COMMON=y\n# CONFIG_SOUND_PRIME is not set\nCONFIG_AC97_BUS=m\n\n#\n# HID support\n#\nCONFIG_HID=y\nCONFIG_HID_BATTERY_STRENGTH=y\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=m\nCONFIG_HID_ACRUX=m\nCONFIG_HID_ACRUX_FF=y\nCONFIG_HID_APPLE=m\nCONFIG_HID_APPLEIR=m\nCONFIG_HID_AUREAL=m\nCONFIG_HID_BELKIN=m\nCONFIG_HID_BETOP_FF=m\nCONFIG_HID_CHERRY=m\nCONFIG_HID_CHICONY=m\nCONFIG_HID_CORSAIR=m\nCONFIG_HID_PRODIKEYS=m\nCONFIG_HID_CMEDIA=m\nCONFIG_HID_CP2112=m\nCONFIG_HID_CYPRESS=m\nCONFIG_HID_DRAGONRISE=m\nCONFIG_DRAGONRISE_FF=y\nCONFIG_HID_EMS_FF=m\nCONFIG_HID_ELECOM=m\nCONFIG_HID_ELO=m\nCONFIG_HID_EZKEY=m\nCONFIG_HID_GEMBIRD=m\nCONFIG_HID_GFRM=m\nCONFIG_HID_HOLTEK=m\nCONFIG_HOLTEK_FF=y\nCONFIG_HID_GT683R=m\nCONFIG_HID_KEYTOUCH=m\nCONFIG_HID_KYE=m\nCONFIG_HID_UCLOGIC=m\nCONFIG_HID_WALTOP=m\nCONFIG_HID_GYRATION=m\nCONFIG_HID_ICADE=m\nCONFIG_HID_TWINHAN=m\nCONFIG_HID_KENSINGTON=m\nCONFIG_HID_LCPOWER=m\nCONFIG_HID_LED=m\nCONFIG_HID_LENOVO=m\nCONFIG_HID_LOGITECH=m\nCONFIG_HID_LOGITECH_DJ=m\nCONFIG_HID_LOGITECH_HIDPP=m\nCONFIG_LOGITECH_FF=y\nCONFIG_LOGIRUMBLEPAD2_FF=y\nCONFIG_LOGIG940_FF=y\n# CONFIG_LOGIWHEELS_FF is not set\nCONFIG_HID_MAGICMOUSE=m\nCONFIG_HID_MICROSOFT=m\nCONFIG_HID_MONTEREY=m\nCONFIG_HID_MULTITOUCH=m\n# CONFIG_HID_NINTENDO is not set\nCONFIG_HID_NTRIG=m\nCONFIG_HID_ORTEK=m\nCONFIG_HID_PANTHERLORD=m\nCONFIG_PANTHERLORD_FF=y\nCONFIG_HID_PENMOUNT=m\nCONFIG_HID_PETALYNX=m\nCONFIG_HID_PICOLCD=m\nCONFIG_HID_PICOLCD_FB=y\nCONFIG_HID_PICOLCD_BACKLIGHT=y\nCONFIG_HID_PICOLCD_LCD=y\nCONFIG_HID_PICOLCD_LEDS=y\nCONFIG_HID_PICOLCD_CIR=y\nCONFIG_HID_PLANTRONICS=m\nCONFIG_HID_PLAYSTATION=m\n# CONFIG_PLAYSTATION_FF is not set\nCONFIG_HID_PRIMAX=m\nCONFIG_HID_ROCCAT=m\nCONFIG_HID_SAITEK=m\nCONFIG_HID_SAMSUNG=m\nCONFIG_HID_SONY=m\nCONFIG_SONY_FF=y\nCONFIG_HID_SPEEDLINK=m\nCONFIG_HID_STEAM=m\nCONFIG_HID_STEELSERIES=m\nCONFIG_HID_SUNPLUS=m\nCONFIG_HID_RMI=m\nCONFIG_HID_GREENASIA=m\nCONFIG_GREENASIA_FF=y\nCONFIG_HID_SMARTJOYPLUS=m\nCONFIG_SMARTJOYPLUS_FF=y\nCONFIG_HID_TIVO=m\nCONFIG_HID_TOPSEED=m\nCONFIG_HID_THINGM=m\nCONFIG_HID_THRUSTMASTER=m\nCONFIG_THRUSTMASTER_FF=y\nCONFIG_HID_WACOM=m\nCONFIG_HID_WIIMOTE=m\nCONFIG_HID_XINMO=m\nCONFIG_HID_XPADNEO=m\nCONFIG_HID_ZEROPLUS=m\nCONFIG_ZEROPLUS_FF=y\nCONFIG_HID_ZYDACRON=m\nCONFIG_HID_SENSOR_HUB=m\nCONFIG_HID_SENSOR_CUSTOM_SENSOR=m\nCONFIG_HID_ALPS=m\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID is not set\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_DYNAMIC_MINORS is not set\n# CONFIG_USB_OTG is not set\n# CONFIG_USB_OTG_WHITELIST is not set\n# CONFIG_USB_OTG_BLACKLIST_HUB is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\n# CONFIG_USB_MON is not set\n# CONFIG_USB_WUSB_CBAF is not set\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\nCONFIG_USB_XHCI_PCI=y\nCONFIG_USB_XHCI_PLATFORM=y\nCONFIG_USB_EHCI_HCD=y\n# CONFIG_USB_EHCI_ROOT_HUB_TT is not set\nCONFIG_USB_EHCI_TT_NEWSCHED=y\nCONFIG_USB_EHCI_PCI=y\n# CONFIG_USB_EHCI_HCD_PLATFORM is not set\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_ISP1362_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\nCONFIG_USB_OHCI_HCD=y\nCONFIG_USB_OHCI_HCD_PCI=y\n# CONFIG_USB_OHCI_HCD_PLATFORM is not set\n# CONFIG_USB_UHCI_HCD is not set\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=y\n# CONFIG_USB_PRINTER is not set\nCONFIG_USB_WDM=m\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\n# CONFIG_USB_UAS is not set\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_MUSB_HDRC is not set\nCONFIG_USB_DWC3=y\nCONFIG_USB_DWC3_HOST=y\n# CONFIG_USB_DWC3_GADGET is not set\n# CONFIG_USB_DWC3_DUAL_ROLE is not set\n\n#\n# Platform Glue Driver Support\n#\nCONFIG_USB_DWC3_PCI=y\nCONFIG_USB_DWC3_OF_SIMPLE=y\n# CONFIG_USB_DWC2 is not set\n# CONFIG_USB_CHIPIDEA is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=y\nCONFIG_USB_SERIAL_CONSOLE=y\nCONFIG_USB_SERIAL_GENERIC=y\nCONFIG_USB_SERIAL_SIMPLE=m\nCONFIG_USB_SERIAL_AIRCABLE=m\nCONFIG_USB_SERIAL_ARK3116=m\nCONFIG_USB_SERIAL_BELKIN=m\nCONFIG_USB_SERIAL_CH341=m\nCONFIG_USB_SERIAL_WHITEHEAT=m\nCONFIG_USB_SERIAL_DIGI_ACCELEPORT=m\nCONFIG_USB_SERIAL_CP210X=m\nCONFIG_USB_SERIAL_CYPRESS_M8=m\nCONFIG_USB_SERIAL_EMPEG=m\nCONFIG_USB_SERIAL_FTDI_SIO=m\nCONFIG_USB_SERIAL_VISOR=m\nCONFIG_USB_SERIAL_IPAQ=m\nCONFIG_USB_SERIAL_IR=m\nCONFIG_USB_SERIAL_EDGEPORT=m\nCONFIG_USB_SERIAL_EDGEPORT_TI=m\nCONFIG_USB_SERIAL_F81232=m\nCONFIG_USB_SERIAL_GARMIN=m\nCONFIG_USB_SERIAL_IPW=m\nCONFIG_USB_SERIAL_IUU=m\nCONFIG_USB_SERIAL_KEYSPAN_PDA=m\nCONFIG_USB_SERIAL_KEYSPAN=m\nCONFIG_USB_SERIAL_KEYSPAN_MPR=y\nCONFIG_USB_SERIAL_KEYSPAN_USA28=y\nCONFIG_USB_SERIAL_KEYSPAN_USA28X=y\nCONFIG_USB_SERIAL_KEYSPAN_USA28XA=y\nCONFIG_USB_SERIAL_KEYSPAN_USA28XB=y\nCONFIG_USB_SERIAL_KEYSPAN_USA19=y\nCONFIG_USB_SERIAL_KEYSPAN_USA18X=y\nCONFIG_USB_SERIAL_KEYSPAN_USA19W=y\nCONFIG_USB_SERIAL_KEYSPAN_USA19QW=y\nCONFIG_USB_SERIAL_KEYSPAN_USA19QI=y\nCONFIG_USB_SERIAL_KEYSPAN_USA49W=y\nCONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y\nCONFIG_USB_SERIAL_KLSI=m\nCONFIG_USB_SERIAL_KOBIL_SCT=m\nCONFIG_USB_SERIAL_MCT_U232=m\nCONFIG_USB_SERIAL_METRO=m\nCONFIG_USB_SERIAL_MOS7720=m\nCONFIG_USB_SERIAL_MOS7840=m\nCONFIG_USB_SERIAL_MXUPORT=m\nCONFIG_USB_SERIAL_NAVMAN=m\nCONFIG_USB_SERIAL_PL2303=m\nCONFIG_USB_SERIAL_OTI6858=m\nCONFIG_USB_SERIAL_QCAUX=m\nCONFIG_USB_SERIAL_QUALCOMM=m\nCONFIG_USB_SERIAL_SPCP8X5=m\nCONFIG_USB_SERIAL_SAFE=m\nCONFIG_USB_SERIAL_SAFE_PADDED=y\nCONFIG_USB_SERIAL_SIERRAWIRELESS=m\nCONFIG_USB_SERIAL_SYMBOL=m\nCONFIG_USB_SERIAL_TI=m\nCONFIG_USB_SERIAL_CYBERJACK=m\nCONFIG_USB_SERIAL_XIRCOM=m\nCONFIG_USB_SERIAL_WWAN=m\nCONFIG_USB_SERIAL_OPTION=m\nCONFIG_USB_SERIAL_OMNINET=m\nCONFIG_USB_SERIAL_OPTICON=m\nCONFIG_USB_SERIAL_XSENS_MT=m\nCONFIG_USB_SERIAL_WISHBONE=m\nCONFIG_USB_SERIAL_SSU100=m\nCONFIG_USB_SERIAL_QT2=m\nCONFIG_USB_SERIAL_DEBUG=m\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\nCONFIG_USB_EZUSB_FX2=m\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\n# CONFIG_USB_OTG_WAKELOCK is not set\n# CONFIG_NOP_USB_XCEIV is not set\n# CONFIG_USB_GPIO_VBUS is not set\nCONFIG_USB_ISP1301=y\n# CONFIG_USB_ULPI is not set\n# CONFIG_DUAL_ROLE_USB_INTF is not set\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\n# CONFIG_USB_GADGET_DEBUG_FILES is not set\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=2\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FUSB300 is not set\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\n# CONFIG_USB_M66592 is not set\n# CONFIG_USB_BDC_UDC is not set\n# CONFIG_USB_AMD5536UDC is not set\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_NET2280 is not set\n# CONFIG_USB_GOKU is not set\n# CONFIG_USB_EG20T is not set\n# CONFIG_USB_GADGET_XILINX is not set\n# CONFIG_USB_DUMMY_HCD is not set\nCONFIG_USB_LIBCOMPOSITE=y\nCONFIG_USB_U_ETHER=y\nCONFIG_USB_F_RNDIS=y\nCONFIG_USB_F_FS=y\nCONFIG_USB_F_MIDI=y\nCONFIG_USB_F_MTP=y\nCONFIG_USB_F_PTP=y\nCONFIG_USB_F_AUDIO_SRC=y\nCONFIG_USB_F_ACC=y\nCONFIG_USB_CONFIGFS=y\n# CONFIG_USB_CONFIGFS_SERIAL is not set\n# CONFIG_USB_CONFIGFS_ACM is not set\n# CONFIG_USB_CONFIGFS_OBEX is not set\n# CONFIG_USB_CONFIGFS_NCM is not set\n# CONFIG_USB_CONFIGFS_ECM is not set\n# CONFIG_USB_CONFIGFS_ECM_SUBSET is not set\nCONFIG_USB_CONFIGFS_RNDIS=y\n# CONFIG_USB_CONFIGFS_EEM is not set\n# CONFIG_USB_CONFIGFS_MASS_STORAGE is not set\n# CONFIG_USB_CONFIGFS_F_LB_SS is not set\nCONFIG_USB_CONFIGFS_F_FS=y\nCONFIG_USB_CONFIGFS_F_MTP=y\nCONFIG_USB_CONFIGFS_F_PTP=y\nCONFIG_USB_CONFIGFS_F_ACC=y\nCONFIG_USB_CONFIGFS_F_AUDIO_SRC=y\nCONFIG_USB_CONFIGFS_UEVENT=y\n# CONFIG_USB_CONFIGFS_F_UAC1 is not set\n# CONFIG_USB_CONFIGFS_F_UAC2 is not set\nCONFIG_USB_CONFIGFS_F_MIDI=y\n# CONFIG_USB_CONFIGFS_F_HID is not set\n# CONFIG_USB_CONFIGFS_F_UVC is not set\n# CONFIG_USB_CONFIGFS_F_PRINTER is not set\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_USB_ULPI_BUS is not set\n# CONFIG_UWB is not set\nCONFIG_MMC=y\n# CONFIG_MMC_DEBUG is not set\nCONFIG_PWRSEQ_EMMC=y\nCONFIG_PWRSEQ_SIMPLE=y\n# CONFIG_MMC_EMBEDDED_SDIO is not set\n# CONFIG_MMC_PARANOID_SD_INIT is not set\n\n#\n# MMC/SD/SDIO Card Drivers\n#\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\nCONFIG_MMC_BLOCK_BOUNCE=y\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n# CONFIG_MMC_SIMULATE_MAX_SPEED is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\nCONFIG_MMC_ARMMMCI=y\n# CONFIG_MMC_SDHCI is not set\n# CONFIG_MMC_TIFM_SD is not set\n# CONFIG_MMC_CB710 is not set\n# CONFIG_MMC_VIA_SDMMC is not set\n# CONFIG_MMC_DW is not set\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\n# CONFIG_MMC_TOSHIBA_PCI is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\n# CONFIG_LEDS_CLASS_FLASH is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP5521 is not set\n# CONFIG_LEDS_LP5523 is not set\n# CONFIG_LEDS_LP5562 is not set\n# CONFIG_LEDS_LP8501 is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\nCONFIG_LEDS_PWM=y\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_SYSCON is not set\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\nCONFIG_LEDS_TRIGGER_TIMER=y\nCONFIG_LEDS_TRIGGER_ONESHOT=y\n# CONFIG_LEDS_TRIGGER_DISK is not set\n# CONFIG_LEDS_TRIGGER_MTD is not set\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\nCONFIG_LEDS_TRIGGER_BACKLIGHT=y\nCONFIG_LEDS_TRIGGER_CPU=y\nCONFIG_LEDS_TRIGGER_GPIO=y\nCONFIG_LEDS_TRIGGER_DEFAULT_ON=y\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\nCONFIG_LEDS_TRIGGER_TRANSIENT=y\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\nCONFIG_LEDS_TRIGGER_PANIC=y\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_ATOMIC_SCRUB=y\nCONFIG_EDAC_SUPPORT=y\n# CONFIG_EDAC is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\nCONFIG_RTC_DRV_HYM8563=y\nCONFIG_RTC_DRV_HYM8563_SHW_PATCH=y\n# CONFIG_RTC_DRV_MAX6900 is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\nCONFIG_RTC_DRV_PCF8563=y\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\n# CONFIG_RTC_DRV_DS3232 is not set\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_CMOS is not set\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\n# CONFIG_RTC_DRV_PL031 is not set\n# CONFIG_RTC_DRV_SNVS is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set\n# CONFIG_DMADEVICES is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\nCONFIG_SW_SYNC=y\n# CONFIG_AUXDISPLAY is not set\nCONFIG_UIO=y\n# CONFIG_UIO_CIF is not set\nCONFIG_UIO_PDRV_GENIRQ=y\n# CONFIG_UIO_DMEM_GENIRQ is not set\n# CONFIG_UIO_AEC is not set\n# CONFIG_UIO_SERCOS3 is not set\n# CONFIG_UIO_PCI_GENERIC is not set\n# CONFIG_UIO_NETX is not set\n# CONFIG_UIO_PRUSS is not set\n# CONFIG_UIO_MF624 is not set\n# CONFIG_VIRT_DRIVERS is not set\nCONFIG_VIRTIO=y\n\n#\n# Virtio drivers\n#\n# CONFIG_VIRTIO_PCI is not set\n# CONFIG_VIRTIO_BALLOON is not set\n# CONFIG_VIRTIO_INPUT is not set\nCONFIG_VIRTIO_MMIO=y\n# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set\n\n#\n# Microsoft Hyper-V guest support\n#\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_COMEDI is not set\n# CONFIG_RTL8192U is not set\nCONFIG_RTLLIB=m\nCONFIG_RTLLIB_CRYPTO_CCMP=m\nCONFIG_RTLLIB_CRYPTO_TKIP=m\nCONFIG_RTLLIB_CRYPTO_WEP=m\n# CONFIG_RTL8192E is not set\nCONFIG_R8712U=m\n# CONFIG_R8188EU is not set\n# CONFIG_RTS5208 is not set\n# CONFIG_VT6655 is not set\n# CONFIG_VT6656 is not set\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADIS16240 is not set\n# CONFIG_SCA3000 is not set\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7606 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7816 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7280 is not set\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7152 is not set\n# CONFIG_AD7746 is not set\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16060 is not set\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n\n#\n# Light sensors\n#\n# CONFIG_SENSORS_ISL29018 is not set\n# CONFIG_SENSORS_ISL29028 is not set\n# CONFIG_TSL2583 is not set\n# CONFIG_TSL2x7x is not set\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7753 is not set\n# CONFIG_ADE7754 is not set\n# CONFIG_ADE7758 is not set\n# CONFIG_ADE7759 is not set\n# CONFIG_ADE7854 is not set\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1200 is not set\n# CONFIG_AD2S1210 is not set\n\n#\n# Triggers - standalone\n#\n# CONFIG_FB_SM750 is not set\n# CONFIG_FB_XGI is not set\n\n#\n# Speakup console speech\n#\n# CONFIG_SPEAKUP is not set\nCONFIG_STAGING_MEDIA=y\n# CONFIG_MEDIA_CEC is not set\n# CONFIG_DVB_CXD2099 is not set\nCONFIG_LIRC_STAGING=y\n# CONFIG_LIRC_BT829 is not set\n# CONFIG_LIRC_IMON is not set\n# CONFIG_LIRC_SASEM is not set\n# CONFIG_LIRC_SERIAL is not set\n# CONFIG_LIRC_SIR is not set\n# CONFIG_LIRC_ZILOG is not set\n\n#\n# Android\n#\n# CONFIG_ASHMEM is not set\n# CONFIG_ANDROID_LOGGER is not set\n# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set\n# CONFIG_ANDROID_VSOC is not set\nCONFIG_ION=y\n# CONFIG_ION_TEST is not set\n# CONFIG_ION_DUMMY is not set\n# CONFIG_ION_OF is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_MTD_SPINAND_MT29F is not set\n# CONFIG_LNET is not set\n# CONFIG_DGNC is not set\n# CONFIG_GS_FPGABOOT is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\nCONFIG_FB_TFT=m\nCONFIG_FB_TFT_AGM1264K_FL=m\nCONFIG_FB_TFT_BD663474=m\nCONFIG_FB_TFT_HX8340BN=m\nCONFIG_FB_TFT_HX8347D=m\nCONFIG_FB_TFT_HX8353D=m\nCONFIG_FB_TFT_HX8357D=m\nCONFIG_FB_TFT_ILI9163=m\nCONFIG_FB_TFT_ILI9320=m\nCONFIG_FB_TFT_ILI9325=m\nCONFIG_FB_TFT_ILI9340=m\nCONFIG_FB_TFT_ILI9341=m\nCONFIG_FB_TFT_ILI9481=m\nCONFIG_FB_TFT_ILI9486=m\nCONFIG_FB_TFT_PCD8544=m\nCONFIG_FB_TFT_RA8875=m\nCONFIG_FB_TFT_S6D02A1=m\nCONFIG_FB_TFT_S6D1121=m\nCONFIG_FB_TFT_SSD1289=m\nCONFIG_FB_TFT_SSD1305=m\nCONFIG_FB_TFT_SSD1306=m\nCONFIG_FB_TFT_SSD1325=m\nCONFIG_FB_TFT_SSD1331=m\nCONFIG_FB_TFT_SSD1351=m\nCONFIG_FB_TFT_ST7735R=m\nCONFIG_FB_TFT_ST7789V=m\nCONFIG_FB_TFT_TINYLCD=m\nCONFIG_FB_TFT_TLS8204=m\nCONFIG_FB_TFT_UC1611=m\nCONFIG_FB_TFT_UC1701=m\nCONFIG_FB_TFT_UPD161704=m\nCONFIG_FB_TFT_WATTEROTT=m\nCONFIG_FB_FLEX=m\nCONFIG_FB_TFT_FBTFT_DEVICE=m\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\n# CONFIG_MOST is not set\n# CONFIG_KS7010 is not set\n# CONFIG_GREYBUS is not set\n# CONFIG_GOLDFISH is not set\n# CONFIG_CHROME_PLATFORMS is not set\nCONFIG_CLKDEV_LOOKUP=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Common Clock Framework\n#\n# CONFIG_COMMON_CLK_SCPI is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\n# CONFIG_CLK_QORIQ is not set\n# CONFIG_COMMON_CLK_NXP is not set\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_PXA is not set\n# CONFIG_COMMON_CLK_PIC32 is not set\n\n#\n# Hardware Spinlock drivers\n#\n\n#\n# Clock Source drivers\n#\nCONFIG_CLKSRC_OF=y\nCONFIG_CLKSRC_PROBE=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_ARM_ARCH_TIMER_VCT_ACCESS=y\n# CONFIG_ARM_TIMER_SP804 is not set\n# CONFIG_ATMEL_PIT is not set\n# CONFIG_SH_TIMER_CMT is not set\n# CONFIG_SH_TIMER_MTU2 is not set\n# CONFIG_SH_TIMER_TMU is not set\n# CONFIG_EM_TIMER_STI is not set\nCONFIG_MAILBOX=y\n# CONFIG_ARM_MHU is not set\n# CONFIG_PLATFORM_MHU is not set\n# CONFIG_PL320_MBOX is not set\n# CONFIG_ALTERA_MBOX is not set\n# CONFIG_MAILBOX_TEST is not set\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\n# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set\n# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set\n# CONFIG_ARM_SMMU is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_STE_MODEM_RPROC is not set\n\n#\n# Rpmsg drivers\n#\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Broadcom SoC drivers\n#\n# CONFIG_SOC_BRCMSTB is not set\n# CONFIG_SUNXI_SRAM is not set\n# CONFIG_SOC_TI is not set\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y\nCONFIG_DEVFREQ_GOV_PERFORMANCE=y\nCONFIG_DEVFREQ_GOV_POWERSAVE=y\nCONFIG_DEVFREQ_GOV_USERSPACE=y\n# CONFIG_DEVFREQ_GOV_PASSIVE is not set\n\n#\n# DEVFREQ Drivers\n#\n# CONFIG_PM_DEVFREQ_EVENT is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_QCOM_SPMI_MISC is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\n# CONFIG_EXTCON_USB_GPIO is not set\n# CONFIG_MEMORY is not set\nCONFIG_IIO=y\nCONFIG_IIO_BUFFER=y\n# CONFIG_IIO_BUFFER_CB is not set\nCONFIG_IIO_KFIFO_BUF=y\n# CONFIG_IIO_CONFIGFS is not set\n# CONFIG_IIO_TRIGGER is not set\n# CONFIG_IIO_SW_DEVICE is not set\n# CONFIG_IIO_SW_TRIGGER is not set\n\n#\n# Accelerometers\n#\n# CONFIG_BMA180 is not set\n# CONFIG_BMA220 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_DMARD06 is not set\n# CONFIG_DMARD09 is not set\n# CONFIG_HID_SENSOR_ACCEL_3D is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MC3230 is not set\n# CONFIG_MMA7455_I2C is not set\n# CONFIG_MMA7455_SPI is not set\n# CONFIG_MMA7660 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_MXC6255 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7266 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD799X is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_HI8435 is not set\n# CONFIG_INA2XX_ADC is not set\n# CONFIG_LTC2485 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_NAU7802 is not set\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC0832 is not set\n# CONFIG_TI_ADC12138 is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_TI_ADC161S626 is not set\n# CONFIG_TI_ADS1015 is not set\n# CONFIG_TI_ADS8688 is not set\n# CONFIG_VF610_ADC is not set\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n\n#\n# Chemical Sensors\n#\n# CONFIG_ATLAS_PH_SENSOR is not set\n# CONFIG_IAQCORE is not set\n# CONFIG_VZ89X is not set\n\n#\n# Hid Sensor IIO Common\n#\n# CONFIG_HID_SENSOR_IIO_COMMON is not set\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5592R is not set\n# CONFIG_AD5593R is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_AD5686 is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5761 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_AD8801 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n# CONFIG_VF610_DAC is not set\n\n#\n# IIO dummy driver\n#\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_HID_SENSOR_GYRO_3D is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n\n#\n# Health Sensors\n#\n\n#\n# Heart Rate Monitors\n#\n# CONFIG_AFE4403 is not set\n# CONFIG_AFE4404 is not set\n# CONFIG_MAX30100 is not set\n\n#\n# Humidity sensors\n#\n# CONFIG_AM2315 is not set\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_BMI160_I2C is not set\n# CONFIG_BMI160_SPI is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_MPU6050_I2C is not set\n# CONFIG_INV_MPU6050_SPI is not set\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_BH1780 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM36651 is not set\n# CONFIG_GP2AP020A00F is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_HID_SENSOR_ALS is not set\n# CONFIG_HID_SENSOR_PROX is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_MAX44000 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_SI1145 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\n# CONFIG_SENSORS_TSL2563 is not set\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VEML6070 is not set\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8974 is not set\n# CONFIG_AK8975 is not set\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN_I2C is not set\n# CONFIG_BMC150_MAGN_SPI is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_HID_SENSOR_MAGNETOMETER_3D is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n\n#\n# Inclinometer sensors\n#\n# CONFIG_HID_SENSOR_INCLINOMETER_3D is not set\n# CONFIG_HID_SENSOR_DEVICE_ROTATION is not set\n\n#\n# Digital potentiometers\n#\n# CONFIG_DS1803 is not set\n# CONFIG_MAX5487 is not set\n# CONFIG_MCP4131 is not set\n# CONFIG_MCP4531 is not set\n# CONFIG_TPL0102 is not set\n\n#\n# Pressure sensors\n#\n# CONFIG_BMP280 is not set\n# CONFIG_HID_SENSOR_PRESS is not set\n# CONFIG_HP03 is not set\n# CONFIG_MPL115_I2C is not set\n# CONFIG_MPL115_SPI is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n# CONFIG_HP206C is not set\n# CONFIG_ZPA2326 is not set\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n\n#\n# Proximity sensors\n#\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_SX9500 is not set\n\n#\n# Temperature sensors\n#\n# CONFIG_MAXIM_THERMOCOUPLE is not set\n# CONFIG_MLX90614 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\n# CONFIG_NTB is not set\n# CONFIG_VME_BUS is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_FSL_FTM is not set\nCONFIG_PWM_GPIO=y\nCONFIG_PWM_MESON=y\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\nCONFIG_ARM_GIC_V2M=y\nCONFIG_ARM_GIC_V3=y\nCONFIG_PARTITION_PERCPU=y\n# CONFIG_IPACK_BUS is not set\nCONFIG_RESET_CONTROLLER=y\nCONFIG_GPIO_RESET_CONTROLLER=y\n# CONFIG_RESET_ATH79 is not set\n# CONFIG_RESET_BERLIN is not set\n# CONFIG_RESET_LPC18XX is not set\n# CONFIG_RESET_MESON is not set\n# CONFIG_RESET_PISTACHIO is not set\n# CONFIG_RESET_SOCFPGA is not set\n# CONFIG_RESET_STM32 is not set\n# CONFIG_RESET_SUNXI is not set\n# CONFIG_TI_SYSCON_RESET is not set\n# CONFIG_RESET_ZYNQ is not set\n# CONFIG_FMC is not set\n\n#\n# PHY Subsystem\n#\n# CONFIG_GENERIC_PHY is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\nCONFIG_ARM_PMU=y\nCONFIG_RAS=y\n# CONFIG_THUNDERBOLT is not set\n\n#\n# Android\n#\nCONFIG_ANDROID=y\n# CONFIG_ANDROID_BINDER_IPC is not set\nCONFIG_NVMEM=y\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n\n#\n# FPGA Configuration Support\n#\n# CONFIG_FPGA is not set\n# CONFIG_TEE is not set\n\n#\n# Bootloader Drivers\n#\nCONFIG_BL301_MANAGER=y\n\n#\n# Firmware Drivers\n#\nCONFIG_ARM_PSCI_FW=y\nCONFIG_ARM_SCPI_POWER_DOMAIN=y\n# CONFIG_FIRMWARE_MEMMAP is not set\n# CONFIG_FW_CFG_SYSFS is not set\nCONFIG_HAVE_ARM_SMCCC=y\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_ENCRYPTION is not set\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_NILFS2_FS is not set\n# CONFIG_F2FS_FS is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=m\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\nCONFIG_MANDATORY_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\n# CONFIG_FANOTIFY_ACCESS_PERMISSIONS is not set\nCONFIG_QUOTA=y\n# CONFIG_QUOTA_NETLINK_INTERFACE is not set\nCONFIG_PRINT_QUOTA_WARNING=y\n# CONFIG_QUOTA_DEBUG is not set\nCONFIG_QUOTA_TREE=y\n# CONFIG_QFMT_V1 is not set\nCONFIG_QFMT_V2=y\nCONFIG_QUOTACTL=y\nCONFIG_AUTOFS4_FS=y\nCONFIG_FUSE_FS=m\n# CONFIG_CUSE is not set\nCONFIG_OVERLAY_FS=m\n\n#\n# Caches\n#\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_HISTOGRAM is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_FSCACHE_OBJECT_LIST is not set\n# CONFIG_CACHEFILES is not set\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=y\nCONFIG_UDF_NLS=y\n\n#\n# DOS/FAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"ascii\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\n# CONFIG_EXFAT_FS is not set\n# CONFIG_NTFS_FS is not set\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_PROC_UID=y\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_HUGETLB_PAGE is not set\nCONFIG_CONFIGFS_FS=y\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\n# CONFIG_SDCARD_FS is not set\nCONFIG_HFS_FS=y\nCONFIG_HFSPLUS_FS=y\n# CONFIG_HFSPLUS_FS_POSIX_ACL is not set\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_JFFS2_FS is not set\n# CONFIG_UBIFS_FS is not set\n# CONFIG_LOGFS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\nCONFIG_SQUASHFS_FILE_CACHE=y\n# CONFIG_SQUASHFS_FILE_DIRECT is not set\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\nCONFIG_PSTORE=y\nCONFIG_PSTORE_ZLIB_COMPRESS=y\n# CONFIG_PSTORE_LZO_COMPRESS is not set\n# CONFIG_PSTORE_LZ4_COMPRESS is not set\nCONFIG_PSTORE_CONSOLE=y\n# CONFIG_PSTORE_PMSG is not set\n# CONFIG_PSTORE_FTRACE is not set\nCONFIG_PSTORE_RAM=y\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EXOFS_FS is not set\nCONFIG_ORE=m\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\nCONFIG_NFS_SWAP=y\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_PNFS_OBJLAYOUT=m\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\nCONFIG_NFS_V4_1_MIGRATION=y\nCONFIG_NFS_V4_SECURITY_LABEL=y\nCONFIG_ROOT_NFS=y\nCONFIG_NFS_FSCACHE=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFSD=m\nCONFIG_NFSD_V2_ACL=y\nCONFIG_NFSD_V3=y\nCONFIG_NFSD_V3_ACL=y\nCONFIG_NFSD_V4=y\n# CONFIG_NFSD_BLOCKLAYOUT is not set\n# CONFIG_NFSD_SCSILAYOUT is not set\n# CONFIG_NFSD_FLEXFILELAYOUT is not set\nCONFIG_NFSD_V4_SECURITY_LABEL=y\n# CONFIG_NFSD_FAULT_INJECTION is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_ACL_SUPPORT=m\nCONFIG_NFS_COMMON=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\nCONFIG_SUNRPC_SWAP=y\nCONFIG_RPCSEC_GSS_KRB5=m\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS=y\nCONFIG_CIFS_STATS2=y\n# CONFIG_CIFS_WEAK_PW_HASH is not set\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\n# CONFIG_CIFS_DEBUG is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\nCONFIG_CIFS_SMB2=y\nCONFIG_CIFS_SMB311=y\nCONFIG_CIFS_FSCACHE=y\n# CONFIG_NCP_FS is not set\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\n\n#\n# Compile-time checks and compiler options\n#\n# CONFIG_DEBUG_INFO is not set\nCONFIG_ENABLE_WARN_DEPRECATED=y\nCONFIG_ENABLE_MUST_CHECK=y\nCONFIG_FRAME_WARN=0\n# CONFIG_STRIP_ASM_SYMS is not set\n# CONFIG_READABLE_ASM is not set\n# CONFIG_UNUSED_SYMBOLS is not set\n# CONFIG_PAGE_OWNER is not set\nCONFIG_DEBUG_FS=y\n# CONFIG_HEADERS_CHECK is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_DEBUG_KERNEL=y\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_PAGE_REF is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_DEBUG_VM is not set\n# CONFIG_DEBUG_MEMORY_INIT is not set\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\n# CONFIG_DEBUG_HIGHMEM is not set\nCONFIG_HAVE_ARCH_KASAN=y\n# CONFIG_KASAN is not set\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Lockups and Hangs\n#\nCONFIG_LOCKUP_DETECTOR=y\nCONFIG_HARDLOCKUP_DETECTOR_OTHER_CPU=y\nCONFIG_HARDLOCKUP_DETECTOR=y\n# CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set\nCONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0\n# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set\nCONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0\nCONFIG_DETECT_HUNG_TASK=y\nCONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120\n# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set\nCONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0\nCONFIG_WQ_WATCHDOG=y\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=5\nCONFIG_SCHED_DEBUG=y\nCONFIG_SCHED_INFO=y\nCONFIG_PANIC_ON_RT_THROTTLING=y\nCONFIG_SCHEDSTATS=y\nCONFIG_SCHED_STACK_END_CHECK=y\n# CONFIG_DEBUG_TIMEKEEPING is not set\nCONFIG_TIMER_STATS=y\n# CONFIG_DEBUG_PREEMPT is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\nCONFIG_DEBUG_ATOMIC_SLEEP=y\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\nCONFIG_STACKTRACE=y\n# CONFIG_DEBUG_KOBJECT is not set\n# CONFIG_DEBUG_BUGVERBOSE is not set\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PI_LIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_PROVE_RCU is not set\n# CONFIG_SPARSE_RCU_POINTER is not set\n# CONFIG_TORTURE_TEST is not set\n# CONFIG_RCU_PERF_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_TRACING=y\nCONFIG_GENERIC_TRACER=y\nCONFIG_TRACING_SUPPORT=y\nCONFIG_FTRACE=y\nCONFIG_FUNCTION_TRACER=y\nCONFIG_FUNCTION_GRAPH_TRACER=y\n# CONFIG_PREEMPTIRQ_EVENTS is not set\n# CONFIG_IRQSOFF_TRACER is not set\n# CONFIG_PREEMPT_TRACER is not set\n# CONFIG_SCHED_TRACER is not set\n# CONFIG_HWLAT_TRACER is not set\nCONFIG_FTRACE_SYSCALLS=y\n# CONFIG_TRACER_SNAPSHOT is not set\nCONFIG_BRANCH_PROFILE_NONE=y\n# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set\n# CONFIG_PROFILE_ALL_BRANCHES is not set\nCONFIG_STACK_TRACER=y\n# CONFIG_BLK_DEV_IO_TRACE is not set\n# CONFIG_UPROBE_EVENT is not set\n# CONFIG_PROBE_EVENTS is not set\nCONFIG_DYNAMIC_FTRACE=y\nCONFIG_FUNCTION_PROFILER=y\nCONFIG_FTRACE_MCOUNT_RECORD=y\n# CONFIG_FTRACE_STARTUP_TEST is not set\n# CONFIG_TRACEPOINT_BENCHMARK is not set\n# CONFIG_RING_BUFFER_BENCHMARK is not set\n# CONFIG_RING_BUFFER_STARTUP_TEST is not set\n# CONFIG_TRACE_ENUM_MAP_FILE is not set\nCONFIG_TRACING_EVENTS_GPIO=y\n\n#\n# Runtime Testing\n#\n# CONFIG_LKDTM is not set\n# CONFIG_TEST_LIST_SORT is not set\n# CONFIG_BACKTRACE_SELF_TEST is not set\n# CONFIG_RBTREE_TEST is not set\n# CONFIG_INTERVAL_TREE_TEST is not set\n# CONFIG_PERCPU_TEST is not set\n# CONFIG_ATOMIC64_SELFTEST is not set\n# CONFIG_ASYNC_RAID6_TEST is not set\n# CONFIG_TEST_HEXDUMP is not set\n# CONFIG_TEST_STRING_HELPERS is not set\n# CONFIG_TEST_KSTRTOX is not set\n# CONFIG_TEST_PRINTF is not set\n# CONFIG_TEST_BITMAP is not set\n# CONFIG_TEST_UUID is not set\n# CONFIG_TEST_RHASHTABLE is not set\n# CONFIG_TEST_HASH is not set\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_TEST_LKM is not set\n# CONFIG_TEST_USER_COPY is not set\n# CONFIG_TEST_BPF is not set\n# CONFIG_TEST_FIRMWARE is not set\n# CONFIG_TEST_UDELAY is not set\n# CONFIG_MEMTEST is not set\n# CONFIG_TEST_STATIC_KEYS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_SAMPLES is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\n# CONFIG_ARCH_WANTS_UBSAN_NO_NULL is not set\n# CONFIG_UBSAN is not set\nCONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y\n# CONFIG_STRICT_DEVMEM is not set\n# CONFIG_ARM_PTDUMP is not set\nCONFIG_AMLOGIC_USER_FAULT=y\nCONFIG_ARM_UNWIND=y\nCONFIG_OLD_MCOUNT=y\n# CONFIG_DEBUG_USER is not set\n# CONFIG_DEBUG_LL is not set\nCONFIG_DEBUG_LL_INCLUDE=\"mach/debug-macro.S\"\n# CONFIG_DEBUG_UART_8250 is not set\nCONFIG_UNCOMPRESS_INCLUDE=\"debug/uncompress.h\"\n# CONFIG_PID_IN_CONTEXTIDR is not set\nCONFIG_DEBUG_SET_MODULE_RONX=y\n# CONFIG_CORESIGHT is not set\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_BIG_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\n# CONFIG_KEY_DH_OPERATIONS is not set\nCONFIG_SECURITY_DMESG_RESTRICT=y\nCONFIG_SECURITY_PERF_EVENTS_RESTRICT=y\nCONFIG_SECURITY=y\nCONFIG_SECURITYFS=y\nCONFIG_SECURITY_NETWORK=y\n# CONFIG_SECURITY_NETWORK_XFRM is not set\nCONFIG_SECURITY_PATH=y\nCONFIG_LSM_MMAP_MIN_ADDR=0\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\nCONFIG_HAVE_ARCH_HARDENED_USERCOPY=y\nCONFIG_HARDENED_USERCOPY=y\n# CONFIG_HARDENED_USERCOPY_PAGESPAN is not set\nCONFIG_SECURITY_SELINUX=y\n# CONFIG_SECURITY_SELINUX_BOOTPARAM is not set\n# CONFIG_SECURITY_SELINUX_DISABLE is not set\nCONFIG_SECURITY_SELINUX_DEVELOP=y\nCONFIG_SECURITY_SELINUX_AVC_STATS=y\nCONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=0\nCONFIG_SECURITY_SMACK=y\n# CONFIG_SECURITY_SMACK_BRINGUP is not set\n# CONFIG_SECURITY_SMACK_NETFILTER is not set\n# CONFIG_SECURITY_SMACK_APPEND_SIGNALS is not set\n# CONFIG_SECURITY_TOMOYO is not set\n# CONFIG_SECURITY_APPARMOR is not set\n# CONFIG_SECURITY_LOADPIN is not set\n# CONFIG_SECURITY_YAMA is not set\nCONFIG_INTEGRITY=y\n# CONFIG_INTEGRITY_SIGNATURE is not set\nCONFIG_INTEGRITY_AUDIT=y\n# CONFIG_IMA is not set\n# CONFIG_EVM is not set\nCONFIG_DEFAULT_SECURITY_SELINUX=y\n# CONFIG_DEFAULT_SECURITY_SMACK is not set\n# CONFIG_DEFAULT_SECURITY_DAC is not set\nCONFIG_DEFAULT_SECURITY=\"selinux\"\nCONFIG_XOR_BLOCKS=m\nCONFIG_ASYNC_CORE=m\nCONFIG_ASYNC_MEMCPY=m\nCONFIG_ASYNC_XOR=m\nCONFIG_ASYNC_PQ=m\nCONFIG_ASYNC_RAID6_RECOV=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_BLKCIPHER=y\nCONFIG_CRYPTO_BLKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\n# CONFIG_CRYPTO_RSA is not set\n# CONFIG_CRYPTO_DH is not set\n# CONFIG_CRYPTO_ECDH is not set\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_WORKQUEUE=y\nCONFIG_CRYPTO_CRYPTD=y\n# CONFIG_CRYPTO_MCRYPTD is not set\nCONFIG_CRYPTO_AUTHENC=y\n# CONFIG_CRYPTO_TEST is not set\n\n#\n# Authenticated Encryption with Associated Data\n#\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\n\n#\n# Block modes\n#\nCONFIG_CRYPTO_CBC=y\nCONFIG_CRYPTO_CTR=y\nCONFIG_CRYPTO_CTS=y\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_PCBC is not set\nCONFIG_CRYPTO_XTS=y\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_ADIANTUM is not set\n\n#\n# Hash modes\n#\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_HMAC=y\n# CONFIG_CRYPTO_XCBC is not set\n# CONFIG_CRYPTO_VMAC is not set\n\n#\n# Digest\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=y\nCONFIG_CRYPTO_CRCT10DIF=y\nCONFIG_CRYPTO_GHASH=y\n# CONFIG_CRYPTO_POLY1305 is not set\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\nCONFIG_CRYPTO_MICHAEL_MIC=y\n# CONFIG_CRYPTO_RMD128 is not set\n# CONFIG_CRYPTO_RMD160 is not set\n# CONFIG_CRYPTO_RMD256 is not set\n# CONFIG_CRYPTO_RMD320 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\n# CONFIG_CRYPTO_TGR192 is not set\n# CONFIG_CRYPTO_WP512 is not set\n\n#\n# Ciphers\n#\nCONFIG_CRYPTO_AES=y\nCONFIG_CRYPTO_ANUBIS=m\nCONFIG_CRYPTO_ARC4=y\nCONFIG_CRYPTO_BLOWFISH=m\nCONFIG_CRYPTO_BLOWFISH_COMMON=m\nCONFIG_CRYPTO_CAMELLIA=m\nCONFIG_CRYPTO_CAST_COMMON=m\nCONFIG_CRYPTO_CAST5=m\nCONFIG_CRYPTO_CAST6=m\nCONFIG_CRYPTO_DES=y\nCONFIG_CRYPTO_FCRYPT=m\nCONFIG_CRYPTO_KHAZAD=m\nCONFIG_CRYPTO_SALSA20=m\nCONFIG_CRYPTO_CHACHA20=m\nCONFIG_CRYPTO_SEED=m\nCONFIG_CRYPTO_SERPENT=m\nCONFIG_CRYPTO_TEA=m\nCONFIG_CRYPTO_TWOFISH=y\nCONFIG_CRYPTO_TWOFISH_COMMON=y\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=y\nCONFIG_CRYPTO_LZO=y\nCONFIG_CRYPTO_842=m\nCONFIG_CRYPTO_LZ4=m\nCONFIG_CRYPTO_LZ4HC=m\nCONFIG_CRYPTO_ZSTD=m\n\n#\n# Random Number Generation\n#\nCONFIG_CRYPTO_ANSI_CPRNG=y\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\n# CONFIG_CRYPTO_USER_API_AEAD is not set\nCONFIG_CRYPTO_HASH_INFO=y\nCONFIG_CRYPTO_HW=y\n# CONFIG_CRYPTO_DEV_HIFN_795X is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\n# CONFIG_PKCS7_MESSAGE_PARSER is not set\n\n#\n# Certificates for signature checking\n#\n# CONFIG_SYSTEM_TRUSTED_KEYRING is not set\nCONFIG_ARM_CRYPTO=y\nCONFIG_CRYPTO_SHA1_ARM=y\n# CONFIG_CRYPTO_SHA1_ARM_NEON is not set\n# CONFIG_CRYPTO_SHA1_ARM_CE is not set\n# CONFIG_CRYPTO_SHA2_ARM_CE is not set\nCONFIG_CRYPTO_SHA256_ARM=y\n# CONFIG_CRYPTO_SHA512_ARM is not set\n# CONFIG_CRYPTO_AES_ARM is not set\n# CONFIG_CRYPTO_AES_ARM_BS is not set\n# CONFIG_CRYPTO_AES_ARM_CE is not set\n# CONFIG_CRYPTO_GHASH_ARM_CE is not set\n# CONFIG_CRYPTO_CHACHA20_NEON is not set\n# CONFIG_CRYPTO_NHPOLY1305_NEON is not set\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_GENERIC_IO=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_CRC_CCITT=y\nCONFIG_CRC16=y\nCONFIG_CRC_T10DIF=y\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\nCONFIG_CRC7=y\nCONFIG_LIBCRC32C=y\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=m\nCONFIG_AUDIT_GENERIC=y\n# CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_842_COMPRESS=m\nCONFIG_842_DECOMPRESS=m\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=y\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_COMPRESS=m\nCONFIG_LZ4HC_COMPRESS=m\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMPRESS=m\nCONFIG_ZSTD_DECOMPRESS=m\nCONFIG_XZ_DEC=y\nCONFIG_XZ_DEC_X86=y\nCONFIG_XZ_DEC_POWERPC=y\nCONFIG_XZ_DEC_IA64=y\nCONFIG_XZ_DEC_ARM=y\nCONFIG_XZ_DEC_ARMTHUMB=y\nCONFIG_XZ_DEC_SPARC=y\nCONFIG_XZ_DEC_BCJ=y\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_GZIP=y\nCONFIG_DECOMPRESS_BZIP2=y\nCONFIG_DECOMPRESS_LZMA=y\nCONFIG_DECOMPRESS_XZ=y\nCONFIG_DECOMPRESS_LZO=y\nCONFIG_DECOMPRESS_LZ4=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_REED_SOLOMON=y\nCONFIG_REED_SOLOMON_ENC8=y\nCONFIG_REED_SOLOMON_DEC8=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_LRU_CACHE=m\nCONFIG_CLZ_TAB=y\n# CONFIG_CORDIC is not set\n# CONFIG_DDR is not set\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_FONT_SUPPORT=m\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\n# CONFIG_SG_SPLIT is not set\nCONFIG_SG_POOL=y\nCONFIG_ARCH_HAS_SG_CHAIN=y\nCONFIG_SBITMAP=y\n# CONFIG_VIRTUALIZATION is not set\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        # TARGET_CPU:\n        # arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d\n        # arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c\n        # arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t\n        # arm720t arm740t strongarm strongarm110 strongarm1100\n        # strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t\n        # arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi\n        # arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e\n        # arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s\n        # arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4\n        # cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312.\n        #\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc+fp+simd\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"neon-fp-armv8\"\n        ;;\n    esac\n\n  # Bootloader to use (syslinux / u-boot / atv-bootloader / bcm2835-bootloader)\n    BOOTLOADER=\"u-boot\"\n\n  # Kernel target\n    KERNEL_TARGET=\"uImage\"\n\n  # Kernel extra targets to build\n    KERNEL_UBOOT_EXTRA_TARGET=\"\"\n\n  # Build Android kernel image using mkbootimg\n    BUILD_ANDROID_BOOTIMG=\"yes\"\n\n  # Additional options to be passed to Android mkbootimg\n    ANDROID_BOOTIMG_OPTIONS=\"--base 0x0 --kernel_offset 0x1080000\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"dtbs\"\n\n  # Additional kernel dependencies\n    KERNEL_EXTRA_DEPENDS_TARGET=\"\"\n\n  # Kernel to use. values can be:\n  # default:  default mainline kernel\n    LINUX=\"amlogic-4.9\"\n\n  # kernel image name\n    KERNEL_NAME=\"kernel.img\"\n\n################################################################################\n# setup build defaults\n################################################################################\n\n  # Project CFLAGS\n    PROJECT_CFLAGS=\"\"\n\n  # SquashFS compression method (gzip / lzo / xz)\n    SQUASHFS_COMPRESSION=\"lzo\"\n\n################################################################################\n# setup project defaults\n################################################################################\n\n  # build and install ALSA Audio support (yes / no)\n    ALSA_SUPPORT=\"yes\"\n\n  # OpenGL(X) implementation to use (no / Mesa)\n    OPENGL=\"no\"\n\n  # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q / opengl-meson)\n    OPENGLES=\"opengl-meson\"\n\n  # include uvesafb support (yes / no)\n    UVESAFB_SUPPORT=\"no\"\n\n  # Displayserver to use (x11 / no)\n    DISPLAYSERVER=\"no\"\n\n  # Windowmanager to use (fluxbox / none)\n    WINDOWMANAGER=\"none\"\n\n  # Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia,nouveau)\n  # Space separated list is supported,\n  # e.g. GRAPHIC_DRIVERS=\"i915 i965 r300 r600 radeonsi nvidia nouveau\"\n    GRAPHIC_DRIVERS=\"\"\n\n  # Use a vendor specific KODI repo\n    KODI_VENDOR=\"amlogic-4.9\"\n\n  # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap / libamcodec)\n    KODIPLAYER_DRIVER=\"libamcodec\"\n\n  # Modules to install in initramfs for early boot\n    INITRAMFS_MODULES=\"font softcursor bitblit fbcon\"\n\n  # additional drivers to install:\n  # for a list of additinoal drivers see packages/linux-drivers\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_DRIVERS=\"DRIVER1 DRIVER2\"\n    ADDITIONAL_DRIVERS+=\" RTL8192CU RTL8192DU RTL8192EU RTL8188EU RTL8821CU\n                        ssv6xxx-aml mt7668-aml RTL8188FTV-aml RTL8189ES-aml RTL8189FS-aml\n                        RTL8723BS-aml RTL8822BS-aml RTL8821CS-aml qca9377-aml\n                        qca6174-aml smartchip\"\n\n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware-aml rtkbt-firmware-aml qca-firmware-aml\"\n\n  # build and install ATV IR remote support (yes / no)\n    ATVCLIENT_SUPPORT=\"no\"\n\n  # Amlogic IR remote support (yes / no)\n    AMREMOTE_SUPPORT=\"yes\"\n\n  # build and install iSCSI support - iscsistart (yes / no)\n    ISCSI_SUPPORT=\"no\"\n\n  # build with installer (yes / no)\n    INSTALLER_SUPPORT=\"no\"\n\n  # build and install driver addons (yes / no)\n    DRIVER_ADDONS_SUPPORT=\"no\"\n\n  # driver addons to install:\n  # for a list of additinoal drivers see packages/linux-driver-addons\n  # Space separated list is supported,\n    DRIVER_ADDONS=\"\"\n\n  # additional packages to install:\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_PACKAGES=\"PACKAGE1 PACKAGE2\"\n  # ADDITIONAL_PACKAGES+=\"\"\n\n  # add OOTB support for IR remote\n  # IR_REMOTE_KEYMAPS+=\"\"\n\n  # build with entware installer\n    ENTWARE_SUPPORT=\"yes\"\n    ENTWARE_ARCH=\"armv7sf-k3.2\"\n\n  # CoreELEC Subdevices\n    SUBDEVICES=\"\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/packages/opengl-meson/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"opengl-meson\"\nPKG_VERSION=\"7bddce621a0c1e0cc12cfc8b707e93eb37fc0f82\"\nPKG_SHA256=\"15400e78b918b15743b815c195be472899d4243143e405a7b50d5be1cd07ffd1\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"http://openlinux.amlogic.com:8000/download/ARM/filesystem/\"\nPKG_URL=\"https://github.com/CoreELEC/opengl-meson/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain opentee_linuxdriver\"\nPKG_LONGDESC=\"OpenGL ES pre-compiled libraries for Mali GPUs found in Amlogic Meson SoCs.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib\n    cp -p lib/eabihf/gondul/r12p0/fbdev/libMali.so ${INSTALL}/usr/lib/libMali.gondul.so\n\n    ln -sf /var/lib/libMali.so ${INSTALL}/usr/lib/libMali.so\n\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libmali.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libmali.so.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libEGL.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libEGL.so.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libEGL.so.1.0.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLES_CM.so.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so.1.0.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so.1.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so.2\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so.2.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so.2.0.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so.3\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so.3.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so.3.0.0\n\n  mkdir -p ${INSTALL}/usr/sbin\n    cp ${PKG_DIR}/scripts/libmali-overlay-setup ${INSTALL}/usr/sbin\n  # install needed files for compiling\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/EGL\n    cp -pr include/EGL ${SYSROOT_PREFIX}/usr/include\n    cp -pr include/EGL_platform/platform_fbdev/* ${SYSROOT_PREFIX}/usr/include/EGL\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/GLES2\n    cp -pr include/GLES2 ${SYSROOT_PREFIX}/usr/include\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/KHR\n    cp -pr include/KHR ${SYSROOT_PREFIX}/usr/include\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n    cp -pr lib/pkgconfig ${SYSROOT_PREFIX}/usr/lib\n    ln ${INSTALL}/usr/lib/libMali.gondul.so ${SYSROOT_PREFIX}/usr/lib/libEGL.so\n    ln ${INSTALL}/usr/lib/libMali.gondul.so ${SYSROOT_PREFIX}/usr/lib/libGLESv2.so\n}\n\npost_install() {\n  enable_service unbind-console.service\n  enable_service libmali.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/packages/opengl-meson/scripts/libmali-overlay-setup",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nif grep -q \"g12b\" /proc/device-tree/compatible; then\n    ln -sf /usr/lib/libMali.gondul.so /var/lib/libMali.so\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/packages/opengl-meson/system.d/libmali.service",
    "content": "[Unit]\nDescription=Create libMali overlay for specific AML device\nAfter=var.mount\nBefore=kodi.service\n\n[Service]\nType=oneshot\nExecStart=/usr/sbin/libmali-overlay-setup\n\n[Install]\nWantedBy=local-fs.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/packages/opengl-meson/system.d/unbind-console.service",
    "content": "[Unit]\nDescription=Unbind framebuffer console\nConditionPathExists=/sys/class/vtconsole/vtcon1/bind\n\n[Service]\nType=oneshot\nExecStart=/bin/sh -c 'echo 0 > /sys/class/vtconsole/vtcon1/bind'\n\n[Install]\nWantedBy=graphical.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/packages/u-boot/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot\"\nPKG_VERSION=\"1.0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_CANUPDATE=\"${PROJECT}*\"\nPKG_NEED_UNPACK=\"$PROJECT_DIR/$PROJECT/bootloader \"\n\nmake_target() {\n  : # nothing\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/share/bootloader\n\n  # Always install the update script\n  find_file_path bootloader/update.sh && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n  sed -e \"s/@KERNEL_NAME@/$KERNEL_NAME/g\" \\\n      -e \"s/@LEGACY_KERNEL_NAME@/$LEGACY_KERNEL_NAME/g\" \\\n      -e \"s/@LEGACY_DTB_NAME@/$LEGACY_DTB_NAME/g\" \\\n      -i $INSTALL/usr/share/bootloader/update.sh\n\n  # Always install the canupdate script\n  if find_file_path bootloader/canupdate.sh; then\n    cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n  fi\n\n  find_file_path bootloader/config.ini && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n    sed -e \"s/@PROJECT@/${PKG_CANUPDATE}/g\" \\\n        -i $INSTALL/usr/share/bootloader/canupdate.sh\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0001-Android-improve-Dolby-Vision-compatibility.patch",
    "content": "From 9df5de35edf290042854693658f7fb77c14a19c8 Mon Sep 17 00:00:00 2001\nFrom: thexai <58434170+thexai@users.noreply.github.com>\nDate: Wed, 29 Mar 2023 12:30:11 +0200\nSubject: [PATCH 01/21] [Android] improve Dolby Vision compatibility\n\n---\n .../Video/DVDVideoCodecAndroidMediaCodec.cpp        |  8 +++++++-\n xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.h       |  2 ++\n .../VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp      | 13 ++++++++++++-\n xbmc/cores/VideoPlayer/DVDStreamInfo.cpp            |  8 ++++++++\n xbmc/cores/VideoPlayer/DVDStreamInfo.h              |  5 ++++-\n 5 files changed, 33 insertions(+), 3 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\nindex 48050cfb9d..0be40dd87c 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n@@ -512,7 +512,13 @@ bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptio\n                   \"Display: {}, MediaCodec: {}\",\n                   displaySupportsDovi, mediaCodecSupportsDovi);\n \n-        if (displaySupportsDovi && mediaCodecSupportsDovi)\n+        // For Dolby Vision profiles that don't have HDR10 fallback, always use\n+        // the dvhe decoder even if the display not supports Dolby Vision.\n+        // For profiles that has HDR10 fallback (7, 8) is better use HEVC decoder to\n+        // ensure HDR10 output if display is not DV capable.\n+        bool notHasHDR10fallback = (m_hints.dovi.dv_profile == 4 || m_hints.dovi.dv_profile == 5);\n+\n+        if (mediaCodecSupportsDovi && (displaySupportsDovi || notHasHDR10fallback))\n         {\n           m_mime = \"video/dolby-vision\";\n           m_formatname = isDvhe ? \"amc-dvhe\" : \"amc-dvh1\";\ndiff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.h b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.h\nindex 5bf4da346f..43dcd465fb 100644\n--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.h\n+++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.h\n@@ -32,6 +32,7 @@ class IAddonProvider;\n extern \"C\"\n {\n #include <libavcodec/avcodec.h>\n+#include <libavutil/dovi_meta.h>\n #include <libavutil/mastering_display_metadata.h>\n }\n \n@@ -166,6 +167,7 @@ public:\n \n   std::string stereo_mode; // expected stereo mode\n   StreamHdrType hdr_type = StreamHdrType::HDR_TYPE_NONE; // type of HDR for this stream (hdr10, etc)\n+  AVDOVIDecoderConfigurationRecord dovi{};\n   bool bInterlaced; // progressive/interlaced flag\n   bool bUnknownIP; // progressive/interlace unknown\n };\ndiff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp\nindex 66ff48b731..e88b1f1da3 100644\n--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp\n@@ -53,8 +53,10 @@ extern \"C\"\n #include <stdint.h>\n #endif\n \n-extern \"C\" {\n+extern \"C\"\n+{\n #include <libavutil/dict.h>\n+#include <libavutil/dovi_meta.h>\n #include <libavutil/opt.h>\n }\n \n@@ -1719,6 +1721,15 @@ CDemuxStream* CDVDDemuxFFmpeg::AddStream(int streamIdx)\n         int size = 0;\n         uint8_t* side_data = nullptr;\n \n+        if (st->hdr_type == StreamHdrType::HDR_TYPE_DOLBYVISION)\n+        {\n+          side_data = av_stream_get_side_data(pStream, AV_PKT_DATA_DOVI_CONF, &size);\n+          if (side_data && size)\n+          {\n+            st->dovi = *reinterpret_cast<AVDOVIDecoderConfigurationRecord*>(side_data);\n+          }\n+        }\n+\n         side_data = av_stream_get_side_data(pStream, AV_PKT_DATA_MASTERING_DISPLAY_METADATA, &size);\n         if (side_data && size)\n         {\ndiff --git a/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp b/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp\nindex 556a9182c3..0bac726df6 100644\n--- a/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp\n@@ -11,6 +11,8 @@\n #include \"DVDDemuxers/DVDDemux.h\"\n #include \"cores/VideoPlayer/Interface/DemuxCrypto.h\"\n \n+#include <cstring>\n+\n CDVDStreamInfo::CDVDStreamInfo()                                                     { extradata = NULL; Clear(); }\n CDVDStreamInfo::CDVDStreamInfo(const CDVDStreamInfo &right, bool withextradata )     { extradata = NULL; Clear(); Assign(right, withextradata); }\n CDVDStreamInfo::CDVDStreamInfo(const CDemuxStream &right, bool withextradata )       { extradata = NULL; Clear(); Assign(right, withextradata); }\n@@ -63,6 +65,7 @@ void CDVDStreamInfo::Clear()\n   masteringMetadata = nullptr;\n   contentLightMetadata = nullptr;\n   stereo_mode.clear();\n+  dovi = {};\n \n   channels   = 0;\n   samplerate = 0;\n@@ -150,6 +153,9 @@ bool CDVDStreamInfo::Equal(const CDVDStreamInfo& right, int compare)\n   else if (contentLightMetadata || right.contentLightMetadata)\n     return false;\n \n+  if (0 != std::memcmp(&dovi, &right.dovi, sizeof(AVDOVIDecoderConfigurationRecord)))\n+    return false;\n+\n   // AUDIO\n   if( channels      != right.channels\n   ||  samplerate    != right.samplerate\n@@ -234,6 +240,7 @@ void CDVDStreamInfo::Assign(const CDVDStreamInfo& right, bool withextradata)\n   masteringMetadata = right.masteringMetadata;\n   contentLightMetadata = right.contentLightMetadata;\n   stereo_mode = right.stereo_mode;\n+  dovi = right.dovi;\n \n   // AUDIO\n   channels      = right.channels;\n@@ -309,6 +316,7 @@ void CDVDStreamInfo::Assign(const CDemuxStream& right, bool withextradata)\n     masteringMetadata = stream->masteringMetaData;\n     contentLightMetadata = stream->contentLightMetaData;\n     stereo_mode = stream->stereo_mode;\n+    dovi = stream->dovi;\n   }\n   else if (right.type == STREAM_SUBTITLE)\n   {\ndiff --git a/xbmc/cores/VideoPlayer/DVDStreamInfo.h b/xbmc/cores/VideoPlayer/DVDStreamInfo.h\nindex 5c30334f8e..8d2989af75 100644\n--- a/xbmc/cores/VideoPlayer/DVDStreamInfo.h\n+++ b/xbmc/cores/VideoPlayer/DVDStreamInfo.h\n@@ -10,8 +10,10 @@\n \n #include \"DVDDemuxers/DVDDemux.h\"\n \n-extern \"C\" {\n+extern \"C\"\n+{\n #include <libavcodec/avcodec.h>\n+#include <libavutil/dovi_meta.h>\n }\n #include \"DVDClock.h\"\n \n@@ -78,6 +80,7 @@ public:\n   std::shared_ptr<AVMasteringDisplayMetadata> masteringMetadata;\n   std::shared_ptr<AVContentLightMetadata> contentLightMetadata;\n   std::string stereo_mode; // stereoscopic 3d mode\n+  AVDOVIDecoderConfigurationRecord dovi{};\n   CDVDClock *pClock;\n \n   // AUDIO\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0002-Improve-Dolby-Vision-detection-for-Android.patch",
    "content": "From 684e791b37f4a0c60af89c3a28bf1404d4cd0614 Mon Sep 17 00:00:00 2001\nFrom: Serghei Scobici <serghei.scobici@endava.com>\nDate: Sun, 8 Jan 2023 17:08:09 +0200\nSubject: [PATCH 02/21] Improve Dolby Vision detection for Android\n\n---\n .../DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp | 10 ++++++++++\n xbmc/cores/VideoPlayer/DVDStreamInfo.cpp               |  4 ++++\n xbmc/cores/VideoPlayer/DVDStreamInfo.h                 |  1 +\n 3 files changed, 15 insertions(+)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\nindex 0be40dd87c..ae8943655e 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n@@ -501,6 +501,16 @@ bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptio\n       bool isDvhe = (m_hints.codec_tag == MKTAG('d', 'v', 'h', 'e'));\n       bool isDvh1 = (m_hints.codec_tag == MKTAG('d', 'v', 'h', '1'));\n \n+      // some files don't have dvhe or dvh1 tag set up but have Dolby Vision side data\n+      if (!isDvhe && !isDvh1 && m_hints.hdrType == StreamHdrType::HDR_TYPE_DOLBYVISION)\n+      {\n+        // page 10, table 2 from https://professional.dolby.com/siteassets/content-creation/dolby-vision-for-content-creators/dolby-vision-streams-within-the-http-live-streaming-format-v2.0-13-november-2018.pdf\n+        if (m_hints.codec_tag == MKTAG('h', 'v', 'c', '1'))\n+          isDvh1 = true;\n+        else\n+          isDvhe = true;\n+      }\n+\n       if (isDvhe || isDvh1)\n       {\n         bool displaySupportsDovi = CAndroidUtils::GetDisplayHDRCapabilities().SupportsDolbyVision();\ndiff --git a/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp b/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp\nindex 0bac726df6..df9dc537fb 100644\n--- a/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDStreamInfo.cpp\n@@ -58,6 +58,7 @@ void CDVDStreamInfo::Clear()\n   ptsinvalid = false;\n   forced_aspect = false;\n   bitsperpixel = 0;\n+  hdrType = StreamHdrType::HDR_TYPE_NONE;\n   colorSpace = AVCOL_SPC_UNSPECIFIED;\n   colorRange = AVCOL_RANGE_UNSPECIFIED;\n   colorPrimaries = AVCOL_PRI_UNSPECIFIED;\n@@ -109,6 +110,7 @@ bool CDVDStreamInfo::Equal(const CDVDStreamInfo& right, int compare)\n   || bitsperpixel != right.bitsperpixel\n   || bitdepth != right.bitdepth\n   || vfr != right.vfr\n+  || hdrType != right.hdrType\n   || colorSpace != right.colorSpace\n   || colorRange != right.colorRange\n   || colorPrimaries != right.colorPrimaries\n@@ -233,6 +235,7 @@ void CDVDStreamInfo::Assign(const CDVDStreamInfo& right, bool withextradata)\n   bitdepth = right.bitdepth;\n   vfr = right.vfr;\n   codecOptions = right.codecOptions;\n+  hdrType = right.hdrType;\n   colorSpace = right.colorSpace;\n   colorRange = right.colorRange;\n   colorPrimaries = right.colorPrimaries;\n@@ -309,6 +312,7 @@ void CDVDStreamInfo::Assign(const CDemuxStream& right, bool withextradata)\n     orientation = stream->iOrientation;\n     bitsperpixel = stream->iBitsPerPixel;\n     bitdepth = stream->bitDepth;\n+    hdrType = stream->hdr_type;\n     colorSpace = stream->colorSpace;\n     colorRange = stream->colorRange;\n     colorPrimaries = stream->colorPrimaries;\ndiff --git a/xbmc/cores/VideoPlayer/DVDStreamInfo.h b/xbmc/cores/VideoPlayer/DVDStreamInfo.h\nindex 8d2989af75..ed94acd6b3 100644\n--- a/xbmc/cores/VideoPlayer/DVDStreamInfo.h\n+++ b/xbmc/cores/VideoPlayer/DVDStreamInfo.h\n@@ -73,6 +73,7 @@ public:\n   int orientation; // orientation of the video in degrees counter clockwise\n   int bitsperpixel;\n   int bitdepth;\n+  StreamHdrType hdrType;\n   AVColorSpace colorSpace;\n   AVColorRange colorRange;\n   AVColorPrimaries colorPrimaries;\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0003-WinSystemAmlogic-rework-EGL-native-window.patch",
    "content": "From 8a013649ea33ea8ce2f4bfd432260de1609eb977 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 6 Oct 2022 16:47:58 +0200\nSubject: [PATCH 03/21] WinSystemAmlogic: rework EGL native window The\n <EGL/fbdev_window.h> include was missing and native window was NULL as\n _FBDEV_WINDOW_H_ was not defined.\n\n---\n xbmc/windowing/amlogic/WinSystemAmlogic.cpp   | 33 ++++++++-----------\n xbmc/windowing/amlogic/WinSystemAmlogic.h     |  4 +--\n .../amlogic/WinSystemAmlogicGLESContext.cpp   |  2 +-\n 3 files changed, 17 insertions(+), 22 deletions(-)\n\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\nindex 3d40e6b24d..0a52b95144 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n@@ -38,8 +38,9 @@\n \n using namespace KODI;\n \n-CWinSystemAmlogic::CWinSystemAmlogic() :\n-  m_libinput(new CLibInputHandler)\n+CWinSystemAmlogic::CWinSystemAmlogic()\n+:  m_nativeWindow(NULL)\n+,  m_libinput(new CLibInputHandler)\n {\n   const char *env_framebuffer = getenv(\"FRAMEBUFFER\");\n \n@@ -53,7 +54,6 @@ CWinSystemAmlogic::CWinSystemAmlogic() :\n   }\n \n   m_nativeDisplay = EGL_NO_DISPLAY;\n-  m_nativeWindow = static_cast<EGLNativeWindowType>(NULL);\n \n   m_displayWidth = 0;\n   m_displayHeight = 0;\n@@ -64,14 +64,6 @@ CWinSystemAmlogic::CWinSystemAmlogic() :\n   m_libinput->Start();\n }\n \n-CWinSystemAmlogic::~CWinSystemAmlogic()\n-{\n-  if(m_nativeWindow)\n-  {\n-    m_nativeWindow = static_cast<EGLNativeWindowType>(NULL);\n-  }\n-}\n-\n bool CWinSystemAmlogic::InitWindowSystem()\n {\n   const std::shared_ptr<CSettings> settings = CServiceBroker::GetSettingsComponent()->GetSettings();\n@@ -146,6 +138,12 @@ bool CWinSystemAmlogic::CreateNewWindow(const std::string& name,\n   m_displayHeight = res.iScreenHeight;\n   m_fRefreshRate  = res.fRefreshRate;\n \n+  if (m_nativeWindow == NULL)\n+    m_nativeWindow = new fbdev_window;\n+\n+  m_nativeWindow->width = m_nWidth;\n+  m_nativeWindow->height = m_nHeight;\n+\n   if ((m_bWindowCreated && aml_get_native_resolution(&current_resolution)) &&\n     current_resolution.iWidth == res.iWidth && current_resolution.iHeight == res.iHeight &&\n     current_resolution.iScreenWidth == res.iScreenWidth && current_resolution.iScreenHeight == res.iScreenHeight &&\n@@ -175,13 +173,6 @@ bool CWinSystemAmlogic::CreateNewWindow(const std::string& name,\n   m_stereo_mode = stereo_mode;\n   m_bFullScreen = fullScreen;\n \n-#ifdef _FBDEV_WINDOW_H_\n-  fbdev_window *nativeWindow = new fbdev_window;\n-  nativeWindow->width = res.iWidth;\n-  nativeWindow->height = res.iHeight;\n-  m_nativeWindow = static_cast<EGLNativeWindowType>(nativeWindow);\n-#endif\n-\n   aml_set_native_resolution(res, m_framebuffer_name, stereo_mode);\n \n   if (!m_delayDispReset)\n@@ -199,7 +190,11 @@ bool CWinSystemAmlogic::CreateNewWindow(const std::string& name,\n \n bool CWinSystemAmlogic::DestroyWindow()\n {\n-  m_nativeWindow = static_cast<EGLNativeWindowType>(NULL);\n+  if (m_nativeWindow != NULL)\n+  {\n+    delete(m_nativeWindow);\n+    m_nativeWindow = NULL;\n+  }\n \n   return true;\n }\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.h b/xbmc/windowing/amlogic/WinSystemAmlogic.h\nindex 7cfb2dc7c3..2c70086caa 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogic.h\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.h\n@@ -14,6 +14,7 @@\n #include \"windowing/WinSystem.h\"\n #include \"threads/SystemClock.h\"\n #include \"system_egl.h\"\n+#include <EGL/fbdev_window.h>\n \n class IDispResource;\n \n@@ -21,7 +22,6 @@ class CWinSystemAmlogic : public CWinSystemBase\n {\n public:\n   CWinSystemAmlogic();\n-  virtual ~CWinSystemAmlogic();\n \n   bool InitWindowSystem() override;\n   bool DestroyWindowSystem() override;\n@@ -42,7 +42,7 @@ public:\n protected:\n   std::string m_framebuffer_name;\n   EGLDisplay m_nativeDisplay;\n-  EGLNativeWindowType m_nativeWindow;\n+  fbdev_window *m_nativeWindow;\n \n   int m_displayWidth;\n   int m_displayHeight;\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\nindex 16ba54a02f..f6cbac696b 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n@@ -74,7 +74,7 @@ bool CWinSystemAmlogicGLESContext::CreateNewWindow(const std::string& name,\n     return false;\n   }\n \n-  if (!m_pGLContext.CreateSurface(m_nativeWindow))\n+  if (!m_pGLContext.CreateSurface(static_cast<EGLNativeWindowType>(m_nativeWindow)))\n   {\n     return false;\n   }\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0004-WinSystemAmlogicGLES-clean-up-GLES-references-on-win.patch",
    "content": "From abad3ebbbea8de81c7f92d5caea3da94d54b0614 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 26 Jan 2023 11:39:43 +0100\nSubject: [PATCH 04/21] WinSystemAmlogicGLES: clean up GLES references on\n window destroy\n\n---\n .../amlogic/WinSystemAmlogicGLESContext.cpp    | 18 +++++++++++++-----\n .../amlogic/WinSystemAmlogicGLESContext.h      |  2 ++\n 2 files changed, 15 insertions(+), 5 deletions(-)\n\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\nindex f6cbac696b..39fbaf03a1 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n@@ -58,17 +58,19 @@ bool CWinSystemAmlogicGLESContext::InitWindowSystem()\n   return true;\n }\n \n+bool CWinSystemAmlogicGLESContext::DestroyWindowSystem()\n+{\n+  m_pGLContext.DestroyContext();\n+  m_pGLContext.Destroy();\n+  return CWinSystemAmlogic::DestroyWindowSystem();\n+}\n+\n bool CWinSystemAmlogicGLESContext::CreateNewWindow(const std::string& name,\n                                                bool fullScreen,\n                                                RESOLUTION_INFO& res)\n {\n   m_pGLContext.DestroySurface();\n \n-  if (!CWinSystemAmlogic::DestroyWindow())\n-  {\n-    return false;\n-  }\n-\n   if (!CWinSystemAmlogic::CreateNewWindow(name, fullScreen, res))\n   {\n     return false;\n@@ -95,6 +97,12 @@ bool CWinSystemAmlogicGLESContext::CreateNewWindow(const std::string& name,\n   return true;\n }\n \n+bool CWinSystemAmlogicGLESContext::DestroyWindow()\n+{\n+  m_pGLContext.DestroySurface();\n+  return CWinSystemAmlogic::DestroyWindow();\n+}\n+\n bool CWinSystemAmlogicGLESContext::ResizeWindow(int newWidth, int newHeight, int newLeft, int newTop)\n {\n   CRenderSystemGLES::ResetRenderSystem(newWidth, newHeight);\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h\nindex d2f0e84e90..7d7467ee1a 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h\n@@ -32,9 +32,11 @@ public:\n   // Implementation of CWinSystemBase via CWinSystemAmlogic\n   CRenderSystemBase *GetRenderSystem() override { return this; }\n   bool InitWindowSystem() override;\n+  bool DestroyWindowSystem() override;\n   bool CreateNewWindow(const std::string& name,\n                        bool fullScreen,\n                        RESOLUTION_INFO& res) override;\n+  bool DestroyWindow() override;\n \n   bool ResizeWindow(int newWidth, int newHeight, int newLeft, int newTop) override;\n   bool SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool blankOtherDisplays) override;\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0005-tools-depends-Add-Rust-toolchain-cargo-c-and-libdovi.patch",
    "content": "From 76387530102fc7c9226e0f4df2561a769f5343aa Mon Sep 17 00:00:00 2001\nFrom: quietvoid <39477805+quietvoid@users.noreply.github.com>\nDate: Sat, 11 Mar 2023 08:39:55 -0500\nSubject: [PATCH 05/21] tools/depends: Add Rust toolchain, cargo-c and libdovi\n dependencies\n\n---\n docs/README.Android.md                       |  4 ++\n tools/depends/Makefile.include.in            |  1 +\n tools/depends/configure.ac                   |  7 +++\n tools/depends/native/Makefile                |  8 +++-\n tools/depends/native/cargo-c/CARGO-C-VERSION |  5 ++\n tools/depends/native/cargo-c/Makefile        | 38 ++++++++++++++++\n tools/depends/native/rustup/Makefile         | 48 ++++++++++++++++++++\n tools/depends/native/rustup/RUSTUP-VERSION   |  5 ++\n tools/depends/target/Makefile                |  4 ++\n tools/depends/target/libdovi/LIBDOVI-VERSION |  6 +++\n tools/depends/target/libdovi/Makefile        | 43 ++++++++++++++++++\n 11 files changed, 168 insertions(+), 1 deletion(-)\n create mode 100644 tools/depends/native/cargo-c/CARGO-C-VERSION\n create mode 100644 tools/depends/native/cargo-c/Makefile\n create mode 100644 tools/depends/native/rustup/Makefile\n create mode 100644 tools/depends/native/rustup/RUSTUP-VERSION\n create mode 100644 tools/depends/target/libdovi/LIBDOVI-VERSION\n create mode 100644 tools/depends/target/libdovi/Makefile\n\ndiff --git a/docs/README.Android.md b/docs/README.Android.md\nindex ecc0dcbbd1..48c7881d4b 100644\n--- a/docs/README.Android.md\n+++ b/docs/README.Android.md\n@@ -236,6 +236,10 @@ make -j$(getconf _NPROCESSORS_ONLN)\n ```\n   FFmpeg configure options, e.g. --enable-vaapi (target)\n \n+```\n+--enable-libdovi=<yes:no>\n+```\n+  enable `libdovi`, for on-the-fly Dolby Vision conversion. Defaults to no.\n \n **Android Specific:**\n \ndiff --git a/tools/depends/Makefile.include.in b/tools/depends/Makefile.include.in\nindex 3a36d20d68..03c27df67b 100644\n--- a/tools/depends/Makefile.include.in\n+++ b/tools/depends/Makefile.include.in\n@@ -31,6 +31,7 @@ SHA512SUM=@SHA512SUM@\n SHA256SUM=@SHA256SUM@\n SHASUM=@SHASUM@\n HASH_TOOL_FLAGS=-c --status\n+ENABLE_LIBDOVI=@use_libdovi@\n \n HAS_ZLIB=@has_zlib@\n NEED_LIBICONV=@need_libiconv@\ndiff --git a/tools/depends/configure.ac b/tools/depends/configure.ac\nindex 79ab65900b..929300b31e 100644\n--- a/tools/depends/configure.ac\n+++ b/tools/depends/configure.ac\n@@ -129,6 +129,11 @@ AC_ARG_WITH([ffmpeg-options],\n   [ffmpeg_options=$withval],\n   [ffmpeg_options=default])\n \n+AC_ARG_ENABLE([libdovi],\n+  [AS_HELP_STRING([--enable-libdovi],\n+  [enable libdovi (optional for android). default is no])],\n+  [use_libdovi=$enableval],\n+  [use_libdovi=no])\n \n if test \"$use_ccache\" = \"yes\"; then\n   AC_CHECK_PROG(HAVE_CCACHE,ccache,\"yes\",\"no\",)\n@@ -717,6 +722,7 @@ AC_SUBST(host_cxxflags)\n AC_SUBST(app_rendersystem)\n AC_SUBST(app_winsystem)\n AC_SUBST(ffmpeg_options)\n+AC_SUBST(use_libdovi)\n \n [\n if test \"x$CCACHE\" = \"x\"\n@@ -853,4 +859,5 @@ echo -e \"depends:\\t\\t $prefix/$deps_dir\"\n if test \"$platform_os\" = \"android\"; then\n   echo -e \"ndk-api-level:\\t $use_ndk_api\"\n   echo -e \"build-tools:\\t $build_tools_path\"\n+  echo -e \"libdovi:\\t $use_libdovi\"\n fi\ndiff --git a/tools/depends/native/Makefile b/tools/depends/native/Makefile\nindex 800270f8a3..7a3db29391 100644\n--- a/tools/depends/native/Makefile\n+++ b/tools/depends/native/Makefile\n@@ -50,6 +50,12 @@ ifeq ($(OS),linux)\n   endif\n endif\n \n+ifeq ($(OS),android)\n+  ifeq ($(ENABLE_LIBDOVI),yes)\n+    NATIVE += rustup cargo-c\n+  endif\n+endif\n+\n .PHONY: $(NATIVE) native\n \n all: native\n@@ -59,6 +65,7 @@ all: native\n autoconf-archive: autoconf\n autoconf: m4\n automake: autoconf\n+cargo-c: pkg-config openssl rustup\n dpkg: automake gettext libtool pkg-config tar\n heimdal: libtool\n JsonSchemaBuilder: automake\n@@ -102,4 +109,3 @@ test-dependencies:\n \n distclean::\n \tfor d in $(NATIVE); do $(MAKE) -C $$d distclean; done\n-\ndiff --git a/tools/depends/native/cargo-c/CARGO-C-VERSION b/tools/depends/native/cargo-c/CARGO-C-VERSION\nnew file mode 100644\nindex 0000000000..3d470c5729\n--- /dev/null\n+++ b/tools/depends/native/cargo-c/CARGO-C-VERSION\n@@ -0,0 +1,5 @@\n+APPNAME=cargo-c\n+BASE_URL=https://github.com/lu-zero/cargo-c/archive\n+VERSION=v0.9.17\n+ARCHIVE=$(VERSION).tar.gz\n+SHA512=529db1de509add6c3ad58932ee16326bf0a2e7d154797adbf2b3755ae98b4f59bf0d01250e75ad4fc63b7ea34579cded7d7c6c3c8b92db6d8e00994062ee136f\ndiff --git a/tools/depends/native/cargo-c/Makefile b/tools/depends/native/cargo-c/Makefile\nnew file mode 100644\nindex 0000000000..3c12014999\n--- /dev/null\n+++ b/tools/depends/native/cargo-c/Makefile\n@@ -0,0 +1,38 @@\n+include ../../Makefile.include CARGO-C-VERSION ../../download-files.include\n+DEPS = ../../Makefile.include Makefile CARGO-C-VERSION ../../download-files.include\n+\n+PREFIX=$(NATIVEPREFIX)\n+PLATFORM=$(NATIVEPLATFORM)\n+\n+export PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig\n+\n+APP=$(PLATFORM)/target/release/$(APPNAME)\n+\n+CARGO_ENV_VARS = RUSTUP_HOME=$(PREFIX)/.rustup \\\n+\tCARGO_HOME=$(PREFIX)/.cargo\n+CARGO = $(CARGO_ENV_VARS) $(PREFIX)/bin/cargo\n+\n+CLEANUP_CMD = [ -e $(PREFIX)/bin/cargo ] \\\n+\t&& $(CARGO) uninstall cargo-c || true\n+\n+all: .installed-$(PLATFORM)\n+\n+$(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE)\n+\trm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)\n+\tcd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)\n+\n+$(APP): $(PLATFORM)\n+\t$(CARGO) build --release --manifest-path $(PLATFORM)/Cargo.toml\n+\n+.installed-$(PLATFORM): $(APP)\n+\t$(CARGO) install --profile release --path $(PLATFORM)\n+\n+\ttouch $@\n+\n+clean:\n+\t$(CLEANUP_CMD)\n+\trm -f .installed-$(PLATFORM)\n+\n+distclean::\n+\t$(CLEANUP_CMD)\n+\trm -rf $(PLATFORM) .installed-$(PLATFORM)\ndiff --git a/tools/depends/native/rustup/Makefile b/tools/depends/native/rustup/Makefile\nnew file mode 100644\nindex 0000000000..67c014b97e\n--- /dev/null\n+++ b/tools/depends/native/rustup/Makefile\n@@ -0,0 +1,48 @@\n+include ../../Makefile.include RUSTUP-VERSION ../../download-files.include\n+DEPS = ../../Makefile.include Makefile RUSTUP-VERSION ../../download-files.include\n+\n+PREFIX=$(NATIVEPREFIX)\n+PLATFORM=$(NATIVEPLATFORM)\n+\n+export RUSTUP_HOME=$(PREFIX)/.rustup\n+export CARGO_HOME=$(PREFIX)/.cargo\n+\n+APP=$(PLATFORM)/bin/$(APPNAME)\n+\n+RUSTUP_ENV_VARS = RUSTUP_HOME=$(PREFIX)/.rustup \\\n+\tCARGO_HOME=$(PREFIX)/.cargo\n+RUSTUP = $(RUSTUP_ENV_VARS) $(PREFIX)/bin/rustup\n+\n+CLEANUP_CMD=[ -e $(PREFIX)/bin/rustup ] \\\n+\t&& $(RUSTUP) self uninstall -y \\\n+\t&& rm -f $(PREFIX)/bin/rustup \\\n+\t&& rm -f $(PREFIX)/bin/cargo || true\n+\n+all: .installed-$(PLATFORM)\n+\n+$(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE)\n+\trm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)\n+\tcd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)\n+\n+$(APP): $(PLATFORM)\n+\tbash $(PLATFORM)/rustup-init.sh --no-modify-path -y\n+\n+.installed-$(PLATFORM): $(APP)\n+\tln -sf $(CARGO_HOME)/bin/rustup $(PREFIX)/bin/rustup\n+\tln -sf $(CARGO_HOME)/bin/cargo $(PREFIX)/bin/cargo\n+\n+\t$(RUSTUP) default stable\n+\n+ifeq ($(CROSS_COMPILING),yes)\n+\t$(RUSTUP) target add $(HOST)\n+endif\n+\n+\ttouch $@\n+\n+clean:\n+\t$(CLEANUP_CMD)\n+\trm -f .installed-$(PLATFORM)\n+\n+distclean::\n+\t$(CLEANUP_CMD)\n+\trm -rf $(PLATFORM) .installed-$(PLATFORM)\ndiff --git a/tools/depends/native/rustup/RUSTUP-VERSION b/tools/depends/native/rustup/RUSTUP-VERSION\nnew file mode 100644\nindex 0000000000..74bd54c23a\n--- /dev/null\n+++ b/tools/depends/native/rustup/RUSTUP-VERSION\n@@ -0,0 +1,5 @@\n+APPNAME=rustup\n+BASE_URL=https://github.com/rust-lang/rustup.rs/archive\n+VERSION=1.25.1\n+ARCHIVE=$(VERSION).tar.gz\n+SHA512=a77cb34ba0c2e7577c8acbd474197aabaa84e3b64b3c42f1d0c328df55c6accbe412aba9a787f0ea2f0654f085475455c9c488b2b6de34ad8889a2716d1e8d0c\ndiff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile\nindex 28d122a602..4e18ed08ef 100644\n--- a/tools/depends/target/Makefile\n+++ b/tools/depends/target/Makefile\n@@ -79,6 +79,10 @@ ifeq ($(OS),android)\n   DEPENDS += dummy-libxbmc libuuid\n   PYMODULE_DEPS = dummy-libxbmc\n   LIBUUID = libuuid\n+\n+  ifeq ($(ENABLE_LIBDOVI),yes)\n+    DEPENDS += libdovi\n+  endif\n endif\n \n DEPENDS := $(filter-out $(EXCLUDED_DEPENDS),$(DEPENDS))\ndiff --git a/tools/depends/target/libdovi/LIBDOVI-VERSION b/tools/depends/target/libdovi/LIBDOVI-VERSION\nnew file mode 100644\nindex 0000000000..1fe73ed11f\n--- /dev/null\n+++ b/tools/depends/target/libdovi/LIBDOVI-VERSION\n@@ -0,0 +1,6 @@\n+LIBNAME=libdovi\n+BASE_URL=https://github.com/quietvoid/dovi_tool/archive\n+VERSION=libdovi-3.1.2\n+ARCHIVE=$(VERSION).tar.gz\n+SHA512=577d5a5916dedbf222150ddb76219325e0e9a7ae91c5978b1b1fd65048d1f548e29aa8ebbbdc836380ec399e2bc105a722515f783be70837dc6403cb34586bb2\n+BYPRODUCT=libdovi.a\ndiff --git a/tools/depends/target/libdovi/Makefile b/tools/depends/target/libdovi/Makefile\nnew file mode 100644\nindex 0000000000..2d868d2fde\n--- /dev/null\n+++ b/tools/depends/target/libdovi/Makefile\n@@ -0,0 +1,43 @@\n+include ../../Makefile.include LIBDOVI-VERSION ../../download-files.include\n+DEPS = ../../Makefile.include Makefile LIBDOVI-VERSION ../../download-files.include\n+\n+LIBDYLIB=$(PLATFORM)/target/$(HOST)/release/$(BYPRODUCT)\n+\n+CARGO_ENV_VARS = RUSTUP_HOME=$(NATIVEPREFIX)/.rustup \\\n+\tCARGO_HOME=$(NATIVEPREFIX)/.cargo\n+CARGO = $(CARGO_ENV_VARS) $(NATIVEPREFIX)/bin/cargo\n+\n+CARGO_BASE_OPTS = --manifest-path $(PLATFORM)/dolby_vision/Cargo.toml\n+ifeq ($(CROSS_COMPILING),yes)\n+  CARGO_BASE_OPTS += --target $(HOST)\n+endif\n+\n+CARGO_BUILD_OPTS = --offline \\\n+\t--frozen \\\n+\t--library-type staticlib \\\n+\t--profile release \\\n+\t--prefix $(PREFIX) \\\n+\t$(CARGO_BASE_OPTS)\n+\n+all: .installed-$(PLATFORM)\n+\n+$(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE)\n+\trm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)\n+\tcd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)\n+\tcd $(PLATFORM);\n+\t$(CARGO) fetch $(CARGO_BASE_OPTS)\n+\n+$(LIBDYLIB): $(PLATFORM)\n+\t$(CARGO) cbuild $(CARGO_BUILD_OPTS)\n+\n+.installed-$(PLATFORM): $(LIBDYLIB)\n+\t$(CARGO) cinstall $(CARGO_BUILD_OPTS)\n+\n+\ttouch $@\n+\n+clean:\n+\tcd $(PLATFORM); $(CARGO) clean\n+\trm -f .installed-$(PLATFORM)\n+\n+distclean::\n+\trm -rf $(PLATFORM) .installed-$(PLATFORM)\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0006-Add-libdovi-as-optional-build-dependency.patch",
    "content": "From e4d478490bdefd7977285e1a5b807525791621c7 Mon Sep 17 00:00:00 2001\nFrom: quietvoid <39477805+quietvoid@users.noreply.github.com>\nDate: Sat, 11 Mar 2023 08:40:00 -0500\nSubject: [PATCH 06/21] Add libdovi as optional build dependency\n\n---\n cmake/modules/FindLibDovi.cmake      | 32 ++++++++++++++++++++++++++++\n cmake/platform/android/android.cmake |  1 +\n 2 files changed, 33 insertions(+)\n create mode 100644 cmake/modules/FindLibDovi.cmake\n\ndiff --git a/cmake/modules/FindLibDovi.cmake b/cmake/modules/FindLibDovi.cmake\nnew file mode 100644\nindex 0000000000..8646ba368a\n--- /dev/null\n+++ b/cmake/modules/FindLibDovi.cmake\n@@ -0,0 +1,32 @@\n+# FindDovi\n+# -------\n+# Finds the libdovi library\n+#\n+# This will define the following variables::\n+#\n+# LIBDOVI_FOUND - system has libdovi\n+# LIBDOVI_INCLUDE_DIRS - the libdovi include directories\n+# LIBDOVI_LIBRARIES - the libdovi libraries\n+# LIBDOVI_DEFINITIONS - the libdovi compile definitions\n+\n+if(PKG_CONFIG_FOUND)\n+  pkg_check_modules(PC_LIBDOVI libdovi QUIET)\n+endif()\n+\n+find_library(LIBDOVI_LIBRARY NAMES dovi libdovi\n+                             PATHS ${PC_LIBDOVI_LIBDIR}\n+)\n+find_path(LIBDOVI_INCLUDE_DIR NAMES libdovi/rpu_parser.h\n+                              PATHS ${PC_LIBDOVI_INCLUDEDIR})\n+\n+include(FindPackageHandleStandardArgs)\n+find_package_handle_standard_args(LibDovi\n+                                  REQUIRED_VARS LIBDOVI_LIBRARY LIBDOVI_INCLUDE_DIR)\n+\n+if(LIBDOVI_FOUND)\n+  set(LIBDOVI_INCLUDE_DIRS ${LIBDOVI_INCLUDE_DIR})\n+  set(LIBDOVI_LIBRARIES ${LIBDOVI_LIBRARY})\n+  set(LIBDOVI_DEFINITIONS -DHAVE_LIBDOVI=1)\n+endif()\n+\n+mark_as_advanced(LIBDOVI_INCLUDE_DIR LIBDOVI_LIBRARY)\ndiff --git a/cmake/platform/android/android.cmake b/cmake/platform/android/android.cmake\nindex 2c4fbb48f2..ca3fad9dce 100644\n--- a/cmake/platform/android/android.cmake\n+++ b/cmake/platform/android/android.cmake\n@@ -1,5 +1,6 @@\n set(PLATFORM_REQUIRED_DEPS LibAndroidJNI OpenGLES EGL LibZip)\n set(APP_RENDER_SYSTEM gles)\n+list(APPEND PLATFORM_OPTIONAL_DEPS LibDovi)\n \n # Store SDK compile version\n set(TARGET_SDK 33)\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0007-Optionally-convert-Dolby-Vision.patch",
    "content": "From 918640afdbf41fa2670b104346ccb11ee2b2a455 Mon Sep 17 00:00:00 2001\nFrom: quietvoid <39477805+quietvoid@users.noreply.github.com>\nDate: Sat, 11 Mar 2023 08:40:03 -0500\nSubject: [PATCH 07/21] Optionally convert Dolby Vision\n\nTo improve compatibility\n---\n .../resources/strings.po                      | 12 +++\n system/settings/settings.xml                  |  9 +++\n .../Video/DVDVideoCodecAndroidMediaCodec.cpp  |  8 ++\n xbmc/settings/Settings.h                      |  1 +\n xbmc/utils/BitstreamConverter.cpp             | 76 ++++++++++++++++++-\n xbmc/utils/BitstreamConverter.h               |  2 +\n 6 files changed, 107 insertions(+), 1 deletion(-)\n\ndiff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po\nindex 27c0c9e8e9..2b2237e431 100644\n--- a/addons/resource.language.en_gb/resources/strings.po\n+++ b/addons/resource.language.en_gb/resources/strings.po\n@@ -23613,3 +23613,15 @@ msgstr \"\"\n msgctxt \"#39189\"\n msgid \"Available only with manual subtitle position\"\n msgstr \"\"\n+\n+#. Title of Dolby Vision RPU conversion setting\n+#: system/settings/settings.xml\n+msgctxt \"#39300\"\n+msgid \"Convert Dolby Vision for compatibility\"\n+msgstr \"\"\n+\n+#. Help text for setting \"Convert Dolby Vision for compatibility\" of label #39300\n+#: system/settings/settings.xml\n+msgctxt \"#39301\"\n+msgid \"Converts Dolby Vision profile 7 to profile 8.1, ignores enhancement layer\"\n+msgstr \"\"\ndiff --git a/system/settings/settings.xml b/system/settings/settings.xml\nindex 3621d3225d..12a58527d9 100755\n--- a/system/settings/settings.xml\n+++ b/system/settings/settings.xml\n@@ -228,6 +228,15 @@\n           <default>true</default>\n           <control type=\"toggle\" />\n         </setting>\n+        <setting id=\"videoplayer.convertdovi\" type=\"boolean\" label=\"39300\" help=\"39301\">\n+          <requirement>HAS_MEDIACODEC</requirement>\n+          <level>2</level>\n+          <default>false</default>\n+          <updates>\n+            <update type=\"change\" />\n+          </updates>\n+          <control type=\"toggle\" />\n+        </setting>\n       </group>\n       <group id=\"4\" label=\"14232\">\n         <setting id=\"videoplayer.stereoscopicplaybackmode\" type=\"integer\" label=\"36520\" help=\"36537\">\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\nindex ae8943655e..2135e7d6f8 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n@@ -543,7 +543,15 @@ bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptio\n         {\n           m_bitstream.reset();\n         }\n+\n+        if (m_bitstream)\n+        {\n+          bool convertDovi = CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n+              CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI);\n+          m_bitstream->SetConvertDovi(convertDovi);\n+        }\n       }\n+\n       break;\n     }\n     case AV_CODEC_ID_WMV3:\ndiff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h\nindex 8ac5485a9b..28e6c9d98d 100644\n--- a/xbmc/settings/Settings.h\n+++ b/xbmc/settings/Settings.h\n@@ -133,6 +133,7 @@ public:\n   static constexpr auto SETTING_VIDEOPLAYER_USESTAGEFRIGHT = \"videoplayer.usestagefright\";\n   static constexpr auto SETTING_VIDEOPLAYER_LIMITGUIUPDATE = \"videoplayer.limitguiupdate\";\n   static constexpr auto SETTING_VIDEOPLAYER_SUPPORTMVC = \"videoplayer.supportmvc\";\n+  static constexpr auto SETTING_VIDEOPLAYER_CONVERTDOVI = \"videoplayer.convertdovi\";\n   static constexpr auto SETTING_MYVIDEOS_SELECTACTION = \"myvideos.selectaction\";\n   static constexpr auto SETTING_MYVIDEOS_USETAGS = \"myvideos.usetags\";\n   static constexpr auto SETTING_MYVIDEOS_EXTRACTFLAGS = \"myvideos.extractflags\";\ndiff --git a/xbmc/utils/BitstreamConverter.cpp b/xbmc/utils/BitstreamConverter.cpp\nindex 52152a4312..c51ac92138 100644\n--- a/xbmc/utils/BitstreamConverter.cpp\n+++ b/xbmc/utils/BitstreamConverter.cpp\n@@ -20,6 +20,13 @@\n \n #include <algorithm>\n \n+extern \"C\"\n+{\n+#ifdef HAVE_LIBDOVI\n+#include <libdovi/rpu_parser.h>\n+#endif\n+}\n+\n enum {\n   AVC_NAL_SLICE=1,\n   AVC_NAL_DPA,\n@@ -269,6 +276,32 @@ static bool has_sei_recovery_point(const uint8_t *p, const uint8_t *end)\n   return false;\n }\n \n+#ifdef HAVE_LIBDOVI\n+// The returned data must be freed with `dovi_data_free`\n+// May be NULL if no conversion was done\n+static const DoviData* convert_dovi_rpu_nal(uint8_t* buf, uint32_t nal_size)\n+{\n+  DoviRpuOpaque* rpu = dovi_parse_unspec62_nalu(buf, nal_size);\n+  const DoviRpuDataHeader* header = dovi_rpu_get_header(rpu);\n+  const DoviData* rpu_data = NULL;\n+\n+  if (header && header->guessed_profile == 7)\n+  {\n+    int ret = dovi_convert_rpu_with_mode(rpu, 2);\n+    if (ret < 0)\n+      goto done;\n+\n+    rpu_data = dovi_write_unspec62_nalu(rpu);\n+  }\n+\n+done:\n+  dovi_rpu_free_header(header);\n+  dovi_rpu_free(rpu);\n+\n+  return rpu_data;\n+}\n+#endif\n+\n ////////////////////////////////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////////////////////////////\n CBitstreamParser::CBitstreamParser() = default;\n@@ -336,6 +369,7 @@ CBitstreamConverter::CBitstreamConverter()\n   m_convert_bytestream = false;\n   m_sps_pps_context.sps_pps_data = NULL;\n   m_start_decode = true;\n+  m_convert_dovi = false;\n }\n \n CBitstreamConverter::~CBitstreamConverter()\n@@ -894,6 +928,10 @@ bool CBitstreamConverter::BitstreamConvert(uint8_t* pData, int iSize, uint8_t **\n   uint32_t cumul_size = 0;\n   const uint8_t *buf_end = buf + buf_size;\n \n+#ifdef HAVE_LIBDOVI\n+  const DoviData* rpu_data = NULL;\n+#endif\n+\n   switch (m_codec)\n   {\n     case AV_CODEC_ID_H264:\n@@ -947,12 +985,48 @@ bool CBitstreamConverter::BitstreamConvert(uint8_t* pData, int iSize, uint8_t **\n     }\n     else\n     {\n-      BitstreamAllocAndCopy(poutbuf, poutbuf_size, NULL, 0, buf, nal_size, unit_type);\n+      bool write_buf = true;\n+      const uint8_t* buf_to_write = buf;\n+      int32_t final_nal_size = nal_size;\n+\n       if (!m_sps_pps_context.first_idr && IsSlice(unit_type))\n       {\n           m_sps_pps_context.first_idr = 1;\n           m_sps_pps_context.idr_sps_pps_seen = 0;\n       }\n+\n+      if (m_convert_dovi)\n+      {\n+        if (unit_type == HEVC_NAL_UNSPEC62)\n+        {\n+#ifdef HAVE_LIBDOVI\n+          // Convert the RPU itself\n+          rpu_data = convert_dovi_rpu_nal(buf, nal_size);\n+          if (rpu_data)\n+          {\n+            buf_to_write = rpu_data->data;\n+            final_nal_size = rpu_data->len;\n+          }\n+#endif\n+        }\n+        else if (unit_type == HEVC_NAL_UNSPEC63)\n+        {\n+          // Ignore the enhancement layer, may or may not help\n+          write_buf = false;\n+        }\n+      }\n+\n+      if (write_buf)\n+        BitstreamAllocAndCopy(poutbuf, poutbuf_size, NULL, 0, buf_to_write, final_nal_size,\n+                              unit_type);\n+\n+#ifdef HAVE_LIBDOVI\n+      if (rpu_data)\n+      {\n+        dovi_data_free(rpu_data);\n+        rpu_data = NULL;\n+      }\n+#endif\n     }\n \n     buf += nal_size;\ndiff --git a/xbmc/utils/BitstreamConverter.h b/xbmc/utils/BitstreamConverter.h\nindex 355818ed8f..4381599b21 100644\n--- a/xbmc/utils/BitstreamConverter.h\n+++ b/xbmc/utils/BitstreamConverter.h\n@@ -104,6 +104,7 @@ public:\n   int               GetExtraSize() const;\n   void              ResetStartDecode(void);\n   bool              CanStartDecode() const;\n+  void SetConvertDovi(bool value) { m_convert_dovi = value; }\n \n   static bool       mpeg2_sequence_header(const uint8_t *data, const uint32_t size, mpeg2_sequence *sequence);\n   static bool       h264_sequence_header(const uint8_t *data, const uint32_t size, h264_sequence *sequence);\n@@ -150,4 +151,5 @@ protected:\n   bool              m_convert_bytestream;\n   AVCodecID         m_codec;\n   bool              m_start_decode;\n+  bool m_convert_dovi;\n };\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0008-tools-depends-Enable-libdovi-by-default.patch",
    "content": "From 733957e20ecb3c1694ac5952a85974da11e5ae22 Mon Sep 17 00:00:00 2001\nFrom: quietvoid <39477805+quietvoid@users.noreply.github.com>\nDate: Sat, 11 Mar 2023 08:40:06 -0500\nSubject: [PATCH 08/21] tools/depends: Enable libdovi by default\n\nTemporarily\n---\n tools/depends/configure.ac | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/tools/depends/configure.ac b/tools/depends/configure.ac\nindex 929300b31e..f084ce9d2b 100644\n--- a/tools/depends/configure.ac\n+++ b/tools/depends/configure.ac\n@@ -133,7 +133,7 @@ AC_ARG_ENABLE([libdovi],\n   [AS_HELP_STRING([--enable-libdovi],\n   [enable libdovi (optional for android). default is no])],\n   [use_libdovi=$enableval],\n-  [use_libdovi=no])\n+  [use_libdovi=yes])\n \n if test \"$use_ccache\" = \"yes\"; then\n   AC_CHECK_PROG(HAVE_CCACHE,ccache,\"yes\",\"no\",)\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0009-libdovi-use-and-adjust-libdovi-for-Amlogic-linux-pla.patch",
    "content": "From c3bf4157843319e7c457a89dd02355347d91507e Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 6 Apr 2023 21:07:55 +0200\nSubject: [PATCH 09/21] libdovi: use and adjust libdovi for Amlogic linux\n platform\n\n---\n cmake/platform/linux/aml.cmake                 |  1 +\n system/settings/settings.xml                   |  9 +++++++--\n tools/depends/target/Makefile                  |  8 ++++----\n .../DVDCodecs/Video/DVDVideoCodecAmlogic.cpp   | 18 ++++++++++++++++++\n 4 files changed, 30 insertions(+), 6 deletions(-)\n\ndiff --git a/cmake/platform/linux/aml.cmake b/cmake/platform/linux/aml.cmake\nindex 4206c283e2..673877bd16 100644\n--- a/cmake/platform/linux/aml.cmake\n+++ b/cmake/platform/linux/aml.cmake\n@@ -1,2 +1,3 @@\n list(APPEND PLATFORM_REQUIRED_DEPS OpenGLES AML EGL LibInput Xkbcommon)\n set(APP_RENDER_SYSTEM gles)\n+list(APPEND PLATFORM_OPTIONAL_DEPS LibDovi)\ndiff --git a/system/settings/settings.xml b/system/settings/settings.xml\nindex 12a58527d9..5268475ca7 100755\n--- a/system/settings/settings.xml\n+++ b/system/settings/settings.xml\n@@ -229,9 +229,14 @@\n           <control type=\"toggle\" />\n         </setting>\n         <setting id=\"videoplayer.convertdovi\" type=\"boolean\" label=\"39300\" help=\"39301\">\n-          <requirement>HAS_MEDIACODEC</requirement>\n+          <requirement>\n+            <or>\n+              <condition>HAS_MEDIACODEC</condition>\n+              <condition>HAVE_AMCODEC</condition>\n+            </or>\n+          </requirement>\n           <level>2</level>\n-          <default>false</default>\n+          <default>true</default>\n           <updates>\n             <update type=\"change\" />\n           </updates>\ndiff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile\nindex 4e18ed08ef..91ea4db5ef 100644\n--- a/tools/depends/target/Makefile\n+++ b/tools/depends/target/Makefile\n@@ -79,10 +79,6 @@ ifeq ($(OS),android)\n   DEPENDS += dummy-libxbmc libuuid\n   PYMODULE_DEPS = dummy-libxbmc\n   LIBUUID = libuuid\n-\n-  ifeq ($(ENABLE_LIBDOVI),yes)\n-    DEPENDS += libdovi\n-  endif\n endif\n \n DEPENDS := $(filter-out $(EXCLUDED_DEPENDS),$(DEPENDS))\n@@ -126,6 +122,10 @@ ifeq ($(OS),linux)\n   endif\n endif\n \n+ifeq ($(ENABLE_LIBDOVI),yes)\n+  DEPENDS += libdovi\n+endif\n+\n .PHONY: $(DEPENDS)\n \n all: .installed-$(PLATFORM)\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\nindex 4ce0c3e48f..9d518f0051 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\n@@ -277,6 +277,24 @@ bool CDVDVideoCodecAmlogic::Open(CDVDStreamInfo &hints, CDVDCodecOptions &option\n       m_pFormatName = \"am-h265\";\n       m_bitstream = new CBitstreamConverter();\n       m_bitstream->Open(m_hints.codec, (uint8_t*)m_hints.extradata, m_hints.extrasize, true);\n+\n+      // check for hevc-hvcC and convert to h265-annex-b\n+      if (m_hints.extradata && !m_hints.cryptoSession)\n+      {\n+        if (m_bitstream && aml_support_dolby_vision())\n+        {\n+          bool convertDovi = CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n+              CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI);\n+          bool user_dv_disable = CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n+              CSettings::SETTING_COREELEC_AMLOGIC_DV_DISABLE);\n+          if (convertDovi && !user_dv_disable)\n+          {\n+            CLog::Log(LOGDEBUG, \"{}::{} - HEVC bitstream profile 7 will be converted to profile 8\", __MODULE_NAME__, __FUNCTION__);\n+            m_bitstream->SetConvertDovi(convertDovi && !user_dv_disable);\n+          }\n+        }\n+      }\n+\n       // make sure we do not leak the existing m_hints.extradata\n       free(m_hints.extradata);\n       m_hints.extrasize = m_bitstream->GetExtraSize();\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0010-AMLCodec-add-support-of-Dolby-Vision.patch",
    "content": "From 75e4138e9b05ba26a2573b930bda53a6e44ccc5e Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Wed, 29 Mar 2023 16:36:49 +0200\nSubject: [PATCH 10/21] AMLCodec: add support of Dolby Vision If 'dovi.ko' is\n available enable the DV option.\n\n---\n .../resources/strings.po                      | 10 +++++\n system/settings/settings.xml                  |  5 +++\n .../VideoPlayer/DVDCodecs/Video/AMLCodec.cpp  | 45 +++++++++++++++++++\n xbmc/settings/Settings.h                      |  1 +\n xbmc/utils/AMLUtils.cpp                       | 20 +++++++++\n xbmc/utils/AMLUtils.h                         |  1 +\n xbmc/windowing/amlogic/WinSystemAmlogic.cpp   | 17 +++++++\n 7 files changed, 99 insertions(+)\n\ndiff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po\nindex 2b2237e431..285d5d07b2 100644\n--- a/addons/resource.language.en_gb/resources/strings.po\n+++ b/addons/resource.language.en_gb/resources/strings.po\n@@ -8669,6 +8669,16 @@ msgctxt \"#14295\"\n msgid \"4:4:4\"\n msgstr \"\"\n \n+#: system/settings/settings.xml\n+msgctxt \"#14296\"\n+msgid \"Disable Dolby Vision support\"\n+msgstr \"\"\n+\n+#: system/settings/settings.xml\n+msgctxt \"#14297\"\n+msgid \"Use this option to disable Dolby Vision support if available.\"\n+msgstr \"\"\n+\n #empty strings from id 14296 to 14300\n \n #. pvr \"channels\" settings group label\ndiff --git a/system/settings/settings.xml b/system/settings/settings.xml\nindex 5268475ca7..1b95376834 100755\n--- a/system/settings/settings.xml\n+++ b/system/settings/settings.xml\n@@ -3681,6 +3681,11 @@\n             <dependency type=\"enable\" setting=\"coreelec.amlogic.sdr2hdr\" operator=\"is\">false</dependency>\n           </dependencies>\n         </setting>\n+        <setting id=\"coreelec.amlogic.disabledolbyvision\" type=\"boolean\" label=\"14296\" help=\"14297\">\n+          <requirement>HAVE_AMCODEC</requirement>\n+          <default>false</default>\n+          <control type=\"toggle\" />\n+        </setting>\n       </group>\n     </category>\n     <category id=\"cache\" label=\"439\" help=\"36399\">\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\nindex 7ae850d048..59777ee196 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n@@ -22,6 +22,7 @@\n #include \"settings/SettingsComponent.h\"\n #include \"utils/AMLUtils.h\"\n #include \"utils/log.h\"\n+#include \"utils/StreamDetails.h\"\n #include \"utils/StringUtils.h\"\n #include \"utils/TimeUtils.h\"\n #include \"ServiceBroker.h\"\n@@ -110,6 +111,7 @@ typedef struct {\n   void          *param;\n   dec_mode_t    dec_mode;\n   enum FRAME_BASE_VIDEO_PATH video_path;\n+  unsigned int  dv_enable;\n } aml_generic_param;\n \n class DllLibamCodecInterface\n@@ -218,6 +220,7 @@ public:\n     p_out->am_sysinfo.param   = p_in->param;\n     p_out->dec_mode           = p_in->dec_mode;\n     p_out->video_path         = p_in->video_path;\n+    p_out->dv_enable          = p_in->dv_enable;\n   }\n };\n \n@@ -1965,6 +1968,15 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n     hints.aspect, video_ratio.num, video_ratio.den);\n   CLog::Log(LOGDEBUG, \"CAMLCodec::OpenDecoder hints.orientation({:d}), hints.forced_aspect({:d}), hints.extrasize({:d})\",\n     hints.orientation, hints.forced_aspect, hints.extrasize);\n+\n+  std::string hdrType = CStreamDetails::HdrTypeToString(hints.hdrType);\n+  if (hdrType.size())\n+    CLog::Log(LOGDEBUG, \"CAMLCodec::OpenDecoder hdr type: {}\", hdrType);\n+\n+  if (hints.hdrType == StreamHdrType::HDR_TYPE_DOLBYVISION)\n+    CLog::Log(LOGDEBUG, \"CAMLCodec::OpenDecoder DOVI: version {:d}.{:d}, profile {:d}\",\n+      hints.dovi.dv_version_major, hints.dovi.dv_version_minor, hints.dovi.dv_profile);\n+\n   m_processInfo.SetVideoDAR(hints.aspect);\n   CLog::Log(LOGDEBUG, \"CAMLCodec::OpenDecoder decoder timeout: {:d}s\",\n     m_decoder_timeout);\n@@ -1984,6 +1996,33 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n   am_private->gcodec.dec_mode    = STREAM_TYPE_FRAME;\n   am_private->gcodec.video_path  = FRAME_BASE_PATH_AMLVIDEO_AMVIDEO;\n \n+  // enable Dolby Vision driver when 'dovi.ko' is available\n+  bool device_support_dv(aml_support_dolby_vision());\n+  bool user_dv_disable(CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_COREELEC_AMLOGIC_DV_DISABLE));\n+  bool dv_enable(device_support_dv && !user_dv_disable && hints.hdrType == StreamHdrType::HDR_TYPE_DOLBYVISION);\n+  CLog::Log(LOGDEBUG, \"CAMLCodec::OpenDecoder {}DV support, {}, DV system is {}\", device_support_dv ? \"\" : \"no \",\n+    user_dv_disable ? \"disabled\" : \"enabled\", dv_enable ? \"enabled\" : \"disabled\");\n+  if (dv_enable)\n+  {\n+    // enable Dolby Vision\n+    CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 1);\n+\n+    am_private->gcodec.dv_enable = 1;\n+    if (hints.dovi.dv_profile == 7 && !CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n+        CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI))\n+    {\n+      CSysfsPath amdolby_vision_debug{\"/sys/class/amdolby_vision/debug\"};\n+      if (amdolby_vision_debug.Exists())\n+        amdolby_vision_debug.Set(\"enable_fel 1\");\n+      am_private->gcodec.dec_mode  = STREAM_TYPE_STREAM;\n+    }\n+  }\n+  else if (device_support_dv)\n+  {\n+    // disable Dolby Vision\n+    CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 0);\n+  }\n+\n   // DEC_CONTROL_FLAG_DISABLE_FAST_POC\n   CSysfsPath(\"/sys/module/amvdec_h264/parameters/dec_control\", 4);\n \n@@ -2241,6 +2280,12 @@ void CAMLCodec::CloseDecoder()\n     free(am_private->vcodec.config);\n   // return tsync to default so external apps work\n   CSysfsPath(\"/sys/class/tsync/enable\", 1);\n+  // disable Dolby Vision driver\n+  //CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 0);\n+  // don't disable it as it would not switch back to non DV mode anymore\n+  CSysfsPath amdolby_vision_debug{\"/sys/class/amdolby_vision/debug\"};\n+  if (amdolby_vision_debug.Exists())\n+    amdolby_vision_debug.Set(\"enable_fel 0\");\n \n   ShowMainVideo(false);\n \ndiff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h\nindex 28e6c9d98d..8e5a31e1d7 100644\n--- a/xbmc/settings/Settings.h\n+++ b/xbmc/settings/Settings.h\n@@ -441,6 +441,7 @@ public:\n   static constexpr auto SETTING_COREELEC_AMLOGIC_LIMIT_CD = \"coreelec.amlogic.limitcd\";\n   static constexpr auto SETTING_COREELEC_AMLOGIC_FORCE_CS = \"coreelec.amlogic.forcecs\";\n   static constexpr auto SETTING_COREELEC_AMLOGIC_DISABLEGUISCALING = \"coreelec.amlogic.disableguiscaling\";\n+  static constexpr auto SETTING_COREELEC_AMLOGIC_DV_DISABLE = \"coreelec.amlogic.disabledolbyvision\";\n   static constexpr auto SETTING_CACHE_HARDDISK = \"cache.harddisk\";\n   static constexpr auto SETTING_CACHEVIDEO_DVDROM = \"cachevideo.dvdrom\";\n   static constexpr auto SETTING_CACHEVIDEO_LAN = \"cachevideo.lan\";\ndiff --git a/xbmc/utils/AMLUtils.cpp b/xbmc/utils/AMLUtils.cpp\nindex 81f74448a8..c9e60d5c5f 100644\n--- a/xbmc/utils/AMLUtils.cpp\n+++ b/xbmc/utils/AMLUtils.cpp\n@@ -148,6 +148,26 @@ bool aml_support_av1()\n   return (has_av1 == 1);\n }\n \n+bool aml_support_dolby_vision()\n+{\n+  static int support_dv = -1;\n+\n+  if (support_dv == -1)\n+  {\n+    CSysfsPath support_info{\"/sys/class/amdolby_vision/support_info\"};\n+    support_dv = 0;\n+    if (support_info.Exists())\n+    {\n+      support_dv = (int)((support_info.Get<int>().value() & 7) == 7);\n+      CSysfsPath ko_info{\"/sys/class/amdolby_vision/ko_info\"};\n+      if (ko_info.Exists())\n+        CLog::Log(LOGDEBUG, \"Amlogic Dolby Vision info: {}\", ko_info.Get<std::string>().value().c_str());\n+    }\n+  }\n+\n+  return (support_dv == 1);\n+}\n+\n bool aml_has_frac_rate_policy()\n {\n   static int has_frac_rate_policy = -1;\ndiff --git a/xbmc/utils/AMLUtils.h b/xbmc/utils/AMLUtils.h\nindex bfb06194bc..25e95d6961 100644\n--- a/xbmc/utils/AMLUtils.h\n+++ b/xbmc/utils/AMLUtils.h\n@@ -56,6 +56,7 @@ bool aml_support_hevc_10bit();\n AML_SUPPORT_H264_4K2K aml_support_h264_4k2k();\n bool aml_support_vp9();\n bool aml_support_av1();\n+bool aml_support_dolby_vision();\n bool aml_has_frac_rate_policy();\n void aml_set_audio_passthrough(bool passthrough);\n bool aml_mode_to_resolution(const char *mode, RESOLUTION_INFO *res);\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\nindex 0a52b95144..616c205e6f 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n@@ -90,6 +90,23 @@ bool CWinSystemAmlogic::InitWindowSystem()\n     CSysfsPath(\"/sys/module/am_vecm/parameters/hdr_mode\", 1);\n   }\n \n+  if (!aml_support_dolby_vision())\n+  {\n+    auto setting = settings->GetSetting(CSettings::SETTING_COREELEC_AMLOGIC_DV_DISABLE);\n+    if (setting)\n+    {\n+      setting->SetVisible(false);\n+      settings->SetBool(CSettings::SETTING_COREELEC_AMLOGIC_DV_DISABLE, false);\n+    }\n+\n+    setting = settings->GetSetting(CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI);\n+    if (setting)\n+    {\n+      setting->SetVisible(false);\n+      settings->SetBool(CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI, true);\n+    }\n+  }\n+\n   m_nativeDisplay = EGL_DEFAULT_DISPLAY;\n \n   CDVDVideoCodecAmlogic::Register();\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0011-libdovi-add-option-to-change-used-mode.patch",
    "content": "From 0fb60a17b2401ab655f5b2674e902545b144795a Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 11 Apr 2023 15:06:33 +0200\nSubject: [PATCH 11/21] libdovi: add option to change used mode Modes:  0:\n Don't modify the RPU  1: Converts the RPU to be MEL compatible  2: Converts\n the RPU to be profile 8.1 compatible.     Both luma and chroma mapping curves\n are set to no-op.     This mode handles source profiles 5, 7 and 8.  3:\n Converts to static profile 8.4  4: Converts to profile 8.1 preserving luma\n and chroma mapping.     Old mode 2 behaviour. Reference:\n https://github.com/quietvoid/dovi_tool/blob/main/dolby_vision/src/rpu/dovi_rpu.rs\n\n---\n .../resources/strings.po                      | 32 ++++++++++++++++++-\n system/settings/settings.xml                  | 16 ++++++++--\n .../VideoPlayer/DVDCodecs/Video/AMLCodec.cpp  |  4 +--\n .../DVDCodecs/Video/DVDVideoCodecAmlogic.cpp  |  7 ++--\n .../Video/DVDVideoCodecAndroidMediaCodec.cpp  |  2 +-\n xbmc/utils/BitstreamConverter.cpp             |  8 ++---\n xbmc/utils/BitstreamConverter.h               |  4 +--\n xbmc/windowing/amlogic/WinSystemAmlogic.cpp   |  2 +-\n 8 files changed, 58 insertions(+), 17 deletions(-)\n\ndiff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po\nindex 285d5d07b2..3b05260f01 100644\n--- a/addons/resource.language.en_gb/resources/strings.po\n+++ b/addons/resource.language.en_gb/resources/strings.po\n@@ -23633,5 +23633,35 @@ msgstr \"\"\n #. Help text for setting \"Convert Dolby Vision for compatibility\" of label #39300\n #: system/settings/settings.xml\n msgctxt \"#39301\"\n-msgid \"Converts Dolby Vision profile 7 to profile 8.1, ignores enhancement layer\"\n+msgid \"Converts Dolby Vision profile 7 by chosen mode\"\n+msgstr \"\"\n+\n+#. Enum value for \"Convert Dolby Vision for compatibility\" of label #39300\n+#: system/settings/settings.xml\n+msgctxt \"#39302\"\n+msgid \"Lossless\"\n+msgstr \"\"\n+\n+#. Enum value for \"Convert Dolby Vision for compatibility\" of label #39300\n+#: system/settings/settings.xml\n+msgctxt \"#39303\"\n+msgid \"Minimal EL\"\n+msgstr \"\"\n+\n+#. Enum value for \"Convert Dolby Vision for compatibility\" of label #39300\n+#: system/settings/settings.xml\n+msgctxt \"#39304\"\n+msgid \"Profile 8.1\"\n+msgstr \"\"\n+\n+#. Enum value for \"Convert Dolby Vision for compatibility\" of label #39300\n+#: system/settings/settings.xml\n+msgctxt \"#39305\"\n+msgid \"Profile 8.4\"\n+msgstr \"\"\n+\n+#. Enum value for \"Convert Dolby Vision for compatibility\" of label #39300\n+#: system/settings/settings.xml\n+msgctxt \"#39306\"\n+msgid \"Profile 8.1 MP\"\n msgstr \"\"\ndiff --git a/system/settings/settings.xml b/system/settings/settings.xml\nindex 1b95376834..7ede7a22bb 100755\n--- a/system/settings/settings.xml\n+++ b/system/settings/settings.xml\n@@ -228,7 +228,7 @@\n           <default>true</default>\n           <control type=\"toggle\" />\n         </setting>\n-        <setting id=\"videoplayer.convertdovi\" type=\"boolean\" label=\"39300\" help=\"39301\">\n+        <setting id=\"videoplayer.convertdovi\" type=\"integer\" label=\"39300\" help=\"39301\">\n           <requirement>\n             <or>\n               <condition>HAS_MEDIACODEC</condition>\n@@ -236,11 +236,21 @@\n             </or>\n           </requirement>\n           <level>2</level>\n-          <default>true</default>\n+          <default>2</default>\n           <updates>\n             <update type=\"change\" />\n           </updates>\n-          <control type=\"toggle\" />\n+          <constraints>\n+            <options>\n+              <option label=\"39302\">0</option>  <!-- Lossless -->\n+              <option label=\"39303\">1</option>  <!-- ToMel -->\n+              <option label=\"39304\">2</option>  <!-- To81 -->\n+              <option label=\"39305\">3</option>  <!-- To84 -->\n+              <option label=\"39306\">4</option>  <!-- To81MappingPreserved -->\n+            </options>\n+          </constraints>\n+          <control type=\"spinner\" format=\"string\" />\n+          <control type=\"edit\" format=\"integer\" />\n         </setting>\n       </group>\n       <group id=\"4\" label=\"14232\">\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\nindex 59777ee196..8a7344d805 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n@@ -2008,8 +2008,8 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n     CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 1);\n \n     am_private->gcodec.dv_enable = 1;\n-    if (hints.dovi.dv_profile == 7 && !CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n-        CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI))\n+    if (hints.dovi.dv_profile == 7 && CServiceBroker::GetSettingsComponent()->GetSettings()->GetInt(\n+        CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI) == 0)\n     {\n       CSysfsPath amdolby_vision_debug{\"/sys/class/amdolby_vision/debug\"};\n       if (amdolby_vision_debug.Exists())\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\nindex 9d518f0051..12f81442d7 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\n@@ -283,14 +283,15 @@ bool CDVDVideoCodecAmlogic::Open(CDVDStreamInfo &hints, CDVDCodecOptions &option\n       {\n         if (m_bitstream && aml_support_dolby_vision())\n         {\n-          bool convertDovi = CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n+          int convertDovi = CServiceBroker::GetSettingsComponent()->GetSettings()->GetInt(\n               CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI);\n           bool user_dv_disable = CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n               CSettings::SETTING_COREELEC_AMLOGIC_DV_DISABLE);\n           if (convertDovi && !user_dv_disable)\n           {\n-            CLog::Log(LOGDEBUG, \"{}::{} - HEVC bitstream profile 7 will be converted to profile 8\", __MODULE_NAME__, __FUNCTION__);\n-            m_bitstream->SetConvertDovi(convertDovi && !user_dv_disable);\n+            CLog::Log(LOGDEBUG, \"{}::{} - HEVC bitstream profile 7 will be converted by chosen mode {:d}\",\n+              __MODULE_NAME__, __FUNCTION__, convertDovi);\n+            m_bitstream->SetConvertDovi(convertDovi);\n           }\n         }\n       }\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\nindex 2135e7d6f8..bba297770e 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp\n@@ -546,7 +546,7 @@ bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptio\n \n         if (m_bitstream)\n         {\n-          bool convertDovi = CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(\n+          int convertDovi = CServiceBroker::GetSettingsComponent()->GetSettings()->GetInt(\n               CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI);\n           m_bitstream->SetConvertDovi(convertDovi);\n         }\ndiff --git a/xbmc/utils/BitstreamConverter.cpp b/xbmc/utils/BitstreamConverter.cpp\nindex c51ac92138..53cab7c680 100644\n--- a/xbmc/utils/BitstreamConverter.cpp\n+++ b/xbmc/utils/BitstreamConverter.cpp\n@@ -279,7 +279,7 @@ static bool has_sei_recovery_point(const uint8_t *p, const uint8_t *end)\n #ifdef HAVE_LIBDOVI\n // The returned data must be freed with `dovi_data_free`\n // May be NULL if no conversion was done\n-static const DoviData* convert_dovi_rpu_nal(uint8_t* buf, uint32_t nal_size)\n+static const DoviData* convert_dovi_rpu_nal(uint8_t* buf, uint32_t nal_size, int mode)\n {\n   DoviRpuOpaque* rpu = dovi_parse_unspec62_nalu(buf, nal_size);\n   const DoviRpuDataHeader* header = dovi_rpu_get_header(rpu);\n@@ -287,7 +287,7 @@ static const DoviData* convert_dovi_rpu_nal(uint8_t* buf, uint32_t nal_size)\n \n   if (header && header->guessed_profile == 7)\n   {\n-    int ret = dovi_convert_rpu_with_mode(rpu, 2);\n+    int ret = dovi_convert_rpu_with_mode(rpu, mode);\n     if (ret < 0)\n       goto done;\n \n@@ -369,7 +369,7 @@ CBitstreamConverter::CBitstreamConverter()\n   m_convert_bytestream = false;\n   m_sps_pps_context.sps_pps_data = NULL;\n   m_start_decode = true;\n-  m_convert_dovi = false;\n+  m_convert_dovi = 0;\n }\n \n CBitstreamConverter::~CBitstreamConverter()\n@@ -1001,7 +1001,7 @@ bool CBitstreamConverter::BitstreamConvert(uint8_t* pData, int iSize, uint8_t **\n         {\n #ifdef HAVE_LIBDOVI\n           // Convert the RPU itself\n-          rpu_data = convert_dovi_rpu_nal(buf, nal_size);\n+          rpu_data = convert_dovi_rpu_nal(buf, nal_size, m_convert_dovi);\n           if (rpu_data)\n           {\n             buf_to_write = rpu_data->data;\ndiff --git a/xbmc/utils/BitstreamConverter.h b/xbmc/utils/BitstreamConverter.h\nindex 4381599b21..bbfa3ed361 100644\n--- a/xbmc/utils/BitstreamConverter.h\n+++ b/xbmc/utils/BitstreamConverter.h\n@@ -104,7 +104,7 @@ public:\n   int               GetExtraSize() const;\n   void              ResetStartDecode(void);\n   bool              CanStartDecode() const;\n-  void SetConvertDovi(bool value) { m_convert_dovi = value; }\n+  void SetConvertDovi(int value) { m_convert_dovi = value; }\n \n   static bool       mpeg2_sequence_header(const uint8_t *data, const uint32_t size, mpeg2_sequence *sequence);\n   static bool       h264_sequence_header(const uint8_t *data, const uint32_t size, h264_sequence *sequence);\n@@ -151,5 +151,5 @@ protected:\n   bool              m_convert_bytestream;\n   AVCodecID         m_codec;\n   bool              m_start_decode;\n-  bool m_convert_dovi;\n+  int               m_convert_dovi;\n };\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\nindex 616c205e6f..6f57b7efcb 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n@@ -103,7 +103,7 @@ bool CWinSystemAmlogic::InitWindowSystem()\n     if (setting)\n     {\n       setting->SetVisible(false);\n-      settings->SetBool(CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI, true);\n+      settings->SetInt(CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI, 2);\n     }\n   }\n \n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0012-AMLCodec-add-user-setting-player-led.patch",
    "content": "From d1dc56abe3fff3da1a075e6023aa86265339ef37 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 14 Apr 2023 11:19:44 +0200\nSubject: [PATCH 12/21] AMLCodec: add user setting player led Added the option\n when display led and player led mode is supported by the display.\n\n---\n .../resource.language.en_gb/resources/strings.po | 12 +++++++++++-\n system/settings/settings.xml                     |  6 ++++++\n .../VideoPlayer/DVDCodecs/Video/AMLCodec.cpp     | 12 ++++++++++++\n xbmc/settings/Settings.h                         |  1 +\n xbmc/utils/AMLUtils.cpp                          | 16 ++++++++++++++++\n xbmc/utils/AMLUtils.h                            |  1 +\n xbmc/windowing/amlogic/WinSystemAmlogic.cpp      | 14 ++++++++++++++\n 7 files changed, 61 insertions(+), 1 deletion(-)\n\ndiff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po\nindex 3b05260f01..4c52795d32 100644\n--- a/addons/resource.language.en_gb/resources/strings.po\n+++ b/addons/resource.language.en_gb/resources/strings.po\n@@ -8679,7 +8679,17 @@ msgctxt \"#14297\"\n msgid \"Use this option to disable Dolby Vision support if available.\"\n msgstr \"\"\n \n-#empty strings from id 14296 to 14300\n+#: system/settings/settings.xml\n+msgctxt \"#14298\"\n+msgid \"Use Player Led\"\n+msgstr \"\"\n+\n+#: system/settings/settings.xml\n+msgctxt \"#14299\"\n+msgid \"Use Player Led mode (YCbCr 4:2:2) instead Display Led (RGB tunneling) for Dolby Vision.\"\n+msgstr \"\"\n+\n+#empty strings from id 14300 to 14300\n \n #. pvr \"channels\" settings group label\n #: system/settings/settings.xml\ndiff --git a/system/settings/settings.xml b/system/settings/settings.xml\nindex 7ede7a22bb..d656de67d1 100755\n--- a/system/settings/settings.xml\n+++ b/system/settings/settings.xml\n@@ -3696,6 +3696,12 @@\n           <default>false</default>\n           <control type=\"toggle\" />\n         </setting>\n+        <setting id=\"coreelec.amlogic.useplayerled\" type=\"boolean\" label=\"14298\" help=\"14299\">\n+          <requirement>HAVE_AMCODEC</requirement>\n+          <visible>false</visible>\n+          <default>false</default>\n+          <control type=\"toggle\" />\n+        </setting>\n       </group>\n     </category>\n     <category id=\"cache\" label=\"439\" help=\"36399\">\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\nindex 8a7344d805..1609177451 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n@@ -291,6 +291,8 @@ typedef struct hdr_buf {\n     int size;\n } hdr_buf_t;\n \n+#define FLAG_FORCE_DV_LL        (unsigned int)(0x4000)\n+\n typedef struct am_packet {\n     AVPacket      avpkt;\n     uint64_t      avpts;\n@@ -2007,6 +2009,16 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n     // enable Dolby Vision\n     CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 1);\n \n+    // force player led mode when enabled\n+    CSysfsPath dolby_vision_flags{\"/sys/module/amdolby_vision/parameters/dolby_vision_flags\"};\n+    if (dolby_vision_flags.Exists())\n+    {\n+      if (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_COREELEC_AMLOGIC_USE_PLAYERLED))\n+        dolby_vision_flags.Set(dolby_vision_flags.Get<unsigned int>().value() | FLAG_FORCE_DV_LL);\n+      else\n+        dolby_vision_flags.Set(dolby_vision_flags.Get<unsigned int>().value() & ~(FLAG_FORCE_DV_LL));\n+    }\n+\n     am_private->gcodec.dv_enable = 1;\n     if (hints.dovi.dv_profile == 7 && CServiceBroker::GetSettingsComponent()->GetSettings()->GetInt(\n         CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI) == 0)\ndiff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h\nindex 8e5a31e1d7..f999b284e9 100644\n--- a/xbmc/settings/Settings.h\n+++ b/xbmc/settings/Settings.h\n@@ -442,6 +442,7 @@ public:\n   static constexpr auto SETTING_COREELEC_AMLOGIC_FORCE_CS = \"coreelec.amlogic.forcecs\";\n   static constexpr auto SETTING_COREELEC_AMLOGIC_DISABLEGUISCALING = \"coreelec.amlogic.disableguiscaling\";\n   static constexpr auto SETTING_COREELEC_AMLOGIC_DV_DISABLE = \"coreelec.amlogic.disabledolbyvision\";\n+  static constexpr auto SETTING_COREELEC_AMLOGIC_USE_PLAYERLED = \"coreelec.amlogic.useplayerled\";\n   static constexpr auto SETTING_CACHE_HARDDISK = \"cache.harddisk\";\n   static constexpr auto SETTING_CACHEVIDEO_DVDROM = \"cachevideo.dvdrom\";\n   static constexpr auto SETTING_CACHEVIDEO_LAN = \"cachevideo.lan\";\ndiff --git a/xbmc/utils/AMLUtils.cpp b/xbmc/utils/AMLUtils.cpp\nindex c9e60d5c5f..fd35427e93 100644\n--- a/xbmc/utils/AMLUtils.cpp\n+++ b/xbmc/utils/AMLUtils.cpp\n@@ -56,6 +56,22 @@ int aml_get_cpufamily_id()\n   return aml_cpufamily_id;\n }\n \n+bool aml_dv_support_ll()\n+{\n+  int support_ll = 0;\n+  CRegExp regexp;\n+  regexp.RegComp(\"YCbCr_422_12BIT\");\n+  std::string valstr;\n+  CSysfsPath dv_cap{\"/sys/devices/virtual/amhdmitx/amhdmitx0/dv_cap\"};\n+  if (dv_cap.Exists())\n+  {\n+    valstr = dv_cap.Get<std::string>().value();\n+    support_ll = (regexp.RegFind(valstr) >= 0) ? 1 : 0;\n+  }\n+\n+  return support_ll;\n+}\n+\n static bool aml_support_vcodec_profile(const char *regex)\n {\n   int profile = 0;\ndiff --git a/xbmc/utils/AMLUtils.h b/xbmc/utils/AMLUtils.h\nindex 25e95d6961..16f32b2d0a 100644\n--- a/xbmc/utils/AMLUtils.h\n+++ b/xbmc/utils/AMLUtils.h\n@@ -49,6 +49,7 @@ enum AML_SUPPORT_H264_4K2K\n #define AML_SM1     0x2B\n \n int  aml_get_cpufamily_id();\n+bool aml_dv_support_ll();\n bool aml_support_hevc();\n bool aml_support_hevc_4k2k();\n bool aml_support_hevc_8k4k();\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\nindex 6f57b7efcb..4c5424d136 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n@@ -99,6 +99,13 @@ bool CWinSystemAmlogic::InitWindowSystem()\n       settings->SetBool(CSettings::SETTING_COREELEC_AMLOGIC_DV_DISABLE, false);\n     }\n \n+    setting = settings->GetSetting(CSettings::SETTING_COREELEC_AMLOGIC_USE_PLAYERLED);\n+    if (setting)\n+    {\n+      setting->SetVisible(false);\n+      settings->SetBool(CSettings::SETTING_COREELEC_AMLOGIC_USE_PLAYERLED, false);\n+    }\n+\n     setting = settings->GetSetting(CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI);\n     if (setting)\n     {\n@@ -106,6 +113,13 @@ bool CWinSystemAmlogic::InitWindowSystem()\n       settings->SetInt(CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI, 2);\n     }\n   }\n+  else if (aml_dv_support_ll())\n+  {\n+    CLog::Log(LOGDEBUG, \"CWinSystemAmlogic::InitWindowSystem -- display do support Dolby Vision Low Latency\");\n+    auto setting = settings->GetSetting(CSettings::SETTING_COREELEC_AMLOGIC_USE_PLAYERLED);\n+    if (setting)\n+      setting->SetVisible(true);\n+  }\n \n   m_nativeDisplay = EGL_DEFAULT_DISPLAY;\n \n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0013-Always-force-a-mode-switch-on-resolution-change-on-A.patch",
    "content": "From 077b90bdb547610c24d29da2215325bbae5f1181 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 20 Apr 2023 20:25:25 +0200\nSubject: [PATCH 13/21] Always force a mode switch on resolution change on\n Amlogic platform If the mode switch is really required is checked afterwards\n in WinSystemAmlogic system.\n\n---\n xbmc/windowing/GraphicContext.cpp | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/xbmc/windowing/GraphicContext.cpp b/xbmc/windowing/GraphicContext.cpp\nindex 2688fb999e..d9538ebf46 100644\n--- a/xbmc/windowing/GraphicContext.cpp\n+++ b/xbmc/windowing/GraphicContext.cpp\n@@ -398,6 +398,9 @@ void CGraphicContext::SetVideoResolution(RESOLUTION res, bool forceUpdate)\n void CGraphicContext::SetVideoResolutionInternal(RESOLUTION res, bool forceUpdate)\n {\n   RESOLUTION lastRes = m_Resolution;\n+#if defined(HAS_LIBAMCODEC)\n+  forceUpdate = true;\n+#endif\n \n   // If the user asked us to guess, go with desktop\n   if (!IsValidResolution(res))\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0014-AMLCodec-on-Dolby-Vision-playback-stop-wait-until-vi.patch",
    "content": "From c405fada82ff51a770e18ef5b84b3ac695051d73 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 21 Apr 2023 10:39:45 +0200\nSubject: [PATCH 14/21] AMLCodec: on Dolby Vision playback stop wait until\n video is off The driver need first to clean up on video off.\n\n---\n .../VideoPlayer/DVDCodecs/Video/AMLCodec.cpp  | 19 +++++++++++++++----\n 1 file changed, 15 insertions(+), 4 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\nindex 1609177451..dad0690ef2 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n@@ -2007,7 +2007,7 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n   if (dv_enable)\n   {\n     // enable Dolby Vision\n-    CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 1);\n+    CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 'Y');\n \n     // force player led mode when enabled\n     CSysfsPath dolby_vision_flags{\"/sys/module/amdolby_vision/parameters/dolby_vision_flags\"};\n@@ -2032,7 +2032,7 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n   else if (device_support_dv)\n   {\n     // disable Dolby Vision\n-    CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 0);\n+    CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 'N');\n   }\n \n   // DEC_CONTROL_FLAG_DISABLE_FAST_POC\n@@ -2293,8 +2293,19 @@ void CAMLCodec::CloseDecoder()\n   // return tsync to default so external apps work\n   CSysfsPath(\"/sys/class/tsync/enable\", 1);\n   // disable Dolby Vision driver\n-  //CSysfsPath(\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\", 0);\n-  // don't disable it as it would not switch back to non DV mode anymore\n+  CSysfsPath dolby_vision_enable{\"/sys/module/amdolby_vision/parameters/dolby_vision_enable\"};\n+  if (dolby_vision_enable.Exists() && StringUtils::EqualsNoCase(dolby_vision_enable.Get<std::string>().value(), \"Y\"))\n+  {\n+    CSysfsPath dv_video_on{\"/sys/class/amdolby_vision/dv_video_on\"};\n+    if (dv_video_on.Exists())\n+    {\n+      std::chrono::time_point<std::chrono::system_clock> now(std::chrono::system_clock::now());\n+      while(dv_video_on.Get<int>().value() == 1 && (std::chrono::system_clock::now() - now) < std::chrono::seconds(m_decoder_timeout))\n+        usleep(10000); // wait 10ms\n+    }\n+    dolby_vision_enable.Set('N');\n+  }\n+\n   CSysfsPath amdolby_vision_debug{\"/sys/class/amdolby_vision/debug\"};\n   if (amdolby_vision_debug.Exists())\n     amdolby_vision_debug.Set(\"enable_fel 0\");\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0015-WinSystemAmlogic-rework-mode-switch-mechanism.patch",
    "content": "From 36a8072f7e006c4e34100e589a05b3e79f3c06af Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 20 Apr 2023 20:22:41 +0200\nSubject: [PATCH 15/21] WinSystemAmlogic: rework mode switch mechanism Because\n of Dolby Vision it is possible resolution and frequency do not change. But if\n colour subsampling or colour depth is changed a forced mode switch is\n required. Force mode switch by set mode 'null' In special cases a hard mode\n reset is needed like 4k420 to 4kDV.\n\n---\n xbmc/utils/AMLUtils.cpp                       | 10 +-\n xbmc/utils/AMLUtils.h                         |  4 +-\n xbmc/windowing/amlogic/WinSystemAmlogic.cpp   | 46 +++------\n xbmc/windowing/amlogic/WinSystemAmlogic.h     |  6 +-\n .../amlogic/WinSystemAmlogicGLESContext.cpp   | 99 ++++++++++++++++++-\n .../amlogic/WinSystemAmlogicGLESContext.h     |  5 +-\n 6 files changed, 124 insertions(+), 46 deletions(-)\n\ndiff --git a/xbmc/utils/AMLUtils.cpp b/xbmc/utils/AMLUtils.cpp\nindex fd35427e93..33e449408d 100644\n--- a/xbmc/utils/AMLUtils.cpp\n+++ b/xbmc/utils/AMLUtils.cpp\n@@ -412,12 +412,13 @@ bool aml_get_native_resolution(RESOLUTION_INFO *res)\n   return result;\n }\n \n-bool aml_set_native_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name, const int stereo_mode)\n+bool aml_set_native_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name,\n+  const int stereo_mode, bool force_mode_switch)\n {\n   bool result = false;\n \n   aml_handle_display_stereo_mode(RENDER_STEREO_MODE_OFF);\n-  result = aml_set_display_resolution(res, framebuffer_name);\n+  result = aml_set_display_resolution(res, framebuffer_name, force_mode_switch);\n \n   aml_handle_scale(res);\n   aml_handle_display_stereo_mode(stereo_mode);\n@@ -498,7 +499,8 @@ bool aml_probe_resolutions(std::vector<RESOLUTION_INFO> &resolutions)\n   return resolutions.size() > 0;\n }\n \n-bool aml_set_display_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name)\n+bool aml_set_display_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name,\n+  bool force_mode_switch)\n {\n   std::string mode = res.strId.c_str();\n   std::string cur_mode;\n@@ -525,7 +527,7 @@ bool aml_set_display_resolution(const RESOLUTION_INFO &res, std::string framebuf\n     if (amhdmitx0_frac_rate_policy.Exists())\n       cur_fractional_rate = amhdmitx0_frac_rate_policy.Get<int>().value();\n \n-    if (cur_fractional_rate != fractional_rate)\n+    if ((cur_fractional_rate != fractional_rate) || force_mode_switch)\n     {\n       cur_mode = \"null\";\n       if (display_mode.Exists())\ndiff --git a/xbmc/utils/AMLUtils.h b/xbmc/utils/AMLUtils.h\nindex 16f32b2d0a..a944814642 100644\n--- a/xbmc/utils/AMLUtils.h\n+++ b/xbmc/utils/AMLUtils.h\n@@ -62,9 +62,9 @@ bool aml_has_frac_rate_policy();\n void aml_set_audio_passthrough(bool passthrough);\n bool aml_mode_to_resolution(const char *mode, RESOLUTION_INFO *res);\n bool aml_get_native_resolution(RESOLUTION_INFO *res);\n-bool aml_set_native_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name, const int stereo_mode);\n+bool aml_set_native_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name, const int stereo_mode, bool force_mode_switch);\n bool aml_probe_resolutions(std::vector<RESOLUTION_INFO> &resolutions);\n-bool aml_set_display_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name);\n+bool aml_set_display_resolution(const RESOLUTION_INFO &res, std::string framebuffer_name, bool force_mode_switch);\n void aml_handle_scale(const RESOLUTION_INFO &res);\n void aml_handle_display_stereo_mode(const int stereo_mode);\n void aml_enable_freeScale(const RESOLUTION_INFO &res);\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\nindex 4c5424d136..07447b5a55 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp\n@@ -41,6 +41,7 @@ using namespace KODI;\n CWinSystemAmlogic::CWinSystemAmlogic()\n :  m_nativeWindow(NULL)\n ,  m_libinput(new CLibInputHandler)\n+,  m_force_mode_switch(false)\n {\n   const char *env_framebuffer = getenv(\"FRAMEBUFFER\");\n \n@@ -55,9 +56,6 @@ CWinSystemAmlogic::CWinSystemAmlogic()\n \n   m_nativeDisplay = EGL_NO_DISPLAY;\n \n-  m_displayWidth = 0;\n-  m_displayHeight = 0;\n-\n   m_stereo_mode = RENDER_STEREO_MODE_OFF;\n   m_delayDispReset = false;\n \n@@ -159,32 +157,15 @@ bool CWinSystemAmlogic::CreateNewWindow(const std::string& name,\n                                     bool fullScreen,\n                                     RESOLUTION_INFO& res)\n {\n-  RESOLUTION_INFO current_resolution;\n-  current_resolution.iWidth = current_resolution.iHeight = 0;\n-  RENDER_STEREO_MODE stereo_mode = CServiceBroker::GetWinSystem()->GetGfxContext().GetStereoMode();\n-\n   m_nWidth        = res.iWidth;\n   m_nHeight       = res.iHeight;\n-  m_displayWidth  = res.iScreenWidth;\n-  m_displayHeight = res.iScreenHeight;\n   m_fRefreshRate  = res.fRefreshRate;\n \n   if (m_nativeWindow == NULL)\n     m_nativeWindow = new fbdev_window;\n \n-  m_nativeWindow->width = m_nWidth;\n-  m_nativeWindow->height = m_nHeight;\n-\n-  if ((m_bWindowCreated && aml_get_native_resolution(&current_resolution)) &&\n-    current_resolution.iWidth == res.iWidth && current_resolution.iHeight == res.iHeight &&\n-    current_resolution.iScreenWidth == res.iScreenWidth && current_resolution.iScreenHeight == res.iScreenHeight &&\n-    m_bFullScreen == fullScreen && current_resolution.fRefreshRate == res.fRefreshRate &&\n-    (current_resolution.dwFlags & D3DPRESENTFLAG_MODEMASK) == (res.dwFlags & D3DPRESENTFLAG_MODEMASK) &&\n-    m_stereo_mode == stereo_mode)\n-  {\n-    CLog::Log(LOGDEBUG, \"CWinSystemEGL::CreateNewWindow: No need to create a new window\");\n-    return true;\n-  }\n+  m_nativeWindow->width = res.iWidth;\n+  m_nativeWindow->height = res.iHeight;\n \n   int delay = CServiceBroker::GetSettingsComponent()->GetSettings()->GetInt(\"videoscreen.delayrefreshchange\");\n   if (delay > 0)\n@@ -201,10 +182,9 @@ bool CWinSystemAmlogic::CreateNewWindow(const std::string& name,\n     }\n   }\n \n-  m_stereo_mode = stereo_mode;\n-  m_bFullScreen = fullScreen;\n-\n-  aml_set_native_resolution(res, m_framebuffer_name, stereo_mode);\n+  aml_set_native_resolution(res, m_framebuffer_name, m_stereo_mode, m_force_mode_switch);\n+  // reset force mode switch\n+  m_force_mode_switch = false;\n \n   if (!m_delayDispReset)\n   {\n@@ -216,6 +196,7 @@ bool CWinSystemAmlogic::CreateNewWindow(const std::string& name,\n     }\n   }\n \n+  m_bWindowCreated = true;\n   return true;\n }\n \n@@ -227,6 +208,7 @@ bool CWinSystemAmlogic::DestroyWindow()\n     m_nativeWindow = NULL;\n   }\n \n+  m_bWindowCreated = false;\n   return true;\n }\n \n@@ -310,28 +292,28 @@ bool CWinSystemAmlogic::IsHDRDisplay()\n   {\n     valstr = hdr_cap.Get<std::string>().value();\n     if (valstr.find(\"Traditional HDR: 1\") != std::string::npos)\n-      hdr_caps.SetHDR10();\n+      m_hdr_caps.SetHDR10();\n \n     if (valstr.find(\"HDR10Plus Supported: 1\") != std::string::npos)\n-      hdr_caps.SetHDR10Plus();\n+      m_hdr_caps.SetHDR10Plus();\n \n     if (valstr.find(\"Hybrid Log-Gamma: 1\") != std::string::npos)\n-      hdr_caps.SetHLG();\n+      m_hdr_caps.SetHLG();\n   }\n \n   if (dv_cap.Exists())\n   {\n     valstr = dv_cap.Get<std::string>().value();\n     if (valstr.find(\"DolbyVision RX support list\") != std::string::npos)\n-      hdr_caps.SetDolbyVision();\n+      m_hdr_caps.SetDolbyVision();\n   }\n \n-  return (hdr_caps.SupportsHDR10() | hdr_caps.SupportsHDR10Plus() | hdr_caps.SupportsHLG());\n+  return (m_hdr_caps.SupportsHDR10() | m_hdr_caps.SupportsHDR10Plus() | m_hdr_caps.SupportsHLG());\n }\n \n CHDRCapabilities CWinSystemAmlogic::GetDisplayHDRCapabilities() const\n {\n-  return hdr_caps;\n+  return m_hdr_caps;\n }\n \n bool CWinSystemAmlogic::Hide()\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.h b/xbmc/windowing/amlogic/WinSystemAmlogic.h\nindex 2c70086caa..6bc5ae5046 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogic.h\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.h\n@@ -44,9 +44,6 @@ protected:\n   EGLDisplay m_nativeDisplay;\n   fbdev_window *m_nativeWindow;\n \n-  int m_displayWidth;\n-  int m_displayHeight;\n-\n   RENDER_STEREO_MODE m_stereo_mode;\n \n   bool m_delayDispReset;\n@@ -55,5 +52,6 @@ protected:\n   CCriticalSection m_resourceSection;\n   std::vector<IDispResource*> m_resources;\n   std::unique_ptr<CLibInputHandler> m_libinput;\n-  CHDRCapabilities hdr_caps;\n+  CHDRCapabilities m_hdr_caps;\n+  bool m_force_mode_switch;\n };\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\nindex 39fbaf03a1..f9d94dc34f 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n@@ -8,13 +8,22 @@\n \n #include \"VideoSyncAML.h\"\n #include \"WinSystemAmlogicGLESContext.h\"\n+#include \"platform/linux/SysfsPath.h\"\n+#include \"utils/AMLUtils.h\"\n #include \"utils/log.h\"\n #include \"threads/SingleLock.h\"\n+#include \"windowing/GraphicContext.h\"\n #include \"windowing/WindowSystemFactory.h\"\n \n using namespace KODI;\n using namespace KODI::WINDOWING::AML;\n \n+CWinSystemAmlogicGLESContext::CWinSystemAmlogicGLESContext()\n+:  m_cs(-1)\n+,  m_cd(-1)\n+{\n+}\n+\n void CWinSystemAmlogicGLESContext::Register()\n {\n   KODI::WINDOWING::CWindowSystemFactory::RegisterWindowSystem(CreateWinSystem, \"aml\");\n@@ -69,7 +78,84 @@ bool CWinSystemAmlogicGLESContext::CreateNewWindow(const std::string& name,\n                                                bool fullScreen,\n                                                RESOLUTION_INFO& res)\n {\n-  m_pGLContext.DestroySurface();\n+  RESOLUTION_INFO current_resolution;\n+  current_resolution.iWidth = current_resolution.iHeight = 0;\n+  RENDER_STEREO_MODE stereo_mode = CServiceBroker::GetWinSystem()->GetGfxContext().GetStereoMode();\n+\n+  // check for frac_rate_policy change\n+  int fractional_rate = (res.fRefreshRate == floor(res.fRefreshRate)) ? 0 : 1;\n+  int cur_fractional_rate = fractional_rate;\n+  if (aml_has_frac_rate_policy())\n+  {\n+    CSysfsPath amhdmitx0_frac_rate_policy{\"/sys/class/amhdmitx/amhdmitx0/frac_rate_policy\"};\n+    cur_fractional_rate = amhdmitx0_frac_rate_policy.Get<int>().value();\n+\n+    if (cur_fractional_rate != fractional_rate)\n+      amhdmitx0_frac_rate_policy.Set(fractional_rate);\n+  }\n+\n+  // check for colour subsampling/depth change\n+  CSysfsPath amhdmitx0_cs{\"/sys/class/amhdmitx/amhdmitx0/cs\"};\n+  CSysfsPath amhdmitx0_cd{\"/sys/class/amhdmitx/amhdmitx0/cd\"};\n+  int cs = 0;\n+  int cd = 0;\n+  if (amhdmitx0_cs.Exists() && amhdmitx0_cd.Exists())\n+  {\n+    cs = amhdmitx0_cs.Get<int>().value();\n+    cd = amhdmitx0_cd.Get<int>().value();\n+  }\n+\n+  // get current used resolution\n+  if (!aml_get_native_resolution(&current_resolution))\n+  {\n+    CLog::Log(LOGERROR, \"CWinSystemAmlogicGLESContext::{}: failed to receive current resolution\", __FUNCTION__);\n+    return false;\n+  }\n+\n+  CLog::Log(LOGDEBUG, \"CWinSystemAmlogicGLESContext::{}: \"\n+    \"m_bWindowCreated: {}, \"\n+    \"frac rate {:d}({:d}), \"\n+    \"cs: {:d}({:d}), cd: {:d}({:d})\",\n+    __FUNCTION__,\n+    m_bWindowCreated,\n+    fractional_rate, cur_fractional_rate,\n+    cs, m_cs, cd, m_cd);\n+  CLog::Log(LOGDEBUG, \"CWinSystemAmlogicGLESContext::{}: \"\n+    \"cur: iWidth: {:04d}, iHeight: {:04d}, iScreenWidth: {:04d}, iScreenHeight: {:04d}, fRefreshRate: {:02.2f}, dwFlags: {:02x}\",\n+    __FUNCTION__,\n+    current_resolution.iWidth, current_resolution.iHeight, current_resolution.iScreenWidth, current_resolution.iScreenHeight,\n+    current_resolution.fRefreshRate, current_resolution.dwFlags);\n+  CLog::Log(LOGDEBUG, \"CWinSystemAmlogicGLESContext::{}: \"\n+    \"res: iWidth: {:04d}, iHeight: {:04d}, iScreenWidth: {:04d}, iScreenHeight: {:04d}, fRefreshRate: {:02.2f}, dwFlags: {:02x}\",\n+    __FUNCTION__,\n+    res.iWidth, res.iHeight, res.iScreenWidth, res.iScreenHeight, res.fRefreshRate, res.dwFlags);\n+\n+  // check if mode switch is needed\n+  if (current_resolution.iWidth == res.iWidth && current_resolution.iHeight == res.iHeight &&\n+      current_resolution.iScreenWidth == res.iScreenWidth && current_resolution.iScreenHeight == res.iScreenHeight &&\n+      m_bFullScreen == fullScreen && current_resolution.fRefreshRate == res.fRefreshRate &&\n+      (current_resolution.dwFlags & D3DPRESENTFLAG_MODEMASK) == (res.dwFlags & D3DPRESENTFLAG_MODEMASK) &&\n+      m_stereo_mode == stereo_mode && m_bWindowCreated &&\n+      ((m_cs != -1 && m_cd != -1) && (m_cs == cs && m_cd == cd)) &&\n+      (fractional_rate == cur_fractional_rate))\n+  {\n+    CLog::Log(LOGDEBUG, \"CWinSystemAmlogicGLESContext::{}: No need to create a new window\", __FUNCTION__);\n+    return true;\n+  }\n+\n+  // destroy old window, then create a new one\n+  DestroyWindow();\n+\n+  // check if a forced mode switch is required\n+  if ((current_resolution.iWidth == res.iWidth && current_resolution.iHeight == res.iHeight &&\n+       current_resolution.iScreenWidth == res.iScreenWidth && current_resolution.iScreenHeight == res.iScreenHeight &&\n+       current_resolution.fRefreshRate == res.fRefreshRate) &&\n+       (((m_cs != -1 && m_cd != -1) && (m_cs != cs || m_cd != cd)) ||\n+       (fractional_rate != cur_fractional_rate)))\n+  {\n+    m_force_mode_switch = true;\n+    CLog::Log(LOGDEBUG, \"CWinSystemAmlogicGLESContext::{}: force mode switch\", __FUNCTION__);\n+  }\n \n   if (!CWinSystemAmlogic::CreateNewWindow(name, fullScreen, res))\n   {\n@@ -94,6 +180,16 @@ bool CWinSystemAmlogicGLESContext::CreateNewWindow(const std::string& name,\n       (*i)->OnResetDisplay();\n   }\n \n+  // backup data after mode switch\n+  if (amhdmitx0_cs.Exists() && amhdmitx0_cd.Exists())\n+  {\n+    m_cs = amhdmitx0_cs.Get<int>().value();\n+    m_cd = amhdmitx0_cd.Get<int>().value();\n+  }\n+\n+  m_stereo_mode = stereo_mode;\n+  m_bFullScreen = fullScreen;\n+\n   return true;\n }\n \n@@ -167,4 +263,3 @@ std::unique_ptr<CVideoSync> CWinSystemAmlogicGLESContext::GetVideoSync(void *clo\n   std::unique_ptr<CVideoSync> pVSync(new CVideoSyncAML(clock));\n   return pVSync;\n }\n-\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h\nindex 7d7467ee1a..ef6166692a 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.h\n@@ -23,7 +23,7 @@ namespace AML\n class CWinSystemAmlogicGLESContext : public CWinSystemAmlogic, public CRenderSystemGLES\n {\n public:\n-  CWinSystemAmlogicGLESContext() = default;\n+  CWinSystemAmlogicGLESContext();\n   virtual ~CWinSystemAmlogicGLESContext() = default;\n \n   static void Register();\n@@ -53,7 +53,8 @@ protected:\n \n private:\n   CEGLContextUtils m_pGLContext;\n-\n+  int m_cs;\n+  int m_cd;\n };\n \n }\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0016-AMLUtils-add-display-DV-support-check.patch",
    "content": "From e31d8ce8965aef763014ecc5ce00252bb70dd894 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Mon, 22 May 2023 11:23:13 +0200\nSubject: [PATCH 16/21] AMLUtils: add display DV support check\n\n---\n xbmc/utils/AMLUtils.cpp | 16 ++++++++++++++++\n xbmc/utils/AMLUtils.h   |  1 +\n 2 files changed, 17 insertions(+)\n\ndiff --git a/xbmc/utils/AMLUtils.cpp b/xbmc/utils/AMLUtils.cpp\nindex 33e449408d..2d1c1d78b3 100644\n--- a/xbmc/utils/AMLUtils.cpp\n+++ b/xbmc/utils/AMLUtils.cpp\n@@ -56,6 +56,22 @@ int aml_get_cpufamily_id()\n   return aml_cpufamily_id;\n }\n \n+bool aml_display_support_dv()\n+{\n+  int support_dv = 0;\n+  CRegExp regexp;\n+  regexp.RegComp(\"The Rx don't support DolbyVision\");\n+  std::string valstr;\n+  CSysfsPath dv_cap{\"/sys/devices/virtual/amhdmitx/amhdmitx0/dv_cap\"};\n+  if (dv_cap.Exists())\n+  {\n+    valstr = dv_cap.Get<std::string>().value();\n+    support_dv = (regexp.RegFind(valstr) >= 0) ? 0 : 1;\n+  }\n+\n+  return support_dv;\n+}\n+\n bool aml_dv_support_ll()\n {\n   int support_ll = 0;\ndiff --git a/xbmc/utils/AMLUtils.h b/xbmc/utils/AMLUtils.h\nindex a944814642..2f07acbfa1 100644\n--- a/xbmc/utils/AMLUtils.h\n+++ b/xbmc/utils/AMLUtils.h\n@@ -49,6 +49,7 @@ enum AML_SUPPORT_H264_4K2K\n #define AML_SM1     0x2B\n \n int  aml_get_cpufamily_id();\n+bool aml_display_support_dv();\n bool aml_dv_support_ll();\n bool aml_support_hevc();\n bool aml_support_hevc_4k2k();\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0017-AMLCodec-Restart-codec-in-dec_mode-STREAM_TYPE_FRAME.patch",
    "content": "From 40f2d0145580ae8c20a431351b4dbe74aae1f928 Mon Sep 17 00:00:00 2001\nFrom: Arthur Liberman <arthur_liberman@hotmail.com>\nDate: Thu, 28 Dec 2023 00:44:36 +0200\nSubject: [PATCH 17/21] AMLCodec: Restart codec in `dec_mode=STREAM_TYPE_FRAME`\n on DoVi P7 MEL Dolby Vision Profile 7 Minimum Enhancement Layer (MEL) can't\n use `STREAM_TYPE_STREAM` decoder mode. The kernel can detect MEL content, it\n sets `is_mel=true` in sysfs, we detect it, and restart the codec in the\n correct mode\n\n---\n .../VideoPlayer/DVDCodecs/Video/AMLCodec.cpp  | 26 ++++++++++++++++++-\n .../VideoPlayer/DVDCodecs/Video/AMLCodec.h    |  2 ++\n .../DVDCodecs/Video/DVDVideoCodecAmlogic.cpp  | 12 ++++++++-\n .../DVDCodecs/Video/DVDVideoCodecAmlogic.h    |  1 +\n 4 files changed, 39 insertions(+), 2 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\nindex dad0690ef2..3962cb904d 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n@@ -1814,6 +1814,8 @@ CAMLCodec::CAMLCodec(CProcessInfo &processInfo)\n   , m_bufferIndex(-1)\n   , m_state(0)\n   , m_processInfo(processInfo)\n+  , m_is_dv_p7_mel(false)\n+  , m_dolby_vision_wait_delay(0)\n {\n   am_private = new am_private_t;\n   memset(am_private, 0, sizeof(am_private_t));\n@@ -2020,13 +2022,20 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n     }\n \n     am_private->gcodec.dv_enable = 1;\n-    if (hints.dovi.dv_profile == 7 && CServiceBroker::GetSettingsComponent()->GetSettings()->GetInt(\n+    if (!m_is_dv_p7_mel && hints.dovi.dv_profile == 7 && CServiceBroker::GetSettingsComponent()->GetSettings()->GetInt(\n         CSettings::SETTING_VIDEOPLAYER_CONVERTDOVI) == 0)\n     {\n       CSysfsPath amdolby_vision_debug{\"/sys/class/amdolby_vision/debug\"};\n       if (amdolby_vision_debug.Exists())\n         amdolby_vision_debug.Set(\"enable_fel 1\");\n       am_private->gcodec.dec_mode  = STREAM_TYPE_STREAM;\n+\n+      CSysfsPath dolby_vision_wait_delay{\"/sys/module/amdolby_vision/parameters/dolby_vision_wait_delay\"};\n+      if (dolby_vision_wait_delay.Exists())\n+      {\n+        m_dolby_vision_wait_delay = dolby_vision_wait_delay.Get<unsigned int>().value();\n+        CLog::Log(LOGDEBUG, \"CAMLCodec::OpenDecoder DoVi P7 MEL detection frame delay got set to {:d} frames\", m_dolby_vision_wait_delay);\n+      }\n     }\n   }\n   else if (device_support_dv)\n@@ -2642,6 +2651,21 @@ CDVDVideoCodec::VCReturn CAMLCodec::GetPicture(VideoPicture *pVideoPicture)\n     CLog::Log(LOGDEBUG, LOGVIDEO, \"CAMLCodec::GetPicture: index: {:d}, pts: {:.3f}, dur:{:.3f}ms ar:{:.2f} elf:{:d}ms\",\n       m_bufferIndex, pVideoPicture->pts / DVD_TIME_BASE, pVideoPicture->iDuration / 1000, m_hints.aspect, elapsed_since_last_frame.count());\n \n+    if (m_dolby_vision_wait_delay > 0 && !m_is_dv_p7_mel)\n+    {\n+      m_dolby_vision_wait_delay--;\n+      CSysfsPath is_mel{\"/sys/module/amdolby_vision/parameters/is_mel\"};\n+      if (is_mel.Exists())\n+      {\n+        if (is_mel.Get<char>().value() == 'Y')\n+        {\n+          CLog::Log(LOGDEBUG, LOGVIDEO, \"CAMLCodec::GetPicture: DoVi P7 MEL content detected, request to reopen decoder\");\n+          m_is_dv_p7_mel = true;\n+          return CDVDVideoCodec::VC_REOPEN;\n+        }\n+      }\n+    }\n+\n     return CDVDVideoCodec::VC_PICTURE;\n   }\n   else if (m_drain)\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.h\nindex cfc6fafe31..2fe9212845 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.h\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.h\n@@ -109,6 +109,8 @@ private:\n   uint64_t         m_cur_pts;\n   uint64_t         m_last_pts;\n   uint32_t         m_bufferIndex;\n+  bool             m_is_dv_p7_mel;\n+  uint32_t         m_dolby_vision_wait_delay;\n \n   CRect            m_dst_rect;\n   CRect            m_display_rect;\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\nindex 12f81442d7..c2e8518f2d 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp\n@@ -436,6 +436,12 @@ void CDVDVideoCodecAmlogic::Reset(void)\n     m_bitstream->ResetStartDecode();\n }\n \n+void CDVDVideoCodecAmlogic::Reopen(void)\n+{\n+  if (m_Codec && !m_Codec->OpenDecoder(m_hints))\n+    CLog::Log(LOGERROR, \"{}: Failed to reopen Amlogic Codec\", __MODULE_NAME__);\n+}\n+\n CDVDVideoCodec::VCReturn CDVDVideoCodecAmlogic::GetPicture(VideoPicture* pVideoPicture)\n {\n   if (!m_Codec)\n@@ -443,7 +449,11 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecAmlogic::GetPicture(VideoPicture* pVideoP\n \n   VCReturn retVal = m_Codec->GetPicture(&m_videobuffer);\n \n-  if (retVal == VC_PICTURE)\n+  if (retVal == VC_REOPEN)\n+  {\n+    m_Codec->CloseDecoder();\n+  }\n+  else if (retVal == VC_PICTURE)\n   {\n     pVideoPicture->SetParams(m_videobuffer);\n \ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.h\nindex 8a1d66e485..b0d422909a 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.h\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAmlogic.h\n@@ -70,6 +70,7 @@ public:\n   virtual bool Open(CDVDStreamInfo &hints, CDVDCodecOptions &options) override;\n   virtual bool AddData(const DemuxPacket &packet) override;\n   virtual void Reset() override;\n+  virtual void Reopen() override;\n   virtual VCReturn GetPicture(VideoPicture* pVideoPicture) override;\n   virtual void SetSpeed(int iSpeed) override;\n   virtual void SetCodecControl(int flags) override;\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0018-libdovi-change-default-conversion-to-Lossless-for-Am.patch",
    "content": "From d94ce039a9a6dea04fea7fd7156e41eb67ea4164 Mon Sep 17 00:00:00 2001\nFrom: Arthur Liberman <arthur_liberman@hotmail.com>\nDate: Fri, 12 Jan 2024 17:21:47 +0200\nSubject: [PATCH 18/21] libdovi: change default conversion to Lossless for\n Amlogic-ng-dv\n\n---\n system/settings/settings.xml | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/system/settings/settings.xml b/system/settings/settings.xml\nindex d656de67d1..7117ac0394 100755\n--- a/system/settings/settings.xml\n+++ b/system/settings/settings.xml\n@@ -236,7 +236,7 @@\n             </or>\n           </requirement>\n           <level>2</level>\n-          <default>2</default>\n+          <default>0</default>\n           <updates>\n             <update type=\"change\" />\n           </updates>\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0019-AMLCodec-set-also-dolby_vision_ll_policy-when-force-.patch",
    "content": "From 979f3c936539d2944585c27d0b79642c1bdbb38f Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Mon, 15 Jan 2024 09:59:43 +0100\nSubject: [PATCH 19/21] AMLCodec: set also dolby_vision_ll_policy when force\n player led 4.9 kernel does require the policy set as well\n\n---\n xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\nindex 3962cb904d..7d702cd1c4 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n@@ -292,6 +292,8 @@ typedef struct hdr_buf {\n } hdr_buf_t;\n \n #define FLAG_FORCE_DV_LL        (unsigned int)(0x4000)\n+#define DOLBY_VISION_LL_DISABLE (unsigned int)(0)\n+#define DOLBY_VISION_LL_YUV422  (unsigned int)(1)\n \n typedef struct am_packet {\n     AVPacket      avpkt;\n@@ -2013,12 +2015,19 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)\n \n     // force player led mode when enabled\n     CSysfsPath dolby_vision_flags{\"/sys/module/amdolby_vision/parameters/dolby_vision_flags\"};\n-    if (dolby_vision_flags.Exists())\n+    CSysfsPath dolby_vision_ll_policy{\"/sys/module/amdolby_vision/parameters/dolby_vision_ll_policy\"};\n+    if (dolby_vision_flags.Exists() && dolby_vision_ll_policy.Exists())\n     {\n       if (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_COREELEC_AMLOGIC_USE_PLAYERLED))\n+      {\n         dolby_vision_flags.Set(dolby_vision_flags.Get<unsigned int>().value() | FLAG_FORCE_DV_LL);\n+        dolby_vision_ll_policy.Set(DOLBY_VISION_LL_YUV422);\n+      }\n       else\n+      {\n         dolby_vision_flags.Set(dolby_vision_flags.Get<unsigned int>().value() & ~(FLAG_FORCE_DV_LL));\n+        dolby_vision_ll_policy.Set(DOLBY_VISION_LL_DISABLE);\n+      }\n     }\n \n     am_private->gcodec.dv_enable = 1;\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0020-WinSystemAmlogic-backup-correct-colour-subsampling-a.patch",
    "content": "From f08632775e1a7cb7629e1fe6b970e3e2141d6ad6 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 16 Jan 2024 15:27:55 +0100\nSubject: [PATCH 20/21] WinSystemAmlogic: backup correct colour subsampling and\n colour depth\n\n---\n xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\nindex f9d94dc34f..16b54d8803 100644\n--- a/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n+++ b/xbmc/windowing/amlogic/WinSystemAmlogicGLESContext.cpp\n@@ -183,8 +183,8 @@ bool CWinSystemAmlogicGLESContext::CreateNewWindow(const std::string& name,\n   // backup data after mode switch\n   if (amhdmitx0_cs.Exists() && amhdmitx0_cd.Exists())\n   {\n-    m_cs = amhdmitx0_cs.Get<int>().value();\n-    m_cd = amhdmitx0_cd.Get<int>().value();\n+    m_cs = cs;\n+    m_cd = cd;\n   }\n \n   m_stereo_mode = stereo_mode;\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/0021-AMLCodec-marginal-increase-frame-buffer-levels.patch",
    "content": "From 73a8feac65bcae4e0c55855482cc485edf1630f2 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 16 Jan 2024 15:38:56 +0100\nSubject: [PATCH 21/21] AMLCodec: marginal increase frame buffer levels\n\n---\n xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\nindex 7d702cd1c4..dae7e39ea6 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp\n@@ -2638,7 +2638,7 @@ CDVDVideoCodec::VCReturn CAMLCodec::GetPicture(VideoPicture *pVideoPicture)\n   if (!m_opened)\n     return CDVDVideoCodec::VC_ERROR;\n \n-  if ((!m_drain && buffer_level > 1.0f) && (ret = DequeueBuffer()) == 0)\n+  if ((!m_drain && buffer_level > 5.0f) && (ret = DequeueBuffer()) == 0)\n   {\n     pVideoPicture->iFlags = 0;\n     m_tp_last_frame = std::chrono::system_clock::now();\n@@ -2679,7 +2679,7 @@ CDVDVideoCodec::VCReturn CAMLCodec::GetPicture(VideoPicture *pVideoPicture)\n   }\n   else if (m_drain)\n     return CDVDVideoCodec::VC_EOF;\n-  else if (buffer_level > 2.0f)\n+  else if (buffer_level > 10.0f)\n     return CDVDVideoCodec::VC_NONE;\n   else if (ret != EAGAIN || elapsed_since_last_frame > std::chrono::seconds(m_decoder_timeout))\n   {\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/kodi/kodi-temp-03-TEMP-fix-OnSettingChanged-signal.patch",
    "content": "From 1090b59aa68165e67a39895d7d648c7ff286ed8d Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Wed, 17 Feb 2021 07:59:09 +0100\nSubject: [PATCH] TEMP: fix OnSettingChanged signal\n\n---\n xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp b/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp\nindex 73816df648..fbd1f54680 100644\n--- a/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp\n+++ b/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp\n@@ -104,6 +104,8 @@ void CGUIDialogPeripheralSettings::OnSettingChanged(const std::shared_ptr<const\n   if (!peripheral)\n     return;\n\n+  peripheral->OnSettingChanged(setting->GetId());\n+\n   if (settingId == SETTING_APPEARANCE)\n   {\n     // Get the controller profile of the new appearance\n--\n2.30.0\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0001-Revert-hdmitx-fix-reading-hdmitx-register-when-uboot.patch",
    "content": "From 9906ee56e075be59d290e79f20ef131fd6cc41f4 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 26 May 2023 10:11:56 +0200\nSubject: [PATCH 01/18] Revert \"hdmitx: fix reading hdmitx register when uboot\n is older\"\n\nThis reverts commit ed885563805e1fabaf09113ef33f9d3709ace217.\n---\n .../media/vout/hdmitx/hdmi_tx_20/hw/reg_ops.c | 105 +-----------------\n 1 file changed, 1 insertion(+), 104 deletions(-)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/reg_ops.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/reg_ops.c\nindex b4c5724917f4..cd425c29e72b 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/reg_ops.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/reg_ops.c\n@@ -33,7 +33,6 @@\n #include <linux/amlogic/media/vout/hdmi_tx/hdmi_tx_module.h>\n #include <linux/arm-smccc.h>\n #include \"common.h\"\n-#include \"mach_reg.h\"\n #include \"hdmi_tx_reg.h\"\n #include \"reg_ops.h\"\n #include \"mach_reg.h\"\n@@ -470,74 +469,6 @@ unsigned int hdmitx_rd_reg_normal(unsigned int addr)\n \treturn data;\n }\n \n-#define __asmeq(x, y)  \".ifnc \" x \",\" y \" ; .err ; .endif\\n\\t\"\n-\n-void sec_reg_write(unsigned int *addr, unsigned int value)\n-{\n-\tregister long x0 asm(\"x0\") = 0x82000019;\n-\tregister long x1 asm(\"x1\") = (unsigned long)addr;\n-\tregister long x2 asm(\"x2\") = value;\n-\tasm volatile(\n-\t\t__asmeq(\"%0\", \"x0\")\n-\t\t__asmeq(\"%1\", \"x1\")\n-\t\t__asmeq(\"%2\", \"x2\")\n-\t\t\"smc #0\\n\"\n-\t\t: : \"r\"(x0), \"r\"(x1), \"r\"(x2)\n-\t);\n-}\n-\n-unsigned int sec_reg_read(unsigned int *addr)\n-{\n-\tregister long x0 asm(\"x0\") = 0x82000018;\n-\tregister long x1 asm(\"x1\") = (unsigned long)addr;\n-\tasm volatile(\n-\t\t__asmeq(\"%0\", \"x0\")\n-\t\t__asmeq(\"%1\", \"x1\")\n-\t\t\"smc #0\\n\"\n-\t\t: \"+r\"(x0) : \"r\"(x1)\n-\t);\n-\treturn (unsigned int)(x0&0xffffffff);\n-}\n-\n-static DEFINE_SPINLOCK(reg_lock);\n-\n-unsigned int hdmitx_rd_reg_old(unsigned int addr)\n-{\n-\tunsigned int data = 0;\n-\tunsigned long offset = (addr & DWC_OFFSET_MASK) >> 24;\n-\tunsigned long flags, fiq_flag;\n-\tif (addr & SEC_OFFSET) {\n-\t\taddr = addr & 0xffff;\n-\t\tsec_reg_write((unsigned int *)(unsigned long)\n-\t\t\tTO_PHY_ADDR(P_HDMITX_ADDR_PORT_SEC + offset), addr);\n-\t\tsec_reg_write((unsigned int *)(unsigned long)\n-\t\t\tTO_PHY_ADDR(P_HDMITX_ADDR_PORT_SEC + offset), addr);\n-\t\tdata = sec_reg_read((unsigned int *)(unsigned long)\n-\t\t\tTO_PHY_ADDR(P_HDMITX_DATA_PORT_SEC + offset));\n-\t} else {\n-\t\taddr = addr & 0xffff;\n-\t\tspin_lock_irqsave(&reg_lock, flags);\n-\t\traw_local_save_flags(fiq_flag);\n-\t\tlocal_fiq_disable();\n-\n-/*\n- * If addr is located at 0x5020 ~ 0x667e in DWC,\n- * then should operate twice\n- */\n-\t\thd_write_reg(P_HDMITX_ADDR_PORT + offset, addr);\n-\t\thd_write_reg(P_HDMITX_ADDR_PORT + offset, addr);\n-\t\tdata = hd_read_reg(P_HDMITX_DATA_PORT + offset);\n-\t\tdata = hd_read_reg(P_HDMITX_DATA_PORT + offset);\n-\n-\t\traw_local_irq_restore(fiq_flag);\n-\t\tspin_unlock_irqrestore(&reg_lock, flags);\n-\t}\n-\n-\tpr_debug(REG \"%s rd[0x%x] 0x%x\\n\", offset ? \"DWC\" : \"TOP\",\n-\t\t\taddr, data);\n-\treturn data;\n-}\n-\n unsigned int hdmitx_rd_reg_g12a(unsigned int addr)\n {\n \tunsigned int large_offset = addr >> 24;\n@@ -578,8 +509,6 @@ unsigned int hdmitx_rd_reg(unsigned int addr)\n \n \tif (hdev->chip_type >= MESON_CPU_ID_G12A)\n \t\tdata = hdmitx_rd_reg_g12a(addr);\n-\telse if (hdev->chip_type == MESON_CPU_ID_GXL)\n-\t\tdata = hdmitx_rd_reg_old(addr);\n \telse\n \t\tdata = hdmitx_rd_reg_normal(addr);\n \treturn data;\n@@ -605,36 +534,6 @@ void hdmitx_wr_reg_normal(unsigned int addr, unsigned int data)\n \t\t\taddr, data);\n }\n \n-void hdmitx_wr_reg_old(unsigned int addr, unsigned int data)\n-{\n-\tunsigned long flags, fiq_flag;\n-\tunsigned long offset = (addr & DWC_OFFSET_MASK) >> 24;\n-\n-\tif (addr & SEC_OFFSET) {\n-\t\taddr = addr & 0xffff;\n-\t\tsec_reg_write((unsigned int *)(unsigned long)\n-\t\t\tTO_PHY_ADDR(P_HDMITX_ADDR_PORT_SEC + offset), addr);\n-\t\tsec_reg_write((unsigned int *)(unsigned long)\n-\t\t\tTO_PHY_ADDR(P_HDMITX_ADDR_PORT_SEC + offset), addr);\n-\t\tsec_reg_write((unsigned int *)(unsigned long)\n-\t\t\tTO_PHY_ADDR(P_HDMITX_DATA_PORT_SEC + offset), data);\n-\t} else {\n-\t\taddr = addr & 0xffff;\n-\t\tspin_lock_irqsave(&reg_lock, flags);\n-\t\traw_local_save_flags(fiq_flag);\n-\t\tlocal_fiq_disable();\n-\n-\t\thd_write_reg(P_HDMITX_ADDR_PORT + offset, addr);\n-\t\thd_write_reg(P_HDMITX_ADDR_PORT + offset, addr);\n-\t\thd_write_reg(P_HDMITX_DATA_PORT + offset, data);\n-\t\traw_local_irq_restore(fiq_flag);\n-\t\tspin_unlock_irqrestore(&reg_lock, flags);\n-\t}\n-\n-\tpr_debug(\"%s wr[0x%x] 0x%x\\n\", offset ? \"DWC\" : \"TOP\",\n-\t\t\taddr, data);\n-}\n-\n void hdmitx_wr_reg_g12a(unsigned int addr, unsigned int data)\n {\n \tunsigned int large_offset = addr >> 24;\n@@ -671,9 +570,7 @@ void hdmitx_wr_reg(unsigned int addr, unsigned int data)\n \n \tif (hdev->chip_type >= MESON_CPU_ID_G12A)\n \t\thdmitx_wr_reg_g12a(addr, data);\n-\telse if (hdev->chip_type == MESON_CPU_ID_GXL)\n-\t\thdmitx_wr_reg_old(addr, data);\n-    else\n+\telse\n \t\thdmitx_wr_reg_normal(addr, data);\n }\n EXPORT_SYMBOL(hdmitx_wr_reg);\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0002-amdv-dv-not-enabled-when-dolby_vision_policy-changed.patch",
    "content": "From 7a4a4a239cdaf507a44539aeef91ccd0f8060e13 Mon Sep 17 00:00:00 2001\nFrom: yao liu <yao.liu@amlogic.com>\nDate: Thu, 28 Jul 2022 17:20:49 +0800\nSubject: [PATCH 02/18] amdv: dv not enabled when dolby_vision_policy changed\n [1/1]\n\nPD#SWPL-89319\n\nProblem:\ndv not enabled when dolby_vision_policy changed\n\nSolution:\n1.Config dolby_vision_hdr10_policy for sdr in both\nalways hdr and adaptive hdr mode. SDR processed\nby dv by default.\n2.Add vs12 control for tv, vs12 is not enabled by\ndefault, due to some hdr nts test fail.\n\nVerify:\nt7\n\nChange-Id: Ibf14be850214b5af1ba91ef394d16ca63433317c\nSigned-off-by: yao liu <yao.liu@amlogic.com>\n---\n .../amdolby_vision/amdolby_vision.c           | 49 ++++++++++---------\n 1 file changed, 27 insertions(+), 22 deletions(-)\n\ndiff --git a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\nindex f6a30c011a9c..c59aa708b0c7 100644\n--- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n+++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n@@ -137,19 +137,22 @@ static unsigned int last_dolby_vision_policy;\n /* bit3: follow sink 0: bypass hlg to vpp, 1: process hlg by dolby core */\n /* bit4: follow source 0: bypass hlg to vpp, 1: process hlg by dolby core */\n /* === SDR === */\n-/* bit5: 0: bypass SDR to vpp, 1: process SDR by dolby core */\n-/* set by policy_process */\n+/* bit5: follow sink 0: bypass SDR to vpp, 1: process SDR by dolby core */\n+/* bit6: follow source 0: bypass SDR to vpp, 1: process SDR by dolby core */\n #define HDR_BY_DV_F_SINK 0x1\n #define HDR_BY_DV_F_SRC 0x2\n #define HDRP_BY_DV 0x4\n #define HLG_BY_DV_F_SINK 0x8\n #define HLG_BY_DV_F_SRC 0x10\n-#define SDR_BY_DV 0x20\n+#define SDR_BY_DV_F_SINK 0x20\n+#define SDR_BY_DV_F_SRC 0x40\n \n-static unsigned int dolby_vision_hdr10_policy = HDR_BY_DV_F_SINK;\n+static unsigned int dolby_vision_hdr10_policy;\n module_param(dolby_vision_hdr10_policy, uint, 0664);\n MODULE_PARM_DESC(dolby_vision_hdr10_policy, \"\\n dolby_vision_hdr10_policy\\n\");\n-static unsigned int last_dolby_vision_hdr10_policy = HDR_BY_DV_F_SINK;\n+static unsigned int last_dolby_vision_hdr10_policy;\n+\n+static bool enable_amvs12_for_tv;\n \n /* enable hdmi dv std to stb core */\n static uint hdmi_to_stb_policy = 1;\n@@ -5455,13 +5458,6 @@ static int dolby_vision_policy_process\n \t\t\t\t}\n \t\t\t}\n \t\t}\n-\t\tif (src_format == FORMAT_SDR &&\n-\t\t    (mode_change || *mode == dolby_vision_mode)) {\n-\t\t\tif (*mode == DOLBY_VISION_OUTPUT_MODE_BYPASS)\n-\t\t\t\tdolby_vision_hdr10_policy &= ~SDR_BY_DV;\n-\t\t\telse\n-\t\t\t\tdolby_vision_hdr10_policy |= SDR_BY_DV;\n-\t\t}\n \t\treturn mode_change;\n \t}\n \n@@ -5728,14 +5724,6 @@ static int dolby_vision_policy_process\n \t\t\tmode_change = 1;\n \t\t}\n \t}\n-\n-\tif (src_format == FORMAT_SDR &&\n-\t    (mode_change || *mode == dolby_vision_mode)) {\n-\t\tif (*mode == DOLBY_VISION_OUTPUT_MODE_BYPASS)\n-\t\t\tdolby_vision_hdr10_policy &= ~SDR_BY_DV;\n-\t\telse\n-\t\t\tdolby_vision_hdr10_policy |= SDR_BY_DV;\n-\t}\n \treturn mode_change;\n }\n \n@@ -10580,16 +10568,20 @@ int get_dolby_vision_hdr_policy(void)\n \t\t/* policy == FOLLOW_SRC, check hdr/hlg policy */\n \t\tret |= (dolby_vision_hdr10_policy & HDR_BY_DV_F_SRC) ? 1 : 0;\n \t\tret |= (dolby_vision_hdr10_policy & HLG_BY_DV_F_SRC) ? 2 : 0;\n+\t\tret |= (dolby_vision_hdr10_policy & SDR_BY_DV_F_SRC) ? 0x40 : 0;\n \t} else if (dolby_vision_policy == DOLBY_VISION_FOLLOW_SINK) {\n \t\t/* policy == FOLLOW_SINK, check hdr/hlg policy */\n \t\tret |= (dolby_vision_hdr10_policy & HDR_BY_DV_F_SINK) ? 1 : 0;\n \t\tret |= (dolby_vision_hdr10_policy & HLG_BY_DV_F_SINK) ? 2 : 0;\n+\t\tret |= (dolby_vision_hdr10_policy & SDR_BY_DV_F_SINK) ? 0x20 : 0;\n \t} else {\n \t\t/* policy == FORCE, check hdr/hlg policy */\n \t\tret |= (dolby_vision_hdr10_policy & HDR_BY_DV_F_SRC) ? 1 : 0;\n \t\tret |= (dolby_vision_hdr10_policy & HLG_BY_DV_F_SRC) ? 2 : 0;\n \t\tret |= (dolby_vision_hdr10_policy & HDR_BY_DV_F_SINK) ? 1 : 0;\n \t\tret |= (dolby_vision_hdr10_policy & HLG_BY_DV_F_SINK) ? 2 : 0;\n+\t\tret |= (dolby_vision_hdr10_policy & SDR_BY_DV_F_SINK) ? 0x20 : 0;\n+\t\tret |= (dolby_vision_hdr10_policy & SDR_BY_DV_F_SRC) ? 0x40 : 0;\n \t}\n \treturn ret;\n }\n@@ -11924,6 +11916,13 @@ int register_dv_functions(const struct dolby_vision_func_s *func)\n \t\t\t\tif (!tv_dovi_setting)\n \t\t\t\t\treturn -ENOMEM;\n \t\t\t}\n+\t\t\tdolby_vision_hdr10_policy |= SDR_BY_DV_F_SINK;\n+\t\t\tdolby_vision_hdr10_policy |= HDR_BY_DV_F_SINK;\n+\t\t\tlast_dolby_vision_hdr10_policy = dolby_vision_hdr10_policy;\n+\t\t\tif (ko_info)\n+\t\t\t\tpr_info(\"hdr10_policy %d, ko_info %s\\n\",\n+\t\t\t\t\tdolby_vision_hdr10_policy, ko_info);\n+\n \t\t} else if (func->tv_control_path && !p_funcs_tv) {\n \t\t\tpr_info(\"*** register_dv_tv_functions\\n\");\n \t\t\tif (!ko_info) {\n@@ -11966,6 +11965,14 @@ int register_dv_functions(const struct dolby_vision_func_s *func)\n \t\t\t\tmemset(tv_input_info, 0,\n \t\t\t\t       sizeof(struct tv_input_info_s));\n \t\t\t}\n+\t\t\tif (enable_amvs12_for_tv) {\n+\t\t\t\tdolby_vision_hdr10_policy |= HLG_BY_DV_F_SINK;\n+\t\t\t\tdolby_vision_hdr10_policy |= HDR_BY_DV_F_SINK;\n+\t\t\t}\n+\t\t\tlast_dolby_vision_hdr10_policy = dolby_vision_hdr10_policy;\n+\t\t\tif (ko_info)\n+\t\t\t\tpr_info(\"hdr10_policy %d, ko_info %s\\n\",\n+\t\t\t\t\tdolby_vision_hdr10_policy, ko_info);\n \t\t} else {\n \t\t\treturn ret;\n \t\t}\n@@ -13370,8 +13377,6 @@ static int amdolby_vision_probe(struct platform_device *pdev)\n \tpr_info(\"\\n cpu_id=%d tvmode=%d\\n\", dv_meson_dev.cpu_id, tv_mode);\n \tmemset(devp, 0, (sizeof(struct amdolby_vision_dev_s)));\n \tif (is_meson_tm2_tvmode()) {\n-\t\tdolby_vision_hdr10_policy |= HLG_BY_DV_F_SINK;\n-\t\tpr_info(\"enable DV HLG when follow sink.\\n\");\n \t\tdolby_vision_flags |= FLAG_RX_EMP_VSEM;\n \t\tpr_info(\"enable DV VSEM.\\n\");\n \t}\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0003-hdmitx-forcely-send-bt.2020-for-all-DV-case-1-2.patch",
    "content": "From 34c8d1baaac620e55bcd1cd565e1ae66a925f995 Mon Sep 17 00:00:00 2001\nFrom: hang cheng <hang.cheng@amlogic.com>\nDate: Wed, 18 May 2022 16:37:23 +0800\nSubject: [PATCH 03/18] hdmitx: forcely send bt.2020 for all DV case [1/2]\n\nPD#SWPL-79072\n\nProblem:\nDolby Vision IDK2.6 kit chapter 4.4.1 Expected AVI-IF\nfor Dolby Vision output, need BT.2020 under all DV\noutput case\n\nSolution:\nforcely send bt.2020 for all DV case\n\nVerify:\nan400\n\nChange-Id: Ie0b74b4c4196ca4d20bbb07cbce99487f9479162\nSigned-off-by: hang cheng <hang.cheng@amlogic.com>\n---\n .../vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c     | 23 +++++++++++--------\n 1 file changed, 14 insertions(+), 9 deletions(-)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\nindex c66d30e2d696..d97b4c2ab736 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n@@ -1911,8 +1911,11 @@ void hdmitx_set_vsif_pkt(enum eotf_type type,\n \t\t\thdmitx_device.hwop.setpacket(HDMI_PACKET_DRM,\n \t\t\t\tNULL, NULL);\n \t\t\thdev->hwop.setpacket(HDMI_PACKET_VEND, VEN_DB1, VEN_HB);\n+\t\t\t/* Dolby Vision Source System-on-Chip Platform Kit Version 2.6:\n+\t\t\t * 4.4.1 Expected AVI-IF for Dolby Vision output, need BT2020 for DV\n+\t\t\t */\n \t\t\thdev->hwop.cntlconfig(hdev, CONF_AVI_BT2020,\n-\t\t\t\tCLR_AVI_BT2020);/*BT709*/\n+\t\t\t\tSET_AVI_BT2020);/*BT.2020*/\n \t\t\tif (tunnel_mode == RGB_8BIT) {\n \t\t\t\thdev->hwop.cntlconfig(hdev,\n \t\t\t\t\tCONF_AVI_RGBYCC_INDIC,\n@@ -2013,8 +2016,11 @@ void hdmitx_set_vsif_pkt(enum eotf_type type,\n \t\t\thdmitx_device.hwop.setpacket(HDMI_PACKET_DRM,\n \t\t\t\tNULL, NULL);\n \t\t\thdev->hwop.setpacket(HDMI_PACKET_VEND, VEN_DB2, VEN_HB);\n+\t\t\t/* Dolby Vision Source System-on-Chip Platform Kit Version 2.6:\n+\t\t\t * 4.4.1 Expected AVI-IF for Dolby Vision output, need BT2020 for DV\n+\t\t\t */\n \t\t\thdev->hwop.cntlconfig(hdev, CONF_AVI_BT2020,\n-\t\t\t\tCLR_AVI_BT2020);/*BT709*/\n+\t\t\t\tSET_AVI_BT2020);/*BT.2020*/\n \t\t\tif (tunnel_mode == RGB_8BIT) {/*RGB444*/\n \t\t\t\thdev->hwop.cntlconfig(hdev,\n \t\t\t\t\tCONF_AVI_RGBYCC_INDIC,\n@@ -2035,13 +2041,12 @@ void hdmitx_set_vsif_pkt(enum eotf_type type,\n \t\t\thdmitx_device.hwop.setpacket(HDMI_PACKET_DRM,\n \t\t\t\tNULL, NULL);\n \t\t\thdev->hwop.setpacket(HDMI_PACKET_VEND, VEN_DB2, VEN_HB);\n-\t\t\tif (hdev->rxcap.colorimetry_data & 0xe0)\n-\t\t\t\t/*if RX support BT2020, then output BT2020*/\n-\t\t\t\thdev->hwop.cntlconfig(hdev, CONF_AVI_BT2020,\n-\t\t\t\t\tSET_AVI_BT2020);/*BT2020*/\n-\t\t\telse\n-\t\t\t\thdev->hwop.cntlconfig(hdev, CONF_AVI_BT2020,\n-\t\t\t\t\tCLR_AVI_BT2020);/*BT709*/\n+\t\t\t/* Dolby vision HDMI Signaling Case25,\n+\t\t\t * UCD323 not declare bt2020 colorimetry,\n+\t\t\t * need to forcely send BT.2020\n+\t\t\t */\n+\t\t\thdev->hwop.cntlconfig(hdev, CONF_AVI_BT2020,\n+\t\t\t\tSET_AVI_BT2020);/*BT2020*/\n \t\t\tif (tunnel_mode == RGB_10_12BIT) {/*10/12bit RGB444*/\n \t\t\t\thdev->hwop.cntlconfig(hdev,\n \t\t\t\t\tCONF_AVI_RGBYCC_INDIC,\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0004-DT-make-a-copy-from-arm64-to-arm.patch",
    "content": "From 862503c9dec4dd30c98552d88a2e0ed441be4e4c Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 25 May 2023 14:53:10 +0200\nSubject: [PATCH 04/18] DT: make a copy from arm64 to arm\n\n---\n arch/arm/boot/dts/amlogic/Makefile            |  29 +-\n .../arm/boot/dts/amlogic/coreelec_common.dtsi | 264 ++++++++++++++++++\n .../boot/dts/amlogic/coreelec_g12_common.dtsi |  48 ++++\n arch/arm/boot/dts/amlogic/coreelec_g12b.dtsi  |  64 +++++\n .../arm/boot/dts/amlogic/coreelec_g12b_a.dtsi |  64 +++++\n .../dts/amlogic/g12b_s922x_minix_u22xj.dts    | 119 ++++++++\n .../amlogic/g12b_s922x_minix_u22xj_max.dts    | 130 +++++++++\n .../g12b_s922x_minix_u22xj_max_rev_a.dts      |  25 ++\n .../dts/amlogic/g12b_s922x_ugoos_am6_2g.dts   | 101 +++++++\n .../dts/amlogic/g12b_s922x_ugoos_am6_4g.dts   |   9 +\n .../amlogic/g12b_s922x_ugoos_am6_rev_a_2g.dts | 101 +++++++\n .../amlogic/g12b_s922x_ugoos_am6_rev_a_4g.dts |   9 +\n .../dts/amlogic/g12b_s922x_ugoos_am6b_2g.dts  |  29 ++\n .../dts/amlogic/g12b_s922x_ugoos_am6b_4g.dts  |   9 +\n .../g12b_s922x_ugoos_am6b_rev_a_2g.dts        |  29 ++\n .../g12b_s922x_ugoos_am6b_rev_a_4g.dts        |   9 +\n 16 files changed, 1025 insertions(+), 14 deletions(-)\n create mode 100644 arch/arm/boot/dts/amlogic/coreelec_common.dtsi\n create mode 100644 arch/arm/boot/dts/amlogic/coreelec_g12_common.dtsi\n create mode 100644 arch/arm/boot/dts/amlogic/coreelec_g12b.dtsi\n create mode 100644 arch/arm/boot/dts/amlogic/coreelec_g12b_a.dtsi\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max_rev_a.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_2g.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_4g.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_2g.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_4g.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_2g.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_4g.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_2g.dts\n create mode 100644 arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_4g.dts\n\ndiff --git a/arch/arm/boot/dts/amlogic/Makefile b/arch/arm/boot/dts/amlogic/Makefile\nindex 1d819778d955..a481e8b54b2d 100644\n--- a/arch/arm/boot/dts/amlogic/Makefile\n+++ b/arch/arm/boot/dts/amlogic/Makefile\n@@ -1,14 +1,15 @@\n-\n-targets += dtbs\n-\n-DTB_NAMES := $(subst $\\\",,$(CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES))\n-ifneq ($(DTB_NAMES),)\n-DTB_LIST := $(addsuffix .dtb,$(DTB_NAMES))\n-else\n-DTB_LIST := $(dtb-y)\n-endif\n-targets += $(DTB_LIST)\n-\n-dtbs: $(addprefix $(obj)/, $(DTB_LIST))\n-\n-clean-files := *.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_minix_u22xj.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_minix_u22xj_max.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_minix_u22xj_max_rev_a.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6_2g.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6_4g.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6_rev_a_2g.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6_rev_a_4g.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6b_2g.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6b_4g.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6b_rev_a_2g.dtb\n+dtb-$(CONFIG_ARM64_A32) += g12b_s922x_ugoos_am6b_rev_a_4g.dtb\n+\n+always\t\t:= $(dtb-y)\n+subdir-y\t:= $(dts-dirs)\n+clean-files\t:= *.dtb\ndiff --git a/arch/arm/boot/dts/amlogic/coreelec_common.dtsi b/arch/arm/boot/dts/amlogic/coreelec_common.dtsi\nnew file mode 100644\nindex 000000000000..5e488953a9c0\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/coreelec_common.dtsi\n@@ -0,0 +1,264 @@\n+#include <dt-bindings/media/rc-map.h>\n+\n+/{\n+\tcoreelec;\n+\t/delete-property/ amlogic-dt-id;\n+\n+\tchosen { };\n+\n+\treserved-memory {\n+\t\tlinux,meson-fb {\n+\t\t\talloc-ranges = <0x77800000 0x800000>;\n+\t\t};\n+\t\tlinux,vdin0_cma {\n+\t\t\tstatus = \"disabled\";\n+\t\t};\n+\t\tlinux,vdin1_cma {\n+\t\t\tstatus = \"disabled\";\n+\t\t};\n+\t\tlinux,isp_cma {\n+\t\t\tstatus = \"disabled\";\n+\t\t};\n+\t\tlinux,adapt_cma {\n+\t\t\tstatus = \"disabled\";\n+\t\t};\n+\t};\n+\n+\tgpioleds {\n+\t\tstatus = \"okay\";\n+\t\t/delete-node/ net_red;\n+\t\t/delete-node/ net_green;\n+\t\t/delete-node/ remote_led;\n+\t\tsys_led {\n+\t\t\t/delete-property/ retain-state-suspended;\n+\t\t\t/delete-property/ default-state;\n+\t\t\tlinux,default-trigger=\"default-on\";\n+\t\t};\n+\t};\n+\n+\tcodec_mm {\n+\t\tclear-map;\n+\t};\n+\n+\tvcodec_dec {\n+\t\tstatus = \"disable\";\n+\t};\n+\n+\tgpio_keypad {\n+\t\treg = <0xFF800000 0x400>;\n+\t};\n+\n+\t/delete-node/ auge_sound;\n+\tauge_sound {\n+\t\tcompatible = \"amlogic, g12a-sound-card\";\n+\t\taml-audio-card,name = \"AML-AUGESOUND\";\n+\t\tavout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;\n+\n+\t\taml-audio-card,dai-link@0 {\n+\t\t\tmclk-fs = <128>;\n+\t\t\tcpu {\n+\t\t\t\tsystem-clock-frequency = <6144000>;\n+\t\t\t};\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&dummy_codec>;\n+\t\t\t};\n+\t\t};\n+\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tformat = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\t\t\tcpu {\n+\t\t\t\tdai-tdm-slot-tx-mask = <1 1>;\n+\t\t\t\tdai-tdm-slot-rx-mask = <1 1>;\n+\t\t\t\tdai-tdm-slot-num = <2>;\n+\t\t\t\tdai-tdm-slot-width = <32>;\n+\t\t\t\tsystem-clock-frequency = <12288000>;\n+\t\t\t};\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&amlogic_codec>;\n+\t\t\t};\n+\t\t};\n+\n+\t\taml-audio-card,dai-link@2 {\n+\t\t\tmclk-fs = <128>;\n+\t\t\tcpu {\n+\t\t\t\tsystem-clock-frequency = <6144000>;\n+\t\t\t};\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&dummy_codec>;\n+\t\t\t};\n+\t\t};\n+\n+\t\taml-audio-card,dai-link@3 {\n+\t\t\tformat = \"i2s\";\n+\t\t\tmclk-fs = <256>;\n+\t\t\tbitclock-master = <&aml_i2s2hdmi>;\n+\t\t\tframe-master = <&aml_i2s2hdmi>;\n+\t\t\tcpu {\n+\t\t\t\tsound-dai = <&aml_i2s2hdmi>;\n+\t\t\t\tdai-tdm-slot-tx-mask = <1 1>;\n+\t\t\t\tdai-tdm-slot-rx-mask = <1 1>;\n+\t\t\t\tdai-tdm-slot-num = <2>;\n+\t\t\t\tdai-tdm-slot-width = <32>;\n+\t\t\t\tsystem-clock-frequency = <12288000>;\n+\t\t\t};\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&dummy_codec>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\taudiolocker: locker {\n+\t\tstatus = \"okay\";\n+\t};\n+\n+\t/delete-node/ partitions;\n+\t/delete-node/ firmware;\n+\n+\t/delete-node/ rc@0xff808040;\n+\t/delete-node/ custom_maps;\n+\tmeson-ir {\n+\t\tcompatible = \"amlogic,meson6-ir\";\n+\t\t/* Multi-format IR controller */\n+\t\treg = <0xff808040 0x44>;\n+\t\tinterrupts = <0 196 1>;\n+\t\tpinctrl-names = \"default\";\n+\t\tpinctrl-0 = <&remote_pins>;\n+\t\tpulse-inverted;\n+\t\twakeup_protocol = <NEC>; /* force default NEC by <dt-bindings/media/rc-map.h> */\n+\t\tstatus = \"okay\";\n+\t};\n+\tmeson-remote {\n+\t\tcompatible = \"amlogic, aml_remote\";\n+\t\tdev_name = \"meson-remote\";\n+\t\treg = <0xff808040 0x44>, /*Multi-format IR controller*/\n+\t\t\t  <0xff808000 0x20>; /*Legacy IR controller*/\n+\t\tstatus = \"okay\";\n+\t\tprotocol = <REMOTE_TYPE_NEC>;\n+\t\tled_blink = <1>;\n+\t\tled_blink_frq = <100>;\n+\t\tinterrupts = <0 196 1>;\n+\t\tpinctrl-names = \"default\";\n+\t\tpinctrl-0 = <&remote_pins>;\n+\t\tmax_frame_time = <200>; /*set software decoder max frame time*/\n+\t};\n+\n+\tamvideocap {\n+\t\tcompatible = \"amlogic, amvideocap\";\n+\t\tdev_name = \"amvideocap.0\";\n+\t\tstatus = \"okay\";\n+\t\tmax_size = <8>;//8M\n+\t};\n+\n+\topenvfd {\n+\t\tcompatible = \"open,vfd\";\n+\t\tdev_name = \"openvfd\";\n+\t\tstatus = \"okay\";\n+\t};\n+\n+\tdummy_venc: dummy_venc {\n+\t\tstatus = \"disabled\";\n+\t};\n+\n+\t/delete-node/ sensor;\n+\t/delete-node/ iq;\n+\t/delete-node/ demux;\n+\t/delete-node/ dvb;\n+\t/delete-node/ amvdec_656in;\n+\t/delete-node/ aml_cams;\n+\n+\t/delete-node/ lcd;\n+\t/delete-node/ lcd_extern;\n+\t/delete-node/ backlight;\n+\t/delete-node/ bl_pwm_conf;\n+\t/delete-node/ bl_extern;\n+};\n+\n+&meson_fb {\n+\tdisplay_size_default = <1920 1080 1920 2160 32>;\n+\tmem_size = <0x00800000 0x4b80000 0x100000 0x100000 0x800000>;\n+\tmem_alloc = <1>;\n+\t4k2k_fb = <1>;\n+};\n+\n+&i2c0 {\n+\tstatus = \"disabled\";\n+\t/delete-node/ gt9xx@5d;\n+\t/delete-node/ ftxx@38;\n+\t/delete-node/ touchscreen@5d;\n+\t/delete-node/ touchscreen@38;\n+};\n+\n+&i2c2 {\n+\tstatus = \"disabled\";\n+\t/delete-node/ sensor-i2c@6c;\n+};\n+\n+&i2c3 {\n+\t/delete-node/ ad82584f_62@62;\n+\t/delete-node/ tlv320adc3101_32@32;\n+\t/delete-node/ bl_extern_i2c;\n+\t/delete-node/ tas5707_36@36;\n+};\n+\n+&audiobus {\n+\taml_i2s2hdmi: i2s2hdmi {\n+\t\t#sound-dai-cells = <0>;\n+\t\tdai-tdm-lane-slot-mask-out = <1 1 1 1>;\n+\t\tdai-tdm-clk-sel = <2>;\n+\t\tclocks = <&clkaudio CLKID_AUDIO_MCLK_C\n+\t\t\t\t&clkc CLKID_MPLL2>;\n+\t\tclock-names = \"mclk\", \"clk_srcpll\";\n+\t\ti2s2hdmi = <1>;\n+\t\tstatus = \"okay\";\n+\t};\n+\n+\t/delete-node/ tdma;\n+\t/delete-node/ tdm@0;\n+\t/delete-node/ tdmc;\n+\t/delete-node/ tdm@2;\n+\t/delete-node/ tdm@3;\n+\t/delete-node/ pdm;\n+};\n+\n+&pinctrl_periphs {\n+\t/delete-node/ tdmout_a;\n+\t/delete-node/ tdmin_a;\n+\t/delete-node/ tdmc_mclk;\n+\t/delete-node/ tdmout_c;\n+\t/delete-node/ tdmin_c;\n+\t/delete-node/ spdifin;\n+\t/delete-node/ pdmin;\n+\t/delete-node/ bl_pwm_off_pin;\n+\t/delete-node/ clk12_24_z_pins;\n+\t/delete-node/ gen_clk_ee_z;\n+\t/delete-node/ cam_dvp_pins;\n+};\n+\n+&pinctrl_aobus {\n+\t/delete-node/ dvb_s_ts0_pins;\n+};\n+\n+&vdin0 {\n+\tstatus = \"disabled\";\n+};\n+\n+&vdin1 {\n+\tstatus = \"disabled\";\n+};\n+\n+/delete-node/ &nand;\n+\n+&pcie_A {\n+\tstatus = \"disabled\";\n+};\n+\n+&aocec {\n+\t/delete-property/ arc_port_mask;\n+};\n+\n+&sd_emmc_c {\n+\temmc {\n+\t\tcaps2 = \"MMC_CAP2_HS200\";\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/coreelec_g12_common.dtsi b/arch/arm/boot/dts/amlogic/coreelec_g12_common.dtsi\nnew file mode 100644\nindex 000000000000..133405c8e6c3\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/coreelec_g12_common.dtsi\n@@ -0,0 +1,48 @@\n+#include \"coreelec_common.dtsi\"\n+\n+/{\n+\tauge_sound {\n+\t\taml-audio-card,effect = <&audio_effect>;\n+\n+\t\taml-audio-card,dai-link@0 {\n+\t\t\tcontinuous-clock;\n+\t\t\tcpu {\n+\t\t\t\tsound-dai = <&aml_spdif_b>;\n+\t\t\t};\n+\t\t};\n+\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tbitclock-master = <&aml_tdmb>;\n+\t\t\tframe-master = <&aml_tdmb>;\n+\t\t\tcontinuous-clock;\n+\t\t\tcpu {\n+\t\t\t\tsound-dai = <&aml_tdmb>;\n+\t\t\t};\n+\t\t};\n+\n+\t\taml-audio-card,dai-link@2 {\n+\t\t\tcontinuous-clock;\n+\t\t\tcpu {\n+\t\t\t\tsound-dai = <&aml_spdif>;\n+\t\t\t};\n+\t\t};\n+\n+\t\taml-audio-card,dai-link@3 {\n+\t\t\tcontinuous-clock;\n+\t\t};\n+\t};\n+};\n+\n+&audiobus {\n+\taml_i2s2hdmi: i2s2hdmi {\n+\t\tcompatible = \"amlogic, g12a-snd-tdmc\";\n+\t};\n+\n+\taml_spdif: spdif {\n+\t\tpinctrl-0 = <&spdifout>;\n+\t};\n+\n+\taml_spdif_b: spdif_b {\n+\t\tstatus = \"okay\";\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/coreelec_g12b.dtsi b/arch/arm/boot/dts/amlogic/coreelec_g12b.dtsi\nnew file mode 100644\nindex 000000000000..af33b74fa693\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/coreelec_g12b.dtsi\n@@ -0,0 +1,64 @@\n+#include \"g12b_a311d_w400.dts\"\n+#include \"coreelec_g12_common.dtsi\"\n+\n+/{\n+\treserved-memory {\n+\t\tgalcore_reserved:linux,galcore {\n+\t\t\tsize = <0x1000000>;\n+\t\t\talignment = <0x400000>;\n+\t\t};\n+\t};\n+\n+\tcpu_opp_table0: cpu_opp_table0 {\n+\t\topp08 {\n+\t\t\topp-hz = /bits/ 64 <1800000000>;\n+\t\t\topp-microvolt = <1020000>;\n+\t\t};\n+\t};\n+\n+\tcpu_opp_table1: cpu_opp_table1 {\n+\t\topp08 {\n+\t\t\topp-hz = /bits/ 64 <1800000000>;\n+\t\t\topp-microvolt = <830000>;\n+\t\t};\n+\t\topp09 {\n+\t\t\topp-hz = /bits/ 64 <1908000000>;\n+\t\t\topp-microvolt = <860000>;\n+\t\t};\n+\t\topp10 {\n+\t\t\topp-hz = /bits/ 64 <2016000000>;\n+\t\t\topp-microvolt = <910000>;\n+\t\t};\n+\t\topp11 {\n+\t\t\topp-hz = /bits/ 64 <2100000000>;\n+\t\t\topp-microvolt = <960000>;\n+\t\t};\n+\t\topp12 {\n+\t\t\topp-hz = /bits/ 64 <2208000000>;\n+\t\t\topp-microvolt = <1030000>;\n+\t\t};\n+\t};\n+};\n+\n+&ethmac {\n+\tpinctrl-names = \"external_eth_pins\";\n+\tpinctrl-0 = <&external_eth_pins>;\n+\tinternal_phy = <0>;\n+\tauto_cali_idx = <0>;\n+\t/delete-property/ cali_val;\n+\t/delete-property/ mc_val;\n+};\n+\n+&pinctrl_periphs {\n+\ta_uart_pins:a_uart {\n+\t\tmux {\n+\t\t\tgroups = \"uart_tx_a\",\n+\t\t\t\t\"uart_rx_a\",\n+\t\t\t\t\"uart_cts_a\",\n+\t\t\t\t\"uart_rts_a\";\n+\t\t\tfunction = \"uart_a\";\n+\t\t};\n+\n+\t\t/delete-node/ mux1;\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/coreelec_g12b_a.dtsi b/arch/arm/boot/dts/amlogic/coreelec_g12b_a.dtsi\nnew file mode 100644\nindex 000000000000..838b40df7243\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/coreelec_g12b_a.dtsi\n@@ -0,0 +1,64 @@\n+#include \"g12b_a311d_w400_a.dts\"\n+#include \"coreelec_g12_common.dtsi\"\n+\n+/{\n+\treserved-memory {\n+\t\tdi_cma_reserved:linux,di_cma {\n+\t\t\tsize = <0x0>;\n+\t\t};\n+\n+\t\tcodec_mm_cma:linux,codec_mm_cma {\n+\t\t\tsize = <0x1b000000>;\n+\t\t};\n+\n+\t\tgalcore_reserved:linux,galcore {\n+\t\t\tsize = <0x1000000>;\n+\t\t\talignment = <0x400000>;\n+\t\t};\n+\t};\n+\n+\tcpu_opp_table0: cpu_opp_table0 {\n+\t\topp08 {\n+\t\t\topp-hz = /bits/ 64 <1800000000>;\n+\t\t\topp-microvolt = <981000>;\n+\t\t};\n+\t};\n+\n+\tmulti-di {\n+\t\tcompatible = \"amlogic, dim-g12b\";\n+\t\tstatus = \"okay\";\n+\t\t/* 0:use reserved; 1:use cma; 2:use cma as reserved */\n+\t\tflag_cma = <4>; //<1>\n+\t\t//memory-region = <&di_reserved>;\n+\t\tmemory-region = <&di_cma_reserved>;\n+\t\tinterrupts = <0 46 1\n+\t\t\t\t0 40 1>;\n+\t\tinterrupt-names = \"pre_irq\", \"post_irq\";\n+\t\tclocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,\n+\t\t\t<&clkc CLKID_VPU_CLKB_COMP>;\n+\t\tclock-names = \"vpu_clkb_tmp_composite\",\n+\t\t\t\"vpu_clkb_composite\";\n+\t\tclock-range = <334 667>;\n+\t\t/* buffer-size = <3621952>;(yuv422 8bit) */\n+\t\tbuffer-size = <4074560>;/*yuv422 fullpack*/\n+\t\t/* reserve-iomap = \"true\"; */\n+\t\t/* if enable nr10bit, set nr10bit-support to 1 */\n+\t\tpost-wr-support = <1>;\n+\t\tnr10bit-support = <1>;\n+\t\tnrds-enable = <1>;\n+\t\tpps-enable = <1>;\n+\t};\n+\n+\tdeinterlace {\n+\t\tstatus = \"disable\";\n+\t};\n+};\n+\n+&ethmac {\n+\tpinctrl-names = \"external_eth_pins\";\n+\tpinctrl-0 = <&external_eth_pins>;\n+\tinternal_phy = <0>;\n+\tauto_cali_idx = <0>;\n+\t/delete-property/ cali_val;\n+\t/delete-property/ mc_val;\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj.dts\nnew file mode 100644\nindex 000000000000..5186afc7baa7\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj.dts\n@@ -0,0 +1,119 @@\n+#include \"coreelec_g12b_a.dtsi\"\n+\n+/{\n+\tmodel = \"Minix U22-XJ\";\n+\tcoreelec-dt-id = \"g12b_s922x_minix_u22xj\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x0 0xf5000000>;\n+\t};\n+\n+\t/delete-node/ t9015;\n+\t/delete-node/ rtc;\n+\n+\tauge_sound {\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&rt5651>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\t/* Minix original gpio driver settings */\n+\tjw_io_init {\n+\t\tcompatible = \"amlogic, jw_io_control\";\n+\t\tdev_name = \"jw_io_control\";\n+\t\tstatus = \"okay\";\n+\t\thdmi_5v_gpio = <&gpio GPIOH_8 GPIO_ACTIVE_HIGH>;\n+\t\tusb_hub_reset = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;\n+\t\tethernet_reset = <&gpio GPIOZ_15 GPIO_ACTIVE_HIGH>;\n+\t\tethernet_int = <&gpio GPIOZ_14 GPIO_ACTIVE_HIGH>;\n+\t\totg_ctl_gpio = <&gpio GPIOC_7 GPIO_ACTIVE_HIGH>;\n+\t\tearphone_ctl_gpio = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;\n+\t};\n+\n+\tgpio-reset {\n+\t\tcompatible = \"linux,gpio-reset\";\n+\t\tusb_hub_reset {\n+\t\t\tgpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;\n+\t\t\tasserted-state = <0>;\n+\t\t\tduration-ms = <1000>;\n+\t\t};\n+\t};\n+};\n+\n+&pinctrl_periphs {\n+\texternal_eth_pins {\n+\t\tmux {\n+\t\t\tgroups = \"eth_mdio\",\n+\t\t\t\"eth_mdc\",\n+\t\t\t\"eth_rgmii_rx_clk\",\n+\t\t\t\"eth_rx_dv\",\n+\t\t\t\"eth_rxd0\",\n+\t\t\t\"eth_rxd1\",\n+\t\t\t\"eth_rxd2_rgmii\",\n+\t\t\t\"eth_rxd3_rgmii\",\n+\t\t\t\"eth_rgmii_tx_clk\",\n+\t\t\t\"eth_txen\",\n+\t\t\t\"eth_txd0\",\n+\t\t\t\"eth_txd1\",\n+\t\t\t\"eth_txd2_rgmii\",\n+\t\t\t\"eth_txd3_rgmii\";\n+\t\t};\n+\t};\n+};\n+\n+&i2c1 {\n+\tstatus = \"okay\";\n+\tpinctrl-names = \"default\";\n+\tpinctrl-0 = <&i2c1_master_pins3>;\n+\tclock-frequency = <100000>;\n+\n+\t/* Minix power control MCU */\n+\tjw_mcu: jw_mcu@15 {\n+\t\tcompatible = \"everest,jw_mcu\";\n+\t\treg = <0x15>;\n+\t\tmcu_watchdog_gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>;\n+\t\tstatus = \"okay\";\n+\t};\n+\n+\t/* Minix extra control MCU */\n+\tjw_mcu_isp: jw_mcu_isp@35 {\n+\t\tcompatible = \"everest,jw_mcu_isp\";\n+\t\treg = <0x35>;\n+\t\tstatus = \"okay\";\n+\t};\n+\n+\trtc_hym8563: rtc_hym8563@51 {\n+\t\tcompatible = \"haoyu,hym8563\";\n+\t\treg = <0x51>;\n+\t\tirq_gpio = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>;\n+\t};\n+};\n+\n+&i2c3 {\n+\trt5651: rt5651@1a {\n+\t\tcompatible = \"realtek,rt5651\";\n+\t\t#sound-dai-cells = <0>;\n+\t\treg = <0x1a>;\n+\t\tstatus = \"okay\";\n+\t\trealtek,dmic-en = \"false\";\n+\t\trealtek,in2-differential = \"false\";\n+\t};\n+};\n+\n+&sd_emmc_b {\n+\tsd {\n+\t\tvol_switch = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;\n+\t\tvol_switch_18 = <1>;\n+\t};\n+};\n+\n+&ethmac {\n+\tauto_cali_idx = <1>;\n+};\n+\n+&usb3_phy_v2 {\n+\tgpio-vbus-power = \"GPIOH_5\";\n+\tgpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max.dts\nnew file mode 100644\nindex 000000000000..43ceda52dafc\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max.dts\n@@ -0,0 +1,130 @@\n+#include \"coreelec_g12b.dtsi\"\n+\n+/{\n+\tmodel = \"Minix U22-XJ Max\";\n+\tcoreelec-dt-id = \"g12b_s922x_minix_u22xj_max\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x0 0xf5000000>;\n+\t};\n+\n+\t/delete-node/ t9015;\n+\t/delete-node/ rtc;\n+\n+\tauge_sound {\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&es8316>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\t/* Minix original gpio driver settings */\n+\tjw_io_init {\n+\t\tcompatible = \"amlogic, jw_io_control\";\n+\t\tdev_name = \"jw_io_control\";\n+\t\tstatus = \"okay\";\n+\t\thdmi_5v_gpio = <&gpio GPIOH_8 GPIO_ACTIVE_HIGH>;\n+\t\tusb_hub_reset = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;\n+\t\tethernet_reset = <&gpio GPIOZ_15 GPIO_ACTIVE_HIGH>;\n+\t\tethernet_int = <&gpio GPIOZ_14 GPIO_ACTIVE_HIGH>;\n+\t\totg_ctl_gpio = <&gpio GPIOC_7 GPIO_ACTIVE_HIGH>;\n+\t\tearphone_ctl_gpio = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;\n+\t};\n+\n+\tgpio-reset {\n+\t\tcompatible = \"linux,gpio-reset\";\n+\t\tusb_hub_reset {\n+\t\t\tgpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;\n+\t\t\tasserted-state = <0>;\n+\t\t\tduration-ms = <1000>;\n+\t\t};\n+\t};\n+};\n+\n+&pinctrl_periphs {\n+\texternal_eth_pins {\n+\t\tmux {\n+\t\t\tgroups = \"eth_mdio\",\n+\t\t\t\"eth_mdc\",\n+\t\t\t\"eth_rgmii_rx_clk\",\n+\t\t\t\"eth_rx_dv\",\n+\t\t\t\"eth_rxd0\",\n+\t\t\t\"eth_rxd1\",\n+\t\t\t\"eth_rxd2_rgmii\",\n+\t\t\t\"eth_rxd3_rgmii\",\n+\t\t\t\"eth_rgmii_tx_clk\",\n+\t\t\t\"eth_txen\",\n+\t\t\t\"eth_txd0\",\n+\t\t\t\"eth_txd1\",\n+\t\t\t\"eth_txd2_rgmii\",\n+\t\t\t\"eth_txd3_rgmii\";\n+\t\t};\n+\t};\n+};\n+\n+&i2c1 {\n+\tstatus = \"okay\";\n+\tpinctrl-names = \"default\";\n+\tpinctrl-0 = <&i2c1_master_pins3>;\n+\tclock-frequency = <100000>;\n+\n+\t/* Minix power control MCU */\n+\tjw_mcu: jw_mcu@15 {\n+\t\tcompatible = \"everest,jw_mcu\";\n+\t\treg = <0x15>;\n+\t\tmcu_watchdog_gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>;\n+\t\tstatus = \"okay\";\n+\t};\n+\n+\t/* Minix extra control MCU */\n+\tjw_mcu_isp: jw_mcu_isp@35 {\n+\t\tcompatible = \"everest,jw_mcu_isp\";\n+\t\treg = <0x35>;\n+\t\tstatus = \"okay\";\n+\t};\n+\n+\trtc_hym8563: rtc_hym8563@51 {\n+\t\tcompatible = \"haoyu,hym8563\";\n+\t\treg = <0x51>;\n+\t\tirq_gpio = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>;\n+\t};\n+};\n+\n+&i2c3 {\n+\tes8316: es8316@10 {\n+\t\tcompatible = \"everest,es8316\";\n+\t\t#sound-dai-cells = <0>;\n+\t\treg = <0x10>;\n+\t\tstatus = \"okay\";\n+\t};\n+};\n+\n+&sd_emmc_b {\n+\tsd {\n+\t\tjtag_pin = <&gpio GPIOC_0 GPIO_ACTIVE_HIGH>;\n+\t\tvol_switch = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;\n+\t\tvol_switch_18 = <1>;\n+\t};\n+};\n+\n+&pinctrl_periphs {\n+\ta_uart_pins:a_uart {\n+\t\tmux {\n+\t\t\tgroups = \"uart_tx_a\",\n+\t\t\t\t\"uart_rx_a\",\n+\t\t\t\t\"uart_cts_a\",\n+\t\t\t\t\"uart_rts_a\";\n+\t\t};\n+\t\t/delete-node/ mux1;\n+\t};\n+};\n+\n+&ethmac {\n+\tauto_cali_idx = <1>;\n+};\n+\n+&usb3_phy_v2 {\n+\tgpio-vbus-power = \"GPIOH_5\";\n+\tgpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max_rev_a.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max_rev_a.dts\nnew file mode 100644\nindex 000000000000..ead93fb7c127\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_minix_u22xj_max_rev_a.dts\n@@ -0,0 +1,25 @@\n+#include \"g12b_s922x_minix_u22xj.dts\"\n+\n+/{\n+\tmodel = \"Minix U22-XJ Max\";\n+\tcoreelec-dt-id = \"g12b_s922x_minix_u22xj_max_rev_a\";\n+\n+\tauge_sound {\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&es8316>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&i2c3 {\n+\t/delete-node/ rt5651@1a;\n+\n+\tes8316: es8316@10 {\n+\t\tcompatible = \"everest,es8316\";\n+\t\t#sound-dai-cells = <0>;\n+\t\treg = <0x10>;\n+\t\tstatus = \"okay\";\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_2g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_2g.dts\nnew file mode 100644\nindex 000000000000..06a21adb3309\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_2g.dts\n@@ -0,0 +1,101 @@\n+#include \"coreelec_g12b.dtsi\"\n+\n+/{\n+\tmodel = \"UGOOS AM6\";\n+\tcoreelec-dt-id = \"g12b_s922x_ugoos_am6\";\n+\tamlogic-dt-id = \"g12b_AM6_b2g\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x000000 0x80000000>;\n+\t};\n+\n+\tauge_sound {\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&rt5651>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\tgpioleds {\n+\t\tgreen_led {\n+\t\t\tlabel = \"green_led\";\n+\t\t\tgpios = <&gpio GPIOC_7 GPIO_ACTIVE_HIGH>;\n+\t\t\tlinux,default-trigger = \"default-on\";\n+\t\t};\n+\t};\n+\n+\twifi{\n+\t\tpower_on_pin = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;\n+\t};\n+\n+\tgpio_keypad {\n+\t\tkey-gpios = <&gpio_ao  GPIOAO_6  GPIO_ACTIVE_HIGH>;\n+\t};\n+};\n+\n+&usb2_phy_v2 {\n+\tgpio-vbus-power = \"GPIOA_8\";\n+\tgpios = <&gpio GPIOA_8 GPIO_ACTIVE_HIGH>;\n+};\n+\n+&usb3_phy_v2 {\n+\totg = <1>;\n+\tdefault-host; // or default-otg, or nothing for auto\n+\tgpio-vbus-power = \"GPIOAO_7\";\n+\tgpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;\n+};\n+\n+&i2c3 {\n+\trt5651: rt5651@1a {\n+\t\tcompatible = \"realtek,rt5651\";\n+\t\t#sound-dai-cells = <0>;\n+\t\treg = <0x1a>;\n+\t\tstatus = \"okay\";\n+\t\trealtek,dmic-en = \"false\";\n+\t\trealtek,in2-differential = \"false\";\n+\t};\n+\n+\thym8563: hym8563@51 {\n+\t\tcompatible = \"haoyu,hym8563\";\n+\t\treg = <0x51>;\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tclock-output-names = \"xin32k\";\n+\t};\n+};\n+\n+&audiobus {\n+\taml_tdmc: tdmc {\n+\t\tpinctrl-0 = </*&tdmc_mclk &tdmout_c &tdmin_c*/>;\n+\t};\n+\n+\ttdm@3 {\n+\t\tstatus = \"disabled\";\n+\t};\n+}; /* end of audiobus */\n+\n+&pinctrl_aobus {\n+\t/delete-node/ spdifout;\n+\t/delete-node/ spdifout_a_mute;\n+};\n+\n+&pinctrl_periphs {\n+\t/delete-node/ tdmc_mclk;\n+\t/delete-node/ tdmout_c;\n+\t/delete-node/ tdmin_c;\n+\n+\tspdifout: spdifout {\n+\t\tmux { /* GPIOA_11 */\n+\t\t\tgroups = \"spdif_out_a11\";\n+\t\t\tfunction = \"spdif_out\";\n+\t\t};\n+\t};\n+\n+\tspdifout_a_mute: spdifout_a_mute {\n+\t\tmux { /* GPIOA_11 */\n+\t\t\tgroups = \"GPIOA_11\";\n+\t\t\tfunction = \"gpio_periphs\";\n+\t\t};\n+\t};\n+}; /* end of pinctrl_periphs */\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_4g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_4g.dts\nnew file mode 100644\nindex 000000000000..a0004d876792\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_4g.dts\n@@ -0,0 +1,9 @@\n+#include \"g12b_s922x_ugoos_am6_2g.dts\"\n+\n+/{\n+\tamlogic-dt-id = \"g12b_AM6_b4g\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x000000 0xF5000000>;\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_2g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_2g.dts\nnew file mode 100644\nindex 000000000000..5aa71fc3db78\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_2g.dts\n@@ -0,0 +1,101 @@\n+#include \"coreelec_g12b_a.dtsi\"\n+\n+/{\n+\tmodel = \"UGOOS AM6\";\n+\tcoreelec-dt-id = \"g12b_s922x_ugoos_am6_rev_a\";\n+\tamlogic-dt-id = \"g12b_AM6_a2g\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x000000 0x80000000>;\n+\t};\n+\n+\tauge_sound {\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&rt5651>;\n+\t\t\t};\n+\t\t};\n+\t};\n+\n+\tgpioleds {\n+\t\tgreen_led {\n+\t\t\tlabel = \"green_led\";\n+\t\t\tgpios = <&gpio GPIOC_7 GPIO_ACTIVE_HIGH>;\n+\t\t\tlinux,default-trigger = \"default-on\";\n+\t\t};\n+\t};\n+\n+\twifi{\n+\t\tpower_on_pin = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;\n+\t};\n+\n+\tgpio_keypad {\n+\t\tkey-gpios = <&gpio_ao  GPIOAO_6  GPIO_ACTIVE_HIGH>;\n+\t};\n+};\n+\n+&usb2_phy_v2 {\n+\tgpio-vbus-power = \"GPIOA_8\";\n+\tgpios = <&gpio GPIOA_8 GPIO_ACTIVE_HIGH>;\n+};\n+\n+&usb3_phy_v2 {\n+\totg = <1>;\n+\tdefault-host; // or default-otg, or nothing for auto\n+\tgpio-vbus-power = \"GPIOAO_7\";\n+\tgpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;\n+};\n+\n+&i2c3 {\n+\trt5651: rt5651@1a {\n+\t\tcompatible = \"realtek,rt5651\";\n+\t\t#sound-dai-cells = <0>;\n+\t\treg = <0x1a>;\n+\t\tstatus = \"okay\";\n+\t\trealtek,dmic-en = \"false\";\n+\t\trealtek,in2-differential = \"false\";\n+\t};\n+\n+\thym8563: hym8563@51 {\n+\t\tcompatible = \"haoyu,hym8563\";\n+\t\treg = <0x51>;\n+\t\t#clock-cells = <0>;\n+\t\tclock-frequency = <32768>;\n+\t\tclock-output-names = \"xin32k\";\n+\t};\n+};\n+\n+&audiobus {\n+\taml_tdmc: tdmc {\n+\t\tpinctrl-0 = </*&tdmc_mclk &tdmout_c &tdmin_c*/>;\n+\t};\n+\n+\ttdm@3 {\n+\t\tstatus = \"disabled\";\n+\t};\n+}; /* end of audiobus */\n+\n+&pinctrl_aobus {\n+\t/delete-node/ spdifout;\n+\t/delete-node/ spdifout_a_mute;\n+};\n+\n+&pinctrl_periphs {\n+\t/delete-node/ tdmc_mclk;\n+\t/delete-node/ tdmout_c;\n+\t/delete-node/ tdmin_c;\n+\n+\tspdifout: spdifout {\n+\t\tmux { /* GPIOA_11 */\n+\t\t\tgroups = \"spdif_out_a11\";\n+\t\t\tfunction = \"spdif_out\";\n+\t\t};\n+\t};\n+\n+\tspdifout_a_mute: spdifout_a_mute {\n+\t\tmux { /* GPIOA_11 */\n+\t\t\tgroups = \"GPIOA_11\";\n+\t\t\tfunction = \"gpio_periphs\";\n+\t\t};\n+\t};\n+}; /* end of pinctrl_periphs */\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_4g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_4g.dts\nnew file mode 100644\nindex 000000000000..f1f1eacef83a\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6_rev_a_4g.dts\n@@ -0,0 +1,9 @@\n+#include \"g12b_s922x_ugoos_am6_rev_a_2g.dts\"\n+\n+/{\n+\tamlogic-dt-id = \"g12b_AM6_a4g\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x000000 0xF5000000>;\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_2g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_2g.dts\nnew file mode 100644\nindex 000000000000..a293658b53b3\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_2g.dts\n@@ -0,0 +1,29 @@\n+#include \"g12b_s922x_ugoos_am6_2g.dts\"\n+\n+/{\n+\tmodel = \"UGOOS AM6B\";\n+\tcoreelec-dt-id = \"g12b_s922x_ugoos_am6b\";\n+\tamlogic-dt-id = \"g12b_AM6b_b2g\";\n+\n+\tauge_sound {\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&es8388>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&i2c3 {\n+\t/delete-node/ rt5651@1a;\n+\n+\tes8388: es8388@10 {\n+\t\tstatus = \"okay\";\n+\t\tcompatible = \"everest,es8388\";\n+\t\t#sound-dai-cells = <0>;\n+\t\treg = <0x10>;\n+\t\tdef-vol = <0x1d>;\n+\t\tdef-dacvol = <0x0a>;\n+\t\taux-det-gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_4g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_4g.dts\nnew file mode 100644\nindex 000000000000..adb06b6cf89a\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_4g.dts\n@@ -0,0 +1,9 @@\n+#include \"g12b_s922x_ugoos_am6b_2g.dts\"\n+\n+/{\n+\tamlogic-dt-id = \"g12b_AM6b_b4g\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x000000 0xF5000000>;\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_2g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_2g.dts\nnew file mode 100644\nindex 000000000000..fe5937c28760\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_2g.dts\n@@ -0,0 +1,29 @@\n+#include \"g12b_s922x_ugoos_am6_rev_a_2g.dts\"\n+\n+/{\n+\tmodel = \"UGOOS AM6B\";\n+\tcoreelec-dt-id = \"g12b_s922x_ugoos_am6b_rev_a\";\n+\tamlogic-dt-id = \"g12b_AM6b_a2g\";\n+\n+\tauge_sound {\n+\t\taml-audio-card,dai-link@1 {\n+\t\t\tcodec {\n+\t\t\t\tsound-dai = <&es8388>;\n+\t\t\t};\n+\t\t};\n+\t};\n+};\n+\n+&i2c3 {\n+\t/delete-node/ rt5651@1a;\n+\n+\tes8388: es8388@10 {\n+\t\tstatus = \"okay\";\n+\t\tcompatible = \"everest,es8388\";\n+\t\t#sound-dai-cells = <0>;\n+\t\treg = <0x10>;\n+\t\tdef-vol = <0x1d>;\n+\t\tdef-dacvol = <0x0a>;\n+\t\taux-det-gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;\n+\t};\n+};\ndiff --git a/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_4g.dts b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_4g.dts\nnew file mode 100644\nindex 000000000000..44d09b2e89d4\n--- /dev/null\n+++ b/arch/arm/boot/dts/amlogic/g12b_s922x_ugoos_am6b_rev_a_4g.dts\n@@ -0,0 +1,9 @@\n+#include \"g12b_s922x_ugoos_am6b_rev_a_2g.dts\"\n+\n+/{\n+\tamlogic-dt-id = \"g12b_AM6b_a4g\";\n+\n+\tmemory@00000000 {\n+\t\tlinux,usable-memory = <0x000000 0xF5000000>;\n+\t};\n+};\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0005-arm-error-static-declaration-of-machine_name-follows.patch",
    "content": "From 7cf9c6d4875104988e7cf7734125c0d152c16c08 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Wed, 10 May 2023 21:10:44 +0200\nSubject: [PATCH 05/18] arm: error: static declaration of 'machine_name'\n follows non-static declaration\n\n---\n arch/arm/kernel/setup.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c\nindex db1fe8cda3d2..570393723cbf 100644\n--- a/arch/arm/kernel/setup.c\n+++ b/arch/arm/kernel/setup.c\n@@ -165,7 +165,7 @@ char elf_platform[ELF_PLATFORM_SIZE];\n EXPORT_SYMBOL(elf_platform);\n \n static const char *cpu_name;\n-static const char *machine_name;\n+const char *machine_name;\n static char __initdata cmd_line[COMMAND_LINE_SIZE];\n const struct machine_desc *machine_desc __initdata;\n \n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0006-arm-config-item-AMLOGIC_DVB_COMPAT-is-needed-for-com.patch",
    "content": "From a5c9df98141bf2c4181e4eca69c22cde1deaaf6b Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 11 May 2023 15:53:08 +0200\nSubject: [PATCH 06/18] arm: config item AMLOGIC_DVB_COMPAT is needed for\n compile\n\n---\n drivers/amlogic/dvb/Kconfig | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/drivers/amlogic/dvb/Kconfig b/drivers/amlogic/dvb/Kconfig\nindex 9214af6708bc..f5eeb5da09d1 100644\n--- a/drivers/amlogic/dvb/Kconfig\n+++ b/drivers/amlogic/dvb/Kconfig\n@@ -30,7 +30,6 @@ endmenu\n menu \"DVB COMPAT support\"\n config AMLOGIC_DVB_COMPAT\n        bool \"Amlogic DVB drivers\"\n-       depends on COMPAT\n        help\n                select it to support amlogic dvb driver\n endmenu\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0007-vfm-change-vfm-path-to-match-CE-for-DV.patch",
    "content": "From 4a39e55285b046b7858061626b2e085de96050d7 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Wed, 29 Mar 2023 16:40:49 +0200\nSubject: [PATCH 07/18] vfm: change vfm path to match CE for DV use\n FRAME_BASE_PATH_AMLVIDEO_AMVIDEO path\n\n---\n drivers/amlogic/media/common/vfm/vfm.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/amlogic/media/common/vfm/vfm.c b/drivers/amlogic/media/common/vfm/vfm.c\nindex 4c4e81143732..a4661005bdf1 100644\n--- a/drivers/amlogic/media/common/vfm/vfm.c\n+++ b/drivers/amlogic/media/common/vfm/vfm.c\n@@ -402,7 +402,7 @@ static void vfm_init(void)\n #ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION\n \tchar def_dvbl_id[VFM_NAME_LEN] = \"dvblpath\";\n /*\tchar def_dvbl_chain[] = \"dvbldec dvbl amvideo\";*/\n-\tchar def_dvbl_chain[] = \"dvbldec amvideo\";\n+\tchar def_dvbl_chain[] = \"dvbldec amlvideo ppmgr deinterlace amvideo\";\n \n \tchar def_dvel_id[VFM_NAME_LEN] = \"dvelpath\";\n \tchar def_dvel_chain[] = \"dveldec dvel\";\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0008-auto-cs-do-not-force-vuy420-on-4k-50-60Hz-when-sourc.patch",
    "content": "From 2fc70ce7b25427b1208f8e2b045be4363df846ea Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 31 Mar 2023 09:30:05 +0200\nSubject: [PATCH 08/18] auto cs: do not force vuy420 on 4k/50/60Hz when source\n is Dolby Vision\n\n---\n .../vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c     | 27 ++++++++++++-------\n 1 file changed, 18 insertions(+), 9 deletions(-)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\nindex d97b4c2ab736..c1b843ccd08b 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n@@ -5502,19 +5502,28 @@ static enum vmode_e hdmitx_validate_vmode(char *mode, unsigned int frac)\n \n \t// force 4k50/60Hz to 420 unless manually set\n \tif (strstr(hdev->fmt_attr, \"rgb\") == NULL &&\n+\t    strstr(hdev->fmt_attr, \"420\") == NULL &&\n \t    strstr(hdev->fmt_attr, \"422\") == NULL &&\n \t    strstr(hdev->fmt_attr, \"444\") == NULL) {\n-\t\tswitch (hdmitx_edid_vic_tab_map_vic(mode)) {\n-\t\t\tcase HDMI_3840x2160p50_16x9:\n-\t\t\tcase HDMI_3840x2160p60_16x9:\n-\t\t\tcase HDMI_4096x2160p50_256x135:\n-\t\t\tcase HDMI_4096x2160p60_256x135:\n-\t\t\tcase HDMI_3840x2160p50_64x27:\n-\t\t\tcase HDMI_3840x2160p60_64x27:\n-\t\t\t\tif (!strstr(mode, \"420\"))\n-\t\t\t\t\tstrncat(mode, \"420\", 3);\n+\t\tswitch (hdev->hdmi_current_eotf_type) {\n+\t\t\tcase EOTF_T_DOLBYVISION:\n+\t\t\tcase EOTF_T_LL_MODE:\n+\t\t\tcase EOTF_T_DV_AHEAD:\n \t\t\t\tbreak;\n \t\t\tdefault:\n+\t\t\t\tswitch (hdmitx_edid_vic_tab_map_vic(mode)) {\n+\t\t\t\t\tcase HDMI_3840x2160p50_16x9:\n+\t\t\t\t\tcase HDMI_3840x2160p60_16x9:\n+\t\t\t\t\tcase HDMI_4096x2160p50_256x135:\n+\t\t\t\t\tcase HDMI_4096x2160p60_256x135:\n+\t\t\t\t\tcase HDMI_3840x2160p50_64x27:\n+\t\t\t\t\tcase HDMI_3840x2160p60_64x27:\n+\t\t\t\t\t\tif (!strstr(mode, \"420\"))\n+\t\t\t\t\t\t\tstrncat(mode, \"420\", 3);\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t\tdefault:\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t}\n \t\t\t\tbreak;\n \t\t}\n \t}\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0009-dolby_vision-adjust-DV-policy.patch",
    "content": "From 01e054d1db36bc47bac9f45c1c770cac1e6412da Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Wed, 12 Apr 2023 15:38:53 +0200\nSubject: [PATCH 09/18] dolby_vision: adjust DV policy\n\n---\n .../amlogic/media/enhancement/amdolby_vision/amdolby_vision.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\nindex c59aa708b0c7..dc4d2bd2c2e9 100644\n--- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n+++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n@@ -123,7 +123,7 @@ MODULE_PARM_DESC(primary_debug, \"\\n primary_debug\\n\");\n /*\t\telse bypass Dolby Vision */\n /* #define DOLBY_VISION_FORCE_OUTPUT_MODE\t2 */\n \n-static unsigned int dolby_vision_policy = 1;\n+static unsigned int dolby_vision_policy = DOLBY_VISION_FOLLOW_SOURCE;\n module_param(dolby_vision_policy, uint, 0664);\n MODULE_PARM_DESC(dolby_vision_policy, \"\\n dolby_vision_policy\\n\");\n static unsigned int last_dolby_vision_policy;\n@@ -147,7 +147,7 @@ static unsigned int last_dolby_vision_policy;\n #define SDR_BY_DV_F_SINK 0x20\n #define SDR_BY_DV_F_SRC 0x40\n \n-static unsigned int dolby_vision_hdr10_policy;\n+static unsigned int dolby_vision_hdr10_policy = (HDR_BY_DV_F_SRC | HLG_BY_DV_F_SRC | SDR_BY_DV_F_SRC);\n module_param(dolby_vision_hdr10_policy, uint, 0664);\n MODULE_PARM_DESC(dolby_vision_hdr10_policy, \"\\n dolby_vision_hdr10_policy\\n\");\n static unsigned int last_dolby_vision_hdr10_policy;\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0010-dolby_vision-provide-ATTR-ko_info.patch",
    "content": "From 917ccf3a49f38dd6db6de142972d6730d4b0d40e Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 4 Apr 2023 11:52:13 +0200\nSubject: [PATCH 10/18] dolby_vision: provide ATTR 'ko_info'\n\n---\n .../enhancement/amdolby_vision/amdolby_vision.c      | 12 ++++++++++++\n 1 file changed, 12 insertions(+)\n\ndiff --git a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\nindex dc4d2bd2c2e9..f19c9cf2b98a 100644\n--- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n+++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n@@ -12465,6 +12465,16 @@ static const struct file_operations amdolby_vision_fops = {\n \t.poll = amdolby_vision_poll,\n };\n \n+static ssize_t amdolby_vision_ko_info_show\n+\t\t(struct class *cla,\n+\t\t struct class_attribute *attr, char *buf)\n+{\n+\tif (ko_info)\n+\t\treturn sprintf(buf, \"%s\", ko_info);\n+\telse\n+\t\treturn 0;\n+}\n+\n static const char *amdolby_vision_debug_usage_str = {\n \t\"Usage:\\n\"\n \t\"echo dolby_crc 0/1 > /sys/class/amdolby_vision/debug; dolby_crc insert or clr\\n\"\n@@ -13230,6 +13240,8 @@ static ssize_t  amdolby_vision_crc_show(struct class *cla,\n }\n \n static struct class_attribute amdolby_vision_class_attrs[] = {\n+\t__ATTR(ko_info, 0444,\n+\tamdolby_vision_ko_info_show, NULL),\n \t__ATTR(debug, 0644,\n \tamdolby_vision_debug_show, amdolby_vision_debug_store),\n \t__ATTR(dv_mode, 0644,\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0011-hdmitx-force-correct-colour-sampling-on-Dolby-Vision.patch",
    "content": "From ffabebaefea3f14771aba270cd0fcd7ff0cd475a Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 14 Apr 2023 08:39:30 +0200\nSubject: [PATCH 11/18] hdmitx: force correct colour sampling on Dolby Vision\n 'fmt_attr' is not set in auto mode. It does require to force correct colour\n sampling and colour depth with Dolby Vision, supported by the used display.\n\n---\n .../vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c     | 143 ++++++++++++++----\n 1 file changed, 113 insertions(+), 30 deletions(-)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\nindex c1b843ccd08b..b8a18129638f 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n@@ -609,6 +609,7 @@ static int set_disp_mode_auto(void)\n \tunsigned char mode[32];\n \tenum hdmi_vic vic = HDMI_Unknown;\n \tint colour_depths[] = { 8, 10, 12, 16 };\n+\tchar* colour_sampling[] = {\"RGB\",\"YUV422\",\"YUV444\",\"YUV420\"};\n \n \tmemset(mode, 0, sizeof(mode));\n \thdev->ready = 0;\n@@ -674,46 +675,128 @@ static int set_disp_mode_auto(void)\n \thdev->para = para;\n \tvic = hdmitx_edid_get_VIC(hdev, mode, 1);\n \n-\tif (strstr(hdev->fmt_attr,\"bit\") != NULL) {\n-\t\tpr_info(\"hdmitx: display colourdepth forced by attr to %d bits (VIC: %d)\\n\", colour_depths[para->cd - COLORDEPTH_24B], vic);\n-\t} else {\n-\t\t// parse and set maximum colourdepth given by edid\n-\t\tif (hdev->rxcap.ColorDeepSupport & 0x78 && hdev->para->cs != COLORSPACE_YUV420) {\n-\t\t\tenum hdmi_color_depth cd;\n-\t\t\tfor (cd = COLORDEPTH_36B; cd >= COLORDEPTH_24B; cd--) {\n-\t\t\t\tif (hdev->rxcap.ColorDeepSupport & (1 << (cd - 1))) {\n-\t\t\t\t\tpara->cd = cd;\n-\t\t\t\t\tbreak;\n+\t// auto detect colour sampling\n+\tif (strstr(hdev->fmt_attr, \"rgb\") == NULL &&\n+\t    strstr(hdev->fmt_attr, \"420\") == NULL &&\n+\t    strstr(hdev->fmt_attr, \"422\") == NULL &&\n+\t    strstr(hdev->fmt_attr, \"444\") == NULL) {\n+\t\t// force colour subsampling when DV mode\n+\t\tswitch (hdev->hdmi_current_eotf_type) {\n+\t\t\tcase EOTF_T_DOLBYVISION:\n+\t\t\tcase EOTF_T_LL_MODE:\n+\t\t\tcase EOTF_T_DV_AHEAD:\n+\t\t\t\t{\n+\t\t\t\t\tint cs = para->cs;\n+\t\t\t\t\tswitch (hdev->hdmi_current_tunnel_mode) {\n+\t\t\t\t\t\tcase RGB_8BIT:\n+\t\t\t\t\t\tcase RGB_10_12BIT:\n+\t\t\t\t\t\t\tpara->cs = COLORSPACE_RGB444;\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\tcase YUV422_BIT12:\n+\t\t\t\t\t\t\tpara->cs = COLORSPACE_YUV422;\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\tcase YUV444_10_12BIT:\n+\t\t\t\t\t\t\tpara->cs = COLORSPACE_YUV444;\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\tdefault:\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t}\n+\t\t\t\t\tif (cs != para->cs)\n+\t\t\t\t\t\tpr_info(\"hdmitx: display colour subsampling is forced to %s by Dolby Vision tunneling\\n\",\n+\t\t\t\t\t\t\tcolour_sampling[para->cs]);\n \t\t\t\t}\n-\t\t\t}\n-\t\t} else if (hdev->rxcap.hf_ieeeoui == HF_IEEEOUI) {\n-\t\t\tif (hdev->rxcap.dc_36bit_420)\n-\t\t\t\tpara->cd = COLORDEPTH_36B;\n-\t\t\telse if (hdev->rxcap.dc_30bit_420)\n-\t\t\t\tpara->cd = COLORDEPTH_30B;\n-\t\t\telse\n-\t\t\t\tpara->cd = COLORDEPTH_24B;\n+\t\t\t\tbreak;\n+\t\t\tdefault:\n+\t\t\t\tbreak;\n \t\t}\n+\t\tpr_info(\"hdmitx: display colour subsampling is auto set to %s (VIC: %d)\\n\",\n+\t\t\tcolour_sampling[para->cs], vic);\n+\t}\n \n+\t// auto detect colourdepth\n+\tif (strstr(hdev->fmt_attr,\"bit\") != NULL) {\n+\t\tpr_info(\"hdmitx: display colourdepth is forced by attr to %d bits (VIC: %d)\\n\",\n+\t\t\tcolour_depths[para->cd - COLORDEPTH_24B], vic);\n+\t} else {\n+\t\t// parse and set maximum colourdepth given by edid\n \t\t// check for colour subsampling limit\n-\t\tswitch (vic & 0xff) {\n-\t\t\tcase HDMI_3840x2160p50_16x9:\n-\t\t\tcase HDMI_3840x2160p60_16x9:\n-\t\t\tcase HDMI_4096x2160p50_256x135:\n-\t\t\tcase HDMI_4096x2160p60_256x135:\n-\t\t\tcase HDMI_3840x2160p50_64x27:\n-\t\t\tcase HDMI_3840x2160p60_64x27:\n-\t\t\t\tif (para->cs == COLORSPACE_RGB444 || para->cs == COLORSPACE_YUV444)\n+\t\tswitch (hdev->hdmi_current_eotf_type) {\n+\t\t\tcase EOTF_T_DOLBYVISION:\n+\t\t\tcase EOTF_T_LL_MODE:\n+\t\t\tcase EOTF_T_DV_AHEAD:\n \t\t\t\t{\n-\t\t\t\t\tpara->cd = COLORDEPTH_24B;\n-\t\t\t\t\tpr_info(\"hdmitx: forced colourdepth to %d bits because of current video information code\\n\", colour_depths[para->cd - COLORDEPTH_24B]);\n+\t\t\t\t\tconst struct dv_info *dv_info = &hdev->rxcap.dv_info;\n+\t\t\t\t\tint cd = para->cd;\n+\t\t\t\t\tswitch (hdev->hdmi_current_tunnel_mode) {\n+\t\t\t\t\t\tcase RGB_8BIT:\n+\t\t\t\t\t\t\t\tpara->cd = COLORDEPTH_24B;\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\tcase RGB_10_12BIT:\n+\t\t\t\t\t\tcase YUV444_10_12BIT:\n+\t\t\t\t\t\t\tif (dv_info->ver == 2) {\n+\t\t\t\t\t\t\t\tswitch (dv_info->sup_10b_12b_444) {\n+\t\t\t\t\t\t\t\t\tcase 1:\n+\t\t\t\t\t\t\t\t\t\tpara->cd = COLORDEPTH_30B;\n+\t\t\t\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\t\t\t\tcase 2:\n+\t\t\t\t\t\t\t\t\t\tpara->cd = COLORDEPTH_36B;\n+\t\t\t\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\t\t\t\tdefault:\n+\t\t\t\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\tcase YUV422_BIT12:\n+\t\t\t\t\t\t\tpara->cd = COLORDEPTH_36B;\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\tdefault:\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t}\n+\n+\t\t\t\t\tif (cd != para->cd)\n+\t\t\t\t\t\tpr_info(\"hdmitx: display colourdepth is forced to %d bits because of Dolby Vision sink capability\\n\",\n+\t\t\t\t\t\t\tcolour_depths[para->cd - COLORDEPTH_24B]);\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tdefault:\n+\t\t\t\tif (hdev->rxcap.ColorDeepSupport & 0x78 && hdev->para->cs != COLORSPACE_YUV420) {\n+\t\t\t\t\tenum hdmi_color_depth cd;\n+\t\t\t\t\tfor (cd = COLORDEPTH_36B; cd >= COLORDEPTH_24B; cd--) {\n+\t\t\t\t\t\tif (hdev->rxcap.ColorDeepSupport & (1 << (cd - 1))) {\n+\t\t\t\t\t\t\tpara->cd = cd;\n+\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\t}\n+\t\t\t\t\t}\n+\t\t\t\t} else if (hdev->rxcap.hf_ieeeoui == HF_IEEEOUI) {\n+\t\t\t\t\tif (hdev->rxcap.dc_36bit_420)\n+\t\t\t\t\t\tpara->cd = COLORDEPTH_36B;\n+\t\t\t\t\telse if (hdev->rxcap.dc_30bit_420)\n+\t\t\t\t\t\tpara->cd = COLORDEPTH_30B;\n+\t\t\t\t\telse\n+\t\t\t\t\t\tpara->cd = COLORDEPTH_24B;\n+\t\t\t\t}\n+\n+\t\t\t\tswitch (vic & 0xff) {\n+\t\t\t\t\tcase HDMI_3840x2160p50_16x9:\n+\t\t\t\t\tcase HDMI_3840x2160p60_16x9:\n+\t\t\t\t\tcase HDMI_4096x2160p50_256x135:\n+\t\t\t\t\tcase HDMI_4096x2160p60_256x135:\n+\t\t\t\t\tcase HDMI_3840x2160p50_64x27:\n+\t\t\t\t\tcase HDMI_3840x2160p60_64x27:\n+\t\t\t\t\t\tif (para->cs == COLORSPACE_RGB444 || para->cs == COLORSPACE_YUV444)\n+\t\t\t\t\t\t{\n+\t\t\t\t\t\t\tpara->cd = COLORDEPTH_24B;\n+\t\t\t\t\t\t\tpr_info(\"hdmitx: display colourdepth is forced to %d bits because of current video information code\\n\",\n+\t\t\t\t\t\t\t\tcolour_depths[para->cd - COLORDEPTH_24B]);\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t\tdefault:\n+\t\t\t\t\t\tbreak;\n \t\t\t\tbreak;\n+\t\t\t}\n \t\t}\n-\n-\t\tpr_info(\"hdmitx: display colourdepth is auto set to %d bits (VIC: %d)\\n\", colour_depths[para->cd - COLORDEPTH_24B], vic);\n+\t\tpr_info(\"hdmitx: display colourdepth is auto set to %d bits (VIC: %d)\\n\",\n+\t\t\tcolour_depths[para->cd - COLORDEPTH_24B], vic);\n \t}\n \n \tif (strncmp(info->name, \"2160p30hz\", strlen(\"2160p30hz\")) == 0) {\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0012-hdmitx-fix-display-of-current-hdmi-config-with-colou.patch",
    "content": "From 9a8e71e3e66503f1cc8d3143afe1a8db7a3b0fcc Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 14 Apr 2023 09:54:08 +0200\nSubject: [PATCH 12/18] hdmitx: fix display of current hdmi config with colour\n space 422\n\n---\n drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\nindex b8a18129638f..f7d5612727da 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n@@ -2580,7 +2580,7 @@ static ssize_t show_config(struct device *dev,\n \t\tpara = hdev->para;\n \n \t\t// YUV422\n-\t\tif (cs == 1)\n+\t\tif (cs == COLORSPACE_YUV422)\n \t\t\tcd = (~cd & 0x3);\n \n \t\tpos += snprintf(buf+pos, PAGE_SIZE, \"VIC: %d %s\\n\",\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0013-hdmitx-force-YUV444-on-Dolby-Vision-RGB-on-modes-wit.patch",
    "content": "From 40c1254a2601d4e39656285f5180429e6bb4572a Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 18 Apr 2023 21:56:59 +0200\nSubject: [PATCH 13/18] hdmitx: force YUV444 on Dolby Vision RGB on modes witch\n Otherwise the TV remain black. Reason need to be identified.\n\n---\n drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\nindex f7d5612727da..a0e1b9050182 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n@@ -690,7 +690,7 @@ static int set_disp_mode_auto(void)\n \t\t\t\t\tswitch (hdev->hdmi_current_tunnel_mode) {\n \t\t\t\t\t\tcase RGB_8BIT:\n \t\t\t\t\t\tcase RGB_10_12BIT:\n-\t\t\t\t\t\t\tpara->cs = COLORSPACE_RGB444;\n+\t\t\t\t\t\t\tpara->cs = COLORSPACE_YUV444;\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\tcase YUV422_BIT12:\n \t\t\t\t\t\t\tpara->cs = COLORSPACE_YUV422;\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0014-hdmitx-provide-colour-subsampling-and-colour-depth-b.patch",
    "content": "From 425141ac7e62cd3c45c1b4a98e22f8d963324b8b Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 20 Apr 2023 20:46:18 +0200\nSubject: [PATCH 14/18] hdmitx: provide colour subsampling and colour depth by\n sysfs These are used by Kodi to be able to detect if a forced mode switch is\n needed.\n\n---\n .../vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c     | 35 +++++++++++++++++++\n 1 file changed, 35 insertions(+)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\nindex a0e1b9050182..9792c4fa3632 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n@@ -909,6 +909,35 @@ ssize_t store_attr(struct device *dev,\n }\n /*aud_mode attr*/\n \n+static ssize_t cs_show(struct device *dev,\n+\t\t\t struct device_attribute *attr, char *buf)\n+{\n+\tint pos = 0;\n+\tint cs = hdmitx_rd_reg(HDMITX_DWC_FC_AVICONF0) & 0x3;\n+\n+\tpos +=\n+\tsnprintf(buf + pos, PAGE_SIZE, \"%d\\n\", cs);\n+\n+\treturn pos;\n+}\n+\n+static ssize_t cd_show(struct device *dev,\n+\t\t\t struct device_attribute *attr, char *buf)\n+{\n+\tint pos = 0;\n+\tint cs = hdmitx_rd_reg(HDMITX_DWC_FC_AVICONF0) & 0x3;\n+\tint cd = (hdmitx_rd_reg(HDMITX_DWC_TX_INVID0) & 0x6) >> 1;\n+\n+\t// YUV422\n+\tif (cs == COLORSPACE_YUV422)\n+\t\tcd = (~cd & 0x3);\n+\n+\tpos +=\n+\tsnprintf(buf + pos, PAGE_SIZE, \"%d\\n\", cd);\n+\n+\treturn pos;\n+}\n+\n void setup_attr(const char *buf)\n {\n \tchar attr[16] = {0};\n@@ -5470,6 +5499,8 @@ static ssize_t show_hdmi_hsty_config(struct device *dev,\n \n static DEVICE_ATTR(disp_mode, 0664, show_disp_mode, store_disp_mode);\n static DEVICE_ATTR(attr, 0664, show_attr, store_attr);\n+static DEVICE_ATTR(cs, 0444, cs_show, NULL);\n+static DEVICE_ATTR(cd, 0444, cd_show, NULL);\n static DEVICE_ATTR(aud_mode, 0644, show_aud_mode, store_aud_mode);\n static DEVICE_ATTR(vid_mute, 0644, show_vid_mute, store_vid_mute);\n static DEVICE_ATTR(edid, 0644, show_edid, store_edid);\n@@ -6938,6 +6969,8 @@ static int amhdmitx_probe(struct platform_device *pdev)\n \thdmitx_device.hdtx_dev = dev;\n \tret = device_create_file(dev, &dev_attr_disp_mode);\n \tret = device_create_file(dev, &dev_attr_attr);\n+\tret = device_create_file(dev, &dev_attr_cs);\n+\tret = device_create_file(dev, &dev_attr_cd);\n \tret = device_create_file(dev, &dev_attr_aud_mode);\n \tret = device_create_file(dev, &dev_attr_vid_mute);\n \tret = device_create_file(dev, &dev_attr_edid);\n@@ -7077,6 +7110,8 @@ static int amhdmitx_remove(struct platform_device *pdev)\n \t/* Remove the cdev */\n \tdevice_remove_file(dev, &dev_attr_disp_mode);\n \tdevice_remove_file(dev, &dev_attr_attr);\n+\tdevice_remove_file(dev, &dev_attr_cs);\n+\tdevice_remove_file(dev, &dev_attr_cd);\n \tdevice_remove_file(dev, &dev_attr_aud_mode);\n \tdevice_remove_file(dev, &dev_attr_vid_mute);\n \tdevice_remove_file(dev, &dev_attr_edid);\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0015-dolby_vision-provide-Dolby-Vision-video-on-by-sysfs.patch",
    "content": "From 5adfd80ef1d3558af19f926868da714356cee6d6 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 21 Apr 2023 10:37:39 +0200\nSubject: [PATCH 15/18] dolby_vision: provide Dolby Vision video on by sysfs\n\n---\n .../enhancement/amdolby_vision/amdolby_vision.c    | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)\n\ndiff --git a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\nindex f19c9cf2b98a..c0669107392b 100644\n--- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n+++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n@@ -13239,6 +13239,18 @@ static ssize_t  amdolby_vision_crc_show(struct class *cla,\n \treturn sprintf(buf, \"%s\\n\", cur_crc);\n }\n \n+static ssize_t dv_video_on_show\n+\t\t(struct class *cla,\n+\t\t struct class_attribute *attr,\n+\t\t char *buf)\n+{\n+\tssize_t len = 0;\n+\n+\tlen += sprintf(buf + len, \"%d\\n\",\n+\t\t\t\t   is_dolby_vision_video_on());\n+\treturn len;\n+}\n+\n static struct class_attribute amdolby_vision_class_attrs[] = {\n \t__ATTR(ko_info, 0444,\n \tamdolby_vision_ko_info_show, NULL),\n@@ -13286,6 +13298,8 @@ static struct class_attribute amdolby_vision_class_attrs[] = {\n \t__ATTR(use_target_lum_from_cfg, 0644,\n \t       amdolby_vision_use_cfg_target_lum_show,\n \t       amdolby_vision_use_cfg_target_lum_store),\n+\t__ATTR(dv_video_on, 0444,\n+\t       dv_video_on_show, NULL),\n \t__ATTR_NULL\n };\n \n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0016-hdmitx-add-dolby-vision-support-for-display-current-.patch",
    "content": "From 7f07487547b2e4aa69b09bb0d36849cf2a954b31 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 19 May 2023 10:58:52 +0200\nSubject: [PATCH 16/18] hdmitx: add dolby vision support for display current\n hdmi config\n\n---\n .../media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c    | 14 ++++++++++++--\n 1 file changed, 12 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\nindex 9792c4fa3632..675564ef3005 100644\n--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c\n@@ -2590,7 +2590,10 @@ static ssize_t show_config(struct device *dev,\n \tstruct hdmitx_dev *hdev = &hdmitx_device;\n \tint colour_depths[] = { 8, 10, 12, 16 };\n \tchar* pix_fmt[] = {\"RGB\",\"YUV422\",\"YUV444\",\"YUV420\"};\n-\tchar* eotf[] = {\"SDR\",\"HDR\",\"HDR10\",\"HLG\"};\n+\tchar* eotf_hdr[] = {\"unknown\", \"HDR10\",\"HLG\",\"HDR\",\"SDR\"};\n+\tchar* eotf_DV[] = {\"unknown\", \"DV-Std\",\"DV-LL\"};\n+\tchar* eotf_hdr10p[] = {\"unknown\", \"HDR10+\"};\n+\tchar* eotf = eotf_hdr[4];\n \tchar* range[] = {\"default\",\"limited\",\"full\"};\n \tchar* colourimetry[] = {\"default\", \"BT.601\", \"BT.709\", \"xvYCC601\",\"xvYCC709\",\n \t\"sYCC601\",\"Adobe_YCC601\",\"Adobe_RGB\",\"BT.2020c\",\"BT.2020nc\",\"P3 D65\",\"P3 DCI\"};\n@@ -2612,13 +2615,20 @@ static ssize_t show_config(struct device *dev,\n \t\tif (cs == COLORSPACE_YUV422)\n \t\t\tcd = (~cd & 0x3);\n \n+\t\tif (hdmitx_hdr10p_en())\n+\t\t\teotf = eotf_hdr10p[hdmitx_get_cur_hdr10p_st() & ~HDMI_HDR10P_TYPE];\n+\t\telse if (hdmitx_dv_en())\n+\t\t\teotf = eotf_DV[hdmitx_get_cur_dv_st() & ~HDMI_DV_TYPE];\n+\t\telse if (hdmitx_hdr_en())\n+\t\t\teotf = eotf_hdr[hdmitx_get_cur_hdr_st() & ~HDMI_HDR_TYPE];\n+\n \t\tpos += snprintf(buf+pos, PAGE_SIZE, \"VIC: %d %s\\n\",\n \t\t\t\thdmitx_device.cur_VIC, para->name);\n \t\tpos += snprintf(buf + pos, PAGE_SIZE, \"Colour depth: %d-bit\\nColourspace: %s\\nColour range: %s\\nEOTF: %s\\nYCC colour range: %s\\n\",\n \t\t\t\tcolour_depths[cd],\n \t\t\t\tpix_fmt[cs],\n \t\t\t\trange[(hdmitx_rd_reg(HDMITX_DWC_FC_AVICONF2) & 0xc) >> 2],\n-\t\t\t\teotf[(hdmitx_rd_reg(HDMITX_DWC_FC_DRM_PB00) & 7)],\n+\t\t\t\teotf,\n \t\t\t\trange[((hdmitx_rd_reg(HDMITX_DWC_FC_AVICONF3) & 0xc) >> 2) + 1]);\n         if (((hdmitx_rd_reg(HDMITX_DWC_FC_AVICONF1) & 0xc0) >> 6) < 0x3)\n \t\t\tpos += snprintf(buf + pos, PAGE_SIZE, \"Colourimetry: %s\\n\",\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0017-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch",
    "content": "From e161ae5e989f53c353fccd335b15c00d42329fee Mon Sep 17 00:00:00 2001\nFrom: Nick Desaulniers <ndesaulniers@google.com>\nDate: Mon, 4 Nov 2019 19:31:45 +0100\nSubject: [PATCH 17/18] ARM: 8933/1: replace Sun/Solaris style flag on section\n directive\n\nIt looks like a section directive was using \"Solaris style\" to declare\nthe section flags. Replace this with the GNU style so that Clang's\nintegrated assembler can assemble this directive.\n\nThe modified instances were identified via:\n$ ag \\.section | grep #\n\nLink: https://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_7.html#SEC119\nLink: https://github.com/ClangBuiltLinux/linux/issues/744\nLink: https://bugs.llvm.org/show_bug.cgi?id=43759\nLink: https://reviews.llvm.org/D69296\n\nAcked-by: Nicolas Pitre <nico@fluxnic.net>\nReviewed-by: Ard Biesheuvel <ardb@kernel.org>\nReviewed-by: Stefan Agner <stefan@agner.ch>\nSigned-off-by: Nick Desaulniers <ndesaulniers@google.com>\nSuggested-by: Fangrui Song <maskray@google.com>\nSuggested-by: Jian Cai <jiancai@google.com>\nSuggested-by: Peter Smith <peter.smith@linaro.org>\nSigned-off-by: Russell King <rmk+kernel@armlinux.org.uk>\n---\n arch/arm/boot/bootp/init.S            | 2 +-\n arch/arm/boot/compressed/big-endian.S | 2 +-\n arch/arm/boot/compressed/head.S       | 2 +-\n arch/arm/boot/compressed/piggy.S      | 2 +-\n arch/arm/mm/proc-arm1020.S            | 2 +-\n arch/arm/mm/proc-arm1020e.S           | 2 +-\n arch/arm/mm/proc-arm1022.S            | 2 +-\n arch/arm/mm/proc-arm1026.S            | 2 +-\n arch/arm/mm/proc-arm720.S             | 2 +-\n arch/arm/mm/proc-arm740.S             | 2 +-\n arch/arm/mm/proc-arm7tdmi.S           | 2 +-\n arch/arm/mm/proc-arm920.S             | 2 +-\n arch/arm/mm/proc-arm922.S             | 2 +-\n arch/arm/mm/proc-arm925.S             | 2 +-\n arch/arm/mm/proc-arm926.S             | 2 +-\n arch/arm/mm/proc-arm940.S             | 2 +-\n arch/arm/mm/proc-arm946.S             | 2 +-\n arch/arm/mm/proc-arm9tdmi.S           | 2 +-\n arch/arm/mm/proc-fa526.S              | 2 +-\n arch/arm/mm/proc-feroceon.S           | 2 +-\n arch/arm/mm/proc-mohawk.S             | 2 +-\n arch/arm/mm/proc-sa110.S              | 2 +-\n arch/arm/mm/proc-sa1100.S             | 2 +-\n arch/arm/mm/proc-v6.S                 | 2 +-\n arch/arm/mm/proc-v7.S                 | 2 +-\n arch/arm/mm/proc-v7m.S                | 4 ++--\n arch/arm/mm/proc-xsc3.S               | 2 +-\n arch/arm/mm/proc-xscale.S             | 2 +-\n 28 files changed, 29 insertions(+), 29 deletions(-)\n\ndiff --git a/arch/arm/boot/bootp/init.S b/arch/arm/boot/bootp/init.S\nindex 78b508075161..868eeeaaa46e 100644\n--- a/arch/arm/boot/bootp/init.S\n+++ b/arch/arm/boot/bootp/init.S\n@@ -16,7 +16,7 @@\n  *  size immediately following the kernel, we could build this into\n  *  a binary blob, and concatenate the zImage using the cat command.\n  */\n-\t\t.section .start,#alloc,#execinstr\n+\t\t.section .start, \"ax\"\n \t\t.type\t_start, #function\n \t\t.globl\t_start\n \ndiff --git a/arch/arm/boot/compressed/big-endian.S b/arch/arm/boot/compressed/big-endian.S\nindex 25ab26f1c6f0..f22428e275f8 100644\n--- a/arch/arm/boot/compressed/big-endian.S\n+++ b/arch/arm/boot/compressed/big-endian.S\n@@ -5,7 +5,7 @@\n  *  Author: Nicolas Pitre\n  */\n \n-\t.section \".start\", #alloc, #execinstr\n+\t.section \".start\", \"ax\"\n \n \tmrc\tp15, 0, r0, c1, c0, 0\t@ read control reg\n \torr\tr0, r0, #(1 << 7)\t@ enable big endian mode\ndiff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S\nindex 6e7180dfa4ed..328451fcbb6c 100644\n--- a/arch/arm/boot/compressed/head.S\n+++ b/arch/arm/boot/compressed/head.S\n@@ -114,7 +114,7 @@\n #endif\n \t\t.endm\n \n-\t\t.section \".start\", #alloc, #execinstr\n+\t\t.section \".start\", \"ax\"\n /*\n  * sort out different calling conventions\n  */\ndiff --git a/arch/arm/boot/compressed/piggy.S b/arch/arm/boot/compressed/piggy.S\nindex f72088495f43..74274a3bd28e 100644\n--- a/arch/arm/boot/compressed/piggy.S\n+++ b/arch/arm/boot/compressed/piggy.S\n@@ -1,4 +1,4 @@\n-\t.section .piggydata,#alloc\n+\t.section .piggydata,\"a\"\n \t.globl\tinput_data\n input_data:\n \t.incbin\t\"arch/arm/boot/compressed/piggy_data\"\ndiff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S\nindex 774ef1323554..4773490177c9 100644\n--- a/arch/arm/mm/proc-arm1020.S\n+++ b/arch/arm/mm/proc-arm1020.S\n@@ -505,7 +505,7 @@ cpu_arm1020_name:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n \t.type\t__arm1020_proc_info,#object\n __arm1020_proc_info:\ndiff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S\nindex ae3c27b71594..928e8ca58f40 100644\n--- a/arch/arm/mm/proc-arm1020e.S\n+++ b/arch/arm/mm/proc-arm1020e.S\n@@ -463,7 +463,7 @@ arm1020e_crval:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n \t.type\t__arm1020e_proc_info,#object\n __arm1020e_proc_info:\ndiff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S\nindex dbb2413fe04d..385584c3d222 100644\n--- a/arch/arm/mm/proc-arm1022.S\n+++ b/arch/arm/mm/proc-arm1022.S\n@@ -448,7 +448,7 @@ arm1022_crval:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n \t.type\t__arm1022_proc_info,#object\n __arm1022_proc_info:\ndiff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S\nindex 0b37b2cef9d3..29cc81857373 100644\n--- a/arch/arm/mm/proc-arm1026.S\n+++ b/arch/arm/mm/proc-arm1026.S\n@@ -442,7 +442,7 @@ arm1026_crval:\n \tstring\tcpu_arm1026_name, \"ARM1026EJ-S\"\n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n \t.type\t__arm1026_proc_info,#object\n __arm1026_proc_info:\ndiff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S\nindex 3651cd70e418..c08cd1b0a1d0 100644\n--- a/arch/arm/mm/proc-arm720.S\n+++ b/arch/arm/mm/proc-arm720.S\n@@ -186,7 +186,7 @@ arm720_crval:\n  * See <asm/procinfo.h> for a definition of this structure.\n  */\n \t\n-\t\t.section \".proc.info.init\", #alloc\n+\t\t.section \".proc.info.init\", \"a\"\n \n .macro arm720_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cpu_flush:req\n \t\t.type\t__\\name\\()_proc_info,#object\ndiff --git a/arch/arm/mm/proc-arm740.S b/arch/arm/mm/proc-arm740.S\nindex 024fb7732407..6eed87103b95 100644\n--- a/arch/arm/mm/proc-arm740.S\n+++ b/arch/arm/mm/proc-arm740.S\n@@ -132,7 +132,7 @@ __arm740_setup:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \t.type\t__arm740_proc_info,#object\n __arm740_proc_info:\n \t.long\t0x41807400\ndiff --git a/arch/arm/mm/proc-arm7tdmi.S b/arch/arm/mm/proc-arm7tdmi.S\nindex 25472d94426d..beb64a7ccb38 100644\n--- a/arch/arm/mm/proc-arm7tdmi.S\n+++ b/arch/arm/mm/proc-arm7tdmi.S\n@@ -76,7 +76,7 @@ __arm7tdmi_setup:\n \n \t\t.align\n \n-\t\t.section \".proc.info.init\", #alloc\n+\t\t.section \".proc.info.init\", \"a\"\n \n .macro arm7tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, \\\n \textra_hwcaps=0\ndiff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S\nindex 7a14bd4414c9..5d4319708362 100644\n--- a/arch/arm/mm/proc-arm920.S\n+++ b/arch/arm/mm/proc-arm920.S\n@@ -448,7 +448,7 @@ arm920_crval:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n \t.type\t__arm920_proc_info,#object\n __arm920_proc_info:\ndiff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S\nindex edccfcdcd551..7e22ca780b36 100644\n--- a/arch/arm/mm/proc-arm922.S\n+++ b/arch/arm/mm/proc-arm922.S\n@@ -426,7 +426,7 @@ arm922_crval:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n \t.type\t__arm922_proc_info,#object\n __arm922_proc_info:\ndiff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S\nindex 32a47cc19076..d343e77b8456 100644\n--- a/arch/arm/mm/proc-arm925.S\n+++ b/arch/arm/mm/proc-arm925.S\n@@ -491,7 +491,7 @@ arm925_crval:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n .macro arm925_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache\n \t.type\t__\\name\\()_proc_info,#object\ndiff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S\nindex fb827c633693..8cf78c608c42 100644\n--- a/arch/arm/mm/proc-arm926.S\n+++ b/arch/arm/mm/proc-arm926.S\n@@ -474,7 +474,7 @@ arm926_crval:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n \t.type\t__arm926_proc_info,#object\n __arm926_proc_info:\ndiff --git a/arch/arm/mm/proc-arm940.S b/arch/arm/mm/proc-arm940.S\nindex ee5b66f847c4..631ae64eeccd 100644\n--- a/arch/arm/mm/proc-arm940.S\n+++ b/arch/arm/mm/proc-arm940.S\n@@ -344,7 +344,7 @@ __arm940_setup:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n \t.type\t__arm940_proc_info,#object\n __arm940_proc_info:\ndiff --git a/arch/arm/mm/proc-arm946.S b/arch/arm/mm/proc-arm946.S\nindex 7361837edc31..033ad7402d67 100644\n--- a/arch/arm/mm/proc-arm946.S\n+++ b/arch/arm/mm/proc-arm946.S\n@@ -399,7 +399,7 @@ __arm946_setup:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \t.type\t__arm946_proc_info,#object\n __arm946_proc_info:\n \t.long\t0x41009460\ndiff --git a/arch/arm/mm/proc-arm9tdmi.S b/arch/arm/mm/proc-arm9tdmi.S\nindex 7fac8c612134..2195468ccd76 100644\n--- a/arch/arm/mm/proc-arm9tdmi.S\n+++ b/arch/arm/mm/proc-arm9tdmi.S\n@@ -70,7 +70,7 @@ __arm9tdmi_setup:\n \n \t\t.align\n \n-\t\t.section \".proc.info.init\", #alloc\n+\t\t.section \".proc.info.init\", \"a\"\n \n .macro arm9tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req\n \t\t.type\t__\\name\\()_proc_info, #object\ndiff --git a/arch/arm/mm/proc-fa526.S b/arch/arm/mm/proc-fa526.S\nindex 4001b73af4ee..fd3e5dd94e59 100644\n--- a/arch/arm/mm/proc-fa526.S\n+++ b/arch/arm/mm/proc-fa526.S\n@@ -190,7 +190,7 @@ fa526_cr1_set:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n \t.type\t__fa526_proc_info,#object\n __fa526_proc_info:\ndiff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S\nindex 92e08bf37aad..685d324a74d3 100644\n--- a/arch/arm/mm/proc-feroceon.S\n+++ b/arch/arm/mm/proc-feroceon.S\n@@ -584,7 +584,7 @@ feroceon_crval:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n .macro feroceon_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache:req\n \t.type\t__\\name\\()_proc_info,#object\ndiff --git a/arch/arm/mm/proc-mohawk.S b/arch/arm/mm/proc-mohawk.S\nindex 6f07d2ef4ff2..9182321a586a 100644\n--- a/arch/arm/mm/proc-mohawk.S\n+++ b/arch/arm/mm/proc-mohawk.S\n@@ -429,7 +429,7 @@ mohawk_crval:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n \t.type\t__88sv331x_proc_info,#object\n __88sv331x_proc_info:\ndiff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S\nindex ee2ce496239f..093ad2ceff28 100644\n--- a/arch/arm/mm/proc-sa110.S\n+++ b/arch/arm/mm/proc-sa110.S\n@@ -199,7 +199,7 @@ sa110_crval:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n \t.type\t__sa110_proc_info,#object\n __sa110_proc_info:\ndiff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S\nindex 222d5836f666..12b8fcab4b59 100644\n--- a/arch/arm/mm/proc-sa1100.S\n+++ b/arch/arm/mm/proc-sa1100.S\n@@ -242,7 +242,7 @@ sa1100_crval:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n .macro sa1100_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req\n \t.type\t__\\name\\()_proc_info,#object\ndiff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S\nindex 06d890a2342b..32f4df0915ef 100644\n--- a/arch/arm/mm/proc-v6.S\n+++ b/arch/arm/mm/proc-v6.S\n@@ -264,7 +264,7 @@ v6_crval:\n \tstring\tcpu_elf_name, \"v6\"\n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n \t/*\n \t * Match any ARMv6 processor core.\ndiff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S\nindex 850c22bca19c..156fc195a332 100644\n--- a/arch/arm/mm/proc-v7.S\n+++ b/arch/arm/mm/proc-v7.S\n@@ -631,7 +631,7 @@ __v7_setup_stack:\n \tstring\tcpu_elf_name, \"v7\"\n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n \t/*\n \t * Standard v7 proc info content\ndiff --git a/arch/arm/mm/proc-v7m.S b/arch/arm/mm/proc-v7m.S\nindex 50497778c2e5..ae038a76d9b8 100644\n--- a/arch/arm/mm/proc-v7m.S\n+++ b/arch/arm/mm/proc-v7m.S\n@@ -96,7 +96,7 @@ ENTRY(cpu_cm7_proc_fin)\n \tret\tlr\n ENDPROC(cpu_cm7_proc_fin)\n \n-\t.section \".init.text\", #alloc, #execinstr\n+\t.section \".init.text\", \"ax\"\n \n __v7m_cm7_setup:\n \tmov\tr8, #(V7M_SCB_CCR_DC | V7M_SCB_CCR_IC| V7M_SCB_CCR_BP)\n@@ -177,7 +177,7 @@ ENDPROC(__v7m_setup)\n \tstring cpu_elf_name \"v7m\"\n \tstring cpu_v7m_name \"ARMv7-M\"\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n .macro __v7m_proc name, initfunc, cache_fns = nop_cache_fns, hwcaps = 0,  proc_fns = v7m_processor_functions\n \t.long\t0\t\t\t/* proc_info_list.__cpu_mm_mmu_flags */\ndiff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S\nindex 293dcc2c441f..da96e4de1353 100644\n--- a/arch/arm/mm/proc-xsc3.S\n+++ b/arch/arm/mm/proc-xsc3.S\n@@ -499,7 +499,7 @@ xsc3_crval:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n .macro xsc3_proc_info name:req, cpu_val:req, cpu_mask:req\n \t.type\t__\\name\\()_proc_info,#object\ndiff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S\nindex b6bbfdb6dfdc..b9620d02dc01 100644\n--- a/arch/arm/mm/proc-xscale.S\n+++ b/arch/arm/mm/proc-xscale.S\n@@ -612,7 +612,7 @@ xscale_crval:\n \n \t.align\n \n-\t.section \".proc.info.init\", #alloc\n+\t.section \".proc.info.init\", \"a\"\n \n .macro xscale_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache\n \t.type\t__\\name\\()_proc_info,#object\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/0018-dolby_vision-add-is_mel-sysfs.patch",
    "content": "From 8a5d9b387b7f53aced94170779d77d1575f0d95c Mon Sep 17 00:00:00 2001\nFrom: Arthur Liberman <arthur_liberman@hotmail.com>\nDate: Wed, 27 Dec 2023 19:32:42 +0200\nSubject: [PATCH 18/18] dolby_vision: add `is_mel` sysfs Set to `true` when\n DoVi Profile 7 Minimum Enhancement Layer (MEL) content is detected This\n signals the application that it needs to switch to\n `dec_mode=STREAM_TYPE_FRAME`\n\n---\n .../media/enhancement/amdolby_vision/amdolby_vision.c       | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\nindex c0669107392b..6b20fbe687f7 100644\n--- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n+++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c\n@@ -1392,6 +1392,9 @@ static int force_disable_dv_backlight;\n static bool dv_control_backlight_status;\n static bool bypass_all_vpp_pq;\n static int use_target_lum_from_cfg;\n+static bool is_mel = false;\n+module_param(is_mel, bool, 0444);\n+MODULE_PARM_DESC(is_mel, \"\\n is_mel\\n\");\n \n /*0: not debug mode; 1:force bypass vpp pq; 2:force enable vpp pq*/\n /*3: force do nothing*/\n@@ -8229,7 +8232,7 @@ int dolby_vision_parse_metadata(struct vframe_s *vf,\n \t\t\t\tpr_dolby_dbg(\"bypass mel\\n\");\n \t\t\t}\n \t\t\tif (ret_flags == 1)\n-\t\t\t\tmel_flag = true;\n+\t\t\t\tmel_flag = is_mel = true;\n \t\t\tif (!is_dv_standard_es(req.dv_enhance_exist,\n \t\t\t\t\t       ret_flags, w)) {\n \t\t\t\tsrc_format = FORMAT_SDR;\n@@ -12587,6 +12590,7 @@ static ssize_t amdolby_vision_debug_store\n \t\tif (kstrtoul(parm[1], 10, &val) < 0)\n \t\t\treturn -EINVAL;\n \t\tenable_fel = val;\n+\t\tis_mel = false;\n \t\tpr_info(\"enable_fel %d\\n\", enable_fel);\n \t} else if (!strcmp(parm[0], \"ko_info\")) {\n \t\tif (ko_info)\n-- \n2.25.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/linux-02-fix_bluetooth_reconnect.patch",
    "content": "From 0996abc14470622eece29b66913b082a2eebe5f2 Mon Sep 17 00:00:00 2001\nFrom: Florian Dollinger <dollinger.florian@gmx.de>\nDate: Sun, 7 Jan 2018 23:55:52 +0100\nSubject: [PATCH] The current L2CAP implementation does not change any options if the\n other side respons with \"unknown options\", but does if \"unaccepted options\" is the answer.\n It is up to the implementation to decide on the  effort spent on config negotiations,\n therefore the current implementation is  correct at this point - but many devices\n (like Xbox One S controllers) are not useable this way.\n A workaround for many users therefore is to disable_ertm, since this is often the option\n which is unknown. I would prefer to try it again with altered options instead of globally\n disable ERTM.\n \n In result, I suggest the following patch. It simply adds a new case (L2CAP_CONF_UNKNOWN),\n which does nothing but falling through to L2CAP_CONF_UNACCEPT.\n\nSigned-off-by: Florian Dollinger <dollinger.florian@gmx.de>\n---\n net/bluetooth/l2cap_core.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c\nindex 43ba91c44..388d53bfd 100644\n--- a/net/bluetooth/l2cap_core.c\n+++ b/net/bluetooth/l2cap_core.c\n@@ -4208,6 +4208,7 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn,\n \t\t}\n \t\tgoto done;\n \n+\tcase L2CAP_CONF_UNKNOWN:\n \tcase L2CAP_CONF_UNACCEPT:\n \t\tif (chan->num_conf_rsp <= L2CAP_CONF_MAX_CONF_RSP) {\n \t\t\tchar req[64];\n-- \n2.15.1\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/linux-03-stop-hid-generic-from-grabing-xbone.patch",
    "content": "From 090b784913a5ff0a823510553f97c0d7b1115f57 Mon Sep 17 00:00:00 2001\nFrom: cdu13a <cdu13a@gmail.com>\nDate: Sat, 23 Nov 2019 14:08:13 -0500\nSubject: hid: stop hid-generic from being greedy with the xbox one controller\n\n---\n drivers/hid/hid-core.c | 2 ++\n drivers/hid/hid-ids.h  | 2 ++\n 2 files changed, 4 insertions(+)\n\ndiff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c\nindex f5e17e8ce9ba..188c25a30870 100644\n--- a/drivers/hid/hid-core.c\n+++ b/drivers/hid/hid-core.c\n@@ -2004,6 +2004,8 @@ static const struct hid_device_id hid_have_special_driver[] = {\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_600) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3KV1) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER) },\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_ONE_S) },\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_ONE_S_2016) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_MONTEREY, USB_DEVICE_ID_GENIUS_KB29E) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN) },\ndiff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h\nindex 8b5d1166416a..4d753184436a 100644\n--- a/drivers/hid/hid-ids.h\n+++ b/drivers/hid/hid-ids.h\n@@ -745,6 +745,8 @@\n #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP 0x07dd\n #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP 0x07e9\n #define USB_DEVICE_ID_MS_POWER_COVER     0x07da\n+#define USB_DEVICE_ID_MS_XBOX_ONE_S         0x02fd\n+#define USB_DEVICE_ID_MS_XBOX_ONE_S_2016    0x02e0\n \n #define USB_VENDOR_ID_MOJO\t\t0x8282\n #define USB_DEVICE_ID_RETRO_ADAPTER\t0x3201\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/linux-04-xpadneo.patch",
    "content": "From 25d349d6af1eb1637cb82e9627c32f6225b0e912 Mon Sep 17 00:00:00 2001\nFrom: cdu13a <cdu13a@gmail.com>\nDate: Sat, 23 Nov 2019 14:10:47 -0500\nSubject: hid: add xpadneo driver 0.6.0\n\n---\n drivers/hid/Kconfig       |    7 +\n drivers/hid/Makefile      |    1 +\n drivers/hid/hid-xpadneo.c | 1415 +++++++++++++++++++++++++++++++++++++\n 3 files changed, 1423 insertions(+)\n create mode 100644 drivers/hid/hid-xpadneo.c\n\ndiff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig\nindex 8eed456a67be..4d385d46fb4c 100644\n--- a/drivers/hid/Kconfig\n+++ b/drivers/hid/Kconfig\n@@ -909,6 +909,13 @@ config HID_XINMO\n \tstandard. Currently only supports the Xin-Mo Dual Arcade. Say Y here\n \tif you have a Xin-Mo Dual Arcade controller.\n \n+config HID_XPADNEO\n+\ttristate \"XBOX ONE S and X controller over Bluetooth, including FF\"\n+\tdepends on HID\n+\tselect INPUT_FF_MEMLESS\n+\t---help---\n+\tSupport for Xbox One S and X controllers over BT, including force-feedback.\n+\n config HID_ZEROPLUS\n \ttristate \"Zeroplus based game controller support\"\n \tdepends on HID\ndiff --git a/drivers/hid/Makefile b/drivers/hid/Makefile\nindex 86b2b5785fd2..dfdcb2e64cde 100644\n--- a/drivers/hid/Makefile\n+++ b/drivers/hid/Makefile\n@@ -98,6 +98,7 @@ obj-$(CONFIG_HID_TWINHAN)\t+= hid-twinhan.o\n obj-$(CONFIG_HID_UCLOGIC)\t+= hid-uclogic.o\n obj-$(CONFIG_HID_LED)\t\t+= hid-led.o\n obj-$(CONFIG_HID_XINMO)\t\t+= hid-xinmo.o\n+obj-$(CONFIG_HID_XPADNEO)\t+= hid-xpadneo.o\n obj-$(CONFIG_HID_ZEROPLUS)\t+= hid-zpff.o\n obj-$(CONFIG_HID_ZYDACRON)\t+= hid-zydacron.o\n \ndiff --git a/drivers/hid/hid-xpadneo.c b/drivers/hid/hid-xpadneo.c\nnew file mode 100644\nindex 000000000000..b4847ab6ee1a\n--- /dev/null\n+++ b/drivers/hid/hid-xpadneo.c\n@@ -0,0 +1,1414 @@\n+#define DRV_VER \"0.6.0\"\n+\n+/*\n+ * Force feedback support for XBOX ONE S and X gamepads via Bluetooth\n+ *\n+ * This driver was developed for a student project at fortiss GmbH in Munich.\n+ * Copyright (c) 2017 Florian Dollinger <dollinger.florian@gmx.de>\n+ */\n+\n+#include <linux/hid.h>\n+#include <linux/power_supply.h>\n+#include <linux/input.h>\t/* ff_memless(), ... */\n+#include <linux/module.h>\t/* MODULE_*, module_*, ... */\n+#include <linux/slab.h>\t\t/* kzalloc(), kfree(), ... */\n+#include <linux/delay.h>\t/* mdelay(), ... */\n+#include \"hid-ids.h\"\t\t/* VENDOR_ID... */\n+\n+\n+#define DEBUG\n+\n+\n+/* Module Information */\n+MODULE_LICENSE(\"GPL\");\n+MODULE_AUTHOR(\"Florian Dollinger <dollinger.florian@gmx.de>\");\n+MODULE_DESCRIPTION(\"Linux kernel driver for Xbox ONE S+ gamepads (BT), incl. FF\");\n+MODULE_VERSION(DRV_VER);\n+\n+\n+/* Module Parameters, located at /sys/module/hid_xpadneo/parameters */\n+\n+/* NOTE:\n+ * In general it is not guaranteed that a short variable is no more than\n+ * 16 bit long in C, it depends on the computer architecure. But as a kernel\n+ * module parameter it is, since <params.c> does use kstrtou16 for shorts\n+ * since version 3.14\n+ */\n+\n+#ifdef DEBUG\n+static u8 param_debug_level;\n+module_param_named(debug_level, param_debug_level, byte, 0644);\n+MODULE_PARM_DESC(debug_level, \"(u8) Debug information level: 0 (none) to 3+ (most verbose).\");\n+#endif\n+\n+static u8 param_disable_ff;\n+module_param_named(disable_ff, param_disable_ff, byte, 0644);\n+MODULE_PARM_DESC(disable_ff, \"(u8) Disable FF: 0 (all enabled), 1 (disable main), 2 (disable triggers), 3 (disable all).\");\n+\n+#define PARAM_DISABLE_FF_NONE    0\n+#define PARAM_DISABLE_FF_MAIN    1\n+#define PARAM_DISABLE_FF_TRIGGER 2\n+#define PARAM_DISABLE_FF_ALL     3\n+\n+static bool param_combined_z_axis;\n+module_param_named(combined_z_axis, param_combined_z_axis, bool, 0644);\n+MODULE_PARM_DESC(combined_z_axis, \"(bool) Combine the triggers to form a single axis. 1: combine, 0: do not combine\");\n+\n+static u8 param_trigger_rumble_damping = 4;\n+module_param_named(trigger_rumble_damping, param_trigger_rumble_damping, byte, 0644);\n+MODULE_PARM_DESC(trigger_rumble_damping, \"(u8) Damp the trigger: 1 (none) to 2^8+ (max)\");\n+\n+static u16 param_fake_dev_version = 0x1130;\n+module_param_named(fake_dev_version, param_fake_dev_version, ushort, 0644);\n+MODULE_PARM_DESC(fake_dev_version, \"(u16) Fake device version # to hide from SDL's mappings. 0x0001-0xFFFF: fake version, others: keep original\");\n+\n+\n+/*\n+ * Debug Printk\n+ *\n+ * Prints a debug message to kernel (dmesg)\n+ * only if both is true, this is a DEBUG version and the\n+ * param_debug_level-parameter is equal or higher than the level\n+ * specified in hid_dbg_lvl\n+ */\n+\n+#define DBG_LVL_NONE 0\n+#define DBG_LVL_FEW  1\n+#define DBG_LVL_SOME 2\n+#define DBG_LVL_ALL  3\n+\n+\n+#ifdef DEBUG\n+#define hid_dbg_lvl(lvl, fmt_hdev, fmt_str, ...) \\\n+\tdo { \\\n+\t\tif (param_debug_level >= lvl) \\\n+\t\t\thid_dbg(pr_fmt(fmt_hdev), \\\n+\t\t\t\tpr_fmt(fmt_str), ##__VA_ARGS__); \\\n+\t} while (0)\n+#define dbg_hex_dump_lvl(lvl, fmt_prefix, data, size) \\\n+\tdo { \\\n+\t\tif (param_debug_level >= lvl) \\\n+\t\t\tprint_hex_dump(KERN_DEBUG, pr_fmt(fmt_prefix), \\\n+\t\t\t\tDUMP_PREFIX_NONE, 32, 1, data, size, false); \\\n+\t} while (0)\n+#else\n+#define hid_dbg_lvl(lvl, fmt_hdev, fmt_str, ...) \\\n+\t\tno_printk(KERN_DEBUG pr_fmt(fmt_str), ##__VA_ARGS__)\n+#define dbg_hex_dump_lvl(lvl, fmt_prefix, data, size) \\\n+\t\tno_printk(KERN_DEBUG pr_fmt(fmt_prefix))\n+#endif\n+\n+\n+static DEFINE_IDA(xpadneo_device_id_allocator);\n+\n+/*\n+ * FF Output Report\n+ *\n+ * This is the structure for the rumble output report. For more information\n+ * about this structure please take a look in the hid-report description.\n+ * Please notice that the structs are __packed, therefore there is no \"padding\"\n+ * between the elements (they behave more like an array).\n+ *\n+ */\n+\n+enum {\n+\tFF_ENABLE_NONE          = 0x00,\n+\tFF_ENABLE_RIGHT         = 0x01,\n+\tFF_ENABLE_LEFT          = 0x02,\n+\tFF_ENABLE_RIGHT_TRIGGER = 0x04,\n+\tFF_ENABLE_LEFT_TRIGGER  = 0x08,\n+\tFF_ENABLE_ALL           = 0x0F\n+};\n+\n+struct ff_data {\n+\tu8 enable_actuators;\n+\tu8 magnitude_left_trigger;\n+\tu8 magnitude_right_trigger;\n+\tu8 magnitude_left;\n+\tu8 magnitude_right;\n+\tu8 duration;\n+\tu8 start_delay;\n+\tu8 loop_count;\n+} __packed;\n+\n+struct ff_report {\n+\tu8 report_id;\n+\tstruct ff_data ff;\n+} __packed;\n+\n+/* static variables are zeroed => empty initialization struct */\n+static const struct ff_data ff_clear;\n+\n+\n+/*\n+ * Device Data\n+ *\n+ * We attach information to hdev, which is therefore nearly globally accessible\n+ * via hid_get_drvdata(hdev). It is attached to the hid_device via\n+ * hid_set_drvdata(hdev) at the probing function.\n+ */\n+\n+enum report_type {\n+\tUNKNOWN,\n+\tLINUX,\n+\tWINDOWS\n+};\n+\n+// TODO: avoid data duplication\n+\n+const char *report_type_text[] = {\n+\t\"unknown\",\n+\t\"linux/android\",\n+\t\"windows\"\n+};\n+\n+\n+struct xpadneo_devdata {\n+\t/* mutual exclusion */\n+\tspinlock_t lock;\n+\n+\t/* unique physical device id (randomly assigned) */\n+\tint id;\n+\n+\t/* logical device interfaces */\n+\tstruct hid_device *hdev;\n+\tstruct input_dev *idev;\n+\tstruct power_supply *batt;\n+\n+\t/* report types */\n+\tenum report_type report_descriptor;\n+\tenum report_type report_behaviour;\n+\n+\t/* battery information */\n+\tstruct power_supply_desc batt_desc;\n+\tu8 ps_online;\n+\tu8 ps_present;\n+\tu8 ps_capacity_level;\n+\tu8 ps_status;\n+\n+\t/* axis states */\n+\ts32 last_abs_z;\n+\ts32 last_abs_rz;\n+};\n+\n+\n+void create_ff_pck (struct ff_report *pck, u8 id, u8 en_act,\n+\tu8 mag_lt, u8 mag_rt, u8 mag_l, u8 mag_r,\n+\tu8 start_delay) {\n+\n+\tpck->report_id = id;\n+\n+\tpck->ff.enable_actuators = en_act;\n+\tpck->ff.magnitude_left_trigger = mag_lt;\n+\tpck->ff.magnitude_right_trigger = mag_rt;\n+\tpck->ff.magnitude_left = mag_l;\n+\tpck->ff.magnitude_right = mag_r;\n+\tpck->ff.duration = 0xFF;\n+\tpck->ff.start_delay = start_delay;\n+\tpck->ff.loop_count = 0xFF;\n+\n+\t/* It is up to the Input-Subsystem to start and stop effects as needed.\n+\t * All WE need to do is to play the effect at least 32767 ms long.\n+\t * Take a look here:\n+\t * https://stackoverflow.com/questions/48034091/\n+\t * We therefore simply play the effect as long as possible, which is\n+\t * 2, 55s * 255 = 650, 25s ~ = 10min\n+\t */\n+}\n+\n+/*\n+ * Force Feedback Callback\n+ *\n+ * This function is called by the Input Subsystem.\n+ * The effect data is set in userspace and sent to the driver via ioctl.\n+ */\n+\n+static int xpadneo_ff_play(struct input_dev *dev, void *data,\n+\tstruct ff_effect *effect)\n+{\n+\t/* Q: where is drvdata set to hid_device?\n+\t * A: hid_hw_start (called in probe)\n+\t *    -> hid_connect -> hidinput_connect\n+\t *    -> hidinput_allocate (sets drvdata to hid_device)\n+\t */\n+\n+\tstruct ff_report ff_pck;\n+\tu16 weak, strong, direction, max, max_damped;\n+\tu8 mag_main_right, mag_main_left, mag_trigger_right, mag_trigger_left;\n+\tu8 ff_active;\n+\n+\tconst int fractions_milli[]\n+\t\t= {1000, 962, 854, 691, 500, 309, 146, 38, 0};\n+\tconst int proportions_idx_max = 8;\n+\tu8 index_left, index_right;\n+\tint fraction_TL, fraction_TR;\n+\tu8 trigger_rumble_damping_nonzero;\n+\n+\tenum {\n+\t\tDIRECTION_DOWN  = 0x0000,\n+\t\tDIRECTION_LEFT  = 0x4000,\n+\t\tDIRECTION_UP    = 0x8000,\n+\t\tDIRECTION_RIGHT = 0xC000,\n+\t};\n+\n+\n+\tstruct hid_device *hdev = input_get_drvdata(dev);\n+\n+\tif (param_disable_ff == PARAM_DISABLE_FF_ALL)\n+\t\treturn 0;\n+\n+\tif (effect->type != FF_RUMBLE)\n+\t\treturn 0;\n+\n+\t/* copy data from effect structure at the very beginning */\n+\tweak      = effect->u.rumble.weak_magnitude;\n+\tstrong    = effect->u.rumble.strong_magnitude;\n+\tdirection = effect->direction;\n+\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"playing effect: strong: %#04x, weak: %#04x, direction: %#04x\\n\",\n+\t\tstrong, weak, direction);\n+\n+\t/* calculate the physical magnitudes */\n+\tmag_main_right = (u8)((weak & 0xFF00) >> 8);   /* u16 to u8 */\n+\tmag_main_left  = (u8)((strong & 0xFF00) >> 8); /* u16 to u8 */\n+\n+\n+\t/* get the proportions from a precalculated cosine table\n+\t * calculation goes like:\n+\t * cosine(a) * 1000 =  {1000, 924, 707, 383, 0, -383, -707, -924, -1000}\n+\t * fractions_milli(a) = (1000 + (cosine * 1000)) / 2\n+\t */\n+\n+\tfraction_TL = 0;\n+\tfraction_TR = 0;\n+\n+\tif (direction >= DIRECTION_LEFT && direction <= DIRECTION_RIGHT) {\n+\t\tindex_left = (direction - DIRECTION_LEFT) >> 12;\n+\t\tindex_right = proportions_idx_max - index_left;\n+\n+\t\tfraction_TL = fractions_milli[index_left];\n+\t\tfraction_TR = fractions_milli[index_right];\n+\t}\n+\n+\t/* we want to keep the rumbling at the triggers below the maximum\n+\t* of the weak and strong main rumble\n+\t*/\n+\tmax = mag_main_right > mag_main_left ? mag_main_right : mag_main_left;\n+\n+\t/* the user can change the damping at runtime, hence check the range */\n+\ttrigger_rumble_damping_nonzero\n+\t\t= param_trigger_rumble_damping == 0 ? 1 : param_trigger_rumble_damping;\n+\n+\tmax_damped = max / trigger_rumble_damping_nonzero;\n+\n+\tmag_trigger_left = (u8)((max_damped * fraction_TL) / 1000);\n+\tmag_trigger_right = (u8)((max_damped * fraction_TR) / 1000);\n+\n+\n+\tff_active = FF_ENABLE_ALL;\n+\n+\tif (param_disable_ff & PARAM_DISABLE_FF_TRIGGER)\n+\t\tff_active &= ~(FF_ENABLE_LEFT_TRIGGER | FF_ENABLE_RIGHT_TRIGGER);\n+\n+\tif (param_disable_ff & PARAM_DISABLE_FF_MAIN)\n+\t\tff_active &= ~(FF_ENABLE_LEFT | FF_ENABLE_RIGHT);\n+\n+\n+\tcreate_ff_pck(\n+\t\t&ff_pck, 0x03,\n+\t\tff_active,\n+\t\tmag_trigger_left, mag_trigger_right,\n+\t\tmag_main_left, mag_main_right,\n+\t\t0);\n+\n+\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev,\n+\t\t\"active: %#04x, max: %#04x, prop_left: %#04x, prop_right: %#04x, left trigger: %#04x, right: %#04x\\n\",\n+\t\tff_active,\n+\t\tmax, fraction_TL, fraction_TR,\n+\t\tff_pck.ff.magnitude_left_trigger,\n+\t\tff_pck.ff.magnitude_right_trigger);\n+\n+\thid_hw_output_report(hdev, (u8 *)&ff_pck, sizeof(ff_pck));\n+\n+\treturn 0;\n+}\n+\n+\n+/*\n+ * Device (Gamepad) Initialization\n+ */\n+\n+static int xpadneo_initDevice(struct hid_device *hdev)\n+{\n+\tint error;\n+\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\tstruct input_dev *idev = xdata->idev;\n+\n+\n+\tstruct ff_report ff_pck;\n+\n+\t/* TODO: outsource that */\n+\n+\tff_pck.ff = ff_clear;\n+\n+\t/* 'HELLO' FROM THE OTHER SIDE */\n+\tif (!param_disable_ff) {\n+\t\tff_pck.report_id = 0x03;\n+\t\tff_pck.ff.magnitude_right = 0x80;\n+\t\tff_pck.ff.magnitude_left  = 0x40;\n+\t\tff_pck.ff.magnitude_right_trigger = 0x20;\n+\t\tff_pck.ff.magnitude_left_trigger  = 0x20;\n+\t\tff_pck.ff.duration = 33;\n+\n+\t\tff_pck.ff.enable_actuators = FF_ENABLE_RIGHT;\n+\t\thid_hw_output_report(hdev, (u8 *)&ff_pck, sizeof(ff_pck));\n+\t\tmdelay(330);\n+\n+\t\tff_pck.ff.enable_actuators = FF_ENABLE_LEFT;\n+\t\thid_hw_output_report(hdev, (u8 *)&ff_pck, sizeof(ff_pck));\n+\t\tmdelay(330);\n+\n+\t\tff_pck.ff.enable_actuators\n+\t\t\t= FF_ENABLE_RIGHT_TRIGGER | FF_ENABLE_LEFT_TRIGGER;\n+\t\thid_hw_output_report(hdev, (u8 *)&ff_pck, sizeof(ff_pck));\n+\t\tmdelay(330);\n+\t}\n+\n+\n+\t/* Init Input System for Force Feedback (FF) */\n+\tinput_set_capability(idev, EV_FF, FF_RUMBLE);\n+\terror = input_ff_create_memless(idev, NULL, xpadneo_ff_play);\n+\tif (error)\n+\t\treturn error;\n+\n+\n+\t/*\n+\t * Set default values, otherwise tools which depend on the joystick\n+\t * subsystem, report arbitrary values until the first real event\n+\t * TODO: Is this really necessary?\n+\t */\n+\tinput_report_abs(idev, ABS_X,      0);\n+\tinput_report_abs(idev, ABS_Y,      0);\n+\tinput_report_abs(idev, ABS_Z,      0);\n+\tinput_report_abs(idev, ABS_RX,     0);\n+\tinput_report_abs(idev, ABS_RY,     0);\n+\tinput_report_abs(idev, ABS_RZ,     0);\n+\tinput_report_key(idev, BTN_A,      0);\n+\tinput_report_key(idev, BTN_B,      0);\n+\tinput_report_key(idev, BTN_X,      0);\n+\tinput_report_key(idev, BTN_Y,      0);\n+\tinput_report_key(idev, BTN_TR,     0);\n+\tinput_report_key(idev, BTN_TL,     0);\n+\tinput_report_key(idev, BTN_THUMBL, 0);\n+\tinput_report_key(idev, BTN_THUMBR, 0);\n+\tinput_report_key(idev, BTN_START,  0);\n+\tinput_report_key(idev, BTN_MODE,   0);\n+\tinput_report_key(idev, ABS_HAT0X,  0);\n+\tinput_report_key(idev, ABS_HAT0Y,  0);\n+\tinput_sync(idev);\n+\n+\t/* TODO: - do not hardcode codes and values but\n+\t *         keep them in the mapping structures\n+\t *       - maybe initDevice isn't the right place\n+\t */\n+\n+\treturn 0;\n+}\n+\n+\n+/* Callback function which return the available properties to userspace */\n+static int battery_get_property(struct power_supply *ps,\n+\tenum power_supply_property property, union power_supply_propval *val)\n+{\n+\tstruct xpadneo_devdata *xdata = power_supply_get_drvdata(ps);\n+\tunsigned long flags;\n+\tu8 capacity_level, present, online, status;\n+\n+\tspin_lock_irqsave(&xdata->lock, flags);\n+\tcapacity_level = xdata->ps_capacity_level;\n+\tpresent        = xdata->ps_present;\n+\tonline         = xdata->ps_online;\n+\tstatus         = xdata->ps_status;\n+\tspin_unlock_irqrestore(&xdata->lock, flags);\n+\n+\tswitch (property) {\n+\tcase POWER_SUPPLY_PROP_MANUFACTURER:\n+\t\tval->strval = \"Microsoft\";\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_MODEL_NAME:\n+\t\tval->strval = \"Xbox Wireless Controller\";\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_PRESENT:\n+\t\tval->intval = present;\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_ONLINE:\n+\t\tval->intval = online;\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_SCOPE:\n+\t\tval->intval = POWER_SUPPLY_SCOPE_DEVICE;\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_CAPACITY_LEVEL:\n+\t\tval->intval = capacity_level;\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_STATUS:\n+\t\tval->intval = status;\n+\t\tbreak;\n+\tdefault:\n+\t\treturn -EINVAL;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+\n+static int xpadneo_initBatt(struct hid_device *hdev)\n+{\n+\tint ret = 0;\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\n+\tstatic enum power_supply_property battery_props[] = {\n+\t\t/* is a power supply available? always true */\n+\t\tPOWER_SUPPLY_PROP_PRESENT,\n+\t\t/* critical, low, normal, high, full */\n+\t\tPOWER_SUPPLY_PROP_CAPACITY_LEVEL,\n+\t\t/* powers a specific device */\n+\t\tPOWER_SUPPLY_PROP_SCOPE,\n+\t\t/* charging (full, plugged), not_charging */\n+\t\tPOWER_SUPPLY_PROP_STATUS,\n+\t\t/* cstring - manufacturer name */\n+\t\tPOWER_SUPPLY_PROP_MANUFACTURER,\n+\t\t/* cstring - model name */\n+\t\tPOWER_SUPPLY_PROP_MODEL_NAME,\n+\t\tPOWER_SUPPLY_PROP_ONLINE\n+\t};\n+\n+\n+\tstruct power_supply_config ps_config = {\n+\t\t/* pass the xpadneo_data to the get_property function */\n+\t\t.drv_data = xdata\n+\t};\n+\n+\n+\t/* Set up power supply */\n+\n+\t/* Set the battery capacity to 'full' until we get our first real\n+\t * battery event. Prevents false \"critical low battery\" notifications\n+\t */\n+\txdata->ps_capacity_level = POWER_SUPPLY_CAPACITY_LEVEL_FULL;\n+\n+\t/* NOTE: hdev->uniq is meant to be the MAC address and hence\n+\t *       it should be unique. Unfortunately, here it is not unique\n+\t *       neither is it the bluetooth MAC address.\n+\t *       As a solution we add an unique id for every gamepad.\n+\t */\n+\n+\txdata->batt_desc.name = kasprintf(GFP_KERNEL, \"xpadneo_batt_%pMR_%i\",\n+\t\t\t\thdev->uniq, xdata->id);\n+\tif (!xdata->batt_desc.name)\n+\t\treturn -ENOMEM;\n+\n+\txdata->batt_desc.type = POWER_SUPPLY_TYPE_BATTERY;\n+\n+\t/* Which properties of the battery are accessible? */\n+\txdata->batt_desc.properties = battery_props;\n+\txdata->batt_desc.num_properties = ARRAY_SIZE(battery_props);\n+\n+\t/*\n+\t * We have to offer a function which returns the current\n+\t * property values we defined above. Make sure that\n+\t * the get_property functions covers all properties above.\n+\t */\n+\txdata->batt_desc.get_property = battery_get_property;\n+\n+\n+\t/* Advanced power management emulation */\n+\txdata->batt_desc.use_for_apm = 0;\n+\n+\t/* Register power supply for our gamepad device */\n+\txdata->batt = devm_power_supply_register(&hdev->dev,\n+\t\t\t\t\t\t&xdata->batt_desc, &ps_config);\n+\tif (IS_ERR(xdata->batt)) {\n+\t\tret = PTR_ERR(xdata->batt);\n+\t\thid_err(hdev, \"Unable to register battery device\\n\");\n+\t\tgoto err_free;\n+\t} else {\n+\t\thid_dbg_lvl(DBG_LVL_SOME, hdev, \"battery registered\\n\");\n+\t}\n+\n+\tpower_supply_powers(xdata->batt, &hdev->dev);\n+\n+err_free:\n+\tkfree(xdata->batt_desc.name);\n+\txdata->batt_desc.name = NULL;\n+\n+\treturn ret;\n+}\n+\n+\n+enum mapping_behaviour {\n+\tMAP_IGNORE, /* Completely ignore this field */\n+\tMAP_AUTO,   /* Do not really map it, let hid-core decide */\n+\tMAP_STATIC  /* Map to the values given */\n+};\n+\n+struct input_ev {\n+\t/* Map to which input event (EV_KEY, EV_ABS, ...)? */\n+\tu8 event_type;\n+\t/* Map to which input code (BTN_A, ABS_X, ...)? */\n+\tu16 input_code;\n+};\n+\n+u8 map_hid_to_input_windows(struct hid_usage *usage, struct input_ev *map_to)\n+{\n+\n+\t/*\n+\t * Windows report-descriptor (307 byte):\n+\t *\n+\t * 05 01 09 05 a1 01 85 01 09 01 a1 00 09 30 09 31 15 00 27 ff\n+\t * ff 00 00 95 02 75 10 81 02 c0 09 01 a1 00 09 33 09 34 15 00\n+\t * 27 ff ff 00 00 95 02 75 10 81 02 c0 05 01 09 32 15 00 26 ff\n+\t * 03 95 01 75 0a 81 02 15 00 25 00 75 06 95 01 81 03 05 01 09\n+\t * 35 15 00 26 ff 03 95 01 75 0a 81 02 15 00 25 00 75 06 95 01\n+\t * 81 03 05 01 09 39 15 01 25 08 35 00 46 3b 01 66 14 00 75 04\n+\t * 95 01 81 42 75 04 95 01 15 00 25 00 35 00 45 00 65 00 81 03\n+\t * 05 09 19 01 29 0a 15 00 25 01 75 01 95 0a 81 02 15 00 25 00\n+\t * 75 06 95 01 81 03 05 01 09 80 85 02 a1 00 09 85 15 00 25 01\n+\t * 95 01 75 01 81 02 15 00 25 00 75 07 95 01 81 03 c0 05 0f 09\n+\t * 21 85 03 a1 02 09 97 15 00 25 01 75 04 95 01 91 02 15 00 25\n+\t * 00 75 04 95 01 91 03 09 70 15 00 25 64 75 08 95 04 91 02 09\n+\t * 50 66 01 10 55 0e 15 00 26 ff 00 75 08 95 01 91 02 09 a7 15\n+\t * 00 26 ff 00 75 08 95 01 91 02 65 00 55 00 09 7c 15 00 26 ff\n+\t * 00 75 08 95 01 91 02 c0 85 04 05 06 09 20 15 00 26 ff 00 75\n+\t * 08 95 01 81 02 c0 00\n+\t */\n+\n+\tunsigned int hid_usage = usage->hid & HID_USAGE;\n+\tunsigned int hid_usage_page = usage->hid & HID_USAGE_PAGE;\n+\n+\tswitch (hid_usage_page) {\n+\tcase HID_UP_BUTTON:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0x01:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_A};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x02:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_B};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x03:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_X};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x04:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_Y};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x05:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_TL};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x06:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_TR};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x07:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_SELECT};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x08:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_START};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x09:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_THUMBL};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x0A:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_THUMBR};\n+\t\t\treturn MAP_STATIC;\n+\t\t}\n+\tcase HID_UP_GENDESK:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0x30:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_X};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x31:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_Y};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x32:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_Z};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x33:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RX};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x34:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RY};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x35:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RZ};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x39:\n+\t\t\t*map_to = (struct input_ev){0, 0};\n+\t\t\treturn MAP_AUTO;\n+\t\tcase 0x85:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_MODE};\n+\t\t\treturn MAP_STATIC;\n+\t\t}\n+\t}\n+\n+\treturn MAP_IGNORE;\n+}\n+\n+u8 map_hid_to_input_linux(struct hid_usage *usage, struct input_ev *map_to)\n+{\n+\n+\t/*\n+\t * Linux report-descriptor (335 byte):\n+\t *\n+\t * 05 01 09 05 a1 01 85 01 09 01 a1 00 09 30 09 31 15 00 27 ff\n+\t * ff 00 00 95 02 75 10 81 02 c0 09 01 a1 00 09 32 09 35 15 00\n+\t * 27 ff ff 00 00 95 02 75 10 81 02 c0 05 02 09 c5 15 00 26 ff\n+\t * 03 95 01 75 0a 81 02 15 00 25 00 75 06 95 01 81 03 05 02 09\n+\t * c4 15 00 26 ff 03 95 01 75 0a 81 02 15 00 25 00 75 06 95 01\n+\t * 81 03 05 01 09 39 15 01 25 08 35 00 46 3b 01 66 14 00 75 04\n+\t * 95 01 81 42 75 04 95 01 15 00 25 00 35 00 45 00 65 00 81 03\n+\t * 05 09 19 01 29 0f 15 00 25 01 75 01 95 0f 81 02 15 00 25 00\n+\t * 75 01 95 01 81 03 05 0c 0a 24 02 15 00 25 01 95 01 75 01 81\n+\t * 02 15 00 25 00 75 07 95 01 81 03 05 0c 09 01 85 02 a1 01 05\n+\t * 0c 0a 23 02 15 00 25 01 95 01 75 01 81 02 15 00 25 00 75 07\n+\t * 95 01 81 03 c0 05 0f 09 21 85 03 a1 02 09 97 15 00 25 01 75\n+\t * 04 95 01 91 02 15 00 25 00 75 04 95 01 91 03 09 70 15 00 25\n+\t * 64 75 08 95 04 91 02 09 50 66 01 10 55 0e 15 00 26 ff 00 75\n+\t * 08 95 01 91 02 09 a7 15 00 26 ff 00 75 08 95 01 91 02 65 00\n+\t * 55 00 09 7c 15 00 26 ff 00 75 08 95 01 91 02 c0 85 04 05 06\n+\t * 09 20 15 00 26 ff 00 75 08 95 01 81 02 c0 00\n+\t */\n+\n+\tunsigned int hid_usage = usage->hid & HID_USAGE;\n+\tunsigned int hid_usage_page = usage->hid & HID_USAGE_PAGE;\n+\n+\tswitch (hid_usage_page) {\n+\tcase HID_UP_BUTTON:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0x01:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_A};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x02:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_B};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x04:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_X};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x05:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_Y};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x07:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_TL};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x08:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_TR};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x0C:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_START};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x0E:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_THUMBL};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x0F:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_THUMBR};\n+\t\t\treturn MAP_STATIC;\n+\t\t}\n+\tcase HID_UP_CONSUMER:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0x223:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_MODE};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x224:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_SELECT};\n+\t\t\treturn MAP_STATIC;\n+\t\t}\n+\tcase HID_UP_GENDESK:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0x30:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_X};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x31:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_Y};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x32:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RX};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x35:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RY};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x39:\n+\t\t\t*map_to = (struct input_ev){0, 0};\n+\t\t\treturn MAP_AUTO;\n+\t\t}\n+\tcase HID_UP_SIMULATION:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0xC4:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RZ};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0xC5:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_Z};\n+\t\t\treturn MAP_STATIC;\n+\t\t}\n+\t}\n+\n+\treturn MAP_IGNORE;\n+}\n+\n+\n+/*\n+ * Input Mapping Hook\n+ *\n+ * Invoked at input registering before mapping an usage\n+ * (called once for every hid-usage).\n+ */\n+\n+static int xpadneo_mapping(struct hid_device *hdev, struct hid_input *hi,\n+\t\t\t   struct hid_field *field, struct hid_usage *usage,\n+\t\t\t   unsigned long **bit, int *max)\n+{\n+\t/* Return values */\n+\tenum {\n+\t\tRET_MAP_IGNORE = -1,   /* completely ignore this input */\n+\t\tRET_MAP_AUTO,        /* let hid-core autodetect the mapping */\n+\t\tRET_MAP_STATIC       /* mapped by hand, no further processing */\n+\t};\n+\n+\tstruct input_ev map_to;\n+\tu8 (*perform_mapping)(struct hid_usage *usage, struct input_ev *map_to);\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\n+\n+\tswitch (xdata->report_descriptor) {\n+\tcase LINUX:\n+\t\tperform_mapping = map_hid_to_input_linux;\n+\t\tbreak;\n+\tcase WINDOWS:\n+\t\tperform_mapping = map_hid_to_input_windows;\n+\t\tbreak;\n+\tdefault:\n+\t\treturn RET_MAP_AUTO;\n+\t}\n+\n+\n+\tswitch (perform_mapping(usage, &map_to)) {\n+\tcase MAP_AUTO:\n+\t\thid_dbg_lvl(DBG_LVL_FEW, hdev,\n+\t\t\"UP: 0x%04X, USG: 0x%04X -> automatically\\n\",\n+\t\tusage->hid & HID_USAGE_PAGE, usage->hid & HID_USAGE);\n+\n+\t\treturn RET_MAP_AUTO;\n+\n+\tcase MAP_IGNORE:\n+\t\thid_dbg_lvl(DBG_LVL_FEW, hdev,\n+\t\t\"UP: 0x%04X, USG: 0x%04X -> ignored\\n\",\n+\t\tusage->hid & HID_USAGE_PAGE, usage->hid & HID_USAGE);\n+\n+\t\treturn RET_MAP_IGNORE;\n+\n+\tcase MAP_STATIC:\n+\t\thid_dbg_lvl(DBG_LVL_FEW, hdev,\n+\t\t\"UP: 0x%04X, USG: 0x%04X -> EV: 0x%03X, INP: 0x%03X\\n\",\n+\t\tusage->hid & HID_USAGE_PAGE, usage->hid & HID_USAGE,\n+\t\tmap_to.event_type, map_to.input_code);\n+\n+\t\thid_map_usage_clear(hi, usage, bit, max,\n+\t\t\t\t\tmap_to.event_type, map_to.input_code);\n+\t\treturn RET_MAP_STATIC;\n+\n+\t}\n+\n+\t/* Something went wrong, ignore this field */\n+\treturn RET_MAP_IGNORE;\n+}\n+\n+\n+/*\n+ * Report Descriptor Fixup Hook\n+ *\n+ * You can either modify the original report in place and just\n+ * return the original start address (rdesc) or you reserve a new\n+ * one and return a pointer to it. In the latter, you mostly have to\n+ * modify the rsize value too.\n+ */\n+\n+static u8 *xpadneo_report_fixup(struct hid_device *hdev, u8 *rdesc,\n+\t\t\t\tunsigned int *rsize)\n+{\n+\thid_dbg_lvl(DBG_LVL_SOME, hdev,\t\"REPORT (DESCRIPTOR) FIXUP HOOK\\n\");\n+\tdbg_hex_dump_lvl(DBG_LVL_FEW, \"xpadneo: report-descr: \", rdesc, *rsize);\n+\n+\treturn rdesc;\n+}\n+\n+\n+static void parse_raw_event_battery(struct hid_device *hdev, u8 *data,\n+\t\t\t\t    int reportsize)\n+{\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\tunsigned long flags;\n+\tu8 capacity_level, present, online, status;\n+\n+\n+\t/*  msb          ID 04          lsb\n+\t * +---+---+---+---+---+---+---+---+\n+\t * | O | R | E | C | M | M | L | L |\n+\t * +---+---+---+---+---+---+---+---+\n+\t *\n+\t * O: Online\n+\t * R: Reserved / Unused\n+\t * E: Error (?) / Unknown\n+\t * C: Charging, I mean really charging the battery (P 'n C)\n+\t *              not (only) the power cord powering the controller\n+\t * M M: Mode\n+\t *   00: Powered by USB\n+\t *   01: Powered by (disposable) batteries\n+\t *   10: Powered by Play 'n Charge battery pack (only, no cable)\n+\t * L L: Capacity Level\n+\t *   00: (Super) Critical\n+\t *   01: Low\n+\t *   10: Medium\n+\t *   11: Full\n+\t */\n+\n+\n+\t/* I think \"online\" means whether the dev is online or shutting down */\n+\tonline = (data[1] & 0x80) >> 7;\n+\n+\t/* The _battery_ is only present if not powered by USB */\n+\tpresent = ((data[1] & 0x0C) != 0x00);\n+\n+\t/* Capacity level, only valid as long as the battery is present */\n+\tswitch (data[1] & 0x03) {\n+\tcase 0x00:\n+\t\tcapacity_level = POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL;\n+\t\tbreak;\n+\tcase 0x01:\n+\t\tcapacity_level = POWER_SUPPLY_CAPACITY_LEVEL_LOW;\n+\t\tbreak;\n+\tcase 0x02:\n+\t\tcapacity_level = POWER_SUPPLY_CAPACITY_LEVEL_NORMAL;\n+\t\tbreak;\n+\tcase 0x03:\n+\t\tcapacity_level = POWER_SUPPLY_CAPACITY_LEVEL_HIGH;\n+\t\tbreak;\n+\t}\n+\n+\t/* Is the (Play 'n Charge) battery charging right now? */\n+\tswitch ((data[1] & 0x10) >> 4) {\n+\tcase 0:\n+\t\tstatus = POWER_SUPPLY_STATUS_DISCHARGING;\n+\t\tbreak;\n+\tcase 1:\n+\t\tstatus = POWER_SUPPLY_STATUS_CHARGING;\n+\t\tbreak;\n+\t}\n+\n+\tspin_lock_irqsave(&xdata->lock, flags);\n+\txdata->ps_status = status;\n+\txdata->ps_capacity_level = capacity_level;\n+\txdata->ps_online = online;\n+\txdata->ps_present = present;\n+\tspin_unlock_irqrestore(&xdata->lock, flags);\n+\n+\tpower_supply_changed(xdata->batt);\n+}\n+\n+static void check_report_behaviour(struct hid_device *hdev, u8 *data,\n+\t\t\t\t   int reportsize)\n+{\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\n+\t/*\n+\t * The length of the first input report with an ID of 0x01\n+\t * reveals which report-type the controller is actually\n+\t * sending (windows: 16, or linux: 17).\n+\t */\n+\tif (xdata->report_behaviour == UNKNOWN) {\n+\t\tswitch (reportsize) {\n+\t\tcase 16:\n+\t\t\txdata->report_behaviour = WINDOWS;\n+\t\t\tbreak;\n+\t\tcase 17:\n+\t\t\txdata->report_behaviour = LINUX;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\txdata->report_behaviour = UNKNOWN;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\thid_dbg_lvl(DBG_LVL_SOME, hdev, \"desc: %s, beh: %s\\n\",\n+\t\treport_type_text[xdata->report_descriptor],\n+\t\treport_type_text[xdata->report_behaviour]);\n+\n+\t/* TODO:\n+\t * Maybe the best solution would be to replace the report descriptor\n+\t * in case that the wrong reports are sent. Unfortunately we do not\n+\t * know if the report descriptor is the right one until the first\n+\t * report is sent to us. At this time, the report_fixup hook is\n+\t * already over and the original descriptor is parsed into hdev\n+\t * i.e. report_enum and collection.\n+\t *\n+\t * The next best solution would be to replace the report with\n+\t * ID 0x01 with the right one in report_enum (and collection?).\n+\t * I don't know yet how this would works, perhaps like this:\n+\t * - create a new report struct\n+\t * - fill it by hand\n+\t * - add all neccessary fields (automatic way?)\n+\t *\n+\t * Another way to fix it is:\n+\t * - Register another report with a _new_ ID by hand\n+\t *   (unfortunately we cannot use the same id again)\n+\t * - in raw_event: change the ID from 0x01 to the new one if\n+\t *   necessary. leave it if not.\n+\t *\n+\t * What we currently do is:\n+\t * We examine every report and fire the input events by hand.\n+\t * That's not very generic.\n+\t *\n+\t */\n+\n+\n+\t// TODO:\n+\t// * remove old report using list operations\n+\t// * create new one like they do in hid_register_report\n+\t// * add it to output_reports->report_list and array\n+\n+}\n+\n+/*\n+ * HID Raw Event Hook\n+ */\n+\n+int xpadneo_raw_event(struct hid_device *hdev, struct hid_report *report,\n+\t\t      u8 *data, int reportsize)\n+{\n+\t/* Return Codes */\n+\tenum {\n+\t\tRAWEV_CONT_PROCESSING, /* Let the hid-core autodetect the event */\n+\t\tRAWEV_STOP_PROCESSING  /* Stop further processing */\n+\t};\n+\n+\t//hid_dbg_lvl(DBG_LVL_SOME, hdev, \"RAW EVENT HOOK\\n\");\n+\n+\tdbg_hex_dump_lvl(DBG_LVL_SOME, \"xpadneo: raw_event: \", data, reportsize);\n+\t//hid_dbg_lvl(DBG_LVL_ALL, hdev, \"report->size: %d\\n\", (report->size)/8);\n+\t//hid_dbg_lvl(DBG_LVL_ALL, hdev, \"data size (wo id): %d\\n\", reportsize-1);\n+\n+\n+\tswitch (report->id) {\n+\tcase 01:\n+\t\tcheck_report_behaviour(hdev, data, reportsize);\n+\t\tbreak;\n+\tcase 04:\n+\t\tparse_raw_event_battery(hdev, data, reportsize);\n+\t\treturn RAWEV_STOP_PROCESSING;\n+\t}\n+\n+\t/* Continue processing */\n+\treturn RAWEV_CONT_PROCESSING;\n+}\n+\n+\n+void xpadneo_report(struct hid_device *hdev, struct hid_report *report)\n+{\n+\thid_dbg_lvl(DBG_LVL_SOME, hdev, \"REPORT HOOK\\n\");\n+}\n+\n+\n+/*\n+ * Input Configured Hook\n+ *\n+ * We have to fix up the key-bitmap, because there is\n+ * no DPAD_UP, _RIGHT, _DOWN, _LEFT on the device by default\n+ *\n+ */\n+\n+static int xpadneo_input_configured(struct hid_device *hdev,\n+\t\t\t\t    struct hid_input *hi)\n+{\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\n+\t/* set a pointer to the logical input device at the device structure */\n+\txdata->idev = hi->input;\n+\n+\thid_dbg_lvl(DBG_LVL_SOME, hdev, \"INPUT CONFIGURED HOOK\\n\");\n+\n+\tif (param_fake_dev_version) {\n+\t\txdata->idev->id.version = (u16) param_fake_dev_version;\n+\t\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"Fake device version: 0x%04X\\n\",\n+\t\t\tparam_fake_dev_version);\n+\t}\n+\n+\n+\t// The HID device descriptor defines a range from 0 to 65535 for all\n+\t// absolute axis (like ABS_X), this is in contrary to what the linux\n+\t// gamepad specification defines [–32.768; 32.767].\n+\t// Therefore, we have to set the min, max, fuzz and flat values by hand:\n+\n+\tinput_set_abs_params(xdata->idev, ABS_X, -32768, 32767, 255, 4095);\n+\tinput_set_abs_params(xdata->idev, ABS_Y, -32768, 32767, 255, 4095);\n+\n+\tinput_set_abs_params(xdata->idev, ABS_RX, -32768, 32767, 255, 4095);\n+\tinput_set_abs_params(xdata->idev, ABS_RY, -32768, 32767, 255, 4095);\n+\n+\tif (param_combined_z_axis)\n+\t\tinput_set_abs_params(xdata->idev, ABS_Z, -1024, 1023, 3, 63);\n+\n+\t// furthermore, we need to translate the incoming events to fit within\n+\t// the new range, we will do that in the xpadneo_event() hook.\n+\n+\t// We remove the ABS_RZ event if param_combined_z_axis is enabled\n+\tif (param_combined_z_axis) {\n+\t\t__clear_bit(ABS_RZ, xdata->idev->absbit);\n+\t}\n+\n+\treturn 0;\n+}\n+\n+\n+/*\n+ * Event Hook\n+ *\n+ * This hook is called whenever an event occurs that is listed on\n+ * xpadneo_driver.usage_table (which is NULL in our case, therefore it is\n+ * invoked on every event).\n+ *\n+ * Before we can send additional input events, we have to enable\n+ * the corresponding keys in xpadneo_input_configured.\n+ */\n+\n+int xpadneo_event(struct hid_device *hdev, struct hid_field *field,\n+\t\t  struct hid_usage *usage, __s32 value)\n+{\n+\t/* Return Codes */\n+\tenum {\n+\t\tEV_CONT_PROCESSING, /* Let the hid-core autodetect the event */\n+\t\tEV_STOP_PROCESSING  /* Stop further processing */\n+\t};\n+\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\tstruct input_dev *idev = xdata->idev;\n+\n+\tu16 usg_type = usage->type;\n+\tu16 usg_code = usage->code;\n+\n+\n+\thid_dbg_lvl(DBG_LVL_ALL, hdev,\n+\t\t\"hid-up: %02x, hid-usg: %02x, input-code: %02x, value: %02x\\n\",\n+\t\t(usage->hid & HID_USAGE_PAGE), (usage->hid & HID_USAGE),\n+\t\tusage->code, value);\n+\n+\n+\t// we have to shift the range of the analogues sticks (ABS_X/Y/RX/RY)\n+\t// as already explained in xpadneo_input_configured() above\n+\t// furthermore we need to combine ABS_Z and ABS_RZ if param_combined_z_axis\n+\t// is set\n+\n+\tif (usg_type == EV_ABS) {\n+\t\tif (usg_code == ABS_X || usg_code == ABS_Y\n+\t\t\t\t|| usg_code == ABS_RX || usg_code == ABS_RY) {\n+\t\t\thid_dbg_lvl(DBG_LVL_ALL, hdev, \"shifted axis %02x, old value: %i, new value: %i\\n\", usg_code, value, value - 32768);\n+\t\t\tinput_report_abs(idev, usg_code, value - 32768);\n+\t\t\tgoto sync_and_stop_processing;\n+\t\t}\n+\n+\t\tif (param_combined_z_axis) {\n+\t\t\tif (usg_code == ABS_Z || usg_code == ABS_RZ) {\n+\t\t\t\tif (usg_code == ABS_Z)\n+\t\t\t\t\txdata->last_abs_z = value;\n+\t\t\t\tif (usg_code == ABS_RZ)\n+\t\t\t\t\txdata->last_abs_rz = value;\n+\n+\t\t\t\tinput_report_abs(idev, ABS_Z, 0 - xdata->last_abs_z + xdata->last_abs_rz);\n+\t\t\t\tgoto sync_and_stop_processing;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\n+\n+\n+\t/* TODO:\n+\t * This is a workaround for the wrong report (Windows report but\n+\t * Linux descriptor). We would prefer to fixup the descriptor, but we\n+\t * cannot fix it anymore at the time we recognize the wrong behaviour,\n+\t * hence we will fire the input events by hand.\n+\t */\n+\n+\tif (xdata->report_behaviour == WINDOWS\n+\t\t\t\t\t&& xdata->report_descriptor == LINUX) {\n+\n+\t\t/*\n+\t\t * we fix all buttons by hand. You may think that we\n+\t\t * could do that by using the windows_map too, but it is more\n+\t\t * like an coincidence that this would work in this case:\n+\t\t * It would only, because HID_UP_BUTTONS has no special names\n+\t\t * for the HID_USAGE's, therefore the first button stays 0x01\n+\t\t * on both reports (windows and linux) - it is a 1: 1 mapping.\n+\t\t * But this is not true in general (i.e. for other USAGE_PAGES)\n+\t\t */\n+\n+\t\tif ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) {\n+\t\t\tswitch (usage->hid & HID_USAGE) {\n+\t\t\tcase 0x01:\n+\t\t\t\tinput_report_key(idev, BTN_A, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x02:\n+\t\t\t\tinput_report_key(idev, BTN_B, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x03:\n+\t\t\t\tinput_report_key(idev, BTN_X, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x04:\n+\t\t\t\tinput_report_key(idev, BTN_Y, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x05:\n+\t\t\t\tinput_report_key(idev, BTN_TL, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x06:\n+\t\t\t\tinput_report_key(idev, BTN_TR, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x07:\n+\t\t\t\tinput_report_key(idev, BTN_SELECT, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x08:\n+\t\t\t\tinput_report_key(idev, BTN_START, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x09:\n+\t\t\t\tinput_report_key(idev, BTN_THUMBL, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x0A:\n+\t\t\t\tinput_report_key(idev, BTN_THUMBR, value);\n+\t\t\t\tbreak;\n+\t\t\t}\n+\n+\t\t\thid_dbg_lvl(DBG_LVL_ALL, hdev,\n+\t\t\t\t\"hid-upage: %02x, hid-usage: %02x fixed\\n\",\n+\t\t\t\t(usage->hid & HID_USAGE_PAGE),\n+\t\t\t\t(usage->hid & HID_USAGE));\n+\n+\t\t\tgoto sync_and_stop_processing;\n+\t\t}\n+\t}\n+\n+\treturn EV_CONT_PROCESSING;\n+\n+sync_and_stop_processing:\n+\tinput_sync(idev);\n+\treturn EV_STOP_PROCESSING;\n+\n+}\n+\n+\n+/* Device Probe and Remove Hook */\n+\n+static int xpadneo_probe_device(struct hid_device *hdev,\n+\t\t\t\tconst struct hid_device_id *id)\n+{\n+\tint ret;\n+\tstruct xpadneo_devdata *xdata;\n+\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"probing device: %s\\n\", hdev->name);\n+\n+\n+\t/*\n+\t * Create a per-device data structure which is \"nearly globally\" accessible\n+\t * through hid_get_drvdata. The structure is freed automatically\n+\t * as soon as hdev->dev (the device) is removed, since we use the devm_\n+\t * derivate.\n+\t */\n+\txdata = devm_kzalloc(&hdev->dev, sizeof(*xdata), GFP_KERNEL);\n+\tif (xdata == NULL)\n+\t\treturn -ENOMEM;\n+\n+\txdata->id = ida_simple_get(&xpadneo_device_id_allocator,\n+\t\t\t0, 0, GFP_KERNEL);\n+\n+\txdata->hdev = hdev;\n+\n+\t/* Unknown until first report with ID 01 arrives (see raw_event) */\n+\txdata->report_behaviour = UNKNOWN;\n+\n+\tswitch (hdev->dev_rsize) {\n+\tcase 307:\n+\t\txdata->report_descriptor = WINDOWS;\n+\t\tbreak;\n+\tcase 335:\n+\t\txdata->report_descriptor = LINUX;\n+\t\tbreak;\n+\tdefault:\n+\t\txdata->report_descriptor = UNKNOWN;\n+\t\tbreak;\n+\t}\n+\n+\thid_set_drvdata(hdev, xdata);\n+\n+\n+\t/* Parse the raw report (includes a call to report_fixup) */\n+\tret = hid_parse(hdev);\n+\tif (ret) {\n+\t\thid_err(hdev, \"parse failed\\n\");\n+\t\tgoto return_error;\n+\t}\n+\n+\t/* Debug Output*/\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"driver:\\n\");\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* version: %s\\n\", DRV_VER);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"hdev:\\n\");\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* raw rdesc: (unfixed, see above)\\n\");\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* raw rsize: %u\\n\", hdev->dev_rsize);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* bus: 0x%04X\\n\", hdev->bus);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* report group: %u\\n\", hdev->group);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* vendor: 0x%08X\\n\", hdev->vendor);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* version: 0x%08X\\n\", hdev->version);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* product: 0x%08X\\n\", hdev->product);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* country: %u\\n\", hdev->country);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* driverdata: %lu\\n\", id->driver_data);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* serial: %pMR\\n\", hdev->uniq);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* physical location: %pMR\\n\", hdev->phys);\n+\n+\t/* We start our hardware without FF, we will add it afterwards by hand\n+\t * HID_CONNECT_DEFAULT = (HID_CONNECT_HIDINPUT | HID_CONNECT_HIDRAW\n+\t *                        | HID_CONNECT_HIDDEV | HID_CONNECT_FF)\n+\t * Our Input Device is created automatically since we defined\n+\t * HID_CONNECT_HIDINPUT as one of the flags.\n+\t */\n+\tret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF);\n+\tif (ret) {\n+\t\thid_err(hdev, \"hw start failed\\n\");\n+\t\tgoto return_error;\n+\t}\n+\n+\t/* Call the device initialization routines */\n+\tret = xpadneo_initDevice(hdev);\n+\tif (ret) {\n+\t\thid_err(hdev, \"device initialization failed\\n\");\n+\t\tgoto return_error;\n+\t}\n+\n+\tret = xpadneo_initBatt(hdev);\n+\tif (ret) {\n+\t\thid_err(hdev, \"battery initialization failed\\n\");\n+\t\tgoto return_error;\n+\t}\n+\n+\n+\t/* Everything is fine */\n+\treturn 0;\n+\n+return_error:\n+\treturn ret;\n+}\n+\n+\n+static void xpadneo_remove_device(struct hid_device *hdev)\n+{\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\n+\thid_hw_close(hdev);\n+\n+\t/* Cleaning up here */\n+\tida_simple_remove(&xpadneo_device_id_allocator, xdata->id);\n+\n+\thid_hw_stop(hdev);\n+\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"Goodbye %s!\\n\", hdev->name);\n+}\n+\n+\n+\n+/*\n+ * Device ID Structure, define all supported devices here\n+ */\n+\n+static const struct hid_device_id xpadneo_devices[] = {\n+\n+\t/*\n+\t * The ProductID is somehow related to the Firmware Version,\n+\t * but it somehow changed back from 0x02FD (newer fw) to 0x02E0 (older)\n+\t * and vice versa on one controller here.\n+\t *\n+\t * Unfortunately you cannot tell from product id how the gamepad really\n+\t * behaves on reports, since the newer firmware supports both mappings\n+\t * (the one which is standard in linux and the old one, which is still\n+\t * used in windows).\n+\t */\n+\n+\t/* XBOX ONE S / X */\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, 0x02FD) },\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, 0x02E0) },\n+\t/* SENTINEL VALUE, indicates the end*/\n+\t{ }\n+};\n+\n+static struct hid_driver xpadneo_driver = {\n+\t/* The name of the driver */\n+\t.name = \"xpadneo\",\n+\n+\t/* Which devices is this driver for */\n+\t.id_table = xpadneo_devices,\n+\n+\t/* Hooked as the input device is configured (before it is registered)\n+\t * we need that because we do not configure the input-device ourself\n+\t * but leave it up to hid_hw_start()\n+\t */\n+\t.input_configured = xpadneo_input_configured,\n+\n+\t/* Invoked on input registering before mapping an usage */\n+\t.input_mapping = xpadneo_mapping,\n+\n+\t/* If usage in usage_table, this hook is called */\n+\t.event = xpadneo_event,\n+\n+\t/* Called before report descriptor parsing (NULL means nop) */\n+\t.report_fixup = xpadneo_report_fixup,\n+\n+\t/* Called when a new device is inserted */\n+\t.probe = xpadneo_probe_device,\n+\n+\t/* Called when a device is removed */\n+\t.remove = xpadneo_remove_device,\n+\n+\t/* If report in report_table, this hook is called */\n+\t.raw_event = xpadneo_raw_event,\n+\n+\t.report = xpadneo_report\n+};\n+\n+MODULE_DEVICE_TABLE(hid, xpadneo_devices);\n+\n+\n+\n+/*\n+ * Module Init and Exit\n+ *\n+ * We may replace init and remove by module_hid_driver(xpadneo_driver)\n+ * in future versions, as long as there is nothing special in these two\n+ * functions (but registering and unregistering the driver). Up to now it is\n+ * more useful for us to not \"oversimplify\" the whole driver-registering thing.\n+ *\n+ * Caution: do not use both! (module_hid_driver and hid_(un)register_driver)\n+ */\n+\n+static int __init xpadneo_initModule(void)\n+{\n+\tpr_info(\"%s: hello there!\\n\", xpadneo_driver.name);\n+\n+\treturn hid_register_driver(&xpadneo_driver);\n+}\n+\n+static void __exit xpadneo_exitModule(void)\n+{\n+\thid_unregister_driver(&xpadneo_driver);\n+\n+\tida_destroy(&xpadneo_device_id_allocator);\n+\n+\tpr_info(\"%s: goodbye!\\n\", xpadneo_driver.name);\n+}\n+\n+/*\n+ * Tell the driver system which functions to call at initialization and\n+ * removal of the module\n+ */\n+module_init(xpadneo_initModule);\n+module_exit(xpadneo_exitModule);\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/linux-10-add-compatibility-macro-for-input_event_sec.patch",
    "content": "just define from\nhttps://github.com/torvalds/linux/commit/152194fe9c3f03232b9c0d0264793a7fa4af82f8\n\n--- a/include/uapi/linux/input.h\t2022-08-05 19:02:56.906792582 +0200\n+++ b/include/uapi/linux/input.h\t2022-08-05 19:03:30.788834870 +0200\n@@ -24,6 +24,8 @@\n \n struct input_event {\n \tstruct timeval time;\n+#define input_event_sec time.tv_sec\n+#define input_event_usec time.tv_usec\n \t__u16 type;\n \t__u16 code;\n \t__s32 value;\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/linux-netlink-fix_add-variables-needed-for-iwd-package.patch",
    "content": "From 617fa738d27dddecaaee795a5ce3b19b73d013ea Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Wed, 24 May 2023 12:59:57 +0200\nSubject: [PATCH] netlink: add variables needed for 'iwd' package\n\n---\n include/uapi/linux/netlink.h | 27 +++++++++++++++++++++++++++\n 1 file changed, 27 insertions(+)\n\ndiff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h\nindex b5b4fd791fc8..12ba27180dbf 100644\n--- a/include/uapi/linux/netlink.h\n+++ b/include/uapi/linux/netlink.h\n@@ -68,6 +68,10 @@ struct nlmsghdr {\n #define NLM_F_CREATE\t0x400\t/* Create, if it does not exist\t*/\n #define NLM_F_APPEND\t0x800\t/* Add to end of list\t\t*/\n \n+/* ACK message flags. */\n+#define NLM_F_CAPPED            0x100\n+#define NLM_F_ACK_TLVS          0x200\n+\n /*\n    4.4BSD ADD\t\tNLM_F_CREATE|NLM_F_EXCL\n    4.4BSD CHANGE\tNLM_F_REPLACE\n@@ -102,6 +106,28 @@ struct nlmsgerr {\n \tstruct nlmsghdr msg;\n };\n \n+/**\n+ * enum nlmsgerr_attrs - nlmsgerr attributes\n+ * @NLMSGERR_ATTR_UNUSED: unused\n+ * @NLMSGERR_ATTR_MSG: error message string (string)\n+ * @NLMSGERR_ATTR_OFFS: offset of the invalid attribute in the original\n+ *\t message, counting from the beginning of the header (u32)\n+ * @NLMSGERR_ATTR_COOKIE: arbitrary subsystem specific cookie to\n+ *\tbe used - in the success case - to identify a created\n+ *\tobject or operation or similar (binary)\n+ * @__NLMSGERR_ATTR_MAX: number of attributes\n+ * @NLMSGERR_ATTR_MAX: highest attribute number\n+ */\n+enum nlmsgerr_attrs {\n+\tNLMSGERR_ATTR_UNUSED,\n+\tNLMSGERR_ATTR_MSG,\n+\tNLMSGERR_ATTR_OFFS,\n+\tNLMSGERR_ATTR_COOKIE,\n+\n+\t__NLMSGERR_ATTR_MAX,\n+\tNLMSGERR_ATTR_MAX = __NLMSGERR_ATTR_MAX - 1\n+};\n+\n #define NETLINK_ADD_MEMBERSHIP\t\t1\n #define NETLINK_DROP_MEMBERSHIP\t\t2\n #define NETLINK_PKTINFO\t\t\t3\n@@ -114,6 +140,7 @@ struct nlmsgerr {\n #define NETLINK_LISTEN_ALL_NSID\t\t8\n #define NETLINK_LIST_MEMBERSHIPS\t9\n #define NETLINK_CAP_ACK\t\t\t10\n+#define NETLINK_EXT_ACK\t\t\t11\n \n struct nl_pktinfo {\n \t__u32\tgroup;\n-- \n2.40.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/linux-temp-02-fo_on_source.patch",
    "content": "diff --git a/drivers/amlogic/media/enhancement/amvecm/amcsc.c b/drivers/amlogic/media/enhancement/amvecm/amcsc.c\nindex ac9a91d9fa8c..6e32156a51d6 100644\n--- a/drivers/amlogic/media/enhancement/amvecm/amcsc.c\n+++ b/drivers/amlogic/media/enhancement/amvecm/amcsc.c\n@@ -3836,8 +3836,7 @@ uint32_t sink_hdr_support(const struct vinfo_s *vinfo)\n \n \t/* when policy == follow sink(0) or force output (2) */\n \t/* use force_output */\n-\tif ((get_force_output() != 0)\n-\t&& (get_hdr_policy() != 1)) {\n+\tif ((get_force_output() != 0)) {\n \t\tswitch (get_force_output()) {\n \t\tcase BT709:\n \t\t\tbreak;\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/linux/linux-uapi-fix_linux-if.h-userspace-compilation-errors.patch",
    "content": "From 2618be7dccf8739b89e1906b64bd8d551af351e6 Mon Sep 17 00:00:00 2001\nFrom: \"Dmitry V. Levin\" <ldv@altlinux.org>\nDate: Mon, 20 Feb 2017 14:58:41 +0300\nSubject: [PATCH] uapi: fix linux/if.h userspace compilation errors\n\nInclude <sys/socket.h> (guarded by ifndef __KERNEL__) to fix\nthe following linux/if.h userspace compilation errors:\n\n/usr/include/linux/if.h:234:19: error: field 'ifru_addr' has incomplete type\n   struct sockaddr ifru_addr;\n/usr/include/linux/if.h:235:19: error: field 'ifru_dstaddr' has incomplete type\n   struct sockaddr ifru_dstaddr;\n/usr/include/linux/if.h:236:19: error: field 'ifru_broadaddr' has incomplete type\n   struct sockaddr ifru_broadaddr;\n/usr/include/linux/if.h:237:19: error: field 'ifru_netmask' has incomplete type\n   struct sockaddr ifru_netmask;\n/usr/include/linux/if.h:238:20: error: field 'ifru_hwaddr' has incomplete type\n   struct  sockaddr ifru_hwaddr;\n\nThis also fixes userspace compilation of the following uapi headers:\n  linux/atmbr2684.h\n  linux/gsmmux.h\n  linux/if_arp.h\n  linux/if_bonding.h\n  linux/if_frad.h\n  linux/if_pppox.h\n  linux/if_tunnel.h\n  linux/netdevice.h\n  linux/route.h\n  linux/wireless.h\n\nAs no uapi header provides a definition of struct sockaddr, inclusion\nof <sys/socket.h> seems to be the most conservative and the only safe\nfix available.\n\nAll current users of <linux/if.h> are very likely to be including\n<sys/socket.h> already because the latter is the sole provider\nof struct sockaddr definition in libc, so adding a uapi header\nwith a definition of struct sockaddr would create a potential\nconflict with <sys/socket.h>.\n\nReplacing struct sockaddr in the definition of struct ifreq with\na different type would create a potential incompatibility with current\nusers of struct ifreq who might rely on ifru_addr et al members being\nof type struct sockaddr.\n\nSigned-off-by: Dmitry V. Levin <ldv@altlinux.org>\nSigned-off-by: David S. Miller <davem@davemloft.net>\n---\n include/uapi/linux/if.h | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/include/uapi/linux/if.h b/include/uapi/linux/if.h\nindex 1158a043342ac6..259617a551f251 100644\n--- a/include/uapi/linux/if.h\n+++ b/include/uapi/linux/if.h\n@@ -24,6 +24,10 @@\n #include <linux/socket.h>\t\t/* for \"struct sockaddr\" et al\t*/\n #include <linux/compiler.h>\t\t/* for \"__user\" et al           */\n \n+#ifndef __KERNEL__\n+#include <sys/socket.h>\t\t\t/* for struct sockaddr.\t\t*/\n+#endif\n+\n #if __UAPI_DEF_IF_IFNAMSIZ\n #define\tIFNAMSIZ\t16\n #endif /* __UAPI_DEF_IF_IFNAMSIZ */\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-ng-dv/patches/systemd/systemd-ignore-sdcardfs-from-linux.patch",
    "content": "ignore sdcardfs from Android Linux\n\n--- a/src/basic/check-filesystems.sh\t2022-02-01 21:47:06.181142404 +0100\n+++ b/src/basic/check-filesystems.sh\t2022-02-01 21:45:58.760989671 +0100\n@@ -23,7 +23,8 @@ for fs in $($cpp -dM $includes - </dev/n\n         # STACK_END_MAGIC doesn't refer to a filesystem\n         # mtd_inode was removed in 2015\n         # futexfs was removed in 2018\n-        if [[ \"$fs\" =~ ^(STACK_END_MAGIC|MTD_INODE_FS_MAGIC|FUTEXFS_SUPER_MAGIC)$ ]]; then\n+        # sdcardfs is Android fs\n+        if [[ \"$fs\" =~ ^(STACK_END_MAGIC|MTD_INODE_FS_MAGIC|FUTEXFS_SUPER_MAGIC|SDCARDFS_SUPER_MAGIC)$ ]]; then\n             continue\n         fi\n         echo \"Filesystem found in kernel header but not in $(basename \"$filesystems_gperf\"): $fs\";\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/Alta_boot.ini",
    "content": "ALTA-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"CoreELEC\"\nsetenv remotewakeup \"0xe31cdf00\"\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\n\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\n\nsetenv dtb_mem_addr 0x1000000\nsetenv uenv_addr 0x13000000\nsetenv loadaddr 0x02000000\n\nif load mmc ${mmc_dev}:1 ${uenv_addr} resolution.ini; then env import -t ${uenv_addr} $filesize; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif load mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nsetenv irsetup \"remotewakeup=${remotewakeup} decode_type=${decode_type} remotewakeupmask=${remotewakeupmask}\"\nif test \"${kernel_hdmimode}\" != \"\"; then setenv vout \"${kernel_hdmimode}\"; fi\nif test \"${usbpower}\" != \"\"; then setenv usbpower \"enable_system_power=${usbpower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a73}\" != \"\"; then setenv max_freq_a73 \"max_freq_a73=${max_freq_a73}\"; fi\nif test \"${keymap}\" != \"\"; then setenv keymap \"keymap=${keymap}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\n\nsetenv displayopt \"vout=${vout},dis frac_rate_policy=${frac_rate_policy} hdmitx=${hdmitx} hdr_policy=1 hdr_priority=0\"\nsetenv initargs \"${rootopt} ${consoleopt} ${keymap} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${gpiopower} ${irsetup} ${usbpower} ${usbopts}\"\nsetenv bootargs \"${bootargs} ${initargs} ${displayopt} ${coreelec}\"\n\nload mmc ${mmc_dev}:1 ${loadaddr} kernel.img\nload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\n\nbootm ${loadaddr}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/Khadas_VIM1S_boot.ini",
    "content": "KHADAS-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"CoreELEC\"\nsetenv remotewakeup \"0xeb14ff00\"\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\n\n# set device type: mmc (SD, eMMC) or usb (USB)\nsetenv device ${devtype}\n# set mmc/usb device number\n# u-boot   SD 0, linux 1\n#        eMMC 1, linux 0\n#    eMMC-USB 0 or 1\nsetenv mmc_dev ${devnum}\n# set linux device for eMMC and SD, seems boot device is always same for 5.15.137\nsetenv linux_dev \"mmcblk0p\"\nif test \"${devtype}\" = \"usb\"; then setenv linux_dev \"sda\"; fi\n\n# setenv rootopt \"boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\n# to have same image on SD, eMMC or USB and still mount correct device from linux use partitions directly\nsetenv rootopt \"boot=/dev/${linux_dev}1 disk=/dev/${linux_dev}2\"\n\nif fatload ${device} ${mmc_dev}:1 ${loadaddr} resolution.ini; then env import -t ${loadaddr} ${filesize}; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif fatload ${device} ${mmc_dev}:1 ${loadaddr} config.ini; then env import -t ${loadaddr} ${filesize}; fi\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nsetenv irsetup \"remotewakeup=${remotewakeup} decode_type=${decode_type} remotewakeupmask=${remotewakeupmask}\"\nif test \"${kernel_hdmimode}\" != \"\"; then setenv vout \"${kernel_hdmimode}\"; fi\nif test \"${usbpower}\" != \"\"; then setenv usbpower \"enable_system_power=${usbpower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a73}\" != \"\"; then setenv max_freq_a73 \"max_freq_a73=${max_freq_a73}\"; fi\nif test \"${keymap}\" != \"\"; then setenv keymap \"keymap=${keymap}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\nif test \"${loadaddr_kernel}\" != \"\"; then setenv loadaddr_kernel \"0x02000000\"; setenv loadaddr \"${loadaddr_kernel}\"; fi\n\nsetenv displayopt \"vout=${vout},dis frac_rate_policy=${frac_rate_policy} hdmitx=${hdmitx} hdr_policy=1 hdr_priority=0\"\nsetenv initargs \"${rootopt} ${keymap} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${gpiopower} ${irsetup} ${usbpower} ${usbopts}\"\nsetenv bootargs \"${bootargs} ${initargs} ${displayopt} ${coreelec}\"\n\nfatload ${device} ${mmc_dev}:1 ${loadaddr} kernel.img\nfatload ${device} ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\n\nbootm ${loadaddr}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/Khadas_VIM4_boot.ini",
    "content": "KHADAS-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"CoreELEC\"\nsetenv remotewakeup \"0xeb14ff00\"\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\n\n# set device type: mmc (SD, eMMC) or usb (USB)\nsetenv device ${devtype}\n# set mmc/usb device number\n# u-boot   SD 0, linux 1\n#        eMMC 1, linux 0\n#    eMMC-USB 0 or 1\nsetenv mmc_dev ${devnum}\n# set linux device for eMMC and SD, seems boot device is always same for 5.15.137\nsetenv linux_dev \"mmcblk0p\"\nif test \"${devtype}\" = \"usb\"; then setenv linux_dev \"sda\"; fi\n\n# setenv rootopt \"boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\n# to have same image on SD, eMMC or USB and still mount correct device from linux use partitions directly\nsetenv rootopt \"boot=/dev/${linux_dev}1 disk=/dev/${linux_dev}2\"\n\nif fatload ${device} ${mmc_dev}:1 ${loadaddr} resolution.ini; then env import -t ${loadaddr} ${filesize}; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif fatload ${device} ${mmc_dev}:1 ${loadaddr} config.ini; then env import -t ${loadaddr} ${filesize}; fi\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nsetenv irsetup \"remotewakeup=${remotewakeup} decode_type=${decode_type} remotewakeupmask=${remotewakeupmask}\"\nif test \"${kernel_hdmimode}\" != \"\"; then setenv vout \"${kernel_hdmimode}\"; fi\nif test \"${usbpower}\" != \"\"; then setenv usbpower \"enable_system_power=${usbpower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a73}\" != \"\"; then setenv max_freq_a73 \"max_freq_a73=${max_freq_a73}\"; fi\nif test \"${keymap}\" != \"\"; then setenv keymap \"keymap=${keymap}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\nif test \"${loadaddr_kernel}\" != \"\"; then setenv loadaddr_kernel \"0x02000000\"; setenv loadaddr \"${loadaddr_kernel}\"; fi\n\nsetenv displayopt \"vout=${vout},dis frac_rate_policy=${frac_rate_policy} hdmitx=${hdmitx} hdr_policy=1 hdr_priority=0\"\nsetenv initargs \"${rootopt} ${keymap} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${gpiopower} ${irsetup} ${usbpower} ${usbopts}\"\nsetenv bootargs \"${bootargs} ${initargs} ${displayopt} ${coreelec}\"\n\nfatload ${device} ${mmc_dev}:1 ${loadaddr} kernel.img\nfatload ${device} ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\n\nbootm ${loadaddr}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/Odroid_C4_boot.ini",
    "content": "ODROIDC4-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"CoreELEC\"\nsetenv remotewakeup \"0x23dc4db2\"\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\n\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\n\nsetenv dtb_mem_addr 0x1000000\nsetenv uenv_addr 0x13000000\nsetenv loadaddr 0x02000000\n\nif load mmc ${mmc_dev}:1 ${uenv_addr} resolution.ini; then env import -t ${uenv_addr} $filesize; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif load mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nsetenv irsetup \"remotewakeup=${remotewakeup} decode_type=${decode_type} remotewakeupmask=${remotewakeupmask}\"\nif test \"${kernel_hdmimode}\" != \"\"; then setenv vout \"${kernel_hdmimode}\"; fi\nif test \"${usbpower}\" != \"\"; then setenv usbpower \"enable_system_power=${usbpower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a73}\" != \"\"; then setenv max_freq_a73 \"max_freq_a73=${max_freq_a73}\"; fi\nif test \"${keymap}\" != \"\"; then setenv keymap \"keymap=${keymap}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\n\nsetenv displayopt \"vout=${vout},dis frac_rate_policy=${frac_rate_policy} hdmitx=${hdmitx} hdr_policy=1 hdr_priority=0\"\nsetenv initargs \"${rootopt} ${consoleopt} ${keymap} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${gpiopower} ${irsetup} ${usbpower} ${usbopts}\"\nsetenv bootargs \"${bootargs} ${initargs} ${displayopt} ${coreelec}\"\n\nload mmc ${mmc_dev}:1 ${loadaddr} kernel.img\nload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\n\nbootm ${loadaddr}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/Odroid_N2_boot.ini",
    "content": "ODROIDN2-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"CoreELEC\"\nsetenv remotewakeup \"0x23dc4db2\"\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\n\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\n\nsetenv dtb_mem_addr 0x1000000\nsetenv uenv_addr 0x13000000\nsetenv loadaddr 0x02000000\n\nif load mmc ${mmc_dev}:1 ${uenv_addr} resolution.ini; then env import -t ${uenv_addr} $filesize; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif load mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nsetenv irsetup \"remotewakeup=${remotewakeup} decode_type=${decode_type} remotewakeupmask=${remotewakeupmask}\"\nif test \"${kernel_hdmimode}\" != \"\"; then setenv vout \"${kernel_hdmimode}\"; fi\nif test \"${usbpower}\" != \"\"; then setenv usbpower \"enable_system_power=${usbpower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a73}\" != \"\"; then setenv max_freq_a73 \"max_freq_a73=${max_freq_a73}\"; fi\nif test \"${keymap}\" != \"\"; then setenv keymap \"keymap=${keymap}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\n\nsetenv displayopt \"vout=${vout},dis frac_rate_policy=${frac_rate_policy} hdmitx=${hdmitx} hdr_policy=1 hdr_priority=0\"\nsetenv initargs \"${rootopt} ${consoleopt} ${keymap} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${gpiopower} ${irsetup} ${usbpower} ${usbopts}\"\nsetenv bootargs \"${bootargs} ${initargs} ${displayopt} ${coreelec}\"\n\nload mmc ${mmc_dev}:1 ${loadaddr} kernel.img\nload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\n\nbootm ${loadaddr}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/Radxa_Zero2_boot.ini",
    "content": "RADXA_ZERO2-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"CoreELEC\"\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\n\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\n\nsetenv dtb_mem_addr 0x1000000\nsetenv uenv_addr 0x13000000\nsetenv loadaddr 0x02000000\n\nif load mmc ${mmc_dev}:1 ${uenv_addr} resolution.ini; then env import -t ${uenv_addr} $filesize; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif load mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nsetenv irsetup \"remotewakeup=${remotewakeup} decode_type=${decode_type} remotewakeupmask=${remotewakeupmask}\"\nif test \"${usbopts}\" != \"\"; then setenv usbopts \"usbopts=${usbopts}\"; fi\nif test \"${usbpower}\" != \"\"; then setenv usbpower \"enable_system_power=${usbpower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a73}\" != \"\"; then setenv max_freq_a73 \"max_freq_a73=${max_freq_a73}\"; fi\nif test \"${modeline}\" != \"\"; then setenv cmode \"modeline=${modeline}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\nif test \"${keymap}\" != \"\"; then setenv consoleopt \"${consoleopt} keymap=${keymap}\"; fi\nsetenv displayopt \"vout=${vout},en logo=osd0,loaded,0x3d800000 frac_rate_policy=${frac_rate_policy} native_4k_gui=${native_4k_gui} hdr_policy=1\"\nsetenv initargs \"${rootopt} ${consoleopt} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${irsetup} ${usbpower} ${gpiopower} ${usbopts} ${cmode}\"\nsetenv bootargs \"${initargs} ${displayopt} ${coreelec}\"\n\nload mmc ${mmc_dev}:1 ${loadaddr} kernel.img\nload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\n\nbootm ${loadaddr}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/Radxa_Zero_boot.ini",
    "content": "RADXA_ZERO-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"CoreELEC\"\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\n\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\n\nsetenv dtb_mem_addr 0x1000000\nsetenv uenv_addr 0x13000000\nsetenv loadaddr 0x02000000\n\nif load mmc ${mmc_dev}:1 ${uenv_addr} resolution.ini; then env import -t ${uenv_addr} $filesize; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif load mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nsetenv irsetup \"remotewakeup=${remotewakeup} decode_type=${decode_type} remotewakeupmask=${remotewakeupmask}\"\nif test \"${usbopts}\" != \"\"; then setenv usbopts \"usbopts=${usbopts}\"; fi\nif test \"${usbpower}\" != \"\"; then setenv usbpower \"enable_system_power=${usbpower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a73}\" != \"\"; then setenv max_freq_a73 \"max_freq_a73=${max_freq_a73}\"; fi\nif test \"${modeline}\" != \"\"; then setenv cmode \"modeline=${modeline}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\nif test \"${keymap}\" != \"\"; then setenv consoleopt \"${consoleopt} keymap=${keymap}\"; fi\nsetenv displayopt \"vout=${vout},en logo=osd0,loaded,0x3d800000 frac_rate_policy=${frac_rate_policy} native_4k_gui=${native_4k_gui} hdr_policy=1\"\nsetenv initargs \"${rootopt} ${consoleopt} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${irsetup} ${usbpower} ${gpiopower} ${usbopts} ${cmode}\"\nsetenv bootargs \"${initargs} ${displayopt} ${coreelec}\"\n\nload mmc ${mmc_dev}:1 ${loadaddr} kernel.img\nload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\n\nbootm ${loadaddr}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/Solitude_boot.ini",
    "content": "SOLITUDE-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootlabel \"CoreELEC\"\nsetenv remotewakeup \"0xe31cdf00\"\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\n\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\n\nsetenv dtb_mem_addr 0x1000000\nsetenv uenv_addr 0x13000000\nsetenv loadaddr 0x02000000\n\nif load mmc ${mmc_dev}:1 ${uenv_addr} resolution.ini; then env import -t ${uenv_addr} $filesize; fi\nif test \"${allfmt_names}\" != \"\"; then for name in ${allfmt_names}; do if test \"${kernel_hdmimode}\" = ${name}; then setenv vout ${name}; fi; done; fi\nif load mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nsetenv irsetup \"remotewakeup=${remotewakeup} decode_type=${decode_type} remotewakeupmask=${remotewakeupmask}\"\nif test \"${kernel_hdmimode}\" != \"\"; then setenv vout \"${kernel_hdmimode}\"; fi\nif test \"${usbpower}\" != \"\"; then setenv usbpower \"enable_system_power=${usbpower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a73}\" != \"\"; then setenv max_freq_a73 \"max_freq_a73=${max_freq_a73}\"; fi\nif test \"${keymap}\" != \"\"; then setenv keymap \"keymap=${keymap}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\n\nsetenv displayopt \"vout=${vout},dis frac_rate_policy=${frac_rate_policy} hdmitx=${hdmitx} hdr_policy=1 hdr_priority=0\"\nsetenv initargs \"${rootopt} ${consoleopt} ${keymap} ${max_freq_a53} ${max_freq_a73} ${wol} ${cec} ${gpiopower} ${irsetup} ${usbpower} ${usbopts}\"\nsetenv bootargs \"${bootargs} ${initargs} ${displayopt} ${coreelec}\"\n\nload mmc ${mmc_dev}:1 ${loadaddr} kernel.img\nload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\n\nbootm ${loadaddr}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/canupdate.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.tv)\n\n# detect legacy kernel installs and abort to prevent upgrades\nif [[ \"$(uname -r)\" = \"3.14.\"* ]] || [[ \"$(uname -r)\" = \"4.9.\"* ]]; then\n  echo \"Update from older kernel is not supported!\"\n  sleep 10\n  exit 1\nfi\n\nDEVICE_OLD=$(echo \"${1}\" | cut -d. -f1)\nDEVICE_NEW=$(echo \"${2}\" | cut -d. -f1)\n\n# allow upgrades between aarch64 and arm images on same device\nif [ \"${DEVICE_OLD}\" = \"${DEVICE_NEW}\" ]; then\n  exit 0\nelse\n  exit 1\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/config.ini",
    "content": "#------------------------------------------------------------------------------------------------------\n#\n# config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# Console Setup\n#\n# consoleopt='console=tty0 no_console_suspend'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# CPU Frequency Control\n#\n# WARNING!!! WARNING!!! WARNING!!!\n#   Before changing anything here please read the wiki entry at:\n#   https://wiki.odroid.com/odroid-n2/application_note/software/set_cpu_freq\n#\n# max_freq_a73='1800'\n# max_freq_a53='1896'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# HDMI CEC Control\n#   Set by CoreELEC Settings\n#\n# cec_func_config='7f'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# IR setup\n#   Setup a custom keycode to wake the Amlogic device from suspend or poweroff\n#   You can stop kodi and eventlircd and use \"ir-keytable -u\" to obtain a compatible u-boot\n#   IR keycode\n#   This setting will require a injected bl30 blob.\n#\n# remotewakeup='0x31ce4db2'\n#\n#   decode_type can be one of the following:\n#   NEC='0x0', RC5='0x4', RC6A='0x5', RC6='0xb'\n#   This setting will require a injected bl30 blob.\n#\n# decode_type='0x0' # NEC\n#\n#   remote power key mask:\n#   Some IR protocols implement a toggle bit, this can be ignored by the \"and\" mask:\n#   RC5='0x37ff', RC6='0x1effff', RC6A='0xffff7fff'\n#   This setting will require a injected bl30 blob.\n#\n# remotewakeupmask='0xffffffff'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# Power Off and Wake Up using GPIO Key Button\n#   Define a gpio by string, like 'GPIOD_4' for Khadas VIM4 as example\n#   This setting will require a injected bl30 blob.\n#\n# gpiopower='GPIOD_4'\n#------------------------------------------------------------------------------------------------------\n\n\n#------------------------------------------------------------------------------------------------------\n#\n# USB specific options\n#\n# usbopts='usb-xhci.tablesize=2'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# USB Power Control\n#   Set by CoreELEC Settings\n#\n# usbpower=0\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# VOUT mode\n#   You can use this setting to set a specific video mode at boot. Você pode usar esta configuração para definir um modo de vídeo específico na inicialização.\n# >> HDMI <<\n# vout='1080p60hz'\n# >> Video rca p2 <<\n# vout='576cvbs'\n# vout='480cvbs'\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# Fractional Refresh Rate\n#   You can use this setting to set a fractional refresh rate. So for example if vout mode it set to\n#   1080p60hz then setting this to 1 will make the refresh rate switch to 59.97hz instead of the modes\n#   default of 60hz. In this example setting it to 0 will keep the modes default of 60hz.\n#\n# frac_rate_policy='0'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# Busybox console keyboard layout\n#   Set by CoreELEC Settings\n#\n# keymap='uk'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# CoreELEC Developer Options\n#   Valid options are: textmode debugging progress nofsck nosplash noram overlay quiet ssh\n#\n# coreelec='quiet'\n#\n#------------------------------------------------------------------------------------------------------\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/dtb.conf",
    "content": "<dtb>\n  <multidtb name=\"g12a_s905x2_beelink_gt_mini_a.dtb\" subdevice=\"\">\n    <file>g12a_s905x2_beelink_gt_mini_a_2g.dtb</file>\n    <file>g12a_s905x2_beelink_gt_mini_a_4g.dtb</file>\n  </multidtb>\n  <multidtb name=\"g12a_s905x2_beelink_gt1_mini.dtb\" subdevice=\"\">\n    <file>g12a_s905x2_beelink_gt1_mini_2g.dtb</file>\n    <file>g12a_s905x2_beelink_gt1_mini_4g.dtb</file>\n  </multidtb>\n  <multidtb name=\"g12b_bananapi_m2s.dtb\" subdevice=\"\">\n    <file>g12b_a311d_bananapi_m2s.dtb</file>\n    <file>g12b_s922x_bananapi_m2s.dtb</file>\n  </multidtb>\n  <multidtb name=\"g12b_s922x_ugoos_am6.dtb\" subdevice=\"\">\n    <file>g12b_s922x_ugoos_am6_2g.dtb</file>\n    <file>g12b_s922x_ugoos_am6_4g.dtb</file>\n  </multidtb>\n  <multidtb name=\"g12b_s922x_ugoos_am6b.dtb\" subdevice=\"\">\n    <file>g12b_s922x_ugoos_am6b_2g.dtb</file>\n    <file>g12b_s922x_ugoos_am6b_4g.dtb</file>\n  </multidtb>\n  <multidtb name=\"s4_s905y4_buzztv_hd5.dtb\" subdevice=\"\">\n    <file>s4_s905y4_buzztv_hd5_2g.dtb</file>\n    <file>s4_s905y4_buzztv_hd5_4g.dtb</file>\n  </multidtb>\n  <multidtb name=\"s5_s928x_ugoos_am8.dtb\" subdevice=\"\">\n    <file>s5_s928x_ugoos_am8_4g.dtb</file>\n    <file>s5_s928x_ugoos_am8_8g.dtb</file>\n  </multidtb>\n  <multidtb name=\"s5_s928x_x96_x10.dtb\" subdevice=\"\">\n    <file>s5_s928x_x96_x10_4g.dtb</file>\n    <file>s5_s928x_x96_x10_8g.dtb</file>\n  </multidtb>\n  <multidtb name=\"sc2_s905x4_buzztv_x5.dtb\" subdevice=\"\">\n    <file>sc2_s905x4_buzztv_x5_2g.dtb</file>\n    <file>sc2_s905x4_buzztv_x5_2g_1gbit.dtb</file>\n    <file>sc2_s905x4_buzztv_x5_4g.dtb</file>\n    <file>sc2_s905x4_buzztv_x5_4g_1gbit.dtb</file>\n  </multidtb>\n  <multidtb name=\"sc2_s905x4_sei_smb_280.dtb\" subdevice=\"\">\n    <file>sc2_s905x4_sei_smb_280_id5.dtb</file>\n    <file>sc2_s905x4_sei_smb_280_id6.dtb</file>\n    <file>sc2_s905x4_sei_smb_280_id7.dtb</file>\n  </multidtb>\n  <multidtb name=\"sm1_s905x3_beelink_gt1mini2.dtb\" subdevice=\"\">\n    <file>sm1_s905x3_beelink_gt1mini2_2g.dtb</file>\n    <file>sm1_s905x3_beelink_gt1mini2_4g.dtb</file>\n  </multidtb>\n  <multidtb name=\"t7_a311d2_beelink_gt_king_ii.dtb\" subdevice=\"\">\n    <file>t7_a311d2_beelink_gt_king_ii_4g.dtb</file>\n    <file>t7_a311d2_beelink_gt_king_ii_8g.dtb</file>\n  </multidtb>\n  <multidtb name=\"t7_a311d2_khadas_vim4.dtb\" subdevice=\"\">\n    <file>t7_a311d2_khadas_vim4.dtb</file>\n    <file>t7c_a311d2_khadas_vim4n.dtb</file>\n  </multidtb>\n\n  <!--migrate DT from older project-->\n  <migratedtb coreelec-dt-id=\"g12b_s922x_beelink_gt_king_rev_a\" subdevice=\"\">\n    <migratedtid>g12b_s922x_beelink_gt_king</migratedtid>\n  </migratedtb>\n  <migratedtb coreelec-dt-id=\"g12b_s922x_beelink_gs_king_x_rev_a\" subdevice=\"\">\n    <migratedtid>g12b_s922x_beelink_gs_king_x</migratedtid>\n  </migratedtb>\n  <migratedtb coreelec-dt-id=\"g12b_s922x_minix_u22xj\" subdevice=\"\">\n    <migratedtid>g12b_s922x_minix_u22xj_max</migratedtid>\n  </migratedtb>\n  <migratedtb coreelec-dt-id=\"g12b_s922x_minix_u22xj_max_rev_a\" subdevice=\"\">\n    <migratedtid>g12b_s922x_minix_u22xj_max</migratedtid>\n  </migratedtb>\n  <migratedtb coreelec-dt-id=\"g12b_s922x_odroid_n2plus\" subdevice=\"\">\n    <migratedtid>g12b_s922x_odroid_n2</migratedtid>\n  </migratedtb>\n  <migratedtb coreelec-dt-id=\"g12b_s922x_odroid_n2plus_rev_c\" subdevice=\"\">\n    <migratedtid>g12b_s922x_odroid_n2</migratedtid>\n  </migratedtb>\n  <migratedtb coreelec-dt-id=\"g12b_s922x_ugoos_am6_rev_a_2g\" subdevice=\"\">\n    <migratedtid>g12b_s922x_ugoos_am6_2g</migratedtid>\n  </migratedtb>\n  <migratedtb coreelec-dt-id=\"g12b_s922x_ugoos_am6_rev_a_4g\" subdevice=\"\">\n    <migratedtid>g12b_s922x_ugoos_am6_4g</migratedtid>\n  </migratedtb>\n  <migratedtb coreelec-dt-id=\"g12b_s922x_ugoos_am6b_rev_a_2g\" subdevice=\"\">\n    <migratedtid>g12b_s922x_ugoos_am6b_2g</migratedtid>\n  </migratedtb>\n  <migratedtb coreelec-dt-id=\"g12b_s922x_ugoos_am6b_rev_a_4g\" subdevice=\"\">\n    <migratedtid>g12b_s922x_ugoos_am6b_4g</migratedtid>\n  </migratedtb>\n</dtb>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/dtb.xml",
    "content": "<?xml version=\"1.0\"?>\n<dtb-settings version=\"0\">\n\n  <sys_led status=\"on\" version=\"0\">\n    <sys_led_on name=\"on\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>default-on</value>\n      </cmd>\n    </sys_led_on>\n    <sys_led_heartbeat name=\"heartbeat\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>heartbeat</value>\n      </cmd>\n    </sys_led_heartbeat>\n    <sys_led_rc_feedback name=\"rc feedback\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>rc-feedback</value>\n      </cmd>\n    </sys_led_rc_feedback>\n    <sys_led_sd name=\"sd\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>mmc1</value>\n      </cmd>\n    </sys_led_sd>\n    <sys_led_emmc name=\"emmc\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>mmc0</value>\n      </cmd>\n    </sys_led_emmc>\n    <sys_led_off name=\"off\">\n      <cmd path=\"/gpioleds/sys_led linux,default-trigger\" type=\"s\" >\n        <value>none</value>\n      </cmd>\n    </sys_led_off>\n  </sys_led>\n\n  <red_led status=\"off\" version=\"0\">\n    <red_led_on name=\"on\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>default-on</value>\n      </cmd>\n    </red_led_on>\n    <red_led_heartbeat name=\"heartbeat\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>heartbeat</value>\n      </cmd>\n    </red_led_heartbeat>\n    <red_led_rc_feedback name=\"rc feedback\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>rc-feedback</value>\n      </cmd>\n    </red_led_rc_feedback>\n    <red_led_sd name=\"sd\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>mmc1</value>\n      </cmd>\n    </red_led_sd>\n    <red_led_emmc name=\"emmc\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>mmc0</value>\n      </cmd>\n    </red_led_emmc>\n    <red_led_off name=\"off\">\n      <cmd path=\"/gpioleds/red_led linux,default-trigger\" type=\"s\" >\n        <value>none</value>\n      </cmd>\n    </red_led_off>\n  </red_led>\n\n  <green_led status=\"off\" version=\"0\">\n    <green_led_on name=\"on\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>default-on</value>\n      </cmd>\n    </green_led_on>\n    <green_led_heartbeat name=\"heartbeat\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>heartbeat</value>\n      </cmd>\n    </green_led_heartbeat>\n    <green_led_rc_feedback name=\"rc feedback\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>rc-feedback</value>\n      </cmd>\n    </green_led_rc_feedback>\n    <green_led_sd name=\"sd\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>mmc1</value>\n      </cmd>\n    </green_led_sd>\n    <green_led_emmc name=\"emmc\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>mmc0</value>\n      </cmd>\n    </green_led_emmc>\n    <green_led_off name=\"off\">\n      <cmd path=\"/gpioleds/green_led linux,default-trigger\" type=\"s\" >\n        <value>none</value>\n      </cmd>\n    </green_led_off>\n  </green_led>\n\n  <bct3236_led status=\"on\" version=\"0\">\n    <bct3236_led_on name=\"on\">\n      <cmd path=\"/soc/apb4@fe000000/i2c@6c000/bct3236@3c linux,default-trigger\" type=\"s\" >\n        <value>default-on</value>\n      </cmd>\n    </bct3236_led_on>\n    <bct3236_led_off name=\"off\">\n      <cmd path=\"/soc/apb4@fe000000/i2c@6c000/bct3236@3c linux,default-trigger\" type=\"s\" >\n        <value>none</value>\n      </cmd>\n    </bct3236_led_off>\n  </bct3236_led>\n\n  <remote_type status=\"NEC\" version=\"0\">\n    <remote_type_nec name=\"NEC\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>1</value>\n      </cmd>\n    </remote_type_nec>\n    <remote_type_legacy_nec name=\"LEGACY NEC\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>255</value>\n      </cmd>\n    </remote_type_legacy_nec>\n    <remote_type_duokan name=\"DUOKAN\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>2</value>\n      </cmd>\n    </remote_type_duokan>\n    <remote_type_xmp_1 name=\"XMP_1\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>3</value>\n      </cmd>\n    </remote_type_xmp_1>\n    <remote_type_rc5 name=\"RC5\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>4</value>\n      </cmd>\n    </remote_type_rc5>\n    <remote_type_rc6 name=\"RC6\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>5</value>\n      </cmd>\n    </remote_type_rc6>\n    <remote_type_toshiba name=\"TOSHIBA\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>6</value>\n      </cmd>\n    </remote_type_toshiba>\n    <remote_type_rca name=\"RCA\">\n      <cmd path=\"/meson-remote protocol\" type=\"i\" >\n        <value>8</value>\n      </cmd>\n    </remote_type_rca>\n  </remote_type>\n\n  <motorcomm status=\"migrated\" dt_id=\"sc2_s905x4*1gbit\" version=\"0\">\n    <motorcomm_n_a name=\"n/a\">\n      <cmd path=\"/soc/ethernet@fdc00000 internal_phy\" type=\"i\" >\n        <value>2</value>\n      </cmd>\n    </motorcomm_n_a>\n    <motorcomm_a name=\"assembled\">\n      <cmd path=\"/soc/ethernet@fdc00000 internal_phy\" type=\"i\" >\n        <value>0</value>\n      </cmd>\n    </motorcomm_a>\n  </motorcomm>\n\n  <wol status=\"migrated\" version=\"0\">\n    <wol_on name=\"on\">\n      <cmd path=\"/soc/ethernet@fdc00000 wol\" type=\"i\" >\n        <value>1</value>\n      </cmd>\n    </wol_on>\n    <wol_off name=\"off\">\n      <cmd path=\"/soc/ethernet@fdc00000 wol\" type=\"i\" >\n        <value>0</value>\n      </cmd>\n    </wol_off>\n  </wol>\n\n  <custom_edid status=\"custom\" version=\"0\">\n    <edid name=\"custom\">\n      <cmd path=\"/amhdmitx custom_edid\" type=\"s\">\n        <value/>\n      </cmd>\n    </edid>\n  </custom_edid>\n\n</dtb-settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/mkbootimg",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nDTBIMG_PATH=\"common_drivers/arch/${TARGET_KERNEL_ARCH}/boot\"\nDTB_PATH=\"${DTBIMG_PATH}/dts/amlogic\"\nANDROID_BOOTIMG_SECOND=\"\"\n\nSUBDEVICES+=\" Generic\"\nfor device in ${SUBDEVICES}; do\n  DTB_BLOBS_PATH=${DTB_PATH}/${device}\n  mkdir -p ${DTB_BLOBS_PATH}\n  if [ \"${device}\" = \"Generic\" ]; then\n    for dtblob in ${KERNEL_UBOOT_EXTRA_TARGET}; do\n      cp ${DTB_PATH}/${dtblob} ${DTB_BLOBS_PATH} 2>/dev/null || :\n    done\n  else\n    MULTIDTB_BLOB=\"\"\n    find_file_path bootloader/dtb.conf\n    MULTIDTB_CONF=\"${FOUND_PATH}\"\n    if [ -f ${MULTIDTB_CONF} ]; then\n      multidtb_cnt=$(xmlstarlet sel -t -c \"count(//dtb/multidtb)\" ${MULTIDTB_CONF})\n      cnt_m=1\n      while [ ${cnt_m} -le ${multidtb_cnt} ]; do\n        multidtb=$(xmlstarlet sel -t -v \"//dtb/multidtb[${cnt_m}]/@name\" ${MULTIDTB_CONF}) || :\n        subdevice=$(xmlstarlet sel -t -v \"//dtb/multidtb[${cnt_m}]/@subdevice\" ${MULTIDTB_CONF}) || :\n        if [ \"${device}\" = \"${subdevice}\" ]; then\n          echo \"Device tree multidtb subdevice: ${device}, ${multidtb%%.*}.dtb\"\n          MULTIDTB_BLOB=\"${multidtb%%.*}.dtb\"\n          break\n        fi\n        cnt_m=$((cnt_m+1))\n      done\n    fi\n    if [ -n \"${MULTIDTB_BLOB}\" ]; then\n      cp ${DTB_PATH}/${MULTIDTB_BLOB} ${DTB_BLOBS_PATH}/${device}_dtb.dtb 2>/dev/null || :\n    else\n      cp ${DTB_PATH}/*${device,,}.dtb ${DTB_BLOBS_PATH} 2>/dev/null || :\n    fi\n  fi\n  DTB_BLOBS=($(ls ${DTB_BLOBS_PATH}/*.dtb 2>/dev/null || true))\n  DTB_BLOBS_COUNT=${#DTB_BLOBS[@]}\n  DTB_BLOB_OUTPUT=${DTBIMG_PATH}/${device}_dtb.img\n  if [ \"${DTB_BLOBS_COUNT}\" -gt 1 ]; then\n    ${TOOLCHAIN}/bin/dtbTool -c -o ${DTB_BLOB_OUTPUT} -p scripts/dtc/ ${DTB_BLOBS_PATH}\n  elif [ \"${DTB_BLOBS_COUNT}\" -eq 1 ]; then\n    cp -PR ${DTB_BLOBS} ${DTB_BLOB_OUTPUT}\n  fi\ndone\n\nif [ -f ${DTBIMG_PATH}/Generic_dtb.img ]; then\n  ANDROID_BOOTIMG_SECOND=\"--second ${DTBIMG_PATH}/Generic_dtb.img\"\nfi\n\nRAMDISK=${BUILD}/image/initramfs.cpio\n\necho\necho \"Compressing initramfs.cpio with zstd\"\nstat -c \"  %s bytes  %n\" ${RAMDISK}\n# with 3 as default compresion\nzstd -q -f ${RAMDISK}\nRAMDISK=${RAMDISK}.zst\nstat -c \"  %s bytes  %n\" ${RAMDISK}\n\nLDFLAGS=\"\" mkbootimg --kernel arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_TARGET} --ramdisk ${RAMDISK} \\\n  ${ANDROID_BOOTIMG_SECOND} ${ANDROID_BOOTIMG_OPTIONS} --output arch/${TARGET_KERNEL_ARCH}/boot/boot.img\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/mkimage",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nmcopy_file_exist() {\n  [ -f \"${1}\" ] && mcopy \"${1}\" \"${2}\"\n}\n\n# setup subdevice configuration\n. ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/bootloader/subdevice_config.sh ${SUBDEVICE}\n\n# copy device trees to part1\nfor dtb in ${RELEASE_DIR}/3rdparty/bootloader/device_trees ${RELEASE_DIR}/3rdparty/bootloader/*.dtb ${RELEASE_DIR}/3rdparty/bootloader/dtb.img ; do\n  # it is a folder\n  [ -e \"${dtb}\" ] && mcopy -s \"${dtb}\" \"::\"\ndone\n\n# copy device dtb to part1\nmcopy_file_exist \"${RELEASE_DIR}/3rdparty/bootloader/${DEVICE_DTB}\" \"::/dtb.img\"\n\n# copy config.ini to part1\nmcopy_file_exist \"${RELEASE_DIR}/3rdparty/bootloader/config.ini\" \"::\"\n\nif [ -f \"${RELEASE_DIR}/3rdparty/bootloader/${DEVICE_BOOT_INI}\" ]; then\n  # using own bootloader, copy device boot.ini to part1\n  cp -p \"${RELEASE_DIR}/3rdparty/bootloader/${DEVICE_BOOT_INI}\" \"${LE_TMP}/boot.ini\"\n  sed -e \"s/@BOOT_UUID@/${UUID_SYSTEM}/\" \\\n      -e \"s/@DISK_UUID@/${UUID_STORAGE}/\" \\\n      -i \"${LE_TMP}/boot.ini\"\n  mcopy \"${LE_TMP}/boot.ini\" \"::\"\n\n  # copy logos to part1\n  mcopy_file_exist \"${RELEASE_DIR}/3rdparty/bootloader/${DEVICE_BOOT_LOGO}\" \"::/boot-logo-1080.bmp.gz\"\n  mcopy_file_exist \"${RELEASE_DIR}/3rdparty/bootloader/${DEVICE_TIMEOUT_LOGO}\" \"::/timeout-logo-1080.bmp.gz\"\n\n  # write u-boot to part1\n  if [ -f \"${RELEASE_DIR}/3rdparty/bootloader/${DEVICE_UBOOT}\" ]; then\n    echo \"image: writing u-boot to disk image\"\n    dd if=\"${RELEASE_DIR}/3rdparty/bootloader/${DEVICE_UBOOT}\" of=\"${DISK}\" conv=fsync,notrunc bs=1 count=112 >\"${SAVE_ERROR}\" 2>&1 || show_error\n    dd if=\"${RELEASE_DIR}/3rdparty/bootloader/${DEVICE_UBOOT}\" of=\"${DISK}\" conv=fsync,notrunc bs=512 skip=1 seek=1 >\"${SAVE_ERROR}\" 2>&1 || show_error\n  fi\nfi\n\nif [ -f \"${RELEASE_DIR}/3rdparty/bootloader/${DEVICE_CFGLOAD}\" ]; then\n  # using Android bootloader\n  # copy amlogic cfgload file to part1\n  mcopy \"${RELEASE_DIR}/3rdparty/bootloader/${DEVICE_CFGLOAD}\" \"::/cfgload\"\n\n  # copy amlogic autoscript file to part1\n  mcopy_file_exist \"${RELEASE_DIR}/3rdparty/bootloader/aml_autoscript\" \"::/aml_autoscript\"\nfi\n\n# copy chain u-boot to part1\nmcopy_file_exist \"${RELEASE_DIR}/3rdparty/bootloader/${DEVICE_CHAIN_UBOOT}\" \"::/u-boot.bin\"\nmcopy_file_exist \"${RELEASE_DIR}/3rdparty/bootloader/${DEVICE_BOOT_SCR}\" \"::/boot.scr\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/release",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nmkdir -p ${RELEASE_DIR}/3rdparty/bootloader\n  cp -a ${INSTALL}/usr/share/bootloader/* ${RELEASE_DIR}/3rdparty/bootloader\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/scripts/Generic_cfgload.src",
    "content": "echo \"Using device ${device}, number ${devnr}, partition ${partnr}, EmuELEC on eMMC: ${ce_on_emmc}\"\n\nsetenv remotewakeup \"0xffffffff\"\nsetenv decode_type \"0\"\nsetenv remotewakeupmask \"0xffffffff\"\nsetenv coreelec \"quiet\"\nsetenv vout \"1080p60hz\"\nsetenv frac_rate_policy \"0\"\nsetenv consoleopt \"console=tty0 no_console_suspend\"\n\nsetenv rootopt \"BOOT_IMAGE=kernel.img boot=LABEL=EMUELEC disk=LABEL=STORAGE\"\nif test \"${ce_on_emmc}\" = \"yes\"; then setenv rootopt \"BOOT_IMAGE=kernel.img boot=LABEL=CE_FLASH disk=FOLDER=/dev/CE_STORAGE\"; fi\n\nif fatload ${device} ${devnr}:${partnr} ${loadaddr} resolution.ini; then env import -t ${loadaddr} ${filesize}; fi\nif fatload ${device} ${devnr}:${partnr} ${loadaddr} config.ini; then env import -t ${loadaddr} ${filesize}; fi\n\nif test \"${cec_func_config}\" != \"\"; then setenv cec \"hdmitx=cec${cec_func_config}\"; fi\nif test \"${gpiopower}\" != \"\"; then setenv gpiopower \"gpiopower=${gpiopower}\"; fi\nsetenv irsetup \"remotewakeup=${remotewakeup} decode_type=${decode_type} remotewakeupmask=${remotewakeupmask}\"\nif test \"${kernel_hdmimode}\" != \"\"; then setenv vout \"${kernel_hdmimode}\"; fi\nif test \"${usbpower}\" != \"\"; then setenv usbpower \"enable_system_power=${usbpower}\"; fi\nif test \"${max_freq_a53}\" != \"\"; then setenv max_freq_a53 \"max_freq_a53=${max_freq_a53}\"; fi\nif test \"${max_freq_a73}\" != \"\"; then setenv max_freq_a73 \"max_freq_a73=${max_freq_a73}\"; fi\nif test \"${keymap}\" != \"\"; then setenv consoleopt \"${consoleopt} keymap=${keymap}\"; fi\nif test \"${wol}\" != \"\"; then setenv wol \"enable_wol=${wol}\"; fi\nif test \"${mac}\" = \"\" && test \"${ethaddr}\" != \"\"; then setenv localmac \"mac=${ethaddr}\"; fi\nif test \"${loadaddr_kernel}\" != \"\"; then setenv loadaddr_kernel \"0x02000000\"; setenv loadaddr \"${loadaddr_kernel}\"; fi\nsetenv displayopt \"vout=${vout},dis logo=osd0,loaded,${fb_addr} frac_rate_policy=${frac_rate_policy} hdmitx=${hdmitx} hdr_policy=1 hdr_priority=0\"\nsetenv initargs \"${rootopt} ${consoleopt} ${max_freq_a53} ${max_freq_a73} ${wol} ${localmac} ${cec} ${gpiopower} ${irsetup} ${usbpower} ${usbopts}\"\nsetenv bootargs \"${bootargs} ${initargs} ${displayopt} ${coreelec}\"\n\nfatload ${device} ${devnr}:${partnr} ${loadaddr} kernel.img\nfatload ${device} ${devnr}:${partnr} ${dtb_mem_addr} dtb.img\n\nbootm ${loadaddr}\nbootm start\nbootm loados\nbootm prep\nbootm go\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/scripts/aml_autoscript.src",
    "content": "defenv\nsetenv bootfromnand 0\nsetenv upgrade_step 2\nsetenv ce_on_emmc \"no\"\nsetenv cfgloadsd 'if fatload mmc 0:1 ${loadaddr} cfgload; then setenv device mmc; setenv devnr 0; setenv partnr 1; source ${loadaddr}; autoscr ${loadaddr}; fi'\nsetenv cfgloadusb 'if fatload usb 0:1 ${loadaddr} cfgload; then setenv device usb; setenv devnr 0; setenv partnr 1; source ${loadaddr}; autoscr ${loadaddr}; fi'\nsetenv cfgloademmc 'for p in 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F; do if fatload mmc 1:${p} ${loadaddr} cfgload; then setenv device mmc; setenv devnr 1; setenv partnr ${p}; setenv ce_on_emmc \"yes\"; source ${loadaddr}; autoscr ${loadaddr}; fi; done;'\nsetenv bootfromsd 'if mmcinfo; then run cfgloadsd; fi'\nsetenv bootfromusb 'usb start; if usb storage; then run cfgloadusb; fi'\nsetenv bootfromemmc 'run cfgloademmc'\nsetenv bootcmd 'if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; else run bootfromsd; run bootfromusb; run bootfromemmc; fi; run storeboot'\nif test \"${fdtaddr}\" = \"\"; then setenv fdtaddr ${dtb_mem_addr}; fi\n\nsaveenv\nrun storeargs\nrun bootfromsd\nrun bootfromusb\nrun bootfromemmc\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/subdevice_config.sh",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nunset DEVICE_CFGLOAD\nunset DEVICE_BOOT_LOGO\nunset DEVICE_TIMEOUT_LOGO\nunset DEVICE_DTB\nunset DEVICE_UBOOT\nunset DEVICE_CHAIN_UBOOT\nunset DEVICE_BOOT_INI\nunset DEVICE_BOOT_SCR\nunset DEVICE_UBOOT_BIN\nunset DEVICE_CHAIN_UBOOT_BIN\n\ncase ${1} in\n  Odroid_C4)\n    DEVICE_BOOT_LOGO=\"odroid_boot-logo.bmp.gz\"\n    DEVICE_DTB=\"device_trees/sm1_s905x3_odroid_c4.dtb\"\n    DEVICE_UBOOT=\"${1}_u-boot\"\n    DEVICE_BOOT_INI=\"${1}_boot.ini\"\n    [ -n \"${2}\" ] && DEVICE_UBOOT_BIN=\"$(get_build_dir u-boot-${1})/sd_fuse/u-boot.bin.sd.bin\"\n  ;;\n  Odroid_N2)\n    DEVICE_BOOT_LOGO=\"odroid_boot-logo.bmp.gz\"\n    DEVICE_DTB=\"device_trees/g12b_s922x_odroid_n2.dtb\"\n    DEVICE_UBOOT=\"${1}_u-boot\"\n    DEVICE_BOOT_INI=\"${1}_boot.ini\"\n    [ -n \"${2}\" ] && DEVICE_UBOOT_BIN=\"$(get_build_dir u-boot-${1})/sd_fuse/u-boot.bin.sd.bin\"\n  ;;\n  Khadas_VIM4)\n    DEVICE_CFGLOAD=\"Generic_cfgload\"  # used for generic image\n    DEVICE_BOOT_LOGO=\"khadas_vim4-boot-logo.bmp.gz\"\n    DEVICE_DTB=\"device_trees/t7_a311d2_khadas_vim4.dtb\"\n    DEVICE_UBOOT=\"${1}_u-boot\"\n    DEVICE_BOOT_INI=\"${1}_boot.ini\"\n    [ -n \"${2}\" ] && DEVICE_UBOOT_BIN=\"$(get_build_dir u-boot-${1})/build/u-boot.bin.sd.bin.signed\"\n  ;;\n  Khadas_VIM1S)\n    DEVICE_CFGLOAD=\"Generic_cfgload\"  # used for generic image\n    DEVICE_BOOT_LOGO=\"khadas_vim1s-boot-logo.bmp.gz\"\n    DEVICE_DTB=\"device_trees/s4_s905y4_khadas_vim1s.dtb\"\n    DEVICE_UBOOT=\"${1}_u-boot\"\n    DEVICE_BOOT_INI=\"${1}_boot.ini\"\n    [ -n \"${2}\" ] && DEVICE_UBOOT_BIN=\"$(get_build_dir u-boot-${1})/build/u-boot.bin.sd.bin.signed\"\n  ;;\n  Radxa_Zero)\n    DEVICE_BOOT_LOGO=\"radxa-boot-logo.bmp.gz\"\n    DEVICE_DTB=\"device_trees/g12a_s905y2_radxa_zero.dtb\"\n    DEVICE_UBOOT=\"${1}_u-boot\"\n    DEVICE_BOOT_INI=\"${1}_boot.ini\"\n    [ -n \"${2}\" ] && DEVICE_UBOOT_BIN=\"$(get_build_dir u-boot-${1})/sd_fuse/u-boot.bin.sd.bin\"\n  ;;\n  Radxa_Zero2)\n    DEVICE_BOOT_LOGO=\"radxa-boot-logo.bmp.gz\"\n    DEVICE_DTB=\"device_trees/g12b_a311d_radxa_zero2.dtb\"\n    DEVICE_UBOOT=\"${1}_u-boot\"\n    DEVICE_BOOT_INI=\"${1}_boot.ini\"\n    [ -n \"${2}\" ] && DEVICE_UBOOT_BIN=\"$(get_build_dir u-boot-${1})/sd_fuse/u-boot.bin.sd.bin\"\n  ;;\n  Alta)\n    DEVICE_BOOT_LOGO=\"libre-computer_boot-logo.bmp.gz\"\n    DEVICE_DTB=\"device_trees/g12b_a311d_libre_computer_alta.dtb\"\n    DEVICE_UBOOT=\"${1}_u-boot\"\n    DEVICE_BOOT_INI=\"${1}_boot.ini\"\n    [ -n \"${2}\" ] && DEVICE_UBOOT_BIN=\"$(get_build_dir u-boot-${1})/sd_fuse/u-boot.bin.sd.bin\"\n  ;;\n  Solitude)\n    DEVICE_BOOT_LOGO=\"libre-computer_boot-logo.bmp.gz\"\n    DEVICE_DTB=\"device_trees/sm1_s905d3_libre_computer_solitude.dtb\"\n    DEVICE_UBOOT=\"${1}_u-boot\"\n    DEVICE_BOOT_INI=\"${1}_boot.ini\"\n    [ -n \"${2}\" ] && DEVICE_UBOOT_BIN=\"$(get_build_dir u-boot-${1})/sd_fuse/u-boot.bin.sd.bin\"\n  ;;\n  Generic)\n    DEVICE_CFGLOAD=\"${1}_cfgload\"\n  ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/bootloader/update.sh",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\n# use chroot because of running xmlstarlet and other binaries build with newer glibc\nif [ \"${SYSTEM_ROOT}\" = \"/update\" ]; then\n  # run from init\n  # unset SYSTEM_ROOT because we are chroot-ing and /update become new / anyway\n  unset SYSTEM_ROOT\n\n  # mount some folders from old root\n  mount -o bind /tmp /update/var\n\n  for folder in proc sys dev tmp run flash storage; do\n    [ -d /${folder} ] && mount -o bind /${folder} /update/${folder}\n  done\n\n  /usr/bin/busybox chroot /update /usr/share/bootloader/update.sh\n\n  # umount folders\n  for folder in proc sys dev tmp run flash storage; do\n    [ -d /${folder} ] && umount /update/${folder}\n  done\n\n  umount /update/var\n\n  # set it back just in case\n  SYSTEM_ROOT=\"/update\"\n  exit 0\nfi\n\n# change to writable folder\ncd /tmp\n\n[ -z \"${BOOT_ROOT}\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"${BOOT_PART}\" ] && BOOT_PART=$(df \"${BOOT_ROOT}\" | tail -1 | awk {' print $1 '})\nif [ -z \"${BOOT_DISK}\" ]; then\n  case ${BOOT_PART} in\n    /dev/sd[a-z]1)\n      BOOT_DISK=$(echo ${BOOT_PART} | sed -e \"s,1$,,g\")\n      ;;\n    /dev/mmcblk[0-9]p1)\n      BOOT_DISK=$(echo ${BOOT_PART} | sed -e \"s,p1$,,g\")\n      ;;\n    *)\n      BOOT_DISK=\"\"\n      ;;\n  esac\nfi\n\n# must be block device with minor 0\nif [ -n \"${BOOT_DISK}\" ]; then\n  disk_minor=$(stat -t ${BOOT_DISK} 2>/dev/null | awk '{print $11}')\n\n  if [ ! -b \"${BOOT_DISK}\" -o \"${disk_minor}\" != \"0\" ]; then\n    BOOT_DISK=\"\"\n  fi\nfi\n\nmount -o rw,remount ${BOOT_ROOT}\n\nDT_ID=\"\"\nSUBDEVICE=\"\"\n\nfor arg in $(cat /proc/cmdline); do\n  case ${arg} in\n    boot=*)\n      boot=\"${arg#*=}\"\n      case ${boot} in\n        /dev/mmc*)\n          BOOT_UUID=\"$(blkid ${boot} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          BOOT_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" ${boot} \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n        FOLDER=*)\n          BOOT_UUID=\"$(blkid ${boot#*=} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n      esac\n\n      DT_ID=$(dtname)\n      MIGRATE_DTB=\"\"\n      if [ -n \"${DT_ID}\" ]; then\n        SUBDEVICE=\"Generic\"\n        # modify DT_ID, SUBDEVICE and MIGRATE_DTB by dtb.conf\n        [ -f /usr/bin/convert_dtname ] && . /usr/bin/convert_dtname ${DT_ID}\n\n        case ${DT_ID} in\n          *odroid_c4*)\n            SUBDEVICE=\"Odroid_C4\"\n            ;;\n          *odroid_n2*)\n            SUBDEVICE=\"Odroid_N2\"\n            ;;\n          *khadas_vim4*)\n            SUBDEVICE=\"Khadas_VIM4\"\n            ;;\n          *khadas_vim1s*)\n            SUBDEVICE=\"Khadas_VIM1S\"\n            ;;\n          *radxa_zero)\n            SUBDEVICE=\"Radxa_Zero\"\n            ;;\n          *radxa_zero2)\n            SUBDEVICE=\"Radxa_Zero2\"\n            ;;\n          *libre_computer_alta)\n            SUBDEVICE=\"Alta\"\n            ;;\n          *libre_computer_solitude)\n            SUBDEVICE=\"Solitude\"\n            ;;\n        esac\n      fi\n\n      # setup subdevice configuration\n      . /usr/share/bootloader/subdevice_config.sh ${SUBDEVICE}\n\n      UPDATE_DTB_SOURCE=\"/usr/share/bootloader/device_trees/${DT_ID}.dtb\"\n      if [ -n \"${DT_ID}\" -a -f \"${UPDATE_DTB_SOURCE}\" ]; then\n        echo \"Updating device tree with ${DT_ID}.dtb...\"\n        case ${BOOT_PART} in\n          /dev/coreelec)\n            dd if=/dev/zero of=/dev/dtb bs=256k count=1 status=none\n            dd if=\"${UPDATE_DTB_SOURCE}\" of=/dev/dtb bs=256k status=none\n            rm -f \"${BOOT_ROOT}/dtb.img\" # this should not exist, remove if it does\n            ;;\n          *)\n            cp -f \"${UPDATE_DTB_SOURCE}\" \"${BOOT_ROOT}/dtb.img\"\n            ;;\n        esac\n        [ -n \"${MIGRATE_DTB}\" ] && eval ${MIGRATE_DTB}\n      fi\n\n      for all_dtb in /flash/*.dtb ; do\n        if [ -f ${all_dtb} ]; then\n          dtb=$(basename ${all_dtb})\n          if [ -f /usr/share/bootloader/${dtb} ]; then\n            echo \"Updating ${dtb}...\"\n            cp -p /usr/share/bootloader/${dtb} ${BOOT_ROOT}\n          fi\n        fi\n      done\n      ;;\n\n    disk=*)\n      disk=\"${arg#*=}\"\n      case ${disk} in\n        /dev/mmc*)\n          DISK_UUID=\"$(blkid ${disk} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          DISK_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" ${disk} \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n        FOLDER=*)\n          DISK_UUID=\"$(blkid ${disk#*=} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n      esac\n      ;;\n  esac\ndone\n\nif [ -d ${BOOT_ROOT}/device_trees ]; then\n  echo \"Updating device_trees folder...\"\n  rm ${BOOT_ROOT}/device_trees/*.dtb\n  cp -p /usr/share/bootloader/device_trees/*.dtb ${BOOT_ROOT}/device_trees/\nfi\n\nif [ -f /usr/share/bootloader/config.ini ]; then\n  if [ ! -f ${BOOT_ROOT}/config.ini ]; then\n    echo \"Creating config.ini...\"\n    cp -p /usr/share/bootloader/config.ini ${BOOT_ROOT}/config.ini\n  fi\nfi\n\nif [ -f ${BOOT_ROOT}/dtb.xml ]; then\n  if [ -f /usr/lib/coreelec/dtb-xml ]; then\n    echo \"Updating dtb.img by dtb.xml...\"\n    /usr/lib/coreelec/dtb-xml\n  fi\nfi\n\nif [ -f ${BOOT_ROOT}/boot.scr ]; then\n  if [ -f /usr/share/bootloader/${DEVICE_CHAIN_UBOOT} ]; then\n    echo \"Updating chain loaded u-boot...\"\n    cp -p /usr/share/bootloader/${DEVICE_CHAIN_UBOOT} ${BOOT_ROOT}/u-boot.bin\n  fi\n\n  if [ -f /usr/share/bootloader/${DEVICE_BOOT_SCR} ]; then\n    echo \"Updating boot.scr...\"\n    cp -p /usr/share/bootloader/${DEVICE_BOOT_SCR} ${BOOT_ROOT}/boot.scr\n  fi\nfi\n\nif [ -f ${BOOT_ROOT}/cfgload ]; then\n  if [ -f /usr/share/bootloader/${DEVICE_CFGLOAD} ]; then\n    echo \"Updating cfgload...\"\n    cp -p /usr/share/bootloader/${DEVICE_CFGLOAD} ${BOOT_ROOT}/cfgload\n  fi\n\n  if [ -f /usr/share/bootloader/aml_autoscript ]; then\n    echo \"Updating aml_autoscript...\"\n    cp -p /usr/share/bootloader/aml_autoscript ${BOOT_ROOT}\n\n    if [ -e /dev/env ]; then\n      mkdir -p /var/lock\n      dd if=${BOOT_ROOT}/aml_autoscript bs=72 skip=1 status=none | \\\n      while read line; do\n        cmd=$(echo ${line} | sed -n \"s|^setenv \\(.*\\)|fw_setenv -c /etc/fw_env.config \\1|gp\")\n        [ -n \"${cmd}\" ] && eval ${cmd}\n      done\n    fi\n  fi\n\n  /usr/lib/coreelec/check-bl301\n  if [ ${?} = 1 ]; then\n    echo \"Found custom CoreELEC BL30, running inject_bl301 tool...\"\n    inject_bl301 -Y &>/dev/null\n  fi\nfi\n\nif [ -f ${BOOT_ROOT}/boot.ini ]; then\n  if [ -f /usr/share/bootloader/${DEVICE_BOOT_INI} ]; then\n    echo \"Updating boot.ini with ${DEVICE_BOOT_INI}...\"\n    cp -p /usr/share/bootloader/${DEVICE_BOOT_INI} ${BOOT_ROOT}/boot.ini\n    sed -e \"s/@BOOT_UUID@/${BOOT_UUID}/\" \\\n        -e \"s/@DISK_UUID@/${DISK_UUID}/\" \\\n        -i ${BOOT_ROOT}/boot.ini\n  fi\n\n  if [ -f /usr/share/bootloader/${DEVICE_BOOT_LOGO} ]; then\n    echo \"Updating boot logos with ${DEVICE_BOOT_LOGO}...\"\n    cp -p /usr/share/bootloader/${DEVICE_BOOT_LOGO} ${BOOT_ROOT}/boot-logo-1080.bmp.gz\n  fi\n\n  if [ -f /usr/share/bootloader/${DEVICE_UBOOT} -a -n \"${BOOT_DISK}\" ]; then\n    echo \"Updating u-boot on ${BOOT_DISK} with ${DEVICE_UBOOT}...\"\n    dd if=/usr/share/bootloader/${DEVICE_UBOOT} of=${BOOT_DISK} conv=fsync bs=1 count=112 status=none\n    dd if=/usr/share/bootloader/${DEVICE_UBOOT} of=${BOOT_DISK} conv=fsync bs=512 skip=1 seek=1 status=none\n  fi\nfi\n\nmount -o ro,remount ${BOOT_ROOT}\n\n# Leave a hint that we just did an update\necho \"UPDATE\" > /storage/.config/boot.hint\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/etc/dbus-1/system.d/coreelec.settings-xdbus-stoploop.conf",
    "content": "<!DOCTYPE busconfig PUBLIC\n          \"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN\"\n          \"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd\">\n<busconfig>\n  <policy user=\"root\">\n    <allow own=\"com.service.coreelec.settings.xdbus.stoploop\"/>\n  </policy>\n</busconfig>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/etc/lirc/lircd.conf.d/odroid-amremote.conf",
    "content": "begin remote\n\n  name  odroid_amremote\n  bits           16\n  flags SPACE_ENC|CONST_LENGTH\n  eps            30\n  aeps          100\n\n  header       9000  4500\n  one           563  1687\n  zero          563   562\n  ptrail        563\n  repeat       9000  2250\n  pre_data_bits   16\n  pre_data       0x4DB2\n  gap          0\n  suppress_repeat 1\n\n      begin codes\n          KEY_POWER                0x3BC4\n          KEY_MUTE                 0x11EE\n          KEY_HOME                 0x41BE\n          KEY_OK                   0x738C\n          KEY_LEFT                 0x9966\n          KEY_RIGHT                0x837C\n          KEY_UP                   0x53AC\n          KEY_DOWN                 0x4BB4\n          KEY_BACK                 0x59A6\n          KEY_MENU                 0xA35C\n          KEY_VOLUMEDOWN           0x817E\n          KEY_VOLUMEUP             0x01FE\n      end codes\n\nend remote\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/bin/cputemp",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nTEMP=\"$(cat /sys/class/thermal/thermal_zone0/temp)\"\necho \"$(( $TEMP / 1000 )) C\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/bin/gputemp",
    "content": "cputemp"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/lib/coreelec/smp-affinity.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nSMP=\"../smp_affinity\"\nMESONIR=\"`find /proc/irq/ -name *meson*ir`\"\nETH0=\"`find /proc/irq/ -name eth0`\"\nVDEC0=\"`find /proc/irq/ -name vdec-0`\"\nVDEC1=\"`find /proc/irq/ -name vdec-1`\"\nPREDI=\"`find /proc/irq/ -name pre_di`\"\nAFIFO0=\"`find /proc/irq/ -name afifo0`\"\nAOCEC=\"`find /proc/irq/ -name hdmi_aocec*`\"\nUSB3=\"`find /proc/irq/ -name xhci-hcd:usb1`\"\nIRQ=\"$AOCEC $ETH0 $USB3 $VDEC0 $VDEC1 $AFIFO0 $MESONIR $PREDI\"\n\ncpu=1\nfor i in $IRQ; do\n    if [ -f \"$i/$SMP\" ];then\n        [ ! -d \"/sys/devices/system/cpu/cpu$cpu\" ] && cpu=1\n        aff=$((1 << $cpu))\n        haff=`printf '%x\\n' $aff`\n        echo \"echo $haff > $i/$SMP\"\n        echo $haff > $i/$SMP\n        cpu=$((cpu + 1))\n    fi\ndone\n\nexit 0\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/lib/modprobe.d/disable-ir-remotes.conf",
    "content": "blacklist meson-ir\nblacklist meson-remote\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/lib/modprobe.d/mali.conf",
    "content": "options mali mali_shared_mem_size=0x40000000\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/lib/modules-load.d/amlvideodri.conf",
    "content": "amlvideodri\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/lib/systemd/sleep.conf.d/sleep.conf",
    "content": "[Sleep]\nHibernateMode=false\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/lib/systemd/system/smp-affinity.service",
    "content": "[Unit]\nDescription=Set smp_affinity from script\nBefore=kodi.service\nAfter=graphical.target\nConditionPathExists=/usr/lib/coreelec/smp-affinity.sh\n\n[Service]\nType=oneshot\nExecStart=-/bin/sh /usr/lib/coreelec/smp-affinity.sh\nRemainAfterExit=yes\n\n[Install]\nWantedBy=kodi.service\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/lib/systemd/system-shutdown/disk-park.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nfunction disk_park() {\n  [ -z \"$PARK_WAIT\" ] && PARK_WAIT=\"10\"\n  echo \"disk-park: suspend disks: $PARK_HDD, park time: ${PARK_WAIT}s\" >/dev/kmsg\n\n  wait=0\n  for dev in /sys/block/sd* ; do\n    [ ! -e $dev ] && continue\n    DEV=\"${dev##*/}\"\n    [ \"$(udevadm info --query=all --name=$DEV | awk -F \"=\" '/ID_MODEL=/{print index($2, \"SSD\")}')\" != \"0\" ] && continue\n    [ -n \"$(hdparm -C /dev/$DEV | grep 'standby')\" ] && continue\n    echo \"disk-park: suspend disk /dev/$DEV\" >/dev/kmsg\n    hdparm -y /dev/$DEV >/dev/null && wait=$PARK_WAIT\n  done\n\n  if [ \"$wait\" = \"0\" ]; then\n    echo \"disk-park: no disk got sent to suspend\" >/dev/kmsg\n  else\n    sleep $wait\n  fi\n}\n\n[ -e /run/disk-park.dat ] && . /run/disk-park.dat || exit 0\n[ -z \"$PARK_HDD\" ] && exit 0\n\ncase \"$1\" in\n  reboot|post)\n    # do not park disks when rebooting or on suspend resume\n    ;;\n  *)\n    disk_park\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/lib/systemd/system-sleep/disk-park.sh",
    "content": "../system-shutdown/disk-park.sh"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/lib/systemd/system-sleep/reset_usb_hub.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\ncase \"$1\" in\n  pre)\n    # <do something on suspend>\n    ;;\n  post)\n    # <do something on resume>\n    DT_ID=$(dtname)\n    case $DT_ID in\n      *odroid_n2plus*)\n        wol=\"$(cat /flash/config.ini | awk -F \"=\" '/^wol=/{gsub(/\"|\\047/,\"\",$2); print $2}')\"\n        if [ \"$wol\" == \"1\" ]; then\n          echo \"reset\" > /sys/devices/platform/gpio-reset/reset-usb_hub/control\n        fi\n        ;;\n    esac\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/lib/udev/rules.d/99-spidev.rules",
    "content": "KERNEL==\"spidev*\", SUBSYSTEMS==\"spidev\", SYMLINK+=\"spidev0.0\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/lib/udev/rules.d/99-xpadneo.rules",
    "content": "# XPADNEO UDEV BINDING\n# by atar-axis (dollinger.florian@gmx.de)\n\n# in general those files with a higher leading number are processed\n# and executed _later_, that means assignment in those files can overwrite\n# assignments in other rules which are parsed earlier\n\n# every block is a rule. rules are collected from the .rules files\n# according to their name. on every kernel uevent, all rules are\n# compared to that event - one by one.\n\n# kernel versions        manual binding (bind/unbind)   bind uevent             hid_generic greedy      hid_microsoft support   gamepad     method\n# ---------------        ----------------------------   --------------          ------------------      ---------------------   -------     ------\n# [    ... - 2.6.13 [    no                             no                      yes                     no                      *           rmmod (not supported in xpadneo)\n# [ 2.6.13 - 4.14   [    yes                            no                      yes                     no                      *           1: add, hid_generic\n# [   4.14 - 4.16   [    yes                            yes                     yes                     no                      *           2: bind, hid_generc\n# [   4.16 - 4.20   [    yes                            yes                     no                      no                      *           automatic\n# [   4.20 - ...    ]    yes                            yes                     no                      yes                     02FD        3: bind, microsoft\n#                                                                                                                               02E0        automatic\n\nACTION==\"add\", \\\nKERNEL==\"0005:045E:02FD.*|0005:045E:02E0.*\", \\\nSUBSYSTEM==\"hid\", \\\nRUN:=\"/bin/sh -c 'echo xpadneo udev: $kernel > /dev/kmsg; modprobe hid_xpadneo; echo $kernel > /sys/bus/hid/drivers/hid-generic/unbind; echo $kernel > /sys/bus/hid/drivers/microsoft/unbind; echo $kernel > /sys/bus/hid/drivers/xpadneo/bind; echo xpadneo udev: ok > /dev/kmsg'\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/sbin/installtointernal",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nmessage=\"$message\\n There is no working 'installtointernal'.\"\nmessage=\"$message\\n \"\nmessage=\"$message\\n On CoreELEC -ng releases 'installtointernal' has been replaced\"\nmessage=\"$message\\n by 'ceemmc'\"\nmessage=\"$message\\n \"\nmessage=\"$message\\n Please refer to the following link for more information:\"\nmessage=\"$message\\n https://discourse.coreelec.org/t/how-to-use-the-team-coreelec-ceemmc-tool/7630\"\nmessage=\"$message\\n \"\n\necho -e $message\n\nexit 1\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/sbin/update-ce",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present Team CoreELEC (https://coreelec.org)\n\ndo_cleanup () {\n  echo\n  echo \"update canceled\"\n  echo\n  cd /storage/.update\n  rm -fr temp\n}\n\ndo_reboot () {\n  cd /storage/.update\n  mv temp/* .\n  rmdir temp\n\n  if [ \"${nocompat}\" = \"nocompat\" -o \"${nocompat}\" = \".nocompat\" ]; then\n    touch .nocompat\n  fi\n\n  echo -e \"\\nsyncing...\\n\"\n  sync\n  echo -e \"rebooting...\\n\"\n  reboot\n  exit 0\n}\n\nshow_error () {\n  do_cleanup\n  sync\n  echo -e \"\\ndownload error...\\n\"\n  exit 1\n}\n\nfunction ctrl_c() {\n  echo\n  do_cleanup\n  exit 1\n}\n\ntrap ctrl_c INT\n\nurl=\"${1}\"\nfile=$(readlink -f \"${1}\")  # get full path\nnocompat=\"${2}\"\n\nmkdir -p /storage/.update/temp\ncd /storage/.update/temp\necho\n\ncase \"${url}\" in\n  https://mega\\.nz/*)\n    echo\n    megadl \"${url}\"\n    [ $? -eq 0 ] && do_reboot || show_error\n    ;;\n  *://*)\n    case \"${url}\" in\n      *\\.tar|*\\.img.gz)\n        curl -f -L -O \"${url}\"\n        [ $? -eq 0 ] && do_reboot || show_error\n        ;;\n      *)\n        echo\n        echo \"error: wrong url format <${url}>\"\n        echo\n        exit 1\n        ;;\n    esac\n    ;;\n  *)\n    if [ -n \"${file}\" ]; then\n      if [ -f \"${file}\" ]; then\n        case \"${file}\" in\n          *\\.tar|*\\.img.gz)\n            echo -e \"\\ncopying file ${file}\"\n            cp \"${file}\" .\n            [ $? -eq 0 ] && do_reboot || show_error\n            ;;\n          *)\n            echo\n            echo \"error: wrong file format <${file}>\"\n            echo\n            exit 1\n            ;;\n        esac\n      else\n        echo\n        echo \"error: file <${file}> does not exist\"\n        echo\n        exit 1\n      fi\n    fi\n\n    echo\n    echo \"update-ce: missing url\"\n    echo\n    echo \"Usage: update-ce <url> [nocompat]\"\n    echo \"  <url> mega/http/ftp url or local file .tar or .img.gz\"\n    echo \"  [nocompat] disable compatibility checks and risk a non-booting system\"\n    echo\n    exit 1\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/share/alsa/cards/AML-AUGESOUND.conf",
    "content": "#\n# Configuration for Amlogic AUGE Audio\n#\n\nAML-AUGESOUND.pcm.default {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype softvol\n\tslave.pcm {\n\t\ttype plug\n\t\tslave {\n\t\t\tpcm {\n\t\t\t\ttype hw\n\t\t\t\tcard $CARD\n\t\t\t\tdevice 1\n\t\t\t}\n\t\t}\n\t}\n\tcontrol {\n\t\tname \"PCM Playback Volume\"\n\t\tcard $CARD\n\t}\n}\n\n<confdir:pcm/surround71.conf>\n\nAML-AUGESOUND.pcm.surround71.0 {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype softvol\n\tslave.pcm {\n\t\ttype plug\n\t\tslave {\n\t\t\tpcm {\n\t\t\t\ttype hw\n\t\t\t\tcard $CARD\n\t\t\t\tdevice 3\n\t\t\t}\n\t\t}\n\t}\n\tcontrol {\n\t\tname \"LPCM Playback Volume\"\n\t\tcard $CARD\n\t}\n}\n\n<confdir:pcm/hdmi.conf>\n\nAML-AUGESOUND.pcm.hdmi.0 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t\tdevice 0\n\t\tformat S16_LE\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tinterface MIXER\n\t\t\t\tname \"IEC958 Playback Default\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional true\n\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n\t\t\t}\n\t\t]\n\t}\n}\n\n<confdir:pcm/iec958.conf>\n\nAML-AUGESOUND.pcm.iec958.0 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t\tdevice 2\n\t\tformat S16_LE\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tinterface MIXER\n\t\t\t\tname \"IEC958 Playback Default\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional true\n\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n\t\t\t}\n\t\t]\n\t}\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/filesystem/usr/share/alsa/cards/AML-MESONAUDIO.conf",
    "content": "#\n# Configuration for Amlogic MESONAUDIO Audio\n#\n\nAML-MESONAUDIO.pcm.default {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype softvol\n\tslave.pcm {\n\t\ttype plug\n\t\tslave {\n\t\t\tpcm {\n\t\t\t\ttype hw\n\t\t\t\tcard $CARD\n\t\t\t\tdevice 0\n\t\t\t}\n\t\t}\n\t}\n\tcontrol {\n\t\tname \"PCM Playback Volume\"\n\t\tcard $CARD\n\t}\n}\n\n<confdir:pcm/hdmi.conf>\n\nAML-MESONAUDIO.pcm.hdmi.0 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t\tdevice 1\n\t\tformat S16_LE\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tinterface MIXER\n\t\t\t\tname \"IEC958 Playback Default\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional true\n\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n\t\t\t}\n\t\t]\n\t}\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/initramfs/platform_init",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\ndisplay_mode=$(cat /sys/class/display/mode)\n# default values\ndisplay_mode_user=\"1080p60hz\"\nfrac_rate_policy_user=\"0\"\n\nfor arg in $(cat /proc/cmdline); do\n  case ${arg} in\n    frac_rate_policy=*)\n      frac_rate_policy_user=${arg#*=}\n      ;;\n    vout=*)\n      vout=${arg#*=}\n      display_mode_user=${vout%%,*}\n      # implementation not yet finished by Amlogic\n      #frac_rate_policy_user=\"0\"\n      #if [ -z ${vout##*frac*} ]; then\n      #  frac_rate_policy_user=\"1\"\n      #fi\n      ;;\n  esac\ndone\n\n# Enable HDMI output if cable is connected and not already enabled by u-boot\nif [ \"$(cat /sys/class/amhdmitx/amhdmitx0/hpd_state)\" != \"0\" ]; then\n  frac_rate_policy=$(cat /sys/devices/virtual/amhdmitx/amhdmitx0/frac_rate_policy)\n  if [ \"${frac_rate_policy}\" != \"${frac_rate_policy_user}\" ]; then\n    display_mode=\"null\"\n    echo \"${display_mode}\" > /sys/class/display/mode\n    echo \"${frac_rate_policy_user}\" > /sys/devices/virtual/amhdmitx/amhdmitx0/frac_rate_policy\n  fi\n  if [ \"${display_mode}\" != \"${display_mode_user}\" ]; then\n    echo \"${display_mode_user}\" > /sys/class/display/mode\n    display_mode=\"${display_mode_user}\"\n  fi\nfi\n\n# Set framebuffer geometry to match the resolution\ncase ${display_mode} in\n  *x*)   RES=${display_mode%%[ip]*} X=${RES%%x*} Y=${RES##*x};;\n  480*)            X=720  Y=480  ;;\n  576*)            X=720  Y=576  ;;\n  720p*)           X=1280 Y=720  ;;\n  2160p*)          X=3840 Y=2160 ;;\n  *)               X=1920 Y=1080 ;;\nesac\n\nY_VIRT=$((${Y} * 2))\n\nfbset -fb /dev/fb0 -g ${X} ${Y} ${X} ${Y_VIRT} 32\n\n# Enable framebuffer device\necho 0 > /sys/class/graphics/fb0/blank\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/kodi/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n  <section id=\"system\">\n    <category id=\"display\">\n      <group id=\"1\">\n        <setting id=\"videoscreen.limitedrange\">\n          <visible>false</visible>\n        </setting>\n      </group>\n    </category>\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.config\">\n          <default>3</default>\n        </setting>\n        <setting id=\"audiooutput.streamnoise\">\n          <default>false</default>\n        </setting>\n        <setting id=\"audiooutput.audiodevice\">\n          <default>ALSA:surround71:CARD=AMLAUGESOUND,DEV=0</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n  <section id=\"player\">\n    <category id=\"videoplayer\">\n      <group id=\"2\">\n        <setting id=\"videoplayer.adjustrefreshrate\">\n          <default>2</default> <!-- ADJUST_REFRESHRATE_ON_STARTSTOP -->\n          <constraints>\n            <options>\n              <option label=\"351\">0</option> <!-- ADJUST_REFRESHRATE_OFF -->\n              <option label=\"36036\">2</option> <!-- ADJUST_REFRESHRATE_ON_STARTSTOP -->\n              <option label=\"36050\">3</option> <!-- ADJUST_REFRESHRATE_ON_START -->\n            </options>\n          </constraints>\n        </setting>\n      </group>\n    </category>\n  </section>\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/linux/linux.aarch64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm64 5.15.153 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"aarch64-libreelec-linux-gnu-gcc-12.2.0 (GCC) 12.2.0\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=120200\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23900\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23900\nCONFIG_LLD_VERSION=0\nCONFIG_CC_CAN_LINK=y\nCONFIG_CC_CAN_LINK_STATIC=y\nCONFIG_CC_HAS_ASM_GOTO=y\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=128\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\nCONFIG_LOCALVERSION_AUTO=y\nCONFIG_BUILD_SALT=\"\"\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"EmuELEC\"\nCONFIG_SWAP=y\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\nCONFIG_WATCH_QUEUE=y\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\nCONFIG_AUDIT=y\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\nCONFIG_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_IRQ_IPI=y\nCONFIG_GENERIC_MSI_IRQ=y\nCONFIG_GENERIC_MSI_IRQ_DOMAIN=y\nCONFIG_IRQ_MSI_IOMMU=y\nCONFIG_HANDLE_DOMAIN_IRQ=y\nCONFIG_ARCH_WANTS_IRQ_RAW=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\nCONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\nCONFIG_BPF_JIT=y\n# CONFIG_BPF_JIT_ALWAYS_ON is not set\nCONFIG_BPF_JIT_DEFAULT_ON=y\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# CONFIG_BPF_LSM is not set\n# end of BPF subsystem\n\n# CONFIG_PREEMPT_NONE is not set\n# CONFIG_PREEMPT_VOLUNTARY is not set\nCONFIG_PREEMPT=y\nCONFIG_PREEMPT_COUNT=y\nCONFIG_PREEMPTION=y\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\nCONFIG_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_SCHED_AVG_IRQ=y\nCONFIG_SCHED_THERMAL_PRESSURE=y\n# CONFIG_BSD_PROCESS_ACCT is not set\nCONFIG_TASKSTATS=y\nCONFIG_TASK_DELAY_ACCT=y\nCONFIG_TASK_XACCT=y\nCONFIG_TASK_IO_ACCOUNTING=y\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\n# CONFIG_CPU_ISOLATION is not set\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\nCONFIG_PREEMPT_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_RCU=y\nCONFIG_TASKS_RUDE_RCU=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\nCONFIG_RCU_BOOT_END_DELAY=20000\n# end of RCU Subsystem\n\nCONFIG_IKCONFIG=m\nCONFIG_IKCONFIG_PROC=y\nCONFIG_IKHEADERS=y\nCONFIG_LOG_BUF_SHIFT=19\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# end of Scheduler features\n\nCONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y\nCONFIG_CC_HAS_INT128=y\nCONFIG_ARCH_SUPPORTS_INT128=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\nCONFIG_MEMCG=y\nCONFIG_MEMCG_SWAP=y\nCONFIG_MEMCG_KMEM=y\n# CONFIG_BLK_CGROUP is not set\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\n# CONFIG_CFS_BANDWIDTH is not set\nCONFIG_RT_GROUP_SCHED=y\nCONFIG_CGROUP_PIDS=y\nCONFIG_CGROUP_RDMA=y\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\n# CONFIG_CGROUP_PERF is not set\nCONFIG_CGROUP_BPF=y\nCONFIG_CGROUP_MISC=y\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_TIME_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_CHECKPOINT_RESTORE is not set\n# CONFIG_SCHED_AUTOGROUP is not set\n# CONFIG_RT_SOFTINT_OPTIMIZATION is not set\n# CONFIG_SYSFS_DEPRECATED is not set\n# CONFIG_RELAY is not set\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"\"\n# CONFIG_INITRAMFS_FORCE is not set\nCONFIG_RD_GZIP=y\nCONFIG_RD_BZIP2=y\nCONFIG_RD_LZMA=y\nCONFIG_RD_XZ=y\nCONFIG_RD_LZO=y\nCONFIG_RD_LZ4=y\nCONFIG_RD_ZSTD=y\n# CONFIG_BOOT_CONFIG is not set\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\n# CONFIG_EXPERT is not set\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\nCONFIG_SYSFS_SYSCALL=y\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_HAVE_FUTEX_CMPXCHG=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\nCONFIG_KALLSYMS_ALL=y\nCONFIG_KALLSYMS_BASE_RELATIVE=y\n# CONFIG_USERFAULTFD is not set\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_EMBEDDED is not set\nCONFIG_HAVE_PERF_EVENTS=y\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_VM_EVENT_COUNTERS=y\nCONFIG_SLUB_DEBUG=y\n# CONFIG_COMPAT_BRK is not set\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\nCONFIG_SLUB_CPU_PARTIAL=y\nCONFIG_SYSTEM_DATA_VERIFICATION=y\nCONFIG_PROFILING=y\nCONFIG_TRACEPOINTS=y\n# end of General setup\n\nCONFIG_ARM64=y\nCONFIG_64BIT=y\nCONFIG_MMU=y\nCONFIG_ARM64_PAGE_SHIFT=12\nCONFIG_ARM64_CONT_PTE_SHIFT=4\nCONFIG_ARM64_CONT_PMD_SHIFT=4\nCONFIG_ARCH_MMAP_RND_BITS_MIN=18\nCONFIG_ARCH_MMAP_RND_BITS_MAX=24\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_GENERIC_BUG=y\nCONFIG_GENERIC_BUG_RELATIVE_POINTERS=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CSUM=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y\nCONFIG_SMP=y\nCONFIG_KERNEL_MODE_NEON=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_PGTABLE_LEVELS=3\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_ARCH_PROC_KCORE_TEXT=y\n\n#\n# Platform selection\n#\n# CONFIG_ARCH_ACTIONS is not set\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_APPLE is not set\n# CONFIG_ARCH_BCM2835 is not set\n# CONFIG_ARCH_BCM4908 is not set\n# CONFIG_ARCH_BCM_IPROC is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_BITMAIN is not set\n# CONFIG_ARCH_BRCMSTB is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_SPARX5 is not set\n# CONFIG_ARCH_K3 is not set\n# CONFIG_ARCH_LAYERSCAPE is not set\n# CONFIG_ARCH_LG1K is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_KEEMBAY is not set\n# CONFIG_ARCH_MEDIATEK is not set\nCONFIG_ARCH_MESON=y\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_MXC is not set\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_REALTEK is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_ROCKCHIP is not set\n# CONFIG_ARCH_S32 is not set\n# CONFIG_ARCH_SEATTLE is not set\n# CONFIG_ARCH_INTEL_SOCFPGA is not set\n# CONFIG_ARCH_SYNQUACER is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_SPRD is not set\n# CONFIG_ARCH_THUNDER is not set\n# CONFIG_ARCH_THUNDER2 is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_VISCONTI is not set\n# CONFIG_ARCH_XGENE is not set\n# CONFIG_ARCH_ZYNQMP is not set\n# end of Platform selection\n\n#\n# Kernel Features\n#\n\n#\n# ARM errata workarounds via the alternatives framework\n#\nCONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y\nCONFIG_ARM64_ERRATUM_826319=y\nCONFIG_ARM64_ERRATUM_827319=y\nCONFIG_ARM64_ERRATUM_824069=y\nCONFIG_ARM64_ERRATUM_819472=y\nCONFIG_ARM64_ERRATUM_832075=y\nCONFIG_ARM64_ERRATUM_845719=y\nCONFIG_ARM64_ERRATUM_843419=y\nCONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y\nCONFIG_ARM64_ERRATUM_1024718=y\nCONFIG_ARM64_ERRATUM_1418040=y\nCONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y\nCONFIG_ARM64_ERRATUM_1165522=y\nCONFIG_ARM64_ERRATUM_1319367=y\nCONFIG_ARM64_ERRATUM_1530923=y\nCONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y\nCONFIG_ARM64_ERRATUM_2441007=y\nCONFIG_ARM64_ERRATUM_1286807=y\nCONFIG_ARM64_ERRATUM_1463225=y\nCONFIG_ARM64_ERRATUM_1508412=y\nCONFIG_ARM64_WORKAROUND_TSB_FLUSH_FAILURE=y\nCONFIG_ARM64_ERRATUM_2054223=y\nCONFIG_ARM64_ERRATUM_2067961=y\nCONFIG_ARM64_ERRATUM_2441009=y\nCONFIG_ARM64_ERRATUM_2457168=y\nCONFIG_CAVIUM_ERRATUM_22375=y\nCONFIG_CAVIUM_ERRATUM_23154=y\nCONFIG_FUJITSU_ERRATUM_010001=y\nCONFIG_HISILICON_ERRATUM_161600802=y\nCONFIG_QCOM_FALKOR_ERRATUM_1003=y\nCONFIG_QCOM_FALKOR_ERRATUM_1009=y\nCONFIG_QCOM_QDF2400_ERRATUM_0065=y\nCONFIG_QCOM_FALKOR_ERRATUM_E1041=y\n# CONFIG_NVIDIA_CARMEL_CNP_ERRATUM is not set\nCONFIG_SOCIONEXT_SYNQUACER_PREITS=y\n# end of ARM errata workarounds via the alternatives framework\n\nCONFIG_ARM64_4K_PAGES=y\n# CONFIG_ARM64_16K_PAGES is not set\n# CONFIG_ARM64_64K_PAGES is not set\nCONFIG_ARM64_VA_BITS_39=y\n# CONFIG_ARM64_VA_BITS_48 is not set\nCONFIG_ARM64_VA_BITS=39\nCONFIG_ARM64_PA_BITS_48=y\nCONFIG_ARM64_PA_BITS=48\n# CONFIG_CPU_BIG_ENDIAN is not set\nCONFIG_CPU_LITTLE_ENDIAN=y\nCONFIG_SCHED_MC=y\n# CONFIG_SCHED_SMT is not set\nCONFIG_NR_CPUS=8\nCONFIG_HOTPLUG_CPU=y\n# CONFIG_NUMA is not set\n# CONFIG_HZ_100 is not set\nCONFIG_HZ_250=y\n# CONFIG_HZ_300 is not set\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=250\nCONFIG_SCHED_HRTICK=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_CC_HAVE_SHADOW_CALL_STACK=y\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\n# CONFIG_KEXEC is not set\n# CONFIG_KEXEC_FILE is not set\n# CONFIG_CRASH_DUMP is not set\n# CONFIG_XEN is not set\nCONFIG_FORCE_MAX_ZONEORDER=11\nCONFIG_UNMAP_KERNEL_AT_EL0=y\nCONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y\nCONFIG_RODATA_FULL_DEFAULT_ENABLED=y\nCONFIG_ARM64_SW_TTBR0_PAN=y\nCONFIG_ARM64_TAGGED_ADDR_ABI=y\nCONFIG_COMPAT=y\nCONFIG_KUSER_HELPERS=y\nCONFIG_ARMV8_DEPRECATED=y\nCONFIG_SWP_EMULATION=y\nCONFIG_CP15_BARRIER_EMULATION=y\nCONFIG_SETEND_EMULATION=y\n\n#\n# ARMv8.1 architectural features\n#\nCONFIG_ARM64_HW_AFDBM=y\nCONFIG_ARM64_PAN=y\nCONFIG_AS_HAS_LDAPR=y\nCONFIG_AS_HAS_LSE_ATOMICS=y\nCONFIG_ARM64_LSE_ATOMICS=y\nCONFIG_ARM64_USE_LSE_ATOMICS=y\n# end of ARMv8.1 architectural features\n\n#\n# ARMv8.2 architectural features\n#\n# CONFIG_ARM64_PMEM is not set\nCONFIG_ARM64_RAS_EXTN=y\nCONFIG_ARM64_CNP=y\n# end of ARMv8.2 architectural features\n\n#\n# ARMv8.3 architectural features\n#\nCONFIG_ARM64_PTR_AUTH=y\nCONFIG_ARM64_PTR_AUTH_KERNEL=y\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET=y\nCONFIG_CC_HAS_SIGN_RETURN_ADDRESS=y\nCONFIG_AS_HAS_PAC=y\nCONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y\n# end of ARMv8.3 architectural features\n\n#\n# ARMv8.4 architectural features\n#\nCONFIG_ARM64_AMU_EXTN=y\nCONFIG_AS_HAS_ARMV8_4=y\nCONFIG_ARM64_TLB_RANGE=y\nCONFIG_ARM64_MPAM=y\n# end of ARMv8.4 architectural features\n\n#\n# ARMv8.5 architectural features\n#\nCONFIG_AS_HAS_ARMV8_5=y\n# CONFIG_ARM64_BTI is not set\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI=y\n# CONFIG_ARM64_E0PD is not set\n# CONFIG_ARCH_RANDOM is not set\nCONFIG_ARM64_AS_HAS_MTE=y\nCONFIG_ARM64_MTE=y\n# end of ARMv8.5 architectural features\n\n#\n# ARMv8.7 architectural features\n#\n# CONFIG_ARM64_EPAN is not set\n# end of ARMv8.7 architectural features\n\nCONFIG_ARM64_SVE=y\nCONFIG_ARM64_MODULE_PLTS=y\n# CONFIG_ARM64_PSEUDO_NMI is not set\nCONFIG_RELOCATABLE=y\nCONFIG_RANDOMIZE_BASE=y\nCONFIG_RANDOMIZE_MODULE_REGION_FULL=y\nCONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y\nCONFIG_STACKPROTECTOR_PER_TASK=y\n# end of Kernel Features\n\n#\n# Boot options\n#\nCONFIG_CMDLINE=\"systemd.show_status=auto\"\n# CONFIG_CMDLINE_FROM_BOOTLOADER is not set\nCONFIG_CMDLINE_EXTEND=y\n# CONFIG_CMDLINE_FORCE is not set\n# CONFIG_EFI is not set\n# end of Boot options\n\nCONFIG_SYSVIPC_COMPAT=y\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_HIBERNATION is not set\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\nCONFIG_PM_WAKELOCKS=y\nCONFIG_PM_WAKELOCKS_LIMIT=100\n# CONFIG_PM_WAKELOCKS_GC is not set\nCONFIG_PM=y\nCONFIG_PM_DEBUG=y\n# CONFIG_PM_ADVANCED_DEBUG is not set\n# CONFIG_PM_TEST_SUSPEND is not set\nCONFIG_PM_SLEEP_DEBUG=y\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\nCONFIG_ENERGY_MODEL=y\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\n# end of Power management options\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\nCONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\nCONFIG_DT_IDLE_STATES=y\n\n#\n# ARM CPU Idle Drivers\n#\nCONFIG_ARM_CPUIDLE=y\nCONFIG_ARM_PSCI_CPUIDLE=y\nCONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y\n# end of ARM CPU Idle Drivers\n# end of CPU Idle\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\nCONFIG_CPU_FREQ_TIMES=y\nCONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\n# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set\n\n#\n# CPU frequency scaling drivers\n#\n# CONFIG_CPUFREQ_DT is not set\n# CONFIG_CPUFREQ_DUMMY is not set\nCONFIG_ARM_SCPI_CPUFREQ=y\n# end of CPU Frequency scaling\n# end of CPU Power Management\n\nCONFIG_HAVE_KVM=y\n# CONFIG_VIRTUALIZATION is not set\nCONFIG_ARM64_CRYPTO=y\nCONFIG_CRYPTO_SHA256_ARM64=y\n# CONFIG_CRYPTO_SHA512_ARM64 is not set\nCONFIG_CRYPTO_SHA1_ARM64_CE=y\nCONFIG_CRYPTO_SHA2_ARM64_CE=y\n# CONFIG_CRYPTO_SHA512_ARM64_CE is not set\n# CONFIG_CRYPTO_SHA3_ARM64 is not set\n# CONFIG_CRYPTO_SM3_ARM64_CE is not set\n# CONFIG_CRYPTO_SM4_ARM64_CE is not set\nCONFIG_CRYPTO_GHASH_ARM64_CE=y\n# CONFIG_CRYPTO_POLYVAL_ARM64_CE is not set\n# CONFIG_CRYPTO_CRCT10DIF_ARM64_CE is not set\nCONFIG_CRYPTO_AES_ARM64=y\nCONFIG_CRYPTO_AES_ARM64_CE=y\n# CONFIG_CRYPTO_AES_ARM64_CE_CCM is not set\nCONFIG_CRYPTO_AES_ARM64_CE_BLK=y\n# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set\nCONFIG_CRYPTO_CHACHA20_NEON=y\nCONFIG_CRYPTO_POLY1305_NEON=y\n# CONFIG_CRYPTO_NHPOLY1305_NEON is not set\n# CONFIG_CRYPTO_AES_ARM64_BS is not set\n\n#\n# General architecture-dependent options\n#\nCONFIG_CRASH_CORE=y\nCONFIG_KPROBES=y\nCONFIG_JUMP_LABEL=y\n# CONFIG_STATIC_KEYS_SELFTEST is not set\nCONFIG_UPROBES=y\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_KRETPROBES=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_HAVE_FUNCTION_ERROR_INJECTION=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_KEEPINITRD=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_ARCH_HAS_SET_DIRECT_MAP=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_WANTS_NO_INSTR=y\nCONFIG_HAVE_ASM_MODVERSIONS=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y\nCONFIG_MMU_GATHER_TABLE_FREE=y\nCONFIG_MMU_GATHER_RCU_TABLE_FREE=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_HAVE_ALIGNED_STRUCT_PAGE=y\nCONFIG_HAVE_CMPXCHG_LOCAL=y\nCONFIG_HAVE_CMPXCHG_DOUBLE=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_ARCH_STACKLEAK=y\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_ARCH_SUPPORTS_SHADOW_CALL_STACK=y\nCONFIG_ARCH_SUPPORTS_LTO_CLANG=y\nCONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y\nCONFIG_LTO_NONE=y\nCONFIG_ARCH_SUPPORTS_CFI_CLANG=y\nCONFIG_HAVE_CONTEXT_TRACKING=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOVE_PUD=y\nCONFIG_HAVE_MOVE_PMD=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_HAVE_ARCH_HUGE_VMAP=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_ARCH_MMAP_RND_BITS=18\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=11\nCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y\n# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\nCONFIG_HAVE_ARCH_COMPILER_H=y\nCONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_HAS_RELR=y\nCONFIG_ARCH_HAS_MEM_ENCRYPT=y\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y\nCONFIG_ARCH_HAVE_TRACE_MMIO_ACCESS=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\nCONFIG_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set\n# CONFIG_GCC_PLUGIN_RANDSTRUCT is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\nCONFIG_MODVERSIONS=y\nCONFIG_ASM_MODVERSIONS=y\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SCMVERSION is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/usr/sbin/modprobe\"\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\nCONFIG_BLK_DEV_BSG_COMMON=y\n# CONFIG_BLK_DEV_BSGLIB is not set\nCONFIG_BLK_DEV_INTEGRITY=y\nCONFIG_BLK_DEV_INTEGRITY_T10=y\n# CONFIG_BLK_DEV_ZONED is not set\n# CONFIG_BLK_WBT is not set\n# CONFIG_BLK_DEBUG_FS is not set\n# CONFIG_BLK_SED_OPAL is not set\nCONFIG_BLK_INLINE_ENCRYPTION=y\nCONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y\n\n#\n# Partition Types\n#\n# CONFIG_PARTITION_ADVANCED is not set\nCONFIG_MSDOS_PARTITION=y\nCONFIG_EFI_PARTITION=y\n# end of Partition Types\n\nCONFIG_BLOCK_COMPAT=y\nCONFIG_BLK_MQ_PCI=y\nCONFIG_BLK_PM=y\nCONFIG_BLOCK_HOLDER_DEPRECATED=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\n# CONFIG_IOSCHED_BFQ is not set\n# end of IO Schedulers\n\nCONFIG_ASN1=y\nCONFIG_UNINLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_USE_QUEUED_SPINLOCKS=y\nCONFIG_QUEUED_SPINLOCKS=y\nCONFIG_ARCH_USE_QUEUED_RWLOCKS=y\nCONFIG_QUEUED_RWLOCKS=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_ARCH_HAS_SYSCALL_WRAPPER=y\nCONFIG_GKI_HIDDEN_DRM_CONFIGS=y\n# CONFIG_GKI_HIDDEN_REGMAP_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_CRYPTO_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_SND_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_SND_SOC_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_MMC_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_GPIO_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_QCOM_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_MEDIA_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_VIRTUAL_CONFIGS is not set\n# CONFIG_GKI_LEGACY_WEXT_ALLCONFIG is not set\n# CONFIG_GKI_HIDDEN_USB_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_SOC_BUS_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_RPMSG_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_GPU_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_IRQ_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_HYPERVISOR_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_NET_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_PHY_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_MM_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_ETHERNET_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_DMA_CONFIGS is not set\n# CONFIG_GKI_HACKS_TO_FIX is not set\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_ARCH_BINFMT_ELF_STATE=y\nCONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y\nCONFIG_ARCH_HAVE_ELF_PROT=y\nCONFIG_ARCH_USE_GNU_PROPERTY=y\nCONFIG_ELFCORE=y\n# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set\nCONFIG_BINFMT_SCRIPT=y\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\nCONFIG_SPARSEMEM=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_FAST_GUP=y\nCONFIG_ARCH_KEEP_MEMBLOCK=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y\n# CONFIG_MEMORY_HOTPLUG is not set\nCONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y\nCONFIG_COMPACTION=y\nCONFIG_PAGE_REPORTING=y\nCONFIG_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\nCONFIG_PHYS_ADDR_T_64BIT=y\nCONFIG_MMU_NOTIFIER=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y\n# CONFIG_MEMORY_FAILURE is not set\n# CONFIG_TRANSPARENT_HUGEPAGE is not set\n# CONFIG_CLEANCACHE is not set\n# CONFIG_FRONTSWAP is not set\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\nCONFIG_CMA_DEBUGFS=y\nCONFIG_CMA_SYSFS=y\nCONFIG_CMA_AREAS=12\n# CONFIG_ZPOOL is not set\nCONFIG_ZSMALLOC=y\n# CONFIG_ZSMALLOC_STAT is not set\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CACHE_LINE_SIZE=y\nCONFIG_ARCH_HAS_PTE_DEVMAP=y\nCONFIG_ZONE_DMA=y\nCONFIG_ZONE_DMA32=y\nCONFIG_ARCH_USES_HIGH_VMA_FLAGS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\nCONFIG_ARCH_HAS_PTE_SPECIAL=y\nCONFIG_SECRETMEM=y\nCONFIG_ARCH_HAS_IOREMAP_PHYS_HOOKS=y\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_LRU_GEN is not set\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n\nCONFIG_ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT=y\nCONFIG_SPECULATIVE_PAGE_FAULT=y\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\nCONFIG_NET_INGRESS=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=m\nCONFIG_XFRM_USER=m\nCONFIG_XFRM_INTERFACE=m\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\nCONFIG_XFRM_STATISTICS=y\nCONFIG_XFRM_AH=m\nCONFIG_XFRM_ESP=m\nCONFIG_XFRM_IPCOMP=m\nCONFIG_NET_KEY=m\n# CONFIG_NET_KEY_MIGRATE is not set\nCONFIG_XDP_SOCKETS=y\n# CONFIG_XDP_SOCKETS_DIAG is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\nCONFIG_NET_IPGRE_DEMUX=m\nCONFIG_NET_IP_TUNNEL=m\n# CONFIG_NET_IPGRE is not set\n# CONFIG_IP_MROUTE is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\n# CONFIG_NET_FOU is not set\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=m\n# CONFIG_INET_ESP_OFFLOAD is not set\n# CONFIG_INET_ESPINTCP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=m\nCONFIG_INET_DIAG=m\nCONFIG_INET_TCP_DIAG=m\nCONFIG_INET_UDP_DIAG=m\n# CONFIG_INET_RAW_DIAG is not set\nCONFIG_INET_DIAG_DESTROY=y\n# CONFIG_TCP_CONG_ADVANCED is not set\nCONFIG_TCP_CONG_CUBIC=y\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\nCONFIG_IPV6_ROUTER_PREF=y\nCONFIG_IPV6_ROUTE_INFO=y\nCONFIG_IPV6_OPTIMISTIC_DAD=y\nCONFIG_INET6_AH=m\nCONFIG_INET6_ESP=m\n# CONFIG_INET6_ESP_OFFLOAD is not set\n# CONFIG_INET6_ESPINTCP is not set\nCONFIG_INET6_IPCOMP=m\nCONFIG_IPV6_MIP6=m\n# CONFIG_IPV6_ILA is not set\nCONFIG_INET6_XFRM_TUNNEL=m\nCONFIG_INET6_TUNNEL=m\n# CONFIG_IPV6_VTI is not set\nCONFIG_IPV6_SIT=m\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\n# CONFIG_IPV6_GRE is not set\nCONFIG_IPV6_MULTIPLE_TABLES=y\n# CONFIG_IPV6_SUBTREES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_NETLABEL is not set\n# CONFIG_MPTCP is not set\nCONFIG_NETWORK_SECMARK=y\nCONFIG_NET_PTP_CLASSIFY=y\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\nCONFIG_NETFILTER_NETLINK=m\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\nCONFIG_NETFILTER_FAMILY_ARP=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\nCONFIG_NETFILTER_NETLINK_QUEUE=m\nCONFIG_NETFILTER_NETLINK_LOG=m\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\nCONFIG_NF_LOG_SYSLOG=m\nCONFIG_NETFILTER_CONNCOUNT=m\nCONFIG_NF_CONNTRACK_MARK=y\nCONFIG_NF_CONNTRACK_SECMARK=y\n# CONFIG_NF_CONNTRACK_ZONES is not set\n# CONFIG_NF_CONNTRACK_PROCFS is not set\nCONFIG_NF_CONNTRACK_EVENTS=y\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\nCONFIG_NF_CT_PROTO_DCCP=y\nCONFIG_NF_CT_PROTO_GRE=y\nCONFIG_NF_CT_PROTO_SCTP=y\nCONFIG_NF_CT_PROTO_UDPLITE=y\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\n# CONFIG_NF_CONNTRACK_IRC is not set\nCONFIG_NF_CONNTRACK_BROADCAST=m\nCONFIG_NF_CONNTRACK_NETBIOS_NS=m\n# CONFIG_NF_CONNTRACK_SNMP is not set\nCONFIG_NF_CONNTRACK_PPTP=m\n# CONFIG_NF_CONNTRACK_SANE is not set\n# CONFIG_NF_CONNTRACK_SIP is not set\nCONFIG_NF_CONNTRACK_TFTP=m\nCONFIG_NF_CT_NETLINK=m\n# CONFIG_NETFILTER_NETLINK_GLUE_CT is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=y\nCONFIG_NF_NAT_MASQUERADE=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\nCONFIG_NETFILTER_XTABLES_COMPAT=y\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\nCONFIG_NETFILTER_XT_CONNMARK=m\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\nCONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m\nCONFIG_NETFILTER_XT_TARGET_CT=m\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\nCONFIG_NETFILTER_XT_TARGET_NETMAP=m\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\nCONFIG_NETFILTER_XT_TARGET_NOTRACK=m\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\nCONFIG_NETFILTER_XT_TARGET_TRACE=m\n# CONFIG_NETFILTER_XT_TARGET_SECMARK is not set\nCONFIG_NETFILTER_XT_TARGET_TCPMSS=m\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\nCONFIG_NETFILTER_XT_MATCH_BPF=m\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\nCONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m\nCONFIG_NETFILTER_XT_MATCH_CONNMARK=m\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\nCONFIG_NETFILTER_XT_MATCH_ECN=m\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\nCONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m\nCONFIG_NETFILTER_XT_MATCH_HELPER=m\nCONFIG_NETFILTER_XT_MATCH_HL=m\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\nCONFIG_NETFILTER_XT_MATCH_IPRANGE=m\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\nCONFIG_NETFILTER_XT_MATCH_L2TP=m\nCONFIG_NETFILTER_XT_MATCH_LENGTH=m\nCONFIG_NETFILTER_XT_MATCH_LIMIT=m\nCONFIG_NETFILTER_XT_MATCH_MAC=m\nCONFIG_NETFILTER_XT_MATCH_MARK=m\nCONFIG_NETFILTER_XT_MATCH_MULTIPORT=m\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\nCONFIG_NETFILTER_XT_MATCH_OWNER=m\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA2 is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\nCONFIG_NETFILTER_XT_MATCH_STATE=m\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\nCONFIG_NETFILTER_XT_MATCH_TCPMSS=m\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\nCONFIG_IP_VS=m\nCONFIG_IP_VS_IPV6=y\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_MH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n# CONFIG_IP_VS_TWOS is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS MH scheduler\n#\nCONFIG_IP_VS_MH_TAB_INDEX=12\n\n#\n# IPVS application helper\n#\nCONFIG_IP_VS_FTP=m\nCONFIG_IP_VS_NFCT=y\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\nCONFIG_NF_SOCKET_IPV4=m\nCONFIG_NF_TPROXY_IPV4=m\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_NF_NAT_PPTP=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\nCONFIG_IP_NF_MATCH_ECN=m\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\nCONFIG_IP_NF_MATCH_TTL=m\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\nCONFIG_IP_NF_TARGET_NETMAP=m\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\nCONFIG_IP_NF_RAW=m\nCONFIG_IP_NF_SECURITY=m\nCONFIG_IP_NF_ARPTABLES=m\nCONFIG_IP_NF_ARPFILTER=m\nCONFIG_IP_NF_ARP_MANGLE=m\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\nCONFIG_NF_LOG_IPV6=m\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_MATCH_SRH is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\n# CONFIG_IP6_NF_SECURITY is not set\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\nCONFIG_L2TP=m\nCONFIG_L2TP_DEBUGFS=m\nCONFIG_L2TP_V3=y\nCONFIG_L2TP_IP=m\nCONFIG_L2TP_ETH=m\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\nCONFIG_NET_SCH_HTB=y\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\nCONFIG_NET_SCH_NETEM=y\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\n# CONFIG_NET_SCH_FQ_CODEL is not set\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\nCONFIG_NET_SCH_INGRESS=y\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\nCONFIG_NET_CLS_U32=y\n# CONFIG_CLS_U32_PERF is not set\n# CONFIG_CLS_U32_MARK is not set\n# CONFIG_NET_CLS_FLOW is not set\n# CONFIG_NET_CLS_CGROUP is not set\nCONFIG_NET_CLS_BPF=y\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\nCONFIG_NET_EMATCH=y\nCONFIG_NET_EMATCH_STACK=32\n# CONFIG_NET_EMATCH_CMP is not set\n# CONFIG_NET_EMATCH_NBYTE is not set\nCONFIG_NET_EMATCH_U32=y\n# CONFIG_NET_EMATCH_META is not set\n# CONFIG_NET_EMATCH_TEXT is not set\n# CONFIG_NET_EMATCH_IPT is not set\nCONFIG_NET_CLS_ACT=y\n# CONFIG_NET_ACT_POLICE is not set\n# CONFIG_NET_ACT_GACT is not set\n# CONFIG_NET_ACT_MIRRED is not set\n# CONFIG_NET_ACT_SAMPLE is not set\n# CONFIG_NET_ACT_IPT is not set\n# CONFIG_NET_ACT_NAT is not set\n# CONFIG_NET_ACT_PEDIT is not set\n# CONFIG_NET_ACT_SIMP is not set\n# CONFIG_NET_ACT_SKBEDIT is not set\n# CONFIG_NET_ACT_CSUM is not set\n# CONFIG_NET_ACT_MPLS is not set\n# CONFIG_NET_ACT_VLAN is not set\n# CONFIG_NET_ACT_BPF is not set\n# CONFIG_NET_ACT_CONNMARK is not set\n# CONFIG_NET_ACT_CTINFO is not set\n# CONFIG_NET_ACT_SKBMOD is not set\n# CONFIG_NET_ACT_IFE is not set\n# CONFIG_NET_ACT_TUNNEL_KEY is not set\n# CONFIG_NET_ACT_GATE is not set\n# CONFIG_NET_TC_SKB_EXT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\nCONFIG_NET_L3_MASTER_DEV=y\n# CONFIG_QRTR is not set\n# CONFIG_NET_NCSI is not set\n# CONFIG_PCPU_DEV_REFCNT is not set\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_SOCK_RX_QUEUE_MAPPING=y\nCONFIG_XPS=y\n# CONFIG_CGROUP_NET_PRIO is not set\n# CONFIG_CGROUP_NET_CLASSID is not set\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\nCONFIG_BT_RFCOMM_TTY=y\n# CONFIG_BT_BNEP is not set\nCONFIG_BT_HIDP=m\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_LEDS is not set\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\n# CONFIG_BT_DEBUGFS is not set\n# CONFIG_BT_SELFTEST is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_QCA=m\nCONFIG_BT_HCIBTUSB=m\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\nCONFIG_BT_HCIBTUSB_MTK=y\nCONFIG_BT_HCIBTUSB_RTL=y\n# CONFIG_BT_HCIBTSDIO is not set\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_SERDEV=y\nCONFIG_BT_HCIUART_H4=y\n# CONFIG_BT_HCIUART_NOKIA is not set\nCONFIG_BT_HCIUART_BCSP=y\nCONFIG_BT_HCIUART_ATH3K=y\nCONFIG_BT_HCIUART_LL=y\nCONFIG_BT_HCIUART_3WIRE=y\nCONFIG_BT_HCIUART_INTEL=y\nCONFIG_BT_HCIUART_BCM=y\nCONFIG_BT_HCIUART_QCA=y\nCONFIG_BT_HCIUART_AG6XX=y\nCONFIG_BT_HCIUART_MRVL=y\nCONFIG_BT_HCIBCM203X=m\nCONFIG_BT_HCIBPA10X=m\nCONFIG_BT_HCIBFUSB=m\nCONFIG_BT_HCIVHCI=m\nCONFIG_BT_MRVL=m\nCONFIG_BT_MRVL_SDIO=m\nCONFIG_BT_ATH3K=m\n# CONFIG_BT_MTKSDIO is not set\n# CONFIG_BT_MTKUART is not set\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=y\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\n# CONFIG_CFG80211_DEFAULT_PS is not set\n# CONFIG_CFG80211_DEBUGFS is not set\nCONFIG_CFG80211_CRDA_SUPPORT=y\n# CONFIG_CFG80211_WEXT is not set\nCONFIG_MAC80211=y\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\nCONFIG_MAC80211_MESH=y\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=y\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_PAGE_POOL=y\n# CONFIG_FAILOVER is not set\n# CONFIG_ETHTOOL_NETLINK is not set\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\nCONFIG_HAVE_PCI=y\nCONFIG_PCI=y\nCONFIG_PCI_DOMAINS=y\nCONFIG_PCI_DOMAINS_GENERIC=y\nCONFIG_PCI_SYSCALL=y\nCONFIG_PCIEPORTBUS=y\n# CONFIG_PCIEAER is not set\nCONFIG_PCIEASPM=y\nCONFIG_PCIEASPM_DEFAULT=y\n# CONFIG_PCIEASPM_POWERSAVE is not set\n# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set\n# CONFIG_PCIEASPM_PERFORMANCE is not set\nCONFIG_PCIE_PME=y\n# CONFIG_PCIE_PTM is not set\nCONFIG_PCI_MSI=y\nCONFIG_PCI_MSI_IRQ_DOMAIN=y\nCONFIG_PCI_QUIRKS=y\n# CONFIG_PCI_DEBUG is not set\n# CONFIG_PCI_STUB is not set\n# CONFIG_PCI_IOV is not set\n# CONFIG_PCI_PRI is not set\n# CONFIG_PCI_PASID is not set\n# CONFIG_HOTPLUG_PCI is not set\n\n#\n# PCI controller drivers\n#\n# CONFIG_PCI_FTPCI100 is not set\n# CONFIG_PCI_HOST_GENERIC is not set\n# CONFIG_PCIE_XILINX is not set\n# CONFIG_PCI_XGENE is not set\n# CONFIG_PCIE_ALTERA is not set\n# CONFIG_PCI_HOST_THUNDER_PEM is not set\n# CONFIG_PCI_HOST_THUNDER_ECAM is not set\n# CONFIG_PCIE_MICROCHIP_HOST is not set\n\n#\n# DesignWare PCI Core Support\n#\nCONFIG_PCIE_DW=y\nCONFIG_PCIE_DW_HOST=y\nCONFIG_PCIE_DW_PLAT=y\nCONFIG_PCIE_DW_PLAT_HOST=y\n# CONFIG_PCIE_DW_PLAT_EP is not set\n# CONFIG_PCI_HISI is not set\n# CONFIG_PCIE_KIRIN is not set\n# CONFIG_PCI_MESON is not set\n# CONFIG_PCIE_AL is not set\n# end of DesignWare PCI Core Support\n\n#\n# Mobiveil PCIe Core Support\n#\n# end of Mobiveil PCIe Core Support\n\n#\n# Cadence PCIe controllers support\n#\n# CONFIG_PCIE_CADENCE_PLAT_HOST is not set\n# CONFIG_PCIE_CADENCE_PLAT_EP is not set\n# CONFIG_PCI_J721E_HOST is not set\n# CONFIG_PCI_J721E_EP is not set\n# end of Cadence PCIe controllers support\n# end of PCI controller drivers\n\n#\n# PCI Endpoint\n#\nCONFIG_PCI_ENDPOINT=y\n# CONFIG_PCI_ENDPOINT_CONFIGFS is not set\n# CONFIG_PCI_EPF_TEST is not set\n# CONFIG_PCI_EPF_NTB is not set\n# CONFIG_PCI_EPF_VNTB is not set\n# end of PCI Endpoint\n\n#\n# PCI switch controller drivers\n#\n# CONFIG_PCI_SW_SWITCHTEC is not set\n# end of PCI switch controller drivers\n\n# CONFIG_CXL_BUS is not set\n# CONFIG_PCCARD is not set\n# CONFIG_RAPIDIO is not set\n\n#\n# Generic Driver Options\n#\nCONFIG_UEVENT_HELPER=y\nCONFIG_UEVENT_HELPER_PATH=\"\"\nCONFIG_DEVTMPFS=y\n# CONFIG_DEVTMPFS_MOUNT is not set\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\n# CONFIG_FW_CACHE is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\nCONFIG_ALLOW_DEV_COREDUMP=y\nCONFIG_DEV_COREDUMP=y\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\n# CONFIG_REGMAP_SPMI is not set\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_MOXTET is not set\n# CONFIG_VEXPRESS_CONFIG is not set\n# CONFIG_MHI_BUS is not set\n# end of Bus devices\n\n# CONFIG_CONNECTOR is not set\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\n# CONFIG_ARM_SCMI_PROTOCOL is not set\n# end of ARM System Control and Management Interface Protocol\n\nCONFIG_ARM_SCPI_PROTOCOL=y\n# CONFIG_ARM_SCPI_POWER_DOMAIN is not set\n# CONFIG_FW_CFG_SYSFS is not set\n# CONFIG_ARM_FFA_TRANSPORT is not set\n# CONFIG_GOOGLE_FIRMWARE is not set\n# CONFIG_MESON_SM is not set\nCONFIG_ARM_PSCI_FW=y\n# CONFIG_ARM_PSCI_CHECKER is not set\nCONFIG_HAVE_ARM_SMCCC=y\nCONFIG_HAVE_ARM_SMCCC_DISCOVERY=y\n# CONFIG_ARM_SMCCC_SOC_ID is not set\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n\n#\n# Partition parsers\n#\n# CONFIG_MTD_AR7_PARTS is not set\n# CONFIG_MTD_CMDLINE_PARTS is not set\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AFS_PARTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\n# end of Partition parsers\n\n#\n# User Modules And Translation Layers\n#\nCONFIG_MTD_BLKDEVS=y\nCONFIG_MTD_BLOCK=y\n\n#\n# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK.\n#\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\n# CONFIG_MTD_OOPS is not set\n# CONFIG_MTD_SWAP is not set\n# CONFIG_MTD_PARTITIONED_MASTER is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\n# CONFIG_MTD_CFI is not set\n# CONFIG_MTD_JEDECPROBE is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n# end of RAM/ROM/Flash chip drivers\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_INTEL_VR_NOR is not set\n# CONFIG_MTD_PLATRAM is not set\n# end of Mapping drivers for chip access\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_PMC551 is not set\n# CONFIG_MTD_DATAFLASH is not set\n# CONFIG_MTD_MCHP23K256 is not set\n# CONFIG_MTD_MCHP48L640 is not set\n# CONFIG_MTD_SST25L is not set\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\n# end of Self-contained MTD device drivers\n\n#\n# NAND\n#\nCONFIG_MTD_NAND_CORE=y\n# CONFIG_MTD_ONENAND is not set\nCONFIG_MTD_RAW_NAND=y\n\n#\n# Raw/parallel NAND flash controllers\n#\n# CONFIG_MTD_NAND_DENALI_PCI is not set\n# CONFIG_MTD_NAND_DENALI_DT is not set\n# CONFIG_MTD_NAND_CAFE is not set\n# CONFIG_MTD_NAND_BRCMNAND is not set\n# CONFIG_MTD_NAND_MXIC is not set\n# CONFIG_MTD_NAND_MESON is not set\n# CONFIG_MTD_NAND_GPIO is not set\n# CONFIG_MTD_NAND_PLATFORM is not set\n# CONFIG_MTD_NAND_CADENCE is not set\n# CONFIG_MTD_NAND_ARASAN is not set\n# CONFIG_MTD_NAND_INTEL_LGM is not set\n\n#\n# Misc\n#\n# CONFIG_MTD_NAND_NANDSIM is not set\n# CONFIG_MTD_NAND_RICOH is not set\n# CONFIG_MTD_NAND_DISKONCHIP is not set\n# CONFIG_MTD_SPI_NAND is not set\n\n#\n# ECC engine support\n#\nCONFIG_MTD_NAND_ECC=y\nCONFIG_MTD_NAND_ECC_SW_HAMMING=y\n# CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC is not set\n# CONFIG_MTD_NAND_ECC_SW_BCH is not set\n# end of ECC engine support\n# end of NAND\n\n#\n# LPDDR & LPDDR2 PCM memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\n# end of LPDDR & LPDDR2 PCM memory drivers\n\n# CONFIG_MTD_SPI_NOR is not set\n# CONFIG_MTD_UBI is not set\n# CONFIG_MTD_HYPERBUS is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_DYNAMIC=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\n# CONFIG_OF_OVERLAY is not set\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_CDROM=y\n# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set\nCONFIG_ZRAM=m\n# CONFIG_ZRAM_DEF_COMP_LZORLE is not set\n# CONFIG_ZRAM_DEF_COMP_LZ4 is not set\nCONFIG_ZRAM_DEF_COMP_LZO=y\nCONFIG_ZRAM_DEF_COMP=\"lzo\"\n# CONFIG_ZRAM_WRITEBACK is not set\n# CONFIG_ZRAM_MEMORY_TRACKING is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=16\n# CONFIG_BLK_DEV_CRYPTOLOOP is not set\n# CONFIG_BLK_DEV_DRBD is not set\n# CONFIG_BLK_DEV_NBD is not set\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=16\nCONFIG_BLK_DEV_RAM_SIZE=8192\nCONFIG_CDROM_PKTCDVD=m\nCONFIG_CDROM_PKTCDVD_BUFFERS=8\nCONFIG_CDROM_PKTCDVD_WCACHE=y\nCONFIG_ATA_OVER_ETH=m\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_RSXX is not set\n\n#\n# NVME Support\n#\nCONFIG_NVME_CORE=m\nCONFIG_BLK_DEV_NVME=m\nCONFIG_NVME_MULTIPATH=y\n# CONFIG_NVME_HWMON is not set\nCONFIG_NVME_FABRICS=m\nCONFIG_NVME_FC=m\nCONFIG_NVME_TCP=m\nCONFIG_NVME_TARGET=m\n# CONFIG_NVME_TARGET_PASSTHRU is not set\nCONFIG_NVME_TARGET_LOOP=m\nCONFIG_NVME_TARGET_FC=m\n# CONFIG_NVME_TARGET_FCLOOP is not set\nCONFIG_NVME_TARGET_TCP=m\n# end of NVME Support\n\n#\n# Misc devices\n#\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_PHANTOM is not set\n# CONFIG_TIFM_CORE is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_HI6421V600_IRQ is not set\n# CONFIG_HP_ILO is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\n# CONFIG_SRAM is not set\n# CONFIG_DW_XDATA_PCIE is not set\n# CONFIG_PCI_ENDPOINT_TEST is not set\n# CONFIG_XILINX_SDFEC is not set\nCONFIG_UID_SYS_STATS=y\n# CONFIG_HISI_HIKEY_USB is not set\n# CONFIG_OPEN_DICE is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\n# CONFIG_EEPROM_AT25 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_EEPROM_EE1004 is not set\n# end of EEPROM support\n\n# CONFIG_CB710_CORE is not set\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n# CONFIG_GENWQE is not set\n# CONFIG_ECHO is not set\n# CONFIG_BCM_VK is not set\n# CONFIG_MISC_ALCOR_PCI is not set\n# CONFIG_MISC_RTSX_PCI is not set\n# CONFIG_MISC_RTSX_USB is not set\n# CONFIG_HABANA_AI is not set\n# CONFIG_UACCE is not set\n# CONFIG_PVPANIC is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\nCONFIG_SCSI_PROC_FS=y\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_CHR_DEV_SG=y\nCONFIG_BLK_DEV_BSG=y\nCONFIG_CHR_DEV_SCH=m\nCONFIG_SCSI_CONSTANTS=y\nCONFIG_SCSI_LOGGING=y\nCONFIG_SCSI_SCAN_ASYNC=y\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_CXGB3_ISCSI is not set\n# CONFIG_SCSI_CXGB4_ISCSI is not set\n# CONFIG_SCSI_BNX2_ISCSI is not set\n# CONFIG_BE2ISCSI is not set\n# CONFIG_BLK_DEV_3W_XXXX_RAID is not set\n# CONFIG_SCSI_HPSA is not set\n# CONFIG_SCSI_3W_9XXX is not set\n# CONFIG_SCSI_3W_SAS is not set\n# CONFIG_SCSI_ACARD is not set\n# CONFIG_SCSI_AACRAID is not set\n# CONFIG_SCSI_AIC7XXX is not set\n# CONFIG_SCSI_AIC79XX is not set\n# CONFIG_SCSI_AIC94XX is not set\n# CONFIG_SCSI_HISI_SAS is not set\n# CONFIG_SCSI_MVSAS is not set\n# CONFIG_SCSI_MVUMI is not set\n# CONFIG_SCSI_DPT_I2O is not set\n# CONFIG_SCSI_ADVANSYS is not set\n# CONFIG_SCSI_ARCMSR is not set\n# CONFIG_SCSI_ESAS2R is not set\n# CONFIG_MEGARAID_NEWGEN is not set\n# CONFIG_MEGARAID_LEGACY is not set\n# CONFIG_MEGARAID_SAS is not set\n# CONFIG_SCSI_MPT3SAS is not set\n# CONFIG_SCSI_MPT2SAS is not set\n# CONFIG_SCSI_MPI3MR is not set\n# CONFIG_SCSI_SMARTPQI is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_SCSI_UFS_HWMON is not set\n# CONFIG_SCSI_HPTIOP is not set\n# CONFIG_SCSI_MYRB is not set\n# CONFIG_SCSI_MYRS is not set\n# CONFIG_SCSI_SNIC is not set\n# CONFIG_SCSI_DMX3191D is not set\n# CONFIG_SCSI_FDOMAIN_PCI is not set\n# CONFIG_SCSI_IPS is not set\n# CONFIG_SCSI_INITIO is not set\n# CONFIG_SCSI_INIA100 is not set\n# CONFIG_SCSI_STEX is not set\n# CONFIG_SCSI_SYM53C8XX_2 is not set\n# CONFIG_SCSI_IPR is not set\n# CONFIG_SCSI_QLOGIC_1280 is not set\n# CONFIG_SCSI_QLA_ISCSI is not set\n# CONFIG_SCSI_DC395x is not set\n# CONFIG_SCSI_AM53C974 is not set\n# CONFIG_SCSI_WD719X is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_PMCRAID is not set\n# CONFIG_SCSI_PM8001 is not set\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\nCONFIG_HAVE_PATA_PLATFORM=y\nCONFIG_ATA=y\nCONFIG_ATA_VERBOSE_ERROR=y\nCONFIG_ATA_FORCE=y\n\n#\n# Controllers with non-SFF native interface\n#\n# CONFIG_SATA_AHCI is not set\n# CONFIG_SATA_AHCI_PLATFORM is not set\n# CONFIG_AHCI_CEVA is not set\n# CONFIG_AHCI_QORIQ is not set\n# CONFIG_SATA_INIC162X is not set\n# CONFIG_SATA_ACARD_AHCI is not set\n# CONFIG_SATA_SIL24 is not set\nCONFIG_ATA_SFF=y\n\n#\n# SFF controllers with custom DMA interface\n#\n# CONFIG_PDC_ADMA is not set\n# CONFIG_SATA_QSTOR is not set\n# CONFIG_SATA_SX4 is not set\nCONFIG_ATA_BMDMA=y\n\n#\n# SATA SFF controllers with BMDMA\n#\n# CONFIG_ATA_PIIX is not set\n# CONFIG_SATA_MV is not set\n# CONFIG_SATA_NV is not set\n# CONFIG_SATA_PROMISE is not set\n# CONFIG_SATA_SIL is not set\n# CONFIG_SATA_SIS is not set\n# CONFIG_SATA_SVW is not set\n# CONFIG_SATA_ULI is not set\n# CONFIG_SATA_VIA is not set\n# CONFIG_SATA_VITESSE is not set\n\n#\n# PATA SFF controllers with BMDMA\n#\n# CONFIG_PATA_ALI is not set\n# CONFIG_PATA_AMD is not set\n# CONFIG_PATA_ARTOP is not set\n# CONFIG_PATA_ATIIXP is not set\n# CONFIG_PATA_ATP867X is not set\n# CONFIG_PATA_CMD64X is not set\n# CONFIG_PATA_CYPRESS is not set\n# CONFIG_PATA_EFAR is not set\n# CONFIG_PATA_HPT366 is not set\n# CONFIG_PATA_HPT37X is not set\n# CONFIG_PATA_HPT3X2N is not set\n# CONFIG_PATA_HPT3X3 is not set\n# CONFIG_PATA_IT8213 is not set\n# CONFIG_PATA_IT821X is not set\n# CONFIG_PATA_JMICRON is not set\n# CONFIG_PATA_MARVELL is not set\n# CONFIG_PATA_NETCELL is not set\n# CONFIG_PATA_NINJA32 is not set\n# CONFIG_PATA_NS87415 is not set\n# CONFIG_PATA_OLDPIIX is not set\n# CONFIG_PATA_OPTIDMA is not set\n# CONFIG_PATA_PDC2027X is not set\n# CONFIG_PATA_PDC_OLD is not set\n# CONFIG_PATA_RADISYS is not set\n# CONFIG_PATA_RDC is not set\n# CONFIG_PATA_SCH is not set\n# CONFIG_PATA_SERVERWORKS is not set\n# CONFIG_PATA_SIL680 is not set\n# CONFIG_PATA_SIS is not set\n# CONFIG_PATA_TOSHIBA is not set\n# CONFIG_PATA_TRIFLEX is not set\n# CONFIG_PATA_VIA is not set\n# CONFIG_PATA_WINBOND is not set\n\n#\n# PIO-only SFF controllers\n#\n# CONFIG_PATA_CMD640_PCI is not set\n# CONFIG_PATA_MPIIX is not set\n# CONFIG_PATA_NS87410 is not set\n# CONFIG_PATA_OPTI is not set\n# CONFIG_PATA_PLATFORM is not set\n# CONFIG_PATA_RZ1000 is not set\n\n#\n# Generic fallback / legacy drivers\n#\n# CONFIG_ATA_GENERIC is not set\n# CONFIG_PATA_LEGACY is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\n# CONFIG_DM_DEBUG is not set\nCONFIG_DM_BUFIO=m\n# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\n# CONFIG_DM_UNSTRIPED is not set\nCONFIG_DM_CRYPT=m\nCONFIG_DM_DEFAULT_KEY=m\nCONFIG_DM_SNAPSHOT=m\nCONFIG_DM_THIN_PROVISIONING=m\n# CONFIG_DM_CACHE is not set\n# CONFIG_DM_WRITECACHE is not set\n# CONFIG_DM_EBS is not set\n# CONFIG_DM_ERA is not set\n# CONFIG_DM_CLONE is not set\n# CONFIG_DM_MIRROR is not set\n# CONFIG_DM_RAID is not set\n# CONFIG_DM_ZERO is not set\n# CONFIG_DM_MULTIPATH is not set\n# CONFIG_DM_DELAY is not set\n# CONFIG_DM_DUST is not set\nCONFIG_DM_UEVENT=y\n# CONFIG_DM_FLAKEY is not set\nCONFIG_DM_VERITY=m\n# CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG is not set\nCONFIG_DM_VERITY_FEC=y\n# CONFIG_DM_SWITCH is not set\n# CONFIG_DM_LOG_WRITES is not set\n# CONFIG_DM_INTEGRITY is not set\nCONFIG_DM_BOW=m\nCONFIG_DM_USER=m\n# CONFIG_TARGET_CORE is not set\n# CONFIG_FUSION is not set\n\n#\n# IEEE 1394 (FireWire) support\n#\n# CONFIG_FIREWIRE is not set\n# CONFIG_FIREWIRE_NOSY is not set\n# end of IEEE 1394 (FireWire) support\n\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\nCONFIG_DUMMY=m\n# CONFIG_WIREGUARD is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_FC is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\nCONFIG_MACVTAP=m\nCONFIG_IPVLAN_L3S=y\nCONFIG_IPVLAN=m\nCONFIG_IPVTAP=m\nCONFIG_VXLAN=m\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_MACSEC is not set\n# CONFIG_NETCONSOLE is not set\nCONFIG_TUN=y\nCONFIG_TAP=m\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\n# CONFIG_NLMON is not set\nCONFIG_NET_VRF=m\n# CONFIG_ARCNET is not set\nCONFIG_ETHERNET=y\n# CONFIG_NET_VENDOR_3COM is not set\n# CONFIG_NET_VENDOR_ADAPTEC is not set\n# CONFIG_NET_VENDOR_AGERE is not set\n# CONFIG_NET_VENDOR_ALACRITECH is not set\n# CONFIG_NET_VENDOR_ALTEON is not set\n# CONFIG_ALTERA_TSE is not set\n# CONFIG_NET_VENDOR_AMAZON is not set\n# CONFIG_NET_VENDOR_AMD is not set\n# CONFIG_NET_VENDOR_AQUANTIA is not set\n# CONFIG_NET_VENDOR_ARC is not set\n# CONFIG_NET_VENDOR_ATHEROS is not set\n# CONFIG_NET_VENDOR_BROADCOM is not set\n# CONFIG_NET_VENDOR_CADENCE is not set\n# CONFIG_NET_VENDOR_CAVIUM is not set\n# CONFIG_NET_VENDOR_CHELSIO is not set\n# CONFIG_NET_VENDOR_CISCO is not set\n# CONFIG_NET_VENDOR_CORTINA is not set\n# CONFIG_DNET is not set\n# CONFIG_NET_VENDOR_DEC is not set\n# CONFIG_NET_VENDOR_DLINK is not set\n# CONFIG_NET_VENDOR_EMULEX is not set\n# CONFIG_NET_VENDOR_EZCHIP is not set\n# CONFIG_NET_VENDOR_GOOGLE is not set\n# CONFIG_NET_VENDOR_HISILICON is not set\n# CONFIG_NET_VENDOR_HUAWEI is not set\n# CONFIG_NET_VENDOR_INTEL is not set\n# CONFIG_JME is not set\n# CONFIG_NET_VENDOR_LITEX is not set\n# CONFIG_NET_VENDOR_MARVELL is not set\n# CONFIG_NET_VENDOR_MELLANOX is not set\n# CONFIG_NET_VENDOR_MICREL is not set\n# CONFIG_NET_VENDOR_MICROCHIP is not set\n# CONFIG_NET_VENDOR_MICROSEMI is not set\n# CONFIG_NET_VENDOR_MICROSOFT is not set\n# CONFIG_NET_VENDOR_MYRI is not set\n# CONFIG_FEALNX is not set\n# CONFIG_NET_VENDOR_NI is not set\n# CONFIG_NET_VENDOR_NATSEMI is not set\n# CONFIG_NET_VENDOR_NETERION is not set\n# CONFIG_NET_VENDOR_NETRONOME is not set\n# CONFIG_NET_VENDOR_NVIDIA is not set\n# CONFIG_NET_VENDOR_OKI is not set\n# CONFIG_ETHOC is not set\n# CONFIG_NET_VENDOR_PACKET_ENGINES is not set\n# CONFIG_NET_VENDOR_PENSANDO is not set\n# CONFIG_NET_VENDOR_QLOGIC is not set\n# CONFIG_NET_VENDOR_BROCADE is not set\n# CONFIG_NET_VENDOR_QUALCOMM is not set\n# CONFIG_NET_VENDOR_RDC is not set\n# CONFIG_NET_VENDOR_REALTEK is not set\n# CONFIG_NET_VENDOR_RENESAS is not set\n# CONFIG_NET_VENDOR_ROCKER is not set\n# CONFIG_NET_VENDOR_SAMSUNG is not set\n# CONFIG_NET_VENDOR_SEEQ is not set\n# CONFIG_NET_VENDOR_SILAN is not set\n# CONFIG_NET_VENDOR_SIS is not set\n# CONFIG_NET_VENDOR_SOLARFLARE is not set\n# CONFIG_NET_VENDOR_SMSC is not set\n# CONFIG_NET_VENDOR_SOCIONEXT is not set\nCONFIG_NET_VENDOR_STMICRO=y\nCONFIG_STMMAC_ETH=y\n# CONFIG_STMMAC_SELFTESTS is not set\nCONFIG_STMMAC_PLATFORM=y\nCONFIG_DWMAC_DWC_QOS_ETH=y\n# CONFIG_DWMAC_GENERIC is not set\nCONFIG_DWMAC_MESON=y\nCONFIG_AMLOGIC_ETH_PRIVE=y\n# CONFIG_DWMAC_INTEL_PLAT is not set\n# CONFIG_DWMAC_LOONGSON is not set\n# CONFIG_STMMAC_PCI is not set\n# CONFIG_NET_VENDOR_SUN is not set\n# CONFIG_NET_VENDOR_SYNOPSYS is not set\n# CONFIG_NET_VENDOR_TEHUTI is not set\n# CONFIG_NET_VENDOR_TI is not set\n# CONFIG_NET_VENDOR_VIA is not set\n# CONFIG_NET_VENDOR_WIZNET is not set\n# CONFIG_NET_VENDOR_XILINX is not set\n# CONFIG_FDDI is not set\n# CONFIG_HIPPI is not set\nCONFIG_PHYLINK=y\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\nCONFIG_LED_TRIGGER_PHY=y\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_MESON_GXL_PHY is not set\n# CONFIG_ADIN_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=m\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM54140_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_LXT_PHY is not set\nCONFIG_INTEL_XWAY_PHY=y\nCONFIG_JLSEMI_PHY=y\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MARVELL_88X2222_PHY is not set\nCONFIG_MAXLINEAR_GPHY=y\nCONFIG_MEDIATEK_GE_PHY=y\n# CONFIG_MICREL_PHY is not set\nCONFIG_MICROCHIP_PHY=m\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\nCONFIG_MOTORCOMM_PHY=y\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_NXP_TJA11XX_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_QSEMI_PHY is not set\n# CONFIG_REALTEK_PHY is not set\n# CONFIG_RENESAS_PHY is not set\n# CONFIG_ROCKCHIP_PHY is not set\nCONFIG_MAXIO_PHY=y\nCONFIG_SMSC_PHY=m\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_OF_MDIO=y\nCONFIG_MDIO_DEVRES=y\n# CONFIG_MDIO_BITBANG is not set\n# CONFIG_MDIO_BCM_UNIMAC is not set\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_OCTEON is not set\n# CONFIG_MDIO_IPQ4019 is not set\n# CONFIG_MDIO_IPQ8064 is not set\n# CONFIG_MDIO_THUNDER is not set\n\n#\n# MDIO Multiplexers\n#\nCONFIG_MDIO_BUS_MUX=y\n# CONFIG_MDIO_BUS_MUX_MESON_G12A is not set\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n\n#\n# PCS device drivers\n#\nCONFIG_PCS_XPCS=y\n# end of PCS device drivers\n\nCONFIG_PPP=y\nCONFIG_PPP_BSDCOMP=m\nCONFIG_PPP_DEFLATE=m\n# CONFIG_PPP_FILTER is not set\nCONFIG_PPP_MPPE=m\n# CONFIG_PPP_MULTILINK is not set\n# CONFIG_PPPOE is not set\nCONFIG_PPTP=m\nCONFIG_PPPOL2TP=m\n# CONFIG_PPP_ASYNC is not set\n# CONFIG_PPP_SYNC_TTY is not set\n# CONFIG_SLIP is not set\nCONFIG_SLHC=y\nCONFIG_USB_NET_DRIVERS=y\nCONFIG_USB_CATC=m\nCONFIG_USB_KAWETH=m\nCONFIG_USB_PEGASUS=m\nCONFIG_USB_RTL8150=m\n# CONFIG_USB_RTL8152 is not set\nCONFIG_USB_LAN78XX=m\nCONFIG_USB_USBNET=m\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\nCONFIG_USB_NET_CDC_EEM=m\nCONFIG_USB_NET_CDC_NCM=m\nCONFIG_USB_NET_HUAWEI_CDC_NCM=m\nCONFIG_USB_NET_CDC_MBIM=m\nCONFIG_USB_NET_DM9601=m\nCONFIG_USB_NET_SR9700=m\nCONFIG_USB_NET_SR9800=m\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=m\nCONFIG_USB_NET_GL620A=m\nCONFIG_USB_NET_NET1080=m\nCONFIG_USB_NET_PLUSB=m\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\nCONFIG_USB_NET_CDC_SUBSET_ENABLE=m\nCONFIG_USB_NET_CDC_SUBSET=m\nCONFIG_USB_ALI_M5632=y\nCONFIG_USB_AN2720=y\nCONFIG_USB_BELKIN=y\nCONFIG_USB_ARMLINUX=y\nCONFIG_USB_EPSON2888=y\nCONFIG_USB_KC2190=y\nCONFIG_USB_NET_ZAURUS=m\nCONFIG_USB_NET_CX82310_ETH=m\nCONFIG_USB_NET_KALMIA=m\nCONFIG_USB_NET_QMI_WWAN=m\nCONFIG_USB_HSO=m\nCONFIG_USB_NET_INT51X1=m\nCONFIG_USB_IPHETH=m\nCONFIG_USB_SIERRA_NET=m\nCONFIG_USB_VL600=m\nCONFIG_USB_NET_CH9200=m\nCONFIG_USB_NET_AQC111=m\nCONFIG_USB_RTL8153_ECM=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\n# CONFIG_ADM8211 is not set\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\n# CONFIG_ATH5K is not set\n# CONFIG_ATH5K_PCI is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\nCONFIG_ATH9K=m\nCONFIG_ATH9K_PCI=y\n# CONFIG_ATH9K_AHB is not set\n# CONFIG_ATH9K_DEBUGFS is not set\n# CONFIG_ATH9K_DYNACK is not set\n# CONFIG_ATH9K_WOW is not set\nCONFIG_ATH9K_RFKILL=y\n# CONFIG_ATH9K_CHANNEL_CONTEXT is not set\nCONFIG_ATH9K_PCOEM=y\n# CONFIG_ATH9K_PCI_NO_EEPROM is not set\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\nCONFIG_ATH9K_HWRNG=y\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\nCONFIG_CARL9170_HWRNG=y\nCONFIG_ATH6KL=m\nCONFIG_ATH6KL_SDIO=m\nCONFIG_ATH6KL_USB=m\n# CONFIG_ATH6KL_DEBUG is not set\n# CONFIG_ATH6KL_TRACING is not set\nCONFIG_AR5523=m\n# CONFIG_WIL6210 is not set\nCONFIG_ATH10K=m\nCONFIG_ATH10K_CE=y\n# CONFIG_ATH10K_PCI is not set\nCONFIG_ATH10K_SDIO=m\nCONFIG_ATH10K_USB=m\n# CONFIG_ATH10K_DEBUG is not set\n# CONFIG_ATH10K_DEBUGFS is not set\n# CONFIG_ATH10K_TRACING is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\n# CONFIG_ATMEL is not set\n# CONFIG_AT76C50X_USB is not set\nCONFIG_WLAN_VENDOR_BROADCOM=y\n# CONFIG_B43 is not set\n# CONFIG_B43LEGACY is not set\n# CONFIG_BRCMSMAC is not set\n# CONFIG_BRCMFMAC is not set\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\n# CONFIG_IPW2100 is not set\n# CONFIG_IPW2200 is not set\n# CONFIG_IWL4965 is not set\n# CONFIG_IWL3945 is not set\n# CONFIG_IWLWIFI is not set\nCONFIG_WLAN_VENDOR_INTERSIL=y\n# CONFIG_HOSTAP is not set\n# CONFIG_HERMES is not set\n# CONFIG_P54_COMMON is not set\nCONFIG_WLAN_VENDOR_MARVELL=y\n# CONFIG_LIBERTAS is not set\n# CONFIG_LIBERTAS_THINFIRM is not set\n# CONFIG_MWIFIEX is not set\n# CONFIG_MWL8K is not set\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\n# CONFIG_MT76x0U is not set\n# CONFIG_MT76x0E is not set\n# CONFIG_MT76x2E is not set\n# CONFIG_MT76x2U is not set\n# CONFIG_MT7603E is not set\n# CONFIG_MT7615E is not set\n# CONFIG_MT7663U is not set\n# CONFIG_MT7663S is not set\n# CONFIG_MT7915E is not set\n# CONFIG_MT7921E is not set\nCONFIG_WLAN_VENDOR_MICROCHIP=y\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\n# CONFIG_RT2400PCI is not set\n# CONFIG_RT2500PCI is not set\n# CONFIG_RT61PCI is not set\n# CONFIG_RT2800PCI is not set\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\n# CONFIG_RTL8180 is not set\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=y\nCONFIG_RTL8192CE=m\nCONFIG_RTL8192SE=m\nCONFIG_RTL8192DE=m\nCONFIG_RTL8723AE=m\nCONFIG_RTL8723BE=m\nCONFIG_RTL8188EE=m\nCONFIG_RTL8192EE=m\nCONFIG_RTL8821AE=m\nCONFIG_RTL8192CU=m\nCONFIG_RTLWIFI=m\nCONFIG_RTLWIFI_PCI=m\nCONFIG_RTLWIFI_USB=m\nCONFIG_RTLWIFI_DEBUG=y\nCONFIG_RTL8192C_COMMON=m\nCONFIG_RTL8723_COMMON=m\nCONFIG_RTLBTCOEXIST=m\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\n# CONFIG_RTW88 is not set\nCONFIG_WLAN_VENDOR_RSI=y\n# CONFIG_RSI_91X is not set\n# CONFIG_WLAN_VENDOR_ST is not set\n# CONFIG_WLAN_VENDOR_TI is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\nCONFIG_USB_ZD1201=m\n# CONFIG_ZD1211RW is not set\n# CONFIG_WLAN_VENDOR_QUANTENNA is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\n# CONFIG_VMXNET3 is not set\n# CONFIG_NETDEVSIM is not set\n# CONFIG_NET_FAILOVER is not set\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\n# CONFIG_INPUT_MATRIXKMAP is not set\n\n#\n# Userland interfaces\n#\nCONFIG_INPUT_MOUSEDEV=y\nCONFIG_INPUT_MOUSEDEV_PSAUX=y\nCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024\nCONFIG_INPUT_MOUSEDEV_SCREEN_Y=768\nCONFIG_INPUT_JOYDEV=m\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADC is not set\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\n# CONFIG_KEYBOARD_ATKBD is not set\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\n# CONFIG_KEYBOARD_GPIO is not set\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\n# CONFIG_INPUT_MOUSE is not set\nCONFIG_INPUT_JOYSTICK=y\n# CONFIG_JOYSTICK_ANALOG is not set\n# CONFIG_JOYSTICK_A3D is not set\n# CONFIG_JOYSTICK_ADC is not set\n# CONFIG_JOYSTICK_ADI is not set\n# CONFIG_JOYSTICK_COBRA is not set\n# CONFIG_JOYSTICK_GF2K is not set\n# CONFIG_JOYSTICK_GRIP is not set\n# CONFIG_JOYSTICK_GRIP_MP is not set\n# CONFIG_JOYSTICK_GUILLEMOT is not set\n# CONFIG_JOYSTICK_INTERACT is not set\n# CONFIG_JOYSTICK_SIDEWINDER is not set\n# CONFIG_JOYSTICK_TMDC is not set\n# CONFIG_JOYSTICK_IFORCE is not set\n# CONFIG_JOYSTICK_WARRIOR is not set\n# CONFIG_JOYSTICK_MAGELLAN is not set\n# CONFIG_JOYSTICK_SPACEORB is not set\n# CONFIG_JOYSTICK_SPACEBALL is not set\n# CONFIG_JOYSTICK_STINGER is not set\n# CONFIG_JOYSTICK_TWIDJOY is not set\n# CONFIG_JOYSTICK_ZHENHUA is not set\n# CONFIG_JOYSTICK_AS5011 is not set\n# CONFIG_JOYSTICK_JOYDUMP is not set\nCONFIG_JOYSTICK_XPAD=y\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\n# CONFIG_JOYSTICK_PSXPAD_SPI is not set\n# CONFIG_JOYSTICK_PXRC is not set\n# CONFIG_JOYSTICK_QWIIC is not set\n# CONFIG_JOYSTICK_FSIA6B is not set\n# CONFIG_INPUT_TABLET is not set\nCONFIG_INPUT_TOUCHSCREEN=y\n# CONFIG_TOUCHSCREEN_ADS7846 is not set\n# CONFIG_TOUCHSCREEN_AD7877 is not set\n# CONFIG_TOUCHSCREEN_AD7879 is not set\n# CONFIG_TOUCHSCREEN_ADC is not set\n# CONFIG_TOUCHSCREEN_AR1021_I2C is not set\n# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set\n# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_BU21013 is not set\n# CONFIG_TOUCHSCREEN_BU21029 is not set\n# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMA140 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set\n# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set\n# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set\n# CONFIG_TOUCHSCREEN_DYNAPRO is not set\n# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set\n# CONFIG_TOUCHSCREEN_EETI is not set\n# CONFIG_TOUCHSCREEN_EGALAX is not set\n# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set\n# CONFIG_TOUCHSCREEN_EXC3000 is not set\n# CONFIG_TOUCHSCREEN_FUJITSU is not set\n# CONFIG_TOUCHSCREEN_GOODIX is not set\n# CONFIG_TOUCHSCREEN_HIDEEP is not set\n# CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set\n# CONFIG_TOUCHSCREEN_ILI210X is not set\n# CONFIG_TOUCHSCREEN_ILITEK is not set\n# CONFIG_TOUCHSCREEN_S6SY761 is not set\n# CONFIG_TOUCHSCREEN_GUNZE is not set\n# CONFIG_TOUCHSCREEN_EKTF2127 is not set\n# CONFIG_TOUCHSCREEN_ELAN is not set\n# CONFIG_TOUCHSCREEN_ELO is not set\n# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set\n# CONFIG_TOUCHSCREEN_WACOM_I2C is not set\n# CONFIG_TOUCHSCREEN_MAX11801 is not set\n# CONFIG_TOUCHSCREEN_MCS5000 is not set\n# CONFIG_TOUCHSCREEN_MMS114 is not set\n# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set\n# CONFIG_TOUCHSCREEN_MSG2638 is not set\n# CONFIG_TOUCHSCREEN_MTOUCH is not set\n# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set\n# CONFIG_TOUCHSCREEN_INEXIO is not set\n# CONFIG_TOUCHSCREEN_MK712 is not set\n# CONFIG_TOUCHSCREEN_PENMOUNT is not set\n# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set\n# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set\n# CONFIG_TOUCHSCREEN_TOUCHWIN is not set\n# CONFIG_TOUCHSCREEN_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set\n# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set\n# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set\n# CONFIG_TOUCHSCREEN_TSC_SERIO is not set\n# CONFIG_TOUCHSCREEN_TSC2004 is not set\n# CONFIG_TOUCHSCREEN_TSC2005 is not set\n# CONFIG_TOUCHSCREEN_TSC2007 is not set\n# CONFIG_TOUCHSCREEN_RM_TS is not set\n# CONFIG_TOUCHSCREEN_SILEAD is not set\n# CONFIG_TOUCHSCREEN_SIS_I2C is not set\n# CONFIG_TOUCHSCREEN_ST1232 is not set\n# CONFIG_TOUCHSCREEN_STMFTS is not set\n# CONFIG_TOUCHSCREEN_SUR40 is not set\n# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set\n# CONFIG_TOUCHSCREEN_SX8654 is not set\n# CONFIG_TOUCHSCREEN_TPS6507X is not set\n# CONFIG_TOUCHSCREEN_ZET6223 is not set\n# CONFIG_TOUCHSCREEN_ZFORCE is not set\n# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set\n# CONFIG_TOUCHSCREEN_IQS5XX is not set\n# CONFIG_TOUCHSCREEN_ZINITIX is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\n# CONFIG_RMI4_CORE is not set\n\n#\n# Hardware I/O ports\n#\n# CONFIG_SERIO is not set\n# CONFIG_GAMEPORT is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\n# CONFIG_SERIAL_8250 is not set\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\n# CONFIG_SERIAL_AMBA_PL011 is not set\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MESON is not set\n# CONFIG_SERIAL_SAMSUNG is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_JSM is not set\n# CONFIG_SERIAL_SIFIVE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_BCM63XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_RP2 is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NOZOMI is not set\n# CONFIG_NULL_TTY is not set\n# CONFIG_HVC_DCC is not set\nCONFIG_SERIAL_DEV_BUS=m\n# CONFIG_VIRTIO_CONSOLE is not set\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_BA431 is not set\n# CONFIG_HW_RANDOM_MESON is not set\n# CONFIG_HW_RANDOM_CCTRNG is not set\n# CONFIG_HW_RANDOM_XIPHERA is not set\n# CONFIG_HW_RANDOM_ARM_SMCCC_TRNG is not set\n# CONFIG_APPLICOM is not set\nCONFIG_DEVMEM=y\n# CONFIG_DEVPORT is not set\n# CONFIG_TCG_TPM is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\n# CONFIG_RANDOM_TRUST_BOOTLOADER is not set\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\nCONFIG_I2C_ARB_GPIO_CHALLENGE=m\nCONFIG_I2C_MUX_GPIO=m\nCONFIG_I2C_MUX_GPMUX=m\nCONFIG_I2C_MUX_LTC4306=m\nCONFIG_I2C_MUX_PCA9541=m\nCONFIG_I2C_MUX_PCA954x=m\nCONFIG_I2C_MUX_PINCTRL=m\nCONFIG_I2C_MUX_REG=m\nCONFIG_I2C_DEMUX_PINCTRL=m\nCONFIG_I2C_MUX_MLXCPLD=m\n# end of Multiplexer I2C Chip support\n\n# CONFIG_I2C_HELPER_AUTO is not set\n# CONFIG_I2C_SMBUS is not set\n\n#\n# I2C Algorithms\n#\nCONFIG_I2C_ALGOBIT=y\n# CONFIG_I2C_ALGOPCF is not set\n# CONFIG_I2C_ALGOPCA is not set\n# end of I2C Algorithms\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# PC SMBus host controller drivers\n#\n# CONFIG_I2C_ALI1535 is not set\n# CONFIG_I2C_ALI1563 is not set\n# CONFIG_I2C_ALI15X3 is not set\n# CONFIG_I2C_AMD756 is not set\n# CONFIG_I2C_AMD8111 is not set\n# CONFIG_I2C_I801 is not set\n# CONFIG_I2C_ISCH is not set\n# CONFIG_I2C_PIIX4 is not set\n# CONFIG_I2C_NFORCE2 is not set\n# CONFIG_I2C_NVIDIA_GPU is not set\n# CONFIG_I2C_SIS5595 is not set\n# CONFIG_I2C_SIS630 is not set\n# CONFIG_I2C_SIS96X is not set\n# CONFIG_I2C_VIA is not set\n# CONFIG_I2C_VIAPRO is not set\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CADENCE is not set\n# CONFIG_I2C_CBUS_GPIO is not set\n# CONFIG_I2C_DESIGNWARE_PLATFORM is not set\n# CONFIG_I2C_DESIGNWARE_PCI is not set\n# CONFIG_I2C_EMEV2 is not set\n# CONFIG_I2C_GPIO is not set\n# CONFIG_I2C_MESON is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_RK3X is not set\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_THUNDERX is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\nCONFIG_SPI_MEM=y\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\n# CONFIG_SPI_BITBANG is not set\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_CADENCE_QUADSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_NXP_FLEXSPI is not set\n# CONFIG_SPI_GPIO is not set\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_MESON_SPICC is not set\n# CONFIG_SPI_MESON_SPIFC is not set\n# CONFIG_SPI_OC_TINY is not set\n# CONFIG_SPI_PL022 is not set\n# CONFIG_SPI_PXA2XX is not set\n# CONFIG_SPI_ROCKCHIP is not set\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_SIFIVE is not set\n# CONFIG_SPI_MXIC is not set\n# CONFIG_SPI_THUNDERX is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_AMD is not set\n\n#\n# SPI Multiplexer support\n#\n# CONFIG_SPI_MUX is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=y\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\nCONFIG_SPI_DYNAMIC=y\nCONFIG_SPMI=y\n# CONFIG_SPMI_HISI3670 is not set\n# CONFIG_HSI is not set\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\n# CONFIG_PTP_1588_CLOCK_KVM is not set\n# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set\n# CONFIG_PTP_1588_CLOCK_IDTCM is not set\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_GENERIC_PINCTRL_GROUPS=y\nCONFIG_PINMUX=y\nCONFIG_GENERIC_PINMUX_FUNCTIONS=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_MCP23S08 is not set\nCONFIG_PINCTRL_SINGLE=y\n# CONFIG_PINCTRL_SX150X is not set\n# CONFIG_PINCTRL_STMFX is not set\n# CONFIG_PINCTRL_OCELOT is not set\n# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\n# CONFIG_PINCTRL_MESON is not set\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_CDEV=y\n# CONFIG_GPIO_CDEV_V1 is not set\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_CADENCE is not set\n# CONFIG_GPIO_DWAPB is not set\n# CONFIG_GPIO_FTGPIO010 is not set\n# CONFIG_GPIO_GENERIC_PLATFORM is not set\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_LOGICVC is not set\n# CONFIG_GPIO_MB86S7X is not set\n# CONFIG_GPIO_PL061 is not set\n# CONFIG_GPIO_SAMA5D2_PIOBU is not set\n# CONFIG_GPIO_SIFIVE is not set\n# CONFIG_GPIO_SYSCON is not set\n# CONFIG_GPIO_XGENE is not set\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADP5588 is not set\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_GW_PLD is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\nCONFIG_GPIO_PCA953X=y\n# CONFIG_GPIO_PCA953X_IRQ is not set\n# CONFIG_GPIO_PCA9570 is not set\nCONFIG_GPIO_PCF857X=m\n# CONFIG_GPIO_TPIC2810 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\n# end of MFD GPIO expanders\n\n#\n# PCI GPIO expanders\n#\n# CONFIG_GPIO_BT8XX is not set\n# CONFIG_GPIO_PCI_IDIO_16 is not set\n# CONFIG_GPIO_PCIE_IDIO_24 is not set\n# CONFIG_GPIO_RDC321X is not set\n# end of PCI GPIO expanders\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n# end of SPI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# end of Virtual GPIO drivers\n\n# CONFIG_W1 is not set\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_BRCMSTB is not set\n# CONFIG_POWER_RESET_GPIO is not set\n# CONFIG_POWER_RESET_GPIO_RESTART is not set\n# CONFIG_POWER_RESET_LTC2952 is not set\n# CONFIG_POWER_RESET_REGULATOR is not set\n# CONFIG_POWER_RESET_RESTART is not set\n# CONFIG_POWER_RESET_XGENE is not set\n# CONFIG_POWER_RESET_SYSCON is not set\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\n# CONFIG_SYSCON_REBOOT_MODE is not set\n# CONFIG_NVMEM_REBOOT_MODE is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\nCONFIG_POWER_SUPPLY_HWMON=y\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_UCS1002 is not set\n# CONFIG_CHARGER_BD99954 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM1177 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_AHT10 is not set\n# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set\n# CONFIG_SENSORS_AS370 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_AXI_FAN_CONTROL is not set\n# CONFIG_SENSORS_ARM_SCPI is not set\n# CONFIG_SENSORS_ASPEED is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_CORSAIR_CPRO is not set\n# CONFIG_SENSORS_CORSAIR_PSU is not set\n# CONFIG_SENSORS_DRIVETEMP is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_I5K_AMB is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\n# CONFIG_SENSORS_GPIO_FAN is not set\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IIO_HWMON is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2947_I2C is not set\n# CONFIG_SENSORS_LTC2947_SPI is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC2992 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX127 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX31730 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_TPS23861 is not set\n# CONFIG_SENSORS_MR75203 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_NZXT_KRAKEN2 is not set\n# CONFIG_SENSORS_OCC_P8_I2C is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\nCONFIG_SENSORS_PWM_FAN=y\n# CONFIG_SENSORS_SBTSI is not set\n# CONFIG_SENSORS_SBRMI is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHT4x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_SIS5595 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_TMP513 is not set\n# CONFIG_SENSORS_VIA686A is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_VT8231 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_NETLINK is not set\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=200\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\nCONFIG_THERMAL_WRITABLE_TRIPS=y\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set\nCONFIG_THERMAL_GOV_FAIR_SHARE=y\nCONFIG_THERMAL_GOV_STEP_WISE=y\nCONFIG_THERMAL_GOV_BANG_BANG=y\nCONFIG_THERMAL_GOV_USER_SPACE=y\nCONFIG_THERMAL_GOV_POWER_ALLOCATOR=y\nCONFIG_CPU_THERMAL=y\nCONFIG_CPU_FREQ_THERMAL=y\nCONFIG_DEVFREQ_THERMAL=y\n# CONFIG_THERMAL_EMULATION is not set\n# CONFIG_THERMAL_MMIO is not set\nCONFIG_AMLOGIC_THERMAL=y\n# CONFIG_GENERIC_ADC_THERMAL is not set\nCONFIG_KHADAS_MCU_FAN_THERMAL=y\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\nCONFIG_WATCHDOG_OPEN_TIMEOUT=0\n# CONFIG_WATCHDOG_SYSFS is not set\n# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_ARM_SBSA_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\n# CONFIG_DW_WATCHDOG is not set\n# CONFIG_MAX63XX_WATCHDOG is not set\nCONFIG_MESON_GXBB_WATCHDOG=y\n# CONFIG_MESON_WATCHDOG is not set\n# CONFIG_ARM_SMC_WATCHDOG is not set\n# CONFIG_ALIM7101_WDT is not set\n# CONFIG_I6300ESB_WDT is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# PCI-based Watchdog Cards\n#\n# CONFIG_PCIPCWATCHDOG is not set\n# CONFIG_WDTPCI is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\nCONFIG_SSB=m\nCONFIG_SSB_SPROM=y\nCONFIG_SSB_PCIHOST_POSSIBLE=y\nCONFIG_SSB_PCIHOST=y\nCONFIG_SSB_SDIOHOST_POSSIBLE=y\n# CONFIG_SSB_SDIOHOST is not set\nCONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y\nCONFIG_SSB_DRIVER_PCICORE=y\n# CONFIG_SSB_DRIVER_GPIO is not set\nCONFIG_BCMA_POSSIBLE=y\nCONFIG_BCMA=m\nCONFIG_BCMA_HOST_PCI_POSSIBLE=y\nCONFIG_BCMA_HOST_PCI=y\n# CONFIG_BCMA_HOST_SOC is not set\nCONFIG_BCMA_DRIVER_PCI=y\n# CONFIG_BCMA_DRIVER_GMAC_CMN is not set\n# CONFIG_BCMA_DRIVER_GPIO is not set\n# CONFIG_BCMA_DEBUG is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AXP20X_I2C is not set\n# CONFIG_MFD_MADERA is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_GATEWORKS_GSC is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_MP2629 is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_MFD_HI6421_SPMI is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_LPC_ICH is not set\n# CONFIG_LPC_SCH is not set\n# CONFIG_MFD_INTEL_PMT is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_JANZ_CMODIO is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77620 is not set\n# CONFIG_MFD_MAX77650 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_NTXEC is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_RDC321X is not set\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_RK808 is not set\n# CONFIG_MFD_RN5T618 is not set\n# CONFIG_MFD_SEC_CORE is not set\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_MFD_TPS80031 is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_VX855 is not set\n# CONFIG_MFD_LOCHNAGAR is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\nCONFIG_MFD_ROHM_BD718XX=y\n# CONFIG_MFD_ROHM_BD70528 is not set\n# CONFIG_MFD_ROHM_BD71828 is not set\n# CONFIG_MFD_ROHM_BD957XMUF is not set\n# CONFIG_MFD_STPMIC1 is not set\n# CONFIG_MFD_STMFX is not set\n# CONFIG_MFD_ATC260X_I2C is not set\nCONFIG_MFD_KHADAS_MCU=y\n# CONFIG_MFD_QCOM_PM8008 is not set\n# CONFIG_RAVE_SP_CORE is not set\n# CONFIG_MFD_INTEL_M10_BMC is not set\n# CONFIG_MFD_RSMU_I2C is not set\n# CONFIG_MFD_RSMU_SPI is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\nCONFIG_REGULATOR_BD718XX=y\n# CONFIG_REGULATOR_DA9121 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\n# CONFIG_REGULATOR_FAN53880 is not set\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MAX77826 is not set\n# CONFIG_REGULATOR_MCP16502 is not set\n# CONFIG_REGULATOR_MP5416 is not set\n# CONFIG_REGULATOR_MP8859 is not set\n# CONFIG_REGULATOR_MP886X is not set\n# CONFIG_REGULATOR_MPQ7920 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_MT6315 is not set\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PF8X00 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\nCONFIG_REGULATOR_PWM=y\n# CONFIG_REGULATOR_QCOM_SPMI is not set\n# CONFIG_REGULATOR_QCOM_USB_VBUS is not set\n# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set\nCONFIG_REGULATOR_ROHM=y\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\n# CONFIG_REGULATOR_SLG51000 is not set\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_SY8824X is not set\n# CONFIG_REGULATOR_SY8827N is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\nCONFIG_REGULATOR_VCTRL=y\n# CONFIG_REGULATOR_QCOM_LABIBB is not set\nCONFIG_RC_CORE=m\nCONFIG_RC_MAP=m\nCONFIG_LIRC=y\nCONFIG_RC_DECODERS=y\nCONFIG_IR_IRMP_DECODER=m\nCONFIG_IR_NEC_DECODER=m\nCONFIG_IR_RC5_DECODER=m\nCONFIG_IR_RC6_DECODER=m\nCONFIG_IR_JVC_DECODER=m\nCONFIG_IR_SONY_DECODER=m\nCONFIG_IR_SANYO_DECODER=m\nCONFIG_IR_SHARP_DECODER=m\nCONFIG_IR_MCE_KBD_DECODER=m\nCONFIG_IR_XMP_DECODER=m\nCONFIG_IR_IMON_DECODER=m\nCONFIG_IR_RCMM_DECODER=m\nCONFIG_RC_DEVICES=y\nCONFIG_RC_ATI_REMOTE=m\n# CONFIG_IR_HIX5HD2 is not set\n# CONFIG_IR_IMON is not set\n# CONFIG_IR_IMON_RAW is not set\nCONFIG_IR_MCEUSB=m\nCONFIG_IR_MESON=m\n# CONFIG_IR_MESON_TX is not set\n# CONFIG_IR_REDRAT3 is not set\n# CONFIG_IR_SPI is not set\n# CONFIG_IR_STREAMZAP is not set\n# CONFIG_IR_IGORPLUGUSB is not set\n# CONFIG_IR_IGUANA is not set\n# CONFIG_IR_TTUSBIR is not set\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_IR_GPIO_CIR=m\n# CONFIG_IR_GPIO_TX is not set\n# CONFIG_IR_PWM_TX is not set\n# CONFIG_IR_SERIAL is not set\n# CONFIG_IR_SIR is not set\n# CONFIG_RC_XBOX_DVD is not set\n# CONFIG_IR_TOY is not set\nCONFIG_CEC_CORE=y\nCONFIG_CEC_NOTIFIER=y\nCONFIG_MEDIA_CEC_SUPPORT=y\n# CONFIG_CEC_CH7322 is not set\nCONFIG_CEC_MESON_AO=y\nCONFIG_CEC_MESON_G12A_AO=y\n# CONFIG_CEC_GPIO is not set\n# CONFIG_USB_PULSE8_CEC is not set\n# CONFIG_USB_RAINSHADOW_CEC is not set\nCONFIG_MEDIA_SUPPORT=y\n# CONFIG_MEDIA_SUPPORT_FILTER is not set\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\n# CONFIG_MEDIA_RADIO_SUPPORT is not set\n# CONFIG_MEDIA_SDR_SUPPORT is not set\n# CONFIG_MEDIA_PLATFORM_SUPPORT is not set\n# CONFIG_MEDIA_TEST_SUPPORT is not set\n# end of Media device types\n\n#\n# Media core support\n#\nCONFIG_VIDEO_DEV=y\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_DVB_CORE=y\n# end of Media core support\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2=y\nCONFIG_VIDEO_V4L2_I2C=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_VIDEO_TUNER=m\nCONFIG_V4L2_MEM2MEM_DEV=y\n# CONFIG_V4L2_FLASH_LED_CLASS is not set\nCONFIG_V4L2_FWNODE=y\nCONFIG_V4L2_ASYNC=y\nCONFIG_VIDEOBUF_GEN=y\nCONFIG_VIDEOBUF_VMALLOC=y\n# CONFIG_AMLOGIC_V4L2 is not set\n# end of Video4Linux options\n\n#\n# Media controller options\n#\nCONFIG_MEDIA_CONTROLLER_DVB=y\n# end of Media controller options\n\n#\n# Digital TV options\n#\n# CONFIG_DVB_MMAP is not set\nCONFIG_DVB_NET=y\nCONFIG_DVB_MAX_ADAPTERS=16\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set\n# CONFIG_DVB_ULE_DEBUG is not set\n# end of Digital TV options\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\nCONFIG_USB_VIDEO_CLASS=y\nCONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_VIDEO_CPIA2 is not set\n# CONFIG_USB_ZR364XX is not set\n# CONFIG_USB_STKWEBCAM is not set\n# CONFIG_USB_S2255 is not set\n# CONFIG_VIDEO_USBTV is not set\n\n#\n# Analog TV USB devices\n#\nCONFIG_VIDEO_PVRUSB2=m\nCONFIG_VIDEO_PVRUSB2_SYSFS=y\nCONFIG_VIDEO_PVRUSB2_DVB=y\n# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set\nCONFIG_VIDEO_HDPVR=m\nCONFIG_VIDEO_STK1160_COMMON=m\nCONFIG_VIDEO_STK1160=m\n# CONFIG_VIDEO_GO7007 is not set\n\n#\n# Analog/digital TV USB devices\n#\nCONFIG_VIDEO_AU0828=m\nCONFIG_VIDEO_AU0828_V4L2=y\nCONFIG_VIDEO_AU0828_RC=y\nCONFIG_VIDEO_CX231XX=m\nCONFIG_VIDEO_CX231XX_RC=y\nCONFIG_VIDEO_CX231XX_ALSA=m\nCONFIG_VIDEO_CX231XX_DVB=m\nCONFIG_VIDEO_TM6000=m\nCONFIG_VIDEO_TM6000_ALSA=m\nCONFIG_VIDEO_TM6000_DVB=m\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_USB=m\n# CONFIG_DVB_USB_DEBUG is not set\nCONFIG_DVB_USB_DIB3000MC=m\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_DIBUSB_MB=m\nCONFIG_DVB_USB_DIBUSB_MB_FAULTY=y\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_CXUSB=m\nCONFIG_DVB_USB_CXUSB_ANALOG=y\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_DTT200U=m\nCONFIG_DVB_USB_OPERA1=m\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_TBS5520SE=m\nCONFIG_DVB_USB_TBS5580=m\nCONFIG_DVB_USB_TBS5930=m\nCONFIG_DVB_USB_TBS5530=m\nCONFIG_DVB_USB_TBS5230=m\nCONFIG_DVB_USB_TBS5931=m\nCONFIG_DVB_USB_TBSQBOX2CI=m\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_DVB_USB_DVBSKY=m\nCONFIG_DVB_USB_ZD1301=m\nCONFIG_DVB_TTUSB_BUDGET=m\nCONFIG_DVB_TTUSB_DEC=m\nCONFIG_SMS_USB_DRV=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\nCONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG=y\nCONFIG_DVB_AS102=m\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\nCONFIG_VIDEO_EM28XX=m\nCONFIG_VIDEO_EM28XX_V4L2=m\nCONFIG_VIDEO_EM28XX_ALSA=m\nCONFIG_VIDEO_EM28XX_DVB=m\n# CONFIG_VIDEO_EM28XX_RC is not set\n# CONFIG_MEDIA_PCI_SUPPORT is not set\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_VIDEO_CX2341X=m\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_TTPCI_EEPROM=m\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_VIDEOBUF2_CORE=y\nCONFIG_VIDEOBUF2_V4L2=y\nCONFIG_VIDEOBUF2_MEMOPS=y\nCONFIG_VIDEOBUF2_DMA_CONTIG=y\nCONFIG_VIDEOBUF2_VMALLOC=y\nCONFIG_VIDEOBUF2_DMA_SG=y\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_DVB_B2C2_FLEXCOP_DEBUG=y\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\n# end of Media drivers\n\nCONFIG_MEDIA_HIDE_ANCILLARY_SUBDRV=y\n\n#\n# Media ancillary drivers\n#\nCONFIG_MEDIA_ATTACH=y\n\n#\n# IR I2C driver auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_IR_I2C=m\n\n#\n# audio, video and radio I2C drivers auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_MSP3400=m\nCONFIG_VIDEO_CS53L32A=m\nCONFIG_VIDEO_WM8775=m\nCONFIG_VIDEO_SAA711X=m\nCONFIG_VIDEO_TVP5150=m\n\n#\n# Video and audio decoders\n#\nCONFIG_VIDEO_CX25840=m\n\n#\n# Camera sensor devices\n#\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_IMX412 is not set\n# CONFIG_VIDEO_OV02A10 is not set\nCONFIG_VIDEO_OV2640=m\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV7251 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7640 is not set\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9282 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\nCONFIG_VIDEO_MT9V011=m\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# end of Camera sensor devices\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# SPI I2C drivers auto-selected by 'Autoselect ancillary drivers'\n#\n\n#\n# Media SPI Adapters\n#\n# CONFIG_CXD2880_SPI_DRV is not set\n# end of Media SPI Adapters\n\nCONFIG_MEDIA_TUNER=y\n\n#\n# Tuner drivers auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_MEDIA_TUNER_SIMPLE=y\nCONFIG_MEDIA_TUNER_TDA18250=m\nCONFIG_MEDIA_TUNER_TDA8290=y\nCONFIG_MEDIA_TUNER_TDA827X=y\nCONFIG_MEDIA_TUNER_TDA18271=y\nCONFIG_MEDIA_TUNER_TDA9887=y\nCONFIG_MEDIA_TUNER_MT20XX=y\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT2266=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_XC2028=y\nCONFIG_MEDIA_TUNER_XC5000=y\nCONFIG_MEDIA_TUNER_XC4000=y\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\nCONFIG_MEDIA_TUNER_MC44S803=y\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_SI2157=m\nCONFIG_MEDIA_TUNER_IT913X=m\nCONFIG_MEDIA_TUNER_R820T=m\nCONFIG_MEDIA_TUNER_QM1D1C0042=m\nCONFIG_MEDIA_TUNER_AV201X=m\n\n#\n# DVB Frontend drivers auto-selected by 'Autoselect ancillary drivers'\n#\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\nCONFIG_DVB_STV6110x=m\nCONFIG_DVB_TAS2101=m\nCONFIG_DVB_GX1133=m\nCONFIG_DVB_M88DS3103=m\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_TDA18271C2DD=m\nCONFIG_DVB_SI2165=m\nCONFIG_DVB_MN88472=m\nCONFIG_DVB_MN88473=m\n\n#\n# DVB-S (satellite) frontends\n#\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_MT312=m\nCONFIG_DVB_ZL10039=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_TDA8083=m\nCONFIG_DVB_TDA10086=m\nCONFIG_DVB_TUNER_ITD1000=m\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_CX24116=m\nCONFIG_DVB_CX24120=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_SI2183=m\nCONFIG_DVB_TS2020=m\nCONFIG_DVB_DS3000=m\nCONFIG_DVB_TDA10071=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_CX22700=m\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_MT352=m\nCONFIG_DVB_ZL10353=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_CXD2841ER=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\nCONFIG_DVB_SI2168=m\nCONFIG_DVB_CXD2878=m\nCONFIG_DVB_AS102_FE=m\nCONFIG_DVB_ZD1301_DEMOD=m\nCONFIG_DVB_M88RS6060=m\nCONFIG_DVB_GP8PSK_FE=m\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_VES1820=m\nCONFIG_DVB_TDA10023=m\nCONFIG_DVB_STV0297=m\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_NXT200X=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LGDT330X=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LGDT3306A=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_AU8522=m\nCONFIG_DVB_AU8522_DTV=m\nCONFIG_DVB_AU8522_V4L=m\nCONFIG_DVB_S5H1411=m\nCONFIG_DVB_MXL692=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_S921=m\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_TC90522=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_DRX39XYJ=m\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_A8293=m\nCONFIG_DVB_LGS8GXX=m\nCONFIG_DVB_ATBM8830=m\nCONFIG_DVB_IX2505V=m\nCONFIG_DVB_M88RS2000=m\nCONFIG_DVB_AF9033=m\n\n#\n# Common Interface (EN50221) controller drivers\n#\nCONFIG_DVB_SP2=m\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\nCONFIG_VGA_ARB=y\nCONFIG_VGA_ARB_MAX_GPUS=16\nCONFIG_DRM=y\nCONFIG_DRM_MIPI_DSI=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DEBUG_MM is not set\n# CONFIG_DRM_DEBUG_SELFTEST is not set\nCONFIG_DRM_KMS_HELPER=y\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\n# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_TTM=y\nCONFIG_DRM_GEM_CMA_HELPER=y\nCONFIG_DRM_KMS_CMA_HELPER=y\nCONFIG_DRM_GEM_SHMEM_HELPER=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_KOMEDA is not set\n# end of ARM devices\n\n# CONFIG_DRM_RADEON is not set\n# CONFIG_DRM_AMDGPU is not set\n# CONFIG_DRM_NOUVEAU is not set\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\n# CONFIG_DRM_VMWGFX is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_AST is not set\n# CONFIG_DRM_MGAG200 is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_USE_LVDS is not set\n# CONFIG_DRM_QXL is not set\n# CONFIG_DRM_VIRTIO_GPU is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set\n# CONFIG_DRM_PANEL_ARM_VERSATILE is not set\n# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set\n# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set\n# CONFIG_DRM_PANEL_BOE_TV101WUM_NL6 is not set\n# CONFIG_DRM_PANEL_DSI_CM is not set\n# CONFIG_DRM_PANEL_LVDS is not set\n# CONFIG_DRM_PANEL_SIMPLE is not set\n# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set\n# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set\n# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set\n# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set\n# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set\n# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set\n# CONFIG_DRM_PANEL_KHADAS_TS050 is not set\n# CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LB035Q02 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT36672A is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set\n# CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set\n# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set\n# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set\n# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set\n# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set\n# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set\n# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_SOFEF00 is not set\n# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set\n# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7703 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set\n# CONFIG_DRM_PANEL_SONY_ACX424AKP is not set\n# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set\n# CONFIG_DRM_PANEL_TDO_TL070WSH30 is not set\n# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set\n# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set\n# CONFIG_DRM_PANEL_TPO_TPG110 is not set\n# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set\n# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set\n# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set\n# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_CHRONTEL_CH7033 is not set\n# CONFIG_DRM_DISPLAY_CONNECTOR is not set\n# CONFIG_DRM_LONTIUM_LT8912B is not set\n# CONFIG_DRM_LONTIUM_LT9611 is not set\n# CONFIG_DRM_LONTIUM_LT9611UXC is not set\n# CONFIG_DRM_ITE_IT66121 is not set\n# CONFIG_DRM_LVDS_CODEC is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NWL_MIPI_DSI is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_PARADE_PS8640 is not set\n# CONFIG_DRM_SIL_SII8620 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_SII9234 is not set\n# CONFIG_DRM_SIMPLE_BRIDGE is not set\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\n# CONFIG_DRM_TOSHIBA_TC358762 is not set\n# CONFIG_DRM_TOSHIBA_TC358764 is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TOSHIBA_TC358768 is not set\n# CONFIG_DRM_TOSHIBA_TC358775 is not set\n# CONFIG_DRM_TI_TFP410 is not set\n# CONFIG_DRM_TI_SN65DSI83 is not set\n# CONFIG_DRM_TI_SN65DSI86 is not set\n# CONFIG_DRM_TI_TPD12S015 is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_ANALOGIX_ANX7625 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_CDNS_MHDP8546 is not set\n# end of Display Interface Bridges\n\n# CONFIG_DRM_ETNAVIV is not set\n# CONFIG_DRM_HISI_HIBMC is not set\n# CONFIG_DRM_HISI_KIRIN is not set\n# CONFIG_DRM_MESON is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_BOCHS is not set\n# CONFIG_DRM_CIRRUS_QEMU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_TINYDRM_HX8357D is not set\n# CONFIG_TINYDRM_ILI9225 is not set\n# CONFIG_TINYDRM_ILI9341 is not set\n# CONFIG_TINYDRM_ILI9486 is not set\n# CONFIG_TINYDRM_MI0283QT is not set\n# CONFIG_TINYDRM_REPAPER is not set\n# CONFIG_TINYDRM_ST7586 is not set\n# CONFIG_TINYDRM_ST7735R is not set\n# CONFIG_DRM_PL111 is not set\n# CONFIG_DRM_LIMA is not set\n# CONFIG_DRM_PANFROST is not set\n# CONFIG_DRM_TIDSS is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\n# CONFIG_FB_MODE_HELPERS is not set\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_CIRRUS is not set\n# CONFIG_FB_PM2 is not set\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_CYBER2000 is not set\n# CONFIG_FB_ASILIANT is not set\n# CONFIG_FB_IMSTT is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_NVIDIA is not set\n# CONFIG_FB_RIVA is not set\n# CONFIG_FB_I740 is not set\n# CONFIG_FB_MATROX is not set\n# CONFIG_FB_RADEON is not set\n# CONFIG_FB_ATY128 is not set\n# CONFIG_FB_ATY is not set\n# CONFIG_FB_S3 is not set\n# CONFIG_FB_SAVAGE is not set\n# CONFIG_FB_SIS is not set\n# CONFIG_FB_NEOMAGIC is not set\n# CONFIG_FB_KYRO is not set\n# CONFIG_FB_3DFX is not set\n# CONFIG_FB_VOODOO1 is not set\n# CONFIG_FB_VT8623 is not set\n# CONFIG_FB_TRIDENT is not set\n# CONFIG_FB_ARK is not set\n# CONFIG_FB_PM3 is not set\n# CONFIG_FB_CARMINE is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_MB862XX is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# CONFIG_FB_SM712 is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\nCONFIG_LCD_CLASS_DEVICE=y\n# CONFIG_LCD_L4F00242T03 is not set\n# CONFIG_LCD_LMS283GF05 is not set\n# CONFIG_LCD_LTV350QV is not set\n# CONFIG_LCD_ILI922X is not set\n# CONFIG_LCD_ILI9320 is not set\n# CONFIG_LCD_TDO24M is not set\n# CONFIG_LCD_VGG2432A4 is not set\n# CONFIG_LCD_PLATFORM is not set\n# CONFIG_LCD_AMS369FG06 is not set\n# CONFIG_LCD_LMS501KF03 is not set\n# CONFIG_LCD_HX8357 is not set\n# CONFIG_LCD_OTM3225A is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\n# CONFIG_BACKLIGHT_KTD253 is not set\n# CONFIG_BACKLIGHT_PWM is not set\n# CONFIG_BACKLIGHT_QCOM_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\n# CONFIG_BACKLIGHT_GPIO is not set\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n# CONFIG_BACKLIGHT_LED is not set\n# end of Backlight & LCD device support\n\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_DUMMY_CONSOLE_COLUMNS=80\nCONFIG_DUMMY_CONSOLE_ROWS=25\nCONFIG_FRAMEBUFFER_CONSOLE=y\nCONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION=y\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y\n# end of Console display driver support\n\n# CONFIG_LOGO is not set\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_HWDEP=y\nCONFIG_SND_RAWMIDI=y\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\n# CONFIG_SND_HRTIMER is not set\nCONFIG_SND_DYNAMIC_MINORS=y\nCONFIG_SND_MAX_CARDS=32\n# CONFIG_SND_SUPPORT_OLD_API is not set\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_SEQUENCER is not set\n# CONFIG_SND_DRIVERS is not set\n# CONFIG_SND_PCI is not set\n\n#\n# HD-Audio\n#\n# end of HD-Audio\n\nCONFIG_SND_HDA_PREALLOC_SIZE=64\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=y\nCONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y\n# CONFIG_SND_USB_UA101 is not set\n# CONFIG_SND_USB_CAIAQ is not set\n# CONFIG_SND_USB_6FIRE is not set\n# CONFIG_SND_USB_HIFACE is not set\n# CONFIG_SND_BCD2000 is not set\n# CONFIG_SND_USB_POD is not set\n# CONFIG_SND_USB_PODHD is not set\n# CONFIG_SND_USB_TONEPORT is not set\n# CONFIG_SND_USB_VARIAX is not set\nCONFIG_SND_SOC=y\n# CONFIG_SND_SOC_ADI is not set\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_AUDMIX is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_FSL_MICFIL is not set\n# CONFIG_SND_SOC_FSL_XCVR is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\n\n#\n# ASoC support for Amlogic platforms\n#\nCONFIG_SND_MESON_AIU=y\n# CONFIG_SND_MESON_AXG_FRDDR is not set\n# CONFIG_SND_MESON_AXG_TODDR is not set\n# CONFIG_SND_MESON_AXG_TDMIN is not set\n# CONFIG_SND_MESON_AXG_TDMOUT is not set\n# CONFIG_SND_MESON_AXG_SOUND_CARD is not set\n# CONFIG_SND_MESON_AXG_SPDIFOUT is not set\n# CONFIG_SND_MESON_AXG_SPDIFIN is not set\n# CONFIG_SND_MESON_AXG_PDM is not set\nCONFIG_SND_MESON_CARD_UTILS=y\nCONFIG_SND_MESON_CODEC_GLUE=y\nCONFIG_SND_MESON_GX_SOUND_CARD=y\nCONFIG_SND_MESON_G12A_TOACODEC=y\n# CONFIG_SND_MESON_G12A_TOHDMITX is not set\nCONFIG_SND_SOC_MESON_T9015=y\n# end of ASoC support for Amlogic platforms\n\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_SPI is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\n# CONFIG_SND_SOC_ADAU7002 is not set\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4458 is not set\n# CONFIG_SND_SOC_AK4554 is not set\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS4234 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\n# CONFIG_SND_SOC_DA7213 is not set\n# CONFIG_SND_SOC_DMIC is not set\n# CONFIG_SND_SOC_ES7134 is not set\n# CONFIG_SND_SOC_ES7241 is not set\nCONFIG_SND_SOC_ES8316=y\n# CONFIG_SND_SOC_ES8328_I2C is not set\n# CONFIG_SND_SOC_ES8328_SPI is not set\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\n# CONFIG_SND_SOC_MAX98088 is not set\n# CONFIG_SND_SOC_MAX98357A is not set\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_ANALOG is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM179X_SPI is not set\n# CONFIG_SND_SOC_PCM186X_I2C is not set\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3060_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\n# CONFIG_SND_SOC_PCM5102A is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK3328 is not set\nCONFIG_SND_SOC_RL6231=y\n# CONFIG_SND_SOC_RT5616 is not set\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\nCONFIG_SND_SOC_RT5651=y\n# CONFIG_SND_SOC_RT5659 is not set\n# CONFIG_SND_SOC_SGTL5000 is not set\n# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\nCONFIG_SND_SOC_SPDIF=m\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731 is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8960 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_ZL38060 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\n# end of CODEC drivers\n\n# CONFIG_SND_SIMPLE_CARD is not set\n# CONFIG_SND_AUDIO_GRAPH_CARD is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\n# CONFIG_HID_APPLE is not set\n# CONFIG_HID_APPLEIR is not set\n# CONFIG_HID_ASUS is not set\n# CONFIG_HID_AUREAL is not set\n# CONFIG_HID_BELKIN is not set\n# CONFIG_HID_BETOP_FF is not set\n# CONFIG_HID_BIGBEN_FF is not set\n# CONFIG_HID_CHERRY is not set\n# CONFIG_HID_CHICONY is not set\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\n# CONFIG_HID_CYPRESS is not set\n# CONFIG_HID_DRAGONRISE is not set\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\n# CONFIG_HID_EZKEY is not set\nCONFIG_HID_FIRETV=m\n# CONFIG_HID_FT260 is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_GLORIOUS is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\n# CONFIG_HID_KYE is not set\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_GYRATION is not set\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_ITE is not set\n# CONFIG_HID_JABRA is not set\n# CONFIG_HID_TWINHAN is not set\n# CONFIG_HID_KENSINGTON is not set\n# CONFIG_HID_LCPOWER is not set\n# CONFIG_HID_LED is not set\n# CONFIG_HID_LENOVO is not set\n# CONFIG_HID_LOGITECH is not set\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_REDRAGON is not set\nCONFIG_HID_MICROSOFT=y\n# CONFIG_HID_MONTEREY is not set\nCONFIG_HID_MULTITOUCH=y\nCONFIG_HID_NINTENDO=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\n# CONFIG_HID_ORTEK is not set\n# CONFIG_HID_PANTHERLORD is not set\n# CONFIG_HID_PENMOUNT is not set\n# CONFIG_HID_PETALYNX is not set\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PLAYSTATION is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\n# CONFIG_HID_SAMSUNG is not set\n# CONFIG_HID_SEMITEK is not set\nCONFIG_HID_SONY=y\n# CONFIG_SONY_FF is not set\n# CONFIG_HID_SPEEDLINK is not set\n# CONFIG_HID_STEAM is not set\n# CONFIG_HID_STEELSERIES is not set\n# CONFIG_HID_SUNPLUS is not set\n# CONFIG_HID_RMI is not set\n# CONFIG_HID_GREENASIA is not set\n# CONFIG_HID_SMARTJOYPLUS is not set\n# CONFIG_HID_TIVO is not set\n# CONFIG_HID_TOPSEED is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\n# CONFIG_HID_WIIMOTE is not set\n# CONFIG_HID_XINMO is not set\n# CONFIG_HID_XPADNEO is not set\n# CONFIG_HID_ZEROPLUS is not set\n# CONFIG_HID_ZYDACRON is not set\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n# end of USB HID support\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID_OF is not set\n# CONFIG_I2C_HID_OF_GOODIX is not set\n# end of I2C HID support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_USB_ULPI_BUS is not set\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_PCI=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\n# CONFIG_USB_OTG is not set\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\n# CONFIG_USB_MON is not set\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\n# CONFIG_USB_XHCI_DBGCAP is not set\nCONFIG_USB_XHCI_PCI=y\n# CONFIG_USB_XHCI_PCI_RENESAS is not set\nCONFIG_USB_XHCI_PLATFORM=y\nCONFIG_USB_EHCI_HCD=y\n# CONFIG_USB_EHCI_ROOT_HUB_TT is not set\nCONFIG_USB_EHCI_TT_NEWSCHED=y\nCONFIG_USB_EHCI_PCI=y\n# CONFIG_USB_EHCI_FSL is not set\n# CONFIG_USB_EHCI_HCD_PLATFORM is not set\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\n# CONFIG_USB_OHCI_HCD is not set\n# CONFIG_USB_UHCI_HCD is not set\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_BCMA is not set\n# CONFIG_USB_HCD_SSB is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=m\n# CONFIG_USB_PRINTER is not set\nCONFIG_USB_WDM=m\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\nCONFIG_USB_UAS=y\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\n# CONFIG_USB_MUSB_HDRC is not set\nCONFIG_USB_DWC3=y\nCONFIG_USB_DWC3_HOST=y\n# CONFIG_USB_DWC3_GADGET is not set\n# CONFIG_USB_DWC3_DUAL_ROLE is not set\n\n#\n# Platform Glue Driver Support\n#\nCONFIG_USB_DWC3_HAPS=y\nCONFIG_USB_DWC3_MESON_G12A=y\nCONFIG_USB_DWC3_OF_SIMPLE=y\n# CONFIG_USB_DWC2 is not set\n# CONFIG_USB_CHIPIDEA is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=y\nCONFIG_USB_SERIAL_CONSOLE=y\nCONFIG_USB_SERIAL_GENERIC=y\nCONFIG_USB_SERIAL_SIMPLE=m\nCONFIG_USB_SERIAL_AIRCABLE=m\nCONFIG_USB_SERIAL_ARK3116=m\nCONFIG_USB_SERIAL_BELKIN=m\nCONFIG_USB_SERIAL_CH341=m\nCONFIG_USB_SERIAL_WHITEHEAT=m\nCONFIG_USB_SERIAL_DIGI_ACCELEPORT=m\nCONFIG_USB_SERIAL_CP210X=m\nCONFIG_USB_SERIAL_CYPRESS_M8=m\nCONFIG_USB_SERIAL_EMPEG=m\nCONFIG_USB_SERIAL_FTDI_SIO=m\nCONFIG_USB_SERIAL_VISOR=m\nCONFIG_USB_SERIAL_IPAQ=m\nCONFIG_USB_SERIAL_IR=m\nCONFIG_USB_SERIAL_EDGEPORT=m\nCONFIG_USB_SERIAL_EDGEPORT_TI=m\nCONFIG_USB_SERIAL_F81232=m\nCONFIG_USB_SERIAL_F8153X=m\nCONFIG_USB_SERIAL_GARMIN=m\nCONFIG_USB_SERIAL_IPW=m\nCONFIG_USB_SERIAL_IUU=m\nCONFIG_USB_SERIAL_KEYSPAN_PDA=m\nCONFIG_USB_SERIAL_KEYSPAN=m\nCONFIG_USB_SERIAL_KLSI=m\nCONFIG_USB_SERIAL_KOBIL_SCT=m\nCONFIG_USB_SERIAL_MCT_U232=m\nCONFIG_USB_SERIAL_METRO=m\nCONFIG_USB_SERIAL_MOS7720=m\nCONFIG_USB_SERIAL_MOS7840=m\nCONFIG_USB_SERIAL_MXUPORT=m\nCONFIG_USB_SERIAL_NAVMAN=m\nCONFIG_USB_SERIAL_PL2303=m\nCONFIG_USB_SERIAL_OTI6858=m\nCONFIG_USB_SERIAL_QCAUX=m\nCONFIG_USB_SERIAL_QUALCOMM=m\nCONFIG_USB_SERIAL_SPCP8X5=m\nCONFIG_USB_SERIAL_SAFE=m\nCONFIG_USB_SERIAL_SAFE_PADDED=y\nCONFIG_USB_SERIAL_SIERRAWIRELESS=m\nCONFIG_USB_SERIAL_SYMBOL=m\nCONFIG_USB_SERIAL_TI=m\nCONFIG_USB_SERIAL_CYBERJACK=m\nCONFIG_USB_SERIAL_WWAN=m\nCONFIG_USB_SERIAL_OPTION=m\nCONFIG_USB_SERIAL_OMNINET=m\nCONFIG_USB_SERIAL_OPTICON=m\nCONFIG_USB_SERIAL_XSENS_MT=m\nCONFIG_USB_SERIAL_WISHBONE=m\nCONFIG_USB_SERIAL_SSU100=m\nCONFIG_USB_SERIAL_QT2=m\nCONFIG_USB_SERIAL_UPD78F0730=m\nCONFIG_USB_SERIAL_XR=m\nCONFIG_USB_SERIAL_DEBUG=m\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\nCONFIG_USB_EZUSB_FX2=m\n# CONFIG_USB_HUB_USB251XB is not set\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\n# CONFIG_NOP_USB_XCEIV is not set\nCONFIG_USB_GPIO_VBUS=y\n# CONFIG_USB_ISP1301 is not set\nCONFIG_USB_ULPI=y\nCONFIG_USB_ULPI_VIEWPORT=y\n# end of USB Physical Layer drivers\n\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\n# CONFIG_USB_GADGET_DEBUG_FILES is not set\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=2\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\nCONFIG_USB_SNP_CORE=y\nCONFIG_USB_SNP_UDC_PLAT=y\n# CONFIG_USB_M66592 is not set\nCONFIG_USB_BDC_UDC=y\n# CONFIG_USB_AMD5536UDC is not set\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_NET2280 is not set\n# CONFIG_USB_GOKU is not set\n# CONFIG_USB_EG20T is not set\n# CONFIG_USB_GADGET_XILINX is not set\n# CONFIG_USB_MAX3420_UDC is not set\n# CONFIG_USB_DUMMY_HCD is not set\n# end of USB Peripheral Controller\n\nCONFIG_USB_LIBCOMPOSITE=y\nCONFIG_USB_U_ETHER=y\nCONFIG_USB_F_RNDIS=y\nCONFIG_USB_F_MASS_STORAGE=y\nCONFIG_USB_F_FS=y\nCONFIG_USB_F_MIDI=y\nCONFIG_USB_F_ACC=y\nCONFIG_USB_F_AUDIO_SRC=y\nCONFIG_USB_CONFIGFS=y\nCONFIG_USB_CONFIGFS_UEVENT=y\n# CONFIG_USB_CONFIGFS_SERIAL is not set\n# CONFIG_USB_CONFIGFS_ACM is not set\n# CONFIG_USB_CONFIGFS_OBEX is not set\n# CONFIG_USB_CONFIGFS_NCM is not set\n# CONFIG_USB_CONFIGFS_ECM is not set\n# CONFIG_USB_CONFIGFS_ECM_SUBSET is not set\nCONFIG_USB_CONFIGFS_RNDIS=y\n# CONFIG_USB_CONFIGFS_EEM is not set\nCONFIG_USB_CONFIGFS_MASS_STORAGE=y\n# CONFIG_USB_CONFIGFS_F_LB_SS is not set\nCONFIG_USB_CONFIGFS_F_FS=y\nCONFIG_USB_CONFIGFS_F_ACC=y\nCONFIG_USB_CONFIGFS_F_AUDIO_SRC=y\n# CONFIG_USB_CONFIGFS_F_UAC1 is not set\n# CONFIG_USB_CONFIGFS_F_UAC1_LEGACY is not set\n# CONFIG_USB_CONFIGFS_F_UAC2 is not set\nCONFIG_USB_CONFIGFS_F_MIDI=y\n# CONFIG_USB_CONFIGFS_F_HID is not set\n# CONFIG_USB_CONFIGFS_F_UVC is not set\n# CONFIG_USB_CONFIGFS_F_PRINTER is not set\n\n#\n# USB Gadget precomposed configurations\n#\n# CONFIG_USB_ZERO is not set\n# CONFIG_USB_AUDIO is not set\n# CONFIG_USB_ETH is not set\n# CONFIG_USB_G_NCM is not set\n# CONFIG_USB_GADGETFS is not set\n# CONFIG_USB_FUNCTIONFS is not set\n# CONFIG_USB_MASS_STORAGE is not set\n# CONFIG_USB_G_SERIAL is not set\n# CONFIG_USB_MIDI_GADGET is not set\n# CONFIG_USB_G_PRINTER is not set\n# CONFIG_USB_CDC_COMPOSITE is not set\n# CONFIG_USB_G_ACM_MS is not set\n# CONFIG_USB_G_MULTI is not set\n# CONFIG_USB_G_HID is not set\n# CONFIG_USB_G_DBGP is not set\n# CONFIG_USB_G_WEBCAM is not set\n# CONFIG_USB_RAW_GADGET is not set\n# end of USB Gadget precomposed configurations\n\nCONFIG_TYPEC=m\nCONFIG_TYPEC_TCPM=m\nCONFIG_TYPEC_TCPCI=m\n# CONFIG_TYPEC_RT1711H is not set\n# CONFIG_TYPEC_TCPCI_MAXIM is not set\nCONFIG_TYPEC_FUSB302=m\nCONFIG_TYPEC_UCSI=m\n# CONFIG_UCSI_CCG is not set\n# CONFIG_TYPEC_TPS6598X is not set\n# CONFIG_TYPEC_HD3SS3220 is not set\n# CONFIG_TYPEC_STUSB160X is not set\n\n#\n# USB Type-C Multiplexer/DeMultiplexer Switch support\n#\n# CONFIG_TYPEC_MUX_PI3USB30532 is not set\n# end of USB Type-C Multiplexer/DeMultiplexer Switch support\n\n#\n# USB Type-C Alternate Mode drivers\n#\n# CONFIG_TYPEC_DP_ALTMODE is not set\n# end of USB Type-C Alternate Mode drivers\n\nCONFIG_USB_ROLE_SWITCH=y\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\n# CONFIG_PWRSEQ_SD8787 is not set\n# CONFIG_PWRSEQ_SIMPLE is not set\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\nCONFIG_MMC_CRYPTO=y\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_DEBUG is not set\n# CONFIG_MMC_ARMMMCI is not set\n# CONFIG_MMC_SDHCI is not set\n# CONFIG_MMC_MESON_GX is not set\n# CONFIG_MMC_MESON_MX_SDIO is not set\n# CONFIG_MMC_TIFM_SD is not set\n# CONFIG_MMC_SPI is not set\n# CONFIG_MMC_CB710 is not set\n# CONFIG_MMC_VIA_SDMMC is not set\n# CONFIG_MMC_DW is not set\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_CQHCI=y\n# CONFIG_MMC_HSQ is not set\n# CONFIG_MMC_TOSHIBA_PCI is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\nCONFIG_LEDS_CLASS_FLASH=y\nCONFIG_LEDS_CLASS_MULTICOLOR=y\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AN30259A is not set\n# CONFIG_LEDS_AW2013 is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_EL15203000 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_LP55XX_COMMON is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\nCONFIG_LEDS_PWM=y\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\nCONFIG_LEDS_TCA6507=m\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\nCONFIG_LEDS_IS31FL32XX=m\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_SYSCON is not set\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_SPI_BYTE is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\n# CONFIG_LEDS_AAT1290 is not set\n# CONFIG_LEDS_AS3645A is not set\n# CONFIG_LEDS_KTD2692 is not set\n# CONFIG_LEDS_LM3601X is not set\n# CONFIG_LEDS_RT4505 is not set\n# CONFIG_LEDS_RT8515 is not set\n# CONFIG_LEDS_SGM3140 is not set\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\nCONFIG_LEDS_TRIGGER_TIMER=y\nCONFIG_LEDS_TRIGGER_ONESHOT=y\n# CONFIG_LEDS_TRIGGER_DISK is not set\n# CONFIG_LEDS_TRIGGER_MTD is not set\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\nCONFIG_LEDS_TRIGGER_BACKLIGHT=y\nCONFIG_LEDS_TRIGGER_CPU=y\nCONFIG_LEDS_TRIGGER_ACTIVITY=y\nCONFIG_LEDS_TRIGGER_GPIO=y\nCONFIG_LEDS_TRIGGER_DEFAULT_ON=y\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\nCONFIG_LEDS_TRIGGER_TRANSIENT=y\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\nCONFIG_LEDS_TRIGGER_PANIC=y\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\n# CONFIG_LEDS_TRIGGER_AUDIO is not set\n# CONFIG_LEDS_TRIGGER_TTY is not set\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_SUPPORT=y\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\n# CONFIG_RTC_INTF_PROC is not set\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\nCONFIG_RTC_DRV_HYM8563=y\nCONFIG_RTC_DRV_HYM8563_SHW_PATCH=y\n# CONFIG_RTC_DRV_MAX6900 is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\n# CONFIG_RTC_DRV_PCF8563 is not set\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\n# CONFIG_RTC_DRV_DS3232 is not set\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_MESON_VRTC is not set\n# CONFIG_RTC_DRV_PL030 is not set\n# CONFIG_RTC_DRV_PL031 is not set\n# CONFIG_RTC_DRV_CADENCE is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\n# CONFIG_DMADEVICES is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\nCONFIG_SW_SYNC=y\n# CONFIG_UDMABUF is not set\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\nCONFIG_DMABUF_HEAPS=y\n# CONFIG_DMABUF_SYSFS_STATS is not set\n# CONFIG_DMABUF_HEAPS_DEFERRED_FREE is not set\n# CONFIG_DMABUF_HEAPS_PAGE_POOL is not set\n# CONFIG_DMABUF_HEAPS_CMA is not set\n# end of DMABUF options\n\n# CONFIG_AUXDISPLAY is not set\nCONFIG_UIO=y\n# CONFIG_UIO_CIF is not set\n# CONFIG_UIO_PDRV_GENIRQ is not set\n# CONFIG_UIO_DMEM_GENIRQ is not set\n# CONFIG_UIO_AEC is not set\n# CONFIG_UIO_SERCOS3 is not set\n# CONFIG_UIO_PCI_GENERIC is not set\n# CONFIG_UIO_NETX is not set\n# CONFIG_UIO_PRUSS is not set\n# CONFIG_UIO_MF624 is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\nCONFIG_VIRTIO_MENU=y\n# CONFIG_VIRTIO_PCI is not set\n# CONFIG_VIRTIO_MMIO is not set\n# CONFIG_VIRTIO_DMA_SHARED_BUFFER is not set\n# CONFIG_VDPA is not set\n# CONFIG_VHOST_MENU is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# end of Microsoft Hyper-V guest support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_RTL8192U is not set\n# CONFIG_RTLLIB is not set\n# CONFIG_RTL8723BS is not set\n# CONFIG_R8712U is not set\n# CONFIG_R8188EU is not set\n# CONFIG_RTS5208 is not set\n# CONFIG_VT6655 is not set\n# CONFIG_VT6656 is not set\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16240 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7816 is not set\n# CONFIG_AD7280 is not set\n# end of Analog to digital converters\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n# end of Analog digital bi-direction converters\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7746 is not set\n# end of Capacitance to digital converters\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n# end of Direct Digital Synthesis\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n# end of Network Analyzer, Impedance Converters\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7854 is not set\n# end of Active energy metering IC\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S1210 is not set\n# end of Resolver to digital converters\n# end of IIO staging drivers\n\n# CONFIG_FB_SM750 is not set\n# CONFIG_STAGING_MEDIA is not set\n\n#\n# Android\n#\nCONFIG_ASHMEM=y\nCONFIG_DEBUG_KINFO=y\n# end of Android\n\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_GS_FPGABOOT is not set\n# CONFIG_UNISYSSPAR is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_KS7010 is not set\n# CONFIG_PI433 is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_FIELDBUS_DEV is not set\n# CONFIG_QLGE is not set\n# CONFIG_WFX is not set\n# CONFIG_GOLDFISH is not set\n# CONFIG_CHROME_PLATFORMS is not set\n# CONFIG_MELLANOX_PLATFORM is not set\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Clock driver for ARM Reference designs\n#\n# CONFIG_ICST is not set\n# CONFIG_CLK_SP810 is not set\n# end of Clock driver for ARM Reference designs\n\n# CONFIG_LMK04832 is not set\n# CONFIG_COMMON_CLK_MAX9485 is not set\nCONFIG_COMMON_CLK_SCPI=y\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\n# CONFIG_COMMON_CLK_AXI_CLKGEN is not set\n# CONFIG_COMMON_CLK_XGENE is not set\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_VC5 is not set\nCONFIG_COMMON_CLK_BD718XX=y\n# CONFIG_COMMON_CLK_FIXED_MMIO is not set\n\n#\n# Clock support for Amlogic platforms\n#\n# CONFIG_COMMON_CLK_GXBB is not set\n# CONFIG_COMMON_CLK_AXG is not set\n# CONFIG_COMMON_CLK_AXG_AUDIO is not set\n# CONFIG_COMMON_CLK_G12A is not set\n# end of Clock support for Amlogic platforms\n\n# CONFIG_XILINX_VCU is not set\nCONFIG_HWSPINLOCK=y\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\n# CONFIG_SUN4I_TIMER is not set\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y\nCONFIG_FSL_ERRATUM_A008585=y\nCONFIG_HISILICON_ERRATUM_161010101=y\nCONFIG_ARM64_ERRATUM_858921=y\n# CONFIG_MICROCHIP_PIT64B is not set\n# end of Clock Source drivers\n\nCONFIG_MAILBOX=y\n# CONFIG_ARM_MHU is not set\n# CONFIG_ARM_MHU_V2 is not set\n# CONFIG_PLATFORM_MHU is not set\n# CONFIG_PL320_MBOX is not set\n# CONFIG_ALTERA_MBOX is not set\n# CONFIG_MAILBOX_TEST is not set\nCONFIG_IOMMU_IOVA=y\nCONFIG_IOASID=y\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\nCONFIG_IOMMU_IO_PGTABLE=y\nCONFIG_IOMMU_IO_PGTABLE_LPAE=y\n# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set\n# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set\n# end of Generic IOMMU Pagetable Support\n\n# CONFIG_IOMMU_DEBUGFS is not set\nCONFIG_IOMMU_DEFAULT_DMA_STRICT=y\n# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set\n# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set\nCONFIG_OF_IOMMU=y\nCONFIG_IOMMU_DMA=y\nCONFIG_IOMMU_SVA_LIB=y\n# CONFIG_ARM_SMMU is not set\nCONFIG_ARM_SMMU_V3=y\nCONFIG_ARM_SMMU_V3_SVA=y\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\n# CONFIG_RPMSG_QCOM_GLINK_RPM is not set\n# CONFIG_RPMSG_VIRTIO is not set\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n# CONFIG_MESON_CANVAS is not set\n# CONFIG_MESON_CLK_MEASURE is not set\n# CONFIG_MESON_GX_SOCINFO is not set\n# CONFIG_MESON_GX_PM_DOMAINS is not set\n# CONFIG_MESON_EE_PM_DOMAINS is not set\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\n# CONFIG_SOC_BRCMSTB is not set\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# CONFIG_QUICC_ENGINE is not set\n# CONFIG_FSL_RCPM is not set\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# i.MX SoC drivers\n#\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# CONFIG_LITEX_SOC_CONTROLLER is not set\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# end of Qualcomm SoC drivers\n\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y\nCONFIG_DEVFREQ_GOV_PERFORMANCE=y\nCONFIG_DEVFREQ_GOV_POWERSAVE=y\nCONFIG_DEVFREQ_GOV_USERSPACE=y\n# CONFIG_DEVFREQ_GOV_PASSIVE is not set\n\n#\n# DEVFREQ Drivers\n#\n# CONFIG_PM_DEVFREQ_EVENT is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_FSA9480 is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_PTN5150 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\nCONFIG_EXTCON_USB_GPIO=y\n# CONFIG_EXTCON_USBC_TUSB320 is not set\n# CONFIG_MEMORY is not set\nCONFIG_IIO=y\nCONFIG_IIO_BUFFER=y\n# CONFIG_IIO_BUFFER_CB is not set\n# CONFIG_IIO_BUFFER_DMA is not set\n# CONFIG_IIO_BUFFER_DMAENGINE is not set\n# CONFIG_IIO_BUFFER_HW_CONSUMER is not set\n# CONFIG_IIO_KFIFO_BUF is not set\n# CONFIG_IIO_TRIGGERED_BUFFER is not set\n# CONFIG_IIO_CONFIGFS is not set\nCONFIG_IIO_TRIGGER=y\nCONFIG_IIO_CONSUMERS_PER_TRIGGER=2\n# CONFIG_IIO_SW_DEVICE is not set\n# CONFIG_IIO_SW_TRIGGER is not set\n# CONFIG_IIO_TRIGGERED_EVENT is not set\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADXL345_I2C is not set\n# CONFIG_ADXL345_SPI is not set\n# CONFIG_ADXL372_SPI is not set\n# CONFIG_ADXL372_I2C is not set\n# CONFIG_BMA180 is not set\n# CONFIG_BMA220 is not set\n# CONFIG_BMA400 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_BMI088_ACCEL is not set\n# CONFIG_DA280 is not set\n# CONFIG_DA311 is not set\n# CONFIG_DMARD06 is not set\n# CONFIG_DMARD09 is not set\n# CONFIG_DMARD10 is not set\n# CONFIG_FXLS8962AF_I2C is not set\n# CONFIG_FXLS8962AF_SPI is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MC3230 is not set\n# CONFIG_MMA7455_I2C is not set\n# CONFIG_MMA7455_SPI is not set\n# CONFIG_MMA7660 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_MXC6255 is not set\n# CONFIG_SCA3000 is not set\n# CONFIG_SCA3300 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7091R5 is not set\n# CONFIG_AD7124 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7266 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7292 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7606_IFACE_PARALLEL is not set\n# CONFIG_AD7606_IFACE_SPI is not set\n# CONFIG_AD7766 is not set\n# CONFIG_AD7768_1 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD7949 is not set\n# CONFIG_AD799X is not set\n# CONFIG_ADI_AXI_ADC is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_ENVELOPE_DETECTOR is not set\n# CONFIG_HI8435 is not set\n# CONFIG_HX711 is not set\n# CONFIG_INA2XX_ADC is not set\n# CONFIG_LTC2471 is not set\n# CONFIG_LTC2485 is not set\n# CONFIG_LTC2496 is not set\n# CONFIG_LTC2497 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX11100 is not set\n# CONFIG_MAX1118 is not set\n# CONFIG_MAX1241 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MAX9611 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_MCP3911 is not set\n# CONFIG_MESON_SARADC is not set\n# CONFIG_NAU7802 is not set\n# CONFIG_QCOM_SPMI_IADC is not set\n# CONFIG_QCOM_SPMI_VADC is not set\n# CONFIG_QCOM_SPMI_ADC5 is not set\n# CONFIG_SD_ADC_MODULATOR is not set\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC0832 is not set\n# CONFIG_TI_ADC084S021 is not set\n# CONFIG_TI_ADC12138 is not set\n# CONFIG_TI_ADC108S102 is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_TI_ADC161S626 is not set\n# CONFIG_TI_ADS1015 is not set\n# CONFIG_TI_ADS7950 is not set\n# CONFIG_TI_ADS8344 is not set\n# CONFIG_TI_ADS8688 is not set\n# CONFIG_TI_ADS124S08 is not set\n# CONFIG_TI_ADS131E08 is not set\n# CONFIG_TI_TLC4541 is not set\n# CONFIG_TI_TSC2046 is not set\n# CONFIG_VF610_ADC is not set\n# CONFIG_XILINX_XADC is not set\n# end of Analog to digital converters\n\n#\n# Analog to digital and digital to analog converters\n#\n# end of Analog to digital and digital to analog converters\n\n#\n# Analog Front Ends\n#\n# CONFIG_IIO_RESCALE is not set\n# end of Analog Front Ends\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n# CONFIG_HMC425 is not set\n# end of Amplifiers\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# end of Capacitance to digital converters\n\n#\n# Chemical Sensors\n#\n# CONFIG_ATLAS_PH_SENSOR is not set\n# CONFIG_ATLAS_EZO_SENSOR is not set\n# CONFIG_BME680 is not set\n# CONFIG_CCS811 is not set\n# CONFIG_IAQCORE is not set\n# CONFIG_PMS7003 is not set\n# CONFIG_SCD30_CORE is not set\n# CONFIG_SENSIRION_SGP30 is not set\n# CONFIG_SENSIRION_SGP40 is not set\n# CONFIG_SPS30_I2C is not set\n# CONFIG_SPS30_SERIAL is not set\n# CONFIG_VZ89X is not set\n# end of Chemical Sensors\n\n#\n# Hid Sensor IIO Common\n#\n# end of Hid Sensor IIO Common\n\n#\n# IIO SCMI Sensors\n#\n# end of IIO SCMI Sensors\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n# end of SSP Sensor Common\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5592R is not set\n# CONFIG_AD5593R is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_AD5686_SPI is not set\n# CONFIG_AD5696_I2C is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5758 is not set\n# CONFIG_AD5761 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5766 is not set\n# CONFIG_AD5770R is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_AD8801 is not set\n# CONFIG_DPOT_DAC is not set\n# CONFIG_DS4424 is not set\n# CONFIG_LTC1660 is not set\n# CONFIG_LTC2632 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n# CONFIG_TI_DAC082S085 is not set\n# CONFIG_TI_DAC5571 is not set\n# CONFIG_TI_DAC7311 is not set\n# CONFIG_TI_DAC7612 is not set\n# CONFIG_VF610_DAC is not set\n# end of Digital to analog converters\n\n#\n# IIO dummy driver\n#\n# end of IIO dummy driver\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n# end of Clock Generator/Distribution\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n# CONFIG_ADF4371 is not set\n# end of Phase-Locked Loop (PLL) frequency synthesizers\n# end of Frequency Synthesizers DDS/PLL\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS290 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_FXAS21002C is not set\n# CONFIG_MPU3050_I2C is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n# end of Digital gyroscope sensors\n\n#\n# Health Sensors\n#\n\n#\n# Heart Rate Monitors\n#\n# CONFIG_AFE4403 is not set\n# CONFIG_AFE4404 is not set\n# CONFIG_MAX30100 is not set\n# CONFIG_MAX30102 is not set\n# end of Heart Rate Monitors\n# end of Health Sensors\n\n#\n# Humidity sensors\n#\n# CONFIG_AM2315 is not set\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HDC2010 is not set\n# CONFIG_HTS221 is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n# end of Humidity sensors\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16460 is not set\n# CONFIG_ADIS16475 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_BMI160_I2C is not set\n# CONFIG_BMI160_SPI is not set\n# CONFIG_FXOS8700_I2C is not set\n# CONFIG_FXOS8700_SPI is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_ICM42600_I2C is not set\n# CONFIG_INV_ICM42600_SPI is not set\n# CONFIG_INV_MPU6050_I2C is not set\n# CONFIG_INV_MPU6050_SPI is not set\n# CONFIG_IIO_ST_LSM6DSX is not set\n# CONFIG_IIO_ST_LSM9DS0 is not set\n# end of Inertial measurement units\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_ADUX1020 is not set\n# CONFIG_AL3010 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_AS73211 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_BH1780 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM3605 is not set\n# CONFIG_CM36651 is not set\n# CONFIG_GP2AP002 is not set\n# CONFIG_GP2AP020A00F is not set\n# CONFIG_SENSORS_ISL29018 is not set\n# CONFIG_SENSORS_ISL29028 is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_LV0104CS is not set\n# CONFIG_MAX44000 is not set\n# CONFIG_MAX44009 is not set\n# CONFIG_NOA1305 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_SI1133 is not set\n# CONFIG_SI1145 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_ST_UVIS25 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\n# CONFIG_SENSORS_TSL2563 is not set\n# CONFIG_TSL2583 is not set\n# CONFIG_TSL2591 is not set\n# CONFIG_TSL2772 is not set\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VCNL4035 is not set\n# CONFIG_VEML6030 is not set\n# CONFIG_VEML6070 is not set\n# CONFIG_VL6180 is not set\n# CONFIG_ZOPT2201 is not set\n# end of Light sensors\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8974 is not set\n# CONFIG_AK8975 is not set\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN_I2C is not set\n# CONFIG_BMC150_MAGN_SPI is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n# CONFIG_SENSORS_RM3100_I2C is not set\n# CONFIG_SENSORS_RM3100_SPI is not set\n# CONFIG_YAMAHA_YAS530 is not set\n# end of Magnetometer sensors\n\n#\n# Multiplexers\n#\n# CONFIG_IIO_MUX is not set\n# end of Multiplexers\n\n#\n# Inclinometer sensors\n#\n# end of Inclinometer sensors\n\n#\n# Triggers - standalone\n#\n# CONFIG_IIO_INTERRUPT_TRIGGER is not set\n# CONFIG_IIO_SYSFS_TRIGGER is not set\n# end of Triggers - standalone\n\n#\n# Linear and angular position sensors\n#\n# end of Linear and angular position sensors\n\n#\n# Digital potentiometers\n#\n# CONFIG_AD5110 is not set\n# CONFIG_AD5272 is not set\n# CONFIG_DS1803 is not set\n# CONFIG_MAX5432 is not set\n# CONFIG_MAX5481 is not set\n# CONFIG_MAX5487 is not set\n# CONFIG_MCP4018 is not set\n# CONFIG_MCP4131 is not set\n# CONFIG_MCP4531 is not set\n# CONFIG_MCP41010 is not set\n# CONFIG_TPL0102 is not set\n# end of Digital potentiometers\n\n#\n# Digital potentiostats\n#\n# CONFIG_LMP91000 is not set\n# end of Digital potentiostats\n\n#\n# Pressure sensors\n#\n# CONFIG_ABP060MG is not set\n# CONFIG_BMP280 is not set\n# CONFIG_DLHL60D is not set\n# CONFIG_DPS310 is not set\n# CONFIG_HP03 is not set\n# CONFIG_ICP10100 is not set\n# CONFIG_MPL115_I2C is not set\n# CONFIG_MPL115_SPI is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n# CONFIG_HP206C is not set\n# CONFIG_ZPA2326 is not set\n# end of Pressure sensors\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n# end of Lightning sensors\n\n#\n# Proximity and distance sensors\n#\n# CONFIG_ISL29501 is not set\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_MB1232 is not set\n# CONFIG_PING is not set\n# CONFIG_RFD77402 is not set\n# CONFIG_SRF04 is not set\n# CONFIG_SX9310 is not set\n# CONFIG_SX9500 is not set\n# CONFIG_SRF08 is not set\n# CONFIG_VCNL3020 is not set\n# CONFIG_VL53L0X_I2C is not set\n# end of Proximity and distance sensors\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1200 is not set\n# end of Resolver to digital converters\n\n#\n# Temperature sensors\n#\n# CONFIG_LTC2983 is not set\n# CONFIG_MAXIM_THERMOCOUPLE is not set\n# CONFIG_MLX90614 is not set\n# CONFIG_MLX90632 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TMP007 is not set\n# CONFIG_TMP117 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\n# CONFIG_MAX31856 is not set\n# end of Temperature sensors\n\n# CONFIG_NTB is not set\n# CONFIG_VME_BUS is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_DEBUG is not set\n# CONFIG_PWM_ATMEL_TCB is not set\n# CONFIG_PWM_DWC is not set\n# CONFIG_PWM_FSL_FTM is not set\nCONFIG_PWM_GPIO=y\n# CONFIG_PWM_MESON is not set\n# CONFIG_PWM_PCA9685 is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\nCONFIG_ARM_GIC_V2M=y\nCONFIG_ARM_GIC_V3=y\nCONFIG_ARM_GIC_V3_ITS=y\nCONFIG_ARM_GIC_V3_ITS_PCI=y\n# CONFIG_AL_FIC is not set\nCONFIG_PARTITION_PERCPU=y\n# CONFIG_MESON_IRQ_GPIO is not set\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\nCONFIG_RESET_CONTROLLER=y\nCONFIG_GPIO_RESET_CONTROLLER=y\n# CONFIG_RESET_MESON is not set\n# CONFIG_RESET_MESON_AUDIO_ARB is not set\n# CONFIG_RESET_TI_SYSCON is not set\n\n#\n# PHY Subsystem\n#\n# CONFIG_GENERIC_PHY is not set\n# CONFIG_PHY_XGENE is not set\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\n# CONFIG_PHY_MESON8B_USB2 is not set\n# CONFIG_PHY_MESON_GXL_USB2 is not set\n# CONFIG_PHY_MESON_G12A_USB2 is not set\n# CONFIG_PHY_MESON_G12A_USB3_PCIE is not set\n# CONFIG_PHY_MESON_AXG_PCIE is not set\n# CONFIG_PHY_MESON_AXG_MIPI_PCIE_ANALOG is not set\n# CONFIG_PHY_MESON_AXG_MIPI_DPHY is not set\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# CONFIG_PHY_CADENCE_TORRENT is not set\n# CONFIG_PHY_CADENCE_DPHY is not set\n# CONFIG_PHY_CADENCE_SIERRA is not set\n# CONFIG_PHY_CADENCE_SALVO is not set\n# CONFIG_PHY_FSL_IMX8MQ_USB is not set\n# CONFIG_PHY_MIXEL_MIPI_DPHY is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_CPCAP_USB is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\n# CONFIG_PHY_OCELOT_SERDES is not set\n# end of PHY Subsystem\n\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\n# CONFIG_ARM_CMN is not set\nCONFIG_ARM_PMU=y\nCONFIG_ARM_DSU_PMU=y\n# CONFIG_ARM_SPE_PMU is not set\n# end of Performance monitor support\n\n# CONFIG_RAS is not set\n# CONFIG_USB4 is not set\n\n#\n# Android\n#\nCONFIG_ANDROID=y\nCONFIG_ANDROID_BINDER_IPC=y\nCONFIG_ANDROID_BINDERFS=y\nCONFIG_ANDROID_BINDER_DEVICES=\"binder,hwbinder,vndbinder\"\n# CONFIG_ANDROID_BINDER_IPC_SELFTEST is not set\n# CONFIG_ANDROID_DEBUG_SYMBOLS is not set\nCONFIG_ANDROID_VENDOR_HOOKS=y\nCONFIG_ANDROID_KABI_RESERVE=y\nCONFIG_ANDROID_VENDOR_OEM_DATA=y\n# end of Android\n\n# CONFIG_LIBNVDIMM is not set\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\n# CONFIG_NVMEM_SPMI_SDAM is not set\n# CONFIG_MESON_MX_EFUSE is not set\n# CONFIG_NVMEM_RMEM is not set\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\n# CONFIG_TEE is not set\nCONFIG_MULTIPLEXER=m\n\n#\n# Multiplexer drivers\n#\nCONFIG_MUX_ADG792A=m\nCONFIG_MUX_ADGS1408=m\nCONFIG_MUX_GPIO=m\nCONFIG_MUX_MMIO=m\n# end of Multiplexer drivers\n\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\nCONFIG_AMLOGIC_DRIVER=y\nCONFIG_AMLOGIC_BREAK_GKI_20=y\nCONFIG_AMLOGIC_BREAK_GKI=y\nCONFIG_AMLOGIC_MODIFY=y\nCONFIG_AMLOGIC_IN_KERNEL_MODULES=y\nCONFIG_AMLOGIC_KERNEL_VERSION=13515\n\n#\n# Amlogic Device Drivers\n#\nCONFIG_AMLOGIC_SERIAL_MESON=y\nCONFIG_AMLOGIC_SERIAL_EARLY_CONSOLE=y\nCONFIG_AMLOGIC_SERIAL_MESON_CONSOLE=y\n\n#\n# Clock support for Amlogic platforms\n#\nCONFIG_AMLOGIC_COMMON_CLK=y\nCONFIG_AMLOGIC_COMMON_CLK_MESON_REGMAP=y\nCONFIG_AMLOGIC_COMMON_CLK_MESON_DUALDIV=y\nCONFIG_AMLOGIC_COMMON_CLK_MESON_MPLL=y\nCONFIG_AMLOGIC_COMMON_CLK_MESON_PHASE=y\nCONFIG_AMLOGIC_COMMON_CLK_MESON_PLL=y\nCONFIG_AMLOGIC_COMMON_CLK_MESON_SCLK_DIV=y\nCONFIG_AMLOGIC_COMMON_CLK_MESON_VID_PLL_DIV=y\nCONFIG_AMLOGIC_COMMON_CLK_MESON_AO_CLKC=y\nCONFIG_AMLOGIC_COMMON_CLK_MESON_EE_CLKC=y\nCONFIG_AMLOGIC_COMMON_CLK_MESON_CPU_DYNDIV=y\nCONFIG_AMLOGIC_MESON_CLK_MEASURE=y\nCONFIG_AMLOGIC_CLK_DEBUG=y\nCONFIG_AMLOGIC_COMMON_CLK_S4=y\nCONFIG_AMLOGIC_COMMON_CLK_SC2=y\n# CONFIG_AMLOGIC_COMMON_CLK_C2 is not set\n# CONFIG_AMLOGIC_COMMON_CLK_C3 is not set\n# CONFIG_AMLOGIC_COMMON_CLK_A1 is not set\n# CONFIG_AMLOGIC_COMMON_CLK_T3 is not set\nCONFIG_AMLOGIC_COMMON_CLK_T7=y\n# CONFIG_AMLOGIC_COMMON_CLK_T5M is not set\nCONFIG_AMLOGIC_COMMON_CLK_G12A=y\nCONFIG_AMLOGIC_COMMON_CLK_S5=y\n# CONFIG_AMLOGIC_COMMON_CLK_T5W is not set\n# CONFIG_AMLOGIC_COMMON_CLK_T3X is not set\n# CONFIG_AMLOGIC_COMMON_CLK_TXHD2 is not set\n# CONFIG_AMLOGIC_COMMON_CLK_C1 is not set\n# CONFIG_AMLOGIC_COMMON_CLK_S1A is not set\n# CONFIG_AMLOGIC_COMMON_CLK_T5D is not set\n# CONFIG_AMLOGIC_COMMON_CLK_TM2 is not set\nCONFIG_AMLOGIC_COMMON_CLK_S7=y\nCONFIG_AMLOGIC_COMMON_CLK_S7D=y\nCONFIG_AMLOGIC_COMMON_CLK_S6=y\n# CONFIG_AMLOGIC_COMMON_CLK_T6D is not set\n# end of Clock support for Amlogic platforms\n\nCONFIG_AMLOGIC_SECMON=y\n# CONFIG_AMLOGIC_DOLBY_FW is not set\nCONFIG_AMLOGIC_DRM=y\nCONFIG_AMLOGIC_DRM_VPU=y\n# CONFIG_AMLOGIC_DRM_PANEL is not set\nCONFIG_AMLOGIC_DRM_USE_ION=y\nCONFIG_AMLOGIC_DRM_EMULATE_FBDEV=y\n\n#\n# Amlogic multimedia configuration\n#\nCONFIG_AMLOGIC_MEDIA_MODULE=y\nCONFIG_AMLOGIC_MEDIA_ENABLE=y\nCONFIG_AMLOGIC_MEDIA_COMMON=y\nCONFIG_AMLOGIC_MEDIA_DRIVERS=y\nCONFIG_AMLOGIC_MEDIA_MULTI_DEC=y\n# CONFIG_AMLOGIC_MEDIA_NO_PARSER is not set\n\n#\n# Canvas management driver\n#\nCONFIG_AMLOGIC_MEDIA_CANVAS=y\n# end of Canvas management driver\n\n#\n# Amlogic GE2D Module\n#\nCONFIG_AMLOGIC_MEDIA_GE2D=y\n# CONFIG_AMLOGIC_MEDIA_GE2D_MORE_SECURITY is not set\n# end of Amlogic GE2D Module\n\n#\n# ION support\n#\nCONFIG_AMLOGIC_ION_DEV=y\nCONFIG_AMLOGIC_ION=y\nCONFIG_AMLOGIC_ION_SYSTEM_HEAP=y\n# end of ION support\n\n#\n# Amlogic VPU Driver Support\n#\nCONFIG_AMLOGIC_VPU=y\nCONFIG_AMLOGIC_VPU_DYNAMIC_ADJ=y\n# end of Amlogic VPU Driver Support\n\n#\n# RDMA management driver\n#\nCONFIG_AMLOGIC_MEDIA_RDMA=y\nCONFIG_AMLOGIC_MEDIA_VSYNC_RDMA=y\n# end of RDMA management driver\n\nCONFIG_AMLOGIC_MEDIA_VFM=y\nCONFIG_AMLOGIC_MEDIA_CODEC_MM=y\nCONFIG_AMLOGIC_VIDEOBUF_RESOURCE=y\n# CONFIG_AMLOGIC_MEDIA_V4L2 is not set\nCONFIG_AMLOGIC_UVM_CORE=y\nCONFIG_AMLOGIC_UVM_ALLOCATOR=y\n\n#\n# LUT DMA management driver\n#\nCONFIG_AMLOGIC_MEDIA_LUT_DMA=y\n# end of LUT DMA management driver\n\n#\n# VPU SECURITY driver\n#\nCONFIG_AMLOGIC_MEDIA_SECURITY=y\n# end of VPU SECURITY driver\n\n#\n# ResManage driver\n#\nCONFIG_AMLOGIC_MEDIA_RESMANAGE=y\n# end of ResManage driver\n\n#\n# Amlogic dma-buf support\n#\n# CONFIG_AMLOGIC_SECURE_DMABUF is not set\n# CONFIG_AMLOGIC_HEAP_CMA is not set\n# CONFIG_AMLOGIC_HEAP_CODEC_MM is not set\n# end of Amlogic dma-buf support\n\n# CONFIG_AMLOGIC_HEAP_SECURE is not set\n\n#\n# SW_SYNC driver\n#\nCONFIG_AMLOGIC_MEDIA_SW_SYNC=y\n# end of SW_SYNC driver\n\n#\n# Amlogic VICP Module\n#\nCONFIG_AMLOGIC_MEDIA_VICP=y\n# end of Amlogic VICP Module\n\n#\n# MediaProxy driver\n#\n# CONFIG_AMLOGIC_MEDIA_PROXY is not set\n# end of MediaProxy driver\n\n#\n# Amlogic Vout Driver Support\n#\nCONFIG_AMLOGIC_VOUT=y\nCONFIG_AMLOGIC_VOUT_CLK_SERVE=y\nCONFIG_AMLOGIC_VOUT_SERVE=y\nCONFIG_AMLOGIC_VOUT2_SERVE=y\nCONFIG_AMLOGIC_VOUT3_SERVE=y\n\n#\n# Amlogic DisplayPort Output Module\n#\n# CONFIG_AMLOGIC_DisplayPort_TX is not set\n# end of Amlogic DisplayPort Output Module\n\n#\n# Amlogic LCD Output Module\n#\nCONFIG_AMLOGIC_LCD=y\nCONFIG_AMLOGIC_LCD_TV=y\nCONFIG_AMLOGIC_LCD_TABLET=y\n\n#\n# Amlogic Backlight Support\n#\n# CONFIG_AMLOGIC_BACKLIGHT is not set\n# end of Amlogic Backlight Support\n\nCONFIG_AMLOGIC_LCD_EXTERN=y\n# CONFIG_AMLOGIC_LCD_EXTERN_I2C_ANX6862_7911 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_I2C_CS602 is not set\n# CONFIG_AMLOGIC_LCD_EXTERN_I2C_OLED is not set\n\n#\n# Amlogic Ambilight Support\n#\n# CONFIG_AMLOGIC_AMBILIGHT is not set\n# end of Amlogic Ambilight Support\n# end of Amlogic LCD Output Module\n\n#\n# Amlogic HDMITX Common Module\n#\nCONFIG_AMLOGIC_HDMITX_COMMON=y\n# end of Amlogic HDMITX Common Module\n\n#\n# Amlogic Peripheral_lcd Support\n#\n# CONFIG_AMLOGIC_PERIPHERAL_LCD is not set\n# end of Amlogic Peripheral_lcd Support\n\n#\n# Amlogic DSC_ENCODER Module\n#\n# CONFIG_AMLOGIC_DSC is not set\n# end of Amlogic DSC_ENCODER Module\n\n#\n# Amlogic HDMITX Module\n#\nCONFIG_AMLOGIC_HDMITX21=y\n# end of Amlogic HDMITX Module\n\n#\n# Amlogic HDMITX Module\n#\nCONFIG_AMLOGIC_HDMITX=y\n# end of Amlogic HDMITX Module\n\nCONFIG_AMLOGIC_CVBS_OUTPUT=y\nCONFIG_AMLOGIC_WSS=y\nCONFIG_AMLOGIC_VOUT_CC_BYPASS=y\nCONFIG_AMLOGIC_VDAC=y\n# end of Amlogic Vout Driver Support\n\n#\n# Amlogic Camera Support\n#\n# CONFIG_AMLOGIC_VIDEO_CAPTURE is not set\n# CONFIG_AMLOGIC_VIDEO_CAPTURE_OV5640 is not set\n# CONFIG_AMLOGIC_MEDIA_CAMERA_UTILS is not set\n# end of Amlogic Camera Support\n\n#\n# Amlogic Video Sink Driver Support\n#\nCONFIG_AMLOGIC_MEDIA_VIDEO=y\nCONFIG_AMLOGIC_MEDIA_VIDEOCAPTURE=y\n# CONFIG_AMLOGIC_MEDIA_DUMMY_PROVIDER is not set\n# end of Amlogic Video Sink Driver Support\n\n#\n# Amlogic VRR Drivers\n#\n\n#\n# Amlogic VRR Driver\n#\nCONFIG_AMLOGIC_MEDIA_VRR=y\n# end of Amlogic VRR Driver\n\n#\n# Amlogic OSD Module\n#\nCONFIG_AMLOGIC_MEDIA_FB=y\nCONFIG_AMLOGIC_MEDIA_FB_OSD_SYNC_FENCE=y\n# CONFIG_AMLOGIC_MEDIA_FB_OSD_VSYNC_RDMA is not set\nCONFIG_AMLOGIC_MEDIA_FB_OSD2_ENABLE=y\nCONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR=y\n# end of Amlogic OSD Module\n\n#\n# Deinterlace driver\n#\nCONFIG_AMLOGIC_MEDIA_DEINTERLACE=y\n# end of Deinterlace driver\n\n#\n# DI_MULTI driver\n#\n# end of DI_MULTI driver\n\n#\n# DI_LOCAL driver\n#\n# end of DI_LOCAL driver\n\n#\n# Amlogic Video Processor Support\n#\nCONFIG_AMLOGIC_MEDIA_VIDEO_PROCESSOR=y\n\n#\n# Amlogic picture decoder support\n#\nCONFIG_AMLOGIC_PIC_DEC=y\n# end of Amlogic picture decoder support\n\n#\n# Post Process Manager driver\n#\nCONFIG_AMLOGIC_POST_PROCESS_MANAGER=y\n# end of Post Process Manager driver\n\n#\n# Video frame queue Support\n#\nCONFIG_AMLOGIC_MEDIA_UTILS=y\n# end of Video frame queue Support\n\n#\n# Amlogic videosync support\n#\nCONFIG_AMLOGIC_VIDEOSYNC=y\n# end of Amlogic videosync support\n\n#\n# V4L2 Video Support\n#\nCONFIG_AMLOGIC_V4L_VIDEO=y\nCONFIG_AMLOGIC_V4L_VIDEO2=y\n# end of V4L2 Video Support\n\n#\n# Amlogic ion video support\n#\nCONFIG_AMLOGIC_VIDEOBUF2_ION=y\nCONFIG_AMLOGIC_IONVIDEO=y\n# end of Amlogic ion video support\n\n#\n# Amlogic v4l video support\n#\nCONFIG_AMLOGIC_V4L_VIDEO3=y\n# end of Amlogic v4l video support\n\n#\n# Amlogic video_composer support\n#\nCONFIG_AMLOGIC_VIDEO_COMPOSER=y\n# end of Amlogic video_composer support\n\n#\n# Amlogic video tunnel support\n#\n# CONFIG_AMLOGIC_VIDEO_TUNNEL is not set\n# end of Amlogic video tunnel support\n\n#\n# V4L2 Video Support\n#\n# CONFIG_AMLOGIC_VDETECT is not set\n# end of V4L2 Video Support\n\n#\n# Amlogic videoqueue support\n#\n# CONFIG_AMLOGIC_VIDEOQUEUE is not set\n# end of Amlogic videoqueue support\n\n#\n# Amlogic video_pp_common support\n#\nCONFIG_AMLOGIC_VIDEO_PP_COMMON=y\n# end of Amlogic video_pp_common support\n\n#\n# Amlogic di_process support\n#\nCONFIG_AMLOGIC_DI_PROCESS=y\n# end of Amlogic di_process support\n# end of Amlogic Video Processor Support\n\n#\n# Amlogic Enhancement drivers\n#\nCONFIG_AMLOGIC_MEDIA_ENHANCEMENT=y\n\n#\n# Amlogic amdolby_vision Drivers\n#\n\n#\n# Amlogic amdolby_vision Driver\n#\nCONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION=y\n# end of Amlogic amdolby_vision Driver\n\n#\n# Amlogic VECM Drivers\n#\n\n#\n# Amlogic amvecm Driver\n#\nCONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM=y\n# end of Amlogic amvecm Driver\n# end of Amlogic Enhancement drivers\n\nCONFIG_AMLOGIC_MEDIA_FRAME_SYNC=y\nCONFIG_AMLOGIC_MEDIA_GDC=y\n\n#\n# Input drivers\n#\nCONFIG_AMLOGIC_MEDIA_VIN=y\n\n#\n# Tvin drivers\n#\nCONFIG_AMLOGIC_MEDIA_TVIN=y\nCONFIG_AMLOGIC_MEDIA_VDIN=y\nCONFIG_AMLOGIC_MEDIA_TVIN_AFE=y\n# CONFIG_AMLOGIC_ADC_DOUBLE_SAMPLING_FOR_CVBS is not set\nCONFIG_AMLOGIC_MEDIA_TVIN_VBI=y\nCONFIG_AMLOGIC_MEDIA_TVIN_AVDETECT=y\nCONFIG_AMLOGIC_MEDIA_VIUIN=y\nCONFIG_AMLOGIC_MEDIA_TVIN_BT656=y\n# CONFIG_AMLOGIC_MEDIA_TVIN_CSI is not set\nCONFIG_AMLOGIC_MEDIA_TVIN_HDMI=y\n# CONFIG_AMLOGIC_MEDIA_TVIN_DSC_DEC is not set\n# CONFIG_AMLOGIC_TVIN_USE_DEBUG_FILE is not set\nCONFIG_AMLOGIC_MEDIA_ADC=y\n# end of Input drivers\n\nCONFIG_AMLOGIC_CEC=y\nCONFIG_AMLOGIC_AO_CEC=y\n# CONFIG_AMLOGIC_LINUX_STD_CEC is not set\n\n#\n# ESM Support\n#\nCONFIG_AMLOGIC_ESM=y\n# end of ESM Support\n\n#\n# Amlogic ATV driver\n#\nCONFIG_AMLOGIC_ATV_DEMOD=y\n# end of Amlogic ATV driver\n\n# CONFIG_AMLOGIC_MEDIA_MSYNC is not set\n\n#\n# Amlogic DTV driver\n#\nCONFIG_AMLOGIC_DTV_DEMOD=y\n# end of Amlogic DTV driver\n\nCONFIG_AMLOGIC_MEDIA_FRC=y\n\n#\n# Amlogic di v4l support\n#\nCONFIG_AMLOGIC_DI_V4L=y\n# end of Amlogic di v4l support\n\n#\n# DI_MINI driver\n#\n# end of DI_MINI driver\n# end of Amlogic multimedia configuration\n\nCONFIG_AMLOGIC_POWER=y\nCONFIG_AMLOGIC_POWER_EE=y\n# CONFIG_AMLOGIC_POWER_PMIC is not set\nCONFIG_AMLOGIC_CPU_INFO=y\nCONFIG_AMLOGIC_SHOW_CPU_CHIPID=y\n\n#\n# Meson core pm driver\n#\nCONFIG_AMLOGIC_PM=y\nCONFIG_AMLOGIC_GX_SUSPEND=y\nCONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND=y\nCONFIG_AMLOGIC_GX_REBOOT=y\n# end of Meson core pm driver\n\nCONFIG_AMLOGIC_GPIO=y\nCONFIG_AMLOGIC_GPIOLIB=y\nCONFIG_AMLOGIC_GPIOLIB_SYSFS=y\nCONFIG_AMLOGIC_GPIO_DEBUG=y\nCONFIG_AMLOGIC_MESON_IRQ_GPIO=y\nCONFIG_AMLOGIC_PINCTRL_MESON=y\nCONFIG_AMLOGIC_PINCTRL_MESON_S4=y\n# CONFIG_AMLOGIC_PINCTRL_MESON_C2 is not set\n# CONFIG_AMLOGIC_PINCTRL_MESON_C3 is not set\n# CONFIG_AMLOGIC_PINCTRL_MESON_A1 is not set\nCONFIG_AMLOGIC_PINCTRL_MESON_SC2=y\n# CONFIG_AMLOGIC_PINCTRL_MESON_T3 is not set\nCONFIG_AMLOGIC_PINCTRL_MESON_T7=y\n# CONFIG_AMLOGIC_PINCTRL_MESON_T5M is not set\nCONFIG_AMLOGIC_PINCTRL_MESON_G12A=y\nCONFIG_AMLOGIC_PINCTRL_MESON_S5=y\n# CONFIG_AMLOGIC_PINCTRL_MESON_T5W is not set\n# CONFIG_AMLOGIC_PINCTRL_MESON_T3X is not set\n# CONFIG_AMLOGIC_PINCTRL_MESON_TXHD2 is not set\n# CONFIG_AMLOGIC_PINCTRL_MESON_C1 is not set\n# CONFIG_AMLOGIC_PINCTRL_MESON_S1A is not set\n# CONFIG_AMLOGIC_PINCTRL_MESON_T5D is not set\n# CONFIG_AMLOGIC_PINCTRL_MESON_TM2 is not set\nCONFIG_AMLOGIC_PINCTRL_MESON_S7=y\nCONFIG_AMLOGIC_PINCTRL_MESON_S7D=y\nCONFIG_AMLOGIC_PINCTRL_MESON_S6=y\n# CONFIG_AMLOGIC_PINCTRL_MESON_T6D is not set\n# CONFIG_AMLOGIC_GPIO_PMIC is not set\nCONFIG_AMLOGIC_INPUT=m\n# CONFIG_AMLOGIC_GPIO_KEY is not set\n# CONFIG_AMLOGIC_CKS05_TOUCH_KEYPADS is not set\nCONFIG_AMLOGIC_MESON_IR=y\n# CONFIG_AMLOGIC_INPUT_PMIC is not set\n\n#\n# I2C Hardware Bus support\n#\nCONFIG_AMLOGIC_I2C_MESON=y\n# end of I2C Hardware Bus support\n\nCONFIG_AMLOGIC_SPI=y\nCONFIG_AMLOGIC_SPI_MESON_SPICC=y\nCONFIG_AMLOGIC_SPI_MESON_SPICC_V2=y\n# CONFIG_SPICC_TEST is not set\nCONFIG_AMLOGIC_SPI_MESON_SPIFC=y\nCONFIG_AMLOGIC_SPI_MESON_SPIFC_V2=y\n# CONFIG_AMLOGIC_SPI_MESON_SPICC_SLAVE is not set\n# CONFIG_AMLOGIC_SPI_NFC is not set\nCONFIG_AMLOGIC_TEE=y\nCONFIG_AMLOGIC_AMLTEE=y\n\n#\n# TEE drivers\n#\nCONFIG_AMLOGIC_OPTEE=y\n# end of TEE drivers\n\n# CONFIG_AMLOGIC_WATERMARK is not set\nCONFIG_AMLOGIC_GKI_TOOL=m\nCONFIG_AMLOGIC_PWM=y\nCONFIG_AMLOGIC_PWM_MESON=y\nCONFIG_AMLOGIC_PWM_MESON_TEE=y\nCONFIG_AMLOGIC_MESON_CPUFREQ=y\nCONFIG_AMLOGIC_EFUSE_UNIFYKEY=y\nCONFIG_AMLOGIC_EFUSE=y\nCONFIG_AMLOGIC_UNIFYKEY=y\n# CONFIG_AMLOGIC_EFUSE_BURN is not set\nCONFIG_AMLOGIC_DEFENDKEY=y\n\n#\n# MESON MHU mailbox Support\n#\nCONFIG_AMLOGIC_MHU_MBOX=y\n# end of MESON MHU mailbox Support\n\nCONFIG_AMLOGIC_JTAG_MESON=y\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_AMLOGIC_MESON_GXBB_WATCHDOG is not set\n# CONFIG_AMLOGIC_ARM_SMC_WATCHDOG is not set\nCONFIG_AMLOGIC_MEMORY_EXTEND=y\nCONFIG_AMLOGIC_PAGE_TRACE=y\n# CONFIG_AMLOGIC_PAGE_TRACE_INLINE is not set\n# CONFIG_AMLOGIC_SLAB_TRACE is not set\nCONFIG_AMLOGIC_CMA=y\n# CONFIG_AMLOGIC_MEM_DEBUG is not set\nCONFIG_AMLOGIC_STACKPROTECTOR=y\n# CONFIG_AMLOGIC_VMAP is not set\nCONFIG_AMLOGIC_USER_FAULT=y\nCONFIG_AMLOGIC_ZSTD=y\nCONFIG_AMLOGIC_MEMORY_STAT=y\n# CONFIG_AMLOGIC_CMA_DIS is not set\nCONFIG_AMLOGIC_MEMORY_OPT=y\n# CONFIG_AMLOGIC_PIN_LOCKED_FILE is not set\n# CONFIG_AMLOGIC_PIN_LOCKED_FILE_V2 is not set\n# CONFIG_AMLOGIC_PCIE_DMA_OPS is not set\nCONFIG_AMLOGIC_FAKE_SMMU=y\n# CONFIG_AMLOGIC_DTB_NODE_OPT is not set\n# CONFIG_AMLOGIC_KALLSYM_OPT is not set\n# CONFIG_AMLOGIC_PRINTK_OPT is not set\n# CONFIG_AMLOGIC_KHEADERS_OPT is not set\n\n#\n# Meson core memory debug driver\n#\nCONFIG_AMLOGIC_MEMORY_DEBUG=y\nCONFIG_AMLOGIC_FILE_CACHE=y\n# CONFIG_AMLOGIC_WATCHPOINT is not set\nCONFIG_AMLOGIC_REG_ACCESS=y\nCONFIG_AMLOGIC_DDR_TOOL=y\nCONFIG_AMLOGIC_DDR_BANDWIDTH=y\n# CONFIG_AMLOGIC_DDR_BANDWIDTH_GXL is not set\n# CONFIG_AMLOGIC_DDR_BANDWIDTH_GX is not set\nCONFIG_AMLOGIC_DDR_BANDWIDTH_G12=y\nCONFIG_AMLOGIC_DDR_BANDWIDTH_T7=y\n# CONFIG_AMLOGIC_DDR_BANDWIDTH_A1 is not set\nCONFIG_AMLOGIC_DDR_BANDWIDTH_T5=y\nCONFIG_AMLOGIC_DDR_BANDWIDTH_S4=y\nCONFIG_AMLOGIC_DDR_BANDWIDTH_S5=y\nCONFIG_AMLOGIC_DDR_BANDWIDTH_S6=y\n# CONFIG_AMLOGIC_DDR_BANDWIDTH_C3 is not set\n# CONFIG_AMLOGIC_DDR_BANDWIDTH_T5M is not set\n# CONFIG_AMLOGIC_DDR_BANDWIDTH_TXHD2 is not set\n# CONFIG_AMLOGIC_DDR_BANDWIDTH_S1A is not set\nCONFIG_AMLOGIC_DDR_BANDWIDTH_S7=y\n# CONFIG_AMLOGIC_DDR_BANDWIDTH_T6D is not set\nCONFIG_AMLOGIC_DMC_MONITOR=y\nCONFIG_AMLOGIC_DMC_DEV_ACCESS=y\nCONFIG_AMLOGIC_DMC_MONITOR_G12=y\n# CONFIG_AMLOGIC_DMC_MONITOR_TM2 is not set\n# CONFIG_AMLOGIC_DMC_MONITOR_GX is not set\n# CONFIG_AMLOGIC_DMC_MONITOR_C1 is not set\n# CONFIG_AMLOGIC_DMC_MONITOR_C2 is not set\nCONFIG_AMLOGIC_DMC_MONITOR_T7=y\nCONFIG_AMLOGIC_DMC_MONITOR_S4=y\nCONFIG_AMLOGIC_DMC_MONITOR_S5=y\nCONFIG_AMLOGIC_DMC_MONITOR_S6=y\n# CONFIG_AMLOGIC_DMC_MONITOR_C3 is not set\n# CONFIG_AMLOGIC_DMC_MONITOR_T5M is not set\n# CONFIG_AMLOGIC_DMC_MONITOR_S1A is not set\n# CONFIG_AMLOGIC_DMC_MONITOR_TXHD2 is not set\nCONFIG_AMLOGIC_DMC_MONITOR_S7=y\n# CONFIG_AMLOGIC_DMC_MONITOR_T6D is not set\nCONFIG_AMLOGIC_RAMDUMP=y\n# end of Meson core memory debug driver\n\n#\n# Analog to digital converters\n#\n# CONFIG_AMLOGIC_ADC is not set\n# end of Analog to digital converters\n\n#\n# Character devices\n#\nCONFIG_AMLOGIC_HW_RANDOM_MESON=y\n# end of Character devices\n\n# CONFIG_AMLOGIC_SOC_INFO is not set\nCONFIG_AMLOGIC_RESET_MESON=y\nCONFIG_AMLOGIC_DOS_RESET_MESON=y\n\n#\n# RTC drivers\n#\nCONFIG_AMLOGIC_RTC=y\nCONFIG_AMLOGIC_RTC_DRV_MESON_VRTC=y\nCONFIG_AMLOGIC_MESON_RTC=y\n\n#\n# RTC_PMIC6B SUPPORT\n#\n# end of RTC_PMIC6B SUPPORT\n\n# CONFIG_AMLOGIC_IRBLASTER is not set\n\n#\n# Amlogic Thermal and Cooling devices\n#\nCONFIG_AMLOGIC_AMLOGIC_THERMAL=y\nCONFIG_AMLOGIC_COOLDEV=y\nCONFIG_AMLOGIC_CPUCORE_THERMAL=y\nCONFIG_AMLOGIC_GPU_THERMAL=y\nCONFIG_AMLOGIC_GPUCORE_THERMAL=y\nCONFIG_AMLOGIC_DDR_THERMAL=y\nCONFIG_AMLOGIC_MEDIA_THERMAL=y\n# end of Amlogic Thermal and Cooling devices\n\nCONFIG_AMLOGIC_MMC_MESON_GX=y\nCONFIG_AMLOGIC_MMC_CQHCI=y\nCONFIG_AMLOGIC_HOST_DRIVER=y\nCONFIG_AMLOGIC_DEBUG=y\nCONFIG_AMLOGIC_BGKI_DEBUG_MISC=y\nCONFIG_AMLOGIC_DEBUG_ATRACE=y\nCONFIG_AMLOGIC_BOOT_TIME=y\nCONFIG_AMLOGIC_DEBUG_FILE=y\n# CONFIG_AMLOGIC_DEBUG_TEST is not set\n# CONFIG_AMLOGIC_DEBUG_HLD is not set\n# CONFIG_AMLOGIC_DEBUG_MHZ is not set\n# CONFIG_AMLOGIC_HOTPLUG_ARM_CPU0 is not set\nCONFIG_AMLOGIC_AUDIO_UTILS=y\nCONFIG_AMLOGIC_GKI_CONFIG=y\n# CONFIG_AMLOGIC_ENV_DEBUG is not set\n# CONFIG_AMLOGIC_ZAPPER_NET_CUT is not set\n# CONFIG_AMLOGIC_ZAPPER_CUT is not set\n# CONFIG_AMLOGIC_ZAPPER_CUT_C1A is not set\n# CONFIG_AMLOGIC_REMOVE_OLD is not set\n# CONFIG_AMLOGIC_C3_REMOVE is not set\n# CONFIG_AMLOGIC_DEBUG_IOTRACE is not set\n# CONFIG_AMLOGIC_ARMV8_AARCH32 is not set\n# CONFIG_AMLOGIC_APU is not set\n# CONFIG_AMLOGIC_BGKI_SCHED_SYSCTL is not set\n# CONFIG_AMLOGIC_DEBUG_ISOLCPUS is not set\n# CONFIG_AMLOGIC_F2FS_OPTIMIZATION is not set\nCONFIG_AMLOGIC_MEDIA_CAMERA=y\n# CONFIG_AMLOGIC_FREERTOS is not set\n# CONFIG_AMLOGIC_AUTO_CAPTURE is not set\n\n#\n# USB Support\n#\nCONFIG_AMLOGIC_USB=y\nCONFIG_AMLOGIC_COMMON_USB=y\nCONFIG_AMLOGIC_USB_SUPPORT=y\nCONFIG_AMLOGIC_USB_DWC_OTG_HCD=y\nCONFIG_AMLOGIC_CRG=y\nCONFIG_AMLOGIC_USBPHY=y\nCONFIG_AMLOGIC_USB2PHY=y\nCONFIG_AMLOGIC_USB3PHY=y\nCONFIG_AMLOGIC_USBPHYC2=y\nCONFIG_AMLOGIC_BC=y\nCONFIG_AMLOGIC_CC=y\n# end of USB Support\n\n#\n# Amlogic Crypto Support\n#\nCONFIG_AMLOGIC_CRYPTO_DMA=y\n# end of Amlogic Crypto Support\n\nCONFIG_AMLOGIC_WIRELESS=y\nCONFIG_AMLOGIC_BLUETOOTH=y\n# CONFIG_AMLOGIC_BT_WAKE_NOT_REPORT is not set\nCONFIG_AMLOGIC_WIFI=y\nCONFIG_AMLOGIC_PWM_32K=y\nCONFIG_AMLOGIC_RFKILL_INIT_SW_UNBLOCK=y\nCONFIG_AMLOGIC_MDIO_G12A=y\nCONFIG_AMLOGIC_INPHY=y\nCONFIG_AMLOGIC_REALTEK=y\nCONFIG_AMLOGIC_LINUX_BT_SMP=y\nCONFIG_AMLOGIC_LINUX_BT_SUPPORT_WAKEUP=y\n# CONFIG_AMLOGIC_MTD_SPI_NOR is not set\nCONFIG_AMLOGIC_MTD_SPI_NAND=y\nCONFIG_AMLOGIC_MTD_NAND=y\nCONFIG_AMLOGIC_MTD_COMMON=y\nCONFIG_AMLOGIC_MTD_RESV=y\n# CONFIG_AMLOGIC_NAND is not set\nCONFIG_AMLOGIC_DVB_CONFIG=y\nCONFIG_AMLOGIC_DVB_EXTERN=y\n# CONFIG_AMLOGIC_DVB_DSM is not set\nCONFIG_AMLOGIC_DVB_COMPAT=y\n# CONFIG_AMLOGIC_DVB_EXTERN_TUNER is not set\nCONFIG_AMLOGIC_AUCPU=y\n# CONFIG_AMLOGIC_SMARTCARD is not set\nCONFIG_AMLOGIC_DVB_DMX=m\nCONFIG_AMLOGIC_DVB_DUMMY_FRONTEND=m\n\n#\n# Amlogic PCI Support\n#\nCONFIG_AMLOGIC_PCIE=y\nCONFIG_AMLOGIC_PCIE_V2_HOST=y\nCONFIG_AMLOGIC_PCIE_V3_HOST=y\n# end of Amlogic PCI Support\n\nCONFIG_AMLOGIC_LED=y\n# CONFIG_AMLOGIC_LEDS_TLC59116 is not set\n# CONFIG_AMLOGIC_LEDS_AW9523B is not set\n# CONFIG_AMLOGIC_LEDS_STATE is not set\n# CONFIG_AMLOGIC_LEDS_DCON is not set\n# CONFIG_AMLOGIC_LEDS_FD650 is not set\nCONFIG_AMLOGIC_LEDS_BCT3236=y\n\n#\n# AMLOGIC DVB CI support\n#\n# CONFIG_AMLOGIC_DVB_CI is not set\n# end of AMLOGIC DVB CI support\n\n# CONFIG_AMLOGIC_USBCAM is not set\n\n#\n# MESON hw spin lock Support\n#\nCONFIG_AMLOGIC_HWSPINLOCK=y\n# end of MESON hw spin lock Support\n\n# CONFIG_AMLOGIC_ANDROID_LOGGER is not set\n# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set\n# CONFIG_AMLOGIC_LMK is not set\n# CONFIG_AMLOGIC_YAFFS_FS is not set\n# CONFIG_AMLOGIC_MFD is not set\n# CONFIG_AMLOGIC_REGULATOR is not set\nCONFIG_AMLOGIC_PWM_REGULATOR=y\n# CONFIG_AMLOGIC_AUDIO_BRIDGE is not set\n\n#\n# Amlogic multimedia algorithm configuration\n#\nCONFIG_AMLOGIC_MEDIA_ALGORITHM=y\n# end of Amlogic multimedia algorithm configuration\n\n# CONFIG_AMLOGIC_SOC_TIMESTAMP is not set\n# CONFIG_AMLOGIC_SECKEY is not set\n# CONFIG_AMLOGIC_TRUSTED_KEYS is not set\n# CONFIG_AMLOGIC_TRUSTED_KEYS_TEE is not set\n# CONFIG_AMLOGIC_AMFC is not set\nCONFIG_AMFC_BASE=0xfe024000\n# CONFIG_AMLOGIC_EROFS is not set\nCONFIG_AMLOGIC_EROFS_CRYPTO_MAX_PAGES=32\n# CONFIG_AMLOGIC_ADD_RUMBLE is not set\n# CONFIG_AMLOGIC_FDTO_REMOVE_NODE is not set\n\n#\n# Bootloader Drivers\n#\nCONFIG_BL30_MANAGER=y\n# end of Bootloader Drivers\n# end of Amlogic Device Drivers\n\nCONFIG_AMLOGIC_SND_SOC=y\n# CONFIG_AMLOGIC_AUDIO_CUT is not set\nCONFIG_AMLOGIC_SND_SOC_AUGE=y\nCONFIG_AMLOGIC_SND_SOC_COMMON=y\n\n#\n# Audio Interface\n#\nCONFIG_AMLOGIC_AMAUDIO=y\n# end of Audio Interface\n\n#\n# AMLOGIC Audio DSP process\n#\nCONFIG_AMLOGIC_AUDIO_DSP=y\n# end of AMLOGIC Audio DSP process\n\nCONFIG_AMLOGIC_AUDIO_INFO=y\nCONFIG_AMLOGIC_SND_SOC_CODECS=y\nCONFIG_AMLOGIC_SND_CODEC_DUMMY_CODEC=y\nCONFIG_AMLOGIC_SND_CODEC_PCM2BT=y\nCONFIG_AMLOGIC_SND_CODEC_AMLT9015=y\n# CONFIG_AMLOGIC_SND_CODEC_AMLT9015S is not set\n# CONFIG_AMLOGIC_SND_CODEC_PMU3 is not set\nCONFIG_AMLOGIC_SND_CODEC_TXLX_ACODEC=y\nCONFIG_AMLOGIC_SND_CODEC_TL1_ACODEC=y\nCONFIG_AMLOGIC_SND_CODEC_T6D_ACODEC=y\n# CONFIG_AMLOGIC_SND_CODEC_A1_ACODEC is not set\nCONFIG_AMLOGIC_SND_SOC_AD82128=y\nCONFIG_AMLOIC_SND_SOC_AD82088D=y\nCONFIG_AMLOGIC_SND_SOC_TAS5805=y\nCONFIG_AMLOGIC_SND_SOC_PA1=y\n# CONFIG_AMLOGIC_SND_SOC_TAS5782M is not set\nCONFIG_AMLOGIC_SND_SOC_TAS5707=y\n# CONFIG_AMLOGIC_SND_SOC_TLV320ADC3101 is not set\n# CONFIG_AMLOGIC_SND_SOC_SY6026L is not set\nCONFIG_AMLOGIC_SND_SOC_PCM186X=y\nCONFIG_AMLOGIC_SND_SOC_SSM3525=y\nCONFIG_AMLOGIC_SND_SOC_SSM3515=y\nCONFIG_AMLOGIC_SND_SOC_TAS575X=y\n# CONFIG_AMLOGIC_SND_SOC_ES7243 is not set\nCONFIG_AMLOGIC_SND_SOC_ES8388=y\nCONFIG_AMLOGIC_SND_SOC_AD82584F=y\n# CONFIG_AMLOGIC_SND_SOC_AD82120B is not set\n# CONFIG_AMLOGIC_SND_SOC_CS42528 is not set\n# CONFIG_AMLOGIC_SAMPLES_DEBUG_FILE_TEST is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\n# CONFIG_VALIDATE_FS_PARSER is not set\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\nCONFIG_XFS_SUPPORT_V4=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\n# CONFIG_F2FS_FS is not set\n# CONFIG_FS_DAX is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\nCONFIG_FS_ENCRYPTION=y\nCONFIG_FS_ENCRYPTION_ALGS=y\nCONFIG_FS_ENCRYPTION_INLINE_CRYPT=y\nCONFIG_FS_VERITY=y\n# CONFIG_FS_VERITY_DEBUG is not set\nCONFIG_FS_VERITY_BUILTIN_SIGNATURES=y\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\n# CONFIG_FANOTIFY is not set\nCONFIG_QUOTA=y\n# CONFIG_QUOTA_NETLINK_INTERFACE is not set\nCONFIG_PRINT_QUOTA_WARNING=y\n# CONFIG_QUOTA_DEBUG is not set\nCONFIG_QUOTA_TREE=y\n# CONFIG_QFMT_V1 is not set\nCONFIG_QFMT_V2=y\nCONFIG_QUOTACTL=y\n# CONFIG_AUTOFS4_FS is not set\nCONFIG_AUTOFS_FS=m\nCONFIG_FUSE_FS=y\n# CONFIG_CUSE is not set\n# CONFIG_VIRTIO_FS is not set\n# CONFIG_FUSE_BPF is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_XINO_AUTO is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n# CONFIG_INCREMENTAL_FS is not set\n\n#\n# Caches\n#\n# CONFIG_FSCACHE is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=m\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=m\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\nCONFIG_MSDOS_FS=y\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=y\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=y\n# CONFIG_NTFS3_64BIT_CLUSTER is not set\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\nCONFIG_PROC_KCORE=y\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_TMPFS_INODE64 is not set\nCONFIG_ARCH_SUPPORTS_HUGETLBFS=y\n# CONFIG_HUGETLBFS is not set\nCONFIG_MEMFD_CREATE=y\nCONFIG_ARCH_HAS_GIGANTIC_PAGE=y\nCONFIG_CONFIGFS_FS=y\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\n# CONFIG_HFS_FS is not set\n# CONFIG_HFSPLUS_FS is not set\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_JFFS2_FS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\nCONFIG_SQUASHFS_FILE_CACHE=y\n# CONFIG_SQUASHFS_FILE_DIRECT is not set\n# CONFIG_SQUASHFS_DECOMP_SINGLE=y\nCONFIG_SQUASHFS_DECOMP_MULTI=y\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\nCONFIG_PSTORE=y\nCONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240\nCONFIG_PSTORE_DEFLATE_COMPRESS=y\n# CONFIG_PSTORE_LZO_COMPRESS is not set\n# CONFIG_PSTORE_LZ4_COMPRESS is not set\n# CONFIG_PSTORE_LZ4HC_COMPRESS is not set\n# CONFIG_PSTORE_842_COMPRESS is not set\n# CONFIG_PSTORE_ZSTD_COMPRESS is not set\nCONFIG_PSTORE_COMPRESS=y\nCONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y\nCONFIG_PSTORE_COMPRESS_DEFAULT=\"deflate\"\nCONFIG_PSTORE_CONSOLE=y\nCONFIG_PSTORE_PMSG=y\nCONFIG_PSTORE_FTRACE=y\nCONFIG_PSTORE_RAM=y\n# CONFIG_PSTORE_BLK is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\nCONFIG_EROFS_FS=y\n# CONFIG_EROFS_FS_DEBUG is not set\nCONFIG_EROFS_FS_XATTR=y\nCONFIG_EROFS_FS_POSIX_ACL=y\nCONFIG_EROFS_FS_SECURITY=y\nCONFIG_EROFS_FS_ZIP=y\n# CONFIG_EROFS_FS_ZIP_LZMA is not set\n# CONFIG_EROFS_FS_PCPU_KTHREAD is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\nCONFIG_NFS_SWAP=y\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\nCONFIG_NFS_V4_1_MIGRATION=y\nCONFIG_NFS_V4_SECURITY_LABEL=y\nCONFIG_ROOT_NFS=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\n# CONFIG_NFS_DISABLE_UDP_SUPPORT is not set\nCONFIG_NFS_V4_2_READ_PLUS=y\nCONFIG_NFSD=m\nCONFIG_NFSD_V2_ACL=y\nCONFIG_NFSD_V3=y\nCONFIG_NFSD_V3_ACL=y\nCONFIG_NFSD_V4=y\n# CONFIG_NFSD_BLOCKLAYOUT is not set\n# CONFIG_NFSD_SCSILAYOUT is not set\n# CONFIG_NFSD_FLEXFILELAYOUT is not set\nCONFIG_NFSD_V4_2_INTER_SSC=y\nCONFIG_NFSD_V4_SECURITY_LABEL=y\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_ACL_SUPPORT=m\nCONFIG_NFS_COMMON=y\nCONFIG_NFS_V4_2_SSC_HELPER=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\nCONFIG_SUNRPC_SWAP=y\n# CONFIG_RPCSEC_GSS_KRB5 is not set\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS2=y\nCONFIG_CIFS_ALLOW_INSECURE_LEGACY=y\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\n# CONFIG_CIFS_DEBUG is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\n# CONFIG_CIFS_SWN_UPCALL is not set\n# CONFIG_CIFS_ROOT is not set\n# CONFIG_SMB_SERVER is not set\nCONFIG_SMBFS_COMMON=y\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\n# CONFIG_NLS_ASCII is not set\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_KEYS_REQUEST_CACHE is not set\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_BIG_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\n# CONFIG_KEY_DH_OPERATIONS is not set\n# CONFIG_KEY_NOTIFICATIONS is not set\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\nCONFIG_SECURITY=y\n# CONFIG_SECURITYFS is not set\nCONFIG_SECURITY_NETWORK=y\n# CONFIG_SECURITY_NETWORK_XFRM is not set\n# CONFIG_SECURITY_PATH is not set\nCONFIG_LSM_MMAP_MIN_ADDR=32768\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\nCONFIG_HARDENED_USERCOPY=y\n# CONFIG_HARDENED_USERCOPY_FALLBACK is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\nCONFIG_SECURITY_SELINUX=y\n# CONFIG_SECURITY_SELINUX_BOOTPARAM is not set\n# CONFIG_SECURITY_SELINUX_DISABLE is not set\nCONFIG_SECURITY_SELINUX_DEVELOP=y\n# CONFIG_SECURITY_SELINUX_AVC_STATS is not set\nCONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=0\nCONFIG_SECURITY_SELINUX_SIDTAB_HASH_BITS=9\nCONFIG_SECURITY_SELINUX_SID2STR_CACHE_SIZE=256\n# CONFIG_SECURITY_SMACK is not set\n# CONFIG_SECURITY_TOMOYO is not set\n# CONFIG_SECURITY_APPARMOR is not set\n# CONFIG_SECURITY_LOADPIN is not set\n# CONFIG_SECURITY_YAMA is not set\n# CONFIG_SECURITY_SAFESETID is not set\n# CONFIG_SECURITY_LOCKDOWN_LSM is not set\n# CONFIG_SECURITY_LANDLOCK is not set\n# CONFIG_INTEGRITY is not set\nCONFIG_DEFAULT_SECURITY_SELINUX=y\n# CONFIG_DEFAULT_SECURITY_DAC is not set\nCONFIG_LSM=\"lockdown,yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set\n# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set\n# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL is not set\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_GCC_PLUGIN_STACKLEAK is not set\nCONFIG_INIT_ON_ALLOC_DEFAULT_ON=y\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_FIPS140=y\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\nCONFIG_CRYPTO_USER=y\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_CRYPTD=y\nCONFIG_CRYPTO_AUTHENC=y\n# CONFIG_CRYPTO_TEST is not set\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\n# CONFIG_CRYPTO_DH is not set\nCONFIG_CRYPTO_ECC=y\nCONFIG_CRYPTO_ECDH=y\nCONFIG_CRYPTO_ECDSA=y\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\n# CONFIG_CRYPTO_CURVE25519 is not set\n\n#\n# Authenticated Encryption with Associated Data\n#\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\n# CONFIG_CRYPTO_AEGIS128 is not set\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\n\n#\n# Block modes\n#\nCONFIG_CRYPTO_CBC=y\n# CONFIG_CRYPTO_CFB is not set\nCONFIG_CRYPTO_CTR=y\nCONFIG_CRYPTO_CTS=y\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_OFB is not set\n# CONFIG_CRYPTO_PCBC is not set\nCONFIG_CRYPTO_XTS=y\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_HCTR2 is not set\nCONFIG_CRYPTO_ESSIV=y\n\n#\n# Hash modes\n#\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_HMAC=y\n# CONFIG_CRYPTO_XCBC is not set\n# CONFIG_CRYPTO_VMAC is not set\n\n#\n# Digest\n#\nCONFIG_CRYPTO_CRC32C=y\n# CONFIG_CRYPTO_CRC32 is not set\nCONFIG_CRYPTO_XXHASH=m\nCONFIG_CRYPTO_BLAKE2B=m\nCONFIG_CRYPTO_CRCT10DIF=y\nCONFIG_CRYPTO_GHASH=y\n# CONFIG_CRYPTO_POLY1305 is not set\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\n# CONFIG_CRYPTO_SM3 is not set\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_WP512 is not set\n\n#\n# Ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_CHACHA20 is not set\n# CONFIG_CRYPTO_SERPENT is not set\n# CONFIG_CRYPTO_SM4 is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=y\nCONFIG_CRYPTO_LZO=y\n# CONFIG_CRYPTO_842 is not set\nCONFIG_CRYPTO_LZ4=y\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n\n#\n# Random Number Generation\n#\n# CONFIG_CRYPTO_ANSI_CPRNG is not set\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\nCONFIG_CRYPTO_USER_API_RNG=y\n# CONFIG_CRYPTO_USER_API_RNG_CAVP is not set\nCONFIG_CRYPTO_USER_API_AEAD=y\n# CONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE is not set\n# CONFIG_CRYPTO_STATS is not set\nCONFIG_CRYPTO_HASH_INFO=y\nCONFIG_CRYPTO_HW=y\n# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set\n# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set\n# CONFIG_CRYPTO_DEV_CCP is not set\n# CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set\n# CONFIG_CRYPTO_DEV_CAVIUM_ZIP is not set\n# CONFIG_CRYPTO_DEV_SAFEXCEL is not set\n# CONFIG_CRYPTO_DEV_CCREE is not set\n# CONFIG_CRYPTO_DEV_HISI_SEC is not set\n# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\n# CONFIG_PKCS8_PRIVATE_KEY_PARSER is not set\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\nCONFIG_RAID6_PQ_BENCHMARK=y\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_GENERIC_FIND_FIRST_BIT=y\nCONFIG_CORDIC=m\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_ARCH_HAS_FAST_MULTIPLIER=y\nCONFIG_ARCH_USE_SYM_ANNOTATIONS=y\n# CONFIG_INDIRECT_PIO is not set\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=y\nCONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CHACHA_GENERIC=y\nCONFIG_CRYPTO_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=y\nCONFIG_CRYPTO_LIB_CURVE25519=y\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_LIB_MEMNEQ=y\n# CONFIG_TRACE_MMIO_ACCESS is not set\nCONFIG_CRC_CCITT=m\nCONFIG_CRC16=y\nCONFIG_CRC_T10DIF=y\nCONFIG_CRC_ITU_T=m\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC64 is not set\n# CONFIG_CRC4 is not set\n# CONFIG_CRC7 is not set\nCONFIG_LIBCRC32C=y\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=y\nCONFIG_AUDIT_GENERIC=y\nCONFIG_AUDIT_ARCH_COMPAT_GENERIC=y\nCONFIG_AUDIT_COMPAT_GENERIC=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=y\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_COMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMPRESS=m\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\nCONFIG_DECOMPRESS_GZIP=y\nCONFIG_DECOMPRESS_BZIP2=y\nCONFIG_DECOMPRESS_LZMA=y\nCONFIG_DECOMPRESS_XZ=y\nCONFIG_DECOMPRESS_LZO=y\nCONFIG_DECOMPRESS_LZ4=y\nCONFIG_DECOMPRESS_ZSTD=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_REED_SOLOMON=y\nCONFIG_REED_SOLOMON_ENC8=y\nCONFIG_REED_SOLOMON_DEC8=y\nCONFIG_INTERVAL_TREE=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_DMA_OPS=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_DMA_DECLARE_COHERENT=y\nCONFIG_ARCH_HAS_SETUP_DMA_OPS=y\nCONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y\nCONFIG_ARCH_HAS_DMA_PREP_COHERENT=y\nCONFIG_SWIOTLB=y\nCONFIG_DMA_RESTRICTED_POOL=y\nCONFIG_DMA_NONCOHERENT_MMAP=y\nCONFIG_DMA_COHERENT_POOL=y\nCONFIG_DMA_REMAP=y\nCONFIG_DMA_DIRECT_REMAP=y\nCONFIG_DMA_CMA=y\n# CONFIG_DMA_PERNUMA_CMA is not set\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=8\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=4\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_GENERIC_VDSO_TIME_NS=y\nCONFIG_FONT_SUPPORT=y\nCONFIG_FONTS=y\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\n# CONFIG_FONT_6x11 is not set\n# CONFIG_FONT_7x14 is not set\n# CONFIG_FONT_PEARL_8x8 is not set\n# CONFIG_FONT_ACORN_8x8 is not set\n# CONFIG_FONT_MINI_4x6 is not set\n# CONFIG_FONT_6x10 is not set\n# CONFIG_FONT_10x18 is not set\n# CONFIG_FONT_SUN8x16 is not set\n# CONFIG_FONT_SUN12x22 is not set\nCONFIG_FONT_TER16x32=y\n# CONFIG_FONT_6x8 is not set\nCONFIG_SG_POOL=y\nCONFIG_ARCH_STACKWALK=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\nCONFIG_STACKTRACE_BUILD_ID=y\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\nCONFIG_DYNAMIC_DEBUG_CORE=y\nCONFIG_SYMBOLIC_ERRNAME=y\nCONFIG_DEBUG_BUGVERBOSE=y\n# end of printk and dmesg options\n\nCONFIG_AS_HAS_NON_CONST_LEB128=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_DEBUG_INFO=y\n# CONFIG_DEBUG_INFO_REDUCED is not set\n# CONFIG_DEBUG_INFO_COMPRESSED is not set\n# CONFIG_DEBUG_INFO_SPLIT is not set\nCONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\n# CONFIG_DEBUG_INFO_BTF is not set\n# CONFIG_GDB_SCRIPTS is not set\nCONFIG_FRAME_WARN=2048\n# CONFIG_STRIP_ASM_SYMS is not set\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=\"\"\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\nCONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_KCSAN_COMPILER=y\n# end of Generic Kernel Debugging Instruments\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Memory Debugging\n#\nCONFIG_PAGE_EXTENSION=y\n# CONFIG_DEBUG_PAGEALLOC is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_PINNER is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_PAGE_REF is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\nCONFIG_ARCH_HAS_DEBUG_WX=y\n# CONFIG_DEBUG_WX is not set\nCONFIG_GENERIC_PTDUMP=y\n# CONFIG_PTDUMP_DEBUGFS is not set\n# CONFIG_SPECULATIVE_PAGE_FAULT_STATS is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\nCONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y\n# CONFIG_DEBUG_VM is not set\n# CONFIG_DEBUG_VM_PGTABLE is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\nCONFIG_DEBUG_MEMORY_INIT=y\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_SW_TAGS=y\nCONFIG_HAVE_ARCH_KASAN_HW_TAGS=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_KASAN_SW_TAGS=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\nCONFIG_PANIC_ON_OOPS=y\nCONFIG_PANIC_ON_OOPS_VALUE=1\nCONFIG_PANIC_TIMEOUT=5\nCONFIG_LOCKUP_DETECTOR=y\nCONFIG_SOFTLOCKUP_DETECTOR=y\nCONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y\nCONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\nCONFIG_SCHED_DEBUG=y\nCONFIG_SCHED_INFO=y\nCONFIG_SCHEDSTATS=y\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\n# CONFIG_DEBUG_PREEMPT is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_RWSEMS is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\nCONFIG_DEBUG_ATOMIC_SLEEP=y\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# CONFIG_CSD_LOCK_WAIT_DEBUG is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\nCONFIG_DEBUG_LIST=y\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\nCONFIG_BUG_ON_DATA_CORRUPTION=y\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_TRACING=y\nCONFIG_GENERIC_TRACER=y\nCONFIG_TRACING_SUPPORT=y\nCONFIG_FTRACE=y\n# CONFIG_BOOTTIME_TRACING is not set\nCONFIG_FUNCTION_TRACER=y\n# CONFIG_FUNCTION_GRAPH_TRACER is not set\nCONFIG_DYNAMIC_FTRACE=y\nCONFIG_DYNAMIC_FTRACE_WITH_REGS=y\n# CONFIG_FUNCTION_PROFILER is not set\n# CONFIG_STACK_TRACER is not set\n# CONFIG_IRQSOFF_TRACER is not set\n# CONFIG_PREEMPT_TRACER is not set\n# CONFIG_SCHED_TRACER is not set\n# CONFIG_HWLAT_TRACER is not set\n# CONFIG_OSNOISE_TRACER is not set\n# CONFIG_TIMERLAT_TRACER is not set\nCONFIG_FTRACE_SYSCALLS=y\n# CONFIG_TRACER_SNAPSHOT is not set\nCONFIG_BRANCH_PROFILE_NONE=y\n# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set\n# CONFIG_PROFILE_ALL_BRANCHES is not set\n# CONFIG_BLK_DEV_IO_TRACE is not set\nCONFIG_KPROBE_EVENTS=y\n# CONFIG_KPROBE_EVENTS_ON_NOTRACE is not set\nCONFIG_UPROBE_EVENTS=y\nCONFIG_BPF_EVENTS=y\nCONFIG_DYNAMIC_EVENTS=y\nCONFIG_PROBE_EVENTS=y\nCONFIG_FTRACE_MCOUNT_RECORD=y\nCONFIG_FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY=y\n# CONFIG_SYNTH_EVENTS is not set\n# CONFIG_HIST_TRIGGERS is not set\n# CONFIG_TRACE_EVENT_INJECT is not set\n# CONFIG_TRACEPOINT_BENCHMARK is not set\n# CONFIG_RING_BUFFER_BENCHMARK is not set\n# CONFIG_TRACE_EVAL_MAP_FILE is not set\n# CONFIG_FTRACE_RECORD_RECURSION is not set\n# CONFIG_FTRACE_STARTUP_TEST is not set\n# CONFIG_RING_BUFFER_STARTUP_TEST is not set\n# CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is not set\n# CONFIG_PREEMPTIRQ_DELAY_TEST is not set\n# CONFIG_KPROBE_EVENT_GEN_TEST is not set\n# CONFIG_SAMPLES is not set\n# CONFIG_STRICT_DEVMEM is not set\n\n#\n# arm64 Debugging\n#\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_ARM64_RELOC_TEST is not set\n# CONFIG_CORESIGHT is not set\n# end of arm64 Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FUNCTION_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\nCONFIG_KCOV=y\n# CONFIG_KCOV_ENABLE_COMPARISONS is not set\n# CONFIG_KCOV_INSTRUMENT_ALL is not set\nCONFIG_KCOV_IRQ_AREA_SIZE=0x40000\nCONFIG_RUNTIME_TESTING_MENU=y\n# CONFIG_LKDTM is not set\n# CONFIG_TEST_MIN_HEAP is not set\n# CONFIG_TEST_DIV64 is not set\n# CONFIG_KPROBES_SANITY_TEST is not set\n# CONFIG_BACKTRACE_SELF_TEST is not set\n# CONFIG_RBTREE_TEST is not set\n# CONFIG_REED_SOLOMON_TEST is not set\n# CONFIG_INTERVAL_TREE_TEST is not set\n# CONFIG_PERCPU_TEST is not set\n# CONFIG_ATOMIC64_SELFTEST is not set\n# CONFIG_TEST_HEXDUMP is not set\n# CONFIG_STRING_SELFTEST is not set\n# CONFIG_TEST_STRING_HELPERS is not set\n# CONFIG_TEST_STRSCPY is not set\n# CONFIG_TEST_KSTRTOX is not set\n# CONFIG_TEST_PRINTF is not set\n# CONFIG_TEST_SCANF is not set\n# CONFIG_TEST_BITMAP is not set\n# CONFIG_TEST_UUID is not set\n# CONFIG_TEST_XARRAY is not set\n# CONFIG_TEST_OVERFLOW is not set\n# CONFIG_TEST_RHASHTABLE is not set\n# CONFIG_TEST_HASH is not set\n# CONFIG_TEST_IDA is not set\n# CONFIG_TEST_LKM is not set\n# CONFIG_TEST_BITOPS is not set\n# CONFIG_TEST_VMALLOC is not set\n# CONFIG_TEST_USER_COPY is not set\n# CONFIG_TEST_BPF is not set\n# CONFIG_TEST_BLACKHOLE_DEV is not set\n# CONFIG_FIND_BIT_BENCHMARK is not set\n# CONFIG_TEST_FIRMWARE is not set\n# CONFIG_TEST_SYSCTL is not set\n# CONFIG_TEST_UDELAY is not set\n# CONFIG_TEST_STATIC_KEYS is not set\n# CONFIG_TEST_KMOD is not set\n# CONFIG_TEST_MEMCAT_P is not set\n# CONFIG_TEST_STACKINIT is not set\n# CONFIG_TEST_MEMINIT is not set\n# CONFIG_TEST_FREE_PAGES is not set\nCONFIG_ARCH_USE_MEMTEST=y\n# CONFIG_MEMTEST is not set\n# end of Kernel Testing and Coverage\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case ${TARGET_ARCH} in\n      aarch64)\n        # TARGET_CPU:\n        # arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d\n        # arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c\n        # arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t\n        # arm720t arm740t strongarm strongarm110 strongarm1100\n        # strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t\n        # arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi\n        # arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e\n        # arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s\n        # arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4\n        # cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312.\n        #\n        TARGET_CPU=\"cortex-a73.cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc+fp+simd\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"neon-fp-armv8\"\n        ;;\n    esac\n\n  # Bootloader to use (syslinux / u-boot / atv-bootloader / bcm2835-bootloader)\n    BOOTLOADER=\"u-boot\"\n\n  # Kernel target\n    KERNEL_TARGET=\"Image.lzo\"\n\n  # Kernel extra targets to build\n    KERNEL_UBOOT_EXTRA_TARGET=\"\"\n\n  # Build Android kernel image using mkbootimg\n    BUILD_ANDROID_BOOTIMG=\"yes\"\n\n  # Additional options to be passed to Android mkbootimg\n    ANDROID_BOOTIMG_OPTIONS=\"--base 0x0 --kernel_offset 0x1080000\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"dtbs\"\n\n  # Additional kernel dependencies\n    KERNEL_EXTRA_DEPENDS_TARGET=\"\"\n\n  # Kernel to use. values can be:\n  # default:  default mainline kernel\n    LINUX=\"amlogic-5.15\"\n\n  # kernel image name\n    KERNEL_NAME=\"kernel.img\"\n    \n  # CODENAME BASED KERNEL\n  OS_CODENAME=\"Piers\"\n\n################################################################################\n# setup build defaults\n################################################################################\n\n  # Project CFLAGS\n    PROJECT_CFLAGS=\"\"\n\n  # SquashFS compression method (gzip / lzo / xz)\n    SQUASHFS_COMPRESSION=\"lzo\"\n\n################################################################################\n# setup project defaults\n################################################################################\n\n  # build and install ALSA Audio support (yes / no)\n    ALSA_SUPPORT=\"yes\"\n\n  # OpenGL(X) implementation to use (no / Mesa)\n    OPENGL=\"no\"\n\n  # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q / opengl-meson)\n    OPENGLES=\"opengl-meson\"\n\n  # include uvesafb support (yes / no)\n    UVESAFB_SUPPORT=\"no\"\n\n  # Displayserver to use (x11 / no)\n    DISPLAYSERVER=\"no\"\n\n  # Windowmanager to use (fluxbox / none)\n    WINDOWMANAGER=\"none\"\n\n  # Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia,nouveau)\n  # Space separated list is supported,\n  # e.g. GRAPHIC_DRIVERS=\"i915 i965 r300 r600 radeonsi nvidia nouveau\"\n    GRAPHIC_DRIVERS=\"\"\n\n  # Use a vendor specific KODI repo\n    KODI_VENDOR=\"amlogic-5.15\"\n\n  # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap / libamcodec)\n    KODIPLAYER_DRIVER=\"libamcodec\"\n\n  # Modules to install in initramfs for early boot\n    INITRAMFS_MODULES=\"\"\n\n  # additional drivers to install:\n  # for a list of additinoal drivers see packages/linux-drivers\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_DRIVERS=\"DRIVER1 DRIVER2\"\n  ADDITIONAL_DRIVERS=\"gpu-aml openvfd-driver media_modules-aml wifi_dummy-aml ap6xxx-aml\n                      aic8800-sdio RTW88 RTL8189FS RTL8852BE-aml RTL8723DS-aml\n                      RTL8851BU RTL8852BS-aml mt76 mt7668-wifi-bt w1-aml\"\n      \n\n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware-aml\n            rtkbt-firmware-aml qca-firmware-aml\"\n\n  # build and install ATV IR remote support (yes / no)\n    ATVCLIENT_SUPPORT=\"no\"\n\n  # Amlogic IR remote support (yes / no)\n    AMREMOTE_SUPPORT=\"yes\"\n\n  # build and install iSCSI support - iscsistart (yes / no)\n    ISCSI_SUPPORT=\"no\"\n\n  # build with installer (yes / no)\n    INSTALLER_SUPPORT=\"no\"\n\n  # build and install driver addons (yes / no)\n    DRIVER_ADDONS_SUPPORT=\"no\"\n\n  # driver addons to install:\n  # for a list of additinoal drivers see packages/linux-driver-addons\n  # Space separated list is supported,\n    DRIVER_ADDONS=\"\"\n\n  # additional packages to install:\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_PACKAGES=\"PACKAGE1 PACKAGE2\"\n    ADDITIONAL_PACKAGES=\"u-boot-script dtc CoreELEC-Debug-Scripts inject_bl301 ceemmc\n                       nfs-utils dtb-xml megatools tmate parse-android-dynparts\"\n\n  # add OOTB support for IR remote\n  # IR_REMOTE_KEYMAPS+=\"\"\n\n  # build with entware installer\n    ENTWARE_SUPPORT=\"yes\"\n    ENTWARE_ARCH=\"aarch64-k3.10\"\n\n  # CoreELEC Subdevices #Khadas_VIM4 Khadas_VIM1S Odroid_C4 Odroid_N2 Radxa_Zero Radxa_Zero2 Alta Solitude\n    SUBDEVICES=\"Khadas_VIM4 Khadas_VIM1S Odroid_C4 Odroid_N2 Radxa_Zero Radxa_Zero2 Alta Solitude\"\n\n  # TEE supported SoC\n    TEE_SOC=\"S928X A311D2 S905W2 S905X4 S905Y4\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/addon-depends/jsonschema/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"jsonschema\"\nPKG_VERSION=\"4.23.0\"\nPKG_SHA256=\"d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://pypi.org/project/jsonschema/\"\nPKG_URL=\"https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"Python3:host\"\nPKG_LONGDESC=\"An implementation of JSON Schema validation for Python.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_host() {\n  cp -r ${PKG_BUILD}/jsonschema ${TOOLCHAIN}/lib/${PKG_PYTHON_VERSION}/site-packages\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/addon-depends/mbedtls/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"mbedtls\"\nPKG_VERSION=\"3.5.2\"\nPKG_SHA256=\"35890edf1a2c7a7e29eac3118d43302c3e1173e0df0ebaf5db56126dabe5bb05\"\nPKG_LICENSE=\"Apache 2.0\"\nPKG_SITE=\"https://github.com/Mbed-TLS/mbedtls\"\nPKG_URL=\"https://github.com/Mbed-TLS/mbedtls/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain jsonschema:host Jinja2:host\"\nPKG_LONGDESC=\"Mbed TLS is a C library that implements cryptographic primitives, X.509 certificate manipulation and the SSL/TLS and DTLS protocols.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DCMAKE_BUILD_TYPE=Release \\\n\t\t\t                 -DUSE_SHARED_MBEDTLS_LIBRARY=OFF \\\n\t\t\t                 -DUSE_STATIC_MBEDTLS_LIBRARY=ON \\\n\t\t\t                 -DENABLE_TESTING=OFF \\\n\t\t\t                 -DENABLE_PROGRAMS=OFF \\\n\t\t\t                 -DLINK_WITH_PTHREAD=ON \\\n\t\t\t                 -Wno-dev\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/addon-depends/qmdnsengine/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"qmdnsengine\"\nPKG_VERSION=\"0ca80117e853671d909b3cec9e2bdcac85a13b9f\"\nPKG_SHA256=\"3ae288458e3fc1c1e636869aaca0fd5c77bdd6aec6fd4d62217d0f46acd4042c\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/nitroshare/qmdnsengine\"\nPKG_URL=\"https://github.com/nitroshare/qmdnsengine/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain qt-everywhere\"\nPKG_LONGDESC=\"Library provides an implementation of multicast DNS as per RFC 6762.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_SHARED_LIBS=OFF\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/addon-depends/qt-everywhere/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"qt-everywhere\"\nPKG_VERSION=\"5.15.13\"\nPKG_SHA256=\"9550ec8fc758d3d8d9090e261329700ddcd712e2dda97e5fcfeabfac22bea2ca\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://qt-project.org\"\nPKG_URL=\"http://download.qt.io/archive/qt/${PKG_VERSION%.*}/${PKG_VERSION}/single/${PKG_NAME}-opensource-src-${PKG_VERSION}.tar.xz\"\nPKG_DEPENDS_TARGET=\"pcre2 zlib openssl libjpeg-turbo\"\nPKG_SOURCE_DIR=\"${PKG_NAME}-src-${PKG_VERSION}\"\nPKG_LONGDESC=\"A cross-platform application and UI framework\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"-prefix /usr\n                           -sysroot \"${SYSROOT_PREFIX}\"\n                           -hostprefix \"${TOOLCHAIN}\"\n                           -device linux-libreelec-g++\n                           -opensource -confirm-license\n                           -release\n                           -static\n                           -make libs\n                           -force-pkg-config\n                           -openssl-linked\n                           -no-accessibility\n                           -system-sqlite\n                           -no-sql-mysql\n                           -system-zlib\n                           -no-mtdev\n                           -system-libjpeg\n                           -qt-libpng\n                           -no-harfbuzz\n                           -no-libproxy\n                           -system-pcre\n                           -no-glib\n                           -silent\n                           -no-cups\n                           -no-iconv\n                           -no-evdev\n                           -no-tslib\n                           -no-icu\n                           -no-strip\n                           -no-fontconfig\n                           -dbus\n                           -no-opengl\n                           -no-libudev\n                           -no-libinput\n                           -no-eglfs\n                           -skip qt3d\n                           -skip qtactiveqt\n                           -skip qtandroidextras\n                           -skip qtcanvas3d\n                           -skip qtconnectivity\n                           -skip qtdeclarative\n                           -skip qtdoc\n                           -skip qtgraphicaleffects\n                           -skip qtimageformats\n                           -skip qtlocation\n                           -skip qtmacextras\n                           -skip qtmultimedia\n                           -skip qtquickcontrols\n                           -skip qtquickcontrols2\n                           -skip qtscript\n                           -skip qtsensors\n                           -skip qtserialbus\n                           -skip qtsvg\n                           -skip qttranslations\n                           -skip qtwayland\n                           -skip qtwebchannel\n                           -skip qtwebengine\n                           -skip qtwebsockets\n                           -skip qtwebview\n                           -skip qtwinextras\n                           -skip qtx11extras\n                           -skip qtxmlpatterns\"\n\npost_unpack() {\n  # HOST_CFLAGS_DBUS is set to SYSROOT_PREFIX/usr/include\n  # from libsystemd.pc which is required by dbus-1.pc\n  # this fails to build some host tools\n  # with -no-dbus this workaround is not needed\n  sed -i \"s|QT_HOST_CFLAGS_DBUS|QT_HOST_CFLAGS_DBUS_IGNORED|\" \\\n    ${PKG_BUILD}/qtbase/configure.json\n}\n\nconfigure_target() {\n  QMAKE_CONF_DIR=\"qtbase/mkspecs/devices/linux-libreelec-g++\"\n\n  cd ..\n  mkdir -p ${QMAKE_CONF_DIR}\n\n  cat >\"${QMAKE_CONF_DIR}/qmake.conf\" <<EOF\nMAKEFILE_GENERATOR      = UNIX\nCONFIG                 += incremental\nQMAKE_INCREMENTAL_STYLE = sublib\ninclude(../../common/linux.conf)\ninclude(../../common/gcc-base-unix.conf)\ninclude(../../common/g++-unix.conf)\nload(device_config)\nQMAKE_CC         = ${CC}\nQMAKE_CXX        = ${CXX}\nQMAKE_LINK       = ${CXX}\nQMAKE_LINK_SHLIB = ${CXX}\nQMAKE_AR         = ${AR} cqs\nQMAKE_OBJCOPY    = ${OBJCOPY}\nQMAKE_NM         = ${NM} -P\nQMAKE_STRIP      = ${STRIP}\nQMAKE_CFLAGS     = ${CFLAGS}\nQMAKE_CXXFLAGS   = ${CXXFLAGS}\nQMAKE_LFLAGS     = ${LDFLAGS}\nload(qt_config)\nEOF\n\n  cat >\"${QMAKE_CONF_DIR}/qplatformdefs.h\" <<EOF\n#include \"../../linux-g++/qplatformdefs.h\"\nEOF\n\n  unset CC CXX LD RANLIB AR AS CPPFLAGS CFLAGS LDFLAGS CXXFLAGS\n  ./configure ${PKG_CONFIGURE_OPTS_TARGET}\n}\n\npost_makeinstall_target() {\n  # Qt installs directly to $SYSROOT_PREFIX so don't rely on scripts/build fixing this up\n  # PKG_ORIG_SYSROOT_PREFIX will be undefined when performing a legacy build\n  sed -e \"s:\\(['= ]\\)/usr:\\\\1${PKG_ORIG_SYSROOT_PREFIX:-${SYSROOT_PREFIX}}/usr:g\" -i \"${PKG_ORIG_SYSROOT_PREFIX:-${SYSROOT_PREFIX}}/usr/lib\"/libQt*.la\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/addon-depends/qt-everywhere/patches/xkb_fix_build_with_libxkbcommon_1_6_0_and_later.patch",
    "content": "From: Liang Qi <liang.qi@qt.io>\nDate: Tue, 10 Oct 2023 12:08:48 +0000 (+0200)\nSubject: xkb: fix build with libxkbcommon 1.6.0 and later\nX-Git-Url: https://codereview.qt-project.org/gitweb?p=qt%2Fqtbase.git;a=commitdiff_plain;h=8af35d27e8f02bbb99aef4ac495ed406e50e3cca;hp=260ac1891ac87fa9967be11debbbeba7e3f1e03d\n\nxkb: fix build with libxkbcommon 1.6.0 and later\n\nA few XKB_KEY_dead_* defines got removed from 1.6.0. See also\nhttps://github.com/xkbcommon/libxkbcommon/blob/6073565903488cb5b9a8d37fdc4a7c2f9d7ad04d/NEWS#L9-L14\nhttps://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/70/diffs?commit_id=cb44799b72f611eb4c9d7cc185bc3b09e070be08\n\nPick-to: 6.6 6.5 6.2 5.15\nFixes: QTBUG-117950\nChange-Id: I55861868f2bb29c553d68365fa9b9b6ed01c9aea\nReviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>\n---\n\ndiff --git a/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp b/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp\nindex 26d87c5ff599..7b611790c677 100644\n--- a/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp\n+++ b/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp\n@@ -237,10 +237,14 @@ static constexpr const auto KeyTbl = qMakeArray(\n         Xkb2Qt<XKB_KEY_dead_small_schwa,        Qt::Key_Dead_Small_Schwa>,\n         Xkb2Qt<XKB_KEY_dead_capital_schwa,      Qt::Key_Dead_Capital_Schwa>,\n         Xkb2Qt<XKB_KEY_dead_greek,              Qt::Key_Dead_Greek>,\n+/* The following four XKB_KEY_dead keys got removed in libxkbcommon 1.6.0\n+   The define check is kind of version check here. */\n+#ifdef XKB_KEY_dead_lowline\n         Xkb2Qt<XKB_KEY_dead_lowline,            Qt::Key_Dead_Lowline>,\n         Xkb2Qt<XKB_KEY_dead_aboveverticalline,  Qt::Key_Dead_Aboveverticalline>,\n         Xkb2Qt<XKB_KEY_dead_belowverticalline,  Qt::Key_Dead_Belowverticalline>,\n         Xkb2Qt<XKB_KEY_dead_longsolidusoverlay, Qt::Key_Dead_Longsolidusoverlay>,\n+#endif\n\n         // Special keys from X.org - This include multimedia keys,\n         // wireless/bluetooth/uwb keys, special launcher keys, etc.\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/aml-vnc/changelog.txt",
    "content": "22.0.0\n- add missing service alias\n- hide password on settings page\n\n21.0.6\n- bump package to 1.2.0\n\n21.0.5\n- replace package source git repository\n- creating a source directory with the necessary files and their modifications\n- modify the service start script to be compatible with the new binary\n- add Hungarian translation of the add-on\n- restart service on settings change\n\n21.0.4\n- performance fixes\n\n21.0.3\n- fix resolution issue when used other than native\n\n21.0.2\n- add option to set desktop name (hostname by default)\n\n21.0.1\n- make IPv6 listen port consistent with IPv4 port\n\n20.1.0\n- fix password authentication when building with openssl >=3.0.0\n\n20.0.104\n- update language strings file\n\n103\n- improvements\n\n102\n- libvncserver bump\n\n101\n- CoreELEC rebrand\n\n100\n- Initial release\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/aml-vnc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"aml-vnc\"\nPKG_VERSION=\"1.2.0\"\nPKG_SHA256=\"38009d0ea84868c7e077eb7594f2808bf5acdae3b7e691cb73fb800e9489d064\"\nPKG_REV=\"0\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/dtechsrv/aml-vnc-server/\"\nPKG_URL=\"https://github.com/dtechsrv/aml-vnc-server/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libvncserver\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Amlogic VNC server\"\nPKG_LONGDESC=\"Amlogic VNC server is a Virtual Network Computing (VNC) server for Amlogic devices\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Amlogic VNC\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\npre_configure_target() {\n  export CFLAGS+=\" -Wno-stringop-truncation\"\n}\n\nmakeinstall_target() {\n  :\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/{bin,lib}\n  cp -P ${PKG_BUILD}/aml-vnc ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp $(get_build_dir libvncserver)/.${TARGET_NAME}/libvncserver.so.? ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/aml-vnc/source/bin/aml-vnc.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2016-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\n. /etc/profile\n\noe_setup_addon service.aml-vnc\n\nif [ ${AML_VNC_PORT} != \"5900\" ] ; then\n  export VNC_PORT=\"${AML_VNC_PORT}\"\nfi\n\nif [ ${AML_VNC_AUTH} == \"true\" ] ; then\n  export VNC_PASSWORD=\"${AML_VNC_PWD}\"\nfi\n\nif [ ${AML_VNC_STAT} == \"true\" ] ; then\n  export VNC_SERVERNAME=\"${AML_VNC_NAME}\"\nfi\n\nexec aml-vnc\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/aml-vnc/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\nclass Monitor(xbmc.Monitor):\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\nif __name__ == \"__main__\":\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/aml-vnc/source/power.d/aml-vnc.power",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2016-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\n. /etc/profile\n\nSERVICE=\"service.aml-vnc.service\"\n\ncase \"$1\" in\n  pre)\n    if systemctl is-active \"$SERVICE\" &>/dev/null ; then\n      systemctl stop \"$SERVICE\"\n    fi\n    ;;\n  post)\n    if systemctl is-enabled \"$SERVICE\" &>/dev/null ; then\n      systemctl start \"$SERVICE\"\n    fi\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/aml-vnc/source/resources/language/resource.language.en_gb/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: Amlogic VNC Server\n# Addon id: service.aml-vnc\n# Addon Provider: Team CoreELEC\nmsgid \"\"\nmsgstr \"\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\nmsgctxt \"#30000\"\nmsgid \"Server settings\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Port\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"Use authentication\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"Password\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"Use static name instead of hostname\"\nmsgstr \"\"\n\nmsgctxt \"#30005\"\nmsgid \"Name to be displayed\"\nmsgstr \"\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/aml-vnc/source/resources/language/resource.language.hu_hu/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: Amlogic VNC Server\n# Addon id: service.aml-vnc\n# Addon Provider: Team CoreELEC\nmsgid \"\"\nmsgstr \"\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: hu_HU\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\nmsgctxt \"#30000\"\nmsgid \"Server settings\"\nmsgstr \"Szerver beállítások\"\n\nmsgctxt \"#30001\"\nmsgid \"Port\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"Use authentication\"\nmsgstr \"Hitelesítés használata\"\n\nmsgctxt \"#30003\"\nmsgid \"Password\"\nmsgstr \"Jelszó\"\n\nmsgctxt \"#30004\"\nmsgid \"Use static name instead of hostname\"\nmsgstr \"Statikus név használata a hosztnév helyett\"\n\nmsgctxt \"#30005\"\nmsgid \"Name to be displayed\"\nmsgstr \"Megjelenített név\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/aml-vnc/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n    <category label=\"30000\">\n\t\t<setting type=\"lsep\" />\n\t\t<setting id=\"AML_VNC_PORT\" type=\"number\" label=\"30001\" default=\"5900\" />\n\t\t<setting id=\"AML_VNC_AUTH\" type=\"bool\" label=\"30002\" default=\"true\" />\n\t\t<setting id=\"AML_VNC_PWD\" type=\"text\" label=\"30003\" option=\"hidden\" default=\"coreelec\" visible=\"eq(-1,true)\" />\n\t\t<setting id=\"AML_VNC_STAT\" type=\"bool\" label=\"30004\" default=\"false\" />\n\t\t<setting id=\"AML_VNC_NAME\" type=\"text\" label=\"30005\" default=\"CoreELEC\" enable=\"eq(-1,true)\" />\n    </category>\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/aml-vnc/source/settings-default.xml",
    "content": "<settings>\n    <setting id=\"AML_VNC_PORT\" value=\"5900\" />\n    <setting id=\"AML_VNC_AUTH\" value=\"true\" />\n    <setting id=\"AML_VNC_PWD\" value=\"coreelec\" />\n    <setting id=\"AML_VNC_STAT\" value=\"false\" />\n    <setting id=\"AML_VNC_NAME\" value=\"CoreELEC\" />\n</settings>\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/aml-vnc/source/system.d/service.aml-vnc.service",
    "content": "[Unit]\nDescription=aml-vnc\nAfter=graphical.target\n\n[Service]\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.aml-vnc/bin/aml-vnc.start\"\nTimeoutStopSec=1\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=kodi.target\nAlias=aml-vnc.service\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/homatics-leds/LICENSE.txt",
    "content": "This program is free software: you can redistribute it and/or modify\r\nit under the terms of the GNU General Public License as published by\r\nthe Free Software Foundation, either version 3 of the License, or\r\n(at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful,\r\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\nGNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License\r\nalong with this program.  If not, see <http://www.gnu.org/licenses/>.\r\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/homatics-leds/addon.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"@PKG_ADDON_ID@\"\n       name=\"@ADDON_NAME@\"\n       version=\"@ADDON_VERSION@\"\n       provider-name=\"@PROVIDER_NAME@\">\n  <requires>\n    <import addon=\"xbmc.python\" version=\"3.0.0\"/>\n  </requires>\n  <extension point=\"xbmc.python.pluginsource\" library=\"default.py\">\n    <provides>executable</provides>\n  </extension>\n  <extension point=\"xbmc.service\" library=\"service.py\">\n    <provides/>\n  </extension>\n  <extension point=\"xbmc.addon.metadata\">\n    <summary lang=\"de_DE\">Homatics LED Kit Modus</summary>\n    <summary lang=\"en_GB\">Homatics LED Kit mode</summary>\n    <summary lang=\"hu_HU\">Homatics LED Kit üzemmód</summary>\n    <description lang=\"de_DE\">\nMit diesem Addon können die LEDs in den Knight-Rider-Modus gesetzt werden, oder ihre Farbe kann einfach angepasst werden...\nDanke an vpeter und FoLeY für die Unterstützung...\nhex grün 122e04, blau 101010, lila 800080, gelb ff4600, tiefblau 0d00bf,\nmagenta d8007a, orange f50e00, ff0000 rot, 00000 keine Farbe\n    </description>\n    <description lang=\"en_GB\">\nWith this addon, the LEDs can be set to knight rider mode, or their color can be simply customized...\nThanks to vpeter and FoLeY for the support...\nhex green 122e04, blue 101010, purple 800080, yellow ff4600, deepblue 0d00bf,\nmagenta d8007a, orange f50e00, ff0000 red, 00000 no color\n    </description>\n    <description lang=\"hu_HU\">\nA kiegészítővel beállíthatóak a ledek knight Rider módba, vagy simán testreszabható a színük ...\nKöszönet vpeter-nek, és FoLeY-nak a támogatásért...\nhex green 122e04, blue 101010, purple 800080, yellow ff4600,\ndeepblue 0d00bf, magenta d8007a, orange f50e00, ff0000 red,\n00000 no color\n    </description>\n    <disclaimer>\n    </disclaimer>\n    <platform>all</platform>\n    <news>\n21.0.2\n- added german translation\n21.0.1\n- added language strings\n    </news>\n    <assets>\n      <icon>resources/icon.png</icon>\n      <fanart>resources/fanart.jpg</fanart>\n    </assets>\n  </extension>\n</addon>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/homatics-leds/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"homatics-leds\"\nPKG_VERSION=\"0.1\"\nPKG_SHA256=\"\"\nPKG_REV=\"2\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Homatics LED Kit mode\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Homatics LEDs\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/resources\n\n  cp ${PKG_DIR}/LICENSE.txt ${ADDON_BUILD}/${PKG_ADDON_ID}\n  cp ${PKG_DIR}/addon.xml ${ADDON_BUILD}/${PKG_ADDON_ID}\n\n  # set only version (revision will be added by buildsystem)\n  sed -e \"s|@ADDON_VERSION@|${ADDON_VERSION}|g\" \\\n      -i ${ADDON_BUILD}/${PKG_ADDON_ID}/addon.xml\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/homatics-leds/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nimport urllib.request, urllib.parse, urllib.error\nimport urllib.parse\nimport sys\nimport xbmc\nimport xbmcgui\nimport xbmcplugin\nimport xbmcaddon\nimport os\nimport subprocess\n\nADDON_ID = 'service.homatics-leds'\naddon = xbmcaddon.Addon(ADDON_ID)\n\nbase_url = sys.argv[0]\naddon_handle = int(sys.argv[1])\nargs = urllib.parse.parse_qs(sys.argv[2][1:])\n\ndef build_url(query):\n  return base_url + '?' + urllib.parse.urlencode(query)\n\naddon_icon = 'special://home/addons/service.homatics-leds/resources/icon.png'\n\naddon_icon1 = 'special://home/addons/service.homatics-leds/resources/icon1.png'\n\naddon_icon2 = 'special://home/addons/service.homatics-leds/resources/icon2.png'\n\naddon_icon3 = 'special://home/addons/service.homatics-leds/resources/icon3.png'\n\naddon_icon4 = 'special://home/addons/service.homatics-leds/resources/icon4.png'\n\naddon_icon5 = 'special://home/addons/service.homatics-leds/resources/icon5.png'\n\naddon_icon6 = 'special://home/addons/service.homatics-leds/resources/icon6.png'\n\naddon_icon7 = 'special://home/addons/service.homatics-leds/resources/icon7.png'\n\naddon_icon8 = 'special://home/addons/service.homatics-leds/resources/icon8.png'\n\naddon_icon9 = 'special://home/addons/service.homatics-leds/resources/icon9.png'\n\nmode = args.get('mode', None)\n\nif mode is None:\n  url = build_url({'mode': 'red', 'foldername': 'LEDs red'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32009))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon1, 'thumb' : addon_icon1})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'blue', 'foldername': 'LEDs blue'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32010))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon2, 'thumb' : addon_icon2})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'green', 'foldername': 'LEDs green'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32011))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon3, 'thumb' : addon_icon3})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'purple', 'foldername': 'LEDs purple'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32012))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon4, 'thumb' : addon_icon4})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'yellow', 'foldername': 'LEDs yellow'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32013))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon5, 'thumb' : addon_icon5})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'deepblue', 'foldername': 'LEDs deepblue'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32014))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon6, 'thumb' : addon_icon6})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'magenta', 'foldername': 'LEDs magenta'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32015))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon7, 'thumb' : addon_icon7})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'orange', 'foldername': 'LEDs orange'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32016))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon8, 'thumb' : addon_icon8})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'purpleN', 'foldername': 'LEDs straight purple'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32017))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon9, 'thumb' : addon_icon9})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  xbmcplugin.endOfDirectory(addon_handle)\nelif mode[0] == 'red' or mode[0] == 'orange' or mode[0] == 'green' or mode[0] == 'magenta' or mode[0] == 'deepblue' or mode[0] == 'blue' or mode[0] == 'purple' or mode[0] == 'yellow':\n  xbmc.log('mode[0] %s' % mode[0], level=xbmc.LOGERROR)\n  addon.setSetting('strip_color', mode[0])\n  addon.setSetting('solid_color_type_on', 'name')\n  addon.setSetting('solid_effect', 'effect')\n\n  xbmc.executeJSONRPC('{\"jsonrpc\":\"2.0\",\"method\":\"Addons.SetAddonEnabled\",\"id\":8,\"params\":{\"addonid\":\"%s\",\"enabled\":false}}'% ADDON_ID)\n  xbmc.sleep(2000)\n  xbmc.executeJSONRPC('{\"jsonrpc\":\"2.0\",\"method\":\"Addons.SetAddonEnabled\",\"id\":8,\"params\":{\"addonid\":\"%s\",\"enabled\":true}}'% ADDON_ID)\nelif mode[0] == 'purpleN':\n  xbmc.log('mode[0] %s' % 'purpleN', level=xbmc.LOGERROR)\n  addon.setSetting('strip_color', 'purple')\n  addon.setSetting('solid_color_type_on', 'name')\n  addon.setSetting('solid_effect', 'solid')\n\n  xbmc.executeJSONRPC('{\"jsonrpc\":\"2.0\",\"method\":\"Addons.SetAddonEnabled\",\"id\":8,\"params\":{\"addonid\":\"%s\",\"enabled\":false}}'% ADDON_ID)\n  xbmc.sleep(2000)\n  xbmc.executeJSONRPC('{\"jsonrpc\":\"2.0\",\"method\":\"Addons.SetAddonEnabled\",\"id\":8,\"params\":{\"addonid\":\"%s\",\"enabled\":true}}'% ADDON_ID)\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/homatics-leds/source/resources/language/resource.language.de_de/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: Homatics LED setup\n# Addon id: service.homatics-leds\n# Addon Provider: Team CoreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#32000\"\nmsgid \"LED\"\nmsgstr \"\"\n\nmsgctxt \"#32001\"\nmsgid \"Effect color\"\nmsgstr \"Farbe des Effekts\"\n\nmsgctxt \"#32002\"\nmsgid \"Effect or solid\"\nmsgstr \"Effekt oder Einfarbig\"\n\nmsgctxt \"#32003\"\nmsgid \"Color by name or hex\"\nmsgstr \"Farbe nach Name oder HEX\"\n\nmsgctxt \"#32004\"\nmsgid \"Solid color On\"\nmsgstr \"LED-Farbe: Eingeschaltet\"\n\nmsgctxt \"#32005\"\nmsgid \"Solid color Off\"\nmsgstr \"LED-Farbe: Ausgeschaltet\"\n\nmsgctxt \"#32006\"\nmsgid \"Solid color Suspend\"\nmsgstr \"LED-Farbe: Schlafmodus\"\n\nmsgctxt \"#32007\"\nmsgid \"Number of LEDs On\"\nmsgstr \"Anzahl der eingeschalteten LEDs\"\n\nmsgctxt \"#32009\"\nmsgid \"Set red Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Rot\"\n\nmsgctxt \"#32010\"\nmsgid \"Set blue Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Blau\"\n\nmsgctxt \"#32011\"\nmsgid \"Set green Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Grün\"\n\nmsgctxt \"#32012\"\nmsgid \"Set purple Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Lila\"\n\nmsgctxt \"#32013\"\nmsgid \"Set yellow Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Gelb\"\n\nmsgctxt \"#32014\"\nmsgid \"Set deepblue Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Tiefblau\"\n\nmsgctxt \"#32015\"\nmsgid \"Set magenta Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Magenta\"\n\nmsgctxt \"#32016\"\nmsgid \"Set orange Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Orange\"\n\nmsgctxt \"#32017\"\nmsgid \"Set straight purple color\"\nmsgstr \"Einfarbige Farbe: Lila\""
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/homatics-leds/source/resources/language/resource.language.en_gb/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: Homatics LED setup\n# Addon id: service.homatics-leds\n# Addon Provider: Team CoreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#32000\"\nmsgid \"LED\"\nmsgstr \"\"\n\nmsgctxt \"#32001\"\nmsgid \"Effect color\"\nmsgstr \"\"\n\nmsgctxt \"#32002\"\nmsgid \"Effect or solid\"\nmsgstr \"\"\n\nmsgctxt \"#32003\"\nmsgid \"Color by name or hex\"\nmsgstr \"\"\n\nmsgctxt \"#32004\"\nmsgid \"Solid color On\"\nmsgstr \"\"\n\nmsgctxt \"#32005\"\nmsgid \"Solid color Off\"\nmsgstr \"\"\n\nmsgctxt \"#32006\"\nmsgid \"Solid color Suspend\"\nmsgstr \"\"\n\nmsgctxt \"#32007\"\nmsgid \"Number of LEDs On\"\nmsgstr \"\"\n\nmsgctxt \"#32009\"\nmsgid \"Set red Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32010\"\nmsgid \"Set blue Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32011\"\nmsgid \"Set green Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32012\"\nmsgid \"Set purple Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32013\"\nmsgid \"Set yellow Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32014\"\nmsgid \"Set deepblue Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32015\"\nmsgid \"Set magenta Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32016\"\nmsgid \"Set orange Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32017\"\nmsgid \"Set straight purple color\"\nmsgstr \"\""
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/homatics-leds/source/resources/language/resource.language.hu_hu/strings.po",
    "content": " Kodi Media Center language file\n# Addon Name: Homatics LED setup\n# Addon id: service.homatics-leds\n# Addon Provider: Team CoreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#32000\"\nmsgid \"LED\"\nmsgstr \"\"\n\nmsgctxt \"#32001\"\nmsgid \"Effect color\"\nmsgstr \"Ledek színe\"\n\nmsgctxt \"#32002\"\nmsgid \"Effect or solid\"\nmsgstr \"Effekt vagy egyszerű szín\"\n\nmsgctxt \"#32003\"\nmsgid \"Color by name or hex\"\nmsgstr \"Szín neve vagy hex kód\"\n\nmsgctxt \"#32004\"\nmsgid \"Solid color On\"\nmsgstr \"Led színe: box bekapcsolva\"\n\nmsgctxt \"#32005\"\nmsgid \"Solid color Off\"\nmsgstr \"Led színe: box kikapcsolva\"\n\nmsgctxt \"#32006\"\nmsgid \"Solid color Suspend\"\nmsgstr \"Led színe: box alvó állapot\"\n\nmsgctxt \"#32007\"\nmsgid \"Number of LEDs On\"\nmsgstr \"Ledek száma\"\n\nmsgctxt \"#32009\"\nmsgid \"Set red Knight Rider effect\"\nmsgstr \"Vörös Knight rider effekt beállítása\"\n\nmsgctxt \"#32010\"\nmsgid \"Set blue Knight Rider effect\"\nmsgstr \"Kék Knight rider effekt\"\n\nmsgctxt \"#32011\"\nmsgid \"Set green Knight Rider effect\"\nmsgstr \"Zöld Knight rider effekt\"\n\nmsgctxt \"#32012\"\nmsgid \"Set purple Knight Rider effect\"\nmsgstr \"Lila Knight rider effekt\"\n\nmsgctxt \"#32013\"\nmsgid \"Set yellow Knight Rider effect\"\nmsgstr \"Sárga Knight rider effekt\"\n\nmsgctxt \"#32014\"\nmsgid \"Set deepblue Knight Rider effect\"\nmsgstr \"Sötétkék Knight rider effekt\"\n\nmsgctxt \"#32015\"\nmsgid \"Set magenta Knight Rider effect\"\nmsgstr \"Magenta Knight rider effekt\"\n\nmsgctxt \"#32016\"\nmsgid \"Set orange Knight Rider effect\"\nmsgstr \"Narancs Knight rider effekt\"\n\nmsgctxt \"#32017\"\nmsgid \"Set straight purple color\"\nmsgstr \"Állíts be sima lila színt\""
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/homatics-leds/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n    <category label=\"32000\">\n\t\t<setting type=\"lsep\" />\n\t\t<setting label=\"32001\" type=\"labelenum\" id=\"strip_color\" values=\"red|yellow|purple|blue|deepblue|magenta|green|orange\" default=\"red\"/>\n\t\t<setting label=\"32007\" type=\"labelenum\" id=\"number_leds\" values=\"1|all|8|6|4|2\" default=\"all\"/>\n\t\t<setting label=\"32002\" type=\"labelenum\" id=\"solid_effect\" values=\"effect|solid\" default=\"effect\"/>\n\t\t<setting label=\"32003\" type=\"labelenum\" id=\"solid_color_type_on\" values=\"name|hex\" default=\"name\"/>\n\t\t<setting label=\"32004\" type=\"text\" id=\"color_on\"      default=\"101010\"/>\n\t\t<setting label=\"32005\" type=\"text\" id=\"color_off\"     default=\"000000\"/>\n\t\t<setting label=\"32006\" type=\"text\" id=\"color_suspend\" default=\"800080\"/>\n    </category>\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/homatics-leds/source/service.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nfrom time import sleep\nimport os.path\nfrom threading import Thread, Event\nimport xbmc, xbmcaddon\n\nsysfs = '/sys/devices/platform/soc/fe000000.apb4/fe06c000.i2c/i2c-3/3-003c/leds/bct3236/'\nleds_count = 10  # do not change\ndelay = 90       # in milliseconds\n\n#####################################################################\ndef myLog(msg, level = xbmc.LOGINFO):\n  xbmc.log(addonid + ': ' + msg, level)\n\n#####################################################################\ndef write_sysfs(which, data):\n  if os.path.isfile(sysfs + which):\n    with open(sysfs + which, 'w') as file:\n      file.write(data)\n\n#####################################################################\ndef led_on(pos, pos_min, pos_max, color):\n  out_arr = []\n  out_str = ''\n\n  for i in range(leds_count):\n    out_arr.append('000000')\n\n  if pos >= 0:\n    out_arr[pos] = color\n  elif pos_min >= 0 and pos_max >= 0:\n    for pos in range(pos_min, pos_max + 1):\n      out_arr[pos] = color\n\n  for i in range(leds_count):\n    out_str += out_arr[i] + ' '\n\n  #myLog('out_str: %s' % out_str)\n  write_sysfs('colors', out_str)\n\n#####################################################################\nclass myEffectThread(Thread):\n  def __init__(self, color, run_daemon_mode = False):\n    Thread.__init__(self)\n    self.stop_event = Event()\n    self.running = True\n    self.color = color\n    myLog('myEffectThread color %s' % self.color)\n\n  def stop_event_is_set(self):\n    if self.stop_event.is_set():\n      self.stop_event.clear()\n      self.running = False\n      myLog('myEffectThread stopping')\n      led_on(-1, -1, -1, '')\n      return True\n    else:\n      return False\n\n  def stop(self):\n    self.stop_event.set()\n\n  def stop_and_join(self):\n    self.stop()\n\n    try:\n      self.join()\n    except:\n      pass\n\n  def run(self):\n    while self.running:\n      if self.stop_event_is_set():\n        break\n\n      # to right\n      for i in range(0, leds_count, 1):\n        led_on(i, -1, -1, self.color)\n        sleep(delay / 1000.0)\n\n        if self.stop_event_is_set():\n          break\n\n      sleep(delay / 1000.0)\n\n      # to left\n      for i in range(9, -1, -1):\n        led_on(i, -1, -1, self.color)\n        sleep(delay / 1000.0)\n\n        if self.stop_event_is_set():\n          break\n\n      sleep(delay / 1000.0)\n\n#####################################################################\ndef setup():\n  solid_effect = xbmcaddon.Addon().getSetting('solid_effect')\n  myLog('solid_effect %s' % solid_effect)\n\n  # set on/off/suspend colors and then start effect if active\n  set_solid()\n\n  if solid_effect == 'effect':\n    myLog('setup effect')\n    strip_color = xbmcaddon.Addon().getSetting('strip_color')\n    strip_color = color_name_to_hex(strip_color)\n\n    my_effect_thread = myEffectThread(strip_color, True)\n    my_effect_thread.start()\n  else:\n    myLog('setup solid')\n    my_effect_thread = None\n\n  return my_effect_thread\n\n#####################################################################\ndef set_solid():\n  color_on = xbmcaddon.Addon().getSetting('color_on')\n  color_off = xbmcaddon.Addon().getSetting('color_off')\n  color_suspend = xbmcaddon.Addon().getSetting('color_suspend')\n  number_leds = xbmcaddon.Addon().getSetting('number_leds')\n  solid_color_type_on = xbmcaddon.Addon().getSetting('solid_color_type_on')\n\n  if solid_color_type_on == 'name':\n    color_on = xbmcaddon.Addon().getSetting('strip_color')\n    color_on = color_name_to_hex(color_on)\n\n  if number_leds == 'all':\n    number_leds = 10\n  else:\n    number_leds = int(number_leds)\n\n  myLog('set_solid color_on %s' % color_on)\n  myLog('set_solid color_off %s' % color_off)\n  myLog('set_solid color_suspend %s' % color_suspend)\n  myLog('set_solid number_leds %d' % number_leds)\n\n  write_sysfs('edge_color_on', color_on)\n  write_sysfs('edge_color_off', color_off)\n  write_sysfs('edge_color_suspend', color_suspend)\n\n  # set only some LEDs on\n  if number_leds == 1:\n    led_on(4, -1, -1, color_on)\n  elif number_leds == 2:\n    led_on(-1, 4, 5, color_on)\n  elif number_leds == 4:\n    led_on(-1, 3, 6, color_on)\n  elif number_leds == 6:\n    led_on(-1, 2, 7, color_on)\n  elif number_leds == 8:\n    led_on(-1, 1, 8, color_on)\n\n#####################################################################\ndef color_name_to_hex(color):\n  if color == 'green':\n    return '122e04'\n  elif color == 'blue':\n    return '101010'\n  elif color == 'purple':\n    return '800080'\n  elif color == 'yellow':\n    return 'ff4600'\n  elif color == 'deepblue':\n    return '0d00bf'\n  elif color == 'magenta':\n    return 'd8007a'\n  elif color == 'orange':\n    return 'f50e00'\n  else:\n    return 'ff0000'  # red\n    \n#####################################################################\nclass xbmcMonitor(xbmc.Monitor):\n  def __init__(self, thread):\n    xbmc.Monitor.__init__(self)\n    self.my_effect_thread = thread\n\n  def onSettingsChanged(self):\n    myLog('settings changed, restart')\n\n    if self.my_effect_thread is not None:\n      self.my_effect_thread.stop_and_join()\n\n    self.my_effect_thread = setup()\n\n  def onNotification(self, sender, method, data):\n    myLog('notification %s' % (method))\n    if method == 'System.OnWake':\n      if self.my_effect_thread is None:\n        # set on/off/suspend colors\n        set_solid()\n    elif method == 'System.OnQuit':\n      # set on/off/suspend colors which will be changed to off color\n      set_solid()\n\n#####################################################################\nif __name__ == '__main__':\n  addonid = xbmcaddon.Addon().getAddonInfo('id')\n  led_on(-1, -1, -1, '')\n  my_effect_thread = setup()\n  monitor = xbmcMonitor(my_effect_thread)\n\n  while not monitor.abortRequested():\n    if monitor.waitForAbort(5):\n      if my_effect_thread is not None:\n        my_effect_thread.stop_and_join()\n\n      myLog('finished')\n      break\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/homatics-leds/source/settings-default.xml",
    "content": "<settings>\n  <setting id=\"strip_color\"   value=\"red\" />\n  <setting id=\"static_effect\" value=\"effect\" />\n  <setting id=\"number_leds\"   value=\"all\" />\n</settings>"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/hyperion.ng/changelog.txt",
    "content": "115\n- Add support for new fb decoder\n114\n- Update to 2.0.16\n113\n- Update to 2.0.15\n112\n- fix dependencies and add new suspend/resume support suspend/resume support by PR hyperion-project/hyperion.ng#1535\n111\n- Update to 2.0.14\n110\n- Update to 2.0.13\n109\n- Update to 2.0.12\n108\n- Update to 2.0.0-alpha.11\n...\n101\n- Add Platform script\n100\n\n- Initial Release @e438bc6\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/hyperion.ng/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"hyperion.ng\"\nPKG_VERSION=\"2.0.16\"\nPKG_SHA256=\"966a5494b75708c04213e1c28aff5c9a909b689ccc19d52c6c708a270b00ca8a\"\nPKG_REV=\"116\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/hyperion-project/hyperion.ng\"\nPKG_URL=\"https://github.com/hyperion-project/hyperion.ng/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 libusb qt-everywhere protobuf flatbuffers:host flatbuffers libjpeg-turbo qmdnsengine mbedtls alsa-lib\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Hyperion.NG: an AmbiLight controller\"\nPKG_LONGDESC=\"Hyperion.NG($PKG_VERSION) is an modern opensource AmbiLight implementation.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Hyperion.NG\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \\\n                       -DCMAKE_BUILD_TYPE=Release \\\n                       -DUSE_SYSTEM_PROTO_LIBS=ON \\\n                       -DUSE_SYSTEM_FLATBUFFERS_LIBS=ON \\\n                       -DUSE_SYSTEM_QMDNS_LIBS=ON \\\n                       -DUSE_SYSTEM_MBEDTLS_LIBS=ON \\\n                       -DPLATFORM=amlogic \\\n                       -DENABLE_AMLOGIC=ON \\\n                       -DENABLE_DISPMANX=OFF \\\n                       -DENABLE_CEC=OFF \\\n                       -DENABLE_FB=ON \\\n                       -DENABLE_DEV_WS281XPWM=OFF \\\n                       -DENABLE_X11=OFF \\\n                       -DENABLE_V4L2=ON \\\n                       -DENABLE_OSX=OFF \\\n                       -DENABLE_DEV_SPI=ON \\\n                       -DENABLE_MDNS=ON \\\n                       -DENABLE_DEV_TINKERFORGE=OFF \\\n                       -DENABLE_TESTS=OFF \\\n                       -DENABLE_DEPLOY_DEPENDENCIES=OFF \\\n                       -Wno-dev\"\n\naddon() {\n  mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin\n    cp $PKG_BUILD/.$TARGET_NAME/bin/* $ADDON_BUILD/$PKG_ADDON_ID/bin\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/hyperion.ng/patches/0001-Remove-unused-libs-for-Amlogic-platform.patch",
    "content": "From 156cfd51d056643a846c594ef6a5d5ebd7bd0a8e Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Sun, 17 Nov 2019 09:20:38 +0100\nSubject: [PATCH 1/2] Remove unused libs for Amlogic platform\n\n---\n src/hyperion-aml/CMakeLists.txt         | 4 ----\n src/hyperion-framebuffer/CMakeLists.txt | 4 ----\n src/hyperion-remote/CMakeLists.txt      | 4 ----\n src/hyperion-v4l2/CMakeLists.txt        | 4 ----\n src/hyperiond/CMakeLists.txt            | 4 ----\n 5 files changed, 20 deletions(-)\n\ndiff --git a/src/hyperion-aml/CMakeLists.txt b/src/hyperion-aml/CMakeLists.txt\nindex 40b04df3..fea62f34 100644\n--- a/src/hyperion-aml/CMakeLists.txt\n+++ b/src/hyperion-aml/CMakeLists.txt\n@@ -23,10 +23,6 @@ else()\n \ttarget_link_libraries(${PROJECT_NAME} ssdp)\n endif()\n \n-if(ENABLE_AMLOGIC)\n-\ttarget_link_libraries(${PROJECT_NAME} pcre16 dl z)\n-endif()\n-\n install (TARGETS ${PROJECT_NAME} DESTINATION \"share/hyperion/bin\" COMPONENT \"hyperion_aml\")\n \n if(CMAKE_HOST_UNIX)\ndiff --git a/src/hyperion-framebuffer/CMakeLists.txt b/src/hyperion-framebuffer/CMakeLists.txt\nindex a9470f5c..8ac51da4 100644\n--- a/src/hyperion-framebuffer/CMakeLists.txt\n+++ b/src/hyperion-framebuffer/CMakeLists.txt\n@@ -22,10 +22,6 @@ else()\n \ttarget_link_libraries(${PROJECT_NAME} ssdp)\n endif()\n \n-if(ENABLE_AMLOGIC)\n-\ttarget_link_libraries(${PROJECT_NAME} pcre16 dl z)\n-endif()\n-\n install (TARGETS ${PROJECT_NAME} DESTINATION \"share/hyperion/bin\" COMPONENT \"hyperion_framebuffer\")\n \n if(CMAKE_HOST_UNIX)\ndiff --git a/src/hyperion-remote/CMakeLists.txt b/src/hyperion-remote/CMakeLists.txt\nindex ef60a7dc..8046fc15 100644\n--- a/src/hyperion-remote/CMakeLists.txt\n+++ b/src/hyperion-remote/CMakeLists.txt\n@@ -21,10 +21,6 @@ target_link_libraries(${PROJECT_NAME}\n \tQt${QT_VERSION_MAJOR}::Widgets\n )\n \n-if(ENABLE_AMLOGIC)\n-\ttarget_link_libraries(${PROJECT_NAME} pcre16 dl z)\n-endif()\n-\n if(ENABLE_MDNS)\n \ttarget_link_libraries(${PROJECT_NAME} mdns)\n else()\ndiff --git a/src/hyperion-v4l2/CMakeLists.txt b/src/hyperion-v4l2/CMakeLists.txt\nindex 37189cdc..92aadb28 100644\n--- a/src/hyperion-v4l2/CMakeLists.txt\n+++ b/src/hyperion-v4l2/CMakeLists.txt\n@@ -22,10 +22,6 @@ else()\n \ttarget_link_libraries(${PROJECT_NAME} ssdp)\n endif()\n \n-if(ENABLE_AMLOGIC)\n-\ttarget_link_libraries(${PROJECT_NAME} pcre16 dl z)\n-endif()\n-\n install (TARGETS ${PROJECT_NAME} DESTINATION \"share/hyperion/bin\" COMPONENT \"hyperion_v4l2\")\n \n if(CMAKE_HOST_UNIX)\ndiff --git a/src/hyperiond/CMakeLists.txt b/src/hyperiond/CMakeLists.txt\nindex 79a0b221..8ecbce4c 100644\n--- a/src/hyperiond/CMakeLists.txt\n+++ b/src/hyperiond/CMakeLists.txt\n@@ -71,10 +71,6 @@ if(ENABLE_PROTOBUF_SERVER)\n \ttarget_link_libraries(${PROJECT_NAME} protoserver)\n endif()\n \n-if(ENABLE_AMLOGIC)\n-\ttarget_link_libraries(${PROJECT_NAME} pcre16 dl z)\n-endif(ENABLE_AMLOGIC)\n-\n if(ENABLE_DISPMANX)\n \ttarget_link_libraries(${PROJECT_NAME} dispmanx-grabber)\n endif (ENABLE_DISPMANX)\n-- \n2.43.2\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/hyperion.ng/patches/0002-Embed-image-format-plugins-at-Amlogic-platform.patch",
    "content": "From 2e0ddd267d196e1e65e0cdbf5e2933c57a1db278 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Sun, 17 Nov 2019 09:20:38 +0100\nSubject: [PATCH 2/2] Embed image format plugins at Amlogic platform\n\n---\n libsrc/db/CMakeLists.txt    | 6 ++++++\n src/hyperiond/hyperiond.cpp | 5 +++++\n 2 files changed, 11 insertions(+)\n\ndiff --git a/libsrc/db/CMakeLists.txt b/libsrc/db/CMakeLists.txt\nindex 1beb3fe5..a72ce10f 100644\n--- a/libsrc/db/CMakeLists.txt\n+++ b/libsrc/db/CMakeLists.txt\n@@ -12,3 +12,9 @@ target_link_libraries(database\n \thyperion-utils\n \tQt${QT_VERSION_MAJOR}::Sql\n )\n+\n+if (ENABLE_AMLOGIC)\n+\ttarget_link_libraries(database\n+\t\t${plugin_libs}\n+\t)\n+endif()\ndiff --git a/src/hyperiond/hyperiond.cpp b/src/hyperiond/hyperiond.cpp\nindex 6c71475d..f40d6d2c 100644\n--- a/src/hyperiond/hyperiond.cpp\n+++ b/src/hyperiond/hyperiond.cpp\n@@ -26,6 +26,11 @@\n #include <webserver/WebServer.h>\n #include \"hyperiond.h\"\n \n+#ifdef ENABLE_AMLOGIC\n+#include <QtPlugin>\n+Q_IMPORT_PLUGIN(QGifPlugin)\n+#endif\n+\n // Flatbuffer Server\n #ifdef ENABLE_FLATBUF_SERVER\n #include <flatbufserver/FlatBufferServer.h>\n-- \n2.43.2\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/hyperion.ng/source/bin/hyperiond.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\n. /etc/profile\n\noe_setup_addon service.hyperion.ng\n\nexec hyperiond --userdata $ADDON_HOME &\necho $! > /run/hyperiond.pid\n\nif [ -f \"/usr/bin/Xorg\" ]; then\n  exec hyperion-x11 &\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/hyperion.ng/source/bin/platform.sh",
    "content": "#!/bin/sh\n\nDECODERS=\"\n  amvdec_h265\n  amvdec_h265_fb\n  amvdec_vp9\n  amvdec_vp9_fb\n  amvdec_av1\n  amvdec_av1_fb\"\n\ncase \"$1\" in\n    start)\n        double_write_mode=3\n    ;;\n    stop)\n        double_write_mode=0\n    ;;\n    *)\n        exit 0\n    ;;\nesac\n\nfor DECODER in ${DECODERS}; do\n    [ -d \"/sys/module/${DECODER}\"  ] && echo ${double_write_mode} > /sys/module/${DECODER}/parameters/double_write_mode || :\ndone\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/hyperion.ng/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nimport xbmc\n\nmonitor = xbmc.Monitor()\nmonitor.waitForAbort()\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/hyperion.ng/source/system.d/service.hyperion.ng.service",
    "content": "[Unit]\nDescription=Hyperion.NG service\nAfter=graphical.target\n\n[Service]\nType=forking\nExecStartPre=/bin/sh -c \"exec sh /storage/.kodi/addons/service.hyperion.ng/bin/platform.sh start\"\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.hyperion.ng/bin/hyperiond.start\"\nExecReload=/bin/kill -HUP $MAINPID\nExecStopPost=/bin/sh -c \"exec sh /storage/.kodi/addons/service.hyperion.ng/bin/platform.sh stop\"\nPIDFile=/run/hyperiond.pid\nTimeoutStopSec=2\nRestart=always\nRestartSec=10\nStartLimitInterval=0\n\n[Install]\nWantedBy=default.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/addons/service/openvfd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Arthur Liberman (arthur_liberman@hotmail.com)\n\nPKG_NAME=\"openvfd\"\nPKG_VERSION=\"1.0.6\"\nPKG_SHA256=\"e531781921dbea3bed52304ccbf8722d85fc2141abeda11a0a2f405ecf7ff8b9\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/arthur-liberman/service.openvfd\"\nPKG_URL=\"https://github.com/arthur-liberman/service.openvfd/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"OpenVFD: Service for controlling VFD displays\"\nPKG_LONGDESC=\"OpenVFD: Service for controlling VFD displays, e.g. Display icons (Ethernet/WiFi connection status) Time, Date, Playback time\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\naddon() {\n  mkdir -p $ADDON_BUILD/$PKG_ADDON_ID\n    cp -PR $PKG_BUILD/* $ADDON_BUILD/$PKG_ADDON_ID\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/devel/msgpack-c/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"msgpack-c\"\nPKG_VERSION=\"c3df1bb26ebdd01d618ecca7ae2d6b4e37d5abd7\"\nPKG_SHA256=\"581442dd9b94de53b75eb3de3cc0bb96c52e6690125223ecf4fff407772d3949\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/msgpack/msgpack-c\"\nPKG_URL=\"https://github.com/msgpack/msgpack-c/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Its like JSON but fast and small.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DMSGPACK_ENABLE_SHARED=OFF \\\n                       -DMSGPACK_ENABLE_STATIC=ON\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/lang/clang/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2024-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"clang\"\n# Android 14, Android U, 'Upside Down Cake'\nPKG_VERSION=\"r487747c\"\n# sha changes with every download\nPKG_SHA256=\"\"\nPKG_LICENSE=\"Apache License 2.0 with LLVM Exceptions\"\nPKG_SITE=\"https://android.googlesource.com\"\nPKG_URL=\"https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/tags/android-14.0.0_r0.118/clang-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"\"\nPKG_LONGDESC=\"Android Clang compiler\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n  mkdir -p ${TOOLCHAIN}/lib/${PKG_NAME}\n  tar -xf ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz -C ${TOOLCHAIN}/lib/${PKG_NAME}\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/lang/gcc-linaro-aarch64-elf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gcc-linaro-aarch64-elf\"\nPKG_VERSION=\"4.9.4-2017.01\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"Linaro Aarch64 GNU Linux Binary Toolchain\"\nPKG_TOOLCHAIN=\"manual\"\n\nif [ \"${MACHINE_HARDWARE_NAME}\" = \"aarch64\" ]; then\n  PKG_SHA256=\"7b2082188cd94f35ae2185d0c37c22d0100982f5a8e1875b9b03c416ec653fd1\"\n  PKG_URL=\"https://sources.coreelec.org/gcc-linaro-${PKG_VERSION}-aarch64-elf.tar.xz\"\nelse\n  PKG_SHA256=\"00c79aaf7ff9b1c22f7b0443a730056b3936561a4206af187ef61a4e3cab1716\"\n  PKG_URL=\"https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/aarch64-elf/gcc-linaro-${PKG_VERSION}-x86_64_aarch64-elf.tar.xz\"\nfi\n\nmakeinstall_host() {\n  mkdir -p $TOOLCHAIN/lib/gcc-linaro-aarch64-elf/\n    cp -a * $TOOLCHAIN/lib/gcc-linaro-aarch64-elf\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/lang/gcc-linaro-arm-eabi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gcc-linaro-arm-eabi\"\nPKG_VERSION=\"4.9.4-2017.01\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"Linaro ARM GNU Linux Binary Toolchain\"\nPKG_TOOLCHAIN=\"manual\"\n\nif [ \"${MACHINE_HARDWARE_NAME}\" = \"aarch64\" ]; then\n  PKG_SHA256=\"4b9a62d912de4c1fd2153e6652fbd296a62ac081515b6625edf3b8e0388ac6dd\"\n  PKG_URL=\"https://sources.coreelec.org/gcc-linaro-${PKG_VERSION}-arm-eabi.tar.xz\"\nelse\n  PKG_SHA256=\"5fa170a74db172dca098c70ae58f4c08d2fca0232ce135530b2ef4996326b4bd\"\n  PKG_URL=\"https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-eabi/gcc-linaro-${PKG_VERSION}-x86_64_arm-eabi.tar.xz\"\nfi\n\nmakeinstall_host() {\n  mkdir -p $TOOLCHAIN/lib/gcc-linaro-arm-eabi/\n    cp -a * $TOOLCHAIN/lib/gcc-linaro-arm-eabi\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/lang/gcc-riscv-none-embed/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"gcc-riscv-none-embed\"\nPKG_VERSION=\"8.3.0-1.2\"\nPKG_SHA256=\"079a88d7f7c18cfd735a9ed1f0eefa28ab28d3007b5f7591920ab25225c89248\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack\"\nPKG_URL=\"https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases/download/v${PKG_VERSION}/xpack-riscv-none-embed-gcc-${PKG_VERSION}-linux-x64.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"RISC-V GCC\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  mkdir -p ${TOOLCHAIN}/lib/${PKG_NAME}\n\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz -C ${TOOLCHAIN}/lib/${PKG_NAME}\n}\n\nmakeinstall_host() {\n  : # nothing, unpacked directly to toolchain\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/lang/gcc7-linaro-aarch64-elf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"gcc7-linaro-aarch64-elf\"\nPKG_VERSION=\"7.5.0-2019.12\"\nPKG_SHA256=\"73689fb3e71beeecebd6434d60efad4cb926153d48399e4d16fb45395d9c81a0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.linaro.org/\"\nPKG_URL=\"https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/aarch64-elf/gcc-linaro-${PKG_VERSION}-x86_64_aarch64-elf.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"Linaro Aarch64 GNU Linux Binary Toolchain\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  mkdir -p ${TOOLCHAIN}/lib/${PKG_NAME}\n\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.xz -C ${TOOLCHAIN}/lib/${PKG_NAME}\n}\n\nmakeinstall_host() {\n  : # nothing, unpacked directly to toolchain\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/lib32/lib32-glibc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n# 2024-present Diegrosan (https://github.com/Diegrosan)\n\nPKG_NAME=\"lib32-glibc\"\nPKG_VERSION=\"$(get_pkg_version glibc)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory glibc)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.gnu.org/software/libc/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"ccache:host autotools:host lib32-linux-headers lib32-gcc:bootstrap pigz:host glibc Python3:host\" # Make sure both 64 and 32 are built\nPKG_LONGDESC=\"The Glibc package contains the main C library, for multilib ARM.\"\nGLIBC_DIRECTORY=\"$(get_pkg_directory glibc)\"\nPKG_NEED_UNPACK+=\" ${GLIBC_DIRECTORY}\"\nPKG_PATCH_DIRS+=\" ${GLIBC_DIRECTORY}/patches ${GLIBC_DIRECTORY}/patches/arm\"\nPKG_BUILD_FLAGS=\"-gold lib32\"\n\ncase \"${LINUX}\" in\n  amlogic-4.9|rk356x-4.19|OdroidM1-4.19)\n    OPT_ENABLE_KERNEL=4.9.0\n    ;;\n  gameforce-4.4|rockchip-4.4|odroid-go-a-4.4)\n    OPT_ENABLE_KERNEL=4.4.0\n    ;;\n  amlogic-5.4)\n    OPT_ENABLE_KERNEL=5.4.0\n    ;;\n  amlogic-5.15)\n    OPT_ENABLE_KERNEL=5.15.0\n    ;;\n  amlogic-3.14)\n    OPT_ENABLE_KERNEL=3.0.0\n    ;;\n  *)\n    OPT_ENABLE_KERNEL=5.10.0\n    ;;\nesac\n\nPKG_CONFIGURE_OPTS_TARGET=\"BASH_SHELL=/bin/sh \\\n                           ac_cv_path_PERL=no \\\n                           ac_cv_prog_MAKEINFO= \\\n                           --libexecdir=/usr/lib/glibc \\\n                           --cache-file=config.cache \\\n                           --disable-profile \\\n                           --disable-sanity-checks \\\n                           --enable-add-ons \\\n                           --enable-bind-now \\\n                           --with-elf \\\n                           --with-tls \\\n                           --with-__thread \\\n                           --with-binutils=${BUILD}/toolchain/bin \\\n                           --with-headers=${LIB32_SYSROOT_PREFIX}/usr/include \\\n                           --enable-kernel=${OPT_ENABLE_KERNEL} \\\n                           --without-cvs \\\n                           --without-gd \\\n                           --disable-build-nscd \\\n                           --disable-nscd \\\n                           --disable-timezone-tools \\\n                           --disable-statx\" \n\nif build_with_debug; then\n  PKG_CONFIGURE_OPTS_TARGET+=\" --enable-debug\"\nelse\n  PKG_CONFIGURE_OPTS_TARGET+=\" --disable-debug\"\nfi\n\nunpack() {\n  ${SCRIPTS}/get glibc\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/glibc/glibc-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_unpack() {\n  find \"${PKG_BUILD}\" -type f -name '*.py' -exec sed -e '1s,^#![[:space:]]*/usr/bin/python.*,#!/usr/bin/env python3,' -i {} \\;\n}\n\npre_configure_target() {\n  # Filter out some problematic *FLAGS\n  export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-ffast-math||g\")\n  export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-Ofast|-O2|g\")\n  export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-O.|-O2|g\")\n  \n  # Removing all Werror flags\n  export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-Werror=[^ ]*||g\")\n  export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-Werror||g\")\n  \n  # Adding -Wno-error to all warnings\n  export CFLAGS=\"${CFLAGS} -Wno-error -Wno-error=return-type -Wno-error=undef\"\n\n  export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|-Wunused-but-set-variable||g\")\n  export CFLAGS=\"${CFLAGS} -Wno-unused-variable\"\n\n  if [ -n \"${PROJECT_CFLAGS}\" ]; then\n    export CFLAGS=$(echo ${CFLAGS} | sed -e \"s|${PROJECT_CFLAGS}||g\")\n  fi\n\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-ffast-math||g\")\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-Ofast|-O2|g\")\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-O.|-O2|g\")\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-Werror=[^ ]*||g\")\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-Werror||g\")\n\n  export LDFLAGS=$(echo ${LDFLAGS} | sed -e \"s|-Wl,--as-needed||\")\n\n  unset LD_LIBRARY_PATH\n\n  # set some CFLAGS we need\n  export CFLAGS=\"${CFLAGS} -g -fno-stack-protector\"\n\n  export BUILD_CC=${HOST_CC}\n  export OBJDUMP_FOR_HOST=objdump\n\n  # disable warnings like errors\n  export ac_cv_prog_cc_g=no\n  export ac_cv_prog_cc_werror=no\n  export libc_cv_warnings_as_errors=no\n\n  cat >config.cache <<EOF\nlibc_cv_forced_unwind=yes\nlibc_cv_c_cleanup=yes\nlibc_cv_ssp=no\nlibc_cv_ssp_strong=no\nlibc_cv_slibdir=/usr/lib\nlibc_cv_warnings_as_errors=no\nEOF\n\n  cat >configparms <<EOF\nlibdir=/usr/lib\nslibdir=/usr/lib\nsbindir=/usr/bin\nrootsbindir=/usr/bin\nbuild-programs=no\nenable-werror=no\nEOF\n\n}\n\n\npost_makeinstall_target() {\n  safe_remove ${INSTALL}/etc\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/lib/audit\n  safe_remove ${INSTALL}/usr/lib/*.o\n  safe_remove ${INSTALL}/usr/share\n  safe_remove ${INSTALL}/var\n  mkdir -p \"${INSTALL}/etc/ld.so.conf.d\"\n    echo \"/usr/lib32\" > \"${INSTALL}/etc/ld.so.conf.d/lib32-glibc.conf\"\n    # printf \"/emuelec/lib32\\n/emuelec/lib\\n\" > \"${INSTALL}/etc/ld.so.conf.d/emuelec.conf\"\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/lib32/lib32-libdrm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-2022 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-libdrm\"\nPKG_VERSION=\"$(get_pkg_version libdrm)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory libdrm)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://dri.freedesktop.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain lib32-libpciaccess\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory libdrm)/patches\"\nPKG_LONGDESC=\"The userspace interface library to kernel DRM services.\"\nPKG_TOOLCHAIN=\"meson\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nget_graphicdrivers\n\nPKG_MESON_OPTS_TARGET=\"-Dnouveau=disabled \\\n                       -Domap=disabled \\\n                       -Dexynos=disabled \\\n                       -Dtegra=disabled \\\n                       -Dcairo-tests=disabled \\\n                       -Dman-pages=disabled \\\n                       -Dvalgrind=disabled \\\n                       -Dfreedreno-kgsl=false \\\n                       -Dinstall-test-programs=true \\\n                       -Dudev=false\"\n\nunpack() {\n  ${SCRIPTS}/get libdrm\n  mkdir -p ${PKG_BUILD}\n  tar --strip-components=1 -xf ${SOURCES}/libdrm/libdrm-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}\n}\n\npost_makeinstall_target() {\n  # We don't need any binary, since we only want lib32\n  safe_remove ${INSTALL}/usr/bin\n  safe_remove ${INSTALL}/usr/include\n  safe_remove ${INSTALL}/usr/share\n  mv ${INSTALL}/usr/lib ${INSTALL}/usr/lib32\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/lib32/lib32-opengl-meson/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n# Copyright (C) 2022-present 7Ji (https://github.com/7Ji)\n\nPKG_NAME=\"lib32-opengl-meson\"\nPKG_VERSION=\"$(get_pkg_version opengl-meson)\"\nPKG_NEED_UNPACK=\"$(get_pkg_directory opengl-meson)\"\nPKG_ARCH=\"aarch64\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"http://openlinux.amlogic.com:8000/download/ARM/filesystem/\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"lib32-toolchain opengl-meson lib32-libdrm\"\nPKG_LONGDESC=\"OpenGL ES pre-compiled libraries for Mali GPUs found in Amlogic Meson SoCs.\"\nPKG_PATCH_DIRS+=\" $(get_pkg_directory opengl-meson)/patches\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_BUILD_FLAGS=\"lib32\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib32\n  mkdir -p ${SYSROOT_PREFIX}/usr/lib\n  local DIR_MESON=\"$(get_build_dir opengl-meson)\"\n  local DIR_ARM=${DIR_MESON}/lib/eabihf\n  local DIR_ARM_local=${PKG_DIR}/src/eabihf\n  local SINGLE_LIBMALI='no'\n\n      cp -p ${DIR_ARM_local}/gondul/r12p0/fbdev/libMali.so ${INSTALL}/usr/lib32/libMali.gondul.g12b.so\n      cp -p ${DIR_ARM_local}/dvalin/r12p0/fbdev/libMali.so ${INSTALL}/usr/lib32/libMali.dvalin.g12a.so\n      cp -p ${DIR_ARM}/gondul/r37p0/fbdev/libMali_r1p0.so ${INSTALL}/usr/lib32/libMali.gondul.so\n      cp -p ${DIR_ARM}/dvalin/r37p0/fbdev/libMali.so ${INSTALL}/usr/lib32/libMali.dvalin.so\n      cp -p ${DIR_ARM}/valhall/r41p0/fbdev/libMali.so ${INSTALL}/usr/lib32/libMali.valhall.so\n      cp -p ${DIR_ARM}/gondul/r37p0/fbdev/libMali_r1p0.so ${SYSROOT_PREFIX}/usr/lib/libMali.so\n\n  if [[ \"${SINGLE_LIBMALI}\" == 'no' ]]; then\n    ln -sf /var/lib32/libMali.so ${INSTALL}/usr/lib32/libMali.so\n  fi\n\n  local LINK_LIST=\"libmali.so \\\n                   libmali.so.0 \\\n                   libEGL.so \\\n                   libEGL.so.1 \\\n                   libEGL.so.1.0.0 \\\n                   libGLES_CM.so.1 \\\n                   libGLESv1_CM.so \\\n                   libGLESv1_CM.so.1 \\\n                   libGLESv1_CM.so.1.0.1 \\\n                   libGLESv1_CM.so.1.1 \\\n                   libGLESv2.so \\\n                   libGLESv2.so.2 \\\n                   libGLESv2.so.2.0 \\\n                   libGLESv2.so.2.0.0 \\\n                   libGLESv3.so \\\n                   libGLESv3.so.3 \\\n                   libGLESv3.so.3.0 \\\n                   libGLESv3.so.3.0.0\"\n\n  local LINK_NAME\n  for LINK_NAME in ${LINK_LIST}; do\n    ln -sf libMali.so ${INSTALL}/usr/lib32/${LINK_NAME}\n    ln -sf libMali.so ${SYSROOT_PREFIX}/usr/lib/${LINK_NAME}\n  done\n\n  # install headers and libraries to TOOLCHAIN\n  cp -rf ${DIR_MESON}/include/* ${SYSROOT_PREFIX}/usr/include\n  cp -rf \"$(get_build_dir opengl-meson)/lib/pkgconfig/\"* ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n  cp ${SYSROOT_PREFIX}/usr/include/EGL_platform/platform_fbdev/* ${SYSROOT_PREFIX}/usr/include/EGL\n  rm -rf ${SYSROOT_PREFIX}/usr/include/EGL_platform\n}\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2024-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"linux\"\nPKG_VERSION=\"e67465e6f777ebfaee29e3150770f12cbd677819\"\nPKG_SHA256=\"297e9384f4f8d010f6437d8fc62e023092984180ff11afb9a27fc38bb5804c63\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kernel.org\"\nPKG_URL=\"https://github.com/CoreELEC/linux-amlogic/archive/${PKG_VERSION}.tar.gz\"\nPKG_GIT_BRANCH=\"5.15.153_202501\"\nPKG_BUILD_PERF=\"no\"\nPKG_DEPENDS_HOST=\"ccache:host rsync:host openssl:host\"\nPKG_DEPENDS_TARGET=\"toolchain linux:host kmod:host xz:host keyutils aml-dtbtools:host aml-dtbtools ${KERNEL_EXTRA_DEPENDS_TARGET}\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS} $(get_pkg_directory initramfs) $(get_pkg_variable initramfs PKG_NEED_UNPACK)\"\nPKG_DEPENDS_UNPACK=\"bl30 common_drivers\"\nPKG_LONGDESC=\"This package contains a precompiled kernel image and the modules.\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_STAMP=\"${KERNEL_TARGET} ${KERNEL_MAKE_EXTRACMD} ${KERNEL_UBOOT_EXTRA_TARGET}\"\n\nPKG_PATCH_DIRS=\"${LINUX}\"\n\nPKG_KERNEL_CFG_FILE=$(kernel_config_path) || die\n\nif [ \"${KERNEL_COMPILER}\" = \"clang\" ]; then\n  PKG_DEPENDS_TARGET+=\" clang:host\"\nfi\n\nif [ -n \"${KERNEL_TOOLCHAIN}\" ]; then\n  PKG_DEPENDS_HOST=\"${PKG_DEPENDS_HOST} gcc-${KERNEL_TOOLCHAIN}:host\"\n  PKG_DEPENDS_TARGET=\"${PKG_DEPENDS_TARGET} gcc-${KERNEL_TOOLCHAIN}:host\"\n  HEADERS_ARCH=${TARGET_ARCH}\nfi\n\nif [ \"${PKG_BUILD_PERF}\" != \"no\" ] && grep -q ^CONFIG_PERF_EVENTS= ${PKG_KERNEL_CFG_FILE} ; then\n  PKG_BUILD_PERF=\"yes\"\n  PKG_DEPENDS_TARGET=\"${PKG_DEPENDS_TARGET} binutils elfutils libunwind zlib openssl\"\nfi\n\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  PKG_DEPENDS_TARGET=\"${PKG_DEPENDS_TARGET} elfutils:host\"\n  PKG_DEPENDS_UNPACK+=\" intel-ucode kernel-firmware\"\nfi\n\nif [[ \"${KERNEL_TARGET}\" = uImage* ]]; then\n  PKG_DEPENDS_TARGET=\"${PKG_DEPENDS_TARGET} u-boot-tools:host\"\nfi\n\nif [ \"${BUILD_ANDROID_BOOTIMG}\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET=\"${PKG_DEPENDS_TARGET} mkbootimg:host\"\nfi\n\n# Ensure that the dependencies of initramfs:target are built correctly, but\n# we don't want to add initramfs:target as a direct dependency as we install\n# this \"manually\" from within linux:target\nfor pkg in $(get_pkg_variable initramfs PKG_DEPENDS_TARGET); do\n  ! listcontains \"${PKG_DEPENDS_TARGET}\" \"${pkg}\" && PKG_DEPENDS_TARGET+=\" ${pkg}\" || true\ndone\n\npost_unpack() {\n  mkdir -p ${PKG_BUILD}/.git/hooks\n  mkdir -p ${PKG_BUILD}/common_drivers/.git/hooks\n  cp -r $(get_build_dir common_drivers)/* ${PKG_BUILD}/common_drivers\n  # make modules folder with version number only\n  touch ${PKG_BUILD}/.scmversion\n  # show correct common_drivers build info in dmesg\n  echo \"$(get_pkg_variable common_drivers PKG_VERSION)\" >${PKG_BUILD}/common_drivers/.scmversion\n}\n\npost_patch() {\n  # linux was already built and its build dir autoremoved - prepare it again for kernel packages\n  if [ -d ${PKG_INSTALL}/.image ]; then\n    cp -p ${PKG_INSTALL}/.image/.config ${PKG_BUILD}\n    kernel_make -C ${PKG_BUILD} prepare\n\n    # restore the required Module.symvers from an earlier build\n    cp -p ${PKG_INSTALL}/.image/Module.symvers ${PKG_BUILD}\n  else\n    cp ${PKG_KERNEL_CFG_FILE} ${PKG_BUILD}/.config\n\n    sed -i -e \"s|@INITRAMFS_SOURCE@|$(kernel_initramfs_confs) ${BUILD}/initramfs|\" ${PKG_BUILD}/.config\n\n    # set default hostname based on ${DISTRONAME}\n      sed -i -e \"s|@DISTRONAME@|${DISTRONAME}|g\" ${PKG_BUILD}/.config\n\n    # disable swap support if not enabled\n    if [ ! \"${SWAP_SUPPORT}\" = yes ]; then\n      sed -i -e \"s|^CONFIG_SWAP=.*$|# CONFIG_SWAP is not set|\" ${PKG_BUILD}/.config\n    fi\n\n    # disable nfs support if not enabled\n    if [ ! \"${NFS_SUPPORT}\" = yes ]; then\n      sed -i -e \"s|^CONFIG_NFS_FS=.*$|# CONFIG_NFS_FS is not set|\" ${PKG_BUILD}/.config\n    fi\n\n    # disable cifs support if not enabled\n    if [ ! \"${SAMBA_SUPPORT}\" = yes ]; then\n      sed -i -e \"s|^CONFIG_CIFS=.*$|# CONFIG_CIFS is not set|\" ${PKG_BUILD}/.config\n    fi\n\n    # disable iscsi support if not enabled\n    if [ ! \"${ISCSI_SUPPORT}\" = yes ]; then\n      sed -i -e \"s|^CONFIG_SCSI_ISCSI_ATTRS=.*$|# CONFIG_SCSI_ISCSI_ATTRS is not set|\" ${PKG_BUILD}/.config\n      sed -i -e \"s|^CONFIG_ISCSI_TCP=.*$|# CONFIG_ISCSI_TCP is not set|\" ${PKG_BUILD}/.config\n      sed -i -e \"s|^CONFIG_ISCSI_BOOT_SYSFS=.*$|# CONFIG_ISCSI_BOOT_SYSFS is not set|\" ${PKG_BUILD}/.config\n      sed -i -e \"s|^CONFIG_ISCSI_IBFT_FIND=.*$|# CONFIG_ISCSI_IBFT_FIND is not set|\" ${PKG_BUILD}/.config\n      sed -i -e \"s|^CONFIG_ISCSI_IBFT=.*$|# CONFIG_ISCSI_IBFT is not set|\" ${PKG_BUILD}/.config\n    fi\n\n    # disable lima/panfrost if libmali is configured\n    if [ \"${OPENGLES}\" = \"libmali\" ]; then\n      sed -e \"s|^CONFIG_DRM_LIMA=.*$|# CONFIG_DRM_LIMA is not set|\" -i ${PKG_BUILD}/.config\n      sed -e \"s|^CONFIG_DRM_PANFROST=.*$|# CONFIG_DRM_PANFROST is not set|\" -i ${PKG_BUILD}/.config\n    fi\n\n    # disable wireguard support if not enabled\n    if [ ! \"${WIREGUARD_SUPPORT}\" = yes ]; then\n      sed -e \"s|^CONFIG_WIREGUARD=.*$|# CONFIG_WIREGUARD is not set|\" -i ${PKG_BUILD}/.config\n    fi\n\n    # 5.4.125 kernel compile errors\n    sed -e 's|^KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough,).*||' \\\n        -e 's|^KBUILD_CFLAGS   := \\(.*\\)|KBUILD_CFLAGS   := -Wno-format -Wno-unused-function -Wno-misleading-indentation \\1|' \\\n        -e 's|^KBUILD_LDFLAGS :=|KBUILD_LDFLAGS := $(call ld-option,--no-warn-rwx-segments)|' \\\n        -i ${PKG_BUILD}/Makefile\n    sed -i 's|-z norelro||' ${PKG_BUILD}/arch/arm64/Makefile\n  fi\n}\n\nmake_host() {\n  :\n}\n\nmakeinstall_host() {\n  make \\\n    ARCH=${HEADERS_ARCH:-${TARGET_KERNEL_ARCH}} \\\n    HOSTCC=\"${TOOLCHAIN}/bin/host-gcc\" \\\n    HOSTCXX=\"${TOOLCHAIN}/bin/host-g++\" \\\n    HOSTCFLAGS=\"${HOST_CFLAGS}\" \\\n    HOSTCXXFLAGS=\"${HOST_CXXFLAGS}\" \\\n    HOSTLDFLAGS=\"${HOST_LDFLAGS}\" \\\n    INSTALL_HDR_PATH=dest \\\n    headers_install\n  mkdir -p ${SYSROOT_PREFIX}/usr/include\n    cp -R dest/include/* ${SYSROOT_PREFIX}/usr/include\n}\n\nbuild_gpio_data() {\n  cat << EOF > common_drivers/drivers/bootloader/gpio_data.h\ntypedef struct bl30_gpio {\n    char name[16];\n    uint32_t number;\n} bl30_gpio_t;\n\ntypedef struct bl30_gpios_soc {\n    enum meson_cpuid_type_e cpuid;\n    bl30_gpio_t gpio[256];\n} bl30_gpios_soc_t;\n\nbl30_gpios_soc_t bl30_gpios[3] = {\nEOF\n\n  for soc_dir in $(get_build_dir bl30)/demos/amlogic/n200/include/*; do\n    if [ -d ${soc_dir} -a -e \"${soc_dir}/gpio-data.h\" ]; then\n      soc_type=\"$(basename ${soc_dir})\"\n      printf \"#ifdef MESON_CPU_MAJOR_ID_${soc_type^^}\\n\" >>common_drivers/drivers/bootloader/gpio_data.h\n      printf \"  /* soc ${soc_type} */\\n\" >>common_drivers/drivers/bootloader/gpio_data.h\n      printf \"  { MESON_CPU_MAJOR_ID_${soc_type^^},\\n    {\\n\" >>common_drivers/drivers/bootloader/gpio_data.h\n\n      cat \"${soc_dir}/gpio-data.h\" | awk \\\n        '/^#define\\s*GPIO._/ { printf(\"    { \\\"%s\\\", %d },\\n\", $2, $3)}' \\\n        >>common_drivers/drivers/bootloader/gpio_data.h\n      printf \"    }\\n  },\\n\" >>common_drivers/drivers/bootloader/gpio_data.h\n      printf \"#endif\\n\" >>common_drivers/drivers/bootloader/gpio_data.h\n    fi\n  done\n\n  printf \"};\\n\" >>common_drivers/drivers/bootloader/gpio_data.h\n}\n\npre_make_target() {\n  pkg_lock_status \"ACTIVE\" \"linux:target\" \"build\"\n\n  build_gpio_data\n\n  if [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n    # copy some extra firmware to linux tree\n    mkdir -p ${PKG_BUILD}/external-firmware\n      cp -a $(get_build_dir kernel-firmware)/.copied-firmware/{amdgpu,amd-ucode,i915,radeon,e100,rtl_nic} ${PKG_BUILD}/external-firmware\n\n    cp -a $(get_build_dir intel-ucode)/intel-ucode ${PKG_BUILD}/external-firmware\n\n    FW_LIST=\"$(find ${PKG_BUILD}/external-firmware \\( -type f -o -type l \\) \\( -iname '*.bin' -o -iname '*.fw' -o -path '*/intel-ucode/*' \\) | sed 's|.*external-firmware/||' | sort | xargs)\"\n    sed -i \"s|CONFIG_EXTRA_FIRMWARE=.*|CONFIG_EXTRA_FIRMWARE=\\\"${FW_LIST}\\\"|\" ${PKG_BUILD}/.config\n  fi\n\n  kernel_make oldconfig\n}\n\nmake_target() {\n  # arm64 target does not support creating uImage.\n  # Build Image first, then wrap it using u-boot's mkimage.\n  if [[ \"${TARGET_KERNEL_ARCH}\" = \"arm64\" && \"${KERNEL_TARGET}\" = uImage* ]]; then\n    if [ -z \"${KERNEL_UIMAGE_LOADADDR}\" -o -z \"${KERNEL_UIMAGE_ENTRYADDR}\" ]; then\n      die \"ERROR: KERNEL_UIMAGE_LOADADDR and KERNEL_UIMAGE_ENTRYADDR have to be set to build uImage - aborting\"\n    fi\n    KERNEL_UIMAGE_TARGET=\"${KERNEL_TARGET}\"\n    KERNEL_TARGET=\"${KERNEL_TARGET/uImage/Image}\"\n  fi\n\n  rm -rf ${BUILD}/initramfs\n  rm -f ${STAMPS_INSTALL}/initramfs/install_target ${STAMPS_INSTALL}/*/install_init\n\n  if [ -n \"${INITRAMFS_MODULES}\" ]; then\n    # build and install modules because some of them are needed in initramfs\n\n    kernel_make modules\n    kernel_make INSTALL_MOD_PATH=${INSTALL}/$(get_kernel_overlay_dir) modules_install\n\n    rm -f ${INSTALL}/$(get_kernel_overlay_dir)/lib/modules/*/build\n    rm -f ${INSTALL}/$(get_kernel_overlay_dir)/lib/modules/*/source\n\n    mkdir -p ${BUILD}/initramfs/etc\n    mkdir -p ${BUILD}/initramfs/usr/lib/modules\n\n    for i in ${INITRAMFS_MODULES}; do\n      module=$(find ${INSTALL}/$(get_full_module_dir)/kernel -name ${i}.ko)\n      if [ -n \"${module}\" ]; then\n        echo ${i} >> ${BUILD}/initramfs/etc/modules\n        cp ${module} ${BUILD}/initramfs/usr/lib/modules\n      fi\n    done\n  fi\n\n  # create initramfs.cpio needed by Android boot image\n  (\n    cd ${ROOT}\n    ${SCRIPTS}/install initramfs\n  )\n\n  # clean out dtb's\n  DTB_PATH=\"common_drivers/arch/${TARGET_KERNEL_ARCH}/boot/dts/amlogic\"\n  rm -f ${DTB_PATH}/*.dtb\n\n  # the modules target is required to get a proper Module.symvers\n  # file with symbols from built-in and external modules.\n  # Without that it'll contain only the symbols from the kernel\n  kernel_make ${KERNEL_TARGET} ${KERNEL_MAKE_EXTRACMD} modules\n\n  if [ -z \"${INITRAMFS_MODULES}\" ]; then\n    # need to install modules here\n    kernel_make INSTALL_MOD_PATH=${INSTALL}/$(get_kernel_overlay_dir) modules_install\n\n    rm -f ${INSTALL}/$(get_kernel_overlay_dir)/lib/modules/*/build\n    rm -f ${INSTALL}/$(get_kernel_overlay_dir)/lib/modules/*/source\n  fi\n\n  # collect all device tree in 'coreelec' subfolders\n  cp ${DTB_PATH}/coreelec-*/*.dtb ${DTB_PATH} 2>/dev/null || :\n\n  # combine Amlogic multidtb by dtb.conf\n  find_file_path bootloader/dtb.conf\n  MULTIDTB_CONF=\"${FOUND_PATH}\"\n  if [ -f ${MULTIDTB_CONF} ]; then\n    multidtb_cnt=$(xmlstarlet sel -t -c \"count(//dtb/multidtb)\" ${MULTIDTB_CONF})\n    cnt_m=1\n    while [ ${cnt_m} -le ${multidtb_cnt} ]; do\n      multidtb=$(xmlstarlet sel -t -v \"//dtb/multidtb[${cnt_m}]/@name\" ${MULTIDTB_CONF})\n      echo\n      echo \"Making multidtb ${multidtb}\"\n      rm -fr \"${DTB_PATH}/dtbtool_input\"\n      mkdir ${DTB_PATH}/dtbtool_input\n\n      files_cnt=$(xmlstarlet sel -t -c \"count(//dtb/multidtb[${cnt_m}]/file)\" ${MULTIDTB_CONF})\n      cnt_f=1\n      while [ ${cnt_f} -le ${files_cnt} ]; do\n        file=$(xmlstarlet sel -t -v \"//dtb/multidtb[${cnt_m}]/file[${cnt_f}]\" ${MULTIDTB_CONF})\n        cnt_f=$((cnt_f+1))\n        mv ${DTB_PATH}/${file} ${DTB_PATH}/dtbtool_input\n      done\n\n      dtbTool -c -o ${DTB_PATH}/${multidtb} ${DTB_PATH}/dtbtool_input\n      rm -fr \"${DTB_PATH}/dtbtool_input\"\n      cnt_m=$((cnt_m+1))\n    done\n    mkdir -p ${INSTALL}/usr/share/bootloader\n    install -m 0644 ${MULTIDTB_CONF} ${INSTALL}/usr/share/bootloader\n  fi\n\n  if [ \"${BUILD_ANDROID_BOOTIMG}\" = \"yes\" ]; then\n    find_file_path bootloader/mkbootimg && source ${FOUND_PATH}\n    mv -f arch/${TARGET_KERNEL_ARCH}/boot/boot.img arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_TARGET}\n  fi\n\n  if [ \"${PKG_BUILD_PERF}\" = \"yes\" ] ; then\n    ( cd tools/perf\n\n      # arch specific perf build args\n      case \"${TARGET_ARCH}\" in\n        x86_64)\n          PERF_BUILD_ARGS=\"ARCH=x86\"\n          ;;\n        aarch64)\n          PERF_BUILD_ARGS=\"ARCH=arm64\"\n          ;;\n        *)\n          PERF_BUILD_ARGS=\"ARCH=${TARGET_ARCH}\"\n          ;;\n      esac\n\n      WERROR=0 \\\n      NO_LIBPERL=1 \\\n      NO_LIBPYTHON=1 \\\n      NO_SLANG=1 \\\n      NO_GTK2=1 \\\n      NO_LIBNUMA=1 \\\n      NO_LIBAUDIT=1 \\\n      NO_LZMA=1 \\\n      NO_SDT=1 \\\n      CROSS_COMPILE=\"${TARGET_PREFIX}\" \\\n      JOBS=\"${CONCURRENCY_MAKE_LEVEL}\" \\\n        make ${PERF_BUILD_ARGS}\n      mkdir -p ${INSTALL}/usr/bin\n        cp perf ${INSTALL}/usr/bin\n    )\n  fi\n\n  if [ -n \"${KERNEL_UIMAGE_TARGET}\" ] ; then\n    # determine compression used for kernel image\n    KERNEL_UIMAGE_COMP=${KERNEL_UIMAGE_TARGET:7}\n    KERNEL_UIMAGE_COMP=$(echo ${KERNEL_UIMAGE_COMP:-none} | sed 's/gz/gzip/; s/bz2/bzip2/')\n\n    # calculate new load address to make kernel Image unpack to memory area after compressed image\n    if [ \"${KERNEL_UIMAGE_COMP}\" != \"none\" ] ; then\n      COMPRESSED_SIZE=$(stat -t \"arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_TARGET}\" | awk '{print $2}')\n      # align to 1 MiB\n      COMPRESSED_SIZE=$(( ((${COMPRESSED_SIZE} - 1 >> 20) + 1) << 20 ))\n      PKG_KERNEL_UIMAGE_LOADADDR=$(printf '%X' \"$(( ${KERNEL_UIMAGE_LOADADDR} + ${COMPRESSED_SIZE} ))\")\n      PKG_KERNEL_UIMAGE_ENTRYADDR=$(printf '%X' \"$(( ${KERNEL_UIMAGE_ENTRYADDR} + ${COMPRESSED_SIZE} ))\")\n    else\n      PKG_KERNEL_UIMAGE_LOADADDR=${KERNEL_UIMAGE_LOADADDR}\n      PKG_KERNEL_UIMAGE_ENTRYADDR=${KERNEL_UIMAGE_ENTRYADDR}\n    fi\n\n    mkimage -A ${TARGET_KERNEL_ARCH} \\\n            -O linux \\\n            -T kernel \\\n            -C ${KERNEL_UIMAGE_COMP} \\\n            -a ${PKG_KERNEL_UIMAGE_LOADADDR} \\\n            -e ${PKG_KERNEL_UIMAGE_ENTRYADDR} \\\n            -d arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_TARGET} \\\n               arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_UIMAGE_TARGET}\n\n    KERNEL_TARGET=\"${KERNEL_UIMAGE_TARGET}\"\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/.image\n  cp -p arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_TARGET} System.map .config Module.symvers ${INSTALL}/.image/\n\n  if [ \"${BOOTLOADER}\" = \"u-boot\" ]; then\n    mkdir -p ${INSTALL}/usr/share/bootloader/device_trees\n    if [ -d common_drivers/arch/${TARGET_KERNEL_ARCH}/boot/dts/amlogic ]; then\n      cp common_drivers/arch/${TARGET_KERNEL_ARCH}/boot/*dtb.img ${INSTALL}/usr/share/bootloader/ 2>/dev/null || :\n      cp common_drivers/arch/${TARGET_KERNEL_ARCH}/boot/dts/amlogic/*.dtb ${INSTALL}/usr/share/bootloader/device_trees 2>/dev/null || :\n    fi\n  elif [ \"${BOOTLOADER}\" = \"bcm2835-bootloader\" ]; then\n    mkdir -p ${INSTALL}/usr/share/bootloader/overlays\n\n    # install platform dtbs, but remove upstream kernel dtbs (i.e. without downstream\n    # drivers and decent USB support) as these are not required by LibreELEC\n    cp -p common_drivers/arch/${TARGET_KERNEL_ARCH}/boot/dts/*.dtb ${INSTALL}/usr/share/bootloader\n    rm -f ${INSTALL}/usr/share/bootloader/bcm283*.dtb\n\n    # install overlay dtbs\n    for dtb in common_drivers/arch/${TARGET_KERNEL_ARCH}/boot/dts/overlays/*.dtb \\\n               common_drivers/arch/${TARGET_KERNEL_ARCH}/boot/dts/overlays/*.dtbo; do\n      cp ${dtb} ${INSTALL}/usr/share/bootloader/overlays 2>/dev/null || :\n    done\n    cp -p common_drivers/arch/${TARGET_KERNEL_ARCH}/boot/dts/overlays/README ${INSTALL}/usr/share/bootloader/overlays\n  fi\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux/patches/linux-004_lower_undefined_mode_timeout.patch",
    "content": "diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/tty.c linux-2.6.23-rc9/arch/i386/boot/tty.c\n--- linux-2.6.23-rc9.orig/arch/x86/boot/tty.c\t2007-10-06 12:26:14.000000000 +0200\n+++ linux-2.6.23-rc9/arch/x86/boot/tty.c\t2007-10-06 12:37:47.000000000 +0200\n@@ -92,7 +92,7 @@\n \n int getchar_timeout(void)\n {\n-\tint cnt = 30;\n+\tint cnt = 3;\n \tint t0, t1;\n \n \tt0 = gettime();\ndiff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/video.c linux-2.6.23-rc9/arch/i386/boot/video.c\n--- linux-2.6.23-rc9.orig/arch/x86/boot/video.c\t2007-10-06 12:26:14.000000000 +0200\n+++ linux-2.6.23-rc9/arch/x86/boot/video.c\t2007-10-06 12:36:05.000000000 +0200\n@@ -329,7 +329,7 @@\n \tunsigned int sel;\n \n \tputs(\"Press <ENTER> to see video modes available, \"\n-\t     \"<SPACE> to continue, or wait 30 sec\\n\");\n+\t     \"<SPACE> to continue, or wait 3 sec\\n\");\n \n \tkbd_flush();\n \twhile (1) {\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux/patches/linux-007_die_floppy_die.patch",
    "content": "From 4ff58b642f80dedb20533978123d89b5ac9b1ed5 Mon Sep 17 00:00:00 2001\nFrom: Kyle McMartin <kyle@phobos.i.jkkm.org>\nDate: Tue, 30 Mar 2010 00:04:29 -0400\nSubject: die-floppy-die\n\nKill the floppy.ko pnp modalias. We were surviving just fine without\nautoloading floppy drivers, tyvm.\n\nPlease feel free to register all complaints in the wastepaper bin.\n---\n drivers/block/floppy.c |    3 +--\n 1 files changed, 1 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/block/floppy.c b/drivers/block/floppy.c\nindex 90c4038..f4a0b90 100644\n--- a/drivers/block/floppy.c\n+++ b/drivers/block/floppy.c\n@@ -4619,8 +4619,7 @@ static const struct pnp_device_id floppy_pnpids[] = {\n \t{\"PNP0700\", 0},\n \t{}\n };\n-\n-MODULE_DEVICE_TABLE(pnp, floppy_pnpids);\n+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */\n \n #else\n \n-- \n1.7.0.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux/patches/linux-009_disable_i8042_check_on_apple_mac.patch",
    "content": "From 2a79554c864ac58fa2ad982f0fcee2cc2aa33eb5 Mon Sep 17 00:00:00 2001\nFrom: Bastien Nocera <hadess@hadess.net>\nDate: Thu, 20 May 2010 10:30:31 -0400\nSubject: Disable i8042 checks on Intel Apple Macs\n\nAs those computers never had any i8042 controllers, and the\ncurrent lookup code could potentially lock up/hang/wait for\ntimeout for long periods of time.\n\nFixes intermittent hangs on boot on a MacbookAir1,1\n\nSigned-off-by: Bastien Nocera <hadess@hadess.net>\n---\n drivers/input/serio/i8042.c |   22 ++++++++++++++++++++++\n 1 files changed, 22 insertions(+), 0 deletions(-)\n\ndiff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c\nindex 6440a8f..4d7cf98 100644\n--- a/drivers/input/serio/i8042.c\n+++ b/drivers/input/serio/i8042.c\n@@ -1451,6 +1451,22 @@ static struct platform_driver i8042_driver = {\n \t.shutdown\t= i8042_shutdown,\n };\n \n+#ifdef CONFIG_DMI\n+static struct dmi_system_id __initdata dmi_system_table[] = {\n+\t{\n+\t\t.matches = {\n+\t\t\tDMI_MATCH(DMI_BIOS_VENDOR, \"Apple Computer, Inc.\")\n+\t\t},\n+\t},\n+\t{\n+\t\t.matches = {\n+\t\t\tDMI_MATCH(DMI_BIOS_VENDOR, \"Apple Inc.\")\n+\t\t},\n+\t},\n+\t{}\n+};\n+#endif /*CONFIG_DMI*/\n+\n static int __init i8042_init(void)\n {\n \tstruct platform_device *pdev;\n@@ -1458,6 +1474,12 @@ static int __init i8042_init(void)\n \n \tdbg_init();\n \n+#ifdef CONFIG_DMI\n+\t/* Intel Apple Macs never have an i8042 controller */\n+\tif (dmi_check_system(dmi_system_table) > 0)\n+\t\treturn -ENODEV;\n+#endif /*CONFIG_DMI*/\n+\n \terr = i8042_platform_init();\n \tif (err)\n \t\treturn err;\n-- \n1.7.0.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux/sysctl.d/network.conf",
    "content": "net.ipv4.tcp_no_metrics_save=1\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux/sysctl.d/qdisc.conf",
    "content": "net.core.default_qdisc = fq_codel\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux/udev.d/30-disable-wakeup.rules",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nACTION!=\"add|change\", GOTO=\"end\"\n\nDRIVER==\"ehci-pci|xhci_hcd\", RUN+=\"/usr/bin/sh -c 'echo disabled > /sys/${devpath}/power/wakeup'\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux/udev.d/40-modeswitch.rules",
    "content": "../../../../../packages/linux/udev.d/40-modeswitch.rules"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-driver-addons/dvb/AVL6862/changelog.txt",
    "content": "100\n- Initial add-on\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-driver-addons/dvb/AVL6862/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"AVL6862\"\nPKG_VERSION=\"a0c5005e05f62dee62e38ba5c30e34852eef5523\"\nPKG_SHA256=\"5a21bd73117c01c3dc5e914630242fe6c5f77c005bcef29f7bdf64b34b806e27\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC\"\nPKG_URL=\"https://github.com/CoreELEC/media_tree_aml/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain media_modules-aml\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"AVL6862 driver for Amlogic DVB Frontend\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_ADDON_IS_STANDALONE=\"yes\"\nPKG_ADDON_NAME=\"AVL6862 driver for Amlogic DVB Frontend\"\nPKG_ADDON_TYPE=\"xbmc.service\"\nPKG_ADDON_VERSION=\"${ADDON_VERSION}.${PKG_REV}\"\n\nmake_target() {\n  kernel_make -C $(kernel_path) M=${PKG_BUILD} \\\n    CONFIG_MESON_DVB=m \\\n    KCFLAGS=-Wno-implicit-fallthrough \\\n    KBUILD_EXTRA_SYMBOLS=$(get_build_dir media_modules-aml)/drivers/Module.symvers\n}\n\nmakeinstall_target() {\n  install_driver_addon_files \"${PKG_BUILD}\"\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-driver-addons/dvb/AVL6862/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2024-present Team CoreELEC (https://coreelec.org)\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-driver-addons/dvb/AVL6862/source/system.d/amlogic-dvb.service",
    "content": "[Unit]\nDescription=Amlogic DVB module loader\nConditionPathExists=/proc/device-tree/dvb/\nAfter=kernel-overlays.service\n\n[Service]\nType=oneshot\nExecStart=-/bin/sh -c \"[ ! -f '/proc/device-tree/dvb/status' -a $(tr -d '\\\\0' < /proc/device-tree/dvb/compatible) = \"amlogic,dvb\" ] && /sbin/modprobe aml_fe\"\nExecStart=-/bin/sh -c \"[ -f '/proc/device-tree/dvb/status' -a $(tr -d '\\\\0' < /proc/device-tree/dvb/status) = \"okay\" ] && /sbin/modprobe aml_fe\"\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/RTL8851BU/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"RTL8851BU\"\nPKG_VERSION=\"f94ea820634d3bd050009e861952d3b8eeef869a\"\nPKG_SHA256=\"43393114cc428e0b9b64eb87e88037a926daed1e6f6af92f7ad945138b9f4d5a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/neatojones/RTL8851bu\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"Realtek RTL8851BU Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  kernel_make \\\n       ARCH=${TARGET_KERNEL_ARCH} \\\n       KSRC=$(kernel_path) \\\n       CROSS_COMPILE=${TARGET_KERNEL_PREFIX} \\\n       CONFIG_RTW_DEBUG=n\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n    cp *.ko ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/RTL8851BU/patches/RTL8851BU-0001-fix.patch",
    "content": "diff --git a/include/drv_conf.h b/include/drv_conf.h\nindex 5ad652e..f1ae864 100755\n--- a/include/drv_conf.h\n+++ b/include/drv_conf.h\n@@ -711,8 +711,4 @@ power down etc.) in last time, we can unmark this flag to avoid some unpredictab\n */\n #define RTW_WKARD_TRIGGER_FRAME_PARSER\n \n-#if !defined(strlcpy)\n-#define strlcpy(a, b, c) strscpy(a, b, c)\n-#endif\n-\n #endif /* __DRV_CONF_H__ */\ndiff --git a/include/osdep_service_linux.h b/include/osdep_service_linux.h\nindex b15cbc9..4d43be4 100755\n--- a/include/osdep_service_linux.h\n+++ b/include/osdep_service_linux.h\n@@ -1082,11 +1082,6 @@ static inline void rtw_dump_stack(void)\n #endif\n #endif\n \n-#ifndef static_assert\n-#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)\n-#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)\n-#endif\n-\n #ifdef CONFIG_PCI_HCI\n /* Extended Capabilities (PCI-X 2.0 and Express) */\n #ifndef PCI_EXT_CAP_ID_L1SS\ndiff --git a/os_dep/linux/os_ch_utils.c b/os_dep/linux/os_ch_utils.c\nindex 5ec049f..a725e75 100644\n--- a/os_dep/linux/os_ch_utils.c\n+++ b/os_dep/linux/os_ch_utils.c\n@@ -115,7 +115,6 @@ const enum nl80211_band _rtw_band_to_nl80211_band[] = {\n \t[BAND_ON_6G]\t= NUM_NL80211_BANDS,\n \t#endif\n };\n-static_assert(ARRAY_SIZE(_rtw_band_to_nl80211_band) >= BAND_MAX);\n \n const enum band_type _nl80211_band_to_rtw_band[] = {\n \t[NL80211_BAND_2GHZ]\t= BAND_ON_24G,\n@@ -137,7 +136,6 @@ const enum band_type _nl80211_band_to_rtw_band[] = {\n \t[NL80211_BAND_LC]\t= BAND_MAX,\t/* light communication band (placeholder) */\n #endif\n };\n-static_assert(ARRAY_SIZE(_nl80211_band_to_rtw_band) >= NUM_NL80211_BANDS);\n \n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))\n const char *nl80211_chan_width_str(enum nl80211_chan_width cwidth)\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/RTL8851BU/patches/RTL8851BU-0002-Fix-compiling-for-Amlogic-5.15.119.patch",
    "content": "From 0c438fad4d255bffece393c8fd9dc57ec7a52d79 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Mon, 25 Nov 2024 11:44:36 +0100\nSubject: [PATCH] Fix compiling for Amlogic 5.15.119\n\n---\n os_dep/linux/ioctl_cfg80211.c | 24 ++++++++++++------------\n os_dep/linux/wifi_regd.c      |  6 +++---\n os_dep/osdep_service_linux.c  |  4 ++++\n 3 files changed, 19 insertions(+), 15 deletions(-)\n\ndiff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c\nindex 4f124b1..b18e22c 100644\n--- a/os_dep/linux/ioctl_cfg80211.c\n+++ b/os_dep/linux/ioctl_cfg80211.c\n@@ -235,7 +235,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter,\n \n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))\n \tstruct cfg80211_chan_def chdef;\n-\t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) || defined(CONFIG_MLD_KERNEL_PATCH)\n+\t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)) || defined(CONFIG_MLD_KERNEL_PATCH)\n \tu16 punct_bitmap = 0; /*TBD*/\n \t#endif\n \n@@ -268,7 +268,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter,\n \tif (!rtw_cfg80211_allow_ch_switch_notify(adapter))\n \t\tgoto exit;\n \n-\t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))\n+\t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))\n \tcfg80211_ch_switch_notify(adapter->pnetdev, &chdef, link_id, punct_bitmap);\n \t#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))\n \t/* ToDo CONFIG_RTW_MLD */\n@@ -1030,7 +1030,7 @@ check_bss:\n \t\t#endif\n \n \t\t#if defined(CPTCFG_VERSION) || LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)\n-\t\t#if defined(CONFIG_MLD_KERNEL_PATCH) || LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)\n+\t\t#if defined(CONFIG_MLD_KERNEL_PATCH) || LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119)\n \t\t/* ToDo CONFIG_RTW_MLD */\n \t\troam_info.links[0].bssid = cur_network->network.MacAddress;\n \t\t#else\n@@ -1812,7 +1812,7 @@ exit:\n }\n \n static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || defined(CONFIG_MLD_KERNEL_PATCH)\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119)) || defined(CONFIG_MLD_KERNEL_PATCH)\n \t, int link_id\n #endif\n \t, u8 key_index\n@@ -1979,7 +1979,7 @@ addkey_end:\n }\n \n static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || defined(CONFIG_MLD_KERNEL_PATCH)\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119)) || defined(CONFIG_MLD_KERNEL_PATCH)\n \t, int link_id\n #endif\n \t, u8 keyid\n@@ -2180,7 +2180,7 @@ exit:\n }\n \n static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || defined(CONFIG_MLD_KERNEL_PATCH)\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119)) || defined(CONFIG_MLD_KERNEL_PATCH)\n \t, int link_id\n #endif\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)\n@@ -2206,7 +2206,7 @@ static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev\n }\n \n static int cfg80211_rtw_set_default_key(struct wiphy *wiphy, struct net_device *ndev\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || defined(CONFIG_MLD_KERNEL_PATCH)\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119)) || defined(CONFIG_MLD_KERNEL_PATCH)\n \t, int link_id\n #endif\n \t, u8 key_index\n@@ -2261,7 +2261,7 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy, struct net_device *\n \n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))\n int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy, struct net_device *ndev\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || defined(CONFIG_MLD_KERNEL_PATCH)\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119)) || defined(CONFIG_MLD_KERNEL_PATCH)\n \t, int link_id\n #endif\n \t, u8 key_index)\n@@ -5704,7 +5704,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd\n }\n \n static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || defined(CONFIG_MLD_KERNEL_PATCH)\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119)) || defined(CONFIG_MLD_KERNEL_PATCH)\n \t, unsigned int link_id\n #endif\n )\n@@ -6706,7 +6706,7 @@ static int cfg80211_rtw_set_monitor_channel(struct wiphy *wiphy\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))\n static int cfg80211_rtw_get_channel(struct wiphy *wiphy,\n \tstruct wireless_dev *wdev,\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || defined(CONFIG_MLD_KERNEL_PATCH)\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119)) || defined(CONFIG_MLD_KERNEL_PATCH)\n \tunsigned int link_id,\n #endif\n \tstruct cfg80211_chan_def *chandef)\n@@ -8588,7 +8588,7 @@ void dump_mesh_config(void *sel, const struct mesh_config *conf)\n \tRTW_PRINT_SEL(sel, \"path_refresh_time:%u\\n\", conf->path_refresh_time);\n \tRTW_PRINT_SEL(sel, \"min_discovery_timeout:%u\\n\", conf->min_discovery_timeout);\n \tRTW_PRINT_SEL(sel, \"dot11MeshHWMPactivePathTimeout:%u\\n\", conf->dot11MeshHWMPactivePathTimeout);\n-\tRTW_PRINT_SEL(sel, \"dot11MeshHWMPpreqMinInterval:%u\\n\", conf->dot11MeshHWMPpreqMinInterval);\t\n+\tRTW_PRINT_SEL(sel, \"dot11MeshHWMPpreqMinInterval:%u\\n\", conf->dot11MeshHWMPpreqMinInterval);\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0))\n \tRTW_PRINT_SEL(sel, \"dot11MeshHWMPperrMinInterval:%u\\n\", conf->dot11MeshHWMPperrMinInterval);\n #endif\n@@ -11313,7 +11313,7 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)\n \trtw_cfg80211_indicate_scan_done(adapter, _TRUE);\n \n \t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)\n-\t#if (defined(CONFIG_MLD_KERNEL_PATCH) || (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)))\n+\t#if (defined(CONFIG_MLD_KERNEL_PATCH) || (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119)))\n \t/* ToDo CONFIG_RTW_MLD */\n \tif (wdev->valid_links && wdev->links[0].client.current_bss)\n \t#else\ndiff --git a/os_dep/linux/wifi_regd.c b/os_dep/linux/wifi_regd.c\nindex 06458c8..a8cdbad 100644\n--- a/os_dep/linux/wifi_regd.c\n+++ b/os_dep/linux/wifi_regd.c\n@@ -149,10 +149,10 @@ static void rtw_regd_schedule_dfs_chan_update(struct wiphy *wiphy)\n \t\trtw_regd_set_du_chdef(wiphy);\n \t}\n \n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))\n \t/* ToDo CONFIG_RTW_MLD */\n \tcfg80211_ch_switch_notify(wiphy_data->du_wdev->netdev, &wiphy_data->du_chdef, 0, 0);\n-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))\n+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119))\n \tcfg80211_ch_switch_notify(wiphy_data->du_wdev->netdev, &wiphy_data->du_chdef, 0);\n #else\n \tcfg80211_ch_switch_notify(wiphy_data->du_wdev->netdev, &wiphy_data->du_chdef);\n@@ -1054,7 +1054,7 @@ static void rtw_cfg80211_cac_event(struct rf_ctl_t *rfctl, u8 band_idx\n \t\t\tcontinue;\n \t\tif (!iface->rtw_wdev)\n \t\t\tcontinue;\n-#if defined(CONFIG_MLD_KERNEL_PATCH) || (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))\n+#if defined(CONFIG_MLD_KERNEL_PATCH) || (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119))\n \t\tasync = !((iface->rtw_wdev)->links[0].ap.chandef.chan);\n #else\n \t\tasync = !iface->rtw_wdev->chandef.chan;\ndiff --git a/os_dep/osdep_service_linux.c b/os_dep/osdep_service_linux.c\nindex b1bc4b1..012bc56 100644\n--- a/os_dep/osdep_service_linux.c\n+++ b/os_dep/osdep_service_linux.c\n@@ -15,6 +15,10 @@\n #define _OSDEP_SERVICE_LINUX_C_\n #include <drv_types.h>\n \n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119))\n+MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);\n+#endif\n+\n #ifdef DBG_MEMORY_LEAK\n ATOMIC_T _malloc_cnt = ATOMIC_INIT(0);\n ATOMIC_T _malloc_size = ATOMIC_INIT(0);\n-- \n2.43.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/RTW88/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"RTW88\"\nPKG_VERSION=\"dd5df33fc26f04705acf3e8b1ac70f3db6cdc008\"\nPKG_SHA256=\"cacbd7249fdae9d2dda354d572704e7a2666317206abe684fc976d592e5ed49b\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/lwfinger/rtw88\"\nPKG_URL=\"https://github.com/lwfinger/rtw88/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"Latest Realtek WiFi 5 Codes on Linux\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  kernel_make -C ${PKG_BUILD} \\\n    M=${PKG_BUILD} \\\n    KSRC=$(kernel_path)\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n    find ${PKG_BUILD}/ -name \\*.ko -not -path '*/\\.*' -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/RTW88/patches/0001-8822cs-add-0x024C-0xD821.patch",
    "content": "From 9643604d5edbe8feb528239f32d13c8a5a022555 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 5 Dec 2023 14:27:13 +0100\nSubject: [PATCH 1/2] 8822cs: add 0x024C 0xD821\n\n---\n rtw8822cs.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/rtw8822cs.c b/rtw8822cs.c\nindex 5d68b9a..32d682d 100644\n--- a/rtw8822cs.c\n+++ b/rtw8822cs.c\n@@ -11,6 +11,8 @@\n \n static const struct sdio_device_id rtw_8822cs_id_table[] =  {\n \t{\n+\t\tSDIO_DEVICE(SDIO_VENDOR_ID_REALTEK,\n+\t\t\t    SDIO_DEVICE_ID_REALTEK_RTW8821DS),\n \t\tSDIO_DEVICE(SDIO_VENDOR_ID_REALTEK,\n \t\t\t    SDIO_DEVICE_ID_REALTEK_RTW8822CS),\n \t\t.driver_data = (kernel_ulong_t)&rtw8822c_hw_spec,\n-- \n2.42.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/aic8800-sdio/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2024-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"aic8800-sdio\"\nPKG_VERSION=\"bf2b14e8357f65e6fa84da2905ea5c0756c7791c\"\nPKG_SHA256=\"2623b85b977d7792d0bc765d4a47d32028bd328756bca2b3f75536366389be62\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/radxa-pkg/aic8800\"\nPKG_URL=\"https://github.com/radxa-pkg/aic8800/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"AIC8800 SDIO WiFi and Bluetooth drivers\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  kernel_make -C ${PKG_BUILD}/src/SDIO/driver_fw/driver/aic8800 \\\n    M=${PKG_BUILD}/src/SDIO/driver_fw/driver/aic8800 \\\n    PWD=${PKG_BUILD}/src/SDIO/driver_fw/driver/aic8800 \\\n    KDIR=$(kernel_path) \\\n    CONFIG_PLATFORM_AMLOGIC=y \\\n    CONFIG_PLATFORM_UBUNTU=n \\\n    CONFIG_AIC_FW_PATH=/lib/firmware/aic8800D80 \\\n    modules\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n  cp ${PKG_BUILD}/src/SDIO/driver_fw/driver/aic8800/*/*.ko ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n\n  mkdir -p ${INSTALL}/$(get_full_firmware_dir)/aic8800D80\n  cp ${PKG_BUILD}/src/SDIO/driver_fw/fw/aic8800/* ${INSTALL}/$(get_full_firmware_dir)/aic8800D80\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/aic8800-sdio/patches/aic8800-sdio-fixes.patch",
    "content": "From 39abee3ef0e84e21e3a5bc1d863475547e5dc500 Mon Sep 17 00:00:00 2001\nFrom: Peter <peter.vicman@gmail.com>\nDate: Thu, 29 Feb 2024 12:07:46 +0100\nSubject: [PATCH] fix from forum and fix for linux 5.15.119\n\n---\n src/SDIO/driver_fw/driver/aic8800/aic8800_bsp/aicsdio.c    | 2 +-\n src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_compat.h | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/src/SDIO/driver_fw/driver/aic8800/aic8800_bsp/aicsdio.c b/src/SDIO/driver_fw/driver/aic8800/aic8800_bsp/aicsdio.c\nindex b95e754..599bda3 100644\n--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_bsp/aicsdio.c\n+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_bsp/aicsdio.c\n@@ -486,7 +486,7 @@ static int aicbsp_platform_power_on(void)\n \t\textern_wifi_set_enable(1);\n \t\tmdelay(200);\n \t\tsdio_reinit();\n-\t\tset_power_control_lock(1);\n+\t\t//set_power_control_lock(1);\n #endif\n \n #ifdef CONFIG_PLATFORM_ROCKCHIP2\ndiff --git a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_compat.h b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_compat.h\nindex 9287eca..10e3697 100644\n--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_compat.h\n+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_compat.h\n@@ -43,7 +43,7 @@\n #define HIGH_KERNEL_VERSION KERNEL_VERSION(5, 15, 41)\n #define HIGH_KERNEL_VERSION2 KERNEL_VERSION(5, 15, 41)\n #define HIGH_KERNEL_VERSION3 KERNEL_VERSION(5, 15, 104)\n-#define HIGH_KERNEL_VERSION4 KERNEL_VERSION(6, 1, 0)\n+#define HIGH_KERNEL_VERSION4 KERNEL_VERSION(5, 15, 119)\n #else\n #define HIGH_KERNEL_VERSION KERNEL_VERSION(6, 0, 0)\n #define HIGH_KERNEL_VERSION2 KERNEL_VERSION(6, 1, 0)\n-- \n2.41.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/RTL8723DS-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2024-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"RTL8723DS-aml\"\nPKG_VERSION=\"75b11e99be6cc02cea6a00310633b191de962098\"\nPKG_SHA256=\"93324f12e415e13f7b4c9359dcf8231fb4a4a7b459a01504828bfe1ee220502a\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/lwfinger/rtl8723ds\"\nPKG_URL=\"https://github.com/lwfinger/rtl8723ds/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"Realtek RTL8723DS Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  sed -i 's/#define DEFAULT_RANDOM_MACADDR.*/#define DEFAULT_RANDOM_MACADDR 0/g' ${PKG_BUILD}/core/rtw_ieee80211.c\n}\n\nmake_target() {\n  kernel_make -C ${PKG_BUILD} \\\n    M=${PKG_BUILD} \\\n    KSRC=$(kernel_path) \\\n    modules\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n  find ${PKG_BUILD}/ -name \\*.ko -not -path '*/\\.*' -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/RTL8723DS-aml/patches/0001-Fix-for-Amlogic-kernel-5.15.119.patch",
    "content": "diff -aurNp a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c\n--- a/os_dep/linux/ioctl_cfg80211.c\t2024-04-30 09:34:21.186379067 +0200\n+++ b/os_dep/linux/ioctl_cfg80211.c\t2024-04-30 09:38:20.291254173 +0200\n@@ -743,7 +743,7 @@ check_bss:\n \t\t#endif\n \n \t\t#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)\n-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)\n+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 78)\n \t\troam_info.bssid = cur_network->network.MacAddress;\n #else\n \t\troam_info.links[0].bssid = cur_network->network.MacAddress;\n@@ -1387,7 +1387,7 @@ exit:\n }\n \n static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev\n-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78)\n \t, int link_id\n #endif\n \t, u8 key_index\n@@ -1526,7 +1526,7 @@ addkey_end:\n }\n \n static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev\n-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78)\n \t, int link_id\n #endif\n \t, u8 keyid\n@@ -1561,7 +1561,7 @@ static int cfg80211_rtw_get_key(struct w\n \n static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)\n-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78)\n \t\t\t\tint link_id,\n #endif\n \t\t\t\tu8 key_index, bool pairwise, const u8 *mac_addr)\n@@ -1584,7 +1584,7 @@ static int cfg80211_rtw_del_key(struct w\n \n static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,\n \tstruct net_device *ndev,\n-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78)\n \tint link_id,\n #endif\n \t u8 key_index\n@@ -4201,7 +4201,7 @@ static int cfg80211_rtw_change_beacon(st\n \treturn ret;\n }\n \n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)\n #else\n static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)\n@@ -7070,7 +7070,7 @@ void rtw_wdev_unregister(struct wireless\n \t\tRTW_INFO(FUNC_ADPT_FMT\" clear connected by cfg80211_disconnected\\n\", FUNC_ADPT_ARG(adapter));\n \t\tcfg80211_disconnected(adapter->pnetdev, 0, NULL, 0, locally_generated, GFP_ATOMIC);\n \t}\n-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 0))\n+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 78))\n \tif (wdev->current_bss) {\n \t\tu8 locally_generated = 1;\n \t\tRTW_INFO(FUNC_ADPT_FMT\" clear current_bss by cfg80211_disconnected\\n\", FUNC_ADPT_ARG(adapter));\ndiff -aurNp a/os_dep/osdep_service.c b/os_dep/osdep_service.c\n--- a/os_dep/osdep_service.c\t2024-04-30 09:34:21.190379120 +0200\n+++ b/os_dep/osdep_service.c\t2024-04-30 09:40:58.346774274 +0200\n@@ -1218,6 +1218,9 @@ static int closeFile(struct file *fp)\n \treturn 0;\n }\n \n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119))\n+MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);\n+#endif\n static int readFile(struct file *fp, char *buf, int len)\n {\n \tint rlen = 0, sum = 0;\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/RTL8852BE-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"RTL8852BE-aml\"\nPKG_VERSION=\"b28630b2cd48748cb74d02cc3fce238ec6fef411\"\nPKG_SHA256=\"52c0e32e3917a3160e4c468a7bbe9fa21fd75c1ac0eb73883309e4e1cd11f61e\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/RTL8852BE-aml\"\nPKG_URL=\"https://github.com/CoreELEC/RTL8852BE-aml/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"Realtek RTL8852BE-aml Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  kernel_make -C ${PKG_BUILD}/rtl8852BE \\\n    M=${PKG_BUILD}/rtl8852BE \\\n    KSRC=$(kernel_path) \\\n    OUT_DIR= \\\n    CONFIG_RTKM=m \\\n    CONFIG_SDIO_HCI=n \\\n    CONFIG_PCI_HCI=y \\\n    CONFIG_POWER_SAVE=n \\\n    CONFIG_RTW_DEBUG=n \\\n    modules\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n  find ${PKG_BUILD}/ -name \\*.ko -not -path '*/\\.*' -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/RTL8852BS-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"RTL8852BS-aml\"\nPKG_VERSION=\"dd202f37cbffb0e93ba15746d373a87228334e5f\"\nPKG_SHA256=\"0acc9c0eb4203e690b4254cd563526b7aabfc7d43ec85dc7f2f5ef54212e0b41\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/Stane1983/rtl8852bs-aml\"\nPKG_URL=\"https://github.com/Stane1983/rtl8852bs-aml/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"Realtek RTL8852BS Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  sed -i 's/#define DEFAULT_RANDOM_MACADDR.*/#define DEFAULT_RANDOM_MACADDR 0/g' ${PKG_BUILD}/core/rtw_ieee80211.c\n}\n\nmake_target() {\n  kernel_make -C ${PKG_BUILD} \\\n    M=${PKG_BUILD} \\\n    KSRC=$(kernel_path) \\\n    CONFIG_POWER_SAVE=n \\\n    CONFIG_RTW_DEBUG=n \\\n    modules\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n  find ${PKG_BUILD}/ -name \\*.ko -not -path '*/\\.*' -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/ap6xxx-aml/modprobe.d/dhd_sdio.conf",
    "content": "options dhd_sdio firmware_path=/usr/lib/firmware/brcm/ nvram_path=/usr/lib/firmware/brcm/\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/ap6xxx-aml/modprobe.d/dhdpci.conf",
    "content": "options dhdpci firmware_path=/usr/lib/firmware/brcm/pcie/ nvram_path=/usr/lib/firmware/brcm/pcie/\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/ap6xxx-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"ap6xxx-aml\"\nPKG_VERSION=\"7a64f4c3f0435e56b8e02c7bff0a77f11d650089\"\nPKG_SHA256=\"44a8a71f12d141377adaa6fec1bfd207e6cdcef467caf92b862aa4037aca8a8e\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_URL=\"https://github.com/CoreELEC/ap6xxx-aml/archive/${PKG_VERSION}.tar.gz\"\nPKG_SITE=\"https://github.com/CoreELEC/ap6xxx-aml\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"ap6xxx: Linux drivers for AP6xxx WLAN chips used in some devices based on Amlogic SoCs\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  echo\n  echo \"building ap6275s and others\"\n  kernel_make -C  ${PKG_BUILD}/bcmdhd.101.10.591.x \\\n       M=${PKG_BUILD}/bcmdhd.101.10.591.x \\\n       PWD=${PKG_BUILD}/bcmdhd.101.10.591.x \\\n       KERNEL_SRC=$(kernel_path) \\\n       CONFIG_BCMDHD_DISABLE_WOWLAN=y \\\n       CONFIG_BCMDHD_SDIO=y \\\n       bcmdhd_sdio\n\n  echo \"building ap6275p\"\n  kernel_make -C  ${PKG_BUILD}/bcmdhd.101.10.591.x \\\n       M=${PKG_BUILD}/bcmdhd.101.10.591.x \\\n       PWD=${PKG_BUILD}/bcmdhd.101.10.591.x \\\n       KERNEL_SRC=$(kernel_path) \\\n       CONFIG_BCMDHD_DISABLE_WOWLAN=y \\\n       CONFIG_BCMDHD_PCIE=y \\\n       bcmdhd_pcie\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n  cp ${PKG_BUILD}/*/*.ko ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/common_drivers/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"common_drivers\"\nPKG_VERSION=\"a4e76c15585749bb4f6008535d015a163b763989\"\nPKG_SHA256=\"593e7ab037fd3b2156ae43694385b27e1c0274d8073ae3927bfc0e1df01f7f29\"\nPKG_LICENSE=\"GPL-2.0+ OR MIT\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"https://github.com/CoreELEC/common_drivers/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"\"\nPKG_LONGDESC=\"${PKG_NAME}: extra drivers for amlogic\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  :\n}\n\nmakeinstall_target() {\n  :\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/media_modules-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"media_modules-aml\"\nPKG_VERSION=\"ca9530ef9110f3ae54d5d7019588ec057a667f3b\"\nPKG_SHA256=\"d1b6019daec6e47872ba6142b5af0847b645f6998696b22c54e25404db86a5c9\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"https://github.com/CoreELEC/media_modules-aml/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"${PKG_NAME}: Linux driver\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  kernel_make -C $(kernel_path) M=${PKG_BUILD}/drivers \\\n    EXTRA_CFLAGS=\"-DLIMIT_DECODE_INSTANCE=1\" \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_MPEG2_MULTI=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_MPEG4_MULTI=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_VC1=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_H264_MULTI=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_H264_MVC=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_H265=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_H266=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_VP9=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_MJPEG_MULTI=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_AVS_MULTI=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_AVS2=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_AVS3=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_AV1=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_VP9_FB=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_H265_FB=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_AV1_FB=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_AVS2_FB=m\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n    find ${PKG_BUILD}/ -name \\*.ko -not -path '*/\\.*' -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \\;\n\n  mkdir -p ${INSTALL}/$(get_full_firmware_dir)/video/NO_TEE\n    for soc in ${TEE_SOC}; do\n      cp -PR ${PKG_BUILD}/firmware/${soc} ${INSTALL}/$(get_full_firmware_dir)/video\n    done\n    if [ -f \"${PKG_BUILD}/firmware/NO_TEE/video_ucode.bin\" ]; then\n      cp -PR ${PKG_BUILD}/firmware/NO_TEE/video_ucode.bin ${INSTALL}/$(get_full_firmware_dir)/video/NO_TEE\n    else\n      cp -PR ${PKG_BUILD}/firmware/video_ucode.bin ${INSTALL}/$(get_full_firmware_dir)/video/NO_TEE\n    fi\n\n  mkdir -p ${INSTALL}/usr/lib/coreelec\n    install -m 0755 ${PKG_DIR}/scripts/media_modules-aml.sh ${INSTALL}/usr/lib/coreelec/media_modules-aml\n    install -m 0755 ${PKG_DIR}/scripts/read-firmware-version.sh ${INSTALL}/usr/lib/coreelec/read-firmware-version\n}\n\npost_install() {\n  enable_service media_modules-aml.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/media_modules-aml/scripts/media_modules-aml.sh",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nsource /usr/lib/coreelec/read-firmware-version\nSET_ANDROID_FIRMWARE=\"/sys/class/firmware_codec/android_firmware_version\"\n\nmodprobe -q amvdec_ports\nmodprobe -q amvdec_avs\nmodprobe -q amvdec_avs2\nmodprobe -q amvdec_avs3\nmodprobe -q amvdec_mavs\nmodprobe -q amvdec_h264\nmodprobe -q amvdec_h264mvc\nmodprobe -q amvdec_mh264\nmodprobe -q amvdec_h265\nmodprobe -q amvdec_h266\nmodprobe -q amvdec_mjpeg\nmodprobe -q amvdec_mmjpeg\nmodprobe -q amvdec_mpeg12\nmodprobe -q amvdec_mmpeg12\nmodprobe -q amvdec_mpeg4\nmodprobe -q amvdec_mmpeg4\nmodprobe -q amvdec_real\nmodprobe -q amvdec_vc1\nmodprobe -q amvdec_av1\nmodprobe -q amvdec_vp9\nmodprobe -q amvdec_vp9_fb\nmodprobe -q amvdec_h265_fb\nmodprobe -q amvdec_av1_fb\nmodprobe -q amvdec_avs2_fb\n\nif [ -f ${SET_ANDROID_FIRMWARE} ]; then\n  read_firmware_version /vendor/lib/firmware/video/video_ucode.bin &>/dev/null\n  echo \"Android firmware version: ${minor}.${batch}\"\n  echo \"${minor}.${batch}\" > \"${SET_ANDROID_FIRMWARE}\"\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/media_modules-aml/scripts/read-firmware-version.sh",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2025-present Team CoreELEC (https://coreelec.org)\n\nread_firmware_version() {\n  local firmware_file=\"${1}\"\n  minor=0\n  batch=0\n\n  if [ -f \"${firmware_file}\" ]; then\n    local offset=0\n    magic=$(echo $(hexdump -e '1/4 \"%s\"' -n 4 -s ${offset} ${firmware_file}) | rev)\n\n    if [[ ${magic} != 'NEWP' && ${magic} != 'PACK' ]]; then\n      offset=256\n      magic=$(echo $(hexdump -e '1/4 \"%s\"' -n 4 -s ${offset} ${firmware_file}) | rev)\n\n      if [[ ${magic} != 'PACK' ]]; then\n        break\n      fi\n    fi\n\n    minor=$(hexdump -e '\"%d\"' -n 1 -s $((16 + ${offset})) ${firmware_file})\n    batch=$(hexdump -e '\"%d\"' -n 1 -s $((20 + ${offset})) ${firmware_file})\n  fi\n\n  echo 'minor=\"${minor}\"; batch=\"${batch}\"'\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/media_modules-aml/system.d/media_modules-aml.service",
    "content": "[Unit]\nDescription=Amlogic media_modules-aml service\nBefore=kodi.service\nAfter=opentee_linuxdriver.service\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/lib/coreelec/media_modules-aml\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/mt76/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2025-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"mt76\"\nPKG_VERSION=\"8c7afc3c2f62d55b375bfb8c8e1d940a5eabb5b2\"\nPKG_SHA256=\"dfdd52ba852354fa1faa724d753c7d417a4c2775aa263af0eb74ca7fa49407ee\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/mt76\"\nPKG_URL=\"https://github.com/CoreELEC/mt76/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"MediaTek Linux v5.15 dev WiFi/BT drivers\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  cd ${PKG_BUILD}/bluetooth\n\n  kernel_make \\\n    KCFLAGS=\"-DCONFIG_BT_MTK\" \\\n    KERNEL_SRC=$(kernel_path)\n\n  echo\n  cd ${PKG_BUILD}/mt76\n\n  kernel_make \\\n    CONFIG_MT76x0_COMMON=m \\\n    CONFIG_MT76x0U=m \\\n    CONFIG_MT76x2_COMMON=m \\\n    CONFIG_MT76x2U=m \\\n    CONFIG_MT7615_COMMON=m \\\n    CONFIG_MT7663_USB_SDIO_COMMON=m \\\n    CONFIG_MT7663S=m \\\n    CONFIG_MT7663U=m \\\n    CONFIG_MT7921_COMMON=m \\\n    CONFIG_MT7921S=m \\\n    KCFLAGS=\"-DCONFIG_MT76_LEDS\" \\\n    KERNEL_SRC=$(kernel_path)\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n  find ${PKG_BUILD}/ -name \\*.ko -not -path '*/\\.*' -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/mt7668-wifi-bt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"mt7668-wifi-bt\"\nPKG_VERSION=\"8039c882e313782c8b3e9594fcc9ee89a003fce4\"\nPKG_SHA256=\"5f04e8289b4384e56c7c27072bb0f53c6198d195fdda2f8bcf62e58aa2aa489e\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/noob404yt/mt7668-wifi-bt\"\nPKG_URL=\"https://github.com/CoreELEC/MT7668/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"WiFi & Bluetooth Drivers for MT7668\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  cd ${PKG_BUILD}/MT7668-Bluetooth\n  kernel_make EXTRA_CFLAGS=\"-w\" \\\n    KCFLAGS=\"-Wno-int-conversion\" \\\n    KERNEL_SRC=$(kernel_path)\n\n  echo\n\n  cd ${PKG_BUILD}/MT7668-WiFi\n  kernel_make EXTRA_CFLAGS=\"-w\" \\\n    KCFLAGS=\"-Wno-incompatible-function-pointer-types\" \\\n    KERNELDIR=$(kernel_path)\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n  find ${PKG_BUILD}/ -name \\*.ko -not -path '*/\\.*' -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \\;\n\n  mkdir -p ${INSTALL}/$(get_full_firmware_dir)\n  cp ${PKG_BUILD}/MT7668-WiFi/7668_firmware/* ${INSTALL}/$(get_full_firmware_dir)\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/opentee_linuxdriver/filesystem/aarch64/usr/lib/libteec.so.1",
    "content": "libteec.so.1.0"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/opentee_linuxdriver/filesystem/arm/usr/lib/libteec.so.1",
    "content": "libteec.so.1.0"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/opentee_linuxdriver/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"opentee_linuxdriver\"\nPKG_VERSION=\"0.1\"\nPKG_SHA256=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_LONGDESC=\"OP-TEE SECPU FW Loader\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  :\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/ta\n    ln -sf /var/lib/optee_armtz ${INSTALL}/usr/lib/optee_armtz\n\n    for soc in ${TEE_SOC}; do\n      DIRSOC=\"$(get_pkg_directory ${PKG_NAME})/filesystem/${ARCH}/ta/v3.8/dev/${soc}\"\n      [ -d ${DIRSOC} ] && cp -rP ${DIRSOC} ${INSTALL}/usr/lib/ta\n    done\n\n  mkdir -p ${INSTALL}/usr/lib/coreelec\n    install -m 0755 ${PKG_DIR}/scripts/tee-loader.sh ${INSTALL}/usr/lib/coreelec/tee-loader\n    install -m 0755 ${PKG_DIR}/scripts/dovi-loader.sh ${INSTALL}/usr/lib/coreelec/dovi-loader\n\n  cp -rP $(get_pkg_directory ${PKG_NAME})/filesystem/${ARCH}/usr ${INSTALL}\n}\n\npost_install() {\n  enable_service opentee_linuxdriver.service\n\n  # create mount points for Android partitions\n  # must be /vendor because .ta file is used by absolute path\n  mkdir -p ${INSTALL}/android/odm\n  mkdir -p ${INSTALL}/android/oem\n  mkdir -p ${INSTALL}/android/system\n  mkdir -p ${INSTALL}/android/vendor\n  ln -sf /android/system/system ${INSTALL}/system\n  ln -sf /android/vendor ${INSTALL}/vendor\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/opentee_linuxdriver/scripts/dovi-loader.sh",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\n# get coreelec release information\nsource /etc/os-release\n\nmessage() {\n  >&2 echo \"${@}\"\n}\n\n# Return 1 if given kernel version is lower than current dovi.ko module version\ncheck_dovi_version() {\n    version_higher=$(modinfo $1 | awk '/vermagic:/ {split($2, ver, \"-\"); print ver[1]}' | awk -F '.' \\\n      -v ker_ver=$2 -v maj_ver=$3 -v min_ver=$4 '{\n        if ($1 > ker_ver) { print \"Y\"; }\n        else if ($1 < ker_ver) { print \"N\"; }\n        else {\n          if ($2 > maj_ver) { print \"Y\"; }\n          else if ($2 < maj_ver) { print \"N\"; }\n          else {\n            if ($3 >= min_ver) { print \"Y\"; }\n            else { print \"N\"; }\n          }\n        }\n      }')\n\n    if [ \"$version_higher\" = \"Y\" ]; then\n      return 0\n    else\n      return 1\n    fi\n}\n\ninsmod_dovi() {\n  [ ! -f ${DOVI_KO_ANDROID} ] && return 1\n\n  modinfo ${DOVI_KO_ANDROID}\n\n  if check_dovi_version ${DOVI_KO_ANDROID} 5 15 137; then\n    message \"loading dovi module from android partition\"\n    insmod ${DOVI_KO_ANDROID}\n  else\n    cat > /tmp/dovi.message << 'EOF'\n[TITLE]CoreELEC Dolby Vision Media Playback[/TITLE]\n[B][COLOR red]Android Dolby Vision kernel module is not compatible[/COLOR][/B]\n[COLOR red]No Dolby Vision media playback possible![/COLOR]\n\nPlease upgrade Android firmware of your device to minimum Linux kernel version '5.15.137'.\nDolby Vision media will be displayed in HDR instead Dolby Vision until the firmware fulfill the minimum requirements.\nEOF\n  fi\n\n  return 0\n}\n\nload_dovi() {\n  # local dovi.ko\n  for DOVI_KO_STORAGE in /storage/.config/dovi.ko \\\n                         /flash/dovi.ko \\\n                         /storage/dovi.ko \\\n                         ; do\n    if [ -f ${DOVI_KO_STORAGE} ]; then\n      message \"loading dovi module from ce partition\"\n      modinfo ${DOVI_KO_STORAGE}\n      insmod ${DOVI_KO_STORAGE} && return\n    fi\n  done\n\n  # Android 12\n  if [ -b /dev/oem ]; then\n    mountpoint -q /android/oem || mount -o ro /dev/oem /android/oem\n\n    DOVI_KO_ANDROID=\"/android/oem/overlay/dovi.ko\"\n    insmod_dovi && return\n  fi\n\n  # Android 11\n  # if mounted from tee-loader don't mount/unmount from dovi-loader\n  if ! ls /dev/mapper/dynpart-* &>/dev/null && [ -b /dev/super ]; then\n    dmsetup create --concise \"$(parse-android-dynparts /dev/super)\"\n    systemctl set-environment dmsetup_remove=yes\n  fi\n\n  local active_slot=$(fw_printenv active_slot 2>/dev/null | awk -F '=' '/active_slot=/ {print $2}')\n\n  if [ -b /dev/mapper/dynpart-system_a ]; then\n    active_slot=\"_a\"\n  elif [ -b /dev/mapper/dynpart-system_b ]; then\n    active_slot=\"_b\"\n  else\n    active_slot=\"\"\n  fi\n\n  if [ -b /dev/mapper/dynpart-odm${active_slot} ]; then\n    mountpoint -q /android/odm || mount -o ro /dev/mapper/dynpart-odm${active_slot} /android/odm\n\n    DOVI_KO_ANDROID=\"/android/odm/lib/modules/dovi.ko\"\n    insmod_dovi && return\n  fi\n\n  # older Android\n  mountpoint -q /android/vendor || mount -o ro /dev/vendor /android/vendor\n\n  for DOVI_KO_ANDROID in /android/vendor/lib/modules/dovi.ko \\\n                         /android/vendor/lib/modules/dovi_vs10.ko \\\n                         ; do\n    insmod_dovi && return\n  done\n\n  cleanup_dovi\n}\n\ncleanup_dovi() {\n  rmmod dovi 2>/dev/null\n  mountpoint -q /android/odm && umount /android/odm\n  mountpoint -q /android/oem && umount /android/oem\n  mountpoint -q /android/vendor && umount /android/vendor\n  # unmount only if mounted from this script\n  [ \"${dmsetup_remove}\" = \"yes\" ] && \\\n    ls /dev/mapper/dynpart-* &>/dev/null && dmsetup remove /dev/mapper/dynpart-*\n}\n\nmessage \"run dovi '${1}'\"\n\ncase \"${1}\" in\n  start)\n    load_dovi\n    ;;\n  stop)\n    cleanup\n    ;;\nesac\n\nexit 0\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/opentee_linuxdriver/scripts/tee-loader.sh",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\n# get coreelec release information\nsource /etc/os-release\nsource /usr/lib/coreelec/read-firmware-version\n\nVIDEO_UCODE_BIN_PATH=/lib/firmware/video/video_ucode.bin\nTEE_SUPPLICANT_PID_FILE=/var/run/tee-supplicant.pid\n\nmessage() {\n  >&2 echo \"${@}\"\n}\n\nandroid_wrapper() {\n  local android_arch=$(od -An -t x1 -j 4 -N 1 /vendor/bin/tee-supplicant | tr -d '[:space:]')\n  local bit64=\"\"\n  local arg_exec=\"\"\n\n  [ \"${android_arch}\" = \"02\" ] && bit64=\"64\"  # 01 for 32-bit, 02 for 64 bit\n\n  if [ \"${1}\" = \"exec\" ]; then\n    arg_exec=\"exec\"\n    shift\n  fi\n\n  LD_LIBRARY_PATH=/system/lib${bit64}/bootstrap:/system/lib${bit64}:/vendor/lib${bit64} \\\n    ${arg_exec} \\\n    /system/bin/bootstrap/linker${bit64} \\\n    ${@}\n\n  return ${?}\n}\n\nrun_tee_from_coreelec() {\n  message \"run tee from coreelec start\"\n\n  local SOC=$(awk '/SoC[ \\t]*:/ {printf \"%s\", $3}' /proc/cpuinfo)\n\n  if [ -z \"${SOC}\" ]; then\n    message \"SoC architecture unknown\"\n    return 1\n  fi\n\n  mkdir -p /var/lib\n  ln -sfn /usr/lib/ta/${SOC} /var/lib/optee_armtz\n\n  [ -f $(dirname ${VIDEO_UCODE_BIN_PATH})/${SOC}/video_ucode.bin ] && \\\n    ln -sfn ${SOC}/video_ucode.bin ${VIDEO_UCODE_BIN_PATH}\n\n  tee-supplicant &\n  echo ${!} >${TEE_SUPPLICANT_PID_FILE}\n  # wait for tee-supplicant process to start\n  sleep 5\n\n  tee_preload_fw ${VIDEO_UCODE_BIN_PATH}\n  local rv=${?}\n  message \"run tee from coreelec end\"\n  return ${rv}\n}\n\nrun_tee_from_android() {\n  message \"run tee from android start\"\n\n  ! ls /dev/mapper/dynpart-* &>/dev/null && dmsetup create --concise \"$(parse-android-dynparts /dev/super)\"\n\n  local active_slot=$(fw_printenv active_slot 2>/dev/null | awk -F '=' '/active_slot=/ {print $2}')\n  message \"fw active slot: '${active_slot}'\"\n\n  if [ -b /dev/mapper/dynpart-system_a ]; then\n    active_slot=\"_a\"\n  elif [ -b /dev/mapper/dynpart-system_b ]; then\n    active_slot=\"_b\"\n  else\n    active_slot=\"\"\n  fi\n\n  message \"active slot: '${active_slot}'\"\n\n  mountpoint -q /android/system || mount -o ro /dev/mapper/dynpart-system${active_slot} /android/system\n  mountpoint -q /android/vendor || mount -o ro /dev/mapper/dynpart-vendor${active_slot} /android/vendor\n\n  read_firmware_version /vendor${VIDEO_UCODE_BIN_PATH} &>/dev/null\n  message \"Android ucode version: '${minor}.${batch}'\"\n  if [[ ${minor} -gt 4 || ( ${minor} -eq 4 && ${batch} -ge 1 ) ]]; then\n    message \"run tee from android end\"\n    return 2\n  fi\n\n  cat > /tmp/firmware.message << EOF\nFirmware version '${minor}.${batch}' found. Please update Android to enable the best possible media support.\nEOF\n\n  if [ ! -x /vendor/bin/tee-supplicant ]; then\n    message \"tee-supplicant does not exist on android\"\n    message \"run tee from android end\"\n    return 1\n  fi\n\n  android_wrapper exec /vendor/bin/tee-supplicant &\n  echo ${!} >${TEE_SUPPLICANT_PID_FILE}\n  # wait for tee-supplicant process to start\n  sleep 5\n\n  ln -sfn /vendor${VIDEO_UCODE_BIN_PATH} ${VIDEO_UCODE_BIN_PATH}\n\n  android_wrapper /vendor/bin/tee_preload_fw ${VIDEO_UCODE_BIN_PATH}\n  local rv=${?}\n  message \"run tee from android end\"\n  return ${rv}\n}\n\ncleanup_tee() {\n  message \"cleanup tee start\"\n\n  # process is killed by systemd\n  if [ -r ${TEE_SUPPLICANT_PID_FILE} ]; then\n    local tee_pid=$(cat ${TEE_SUPPLICANT_PID_FILE})\n    kill -s 0 ${tee_pid} 2>/dev/null && kill -KILL ${tee_pid}\n    rm -f ${TEE_SUPPLICANT_PID_FILE}\n  fi\n\n  mountpoint -q /android/system && umount /android/system\n  mountpoint -q /android/vendor && umount /android/vendor\n  ls /dev/mapper/dynpart-* &>/dev/null && dmsetup remove /dev/mapper/dynpart-*\n\n  message \"cleanup tee end\"\n}\n\n# run only if SoC is minimum SC2 (0x32) architecture\nSERIAL_THIS=$(awk '/^Serial[ \\t]*:/ {printf \"%d\", \"0x\" substr($3,0,2)}' /proc/cpuinfo)\nSERIAL_SC2=$(printf \"%d\" \"0x32\")\n\nif [ ${SERIAL_THIS} -lt ${SERIAL_SC2} ]; then\n  echo 1 > $(realpath /sys/module/*tee/parameters/disable_flag)\n  message \"tee not needed (SoC is less than SC2 (0x32) architecture)\"\n  ln -sfn NO_TEE/video_ucode.bin ${VIDEO_UCODE_BIN_PATH}\n  exit 0\nfi\n\ncase \"${1}\" in\n  start)\n    if [ -b /dev/super ]; then\n      run_tee_from_android\n      rv=${?}\n      [ ${rv} -eq 0 ] && exit 0\n\n      if [ ${rv} -eq 1 ]; then\n        message \"using tee from android failed, trying from coreelec\"\n        cleanup_tee\n      elif [ ${rv} -eq 2 ]; then\n        message \"tee from android match SCS version, trying from coreelec\"\n      fi\n    fi\n\n    run_tee_from_coreelec\n    [ ${?} -eq 0 ] && exit 0\n\n    if [ ! -b /dev/super ]; then exit 0; fi\n\n    cat > /tmp/tee.message << 'EOF'\n[TITLE]CoreELEC Media Playback[/TITLE]\n[B][COLOR red]Missing partition 'super' on eMMC![/COLOR][/B]\n[COLOR red]No media playback possible![/COLOR]\n\nCurrent Android installed on eMMC does not have 'super' partition which is required for media playback in CoreELEC. Android must be reinstalled on your device to satisfy the requirements.\n\nIf you have a CoreELEC internal install by the tool 'ceemmc' it is possible to perform the internal install again after Android is restored.\n\nPlease ensure you have done a backup of your data before perform any recovery step.\nEOF\n\n    message \"using tee from coreelec failed\"\n    cleanup_tee\n    ;;\n  stop)\n    cleanup_tee\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/opentee_linuxdriver/system.d/opentee_linuxdriver.service",
    "content": "[Unit]\nDescription=Optee TEE-Supplicant and Video Firmware Preload service\nBefore=kodi.service\nAfter=local-fs.target\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/lib/coreelec/tee-loader start\nExecStart=/usr/lib/coreelec/dovi-loader start\nExecStop=/usr/lib/coreelec/dovi-loader stop\nExecStop=/usr/lib/coreelec/tee-loader stop\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/w1-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"w1-aml\"\nPKG_VERSION=\"87d7603a6ec06688a3bb6bc68d9daad300e32de3\"\nPKG_SHA256=\"a3f1aad71b82b3bf08ee4936dced1844bcb57fe0a814811754aa99981c44b3c6\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/w1-aml\"\nPKG_URL=\"https://github.com/CoreELEC/w1-aml/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"Amlogic W150S1 Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  if [ \"${TARGET_KERNEL_ARCH}\" = \"arm\" ]; then\n    kernel_make -C $(kernel_path) M=${PKG_BUILD}/project_w1/vmac\n  else\n    ccflags=\"-mno-outline-atomics\n             -Wno-unused-variable\n             -Wno-unused-but-set-variable\n             -Wno-strict-prototypes\"\n    \n    kernel_make -C $(kernel_path) M=${PKG_BUILD}/project_w1/vmac \\\n      subdir-ccflags-y=\"${ccflags}\"\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n    find ${PKG_BUILD}/project_w1/vmac/ -name \\*.ko -not -path '*/\\.*' -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \\;\n\n  mkdir -p ${INSTALL}/$(get_full_firmware_dir)/w1\n    cp ${PKG_BUILD}/project_w1/vmac/aml_wifi*.txt ${INSTALL}/$(get_full_firmware_dir)/w1\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/w1-aml/udev.d/80-aml_sdio.rules",
    "content": "### Amlogic W150S1\n### this driver is split in two individual kernel modules\nENV{MODALIAS}==\"?*\", ENV{SUBSYSTEM}==\"sdio\", ENV{SDIO_ID}==\"8888:8888\", GOTO=\"load_module\"\nGOTO=\"end\"\n\nLABEL=\"load_module\"\nENV{MODALIAS}==\"?*\", ENV{SUBSYSTEM}==\"sdio\", RUN{builtin}+=\"kmod load aml_sdio\", RUN{builtin}+=\"kmod load vlsicomm\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/wifi_dummy-aml/modules-load.d/wifi_dummy.conf",
    "content": "wifi_dummy\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/wifi_dummy-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"wifi_dummy-aml\"\nPKG_VERSION=\"1.0\"\nPKG_SHA256=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"${PKG_NAME}: Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  kernel_make -C $(kernel_path) M=${PKG_BUILD}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n  cp ${PKG_BUILD}/wifi_dummy.ko ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/wifi_dummy-aml/sources/Makefile",
    "content": "obj-m += wifi_dummy.o\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/amlogic/wifi_dummy-aml/sources/wifi_dummy.c",
    "content": "#include <linux/delay.h>\n#include <linux/module.h>\n#include <linux/kernel.h>\n#include <linux/init.h>\n#include <linux/of_address.h>\n#include <linux/version.h>\n\nMODULE_LICENSE(\"GPL\");\nMODULE_AUTHOR(\"kszaq\");\nMODULE_DESCRIPTION(\"Amlogic WiFi power on and SDIO/PCIe rescan module\");\n\nextern void extern_wifi_set_enable(int);\nextern void sdio_reinit(void);\n\n#undef CONFIG_PCI\n\n#ifdef CONFIG_PCI\nextern void set_usb_wifi_power(int);\nextern void pci_remove(void);\nextern void pci_reinit(void);\n#endif\n\n/*\n      name sdio                name sdio                 name sd1          \n full_name sdio@fe088000  full_name /sdio@ffe03000  full_name /sd1@ffe05000\n\n      name pcie                name pcieA\n full_name pcie@e0000000  full_name /pcieA@fc000000\n*/\n\nstatic bool device_enabled(const char *path, const char *prefix)\n{\nstruct device_node *parent_node;\nstruct device_node *child;\nbool ret = false;\nint len;\n\n\t/*pr_info(\"wifi_dummy: path=%s prefix=%s\\n\", path, prefix);*/\n\n\tparent_node = of_find_node_by_path(path);\n\tif (parent_node) {\n\t\tfor_each_child_of_node(parent_node, child) {\n\t\t\t/*pr_info(\"wifi_dummy: full_name=%s, name=%s\\n\", child->full_name, child->name);*/\n\t\t\tif (!strncmp(child->name, prefix, strlen(prefix))) {\n\t\t\t\tlen = strlen(child->name);\n\n\t\t\t\tif (child->full_name[0] == '/')\n\t\t\t\t\tlen++;  /* include '/' */\n\n\t\t\t\tif (strlen(child->full_name) > len && child->full_name[len] == '@') {\n\t\t\t\t\tif (of_device_is_available(child)) {\n\t\t\t\t\t\tpr_info(\"wifi_dummy: found enabled %s\\n\", child->full_name);\n\t\t\t\t\t\tret = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpr_info(\"wifi_dummy: found disabled %s\\n\", child->full_name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tof_node_put(parent_node);\n\t}\n\n\treturn ret;\n}\n\nstatic int __init wifi_dummy_init(void)\n{\nbool sdio_en = false;\nbool pcie_en = false;\n\n\tpr_info(\"wifi_dummy: Triggered SDIO/PCIe WiFi power on and bus rescan\\n\");\n\n\tsdio_en  = device_enabled(\"/soc\", \"sdio\");\n\tpcie_en  = device_enabled(\"/soc\", \"pcie\");\n\tsdio_en |= device_enabled(\"/\", \"sdio\");\n\tpcie_en |= device_enabled(\"/\", \"pcie\");\n\tsdio_en |= device_enabled(\"/\", \"sd2\");\n\n\tif (!sdio_en && !pcie_en) {\n\t\tpr_info(\"wifi_dummy: SDIO/PCIe not enabled\\n\");\n\t\treturn -ENODEV;\n\t}\n\n\tpr_info(\"wifi_dummy: SDIO %s, PCIe %s\\n\",\n\t\tsdio_en ? \"enabled\" : \"disabled\",\n\t\tpcie_en ? \"enabled\" : \"disabled\");\n\n#ifdef CONFIG_PCI\n\tif (pcie_en) {\n\t\tpci_remove();\n\t\tset_usb_wifi_power(0);\n\t}\n#endif\n\n\tif (sdio_en) {\n\t\textern_wifi_set_enable(0);\n\t\tmsleep(300);\n\t\textern_wifi_set_enable(1);\n\t} else {\n\t\tmsleep(300);\n\t}\n\n#ifdef CONFIG_PCI\n\tif (pcie_en)\n\t\tset_usb_wifi_power(1);\n#endif\n\n\tmsleep(300);\n\n\tif (sdio_en)\n\t\tsdio_reinit();\n\n#ifdef CONFIG_PCI\n\tif (pcie_en)\n\t\tpci_reinit();\n#endif\n\n\treturn -ENODEV;\n}\n\nstatic void __exit wifi_dummy_cleanup(void)\n{\n\t/* unused */\n}\n\nmodule_init(wifi_dummy_init);\nmodule_exit(wifi_dummy_cleanup);\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/gpu-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"gpu-aml\"\nPKG_VERSION=\"ecf394cb42126b08da5b2abbbc3e07ae10850024\"\nPKG_SHA256=\"86715698649650478f107210f285d4308ce28c472102c9322f580ef7a5051f27\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"https://github.com/CoreELEC/gpu-aml/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"gpu-aml: Linux drivers for Mali GPUs found in Amlogic Meson SoCs\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  GPU_DRIVERS_ARCHITECTURE_REVISION=\"bifrost/r37p0 valhall/r41p0\"\n}\n\nmake_target() {\n  for driver_arch_rev in ${GPU_DRIVERS_ARCHITECTURE_REVISION}; do\n    echo\n    echo \"building ${driver_arch_rev}\"\n\n    kernel_make -C $(kernel_path) M=${PKG_BUILD}/${driver_arch_rev}/kernel/drivers/gpu/arm \\\n      CONFIG_MALI_MIDGARD=m CONFIG_MALI_PLATFORM_NAME=\"devicetree\" \\\n      EXTRA_CFLAGS=\"-I${PKG_BUILD}/${driver_arch_rev}/kernel/include -DCONFIG_MALI_LOW_MEM=0\"\n  done\n}\n\nmakeinstall_target() {\n  for driver_arch_rev in ${GPU_DRIVERS_ARCHITECTURE_REVISION}; do\n    echo\n    echo \"modules install ${driver_arch_rev}\"\n\n    driver_arch=${driver_arch_rev%%/*}\n\n    kernel_make -C $(kernel_path) M=${PKG_BUILD}/${driver_arch_rev}/kernel/drivers/gpu/arm \\\n      INSTALL_MOD_PATH=${INSTALL}/$(get_kernel_overlay_dir) INSTALL_MOD_STRIP=1 DEPMOD=: \\\n      modules_install\n\n    mv ${INSTALL}/$(get_kernel_overlay_dir)/lib/modules/$(get_module_dir)/extra/midgard/mali_kbase.ko \\\n       ${INSTALL}/$(get_kernel_overlay_dir)/lib/modules/$(get_module_dir)/extra/midgard/mali_kbase_${driver_arch}.ko\n  done\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/openvfd-driver/openvfd.conf.d/hc4.conf",
    "content": "vfd_gpio_clk='0,0,0xFF'\nvfd_gpio_dat='0,0,0xFF'\nvfd_gpio_stb='0,0,0xFF'\nvfd_gpio_protocol='1,2'\nvfd_chars='0,1,2,3,4'\nvfd_dot_bits='0,1,2,3,4,5,6'\nvfd_display_type='0x3F,0x3C,0x20,0xFD'\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/openvfd-driver/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Arthur Liberman (arthur_liberman@hotmail.com)\n\nPKG_NAME=\"openvfd-driver\"\nPKG_VERSION=\"3118dda3aeb5b2f02b0ac0b5d30cbef58947a805\"\nPKG_SHA256=\"fd0f38d059536e30000d3e2de3802ee97f8eeb7aac74143f0e588f803921a5ad\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/arthur-liberman/linux_openvfd\"\nPKG_URL=\"https://github.com/arthur-liberman/linux_openvfd/archive/$PKG_VERSION.tar.gz\"\nPKG_SOURCE_DIR=\"linux_openvfd-$PKG_VERSION*\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"openvfd-driver: an open source Linux driver for VFD displays\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  kernel_make -C \"$(kernel_path)\" M=\"$PKG_BUILD/driver\"\n\n  CFLAGS+=\" -Wno-implicit-function-declaration\"\n  make OpenVFDService\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n\n  mkdir -p $INSTALL/usr/sbin\n    cp -P OpenVFDService $INSTALL/usr/sbin\n\n  mkdir -p $INSTALL/usr/lib/coreelec\n    cp $PKG_DIR/scripts/* $INSTALL/usr/lib/coreelec/\n\n  mkdir -p $INSTALL/etc/openvfd.conf.d/\n    cp $PKG_DIR/openvfd.conf.d/* $INSTALL/etc/openvfd.conf.d/\n}\n\npost_install() {\n  enable_service openvfd.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/openvfd-driver/scripts/openvfd-start",
    "content": "#!/bin/sh\n\nOSRELEASEFILE=\"/etc/os-release\"\nUSRCONFFILE=\"/storage/.config/vfd.conf\"\nSYSCONFDIR=\"/etc/openvfd.conf.d\"\nPROC_DT=\"/proc/device-tree\"\nDT_ID=$(dtname)\n\ncase $DT_ID in\n  *odroid_hc4*)\n    SYSCONFFILE=\"$SYSCONFDIR/hc4.conf\"\n    ;;\nesac\n\nif [ \"$(tr -d '\\0' < $PROC_DT/openvfd/compatible)\" = \"open,vfd\" ]; then\n  if [ -f \"$USRCONFFILE\" ]; then\n    source \"$USRCONFFILE\"\n  elif [ -f \"$SYSCONFFILE\" ]; then\n    source \"$SYSCONFFILE\"\n  else\n    exit 0\n  fi\n  OS_SPLASH_OPT=\"\"\n  if [ -f \"$OSRELEASEFILE\" ]; then\n    source \"$OSRELEASEFILE\"\n    OS_SPLASH_OPT=\"-s CE${VERSION_ID%%.*}\"\n  fi\n  /sbin/modprobe openvfd vfd_gpio_clk=${vfd_gpio_clk} \\\n                         vfd_gpio_dat=${vfd_gpio_dat} \\\n                         vfd_gpio_stb=${vfd_gpio_stb:-0,0,0xFF} \\\n                         vfd_gpio0=${vfd_gpio0:-0,0,0xFF} \\\n                         vfd_gpio1=${vfd_gpio1:-0,0,0xFF} \\\n                         vfd_gpio2=${vfd_gpio2:-0,0,0xFF} \\\n                         vfd_gpio3=${vfd_gpio3:-0,0,0xFF} \\\n                         vfd_gpio_protocol=${vfd_gpio_protocol:-0,0} \\\n                         vfd_chars=${vfd_chars} vfd_dot_bits=${vfd_dot_bits} \\\n                         vfd_display_type=${vfd_display_type}\n  /usr/sbin/OpenVFDService $OS_SPLASH_OPT ${clock_12h_format:+-12h}\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-drivers/openvfd-driver/system.d/openvfd.service",
    "content": "[Unit]\nDescription=OpenVFD Service\nConditionPathExists=/proc/device-tree/openvfd/\nAfter=local-fs.target\n\n[Service]\nExecStart=/usr/lib/coreelec/openvfd-start\nExecStop=/bin/kill -TERM $MAINPID\nExecStopPost=-/usr/sbin/rmmod openvfd\nRemainAfterExit=yes\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-firmware/amlogic/bl30/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"bl30\"\nPKG_VERSION=\"02fffaea206644f493e8477bf03ce77e49df58b8\"\nPKG_SHA256=\"ff1b0139008ef76045014822bfa67699a0150cc2e7583c071bb5057a619c9c80\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"https://github.com/CoreELEC/bl30/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  unset CFLAGS LDFLAGS\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n\n  export PATH=${TOOLCHAIN}/lib/gcc7-linaro-aarch64-elf/bin:${TOOLCHAIN}/lib/gcc-riscv-none-embed/bin:${PATH}\n\n  for soc_dir in ${PKG_BUILD}/demos/amlogic/n200/*; do\n    if [ -d ${soc_dir} ]; then\n      soc=\"$(basename ${soc_dir})\"\n      for board in ${PKG_BUILD}/demos/amlogic/n200/${soc}/*; do\n        if [ -d ${board} -a -e ${board}/config.mk ]; then\n          echo \"Start building bl30 blob for\" `basename \"${board}\"`\", ${soc^^}\"\n          /bin/bash mk `basename \"${board}\"` ${soc}\n        fi\n      done\n    fi\n  done\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/bootloader/bl30\n\n  find ${PKG_BUILD}/ -name \\*.bin -not -path '*/\\.*' \\\n    -exec cp {} ${INSTALL}/usr/share/bootloader/bl30 \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-firmware/amlogic/qca-firmware-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"qca-firmware-aml\"\nPKG_VERSION=\"56716df3468fd87ade0ac98af5ec687376e9b4ef\"\nPKG_SHA256=\"4f3dd7ad50695c3f8205e38a1a703801d6033fcfda969c55606589229738178e\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"BSD-3c\"\nPKG_SITE=\"https://github.com/CoreELEC/qca-firmware-aml\"\nPKG_URL=\"https://github.com/CoreELEC/qca-firmware-aml/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"qca Linux firmware\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_firmware_dir)\n    cp -a * ${INSTALL}/$(get_full_firmware_dir)\n\n  # create a default firmware.conf for loading bluetooth NVM binaries\n  # Possible parameter:\n  # DEEP_SLEEP: Disable = 0 / Enable = 1\n  # PCM: Master = 0 / Slave = 1\n  mkdir -p ${INSTALL}/etc/bluetooth\n    echo \"DEEP_SLEEP=0\n\" > ${INSTALL}/etc/bluetooth/firmware.conf\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-firmware/amlogic/qca-firmware-aml/system.d/qca-firmware-aml.service",
    "content": "[Unit]\nDescription=Attach /dev/ttyS1 to BlueZ stack using qca type\nWants=bluetooth.service\nBefore=bluetooth.service\nAfter=dev-ttyS1.device\nStartLimitInterval=60\nStartLimitBurst=2\n\n[Service]\nType=simple\nExecStartPre=/usr/sbin/rfkill unblock bluetooth\nExecStart=/usr/bin/hciattach -n -s 115200 /dev/ttyS1 qca 2000000\nExecStopPost=/usr/sbin/rfkill block bluetooth\nRestart=always\nRestartSec=2\nLimitNPROC=1\nTimeoutStopSec=1s\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-firmware/amlogic/qca-firmware-aml/udev.d/80-qca-firmware-aml.rules",
    "content": "################################################################################\n# udev rules file for loading qca-firmware-aml\n################################################################################\n\nACTION==\"add\", SUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x0271\", ATTRS{device}==\"0x0[578]0?\", \\\n  TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"qca-firmware-aml.service\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-firmware/amlogic/rtkbt-firmware-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"rtkbt-firmware-aml\"\nPKG_VERSION=\"4d95579f256383af2df39d796f38a91ee6ec0b80\"\nPKG_SHA256=\"7a2884532969f84596f469cde599b8ecc026e80263ae64c9faf0e22a0332f569\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/rtkbt-firmware-aml\"\nPKG_URL=\"https://github.com/CoreELEC/rtkbt-firmware-aml/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain rtk_hciattach\"\nPKG_LONGDESC=\"Realtek BT Linux firmware\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  FWDIR=$INSTALL/$(get_full_firmware_dir)/rtlbt\n\n  mkdir -p $FWDIR\n    cp -a $PKG_BUILD/* $FWDIR\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-firmware/amlogic/rtkbt-firmware-aml/system.d/rtkbt-firmware-aml.service",
    "content": "[Unit]\nDescription=Attach /dev/ttyS1 to BlueZ stack using rtk_h5 type\nWants=bluetooth.service\nBefore=bluetooth.service\nAfter=dev-ttyS1.device\n\n[Service]\nType=simple\nExecStartPre=/usr/sbin/rfkill unblock bluetooth\nExecStart=/usr/bin/rtk_hciattach -n -s 115200 /dev/ttyS1 rtk_h5\nExecStopPost=/usr/sbin/rfkill block bluetooth\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-firmware/amlogic/rtkbt-firmware-aml/udev.d/80-rtkbt-firmware-aml.rules",
    "content": "################################################################################\n# udev rules file for loading realtek bt firmware\n################################################################################\n\nACTION!=\"add\", GOTO=\"end\"\n\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x024c\", ATTRS{device}==\"0xb723\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"rtkbt-firmware-aml.service\"\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x024c\", ATTRS{device}==\"0xb822\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"rtkbt-firmware-aml.service\"\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x024c\", ATTRS{device}==\"0xc822\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"rtkbt-firmware-aml.service\"\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x024c\", ATTRS{device}==\"0xb852\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"rtkbt-firmware-aml.service\"\n\nSUBSYSTEMS==\"pci\",  ENV{PCI_ID}==\"10EC:B852\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"rtkbt-firmware-aml.service\"\n\nGOTO=\"end\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-firmware/brcmfmac_sdio-firmware-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"brcmfmac_sdio-firmware-aml\"\nPKG_VERSION=\"8ce52bb7d022ee0645c681f84fbbb475f34475d5\"\nPKG_SHA256=\"ee846cb9a45b095f76c33fe0395a8ccde4c90b38f041e3f994f617c51a02ed79\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/brcmfmac_sdio-firmware-aml\"\nPKG_URL=\"https://github.com/CoreELEC/brcmfmac_sdio-firmware-aml/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Firmware for brcm bluetooth chips used in some Amlogic based devices.\"\n\nmakeinstall_target() {\n  DESTDIR=$INSTALL FWDIR=$INSTALL/$(get_kernel_overlay_dir) make install\n\n  cd $INSTALL/$(get_full_firmware_dir)/brcm\n  for f in *.hcd; do\n    ln -sr $f $(grep --text -o 'BCM[24]\\S*' $f).hcd 2>/dev/null || true\n    ln -sr $f $(grep --text -o 'BCM[24]\\S*' $f | cut -c4-).hcd 2>/dev/null || true\n    ln -sr $f $(echo $f | sed -r 's/[^.]*/\\U&/') 2>/dev/null || true\n  done\n  ln -sr bcm4335_V0343.0353.hcd bcm4335a0.hcd 2>/dev/null || true\n  ln -sr bcm4335_V0343.0353.hcd BCM4335A0.hcd 2>/dev/null || true\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-firmware/brcmfmac_sdio-firmware-aml/system.d/brcmfmac_sdio-firmware-aml.service",
    "content": "[Unit]\nDescription=Attach /dev/ttyS1 to BlueZ stack using bcm43xx type\nWants=bluetooth.service\nBefore=bluetooth.service\nAfter=dev-ttyS1.device\n\n[Service]\nType=simple\nExecStartPre=/usr/sbin/rfkill unblock bluetooth\nExecStart=/usr/bin/hciattach -n -s 115200 /dev/ttyS1 bcm43xx 2000000\nExecStopPost=/usr/sbin/rfkill block bluetooth\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-firmware/brcmfmac_sdio-firmware-aml/system.d/brcmfmac_sdio-firmware@.service",
    "content": "[Unit]\nDescription=Broadcom sdio firmware update for %I\nWants=bluetooth.service\nBefore=bluetooth.service\nAfter=dev-ttyS1.device\n\n[Service]\nType=simple\nExecStart=/usr/bin/brcm_patchram_plus --patchram /usr/lib/kernel-overlays/base/lib/firmware/brcm/%I.hcd --baudrate 2000000 --use_baudrate_for_download /dev/ttyS1 --enable_hci --no2bytes --tosleep=50000\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-firmware/brcmfmac_sdio-firmware-aml/udev.d/80-brcmfmac_pci.rules",
    "content": "################################################################################\n# udev rules file for loading brcmfmac_sdio-firmware-aml\n################################################################################\n\n### Broadcom AP6275p/BCM43752 bluetooth device\nSUBSYSTEMS==\"pci\", ATTRS{vendor}==\"0x14e4\", ACTION==\"add\", \\\n  TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"brcmfmac_sdio-firmware-aml.service\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-firmware/brcmfmac_sdio-firmware-aml/udev.d/80-brcmfmac_sdio.rules",
    "content": "################################################################################\n# udev rules file for loading brcmfmac_sdio-firmware-aml\n################################################################################\n\n### Broadcom bcm43362/bcm20710a1 bluetooth device\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x02d0\", ATTRS{device}==\"0xa962\", ACTION==\"add\", \\\n  TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"brcmfmac_sdio-firmware@bcm20710a1.service\", GOTO=\"end\"\n\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x02d0\", ACTION==\"add\", \\\n  TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"brcmfmac_sdio-firmware-aml.service\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/linux-firmware/wlan-firmware/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"wlan-firmware\"\nPKG_VERSION=\"2142727\"\nPKG_SHA256=\"d03e3108ef18ec10774b601d06d8445aebbd3c39f8ea3ab2b20a26c62af3500f\"\nPKG_LICENSE=\"Free-to-use\"\nPKG_SITE=\"https://github.com/LibreELEC/wlan-firmware\"\nPKG_URL=\"https://github.com/LibreELEC/wlan-firmware/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain rfkill\"\nPKG_LONGDESC=\"wlan-firmware: firmwares for various WLAN drivers\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  DESTDIR=$INSTALL/$(get_kernel_overlay_dir) ./install\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/CoreELEC-settings/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"CoreELEC-settings\"\nPKG_VERSION=\"8e7c1855c68e7f9c63dccdca31091299007a37a4\"\nPKG_SHA256=\"3e4c61fe18ac223afb70cfa7568a3c5781567469ae3a5292ce9be57d885598f8\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"https://github.com/CoreELEC/service.coreelec.settings/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 connman pygobject dbus-python bkeymaps\"\nPKG_LONGDESC=\"CoreELEC-settings: is a settings dialog for CoreELEC\"\n\nPKG_MAKE_OPTS_TARGET=\"DISTRONAME=${DISTRONAME} \\\n                      ADDON_VERSION=${ADDON_VERSION} \\\n                      ROOT_PASSWORD=${ROOT_PASSWORD}\"\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/coreelec\n  cp ${PKG_DIR}/scripts/* ${INSTALL}/usr/lib/coreelec\n\n  ADDON_INSTALL_DIR=${INSTALL}/usr/share/kodi/addons/service.coreelec.settings\n  python_compile ${ADDON_INSTALL_DIR}/resources/lib/\n  python_compile ${ADDON_INSTALL_DIR}/oe.py\n}\n\npost_install() {\n  enable_service backup-restore.service\n  enable_service factory-reset.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/CoreELEC-settings/scripts/backup-restore",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /usr/lib/libreelec/functions\n\n# Get NAME, which is DISTRONAME, ie. CoreELEC\n. /etc/os-release\n\nhidecursor\n\nBACKUP_FILE=`ls -1 /storage/.restore/??????????????.tar 2>/dev/null | tail -1`\n\nif [ -f \"${BACKUP_FILE}\" ] ; then\n  echo \"RESTORE IN PROGRESS\"\n  echo \"\"\n  echo \"Please do not reboot or turn off your ${NAME} device!\"\n  echo \"\"\n\n  StartProgress spinner \"Checking backup file... \"\n    tar tf ${BACKUP_FILE} &>/dev/null\n    ret=$?\n\n  if [ ${ret} -eq 0 ] ; then\n    StopProgress \"OK\"\n\n    echo\n    echo \"This may take some time to complete, please be patient.\"\n    echo\n\n    StartProgress spinner \"Restoring... \"\n      rm -rf /storage/.kodi &>/dev/null\n      rm -rf /storage/.cache &>/dev/null\n      rm -rf /storage/.config &>/dev/null\n      tar xf ${BACKUP_FILE} -C / &>/dev/null\n      rm -f ${BACKUP_FILE} &>/dev/null\n      # Leave a hint that we just did a restore\n      echo \"RESTORE\" > /storage/.config/boot.hint\n      sync\n      StopProgress \"done!\"\n\n    echo\n    StartProgress countdown \"Rebooting in 5s... \" 5 \"NOW\"\n  else\n    StopProgress \"FAILED\"\n\n    echo\n    echo \"Backup file is not valid, or corrupt.\"\n\n    echo\n    StartProgress spinner \"Removing file to allow normal restart... \"\n      rm -f ${BACKUP_FILE} &>/dev/null\n      sync\n      StopProgress \"done\"\n\n    echo\n    StartProgress countdown \"Rebooting in 30s... \" 30 \"NOW\"\n  fi\nfi\n\nsync\nreboot -f\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/CoreELEC-settings/scripts/factory-reset",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /usr/lib/libreelec/functions\n\n# Get NAME, which is DISTRONAME, ie. CoreELEC\n. /etc/os-release\n\nhidecursor\n\nlabel=\ntarget=\nuuid=\nceemmc=\n\nget_target() {\n  for arg in $(cat /proc/cmdline); do\n    case ${arg} in\n      disk=*)\n        disk=\"${arg#*=}\"\n        case ${disk} in\n          LABEL=*)\n            label=\"${disk#*=}\"\n            target=\"$(blkid -L ${label})\"\n            ;;\n          UUID=*)\n            uuid=\"${disk#*=}\"\n            target=\"$(blkid -U ${uuid})\"\n            ;;\n          FOLDER=*)\n            ceemmc=\"yes\"\n            target=\"${disk#*=}\"\n            ;;\n          /*)\n            target=\"${disk}\"\n            ;;\n        esac\n        ;;\n    esac\n  done\n}\n\nshow_reset_msg() {\n  echo \"RESET IN PROGRESS\"\n  echo \"\"\n  echo \"Please do not reboot or turn off your ${NAME} device!\"\n  echo \"\"\n}\n\nif [ -f /storage/.cache/reset_hard ] ; then\n  # hard reset\n  rm -f /storage/.cache/reset_hard\n  get_target\n  if [ ! -z ${target} ] ; then\n    show_reset_msg\n\n    StartProgress spinner \"Performing hard reset... \"\n    if [ \"${ceemmc}\" = \"yes\" ] ; then\n      # storage is just subfolder on Android data partition\n      rm -rf /storage/* &>/dev/null\n      rm -rf /storage/.[!.]* &>/dev/null\n    else\n      umount /storage\n      mke2fs -t ext4 -m 0 ${target} &>/dev/null\n      if [ ! -z ${label} ] ; then\n        tune2fs -U random -L ${label} ${target} &>/dev/null\n      fi\n      if [ ! -z ${uuid} ] ; then\n        tune2fs -U ${uuid} ${target} &>/dev/null\n      fi\n    fi\n    StopProgress \"done!\"\n\n    echo\n    StartProgress countdown \"Rebooting in 5s... \" 5 \"NOW\"\n  fi\nelif [ -f /storage/.cache/reset_soft ] ; then\n  # soft reset\n  rm -f /storage/.cache/reset_soft\n  get_target\n  if [ ! -z ${target} ] ; then\n    show_reset_msg\n\n    StartProgress spinner \"Performing soft reset... \"\n      rm -rf /storage/.??* &>/dev/null\n      # Leave a hint that we just did a soft reset\n      mkdir -p /storage/.config\n      echo \"RESET-SOFT\" > /storage/.config/boot.hint\n      StopProgress \"done!\"\n\n    echo\n    StartProgress countdown \"Rebooting in 5s... \" 5 \"NOW\"\n  fi\nfi\n\nsync\nreboot -f\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/CoreELEC-settings/system.d/backup-restore.service",
    "content": "[Unit]\nDescription=Restoring Backup\nDefaultDependencies=no\n\n[Service]\nType=idle\nExecStart=/usr/lib/coreelec/backup-restore\nStandardInput=tty-force\nStandardOutput=inherit\nStandardError=inherit\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/CoreELEC-settings/system.d/backup-restore.target",
    "content": "[Unit]\nDescription=Restoring Backup target\nRequires=backup-restore.service\nAfter=backup-restore.service\nAllowIsolate=yes\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/CoreELEC-settings/system.d/factory-reset.service",
    "content": "[Unit]\nDescription=Factory reset\nDefaultDependencies=no\n\n[Service]\nType=idle\nExecStart=/usr/lib/coreelec/factory-reset\nStandardInput=tty-force\nStandardOutput=inherit\nStandardError=inherit\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/CoreELEC-settings/system.d/factory-reset.target",
    "content": "[Unit]\nDescription=Factory reset target\nRequires=factory-reset.service\nAfter=factory-reset.service\nAllowIsolate=yes\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/config/advancedsettings.xml",
    "content": "<advancedsettings>\n  <cputempcommand>/usr/bin/cputemp</cputempcommand>\n  <gputempcommand>/usr/bin/gputemp</gputempcommand>\n\n  <showexitbutton>false</showexitbutton>\n  <remotedelay>1</remotedelay>\n  <samba>\n    <clienttimeout>30</clienttimeout>\n  </samba>\n  <splash>false</splash>\n</advancedsettings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/config/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n\n  <section id=\"games\">\n    <category id=\"gamesgeneral\">\n      <group id=\"1\">\n        <setting id=\"gamesgeneral.enablerewind\">\n          <default>false</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n  <section id=\"system\">\n    <category id=\"display\">\n      <group id=\"1\">\n        <setting id=\"videoscreen.screen\">\n          <visible>false</visible>\n        </setting>\n      </group>\n      <group id=\"3\">\n        <setting id=\"videoscreen.noofbuffers\">\n          <default>2</default>\n        </setting>\n      </group>\n    </category>\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.volumesteps\">\n          <default>20</default>\n        </setting>\n      </group>\n    </category>\n    <category id=\"logging\">\n      <group id=\"1\">\n        <setting id=\"debug.screenshotpath\">\n          <default>/storage/screenshots/</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n  <section id=\"services\">\n    <category id=\"airplay\">\n      <group id=\"1\">\n        <setting id=\"services.airplay\">\n          <default>true</default>\n        </setting>\n      </group>\n    </category>\n\n    <category id=\"smb\">\n      <group id=\"2\">\n        <setting id=\"smb.maxprotocol\">\n          <default>0</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n  <section id=\"pvr\">\n    <category id=\"epg\">\n      <group id=\"2\">\n        <setting id=\"epg.preventupdateswhileplayingtv\">\n          <default>true</default>\n        </setting>\n        <setting id=\"epg.ignoredbforclient\">\n          <default>true</default>\n        </setting>\n      </group>\n    </category>\n\n    <category id=\"pvrplayback\">\n      <group id=\"1\">\n        <setting id=\"pvrplayback.signalquality\">\n          <default>false</default>\n        </setting>\n      </group>\n    </category>\n\n    <category id=\"pvrpowermanagement\">\n      <group id=\"1\">\n        <setting id=\"pvrpowermanagement.setwakeupcmd\">\n          <default>/usr/bin/setwakeup.sh</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/config/guisettings.xml",
    "content": "<settings version=\"2\">\n  <general>\n    <settinglevel>2</settinglevel>\n  </general>\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/config/kodi.conf.in",
    "content": "KODI_AE_SINK=@KODI_AE_SINK@\nHOME=/storage\nKODI_TEMP=/storage/.kodi/temp\nKODI_HOME=/usr/share/kodi/\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/config/network_wait",
    "content": "WAIT_NETWORK=\"true\"\nWAIT_NETWORK_TIME=\"10\"\nWAIT_NETWORK_DEFAULT=\"true\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/config/repository.coreelec/addon.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"@ADDON_REPO_ID@\"\n\t\tname=\"@ADDON_REPO_NAME@\"\n\t\tversion=\"@ADDON_VERSION@\"\n\t\tprovider-name=\"CoreELEC\">\n\t<extension point=\"xbmc.addon.repository\"\n\t\tname=\"@ADDON_REPO_NAME@\">\n\t\t<dir>\n\t\t\t<info>@ADDON_URL@/addons.xml.gz</info>\n\t\t\t<checksum verify=\"sha256\">@ADDON_URL@/addons.xml.gz?sha256</checksum>\n\t\t\t<datadir>@ADDON_URL@</datadir>\n\t\t</dir>\n\t</extension>\n\t<extension point=\"xbmc.addon.metadata\">\n\t\t<summary>@ADDON_REPO_NAME@</summary>\n\t\t<description>The CoreELEC add-on repository contains Kodi PVR Clients and Servers, Screensavers, Visualisations, and more. Add-ons in this repository are maintained and supported by CoreELEC staff and YOU the community. If you find a broken or non-working add-on please report it via the forums, or help by submitting fixes via GitHub.</description>\n\t\t<platform>all</platform>\n\t</extension>\n</addon>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/config/sources.xml",
    "content": "<sources>\n  <video>\n      <default pathversion=\"1\"></default>\n      <source>\n          <name>Videos</name>\n          <path pathversion=\"1\">/storage/videos/</path>\n          <allowsharing>true</allowsharing>\n      </source>\n      <source>\n          <name>TV Shows</name>\n          <path pathversion=\"1\">/storage/tvshows/</path>\n          <allowsharing>true</allowsharing>\n      </source>\n  </video>\n  <music>\n      <default pathversion=\"1\"></default>\n      <source>\n          <name>Music</name>\n          <path pathversion=\"1\">/storage/music/</path>\n          <allowsharing>true</allowsharing>\n      </source>\n  </music>\n  <pictures>\n      <default pathversion=\"1\"></default>\n      <source>\n          <name>Pictures</name>\n          <path pathversion=\"1\">/storage/pictures/</path>\n          <allowsharing>true</allowsharing>\n      </source>\n  </pictures>\n</sources>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/debug.d/kodi.conf",
    "content": "KODI_DEBUG=\"--debug\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.tv)\n\nPKG_NAME=\"kodi\"\nPKG_VERSION=\"9678a65b02c9a5c56552d5831f52f16ff5245583\"\nPKG_SHA256=\"2d1af54f5900f9a3355192b39725df1812aa2e6f9bc711262ec82f8e6f24344c\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kodi.tv\"\nPKG_URL=\"https://github.com/CoreELEC/xbmc/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain JsonSchemaBuilder:host TexturePacker:host Python3 zlib systemd lzo pcre2 swig:host libass curl exiv2 fontconfig fribidi tinyxml tinyxml2 libjpeg-turbo freetype libcdio taglib libxml2 libxslt rapidjson sqlite ffmpeg crossguid libfmt lirc libfstrcmp flatbuffers:host flatbuffers libudfread spdlog obu_util libdovi\"\nPKG_DEPENDS_UNPACK=\"commons-lang3 commons-text groovy\"\nPKG_DEPENDS_HOST=\"toolchain\"\nPKG_LONGDESC=\"A free and open source cross-platform media player.\"\nPKG_BUILD_FLAGS=\"+speed\"\n\npost_unpack() {\n  if [ -f ${DISTRO_DIR}/${DISTRO}/splash/${DEVICE}/splash-1080.png ]; then\n    rm -rf $(get_build_dir ${PKG_NAME})/media/splash.*\n    cp -PR ${DISTRO_DIR}/${DISTRO}/splash/${DEVICE}/splash-1080.png $(get_build_dir ${PKG_NAME})/media/splash.png\n  fi\n\n  sed -e \"s|@ADDON_REPO_ID@|${ADDON_REPO_ID}|g\" -i $(get_build_dir ${PKG_NAME})/version.txt\n  sed -e \"s|@ADDON_SERVER_URL@|${ADDON_SERVER_URL}|g\" -i $(get_build_dir ${PKG_NAME})/version.txt\n\n  # don't build internal TexturePacker\n  sed -i 's|set(INTERNAL_TEXTUREPACKER_INSTALLABLE TRUE|set(INTERNAL_TEXTUREPACKER_INSTALLABLE FALSE|' \\\n    $(get_build_dir ${PKG_NAME})/cmake/modules/buildtools/FindTexturePacker.cmake\n}\n\nconfigure_package() {\n  # Single threaded LTO is very slow so rely on Kodi for parallel LTO support\n  if [ \"${LTO_SUPPORT}\" = \"yes\" ] && ! build_with_debug; then\n    PKG_KODI_USE_LTO=\"-DUSE_LTO=${CONCURRENCY_MAKE_LEVEL}\"\n  fi\n\n  # Set linker options\n  case $(get_target_linker) in\n    gold)\n      PKG_KODI_LINKER=\"-DENABLE_GOLD=ON \\\n                       -DENABLE_MOLD=OFF\"\n      ;;\n    mold)\n      PKG_KODI_LINKER=\"-DENABLE_GOLD=OFF \\\n                       -DENABLE_MOLD=ON \\\n                       -DMOLD_EXECUTABLE=${TOOLCHAIN}/${TARGET_NAME}/bin/mold\"\n      ;;\n    *)\n      PKG_KODI_LINKER=\"-DENABLE_GOLD=OFF \\\n                       -DENABLE_MOLD=OFF\"\n      ;;\n  esac\n\n  get_graphicdrivers\n\n  PKG_DEPENDS_TARGET+=\" dbus\"\n\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_DEPENDS_TARGET+=\" libX11 libXext libdrm libXrandr\"\n    KODI_PLATFORM=\"-DCORE_PLATFORM_NAME=x11 \\\n                   -DAPP_RENDER_SYSTEM=gl\"\n  elif [ \"${DISPLAYSERVER}\" = \"wl\" ]; then\n    PKG_DEPENDS_TARGET+=\" wayland waylandpp\"\n    PKG_PATCH_DIRS+=\" wayland\"\n    CFLAGS+=\" -DEGL_NO_X11\"\n    CXXFLAGS+=\" -DEGL_NO_X11\"\n    KODI_PLATFORM=\"-DCORE_PLATFORM_NAME=wayland \\\n                   -DAPP_RENDER_SYSTEM=gles \\\n                   -DWAYLANDPP_SCANNER=${TOOLCHAIN}/bin/wayland-scanner++ \\\n                   -DWAYLANDPP_PROTOCOLS_DIR=${SYSROOT_PREFIX}/usr/share/waylandpp/protocols\"\n  fi\n\n  if [ ! \"${OPENGL}\" = \"no\" ]; then\n    PKG_DEPENDS_TARGET+=\" ${OPENGL} glu\"\n  fi\n\n  if [ \"${OPENGLES_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\n  fi\n\n  if [ \"${KODI_ALSA_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" alsa-lib\"\n    KODI_ALSA=\"-DENABLE_ALSA=ON\"\n  else\n    KODI_ALSA=\"-DENABLE_ALSA=OFF\"\n  fi\n\n  if [ \"${KODI_PULSEAUDIO_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" pulseaudio\"\n    KODI_PULSEAUDIO=\"-DENABLE_PULSEAUDIO=ON\"\n  else\n    KODI_PULSEAUDIO=\"-DENABLE_PULSEAUDIO=OFF\"\n  fi\n\n  if [ \"${ESPEAK_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" espeak-ng\"\n  fi\n\n  if [ \"${KODI_PIPEWIRE_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" pipewire\"\n    KODI_PIPEWIRE=\"-DENABLE_PIPEWIRE=ON\"\n\n    if [ \"${KODI_PULSEAUDIO_SUPPORT}\" = \"yes\" -o \"${KODI_ALSA_SUPPORT}\" = \"yes\" ]; then\n      die \"KODI_PULSEAUDIO_SUPPORT and KODI_ALSA_SUPPORT cannot be used with KODI_PIPEWIRE_SUPPORT\"\n    fi\n  else\n    KODI_PIPEWIRE=\"-DENABLE_PIPEWIRE=OFF\"\n  fi\n\n  if [ \"${CEC_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libcec\"\n    KODI_CEC=\"-DENABLE_CEC=ON\"\n  else\n    KODI_CEC=\"-DENABLE_CEC=OFF\"\n  fi\n\n  if [ \"${CEC_FRAMEWORK_SUPPORT}\" = \"yes\" ]; then\n    PKG_PATCH_DIRS+=\" cec-framework\"\n  fi\n\n  if [ \"${KODI_OPTICAL_SUPPORT}\" = yes ]; then\n    KODI_OPTICAL=\"-DENABLE_OPTICAL=ON\"\n  else\n    KODI_OPTICAL=\"-DENABLE_OPTICAL=OFF\"\n  fi\n\n  if [ \"${KODI_BLURAY_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libbluray\"\n    KODI_BLURAY=\"-DENABLE_BLURAY=ON\"\n  else\n    KODI_BLURAY=\"-DENABLE_BLURAY=OFF\"\n  fi\n\n  if [ \"${AVAHI_DAEMON}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" avahi nss-mdns\"\n    KODI_AVAHI=\"-DENABLE_AVAHI=ON\"\n  else\n    KODI_AVAHI=\"-DENABLE_AVAHI=OFF\"\n  fi\n\n  case \"${KODI_MYSQL_SUPPORT}\" in\n    mysql)\n      PKG_DEPENDS_TARGET+=\" mysql\"\n      KODI_MYSQL=\"-DENABLE_MYSQLCLIENT=ON -DENABLE_MARIADBCLIENT=OFF\"\n      ;;\n    mariadb)\n      PKG_DEPENDS_TARGET+=\" mariadb-connector-c\"\n      KODI_MYSQL=\"-DENABLE_MARIADBCLIENT=ON -DENABLE_MYSQLCLIENT=OFF\"\n      ;;\n    *)\n      KODI_MYSQL=\"-DENABLE_MYSQLCLIENT=OFF -DENABLE_MARIADBCLIENT=OFF\"\n      ;;\n  esac\n\n  if [ \"${KODI_AIRPLAY_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libplist\"\n    KODI_AIRPLAY=\"-DENABLE_PLIST=ON\"\n  else\n    KODI_AIRPLAY=\"-DENABLE_PLIST=OFF\"\n  fi\n\n  if [ \"${KODI_AIRTUNES_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libshairplay\"\n    KODI_AIRTUNES=\"-DENABLE_AIRTUNES=ON\"\n  else\n    KODI_AIRTUNES=\"-DENABLE_AIRTUNES=OFF\"\n  fi\n\n  if [ \"${KODI_NFS_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libnfs\"\n    KODI_NFS=\"-DENABLE_NFS=ON\"\n  else\n    KODI_NFS=\"-DENABLE_NFS=OFF\"\n  fi\n\n  if [ \"${KODI_SAMBA_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" samba\"\n    KODI_SAMBA=\"-DENABLE_SMBCLIENT=ON\"\n  else\n    KODI_SAMBA=\"-DENABLE_SMBCLIENT=OFF\"\n  fi\n\n  if [ \"${KODI_WEBSERVER_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libmicrohttpd\"\n  fi\n\n  if [ \"${KODI_UPNP_SUPPORT}\" = yes ]; then\n    KODI_UPNP=\"-DENABLE_UPNP=ON\"\n  else\n    KODI_UPNP=\"-DENABLE_UPNP=OFF\"\n  fi\n\n  if [ \"${TARGET_ARCH}\" = \"aarch64\" -o \"${TARGET_ARCH}\" = \"arm\" ]; then\n    if target_has_feature neon; then\n      KODI_NEON=\"-DENABLE_NEON=ON\"\n    else\n      KODI_NEON=\"-DENABLE_NEON=OFF\"\n    fi\n  else\n    KODI_NEON=\"\"\n  fi\n\n  if [ \"${VDPAU_SUPPORT}\" = \"yes\" -a \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_DEPENDS_TARGET+=\" libvdpau\"\n    KODI_VDPAU=\"-DENABLE_VDPAU=ON\"\n  else\n    KODI_VDPAU=\"-DENABLE_VDPAU=OFF\"\n  fi\n\n  if [ \"${VAAPI_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libva\"\n    KODI_VAAPI=\"-DENABLE_VAAPI=ON\"\n  else\n    KODI_VAAPI=\"-DENABLE_VAAPI=OFF\"\n  fi\n\n  if [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n    KODI_ARCH=\"-DWITH_CPU=${TARGET_ARCH}\"\n  else\n    KODI_ARCH=\"-DWITH_ARCH=${TARGET_ARCH}\"\n  fi\n\n  if [ ! \"${KODIPLAYER_DRIVER}\" = \"default\" -a \"${DISPLAYSERVER}\" = \"no\" ]; then\n    PKG_DEPENDS_TARGET+=\" ${KODIPLAYER_DRIVER} libinput libxkbcommon\"\n    if [ \"${OPENGLES_SUPPORT}\" = yes -a \"${KODIPLAYER_DRIVER}\" = \"${OPENGLES}\" ]; then\n      KODI_PLATFORM=\"-DCORE_PLATFORM_NAME=gbm -DAPP_RENDER_SYSTEM=gles\"\n      CFLAGS+=\" -DEGL_NO_X11\"\n      CXXFLAGS+=\" -DEGL_NO_X11\"\n      if [ \"${PROJECT}\" = \"Generic\" ]; then\n        PKG_APPLIANCE_XML=\"${PKG_DIR}/config/appliance-gbm-generic.xml\"\n      else\n        PKG_APPLIANCE_XML=\"${PKG_DIR}/config/appliance-gbm.xml\"\n      fi\n    elif [ \"${KODIPLAYER_DRIVER}\" = libamcodec ]; then\n      KODI_PLATFORM=\"-DCORE_PLATFORM_NAME=aml -DAPP_RENDER_SYSTEM=gles\"\n    fi\n  fi\n\n  PKG_CMAKE_OPTS_TARGET=\"-DNATIVEPREFIX=${TOOLCHAIN} \\\n                         -DWITH_TEXTUREPACKER=${TOOLCHAIN}/bin/TexturePacker \\\n                         -DWITH_JSONSCHEMABUILDER=${TOOLCHAIN}/bin/JsonSchemaBuilder \\\n                         -DSWIG_EXECUTABLE=${TOOLCHAIN}/bin/swig \\\n                         -DPYTHON_EXECUTABLE=${TOOLCHAIN}/bin/${PKG_PYTHON_VERSION} \\\n                         -DPYTHON_INCLUDE_DIRS=${SYSROOT_PREFIX}/usr/include/${PKG_PYTHON_VERSION} \\\n                         -DGIT_VERSION=${PKG_VERSION} \\\n                         -DFFMPEG_PATH=${SYSROOT_PREFIX}/usr \\\n                         -DENABLE_INTERNAL_CROSSGUID=OFF \\\n                         -DENABLE_INTERNAL_EXIV2=OFF \\\n                         -DENABLE_INTERNAL_FFMPEG=OFF \\\n                         -DENABLE_INTERNAL_FLATBUFFERS=OFF \\\n                         -DENABLE_INTERNAL_RapidJSON=OFF \\\n                         -DENABLE_INTERNAL_SPDLOG=OFF \\\n                         -DENABLE_INTERNAL_UDFREAD=OFF \\\n                         -DENABLE_UDEV=ON \\\n                         -DENABLE_DBUS=ON \\\n                         -DENABLE_XSLT=ON \\\n                         -DENABLE_CCACHE=OFF \\\n                         -DENABLE_LIRCCLIENT=ON \\\n                         -DENABLE_EVENTCLIENTS=ON \\\n                         -DENABLE_DEBUGFISSION=OFF \\\n                         -DENABLE_APP_AUTONAME=OFF \\\n                         -DENABLE_TESTING=OFF \\\n                         -DENABLE_LCMS2=OFF \\\n                         -DADDONS_CONFIGURE_AT_STARTUP=OFF \\\n                         -DENABLE_LIBDOVI=ON \\\n                         -Dgroovy_SOURCE_DIR=$(get_build_dir groovy) \\\n                         -Dapache-commons-lang_SOURCE_DIR=$(get_build_dir commons-lang3) \\\n                         -Dapache-commons-text_SOURCE_DIR=$(get_build_dir commons-text) \\\n                         -DPCRE2_USE_STATIC_LIBS=ON \\\n                         ${PKG_KODI_USE_LTO} \\\n                         ${PKG_KODI_LINKER} \\\n                         ${KODI_ARCH} \\\n                         ${KODI_NEON} \\\n                         ${KODI_VDPAU} \\\n                         ${KODI_VAAPI} \\\n                         ${KODI_CEC} \\\n                         ${KODI_PLATFORM} \\\n                         ${KODI_SAMBA} \\\n                         ${KODI_NFS} \\\n                         ${KODI_AVAHI} \\\n                         ${KODI_UPNP} \\\n                         ${KODI_MYSQL} \\\n                         ${KODI_AIRPLAY} \\\n                         ${KODI_AIRTUNES} \\\n                         ${KODI_OPTICAL} \\\n                         ${KODI_BLURAY} \\\n                         ${KODI_ALSA} \\\n                         ${KODI_PULSEAUDIO} \\\n                         ${KODI_PIPEWIRE}\"\n}\n\nprepare_libdvd_library() {\n  # arg1 is library name libdvdcss/libdvdnav/libdvdread\n  local LIBRARY_VERSION=\"$(awk -F= '/VERSION=/ {print $2}' ${PKG_BUILD}/tools/depends/target/${1}/${1^^}-VERSION)\"\n  local LIBRARY_SHA512=\"$(awk  -F= '/SHA512=/  {print $2}' ${PKG_BUILD}/tools/depends/target/${1}/${1^^}-VERSION)\"\n  local LIBRARY_ARCHIVE=\"${SOURCES}/${1}/${1}-${LIBRARY_VERSION}.tar.gz\"\n\n  if [ -f \"${LIBRARY_ARCHIVE}\" ]; then\n    local LIBRARY_ARCHIVE_SHA512=\"$(sha512sum \"${LIBRARY_ARCHIVE}\" | cut -d ' ' -f 1)\"\n    if [ \"${LIBRARY_ARCHIVE_SHA512}\" = \"${LIBRARY_SHA512}\" ]; then\n      KODI_LIBDVD+=\" -D${1^^}_URL=${LIBRARY_ARCHIVE}\"\n    fi\n  fi\n}\n\nconfigure_host() {\n  setup_toolchain target:cmake\n  cmake ${CMAKE_GENERATOR_NINJA} \\\n    -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CONF} \\\n    -DCMAKE_INSTALL_PREFIX=/usr \\\n    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \\\n    -DHEADERS_ONLY=ON \\\n    ${KODI_ARCH} \\\n    ${KODI_NEON} \\\n    ${KODI_PLATFORM} ..\n}\n\nmake_host() {\n  :\n}\n\nmakeinstall_host() {\n  DESTDIR=${SYSROOT_PREFIX} cmake -DCMAKE_INSTALL_COMPONENT=\"kodi-addon-dev\" -P cmake_install.cmake\n\n  # more binaddons cross compile badness meh\n  sed -e \"s:INCLUDE_DIR /usr/include/kodi:INCLUDE_DIR ${SYSROOT_PREFIX}/usr/include/kodi:g\" \\\n      -e \"s:CMAKE_MODULE_PATH /usr/lib/kodi /usr/share/kodi/cmake:CMAKE_MODULE_PATH ${SYSROOT_PREFIX}/usr/share/kodi/cmake:g\" \\\n      -i ${SYSROOT_PREFIX}/usr/lib/kodi/cmake/KodiConfig.cmake\n}\n\npre_configure_target() {\n  export LIBS=\"${LIBS} -lncurses\"\n\n  if [ \"${KODI_DVDCSS_SUPPORT}\" = yes ]; then\n    KODI_LIBDVD=\"-DENABLE_DVDCSS=ON\"\n    prepare_libdvd_library libdvdcss\n  else\n    KODI_LIBDVD=\"-DENABLE_DVDCSS=OFF\"\n  fi\n\n  prepare_libdvd_library libdvdnav\n  prepare_libdvd_library libdvdread\n  PKG_CMAKE_OPTS_TARGET+=\" ${KODI_LIBDVD}\"\n}\n\npost_make_target() {\n  for libname in libdvdcss libdvdnav libdvdread; do\n    if [ -f \"${PKG_BUILD}/.${TARGET_NAME}/build/download/${libname}\"* ]; then\n      mkdir -p \"${SOURCES}/${libname}\"\n      cp \"${PKG_BUILD}/.${TARGET_NAME}/build/download/${libname}\"* \"${SOURCES}/${libname}\"\n    fi\n  done\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/.noinstall\n  mv ${INSTALL}/usr/share/kodi/addons/skin.estuary \\\n     ${INSTALL}/usr/share/kodi/addons/service.xbmc.versioncheck \\\n     ${INSTALL}/.noinstall\n\n  rm -rf ${INSTALL}/usr/bin/kodi\n  rm -rf ${INSTALL}/usr/bin/kodi-standalone\n  rm -rf ${INSTALL}/usr/bin/xbmc\n  rm -rf ${INSTALL}/usr/bin/xbmc-standalone\n  rm -rf ${INSTALL}/usr/share/kodi/cmake\n  rm -rf ${INSTALL}/usr/share/applications\n  rm -rf ${INSTALL}/usr/share/icons\n  rm -rf ${INSTALL}/usr/share/pixmaps\n  rm -rf ${INSTALL}/usr/share/xsessions\n\n  mkdir -p ${INSTALL}/usr/lib/kodi\n  cp ${PKG_DIR}/scripts/kodi-config ${INSTALL}/usr/lib/kodi\n  cp ${PKG_DIR}/scripts/kodi-after ${INSTALL}/usr/lib/kodi\n  cp ${PKG_DIR}/scripts/kodi-safe-mode ${INSTALL}/usr/lib/kodi\n  cp ${PKG_DIR}/scripts/kodi.sh ${INSTALL}/usr/lib/kodi\n\n  # Configure safe mode triggers - default 5 restarts within 900 seconds/15 minutes\n  sed -e \"s|@KODI_MAX_RESTARTS@|${KODI_MAX_RESTARTS:-5}|g\" \\\n      -e \"s|@KODI_MAX_SECONDS@|${KODI_MAX_SECONDS:-900}|g\" \\\n      -i ${INSTALL}/usr/lib/kodi/kodi.sh\n\n  if [ \"${KODI_PIPEWIRE_SUPPORT}\" = \"yes\" ]; then\n    KODI_AE_SINK=\"PIPEWIRE\"\n  elif [ \"${KODI_PULSEAUDIO_SUPPORT}\" = \"yes\" -a \"${KODI_ALSA_SUPPORT}\" = \"yes\" ]; then\n    KODI_AE_SINK=\"ALSA+PULSE\"\n  elif [ \"${KODI_PULSEAUDIO_SUPPORT}\" = \"yes\" -a \"${KODI_ALSA_SUPPORT}\" != \"yes\" ]; then\n    KODI_AE_SINK=\"PULSE\"\n  elif [ \"${KODI_PULSEAUDIO_SUPPORT}\" != \"yes\" -a \"${KODI_ALSA_SUPPORT}\" = \"yes\" ]; then\n    KODI_AE_SINK=\"ALSA\"\n  fi\n\n  # adjust audio output device to what was built\n  sed \"s/@KODI_AE_SINK@/${KODI_AE_SINK}/\" ${PKG_DIR}/config/kodi.conf.in > ${INSTALL}/usr/lib/kodi/kodi.conf\n\n  # set default display environment\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    echo \"DISPLAY=:0.0\" >>${INSTALL}/usr/lib/kodi/kodi.conf\n  elif [ \"${DISPLAYSERVER}\" = \"wl\" ]; then\n    echo \"WAYLAND_DISPLAY=wayland-1\" >>${INSTALL}/usr/lib/kodi/kodi.conf\n  fi\n\n  # nvidia: Enable USLEEP to reduce CPU load while rendering\n  if listcontains \"${GRAPHIC_DRIVERS}\" \"nvidia\" || listcontains \"${GRAPHIC_DRIVERS}\" \"nvidia-legacy\"; then\n    echo \"__GL_YIELD=USLEEP\" >>${INSTALL}/usr/lib/kodi/kodi.conf\n  fi\n\n  mkdir -p ${INSTALL}/usr/sbin\n  cp ${PKG_DIR}/scripts/service-addon-wrapper ${INSTALL}/usr/sbin\n\n  mkdir -p ${INSTALL}/usr/bin\n  cp ${PKG_DIR}/scripts/kodi-remote ${INSTALL}/usr/bin\n  cp ${PKG_DIR}/scripts/setwakeup.sh ${INSTALL}/usr/bin\n  cp ${PKG_DIR}/scripts/pastekodi ${INSTALL}/usr/bin\n  ln -sf /usr/bin/pastekodi ${INSTALL}/usr/bin/pastecrash\n\n  mkdir -p ${INSTALL}/usr/share/kodi/addons\n  cp -R ${PKG_DIR}/config/repository.coreelec ${INSTALL}/usr/share/kodi/addons/${ADDON_REPO_ID}\n  sed -e \"s|@ADDON_URL@|${ADDON_URL}|g\" -i ${INSTALL}/usr/share/kodi/addons/${ADDON_REPO_ID}/addon.xml\n  sed -e \"s|@ADDON_REPO_ID@|${ADDON_REPO_ID}|g\" -i ${INSTALL}/usr/share/kodi/addons/${ADDON_REPO_ID}/addon.xml\n  sed -e \"s|@ADDON_REPO_NAME@|${ADDON_REPO_NAME}|g\" -i ${INSTALL}/usr/share/kodi/addons/${ADDON_REPO_ID}/addon.xml\n  sed -e \"s|@ADDON_VERSION@|${ADDON_VERSION}|g\" -i ${INSTALL}/usr/share/kodi/addons/${ADDON_REPO_ID}/addon.xml\n\n  mkdir -p ${INSTALL}/usr/share/kodi/config\n\n  ln -sf /run/libreelec/cacert.pem ${INSTALL}/usr/share/kodi/system/certs/cacert.pem\n\n  mkdir -p ${INSTALL}/usr/share/kodi/system/settings\n\n  ${PKG_DIR}/scripts/xml_merge.py ${PKG_DIR}/config/guisettings.xml \\\n                                  ${PROJECT_DIR}/${PROJECT}/kodi/guisettings.xml \\\n                                  ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/kodi/guisettings.xml \\\n                                  >${INSTALL}/usr/share/kodi/config/guisettings.xml\n\n  ${PKG_DIR}/scripts/xml_merge.py ${PKG_DIR}/config/sources.xml \\\n                                  ${PROJECT_DIR}/${PROJECT}/kodi/sources.xml \\\n                                  ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/kodi/sources.xml \\\n                                  >${INSTALL}/usr/share/kodi/config/sources.xml\n\n  ${PKG_DIR}/scripts/xml_merge.py ${PKG_DIR}/config/advancedsettings.xml \\\n                                  ${PROJECT_DIR}/${PROJECT}/kodi/advancedsettings.xml \\\n                                  ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/kodi/advancedsettings.xml \\\n                                  >${INSTALL}/usr/share/kodi/system/advancedsettings.xml\n\n  ${PKG_DIR}/scripts/xml_merge.py ${PKG_DIR}/config/appliance.xml \\\n                                  ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/kodi/appliance.xml \\\n                                  >${INSTALL}/usr/share/kodi/system/settings/appliance.xml\n\n  mkdir -p ${INSTALL}/usr/cache/coreelec\n  cp ${PKG_DIR}/config/network_wait ${INSTALL}/usr/cache/coreelec\n\n  # update addon manifest\n  ADDON_MANIFEST=${INSTALL}/usr/share/kodi/system/addon-manifest.xml\n  xmlstarlet ed -L -d \"/addons/addon[text()='service.xbmc.versioncheck']\" ${ADDON_MANIFEST}\n  xmlstarlet ed -L --subnode \"/addons\" -t elem -n \"addon\" -v \"${ADDON_REPO_ID}\" ${ADDON_MANIFEST}\n  if [ -n \"${DISTRO_PKG_SETTINGS}\" ]; then\n    xmlstarlet ed -L --subnode \"/addons\" -t elem -n \"addon\" -v \"${DISTRO_PKG_SETTINGS_ID}\" ${ADDON_MANIFEST}\n  fi\n\n  # more binaddons cross compile badness meh\n  sed -e \"s:INCLUDE_DIR /usr/include/kodi:INCLUDE_DIR ${SYSROOT_PREFIX}/usr/include/kodi:g\" \\\n      -e \"s:CMAKE_MODULE_PATH /usr/lib/kodi /usr/share/kodi/cmake:CMAKE_MODULE_PATH ${SYSROOT_PREFIX}/usr/share/kodi/cmake:g\" \\\n      -i ${SYSROOT_PREFIX}/usr/lib/kodi/cmake/KodiConfig.cmake\n\n  if [ \"${KODI_EXTRA_FONTS}\" = yes ]; then\n    mkdir -p ${INSTALL}/usr/share/kodi/media/Fonts\n    cp ${PKG_DIR}/fonts/*.ttf ${INSTALL}/usr/share/kodi/media/Fonts\n  fi\n\n  # Compile kodi Python site-packages to .pyc bytecode, and remove .py source code\n  python_compile ${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}/site-packages/kodi\n\n  debug_strip ${INSTALL}/usr/lib/kodi/kodi.bin\n}\n\npost_install() {\n  enable_service kodi.target\n  enable_service kodi-autostart.service\n  enable_service kodi-cleanlogs.service\n  enable_service kodi-halt.service\n  enable_service kodi-poweroff.service\n  enable_service kodi-reboot.service\n  enable_service kodi-waitonnetwork.service\n  enable_service kodi.service\n  enable_service kodi-lirc-suspend.service\n  enable_service kodi-cleanpackagecache.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/profile.d/00-addons.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n# addons profile.d/*.profile\nfor config in /storage/.kodi/addons/*/profile.d/*.profile; do\n  if [ -f \"${config}\" ] ; then\n    . ${config}\n  fi\ndone\n\noe_setup_addon() {\n  if [ ! -z ${1} ] ; then\n    DEF=\"/storage/.kodi/addons/${1}/settings-default.xml\"\n    CUR=\"/storage/.kodi/userdata/addon_data/${1}/settings.xml\"\n\n    # export some useful variables\n    ADDON_DIR=\"${HOME}/.kodi/addons/${1}\"\n    ADDON_HOME=\"${HOME}/.kodi/userdata/addon_data/${1}\"\n    ADDON_LOG_FILE=\"${ADDON_HOME}/service.log\"\n\n    [ ! -d ${ADDON_HOME} ] && mkdir -p ${ADDON_HOME}\n\n    # copy defaults\n    if [ -f \"${DEF}\" -a ! -f \"${CUR}\" ] ; then\n      cp \"${DEF}\" \"${CUR}\"\n    fi\n\n    # parse config\n    for xml_file in \"${DEF}\" \"${CUR}\"; do\n      if [ -f \"${xml_file}\" ]; then\n        XML_SETTINGS_VER=\"$(xmlstarlet sel -t -m settings -v @version ${xml_file})\"\n        if [ \"${XML_SETTINGS_VER}\" = \"2\" ]; then\n          eval $(xmlstarlet sel -t -m settings/setting -v @id -o \"=\" -v . -n \"${xml_file}\" | sed -e \"s/'/'\\\\\\\\''/g; s/=/='/; s/$/'/\")\n        else\n          eval $(xmlstarlet sel -t -m settings -m setting -v @id -o \"=\" -v @value -n \"${xml_file}\" | sed -e \"s/'/'\\\\\\\\''/g; s/=/='/; s/$/'/\")\n        fi\n      fi\n    done\n  fi\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/profile.d/99-kodi.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n# PATH\nfor addon in /storage/.kodi/addons/*/bin /usr/lib/kodi/addons/*/bin; do\n  [ -d \"${addon}\" ] && PATH=\"${PATH}:${addon}\"\ndone\nexport PATH\n\n# LD_LIBRARY_PATH\nfor addon in /storage/.kodi/addons/*/lib /usr/lib/kodi/addons/*/lib; do\n  [ -d \"${addon}\" ] && LD_LIBRARY_PATH=\"${LD_LIBRARY_PATH}:${addon}\"\ndone\nexport LD_LIBRARY_PATH\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/scripts/kodi-after",
    "content": "#!/bin/sh\n#\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Team CoreELEC (https://coreelec.org)\n\nBOOT_STATUS=${HOME}/.config/boot.status\nBOOT_HINT=${HOME}/.config/boot.hint\n\nBOOT_STATE=\"$(cat ${BOOT_STATUS} 2>/dev/null)\"\n\n\nprocess_boot_hint()\n{\n\n  if [ \"${BOOT_STATE}\" = \"OK\" ]; then\n    echo \"OK\" > ${BOOT_HINT}\n  fi\n\n  return 0\n}\n\nprocess_boot_hint\n\nexit 0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/scripts/kodi-config",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nKODI_ROOT=${HOME}/.kodi\n\nBOOT_STATE=\"$(cat ${HOME}/.config/boot.status 2>/dev/null)\"\n\n# May not exist if testing a clean /storage/.kodi without rebooting\nmkdir -p ${KODI_ROOT}/userdata\n\n# hack: make addon-bins executable\n# done in kodi on addon install. but just in case..\nchmod +x ${KODI_ROOT}/addons/*/bin/* 2>/dev/null\n\n# remove any user installed CE repo\n[ -d ${KODI_ROOT}/addons/repository.coreelec ] && rm -rf ${KODI_ROOT}/addons/repository.coreelec\n\n# setup Kodi sources\nif [ ! -f ${KODI_ROOT}/userdata/sources.xml ]; then\n  if [ -f /usr/share/kodi/config/sources.xml ]; then\n    cp /usr/share/kodi/config/sources.xml ${KODI_ROOT}/userdata\n  fi\nfi\n\n#choose libCEC version, default is libcec package version\nln -sf /usr/lib/libcec.so.6.0.2 /var/lib/libcec.so.6\n\n# common setup guisettings\nif [ ! -f ${KODI_ROOT}/userdata/guisettings.xml ] ; then\n  if [ -f /usr/share/kodi/config/guisettings.xml ]; then\n    cp /usr/share/kodi/config/guisettings.xml ${KODI_ROOT}/userdata\n  fi\n  if [ \"${BOOT_STATE}\" = \"SAFE\" ]; then\n    [ ! -f ${KODI_ROOT}/userdata/guisettings.xml ] && echo '<settings version=\"2\"></settings>' > ${KODI_ROOT}/userdata/guisettings.xml\n    xmlstarlet ed --omit-decl --inplace -s settings -t elem -n setting -v \"maroon\" -i settings/setting -t attr -n id -v lookandfeel.skincolors ${KODI_ROOT}/userdata/guisettings.xml\n  fi\nfi\n\nKODI_ARGS=\"\"\n\necho \"KODI_ARGS=\\\"${KODI_ARGS}\\\"\" > /run/libreelec/kodi.conf\n\nif [ \"$(uname -m)\" = \"x86_64\" ]; then\n  echo \"MALLOC_MMAP_THRESHOLD_=524288\" >> /run/libreelec/kodi.conf\nelse #arm\n  echo \"MALLOC_MMAP_THRESHOLD_=8192\" >> /run/libreelec/kodi.conf\nfi\n\nif [ -f /storage/.config/kodi.conf ] ; then\n  cat /storage/.config/kodi.conf >>/run/libreelec/kodi.conf\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/scripts/kodi-remote",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\necho \"Supported keys:\n← ↑ ↓ →         Left | Up | Down | Right\nContext Menu    c\nPlayer Debug    d\nFullscreen      f\nInfo            i\nCodec Info      o\nPause           p\nScreenshot      s\nSkin Debug      t\nStop            x\nVolume Down     -\nVolume Up       +\nBack            Backspace\nSelect          Enter\nQuit Remote     q or ctrl+c\n\"\n\ncom() {\n  kodi-send --action=\"${1}\" > /dev/null 2>&1\n  echo -ne \"\\r${1}\\e[K\";\n}\n\nwhile true; do\n  read -r -sn1 k\n  case \"${k}\" in\n    A) com \"Up\";;\n    B) com \"Down\";;\n    C) com \"Right\";;\n    D) com \"Left\";;\n    c) com \"ContextMenu\";;\n    d) com \"PlayerDebug\";;\n    f) com \"FullScreen\";;\n    i) com \"Info\";;\n    o) com \"CodecInfo\";;\n    p) com \"Pause\";;\n    s) com \"TakeScreenshot\";;\n    t) com \"Skin.ToggleDebug\";;\n    x) com \"Stop\";;\n    -) com \"VolumeDown\";;\n    +) com \"VolumeUp\";;\n    $'\\177') com \"Back\";;\n    \"\") com \"Select\";;\n    q) exit\n  esac\ndone\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/scripts/kodi-safe-mode",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nKODI_ROOT=${HOME}/.kodi\n\nKODI_ROOT_FAILED=${KODI_ROOT}.FAILED\nBOOT_STATUS=${HOME}/.config/boot.status\n\nprocess_boot_status()\n{\n  BOOT_STATE=\"$(cat ${BOOT_STATUS} 2>/dev/null)\"\n\n  if [ \"${BOOT_STATE}\" = \"SAFE\" ]; then\n    if [ ! -d ${KODI_ROOT_FAILED} ]; then\n      # entering safe mode - rename failed .kodi, and restart with clean .kodi\n      mv ${KODI_ROOT} ${KODI_ROOT_FAILED}\n      reboot\n    else\n      # exiting safe mode - restore failed .kodi\n      rm -fr ${KODI_ROOT}\n      mv ${KODI_ROOT_FAILED} ${KODI_ROOT}\n      echo \"OK\" > ${BOOT_STATUS}\n    fi\n  else\n    echo \"OK\" > ${BOOT_STATUS}\n  fi\n\n  return 0\n}\n\nprocess_boot_status\n\nexit 0\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/scripts/kodi.sh",
    "content": "#!/bin/sh\n#      Copyright (C) 2008-2013 Team XBMC\n#      http://xbmc.org\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n\n. /etc/profile\n\ntrap cleanup TERM\n\nKODI_ROOT=${HOME}/.kodi\n\nSAVED_ARGS=\"${@}\"\nCRASHLOG_DIR=${KODI_ROOT}/temp\n\nBOOT_STATUS=${HOME}/.config/boot.status\nNOSAFE_MODE=${HOME}/.config/safemode.disable\nCRASH_HIST=/run/libreelec/crashes.dat\nKODI_MAX_RESTARTS=@KODI_MAX_RESTARTS@\nKODI_MAX_SECONDS=@KODI_MAX_SECONDS@\n\ncleanup() {\n  # make systemd happy by not exiting immediately but\n  # wait for kodi to exit\n  while killall -0 kodi.bin &>/dev/null; do\n    sleep 0.5\n  done\n}\n\ncommand_exists()\n{\n  command -v ${1} &>/dev/null\n}\n\nsingle_stacktrace()\n{\n  # core filename is \"core.*kodi.bin.*\"\n  find \"${1}\" -name 'core.*kodi.bin.*' | while read core; do\n    echo \"=====>  Core file: \"${core}\"\" >> ${FILE}\n    echo \"        =========================================\" >> ${FILE}\n    if [ -f /storage/.config/debug.enhanced ]; then\n      gdb /usr/lib/kodi/kodi.bin --core=\"${core}\" --batch -ex \"thread apply all bt full\" -ex \"info registers\" -ex \"set print asm-demangle on\" -ex \"disassemble\" 2>/dev/null >> ${FILE}\n    else\n      gdb /usr/lib/kodi/kodi.bin --core=\"${core}\" --batch -ex \"thread apply all bt\" 2>/dev/null >> ${FILE}\n    fi\n    rm -f \"${core}\"\n  done\n}\n\ndetect_crash_loop()\n{\n  # use monotonic time (in case date/time changes after booting)\n  NOW_TIME=$(awk '/^now/ {print int(${3} / 1000000000)}' /proc/timer_list)\n  echo \"${NOW_TIME}\" >> ${CRASH_HIST}\n\n  NUM_RESTARTS=$(wc -l ${CRASH_HIST} | cut -d' ' -f1)\n  FIRST_RESTART_TIME=$(tail -n ${KODI_MAX_RESTARTS} ${CRASH_HIST} | head -n 1)\n\n  # kodi restart loop detected? fail this kodi install\n  if [ ${NUM_RESTARTS} -ge ${KODI_MAX_RESTARTS} -a ${KODI_MAX_SECONDS} -ge $((NOW_TIME - FIRST_RESTART_TIME)) ]; then\n    return 0\n  else\n    return 1\n  fi\n}\n\nactivate_safe_mode()\n{\n  [ -f ${NOSAFE_MODE} ] && return 0\n\n  BOOT_STATE=\"$(cat ${BOOT_STATUS} 2>/dev/null)\"\n\n  if [ \"${BOOT_STATE:-OK}\" = \"OK\" ]; then\n    # generate logfiles zip for the failed kodi\n    /usr/bin/createlog\n    lastlog=$(ls -1 /storage/logfiles/*.zip | tail -n 1)\n    mv ${lastlog} /storage/logfiles/log-$(date -u +%Y-%m-%d-%H.%M.%S)-FAILED.zip\n\n    echo \"SAFE\" > ${BOOT_STATUS}\n  fi\n\n  return 0\n}\n\nprint_crash_report()\n{\n  mkdir -p ${CRASHLOG_DIR}\n\n  DATE=`date +%Y%m%d%H%M%S`\n  FILE=\"${CRASHLOG_DIR}/.kodi_crashlog.log\"\n  echo \"############## kodi CRASH LOG ###############\" > ${FILE}\n  echo >> ${FILE}\n  echo \"################ SYSTEM INFO ################\" >> ${FILE}\n  echo -n \" Date: \" >> ${FILE}\n  date >> ${FILE}\n  echo \" kodi Options: ${SAVED_ARGS}\" >> ${FILE}\n  echo -n \" Arch: \" >> ${FILE}\n  uname -m >> ${FILE}\n  echo -n \" Kernel: \" >> ${FILE}\n  uname -rvs >> ${FILE}\n  echo -n \" Release: \" >> ${FILE}\n  . /etc/os-release\n  echo ${NAME} ${VERSION} >> ${FILE}\n  echo \"############## END SYSTEM INFO ##############\" >> ${FILE}\n  echo >> ${FILE}\n  echo \"############### STACK TRACE #################\" >> ${FILE}\n  if command_exists gdb; then\n    single_stacktrace /storage/.cache/cores\n  else\n    echo \"gdb not installed, can't get stack trace.\" >> ${FILE}\n  fi\n  echo \"############# END STACK TRACE ###############\" >> ${FILE}\n  echo >> ${FILE}\n  echo \"################# LOG FILE ##################\" >> ${FILE}\n  echo >> ${FILE}\n  cat ${KODI_ROOT}/temp/kodi.log >> ${FILE}\n  echo >> ${FILE}\n  echo \"############### END LOG FILE ################\" >> ${FILE}\n  echo >> ${FILE}\n  echo \"############ END kodi CRASH LOG #############\" >> ${FILE}\n  OFILE=\"${FILE}\"\n  FILE=\"${CRASHLOG_DIR}/kodi_crashlog_${DATE}.log\"\n  mv \"${OFILE}\" \"${FILE}\"\n  ln -sf \"$(basename ${FILE})\" \"${CRASHLOG_DIR}/kodi_crash.log\"\n  echo \"Crash report available at ${FILE}\"\n}\n\nif command_exists gdb; then\n  ulimit -c unlimited\nfi\n\n# clean up any stale cores. just in case\nfind /storage/.cache/cores -type f -delete\n\n# clean zero-byte database files that prevent migration/startup\nfor file in ${KODI_ROOT}/userdata/Database/*.db; do\n  if [ -e \"${file}\" ]; then\n    [ -s ${file} ] || rm -f ${file}\n  fi\ndone\n\nif [ -n \"${KODI_AE_SINK}\" ]; then\n\n  echo \"KODI_AE_SINK env variable is deprecated and will be removed in the future.\"\n  echo \"Use the --audio-backend command line switch instead.\"\n\n  if [ \"${KODI_AE_SINK}\" = \"PIPEWIRE\" ]; then\n    ENV_ARGS=\"--audio-backend=pipewire\"\n  elif [ \"${KODI_AE_SINK}\" = \"PULSE\" ]; then\n    ENV_ARGS=\"--audio-backend=pulseaudio\"\n  elif [ \"${KODI_AE_SINK}\" = \"ALSA\" ]; then\n    ENV_ARGS=\"--audio-backend=alsa\"\n  elif [ \"${KODI_AE_SINK}\" = \"SNDIO\" ]; then\n    ENV_ARGS=\"--audio-backend=sndio\"\n  elif [ \"${KODI_AE_SINK}\" = \"ALSA+PULSE\" ]; then\n    ENV_ARGS=\"--audio-backend=alsa+pulseaudio\"\n  fi\nfi\n\n/usr/lib/kodi/kodi.bin ${ENV_ARGS} ${SAVED_ARGS}\nRET=$?\n\nif [ $(( (${RET} >= 131 && ${RET} <= 136) || ${RET} == 139 )) = \"1\" ] ; then\n  # Crashed with core dump\n  print_crash_report\n\n  # Cleanup. Keep only youngest 10 reports but current in any case\n  rm -f $(ls -1t ${CRASHLOG_DIR}/kodi_crashlog_*.log | grep -v \"${FILE}\" | tail -n +10)\n\n  # Enable safe mode if a crash loop is detected\n  detect_crash_loop && activate_safe_mode\nfi\n\n# Filter Kodi powerdown/restartapp/reboot codes to satisfy systemd\n[ \"${RET}\" -ge 64 -a \"${RET}\" -le 66 ] && RET=0\n\nexit ${RET}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/scripts/pastekodi",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2019-present Team CoreELEC (https://coreelec.org)\n\ncat_data() {\n  echo \"========== ${1} ==========\"\n  cat\n}\n\ncat_file() {\n  if [ -f \"${1}\" ]; then\n    cat \"${1}\" | cat_data \"${2:-${1}}\"\n  fi\n}\n\nusage() {\n  [ -n \"${1}\" ] && echo \"Unknown argument: ${1}\"\n  cat <<EOF\nUsage: ${0} [-c] [-h]\n\n  -c   send output to stdout not via /usr/bin/pastebinit\n  -h   this help message\nEOF\n  exit 1\n}\n\nOUTPUT=\"/usr/bin/pastebinit\"\n\nwhile getopts \":hc\" opt; do\n  case ${opt} in\n    c) OUTPUT=\"cat\";;\n    ?) usage \"${OPTARG}\";;\n    h) usage;;\n  esac\ndone\n\nsource /etc/os-release\nSYSTEM_ARCH=\"${COREELEC_ARCH#*.}\"\n\n# If running in SAFE mode, send FAILED logs\nif [ \"$(cat \"/storage/.config/boot.status\" 2>/dev/null)\" = \"SAFE\" ]; then\n  KODI_ROOT=\"/storage/.kodi.FAILED/temp\"\nelse\n  KODI_ROOT=\"/storage/.kodi/temp\"\nfi\n\nif [ \"$(basename ${0})\" = \"pastekodi\" ]; then\n  LOG_TYPE=\"System\"\n  LOG_FILE=\"${KODI_ROOT}/kodi.log\"\nelse\n  LOG_TYPE=\"Crash\"\n  LOG_FILE=\"${KODI_ROOT}/kodi_crash.log\"\nfi\n\n(\n  echo \"${LOG_TYPE} log output for: $(lsb_release)\"\n\n  if [ \"${SYSTEM_ARCH}\" = \"x86_64\" ]; then\n    if [ -d \"/sys/firmware/efi\" ]; then\n      echo \"Firmware Boot Mode: EFI\"\n    else\n      echo \"Firmware Boot Mode: BIOS\"\n    fi\n  fi\n  if [ \"${COREELEC_PROJECT}\" = \"RPi\" ]; then\n    echo \"RPi Hardware Revision: $(vcgencmd otp_dump | grep 30: | cut -d: -f2)\"\n  fi\n\n  cat_file \"${LOG_FILE}\"\n\n  journalctl -a -b -0 -o short-precise | cat_data \"journalctl -a -b -0\"\n\n  if [ \"${COREELEC_PROJECT}\" = \"RPi\" ]; then\n    bootloader_version=\"$(vcgencmd bootloader_version)\"\n    if ! echo \"${bootloader_version}\" | grep -q \"Command not registered\"; then\n      echo  \"${bootloader_version}\" | cat_data \"Bootloader version\"\n    fi\n  fi\n\n  cat_file \"/flash/config.txt\" # RPi\n  cat_file \"/flash/distroconfig.txt\" # RPi\n  cat_file \"/flash/cmdline.txt\" # RPi\n\n  cat_file \"/flash/syslinux.cfg\" # x86 BIOS\n  cat_file \"/flash/EFI/BOOT/syslinux.cfg\" # x86 EFI\n  cat_file \"/flash/extlinux.conf\" # x86 legacy\n\n  cat_file \"/flash/extlinux/extlinux.conf\" # u-boot\n\n  cat_file \"${KODI_ROOT}/.smb/smb.conf\"\n  cat_file \"${KODI_ROOT}/.smb/user.conf\"\n  cat_file \"/run/samba/smb.conf\"\n\n  pem_sys=\"$(sha256sum /etc/ssl/cacert.pem.system | cut -d' ' -f1)\"\n  pem_run=\"$(sha256sum /run/libreelec/cacert.pem | cut -d' ' -f1)\"\n  if [ \"${pem_sys}\" = \"${pem_run}\" ]; then\n    cat_data \"/run/libreelec/cacert.pem is default\" </dev/null\n  else\n    cat_file /run/libreelec/cacert.pem \"/run/libreelec/cacert.pem (modified)\"\n  fi\n\n  if [ \"${COREELEC_PROJECT}\" = \"Amlogic-ce\" ]; then\n    ce-debug -l | cat_data \"ce-debug -l\"\n  fi\n\n) | ${OUTPUT} 2>/dev/null\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/scripts/service-addon-wrapper",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nif [ $# -ne 3 ] ; then\n  echo \"${0} usage: context addon-id addon-path\"\n  exit 1\nfi\n\nCONTEXT=\"${1}\"\nADDON_ID=\"${2}\"\nADDON_PATH=\"${3}\"\n\nif [ ! -d /storage/.config/system.d ] ; then\n  mkdir -p /storage/.config/system.d\nfi\n\nSERVICE_FILE=\"${ADDON_PATH}/system.d/${ADDON_ID}.service\"\n\nif [ -f \"${SERVICE_FILE}\" ] ; then\n  case \"${CONTEXT}\" in\n    enable)\n      systemctl enable \"${SERVICE_FILE}\"\n      chmod +x \"${ADDON_PATH}/bin\"/*\n      systemctl start \"${ADDON_ID}.service\"\n      ;;\n    disable | pre-uninstall)\n      systemctl stop \"${ADDON_ID}.service\"\n      systemctl disable \"${ADDON_ID}.service\"\n      ;;\n    post-update)\n      # post-update is triggered on update,\n      # make sure to stop and re-install service\n      systemctl stop \"${ADDON_ID}.service\"\n      systemctl disable \"${ADDON_ID}.service\"\n      systemctl enable \"${SERVICE_FILE}\"\n      chmod +x \"${ADDON_PATH}/bin\"/*\n      systemctl start \"${ADDON_ID}.service\"\n      ;;\n    restart)\n      systemctl restart \"${ADDON_ID}.service\"\n      ;;\n    reload)\n      systemctl reload \"${ADDON_ID}.service\"\n      ;;\n    *)\n      echo \"${0}: unknown service context ${CONTEXT}\"\n      exit 1\n      ;;\n  esac\nfi\n\nif [ ! -d /storage/.cache/kernel-overlays ] ; then\n  mkdir -p /storage/.cache/kernel-overlays\nfi\n\n# kernel-overlay addons built into the image have their\n# files installed in the default /usr/lib/kernel-overlays\n# location, not inside the kodi addon dir\n\ncase \"${ADDON_PATH}\" in\n  /usr/share/kodi/addons/*)\n    OVERLAY_PATH=\"/usr/lib/kernel-overlays/${ADDON_ID}\"\n    ;;\n  *)\n    OVERLAY_PATH=\"${ADDON_PATH}/kernel-overlay\"\n    ;;\nesac\n\ncreate_overlay_conf() {\n  rm -f \"${OVERLAY_CONF}\"\n  echo \"${OVERLAY_PATH}\" > \"${OVERLAY_CONF}\"\n}\n\nif [ -d \"${OVERLAY_PATH}\" ] ; then\n  OVERLAY_CONF=\"/storage/.cache/kernel-overlays/50-${ADDON_ID}.conf\"\n\n  case \"${CONTEXT}\" in\n    enable | post-update )\n      create_overlay_conf\n      ;;\n    disable | pre-uninstall )\n      rm -f \"${OVERLAY_CONF}\"\n      ;;\n    update )\n      if [ -e \"${OVERLAY_CONF}\" ] ; then\n        create_overlay_conf\n      fi\n      ;;\n    *)\n      echo \"${0}: unknown overlay context ${CONTEXT}\"\n      exit 1\n      ;;\n  esac\n\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/scripts/setwakeup.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nif [ -f /sys/class/rtc/rtc0/wakealarm ]; then\n  logger -t setwakeup.sh \"### Setting system wakeup time ###\"\n  echo 0 > /sys/class/rtc/rtc0/wakealarm\n  echo ${1} > /sys/class/rtc/rtc0/wakealarm\n  logger -t setwakeup.sh \"### $(cat /proc/driver/rtc) ###\"\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/scripts/xml_merge.py",
    "content": "#!/usr/bin/env python3\n\n# taken from http://stackoverflow.com/a/14879370 with minor modifications\n\nfrom __future__ import print_function\nimport os\nimport sys\nimport xml.dom.minidom\nfrom xml.etree import ElementTree as et\n\ndef printerr(*args, **kwargs):\n    print(*args, file=sys.stderr, **kwargs)\n\nclass hashabledict(dict):\n    def __hash__(self):\n        return hash(tuple(sorted(self.items())))\n\nclass XMLCombiner(object):\n    def __init__(self, filenames):\n        if len(filenames) == 0:\n            raise Exception('No filenames!')\n\n        try:\n            self.roots = []\n            for f in filenames:\n              self.roots.append(et.parse(f).getroot())\n        except xml.etree.ElementTree.ParseError:\n            printerr(\"ERROR: Unable to parse XML file %s\" % f)\n            raise\n\n    def prettyPrint(self, etree_xml):\n        minidom = xml.dom.minidom.parseString(et.tostring(etree_xml))\n        return \"\\n\".join([line for line in minidom.toprettyxml(indent=\"  \", encoding=\"utf-8\").decode('utf-8').split('\\n') if line.strip() != \"\"])\n\n    def combine(self):\n        for r in self.roots[1:]:\n            self.combine_element(self.roots[0], r)\n        return self.prettyPrint(self.roots[0])\n\n    def combine_element(self, one, other):\n        mapping = {(el.tag, hashabledict(el.attrib)): el for el in one}\n        for el in other:\n            if len(el) == 0:\n                try:\n                    mapping[(el.tag, hashabledict(el.attrib))].text = el.text\n                except KeyError:\n                    mapping[(el.tag, hashabledict(el.attrib))] = el\n                    one.append(el)\n            else:\n                try:\n                    self.combine_element(mapping[(el.tag, hashabledict(el.attrib))], el)\n                except KeyError:\n                    mapping[(el.tag, hashabledict(el.attrib))] = el\n                    one.append(el)\n\nif __name__ == '__main__':\n    xmlfiles = [file for file in sys.argv[1:] if os.path.exists(file)]\n\n    r = XMLCombiner(xmlfiles).combine()\n\n    print(r)\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/sleep.d/openelec-sleep.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\nrun_scripts()\n{\n    list_scripts ${1}\n    for script in ${SCRIPTS} ; do\n        progress \"running sleep script ${script} (${1})...\"\n        sh /usr/lib/systemd/system-sleep.serial/${script} ${1}\n    done\n}\n\nlist_scripts()\n{\n    case ${1} in\n        pre)\n            SCRIPTS=$(ls /usr/lib/systemd/system-sleep.serial/ | sort)\n        ;;\n        post)\n            SCRIPTS=$(ls /usr/lib/systemd/system-sleep.serial/ | sort -r)\n        ;;\n    esac\n}\n\nrun_scripts ${1}\n\nexit 0\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/sleep.d/wifi.power",
    "content": "#!/bin/sh\ncase \"${1}\" in\n  pre)\n    ;;\n  post)\n    connmanctl disable wifi\n    sleep 5\n    connmanctl enable wifi\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/sleep.d.serial/10-addon-sleep.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\n# see https://wiki.archlinux.org/index.php/Power_Management#Hooks_in_.2Fusr.2Flib.2Fsystemd.2Fsystem-sleep\n\nfor script in ${HOME}/.kodi/addons/*/sleep.d/*.power; do\n  if [ -f ${script} ]; then\n    progress \"running addon sleep script ${script} (${@})...\"\n    sh ${script} ${@}\n  fi\ndone\n\nexit 0"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/sleep.d.serial/20-custom-sleep.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\n# see https://wiki.archlinux.org/index.php/Power_Management#Hooks_in_.2Fusr.2Flib.2Fsystemd.2Fsystem-sleep\n\nfor script in ${HOME}/.config/sleep.d/*.power; do\n  if [ -f ${script} ]; then\n    progress \"running custom sleep script ${script} (${@})...\"\n    sh ${script} ${@}\n  fi\ndone\n\nexit 0"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/system.d/kodi-autostart.service",
    "content": "[Unit]\nDescription=Kodi user autostart script\nBefore=kodi.service\nAfter=network-online.target graphical.target\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStart=-/bin/sh -c \". /etc/profile; test -f /storage/.config/autostart.sh && exec /bin/sh /storage/.config/autostart.sh\"\nExecStop=-/bin/sh -c \". /etc/profile; test -f /storage/.config/autostop.sh && exec /bin/sh /storage/.config/autostop.sh\"\nRemainAfterExit=yes\nTimeoutStopSec=5min\n\n[Install]\nWantedBy=kodi.service\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/system.d/kodi-cleanlogs.service",
    "content": "[Unit]\nDescription=Kodi clean debug logs\nConditionKernelCommandLine=!debugging\nConditionPathExists=!/storage/.cache/debug.libreelec\nBefore=kodi.service\n\n[Service]\nType=oneshot\nExecStart=-/bin/sh -c 'rm -rf /storage/.kodi/userdata/addon_data/*/*.log /storage/.kodi/userdata/addon_data/*/log/*'\nRemainAfterExit=yes\n\n[Install]\nWantedBy=kodi.service\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/system.d/kodi-cleanpackagecache.service",
    "content": "[Unit]\nDescription=Kodi clean package cache\nConditionPathExists=/storage/.kodi/addons/packages\nBefore=kodi.service\n\n[Service]\nType=oneshot\nExecStart=-/bin/sh -c 'rm -rf /storage/.kodi/addons/packages'\nRemainAfterExit=yes\n\n[Install]\nWantedBy=kodi.service\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/system.d/kodi-halt.service",
    "content": "[Unit]\nDescription=Kodi halt script\nAfter=kodi.service\nBefore=systemd-halt.service\nDefaultDependencies=no\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStartPre=-/usr/lib/kodi/kodi-after\nExecStart=-/bin/sh -c \". /etc/profile; exec /bin/sh /storage/.config/shutdown.sh halt\"\nRemainAfterExit=yes\n\n[Install]\nWantedBy=halt.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/system.d/kodi-lirc-suspend.service",
    "content": "[Unit]\nDescription=LIRC sleep hook\nBefore=sleep.target\nStopWhenUnneeded=yes\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=-/usr/bin/kodi-send --host=127.0.0.1 -a \"LIRC.Stop\"\nExecStop=-/usr/bin/kodi-send --host=127.0.0.1 -a \"LIRC.Start\"\n\n[Install]\nWantedBy=sleep.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/system.d/kodi-poweroff.service",
    "content": "[Unit]\nDescription=Kodi poweroff script\nAfter=kodi.service\nBefore=systemd-poweroff.service\nDefaultDependencies=no\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStartPre=-/usr/lib/kodi/kodi-after\nExecStart=-/bin/sh -c \". /etc/profile; exec /bin/sh /storage/.config/shutdown.sh poweroff\"\nRemainAfterExit=yes\n\n[Install]\nWantedBy=poweroff.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/system.d/kodi-reboot.service",
    "content": "[Unit]\nDescription=Kodi reboot script\nAfter=kodi.service\nBefore=systemd-reboot.service\nDefaultDependencies=no\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStartPre=-/usr/lib/kodi/kodi-after\nExecStart=-/bin/sh -c \". /etc/profile; exec /bin/sh /storage/.config/shutdown.sh reboot\"\nRemainAfterExit=yes\n\n[Install]\nWantedBy=reboot.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/system.d/kodi-waitonnetwork.service",
    "content": "[Unit]\nDescription=Wait on network\nAfter=connman.service\nBefore=network-online.target\nDefaultDependencies=no\nConflicts=shutdown.target\nConditionFileNotEmpty=/storage/.cache/coreelec/network_wait\nConditionPathExists=!/dev/.kernel_ipconfig\nConditionPathExists=/storage/.kodi/userdata/addon_data/service.coreelec.settings/oe_settings.xml\n\n[Service]\nType=oneshot\nEnvironmentFile=/storage/.cache/coreelec/network_wait\nExecStart=/usr/bin/wait-time-sync --timeout ${WAIT_NETWORK_TIME}\nStandardOutput=tty\nRemainAfterExit=yes\nSuccessExitStatus=1\n\n[Install]\nWantedBy=network-online.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/system.d/kodi.service",
    "content": "[Unit]\nDescription=Kodi Media Center\nAfter=network-online.target graphical.target\nRequires=graphical.target\nWants=network-online.target\n\n[Service]\nEnvironmentFile=/usr/lib/kodi/kodi.conf\nEnvironmentFile=-/run/libreelec/kodi.conf\nEnvironmentFile=-/run/libreelec/debug/kodi.conf\nExecStartPre=-/usr/lib/kodi/kodi-config\nExecStart=/usr/lib/kodi/kodi.sh --standalone -fs ${KODI_ARGS} ${KODI_DEBUG}\nExecStop=/bin/kill -TERM ${MAINPID}\nExecStopPost=-/usr/lib/kodi/kodi-safe-mode\nTimeoutStopSec=30\nRestart=always\nRestartSec=2\nStartLimitInterval=0\nLimitNOFILE=16384\nTimeoutStartSec=300\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/system.d/kodi.target",
    "content": "[Unit]\nDescription=Kodi Mediacenter Interface\nRequires=multi-user.target graphical.target network-online.target\nAfter=network-online.target graphical.target\nWants=network-online.target\nConflicts=rescue.target\nAllowIsolate=yes\n\n[Install]\nAlias=default.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/tmpfiles.d/kodi-userdirs.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nd    /storage/downloads          0755 root root - -\nd    /storage/emulators          0755 root root - -\nd    /storage/music              0755 root root - -\nd    /storage/picons/tvh         0755 root root - -\nd    /storage/picons/vdr         0755 root root - -\nd    /storage/pictures           0755 root root - -\nd    /storage/recordings         0755 root root - -\nd    /storage/screenshots        0755 root root - -\nd    /storage/tvshows            0755 root root - -\nd    /storage/videos             0755 root root - -\nd    /storage/.kodi/userdata     0755 root root - -\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/mediacenter/kodi/tmpfiles.d/kodi.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nd    /run/kodi     0755 root root - -\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/libamcodec/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"libamcodec\"\nPKG_VERSION=\"ae029843502409bd5d4dfe31193f2421384281bc\"\nPKG_SHA256=\"236d611e574b7c7e7955dc5580ef9426a09e22d6b4efdee7aa9d73084d4ce24b\"\nPKG_LICENSE=\"proprietary\"\nPKG_SITE=\"http://openlinux.amlogic.com\"\nPKG_SOURCE_NAME=\"libamcodec-aarch64-${PKG_VERSION}.tar.xz\"\nPKG_URL=\"https://sources.coreelec.org/${PKG_SOURCE_NAME}\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"libamplayer: Interface library for Amlogic media codecs\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  cp -PR * $SYSROOT_PREFIX\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr\n    cp -PR usr/lib $INSTALL/usr\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/libdovi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"libdovi\"\nPKG_VERSION=\"3.3.1\"\nPKG_SITE=\"https://github.com/quietvoid/dovi_tool\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nif [ \"${BUILD_FROM_SRC}\" = \"yes\" ]; then\n  PKG_SHA256=\"4cd7a4c418fd8af1da13278ce7524c15b7fdf61e1fe53663aa291c68c5062777\"\n  PKG_URL=\"https://github.com/quietvoid/dovi_tool/archive/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\n  PKG_DEPENDS_TARGET+=\" cargo-c:host\"\nelse\n  case \"${TARGET_ARCH}\" in\n    \"arm\")\n      PKG_SHA256=\"9dc360de883c627014e8f36fe92950033e49ade1f94d596f58f0b26aab978fe1\"\n      ;;\n    \"aarch64\")\n      PKG_SHA256=\"e6e0bb82198a58a58cd38bbb2a6d286ff9d024ad35f490ff4b127ea415521457\"\n      ;;\n  esac\n  PKG_SOURCE_NAME=\"${PKG_NAME}-${ARCH}-${PKG_VERSION}.tar.xz\"\n  PKG_URL=\"https://sources.coreelec.org/${PKG_SOURCE_NAME}\"\nfi\nPKG_LICENSE=\"MIT\"\nPKG_LONGDESC=\"dovi_tool is a CLI tool combining multiple utilities for working with Dolby Vision.\"\nPKG_TOOLCHAIN=\"manual\"\n\nif [ \"${BUILD_FROM_SRC}\" = \"yes\" ]; then\npre_make_target() {\n  CARGO_BASE_OPTS=\"--manifest-path ${PKG_BUILD}/dolby_vision/Cargo.toml \\\n                   --target ${TARGET_NAME}\"\n  CARGO_BUILD_OPTS=\"--library-type staticlib \\\n                    --profile release \\\n                    --prefix /usr\n                    ${CARGO_BASE_OPTS}\"\n}\n\nmake_target() {\n  cargo fetch ${CARGO_BASE_OPTS}\n  cargo cbuild ${CARGO_BUILD_OPTS}\n}\n\nmakeinstall_target() {\n  cargo cinstall ${CARGO_BUILD_OPTS} --destdir ${SYSROOT_PREFIX}\n  cargo cinstall ${CARGO_BUILD_OPTS} --destdir ${INSTALL}\n}\nelse\nmake_target() {\n  cp -PR * ${SYSROOT_PREFIX}\n}\n\nmakeinstall_target() {\n  : #\n}\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/obu_util/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"obu_util\"\nPKG_VERSION=\"0.1\"\nPKG_SHA256=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://aomedia.googlesource.com/aom/+/refs/tags/v3.3.0/av1/common/obu_util.c\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"av1 obu_util\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  ${CC} *.c -c -I. ${CFLAGS}\n  ${AR} -rcs libobu_util.a *.o\n  ${RANLIB}  libobu_util.a\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/{lib,include}\n  cp libobu_util.a ${SYSROOT_PREFIX}/usr/lib\n  cp obu_util.h aom_codec.h aom_image.h aom_integer.h ${SYSROOT_PREFIX}/usr/include\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/obu_util/sources/aom_codec.h",
    "content": "/*\n * Copyright (c) 2016, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n\n///////////////////////////////////////////////////////////////////////////////\n// Internal implementation details\n///////////////////////////////////////////////////////////////////////////////\n//\n// There are two levels of interfaces used to access the AOM codec: the\n// the aom_codec_iface and the aom_codec_ctx.\n//\n// 1. aom_codec_iface_t\n//    (Related files: aom/aom_codec.h, aom/src/aom_codec.c,\n//    aom/internal/aom_codec_internal.h, av1/av1_cx_iface.c,\n//    av1/av1_dx_iface.c)\n//\n// Used to initialize the codec context, which contains the configuration for\n// for modifying the encoder/decoder during run-time. See the other\n// documentation in this header file for more details. For the most part,\n// users will call helper functions, such as aom_codec_iface_name,\n// aom_codec_get_caps, etc., to interact with it.\n//\n// The main purpose of the aom_codec_iface_t is to provide a way to generate\n// a default codec config, find out what capabilities the implementation has,\n// and create an aom_codec_ctx_t (which is actually used to interact with the\n// codec).\n//\n// Note that the implementations for the AV1 algorithm are located in\n// av1/av1_cx_iface.c and av1/av1_dx_iface.c\n//\n//\n// 2. aom_codec_ctx_t\n//  (Related files: aom/aom_codec.h, av1/av1_cx_iface.c, av1/av1_dx_iface.c,\n//   aom/aomcx.h, aom/aomdx.h, aom/src/aom_encoder.c, aom/src/aom_decoder.c)\n//\n// The actual interface between user code and the codec. It stores the name\n// of the codec, a pointer back to the aom_codec_iface_t that initialized it,\n// initialization flags, a config for either encoder or the decoder, and a\n// pointer to internal data.\n//\n// The codec is configured / queried through calls to aom_codec_control,\n// which takes a control ID (listed in aomcx.h and aomdx.h) and a parameter.\n// In the case of \"getter\" control IDs, the parameter is modified to have\n// the requested value; in the case of \"setter\" control IDs, the codec's\n// configuration is changed based on the parameter. Note that a aom_codec_err_t\n// is returned, which indicates if the operation was successful or not.\n//\n// Note that for the encoder, the aom_codec_alg_priv_t points to the\n// the aom_codec_alg_priv structure in av1/av1_cx_iface.c, and for the decoder,\n// the struct in av1/av1_dx_iface.c. Variables such as AV1_COMP cpi are stored\n// here and also used in the core algorithm.\n//\n// At the end, aom_codec_destroy should be called for each initialized\n// aom_codec_ctx_t.\n\n/*!\\defgroup codec Common Algorithm Interface\n * This abstraction allows applications to easily support multiple video\n * formats with minimal code duplication. This section describes the interface\n * common to all codecs (both encoders and decoders).\n * @{\n */\n\n/*!\\file\n * \\brief Describes the codec algorithm interface to applications.\n *\n * This file describes the interface between an application and a\n * video codec algorithm.\n *\n * An application instantiates a specific codec instance by using\n * aom_codec_dec_init() or aom_codec_enc_init() and a pointer to the\n * algorithm's interface structure:\n *     <pre>\n *     my_app.c:\n *       extern aom_codec_iface_t my_codec;\n *       {\n *           aom_codec_ctx_t algo;\n *           int threads = 4;\n *           aom_codec_dec_cfg_t cfg = { threads, 0, 0, 1 };\n *           res = aom_codec_dec_init(&algo, &my_codec, &cfg, 0);\n *       }\n *     </pre>\n *\n * Once initialized, the instance is managed using other functions from\n * the aom_codec_* family.\n */\n#ifndef AOM_AOM_AOM_CODEC_H_\n#define AOM_AOM_AOM_CODEC_H_\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"aom_image.h\"\n#include \"aom_integer.h\"\n\n/*!\\brief Decorator indicating a function is deprecated */\n#ifndef AOM_DEPRECATED\n#if defined(__GNUC__) && __GNUC__\n#define AOM_DEPRECATED __attribute__((deprecated))\n#elif defined(_MSC_VER)\n#define AOM_DEPRECATED\n#else\n#define AOM_DEPRECATED\n#endif\n#endif /* AOM_DEPRECATED */\n\n#ifndef AOM_DECLSPEC_DEPRECATED\n#if defined(__GNUC__) && __GNUC__\n#define AOM_DECLSPEC_DEPRECATED /**< \\copydoc #AOM_DEPRECATED */\n#elif defined(_MSC_VER)\n/*!\\brief \\copydoc #AOM_DEPRECATED */\n#define AOM_DECLSPEC_DEPRECATED __declspec(deprecated)\n#else\n#define AOM_DECLSPEC_DEPRECATED /**< \\copydoc #AOM_DEPRECATED */\n#endif\n#endif /* AOM_DECLSPEC_DEPRECATED */\n\n/*!\\brief Decorator indicating a function is potentially unused */\n#ifdef AOM_UNUSED\n#elif defined(__GNUC__) || defined(__clang__)\n#define AOM_UNUSED __attribute__((unused))\n#else\n#define AOM_UNUSED\n#endif\n\n/*!\\brief Decorator indicating that given struct/union/enum is packed */\n#ifndef ATTRIBUTE_PACKED\n#if defined(__GNUC__) && __GNUC__\n#define ATTRIBUTE_PACKED __attribute__((packed))\n#elif defined(_MSC_VER)\n#define ATTRIBUTE_PACKED\n#else\n#define ATTRIBUTE_PACKED\n#endif\n#endif /* ATTRIBUTE_PACKED */\n\n/*!\\brief Current ABI version number\n *\n * \\internal\n * If this file is altered in any way that changes the ABI, this value\n * must be bumped.  Examples include, but are not limited to, changing\n * types, removing or reassigning enums, adding/removing/rearranging\n * fields to structures\n */\n#define AOM_CODEC_ABI_VERSION (7 + AOM_IMAGE_ABI_VERSION) /**<\\hideinitializer*/\n\n/*!\\brief Algorithm return codes */\ntypedef enum {\n  /*!\\brief Operation completed without error */\n  AOM_CODEC_OK,\n\n  /*!\\brief Unspecified error */\n  AOM_CODEC_ERROR,\n\n  /*!\\brief Memory operation failed */\n  AOM_CODEC_MEM_ERROR,\n\n  /*!\\brief ABI version mismatch */\n  AOM_CODEC_ABI_MISMATCH,\n\n  /*!\\brief Algorithm does not have required capability */\n  AOM_CODEC_INCAPABLE,\n\n  /*!\\brief The given bitstream is not supported.\n   *\n   * The bitstream was unable to be parsed at the highest level. The decoder\n   * is unable to proceed. This error \\ref SHOULD be treated as fatal to the\n   * stream. */\n  AOM_CODEC_UNSUP_BITSTREAM,\n\n  /*!\\brief Encoded bitstream uses an unsupported feature\n   *\n   * The decoder does not implement a feature required by the encoder. This\n   * return code should only be used for features that prevent future\n   * pictures from being properly decoded. This error \\ref MAY be treated as\n   * fatal to the stream or \\ref MAY be treated as fatal to the current GOP.\n   */\n  AOM_CODEC_UNSUP_FEATURE,\n\n  /*!\\brief The coded data for this stream is corrupt or incomplete\n   *\n   * There was a problem decoding the current frame.  This return code\n   * should only be used for failures that prevent future pictures from\n   * being properly decoded. This error \\ref MAY be treated as fatal to the\n   * stream or \\ref MAY be treated as fatal to the current GOP. If decoding\n   * is continued for the current GOP, artifacts may be present.\n   */\n  AOM_CODEC_CORRUPT_FRAME,\n\n  /*!\\brief An application-supplied parameter is not valid.\n   *\n   */\n  AOM_CODEC_INVALID_PARAM,\n\n  /*!\\brief An iterator reached the end of list.\n   *\n   */\n  AOM_CODEC_LIST_END\n\n} aom_codec_err_t;\n\n/*! \\brief Codec capabilities bitfield\n *\n *  Each codec advertises the capabilities it supports as part of its\n *  ::aom_codec_iface_t interface structure. Capabilities are extra interfaces\n *  or functionality, and are not required to be supported.\n *\n *  The available flags are specified by AOM_CODEC_CAP_* defines.\n */\ntypedef long aom_codec_caps_t;\n#define AOM_CODEC_CAP_DECODER 0x1 /**< Is a decoder */\n#define AOM_CODEC_CAP_ENCODER 0x2 /**< Is an encoder */\n\n/*! \\brief Initialization-time Feature Enabling\n *\n *  Certain codec features must be known at initialization time, to allow for\n *  proper memory allocation.\n *\n *  The available flags are specified by AOM_CODEC_USE_* defines.\n */\ntypedef long aom_codec_flags_t;\n\n/*!\\brief Time Stamp Type\n *\n * An integer, which when multiplied by the stream's time base, provides\n * the absolute time of a sample.\n */\ntypedef int64_t aom_codec_pts_t;\n\n/*!\\brief Codec interface structure.\n *\n * Contains function pointers and other data private to the codec\n * implementation. This structure is opaque to the application. Common\n * functions used with this structure:\n *   - aom_codec_iface_name(aom_codec_iface_t *iface): get the\n *     name of the codec\n *   - aom_codec_get_caps(aom_codec_iface_t *iface): returns\n *     the capabilities of the codec\n *   - aom_codec_enc_config_default: generate the default config for\n *     initializing the encoder (see documention in aom_encoder.h)\n *   - aom_codec_dec_init, aom_codec_enc_init: initialize the codec context\n *     structure (see documentation on aom_codec_ctx).\n *\n * To get access to the AV1 encoder and decoder, use aom_codec_av1_cx() and\n *  aom_codec_av1_dx().\n */\ntypedef const struct aom_codec_iface aom_codec_iface_t;\n\n/*!\\brief Codec private data structure.\n *\n * Contains data private to the codec implementation. This structure is opaque\n * to the application.\n */\ntypedef struct aom_codec_priv aom_codec_priv_t;\n\n/*!\\brief Compressed Frame Flags\n *\n * This type represents a bitfield containing information about a compressed\n * frame that may be useful to an application. The most significant 16 bits\n * can be used by an algorithm to provide additional detail, for example to\n * support frame types that are codec specific (MPEG-1 D-frames for example)\n */\ntypedef uint32_t aom_codec_frame_flags_t;\n#define AOM_FRAME_IS_KEY 0x1 /**< frame is the start of a GOP */\n/*!\\brief frame can be dropped without affecting the stream (no future frame\n * depends on this one) */\n#define AOM_FRAME_IS_DROPPABLE 0x2\n/*!\\brief this is an INTRA_ONLY frame */\n#define AOM_FRAME_IS_INTRAONLY 0x10\n/*!\\brief this is an S-frame */\n#define AOM_FRAME_IS_SWITCH 0x20\n/*!\\brief this is an error-resilient frame */\n#define AOM_FRAME_IS_ERROR_RESILIENT 0x40\n/*!\\brief this is a key-frame dependent recovery-point frame */\n#define AOM_FRAME_IS_DELAYED_RANDOM_ACCESS_POINT 0x80\n\n/*!\\brief Iterator\n *\n * Opaque storage used for iterating over lists.\n */\ntypedef const void *aom_codec_iter_t;\n\n/*!\\brief Codec context structure\n *\n * All codecs \\ref MUST support this context structure fully. In general,\n * this data should be considered private to the codec algorithm, and\n * not be manipulated or examined by the calling application. Applications\n * may reference the 'name' member to get a printable description of the\n * algorithm.\n */\ntypedef struct aom_codec_ctx {\n  const char *name;             /**< Printable interface name */\n  aom_codec_iface_t *iface;     /**< Interface pointers */\n  aom_codec_err_t err;          /**< Last returned error */\n  const char *err_detail;       /**< Detailed info, if available */\n  aom_codec_flags_t init_flags; /**< Flags passed at init time */\n  union {\n    /**< Decoder Configuration Pointer */\n    const struct aom_codec_dec_cfg *dec;\n    /**< Encoder Configuration Pointer */\n    const struct aom_codec_enc_cfg *enc;\n    const void *raw;\n  } config;               /**< Configuration pointer aliasing union */\n  aom_codec_priv_t *priv; /**< Algorithm private storage */\n} aom_codec_ctx_t;\n\n/*!\\brief Bit depth for codec\n * *\n * This enumeration determines the bit depth of the codec.\n */\ntypedef enum aom_bit_depth {\n  AOM_BITS_8 = 8,   /**<  8 bits */\n  AOM_BITS_10 = 10, /**< 10 bits */\n  AOM_BITS_12 = 12, /**< 12 bits */\n} aom_bit_depth_t;\n\n/*!\\brief Superblock size selection.\n *\n * Defines the superblock size used for encoding. The superblock size can\n * either be fixed at 64x64 or 128x128 pixels, or it can be dynamically\n * selected by the encoder for each frame.\n */\ntypedef enum aom_superblock_size {\n  AOM_SUPERBLOCK_SIZE_64X64,   /**< Always use 64x64 superblocks. */\n  AOM_SUPERBLOCK_SIZE_128X128, /**< Always use 128x128 superblocks. */\n  AOM_SUPERBLOCK_SIZE_DYNAMIC  /**< Select superblock size dynamically. */\n} aom_superblock_size_t;\n\n/*\n * Library Version Number Interface\n *\n * For example, see the following sample return values:\n *     aom_codec_version()           (1<<16 | 2<<8 | 3)\n *     aom_codec_version_str()       \"v1.2.3-rc1-16-gec6a1ba\"\n *     aom_codec_version_extra_str() \"rc1-16-gec6a1ba\"\n */\n\n/*!\\brief Return the version information (as an integer)\n *\n * Returns a packed encoding of the library version number. This will only\n * include the major.minor.patch component of the version number. Note that this\n * encoded value should be accessed through the macros provided, as the encoding\n * may change in the future.\n *\n */\nint aom_codec_version(void);\n\n/*!\\brief Return the major version number */\n#define aom_codec_version_major() ((aom_codec_version() >> 16) & 0xff)\n\n/*!\\brief Return the minor version number */\n#define aom_codec_version_minor() ((aom_codec_version() >> 8) & 0xff)\n\n/*!\\brief Return the patch version number */\n#define aom_codec_version_patch() ((aom_codec_version() >> 0) & 0xff)\n\n/*!\\brief Return the version information (as a string)\n *\n * Returns a printable string containing the full library version number. This\n * may contain additional text following the three digit version number, as to\n * indicate release candidates, prerelease versions, etc.\n *\n */\nconst char *aom_codec_version_str(void);\n\n/*!\\brief Return the version information (as a string)\n *\n * Returns a printable \"extra string\". This is the component of the string\n * returned by aom_codec_version_str() following the three digit version number.\n *\n */\nconst char *aom_codec_version_extra_str(void);\n\n/*!\\brief Return the build configuration\n *\n * Returns a printable string containing an encoded version of the build\n * configuration. This may be useful to aom support.\n *\n */\nconst char *aom_codec_build_config(void);\n\n/*!\\brief Return the name for a given interface\n *\n * Returns a human readable string for name of the given codec interface.\n *\n * \\param[in]    iface     Interface pointer\n *\n */\nconst char *aom_codec_iface_name(aom_codec_iface_t *iface);\n\n/*!\\brief Convert error number to printable string\n *\n * Returns a human readable string for the last error returned by the\n * algorithm. The returned error will be one line and will not contain\n * any newline characters.\n *\n *\n * \\param[in]    err     Error number.\n *\n */\nconst char *aom_codec_err_to_string(aom_codec_err_t err);\n\n/*!\\brief Retrieve error synopsis for codec context\n *\n * Returns a human readable string for the last error returned by the\n * algorithm. The returned error will be one line and will not contain\n * any newline characters.\n *\n *\n * \\param[in]    ctx     Pointer to this instance's context.\n *\n */\nconst char *aom_codec_error(aom_codec_ctx_t *ctx);\n\n/*!\\brief Retrieve detailed error information for codec context\n *\n * Returns a human readable string providing detailed information about\n * the last error.\n *\n * \\param[in]    ctx     Pointer to this instance's context.\n *\n * \\retval NULL\n *     No detailed information is available.\n */\nconst char *aom_codec_error_detail(aom_codec_ctx_t *ctx);\n\n/* REQUIRED FUNCTIONS\n *\n * The following functions are required to be implemented for all codecs.\n * They represent the base case functionality expected of all codecs.\n */\n\n/*!\\brief Destroy a codec instance\n *\n * Destroys a codec context, freeing any associated memory buffers.\n *\n * \\param[in] ctx   Pointer to this instance's context\n *\n * \\retval #AOM_CODEC_OK\n *     The codec algorithm initialized.\n * \\retval #AOM_CODEC_MEM_ERROR\n *     Memory allocation failed.\n */\naom_codec_err_t aom_codec_destroy(aom_codec_ctx_t *ctx);\n\n/*!\\brief Get the capabilities of an algorithm.\n *\n * Retrieves the capabilities bitfield from the algorithm's interface.\n *\n * \\param[in] iface   Pointer to the algorithm interface\n *\n */\naom_codec_caps_t aom_codec_get_caps(aom_codec_iface_t *iface);\n\n/*!\\name Codec Control\n *\n * The aom_codec_control function exchanges algorithm specific data with the\n * codec instance. Additionally, the macro AOM_CODEC_CONTROL_TYPECHECKED is\n * provided, which will type-check the parameter against the control ID before\n * calling aom_codec_control - note that this macro requires the control ID\n * to be directly encoded in it, e.g.,\n * AOM_CODEC_CONTROL_TYPECHECKED(&ctx, AOME_SET_CPUUSED, 8).\n *\n * The codec control IDs can be found in aom.h, aomcx.h, and aomdx.h\n * (defined as aom_com_control_id, aome_enc_control_id, and aom_dec_control_id).\n * @{\n */\n/*!\\brief Algorithm Control\n *\n * aom_codec_control takes a context, a control ID, and a third parameter\n * (with varying type). If the context is non-null and an error occurs,\n * ctx->err will be set to the same value as the return value.\n *\n * \\param[in]     ctx              Pointer to this instance's context\n * \\param[in]     ctrl_id          Algorithm specific control identifier.\n *                                 Must be nonzero.\n *\n * \\retval #AOM_CODEC_OK\n *     The control request was processed.\n * \\retval #AOM_CODEC_ERROR\n *     The control request was not processed.\n * \\retval #AOM_CODEC_INVALID_PARAM\n *     The control ID was zero, or the data was not valid.\n */\naom_codec_err_t aom_codec_control(aom_codec_ctx_t *ctx, int ctrl_id, ...);\n\n/*!\\brief Key & Value API\n *\n * aom_codec_set_option() takes a context, a key (option name) and a value. If\n * the context is non-null and an error occurs, ctx->err will be set to the same\n * value as the return value.\n *\n * \\param[in]     ctx              Pointer to this instance's context\n * \\param[in]     name             The name of the option (key)\n * \\param[in]     value            The value of the option\n *\n * \\retval #AOM_CODEC_OK\n *     The value of the option was set.\n * \\retval #AOM_CODEC_INVALID_PARAM\n *     The data was not valid.\n * \\retval #AOM_CODEC_ERROR\n *     The option was not successfully set.\n */\naom_codec_err_t aom_codec_set_option(aom_codec_ctx_t *ctx, const char *name,\n                                     const char *value);\n\n/*!\\brief aom_codec_control wrapper macro (adds type-checking, less flexible)\n *\n * This macro allows for type safe conversions across the variadic parameter\n * to aom_codec_control(). However, it requires the explicit control ID\n * be passed in (it cannot be passed in via a variable) -- otherwise a compiler\n * error will occur. After the type checking, it calls aom_codec_control.\n */\n#define AOM_CODEC_CONTROL_TYPECHECKED(ctx, id, data) \\\n  aom_codec_control_typechecked_##id(ctx, id, data) /**<\\hideinitializer*/\n\n/*!\\brief Creates typechecking mechanisms for aom_codec_control\n *\n * It defines a static function with the correctly typed arguments as a wrapper\n * to the type-unsafe aom_codec_control function. It also creates a typedef\n * for each type.\n */\n#define AOM_CTRL_USE_TYPE(id, typ)                           \\\n  static aom_codec_err_t aom_codec_control_typechecked_##id( \\\n      aom_codec_ctx_t *, int, typ) AOM_UNUSED;               \\\n  static aom_codec_err_t aom_codec_control_typechecked_##id( \\\n      aom_codec_ctx_t *ctx, int ctrl, typ data) {            \\\n    return aom_codec_control(ctx, ctrl, data);               \\\n  } /**<\\hideinitializer*/                                   \\\n  typedef typ aom_codec_control_type_##id;\n/*!@} end Codec Control group */\n\n/*!\\brief OBU types. */\ntypedef enum ATTRIBUTE_PACKED {\n  OBU_SEQUENCE_HEADER = 1,\n  OBU_TEMPORAL_DELIMITER = 2,\n  OBU_FRAME_HEADER = 3,\n  OBU_TILE_GROUP = 4,\n  OBU_METADATA = 5,\n  OBU_FRAME = 6,\n  OBU_REDUNDANT_FRAME_HEADER = 7,\n  OBU_TILE_LIST = 8,\n  OBU_PADDING = 15,\n} OBU_TYPE;\n\n/*!\\brief OBU metadata types. */\ntypedef enum {\n  OBU_METADATA_TYPE_AOM_RESERVED_0 = 0,\n  OBU_METADATA_TYPE_HDR_CLL = 1,\n  OBU_METADATA_TYPE_HDR_MDCV = 2,\n  OBU_METADATA_TYPE_SCALABILITY = 3,\n  OBU_METADATA_TYPE_ITUT_T35 = 4,\n  OBU_METADATA_TYPE_TIMECODE = 5,\n} OBU_METADATA_TYPE;\n\n/*!\\brief Returns string representation of OBU_TYPE.\n *\n * \\param[in]     type            The OBU_TYPE to convert to string.\n */\nconst char *aom_obu_type_to_string(OBU_TYPE type);\n\n/*!@} - end defgroup codec*/\n#ifdef __cplusplus\n}\n#endif\n#endif  // AOM_AOM_AOM_CODEC_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/obu_util/sources/aom_config.h",
    "content": "/* \n * copied from https://raw.githubusercontent.com/SDWebImage/libaom-Xcode/master/generate/config/aom_config.h\n */\n\n/*\n * Copyright (c) 2021, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n#ifndef AOM_CONFIG_H_\n#define AOM_CONFIG_H_\n\n#define ARCH_ARM 1\n#define ARCH_MIPS 0\n#define ARCH_PPC 0\n#define ARCH_X86 0\n#define ARCH_X86_64 0\n#define CONFIG_ACCOUNTING 0\n#define CONFIG_ANALYZER 0\n#define CONFIG_AV1_DECODER 1\n#define CONFIG_AV1_ENCODER 0\n#define CONFIG_AV1_HIGHBITDEPTH 1\n#define CONFIG_BIG_ENDIAN 0\n#define CONFIG_BITSTREAM_DEBUG 0\n#define CONFIG_COEFFICIENT_RANGE_CHECKING 0\n#define CONFIG_COLLECT_COMPONENT_TIMING 0\n#define CONFIG_COLLECT_PARTITION_STATS 0\n#define CONFIG_COLLECT_RD_STATS 0\n#define CONFIG_DEBUG 0\n#define CONFIG_DENOISE 1\n#define CONFIG_DISABLE_FULL_PIXEL_SPLIT_8X8 1\n#define CONFIG_DIST_8X8 0\n#define CONFIG_ENTROPY_STATS 0\n#define CONFIG_GCC 1\n#define CONFIG_GCOV 0\n#define CONFIG_GPROF 0\n#define CONFIG_HTB_TRELLIS 0\n#define CONFIG_INSPECTION 0\n#define CONFIG_INTERNAL_STATS 0\n#define CONFIG_INTER_STATS_ONLY 0\n#define CONFIG_LIBYUV 1\n#define CONFIG_LPF_MASK 0\n#define CONFIG_MAX_DECODE_PROFILE 2\n#define CONFIG_MISMATCH_DEBUG 0\n#define CONFIG_MULTITHREAD 1\n#define CONFIG_NN_V2 0\n#define CONFIG_NORMAL_TILE_MODE 0\n#define CONFIG_OS_SUPPORT 1\n#define CONFIG_PIC 0\n#define CONFIG_RD_DEBUG 0\n#define CONFIG_REALTIME_ONLY 0\n#define CONFIG_RUNTIME_CPU_DETECT 1\n#define CONFIG_SHARED 0\n#define CONFIG_SHARP_SETTINGS 0\n#define CONFIG_SIZE_LIMIT 0\n#define CONFIG_SPATIAL_RESAMPLING 1\n#define CONFIG_SPEED_STATS 0\n#define CONFIG_SUPERRES_IN_RECODE 1\n#define CONFIG_TUNE_VMAF 1\n#define CONFIG_WEBM_IO 1\n#define DECODE_HEIGHT_LIMIT 0\n#define DECODE_WIDTH_LIMIT 0\n#define FORCE_HIGHBITDEPTH_DECODING 0\n#define HAVE_AVX 0\n#define HAVE_AVX2 0\n#define HAVE_DSPR2 0\n#define HAVE_FEXCEPT 0\n#define HAVE_MIPS32 0\n#define HAVE_MIPS64 0\n#define HAVE_MMX 0\n#define HAVE_MSA 0\n#define HAVE_NEON 1\n#define HAVE_PTHREAD_H 1\n#define HAVE_SSE 0\n#define HAVE_SSE2 0\n#define HAVE_SSE3 0\n#define HAVE_SSE4_1 0\n#define HAVE_SSE4_2 0\n#define HAVE_SSSE3 0\n#define HAVE_UNISTD_H 1\n#define HAVE_VSX 0\n#define HAVE_WXWIDGETS 0\n#define INLINE inline\n\n#endif  // AOM_CONFIG_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/obu_util/sources/aom_config.h-orig.h",
    "content": "// from https://raw.githubusercontent.com/SDWebImage/libaom-Xcode/master/generate/config/aom_config.h\n\n/*\n * Copyright (c) 2021, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n#ifndef AOM_CONFIG_H_\n#define AOM_CONFIG_H_\n\n#define ARCH_ARM 0\n#define ARCH_MIPS 0\n#define ARCH_PPC 0\n#define ARCH_X86 0\n#define ARCH_X86_64 0\n#define CONFIG_ACCOUNTING 0\n#define CONFIG_ANALYZER 0\n#define CONFIG_AV1_DECODER 1\n#define CONFIG_AV1_ENCODER 1\n#define CONFIG_AV1_HIGHBITDEPTH 1\n#define CONFIG_BIG_ENDIAN 0\n#define CONFIG_BITSTREAM_DEBUG 0\n#define CONFIG_COEFFICIENT_RANGE_CHECKING 0\n#define CONFIG_COLLECT_COMPONENT_TIMING 0\n#define CONFIG_COLLECT_PARTITION_STATS 0\n#define CONFIG_COLLECT_RD_STATS 0\n#define CONFIG_DEBUG 0\n#define CONFIG_DENOISE 1\n#define CONFIG_DISABLE_FULL_PIXEL_SPLIT_8X8 1\n#define CONFIG_DIST_8X8 0\n#define CONFIG_ENTROPY_STATS 0\n#define CONFIG_GCC 1\n#define CONFIG_GCOV 0\n#define CONFIG_GPROF 0\n#define CONFIG_HTB_TRELLIS 0\n#define CONFIG_INSPECTION 0\n#define CONFIG_INTERNAL_STATS 0\n#define CONFIG_INTER_STATS_ONLY 0\n#define CONFIG_LIBYUV 1\n#define CONFIG_LPF_MASK 0\n#define CONFIG_MAX_DECODE_PROFILE 2\n#define CONFIG_MISMATCH_DEBUG 0\n#define CONFIG_MULTITHREAD 1\n#define CONFIG_NN_V2 0\n#define CONFIG_NORMAL_TILE_MODE 0\n#define CONFIG_OS_SUPPORT 1\n#define CONFIG_PIC 0\n#define CONFIG_RD_DEBUG 0\n#define CONFIG_REALTIME_ONLY 0\n#define CONFIG_RUNTIME_CPU_DETECT 1\n#define CONFIG_SHARED 0\n#define CONFIG_SHARP_SETTINGS 0\n#define CONFIG_SIZE_LIMIT 0\n#define CONFIG_SPATIAL_RESAMPLING 1\n#define CONFIG_SPEED_STATS 0\n#define CONFIG_SUPERRES_IN_RECODE 1\n#define CONFIG_TUNE_VMAF 1\n#define CONFIG_WEBM_IO 1\n#define DECODE_HEIGHT_LIMIT 0\n#define DECODE_WIDTH_LIMIT 0\n#define FORCE_HIGHBITDEPTH_DECODING 0\n#define HAVE_AVX 0\n#define HAVE_AVX2 0\n#define HAVE_DSPR2 0\n#define HAVE_FEXCEPT 0\n#define HAVE_MIPS32 0\n#define HAVE_MIPS64 0\n#define HAVE_MMX 0\n#define HAVE_MSA 0\n#define HAVE_NEON 0\n#define HAVE_PTHREAD_H 1\n#define HAVE_SSE 0\n#define HAVE_SSE2 0\n#define HAVE_SSE3 0\n#define HAVE_SSE4_1 0\n#define HAVE_SSE4_2 0\n#define HAVE_SSSE3 0\n#define HAVE_UNISTD_H 1\n#define HAVE_VSX 0\n#define HAVE_WXWIDGETS 0\n#define INLINE inline\n\n#endif  // AOM_CONFIG_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/obu_util/sources/aom_image.h",
    "content": "/*\n * Copyright (c) 2016, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n\n/*!\\file\n * \\brief Describes the aom image descriptor and associated operations\n *\n */\n#ifndef AOM_AOM_AOM_IMAGE_H_\n#define AOM_AOM_AOM_IMAGE_H_\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"aom_integer.h\"\n\n/*!\\brief Current ABI version number\n *\n * \\internal\n * If this file is altered in any way that changes the ABI, this value\n * must be bumped.  Examples include, but are not limited to, changing\n * types, removing or reassigning enums, adding/removing/rearranging\n * fields to structures\n */\n#define AOM_IMAGE_ABI_VERSION (9) /**<\\hideinitializer*/\n\n#define AOM_IMG_FMT_PLANAR 0x100  /**< Image is a planar format. */\n#define AOM_IMG_FMT_UV_FLIP 0x200 /**< V plane precedes U in memory. */\n/** 0x400 used to signal alpha channel, skipping for backwards compatibility. */\n#define AOM_IMG_FMT_HIGHBITDEPTH 0x800 /**< Image uses 16bit framebuffer. */\n\n/*!\\brief List of supported image formats */\ntypedef enum aom_img_fmt {\n  AOM_IMG_FMT_NONE,\n  AOM_IMG_FMT_YV12 =\n      AOM_IMG_FMT_PLANAR | AOM_IMG_FMT_UV_FLIP | 1, /**< planar YVU */\n  AOM_IMG_FMT_I420 = AOM_IMG_FMT_PLANAR | 2,\n  AOM_IMG_FMT_AOMYV12 = AOM_IMG_FMT_PLANAR | AOM_IMG_FMT_UV_FLIP |\n                        3, /** < planar 4:2:0 format with aom color space */\n  AOM_IMG_FMT_AOMI420 = AOM_IMG_FMT_PLANAR | 4,\n  AOM_IMG_FMT_I422 = AOM_IMG_FMT_PLANAR | 5,\n  AOM_IMG_FMT_I444 = AOM_IMG_FMT_PLANAR | 6,\n  AOM_IMG_FMT_I42016 = AOM_IMG_FMT_I420 | AOM_IMG_FMT_HIGHBITDEPTH,\n  AOM_IMG_FMT_YV1216 = AOM_IMG_FMT_YV12 | AOM_IMG_FMT_HIGHBITDEPTH,\n  AOM_IMG_FMT_I42216 = AOM_IMG_FMT_I422 | AOM_IMG_FMT_HIGHBITDEPTH,\n  AOM_IMG_FMT_I44416 = AOM_IMG_FMT_I444 | AOM_IMG_FMT_HIGHBITDEPTH,\n} aom_img_fmt_t; /**< alias for enum aom_img_fmt */\n\n/*!\\brief List of supported color primaries */\ntypedef enum aom_color_primaries {\n  AOM_CICP_CP_RESERVED_0 = 0,  /**< For future use */\n  AOM_CICP_CP_BT_709 = 1,      /**< BT.709 */\n  AOM_CICP_CP_UNSPECIFIED = 2, /**< Unspecified */\n  AOM_CICP_CP_RESERVED_3 = 3,  /**< For future use */\n  AOM_CICP_CP_BT_470_M = 4,    /**< BT.470 System M (historical) */\n  AOM_CICP_CP_BT_470_B_G = 5,  /**< BT.470 System B, G (historical) */\n  AOM_CICP_CP_BT_601 = 6,      /**< BT.601 */\n  AOM_CICP_CP_SMPTE_240 = 7,   /**< SMPTE 240 */\n  AOM_CICP_CP_GENERIC_FILM =\n      8, /**< Generic film (color filters using illuminant C) */\n  AOM_CICP_CP_BT_2020 = 9,      /**< BT.2020, BT.2100 */\n  AOM_CICP_CP_XYZ = 10,         /**< SMPTE 428 (CIE 1921 XYZ) */\n  AOM_CICP_CP_SMPTE_431 = 11,   /**< SMPTE RP 431-2 */\n  AOM_CICP_CP_SMPTE_432 = 12,   /**< SMPTE EG 432-1  */\n  AOM_CICP_CP_RESERVED_13 = 13, /**< For future use (values 13 - 21)  */\n  AOM_CICP_CP_EBU_3213 = 22,    /**< EBU Tech. 3213-E  */\n  AOM_CICP_CP_RESERVED_23 = 23  /**< For future use (values 23 - 255)  */\n} aom_color_primaries_t;        /**< alias for enum aom_color_primaries */\n\n/*!\\brief List of supported transfer functions */\ntypedef enum aom_transfer_characteristics {\n  AOM_CICP_TC_RESERVED_0 = 0,  /**< For future use */\n  AOM_CICP_TC_BT_709 = 1,      /**< BT.709 */\n  AOM_CICP_TC_UNSPECIFIED = 2, /**< Unspecified */\n  AOM_CICP_TC_RESERVED_3 = 3,  /**< For future use */\n  AOM_CICP_TC_BT_470_M = 4,    /**< BT.470 System M (historical)  */\n  AOM_CICP_TC_BT_470_B_G = 5,  /**< BT.470 System B, G (historical) */\n  AOM_CICP_TC_BT_601 = 6,      /**< BT.601 */\n  AOM_CICP_TC_SMPTE_240 = 7,   /**< SMPTE 240 M */\n  AOM_CICP_TC_LINEAR = 8,      /**< Linear */\n  AOM_CICP_TC_LOG_100 = 9,     /**< Logarithmic (100 : 1 range) */\n  AOM_CICP_TC_LOG_100_SQRT10 =\n      10,                     /**< Logarithmic (100 * Sqrt(10) : 1 range) */\n  AOM_CICP_TC_IEC_61966 = 11, /**< IEC 61966-2-4 */\n  AOM_CICP_TC_BT_1361 = 12,   /**< BT.1361 */\n  AOM_CICP_TC_SRGB = 13,      /**< sRGB or sYCC*/\n  AOM_CICP_TC_BT_2020_10_BIT = 14, /**< BT.2020 10-bit systems */\n  AOM_CICP_TC_BT_2020_12_BIT = 15, /**< BT.2020 12-bit systems */\n  AOM_CICP_TC_SMPTE_2084 = 16,     /**< SMPTE ST 2084, ITU BT.2100 PQ */\n  AOM_CICP_TC_SMPTE_428 = 17,      /**< SMPTE ST 428 */\n  AOM_CICP_TC_HLG = 18,            /**< BT.2100 HLG, ARIB STD-B67 */\n  AOM_CICP_TC_RESERVED_19 = 19     /**< For future use (values 19-255) */\n} aom_transfer_characteristics_t;  /**< alias for enum aom_transfer_function */\n\n/*!\\brief List of supported matrix coefficients */\ntypedef enum aom_matrix_coefficients {\n  AOM_CICP_MC_IDENTITY = 0,    /**< Identity matrix */\n  AOM_CICP_MC_BT_709 = 1,      /**< BT.709 */\n  AOM_CICP_MC_UNSPECIFIED = 2, /**< Unspecified */\n  AOM_CICP_MC_RESERVED_3 = 3,  /**< For future use */\n  AOM_CICP_MC_FCC = 4,         /**< US FCC 73.628 */\n  AOM_CICP_MC_BT_470_B_G = 5,  /**< BT.470 System B, G (historical) */\n  AOM_CICP_MC_BT_601 = 6,      /**< BT.601 */\n  AOM_CICP_MC_SMPTE_240 = 7,   /**< SMPTE 240 M */\n  AOM_CICP_MC_SMPTE_YCGCO = 8, /**< YCgCo */\n  AOM_CICP_MC_BT_2020_NCL =\n      9, /**< BT.2020 non-constant luminance, BT.2100 YCbCr  */\n  AOM_CICP_MC_BT_2020_CL = 10, /**< BT.2020 constant luminance */\n  AOM_CICP_MC_SMPTE_2085 = 11, /**< SMPTE ST 2085 YDzDx */\n  AOM_CICP_MC_CHROMAT_NCL =\n      12, /**< Chromaticity-derived non-constant luminance */\n  AOM_CICP_MC_CHROMAT_CL = 13, /**< Chromaticity-derived constant luminance */\n  AOM_CICP_MC_ICTCP = 14,      /**< BT.2100 ICtCp */\n  AOM_CICP_MC_RESERVED_15 = 15 /**< For future use (values 15-255)  */\n} aom_matrix_coefficients_t;\n\n/*!\\brief List of supported color range */\ntypedef enum aom_color_range {\n  AOM_CR_STUDIO_RANGE = 0, /**< Y [16..235], UV [16..240] */\n  AOM_CR_FULL_RANGE = 1    /**< YUV/RGB [0..255] */\n} aom_color_range_t;       /**< alias for enum aom_color_range */\n\n/*!\\brief List of chroma sample positions */\ntypedef enum aom_chroma_sample_position {\n  AOM_CSP_UNKNOWN = 0,          /**< Unknown */\n  AOM_CSP_VERTICAL = 1,         /**< Horizontally co-located with luma(0, 0)*/\n                                /**< sample, between two vertical samples */\n  AOM_CSP_COLOCATED = 2,        /**< Co-located with luma(0, 0) sample */\n  AOM_CSP_RESERVED = 3          /**< Reserved value */\n} aom_chroma_sample_position_t; /**< alias for enum aom_transfer_function */\n\n/*!\\brief List of insert flags for Metadata\n *\n * These flags control how the library treats metadata during encode.\n *\n * While encoding, when metadata is added to an aom_image via\n * aom_img_add_metadata(), the flag passed along with the metadata will\n * determine where the metadata OBU will be placed in the encoded OBU stream.\n * Metadata will be emitted into the output stream within the next temporal unit\n * if it satisfies the specified insertion flag.\n *\n * During decoding, when the library encounters a metadata OBU, it is always\n * flagged as AOM_MIF_ANY_FRAME and emitted with the next output aom_image.\n */\ntypedef enum aom_metadata_insert_flags {\n  AOM_MIF_NON_KEY_FRAME = 0, /**< Adds metadata if it's not keyframe */\n  AOM_MIF_KEY_FRAME = 1,     /**< Adds metadata only if it's a keyframe */\n  AOM_MIF_ANY_FRAME = 2      /**< Adds metadata to any type of frame */\n} aom_metadata_insert_flags_t;\n\n/*!\\brief Array of aom_metadata structs for an image. */\ntypedef struct aom_metadata_array aom_metadata_array_t;\n\n/*!\\brief Metadata payload. */\ntypedef struct aom_metadata {\n  uint32_t type;                           /**< Metadata type */\n  uint8_t *payload;                        /**< Metadata payload data */\n  size_t sz;                               /**< Metadata payload size */\n  aom_metadata_insert_flags_t insert_flag; /**< Metadata insertion flag */\n} aom_metadata_t;\n\n/**\\brief Image Descriptor */\ntypedef struct aom_image {\n  aom_img_fmt_t fmt;                 /**< Image Format */\n  aom_color_primaries_t cp;          /**< CICP Color Primaries */\n  aom_transfer_characteristics_t tc; /**< CICP Transfer Characteristics */\n  aom_matrix_coefficients_t mc;      /**< CICP Matrix Coefficients */\n  int monochrome;                    /**< Whether image is monochrome */\n  aom_chroma_sample_position_t csp;  /**< chroma sample position */\n  aom_color_range_t range;           /**< Color Range */\n\n  /* Image storage dimensions */\n  unsigned int w;         /**< Stored image width */\n  unsigned int h;         /**< Stored image height */\n  unsigned int bit_depth; /**< Stored image bit-depth */\n\n  /* Image display dimensions */\n  unsigned int d_w; /**< Displayed image width */\n  unsigned int d_h; /**< Displayed image height */\n\n  /* Image intended rendering dimensions */\n  unsigned int r_w; /**< Intended rendering image width */\n  unsigned int r_h; /**< Intended rendering image height */\n\n  /* Chroma subsampling info */\n  unsigned int x_chroma_shift; /**< subsampling order, X */\n  unsigned int y_chroma_shift; /**< subsampling order, Y */\n\n/* Image data pointers. */\n#define AOM_PLANE_PACKED 0  /**< To be used for all packed formats */\n#define AOM_PLANE_Y 0       /**< Y (Luminance) plane */\n#define AOM_PLANE_U 1       /**< U (Chroma) plane */\n#define AOM_PLANE_V 2       /**< V (Chroma) plane */\n  unsigned char *planes[3]; /**< pointer to the top left pixel for each plane */\n  int stride[3];            /**< stride between rows for each plane */\n  size_t sz;                /**< data size */\n\n  int bps; /**< bits per sample (for packed formats) */\n\n  int temporal_id; /**< Temporal layer Id of image */\n  int spatial_id;  /**< Spatial layer Id of image */\n\n  /*!\\brief The following member may be set by the application to associate\n   * data with this image.\n   */\n  void *user_priv;\n\n  /* The following members should be treated as private. */\n  unsigned char *img_data; /**< private */\n  int img_data_owner;      /**< private */\n  int self_allocd;         /**< private */\n\n  aom_metadata_array_t\n      *metadata; /**< Metadata payloads associated with the image. */\n\n  void *fb_priv; /**< Frame buffer data associated with the image. */\n} aom_image_t;   /**< alias for struct aom_image */\n\n/*!\\brief Open a descriptor, allocating storage for the underlying image\n *\n * Returns a descriptor for storing an image of the given format. The\n * storage for the image is allocated on the heap.\n *\n * \\param[in]    img       Pointer to storage for descriptor. If this parameter\n *                         is NULL, the storage for the descriptor will be\n *                         allocated on the heap.\n * \\param[in]    fmt       Format for the image\n * \\param[in]    d_w       Width of the image\n * \\param[in]    d_h       Height of the image\n * \\param[in]    align     Alignment, in bytes, of the image buffer and\n *                         each row in the image (stride).\n *\n * \\return Returns a pointer to the initialized image descriptor. If the img\n *         parameter is non-null, the value of the img parameter will be\n *         returned.\n */\naom_image_t *aom_img_alloc(aom_image_t *img, aom_img_fmt_t fmt,\n                           unsigned int d_w, unsigned int d_h,\n                           unsigned int align);\n\n/*!\\brief Open a descriptor, using existing storage for the underlying image\n *\n * Returns a descriptor for storing an image of the given format. The\n * storage for the image has been allocated elsewhere, and a descriptor is\n * desired to \"wrap\" that storage.\n *\n * \\param[in]    img       Pointer to storage for descriptor. If this parameter\n *                         is NULL, the storage for the descriptor will be\n *                         allocated on the heap.\n * \\param[in]    fmt       Format for the image\n * \\param[in]    d_w       Width of the image\n * \\param[in]    d_h       Height of the image\n * \\param[in]    align     Alignment, in bytes, of each row in the image\n *                         (stride).\n * \\param[in]    img_data  Storage to use for the image\n *\n * \\return Returns a pointer to the initialized image descriptor. If the img\n *         parameter is non-null, the value of the img parameter will be\n *         returned.\n */\naom_image_t *aom_img_wrap(aom_image_t *img, aom_img_fmt_t fmt, unsigned int d_w,\n                          unsigned int d_h, unsigned int align,\n                          unsigned char *img_data);\n\n/*!\\brief Open a descriptor, allocating storage for the underlying image with a\n * border\n *\n * Returns a descriptor for storing an image of the given format and its\n * borders. The storage for the image is allocated on the heap.\n *\n * \\param[in]    img        Pointer to storage for descriptor. If this parameter\n *                          is NULL, the storage for the descriptor will be\n *                          allocated on the heap.\n * \\param[in]    fmt        Format for the image\n * \\param[in]    d_w        Width of the image\n * \\param[in]    d_h        Height of the image\n * \\param[in]    align      Alignment, in bytes, of the image buffer and\n *                          each row in the image (stride).\n * \\param[in]    size_align Alignment, in pixels, of the image width and height.\n * \\param[in]    border     A border that is padded on four sides of the image.\n *\n * \\return Returns a pointer to the initialized image descriptor. If the img\n *         parameter is non-null, the value of the img parameter will be\n *         returned.\n */\naom_image_t *aom_img_alloc_with_border(aom_image_t *img, aom_img_fmt_t fmt,\n                                       unsigned int d_w, unsigned int d_h,\n                                       unsigned int align,\n                                       unsigned int size_align,\n                                       unsigned int border);\n\n/*!\\brief Set the rectangle identifying the displayed portion of the image\n *\n * Updates the displayed rectangle (aka viewport) on the image surface to\n * match the specified coordinates and size. Specifically, sets img->d_w,\n * img->d_h, and elements of the img->planes[] array.\n *\n * \\param[in]    img       Image descriptor\n * \\param[in]    x         leftmost column\n * \\param[in]    y         topmost row\n * \\param[in]    w         width\n * \\param[in]    h         height\n * \\param[in]    border    A border that is padded on four sides of the image.\n *\n * \\return 0 if the requested rectangle is valid, nonzero (-1) otherwise.\n */\nint aom_img_set_rect(aom_image_t *img, unsigned int x, unsigned int y,\n                     unsigned int w, unsigned int h, unsigned int border);\n\n/*!\\brief Flip the image vertically (top for bottom)\n *\n * Adjusts the image descriptor's pointers and strides to make the image\n * be referenced upside-down.\n *\n * \\param[in]    img       Image descriptor\n */\nvoid aom_img_flip(aom_image_t *img);\n\n/*!\\brief Close an image descriptor\n *\n * Frees all allocated storage associated with an image descriptor.\n *\n * \\param[in]    img       Image descriptor\n */\nvoid aom_img_free(aom_image_t *img);\n\n/*!\\brief Get the width of a plane\n *\n * Get the width of a plane of an image\n *\n * \\param[in]    img       Image descriptor\n * \\param[in]    plane     Plane index\n */\nint aom_img_plane_width(const aom_image_t *img, int plane);\n\n/*!\\brief Get the height of a plane\n *\n * Get the height of a plane of an image\n *\n * \\param[in]    img       Image descriptor\n * \\param[in]    plane     Plane index\n */\nint aom_img_plane_height(const aom_image_t *img, int plane);\n\n/*!\\brief Add metadata to image.\n *\n * Adds metadata to aom_image_t.\n * Function makes a copy of the provided data parameter.\n * Metadata insertion point is controlled by insert_flag.\n *\n * \\param[in]    img          Image descriptor\n * \\param[in]    type         Metadata type\n * \\param[in]    data         Metadata contents\n * \\param[in]    sz           Metadata contents size\n * \\param[in]    insert_flag  Metadata insert flag\n *\n * \\return Returns 0 on success. If img or data is NULL, sz is 0, or memory\n * allocation fails, it returns -1.\n */\nint aom_img_add_metadata(aom_image_t *img, uint32_t type, const uint8_t *data,\n                         size_t sz, aom_metadata_insert_flags_t insert_flag);\n\n/*!\\brief Return a metadata payload stored within the image metadata array.\n *\n * Gets the metadata (aom_metadata_t) at the indicated index in the image\n * metadata array.\n *\n * \\param[in] img          Pointer to image descriptor to get metadata from\n * \\param[in] index        Metadata index to get from metadata array\n *\n * \\return Returns a const pointer to the selected metadata, if img and/or index\n * is invalid, it returns NULL.\n */\nconst aom_metadata_t *aom_img_get_metadata(const aom_image_t *img,\n                                           size_t index);\n\n/*!\\brief Return the number of metadata blocks within the image.\n *\n * Gets the number of metadata blocks contained within the provided image\n * metadata array.\n *\n * \\param[in] img          Pointer to image descriptor to get metadata number\n * from.\n *\n * \\return Returns the size of the metadata array. If img or metadata is NULL,\n * it returns 0.\n */\nsize_t aom_img_num_metadata(const aom_image_t *img);\n\n/*!\\brief Remove metadata from image.\n *\n * Removes all metadata in image metadata list and sets metadata list pointer\n * to NULL.\n *\n * \\param[in]    img       Image descriptor\n */\nvoid aom_img_remove_metadata(aom_image_t *img);\n\n/*!\\brief Allocate memory for aom_metadata struct.\n *\n * Allocates storage for the metadata payload, sets its type and copies the\n * payload data into the aom_metadata struct. A metadata payload buffer of size\n * sz is allocated and sz bytes are copied from data into the payload buffer.\n *\n * \\param[in]    type         Metadata type\n * \\param[in]    data         Metadata data pointer\n * \\param[in]    sz           Metadata size\n * \\param[in]    insert_flag  Metadata insert flag\n *\n * \\return Returns the newly allocated aom_metadata struct. If data is NULL,\n * sz is 0, or memory allocation fails, it returns NULL.\n */\naom_metadata_t *aom_img_metadata_alloc(uint32_t type, const uint8_t *data,\n                                       size_t sz,\n                                       aom_metadata_insert_flags_t insert_flag);\n\n/*!\\brief Free metadata struct.\n *\n * Free metadata struct and its buffer.\n *\n * \\param[in]    metadata       Metadata struct pointer\n */\nvoid aom_img_metadata_free(aom_metadata_t *metadata);\n\n#ifdef __cplusplus\n}  // extern \"C\"\n#endif\n\n#endif  // AOM_AOM_AOM_IMAGE_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/obu_util/sources/aom_integer.c",
    "content": "/*\n * Copyright (c) 2018, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n#include <assert.h>\n\n#include \"aom_integer.h\"\n\nstatic const size_t kMaximumLeb128Size = 8;\nstatic const uint8_t kLeb128ByteMask = 0x7f;  // Binary: 01111111\n\n// Disallow values larger than 32-bits to ensure consistent behavior on 32 and\n// 64 bit targets: value is typically used to determine buffer allocation size\n// when decoded.\nstatic const uint64_t kMaximumLeb128Value = UINT32_MAX;\n\nsize_t aom_uleb_size_in_bytes(uint64_t value) {\n  size_t size = 0;\n  do {\n    ++size;\n  } while ((value >>= 7) != 0);\n  return size;\n}\n\nint aom_uleb_decode(const uint8_t *buffer, size_t available, uint64_t *value,\n                    size_t *length) {\n  if (buffer && value) {\n    *value = 0;\n    for (size_t i = 0; i < kMaximumLeb128Size && i < available; ++i) {\n      const uint8_t decoded_byte = *(buffer + i) & kLeb128ByteMask;\n      *value |= ((uint64_t)decoded_byte) << (i * 7);\n      if ((*(buffer + i) >> 7) == 0) {\n        if (length) {\n          *length = i + 1;\n        }\n\n        // Fail on values larger than 32-bits to ensure consistent behavior on\n        // 32 and 64 bit targets: value is typically used to determine buffer\n        // allocation size.\n        if (*value > UINT32_MAX) return -1;\n\n        return 0;\n      }\n    }\n  }\n\n  // If we get here, either the buffer/value pointers were invalid,\n  // or we ran over the available space\n  return -1;\n}\n\nint aom_uleb_encode(uint64_t value, size_t available, uint8_t *coded_value,\n                    size_t *coded_size) {\n  const size_t leb_size = aom_uleb_size_in_bytes(value);\n  if (value > kMaximumLeb128Value || leb_size > kMaximumLeb128Size ||\n      leb_size > available || !coded_value || !coded_size) {\n    return -1;\n  }\n\n  for (size_t i = 0; i < leb_size; ++i) {\n    uint8_t byte = value & 0x7f;\n    value >>= 7;\n\n    if (value != 0) byte |= 0x80;  // Signal that more bytes follow.\n\n    *(coded_value + i) = byte;\n  }\n\n  *coded_size = leb_size;\n  return 0;\n}\n\nint aom_uleb_encode_fixed_size(uint64_t value, size_t available,\n                               size_t pad_to_size, uint8_t *coded_value,\n                               size_t *coded_size) {\n  if (value > kMaximumLeb128Value || !coded_value || !coded_size ||\n      available < pad_to_size || pad_to_size > kMaximumLeb128Size) {\n    return -1;\n  }\n  const uint64_t limit = 1ULL << (7 * pad_to_size);\n  if (value >= limit) {\n    // Can't encode 'value' within 'pad_to_size' bytes\n    return -1;\n  }\n\n  for (size_t i = 0; i < pad_to_size; ++i) {\n    uint8_t byte = value & 0x7f;\n    value >>= 7;\n\n    if (i < pad_to_size - 1) byte |= 0x80;  // Signal that more bytes follow.\n\n    *(coded_value + i) = byte;\n  }\n\n  assert(value == 0);\n\n  *coded_size = pad_to_size;\n  return 0;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/obu_util/sources/aom_integer.h",
    "content": "/*\n * Copyright (c) 2016, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n#ifndef AOM_AOM_AOM_INTEGER_H_\n#define AOM_AOM_AOM_INTEGER_H_\n\n/* get ptrdiff_t, size_t, wchar_t, NULL */\n#include <stddef.h>\n\n#if defined(_MSC_VER)\n#define AOM_FORCE_INLINE __forceinline\n#define AOM_INLINE __inline\n#else\n#define AOM_FORCE_INLINE __inline__ __attribute__((always_inline))\n#define AOM_INLINE inline\n#endif\n\n/* Assume platforms have the C99 standard integer types. */\n\n#if defined(__cplusplus)\n#if !defined(__STDC_FORMAT_MACROS)\n#define __STDC_FORMAT_MACROS\n#endif\n#if !defined(__STDC_LIMIT_MACROS)\n#define __STDC_LIMIT_MACROS\n#endif\n#endif  // __cplusplus\n\n#include <stdint.h>\n#include <inttypes.h>\n\n#if defined(__cplusplus)\nextern \"C\" {\n#endif  // __cplusplus\n\n// Returns size of uint64_t when encoded using LEB128.\nsize_t aom_uleb_size_in_bytes(uint64_t value);\n\n// Returns 0 on success, -1 on decode failure.\n// On success, 'value' stores the decoded LEB128 value and 'length' stores\n// the number of bytes decoded.\nint aom_uleb_decode(const uint8_t *buffer, size_t available, uint64_t *value,\n                    size_t *length);\n\n// Encodes LEB128 integer. Returns 0 when successful, and -1 upon failure.\nint aom_uleb_encode(uint64_t value, size_t available, uint8_t *coded_value,\n                    size_t *coded_size);\n\n// Encodes LEB128 integer to size specified. Returns 0 when successful, and -1\n// upon failure.\n// Note: This will write exactly pad_to_size bytes; if the value cannot be\n// encoded in this many bytes, then this will fail.\nint aom_uleb_encode_fixed_size(uint64_t value, size_t available,\n                               size_t pad_to_size, uint8_t *coded_value,\n                               size_t *coded_size);\n\n#if defined(__cplusplus)\n}  // extern \"C\"\n#endif  // __cplusplus\n\n#endif  // AOM_AOM_AOM_INTEGER_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/obu_util/sources/bitops.h",
    "content": "/*\n * Copyright (c) 2016, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n\n#ifndef AOM_AOM_PORTS_BITOPS_H_\n#define AOM_AOM_PORTS_BITOPS_H_\n\n#include <assert.h>\n\n#include \"msvc.h\"\n#include \"aom_config.h\"\n\n#ifdef _MSC_VER\n#if defined(_M_X64) || defined(_M_IX86)\n#include <intrin.h>\n#define USE_MSC_INTRINSICS\n#endif\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// get_msb:\n// Returns (int)floor(log2(n)). n must be > 0.\n// These versions of get_msb() are only valid when n != 0 because all\n// of the optimized versions are undefined when n == 0:\n// https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html\n\n// use GNU builtins where available.\n#if defined(__GNUC__) && \\\n    ((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)\nstatic INLINE int get_msb(unsigned int n) {\n  assert(n != 0);\n  return 31 ^ __builtin_clz(n);\n}\n#elif defined(USE_MSC_INTRINSICS)\n#pragma intrinsic(_BitScanReverse)\n\nstatic INLINE int get_msb(unsigned int n) {\n  unsigned long first_set_bit;\n  assert(n != 0);\n  _BitScanReverse(&first_set_bit, n);\n  return first_set_bit;\n}\n#undef USE_MSC_INTRINSICS\n#else\nstatic INLINE int get_msb(unsigned int n) {\n  int log = 0;\n  unsigned int value = n;\n  int i;\n\n  assert(n != 0);\n\n  for (i = 4; i >= 0; --i) {\n    const int shift = (1 << i);\n    const unsigned int x = value >> shift;\n    if (x != 0) {\n      value = x;\n      log += shift;\n    }\n  }\n  return log;\n}\n#endif\n\n#ifdef __cplusplus\n}  // extern \"C\"\n#endif\n\n#endif  // AOM_AOM_PORTS_BITOPS_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/obu_util/sources/bitreader_buffer.c",
    "content": "/*\n * Copyright (c) 2016, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n\n#include <assert.h>\n\n#include \"aom_config.h\"\n\n#include \"bitreader_buffer.h\"\n#include \"recenter.h\"\n#include \"bitops.h\"\n\nsize_t aom_rb_bytes_read(const struct aom_read_bit_buffer *rb) {\n  return (rb->bit_offset + 7) >> 3;\n}\n\nint aom_rb_read_bit(struct aom_read_bit_buffer *rb) {\n  const uint32_t off = rb->bit_offset;\n  const uint32_t p = off >> 3;\n  const int q = 7 - (int)(off & 0x7);\n  if (rb->bit_buffer + p < rb->bit_buffer_end) {\n    const int bit = (rb->bit_buffer[p] >> q) & 1;\n    rb->bit_offset = off + 1;\n    return bit;\n  } else {\n    if (rb->error_handler) rb->error_handler(rb->error_handler_data);\n    return 0;\n  }\n}\n\nint aom_rb_read_literal(struct aom_read_bit_buffer *rb, int bits) {\n  assert(bits <= 31);\n  int value = 0, bit;\n  for (bit = bits - 1; bit >= 0; bit--) value |= aom_rb_read_bit(rb) << bit;\n  return value;\n}\n\nuint32_t aom_rb_read_unsigned_literal(struct aom_read_bit_buffer *rb,\n                                      int bits) {\n  assert(bits <= 32);\n  uint32_t value = 0;\n  int bit;\n  for (bit = bits - 1; bit >= 0; bit--)\n    value |= (uint32_t)aom_rb_read_bit(rb) << bit;\n  return value;\n}\n\nint aom_rb_read_inv_signed_literal(struct aom_read_bit_buffer *rb, int bits) {\n  const int nbits = sizeof(unsigned) * 8 - bits - 1;\n  const unsigned value = (unsigned)aom_rb_read_literal(rb, bits + 1) << nbits;\n  return ((int)value) >> nbits;\n}\n\nuint32_t aom_rb_read_uvlc(struct aom_read_bit_buffer *rb) {\n  int leading_zeros = 0;\n  while (leading_zeros < 32 && !aom_rb_read_bit(rb)) ++leading_zeros;\n  // Maximum 32 bits.\n  if (leading_zeros == 32) return UINT32_MAX;\n  const uint32_t base = (1u << leading_zeros) - 1;\n  const uint32_t value = aom_rb_read_literal(rb, leading_zeros);\n  return base + value;\n}\n\nstatic uint16_t aom_rb_read_primitive_quniform(struct aom_read_bit_buffer *rb,\n                                               uint16_t n) {\n  if (n <= 1) return 0;\n  const int l = get_msb(n) + 1;\n  const int m = (1 << l) - n;\n  const int v = aom_rb_read_literal(rb, l - 1);\n  return v < m ? v : (v << 1) - m + aom_rb_read_bit(rb);\n}\n\nstatic uint16_t aom_rb_read_primitive_subexpfin(struct aom_read_bit_buffer *rb,\n                                                uint16_t n, uint16_t k) {\n  int i = 0;\n  int mk = 0;\n\n  while (1) {\n    int b = (i ? k + i - 1 : k);\n    int a = (1 << b);\n\n    if (n <= mk + 3 * a) {\n      return aom_rb_read_primitive_quniform(rb, n - mk) + mk;\n    }\n\n    if (!aom_rb_read_bit(rb)) {\n      return aom_rb_read_literal(rb, b) + mk;\n    }\n\n    i = i + 1;\n    mk += a;\n  }\n\n  assert(0);\n  return 0;\n}\n\nstatic uint16_t aom_rb_read_primitive_refsubexpfin(\n    struct aom_read_bit_buffer *rb, uint16_t n, uint16_t k, uint16_t ref) {\n  return inv_recenter_finite_nonneg(n, ref,\n                                    aom_rb_read_primitive_subexpfin(rb, n, k));\n}\n\nint16_t aom_rb_read_signed_primitive_refsubexpfin(\n    struct aom_read_bit_buffer *rb, uint16_t n, uint16_t k, int16_t ref) {\n  ref += n - 1;\n  const uint16_t scaled_n = (n << 1) - 1;\n  return aom_rb_read_primitive_refsubexpfin(rb, scaled_n, k, ref) - n + 1;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/obu_util/sources/bitreader_buffer.h",
    "content": "/*\n * Copyright (c) 2016, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n\n#ifndef AOM_AOM_DSP_BITREADER_BUFFER_H_\n#define AOM_AOM_DSP_BITREADER_BUFFER_H_\n\n#include <limits.h>\n\n#include \"aom_integer.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef void (*aom_rb_error_handler)(void *data);\n\nstruct aom_read_bit_buffer {\n  const uint8_t *bit_buffer;\n  const uint8_t *bit_buffer_end;\n  uint32_t bit_offset;\n\n  void *error_handler_data;\n  aom_rb_error_handler error_handler;\n};\n\nsize_t aom_rb_bytes_read(const struct aom_read_bit_buffer *rb);\n\nint aom_rb_read_bit(struct aom_read_bit_buffer *rb);\n\nint aom_rb_read_literal(struct aom_read_bit_buffer *rb, int bits);\n\nuint32_t aom_rb_read_unsigned_literal(struct aom_read_bit_buffer *rb, int bits);\n\nint aom_rb_read_inv_signed_literal(struct aom_read_bit_buffer *rb, int bits);\n\nuint32_t aom_rb_read_uvlc(struct aom_read_bit_buffer *rb);\n\nint16_t aom_rb_read_signed_primitive_refsubexpfin(\n    struct aom_read_bit_buffer *rb, uint16_t n, uint16_t k, int16_t ref);\n\n#ifdef __cplusplus\n}  // extern \"C\"\n#endif\n\n#endif  // AOM_AOM_DSP_BITREADER_BUFFER_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/obu_util/sources/msvc.h",
    "content": "/*\n * Copyright (c) 2016, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n\n#ifndef AOM_AOM_PORTS_MSVC_H_\n#define AOM_AOM_PORTS_MSVC_H_\n#ifdef _MSC_VER\n\n#include \"aom_config.h\"\n\n#if _MSC_VER < 1900  // VS2015 provides snprintf\n#define snprintf _snprintf\n#endif  // _MSC_VER < 1900\n\n#if _MSC_VER < 1800  // VS2013 provides round\n#include <math.h>\nstatic INLINE double round(double x) {\n  if (x < 0)\n    return ceil(x - 0.5);\n  else\n    return floor(x + 0.5);\n}\n\nstatic INLINE float roundf(float x) {\n  if (x < 0)\n    return (float)ceil(x - 0.5f);\n  else\n    return (float)floor(x + 0.5f);\n}\n\nstatic INLINE long lroundf(float x) {\n  if (x < 0)\n    return (long)(x - 0.5f);\n  else\n    return (long)(x + 0.5f);\n}\n#endif  // _MSC_VER < 1800\n\n#if HAVE_AVX\n#include <immintrin.h>\n// Note:\n// _mm256_insert_epi16 intrinsics is available from vs2017.\n// We define this macro for vs2015 and earlier. The\n// intrinsics used here are in vs2015 document:\n// https://msdn.microsoft.com/en-us/library/hh977022.aspx\n// Input parameters:\n// a: __m256i,\n// d: int16_t,\n// indx: imm8 (0 - 15)\n#if _MSC_VER <= 1900\n#define _mm256_insert_epi16(a, d, indx)                                      \\\n  _mm256_insertf128_si256(                                                   \\\n      a,                                                                     \\\n      _mm_insert_epi16(_mm256_extractf128_si256(a, indx >> 3), d, indx % 8), \\\n      indx >> 3)\n\nstatic INLINE int _mm256_extract_epi32(__m256i a, const int i) {\n  return a.m256i_i32[i & 7];\n}\nstatic INLINE __m256i _mm256_insert_epi32(__m256i a, int b, const int i) {\n  __m256i c = a;\n  c.m256i_i32[i & 7] = b;\n  return c;\n}\n#endif  // _MSC_VER <= 1900\n#endif  // HAVE_AVX\n#endif  // _MSC_VER\n#endif  // AOM_AOM_PORTS_MSVC_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/obu_util/sources/obu_util.c",
    "content": "/*\n * Copyright (c) 2018, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n#include <assert.h>\n\n#include \"obu_util.h\"\n\n#include \"bitreader_buffer.h\"\n\nstatic aom_codec_err_t read_obu_size(const uint8_t *data,\n                                     size_t bytes_available,\n                                     size_t *const obu_size,\n                                     size_t *const length_field_size) {\n  uint64_t u_obu_size = 0;\n  if (aom_uleb_decode(data, bytes_available, &u_obu_size, length_field_size) !=\n      0) {\n    return AOM_CODEC_CORRUPT_FRAME;\n  }\n\n  if (u_obu_size > UINT32_MAX) return AOM_CODEC_CORRUPT_FRAME;\n  *obu_size = (size_t)u_obu_size;\n  return AOM_CODEC_OK;\n}\n\n// Parses OBU header and stores values in 'header'.\nstatic aom_codec_err_t read_obu_header(struct aom_read_bit_buffer *rb,\n                                       int is_annexb, ObuHeader *header) {\n  if (!rb || !header) return AOM_CODEC_INVALID_PARAM;\n\n  const ptrdiff_t bit_buffer_byte_length = rb->bit_buffer_end - rb->bit_buffer;\n  if (bit_buffer_byte_length < 1) return AOM_CODEC_CORRUPT_FRAME;\n\n  header->size = 1;\n\n  if (aom_rb_read_bit(rb) != 0) {\n    // Forbidden bit. Must not be set.\n    return AOM_CODEC_CORRUPT_FRAME;\n  }\n\n  header->type = (OBU_TYPE)aom_rb_read_literal(rb, 4);\n  header->has_extension = aom_rb_read_bit(rb);\n  header->has_size_field = aom_rb_read_bit(rb);\n\n  if (!header->has_size_field && !is_annexb) {\n    // section 5 obu streams must have obu_size field set.\n    return AOM_CODEC_UNSUP_BITSTREAM;\n  }\n\n  // obu_reserved_1bit must be set to 0. The value is ignored by a decoder.\n  aom_rb_read_bit(rb);\n\n  if (header->has_extension) {\n    if (bit_buffer_byte_length == 1) return AOM_CODEC_CORRUPT_FRAME;\n\n    header->size += 1;\n    header->temporal_layer_id = aom_rb_read_literal(rb, 3);\n    header->spatial_layer_id = aom_rb_read_literal(rb, 2);\n    // extension_header_reserved_3bits must be set to 0. The value is ignored by\n    // a decoder.\n    aom_rb_read_literal(rb, 3);\n  } else {\n    header->temporal_layer_id = 0;\n    header->spatial_layer_id = 0;\n  }\n\n  return AOM_CODEC_OK;\n}\n\naom_codec_err_t aom_read_obu_header(uint8_t *buffer, size_t buffer_length,\n                                    size_t *consumed, ObuHeader *header,\n                                    int is_annexb) {\n  if (buffer_length < 1 || !consumed || !header) return AOM_CODEC_INVALID_PARAM;\n\n  // TODO(tomfinegan): Set the error handler here and throughout this file, and\n  // confirm parsing work done via aom_read_bit_buffer is successful.\n  struct aom_read_bit_buffer rb = { buffer, buffer + buffer_length, 0, NULL,\n                                    NULL };\n  aom_codec_err_t parse_result = read_obu_header(&rb, is_annexb, header);\n  if (parse_result == AOM_CODEC_OK) *consumed = header->size;\n  return parse_result;\n}\n\naom_codec_err_t aom_read_obu_header_and_size(const uint8_t *data,\n                                             size_t bytes_available,\n                                             int is_annexb,\n                                             ObuHeader *obu_header,\n                                             size_t *const payload_size,\n                                             size_t *const bytes_read) {\n  size_t length_field_size_obu = 0;\n  size_t length_field_size_payload = 0;\n  size_t obu_size = 0;\n  aom_codec_err_t status;\n\n  if (is_annexb) {\n    // Size field comes before the OBU header, and includes the OBU header\n    status =\n        read_obu_size(data, bytes_available, &obu_size, &length_field_size_obu);\n\n    if (status != AOM_CODEC_OK) return status;\n  }\n\n  struct aom_read_bit_buffer rb = { data + length_field_size_obu,\n                                    data + bytes_available, 0, NULL, NULL };\n\n  status = read_obu_header(&rb, is_annexb, obu_header);\n  if (status != AOM_CODEC_OK) return status;\n\n  if (!obu_header->has_size_field) {\n    assert(is_annexb);\n    // Derive the payload size from the data we've already read\n    if (obu_size < obu_header->size) return AOM_CODEC_CORRUPT_FRAME;\n\n    *payload_size = obu_size - obu_header->size;\n  } else {\n    // Size field comes after the OBU header, and is just the payload size\n    status = read_obu_size(\n        data + length_field_size_obu + obu_header->size,\n        bytes_available - length_field_size_obu - obu_header->size,\n        payload_size, &length_field_size_payload);\n    if (status != AOM_CODEC_OK) return status;\n  }\n\n  *bytes_read =\n      length_field_size_obu + obu_header->size + length_field_size_payload;\n  return AOM_CODEC_OK;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/obu_util/sources/obu_util.h",
    "content": "/*\n * Copyright (c) 2018, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n#ifndef AOM_AV1_COMMON_OBU_UTIL_H_\n#define AOM_AV1_COMMON_OBU_UTIL_H_\n\n#include \"aom_codec.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct {\n  size_t size;  // Size (1 or 2 bytes) of the OBU header (including the\n                // optional OBU extension header) in the bitstream.\n  OBU_TYPE type;\n  int has_size_field;\n  int has_extension;  // Whether the optional OBU extension header is present.\n  // The following fields come from the OBU extension header. They are set to 0\n  // if has_extension is false.\n  int temporal_layer_id;\n  int spatial_layer_id;\n} ObuHeader;\n\naom_codec_err_t aom_read_obu_header(uint8_t *buffer, size_t buffer_length,\n                                    size_t *consumed, ObuHeader *header,\n                                    int is_annexb);\n\naom_codec_err_t aom_read_obu_header_and_size(const uint8_t *data,\n                                             size_t bytes_available,\n                                             int is_annexb,\n                                             ObuHeader *obu_header,\n                                             size_t *const payload_size,\n                                             size_t *const bytes_read);\n\n#ifdef __cplusplus\n}  // extern \"C\"\n#endif\n\n#endif  // AOM_AV1_COMMON_OBU_UTIL_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/multimedia/obu_util/sources/recenter.h",
    "content": "/*\n * Copyright (c) 2018, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n\n#ifndef AOM_AOM_DSP_RECENTER_H_\n#define AOM_AOM_DSP_RECENTER_H_\n\n#include \"aom_config.h\"\n\n#include \"aom_integer.h\"\n\n// Inverse recenters a non-negative literal v around a reference r\nstatic INLINE uint16_t inv_recenter_nonneg(uint16_t r, uint16_t v) {\n  if (v > (r << 1))\n    return v;\n  else if ((v & 1) == 0)\n    return (v >> 1) + r;\n  else\n    return r - ((v + 1) >> 1);\n}\n\n// Inverse recenters a non-negative literal v in [0, n-1] around a\n// reference r also in [0, n-1]\nstatic INLINE uint16_t inv_recenter_finite_nonneg(uint16_t n, uint16_t r,\n                                                  uint16_t v) {\n  if ((r << 1) <= n) {\n    return inv_recenter_nonneg(r, v);\n  } else {\n    return n - 1 - inv_recenter_nonneg(n - 1 - r, v);\n  }\n}\n\n// Recenters a non-negative literal v around a reference r\nstatic INLINE uint16_t recenter_nonneg(uint16_t r, uint16_t v) {\n  if (v > (r << 1))\n    return v;\n  else if (v >= r)\n    return ((v - r) << 1);\n  else\n    return ((r - v) << 1) - 1;\n}\n\n// Recenters a non-negative literal v in [0, n-1] around a\n// reference r also in [0, n-1]\nstatic INLINE uint16_t recenter_finite_nonneg(uint16_t n, uint16_t r,\n                                              uint16_t v) {\n  if ((r << 1) <= n) {\n    return recenter_nonneg(r, v);\n  } else {\n    return recenter_nonneg(n - 1 - r, n - 1 - v);\n  }\n}\n\n#endif  // AOM_AOM_DSP_RECENTER_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/network/rfkill/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rfkill\"\nPKG_VERSION=\"0.5\"\nPKG_SHA256=\"e0ae3004215e39a6c5c36e0726558740728d16f67ebdb8bea621250f6091d86a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://wireless.wiki.kernel.org/en/users/documentation/rfkill\"\nPKG_URL=\"https://www.kernel.org/pub/software/network/rfkill/$PKG_NAME-$PKG_VERSION.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A small userspace tool to query the state of the rfkill switches, buttons and subsystem interfaces.\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/network/rfkill/patches/rfkill-0001-fix-version-sh.patch",
    "content": "diff -Naur a/version.sh b/version.sh\n--- a/version.sh\n+++ b/version.sh\n@@ -12,19 +12,6 @@\n \n if test \"x$SUFFIX\" != 'x'; then\n \tv=\"$VERSION$SUFFIX\"\n-elif head=`git rev-parse --verify HEAD 2>/dev/null`; then\n-\tgit update-index --refresh --unmerged > /dev/null\n-\tdescr=$(git describe 2>/dev/null || echo \"v$VERSION\")\n-\n-\t# on git builds check that the version number above\n-\t# is correct...\n-\t[ \"${descr%%-*}\" = \"v$VERSION\" ] || exit 2\n-\n-\techo -n 'const char rfkill_version[] = \"' > \"$OUT\"\n-\tv=\"${descr#v}\"\n-\tif git diff-index --name-only HEAD | read dummy ; then\n-\t\tv=\"$v\"-dirty\n-\tfi\n else\n \tv=\"$VERSION\"\n fi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/opengl-meson/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"opengl-meson\"\nPKG_VERSION=\"8bfb8ebe38f615907852ada7ff375a04f53f3e81\"\nPKG_SHA256=\"9468dad254ef7b2486f738f594c5a78fbb1926a6661923ae10054d9960978ec7\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"http://openlinux.amlogic.com:8000/download/ARM/filesystem/\"\nPKG_URL=\"https://github.com/CoreELEC/opengl-meson/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libdrm opentee_linuxdriver\"\nPKG_LONGDESC=\"OpenGL ES pre-compiled libraries for Mali GPUs found in Amlogic Meson SoCs.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib\n    cp -p lib/arm64/gondul/r12p0/fbdev/libMali.so ${INSTALL}/usr/lib/libMali.gondul.g12b.so\n    cp -p lib/arm64/dvalin/r12p0/fbdev/libMali.so ${INSTALL}/usr/lib/libMali.dvalin.g12a.so\n    cp -p lib/arm64/gondul/r37p0/fbdev/libMali_r1p0.so ${INSTALL}/usr/lib/libMali.gondul.so\n    cp -p lib/arm64/dvalin/r37p0/fbdev/libMali.so ${INSTALL}/usr/lib/libMali.dvalin.so\n    cp -p lib/arm64/valhall/r41p0/fbdev/libMali.so ${INSTALL}/usr/lib/libMali.valhall.so\n    \n    mkdir -p ${SYSROOT_PREFIX}/usr/lib\n\tcp -p lib/arm64/gondul/r37p0/fbdev/libMali_r1p0.so ${SYSROOT_PREFIX}/usr/lib/libMali.so\n\n   ln -sf /var/lib/libMali.so ${INSTALL}/usr/lib/libMali.so\n\t\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libmali.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libmali.so.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libEGL.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libEGL.so.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libEGL.so.1.0.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLES_CM.so.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so.1.0.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so.1.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so.2\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so.2.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so.2.0.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so.3\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so.3.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so.3.0.0\n\n# install headers and libraries to TOOLCHAIN\n\tcp -rf ${PKG_BUILD}/include/* ${SYSROOT_PREFIX}/usr/include\n\tcp -rf ${PKG_BUILD}/pkgconfig/* ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n\tcp ${SYSROOT_PREFIX}/usr/include/EGL_platform/platform_fbdev/* ${SYSROOT_PREFIX}/usr/include/EGL\n\trm -rf ${SYSROOT_PREFIX}/usr/include/EGL_platform\n\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libmali.so\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libMali.so.0\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libEGL.so\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libEGL.so.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libEGL.so.1.0.0\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLES_CM.so.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv1_CM.so\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv1_CM.so.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv1_CM.so.1.0.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv1_CM.so.1.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv2.so\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv2.so.2\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv2.so.2.0\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv2.so.2.0.0\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv3.so\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv3.so.3\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv3.so.3.0\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv3.so.3.0.0\n\n  mkdir -p ${INSTALL}/usr/sbin\n    cp ${PKG_DIR}/scripts/libmali-overlay-setup ${INSTALL}/usr/sbin\n  # install needed files for compiling\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/EGL\n    cp -pr include/EGL ${SYSROOT_PREFIX}/usr/include\n    cp -pr include/EGL_platform/platform_fbdev/* ${SYSROOT_PREFIX}/usr/include/EGL\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/GLES2\n    cp -pr include/GLES2 ${SYSROOT_PREFIX}/usr/include\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/GLES3\n    cp -pr include/GLES3 ${SYSROOT_PREFIX}/usr/include\n  mkdir -p ${SYSROOT_PREFIX}/usr/include/KHR\n    cp -pr include/KHR ${SYSROOT_PREFIX}/usr/include\n\n}\n\npost_install() {\n  enable_service unbind-console.service\n  enable_service libmali.service\n}\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/opengl-meson/scripts/libmali-overlay-setup",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\nmkdir -p /var/lib32\nif grep -qE \"sc2|s4\" /proc/device-tree/compatible; then\n    ln -sf /usr/lib/libMali.dvalin.so /var/lib/libMali.so\n    ln -sf /usr/lib32/libMali.dvalin.so /var/lib32/libMali.so\nelif grep -q \"t7\" /proc/device-tree/compatible; then\n    ln -sf /usr/lib/libMali.gondul.so /var/lib/libMali.so\n    ln -sf /usr/lib32/libMali.gondul.so /var/lib32/libMali.so\nelif grep -q \"g12b\" /proc/device-tree/compatible; then\n    ln -sf /usr/lib/libMali.gondul.g12b.so /var/lib/libMali.so\n    ln -sf /usr/lib32/libMali.gondul.g12b.so /var/lib32/libMali.so\nelif grep -q \"g12a\" /proc/device-tree/compatible; then\n    ln -sf /usr/lib/libMali.dvalin.g12a.so /var/lib/libMali.so\n    ln -sf /usr/lib32/libMali.dvalin.g12a.so /var/lib32/libMali.so\nelif grep -q \"s5\" /proc/device-tree/compatible; then\n    ln -sf /usr/lib/libMali.valhall.so /var/lib/libMali.so\n    ln -sf /usr/lib32/libMali.valhall.so /var/lib32/libMali.so\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/opengl-meson/sources/pkgconfig/egl.pc",
    "content": "prefix=/usr\nexec_prefix=/usr\nlibdir=${exec_prefix}/lib\nincludedir=${prefix}/include\n\nName: egl\nDescription: Amlogic implementation of EGL\nVersion: 0.99\nLibs: -L${libdir} -lEGL -lGLESv2\nCflags: -I${includedir}/ \n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/opengl-meson/sources/pkgconfig/glesv1_cm.pc",
    "content": "prefix=/usr\nexec_prefix=${prefix}\nlibdir=/usr/lib\nincludedir=${prefix}/include\n\nName: glesv1_cm\nDescription: libhybris OpenGL ES 1.1 library\nVersion: 0.1.0\nLibs: -L${libdir} -lGLESv1_CM\nCflags: -I${includedir}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/opengl-meson/sources/pkgconfig/glesv2.pc",
    "content": "prefix=/usr\nexec_prefix=/usr\nlibdir=${exec_prefix}/lib\nincludedir=${prefix}/include\n\nName: glesv2\nDescription: Amlogic implementation of OpenGL ESv2\nVersion: 0.99\nLibs: -L${libdir} -lGLESv2\nCflags: -I${includedir}/\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/opengl-meson/sources/pkgconfig/glesv3.pc",
    "content": "prefix=/usr\nexec_prefix=${prefix}\nlibdir=/usr/lib\nincludedir=${prefix}/include\n\nName: glesv3\nDescription: libhybris OpenGL ES 3.0 library\nVersion: 0.1.0\nLibs: -L${libdir} -lGLESv3\nCflags: -I${includedir}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/opengl-meson/system.d/libmali.service",
    "content": "[Unit]\nDescription=Create libMali overlay for specific AML device\nAfter=var.mount\nBefore=emuelec-autostart.service\n\n[Service]\nType=oneshot\nExecStart=/usr/sbin/libmali-overlay-setup\n\n[Install]\nWantedBy=local-fs.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/opengl-meson/system.d/unbind-console.service",
    "content": "[Unit]\nDescription=Unbind framebuffer console\nConditionPathExists=/sys/class/vtconsole/vtcon1/bind\n\n[Service]\nType=oneshot\nExecStart=/bin/sh -c 'echo 0 > /sys/class/vtconsole/vtcon1/bind'\n\n[Install]\nWantedBy=graphical.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/parse-android-dynparts/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"parse-android-dynparts\"\nPKG_VERSION=\"c8837c1cd0c4fbc29641980b71079fc4f3cabcc0\"\nPKG_SHA256=\"5a9df34c2078ff947a478723e8b06dc427bc71c238125657a913536acb29146a\"\nPKG_LICENSE=\"Apache-2.0 license\"\nPKG_SITE=\"https://github.com/tchebb/parse-android-dynparts\"\nPKG_URL=\"https://github.com/tchebb/parse-android-dynparts/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain openssl\"\nPKG_LONGDESC=\"Tool mounts super.img files with a standard Linux userspace tools.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DCMAKE_CXX_FLAGS=-D_FILE_OFFSET_BITS=64\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/sbin\n  cp ${PKG_BUILD}/.${TARGET_NAME}/parse-android-dynparts ${INSTALL}/usr/sbin\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/parse-android-dynparts/patches/remove-warning-skip-zero-length-partition.patch",
    "content": "--- a/main.cpp\t2021-04-14 23:31:17.000000000 +0200\n+++ b/main.cpp\t2022-10-20 15:57:48.632068796 +0200\n@@ -30,8 +30,6 @@ int main(int argc, char* argv[]) {\n   // Code structure taken from Android's system/core/fs_mgr/fs_mgr_dm_linear.cpp\n   for (auto partition : metadata->partitions) {\n     if (!partition.num_extents) {\n-      cerr << \"Skipping zero-length logical partition: \"\n-           << GetPartitionName(partition) << endl;\n       continue;\n     }\n     if (partition.attributes & LP_PARTITION_ATTR_DISABLED) {\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/sysutils/amremote/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"amremote\"\nPKG_VERSION=\"455eb8ef8507acf899d4723c022de1c981bb697e\"\nPKG_SHA256=\"985bd796995cd756b0edcc34a88e31392a21c04b6c9a4a46e20f4bca19ab1511\"\nPKG_LICENSE=\"other\"\nPKG_SITE=\"http://www.amlogic.com\"\nPKG_URL=\"https://github.com/CoreELEC/amremote/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain usbutils\"\nPKG_LONGDESC=\"amremote - IR remote configuration utility for Amlogic-based devices\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp remotecfg ${INSTALL}/usr/bin\n\n  mkdir -p ${INSTALL}/usr/lib/coreelec\n    cp ${PKG_DIR}/scripts/* ${INSTALL}/usr/lib/coreelec\n}\n\npost_install() {\n  enable_service remote-config.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/sysutils/amremote/scripts/remote-config",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nremap_keys () {\n  [ ! -f \"$1\" ] && return\n\n  sed -i 's/ 15[^0-9]*$/ 1/\n          s/ 63[^0-9]*$/ 90/\n          s/ 97[^0-9]*$/ 28/\n          s/ 102[^0-9]*$/ 172/\n          s/ 125[^0-9]*$/ 46/\n          s/ 128[^0-9]*$/ 45/\n          s/ 139[^0-9]*$/ 46/\n          s/ 142[^0-9]*$/ 116/\n          s/ 143[^0-9]*$/ 116/\n          s/ 158[^0-9]*$/ 1/\n          s/ 183[^0-9]*$/ 59/\n          s/ 184[^0-9]*$/ 399/\n          s/ 185[^0-9]*$/ 400/\n          s/ 186[^0-9]*$/ 60/\n          s/ 232[^0-9]*$/ 28/\n          s/ 240[^0-9]*$/ 164/\n          s/ 241[^0-9]*$/ 163/\n          s/ 242[^0-9]*$/ 165/\n          s/ 244[^0-9]*$/ 208/\n          s/ 245[^0-9]*$/ 168/\n          s/ 264[^0-9]*$/ 63/\n          s/ 704[^0-9]*$/ 116/' \\\n    \"$1\"\n}\n\n[ ! -e \"/proc/device-tree/meson-ir/compatible\" -o ! -e \"/proc/device-tree/meson-remote/compatible\" ] && exit\n\nif [ -f \"/flash/remote.disable\" -o -f \"/storage/.config/remote.disable\" ]; then\n  echo \"remote control disabled by user\"\n  exit 0\nfi\n\nif [ -f \"/flash/remote.force_meson_ir\" -o -f \"/storage/.config/remote.force_meson_ir\" ]; then\n  force_meson_ir=\"yes\"\nelse\n  force_meson_ir=\"no\"\nfi\n\nif [ -f \"/flash/remote.conf\" ]; then\n  REMOTE_CONF_DIR=\"/flash\"\nelif [ -f \"/storage/.config/remote.conf\" ]; then\n  REMOTE_CONF_DIR=\"/storage/.config\"\nelse\n  REMOTE_CONF_DIR=\"\"\n\n  if [ -d \"/proc/device-tree/custom_maps\" -a \"$force_meson_ir\" = \"no\" ]; then\n    MAP_NAME=$(tr -d '\\0' 2>/dev/null < /proc/device-tree/custom_maps/map_0/mapname)\n    echo \"using meson-remote, with pre-defined map '$MAP_NAME' from dtb\"\n    modprobe meson-remote\n    touch /run/use-meson-remote\n    exit 0\n  fi\nfi\n\nif [ -d \"$REMOTE_CONF_DIR\" ]; then\n  echo \"using meson-remote, conf from $REMOTE_CONF_DIR\"\n\n  if [ -d \"/proc/device-tree/custom_maps\" ]; then\n    MAP_NAME=$(tr -d '\\0' 2>/dev/null < /proc/device-tree/custom_maps/map_0/mapname)\n    echo \"also using pre-defined map '$MAP_NAME' from dtb\"\n  fi\n\n  modprobe meson-remote\n  touch /run/use-meson-remote\n\n  for f in $REMOTE_CONF_DIR/remote*.conf; do\n    echo \"configuring remote with $f\"\n    cp \"$f\" /tmp/remote.conf\n    remap_keys /tmp/remote.conf\n    remotecfg /tmp/remote.conf\n    rm -f /tmp/remote.conf\n  done\nelse\n  echo \"using meson-ir\"\n  modprobe meson-ir\n  touch /run/use-meson-ir\nfi\n\nexit 0\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/sysutils/amremote/system.d/remote-config.service",
    "content": "[Unit]\nDescription=IR remote control support\nBefore=graphical.target kodi.service\nAfter=multi-user.target\nConditionPathExists=/proc/device-tree/meson-ir/compatible\nConditionPathExists=/proc/device-tree/meson-remote/compatible\n\n[Service]\nType=oneshot\nExecStart=/usr/lib/coreelec/remote-config\n\n[Install]\nWantedBy=graphical.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/sysutils/dtb-xml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"dtb-xml\"\nPKG_VERSION=\"1.0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Tool to handle custom dtb.img tweaks\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/coreelec\n  mkdir -p ${INSTALL}/usr/share/bootloader\n    install -m 0755 ${PKG_DIR}/scripts/dtb-xml.sh ${INSTALL}/usr/lib/coreelec/dtb-xml\n    install -m 0644 ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/bootloader/dtb.xml ${INSTALL}/usr/share/bootloader/dtb.xml\n}\n\npost_install() {\n  enable_service dtb-xml.service\n}\n\n# ---------------------------------------\n# No /flash/dtb.xml exist:\n# On first access of a variable by 'get_dtbxml_value' or 'get_dtbxml_multivalues'\n# by CE settings current defined default values are read by dtb-xml.sh and\n# migrated to /flash/dtb.xml.\n#\n# If a matching command value is found the option is set in dtb.xml. If no\n# matching value or the path is not found in dtb.img it get set to 'migrated'.\n# On next access of a option set to 'migrated' the dtb-xml.sh script try again\n# to read current value from dtb.img as it maybe turn to applicable after a\n# update of dtb.img by system update.\n#\n# /flash/dtb.xml get only be edited by dtb-xml.sh script and remain untouched\n# on update of the system. When a update is done user defined values are\n# applied to /flash/dtb.img by dtb.xml directly so no extra reboot is required.\n#\n# Any option node in /flash/dtb.xml can be forced updated by a tar update by\n# changing 'version' of a option node. So Team CoreELEC is still able to\n# maintain user /flash/dtb.xml.\n#\n# On bricked devices: remove /flash/dtb.xml and copy default dtb.img on /flash\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/sysutils/dtb-xml/scripts/dtb-xml.sh",
    "content": "#!/bin/sh\n#\n# SPDX-License-Identifier: GPL-3.0-or-later\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n#\n#  Update dtb.img by dtb.xml\n#\n#####################################################\n#\n# Command Line Arguments\n# -v = Show verbose output\n# -m = migrate dtb.img settings to dtb.xml\n#\n#####################################################\n\nverbose=0\nchanged=0\nmigrate=0\nedid=0\nBOOT_ROOT='/flash'\namlogic_dt_id=''\n\nwhile [ $# -ne 0 ]; do\n  arg=\"$1\"\n  case \"$arg\" in\n      -v)\n        verbose=1\n        ;;\n      -m)\n        migrate=1\n        ;;\n      -e)\n        edid=1\n        ;;\n      *)\n        echo \"Unknown option: '$arg'\"\n        exit\n        ;;\n  esac\n  [ $# -gt 0 ] && shift\ndone\n\nxml_file=\"$BOOT_ROOT/dtb.xml\"\ndefault_xml_file=\"/usr/share/bootloader/dtb.xml\"\ndtb_file=\"$BOOT_ROOT/dtb.img\"\n[ -f /proc/device-tree/amlogic-dt-id ] && amlogic_dt_id=$(tr -d '\\0' < /proc/device-tree/amlogic-dt-id)\nDT_ID=$(dtname)\nedid_bin_file=\"/storage/.config/edid.bin\"\n\n#########################################################\n# edid_to_xml\n#########################################################\n# Return 1 if dtb.img needs to be updated\nfunction edid_to_xml() {\n  ret=0\n\n  if [ ! -f ${xml_file} ]; then\n    log \"File '${xml_file}' doesn't exist\"\n    return ${ret}\n  fi\n\n  # check the presence of the node\n  node_name=$(xmlstarlet sel -t -m '/dtb-settings/custom_edid/edid/cmd/value' -v \"name()\" ${xml_file})\n  if [ -z \"${node_name}\" ]; then\n    log \"Node 'custom_edid' doesn't exist\"\n    return ${ret}\n  fi\n\n  # read value from xml, this returns error code on empty node\n  xml_file_hex=$(xmlstarlet sel -t -v '/dtb-settings/custom_edid/edid/cmd/value' ${xml_file})\n\n  if [ -f ${edid_bin_file} ]; then\n    # read binary file edid.bin to hex string\n    edid_bin_hex=$(xxd -c 8192 -p ${edid_bin_file} | tr -d '\\n')\n    edid_bin_hex_hdr=$(echo ${edid_bin_hex} | head -c 16)\n\n    if [ \"${edid_bin_hex_hdr}\" != \"00ffffffffffff00\" ]; then\n      log \"Found text 'edid.bin' file\"\n      edid_bin_hex=$(cat ${edid_bin_file} | tr -d '\\r\\n')\n    else\n      log \"Found binary 'edid.bin' file\"\n    fi\n  else\n    log \"No 'edid.bin' file found\"\n    edid_bin_hex=\"\"\n  fi\n\n  # compare value from file and xml\n  if [ \"${edid_bin_hex}\" != \"${xml_file_hex}\" ]; then\n    log \"Update 'custom_edid' with '${edid_bin_hex}'\"\n    xmlstarlet ed -L -u '/dtb-settings/custom_edid/edid/cmd/value' -v \"${edid_bin_hex}\" ${xml_file}\n    ret=1\n  fi\n\n  log \"Done\"\n  return ${ret}\n}\n#########################################################\n# check_linux_version\n#########################################################\n# Return 1 if given kernel version is lower than current kernel version\nfunction check_linux_version() {\n    version_higher=$(uname -r | awk -F '.' \\\n      -v ker_ver=$1 -v maj_ver=$2 -v min_ver=$3 '{\n        if ($1 > ker_ver) { print \"Y\"; }\n        else if ($1 < ker_ver) { print \"N\"; }\n        else {\n          if ($2 > maj_ver) { print \"Y\"; }\n          else if ($2 < maj_ver) { print \"N\"; }\n          else {\n            if ($3 >= min_ver) { print \"Y\"; }\n            else { print \"N\"; }\n          }\n        }\n      }')\n\n    if [ \"$version_higher\" = \"Y\" ]; then\n      return 0\n    else\n      return 1\n    fi\n}\n\n#########################################################\n# log\n#########################################################\nfunction log() {\n  [ \"$verbose\" == 1 ] && echo \"$@\"\n}\n\n#########################################################\n# update_migrated_xml\n#########################################################\n# Update a specified option node if value in dtb.img\n# become applicable by parameter: $update_node\nfunction update_migrated_xml() {\n  update_node=\"$1\"\n  log \" try to update migrated node '$update_node' by dtb.img\"\n  option_nodes=$(xmlstarlet sel -t -m \"//$update_node/*\" -v \"name()\" -n $xml_file)\n\n  # check all options for specified migrated option node\n  for option in $option_nodes; do\n    cmd_count=$(xmlstarlet sel -t -c \"count(//$update_node/$option/cmd)\" $xml_file)\n\n    if [ \"$cmd_count\" == 0 ]; then\n      continue\n    fi\n\n    # check all commands for this current node of BOOT_ROOT dtb.xml if all commands are equal to dtb.img\n    for cnt in $(seq 1 $cmd_count); do\n      cmd_path=$(xmlstarlet sel -t -v \"//$update_node/$option/cmd[$cnt]/@path\" $xml_file)\n      fdt_option=$(xmlstarlet sel -t -v \"//$update_node/$option/cmd[$cnt]/@option\" $xml_file)\n      fdt_option=${fdt_option:-\"t\"}\n      cmd_type=$(xmlstarlet sel -t -m \"//$update_node/$option/cmd[$cnt]\" -v \"concat('-$fdt_option ', @type)\" $xml_file)\n      case \"$fdt_option\" in\n          t)\n            act_value=$(fdtget $amlogic_dt_id $cmd_type $dtb_file $cmd_path 2>/dev/null)\n            if [ \"$?\" == 0 ]; then\n              cmd_value=$(xmlstarlet sel -t -m \"//$update_node/$option\" -m \"cmd[$cnt]/value\" -v \"concat(.,' ')\" $xml_file)\n              [ -n \"$cmd_value\" ] && cmd_value=${cmd_value::-1}\n              [ -n \"$cmd_value\" ] && cmd_value=${cmd_value#\"0x\"}\n              if [ \"$act_value\" != \"$cmd_value\" ]; then\n                continue 2\n              fi\n            else\n              continue 2\n            fi\n            ;;\n          d|r)\n            [ -n \"$(fdtget $amlogic_dt_id $dtb_file $cmd_path 2>/dev/null)\" ] && continue 2\n            ;;\n      esac\n    done\n    # option status changed to applicable, update BOOT_ROOT dtb.xml by current status\n    name_option=$(xmlstarlet sel -t -v \"//$update_node/$option/@name\" -n $xml_file)\n    xmlstarlet ed -L -u \"//$update_node/@status\" -v \"$name_option\" $xml_file\n    xmlstarlet ed -L -d \"//$update_node/${update_node}_migrated\" $xml_file\n    changed=1\n    log \" option status changed from '$node_status' to '$name_option'\"\n    node_status=\"$name_option\"\n    break\n  done\n  # option is still not applicable\n  if [ \"$changed\" == 0 ]; then\n    log \" option status stay unchanged at '$node_status'\"\n  fi\n  log \"\"\n}\n\n#########################################################\n# migrate_dtb_to_xml\n#########################################################\n# Migrate BOOT_ROOT dtb.xml from dtb.img\n#\n# * If no BOOT_ROOT dtb.xml does exist the current values\n#   from dtb.img are migrated by reading each single\n#   option status value from current dtb.img\n# * If no matching option is found in BOOT_ROOT dtb.xml\n#   set the option status to 'migrated'\nfunction migrate_dtb_to_xml() {\n  log \"\"\n  log \"Migrate dtb.xml from dtb.img\"\n  log \"\"\n\n  # loop through all BOOT_ROOT dtb.xml options\n  root_nodes=$(xmlstarlet sel -t -m '/*/*' -v \"name()\" -n $xml_file)\n  for node in $root_nodes; do\n    node_status=$(xmlstarlet sel -t -v \"//$node/@status\" $xml_file)\n    log \"------------------------------------------\"\n    log \" node:  $node, status: '$node_status'\"\n    option_nodes=$(xmlstarlet sel -t -m \"//$node/*\" -v \"name()\" -n $xml_file)\n    name_option_available=0\n\n    # check if the node apply at all by dt_id\n    # if not skip any further check and set to 'migrated'\n    node_dt_id=$(xmlstarlet sel -t -v \"//$node/@dt_id\" $xml_file)\n    if [ -n \"$node_dt_id\" ]; then\n      log \" dt_id: $node_dt_id,  coreelec-dt-id: $DT_ID\"\n\n      dt_id_match=0\n      for dt_id in $node_dt_id; do\n        eval \"\n          case \\$DT_ID in\n            *\"$dt_id\"*)\n              dt_id_match=1\n              ;;\n          esac\n        \"\n      done\n\n      if [ \"$dt_id_match\" == 0 -o -z \"$DT_ID\" ]; then\n        option_nodes=\"\"\n      fi\n    fi\n\n    for option in $option_nodes; do\n      cmd_count=$(xmlstarlet sel -t -c \"count(//$node/$option/cmd)\" $xml_file)\n      cmd_remove_exist=$(xmlstarlet sel -t -m \"//$node/$option/cmd\" -i '@option=\"d\"' -o \"1\" -b -i '@option=\"r\"' -o \"1\" $xml_file)\n      # check all commands for this current node of BOOT_ROOT dtb.xml if all commands are equal to dtb.img\n      for cnt in $(seq 1 $cmd_count); do\n        cmd_path=$(xmlstarlet sel -t -v \"//$node/$option/cmd[$cnt]/@path\" $xml_file)\n        fdt_option=$(xmlstarlet sel -t -v \"//$update_node/$option/cmd[$cnt]/@option\" $xml_file)\n        fdt_option=${fdt_option:-\"t\"}\n        cmd_type=$(xmlstarlet sel -t -m \"//$node/$option/cmd[$cnt]\" -v \"concat('-$fdt_option ', @type)\" $xml_file)\n        case \"$fdt_option\" in\n            t)\n              act_value=$(fdtget $amlogic_dt_id $cmd_type $dtb_file $cmd_path 2>/dev/null)\n              if [ \"$?\" == 0 ]; then\n                cmd_value=$(xmlstarlet sel -t -m \"//$node/$option\" -m \"cmd[$cnt]/value\" -v \"concat(.,' ')\" $xml_file)\n                [ -n \"$cmd_value\" ] && cmd_value=${cmd_value::-1}\n                [ -n \"$cmd_value\" ] && cmd_value=${cmd_value#\"0x\"}\n                if [ \"$act_value\" != \"$cmd_value\" ]; then\n                  continue 2\n                fi\n              else\n                continue 2\n              fi\n              ;;\n            d|r)\n              [ -z \"$(fdtget $amlogic_dt_id $dtb_file $cmd_path 2>/dev/null)\" -a -n \"$cmd_remove_exist\" ] || continue 2\n              ;;\n      esac\n      done\n      name_option_available=1\n      name_option=$(xmlstarlet sel -t -v \"//$node/$option/@name\" -n $xml_file)\n      # if option is available set current status in BOOT_ROOT dtb.xml\n      if [ \"$node_status\" != \"$name_option\" ]; then\n        # special handling to migrate heartbeat setting from config.ini on Odroid devices\n        case $node in\n          sys_led)\n            case $DT_ID in\n              *odroid*)\n                log \" detected Odroid device, migrate heartbeat led setting from config.ini\"\n                heartbeat=\"$( cat /flash/config.ini | awk -F \"=\" '/^heartbeat=/{gsub(/\"|\\047/,\"\",$2); print $2}')\"\n                if [ \"$heartbeat\" == \"0\" ]; then\n                  name_option=\"off\"\n                  fdtput $amlogic_dt_id -t s $dtb_file /gpioleds/sys_led linux,default-trigger none\n                  echo none > /sys/class/leds/sys_led/trigger\n                fi\n                ;;\n            esac\n            ;;\n          wol)\n            if check_linux_version 5 15 137; then\n              wol=\"$( cat /flash/config.ini | awk -F \"=\" '/^wol=/{gsub(/\"|\\047/,\"\",$2); print $2}')\"\n              log \" migrate WOL setting ($wol) from config.ini\"\n              if [ \"$wol\" == \"1\" ]; then\n                name_option=\"on\"\n                fdtput $amlogic_dt_id -t i $dtb_file /soc/ethernet@fdc00000 wol 1\n              fi\n            fi\n            ;;\n        esac\n\n        log \" migrate dtb.xml node '$node' to '$name_option'\"\n        xmlstarlet ed -L -u \"//$node/@status\" -v \"$name_option\" $xml_file\n        continue 2\n      else\n        log \" option status already set, do not migrate option\"\n      fi\n    done\n    # if the option is not available in dtb.img set option status to 'migrated' with current dtb.img value\n    if [ \"$name_option_available\" == 0 ]; then\n      xmlstarlet ed -L -s \"//$node\" -t elem -n \"${node}_migrated\" $xml_file\n      xmlstarlet ed -L -u \"//$node/@status\" -v \"migrated\" $xml_file\n      xmlstarlet ed -L -i \"//${node}_migrated\" -t attr -n \"name\" -v \"migrated\" $xml_file\n      log \" option not applicable by default dtb.xml, migrate to '${node}_migrated'\"\n    fi\n  done\n  log \"------------------------------------------\"\n  log \"\"\n}\n\n#########################################################\n# update_dtb_by_dtb_xml\n#########################################################\n# Update dtb.img by BOOT_ROOT dtb.xml\n#\n# * Check if the option in BOOT_ROOT dtb.xml does include\n#   commands at all\n# * Check if the option in BOOT_ROOT dtb.xml commands are\n#   different and update dtb.img if needed\n# * If dtb.img path is not found set the option to\n#   'migrated' as not applicable\n# * If option is set to 'migrated' check if it became\n#   applicable after dtb.img update\nfunction update_dtb_by_dtb_xml() {\n  root_nodes=$(xmlstarlet sel -t -m '/*/*' -v \"name()\" -n $xml_file)\n\n  log \"\"\n  for node in $root_nodes; do\n    log \"------------------------------------------\"\n    log \" node:   $node\"\n\n    node_status=$(xmlstarlet sel -t -v \"//$node/@status\" $xml_file)\n    log \" status: $node_status\"\n\n    node_dt_id=$(xmlstarlet sel -t -v \"//$node/@dt_id\" $xml_file)\n\n    # check if dt_id is set for this node\n    # if yes compare if the setting does apply for this $dtb_file\n    # if not skip node and set to 'migrated' to hide the option in CoreELEC settings\n    if [ -n \"$node_dt_id\" ]; then\n      log \" dt_id: $node_dt_id\"\n      log \" coreelec-dt-id: $DT_ID\"\n\n      dt_id_match=0\n      for dt_id in $node_dt_id; do\n        eval \"\n          case \\$DT_ID in\n            *\"$dt_id\"*)\n              dt_id_match=1\n              ;;\n          esac\n        \"\n      done\n\n      if [ \"$dt_id_match\" == 0 -o -z \"$DT_ID\" ]; then\n        log \"\"\n        log \" not applicable as dt_id does not match\"\n        log \"\"\n        xmlstarlet ed -L -u \"//$node/@status\" -v \"migrated\" $xml_file\n        continue\n      fi\n    fi\n    log \"\"\n\n    # check if node is 'migrated' and update if possible\n    if [ \"$node_status\" == \"migrated\" ]; then\n      update_migrated_xml $node\n    fi\n\n    # check if node does include commands to be executed\n    cmd_count=$(xmlstarlet sel -t -c \"count(//$node/node()[@name='$node_status']/cmd)\" $xml_file)\n    cmd_remove_exist=$(xmlstarlet sel -t -m \"//$node/*/cmd\" -i '@option=\"d\"' -o \"1\" -b -i '@option=\"r\"' -o \"1\" $xml_file)\n\n    if [ \"$cmd_count\" == 0 ]; then\n      log \" no cmd for node status '$node_status' found\"\n      continue\n    fi\n\n    # check all commands for this current node of BOOT_ROOT dtb.xml if all commands are equal to dtb.img\n    for cnt in $(seq 1 $cmd_count); do\n      cmd_path=$(xmlstarlet sel -t -v \"//$node/node()[@name='$node_status']/cmd[$cnt]/@path\" $xml_file)\n      fdt_option=$(xmlstarlet sel -t -v \"//$node/node()[@name='$node_status']/cmd[$cnt]/@option\" $xml_file)\n      fdt_option=${fdt_option:-\"t\"}\n      cmd_type=$(xmlstarlet sel -t -m \"//$node/node()[@name='$node_status']/cmd[$cnt]\" -v \"concat('-${fdt_option} ', @type)\" $xml_file)\n\n      # check if node commands does exist in dtb.img at all\n      case \"$fdt_option\" in\n          t)\n            act_value=$(fdtget $amlogic_dt_id $cmd_type $dtb_file $cmd_path 2>/dev/null)\n            if [ \"$?\" == \"0\" -o -z \"$act_value\" -a -n \"$cmd_remove_exist\" ]; then\n              cmd_value=$(xmlstarlet sel -t -m \"//$node/node()[@name='$node_status']\" -m \"cmd[$cnt]/value\" -v \"concat('\\\"', .,'\\\" ')\" $xml_file)\n              [ -n \"$cmd_value\" ] && cmd_value=${cmd_value::-1}\n              cmd=\"fdtput $amlogic_dt_id $cmd_type $dtb_file $cmd_path $cmd_value\"\n              cmd_value=\"${cmd_value//\\\"}\"\n              [ -n \"$cmd_value\" ] && cmd_value=${cmd_value#\"0x\"}\n              # check if dtb.img value does match with current BOOT_ROOT dtb.xml status\n              if [ \"$act_value\" != \"$cmd_value\" ]; then\n                eval $cmd\n                log \" cmd[$cnt]: changed, $cmd_path: '$act_value' -> '$cmd_value', result: $?\"\n                changed=1\n              else\n                log \" cmd[$cnt]: unchanged, $cmd_path: '$cmd_value' == '$act_value'\"\n              fi\n            else\n              log \" not applicable\"\n              xmlstarlet ed -L -u \"//$node/@status\" -v \"migrated\" $xml_file\n              continue 2\n            fi\n            ;;\n          d|r)\n            if [ -z \"$(fdtget $amlogic_dt_id $dtb_file $cmd_path 2>/dev/null)\" ]; then\n              log \" cmd[$cnt]: unchanged, still not exist\"\n            else\n              cmd=\"fdtput $amlogic_dt_id $cmd_type $dtb_file $cmd_path\"\n              eval $cmd\n              log \" cmd[$cnt]: changed, $cmd_path: run option '$fdt_option', result: $?\"\n              changed=1\n            fi\n            ;;\n      esac\n    done\n  done\n  log \"------------------------------------------\"\n  log \"\"\n}\n\n#########################################################\n# update_dtb_xml\n#########################################################\n# Update BOOT_ROOT dtb.xml by default dtb.xml\n#\n# * Update whole BOOT_ROOT dtb.xml by default dtb.xml\n#   if dtb-settings version is higher\n# * Check if a new node got introduced by default dtb.xml\n# * Check if default dtb.xml version is higher than\n#   BOOT_ROOT dtb.xml version and update if needed\nfunction update_dtb_xml() {\n  root_node_version=$(xmlstarlet sel -t -v \"//dtb-settings/@version\" $xml_file)\n  default_root_node_version=$(xmlstarlet sel -t -v \"//dtb-settings/@version\" $default_xml_file)\n\n  log \"\"\n  log \"------------------------------------------\"\n  log \" dtb-settings version:           $root_node_version\"\n  log \" dtb-settings default version:   $default_root_node_version\"\n\n  # default dtb.xml version changed, overwrite BOOT_ROOT dtb.xml\n  if [ $root_node_version -lt $default_root_node_version ]; then\n    log \" update complete dtb.xml by default dtb.xml\"\n    cp -p $default_xml_file $xml_file\n  fi\n\n  root_nodes=$(xmlstarlet sel -t -m '/*/*' -v \"name()\" -n $xml_file)\n  default_root_nodes=$(xmlstarlet sel -t -m '/*/*' -v \"name()\" -n $default_xml_file)\n\n  # compare all default dtb.xml nodes with BOOT_ROOT dtb.xml\n  for default_node in $default_root_nodes; do\n    log \"------------------------------------------\"\n    log \" default node:   $default_node\"\n\n    default_node_status=$(xmlstarlet sel -t -v \"//$default_node/@status\" $default_xml_file)\n    default_node_version=$(xmlstarlet sel -t -v \"//$default_node/@version\" $default_xml_file)\n    log \" default status: $default_node_status, version: $default_node_version\"\n    node_status=$(xmlstarlet sel -t -v \"//$default_node/@status\" $xml_file)\n    # new node in default dtb.xml found, copy whole node\n    if [ -z \"$node_status\" ]; then\n      log \" node in current dtb.xml not found, get it from default dtb.xml\"\n      new_node=$(xmlstarlet sel -t -c \"//$default_node\" $default_xml_file)\n      xmlstarlet ed --subnode \"/dtb-settings\" -t text -n \"\" -v \"$new_node\" $xml_file | \\\n              xmlstarlet unesc | xmlstarlet format > tmp_file\n      mv tmp_file $xml_file\n    # node already exist in BOOT_ROOT dtb.xml, check if version update\n    else\n      node_version=$(xmlstarlet sel -t -v \"//$default_node/@version\" $xml_file)\n      log \" status: $node_status, version: $node_version\"\n      # newer version update node\n      if [ $node_version -lt $default_node_version ]; then\n        log \" update node to version $default_node_version\"\n        xmlstarlet ed -L -d \"//$default_node\" $xml_file\n        new_node=$(xmlstarlet sel -t -c \"//$default_node\" $default_xml_file)\n        xmlstarlet ed --subnode \"/dtb-settings\" -t text -n \"\" -v \"$new_node\" $xml_file | \\\n                xmlstarlet unesc | xmlstarlet format > tmp_file\n        mv tmp_file $xml_file\n        option_nodes=$(xmlstarlet sel -t -m \"//$default_node/*\" -v \"name()\" -n $xml_file)\n        # check if old status still apply and set it if true\n        for option in $option_nodes; do\n          option_node_name=$(xmlstarlet sel -t -v \"//$default_node/$option/@name\" $xml_file)\n          if [ \"$node_status\" == \"$option_node_name\" ]; then\n            xmlstarlet ed -L -u \"//$default_node/@status\" -v \"$node_status\" $xml_file\n            log \" updated node status to: $node_status\"\n            continue 2\n          fi\n        done\n      fi\n    fi\n  done\n\n  # compare all user dtb.xml nodes with default dtb.xml\n  for node in $root_nodes; do\n    log \"------------------------------------------\"\n    log \" node:   $node\"\n    node_status=$(xmlstarlet sel -t -v \"//$node/@status\" $default_xml_file)\n    if [ -z \"$node_status\" ]; then\n      xmlstarlet ed -L -d \"//$node\" $xml_file\n      log \" node got removed by default dtb.xml\"\n    else\n      log \" node still in use by default dtb.xml\"\n    fi\n  done\n\n  log \"------------------------------------------\"\n  log \"\"\n}\n\n#########################################################\n# main script\n#########################################################\n\nif [ ! -f $dtb_file ]; then\n  log \"Error, not found: $dtb_file, exit now\"\n  exit 2\nfi\n\n# check if BOOT_ROOT is mounted as 'ro'\ngrep -q \" $BOOT_ROOT vfat ro,\" /proc/mounts\nrw=\"$?\"\n\n# remount as 'rw' if needed\nif [ \"$rw\" == \"0\" ]; then\n  log \"Try to remount '$BOOT_ROOT' in 'rw' mode\"\n  mount -o rw,remount \"$BOOT_ROOT\"\n  if [ \"$?\" != \"0\" ]; then\n    echo \"Failed to remount '$BOOT_ROOT' in 'rw' mode\"\n    exit 12\n  fi\nfi\n\n# copy default dtb.xml to BOOT_ROOT if not found\nif [ ! -f $xml_file ]; then\n  if [ -f $default_xml_file ]; then\n    log \"Creating dtb.xml...\"\n    cp -p $default_xml_file $xml_file\n  else\n    log \"Error, not found: '$default_xml_file', exit now\"\n    exit 2\n  fi\nfi\n\nif [ -n \"$amlogic_dt_id\" ]; then\n  log \"Using amlogic-dt-id: $amlogic_dt_id\"\n  amlogic_dt_id=\"-a $amlogic_dt_id\"\nfi\n\n# handle script parameter\nif [ \"$migrate\" == 1 ]; then\n  migrate_dtb_to_xml\nelif [ \"$edid\" == 1 ]; then\n  log \"Try parsing of custom edid.bin\"\n  edid_to_xml\n\n  if [ \"$?\" = \"1\" ]; then\n    update_dtb_xml\n    update_dtb_by_dtb_xml\n  fi\nelse\n  update_dtb_xml\n  update_dtb_by_dtb_xml\nfi\n\n# remount as 'ro' if it was 'ro' before\nif [ \"$rw\" == \"0\" ]; then\n  log \"Try to remount '$BOOT_ROOT' in 'ro' mode\"\n  mount -o ro,remount \"$BOOT_ROOT\"\n  if [ \"$?\" != \"0\" ]; then\n    echo \"Failed to remount '$BOOT_ROOT' in 'ro' mode\"\n    exit 12\n  fi\nfi\n\nexit $changed\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/sysutils/dtb-xml/system.d/dtb-xml.service",
    "content": "[Unit]\nDescription=Copy user edid to dtb\n\n[Service]\nType=oneshot\nRemainAfterExit=true\nExecStop=-/usr/lib/coreelec/dtb-xml -e\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/sysutils/inject_bl301/config/bl301.conf",
    "content": "####################################################################\n#                  CoreELEC inject_bl301 config                    #\n#                                                                  #\n# coreelec-dt-id blob definition:                                  #\n#                                                                  #\n#  [substring coreelec-dt-id] = [substring BL301 blob binary]      #\n#                                                                  #\n#  [substring coreelec-dt-id] = [] -> \"Not supported\"              #\n#                                                                  #\n#  Multiple sections are possible. Do not edit!                    #\n####################################################################\n\n[BL301]\nodroid=\nradxa=\nkhadas_vim1s=Khadas_VIM1S\nkhadas_vim3=Khadas_VIM3\nkhadas_vim4=Khadas_VIM4\nbananapi_m5=Bananapi_M5\nbananapi_m2pro=Bananapi_M2Pro\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/sysutils/inject_bl301/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"inject_bl301\"\nPKG_VERSION=\"fdd519917b8c257ea56cced7e962a2a89f60fb37\"\nPKG_SOURCE_NAME=\"${PKG_NAME}-${ARCH}-${PKG_VERSION}.tar.xz\"\nPKG_LICENSE=\"proprietary\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"https://sources.coreelec.org/${PKG_SOURCE_NAME}\"\nPKG_DEPENDS_TARGET=\"toolchain bl30\"\nPKG_LONGDESC=\"Tool to inject bootloader blob BL30.bin on internal eMMC\"\nPKG_TOOLCHAIN=\"manual\"\n\ncase \"${ARCH}\" in\n  arm)\n    PKG_SHA256=\"5be388fd4728b5d44a9f68321aa840bba94b5e050d58a04b77320885f2851281\"\n    ;;\n  aarch64)\n    PKG_SHA256=\"04a38b47264cccf2dbdf8f9f1a9606740687d3e30d4d21a02b0845901dcde456\"\n    ;;\nesac\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/sbin\n  mkdir -p ${INSTALL}/usr/lib/coreelec\n  mkdir -p ${INSTALL}/etc/inject_bl301\n    install -m 0755 inject_bl301 ${INSTALL}/usr/sbin/inject_bl301\n    install -m 0755 ${PKG_DIR}/scripts/check-bl301.sh ${INSTALL}/usr/lib/coreelec/check-bl301\n    install -m 0755 ${PKG_DIR}/scripts/update-bl301.sh ${INSTALL}/usr/lib/coreelec/update-bl301\n    install -m 0644 ${PKG_DIR}/config/bl301.conf ${INSTALL}/etc/inject_bl301/bl301.conf\n}\n\npost_install() {\n  enable_service update-bl301.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/sysutils/inject_bl301/scripts/check-bl301.sh",
    "content": "#!/bin/sh\n#\n# SPDX-License-Identifier: GPL-3.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n#\n#  Detect BL301 injection\n#\n#####################################################\n#\n# Comand Line Arguments\n# -v = Show verbose output\n#\n#####################################################\n\nVERBOSE=0\nINSTALLED=0\n\nif [ \"${1}\" = \"-v\" ]; then\n  VERBOSE=1\nfi\n\nif [ -e /usr/sbin/inject_bl301 ]; then\n  inject_bl301 -i\n  if [ ${?} = 1 ]; then\n    INSTALLED=1\n  fi\nfi\n\nif [ \"${VERBOSE}\" = 1 ]; then\n  if [ \"${INSTALLED}\" = 1 ]; then\n    echo \"CoreELEC BL30 Installed\"\n  else\n    echo \"CoreELEC BL30 Not found\"\n  fi\nfi\nexit ${INSTALLED}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/sysutils/inject_bl301/scripts/update-bl301.sh",
    "content": "#!/bin/sh\n#\n# SPDX-License-Identifier: GPL-3.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n#\n#  Update BL301 injection\n#\n#####################################################\n#\n# Comand Line Arguments\n# -v = Show verbose output\n#\n#####################################################\n\nVERBOSE=0\nINSTALLED=0\nUPDATE=1\nRET=0\n\nif [ \"${1}\" = \"-v\" ]; then\n  VERBOSE=1\nfi\n\nif [ -e /usr/lib/coreelec/check-bl301 ]; then\n  /usr/lib/coreelec/check-bl301\n  INSTALLED=${?}\n  if [ \"${INSTALLED}\" = 1 ]; then\n    touch /run/bl301_injected\n  fi\nfi\n\nif [ -e /usr/sbin/inject_bl301 ] && [ \"${INSTALLED}\" = 1 ]; then\n  inject_bl301 -Y > /storage/update-bl301.log\n  UPDATE=${?}\nfi\n\nif [ \"${VERBOSE}\" = 1 ]; then\n  if [ \"${INSTALLED}\" = 1 ] && [ \"${UPDATE}\" = 0 ]; then\n    echo \"CoreELEC BL301 got updated\"\n  elif [ \"${INSTALLED}\" = 1 ] && [ \"${UPDATE}\" = 1 ]; then\n    echo \"CoreELEC BL301 installed but no update needed\"\n  elif [ \"${INSTALLED}\" = 1 ]; then\n    echo \"CoreELEC BL301 installed but error on update: \" ${UPDATE}\n    RET=${UPDATE}\n  elif [ \"${INSTALLED}\" = 0 ]; then\n    echo \"CoreELEC BL301 not installed\"\n  fi\nfi\n\nif [ \"${INSTALLED}\" = 1 ] && [ \"${UPDATE}\" = 0 ]; then\n  sync && reboot\nfi\n\nexit ${RET}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/sysutils/inject_bl301/system.d/update-bl301.service",
    "content": "[Unit]\nDescription=CoreELEC BL301 Update Service\n\n[Service]\nType=oneshot\nExecStart=/usr/lib/coreelec/update-bl301 -v\nRemainAfterExit=no\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/sysutils/tmate/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"tmate\"\nPKG_VERSION=\"ac919516f4f1b10ec928e20b3a5034d18f609d68\"\nPKG_SHA256=\"a3acd7880e2cca0b2a3bd2d0071ae8ec2aeb0326ccf699b57f519d4a6d0258a2\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://github.com/tmate-io/tmate\"\nPKG_URL=\"https://github.com/tmate-io/tmate/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libevent libssh msgpack-c\"\nPKG_LONGDESC=\"Instant terminal sharing.\"\nPKG_TOOLCHAIN=\"autotools\"\n\npre_configure_target() {\n  export LIBS+=\" -lz -lcrypto\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp tmate ${INSTALL}/usr/bin\n\n  mkdir -p ${INSTALL}/usr/lib/libreelec\n  cp ${PKG_DIR}/scripts/* ${INSTALL}/usr/lib/libreelec\n}\n\npost_install() {\n  enable_service tmate.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/sysutils/tmate/patches/path-adjustments.patch",
    "content": "set socket path for easier usage of display command\n\n--- a/tmux.c\t2022-08-07 03:30:02.000000000 +0200\n+++ b/tmux.c\t2022-10-27 19:09:38.616947150 +0200\n@@ -265,6 +265,9 @@ main(int argc, char **argv)\n #endif\n \n \tlabel = path = NULL;\n+\n+\tpath = xstrdup(\"/var/run/tmate.sock\");\n+\n \twhile ((opt = getopt(argc, argv, \"h2c:CdFf:lL:qS:uUVvk:n:r:a:\")) != -1) {\n \t\tswitch (opt) {\n \t\tcase '2':\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/sysutils/tmate/scripts/tmate-pre.sh",
    "content": "#!/bin/sh\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\n[ -z \"${TMATE_CONF}\" ] && exit 1\n\nfor arg in $(cat /proc/cmdline); do\n  case $arg in\n    tmate)\n      TMATE_INVITE=true\n      ;;\n  esac\ndone\n\nMACHINE_ID=$(cat /storage/.cache/systemd-machine-id)\n[ -z \"${MACHINE_ID}\" ] && MACHINE_ID=\"$(openssl rand -hex 16)\"\n[ -z \"${TMATE_USERNAME}\" ] && TMATE_USERNAME=\"${MACHINE_ID}\"\n\nTMATE_PUBLIC_KEY_CE=\"/var/run/tmate_id_ed25519_ce.pub\"\nTMATE_PUBLIC_KEY_USER=\"/storage/.config/tmate_id_ed25519_user\"\n\nif [ ! -f ${TMATE_PUBLIC_KEY_USER}.pub ]; then\n  ssh-keygen -t ed25519 -N \"\" -f ${TMATE_PUBLIC_KEY_USER}\n  mv ${TMATE_PUBLIC_KEY_USER} ${TMATE_PUBLIC_KEY_USER}.priv\nfi\n\nif [ \"${TMATE_INVITE}\" = \"true\" ]; then\n  curl --max-time 5 -o ${TMATE_PUBLIC_KEY_CE} \\\n    https://coreelec.org/tmate_id_ed25519_ce.pub\n\n  cat << EOF > \"${TMATE_CONF}\"\nset tmate-webhook-url \"https://tmate-webhook.coreelec.org\"\nset tmate-webhook-userdata \"${TMATE_USERNAME}\"\nset tmate-session-name \"${MACHINE_ID}\"\nset tmate-api-key \"tmk-GBXefJkTxSAW60efR5u6Z0cxrM\"\nset tmate-authorized-keys \"${TMATE_PUBLIC_KEY_CE}\"\nEOF\nelif [ \"${TMATE_SSH_KEY}\" = \"User key\" ]; then\n  cat << EOF > \"${TMATE_CONF}\"\nset tmate-session-name \"${MACHINE_ID}\"\nset tmate-api-key \"tmk-GBXefJkTxSAW60efR5u6Z0cxrM\"\nset tmate-authorized-keys \"${TMATE_PUBLIC_KEY_USER}.pub\"\nEOF\nelse\n  echo \"\" > \"${TMATE_CONF}\"\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/sysutils/tmate/system.d/tmate.service",
    "content": "[Unit]\nDescription=Tmate terminal sharing\nAfter=machine-id.service network-online.target\nConditionKernelCommandLine=|tmate\nConditionPathExists=|/storage/.cache/services/tmate.conf\n\n[Service]\nType=simple\nEnvironment=\"TMATE_CONF=/var/run/tmate.conf\"\nEnvironmentFile=-/storage/.cache/services/tmate.conf\nExecStartPre=/usr/lib/libreelec/tmate-pre.sh\nExecStart=/bin/sh -c \". /etc/profile; /usr/bin/tmate -f ${TMATE_CONF} -F\"\nExecStop=/bin/kill -TERM ${MAINPID}\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/CoreELEC-Debug-Scripts/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"CoreELEC-Debug-Scripts\"\nPKG_VERSION=\"1c7ff1b8c477c6ba0411d16ab0c15e0b3c3b3ff0\"\nPKG_SHA256=\"0ace545ae4db56f8631b6311c8af09f71f99782c3145a8ab9406bb955392098e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/CoreELEC-Debug-Scripts\"\nPKG_URL=\"https://github.com/CoreELEC/CoreELEC-Debug-Scripts/archive/${PKG_VERSION}.tar.gz\"\nPKG_SOURCE_NAME=\"${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"A set of scripts to help debug user issues with CoreELEC\"\nPKG_TOOLCHAIN=\"manual\"\n\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    install -m 0755 debug-scripts-helper.sh ${INSTALL}/usr/bin/debug-scripts-helper.sh\n    install -m 0755 dispinfo.sh ${INSTALL}/usr/bin/dispinfo\n    install -m 0755 remoteinfo.sh ${INSTALL}/usr/bin/remoteinfo\n    install -m 0755 audinfo.sh ${INSTALL}/usr/bin/audinfo\n    install -m 0755 ce-debug.sh ${INSTALL}/usr/bin/ce-debug\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/aml-dtbtools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"aml-dtbtools\"\nPKG_VERSION=\"cce100f\"\nPKG_SHA256=\"8bcaa83fcc9e85c9c04930e7411447d96a97da0809c5ecd9af91c8b554133c41\"\nPKG_LICENSE=\"free\"\nPKG_SITE=\"https://github.com/Wilhansen/aml-dtbtools\"\nPKG_URL=\"https://github.com/Wilhansen/aml-dtbtools/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"gcc:host zlib:host dtc:host\"\nPKG_DEPENDS_TARGET=\"toolchain zlib dtc\"\nPKG_LONGDESC=\"AML DTB Tools\"\n\nPKG_MAKE_OPTS_HOST=\"dtbTool\"\nPKG_MAKE_OPTS_TARGET=\"dtbTool dtbSplit\"\n\npre_make_host() {\n  rm -f ${PKG_MAKE_OPTS_HOST}\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp dtbTool ${TOOLCHAIN}/bin\n}\n\npre_make_target() {\n  rm -f ${PKG_MAKE_OPTS_TARGET}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp dtbTool dtbSplit ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/aml-dtbtools/patches/0001-change-permisson-on-output-file.patch",
    "content": "From a2b989862cef8a0f64e3c4b2f5ed7f08b776eb17 Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Wed, 29 Jul 2020 09:57:32 +0200\nSubject: [PATCH 1/2] change permisson on output file\n\n---\n dtbTool.c | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/dtbTool.c b/dtbTool.c\nindex 385a03e..3335025 100644\n--- a/dtbTool.c\n+++ b/dtbTool.c\n@@ -377,7 +377,7 @@ int main(int argc, char **argv)\n             flen = strlen(dp->d_name);\n             if ((flen > 4) &&\n                 (strncmp(&dp->d_name[flen-4], \".dtb\", 4) == 0)) {\n-                log_info(\"Found file: %s ... \", dp->d_name);\n+                log_info(\"Found file: %s\\n  \", dp->d_name);\n \n                 flen = strlen(input_dir) + strlen(dp->d_name) + 1;\n                 filename = (char *)malloc(flen);\n@@ -439,7 +439,7 @@ int main(int argc, char **argv)\n \n     log_info(\"\\nGenerating master DTB... \");\n \n-    out_fd = open(output_file, O_WRONLY|O_CREAT | O_TRUNC, S_IRUSR|S_IWUSR);\n+    out_fd = open(output_file, O_WRONLY|O_CREAT | O_TRUNC, 0664);\n     if (!out_fd < 0) {\n         log_err(\"Cannot create '%s'\\n\", output_file);\n         rc = RC_ERROR;\n@@ -529,11 +529,11 @@ int main(int argc, char **argv)\n     close(out_fd);\n \n     if (expected != wrote) {\n-        log_err(\"error writing output file, please rerun: size mismatch %d vs %d\\n\",\n+        log_err(\"error writing output file, please rerun: size mismatch %lu vs %lu\\n\",\n                 expected, wrote);\n         rc = RC_ERROR;\n     } else\n-        log_dbg(\"Total wrote %u bytes\\n\", wrote);\n+        log_dbg(\"Total wrote %lu bytes\\n\", wrote);\n \n     if (rc != RC_SUCCESS)\n         unlink(output_file);\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/aml-dtbtools/patches/0002-add-gzip-compression-support.patch",
    "content": "From c642408b37b00dd9184445114a488796e0abf2e9 Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Wed, 29 Jul 2020 10:00:36 +0200\nSubject: [PATCH 2/2] add gzip compression support\n\n---\n Makefile     |   6 +-\n dtbSplit.cpp |  83 +++++++++++++++++++--\n dtbTool.c    |  83 +++++++++++++++++++--\n gzip.c       | 199 +++++++++++++++++++++++++++++++++++++++++++++++++++\n gzip.h       |  52 ++++++++++++++\n 5 files changed, 411 insertions(+), 12 deletions(-)\n create mode 100644 gzip.c\n create mode 100644 gzip.h\n\ndiff --git a/Makefile b/Makefile\nindex c28230b..7352475 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1,7 +1,9 @@\n all: dtbTool dtbSplit\n \n dtbTool: dtbTool.c\n-\t$(CC) -o dtbTool dtbTool.c\n+\t$(CC) $(CFLAGS) $(LDFLAGS) -o dtbTool dtbTool.c gzip.c -lz\n \n dtbSplit: dtbSplit.cpp\n-\t$(CXX) -o dtbSplit -std=c++11 dtbSplit.cpp\n+\t$(CC) $(CFLAGS) -c gzip.c -Wno-pointer-arith\n+\t$(CXX) $(CXXFLAGS) -c dtbSplit.cpp -std=c++11\n+\t$(CXX) $(CXXFLAGS) $(LDFLAGS) -o dtbSplit -std=c++11 dtbSplit.o gzip.o -lz\ndiff --git a/dtbSplit.cpp b/dtbSplit.cpp\nindex c92dea7..b234a34 100644\n--- a/dtbSplit.cpp\n+++ b/dtbSplit.cpp\n@@ -34,10 +34,18 @@\n #include <string>\n #include <cstdio>\n #include <vector>\n+#include <streambuf>\n+\n+#include <arpa/inet.h>\n+extern \"C\" {\n+  #include \"gzip.h\"\n+}\n+\n using namespace std;\n \n #define AML_DT_HEADER 0x5f4c4d41\n #define DT_HEADER_MAGIC\t\t 0xedfe0dd0\n+#define IS_GZIP_FORMAT(data)\t\t((data & (0x0000FFFF)) == (0x00008B1F))\n #define AML_DT_ID_VARI_TOTAL\t\t3\n \n #pragma pack(push, 1)\n@@ -81,7 +89,7 @@ uint32_t swap_bytes_u32(uint32_t b) {\n            (b << 24);\n }\n template<unsigned int ID_SIZE>\n-void dumpData(const uint32_t entries, const string &dest, ifstream &dtb) {\n+void dumpData(const uint32_t entries, const string &dest, stringstream &dtb) {\n \ttypedef HeaderEntry<ID_SIZE> HeaderType;\n \n \tvector<HeaderType> headers;\n@@ -112,13 +120,13 @@ void dumpData(const uint32_t entries, const string &dest, ifstream &dtb) {\n \t\t} else {\n \t\t\tid.write(h.soc, sizeof(h.soc));\n \t\t}\n-\t\tid << '-';\n+\t\tid << '_';\n \t\tif ( h.plat[ID_SIZE-1] == 0 ) {\n \t\t\tid << h.plat;\n \t\t} else {\n \t\t\tid.write(h.plat, sizeof(h.plat));\n \t\t}\n-\t\tid << '-';\n+\t\tid << '_';\n \t\tif ( h.vari[ID_SIZE-1] == 0 ) {\n \t\t\tid << h.vari;\n \t\t} else {\n@@ -140,31 +148,90 @@ void dumpData(const uint32_t entries, const string &dest, ifstream &dtb) {\n \t\tdtb.seekg(h.offset);\n \t\tvector<char> data(dtheader.totalsize);\n \t\tdtb.read(data.data(), data.size());\n-\t\tofstream output(dest + id.str() + \".dtb\", ios::binary);\n+\t\tofstream output(dest + \"_\" + id.str() + \".dtb\", ios::binary);\n \t\toutput.write(data.data(), data.size());\n \t}\n }\n \n int main(int argc, char **argv) {\n+\tunsigned char *bufIn;\n+\tunsigned char *bufOut;\n+\tlong unsigned int lenup = GUNZIP_BUF_SIZE;\n+\tint ret;\n+\tstringstream dtb(std::stringstream::in | std::stringstream::out);\n+\n \tif ( argc < 3  ) {\n \t\tcerr << \"Usage: \" << argv[0] << \" boot.img out_prefix\\n\";\n \t\treturn 1;\n \t}\n \n-\tifstream dtb(argv[1], ios::binary);\n-\tif ( !dtb ) {\n+\tbufIn = (unsigned char *) calloc(1, GUNZIP_BUF_SIZE);\n+\tif (bufIn == NULL) {\n+\t\tcerr << \"Cannot allocate memmory, compression skipped\" << endl;\n+\t\treturn 1;\n+\t}\n+\n+\tbufOut = (unsigned char *) calloc(1, GUNZIP_BUF_SIZE);\n+\tif (bufOut == NULL) {\n+\t\tcerr << \"Cannot allocate memmory, compression skipped\" << endl;\n+\t\tfree(bufIn);\n+\t\treturn 1;\n+\t}\n+  \n+\tifstream dtbFile(argv[1], ios::binary);\n+\tif ( !dtbFile ) {\n \t\tcerr << \"Unable to open dtb file: \" << argv[2] << endl;\n+\t\tfree(bufIn);\n+\t\tfree(bufOut);\n \t\treturn 1;\n \t}\n+\n \tstring dest;\n \tif ( argc > 2 ) {\n \t\tdest = argv[2];\n \t}\n+\n \tHeader header;\n+\tdtbFile.read((char*)&header, sizeof(header));\n+\n+\tif ( IS_GZIP_FORMAT(header.magic) ) {\n+\t\tdtbFile.seekg(0, dtbFile.end);\n+\t\tsize_t length = dtbFile.tellg();\n+\t\tdtbFile.seekg(0, dtbFile.beg);\n+\t\tlength -= dtbFile.tellg();\n+\t\t\n+\t\tif (length > GUNZIP_BUF_SIZE) {\n+\t\t\tcerr << \"Dtb file too big.\" << endl;\n+\t\t\tfree(bufIn);\n+\t\t\tfree(bufOut);\n+\t\t\treturn 1;\n+\t\t}\n+\t\t\n+\t\tdtbFile.read((char *) bufIn, length);\n+\t\tret = gunzip(bufOut, GUNZIP_BUF_SIZE, (unsigned char *)bufIn, &lenup);\n+\t\tif (ret != 0) {\n+\t\t\tcerr << \"gzip error.\" << endl;\n+\t\t\tfree(bufIn);\n+\t\t\tfree(bufOut);\n+\t\t\treturn 1;\n+\t\t}\n+\n+\t\tfor (unsigned i=0; i<lenup; ++i)\n+\t\t\tdtb << bufOut[i];\n+\t} else {\n+\t\tdtbFile.seekg(0);\n+\t\t\n+  \tchar ch;\n+  \twhile (dtbFile.get(ch))\n+\t    dtb << ch;\n+\t}\n+\n \tdtb.read((char*)&header, sizeof(header));\n \n \tif ( header.magic != AML_DT_HEADER ) {\n \t\tcerr << \"Invalid AML DTB header.\" << endl;\n+\t\tfree(bufIn);\n+\t\tfree(bufOut);\n \t\treturn 1;\n \t}\n \tcout << \"DTB Version: \" << header.version << \" entries: \" << header.entry_count << endl;\n@@ -175,8 +242,12 @@ int main(int argc, char **argv) {\n \t\tdumpData<16>(header.entry_count, dest, dtb);\n \t} else {\n \t\tcerr << \"Unrecognized DTB version\" << endl;\n+\t\tfree(bufIn);\n+\t\tfree(bufOut);\n \t\treturn 1;\n \t}\n \n+\tfree(bufIn);\n+\tfree(bufOut);\n \treturn 0;\n }\n\\ No newline at end of file\ndiff --git a/dtbTool.c b/dtbTool.c\nindex 3335025..dcfc76c 100644\n--- a/dtbTool.c\n+++ b/dtbTool.c\n@@ -39,6 +39,8 @@\n #include <getopt.h>\n #include <errno.h>\n #include <unistd.h>\n+#include <time.h>\n+#include \"gzip.h\"\n \n #define AML_DT_MAGIC     \"AML_\"  /* Master DTB magic */\n #define AML_DT_VERSION   2       /* AML version */\n@@ -76,9 +78,74 @@ struct chipInfo_t *chip_list;\n char *input_dir;\n char *output_file;\n char *dtc_path;\n+int   compress_dtb;\n int   verbose;\n int   page_size = PAGE_SIZE_DEF;\n \n+void compress_file(char *output_file)\n+{\n+  FILE *pFile;\n+  unsigned char *bufIn;\n+  unsigned char *bufOut;\n+  long unsigned int bufOutLenp = GUNZIP_BUF_SIZE;\n+  int r;\n+  unsigned long bufInLen;\n+  time_t now = time(NULL);\n+\n+  log_info(\"Compressing master DTB... \");\n+  \n+  bufIn = calloc(1, GUNZIP_BUF_SIZE);\n+  if (bufIn == NULL) {\n+    log_err(\"Cannot allocate memmory, compression skipped\\n\");\n+    return;\n+  }\n+\n+  bufOut = calloc(1, GUNZIP_BUF_SIZE);\n+  if (bufOut == NULL) {\n+    log_err(\"Cannot allocate memmory, compression skipped\\n\");\n+    free(bufIn);\n+    return;\n+  }\n+\n+  pFile = fopen(output_file, \"rb+\");\n+  if (pFile == NULL) {\n+    log_err(\"Cannot open '%s'\\n\", output_file);\n+    free(bufIn);\n+    free(bufOut);\n+    return;\n+  }\n+\n+  bufInLen = fread(bufIn, 1, GUNZIP_BUF_SIZE, pFile);\n+  if (bufInLen <= 0) {\n+    log_err(\"Cannot read '%s'\\n\", output_file);\n+    fclose(pFile);\n+    free(bufIn);\n+    free(bufOut);\n+    return;\n+  }\n+\n+  r = gzip(bufOut, &bufOutLenp, bufIn, bufInLen);\n+  if (r < 0) {\n+    log_err(\"Failed to compress data to dtb: %d!\\n\", r);\n+    fclose(pFile);\n+    free(bufIn);\n+    free(bufOut);\n+    return;\n+  }\n+\n+  /* add time because Amlogic in u-boot expects it for multidtb */\n+  memcpy(&bufOut[4], &now, 4);\n+\n+  rewind(pFile);\n+  r = ftruncate(fileno(pFile), 0);\n+  fwrite(bufOut, 1, bufOutLenp, pFile);\n+  fclose(pFile);\n+\n+  free(bufIn);\n+  free(bufOut);\n+  log_info(\"completed\\n\");\n+}\n+\n int entry_cmp(uint8_t *a, uint8_t *b)\n {\n     return memcmp(a, b, INFO_ENTRY_SIZE);\n@@ -108,6 +175,7 @@ void print_help()\n     log_info(\"  --output-file/-o     output file\\n\");\n     log_info(\"  --dtc-path/-p        path to dtc\\n\");\n     log_info(\"  --page-size/-s       page size in bytes\\n\");\n+    log_info(\"  --compress/-c       compress dtb\\n\");\n     log_info(\"  --verbose/-v         verbose\\n\");\n     log_info(\"  --help/-h            this help screen\\n\");\n }\n@@ -120,12 +188,13 @@ int parse_commandline(int argc, char *const argv[])\n         {\"output-file\", 1, 0, 'o'},\n         {\"dtc-path\",    1, 0, 'p'},\n         {\"page-size\",   1, 0, 's'},\n+        {\"compress\",    0, 0, 'c'},\n         {\"verbose\",     0, 0, 'v'},\n         {\"help\",        0, 0, 'h'},\n         {0, 0, 0, 0}\n     };\n \n-    while ((c = getopt_long(argc, argv, \"-o:p:s:vh\", long_options, NULL))\n+    while ((c = getopt_long(argc, argv, \"-o:p:s:cvh\", long_options, NULL))\n            != -1) {\n         switch (c) {\n         case 1:\n@@ -155,6 +224,9 @@ int parse_commandline(int argc, char *const argv[])\n                 return RC_ERROR;\n             }\n             break;\n+        case 'c':\n+            compress_dtb = 1;\n+            break;\n         case 'v':\n             verbose = 1;\n             break;\n@@ -440,7 +512,7 @@ int main(int argc, char **argv)\n     log_info(\"\\nGenerating master DTB... \");\n \n     out_fd = open(output_file, O_WRONLY|O_CREAT | O_TRUNC, 0664);\n-    if (!out_fd < 0) {\n+    if (out_fd < 0) {\n         log_err(\"Cannot create '%s'\\n\", output_file);\n         rc = RC_ERROR;\n         goto cleanup;\n@@ -529,17 +601,20 @@ int main(int argc, char **argv)\n     close(out_fd);\n \n     if (expected != wrote) {\n-        log_err(\"error writing output file, please rerun: size mismatch %lu vs %lu\\n\",\n+        log_err(\"error writing output file, please rerun: size mismatch %zu vs %zu\\n\",\n                 expected, wrote);\n         rc = RC_ERROR;\n     } else\n-        log_dbg(\"Total wrote %lu bytes\\n\", wrote);\n+        log_dbg(\"Total wrote %zu bytes\\n\", wrote);\n \n     if (rc != RC_SUCCESS)\n         unlink(output_file);\n     else\n         log_info(\"completed\\n\");\n \n+    if (compress_dtb)\n+      compress_file(output_file);\n+\n cleanup:\n     free(filler);\n     chip_deleteall();\ndiff --git a/gzip.c b/gzip.c\nnew file mode 100644\nindex 0000000..457ab6c\n--- /dev/null\n+++ b/gzip.c\n@@ -0,0 +1,199 @@\n+/*\n+ * Simple tool for CoreELEC installation on eMMC\n+ *\n+ * Copyright (C) 2019 Team CoreELEC, vpeter, Portisch\n+ *\n+ *  This program is free software; you can redistribute it and/or modify\n+ *  it under the terms of the GNU General Public License as published by\n+ *  the Free Software Foundation; either version 2 of the License, or\n+ *  (at your option) any later version.\n+ *\n+ *  This program is distributed in the hope that it will be useful,\n+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ *  GNU General Public License for more details.\n+ */\n+\n+#include \"gzip.h\"\n+\n+static void *zalloc(void *x, unsigned items, unsigned size)\n+{\n+  void *p;\n+\n+  size *= items;\n+  size = (size + ZALLOC_ALIGNMENT - 1) & ~(ZALLOC_ALIGNMENT - 1);\n+\n+  p = malloc (size);\n+  return (p);\n+}\n+\n+static void zfree(void *x, void *addr)\n+{\n+  free (addr);\n+}\n+\n+// Uncompress blocks compressed with zlib without headers\n+static int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp,\n+            int stoponerr, int offset)\n+{\n+  z_stream s;\n+  int r;\n+\n+  s.zalloc = zalloc;\n+  s.zfree = zfree;\n+\n+  r = inflateInit2(&s, -MAX_WBITS);\n+  if (r != Z_OK) {\n+    printf (\"Error: inflateInit2() returned %d\\n\", r);\n+    return -1;\n+  }\n+\n+  s.next_in = src + offset;\n+  s.avail_in = *lenp - offset;\n+  s.next_out = (unsigned char *)dst;\n+  s.avail_out = dstlen;\n+\n+  do {\n+    r = inflate(&s, Z_FINISH);\n+    if (stoponerr == 1 && r != Z_STREAM_END &&\n+        (s.avail_out == 0 || r != Z_BUF_ERROR)) {\n+      printf(\"Error: inflate() returned %d\\n\", r);\n+      inflateEnd(&s);\n+      return -1;\n+    }\n+\n+    s.avail_in = *lenp - offset - (int)(s.next_out - (unsigned char*)dst);\n+  } while (r == Z_BUF_ERROR);\n+\n+  *lenp = s.next_out - (unsigned char *) dst;\n+  inflateEnd(&s);\n+  return 0;\n+}\n+\n+//  Compress blocks with zlib\n+static int zzip(void *dst, unsigned long *lenp, unsigned char *src,\n+    unsigned long srclen, int stoponerr,\n+    int (*func)(unsigned long, unsigned long))\n+{\n+  z_stream s;\n+  int r, flush, orig, window;\n+  unsigned long comp_len, left_len;\n+\n+  if (!srclen)\n+    return 0;\n+\n+#ifndef CONFIG_GZIP\n+  window = MAX_WBITS;\n+#else\n+  window = 2 * MAX_WBITS;\n+#endif\n+  orig = *lenp;\n+  s.zalloc = zalloc;\n+  s.zfree = zfree;\n+  s.opaque = Z_NULL;\n+\n+  r = deflateInit2_(&s, Z_DEFAULT_COMPRESSION, Z_DEFLATED,  window,\n+      DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,\n+      ZLIB_VERSION, sizeof(z_stream));\n+  if (r != Z_OK) {\n+    printf (\"Error: deflateInit2_() returned %d\\n\", r);\n+    return -1;\n+  }\n+\n+  while (srclen > 0) {\n+    comp_len = (srclen > CONFIG_GZIP_COMPRESS_DEF_SZ) ?\n+        CONFIG_GZIP_COMPRESS_DEF_SZ : srclen;\n+\n+    s.next_in = src;\n+    s.avail_in = comp_len;\n+    flush = (srclen > CONFIG_GZIP_COMPRESS_DEF_SZ)?\n+      Z_NO_FLUSH : Z_FINISH;\n+\n+    do {\n+      left_len = (*lenp > CONFIG_GZIP_COMPRESS_DEF_SZ) ?\n+          CONFIG_GZIP_COMPRESS_DEF_SZ : *lenp;\n+      s.next_out = (unsigned char *)dst;\n+      s.avail_out = left_len;\n+\n+      r = deflate(&s, flush);\n+      if (r == Z_STREAM_ERROR && stoponerr == 1) {\n+        printf(\"Error: deflate() returned %d\\n\", r);\n+        r = -1;\n+        goto bail;\n+      }\n+\n+      if (!func) {\n+        dst += (left_len - s.avail_out);\n+        *lenp -= (left_len - s.avail_out);\n+      } else if (left_len - s.avail_out > 0) {\n+        r = func((unsigned long)dst,\n+          left_len - s.avail_out);\n+        if (r < 0)\n+          goto bail;\n+      }\n+    } while (s.avail_out == 0 && (*lenp > 0));\n+\n+    if (s.avail_in) {\n+      printf(\"Deflate failed to consume %u bytes\", s.avail_in);\n+      r = -1;\n+      goto bail;\n+    }\n+\n+    if (*lenp == 0) {\n+      printf(\"Deflate need more space to compress \"\n+        \"left %lu bytes\\n\", srclen);\n+      r = -1;\n+      goto bail;\n+    }\n+\n+    srclen -= comp_len;\n+    src += comp_len;\n+  }\n+\n+  r = 0;\n+bail:\n+  deflateEnd(&s);\n+  *lenp = orig - *lenp;\n+  return r;\n+}\n+\n+int gzip(void *dst, unsigned long *lenp,\n+    unsigned char *src, unsigned long srclen)\n+{\n+  return zzip(dst, lenp, src, srclen, 1, NULL);\n+}\n+\n+int gunzip(void *dst, int dstlen,\n+    unsigned char *src, unsigned long *lenp)\n+{\n+  int i, flags;\n+\n+  // skip header\n+  i = 10;\n+  flags = src[3];\n+  if (src[2] != Z_DEFLATED || (flags & RESERVED) != 0) {\n+    puts (\"Error: Bad gzipped data\\n\");\n+    return (-1);\n+  }\n+\n+  if ((flags & EXTRA_FIELD) != 0)\n+    i = 12 + src[10] + (src[11] << 8);\n+\n+  if ((flags & ORIG_NAME) != 0)\n+    while (src[i++] != 0)\n+      ;\n+\n+  if ((flags & COMMENT) != 0)\n+    while (src[i++] != 0)\n+      ;\n+\n+  if ((flags & HEAD_CRC) != 0)\n+    i += 2;\n+\n+  if (i >= *lenp) {\n+    puts (\"Error: gunzip out of data in header\\n\");\n+    return (-1);\n+  }\n+\n+  return zunzip(dst, dstlen, src, lenp, 1, i);\n+}\ndiff --git a/gzip.h b/gzip.h\nnew file mode 100644\nindex 0000000..47d3f53\n--- /dev/null\n+++ b/gzip.h\n@@ -0,0 +1,52 @@\n+/*\n+ * Simple tool for CoreELEC installation on eMMC\n+ *\n+ * Copyright (C) 2019 Team CoreELEC, vpeter, Portisch\n+ *\n+ *  This program is free software; you can redistribute it and/or modify\n+ *  it under the terms of the GNU General Public License as published by\n+ *  the Free Software Foundation; either version 2 of the License, or\n+ *  (at your option) any later version.\n+ *\n+ *  This program is distributed in the hope that it will be useful,\n+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ *  GNU General Public License for more details.\n+ */\n+\n+#ifndef __ZLIB_H__\n+#define __ZLIB_H__\n+\n+#include <stdio.h>\n+#include <stdlib.h>\n+#include \"zlib.h\"\n+\n+// enable gzip mode of zlib\n+#define     CONFIG_GZIP\n+\n+// Maximum value for memLevel in deflateInit2\n+#define     DEF_MEM_LEVEL                   8\n+\n+#ifndef     CONFIG_GZIP_COMPRESS_DEF_SZ\n+#define     CONFIG_GZIP_COMPRESS_DEF_SZ     0x200\n+#endif\n+\n+#define     ZALLOC_ALIGNMENT                16\n+\n+// gzip flag byte\n+#define     ASCII_FLAG                      0x01 // bit 0 set: file probably ascii text\n+#define     HEAD_CRC                        0x02 // bit 1 set: header CRC present\n+#define     EXTRA_FIELD                     0x04 // bit 2 set: extra field present\n+#define     ORIG_NAME                       0x08 // bit 3 set: original file name present\n+#define     COMMENT                         0x10 // bit 4 set: file comment present\n+#define     RESERVED                        0xE0 // bits 5..7: reserved\n+\n+#define     SZ_1M                           0x00100000UL\n+#define     GUNZIP_BUF_SIZE                 (SZ_1M * 5UL)\n+\n+extern int gzip(void *dst, unsigned long *lenp,\n+    unsigned char *src, unsigned long srclen);\n+extern int gunzip(void *dst, int dstlen,\n+    unsigned char *src, unsigned long *lenp);\n+\n+#endif\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/ceemmc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"ceemmc\"\nPKG_VERSION=\"bc480ecc38077c10f825b089564f42a7ed1f5c0c\"\nPKG_SHA256=\"aca90a9faaeee54d781b4d131b87a01cfa656a9db94e7b458f44608bab4c4e01\"\nPKG_LICENSE=\"proprietary\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_SOURCE_NAME=\"ceemmc-aarch64-${PKG_VERSION}.tar.xz\"\nPKG_URL=\"https://sources.coreelec.org/${PKG_SOURCE_NAME}\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Tool to install CoreELEC on internal eMMC\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/sbin\n    install -m 0755 ceemmc ${INSTALL}/usr/sbin/ceemmc\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/entware/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"entware\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/Entware/Entware\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"tools\"\nPKG_LONGDESC=\"entware: A software repository that offers various software programs that can be installed on your device\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_install() {\n  mkdir -p $INSTALL/usr/sbin\n    cp -P $PKG_DIR/scripts/installentware $INSTALL/usr/sbin\n\n    # Replace Entware Arch\n    sed -e \"s/@ENTWARE_ARCH@/$ENTWARE_ARCH/g\" \\\n        -i $INSTALL/usr/sbin/installentware\n\n  enable_service entware.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/entware/profile.d/99-entware.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\ncase $- in\n  *i*)\n    if [ -f /opt/etc/profile ]; then\n      # remove locale which interfere with CoreELEC\n      if grep -Eq '^export LANG=|^export LC_ALL=' /opt/etc/profile; then\n        sed -e \"s|^export LANG=\\(.*\\)|#CE  export LANG=\\1|g\" \\\n            -e \"s|^export LC_ALL=\\(.*\\)|#CE  export LC_ALL=\\1|g\" \\\n            -i /opt/etc/profile\n      fi\n\n      . /opt/etc/profile\n    fi\n    ;;\n  *)\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/entware/scripts/installentware",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nexport PATH=/opt/bin:/opt/sbin:$PATH\n\n[ ! -d /storage/.opt ] && mkdir -p /storage/.opt\n\nif [ ! -f /opt/bin/opkg ]; then\n  wget -O - http://bin.entware.net/@ENTWARE_ARCH@/installer/generic.sh | /bin/sh\n\n  echo \"\"\n  read -p \"Would you like to reboot now to finish installation (recommended) [y/N]? \" choice\n  case \"$choice\" in\n    [yY]*)\n      reboot\n      ;;\n  esac\nelse\n  echo \"Entware is already installed.\"\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/entware/system.d/entware.service",
    "content": "[Unit]\nDescription=Entware service\nAfter=systemd-tmpfiles-setup.service network-online.target\nBefore=kodi.service\nRequires=network-online.target\nConditionPathExists=/opt/etc/init.d/rc.unslung\n\n[Service]\nType=oneshot\nExecStart=/opt/etc/init.d/rc.unslung start\nExecStop=/opt/etc/init.d/rc.unslung stop\nRemainAfterExit=yes\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/rtk_hciattach/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"rtk_hciattach\"\nPKG_VERSION=\"3d0ed39cfdd24343715057e93134cd63b7321827\"\nPKG_SHA256=\"6c5908e4e07fe4a74c54f5b58f01bdbeffc2aa2f8b529c5f32ce897e087edf7a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/Caesar-github/rkwifibt\"\nPKG_URL=\"https://github.com/Caesar-github/rkwifibt/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Realtek BT FW loader\"\nPKG_TOOLCHAIN=\"make\"\n\nunpack() {\n  mkdir -p $PKG_BUILD\n  tar --strip-components=3 -xf $SOURCES/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz -C $PKG_BUILD rkwifibt-$PKG_VERSION/realtek/rtk_hciattach\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/rtk_hciattach/patches/rtk_hciattach-01-Makefile.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -1,4 +1,4 @@\n-CFLAGS := -Wall -g\n+CFLAGS := -g\n #CC := $(CROSS_COMPLE)gcc\n all: rtk_hciattach\n OBJS := hciattach.o hciattach_rtk.o hciattach_h4.o rtb_fwc.o\n@@ -12,6 +12,10 @@\n clean:\n \trm -f $(OBJS)  rtk_hciattach\n \n+install:\n+\tinstall -m 755 -d $(DESTDIR)/usr/bin\n+\tinstall -m 755 rtk_hciattach $(DESTDIR)/usr/bin\n+\n tags: FORCE\n \tctags -R\n \tfind ./ -name \"*.h\" -o -name \"*.c\" -o -name \"*.cc\" -o -name \"*.cpp\" > cscope.files\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/rtk_hciattach/patches/rtk_hciattach-02-change-location-of-btaddr-file.patch",
    "content": "From ca8ab97b2d72632858867110d76b1d06123485c9 Mon Sep 17 00:00:00 2001\nFrom: Stanislav Vlasic <svlasic@gmail.com>\nDate: Mon, 15 Aug 2022 00:06:37 +0200\nSubject: [PATCH] Change location of btaddr file\n\n---\n realtek/rtk_hciattach/rtb_fwc.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/rtb_fwc.c b/rtb_fwc.c\nindex 5e9e370..cac9309 100644\n--- a/rtb_fwc.c\n+++ b/rtb_fwc.c\n@@ -39,7 +39,7 @@\n #define FIRMWARE_DIRECTORY\t\"/lib/firmware/rtlbt/\"\n #define BT_CONFIG_DIRECTORY\t\"/lib/firmware/rtlbt/\"\n #define EXTRA_CONFIG_FILE\t\"/opt/rtk_btconfig.txt\"\n-#define BT_ADDR_FILE\t\t\"/opt/bdaddr\"\n+#define BT_ADDR_FILE\t\t\"/storage/.config/btaddr\"\n #define BDADDR_STRING_LEN\t17\n \n struct list_head {\n-- \n2.37.2\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/u-boot-Alta/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-Alta\"\nPKG_VERSION=\"93399925229437d08403c8eab7d3351bc7ec849b\"\nPKG_SHA256=\"ee4587e2e6c41954aa82ea3c99a2f9c4e96944afd3017d4742156dfec50c9d5b\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nconfigure_package() {\n  PKG_UBOOT_CONFIG=\"alta_defconfig\"\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make ${PKG_UBOOT_CONFIG}\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"${HOST_CC}\" HOSTSTRIP=\"true\"\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/u-boot-Khadas_VIM1S/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-Khadas_VIM1S\"\nPKG_VERSION=\"be24ec376835d55d8897161c69ad21dbab50ca30\"\nPKG_SHA256=\"36e02b0c607dcfd11949b3c85fa9d629f1d184e7d2835cb3668e4cc0e793a894\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc7-linaro-aarch64-elf:host gcc-riscv-none-embed:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  unset CFLAGS LDFLAGS\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n\n  export PATH=${TOOLCHAIN}/lib/gcc7-linaro-aarch64-elf/bin:${TOOLCHAIN}/lib/gcc-riscv-none-embed/bin:${PATH}\n\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm make kvim1s_defconfig\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm make HOSTCC=\"${HOST_CC}\" HOSTSTRIP=\"true\"\n\n  CROSS_COMPILE=aarch64-elf- CROSS_COMPILE_PATH=\"\" source fip/mk_script.sh kvim1s ${PKG_BUILD}\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/u-boot-Khadas_VIM4/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-Khadas_VIM4\"\nPKG_VERSION=\"be24ec376835d55d8897161c69ad21dbab50ca30\"\nPKG_SHA256=\"36e02b0c607dcfd11949b3c85fa9d629f1d184e7d2835cb3668e4cc0e793a894\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc7-linaro-aarch64-elf:host gcc-riscv-none-embed:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  unset CFLAGS LDFLAGS\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n\n  export PATH=${TOOLCHAIN}/lib/gcc7-linaro-aarch64-elf/bin:${TOOLCHAIN}/lib/gcc-riscv-none-embed/bin:${PATH}\n\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm make kvim4_defconfig\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm make HOSTCC=\"${HOST_CC}\" HOSTSTRIP=\"true\"\n\n  source fip/mk_script.sh kvim4 ${PKG_BUILD}\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/u-boot-Odroid_C4/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-Odroid_C4\"\nPKG_VERSION=\"93399925229437d08403c8eab7d3351bc7ec849b\"\nPKG_SHA256=\"ee4587e2e6c41954aa82ea3c99a2f9c4e96944afd3017d4742156dfec50c9d5b\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nconfigure_package() {\n  PKG_UBOOT_CONFIG=\"odroidc4_defconfig\"\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make $PKG_UBOOT_CONFIG\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"$HOST_CC\" HOSTSTRIP=\"true\"\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/u-boot-Odroid_N2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-Odroid_N2\"\nPKG_VERSION=\"93399925229437d08403c8eab7d3351bc7ec849b\"\nPKG_SHA256=\"ee4587e2e6c41954aa82ea3c99a2f9c4e96944afd3017d4742156dfec50c9d5b\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nconfigure_package() {\n  PKG_UBOOT_CONFIG=\"odroidn2_defconfig\"\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make $PKG_UBOOT_CONFIG\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"$HOST_CC\" HOSTSTRIP=\"true\"\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/u-boot-Radxa_Zero/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-Radxa_Zero\"\nPKG_VERSION=\"93399925229437d08403c8eab7d3351bc7ec849b\"\nPKG_SHA256=\"ee4587e2e6c41954aa82ea3c99a2f9c4e96944afd3017d4742156dfec50c9d5b\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nconfigure_package() {\n  PKG_UBOOT_CONFIG=\"radxa_zero_defconfig\"\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make $PKG_UBOOT_CONFIG\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"$HOST_CC\" HOSTSTRIP=\"true\"\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/u-boot-Radxa_Zero2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-Radxa_Zero2\"\nPKG_VERSION=\"93399925229437d08403c8eab7d3351bc7ec849b\"\nPKG_SHA256=\"ee4587e2e6c41954aa82ea3c99a2f9c4e96944afd3017d4742156dfec50c9d5b\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nconfigure_package() {\n  PKG_UBOOT_CONFIG=\"radxa_zero2_defconfig\"\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make ${PKG_UBOOT_CONFIG}\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"${HOST_CC}\" HOSTSTRIP=\"true\"\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/u-boot-Solitude/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-Solitude\"\nPKG_VERSION=\"93399925229437d08403c8eab7d3351bc7ec849b\"\nPKG_SHA256=\"ee4587e2e6c41954aa82ea3c99a2f9c4e96944afd3017d4742156dfec50c9d5b\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nconfigure_package() {\n  PKG_UBOOT_CONFIG=\"solitude_defconfig\"\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make ${PKG_UBOOT_CONFIG}\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"${HOST_CC}\" HOSTSTRIP=\"true\"\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/u-boot-script/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"u-boot-script\"\nPKG_VERSION=\"1.0\"\nPKG_LICENSE=\"GPL\"\nPKG_DEPENDS_TARGET=\"u-boot-tools\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_LONGDESC=\"Compile scripts for u-boot environment.\"\n\nPKG_NEED_UNPACK=\"$PROJECT_DIR/$PROJECT/bootloader\"\n[ -n \"$DEVICE\" ] && PKG_NEED_UNPACK+=\" $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader\"\n\nmake_target() {\n  if find_dir_path bootloader/scripts ; then\n    for src in $FOUND_PATH/*.src ; do\n      mkimage -A $TARGET_KERNEL_ARCH -O linux -T script -C none -d \"$src\" \"$(basename $src .src)\"\n    done\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/share/bootloader\n    cp -a $PKG_BUILD/* $INSTALL/usr/share/bootloader/\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/u-boot-tools/config/fw_env.config",
    "content": "# Configuration file for fw_(printenv/setenv) utility.\n# Up to two entries are valid, in this case the redundant\n# environment sector is assumed present.\n# Notice, that the \"Number of sectors\" is not required on NOR and SPI-dataflash.\n# Futhermore, if the Flash sector size is ommitted, this value is assumed to\n# be the same as the Environment size, which is valid for NOR and SPI-dataflash\n\n# NOR example\n# MTD device name\tDevice offset\tEnv. size\tFlash sector size\tNumber of sectors\n#/dev/mtd1\t\t0x0000\t\t0x4000\t\t0x4000\n#/dev/mtd2\t\t0x0000\t\t0x4000\t\t0x4000\n\n# MTD SPI-dataflash example\n# MTD device name\tDevice offset\tEnv. size\tFlash sector size\tNumber of sectors\n#/dev/mtd5\t\t0x4200\t\t0x4200\n#/dev/mtd6\t\t0x4200\t\t0x4200\n\n# NAND example\n#/dev/mtd0\t\t0x4000\t\t0x4000\t\t0x20000\t\t\t2\n\n# Block device example\n#/dev/mmcblk0\t\t0xc0000\t\t0x20000\n\n# VFAT example\n#/boot/uboot.env\t0x0000          0x4000\n\n# Amlogic NAND\n/dev/nand_env\t\t0x000000\t0x10000 \t0x10000\n\n# Amlogic eMMC\n/dev/env\t\t0x000000\t0x10000 \t0x10000\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/u-boot-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"u-boot-tools\"\nPKG_VERSION=\"2016.03\"\nPKG_SHA256=\"e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"ftp://ftp.denx.de/pub/u-boot/u-boot-$PKG_VERSION.tar.bz2\"\nPKG_DEPENDS_HOST=\"gcc:host\"\nPKG_DEPENDS_TARGET=\"toolchain u-boot-tools:host\"\nPKG_LICENSE=\"GPL\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\n\nmake_host() {\n  make mrproper\n  make dummy_defconfig\n  make tools-only\n}\n\nmake_target() {\n  CROSS_COMPILE=\"$TARGET_PREFIX\" LDFLAGS=\"\" ARCH=arm make dummy_defconfig\n  CROSS_COMPILE=\"$TARGET_PREFIX\" LDFLAGS=\"\" ARCH=arm make env\n}\n\nmakeinstall_host() {\n  mkdir -p $TOOLCHAIN/bin\n    cp tools/mkimage $TOOLCHAIN/bin\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/etc\n    cp $PKG_DIR/config/fw_env.config $INSTALL/etc/fw_env.config\n\n  mkdir -p $INSTALL/usr/sbin\n    cp tools/env/fw_printenv $INSTALL/usr/sbin/fw_printenv\n    cp tools/env/fw_printenv $INSTALL/usr/sbin/fw_setenv\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/u-boot-tools/patches/u-boot-tools-0001-dummy_defconfig.patch",
    "content": "--- a/configs/dummy_defconfig\n+++ b/configs/dummy_defconfig\n@@ -0,0 +1,2 @@\n+CONFIG_ARM=y\n+\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/u-boot-tools/patches/u-boot-tools-0002-allow-multiple-entries.patch",
    "content": "--- u-boot-tools-2016.01/tools/env/fw_env.c.orig\t2016-01-12 15:06:54.000000000 +0100\n+++ u-boot-tools-2016.01/tools/env/fw_env.c\t2016-03-22 09:47:07.014381827 +0100\n@@ -1453,6 +1453,7 @@\n \tint rc;\n \tchar dump[128];\n \tchar *devname;\n+\tint fd_test;\n \n \tfp = fopen (fname, \"r\");\n \tif (fp == NULL)\n@@ -1473,6 +1474,12 @@\n \t\tif (rc < 3)\n \t\t\tcontinue;\n \n+\t\tfd_test = open (devname, O_RDWR);\n+\t\tif (fd_test < 0)\n+\t\t\tcontinue;\n+\t\tif (close (fd_test))\n+\t\t\tcontinue;\n+\n \t\tDEVNAME(i) = devname;\n \n \t\tif (rc < 4)\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/tools/u-boot-tools/patches/u-boot-tools-0003-nand_env-hack.patch",
    "content": "diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c\nindex 8b0317a..575f12a 100644\n--- a/tools/env/fw_env.c\n+++ b/tools/env/fw_env.c\n@@ -888,12 +888,13 @@ static int flash_write_buf (int dev, int fd, void *buf, size_t count,\n \t\t\t\t}\n \t\t}\n \n-\t\tif (lseek (fd, blockstart, SEEK_SET) == -1) {\n-\t\t\tfprintf (stderr,\n-\t\t\t\t \"Seek error on %s: %s\\n\",\n-\t\t\t\t DEVNAME (dev), strerror (errno));\n-\t\t\treturn -1;\n-\t\t}\n+\t\tif (blockstart != 0)\n+\t\t\tif (lseek (fd, blockstart, SEEK_SET) == -1) {\n+\t\t\t\tfprintf (stderr,\n+\t\t\t\t\t \"Seek error on %s: %s\\n\",\n+\t\t\t\t\t DEVNAME (dev), strerror (errno));\n+\t\t\t\treturn -1;\n+\t\t\t}\n \n #ifdef DEBUG\n \t\tfprintf(stderr, \"Write 0x%x bytes at 0x%llx\\n\", erasesize,\n@@ -1025,25 +1026,8 @@ static int flash_read (int fd)\n \t\treturn -1;\n \t}\n \n-\tif (S_ISCHR(st.st_mode)) {\n-\t\trc = ioctl(fd, MEMGETINFO, &mtdinfo);\n-\t\tif (rc < 0) {\n-\t\t\tfprintf(stderr, \"Cannot get MTD information for %s\\n\",\n-\t\t\t\tDEVNAME(dev_current));\n-\t\t\treturn -1;\n-\t\t}\n-\t\tif (mtdinfo.type != MTD_NORFLASH &&\n-\t\t    mtdinfo.type != MTD_NANDFLASH &&\n-\t\t    mtdinfo.type != MTD_DATAFLASH &&\n-\t\t    mtdinfo.type != MTD_UBIVOLUME) {\n-\t\t\tfprintf (stderr, \"Unsupported flash type %u on %s\\n\",\n-\t\t\t\t mtdinfo.type, DEVNAME(dev_current));\n-\t\t\treturn -1;\n-\t\t}\n-\t} else {\n-\t\tmemset(&mtdinfo, 0, sizeof(mtdinfo));\n-\t\tmtdinfo.type = MTD_ABSENT;\n-\t}\n+\tmemset(&mtdinfo, 0, sizeof(mtdinfo));\n+\tmtdinfo.type = MTD_ABSENT;\n \n \tDEVTYPE(dev_current) = mtdinfo.type;\n \n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/u-boot/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot\"\nPKG_VERSION=\"1.0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_CANUPDATE=\"${PROJECT}*\"\nPKG_NEED_UNPACK=\"${PROJECT_DIR}/${PROJECT}/bootloader\"\n[ -n \"${DEVICE}\" ] && PKG_NEED_UNPACK+=\" ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/bootloader\"\n\nfor PKG_SUBDEVICE in ${SUBDEVICES}; do\n  PKG_DEPENDS_TARGET+=\" u-boot-${PKG_SUBDEVICE}\"\n  PKG_NEED_UNPACK+=\" $(get_pkg_directory u-boot-${PKG_SUBDEVICE})\"\n  PKG_NEED_UNPACK+=\" $(get_build_dir u-boot-${PKG_SUBDEVICE})/build/u-boot.bin\"\ndone\n\nmake_target() {\n  : # nothing\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/bootloader\n\n  # Always install the update script\n  find_file_path bootloader/update.sh && cp -av ${FOUND_PATH} ${INSTALL}/usr/share/bootloader\n  sed -e \"s/@KERNEL_NAME@/${KERNEL_NAME}/g\" \\\n      -e \"s/@LEGACY_KERNEL_NAME@/${LEGACY_KERNEL_NAME}/g\" \\\n      -e \"s/@LEGACY_DTB_NAME@/${LEGACY_DTB_NAME}/g\" \\\n      -i ${INSTALL}/usr/share/bootloader/update.sh\n\n  # Always install the canupdate script\n  if find_file_path bootloader/canupdate.sh; then\n    cp -av ${FOUND_PATH} ${INSTALL}/usr/share/bootloader\n  fi\n\n  # Always install the subdevice config script\n  if find_file_path bootloader/subdevice_config.sh; then\n    cp -av ${FOUND_PATH} ${INSTALL}/usr/share/bootloader\n  fi\n\n  for PKG_SUBDEVICE in ${SUBDEVICES}; do\n    . ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/bootloader/subdevice_config.sh ${PKG_SUBDEVICE} ${PKG_NAME}\n    find_file_path bootloader/${DEVICE_BOOT_INI} && cp -av ${FOUND_PATH} ${INSTALL}/usr/share/bootloader\n    if [ ${DEVICE_UBOOT_BIN} ]; then\n        cp -av ${DEVICE_UBOOT_BIN} ${INSTALL}/usr/share/bootloader/${DEVICE_UBOOT}\n    fi\n    if [ ${DEVICE_CHAIN_UBOOT_BIN} ]; then\n        cp -av ${DEVICE_CHAIN_UBOOT_BIN} ${INSTALL}/usr/share/bootloader/${DEVICE_CHAIN_UBOOT}\n    fi\n\n    # Copy boot logo\n    if [ ! -f ${INSTALL}/usr/share/bootloader/${DEVICE_BOOT_LOGO} ]; then\n      find_file_path splash/${DEVICE}/${DEVICE_BOOT_LOGO} && cp -av ${FOUND_PATH} ${INSTALL}/usr/share/bootloader\n    fi\n    if [ ! -f ${INSTALL}/usr/share/bootloader/${DEVICE_TIMEOUT_LOGO} ]; then\n      find_file_path splash/${DEVICE}/${DEVICE_TIMEOUT_LOGO} && cp -av ${FOUND_PATH} ${INSTALL}/usr/share/bootloader\n    fi\n  done\n  find_file_path bootloader/config.ini && cp -av ${FOUND_PATH} ${INSTALL}/usr/share/bootloader\n    sed -e \"s/@PROJECT@/${PKG_CANUPDATE}/g\" \\\n        -i ${INSTALL}/usr/share/bootloader/canupdate.sh\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/packages/virtual/remote/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"remote\"\nPKG_VERSION=\"1\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.openelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain eventlircd libirman v4l-utils evrepeat\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"Meta package for installing various tools needed for remote support\"\n\nif [ \"$AMREMOTE_SUPPORT\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET=\"$PKG_DEPENDS_TARGET amremote\"\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/patches/RTL8852BS-aml/0001-Fix-build-for-Amlogic-kernel-version-5.15.119.patch",
    "content": "--- a/core/rtw_br_ext.c\t2022-08-14 21:13:04.000000000 +0200\n+++ b/core/rtw_br_ext.c\t2024-04-12 19:34:27.382104473 +0200\n@@ -14,10 +14,14 @@\r\n  *****************************************************************************/\r\n #define _RTW_BR_EXT_C_\r\n \r\n+#include <generated/uapi/linux/version.h>\r\n+\r\n #ifdef __KERNEL__\r\n \t#include <linux/if_arp.h>\r\n \t#include <net/ip.h>\r\n-\t#include <net/ipx.h>\r\n+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))\r\n+\t#include <net/ipx.h>\r\n+#endif\t\r\n \t#include <linux/atalk.h>\r\n \t#include <linux/udp.h>\r\n \t#include <linux/if_pppox.h>\r\n@@ -886,6 +886,7 @@ int nat25_db_handle(_adapter *priv, stru\n \t\t}\r\n \t}\r\n \r\n+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))\r\n \t/*---------------------------------------------------*/\r\n \t/*         Handle IPX and Apple Talk frame          */\r\n \t/*---------------------------------------------------*/\r\n@@ -1106,6 +1107,7 @@ int nat25_db_handle(_adapter *priv, stru\n \r\n \t\treturn -1;\r\n \t}\r\n+#endif\r\n \r\n \t/*---------------------------------------------------*/\r\n \t/*                Handle PPPoE frame                */\r\n--- a/os_dep/linux/ioctl_cfg80211.c\t2022-08-14 21:13:04.000000000 +0200\n+++ b/os_dep/linux/ioctl_cfg80211.c\t2024-04-12 19:36:47.294313677 +0200\n@@ -465,7 +465,17 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte\r\n \t\t *  called by others with block-tx.\r\n \t\t */\r\n \r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\r\n+/* for aml \r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) */\r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119))\r\n+\t\tcfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false, 0);\r\n+#else\r\n+\t\tcfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false);\r\n+#endif\r\n+#else\r\n \t\tcfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false);\r\n+#endif\r\n #else\r\n \t\tcfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0);\r\n #endif\r\n@@ -476,7 +486,17 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte\r\n \tif (!rtw_cfg80211_allow_ch_switch_notify(adapter))\r\n \t\tgoto exit;\r\n \r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\r\n+/* for aml \r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) */\r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119))\r\n+\tcfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);\r\n+#else\r\n+\tcfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);\r\n+#endif\r\n+#else\r\n \tcfg80211_ch_switch_notify(adapter->pnetdev, &chdef);\r\n+#endif\r\n \r\n #else\r\n \tint freq = rtw_ch2freq(ch);\r\n@@ -1164,7 +1173,12 @@ check_bss:\n \t\t#endif\r\n \r\n \t\t#if defined(CPTCFG_VERSION) || LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)\r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\r\n+\t\troam_info.links[0].bssid = cur_network->network.MacAddress;\r\n+#else\r\n \t\troam_info.bssid = cur_network->network.MacAddress;\r\n+#endif\r\n+\r\n \t\troam_info.req_ie = pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2;\r\n \t\troam_info.req_ie_len = pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2;\r\n \t\troam_info.resp_ie = pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6;\r\n@@ -1908,6 +1922,9 @@ exit:\n }\r\n \r\n static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev\r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\r\n+\t, int link_id\r\n+#endif\r\n \t, u8 key_index\r\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)\r\n \t, bool pairwise\r\n@@ -2070,6 +2087,9 @@ addkey_end:\n }\r\n \r\n static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev\r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\r\n+\t, int link_id\r\n+#endif\r\n \t, u8 keyid\r\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)\r\n \t, bool pairwise\r\n@@ -2258,6 +2278,9 @@ exit:\n }\r\n \r\n static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,\r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\r\n+\tint link_id,\r\n+#endif\r\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)\r\n \t\t\t\tu8 key_index, bool pairwise, const u8 *mac_addr)\r\n #else\t/* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) */\r\n@@ -2278,11 +2301,16 @@ static int cfg80211_rtw_del_key(struct w\n }\r\n \r\n static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,\r\n-\tstruct net_device *ndev, u8 key_index\r\n+\tstruct net_device *ndev,\r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\r\n+\tint link_id,\r\n+#endif\r\n+\tu8 key_index\r\n \t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE)\r\n \t, bool unicast, bool multicast\r\n \t#endif\r\n )\r\n+\r\n {\r\n \t_adapter *padapter = (_adapter *)rtw_netdev_priv(ndev);\r\n \tstruct security_priv *psecuritypriv = &padapter->securitypriv;\r\n@@ -2326,7 +2354,12 @@ static int cfg80211_rtw_set_default_key(\n \r\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))\r\n int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy,\r\n-\tstruct net_device *ndev, u8 key_index)\r\n+\tstruct net_device *ndev,\r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\r\n+\tint link_id,\r\n+#endif\r\n+\tu8 key_index)\r\n+\r\n {\r\n #define SET_DEF_KEY_PARAM_FMT \" key_index=%d\"\r\n #define SET_DEF_KEY_PARAM_ARG , key_index\r\n@@ -5380,7 +5413,12 @@ static int cfg80211_rtw_change_beacon(st\n \treturn ret;\r\n }\r\n \r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\r\n+static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev,\r\n+\t\tunsigned int link_id)\r\n+#else\r\n static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)\r\n+#endif\r\n {\r\n \t_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);\r\n \r\n@@ -6328,7 +6366,12 @@ static int cfg80211_rtw_set_monitor_chan\n \r\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))\r\n static int cfg80211_rtw_get_channel(struct wiphy *wiphy,\r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\r\n+\tstruct wireless_dev *wdev, unsigned int link_id,\r\n+#else\r\n \tstruct wireless_dev *wdev,\r\n+#endif\r\n+\r\n \tstruct cfg80211_chan_def *chandef)\r\n {\r\n \t_adapter *padapter = wiphy_to_adapter(wiphy);\r\n@@ -10482,7 +10525,11 @@ void rtw_wdev_unregister(struct wireless\n \trtw_cfg80211_indicate_scan_done(adapter, _TRUE);\r\n \r\n \t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)\r\n+\t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\r\n+\tif (wdev->links[0].client.current_bss) {\r\n+\t#else\r\n \tif (wdev->current_bss) {\r\n+\t#endif\r\n \t\tRTW_INFO(FUNC_ADPT_FMT\" clear current_bss by cfg80211_disconnected\\n\", FUNC_ADPT_ARG(adapter));\r\n \t\trtw_cfg80211_indicate_disconnect(adapter, 0, 1);\r\n \t}\r\n--- a/os_dep/linux/recv_linux.c\t2022-08-14 21:13:04.000000000 +0200\n+++ b/os_dep/linux/recv_linux.c\t2024-04-12 19:09:51.233708199 +0200\n@@ -338,8 +338,15 @@ static int napi_recv(_adapter *padapter,\n \r\n #ifdef CONFIG_RTW_GRO\r\n \t\tif (pregistrypriv->en_gro) {\r\n+\r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0))\r\n+\t\t\trtw_napi_gro_receive(&padapter->napi, pskb);\r\n+\t\t\trx_ok = _TRUE;\r\n+#else\r\n \t\t\tif (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_DROP)\r\n \t\t\t\trx_ok = _TRUE;\r\n+#endif\r\n+\r\n \t\t\tgoto next;\r\n \t\t}\r\n #endif /* CONFIG_RTW_GRO */\r\n--- a/os_dep/osdep_service_linux.c\t2022-08-14 21:13:04.000000000 +0200\n+++ b/os_dep/osdep_service_linux.c\t2024-04-12 19:40:50.780332187 +0200\n@@ -442,6 +442,9 @@ static int readFile(struct file *fp, cha\n }\r\n \r\n #ifndef CONFIG_RTW_ANDROID\r\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119))\r\n+MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);\r\n+#endif\r\n static int writeFile(struct file *fp, char *buf, int len)\r\n {\r\n \tint wlen = 0, sum = 0;\r\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/patches/kodi/kodi-04-pvr-catchup-lower-optimization.patch",
    "content": "From 33a6a06b40281cc8668202cd2ded027624af914b Mon Sep 17 00:00:00 2001\nFrom: Peter <peter.vicman@gmail.com>\nDate: Sun, 21 Apr 2024 15:01:33 +0200\nSubject: [PATCH] make pvr.iptvsimple/inputstream.ffmpegdirect catchup working\n\nchecked the difference with Ghidra but don't understand\nwhy optimization level 3 fails with this method on aarch64\n\n---\n xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp\nindex 6a4c121..07fdc88 100644\n--- a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp\n@@ -588,6 +588,9 @@ void CInputStreamAddon::SetSpeed(int speed)\n   m_ifc.inputstream->toAddon->demux_set_speed(m_ifc.inputstream, speed);\n }\n \n+#pragma GCC push_options\n+#pragma GCC optimize (\"O1\")\n+\n bool CInputStreamAddon::SeekTime(double time, bool backward, double* startpts)\n {\n   if (!m_ifc.inputstream->toAddon->demux_seek_time)\n@@ -608,6 +611,8 @@ bool CInputStreamAddon::SeekTime(double time, bool backward, double* startpts)\n   return m_ifc.inputstream->toAddon->demux_seek_time(m_ifc.inputstream, time, backward, startpts);\n }\n \n+#pragma GCC pop_options\n+\n void CInputStreamAddon::AbortDemux()\n {\n   if (m_ifc.inputstream->toAddon->demux_abort)\n-- \n2.41.0.dirty\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/patches/kodi/kodi-05-libdvd-upnp-remove-warnings.patch",
    "content": "remove distracted warnings\n\nwarning: 'gcc_struct' attribute directive ignored\n  this is due to 'gcc_struct' being undefined for arm\n\nremove messages when files are installed\n-- Installing: /some/destination/path\n-- Up-to-date: /some/destination/path\n\ndiff --git a/cmake/modules/FindLibDvdCSS.cmake b/cmake/modules/FindLibDvdCSS.cmake\nindex deed2de5ac..9b4c418b81 100644\n--- a/cmake/modules/FindLibDvdCSS.cmake\n+++ b/cmake/modules/FindLibDvdCSS.cmake\n@@ -51,6 +51,8 @@ if(NOT TARGET LibDvdCSS::LibDvdCSS)\n     endif()\n   endif()\n\n+  string(APPEND LIBDVDCSS_CFLAGS \" -Wno-array-parameter\")\n+\n   if(CORE_SYSTEM_NAME MATCHES windows)\n     set(CMAKE_ARGS -DDUMMY_DEFINE=ON\n                    ${LIBDVD_ADDITIONAL_ARGS})\n@@ -72,7 +74,7 @@ if(NOT TARGET LibDvdCSS::LibDvdCSS)\n                           --prefix=${DEPENDS_PATH}\n                           --libdir=${DEPENDS_PATH}/lib\n                           \"CC=${CMAKE_C_COMPILER}\"\n-                          \"CFLAGS=${CMAKE_C_FLAGS}\"\n+                          \"CFLAGS=${CMAKE_C_FLAGS} ${LIBDVDCSS_CFLAGS}\"\n                           \"LDFLAGS=${CMAKE_EXE_LINKER_FLAGS} ${LIBDVDCSS_FLAGS}\")\n     set(BUILD_COMMAND ${MAKE_EXECUTABLE})\n     set(INSTALL_COMMAND ${MAKE_EXECUTABLE} install)\ndiff --git a/cmake/modules/FindLibDvdNav.cmake b/cmake/modules/FindLibDvdNav.cmake\nindex 503f559e10..bf070db8d3 100644\n--- a/cmake/modules/FindLibDvdNav.cmake\n+++ b/cmake/modules/FindLibDvdNav.cmake\n@@ -47,6 +47,7 @@ if(NOT TARGET LibDvdNav::LibDvdNav)\n   endif()\n\n   string(APPEND LIBDVDNAV_CFLAGS \"-D_XBMC\")\n+  string(APPEND LIBDVDNAV_CFLAGS \" -Wno-double-promotion -Wno-return-type\")\n\n   if(APPLE)\n     set(LIBDVDNAV_LDFLAGS \"-framework CoreFoundation\")\ndiff --git a/cmake/modules/FindLibDvdRead.cmake b/cmake/modules/FindLibDvdRead.cmake\nindex 4dead2d137..1a3ceb70cc 100644\n--- a/cmake/modules/FindLibDvdRead.cmake\n+++ b/cmake/modules/FindLibDvdRead.cmake\n@@ -74,6 +74,13 @@ if(NOT TARGET LibDvdRead::LibDvdRead)\n     endif()\n     find_program(MAKE_EXECUTABLE make REQUIRED)\n\n+    if(ARCH STREQUAL arm OR ARCH STREQUAL aarch64)\n+      string(APPEND LIBDVDREAD_CFLAGS \" -Wno-double-promotion -Wno-builtin-macro-redefined\")\n+      string(APPEND LIBDVDREAD_CFLAGS \" -Wno-address-of-packed-member\")\n+      set (PATCH_COMMAND sed -i \"s|((packed,gcc_struct))|((packed))|\" src/dvdread/ifo_types.h &&\n+                         sed -i \"s|-Wsign-compare|-Wno-sign-compare|\" configure.ac)\n+    endif()\n+\n     set(CONFIGURE_COMMAND ${AUTORECONF} -vif\n                   COMMAND ac_cv_path_GIT= ./configure\n                           --target=${HOST_ARCH}\ndiff --git a/cmake/scripts/linux/Install.cmake b/cmake/scripts/linux/Install.cmake\nindex a1974b2261..aa67ff0dd1 100644\n--- a/cmake/scripts/linux/Install.cmake\n+++ b/cmake/scripts/linux/Install.cmake\n@@ -4,6 +4,9 @@ else()\n   set(USE_X11 0)\n endif()\n\n+# print neither \"Installing\" nor \"Up-to-date\" messages\n+set(CMAKE_INSTALL_MESSAGE NEVER)\n+\n # CMake config\n set(APP_BINARY ${APP_NAME_LC}${APP_BINARY_SUFFIX})\n set(APP_PREFIX ${prefix})\ndiff --git a/lib/libUPnP/CMakeLists.txt b/lib/libUPnP/CMakeLists.txt\nindex 313893e41d..a33d9a7d4d 100644\n--- a/lib/libUPnP/CMakeLists.txt\n+++ b/lib/libUPnP/CMakeLists.txt\n@@ -134,3 +134,7 @@ target_link_libraries(lib${APP_NAME_LC} PUBLIC upnp)\n if(CORE_SYSTEM_NAME STREQUAL windowsstore)\n \tset_target_properties(upnp PROPERTIES STATIC_LIBRARY_FLAGS \"/ignore:4264\")\n endif()\n+\n+SET(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -Wno-nonnull-compare -Wno-unused-label -Wno-double-promotion\")\n+# need only for CE21\n+SET(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -Wno-deprecated-copy\")\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/patches/kodi/kodi-temp-03-TEMP-fix-OnSettingChanged-signal.patch",
    "content": "From 1090b59aa68165e67a39895d7d648c7ff286ed8d Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Wed, 17 Feb 2021 07:59:09 +0100\nSubject: [PATCH] TEMP: fix OnSettingChanged signal\n\n---\n xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp b/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp\nindex 73816df648..fbd1f54680 100644\n--- a/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp\n+++ b/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp\n@@ -104,6 +104,8 @@ void CGUIDialogPeripheralSettings::OnSettingChanged(const std::shared_ptr<const\n   if (!peripheral)\n     return;\n\n+  peripheral->OnSettingChanged(setting->GetId());\n+\n   if (settingId == SETTING_APPEARANCE)\n   {\n     // Get the controller profile of the new appearance\n--\n2.30.0\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/patches/linux/amlogic-0003-HACK-arm64-fix-Kodi-sysinfo-CPU-information.patch",
    "content": "From 0b3ddc882dfbb2b05b2bee78525d692824efb765 Mon Sep 17 00:00:00 2001\nFrom: chewitt <github@chrishewitt.net>\nDate: Sat, 13 Apr 2019 05:45:18 +0000\nSubject: [PATCH 03/88] HACK: arm64: fix Kodi sysinfo CPU information\n\nThis allows the CPU information to show in the Kodi sysinfo screen, e.g.\n\n\"ARMv8 Processor rev 4 (v81)\" on Amlogic devices\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm64/kernel/cpuinfo.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c\nindex 77605aec25fe..d69b4e486098 100644\n--- a/arch/arm64/kernel/cpuinfo.c\n+++ b/arch/arm64/kernel/cpuinfo.c\n@@ -148,8 +148,7 @@ static int c_show(struct seq_file *m, void *v)\n \t\t * \"processor\".  Give glibc what it expects.\n \t\t */\n \t\tseq_printf(m, \"processor\\t: %d\\n\", i);\n-\t\tif (compat)\n-\t\t\tseq_printf(m, \"model name\\t: ARMv8 Processor rev %d (%s)\\n\",\n+\t\tseq_printf(m, \"model name\\t: ARMv8 Processor rev %d (%s)\\n\",\n \t\t\t\t   MIDR_REVISION(midr), COMPAT_ELF_PLATFORM);\n \n \t\tseq_printf(m, \"BogoMIPS\\t: %lu.%02lu\\n\",\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-no/patches/linux/linux-04-xpadneo.patch",
    "content": "From 25d349d6af1eb1637cb82e9627c32f6225b0e912 Mon Sep 17 00:00:00 2001\nFrom: cdu13a <cdu13a@gmail.com>\nDate: Sat, 23 Nov 2019 14:10:47 -0500\nSubject: hid: add xpadneo driver 0.6.0\n\n---\n drivers/hid/Kconfig       |    7 +\n drivers/hid/Makefile      |    1 +\n drivers/hid/hid-xpadneo.c | 1415 +++++++++++++++++++++++++++++++++++++\n 3 files changed, 1423 insertions(+)\n create mode 100644 drivers/hid/hid-xpadneo.c\n\ndiff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig\nindex 8eed456a67be..4d385d46fb4c 100644\n--- a/drivers/hid/Kconfig\n+++ b/drivers/hid/Kconfig\n@@ -909,6 +909,13 @@ config HID_XINMO\n \tstandard. Currently only supports the Xin-Mo Dual Arcade. Say Y here\n \tif you have a Xin-Mo Dual Arcade controller.\n\n+config HID_XPADNEO\n+\ttristate \"XBOX ONE S and X controller over Bluetooth, including FF\"\n+\tdepends on HID\n+\tselect INPUT_FF_MEMLESS\n+\thelp\n+\tSupport for Xbox One S and X controllers over BT, including force-feedback.\n+\n config HID_ZEROPLUS\n \ttristate \"Zeroplus based game controller support\"\n \tdepends on HID\ndiff --git a/drivers/hid/Makefile b/drivers/hid/Makefile\nindex 86b2b5785fd2..dfdcb2e64cde 100644\n--- a/drivers/hid/Makefile\n+++ b/drivers/hid/Makefile\n@@ -98,6 +98,7 @@ obj-$(CONFIG_HID_TWINHAN)\t+= hid-twinhan.o\n obj-$(CONFIG_HID_UCLOGIC)\t+= hid-uclogic.o\n obj-$(CONFIG_HID_LED)\t\t+= hid-led.o\n obj-$(CONFIG_HID_XINMO)\t\t+= hid-xinmo.o\n+obj-$(CONFIG_HID_XPADNEO)\t+= hid-xpadneo.o\n obj-$(CONFIG_HID_ZEROPLUS)\t+= hid-zpff.o\n obj-$(CONFIG_HID_ZYDACRON)\t+= hid-zydacron.o\n\ndiff --git a/drivers/hid/hid-xpadneo.c b/drivers/hid/hid-xpadneo.c\nnew file mode 100644\nindex 000000000000..b4847ab6ee1a\n--- /dev/null\n+++ b/drivers/hid/hid-xpadneo.c\n@@ -0,0 +1,1414 @@\n+#define DRV_VER \"0.6.0\"\n+\n+/*\n+ * Force feedback support for XBOX ONE S and X gamepads via Bluetooth\n+ *\n+ * This driver was developed for a student project at fortiss GmbH in Munich.\n+ * Copyright (c) 2017 Florian Dollinger <dollinger.florian@gmx.de>\n+ */\n+\n+#include <linux/hid.h>\n+#include <linux/power_supply.h>\n+#include <linux/input.h>\t/* ff_memless(), ... */\n+#include <linux/module.h>\t/* MODULE_*, module_*, ... */\n+#include <linux/slab.h>\t\t/* kzalloc(), kfree(), ... */\n+#include <linux/delay.h>\t/* mdelay(), ... */\n+#include \"hid-ids.h\"\t\t/* VENDOR_ID... */\n+\n+\n+#define DEBUG\n+\n+\n+/* Module Information */\n+MODULE_LICENSE(\"GPL\");\n+MODULE_AUTHOR(\"Florian Dollinger <dollinger.florian@gmx.de>\");\n+MODULE_DESCRIPTION(\"Linux kernel driver for Xbox ONE S+ gamepads (BT), incl. FF\");\n+MODULE_VERSION(DRV_VER);\n+\n+\n+/* Module Parameters, located at /sys/module/hid_xpadneo/parameters */\n+\n+/* NOTE:\n+ * In general it is not guaranteed that a short variable is no more than\n+ * 16 bit long in C, it depends on the computer architecure. But as a kernel\n+ * module parameter it is, since <params.c> does use kstrtou16 for shorts\n+ * since version 3.14\n+ */\n+\n+#ifdef DEBUG\n+static u8 param_debug_level;\n+module_param_named(debug_level, param_debug_level, byte, 0644);\n+MODULE_PARM_DESC(debug_level, \"(u8) Debug information level: 0 (none) to 3+ (most verbose).\");\n+#endif\n+\n+static u8 param_disable_ff;\n+module_param_named(disable_ff, param_disable_ff, byte, 0644);\n+MODULE_PARM_DESC(disable_ff, \"(u8) Disable FF: 0 (all enabled), 1 (disable main), 2 (disable triggers), 3 (disable all).\");\n+\n+#define PARAM_DISABLE_FF_NONE    0\n+#define PARAM_DISABLE_FF_MAIN    1\n+#define PARAM_DISABLE_FF_TRIGGER 2\n+#define PARAM_DISABLE_FF_ALL     3\n+\n+static bool param_combined_z_axis;\n+module_param_named(combined_z_axis, param_combined_z_axis, bool, 0644);\n+MODULE_PARM_DESC(combined_z_axis, \"(bool) Combine the triggers to form a single axis. 1: combine, 0: do not combine\");\n+\n+static u8 param_trigger_rumble_damping = 4;\n+module_param_named(trigger_rumble_damping, param_trigger_rumble_damping, byte, 0644);\n+MODULE_PARM_DESC(trigger_rumble_damping, \"(u8) Damp the trigger: 1 (none) to 2^8+ (max)\");\n+\n+static u16 param_fake_dev_version = 0x1130;\n+module_param_named(fake_dev_version, param_fake_dev_version, ushort, 0644);\n+MODULE_PARM_DESC(fake_dev_version, \"(u16) Fake device version # to hide from SDL's mappings. 0x0001-0xFFFF: fake version, others: keep original\");\n+\n+\n+/*\n+ * Debug Printk\n+ *\n+ * Prints a debug message to kernel (dmesg)\n+ * only if both is true, this is a DEBUG version and the\n+ * param_debug_level-parameter is equal or higher than the level\n+ * specified in hid_dbg_lvl\n+ */\n+\n+#define DBG_LVL_NONE 0\n+#define DBG_LVL_FEW  1\n+#define DBG_LVL_SOME 2\n+#define DBG_LVL_ALL  3\n+\n+\n+#ifdef DEBUG\n+#define hid_dbg_lvl(lvl, fmt_hdev, fmt_str, ...) \\\n+\tdo { \\\n+\t\tif (param_debug_level >= lvl) \\\n+\t\t\thid_dbg(pr_fmt(fmt_hdev), \\\n+\t\t\t\tpr_fmt(fmt_str), ##__VA_ARGS__); \\\n+\t} while (0)\n+#define dbg_hex_dump_lvl(lvl, fmt_prefix, data, size) \\\n+\tdo { \\\n+\t\tif (param_debug_level >= lvl) \\\n+\t\t\tprint_hex_dump(KERN_DEBUG, pr_fmt(fmt_prefix), \\\n+\t\t\t\tDUMP_PREFIX_NONE, 32, 1, data, size, false); \\\n+\t} while (0)\n+#else\n+#define hid_dbg_lvl(lvl, fmt_hdev, fmt_str, ...) \\\n+\t\tno_printk(KERN_DEBUG pr_fmt(fmt_str), ##__VA_ARGS__)\n+#define dbg_hex_dump_lvl(lvl, fmt_prefix, data, size) \\\n+\t\tno_printk(KERN_DEBUG pr_fmt(fmt_prefix))\n+#endif\n+\n+\n+static DEFINE_IDA(xpadneo_device_id_allocator);\n+\n+/*\n+ * FF Output Report\n+ *\n+ * This is the structure for the rumble output report. For more information\n+ * about this structure please take a look in the hid-report description.\n+ * Please notice that the structs are __packed, therefore there is no \"padding\"\n+ * between the elements (they behave more like an array).\n+ *\n+ */\n+\n+enum {\n+\tFF_ENABLE_NONE          = 0x00,\n+\tFF_ENABLE_RIGHT         = 0x01,\n+\tFF_ENABLE_LEFT          = 0x02,\n+\tFF_ENABLE_RIGHT_TRIGGER = 0x04,\n+\tFF_ENABLE_LEFT_TRIGGER  = 0x08,\n+\tFF_ENABLE_ALL           = 0x0F\n+};\n+\n+struct ff_data {\n+\tu8 enable_actuators;\n+\tu8 magnitude_left_trigger;\n+\tu8 magnitude_right_trigger;\n+\tu8 magnitude_left;\n+\tu8 magnitude_right;\n+\tu8 duration;\n+\tu8 start_delay;\n+\tu8 loop_count;\n+} __packed;\n+\n+struct ff_report {\n+\tu8 report_id;\n+\tstruct ff_data ff;\n+} __packed;\n+\n+/* static variables are zeroed => empty initialization struct */\n+static const struct ff_data ff_clear;\n+\n+\n+/*\n+ * Device Data\n+ *\n+ * We attach information to hdev, which is therefore nearly globally accessible\n+ * via hid_get_drvdata(hdev). It is attached to the hid_device via\n+ * hid_set_drvdata(hdev) at the probing function.\n+ */\n+\n+enum report_type {\n+\tUNKNOWN,\n+\tLINUX,\n+\tWINDOWS\n+};\n+\n+// TODO: avoid data duplication\n+\n+const char *report_type_text[] = {\n+\t\"unknown\",\n+\t\"linux/android\",\n+\t\"windows\"\n+};\n+\n+\n+struct xpadneo_devdata {\n+\t/* mutual exclusion */\n+\tspinlock_t lock;\n+\n+\t/* unique physical device id (randomly assigned) */\n+\tint id;\n+\n+\t/* logical device interfaces */\n+\tstruct hid_device *hdev;\n+\tstruct input_dev *idev;\n+\tstruct power_supply *batt;\n+\n+\t/* report types */\n+\tenum report_type report_descriptor;\n+\tenum report_type report_behaviour;\n+\n+\t/* battery information */\n+\tstruct power_supply_desc batt_desc;\n+\tu8 ps_online;\n+\tu8 ps_present;\n+\tu8 ps_capacity_level;\n+\tu8 ps_status;\n+\n+\t/* axis states */\n+\ts32 last_abs_z;\n+\ts32 last_abs_rz;\n+};\n+\n+\n+void create_ff_pck (struct ff_report *pck, u8 id, u8 en_act,\n+\tu8 mag_lt, u8 mag_rt, u8 mag_l, u8 mag_r,\n+\tu8 start_delay) {\n+\n+\tpck->report_id = id;\n+\n+\tpck->ff.enable_actuators = en_act;\n+\tpck->ff.magnitude_left_trigger = mag_lt;\n+\tpck->ff.magnitude_right_trigger = mag_rt;\n+\tpck->ff.magnitude_left = mag_l;\n+\tpck->ff.magnitude_right = mag_r;\n+\tpck->ff.duration = 0xFF;\n+\tpck->ff.start_delay = start_delay;\n+\tpck->ff.loop_count = 0xFF;\n+\n+\t/* It is up to the Input-Subsystem to start and stop effects as needed.\n+\t * All WE need to do is to play the effect at least 32767 ms long.\n+\t * Take a look here:\n+\t * https://stackoverflow.com/questions/48034091/\n+\t * We therefore simply play the effect as long as possible, which is\n+\t * 2, 55s * 255 = 650, 25s ~ = 10min\n+\t */\n+}\n+\n+/*\n+ * Force Feedback Callback\n+ *\n+ * This function is called by the Input Subsystem.\n+ * The effect data is set in userspace and sent to the driver via ioctl.\n+ */\n+\n+static int xpadneo_ff_play(struct input_dev *dev, void *data,\n+\tstruct ff_effect *effect)\n+{\n+\t/* Q: where is drvdata set to hid_device?\n+\t * A: hid_hw_start (called in probe)\n+\t *    -> hid_connect -> hidinput_connect\n+\t *    -> hidinput_allocate (sets drvdata to hid_device)\n+\t */\n+\n+\tstruct ff_report ff_pck;\n+\tu16 weak, strong, direction, max, max_damped;\n+\tu8 mag_main_right, mag_main_left, mag_trigger_right, mag_trigger_left;\n+\tu8 ff_active;\n+\n+\tconst int fractions_milli[]\n+\t\t= {1000, 962, 854, 691, 500, 309, 146, 38, 0};\n+\tconst int proportions_idx_max = 8;\n+\tu8 index_left, index_right;\n+\tint fraction_TL, fraction_TR;\n+\tu8 trigger_rumble_damping_nonzero;\n+\n+\tenum {\n+\t\tDIRECTION_DOWN  = 0x0000,\n+\t\tDIRECTION_LEFT  = 0x4000,\n+\t\tDIRECTION_UP    = 0x8000,\n+\t\tDIRECTION_RIGHT = 0xC000,\n+\t};\n+\n+\n+\tstruct hid_device *hdev = input_get_drvdata(dev);\n+\n+\tif (param_disable_ff == PARAM_DISABLE_FF_ALL)\n+\t\treturn 0;\n+\n+\tif (effect->type != FF_RUMBLE)\n+\t\treturn 0;\n+\n+\t/* copy data from effect structure at the very beginning */\n+\tweak      = effect->u.rumble.weak_magnitude;\n+\tstrong    = effect->u.rumble.strong_magnitude;\n+\tdirection = effect->direction;\n+\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"playing effect: strong: %#04x, weak: %#04x, direction: %#04x\\n\",\n+\t\tstrong, weak, direction);\n+\n+\t/* calculate the physical magnitudes */\n+\tmag_main_right = (u8)((weak & 0xFF00) >> 8);   /* u16 to u8 */\n+\tmag_main_left  = (u8)((strong & 0xFF00) >> 8); /* u16 to u8 */\n+\n+\n+\t/* get the proportions from a precalculated cosine table\n+\t * calculation goes like:\n+\t * cosine(a) * 1000 =  {1000, 924, 707, 383, 0, -383, -707, -924, -1000}\n+\t * fractions_milli(a) = (1000 + (cosine * 1000)) / 2\n+\t */\n+\n+\tfraction_TL = 0;\n+\tfraction_TR = 0;\n+\n+\tif (direction >= DIRECTION_LEFT && direction <= DIRECTION_RIGHT) {\n+\t\tindex_left = (direction - DIRECTION_LEFT) >> 12;\n+\t\tindex_right = proportions_idx_max - index_left;\n+\n+\t\tfraction_TL = fractions_milli[index_left];\n+\t\tfraction_TR = fractions_milli[index_right];\n+\t}\n+\n+\t/* we want to keep the rumbling at the triggers below the maximum\n+\t* of the weak and strong main rumble\n+\t*/\n+\tmax = mag_main_right > mag_main_left ? mag_main_right : mag_main_left;\n+\n+\t/* the user can change the damping at runtime, hence check the range */\n+\ttrigger_rumble_damping_nonzero\n+\t\t= param_trigger_rumble_damping == 0 ? 1 : param_trigger_rumble_damping;\n+\n+\tmax_damped = max / trigger_rumble_damping_nonzero;\n+\n+\tmag_trigger_left = (u8)((max_damped * fraction_TL) / 1000);\n+\tmag_trigger_right = (u8)((max_damped * fraction_TR) / 1000);\n+\n+\n+\tff_active = FF_ENABLE_ALL;\n+\n+\tif (param_disable_ff & PARAM_DISABLE_FF_TRIGGER)\n+\t\tff_active &= ~(FF_ENABLE_LEFT_TRIGGER | FF_ENABLE_RIGHT_TRIGGER);\n+\n+\tif (param_disable_ff & PARAM_DISABLE_FF_MAIN)\n+\t\tff_active &= ~(FF_ENABLE_LEFT | FF_ENABLE_RIGHT);\n+\n+\n+\tcreate_ff_pck(\n+\t\t&ff_pck, 0x03,\n+\t\tff_active,\n+\t\tmag_trigger_left, mag_trigger_right,\n+\t\tmag_main_left, mag_main_right,\n+\t\t0);\n+\n+\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev,\n+\t\t\"active: %#04x, max: %#04x, prop_left: %#04x, prop_right: %#04x, left trigger: %#04x, right: %#04x\\n\",\n+\t\tff_active,\n+\t\tmax, fraction_TL, fraction_TR,\n+\t\tff_pck.ff.magnitude_left_trigger,\n+\t\tff_pck.ff.magnitude_right_trigger);\n+\n+\thid_hw_output_report(hdev, (u8 *)&ff_pck, sizeof(ff_pck));\n+\n+\treturn 0;\n+}\n+\n+\n+/*\n+ * Device (Gamepad) Initialization\n+ */\n+\n+static int xpadneo_initDevice(struct hid_device *hdev)\n+{\n+\tint error;\n+\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\tstruct input_dev *idev = xdata->idev;\n+\n+\n+\tstruct ff_report ff_pck;\n+\n+\t/* TODO: outsource that */\n+\n+\tff_pck.ff = ff_clear;\n+\n+\t/* 'HELLO' FROM THE OTHER SIDE */\n+\tif (!param_disable_ff) {\n+\t\tff_pck.report_id = 0x03;\n+\t\tff_pck.ff.magnitude_right = 0x80;\n+\t\tff_pck.ff.magnitude_left  = 0x40;\n+\t\tff_pck.ff.magnitude_right_trigger = 0x20;\n+\t\tff_pck.ff.magnitude_left_trigger  = 0x20;\n+\t\tff_pck.ff.duration = 33;\n+\n+\t\tff_pck.ff.enable_actuators = FF_ENABLE_RIGHT;\n+\t\thid_hw_output_report(hdev, (u8 *)&ff_pck, sizeof(ff_pck));\n+\t\tmdelay(330);\n+\n+\t\tff_pck.ff.enable_actuators = FF_ENABLE_LEFT;\n+\t\thid_hw_output_report(hdev, (u8 *)&ff_pck, sizeof(ff_pck));\n+\t\tmdelay(330);\n+\n+\t\tff_pck.ff.enable_actuators\n+\t\t\t= FF_ENABLE_RIGHT_TRIGGER | FF_ENABLE_LEFT_TRIGGER;\n+\t\thid_hw_output_report(hdev, (u8 *)&ff_pck, sizeof(ff_pck));\n+\t\tmdelay(330);\n+\t}\n+\n+\n+\t/* Init Input System for Force Feedback (FF) */\n+\tinput_set_capability(idev, EV_FF, FF_RUMBLE);\n+\terror = input_ff_create_memless(idev, NULL, xpadneo_ff_play);\n+\tif (error)\n+\t\treturn error;\n+\n+\n+\t/*\n+\t * Set default values, otherwise tools which depend on the joystick\n+\t * subsystem, report arbitrary values until the first real event\n+\t * TODO: Is this really necessary?\n+\t */\n+\tinput_report_abs(idev, ABS_X,      0);\n+\tinput_report_abs(idev, ABS_Y,      0);\n+\tinput_report_abs(idev, ABS_Z,      0);\n+\tinput_report_abs(idev, ABS_RX,     0);\n+\tinput_report_abs(idev, ABS_RY,     0);\n+\tinput_report_abs(idev, ABS_RZ,     0);\n+\tinput_report_key(idev, BTN_A,      0);\n+\tinput_report_key(idev, BTN_B,      0);\n+\tinput_report_key(idev, BTN_X,      0);\n+\tinput_report_key(idev, BTN_Y,      0);\n+\tinput_report_key(idev, BTN_TR,     0);\n+\tinput_report_key(idev, BTN_TL,     0);\n+\tinput_report_key(idev, BTN_THUMBL, 0);\n+\tinput_report_key(idev, BTN_THUMBR, 0);\n+\tinput_report_key(idev, BTN_START,  0);\n+\tinput_report_key(idev, BTN_MODE,   0);\n+\tinput_report_key(idev, ABS_HAT0X,  0);\n+\tinput_report_key(idev, ABS_HAT0Y,  0);\n+\tinput_sync(idev);\n+\n+\t/* TODO: - do not hardcode codes and values but\n+\t *         keep them in the mapping structures\n+\t *       - maybe initDevice isn't the right place\n+\t */\n+\n+\treturn 0;\n+}\n+\n+\n+/* Callback function which return the available properties to userspace */\n+static int battery_get_property(struct power_supply *ps,\n+\tenum power_supply_property property, union power_supply_propval *val)\n+{\n+\tstruct xpadneo_devdata *xdata = power_supply_get_drvdata(ps);\n+\tunsigned long flags;\n+\tu8 capacity_level, present, online, status;\n+\n+\tspin_lock_irqsave(&xdata->lock, flags);\n+\tcapacity_level = xdata->ps_capacity_level;\n+\tpresent        = xdata->ps_present;\n+\tonline         = xdata->ps_online;\n+\tstatus         = xdata->ps_status;\n+\tspin_unlock_irqrestore(&xdata->lock, flags);\n+\n+\tswitch (property) {\n+\tcase POWER_SUPPLY_PROP_MANUFACTURER:\n+\t\tval->strval = \"Microsoft\";\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_MODEL_NAME:\n+\t\tval->strval = \"Xbox Wireless Controller\";\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_PRESENT:\n+\t\tval->intval = present;\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_ONLINE:\n+\t\tval->intval = online;\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_SCOPE:\n+\t\tval->intval = POWER_SUPPLY_SCOPE_DEVICE;\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_CAPACITY_LEVEL:\n+\t\tval->intval = capacity_level;\n+\t\tbreak;\n+\tcase POWER_SUPPLY_PROP_STATUS:\n+\t\tval->intval = status;\n+\t\tbreak;\n+\tdefault:\n+\t\treturn -EINVAL;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+\n+static int xpadneo_initBatt(struct hid_device *hdev)\n+{\n+\tint ret = 0;\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\n+\tstatic enum power_supply_property battery_props[] = {\n+\t\t/* is a power supply available? always true */\n+\t\tPOWER_SUPPLY_PROP_PRESENT,\n+\t\t/* critical, low, normal, high, full */\n+\t\tPOWER_SUPPLY_PROP_CAPACITY_LEVEL,\n+\t\t/* powers a specific device */\n+\t\tPOWER_SUPPLY_PROP_SCOPE,\n+\t\t/* charging (full, plugged), not_charging */\n+\t\tPOWER_SUPPLY_PROP_STATUS,\n+\t\t/* cstring - manufacturer name */\n+\t\tPOWER_SUPPLY_PROP_MANUFACTURER,\n+\t\t/* cstring - model name */\n+\t\tPOWER_SUPPLY_PROP_MODEL_NAME,\n+\t\tPOWER_SUPPLY_PROP_ONLINE\n+\t};\n+\n+\n+\tstruct power_supply_config ps_config = {\n+\t\t/* pass the xpadneo_data to the get_property function */\n+\t\t.drv_data = xdata\n+\t};\n+\n+\n+\t/* Set up power supply */\n+\n+\t/* Set the battery capacity to 'full' until we get our first real\n+\t * battery event. Prevents false \"critical low battery\" notifications\n+\t */\n+\txdata->ps_capacity_level = POWER_SUPPLY_CAPACITY_LEVEL_FULL;\n+\n+\t/* NOTE: hdev->uniq is meant to be the MAC address and hence\n+\t *       it should be unique. Unfortunately, here it is not unique\n+\t *       neither is it the bluetooth MAC address.\n+\t *       As a solution we add an unique id for every gamepad.\n+\t */\n+\n+\txdata->batt_desc.name = kasprintf(GFP_KERNEL, \"xpadneo_batt_%pMR_%i\",\n+\t\t\t\thdev->uniq, xdata->id);\n+\tif (!xdata->batt_desc.name)\n+\t\treturn -ENOMEM;\n+\n+\txdata->batt_desc.type = POWER_SUPPLY_TYPE_BATTERY;\n+\n+\t/* Which properties of the battery are accessible? */\n+\txdata->batt_desc.properties = battery_props;\n+\txdata->batt_desc.num_properties = ARRAY_SIZE(battery_props);\n+\n+\t/*\n+\t * We have to offer a function which returns the current\n+\t * property values we defined above. Make sure that\n+\t * the get_property functions covers all properties above.\n+\t */\n+\txdata->batt_desc.get_property = battery_get_property;\n+\n+\n+\t/* Advanced power management emulation */\n+\txdata->batt_desc.use_for_apm = 0;\n+\n+\t/* Register power supply for our gamepad device */\n+\txdata->batt = devm_power_supply_register(&hdev->dev,\n+\t\t\t\t\t\t&xdata->batt_desc, &ps_config);\n+\tif (IS_ERR(xdata->batt)) {\n+\t\tret = PTR_ERR(xdata->batt);\n+\t\thid_err(hdev, \"Unable to register battery device\\n\");\n+\t\tgoto err_free;\n+\t} else {\n+\t\thid_dbg_lvl(DBG_LVL_SOME, hdev, \"battery registered\\n\");\n+\t}\n+\n+\tpower_supply_powers(xdata->batt, &hdev->dev);\n+\n+err_free:\n+\tkfree(xdata->batt_desc.name);\n+\txdata->batt_desc.name = NULL;\n+\n+\treturn ret;\n+}\n+\n+\n+enum mapping_behaviour {\n+\tMAP_IGNORE, /* Completely ignore this field */\n+\tMAP_AUTO,   /* Do not really map it, let hid-core decide */\n+\tMAP_STATIC  /* Map to the values given */\n+};\n+\n+struct input_ev {\n+\t/* Map to which input event (EV_KEY, EV_ABS, ...)? */\n+\tu8 event_type;\n+\t/* Map to which input code (BTN_A, ABS_X, ...)? */\n+\tu16 input_code;\n+};\n+\n+u8 map_hid_to_input_windows(struct hid_usage *usage, struct input_ev *map_to)\n+{\n+\n+\t/*\n+\t * Windows report-descriptor (307 byte):\n+\t *\n+\t * 05 01 09 05 a1 01 85 01 09 01 a1 00 09 30 09 31 15 00 27 ff\n+\t * ff 00 00 95 02 75 10 81 02 c0 09 01 a1 00 09 33 09 34 15 00\n+\t * 27 ff ff 00 00 95 02 75 10 81 02 c0 05 01 09 32 15 00 26 ff\n+\t * 03 95 01 75 0a 81 02 15 00 25 00 75 06 95 01 81 03 05 01 09\n+\t * 35 15 00 26 ff 03 95 01 75 0a 81 02 15 00 25 00 75 06 95 01\n+\t * 81 03 05 01 09 39 15 01 25 08 35 00 46 3b 01 66 14 00 75 04\n+\t * 95 01 81 42 75 04 95 01 15 00 25 00 35 00 45 00 65 00 81 03\n+\t * 05 09 19 01 29 0a 15 00 25 01 75 01 95 0a 81 02 15 00 25 00\n+\t * 75 06 95 01 81 03 05 01 09 80 85 02 a1 00 09 85 15 00 25 01\n+\t * 95 01 75 01 81 02 15 00 25 00 75 07 95 01 81 03 c0 05 0f 09\n+\t * 21 85 03 a1 02 09 97 15 00 25 01 75 04 95 01 91 02 15 00 25\n+\t * 00 75 04 95 01 91 03 09 70 15 00 25 64 75 08 95 04 91 02 09\n+\t * 50 66 01 10 55 0e 15 00 26 ff 00 75 08 95 01 91 02 09 a7 15\n+\t * 00 26 ff 00 75 08 95 01 91 02 65 00 55 00 09 7c 15 00 26 ff\n+\t * 00 75 08 95 01 91 02 c0 85 04 05 06 09 20 15 00 26 ff 00 75\n+\t * 08 95 01 81 02 c0 00\n+\t */\n+\n+\tunsigned int hid_usage = usage->hid & HID_USAGE;\n+\tunsigned int hid_usage_page = usage->hid & HID_USAGE_PAGE;\n+\n+\tswitch (hid_usage_page) {\n+\tcase HID_UP_BUTTON:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0x01:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_A};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x02:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_B};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x03:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_X};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x04:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_Y};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x05:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_TL};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x06:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_TR};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x07:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_SELECT};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x08:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_START};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x09:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_THUMBL};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x0A:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_THUMBR};\n+\t\t\treturn MAP_STATIC;\n+\t\t}\n+\tcase HID_UP_GENDESK:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0x30:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_X};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x31:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_Y};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x32:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_Z};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x33:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RX};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x34:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RY};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x35:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RZ};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x39:\n+\t\t\t*map_to = (struct input_ev){0, 0};\n+\t\t\treturn MAP_AUTO;\n+\t\tcase 0x85:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_MODE};\n+\t\t\treturn MAP_STATIC;\n+\t\t}\n+\t}\n+\n+\treturn MAP_IGNORE;\n+}\n+\n+u8 map_hid_to_input_linux(struct hid_usage *usage, struct input_ev *map_to)\n+{\n+\n+\t/*\n+\t * Linux report-descriptor (335 byte):\n+\t *\n+\t * 05 01 09 05 a1 01 85 01 09 01 a1 00 09 30 09 31 15 00 27 ff\n+\t * ff 00 00 95 02 75 10 81 02 c0 09 01 a1 00 09 32 09 35 15 00\n+\t * 27 ff ff 00 00 95 02 75 10 81 02 c0 05 02 09 c5 15 00 26 ff\n+\t * 03 95 01 75 0a 81 02 15 00 25 00 75 06 95 01 81 03 05 02 09\n+\t * c4 15 00 26 ff 03 95 01 75 0a 81 02 15 00 25 00 75 06 95 01\n+\t * 81 03 05 01 09 39 15 01 25 08 35 00 46 3b 01 66 14 00 75 04\n+\t * 95 01 81 42 75 04 95 01 15 00 25 00 35 00 45 00 65 00 81 03\n+\t * 05 09 19 01 29 0f 15 00 25 01 75 01 95 0f 81 02 15 00 25 00\n+\t * 75 01 95 01 81 03 05 0c 0a 24 02 15 00 25 01 95 01 75 01 81\n+\t * 02 15 00 25 00 75 07 95 01 81 03 05 0c 09 01 85 02 a1 01 05\n+\t * 0c 0a 23 02 15 00 25 01 95 01 75 01 81 02 15 00 25 00 75 07\n+\t * 95 01 81 03 c0 05 0f 09 21 85 03 a1 02 09 97 15 00 25 01 75\n+\t * 04 95 01 91 02 15 00 25 00 75 04 95 01 91 03 09 70 15 00 25\n+\t * 64 75 08 95 04 91 02 09 50 66 01 10 55 0e 15 00 26 ff 00 75\n+\t * 08 95 01 91 02 09 a7 15 00 26 ff 00 75 08 95 01 91 02 65 00\n+\t * 55 00 09 7c 15 00 26 ff 00 75 08 95 01 91 02 c0 85 04 05 06\n+\t * 09 20 15 00 26 ff 00 75 08 95 01 81 02 c0 00\n+\t */\n+\n+\tunsigned int hid_usage = usage->hid & HID_USAGE;\n+\tunsigned int hid_usage_page = usage->hid & HID_USAGE_PAGE;\n+\n+\tswitch (hid_usage_page) {\n+\tcase HID_UP_BUTTON:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0x01:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_A};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x02:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_B};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x04:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_X};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x05:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_Y};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x07:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_TL};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x08:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_TR};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x0C:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_START};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x0E:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_THUMBL};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x0F:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_THUMBR};\n+\t\t\treturn MAP_STATIC;\n+\t\t}\n+\tcase HID_UP_CONSUMER:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0x223:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_MODE};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x224:\n+\t\t\t*map_to = (struct input_ev){EV_KEY, BTN_SELECT};\n+\t\t\treturn MAP_STATIC;\n+\t\t}\n+\tcase HID_UP_GENDESK:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0x30:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_X};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x31:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_Y};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x32:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RX};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x35:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RY};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0x39:\n+\t\t\t*map_to = (struct input_ev){0, 0};\n+\t\t\treturn MAP_AUTO;\n+\t\t}\n+\tcase HID_UP_SIMULATION:\n+\t\tswitch (hid_usage) {\n+\t\tcase 0xC4:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_RZ};\n+\t\t\treturn MAP_STATIC;\n+\t\tcase 0xC5:\n+\t\t\t*map_to = (struct input_ev){EV_ABS, ABS_Z};\n+\t\t\treturn MAP_STATIC;\n+\t\t}\n+\t}\n+\n+\treturn MAP_IGNORE;\n+}\n+\n+\n+/*\n+ * Input Mapping Hook\n+ *\n+ * Invoked at input registering before mapping an usage\n+ * (called once for every hid-usage).\n+ */\n+\n+static int xpadneo_mapping(struct hid_device *hdev, struct hid_input *hi,\n+\t\t\t   struct hid_field *field, struct hid_usage *usage,\n+\t\t\t   unsigned long **bit, int *max)\n+{\n+\t/* Return values */\n+\tenum {\n+\t\tRET_MAP_IGNORE = -1,   /* completely ignore this input */\n+\t\tRET_MAP_AUTO,        /* let hid-core autodetect the mapping */\n+\t\tRET_MAP_STATIC       /* mapped by hand, no further processing */\n+\t};\n+\n+\tstruct input_ev map_to;\n+\tu8 (*perform_mapping)(struct hid_usage *usage, struct input_ev *map_to);\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\n+\n+\tswitch (xdata->report_descriptor) {\n+\tcase LINUX:\n+\t\tperform_mapping = map_hid_to_input_linux;\n+\t\tbreak;\n+\tcase WINDOWS:\n+\t\tperform_mapping = map_hid_to_input_windows;\n+\t\tbreak;\n+\tdefault:\n+\t\treturn RET_MAP_AUTO;\n+\t}\n+\n+\n+\tswitch (perform_mapping(usage, &map_to)) {\n+\tcase MAP_AUTO:\n+\t\thid_dbg_lvl(DBG_LVL_FEW, hdev,\n+\t\t\"UP: 0x%04X, USG: 0x%04X -> automatically\\n\",\n+\t\tusage->hid & HID_USAGE_PAGE, usage->hid & HID_USAGE);\n+\n+\t\treturn RET_MAP_AUTO;\n+\n+\tcase MAP_IGNORE:\n+\t\thid_dbg_lvl(DBG_LVL_FEW, hdev,\n+\t\t\"UP: 0x%04X, USG: 0x%04X -> ignored\\n\",\n+\t\tusage->hid & HID_USAGE_PAGE, usage->hid & HID_USAGE);\n+\n+\t\treturn RET_MAP_IGNORE;\n+\n+\tcase MAP_STATIC:\n+\t\thid_dbg_lvl(DBG_LVL_FEW, hdev,\n+\t\t\"UP: 0x%04X, USG: 0x%04X -> EV: 0x%03X, INP: 0x%03X\\n\",\n+\t\tusage->hid & HID_USAGE_PAGE, usage->hid & HID_USAGE,\n+\t\tmap_to.event_type, map_to.input_code);\n+\n+\t\thid_map_usage_clear(hi, usage, bit, max,\n+\t\t\t\t\tmap_to.event_type, map_to.input_code);\n+\t\treturn RET_MAP_STATIC;\n+\n+\t}\n+\n+\t/* Something went wrong, ignore this field */\n+\treturn RET_MAP_IGNORE;\n+}\n+\n+\n+/*\n+ * Report Descriptor Fixup Hook\n+ *\n+ * You can either modify the original report in place and just\n+ * return the original start address (rdesc) or you reserve a new\n+ * one and return a pointer to it. In the latter, you mostly have to\n+ * modify the rsize value too.\n+ */\n+\n+static u8 *xpadneo_report_fixup(struct hid_device *hdev, u8 *rdesc,\n+\t\t\t\tunsigned int *rsize)\n+{\n+\thid_dbg_lvl(DBG_LVL_SOME, hdev,\t\"REPORT (DESCRIPTOR) FIXUP HOOK\\n\");\n+\tdbg_hex_dump_lvl(DBG_LVL_FEW, \"xpadneo: report-descr: \", rdesc, *rsize);\n+\n+\treturn rdesc;\n+}\n+\n+\n+static void parse_raw_event_battery(struct hid_device *hdev, u8 *data,\n+\t\t\t\t    int reportsize)\n+{\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\tunsigned long flags;\n+\tu8 capacity_level, present, online, status;\n+\n+\n+\t/*  msb          ID 04          lsb\n+\t * +---+---+---+---+---+---+---+---+\n+\t * | O | R | E | C | M | M | L | L |\n+\t * +---+---+---+---+---+---+---+---+\n+\t *\n+\t * O: Online\n+\t * R: Reserved / Unused\n+\t * E: Error (?) / Unknown\n+\t * C: Charging, I mean really charging the battery (P 'n C)\n+\t *              not (only) the power cord powering the controller\n+\t * M M: Mode\n+\t *   00: Powered by USB\n+\t *   01: Powered by (disposable) batteries\n+\t *   10: Powered by Play 'n Charge battery pack (only, no cable)\n+\t * L L: Capacity Level\n+\t *   00: (Super) Critical\n+\t *   01: Low\n+\t *   10: Medium\n+\t *   11: Full\n+\t */\n+\n+\n+\t/* I think \"online\" means whether the dev is online or shutting down */\n+\tonline = (data[1] & 0x80) >> 7;\n+\n+\t/* The _battery_ is only present if not powered by USB */\n+\tpresent = ((data[1] & 0x0C) != 0x00);\n+\n+\t/* Capacity level, only valid as long as the battery is present */\n+\tswitch (data[1] & 0x03) {\n+\tcase 0x00:\n+\t\tcapacity_level = POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL;\n+\t\tbreak;\n+\tcase 0x01:\n+\t\tcapacity_level = POWER_SUPPLY_CAPACITY_LEVEL_LOW;\n+\t\tbreak;\n+\tcase 0x02:\n+\t\tcapacity_level = POWER_SUPPLY_CAPACITY_LEVEL_NORMAL;\n+\t\tbreak;\n+\tcase 0x03:\n+\t\tcapacity_level = POWER_SUPPLY_CAPACITY_LEVEL_HIGH;\n+\t\tbreak;\n+\t}\n+\n+\t/* Is the (Play 'n Charge) battery charging right now? */\n+\tswitch ((data[1] & 0x10) >> 4) {\n+\tcase 0:\n+\t\tstatus = POWER_SUPPLY_STATUS_DISCHARGING;\n+\t\tbreak;\n+\tcase 1:\n+\t\tstatus = POWER_SUPPLY_STATUS_CHARGING;\n+\t\tbreak;\n+\t}\n+\n+\tspin_lock_irqsave(&xdata->lock, flags);\n+\txdata->ps_status = status;\n+\txdata->ps_capacity_level = capacity_level;\n+\txdata->ps_online = online;\n+\txdata->ps_present = present;\n+\tspin_unlock_irqrestore(&xdata->lock, flags);\n+\n+\tpower_supply_changed(xdata->batt);\n+}\n+\n+static void check_report_behaviour(struct hid_device *hdev, u8 *data,\n+\t\t\t\t   int reportsize)\n+{\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\n+\t/*\n+\t * The length of the first input report with an ID of 0x01\n+\t * reveals which report-type the controller is actually\n+\t * sending (windows: 16, or linux: 17).\n+\t */\n+\tif (xdata->report_behaviour == UNKNOWN) {\n+\t\tswitch (reportsize) {\n+\t\tcase 16:\n+\t\t\txdata->report_behaviour = WINDOWS;\n+\t\t\tbreak;\n+\t\tcase 17:\n+\t\t\txdata->report_behaviour = LINUX;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\txdata->report_behaviour = UNKNOWN;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\thid_dbg_lvl(DBG_LVL_SOME, hdev, \"desc: %s, beh: %s\\n\",\n+\t\treport_type_text[xdata->report_descriptor],\n+\t\treport_type_text[xdata->report_behaviour]);\n+\n+\t/* TODO:\n+\t * Maybe the best solution would be to replace the report descriptor\n+\t * in case that the wrong reports are sent. Unfortunately we do not\n+\t * know if the report descriptor is the right one until the first\n+\t * report is sent to us. At this time, the report_fixup hook is\n+\t * already over and the original descriptor is parsed into hdev\n+\t * i.e. report_enum and collection.\n+\t *\n+\t * The next best solution would be to replace the report with\n+\t * ID 0x01 with the right one in report_enum (and collection?).\n+\t * I don't know yet how this would works, perhaps like this:\n+\t * - create a new report struct\n+\t * - fill it by hand\n+\t * - add all neccessary fields (automatic way?)\n+\t *\n+\t * Another way to fix it is:\n+\t * - Register another report with a _new_ ID by hand\n+\t *   (unfortunately we cannot use the same id again)\n+\t * - in raw_event: change the ID from 0x01 to the new one if\n+\t *   necessary. leave it if not.\n+\t *\n+\t * What we currently do is:\n+\t * We examine every report and fire the input events by hand.\n+\t * That's not very generic.\n+\t *\n+\t */\n+\n+\n+\t// TODO:\n+\t// * remove old report using list operations\n+\t// * create new one like they do in hid_register_report\n+\t// * add it to output_reports->report_list and array\n+\n+}\n+\n+/*\n+ * HID Raw Event Hook\n+ */\n+\n+int xpadneo_raw_event(struct hid_device *hdev, struct hid_report *report,\n+\t\t      u8 *data, int reportsize)\n+{\n+\t/* Return Codes */\n+\tenum {\n+\t\tRAWEV_CONT_PROCESSING, /* Let the hid-core autodetect the event */\n+\t\tRAWEV_STOP_PROCESSING  /* Stop further processing */\n+\t};\n+\n+\t//hid_dbg_lvl(DBG_LVL_SOME, hdev, \"RAW EVENT HOOK\\n\");\n+\n+\tdbg_hex_dump_lvl(DBG_LVL_SOME, \"xpadneo: raw_event: \", data, reportsize);\n+\t//hid_dbg_lvl(DBG_LVL_ALL, hdev, \"report->size: %d\\n\", (report->size)/8);\n+\t//hid_dbg_lvl(DBG_LVL_ALL, hdev, \"data size (wo id): %d\\n\", reportsize-1);\n+\n+\n+\tswitch (report->id) {\n+\tcase 01:\n+\t\tcheck_report_behaviour(hdev, data, reportsize);\n+\t\tbreak;\n+\tcase 04:\n+\t\tparse_raw_event_battery(hdev, data, reportsize);\n+\t\treturn RAWEV_STOP_PROCESSING;\n+\t}\n+\n+\t/* Continue processing */\n+\treturn RAWEV_CONT_PROCESSING;\n+}\n+\n+\n+void xpadneo_report(struct hid_device *hdev, struct hid_report *report)\n+{\n+\thid_dbg_lvl(DBG_LVL_SOME, hdev, \"REPORT HOOK\\n\");\n+}\n+\n+\n+/*\n+ * Input Configured Hook\n+ *\n+ * We have to fix up the key-bitmap, because there is\n+ * no DPAD_UP, _RIGHT, _DOWN, _LEFT on the device by default\n+ *\n+ */\n+\n+static int xpadneo_input_configured(struct hid_device *hdev,\n+\t\t\t\t    struct hid_input *hi)\n+{\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\n+\t/* set a pointer to the logical input device at the device structure */\n+\txdata->idev = hi->input;\n+\n+\thid_dbg_lvl(DBG_LVL_SOME, hdev, \"INPUT CONFIGURED HOOK\\n\");\n+\n+\tif (param_fake_dev_version) {\n+\t\txdata->idev->id.version = (u16) param_fake_dev_version;\n+\t\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"Fake device version: 0x%04X\\n\",\n+\t\t\tparam_fake_dev_version);\n+\t}\n+\n+\n+\t// The HID device descriptor defines a range from 0 to 65535 for all\n+\t// absolute axis (like ABS_X), this is in contrary to what the linux\n+\t// gamepad specification defines [–32.768; 32.767].\n+\t// Therefore, we have to set the min, max, fuzz and flat values by hand:\n+\n+\tinput_set_abs_params(xdata->idev, ABS_X, -32768, 32767, 255, 4095);\n+\tinput_set_abs_params(xdata->idev, ABS_Y, -32768, 32767, 255, 4095);\n+\n+\tinput_set_abs_params(xdata->idev, ABS_RX, -32768, 32767, 255, 4095);\n+\tinput_set_abs_params(xdata->idev, ABS_RY, -32768, 32767, 255, 4095);\n+\n+\tif (param_combined_z_axis)\n+\t\tinput_set_abs_params(xdata->idev, ABS_Z, -1024, 1023, 3, 63);\n+\n+\t// furthermore, we need to translate the incoming events to fit within\n+\t// the new range, we will do that in the xpadneo_event() hook.\n+\n+\t// We remove the ABS_RZ event if param_combined_z_axis is enabled\n+\tif (param_combined_z_axis) {\n+\t\t__clear_bit(ABS_RZ, xdata->idev->absbit);\n+\t}\n+\n+\treturn 0;\n+}\n+\n+\n+/*\n+ * Event Hook\n+ *\n+ * This hook is called whenever an event occurs that is listed on\n+ * xpadneo_driver.usage_table (which is NULL in our case, therefore it is\n+ * invoked on every event).\n+ *\n+ * Before we can send additional input events, we have to enable\n+ * the corresponding keys in xpadneo_input_configured.\n+ */\n+\n+int xpadneo_event(struct hid_device *hdev, struct hid_field *field,\n+\t\t  struct hid_usage *usage, __s32 value)\n+{\n+\t/* Return Codes */\n+\tenum {\n+\t\tEV_CONT_PROCESSING, /* Let the hid-core autodetect the event */\n+\t\tEV_STOP_PROCESSING  /* Stop further processing */\n+\t};\n+\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\tstruct input_dev *idev = xdata->idev;\n+\n+\tu16 usg_type = usage->type;\n+\tu16 usg_code = usage->code;\n+\n+\n+\thid_dbg_lvl(DBG_LVL_ALL, hdev,\n+\t\t\"hid-up: %02x, hid-usg: %02x, input-code: %02x, value: %02x\\n\",\n+\t\t(usage->hid & HID_USAGE_PAGE), (usage->hid & HID_USAGE),\n+\t\tusage->code, value);\n+\n+\n+\t// we have to shift the range of the analogues sticks (ABS_X/Y/RX/RY)\n+\t// as already explained in xpadneo_input_configured() above\n+\t// furthermore we need to combine ABS_Z and ABS_RZ if param_combined_z_axis\n+\t// is set\n+\n+\tif (usg_type == EV_ABS) {\n+\t\tif (usg_code == ABS_X || usg_code == ABS_Y\n+\t\t\t\t|| usg_code == ABS_RX || usg_code == ABS_RY) {\n+\t\t\thid_dbg_lvl(DBG_LVL_ALL, hdev, \"shifted axis %02x, old value: %i, new value: %i\\n\", usg_code, value, value - 32768);\n+\t\t\tinput_report_abs(idev, usg_code, value - 32768);\n+\t\t\tgoto sync_and_stop_processing;\n+\t\t}\n+\n+\t\tif (param_combined_z_axis) {\n+\t\t\tif (usg_code == ABS_Z || usg_code == ABS_RZ) {\n+\t\t\t\tif (usg_code == ABS_Z)\n+\t\t\t\t\txdata->last_abs_z = value;\n+\t\t\t\tif (usg_code == ABS_RZ)\n+\t\t\t\t\txdata->last_abs_rz = value;\n+\n+\t\t\t\tinput_report_abs(idev, ABS_Z, 0 - xdata->last_abs_z + xdata->last_abs_rz);\n+\t\t\t\tgoto sync_and_stop_processing;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\n+\n+\n+\t/* TODO:\n+\t * This is a workaround for the wrong report (Windows report but\n+\t * Linux descriptor). We would prefer to fixup the descriptor, but we\n+\t * cannot fix it anymore at the time we recognize the wrong behaviour,\n+\t * hence we will fire the input events by hand.\n+\t */\n+\n+\tif (xdata->report_behaviour == WINDOWS\n+\t\t\t\t\t&& xdata->report_descriptor == LINUX) {\n+\n+\t\t/*\n+\t\t * we fix all buttons by hand. You may think that we\n+\t\t * could do that by using the windows_map too, but it is more\n+\t\t * like an coincidence that this would work in this case:\n+\t\t * It would only, because HID_UP_BUTTONS has no special names\n+\t\t * for the HID_USAGE's, therefore the first button stays 0x01\n+\t\t * on both reports (windows and linux) - it is a 1: 1 mapping.\n+\t\t * But this is not true in general (i.e. for other USAGE_PAGES)\n+\t\t */\n+\n+\t\tif ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) {\n+\t\t\tswitch (usage->hid & HID_USAGE) {\n+\t\t\tcase 0x01:\n+\t\t\t\tinput_report_key(idev, BTN_A, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x02:\n+\t\t\t\tinput_report_key(idev, BTN_B, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x03:\n+\t\t\t\tinput_report_key(idev, BTN_X, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x04:\n+\t\t\t\tinput_report_key(idev, BTN_Y, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x05:\n+\t\t\t\tinput_report_key(idev, BTN_TL, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x06:\n+\t\t\t\tinput_report_key(idev, BTN_TR, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x07:\n+\t\t\t\tinput_report_key(idev, BTN_SELECT, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x08:\n+\t\t\t\tinput_report_key(idev, BTN_START, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x09:\n+\t\t\t\tinput_report_key(idev, BTN_THUMBL, value);\n+\t\t\t\tbreak;\n+\t\t\tcase 0x0A:\n+\t\t\t\tinput_report_key(idev, BTN_THUMBR, value);\n+\t\t\t\tbreak;\n+\t\t\t}\n+\n+\t\t\thid_dbg_lvl(DBG_LVL_ALL, hdev,\n+\t\t\t\t\"hid-upage: %02x, hid-usage: %02x fixed\\n\",\n+\t\t\t\t(usage->hid & HID_USAGE_PAGE),\n+\t\t\t\t(usage->hid & HID_USAGE));\n+\n+\t\t\tgoto sync_and_stop_processing;\n+\t\t}\n+\t}\n+\n+\treturn EV_CONT_PROCESSING;\n+\n+sync_and_stop_processing:\n+\tinput_sync(idev);\n+\treturn EV_STOP_PROCESSING;\n+\n+}\n+\n+\n+/* Device Probe and Remove Hook */\n+\n+static int xpadneo_probe_device(struct hid_device *hdev,\n+\t\t\t\tconst struct hid_device_id *id)\n+{\n+\tint ret;\n+\tstruct xpadneo_devdata *xdata;\n+\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"probing device: %s\\n\", hdev->name);\n+\n+\n+\t/*\n+\t * Create a per-device data structure which is \"nearly globally\" accessible\n+\t * through hid_get_drvdata. The structure is freed automatically\n+\t * as soon as hdev->dev (the device) is removed, since we use the devm_\n+\t * derivate.\n+\t */\n+\txdata = devm_kzalloc(&hdev->dev, sizeof(*xdata), GFP_KERNEL);\n+\tif (xdata == NULL)\n+\t\treturn -ENOMEM;\n+\n+\txdata->id = ida_simple_get(&xpadneo_device_id_allocator,\n+\t\t\t0, 0, GFP_KERNEL);\n+\n+\txdata->hdev = hdev;\n+\n+\t/* Unknown until first report with ID 01 arrives (see raw_event) */\n+\txdata->report_behaviour = UNKNOWN;\n+\n+\tswitch (hdev->dev_rsize) {\n+\tcase 307:\n+\t\txdata->report_descriptor = WINDOWS;\n+\t\tbreak;\n+\tcase 335:\n+\t\txdata->report_descriptor = LINUX;\n+\t\tbreak;\n+\tdefault:\n+\t\txdata->report_descriptor = UNKNOWN;\n+\t\tbreak;\n+\t}\n+\n+\thid_set_drvdata(hdev, xdata);\n+\n+\n+\t/* Parse the raw report (includes a call to report_fixup) */\n+\tret = hid_parse(hdev);\n+\tif (ret) {\n+\t\thid_err(hdev, \"parse failed\\n\");\n+\t\tgoto return_error;\n+\t}\n+\n+\t/* Debug Output*/\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"driver:\\n\");\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* version: %s\\n\", DRV_VER);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"hdev:\\n\");\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* raw rdesc: (unfixed, see above)\\n\");\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* raw rsize: %u\\n\", hdev->dev_rsize);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* bus: 0x%04X\\n\", hdev->bus);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* report group: %u\\n\", hdev->group);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* vendor: 0x%08X\\n\", hdev->vendor);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* version: 0x%08X\\n\", hdev->version);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* product: 0x%08X\\n\", hdev->product);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* country: %u\\n\", hdev->country);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* driverdata: %lu\\n\", id->driver_data);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* serial: %pMR\\n\", hdev->uniq);\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"* physical location: %pMR\\n\", hdev->phys);\n+\n+\t/* We start our hardware without FF, we will add it afterwards by hand\n+\t * HID_CONNECT_DEFAULT = (HID_CONNECT_HIDINPUT | HID_CONNECT_HIDRAW\n+\t *                        | HID_CONNECT_HIDDEV | HID_CONNECT_FF)\n+\t * Our Input Device is created automatically since we defined\n+\t * HID_CONNECT_HIDINPUT as one of the flags.\n+\t */\n+\tret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF);\n+\tif (ret) {\n+\t\thid_err(hdev, \"hw start failed\\n\");\n+\t\tgoto return_error;\n+\t}\n+\n+\t/* Call the device initialization routines */\n+\tret = xpadneo_initDevice(hdev);\n+\tif (ret) {\n+\t\thid_err(hdev, \"device initialization failed\\n\");\n+\t\tgoto return_error;\n+\t}\n+\n+\tret = xpadneo_initBatt(hdev);\n+\tif (ret) {\n+\t\thid_err(hdev, \"battery initialization failed\\n\");\n+\t\tgoto return_error;\n+\t}\n+\n+\n+\t/* Everything is fine */\n+\treturn 0;\n+\n+return_error:\n+\treturn ret;\n+}\n+\n+\n+static void xpadneo_remove_device(struct hid_device *hdev)\n+{\n+\tstruct xpadneo_devdata *xdata = hid_get_drvdata(hdev);\n+\n+\thid_hw_close(hdev);\n+\n+\t/* Cleaning up here */\n+\tida_simple_remove(&xpadneo_device_id_allocator, xdata->id);\n+\n+\thid_hw_stop(hdev);\n+\n+\thid_dbg_lvl(DBG_LVL_FEW, hdev, \"Goodbye %s!\\n\", hdev->name);\n+}\n+\n+\n+\n+/*\n+ * Device ID Structure, define all supported devices here\n+ */\n+\n+static const struct hid_device_id xpadneo_devices[] = {\n+\n+\t/*\n+\t * The ProductID is somehow related to the Firmware Version,\n+\t * but it somehow changed back from 0x02FD (newer fw) to 0x02E0 (older)\n+\t * and vice versa on one controller here.\n+\t *\n+\t * Unfortunately you cannot tell from product id how the gamepad really\n+\t * behaves on reports, since the newer firmware supports both mappings\n+\t * (the one which is standard in linux and the old one, which is still\n+\t * used in windows).\n+\t */\n+\n+\t/* XBOX ONE S / X */\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, 0x02FD) },\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, 0x02E0) },\n+\t/* SENTINEL VALUE, indicates the end*/\n+\t{ }\n+};\n+\n+static struct hid_driver xpadneo_driver = {\n+\t/* The name of the driver */\n+\t.name = \"xpadneo\",\n+\n+\t/* Which devices is this driver for */\n+\t.id_table = xpadneo_devices,\n+\n+\t/* Hooked as the input device is configured (before it is registered)\n+\t * we need that because we do not configure the input-device ourself\n+\t * but leave it up to hid_hw_start()\n+\t */\n+\t.input_configured = xpadneo_input_configured,\n+\n+\t/* Invoked on input registering before mapping an usage */\n+\t.input_mapping = xpadneo_mapping,\n+\n+\t/* If usage in usage_table, this hook is called */\n+\t.event = xpadneo_event,\n+\n+\t/* Called before report descriptor parsing (NULL means nop) */\n+\t.report_fixup = xpadneo_report_fixup,\n+\n+\t/* Called when a new device is inserted */\n+\t.probe = xpadneo_probe_device,\n+\n+\t/* Called when a device is removed */\n+\t.remove = xpadneo_remove_device,\n+\n+\t/* If report in report_table, this hook is called */\n+\t.raw_event = xpadneo_raw_event,\n+\n+\t.report = xpadneo_report\n+};\n+\n+MODULE_DEVICE_TABLE(hid, xpadneo_devices);\n+\n+\n+\n+/*\n+ * Module Init and Exit\n+ *\n+ * We may replace init and remove by module_hid_driver(xpadneo_driver)\n+ * in future versions, as long as there is nothing special in these two\n+ * functions (but registering and unregistering the driver). Up to now it is\n+ * more useful for us to not \"oversimplify\" the whole driver-registering thing.\n+ *\n+ * Caution: do not use both! (module_hid_driver and hid_(un)register_driver)\n+ */\n+\n+static int __init xpadneo_initModule(void)\n+{\n+\tpr_info(\"%s: hello there!\\n\", xpadneo_driver.name);\n+\n+\treturn hid_register_driver(&xpadneo_driver);\n+}\n+\n+static void __exit xpadneo_exitModule(void)\n+{\n+\thid_unregister_driver(&xpadneo_driver);\n+\n+\tida_destroy(&xpadneo_device_id_allocator);\n+\n+\tpr_info(\"%s: goodbye!\\n\", xpadneo_driver.name);\n+}\n+\n+/*\n+ * Tell the driver system which functions to call at initialization and\n+ * removal of the module\n+ */\n+module_init(xpadneo_initModule);\n+module_exit(xpadneo_exitModule);\n--\n2.17.1\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/bootloader/LePotato_boot.ini",
    "content": "LIBRETECH-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootrootfs \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\nsetenv coreelec \"quiet\"\nsetenv hdmi_cec \"1\"\nsetenv wol \"1\"\nsetenv emmc_timeout \"0\"\nsetenv uenv_addr 0x13000000\n\nshowlogo 1080p60hz 1920 1080 boot-logo-1080.bmp.gz\n\nfatload mmc ${mmc_dev}:1 ${loadaddr} kernel.img\nfatload mmc ${mmc_dev}:1 ${dtb_mem_addr} dtb.img\n\nif fatload mmc ${mmc_dev}:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nif test \"${emmc_timeout}\" = \"1\"; then showlogo 1080p60hz 1920 1080 timeout-logo-1080.bmp.gz; sleep 30; mmc dev 1; mmc dev 0; fi\n\nsetenv libretech \"logo=osd1,loaded,0x3f800000,1080p60hz vout=1080p60hz,enable vout_mode=hdmi hdmimode=1080p60hz cvbsmode=nocvbs consoleblank=0\"\nif test \"${hdmi_cec}\" = \"1\"; then setenv cec \"hdmitx=cec3f\"; fi\nsetenv bootargs \"${consoltopt} ${bootrootfs} ${libretech} ${cec} ${coreelec}\"\n\n# Device tree modifications\nbootm start\nbootm loados\nbootm fdt\nif test \"${wol}\" = \"1\"; then fdt set \"/ethernet@0xc9410000\" wol <1>; else fdt set \"/ethernet@0xc9410000\" wol <0>; fi\nbootm prep\n\n# Boot the board\nbootm go\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/bootloader/Odroid_C2_boot.ini",
    "content": "ODROIDC2-UBOOT-CONFIG\n\n#------------------------------------------------------------------------------------------------------\n#\n# boot.ini\n#\n# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST WITH THE NEXT UPDATE!\n# Set your own settings in config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\nsetenv bootrootfs \"BOOT_IMAGE=kernel.img boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@\"\nsetenv consoleopt \"console=ttyS0,115200 console=tty0 no_console_suspend\"\nsetenv coreelec \"quiet\"\nsetenv hdmi_cec \"1\"\nsetenv max_freq \"1536\"\nsetenv rtc_shield \"0\"\n\nsetenv loadaddr 0x11000000\nsetenv dtb_mem_addr 0x1000000\nsetenv uenv_addr 0x13000000\n\nfatload mmc 0:1 ${loadaddr} kernel.img\nfatload mmc 0:1 ${dtb_mem_addr} dtb.img\n\nif fatload mmc 0:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi\n\nsetenv device \"logo=osd1,loaded,0x3f800000,1080p60hz vout=1080p60hz,enable vout_mode=hdmi hdmimode=1080p60hz cvbsmode=nocvbs mac=${ethaddr} consoleblank=0 max_freq=${max_freq}\"\nif test \"${hdmi_cec}\" = \"1\"; then setenv cec \"hdmitx=cec3f\"; fi\nsetenv bootargs \"${consoleopt} ${bootrootfs} ${device} ${cec} ${coreelec}\"\n\n# Device tree modifications\nbootm start\nbootm loados\nbootm fdt\nif test \"${rtc_shield}\" = \"1\"; then fdt set \"/i2c@c1108500/pcf8563@51\" status okay; else fdt set \"/i2c@c1108500/pcf8563@51\" status disabled; fi\n# Remove aml partition layout from device tree (required for eMMC boot)\nfdt rm /partitions\nbootm prep\n\n# Boot the board\nbootm go\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/bootloader/canupdate.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.tv)\n\n# Detect newer kernel installs and abort to prevent downgrades\nif [ \"$(uname -r)\" != \"3.14.29\" ]; then\n    echo \"Downgrading to 3.14 kernel is not supported!\"\n    sleep 10\n    exit 1\nfi\n\ncase $1 in\n   @PROJECT@|S905*|S912*)\n       exit 0\n    ;;\n   *)\n       exit 1\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/bootloader/config.ini",
    "content": "#------------------------------------------------------------------------------------------------------\n#\n# config.ini\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# Console Setup\n#\n# consoleopt='console=ttyS0,115200 console=tty0 no_console_suspend'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# CPU Frequency Control\n#\n# WARNING!!! WARNING!!! WARNING!!!\n#   Before changing anything here please read the wiki entry at:\n#   http://odroid.com/dokuwiki/doku.php?id=en:c2_set_cpu_freq\n#\n# max_freq='1536'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# HDMI CEC Control, 0=disable/1=enable\n#\n# hdmi_cec='1'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# RTC Shield Control for Odroid C2, 0=off/1=on\n#\n# rtc_shield='0'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# WOL Setting for LePotato, 0=off/1=on\n#\n# wol='1'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# EMMC Timeout for LePotato\n#   BL1 is configured to boot from eMMC before SD-card, this option is useful if you have another OS\n#   installed on to an eMMC as it will delay bootup by 30s allowing you to boot from an SD-card and\n#   attach the eMMC during this time, u-boot will then boot from the SD-card and the eMMC will be\n#   be available to the OS allowing you to use installtoemmc or browse the eMMC contents.\n#\n# emmc_timeout='1'\n#\n#------------------------------------------------------------------------------------------------------\n\n#------------------------------------------------------------------------------------------------------\n#\n# CoreELEC Developer Options\n#   Valid options are: textmode debugging progress nofsck nosplash noram overlay quiet ssh\n#\n# coreelec='quiet'\n#\n#------------------------------------------------------------------------------------------------------\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/bootloader/dtb.conf",
    "content": "<dtb>\n</dtb>\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/bootloader/mkbootimg",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nDTBIMG_PATH=\"arch/$TARGET_KERNEL_ARCH/boot\"\nDTB_PATH=\"${DTBIMG_PATH}/dts/amlogic\"\nANDROID_BOOTIMG_SECOND=\"\"\n\nSUBDEVICES+=\" Generic\"\nfor device in $SUBDEVICES; do\n  DTB_BLOBS_PATH=${DTB_PATH}/${device}\n  mkdir -p ${DTB_BLOBS_PATH}\n  if [ \"$device\" = \"Generic\" ]; then\n    for dtblob in $KERNEL_UBOOT_EXTRA_TARGET; do\n      cp ${DTB_PATH}/$dtblob ${DTB_BLOBS_PATH} 2>/dev/null || :\n    done\n  else\n    cp ${DTB_PATH}/*${device,,}.dtb ${DTB_BLOBS_PATH} 2>/dev/null || :\n  fi\n  DTB_BLOBS=($(ls ${DTB_BLOBS_PATH}/*.dtb 2>/dev/null || true))\n  DTB_BLOBS_COUNT=${#DTB_BLOBS[@]}\n  DTB_BLOB_OUTPUT=${DTBIMG_PATH}/${device}_dtb.img\n  if [ \"$DTB_BLOBS_COUNT\" -gt 1 ]; then\n    $TOOLCHAIN/bin/dtbTool -o ${DTB_BLOB_OUTPUT} -p scripts/dtc/ ${DTB_BLOBS_PATH}\n  elif [ \"$DTB_BLOBS_COUNT\" -eq 1 ]; then\n    cp -PR $DTB_BLOBS $DTB_BLOB_OUTPUT\n  fi\ndone\n\nif [ -f ${DTBIMG_PATH}/Generic_dtb.img ]; then\n  ANDROID_BOOTIMG_SECOND=\"--second ${DTBIMG_PATH}/Generic_dtb.img\"\nfi\n\nLDFLAGS=\"\" mkbootimg --kernel arch/$TARGET_KERNEL_ARCH/boot/$KERNEL_TARGET --ramdisk $BUILD/image/initramfs.cpio \\\n  $ANDROID_BOOTIMG_SECOND $ANDROID_BOOTIMG_OPTIONS --output arch/$TARGET_KERNEL_ARCH/boot/boot.img\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/bootloader/mkimage",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\n# copy amlogic autoscript files to part1 for Generic img only\nif [ \"${SUBDEVICE}\" == \"Generic\" ]; then\n  for f in $RELEASE_DIR/3rdparty/bootloader/*autoscript; do\n    [ -e \"$f\" ] && mcopy \"$f\" ::\n  done\nfi\n\n# copy device trees to part1\nfor dtb in $RELEASE_DIR/3rdparty/bootloader/device_trees $RELEASE_DIR/3rdparty/bootloader/*.dtb $RELEASE_DIR/3rdparty/bootloader/dtb.img ; do\n  [ -e \"$dtb\" ] && mcopy -s \"$dtb\" ::\ndone\n\nif [ -n ${SUBDEVICE} ]; then\n  if [ -f \"$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_dtb.img\" ]; then\n    mcopy $RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_dtb.img \"::/dtb.img\"\n  fi\n  if [ -f \"$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_u-boot\" ]; then\n    echo \"Writing u-boot to $(basename $DISK)\"\n    dd if=\"$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_u-boot\" of=\"$DISK\" conv=fsync,notrunc bs=1 count=112 >\"$SAVE_ERROR\" 2>&1 || show_error\n    dd if=\"$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_u-boot\" of=\"$DISK\" conv=fsync,notrunc bs=512 skip=1 seek=1 >\"$SAVE_ERROR\" 2>&1 || show_error\n  fi\n\n  if [ -f \"$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_boot.ini\" ]; then\n    cp -p \"$RELEASE_DIR/3rdparty/bootloader/${SUBDEVICE}_boot.ini\" \"$LE_TMP/boot.ini\"\n    sed -e \"s/@BOOT_UUID@/$UUID_SYSTEM/\" \\\n        -e \"s/@DISK_UUID@/$UUID_STORAGE/\" \\\n        -i \"$LE_TMP/boot.ini\"\n    mcopy \"$LE_TMP/boot.ini\" ::\n    if [ -f \"$RELEASE_DIR/3rdparty/bootloader/config.ini\" ]; then\n      mcopy $RELEASE_DIR/3rdparty/bootloader/config.ini ::\n    fi\n  fi\n\n  if [ \"${SUBDEVICE}\" == \"Odroid_C2\" ]; then\n    if [ -f \"$RELEASE_DIR/3rdparty/bootloader/boot-logo.bmp.gz\" ]; then\n      mcopy $RELEASE_DIR/3rdparty/bootloader/boot-logo.bmp.gz ::\n    fi\n  fi\n\n  if [ \"${SUBDEVICE}\" == \"LePotato\" ]; then\n    if [ -f \"$RELEASE_DIR/3rdparty/bootloader/boot-logo-1080.bmp.gz\" ]; then\n      mcopy $RELEASE_DIR/3rdparty/bootloader/boot-logo-1080.bmp.gz ::\n    fi\n    if [ -f \"$RELEASE_DIR/3rdparty/bootloader/timeout-logo-1080.bmp.gz\" ]; then\n      mcopy $RELEASE_DIR/3rdparty/bootloader/timeout-logo-1080.bmp.gz ::\n    fi\n  fi\nfi\n\n# Include older alternative kernel for Amlogic-old\n  mcopy $RELEASE_DIR/3rdparty/bootloader/old_ee_3.14_kernel.7z ::\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/bootloader/release",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018 Team LibreELEC (https://libreelec.tv)\n\nmkdir -p $RELEASE_DIR/3rdparty/bootloader\n  cp -a $INSTALL/usr/share/bootloader/* $RELEASE_DIR/3rdparty/bootloader\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/bootloader/scripts/aml_autoscript.src",
    "content": "defenv\nsetenv bootfromnand 0\nsetenv upgrade_step 2\nsetenv sddtb 'if fatload mmc 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi'\nsetenv usbdtb 'if fatload usb 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi'\nsetenv bootfromsd 'mmcinfo; if fatload mmc 0 ${loadaddr} kernel.img; then run sddtb; setenv bootargs ${bootargs} bootfromsd; bootm; fi'\nsetenv bootfromusb 'usb start 0; if fatload usb 0 ${loadaddr} kernel.img; then run usbdtb; setenv bootargs ${bootargs} bootfromusb; bootm; fi'\nsetenv bootcmd 'if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; else run bootfromsd; run bootfromusb; fi; run storeboot'\nsaveenv\nrun storeargs\nrun bootfromsd\nrun bootfromusb\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/bootloader/update.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\n[ -z \"$SYSTEM_ROOT\" ] && SYSTEM_ROOT=\"\"\n[ -z \"$BOOT_ROOT\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"$BOOT_PART\" ] && BOOT_PART=$(df \"$BOOT_ROOT\" | tail -1 | awk {' print $1 '})\n\nif [ -z \"$BOOT_DISK\" ]; then\n  case $BOOT_PART in\n    /dev/sd[a-z][0-9]*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,[0-9]*,,g\")\n      ;;\n    /dev/mmcblk*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,p[0-9]*,,g\")\n      ;;\n  esac\nfi\n\nmount -o rw,remount $BOOT_ROOT\n\nSUBDEVICE=\"\"\n\nfor arg in $(cat /proc/cmdline); do\n  case $arg in\n    boot=*)\n      boot=\"${arg#*=}\"\n      case $boot in\n        /dev/mmc*)\n          BOOT_UUID=\"$(blkid $boot | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          BOOT_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" $boot \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n      esac\n\n      if [ -f \"/proc/device-tree/coreelec-dt-id\" ]; then\n        DT_ID=$(cat /proc/device-tree/coreelec-dt-id)\n      elif [ -f \"/proc/device-tree/le-dt-id\" ]; then\n        DT_ID=$(cat /proc/device-tree/le-dt-id)\n      fi\n\n      if [ -n \"$DT_ID\" ]; then\n        case $DT_ID in\n          *lepotato)\n            SUBDEVICE=\"LePotato\"\n            ;;\n          *odroid*c2)\n            SUBDEVICE=\"Odroid_C2\"\n            DT_ID=\"gxbb_p200_2g_odroid_c2\"\n            ;;\n        esac\n      fi\n\n      if [ -n \"$DT_ID\" -a -f \"$SYSTEM_ROOT/usr/share/bootloader/device_trees/$DT_ID.dtb\" ]; then\n        UPDATE_DTB_SOURCE=\"$SYSTEM_ROOT/usr/share/bootloader/device_trees/$DT_ID.dtb\"\n      fi\n\n      if [ -f \"$UPDATE_DTB_SOURCE\" ]; then\n        echo \"Updating device tree from $UPDATE_DTB_SOURCE...\"\n        case $boot in\n          /dev/system)\n            dd if=/dev/zero of=/dev/dtb bs=256k count=1 status=none\n            dd if=\"$UPDATE_DTB_SOURCE\" of=/dev/dtb bs=256k status=none\n            ;;\n          /dev/mmc*|LABEL=*|UUID=*)\n            cp -f \"$UPDATE_DTB_SOURCE\" \"$BOOT_ROOT/dtb.img\"\n            ;;\n        esac\n      fi\n\n      for all_dtb in /flash/*.dtb ; do\n        if [ -f $all_dtb ]; then\n          dtb=$(basename $all_dtb)\n          if [ -f $SYSTEM_ROOT/usr/share/bootloader/$dtb ]; then\n            echo \"Updating $dtb...\"\n            cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT\n          fi\n        fi\n      done\n      ;;\n\n    disk=*)\n      disk=\"${arg#*=}\"\n      case $disk in\n        /dev/mmc*)\n          DISK_UUID=\"$(blkid $disk | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          DISK_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" $disk \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n      esac\n      ;;\n  esac\ndone\n\nif [ -d $BOOT_ROOT/device_trees ]; then\n  echo \"Updating device_trees folder...\"\n  rm $BOOT_ROOT/device_trees/*.dtb\n  cp -p $SYSTEM_ROOT/usr/share/bootloader/device_trees/*.dtb $BOOT_ROOT/device_trees/\nfi\n\nif [ -f $SYSTEM_ROOT/usr/share/bootloader/${SUBDEVICE}_boot.ini ]; then\n  echo \"Updating boot.ini...\"\n  cp -p $SYSTEM_ROOT/usr/share/bootloader/${SUBDEVICE}_boot.ini $BOOT_ROOT/boot.ini\n  sed -e \"s/@BOOT_UUID@/$BOOT_UUID/\" \\\n      -e \"s/@DISK_UUID@/$DISK_UUID/\" \\\n      -i $BOOT_ROOT/boot.ini\n\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/config.ini ]; then\n    if [ ! -f $BOOT_ROOT/config.ini ]; then\n      echo \"Creating config.ini...\"\n      cp -p $SYSTEM_ROOT/usr/share/bootloader/config.ini $BOOT_ROOT/config.ini\n    fi\n  fi\nfi\n\nif [ \"${SUBDEVICE}\" == \"Odroid_C2\" ]; then\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/boot-logo.bmp.gz ]; then\n    echo \"Updating boot logo...\"\n    cp -p $SYSTEM_ROOT/usr/share/bootloader/boot-logo.bmp.gz $BOOT_ROOT\n  fi\nfi\n\nif [ \"${SUBDEVICE}\" == \"LePotato\" ]; then\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/boot-logo-1080.bmp.gz ]; then\n    echo \"Updating boot logos...\"\n    cp -p $SYSTEM_ROOT/usr/share/bootloader/boot-logo-1080.bmp.gz $BOOT_ROOT\n  fi\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/timeout-logo-1080.bmp.gz ]; then\n    cp -p $SYSTEM_ROOT/usr/share/bootloader/timeout-logo-1080.bmp.gz $BOOT_ROOT\n  fi\nfi\n\nif [ -f $SYSTEM_ROOT/usr/share/bootloader/${SUBDEVICE}_u-boot -a ! -e /dev/system -a ! -e /dev/boot ]; then\n  echo \"Updating u-boot on: $BOOT_DISK...\"\n  dd if=$SYSTEM_ROOT/usr/share/bootloader/${SUBDEVICE}_u-boot of=$BOOT_DISK conv=fsync bs=1 count=112 status=none\n  dd if=$SYSTEM_ROOT/usr/share/bootloader/${SUBDEVICE}_u-boot of=$BOOT_DISK conv=fsync bs=512 skip=1 seek=1 status=none\nfi\n\nif [ -f $BOOT_ROOT/aml_autoscript ]; then\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/aml_autoscript ]; then\n    echo \"Updating aml_autoscript...\"\n    cp -p $SYSTEM_ROOT/usr/share/bootloader/aml_autoscript $BOOT_ROOT\n  fi\nfi\n\nif [ ! -f $BOOT_ROOT/@KERNEL_NAME@ -a -f $BOOT_ROOT/@LEGACY_KERNEL_NAME@ ]; then\n  echo \"Updating Legacy Kernel name...\"\n  cp -p $BOOT_ROOT/@LEGACY_KERNEL_NAME@ $BOOT_ROOT/@KERNEL_NAME@\n  cp -p $BOOT_ROOT/@LEGACY_KERNEL_NAME@.md5 $BOOT_ROOT/@KERNEL_NAME@.md5\nfi\n\nif [ ! -f $BOOT_ROOT/dtb.img -a -f $BOOT_ROOT/@LEGACY_DTB_NAME@ ]; then\n  echo \"Updating Legacy dtb name...\"\n  cp -p $BOOT_ROOT/@LEGACY_DTB_NAME@ $BOOT_ROOT/dtb.img\nfi\n\nmount -o ro,remount $BOOT_ROOT\n\n# Leave a hint that we just did an update\necho \"UPDATE\" >/storage/.config/boot.hint\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/etc/lirc/lircd.conf.d/odroid-amremote.conf",
    "content": "begin remote\n\n  name  odroid_amremote\n  bits           16\n  flags SPACE_ENC|CONST_LENGTH\n  eps            30\n  aeps          100\n\n  header       9000  4500\n  one           563  1687\n  zero          563   562\n  ptrail        563\n  repeat       9000  2250\n  pre_data_bits   16\n  pre_data       0x4DB2\n  gap          0\n  suppress_repeat 1\n\n      begin codes\n          KEY_POWER                0x3BC4\n          KEY_MUTE                 0x11EE\n          KEY_HOME                 0x41BE\n          KEY_OK                   0x738C\n          KEY_LEFT                 0x9966\n          KEY_RIGHT                0x837C\n          KEY_UP                   0x53AC\n          KEY_DOWN                 0x4BB4\n          KEY_BACK                 0x59A6\n          KEY_MENU                 0xA35C\n          KEY_VOLUMEDOWN           0x817E\n          KEY_VOLUMEUP             0x01FE\n      end codes\n\nend remote\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/bin/cputemp",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018 Team LibreELEC (https://libreelec.tv)\n\nTEMP=\"$(cat /sys/class/thermal/thermal_zone0/temp)\"\necho \"$(( $TEMP / 1000 )) C\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/lib/kodi/aml-hdmimonitor.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2016-2018 kszaq (kszaquitto@gmail.com)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nHDMI_UNPLUGGED=0\nwhile :; do\n  ! grep -q . /sys/class/amhdmitx/amhdmitx0/disp_cap &&\n    grep -q 0 /sys/class/amhdmitx/amhdmitx0/hpd_state &&\n    HDMI_UNPLUGGED=1 && sleep 2 && continue ||\n  break\ndone\n\nif [ $HDMI_UNPLUGGED = 1 ]\nthen systemctl restart kodi\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/lib/modprobe.d/disable-ir-remotes.conf",
    "content": "blacklist meson-ir\nblacklist meson-remote\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/lib/modprobe.d/mali.conf",
    "content": "options mali mali_shared_mem_size=0x40000000\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/lib/modules-load.d/amlvideodri.conf",
    "content": "amlvideodri\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/lib/modules-load.d/wifi_dummy.conf",
    "content": "wifi_dummy\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/lib/systemd/sleep.conf.d/sleep.conf",
    "content": "[Sleep]\nSuspendMode=false\nHibernateMode=false\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/lib/systemd/system/amlogic-dvb.service",
    "content": "[Unit]\nDescription=Amlogic DVB module loader\nConditionPathExists=/proc/device-tree/dvbfe/dtv_demod0\nAfter=kernel-overlays.service\n\n[Service]\nType=simple\nExecStart=/bin/sh -c '[ `cat /proc/device-tree/dvbfe/dtv_demod0` = \"Avl6211\" ] && /sbin/modprobe aml_fe'\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/lib/systemd/system/fstrim.service",
    "content": "[Unit]\nDescription=Apply TRIM on all trimmable mounts\n\n[Service]\nType=simple\nExecStart=-/usr/sbin/fstrim -a -v\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/lib/systemd/system/kodi-aml-hdmimonitor.service",
    "content": "[Unit]\nDescription=Kodi Amlogic HDMI connection monitor\nAfter=kodi.service\n\n[Service]\nType=simple\nExecStart=/usr/lib/kodi/aml-hdmimonitor.sh\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/lib/systemd/system/wetekdvb.service",
    "content": "[Unit]\nDescription=WeTek DVB module loader\nConditionPathExists=/proc/device-tree/dvb/dev_name\nAfter=kernel-overlays.service\n\n[Service]\nType=simple\nExecStart=/bin/sh -c '[ `cat /proc/device-tree/dvb/dev_name` = \"wetek-dvb\" ] && /sbin/modprobe wetekdvb'\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/lib/udev/rules.d/99-spidev.rules",
    "content": "KERNEL==\"spidev*\", SUBSYSTEMS==\"spidev\", SYMLINK+=\"spidev0.0\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/sbin/installtointernal",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2016-2018 kszaq (kszaquitto@gmail.com)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nIMAGE_KERNEL=\"/flash/kernel.img\"\nIMAGE_SYSTEM=\"/flash/SYSTEM\"\nIMAGE_DTB=\"/flash/dtb.img\"\nBACKUP_DATE=$(date +%Y%m%d%H%M%S)\n\ninstall_to_nand() {\n  if [ -f $IMAGE_KERNEL -a -f $IMAGE_SYSTEM ] ; then\n\n    if grep -q /dev/system /proc/mounts ; then\n      echo \"Unmounting SYSTEM partiton.\"\n      umount -f /dev/system\n    fi\n    mkdir -p /tmp/system\n\n    mount -o rw,remount /flash\n    if [ -e /dev/dtb ] ; then\n      echo -n \"Backing up device tree...\"\n      dd if=/dev/dtb of=\"/flash/dtb$BACKUP_DATE.img\" bs=256k conv=fsync 2> /dev/null\n      echo \"done.\"\n    fi\n\n    if [ -e /dev/recovery ] ; then\n      echo -n \"Backing up recovery partition...\"\n      dd if=/dev/recovery of=\"/flash/recovery$BACKUP_DATE.img\" bs=64k conv=fsync 2> /dev/null\n      echo \"done.\"\n    fi\n\n    echo -n \"Formatting SYSTEM partition...\"\n    mke2fs -F -q -t ext4 -m 0 /dev/system || exit 1\n    e2fsck -n /dev/system || exit 1\n    echo \"done.\"\n\n    echo -n \"Writing kernel image...\"\n    dd if=\"$IMAGE_KERNEL\" of=/dev/boot bs=1M 2> /dev/null\n    echo \"done.\"\n\n    echo -n \"Copying SYSTEM files...\"\n    mount -o rw /dev/system /tmp/system\n    cp $IMAGE_SYSTEM /tmp/system && sync\n    echo \"done.\"\n\n    umount /tmp/system\n\n    if [ -f $IMAGE_DTB ] ; then\n      echo -n \"Writing device tree image...\"\n      dd if=/dev/zero of=/dev/dtb bs=256k count=1 2> /dev/null\n      dd if=\"$IMAGE_DTB\" of=/dev/dtb bs=256k 2> /dev/null\n      echo \"done.\"\n    fi\n\n    read -p \"Do you want to copy your user data to internal data partition? [Y/n] \" choice\n    case \"$choice\" in\n      [nN]*)\n        read -p \"Do you want to format DATA partition? [Y/n] \" choice\n        case \"$choice\" in\n          [nN]*)\n            ;;\n          *)\n            echo -n \"Formatting DATA partition...\"\n            mke2fs -F -q -t ext4 -m 0 /dev/data > /dev/null\n            e2fsck -n /dev/data &> /dev/null\n            echo \"done.\"\n        esac  \n        ;;\n      *)\n        echo -n \"Formatting DATA partition...\"\n        mke2fs -F -q -t ext4 -m 0 /dev/data > /dev/null\n        e2fsck -n /dev/data &> /dev/null\n        echo \"done.\"\n\n        echo -n \"Stopping Kodi...\"\n        systemctl stop kodi\n        echo \"done.\"\n        echo \"Copying user data...\"\n        mkdir -p /tmp/data\n        mount -o rw /dev/data /tmp/data\n        cp -pPRv /storage/. /tmp/data\n        ;;\n    esac\n\n    echo \"All done!\"\n    echo \"WARNING: If your internal memory layout is different from standard Amlogic, you have to perform this operation again!\"\n    echo \"Your system will reboot from internal memory.\"\n    echo \"\"\n\n    read -p \"Would you like to reboot now [y/N]? \" choice\n    case \"$choice\" in\n      [yY]*)\n        if /usr/sbin/fw_printenv whereToBootFrom > /dev/null 2>&1; then /usr/sbin/fw_setenv whereToBootFrom internal; fi\n        /usr/sbin/fw_setenv bootfromnand 1\n        /usr/sbin/reboot switch_system\n        ;;\n    esac\n\n  else\n    echo \"No EmuELEC image found on /flash! Exiting...\"\n  fi\n}\n\nif [ ! -e /dev/boot -o ! -e /dev/system -o ! -e /dev/data -o ! -e /dev/dtb ]; then\n  echo \"One of BOOT, SYTEM, DATA or DTB partitions is missing.\"\n  echo \"Make sure that you are using a correct device tree and a device with internal memory!\"\n  echo \"\"\n  echo \"Not all devices are compatible with installtointernal due to unsupported NAND/eMMC\"\n  echo \"chips being used by some manufacturers.\"\n  exit 0\nfi\n\necho \"This script will erase BOOT, SYSTEM, DATA and DTB on your device\"\necho \"and install EmuELEC that you booted from SD card/USB drive.\"\necho \"\"\necho \"It will create a backup of device tree and recovery partition on your boot media.\"\necho \"\"\necho \"WARNING: The script does not have any safeguards, you will not receive any\"\necho \"support for problems that you may encounter if you proceed!\"\necho \"\"\nread -p \"Type \\\"yes\\\" if you know what you are doing or anything else to exit: \" choice\ncase \"$choice\" in\n  yes) install_to_nand ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/sbin/lepotatotoemmc",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nDISTRO_BOOTLABEL=\"COREELEC\"\nDISTRO_DISKLABEL=\"STORAGE\"\nSYSTEM_PART_START=8192\nSYSTEM_SIZE=512\nSYSTEM_PART_END=$(( ${SYSTEM_PART_START} + (${SYSTEM_SIZE} * 1024 * 1024 / 512) - 1 ))\nSTORAGE_PART_START=$(( ${SYSTEM_PART_END} + 1 ))\n\nSYSTEM_BLKDEV=$(readlink -f /dev/block/$(mountpoint -d /flash))\nBLKDEVNAME=$(ls /sys/class/mmc_host/emmc/emmc*/block 2> /dev/null)\nBLKDEV=\"/dev/${BLKDEVNAME}\"\nBOOT_PART=\"${BLKDEV}p1\"\nSTORAGE_PART=\"${BLKDEV}p2\"\nNEWBOOT=/var/media/NEWBOOT\nNEWSTORAGE=/var/media/NEWSTORAGE\nLE_DT_ID=$(cat /proc/device-tree/le-dt-id)\n\ntoggle_emmc_timeout(){\n  mount -o remount,rw /flash\n  if ! $(grep \"^emmc_timeout=1$\" /flash/config.ini >/dev/null); then\n    echo \"Enabling eMMC timeout...\"\n    echo \"emmc_timeout=1\" >> /flash/config.ini\n    echo \"Please reboot with eMMC removed and insert when the boot splash appears.\"\n  else\n    echo \"Disabling eMMC timeout...\"\n    sed -i '/^emmc_timeout\\=1$/d' /flash/config.ini\n  fi\n  mount -o remount,ro /flash\n}\n\numount_all() {\n  mounted=$(cat /proc/mounts | grep \"${BLKDEV}\" | awk '{ print $1 }')\n  if [ -n \"$mounted\" ]; then\n    echo \"Unmount all partitions from ${BLKDEVNAME}...\"\n    umount $mounted\n    sleep 2\n  fi\n}\n\ninstall_to_emmc() {\n  # disable emmc_timeout\n  toggle_emmc_timeout\n\n  #stop kodi\n  echo \"Stopping Kodi...\"\n  systemctl stop kodi\n\n  # umount\n  umount_all\n\n  # nuke it\n  echo \"Delete all partitions...\"\n  dd if=/dev/zero of=${BLKDEV} bs=512 count=1\n\n  # create partitions\n  echo \"Create new partitions...\"\n  parted -s \"${BLKDEV}\" mklabel \"msdos\"\n  parted -s \"${BLKDEV}\" -a min unit s mkpart primary fat32 \"${SYSTEM_PART_START}\" \"${SYSTEM_PART_END}\"\n  parted -s \"${BLKDEV}\" set 1 boot on\n  parted -s \"${BLKDEV}\" -a min unit s mkpart primary ext4 \"${STORAGE_PART_START}\" \"100%\"\n  sync\n\n  # Flash u-boot\n  echo \"Flash Bootloader...\"\n  dd if=/usr/share/bootloader/LePotato_u-boot of=$BLKDEV conv=fsync bs=1 count=112 status=none\n  dd if=/usr/share/bootloader/LePotato_u-boot of=$BLKDEV conv=fsync bs=512 skip=1 seek=1 status=none\n  sync\n\n  # create fs for new /flash\n  echo \"Create Filesystem for new flash partition...\"\n  mkfs.vfat -n \"${DISTRO_BOOTLABEL}\" \"${BOOT_PART}\" ; sync\n\n  # create fs for new /storage\n  echo \"Create Filesystem for new storage partition...\"\n  mke2fs -F -q -L \"${DISTRO_DISKLABEL}\" -t ext4 -m 0 \"${STORAGE_PART}\" ; sync\n\n  # umount again\n  umount_all\n\n  # mount\n  echo \"Mount new partitions...\"\n  mkdir -p \"${NEWBOOT}\" \"${NEWSTORAGE}\"\n  mount \"${BOOT_PART}\" \"${NEWBOOT}\"\n  mount \"${STORAGE_PART}\" \"${NEWSTORAGE}\"\n\n  # cp /flash files\n  echo \"Copy /flash files to new flash partition...\"\n  cp -a /flash/kernel.img /flash/SYSTEM /flash/dtb.img ${NEWBOOT}\n  echo \"Copy template boot.ini...\"\n  cp -a /usr/share/bootloader/${DEVICE}_boot.ini ${NEWBOOT}/boot.ini\n  echo \"Copy config.ini...\"\n  if [ -e /flash/config.ini ]; then\n    cp -a /flash/config.ini ${NEWBOOT}\n  else\n    cp -a /usr/share/bootloader/config.ini ${NEWBOOT}\n  fi\n  sync\n\n  # set our new UUID's\n  BOOT_UUID=\"$(blkid ${BOOT_PART} | sed 's/.* UUID=\"//;s/\".*//g')\"\n  STORAGE_UUID=\"$(blkid ${STORAGE_PART} | sed 's/.* UUID=\"//;s/\".*//g')\"\n  echo \"Set UUIDs in new boot.ini...\"\n  sed -e \"s/@BOOT_UUID@/$BOOT_UUID/\" \\\n      -e \"s/@DISK_UUID@/$STORAGE_UUID/\" \\\n      -i ${NEWBOOT}/boot.ini\n\n  # check if there is enough space\n  space_available=$(df \"${NEWSTORAGE}\" | awk 'NR==2 { print $4 }')\n  space_required=$(df \"/storage/\" | awk 'NR==2 { print $3 }')\n  if [ $space_available -ge $space_required ]; then\n    # rsync userdata\n    echo \"Rsync /storage files to new storage partition...\"\n    rsync -Pa /storage/ $NEWSTORAGE/\n  else\n    echo \"Not enough space on the new storage partition. Skipping... \"\n  fi\n\n  umount_all\n\n  echo \"All done! Please poweroff your device and remove the SD/USB.\"\n  echo \"Enjoy!\"\n}\n\nif [ \"$SYSTEM_BLKDEV\" = \"/dev/block\" -o \"$SYSTEM_BLKDEV\" = \"$BOOT_PART\" ]; then\n  echo \"No no no no no! Don't use that script from eMMC otherwise it will eat your data!\"\n  exit 1\nfi\n\ncase $LE_DT_ID in\n  *lepotato)\n    DEVICE=\"LePotato\"\n    ;;\n  *)\n    echo \"This script is only for LePotato. It won't work on other devices!\"\n    exit 1\n    ;;\nesac\n\nif ! $(grep \"^emmc_timeout=1$\" /flash/config.ini >/dev/null); then\n  echo \"This script will help you to install CoreELEC on a LePotato eMMC from\"\n  echo \"within a running CE on SD card or USB drive.\"\n  echo \"\"\n  echo \"First we will set a 30s timout for u-boot.\"\n  echo \"Please reboot CoreELEC from SD/USB without the eMMC plugged in.\"\n  echo \"You will see the boot splash with the words: 30s: Please insert the eMMC.\"\n  echo \"After the 30s timeout CoreELEC will boot as normal and you will have to run this\"\n  echo \"script again to continue. If you don't manage to insert the eMMC in time just reboot and try again.\"\n  read -p \"Type \\\"yes\\\" if you know what you are doing or anything else to exit: \" choice\n  case \"$choice\" in\n    yes) toggle_emmc_timeout && exit 0;;\n      *) exit 0 ;;\n  esac\nfi\n\nif [ -z \"$BLKDEVNAME\" ]; then\n  echo \"eMMC not found. Please reboot with your eMMC removed and insert it after the bootsplash appears.\"\n  exit 0\nfi\n\necho \"This script will now erase the eMMC on your device\"\necho \"All data on this eMMC will be lost forever!\"\necho \"\"\nread -p \"Type \\\"yes\\\" if you know what you are doing or anything else to exit: \" choice\ncase \"$choice\" in\n  yes) install_to_emmc ;;\n    *) exit 0 ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/sbin/rebootfromnand",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2016-2018 kszaq (kszaquitto@gmail.com)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nif /usr/sbin/fw_printenv whereToBootFrom > /dev/null 2>&1; then /usr/sbin/fw_setenv whereToBootFrom internal; fi\n/usr/sbin/fw_setenv bootfromnand 1\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/filesystem/usr/share/alsa/cards/AML-M8AUDIO.conf",
    "content": "#\n# Configuration for Amlogic M8 Audio\n#\n\nAML-M8AUDIO.pcm.default {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype softvol\n\tslave.pcm {\n\t\ttype plug\n\t\tslave {\n\t\t\tpcm {\n\t\t\t\ttype hw\n\t\t\t\tcard $CARD\n\t\t\t\tdevice 0\n\t\t\t}\n\t\t}\n\t}\n\tcontrol {\n\t\tname \"PCM Playback Volume\"\n\t\tcard $CARD\n\t}\n}\n\n<confdir:pcm/hdmi.conf>\n\nAML-M8AUDIO.pcm.hdmi.0 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t\tdevice 1\n\t\tformat S16_LE\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tinterface MIXER\n\t\t\t\tname \"IEC958 Playback Default\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional true\n\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n\t\t\t}\n\t\t]\n\t}\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/initramfs/platform_init",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\ndisplay_mode=$(cat /sys/class/display/mode)\n\nfor arg in $(cat /proc/cmdline); do\n  case ${arg} in\n    bootfrom*)\n      bootfromext=1\n      ;;\n    BOOT_IMAGE=*)\n      BOOT_IMAGE=${arg#*=}\n      ;;\n    boot=*)\n      boot=${arg#*=}\n      ;;\n    disk=*)\n      disk=${arg#*=}\n      ;;\n    hdmimode=*)\n      hdmimode=${arg#*=}\n      ;;\n  esac\ndone\n\n# Add information where to run CoreELEC from\nif [ -z \"$BOOT_IMAGE\" -o -z \"$boot\" -o -z \"$disk\" ]; then\n  cmdline=$(cat /proc/cmdline)\n  if [ -n \"$bootfromext\" ]; then\n    cmdline=\"$cmdline BOOT_IMAGE=kernel.img boot=LABEL=@BOOT_LABEL@ disk=LABEL=@DISK_LABEL@\"\n  else\n    cmdline=\"$cmdline BOOT_IMAGE=/dev/boot boot=/dev/system disk=/dev/data\"\n  fi\n  echo \"$cmdline\" > /proc/cmdline\nfi\n\n# Enable HDMI output if cable is connected and not already enabled by u-boot\nif [ \"$(cat /sys/class/amhdmitx/amhdmitx0/hpd_state)\" != \"0\" ] && [ \"$display_mode\" != \"$hdmimode\" ]; then\n  echo \"$hdmimode\" > /sys/class/display/mode\n  display_mode=\"$hdmimode\"\nfi\n\n# Set framebuffer geometry to match the resolution\ncase $display_mode in\n  480*)            X=720  Y=480  ;;\n  576*)            X=720  Y=576  ;;\n  720p*)           X=1280 Y=720  ;;\n  *)               X=1920 Y=1080 ;;\nesac\n\nfbset -fb /dev/fb0 -g $X $Y 1920 2160 32\nfbset -fb /dev/fb1 -g 32 32 32 32 32\necho 0 > /sys/class/graphics/fb0/free_scale\necho 0 > /sys/class/graphics/fb1/free_scale\necho 1 > /sys/class/video/disable_video\n\n# Enable scaling for 4K output\ncase $display_mode in\n  4k*|smpte*|2160*)\n    echo 0 0 1919 1079 > /sys/class/graphics/fb0/free_scale_axis\n    echo 0 0 3839 2159 > /sys/class/graphics/fb0/window_axis\n    echo 1920 > /sys/class/graphics/fb0/scale_width\n    echo 1080 > /sys/class/graphics/fb0/scale_height\n    echo 0x10001 > /sys/class/graphics/fb0/free_scale\n  ;;\nesac\n\n# Include deinterlacer into default VFM map\necho rm default > /sys/class/vfm/map\necho add default decoder ppmgr deinterlace amvideo > /sys/class/vfm/map\n\n# Enable framebuffer device\necho 0 > /sys/class/graphics/fb0/blank\n\n# Blank fb1 to prevent static noise\necho 1 > /sys/class/graphics/fb1/blank\n\n# set smp_affinity\n#            Binary       Hex\n#    CPU 0    0001         1\n#    CPU 1    0010         2\n#    CPU 2    0100         4\n#    CPU 3    1000         8\necho 2 > /proc/irq/231/smp_affinity  # hdmi_aocec\necho 4 > /proc/irq/63/smp_affinity   # dwc_otg, dwc_otg_hcd:usb1\necho 8 > /proc/irq/62/smp_affinity   # dwc_otg, dwc_otg_hcd:usb2, dwc_otg_pcd\n\n# DEC_CONTROL_FLAG_DISABLE_FAST_POC\necho 4 > /sys/module/amvdec_h264/parameters/dec_control\n\necho 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy\n\n# S912: Set 1GHz minimum CPU speed for both clusters\nif [ -f /proc/device-tree/t82x@d00c0000/compatible ] ; then\n  echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq\n  echo 1000000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/kodi/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n  <section id=\"system\">\n    <category id=\"display\">\n      <group id=\"1\">\n        <setting id=\"videoscreen.limitedrange\">\n          <visible>false</visible>\n        </setting>\n      </group>\n    </category>\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.config\">\n          <default>3</default>\n        </setting>\n        <setting id=\"audiooutput.streamsilence\">\n          <default>0</default>\n        </setting>\n        <setting id=\"audiooutput.streamnoise\">\n          <default>false</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n  <section id=\"player\">\n    <category id=\"videoplayer\">\n      <group id=\"2\">\n        <setting id=\"videoplayer.adjustrefreshrate\">\n          <default>2</default> <!-- ADJUST_REFRESHRATE_ON_STARTSTOP -->\n          <constraints>\n            <options>\n              <option label=\"351\">0</option> <!-- ADJUST_REFRESHRATE_OFF -->\n              <option label=\"36036\">2</option> <!-- ADJUST_REFRESHRATE_ON_STARTSTOP -->\n              <option label=\"36050\">3</option> <!-- ADJUST_REFRESHRATE_ON_START -->\n            </options>\n          </constraints>\n        </setting>\n      </group>\n    </category>\n  </section>\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/linux/linux.aarch64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm64 3.14.29 Kernel Configuration\n#\nCONFIG_ARM64=y\nCONFIG_ARM64_HAS_SG_CHAIN=y\nCONFIG_64BIT=y\nCONFIG_ARCH_PHYS_ADDR_T_64BIT=y\nCONFIG_MMU=y\nCONFIG_ARCH_MMAP_RND_BITS_MIN=18\nCONFIG_ARCH_MMAP_RND_BITS_MAX=24\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_NO_IOPORT=y\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_RWSEM_GENERIC_SPINLOCK=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CSUM=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_SWIOTLB=y\nCONFIG_IOMMU_HELPER=y\nCONFIG_KERNEL_MODE_NEON=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_DEFCONFIG_LIST=\"/lib/modules/$UNAME_RELEASE/.config\"\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_EXTABLE_SORT=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\nCONFIG_CROSS_COMPILE=\"\"\n# CONFIG_COMPILE_TEST is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SWAP=y\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\nCONFIG_FHANDLE=y\n# CONFIG_AUDIT is not set\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_IRQ_DOMAIN=y\n# CONFIG_IRQ_DOMAIN_DEBUG is not set\nCONFIG_SPARSE_IRQ=y\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_GENERIC_CLOCKEVENTS_BUILD=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_BSD_PROCESS_ACCT is not set\n# CONFIG_TASKSTATS is not set\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\n# CONFIG_PREEMPT_RCU is not set\nCONFIG_RCU_STALL_COMMON=y\n# CONFIG_RCU_USER_QS is not set\nCONFIG_RCU_FANOUT=64\nCONFIG_RCU_FANOUT_LEAF=16\n# CONFIG_RCU_FANOUT_EXACT is not set\n# CONFIG_RCU_FAST_NO_HZ is not set\nCONFIG_TREE_RCU_TRACE=y\n# CONFIG_RCU_NOCB_CPU is not set\nCONFIG_IKCONFIG=m\nCONFIG_IKCONFIG_PROC=y\nCONFIG_LOG_BUF_SHIFT=17\nCONFIG_GENERIC_SCHED_CLOCK=y\nCONFIG_CGROUPS=y\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_RESOURCE_COUNTERS=y\nCONFIG_MEMCG=y\nCONFIG_MEMCG_SWAP=y\nCONFIG_MEMCG_SWAP_ENABLED=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\n# CONFIG_CFS_BANDWIDTH is not set\n# CONFIG_RT_GROUP_SCHED is not set\nCONFIG_BLK_CGROUP=y\n# CONFIG_DEBUG_BLK_CGROUP is not set\n# CONFIG_CHECKPOINT_RESTORE is not set\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_SCHED_AUTOGROUP is not set\nCONFIG_MM_OWNER=y\n# CONFIG_SYSFS_DEPRECATED is not set\n# CONFIG_RELAY is not set\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\" \"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\n# CONFIG_RD_GZIP is not set\n# CONFIG_RD_BZIP2 is not set\n# CONFIG_RD_LZMA is not set\n# CONFIG_RD_XZ is not set\nCONFIG_RD_LZO=y\n# CONFIG_RD_LZ4 is not set\nCONFIG_INITRAMFS_COMPRESSION_NONE=y\n# CONFIG_INITRAMFS_COMPRESSION_LZO is not set\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_SYSCTL=y\nCONFIG_ANON_INODES=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\nCONFIG_EXPERT=y\nCONFIG_UID16=y\n# CONFIG_SYSCTL_SYSCALL is not set\nCONFIG_KALLSYMS=y\n# CONFIG_KALLSYMS_ALL is not set\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_EMBEDDED=y\nCONFIG_HAVE_PERF_EVENTS=y\nCONFIG_PERF_USE_VMALLOC=y\n\n#\n# Kernel Performance Events And Counters\n#\n# CONFIG_PERF_EVENTS is not set\nCONFIG_VM_EVENT_COUNTERS=y\nCONFIG_SLUB_DEBUG=y\n# CONFIG_COMPAT_BRK is not set\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# CONFIG_SYSTEM_TRUSTED_KEYRING is not set\n# CONFIG_PROFILING is not set\nCONFIG_TRACEPOINTS=y\nCONFIG_JUMP_LABEL=y\n# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_ATTRS=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_DMA_API_DEBUG=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\n# CONFIG_CC_STACKPROTECTOR is not set\nCONFIG_HAVE_CONTEXT_TRACKING=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_ARCH_MMAP_RND_BITS=18\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=11\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_HAVE_GENERIC_DMA_COHERENT=y\nCONFIG_SLABINFO=y\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_STOP_MACHINE=y\nCONFIG_BLOCK=y\nCONFIG_BLK_DEV_BSG=y\nCONFIG_BLK_DEV_BSGLIB=y\n# CONFIG_BLK_DEV_INTEGRITY is not set\nCONFIG_BLK_DEV_THROTTLING=y\n# CONFIG_BLK_CMDLINE_PARSER is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\nCONFIG_MAC_PARTITION=y\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\nCONFIG_LDM_PARTITION=y\n# CONFIG_LDM_DEBUG is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\n# CONFIG_CMDLINE_PARTITION is not set\nCONFIG_BLOCK_COMPAT=y\n\n#\n# IO Schedulers\n#\nCONFIG_IOSCHED_NOOP=y\nCONFIG_IOSCHED_DEADLINE=y\nCONFIG_IOSCHED_CFQ=y\n# CONFIG_CFQ_GROUP_IOSCHED is not set\n# CONFIG_DEFAULT_DEADLINE is not set\n# CONFIG_DEFAULT_CFQ is not set\nCONFIG_DEFAULT_NOOP=y\nCONFIG_DEFAULT_IOSCHED=\"noop\"\nCONFIG_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_INLINE_READ_UNLOCK=y\nCONFIG_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_INLINE_WRITE_UNLOCK=y\nCONFIG_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_FREEZER=y\n\n#\n# Platform selection\n#\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_XGENE is not set\nCONFIG_ARCH_MESON64_ODROIDC2=y\n\n#\n# Bus support\n#\nCONFIG_ARM_AMBA=y\n\n#\n# ARM errata workarounds via the alternatives framework\n#\nCONFIG_ARM64_ERRATUM_845719=y\n# CONFIG_ARM64_ERRATUM_843419 is not set\nCONFIG_ARM64_ERRATUM_835769=y\n\n#\n# Kernel Features\n#\n# CONFIG_ARM64_64K_PAGES is not set\n# CONFIG_CPU_BIG_ENDIAN is not set\nCONFIG_SMP=y\nCONFIG_SCHED_MC=y\n# CONFIG_SCHED_SMT is not set\n# CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE is not set\nCONFIG_SCHED_HMP=y\n# CONFIG_SCHED_HMP_PRIO_FILTER is not set\nCONFIG_HMP_FAST_CPU_MASK=\"\"\nCONFIG_HMP_SLOW_CPU_MASK=\"\"\nCONFIG_HMP_VARIABLE_SCALE=y\nCONFIG_HMP_FREQUENCY_INVARIANT_SCALE=y\n# CONFIG_SCHED_HMP_LITTLE_PACKING is not set\nCONFIG_NR_CPUS=8\nCONFIG_HOTPLUG_CPU=y\nCONFIG_SWP_EMULATE=y\n# CONFIG_PREEMPT_NONE is not set\nCONFIG_PREEMPT_VOLUNTARY=y\n# CONFIG_PREEMPT is not set\nCONFIG_HZ=100\nCONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_ARCH_SPARSEMEM_DEFAULT=y\nCONFIG_ARCH_SELECT_MEMORY_MODEL=y\nCONFIG_HAVE_ARCH_PFN_VALID=y\nCONFIG_ARMV7_COMPAT=y\nCONFIG_ARMV7_COMPAT_CPUINFO=y\nCONFIG_SYS_SUPPORTS_HUGETLBFS=y\nCONFIG_ARCH_WANT_GENERAL_HUGETLB=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_SELECT_MEMORY_MODEL=y\nCONFIG_SPARSEMEM_MANUAL=y\nCONFIG_SPARSEMEM=y\nCONFIG_HAVE_MEMORY_PRESENT=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_MEMBLOCK=y\nCONFIG_NO_BOOTMEM=y\nCONFIG_MEMORY_ISOLATION=y\n# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set\nCONFIG_PAGEFLAGS_EXTENDED=y\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_COMPACTION=y\nCONFIG_MIGRATION=y\nCONFIG_PHYS_ADDR_T_64BIT=y\nCONFIG_ZONE_DMA_FLAG=0\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=32768\n# CONFIG_TRANSPARENT_HUGEPAGE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\nCONFIG_CLEANCACHE=y\nCONFIG_FRONTSWAP=y\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\nCONFIG_CMA_AREAS=7\n# CONFIG_ZBUD is not set\n# CONFIG_ZSWAP is not set\nCONFIG_ZSMALLOC=y\n# CONFIG_ZSMALLOC_STAT is not set\nCONFIG_PGTABLE_MAPPING=y\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_KEXEC is not set\n# CONFIG_CRASH_DUMP is not set\n# CONFIG_XEN is not set\nCONFIG_FORCE_MAX_ZONEORDER=11\n# CONFIG_SECCOMP is not set\n\n#\n# Boot options\n#\nCONFIG_CMDLINE=\"console=tty0 systemd.show_status=auto\"\n# CONFIG_CMDLINE_FROM_BOOTLOADER is not set\nCONFIG_CMDLINE_EXTEND=y\n# CONFIG_CMDLINE_FORCE is not set\n# CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE is not set\n\n#\n# Userspace binary formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\n# CONFIG_HAVE_AOUT is not set\nCONFIG_BINFMT_MISC=y\nCONFIG_COREDUMP=y\nCONFIG_COMPAT=y\nCONFIG_SYSVIPC_COMPAT=y\nCONFIG_KEYS_COMPAT=y\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\nCONFIG_HAS_WAKELOCK=y\nCONFIG_HAS_EARLYSUSPEND=y\nCONFIG_WAKELOCK=y\nCONFIG_WAKELOCK_STAT=y\nCONFIG_USER_WAKELOCK=y\nCONFIG_EARLYSUSPEND=y\nCONFIG_FORCE_POWER_ON_STATE_AFTER_RESUME=y\nCONFIG_NO_USER_SPACE_SCREEN_ACCESS_CONTROL=y\n# CONFIG_CONSOLE_EARLYSUSPEND is not set\n# CONFIG_FB_EARLYSUSPEND is not set\nCONFIG_HIBERNATE_CALLBACKS=y\nCONFIG_HIBERNATION=y\nCONFIG_PM_STD_PARTITION=\"\"\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\n# CONFIG_PM_RUNTIME is not set\nCONFIG_PM=y\n# CONFIG_PM_DEBUG is not set\nCONFIG_ARCH_HAS_OPP=y\nCONFIG_PM_OPP=y\nCONFIG_PM_CLK=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_CPU_PM=y\n# CONFIG_SUSPEND_TIME is not set\n# CONFIG_MK_SNAPSHOT_ONLY is not set\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_STAT_DETAILS is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\n# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_GOV_HOTPLUG is not set\n# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set\n# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\n# CONFIG_GENERIC_CPUFREQ_CPU0 is not set\n\n#\n# ARM CPU frequency scaling drivers\n#\nCONFIG_ARM_BIG_LITTLE_CPUFREQ=y\n# CONFIG_ARM_DT_BL_CPUFREQ is not set\nCONFIG_ARM_SCPI_CPUFREQ=y\n# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARM64_CPU_SUSPEND=y\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Idle\n#\n# CONFIG_CPU_IDLE is not set\n# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\n# CONFIG_UNIX_DIAG is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=m\n# CONFIG_XFRM_USER is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_NET_KEY=m\n# CONFIG_NET_KEY_MIGRATE is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=m\nCONFIG_IP_MROUTE=y\n# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set\n# CONFIG_IP_PIMSM_V1 is not set\n# CONFIG_IP_PIMSM_V2 is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_INET_AH is not set\n# CONFIG_INET_ESP is not set\n# CONFIG_INET_IPCOMP is not set\n# CONFIG_INET_XFRM_TUNNEL is not set\nCONFIG_INET_TUNNEL=m\n# CONFIG_INET_XFRM_MODE_TRANSPORT is not set\n# CONFIG_INET_XFRM_MODE_TUNNEL is not set\n# CONFIG_INET_XFRM_MODE_BEET is not set\nCONFIG_INET_LRO=y\n# CONFIG_INET_DIAG is not set\nCONFIG_TCP_CONG_ADVANCED=y\n# CONFIG_TCP_CONG_BIC is not set\nCONFIG_TCP_CONG_CUBIC=y\n# CONFIG_TCP_CONG_WESTWOOD is not set\nCONFIG_TCP_CONG_HTCP=m\nCONFIG_TCP_CONG_HSTCP=m\n# CONFIG_TCP_CONG_HYBLA is not set\nCONFIG_TCP_CONG_VEGAS=m\nCONFIG_TCP_CONG_SCALABLE=m\n# CONFIG_TCP_CONG_LP is not set\nCONFIG_TCP_CONG_VENO=m\nCONFIG_TCP_CONG_YEAH=m\nCONFIG_TCP_CONG_ILLINOIS=m\nCONFIG_DEFAULT_CUBIC=y\n# CONFIG_DEFAULT_RENO is not set\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_INET6_XFRM_TUNNEL is not set\n# CONFIG_INET6_TUNNEL is not set\n# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set\n# CONFIG_INET6_XFRM_MODE_TUNNEL is not set\n# CONFIG_INET6_XFRM_MODE_BEET is not set\n# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set\nCONFIG_IPV6_SIT=m\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\n# CONFIG_IPV6_GRE is not set\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_ANDROID_PARANOID_NETWORK is not set\n# CONFIG_NET_ACTIVITY_STATS is not set\n# CONFIG_NETWORK_SECMARK is not set\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\n# CONFIG_NETFILTER_DEBUG is not set\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=y\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_NETLINK=m\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\nCONFIG_NETFILTER_NETLINK_LOG=m\nCONFIG_NF_CONNTRACK=m\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_PROCFS is not set\n# CONFIG_NF_CONNTRACK_EVENTS is not set\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CT_PROTO_DCCP is not set\n# CONFIG_NF_CT_PROTO_SCTP is not set\n# CONFIG_NF_CT_PROTO_UDPLITE is not set\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\nCONFIG_NF_CONNTRACK_IRC=m\nCONFIG_NF_CONNTRACK_BROADCAST=m\nCONFIG_NF_CONNTRACK_NETBIOS_NS=m\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\nCONFIG_NF_CONNTRACK_SIP=m\n# CONFIG_NF_CONNTRACK_TFTP is not set\nCONFIG_NF_CT_NETLINK=m\n# CONFIG_NF_CT_NETLINK_TIMEOUT is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_NEEDED=y\n# CONFIG_NF_NAT_AMANDA is not set\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_IRC=m\nCONFIG_NF_NAT_SIP=m\n# CONFIG_NF_NAT_TFTP is not set\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\n\n#\n# Xtables combined modules\n#\n# CONFIG_NETFILTER_XT_MARK is not set\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\n# CONFIG_NETFILTER_XT_TARGET_REDIRECT is not set\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\n# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\nCONFIG_NETFILTER_XT_MATCH_IPRANGE=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\nCONFIG_NETFILTER_XT_MATCH_OWNER=m\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA2 is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\nCONFIG_NETFILTER_XT_MATCH_STATE=m\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# CONFIG_IP_SET is not set\n# CONFIG_IP_VS is not set\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\nCONFIG_NF_CONNTRACK_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\n# CONFIG_IP_NF_TARGET_ULOG is not set\nCONFIG_NF_NAT_IPV4=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\n# CONFIG_IP_NF_TARGET_REDIRECT is not set\n# CONFIG_NF_NAT_PPTP is not set\n# CONFIG_NF_NAT_H323 is not set\n# CONFIG_IP_NF_MANGLE is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n\n#\n# IPv6: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV6=m\nCONFIG_NF_CONNTRACK_IPV6=m\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\n# CONFIG_IP6_NF_MANGLE is not set\n# CONFIG_IP6_NF_RAW is not set\nCONFIG_NF_NAT_IPV6=m\n# CONFIG_IP6_NF_TARGET_MASQUERADE is not set\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\n# CONFIG_BRIDGE_VLAN_FILTERING is not set\nCONFIG_HAVE_NET_DSA=y\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\n# CONFIG_DECNET is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_IPX is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_6LOWPAN_IPHC=m\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\nCONFIG_NET_SCH_FQ_CODEL=y\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n\n#\n# Classification\n#\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_TCINDEX is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_RSVP is not set\n# CONFIG_NET_CLS_RSVP6 is not set\n# CONFIG_NET_CLS_FLOW is not set\n# CONFIG_NET_CLS_CGROUP is not set\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_MMAP is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_NET_MPLS_GSO is not set\n# CONFIG_HSR is not set\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_XPS=y\nCONFIG_CGROUP_NET_PRIO=y\n# CONFIG_CGROUP_NET_CLASSID is not set\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\n# CONFIG_IRDA is not set\nCONFIG_BT=m\nCONFIG_BT_RFCOMM=m\nCONFIG_BT_RFCOMM_TTY=y\nCONFIG_BT_BNEP=m\nCONFIG_BT_BNEP_MC_FILTER=y\nCONFIG_BT_BNEP_PROTO_FILTER=y\nCONFIG_BT_HIDP=m\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_HCIBTUSB=m\nCONFIG_BT_HCIBTSDIO=m\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_H4=y\nCONFIG_BT_HCIUART_BCSP=y\nCONFIG_BT_HCIUART_ATH3K=y\nCONFIG_BT_HCIUART_LL=y\nCONFIG_BT_HCIUART_3WIRE=y\nCONFIG_BT_HCIBCM203X=m\nCONFIG_BT_HCIBPA10X=m\nCONFIG_BT_HCIBFUSB=m\n# CONFIG_BT_HCIVHCI is not set\nCONFIG_BT_MRVL=m\nCONFIG_BT_MRVL_SDIO=m\nCONFIG_BT_ATH3K=m\n# CONFIG_AF_RXRPC is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=m\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_REG_DEBUG is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\n# CONFIG_CFG80211_DEFAULT_PS is not set\n# CONFIG_CFG80211_DEBUGFS is not set\n# CONFIG_CFG80211_INTERNAL_REGDB is not set\nCONFIG_CFG80211_WEXT=y\n# CONFIG_LIB80211 is not set\nCONFIG_MAC80211=m\nCONFIG_MAC80211_HAS_RC=y\n# CONFIG_MAC80211_RC_PID is not set\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_MINSTREL_HT=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\n# CONFIG_WIMAX is not set\nCONFIG_RFKILL=y\nCONFIG_RFKILL_PM=y\nCONFIG_RFKILL_LEDS=y\n# CONFIG_RFKILL_INPUT is not set\n# CONFIG_RFKILL_REGULATOR is not set\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n\n#\n# Device Drivers\n#\n\n#\n# Amlogic Device Drivers\n#\nCONFIG_MESON_TIMER=y\n# CONFIG_MESON_LOCAL_TIMER is not set\nCONFIG_MESON_BC_TIMER=y\nCONFIG_AM_UART=y\nCONFIG_SERIAL_MESON_CONSOLE=y\n# CONFIG_PRINTK_NOBLOCK_MODE is not set\nCONFIG_AML_CPU_VERSION=y\nCONFIG_AML_MESON64_VERSION=y\n# CONFIG_AML_M8_VERSION is not set\nCONFIG_AMLOGIC_IOMAP=y\nCONFIG_PINCTRL_AMLOGIC=y\n\n#\n# USB Support\n#\nCONFIG_AMLOGIC_USB=y\nCONFIG_USB_DWC_OTG_HCD=m\nCONFIG_USB_HOST_ELECT_TEST=y\n\n#\n# I2C Hardware Bus support\n#\nCONFIG_I2C_AML=y\n# CONFIG_I2C_SLAVE_AML is not set\n# CONFIG_I2C_SW_AML is not set\n# CONFIG_BCM2079X_I2C is not set\nCONFIG_AMLOGIC_PWM=y\nCONFIG_PWM_MESON=y\n\n#\n# HDMI TX Support\n#\nCONFIG_AML_HDMI_TX=y\nCONFIG_AML_HDMI_TX_20=y\n# CONFIG_AML_HDMI_TX_14 is not set\n# CONFIG_AML_RTC is not set\nCONFIG_AML_VRTC=y\n# CONFIG_AM_IRBLASTER is not set\n# CONFIG_AML_DEBUG is not set\nCONFIG_AML_REG_ACCESS=y\n\n#\n# Power Management Support\n#\n# CONFIG_AML_POWER_SUPPORT is not set\n# CONFIG_AML_PMU_ALGORITHM_SUPPORT is not set\nCONFIG_AML_PMU4=y\n\n#\n# Ethernet Support\n#\n# CONFIG_AM_PHY is not set\nCONFIG_PHYLIB=y\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n\n#\n# Multimedia Card support\n#\nCONFIG_MMC_AML=y\n# CONFIG_MMC_AML_DEBUG is not set\n# CONFIG_AML_MMC_DEBUG_FORCE_SINGLE_BLOCK_RW is not set\n\n#\n# Amlogic VPU Drivers\n#\n\n#\n# Amlogic VPU Driver\n#\nCONFIG_AML_VPU=y\n# CONFIG_AML_VPU_DYNAMIC_ADJ is not set\n\n#\n# ION support\n#\nCONFIG_AMLOGIC_ION=y\n\n#\n# Amlogic Display Driver\n#\nCONFIG_AML_DISPLAY=y\n\n#\n# Amlogic VOUT Module\n#\nCONFIG_AM_VOUT=y\nCONFIG_AM_TV_OUTPUT=y\nCONFIG_AML_VOUT_FRAMERATE_AUTOMATION=y\n# CONFIG_AML_VOUT_CC_BYPASS is not set\n# CONFIG_AML_VDAC_HW_SWITCH is not set\nCONFIG_AML_WSS=y\n\n#\n# Amlogic OSD Module\n#\nCONFIG_AM_FB=y\nCONFIG_FB_OSD_SUPPORT_SYNC_FENCE=y\nCONFIG_FB_OSD_VSYNC_RDMA=y\nCONFIG_FB_OSD2_ENABLE=y\nCONFIG_FB_OSD2_CURSOR=y\n\n#\n# Amlogic VOUT2 Module\n#\n# CONFIG_AM_VOUT2 is not set\n# CONFIG_AM_TV_OUTPUT2 is not set\n\n#\n# Amlogic OSD_EXT Module\n#\n# CONFIG_AM_FB_EXT is not set\n\n#\n# Amlogic GE2D Module\n#\nCONFIG_AM_GE2D=y\n# CONFIG_AM_GE2D_MORE_SECURITY is not set\nCONFIG_AM_LOGO=y\n\n#\n# Amlogic LCD Output Module\n#\n# CONFIG_AML_LCD is not set\n\n#\n# Amlogic Backlight Support\n#\n# CONFIG_AML_BACKLIGHT is not set\nCONFIG_AMLOGIC_LED=m\nCONFIG_AML_LED_SYS=m\nCONFIG_AML_LED_PWM=m\nCONFIG_AML_LED_TRIGGER_BREATHE=m\nCONFIG_AML_LED_TRIGGER_SCPI=m\nCONFIG_AML_LED_TRIGGER_SCPISTOP=m\nCONFIG_AML_LED_TRIGGER_DISTURB=m\n\n#\n# Canvas management driver\n#\nCONFIG_AML_CANVAS=y\nCONFIG_AMLOGIC_CLK=y\nCONFIG_AMLOGIC_SEC=y\n# CONFIG_AML_SERR is not set\nCONFIG_AMLOGIC_SECURITY_KEY=y\nCONFIG_AM_PTSSERVER=y\n# CONFIG_H264_4K2K_SINGLE_CORE is not set\nCONFIG_VSYNC_RDMA=y\n# CONFIG_TVIN_VIUIN is not set\nCONFIG_AM_VIDEO=y\n# CONFIG_AM_VIDEO2 is not set\n# CONFIG_SUPPORT_VIDEO_ON_VPP2 is not set\nCONFIG_GE2D_KEEP_FRAME=y\n\n#\n# Video Decoders\n#\n# CONFIG_MULTI_DEC is not set\nCONFIG_AM_VDEC_MPEG12=y\nCONFIG_AM_VDEC_MPEG4=y\n# CONFIG_AM_VDEC_MMPEG4 is not set\nCONFIG_AM_VDEC_VC1=y\nCONFIG_AM_VDEC_H264=y\n# CONFIG_AM_VDEC_MH264 is not set\nCONFIG_AM_VDEC_H264MVC=y\nCONFIG_AM_VDEC_H264_4K2K=y\nCONFIG_AM_VDEC_H265=y\nCONFIG_AM_VDEC_VP9=y\nCONFIG_AM_VDEC_MJPEG=y\n# CONFIG_AM_ENCODER is not set\n# CONFIG_AM_JPEG_ENCODER is not set\n# CONFIG_AM_PIC_DEC is not set\nCONFIG_AM_VDEC_REAL=y\nCONFIG_AM_VDEC_AVS=y\n# CONFIG_AM_JPEGDEC is not set\nCONFIG_AM_TIMESYNC=y\nCONFIG_AM_STREAMING=y\nCONFIG_AM_SUBTITLE=y\nCONFIG_AM_VIDEOCAPTURE=y\n# CONFIG_AM_HEVCENC is not set\n\n#\n# Deinterlace driver\n#\nCONFIG_DEINTERLACE=y\n# CONFIG_AM_DEINTERLACE_SD_ONLY is not set\nCONFIG_AML_VFM=y\n\n#\n# EFUSE Support\n#\nCONFIG_EFUSE=y\n# CONFIG_EFUSE_WRITE_VERSION_PERMIT is not set\n\n#\n# key management Support\n#\nCONFIG_KEY_MANAGE=y\n\n#\n# Audio Interface\n#\nCONFIG_AMAUDIO=y\n\n#\n# Amlogic Audio Interface V2\n#\nCONFIG_AMAUDIO2=y\n\n#\n# Audio dsp process\n#\nCONFIG_AML_AUDIO_DSP=y\n\n#\n# Post Process Manager driver\n#\nCONFIG_POST_PROCESS_MANAGER=y\nCONFIG_POST_PROCESS_MANAGER_PPSCALER=y\n# CONFIG_POST_PROCESS_MANAGER_3D_PROCESS is not set\n\n#\n# Amlogic Wifi Driver\n#\nCONFIG_AM_WIFI=y\nCONFIG_BCMDHD_USE_STATIC_BUF=y\n# CONFIG_RTL8189ES is not set\n# CONFIG_RTL8189FS is not set\n# CONFIG_RTL8192EU is not set\n# CONFIG_RTL8723AU is not set\n# CONFIG_RTL8723BS is not set\n# CONFIG_RTL8821AU is not set\n# CONFIG_RTL8812AU is not set\n# CONFIG_RTL8192CU is not set\n# CONFIG_RTL8192DU is not set\n# CONFIG_RTL8188EU is not set\n# CONFIG_RTL8822BU is not set\n# CONFIG_BCMDHD is not set\nCONFIG_AML_POWER_RESET=y\n# CONFIG_M8_POWER_RESET is not set\nCONFIG_GXBB_POWER_RESET=y\n\n#\n# Amlogic Bt Rfkill Driver\n#\nCONFIG_BT_DEVICE=y\n# CONFIG_BLUESLEEP is not set\n\n#\n# Amlogic ion video support\n#\n# CONFIG_VIDEOBUF2_ION is not set\n# CONFIG_AMLOGIC_IONVIDEO is not set\n\n#\n# V4L2 Video Support\n#\nCONFIG_V4L_AMLOGIC_VIDEO=m\n# CONFIG_V4L_AMLOGIC_VIDEO2 is not set\n\n#\n# Amlogic TVIN Drivers\n#\nCONFIG_TVIN=y\n# CONFIG_TVIN_VDIN is not set\n# CONFIG_TVIN_AFE is not set\nCONFIG_TVIN_HDMI=y\n# CONFIG_TVIN_HDMI_CEC is not set\n# CONFIG_TVIN_HDMI_EXT is not set\n# CONFIG_TVIN_BT656 is not set\n# CONFIG_VIUIN is not set\n# CONFIG_TVIN_ISP is not set\n\n#\n# Amlogic VECM Drivers\n#\n\n#\n# Amlogic amvecm Driver\n#\nCONFIG_AM_VECM=y\nCONFIG_AML_NAND=y\nCONFIG_AML_NEXT_GEN_NAND=y\nCONFIG_AML_NFTL_NEW=y\nCONFIG_AML_NAND_KEY=y\n# CONFIG_SECURE_NAND is not set\nCONFIG_AM_INPUT=y\nCONFIG_AM_SARADC=y\nCONFIG_MESON_NEW_INPUT_REMOTE=y\nCONFIG_NEW_AM_REMOTE=m\nCONFIG_MESON_INPUT_KEYBOARD=y\n# CONFIG_ADC_KEYPADS_AM is not set\nCONFIG_AML_GPIO_KEY=y\n# CONFIG_SENSOR_DEVICES is not set\n# CONFIG_AMLOGIC_AVIN_DETECT is not set\n# CONFIG_AMLOGIC_MESON_CPUFREQ is not set\nCONFIG_AMLOGIC_SCPI_CPUFREQ=y\nCONFIG_MESON_SUSPEND=y\n# CONFIG_M8M2_SUSPEND is not set\nCONFIG_GXBB_SUSPEND=y\n\n#\n# AVL6862 dvb driver\n#\nCONFIG_AVL6862=m\n\n#\n# WeTek Play driver\n#\nCONFIG_WETEK=m\n\n#\n# MESON MHU mailbox Support\n#\nCONFIG_MESON_MHU_MBOX=y\nCONFIG_ARM_SCPI_PROTOCOL=y\n\n#\n# RDMA management driver\n#\nCONFIG_AML_RDMA=y\n\n#\n# Amlogic temperature sensor\n#\nCONFIG_AML_TEMP_SENSOR=y\n# CONFIG_AUDIO_DATA is not set\nCONFIG_INSTABOOT=y\n# CONFIG_INSTABOOT_MEM_MG is not set\n\n#\n# Amlogic Camera Support\n#\n# CONFIG_VIDEO_AMLOGIC_CAPTURE is not set\nCONFIG_AML_CODEC_MM=y\n# CONFIG_AML_WDT is not set\n\n#\n# AMLOGIC SPI Hardware bus support\n#\nCONFIG_AMLOGIC_SPICC_MASTER=y\n# CONFIG_AMLOGIC_JTAG is not set\nCONFIG_AMLOGIC_CPU_INFO=y\n\n#\n# defend img file update support\n#\n# CONFIG_DEFEND_IMG is not set\n\n#\n# AO CEC Support\n#\nCONFIG_AML_AO_CEC=y\n\n#\n# Amlogic Crypto Support\n#\n# CONFIG_CRYPTO_AML is not set\n\n#\n# ESM Support\n#\n# CONFIG_AML_ESM is not set\n\n#\n# Generic Driver Options\n#\nCONFIG_UEVENT_HELPER_PATH=\"/sbin/mdev\"\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\nCONFIG_FW_LOADER=y\nCONFIG_FIRMWARE_IN_KERNEL=y\nCONFIG_EXTRA_FIRMWARE=\"\"\nCONFIG_FW_LOADER_USER_HELPER=y\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_SYS_HYPERVISOR is not set\n# CONFIG_GENERIC_CPU_DEVICES is not set\nCONFIG_HAVE_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_DMA_SHARED_BUFFER=y\nCONFIG_DMA_CMA=y\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=8\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n\n#\n# Bus devices\n#\n# CONFIG_CONNECTOR is not set\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\n# CONFIG_MTD_CMDLINE_PARTS is not set\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AR7_PARTS is not set\n\n#\n# User Modules And Translation Layers\n#\nCONFIG_MTD_BLKDEVS=y\nCONFIG_MTD_BLOCK=y\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\n# CONFIG_MTD_OOPS is not set\n# CONFIG_MTD_SWAP is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\n# CONFIG_MTD_CFI is not set\n# CONFIG_MTD_JEDECPROBE is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\n# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set\n# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set\n# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\n# CONFIG_MTD_CFI_I4 is not set\n# CONFIG_MTD_CFI_I8 is not set\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_PLATRAM is not set\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_DATAFLASH is not set\n# CONFIG_MTD_M25P80 is not set\n# CONFIG_MTD_SST25L is not set\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\nCONFIG_MTD_NAND_IDS=y\nCONFIG_MTD_NAND_ECC=y\n# CONFIG_MTD_NAND_ECC_SMC is not set\nCONFIG_MTD_NAND=y\n# CONFIG_MTD_NAND_ECC_BCH is not set\n# CONFIG_MTD_SM_COMMON is not set\n# CONFIG_MTD_NAND_DENALI is not set\n# CONFIG_MTD_NAND_GPIO is not set\n# CONFIG_MTD_NAND_DISKONCHIP is not set\n# CONFIG_MTD_NAND_DOCG4 is not set\n# CONFIG_MTD_NAND_NANDSIM is not set\n# CONFIG_MTD_NAND_PLATFORM is not set\n# CONFIG_MTD_ONENAND is not set\n\n#\n# LPDDR flash memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\nCONFIG_MTD_UBI=y\nCONFIG_MTD_UBI_WL_THRESHOLD=4096\nCONFIG_MTD_UBI_BEB_LIMIT=20\n# CONFIG_MTD_UBI_FASTMAP is not set\n# CONFIG_MTD_UBI_GLUEBI is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n\n#\n# Device Tree and Open Firmware support\n#\nCONFIG_PROC_DEVICETREE=y\n# CONFIG_OF_SELFTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_NET=y\nCONFIG_OF_MDIO=y\nCONFIG_OF_MTD=y\nCONFIG_OF_RESERVED_MEM=y\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_ZRAM=y\n# CONFIG_ZRAM_DEBUG is not set\n# CONFIG_BLK_DEV_COW_COMMON is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=8\n# CONFIG_BLK_DEV_CRYPTOLOOP is not set\n# CONFIG_BLK_DEV_DRBD is not set\n# CONFIG_BLK_DEV_NBD is not set\n# CONFIG_BLK_DEV_RAM is not set\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\nCONFIG_VIRTIO_BLK=y\n# CONFIG_BLK_DEV_RBD is not set\n\n#\n# Misc devices\n#\n# CONFIG_SENSORS_LIS3LV02D is not set\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_ATMEL_PWM is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ATMEL_SSC is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1780 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_TI_DAC7512 is not set\n# CONFIG_UID_STAT is not set\n# CONFIG_BMP085_I2C is not set\n# CONFIG_BMP085_SPI is not set\n# CONFIG_USB_SWITCH_FSA9480 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\n# CONFIG_SRAM is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\n# CONFIG_EEPROM_AT25 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n\n#\n# Altera FPGA firmware download module\n#\n# CONFIG_ALTERA_STAPL is not set\n\n#\n# Intel MIC Host Driver\n#\n\n#\n# Intel MIC Card Driver\n#\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_TGT is not set\n# CONFIG_SCSI_NETLINK is not set\n# CONFIG_SCSI_PROC_FS is not set\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\n# CONFIG_CHR_DEV_OSST is not set\nCONFIG_BLK_DEV_SR=m\n# CONFIG_BLK_DEV_SR_VENDOR is not set\n# CONFIG_CHR_DEV_SG is not set\n# CONFIG_CHR_DEV_SCH is not set\nCONFIG_SCSI_MULTI_LUN=y\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\n# CONFIG_SCSI_SCAN_ASYNC is not set\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_LIBFC is not set\n# CONFIG_LIBFCOE is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_VIRTIO is not set\n# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set\n# CONFIG_SCSI_DH is not set\n# CONFIG_SCSI_OSD_INITIATOR is not set\nCONFIG_HAVE_PATA_PLATFORM=y\n# CONFIG_ATA is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\n# CONFIG_DM_DEBUG is not set\nCONFIG_DM_BUFIO=m\nCONFIG_DM_CRYPT=m\nCONFIG_DM_SNAPSHOT=m\n# CONFIG_DM_THIN_PROVISIONING is not set\n# CONFIG_DM_CACHE is not set\n# CONFIG_DM_MIRROR is not set\n# CONFIG_DM_RAID is not set\n# CONFIG_DM_ZERO is not set\n# CONFIG_DM_MULTIPATH is not set\n# CONFIG_DM_DELAY is not set\n# CONFIG_DM_UEVENT is not set\n# CONFIG_DM_FLAKEY is not set\n# CONFIG_DM_VERITY is not set\n# CONFIG_DM_SWITCH is not set\n# CONFIG_DM_LOG_WRITES is not set\n# CONFIG_TARGET_CORE is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\n# CONFIG_DUMMY is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\n# CONFIG_MACVTAP is not set\nCONFIG_VXLAN=m\nCONFIG_NETCONSOLE=y\nCONFIG_NETCONSOLE_DYNAMIC=y\nCONFIG_NETPOLL=y\n# CONFIG_NETPOLL_TRAP is not set\nCONFIG_NET_POLL_CONTROLLER=y\nCONFIG_TUN=y\nCONFIG_VETH=m\n# CONFIG_VIRTIO_NET is not set\n# CONFIG_NLMON is not set\n\n#\n# CAIF transport drivers\n#\n\n#\n# Distributed Switch Architecture drivers\n#\n# CONFIG_NET_DSA_MV88E6XXX is not set\n# CONFIG_NET_DSA_MV88E6060 is not set\n# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set\n# CONFIG_NET_DSA_MV88E6131 is not set\n# CONFIG_NET_DSA_MV88E6123_61_65 is not set\nCONFIG_ETHERNET=y\nCONFIG_NET_VENDOR_ARC=y\n# CONFIG_ARC_EMAC is not set\n# CONFIG_NET_CADENCE is not set\n# CONFIG_NET_VENDOR_BROADCOM is not set\n# CONFIG_NET_CALXEDA_XGMAC is not set\n# CONFIG_DNET is not set\n# CONFIG_NET_VENDOR_INTEL is not set\n# CONFIG_NET_VENDOR_MARVELL is not set\n# CONFIG_NET_VENDOR_MICREL is not set\n# CONFIG_NET_VENDOR_MICROCHIP is not set\n# CONFIG_NET_VENDOR_NATSEMI is not set\n# CONFIG_ETHOC is not set\n# CONFIG_SH_ETH is not set\n# CONFIG_NET_VENDOR_SEEQ is not set\n# CONFIG_NET_VENDOR_SMSC is not set\nCONFIG_NET_VENDOR_STMICRO=y\nCONFIG_STMMAC_ETH=y\nCONFIG_STMMAC_PLATFORM=y\nCONFIG_DWMAC_MESON=y\n# CONFIG_STMMAC_DEBUG_FS is not set\n# CONFIG_STMMAC_DA is not set\n# CONFIG_NET_VENDOR_VIA is not set\n# CONFIG_NET_VENDOR_WIZNET is not set\n\n#\n# MII PHY device drivers\n#\nCONFIG_AMLOGIC_PHY=y\n# CONFIG_AT803X_PHY is not set\n# CONFIG_AMD_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_QSEMI_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_SMSC_PHY is not set\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\nCONFIG_ICPLUS_PHY=y\nCONFIG_REALTEK_PHY=y\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_STE10XP is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_MICREL_PHY is not set\n# CONFIG_FIXED_PHY is not set\n# CONFIG_MDIO_BITBANG is not set\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n# CONFIG_MICREL_KS8995MA is not set\nCONFIG_PPP=y\nCONFIG_PPP_BSDCOMP=m\nCONFIG_PPP_DEFLATE=m\n# CONFIG_PPP_FILTER is not set\nCONFIG_PPP_MPPE=m\n# CONFIG_PPP_MULTILINK is not set\nCONFIG_PPPOE=m\nCONFIG_PPPOLAC=y\nCONFIG_PPPOPNS=y\nCONFIG_PPP_ASYNC=m\n# CONFIG_PPP_SYNC_TTY is not set\n# CONFIG_SLIP is not set\nCONFIG_SLHC=y\n\n#\n# USB Network Adapters\n#\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\n# CONFIG_USB_PEGASUS is not set\n# CONFIG_USB_RTL8150 is not set\n# CONFIG_USB_RTL8152 is not set\nCONFIG_USB_USBNET=y\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\n# CONFIG_USB_NET_CDC_EEM is not set\n# CONFIG_USB_NET_CDC_NCM is not set\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\nCONFIG_USB_NET_DM9601=m\n# CONFIG_USB_NET_SR9700 is not set\n# CONFIG_USB_NET_SR9800 is not set\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=y\n# CONFIG_USB_NET_GL620A is not set\n# CONFIG_USB_NET_NET1080 is not set\n# CONFIG_USB_NET_PLUSB is not set\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\n# CONFIG_USB_NET_CDC_SUBSET is not set\n# CONFIG_USB_NET_ZAURUS is not set\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\n# CONFIG_USB_HSO is not set\n# CONFIG_USB_NET_INT51X1 is not set\nCONFIG_USB_IPHETH=m\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\nCONFIG_WLAN=y\n# CONFIG_LIBERTAS_THINFIRM is not set\n# CONFIG_AT76C50X_USB is not set\nCONFIG_USB_ZD1201=m\nCONFIG_USB_NET_RNDIS_WLAN=m\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\n# CONFIG_MAC80211_HWSIM is not set\n# CONFIG_WIFI_CONTROL_FUNC is not set\nCONFIG_ATH_COMMON=m\nCONFIG_ATH_CARDS=m\n# CONFIG_ATH_DEBUG is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\nCONFIG_ATH9K=m\nCONFIG_ATH9K_AHB=y\n# CONFIG_ATH9K_DEBUGFS is not set\n# CONFIG_ATH9K_WOW is not set\n# CONFIG_ATH9K_LEGACY_RATE_CONTROL is not set\nCONFIG_ATH9K_RFKILL=y\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\nCONFIG_CARL9170_HWRNG=y\nCONFIG_ATH6KL=m\n# CONFIG_ATH6KL_SDIO is not set\nCONFIG_ATH6KL_USB=m\n# CONFIG_ATH6KL_DEBUG is not set\n# CONFIG_ATH6KL_TRACING is not set\nCONFIG_AR5523=m\n# CONFIG_ATH10K is not set\n# CONFIG_WCN36XX is not set\nCONFIG_B43=m\nCONFIG_B43_SSB=y\n# CONFIG_B43_SDIO is not set\nCONFIG_B43_PIO=y\nCONFIG_B43_PHY_N=y\nCONFIG_B43_PHY_LP=y\nCONFIG_B43_LEDS=y\nCONFIG_B43_HWRNG=y\n# CONFIG_B43_DEBUG is not set\n# CONFIG_B43LEGACY is not set\nCONFIG_BRCMUTIL=m\n# CONFIG_BRCMSMAC is not set\nCONFIG_BRCMFMAC=m\n# CONFIG_BRCMFMAC_SDIO is not set\nCONFIG_BRCMFMAC_USB=y\n# CONFIG_BRCM_TRACING is not set\n# CONFIG_BRCMDBG is not set\n# CONFIG_HOSTAP is not set\n# CONFIG_LIBERTAS is not set\nCONFIG_P54_COMMON=m\nCONFIG_P54_USB=m\n# CONFIG_P54_SPI is not set\nCONFIG_P54_LEDS=y\nCONFIG_RT2X00=m\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_RTL_CARDS=m\n# CONFIG_WL_TI is not set\nCONFIG_ZD1211RW=m\n# CONFIG_ZD1211RW_DEBUG is not set\n# CONFIG_MWIFIEX is not set\n# CONFIG_CW1200 is not set\n\n#\n# Enable WiMAX (Networking options) to see the WiMAX drivers\n#\n# CONFIG_WAN is not set\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_POLLDEV is not set\n# CONFIG_INPUT_SPARSEKMAP is not set\n# CONFIG_INPUT_MATRIXKMAP is not set\n\n#\n# Userland interfaces\n#\nCONFIG_INPUT_MOUSEDEV=y\n# CONFIG_INPUT_MOUSEDEV_PSAUX is not set\nCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024\nCONFIG_INPUT_MOUSEDEV_SCREEN_Y=768\nCONFIG_INPUT_JOYDEV=y\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n# CONFIG_INPUT_KEYRESET is not set\n# CONFIG_INPUT_KEYCOMBO is not set\n\n#\n# Input Device Drivers\n#\n# CONFIG_INPUT_KEYBOARD is not set\n# CONFIG_INPUT_MOUSE is not set\nCONFIG_INPUT_JOYSTICK=y\n# CONFIG_JOYSTICK_ANALOG is not set\n# CONFIG_JOYSTICK_A3D is not set\n# CONFIG_JOYSTICK_ADI is not set\n# CONFIG_JOYSTICK_COBRA is not set\n# CONFIG_JOYSTICK_GF2K is not set\n# CONFIG_JOYSTICK_GRIP is not set\n# CONFIG_JOYSTICK_GRIP_MP is not set\n# CONFIG_JOYSTICK_GUILLEMOT is not set\n# CONFIG_JOYSTICK_INTERACT is not set\n# CONFIG_JOYSTICK_SIDEWINDER is not set\n# CONFIG_JOYSTICK_TMDC is not set\n# CONFIG_JOYSTICK_IFORCE is not set\n# CONFIG_JOYSTICK_WARRIOR is not set\n# CONFIG_JOYSTICK_MAGELLAN is not set\n# CONFIG_JOYSTICK_SPACEORB is not set\n# CONFIG_JOYSTICK_SPACEBALL is not set\n# CONFIG_JOYSTICK_STINGER is not set\n# CONFIG_JOYSTICK_TWIDJOY is not set\n# CONFIG_JOYSTICK_ZHENHUA is not set\n# CONFIG_JOYSTICK_AS5011 is not set\n# CONFIG_JOYSTICK_JOYDUMP is not set\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\n# CONFIG_INPUT_TABLET is not set\nCONFIG_INPUT_TOUCHSCREEN=y\nCONFIG_TOUCHSCREEN_ADS7846=m\n# CONFIG_TOUCHSCREEN_AD7877 is not set\n# CONFIG_TOUCHSCREEN_AD7879 is not set\n# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set\n# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_BU21013 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set\n# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set\n# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set\n# CONFIG_TOUCHSCREEN_DYNAPRO is not set\n# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set\n# CONFIG_TOUCHSCREEN_EETI is not set\nCONFIG_TOUCHSCREEN_EGALAX=m\n# CONFIG_TOUCHSCREEN_FUJITSU is not set\n# CONFIG_TOUCHSCREEN_ILI210X is not set\n# CONFIG_TOUCHSCREEN_GUNZE is not set\n# CONFIG_TOUCHSCREEN_ELO is not set\n# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set\n# CONFIG_TOUCHSCREEN_WACOM_I2C is not set\n# CONFIG_TOUCHSCREEN_MAX11801 is not set\n# CONFIG_TOUCHSCREEN_MCS5000 is not set\n# CONFIG_TOUCHSCREEN_MMS114 is not set\n# CONFIG_TOUCHSCREEN_MTOUCH is not set\n# CONFIG_TOUCHSCREEN_INEXIO is not set\n# CONFIG_TOUCHSCREEN_MK712 is not set\n# CONFIG_TOUCHSCREEN_PENMOUNT is not set\n# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set\n# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set\n# CONFIG_TOUCHSCREEN_TOUCHWIN is not set\n# CONFIG_TOUCHSCREEN_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_WM97XX is not set\nCONFIG_TOUCHSCREEN_USB_COMPOSITE=m\nCONFIG_TOUCHSCREEN_USB_EGALAX=y\nCONFIG_TOUCHSCREEN_USB_PANJIT=y\nCONFIG_TOUCHSCREEN_USB_3M=y\nCONFIG_TOUCHSCREEN_USB_ITM=y\nCONFIG_TOUCHSCREEN_USB_ETURBO=y\nCONFIG_TOUCHSCREEN_USB_GUNZE=y\nCONFIG_TOUCHSCREEN_USB_DMC_TSC10=y\nCONFIG_TOUCHSCREEN_USB_IRTOUCH=y\nCONFIG_TOUCHSCREEN_USB_IDEALTEK=y\nCONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y\nCONFIG_TOUCHSCREEN_USB_GOTOP=y\nCONFIG_TOUCHSCREEN_USB_JASTEC=y\nCONFIG_TOUCHSCREEN_USB_ELO=y\nCONFIG_TOUCHSCREEN_USB_E2I=y\nCONFIG_TOUCHSCREEN_USB_ZYTRONIC=y\nCONFIG_TOUCHSCREEN_USB_ETT_TC45USB=y\nCONFIG_TOUCHSCREEN_USB_NEXIO=y\nCONFIG_TOUCHSCREEN_USB_EASYTOUCH=y\n# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set\n# CONFIG_TOUCHSCREEN_TSC_SERIO is not set\n# CONFIG_TOUCHSCREEN_TSC2005 is not set\n# CONFIG_TOUCHSCREEN_TSC2007 is not set\n# CONFIG_TOUCHSCREEN_W90X900 is not set\nCONFIG_TOUCHSCREEN_ST1232=m\n# CONFIG_TOUCHSCREEN_SUR40 is not set\n# CONFIG_TOUCHSCREEN_TPS6507X is not set\n# CONFIG_TOUCHSCREEN_ZFORCE is not set\nCONFIG_TOUCHSCREEN_DWAV_USB_MT=m\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_MPU3050 is not set\n# CONFIG_INPUT_GP2A is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_TILT_POLLED is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYCHORD is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\nCONFIG_INPUT_UINPUT=y\nCONFIG_INPUT_GPIO=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_CMA3000 is not set\n\n#\n# Hardware I/O ports\n#\n# CONFIG_SERIO is not set\n# CONFIG_GAMEPORT is not set\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\nCONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n# CONFIG_LEGACY_PTYS is not set\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_TRACE_SINK is not set\nCONFIG_DEVMEM=y\nCONFIG_DEVKMEM=y\n\n#\n# Serial drivers\n#\n# CONFIG_SERIAL_8250 is not set\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\n# CONFIG_SERIAL_AMBA_PL011 is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_TIMBERDALE is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_IFX6X60 is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SUPPORT_SYSRQ is not set\nCONFIG_TTY_PRINTK=y\n# CONFIG_VIRTIO_CONSOLE is not set\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_ATMEL is not set\nCONFIG_HW_RANDOM_MESON=y\n# CONFIG_HW_RANDOM_VIRTIO is not set\n# CONFIG_HW_RANDOM_EXYNOS is not set\n# CONFIG_R3964 is not set\n\n#\n# PCMCIA character devices\n#\n# CONFIG_RAW_DRIVER is not set\n# CONFIG_TCG_TPM is not set\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\n# CONFIG_I2C_MUX_PINCTRL is not set\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CBUS_GPIO is not set\n# CONFIG_I2C_DESIGNWARE_PLATFORM is not set\nCONFIG_I2C_GPIO=y\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_PXA_PCI is not set\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_PARPORT_LIGHT is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\nCONFIG_SPI_BITBANG=y\nCONFIG_SPI_GPIO=y\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_OC_TINY is not set\n# CONFIG_SPI_PL022 is not set\n# CONFIG_SPI_PXA2XX_PCI is not set\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_DESIGNWARE is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=y\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_HSI is not set\n\n#\n# PPS support\n#\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\nCONFIG_PINCTRL=y\n\n#\n# Pin controllers\n#\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_CAPRI is not set\n# CONFIG_PINCTRL_MSM8X74 is not set\n# CONFIG_PINCTRL_SINGLE is not set\nCONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y\nCONFIG_ARCH_REQUIRE_GPIOLIB=y\nCONFIG_GPIOLIB=y\nCONFIG_GPIO_DEVRES=y\nCONFIG_OF_GPIO=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_SYSFS=y\n\n#\n# Memory mapped GPIO drivers:\n#\n# CONFIG_GPIO_GENERIC_PLATFORM is not set\n# CONFIG_GPIO_PL061 is not set\n# CONFIG_GPIO_SCH311X is not set\n# CONFIG_GPIO_TS5500 is not set\n# CONFIG_GPIO_GRGPIO is not set\n\n#\n# I2C GPIO expanders:\n#\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\n# CONFIG_GPIO_PCA953X is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_SX150X is not set\n# CONFIG_GPIO_ADP5588 is not set\n# CONFIG_GPIO_ADNP is not set\n\n#\n# PCI GPIO expanders:\n#\n\n#\n# SPI GPIO expanders:\n#\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MCP23S08 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_74X164 is not set\n\n#\n# AC97 GPIO expanders:\n#\n\n#\n# LPC GPIO expanders:\n#\n\n#\n# MODULbus GPIO expanders:\n#\n# CONFIG_GPIO_BCM_KONA is not set\n\n#\n# USB GPIO expanders:\n#\n# CONFIG_W1 is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\n# CONFIG_PDA_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_BATTERY_BQ27x00 is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_SMB347 is not set\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_GPIO is not set\nCONFIG_POWER_RESET_VEXPRESS=y\n# CONFIG_POWER_RESET_XGENE is not set\n# CONFIG_POWER_AVS is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_VID is not set\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_GPIO_FAN is not set\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_HTU21 is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH56XX_COMMON is not set\n# CONFIG_SENSORS_ADS1015 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_VEXPRESS is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\nCONFIG_THERMAL_WRITABLE_TRIPS=y\n# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\nCONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_GOV_STEP_WISE is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\nCONFIG_THERMAL_GOV_POWER_ALLOCATOR=y\nCONFIG_CPU_THERMAL=y\nCONFIG_DEVFREQ_THERMAL=y\nCONFIG_CPUCORE_THERMAL=y\nCONFIG_GPU_THERMAL=y\nCONFIG_GPUCORE_THERMAL=y\n# CONFIG_THERMAL_EMULATION is not set\n\n#\n# Texas Instruments thermal drivers\n#\n# CONFIG_WATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\n\n#\n# Sonics Silicon Backplane\n#\nCONFIG_SSB=m\nCONFIG_SSB_BLOCKIO=y\nCONFIG_SSB_SDIOHOST_POSSIBLE=y\n# CONFIG_SSB_SDIOHOST is not set\n# CONFIG_SSB_SILENT is not set\n# CONFIG_SSB_DEBUG is not set\n# CONFIG_SSB_DRIVER_GPIO is not set\nCONFIG_BCMA_POSSIBLE=y\n\n#\n# Broadcom specific AMBA\n#\n# CONFIG_BCMA is not set\n\n#\n# Multifunction device drivers\n#\n# CONFIG_MFD_CORE is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_CROS_EC is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_UCB1400_CORE is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_SEC_CORE is not set\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SMSC is not set\n# CONFIG_ABX500_CORE is not set\n# CONFIG_MFD_STMPE is not set\n# CONFIG_MFD_SYSCON is not set\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_MFD_TPS80031 is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_TMIO is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\nCONFIG_VEXPRESS_CONFIG=y\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\n# CONFIG_REGULATOR_FIXED_VOLTAGE is not set\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\n# CONFIG_REGULATOR_GPIO is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS6524X is not set\n# CONFIG_REGULATOR_VEXPRESS is not set\nCONFIG_MEDIA_SUPPORT=m\n\n#\n# Multimedia core support\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\n# CONFIG_MEDIA_RADIO_SUPPORT is not set\nCONFIG_MEDIA_RC_SUPPORT=y\n# CONFIG_MEDIA_CONTROLLER is not set\nCONFIG_VIDEO_DEV=m\nCONFIG_VIDEO_V4L2=m\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_VIDEO_TUNER=m\nCONFIG_VIDEOBUF_GEN=m\nCONFIG_VIDEOBUF_RESOURCE=m\nCONFIG_VIDEOBUF2_CORE=m\nCONFIG_VIDEOBUF2_MEMOPS=m\nCONFIG_VIDEOBUF2_VMALLOC=m\nCONFIG_DVB_CORE=m\nCONFIG_DVB_NET=y\nCONFIG_TTPCI_EEPROM=m\nCONFIG_DVB_MAX_ADAPTERS=8\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n\n#\n# Media drivers\n#\nCONFIG_RC_CORE=m\nCONFIG_RC_MAP=m\nCONFIG_RC_DECODERS=y\nCONFIG_LIRC=m\nCONFIG_IR_LIRC_CODEC=m\nCONFIG_IR_NEC_DECODER=m\nCONFIG_IR_RC5_DECODER=m\nCONFIG_IR_RC6_DECODER=m\nCONFIG_IR_JVC_DECODER=m\nCONFIG_IR_SONY_DECODER=m\nCONFIG_IR_RC5_SZ_DECODER=m\nCONFIG_IR_SANYO_DECODER=m\nCONFIG_IR_MCE_KBD_DECODER=m\nCONFIG_RC_DEVICES=y\nCONFIG_RC_ATI_REMOTE=m\nCONFIG_IR_IMON=m\nCONFIG_IR_MCEUSB=m\nCONFIG_IR_MESON=m\nCONFIG_IR_REDRAT3=m\nCONFIG_IR_STREAMZAP=m\nCONFIG_IR_IGUANA=m\nCONFIG_IR_TTUSBIR=m\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_IR_GPIO_CIR=m\nCONFIG_IR_GPIOPLUG_CIR=m\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\nCONFIG_USB_VIDEO_CLASS=m\nCONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y\nCONFIG_USB_GSPCA=m\n# CONFIG_USB_M5602 is not set\n# CONFIG_USB_STV06XX is not set\n# CONFIG_USB_GL860 is not set\n# CONFIG_USB_GSPCA_BENQ is not set\n# CONFIG_USB_GSPCA_CONEX is not set\n# CONFIG_USB_GSPCA_CPIA1 is not set\n# CONFIG_USB_GSPCA_ETOMS is not set\n# CONFIG_USB_GSPCA_FINEPIX is not set\n# CONFIG_USB_GSPCA_JEILINJ is not set\n# CONFIG_USB_GSPCA_JL2005BCD is not set\n# CONFIG_USB_GSPCA_KINECT is not set\n# CONFIG_USB_GSPCA_KONICA is not set\n# CONFIG_USB_GSPCA_MARS is not set\n# CONFIG_USB_GSPCA_MR97310A is not set\n# CONFIG_USB_GSPCA_NW80X is not set\n# CONFIG_USB_GSPCA_OV519 is not set\n# CONFIG_USB_GSPCA_OV534 is not set\n# CONFIG_USB_GSPCA_OV534_9 is not set\n# CONFIG_USB_GSPCA_PAC207 is not set\n# CONFIG_USB_GSPCA_PAC7302 is not set\n# CONFIG_USB_GSPCA_PAC7311 is not set\n# CONFIG_USB_GSPCA_SE401 is not set\n# CONFIG_USB_GSPCA_SN9C2028 is not set\n# CONFIG_USB_GSPCA_SN9C20X is not set\n# CONFIG_USB_GSPCA_SONIXB is not set\n# CONFIG_USB_GSPCA_SONIXJ is not set\n# CONFIG_USB_GSPCA_SPCA500 is not set\n# CONFIG_USB_GSPCA_SPCA501 is not set\n# CONFIG_USB_GSPCA_SPCA505 is not set\n# CONFIG_USB_GSPCA_SPCA506 is not set\n# CONFIG_USB_GSPCA_SPCA508 is not set\n# CONFIG_USB_GSPCA_SPCA561 is not set\n# CONFIG_USB_GSPCA_SPCA1528 is not set\n# CONFIG_USB_GSPCA_SQ905 is not set\n# CONFIG_USB_GSPCA_SQ905C is not set\n# CONFIG_USB_GSPCA_SQ930X is not set\n# CONFIG_USB_GSPCA_STK014 is not set\n# CONFIG_USB_GSPCA_STK1135 is not set\n# CONFIG_USB_GSPCA_STV0680 is not set\n# CONFIG_USB_GSPCA_SUNPLUS is not set\n# CONFIG_USB_GSPCA_T613 is not set\n# CONFIG_USB_GSPCA_TOPRO is not set\n# CONFIG_USB_GSPCA_TV8532 is not set\n# CONFIG_USB_GSPCA_VC032X is not set\n# CONFIG_USB_GSPCA_VICAM is not set\n# CONFIG_USB_GSPCA_XIRLINK_CIT is not set\n# CONFIG_USB_GSPCA_ZC3XX is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_VIDEO_CPIA2 is not set\n# CONFIG_USB_ZR364XX is not set\n# CONFIG_USB_STKWEBCAM is not set\n# CONFIG_USB_S2255 is not set\n# CONFIG_VIDEO_USBTV is not set\n\n#\n# Analog TV USB devices\n#\n# CONFIG_VIDEO_PVRUSB2 is not set\n# CONFIG_VIDEO_HDPVR is not set\n# CONFIG_VIDEO_TLG2300 is not set\n# CONFIG_VIDEO_USBVISION is not set\nCONFIG_VIDEO_STK1160_COMMON=m\n# CONFIG_VIDEO_STK1160_AC97 is not set\nCONFIG_VIDEO_STK1160=m\n\n#\n# Analog/digital TV USB devices\n#\n# CONFIG_VIDEO_AU0828 is not set\n# CONFIG_VIDEO_CX231XX is not set\n# CONFIG_VIDEO_TM6000 is not set\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_USB=m\n# CONFIG_DVB_USB_DEBUG is not set\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_DIBUSB_MB=m\nCONFIG_DVB_USB_DIBUSB_MB_FAULTY=y\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_CXUSB=m\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_DTT200U=m\n# CONFIG_DVB_USB_OPERA1 is not set\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_FRIIO=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\n# CONFIG_DVB_USB_IT913X is not set\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_SMS_USB_DRV=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\nCONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG=y\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\nCONFIG_VIDEO_EM28XX=m\n# CONFIG_VIDEO_EM28XX_V4L2 is not set\n# CONFIG_VIDEO_EM28XX_ALSA is not set\nCONFIG_VIDEO_EM28XX_DVB=m\nCONFIG_VIDEO_EM28XX_RC=m\nCONFIG_V4L_PLATFORM_DRIVERS=y\n# CONFIG_SOC_CAMERA is not set\n# CONFIG_V4L_MEM2MEM_DRIVERS is not set\n# CONFIG_V4L_TEST_DRIVERS is not set\n\n#\n# Supported MMC/SDIO adapters\n#\n# CONFIG_SMS_SDIO_DRV is not set\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_DVB_B2C2_FLEXCOP_DEBUG=y\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\n\n#\n# Media ancillary drivers (tuners, sensors, i2c, frontends)\n#\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\nCONFIG_MEDIA_ATTACH=y\nCONFIG_VIDEO_IR_I2C=m\n\n#\n# Audio decoders, processors and mixers\n#\n\n#\n# RDS decoders\n#\n\n#\n# Video decoders\n#\nCONFIG_VIDEO_SAA711X=m\n\n#\n# Video and audio decoders\n#\n\n#\n# Video encoders\n#\n\n#\n# Camera sensor devices\n#\n\n#\n# Flash devices\n#\n\n#\n# Video improvement chips\n#\n\n#\n# Audio/Video compression chips\n#\n\n#\n# Miscellaneous helper chips\n#\n\n#\n# Sensors used on soc_camera driver\n#\nCONFIG_MEDIA_TUNER=m\nCONFIG_MEDIA_TUNER_SIMPLE=m\nCONFIG_MEDIA_TUNER_TDA8290=m\nCONFIG_MEDIA_TUNER_TDA827X=m\nCONFIG_MEDIA_TUNER_TDA18271=m\nCONFIG_MEDIA_TUNER_TDA9887=m\nCONFIG_MEDIA_TUNER_MT20XX=m\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT2266=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_XC2028=m\nCONFIG_MEDIA_TUNER_XC5000=m\nCONFIG_MEDIA_TUNER_XC4000=m\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\nCONFIG_MEDIA_TUNER_MC44S803=m\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_M88TS2022=m\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_IT913X=m\nCONFIG_MEDIA_TUNER_R820T=m\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\nCONFIG_DVB_STV6110x=m\nCONFIG_DVB_M88DS3103=m\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_TDA18271C2DD=m\n\n#\n# DVB-S (satellite) frontends\n#\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_MT312=m\nCONFIG_DVB_ZL10039=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_TDA10086=m\nCONFIG_DVB_TUNER_ITD1000=m\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_CX24116=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_TS2020=m\nCONFIG_DVB_DS3000=m\nCONFIG_DVB_TDA10071=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_MT352=m\nCONFIG_DVB_ZL10353=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_TDA10023=m\nCONFIG_DVB_STV0297=m\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_NXT200X=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LGDT330X=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_S5H1411=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_S921=m\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_A8293=m\nCONFIG_DVB_LGS8GXX=m\nCONFIG_DVB_ATBM8830=m\nCONFIG_DVB_IX2505V=m\nCONFIG_DVB_M88RS2000=m\nCONFIG_DVB_AF9033=m\n\n#\n# Tools to develop new frontends\n#\n# CONFIG_DVB_DUMMY_FE is not set\n\n#\n# Graphics support\n#\n# CONFIG_DRM is not set\n# CONFIG_VGASTATE is not set\n# CONFIG_VIDEO_OUTPUT_CONTROL is not set\n# CONFIG_VEXPRESS_DVI_CONTROL is not set\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\n# CONFIG_FB_DDC is not set\n# CONFIG_FB_BOOT_VESA_SUPPORT is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\n# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set\nCONFIG_FB_SYS_FILLRECT=m\nCONFIG_FB_SYS_COPYAREA=m\nCONFIG_FB_SYS_IMAGEBLIT=m\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=m\nCONFIG_FB_DEFERRED_IO=y\n# CONFIG_FB_SVGALIB is not set\n# CONFIG_FB_MACMODES is not set\n# CONFIG_FB_BACKLIGHT is not set\nCONFIG_FB_MODE_HELPERS=y\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_SMSCUFX is not set\nCONFIG_FB_UDL=m\n# CONFIG_FB_GOLDFISH is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_BROADSHEET is not set\n# CONFIG_FB_AUO_K190X is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_EXYNOS_VIDEO is not set\n# CONFIG_BACKLIGHT_LCD_SUPPORT is not set\n# CONFIG_ADF is not set\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_FRAMEBUFFER_CONSOLE=m\n# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_LOGO is not set\n# CONFIG_FB_SSD1307 is not set\nCONFIG_SOUND=y\n# CONFIG_SOUND_OSS_CORE is not set\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_HWDEP=m\nCONFIG_SND_RAWMIDI=m\nCONFIG_SND_COMPRESS_OFFLOAD=y\nCONFIG_SND_JACK=y\nCONFIG_SND_SEQUENCER=y\nCONFIG_SND_SEQ_DUMMY=n\nCONFIG_SND_SEQUENCER_OSS=n\nCONFIG_SND_SEQ_HRTIMER_DEFAULT=y\n# CONFIG_SND_MIXER_OSS is not set\n# CONFIG_SND_PCM_OSS is not set\nCONFIG_SND_HRTIMER=m\nCONFIG_SND_DYNAMIC_MINORS=y\nCONFIG_SND_MAX_CARDS=32\n# CONFIG_SND_SUPPORT_OLD_API is not set\n# CONFIG_SND_VERBOSE_PROCFS is not set\n# CONFIG_SND_VERBOSE_PRINTK is not set\n# CONFIG_SND_DEBUG is not set\nCONFIG_SND_VMASTER=y\nCONFIG_SND_RAWMIDI_SEQ=y\n# CONFIG_SND_OPL3_LIB_SEQ is not set\n# CONFIG_SND_OPL4_LIB_SEQ is not set\n# CONFIG_SND_SBAWE_SEQ is not set\n# CONFIG_SND_EMU10K1_SEQ is not set\nCONFIG_SND_AC97_CODEC=m\n# CONFIG_SND_DRIVERS is not set\n# CONFIG_SND_SPI is not set\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=m\nCONFIG_SND_USB_UA101=m\nCONFIG_SND_USB_CAIAQ=m\nCONFIG_SND_USB_CAIAQ_INPUT=y\nCONFIG_SND_USB_6FIRE=m\n# CONFIG_SND_USB_HIFACE is not set\nCONFIG_SND_SOC=y\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\nCONFIG_SND_AML_M8_SOC=y\nCONFIG_SND_AML_M8=y\nCONFIG_SND_AML_SPLIT_MODE=y\n# CONFIG_SND_AML_SPLIT_MODE_MMAP is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\nCONFIG_SND_SOC_DUMMY_CODEC=y\nCONFIG_SND_SOC_TAS5707=y\nCONFIG_SND_SOC_TAS5717=y\nCONFIG_SND_SOC_TAS5731=y\nCONFIG_SND_SOC_AMLPMU4=y\nCONFIG_SND_SOC_ES8323=y\nCONFIG_SND_SOC_PCM2BT=y\nCONFIG_SND_SOC_AMLT9015=y\nCONFIG_SND_SOC_AMLT9015S=y\n# CONFIG_SND_SIMPLE_CARD is not set\n# CONFIG_SOUND_PRIME is not set\nCONFIG_AC97_BUS=m\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\n# CONFIG_HID_APPLEIR is not set\nCONFIG_HID_AUREAL=y\nCONFIG_HID_BELKIN=y\nCONFIG_HID_CHERRY=y\nCONFIG_HID_CHICONY=y\n# CONFIG_HID_DIA_REMOTE is not set\n# CONFIG_HID_PRODIKEYS is not set\nCONFIG_HID_CYPRESS=y\nCONFIG_HID_DRAGONRISE=m\nCONFIG_DRAGONRISE_FF=y\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\nCONFIG_HID_EZKEY=y\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_HUION is not set\n# CONFIG_HID_KEYTOUCH is not set\nCONFIG_HID_KYE=y\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\nCONFIG_HID_GYRATION=y\n# CONFIG_HID_ICADE is not set\nCONFIG_HID_TWINHAN=y\nCONFIG_HID_KENSINGTON=y\nCONFIG_HID_LCPOWER=y\nCONFIG_HID_LENOVO_TPKBD=m\nCONFIG_HID_LOGITECH=y\nCONFIG_HID_LOGITECH_DJ=y\nCONFIG_LOGITECH_FF=y\nCONFIG_LOGIRUMBLEPAD2_FF=y\nCONFIG_LOGIG940_FF=y\nCONFIG_LOGIWHEELS_FF=y\n# CONFIG_HID_MAGICMOUSE is not set\nCONFIG_HID_MICROSOFT=y\nCONFIG_HID_MONTEREY=y\nCONFIG_HID_MULTITOUCH=y\n# CONFIG_HID_NTRIG is not set\nCONFIG_HID_ORTEK=y\nCONFIG_HID_PANTHERLORD=y\nCONFIG_PANTHERLORD_FF=y\nCONFIG_HID_PETALYNX=y\nCONFIG_HID_PICOLCD=m\nCONFIG_HID_PICOLCD_FB=y\nCONFIG_HID_PICOLCD_LEDS=y\n# CONFIG_HID_PICOLCD_CIR is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\nCONFIG_HID_SAMSUNG=y\nCONFIG_HID_SONY=y\nCONFIG_SONY_FF=y\n# CONFIG_HID_SPEEDLINK is not set\n# CONFIG_HID_STEELSERIES is not set\nCONFIG_HID_SUNPLUS=y\n# CONFIG_HID_GREENASIA is not set\n# CONFIG_HID_SMARTJOYPLUS is not set\nCONFIG_HID_TIVO=y\nCONFIG_HID_TOPSEED=y\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_WACOM is not set\nCONFIG_HID_WIIMOTE=m\nCONFIG_HID_XINMO=m\n# CONFIG_HID_ZEROPLUS is not set\nCONFIG_HID_ZYDACRON=y\n# CONFIG_HID_SENSOR_HUB is not set\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID is not set\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\n# CONFIG_USB_DEBUG is not set\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_DYNAMIC_MINORS is not set\n# CONFIG_USB_OTG_WHITELIST is not set\n# CONFIG_USB_OTG_BLACKLIST_HUB is not set\n# CONFIG_USB_MON is not set\n# CONFIG_USB_WUSB_CBAF is not set\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\nCONFIG_USB_XHCI_PLATFORM=y\nCONFIG_USB_EHCI_HCD=y\n# CONFIG_USB_EHCI_ROOT_HUB_TT is not set\nCONFIG_USB_EHCI_TT_NEWSCHED=y\nCONFIG_USB_EHCI_HCD_SYNOPSYS=y\n# CONFIG_USB_EHCI_HCD_PLATFORM is not set\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_ISP1760_HCD is not set\n# CONFIG_USB_ISP1362_HCD is not set\n# CONFIG_USB_FUSBH200_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\nCONFIG_USB_OHCI_HCD=y\n# CONFIG_USB_OHCI_HCD_PLATFORM is not set\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_SSB is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n# CONFIG_USB_RENESAS_USBHS is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=m\n# CONFIG_USB_PRINTER is not set\n# CONFIG_USB_WDM is not set\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USB_MUSB_HDRC is not set\nCONFIG_USB_DWC3=y\nCONFIG_USB_DWC3_HOST=y\n# CONFIG_USB_DWC3_GADGET is not set\n# CONFIG_USB_DWC3_DUAL_ROLE is not set\n\n#\n# Platform Glue Driver Support\n#\n# CONFIG_USB_DWC3_EXYNOS is not set\n# CONFIG_USB_DWC3_KEYSTONE is not set\n\n#\n# Debugging features\n#\n# CONFIG_USB_DWC3_DEBUG is not set\n# CONFIG_DWC3_HOST_USB3_LPM_ENABLE is not set\n# CONFIG_USB_DWC2 is not set\n# CONFIG_USB_CHIPIDEA is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=y\nCONFIG_USB_SERIAL_CONSOLE=y\nCONFIG_USB_SERIAL_GENERIC=y\n# CONFIG_USB_SERIAL_SIMPLE is not set\n# CONFIG_USB_SERIAL_AIRCABLE is not set\n# CONFIG_USB_SERIAL_ARK3116 is not set\n# CONFIG_USB_SERIAL_BELKIN is not set\nCONFIG_USB_SERIAL_CH341=m\n# CONFIG_USB_SERIAL_WHITEHEAT is not set\n# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set\nCONFIG_USB_SERIAL_CP210X=m\n# CONFIG_USB_SERIAL_CYPRESS_M8 is not set\n# CONFIG_USB_SERIAL_EMPEG is not set\nCONFIG_USB_SERIAL_FTDI_SIO=m\n# CONFIG_USB_SERIAL_VISOR is not set\n# CONFIG_USB_SERIAL_IPAQ is not set\n# CONFIG_USB_SERIAL_IR is not set\n# CONFIG_USB_SERIAL_EDGEPORT is not set\n# CONFIG_USB_SERIAL_EDGEPORT_TI is not set\n# CONFIG_USB_SERIAL_F81232 is not set\n# CONFIG_USB_SERIAL_GARMIN is not set\n# CONFIG_USB_SERIAL_IPW is not set\nCONFIG_USB_SERIAL_IUU=m\n# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set\n# CONFIG_USB_SERIAL_KEYSPAN is not set\n# CONFIG_USB_SERIAL_KLSI is not set\n# CONFIG_USB_SERIAL_KOBIL_SCT is not set\n# CONFIG_USB_SERIAL_MCT_U232 is not set\n# CONFIG_USB_SERIAL_METRO is not set\n# CONFIG_USB_SERIAL_MOS7720 is not set\n# CONFIG_USB_SERIAL_MOS7840 is not set\n# CONFIG_USB_SERIAL_MXUPORT is not set\n# CONFIG_USB_SERIAL_NAVMAN is not set\nCONFIG_USB_SERIAL_PL2303=y\n# CONFIG_USB_SERIAL_OTI6858 is not set\n# CONFIG_USB_SERIAL_QCAUX is not set\n# CONFIG_USB_SERIAL_QUALCOMM is not set\n# CONFIG_USB_SERIAL_SPCP8X5 is not set\n# CONFIG_USB_SERIAL_SAFE is not set\n# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set\n# CONFIG_USB_SERIAL_SYMBOL is not set\n# CONFIG_USB_SERIAL_TI is not set\n# CONFIG_USB_SERIAL_CYBERJACK is not set\n# CONFIG_USB_SERIAL_XIRCOM is not set\n# CONFIG_USB_SERIAL_OPTION is not set\n# CONFIG_USB_SERIAL_OMNINET is not set\n# CONFIG_USB_SERIAL_OPTICON is not set\n# CONFIG_USB_SERIAL_XSENS_MT is not set\n# CONFIG_USB_SERIAL_WISHBONE is not set\n# CONFIG_USB_SERIAL_ZTE is not set\n# CONFIG_USB_SERIAL_SSU100 is not set\n# CONFIG_USB_SERIAL_QT2 is not set\n# CONFIG_USB_SERIAL_DEBUG is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_RIO500 is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_LED is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\n# CONFIG_USB_EZUSB_FX2 is not set\n# CONFIG_USB_HSIC_USB3503 is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\n# CONFIG_USB_OTG_FSM is not set\n# CONFIG_USB_OTG_WAKELOCK is not set\n# CONFIG_NOP_USB_XCEIV is not set\n# CONFIG_SAMSUNG_USB2PHY is not set\n# CONFIG_SAMSUNG_USB3PHY is not set\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\n# CONFIG_USB_RCAR_PHY is not set\n# CONFIG_USB_ULPI is not set\nCONFIG_AMLOGIC_USBPHY=y\nCONFIG_AMLOGIC_USB2PHY=y\nCONFIG_AMLOGIC_USB3PHY=y\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\n# CONFIG_USB_GADGET_DEBUG_FILES is not set\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=2\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\n# CONFIG_USB_M66592 is not set\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_DUMMY_HCD is not set\nCONFIG_USB_LIBCOMPOSITE=m\nCONFIG_USB_U_ETHER=m\nCONFIG_USB_F_ECM=m\nCONFIG_USB_F_EEM=m\nCONFIG_USB_F_SUBSET=m\nCONFIG_USB_F_RNDIS=m\n# CONFIG_USB_CONFIGFS is not set\n# CONFIG_USB_ZERO is not set\n# CONFIG_USB_AUDIO is not set\nCONFIG_USB_ETH=m\nCONFIG_USB_ETH_RNDIS=y\nCONFIG_USB_ETH_EEM=y\n# CONFIG_USB_G_NCM is not set\n# CONFIG_USB_GADGETFS is not set\n# CONFIG_USB_FUNCTIONFS is not set\n# CONFIG_USB_MASS_STORAGE is not set\n# CONFIG_USB_G_SERIAL is not set\n# CONFIG_USB_MIDI_GADGET is not set\n# CONFIG_USB_G_PRINTER is not set\n# CONFIG_USB_CDC_COMPOSITE is not set\n# CONFIG_USB_G_ACM_MS is not set\n# CONFIG_USB_G_MULTI is not set\n# CONFIG_USB_G_HID is not set\n# CONFIG_USB_G_DBGP is not set\n# CONFIG_USB_G_WEBCAM is not set\nCONFIG_MMC=y\n# CONFIG_MMC_DEBUG is not set\nCONFIG_PXP_MMC=y\nCONFIG_MMC_UNSAFE_RESUME=y\n# CONFIG_MMC_CLKGATE is not set\n# CONFIG_MMC_EMBEDDED_SDIO is not set\n# CONFIG_MMC_PARANOID_SD_INIT is not set\n\n#\n# MMC/SD/SDIO Card Drivers\n#\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\nCONFIG_MMC_BLOCK_BOUNCE=y\n# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\nCONFIG_MMC_ARMMMCI=y\n# CONFIG_MMC_SDHCI is not set\n# CONFIG_MMC_SDHCI_PXAV3 is not set\n# CONFIG_MMC_SDHCI_PXAV2 is not set\n# CONFIG_MMC_SPI is not set\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP5521 is not set\n# CONFIG_LEDS_LP5523 is not set\n# CONFIG_LEDS_LP5562 is not set\n# CONFIG_LEDS_LP8501 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_PCA9685 is not set\n# CONFIG_LEDS_DAC124S085 is not set\n# CONFIG_LEDS_PWM is not set\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_OT200 is not set\n# CONFIG_LEDS_BLINKM is not set\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\nCONFIG_LEDS_TRIGGER_TIMER=y\nCONFIG_LEDS_TRIGGER_ONESHOT=y\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\n# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set\nCONFIG_LEDS_TRIGGER_OFF=y\nCONFIG_LEDS_TRIGGER_CPU=y\nCONFIG_LEDS_TRIGGER_GPIO=y\nCONFIG_LEDS_TRIGGER_DEFAULT_ON=y\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\n# CONFIG_LEDS_TRIGGER_TRANSIENT is not set\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\nCONFIG_SWITCH=y\n# CONFIG_SWITCH_GPIO is not set\n# CONFIG_ACCESSIBILITY is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\nCONFIG_RTC_DRV_DS1307=m\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_DS3232 is not set\n# CONFIG_RTC_DRV_HYM8563 is not set\nCONFIG_RTC_DRV_AML_HYM8563=y\n# CONFIG_RTC_DRV_MAX6900 is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12057 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\nCONFIG_RTC_DRV_PCF8563=y\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_DS3234 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\n# CONFIG_RTC_DRV_PL031 is not set\n# CONFIG_RTC_DRV_SNVS is not set\n# CONFIG_RTC_DRV_MOXART is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set\n# CONFIG_DMADEVICES is not set\n# CONFIG_AUXDISPLAY is not set\nCONFIG_UIO=y\n# CONFIG_UIO_PDRV_GENIRQ is not set\n# CONFIG_UIO_DMEM_GENIRQ is not set\n# CONFIG_VIRT_DRIVERS is not set\nCONFIG_VIRTIO=y\n\n#\n# Virtio drivers\n#\n# CONFIG_VIRTIO_BALLOON is not set\nCONFIG_VIRTIO_MMIO=y\n# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set\n\n#\n# Microsoft Hyper-V guest support\n#\nCONFIG_STAGING=y\n# CONFIG_USBIP_CORE is not set\n# CONFIG_W35UND is not set\n# CONFIG_PRISM2_USB is not set\n# CONFIG_ECHO is not set\n# CONFIG_COMEDI is not set\n# CONFIG_RTLLIB is not set\nCONFIG_R8712U=m\n# CONFIG_R8188EU is not set\n# CONFIG_RTS5139 is not set\n# CONFIG_TRANZPORT is not set\n# CONFIG_LINE6_USB is not set\n# CONFIG_USB_SERIAL_QUATECH2 is not set\nCONFIG_VT6656=m\n# CONFIG_USB_ENESTORAGE is not set\n# CONFIG_BCM_WIMAX is not set\n# CONFIG_FT1000 is not set\n\n#\n# Speakup console speech\n#\n# CONFIG_SPEAKUP is not set\n# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set\n# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set\n# CONFIG_STAGING_MEDIA is not set\n\n#\n# Android\n#\nCONFIG_ANDROID=y\n# CONFIG_ANDROID_BINDER_IPC is not set\nCONFIG_ASHMEM=y\n# CONFIG_ANDROID_LOGGER is not set\n# CONFIG_ANDROID_TIMED_OUTPUT is not set\n# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set\n# CONFIG_ANDROID_INTF_ALARM_DEV is not set\nCONFIG_SYNC=y\nCONFIG_SW_SYNC=y\nCONFIG_SW_SYNC_USER=y\nCONFIG_ION=y\n# CONFIG_ION_TEST is not set\n# CONFIG_ION_DUMMY is not set\n# CONFIG_FIQ_DEBUGGER is not set\n# CONFIG_FIQ_WATCHDOG is not set\n# CONFIG_USB_WPAN_HCD is not set\n# CONFIG_WIMAX_GDM72XX is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_CED1401 is not set\n# CONFIG_DGRP is not set\n# CONFIG_MTD_SPINAND_MT29F is not set\n# CONFIG_LUSTRE_FS is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_DGAP is not set\nCONFIG_CLKDEV_LOOKUP=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Common Clock Framework\n#\nCONFIG_COMMON_CLK_VERSATILE=y\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\nCONFIG_COMMON_CLK_XGENE=y\nCONFIG_COMMON_CLK_SCPI=y\n# CONFIG_COMMON_CLK_QCOM is not set\n\n#\n# Hardware Spinlock drivers\n#\nCONFIG_CLKSRC_OF=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_MAILBOX=y\n# CONFIG_PL320_MBOX is not set\nCONFIG_IOMMU_SUPPORT=y\nCONFIG_OF_IOMMU=y\n# CONFIG_ARM_SMMU is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_STE_MODEM_RPROC is not set\n\n#\n# Rpmsg drivers\n#\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y\nCONFIG_DEVFREQ_GOV_PERFORMANCE=y\nCONFIG_DEVFREQ_GOV_POWERSAVE=y\nCONFIG_DEVFREQ_GOV_USERSPACE=y\n\n#\n# DEVFREQ Drivers\n#\n# CONFIG_EXTCON is not set\n# CONFIG_MEMORY is not set\n# CONFIG_IIO is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_V3=y\n# CONFIG_IPACK_BUS is not set\nCONFIG_RESET_CONTROLLER=y\n# CONFIG_FMC is not set\n\n#\n# PHY Subsystem\n#\n# CONFIG_GENERIC_PHY is not set\n# CONFIG_PHY_EXYNOS_MIPI_VIDEO is not set\n# CONFIG_PHY_EXYNOS_DP_VIDEO is not set\n# CONFIG_POWERCAP is not set\n# CONFIG_CORESIGHT is not set\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT23=y\n# CONFIG_EXT4_FS_POSIX_ACL is not set\n# CONFIG_EXT4_FS_SECURITY is not set\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\n# CONFIG_BTRFS_FS_POSIX_ACL is not set\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_NILFS2_FS is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\nCONFIG_FILE_LOCKING=y\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\n# CONFIG_QUOTA is not set\n# CONFIG_QUOTACTL is not set\nCONFIG_AUTOFS4_FS=y\nCONFIG_FUSE_FS=m\n# CONFIG_CUSE is not set\nCONFIG_OVERLAY_FS=y\n\n#\n# Caches\n#\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_HISTOGRAM is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_FSCACHE_OBJECT_LIST is not set\n# CONFIG_CACHEFILES is not set\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=m\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=m\nCONFIG_UDF_NLS=y\n\n#\n# DOS/FAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=936\nCONFIG_FAT_DEFAULT_IOCHARSET=\"utf8\"\nCONFIG_FAT_DEFAULT_UTF8=y\nCONFIG_EXFAT_FS=y\nCONFIG_EXFAT_DISCARD=y\nCONFIG_EXFAT_DELAYED_SYNC=n\nCONFIG_EXFAT_KERNEL_DEBUG=n\nCONFIG_EXFAT_DEBUG_MSG=n\nCONFIG_EXFAT_DEFAULT_CODEPAGE=936\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\nCONFIG_EXFAT_VIRTUAL_XATTR=y\nCONFIG_EXFAT_VIRTUAL_XATTR_SELINUX_LABEL=\"u:object_r:exfat:s0\"\nCONFIG_EXFAT_DEBUG=n\nCONFIG_EXFAT_UEVENT=n\n# CONFIG_NTFS_FS is not set\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\n# CONFIG_PROC_KCORE is not set\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_HUGETLBFS is not set\n# CONFIG_HUGETLB_PAGE is not set\nCONFIG_CONFIGFS_FS=y\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\nCONFIG_HFS_FS=m\nCONFIG_HFSPLUS_FS=m\n# CONFIG_HFSPLUS_FS_POSIX_ACL is not set\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_JFFS2_FS is not set\nCONFIG_UBIFS_FS=m\n# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set\nCONFIG_UBIFS_FS_LZO=y\nCONFIG_UBIFS_FS_ZLIB=y\n# CONFIG_LOGFS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\n# CONFIG_SQUASHFS_FILE_CACHE is not set\nCONFIG_SQUASHFS_FILE_DIRECT=y\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\n# CONFIG_SQUASHFS_XATTR is not set\n# CONFIG_SQUASHFS_ZLIB is not set\nCONFIG_SQUASHFS_LZO=y\n# CONFIG_SQUASHFS_XZ is not set\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\nCONFIG_PSTORE=y\n# CONFIG_PSTORE_CONSOLE is not set\nCONFIG_PSTORE_PMSG=y\n# CONFIG_PSTORE_FTRACE is not set\nCONFIG_PSTORE_RAM=y\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_F2FS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\nCONFIG_NFS_SWAP=y\nCONFIG_NFS_V4_1=y\n# CONFIG_NFS_V4_2 is not set\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\n# CONFIG_NFS_V4_1_MIGRATION is not set\nCONFIG_ROOT_NFS=y\nCONFIG_NFS_FSCACHE=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFSD=m\nCONFIG_NFSD_V2_ACL=y\nCONFIG_NFSD_V3=y\nCONFIG_NFSD_V3_ACL=y\nCONFIG_NFSD_V4=y\nCONFIG_NFSD_FAULT_INJECTION=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_ACL_SUPPORT=m\nCONFIG_NFS_COMMON=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\nCONFIG_SUNRPC_SWAP=y\nCONFIG_RPCSEC_GSS_KRB5=m\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=m\nCONFIG_CIFS_STATS=y\nCONFIG_CIFS_STATS2=y\n# CONFIG_CIFS_WEAK_PW_HASH is not set\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\n# CONFIG_CIFS_DEBUG is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\nCONFIG_CIFS_SMB2=y\nCONFIG_CIFS_FSCACHE=y\n# CONFIG_NCP_FS is not set\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\nCONFIG_NLS_CODEPAGE_936=y\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_VIRTUALIZATION is not set\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\nCONFIG_DEFAULT_MESSAGE_LOGLEVEL=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\n\n#\n# Compile-time checks and compiler options\n#\n# CONFIG_DEBUG_INFO is not set\nCONFIG_ENABLE_WARN_DEPRECATED=y\nCONFIG_ENABLE_MUST_CHECK=y\nCONFIG_FRAME_WARN=1024\nCONFIG_STRIP_ASM_SYMS=y\n# CONFIG_READABLE_ASM is not set\n# CONFIG_UNUSED_SYMBOLS is not set\nCONFIG_DEBUG_FS=y\n# CONFIG_HEADERS_CHECK is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# CONFIG_MAGIC_SYSRQ is not set\nCONFIG_DEBUG_KERNEL=y\n\n#\n# Memory Debugging\n#\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_DEBUG_VM is not set\n# CONFIG_DEBUG_MEMORY_INIT is not set\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Lockups and Hangs\n#\n# CONFIG_LOCKUP_DETECTOR is not set\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\n# CONFIG_SCHED_DEBUG is not set\n# CONFIG_SCHEDSTATS is not set\nCONFIG_TIMER_STATS=y\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_RT_MUTEX_TESTER is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_DEBUG_KOBJECT is not set\nCONFIG_HAVE_DEBUG_BUGVERBOSE=y\nCONFIG_DEBUG_BUGVERBOSE=y\n# CONFIG_DEBUG_WRITECOUNT is not set\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_SPARSE_RCU_POINTER is not set\n# CONFIG_RCU_TORTURE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=60\n# CONFIG_RCU_CPU_STALL_INFO is not set\nCONFIG_RCU_TRACE=y\n# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_TRACING=y\nCONFIG_GENERIC_TRACER=y\nCONFIG_TRACING_SUPPORT=y\nCONFIG_FTRACE=y\nCONFIG_FUNCTION_TRACER=y\nCONFIG_FUNCTION_GRAPH_TRACER=y\n# CONFIG_IRQSOFF_TRACER is not set\n# CONFIG_SCHED_TRACER is not set\n# CONFIG_FTRACE_SYSCALLS is not set\n# CONFIG_TRACER_SNAPSHOT is not set\nCONFIG_BRANCH_PROFILE_NONE=y\n# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set\n# CONFIG_PROFILE_ALL_BRANCHES is not set\n# CONFIG_STACK_TRACER is not set\n# CONFIG_BLK_DEV_IO_TRACE is not set\n# CONFIG_PROBE_EVENTS is not set\nCONFIG_DYNAMIC_FTRACE=y\n# CONFIG_FUNCTION_PROFILER is not set\nCONFIG_FTRACE_MCOUNT_RECORD=y\n# CONFIG_FTRACE_STARTUP_TEST is not set\n# CONFIG_RING_BUFFER_BENCHMARK is not set\n# CONFIG_RING_BUFFER_STARTUP_TEST is not set\n\n#\n# Runtime Testing\n#\n# CONFIG_LKDTM is not set\n# CONFIG_TEST_LIST_SORT is not set\n# CONFIG_BACKTRACE_SELF_TEST is not set\n# CONFIG_RBTREE_TEST is not set\n# CONFIG_INTERVAL_TREE_TEST is not set\n# CONFIG_PERCPU_TEST is not set\n# CONFIG_ATOMIC64_SELFTEST is not set\n# CONFIG_TEST_STRING_HELPERS is not set\n# CONFIG_TEST_KSTRTOX is not set\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_TEST_MODULE is not set\n# CONFIG_TEST_USER_COPY is not set\n# CONFIG_CHECK_ISR_TIME is not set\n# CONFIG_SAMPLES is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\nCONFIG_EARLY_PRINTK=y\n# CONFIG_PID_IN_CONTEXTIDR is not set\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_BIG_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\n# CONFIG_KEYS_DEBUG_PROC_KEYS is not set\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY is not set\nCONFIG_SECURITYFS=y\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_DEFAULT_SECURITY=\"\"\nCONFIG_XOR_BLOCKS=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=m\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_BLKCIPHER=y\nCONFIG_CRYPTO_BLKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=m\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_PCOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\nCONFIG_CRYPTO_USER=y\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=m\n# CONFIG_CRYPTO_NULL is not set\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_WORKQUEUE=y\nCONFIG_CRYPTO_CRYPTD=m\n# CONFIG_CRYPTO_AUTHENC is not set\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_ABLK_HELPER=m\n\n#\n# Authenticated Encryption with Associated Data\n#\nCONFIG_CRYPTO_CCM=m\n# CONFIG_CRYPTO_GCM is not set\nCONFIG_CRYPTO_SEQIV=m\n\n#\n# Block modes\n#\nCONFIG_CRYPTO_CBC=m\nCONFIG_CRYPTO_CTR=m\nCONFIG_CRYPTO_CTS=m\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_PCBC is not set\nCONFIG_CRYPTO_XTS=m\n\n#\n# Hash modes\n#\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_HMAC=y\n# CONFIG_CRYPTO_XCBC is not set\n# CONFIG_CRYPTO_VMAC is not set\n\n#\n# Digest\n#\nCONFIG_CRYPTO_CRC32C=y\n# CONFIG_CRYPTO_CRC32 is not set\nCONFIG_CRYPTO_CRCT10DIF=m\n# CONFIG_CRYPTO_GHASH is not set\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\n# CONFIG_CRYPTO_RMD128 is not set\n# CONFIG_CRYPTO_RMD160 is not set\n# CONFIG_CRYPTO_RMD256 is not set\n# CONFIG_CRYPTO_RMD320 is not set\nCONFIG_CRYPTO_SHA1=m\nCONFIG_CRYPTO_SHA256=y\n# CONFIG_CRYPTO_SHA512 is not set\n# CONFIG_CRYPTO_TGR192 is not set\n# CONFIG_CRYPTO_WP512 is not set\n\n#\n# Ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_ANUBIS is not set\nCONFIG_CRYPTO_ARC4=y\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SALSA20 is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=y\n# CONFIG_CRYPTO_ZLIB is not set\nCONFIG_CRYPTO_LZO=y\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n\n#\n# Random Number Generation\n#\nCONFIG_CRYPTO_ANSI_CPRNG=m\nCONFIG_CRYPTO_USER_API=m\n# CONFIG_CRYPTO_USER_API_HASH is not set\nCONFIG_CRYPTO_USER_API_SKCIPHER=m\nCONFIG_CRYPTO_HW=y\n# CONFIG_ASYMMETRIC_KEY_TYPE is not set\nCONFIG_ARM64_CRYPTO=y\nCONFIG_CRYPTO_SHA1_ARM64_CE=m\nCONFIG_CRYPTO_SHA2_ARM64_CE=m\nCONFIG_CRYPTO_GHASH_ARM64_CE=m\nCONFIG_CRYPTO_AES_ARM64_CE=m\nCONFIG_CRYPTO_AES_ARM64_CE_CCM=m\nCONFIG_CRYPTO_AES_ARM64_CE_BLK=m\n# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\nCONFIG_BITREVERSE=y\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_GENERIC_IOMAP=y\nCONFIG_GENERIC_IO=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_CRC_CCITT=m\nCONFIG_CRC16=y\nCONFIG_CRC_T10DIF=m\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC7 is not set\nCONFIG_LIBCRC32C=m\n# CONFIG_CRC8 is not set\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=y\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_XZ_DEC=y\n# CONFIG_XZ_DEC_X86 is not set\n# CONFIG_XZ_DEC_POWERPC is not set\n# CONFIG_XZ_DEC_IA64 is not set\n# CONFIG_XZ_DEC_ARM is not set\n# CONFIG_XZ_DEC_ARMTHUMB is not set\n# CONFIG_XZ_DEC_SPARC is not set\n# CONFIG_XZ_DEC_BCJ is not set\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_LZO=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_REED_SOLOMON=y\nCONFIG_REED_SOLOMON_ENC8=y\nCONFIG_REED_SOLOMON_DEC8=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_DMA=y\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_NLATTR=y\nCONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y\nCONFIG_AVERAGE=y\n# CONFIG_CORDIC is not set\n# CONFIG_DDR is not set\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_FONT_SUPPORT=m\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        # TARGET_CPU:\n        # arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d\n        # arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c\n        # arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t\n        # arm720t arm740t strongarm strongarm110 strongarm1100\n        # strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t\n        # arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi\n        # arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e\n        # arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s\n        # arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4\n        # cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312.\n        #\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc+fp+simd\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"neon-fp-armv8\"\n        ;;\n    esac\n\n  # Bootloader to use (syslinux / u-boot / atv-bootloader / bcm2835-bootloader)\n    BOOTLOADER=\"u-boot\"\n\n  # u-boot version to use (default)\n    UBOOT_VERSION=\"vendor\"\n\n  # Target Configfile for u-boot\n    UBOOT_CONFIGFILE=\"boot.ini\"\n\n  # Kernel target\n    KERNEL_TARGET=\"Image.lzo\"\n\n  # Kernel extra targets to build\n    KERNEL_UBOOT_EXTRA_TARGET=\"gxbb_p200.dtb gxbb_p200_2G.dtb gxl_p212_1g.dtb gxl_p212_2g.dtb gxl_p230_2g.dtb\"\n\n  # Build Android kernel image using mkbootimg\n    BUILD_ANDROID_BOOTIMG=\"yes\"\n\n  # Additional options to be passed to Android mkbootimg\n    ANDROID_BOOTIMG_OPTIONS=\"--base 0x0 --kernel_offset 0x1080000\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"\"\n\n  # Additional kernel dependencies\n   KERNEL_EXTRA_DEPENDS_TARGET=\"device-trees-amlogic\"\n\n  # Kernel to use. values can be:\n  # default:  default mainline kernel\n    LINUX=\"amlogic-3.14\"\n\n  # kernel image name\n    KERNEL_NAME=\"kernel.img\"\n\n  # legacy kernel image name\n    LEGACY_KERNEL_NAME=\"KERNEL\"\n\n  # legacy dtb image name\n    LEGACY_DTB_NAME=\"meson64_odroidc2.dtb\"\n\n################################################################################\n# setup build defaults\n################################################################################\n\n  # Project CFLAGS\n    PROJECT_CFLAGS=\"\"\n\n  # SquashFS compression method (gzip / lzo / xz)\n    SQUASHFS_COMPRESSION=\"lzo\"\n\n################################################################################\n# setup project defaults\n################################################################################\n\n  # build and install ALSA Audio support (yes / no)\n    ALSA_SUPPORT=\"yes\"\n\n  # OpenGL(X) implementation to use (no / Mesa)\n    OPENGL=\"no\"\n\n  # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q / opengl-meson)\n    OPENGLES=\"opengl-meson\"\n\n  # include uvesafb support (yes / no)\n    UVESAFB_SUPPORT=\"no\"\n\n  # Displayserver to use (x11 / no)\n    DISPLAYSERVER=\"no\"\n\n  # Windowmanager to use (fluxbox / none)\n    WINDOWMANAGER=\"none\"\n\n  # Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia,nouveau)\n  # Space separated list is supported,\n  # e.g. GRAPHIC_DRIVERS=\"i915 i965 r300 r600 radeonsi nvidia nouveau\"\n    GRAPHIC_DRIVERS=\"\"\n\n  # Use a vendor specific KODI repo\n    KODI_VENDOR=\"amlogic-3.14\"\n\n  # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap / libamcodec)\n    KODIPLAYER_DRIVER=\"libamcodec\"\n\n  # Modules to install in initramfs for early boot\n    INITRAMFS_MODULES=\"font softcursor bitblit fbcon dwc_otg\"\n\n  # additional drivers to install:\n  # for a list of additinoal drivers see packages/linux-drivers\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_DRIVERS=\"DRIVER1 DRIVER2\"\n    ADDITIONAL_DRIVERS=\"gpu-aml kvimfan-aml openvfd-driver wifi_dummy-aml\n                        ap6xxx-aml mt7601u-aml mt7603u-aml mt7610u-aml qca9377-aml ssv6xxx-aml-3.14\n                        RTL8188EU-aml RTL8189ES-aml RTL8189FS-aml RTL8192CU RTL8192DU RTL8192EU RTL8152-aml\n                        RTL8723BS-aml RTL8723DS-aml RTL8812AU RTL8814AU RTL8821CU RTL8822BU-aml RTL8822BS-aml\"\n\n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware-aml qca9377-firmware-aml rtl8723bs_bt rtl8822b_bt\"\n\n  # build and install ATV IR remote support (yes / no)\n    ATVCLIENT_SUPPORT=\"no\"\n\n  # Amlogic IR remote support (yes / no)\n    AMREMOTE_SUPPORT=\"yes\"\n\n  # build and install iSCSI support - iscsistart (yes / no)\n    ISCSI_SUPPORT=\"no\"\n\n  # build with installer (yes / no)\n    INSTALLER_SUPPORT=\"no\"\n\n  # build and install driver addons (yes / no)\n    DRIVER_ADDONS_SUPPORT=\"yes\"\n\n  # driver addons to install:\n  # for a list of additinoal drivers see packages/linux-driver-addons\n  # Space separated list is supported,\n    DRIVER_ADDONS=\"\"\n\n  # debug tty path\n    DEBUG_TTY=\"/dev/ttyS0\"\n\n  # additional packages to install:\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_PACKAGES=\"PACKAGE1 PACKAGE2\"\n    ADDITIONAL_PACKAGES=\"u-boot-script dtc u-boot-tools-aml CoreELEC-Debug-Scripts old_ee_3.14_kernel\"\n\n  # add OOTB support for IR remote\n    IR_REMOTE_KEYMAPS=\"$IR_REMOTE_KEYMAPS odroid wetek_hub wetek_play_2 tanix\"\n\n  # build with entware installer\n    ENTWARE_SUPPORT=\"yes\"\n    ENTWARE_ARCH=\"aarch64-k3.10\"\n\n  # CoreELEC Subdevices\n    SUBDEVICES=\"LePotato Odroid_C2\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/android-headers/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"android-headers\"\nPKG_VERSION=\"25\"\nPKG_SHA256=\"1e0ecdf56c33aaa523109254e2c475878d8cfc5795ebd4bb5ecbaf80926f4fe9\"\nPKG_LICENSE=\"Apache\"\nPKG_SITE=\"https://android.googlesource.com/\"\nPKG_URL=\"$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Android Platform Headers from AOSP releases.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/debug.d/bluez.conf",
    "content": "BLUEZ_DEBUG=\"--debug\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/debug.d/obexd.conf",
    "content": "OBEXD_DEBUG=\"--debug\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/default.d/bluez.conf",
    "content": ""
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"bluez\"\nPKG_VERSION=\"5.50\"\nPKG_SHA256=\"c44b776660bf78e664e388b979da152976296e444dece833f3ddbd5be5a3b1b4\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.bluez.org/\"\nPKG_URL=\"https://git.kernel.org/pub/scm/bluetooth/bluez.git/snapshot/$PKG_NAME-$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain dbus glib readline systemd\"\nPKG_LONGDESC=\"Bluetooth Tools and System Daemons for Linux.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+lto\"\n\nif build_with_debug; then\n  BLUEZ_CONFIG=\"--enable-debug\"\nelse\n  BLUEZ_CONFIG=\"--disable-debug\"\nfi\n\nBLUEZ_CONFIG=\"$BLUEZ_CONFIG --enable-monitor --enable-test\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"--disable-dependency-tracking \\\n                           --disable-silent-rules \\\n                           --enable-library \\\n                           --enable-udev \\\n                           --disable-cups \\\n                           --disable-obex \\\n                           --enable-client \\\n                           --enable-systemd \\\n                           --enable-tools --enable-deprecated \\\n                           --enable-datafiles \\\n                           --disable-experimental \\\n                           --enable-sixaxis \\\n                           --with-gnu-ld \\\n                           $BLUEZ_CONFIG \\\n                           storagedir=/storage/.cache/bluetooth\"\n\npre_configure_target() {\n# bluez fails to build in subdirs\n  cd $PKG_BUILD\n    rm -rf .$TARGET_NAME\n\n  export LIBS=\"-lncurses -ltinfo\"\n}\n\npost_makeinstall_target() {\n  rm -rf $INSTALL/usr/lib/systemd\n  rm -rf $INSTALL/usr/bin/bccmd\n  rm -rf $INSTALL/usr/bin/bluemoon\n  rm -rf $INSTALL/usr/bin/ciptool\n  rm -rf $INSTALL/usr/share/dbus-1\n\n  mkdir -p $INSTALL/etc/bluetooth\n    cp src/main.conf $INSTALL/etc/bluetooth\n    sed -i $INSTALL/etc/bluetooth/main.conf \\\n        -e \"s|^#\\[Policy\\]|\\[Policy\\]|g\" \\\n        -e \"s|^#AutoEnable.*|AutoEnable=true|g\"\n\n  mkdir -p $INSTALL/usr/share/services\n    cp -P $PKG_DIR/default.d/*.conf $INSTALL/usr/share/services\n\n  # bluez looks in /etc/firmware/\n    ln -sf /usr/lib/firmware $INSTALL/etc/firmware\n    \n  # pulseaudio checks for bluez via pkgconfig but lib is not actually needed\n    sed -i 's/-lbluetooth//g' ${PKG_BUILD}/lib/bluez.pc\n    cp -P ${PKG_BUILD}/lib/bluez.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n}\n\npost_install() {\n  enable_service bluetooth-defaults.service\n  enable_service bluetooth.service\n  enable_service obex.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/patches/0001-obexd-client-sync.c-fix-conflict-with-unistd.c.patch",
    "content": "From 0e112d627d96e89fdd39f28b8d3c35b0663d816b Mon Sep 17 00:00:00 2001\nFrom: 7Ji <pugokushin@gmail.com>\nDate: Wed, 22 Jun 2022 09:37:15 +0800\nSubject: [PATCH 1/2] obexd/client/sync.c: fix conflict with unistd.c\n\n---\n obexd/client/sync.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/obexd/client/sync.c b/obexd/client/sync.c\nindex 548c318c3..55fed759d 100644\n--- a/obexd/client/sync.c\n+++ b/obexd/client/sync.c\n@@ -222,7 +222,7 @@ static void sync_remove(struct obc_session *session)\n \tg_dbus_unregister_interface(conn, path, SYNC_INTERFACE);\n }\n \n-static struct obc_driver sync = {\n+static struct obc_driver sync_driver = {\n \t.service = \"SYNC\",\n \t.uuid = SYNC_UUID,\n \t.target = OBEX_SYNC_UUID,\n@@ -241,7 +241,7 @@ int sync_init(void)\n \tif (!conn)\n \t\treturn -EIO;\n \n-\terr = obc_driver_register(&sync);\n+\terr = obc_driver_register(&sync_driver);\n \tif (err < 0) {\n \t\tdbus_connection_unref(conn);\n \t\tconn = NULL;\n@@ -258,5 +258,5 @@ void sync_exit(void)\n \tdbus_connection_unref(conn);\n \tconn = NULL;\n \n-\tobc_driver_unregister(&sync);\n+\tobc_driver_unregister(&sync_driver);\n }\n-- \n2.36.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/patches/0002-profiles-audio-media.c-fix-conflict-with-unistd.c.patch",
    "content": "From 630a2f2a3eaa372c0dbd9a21fb9c00f0576ec442 Mon Sep 17 00:00:00 2001\nFrom: 7Ji <pugokushin@gmail.com>\nDate: Wed, 22 Jun 2022 09:39:07 +0800\nSubject: [PATCH 2/2] profiles/audio/media.c: fix conflict with unistd.c\n\n---\n profiles/audio/media.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/profiles/audio/media.c b/profiles/audio/media.c\nindex 23d15611b..72ed57cb1 100644\n--- a/profiles/audio/media.c\n+++ b/profiles/audio/media.c\n@@ -1238,7 +1238,7 @@ static bool stop(void *user_data)\n \treturn media_player_send(mp, \"Stop\");\n }\n \n-static bool pause(void *user_data)\n+static bool bool_pause(void *user_data)\n {\n \tstruct media_player *mp = user_data;\n \n@@ -1288,7 +1288,7 @@ static struct avrcp_player_cb player_cb = {\n \t.set_volume = set_volume,\n \t.play = play,\n \t.stop = stop,\n-\t.pause = pause,\n+\t.pause = bool_pause,\n \t.next = next,\n \t.previous = previous,\n };\n-- \n2.36.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/patches/bluez-01_add-obexd-policy.patch",
    "content": "diff -Naur bluez-5.29/src/bluetooth.conf bluez-5.29.patch/src/bluetooth.conf\n--- bluez-5.29/src/bluetooth.conf\t2015-03-11 11:01:57.000000000 +0100\n+++ bluez-5.29.patch/src/bluetooth.conf\t2015-03-31 12:02:20.128341381 +0200\n@@ -22,20 +22,37 @@\n     <allow send_interface=\"org.bluez.GattDescriptor1\"/>\n     <allow send_interface=\"org.freedesktop.DBus.ObjectManager\"/>\n     <allow send_interface=\"org.freedesktop.DBus.Properties\"/>\n+\n+    <allow own=\"org.bluez.obex\"/>\n+    <allow send_destination=\"org.bluez.obex\"/>\n+    <allow send_interface=\"org.bluez.obex.Agent1\"/>\n+    <allow send_interface=\"org.bluez.obex.Client1\"/>\n+    <allow send_interface=\"org.bluez.obex.Session1\"/>\n+    <allow send_interface=\"org.bluez.obex.Transfer1\"/>\n+    <allow send_interface=\"org.bluez.obex.ObjectPush1\"/>\n+    <allow send_interface=\"org.bluez.obex.FileTransfer1\"/>\n+    <allow send_interface=\"org.bluez.obex.PhonebookAccess1\"/>\n+    <allow send_interface=\"org.bluez.obex.Synchronization1\"/>\n+    <allow send_interface=\"org.bluez.obex.MessageAccess1\"/>\n+    <allow send_interface=\"org.bluez.obex.Message1\"/>\n   </policy>\n \n+\n   <policy at_console=\"true\">\n     <allow send_destination=\"org.bluez\"/>\n+    <allow send_destination=\"org.bluez.obex\"/>\n   </policy>\n \n   <!-- allow users of lp group (printing subsystem) to \n        communicate with bluetoothd -->\n   <policy group=\"lp\">\n     <allow send_destination=\"org.bluez\"/>\n+    <allow send_destination=\"org.bluez.obex\"/>\n   </policy>\n \n   <policy context=\"default\">\n     <deny send_destination=\"org.bluez\"/>\n+    <deny send_destination=\"org.bluez.obex\"/>\n   </policy>\n \n </busconfig>\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/patches/bluez-02_obexd-use-system-bus.patch",
    "content": "From 20dfa1079c088236bcd63f1a986956b488177ebf Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Tue, 6 Aug 2013 11:18:09 +0300\nSubject: [PATCH] obexd: use system bus\n\n---\n obexd/src/manager.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/obexd/src/manager.c b/obexd/src/manager.c\nindex dbfbef8..9a29f8c 100644\n--- a/obexd/src/manager.c\n+++ b/obexd/src/manager.c\n@@ -569,7 +569,7 @@ gboolean manager_init(void)\n \n \tdbus_error_init(&err);\n \n-\tconnection = g_dbus_setup_bus(DBUS_BUS_SESSION, OBEXD_SERVICE, &err);\n+\tconnection = g_dbus_setup_bus(DBUS_BUS_SYSTEM, OBEXD_SERVICE, &err);\n \tif (connection == NULL) {\n \t\tif (dbus_error_is_set(&err) == TRUE) {\n \t\t\tfprintf(stderr, \"%s\\n\", err.message);\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/patches/bluez-03_storagedir.patch",
    "content": "diff -Naur bluez-5.7/configure.ac bluez-5.7.patch/configure.ac\n--- bluez-5.7/configure.ac\t2013-06-26 18:17:07.000000000 +0200\n+++ bluez-5.7.patch/configure.ac\t2013-07-12 20:21:17.000000000 +0200\n@@ -238,10 +238,13 @@\n \tprefix=\"${ac_default_prefix}\"\n fi\n \n-if (test \"$localstatedir\" = '${prefix}/var'); then\n-\tstoragedir=\"${prefix}/var/lib/bluetooth\"\n-else\n-\tstoragedir=\"${localstatedir}/lib/bluetooth\"\n+\n+if (test \"x$storagedir\" = 'x'); then\n+\tif (test \"$localstatedir\" = '${prefix}/var'); then\n+\t\tstoragedir=\"${prefix}/var/lib/bluetooth\"\n+\telse\n+\t\tstoragedir=\"${localstatedir}/lib/bluetooth\"\n+\tfi\n fi\n AC_DEFINE_UNQUOTED(STORAGEDIR, \"${storagedir}\",\n \t\t\t[Directory for the storage files])\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/patches/bluez-04_work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch",
    "content": "From aa73bf5039dfd2cf0a52dd6fd22501d955cc1a00 Mon Sep 17 00:00:00 2001\nFrom: Tommy <mesilliac@gmail.com>\nDate: Thu, 10 Jan 2013 09:18:43 +0100\nSubject: [PATCH] work around Logitech diNovo Edge keyboard firmware issue\n\nhttps://bugs.launchpad.net/ubuntu/+source/bluez/+bug/269851\n---\n tools/hid2hci.rules |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/tools/hid2hci.rules b/tools/hid2hci.rules\nindex db6bb03..7db4572 100644\n--- a/tools/hid2hci.rules\n+++ b/tools/hid2hci.rules\n@@ -11,7 +11,10 @@ ATTR{bInterfaceClass}==\"03\", ATTR{bInterfaceSubClass}==\"01\", ATTR{bInterfaceProt\n   RUN+=\"hid2hci --method=dell --devpath=%p\", ENV{HID2HCI_SWITCH}=\"1\"\n \n # Logitech devices\n-KERNEL==\"hiddev*\", ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"c70[345abce]|c71[34bc]\", \\\n+KERNEL==\"hiddev*\", ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"c70[345abce]|c71[3bc]\", \\\n+  RUN+=\"hid2hci --method=logitech-hid --devpath=%p\"\n+# Logitech, Inc. diNovo Edge Keyboard\n+KERNEL==\"hidraw*\", ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"c714\", \\\n   RUN+=\"hid2hci --method=logitech-hid --devpath=%p\"\n \n ENV{DEVTYPE}!=\"usb_device\", GOTO=\"hid2hci_end\"\n-- \n1.8.0.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/patches/bluez-05-046d-c52b-Logitech-Inc.-Unifying-Receiver.patch",
    "content": "From 50f34d1b65c2fb6c557e2b802e908986e8ec0b74 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Fri, 7 Feb 2014 12:50:29 +0200\nSubject: [PATCH] 046d:c52b Logitech, Inc. Unifying Receiver\n\n---\n tools/hid2hci.rules |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/tools/hid2hci.rules b/tools/hid2hci.rules\nindex 7db4572..1feca6e 100644\n--- a/tools/hid2hci.rules\n+++ b/tools/hid2hci.rules\n@@ -16,6 +16,9 @@ KERNEL==\"hiddev*\", ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"c70[345abce]|c71[\n # Logitech, Inc. diNovo Edge Keyboard\n KERNEL==\"hidraw*\", ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"c714\", \\\n   RUN+=\"hid2hci --method=logitech-hid --devpath=%p\"\n+# Logitech, Inc. Unifying Receiver\n+KERNEL==\"hidraw*\", ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"c52b\", \\\n+  RUN+=\"hid2hci --method=logitech-hid --devpath=%p\"\n \n ENV{DEVTYPE}!=\"usb_device\", GOTO=\"hid2hci_end\"\n \n-- \n1.7.2.5\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/patches/bluez-06-broadcom-fixes.patch",
    "content": "From 874990be3b958bd3d5d5f61989f8d6314be3358a Mon Sep 17 00:00:00 2001\nFrom: Phil Elwell <phil@raspberrypi.org>\nDate: Tue, 16 Feb 2016 16:40:46 +0000\nSubject: [PATCH 1/4] bcm43xx: Add bcm43xx-3wire variant\n\n---\n tools/hciattach.c | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/tools/hciattach.c b/tools/hciattach.c\nindex 1904ac5..835d5ff 100644\n--- a/tools/hciattach.c\n+++ b/tools/hciattach.c\n@@ -1144,6 +1144,9 @@ struct uart_t uart[] = {\n \t{ \"bcm43xx\",    0x0000, 0x0000, HCI_UART_H4,   115200, 3000000,\n \t\t\t\tFLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL  },\n \n+\t{ \"bcm43xx-3wire\",    0x0000, 0x0000, HCI_UART_3WIRE, 115200, 3000000,\n+\t\t\t\t0, DISABLE_PM, NULL, bcm43xx, NULL  },\n+\n \t{ \"ath3k\",    0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200,\n \t\t\tFLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm  },\n \n-- \n1.9.1\n\nFrom 74e6869ecce13b1066741ba995fc47b437c4c72f Mon Sep 17 00:00:00 2001\nFrom: Phil Elwell <phil@raspberrypi.org>\nDate: Wed, 20 Jan 2016 16:00:37 +0000\nSubject: [PATCH 3/4] Increase firmware load timeout to 30s\n\n---\n tools/hciattach.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/tools/hciattach.c b/tools/hciattach.c\nindex 9391458..b1168d4 100644\n--- a/tools/hciattach.c\n+++ b/tools/hciattach.c\n@@ -1287,7 +1287,7 @@ int main(int argc, char *argv[])\n {\n \tstruct uart_t *u = NULL;\n \tint detach, printpid, raw, opt, i, n, ld, err;\n-\tint to = 10;\n+\tint to = 30;\n \tint init_speed = 0;\n \tint send_break = 0;\n \tpid_t pid;\n-- \n1.9.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/patches/bluez-07-broadcom-dont-set-speed-before-loading.patch",
    "content": "diff -Naur a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c\n--- a/tools/hciattach_bcm43xx.c\t2016-02-25 18:23:15.468717720 +0000\n+++ b/tools/hciattach_bcm43xx.c\t2016-02-25 18:24:08.028997243 +0000\n@@ -368,9 +368,6 @@\n \tif (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) {\n \t\tfprintf(stderr, \"Patch not found, continue anyway\\n\");\n \t} else {\n-\t\tif (bcm43xx_set_speed(fd, ti, speed))\n-\t\t\treturn -1;\n-\n \t\tif (bcm43xx_load_firmware(fd, fw_path))\n \t\t\treturn -1;\n \n@@ -379,6 +376,7 @@\n \t\t\tperror(\"Can't set host baud rate\");\n \t\t\treturn -1;\n \t\t}\n+\t\tsleep(1);\n \n \t\tif (bcm43xx_reset(fd))\n \t\t\treturn -1;\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/patches/bluez-08-hciattach-retry-device-reset-when-no-response.patch",
    "content": "From d4eafedce242f6c96b46b5a3122a39cc8d2f1373 Mon Sep 17 00:00:00 2001\nFrom: meijjaa <jjmeijer88@gmail.com>\nDate: Mon, 23 Jan 2017 22:35:33 +0100\nSubject: [PATCH] hciattach: retry device reset when no response\n\nSome bcm chips need a couple of retries to reset. Currently init will just\ntimeout after a failed reset.\n\nSigned-off-by: meijjaa <jjmeijer88@gmail.com>\n---\n tools/hciattach_bcm43xx.c | 15 +++++++++++++--\n 1 file changed, 13 insertions(+), 2 deletions(-)\n\ndiff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c\nindex 81f38cb..4fd01e2 100644\n--- a/tools/hciattach_bcm43xx.c\n+++ b/tools/hciattach_bcm43xx.c\n@@ -35,6 +35,7 @@\n #include <dirent.h>\n #include <time.h>\n #include <limits.h>\n+#include <signal.h>\n \n #include \"lib/bluetooth.h\"\n #include \"lib/hci.h\"\n@@ -97,21 +98,31 @@ fail:\n \treturn -1;\n }\n \n+int _fd;\n+void expired(int sig)\n+{\n+\tunsigned char cmd[] = { HCI_COMMAND_PKT, 0x03, 0x0C, 0x00 };\n+\twrite(_fd, cmd, sizeof(cmd)) != sizeof(cmd);\n+\talarm(4);\n+}\n+\n static int bcm43xx_reset(int fd)\n {\n \tunsigned char cmd[] = { HCI_COMMAND_PKT, 0x03, 0x0C, 0x00 };\n \tunsigned char resp[CC_MIN_SIZE];\n \n+\t_fd = fd;\n+\tsignal(SIGALRM, expired);\n \tif (write(fd, cmd, sizeof(cmd)) != sizeof(cmd)) {\n \t\tfprintf(stderr, \"Failed to write reset command\\n\");\n \t\treturn -1;\n \t}\n-\n+\talarm(4);\n \tif (read_hci_event(fd, resp, sizeof(resp)) < CC_MIN_SIZE) {\n \t\tfprintf(stderr, \"Failed to reset chip, invalid HCI event\\n\");\n \t\treturn -1;\n \t}\n-\n+\talarm(0);\n \tif (resp[4] != cmd[1] || resp[5] != cmd[2] || resp[6] != CMD_SUCCESS) {\n \t\tfprintf(stderr, \"Failed to reset chip, command failure\\n\");\n \t\treturn -1;\n-- \n2.7.4\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/patches/bluez-09-hciattach-more-verbose.patch",
    "content": "--- a/tools/hciattach_bcm43xx.c\n+++ b/tools/hciattach_bcm43xx.c\n@@ -366,7 +366,7 @@\n \t\treturn -1;\n \n \tif (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) {\n-\t\tfprintf(stderr, \"Patch not found, continue anyway\\n\");\n+\t\tfprintf(stderr, \"Patch not found for chip %s, continue anyway\\n\", chip_name);\n \t} else {\n \t\tif (bcm43xx_load_firmware(fd, fw_path))\n \t\t\treturn -1;\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/patches/bluez-11_sixaxis-fix-PID-navigation-controller.patch",
    "content": "From: Szymon Janc <szymon.janc@...>\nSubject: [PATCH 1/5] sixaxis: Fix PID for Navigation Controller\nNewsgroups: gmane.linux.bluez.kernel\nDate: 2015-06-15 18:28:26 GMT (36 weeks, 4 days, 21 hours and 32 minutes ago)\n\nNavigation Controller is using PID 0x042f over USB but PID 0x0268\n(same as Dualshock 3) over BT.\n---\n plugins/sixaxis.c | 17 +++++++++++++++--\n 1 file changed, 15 insertions(+), 2 deletions(-)\n\n--- a/plugins/sixaxis.c\n+++ b/plugins/sixaxis.c\n@@ -363,7 +363,13 @@\n \tinfo(\"sixaxis: setting up new device\");\n \n \tbtd_device_device_set_name(device, cp->name);\n-\tbtd_device_set_pnpid(device, cp->source, cp->vid, cp->pid, cp->version);\n+\n+\t/* if device reports different pid/vid on BT prefer those over USB */\n+\tif (cp->bt_pid)\n+\t\tbtd_device_set_pnpid(device, cp->source, cp->vid, cp->bt_pid, cp->version);\n+\telse\n+\t\tbtd_device_set_pnpid(device, cp->source, cp->vid, cp->pid, cp->version);\n+\n \tbtd_device_set_temporary(device, true);\n \n \tclosure = g_new0(struct authentication_closure, 1);\n--- a/profiles/input/sixaxis.h\n+++ b/profiles/input/sixaxis.h\n@@ -38,6 +38,7 @@\n \tuint16_t vid;\n \tuint16_t pid;\n \tuint16_t version;\n+\tuint16_t bt_pid;\n \tCablePairingType type;\n };\n \n@@ -59,6 +60,7 @@\n \t\t\t.vid = 0x054c,\n \t\t\t.pid = 0x042f,\n \t\t\t.version = 0x0000,\n+\t\t\t.bt_pid = 0x0268,\n \t\t\t.type = CABLE_PAIRING_SIXAXIS,\n \t\t},\n \t\t{\n--\n2.1.4\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/patches/bluez-12-fix-obexd-after-5_50.patch",
    "content": "diff --git a/Makefile.obexd b/Makefile.obexd\nindex cd3ace4..89f1609 100644\n--- a/Makefile.obexd\n+++ b/Makefile.obexd\n@@ -8,8 +8,6 @@ endif\n \n EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service\n \n-if OBEX\n-\n obex_plugindir = $(libdir)/obex/plugins\n \n obexd_builtin_modules =\n@@ -33,6 +31,8 @@ obexd_builtin_sources += obexd/plugins/opp.c\n obexd_builtin_modules += ftp\n obexd_builtin_sources += obexd/plugins/ftp.c obexd/plugins/ftp.h\n \n+if OBEX\n+\n obexd_builtin_modules += irmc\n obexd_builtin_sources += obexd/plugins/irmc.c\n \n@@ -47,6 +47,8 @@ obexd_builtin_sources += obexd/plugins/mas.c obexd/src/map_ap.h \\\n                                obexd/plugins/messages.h \\\n                                obexd/plugins/messages-dummy.c\n \n+endif\n+\n obexd_builtin_modules += mns\n obexd_builtin_sources += obexd/client/mns.c obexd/src/map_ap.h \\\n                                obexd/client/map-event.h\n@@ -90,8 +92,6 @@ obexd_src_obexd_CFLAGS = $(AM_CFLAGS) @GLIB_CFLAGS@ @DBUS_CFLAGS@ \\\n \n obexd_src_obexd_CPPFLAGS = -I$(builddir)/lib -I$(builddir)/obexd/src\n \n-endif\n-\n obexd_src_obexd_SHORTNAME = obexd\n \n obexd_builtin_files = obexd/src/builtin.h $(obexd_builtin_nodist)\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/patches/bluez-20-sixaxis-autotrust.patch",
    "content": "--- a/plugins/sixaxis.c\n+++ b/plugins/sixaxis.c\n@@ -370,6 +370,7 @@\n \telse\n \t\tbtd_device_set_pnpid(device, cp->source, cp->vid, cp->pid, cp->version);\n \n+\tbtd_device_set_trusted(device, true);\n \tbtd_device_set_temporary(device, true);\n \n \tclosure = g_new0(struct authentication_closure, 1);\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/patches/bluez-21-hciattach-add-QCA9377-Tuffello-support.patch",
    "content": "From b42a087411199d7f480f1683bddd3206c5fd17b1 Mon Sep 17 00:00:00 2001\nFrom: Gary Bisson <gary.bisson@boundarydevices.com>\nDate: Wed, 17 Aug 2016 11:36:28 +0200\nSubject: [PATCH] hciattach: add QCA9377 Tuffello support\n\nFrom CodeAurora repository:\nhttps://source.codeaurora.org/quic/la/platform/external/bluetooth/bluez/\n\nModifications:\n- code indentation\n- remove verbose traces\n- use H4 protocol instead of IBS\n\nAlso squashed:\nhciattach_rome: simplify baudrate setting\nhciattach_rome: do not override module internal MAC address\nhciattach_rome: force IBS to disabled in NVM\nhciattach_rome: display ROM and TLV info by default\n\nSigned-off-by: Gary Bisson <gary.bisson@boundarydevices.com>\n---\n Makefile.tools         |    1 +\n android/Android.mk     |    1 +\n tools/hciattach.c      |   12 +\n tools/hciattach.h      |    1 +\n tools/hciattach_rome.c | 1872 ++++++++++++++++++++++++++++++++++++++++\n tools/hciattach_rome.h |  388 +++++++++\n 6 files changed, 2275 insertions(+)\n create mode 100644 tools/hciattach_rome.c\n create mode 100644 tools/hciattach_rome.h\n\ndiff --git a/Makefile.tools b/Makefile.tools\nindex b7b422506..e0e995089 100644\n--- a/Makefile.tools\n+++ b/Makefile.tools\n@@ -304,6 +304,7 @@ tools_hciattach_SOURCES = tools/hciattach.c tools/hciattach.h \\\n \t\t\t\t\t\ttools/hciattach_ti.c \\\n \t\t\t\t\t\ttools/hciattach_tialt.c \\\n \t\t\t\t\t\ttools/hciattach_ath3k.c \\\n+\t\t\t\t\t\ttools/hciattach_rome.c \\\n \t\t\t\t\t\ttools/hciattach_qualcomm.c \\\n \t\t\t\t\t\ttools/hciattach_intel.c \\\n \t\t\t\t\t\ttools/hciattach_bcm43xx.c\ndiff --git a/android/Android.mk b/android/Android.mk\nindex 76a826b47..01599c04b 100644\n--- a/android/Android.mk\n+++ b/android/Android.mk\n@@ -696,6 +696,7 @@ LOCAL_SRC_FILES := \\\n \tbluez/tools/hciattach_ti.c \\\n \tbluez/tools/hciattach_tialt.c \\\n \tbluez/tools/hciattach_ath3k.c \\\n+\tbluez/tools/hciattach_rome.c \\\n \tbluez/tools/hciattach_qualcomm.c \\\n \tbluez/tools/hciattach_intel.c \\\n \tbluez/tools/hciattach_bcm43xx.c \\\ndiff --git a/tools/hciattach.c b/tools/hciattach.c\nindex fad176c9b..02a65c692 100644\n--- a/tools/hciattach.c\n+++ b/tools/hciattach.c\n@@ -263,6 +263,11 @@ static int ath3k_pm(int fd, struct uart_t *u, struct termios *ti)\n \treturn ath3k_post(fd, u->pm);\n }\n \n+static int qca(int fd, struct uart_t *u, struct termios *ti)\n+{\n+\treturn qca_soc_init(fd, u->speed, u->bdaddr);\n+}\n+\n static int qualcomm(int fd, struct uart_t *u, struct termios *ti)\n {\n \treturn qualcomm_init(fd, u->speed, ti, u->bdaddr);\n@@ -1093,6 +1098,10 @@ struct uart_t uart[] = {\n \t{ \"ath3k\",    0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200,\n \t\t\tFLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm  },\n \n+\t/* QCA ROME */\n+\t{ \"qca\",    0x0000, 0x0000, HCI_UART_H4, 115200, 115200,\n+\t\t\tFLOW_CTL, DISABLE_PM, NULL, qca, NULL },\n+\n \t/* QUALCOMM BTS */\n \t{ \"qualcomm\",   0x0000, 0x0000, HCI_UART_H4,   115200, 115200,\n \t\t\tFLOW_CTL, DISABLE_PM, NULL, qualcomm, NULL },\n@@ -1145,6 +1154,9 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw)\n \tif (u->flags & AMP_DEV)\n \t\tflags |= 1 << HCI_UART_CREATE_AMP;\n \n+\tif (!strncmp(u->type, \"qca\", 3))\n+\t\tflags |= 1 << HCI_UART_RESET_ON_INIT;\n+\n \tfd = open(dev, O_RDWR | O_NOCTTY);\n \tif (fd < 0) {\n \t\tperror(\"Can't open serial port\");\ndiff --git a/tools/hciattach.h b/tools/hciattach.h\nindex 249aab49e..85c801ccf 100644\n--- a/tools/hciattach.h\n+++ b/tools/hciattach.h\n@@ -65,6 +65,7 @@ int bgb2xx_init(int dd, bdaddr_t *bdaddr);\n int ath3k_init(int fd, int speed, int init_speed, char *bdaddr,\n \t\t\t\t\t\tstruct termios *ti);\n int ath3k_post(int fd, int pm);\n+int qca_soc_init(int fd, int speed, char *bdaddr);\n int qualcomm_init(int fd, int speed, struct termios *ti, const char *bdaddr);\n int intel_init(int fd, int init_speed, int *speed, struct termios *ti);\n int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,\ndiff --git a/tools/hciattach_rome.c b/tools/hciattach_rome.c\nnew file mode 100644\nindex 000000000..9a7f222c4\n--- /dev/null\n+++ b/tools/hciattach_rome.c\n@@ -0,0 +1,1872 @@\n+/*\n+ *\n+ *  Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.\n+ *  Not a Contribution.\n+ *\n+ *  Copyright 2012 The Android Open Source Project\n+ *\n+ *  Licensed under the Apache License, Version 2.0 (the \"License\"); you\n+ *  may not use this file except in compliance with the License. You may\n+ *  obtain a copy of the License at\n+ *\n+ *  http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ *  Unless required by applicable law or agreed to in writing, software\n+ *  distributed under the License is distributed on an \"AS IS\" BASIS,\n+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n+ *  implied. See the License for the specific language governing\n+ *  permissions and limitations under the License.\n+ *\n+ */\n+\n+/******************************************************************************\n+ *\n+ *  Filename:      hciattach_rome.c\n+ *\n+ *  Description:   Contains controller-specific functions, like\n+ *                      firmware patch download\n+ *                      low power mode operations\n+ *\n+ ******************************************************************************/\n+\n+#define MODULE_HAS_MAC_ADDR\n+#define LOG_TAG \"bt_vendor\"\n+#include <stdio.h>\n+#include <unistd.h>\n+#include <sys/socket.h>\n+#include <sys/types.h>\n+#include <sys/stat.h>\n+#include <sys/ioctl.h>\n+#include <signal.h>\n+#include <time.h>\n+#include <errno.h>\n+#include <fcntl.h>\n+#include <dirent.h>\n+#include <ctype.h>\n+#include <stdlib.h>\n+#include <string.h>\n+#include <termios.h>\n+#include <bluetooth/bluetooth.h>\n+#include \"hciattach_rome.h\"\n+#include \"hciattach.h\"\n+\n+/******************************************************************************\n+ **  Variables\n+ ******************************************************************************/\n+FILE *file;\n+unsigned char *phdr_buffer;\n+unsigned char *pdata_buffer = NULL;\n+patch_info rampatch_patch_info;\n+int rome_ver = ROME_VER_UNKNOWN;\n+unsigned char gTlv_type;\n+unsigned char gtlv_dwndcfg;\n+char *rampatch_file_path;\n+char *nvm_file_path;\n+vnd_userial_cb_t vnd_userial;\n+unsigned char wait_vsc_evt = TRUE;\n+\n+/*****************************************************************************\n+ **   Functions\n+ *****************************************************************************/\n+\n+/*******************************************************************************\n+ **\n+ ** Function        userial_to_tcio_baud\n+ **\n+ ** Description     helper function converts USERIAL baud rates into TCIO\n+ **                  conforming baud rates\n+ **\n+ ** Returns         TRUE/FALSE\n+ **\n+ *******************************************************************************/\n+unsigned char userial_to_tcio_baud(unsigned char cfg_baud, unsigned int *baud)\n+{\n+\tif (cfg_baud == USERIAL_BAUD_115200)\n+\t\t*baud = B115200;\n+\telse if (cfg_baud == USERIAL_BAUD_4M)\n+\t\t*baud = B4000000;\n+\telse if (cfg_baud == USERIAL_BAUD_3M)\n+\t\t*baud = B3000000;\n+\telse if (cfg_baud == USERIAL_BAUD_2M)\n+\t\t*baud = B2000000;\n+\telse if (cfg_baud == USERIAL_BAUD_1M)\n+\t\t*baud = B1000000;\n+\telse if (cfg_baud == USERIAL_BAUD_921600)\n+\t\t*baud = B921600;\n+\telse if (cfg_baud == USERIAL_BAUD_460800)\n+\t\t*baud = B460800;\n+\telse if (cfg_baud == USERIAL_BAUD_230400)\n+\t\t*baud = B230400;\n+\telse if (cfg_baud == USERIAL_BAUD_57600)\n+\t\t*baud = B57600;\n+\telse if (cfg_baud == USERIAL_BAUD_19200)\n+\t\t*baud = B19200;\n+\telse if (cfg_baud == USERIAL_BAUD_9600)\n+\t\t*baud = B9600;\n+\telse if (cfg_baud == USERIAL_BAUD_1200)\n+\t\t*baud = B1200;\n+\telse if (cfg_baud == USERIAL_BAUD_600)\n+\t\t*baud = B600;\n+\telse {\n+\t\tfprintf(stderr,  \"userial vendor open: unsupported baud idx %i\\n\", cfg_baud);\n+\t\t*baud = B115200;\n+\t\treturn FALSE;\n+\t}\n+\n+\treturn TRUE;\n+}\n+\n+\n+/*******************************************************************************\n+ **\n+ ** Function        userial_vendor_set_baud\n+ **\n+ ** Description     Set new baud rate\n+ **\n+ ** Returns         None\n+ **\n+ *******************************************************************************/\n+void userial_vendor_set_baud(unsigned char userial_baud)\n+{\n+\tunsigned int tcio_baud;\n+\n+\tif (tcgetattr(vnd_userial.fd, &vnd_userial.termios) < 0) {\n+\t\tperror(\"Can't get port settings\");\n+\t\treturn;\n+\t}\n+\tcfmakeraw(&vnd_userial.termios);\n+\tvnd_userial.termios.c_cflag |= CLOCAL;\n+\tvnd_userial.termios.c_cflag |= CREAD;\n+\tvnd_userial.termios.c_cflag |= CS8;\n+\ttcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios);\n+\n+\tuserial_to_tcio_baud(userial_baud, &tcio_baud);\n+\n+\tcfsetospeed(&vnd_userial.termios, tcio_baud);\n+\tcfsetispeed(&vnd_userial.termios, tcio_baud);\n+\ttcsetattr(vnd_userial.fd, TCSADRAIN, &vnd_userial.termios); /* don't change speed until last write done */\n+\n+}\n+\n+\n+/*******************************************************************************\n+ **\n+ ** Function        userial_vendor_ioctl\n+ **\n+ ** Description     ioctl inteface\n+ **\n+ ** Returns         None\n+ **\n+ *******************************************************************************/\n+int userial_vendor_ioctl(int fd, userial_vendor_ioctl_op_t op, int *p_data)\n+{\n+\tint err = -1;\n+\tstruct termios ti;\n+\n+\tif (tcgetattr(fd, &ti) < 0) {\n+\t\tperror(\"Can't get port settings\");\n+\t\treturn -1;\n+\t}\n+\tcfmakeraw(&ti);\n+\tti.c_cflag |= CLOCAL;\n+\tti.c_cflag |= CREAD;\n+\tti.c_cflag |= CS8;\n+\n+\tswitch(op) {\n+#if (BT_WAKE_VIA_USERIAL_IOCTL==TRUE)\n+\t\tcase USERIAL_OP_ASSERT_BT_WAKE:\n+\t\t\tVNDUSERIALDBG(\"## userial_vendor_ioctl: Asserting BT_Wake ##\");\n+\t\t\terr = ioctl(fd, USERIAL_IOCTL_BT_WAKE_ASSERT, NULL);\n+\t\t\tbreak;\n+\n+\t\tcase USERIAL_OP_DEASSERT_BT_WAKE:\n+\t\t\tVNDUSERIALDBG(\"## userial_vendor_ioctl: De-asserting BT_Wake ##\");\n+\t\t\terr = ioctl(fd, USERIAL_IOCTL_BT_WAKE_DEASSERT, NULL);\n+\t\t\tbreak;\n+\n+\t\tcase USERIAL_OP_GET_BT_WAKE_STATE:\n+\t\t\terr = ioctl(fd, USERIAL_IOCTL_BT_WAKE_GET_ST, p_data);\n+\t\t\tbreak;\n+#endif  //  (BT_WAKE_VIA_USERIAL_IOCTL==TRUE)\n+\t\tcase USERIAL_OP_FLOW_ON:\n+\t\t\tti.c_cflag |= CRTSCTS;\n+\t\t\tif (err = tcsetattr(fd, TCSANOW, &ti) < 0) {\n+\t\t\t\tperror(\"Can't set port settings\");\n+\t\t\t\treturn -1;\n+\t\t\t}\n+\n+\t\t\tbreak;\n+\n+\t\tcase USERIAL_OP_FLOW_OFF:\n+\t\t\tti.c_cflag &= ~CRTSCTS;\n+\t\t\tif (err = tcsetattr(fd, TCSANOW, &ti) < 0) {\n+\t\t\t\tfprintf(stderr, \"Can't set port settings\");\n+\t\t\t\treturn -1;\n+\t\t\t}\n+\t\t\tbreak;\n+\n+\t\tdefault:\n+\t\t\tbreak;\n+\t}\n+\n+\treturn err;\n+}\n+\n+\n+int get_vs_hci_event(unsigned char *rsp)\n+{\n+\tint err = 0, soc_id =0;\n+\tunsigned char paramlen = 0;\n+\n+\tif ( (rsp[EVENTCODE_OFFSET] == VSEVENT_CODE) || (rsp[EVENTCODE_OFFSET] == EVT_CMD_COMPLETE))\n+\t\tPR_DBG(\"%s: Received HCI-Vendor Specific event\\n\", __FUNCTION__);\n+\telse {\n+\t\tfprintf(stderr, \"%s: Failed to receive HCI-Vendor Specific event\\n\", __FUNCTION__);\n+\t\terr = -EIO;\n+\t\tgoto failed;\n+\t}\n+\n+\t/* Check the status of the operation */\n+\tswitch ( rsp[CMD_RSP_OFFSET] ) {\n+\tcase EDL_CMD_REQ_RES_EVT:\n+\t\tswitch(rsp[RSP_TYPE_OFFSET]) {\n+\t\tcase EDL_PATCH_VER_RES_EVT:\n+\t\tcase EDL_APP_VER_RES_EVT:\n+\t\t\tPR_INFO(\"Current Product ID\\t\\t: 0x%08x\\n\",\n+\t\t\t       (unsigned int)(rsp[PATCH_PROD_ID_OFFSET +3] << 24 |\n+\t\t\t\t\t      rsp[PATCH_PROD_ID_OFFSET+2] << 16 |\n+\t\t\t\t\t      rsp[PATCH_PROD_ID_OFFSET+1] << 8 |\n+\t\t\t\t\t      rsp[PATCH_PROD_ID_OFFSET]  ));\n+\n+\t\t\t/* Patch Version indicates FW patch version */\n+\t\t\tPR_INFO(\"Current Patch Version\\t\\t: 0x%04x\\n\",\n+\t\t\t       (unsigned short)(rsp[PATCH_PATCH_VER_OFFSET + 1] << 8 |\n+\t\t\t\t\t\trsp[PATCH_PATCH_VER_OFFSET] ));\n+\n+\t\t\t/* ROM Build Version indicates ROM build version like 1.0/1.1/2.0 */\n+\t\t\trome_ver = (int)(rsp[PATCH_ROM_BUILD_VER_OFFSET + 1] << 8 |\n+\t\t\t\t\t rsp[PATCH_ROM_BUILD_VER_OFFSET]);\n+\t\t\tPR_INFO(\"Current ROM Build Version\\t: 0x%04x\\n\", rome_ver);\n+\n+\t\t\t/* In case rome 1.0/1.1, there is no SOC ID version available */\n+\t\t\tif (paramlen - 10) {\n+\t\t\t\tsoc_id = (unsigned int)(rsp[PATCH_SOC_VER_OFFSET +3] << 24 |\n+\t\t\t\t\t\t\trsp[PATCH_SOC_VER_OFFSET+2] << 16 |\n+\t\t\t\t\t\t\trsp[PATCH_SOC_VER_OFFSET+1] << 8 |\n+\t\t\t\t\t\t\trsp[PATCH_SOC_VER_OFFSET]);\n+\t\t\t\tPR_INFO(\"Current SOC Version\\t\\t: 0x%08x\\n\", soc_id);\n+\t\t\t}\n+\n+\t\t\t/* Rome Chipset Version can be decided by Patch version and SOC version,\n+\t\t\t   Upper 2 bytes will be used for Patch version and Lower 2 bytes will be\n+\t\t\t   used for SOC as combination for BT host driver */\n+\t\t\trome_ver = (rome_ver << 16) | (soc_id & 0x0000ffff);\n+\t\t\tbreak;\n+\t\tcase EDL_TVL_DNLD_RES_EVT:\n+\t\tcase EDL_CMD_EXE_STATUS_EVT:\n+\t\t\tswitch (err = rsp[CMD_STATUS_OFFSET]) {\n+\t\t\tcase HCI_CMD_SUCCESS:\n+\t\t\t\tPR_DBG(\"%s: Download Packet successfully!\\n\", __FUNCTION__);\n+\t\t\t\tbreak;\n+\t\t\tcase PATCH_LEN_ERROR:\n+\t\t\t\tfprintf(stderr, \"%s: Invalid patch length argument passed for EDL PATCH \"\n+\t\t\t\t\t\"SET REQ cmd\\n\", __FUNCTION__);\n+\t\t\t\tbreak;\n+\t\t\tcase PATCH_VER_ERROR:\n+\t\t\t\tfprintf(stderr, \"%s: Invalid patch version argument passed for EDL PATCH \"\n+\t\t\t\t\t\"SET REQ cmd\\n\", __FUNCTION__);\n+\t\t\t\tbreak;\n+\t\t\tcase PATCH_CRC_ERROR:\n+\t\t\t\tfprintf(stderr, \"%s: CRC check of patch failed!!!\\n\", __FUNCTION__);\n+\t\t\t\tbreak;\n+\t\t\tcase PATCH_NOT_FOUND:\n+\t\t\t\tfprintf(stderr, \"%s: Invalid patch data!!!\\n\", __FUNCTION__);\n+\t\t\t\tbreak;\n+\t\t\tcase TLV_TYPE_ERROR:\n+\t\t\t\tfprintf(stderr, \"%s: TLV Type Error !!!\\n\", __FUNCTION__);\n+\t\t\t\tbreak;\n+\t\t\tdefault:\n+\t\t\t\tfprintf(stderr, \"%s: Undefined error (0x%x)\", __FUNCTION__, err);\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\tbreak;\n+\t\t}\n+\t\tbreak;\n+\n+\tcase NVM_ACCESS_CODE:\n+\t\tPR_DBG(\"%s: NVM Access Code!!!\\n\", __FUNCTION__);\n+\t\terr = HCI_CMD_SUCCESS;\n+\t\tbreak;\n+\tcase EDL_SET_BAUDRATE_RSP_EVT:\n+\t\t/* Rome 1.1 has bug with the response, so it should ignore it. */\n+\t\tif (rsp[BAUDRATE_RSP_STATUS_OFFSET] != BAUDRATE_CHANGE_SUCCESS) {\n+\t\t\tfprintf(stderr, \"%s: Set Baudrate request failed - 0x%x\\n\", __FUNCTION__,\n+\t\t\t\trsp[CMD_STATUS_OFFSET]);\n+\t\t\terr = -1;\n+\t\t}\n+\t\tbreak;\n+\tdefault:\n+\t\tfprintf(stderr, \"%s: Not a valid status!!!\\n\", __FUNCTION__);\n+\t\terr = -1;\n+\t\tbreak;\n+\t}\n+\n+failed:\n+\treturn err;\n+}\n+\n+\n+int wait_for_data(int fd, int maxTimeOut)\n+{\n+\tfd_set infids;\n+\tstruct timeval timeout;\n+\n+\tif (maxTimeOut <= 0) {\n+\t\tfprintf(stderr, \"%s: Invalid timeout value specified\", __func__);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tFD_ZERO (&infids);\n+\tFD_SET (fd, &infids);\n+\ttimeout.tv_sec = maxTimeOut;\n+\ttimeout.tv_usec = 0;\n+\n+\t/* Check whether data is available in TTY buffer before calling read() */\n+\tif (select (fd + 1, &infids, NULL, NULL, &timeout) < 1) {\n+\t\tfprintf(stderr, \"%s: Timing out on select for %d secs.\\n\", __FUNCTION__, maxTimeOut);\n+\t\treturn -1;\n+\t}\n+\n+\treturn 1;\n+}\n+\n+/*\n+ * Read an VS HCI event from the given file descriptor.\n+ */\n+int read_vs_hci_event(int fd, unsigned char* buf, int size)\n+{\n+\tint remain, r, retry = 0;\n+\tint count = 0;\n+\n+\tif (size <= 0) {\n+\t\tfprintf(stderr, \"Invalid size arguement!\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\t/* Check whether data is available in TTY buffer before calling read() */\n+\tif (wait_for_data(fd, SELECT_TIMEOUT) < 1)\n+\t\treturn -1;\n+\n+\t/* The first byte identifies the packet type. For HCI event packets, it\n+\t * should be 0x04, so we read until we get to the 0x04. */\n+\t/* It will keep reading until find 0x04 byte */\n+\twhile (1) {\n+\t\t/* Read UART Buffer for HCI-DATA */\n+\t\tr = read(fd, buf, 1);\n+\t\tif (r <= 0) {\n+\t\t\tfprintf(stderr, \"%s: read() failed. error: %d\\n\",\n+\t\t\t\t__FUNCTION__, r);\n+\t\t\treturn -1;\n+\t\t}\n+\n+\t\t/* Check if received data is HCI-DATA or not.\n+\t\t * If not HCI-DATA, then retry reading the UART Buffer once.\n+\t\t * Sometimes there could be corruption on the UART lines and to\n+\t\t * avoid that retry once reading the UART Buffer for HCI-DATA.\n+\t\t */\n+\t\tif (buf[0] == 0x04) { /* Recvd. HCI DATA */\n+\t\t\tretry = 0;\n+\t\t\tbreak;\n+\t\t}\n+\t\telse if (retry < MAX_RETRY_CNT) { /* Retry mechanism */\n+\t\t\tretry++;\n+\t\t\tfprintf(stderr, \"%s: Not an HCI-VS-Event! buf[0]: %d\",\n+\t\t\t\t__FUNCTION__, buf[0]);\n+\t\t\tif (wait_for_data(fd, SELECT_TIMEOUT) < 1)\n+\t\t\t\treturn -1;\n+\t\t\telse /* Data available in UART Buffer: Continue to read */\n+\t\t\t\tcontinue;\n+\t\t}\n+\t\telse { /* RETRY failed : Exiting with failure */\n+\t\t\tfprintf(stderr, \"%s: RETRY failed!\", __FUNCTION__);\n+\t\t\treturn -1;\n+\t\t}\n+\t}\n+\tcount++;\n+\n+\t/* The next two bytes are the event code and parameter total length. */\n+\twhile (count < 3) {\n+\t\tr = read(fd, buf + count, 3 - count);\n+\t\tif ((r <= 0) || (buf[1] != 0xFF )) {\n+\t\t\tfprintf(stderr, \"It is not VS event !!\\n\");\n+\t\t\treturn -1;\n+\t\t}\n+\t\tcount += r;\n+\t}\n+\n+\t/* Now we read the parameters. */\n+\tif (buf[2] < (size - 3))\n+\t\tremain = buf[2];\n+\telse\n+\t\tremain = size - 3;\n+\n+\twhile ((count - 3) < remain) {\n+\t\tr = read(fd, buf + count, remain - (count - 3));\n+\t\tif (r <= 0)\n+\t\t\treturn -1;\n+\t\tcount += r;\n+\t}\n+\n+\t/* Check if the set patch command is successful or not */\n+\tif (get_vs_hci_event(buf) != HCI_CMD_SUCCESS)\n+\t\treturn -1;\n+\n+\treturn count;\n+}\n+\n+\n+int hci_send_vs_cmd(int fd, unsigned char *cmd, unsigned char *rsp, int size)\n+{\n+\tint ret = 0;\n+\n+\t/* Send the HCI command packet to UART for transmission */\n+\tret = write(fd, cmd, size);\n+\tif (ret != size) {\n+\t\tfprintf(stderr, \"%s: Send failed with ret value: %d\\n\", __FUNCTION__, ret);\n+\t\tgoto failed;\n+\t}\n+\n+\tif (wait_vsc_evt) {\n+\t\t/* Check for response from the Controller */\n+\t\tif (read_vs_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE) < 0) {\n+\t\t\tret = -ETIMEDOUT;\n+\t\t\tfprintf(stderr, \"%s: Failed to get HCI-VS Event from SOC\\n\", __FUNCTION__);\n+\t\t\tgoto failed;\n+\t\t}\n+\t}\n+\n+failed:\n+\treturn ret;\n+}\n+\n+void frame_hci_cmd_pkt(\n+    unsigned char *cmd,\n+    int edl_cmd, unsigned int p_base_addr,\n+    int segtNo, int size\n+    )\n+{\n+\tint offset = 0;\n+\thci_command_hdr *cmd_hdr;\n+\n+\tmemset(cmd, 0x0, HCI_MAX_CMD_SIZE);\n+\n+\tcmd_hdr = (void *) (cmd + 1);\n+\n+\tcmd[0]      = HCI_COMMAND_PKT;\n+\tcmd_hdr->opcode = cmd_opcode_pack(HCI_VENDOR_CMD_OGF, HCI_PATCH_CMD_OCF);\n+\tcmd_hdr->plen   = size;\n+\tcmd[4]      = edl_cmd;\n+\n+\tswitch (edl_cmd) {\n+\tcase EDL_PATCH_SET_REQ_CMD:\n+\t\t/* Copy the patch header info as CMD params */\n+\t\tmemcpy(&cmd[5], phdr_buffer, PATCH_HDR_LEN);\n+\t\tPR_DBG(\"%s: Sending EDL_PATCH_SET_REQ_CMD\\n\", __FUNCTION__);\n+\t\tPR_DBG(\"HCI-CMD %d:\\t0x%x \\t0x%x \\t0x%x \\t0x%x \\t0x%x\\n\",\n+\t\t\tsegtNo, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]);\n+\t\tbreak;\n+\tcase EDL_PATCH_DLD_REQ_CMD:\n+\t\toffset = ((segtNo - 1) * MAX_DATA_PER_SEGMENT);\n+\t\tp_base_addr += offset;\n+\t\tcmd_hdr->plen   = (size + 6);\n+\t\tcmd[5]  = (size + 4);\n+\t\tcmd[6]  = EXTRACT_BYTE(p_base_addr, 0);\n+\t\tcmd[7]  = EXTRACT_BYTE(p_base_addr, 1);\n+\t\tcmd[8]  = EXTRACT_BYTE(p_base_addr, 2);\n+\t\tcmd[9]  = EXTRACT_BYTE(p_base_addr, 3);\n+\t\tmemcpy(&cmd[10], (pdata_buffer + offset), size);\n+\n+\t\tPR_DBG(\"%s: Sending EDL_PATCH_DLD_REQ_CMD: size: %d bytes\\n\",\n+\t\t\t__FUNCTION__, size);\n+\t\tPR_DBG(\"HCI-CMD %d:\\t0x%x\\t0x%x\\t0x%x\\t0x%x\\t0x%x\\t0x%x\\t0x%x\\t\"\n+\t\t\t\"0x%x\\t0x%x\\t0x%x\\t\\n\", segtNo, cmd[0], cmd[1], cmd[2],\n+\t\t\tcmd[3], cmd[4], cmd[5], cmd[6], cmd[7], cmd[8], cmd[9]);\n+\t\tbreak;\n+\tcase EDL_PATCH_ATCH_REQ_CMD:\n+\t\tPR_DBG(\"%s: Sending EDL_PATCH_ATTACH_REQ_CMD\\n\", __FUNCTION__);\n+\t\tPR_DBG(\"HCI-CMD %d:\\t0x%x \\t0x%x \\t0x%x \\t0x%x \\t0x%x\\n\",\n+\t\t\tsegtNo, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]);\n+\t\tbreak;\n+\tcase EDL_PATCH_RST_REQ_CMD:\n+\t\tPR_DBG(\"%s: Sending EDL_PATCH_RESET_REQ_CMD\\n\", __FUNCTION__);\n+\t\tPR_DBG(\"HCI-CMD %d:\\t0x%x \\t0x%x \\t0x%x \\t0x%x \\t0x%x\\n\",\n+\t\t\tsegtNo, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]);\n+\t\tbreak;\n+\tcase EDL_PATCH_VER_REQ_CMD:\n+\t\tPR_DBG(\"%s: Sending EDL_PATCH_VER_REQ_CMD\\n\", __FUNCTION__);\n+\t\tPR_DBG(\"HCI-CMD %d:\\t0x%x \\t0x%x \\t0x%x \\t0x%x \\t0x%x\\n\",\n+\t\t\tsegtNo, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]);\n+\t\tbreak;\n+\tcase EDL_PATCH_TLV_REQ_CMD:\n+\t\tPR_DBG(\"%s: Sending EDL_PATCH_TLV_REQ_CMD\\n\", __FUNCTION__);\n+\t\t/* Parameter Total Length */\n+\t\tcmd[3] = size +2;\n+\n+\t\t/* TLV Segment Length */\n+\t\tcmd[5] = size;\n+\t\tPR_DBG(\"HCI-CMD %d:\\t0x%x \\t0x%x \\t0x%x \\t0x%x \\t0x%x \\t0x%x\\n\",\n+\t\t\tsegtNo, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4], cmd[5]);\n+\t\toffset = (segtNo * MAX_SIZE_PER_TLV_SEGMENT);\n+\t\tmemcpy(&cmd[6], (pdata_buffer + offset), size);\n+\t\tbreak;\n+\tdefault:\n+\t\tfprintf(stderr, \"%s: Unknown EDL CMD !!!\\n\", __FUNCTION__);\n+\t}\n+}\n+\n+void rome_extract_patch_header_info(unsigned char *buf)\n+{\n+\tint index;\n+\n+\t/* Extract patch id */\n+\tfor (index = 0; index < 4; index++)\n+\t\trampatch_patch_info.patch_id |=\n+\t\t\t(LSH(buf[index + P_ID_OFFSET], (index * 8)));\n+\n+\t/* Extract (ROM and BUILD) version information */\n+\tfor (index = 0; index < 2; index++)\n+\t\trampatch_patch_info.patch_ver.rom_version |=\n+\t\t\t(LSH(buf[index + P_ROME_VER_OFFSET], (index * 8)));\n+\n+\tfor (index = 0; index < 2; index++)\n+\t\trampatch_patch_info.patch_ver.build_version |=\n+\t\t\t(LSH(buf[index + P_BUILD_VER_OFFSET], (index * 8)));\n+\n+\t/* Extract patch base and entry addresses */\n+\tfor (index = 0; index < 4; index++)\n+\t\trampatch_patch_info.patch_base_addr |=\n+\t\t\t(LSH(buf[index + P_BASE_ADDR_OFFSET], (index * 8)));\n+\n+\t/* Patch BASE & ENTRY addresses are same */\n+\trampatch_patch_info.patch_entry_addr = rampatch_patch_info.patch_base_addr;\n+\n+\t/* Extract total length of the patch payload */\n+\tfor (index = 0; index < 4; index++)\n+\t\trampatch_patch_info.patch_length |=\n+\t\t\t(LSH(buf[index + P_LEN_OFFSET], (index * 8)));\n+\n+\t/* Extract the CRC checksum of the patch payload */\n+\tfor (index = 0; index < 4; index++)\n+\t\trampatch_patch_info.patch_crc |=\n+\t\t\t(LSH(buf[index + P_CRC_OFFSET], (index * 8)));\n+\n+\t/* Extract patch control value */\n+\tfor (index = 0; index < 4; index++)\n+\t\trampatch_patch_info.patch_ctrl |=\n+\t\t\t(LSH(buf[index + P_CONTROL_OFFSET], (index * 8)));\n+\n+\tfprintf(stderr, \"PATCH_ID\\t : 0x%x\\n\", rampatch_patch_info.patch_id);\n+\tfprintf(stderr, \"ROM_VERSION\\t : 0x%x\\n\", rampatch_patch_info.patch_ver.rom_version);\n+\tfprintf(stderr, \"BUILD_VERSION\\t : 0x%x\\n\", rampatch_patch_info.patch_ver.build_version);\n+\tfprintf(stderr, \"PATCH_LENGTH\\t : 0x%x\\n\", rampatch_patch_info.patch_length);\n+\tfprintf(stderr, \"PATCH_CRC\\t : 0x%x\\n\", rampatch_patch_info.patch_crc);\n+\tfprintf(stderr, \"PATCH_CONTROL\\t : 0x%x\\n\", rampatch_patch_info.patch_ctrl);\n+\tfprintf(stderr, \"PATCH_BASE_ADDR\\t : 0x%x\\n\", rampatch_patch_info.patch_base_addr);\n+\n+}\n+\n+int rome_edl_set_patch_request(int fd)\n+{\n+\tint size, err;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\n+\t/* Frame the HCI CMD to be sent to the Controller */\n+\tframe_hci_cmd_pkt(cmd, EDL_PATCH_SET_REQ_CMD, 0,\n+\t\t\t  -1, PATCH_HDR_LEN + 1);\n+\n+\t/* Total length of the packet to be sent to the Controller */\n+\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + cmd[PLEN]);\n+\n+\t/* Send HCI Command packet to Controller */\n+\terr = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size);\n+\tif (err != size) {\n+\t\tfprintf(stderr, \"Failed to set the patch info to the Controller!\\n\");\n+\t\tgoto error;\n+\t}\n+\n+\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\tif (err < 0) {\n+\t\tfprintf(stderr, \"%s: Failed to set patch info on Controller\\n\", __FUNCTION__);\n+\t\tgoto error;\n+\t}\n+error:\n+\treturn err;\n+}\n+\n+int rome_edl_patch_download_request(int fd)\n+{\n+\tint no_of_patch_segment;\n+\tint index = 1, err = 0, size = 0;\n+\tunsigned int p_base_addr;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\n+\tno_of_patch_segment = (rampatch_patch_info.patch_length /\n+\t\t\t       MAX_DATA_PER_SEGMENT);\n+\n+\t/* Initialize the patch base address from the one read from bin file */\n+\tp_base_addr = rampatch_patch_info.patch_base_addr;\n+\n+\t/*\n+\t * Depending upon size of the patch payload, download the patches in\n+\t * segments with a max. size of 239 bytes\n+\t */\n+\tfor (index = 1; index <= no_of_patch_segment; index++) {\n+\t\t/* Frame the HCI CMD PKT to be sent to Controller*/\n+\t\tframe_hci_cmd_pkt(cmd, EDL_PATCH_DLD_REQ_CMD, p_base_addr,\n+\t\t\t\t  index, MAX_DATA_PER_SEGMENT);\n+\n+\t\t/* Total length of the packet to be sent to the Controller */\n+\t\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + cmd[PLEN]);\n+\n+\t\t/* Initialize the RSP packet everytime to 0 */\n+\t\tmemset(rsp, 0x0, HCI_MAX_EVENT_SIZE);\n+\n+\t\t/* Send HCI Command packet to Controller */\n+\t\terr = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size);\n+\t\tif (err != size) {\n+\t\t\tfprintf(stderr, \"Failed to send the patch payload to the Controller!\\n\");\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Read Command Complete Event */\n+\t\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: Failed to downlaod patch segment: %d!\\n\",\n+\t\t\t\t__FUNCTION__, index);\n+\t\t\tgoto error;\n+\t\t}\n+\t}\n+\n+\t/* Check if any pending patch data to be sent */\n+\tsize = (rampatch_patch_info.patch_length < MAX_DATA_PER_SEGMENT) ?\n+\t\trampatch_patch_info.patch_length :\n+\t\t(rampatch_patch_info.patch_length  % MAX_DATA_PER_SEGMENT);\n+\n+\tif (size) {\n+\t\t/* Frame the HCI CMD PKT to be sent to Controller*/\n+\t\tframe_hci_cmd_pkt(cmd, EDL_PATCH_DLD_REQ_CMD, p_base_addr, index, size);\n+\n+\t\t/* Initialize the RSP packet everytime to 0 */\n+\t\tmemset(rsp, 0x0, HCI_MAX_EVENT_SIZE);\n+\n+\t\t/* Total length of the packet to be sent to the Controller */\n+\t\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + cmd[PLEN]);\n+\n+\t\t/* Send HCI Command packet to Controller */\n+\t\terr = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size);\n+\t\tif (err != size) {\n+\t\t\tfprintf(stderr, \"Failed to send the patch payload to the Controller!\\n\");\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Read Command Complete Event */\n+\t\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: Failed to downlaod patch segment: %d!\\n\",\n+\t\t\t\t__FUNCTION__, index);\n+\t\t\tgoto error;\n+\t\t}\n+\t}\n+\n+error:\n+\treturn err;\n+}\n+\n+static int rome_download_rampatch(int fd)\n+{\n+\tint c, size, index, ret = -1;\n+\n+\t/* Get handle to the RAMPATCH binary file */\n+\tfprintf(stderr, \"%s: Getting handle to the RAMPATCH binary file from %s\\n\", __FUNCTION__, ROME_FW_PATH);\n+\tfile = fopen(ROME_FW_PATH, \"r\");\n+\tif (file == NULL) {\n+\t\tfprintf(stderr, \"%s: Failed to get handle to the RAMPATCH bin file!\\n\",\n+\t\t\t__FUNCTION__);\n+\t\treturn -ENFILE;\n+\t}\n+\n+\t/* Allocate memory for the patch headder info */\n+\tfprintf(stderr, \"%s: Allocating memory for the patch header\\n\", __FUNCTION__);\n+\tphdr_buffer = (unsigned char *) malloc(PATCH_HDR_LEN + 1);\n+\tif (phdr_buffer == NULL) {\n+\t\tfprintf(stderr, \"%s: Failed to allocate memory for patch header\\n\",\n+\t\t\t__FUNCTION__);\n+\t\tgoto phdr_alloc_failed;\n+\t}\n+\tfor (index = 0; index < PATCH_HDR_LEN + 1; index++)\n+\t\tphdr_buffer[index] = 0x0;\n+\n+\t/* Read 28 bytes of patch header information */\n+\tfprintf(stderr, \"%s: Reading patch header info\\n\", __FUNCTION__);\n+\tindex = 0;\n+\tdo {\n+\t\tc = fgetc (file);\n+\t\tphdr_buffer[index++] = (unsigned char)c;\n+\t} while (index != PATCH_HDR_LEN);\n+\n+\t/* Save the patch header info into local structure */\n+\tfprintf(stderr, \"%s: Saving patch hdr. info\\n\", __FUNCTION__);\n+\trome_extract_patch_header_info((unsigned char *)phdr_buffer);\n+\n+\t/* Set the patch header info onto the Controller */\n+\tret = rome_edl_set_patch_request(fd);\n+\tif (ret < 0) {\n+\t\tfprintf(stderr, \"%s: Error setting the patchheader info!\\n\", __FUNCTION__);\n+\t\tgoto pdata_alloc_failed;\n+\t}\n+\n+\t/* Allocate memory for the patch payload */\n+\tfprintf(stderr, \"%s: Allocating memory for patch payload\\n\", __FUNCTION__);\n+\tsize = rampatch_patch_info.patch_length;\n+\tpdata_buffer = (unsigned char *) malloc(size+1);\n+\tif (pdata_buffer == NULL) {\n+\t\tfprintf(stderr, \"%s: Failed to allocate memory for patch payload\\n\",\n+\t\t\t__FUNCTION__);\n+\t\tgoto pdata_alloc_failed;\n+\t}\n+\tfor (index = 0; index < size+1; index++)\n+\t\tpdata_buffer[index] = 0x0;\n+\n+\t/* Read the patch data from Rampatch binary image */\n+\tfprintf(stderr, \"%s: Reading patch payload from RAMPATCH file\\n\", __FUNCTION__);\n+\tindex = 0;\n+\tdo {\n+\t\tc = fgetc (file);\n+\t\tpdata_buffer[index++] = (unsigned char)c;\n+\t} while (c != EOF);\n+\n+\t/* Downloading patches in segments to controller */\n+\tret = rome_edl_patch_download_request(fd);\n+\tif (ret < 0) {\n+\t\tfprintf(stderr, \"%s: Error downloading patch segments!\\n\", __FUNCTION__);\n+\t\tgoto cleanup;\n+\t}\n+cleanup:\n+\tfree(pdata_buffer);\n+pdata_alloc_failed:\n+\tfree(phdr_buffer);\n+phdr_alloc_failed:\n+\tfclose(file);\n+\n+\treturn ret;\n+}\n+\n+int rome_attach_rampatch(int fd)\n+{\n+\tint size, err;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\n+\t/* Frame the HCI CMD to be sent to the Controller */\n+\tframe_hci_cmd_pkt(cmd, EDL_PATCH_ATCH_REQ_CMD, 0,\n+\t\t\t  -1, EDL_PATCH_CMD_LEN);\n+\n+\t/* Total length of the packet to be sent to the Controller */\n+\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + cmd[PLEN]);\n+\n+\t/* Send HCI Command packet to Controller */\n+\terr = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size);\n+\tif (err != size) {\n+\t\tfprintf(stderr, \"Failed to attach the patch payload to the Controller!\\n\");\n+\t\tgoto error;\n+\t}\n+\n+\t/* Read Command Complete Event */\n+\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\tif (err < 0) {\n+\t\tfprintf(stderr, \"%s: Failed to attach the patch segment(s)\\n\", __FUNCTION__);\n+\t\tgoto error;\n+\t}\n+error:\n+\treturn err;\n+}\n+\n+int rome_rampatch_reset(int fd)\n+{\n+\tint size, err = 0;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tstruct timespec tm = { 0, 100*1000*1000 }; /* 100 ms */\n+\n+\t/* Frame the HCI CMD to be sent to the Controller */\n+\tframe_hci_cmd_pkt(cmd, EDL_PATCH_RST_REQ_CMD, 0,\n+\t\t\t  -1, EDL_PATCH_CMD_LEN);\n+\n+\t/* Total length of the packet to be sent to the Controller */\n+\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + EDL_PATCH_CMD_LEN);\n+\n+\t/* Send HCI Command packet to Controller */\n+\terr = write(fd, cmd, size);\n+\tif (err != size) {\n+\t\tfprintf(stderr, \"%s: Send failed with ret value: %d\\n\", __FUNCTION__, err);\n+\t\tgoto error;\n+\t}\n+\n+\t/*\n+\t * Controller doesn't sends any response for the patch reset\n+\t * command. HOST has to wait for 100ms before proceeding.\n+\t */\n+\tnanosleep(&tm, NULL);\n+\n+error:\n+\treturn err;\n+}\n+\n+int get_value_from_config(char *file_path,char *param)\n+{\n+\tFILE *pfile = NULL;\n+\tchar *line = NULL;\n+\tchar *pch = NULL;\n+\tchar param_str[20];\n+\tint bytes_read = 0, position;\n+\tint ret = -1;\n+\n+\tif (!file_path || !param) {\n+\t\tfprintf(stderr,\"Invalid arguments\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tpfile = fopen(file_path, \"r\" );\n+\tif (!pfile) {\n+\t\tfprintf(stderr, \"Failed to open %s\\n\", file_path);\n+\t\treturn ret;\n+\t}\n+\n+\twhile (getline(&line, &bytes_read, pfile) > 0 ) {\n+\t\tif (line[0] != '#'  && line[0] != '\\n') {\n+\t\t\tpch = memchr(line, '=', strlen(line));\n+\t\t\tif (pch != NULL) {\n+\t\t\t\tposition = pch - line;\n+\t\t\t\tstrncpy(param_str, line, position);\n+\t\t\t\tif (strncmp(param_str, param, position) == 0) {\n+\t\t\t\t\tret = atoi(pch + 1);\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\t}\n+\tfree(line);\n+\tfclose(pfile);\n+\treturn ret;\n+}\n+\n+int read_bd_address(unsigned char *bdaddr)\n+{\n+\tint fd = -1;\n+\tint readPtr = 0;\n+\tunsigned char data[BD_ADDR_LEN];\n+\n+\t/* Open the persist file for reading device address*/\n+\tfd = open(\"/etc/bluetooth/.bt_nv.bin\", O_RDONLY);\n+\tif (fd < 0) {\n+\t\tfprintf(stderr, \"%s: Open failed: Programming default BD ADDR\\n\", __func__);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Read the NVM Header : fp will be advanced by readPtr number of bytes */\n+\treadPtr = read(fd, data, PERSIST_HEADER_LEN);\n+\tif (readPtr > 0)\n+\t\tfprintf(stderr, \"%s: Persist header data: %02x \\t %02x \\t %02x\\n\", __func__,\n+\t\t\tdata[NVITEM], data[RDWR_PROT], data[NVITEM_SIZE]);\n+\telse {\n+\t\tfprintf(stderr, \"%s: Read from persist memory failed : Programming default\"\n+\t\t\t\" BD ADDR\\n\");\n+\t\tclose(fd);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Check for BD ADDR length before programming */\n+\tif (data[NVITEM_SIZE] != BD_ADDR_LEN) {\n+\t\tfprintf(stderr, \"Invalid BD ADDR: Programming default BD ADDR!\\n\");\n+\t\tclose(fd);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Read the BD ADDR info */\n+\treadPtr = read(fd, data, BD_ADDR_LEN);\n+\tif (readPtr > 0)\n+\t\tfprintf(stderr, \"BD-ADDR: ==> %02x:%02x:%02x:%02x:%02x:%02x\\n\", data[0],\n+\t\t\tdata[1], data[2], data[3], data[4], data[5]);\n+\telse {\n+\t\tfprintf(stderr, \"%s: Read from persist memory failed : Programming default\"\n+\t\t\t\" BD ADDR\\n\");\n+\t\tclose(fd);\n+\t\treturn -1;\n+\t}\n+\tmemcpy(bdaddr, data, BD_ADDR_LEN);\n+\tclose(fd);\n+\treturn 0;\n+}\n+\n+int isSpeedValid(int speed, unsigned char *baud_rate)\n+{\n+\tswitch(speed) {\n+\tcase 9600:\n+\t\t*baud_rate = BAUDRATE_9600;\n+\t\tbreak;\n+\tcase 19200:\n+\t\t*baud_rate = BAUDRATE_19200;\n+\t\tbreak;\n+\tcase 57600:\n+\t\t*baud_rate = BAUDRATE_57600;\n+\t\tbreak;\n+\tcase 115200:\n+\t\t*baud_rate = BAUDRATE_115200;\n+\t\tbreak;\n+\tcase 230400:\n+\t\t*baud_rate = BAUDRATE_230400;\n+\t\tbreak;\n+\tcase 460800:\n+\t\t*baud_rate = BAUDRATE_460800;\n+\t\tbreak;\n+\tcase 921600:\n+\t\t*baud_rate = BAUDRATE_921600;\n+\t\tbreak;\n+\tcase 1000000:\n+\t\t*baud_rate = BAUDRATE_1000000;\n+\t\tbreak;\n+\tcase 2000000:\n+\t\t*baud_rate = BAUDRATE_2000000;\n+\t\tbreak;\n+\tcase 3000000:\n+\t\t*baud_rate = BAUDRATE_3000000;\n+\t\tbreak;\n+\tcase 4000000:\n+\t\t*baud_rate = BAUDRATE_4000000;\n+\t\tbreak;\n+\tcase 300:\n+\tcase 600:\n+\tcase 1200:\n+\tcase 2400:\n+\tdefault:\n+\t\tfprintf(stderr, \"Invalid baudrate, default to 115200!\\n\");\n+\t\t*baud_rate = BAUDRATE_115200;\n+\t\tbreak;\n+\t}\n+\treturn -1;\n+}\n+\n+int rome_get_tlv_file(char *file_path, unsigned char baud_rate)\n+{\n+\tFILE * pFile;\n+\tlong fileSize;\n+\tint readSize, nvm_length, nvm_index, i;\n+\tunsigned short nvm_tag_len;\n+\ttlv_patch_info *ptlv_header;\n+\ttlv_nvm_hdr *nvm_ptr;\n+\tunsigned char data_buf[PRINT_BUF_SIZE]={0,};\n+\tunsigned char *nvm_byte_ptr;\n+\tunsigned char bdaddr[6];\n+\tunsigned short pcm_value, ibs_value;\n+\tunsigned short deep_sleep_value;\n+\n+\tpFile = fopen ( file_path , \"r\" );\n+\tif (pFile==NULL) {\n+\t\tfprintf(stderr, \"%s File Open Fail\\n\", file_path);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Get File Size */\n+\tfseek (pFile , 0 , SEEK_END);\n+\n+\tif ((fileSize = ftell(pFile)) < 0) {\n+\t\tfprintf(stderr, \"%s: fail to get current file position\\n\", file_path);\n+\t\tfclose(pFile);\n+\t\treturn -1;\n+\t}\n+\n+\tif (fileSize == 0) {\n+\t\tfprintf(stderr, \"%s: no content in the file\\n\", file_path);\n+\t\tfclose(pFile);\n+\t\treturn -1;\n+\t}\n+\n+\trewind (pFile);\n+\n+\tpdata_buffer = (unsigned char*) malloc (sizeof(char)*fileSize);\n+\tif (pdata_buffer == NULL) {\n+\t\tfprintf(stderr, \"Allocated Memory failed\\n\");\n+\t\tfclose (pFile);\n+\t\treturn -1;\n+\t}\n+\n+\t/* Copy file into allocated buffer */\n+\treadSize = fread (pdata_buffer,1,fileSize,pFile);\n+\n+\t/* File Close */\n+\tfclose (pFile);\n+\n+\tif (readSize != fileSize) {\n+\t\tfprintf(stderr, \"Read file size(%d) not matched with actual file size (%ld bytes)\\n\",readSize,fileSize);\n+\t\treturn -1;\n+\t}\n+\n+\tptlv_header = (tlv_patch_info *) pdata_buffer;\n+\n+\t/* To handle different event between rampatch and NVM */\n+\tgTlv_type = ptlv_header->tlv_type;\n+\tgtlv_dwndcfg = ptlv_header->tlv.patch.dwnd_cfg;\n+\n+\tif (ptlv_header->tlv_type == TLV_TYPE_PATCH) {\n+\t\tPR_INFO(\"====================================================\\n\");\n+\t\tPR_INFO(\"TLV Type               : 0x%x\\n\", ptlv_header->tlv_type);\n+\t\tPR_INFO(\"Length                 : %d bytes\\n\", (ptlv_header->tlv_length1) |\n+\t\t       (ptlv_header->tlv_length2 << 8) |\n+\t\t       (ptlv_header->tlv_length3 << 16));\n+\t\tPR_INFO(\"Total Length           : %d bytes\\n\", ptlv_header->tlv.patch.tlv_data_len);\n+\t\tPR_INFO(\"Patch Data Length      : %d bytes\\n\",ptlv_header->tlv.patch.tlv_patch_data_len);\n+\t\tPR_INFO(\"Signing Format Version : 0x%x\\n\", ptlv_header->tlv.patch.sign_ver);\n+\t\tPR_INFO(\"Signature Algorithm    : 0x%x\\n\", ptlv_header->tlv.patch.sign_algorithm);\n+\t\tPR_INFO(\"Event Handling         : 0x%x\\n\", ptlv_header->tlv.patch.dwnd_cfg);\n+\t\tPR_INFO(\"Reserved               : 0x%x\\n\", ptlv_header->tlv.patch.reserved1);\n+\t\tPR_INFO(\"Product ID             : 0x%04x\\n\", ptlv_header->tlv.patch.prod_id);\n+\t\tPR_INFO(\"Rom Build Version      : 0x%04x\\n\", ptlv_header->tlv.patch.build_ver);\n+\t\tPR_INFO(\"Patch Version          : 0x%04x\\n\", ptlv_header->tlv.patch.patch_ver);\n+\t\tPR_INFO(\"Reserved               : 0x%x\\n\", ptlv_header->tlv.patch.reserved2);\n+\t\tPR_INFO(\"Patch Entry Address    : 0x%x\\n\", (ptlv_header->tlv.patch.patch_entry_addr));\n+\t\tPR_INFO(\"====================================================\\n\");\n+\n+\t} else if (ptlv_header->tlv_type == TLV_TYPE_NVM) {\n+\t\tPR_INFO(\"====================================================\\n\");\n+\t\tPR_INFO(\"TLV Type               : 0x%x\\n\", ptlv_header->tlv_type);\n+\t\tPR_INFO(\"Length                 : %d bytes\\n\",  nvm_length =\n+\t\t\t(ptlv_header->tlv_length1) |\n+\t\t\t(ptlv_header->tlv_length2 << 8) |\n+\t\t\t(ptlv_header->tlv_length3 << 16));\n+\n+\t\tif (nvm_length <= 0)\n+\t\t\treturn readSize;\n+\n+\t\tfor(nvm_byte_ptr=(unsigned char *)(nvm_ptr = &(ptlv_header->tlv.nvm)), nvm_index=0;\n+\t\t    nvm_index < nvm_length ; nvm_ptr = (tlv_nvm_hdr *) nvm_byte_ptr) {\n+\t\t\tPR_DBG(\"TAG ID\\t\\t\\t : %d\\n\", nvm_ptr->tag_id);\n+\t\t\tPR_DBG(\"TAG Length\\t\\t\\t : %d\\n\", nvm_tag_len = nvm_ptr->tag_len);\n+\t\t\tPR_DBG(\"TAG Pointer\\t\\t\\t : %d\\n\", nvm_ptr->tag_ptr);\n+\t\t\tPR_DBG(\"TAG Extended Flag\\t\\t : %d\\n\", nvm_ptr->tag_ex_flag);\n+\n+\t\t\t/* Increase nvm_index to NVM data */\n+\t\t\tnvm_index+=sizeof(tlv_nvm_hdr);\n+\t\t\tnvm_byte_ptr+=sizeof(tlv_nvm_hdr);\n+\n+#ifndef MODULE_HAS_MAC_ADDR\n+\t\t\t/* Write BD Address */\n+\t\t\tif (nvm_ptr->tag_id == TAG_NUM_2 && read_bd_address(bdaddr) == 0) {\n+\t\t\t\tmemcpy(nvm_byte_ptr, bdaddr, 6);\n+\t\t\t\tPR_INFO(\"Overriding default BD ADDR with user\"\n+\t\t\t\t       \" programmed BD Address: %02x:%02x:%02x:%02x:%02x:%02x\\n\",\n+\t\t\t\t       *nvm_byte_ptr, *(nvm_byte_ptr+1), *(nvm_byte_ptr+2),\n+\t\t\t\t       *(nvm_byte_ptr+3), *(nvm_byte_ptr+4), *(nvm_byte_ptr+5));\n+\t\t\t}\n+#else\n+\t\t\t/* Remove it from NVM data */\n+\t\t\tif (nvm_ptr->tag_id == TAG_NUM_2) {\n+\t\t\t\tint nvm_size = nvm_ptr->tag_len + sizeof(tlv_nvm_hdr);\n+\t\t\t\tPR_INFO(\"Skip BD Address from NVM\\n\");\n+\t\t\t\tnvm_index += nvm_ptr->tag_len;\n+\t\t\t\tnvm_byte_ptr += nvm_ptr->tag_len;\n+\t\t\t\tmemmove(nvm_ptr, nvm_byte_ptr, nvm_length - nvm_index);\n+\t\t\t\tnvm_length -= nvm_size;\n+\t\t\t\tnvm_byte_ptr -= nvm_size;\n+\t\t\t\treadSize -= nvm_size;\n+\t\t\t\tnvm_index -= nvm_size;\n+\t\t\t\tcontinue;\n+\t\t\t}\n+#endif\n+\n+\t\t\tif (nvm_ptr->tag_id == TAG_NUM_17) {\n+\t\t\t\tPR_DBG(\"Forcing IBS to be disabled\\n\");\n+\t\t\t\tnvm_byte_ptr[FWCONF_IBS_VAL_OFFSET] &=\n+\t\t\t\t\t(~(FWCONF_IBS_ENABLE << FWCONF_IBS_VAL_BIT));\n+\t\t\t\tif (baud_rate != nvm_byte_ptr[FWCONF_BAUD_VAL_OFFSET]) {\n+\t\t\t\t\tPR_INFO(\"Change Vendor Baud from 0x%02x to 0x%02x\\n\",\n+\t\t\t\t\t       nvm_byte_ptr[FWCONF_BAUD_VAL_OFFSET], baud_rate);\n+\t\t\t\t\tnvm_byte_ptr[FWCONF_BAUD_VAL_OFFSET] = baud_rate;\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\tif (nvm_ptr->tag_id == TAG_NUM_27) {\n+\t\t\t\tif ((deep_sleep_value =\n+\t\t\t\t     get_value_from_config(FW_CONFIG_FILE_PATH, \"DEEP_SLEEP\")) >= 0) {\n+\t\t\t\t\tif (deep_sleep_value == FWCONF_DEEP_SLEEP_DISABLE) {\n+\t\t\t\t\t\tnvm_byte_ptr[FWCONF_DEEP_SLEEP_BYTE_OFFSET] &=\n+\t\t\t\t\t\t\t(~(1 << FWCONF_DEEP_SLEEP_BIT_OFFSET));\n+\t\t\t\t\t} else if (deep_sleep_value == FWCONF_DEEP_SLEEP_ENABLE) {\n+\t\t\t\t\t\tnvm_byte_ptr[FWCONF_DEEP_SLEEP_BYTE_OFFSET] |=\n+\t\t\t\t\t\t\t(1 << FWCONF_DEEP_SLEEP_BIT_OFFSET);\n+\t\t\t\t\t} else {\n+\t\t\t\t\t\tfprintf(stderr, \"Ignoring invalid deep sleep config value\\n\");\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\t/* Read from file and check what PCM Configuration is required:\n+\t\t\t * Master = 0 /Slave = 1 */\n+\t\t\t/* Override PCM configuration */\n+\t\t\tif (nvm_ptr->tag_id == TAG_NUM_44) {\n+\t\t\t\tif ((pcm_value =\n+\t\t\t\t     get_value_from_config(FW_CONFIG_FILE_PATH, \"PCM\")) >= 0) {\n+\n+\t\t\t\t\tif (pcm_value == FWCONF_PCM_SLAVE) {\n+\t\t\t\t\t\tnvm_byte_ptr[FWCONF_PCM_MS_OFFSET_1] |=\n+\t\t\t\t\t\t\t(1 << FWCONF_PCM_ROLE_BIT_OFFSET);\n+\t\t\t\t\t\tnvm_byte_ptr[FWCONF_PCM_MS_OFFSET_2] |=\n+\t\t\t\t\t\t\t(1 << FWCONF_PCM_ROLE_BIT_OFFSET);\n+\t\t\t\t\t} else if (pcm_value == FWCONF_PCM_MASTER) {\n+\t\t\t\t\t\tnvm_byte_ptr[FWCONF_PCM_MS_OFFSET_1] &=\n+\t\t\t\t\t\t\t(~(1 << FWCONF_PCM_ROLE_BIT_OFFSET));\n+\t\t\t\t\t\tnvm_byte_ptr[FWCONF_PCM_MS_OFFSET_2] &=\n+\t\t\t\t\t\t\t(~(1 << FWCONF_PCM_ROLE_BIT_OFFSET));\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\tfor(i =0;(i<nvm_ptr->tag_len && (i*3 + 2) < PRINT_BUF_SIZE);i++)\n+\t\t\t\tsnprintf((char *) data_buf, PRINT_BUF_SIZE, \"%s%.02x \",\n+\t\t\t\t\t (char *)data_buf, *(nvm_byte_ptr + i));\n+\n+\t\t\tPR_DBG(\"TAG Data\\t\\t\\t : %s\\n\", data_buf);\n+\n+\t\t\t/* Clear buffer */\n+\t\t\tmemset(data_buf, 0x0, PRINT_BUF_SIZE);\n+\n+\t\t\t/* increased by tag_len */\n+\t\t\tnvm_index+=nvm_ptr->tag_len;\n+\t\t\tnvm_byte_ptr +=nvm_ptr->tag_len;\n+\t\t}\n+\n+\t\tPR_INFO(\"====================================================\\n\");\n+\n+\t} else {\n+\t\tfprintf(stderr, \"TLV Header type is unknown (%d) \\n\", ptlv_header->tlv_type);\n+\t}\n+\n+\treturn readSize;\n+}\n+\n+int rome_tlv_dnld_segment(int fd, int index, int seg_size, unsigned char wait_cc_evt)\n+{\n+\tint size=0, err = -1;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\n+\t/* Frame the HCI CMD PKT to be sent to Controller*/\n+\tframe_hci_cmd_pkt(cmd, EDL_PATCH_TLV_REQ_CMD, 0, index, seg_size);\n+\n+\t/* Total length of the packet to be sent to the Controller */\n+\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + cmd[PLEN]);\n+\n+\t/* Initialize the RSP packet everytime to 0 */\n+\tmemset(rsp, 0x0, HCI_MAX_EVENT_SIZE);\n+\n+\t/* Send HCI Command packet to Controller */\n+\terr = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size);\n+\tif (err != size) {\n+\t\tfprintf(stderr, \"Failed to send the patch payload to the Controller! 0x%x\\n\", err);\n+\t\treturn err;\n+\t}\n+\n+\tif (wait_cc_evt) {\n+\t\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: Failed to downlaod patch segment: %d!\\n\",  __FUNCTION__, index);\n+\t\t\treturn err;\n+\t\t}\n+\t}\n+\n+\treturn err;\n+}\n+\n+int rome_tlv_dnld_req(int fd, int tlv_size)\n+{\n+\tint  total_segment, remain_size, i, err = -1;\n+\tunsigned char wait_cc_evt = FALSE;\n+\tunsigned int rom = rome_ver >> 16;\n+\n+\ttotal_segment = tlv_size/MAX_SIZE_PER_TLV_SEGMENT;\n+\tremain_size = (tlv_size < MAX_SIZE_PER_TLV_SEGMENT)?\\\n+\t\t      tlv_size: (tlv_size%MAX_SIZE_PER_TLV_SEGMENT);\n+\n+\tif (gTlv_type == TLV_TYPE_PATCH) {\n+\t\t/* Prior to Rome version 3.2(including inital few rampatch release of\n+\t\t * Rome 3.2), the event handling mechanism is ROME_SKIP_EVT_NONE. After\n+\t\t * few release of rampatch for Rome 3.2, the mechamism is changed to\n+\t\t * ROME_SKIP_EVT_VSE_CC. Rest of the mechanism is not used for now\n+\t\t */\n+\t\tswitch (gtlv_dwndcfg)\n+\t\t{\n+\t\t\tcase ROME_SKIP_EVT_NONE:\n+\t\t\t\twait_vsc_evt = TRUE;\n+\t\t\t\twait_cc_evt = TRUE;\n+\t\t\t\tPR_DBG(\"%s: Event handling type: ROME_SKIP_EVT_NONE\", __func__);\n+\t\t\t\tbreak;\n+\t\t\tcase ROME_SKIP_EVT_VSE_CC:\n+\t\t\t\twait_vsc_evt = FALSE;\n+\t\t\t\twait_cc_evt = FALSE;\n+\t\t\t\tPR_DBG(\"%s: Event handling type: ROME_SKIP_EVT_VSE_CC\", __func__);\n+\t\t\t\tbreak;\n+\t\t\t\t/* Not handled for now */\n+\t\t\tcase ROME_SKIP_EVT_VSE:\n+\t\t\tcase ROME_SKIP_EVT_CC:\n+\t\t\tdefault:\n+\t\t\t\tfprintf(stderr, \"%s: Unsupported Event handling: %d\", __func__, gtlv_dwndcfg);\n+\t\t\t\tbreak;\n+\t\t}\n+\t} else {\n+\t\twait_vsc_evt = TRUE;\n+\t\twait_cc_evt = TRUE;\n+\t}\n+\n+\tfor(i = 0; i < total_segment; i++) {\n+\t\tif ((i+1) == total_segment) {\n+\t\t\tif ((rom >= ROME_PATCH_VER_0100) && (rom < ROME_PATCH_VER_0302) &&\n+\t\t\t    (gTlv_type == TLV_TYPE_PATCH)) {\n+\t\t\t\t/* If the Rome version is from 1.1 to 3.1\n+\t\t\t\t * 1. No CCE for the last command segment but all other segment\n+\t\t\t\t * 2. All the command segments get VSE including the last one\n+\t\t\t\t */\n+\t\t\t\twait_cc_evt = !remain_size ? FALSE: TRUE;\n+\t\t\t} else if ((rom == ROME_PATCH_VER_0302) &&\n+\t\t\t\t   (gTlv_type == TLV_TYPE_PATCH)) {\n+\t\t\t\t/* If the Rome version is 3.2\n+\t\t\t\t * 1. None of the command segments receive CCE\n+\t\t\t\t * 2. No command segments receive VSE except the last one\n+\t\t\t\t * 3. If gtlv_dwndcfg is ROME_SKIP_EVT_NONE then the logic is\n+\t\t\t\t *    same as Rome 2.1, 2.2, 3.0\n+\t\t\t\t */\n+\t\t\t\tif (gtlv_dwndcfg == ROME_SKIP_EVT_NONE) {\n+\t\t\t\t\twait_cc_evt = !remain_size ? FALSE: TRUE;\n+\t\t\t\t} else if (gtlv_dwndcfg == ROME_SKIP_EVT_VSE_CC) {\n+\t\t\t\t\twait_vsc_evt = !remain_size ? TRUE: FALSE;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\n+\t\tif ((err = rome_tlv_dnld_segment(fd, i, MAX_SIZE_PER_TLV_SEGMENT, wait_cc_evt )) < 0)\n+\t\t\tgoto error;\n+\t}\n+\n+\tif ((rom >= ROME_PATCH_VER_0100) && (rom < ROME_PATCH_VER_0302) &&\n+\t    (gTlv_type == TLV_TYPE_PATCH)) {\n+\t\t/* If the Rome version is from 1.1 to 3.1\n+\t\t * 1. No CCE for the last command segment but all other segment\n+\t\t * 2. All the command segments get VSE including the last one\n+\t\t */\n+\t\twait_cc_evt = remain_size ? FALSE: TRUE;\n+\t} else if ((rom == ROME_PATCH_VER_0302) && (gTlv_type == TLV_TYPE_PATCH)) {\n+\t\t/* If the Rome version is 3.2\n+\t\t * 1. None of the command segments receive CCE\n+\t\t * 2. No command segments receive VSE except the last one\n+\t\t * 3. If gtlv_dwndcfg is ROME_SKIP_EVT_NONE then the logic is\n+\t\t *    same as Rome 2.1, 2.2, 3.0\n+\t\t */\n+\t\tif (gtlv_dwndcfg == ROME_SKIP_EVT_NONE) {\n+\t\t\twait_cc_evt = remain_size ? FALSE: TRUE;\n+\t\t} else if (gtlv_dwndcfg == ROME_SKIP_EVT_VSE_CC) {\n+\t\t\twait_vsc_evt = remain_size ? TRUE: FALSE;\n+\t\t}\n+\t}\n+\n+\tif (remain_size) err =rome_tlv_dnld_segment(fd, i, remain_size, wait_cc_evt);\n+\n+error:\n+\treturn err;\n+}\n+\n+int rome_download_tlv_file(int fd, unsigned char baud_rate)\n+{\n+\tint tlv_size, err = -1;\n+\n+\t/* Rampatch TLV file Downloading */\n+\tpdata_buffer = NULL;\n+\n+\tif ((tlv_size = rome_get_tlv_file(rampatch_file_path, baud_rate)) < 0)\n+\t\tgoto error;\n+\n+\tif ((err = rome_tlv_dnld_req(fd, tlv_size)) < 0)\n+\t\tgoto error;\n+\n+\tif (pdata_buffer != NULL) {\n+\t\tfree (pdata_buffer);\n+\t\tpdata_buffer = NULL;\n+\t}\n+\n+\t/* NVM TLV file Downloading */\n+\tif ((tlv_size = rome_get_tlv_file(nvm_file_path, baud_rate)) < 0)\n+\t\tgoto error;\n+\n+\tif ((err = rome_tlv_dnld_req(fd, tlv_size)) < 0)\n+\t\tgoto error;\n+\n+error:\n+\tif (pdata_buffer != NULL)\n+\t\tfree (pdata_buffer);\n+\n+\treturn err;\n+}\n+\n+int rome_1_0_nvm_tag_dnld(int fd)\n+{\n+\tint i, size, err = 0;\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\n+#if (NVM_VERSION >= ROME_1_0_100019)\n+\tunsigned char cmds[MAX_TAG_CMD][HCI_MAX_CMD_SIZE] =\n+\t{\n+\t\t/* Tag 2 */ /* BD Address */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     9,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     2,\n+\t\t\t/* Tag Len */      6,\n+\t\t\t/* Tag Value */   0x77,0x78,0x23,0x01,0x56,0x22\n+\t\t},\n+\t\t/* Tag 6 */ /* Bluetooth Support Features */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     11,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     6,\n+\t\t\t/* Tag Len */      8,\n+\t\t\t/* Tag Value */   0xFF,0xFE,0x8B,0xFE,0xD8,0x3F,0x5B,0x8B\n+\t\t},\n+\t\t/* Tag 17 */ /* HCI Transport Layer Setting */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     11,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     17,\n+\t\t\t/* Tag Len */      8,\n+\t\t\t/* Tag Value */   0x82,0x01,0x0E,0x08,0x04,0x32,0x0A,0x00\n+\t\t},\n+\t\t/* Tag 35 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     58,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     35,\n+\t\t\t/* Tag Len */      55,\n+\t\t\t/* Tag Value */   0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x58, 0x59,\n+\t\t\t0x0E, 0x0E, 0x16, 0x16, 0x16, 0x1E, 0x26, 0x5F, 0x2F, 0x5F,\n+\t\t\t0x0E, 0x0E, 0x16, 0x16, 0x16, 0x1E, 0x26, 0x5F, 0x2F, 0x5F,\n+\t\t\t0x0C, 0x18, 0x14, 0x24, 0x40, 0x4C, 0x70, 0x80, 0x80, 0x80,\n+\t\t\t0x0C, 0x18, 0x14, 0x24, 0x40, 0x4C, 0x70, 0x80, 0x80, 0x80,\n+\t\t\t0x1B, 0x14, 0x01, 0x04, 0x48\n+\t\t},\n+\t\t/* Tag 36 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     15,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     36,\n+\t\t\t/* Tag Len */      12,\n+\t\t\t/* Tag Value */   0x0F,0x00,0x03,0x03,0x03,0x03,0x00,0x00,0x03,0x03,0x04,0x00\n+\t\t},\n+\t\t/* Tag 39 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     7,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     39,\n+\t\t\t/* Tag Len */      4,\n+\t\t\t/* Tag Value */   0x12,0x00,0x00,0x00\n+\t\t},\n+\t\t/* Tag 41 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     91,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     41,\n+\t\t\t/* Tag Len */      88,\n+\t\t\t/* Tag Value */   0x15, 0x00, 0x00, 0x00, 0xF6, 0x02, 0x00, 0x00, 0x76, 0x00,\n+\t\t\t0x1E, 0x00, 0x29, 0x02, 0x1F, 0x00, 0x61, 0x00, 0x1A, 0x00,\n+\t\t\t0x76, 0x00, 0x1E, 0x00, 0x7D, 0x00, 0x40, 0x00, 0x91, 0x00,\n+\t\t\t0x06, 0x00, 0x92, 0x00, 0x03, 0x00, 0xA6, 0x01, 0x50, 0x00,\n+\t\t\t0xAA, 0x01, 0x15, 0x00, 0xAB, 0x01, 0x0A, 0x00, 0xAC, 0x01,\n+\t\t\t0x00, 0x00, 0xB0, 0x01, 0xC5, 0x00, 0xB3, 0x01, 0x03, 0x00,\n+\t\t\t0xB4, 0x01, 0x13, 0x00, 0xB5, 0x01, 0x0C, 0x00, 0xC5, 0x01,\n+\t\t\t0x0D, 0x00, 0xC6, 0x01, 0x10, 0x00, 0xCA, 0x01, 0x2B, 0x00,\n+\t\t\t0xCB, 0x01, 0x5F, 0x00, 0xCC, 0x01, 0x48, 0x00\n+\t\t},\n+\t\t/* Tag 42 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     63,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     42,\n+\t\t\t/* Tag Len */      60,\n+\t\t\t/* Tag Value */   0xD7, 0xC0, 0x00, 0x00, 0x8F, 0x5C, 0x02, 0x00, 0x80, 0x47,\n+\t\t\t0x60, 0x0C, 0x70, 0x4C, 0x00, 0x00, 0x00, 0x01, 0x1F, 0x01,\n+\t\t\t0x42, 0x01, 0x69, 0x01, 0x95, 0x01, 0xC7, 0x01, 0xFE, 0x01,\n+\t\t\t0x3D, 0x02, 0x83, 0x02, 0xD1, 0x02, 0x29, 0x03, 0x00, 0x0A,\n+\t\t\t0x10, 0x00, 0x1F, 0x00, 0x3F, 0x00, 0x7F, 0x00, 0xFD, 0x00,\n+\t\t\t0xF9, 0x01, 0xF1, 0x03, 0xDE, 0x07, 0x00, 0x00, 0x9A, 0x01\n+\t\t},\n+\t\t/* Tag 84 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     153,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     84,\n+\t\t\t/* Tag Len */      150,\n+\t\t\t/* Tag Value */   0x7C, 0x6A, 0x59, 0x47, 0x19, 0x36, 0x35, 0x25, 0x25, 0x28,\n+\t\t\t0x2C, 0x2B, 0x2B, 0x28, 0x2C, 0x28, 0x29, 0x28, 0x29, 0x28,\n+\t\t\t0x29, 0x29, 0x2C, 0x29, 0x2C, 0x29, 0x2C, 0x28, 0x29, 0x28,\n+\t\t\t0x29, 0x28, 0x29, 0x2A, 0x00, 0x00, 0x2C, 0x2A, 0x2C, 0x18,\n+\t\t\t0x98, 0x98, 0x98, 0x98, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E,\n+\t\t\t0x1E, 0x13, 0x1E, 0x1E, 0x1E, 0x1E, 0x13, 0x13, 0x11, 0x13,\n+\t\t\t0x1E, 0x1E, 0x13, 0x12, 0x12, 0x12, 0x11, 0x12, 0x1F, 0x12,\n+\t\t\t0x12, 0x12, 0x10, 0x0C, 0x18, 0x0D, 0x01, 0x01, 0x01, 0x01,\n+\t\t\t0x01, 0x01, 0x01, 0x0C, 0x01, 0x01, 0x01, 0x01, 0x0D, 0x0D,\n+\t\t\t0x0E, 0x0D, 0x01, 0x01, 0x0D, 0x0D, 0x0D, 0x0D, 0x0F, 0x0D,\n+\t\t\t0x10, 0x0D, 0x0D, 0x0D, 0x0D, 0x10, 0x05, 0x10, 0x03, 0x00,\n+\t\t\t0x7E, 0x7B, 0x7B, 0x72, 0x71, 0x50, 0x50, 0x50, 0x00, 0x40,\n+\t\t\t0x60, 0x60, 0x30, 0x08, 0x02, 0x0F, 0x00, 0x01, 0x00, 0x00,\n+\t\t\t0x00, 0x00, 0x00, 0x00, 0x08, 0x16, 0x16, 0x08, 0x08, 0x00,\n+\t\t\t0x00, 0x00, 0x1E, 0x34, 0x2B, 0x1B, 0x23, 0x2B, 0x15, 0x0D\n+\t\t},\n+\t\t/* Tag 85 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     119,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     85,\n+\t\t\t/* Tag Len */      116,\n+\t\t\t/* Tag Value */   0x03, 0x00, 0x38, 0x00, 0x45, 0x77, 0x00, 0xE8, 0x00, 0x59,\n+\t\t\t0x01, 0xCA, 0x01, 0x3B, 0x02, 0xAC, 0x02, 0x1D, 0x03, 0x8E,\n+\t\t\t0x03, 0x00, 0x89, 0x01, 0x0E, 0x02, 0x5C, 0x02, 0xD7, 0x02,\n+\t\t\t0xF8, 0x08, 0x01, 0x00, 0x1F, 0x00, 0x0A, 0x02, 0x55, 0x02,\n+\t\t\t0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xD7, 0x00, 0x00,\n+\t\t\t0x00, 0x1E, 0xDE, 0x00, 0x00, 0x00, 0x14, 0x0F, 0x0A, 0x0F,\n+\t\t\t0x0A, 0x0C, 0x0C, 0x0C, 0x0C, 0x04, 0x04, 0x04, 0x0C, 0x0C,\n+\t\t\t0x0C, 0x0C, 0x06, 0x06, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02,\n+\t\t\t0x01, 0x00, 0x02, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00,\n+\t\t\t0x06, 0x0F, 0x14, 0x05, 0x47, 0xCF, 0x77, 0x00, 0x00, 0x00,\n+\t\t\t0x00, 0x00, 0x00, 0xAC, 0x7C, 0xFF, 0x40, 0x00, 0x00, 0x00,\n+\t\t\t0x12, 0x04, 0x04, 0x01, 0x04, 0x03\n+\t\t},\n+\t\t{TAG_END}\n+\t};\n+#elif (NVM_VERSION == ROME_1_0_6002)\n+\tunsigned char cmds[MAX_TAG_CMD][HCI_MAX_CMD_SIZE] =\n+\t{\n+\t\t/* Tag 2 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     9,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     2,\n+\t\t\t/* Tag Len */      6,\n+\t\t\t/* Tag Value */   0x77,0x78,0x23,0x01,0x56,0x22 /* BD Address */\n+\t\t},\n+\t\t/* Tag 6 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     11,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     6,\n+\t\t\t/* Tag Len */      8,\n+\t\t\t/* Tag Value */   0xFF,0xFE,0x8B,0xFE,0xD8,0x3F,0x5B,0x8B\n+\t\t},\n+\t\t/* Tag 17 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     11,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     17,\n+\t\t\t/* Tag Len */      8,\n+\t\t\t/* Tag Value */   0x82,0x01,0x0E,0x08,0x04,0x32,0x0A,0x00\n+\t\t},\n+\t\t/* Tag 36 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     15,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     36,\n+\t\t\t/* Tag Len */      12,\n+\t\t\t/* Tag Value */   0x0F,0x00,0x03,0x03,0x03,0x03,0x00,0x00,0x03,0x03,0x04,0x00\n+\t\t},\n+\n+\t\t/* Tag 39 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     7,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     39,\n+\t\t\t/* Tag Len */      4,\n+\t\t\t/* Tag Value */   0x12,0x00,0x00,0x00\n+\t\t},\n+\n+\t\t/* Tag 41 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     199,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     41,\n+\t\t\t/* Tag Len */      196,\n+\t\t\t/* Tag Value */   0x30,0x00,0x00,0x00,0xD5,0x00,0x0E,0x00,0xD6,0x00,0x0E,0x00,\n+\t\t\t0xD7,0x00,0x16,0x00,0xD8,0x00,0x16,0x00,0xD9,0x00,0x16,0x00,\n+\t\t\t0xDA,0x00,0x1E,0x00,0xDB,0x00,0x26,0x00,0xDC,0x00,0x5F,0x00,\n+\t\t\t0xDD,0x00,0x2F,0x00,0xDE,0x00,0x5F,0x00,0xE0,0x00,0x0E,0x00,\n+\t\t\t0xE1,0x00,0x0E,0x00,0xE2,0x00,0x16,0x00,0xE3,0x00,0x16,0x00,\n+\t\t\t0xE4,0x00,0x16,0x00,0xE5,0x00,0x1E,0x00,0xE6,0x00,0x26,0x00,\n+\t\t\t0xE7,0x00,0x5F,0x00,0xE8,0x00,0x2F,0x00,0xE9,0x00,0x5F,0x00,\n+\t\t\t0xEC,0x00,0x0C,0x00,0xED,0x00,0x08,0x00,0xEE,0x00,0x14,0x00,\n+\t\t\t0xEF,0x00,0x24,0x00,0xF0,0x00,0x40,0x00,0xF1,0x00,0x4C,0x00,\n+\t\t\t0xF2,0x00,0x70,0x00,0xF3,0x00,0x80,0x00,0xF4,0x00,0x80,0x00,\n+\t\t\t0xF5,0x00,0x80,0x00,0xF8,0x00,0x0C,0x00,0xF9,0x00,0x18,0x00,\n+\t\t\t0xFA,0x00,0x14,0x00,0xFB,0x00,0x24,0x00,0xFC,0x00,0x40,0x00,\n+\t\t\t0xFD,0x00,0x4C,0x00,0xFE,0x00,0x70,0x00,0xFF,0x00,0x80,0x00,\n+\t\t\t0x00,0x01,0x80,0x00,0x01,0x01,0x80,0x00,0x04,0x01,0x1B,0x00,\n+\t\t\t0x05,0x01,0x14,0x00,0x06,0x01,0x01,0x00,0x07,0x01,0x04,0x00,\n+\t\t\t0x08,0x01,0x00,0x00,0x09,0x01,0x00,0x00,0x0A,0x01,0x03,0x00,\n+\t\t\t0x0B,0x01,0x03,0x00\n+\t\t},\n+\n+\t\t/* Tag 44 */\n+\t\t{  /* Packet Type */HCI_COMMAND_PKT,\n+\t\t\t/* Opcode */       0x0b,0xfc,\n+\t\t\t/* Total Len */     44,\n+\t\t\t/* NVM CMD */    NVM_ACCESS_SET,\n+\t\t\t/* Tag Num */     44,\n+\t\t\t/* Tag Len */      41,\n+\t\t\t/* Tag Value */   0x6F,0x0A,0x00,0x00,0x00,0x00,0x00,0x50,0xFF,0x10,0x02,0x02,\n+\t\t\t0x01,0x00,0x14,0x01,0x06,0x28,0xA0,0x62,0x03,0x64,0x01,0x01,\n+\t\t\t0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0xA0,0xFF,0x10,0x02,0x01,\n+\t\t\t0x00,0x14,0x01,0x02,0x03\n+\t\t},\n+\t\t{TAG_END}\n+\t};\n+#endif\n+\n+\tfor (i=0; (i < MAX_TAG_CMD) && (cmds[i][0] != TAG_END); i++) {\n+\t\t/* Write BD Address */\n+\t\tif (cmds[i][TAG_NUM_OFFSET] == TAG_NUM_2){\n+\t\t\tmemcpy(&cmds[i][TAG_BDADDR_OFFSET], vnd_local_bd_addr, 6);\n+\t\t\tfprintf(stderr, \"BD Address: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\\n\",\n+\t\t\t\tcmds[i][TAG_BDADDR_OFFSET ], cmds[i][TAG_BDADDR_OFFSET + 1],\n+\t\t\t\tcmds[i][TAG_BDADDR_OFFSET + 2], cmds[i][TAG_BDADDR_OFFSET + 3],\n+\t\t\t\tcmds[i][TAG_BDADDR_OFFSET + 4], cmds[i][TAG_BDADDR_OFFSET + 5]);\n+\t\t}\n+\t\tsize = cmds[i][3] + HCI_COMMAND_HDR_SIZE + 1;\n+\t\t/* Send HCI Command packet to Controller */\n+\t\terr = hci_send_vs_cmd(fd, (unsigned char *)&cmds[i][0], rsp, size);\n+\t\tif (err != size) {\n+\t\t\tfprintf(stderr, \"Failed to attach the patch payload to the Controller!\\n\");\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Read Command Complete Event - This is extra routine for ROME 1.0. From ROM 2.0, it should be removed. */\n+\t\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: Failed to get patch version(s)\\n\", __FUNCTION__);\n+\t\t\tgoto error;\n+\t\t}\n+\t}\n+\n+error:\n+\treturn err;\n+}\n+\n+\n+\n+int rome_patch_ver_req(int fd)\n+{\n+\tint size, err = 0;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\n+\t/* Frame the HCI CMD to be sent to the Controller */\n+\tframe_hci_cmd_pkt(cmd, EDL_PATCH_VER_REQ_CMD, 0,\n+\t\t\t  -1, EDL_PATCH_CMD_LEN);\n+\n+\t/* Total length of the packet to be sent to the Controller */\n+\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + EDL_PATCH_CMD_LEN);\n+\n+\t/* Send HCI Command packet to Controller */\n+\terr = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size);\n+\tif (err != size) {\n+\t\tfprintf(stderr, \"Failed to attach the patch payload to the Controller!\\n\");\n+\t\tgoto error;\n+\t}\n+\n+\t/* Read Command Complete Event - This is extra routine for ROME 1.0. From ROM 2.0, it should be removed. */\n+\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\tif (err < 0) {\n+\t\tfprintf(stderr, \"%s: Failed to get patch version(s)\\n\", __FUNCTION__);\n+\t\tgoto error;\n+\t}\n+error:\n+\treturn err;\n+\n+}\n+\n+static void flow_control(int fd, int opt)\n+{\n+\tstruct termios c_opt;\n+\n+\tioctl(fd, TIOCMGET, &c_opt);\n+\tc_opt.c_cc[VTIME] = 0; /* inter-character timer unused */\n+\tc_opt.c_cc[VMIN] = 0; /* blocking read until 8 chars received */\n+\tc_opt.c_cflag &= ~CSIZE;\n+\tc_opt.c_cflag |= (CS8 | CLOCAL | CREAD);\n+\tif (opt == MSM_ENABLE_FLOW_CTRL)\n+\t\tc_opt.c_cflag |= CRTSCTS;\n+\telse if (opt == MSM_DISABLE_FLOW_CTRL)\n+\t\tc_opt.c_cflag &= ~CRTSCTS;\n+\telse {\n+\t\tfprintf(stderr, \"%s: Incorrect option passed for TIOCMSET\\n\", __func__);\n+\t\treturn;\n+\t}\n+\tc_opt.c_iflag = IGNPAR;\n+\tc_opt.c_oflag = 0;\n+\tc_opt.c_lflag = 0;\n+\tioctl(fd, TIOCMSET, &c_opt);\n+}\n+\n+\n+int rome_set_baudrate_req(int fd, unsigned char baud_rate)\n+{\n+\tint size, err = 0;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\thci_command_hdr *cmd_hdr;\n+\tint flags;\n+\n+\tmemset(cmd, 0x0, HCI_MAX_CMD_SIZE);\n+\n+\tcmd_hdr = (void *) (cmd + 1);\n+\tcmd[0]  = HCI_COMMAND_PKT;\n+\tcmd_hdr->opcode = cmd_opcode_pack(HCI_VENDOR_CMD_OGF, EDL_SET_BAUDRATE_CMD_OCF);\n+\tcmd_hdr->plen     = VSC_SET_BAUDRATE_REQ_LEN;\n+\tcmd[4]  = baud_rate;\n+\n+\t/* Total length of the packet to be sent to the Controller */\n+\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + VSC_SET_BAUDRATE_REQ_LEN);\n+\n+\t/* Flow off during baudrate change */\n+\tflow_control(fd, MSM_DISABLE_FLOW_CTRL);\n+\n+\t/* Send the HCI command packet to UART for transmission */\n+\terr = write(fd, cmd, size);\n+\tif (err != size) {\n+\t\tfprintf(stderr, \"%s: Send failed with ret value: %d\\n\", __FUNCTION__, err);\n+\t\tgoto error;\n+\t}\n+\t/* Change Local UART baudrate to high speed UART */\n+\tuserial_vendor_set_baud(baud_rate);\n+\n+\t/* Flow on after changing local uart baudrate */\n+\tflow_control(fd, MSM_ENABLE_FLOW_CTRL);\n+\n+\t/* Check for response from the Controller */\n+\tif ((err = read_vs_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE)) < 0) {\n+\t\tfprintf(stderr, \"%s: Failed to get HCI-VS Event from SOC\\n\", __FUNCTION__);\n+\t\tgoto error;\n+\t}\n+\n+\t/* Wait for command complete event */\n+\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\tif (err < 0) {\n+\t\tfprintf(stderr, \"%s: Failed to set patch info on Controller\\n\", __FUNCTION__);\n+\t\tgoto error;\n+\t}\n+error:\n+\treturn err;\n+\n+}\n+\n+\n+int rome_hci_reset_req(int fd, char baud)\n+{\n+\tint size, err = 0;\n+\tunsigned char cmd[HCI_MAX_CMD_SIZE];\n+\tunsigned char rsp[HCI_MAX_EVENT_SIZE];\n+\thci_command_hdr *cmd_hdr;\n+\tint flags;\n+\n+\tmemset(cmd, 0x0, HCI_MAX_CMD_SIZE);\n+\n+\tcmd_hdr = (void *) (cmd + 1);\n+\tcmd[0]  = HCI_COMMAND_PKT;\n+\tcmd_hdr->opcode = HCI_RESET;\n+\tcmd_hdr->plen   = 0;\n+\n+\t/* Total length of the packet to be sent to the Controller */\n+\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE);\n+\n+\t/* Flow off during baudrate change */\n+\tflow_control(fd, MSM_DISABLE_FLOW_CTRL);\n+\n+\t/* Send the HCI command packet to UART for transmission */\n+\terr = write(fd, cmd, size);\n+\tif (err != size) {\n+\t\tfprintf(stderr, \"%s: Send failed with ret value: %d\\n\", __FUNCTION__, err);\n+\t\tgoto error;\n+\t}\n+\n+\t/* Change Local UART baudrate to high speed UART */\n+\tuserial_vendor_set_baud(baud);\n+\n+\t/* Flow on after changing local uart baudrate */\n+\tflow_control(fd, MSM_ENABLE_FLOW_CTRL);\n+\n+\t/* Wait for command complete event */\n+\terr = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);\n+\tif (err < 0) {\n+\t\tfprintf(stderr, \"%s: Failed to set patch info on Controller\\n\", __FUNCTION__);\n+\t\tgoto error;\n+\t}\n+\n+error:\n+\treturn err;\n+\n+}\n+\n+int qca_soc_init(int fd, int speed, char *bdaddr)\n+{\n+\tint err = -1;\n+\tint ret = 0;\n+\tint size;\n+\tunsigned char baud_rate = 0;\n+\n+\tvnd_userial.fd = fd;\n+\n+\t/* Get Rome version information */\n+\tif ((err = rome_patch_ver_req(fd)) < 0) {\n+\t\tfprintf(stderr, \"%s: Fail to get Rome Version (0x%x)\\n\", __FUNCTION__, err);\n+\t\tret = -1;\n+\t\tgoto error;\n+\t}\n+\n+\tfprintf(stderr, \"%s: Rome Version (0x%08x)\\n\", __FUNCTION__, rome_ver);\n+\n+\tswitch (rome_ver){\n+\tcase ROME_VER_1_0:\n+\t\t/* Set and Download the RAMPATCH */\n+\t\tfprintf(stderr, \"%s: Setting Patch Header & Downloading Patches\\n\", __FUNCTION__);\n+\t\terr = rome_download_rampatch(fd);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: DOWNLOAD RAMPATCH failed!\\n\", __FUNCTION__);\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Attach the RAMPATCH */\n+\t\tfprintf(stderr, \"%s: Attaching the patches\\n\", __FUNCTION__);\n+\t\terr = rome_attach_rampatch(fd);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: ATTACH RAMPATCH failed!\\n\", __FUNCTION__);\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Send Reset */\n+\t\tsize = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + EDL_PATCH_CMD_LEN);\n+\t\terr = rome_rampatch_reset(fd);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"Failed to RESET after RAMPATCH upgrade!\\n\");\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* NVM download */\n+\t\tfprintf(stderr, \"%s: Downloading NVM\\n\", __FUNCTION__);\n+\t\terr = rome_1_0_nvm_tag_dnld(fd);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"Downloading NVM Failed !!\\n\");\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Change baud rate 115.2 kbps to 3Mbps*/\n+\t\terr = rome_hci_reset_req(fd, baud_rate);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"HCI Reset Failed !!\\n\");\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\t\tbreak;\n+\tcase ROME_VER_1_1:\n+\t\trampatch_file_path = ROME_RAMPATCH_TLV_PATH;\n+\t\tnvm_file_path = ROME_NVM_TLV_PATH;\n+\t\tgoto download;\n+\tcase ROME_VER_1_3:\n+\t\trampatch_file_path = ROME_RAMPATCH_TLV_1_0_3_PATH;\n+\t\tnvm_file_path = ROME_NVM_TLV_1_0_3_PATH;\n+\t\tgoto download;\n+\tcase ROME_VER_2_1:\n+\t\trampatch_file_path = ROME_RAMPATCH_TLV_2_0_1_PATH;\n+\t\tnvm_file_path = ROME_NVM_TLV_2_0_1_PATH;\n+\t\tgoto download;\n+\tcase ROME_VER_3_0:\n+\t\trampatch_file_path = ROME_RAMPATCH_TLV_3_0_0_PATH;\n+\t\tnvm_file_path = ROME_NVM_TLV_3_0_0_PATH;\n+\t\tgoto download;\n+\tcase ROME_VER_3_2:\n+\t\trampatch_file_path = ROME_RAMPATCH_TLV_3_0_2_PATH;\n+\t\tnvm_file_path = ROME_NVM_TLV_3_0_2_PATH;\n+\t\tgoto download;\n+\tcase TUFELLO_VER_1_0:\n+\t\trampatch_file_path = TF_RAMPATCH_TLV_1_0_0_PATH;\n+\t\tnvm_file_path = TF_NVM_TLV_1_0_0_PATH;\n+\t\tgoto download;\n+\tcase TUFELLO_VER_1_1:\n+\t\trampatch_file_path = TF_RAMPATCH_TLV_1_0_1_PATH;\n+\t\tnvm_file_path = TF_NVM_TLV_1_0_1_PATH;\n+download:\n+\t\tisSpeedValid(speed, &baud_rate);\n+\t\tif (baud_rate < 0) {\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Donwload TLV files (rampatch, NVM) */\n+\t\terr = rome_download_tlv_file(fd, baud_rate);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: Download TLV file failed!\\n\", __FUNCTION__);\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/*\n+\t\t * Overriding the baud rate value in NVM file with the user\n+\t\t * requested baud rate, since default baud rate in NVM file is 3M.\n+\t\t */\n+\t\terr = rome_set_baudrate_req(fd, baud_rate);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"%s: Baud rate change failed!\\n\", __FUNCTION__);\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\t/* Perform HCI reset here*/\n+\t\terr = rome_hci_reset_req(fd, baud_rate);\n+\t\tif (err < 0) {\n+\t\t\tfprintf(stderr, \"HCI Reset Failed !!!\\n\");\n+\t\t\tret = -1;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\tbreak;\n+\tcase ROME_VER_UNKNOWN:\n+\tdefault:\n+\t\tfprintf(stderr, \"%s: Detected unknown ROME version\\n\", __FUNCTION__);\n+\t\tret = -1;\n+\t\tbreak;\n+\t}\n+\n+error:\n+\treturn ret;\n+}\ndiff --git a/tools/hciattach_rome.h b/tools/hciattach_rome.h\nnew file mode 100644\nindex 000000000..597743e0b\n--- /dev/null\n+++ b/tools/hciattach_rome.h\n@@ -0,0 +1,388 @@\n+/*\n+ * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.\n+ * Not a Contribution.\n+ * Copyright 2012 The Android Open Source Project\n+ *\n+ *  Licensed under the Apache License, Version 2.0 (the \"License\");\n+ *  you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *  http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ *  Unless required by applicable law or agreed to in writing, software\n+ *  distributed under the License is distributed on an \"AS IS\" BASIS,\n+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ *  See the License for the specific language governing permissions and\n+ *  limitations under the License.\n+ */\n+#ifndef HW_ROME_H\n+#define HW_ROME_H\n+\n+/******************************************************************************\n+**  Constants & Macros\n+******************************************************************************/\n+#define HCI_MAX_CMD_SIZE       260\n+#define HCI_MAX_EVENT_SIZE     260\n+#define PRINT_BUF_SIZE         ((HCI_MAX_CMD_SIZE * 3) + 2)\n+/* HCI Command/Event Opcode */\n+#define HCI_RESET              0x0C03\n+#define EVT_CMD_COMPLETE       0x0E\n+/* HCI Packet types */\n+#define HCI_COMMAND_PKT        0x01\n+#define HCI_ACLDATA_PKT        0x02\n+#define HCI_SCODATA_PKT        0x03\n+#define HCI_EVENT_PKT          0x04\n+#define HCI_VENDOR_PKT         0xff\n+#define cmd_opcode_pack(ogf, ocf) (unsigned short)((ocf & 0x03ff)|(ogf << 10))\n+\n+#define NVITEM                 0\n+#define RDWR_PROT              1\n+#define NVITEM_SIZE            2\n+#define PERSIST_HEADER_LEN     3\n+#define BD_ADDR_LEN            6\n+#define MSM_DISABLE_FLOW_CTRL  0\n+#define MSM_ENABLE_FLOW_CTRL   1\n+\n+#ifdef _PLATFORM_MDM_\n+#define USERIAL_OP_CLK_ON      0x5441\n+#define USERIAL_OP_CLK_OFF     0x5442\n+#endif\n+\n+#define PR_INFO(fmt, arg...) printf(fmt, ## arg)\n+#ifdef DEBUG\n+    #define PR_DBG(fmt, arg...) printf(fmt, ## arg)\n+#else\n+    #define PR_DBG(fmt, arg...)\n+#endif\n+\n+unsigned char vnd_local_bd_addr[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};\n+typedef enum {\n+    USERIAL_OP_FLOW_ON,\n+    USERIAL_OP_FLOW_OFF,\n+    USERIAL_OP_NOP,\n+} userial_vendor_ioctl_op_t;\n+\n+\n+/* vendor serial control block */\n+typedef struct\n+{\n+    int fd;                     /* fd to Bluetooth device */\n+    struct termios termios;     /* serial terminal of BT port */\n+    char port_name[256];\n+} vnd_userial_cb_t;\n+\n+/**** baud rates ****/\n+#define USERIAL_BAUD_300        0\n+#define USERIAL_BAUD_600        1\n+#define USERIAL_BAUD_1200       2\n+#define USERIAL_BAUD_2400       3\n+#define USERIAL_BAUD_9600       4\n+#define USERIAL_BAUD_19200      5\n+#define USERIAL_BAUD_57600      6\n+#define USERIAL_BAUD_115200     7\n+#define USERIAL_BAUD_230400     8\n+#define USERIAL_BAUD_460800     9\n+#define USERIAL_BAUD_921600     10\n+#define USERIAL_BAUD_1M         11\n+#define USERIAL_BAUD_1_5M       12\n+#define USERIAL_BAUD_2M         13\n+#define USERIAL_BAUD_3M         14\n+#define USERIAL_BAUD_4M         15\n+#define USERIAL_BAUD_AUTO       16\n+\n+#ifndef FALSE\n+#define FALSE  0\n+#endif\n+\n+#ifndef TRUE\n+#define TRUE   (!FALSE)\n+#endif\n+\n+#define HCI_CHG_BAUD_CMD_OCF        0x0C\n+#define HCI_VENDOR_CMD_OGF          0x3F\n+#define WRITE_BDADDR_CMD_LEN        14\n+#define WRITE_BAUD_CMD_LEN          6\n+#define MAX_CMD_LEN                 WRITE_BDADDR_CMD_LEN\n+#define GET_VERSION_OCF             0x1E\n+\n+#define PS_HDR_LEN                  4\n+#define HCI_VENDOR_CMD_OGF          0x3F\n+#define HCI_PS_CMD_OCF              0x0B\n+\n+#define HCI_COMMAND_HDR_SIZE        3\n+#define EVT_CMD_COMPLETE_SIZE       3\n+#define EVT_CMD_STATUS              0x0F\n+#define EVT_CMD_STATUS_SIZE         4\n+#define HCI_EVENT_HDR_SIZE          2\n+#define HCI_EV_SUCCESS              0x00\n+/* HCI Socket options */\n+#define HCI_DATA_DIR                1\n+#define HCI_FILTER                  2\n+#define HCI_TIME_STAMP              3\n+\n+#define P_ID_OFFSET                 (0)\n+#define HCI_CMD_IND                 (1)\n+#define EVENTCODE_OFFSET            (1)\n+#define EVT_PLEN                    (2)\n+#define PLEN                        (3)\n+#define CMD_RSP_OFFSET              (3)\n+#define RSP_TYPE_OFFSET             (4)\n+#define BAUDRATE_RSP_STATUS_OFFSET  (4)\n+#define CMD_STATUS_OFFSET           (5)\n+#define P_ROME_VER_OFFSET           (4)\n+#define P_BUILD_VER_OFFSET          (6)\n+#define P_BASE_ADDR_OFFSET          (8)\n+#define P_ENTRY_ADDR_OFFSET         (12)\n+#define P_LEN_OFFSET                (16)\n+#define P_CRC_OFFSET                (20)\n+#define P_CONTROL_OFFSET            (24)\n+#define PATCH_HDR_LEN               (28)\n+#define MAX_DATA_PER_SEGMENT        (239)\n+#define VSEVENT_CODE                (0xFF)\n+#define HC_VS_MAX_CMD_EVENT         (0xFF)\n+#define PATCH_PROD_ID_OFFSET        (5)\n+#define PATCH_PATCH_VER_OFFSET      (9)\n+#define PATCH_ROM_BUILD_VER_OFFSET  (11)\n+#define PATCH_SOC_VER_OFFSET        (13)\n+#define MAX_SIZE_PER_TLV_SEGMENT    (243)\n+\n+/* VS Opcode */\n+#define HCI_PATCH_CMD_OCF           (0)\n+#define EDL_SET_BAUDRATE_CMD_OCF    (0x48)\n+\n+/* VS Commands */\n+#define VSC_SET_BAUDRATE_REQ_LEN    (1)\n+#define EDL_PATCH_CMD_LEN           (1)\n+#define EDL_PATCH_CMD_REQ_LEN       (1)\n+#define EDL_PATCH_DLD_REQ_CMD       (0x01)\n+#define EDL_PATCH_RST_REQ_CMD       (0x05)\n+#define EDL_PATCH_SET_REQ_CMD       (0x16)\n+#define EDL_PATCH_ATCH_REQ_CMD      (0x17)\n+#define EDL_PATCH_VER_REQ_CMD       (0x19)\n+#define EDL_PATCH_TLV_REQ_CMD       (0x1E)\n+#define VSC_DISABLE_IBS_LEN         (0x04)\n+\n+/* VS Event */\n+#define EDL_CMD_REQ_RES_EVT         (0x00)\n+#define EDL_CMD_EXE_STATUS_EVT      (0x00)\n+#define EDL_SET_BAUDRATE_RSP_EVT    (0x92)\n+#define EDL_PATCH_VER_RES_EVT       (0x19)\n+#define EDL_TVL_DNLD_RES_EVT        (0x04)\n+#define EDL_APP_VER_RES_EVT         (0x02)\n+\n+/* Status Codes of HCI CMD execution*/\n+#define HCI_CMD_SUCCESS             (0x0)\n+#define PATCH_LEN_ERROR             (0x1)\n+#define PATCH_VER_ERROR             (0x2)\n+#define PATCH_CRC_ERROR             (0x3)\n+#define PATCH_NOT_FOUND             (0x4)\n+#define TLV_TYPE_ERROR              (0x10)\n+#define NVM_ACCESS_CODE             (0x0B)\n+#define BAUDRATE_CHANGE_SUCCESS     (1)\n+\n+/* TLV_TYPE */\n+#define TLV_TYPE_PATCH              (1)\n+#define TLV_TYPE_NVM                (2)\n+\n+/* NVM */\n+#define MAX_TAG_CMD                 30\n+#define TAG_END                     0xFF\n+#define NVM_ACCESS_SET              0x01\n+#define TAG_NUM_OFFSET              5\n+#define TAG_NUM_2                   2\n+#define TAG_NUM_17                  (17)\n+#define TAG_NUM_27                  27\n+#define TAG_NUM_44                  44\n+#define TAG_BDADDR_OFFSET           7\n+\n+/* FW PCM Configuration */\n+#define FWCONF_PCM_MS_OFFSET_1      9\n+#define FWCONF_PCM_MS_OFFSET_2      33\n+#define FWCONF_PCM_SLAVE            1\n+#define FWCONF_PCM_MASTER           0\n+#define FWCONF_PCM_ROLE_BIT_OFFSET  4\n+\n+/* FW HCI Transport Layer Configuration */\n+#define FWCONF_IBS_DISABLE          (0)\n+#define FWCONF_IBS_ENABLE           (1)\n+#define FWCONF_IBS_VAL_BIT          (7)\n+#define FWCONF_IBS_VAL_OFFSET       (0)\n+#define FWCONF_BAUD_VAL_OFFSET      (2)\n+\n+/* FW DEEP SLEEP Configuration */\n+#define FWCONF_DEEP_SLEEP_DISABLE       0\n+#define FWCONF_DEEP_SLEEP_ENABLE        1\n+#define FWCONF_DEEP_SLEEP_BYTE_OFFSET   0\n+#define FWCONF_DEEP_SLEEP_BIT_OFFSET    0\n+\n+#define MAX_RETRY_CNT  1\n+#define SELECT_TIMEOUT 3\n+\n+/* NVM Tags specifically used for ROME 1.0 */\n+#define ROME_1_0_100022_1       0x101000221\n+#define ROME_1_0_100019         0x101000190\n+#define ROME_1_0_6002           0x100600200\n+\n+/* Default NVM Version setting for ROME 1.0 */\n+#define NVM_VERSION                  ROME_1_0_100022_1\n+\n+\n+#define LSH(val, n)     ((unsigned int)(val) << (n))\n+#define EXTRACT_BYTE(val, pos)      (char) (((val) >> (8 * (pos))) & 0xFF)\n+#define CALC_SEG_SIZE(len, max)   ((plen) % (max))?((plen/max)+1) : ((plen) / (max))\n+\n+#define ROME_FW_PATH                    \"/lib/firmware/rampatch.img\"\n+#define ROME_RAMPATCH_TLV_PATH          \"/lib/firmware/rampatch_tlv.img\"\n+#define ROME_NVM_TLV_PATH               \"/lib/firmware/nvm_tlv.bin\"\n+#define ROME_RAMPATCH_TLV_1_0_3_PATH    \"/lib/firmware/rampatch_tlv_1.3.tlv\"\n+#define ROME_NVM_TLV_1_0_3_PATH         \"/lib/firmware/nvm_tlv_1.3.bin\"\n+#define ROME_RAMPATCH_TLV_2_0_1_PATH    \"/lib/firmware/rampatch_tlv_2.1.tlv\"\n+#define ROME_NVM_TLV_2_0_1_PATH         \"/lib/firmware/nvm_tlv_2.1.bin\"\n+#define ROME_RAMPATCH_TLV_3_0_0_PATH    \"/lib/firmware/rampatch_tlv_3.0.tlv\"\n+#define ROME_NVM_TLV_3_0_0_PATH         \"/lib/firmware/nvm_tlv_3.0.bin\"\n+#define ROME_RAMPATCH_TLV_3_0_2_PATH    \"/lib/firmware/btfw32.tlv\"\n+#define ROME_NVM_TLV_3_0_2_PATH         \"/lib/firmware/btnv32.bin\"\n+#ifdef _PLATFORM_MDM_\n+#define TF_RAMPATCH_TLV_1_0_0_PATH      \"/lib/firmware/rampatch_tlv_tf_1.0.tlv\"\n+#define TF_NVM_TLV_1_0_0_PATH           \"/lib/firmware/nvm_tlv_tf_1.0.bin\"\n+#define TF_RAMPATCH_TLV_1_0_1_PATH      \"/lib/firmware/tfbtfw11.tlv\"\n+#define TF_NVM_TLV_1_0_1_PATH           \"/lib/firmware/tfbtnv11.bin\"\n+#else\n+#define TF_RAMPATCH_TLV_1_0_0_PATH      \"/lib/firmware/qca/rampatch_tlv_tf_1.0.tlv\"\n+#define TF_NVM_TLV_1_0_0_PATH           \"/lib/firmware/qca/nvm_tlv_tf_1.0.bin\"\n+#define TF_RAMPATCH_TLV_1_0_1_PATH      \"/lib/firmware/qca/tfbtfw11.tlv\"\n+#define TF_NVM_TLV_1_0_1_PATH           \"/lib/firmware/qca/tfbtnv11.bin\"\n+#endif\n+\n+/* This header value in rampatch file decides event handling mechanism in the HOST */\n+#define ROME_SKIP_EVT_NONE     0x00\n+#define ROME_SKIP_EVT_VSE      0x01\n+#define ROME_SKIP_EVT_CC       0x02\n+#define ROME_SKIP_EVT_VSE_CC   0x03\n+\n+#define FW_CONFIG_FILE_PATH        \"/etc/bluetooth/firmware.conf\"\n+/******************************************************************************\n+**  Local type definitions\n+******************************************************************************/\n+\n+typedef struct {\n+    unsigned char     ncmd;\n+    unsigned short    opcode;\n+} __attribute__ ((packed)) evt_cmd_complete;\n+\n+typedef struct {\n+    unsigned char     status;\n+    unsigned char     ncmd;\n+    unsigned short    opcode;\n+} __attribute__ ((packed)) evt_cmd_status;\n+\n+typedef struct {\n+    unsigned short    opcode;\n+    unsigned char     plen;\n+} __attribute__ ((packed))  hci_command_hdr;\n+\n+typedef struct {\n+    unsigned char     evt;\n+    unsigned char     plen;\n+} __attribute__ ((packed))  hci_event_hdr;\n+typedef struct {\n+    unsigned short rom_version;\n+    unsigned short build_version;\n+} __attribute__ ((packed)) patch_version;\n+\n+typedef struct {\n+    unsigned int patch_id;\n+    patch_version patch_ver;\n+    unsigned int patch_base_addr;\n+    unsigned int patch_entry_addr;\n+    unsigned short patch_length;\n+    int patch_crc;\n+    unsigned short patch_ctrl;\n+} __attribute__ ((packed)) patch_info;\n+\n+typedef struct {\n+    unsigned int  tlv_data_len;\n+    unsigned int  tlv_patch_data_len;\n+    unsigned char sign_ver;\n+    unsigned char sign_algorithm;\n+    unsigned char dwnd_cfg;\n+    unsigned char reserved1;\n+    unsigned short prod_id;\n+    unsigned short build_ver;\n+    unsigned short patch_ver;\n+    unsigned short reserved2;\n+    unsigned int patch_entry_addr;\n+} __attribute__ ((packed)) tlv_patch_hdr;\n+\n+typedef struct {\n+    unsigned short tag_id;\n+    unsigned short tag_len;\n+    unsigned int tag_ptr;\n+    unsigned int tag_ex_flag;\n+} __attribute__ ((packed)) tlv_nvm_hdr;\n+\n+typedef struct {\n+    unsigned char tlv_type;\n+    unsigned char tlv_length1;\n+    unsigned char tlv_length2;\n+    unsigned char tlv_length3;\n+\n+    union{\n+        tlv_patch_hdr patch;\n+        tlv_nvm_hdr nvm;\n+    }tlv;\n+} __attribute__ ((packed)) tlv_patch_info;\n+\n+enum{\n+    BAUDRATE_115200    = 0x00,\n+    BAUDRATE_57600     = 0x01,\n+    BAUDRATE_38400     = 0x02,\n+    BAUDRATE_19200     = 0x03,\n+    BAUDRATE_9600      = 0x04,\n+    BAUDRATE_230400    = 0x05,\n+    BAUDRATE_250000    = 0x06,\n+    BAUDRATE_460800    = 0x07,\n+    BAUDRATE_500000    = 0x08,\n+    BAUDRATE_720000    = 0x09,\n+    BAUDRATE_921600    = 0x0A,\n+    BAUDRATE_1000000   = 0x0B,\n+    BAUDRATE_1250000   = 0x0C,\n+    BAUDRATE_2000000   = 0x0D,\n+    BAUDRATE_3000000   = 0x0E,\n+    BAUDRATE_4000000   = 0x0F,\n+    BAUDRATE_1600000   = 0x10,\n+    BAUDRATE_3200000   = 0x11,\n+    BAUDRATE_3500000   = 0x12,\n+    BAUDRATE_AUTO      = 0xFE,\n+    BAUDRATE_Reserved  = 0xFF\n+};\n+\n+enum{\n+    ROME_PATCH_VER_0100 = 0x0100,\n+    ROME_PATCH_VER_0101 = 0x0101,\n+    ROME_PATCH_VER_0200 = 0x0200,\n+    ROME_PATCH_VER_0300 = 0x0300,\n+    ROME_PATCH_VER_0302 = 0x0302\n+ };\n+\n+enum{\n+    ROME_SOC_ID_00 = 0x00000000,\n+    ROME_SOC_ID_11 = 0x00000011,\n+    ROME_SOC_ID_13 = 0x00000013,\n+    ROME_SOC_ID_22 = 0x00000022,\n+    ROME_SOC_ID_23 = 0x00000023,\n+    ROME_SOC_ID_44 = 0x00000044\n+};\n+\n+enum{\n+    ROME_VER_UNKNOWN = 0,\n+    ROME_VER_1_0 = ((ROME_PATCH_VER_0100 << 16 ) | ROME_SOC_ID_00 ),\n+    ROME_VER_1_1 = ((ROME_PATCH_VER_0101 << 16 ) | ROME_SOC_ID_00 ),\n+    ROME_VER_1_3 = ((ROME_PATCH_VER_0200 << 16 ) | ROME_SOC_ID_00 ),\n+    ROME_VER_2_1 = ((ROME_PATCH_VER_0200 << 16 ) | ROME_SOC_ID_11 ),\n+    ROME_VER_3_0 = ((ROME_PATCH_VER_0300 << 16 ) | ROME_SOC_ID_22 ),\n+    ROME_VER_3_2 = ((ROME_PATCH_VER_0302 << 16 ) | ROME_SOC_ID_44 ),\n+    TUFELLO_VER_1_0 = ((ROME_PATCH_VER_0300 << 16 ) | ROME_SOC_ID_13 ),\n+    TUFELLO_VER_1_1 = ((ROME_PATCH_VER_0302 << 16 ) | ROME_SOC_ID_23 )\n+};\n+#endif /* HW_ROME_H */\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/system.d/bluetooth-defaults.service",
    "content": "[Unit]\nDescription=Bluetooth defaults\nAfter=local-fs.target\n\nConditionPathExists=!/storage/.cache/services/bluez.conf\nConditionPathExists=!/storage/.cache/services/bluez.disabled\n\n[Service]\nType=oneshot\nExecStart=/bin/sh -c 'cp /usr/share/services/bluez.conf /storage/.cache/services/'\nRemainAfterExit=yes\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/system.d/bluetooth.service",
    "content": "[Unit]\nDescription=Bluetooth service\nAfter=syslog.target bluetooth-defaults.service\nRequires=bluetooth-defaults.service\n\nConditionPathExists=/storage/.cache/services/bluez.conf\n\n[Service]\nType=dbus\nBusName=org.bluez\nNotifyAccess=main\nEnvironmentFile=/storage/.cache/services/bluez.conf\nEnvironmentFile=-/run/libreelec/debug/bluez.conf\nExecStart=/usr/lib/bluetooth/bluetoothd $BLUEZ_ARGS $BLUEZ_DEBUG\nCapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW\nLimitNPROC=1\nTimeoutStopSec=1s\nRestart=on-failure\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=bluetooth.target\nAlias=dbus-org.bluez.service\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/system.d/obex.service",
    "content": "[Unit]\nDescription=Bluetooth service\nRequires=bluetooth.target bluetooth.service\nAfter=bluetooth.service\n\nConditionPathExists=/storage/.cache/services/obexd.conf\nConditionPathExists=/storage/.cache/services/bluez.conf\n\n[Service]\nEnvironmentFile=/storage/.cache/services/obexd.conf\nEnvironmentFile=-/run/libreelec/debug/obexd.conf\nExecStartPre=/bin/sh -c 'mkdir -p $OBEXD_ROOT'\nExecStart=/usr/lib/bluetooth/obexd -r $OBEXD_ROOT $OBEXD_DEBUG\nTimeoutStopSec=1s\n\n[Install]\nWantedBy=bluetooth.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/bluez/tmpfiles.d/z_05_bluez.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nd    /storage/.cache/bluetooth  0755 root root - -\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/device-trees-amlogic/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"device-trees-amlogic\"\nPKG_VERSION=\"cdfe64399f04ef958b4bd8ac629026007c9dd900\"\nPKG_SHA256=\"f7e01f869d99db1d5d3f6f2002fed77969c5d78abb8cc34b4a4539da801c069c\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/device-trees-amlogic\"\nPKG_URL=\"https://github.com/CoreELEC/device-trees-amlogic/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_DEPENDS_UNPACK=\"linux\"\nPKG_LONGDESC=\"Device trees for Amlogic devices.\"\n# some unpack recursive loop happen with yes maybe because already unpacked from linux\n# don't set no either \n#PKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  # Enter kernel directory\n  pushd $BUILD/build/linux-$(kernel_version) > /dev/null\n\n  # Device trees already present in kernel tree we want to include\n  EXTRA_TREES=( \\\n                gxbb_p200 gxbb_p200_2G gxbb_p201 gxbb_p200_1G_wetek_hub gxbb_p200_2G_wetek_play_2 \\\n                gxl_p212_1g gxl_p212_2g gxl_p230_2g gxl_p281_1g gxm_q200_2g gxm_q201_1g gxm_q201_2g \\\n\t      )\n\n  # Add trees to the list\n  for f in ${EXTRA_TREES[@]}; do\n    DTB_LIST=\"$DTB_LIST $f.dtb\"\n  done\n\n  # Copy all device trees to kernel source folder and create a list\n  cp -f $PKG_BUILD/*.dts* arch/$TARGET_KERNEL_ARCH/boot/dts/amlogic/\n  for f in $PKG_BUILD/*.dts; do\n    DTB_NAME=\"$(basename $f .dts).dtb\"\n    DTB_LIST=\"$DTB_LIST $DTB_NAME\"\n  done\n\n  # Compile device trees\n  kernel_make $DTB_LIST\n  cp arch/$TARGET_KERNEL_ARCH/boot/dts/amlogic/*.dtb $PKG_BUILD\n\n  popd > /dev/null\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/share/bootloader/device_trees\n  cp -a $PKG_BUILD/*.dtb $INSTALL/usr/share/bootloader/device_trees\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/iptables/config/README",
    "content": "To create your own set of Netfilters you can save your rules in:\n\n/storage/.config/iptables/rules.v4 for ipv4\n/storage/.config/iptables/rules.v6 for ipv6\n\nTo modify tables, edit with nano then save with:\n\niptables-save >/storage/.config/iptables/rules.v4\nip6tables-save >/storage/.config/iptables/rules.v6\n\nTo disable iptables use the following command:\n\nsystemctl mask iptables\n\nTo enable iptables again:\n\nsystemctl unmask iptables\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/iptables/config/home.v4",
    "content": "*filter\n:INPUT DROP [0:0]\n:FORWARD DROP [0:0]\n:OUTPUT ACCEPT [0:0]\n:DOCKER-USER - [0:0]\n:private-subnets - [0:0]\n-A INPUT -i lo -j ACCEPT\n-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A INPUT -i tether -p udp -m conntrack --ctstate NEW -j ACCEPT\n-A INPUT -j private-subnets\n-A FORWARD -i tether -m conntrack --ctstate NEW,RELATED,ESTABLISHED -j ACCEPT\n-A FORWARD -o tether -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A DOCKER-USER -j private-subnets\n-A private-subnets -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A private-subnets -s 10.0.0.0/8 -i eth+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 172.16.0.0/12 -i eth+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 192.168.0.0/16 -i eth+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 10.0.0.0/8 -i en+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 172.16.0.0/12 -i en+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 192.168.0.0/16 -i en+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 10.0.0.0/8 -i wl+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 172.16.0.0/12 -i wl+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 192.168.0.0/16 -i wl+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 10.0.0.0/8 -i tether -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 172.16.0.0/12 -i tether -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 192.168.0.0/16 -i tether -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 10.0.0.0/8 -i docker+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 172.16.0.0/12 -i docker+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 192.168.0.0/16 -i docker+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -j REJECT --reject-with icmp-port-unreachable\nCOMMIT\n*nat\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n*mangle\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/iptables/config/home.v6",
    "content": "*filter\n:INPUT DROP [0:0]\n:FORWARD DROP [0:0]\n:OUTPUT ACCEPT [0:0]\n:DOCKER-USER - [0:0]\n:private-subnets - [0:0]\n-A INPUT -i lo -j ACCEPT\n-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A INPUT -i tether -p udp -m conntrack --ctstate NEW -j ACCEPT\n-A INPUT -j private-subnets\n-A FORWARD -i tether -m conntrack --ctstate NEW,RELATED,ESTABLISHED -j ACCEPT\n-A FORWARD -o tether -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A DOCKER-USER -j private-subnets\n-A private-subnets -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A private-subnets -s fc00::/7 -i eth+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s fc00::/7 -i en+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s fc00::/7 -i wl+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s fc00::/7 -i tether -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s fc00::/7 -i docker+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -j REJECT --reject-with icmp6-port-unreachable\nCOMMIT\n*nat\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n*mangle\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/iptables/config/public.v4",
    "content": "# Netfilter rules for public \"untrusted\" networks\n*filter\n:INPUT DROP [0:0]\n:FORWARD DROP [0:0]\n:OUTPUT ACCEPT [0:0]\n:DOCKER-USER - [0:0]\n-A INPUT -i lo -j ACCEPT\n-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n# Allow tethered Wifi AP\n-A INPUT -i tether -p udp -m conntrack --ctstate NEW -j ACCEPT\n-A INPUT -i tether -s 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 -m conntrack --ctstate NEW -j ACCEPT\n-A FORWARD -i tether -s 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 -m conntrack --ctstate NEW -j ACCEPT\n-A FORWARD -i tether -s 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\n-A FORWARD -o tether -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\n# Block DOCKER\n-A DOCKER-USER -m conntrack --ctstate RELATED,ESTABLISHED -j RETURN\n-A DOCKER-USER -j REJECT --reject-with icmp-port-unreachable\nCOMMIT\n*nat\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n*mangle\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/iptables/config/public.v6",
    "content": "# Netfilter Rules for trusted home networks.\n*filter\n:INPUT DROP [0:0]\n:FORWARD DROP [0:0]\n:OUTPUT ACCEPT [0:0]\n:DOCKER-USER - [0:0]\n-A INPUT -i lo -j ACCEPT\n-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n# Allow tethered Wifi AP\n-A INPUT -i tether -p udp -m conntrack --ctstate NEW -j ACCEPT\n-A INPUT -i tether -s fc00::/7 -m conntrack --ctstate NEW -j ACCEPT\n-A FORWARD -i tether -s fc00::/7 -m conntrack --ctstate NEW -j ACCEPT\n-A FORWARD -i tether -s fc00::/7 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\n-A FORWARD -o tether -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\n-A DOCKER-USER -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A DOCKER-USER -j REJECT --reject-with icmp6-port-unreachable\nCOMMIT\n*nat\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n*mangle\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/iptables/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"iptables\"\nPKG_VERSION=\"1.8.7\"\nPKG_SHA256=\"c109c96bb04998cd44156622d36f8e04b140701ec60531a10668cfdff5e8d8f0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.netfilter.org/\"\nPKG_URL=\"https://www.netfilter.org/projects/iptables/files/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain linux:host libmnl libnftnl\"\nPKG_LONGDESC=\"IP packet filter administration.\"\nPKG_TOOLCHAIN=\"autotools\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/config/iptables/\n    cp -PR ${PKG_DIR}/config/README ${INSTALL}/usr/config/iptables/\n\n  mkdir -p ${INSTALL}/etc/iptables/\n    cp -PR ${PKG_DIR}/config/* ${INSTALL}/etc/iptables/\n\n  mkdir -p ${INSTALL}/usr/lib/libreelec\n    cp ${PKG_DIR}/scripts/iptables_helper ${INSTALL}/usr/lib/libreelec\n}\n\npost_install() {\n  enable_service iptables.service\n}\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/iptables/scripts/iptables_helper",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nIPTABLES4=\"/usr/sbin/iptables\"\nIPTABLES6=\"/usr/sbin/ip6tables\"\nIPTABLES_CMDS=\"$IPTABLES4 $IPTABLES6\"\nPUBLIC_RULES=\"/etc/iptables/public.v\"\nHOME_RULES=\"/etc/iptables/home.v\"\nCUSTOM_RULES=\"/storage/.config/iptables/rules.v\"\nDOCKER=\"service.system.docker.service\"\nSYSTEMCTL=\"/usr/bin/systemctl\"\nCONNMANCTL=\"/usr/bin/connmanctl\"\n\ncheck_docker() {\n  $SYSTEMCTL is-active --quiet $DOCKER && $SYSTEMCTL restart $DOCKER\n}\n\nget_technology_config() {\n  $CONNMANCTL technologies | awk -v pattern=\"^/.*/technology/$1$\" -e 'BEGIN {S=0}; /^\\/.*/ {S=0}; $0 ~ pattern {S=1}; S==1 {print $0}'\n}\n\ncheck_tether() {\n  for technology in wifi ethernet; do\n    if get_technology_config $technology | grep -q 'Tethering = True'; then\n      $CONNMANCTL tether $technology off\n      sleep 1\n      $CONNMANCTL tether $technology on\n      break\n    fi\n  done\n}\n\nflush() {\n  for cmd in $IPTABLES_CMDS; do\n    $cmd -F\n    $cmd -X\n    $cmd -t nat -F\n    $cmd -t nat -X\n    $cmd -t mangle -F\n    $cmd -t mangle -X\n    $cmd -P INPUT ACCEPT\n    $cmd -P FORWARD ACCEPT\n    $cmd -P OUTPUT ACCEPT\n  done\n  check_docker\n  check_tether\n}\n\nenable() {\n  for cmd in $IPTABLES_CMDS; do\n    case \"$cmd\" in\n      *6*) \n         rules=\"$RULES6\"\n\t ipv=\"6\"\n\t ;;\n        *) \n         rules=\"$RULES4\"\n\t ipv=\"4\"\n\t ;;\n    esac\n    if [ -e \"$rules\" ]; then\n      \"$cmd-restore\" \"$rules\" \n    fi\n  done\n  check_docker\n  check_tether\n}\n\nif [ \"$1\" = \"enable\" ]; then\n  case \"${RULES}\" in\n    \"none\") \n       flush\n       ;;\n    \"public\") \n       RULES4=\"${PUBLIC_RULES}4\"\n       RULES6=\"${PUBLIC_RULES}6\"\n       ;;\n    \"home\") \n       RULES4=\"${HOME_RULES}4\"\n       RULES6=\"${HOME_RULES}6\"\n       ;;\n    \"custom\") \n       RULES4=\"${CUSTOM_RULES}4\"\n       RULES6=\"${CUSTOM_RULES}6\"\n       ;;\n    *) \n       exit 1\n       ;;\n  esac\n  enable\nelif [ \"$1\" = \"disable\" ]; then\n  flush\nelse\n  exit 1\nfi\n\nexit 0\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/iptables/system.d/iptables.service",
    "content": "[Unit]\nDescription=IPTABLES Packet Filtering\nConditionPathExists=/usr/lib/libreelec/iptables_helper\nConditionPathExists=|/storage/.cache/services/iptables.conf\nBefore=network.target\nWants=network.target\n\n[Service]\nType=oneshot\nEnvironmentFile=-/storage/.cache/services/iptables.conf\nExecStart=/usr/lib/libreelec/iptables_helper enable\nExecReload=/usr/lib/libreelec/iptables_helper enable\nExecStop=/usr/lib/libreelec/iptables_helper disable\nRemainAfterExit=yes\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/kvimfan-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"kvimfan-aml\"\nPKG_VERSION=\"1.0\"\nPKG_SHA256=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Khadas VIM2 fan control service\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  kernel_make -C \"$(kernel_path)\" M=\"$PKG_BUILD\"\n\n}\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n\n}\npost_install() {\n  enable_service kvimfan.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/kvimfan-aml/sources/Makefile",
    "content": "obj-m := khadas-fan.o\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/kvimfan-aml/sources/khadas-fan.c",
    "content": "/*\n * gpio-fan.c - driver for fans controlled by GPIO.\n */\n#include <linux/module.h>\n#include <linux/init.h>\n#include <linux/platform_device.h>\n#include <linux/err.h>\n#include <linux/gpio.h>\n#include <linux/of_platform.h>\n#include <linux/of_gpio.h>\n#include <linux/time.h>\n#include <linux/workqueue.h>\n\n#define KHADAS_FAN_TRIG_TEMP_LEVEL0\t50\t// 50 degree if not set\n#define KHADAS_FAN_TRIG_TEMP_LEVEL1\t60\t// 60 degree if not set\n#define KHADAS_FAN_TRIG_TEMP_LEVEL2\t70\t// 70 degree if not set\n#define KHADAS_FAN_TRIG_MAXTEMP\t\t80\n#define KHADAS_FAN_LOOP_SECS   \t\t30 * HZ // 30 seconds\n#define KHADAS_FAN_LOOP_PULSE \t\t2\t// 20 msec\n#define KHADAS_FAN_TEST_LOOP_SECS   \t5 * HZ  // 5 seconds\n#define KHADAS_FAN_LOOP_NODELAY_SECS   \t0\n#define KHADAS_FAN_GPIO_OFF\t\t0\n#define KHADAS_FAN_GPIO_ON\t\t1\n\nenum khadas_fan_mode {\n\tKHADAS_FAN_STATE_MANUAL = 0,\n\tKHADAS_FAN_STATE_AUTO,\n};\n\nenum khadas_fan_level {\n\tKHADAS_FAN_LEVEL_0 = 0,\n\tKHADAS_FAN_LEVEL_1,\n\tKHADAS_FAN_LEVEL_2,\n\tKHADAS_FAN_LEVEL_3,\n};\n\nenum khadas_fan_enable {\n\tKHADAS_FAN_DISABLE = 0,\n\tKHADAS_FAN_ENABLE,\n};\n\nstruct khadas_fan_data {\n\tstruct platform_device *pdev;\n\tstruct class *class;\n\tstruct delayed_work work;\n\tstruct delayed_work fan_test_work;\n\tenum    khadas_fan_enable enable;\n\tenum \tkhadas_fan_mode mode;\n\tenum \tkhadas_fan_level level;\n\tint\tctrl_gpio0;\n\tint\tctrl_gpio1;\n\tint\ttrig_temp_level0;\n\tint\ttrig_temp_level1;\n\tint\ttrig_temp_level2;\n        int     last_level;\n        int     temp;  \n};\n\nstruct khadas_fan_data *fan_data = NULL;\n\nvoid khadas_fan_level_set(struct khadas_fan_data *fan_data, int level )\n{\n\tif(3 == fan_data->last_level){\n\t\tgpio_set_value(fan_data->ctrl_gpio0, KHADAS_FAN_GPIO_ON);\n\t\tgpio_set_value(fan_data->ctrl_gpio1, KHADAS_FAN_GPIO_OFF);\n\t}else if(2 == fan_data->last_level){\n\t\tgpio_set_value(fan_data->ctrl_gpio0, KHADAS_FAN_GPIO_OFF);\n\t\tgpio_set_value(fan_data->ctrl_gpio1, KHADAS_FAN_GPIO_ON);\n\t}else if(1 == fan_data->last_level){\n\t\tgpio_set_value(fan_data->ctrl_gpio0, KHADAS_FAN_GPIO_ON);\n\t\tgpio_set_value(fan_data->ctrl_gpio1, KHADAS_FAN_GPIO_ON);\n\t}else{\n\t\tgpio_set_value(fan_data->ctrl_gpio0, KHADAS_FAN_GPIO_OFF);\n\t\tgpio_set_value(fan_data->ctrl_gpio1, KHADAS_FAN_GPIO_OFF);\n\t}\n\tif (fan_data->last_level > 3 && level > 3)\n\t\tfan_data->last_level--;\n        else\n\t\tfan_data->last_level = level;\n}\n\nextern int get_cpu_temp(void);\nstatic void fan_work_func(struct work_struct *_work)\n{\n\tstruct khadas_fan_data *fan_data = container_of(_work,\n\t\t   struct khadas_fan_data, work.work);\n\n\tint temp, level =1;\n\n\ttemp =  get_cpu_temp();\n\n\tif(temp < 0){\n\t\tschedule_delayed_work(&fan_data->work, KHADAS_FAN_LOOP_PULSE);\n\t\treturn;\n\t}\n\n\tfan_data->temp = fan_data->temp ? (fan_data->temp + temp) / 2 : temp;\n\tif (fan_data->temp < fan_data->trig_temp_level0)\n\t\tlevel = 0;\n\telse if (fan_data->temp < fan_data->trig_temp_level0 + 2)\n\t\tlevel = 6;\n\telse if (fan_data->temp < fan_data->trig_temp_level0 + 4)\n\t\tlevel = 5;\n\telse if (fan_data->temp < fan_data->trig_temp_level0 + 6)\n\t\tlevel = 4;\n\telse if (fan_data->temp < fan_data->trig_temp_level1)\n\t\tlevel = 3;\n\telse if (fan_data->temp < fan_data->trig_temp_level2)\n\t\tlevel = 2;\n\n\tkhadas_fan_level_set(fan_data, level);\n\n\tif (level > 3)\n\t\tschedule_delayed_work(&fan_data->work, KHADAS_FAN_LOOP_PULSE);\n\telse\n\t\tschedule_delayed_work(&fan_data->work, KHADAS_FAN_LOOP_SECS);\n}\n\nstatic void khadas_fan_set(struct khadas_fan_data  *fan_data)\n{\n\n\tcancel_delayed_work(&fan_data->work);\n\n\tif (fan_data->enable == KHADAS_FAN_DISABLE) {\n\t\tfan_data->last_level = 0;\n\t\tkhadas_fan_level_set(fan_data,0);\n\t\treturn;\n\t}\n\tswitch (fan_data->mode) {\n\tcase KHADAS_FAN_STATE_MANUAL:\n\t\tswitch(fan_data->level){\n\t\tcase KHADAS_FAN_LEVEL_1:\n\t\t\tfan_data->last_level = 3;\n\t\t\tkhadas_fan_level_set(fan_data,3);\n\t\t\tbreak;\n\t\tcase KHADAS_FAN_LEVEL_2:\n\t\t\tfan_data->last_level = 2;\n\t\t\tkhadas_fan_level_set(fan_data,2);\n\t\t\tbreak;\n\t\tcase KHADAS_FAN_LEVEL_3:\n\t\t\tfan_data->last_level = 1;\n\t\t\tkhadas_fan_level_set(fan_data,1);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tfan_data->last_level = 0;\n\t\t\tkhadas_fan_level_set(fan_data,0);\n\t\t\tbreak;\n\t\t}\n\t\tbreak;\n\n\tcase KHADAS_FAN_STATE_AUTO:\n\t\t// FIXME: achieve with a better way\n\t\tschedule_delayed_work(&fan_data->work, KHADAS_FAN_LOOP_PULSE);\n\t\tbreak;\n\n\tdefault:\n\t\tbreak;\n\t}\n}\n\nstatic ssize_t fan_enable_show(struct class *cls,\n\t\t\t struct class_attribute *attr, char *buf)\n{\n\treturn sprintf(buf, \"Fan enable: %d\\n\", fan_data->enable);\n}\n\nstatic ssize_t fan_enable_store(struct class *cls, struct class_attribute *attr,\n\t\t       const char *buf, size_t count)\n{\n\tint enable;\n\n\tif (kstrtoint(buf, 0, &enable))\n\t\treturn -EINVAL;\n\n\t// 0: manual, 1: auto\n\tif( enable >= 0 && enable < 2 ){\n\t\tfan_data->enable = enable;\n\t\tkhadas_fan_set(fan_data);\n\t}\n\n\treturn count;\n}\n\nstatic ssize_t fan_mode_show(struct class *cls,\n\t\t\t struct class_attribute *attr, char *buf)\n{\n\treturn sprintf(buf, \"Fan mode: %d\\n\", fan_data->mode);\n}\n\nstatic ssize_t fan_mode_store(struct class *cls, struct class_attribute *attr,\n\t\t       const char *buf, size_t count)\n{\n\tint mode;\n\n\tif (kstrtoint(buf, 0, &mode))\n\t\treturn -EINVAL;\n\n\t// 0: manual, 1: auto\n\tif( mode >= 0 && mode < 2 ){\n\t\tfan_data->mode = mode;\n\t\tkhadas_fan_set(fan_data);\n\t}\n\n\treturn count;\n}\n\nstatic ssize_t fan_level_show(struct class *cls,\n\t\t\t struct class_attribute *attr, char *buf)\n{\n\treturn sprintf(buf, \"Fan level: %d\\n\", fan_data->level);\n}\n\nstatic ssize_t fan_level_store(struct class *cls, struct class_attribute *attr,\n\t\t       const char *buf, size_t count)\n{\n\tint level;\n\n\tif (kstrtoint(buf, 0, &level))\n\t\treturn -EINVAL;\n\n\tif( level >= 0 && level < 4){\n\t\tfan_data->level = level;\n\t\tfan_data->last_level = level;\n\t\tkhadas_fan_set(fan_data);\n\t}\n\n\treturn count;\n}\n\n\nstatic ssize_t fan_temp_show(struct class *cls,\n\t\t\t struct class_attribute *attr, char *buf)\n{\n\tint temp = -EINVAL;\n\ttemp = get_cpu_temp();\n\n\treturn sprintf(buf, \"cpu_temp:%d \\nFan trigger temperature: pulse-level:%d level0:%d level1:%d level2:%d\\n\", \n\t\ttemp, fan_data->trig_temp_level0, fan_data->trig_temp_level0 + 6, fan_data->trig_temp_level1, fan_data->trig_temp_level2);\n}\n\nstatic struct class_attribute fan_class_attrs[] = {\n\t__ATTR(enable, 0644, fan_enable_show, fan_enable_store),\n\t__ATTR(mode, 0644, fan_mode_show, fan_mode_store),\n\t__ATTR(level, 0644, fan_level_show, fan_level_store),\n\t__ATTR(temp, 0444, fan_temp_show, NULL),\n};\n\nstatic int khadas_fan_probe(struct platform_device *pdev)\n{\n\tstruct device *dev = &pdev->dev;\n\tint ret;\n\tint i;\n\n\tprintk(\"khadas_fan_probe\\n\");\n\n\tfan_data = devm_kzalloc(dev, sizeof(struct khadas_fan_data), GFP_KERNEL);\n\tif (!fan_data)\n\t\treturn -ENOMEM;\n\n\tret = of_property_read_u32(dev->of_node, \"trig_temp_level0\", &fan_data->trig_temp_level0);\n\tif (ret < 0)\n\t\tfan_data->trig_temp_level0 = KHADAS_FAN_TRIG_TEMP_LEVEL0;\n\tret = of_property_read_u32(dev->of_node, \"trig_temp_level1\", &fan_data->trig_temp_level1);\n\tif (ret < 0)\n\t\tfan_data->trig_temp_level1 = KHADAS_FAN_TRIG_TEMP_LEVEL1;\n\tret = of_property_read_u32(dev->of_node, \"trig_temp_level2\", &fan_data->trig_temp_level2);\n\tif (ret < 0)\n\t\tfan_data->trig_temp_level2 = KHADAS_FAN_TRIG_TEMP_LEVEL2;\n\n\tfan_data->ctrl_gpio0 = of_get_named_gpio(dev->of_node, \"fan_ctl0\", 0);\n\tfan_data->ctrl_gpio1 = of_get_named_gpio(dev->of_node, \"fan_ctl1\", 0);\n\tif ((gpio_request(fan_data->ctrl_gpio0, \"FAN\") != 0)|| (gpio_request(fan_data->ctrl_gpio1, \"FAN\") != 0))\n\t\treturn -EIO;\n\n\tgpio_direction_output(fan_data->ctrl_gpio0, KHADAS_FAN_GPIO_OFF);\n\tgpio_direction_output(fan_data->ctrl_gpio1, KHADAS_FAN_GPIO_OFF);\n\tfan_data->mode = KHADAS_FAN_STATE_AUTO;\n\tfan_data->level = KHADAS_FAN_LEVEL_0;\n\tfan_data->enable = KHADAS_FAN_ENABLE;\n\tfan_data->last_level = 0;\n\tfan_data->temp = 0;\n\n\tINIT_DELAYED_WORK(&fan_data->work, fan_work_func);\n\tkhadas_fan_level_set(fan_data,0);\n\tschedule_delayed_work(&fan_data->work, KHADAS_FAN_TEST_LOOP_SECS);\n\n\tfan_data->pdev = pdev;\n\tplatform_set_drvdata(pdev, fan_data);\n\n\tfan_data->class = class_create(THIS_MODULE, \"fan\");\n\tif (IS_ERR(fan_data->class)) {\n\t\treturn PTR_ERR(fan_data->class);\n\t}\n\n\tfor (i = 0; i < ARRAY_SIZE(fan_class_attrs); i++){\n\t\tret = class_create_file(fan_data->class, &fan_class_attrs[i]);\n\t\tif(0!=ret){\n\t\t\tprintk(\"khadas_fan_probe,class_create_file%d failed \\n\", i);\n\t\t}\n\t}\n\tdev_info(dev, \"trigger temperature is level0:%d, level1:%d, level2:%d.\\n\", fan_data->trig_temp_level0, fan_data->trig_temp_level1, fan_data->trig_temp_level2);\n\treturn 0;\n}\n\nstatic int khadas_fan_remove(struct platform_device *pdev)\n{\n\tfan_data->enable = KHADAS_FAN_DISABLE;\n\tkhadas_fan_set(fan_data);\n\n\treturn 0;\n}\n\nstatic void khadas_fan_shutdown(struct platform_device *pdev)\n{\n\tfan_data->enable = KHADAS_FAN_DISABLE;\n\tkhadas_fan_set(fan_data);\n}\n\n#ifdef CONFIG_PM\nstatic int khadas_fan_suspend(struct platform_device *pdev, pm_message_t state)\n{\n\tcancel_delayed_work(&fan_data->work);\n        fan_data->last_level = 0;\n\tkhadas_fan_level_set(fan_data, 0);\n\treturn 0;\n}\n\nstatic int khadas_fan_resume(struct platform_device *pdev)\n{\n\tkhadas_fan_set(fan_data);\n\treturn 0;\n}\n#endif\n\nstatic struct of_device_id of_khadas_fan_match[] = {\n\t{ .compatible = \"fanctl\", },\n\t{},\n};\n\nstatic struct platform_driver khadas_fan_driver = {\n\t.probe\t= khadas_fan_probe,\n#ifdef CONFIG_PM\n\t.suspend = khadas_fan_suspend,\n\t.resume = khadas_fan_resume,\n#endif\n\t.remove\t= khadas_fan_remove,\n\t.shutdown = khadas_fan_shutdown,\n\t.driver\t= {\n\t\t.name\t= \"fanctl\",\n\t\t.owner = THIS_MODULE,\n\t\t.of_match_table = of_match_ptr(of_khadas_fan_match),\n\t},\n};\n\nmodule_platform_driver(khadas_fan_driver);\n\nMODULE_AUTHOR(\"kenny <kenny@khadas.com>\");\nMODULE_DESCRIPTION(\"khadas GPIO Fan driver\");\nMODULE_LICENSE(\"GPL\");\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/kvimfan-aml/system.d/kvimfan.service",
    "content": "[Unit]\nDescription=Khadas VIM fan control module loader\nConditionPathExists=/proc/device-tree/fan/compatible\nAfter=kernel-overlays.service\n\n[Service]\nType=oneshot\nExecStart=/bin/sh -c '[ `cat /proc/device-tree/fan/compatible` = \"fanctl\" ] && /sbin/modprobe khadas_fan'\nRemainAfterExit=yes\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/RTL8188EU-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"RTL8188EU-aml\"\nPKG_VERSION=\"2d358c5\"\nPKG_SHA256=\"adf31d56d3a94bca814f1bd0de24af61fae85d25a259124b5d16c1d23cc72c91\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/khadas/android_hardware_wifi_realtek_drivers_8188eu\"\nPKG_URL=\"https://github.com/khadas/android_hardware_wifi_realtek_drivers_8188eu/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Realtek RTL8188EU Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile\n  sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h\n  sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' $PKG_BUILD/*/core/rtw_ieee80211.c\n}\n\nmake_target() {\n  LDFLAGS=\"\" make -C $(kernel_path) M=$PKG_BUILD/rtl8xxx_EU \\\n    ARCH=$TARGET_KERNEL_ARCH \\\n    KSRC=$(kernel_path) \\\n    CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n    USER_EXTRA_CFLAGS=\"-fgnu89-inline\"\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/RTL8188EU-aml/patches/RTL8188EU-aml-0001-Add-support-for-a-few-USB-dongles.patch",
    "content": "From b67364bd4236f890238fb44df1bbba228b42ffe1 Mon Sep 17 00:00:00 2001\nFrom: kszaq <kszaquitto@gmail.com>\nDate: Mon, 2 Oct 2017 11:13:42 +0200\nSubject: [PATCH] Add support for a few USB dongles\n\n---\n rtl8xxx_EU/os_dep/linux/usb_intf.c | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/rtl8xxx_EU/os_dep/linux/usb_intf.c b/rtl8xxx_EU/os_dep/linux/usb_intf.c\nindex 2fbffd6..4892838 100755\n--- a/rtl8xxx_EU/os_dep/linux/usb_intf.c\n+++ b/rtl8xxx_EU/os_dep/linux/usb_intf.c\n@@ -138,6 +138,12 @@ static struct usb_device_id rtw_usb_id_tbl[] = {\n \t/*=== Customer ID ===*/\n \t/****** 8188EUS ********/\n \t{USB_DEVICE(0x07B8, 0x8179), .driver_info = RTL8188E}, /* Abocom - Abocom */\n+\t{USB_DEVICE(0x0DF6, 0x0076), .driver_info = RTL8188E}, /* Sitecom N150 v2 */\n+\t{USB_DEVICE(0x2001, 0x330F), .driver_info = RTL8188E}, /* DLink DWA-125 REV D1 */\n+        {USB_DEVICE(0x2001, 0x3310), .driver_info = RTL8188E}, /* Dlink DWA-123 REV D1 */\n+\t{USB_DEVICE(0x2001, 0x3311), .driver_info = RTL8188E}, /* DLink GO-USB-N150 REV B1 */\n+\t{USB_DEVICE(0x056E, 0x4008), .driver_info = RTL8188E}, /* Elecom WDC-150SU2M */\n+\t{USB_DEVICE(0x2357, 0x010c), .driver_info = RTL8188E}, /* TP-Link TL-WN722N v2 */\n #endif\n \n #ifdef CONFIG_RTL8812A\n-- \n2.7.4\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/RTL8723DS-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"RTL8723DS-aml\"\nPKG_VERSION=\"fb4adf7\"\nPKG_SHA256=\"00da0a7773286df38e8785be2891025e4fa6c4ff5ace9450e54cae85f143847e\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/khadas/android_hardware_wifi_realtek_drivers_8723ds\"\nPKG_URL=\"https://github.com/khadas/android_hardware_wifi_realtek_drivers_8723ds/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Realtek RTL8723DS Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile\n  sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h\n  sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' $PKG_BUILD/*/core/rtw_ieee80211.c\n}\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make -C $(kernel_path) M=$PKG_BUILD/rtl8723DS \\\n    ARCH=$TARGET_KERNEL_ARCH \\\n    KSRC=$(kernel_path) \\\n    CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n    USER_EXTRA_CFLAGS=\"-fgnu89-inline\"\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/RTL8821CU/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"RTL8821CU\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/smp79/rtl8821CU\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_SECTION=\"driver\"\nPKG_LONGDESC=\"Realtek RTL8821CU Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\ncase \"$LINUX\" in\n  amlogic-3.14)\n    PKG_VERSION=\"178fcbf4f1bf5b94580b5708016d0b2c2ded1720\"\n    PKG_SHA256=\"29d3e053dd1fad37ee03de65e4ed2b25a4fb9aaf8bb6bd435da477753d03ad26\"\n    PKG_URL=\"https://github.com/smp79/rtl8821CU/archive/$PKG_VERSION.tar.gz\"\n    PKG_SOURCE_DIR=\"rtl8821CU-$PKG_VERSION*\"\n    ;;\n  amlogic-4.9|odroid-go-a-4.4)\n    PKG_VERSION=\"f7910283478ac1b508ff163d30e4b374bf99f7cb\"\n    PKG_SHA256=\"b2128cbc23ecf9b17bbbd9652a2453d73403276a56b11eb8a795d168156cd53e\"\n    PKG_URL=\"https://github.com/smp79/rtl8821CU/archive/$PKG_VERSION.tar.gz\"\n    PKG_SOURCE_DIR=\"rtl8821CU-$PKG_VERSION*\"\n    ;;\nesac\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make \\\n       ARCH=$TARGET_KERNEL_ARCH \\\n       KSRC=$(kernel_path) \\\n       CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n       CONFIG_POWER_SAVING=n\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    cp *.ko $INSTALL/$(get_full_module_dir)/$PKG_NAME\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/mt7601u-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mt7601u-aml\"\nPKG_VERSION=\"4e61a61\"\nPKG_SHA256=\"814a63d8654f87a76cc06425ad2120daa32646f5220341a26296e4a6643b013a\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/khadas/android_hardware_wifi_mtk_drivers_mt7601\"\nPKG_URL=\"https://github.com/khadas/android_hardware_wifi_mtk_drivers_mt7601/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"mt7601u Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make -C $(kernel_path) M=$PKG_BUILD \\\n    ARCH=$TARGET_KERNEL_ARCH \\\n    CROSS_COMPILE=$TARGET_KERNEL_PREFIX\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n\n  mkdir -p $INSTALL/$(get_full_firmware_dir)\n    cp $PKG_BUILD/RT2870STA_7601.dat $INSTALL/$(get_full_firmware_dir)\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/mt7601u-aml/patches/mt7601u-aml-001-firmware-path.patch",
    "content": "diff --git a/include/os/rt_linux.h b/include/os/rt_linux.h\nindex 0303698..36dd603 100755\n--- a/include/os/rt_linux.h\n+++ b/include/os/rt_linux.h\n@@ -159,7 +159,7 @@ typedef struct usb_ctrlrequest devctrlrequest;\n #ifdef ALLWINNER\n #define STA_PROFILE_PATH                        \"/system/vendor/modules/RT2870STA_7601.dat\"\n #else\n-#define STA_PROFILE_PATH\t\t\t\"/system/etc/wifi/RT2870STA_7601.dat\"\n+#define STA_PROFILE_PATH\t\t\t\"/lib/firmware/RT2870STA_7601.dat\"\n #endif\n #define STA_DRIVER_VERSION\t\t\t\"JEDI.L0.MP1.mt7601u.v1.2\"\n #define DRIVER_ROLE\t\t\t\"STA\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/mt7603u-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mt7603u-aml\"\nPKG_VERSION=\"0c53dfb\"\nPKG_SHA256=\"9e3eab02f3c3dd7de373c5d631c2069771e6ad783ecda36a484030ab4ec0ccec\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/khadas/android_hardware_wifi_mtk_drivers_mt7603\"\nPKG_URL=\"https://github.com/khadas/android_hardware_wifi_mtk_drivers_mt7603/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"mt7603u Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make LINUX_SRC=$(kernel_path) \\\n    ARCH=$TARGET_KERNEL_ARCH \\\n    CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n    RT28xx_DIR=$PKG_BUILD \\\n    -f $PKG_BUILD/Makefile\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n\n  mkdir -p $INSTALL/$(get_full_firmware_dir)\n    cp $PKG_BUILD/conf/MT7603USTA.dat $INSTALL/$(get_full_firmware_dir)\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/mt7603u-aml/patches/mt7603u-aml-001-firmware-path.patch",
    "content": "diff --git a/include/os/rt_linux.h b/include/os/rt_linux.h\nindex 9ddc4ea..258907a 100755\n--- a/include/os/rt_linux.h\n+++ b/include/os/rt_linux.h\n@@ -201,7 +201,7 @@ typedef struct usb_ctrlrequest devctrlrequest;\n \n #ifdef CONFIG_STA_SUPPORT\n #ifdef RTMP_MAC_PCI\n-#define STA_PROFILE_PATH\t\t\t\"/system/etc/wifi/RT2870STA_7603.dat\"\n+#define STA_PROFILE_PATH\t\t\t\"/lib/firmware/RT2870STA_7603.dat\"\n #define STA_DRIVER_VERSION\t\t\t\"3.0.0.0\"\n #ifdef MULTIPLE_CARD_SUPPORT\n #define CARD_INFO_PATH\t\t\t\"/etc/Wireless/RT2860STA/RT2860STACard.dat\"\n@@ -210,12 +210,12 @@ typedef struct usb_ctrlrequest devctrlrequest;\n \n #ifdef RTMP_MAC_USB\n #ifdef HE_BD_CFG80211_SUPPORT \n-#define STA_PROFILE_PATH\t\t\t\"/system/etc/wifi/RT2870STA_7603.dat\"\n+#define STA_PROFILE_PATH\t\t\t\"/lib/firmware/RT2870STA_7603.dat\"\n #else\n #ifdef USE_CHIP_DEPENDENT_PROFILE_NAME\n-#define STA_PROFILE_PATH                        \"/system/etc/wifi/RT2870STA_7603.dat\"\n+#define STA_PROFILE_PATH                        \"/lib/firmware/RT2870STA_7603.dat\"\n #else\n-#define STA_PROFILE_PATH                        \"/system/etc/wifi/RT2870STA_7603.dat\"\n+#define STA_PROFILE_PATH                        \"/lib/firmware/RT2870STA_7603.dat\"\n #endif /* USE_CHIP_DEPENDENT_PROFILE_NAME */\n #endif /* HE_BD_CFG80211_SUPPORT */\n #define STA_DRIVER_VERSION\t\t\t\"JEDI.L0.MP1.mt7603u.v1.8\"\n@@ -227,7 +227,7 @@ typedef struct usb_ctrlrequest devctrlrequest;\n \n \n #ifdef RTMP_MAC_SDIO\n-#define STA_PROFILE_PATH\t\t\t\"/system/etc/wifi/RT2870STA_7603.dat\"\n+#define STA_PROFILE_PATH\t\t\t\"/lib/firmware/RT2870STA_7603.dat\"\n #define STA_DRIVER_VERSION\t\t\t\"3.0.0.0\"\n #ifdef MULTIPLE_CARD_SUPPORT\n #define CARD_INFO_PATH\t\t\t\"/etc/Wireless/RT2870STA/RT2870STACard.dat\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/mt7603u-aml/patches/mt7603u-aml-002-fix-building.patch",
    "content": "diff --git a/Makefile b/Makefile\nindex 65d0a5c..7fc16f4 100755\n--- a/Makefile\n+++ b/Makefile\n@@ -234,7 +234,7 @@ endif\n ifeq ($(PREALLOC), YES)\n #build prealloc.ko\n \tcp -f $(RT28xx_DIR)/os/linux/Makefile.6.prealloc $(RT28xx_DIR)/os/linux/Makefile\n-\t$(MAKE) ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules\n+\t$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules\n endif\n \tcp -f $(RT28xx_DIR)/os/linux/Makefile.6 $(RT28xx_DIR)/os/linux/Makefile\n ifeq ($(PLATFORM),DM6446)\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/mt7603u-aml/patches/mt7603u-aml-003-fix-build-the-vpeter-way.patch",
    "content": "diff --git a/Makefile b/Makefile\nindex 65d0a5c..9f665ba 100755\n--- a/Makefile\n+++ b/Makefile\n@@ -184,7 +184,7 @@ THREADX:\n \t$(MAKE) -C $(RT28xx_DIR)/os/Threadx -f $(RT28xx_DIR)/os/ThreadX/Makefile\n \n LINUX:\n-ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+ifneq (,)\n \n ifeq ($(OSABL),YES)\n \tcp -f os/linux/Makefile.4.util $(RT28xx_DIR)/os/linux/Makefile\n@@ -330,7 +330,7 @@ endif\n \n uninstall:\n ifeq ($(TARGET), LINUX)\n-ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+ifneq (,)\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.4 uninstall\n else\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.6 uninstall\n@@ -339,7 +339,7 @@ endif\n \n install:\n ifeq ($(TARGET), LINUX)\n-ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+ifneq (,)\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.4 install\n else\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.6 install\n@@ -347,7 +347,7 @@ endif\n endif\n \n libwapi:\n-ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+ifneq (,)\n \tcp -f os/linux/Makefile.libwapi.4 $(RT28xx_DIR)/os/linux/Makefile\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux/\n else\n@@ -357,7 +357,7 @@ endif\n \n osutil:\n ifeq ($(OSABL),YES)\n-ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+ifneq (,)\n \tcp -f os/linux/Makefile.4.util $(RT28xx_DIR)/os/linux/Makefile\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux/\n else\n@@ -371,7 +371,7 @@ endif\n \n osnet:\n ifeq ($(OSABL),YES)\n-ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+ifneq (,)\n \tcp -f os/linux/Makefile.4.netif $(RT28xx_DIR)/os/linux/Makefile\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux/\n else\n@@ -384,7 +384,7 @@ endif\n endif\n \n osdrv:\n-ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+ifneq (,)\n \tcp -f os/linux/Makefile.4 $(RT28xx_DIR)/os/linux/Makefile\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux/\n else\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/mt7610u-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.tv)\n\nPKG_NAME=\"mt7610u-aml\"\nPKG_VERSION=\"c7a38f2bdde7a9e70f5d0753d4810f32dd1f6720\"\nPKG_SHA256=\"84bfa9aa8b56f7db4b43fac56a6b9e267bf8cb13f94aeff22d1aa38a7a965e86\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/osmc/mt7610u\"\nPKG_URL=\"https://github.com/osmc/mt7610u/archive/$PKG_VERSION.tar.gz\"\nPKG_SOURCE_DIR=\"mt7610u-$PKG_VERSION/mt7610u\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"mt7610u Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make LINUX_SRC=$(kernel_path) \\\n    ARCH=$TARGET_KERNEL_ARCH \\\n    CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n    RT28xx_DIR=$PKG_BUILD \\\n    -f $PKG_BUILD/Makefile\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/mt7610u-aml/patches/mt7610u-0001-fix-cross-compiling.patch",
    "content": "diff --git a/Makefile b/Makefile\nindex 38fcc3e..91a6aec 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -24,7 +24,7 @@ OSABL = NO\n \n ifneq ($(TARGET),THREADX)\n #RT28xx_DIR = home directory of RT28xx source code\n-RT28xx_DIR = $(shell pwd)\n+RT28xx_DIR ?= $(shell pwd)\n endif\n \n include $(RT28xx_DIR)/os/linux/config.mk\n@@ -196,11 +196,12 @@ endif\n \n ifeq ($(PLATFORM),PC)\n # Linux 2.6\n-LINUX_SRC = /lib/modules/$(shell uname -r)/build\n+LINUX_SRC ?= /lib/modules/$(shell uname -r)/build\n # Linux 2.4 Change to your local setting\n #LINUX_SRC = /usr/src/linux-2.4\n-LINUX_SRC_MODULE = /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless/\n-CROSS_COMPILE = \n+LINUX_SRC_MODULE ?= /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless/\n+CROSS_COMPILE ?=aarch64-linux-gnu-\n+ARCH ?=arm64\n endif\n \n ifeq ($(PLATFORM),INTELP6)\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/mt7610u-aml/patches/mt7610u-0002-support-more-cards.patch",
    "content": "diff --git a/common/rtusb_dev_id.c b/common/rtusb_dev_id.c\nindex 1855e06..8146402 100644\n--- a/common/rtusb_dev_id.c\n+++ b/common/rtusb_dev_id.c\n@@ -36,7 +36,27 @@\n /* module table */\n USB_DEVICE_ID rtusb_dev_id[] = {\n #ifdef MT76x0\n-\t{USB_DEVICE(0x0E8D,0x7610)}, /* MT7610U */\n+\t{ USB_DEVICE(0x148F, 0x7610) }, /* MT7610U */\n+\t{ USB_DEVICE(0x13B1, 0x003E) }, /* Linksys AE6000 */\n+\t{ USB_DEVICE(0x0E8D, 0x7610) }, /* Sabrent NTWLAC */\n+\t{ USB_DEVICE(0x7392, 0xa711) }, /* Edimax 7711mac */\n+\t{ USB_DEVICE(0x7392, 0xb711) }, /* Edimax / Elecom  */\n+\t{ USB_DEVICE(0x148f, 0x761a) }, /* TP-Link TL-WDN5200 */\n+\t{ USB_DEVICE(0x148f, 0x760a) }, /* TP-Link unknown */\n+\t{ USB_DEVICE(0x0b05, 0x17d1) }, /* Asus USB-AC51 */\n+\t{ USB_DEVICE(0x0b05, 0x17db) }, /* Asus USB-AC50 */\n+\t{ USB_DEVICE(0x0df6, 0x0075) }, /* Sitecom WLA-3100 */\n+\t{ USB_DEVICE(0x2019, 0xab31) }, /* Planex GW-450D */\n+\t{ USB_DEVICE(0x2001, 0x3d02) }, /* D-LINK DWA-171 rev B1 */\n+\t{ USB_DEVICE(0x0586, 0x3425) }, /* Zyxel NWD6505 */\n+\t{ USB_DEVICE(0x07b8, 0x7610) }, /* AboCom AU7212 */\n+\t{ USB_DEVICE(0x04bb, 0x0951) }, /* I-O DATA WN-AC433UK */\n+\t{ USB_DEVICE(0x057c, 0x8502) }, /* AVM FRITZ!WLAN USB Stick AC 430 */\n+\t{ USB_DEVICE(0x293c, 0x5702) }, /* Comcast Xfinity KXW02AAA  */\n+\t{ USB_DEVICE(0x20f4, 0x806b) }, /* TRENDnet TEW-806UBH  */\n+\t{ USB_DEVICE(0x7392, 0xc711) }, /* Devolo Wifi ac Stick */\n+\t{ USB_DEVICE(0x0df6, 0x0079) }, /* Sitecom Europe B.V. ac  Stick */\n+\t{ USB_DEVICE(0x2357, 0x0105) }, /* TP-LINK Archer T1U */\n #endif\n \t{ }/* Terminating entry */\n };\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/mt7610u-aml/patches/mt7610u-aml-003-fix-build-the-vpeter-way.patch",
    "content": "diff --git a/Makefile b/Makefile\nindex 38fcc3e..3836bb3 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -340,7 +340,7 @@ THREADX:\n \t$(MAKE) -C $(RT28xx_DIR)/os/Threadx -f $(RT28xx_DIR)/os/ThreadX/Makefile\n \n LINUX:\n-ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+ifneq (,)\n \n ifeq ($(OSABL),YES)\n \tcp -f os/linux/Makefile.4.util $(RT28xx_DIR)/os/linux/Makefile\n@@ -468,7 +468,7 @@ endif\n \n uninstall:\n ifeq ($(TARGET), LINUX)\n-ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+ifneq (,)\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.4 uninstall\n else\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.6 uninstall\n@@ -477,7 +477,7 @@ endif\n \n install:\n ifeq ($(TARGET), LINUX)\n-ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+ifneq (,)\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.4 install\n else\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.6 install\n@@ -485,7 +485,7 @@ endif\n endif\n \n libwapi:\n-ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+ifneq (,)\n \tcp -f os/linux/Makefile.libwapi.4 $(RT28xx_DIR)/os/linux/Makefile\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux/\n else\n@@ -495,7 +495,7 @@ endif\n \n osutil:\n ifeq ($(OSABL),YES)\n-ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+ifneq (,)\n \tcp -f os/linux/Makefile.4.util $(RT28xx_DIR)/os/linux/Makefile\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux/\n else\n@@ -506,7 +506,7 @@ endif\n \n osnet:\n ifeq ($(OSABL),YES)\n-ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+ifneq (,)\n \tcp -f os/linux/Makefile.4.netif $(RT28xx_DIR)/os/linux/Makefile\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux/\n else\n@@ -516,7 +516,7 @@ endif\n endif\n \n osdrv:\n-ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+ifneq (,)\n \tcp -f os/linux/Makefile.4 $(RT28xx_DIR)/os/linux/Makefile\n \t$(MAKE) -C $(RT28xx_DIR)/os/linux/\n else\ndiff --git a/os/linux/config.mk b/os/linux/config.mk\nindex 4ffdfd7..956fe85 100644\n--- a/os/linux/config.mk\n+++ b/os/linux/config.mk\n@@ -894,7 +894,7 @@ WFLAGS += -DRT_BIG_ENDIAN -DINF_TWINPASS\n endif\n \n ifeq ($(PLATFORM),INF_DANUBE)\n-ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+ifneq (,)\n # Linux 2.4\n WFLAGS += -DINF_DANUBE -DRT_BIG_ENDIAN\n else\n@@ -998,7 +998,7 @@ export CFLAGS\n endif\n \n ifeq ($(PLATFORM),INF_DANUBE)\n-\tifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+\tifneq (,)\n \tCFLAGS := $(WFLAGS) -Wundef -fno-strict-aliasing -fno-common -ffreestanding -Os -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -pipe -msoft-float  -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap -I$(LINUX_SRC)/include/asm-mips/mach-generic\n \telse\n \tCFLAGS := $(WFLAGS) -Wundef -fno-strict-aliasing -fno-common -ffreestanding -Os -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -pipe -msoft-float  -mabi=32 -march=mips32r2 -Wa,-32 -Wa,-march=mips32r2 -Wa,-mips32r2 -Wa,--trap -I$(LINUX_SRC)/include/asm-mips/mach-generic\n@@ -1032,7 +1032,7 @@ export CFLAGS\n endif\n \n ifeq ($(PLATFORM),PC)\n-    ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+    ifneq (,)\n \t# Linux 2.4\n \tCFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include $(LINUX_SRC)/include/linux/modversions.h $(WFLAGS)\n \texport CFLAGS\n@@ -1098,7 +1098,7 @@ export CFLAGS\n endif\n \n ifeq ($(PLATFORM),MT85XX)\n-    ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+    ifneq (,)\n \t# Linux 2.4\n \tCFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include $(LINUX_SRC)/include/linux/modversions.h $(WFLAGS)\n \texport CFLAGS\n@@ -1120,7 +1120,7 @@ ifeq ($(PLATFORM),MT85XX)\n endif\n \n ifeq ($(PLATFORM),NXP_TV550)\n-    ifneq (,$(findstring 2.4,$(LINUX_SRC)))\n+    ifneq (,)\n         # Linux 2.4\n         CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=mips -DMODULE -DMODVERSIONS -include $(LINUX_SRC)/include/linux/modversions.h $(WFLAGS)\n         export CFLAGS\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/mt7668-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.tv)\n\nPKG_NAME=\"mt7668-aml\"\nPKG_VERSION=\"fd76e10404b220c552fc7951f5a359b56d599e3b\"\nPKG_SHA256=\"1fb62a608b9ce8ba8157a8025ba0d76ad1d085510b27982e4af33575d2841308\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/khadas/android_hardware_wifi_mtk_drivers_mt7668\"\nPKG_URL=\"https://github.com/khadas/android_hardware_wifi_mtk_drivers_mt7668/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"mt7668 Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make EXTRA_CFLAGS=\"-w\" \\\n    KERNELDIR=$(kernel_path) \\\n    ARCH=$TARGET_KERNEL_ARCH \\\n    CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n    -f $PKG_BUILD/Makefile\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n\n  mkdir -p $INSTALL/$(get_full_firmware_dir)\n    cp $PKG_BUILD/7668_firmware/* $INSTALL/$(get_full_firmware_dir)\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/rtl8822b_bt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"rtl8822b_bt\"\nPKG_VERSION=\"4dfa50ab6150aa51a6e03bbcd479c8d2e68bfa2b\"\nPKG_SHA256=\"bf9205c4ac1a5893cdbd3ca98ab82e5636244fef50e375fc0148a3db7153fe51\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/ChalesYu/rtl8822bs-aml\"\nPKG_URL=\"https://github.com/ChalesYu/rtl8822bs-aml/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain rkbin\"\nPKG_LONGDESC=\"RTL8822B BT Linux firmware\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n  mkdir -p $PKG_BUILD\n  tar --strip-components=2 -xf $SOURCES/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz -C $PKG_BUILD rtl8822bs-aml-$PKG_VERSION/bluetooth\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/bin\n    cp -a $(get_build_dir rkbin)/firmware/bin/rtk_hciattach $INSTALL/usr/bin/8822b_hciattach\n\n  mkdir -p $INSTALL/$(get_full_firmware_dir)/rtlbt\n    cp -a $PKG_BUILD/rtl8822b_config.bin $INSTALL/$(get_full_firmware_dir)/rtlbt/rtl8822b_config\n    cp -a $PKG_BUILD/rtl8822b_fw.bin $INSTALL/$(get_full_firmware_dir)/rtlbt/rtl8822b_fw\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/rtl8822b_bt/system.d/rtl8822b_bt-firmware.service",
    "content": "[Unit]\nDescription=Attach /dev/ttyS1 to BlueZ stack\nWants=bluetooth.service\nBefore=bluetooth.service\nAfter=dev-ttyS1.device\n\n[Service]\nType=simple\nExecStartPre=/usr/sbin/rfkill unblock bluetooth\nExecStart=/usr/bin/8822b_hciattach -n -s 115200 /dev/ttyS1 rtk_h5\nExecStopPost=/usr/sbin/rfkill block bluetooth\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/rtl8822b_bt/udev.d/80-rtl8822b_bt.rules",
    "content": "################################################################################\n# udev rules file for loading rtl8822b_bt-firmware\n################################################################################\n\nACTION!=\"add\", GOTO=\"end\"\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x024c\", ATTRS{device}==\"0xb822\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"rtl8822b_bt-firmware.service\"\nGOTO=\"end\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/ssv6xxx-aml-3.14/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ssv6xxx-aml-3.14\"\nPKG_VERSION=\"1041e7d\"\nPKG_SHA256=\"1d96db8eec06c8a2c43f2c8024cc573e2bbce08fb0504fd9b6671224335e7d5f\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://libreelec.tv\"\nPKG_URL=\"https://sources.libreelec.tv/devel/ssv6xxx-aml-1041e7d.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"ssv6xxx Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_configure_target() {\n  sed -i 's,hw_cap_p2p = on,hw_cap_p2p = off,g' firmware/ssv6051-wifi.cfg\n}\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  if [ \"$TARGET_KERNEL_ARCH\" = \"arm64\" ]; then\n    PLATFORM=\"aml-s905\"\n  else\n    PLATFORM=\"aml-s805\"\n  fi\n\n  cd $PKG_BUILD\n    ./ver_info.pl include/ssv_version.h\n    cp Makefile.android Makefile\n    sed -i 's,PLATFORMS =,PLATFORMS = '\"$PLATFORM\"',g' Makefile\n    make module SSV_ARCH=\"$TARGET_KERNEL_ARCH\" \\\n      SSV_CROSS=\"$TARGET_KERNEL_PREFIX\" \\\n      SSV_KERNEL_PATH=\"$(kernel_path)\"\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n\n  mkdir -p $INSTALL/$(get_full_firmware_dir)/ssv6051\n    cp $PKG_BUILD/firmware/* $INSTALL/$(get_full_firmware_dir)/ssv6051\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/linux-drivers/ssv6xxx-aml-3.14/patches/ssv6xxx-aml-3.14-001-fix-build-and-firmware-path.patch",
    "content": "diff --git a/Makefile.android b/Makefile.android\nindex 82211e1..0deeee5 100755\n--- a/Makefile.android\n+++ b/Makefile.android\n@@ -2,10 +2,8 @@ PLATFORMS =\n\n KBUILD_TOP := $(PWD)\n\n-SSV_PATH=$(ANDROID_BUILD_TOP)/hardware/wifi/icomm/ssv6xxx/ssv6051/\n-\n-include $(SSV_PATH)/ssv6051.cfg\n-include $(SSV_PATH)/platform-config.mak\n+include ${KBUILD_TOP}/ssv6051.cfg\n+include ${KBUILD_TOP}/platform-config.mak\n\n PWD := $(shell pwd)\n\n@@ -69,7 +67,7 @@ obj-$(CONFIG_SSV6200_CORE) += $(KMODULE_NAME).o\n all:module strip\n \n module:\n-\tmake  -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \\\n+\t$(MAKE) -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \\\n \tEXTRA_CFLAGS=\"$(EXTRA_CFLAGS)\" M=$(PWD) modules\n \n install:\n@@ -92,6 +90,6 @@ ifneq ($(SSV_STRIP),)\n endif\n \n clean:\n-\tmake -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \\\n+\t$(MAKE) -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \\\n \tM=$(PWD) clean\n \trm $(DEF_PARSER_H)\ndiff --git a/firmware/ssv6051-wifi.cfg b/firmware/ssv6051-wifi.cfg\nindex 6c3a823..9c623a0 100755\n--- a/firmware/ssv6051-wifi.cfg\n+++ b/firmware/ssv6051-wifi.cfg\n@@ -11,7 +11,7 @@\n # Priority.3 default firmware\n ##################################################\n\n-firmware_path = /system/etc/wifi/ssv6051/\n+firmware_path = /usr/lib/firmware/ssv6051/\n\n ############################################################\n # MAC address\n\ndiff --git a/platform-config.mak b/platform-config.mak\nindex bf35b70..f02e2b5 100755\n--- a/platform-config.mak\n+++ b/platform-config.mak\n@@ -5,7 +5,7 @@ CONFIG_SSV6200_CORE=m\n ###########################################################################\n # Compiler options                                                        #\n ###########################################################################\n-ccflags-y += -Werror\n+# ccflags-y += -Werror\n \n # Enable -g to help debug. Deassembly from .o to .S would help to track to \n # the problomatic line from call stack dump.\ndiff --git a/ssv6051.cfg b/ssv6051.cfg\nindex 7cf12c2..a6960fa 100755\n--- a/ssv6051.cfg\n+++ b/ssv6051.cfg\n@@ -16,6 +16,6 @@ ccflags-y += -DCONFIG_SSV_RSSI\n #SSV_CROSS = $(ANDROID_BUILD_TOP)/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-\n #SSV_KERNEL_PATH = $(ANDROID_BUILD_TOP)/out/target/product/p201/obj/KERNEL_OBJ/\n \n-SSV_ARCH = arm64\n+#SSV_ARCH = arm64\n #KMODDESTDIR = $(MODDESTDIR)\n \ndiff --git a/ssvdevice/ssvdevice.c b/ssvdevice/ssvdevice.c\nindex ff4305e..375827f 100755\n--- a/ssvdevice/ssvdevice.c\n+++ b/ssvdevice/ssvdevice.c\n@@ -35,7 +35,7 @@\n MODULE_AUTHOR(\"iComm Semiconductor Co., Ltd\");\n MODULE_DESCRIPTION(\"Shared library for SSV wireless LAN cards.\");\n MODULE_LICENSE(\"Dual BSD/GPL\");\n-static char *stacfgpath = NULL;\n+static char *stacfgpath = \"/usr/lib/firmware/ssv6051/ssv6051-wifi.cfg\";\n EXPORT_SYMBOL(stacfgpath);\n module_param(stacfgpath, charp, 0000);\n MODULE_PARM_DESC(stacfgpath, \"Get path of sta cfg\");\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/old_ee_3.14_kernel/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"old_ee_3.14_kernel\"\nPKG_VERSION=\"1\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_LONGDESC=\"Old alternative kernel for Amlogic-old\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/bootloader\n  cp ${PKG_BUILD}/* ${INSTALL}/usr/share/bootloader\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/opengl-meson/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"opengl-meson\"\nPKG_VERSION=\"7bddce621a0c1e0cc12cfc8b707e93eb37fc0f82\"\nPKG_SHA256=\"15400e78b918b15743b815c195be472899d4243143e405a7b50d5be1cd07ffd1\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"http://openlinux.amlogic.com:8000/download/ARM/filesystem/\"\nPKG_URL=\"https://github.com/CoreELEC/opengl-meson/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"OpenGL ES pre-compiled libraries for Mali GPUs found in Amlogic Meson SoCs.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n\tmkdir -p ${INSTALL}/usr/lib\nif [[ \"${ARCH}\" == \"arm\" ]]; then\n    cp -p lib/eabihf/m450/r7p0/fbdev/libMali.so ${INSTALL}/usr/lib/libMali.so\n    \n    mkdir -p ${SYSROOT_PREFIX}/usr/lib\n\t\tcp -p lib/eabihf/m450/r7p0/fbdev/libMali.so ${SYSROOT_PREFIX}/usr/lib\nelse\n    cp -p lib/arm64/m450/r7p0/fbdev/libMali.so ${INSTALL}/usr/lib\n    \n    mkdir -p ${SYSROOT_PREFIX}/usr/lib\n\t\tcp -p lib/arm64/m450/r7p0/fbdev/libMali.so ${SYSROOT_PREFIX}/usr/lib\nfi\n\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libmali.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libmali.so.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libEGL.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libEGL.so.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libEGL.so.1.0.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLES_CM.so.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so.1.0.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv1_CM.so.1.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so.2\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so.2.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv2.so.2.0.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so.3\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so.3.1\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so.3.0\n    ln -sf /usr/lib/libMali.so ${INSTALL}/usr/lib/libGLESv3.so.3.0.0\n\n# install headers and libraries to TOOLCHAIN\n\tcp -rf ${PKG_BUILD}/include/* ${SYSROOT_PREFIX}/usr/include\n\tcp -rf ${PKG_BUILD}/pkgconfig/* ${SYSROOT_PREFIX}/usr/lib/pkgconfig\n\tcp ${SYSROOT_PREFIX}/usr/include/EGL_platform/platform_fbdev/* ${SYSROOT_PREFIX}/usr/include/EGL\n\trm -rf ${SYSROOT_PREFIX}/usr/include/EGL_platform\n\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libmali.so\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libMali.so.0\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libEGL.so\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libEGL.so.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libEGL.so.1.0.0\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLES_CM.so.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv1_CM.so\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv1_CM.so.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv1_CM.so.1.0.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv1_CM.so.1.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv2.so\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv2.so.2\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv2.so.2.0\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv2.so.2.0.0\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv3.so\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv3.so.1\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv3.so.3\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv3.so.3.0\n    ln -sf ${SYSROOT_PREFIX}/usr/lib/libMali.so ${SYSROOT_PREFIX}/usr/lib/libGLESv3.so.3.0.0\n\n  # mkdir -p ${INSTALL}/usr/sbin\n  #   cp $PKG_DIR/scripts/libmali-overlay-setup ${INSTALL}/usr/sbin\n}\n\npost_install() {\n  enable_service unbind-console.service\n  # enable_service libmali.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/opengl-meson/scripts/libmali-overlay-setup",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nmkdir -p /var/lib32\nln -sf /usr/lib/libMali.so /var/lib/libMali.so\nln -sf /usr/lib32/libMali.m450.so /var/lib32/libMali.so\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/opengl-meson/sources/pkgconfig/egl.pc",
    "content": "prefix=/usr\nexec_prefix=${prefix}\nlibdir=/usr/lib\nincludedir=${prefix}/include\n\nName: egl\nDescription: libhybris EGL library\n# Set to 7.10 because some package like weston are usually built\n# against mesa and because of that expect certain version from egl.\nVersion: 7.10\nLibs: -L${libdir} -lEGL\nCflags: -I${includedir}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/opengl-meson/sources/pkgconfig/glesv1_cm.pc",
    "content": "prefix=/usr\nexec_prefix=${prefix}\nlibdir=/usr/lib\nincludedir=${prefix}/include\n\nName: glesv1_cm\nDescription: libhybris OpenGL ES 1.1 library\nVersion: 0.1.0\nLibs: -L${libdir} -lGLESv1_CM\nCflags: -I${includedir}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/opengl-meson/sources/pkgconfig/glesv2.pc",
    "content": "prefix=/usr\nexec_prefix=${prefix}\nlibdir=/usr/lib\nincludedir=${prefix}/include\n\nName: glesv2\nDescription: libhybris OpenGL ES 2.0 library\nVersion: 0.1.0\nLibs: -L${libdir} -lGLESv2\nCflags: -I${includedir}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/opengl-meson/sources/pkgconfig/glesv3.pc",
    "content": "prefix=/usr\nexec_prefix=${prefix}\nlibdir=/usr/lib\nincludedir=${prefix}/include\n\nName: glesv3\nDescription: libhybris OpenGL ES 3.0 library\nVersion: 0.1.0\nLibs: -L${libdir} -lGLESv3\nCflags: -I${includedir}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/opengl-meson/system.d/unbind-console.service",
    "content": "[Unit]\nDescription=Unbind framebuffer console\nConditionPathExists=/sys/class/vtconsole/vtcon1/bind\n\n[Service]\nType=oneshot\nExecStart=/bin/sh -c 'echo 0 > /sys/class/vtconsole/vtcon1/bind'\n\n[Install]\nWantedBy=graphical.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/opengl-meson/system.d-disabled/libmali.service",
    "content": "[Unit]\nDescription=Create libMali overlay for specific AML device\nAfter=var.mount\nBefore=kodi.service\n\n[Service]\nType=oneshot\nExecStart=/usr/sbin/libmali-overlay-setup\n\n[Install]\nWantedBy=local-fs.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/qca9377-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"qca9377-aml\"\nPKG_VERSION=\"311e24939b53d0cbaf303cde3ed1dc22349602a9\"\nPKG_SHA256=\"238e0174ec5ca3f87c184fade5eb7d1e4522d6af279aac6bd87f8bab24fc13ad\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://boundarydevices.com/new-silex-wifi-802-11ac-bt4-1-module/\"\nPKG_URL=\"https://github.com/boundarydevices/qcacld-2.0/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"qca9377 Linux Driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_PATCH_DIRS=\"$LINUX\"\n\npost_unpack() {\n  sed -i 's,-Wall,,g; s,-Werror,,g' $PKG_BUILD/Kbuild\n  sed -i 's,CDEFINES :=,CDEFINES := -Wno-misleading-indentation -Wno-unused-variable -Wno-unused-function,g' $PKG_BUILD/Kbuild\n}\n\npre_make_target() {\n  unset LDFLAGS\n  unset CFLAGS\n}\n\nmake_target() {\n  make KERNEL_SRC=\"$(kernel_path)\" \\\n    ARCH=$TARGET_KERNEL_ARCH \\\n    CROSS_COMPILE=$TARGET_KERNEL_PREFIX\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/qca9377-aml/patches/amlogic-3.14/patch.patch",
    "content": "From 7d4ee23fb20cc5e17d8d79db20a0d6704ac3df6c Mon Sep 17 00:00:00 2001\nFrom: kszaq <kszaquitto@gmail.com>\nDate: Tue, 10 Jan 2017 22:43:12 +0100\nSubject: [PATCH] Modify SDIO and firmware handling to support chips used in\n Amlogic devices\n\n---\n CORE/HDD/src/wlan_hdd_cfg.c                        |  10 +-\n CORE/HDD/src/wlan_hdd_main.c                       | 180 ++++++++++++++++++++-\n CORE/SERVICES/BMI/ol_fw.c                          |   8 +-\n CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c         |   6 -\n .../sdio/linux/native_sdio/include/hif_internal.h  |   2 +-\n CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c |  62 +++----\n 6 files changed, 209 insertions(+), 59 deletions(-)\n\ndiff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c\nindex 14524ef..439b18a 100644\n--- a/CORE/HDD/src/wlan_hdd_cfg.c\n+++ b/CORE/HDD/src/wlan_hdd_cfg.c\n@@ -60,6 +60,8 @@\n #include <pmcApi.h>\n #include <wlan_hdd_misc.h>\n \n+extern int qca_request_firmware(const struct firmware **firmware_p, const char *name,struct device *device);\n+\n static char *mac_param;\n module_param_named(mac, mac_param, charp, S_IRUGO);\n MODULE_PARM_DESC(mac, \"mac address override\");\n@@ -4411,11 +4413,11 @@ VOS_STATUS hdd_parse_config_ini(hdd_context_t* pHddCtx)\n \n    memset(cfgIniTable, 0, sizeof(cfgIniTable));\n \n-   status = request_firmware(&fw, WLAN_INI_FILE, pHddCtx->parent_dev);\n+   status = qca_request_firmware(&fw, WLAN_INI_FILE, pHddCtx->parent_dev);\n \n    if(status)\n    {\n-      printk(\"%s: request_firmware failed %d\",__func__, status);\n+      printk(\"%s: qca_request_firmware failed %d\",__func__, status);\n       vos_status = VOS_STATUS_E_FAILURE;\n       goto config_exit;\n    }\n@@ -5104,11 +5106,11 @@ VOS_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx)\n    }\n \n    memset(macTable, 0, sizeof(macTable));\n-   status = request_firmware(&fw, WLAN_MAC_FILE, pHddCtx->parent_dev);\n+   status = qca_request_firmware(&fw, WLAN_MAC_FILE, pHddCtx->parent_dev);\n \n    if (status)\n    {\n-      hddLog(VOS_TRACE_LEVEL_WARN, \"%s: request_firmware failed %d\",\n+      hddLog(VOS_TRACE_LEVEL_WARN, \"%s: qca_request_firmware failed %d\",\n              __func__, status);\n       vos_status = VOS_STATUS_E_FAILURE;\n       return vos_status;\ndiff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c\nindex 00db789..7926902 100644\n--- a/CORE/HDD/src/wlan_hdd_main.c\n+++ b/CORE/HDD/src/wlan_hdd_main.c\n@@ -239,6 +239,163 @@ static VOS_STATUS hdd_parse_ese_beacon_req(tANI_U8 *pValue,\n /*\n  * Android DRIVER command structures\n  */\n+//tkun add\n+ typedef char            A_CHAR;\n+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)\n+ #define GET_INODE_FROM_FILEP(filp) \\\n+     (filp)->f_path.dentry->d_inode\n+ #else\n+ #define GET_INODE_FROM_FILEP(filp) \\\n+     (filp)->f_dentry->d_inode\n+ #endif\n+// #define A_MALLOC(size)                  kmalloc((size), GFP_KERNEL)\n+ #define A_MALLOC_NOWAIT(size)           kmalloc((size), GFP_ATOMIC)\n+// #define A_FREE(addr)                    kfree(addr);addr=NULL;\n+//#define A_MEMCPY(dst, src, len)         memcpy((dst), (src), (len))\n+// #define A_MEMZERO(addr, len)            memset((addr), 0, (len))\n+ #define A_MEMCMP(addr1, addr2, len)     memcmp((addr1), (addr2), (len))\n+ #define A_ROUND_UP(x, y)  ((((x) + ((y) - 1)) / (y)) * (y))\n+ \n+ char qcafwpath[256] = \"/lib/firmware\";\n+ \n+ int android_readwrite_file(const A_CHAR *filename, A_CHAR *rbuf, const A_CHAR *wbuf, size_t length)\n+ {\n+     int ret = 0;\n+     struct file *filp = (struct file *)-ENOENT;\n+     mm_segment_t oldfs;\n+     oldfs = get_fs();\n+     set_fs(KERNEL_DS);\n+ \n+ //    printk(\"%s: filename %s \\n\",__func__,filename);\n+     do {\n+         int mode = (wbuf) ? O_RDWR : O_RDONLY;\n+         filp = filp_open(filename, mode, S_IRUSR);\n+         if (IS_ERR(filp) || !filp->f_op) {\n+             printk(\"%s: file %s filp_open error\\n\", __FUNCTION__, filename);\n+             ret = -ENOENT;\n+             break;\n+         }\n+ \n+         if (length==0) {\n+             /* Read the length of the file only */\n+             struct inode    *inode;\n+ \n+             inode = GET_INODE_FROM_FILEP(filp);\n+             if (!inode) {\n+  //               printk(\"%s: Get inode from %s failed\\n\", __FUNCTION__, filen    ame);\n+                 ret = -ENOENT;\n+                 break;\n+             }\n+             ret = i_size_read(inode->i_mapping->host);\n+             break;\n+         }\n+ \n+         if (wbuf) {\n+            if ( (ret=filp->f_op->write(filp, wbuf, length, &filp->f_pos)) < 0) {\n+//                 printk(\"%s: Write %u bytes to file %s error %d\\n\", __FUNCTION__,\n+ //                                length, filename, ret);\n+                 break;\n+             }\n+         } else {\n+             if ( (ret=filp->f_op->read(filp, rbuf, length, &filp->f_pos)) < 0) {\n+//                 printk (\"%s: Read %u bytes from file %s error %d\\n\", __FUNCTION__,\n+ //                                length, filename, ret);\n+                 break;\n+             }\n+         }\n+     } while (0);\n+ \n+     if (!IS_ERR(filp)) {\n+         filp_close(filp, NULL);\n+     }\n+     set_fs(oldfs);\n+ \n+     return ret;\n+ }\n+ \n+ \n+ int android_request_firmware(const struct firmware **firmware_p, const char *name,struct device *device)\n+ {\n+     int ret = 0;\n+     struct firmware *firmware;\n+     char filename[256];\n+     const char *raw_filename = name;\n+     *firmware_p = firmware = A_MALLOC(sizeof(*firmware));\n+     if (!firmware)\n+         return -ENOMEM;\n+     A_MEMZERO(firmware, sizeof(*firmware));\n+     do {\n+         size_t length, bufsize, bmisize;\n+ \n+         if (snprintf(filename, sizeof(filename), \"%s/%s\", qcafwpath,\n+                                 raw_filename) >= sizeof(filename)) {\n+             printk(\"snprintf: %s/%s\\n\", qcafwpath, raw_filename);\n+             ret = -1;\n+             break;\n+         }\n+         if ( (ret=android_readwrite_file(filename, NULL, NULL, 0)) < 0) {\n+             break;\n+         } else {\n+             length = ret;\n+         }\n+ \n+         if (strcmp(raw_filename, \"softmac\") == 0) {\n+             bufsize = length = 17;\n+         } else {\n+             bufsize = ALIGN(length, PAGE_SIZE);\n+             bmisize = A_ROUND_UP(length, 4);\n+             bufsize = max(bmisize, bufsize);\n+         }\n+         firmware->data = vmalloc(bufsize);\n+         firmware->size = length;\n+ \n+   //    printk(\"AR6K: %s(): raw_filename=%s, bufsize=%d\\n\", __FUNCTION__, ra    w_filename, bufsize);\n+ \n+         if (!firmware->data) {\n+             printk(\"%s: Cannot allocate buffer for firmware\\n\", __FUNCTION__);\n+             ret = -ENOMEM;\n+             break;\n+         }\n+ \n+         if ( (ret=android_readwrite_file(filename, (char*)firmware->data, NULL, length)) != length) {\n+//             printk(\"%s: file read error, ret %d request %d\\n\", __FUNCTION__,ret,length);\n+//             ret = -1;\n+             break;\n+         }\n+ \n+     } while (0);\n+ \n+     if (ret<0) {\n+         if (firmware) {\n+         if (firmware->data)\n+                 vfree(firmware->data);\n+             A_FREE(firmware);\n+         }\n+         *firmware_p = NULL;\n+     } else {\n+         ret = 0;\n+     }\n+     return ret;\n+ }\n+ \n+ void android_release_firmware(const struct firmware *firmware)\n+ {\n+     if (firmware) {\n+         if (firmware->data)\n+             vfree(firmware->data);\n+         kfree(firmware);\n+     }\n+ }\n+extern int qca_request_firmware(const struct firmware **firmware_p,const char *name,struct device *device)\n+ {\n+   //      int uevent = 1;\n+ \n+         //return _request_firmware(firmware_p, name, device, uevent, false);\n+ \n+         return android_request_firmware(firmware_p, name,device);\n+ \n+ \n+ }\n struct android_wifi_reassoc_params {\n    unsigned char bssid[18];\n    int channel;\n@@ -7801,7 +7958,7 @@ VOS_STATUS hdd_get_cfg_file_size(v_VOID_t *pCtx, char *pFileName, v_SIZE_t *pBuf\n \n    ENTER();\n \n-   status = request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);\n+   status = qca_request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);\n \n    if(status || !pHddCtx->fw || !pHddCtx->fw->data) {\n       hddLog(VOS_TRACE_LEVEL_FATAL,\"%s: CFG download failed\",__func__);\n@@ -7842,7 +7999,7 @@ VOS_STATUS hdd_read_cfg_file(v_VOID_t *pCtx, char *pFileName,\n \n    ENTER();\n \n-   status = request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);\n+   status = qca_request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);\n \n    if(status || !pHddCtx->fw || !pHddCtx->fw->data) {\n       hddLog(VOS_TRACE_LEVEL_FATAL,\"%s: CFG download failed\",__func__);\n@@ -12886,15 +13043,34 @@ static int hdd_driver_init( void)\n   \\return - 0 for success, non zero for failure\n \n   --------------------------------------------------------------------------*/\n+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))\n+extern  int wifi_setup_dt(void);\n+extern  void wifi_teardown_dt(void);\n+#endif\n+extern  void extern_wifi_set_enable(int is_on);\n+extern  void sdio_reinit(void);\n+\n #ifdef MODULE\n static int __init hdd_module_init ( void)\n {\n+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))\n+    wifi_setup_dt();\n+#endif\n+        extern_wifi_set_enable(0);\n+        mdelay(200);\n+        extern_wifi_set_enable(1);\n+        mdelay(200);\n+sdio_reinit();\n+\n    return hdd_driver_init();\n }\n #else /* #ifdef MODULE */\n static int __init hdd_module_init ( void)\n {\n    /* Driver initialization is delayed to fwpath_changed_handler */\n+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))\n+wifi_teardown_dt();\n+#endif\n    return 0;\n }\n #endif /* #ifdef MODULE */\ndiff --git a/CORE/SERVICES/BMI/ol_fw.c b/CORE/SERVICES/BMI/ol_fw.c\nindex 466dbbc..95f1aee 100644\n--- a/CORE/SERVICES/BMI/ol_fw.c\n+++ b/CORE/SERVICES/BMI/ol_fw.c\n@@ -118,7 +118,7 @@ static int ol_get_fw_files_for_target(struct ol_fw_files *pfw_files,\n     return 0;\n }\n #endif\n-\n+extern int qca_request_firmware(const struct firmware **firmware_p, const char *name,struct device *device);\n #ifdef HIF_USB\n static A_STATUS ol_usb_extra_initialization(struct ol_softc *scn);\n #endif\n@@ -164,7 +164,7 @@ static int ol_transfer_single_bin_file(struct ol_softc *scn,\n \t\t\t\t__func__));\n \t}\n \n-\tif (request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)\n+\tif (qca_request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)\n \t{\n \t\tAR_DEBUG_PRINTF(ATH_DEBUG_ERR,\n \t\t\t\t(\"%s: Failed to get %s\\n\",\n@@ -492,7 +492,7 @@ static int ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file,\n \t\tbreak;\n \t}\n \n-\tif (request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)\n+\tif (qca_request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)\n \t{\n \t\tprintk(\"%s: Failed to get %s\\n\", __func__, filename);\n \n@@ -506,7 +506,7 @@ static int ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file,\n \t\t\tfilename = scn->fw_files.board_data;\n \t\t\tprintk(\"%s: Trying to load default %s\\n\",\n \t\t\t\t__func__, filename);\n-\t\t\tif (request_firmware(&fw_entry, filename,\n+\t\t\tif (qca_request_firmware(&fw_entry, filename,\n \t\t\t\tscn->sc_osdev->device) != 0) {\n \t\t\t\tprintk(\"%s: Failed to get %s\\n\",\n \t\t\t\t\t__func__, filename);\ndiff --git a/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c b/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c\nindex c99020e..6bafed8 100644\n--- a/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c\n+++ b/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c\n@@ -234,12 +234,6 @@ ath_hif_sdio_remove(void *context, void *hif_handle)\n {\n     ENTER();\n \n-    if (!sc) {\n-        VOS_TRACE(VOS_MODULE_ID_HIF, VOS_TRACE_LEVEL_ERROR,\n-                  \"Global SDIO context is NULL\");\n-        return A_ERROR;\n-    }\n-\n     athdiag_procfs_remove();\n \n #ifndef TARGET_DUMP_FOR_NON_QC_PLATFORM\ndiff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h b/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h\nindex 382e38c..234bc09 100644\n--- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h\n+++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h\n@@ -112,7 +112,7 @@ struct hif_device {\n     A_BOOL swap_mailbox;\n };\n \n-#define HIF_DMA_BUFFER_SIZE (4 * 1024)\n+#define HIF_DMA_BUFFER_SIZE (56 * 1024)\n #define CMD53_FIXED_ADDRESS 1\n #define CMD53_INCR_ADDRESS  2\n \ndiff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c\nindex 1c54002..03401fd 100644\n--- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c\n+++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c\n@@ -64,7 +64,8 @@\n                 ((request->request & HIF_WRITE)&& \\\n                 (request->address >= 0x1000 && request->address < 0x1FFFF))\n #endif\n-unsigned int mmcbusmode = 0;\n+//unsigned int mmcbusmode = 0;\n+unsigned int mmcbusmode = 5;\n module_param(mmcbusmode, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);\n MODULE_PARM_DESC(mmcbusmode, \"Set MMC driver Bus Mode: 1-SDR12, 2-SDR25, 3-SDR50, 4-DDR50, 5-SDR104\");\n EXPORT_SYMBOL(mmcbusmode);\n@@ -74,7 +75,9 @@ module_param(mmcbuswidth, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);\n MODULE_PARM_DESC(mmcbuswidth, \"Set MMC driver Bus Width: 1-1Bit, 4-4Bit, 8-8Bit\");\n EXPORT_SYMBOL(mmcbuswidth);\n \n-unsigned int mmcclock = 0;\n+//unsigned int mmcclock = 0;\n+//unsigned int mmcclock = 166666666;\n+unsigned int mmcclock = 200000000;\n module_param(mmcclock, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);\n MODULE_PARM_DESC(mmcclock, \"Set MMC driver Clock value\");\n EXPORT_SYMBOL(mmcclock);\n@@ -95,7 +98,7 @@ unsigned int asyncintdelay = 2;\n module_param(asyncintdelay, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);\n MODULE_PARM_DESC(asyncintdelay, \"Delay clock count for aysnc interrupt, 2 is default, vaild values are 1 and 2\");\n #else\n-unsigned int asyncintdelay = 0;\n+unsigned int asyncintdelay = 2;\n module_param(asyncintdelay, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);\n MODULE_PARM_DESC(asyncintdelay, \"Delay clock count for aysnc interrupt, 0 is default, vaild values are 1 and 2\");\n #endif\n@@ -412,12 +415,6 @@ __HIFReadWrite(HIF_DEVICE *device,\n                 tbuffer = device->dma_buffer;\n                     /* copy the write data to the dma buffer */\n                 AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE);\n-                if (length > HIF_DMA_BUFFER_SIZE) {\n-                    AR_DEBUG_PRINTF(ATH_DEBUG_ERROR,\n-                            (\"AR6000: Invalid write length: %d\\n\", length));\n-                    status = A_EINVAL;\n-                    break;\n-                }\n                 memcpy(tbuffer, buffer, length);\n                 bounced = TRUE;\n             } else {\n@@ -440,12 +437,6 @@ __HIFReadWrite(HIF_DEVICE *device,\n             if (BUFFER_NEEDS_BOUNCE(buffer)) {\n                 AR_DEBUG_ASSERT(device->dma_buffer != NULL);\n                 AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE);\n-                if (length > HIF_DMA_BUFFER_SIZE) {\n-                    AR_DEBUG_PRINTF(ATH_DEBUG_ERROR,\n-                            (\"AR6000: Invalid read length: %d\\n\", length));\n-                    status = A_EINVAL;\n-                    break;\n-                }\n                 tbuffer = device->dma_buffer;\n                 bounced = TRUE;\n             } else {\n@@ -695,7 +686,7 @@ static int async_task(void *param)\n     complete_and_exit(&device->async_completion, 0);\n     return 0;\n }\n-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32))\n+#if 1\n static A_INT32 IssueSDCommand(HIF_DEVICE *device, A_UINT32 opcode, A_UINT32 arg, A_UINT32 flags, A_UINT32 *resp)\n {\n     struct mmc_command cmd;\n@@ -719,6 +710,7 @@ static A_INT32 IssueSDCommand(HIF_DEVICE *device, A_UINT32 opcode, A_UINT32 arg,\n     return err;\n }\n #endif\n+//extern int sdio_reset_comm(struct mmc_card *card);\n A_STATUS ReinitSDIO(HIF_DEVICE *device)\n {\n     A_INT32 err = 0;\n@@ -733,10 +725,12 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)\n     host = card->host;\n \n     AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, (\"AR6000: +ReinitSDIO \\n\"));\n+\t\n+//\terr = sdio_reset_comm(card);\n+#if 1\n     sdio_claim_host(func);\n \n     do {\n-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32))\n         /* 2.6.32 kernel does part of the SDIO initalization upon resume */\n         A_BOOL lt_2_6_32 = (LINUX_VERSION_CODE<KERNEL_VERSION(2,6,32));\n         if (lt_2_6_32) {\n@@ -783,19 +777,10 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)\n                 break;\n             }\n \n-            if (!host->ocr) {\n-                /* Issue CMD5, arg = 0 */\n-                err = IssueSDCommand(device, SD_IO_SEND_OP_COND, 0, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);\n-                if (err) {\n-                    AR_DEBUG_PRINTF(ATH_DEBUG_ERR, (\"ReinitSDIO: CMD5 failed : %d \\n\",err));\n-                    break;\n-                }\n-                host->ocr = resp;\n-            }\n \n             /* Issue CMD5, arg = ocr. Wait till card is ready  */\n             for (i=0;i<100;i++) {\n-                err = IssueSDCommand(device, SD_IO_SEND_OP_COND, host->ocr, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);\n+                err = IssueSDCommand(device, SD_IO_SEND_OP_COND, 0, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);\n                 if (err) {\n                     AR_DEBUG_PRINTF(ATH_DEBUG_ERR, (\"ReinitSDIO: CMD5 failed : %d \\n\",err));\n                     break;\n@@ -828,7 +813,7 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)\n                 break;\n             }\n         }\n-#endif\n+\n         /* Enable high speed */\n         if (card->host->caps & MMC_CAP_SD_HIGHSPEED) {\n             AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, (\"ReinitSDIO: Set high speed mode\\n\"));\n@@ -891,7 +876,7 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)\n \n     sdio_release_host(func);\n     AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, (\"AR6000: -ReinitSDIO \\n\"));\n-\n+#endif\n     return (err) ? A_ERROR : A_OK;\n }\n \n@@ -1320,6 +1305,7 @@ static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id\n /*\n TODO: MMC SDIO3.0 Setting should also be modified in ReInit() function when Power Manage work.\n */\n+#if 1\n         {\n             A_UINT32 clock, clock_set = 12500000;\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)\n@@ -1576,7 +1562,7 @@ TODO: MMC SDIO3.0 Setting should also be modified in ReInit() function when Powe\n \n             sdio_release_host(func);\n         }\n-\n+#endif\n         spin_lock_init(&device->lock);\n \n         spin_lock_init(&device->asynclock);\n@@ -2068,12 +2054,10 @@ static int hifDeviceSuspend(struct device *dev)\n                     return -1;\n                 }\n             } else {\n-                if (wma_suspend_target(temp_module, 0)) {\n-                   AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, (\"PDEV Suspend Failed\\n\"));\n-                   return -1;\n-                }\n+                  if (wma_suspend_target(temp_module, 0)) {\n+                     printk(KERN_ERR \"wma_suspend_target failed.\\n\");\n+\t\t  }\n             }\n-\n             if (pm_flag & MMC_PM_WAKE_SDIO_IRQ){\n                 AR_DEBUG_PRINTF(ATH_DEBUG_INFO, (\"hifDeviceSuspend: wow enter\\n\"));\n                 config = HIF_DEVICE_POWER_DOWN;\n@@ -2293,9 +2277,7 @@ static HIF_DEVICE *\n addHifDevice(struct sdio_func *func)\n {\n     HIF_DEVICE *hifdevice = NULL;\n-#if(LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)) && !defined(WITH_BACKPORTS)\n     int ret = 0;\n-#endif\n     ENTER();\n     AR_DEBUG_ASSERT(func != NULL);\n     hifdevice = (HIF_DEVICE *)A_MALLOC(sizeof(HIF_DEVICE));\n@@ -2308,13 +2290,9 @@ addHifDevice(struct sdio_func *func)\n     hifdevice->func = func;\n     hifdevice->powerConfig = HIF_DEVICE_POWER_UP;\n     hifdevice->DeviceState = HIF_DEVICE_STATE_ON;\n-#if(LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)) && !defined(WITH_BACKPORTS)\n     ret = sdio_set_drvdata(func, hifdevice);\n+\n     EXIT(\"status %d\", ret);\n-#else\n-    sdio_set_drvdata(func, hifdevice);\n-    EXIT();\n-#endif\n     return hifdevice;\n }\n \n-- \n2.7.4\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/qca9377-aml/udev.d/99-qca9377-wireless.rules",
    "content": "ACTION==\"add|change\", SUBSYSTEM==\"net\", ENV{INTERFACE}==\"wlan*\", ATTRS{vendor}==\"0x0271\", RUN+=\"/usr/bin/systemctl restart connman.service\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/qca9377-firmware-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"qca9377-firmware-aml\"\nPKG_VERSION=\"1.0.0-3\"\nPKG_SHA256=\"9a9f214943e77e89ce8fc8c0dc5b41bc253478a9d92383a76590993df861f36d\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"BSD-3c\"\nPKG_SITE=\"http://linode.boundarydevices.com/repos/apt/ubuntu-relx/pool/main/q/qca-firmware/\"\nPKG_URL=\"$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"qca9377 Linux firmware\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_firmware_dir)\n    cp -a * $INSTALL/$(get_full_firmware_dir)\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/qca9377-firmware-aml/udev.d/80-qca-firmware-aml.rules",
    "content": "################################################################################\n# udev rules file for loading qca9377-firmware-aml\n################################################################################\n\nACTION==\"add\", SUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x0271\", ATTRS{device}==\"0x0701\", \\\n  TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"qca9377-firmware-aml.service\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/config/hosts.conf",
    "content": "# hosts.conf\n\n# This configuration file allows you to manually map hostnames to\n# IP addresses\n\n# Format:  <ipaddress> <hostname1> <hostname2>\n# Example: 192.168.0.3 libreelec libreelec.mynetwork\n\n# NOTE: do not edit /etc/hosts directly\n# edit /storage/.config/hosts.conf then reboot\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/config/hwdb.d/README",
    "content": "Hardware Database Files\n\nThe hwdb files are read from the files located in the system hwdb directory\n/usr/lib/udev/hwdb.d and the user runtime directory /storage/.config/hwdb.d\nAll hwdb files are collectively sorted and processed in lexical order, regardless of\nthe directories in which they live. However, files with identical filenames\nreplace each other. /usr/lib/udev/hwdb.d/* takes precedence over /storage/.config/hwdb.d/*\n\nyour files must be named 99-xxxxx.hwdb\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/config/logind.conf.d/README",
    "content": "LOGIND.CONF(5)                    logind.conf                   LOGIND.CONF(5)\n\nNAME\n       logind.conf, logind.conf.d - Login manager configuration files\n\nSYNOPSIS\n       /etc/systemd/logind.conf\n\n       /etc/systemd/logind.conf.d/*.conf\n\n       /run/systemd/logind.conf.d/*.conf\n\n       /usr/lib/systemd/logind.conf.d/*.conf\n\nDESCRIPTION\n       These files configure various parameters of the systemd login manager,\n       systemd-logind.service(8).\n\nCONFIGURATION DIRECTORIES AND PRECEDENCE\n       The default configuration is defined during compilation, so a\n       configuration file is only needed when it is necessary to deviate from\n       those defaults. By default, the configuration file in /etc/systemd/\n       contains commented out entries showing the defaults as a guide to the\n       administrator. This file can be edited to create local overrides.\n\n       When packages need to customize the configuration, they can install\n       configuration snippets in /usr/lib/systemd/*.conf.d/. Files in /etc/\n       are reserved for the local administrator, who may use this logic to\n       override the configuration files installed by vendor packages. The main\n       configuration file is read before any of the configuration directories,\n       and has the lowest precedence; entries in a file in any configuration\n       directory override entries in the single configuration file. Files in\n       the *.conf.d/ configuration subdirectories are sorted by their filename\n       in lexicographic order, regardless of which of the subdirectories they\n       reside in. When multiple files specify the same option, for options\n       which accept just a single value, the entry in the file with the\n       lexicographically latest name takes precedence. For options which\n       accept a list of values, entries are collected as they occur in files\n       sorted lexicographically. It is recommended to prefix all filenames in\n       those subdirectories with a two-digit number and a dash, to simplify\n       the ordering of the files.\n\n       To disable a configuration file supplied by the vendor, the recommended\n       way is to place a symlink to /dev/null in the configuration directory\n       in /etc/, with the same filename as the vendor configuration file.\n\nOPTIONS\n       All options are configured in the \"[Login]\" section:\n\n       NAutoVTs=\n           Takes a positive integer. Configures how many virtual terminals\n           (VTs) to allocate by default that, when switched to and are\n           previously unused, \"autovt\" services are automatically spawned on.\n           These services are instantiated from the template unit\n           autovt@.service for the respective VT TTY name, for example,\n           autovt@tty4.service. By default, autovt@.service is linked to\n           getty@.service. In other words, login prompts are started\n           dynamically as the user switches to unused virtual terminals.\n           Hence, this parameter controls how many login \"gettys\" are\n           available on the VTs. If a VT is already used by some other\n           subsystem (for example, a graphical login), this kind of activation\n           will not be attempted. Note that the VT configured in ReserveVT= is\n           always subject to this kind of activation, even if it is not one of\n           the VTs configured with the NAutoVTs= directive. Defaults to 6.\n           When set to 0, automatic spawning of \"autovt\" services is disabled.\n\n       ReserveVT=\n           Takes a positive integer. Identifies one virtual terminal that\n           shall unconditionally be reserved for autovt@.service activation\n           (see above). The VT selected with this option will be marked busy\n           unconditionally, so that no other subsystem will allocate it. This\n           functionality is useful to ensure that, regardless of how many VTs\n           are allocated by other subsystems, one login \"getty\" is always\n           available. Defaults to 6 (in other words, there will always be a\n           \"getty\" available on Alt-F6.). When set to 0, VT reservation is\n           disabled.\n\n       KillUserProcesses=\n           Takes a boolean argument. Configures whether the processes of a\n           user should be killed when the user logs out. If true, the scope\n           unit corresponding to the session and all processes inside that\n           scope will be terminated. If false, the scope is \"abandoned\", see\n           systemd.scope(5), and processes are not killed. Defaults to \"yes\",\n           but see the options KillOnlyUsers= and KillExcludeUsers= below.\n\n           In addition to session processes, user process may run under the\n           user manager unit user@.service. Depending on the linger settings,\n           this may allow users to run processes independent of their login\n           sessions. See the description of enable-linger in loginctl(1).\n\n           Note that setting KillUserProcesses=yes will break tools like\n           screen(1) and tmux(1), unless they are moved out of the session\n           scope. See example in systemd-run(1).\n\n       KillOnlyUsers=, KillExcludeUsers=\n           These settings take space-separated lists of usernames that\n           override the KillUserProcesses= setting. A user name may be added\n           to KillExcludeUsers= to exclude the processes in the session scopes\n           of that user from being killed even if KillUserProcesses=yes is\n           set. If KillExcludeUsers= is not set, the \"root\" user is excluded\n           by default.  KillExcludeUsers= may be set to an empty value to\n           override this default. If a user is not excluded, KillOnlyUsers= is\n           checked next. If this setting is specified, only the session scopes\n           of those users will be killed. Otherwise, users are subject to the\n           KillUserProcesses=yes setting.\n\n       IdleAction=\n           Configures the action to take when the system is idle. Takes one of\n           \"ignore\", \"poweroff\", \"reboot\", \"halt\", \"kexec\", \"suspend\",\n           \"hibernate\", \"hybrid-sleep\", and \"lock\". Defaults to \"ignore\".\n\n           Note that this requires that user sessions correctly report the\n           idle status to the system. The system will execute the action after\n           all sessions report that they are idle, no idle inhibitor lock is\n           active, and subsequently, the time configured with IdleActionSec=\n           (see below) has expired.\n\n       IdleActionSec=\n           Configures the delay after which the action configured in\n           IdleAction= (see above) is taken after the system is idle.\n\n       InhibitDelayMaxSec=\n           Specifies the maximum time a system shutdown or sleep request is\n           delayed due to an inhibitor lock of type \"delay\" being active\n           before the inhibitor is ignored and the operation executes anyway.\n           Defaults to 5.\n\n       HandlePowerKey=, HandleSuspendKey=, HandleHibernateKey=,\n       HandleLidSwitch=, HandleLidSwitchExternalPower=, HandleLidSwitchDocked=\n           Controls how logind shall handle the system power and sleep keys\n           and the lid switch to trigger actions such as system power-off or\n           suspend. Can be one of \"ignore\", \"poweroff\", \"reboot\", \"halt\",\n           \"kexec\", \"suspend\", \"hibernate\", \"hybrid-sleep\", and \"lock\". If\n           \"ignore\", logind will never handle these keys. If \"lock\", all\n           running sessions will be screen-locked; otherwise, the specified\n           action will be taken in the respective event. Only input devices\n           with the \"power-switch\" udev tag will be watched for key/lid switch\n           events.  HandlePowerKey= defaults to \"poweroff\".  HandleSuspendKey=\n           and HandleLidSwitch= default to \"suspend\".\n           HandleLidSwitchExternalPower= is completely ignored by default (for\n           backwards compatibility) — an explicit value must be set before it\n           will be used to determine behaviour.  HandleLidSwitchDocked=\n           defaults to \"ignore\".  HandleHibernateKey= defaults to \"hibernate\".\n           If the system is inserted in a docking station, or if more than one\n           display is connected, the action specified by\n           HandleLidSwitchDocked= occurs; if the system is on external power\n           the action (if any) specified by HandleLidSwitchExternalPower=\n           occurs; otherwise the HandleLidSwitch= action occurs.\n\n           A different application may disable logind's handling of system\n           power and sleep keys and the lid switch by taking a low-level\n           inhibitor lock (\"handle-power-key\", \"handle-suspend-key\",\n           \"handle-hibernate-key\", \"handle-lid-switch\"). This is most commonly\n           used by graphical desktop environments to take over suspend and\n           hibernation handling, and to use their own configuration\n           mechanisms. If a low-level inhibitor lock is taken, logind will not\n           take any action when that key or switch is triggered and the\n           Handle*= settings are irrelevant.\n\n       PowerKeyIgnoreInhibited=, SuspendKeyIgnoreInhibited=,\n       HibernateKeyIgnoreInhibited=, LidSwitchIgnoreInhibited=\n           Controls whether actions that systemd-logind takes when the power\n           and sleep keys and the lid switch are triggered are subject to\n           high-level inhibitor locks (\"shutdown\", \"sleep\", \"idle\"). Low level\n           inhibitor locks (\"handle-power-key\", \"handle-suspend-key\",\n           \"handle-hibernate-key\", \"handle-lid-switch\"), are always honored,\n           irrespective of this setting.\n\n           These settings take boolean arguments. If \"no\", the inhibitor locks\n           taken by applications are respected. If \"yes\", \"shutdown\", \"sleep\",\n           and \"idle\" inhibitor locks are ignored.  PowerKeyIgnoreInhibited=,\n           SuspendKeyIgnoreInhibited=, and HibernateKeyIgnoreInhibited=\n           default to \"no\".  LidSwitchIgnoreInhibited= defaults to \"yes\". This\n           means that when systemd-logind is handling events by itself (no low\n           level inhibitor locks are taken by another application), the lid\n           switch does not respect suspend blockers by default, but the power\n           and sleep keys do.\n\n       HoldoffTimeoutSec=\n           Specifies the timeout after system startup or system resume in\n           which systemd will hold off on reacting to lid events. This is\n           required for the system to properly detect any hotplugged devices\n           so systemd can ignore lid events if external monitors, or docks,\n           are connected. If set to 0, systemd will always react immediately,\n           possibly before the kernel fully probed all hotplugged devices.\n           This is safe, as long as you do not care for systemd to account for\n           devices that have been plugged or unplugged while the system was\n           off. Defaults to 30s.\n\n       RuntimeDirectorySize=\n           Sets the size limit on the $XDG_RUNTIME_DIR runtime directory for\n           each user who logs in. Takes a size in bytes, optionally suffixed\n           with the usual K, G, M, and T suffixes, to the base 1024 (IEC).\n           Alternatively, a numerical percentage suffixed by \"%\" may be\n           specified, which sets the size limit relative to the amount of\n           physical RAM. Defaults to 10%. Note that this size is a safety\n           limit only. As each runtime directory is a tmpfs file system, it\n           will only consume as much memory as is needed.\n\n       InhibitorsMax=\n           Controls the maximum number of concurrent inhibitors to permit.\n           Defaults to 8192 (8K).\n\n       SessionsMax=\n           Controls the maximum number of concurrent user sessions to manage.\n           Defaults to 8192 (8K). Depending on how the pam_systemd.so module\n           is included in the PAM stack configuration, further login sessions\n           will either be refused, or permitted but not tracked by\n           systemd-logind.\n\n       UserTasksMax=\n           Sets the maximum number of OS tasks each user may run concurrently.\n           This controls the TasksMax= setting of the per-user slice unit, see\n           systemd.resource-control(5) for details. If assigned the special\n           value \"infinity\", no tasks limit is applied. Defaults to 33%, which\n           equals 10813 with the kernel's defaults on the host, but might be\n           smaller in OS containers.\n\n       RemoveIPC=\n           Controls whether System V and POSIX IPC objects belonging to the\n           user shall be removed when the user fully logs out. Takes a boolean\n           argument. If enabled, the user may not consume IPC resources after\n           the last of the user's sessions terminated. This covers System V\n           semaphores, shared memory and message queues, as well as POSIX\n           shared memory and message queues. Note that IPC objects of the root\n           user and other system users are excluded from the effect of this\n           setting. Defaults to \"yes\".\n\nSEE ALSO\n       systemd(1), systemd-logind.service(8), loginctl(1), systemd-\n       system.conf(5)\n\nsystemd 238                                                     LOGIND.CONF(5)\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/config/modules-load.d/README",
    "content": "Name\n\nmodules-load.d — Configure kernel modules to load at boot\n\nSynopsis\n\n/etc/modules-load.d/*.conf\n\n/run/modules-load.d/*.conf\n\n/usr/lib/modules-load.d/*.conf\n\nDescription\n\nsystemd-modules-load.service(8) reads files from the above directories which contain kernel modules to load during boot in a static list. Each configuration file is named in the style of /etc/modules-load.d/program.conf. Note that it is usually a better idea to rely on the automatic module loading by PCI IDs, USB IDs, DMI IDs or similar triggers encoded in the kernel modules themselves instead of static configuration like this. In fact, most modern kernel modules are prepared for automatic loading already.\nConfiguration Format\n\nThe configuration files should simply contain a list of kernel module names to load, separated by newlines. Empty lines and lines whose first non-whitespace character is # or ; are ignored.\n\nEach configuration file shall be named in the style of program.conf. Files in /etc/ override files with the same name in /usr/lib/ and /run/. Files in /run/ override files with the same name in /usr/lib/. Packages should install their configuration files in /usr/lib/, files in /etc/ are reserved for the local administrator, who may use this logic to override the configuration files installed from vendor packages.\n\nIf the administrator wants to disable a configuration file supplied by the vendor the recommended way is to place a symlink to /dev/null in /etc/modules-load.d/ bearing the same filename.\nExample\n\nExample 1. /etc/modules-load.d/virtio-net.conf example:\n\n# Load virtio-net.ko at boot\nvirtio-net\n\n\nSee Also\n\nsystemd(1), systemd-modules-load.service(8), systemd-delta(1), modprobe(8) \n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/config/sleep.conf.d/README",
    "content": "NAME\n       systemd-sleep.conf, sleep.conf.d - Suspend and hibernation configuration file\n\nSYNOPSIS\n       /etc/systemd/sleep.conf\n\n       /etc/systemd/sleep.conf.d/*.conf\n\n       /run/systemd/sleep.conf.d/*.conf\n\n       /usr/lib/systemd/sleep.conf.d/*.conf\n\nDESCRIPTION\n       systemd supports three general power-saving modes:\n\n       suspend\n           a low-power state where execution of the OS is paused, and complete power loss might result in lost data, and which is fast to enter and exit. This corresponds to suspend, standby, or freeze states as understood by the\n           kernel.\n\n       hibernate\n           a low-power state where execution of the OS is paused, and complete power loss does not result in lost data, and which might be slow to enter and exit. This corresponds to the hibernation as understood by the kernel.\n\n       hybrid-sleep\n           a low-power state where execution of the OS is paused, which might be slow to enter, and on complete power loss does not result in lost data but might be slower to exit in that case. This mode is called suspend-to-both\n           by the kernel.\n\n       Settings in these files determine what strings will be written to /sys/power/disk and /sys/power/state by systemd-sleep(8) when systemd(1) attempts to suspend or hibernate the machine.\n\nCONFIGURATION DIRECTORIES AND PRECEDENCE\n       The default configuration is defined during compilation, so a configuration file is only needed when it is necessary to deviate from those defaults. By default, the configuration file in /etc/systemd/ contains commented out\n       entries showing the defaults as a guide to the administrator. This file can be edited to create local overrides.\n\n       When packages need to customize the configuration, they can install configuration snippets in /usr/lib/systemd/*.conf.d/. Files in /etc/ are reserved for the local administrator, who may use this logic to override the\n       configuration files installed by vendor packages. The main configuration file is read before any of the configuration directories, and has the lowest precedence; entries in a file in any configuration directory override\n       entries in the single configuration file. Files in the *.conf.d/ configuration subdirectories are sorted by their filename in lexicographic order, regardless of which of the subdirectories they reside in. If multiple files\n       specify the same option, the entry in the file with the lexicographically latest name takes precedence. It is recommended to prefix all filenames in those subdirectories with a two-digit number and a dash, to simplify the\n       ordering of the files.\n\n       To disable a configuration file supplied by the vendor, the recommended way is to place a symlink to /dev/null in the configuration directory in /etc/, with the same filename as the vendor configuration file.\n\nOPTIONS\n       The following options can be configured in the \"[Sleep]\" section of /etc/systemd/sleep.conf or a sleep.conf.d file:\n\n       SuspendMode=, HibernateMode=, HybridSleepMode=\n           The string to be written to /sys/power/disk by, respectively, systemd-suspend.service(8), systemd-hibernate.service(8), or systemd-hybrid-sleep.service(8). More than one value can be specified by separating multiple\n           values with whitespace. They will be tried in turn, until one is written without error. If neither succeeds, the operation will be aborted.\n\n       SuspendState=, HibernateState=, HybridSleepState=\n           The string to be written to /sys/power/state by, respectively, systemd-suspend.service(8), systemd-hibernate.service(8), or systemd-hybrid-sleep.service(8). More than one value can be specified by separating multiple\n           values with whitespace. They will be tried in turn, until one is written without error. If neither succeeds, the operation will be aborted.\n\nEXAMPLE: FREEZE\n       Example: to exploit the “freeze” mode added in Linux 3.9, one can use systemctl suspend with\n\n           [Sleep]\n           SuspendState=freeze\n\nSEE ALSO\n       systemd-sleep(8), systemd-suspend.service(8), systemd-hibernate.service(8), systemd-hybrid-sleep.service(8), systemd(1), systemd.directives(7)\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/config/sleep.conf.d/sleep.conf.sample",
    "content": "[Sleep]\nSuspendMode=false\nHibernateMode=false\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/config/sysctl.d/README",
    "content": "Name\n\nsysctl.d — Configure kernel parameters at boot\n\nSynopsis\n\n/etc/sysctl.d/*.conf\n\n/run/sysctl.d/*.conf\n\n/usr/lib/sysctl.d/*.conf\n\nDescription\n\nAt boot, systemd-sysctl.service(8) reads configuration files from the above directories to configure sysctl(8) kernel parameters.\nConfiguration Format\n\nThe configuration files contain a list of variable assignments, separated by newlines. Empty lines and lines whose first non-whitespace character is # or ; are ignored.\n\nNote that both / and . are accepted as label separators within sysctl variable names. \"kernel.domainname=foo\" and \"kernel/domainname=foo\" hence are entirely equivalent.\n\nEach configuration file shall be named in the style of program.conf. Files in /etc/ override files with the same name in /usr/lib/ and /run/. Files in /run/ override files with the same name in /usr/lib/. Packages should install their configuration files in /usr/lib/. Files in /etc/ are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages. All configuration files are sorted by their filename in alphabetical order, regardless in which of the directories they reside, to guarantee that a specific configuration file takes precedence over another file with an alphabetically later name, if both files contain the same variable setting.\n\nIf the administrator wants to disable a configuration file supplied by the vendor, the recommended way is to place a symlink to /dev/null in /etc/sysctl.d/ bearing the same filename.\nExample\n\nExample 1. /etc/sysctl.d/domain-name.conf example:\n\n# Set kernel YP domain name\nkernel.domainname=example.com\n\n\nSee Also\n\nsystemd(1), systemd-sysctl.service(8), systemd-delta(1), sysctl(8), sysctl.conf(5) \n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/config/sysctl.d/qdisc.conf.sample",
    "content": "# This is a sample service script to switch to BBR TCP congestion control.\n# Please read carefully the comments in this file. For production usage\n# you can remove all comments (lines beginning with \"#\") from this file.\n\n# Switch to Fair Queue packet scheduler and BBR TCP congestion control\nnet.core.default_qdisc = fq\nnet.ipv4.tcp_congestion_control = bbr\n\n# Important:\n# This file must be renamed to qdisc.conf to overlap existing /usr/lib/sysctl.d/qdisc.conf\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/config/system.d/README",
    "content": "Name\n\nsystemd.unit — Unit configuration\n\nSynopsis\n\nservice.service, socket.socket, device.device, mount.mount, automount.automount, swap.swap, target.target, path.path, timer.timer, snapshot.snapshot, slice.slice, scope.scope\n\n/etc/systemd/system/*\n/run/systemd/system/*\n/usr/lib/systemd/system/*\n...\n                \n\n$HOME/.config/systemd/user/*\n/etc/systemd/user/*\n/run/systemd/user/*\n/usr/lib/systemd/user/*\n...\n                \nDescription\n\nA unit configuration file encodes information about a service, a socket, a device, a mount point, an automount point, a swap file or partition, a start-up target, a watched file system path, a timer controlled and supervised by systemd(1), a temporary system state snapshot, a resource management slice or a group of externally created processes. The syntax is inspired by XDG Desktop Entry Specification .desktop files, which are in turn inspired by Microsoft Windows .ini files.\n\nThis man page lists the common configuration options of all the unit types. These options need to be configured in the [Unit] or [Install] sections of the unit files.\n\nIn addition to the generic [Unit] and [Install] sections described here, each unit may have a type-specific section, e.g. [Service] for a service unit. See the respective man pages for more information: systemd.service(5), systemd.socket(5), systemd.device(5), systemd.mount(5), systemd.automount(5), systemd.swap(5), systemd.target(5), systemd.path(5), systemd.timer(5), systemd.snapshot(5). systemd.slice(5). systemd.scope(5).\n\nUnit files are loaded from a set of paths determined during compilation, described in the next section.\n\nUnit files may contain additional options on top of those listed here. If systemd encounters an unknown option it will write a warning log message but continue loading the unit. If an option is prefixed with X- it is ignored completely by systemd. Applications may use this to include additional information in the unit files.\n\nBoolean arguments used in unit files can be written in various formats. For positive settings the strings 1, yes, true and on are equivalent. For negative settings the strings 0, no, false and off are equivalent.\n\nTime span values encoded in unit files can be written in various formats. A stand-alone number specifies a time in seconds. If suffixed with a time unit, the unit is honored. A concatenation of multiple values with units is supported, in which case the values are added up. Example: \"50\" refers to 50 seconds; \"2min 200ms\" refers to 2 minutes plus 200 milliseconds, i.e. 120200ms. The following time units are understood: s, min, h, d, w, ms, us. For details see systemd.time(7).\n\nEmpty lines and lines starting with # or ; are ignored. This may be used for commenting. Lines ending in a backslash are concatenated with the following line while reading and the backslash is replaced by a space character. This may be used to wrap long lines.\n\nAlong with a unit file foo.service the directory foo.service.wants/ may exist. All unit files symlinked from such a directory are implicitly added as dependencies of type Wanted= to the unit. This is useful to hook units into the start-up of other units, without having to modify their unit files. For details about the semantics of Wanted= see below. The preferred way to create symlinks in the .wants/ directory of a unit file is with the enable command of the systemctl(1) tool which reads information from the [Install] section of unit files (see below). A similar functionality exists for Requires= type dependencies as well, the directory suffix is .requires/ in this case.\n\nAlong with a unit file foo.service a directory foo.service.d/ may exist. All files with the suffix \".conf\" from this directory will be parsed after the file itself is parsed. This is useful to alter or add configuration settings to a unit, without having to modify their unit files. Make sure that the file that is included has the appropriate section headers before any directive.\n\nIf a line starts with .include followed by a filename, the specified file will be parsed at this point. Make sure that the file that is included has the appropriate section headers before any directives.\n\nNote that while systemd offers a flexible dependency system between units it is recommended to use this functionality only sparingly and instead rely on techniques such as bus-based or socket-based activation which make dependencies implicit, resulting in a both simpler and more flexible system.\n\nSome unit names reflect paths existing in the file system namespace. Example: a device unit dev-sda.device refers to a device with the device node /dev/sda in the file system namespace. If this applies a special way to escape the path name is used, so that the result is usable as part of a filename. Basically, given a path, \"/\" is replaced by \"-\", and all unprintable characters and the \"-\" are replaced by C-style \"\\x20\" escapes. The root directory \"/\" is encoded as single dash, while otherwise the initial and ending \"/\" is removed from all paths during transformation. This escaping is reversible.\n\nOptionally, units may be instantiated from a template file at runtime. This allows creation of multiple units from a single configuration file. If systemd looks for a unit configuration file it will first search for the literal unit name in the filesystem. If that yields no success and the unit name contains an \"@\" character, systemd will look for a unit template that shares the same name but with the instance string (i.e. the part between the \"@\" character and the suffix) removed. Example: if a service getty@tty3.service is requested and no file by that name is found, systemd will look for getty@.service and instantiate a service from that configuration file if it is found.\n\nTo refer to the instance string from within the configuration file you may use the special \"%i\" specifier in many of the configuration options. See below for details.\n\nIf a unit file is empty (i.e. has the file size 0) or is symlinked to /dev/null its configuration will not be loaded and it appears with a load state of \"masked\", and cannot be activated. Use this as an effective way to fully disable a unit, making it impossible to start it even manually.\n\nThe unit file format is covered by the Interface Stability Promise.\nUnit Load Path\n\nUnit files are loaded from a set of paths determined during compilation, described in the two tables below. Unit files found in directories listed earlier override files with the same name in directories lower in the list.\n\nWhen systemd is running in user mode (--user) and the variable $SYSTEMD_UNIT_PATH is set, this contents of this variable overrides the unit load path.\n\nTable 1.  Load path when running in system mode (--system).\nPath\t\t\t\tDescription\n/etc/systemd/system\t\tLocal configuration\n/run/systemd/systemd\t\tRuntime units\n/usr/lib/systemd/system\t\tUnits of installed packages\n\nTable 2.  Load path when running in user mode (--user).\nPath\t\t\t\tDescription\n$HOME/.config/systemd/user\tUser configuration\n/etc/systemd/user\t\tLocal configuration\n/run/systemd/user\t\tRuntime units\n/usr/lib/systemd/user\t\tUnits of installed packages\n\nAdditional units might be loaded into systemd (\"linked\") from directories not on the unit load path. See the link command for systemctl(1). Also, some units are dynamically created via generators Generators.\nOptions\n\nUnit file may include a [Unit] section, which carries generic information about the unit that is not dependent on the type of unit:\n\nDescription=\n    A free-form string describing the unit. This is intended for use in UIs to show descriptive information along with the unit name.\n\nDocumentation=\n    A space-separated list of URIs referencing documentation for this unit or its configuration. Accepted are only URIs of the types \"http://\", \"https://\", \"file:\", \"info:\", \"man:\". For more information about the syntax of these URIs, see uri(7). The URIs should be listed in order of relevance, starting with the most relevant. It is a good idea to first reference documentation that explains what the unit's purpose is, followed by how it is configured, followed by any other related documentation. This option may be specified more than once in which case the specified list of URIs is merged. If the empty string is assigned to this option, the list is reset and all prior assignments will have no effect.\nRequires=\n\n    Configures requirement dependencies on other units. If this unit gets activated, the units listed here will be activated as well. If one of the other units gets deactivated or its activation fails, this unit will be deactivated. This option may be specified more than once, in which case requirement dependencies for all listed names are created. Note that requirement dependencies do not influence the order in which services are started or stopped. This has to be configured independently with the After= or Before= options. If a unit foo.service requires a unit bar.service as configured with Requires= and no ordering is configured with After= or Before=, then both units will be started simultaneously and without any delay between them if foo.service is activated. Often it is a better choice to use Wants= instead of Requires= in order to achieve a system that is more robust when dealing with failing services.\n\n    Note that dependencies of this type may also be configured outside of the unit configuration file by adding a symlink to a .requires/ directory accompanying the unit file. For details see above.\n\nRequiresOverridable=\n    Similar to Requires=. Dependencies listed in RequiresOverridable= which cannot be fulfilled or fail to start are ignored if the startup was explicitly requested by the user. If the start-up was pulled in indirectly by some dependency or automatic start-up of units that is not requested by the user this dependency must be fulfilled and otherwise the transaction fails. Hence, this option may be used to configure dependencies that are normally honored unless the user explicitly starts up the unit, in which case whether they failed or not is irrelevant.\n\nRequisite=, RequisiteOverridable=\n    Similar to Requires= and RequiresOverridable=, respectively. However, if a unit listed here is not started already it will not be started and the transaction fails immediately.\n\nWants=\n    A weaker version of Requires=. A unit listed in this option will be started if the configuring unit is. However, if the listed unit fails to start up or cannot be added to the transaction this has no impact on the validity of the transaction as a whole. This is the recommended way to hook start-up of one unit to the start-up of another unit.\n\n    Note that dependencies of this type may also be configured outside of the unit configuration file by adding a symlink to a .wants/ directory accompanying the unit file. For details see above.\n\nBindsTo=\n    Configures requirement dependencies, very similar in style to Requires=, however in addition to this behavior it also declares that this unit is stopped when any of the units listed suddenly disappears. Units can suddenly, unexpectedly disappear if a service terminates on its own choice, a device is unplugged or a mount point unmounted without involvement of systemd.\n\nPartOf=\n    Configures dependencies similar to Requires=, but limited to stopping and restarting of units. When systemd stops or restarts the units listed here, the action is propagated to this unit. Note that this is a one way dependency - changes to this unit do not affect the listed units. \n\nConflicts=\n    Configures negative requirement dependencies. If a unit has a Conflicts= setting on another unit, starting the former will stop the latter and vice versa. Note that this setting is independent of and orthogonal to the After= and Before= ordering dependencies.\n\n    If a unit A that conflicts with a unit B is scheduled to be started at the same time as B, the transaction will either fail (in case both are required part of the transaction) or be modified to be fixed (in case one or both jobs are not a required part of the transaction). In the latter case the job that is not the required will be removed, or in case both are not required the unit that conflicts will be started and the unit that is conflicted is stopped.\n\nBefore=, After=\n    Configures ordering dependencies between units. If a unit foo.service contains a setting Before=bar.service and both units are being started, bar.service's start-up is delayed until foo.service is started up. Note that this setting is independent of and orthogonal to the requirement dependencies as configured by Requires=. It is a common pattern to include a unit name in both the After= and Requires= option in which case the unit listed will be started before the unit that is configured with these options. This option may be specified more than once, in which case ordering dependencies for all listed names are created. After= is the inverse of Before=, i.e. while After= ensures that the configured unit is started after the listed unit finished starting up, Before= ensures the opposite, i.e. that the configured unit is fully started up before the listed unit is started. Note that when two units with an ordering dependency between them are shut down, the inverse of the start-up order is applied. i.e. if a unit is configured with After= on another unit, the former is stopped before the latter if both are shut down. If one unit with an ordering dependency on another unit is shut down while the latter is started up, the shut down is ordered before the start-up regardless whether the ordering dependency is actually of type After= or Before=. If two units have no ordering dependencies between them they are shut down or started up simultaneously, and no ordering takes place. \n\nOnFailure=\n    Lists one or more units that are activated when this unit enters the \"failed\" state.\n\nPropagatesReloadTo=, ReloadPropagatedFrom=\n    Lists one or more units where reload requests on the unit will be propagated to/on the other unit will be propagated from. Issuing a reload request on a unit will automatically also enqueue a reload request on all units that the reload request shall be propagated to via these two settings.\n\nRequiresMountsFor=\n    Takes a space-separated list of absolute paths. Automatically adds dependencies of type Requires= and After= for all mount units required to access the specified path.\n\nOnFailureIsolate=\n    Takes a boolean argument. If true the unit listed in OnFailure= will be enqueued in isolation mode, i.e. all units that are not its dependency will be stopped. If this is set only a single unit may be listed in OnFailure=. Defaults to false.\n\nIgnoreOnIsolate=\n    Takes a boolean argument. If true this unit will not be stopped when isolating another unit. Defaults to false.\n\nIgnoreOnSnapshot=\n    Takes a boolean argument. If true this unit will not be included in snapshots. Defaults to true for device and snapshot units, false for the others.\n\nStopWhenUnneeded=\n    Takes a boolean argument. If true this unit will be stopped when it is no longer used. Note that in order to minimize the work to be executed, systemd will not stop units by default unless they are conflicting with other units, or the user explicitly requested their shut down. If this option is set, a unit will be automatically cleaned up if no other active unit requires it. Defaults to false.\n\nRefuseManualStart=, RefuseManualStop=\n    Takes a boolean argument. If true this unit can only be activated or deactivated indirectly. In this case explicit start-up or termination requested by the user is denied, however if it is started or stopped as a dependency of another unit, start-up or termination will succeed. This is mostly a safety feature to ensure that the user does not accidentally activate units that are not intended to be activated explicitly, and not accidentally deactivate units that are not intended to be deactivated. These options default to false.\n\nAllowIsolate=\n    Takes a boolean argument. If true this unit may be used with the systemctl isolate command. Otherwise this will be refused. It probably is a good idea to leave this disabled except for target units that shall be used similar to runlevels in SysV init systems, just as a precaution to avoid unusable system states. This option defaults to false.\n\nDefaultDependencies=\n    Takes a boolean argument. If true (the default), a few default dependencies will implicitly be created for the unit. The actual dependencies created depend on the unit type. For example, for service units, these dependencies ensure that the service is started only after basic system initialization is completed and is properly terminated on system shutdown. See the respective man pages for details. Generally, only services involved with early boot or late shutdown should set this option to false. It is highly recommended to leave this option enabled for the majority of common units. If set to false, this option does not disable all implicit dependencies, just non-essential ones.\n\nJobTimeoutSec=\n    When clients are waiting for a job of this unit to complete, time out after the specified time. If this time limit is reached the job will be cancelled, the unit however will not change state or even enter the \"failed\" mode. This value defaults to 0 (job timeouts disabled), except for device units. NB: this timeout is independent from any unit-specific timeout (for example, the timeout set with Timeout= in service units) as the job timeout has no effect on the unit itself, only on the job that might be pending for it. Or in other words: unit-specific timeouts are useful to abort unit state changes, and revert them. The job timeout set with this option however is useful to abort only the job waiting for the unit state to change.\n\nConditionPathExists=, ConditionPathExistsGlob=, ConditionPathIsDirectory=, ConditionPathIsSymbolicLink=, ConditionPathIsMountPoint=, ConditionPathIsReadWrite=, ConditionDirectoryNotEmpty=, ConditionFileNotEmpty=, ConditionFileIsExecutable=, ConditionKernelCommandLine=, ConditionVirtualization=, ConditionSecurity=, ConditionCapability=, ConditionHost=, ConditionACPower=, ConditionNull=\n    Before starting a unit verify that the specified condition is true. If it is not true the starting of the unit will be skipped, however all ordering dependencies of it are still respected. A failing condition will not result in the unit being moved into a failure state. The condition is checked at the time the queued start job is to be executed.\n\n    With ConditionPathExists= a file existence condition is checked before a unit is started. If the specified absolute path name does not exist the condition will fail. If the absolute path name passed to ConditionPathExists= is prefixed with an exclamation mark (\"!\"), the test is negated, and the unit is only started if the path does not exist.\n\n    ConditionPathExistsGlob= is similar to ConditionPathExists=, but checks for the existence of at least one file or directory matching the specified globbing pattern.\n\n    ConditionPathIsDirectory= is similar to ConditionPathExists= but verifies whether a certain path exists and is a directory.\n\n    ConditionPathIsSymbolicLink= is similar to ConditionPathExists= but verifies whether a certain path exists and is a symbolic link.\n\n    ConditionPathIsMountPoint= is similar to ConditionPathExists= but verifies whether a certain path exists and is a mount point.\n\n    ConditionPathIsReadWrite= is similar to ConditionPathExists= but verifies whether the underlying file system is readable and writable (i.e. not mounted read-only).\n\n    ConditionDirectoryNotEmpty= is similar to ConditionPathExists= but verifies whether a certain path exists and is a non-empty directory.\n\n    ConditionFileNotEmpty= is similar to ConditionPathExists= but verifies whether a certain path exists and refers to a regular file with a non-zero size.\n\n    ConditionFileIsExecutable= is similar to ConditionPathExists= but verifies whether a certain path exists, is a regular file and marked executable.\n\n    Similar, ConditionKernelCommandLine= may be used to check whether a specific kernel command line option is set (or if prefixed with the exclamation mark unset). The argument must either be a single word, or an assignment (i.e. two words, separated \"=\"). In the former case the kernel command line is searched for the word appearing as is, or as left hand side of an assignment. In the latter case the exact assignment is looked for with right and left hand side matching.\n\n    ConditionVirtualization= may be used to check whether the system is executed in a virtualized environment and optionally test whether it is a specific implementation. Takes either boolean value to check if being executed in any virtualized environment, or one of vm and container to test against a generic type of virtualization solution, or one of qemu, kvm, vmware, microsoft, oracle, xen, bochs, chroot, uml, openvz, lxc, lxc-libvirt, systemd-nspawn to test against a specific implementation. If multiple virtualization technologies are nested only the innermost is considered. The test may be negated by prepending an exclamation mark.\n\n    ConditionSecurity= may be used to check whether the given security module is enabled on the system. Currently the recognized values values are selinux, apparmor, ima and smack. The test may be negated by prepending an exclamation mark.\n\n    ConditionCapability= may be used to check whether the given capability exists in the capability bounding set of the service manager (i.e. this does not check whether capability is actually available in the permitted or effective sets, see capabilities(7) for details). Pass a capability name such as \"CAP_MKNOD\", possibly prefixed with an exclamation mark to negate the check.\n\n    ConditionHost= may be used to match against the hostname or machine ID of the host. This either takes a hostname string (optionally with shell style globs) which is tested against the locally set hostname as returned by gethostname(2), or a machine ID formatted as string (see machine-id(5)). The test may be negated by prepending an exclamation mark.\n\n    ConditionACPower= may be used to check whether the system has AC power, or is exclusively battery powered at the time of activation of the unit. This takes a boolean argument. If set to true the condition will hold only if at least one AC connector of the system is connected to a power source, or if no AC connectors are known. Conversely, if set to false the condition will hold only if there is at least one AC connector known and all AC connectors are disconnected from a power source.\n\n    Finally, ConditionNull= may be used to add a constant condition check value to the unit. It takes a boolean argument. If set to false the condition will always fail, otherwise succeed.\n\n    If multiple conditions are specified the unit will be executed if all of them apply (i.e. a logical AND is applied). Condition checks can be prefixed with a pipe symbol (|) in which case a condition becomes a triggering condition. If at least one triggering condition is defined for a unit then the unit will be executed if at least one of the triggering conditions apply and all of the non-triggering conditions. If you prefix an argument with the pipe symbol and an exclamation mark the pipe symbol must be passed first, the exclamation second. Except for ConditionPathIsSymbolicLink=, all path checks follow symlinks. If any of these options is assigned the empty string the list of conditions is reset completely, all previous condition settings (of any kind) will have no effect.\n\nSourcePath=\n    A path to a configuration file this unit has been generated from. This is primarily useful for implementation of generator tools that convert configuration from an external configuration file format into native unit files. Thus functionality should not be used in normal units.\n\nUnit file may include a [Install] section, which carries installation information for the unit. This section is not interpreted by systemd(1) during runtime. It is used exclusively by the enable and disable commands of the systemctl(1) tool during installation of a unit:\n\nAlias=\n    Additional names this unit shall be installed under. The names listed here must have the same suffix (i.e. type) as the unit file name. This option may be specified more than once, in which case all listed names are used. At installation time, systemctl enable will create symlinks from these names to the unit filename.\n\nWantedBy=, RequiredBy=\n    A symbolic link is created in the .wants/ or .requires/ directory of the listed unit when this unit is activated by systemctl enable. This has the effect that a dependency of type Wants= or Requires= is added from the listed unit to the current unit. The primary result is that the current unit will be started when the listed unit is started. See the description of Wants= and Requires= in the [Unit] section for details.\n\n    WantedBy=foo.service in a service bar.service is mostly equivalent to Alias=foo.service.wants/bar.service in the same file. In case of template units, systemctl enable must be called with an instance name, and this instance will be added to the .wants/ or .requires/ list of the listed unit. E.g. WantedBy=getty.target in a service getty@.service will result in systemctl enable getty@tty2.service creating a getty.target.wants/getty@tty2.service link to getty@.service. \n\nAlso=\n    Additional units to install/deinstall when this unit is installed/deinstalled. If the user requests installation/deinstallation of a unit with this option configured, systemctl enable and systemctl disable will automatically install/uninstall units listed in this option as well.\n\nThe following specifiers are interpreted in the Install section: %n, %N, %p, %i, %U, %u, %m, %H, %b, %v. For their meaning see the next section.\nSpecifiers\n\nMany settings resolve specifiers which may be used to write generic unit files referring to runtime or unit parameters that are replaced when the unit files are loaded. The following specifiers are understood:\n\nTable 3. Specifiers available in unit files\nSpecifier\tMeaning\tDetails\n\"%n\"\t\tFull unit name\t \n\"%N\"\t\tUnescaped full unit name\t \n\"%p\"\t\tPrefix name\tFor instantiated units this refers to the string before the @. For non-instantiated units this refers to to the name of the unit with the type suffix removed.\n\"%P\"\t\tUnescaped prefix name\t \n\"%i\"\t\tInstance name\tFor instantiated units: this is the string between the \"@\" character and the suffix.\n\"%I\"\t\tUnescaped instance name\t \n\"%f\"\t\tUnescaped filename\tThis is either the unescaped instance name (if applicable) with / prepended (if applicable), or the prefix name similarly prepended with /.\n\"%c\"\t\tControl group path of the unit\t \n\"%r\"\t\tRoot control group path where units are placed.\tFor system instances this usually resolves to /system, except in containers, where the path might be prefixed with the container's root control group.\n\"%R\"\t\tParent directory of the control group path where units are placed.\tFor system instances this usually resolves to /, except in containers, where this resolves to the container's root directory. This specifier is particularly useful in the ControlGroup= setting (see systemd.exec(5)).\n\"%t\"\t\tRuntime socket dir\tThis is either /run (for the system manager) or \"$XDG_RUNTIME_DIR\" (for user managers).\n\"%u\"\t\tUser name\tThis is the name of the configured user of the unit, or (if none is set) the user running the systemd instance.\n\"%U\"\t\tUser UID\tThis is the UID of the configured user of the unit, or (if none is set) the user running the systemd instance.\n\"%h\"\t\tUser home directory\tThis is the home directory of the configured user of the unit, or (if none is set) the user running the systemd instance.\n\"%s\"\t\tUser shell\tThis is the shell of the configured user of the unit, or (if none is set) the user running the systemd instance. If the user is \"root\" (UID equal to 0), the shell configured in account database is ignored and /bin/sh is always used.\n\"%m\"\t\tMachine ID\tThe machine ID of the running system, formatted as string. See machine-id(5) for more information.\n\"%b\"\t\tBoot ID\tThe boot ID of the running system, formatted as string. See random(4) for more information.\n\"%H\"\t\tHost name\tThe hostname of the running system.\n\"%v\"\t\tKernel release\tIdentical to uname -r output.\n\"%%\"\t\tEscaped %\tSingle percent sign.\n\nSee Also\n\nsystemd(1), systemctl(8), systemd.special(7), systemd.service(5), systemd.socket(5), systemd.device(5), systemd.mount(5), systemd.automount(5), systemd.swap(5), systemd.target(5), systemd.path(5), systemd.timer(5), systemd.snapshot(5), systemd.scope(5), systemd.slice(5), systemd.time(7), capabilities(7), systemd.directives(7), uname(1) \n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/config/system.d/cifs.mount.sample",
    "content": "# This is a sample service script to mount CIFS/SAMBA shares.\n# Please read carefully the comments in this file. For production usage\n# you can remove all comments (lines beginning with \"#\") from this file.\n\n\n[Unit]\n# The description should be used to explain what this servicefile is for\nDescription=test cifs mount script\n\n# if we do network mounts like here we *require* 'network-online.service'\n# which checks if the network is online\nRequires=network-online.service\n\n# our scripts must start *after* 'network-online.service', on timeout and if\n# 'network-online.service' fails we can not mount and this scripts fails too\nAfter=network-online.service\n\n# usually we mount networks shares because we want they avaible *before* XBMC starts.\n# so XBMC has access to this mounts from beginning. Note: this slows down the boot!\nBefore=kodi.service\n\n\n[Mount]\n# The share we want mount\nWhat=//192.168.0.31/Music\n\n# Where we want mount this share\nWhere=/storage/music2\n\n# Any options you usually use with the \"-o\" parameter in the mount command\nOptions=username=myusername,password=mypassword\n\n# filesystem type\nType=cifs\n\n\n[Install]\n# The target is used by 'systemctl enable <name_of_this_file.mount>' to link\n# this service to a runlevel for starting on boot. usually 'multi-user.target'\n# is ok here.\nWantedBy=multi-user.target\n\n# Important:\n# this file must be renamed to <mountpoint>.mount where <mountpoint>, is the FULL path\n# where the share will be mounted but slashes \"/\" MUST BE REPLACED with dashes \"-\" with .mount\n# as extension.\n# This means, if we want mount to \"/storage/music2\" (see above \"Where=/storage/music2\")\n# then this file must be renamed to 'storage-music2.mount' and can be enabled via ssh with the\n# command 'systemctl enable storage-music2.mount'\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/config/system.d/nfs.mount.sample",
    "content": "# This is a sample service script to mount NFS shares.\n# Please read carefully the comments in this file. For production usage\n# you can remove all comments (lines beginning with \"#\") from this file.\n\n\n[Unit]\n# The description should be used to explain what this servicefile is for\nDescription=test nfs mount script\n\n# if we do network mounts like here we *require* 'network-online.service'\n# which checks if the network is online\nRequires=network-online.service\n\n# our scripts must start *after* 'network-online.service', on timeout and if\n# 'network-online.service' fails we can not mount and this scripts fails too\nAfter=network-online.service\n\n# usually we mount networks shares because we want they avaible *before* XBMC starts.\n# so XBMC has access to this mounts from beginning. Note: this slows down the boot!\nBefore=kodi.service\n\n\n[Mount]\n# The share we want mount\nWhat=192.168.0.31:/movies\n\n# Where we want mount this share\nWhere=/storage/movies2\n\n# Any options you usually use with the \"-o\" parameter in the mount command\nOptions=\n\n# filesystem type\nType=nfs\n\n\n[Install]\n# The target is used by 'systemctl enable <name_of_this_file.mount>' to link\n# this service to a runlevel for starting on boot. usually 'multi-user.target'\n# is ok here.\nWantedBy=multi-user.target\n\n# Important:\n# this file must be renamed to <mountpoint>.mount where <mountpoint>, is the FULL path\n# where the share will be mounted but slashes \"/\" MUST BE REPLACED with dashes \"-\" with .mount\n# as extension.\n# This means, if we want mount to \"/storage/movies2\" (see above \"Where=/storage/movies2\")\n# then this file must be renamed to 'storage-movies2.mount' and can be enabled via ssh with the\n# command 'systemctl enable storage-movies2.mount'\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/config/system.d/openvpn.service.sample",
    "content": "[Unit]\nDescription=OpenVPN Autorun Service\n\n[Service]\nType=forking\nRequires=network-online.service\nAfter=network-online.service\nExecStart=/usr/sbin/openvpn --daemon --config /storage/.config/openvpn.config\nRestart=always\nRestartSec=15\n\n[Install]\nWantedBy=kodi.target\n\n# NOTES:\n#\n# 1) Edit /storage/.config/openvpn.config to the .config/.conf/.ovpn file\n# from your VPN service provider and test it works first by connecting at\n# the console:\n# \n#   /usr/sbin/openvpn --daemon --config /storage/.config/openvpn.config\n#\n# 2) The openvpn.service file must be addeded to the active systemd config \n# before it will work. This is done by running:\n#  \n#   systemctl enable openvpn.service\n# \n# 3) If you suspend/resume your LibreELEC system you will need to stop and\n# restart the connection with a systemd *.power script, e.g.\n#\n#   mkdir -p /storage/.config/sleep.d\n#   nano /storage/.config/sleep.d/01-openvpn.power\n# \n# Copy the sample script below. Remove # marks except for #!/bin/bash\n#\n#   #!/bin/sh\n#   case \"$1\" in\n#     pre)\n#     systemctl stop openvpn.service\n#     ;;\n#     post)\n#     systemctl start openvpn.service\n#     ;;\n#   esac\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/config/timesyncd.conf.d/README",
    "content": "TIMESYNCD.CONF(5)               timesyncd.conf               TIMESYNCD.CONF(5)\n\nNAME\n       timesyncd.conf, timesyncd.conf.d - Network Time Synchronization\n       configuration files\n\nSYNOPSIS\n       /etc/systemd/timesyncd.conf\n\n       /etc/systemd/timesyncd.conf.d/*.conf\n\n       /run/systemd/timesyncd.conf.d/*.conf\n\n       /usr/lib/systemd/timesyncd.conf.d/*.conf\n\nDESCRIPTION\n       These configuration files control NTP network time synchronization. See\n       systemd.syntax(5) for a general description of the syntax.\n\nCONFIGURATION DIRECTORIES AND PRECEDENCE\n       The default configuration is defined during compilation, so a\n       configuration file is only needed when it is necessary to deviate from\n       those defaults. By default, the configuration file in /etc/systemd/\n       contains commented out entries showing the defaults as a guide to the\n       administrator. This file can be edited to create local overrides.\n\n       When packages need to customize the configuration, they can install\n       configuration snippets in /usr/lib/systemd/*.conf.d/. Files in /etc/\n       are reserved for the local administrator, who may use this logic to\n       override the configuration files installed by vendor packages. The main\n       configuration file is read before any of the configuration directories,\n       and has the lowest precedence; entries in a file in any configuration\n       directory override entries in the single configuration file. Files in\n       the *.conf.d/ configuration subdirectories are sorted by their filename\n       in lexicographic order, regardless of which of the subdirectories they\n       reside in. When multiple files specify the same option, for options\n       which accept just a single value, the entry in the file with the\n       lexicographically latest name takes precedence. For options which\n       accept a list of values, entries are collected as they occur in files\n       sorted lexicographically. It is recommended to prefix all filenames in\n       those subdirectories with a two-digit number and a dash, to simplify\n       the ordering of the files.\n\n       To disable a configuration file supplied by the vendor, the recommended\n       way is to place a symlink to /dev/null in the configuration directory\n       in /etc/, with the same filename as the vendor configuration file.\n\nOPTIONS\n       The following settings are configured in the \"[Time]\" section:\n\n       NTP=\n           A space-separated list of NTP server host names or IP addresses.\n           During runtime this list is combined with any per-interface NTP\n           servers acquired from systemd-networkd.service(8).\n           systemd-timesyncd will contact all configured system or\n           per-interface servers in turn until one is found that responds.\n           When the empty string is assigned, the list of NTP servers is\n           reset, and all assignments prior to this one will have no effect.\n           This setting defaults to an empty list.\n\n       FallbackNTP=\n           A space-separated list of NTP server host names or IP addresses to\n           be used as the fallback NTP servers. Any per-interface NTP servers\n           obtained from systemd-networkd.service(8) take precedence over this\n           setting, as do any servers set via NTP= above. This setting is\n           hence only used if no other NTP server information is known. When\n           the empty string is assigned, the list of NTP servers is reset, and\n           all assignments prior to this one will have no effect. If this\n           option is not given, a compiled-in list of NTP servers is used\n           instead.\n\n       RootDistanceMaxSec=\n           Maximum acceptable root distance. Takes a time value (in seconds).\n           Defaults to 5 seconds.\n\n       PollIntervalMinSec=, PollIntervalMaxSec=\n           The minimum and maximum poll intervals for NTP messages. Each\n           setting takes a time value (in seconds).  PollIntervalMinSec= must\n           not be smaller than 16 seconds.  PollIntervalMaxSec= must be larger\n           than PollIntervalMinSec=.  PollIntervalMinSec= defaults to 32\n           seconds, and PollIntervalMaxSec= defaults to 2048 seconds.\n\nSEE ALSO\n       systemd(1), systemd-timesyncd.service(8), systemd-networkd.service(8)\n\nsystemd 241                                                  TIMESYNCD.CONF(5)\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/config/tmpfiles.d/README",
    "content": "Name\n\ntmpfiles.d — Configuration for creation, deletion and cleaning of volatile and temporary files\n\nSynopsis\n\n/etc/tmpfiles.d/*.conf\n\n/run/tmpfiles.d/*.conf\n\n/usr/lib/tmpfiles.d/*.conf\n\nDescription\n\nsystemd-tmpfiles uses the configuration files from the above directories to describe the creation, cleaning and removal of volatile and temporary files and directories which usually reside in directories such as /run or /tmp.\nConfiguration Format\n\nEach configuration file shall be named in the style of <program>.conf. Files in /etc/ override files with the same name in /usr/lib/ and /run/. Files in /run/ override files with the same name in /usr/lib/. Packages should install their configuration files in /usr/lib/. Files in /etc/ are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages. All configuration files are sorted by their filename in alphabetical order, regardless in which of the directories they reside, to guarantee that a specific configuration file takes precedence over another file with an alphabetically later name.\n\nIf the administrator wants to disable a configuration file supplied by the vendor the recommended way is to place a symlink to /dev/null in /etc/tmpfiles.d/ bearing the same filename.\n\nThe configuration format is one line per path containing action, path, mode, ownership, age and argument fields:\n\nType Path        Mode UID  GID  Age Argument\nd    /run/user   0755 root root 10d -\nL    /tmp/foobar -    -    -    -   /dev/null\n\nType\n\nf\n    Create a file if it doesn't exist yet (optionally writing a short string into it, if the argument parameter is passed)\n\nF\n    Create or truncate a file (optionally writing a short string into it, if the argument parameter is passed)\n\nw\n    Write the argument parameter to a file, if the file exists. Lines of this type accept shell-style globs in place of normal path names. The argument parameter will be written without a trailing newline. C-style backslash escapes are interpreted.\n\nd\n    Create a directory if it doesn't exist yet\n\nD\n    Create or empty a directory\n\np\n    Create a named pipe (FIFO) if it doesn't exist yet\n\nL\n    Create a symlink if it doesn't exist yet\n\nc\n    Create a character device node if it doesn't exist yet\n\nb\n    Create a block device node if it doesn't exist yet\n\nx\n    Ignore a path during cleaning. Use this type to exclude paths from clean-up as controlled with the Age parameter. Note that lines of this type do not influence the effect of r or R lines. Lines of this type accept shell-style globs in place of normal path names.\n\nX\n    Ignore a path during cleanup. Use this type to prevent path removal as controlled with the Age parameter. Note that if path is a directory, content of a directory is not excluded from clean-up, only directory itself. Lines of this type accept shell-style globs in place of normal path names.\n\nr\n    Remove a file or directory if it exists. This may not be used to remove non-empty directories, use R for that. Lines of this type accept shell-style globs in place of normal path names.\n\nR\n    Recursively remove a path and all its subdirectories (if it is a directory). Lines of this type accept shell-style globs in place of normal path names.\n\nz\n    Restore SELinux security context label and set ownership and access mode of a file or directory if it exists. Lines of this type accept shell-style globs in place of normal path names. \n\nZ\n    Recursively restore SELinux security context label and set ownership and access mode of a path and all its subdirectories (if it is a directory). Lines of this type accept shell-style globs in place of normal path names.\n\nMode\n\nThe file access mode to use when creating this file or directory. If omitted or when set to - the default is used: 0755 for directories, 0644 for all other file objects. For z, Z lines if omitted or when set to - the file access mode will not be modified. This parameter is ignored for x, r, R, L lines.\nUID, GID\n\nThe user and group to use for this file or directory. This may either be a numeric user/group ID or a user or group name. If omitted or when set to - the default 0 (root) is used. For z, Z lines when omitted or when set to - the file ownership will not be modified. These parameters are ignored for x, r, R, L lines.\nAge\n\nThe date field, when set, is used to decide what files to delete when cleaning. If a file or directory is older than the current time minus the age field it is deleted. The field format is a series of integers each followed by one of the following postfixes for the respective time units:\n\ns, min, h, d, w, ms, m, us\n\nIf multiple integers and units are specified the time values are summed up. If an integer is given without a unit, s is assumed.\n\nWhen the age is set to zero, the files are cleaned unconditionally.\n\nThe age field only applies to lines starting with d, D and x. If omitted or set to - no automatic clean-up is done.\n\nIf the age field starts with a tilde character (~) the clean-up is only applied to files and directories one level inside the directory specified, but not the files and directories immediately inside it.\nArgument\n\nFor L lines determines the destination path of the symlink. For c, b determines the major/minor of the device node, with major and minor formatted as integers, separated by :, e.g. \"1:3\". For f, F, w may be used to specify a short string that is written to the file, suffixed by a newline. Ignored for all other lines.\nExample\n\nExample 1. /etc/tmpfiles.d/screen.conf example\n\nscreen needs two directories created at boot with specific modes and ownership.\n\nd /var/run/screens  1777 root root 10d\nd /var/run/uscreens 0755 root root 10d12h\n\n\nSee Also\n\nsystemd(1), systemd-tmpfiles(8), systemd-delta(1) \n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/config/udev.rules.d/README",
    "content": "The files in this directory are read by udev(7) and used when events\nare performed by the kernel.  The udev daemon watches this directory\nwith inotify so that changes to these files are automatically picked\nup, for this reason they must be files and not symlinks to another\nlocation as in the case in Debian.\n\nPackages do not generally install rules here, this directory is for\nlocal rules.  If you want to override behaviour of package-supplied\nrules, which can be found in /usr/lib/udev/rules.d, you can do one of\ntwo things:\n\n 1) Write your own rules in this directory that assign the name,\n    symlinks, permissions, etc. that you want.  Pick a number higher\n    than the rules you want to override, and yours will be used.\n\n 2) Copy the file from /usr/lib/udev/rules.d and edit it here; you\n    should generally only do this if you want to prevent a program\n    from being run.\n\n\nIf the ordering of files in this directory are not important to you,\nit's recommended that you simply name your files \"descriptive-name.rules\"\nsuch that they are processed AFTER all numbered rules in both this\ndirectory and /usr/lib/udev/rules.d and thus override anything set there.\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/hwdb.d/70-local-keyboard.hwdb",
    "content": "# o2.cz bluetooth remote\nevdev:input:b0005v0217p0000e0110*\n KEYBOARD_KEY_c0041=enter\t\t# OK button\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"systemd\"\nPKG_VERSION=\"242\"\nPKG_SHA256=\"ec22be9a5dd94c9640e6348ed8391d1499af8ca2c2f01109198a414cff6c6cba\"\nPKG_LICENSE=\"LGPL2.1+\"\nPKG_SITE=\"http://www.freedesktop.org/wiki/Software/systemd\"\nPKG_URL=\"https://github.com/systemd/systemd/archive/v$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libcap kmod util-linux entropy libidn2\"\nPKG_LONGDESC=\"A system and session manager for Linux, compatible with SysV and LSB init scripts.\"\n\nif [ \"${DEVICE}\" = \"Amlogic-old\" ]; then\n  PKG_PATCH_DIRS=\"amlogic\"\nfi\n\nif [ \"$DEVICE\" != \"OdroidGoAdvance\" ] && [ \"$DEVICE\" != \"GameForce\" ]; then\n\tPKG_DEPENDS_TARGET+=\" wait-time-sync\"\nfi\n\nPKG_MESON_OPTS_TARGET=\"--libdir=/usr/lib \\\n                       -Drootprefix=/usr \\\n                       -Dsplit-usr=false \\\n                       -Dsplit-bin=true \\\n                       -Ddefault-hierarchy=hybrid \\\n                       -Dtty-gid=5 \\\n                       -Dtests=false \\\n                       -Dseccomp=false \\\n                       -Dselinux=false \\\n                       -Dapparmor=false \\\n                       -Dpolkit=false \\\n                       -Dacl=false \\\n                       -Daudit=false \\\n                       -Dblkid=true \\\n                       -Dkmod=true \\\n                       -Dpam=false \\\n                       -Dmicrohttpd=false \\\n                       -Dlibcryptsetup=false \\\n                       -Dlibcurl=false \\\n                       -Dlibidn=false \\\n                       -Dlibidn2=true \\\n                       -Dlibiptc=false \\\n                       -Dqrencode=false \\\n                       -Dgcrypt=false \\\n                       -Dgnutls=false \\\n                       -Dopenssl=false \\\n                       -Delfutils=false \\\n                       -Dzlib=false \\\n                       -Dbzip2=false \\\n                       -Dxz=false \\\n                       -Dlz4=false \\\n                       -Dxkbcommon=false \\\n                       -Dpcre2=false \\\n                       -Dglib=false \\\n                       -Ddbus=false \\\n                       -Ddefault-dnssec=no \\\n                       -Dimportd=false \\\n                       -Dremote=false \\\n                       -Dutmp=false \\\n                       -Dhibernate=false \\\n                       -Denvironment-d=false \\\n                       -Dbinfmt=false \\\n                       -Dcoredump=false \\\n                       -Dresolve=false \\\n                       -Dlogind=true \\\n                       -Dhostnamed=true \\\n                       -Dlocaled=false \\\n                       -Dmachined=false \\\n                       -Dnetworkd=false \\\n                       -Dtimedated=false \\\n                       -Dtimesyncd=true \\\n                       -Dfirstboot=false \\\n                       -Drandomseed=false \\\n                       -Dbacklight=false \\\n                       -Dvconsole=false \\\n                       -Dquotacheck=false \\\n                       -Dsysusers=false \\\n                       -Dtmpfiles=true \\\n                       -Dhwdb=true \\\n                       -Drfkill=false \\\n                       -Dldconfig=false \\\n                       -Defi=false \\\n                       -Dtpm=false \\\n                       -Dima=false \\\n                       -Dsmack=false \\\n                       -Dgshadow=false \\\n                       -Didn=false \\\n                       -Dnss-myhostname=false \\\n                       -Dnss-mymachines=false \\\n                       -Dnss-resolve=false \\\n                       -Dnss-systemd=false \\\n                       -Dman=false \\\n                       -Dhtml=false \\\n                       -Dbashcompletiondir=no \\\n                       -Dzshcompletiondir=no \\\n                       -Dkmod-path=/usr/bin/kmod \\\n                       -Dmount-path=/usr/bin/mount \\\n                       -Dumount-path=/usr/bin/umount \\\n                       -Ddebug-tty=$DEBUG_TTY \\\n                       -Dversion-tag=${PKG_VERSION}\"\n\npre_configure_target() {\n  export CFLAGS=\"$CFLAGS -fno-schedule-insns -fno-schedule-insns2 -Wno-format-truncation\"\n  export LC_ALL=en_US.UTF-8\n}\n\npost_makeinstall_target() {\n  # remove unneeded stuff\n  safe_remove $INSTALL/etc/init.d\n  safe_remove $INSTALL/etc/pam.d\n  safe_remove $INSTALL/etc/systemd/system\n  safe_remove $INSTALL/etc/xdg\n  safe_remove $INSTALL/etc/X11\n  safe_remove $INSTALL/usr/bin/kernel-install\n  safe_remove $INSTALL/usr/lib/kernel/install.d\n  safe_remove $INSTALL/usr/lib/rpm\n  safe_remove $INSTALL/usr/lib/systemd/user\n  safe_remove $INSTALL/usr/lib/tmpfiles.d/etc.conf\n  safe_remove $INSTALL/usr/lib/tmpfiles.d/home.conf\n  safe_remove $INSTALL/usr/share/factory\n\n  # clean up hwdb\n  safe_remove $INSTALL/usr/lib/udev/hwdb.d/20-OUI.hwdb\n  safe_remove $INSTALL/usr/lib/udev/hwdb.d/20-acpi-vendor.hwdb\n  safe_remove $INSTALL/usr/lib/udev/hwdb.d/20-bluetooth-vendor-product.hwdb\n  safe_remove $INSTALL/usr/lib/udev/hwdb.d/20-net-ifname.hwdb\n  safe_remove $INSTALL/usr/lib/udev/hwdb.d/20-sdio-classes.hwdb\n  safe_remove $INSTALL/usr/lib/udev/hwdb.d/20-sdio-vendor-model.hwdb\n\n  # remove Network adaper renaming rule, this is confusing\n  safe_remove $INSTALL/usr/lib/udev/rules.d/80-net-setup-link.rules\n\n  # remove the uaccess rules as we don't build systemd with ACL (see https://github.com/systemd/systemd/issues/4107)\n  safe_remove $INSTALL/usr/lib/udev/rules.d/71-seat.rules\n  safe_remove $INSTALL/usr/lib/udev/rules.d/73-seat-late.rules\n\n  # remove getty units, we dont want a console\n  safe_remove $INSTALL/usr/lib/systemd/system/autovt@.service\n  safe_remove $INSTALL/usr/lib/systemd/system/console-getty.service\n  safe_remove $INSTALL/usr/lib/systemd/system/container-getty@.service\n  safe_remove $INSTALL/usr/lib/systemd/system/getty.target\n  safe_remove $INSTALL/usr/lib/systemd/system/getty@.service\n  safe_remove $INSTALL/usr/lib/systemd/system/serial-getty@.service\n  safe_remove $INSTALL/usr/lib/systemd/system/*.target.wants/getty.target\n\n  # remove other notused or nonsense stuff (our /etc is ro)\n  safe_remove $INSTALL/usr/lib/systemd/systemd-update-done\n  safe_remove $INSTALL/usr/lib/systemd/system/systemd-update-done.service\n  safe_remove $INSTALL/usr/lib/systemd/system/*.target.wants/systemd-update-done.service\n\n  # remove nspawn\n  safe_remove $INSTALL/usr/bin/systemd-nspawn\n  safe_remove $INSTALL/usr/lib/systemd/system/systemd-nspawn@.service\n\n  # remove unneeded generators\n  for gen in $INSTALL/usr/lib/systemd/system-generators/*; do\n    case \"$gen\" in\n      */systemd-debug-generator)\n        # keep it\n        ;;\n      *)\n        safe_remove \"$gen\"\n        ;;\n    esac\n  done\n\n  # remove catalog\n  safe_remove $INSTALL/usr/lib/systemd/catalog\n\n  # remove partition\n  safe_remove $INSTALL/usr/lib/systemd/systemd-growfs\n  safe_remove $INSTALL/usr/lib/systemd/systemd-makefs\n\n  # distro preset policy\n  safe_remove $INSTALL/usr/lib/systemd/system-preset/*\n  echo \"disable *\" > $INSTALL/usr/lib/systemd/system-preset/99-default.preset\n\n  safe_remove $INSTALL/usr/lib/systemd/user-preset/*\n  echo \"disable *\" > $INSTALL/usr/lib/systemd/user-preset/90-systemd.preset\n\n  # remove networkd\n  safe_remove $INSTALL/usr/lib/systemd/network\n\n  # remove systemd-time-wait-sync (not detecting slew time updates, using package wait-time-sync)\n  safe_remove $INSTALL/usr/lib/systemd/system/systemd-time-wait-sync.service\n  safe_remove $INSTALL/usr/lib/systemd/systemd-time-wait-sync\n\n  # tune journald.conf\n  sed -e \"s,^.*Compress=.*$,Compress=no,g\" -i $INSTALL/etc/systemd/journald.conf\n  sed -e \"s,^.*SplitMode=.*$,SplitMode=none,g\" -i $INSTALL/etc/systemd/journald.conf\n  sed -e \"s,^.*RuntimeMaxUse=.*$,RuntimeMaxUse=2M,g\" -i $INSTALL/etc/systemd/journald.conf\n  sed -e \"s,^.*RuntimeMaxFileSize=.*$,RuntimeMaxFileSize=128K,g\" -i $INSTALL/etc/systemd/journald.conf\n  sed -e \"s,^.*SystemMaxUse=.*$,SystemMaxUse=10M,g\" -i $INSTALL/etc/systemd/journald.conf\n\n  # tune logind.conf\n  sed -e \"s,^.*HandleLidSwitch=.*$,HandleLidSwitch=ignore,g\" -i $INSTALL/etc/systemd/logind.conf\n  sed -e \"s,^.*HandlePowerKey=.*$,HandlePowerKey=ignore,g\" -i $INSTALL/etc/systemd/logind.conf\n\n  # replace systemd-machine-id-setup with ours\n  safe_remove $INSTALL/usr/lib/systemd/system/systemd-machine-id-commit.service\n  safe_remove $INSTALL/usr/lib/systemd/system/*.target.wants/systemd-machine-id-commit.service\n  safe_remove $INSTALL/usr/bin/systemd-machine-id-setup\n  mkdir -p $INSTALL/usr/bin\n  cp $PKG_DIR/scripts/systemd-machine-id-setup $INSTALL/usr/bin\n  cp $PKG_DIR/scripts/userconfig-setup $INSTALL/usr/bin\n  cp $PKG_DIR/scripts/usercache-setup $INSTALL/usr/bin\n\n  mkdir -p $INSTALL/usr/sbin\n  cp $PKG_DIR/scripts/kernel-overlays-setup $INSTALL/usr/sbin\n  cp $PKG_DIR/scripts/network-base-setup $INSTALL/usr/sbin\n  cp $PKG_DIR/scripts/systemd-timesyncd-setup $INSTALL/usr/sbin\n\n  # /etc/resolv.conf and /etc/hosts must be writable\n  ln -sf /run/libreelec/resolv.conf $INSTALL/etc/resolv.conf\n  ln -sf /run/libreelec/hosts $INSTALL/etc/hosts\n\n  # provide 'halt', 'shutdown', 'reboot' & co.\n  ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/halt\n  ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/poweroff\n  ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/reboot\n  ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/runlevel\n  ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/shutdown\n  ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/telinit\n\n  # strip\n  debug_strip $INSTALL/usr\n\n  # defaults\n  mkdir -p $INSTALL/usr/config\n  cp -PR $PKG_DIR/config/* $INSTALL/usr/config\n\n  safe_remove $INSTALL/etc/modules-load.d\n  ln -sf /storage/.config/modules-load.d $INSTALL/etc/modules-load.d\n  ln -sf /storage/.config/logind.conf.d $INSTALL/etc/systemd/logind.conf.d\n  ln -sf /storage/.config/sleep.conf.d $INSTALL/etc/systemd/sleep.conf.d\n  ln -sf /storage/.config/timesyncd.conf.d $INSTALL/etc/systemd/timesyncd.conf.d\n  safe_remove $INSTALL/etc/sysctl.d\n  ln -sf /storage/.config/sysctl.d $INSTALL/etc/sysctl.d\n  safe_remove $INSTALL/etc/tmpfiles.d\n  ln -sf /storage/.config/tmpfiles.d $INSTALL/etc/tmpfiles.d\n  safe_remove $INSTALL/etc/udev/hwdb.d\n  ln -sf /storage/.config/hwdb.d $INSTALL/etc/udev/hwdb.d\n  safe_remove $INSTALL/etc/udev/rules.d\n  ln -sf /storage/.config/udev.rules.d $INSTALL/etc/udev/rules.d\n}\n\npost_install() {\n  add_group systemd-journal 190\n\n  add_group systemd-timesync 191\n  add_user systemd-timesync x 191 191 \"systemd-timesync\" \"/\" \"/bin/false\"\n\n  add_group systemd-network 193\n  add_user systemd-network x 193 193 \"systemd-network\" \"/\" \"/bin/sh\"\n\n  add_group audio 63\n  add_group cdrom 11\n  add_group dialout 18\n  add_group disk 6\n  add_group floppy 19\n  add_group kmem 9\n  add_group lp 7\n  add_group tape 33\n  add_group tty 5\n  add_group video 39\n  add_group utmp 22\n  add_group input 199\n\n  enable_service machine-id.service\n  enable_service debugconfig.service\n  enable_service userconfig.service\n  enable_service usercache.service\n  enable_service kernel-overlays.service\n  enable_service hwdb.service\n  enable_service network-base.service\n  enable_service systemd-timesyncd.service\n  enable_service systemd-timesyncd-setup.service\n  enable_service debug-shell.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/patches/amlogic/systemd-0203-syscall_397_doesnt_exists_on_3.14.patch",
    "content": "--- a/src/basic/missing_syscall.h\t2018-05-22 17:52:31.996229634 +0200\n+++ b/src/basic/missing_syscall.h\t2018-05-23 00:23:03.774696689 +0200\n@@ -414,37 +414,14 @@\n \n /* ======================================================================= */\n \n-#if !HAVE_STATX\n-#  ifndef __NR_statx\n-#    if defined __aarch64__ || defined __arm__\n-#      define __NR_statx 397\n-#    elif defined __alpha__\n-#      define __NR_statx 522\n-#    elif defined __i386__ || defined __powerpc64__\n-#      define __NR_statx 383\n-#    elif defined __sparc__\n-#      define __NR_statx 360\n-#    elif defined __x86_64__\n-#      define __NR_statx 332\n-#    else\n-#      warning \"__NR_statx not defined for your architecture\"\n-#    endif\n-#  endif\n-\n-struct statx;\n-#endif\n-\n /* This typedef is supposed to be always defined. */\n typedef struct statx struct_statx;\n \n #if !HAVE_STATX\n+struct statx;\n static inline ssize_t missing_statx(int dfd, const char *filename, unsigned flags, unsigned int mask, struct statx *buffer) {\n-#  ifdef __NR_statx\n-        return syscall(__NR_statx, dfd, filename, flags, mask, buffer);\n-#  else\n         errno = ENOSYS;\n         return -1;\n-#  endif\n }\n \n #  define statx missing_statx\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/patches/amlogic/systemd-9999.1-backport.patch",
    "content": "From c7af754aa65eb84b6bb5018bda355891fa8183bd Mon Sep 17 00:00:00 2001\nFrom: Yu Watanabe <watanabe.yu+github@gmail.com>\nDate: Wed, 10 Apr 2019 19:55:53 +0900\nSubject: [PATCH] tree-wide: drop several missing_*.h and import relevant\n headers from kernel-5.0\n\n---\n meson.build                                 |   93 -\n src/basic/arphrd-list.c                     |    3 +-\n src/basic/btrfs-util.c                      |    3 +-\n src/basic/generate-arphrd-list.sh           |    2 +-\n src/basic/linux/README                      |    3 +\n src/basic/linux/btrfs.h                     |  945 +++++\n src/basic/linux/btrfs_tree.h                |  974 +++++\n src/basic/linux/can/vxcan.h                 |   13 +\n src/basic/linux/fib_rules.h                 |   90 +\n src/basic/linux/fou.h                       |   42 +\n src/basic/linux/if.h                        |  294 ++\n src/basic/linux/if_addr.h                   |   72 +\n src/basic/linux/if_arp.h                    |  164 +\n src/basic/linux/if_bonding.h                |  131 +\n src/basic/linux/if_bridge.h                 |  316 ++\n src/basic/linux/if_link.h                   | 1024 ++++++\n src/basic/linux/if_tun.h                    |  113 +\n src/basic/linux/if_tunnel.h                 |  183 +\n src/basic/linux/libc-compat.h               |  267 ++\n src/basic/linux/netlink.h                   |  252 ++\n src/basic/linux/rtnetlink.h                 |  751 ++++\n src/basic/linux/wireguard.h                 |  190 +\n src/basic/meson.build                       |   29 +-\n src/basic/missing.h                         |    1 -\n src/basic/missing_btrfs.h                   |   22 -\n src/basic/missing_btrfs_tree.h              |  109 -\n src/basic/missing_ethtool.h                 |  131 -\n src/basic/missing_fib_rules.h               |   45 -\n src/basic/missing_fou.h                     |   55 -\n src/basic/missing_if_bridge.h               |   21 -\n src/basic/missing_if_link.h                 |  393 ---\n src/basic/missing_if_tunnel.h               |   59 -\n src/basic/missing_network.h                 |  144 +-\n src/basic/missing_vxcan.h                   |   12 -\n src/core/bpf-devices.c                      |    2 +-\n src/core/bpf-firewall.c                     |    2 +-\n src/libsystemd/sd-netlink/netlink-types.c   |   12 +-\n src/network/netdev/fou-tunnel.h             |    3 -\n src/network/netdev/ipvlan.h                 |    1 -\n src/network/netdev/tunnel.c                 |    6 +-\n src/network/netdev/vxcan.c                  |    3 -\n src/network/netdev/wireguard.c              |    1 -\n src/network/netdev/wireguard.h              |    3 +-\n src/network/networkd-brvlan.c               |    1 -\n src/network/networkd-network.c              |    4 +-\n src/network/networkd-routing-policy-rule.h  |    1 -\n src/partition/growfs.c                      |    1 +\n src/resolve/resolved-link.c                 |    3 +-\n src/shared/dissect-image.c                  |    3 +-\n src/shared/linux/README                     |    8 +\n src/shared/linux/auto_dev-ioctl.h           |   33 +-\n src/shared/linux/bpf.h                      | 3536 ++++++++++++++-----\n src/shared/linux/bpf_common.h               |   14 +-\n src/shared/linux/bpf_insn.h                 |  205 ++\n src/shared/{linux-3.13 => linux}/dm-ioctl.h |   12 +-\n src/shared/linux/ethtool.h                  | 1843 ++++++++++\n src/shared/linux/libbpf.h                   |  207 --\n src/shared/linux/netdevice.h                |   66 +\n src/shared/meson.build                      |    8 +-\n src/shared/wireguard-netlink.h              |  179 -\n src/shutdown/umount.c                       |    2 +-\n src/test/test-arphrd-list.c                 |    3 +-\n src/test/test-bpf.c                         |    2 +-\n src/test/test-netlink-manual.c              |    3 +-\n src/udev/net/ethtool-util.h                 |    1 -\n src/udev/net/link-config.c                  |    2 +-\n src/udev/udev-builtin-btrfs.c               |    2 +-\n 67 files changed, 10771 insertions(+), 2347 deletions(-)\n create mode 100644 src/basic/linux/README\n create mode 100644 src/basic/linux/btrfs.h\n create mode 100644 src/basic/linux/btrfs_tree.h\n create mode 100644 src/basic/linux/can/vxcan.h\n create mode 100644 src/basic/linux/fib_rules.h\n create mode 100644 src/basic/linux/fou.h\n create mode 100644 src/basic/linux/if.h\n create mode 100644 src/basic/linux/if_addr.h\n create mode 100644 src/basic/linux/if_arp.h\n create mode 100644 src/basic/linux/if_bonding.h\n create mode 100644 src/basic/linux/if_bridge.h\n create mode 100644 src/basic/linux/if_link.h\n create mode 100644 src/basic/linux/if_tun.h\n create mode 100644 src/basic/linux/if_tunnel.h\n create mode 100644 src/basic/linux/libc-compat.h\n create mode 100644 src/basic/linux/netlink.h\n create mode 100644 src/basic/linux/rtnetlink.h\n create mode 100644 src/basic/linux/wireguard.h\n delete mode 100644 src/basic/missing_btrfs.h\n delete mode 100644 src/basic/missing_btrfs_tree.h\n delete mode 100644 src/basic/missing_ethtool.h\n delete mode 100644 src/basic/missing_fib_rules.h\n delete mode 100644 src/basic/missing_fou.h\n delete mode 100644 src/basic/missing_if_bridge.h\n delete mode 100644 src/basic/missing_if_link.h\n delete mode 100644 src/basic/missing_if_tunnel.h\n delete mode 100644 src/basic/missing_vxcan.h\n create mode 100644 src/shared/linux/README\n create mode 100644 src/shared/linux/bpf_insn.h\n rename src/shared/{linux-3.13 => linux}/dm-ioctl.h (96%)\n create mode 100644 src/shared/linux/ethtool.h\n delete mode 100644 src/shared/linux/libbpf.h\n create mode 100644 src/shared/linux/netdevice.h\n delete mode 100644 src/shared/wireguard-netlink.h\n\ndiff --git a/meson.build b/meson.build\nindex 79195c97484..15e3394b91d 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -454,96 +454,6 @@ endforeach\n \n conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h)\n \n-foreach decl : [['ETHTOOL_LINK_MODE_10baseT_Half_BIT',      'linux/ethtool.h'],\n-                ['ETHTOOL_LINK_MODE_25000baseCR_Full_BIT',  'linux/ethtool.h'],\n-                ['ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT', 'linux/ethtool.h'],\n-                ['ETHTOOL_LINK_MODE_1000baseX_Full_BIT',    'linux/ethtool.h'],\n-                ['ETHTOOL_LINK_MODE_2500baseT_Full_BIT',    'linux/ethtool.h'],\n-                ['ETHTOOL_LINK_MODE_FEC_NONE_BIT',          'linux/ethtool.h'],\n-                ['FRA_TUN_ID',                              'linux/fib_rules.h'],\n-                ['FRA_SUPPRESS_PREFIXLEN',                  'linux/fib_rules.h'],\n-                ['FRA_PAD',                                 'linux/fib_rules.h'],\n-                ['FRA_L3MDEV',                              'linux/fib_rules.h'],\n-                ['FRA_UID_RANGE',                           'linux/fib_rules.h'],\n-                ['FRA_DPORT_RANGE',                         'linux/fib_rules.h'],\n-                ['FOU_ATTR_REMCSUM_NOPARTIAL',              'linux/fou.h'],\n-                ['FOU_CMD_GET',                             'linux/fou.h'],\n-                ['IFA_FLAGS',                               'linux/if_addr.h'],\n-                ['IFLA_BRIDGE_VLAN_TUNNEL_INFO',            'linux/if_bridge.h'],\n-                ['IFLA_INET6_ADDR_GEN_MODE',                'linux/if_link.h'],\n-                ['IN6_ADDR_GEN_MODE_STABLE_PRIVACY',        'linux/if_link.h'],\n-                ['IN6_ADDR_GEN_MODE_RANDOM',                'linux/if_link.h'],\n-                ['IFLA_IPVLAN_MODE',                        'linux/if_link.h'],\n-                ['IPVLAN_MODE_L3S',                         'linux/if_link.h'],\n-                ['IFLA_IPVLAN_FLAGS',                       'linux/if_link.h'],\n-                ['IFLA_PHYS_PORT_ID',                       'linux/if_link.h'],\n-                ['IFLA_CARRIER_CHANGES',                    'linux/if_link.h'],\n-                ['IFLA_PHYS_SWITCH_ID',                     'linux/if_link.h'],\n-                ['IFLA_LINK_NETNSID',                       'linux/if_link.h'],\n-                ['IFLA_PHYS_PORT_NAME',                     'linux/if_link.h'],\n-                ['IFLA_PROTO_DOWN',                         'linux/if_link.h'],\n-                ['IFLA_GSO_MAX_SIZE',                       'linux/if_link.h'],\n-                ['IFLA_PAD',                                'linux/if_link.h'],\n-                ['IFLA_XDP',                                'linux/if_link.h'],\n-                ['IFLA_EVENT',                              'linux/if_link.h'],\n-                ['IFLA_IF_NETNSID',                         'linux/if_link.h'],\n-                ['IFLA_TARGET_NETNSID',                     'linux/if_link.h'],\n-                ['IFLA_NEW_IFINDEX',                        'linux/if_link.h'],\n-                ['IFLA_MAX_MTU',                            'linux/if_link.h'],\n-                ['IFLA_BOND_MODE',                          'linux/if_link.h'],\n-                ['IFLA_BOND_ACTIVE_SLAVE',                  'linux/if_link.h'],\n-                ['IFLA_BOND_AD_INFO',                       'linux/if_link.h'],\n-                ['IFLA_BOND_AD_ACTOR_SYSTEM',               'linux/if_link.h'],\n-                ['IFLA_BOND_TLB_DYNAMIC_LB',                'linux/if_link.h'],\n-                ['IFLA_VXLAN_UDP_ZERO_CSUM6_RX',            'linux/if_link.h'],\n-                ['IFLA_VXLAN_REMCSUM_NOPARTIAL',            'linux/if_link.h'],\n-                ['IFLA_VXLAN_COLLECT_METADATA',             'linux/if_link.h'],\n-                ['IFLA_VXLAN_LABEL',                        'linux/if_link.h'],\n-                ['IFLA_VXLAN_GPE',                          'linux/if_link.h'],\n-                ['IFLA_VXLAN_TTL_INHERIT',                  'linux/if_link.h'],\n-                ['IFLA_GENEVE_TOS',                         'linux/if_link.h'],\n-                ['IFLA_GENEVE_COLLECT_METADATA',            'linux/if_link.h'],\n-                ['IFLA_GENEVE_REMOTE6',                     'linux/if_link.h'],\n-                ['IFLA_GENEVE_UDP_ZERO_CSUM6_RX',           'linux/if_link.h'],\n-                ['IFLA_GENEVE_LABEL',                       'linux/if_link.h'],\n-                ['IFLA_GENEVE_TTL_INHERIT',                 'linux/if_link.h'],\n-                ['IFLA_BR_MAX_AGE',                         'linux/if_link.h'],\n-                ['IFLA_BR_PRIORITY',                        'linux/if_link.h'],\n-                ['IFLA_BR_VLAN_PROTOCOL',                   'linux/if_link.h'],\n-                ['IFLA_BR_VLAN_DEFAULT_PVID',               'linux/if_link.h'],\n-                ['IFLA_BR_VLAN_STATS_ENABLED',              'linux/if_link.h'],\n-                ['IFLA_BR_MCAST_STATS_ENABLED',             'linux/if_link.h'],\n-                ['IFLA_BR_MCAST_MLD_VERSION',               'linux/if_link.h'],\n-                ['IFLA_BR_VLAN_STATS_PER_PORT',             'linux/if_link.h'],\n-                ['IFLA_BRPORT_LEARNING_SYNC',               'linux/if_link.h'],\n-                ['IFLA_BRPORT_PROXYARP_WIFI',               'linux/if_link.h'],\n-                ['IFLA_BRPORT_MULTICAST_ROUTER',            'linux/if_link.h'],\n-                ['IFLA_BRPORT_PAD',                         'linux/if_link.h'],\n-                ['IFLA_BRPORT_MCAST_FLOOD',                 'linux/if_link.h'],\n-                ['IFLA_BRPORT_VLAN_TUNNEL',                 'linux/if_link.h'],\n-                ['IFLA_BRPORT_BCAST_FLOOD',                 'linux/if_link.h'],\n-                ['IFLA_BRPORT_NEIGH_SUPPRESS',              'linux/if_link.h'],\n-                ['IFLA_BRPORT_ISOLATED',                    'linux/if_link.h'],\n-                ['IFLA_BRPORT_BACKUP_PORT',                 'linux/if_link.h'],\n-                ['IFLA_VRF_TABLE',                          'linux/if_link.h'],\n-                # if_tunnel.h is buggy and cannot be included on its own\n-                ['IFLA_VTI_FWMARK',                         'linux/if_tunnel.h', '#include <net/if.h>'],\n-                ['IFLA_IPTUN_ENCAP_DPORT',                  'linux/if_tunnel.h', '#include <net/if.h>'],\n-                ['IFLA_IPTUN_COLLECT_METADATA',             'linux/if_tunnel.h', '#include <net/if.h>'],\n-                ['IFLA_IPTUN_FWMARK',                       'linux/if_tunnel.h', '#include <net/if.h>'],\n-                ['IFLA_GRE_ENCAP_DPORT',                    'linux/if_tunnel.h', '#include <net/if.h>'],\n-                ['IFLA_GRE_COLLECT_METADATA',               'linux/if_tunnel.h', '#include <net/if.h>'],\n-                ['IFLA_GRE_IGNORE_DF',                      'linux/if_tunnel.h', '#include <net/if.h>'],\n-                ['IFLA_GRE_FWMARK',                         'linux/if_tunnel.h', '#include <net/if.h>'],\n-                ['IFLA_GRE_ERSPAN_INDEX',                   'linux/if_tunnel.h', '#include <net/if.h>'],\n-                ['IFLA_GRE_ERSPAN_HWID',                    'linux/if_tunnel.h', '#include <net/if.h>'],\n-                ['LO_FLAGS_PARTSCAN',                       'linux/loop.h'],\n-               ]\n-        prefix = decl.length() > 2 ? decl[2] : ''\n-        have = cc.has_header_symbol(decl[1], decl[0], prefix : prefix)\n-        conf.set10('HAVE_' + decl[0], have)\n-endforeach\n-\n foreach ident : ['secure_getenv', '__secure_getenv']\n         conf.set10('HAVE_' + ident.to_upper(), cc.has_function(ident))\n endforeach\n@@ -680,11 +590,8 @@ if not cc.has_header('sys/capability.h')\n         error('POSIX caps headers not found')\n endif\n foreach header : ['crypt.h',\n-                  'linux/btrfs_tree.h',\n-                  'linux/fou.h',\n                   'linux/memfd.h',\n                   'linux/vm_sockets.h',\n-                  'linux/can/vxcan.h',\n                   'sys/auxv.h',\n                   'valgrind/memcheck.h',\n                   'valgrind/valgrind.h',\ndiff --git a/src/basic/arphrd-list.c b/src/basic/arphrd-list.c\nindex b6e2486b67b..b9a9cb7ed41 100644\n--- a/src/basic/arphrd-list.c\n+++ b/src/basic/arphrd-list.c\n@@ -1,12 +1,11 @@\n /* SPDX-License-Identifier: LGPL-2.1+ */\n \n #include <errno.h>\n-#include <net/if_arp.h>\n+#include <linux/if_arp.h>\n #include <string.h>\n \n #include \"arphrd-list.h\"\n #include \"macro.h\"\n-#include \"missing_network.h\"\n \n static const struct arphrd_name* lookup_arphrd(register const char *str, register GPERF_LEN_TYPE len);\n \ndiff --git a/src/basic/btrfs-util.c b/src/basic/btrfs-util.c\nindex b1519cc4eb4..db6c0c3f1e4 100644\n--- a/src/basic/btrfs-util.c\n+++ b/src/basic/btrfs-util.c\n@@ -3,8 +3,10 @@\n #include <errno.h>\n #include <fcntl.h>\n #include <inttypes.h>\n+#include <linux/btrfs_tree.h>\n #include <linux/fs.h>\n #include <linux/loop.h>\n+#include <linux/magic.h>\n #include <stddef.h>\n #include <stdio.h>\n #include <stdlib.h>\n@@ -26,7 +28,6 @@\n #include \"fs-util.h\"\n #include \"io-util.h\"\n #include \"macro.h\"\n-#include \"missing.h\"\n #include \"path-util.h\"\n #include \"rm-rf.h\"\n #include \"smack-util.h\"\ndiff --git a/src/basic/generate-arphrd-list.sh b/src/basic/generate-arphrd-list.sh\nindex e6e874a8fd0..6db931c52b5 100755\n--- a/src/basic/generate-arphrd-list.sh\n+++ b/src/basic/generate-arphrd-list.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n set -eu\n \n-$1 -dM -include net/if_arp.h -include \"$2\" -include \"$3\" - </dev/null | \\\n+$1 -dM -include linux/if_arp.h -include \"$2\" - </dev/null | \\\n         awk '/^#define[ \\t]+ARPHRD_[^ \\t]+[ \\t]+[^ \\t]/ { print $2; }' | \\\n         sed -e 's/ARPHRD_//'\ndiff --git a/src/basic/linux/README b/src/basic/linux/README\nnew file mode 100644\nindex 00000000000..f849f349512\n--- /dev/null\n+++ b/src/basic/linux/README\n@@ -0,0 +1,3 @@\n+The files in this directory are copied from kernel-5.0, and the following modifications are applied:\n+- btrfs.h: drop '__user' attributes\n+- if.h: drop '#include <linux/compiler.h>' and '__user' attributes\ndiff --git a/src/basic/linux/btrfs.h b/src/basic/linux/btrfs.h\nnew file mode 100644\nindex 00000000000..22455c4cd79\n--- /dev/null\n+++ b/src/basic/linux/btrfs.h\n@@ -0,0 +1,945 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+/*\n+ * Copyright (C) 2007 Oracle.  All rights reserved.\n+ *\n+ * This program is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU General Public\n+ * License v2 as published by the Free Software Foundation.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public\n+ * License along with this program; if not, write to the\n+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n+ * Boston, MA 021110-1307, USA.\n+ */\n+\n+#ifndef _UAPI_LINUX_BTRFS_H\n+#define _UAPI_LINUX_BTRFS_H\n+#include <linux/types.h>\n+#include <linux/ioctl.h>\n+\n+#define BTRFS_IOCTL_MAGIC 0x94\n+#define BTRFS_VOL_NAME_MAX 255\n+#define BTRFS_LABEL_SIZE 256\n+\n+/* this should be 4k */\n+#define BTRFS_PATH_NAME_MAX 4087\n+struct btrfs_ioctl_vol_args {\n+\t__s64 fd;\n+\tchar name[BTRFS_PATH_NAME_MAX + 1];\n+};\n+\n+#define BTRFS_DEVICE_PATH_NAME_MAX\t1024\n+#define BTRFS_SUBVOL_NAME_MAX \t\t4039\n+\n+#define BTRFS_SUBVOL_CREATE_ASYNC\t(1ULL << 0)\n+#define BTRFS_SUBVOL_RDONLY\t\t(1ULL << 1)\n+#define BTRFS_SUBVOL_QGROUP_INHERIT\t(1ULL << 2)\n+\n+#define BTRFS_DEVICE_SPEC_BY_ID\t\t(1ULL << 3)\n+\n+#define BTRFS_VOL_ARG_V2_FLAGS_SUPPORTED\t\t\\\n+\t\t\t(BTRFS_SUBVOL_CREATE_ASYNC |\t\\\n+\t\t\tBTRFS_SUBVOL_RDONLY |\t\t\\\n+\t\t\tBTRFS_SUBVOL_QGROUP_INHERIT |\t\\\n+\t\t\tBTRFS_DEVICE_SPEC_BY_ID)\n+\n+#define BTRFS_FSID_SIZE 16\n+#define BTRFS_UUID_SIZE 16\n+#define BTRFS_UUID_UNPARSED_SIZE\t37\n+\n+/*\n+ * flags definition for qgroup limits\n+ *\n+ * Used by:\n+ * struct btrfs_qgroup_limit.flags\n+ * struct btrfs_qgroup_limit_item.flags\n+ */\n+#define BTRFS_QGROUP_LIMIT_MAX_RFER\t(1ULL << 0)\n+#define BTRFS_QGROUP_LIMIT_MAX_EXCL\t(1ULL << 1)\n+#define BTRFS_QGROUP_LIMIT_RSV_RFER\t(1ULL << 2)\n+#define BTRFS_QGROUP_LIMIT_RSV_EXCL\t(1ULL << 3)\n+#define BTRFS_QGROUP_LIMIT_RFER_CMPR\t(1ULL << 4)\n+#define BTRFS_QGROUP_LIMIT_EXCL_CMPR\t(1ULL << 5)\n+\n+struct btrfs_qgroup_limit {\n+\t__u64\tflags;\n+\t__u64\tmax_rfer;\n+\t__u64\tmax_excl;\n+\t__u64\trsv_rfer;\n+\t__u64\trsv_excl;\n+};\n+\n+/*\n+ * flags definition for qgroup inheritance\n+ *\n+ * Used by:\n+ * struct btrfs_qgroup_inherit.flags\n+ */\n+#define BTRFS_QGROUP_INHERIT_SET_LIMITS\t(1ULL << 0)\n+\n+struct btrfs_qgroup_inherit {\n+\t__u64\tflags;\n+\t__u64\tnum_qgroups;\n+\t__u64\tnum_ref_copies;\n+\t__u64\tnum_excl_copies;\n+\tstruct btrfs_qgroup_limit lim;\n+\t__u64\tqgroups[0];\n+};\n+\n+struct btrfs_ioctl_qgroup_limit_args {\n+\t__u64\tqgroupid;\n+\tstruct btrfs_qgroup_limit lim;\n+};\n+\n+/*\n+ * flags for subvolumes\n+ *\n+ * Used by:\n+ * struct btrfs_ioctl_vol_args_v2.flags\n+ *\n+ * BTRFS_SUBVOL_RDONLY is also provided/consumed by the following ioctls:\n+ * - BTRFS_IOC_SUBVOL_GETFLAGS\n+ * - BTRFS_IOC_SUBVOL_SETFLAGS\n+ */\n+\n+struct btrfs_ioctl_vol_args_v2 {\n+\t__s64 fd;\n+\t__u64 transid;\n+\t__u64 flags;\n+\tunion {\n+\t\tstruct {\n+\t\t\t__u64 size;\n+\t\t\tstruct btrfs_qgroup_inherit *qgroup_inherit;\n+\t\t};\n+\t\t__u64 unused[4];\n+\t};\n+\tunion {\n+\t\tchar name[BTRFS_SUBVOL_NAME_MAX + 1];\n+\t\t__u64 devid;\n+\t};\n+};\n+\n+/*\n+ * structure to report errors and progress to userspace, either as a\n+ * result of a finished scrub, a canceled scrub or a progress inquiry\n+ */\n+struct btrfs_scrub_progress {\n+\t__u64 data_extents_scrubbed;\t/* # of data extents scrubbed */\n+\t__u64 tree_extents_scrubbed;\t/* # of tree extents scrubbed */\n+\t__u64 data_bytes_scrubbed;\t/* # of data bytes scrubbed */\n+\t__u64 tree_bytes_scrubbed;\t/* # of tree bytes scrubbed */\n+\t__u64 read_errors;\t\t/* # of read errors encountered (EIO) */\n+\t__u64 csum_errors;\t\t/* # of failed csum checks */\n+\t__u64 verify_errors;\t\t/* # of occurences, where the metadata\n+\t\t\t\t\t * of a tree block did not match the\n+\t\t\t\t\t * expected values, like generation or\n+\t\t\t\t\t * logical */\n+\t__u64 no_csum;\t\t\t/* # of 4k data block for which no csum\n+\t\t\t\t\t * is present, probably the result of\n+\t\t\t\t\t * data written with nodatasum */\n+\t__u64 csum_discards;\t\t/* # of csum for which no data was found\n+\t\t\t\t\t * in the extent tree. */\n+\t__u64 super_errors;\t\t/* # of bad super blocks encountered */\n+\t__u64 malloc_errors;\t\t/* # of internal kmalloc errors. These\n+\t\t\t\t\t * will likely cause an incomplete\n+\t\t\t\t\t * scrub */\n+\t__u64 uncorrectable_errors;\t/* # of errors where either no intact\n+\t\t\t\t\t * copy was found or the writeback\n+\t\t\t\t\t * failed */\n+\t__u64 corrected_errors;\t\t/* # of errors corrected */\n+\t__u64 last_physical;\t\t/* last physical address scrubbed. In\n+\t\t\t\t\t * case a scrub was aborted, this can\n+\t\t\t\t\t * be used to restart the scrub */\n+\t__u64 unverified_errors;\t/* # of occurences where a read for a\n+\t\t\t\t\t * full (64k) bio failed, but the re-\n+\t\t\t\t\t * check succeeded for each 4k piece.\n+\t\t\t\t\t * Intermittent error. */\n+};\n+\n+#define BTRFS_SCRUB_READONLY\t1\n+struct btrfs_ioctl_scrub_args {\n+\t__u64 devid;\t\t\t\t/* in */\n+\t__u64 start;\t\t\t\t/* in */\n+\t__u64 end;\t\t\t\t/* in */\n+\t__u64 flags;\t\t\t\t/* in */\n+\tstruct btrfs_scrub_progress progress;\t/* out */\n+\t/* pad to 1k */\n+\t__u64 unused[(1024-32-sizeof(struct btrfs_scrub_progress))/8];\n+};\n+\n+#define BTRFS_IOCTL_DEV_REPLACE_CONT_READING_FROM_SRCDEV_MODE_ALWAYS\t0\n+#define BTRFS_IOCTL_DEV_REPLACE_CONT_READING_FROM_SRCDEV_MODE_AVOID\t1\n+struct btrfs_ioctl_dev_replace_start_params {\n+\t__u64 srcdevid;\t/* in, if 0, use srcdev_name instead */\n+\t__u64 cont_reading_from_srcdev_mode;\t/* in, see #define\n+\t\t\t\t\t\t * above */\n+\t__u8 srcdev_name[BTRFS_DEVICE_PATH_NAME_MAX + 1];\t/* in */\n+\t__u8 tgtdev_name[BTRFS_DEVICE_PATH_NAME_MAX + 1];\t/* in */\n+};\n+\n+#define BTRFS_IOCTL_DEV_REPLACE_STATE_NEVER_STARTED\t0\n+#define BTRFS_IOCTL_DEV_REPLACE_STATE_STARTED\t\t1\n+#define BTRFS_IOCTL_DEV_REPLACE_STATE_FINISHED\t\t2\n+#define BTRFS_IOCTL_DEV_REPLACE_STATE_CANCELED\t\t3\n+#define BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED\t\t4\n+struct btrfs_ioctl_dev_replace_status_params {\n+\t__u64 replace_state;\t/* out, see #define above */\n+\t__u64 progress_1000;\t/* out, 0 <= x <= 1000 */\n+\t__u64 time_started;\t/* out, seconds since 1-Jan-1970 */\n+\t__u64 time_stopped;\t/* out, seconds since 1-Jan-1970 */\n+\t__u64 num_write_errors;\t/* out */\n+\t__u64 num_uncorrectable_read_errors;\t/* out */\n+};\n+\n+#define BTRFS_IOCTL_DEV_REPLACE_CMD_START\t\t\t0\n+#define BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS\t\t\t1\n+#define BTRFS_IOCTL_DEV_REPLACE_CMD_CANCEL\t\t\t2\n+#define BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR\t\t\t0\n+#define BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED\t\t1\n+#define BTRFS_IOCTL_DEV_REPLACE_RESULT_ALREADY_STARTED\t\t2\n+#define BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS\t\t3\n+struct btrfs_ioctl_dev_replace_args {\n+\t__u64 cmd;\t/* in */\n+\t__u64 result;\t/* out */\n+\n+\tunion {\n+\t\tstruct btrfs_ioctl_dev_replace_start_params start;\n+\t\tstruct btrfs_ioctl_dev_replace_status_params status;\n+\t};\t/* in/out */\n+\n+\t__u64 spare[64];\n+};\n+\n+struct btrfs_ioctl_dev_info_args {\n+\t__u64 devid;\t\t\t\t/* in/out */\n+\t__u8 uuid[BTRFS_UUID_SIZE];\t\t/* in/out */\n+\t__u64 bytes_used;\t\t\t/* out */\n+\t__u64 total_bytes;\t\t\t/* out */\n+\t__u64 unused[379];\t\t\t/* pad to 4k */\n+\t__u8 path[BTRFS_DEVICE_PATH_NAME_MAX];\t/* out */\n+};\n+\n+struct btrfs_ioctl_fs_info_args {\n+\t__u64 max_id;\t\t\t\t/* out */\n+\t__u64 num_devices;\t\t\t/* out */\n+\t__u8 fsid[BTRFS_FSID_SIZE];\t\t/* out */\n+\t__u32 nodesize;\t\t\t\t/* out */\n+\t__u32 sectorsize;\t\t\t/* out */\n+\t__u32 clone_alignment;\t\t\t/* out */\n+\t__u32 reserved32;\n+\t__u64 reserved[122];\t\t\t/* pad to 1k */\n+};\n+\n+/*\n+ * feature flags\n+ *\n+ * Used by:\n+ * struct btrfs_ioctl_feature_flags\n+ */\n+#define BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE\t\t(1ULL << 0)\n+/*\n+ * Older kernels (< 4.9) on big-endian systems produced broken free space tree\n+ * bitmaps, and btrfs-progs also used to corrupt the free space tree (versions\n+ * < 4.7.3).  If this bit is clear, then the free space tree cannot be trusted.\n+ * btrfs-progs can also intentionally clear this bit to ask the kernel to\n+ * rebuild the free space tree, however this might not work on older kernels\n+ * that do not know about this bit. If not sure, clear the cache manually on\n+ * first mount when booting older kernel versions.\n+ */\n+#define BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE_VALID\t(1ULL << 1)\n+\n+#define BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF\t(1ULL << 0)\n+#define BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL\t(1ULL << 1)\n+#define BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS\t(1ULL << 2)\n+#define BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO\t(1ULL << 3)\n+#define BTRFS_FEATURE_INCOMPAT_COMPRESS_ZSTD\t(1ULL << 4)\n+\n+/*\n+ * older kernels tried to do bigger metadata blocks, but the\n+ * code was pretty buggy.  Lets not let them try anymore.\n+ */\n+#define BTRFS_FEATURE_INCOMPAT_BIG_METADATA\t(1ULL << 5)\n+\n+#define BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF\t(1ULL << 6)\n+#define BTRFS_FEATURE_INCOMPAT_RAID56\t\t(1ULL << 7)\n+#define BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA\t(1ULL << 8)\n+#define BTRFS_FEATURE_INCOMPAT_NO_HOLES\t\t(1ULL << 9)\n+#define BTRFS_FEATURE_INCOMPAT_METADATA_UUID\t(1ULL << 10)\n+\n+struct btrfs_ioctl_feature_flags {\n+\t__u64 compat_flags;\n+\t__u64 compat_ro_flags;\n+\t__u64 incompat_flags;\n+};\n+\n+/* balance control ioctl modes */\n+#define BTRFS_BALANCE_CTL_PAUSE\t\t1\n+#define BTRFS_BALANCE_CTL_CANCEL\t2\n+\n+/*\n+ * this is packed, because it should be exactly the same as its disk\n+ * byte order counterpart (struct btrfs_disk_balance_args)\n+ */\n+struct btrfs_balance_args {\n+\t__u64 profiles;\n+\tunion {\n+\t\t__u64 usage;\n+\t\tstruct {\n+\t\t\t__u32 usage_min;\n+\t\t\t__u32 usage_max;\n+\t\t};\n+\t};\n+\t__u64 devid;\n+\t__u64 pstart;\n+\t__u64 pend;\n+\t__u64 vstart;\n+\t__u64 vend;\n+\n+\t__u64 target;\n+\n+\t__u64 flags;\n+\n+\t/*\n+\t * BTRFS_BALANCE_ARGS_LIMIT with value 'limit'\n+\t * BTRFS_BALANCE_ARGS_LIMIT_RANGE - the extend version can use minimum\n+\t * and maximum\n+\t */\n+\tunion {\n+\t\t__u64 limit;\t\t/* limit number of processed chunks */\n+\t\tstruct {\n+\t\t\t__u32 limit_min;\n+\t\t\t__u32 limit_max;\n+\t\t};\n+\t};\n+\n+\t/*\n+\t * Process chunks that cross stripes_min..stripes_max devices,\n+\t * BTRFS_BALANCE_ARGS_STRIPES_RANGE\n+\t */\n+\t__u32 stripes_min;\n+\t__u32 stripes_max;\n+\n+\t__u64 unused[6];\n+} __attribute__ ((__packed__));\n+\n+/* report balance progress to userspace */\n+struct btrfs_balance_progress {\n+\t__u64 expected;\t\t/* estimated # of chunks that will be\n+\t\t\t\t * relocated to fulfill the request */\n+\t__u64 considered;\t/* # of chunks we have considered so far */\n+\t__u64 completed;\t/* # of chunks relocated so far */\n+};\n+\n+/*\n+ * flags definition for balance\n+ *\n+ * Restriper's general type filter\n+ *\n+ * Used by:\n+ * btrfs_ioctl_balance_args.flags\n+ * btrfs_balance_control.flags (internal)\n+ */\n+#define BTRFS_BALANCE_DATA\t\t(1ULL << 0)\n+#define BTRFS_BALANCE_SYSTEM\t\t(1ULL << 1)\n+#define BTRFS_BALANCE_METADATA\t\t(1ULL << 2)\n+\n+#define BTRFS_BALANCE_TYPE_MASK\t\t(BTRFS_BALANCE_DATA |\t    \\\n+\t\t\t\t\t BTRFS_BALANCE_SYSTEM |\t    \\\n+\t\t\t\t\t BTRFS_BALANCE_METADATA)\n+\n+#define BTRFS_BALANCE_FORCE\t\t(1ULL << 3)\n+#define BTRFS_BALANCE_RESUME\t\t(1ULL << 4)\n+\n+/*\n+ * flags definitions for per-type balance args\n+ *\n+ * Balance filters\n+ *\n+ * Used by:\n+ * struct btrfs_balance_args\n+ */\n+#define BTRFS_BALANCE_ARGS_PROFILES\t(1ULL << 0)\n+#define BTRFS_BALANCE_ARGS_USAGE\t(1ULL << 1)\n+#define BTRFS_BALANCE_ARGS_DEVID\t(1ULL << 2)\n+#define BTRFS_BALANCE_ARGS_DRANGE\t(1ULL << 3)\n+#define BTRFS_BALANCE_ARGS_VRANGE\t(1ULL << 4)\n+#define BTRFS_BALANCE_ARGS_LIMIT\t(1ULL << 5)\n+#define BTRFS_BALANCE_ARGS_LIMIT_RANGE\t(1ULL << 6)\n+#define BTRFS_BALANCE_ARGS_STRIPES_RANGE (1ULL << 7)\n+#define BTRFS_BALANCE_ARGS_USAGE_RANGE\t(1ULL << 10)\n+\n+#define BTRFS_BALANCE_ARGS_MASK\t\t\t\\\n+\t(BTRFS_BALANCE_ARGS_PROFILES |\t\t\\\n+\t BTRFS_BALANCE_ARGS_USAGE |\t\t\\\n+\t BTRFS_BALANCE_ARGS_DEVID | \t\t\\\n+\t BTRFS_BALANCE_ARGS_DRANGE |\t\t\\\n+\t BTRFS_BALANCE_ARGS_VRANGE |\t\t\\\n+\t BTRFS_BALANCE_ARGS_LIMIT |\t\t\\\n+\t BTRFS_BALANCE_ARGS_LIMIT_RANGE |\t\\\n+\t BTRFS_BALANCE_ARGS_STRIPES_RANGE |\t\\\n+\t BTRFS_BALANCE_ARGS_USAGE_RANGE)\n+\n+/*\n+ * Profile changing flags.  When SOFT is set we won't relocate chunk if\n+ * it already has the target profile (even though it may be\n+ * half-filled).\n+ */\n+#define BTRFS_BALANCE_ARGS_CONVERT\t(1ULL << 8)\n+#define BTRFS_BALANCE_ARGS_SOFT\t\t(1ULL << 9)\n+\n+\n+/*\n+ * flags definition for balance state\n+ *\n+ * Used by:\n+ * struct btrfs_ioctl_balance_args.state\n+ */\n+#define BTRFS_BALANCE_STATE_RUNNING\t(1ULL << 0)\n+#define BTRFS_BALANCE_STATE_PAUSE_REQ\t(1ULL << 1)\n+#define BTRFS_BALANCE_STATE_CANCEL_REQ\t(1ULL << 2)\n+\n+struct btrfs_ioctl_balance_args {\n+\t__u64 flags;\t\t\t\t/* in/out */\n+\t__u64 state;\t\t\t\t/* out */\n+\n+\tstruct btrfs_balance_args data;\t\t/* in/out */\n+\tstruct btrfs_balance_args meta;\t\t/* in/out */\n+\tstruct btrfs_balance_args sys;\t\t/* in/out */\n+\n+\tstruct btrfs_balance_progress stat;\t/* out */\n+\n+\t__u64 unused[72];\t\t\t/* pad to 1k */\n+};\n+\n+#define BTRFS_INO_LOOKUP_PATH_MAX 4080\n+struct btrfs_ioctl_ino_lookup_args {\n+\t__u64 treeid;\n+\t__u64 objectid;\n+\tchar name[BTRFS_INO_LOOKUP_PATH_MAX];\n+};\n+\n+#define BTRFS_INO_LOOKUP_USER_PATH_MAX (4080 - BTRFS_VOL_NAME_MAX - 1)\n+struct btrfs_ioctl_ino_lookup_user_args {\n+\t/* in, inode number containing the subvolume of 'subvolid' */\n+\t__u64 dirid;\n+\t/* in */\n+\t__u64 treeid;\n+\t/* out, name of the subvolume of 'treeid' */\n+\tchar name[BTRFS_VOL_NAME_MAX + 1];\n+\t/*\n+\t * out, constructed path from the directory with which the ioctl is\n+\t * called to dirid\n+\t */\n+\tchar path[BTRFS_INO_LOOKUP_USER_PATH_MAX];\n+};\n+\n+/* Search criteria for the btrfs SEARCH ioctl family. */\n+struct btrfs_ioctl_search_key {\n+\t/*\n+\t * The tree we're searching in. 1 is the tree of tree roots, 2 is the\n+\t * extent tree, etc...\n+\t *\n+\t * A special tree_id value of 0 will cause a search in the subvolume\n+\t * tree that the inode which is passed to the ioctl is part of.\n+\t */\n+\t__u64 tree_id;\t\t/* in */\n+\n+\t/*\n+\t * When doing a tree search, we're actually taking a slice from a\n+\t * linear search space of 136-bit keys.\n+\t *\n+\t * A full 136-bit tree key is composed as:\n+\t *   (objectid << 72) + (type << 64) + offset\n+\t *\n+\t * The individual min and max values for objectid, type and offset\n+\t * define the min_key and max_key values for the search range. All\n+\t * metadata items with a key in the interval [min_key, max_key] will be\n+\t * returned.\n+\t *\n+\t * Additionally, we can filter the items returned on transaction id of\n+\t * the metadata block they're stored in by specifying a transid range.\n+\t * Be aware that this transaction id only denotes when the metadata\n+\t * page that currently contains the item got written the last time as\n+\t * result of a COW operation.  The number does not have any meaning\n+\t * related to the transaction in which an individual item that is being\n+\t * returned was created or changed.\n+\t */\n+\t__u64 min_objectid;\t/* in */\n+\t__u64 max_objectid;\t/* in */\n+\t__u64 min_offset;\t/* in */\n+\t__u64 max_offset;\t/* in */\n+\t__u64 min_transid;\t/* in */\n+\t__u64 max_transid;\t/* in */\n+\t__u32 min_type;\t\t/* in */\n+\t__u32 max_type;\t\t/* in */\n+\n+\t/*\n+\t * input: The maximum amount of results desired.\n+\t * output: The actual amount of items returned, restricted by any of:\n+\t *  - reaching the upper bound of the search range\n+\t *  - reaching the input nr_items amount of items\n+\t *  - completely filling the supplied memory buffer\n+\t */\n+\t__u32 nr_items;\t\t/* in/out */\n+\n+\t/* align to 64 bits */\n+\t__u32 unused;\n+\n+\t/* some extra for later */\n+\t__u64 unused1;\n+\t__u64 unused2;\n+\t__u64 unused3;\n+\t__u64 unused4;\n+};\n+\n+struct btrfs_ioctl_search_header {\n+\t__u64 transid;\n+\t__u64 objectid;\n+\t__u64 offset;\n+\t__u32 type;\n+\t__u32 len;\n+};\n+\n+#define BTRFS_SEARCH_ARGS_BUFSIZE (4096 - sizeof(struct btrfs_ioctl_search_key))\n+/*\n+ * the buf is an array of search headers where\n+ * each header is followed by the actual item\n+ * the type field is expanded to 32 bits for alignment\n+ */\n+struct btrfs_ioctl_search_args {\n+\tstruct btrfs_ioctl_search_key key;\n+\tchar buf[BTRFS_SEARCH_ARGS_BUFSIZE];\n+};\n+\n+struct btrfs_ioctl_search_args_v2 {\n+\tstruct btrfs_ioctl_search_key key; /* in/out - search parameters */\n+\t__u64 buf_size;\t\t   /* in - size of buffer\n+\t\t\t\t\t    * out - on EOVERFLOW: needed size\n+\t\t\t\t\t    *       to store item */\n+\t__u64 buf[0];                       /* out - found items */\n+};\n+\n+struct btrfs_ioctl_clone_range_args {\n+  __s64 src_fd;\n+  __u64 src_offset, src_length;\n+  __u64 dest_offset;\n+};\n+\n+/*\n+ * flags definition for the defrag range ioctl\n+ *\n+ * Used by:\n+ * struct btrfs_ioctl_defrag_range_args.flags\n+ */\n+#define BTRFS_DEFRAG_RANGE_COMPRESS 1\n+#define BTRFS_DEFRAG_RANGE_START_IO 2\n+struct btrfs_ioctl_defrag_range_args {\n+\t/* start of the defrag operation */\n+\t__u64 start;\n+\n+\t/* number of bytes to defrag, use (u64)-1 to say all */\n+\t__u64 len;\n+\n+\t/*\n+\t * flags for the operation, which can include turning\n+\t * on compression for this one defrag\n+\t */\n+\t__u64 flags;\n+\n+\t/*\n+\t * any extent bigger than this will be considered\n+\t * already defragged.  Use 0 to take the kernel default\n+\t * Use 1 to say every single extent must be rewritten\n+\t */\n+\t__u32 extent_thresh;\n+\n+\t/*\n+\t * which compression method to use if turning on compression\n+\t * for this defrag operation.  If unspecified, zlib will\n+\t * be used\n+\t */\n+\t__u32 compress_type;\n+\n+\t/* spare for later */\n+\t__u32 unused[4];\n+};\n+\n+\n+#define BTRFS_SAME_DATA_DIFFERS\t1\n+/* For extent-same ioctl */\n+struct btrfs_ioctl_same_extent_info {\n+\t__s64 fd;\t\t/* in - destination file */\n+\t__u64 logical_offset;\t/* in - start of extent in destination */\n+\t__u64 bytes_deduped;\t/* out - total # of bytes we were able\n+\t\t\t\t * to dedupe from this file */\n+\t/* status of this dedupe operation:\n+\t * 0 if dedup succeeds\n+\t * < 0 for error\n+\t * == BTRFS_SAME_DATA_DIFFERS if data differs\n+\t */\n+\t__s32 status;\t\t/* out - see above description */\n+\t__u32 reserved;\n+};\n+\n+struct btrfs_ioctl_same_args {\n+\t__u64 logical_offset;\t/* in - start of extent in source */\n+\t__u64 length;\t\t/* in - length of extent */\n+\t__u16 dest_count;\t/* in - total elements in info array */\n+\t__u16 reserved1;\n+\t__u32 reserved2;\n+\tstruct btrfs_ioctl_same_extent_info info[0];\n+};\n+\n+struct btrfs_ioctl_space_info {\n+\t__u64 flags;\n+\t__u64 total_bytes;\n+\t__u64 used_bytes;\n+};\n+\n+struct btrfs_ioctl_space_args {\n+\t__u64 space_slots;\n+\t__u64 total_spaces;\n+\tstruct btrfs_ioctl_space_info spaces[0];\n+};\n+\n+struct btrfs_data_container {\n+\t__u32\tbytes_left;\t/* out -- bytes not needed to deliver output */\n+\t__u32\tbytes_missing;\t/* out -- additional bytes needed for result */\n+\t__u32\telem_cnt;\t/* out */\n+\t__u32\telem_missed;\t/* out */\n+\t__u64\tval[0];\t\t/* out */\n+};\n+\n+struct btrfs_ioctl_ino_path_args {\n+\t__u64\t\t\t\tinum;\t\t/* in */\n+\t__u64\t\t\t\tsize;\t\t/* in */\n+\t__u64\t\t\t\treserved[4];\n+\t/* struct btrfs_data_container\t*fspath;\t   out */\n+\t__u64\t\t\t\tfspath;\t\t/* out */\n+};\n+\n+struct btrfs_ioctl_logical_ino_args {\n+\t__u64\t\t\t\tlogical;\t/* in */\n+\t__u64\t\t\t\tsize;\t\t/* in */\n+\t__u64\t\t\t\treserved[3];\t/* must be 0 for now */\n+\t__u64\t\t\t\tflags;\t\t/* in, v2 only */\n+\t/* struct btrfs_data_container\t*inodes;\tout   */\n+\t__u64\t\t\t\tinodes;\n+};\n+/* Return every ref to the extent, not just those containing logical block.\n+ * Requires logical == extent bytenr. */\n+#define BTRFS_LOGICAL_INO_ARGS_IGNORE_OFFSET\t(1ULL << 0)\n+\n+enum btrfs_dev_stat_values {\n+\t/* disk I/O failure stats */\n+\tBTRFS_DEV_STAT_WRITE_ERRS, /* EIO or EREMOTEIO from lower layers */\n+\tBTRFS_DEV_STAT_READ_ERRS, /* EIO or EREMOTEIO from lower layers */\n+\tBTRFS_DEV_STAT_FLUSH_ERRS, /* EIO or EREMOTEIO from lower layers */\n+\n+\t/* stats for indirect indications for I/O failures */\n+\tBTRFS_DEV_STAT_CORRUPTION_ERRS, /* checksum error, bytenr error or\n+\t\t\t\t\t * contents is illegal: this is an\n+\t\t\t\t\t * indication that the block was damaged\n+\t\t\t\t\t * during read or write, or written to\n+\t\t\t\t\t * wrong location or read from wrong\n+\t\t\t\t\t * location */\n+\tBTRFS_DEV_STAT_GENERATION_ERRS, /* an indication that blocks have not\n+\t\t\t\t\t * been written */\n+\n+\tBTRFS_DEV_STAT_VALUES_MAX\n+};\n+\n+/* Reset statistics after reading; needs SYS_ADMIN capability */\n+#define\tBTRFS_DEV_STATS_RESET\t\t(1ULL << 0)\n+\n+struct btrfs_ioctl_get_dev_stats {\n+\t__u64 devid;\t\t\t\t/* in */\n+\t__u64 nr_items;\t\t\t\t/* in/out */\n+\t__u64 flags;\t\t\t\t/* in/out */\n+\n+\t/* out values: */\n+\t__u64 values[BTRFS_DEV_STAT_VALUES_MAX];\n+\n+\t__u64 unused[128 - 2 - BTRFS_DEV_STAT_VALUES_MAX]; /* pad to 1k */\n+};\n+\n+#define BTRFS_QUOTA_CTL_ENABLE\t1\n+#define BTRFS_QUOTA_CTL_DISABLE\t2\n+#define BTRFS_QUOTA_CTL_RESCAN__NOTUSED\t3\n+struct btrfs_ioctl_quota_ctl_args {\n+\t__u64 cmd;\n+\t__u64 status;\n+};\n+\n+struct btrfs_ioctl_quota_rescan_args {\n+\t__u64\tflags;\n+\t__u64   progress;\n+\t__u64   reserved[6];\n+};\n+\n+struct btrfs_ioctl_qgroup_assign_args {\n+\t__u64 assign;\n+\t__u64 src;\n+\t__u64 dst;\n+};\n+\n+struct btrfs_ioctl_qgroup_create_args {\n+\t__u64 create;\n+\t__u64 qgroupid;\n+};\n+struct btrfs_ioctl_timespec {\n+\t__u64 sec;\n+\t__u32 nsec;\n+};\n+\n+struct btrfs_ioctl_received_subvol_args {\n+\tchar\tuuid[BTRFS_UUID_SIZE];\t/* in */\n+\t__u64\tstransid;\t\t/* in */\n+\t__u64\trtransid;\t\t/* out */\n+\tstruct btrfs_ioctl_timespec stime; /* in */\n+\tstruct btrfs_ioctl_timespec rtime; /* out */\n+\t__u64\tflags;\t\t\t/* in */\n+\t__u64\treserved[16];\t\t/* in */\n+};\n+\n+/*\n+ * Caller doesn't want file data in the send stream, even if the\n+ * search of clone sources doesn't find an extent. UPDATE_EXTENT\n+ * commands will be sent instead of WRITE commands.\n+ */\n+#define BTRFS_SEND_FLAG_NO_FILE_DATA\t\t0x1\n+\n+/*\n+ * Do not add the leading stream header. Used when multiple snapshots\n+ * are sent back to back.\n+ */\n+#define BTRFS_SEND_FLAG_OMIT_STREAM_HEADER\t0x2\n+\n+/*\n+ * Omit the command at the end of the stream that indicated the end\n+ * of the stream. This option is used when multiple snapshots are\n+ * sent back to back.\n+ */\n+#define BTRFS_SEND_FLAG_OMIT_END_CMD\t\t0x4\n+\n+#define BTRFS_SEND_FLAG_MASK \\\n+\t(BTRFS_SEND_FLAG_NO_FILE_DATA | \\\n+\t BTRFS_SEND_FLAG_OMIT_STREAM_HEADER | \\\n+\t BTRFS_SEND_FLAG_OMIT_END_CMD)\n+\n+struct btrfs_ioctl_send_args {\n+\t__s64 send_fd;\t\t\t/* in */\n+\t__u64 clone_sources_count;\t/* in */\n+\t__u64 *clone_sources;\t/* in */\n+\t__u64 parent_root;\t\t/* in */\n+\t__u64 flags;\t\t\t/* in */\n+\t__u64 reserved[4];\t\t/* in */\n+};\n+\n+/*\n+ * Information about a fs tree root.\n+ *\n+ * All items are filled by the ioctl\n+ */\n+struct btrfs_ioctl_get_subvol_info_args {\n+\t/* Id of this subvolume */\n+\t__u64 treeid;\n+\n+\t/* Name of this subvolume, used to get the real name at mount point */\n+\tchar name[BTRFS_VOL_NAME_MAX + 1];\n+\n+\t/*\n+\t * Id of the subvolume which contains this subvolume.\n+\t * Zero for top-level subvolume or a deleted subvolume.\n+\t */\n+\t__u64 parent_id;\n+\n+\t/*\n+\t * Inode number of the directory which contains this subvolume.\n+\t * Zero for top-level subvolume or a deleted subvolume\n+\t */\n+\t__u64 dirid;\n+\n+\t/* Latest transaction id of this subvolume */\n+\t__u64 generation;\n+\n+\t/* Flags of this subvolume */\n+\t__u64 flags;\n+\n+\t/* UUID of this subvolume */\n+\t__u8 uuid[BTRFS_UUID_SIZE];\n+\n+\t/*\n+\t * UUID of the subvolume of which this subvolume is a snapshot.\n+\t * All zero for a non-snapshot subvolume.\n+\t */\n+\t__u8 parent_uuid[BTRFS_UUID_SIZE];\n+\n+\t/*\n+\t * UUID of the subvolume from which this subvolume was received.\n+\t * All zero for non-received subvolume.\n+\t */\n+\t__u8 received_uuid[BTRFS_UUID_SIZE];\n+\n+\t/* Transaction id indicating when change/create/send/receive happened */\n+\t__u64 ctransid;\n+\t__u64 otransid;\n+\t__u64 stransid;\n+\t__u64 rtransid;\n+\t/* Time corresponding to c/o/s/rtransid */\n+\tstruct btrfs_ioctl_timespec ctime;\n+\tstruct btrfs_ioctl_timespec otime;\n+\tstruct btrfs_ioctl_timespec stime;\n+\tstruct btrfs_ioctl_timespec rtime;\n+\n+\t/* Must be zero */\n+\t__u64 reserved[8];\n+};\n+\n+#define BTRFS_MAX_ROOTREF_BUFFER_NUM 255\n+struct btrfs_ioctl_get_subvol_rootref_args {\n+\t\t/* in/out, minimum id of rootref's treeid to be searched */\n+\t\t__u64 min_treeid;\n+\n+\t\t/* out */\n+\t\tstruct {\n+\t\t\t__u64 treeid;\n+\t\t\t__u64 dirid;\n+\t\t} rootref[BTRFS_MAX_ROOTREF_BUFFER_NUM];\n+\n+\t\t/* out, number of found items */\n+\t\t__u8 num_items;\n+\t\t__u8 align[7];\n+};\n+\n+/* Error codes as returned by the kernel */\n+enum btrfs_err_code {\n+\tBTRFS_ERROR_DEV_RAID1_MIN_NOT_MET = 1,\n+\tBTRFS_ERROR_DEV_RAID10_MIN_NOT_MET,\n+\tBTRFS_ERROR_DEV_RAID5_MIN_NOT_MET,\n+\tBTRFS_ERROR_DEV_RAID6_MIN_NOT_MET,\n+\tBTRFS_ERROR_DEV_TGT_REPLACE,\n+\tBTRFS_ERROR_DEV_MISSING_NOT_FOUND,\n+\tBTRFS_ERROR_DEV_ONLY_WRITABLE,\n+\tBTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS\n+};\n+\n+#define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \\\n+\t\t\t\t   struct btrfs_ioctl_vol_args)\n+#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \\\n+\t\t\t\t   struct btrfs_ioctl_vol_args)\n+#define BTRFS_IOC_RESIZE _IOW(BTRFS_IOCTL_MAGIC, 3, \\\n+\t\t\t\t   struct btrfs_ioctl_vol_args)\n+#define BTRFS_IOC_SCAN_DEV _IOW(BTRFS_IOCTL_MAGIC, 4, \\\n+\t\t\t\t   struct btrfs_ioctl_vol_args)\n+/* trans start and trans end are dangerous, and only for\n+ * use by applications that know how to avoid the\n+ * resulting deadlocks\n+ */\n+#define BTRFS_IOC_TRANS_START  _IO(BTRFS_IOCTL_MAGIC, 6)\n+#define BTRFS_IOC_TRANS_END    _IO(BTRFS_IOCTL_MAGIC, 7)\n+#define BTRFS_IOC_SYNC         _IO(BTRFS_IOCTL_MAGIC, 8)\n+\n+#define BTRFS_IOC_CLONE        _IOW(BTRFS_IOCTL_MAGIC, 9, int)\n+#define BTRFS_IOC_ADD_DEV _IOW(BTRFS_IOCTL_MAGIC, 10, \\\n+\t\t\t\t   struct btrfs_ioctl_vol_args)\n+#define BTRFS_IOC_RM_DEV _IOW(BTRFS_IOCTL_MAGIC, 11, \\\n+\t\t\t\t   struct btrfs_ioctl_vol_args)\n+#define BTRFS_IOC_BALANCE _IOW(BTRFS_IOCTL_MAGIC, 12, \\\n+\t\t\t\t   struct btrfs_ioctl_vol_args)\n+\n+#define BTRFS_IOC_CLONE_RANGE _IOW(BTRFS_IOCTL_MAGIC, 13, \\\n+\t\t\t\t  struct btrfs_ioctl_clone_range_args)\n+\n+#define BTRFS_IOC_SUBVOL_CREATE _IOW(BTRFS_IOCTL_MAGIC, 14, \\\n+\t\t\t\t   struct btrfs_ioctl_vol_args)\n+#define BTRFS_IOC_SNAP_DESTROY _IOW(BTRFS_IOCTL_MAGIC, 15, \\\n+\t\t\t\tstruct btrfs_ioctl_vol_args)\n+#define BTRFS_IOC_DEFRAG_RANGE _IOW(BTRFS_IOCTL_MAGIC, 16, \\\n+\t\t\t\tstruct btrfs_ioctl_defrag_range_args)\n+#define BTRFS_IOC_TREE_SEARCH _IOWR(BTRFS_IOCTL_MAGIC, 17, \\\n+\t\t\t\t   struct btrfs_ioctl_search_args)\n+#define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \\\n+\t\t\t\t\t   struct btrfs_ioctl_search_args_v2)\n+#define BTRFS_IOC_INO_LOOKUP _IOWR(BTRFS_IOCTL_MAGIC, 18, \\\n+\t\t\t\t   struct btrfs_ioctl_ino_lookup_args)\n+#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, __u64)\n+#define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \\\n+\t\t\t\t    struct btrfs_ioctl_space_args)\n+#define BTRFS_IOC_START_SYNC _IOR(BTRFS_IOCTL_MAGIC, 24, __u64)\n+#define BTRFS_IOC_WAIT_SYNC  _IOW(BTRFS_IOCTL_MAGIC, 22, __u64)\n+#define BTRFS_IOC_SNAP_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 23, \\\n+\t\t\t\t   struct btrfs_ioctl_vol_args_v2)\n+#define BTRFS_IOC_SUBVOL_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 24, \\\n+\t\t\t\t   struct btrfs_ioctl_vol_args_v2)\n+#define BTRFS_IOC_SUBVOL_GETFLAGS _IOR(BTRFS_IOCTL_MAGIC, 25, __u64)\n+#define BTRFS_IOC_SUBVOL_SETFLAGS _IOW(BTRFS_IOCTL_MAGIC, 26, __u64)\n+#define BTRFS_IOC_SCRUB _IOWR(BTRFS_IOCTL_MAGIC, 27, \\\n+\t\t\t      struct btrfs_ioctl_scrub_args)\n+#define BTRFS_IOC_SCRUB_CANCEL _IO(BTRFS_IOCTL_MAGIC, 28)\n+#define BTRFS_IOC_SCRUB_PROGRESS _IOWR(BTRFS_IOCTL_MAGIC, 29, \\\n+\t\t\t\t       struct btrfs_ioctl_scrub_args)\n+#define BTRFS_IOC_DEV_INFO _IOWR(BTRFS_IOCTL_MAGIC, 30, \\\n+\t\t\t\t struct btrfs_ioctl_dev_info_args)\n+#define BTRFS_IOC_FS_INFO _IOR(BTRFS_IOCTL_MAGIC, 31, \\\n+\t\t\t       struct btrfs_ioctl_fs_info_args)\n+#define BTRFS_IOC_BALANCE_V2 _IOWR(BTRFS_IOCTL_MAGIC, 32, \\\n+\t\t\t\t   struct btrfs_ioctl_balance_args)\n+#define BTRFS_IOC_BALANCE_CTL _IOW(BTRFS_IOCTL_MAGIC, 33, int)\n+#define BTRFS_IOC_BALANCE_PROGRESS _IOR(BTRFS_IOCTL_MAGIC, 34, \\\n+\t\t\t\t\tstruct btrfs_ioctl_balance_args)\n+#define BTRFS_IOC_INO_PATHS _IOWR(BTRFS_IOCTL_MAGIC, 35, \\\n+\t\t\t\t\tstruct btrfs_ioctl_ino_path_args)\n+#define BTRFS_IOC_LOGICAL_INO _IOWR(BTRFS_IOCTL_MAGIC, 36, \\\n+\t\t\t\t\tstruct btrfs_ioctl_logical_ino_args)\n+#define BTRFS_IOC_SET_RECEIVED_SUBVOL _IOWR(BTRFS_IOCTL_MAGIC, 37, \\\n+\t\t\t\tstruct btrfs_ioctl_received_subvol_args)\n+#define BTRFS_IOC_SEND _IOW(BTRFS_IOCTL_MAGIC, 38, struct btrfs_ioctl_send_args)\n+#define BTRFS_IOC_DEVICES_READY _IOR(BTRFS_IOCTL_MAGIC, 39, \\\n+\t\t\t\t     struct btrfs_ioctl_vol_args)\n+#define BTRFS_IOC_QUOTA_CTL _IOWR(BTRFS_IOCTL_MAGIC, 40, \\\n+\t\t\t       struct btrfs_ioctl_quota_ctl_args)\n+#define BTRFS_IOC_QGROUP_ASSIGN _IOW(BTRFS_IOCTL_MAGIC, 41, \\\n+\t\t\t       struct btrfs_ioctl_qgroup_assign_args)\n+#define BTRFS_IOC_QGROUP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 42, \\\n+\t\t\t       struct btrfs_ioctl_qgroup_create_args)\n+#define BTRFS_IOC_QGROUP_LIMIT _IOR(BTRFS_IOCTL_MAGIC, 43, \\\n+\t\t\t       struct btrfs_ioctl_qgroup_limit_args)\n+#define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \\\n+\t\t\t       struct btrfs_ioctl_quota_rescan_args)\n+#define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \\\n+\t\t\t       struct btrfs_ioctl_quota_rescan_args)\n+#define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)\n+#define BTRFS_IOC_GET_FSLABEL _IOR(BTRFS_IOCTL_MAGIC, 49, \\\n+\t\t\t\t   char[BTRFS_LABEL_SIZE])\n+#define BTRFS_IOC_SET_FSLABEL _IOW(BTRFS_IOCTL_MAGIC, 50, \\\n+\t\t\t\t   char[BTRFS_LABEL_SIZE])\n+#define BTRFS_IOC_GET_DEV_STATS _IOWR(BTRFS_IOCTL_MAGIC, 52, \\\n+\t\t\t\t      struct btrfs_ioctl_get_dev_stats)\n+#define BTRFS_IOC_DEV_REPLACE _IOWR(BTRFS_IOCTL_MAGIC, 53, \\\n+\t\t\t\t    struct btrfs_ioctl_dev_replace_args)\n+#define BTRFS_IOC_FILE_EXTENT_SAME _IOWR(BTRFS_IOCTL_MAGIC, 54, \\\n+\t\t\t\t\t struct btrfs_ioctl_same_args)\n+#define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \\\n+\t\t\t\t   struct btrfs_ioctl_feature_flags)\n+#define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \\\n+\t\t\t\t   struct btrfs_ioctl_feature_flags[2])\n+#define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \\\n+\t\t\t\t   struct btrfs_ioctl_feature_flags[3])\n+#define BTRFS_IOC_RM_DEV_V2 _IOW(BTRFS_IOCTL_MAGIC, 58, \\\n+\t\t\t\t   struct btrfs_ioctl_vol_args_v2)\n+#define BTRFS_IOC_LOGICAL_INO_V2 _IOWR(BTRFS_IOCTL_MAGIC, 59, \\\n+\t\t\t\t\tstruct btrfs_ioctl_logical_ino_args)\n+#define BTRFS_IOC_GET_SUBVOL_INFO _IOR(BTRFS_IOCTL_MAGIC, 60, \\\n+\t\t\t\tstruct btrfs_ioctl_get_subvol_info_args)\n+#define BTRFS_IOC_GET_SUBVOL_ROOTREF _IOWR(BTRFS_IOCTL_MAGIC, 61, \\\n+\t\t\t\tstruct btrfs_ioctl_get_subvol_rootref_args)\n+#define BTRFS_IOC_INO_LOOKUP_USER _IOWR(BTRFS_IOCTL_MAGIC, 62, \\\n+\t\t\t\tstruct btrfs_ioctl_ino_lookup_user_args)\n+\n+#endif /* _UAPI_LINUX_BTRFS_H */\ndiff --git a/src/basic/linux/btrfs_tree.h b/src/basic/linux/btrfs_tree.h\nnew file mode 100644\nindex 00000000000..e974f4bb537\n--- /dev/null\n+++ b/src/basic/linux/btrfs_tree.h\n@@ -0,0 +1,974 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+#ifndef _BTRFS_CTREE_H_\n+#define _BTRFS_CTREE_H_\n+\n+#include <linux/btrfs.h>\n+#include <linux/types.h>\n+\n+/*\n+ * This header contains the structure definitions and constants used\n+ * by file system objects that can be retrieved using\n+ * the BTRFS_IOC_SEARCH_TREE ioctl.  That means basically anything that\n+ * is needed to describe a leaf node's key or item contents.\n+ */\n+\n+/* holds pointers to all of the tree roots */\n+#define BTRFS_ROOT_TREE_OBJECTID 1ULL\n+\n+/* stores information about which extents are in use, and reference counts */\n+#define BTRFS_EXTENT_TREE_OBJECTID 2ULL\n+\n+/*\n+ * chunk tree stores translations from logical -> physical block numbering\n+ * the super block points to the chunk tree\n+ */\n+#define BTRFS_CHUNK_TREE_OBJECTID 3ULL\n+\n+/*\n+ * stores information about which areas of a given device are in use.\n+ * one per device.  The tree of tree roots points to the device tree\n+ */\n+#define BTRFS_DEV_TREE_OBJECTID 4ULL\n+\n+/* one per subvolume, storing files and directories */\n+#define BTRFS_FS_TREE_OBJECTID 5ULL\n+\n+/* directory objectid inside the root tree */\n+#define BTRFS_ROOT_TREE_DIR_OBJECTID 6ULL\n+\n+/* holds checksums of all the data extents */\n+#define BTRFS_CSUM_TREE_OBJECTID 7ULL\n+\n+/* holds quota configuration and tracking */\n+#define BTRFS_QUOTA_TREE_OBJECTID 8ULL\n+\n+/* for storing items that use the BTRFS_UUID_KEY* types */\n+#define BTRFS_UUID_TREE_OBJECTID 9ULL\n+\n+/* tracks free space in block groups. */\n+#define BTRFS_FREE_SPACE_TREE_OBJECTID 10ULL\n+\n+/* device stats in the device tree */\n+#define BTRFS_DEV_STATS_OBJECTID 0ULL\n+\n+/* for storing balance parameters in the root tree */\n+#define BTRFS_BALANCE_OBJECTID -4ULL\n+\n+/* orhpan objectid for tracking unlinked/truncated files */\n+#define BTRFS_ORPHAN_OBJECTID -5ULL\n+\n+/* does write ahead logging to speed up fsyncs */\n+#define BTRFS_TREE_LOG_OBJECTID -6ULL\n+#define BTRFS_TREE_LOG_FIXUP_OBJECTID -7ULL\n+\n+/* for space balancing */\n+#define BTRFS_TREE_RELOC_OBJECTID -8ULL\n+#define BTRFS_DATA_RELOC_TREE_OBJECTID -9ULL\n+\n+/*\n+ * extent checksums all have this objectid\n+ * this allows them to share the logging tree\n+ * for fsyncs\n+ */\n+#define BTRFS_EXTENT_CSUM_OBJECTID -10ULL\n+\n+/* For storing free space cache */\n+#define BTRFS_FREE_SPACE_OBJECTID -11ULL\n+\n+/*\n+ * The inode number assigned to the special inode for storing\n+ * free ino cache\n+ */\n+#define BTRFS_FREE_INO_OBJECTID -12ULL\n+\n+/* dummy objectid represents multiple objectids */\n+#define BTRFS_MULTIPLE_OBJECTIDS -255ULL\n+\n+/*\n+ * All files have objectids in this range.\n+ */\n+#define BTRFS_FIRST_FREE_OBJECTID 256ULL\n+#define BTRFS_LAST_FREE_OBJECTID -256ULL\n+#define BTRFS_FIRST_CHUNK_TREE_OBJECTID 256ULL\n+\n+\n+/*\n+ * the device items go into the chunk tree.  The key is in the form\n+ * [ 1 BTRFS_DEV_ITEM_KEY device_id ]\n+ */\n+#define BTRFS_DEV_ITEMS_OBJECTID 1ULL\n+\n+#define BTRFS_BTREE_INODE_OBJECTID 1\n+\n+#define BTRFS_EMPTY_SUBVOL_DIR_OBJECTID 2\n+\n+#define BTRFS_DEV_REPLACE_DEVID 0ULL\n+\n+/*\n+ * inode items have the data typically returned from stat and store other\n+ * info about object characteristics.  There is one for every file and dir in\n+ * the FS\n+ */\n+#define BTRFS_INODE_ITEM_KEY\t\t1\n+#define BTRFS_INODE_REF_KEY\t\t12\n+#define BTRFS_INODE_EXTREF_KEY\t\t13\n+#define BTRFS_XATTR_ITEM_KEY\t\t24\n+#define BTRFS_ORPHAN_ITEM_KEY\t\t48\n+/* reserve 2-15 close to the inode for later flexibility */\n+\n+/*\n+ * dir items are the name -> inode pointers in a directory.  There is one\n+ * for every name in a directory.\n+ */\n+#define BTRFS_DIR_LOG_ITEM_KEY  60\n+#define BTRFS_DIR_LOG_INDEX_KEY 72\n+#define BTRFS_DIR_ITEM_KEY\t84\n+#define BTRFS_DIR_INDEX_KEY\t96\n+/*\n+ * extent data is for file data\n+ */\n+#define BTRFS_EXTENT_DATA_KEY\t108\n+\n+/*\n+ * extent csums are stored in a separate tree and hold csums for\n+ * an entire extent on disk.\n+ */\n+#define BTRFS_EXTENT_CSUM_KEY\t128\n+\n+/*\n+ * root items point to tree roots.  They are typically in the root\n+ * tree used by the super block to find all the other trees\n+ */\n+#define BTRFS_ROOT_ITEM_KEY\t132\n+\n+/*\n+ * root backrefs tie subvols and snapshots to the directory entries that\n+ * reference them\n+ */\n+#define BTRFS_ROOT_BACKREF_KEY\t144\n+\n+/*\n+ * root refs make a fast index for listing all of the snapshots and\n+ * subvolumes referenced by a given root.  They point directly to the\n+ * directory item in the root that references the subvol\n+ */\n+#define BTRFS_ROOT_REF_KEY\t156\n+\n+/*\n+ * extent items are in the extent map tree.  These record which blocks\n+ * are used, and how many references there are to each block\n+ */\n+#define BTRFS_EXTENT_ITEM_KEY\t168\n+\n+/*\n+ * The same as the BTRFS_EXTENT_ITEM_KEY, except it's metadata we already know\n+ * the length, so we save the level in key->offset instead of the length.\n+ */\n+#define BTRFS_METADATA_ITEM_KEY\t169\n+\n+#define BTRFS_TREE_BLOCK_REF_KEY\t176\n+\n+#define BTRFS_EXTENT_DATA_REF_KEY\t178\n+\n+#define BTRFS_EXTENT_REF_V0_KEY\t\t180\n+\n+#define BTRFS_SHARED_BLOCK_REF_KEY\t182\n+\n+#define BTRFS_SHARED_DATA_REF_KEY\t184\n+\n+/*\n+ * block groups give us hints into the extent allocation trees.  Which\n+ * blocks are free etc etc\n+ */\n+#define BTRFS_BLOCK_GROUP_ITEM_KEY 192\n+\n+/*\n+ * Every block group is represented in the free space tree by a free space info\n+ * item, which stores some accounting information. It is keyed on\n+ * (block_group_start, FREE_SPACE_INFO, block_group_length).\n+ */\n+#define BTRFS_FREE_SPACE_INFO_KEY 198\n+\n+/*\n+ * A free space extent tracks an extent of space that is free in a block group.\n+ * It is keyed on (start, FREE_SPACE_EXTENT, length).\n+ */\n+#define BTRFS_FREE_SPACE_EXTENT_KEY 199\n+\n+/*\n+ * When a block group becomes very fragmented, we convert it to use bitmaps\n+ * instead of extents. A free space bitmap is keyed on\n+ * (start, FREE_SPACE_BITMAP, length); the corresponding item is a bitmap with\n+ * (length / sectorsize) bits.\n+ */\n+#define BTRFS_FREE_SPACE_BITMAP_KEY 200\n+\n+#define BTRFS_DEV_EXTENT_KEY\t204\n+#define BTRFS_DEV_ITEM_KEY\t216\n+#define BTRFS_CHUNK_ITEM_KEY\t228\n+\n+/*\n+ * Records the overall state of the qgroups.\n+ * There's only one instance of this key present,\n+ * (0, BTRFS_QGROUP_STATUS_KEY, 0)\n+ */\n+#define BTRFS_QGROUP_STATUS_KEY         240\n+/*\n+ * Records the currently used space of the qgroup.\n+ * One key per qgroup, (0, BTRFS_QGROUP_INFO_KEY, qgroupid).\n+ */\n+#define BTRFS_QGROUP_INFO_KEY           242\n+/*\n+ * Contains the user configured limits for the qgroup.\n+ * One key per qgroup, (0, BTRFS_QGROUP_LIMIT_KEY, qgroupid).\n+ */\n+#define BTRFS_QGROUP_LIMIT_KEY          244\n+/*\n+ * Records the child-parent relationship of qgroups. For\n+ * each relation, 2 keys are present:\n+ * (childid, BTRFS_QGROUP_RELATION_KEY, parentid)\n+ * (parentid, BTRFS_QGROUP_RELATION_KEY, childid)\n+ */\n+#define BTRFS_QGROUP_RELATION_KEY       246\n+\n+/*\n+ * Obsolete name, see BTRFS_TEMPORARY_ITEM_KEY.\n+ */\n+#define BTRFS_BALANCE_ITEM_KEY\t248\n+\n+/*\n+ * The key type for tree items that are stored persistently, but do not need to\n+ * exist for extended period of time. The items can exist in any tree.\n+ *\n+ * [subtype, BTRFS_TEMPORARY_ITEM_KEY, data]\n+ *\n+ * Existing items:\n+ *\n+ * - balance status item\n+ *   (BTRFS_BALANCE_OBJECTID, BTRFS_TEMPORARY_ITEM_KEY, 0)\n+ */\n+#define BTRFS_TEMPORARY_ITEM_KEY\t248\n+\n+/*\n+ * Obsolete name, see BTRFS_PERSISTENT_ITEM_KEY\n+ */\n+#define BTRFS_DEV_STATS_KEY\t\t249\n+\n+/*\n+ * The key type for tree items that are stored persistently and usually exist\n+ * for a long period, eg. filesystem lifetime. The item kinds can be status\n+ * information, stats or preference values. The item can exist in any tree.\n+ *\n+ * [subtype, BTRFS_PERSISTENT_ITEM_KEY, data]\n+ *\n+ * Existing items:\n+ *\n+ * - device statistics, store IO stats in the device tree, one key for all\n+ *   stats\n+ *   (BTRFS_DEV_STATS_OBJECTID, BTRFS_DEV_STATS_KEY, 0)\n+ */\n+#define BTRFS_PERSISTENT_ITEM_KEY\t249\n+\n+/*\n+ * Persistantly stores the device replace state in the device tree.\n+ * The key is built like this: (0, BTRFS_DEV_REPLACE_KEY, 0).\n+ */\n+#define BTRFS_DEV_REPLACE_KEY\t250\n+\n+/*\n+ * Stores items that allow to quickly map UUIDs to something else.\n+ * These items are part of the filesystem UUID tree.\n+ * The key is built like this:\n+ * (UUID_upper_64_bits, BTRFS_UUID_KEY*, UUID_lower_64_bits).\n+ */\n+#if BTRFS_UUID_SIZE != 16\n+#error \"UUID items require BTRFS_UUID_SIZE == 16!\"\n+#endif\n+#define BTRFS_UUID_KEY_SUBVOL\t251\t/* for UUIDs assigned to subvols */\n+#define BTRFS_UUID_KEY_RECEIVED_SUBVOL\t252\t/* for UUIDs assigned to\n+\t\t\t\t\t\t * received subvols */\n+\n+/*\n+ * string items are for debugging.  They just store a short string of\n+ * data in the FS\n+ */\n+#define BTRFS_STRING_ITEM_KEY\t253\n+\n+\n+\n+/* 32 bytes in various csum fields */\n+#define BTRFS_CSUM_SIZE 32\n+\n+/* csum types */\n+#define BTRFS_CSUM_TYPE_CRC32\t0\n+\n+/*\n+ * flags definitions for directory entry item type\n+ *\n+ * Used by:\n+ * struct btrfs_dir_item.type\n+ */\n+#define BTRFS_FT_UNKNOWN\t0\n+#define BTRFS_FT_REG_FILE\t1\n+#define BTRFS_FT_DIR\t\t2\n+#define BTRFS_FT_CHRDEV\t\t3\n+#define BTRFS_FT_BLKDEV\t\t4\n+#define BTRFS_FT_FIFO\t\t5\n+#define BTRFS_FT_SOCK\t\t6\n+#define BTRFS_FT_SYMLINK\t7\n+#define BTRFS_FT_XATTR\t\t8\n+#define BTRFS_FT_MAX\t\t9\n+\n+/*\n+ * The key defines the order in the tree, and so it also defines (optimal)\n+ * block layout.\n+ *\n+ * objectid corresponds to the inode number.\n+ *\n+ * type tells us things about the object, and is a kind of stream selector.\n+ * so for a given inode, keys with type of 1 might refer to the inode data,\n+ * type of 2 may point to file data in the btree and type == 3 may point to\n+ * extents.\n+ *\n+ * offset is the starting byte offset for this key in the stream.\n+ *\n+ * btrfs_disk_key is in disk byte order.  struct btrfs_key is always\n+ * in cpu native order.  Otherwise they are identical and their sizes\n+ * should be the same (ie both packed)\n+ */\n+struct btrfs_disk_key {\n+\t__le64 objectid;\n+\t__u8 type;\n+\t__le64 offset;\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_key {\n+\t__u64 objectid;\n+\t__u8 type;\n+\t__u64 offset;\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_dev_item {\n+\t/* the internal btrfs device id */\n+\t__le64 devid;\n+\n+\t/* size of the device */\n+\t__le64 total_bytes;\n+\n+\t/* bytes used */\n+\t__le64 bytes_used;\n+\n+\t/* optimal io alignment for this device */\n+\t__le32 io_align;\n+\n+\t/* optimal io width for this device */\n+\t__le32 io_width;\n+\n+\t/* minimal io size for this device */\n+\t__le32 sector_size;\n+\n+\t/* type and info about this device */\n+\t__le64 type;\n+\n+\t/* expected generation for this device */\n+\t__le64 generation;\n+\n+\t/*\n+\t * starting byte of this partition on the device,\n+\t * to allow for stripe alignment in the future\n+\t */\n+\t__le64 start_offset;\n+\n+\t/* grouping information for allocation decisions */\n+\t__le32 dev_group;\n+\n+\t/* seek speed 0-100 where 100 is fastest */\n+\t__u8 seek_speed;\n+\n+\t/* bandwidth 0-100 where 100 is fastest */\n+\t__u8 bandwidth;\n+\n+\t/* btrfs generated uuid for this device */\n+\t__u8 uuid[BTRFS_UUID_SIZE];\n+\n+\t/* uuid of FS who owns this device */\n+\t__u8 fsid[BTRFS_UUID_SIZE];\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_stripe {\n+\t__le64 devid;\n+\t__le64 offset;\n+\t__u8 dev_uuid[BTRFS_UUID_SIZE];\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_chunk {\n+\t/* size of this chunk in bytes */\n+\t__le64 length;\n+\n+\t/* objectid of the root referencing this chunk */\n+\t__le64 owner;\n+\n+\t__le64 stripe_len;\n+\t__le64 type;\n+\n+\t/* optimal io alignment for this chunk */\n+\t__le32 io_align;\n+\n+\t/* optimal io width for this chunk */\n+\t__le32 io_width;\n+\n+\t/* minimal io size for this chunk */\n+\t__le32 sector_size;\n+\n+\t/* 2^16 stripes is quite a lot, a second limit is the size of a single\n+\t * item in the btree\n+\t */\n+\t__le16 num_stripes;\n+\n+\t/* sub stripes only matter for raid10 */\n+\t__le16 sub_stripes;\n+\tstruct btrfs_stripe stripe;\n+\t/* additional stripes go here */\n+} __attribute__ ((__packed__));\n+\n+#define BTRFS_FREE_SPACE_EXTENT\t1\n+#define BTRFS_FREE_SPACE_BITMAP\t2\n+\n+struct btrfs_free_space_entry {\n+\t__le64 offset;\n+\t__le64 bytes;\n+\t__u8 type;\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_free_space_header {\n+\tstruct btrfs_disk_key location;\n+\t__le64 generation;\n+\t__le64 num_entries;\n+\t__le64 num_bitmaps;\n+} __attribute__ ((__packed__));\n+\n+#define BTRFS_HEADER_FLAG_WRITTEN\t(1ULL << 0)\n+#define BTRFS_HEADER_FLAG_RELOC\t\t(1ULL << 1)\n+\n+/* Super block flags */\n+/* Errors detected */\n+#define BTRFS_SUPER_FLAG_ERROR\t\t(1ULL << 2)\n+\n+#define BTRFS_SUPER_FLAG_SEEDING\t(1ULL << 32)\n+#define BTRFS_SUPER_FLAG_METADUMP\t(1ULL << 33)\n+#define BTRFS_SUPER_FLAG_METADUMP_V2\t(1ULL << 34)\n+#define BTRFS_SUPER_FLAG_CHANGING_FSID\t(1ULL << 35)\n+#define BTRFS_SUPER_FLAG_CHANGING_FSID_V2 (1ULL << 36)\n+\n+\n+/*\n+ * items in the extent btree are used to record the objectid of the\n+ * owner of the block and the number of references\n+ */\n+\n+struct btrfs_extent_item {\n+\t__le64 refs;\n+\t__le64 generation;\n+\t__le64 flags;\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_extent_item_v0 {\n+\t__le32 refs;\n+} __attribute__ ((__packed__));\n+\n+\n+#define BTRFS_EXTENT_FLAG_DATA\t\t(1ULL << 0)\n+#define BTRFS_EXTENT_FLAG_TREE_BLOCK\t(1ULL << 1)\n+\n+/* following flags only apply to tree blocks */\n+\n+/* use full backrefs for extent pointers in the block */\n+#define BTRFS_BLOCK_FLAG_FULL_BACKREF\t(1ULL << 8)\n+\n+/*\n+ * this flag is only used internally by scrub and may be changed at any time\n+ * it is only declared here to avoid collisions\n+ */\n+#define BTRFS_EXTENT_FLAG_SUPER\t\t(1ULL << 48)\n+\n+struct btrfs_tree_block_info {\n+\tstruct btrfs_disk_key key;\n+\t__u8 level;\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_extent_data_ref {\n+\t__le64 root;\n+\t__le64 objectid;\n+\t__le64 offset;\n+\t__le32 count;\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_shared_data_ref {\n+\t__le32 count;\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_extent_inline_ref {\n+\t__u8 type;\n+\t__le64 offset;\n+} __attribute__ ((__packed__));\n+\n+/* old style backrefs item */\n+struct btrfs_extent_ref_v0 {\n+\t__le64 root;\n+\t__le64 generation;\n+\t__le64 objectid;\n+\t__le32 count;\n+} __attribute__ ((__packed__));\n+\n+\n+/* dev extents record free space on individual devices.  The owner\n+ * field points back to the chunk allocation mapping tree that allocated\n+ * the extent.  The chunk tree uuid field is a way to double check the owner\n+ */\n+struct btrfs_dev_extent {\n+\t__le64 chunk_tree;\n+\t__le64 chunk_objectid;\n+\t__le64 chunk_offset;\n+\t__le64 length;\n+\t__u8 chunk_tree_uuid[BTRFS_UUID_SIZE];\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_inode_ref {\n+\t__le64 index;\n+\t__le16 name_len;\n+\t/* name goes here */\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_inode_extref {\n+\t__le64 parent_objectid;\n+\t__le64 index;\n+\t__le16 name_len;\n+\t__u8   name[0];\n+\t/* name goes here */\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_timespec {\n+\t__le64 sec;\n+\t__le32 nsec;\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_inode_item {\n+\t/* nfs style generation number */\n+\t__le64 generation;\n+\t/* transid that last touched this inode */\n+\t__le64 transid;\n+\t__le64 size;\n+\t__le64 nbytes;\n+\t__le64 block_group;\n+\t__le32 nlink;\n+\t__le32 uid;\n+\t__le32 gid;\n+\t__le32 mode;\n+\t__le64 rdev;\n+\t__le64 flags;\n+\n+\t/* modification sequence number for NFS */\n+\t__le64 sequence;\n+\n+\t/*\n+\t * a little future expansion, for more than this we can\n+\t * just grow the inode item and version it\n+\t */\n+\t__le64 reserved[4];\n+\tstruct btrfs_timespec atime;\n+\tstruct btrfs_timespec ctime;\n+\tstruct btrfs_timespec mtime;\n+\tstruct btrfs_timespec otime;\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_dir_log_item {\n+\t__le64 end;\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_dir_item {\n+\tstruct btrfs_disk_key location;\n+\t__le64 transid;\n+\t__le16 data_len;\n+\t__le16 name_len;\n+\t__u8 type;\n+} __attribute__ ((__packed__));\n+\n+#define BTRFS_ROOT_SUBVOL_RDONLY\t(1ULL << 0)\n+\n+/*\n+ * Internal in-memory flag that a subvolume has been marked for deletion but\n+ * still visible as a directory\n+ */\n+#define BTRFS_ROOT_SUBVOL_DEAD\t\t(1ULL << 48)\n+\n+struct btrfs_root_item {\n+\tstruct btrfs_inode_item inode;\n+\t__le64 generation;\n+\t__le64 root_dirid;\n+\t__le64 bytenr;\n+\t__le64 byte_limit;\n+\t__le64 bytes_used;\n+\t__le64 last_snapshot;\n+\t__le64 flags;\n+\t__le32 refs;\n+\tstruct btrfs_disk_key drop_progress;\n+\t__u8 drop_level;\n+\t__u8 level;\n+\n+\t/*\n+\t * The following fields appear after subvol_uuids+subvol_times\n+\t * were introduced.\n+\t */\n+\n+\t/*\n+\t * This generation number is used to test if the new fields are valid\n+\t * and up to date while reading the root item. Every time the root item\n+\t * is written out, the \"generation\" field is copied into this field. If\n+\t * anyone ever mounted the fs with an older kernel, we will have\n+\t * mismatching generation values here and thus must invalidate the\n+\t * new fields. See btrfs_update_root and btrfs_find_last_root for\n+\t * details.\n+\t * the offset of generation_v2 is also used as the start for the memset\n+\t * when invalidating the fields.\n+\t */\n+\t__le64 generation_v2;\n+\t__u8 uuid[BTRFS_UUID_SIZE];\n+\t__u8 parent_uuid[BTRFS_UUID_SIZE];\n+\t__u8 received_uuid[BTRFS_UUID_SIZE];\n+\t__le64 ctransid; /* updated when an inode changes */\n+\t__le64 otransid; /* trans when created */\n+\t__le64 stransid; /* trans when sent. non-zero for received subvol */\n+\t__le64 rtransid; /* trans when received. non-zero for received subvol */\n+\tstruct btrfs_timespec ctime;\n+\tstruct btrfs_timespec otime;\n+\tstruct btrfs_timespec stime;\n+\tstruct btrfs_timespec rtime;\n+\t__le64 reserved[8]; /* for future */\n+} __attribute__ ((__packed__));\n+\n+/*\n+ * this is used for both forward and backward root refs\n+ */\n+struct btrfs_root_ref {\n+\t__le64 dirid;\n+\t__le64 sequence;\n+\t__le16 name_len;\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_disk_balance_args {\n+\t/*\n+\t * profiles to operate on, single is denoted by\n+\t * BTRFS_AVAIL_ALLOC_BIT_SINGLE\n+\t */\n+\t__le64 profiles;\n+\n+\t/*\n+\t * usage filter\n+\t * BTRFS_BALANCE_ARGS_USAGE with a single value means '0..N'\n+\t * BTRFS_BALANCE_ARGS_USAGE_RANGE - range syntax, min..max\n+\t */\n+\tunion {\n+\t\t__le64 usage;\n+\t\tstruct {\n+\t\t\t__le32 usage_min;\n+\t\t\t__le32 usage_max;\n+\t\t};\n+\t};\n+\n+\t/* devid filter */\n+\t__le64 devid;\n+\n+\t/* devid subset filter [pstart..pend) */\n+\t__le64 pstart;\n+\t__le64 pend;\n+\n+\t/* btrfs virtual address space subset filter [vstart..vend) */\n+\t__le64 vstart;\n+\t__le64 vend;\n+\n+\t/*\n+\t * profile to convert to, single is denoted by\n+\t * BTRFS_AVAIL_ALLOC_BIT_SINGLE\n+\t */\n+\t__le64 target;\n+\n+\t/* BTRFS_BALANCE_ARGS_* */\n+\t__le64 flags;\n+\n+\t/*\n+\t * BTRFS_BALANCE_ARGS_LIMIT with value 'limit'\n+\t * BTRFS_BALANCE_ARGS_LIMIT_RANGE - the extend version can use minimum\n+\t * and maximum\n+\t */\n+\tunion {\n+\t\t__le64 limit;\n+\t\tstruct {\n+\t\t\t__le32 limit_min;\n+\t\t\t__le32 limit_max;\n+\t\t};\n+\t};\n+\n+\t/*\n+\t * Process chunks that cross stripes_min..stripes_max devices,\n+\t * BTRFS_BALANCE_ARGS_STRIPES_RANGE\n+\t */\n+\t__le32 stripes_min;\n+\t__le32 stripes_max;\n+\n+\t__le64 unused[6];\n+} __attribute__ ((__packed__));\n+\n+/*\n+ * store balance parameters to disk so that balance can be properly\n+ * resumed after crash or unmount\n+ */\n+struct btrfs_balance_item {\n+\t/* BTRFS_BALANCE_* */\n+\t__le64 flags;\n+\n+\tstruct btrfs_disk_balance_args data;\n+\tstruct btrfs_disk_balance_args meta;\n+\tstruct btrfs_disk_balance_args sys;\n+\n+\t__le64 unused[4];\n+} __attribute__ ((__packed__));\n+\n+#define BTRFS_FILE_EXTENT_INLINE 0\n+#define BTRFS_FILE_EXTENT_REG 1\n+#define BTRFS_FILE_EXTENT_PREALLOC 2\n+#define BTRFS_FILE_EXTENT_TYPES\t2\n+\n+struct btrfs_file_extent_item {\n+\t/*\n+\t * transaction id that created this extent\n+\t */\n+\t__le64 generation;\n+\t/*\n+\t * max number of bytes to hold this extent in ram\n+\t * when we split a compressed extent we can't know how big\n+\t * each of the resulting pieces will be.  So, this is\n+\t * an upper limit on the size of the extent in ram instead of\n+\t * an exact limit.\n+\t */\n+\t__le64 ram_bytes;\n+\n+\t/*\n+\t * 32 bits for the various ways we might encode the data,\n+\t * including compression and encryption.  If any of these\n+\t * are set to something a given disk format doesn't understand\n+\t * it is treated like an incompat flag for reading and writing,\n+\t * but not for stat.\n+\t */\n+\t__u8 compression;\n+\t__u8 encryption;\n+\t__le16 other_encoding; /* spare for later use */\n+\n+\t/* are we inline data or a real extent? */\n+\t__u8 type;\n+\n+\t/*\n+\t * disk space consumed by the extent, checksum blocks are included\n+\t * in these numbers\n+\t *\n+\t * At this offset in the structure, the inline extent data start.\n+\t */\n+\t__le64 disk_bytenr;\n+\t__le64 disk_num_bytes;\n+\t/*\n+\t * the logical offset in file blocks (no csums)\n+\t * this extent record is for.  This allows a file extent to point\n+\t * into the middle of an existing extent on disk, sharing it\n+\t * between two snapshots (useful if some bytes in the middle of the\n+\t * extent have changed\n+\t */\n+\t__le64 offset;\n+\t/*\n+\t * the logical number of file blocks (no csums included).  This\n+\t * always reflects the size uncompressed and without encoding.\n+\t */\n+\t__le64 num_bytes;\n+\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_csum_item {\n+\t__u8 csum;\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_dev_stats_item {\n+\t/*\n+\t * grow this item struct at the end for future enhancements and keep\n+\t * the existing values unchanged\n+\t */\n+\t__le64 values[BTRFS_DEV_STAT_VALUES_MAX];\n+} __attribute__ ((__packed__));\n+\n+#define BTRFS_DEV_REPLACE_ITEM_CONT_READING_FROM_SRCDEV_MODE_ALWAYS\t0\n+#define BTRFS_DEV_REPLACE_ITEM_CONT_READING_FROM_SRCDEV_MODE_AVOID\t1\n+#define BTRFS_DEV_REPLACE_ITEM_STATE_NEVER_STARTED\t0\n+#define BTRFS_DEV_REPLACE_ITEM_STATE_STARTED\t\t1\n+#define BTRFS_DEV_REPLACE_ITEM_STATE_SUSPENDED\t\t2\n+#define BTRFS_DEV_REPLACE_ITEM_STATE_FINISHED\t\t3\n+#define BTRFS_DEV_REPLACE_ITEM_STATE_CANCELED\t\t4\n+\n+struct btrfs_dev_replace_item {\n+\t/*\n+\t * grow this item struct at the end for future enhancements and keep\n+\t * the existing values unchanged\n+\t */\n+\t__le64 src_devid;\n+\t__le64 cursor_left;\n+\t__le64 cursor_right;\n+\t__le64 cont_reading_from_srcdev_mode;\n+\n+\t__le64 replace_state;\n+\t__le64 time_started;\n+\t__le64 time_stopped;\n+\t__le64 num_write_errors;\n+\t__le64 num_uncorrectable_read_errors;\n+} __attribute__ ((__packed__));\n+\n+/* different types of block groups (and chunks) */\n+#define BTRFS_BLOCK_GROUP_DATA\t\t(1ULL << 0)\n+#define BTRFS_BLOCK_GROUP_SYSTEM\t(1ULL << 1)\n+#define BTRFS_BLOCK_GROUP_METADATA\t(1ULL << 2)\n+#define BTRFS_BLOCK_GROUP_RAID0\t\t(1ULL << 3)\n+#define BTRFS_BLOCK_GROUP_RAID1\t\t(1ULL << 4)\n+#define BTRFS_BLOCK_GROUP_DUP\t\t(1ULL << 5)\n+#define BTRFS_BLOCK_GROUP_RAID10\t(1ULL << 6)\n+#define BTRFS_BLOCK_GROUP_RAID5         (1ULL << 7)\n+#define BTRFS_BLOCK_GROUP_RAID6         (1ULL << 8)\n+#define BTRFS_BLOCK_GROUP_RESERVED\t(BTRFS_AVAIL_ALLOC_BIT_SINGLE | \\\n+\t\t\t\t\t BTRFS_SPACE_INFO_GLOBAL_RSV)\n+\n+enum btrfs_raid_types {\n+\tBTRFS_RAID_RAID10,\n+\tBTRFS_RAID_RAID1,\n+\tBTRFS_RAID_DUP,\n+\tBTRFS_RAID_RAID0,\n+\tBTRFS_RAID_SINGLE,\n+\tBTRFS_RAID_RAID5,\n+\tBTRFS_RAID_RAID6,\n+\tBTRFS_NR_RAID_TYPES\n+};\n+\n+#define BTRFS_BLOCK_GROUP_TYPE_MASK\t(BTRFS_BLOCK_GROUP_DATA |    \\\n+\t\t\t\t\t BTRFS_BLOCK_GROUP_SYSTEM |  \\\n+\t\t\t\t\t BTRFS_BLOCK_GROUP_METADATA)\n+\n+#define BTRFS_BLOCK_GROUP_PROFILE_MASK\t(BTRFS_BLOCK_GROUP_RAID0 |   \\\n+\t\t\t\t\t BTRFS_BLOCK_GROUP_RAID1 |   \\\n+\t\t\t\t\t BTRFS_BLOCK_GROUP_RAID5 |   \\\n+\t\t\t\t\t BTRFS_BLOCK_GROUP_RAID6 |   \\\n+\t\t\t\t\t BTRFS_BLOCK_GROUP_DUP |     \\\n+\t\t\t\t\t BTRFS_BLOCK_GROUP_RAID10)\n+#define BTRFS_BLOCK_GROUP_RAID56_MASK\t(BTRFS_BLOCK_GROUP_RAID5 |   \\\n+\t\t\t\t\t BTRFS_BLOCK_GROUP_RAID6)\n+\n+/*\n+ * We need a bit for restriper to be able to tell when chunks of type\n+ * SINGLE are available.  This \"extended\" profile format is used in\n+ * fs_info->avail_*_alloc_bits (in-memory) and balance item fields\n+ * (on-disk).  The corresponding on-disk bit in chunk.type is reserved\n+ * to avoid remappings between two formats in future.\n+ */\n+#define BTRFS_AVAIL_ALLOC_BIT_SINGLE\t(1ULL << 48)\n+\n+/*\n+ * A fake block group type that is used to communicate global block reserve\n+ * size to userspace via the SPACE_INFO ioctl.\n+ */\n+#define BTRFS_SPACE_INFO_GLOBAL_RSV\t(1ULL << 49)\n+\n+#define BTRFS_EXTENDED_PROFILE_MASK\t(BTRFS_BLOCK_GROUP_PROFILE_MASK | \\\n+\t\t\t\t\t BTRFS_AVAIL_ALLOC_BIT_SINGLE)\n+\n+static inline __u64 chunk_to_extended(__u64 flags)\n+{\n+\tif ((flags & BTRFS_BLOCK_GROUP_PROFILE_MASK) == 0)\n+\t\tflags |= BTRFS_AVAIL_ALLOC_BIT_SINGLE;\n+\n+\treturn flags;\n+}\n+static inline __u64 extended_to_chunk(__u64 flags)\n+{\n+\treturn flags & ~BTRFS_AVAIL_ALLOC_BIT_SINGLE;\n+}\n+\n+struct btrfs_block_group_item {\n+\t__le64 used;\n+\t__le64 chunk_objectid;\n+\t__le64 flags;\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_free_space_info {\n+\t__le32 extent_count;\n+\t__le32 flags;\n+} __attribute__ ((__packed__));\n+\n+#define BTRFS_FREE_SPACE_USING_BITMAPS (1ULL << 0)\n+\n+#define BTRFS_QGROUP_LEVEL_SHIFT\t\t48\n+static inline __u64 btrfs_qgroup_level(__u64 qgroupid)\n+{\n+\treturn qgroupid >> BTRFS_QGROUP_LEVEL_SHIFT;\n+}\n+\n+/*\n+ * is subvolume quota turned on?\n+ */\n+#define BTRFS_QGROUP_STATUS_FLAG_ON\t\t(1ULL << 0)\n+/*\n+ * RESCAN is set during the initialization phase\n+ */\n+#define BTRFS_QGROUP_STATUS_FLAG_RESCAN\t\t(1ULL << 1)\n+/*\n+ * Some qgroup entries are known to be out of date,\n+ * either because the configuration has changed in a way that\n+ * makes a rescan necessary, or because the fs has been mounted\n+ * with a non-qgroup-aware version.\n+ * Turning qouta off and on again makes it inconsistent, too.\n+ */\n+#define BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT\t(1ULL << 2)\n+\n+#define BTRFS_QGROUP_STATUS_VERSION        1\n+\n+struct btrfs_qgroup_status_item {\n+\t__le64 version;\n+\t/*\n+\t * the generation is updated during every commit. As older\n+\t * versions of btrfs are not aware of qgroups, it will be\n+\t * possible to detect inconsistencies by checking the\n+\t * generation on mount time\n+\t */\n+\t__le64 generation;\n+\n+\t/* flag definitions see above */\n+\t__le64 flags;\n+\n+\t/*\n+\t * only used during scanning to record the progress\n+\t * of the scan. It contains a logical address\n+\t */\n+\t__le64 rescan;\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_qgroup_info_item {\n+\t__le64 generation;\n+\t__le64 rfer;\n+\t__le64 rfer_cmpr;\n+\t__le64 excl;\n+\t__le64 excl_cmpr;\n+} __attribute__ ((__packed__));\n+\n+struct btrfs_qgroup_limit_item {\n+\t/*\n+\t * only updated when any of the other values change\n+\t */\n+\t__le64 flags;\n+\t__le64 max_rfer;\n+\t__le64 max_excl;\n+\t__le64 rsv_rfer;\n+\t__le64 rsv_excl;\n+} __attribute__ ((__packed__));\n+\n+#endif /* _BTRFS_CTREE_H_ */\ndiff --git a/src/basic/linux/can/vxcan.h b/src/basic/linux/can/vxcan.h\nnew file mode 100644\nindex 00000000000..066812d118a\n--- /dev/null\n+++ b/src/basic/linux/can/vxcan.h\n@@ -0,0 +1,13 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+#ifndef _UAPI_CAN_VXCAN_H\n+#define _UAPI_CAN_VXCAN_H\n+\n+enum {\n+\tVXCAN_INFO_UNSPEC,\n+\tVXCAN_INFO_PEER,\n+\n+\t__VXCAN_INFO_MAX\n+#define VXCAN_INFO_MAX\t(__VXCAN_INFO_MAX - 1)\n+};\n+\n+#endif\ndiff --git a/src/basic/linux/fib_rules.h b/src/basic/linux/fib_rules.h\nnew file mode 100644\nindex 00000000000..232df14e128\n--- /dev/null\n+++ b/src/basic/linux/fib_rules.h\n@@ -0,0 +1,90 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+#ifndef __LINUX_FIB_RULES_H\n+#define __LINUX_FIB_RULES_H\n+\n+#include <linux/types.h>\n+#include <linux/rtnetlink.h>\n+\n+/* rule is permanent, and cannot be deleted */\n+#define FIB_RULE_PERMANENT\t0x00000001\n+#define FIB_RULE_INVERT\t\t0x00000002\n+#define FIB_RULE_UNRESOLVED\t0x00000004\n+#define FIB_RULE_IIF_DETACHED\t0x00000008\n+#define FIB_RULE_DEV_DETACHED\tFIB_RULE_IIF_DETACHED\n+#define FIB_RULE_OIF_DETACHED\t0x00000010\n+\n+/* try to find source address in routing lookups */\n+#define FIB_RULE_FIND_SADDR\t0x00010000\n+\n+struct fib_rule_hdr {\n+\t__u8\t\tfamily;\n+\t__u8\t\tdst_len;\n+\t__u8\t\tsrc_len;\n+\t__u8\t\ttos;\n+\n+\t__u8\t\ttable;\n+\t__u8\t\tres1;   /* reserved */\n+\t__u8\t\tres2;\t/* reserved */\n+\t__u8\t\taction;\n+\n+\t__u32\t\tflags;\n+};\n+\n+struct fib_rule_uid_range {\n+\t__u32\t\tstart;\n+\t__u32\t\tend;\n+};\n+\n+struct fib_rule_port_range {\n+\t__u16\t\tstart;\n+\t__u16\t\tend;\n+};\n+\n+enum {\n+\tFRA_UNSPEC,\n+\tFRA_DST,\t/* destination address */\n+\tFRA_SRC,\t/* source address */\n+\tFRA_IIFNAME,\t/* interface name */\n+#define FRA_IFNAME\tFRA_IIFNAME\n+\tFRA_GOTO,\t/* target to jump to (FR_ACT_GOTO) */\n+\tFRA_UNUSED2,\n+\tFRA_PRIORITY,\t/* priority/preference */\n+\tFRA_UNUSED3,\n+\tFRA_UNUSED4,\n+\tFRA_UNUSED5,\n+\tFRA_FWMARK,\t/* mark */\n+\tFRA_FLOW,\t/* flow/class id */\n+\tFRA_TUN_ID,\n+\tFRA_SUPPRESS_IFGROUP,\n+\tFRA_SUPPRESS_PREFIXLEN,\n+\tFRA_TABLE,\t/* Extended table id */\n+\tFRA_FWMASK,\t/* mask for netfilter mark */\n+\tFRA_OIFNAME,\n+\tFRA_PAD,\n+\tFRA_L3MDEV,\t/* iif or oif is l3mdev goto its table */\n+\tFRA_UID_RANGE,\t/* UID range */\n+\tFRA_PROTOCOL,   /* Originator of the rule */\n+\tFRA_IP_PROTO,\t/* ip proto */\n+\tFRA_SPORT_RANGE, /* sport */\n+\tFRA_DPORT_RANGE, /* dport */\n+\t__FRA_MAX\n+};\n+\n+#define FRA_MAX (__FRA_MAX - 1)\n+\n+enum {\n+\tFR_ACT_UNSPEC,\n+\tFR_ACT_TO_TBL,\t\t/* Pass to fixed table */\n+\tFR_ACT_GOTO,\t\t/* Jump to another rule */\n+\tFR_ACT_NOP,\t\t/* No operation */\n+\tFR_ACT_RES3,\n+\tFR_ACT_RES4,\n+\tFR_ACT_BLACKHOLE,\t/* Drop without notification */\n+\tFR_ACT_UNREACHABLE,\t/* Drop with ENETUNREACH */\n+\tFR_ACT_PROHIBIT,\t/* Drop with EACCES */\n+\t__FR_ACT_MAX,\n+};\n+\n+#define FR_ACT_MAX (__FR_ACT_MAX - 1)\n+\n+#endif\ndiff --git a/src/basic/linux/fou.h b/src/basic/linux/fou.h\nnew file mode 100644\nindex 00000000000..f2ea833a281\n--- /dev/null\n+++ b/src/basic/linux/fou.h\n@@ -0,0 +1,42 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+/* fou.h - FOU Interface */\n+\n+#ifndef _UAPI_LINUX_FOU_H\n+#define _UAPI_LINUX_FOU_H\n+\n+/* NETLINK_GENERIC related info\n+ */\n+#define FOU_GENL_NAME\t\t\"fou\"\n+#define FOU_GENL_VERSION\t0x1\n+\n+enum {\n+\tFOU_ATTR_UNSPEC,\n+\tFOU_ATTR_PORT,\t\t\t\t/* u16 */\n+\tFOU_ATTR_AF,\t\t\t\t/* u8 */\n+\tFOU_ATTR_IPPROTO,\t\t\t/* u8 */\n+\tFOU_ATTR_TYPE,\t\t\t\t/* u8 */\n+\tFOU_ATTR_REMCSUM_NOPARTIAL,\t\t/* flag */\n+\n+\t__FOU_ATTR_MAX,\n+};\n+\n+#define FOU_ATTR_MAX\t\t(__FOU_ATTR_MAX - 1)\n+\n+enum {\n+\tFOU_CMD_UNSPEC,\n+\tFOU_CMD_ADD,\n+\tFOU_CMD_DEL,\n+\tFOU_CMD_GET,\n+\n+\t__FOU_CMD_MAX,\n+};\n+\n+enum {\n+\tFOU_ENCAP_UNSPEC,\n+\tFOU_ENCAP_DIRECT,\n+\tFOU_ENCAP_GUE,\n+};\n+\n+#define FOU_CMD_MAX\t(__FOU_CMD_MAX - 1)\n+\n+#endif /* _UAPI_LINUX_FOU_H */\ndiff --git a/src/basic/linux/if.h b/src/basic/linux/if.h\nnew file mode 100644\nindex 00000000000..cbabdde8f9d\n--- /dev/null\n+++ b/src/basic/linux/if.h\n@@ -0,0 +1,294 @@\n+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */\n+/*\n+ * INET\t\tAn implementation of the TCP/IP protocol suite for the LINUX\n+ *\t\toperating system.  INET is implemented using the  BSD Socket\n+ *\t\tinterface as the means of communication with the user level.\n+ *\n+ *\t\tGlobal definitions for the INET interface module.\n+ *\n+ * Version:\t@(#)if.h\t1.0.2\t04/18/93\n+ *\n+ * Authors:\tOriginal taken from Berkeley UNIX 4.3, (c) UCB 1982-1988\n+ *\t\tRoss Biro\n+ *\t\tFred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>\n+ *\n+ *\t\tThis program is free software; you can redistribute it and/or\n+ *\t\tmodify it under the terms of the GNU General Public License\n+ *\t\tas published by the Free Software Foundation; either version\n+ *\t\t2 of the License, or (at your option) any later version.\n+ */\n+#ifndef _LINUX_IF_H\n+#define _LINUX_IF_H\n+\n+#include <linux/libc-compat.h>          /* for compatibility with glibc */\n+#include <linux/types.h>\t\t/* for \"__kernel_caddr_t\" et al\t*/\n+#include <linux/socket.h>\t\t/* for \"struct sockaddr\" et al\t*/\n+\n+#ifndef __KERNEL__\n+#include <sys/socket.h>\t\t\t/* for struct sockaddr.\t\t*/\n+#endif\n+\n+#if __UAPI_DEF_IF_IFNAMSIZ\n+#define\tIFNAMSIZ\t16\n+#endif /* __UAPI_DEF_IF_IFNAMSIZ */\n+#define\tIFALIASZ\t256\n+#include <linux/hdlc/ioctl.h>\n+\n+/* For glibc compatibility. An empty enum does not compile. */\n+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 || \\\n+    __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0\n+/**\n+ * enum net_device_flags - &struct net_device flags\n+ *\n+ * These are the &struct net_device flags, they can be set by drivers, the\n+ * kernel and some can be triggered by userspace. Userspace can query and\n+ * set these flags using userspace utilities but there is also a sysfs\n+ * entry available for all dev flags which can be queried and set. These flags\n+ * are shared for all types of net_devices. The sysfs entries are available\n+ * via /sys/class/net/<dev>/flags. Flags which can be toggled through sysfs\n+ * are annotated below, note that only a few flags can be toggled and some\n+ * other flags are always preserved from the original net_device flags\n+ * even if you try to set them via sysfs. Flags which are always preserved\n+ * are kept under the flag grouping @IFF_VOLATILE. Flags which are volatile\n+ * are annotated below as such.\n+ *\n+ * You should have a pretty good reason to be extending these flags.\n+ *\n+ * @IFF_UP: interface is up. Can be toggled through sysfs.\n+ * @IFF_BROADCAST: broadcast address valid. Volatile.\n+ * @IFF_DEBUG: turn on debugging. Can be toggled through sysfs.\n+ * @IFF_LOOPBACK: is a loopback net. Volatile.\n+ * @IFF_POINTOPOINT: interface is has p-p link. Volatile.\n+ * @IFF_NOTRAILERS: avoid use of trailers. Can be toggled through sysfs.\n+ *\tVolatile.\n+ * @IFF_RUNNING: interface RFC2863 OPER_UP. Volatile.\n+ * @IFF_NOARP: no ARP protocol. Can be toggled through sysfs. Volatile.\n+ * @IFF_PROMISC: receive all packets. Can be toggled through sysfs.\n+ * @IFF_ALLMULTI: receive all multicast packets. Can be toggled through\n+ *\tsysfs.\n+ * @IFF_MASTER: master of a load balancer. Volatile.\n+ * @IFF_SLAVE: slave of a load balancer. Volatile.\n+ * @IFF_MULTICAST: Supports multicast. Can be toggled through sysfs.\n+ * @IFF_PORTSEL: can set media type. Can be toggled through sysfs.\n+ * @IFF_AUTOMEDIA: auto media select active. Can be toggled through sysfs.\n+ * @IFF_DYNAMIC: dialup device with changing addresses. Can be toggled\n+ *\tthrough sysfs.\n+ * @IFF_LOWER_UP: driver signals L1 up. Volatile.\n+ * @IFF_DORMANT: driver signals dormant. Volatile.\n+ * @IFF_ECHO: echo sent packets. Volatile.\n+ */\n+enum net_device_flags {\n+/* for compatibility with glibc net/if.h */\n+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS\n+\tIFF_UP\t\t\t\t= 1<<0,  /* sysfs */\n+\tIFF_BROADCAST\t\t\t= 1<<1,  /* volatile */\n+\tIFF_DEBUG\t\t\t= 1<<2,  /* sysfs */\n+\tIFF_LOOPBACK\t\t\t= 1<<3,  /* volatile */\n+\tIFF_POINTOPOINT\t\t\t= 1<<4,  /* volatile */\n+\tIFF_NOTRAILERS\t\t\t= 1<<5,  /* sysfs */\n+\tIFF_RUNNING\t\t\t= 1<<6,  /* volatile */\n+\tIFF_NOARP\t\t\t= 1<<7,  /* sysfs */\n+\tIFF_PROMISC\t\t\t= 1<<8,  /* sysfs */\n+\tIFF_ALLMULTI\t\t\t= 1<<9,  /* sysfs */\n+\tIFF_MASTER\t\t\t= 1<<10, /* volatile */\n+\tIFF_SLAVE\t\t\t= 1<<11, /* volatile */\n+\tIFF_MULTICAST\t\t\t= 1<<12, /* sysfs */\n+\tIFF_PORTSEL\t\t\t= 1<<13, /* sysfs */\n+\tIFF_AUTOMEDIA\t\t\t= 1<<14, /* sysfs */\n+\tIFF_DYNAMIC\t\t\t= 1<<15, /* sysfs */\n+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS */\n+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO\n+\tIFF_LOWER_UP\t\t\t= 1<<16, /* volatile */\n+\tIFF_DORMANT\t\t\t= 1<<17, /* volatile */\n+\tIFF_ECHO\t\t\t= 1<<18, /* volatile */\n+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */\n+};\n+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 || __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 */\n+\n+/* for compatibility with glibc net/if.h */\n+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS\n+#define IFF_UP\t\t\t\tIFF_UP\n+#define IFF_BROADCAST\t\t\tIFF_BROADCAST\n+#define IFF_DEBUG\t\t\tIFF_DEBUG\n+#define IFF_LOOPBACK\t\t\tIFF_LOOPBACK\n+#define IFF_POINTOPOINT\t\t\tIFF_POINTOPOINT\n+#define IFF_NOTRAILERS\t\t\tIFF_NOTRAILERS\n+#define IFF_RUNNING\t\t\tIFF_RUNNING\n+#define IFF_NOARP\t\t\tIFF_NOARP\n+#define IFF_PROMISC\t\t\tIFF_PROMISC\n+#define IFF_ALLMULTI\t\t\tIFF_ALLMULTI\n+#define IFF_MASTER\t\t\tIFF_MASTER\n+#define IFF_SLAVE\t\t\tIFF_SLAVE\n+#define IFF_MULTICAST\t\t\tIFF_MULTICAST\n+#define IFF_PORTSEL\t\t\tIFF_PORTSEL\n+#define IFF_AUTOMEDIA\t\t\tIFF_AUTOMEDIA\n+#define IFF_DYNAMIC\t\t\tIFF_DYNAMIC\n+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS */\n+\n+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO\n+#define IFF_LOWER_UP\t\t\tIFF_LOWER_UP\n+#define IFF_DORMANT\t\t\tIFF_DORMANT\n+#define IFF_ECHO\t\t\tIFF_ECHO\n+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */\n+\n+#define IFF_VOLATILE\t(IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\\\n+\t\tIFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)\n+\n+#define IF_GET_IFACE\t0x0001\t\t/* for querying only */\n+#define IF_GET_PROTO\t0x0002\n+\n+/* For definitions see hdlc.h */\n+#define IF_IFACE_V35\t0x1000\t\t/* V.35 serial interface\t*/\n+#define IF_IFACE_V24\t0x1001\t\t/* V.24 serial interface\t*/\n+#define IF_IFACE_X21\t0x1002\t\t/* X.21 serial interface\t*/\n+#define IF_IFACE_T1\t0x1003\t\t/* T1 telco serial interface\t*/\n+#define IF_IFACE_E1\t0x1004\t\t/* E1 telco serial interface\t*/\n+#define IF_IFACE_SYNC_SERIAL 0x1005\t/* can't be set by software\t*/\n+#define IF_IFACE_X21D   0x1006          /* X.21 Dual Clocking (FarSite) */\n+\n+/* For definitions see hdlc.h */\n+#define IF_PROTO_HDLC\t0x2000\t\t/* raw HDLC protocol\t\t*/\n+#define IF_PROTO_PPP\t0x2001\t\t/* PPP protocol\t\t\t*/\n+#define IF_PROTO_CISCO\t0x2002\t\t/* Cisco HDLC protocol\t\t*/\n+#define IF_PROTO_FR\t0x2003\t\t/* Frame Relay protocol\t\t*/\n+#define IF_PROTO_FR_ADD_PVC 0x2004\t/*    Create FR PVC\t\t*/\n+#define IF_PROTO_FR_DEL_PVC 0x2005\t/*    Delete FR PVC\t\t*/\n+#define IF_PROTO_X25\t0x2006\t\t/* X.25\t\t\t\t*/\n+#define IF_PROTO_HDLC_ETH 0x2007\t/* raw HDLC, Ethernet emulation\t*/\n+#define IF_PROTO_FR_ADD_ETH_PVC 0x2008\t/*  Create FR Ethernet-bridged PVC */\n+#define IF_PROTO_FR_DEL_ETH_PVC 0x2009\t/*  Delete FR Ethernet-bridged PVC */\n+#define IF_PROTO_FR_PVC\t0x200A\t\t/* for reading PVC status\t*/\n+#define IF_PROTO_FR_ETH_PVC 0x200B\n+#define IF_PROTO_RAW    0x200C          /* RAW Socket                   */\n+\n+/* RFC 2863 operational status */\n+enum {\n+\tIF_OPER_UNKNOWN,\n+\tIF_OPER_NOTPRESENT,\n+\tIF_OPER_DOWN,\n+\tIF_OPER_LOWERLAYERDOWN,\n+\tIF_OPER_TESTING,\n+\tIF_OPER_DORMANT,\n+\tIF_OPER_UP,\n+};\n+\n+/* link modes */\n+enum {\n+\tIF_LINK_MODE_DEFAULT,\n+\tIF_LINK_MODE_DORMANT,\t/* limit upward transition to dormant */\n+};\n+\n+/*\n+ *\tDevice mapping structure. I'd just gone off and designed a\n+ *\tbeautiful scheme using only loadable modules with arguments\n+ *\tfor driver options and along come the PCMCIA people 8)\n+ *\n+ *\tAh well. The get() side of this is good for WDSETUP, and it'll\n+ *\tbe handy for debugging things. The set side is fine for now and\n+ *\tbeing very small might be worth keeping for clean configuration.\n+ */\n+\n+/* for compatibility with glibc net/if.h */\n+#if __UAPI_DEF_IF_IFMAP\n+struct ifmap {\n+\tunsigned long mem_start;\n+\tunsigned long mem_end;\n+\tunsigned short base_addr;\n+\tunsigned char irq;\n+\tunsigned char dma;\n+\tunsigned char port;\n+\t/* 3 bytes spare */\n+};\n+#endif /* __UAPI_DEF_IF_IFMAP */\n+\n+struct if_settings {\n+\tunsigned int type;\t/* Type of physical device or protocol */\n+\tunsigned int size;\t/* Size of the data allocated by the caller */\n+\tunion {\n+\t\t/* {atm/eth/dsl}_settings anyone ? */\n+\t\traw_hdlc_proto\t\t*raw_hdlc;\n+\t\tcisco_proto\t\t*cisco;\n+\t\tfr_proto\t\t*fr;\n+\t\tfr_proto_pvc\t\t*fr_pvc;\n+\t\tfr_proto_pvc_info\t*fr_pvc_info;\n+\n+\t\t/* interface settings */\n+\t\tsync_serial_settings\t*sync;\n+\t\tte1_settings\t\t*te1;\n+\t} ifs_ifsu;\n+};\n+\n+/*\n+ * Interface request structure used for socket\n+ * ioctl's.  All interface ioctl's must have parameter\n+ * definitions which begin with ifr_name.  The\n+ * remainder may be interface specific.\n+ */\n+\n+/* for compatibility with glibc net/if.h */\n+#if __UAPI_DEF_IF_IFREQ\n+struct ifreq {\n+#define IFHWADDRLEN\t6\n+\tunion\n+\t{\n+\t\tchar\tifrn_name[IFNAMSIZ];\t\t/* if name, e.g. \"en0\" */\n+\t} ifr_ifrn;\n+\n+\tunion {\n+\t\tstruct\tsockaddr ifru_addr;\n+\t\tstruct\tsockaddr ifru_dstaddr;\n+\t\tstruct\tsockaddr ifru_broadaddr;\n+\t\tstruct\tsockaddr ifru_netmask;\n+\t\tstruct  sockaddr ifru_hwaddr;\n+\t\tshort\tifru_flags;\n+\t\tint\tifru_ivalue;\n+\t\tint\tifru_mtu;\n+\t\tstruct  ifmap ifru_map;\n+\t\tchar\tifru_slave[IFNAMSIZ];\t/* Just fits the size */\n+\t\tchar\tifru_newname[IFNAMSIZ];\n+\t\tvoid *\tifru_data;\n+\t\tstruct\tif_settings ifru_settings;\n+\t} ifr_ifru;\n+};\n+#endif /* __UAPI_DEF_IF_IFREQ */\n+\n+#define ifr_name\tifr_ifrn.ifrn_name\t/* interface name \t*/\n+#define ifr_hwaddr\tifr_ifru.ifru_hwaddr\t/* MAC address \t\t*/\n+#define\tifr_addr\tifr_ifru.ifru_addr\t/* address\t\t*/\n+#define\tifr_dstaddr\tifr_ifru.ifru_dstaddr\t/* other end of p-p lnk\t*/\n+#define\tifr_broadaddr\tifr_ifru.ifru_broadaddr\t/* broadcast address\t*/\n+#define\tifr_netmask\tifr_ifru.ifru_netmask\t/* interface net mask\t*/\n+#define\tifr_flags\tifr_ifru.ifru_flags\t/* flags\t\t*/\n+#define\tifr_metric\tifr_ifru.ifru_ivalue\t/* metric\t\t*/\n+#define\tifr_mtu\t\tifr_ifru.ifru_mtu\t/* mtu\t\t\t*/\n+#define ifr_map\t\tifr_ifru.ifru_map\t/* device map\t\t*/\n+#define ifr_slave\tifr_ifru.ifru_slave\t/* slave device\t\t*/\n+#define\tifr_data\tifr_ifru.ifru_data\t/* for use by interface\t*/\n+#define ifr_ifindex\tifr_ifru.ifru_ivalue\t/* interface index\t*/\n+#define ifr_bandwidth\tifr_ifru.ifru_ivalue    /* link bandwidth\t*/\n+#define ifr_qlen\tifr_ifru.ifru_ivalue\t/* Queue length \t*/\n+#define ifr_newname\tifr_ifru.ifru_newname\t/* New name\t\t*/\n+#define ifr_settings\tifr_ifru.ifru_settings\t/* Device/proto settings*/\n+\n+/*\n+ * Structure used in SIOCGIFCONF request.\n+ * Used to retrieve interface configuration\n+ * for machine (useful for programs which\n+ * must know all networks accessible).\n+ */\n+\n+/* for compatibility with glibc net/if.h */\n+#if __UAPI_DEF_IF_IFCONF\n+struct ifconf  {\n+\tint\tifc_len;\t\t\t/* size of buffer\t*/\n+\tunion {\n+\t\tchar *ifcu_buf;\n+\t\tstruct ifreq *ifcu_req;\n+\t} ifc_ifcu;\n+};\n+#endif /* __UAPI_DEF_IF_IFCONF */\n+\n+#define\tifc_buf\tifc_ifcu.ifcu_buf\t\t/* buffer address\t*/\n+#define\tifc_req\tifc_ifcu.ifcu_req\t\t/* array of structures\t*/\n+\n+#endif /* _LINUX_IF_H */\ndiff --git a/src/basic/linux/if_addr.h b/src/basic/linux/if_addr.h\nnew file mode 100644\nindex 00000000000..dfcf3ce0097\n--- /dev/null\n+++ b/src/basic/linux/if_addr.h\n@@ -0,0 +1,72 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+#ifndef __LINUX_IF_ADDR_H\n+#define __LINUX_IF_ADDR_H\n+\n+#include <linux/types.h>\n+#include <linux/netlink.h>\n+\n+struct ifaddrmsg {\n+\t__u8\t\tifa_family;\n+\t__u8\t\tifa_prefixlen;\t/* The prefix length\t\t*/\n+\t__u8\t\tifa_flags;\t/* Flags\t\t\t*/\n+\t__u8\t\tifa_scope;\t/* Address scope\t\t*/\n+\t__u32\t\tifa_index;\t/* Link index\t\t\t*/\n+};\n+\n+/*\n+ * Important comment:\n+ * IFA_ADDRESS is prefix address, rather than local interface address.\n+ * It makes no difference for normally configured broadcast interfaces,\n+ * but for point-to-point IFA_ADDRESS is DESTINATION address,\n+ * local address is supplied in IFA_LOCAL attribute.\n+ *\n+ * IFA_FLAGS is a u32 attribute that extends the u8 field ifa_flags.\n+ * If present, the value from struct ifaddrmsg will be ignored.\n+ */\n+enum {\n+\tIFA_UNSPEC,\n+\tIFA_ADDRESS,\n+\tIFA_LOCAL,\n+\tIFA_LABEL,\n+\tIFA_BROADCAST,\n+\tIFA_ANYCAST,\n+\tIFA_CACHEINFO,\n+\tIFA_MULTICAST,\n+\tIFA_FLAGS,\n+\tIFA_RT_PRIORITY,  /* u32, priority/metric for prefix route */\n+\tIFA_TARGET_NETNSID,\n+\t__IFA_MAX,\n+};\n+\n+#define IFA_MAX (__IFA_MAX - 1)\n+\n+/* ifa_flags */\n+#define IFA_F_SECONDARY\t\t0x01\n+#define IFA_F_TEMPORARY\t\tIFA_F_SECONDARY\n+\n+#define\tIFA_F_NODAD\t\t0x02\n+#define IFA_F_OPTIMISTIC\t0x04\n+#define IFA_F_DADFAILED\t\t0x08\n+#define\tIFA_F_HOMEADDRESS\t0x10\n+#define IFA_F_DEPRECATED\t0x20\n+#define IFA_F_TENTATIVE\t\t0x40\n+#define IFA_F_PERMANENT\t\t0x80\n+#define IFA_F_MANAGETEMPADDR\t0x100\n+#define IFA_F_NOPREFIXROUTE\t0x200\n+#define IFA_F_MCAUTOJOIN\t0x400\n+#define IFA_F_STABLE_PRIVACY\t0x800\n+\n+struct ifa_cacheinfo {\n+\t__u32\tifa_prefered;\n+\t__u32\tifa_valid;\n+\t__u32\tcstamp; /* created timestamp, hundredths of seconds */\n+\t__u32\ttstamp; /* updated timestamp, hundredths of seconds */\n+};\n+\n+/* backwards compatibility for userspace */\n+#ifndef __KERNEL__\n+#define IFA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))\n+#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))\n+#endif\n+\n+#endif\ndiff --git a/src/basic/linux/if_arp.h b/src/basic/linux/if_arp.h\nnew file mode 100644\nindex 00000000000..c3cc5a9e5ea\n--- /dev/null\n+++ b/src/basic/linux/if_arp.h\n@@ -0,0 +1,164 @@\n+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */\n+/*\n+ * INET\t\tAn implementation of the TCP/IP protocol suite for the LINUX\n+ *\t\toperating system.  INET is implemented using the  BSD Socket\n+ *\t\tinterface as the means of communication with the user level.\n+ *\n+ *\t\tGlobal definitions for the ARP (RFC 826) protocol.\n+ *\n+ * Version:\t@(#)if_arp.h\t1.0.1\t04/16/93\n+ *\n+ * Authors:\tOriginal taken from Berkeley UNIX 4.3, (c) UCB 1986-1988\n+ *\t\tPortions taken from the KA9Q/NOS (v2.00m PA0GRI) source.\n+ *\t\tRoss Biro\n+ *\t\tFred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>\n+ *\t\tFlorian La Roche,\n+ *\t\tJonathan Layes <layes@loran.com>\n+ *\t\tArnaldo Carvalho de Melo <acme@conectiva.com.br> ARPHRD_HWX25\n+ *\n+ *\t\tThis program is free software; you can redistribute it and/or\n+ *\t\tmodify it under the terms of the GNU General Public License\n+ *\t\tas published by the Free Software Foundation; either version\n+ *\t\t2 of the License, or (at your option) any later version.\n+ */\n+#ifndef _UAPI_LINUX_IF_ARP_H\n+#define _UAPI_LINUX_IF_ARP_H\n+\n+#include <linux/netdevice.h>\n+\n+/* ARP protocol HARDWARE identifiers. */\n+#define ARPHRD_NETROM\t0\t\t/* from KA9Q: NET/ROM pseudo\t*/\n+#define ARPHRD_ETHER \t1\t\t/* Ethernet 10Mbps\t\t*/\n+#define\tARPHRD_EETHER\t2\t\t/* Experimental Ethernet\t*/\n+#define\tARPHRD_AX25\t3\t\t/* AX.25 Level 2\t\t*/\n+#define\tARPHRD_PRONET\t4\t\t/* PROnet token ring\t\t*/\n+#define\tARPHRD_CHAOS\t5\t\t/* Chaosnet\t\t\t*/\n+#define\tARPHRD_IEEE802\t6\t\t/* IEEE 802.2 Ethernet/TR/TB\t*/\n+#define\tARPHRD_ARCNET\t7\t\t/* ARCnet\t\t\t*/\n+#define\tARPHRD_APPLETLK\t8\t\t/* APPLEtalk\t\t\t*/\n+#define ARPHRD_DLCI\t15\t\t/* Frame Relay DLCI\t\t*/\n+#define ARPHRD_ATM\t19\t\t/* ATM \t\t\t\t*/\n+#define ARPHRD_METRICOM\t23\t\t/* Metricom STRIP (new IANA id)\t*/\n+#define\tARPHRD_IEEE1394\t24\t\t/* IEEE 1394 IPv4 - RFC 2734\t*/\n+#define ARPHRD_EUI64\t27\t\t/* EUI-64                       */\n+#define ARPHRD_INFINIBAND 32\t\t/* InfiniBand\t\t\t*/\n+\n+/* Dummy types for non ARP hardware */\n+#define ARPHRD_SLIP\t256\n+#define ARPHRD_CSLIP\t257\n+#define ARPHRD_SLIP6\t258\n+#define ARPHRD_CSLIP6\t259\n+#define ARPHRD_RSRVD\t260\t\t/* Notional KISS type \t\t*/\n+#define ARPHRD_ADAPT\t264\n+#define ARPHRD_ROSE\t270\n+#define ARPHRD_X25\t271\t\t/* CCITT X.25\t\t\t*/\n+#define ARPHRD_HWX25\t272\t\t/* Boards with X.25 in firmware\t*/\n+#define ARPHRD_CAN\t280\t\t/* Controller Area Network      */\n+#define ARPHRD_PPP\t512\n+#define ARPHRD_CISCO\t513\t\t/* Cisco HDLC\t \t\t*/\n+#define ARPHRD_HDLC\tARPHRD_CISCO\n+#define ARPHRD_LAPB\t516\t\t/* LAPB\t\t\t\t*/\n+#define ARPHRD_DDCMP    517\t\t/* Digital's DDCMP protocol     */\n+#define ARPHRD_RAWHDLC\t518\t\t/* Raw HDLC\t\t\t*/\n+#define ARPHRD_RAWIP    519\t\t/* Raw IP                       */\n+\n+#define ARPHRD_TUNNEL\t768\t\t/* IPIP tunnel\t\t\t*/\n+#define ARPHRD_TUNNEL6\t769\t\t/* IP6IP6 tunnel       \t\t*/\n+#define ARPHRD_FRAD\t770             /* Frame Relay Access Device    */\n+#define ARPHRD_SKIP\t771\t\t/* SKIP vif\t\t\t*/\n+#define ARPHRD_LOOPBACK\t772\t\t/* Loopback device\t\t*/\n+#define ARPHRD_LOCALTLK 773\t\t/* Localtalk device\t\t*/\n+#define ARPHRD_FDDI\t774\t\t/* Fiber Distributed Data Interface */\n+#define ARPHRD_BIF      775             /* AP1000 BIF                   */\n+#define ARPHRD_SIT\t776\t\t/* sit0 device - IPv6-in-IPv4\t*/\n+#define ARPHRD_IPDDP\t777\t\t/* IP over DDP tunneller\t*/\n+#define ARPHRD_IPGRE\t778\t\t/* GRE over IP\t\t\t*/\n+#define ARPHRD_PIMREG\t779\t\t/* PIMSM register interface\t*/\n+#define ARPHRD_HIPPI\t780\t\t/* High Performance Parallel Interface */\n+#define ARPHRD_ASH\t781\t\t/* Nexus 64Mbps Ash\t\t*/\n+#define ARPHRD_ECONET\t782\t\t/* Acorn Econet\t\t\t*/\n+#define ARPHRD_IRDA \t783\t\t/* Linux-IrDA\t\t\t*/\n+/* ARP works differently on different FC media .. so  */\n+#define ARPHRD_FCPP\t784\t\t/* Point to point fibrechannel\t*/\n+#define ARPHRD_FCAL\t785\t\t/* Fibrechannel arbitrated loop */\n+#define ARPHRD_FCPL\t786\t\t/* Fibrechannel public loop\t*/\n+#define ARPHRD_FCFABRIC\t787\t\t/* Fibrechannel fabric\t\t*/\n+\t/* 787->799 reserved for fibrechannel media types */\n+#define ARPHRD_IEEE802_TR 800\t\t/* Magic type ident for TR\t*/\n+#define ARPHRD_IEEE80211 801\t\t/* IEEE 802.11\t\t\t*/\n+#define ARPHRD_IEEE80211_PRISM 802\t/* IEEE 802.11 + Prism2 header  */\n+#define ARPHRD_IEEE80211_RADIOTAP 803\t/* IEEE 802.11 + radiotap header */\n+#define ARPHRD_IEEE802154\t  804\n+#define ARPHRD_IEEE802154_MONITOR 805\t/* IEEE 802.15.4 network monitor */\n+\n+#define ARPHRD_PHONET\t820\t\t/* PhoNet media type\t\t*/\n+#define ARPHRD_PHONET_PIPE 821\t\t/* PhoNet pipe header\t\t*/\n+#define ARPHRD_CAIF\t822\t\t/* CAIF media type\t\t*/\n+#define ARPHRD_IP6GRE\t823\t\t/* GRE over IPv6\t\t*/\n+#define ARPHRD_NETLINK\t824\t\t/* Netlink header\t\t*/\n+#define ARPHRD_6LOWPAN\t825\t\t/* IPv6 over LoWPAN             */\n+#define ARPHRD_VSOCKMON\t826\t\t/* Vsock monitor header\t\t*/\n+\n+#define ARPHRD_VOID\t  0xFFFF\t/* Void type, nothing is known */\n+#define ARPHRD_NONE\t  0xFFFE\t/* zero header length */\n+\n+/* ARP protocol opcodes. */\n+#define\tARPOP_REQUEST\t1\t\t/* ARP request\t\t\t*/\n+#define\tARPOP_REPLY\t2\t\t/* ARP reply\t\t\t*/\n+#define\tARPOP_RREQUEST\t3\t\t/* RARP request\t\t\t*/\n+#define\tARPOP_RREPLY\t4\t\t/* RARP reply\t\t\t*/\n+#define\tARPOP_InREQUEST\t8\t\t/* InARP request\t\t*/\n+#define\tARPOP_InREPLY\t9\t\t/* InARP reply\t\t\t*/\n+#define\tARPOP_NAK\t10\t\t/* (ATM)ARP NAK\t\t\t*/\n+\n+\n+/* ARP ioctl request. */\n+struct arpreq {\n+\tstruct sockaddr\tarp_pa;\t\t/* protocol address\t\t */\n+\tstruct sockaddr\tarp_ha;\t\t/* hardware address\t\t */\n+\tint\t\tarp_flags;\t/* flags\t\t\t */\n+\tstruct sockaddr arp_netmask;    /* netmask (only for proxy arps) */\n+\tchar\t\tarp_dev[IFNAMSIZ];\n+};\n+\n+struct arpreq_old {\n+\tstruct sockaddr\tarp_pa;\t\t/* protocol address\t\t */\n+\tstruct sockaddr\tarp_ha;\t\t/* hardware address\t\t */\n+\tint\t\tarp_flags;\t/* flags\t\t\t */\n+\tstruct sockaddr\tarp_netmask;    /* netmask (only for proxy arps) */\n+};\n+\n+/* ARP Flag values. */\n+#define ATF_COM\t\t0x02\t\t/* completed entry (ha valid)\t*/\n+#define\tATF_PERM\t0x04\t\t/* permanent entry\t\t*/\n+#define\tATF_PUBL\t0x08\t\t/* publish entry\t\t*/\n+#define\tATF_USETRAILERS\t0x10\t\t/* has requested trailers\t*/\n+#define ATF_NETMASK     0x20            /* want to use a netmask (only\n+\t\t\t\t\t   for proxy entries) */\n+#define ATF_DONTPUB\t0x40\t\t/* don't answer this addresses\t*/\n+\n+/*\n+ *\tThis structure defines an ethernet arp header.\n+ */\n+\n+struct arphdr {\n+\t__be16\t\tar_hrd;\t\t/* format of hardware address\t*/\n+\t__be16\t\tar_pro;\t\t/* format of protocol address\t*/\n+\tunsigned char\tar_hln;\t\t/* length of hardware address\t*/\n+\tunsigned char\tar_pln;\t\t/* length of protocol address\t*/\n+\t__be16\t\tar_op;\t\t/* ARP opcode (command)\t\t*/\n+\n+#if 0\n+\t /*\n+\t  *\t Ethernet looks like this : This bit is variable sized however...\n+\t  */\n+\tunsigned char\t\tar_sha[ETH_ALEN];\t/* sender hardware address\t*/\n+\tunsigned char\t\tar_sip[4];\t\t/* sender IP address\t\t*/\n+\tunsigned char\t\tar_tha[ETH_ALEN];\t/* target hardware address\t*/\n+\tunsigned char\t\tar_tip[4];\t\t/* target IP address\t\t*/\n+#endif\n+\n+};\n+\n+\n+#endif /* _UAPI_LINUX_IF_ARP_H */\ndiff --git a/src/basic/linux/if_bonding.h b/src/basic/linux/if_bonding.h\nnew file mode 100644\nindex 00000000000..61a1bf6e865\n--- /dev/null\n+++ b/src/basic/linux/if_bonding.h\n@@ -0,0 +1,131 @@\n+/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */\n+/*\n+ * Bond several ethernet interfaces into a Cisco, running 'Etherchannel'.\n+ *\n+ *\n+ * Portions are (c) Copyright 1995 Simon \"Guru Aleph-Null\" Janes\n+ * NCM: Network and Communications Management, Inc.\n+ *\n+ * BUT, I'm the one who modified it for ethernet, so:\n+ * (c) Copyright 1999, Thomas Davis, tadavis@lbl.gov\n+ *\n+ *\tThis software may be used and distributed according to the terms\n+ *\tof the GNU Public License, incorporated herein by reference.\n+ *\n+ * 2003/03/18 - Amir Noam <amir.noam at intel dot com>\n+ *\t- Added support for getting slave's speed and duplex via ethtool.\n+ *\t  Needed for 802.3ad and other future modes.\n+ *\n+ * 2003/03/18 - Tsippy Mendelson <tsippy.mendelson at intel dot com> and\n+ *\t\tShmulik Hen <shmulik.hen at intel dot com>\n+ *\t- Enable support of modes that need to use the unique mac address of\n+ *\t  each slave.\n+ *\n+ * 2003/03/18 - Tsippy Mendelson <tsippy.mendelson at intel dot com> and\n+ *\t\tAmir Noam <amir.noam at intel dot com>\n+ *\t- Moved driver's private data types to bonding.h\n+ *\n+ * 2003/03/18 - Amir Noam <amir.noam at intel dot com>,\n+ *\t\tTsippy Mendelson <tsippy.mendelson at intel dot com> and\n+ *\t\tShmulik Hen <shmulik.hen at intel dot com>\n+ *\t- Added support for IEEE 802.3ad Dynamic link aggregation mode.\n+ *\n+ * 2003/05/01 - Amir Noam <amir.noam at intel dot com>\n+ *\t- Added ABI version control to restore compatibility between\n+ *\t  new/old ifenslave and new/old bonding.\n+ *\n+ * 2003/12/01 - Shmulik Hen <shmulik.hen at intel dot com>\n+ *\t- Code cleanup and style changes\n+ *\n+ * 2005/05/05 - Jason Gabler <jygabler at lbl dot gov>\n+ *      - added definitions for various XOR hashing policies\n+ */\n+\n+#ifndef _LINUX_IF_BONDING_H\n+#define _LINUX_IF_BONDING_H\n+\n+#include <linux/if.h>\n+#include <linux/types.h>\n+#include <linux/if_ether.h>\n+\n+/* userland - kernel ABI version (2003/05/08) */\n+#define BOND_ABI_VERSION 2\n+\n+/*\n+ * We can remove these ioctl definitions in 2.5.  People should use the\n+ * SIOC*** versions of them instead\n+ */\n+#define BOND_ENSLAVE_OLD\t\t(SIOCDEVPRIVATE)\n+#define BOND_RELEASE_OLD\t\t(SIOCDEVPRIVATE + 1)\n+#define BOND_SETHWADDR_OLD\t\t(SIOCDEVPRIVATE + 2)\n+#define BOND_SLAVE_INFO_QUERY_OLD\t(SIOCDEVPRIVATE + 11)\n+#define BOND_INFO_QUERY_OLD\t\t(SIOCDEVPRIVATE + 12)\n+#define BOND_CHANGE_ACTIVE_OLD\t\t(SIOCDEVPRIVATE + 13)\n+\n+#define BOND_CHECK_MII_STATUS\t(SIOCGMIIPHY)\n+\n+#define BOND_MODE_ROUNDROBIN\t0\n+#define BOND_MODE_ACTIVEBACKUP\t1\n+#define BOND_MODE_XOR\t\t2\n+#define BOND_MODE_BROADCAST\t3\n+#define BOND_MODE_8023AD        4\n+#define BOND_MODE_TLB           5\n+#define BOND_MODE_ALB\t\t6 /* TLB + RLB (receive load balancing) */\n+\n+/* each slave's link has 4 states */\n+#define BOND_LINK_UP    0           /* link is up and running */\n+#define BOND_LINK_FAIL  1           /* link has just gone down */\n+#define BOND_LINK_DOWN  2           /* link has been down for too long time */\n+#define BOND_LINK_BACK  3           /* link is going back */\n+\n+/* each slave has several states */\n+#define BOND_STATE_ACTIVE       0   /* link is active */\n+#define BOND_STATE_BACKUP       1   /* link is backup */\n+\n+#define BOND_DEFAULT_MAX_BONDS  1   /* Default maximum number of devices to support */\n+\n+#define BOND_DEFAULT_TX_QUEUES 16   /* Default number of tx queues per device */\n+\n+#define BOND_DEFAULT_RESEND_IGMP\t1 /* Default number of IGMP membership reports */\n+\n+/* hashing types */\n+#define BOND_XMIT_POLICY_LAYER2\t\t0 /* layer 2 (MAC only), default */\n+#define BOND_XMIT_POLICY_LAYER34\t1 /* layer 3+4 (IP ^ (TCP || UDP)) */\n+#define BOND_XMIT_POLICY_LAYER23\t2 /* layer 2+3 (IP ^ MAC) */\n+#define BOND_XMIT_POLICY_ENCAP23\t3 /* encapsulated layer 2+3 */\n+#define BOND_XMIT_POLICY_ENCAP34\t4 /* encapsulated layer 3+4 */\n+\n+typedef struct ifbond {\n+\t__s32 bond_mode;\n+\t__s32 num_slaves;\n+\t__s32 miimon;\n+} ifbond;\n+\n+typedef struct ifslave {\n+\t__s32 slave_id; /* Used as an IN param to the BOND_SLAVE_INFO_QUERY ioctl */\n+\tchar slave_name[IFNAMSIZ];\n+\t__s8 link;\n+\t__s8 state;\n+\t__u32  link_failure_count;\n+} ifslave;\n+\n+struct ad_info {\n+\t__u16 aggregator_id;\n+\t__u16 ports;\n+\t__u16 actor_key;\n+\t__u16 partner_key;\n+\t__u8 partner_system[ETH_ALEN];\n+};\n+\n+#endif /* _LINUX_IF_BONDING_H */\n+\n+/*\n+ * Local variables:\n+ *  version-control: t\n+ *  kept-new-versions: 5\n+ *  c-indent-level: 8\n+ *  c-basic-offset: 8\n+ *  tab-width: 8\n+ * End:\n+ */\n+\ndiff --git a/src/basic/linux/if_bridge.h b/src/basic/linux/if_bridge.h\nnew file mode 100644\nindex 00000000000..773e476a8e5\n--- /dev/null\n+++ b/src/basic/linux/if_bridge.h\n@@ -0,0 +1,316 @@\n+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */\n+/*\n+ *\tLinux ethernet bridge\n+ *\n+ *\tAuthors:\n+ *\tLennert Buytenhek\t\t<buytenh@gnu.org>\n+ *\n+ *\tThis program is free software; you can redistribute it and/or\n+ *\tmodify it under the terms of the GNU General Public License\n+ *\tas published by the Free Software Foundation; either version\n+ *\t2 of the License, or (at your option) any later version.\n+ */\n+\n+#ifndef _UAPI_LINUX_IF_BRIDGE_H\n+#define _UAPI_LINUX_IF_BRIDGE_H\n+\n+#include <linux/types.h>\n+#include <linux/if_ether.h>\n+#include <linux/in6.h>\n+\n+#define SYSFS_BRIDGE_ATTR\t\"bridge\"\n+#define SYSFS_BRIDGE_FDB\t\"brforward\"\n+#define SYSFS_BRIDGE_PORT_SUBDIR \"brif\"\n+#define SYSFS_BRIDGE_PORT_ATTR\t\"brport\"\n+#define SYSFS_BRIDGE_PORT_LINK\t\"bridge\"\n+\n+#define BRCTL_VERSION 1\n+\n+#define BRCTL_GET_VERSION 0\n+#define BRCTL_GET_BRIDGES 1\n+#define BRCTL_ADD_BRIDGE 2\n+#define BRCTL_DEL_BRIDGE 3\n+#define BRCTL_ADD_IF 4\n+#define BRCTL_DEL_IF 5\n+#define BRCTL_GET_BRIDGE_INFO 6\n+#define BRCTL_GET_PORT_LIST 7\n+#define BRCTL_SET_BRIDGE_FORWARD_DELAY 8\n+#define BRCTL_SET_BRIDGE_HELLO_TIME 9\n+#define BRCTL_SET_BRIDGE_MAX_AGE 10\n+#define BRCTL_SET_AGEING_TIME 11\n+#define BRCTL_SET_GC_INTERVAL 12\n+#define BRCTL_GET_PORT_INFO 13\n+#define BRCTL_SET_BRIDGE_STP_STATE 14\n+#define BRCTL_SET_BRIDGE_PRIORITY 15\n+#define BRCTL_SET_PORT_PRIORITY 16\n+#define BRCTL_SET_PATH_COST 17\n+#define BRCTL_GET_FDB_ENTRIES 18\n+\n+#define BR_STATE_DISABLED 0\n+#define BR_STATE_LISTENING 1\n+#define BR_STATE_LEARNING 2\n+#define BR_STATE_FORWARDING 3\n+#define BR_STATE_BLOCKING 4\n+\n+struct __bridge_info {\n+\t__u64 designated_root;\n+\t__u64 bridge_id;\n+\t__u32 root_path_cost;\n+\t__u32 max_age;\n+\t__u32 hello_time;\n+\t__u32 forward_delay;\n+\t__u32 bridge_max_age;\n+\t__u32 bridge_hello_time;\n+\t__u32 bridge_forward_delay;\n+\t__u8 topology_change;\n+\t__u8 topology_change_detected;\n+\t__u8 root_port;\n+\t__u8 stp_enabled;\n+\t__u32 ageing_time;\n+\t__u32 gc_interval;\n+\t__u32 hello_timer_value;\n+\t__u32 tcn_timer_value;\n+\t__u32 topology_change_timer_value;\n+\t__u32 gc_timer_value;\n+};\n+\n+struct __port_info {\n+\t__u64 designated_root;\n+\t__u64 designated_bridge;\n+\t__u16 port_id;\n+\t__u16 designated_port;\n+\t__u32 path_cost;\n+\t__u32 designated_cost;\n+\t__u8 state;\n+\t__u8 top_change_ack;\n+\t__u8 config_pending;\n+\t__u8 unused0;\n+\t__u32 message_age_timer_value;\n+\t__u32 forward_delay_timer_value;\n+\t__u32 hold_timer_value;\n+};\n+\n+struct __fdb_entry {\n+\t__u8 mac_addr[ETH_ALEN];\n+\t__u8 port_no;\n+\t__u8 is_local;\n+\t__u32 ageing_timer_value;\n+\t__u8 port_hi;\n+\t__u8 pad0;\n+\t__u16 unused;\n+};\n+\n+/* Bridge Flags */\n+#define BRIDGE_FLAGS_MASTER\t1\t/* Bridge command to/from master */\n+#define BRIDGE_FLAGS_SELF\t2\t/* Bridge command to/from lowerdev */\n+\n+#define BRIDGE_MODE_VEB\t\t0\t/* Default loopback mode */\n+#define BRIDGE_MODE_VEPA\t1\t/* 802.1Qbg defined VEPA mode */\n+#define BRIDGE_MODE_UNDEF\t0xFFFF  /* mode undefined */\n+\n+/* Bridge management nested attributes\n+ * [IFLA_AF_SPEC] = {\n+ *     [IFLA_BRIDGE_FLAGS]\n+ *     [IFLA_BRIDGE_MODE]\n+ *     [IFLA_BRIDGE_VLAN_INFO]\n+ * }\n+ */\n+enum {\n+\tIFLA_BRIDGE_FLAGS,\n+\tIFLA_BRIDGE_MODE,\n+\tIFLA_BRIDGE_VLAN_INFO,\n+\tIFLA_BRIDGE_VLAN_TUNNEL_INFO,\n+\t__IFLA_BRIDGE_MAX,\n+};\n+#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)\n+\n+#define BRIDGE_VLAN_INFO_MASTER\t(1<<0)\t/* Operate on Bridge device as well */\n+#define BRIDGE_VLAN_INFO_PVID\t(1<<1)\t/* VLAN is PVID, ingress untagged */\n+#define BRIDGE_VLAN_INFO_UNTAGGED\t(1<<2)\t/* VLAN egresses untagged */\n+#define BRIDGE_VLAN_INFO_RANGE_BEGIN\t(1<<3) /* VLAN is start of vlan range */\n+#define BRIDGE_VLAN_INFO_RANGE_END\t(1<<4) /* VLAN is end of vlan range */\n+#define BRIDGE_VLAN_INFO_BRENTRY\t(1<<5) /* Global bridge VLAN entry */\n+\n+struct bridge_vlan_info {\n+\t__u16 flags;\n+\t__u16 vid;\n+};\n+\n+enum {\n+\tIFLA_BRIDGE_VLAN_TUNNEL_UNSPEC,\n+\tIFLA_BRIDGE_VLAN_TUNNEL_ID,\n+\tIFLA_BRIDGE_VLAN_TUNNEL_VID,\n+\tIFLA_BRIDGE_VLAN_TUNNEL_FLAGS,\n+\t__IFLA_BRIDGE_VLAN_TUNNEL_MAX,\n+};\n+\n+#define IFLA_BRIDGE_VLAN_TUNNEL_MAX (__IFLA_BRIDGE_VLAN_TUNNEL_MAX - 1)\n+\n+struct bridge_vlan_xstats {\n+\t__u64 rx_bytes;\n+\t__u64 rx_packets;\n+\t__u64 tx_bytes;\n+\t__u64 tx_packets;\n+\t__u16 vid;\n+\t__u16 flags;\n+\t__u32 pad2;\n+};\n+\n+/* Bridge multicast database attributes\n+ * [MDBA_MDB] = {\n+ *     [MDBA_MDB_ENTRY] = {\n+ *         [MDBA_MDB_ENTRY_INFO] {\n+ *\t\tstruct br_mdb_entry\n+ *\t\t[MDBA_MDB_EATTR attributes]\n+ *         }\n+ *     }\n+ * }\n+ * [MDBA_ROUTER] = {\n+ *    [MDBA_ROUTER_PORT] = {\n+ *        u32 ifindex\n+ *        [MDBA_ROUTER_PATTR attributes]\n+ *    }\n+ * }\n+ */\n+enum {\n+\tMDBA_UNSPEC,\n+\tMDBA_MDB,\n+\tMDBA_ROUTER,\n+\t__MDBA_MAX,\n+};\n+#define MDBA_MAX (__MDBA_MAX - 1)\n+\n+enum {\n+\tMDBA_MDB_UNSPEC,\n+\tMDBA_MDB_ENTRY,\n+\t__MDBA_MDB_MAX,\n+};\n+#define MDBA_MDB_MAX (__MDBA_MDB_MAX - 1)\n+\n+enum {\n+\tMDBA_MDB_ENTRY_UNSPEC,\n+\tMDBA_MDB_ENTRY_INFO,\n+\t__MDBA_MDB_ENTRY_MAX,\n+};\n+#define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)\n+\n+/* per mdb entry additional attributes */\n+enum {\n+\tMDBA_MDB_EATTR_UNSPEC,\n+\tMDBA_MDB_EATTR_TIMER,\n+\t__MDBA_MDB_EATTR_MAX\n+};\n+#define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)\n+\n+/* multicast router types */\n+enum {\n+\tMDB_RTR_TYPE_DISABLED,\n+\tMDB_RTR_TYPE_TEMP_QUERY,\n+\tMDB_RTR_TYPE_PERM,\n+\tMDB_RTR_TYPE_TEMP\n+};\n+\n+enum {\n+\tMDBA_ROUTER_UNSPEC,\n+\tMDBA_ROUTER_PORT,\n+\t__MDBA_ROUTER_MAX,\n+};\n+#define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)\n+\n+/* router port attributes */\n+enum {\n+\tMDBA_ROUTER_PATTR_UNSPEC,\n+\tMDBA_ROUTER_PATTR_TIMER,\n+\tMDBA_ROUTER_PATTR_TYPE,\n+\t__MDBA_ROUTER_PATTR_MAX\n+};\n+#define MDBA_ROUTER_PATTR_MAX (__MDBA_ROUTER_PATTR_MAX - 1)\n+\n+struct br_port_msg {\n+\t__u8  family;\n+\t__u32 ifindex;\n+};\n+\n+struct br_mdb_entry {\n+\t__u32 ifindex;\n+#define MDB_TEMPORARY 0\n+#define MDB_PERMANENT 1\n+\t__u8 state;\n+#define MDB_FLAGS_OFFLOAD\t(1 << 0)\n+\t__u8 flags;\n+\t__u16 vid;\n+\tstruct {\n+\t\tunion {\n+\t\t\t__be32\tip4;\n+\t\t\tstruct in6_addr ip6;\n+\t\t} u;\n+\t\t__be16\t\tproto;\n+\t} addr;\n+};\n+\n+enum {\n+\tMDBA_SET_ENTRY_UNSPEC,\n+\tMDBA_SET_ENTRY,\n+\t__MDBA_SET_ENTRY_MAX,\n+};\n+#define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)\n+\n+/* Embedded inside LINK_XSTATS_TYPE_BRIDGE */\n+enum {\n+\tBRIDGE_XSTATS_UNSPEC,\n+\tBRIDGE_XSTATS_VLAN,\n+\tBRIDGE_XSTATS_MCAST,\n+\tBRIDGE_XSTATS_PAD,\n+\t__BRIDGE_XSTATS_MAX\n+};\n+#define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX - 1)\n+\n+enum {\n+\tBR_MCAST_DIR_RX,\n+\tBR_MCAST_DIR_TX,\n+\tBR_MCAST_DIR_SIZE\n+};\n+\n+/* IGMP/MLD statistics */\n+struct br_mcast_stats {\n+\t__u64 igmp_v1queries[BR_MCAST_DIR_SIZE];\n+\t__u64 igmp_v2queries[BR_MCAST_DIR_SIZE];\n+\t__u64 igmp_v3queries[BR_MCAST_DIR_SIZE];\n+\t__u64 igmp_leaves[BR_MCAST_DIR_SIZE];\n+\t__u64 igmp_v1reports[BR_MCAST_DIR_SIZE];\n+\t__u64 igmp_v2reports[BR_MCAST_DIR_SIZE];\n+\t__u64 igmp_v3reports[BR_MCAST_DIR_SIZE];\n+\t__u64 igmp_parse_errors;\n+\n+\t__u64 mld_v1queries[BR_MCAST_DIR_SIZE];\n+\t__u64 mld_v2queries[BR_MCAST_DIR_SIZE];\n+\t__u64 mld_leaves[BR_MCAST_DIR_SIZE];\n+\t__u64 mld_v1reports[BR_MCAST_DIR_SIZE];\n+\t__u64 mld_v2reports[BR_MCAST_DIR_SIZE];\n+\t__u64 mld_parse_errors;\n+\n+\t__u64 mcast_bytes[BR_MCAST_DIR_SIZE];\n+\t__u64 mcast_packets[BR_MCAST_DIR_SIZE];\n+};\n+\n+/* bridge boolean options\n+ * BR_BOOLOPT_NO_LL_LEARN - disable learning from link-local packets\n+ *\n+ * IMPORTANT: if adding a new option do not forget to handle\n+ *            it in br_boolopt_toggle/get and bridge sysfs\n+ */\n+enum br_boolopt_id {\n+\tBR_BOOLOPT_NO_LL_LEARN,\n+\tBR_BOOLOPT_MAX\n+};\n+\n+/* struct br_boolopt_multi - change multiple bridge boolean options\n+ *\n+ * @optval: new option values (bit per option)\n+ * @optmask: options to change (bit per option)\n+ */\n+struct br_boolopt_multi {\n+\t__u32 optval;\n+\t__u32 optmask;\n+};\n+#endif /* _UAPI_LINUX_IF_BRIDGE_H */\ndiff --git a/src/basic/linux/if_link.h b/src/basic/linux/if_link.h\nnew file mode 100644\nindex 00000000000..d6533828123\n--- /dev/null\n+++ b/src/basic/linux/if_link.h\n@@ -0,0 +1,1024 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+#ifndef _UAPI_LINUX_IF_LINK_H\n+#define _UAPI_LINUX_IF_LINK_H\n+\n+#include <linux/types.h>\n+#include <linux/netlink.h>\n+\n+/* This struct should be in sync with struct rtnl_link_stats64 */\n+struct rtnl_link_stats {\n+\t__u32\trx_packets;\t\t/* total packets received\t*/\n+\t__u32\ttx_packets;\t\t/* total packets transmitted\t*/\n+\t__u32\trx_bytes;\t\t/* total bytes received \t*/\n+\t__u32\ttx_bytes;\t\t/* total bytes transmitted\t*/\n+\t__u32\trx_errors;\t\t/* bad packets received\t\t*/\n+\t__u32\ttx_errors;\t\t/* packet transmit problems\t*/\n+\t__u32\trx_dropped;\t\t/* no space in linux buffers\t*/\n+\t__u32\ttx_dropped;\t\t/* no space available in linux\t*/\n+\t__u32\tmulticast;\t\t/* multicast packets received\t*/\n+\t__u32\tcollisions;\n+\n+\t/* detailed rx_errors: */\n+\t__u32\trx_length_errors;\n+\t__u32\trx_over_errors;\t\t/* receiver ring buff overflow\t*/\n+\t__u32\trx_crc_errors;\t\t/* recved pkt with crc error\t*/\n+\t__u32\trx_frame_errors;\t/* recv'd frame alignment error */\n+\t__u32\trx_fifo_errors;\t\t/* recv'r fifo overrun\t\t*/\n+\t__u32\trx_missed_errors;\t/* receiver missed packet\t*/\n+\n+\t/* detailed tx_errors */\n+\t__u32\ttx_aborted_errors;\n+\t__u32\ttx_carrier_errors;\n+\t__u32\ttx_fifo_errors;\n+\t__u32\ttx_heartbeat_errors;\n+\t__u32\ttx_window_errors;\n+\n+\t/* for cslip etc */\n+\t__u32\trx_compressed;\n+\t__u32\ttx_compressed;\n+\n+\t__u32\trx_nohandler;\t\t/* dropped, no handler found\t*/\n+};\n+\n+/* The main device statistics structure */\n+struct rtnl_link_stats64 {\n+\t__u64\trx_packets;\t\t/* total packets received\t*/\n+\t__u64\ttx_packets;\t\t/* total packets transmitted\t*/\n+\t__u64\trx_bytes;\t\t/* total bytes received \t*/\n+\t__u64\ttx_bytes;\t\t/* total bytes transmitted\t*/\n+\t__u64\trx_errors;\t\t/* bad packets received\t\t*/\n+\t__u64\ttx_errors;\t\t/* packet transmit problems\t*/\n+\t__u64\trx_dropped;\t\t/* no space in linux buffers\t*/\n+\t__u64\ttx_dropped;\t\t/* no space available in linux\t*/\n+\t__u64\tmulticast;\t\t/* multicast packets received\t*/\n+\t__u64\tcollisions;\n+\n+\t/* detailed rx_errors: */\n+\t__u64\trx_length_errors;\n+\t__u64\trx_over_errors;\t\t/* receiver ring buff overflow\t*/\n+\t__u64\trx_crc_errors;\t\t/* recved pkt with crc error\t*/\n+\t__u64\trx_frame_errors;\t/* recv'd frame alignment error */\n+\t__u64\trx_fifo_errors;\t\t/* recv'r fifo overrun\t\t*/\n+\t__u64\trx_missed_errors;\t/* receiver missed packet\t*/\n+\n+\t/* detailed tx_errors */\n+\t__u64\ttx_aborted_errors;\n+\t__u64\ttx_carrier_errors;\n+\t__u64\ttx_fifo_errors;\n+\t__u64\ttx_heartbeat_errors;\n+\t__u64\ttx_window_errors;\n+\n+\t/* for cslip etc */\n+\t__u64\trx_compressed;\n+\t__u64\ttx_compressed;\n+\n+\t__u64\trx_nohandler;\t\t/* dropped, no handler found\t*/\n+};\n+\n+/* The struct should be in sync with struct ifmap */\n+struct rtnl_link_ifmap {\n+\t__u64\tmem_start;\n+\t__u64\tmem_end;\n+\t__u64\tbase_addr;\n+\t__u16\tirq;\n+\t__u8\tdma;\n+\t__u8\tport;\n+};\n+\n+/*\n+ * IFLA_AF_SPEC\n+ *   Contains nested attributes for address family specific attributes.\n+ *   Each address family may create a attribute with the address family\n+ *   number as type and create its own attribute structure in it.\n+ *\n+ *   Example:\n+ *   [IFLA_AF_SPEC] = {\n+ *       [AF_INET] = {\n+ *           [IFLA_INET_CONF] = ...,\n+ *       },\n+ *       [AF_INET6] = {\n+ *           [IFLA_INET6_FLAGS] = ...,\n+ *           [IFLA_INET6_CONF] = ...,\n+ *       }\n+ *   }\n+ */\n+\n+enum {\n+\tIFLA_UNSPEC,\n+\tIFLA_ADDRESS,\n+\tIFLA_BROADCAST,\n+\tIFLA_IFNAME,\n+\tIFLA_MTU,\n+\tIFLA_LINK,\n+\tIFLA_QDISC,\n+\tIFLA_STATS,\n+\tIFLA_COST,\n+#define IFLA_COST IFLA_COST\n+\tIFLA_PRIORITY,\n+#define IFLA_PRIORITY IFLA_PRIORITY\n+\tIFLA_MASTER,\n+#define IFLA_MASTER IFLA_MASTER\n+\tIFLA_WIRELESS,\t\t/* Wireless Extension event - see wireless.h */\n+#define IFLA_WIRELESS IFLA_WIRELESS\n+\tIFLA_PROTINFO,\t\t/* Protocol specific information for a link */\n+#define IFLA_PROTINFO IFLA_PROTINFO\n+\tIFLA_TXQLEN,\n+#define IFLA_TXQLEN IFLA_TXQLEN\n+\tIFLA_MAP,\n+#define IFLA_MAP IFLA_MAP\n+\tIFLA_WEIGHT,\n+#define IFLA_WEIGHT IFLA_WEIGHT\n+\tIFLA_OPERSTATE,\n+\tIFLA_LINKMODE,\n+\tIFLA_LINKINFO,\n+#define IFLA_LINKINFO IFLA_LINKINFO\n+\tIFLA_NET_NS_PID,\n+\tIFLA_IFALIAS,\n+\tIFLA_NUM_VF,\t\t/* Number of VFs if device is SR-IOV PF */\n+\tIFLA_VFINFO_LIST,\n+\tIFLA_STATS64,\n+\tIFLA_VF_PORTS,\n+\tIFLA_PORT_SELF,\n+\tIFLA_AF_SPEC,\n+\tIFLA_GROUP,\t\t/* Group the device belongs to */\n+\tIFLA_NET_NS_FD,\n+\tIFLA_EXT_MASK,\t\t/* Extended info mask, VFs, etc */\n+\tIFLA_PROMISCUITY,\t/* Promiscuity count: > 0 means acts PROMISC */\n+#define IFLA_PROMISCUITY IFLA_PROMISCUITY\n+\tIFLA_NUM_TX_QUEUES,\n+\tIFLA_NUM_RX_QUEUES,\n+\tIFLA_CARRIER,\n+\tIFLA_PHYS_PORT_ID,\n+\tIFLA_CARRIER_CHANGES,\n+\tIFLA_PHYS_SWITCH_ID,\n+\tIFLA_LINK_NETNSID,\n+\tIFLA_PHYS_PORT_NAME,\n+\tIFLA_PROTO_DOWN,\n+\tIFLA_GSO_MAX_SEGS,\n+\tIFLA_GSO_MAX_SIZE,\n+\tIFLA_PAD,\n+\tIFLA_XDP,\n+\tIFLA_EVENT,\n+\tIFLA_NEW_NETNSID,\n+\tIFLA_IF_NETNSID,\n+\tIFLA_TARGET_NETNSID = IFLA_IF_NETNSID, /* new alias */\n+\tIFLA_CARRIER_UP_COUNT,\n+\tIFLA_CARRIER_DOWN_COUNT,\n+\tIFLA_NEW_IFINDEX,\n+\tIFLA_MIN_MTU,\n+\tIFLA_MAX_MTU,\n+\t__IFLA_MAX\n+};\n+\n+\n+#define IFLA_MAX (__IFLA_MAX - 1)\n+\n+/* backwards compatibility for userspace */\n+#ifndef __KERNEL__\n+#define IFLA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))\n+#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))\n+#endif\n+\n+enum {\n+\tIFLA_INET_UNSPEC,\n+\tIFLA_INET_CONF,\n+\t__IFLA_INET_MAX,\n+};\n+\n+#define IFLA_INET_MAX (__IFLA_INET_MAX - 1)\n+\n+/* ifi_flags.\n+\n+   IFF_* flags.\n+\n+   The only change is:\n+   IFF_LOOPBACK, IFF_BROADCAST and IFF_POINTOPOINT are\n+   more not changeable by user. They describe link media\n+   characteristics and set by device driver.\n+\n+   Comments:\n+   - Combination IFF_BROADCAST|IFF_POINTOPOINT is invalid\n+   - If neither of these three flags are set;\n+     the interface is NBMA.\n+\n+   - IFF_MULTICAST does not mean anything special:\n+   multicasts can be used on all not-NBMA links.\n+   IFF_MULTICAST means that this media uses special encapsulation\n+   for multicast frames. Apparently, all IFF_POINTOPOINT and\n+   IFF_BROADCAST devices are able to use multicasts too.\n+ */\n+\n+/* IFLA_LINK.\n+   For usual devices it is equal ifi_index.\n+   If it is a \"virtual interface\" (f.e. tunnel), ifi_link\n+   can point to real physical interface (f.e. for bandwidth calculations),\n+   or maybe 0, what means, that real media is unknown (usual\n+   for IPIP tunnels, when route to endpoint is allowed to change)\n+ */\n+\n+/* Subtype attributes for IFLA_PROTINFO */\n+enum {\n+\tIFLA_INET6_UNSPEC,\n+\tIFLA_INET6_FLAGS,\t/* link flags\t\t\t*/\n+\tIFLA_INET6_CONF,\t/* sysctl parameters\t\t*/\n+\tIFLA_INET6_STATS,\t/* statistics\t\t\t*/\n+\tIFLA_INET6_MCAST,\t/* MC things. What of them?\t*/\n+\tIFLA_INET6_CACHEINFO,\t/* time values and max reasm size */\n+\tIFLA_INET6_ICMP6STATS,\t/* statistics (icmpv6)\t\t*/\n+\tIFLA_INET6_TOKEN,\t/* device token\t\t\t*/\n+\tIFLA_INET6_ADDR_GEN_MODE, /* implicit address generator mode */\n+\t__IFLA_INET6_MAX\n+};\n+\n+#define IFLA_INET6_MAX\t(__IFLA_INET6_MAX - 1)\n+\n+enum in6_addr_gen_mode {\n+\tIN6_ADDR_GEN_MODE_EUI64,\n+\tIN6_ADDR_GEN_MODE_NONE,\n+\tIN6_ADDR_GEN_MODE_STABLE_PRIVACY,\n+\tIN6_ADDR_GEN_MODE_RANDOM,\n+};\n+\n+/* Bridge section */\n+\n+enum {\n+\tIFLA_BR_UNSPEC,\n+\tIFLA_BR_FORWARD_DELAY,\n+\tIFLA_BR_HELLO_TIME,\n+\tIFLA_BR_MAX_AGE,\n+\tIFLA_BR_AGEING_TIME,\n+\tIFLA_BR_STP_STATE,\n+\tIFLA_BR_PRIORITY,\n+\tIFLA_BR_VLAN_FILTERING,\n+\tIFLA_BR_VLAN_PROTOCOL,\n+\tIFLA_BR_GROUP_FWD_MASK,\n+\tIFLA_BR_ROOT_ID,\n+\tIFLA_BR_BRIDGE_ID,\n+\tIFLA_BR_ROOT_PORT,\n+\tIFLA_BR_ROOT_PATH_COST,\n+\tIFLA_BR_TOPOLOGY_CHANGE,\n+\tIFLA_BR_TOPOLOGY_CHANGE_DETECTED,\n+\tIFLA_BR_HELLO_TIMER,\n+\tIFLA_BR_TCN_TIMER,\n+\tIFLA_BR_TOPOLOGY_CHANGE_TIMER,\n+\tIFLA_BR_GC_TIMER,\n+\tIFLA_BR_GROUP_ADDR,\n+\tIFLA_BR_FDB_FLUSH,\n+\tIFLA_BR_MCAST_ROUTER,\n+\tIFLA_BR_MCAST_SNOOPING,\n+\tIFLA_BR_MCAST_QUERY_USE_IFADDR,\n+\tIFLA_BR_MCAST_QUERIER,\n+\tIFLA_BR_MCAST_HASH_ELASTICITY,\n+\tIFLA_BR_MCAST_HASH_MAX,\n+\tIFLA_BR_MCAST_LAST_MEMBER_CNT,\n+\tIFLA_BR_MCAST_STARTUP_QUERY_CNT,\n+\tIFLA_BR_MCAST_LAST_MEMBER_INTVL,\n+\tIFLA_BR_MCAST_MEMBERSHIP_INTVL,\n+\tIFLA_BR_MCAST_QUERIER_INTVL,\n+\tIFLA_BR_MCAST_QUERY_INTVL,\n+\tIFLA_BR_MCAST_QUERY_RESPONSE_INTVL,\n+\tIFLA_BR_MCAST_STARTUP_QUERY_INTVL,\n+\tIFLA_BR_NF_CALL_IPTABLES,\n+\tIFLA_BR_NF_CALL_IP6TABLES,\n+\tIFLA_BR_NF_CALL_ARPTABLES,\n+\tIFLA_BR_VLAN_DEFAULT_PVID,\n+\tIFLA_BR_PAD,\n+\tIFLA_BR_VLAN_STATS_ENABLED,\n+\tIFLA_BR_MCAST_STATS_ENABLED,\n+\tIFLA_BR_MCAST_IGMP_VERSION,\n+\tIFLA_BR_MCAST_MLD_VERSION,\n+\tIFLA_BR_VLAN_STATS_PER_PORT,\n+\tIFLA_BR_MULTI_BOOLOPT,\n+\t__IFLA_BR_MAX,\n+};\n+\n+#define IFLA_BR_MAX\t(__IFLA_BR_MAX - 1)\n+\n+struct ifla_bridge_id {\n+\t__u8\tprio[2];\n+\t__u8\taddr[6]; /* ETH_ALEN */\n+};\n+\n+enum {\n+\tBRIDGE_MODE_UNSPEC,\n+\tBRIDGE_MODE_HAIRPIN,\n+};\n+\n+enum {\n+\tIFLA_BRPORT_UNSPEC,\n+\tIFLA_BRPORT_STATE,\t/* Spanning tree state     */\n+\tIFLA_BRPORT_PRIORITY,\t/* \"             priority  */\n+\tIFLA_BRPORT_COST,\t/* \"             cost      */\n+\tIFLA_BRPORT_MODE,\t/* mode (hairpin)          */\n+\tIFLA_BRPORT_GUARD,\t/* bpdu guard              */\n+\tIFLA_BRPORT_PROTECT,\t/* root port protection    */\n+\tIFLA_BRPORT_FAST_LEAVE,\t/* multicast fast leave    */\n+\tIFLA_BRPORT_LEARNING,\t/* mac learning */\n+\tIFLA_BRPORT_UNICAST_FLOOD, /* flood unicast traffic */\n+\tIFLA_BRPORT_PROXYARP,\t/* proxy ARP */\n+\tIFLA_BRPORT_LEARNING_SYNC, /* mac learning sync from device */\n+\tIFLA_BRPORT_PROXYARP_WIFI, /* proxy ARP for Wi-Fi */\n+\tIFLA_BRPORT_ROOT_ID,\t/* designated root */\n+\tIFLA_BRPORT_BRIDGE_ID,\t/* designated bridge */\n+\tIFLA_BRPORT_DESIGNATED_PORT,\n+\tIFLA_BRPORT_DESIGNATED_COST,\n+\tIFLA_BRPORT_ID,\n+\tIFLA_BRPORT_NO,\n+\tIFLA_BRPORT_TOPOLOGY_CHANGE_ACK,\n+\tIFLA_BRPORT_CONFIG_PENDING,\n+\tIFLA_BRPORT_MESSAGE_AGE_TIMER,\n+\tIFLA_BRPORT_FORWARD_DELAY_TIMER,\n+\tIFLA_BRPORT_HOLD_TIMER,\n+\tIFLA_BRPORT_FLUSH,\n+\tIFLA_BRPORT_MULTICAST_ROUTER,\n+\tIFLA_BRPORT_PAD,\n+\tIFLA_BRPORT_MCAST_FLOOD,\n+\tIFLA_BRPORT_MCAST_TO_UCAST,\n+\tIFLA_BRPORT_VLAN_TUNNEL,\n+\tIFLA_BRPORT_BCAST_FLOOD,\n+\tIFLA_BRPORT_GROUP_FWD_MASK,\n+\tIFLA_BRPORT_NEIGH_SUPPRESS,\n+\tIFLA_BRPORT_ISOLATED,\n+\tIFLA_BRPORT_BACKUP_PORT,\n+\t__IFLA_BRPORT_MAX\n+};\n+#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)\n+\n+struct ifla_cacheinfo {\n+\t__u32\tmax_reasm_len;\n+\t__u32\ttstamp;\t\t/* ipv6InterfaceTable updated timestamp */\n+\t__u32\treachable_time;\n+\t__u32\tretrans_time;\n+};\n+\n+enum {\n+\tIFLA_INFO_UNSPEC,\n+\tIFLA_INFO_KIND,\n+\tIFLA_INFO_DATA,\n+\tIFLA_INFO_XSTATS,\n+\tIFLA_INFO_SLAVE_KIND,\n+\tIFLA_INFO_SLAVE_DATA,\n+\t__IFLA_INFO_MAX,\n+};\n+\n+#define IFLA_INFO_MAX\t(__IFLA_INFO_MAX - 1)\n+\n+/* VLAN section */\n+\n+enum {\n+\tIFLA_VLAN_UNSPEC,\n+\tIFLA_VLAN_ID,\n+\tIFLA_VLAN_FLAGS,\n+\tIFLA_VLAN_EGRESS_QOS,\n+\tIFLA_VLAN_INGRESS_QOS,\n+\tIFLA_VLAN_PROTOCOL,\n+\t__IFLA_VLAN_MAX,\n+};\n+\n+#define IFLA_VLAN_MAX\t(__IFLA_VLAN_MAX - 1)\n+\n+struct ifla_vlan_flags {\n+\t__u32\tflags;\n+\t__u32\tmask;\n+};\n+\n+enum {\n+\tIFLA_VLAN_QOS_UNSPEC,\n+\tIFLA_VLAN_QOS_MAPPING,\n+\t__IFLA_VLAN_QOS_MAX\n+};\n+\n+#define IFLA_VLAN_QOS_MAX\t(__IFLA_VLAN_QOS_MAX - 1)\n+\n+struct ifla_vlan_qos_mapping {\n+\t__u32 from;\n+\t__u32 to;\n+};\n+\n+/* MACVLAN section */\n+enum {\n+\tIFLA_MACVLAN_UNSPEC,\n+\tIFLA_MACVLAN_MODE,\n+\tIFLA_MACVLAN_FLAGS,\n+\tIFLA_MACVLAN_MACADDR_MODE,\n+\tIFLA_MACVLAN_MACADDR,\n+\tIFLA_MACVLAN_MACADDR_DATA,\n+\tIFLA_MACVLAN_MACADDR_COUNT,\n+\t__IFLA_MACVLAN_MAX,\n+};\n+\n+#define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1)\n+\n+enum macvlan_mode {\n+\tMACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */\n+\tMACVLAN_MODE_VEPA    = 2, /* talk to other ports through ext bridge */\n+\tMACVLAN_MODE_BRIDGE  = 4, /* talk to bridge ports directly */\n+\tMACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */\n+\tMACVLAN_MODE_SOURCE  = 16,/* use source MAC address list to assign */\n+};\n+\n+enum macvlan_macaddr_mode {\n+\tMACVLAN_MACADDR_ADD,\n+\tMACVLAN_MACADDR_DEL,\n+\tMACVLAN_MACADDR_FLUSH,\n+\tMACVLAN_MACADDR_SET,\n+};\n+\n+#define MACVLAN_FLAG_NOPROMISC\t1\n+\n+/* VRF section */\n+enum {\n+\tIFLA_VRF_UNSPEC,\n+\tIFLA_VRF_TABLE,\n+\t__IFLA_VRF_MAX\n+};\n+\n+#define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1)\n+\n+enum {\n+\tIFLA_VRF_PORT_UNSPEC,\n+\tIFLA_VRF_PORT_TABLE,\n+\t__IFLA_VRF_PORT_MAX\n+};\n+\n+#define IFLA_VRF_PORT_MAX (__IFLA_VRF_PORT_MAX - 1)\n+\n+/* MACSEC section */\n+enum {\n+\tIFLA_MACSEC_UNSPEC,\n+\tIFLA_MACSEC_SCI,\n+\tIFLA_MACSEC_PORT,\n+\tIFLA_MACSEC_ICV_LEN,\n+\tIFLA_MACSEC_CIPHER_SUITE,\n+\tIFLA_MACSEC_WINDOW,\n+\tIFLA_MACSEC_ENCODING_SA,\n+\tIFLA_MACSEC_ENCRYPT,\n+\tIFLA_MACSEC_PROTECT,\n+\tIFLA_MACSEC_INC_SCI,\n+\tIFLA_MACSEC_ES,\n+\tIFLA_MACSEC_SCB,\n+\tIFLA_MACSEC_REPLAY_PROTECT,\n+\tIFLA_MACSEC_VALIDATION,\n+\tIFLA_MACSEC_PAD,\n+\t__IFLA_MACSEC_MAX,\n+};\n+\n+#define IFLA_MACSEC_MAX (__IFLA_MACSEC_MAX - 1)\n+\n+/* XFRM section */\n+enum {\n+\tIFLA_XFRM_UNSPEC,\n+\tIFLA_XFRM_LINK,\n+\tIFLA_XFRM_IF_ID,\n+\t__IFLA_XFRM_MAX\n+};\n+\n+#define IFLA_XFRM_MAX (__IFLA_XFRM_MAX - 1)\n+\n+enum macsec_validation_type {\n+\tMACSEC_VALIDATE_DISABLED = 0,\n+\tMACSEC_VALIDATE_CHECK = 1,\n+\tMACSEC_VALIDATE_STRICT = 2,\n+\t__MACSEC_VALIDATE_END,\n+\tMACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1,\n+};\n+\n+/* IPVLAN section */\n+enum {\n+\tIFLA_IPVLAN_UNSPEC,\n+\tIFLA_IPVLAN_MODE,\n+\tIFLA_IPVLAN_FLAGS,\n+\t__IFLA_IPVLAN_MAX\n+};\n+\n+#define IFLA_IPVLAN_MAX (__IFLA_IPVLAN_MAX - 1)\n+\n+enum ipvlan_mode {\n+\tIPVLAN_MODE_L2 = 0,\n+\tIPVLAN_MODE_L3,\n+\tIPVLAN_MODE_L3S,\n+\tIPVLAN_MODE_MAX\n+};\n+\n+#define IPVLAN_F_PRIVATE\t0x01\n+#define IPVLAN_F_VEPA\t\t0x02\n+\n+/* VXLAN section */\n+enum {\n+\tIFLA_VXLAN_UNSPEC,\n+\tIFLA_VXLAN_ID,\n+\tIFLA_VXLAN_GROUP,\t/* group or remote address */\n+\tIFLA_VXLAN_LINK,\n+\tIFLA_VXLAN_LOCAL,\n+\tIFLA_VXLAN_TTL,\n+\tIFLA_VXLAN_TOS,\n+\tIFLA_VXLAN_LEARNING,\n+\tIFLA_VXLAN_AGEING,\n+\tIFLA_VXLAN_LIMIT,\n+\tIFLA_VXLAN_PORT_RANGE,\t/* source port */\n+\tIFLA_VXLAN_PROXY,\n+\tIFLA_VXLAN_RSC,\n+\tIFLA_VXLAN_L2MISS,\n+\tIFLA_VXLAN_L3MISS,\n+\tIFLA_VXLAN_PORT,\t/* destination port */\n+\tIFLA_VXLAN_GROUP6,\n+\tIFLA_VXLAN_LOCAL6,\n+\tIFLA_VXLAN_UDP_CSUM,\n+\tIFLA_VXLAN_UDP_ZERO_CSUM6_TX,\n+\tIFLA_VXLAN_UDP_ZERO_CSUM6_RX,\n+\tIFLA_VXLAN_REMCSUM_TX,\n+\tIFLA_VXLAN_REMCSUM_RX,\n+\tIFLA_VXLAN_GBP,\n+\tIFLA_VXLAN_REMCSUM_NOPARTIAL,\n+\tIFLA_VXLAN_COLLECT_METADATA,\n+\tIFLA_VXLAN_LABEL,\n+\tIFLA_VXLAN_GPE,\n+\tIFLA_VXLAN_TTL_INHERIT,\n+\tIFLA_VXLAN_DF,\n+\t__IFLA_VXLAN_MAX\n+};\n+#define IFLA_VXLAN_MAX\t(__IFLA_VXLAN_MAX - 1)\n+\n+struct ifla_vxlan_port_range {\n+\t__be16\tlow;\n+\t__be16\thigh;\n+};\n+\n+enum ifla_vxlan_df {\n+\tVXLAN_DF_UNSET = 0,\n+\tVXLAN_DF_SET,\n+\tVXLAN_DF_INHERIT,\n+\t__VXLAN_DF_END,\n+\tVXLAN_DF_MAX = __VXLAN_DF_END - 1,\n+};\n+\n+/* GENEVE section */\n+enum {\n+\tIFLA_GENEVE_UNSPEC,\n+\tIFLA_GENEVE_ID,\n+\tIFLA_GENEVE_REMOTE,\n+\tIFLA_GENEVE_TTL,\n+\tIFLA_GENEVE_TOS,\n+\tIFLA_GENEVE_PORT,\t/* destination port */\n+\tIFLA_GENEVE_COLLECT_METADATA,\n+\tIFLA_GENEVE_REMOTE6,\n+\tIFLA_GENEVE_UDP_CSUM,\n+\tIFLA_GENEVE_UDP_ZERO_CSUM6_TX,\n+\tIFLA_GENEVE_UDP_ZERO_CSUM6_RX,\n+\tIFLA_GENEVE_LABEL,\n+\tIFLA_GENEVE_TTL_INHERIT,\n+\tIFLA_GENEVE_DF,\n+\t__IFLA_GENEVE_MAX\n+};\n+#define IFLA_GENEVE_MAX\t(__IFLA_GENEVE_MAX - 1)\n+\n+enum ifla_geneve_df {\n+\tGENEVE_DF_UNSET = 0,\n+\tGENEVE_DF_SET,\n+\tGENEVE_DF_INHERIT,\n+\t__GENEVE_DF_END,\n+\tGENEVE_DF_MAX = __GENEVE_DF_END - 1,\n+};\n+\n+/* PPP section */\n+enum {\n+\tIFLA_PPP_UNSPEC,\n+\tIFLA_PPP_DEV_FD,\n+\t__IFLA_PPP_MAX\n+};\n+#define IFLA_PPP_MAX (__IFLA_PPP_MAX - 1)\n+\n+/* GTP section */\n+\n+enum ifla_gtp_role {\n+\tGTP_ROLE_GGSN = 0,\n+\tGTP_ROLE_SGSN,\n+};\n+\n+enum {\n+\tIFLA_GTP_UNSPEC,\n+\tIFLA_GTP_FD0,\n+\tIFLA_GTP_FD1,\n+\tIFLA_GTP_PDP_HASHSIZE,\n+\tIFLA_GTP_ROLE,\n+\t__IFLA_GTP_MAX,\n+};\n+#define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1)\n+\n+/* Bonding section */\n+\n+enum {\n+\tIFLA_BOND_UNSPEC,\n+\tIFLA_BOND_MODE,\n+\tIFLA_BOND_ACTIVE_SLAVE,\n+\tIFLA_BOND_MIIMON,\n+\tIFLA_BOND_UPDELAY,\n+\tIFLA_BOND_DOWNDELAY,\n+\tIFLA_BOND_USE_CARRIER,\n+\tIFLA_BOND_ARP_INTERVAL,\n+\tIFLA_BOND_ARP_IP_TARGET,\n+\tIFLA_BOND_ARP_VALIDATE,\n+\tIFLA_BOND_ARP_ALL_TARGETS,\n+\tIFLA_BOND_PRIMARY,\n+\tIFLA_BOND_PRIMARY_RESELECT,\n+\tIFLA_BOND_FAIL_OVER_MAC,\n+\tIFLA_BOND_XMIT_HASH_POLICY,\n+\tIFLA_BOND_RESEND_IGMP,\n+\tIFLA_BOND_NUM_PEER_NOTIF,\n+\tIFLA_BOND_ALL_SLAVES_ACTIVE,\n+\tIFLA_BOND_MIN_LINKS,\n+\tIFLA_BOND_LP_INTERVAL,\n+\tIFLA_BOND_PACKETS_PER_SLAVE,\n+\tIFLA_BOND_AD_LACP_RATE,\n+\tIFLA_BOND_AD_SELECT,\n+\tIFLA_BOND_AD_INFO,\n+\tIFLA_BOND_AD_ACTOR_SYS_PRIO,\n+\tIFLA_BOND_AD_USER_PORT_KEY,\n+\tIFLA_BOND_AD_ACTOR_SYSTEM,\n+\tIFLA_BOND_TLB_DYNAMIC_LB,\n+\t__IFLA_BOND_MAX,\n+};\n+\n+#define IFLA_BOND_MAX\t(__IFLA_BOND_MAX - 1)\n+\n+enum {\n+\tIFLA_BOND_AD_INFO_UNSPEC,\n+\tIFLA_BOND_AD_INFO_AGGREGATOR,\n+\tIFLA_BOND_AD_INFO_NUM_PORTS,\n+\tIFLA_BOND_AD_INFO_ACTOR_KEY,\n+\tIFLA_BOND_AD_INFO_PARTNER_KEY,\n+\tIFLA_BOND_AD_INFO_PARTNER_MAC,\n+\t__IFLA_BOND_AD_INFO_MAX,\n+};\n+\n+#define IFLA_BOND_AD_INFO_MAX\t(__IFLA_BOND_AD_INFO_MAX - 1)\n+\n+enum {\n+\tIFLA_BOND_SLAVE_UNSPEC,\n+\tIFLA_BOND_SLAVE_STATE,\n+\tIFLA_BOND_SLAVE_MII_STATUS,\n+\tIFLA_BOND_SLAVE_LINK_FAILURE_COUNT,\n+\tIFLA_BOND_SLAVE_PERM_HWADDR,\n+\tIFLA_BOND_SLAVE_QUEUE_ID,\n+\tIFLA_BOND_SLAVE_AD_AGGREGATOR_ID,\n+\tIFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE,\n+\tIFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE,\n+\t__IFLA_BOND_SLAVE_MAX,\n+};\n+\n+#define IFLA_BOND_SLAVE_MAX\t(__IFLA_BOND_SLAVE_MAX - 1)\n+\n+/* SR-IOV virtual function management section */\n+\n+enum {\n+\tIFLA_VF_INFO_UNSPEC,\n+\tIFLA_VF_INFO,\n+\t__IFLA_VF_INFO_MAX,\n+};\n+\n+#define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1)\n+\n+enum {\n+\tIFLA_VF_UNSPEC,\n+\tIFLA_VF_MAC,\t\t/* Hardware queue specific attributes */\n+\tIFLA_VF_VLAN,\t\t/* VLAN ID and QoS */\n+\tIFLA_VF_TX_RATE,\t/* Max TX Bandwidth Allocation */\n+\tIFLA_VF_SPOOFCHK,\t/* Spoof Checking on/off switch */\n+\tIFLA_VF_LINK_STATE,\t/* link state enable/disable/auto switch */\n+\tIFLA_VF_RATE,\t\t/* Min and Max TX Bandwidth Allocation */\n+\tIFLA_VF_RSS_QUERY_EN,\t/* RSS Redirection Table and Hash Key query\n+\t\t\t\t * on/off switch\n+\t\t\t\t */\n+\tIFLA_VF_STATS,\t\t/* network device statistics */\n+\tIFLA_VF_TRUST,\t\t/* Trust VF */\n+\tIFLA_VF_IB_NODE_GUID,\t/* VF Infiniband node GUID */\n+\tIFLA_VF_IB_PORT_GUID,\t/* VF Infiniband port GUID */\n+\tIFLA_VF_VLAN_LIST,\t/* nested list of vlans, option for QinQ */\n+\t__IFLA_VF_MAX,\n+};\n+\n+#define IFLA_VF_MAX (__IFLA_VF_MAX - 1)\n+\n+struct ifla_vf_mac {\n+\t__u32 vf;\n+\t__u8 mac[32]; /* MAX_ADDR_LEN */\n+};\n+\n+struct ifla_vf_vlan {\n+\t__u32 vf;\n+\t__u32 vlan; /* 0 - 4095, 0 disables VLAN filter */\n+\t__u32 qos;\n+};\n+\n+enum {\n+\tIFLA_VF_VLAN_INFO_UNSPEC,\n+\tIFLA_VF_VLAN_INFO,\t/* VLAN ID, QoS and VLAN protocol */\n+\t__IFLA_VF_VLAN_INFO_MAX,\n+};\n+\n+#define IFLA_VF_VLAN_INFO_MAX (__IFLA_VF_VLAN_INFO_MAX - 1)\n+#define MAX_VLAN_LIST_LEN 1\n+\n+struct ifla_vf_vlan_info {\n+\t__u32 vf;\n+\t__u32 vlan; /* 0 - 4095, 0 disables VLAN filter */\n+\t__u32 qos;\n+\t__be16 vlan_proto; /* VLAN protocol either 802.1Q or 802.1ad */\n+};\n+\n+struct ifla_vf_tx_rate {\n+\t__u32 vf;\n+\t__u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */\n+};\n+\n+struct ifla_vf_rate {\n+\t__u32 vf;\n+\t__u32 min_tx_rate; /* Min Bandwidth in Mbps */\n+\t__u32 max_tx_rate; /* Max Bandwidth in Mbps */\n+};\n+\n+struct ifla_vf_spoofchk {\n+\t__u32 vf;\n+\t__u32 setting;\n+};\n+\n+struct ifla_vf_guid {\n+\t__u32 vf;\n+\t__u64 guid;\n+};\n+\n+enum {\n+\tIFLA_VF_LINK_STATE_AUTO,\t/* link state of the uplink */\n+\tIFLA_VF_LINK_STATE_ENABLE,\t/* link always up */\n+\tIFLA_VF_LINK_STATE_DISABLE,\t/* link always down */\n+\t__IFLA_VF_LINK_STATE_MAX,\n+};\n+\n+struct ifla_vf_link_state {\n+\t__u32 vf;\n+\t__u32 link_state;\n+};\n+\n+struct ifla_vf_rss_query_en {\n+\t__u32 vf;\n+\t__u32 setting;\n+};\n+\n+enum {\n+\tIFLA_VF_STATS_RX_PACKETS,\n+\tIFLA_VF_STATS_TX_PACKETS,\n+\tIFLA_VF_STATS_RX_BYTES,\n+\tIFLA_VF_STATS_TX_BYTES,\n+\tIFLA_VF_STATS_BROADCAST,\n+\tIFLA_VF_STATS_MULTICAST,\n+\tIFLA_VF_STATS_PAD,\n+\tIFLA_VF_STATS_RX_DROPPED,\n+\tIFLA_VF_STATS_TX_DROPPED,\n+\t__IFLA_VF_STATS_MAX,\n+};\n+\n+#define IFLA_VF_STATS_MAX (__IFLA_VF_STATS_MAX - 1)\n+\n+struct ifla_vf_trust {\n+\t__u32 vf;\n+\t__u32 setting;\n+};\n+\n+/* VF ports management section\n+ *\n+ *\tNested layout of set/get msg is:\n+ *\n+ *\t\t[IFLA_NUM_VF]\n+ *\t\t[IFLA_VF_PORTS]\n+ *\t\t\t[IFLA_VF_PORT]\n+ *\t\t\t\t[IFLA_PORT_*], ...\n+ *\t\t\t[IFLA_VF_PORT]\n+ *\t\t\t\t[IFLA_PORT_*], ...\n+ *\t\t\t...\n+ *\t\t[IFLA_PORT_SELF]\n+ *\t\t\t[IFLA_PORT_*], ...\n+ */\n+\n+enum {\n+\tIFLA_VF_PORT_UNSPEC,\n+\tIFLA_VF_PORT,\t\t\t/* nest */\n+\t__IFLA_VF_PORT_MAX,\n+};\n+\n+#define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1)\n+\n+enum {\n+\tIFLA_PORT_UNSPEC,\n+\tIFLA_PORT_VF,\t\t\t/* __u32 */\n+\tIFLA_PORT_PROFILE,\t\t/* string */\n+\tIFLA_PORT_VSI_TYPE,\t\t/* 802.1Qbg (pre-)standard VDP */\n+\tIFLA_PORT_INSTANCE_UUID,\t/* binary UUID */\n+\tIFLA_PORT_HOST_UUID,\t\t/* binary UUID */\n+\tIFLA_PORT_REQUEST,\t\t/* __u8 */\n+\tIFLA_PORT_RESPONSE,\t\t/* __u16, output only */\n+\t__IFLA_PORT_MAX,\n+};\n+\n+#define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1)\n+\n+#define PORT_PROFILE_MAX\t40\n+#define PORT_UUID_MAX\t\t16\n+#define PORT_SELF_VF\t\t-1\n+\n+enum {\n+\tPORT_REQUEST_PREASSOCIATE = 0,\n+\tPORT_REQUEST_PREASSOCIATE_RR,\n+\tPORT_REQUEST_ASSOCIATE,\n+\tPORT_REQUEST_DISASSOCIATE,\n+};\n+\n+enum {\n+\tPORT_VDP_RESPONSE_SUCCESS = 0,\n+\tPORT_VDP_RESPONSE_INVALID_FORMAT,\n+\tPORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES,\n+\tPORT_VDP_RESPONSE_UNUSED_VTID,\n+\tPORT_VDP_RESPONSE_VTID_VIOLATION,\n+\tPORT_VDP_RESPONSE_VTID_VERSION_VIOALTION,\n+\tPORT_VDP_RESPONSE_OUT_OF_SYNC,\n+\t/* 0x08-0xFF reserved for future VDP use */\n+\tPORT_PROFILE_RESPONSE_SUCCESS = 0x100,\n+\tPORT_PROFILE_RESPONSE_INPROGRESS,\n+\tPORT_PROFILE_RESPONSE_INVALID,\n+\tPORT_PROFILE_RESPONSE_BADSTATE,\n+\tPORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES,\n+\tPORT_PROFILE_RESPONSE_ERROR,\n+};\n+\n+struct ifla_port_vsi {\n+\t__u8 vsi_mgr_id;\n+\t__u8 vsi_type_id[3];\n+\t__u8 vsi_type_version;\n+\t__u8 pad[3];\n+};\n+\n+\n+/* IPoIB section */\n+\n+enum {\n+\tIFLA_IPOIB_UNSPEC,\n+\tIFLA_IPOIB_PKEY,\n+\tIFLA_IPOIB_MODE,\n+\tIFLA_IPOIB_UMCAST,\n+\t__IFLA_IPOIB_MAX\n+};\n+\n+enum {\n+\tIPOIB_MODE_DATAGRAM  = 0, /* using unreliable datagram QPs */\n+\tIPOIB_MODE_CONNECTED = 1, /* using connected QPs */\n+};\n+\n+#define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)\n+\n+\n+/* HSR section */\n+\n+enum {\n+\tIFLA_HSR_UNSPEC,\n+\tIFLA_HSR_SLAVE1,\n+\tIFLA_HSR_SLAVE2,\n+\tIFLA_HSR_MULTICAST_SPEC,\t/* Last byte of supervision addr */\n+\tIFLA_HSR_SUPERVISION_ADDR,\t/* Supervision frame multicast addr */\n+\tIFLA_HSR_SEQ_NR,\n+\tIFLA_HSR_VERSION,\t\t/* HSR version */\n+\t__IFLA_HSR_MAX,\n+};\n+\n+#define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1)\n+\n+/* STATS section */\n+\n+struct if_stats_msg {\n+\t__u8  family;\n+\t__u8  pad1;\n+\t__u16 pad2;\n+\t__u32 ifindex;\n+\t__u32 filter_mask;\n+};\n+\n+/* A stats attribute can be netdev specific or a global stat.\n+ * For netdev stats, lets use the prefix IFLA_STATS_LINK_*\n+ */\n+enum {\n+\tIFLA_STATS_UNSPEC, /* also used as 64bit pad attribute */\n+\tIFLA_STATS_LINK_64,\n+\tIFLA_STATS_LINK_XSTATS,\n+\tIFLA_STATS_LINK_XSTATS_SLAVE,\n+\tIFLA_STATS_LINK_OFFLOAD_XSTATS,\n+\tIFLA_STATS_AF_SPEC,\n+\t__IFLA_STATS_MAX,\n+};\n+\n+#define IFLA_STATS_MAX (__IFLA_STATS_MAX - 1)\n+\n+#define IFLA_STATS_FILTER_BIT(ATTR)\t(1 << (ATTR - 1))\n+\n+/* These are embedded into IFLA_STATS_LINK_XSTATS:\n+ * [IFLA_STATS_LINK_XSTATS]\n+ * -> [LINK_XSTATS_TYPE_xxx]\n+ *    -> [rtnl link type specific attributes]\n+ */\n+enum {\n+\tLINK_XSTATS_TYPE_UNSPEC,\n+\tLINK_XSTATS_TYPE_BRIDGE,\n+\t__LINK_XSTATS_TYPE_MAX\n+};\n+#define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1)\n+\n+/* These are stats embedded into IFLA_STATS_LINK_OFFLOAD_XSTATS */\n+enum {\n+\tIFLA_OFFLOAD_XSTATS_UNSPEC,\n+\tIFLA_OFFLOAD_XSTATS_CPU_HIT, /* struct rtnl_link_stats64 */\n+\t__IFLA_OFFLOAD_XSTATS_MAX\n+};\n+#define IFLA_OFFLOAD_XSTATS_MAX (__IFLA_OFFLOAD_XSTATS_MAX - 1)\n+\n+/* XDP section */\n+\n+#define XDP_FLAGS_UPDATE_IF_NOEXIST\t(1U << 0)\n+#define XDP_FLAGS_SKB_MODE\t\t(1U << 1)\n+#define XDP_FLAGS_DRV_MODE\t\t(1U << 2)\n+#define XDP_FLAGS_HW_MODE\t\t(1U << 3)\n+#define XDP_FLAGS_MODES\t\t\t(XDP_FLAGS_SKB_MODE | \\\n+\t\t\t\t\t XDP_FLAGS_DRV_MODE | \\\n+\t\t\t\t\t XDP_FLAGS_HW_MODE)\n+#define XDP_FLAGS_MASK\t\t\t(XDP_FLAGS_UPDATE_IF_NOEXIST | \\\n+\t\t\t\t\t XDP_FLAGS_MODES)\n+\n+/* These are stored into IFLA_XDP_ATTACHED on dump. */\n+enum {\n+\tXDP_ATTACHED_NONE = 0,\n+\tXDP_ATTACHED_DRV,\n+\tXDP_ATTACHED_SKB,\n+\tXDP_ATTACHED_HW,\n+\tXDP_ATTACHED_MULTI,\n+};\n+\n+enum {\n+\tIFLA_XDP_UNSPEC,\n+\tIFLA_XDP_FD,\n+\tIFLA_XDP_ATTACHED,\n+\tIFLA_XDP_FLAGS,\n+\tIFLA_XDP_PROG_ID,\n+\tIFLA_XDP_DRV_PROG_ID,\n+\tIFLA_XDP_SKB_PROG_ID,\n+\tIFLA_XDP_HW_PROG_ID,\n+\t__IFLA_XDP_MAX,\n+};\n+\n+#define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1)\n+\n+enum {\n+\tIFLA_EVENT_NONE,\n+\tIFLA_EVENT_REBOOT,\t\t/* internal reset / reboot */\n+\tIFLA_EVENT_FEATURES,\t\t/* change in offload features */\n+\tIFLA_EVENT_BONDING_FAILOVER,\t/* change in active slave */\n+\tIFLA_EVENT_NOTIFY_PEERS,\t/* re-sent grat. arp/ndisc */\n+\tIFLA_EVENT_IGMP_RESEND,\t\t/* re-sent IGMP JOIN */\n+\tIFLA_EVENT_BONDING_OPTIONS,\t/* change in bonding options */\n+};\n+\n+/* tun section */\n+\n+enum {\n+\tIFLA_TUN_UNSPEC,\n+\tIFLA_TUN_OWNER,\n+\tIFLA_TUN_GROUP,\n+\tIFLA_TUN_TYPE,\n+\tIFLA_TUN_PI,\n+\tIFLA_TUN_VNET_HDR,\n+\tIFLA_TUN_PERSIST,\n+\tIFLA_TUN_MULTI_QUEUE,\n+\tIFLA_TUN_NUM_QUEUES,\n+\tIFLA_TUN_NUM_DISABLED_QUEUES,\n+\t__IFLA_TUN_MAX,\n+};\n+\n+#define IFLA_TUN_MAX (__IFLA_TUN_MAX - 1)\n+\n+/* rmnet section */\n+\n+#define RMNET_FLAGS_INGRESS_DEAGGREGATION         (1U << 0)\n+#define RMNET_FLAGS_INGRESS_MAP_COMMANDS          (1U << 1)\n+#define RMNET_FLAGS_INGRESS_MAP_CKSUMV4           (1U << 2)\n+#define RMNET_FLAGS_EGRESS_MAP_CKSUMV4            (1U << 3)\n+\n+enum {\n+\tIFLA_RMNET_UNSPEC,\n+\tIFLA_RMNET_MUX_ID,\n+\tIFLA_RMNET_FLAGS,\n+\t__IFLA_RMNET_MAX,\n+};\n+\n+#define IFLA_RMNET_MAX\t(__IFLA_RMNET_MAX - 1)\n+\n+struct ifla_rmnet_flags {\n+\t__u32\tflags;\n+\t__u32\tmask;\n+};\n+\n+#endif /* _UAPI_LINUX_IF_LINK_H */\ndiff --git a/src/basic/linux/if_tun.h b/src/basic/linux/if_tun.h\nnew file mode 100644\nindex 00000000000..23a6753b37d\n--- /dev/null\n+++ b/src/basic/linux/if_tun.h\n@@ -0,0 +1,113 @@\n+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */\n+/*\n+ *  Universal TUN/TAP device driver.\n+ *  Copyright (C) 1999-2000 Maxim Krasnyansky <max_mk@yahoo.com>\n+ *\n+ *  This program is free software; you can redistribute it and/or modify\n+ *  it under the terms of the GNU General Public License as published by\n+ *  the Free Software Foundation; either version 2 of the License, or\n+ *  (at your option) any later version.\n+ *\n+ *  This program is distributed in the hope that it will be useful,\n+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ *  GNU General Public License for more details.\n+ */\n+\n+#ifndef _UAPI__IF_TUN_H\n+#define _UAPI__IF_TUN_H\n+\n+#include <linux/types.h>\n+#include <linux/if_ether.h>\n+#include <linux/filter.h>\n+\n+/* Read queue size */\n+#define TUN_READQ_SIZE\t500\n+/* TUN device type flags: deprecated. Use IFF_TUN/IFF_TAP instead. */\n+#define TUN_TUN_DEV \tIFF_TUN\n+#define TUN_TAP_DEV\tIFF_TAP\n+#define TUN_TYPE_MASK   0x000f\n+\n+/* Ioctl defines */\n+#define TUNSETNOCSUM  _IOW('T', 200, int) \n+#define TUNSETDEBUG   _IOW('T', 201, int) \n+#define TUNSETIFF     _IOW('T', 202, int) \n+#define TUNSETPERSIST _IOW('T', 203, int) \n+#define TUNSETOWNER   _IOW('T', 204, int)\n+#define TUNSETLINK    _IOW('T', 205, int)\n+#define TUNSETGROUP   _IOW('T', 206, int)\n+#define TUNGETFEATURES _IOR('T', 207, unsigned int)\n+#define TUNSETOFFLOAD  _IOW('T', 208, unsigned int)\n+#define TUNSETTXFILTER _IOW('T', 209, unsigned int)\n+#define TUNGETIFF      _IOR('T', 210, unsigned int)\n+#define TUNGETSNDBUF   _IOR('T', 211, int)\n+#define TUNSETSNDBUF   _IOW('T', 212, int)\n+#define TUNATTACHFILTER _IOW('T', 213, struct sock_fprog)\n+#define TUNDETACHFILTER _IOW('T', 214, struct sock_fprog)\n+#define TUNGETVNETHDRSZ _IOR('T', 215, int)\n+#define TUNSETVNETHDRSZ _IOW('T', 216, int)\n+#define TUNSETQUEUE  _IOW('T', 217, int)\n+#define TUNSETIFINDEX\t_IOW('T', 218, unsigned int)\n+#define TUNGETFILTER _IOR('T', 219, struct sock_fprog)\n+#define TUNSETVNETLE _IOW('T', 220, int)\n+#define TUNGETVNETLE _IOR('T', 221, int)\n+/* The TUNSETVNETBE and TUNGETVNETBE ioctls are for cross-endian support on\n+ * little-endian hosts. Not all kernel configurations support them, but all\n+ * configurations that support SET also support GET.\n+ */\n+#define TUNSETVNETBE _IOW('T', 222, int)\n+#define TUNGETVNETBE _IOR('T', 223, int)\n+#define TUNSETSTEERINGEBPF _IOR('T', 224, int)\n+#define TUNSETFILTEREBPF _IOR('T', 225, int)\n+#define TUNSETCARRIER _IOW('T', 226, int)\n+\n+/* TUNSETIFF ifr flags */\n+#define IFF_TUN\t\t0x0001\n+#define IFF_TAP\t\t0x0002\n+#define IFF_NAPI\t0x0010\n+#define IFF_NAPI_FRAGS\t0x0020\n+#define IFF_NO_PI\t0x1000\n+/* This flag has no real effect */\n+#define IFF_ONE_QUEUE\t0x2000\n+#define IFF_VNET_HDR\t0x4000\n+#define IFF_TUN_EXCL\t0x8000\n+#define IFF_MULTI_QUEUE 0x0100\n+#define IFF_ATTACH_QUEUE 0x0200\n+#define IFF_DETACH_QUEUE 0x0400\n+/* read-only flag */\n+#define IFF_PERSIST\t0x0800\n+#define IFF_NOFILTER\t0x1000\n+\n+/* Socket options */\n+#define TUN_TX_TIMESTAMP 1\n+\n+/* Features for GSO (TUNSETOFFLOAD). */\n+#define TUN_F_CSUM\t0x01\t/* You can hand me unchecksummed packets. */\n+#define TUN_F_TSO4\t0x02\t/* I can handle TSO for IPv4 packets */\n+#define TUN_F_TSO6\t0x04\t/* I can handle TSO for IPv6 packets */\n+#define TUN_F_TSO_ECN\t0x08\t/* I can handle TSO with ECN bits. */\n+#define TUN_F_UFO\t0x10\t/* I can handle UFO packets */\n+\n+/* Protocol info prepended to the packets (when IFF_NO_PI is not set) */\n+#define TUN_PKT_STRIP\t0x0001\n+struct tun_pi {\n+\t__u16  flags;\n+\t__be16 proto;\n+};\n+\n+/*\n+ * Filter spec (used for SETXXFILTER ioctls)\n+ * This stuff is applicable only to the TAP (Ethernet) devices.\n+ * If the count is zero the filter is disabled and the driver accepts\n+ * all packets (promisc mode).\n+ * If the filter is enabled in order to accept broadcast packets\n+ * broadcast addr must be explicitly included in the addr list.\n+ */\n+#define TUN_FLT_ALLMULTI 0x0001 /* Accept all multicast packets */\n+struct tun_filter {\n+\t__u16  flags; /* TUN_FLT_ flags see above */\n+\t__u16  count; /* Number of addresses */\n+\t__u8   addr[0][ETH_ALEN];\n+};\n+\n+#endif /* _UAPI__IF_TUN_H */\ndiff --git a/src/basic/linux/if_tunnel.h b/src/basic/linux/if_tunnel.h\nnew file mode 100644\nindex 00000000000..7d9105533c7\n--- /dev/null\n+++ b/src/basic/linux/if_tunnel.h\n@@ -0,0 +1,183 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+#ifndef _UAPI_IF_TUNNEL_H_\n+#define _UAPI_IF_TUNNEL_H_\n+\n+#include <linux/types.h>\n+#include <linux/if.h>\n+#include <linux/ip.h>\n+#include <linux/in6.h>\n+#include <asm/byteorder.h>\n+\n+\n+#define SIOCGETTUNNEL   (SIOCDEVPRIVATE + 0)\n+#define SIOCADDTUNNEL   (SIOCDEVPRIVATE + 1)\n+#define SIOCDELTUNNEL   (SIOCDEVPRIVATE + 2)\n+#define SIOCCHGTUNNEL   (SIOCDEVPRIVATE + 3)\n+#define SIOCGETPRL      (SIOCDEVPRIVATE + 4)\n+#define SIOCADDPRL      (SIOCDEVPRIVATE + 5)\n+#define SIOCDELPRL      (SIOCDEVPRIVATE + 6)\n+#define SIOCCHGPRL      (SIOCDEVPRIVATE + 7)\n+#define SIOCGET6RD      (SIOCDEVPRIVATE + 8)\n+#define SIOCADD6RD      (SIOCDEVPRIVATE + 9)\n+#define SIOCDEL6RD      (SIOCDEVPRIVATE + 10)\n+#define SIOCCHG6RD      (SIOCDEVPRIVATE + 11)\n+\n+#define GRE_CSUM\t__cpu_to_be16(0x8000)\n+#define GRE_ROUTING\t__cpu_to_be16(0x4000)\n+#define GRE_KEY\t\t__cpu_to_be16(0x2000)\n+#define GRE_SEQ\t\t__cpu_to_be16(0x1000)\n+#define GRE_STRICT\t__cpu_to_be16(0x0800)\n+#define GRE_REC\t\t__cpu_to_be16(0x0700)\n+#define GRE_ACK\t\t__cpu_to_be16(0x0080)\n+#define GRE_FLAGS\t__cpu_to_be16(0x0078)\n+#define GRE_VERSION\t__cpu_to_be16(0x0007)\n+\n+#define GRE_IS_CSUM(f)\t\t((f) & GRE_CSUM)\n+#define GRE_IS_ROUTING(f)\t((f) & GRE_ROUTING)\n+#define GRE_IS_KEY(f)\t\t((f) & GRE_KEY)\n+#define GRE_IS_SEQ(f)\t\t((f) & GRE_SEQ)\n+#define GRE_IS_STRICT(f)\t((f) & GRE_STRICT)\n+#define GRE_IS_REC(f)\t\t((f) & GRE_REC)\n+#define GRE_IS_ACK(f)\t\t((f) & GRE_ACK)\n+\n+#define GRE_VERSION_0\t\t__cpu_to_be16(0x0000)\n+#define GRE_VERSION_1\t\t__cpu_to_be16(0x0001)\n+#define GRE_PROTO_PPP\t\t__cpu_to_be16(0x880b)\n+#define GRE_PPTP_KEY_MASK\t__cpu_to_be32(0xffff)\n+\n+struct ip_tunnel_parm {\n+\tchar\t\t\tname[IFNAMSIZ];\n+\tint\t\t\tlink;\n+\t__be16\t\t\ti_flags;\n+\t__be16\t\t\to_flags;\n+\t__be32\t\t\ti_key;\n+\t__be32\t\t\to_key;\n+\tstruct iphdr\t\tiph;\n+};\n+\n+enum {\n+\tIFLA_IPTUN_UNSPEC,\n+\tIFLA_IPTUN_LINK,\n+\tIFLA_IPTUN_LOCAL,\n+\tIFLA_IPTUN_REMOTE,\n+\tIFLA_IPTUN_TTL,\n+\tIFLA_IPTUN_TOS,\n+\tIFLA_IPTUN_ENCAP_LIMIT,\n+\tIFLA_IPTUN_FLOWINFO,\n+\tIFLA_IPTUN_FLAGS,\n+\tIFLA_IPTUN_PROTO,\n+\tIFLA_IPTUN_PMTUDISC,\n+\tIFLA_IPTUN_6RD_PREFIX,\n+\tIFLA_IPTUN_6RD_RELAY_PREFIX,\n+\tIFLA_IPTUN_6RD_PREFIXLEN,\n+\tIFLA_IPTUN_6RD_RELAY_PREFIXLEN,\n+\tIFLA_IPTUN_ENCAP_TYPE,\n+\tIFLA_IPTUN_ENCAP_FLAGS,\n+\tIFLA_IPTUN_ENCAP_SPORT,\n+\tIFLA_IPTUN_ENCAP_DPORT,\n+\tIFLA_IPTUN_COLLECT_METADATA,\n+\tIFLA_IPTUN_FWMARK,\n+\t__IFLA_IPTUN_MAX,\n+};\n+#define IFLA_IPTUN_MAX\t(__IFLA_IPTUN_MAX - 1)\n+\n+enum tunnel_encap_types {\n+\tTUNNEL_ENCAP_NONE,\n+\tTUNNEL_ENCAP_FOU,\n+\tTUNNEL_ENCAP_GUE,\n+\tTUNNEL_ENCAP_MPLS,\n+};\n+\n+#define TUNNEL_ENCAP_FLAG_CSUM\t\t(1<<0)\n+#define TUNNEL_ENCAP_FLAG_CSUM6\t\t(1<<1)\n+#define TUNNEL_ENCAP_FLAG_REMCSUM\t(1<<2)\n+\n+/* SIT-mode i_flags */\n+#define\tSIT_ISATAP\t0x0001\n+\n+struct ip_tunnel_prl {\n+\t__be32\t\t\taddr;\n+\t__u16\t\t\tflags;\n+\t__u16\t\t\t__reserved;\n+\t__u32\t\t\tdatalen;\n+\t__u32\t\t\t__reserved2;\n+\t/* data follows */\n+};\n+\n+/* PRL flags */\n+#define\tPRL_DEFAULT\t\t0x0001\n+\n+struct ip_tunnel_6rd {\n+\tstruct in6_addr\t\tprefix;\n+\t__be32\t\t\trelay_prefix;\n+\t__u16\t\t\tprefixlen;\n+\t__u16\t\t\trelay_prefixlen;\n+};\n+\n+enum {\n+\tIFLA_GRE_UNSPEC,\n+\tIFLA_GRE_LINK,\n+\tIFLA_GRE_IFLAGS,\n+\tIFLA_GRE_OFLAGS,\n+\tIFLA_GRE_IKEY,\n+\tIFLA_GRE_OKEY,\n+\tIFLA_GRE_LOCAL,\n+\tIFLA_GRE_REMOTE,\n+\tIFLA_GRE_TTL,\n+\tIFLA_GRE_TOS,\n+\tIFLA_GRE_PMTUDISC,\n+\tIFLA_GRE_ENCAP_LIMIT,\n+\tIFLA_GRE_FLOWINFO,\n+\tIFLA_GRE_FLAGS,\n+\tIFLA_GRE_ENCAP_TYPE,\n+\tIFLA_GRE_ENCAP_FLAGS,\n+\tIFLA_GRE_ENCAP_SPORT,\n+\tIFLA_GRE_ENCAP_DPORT,\n+\tIFLA_GRE_COLLECT_METADATA,\n+\tIFLA_GRE_IGNORE_DF,\n+\tIFLA_GRE_FWMARK,\n+\tIFLA_GRE_ERSPAN_INDEX,\n+\tIFLA_GRE_ERSPAN_VER,\n+\tIFLA_GRE_ERSPAN_DIR,\n+\tIFLA_GRE_ERSPAN_HWID,\n+\t__IFLA_GRE_MAX,\n+};\n+\n+#define IFLA_GRE_MAX\t(__IFLA_GRE_MAX - 1)\n+\n+/* VTI-mode i_flags */\n+#define VTI_ISVTI ((__force __be16)0x0001)\n+\n+enum {\n+\tIFLA_VTI_UNSPEC,\n+\tIFLA_VTI_LINK,\n+\tIFLA_VTI_IKEY,\n+\tIFLA_VTI_OKEY,\n+\tIFLA_VTI_LOCAL,\n+\tIFLA_VTI_REMOTE,\n+\tIFLA_VTI_FWMARK,\n+\t__IFLA_VTI_MAX,\n+};\n+\n+#define IFLA_VTI_MAX\t(__IFLA_VTI_MAX - 1)\n+\n+#define TUNNEL_CSUM\t\t__cpu_to_be16(0x01)\n+#define TUNNEL_ROUTING\t\t__cpu_to_be16(0x02)\n+#define TUNNEL_KEY\t\t__cpu_to_be16(0x04)\n+#define TUNNEL_SEQ\t\t__cpu_to_be16(0x08)\n+#define TUNNEL_STRICT\t\t__cpu_to_be16(0x10)\n+#define TUNNEL_REC\t\t__cpu_to_be16(0x20)\n+#define TUNNEL_VERSION\t\t__cpu_to_be16(0x40)\n+#define TUNNEL_NO_KEY\t\t__cpu_to_be16(0x80)\n+#define TUNNEL_DONT_FRAGMENT    __cpu_to_be16(0x0100)\n+#define TUNNEL_OAM\t\t__cpu_to_be16(0x0200)\n+#define TUNNEL_CRIT_OPT\t\t__cpu_to_be16(0x0400)\n+#define TUNNEL_GENEVE_OPT\t__cpu_to_be16(0x0800)\n+#define TUNNEL_VXLAN_OPT\t__cpu_to_be16(0x1000)\n+#define TUNNEL_NOCACHE\t\t__cpu_to_be16(0x2000)\n+#define TUNNEL_ERSPAN_OPT\t__cpu_to_be16(0x4000)\n+\n+#define TUNNEL_OPTIONS_PRESENT \\\n+\t\t(TUNNEL_GENEVE_OPT | TUNNEL_VXLAN_OPT | TUNNEL_ERSPAN_OPT)\n+\n+#endif /* _UAPI_IF_TUNNEL_H_ */\ndiff --git a/src/basic/linux/libc-compat.h b/src/basic/linux/libc-compat.h\nnew file mode 100644\nindex 00000000000..8254c937c9f\n--- /dev/null\n+++ b/src/basic/linux/libc-compat.h\n@@ -0,0 +1,267 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+/*\n+ * Compatibility interface for userspace libc header coordination:\n+ *\n+ * Define compatibility macros that are used to control the inclusion or\n+ * exclusion of UAPI structures and definitions in coordination with another\n+ * userspace C library.\n+ *\n+ * This header is intended to solve the problem of UAPI definitions that\n+ * conflict with userspace definitions. If a UAPI header has such conflicting\n+ * definitions then the solution is as follows:\n+ *\n+ * * Synchronize the UAPI header and the libc headers so either one can be\n+ *   used and such that the ABI is preserved. If this is not possible then\n+ *   no simple compatibility interface exists (you need to write translating\n+ *   wrappers and rename things) and you can't use this interface.\n+ *\n+ * Then follow this process:\n+ *\n+ * (a) Include libc-compat.h in the UAPI header.\n+ *      e.g. #include <linux/libc-compat.h>\n+ *     This include must be as early as possible.\n+ *\n+ * (b) In libc-compat.h add enough code to detect that the comflicting\n+ *     userspace libc header has been included first.\n+ *\n+ * (c) If the userspace libc header has been included first define a set of\n+ *     guard macros of the form __UAPI_DEF_FOO and set their values to 1, else\n+ *     set their values to 0.\n+ *\n+ * (d) Back in the UAPI header with the conflicting definitions, guard the\n+ *     definitions with:\n+ *     #if __UAPI_DEF_FOO\n+ *       ...\n+ *     #endif\n+ *\n+ * This fixes the situation where the linux headers are included *after* the\n+ * libc headers. To fix the problem with the inclusion in the other order the\n+ * userspace libc headers must be fixed like this:\n+ *\n+ * * For all definitions that conflict with kernel definitions wrap those\n+ *   defines in the following:\n+ *   #if !__UAPI_DEF_FOO\n+ *     ...\n+ *   #endif\n+ *\n+ * This prevents the redefinition of a construct already defined by the kernel.\n+ */\n+#ifndef _UAPI_LIBC_COMPAT_H\n+#define _UAPI_LIBC_COMPAT_H\n+\n+/* We have included glibc headers... */\n+#if defined(__GLIBC__)\n+\n+/* Coordinate with glibc net/if.h header. */\n+#if defined(_NET_IF_H) && defined(__USE_MISC)\n+\n+/* GLIBC headers included first so don't define anything\n+ * that would already be defined. */\n+\n+#define __UAPI_DEF_IF_IFCONF 0\n+#define __UAPI_DEF_IF_IFMAP 0\n+#define __UAPI_DEF_IF_IFNAMSIZ 0\n+#define __UAPI_DEF_IF_IFREQ 0\n+/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */\n+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0\n+/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */\n+#ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO\n+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1\n+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */\n+\n+#else /* _NET_IF_H */\n+\n+/* Linux headers included first, and we must define everything\n+ * we need. The expectation is that glibc will check the\n+ * __UAPI_DEF_* defines and adjust appropriately. */\n+\n+#define __UAPI_DEF_IF_IFCONF 1\n+#define __UAPI_DEF_IF_IFMAP 1\n+#define __UAPI_DEF_IF_IFNAMSIZ 1\n+#define __UAPI_DEF_IF_IFREQ 1\n+/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */\n+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1\n+/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */\n+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1\n+\n+#endif /* _NET_IF_H */\n+\n+/* Coordinate with glibc netinet/in.h header. */\n+#if defined(_NETINET_IN_H)\n+\n+/* GLIBC headers included first so don't define anything\n+ * that would already be defined. */\n+#define __UAPI_DEF_IN_ADDR\t\t0\n+#define __UAPI_DEF_IN_IPPROTO\t\t0\n+#define __UAPI_DEF_IN_PKTINFO\t\t0\n+#define __UAPI_DEF_IP_MREQ\t\t0\n+#define __UAPI_DEF_SOCKADDR_IN\t\t0\n+#define __UAPI_DEF_IN_CLASS\t\t0\n+\n+#define __UAPI_DEF_IN6_ADDR\t\t0\n+/* The exception is the in6_addr macros which must be defined\n+ * if the glibc code didn't define them. This guard matches\n+ * the guard in glibc/inet/netinet/in.h which defines the\n+ * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */\n+#if defined(__USE_MISC) || defined (__USE_GNU)\n+#define __UAPI_DEF_IN6_ADDR_ALT\t\t0\n+#else\n+#define __UAPI_DEF_IN6_ADDR_ALT\t\t1\n+#endif\n+#define __UAPI_DEF_SOCKADDR_IN6\t\t0\n+#define __UAPI_DEF_IPV6_MREQ\t\t0\n+#define __UAPI_DEF_IPPROTO_V6\t\t0\n+#define __UAPI_DEF_IPV6_OPTIONS\t\t0\n+#define __UAPI_DEF_IN6_PKTINFO\t\t0\n+#define __UAPI_DEF_IP6_MTUINFO\t\t0\n+\n+#else\n+\n+/* Linux headers included first, and we must define everything\n+ * we need. The expectation is that glibc will check the\n+ * __UAPI_DEF_* defines and adjust appropriately. */\n+#define __UAPI_DEF_IN_ADDR\t\t1\n+#define __UAPI_DEF_IN_IPPROTO\t\t1\n+#define __UAPI_DEF_IN_PKTINFO\t\t1\n+#define __UAPI_DEF_IP_MREQ\t\t1\n+#define __UAPI_DEF_SOCKADDR_IN\t\t1\n+#define __UAPI_DEF_IN_CLASS\t\t1\n+\n+#define __UAPI_DEF_IN6_ADDR\t\t1\n+/* We unconditionally define the in6_addr macros and glibc must\n+ * coordinate. */\n+#define __UAPI_DEF_IN6_ADDR_ALT\t\t1\n+#define __UAPI_DEF_SOCKADDR_IN6\t\t1\n+#define __UAPI_DEF_IPV6_MREQ\t\t1\n+#define __UAPI_DEF_IPPROTO_V6\t\t1\n+#define __UAPI_DEF_IPV6_OPTIONS\t\t1\n+#define __UAPI_DEF_IN6_PKTINFO\t\t1\n+#define __UAPI_DEF_IP6_MTUINFO\t\t1\n+\n+#endif /* _NETINET_IN_H */\n+\n+/* Coordinate with glibc netipx/ipx.h header. */\n+#if defined(__NETIPX_IPX_H)\n+\n+#define __UAPI_DEF_SOCKADDR_IPX\t\t\t0\n+#define __UAPI_DEF_IPX_ROUTE_DEFINITION\t\t0\n+#define __UAPI_DEF_IPX_INTERFACE_DEFINITION\t0\n+#define __UAPI_DEF_IPX_CONFIG_DATA\t\t0\n+#define __UAPI_DEF_IPX_ROUTE_DEF\t\t0\n+\n+#else /* defined(__NETIPX_IPX_H) */\n+\n+#define __UAPI_DEF_SOCKADDR_IPX\t\t\t1\n+#define __UAPI_DEF_IPX_ROUTE_DEFINITION\t\t1\n+#define __UAPI_DEF_IPX_INTERFACE_DEFINITION\t1\n+#define __UAPI_DEF_IPX_CONFIG_DATA\t\t1\n+#define __UAPI_DEF_IPX_ROUTE_DEF\t\t1\n+\n+#endif /* defined(__NETIPX_IPX_H) */\n+\n+/* Definitions for xattr.h */\n+#if defined(_SYS_XATTR_H)\n+#define __UAPI_DEF_XATTR\t\t0\n+#else\n+#define __UAPI_DEF_XATTR\t\t1\n+#endif\n+\n+/* If we did not see any headers from any supported C libraries,\n+ * or we are being included in the kernel, then define everything\n+ * that we need. Check for previous __UAPI_* definitions to give\n+ * unsupported C libraries a way to opt out of any kernel definition. */\n+#else /* !defined(__GLIBC__) */\n+\n+/* Definitions for if.h */\n+#ifndef __UAPI_DEF_IF_IFCONF\n+#define __UAPI_DEF_IF_IFCONF 1\n+#endif\n+#ifndef __UAPI_DEF_IF_IFMAP\n+#define __UAPI_DEF_IF_IFMAP 1\n+#endif\n+#ifndef __UAPI_DEF_IF_IFNAMSIZ\n+#define __UAPI_DEF_IF_IFNAMSIZ 1\n+#endif\n+#ifndef __UAPI_DEF_IF_IFREQ\n+#define __UAPI_DEF_IF_IFREQ 1\n+#endif\n+/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */\n+#ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS\n+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1\n+#endif\n+/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */\n+#ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO\n+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1\n+#endif\n+\n+/* Definitions for in.h */\n+#ifndef __UAPI_DEF_IN_ADDR\n+#define __UAPI_DEF_IN_ADDR\t\t1\n+#endif\n+#ifndef __UAPI_DEF_IN_IPPROTO\n+#define __UAPI_DEF_IN_IPPROTO\t\t1\n+#endif\n+#ifndef __UAPI_DEF_IN_PKTINFO\n+#define __UAPI_DEF_IN_PKTINFO\t\t1\n+#endif\n+#ifndef __UAPI_DEF_IP_MREQ\n+#define __UAPI_DEF_IP_MREQ\t\t1\n+#endif\n+#ifndef __UAPI_DEF_SOCKADDR_IN\n+#define __UAPI_DEF_SOCKADDR_IN\t\t1\n+#endif\n+#ifndef __UAPI_DEF_IN_CLASS\n+#define __UAPI_DEF_IN_CLASS\t\t1\n+#endif\n+\n+/* Definitions for in6.h */\n+#ifndef __UAPI_DEF_IN6_ADDR\n+#define __UAPI_DEF_IN6_ADDR\t\t1\n+#endif\n+#ifndef __UAPI_DEF_IN6_ADDR_ALT\n+#define __UAPI_DEF_IN6_ADDR_ALT\t\t1\n+#endif\n+#ifndef __UAPI_DEF_SOCKADDR_IN6\n+#define __UAPI_DEF_SOCKADDR_IN6\t\t1\n+#endif\n+#ifndef __UAPI_DEF_IPV6_MREQ\n+#define __UAPI_DEF_IPV6_MREQ\t\t1\n+#endif\n+#ifndef __UAPI_DEF_IPPROTO_V6\n+#define __UAPI_DEF_IPPROTO_V6\t\t1\n+#endif\n+#ifndef __UAPI_DEF_IPV6_OPTIONS\n+#define __UAPI_DEF_IPV6_OPTIONS\t\t1\n+#endif\n+#ifndef __UAPI_DEF_IN6_PKTINFO\n+#define __UAPI_DEF_IN6_PKTINFO\t\t1\n+#endif\n+#ifndef __UAPI_DEF_IP6_MTUINFO\n+#define __UAPI_DEF_IP6_MTUINFO\t\t1\n+#endif\n+\n+/* Definitions for ipx.h */\n+#ifndef __UAPI_DEF_SOCKADDR_IPX\n+#define __UAPI_DEF_SOCKADDR_IPX\t\t\t1\n+#endif\n+#ifndef __UAPI_DEF_IPX_ROUTE_DEFINITION\n+#define __UAPI_DEF_IPX_ROUTE_DEFINITION\t\t1\n+#endif\n+#ifndef __UAPI_DEF_IPX_INTERFACE_DEFINITION\n+#define __UAPI_DEF_IPX_INTERFACE_DEFINITION\t1\n+#endif\n+#ifndef __UAPI_DEF_IPX_CONFIG_DATA\n+#define __UAPI_DEF_IPX_CONFIG_DATA\t\t1\n+#endif\n+#ifndef __UAPI_DEF_IPX_ROUTE_DEF\n+#define __UAPI_DEF_IPX_ROUTE_DEF\t\t1\n+#endif\n+\n+/* Definitions for xattr.h */\n+#ifndef __UAPI_DEF_XATTR\n+#define __UAPI_DEF_XATTR\t\t1\n+#endif\n+\n+#endif /* __GLIBC__ */\n+\n+#endif /* _UAPI_LIBC_COMPAT_H */\ndiff --git a/src/basic/linux/netlink.h b/src/basic/linux/netlink.h\nnew file mode 100644\nindex 00000000000..0a4d7331775\n--- /dev/null\n+++ b/src/basic/linux/netlink.h\n@@ -0,0 +1,252 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+#ifndef _UAPI__LINUX_NETLINK_H\n+#define _UAPI__LINUX_NETLINK_H\n+\n+#include <linux/kernel.h>\n+#include <linux/socket.h> /* for __kernel_sa_family_t */\n+#include <linux/types.h>\n+\n+#define NETLINK_ROUTE\t\t0\t/* Routing/device hook\t\t\t\t*/\n+#define NETLINK_UNUSED\t\t1\t/* Unused number\t\t\t\t*/\n+#define NETLINK_USERSOCK\t2\t/* Reserved for user mode socket protocols \t*/\n+#define NETLINK_FIREWALL\t3\t/* Unused number, formerly ip_queue\t\t*/\n+#define NETLINK_SOCK_DIAG\t4\t/* socket monitoring\t\t\t\t*/\n+#define NETLINK_NFLOG\t\t5\t/* netfilter/iptables ULOG */\n+#define NETLINK_XFRM\t\t6\t/* ipsec */\n+#define NETLINK_SELINUX\t\t7\t/* SELinux event notifications */\n+#define NETLINK_ISCSI\t\t8\t/* Open-iSCSI */\n+#define NETLINK_AUDIT\t\t9\t/* auditing */\n+#define NETLINK_FIB_LOOKUP\t10\t\n+#define NETLINK_CONNECTOR\t11\n+#define NETLINK_NETFILTER\t12\t/* netfilter subsystem */\n+#define NETLINK_IP6_FW\t\t13\n+#define NETLINK_DNRTMSG\t\t14\t/* DECnet routing messages */\n+#define NETLINK_KOBJECT_UEVENT\t15\t/* Kernel messages to userspace */\n+#define NETLINK_GENERIC\t\t16\n+/* leave room for NETLINK_DM (DM Events) */\n+#define NETLINK_SCSITRANSPORT\t18\t/* SCSI Transports */\n+#define NETLINK_ECRYPTFS\t19\n+#define NETLINK_RDMA\t\t20\n+#define NETLINK_CRYPTO\t\t21\t/* Crypto layer */\n+#define NETLINK_SMC\t\t22\t/* SMC monitoring */\n+\n+#define NETLINK_INET_DIAG\tNETLINK_SOCK_DIAG\n+\n+#define MAX_LINKS 32\t\t\n+\n+struct sockaddr_nl {\n+\t__kernel_sa_family_t\tnl_family;\t/* AF_NETLINK\t*/\n+\tunsigned short\tnl_pad;\t\t/* zero\t\t*/\n+\t__u32\t\tnl_pid;\t\t/* port ID\t*/\n+       \t__u32\t\tnl_groups;\t/* multicast groups mask */\n+};\n+\n+struct nlmsghdr {\n+\t__u32\t\tnlmsg_len;\t/* Length of message including header */\n+\t__u16\t\tnlmsg_type;\t/* Message content */\n+\t__u16\t\tnlmsg_flags;\t/* Additional flags */\n+\t__u32\t\tnlmsg_seq;\t/* Sequence number */\n+\t__u32\t\tnlmsg_pid;\t/* Sending process port ID */\n+};\n+\n+/* Flags values */\n+\n+#define NLM_F_REQUEST\t\t0x01\t/* It is request message. \t*/\n+#define NLM_F_MULTI\t\t0x02\t/* Multipart message, terminated by NLMSG_DONE */\n+#define NLM_F_ACK\t\t0x04\t/* Reply with ack, with zero or error code */\n+#define NLM_F_ECHO\t\t0x08\t/* Echo this request \t\t*/\n+#define NLM_F_DUMP_INTR\t\t0x10\t/* Dump was inconsistent due to sequence change */\n+#define NLM_F_DUMP_FILTERED\t0x20\t/* Dump was filtered as requested */\n+\n+/* Modifiers to GET request */\n+#define NLM_F_ROOT\t0x100\t/* specify tree\troot\t*/\n+#define NLM_F_MATCH\t0x200\t/* return all matching\t*/\n+#define NLM_F_ATOMIC\t0x400\t/* atomic GET\t\t*/\n+#define NLM_F_DUMP\t(NLM_F_ROOT|NLM_F_MATCH)\n+\n+/* Modifiers to NEW request */\n+#define NLM_F_REPLACE\t0x100\t/* Override existing\t\t*/\n+#define NLM_F_EXCL\t0x200\t/* Do not touch, if it exists\t*/\n+#define NLM_F_CREATE\t0x400\t/* Create, if it does not exist\t*/\n+#define NLM_F_APPEND\t0x800\t/* Add to end of list\t\t*/\n+\n+/* Modifiers to DELETE request */\n+#define NLM_F_NONREC\t0x100\t/* Do not delete recursively\t*/\n+\n+/* Flags for ACK message */\n+#define NLM_F_CAPPED\t0x100\t/* request was capped */\n+#define NLM_F_ACK_TLVS\t0x200\t/* extended ACK TVLs were included */\n+\n+/*\n+   4.4BSD ADD\t\tNLM_F_CREATE|NLM_F_EXCL\n+   4.4BSD CHANGE\tNLM_F_REPLACE\n+\n+   True CHANGE\t\tNLM_F_CREATE|NLM_F_REPLACE\n+   Append\t\tNLM_F_CREATE\n+   Check\t\tNLM_F_EXCL\n+ */\n+\n+#define NLMSG_ALIGNTO\t4U\n+#define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) )\n+#define NLMSG_HDRLEN\t ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))\n+#define NLMSG_LENGTH(len) ((len) + NLMSG_HDRLEN)\n+#define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))\n+#define NLMSG_DATA(nlh)  ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))\n+#define NLMSG_NEXT(nlh,len)\t ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \\\n+\t\t\t\t  (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))\n+#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \\\n+\t\t\t   (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \\\n+\t\t\t   (nlh)->nlmsg_len <= (len))\n+#define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))\n+\n+#define NLMSG_NOOP\t\t0x1\t/* Nothing.\t\t*/\n+#define NLMSG_ERROR\t\t0x2\t/* Error\t\t*/\n+#define NLMSG_DONE\t\t0x3\t/* End of a dump\t*/\n+#define NLMSG_OVERRUN\t\t0x4\t/* Data lost\t\t*/\n+\n+#define NLMSG_MIN_TYPE\t\t0x10\t/* < 0x10: reserved control messages */\n+\n+struct nlmsgerr {\n+\tint\t\terror;\n+\tstruct nlmsghdr msg;\n+\t/*\n+\t * followed by the message contents unless NETLINK_CAP_ACK was set\n+\t * or the ACK indicates success (error == 0)\n+\t * message length is aligned with NLMSG_ALIGN()\n+\t */\n+\t/*\n+\t * followed by TLVs defined in enum nlmsgerr_attrs\n+\t * if NETLINK_EXT_ACK was set\n+\t */\n+};\n+\n+/**\n+ * enum nlmsgerr_attrs - nlmsgerr attributes\n+ * @NLMSGERR_ATTR_UNUSED: unused\n+ * @NLMSGERR_ATTR_MSG: error message string (string)\n+ * @NLMSGERR_ATTR_OFFS: offset of the invalid attribute in the original\n+ *\t message, counting from the beginning of the header (u32)\n+ * @NLMSGERR_ATTR_COOKIE: arbitrary subsystem specific cookie to\n+ *\tbe used - in the success case - to identify a created\n+ *\tobject or operation or similar (binary)\n+ * @__NLMSGERR_ATTR_MAX: number of attributes\n+ * @NLMSGERR_ATTR_MAX: highest attribute number\n+ */\n+enum nlmsgerr_attrs {\n+\tNLMSGERR_ATTR_UNUSED,\n+\tNLMSGERR_ATTR_MSG,\n+\tNLMSGERR_ATTR_OFFS,\n+\tNLMSGERR_ATTR_COOKIE,\n+\n+\t__NLMSGERR_ATTR_MAX,\n+\tNLMSGERR_ATTR_MAX = __NLMSGERR_ATTR_MAX - 1\n+};\n+\n+#define NETLINK_ADD_MEMBERSHIP\t\t1\n+#define NETLINK_DROP_MEMBERSHIP\t\t2\n+#define NETLINK_PKTINFO\t\t\t3\n+#define NETLINK_BROADCAST_ERROR\t\t4\n+#define NETLINK_NO_ENOBUFS\t\t5\n+#ifndef __KERNEL__\n+#define NETLINK_RX_RING\t\t\t6\n+#define NETLINK_TX_RING\t\t\t7\n+#endif\n+#define NETLINK_LISTEN_ALL_NSID\t\t8\n+#define NETLINK_LIST_MEMBERSHIPS\t9\n+#define NETLINK_CAP_ACK\t\t\t10\n+#define NETLINK_EXT_ACK\t\t\t11\n+#define NETLINK_GET_STRICT_CHK\t\t12\n+\n+struct nl_pktinfo {\n+\t__u32\tgroup;\n+};\n+\n+struct nl_mmap_req {\n+\tunsigned int\tnm_block_size;\n+\tunsigned int\tnm_block_nr;\n+\tunsigned int\tnm_frame_size;\n+\tunsigned int\tnm_frame_nr;\n+};\n+\n+struct nl_mmap_hdr {\n+\tunsigned int\tnm_status;\n+\tunsigned int\tnm_len;\n+\t__u32\t\tnm_group;\n+\t/* credentials */\n+\t__u32\t\tnm_pid;\n+\t__u32\t\tnm_uid;\n+\t__u32\t\tnm_gid;\n+};\n+\n+#ifndef __KERNEL__\n+enum nl_mmap_status {\n+\tNL_MMAP_STATUS_UNUSED,\n+\tNL_MMAP_STATUS_RESERVED,\n+\tNL_MMAP_STATUS_VALID,\n+\tNL_MMAP_STATUS_COPY,\n+\tNL_MMAP_STATUS_SKIP,\n+};\n+\n+#define NL_MMAP_MSG_ALIGNMENT\t\tNLMSG_ALIGNTO\n+#define NL_MMAP_MSG_ALIGN(sz)\t\t__ALIGN_KERNEL(sz, NL_MMAP_MSG_ALIGNMENT)\n+#define NL_MMAP_HDRLEN\t\t\tNL_MMAP_MSG_ALIGN(sizeof(struct nl_mmap_hdr))\n+#endif\n+\n+#define NET_MAJOR 36\t\t/* Major 36 is reserved for networking \t\t\t\t\t\t*/\n+\n+enum {\n+\tNETLINK_UNCONNECTED = 0,\n+\tNETLINK_CONNECTED,\n+};\n+\n+/*\n+ *  <------- NLA_HDRLEN ------> <-- NLA_ALIGN(payload)-->\n+ * +---------------------+- - -+- - - - - - - - - -+- - -+\n+ * |        Header       | Pad |     Payload       | Pad |\n+ * |   (struct nlattr)   | ing |                   | ing |\n+ * +---------------------+- - -+- - - - - - - - - -+- - -+\n+ *  <-------------- nlattr->nla_len -------------->\n+ */\n+\n+struct nlattr {\n+\t__u16           nla_len;\n+\t__u16           nla_type;\n+};\n+\n+/*\n+ * nla_type (16 bits)\n+ * +---+---+-------------------------------+\n+ * | N | O | Attribute Type                |\n+ * +---+---+-------------------------------+\n+ * N := Carries nested attributes\n+ * O := Payload stored in network byte order\n+ *\n+ * Note: The N and O flag are mutually exclusive.\n+ */\n+#define NLA_F_NESTED\t\t(1 << 15)\n+#define NLA_F_NET_BYTEORDER\t(1 << 14)\n+#define NLA_TYPE_MASK\t\t~(NLA_F_NESTED | NLA_F_NET_BYTEORDER)\n+\n+#define NLA_ALIGNTO\t\t4\n+#define NLA_ALIGN(len)\t\t(((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1))\n+#define NLA_HDRLEN\t\t((int) NLA_ALIGN(sizeof(struct nlattr)))\n+\n+/* Generic 32 bitflags attribute content sent to the kernel.\n+ *\n+ * The value is a bitmap that defines the values being set\n+ * The selector is a bitmask that defines which value is legit\n+ *\n+ * Examples:\n+ *  value = 0x0, and selector = 0x1\n+ *  implies we are selecting bit 1 and we want to set its value to 0.\n+ *\n+ *  value = 0x2, and selector = 0x2\n+ *  implies we are selecting bit 2 and we want to set its value to 1.\n+ *\n+ */\n+struct nla_bitfield32 {\n+\t__u32 value;\n+\t__u32 selector;\n+};\n+\n+#endif /* _UAPI__LINUX_NETLINK_H */\ndiff --git a/src/basic/linux/rtnetlink.h b/src/basic/linux/rtnetlink.h\nnew file mode 100644\nindex 00000000000..46399367627\n--- /dev/null\n+++ b/src/basic/linux/rtnetlink.h\n@@ -0,0 +1,751 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+#ifndef _UAPI__LINUX_RTNETLINK_H\n+#define _UAPI__LINUX_RTNETLINK_H\n+\n+#include <linux/types.h>\n+#include <linux/netlink.h>\n+#include <linux/if_link.h>\n+#include <linux/if_addr.h>\n+#include <linux/neighbour.h>\n+\n+/* rtnetlink families. Values up to 127 are reserved for real address\n+ * families, values above 128 may be used arbitrarily.\n+ */\n+#define RTNL_FAMILY_IPMR\t\t128\n+#define RTNL_FAMILY_IP6MR\t\t129\n+#define RTNL_FAMILY_MAX\t\t\t129\n+\n+/****\n+ *\t\tRouting/neighbour discovery messages.\n+ ****/\n+\n+/* Types of messages */\n+\n+enum {\n+\tRTM_BASE\t= 16,\n+#define RTM_BASE\tRTM_BASE\n+\n+\tRTM_NEWLINK\t= 16,\n+#define RTM_NEWLINK\tRTM_NEWLINK\n+\tRTM_DELLINK,\n+#define RTM_DELLINK\tRTM_DELLINK\n+\tRTM_GETLINK,\n+#define RTM_GETLINK\tRTM_GETLINK\n+\tRTM_SETLINK,\n+#define RTM_SETLINK\tRTM_SETLINK\n+\n+\tRTM_NEWADDR\t= 20,\n+#define RTM_NEWADDR\tRTM_NEWADDR\n+\tRTM_DELADDR,\n+#define RTM_DELADDR\tRTM_DELADDR\n+\tRTM_GETADDR,\n+#define RTM_GETADDR\tRTM_GETADDR\n+\n+\tRTM_NEWROUTE\t= 24,\n+#define RTM_NEWROUTE\tRTM_NEWROUTE\n+\tRTM_DELROUTE,\n+#define RTM_DELROUTE\tRTM_DELROUTE\n+\tRTM_GETROUTE,\n+#define RTM_GETROUTE\tRTM_GETROUTE\n+\n+\tRTM_NEWNEIGH\t= 28,\n+#define RTM_NEWNEIGH\tRTM_NEWNEIGH\n+\tRTM_DELNEIGH,\n+#define RTM_DELNEIGH\tRTM_DELNEIGH\n+\tRTM_GETNEIGH,\n+#define RTM_GETNEIGH\tRTM_GETNEIGH\n+\n+\tRTM_NEWRULE\t= 32,\n+#define RTM_NEWRULE\tRTM_NEWRULE\n+\tRTM_DELRULE,\n+#define RTM_DELRULE\tRTM_DELRULE\n+\tRTM_GETRULE,\n+#define RTM_GETRULE\tRTM_GETRULE\n+\n+\tRTM_NEWQDISC\t= 36,\n+#define RTM_NEWQDISC\tRTM_NEWQDISC\n+\tRTM_DELQDISC,\n+#define RTM_DELQDISC\tRTM_DELQDISC\n+\tRTM_GETQDISC,\n+#define RTM_GETQDISC\tRTM_GETQDISC\n+\n+\tRTM_NEWTCLASS\t= 40,\n+#define RTM_NEWTCLASS\tRTM_NEWTCLASS\n+\tRTM_DELTCLASS,\n+#define RTM_DELTCLASS\tRTM_DELTCLASS\n+\tRTM_GETTCLASS,\n+#define RTM_GETTCLASS\tRTM_GETTCLASS\n+\n+\tRTM_NEWTFILTER\t= 44,\n+#define RTM_NEWTFILTER\tRTM_NEWTFILTER\n+\tRTM_DELTFILTER,\n+#define RTM_DELTFILTER\tRTM_DELTFILTER\n+\tRTM_GETTFILTER,\n+#define RTM_GETTFILTER\tRTM_GETTFILTER\n+\n+\tRTM_NEWACTION\t= 48,\n+#define RTM_NEWACTION   RTM_NEWACTION\n+\tRTM_DELACTION,\n+#define RTM_DELACTION   RTM_DELACTION\n+\tRTM_GETACTION,\n+#define RTM_GETACTION   RTM_GETACTION\n+\n+\tRTM_NEWPREFIX\t= 52,\n+#define RTM_NEWPREFIX\tRTM_NEWPREFIX\n+\n+\tRTM_GETMULTICAST = 58,\n+#define RTM_GETMULTICAST RTM_GETMULTICAST\n+\n+\tRTM_GETANYCAST\t= 62,\n+#define RTM_GETANYCAST\tRTM_GETANYCAST\n+\n+\tRTM_NEWNEIGHTBL\t= 64,\n+#define RTM_NEWNEIGHTBL\tRTM_NEWNEIGHTBL\n+\tRTM_GETNEIGHTBL\t= 66,\n+#define RTM_GETNEIGHTBL\tRTM_GETNEIGHTBL\n+\tRTM_SETNEIGHTBL,\n+#define RTM_SETNEIGHTBL\tRTM_SETNEIGHTBL\n+\n+\tRTM_NEWNDUSEROPT = 68,\n+#define RTM_NEWNDUSEROPT RTM_NEWNDUSEROPT\n+\n+\tRTM_NEWADDRLABEL = 72,\n+#define RTM_NEWADDRLABEL RTM_NEWADDRLABEL\n+\tRTM_DELADDRLABEL,\n+#define RTM_DELADDRLABEL RTM_DELADDRLABEL\n+\tRTM_GETADDRLABEL,\n+#define RTM_GETADDRLABEL RTM_GETADDRLABEL\n+\n+\tRTM_GETDCB = 78,\n+#define RTM_GETDCB RTM_GETDCB\n+\tRTM_SETDCB,\n+#define RTM_SETDCB RTM_SETDCB\n+\n+\tRTM_NEWNETCONF = 80,\n+#define RTM_NEWNETCONF RTM_NEWNETCONF\n+\tRTM_DELNETCONF,\n+#define RTM_DELNETCONF RTM_DELNETCONF\n+\tRTM_GETNETCONF = 82,\n+#define RTM_GETNETCONF RTM_GETNETCONF\n+\n+\tRTM_NEWMDB = 84,\n+#define RTM_NEWMDB RTM_NEWMDB\n+\tRTM_DELMDB = 85,\n+#define RTM_DELMDB RTM_DELMDB\n+\tRTM_GETMDB = 86,\n+#define RTM_GETMDB RTM_GETMDB\n+\n+\tRTM_NEWNSID = 88,\n+#define RTM_NEWNSID RTM_NEWNSID\n+\tRTM_DELNSID = 89,\n+#define RTM_DELNSID RTM_DELNSID\n+\tRTM_GETNSID = 90,\n+#define RTM_GETNSID RTM_GETNSID\n+\n+\tRTM_NEWSTATS = 92,\n+#define RTM_NEWSTATS RTM_NEWSTATS\n+\tRTM_GETSTATS = 94,\n+#define RTM_GETSTATS RTM_GETSTATS\n+\n+\tRTM_NEWCACHEREPORT = 96,\n+#define RTM_NEWCACHEREPORT RTM_NEWCACHEREPORT\n+\n+\tRTM_NEWCHAIN = 100,\n+#define RTM_NEWCHAIN RTM_NEWCHAIN\n+\tRTM_DELCHAIN,\n+#define RTM_DELCHAIN RTM_DELCHAIN\n+\tRTM_GETCHAIN,\n+#define RTM_GETCHAIN RTM_GETCHAIN\n+\n+\t__RTM_MAX,\n+#define RTM_MAX\t\t(((__RTM_MAX + 3) & ~3) - 1)\n+};\n+\n+#define RTM_NR_MSGTYPES\t(RTM_MAX + 1 - RTM_BASE)\n+#define RTM_NR_FAMILIES\t(RTM_NR_MSGTYPES >> 2)\n+#define RTM_FAM(cmd)\t(((cmd) - RTM_BASE) >> 2)\n+\n+/* \n+   Generic structure for encapsulation of optional route information.\n+   It is reminiscent of sockaddr, but with sa_family replaced\n+   with attribute type.\n+ */\n+\n+struct rtattr {\n+\tunsigned short\trta_len;\n+\tunsigned short\trta_type;\n+};\n+\n+/* Macros to handle rtattributes */\n+\n+#define RTA_ALIGNTO\t4U\n+#define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) )\n+#define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \\\n+\t\t\t (rta)->rta_len >= sizeof(struct rtattr) && \\\n+\t\t\t (rta)->rta_len <= (len))\n+#define RTA_NEXT(rta,attrlen)\t((attrlen) -= RTA_ALIGN((rta)->rta_len), \\\n+\t\t\t\t (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len)))\n+#define RTA_LENGTH(len)\t(RTA_ALIGN(sizeof(struct rtattr)) + (len))\n+#define RTA_SPACE(len)\tRTA_ALIGN(RTA_LENGTH(len))\n+#define RTA_DATA(rta)   ((void*)(((char*)(rta)) + RTA_LENGTH(0)))\n+#define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0))\n+\n+\n+\n+\n+/******************************************************************************\n+ *\t\tDefinitions used in routing table administration.\n+ ****/\n+\n+struct rtmsg {\n+\tunsigned char\t\trtm_family;\n+\tunsigned char\t\trtm_dst_len;\n+\tunsigned char\t\trtm_src_len;\n+\tunsigned char\t\trtm_tos;\n+\n+\tunsigned char\t\trtm_table;\t/* Routing table id */\n+\tunsigned char\t\trtm_protocol;\t/* Routing protocol; see below\t*/\n+\tunsigned char\t\trtm_scope;\t/* See below */\t\n+\tunsigned char\t\trtm_type;\t/* See below\t*/\n+\n+\tunsigned\t\trtm_flags;\n+};\n+\n+/* rtm_type */\n+\n+enum {\n+\tRTN_UNSPEC,\n+\tRTN_UNICAST,\t\t/* Gateway or direct route\t*/\n+\tRTN_LOCAL,\t\t/* Accept locally\t\t*/\n+\tRTN_BROADCAST,\t\t/* Accept locally as broadcast,\n+\t\t\t\t   send as broadcast */\n+\tRTN_ANYCAST,\t\t/* Accept locally as broadcast,\n+\t\t\t\t   but send as unicast */\n+\tRTN_MULTICAST,\t\t/* Multicast route\t\t*/\n+\tRTN_BLACKHOLE,\t\t/* Drop\t\t\t\t*/\n+\tRTN_UNREACHABLE,\t/* Destination is unreachable   */\n+\tRTN_PROHIBIT,\t\t/* Administratively prohibited\t*/\n+\tRTN_THROW,\t\t/* Not in this table\t\t*/\n+\tRTN_NAT,\t\t/* Translate this address\t*/\n+\tRTN_XRESOLVE,\t\t/* Use external resolver\t*/\n+\t__RTN_MAX\n+};\n+\n+#define RTN_MAX (__RTN_MAX - 1)\n+\n+\n+/* rtm_protocol */\n+\n+#define RTPROT_UNSPEC\t0\n+#define RTPROT_REDIRECT\t1\t/* Route installed by ICMP redirects;\n+\t\t\t\t   not used by current IPv4 */\n+#define RTPROT_KERNEL\t2\t/* Route installed by kernel\t\t*/\n+#define RTPROT_BOOT\t3\t/* Route installed during boot\t\t*/\n+#define RTPROT_STATIC\t4\t/* Route installed by administrator\t*/\n+\n+/* Values of protocol >= RTPROT_STATIC are not interpreted by kernel;\n+   they are just passed from user and back as is.\n+   It will be used by hypothetical multiple routing daemons.\n+   Note that protocol values should be standardized in order to\n+   avoid conflicts.\n+ */\n+\n+#define RTPROT_GATED\t8\t/* Apparently, GateD */\n+#define RTPROT_RA\t9\t/* RDISC/ND router advertisements */\n+#define RTPROT_MRT\t10\t/* Merit MRT */\n+#define RTPROT_ZEBRA\t11\t/* Zebra */\n+#define RTPROT_BIRD\t12\t/* BIRD */\n+#define RTPROT_DNROUTED\t13\t/* DECnet routing daemon */\n+#define RTPROT_XORP\t14\t/* XORP */\n+#define RTPROT_NTK\t15\t/* Netsukuku */\n+#define RTPROT_DHCP\t16      /* DHCP client */\n+#define RTPROT_MROUTED\t17      /* Multicast daemon */\n+#define RTPROT_BABEL\t42      /* Babel daemon */\n+#define RTPROT_BGP\t186     /* BGP Routes */\n+#define RTPROT_ISIS\t187     /* ISIS Routes */\n+#define RTPROT_OSPF\t188     /* OSPF Routes */\n+#define RTPROT_RIP\t189     /* RIP Routes */\n+#define RTPROT_EIGRP\t192     /* EIGRP Routes */\n+\n+/* rtm_scope\n+\n+   Really it is not scope, but sort of distance to the destination.\n+   NOWHERE are reserved for not existing destinations, HOST is our\n+   local addresses, LINK are destinations, located on directly attached\n+   link and UNIVERSE is everywhere in the Universe.\n+\n+   Intermediate values are also possible f.e. interior routes\n+   could be assigned a value between UNIVERSE and LINK.\n+*/\n+\n+enum rt_scope_t {\n+\tRT_SCOPE_UNIVERSE=0,\n+/* User defined values  */\n+\tRT_SCOPE_SITE=200,\n+\tRT_SCOPE_LINK=253,\n+\tRT_SCOPE_HOST=254,\n+\tRT_SCOPE_NOWHERE=255\n+};\n+\n+/* rtm_flags */\n+\n+#define RTM_F_NOTIFY\t\t0x100\t/* Notify user of route change\t*/\n+#define RTM_F_CLONED\t\t0x200\t/* This route is cloned\t\t*/\n+#define RTM_F_EQUALIZE\t\t0x400\t/* Multipath equalizer: NI\t*/\n+#define RTM_F_PREFIX\t\t0x800\t/* Prefix addresses\t\t*/\n+#define RTM_F_LOOKUP_TABLE\t0x1000\t/* set rtm_table to FIB lookup result */\n+#define RTM_F_FIB_MATCH\t        0x2000\t/* return full fib lookup match */\n+\n+/* Reserved table identifiers */\n+\n+enum rt_class_t {\n+\tRT_TABLE_UNSPEC=0,\n+/* User defined values */\n+\tRT_TABLE_COMPAT=252,\n+\tRT_TABLE_DEFAULT=253,\n+\tRT_TABLE_MAIN=254,\n+\tRT_TABLE_LOCAL=255,\n+\tRT_TABLE_MAX=0xFFFFFFFF\n+};\n+\n+\n+/* Routing message attributes */\n+\n+enum rtattr_type_t {\n+\tRTA_UNSPEC,\n+\tRTA_DST,\n+\tRTA_SRC,\n+\tRTA_IIF,\n+\tRTA_OIF,\n+\tRTA_GATEWAY,\n+\tRTA_PRIORITY,\n+\tRTA_PREFSRC,\n+\tRTA_METRICS,\n+\tRTA_MULTIPATH,\n+\tRTA_PROTOINFO, /* no longer used */\n+\tRTA_FLOW,\n+\tRTA_CACHEINFO,\n+\tRTA_SESSION, /* no longer used */\n+\tRTA_MP_ALGO, /* no longer used */\n+\tRTA_TABLE,\n+\tRTA_MARK,\n+\tRTA_MFC_STATS,\n+\tRTA_VIA,\n+\tRTA_NEWDST,\n+\tRTA_PREF,\n+\tRTA_ENCAP_TYPE,\n+\tRTA_ENCAP,\n+\tRTA_EXPIRES,\n+\tRTA_PAD,\n+\tRTA_UID,\n+\tRTA_TTL_PROPAGATE,\n+\tRTA_IP_PROTO,\n+\tRTA_SPORT,\n+\tRTA_DPORT,\n+\t__RTA_MAX\n+};\n+\n+#define RTA_MAX (__RTA_MAX - 1)\n+\n+#define RTM_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))\n+#define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg))\n+\n+/* RTM_MULTIPATH --- array of struct rtnexthop.\n+ *\n+ * \"struct rtnexthop\" describes all necessary nexthop information,\n+ * i.e. parameters of path to a destination via this nexthop.\n+ *\n+ * At the moment it is impossible to set different prefsrc, mtu, window\n+ * and rtt for different paths from multipath.\n+ */\n+\n+struct rtnexthop {\n+\tunsigned short\t\trtnh_len;\n+\tunsigned char\t\trtnh_flags;\n+\tunsigned char\t\trtnh_hops;\n+\tint\t\t\trtnh_ifindex;\n+};\n+\n+/* rtnh_flags */\n+\n+#define RTNH_F_DEAD\t\t1\t/* Nexthop is dead (used by multipath)\t*/\n+#define RTNH_F_PERVASIVE\t2\t/* Do recursive gateway lookup\t*/\n+#define RTNH_F_ONLINK\t\t4\t/* Gateway is forced on link\t*/\n+#define RTNH_F_OFFLOAD\t\t8\t/* offloaded route */\n+#define RTNH_F_LINKDOWN\t\t16\t/* carrier-down on nexthop */\n+#define RTNH_F_UNRESOLVED\t32\t/* The entry is unresolved (ipmr) */\n+\n+#define RTNH_COMPARE_MASK\t(RTNH_F_DEAD | RTNH_F_LINKDOWN | RTNH_F_OFFLOAD)\n+\n+/* Macros to handle hexthops */\n+\n+#define RTNH_ALIGNTO\t4\n+#define RTNH_ALIGN(len) ( ((len)+RTNH_ALIGNTO-1) & ~(RTNH_ALIGNTO-1) )\n+#define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && \\\n+\t\t\t   ((int)(rtnh)->rtnh_len) <= (len))\n+#define RTNH_NEXT(rtnh)\t((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len)))\n+#define RTNH_LENGTH(len) (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len))\n+#define RTNH_SPACE(len)\tRTNH_ALIGN(RTNH_LENGTH(len))\n+#define RTNH_DATA(rtnh)   ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0)))\n+\n+/* RTA_VIA */\n+struct rtvia {\n+\t__kernel_sa_family_t\trtvia_family;\n+\t__u8\t\t\trtvia_addr[0];\n+};\n+\n+/* RTM_CACHEINFO */\n+\n+struct rta_cacheinfo {\n+\t__u32\trta_clntref;\n+\t__u32\trta_lastuse;\n+\t__s32\trta_expires;\n+\t__u32\trta_error;\n+\t__u32\trta_used;\n+\n+#define RTNETLINK_HAVE_PEERINFO 1\n+\t__u32\trta_id;\n+\t__u32\trta_ts;\n+\t__u32\trta_tsage;\n+};\n+\n+/* RTM_METRICS --- array of struct rtattr with types of RTAX_* */\n+\n+enum {\n+\tRTAX_UNSPEC,\n+#define RTAX_UNSPEC RTAX_UNSPEC\n+\tRTAX_LOCK,\n+#define RTAX_LOCK RTAX_LOCK\n+\tRTAX_MTU,\n+#define RTAX_MTU RTAX_MTU\n+\tRTAX_WINDOW,\n+#define RTAX_WINDOW RTAX_WINDOW\n+\tRTAX_RTT,\n+#define RTAX_RTT RTAX_RTT\n+\tRTAX_RTTVAR,\n+#define RTAX_RTTVAR RTAX_RTTVAR\n+\tRTAX_SSTHRESH,\n+#define RTAX_SSTHRESH RTAX_SSTHRESH\n+\tRTAX_CWND,\n+#define RTAX_CWND RTAX_CWND\n+\tRTAX_ADVMSS,\n+#define RTAX_ADVMSS RTAX_ADVMSS\n+\tRTAX_REORDERING,\n+#define RTAX_REORDERING RTAX_REORDERING\n+\tRTAX_HOPLIMIT,\n+#define RTAX_HOPLIMIT RTAX_HOPLIMIT\n+\tRTAX_INITCWND,\n+#define RTAX_INITCWND RTAX_INITCWND\n+\tRTAX_FEATURES,\n+#define RTAX_FEATURES RTAX_FEATURES\n+\tRTAX_RTO_MIN,\n+#define RTAX_RTO_MIN RTAX_RTO_MIN\n+\tRTAX_INITRWND,\n+#define RTAX_INITRWND RTAX_INITRWND\n+\tRTAX_QUICKACK,\n+#define RTAX_QUICKACK RTAX_QUICKACK\n+\tRTAX_CC_ALGO,\n+#define RTAX_CC_ALGO RTAX_CC_ALGO\n+\tRTAX_FASTOPEN_NO_COOKIE,\n+#define RTAX_FASTOPEN_NO_COOKIE RTAX_FASTOPEN_NO_COOKIE\n+\t__RTAX_MAX\n+};\n+\n+#define RTAX_MAX (__RTAX_MAX - 1)\n+\n+#define RTAX_FEATURE_ECN\t(1 << 0)\n+#define RTAX_FEATURE_SACK\t(1 << 1)\n+#define RTAX_FEATURE_TIMESTAMP\t(1 << 2)\n+#define RTAX_FEATURE_ALLFRAG\t(1 << 3)\n+\n+#define RTAX_FEATURE_MASK\t(RTAX_FEATURE_ECN | RTAX_FEATURE_SACK | \\\n+\t\t\t\t RTAX_FEATURE_TIMESTAMP | RTAX_FEATURE_ALLFRAG)\n+\n+struct rta_session {\n+\t__u8\tproto;\n+\t__u8\tpad1;\n+\t__u16\tpad2;\n+\n+\tunion {\n+\t\tstruct {\n+\t\t\t__u16\tsport;\n+\t\t\t__u16\tdport;\n+\t\t} ports;\n+\n+\t\tstruct {\n+\t\t\t__u8\ttype;\n+\t\t\t__u8\tcode;\n+\t\t\t__u16\tident;\n+\t\t} icmpt;\n+\n+\t\t__u32\t\tspi;\n+\t} u;\n+};\n+\n+struct rta_mfc_stats {\n+\t__u64\tmfcs_packets;\n+\t__u64\tmfcs_bytes;\n+\t__u64\tmfcs_wrong_if;\n+};\n+\n+/****\n+ *\t\tGeneral form of address family dependent message.\n+ ****/\n+\n+struct rtgenmsg {\n+\tunsigned char\t\trtgen_family;\n+};\n+\n+/*****************************************************************\n+ *\t\tLink layer specific messages.\n+ ****/\n+\n+/* struct ifinfomsg\n+ * passes link level specific information, not dependent\n+ * on network protocol.\n+ */\n+\n+struct ifinfomsg {\n+\tunsigned char\tifi_family;\n+\tunsigned char\t__ifi_pad;\n+\tunsigned short\tifi_type;\t\t/* ARPHRD_* */\n+\tint\t\tifi_index;\t\t/* Link index\t*/\n+\tunsigned\tifi_flags;\t\t/* IFF_* flags\t*/\n+\tunsigned\tifi_change;\t\t/* IFF_* change mask */\n+};\n+\n+/********************************************************************\n+ *\t\tprefix information \n+ ****/\n+\n+struct prefixmsg {\n+\tunsigned char\tprefix_family;\n+\tunsigned char\tprefix_pad1;\n+\tunsigned short\tprefix_pad2;\n+\tint\t\tprefix_ifindex;\n+\tunsigned char\tprefix_type;\n+\tunsigned char\tprefix_len;\n+\tunsigned char\tprefix_flags;\n+\tunsigned char\tprefix_pad3;\n+};\n+\n+enum \n+{\n+\tPREFIX_UNSPEC,\n+\tPREFIX_ADDRESS,\n+\tPREFIX_CACHEINFO,\n+\t__PREFIX_MAX\n+};\n+\n+#define PREFIX_MAX\t(__PREFIX_MAX - 1)\n+\n+struct prefix_cacheinfo {\n+\t__u32\tpreferred_time;\n+\t__u32\tvalid_time;\n+};\n+\n+\n+/*****************************************************************\n+ *\t\tTraffic control messages.\n+ ****/\n+\n+struct tcmsg {\n+\tunsigned char\ttcm_family;\n+\tunsigned char\ttcm__pad1;\n+\tunsigned short\ttcm__pad2;\n+\tint\t\ttcm_ifindex;\n+\t__u32\t\ttcm_handle;\n+\t__u32\t\ttcm_parent;\n+/* tcm_block_index is used instead of tcm_parent\n+ * in case tcm_ifindex == TCM_IFINDEX_MAGIC_BLOCK\n+ */\n+#define tcm_block_index tcm_parent\n+\t__u32\t\ttcm_info;\n+};\n+\n+/* For manipulation of filters in shared block, tcm_ifindex is set to\n+ * TCM_IFINDEX_MAGIC_BLOCK, and tcm_parent is aliased to tcm_block_index\n+ * which is the block index.\n+ */\n+#define TCM_IFINDEX_MAGIC_BLOCK (0xFFFFFFFFU)\n+\n+enum {\n+\tTCA_UNSPEC,\n+\tTCA_KIND,\n+\tTCA_OPTIONS,\n+\tTCA_STATS,\n+\tTCA_XSTATS,\n+\tTCA_RATE,\n+\tTCA_FCNT,\n+\tTCA_STATS2,\n+\tTCA_STAB,\n+\tTCA_PAD,\n+\tTCA_DUMP_INVISIBLE,\n+\tTCA_CHAIN,\n+\tTCA_HW_OFFLOAD,\n+\tTCA_INGRESS_BLOCK,\n+\tTCA_EGRESS_BLOCK,\n+\t__TCA_MAX\n+};\n+\n+#define TCA_MAX (__TCA_MAX - 1)\n+\n+#define TCA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg))))\n+#define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg))\n+\n+/********************************************************************\n+ *\t\tNeighbor Discovery userland options\n+ ****/\n+\n+struct nduseroptmsg {\n+\tunsigned char\tnduseropt_family;\n+\tunsigned char\tnduseropt_pad1;\n+\tunsigned short\tnduseropt_opts_len;\t/* Total length of options */\n+\tint\t\tnduseropt_ifindex;\n+\t__u8\t\tnduseropt_icmp_type;\n+\t__u8\t\tnduseropt_icmp_code;\n+\tunsigned short\tnduseropt_pad2;\n+\tunsigned int\tnduseropt_pad3;\n+\t/* Followed by one or more ND options */\n+};\n+\n+enum {\n+\tNDUSEROPT_UNSPEC,\n+\tNDUSEROPT_SRCADDR,\n+\t__NDUSEROPT_MAX\n+};\n+\n+#define NDUSEROPT_MAX\t(__NDUSEROPT_MAX - 1)\n+\n+#ifndef __KERNEL__\n+/* RTnetlink multicast groups - backwards compatibility for userspace */\n+#define RTMGRP_LINK\t\t1\n+#define RTMGRP_NOTIFY\t\t2\n+#define RTMGRP_NEIGH\t\t4\n+#define RTMGRP_TC\t\t8\n+\n+#define RTMGRP_IPV4_IFADDR\t0x10\n+#define RTMGRP_IPV4_MROUTE\t0x20\n+#define RTMGRP_IPV4_ROUTE\t0x40\n+#define RTMGRP_IPV4_RULE\t0x80\n+\n+#define RTMGRP_IPV6_IFADDR\t0x100\n+#define RTMGRP_IPV6_MROUTE\t0x200\n+#define RTMGRP_IPV6_ROUTE\t0x400\n+#define RTMGRP_IPV6_IFINFO\t0x800\n+\n+#define RTMGRP_DECnet_IFADDR    0x1000\n+#define RTMGRP_DECnet_ROUTE     0x4000\n+\n+#define RTMGRP_IPV6_PREFIX\t0x20000\n+#endif\n+\n+/* RTnetlink multicast groups */\n+enum rtnetlink_groups {\n+\tRTNLGRP_NONE,\n+#define RTNLGRP_NONE\t\tRTNLGRP_NONE\n+\tRTNLGRP_LINK,\n+#define RTNLGRP_LINK\t\tRTNLGRP_LINK\n+\tRTNLGRP_NOTIFY,\n+#define RTNLGRP_NOTIFY\t\tRTNLGRP_NOTIFY\n+\tRTNLGRP_NEIGH,\n+#define RTNLGRP_NEIGH\t\tRTNLGRP_NEIGH\n+\tRTNLGRP_TC,\n+#define RTNLGRP_TC\t\tRTNLGRP_TC\n+\tRTNLGRP_IPV4_IFADDR,\n+#define RTNLGRP_IPV4_IFADDR\tRTNLGRP_IPV4_IFADDR\n+\tRTNLGRP_IPV4_MROUTE,\n+#define\tRTNLGRP_IPV4_MROUTE\tRTNLGRP_IPV4_MROUTE\n+\tRTNLGRP_IPV4_ROUTE,\n+#define RTNLGRP_IPV4_ROUTE\tRTNLGRP_IPV4_ROUTE\n+\tRTNLGRP_IPV4_RULE,\n+#define RTNLGRP_IPV4_RULE\tRTNLGRP_IPV4_RULE\n+\tRTNLGRP_IPV6_IFADDR,\n+#define RTNLGRP_IPV6_IFADDR\tRTNLGRP_IPV6_IFADDR\n+\tRTNLGRP_IPV6_MROUTE,\n+#define RTNLGRP_IPV6_MROUTE\tRTNLGRP_IPV6_MROUTE\n+\tRTNLGRP_IPV6_ROUTE,\n+#define RTNLGRP_IPV6_ROUTE\tRTNLGRP_IPV6_ROUTE\n+\tRTNLGRP_IPV6_IFINFO,\n+#define RTNLGRP_IPV6_IFINFO\tRTNLGRP_IPV6_IFINFO\n+\tRTNLGRP_DECnet_IFADDR,\n+#define RTNLGRP_DECnet_IFADDR\tRTNLGRP_DECnet_IFADDR\n+\tRTNLGRP_NOP2,\n+\tRTNLGRP_DECnet_ROUTE,\n+#define RTNLGRP_DECnet_ROUTE\tRTNLGRP_DECnet_ROUTE\n+\tRTNLGRP_DECnet_RULE,\n+#define RTNLGRP_DECnet_RULE\tRTNLGRP_DECnet_RULE\n+\tRTNLGRP_NOP4,\n+\tRTNLGRP_IPV6_PREFIX,\n+#define RTNLGRP_IPV6_PREFIX\tRTNLGRP_IPV6_PREFIX\n+\tRTNLGRP_IPV6_RULE,\n+#define RTNLGRP_IPV6_RULE\tRTNLGRP_IPV6_RULE\n+\tRTNLGRP_ND_USEROPT,\n+#define RTNLGRP_ND_USEROPT\tRTNLGRP_ND_USEROPT\n+\tRTNLGRP_PHONET_IFADDR,\n+#define RTNLGRP_PHONET_IFADDR\tRTNLGRP_PHONET_IFADDR\n+\tRTNLGRP_PHONET_ROUTE,\n+#define RTNLGRP_PHONET_ROUTE\tRTNLGRP_PHONET_ROUTE\n+\tRTNLGRP_DCB,\n+#define RTNLGRP_DCB\t\tRTNLGRP_DCB\n+\tRTNLGRP_IPV4_NETCONF,\n+#define RTNLGRP_IPV4_NETCONF\tRTNLGRP_IPV4_NETCONF\n+\tRTNLGRP_IPV6_NETCONF,\n+#define RTNLGRP_IPV6_NETCONF\tRTNLGRP_IPV6_NETCONF\n+\tRTNLGRP_MDB,\n+#define RTNLGRP_MDB\t\tRTNLGRP_MDB\n+\tRTNLGRP_MPLS_ROUTE,\n+#define RTNLGRP_MPLS_ROUTE\tRTNLGRP_MPLS_ROUTE\n+\tRTNLGRP_NSID,\n+#define RTNLGRP_NSID\t\tRTNLGRP_NSID\n+\tRTNLGRP_MPLS_NETCONF,\n+#define RTNLGRP_MPLS_NETCONF\tRTNLGRP_MPLS_NETCONF\n+\tRTNLGRP_IPV4_MROUTE_R,\n+#define RTNLGRP_IPV4_MROUTE_R\tRTNLGRP_IPV4_MROUTE_R\n+\tRTNLGRP_IPV6_MROUTE_R,\n+#define RTNLGRP_IPV6_MROUTE_R\tRTNLGRP_IPV6_MROUTE_R\n+\t__RTNLGRP_MAX\n+};\n+#define RTNLGRP_MAX\t(__RTNLGRP_MAX - 1)\n+\n+/* TC action piece */\n+struct tcamsg {\n+\tunsigned char\ttca_family;\n+\tunsigned char\ttca__pad1;\n+\tunsigned short\ttca__pad2;\n+};\n+\n+enum {\n+\tTCA_ROOT_UNSPEC,\n+\tTCA_ROOT_TAB,\n+#define TCA_ACT_TAB TCA_ROOT_TAB\n+#define TCAA_MAX TCA_ROOT_TAB\n+\tTCA_ROOT_FLAGS,\n+\tTCA_ROOT_COUNT,\n+\tTCA_ROOT_TIME_DELTA, /* in msecs */\n+\t__TCA_ROOT_MAX,\n+#define\tTCA_ROOT_MAX (__TCA_ROOT_MAX - 1)\n+};\n+\n+#define TA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg))))\n+#define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg))\n+/* tcamsg flags stored in attribute TCA_ROOT_FLAGS\n+ *\n+ * TCA_FLAG_LARGE_DUMP_ON user->kernel to request for larger than TCA_ACT_MAX_PRIO\n+ * actions in a dump. All dump responses will contain the number of actions\n+ * being dumped stored in for user app's consumption in TCA_ROOT_COUNT\n+ *\n+ */\n+#define TCA_FLAG_LARGE_DUMP_ON\t\t(1 << 0)\n+\n+/* New extended info filters for IFLA_EXT_MASK */\n+#define RTEXT_FILTER_VF\t\t(1 << 0)\n+#define RTEXT_FILTER_BRVLAN\t(1 << 1)\n+#define RTEXT_FILTER_BRVLAN_COMPRESSED\t(1 << 2)\n+#define\tRTEXT_FILTER_SKIP_STATS\t(1 << 3)\n+\n+/* End of information exported to user level */\n+\n+\n+\n+#endif /* _UAPI__LINUX_RTNETLINK_H */\ndiff --git a/src/basic/linux/wireguard.h b/src/basic/linux/wireguard.h\nnew file mode 100644\nindex 00000000000..071ce4167f5\n--- /dev/null\n+++ b/src/basic/linux/wireguard.h\n@@ -0,0 +1,190 @@\n+/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */\n+/*\n+ * Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.\n+ *\n+ * Documentation\n+ * =============\n+ *\n+ * The below enums and macros are for interfacing with WireGuard, using generic\n+ * netlink, with family WG_GENL_NAME and version WG_GENL_VERSION. It defines two\n+ * methods: get and set. Note that while they share many common attributes,\n+ * these two functions actually accept a slightly different set of inputs and\n+ * outputs.\n+ *\n+ * WG_CMD_GET_DEVICE\n+ * -----------------\n+ *\n+ * May only be called via NLM_F_REQUEST | NLM_F_DUMP. The command should contain\n+ * one but not both of:\n+ *\n+ *    WGDEVICE_A_IFINDEX: NLA_U32\n+ *    WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMESIZ - 1\n+ *\n+ * The kernel will then return several messages (NLM_F_MULTI) containing the\n+ * following tree of nested items:\n+ *\n+ *    WGDEVICE_A_IFINDEX: NLA_U32\n+ *    WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMESIZ - 1\n+ *    WGDEVICE_A_PRIVATE_KEY: len WG_KEY_LEN\n+ *    WGDEVICE_A_PUBLIC_KEY: len WG_KEY_LEN\n+ *    WGDEVICE_A_LISTEN_PORT: NLA_U16\n+ *    WGDEVICE_A_FWMARK: NLA_U32\n+ *    WGDEVICE_A_PEERS: NLA_NESTED\n+ *        0: NLA_NESTED\n+ *            WGPEER_A_PUBLIC_KEY: len WG_KEY_LEN\n+ *            WGPEER_A_PRESHARED_KEY: len WG_KEY_LEN\n+ *            WGPEER_A_ENDPOINT: struct sockaddr_in or struct sockaddr_in6\n+ *            WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16\n+ *            WGPEER_A_LAST_HANDSHAKE_TIME: struct __kernel_timespec\n+ *            WGPEER_A_RX_BYTES: NLA_U64\n+ *            WGPEER_A_TX_BYTES: NLA_U64\n+ *            WGPEER_A_ALLOWEDIPS: NLA_NESTED\n+ *                0: NLA_NESTED\n+ *                    WGALLOWEDIP_A_FAMILY: NLA_U16\n+ *                    WGALLOWEDIP_A_IPADDR: struct in_addr or struct in6_addr\n+ *                    WGALLOWEDIP_A_CIDR_MASK: NLA_U8\n+ *                0: NLA_NESTED\n+ *                    ...\n+ *                0: NLA_NESTED\n+ *                    ...\n+ *                ...\n+ *            WGPEER_A_PROTOCOL_VERSION: NLA_U32\n+ *        0: NLA_NESTED\n+ *            ...\n+ *        ...\n+ *\n+ * It is possible that all of the allowed IPs of a single peer will not\n+ * fit within a single netlink message. In that case, the same peer will\n+ * be written in the following message, except it will only contain\n+ * WGPEER_A_PUBLIC_KEY and WGPEER_A_ALLOWEDIPS. This may occur several\n+ * times in a row for the same peer. It is then up to the receiver to\n+ * coalesce adjacent peers. Likewise, it is possible that all peers will\n+ * not fit within a single message. So, subsequent peers will be sent\n+ * in following messages, except those will only contain WGDEVICE_A_IFNAME\n+ * and WGDEVICE_A_PEERS. It is then up to the receiver to coalesce these\n+ * messages to form the complete list of peers.\n+ *\n+ * Since this is an NLA_F_DUMP command, the final message will always be\n+ * NLMSG_DONE, even if an error occurs. However, this NLMSG_DONE message\n+ * contains an integer error code. It is either zero or a negative error\n+ * code corresponding to the errno.\n+ *\n+ * WG_CMD_SET_DEVICE\n+ * -----------------\n+ *\n+ * May only be called via NLM_F_REQUEST. The command should contain the\n+ * following tree of nested items, containing one but not both of\n+ * WGDEVICE_A_IFINDEX and WGDEVICE_A_IFNAME:\n+ *\n+ *    WGDEVICE_A_IFINDEX: NLA_U32\n+ *    WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMESIZ - 1\n+ *    WGDEVICE_A_FLAGS: NLA_U32, 0 or WGDEVICE_F_REPLACE_PEERS if all current\n+ *                      peers should be removed prior to adding the list below.\n+ *    WGDEVICE_A_PRIVATE_KEY: len WG_KEY_LEN, all zeros to remove\n+ *    WGDEVICE_A_LISTEN_PORT: NLA_U16, 0 to choose randomly\n+ *    WGDEVICE_A_FWMARK: NLA_U32, 0 to disable\n+ *    WGDEVICE_A_PEERS: NLA_NESTED\n+ *        0: NLA_NESTED\n+ *            WGPEER_A_PUBLIC_KEY: len WG_KEY_LEN\n+ *            WGPEER_A_FLAGS: NLA_U32, 0 and/or WGPEER_F_REMOVE_ME if the\n+ *                            specified peer should be removed rather than\n+ *                            added/updated and/or WGPEER_F_REPLACE_ALLOWEDIPS\n+ *                            if all current allowed IPs of this peer should be\n+ *                            removed prior to adding the list below.\n+ *            WGPEER_A_PRESHARED_KEY: len WG_KEY_LEN, all zeros to remove\n+ *            WGPEER_A_ENDPOINT: struct sockaddr_in or struct sockaddr_in6\n+ *            WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16, 0 to disable\n+ *            WGPEER_A_ALLOWEDIPS: NLA_NESTED\n+ *                0: NLA_NESTED\n+ *                    WGALLOWEDIP_A_FAMILY: NLA_U16\n+ *                    WGALLOWEDIP_A_IPADDR: struct in_addr or struct in6_addr\n+ *                    WGALLOWEDIP_A_CIDR_MASK: NLA_U8\n+ *                0: NLA_NESTED\n+ *                    ...\n+ *                0: NLA_NESTED\n+ *                    ...\n+ *                ...\n+ *            WGPEER_A_PROTOCOL_VERSION: NLA_U32, should not be set or used at\n+ *                                       all by most users of this API, as the\n+ *                                       most recent protocol will be used when\n+ *                                       this is unset. Otherwise, must be set\n+ *                                       to 1.\n+ *        0: NLA_NESTED\n+ *            ...\n+ *        ...\n+ *\n+ * It is possible that the amount of configuration data exceeds that of\n+ * the maximum message length accepted by the kernel. In that case, several\n+ * messages should be sent one after another, with each successive one\n+ * filling in information not contained in the prior. Note that if\n+ * WGDEVICE_F_REPLACE_PEERS is specified in the first message, it probably\n+ * should not be specified in fragments that come after, so that the list\n+ * of peers is only cleared the first time but appened after. Likewise for\n+ * peers, if WGPEER_F_REPLACE_ALLOWEDIPS is specified in the first message\n+ * of a peer, it likely should not be specified in subsequent fragments.\n+ *\n+ * If an error occurs, NLMSG_ERROR will reply containing an errno.\n+ */\n+\n+#ifndef _WG_UAPI_WIREGUARD_H\n+#define _WG_UAPI_WIREGUARD_H\n+\n+#define WG_GENL_NAME \"wireguard\"\n+#define WG_GENL_VERSION 1\n+\n+#define WG_KEY_LEN 32\n+\n+enum wg_cmd {\n+\tWG_CMD_GET_DEVICE,\n+\tWG_CMD_SET_DEVICE,\n+\t__WG_CMD_MAX\n+};\n+#define WG_CMD_MAX (__WG_CMD_MAX - 1)\n+\n+enum wgdevice_flag {\n+\tWGDEVICE_F_REPLACE_PEERS = 1U << 0\n+};\n+enum wgdevice_attribute {\n+\tWGDEVICE_A_UNSPEC,\n+\tWGDEVICE_A_IFINDEX,\n+\tWGDEVICE_A_IFNAME,\n+\tWGDEVICE_A_PRIVATE_KEY,\n+\tWGDEVICE_A_PUBLIC_KEY,\n+\tWGDEVICE_A_FLAGS,\n+\tWGDEVICE_A_LISTEN_PORT,\n+\tWGDEVICE_A_FWMARK,\n+\tWGDEVICE_A_PEERS,\n+\t__WGDEVICE_A_LAST\n+};\n+#define WGDEVICE_A_MAX (__WGDEVICE_A_LAST - 1)\n+\n+enum wgpeer_flag {\n+\tWGPEER_F_REMOVE_ME = 1U << 0,\n+\tWGPEER_F_REPLACE_ALLOWEDIPS = 1U << 1\n+};\n+enum wgpeer_attribute {\n+\tWGPEER_A_UNSPEC,\n+\tWGPEER_A_PUBLIC_KEY,\n+\tWGPEER_A_PRESHARED_KEY,\n+\tWGPEER_A_FLAGS,\n+\tWGPEER_A_ENDPOINT,\n+\tWGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL,\n+\tWGPEER_A_LAST_HANDSHAKE_TIME,\n+\tWGPEER_A_RX_BYTES,\n+\tWGPEER_A_TX_BYTES,\n+\tWGPEER_A_ALLOWEDIPS,\n+\tWGPEER_A_PROTOCOL_VERSION,\n+\t__WGPEER_A_LAST\n+};\n+#define WGPEER_A_MAX (__WGPEER_A_LAST - 1)\n+\n+enum wgallowedip_attribute {\n+\tWGALLOWEDIP_A_UNSPEC,\n+\tWGALLOWEDIP_A_FAMILY,\n+\tWGALLOWEDIP_A_IPADDR,\n+\tWGALLOWEDIP_A_CIDR_MASK,\n+\t__WGALLOWEDIP_A_LAST\n+};\n+#define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1)\n+\n+#endif /* _WG_UAPI_WIREGUARD_H */\ndiff --git a/src/basic/meson.build b/src/basic/meson.build\nindex 91e0df3d2f7..de1e42013de 100644\n--- a/src/basic/meson.build\n+++ b/src/basic/meson.build\n@@ -84,6 +84,23 @@ basic_sources = files('''\n         label.h\n         limits-util.c\n         limits-util.h\n+        linux/btrfs.h\n+        linux/btrfs_tree.h\n+        linux/can/vxcan.h\n+        linux/fib_rules.h\n+        linux/fou.h\n+        linux/if.h\n+        linux/if_addr.h\n+        linux/if_arp.h\n+        linux/if_bonding.h\n+        linux/if_bridge.h\n+        linux/if_link.h\n+        linux/if_tun.h\n+        linux/if_tunnel.h\n+        linux/libc-compat.h\n+        linux/netlink.h\n+        linux/rtnetlink.h\n+        linux/wireguard.h\n         list.h\n         locale-util.c\n         locale-util.h\n@@ -100,18 +117,10 @@ basic_sources = files('''\n         mempool.h\n         missing.h\n         missing_audit.h\n-        missing_btrfs.h\n-        missing_btrfs_tree.h\n         missing_capability.h\n         missing_drm.h\n-        missing_ethtool.h\n         missing_fcntl.h\n-        missing_fib_rules.h\n-        missing_fou.h\n         missing_fs.h\n-        missing_if_bridge.h\n-        missing_if_link.h\n-        missing_if_tunnel.h\n         missing_input.h\n         missing_keyctl.h\n         missing_magic.h\n@@ -128,7 +137,6 @@ basic_sources = files('''\n         missing_syscall.h\n         missing_timerfd.h\n         missing_type.h\n-        missing_vxcan.h\n         mkdir-label.c\n         mkdir.c\n         mkdir.h\n@@ -227,7 +235,6 @@ basic_sources = files('''\n \n missing_audit_h = files('missing_audit.h')\n missing_capability_h = files('missing_capability.h')\n-missing_network_h = files('missing_network.h')\n missing_socket_h = files('missing_socket.h')\n \n generate_af_list = find_program('generate-af-list.sh')\n@@ -241,7 +248,7 @@ generate_arphrd_list = find_program('generate-arphrd-list.sh')\n arphrd_list_txt = custom_target(\n         'arphrd-list.txt',\n         output : 'arphrd-list.txt',\n-        command : [generate_arphrd_list, cpp, config_h, missing_network_h],\n+        command : [generate_arphrd_list, cpp, config_h],\n         capture : true)\n \n generate_cap_list = find_program('generate-cap-list.sh')\ndiff --git a/src/basic/missing.h b/src/basic/missing.h\nindex 5067c8fd009..9ea4d9467cb 100644\n--- a/src/basic/missing.h\n+++ b/src/basic/missing.h\n@@ -4,7 +4,6 @@\n /* Missing glibc definitions to access certain kernel APIs */\n \n #include \"missing_audit.h\"\n-#include \"missing_btrfs_tree.h\"\n #include \"missing_capability.h\"\n #include \"missing_drm.h\"\n #include \"missing_fcntl.h\"\ndiff --git a/src/basic/missing_btrfs.h b/src/basic/missing_btrfs.h\ndeleted file mode 100644\nindex 34c382ff0b5..00000000000\n--- a/src/basic/missing_btrfs.h\n+++ /dev/null\n@@ -1,22 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1+ */\n-#pragma once\n-\n-/* Old btrfs.h requires stddef.h to be included before btrfs.h */\n-#include <stddef.h>\n-\n-#include <linux/btrfs.h>\n-\n-/* linux@57254b6ebce4ceca02d9c8b615f6059c56c19238 (3.11) */\n-#ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT\n-#define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)\n-#endif\n-\n-/* linux@83288b60bf6668933689078973136e0c9d387b38 (4.7) */\n-#ifndef BTRFS_QGROUP_LIMIT_MAX_RFER\n-#define BTRFS_QGROUP_LIMIT_MAX_RFER\t(1ULL << 0)\n-#define BTRFS_QGROUP_LIMIT_MAX_EXCL\t(1ULL << 1)\n-#define BTRFS_QGROUP_LIMIT_RSV_RFER\t(1ULL << 2)\n-#define BTRFS_QGROUP_LIMIT_RSV_EXCL\t(1ULL << 3)\n-#define BTRFS_QGROUP_LIMIT_RFER_CMPR\t(1ULL << 4)\n-#define BTRFS_QGROUP_LIMIT_EXCL_CMPR\t(1ULL << 5)\n-#endif\ndiff --git a/src/basic/missing_btrfs_tree.h b/src/basic/missing_btrfs_tree.h\ndeleted file mode 100644\nindex 555f90fe1b5..00000000000\n--- a/src/basic/missing_btrfs_tree.h\n+++ /dev/null\n@@ -1,109 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1+ */\n-#pragma once\n-\n-#include <linux/types.h>\n-\n-#include \"missing_btrfs.h\"\n-\n-/* linux@db6711600e27c885aed89751f04e727f3af26715 (4.7) */\n-#if HAVE_LINUX_BTRFS_TREE_H\n-#include <linux/btrfs_tree.h>\n-#else\n-#define BTRFS_ROOT_TREE_OBJECTID  1\n-#define BTRFS_QUOTA_TREE_OBJECTID 8\n-#define BTRFS_FIRST_FREE_OBJECTID 256\n-#define BTRFS_LAST_FREE_OBJECTID -256ULL\n-\n-#define BTRFS_ROOT_ITEM_KEY       132\n-#define BTRFS_ROOT_BACKREF_KEY    144\n-#define BTRFS_QGROUP_STATUS_KEY   240\n-#define BTRFS_QGROUP_INFO_KEY     242\n-#define BTRFS_QGROUP_LIMIT_KEY    244\n-#define BTRFS_QGROUP_RELATION_KEY 246\n-\n-struct btrfs_disk_key {\n-        __le64 objectid;\n-        __u8 type;\n-        __le64 offset;\n-} __attribute__ ((__packed__));\n-\n-struct btrfs_timespec {\n-        __le64 sec;\n-        __le32 nsec;\n-} __attribute__ ((__packed__));\n-\n-struct btrfs_inode_item {\n-        __le64 generation;\n-        __le64 transid;\n-        __le64 size;\n-        __le64 nbytes;\n-        __le64 block_group;\n-        __le32 nlink;\n-        __le32 uid;\n-        __le32 gid;\n-        __le32 mode;\n-        __le64 rdev;\n-        __le64 flags;\n-        __le64 sequence;\n-        __le64 reserved[4];\n-        struct btrfs_timespec atime;\n-        struct btrfs_timespec ctime;\n-        struct btrfs_timespec mtime;\n-        struct btrfs_timespec otime;\n-} __attribute__ ((__packed__));\n-\n-#define BTRFS_ROOT_SUBVOL_RDONLY (1ULL << 0)\n-\n-struct btrfs_root_item {\n-        struct btrfs_inode_item inode;\n-        __le64 generation;\n-        __le64 root_dirid;\n-        __le64 bytenr;\n-        __le64 byte_limit;\n-        __le64 bytes_used;\n-        __le64 last_snapshot;\n-        __le64 flags;\n-        __le32 refs;\n-        struct btrfs_disk_key drop_progress;\n-        __u8 drop_level;\n-        __u8 level;\n-\n-        __le64 generation_v2;\n-        __u8 uuid[BTRFS_UUID_SIZE];\n-        __u8 parent_uuid[BTRFS_UUID_SIZE];\n-        __u8 received_uuid[BTRFS_UUID_SIZE];\n-        __le64 ctransid; /* updated when an inode changes */\n-        __le64 otransid; /* trans when created */\n-        __le64 stransid; /* trans when sent. non-zero for received subvol */\n-        __le64 rtransid; /* trans when received. non-zero for received subvol */\n-        struct btrfs_timespec ctime;\n-        struct btrfs_timespec otime;\n-        struct btrfs_timespec stime;\n-        struct btrfs_timespec rtime;\n-        __le64 reserved[8]; /* for future */\n-} __attribute__ ((__packed__));\n-\n-struct btrfs_root_ref {\n-        __le64 dirid;\n-        __le64 sequence;\n-        __le16 name_len;\n-} __attribute__ ((__packed__));\n-\n-#define BTRFS_QGROUP_LEVEL_SHIFT  48\n-\n-struct btrfs_qgroup_info_item {\n-        __le64 generation;\n-        __le64 rfer;\n-        __le64 rfer_cmpr;\n-        __le64 excl;\n-        __le64 excl_cmpr;\n-} __attribute__ ((__packed__));\n-\n-struct btrfs_qgroup_limit_item {\n-        __le64 flags;\n-        __le64 max_rfer;\n-        __le64 max_excl;\n-        __le64 rsv_rfer;\n-        __le64 rsv_excl;\n-} __attribute__ ((__packed__));\n-#endif\ndiff --git a/src/basic/missing_ethtool.h b/src/basic/missing_ethtool.h\ndeleted file mode 100644\nindex 9ba929c6329..00000000000\n--- a/src/basic/missing_ethtool.h\n+++ /dev/null\n@@ -1,131 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1+ */\n-#pragma once\n-\n-#include <linux/types.h>\n-\n-/* Missing definitions in ethtool.h */\n-\n-#if !HAVE_ETHTOOL_LINK_MODE_10baseT_Half_BIT /* linux@3f1ac7a700d039c61d8d8b99f28d605d489a60cf (4.6) */\n-\n-#define ETHTOOL_GLINKSETTINGS   0x0000004c /* Get ethtool_link_settings */\n-#define ETHTOOL_SLINKSETTINGS   0x0000004d /* Set ethtool_link_settings */\n-\n-struct ethtool_link_settings {\n-        __u32 cmd;\n-        __u32 speed;\n-        __u8  duplex;\n-        __u8  port;\n-        __u8  phy_address;\n-        __u8  autoneg;\n-        __u8  mdio_support;\n-        __u8  eth_tp_mdix;\n-        __u8  eth_tp_mdix_ctrl;\n-        __s8  link_mode_masks_nwords;\n-        __u8  transceiver;\n-        __u8  reserved1[3];\n-        __u32 reserved[7];\n-        __u32 link_mode_masks[0];\n-        /* layout of link_mode_masks fields:\n-         * __u32 map_supported[link_mode_masks_nwords];\n-         * __u32 map_advertising[link_mode_masks_nwords];\n-         * __u32 map_lp_advertising[link_mode_masks_nwords];\n-         */\n-};\n-\n-enum ethtool_link_mode_bit_indices {\n-        ETHTOOL_LINK_MODE_10baseT_Half_BIT           = 0,\n-        ETHTOOL_LINK_MODE_10baseT_Full_BIT           = 1,\n-        ETHTOOL_LINK_MODE_100baseT_Half_BIT          = 2,\n-        ETHTOOL_LINK_MODE_100baseT_Full_BIT          = 3,\n-        ETHTOOL_LINK_MODE_1000baseT_Half_BIT         = 4,\n-        ETHTOOL_LINK_MODE_1000baseT_Full_BIT         = 5,\n-        ETHTOOL_LINK_MODE_Autoneg_BIT                = 6,\n-        ETHTOOL_LINK_MODE_TP_BIT                     = 7,\n-        ETHTOOL_LINK_MODE_AUI_BIT                    = 8,\n-        ETHTOOL_LINK_MODE_MII_BIT                    = 9,\n-        ETHTOOL_LINK_MODE_FIBRE_BIT                  = 10,\n-        ETHTOOL_LINK_MODE_BNC_BIT                    = 11,\n-        ETHTOOL_LINK_MODE_10000baseT_Full_BIT        = 12,\n-        ETHTOOL_LINK_MODE_Pause_BIT                  = 13,\n-        ETHTOOL_LINK_MODE_Asym_Pause_BIT             = 14,\n-        ETHTOOL_LINK_MODE_2500baseX_Full_BIT         = 15,\n-        ETHTOOL_LINK_MODE_Backplane_BIT              = 16,\n-        ETHTOOL_LINK_MODE_1000baseKX_Full_BIT        = 17,\n-        ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT      = 18,\n-        ETHTOOL_LINK_MODE_10000baseKR_Full_BIT       = 19,\n-        ETHTOOL_LINK_MODE_10000baseR_FEC_BIT         = 20,\n-        ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT     = 21,\n-        ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT      = 22,\n-        ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT      = 23,\n-        ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT      = 24,\n-        ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT      = 25,\n-        ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT      = 26,\n-        ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT      = 27,\n-        ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT      = 28,\n-        ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT      = 29,\n-        ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT      = 30,\n-        ETHTOOL_LINK_MODE_25000baseCR_Full_BIT       = 31,\n-        ETHTOOL_LINK_MODE_25000baseKR_Full_BIT       = 32,\n-        ETHTOOL_LINK_MODE_25000baseSR_Full_BIT       = 33,\n-        ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT      = 34,\n-        ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT      = 35,\n-        ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT     = 36,\n-        ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT     = 37,\n-        ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT     = 38,\n-        ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT = 39,\n-        ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT      = 40,\n-        ETHTOOL_LINK_MODE_1000baseX_Full_BIT         = 41,\n-        ETHTOOL_LINK_MODE_10000baseCR_Full_BIT       = 42,\n-        ETHTOOL_LINK_MODE_10000baseSR_Full_BIT       = 43,\n-        ETHTOOL_LINK_MODE_10000baseLR_Full_BIT       = 44,\n-        ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT      = 45,\n-        ETHTOOL_LINK_MODE_10000baseER_Full_BIT       = 46,\n-        ETHTOOL_LINK_MODE_2500baseT_Full_BIT         = 47,\n-        ETHTOOL_LINK_MODE_5000baseT_Full_BIT         = 48,\n-\n-        ETHTOOL_LINK_MODE_FEC_NONE_BIT               = 49,\n-        ETHTOOL_LINK_MODE_FEC_RS_BIT                 = 50,\n-        ETHTOOL_LINK_MODE_FEC_BASER_BIT              = 51,\n-\n-        /* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit\n-         * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_*\n-         * macro for bits > 31. The only way to use indices > 31 is to\n-         * use the new ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API.\n-         */\n-\n-        __ETHTOOL_LINK_MODE_LAST\n-          = ETHTOOL_LINK_MODE_FEC_BASER_BIT,\n-};\n-#else\n-#if !HAVE_ETHTOOL_LINK_MODE_25000baseCR_Full_BIT /* linux@3851112e4737cd52aaeda0ce8d084be9ee128106 (4.7) */\n-#define ETHTOOL_LINK_MODE_25000baseCR_Full_BIT       31\n-#define ETHTOOL_LINK_MODE_25000baseKR_Full_BIT       32\n-#define ETHTOOL_LINK_MODE_25000baseSR_Full_BIT       33\n-#define ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT      34\n-#define ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT      35\n-#define ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT     36\n-#define ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT     37\n-#define ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT     38\n-#define ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT 39\n-#endif\n-#if !HAVE_ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT /* linux@89da45b8b5b2187734a11038b8593714f964ffd1 (4.8) */\n-#define ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT      40\n-#endif\n-#if !HAVE_ETHTOOL_LINK_MODE_1000baseX_Full_BIT /* linux@5711a98221443aec54c4c81ee98c6ae46acccb65 (4.9) */\n-#define ETHTOOL_LINK_MODE_1000baseX_Full_BIT         41\n-#define ETHTOOL_LINK_MODE_10000baseCR_Full_BIT       42\n-#define ETHTOOL_LINK_MODE_10000baseSR_Full_BIT       43\n-#define ETHTOOL_LINK_MODE_10000baseLR_Full_BIT       44\n-#define ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT      45\n-#define ETHTOOL_LINK_MODE_10000baseER_Full_BIT       46\n-#endif\n-#if !HAVE_ETHTOOL_LINK_MODE_2500baseT_Full_BIT /* linux@94842b4fc4d6b1691cfc86c6f5251f299d27f4ba (4.10) */\n-#define ETHTOOL_LINK_MODE_2500baseT_Full_BIT         47\n-#define ETHTOOL_LINK_MODE_5000baseT_Full_BIT         48\n-#endif\n-#if !HAVE_ETHTOOL_LINK_MODE_FEC_NONE_BIT /* linux@1a5f3da20bd966220931239fbd31e6ac6ff42251 (4.14) */\n-#define ETHTOOL_LINK_MODE_FEC_NONE_BIT               49\n-#define ETHTOOL_LINK_MODE_FEC_RS_BIT                 50\n-#define ETHTOOL_LINK_MODE_FEC_BASER_BIT              51\n-#endif\n-#endif\ndiff --git a/src/basic/missing_fib_rules.h b/src/basic/missing_fib_rules.h\ndeleted file mode 100644\nindex df120d7bcda..00000000000\n--- a/src/basic/missing_fib_rules.h\n+++ /dev/null\n@@ -1,45 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1+ */\n-#pragma once\n-\n-#include <linux/types.h>\n-\n-#if !HAVE_FRA_TUN_ID /* linux@e7030878fc8448492b6e5cecd574043f63271298 (4.3) */\n-#define FRA_TUN_ID      12\n-#endif\n-\n-#if !HAVE_FRA_SUPPRESS_PREFIXLEN /* linux@6ef94cfafba159d6b1a902ccb3349ac6a34ff6ad, 73f5698e77219bfc3ea1903759fe8e20ab5b285e (3.12) */\n-#define FRA_SUPPRESS_IFGROUP 13\n-#define FRA_SUPPRESS_PREFIXLEN 14\n-#endif\n-\n-#if !HAVE_FRA_PAD /* linux@b46f6ded906ef0be52a4881ba50a084aeca64d7e (4.7) */\n-#define FRA_PAD         18\n-#endif\n-\n-#if !HAVE_FRA_L3MDEV /* linux@96c63fa7393d0a346acfe5a91e0c7d4c7782641b (4.8) */\n-#define FRA_L3MDEV      19\n-#endif\n-\n-#if !HAVE_FRA_UID_RANGE /* linux@622ec2c9d52405973c9f1ca5116eb1c393adfc7d (4.10) */\n-#define FRA_UID_RANGE   20\n-\n-struct fib_rule_uid_range {\n-        __u32 start;\n-        __u32 end;\n-};\n-#endif\n-\n-#if !HAVE_FRA_DPORT_RANGE /* linux@1b71af6053af1bd2f849e9fda4f71c1e3f145dcf, bfff4862653bb96001ab57c1edd6d03f48e5f035 (4.17) */\n-#define FRA_PROTOCOL    21\n-#define FRA_IP_PROTO    22\n-#define FRA_SPORT_RANGE 23\n-#define FRA_DPORT_RANGE 24\n-\n-#undef  FRA_MAX\n-#define FRA_MAX         24\n-\n-struct fib_rule_port_range {\n-        __u16 start;\n-        __u16 end;\n-};\n-#endif\ndiff --git a/src/basic/missing_fou.h b/src/basic/missing_fou.h\ndeleted file mode 100644\nindex d8c743577cd..00000000000\n--- a/src/basic/missing_fou.h\n+++ /dev/null\n@@ -1,55 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1+ */\n-#pragma once\n-\n-#if !HAVE_LINUX_FOU_H /* linux@23461551c00628c3f3fe9cf837bf53cf8f212b63 (3.18) */\n-\n-#define FOU_GENL_NAME           \"fou\"\n-#define FOU_GENL_VERSION        0x1\n-\n-enum {\n-        FOU_ATTR_UNSPEC,\n-        FOU_ATTR_PORT,                  /* u16 */\n-        FOU_ATTR_AF,                    /* u8 */\n-        FOU_ATTR_IPPROTO,               /* u8 */\n-        FOU_ATTR_TYPE,                  /* u8 */\n-        FOU_ATTR_REMCSUM_NOPARTIAL,     /* flag */\n-\n-        __FOU_ATTR_MAX,\n-};\n-\n-#define FOU_ATTR_MAX                (__FOU_ATTR_MAX - 1)\n-\n-enum {\n-        FOU_CMD_UNSPEC,\n-        FOU_CMD_ADD,\n-        FOU_CMD_DEL,\n-        FOU_CMD_GET,\n-\n-        __FOU_CMD_MAX,\n-};\n-\n-enum {\n-        FOU_ENCAP_UNSPEC,\n-        FOU_ENCAP_DIRECT,\n-        FOU_ENCAP_GUE,\n-};\n-\n-#define FOU_CMD_MAX        (__FOU_CMD_MAX - 1)\n-\n-#else\n-\n-#if !HAVE_FOU_ATTR_REMCSUM_NOPARTIAL /* linux@fe881ef11cf0220f118816181930494d484c4883 (4.0) */\n-#define FOU_ATTR_REMCSUM_NOPARTIAL 5\n-\n-#undef  FOU_ATTR_MAX\n-#define FOU_ATTR_MAX               5\n-#endif\n-\n-#if !HAVE_FOU_CMD_GET /* linux@7a6c8c34e5b71ac50e39588e20b39494a9e1d8e5 (4.1) */\n-#define FOU_CMD_GET 3\n-\n-#undef  FOU_CMD_MAX\n-#define FOU_CMD_MAX 3\n-#endif\n-\n-#endif\ndiff --git a/src/basic/missing_if_bridge.h b/src/basic/missing_if_bridge.h\ndeleted file mode 100644\nindex 9306062fc2c..00000000000\n--- a/src/basic/missing_if_bridge.h\n+++ /dev/null\n@@ -1,21 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1+ */\n-#pragma once\n-\n-#if !HAVE_IFLA_BRIDGE_VLAN_TUNNEL_INFO /* linux@b3c7ef0adadc5768e0baa786213c6bd1ce521a77 (4.11) */\n-#define IFLA_BRIDGE_VLAN_TUNNEL_INFO 3\n-\n-#undef  IFLA_BRIDGE_MAX\n-#define IFLA_BRIDGE_MAX              3\n-#endif\n-\n-#ifndef BRIDGE_VLAN_INFO_RANGE_BEGIN\n-#define BRIDGE_VLAN_INFO_RANGE_BEGIN (1<<3) /* VLAN is start of vlan range */\n-#endif\n-\n-#ifndef BRIDGE_VLAN_INFO_RANGE_END\n-#define BRIDGE_VLAN_INFO_RANGE_END   (1<<4) /* VLAN is end of vlan range */\n-#endif\n-\n-#ifndef BRIDGE_VLAN_INFO_BRENTRY\n-#define BRIDGE_VLAN_INFO_BRENTRY     (1<<5) /* Global bridge VLAN entry */\n-#endif\ndiff --git a/src/basic/missing_if_link.h b/src/basic/missing_if_link.h\ndeleted file mode 100644\nindex 761797f56a4..00000000000\n--- a/src/basic/missing_if_link.h\n+++ /dev/null\n@@ -1,393 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1+ */\n-#pragma once\n-\n-#if !HAVE_IFLA_INET6_ADDR_GEN_MODE /* linux@bc91b0f07ada5535427373a4e2050877bcc12218 (3.17) */\n-#define IFLA_INET6_ADDR_GEN_MODE 8\n-\n-#undef  IFLA_INET6_MAX\n-#define IFLA_INET6_MAX           8\n-\n-enum in6_addr_gen_mode {\n-        IN6_ADDR_GEN_MODE_EUI64,\n-        IN6_ADDR_GEN_MODE_NONE,\n-        IN6_ADDR_GEN_MODE_STABLE_PRIVACY,\n-        IN6_ADDR_GEN_MODE_RANDOM,\n-};\n-#else\n-#if !HAVE_IN6_ADDR_GEN_MODE_STABLE_PRIVACY /* linux@622c81d57b392cc9be836670eb464a4dfaa9adfe (4.1) */\n-#define IN6_ADDR_GEN_MODE_STABLE_PRIVACY 2\n-#endif\n-#if !HAVE_IN6_ADDR_GEN_MODE_RANDOM /* linux@cc9da6cc4f56e05cc9e591459fe0192727ff58b3 (4.5) */\n-#define IN6_ADDR_GEN_MODE_RANDOM         3\n-#endif\n-#endif /* !HAVE_IFLA_INET6_ADDR_GEN_MODE */\n-\n-#if !HAVE_IFLA_IPVLAN_MODE /* linux@2ad7bf3638411cb547f2823df08166c13ab04269 (3.19) */\n-enum {\n-        IFLA_IPVLAN_UNSPEC,\n-        IFLA_IPVLAN_MODE,\n-        IFLA_IPVLAN_FLAGS,\n-        __IFLA_IPVLAN_MAX\n-};\n-#define IFLA_IPVLAN_MAX (__IFLA_IPVLAN_MAX - 1)\n-enum ipvlan_mode {\n-        IPVLAN_MODE_L2 = 0,\n-        IPVLAN_MODE_L3,\n-        IPVLAN_MODE_L3S,\n-        IPVLAN_MODE_MAX\n-};\n-#else\n-#if !HAVE_IPVLAN_MODE_L3S /* linux@4fbae7d83c98c30efcf0a2a2ac55fbb75ef5a1a5 (4.9) */\n-#define IPVLAN_MODE_L3S   2\n-#define IPVLAN_MODE_MAX   3\n-#endif\n-#if !HAVE_IFLA_IPVLAN_FLAGS /* linux@a190d04db93710ae166749055b6985397c6d13f5 (4.15) */\n-#define IFLA_IPVLAN_FLAGS 2\n-\n-#undef  IFLA_IPVLAN_MAX\n-#define IFLA_IPVLAN_MAX   2\n-#endif\n-#endif /* !HAVE_IFLA_IPVLAN_MODE */\n-\n-/* linux@a190d04db93710ae166749055b6985397c6d13f5 (4.15) */\n-#ifndef IPVLAN_F_PRIVATE\n-#define IPVLAN_F_PRIVATE 0x01\n-#endif\n-\n-/* linux@fe89aa6b250c1011ccf425fbb7998e96bd54263f (4.15) */\n-#ifndef IPVLAN_F_VEPA\n-#define IPVLAN_F_VEPA    0x02\n-#endif\n-\n-#if !HAVE_IFLA_PHYS_PORT_ID /* linux@66cae9ed6bc46b8cc57a9693f99f69926f3cc7ef (3.12) */\n-#define IFLA_PHYS_PORT_ID       34\n-#endif\n-#if !HAVE_IFLA_CARRIER_CHANGES /* linux@2d3b479df41a10e2f41f9259fcba775bd34de6e4 (3.15) */\n-#define IFLA_CARRIER_CHANGES    35\n-#endif\n-#if !HAVE_IFLA_PHYS_SWITCH_ID /* linux@82f2841291cfaf4d225aa1766424280254d3e3b2 (3.19) */\n-#define IFLA_PHYS_SWITCH_ID     36\n-#endif\n-#if !HAVE_IFLA_LINK_NETNSID /* linux@d37512a277dfb2cef8a578e25a3246f61399a55a (4.0) */\n-#define IFLA_LINK_NETNSID       37\n-#endif\n-#if !HAVE_IFLA_PHYS_PORT_NAME /* linux@db24a9044ee191c397dcd1c6574f56d67d7c8df5 (4.1) */\n-#define IFLA_PHYS_PORT_NAME     38\n-#endif\n-#if !HAVE_IFLA_PROTO_DOWN /* linux@88d6378bd6c096cb8440face3ae3f33d55a2e6e4 (4.3) */\n-#define IFLA_PROTO_DOWN         39\n-#endif\n-#if !HAVE_IFLA_GSO_MAX_SIZE /* linux@c70ce028e834f8e51306217dbdbd441d851c64d3 (4.6) */\n-#define IFLA_GSO_MAX_SEGS       40\n-#define IFLA_GSO_MAX_SIZE       41\n-#endif\n-#if !HAVE_IFLA_PAD /* linux@18402843bf88c2e9674e1a3a05c73b7d9b09ee05 (4.7) */\n-#define IFLA_PAD                42\n-#endif\n-#if !HAVE_IFLA_XDP /* linux@d1fdd9138682e0f272beee0cb08b6328c5478b26 (4.8) */\n-#define IFLA_XDP                43\n-#endif\n-#if !HAVE_IFLA_EVENT /* linux@3d3ea5af5c0b382bc9d9aed378fd814fb5d4a011 (4.13) */\n-#define IFLA_EVENT              44\n-#endif\n-#if !HAVE_IFLA_IF_NETNSID /* linux@6621dd29eb9b5e6774ec7a9a75161352fdea47fc, 79e1ad148c844f5c8b9d76b36b26e3886dca95ae (4.15) */\n-#define IFLA_IF_NETNSID         45\n-#define IFLA_NEW_NETNSID        46\n-#endif\n-#if !HAVE_IFLA_TARGET_NETNSID /* linux@19d8f1ad12fd746e60707a58d954980013c7a35a (4.20) */\n-#define IFLA_TARGET_NETNSID IFLA_IF_NETNSID\n-#endif\n-#if !HAVE_IFLA_NEW_IFINDEX /* linux@b2d3bcfa26a7a8de41f358a6cae8b848673b3c6e, 38e01b30563a5b5ade7b54e5d739d16a2b02fe82 (4.16) */\n-#define IFLA_CARRIER_UP_COUNT   47\n-#define IFLA_CARRIER_DOWN_COUNT 48\n-#define IFLA_NEW_IFINDEX        49\n-#endif\n-#if !HAVE_IFLA_MAX_MTU /* linux@3e7a50ceb11ea75c27e944f1a01e478fd62a2d8d (4.19) */\n-#define IFLA_MIN_MTU            50\n-#define IFLA_MAX_MTU            51\n-\n-#undef  IFLA_MAX\n-#define IFLA_MAX                51\n-#endif\n-\n-#if !HAVE_IFLA_BOND_MODE /* linux@90af231106c0b8d223c27d35464af95cb3d9cacf (3.13) */\n-#define IFLA_BOND_MODE              1\n-#endif\n-#if !HAVE_IFLA_BOND_ACTIVE_SLAVE /* linux@ec76aa49855f6d6fea5e01de179fb57dd47c619d (3.13) */\n-#define IFLA_BOND_ACTIVE_SLAVE      2\n-#endif\n-#if !HAVE_IFLA_BOND_AD_INFO /* linux@4ee7ac7526d4a9413cafa733d824edfe49fdcc46 (3.14) */\n-#define IFLA_BOND_MIIMON            3\n-#define IFLA_BOND_UPDELAY           4\n-#define IFLA_BOND_DOWNDELAY         5\n-#define IFLA_BOND_USE_CARRIER       6\n-#define IFLA_BOND_ARP_INTERVAL      7\n-#define IFLA_BOND_ARP_IP_TARGET     8\n-#define IFLA_BOND_ARP_VALIDATE      9\n-#define IFLA_BOND_ARP_ALL_TARGETS   10\n-#define IFLA_BOND_PRIMARY           11\n-#define IFLA_BOND_PRIMARY_RESELECT  12\n-#define IFLA_BOND_FAIL_OVER_MAC     13\n-#define IFLA_BOND_XMIT_HASH_POLICY  14\n-#define IFLA_BOND_RESEND_IGMP       15\n-#define IFLA_BOND_NUM_PEER_NOTIF    16\n-#define IFLA_BOND_ALL_SLAVES_ACTIVE 17\n-#define IFLA_BOND_MIN_LINKS         18\n-#define IFLA_BOND_LP_INTERVAL       19\n-#define IFLA_BOND_PACKETS_PER_SLAVE 20\n-#define IFLA_BOND_AD_LACP_RATE      21\n-#define IFLA_BOND_AD_SELECT         22\n-#define IFLA_BOND_AD_INFO           23\n-#endif\n-#if !HAVE_IFLA_BOND_AD_ACTOR_SYSTEM /* linux@171a42c38c6e1a5a076d6276e94e55a0b5b7868c (4.2) */\n-#define IFLA_BOND_AD_ACTOR_SYS_PRIO 24\n-#define IFLA_BOND_AD_USER_PORT_KEY  25\n-#define IFLA_BOND_AD_ACTOR_SYSTEM   26\n-#endif\n-#if !HAVE_IFLA_BOND_TLB_DYNAMIC_LB /* linux@0f7bffd9e512b77279bbce704fad3cb1d6887958 (4.3) */\n-#define IFLA_BOND_TLB_DYNAMIC_LB    27\n-\n-#undef  IFLA_BOND_MAX\n-#define IFLA_BOND_MAX               27\n-#endif\n-\n-#if !HAVE_IFLA_VXLAN_UDP_ZERO_CSUM6_RX /* linux@359a0ea9875ef4f32c8425bbe1ae348e1fd2ed2a (3.16) */\n-#define IFLA_VXLAN_UDP_CSUM          18\n-#define IFLA_VXLAN_UDP_ZERO_CSUM6_TX 19\n-#define IFLA_VXLAN_UDP_ZERO_CSUM6_RX 20\n-#endif\n-#if !HAVE_IFLA_VXLAN_REMCSUM_NOPARTIAL /* linux@dfd8645ea1bd91277f841e74c33e1f4dbbede808..0ace2ca89cbd6bcdf2b9d2df1fa0fa24ea9d1653 (4.0) */\n-#define IFLA_VXLAN_REMCSUM_TX        21\n-#define IFLA_VXLAN_REMCSUM_RX        22\n-#define IFLA_VXLAN_GBP               23\n-#define IFLA_VXLAN_REMCSUM_NOPARTIAL 24\n-#endif\n-#if !HAVE_IFLA_VXLAN_COLLECT_METADATA /* linux@f8a9b1bc1b238eed9987da747a0e52f5bb009980 (4.3) */\n-#define IFLA_VXLAN_COLLECT_METADATA  25\n-#endif\n-#if !HAVE_IFLA_VXLAN_LABEL /* linux@e7f70af111f086a20800ad2e17f544b2e3e0f375 (4.6) */\n-#define IFLA_VXLAN_LABEL             26\n-#endif\n-#if !HAVE_IFLA_VXLAN_GPE /* linux@e1e5314de08ba6003b358125eafc9ad9e75a950c (4.7) */\n-#define IFLA_VXLAN_GPE               27\n-#endif\n-#if !HAVE_IFLA_VXLAN_TTL_INHERIT /* linux@72f6d71e491e6ce269b564865b21fab0a4402dd3 (4.18) */\n-#define IFLA_VXLAN_TTL_INHERIT       28\n-\n-#undef  IFLA_VXLAN_MAX\n-#define IFLA_VXLAN_MAX               28\n-#endif\n-\n-#if !HAVE_IFLA_GENEVE_TOS /* linux@2d07dc79fe04a43d82a346ced6bbf07bdb523f1b..d89511251f6519599b109dc6cda87a6ab314ed8c (4.2) */\n-enum {\n-        IFLA_GENEVE_UNSPEC,\n-        IFLA_GENEVE_ID,\n-        IFLA_GENEVE_REMOTE,\n-        IFLA_GENEVE_TTL,\n-        IFLA_GENEVE_TOS,\n-        IFLA_GENEVE_PORT,        /* destination port */\n-        IFLA_GENEVE_COLLECT_METADATA,\n-        IFLA_GENEVE_REMOTE6,\n-        IFLA_GENEVE_UDP_CSUM,\n-        IFLA_GENEVE_UDP_ZERO_CSUM6_TX,\n-        IFLA_GENEVE_UDP_ZERO_CSUM6_RX,\n-        IFLA_GENEVE_LABEL,\n-        IFLA_GENEVE_TTL_INHERIT,\n-        __IFLA_GENEVE_MAX\n-};\n-#define IFLA_GENEVE_MAX        (__IFLA_GENEVE_MAX - 1)\n-#else\n-#if !HAVE_IFLA_GENEVE_COLLECT_METADATA /* linux@e305ac6cf5a1e1386aedce7ef9cb773635d5845c (4.3) */\n-#define IFLA_GENEVE_PORT              5\n-#define IFLA_GENEVE_COLLECT_METADATA  6\n-#endif\n-#if !HAVE_IFLA_GENEVE_REMOTE6 /* linux@8ed66f0e8235118a31720acdab3bbbe9debd0f6a (4.4) */\n-#define IFLA_GENEVE_REMOTE6           7\n-#endif\n-#if !HAVE_IFLA_GENEVE_UDP_ZERO_CSUM6_RX /* linux@abe492b4f50c3ae2ebcfaa2f5c16176aebaa1c68 (4.5) */\n-#define IFLA_GENEVE_UDP_CSUM          8\n-#define IFLA_GENEVE_UDP_ZERO_CSUM6_TX 9\n-#define IFLA_GENEVE_UDP_ZERO_CSUM6_RX 10\n-#endif\n-#if !HAVE_IFLA_GENEVE_LABEL /* linux@8eb3b99554b82da968d1fbc00df9f3156c5e2d63 (4.6) */\n-#define IFLA_GENEVE_LABEL             11\n-#endif\n-#if !HAVE_IFLA_GENEVE_TTL_INHERIT /* linux@52d0d404d39dd9eac71a181615d6ca15e23d8e38 (4.20) */\n-#define IFLA_GENEVE_TTL_INHERIT       12\n-\n-#undef  IFLA_GENEVE_MAX\n-#define IFLA_GENEVE_MAX               12\n-#endif\n-#endif\n-\n-#if !HAVE_IFLA_BR_MAX_AGE /* linux@e5c3ea5c668033b303e7ac835d7d91da32d97958 (3.18) */\n-enum {\n-        IFLA_BR_UNSPEC,\n-        IFLA_BR_FORWARD_DELAY,\n-        IFLA_BR_HELLO_TIME,\n-        IFLA_BR_MAX_AGE,\n-        IFLA_BR_AGEING_TIME,\n-        IFLA_BR_STP_STATE,\n-        IFLA_BR_PRIORITY,\n-        IFLA_BR_VLAN_FILTERING,\n-        IFLA_BR_VLAN_PROTOCOL,\n-        IFLA_BR_GROUP_FWD_MASK,\n-        IFLA_BR_ROOT_ID,\n-        IFLA_BR_BRIDGE_ID,\n-        IFLA_BR_ROOT_PORT,\n-        IFLA_BR_ROOT_PATH_COST,\n-        IFLA_BR_TOPOLOGY_CHANGE,\n-        IFLA_BR_TOPOLOGY_CHANGE_DETECTED,\n-        IFLA_BR_HELLO_TIMER,\n-        IFLA_BR_TCN_TIMER,\n-        IFLA_BR_TOPOLOGY_CHANGE_TIMER,\n-        IFLA_BR_GC_TIMER,\n-        IFLA_BR_GROUP_ADDR,\n-        IFLA_BR_FDB_FLUSH,\n-        IFLA_BR_MCAST_ROUTER,\n-        IFLA_BR_MCAST_SNOOPING,\n-        IFLA_BR_MCAST_QUERY_USE_IFADDR,\n-        IFLA_BR_MCAST_QUERIER,\n-        IFLA_BR_MCAST_HASH_ELASTICITY,\n-        IFLA_BR_MCAST_HASH_MAX,\n-        IFLA_BR_MCAST_LAST_MEMBER_CNT,\n-        IFLA_BR_MCAST_STARTUP_QUERY_CNT,\n-        IFLA_BR_MCAST_LAST_MEMBER_INTVL,\n-        IFLA_BR_MCAST_MEMBERSHIP_INTVL,\n-        IFLA_BR_MCAST_QUERIER_INTVL,\n-        IFLA_BR_MCAST_QUERY_INTVL,\n-        IFLA_BR_MCAST_QUERY_RESPONSE_INTVL,\n-        IFLA_BR_MCAST_STARTUP_QUERY_INTVL,\n-        IFLA_BR_NF_CALL_IPTABLES,\n-        IFLA_BR_NF_CALL_IP6TABLES,\n-        IFLA_BR_NF_CALL_ARPTABLES,\n-        IFLA_BR_VLAN_DEFAULT_PVID,\n-        IFLA_BR_PAD,\n-        IFLA_BR_VLAN_STATS_ENABLED,\n-        IFLA_BR_MCAST_STATS_ENABLED,\n-        IFLA_BR_MCAST_IGMP_VERSION,\n-        IFLA_BR_MCAST_MLD_VERSION,\n-        IFLA_BR_VLAN_STATS_PER_PORT,\n-        __IFLA_BR_MAX,\n-};\n-\n-#define IFLA_BR_MAX        (__IFLA_BR_MAX - 1)\n-#else\n-#if !HAVE_IFLA_BR_PRIORITY /* linux@af615762e972be0c66cf1d156ca4fac13b93c0b0 (4.1) */\n-#define IFLA_BR_AGEING_TIME                4\n-#define IFLA_BR_STP_STATE                  5\n-#define IFLA_BR_PRIORITY                   6\n-#endif\n-#if !HAVE_IFLA_BR_VLAN_PROTOCOL /* linux@a7854037da006a7472c48773e3190db55217ec9b, d2d427b3927bd7a0348fc7f323d0e291f79a2779 (4.3) */\n-#define IFLA_BR_VLAN_FILTERING             7\n-#define IFLA_BR_VLAN_PROTOCOL              8\n-#endif\n-#if !HAVE_IFLA_BR_VLAN_DEFAULT_PVID /* linux@7910228b6bb35f3c8e0bc72a8d84c29616cb1b90..0f963b7592ef9e054974b6672b86ec1edd84b4bc (4.4) */\n-#define IFLA_BR_GROUP_FWD_MASK             9\n-#define IFLA_BR_ROOT_ID                    10\n-#define IFLA_BR_BRIDGE_ID                  11\n-#define IFLA_BR_ROOT_PORT                  12\n-#define IFLA_BR_ROOT_PATH_COST             13\n-#define IFLA_BR_TOPOLOGY_CHANGE            14\n-#define IFLA_BR_TOPOLOGY_CHANGE_DETECTED   15\n-#define IFLA_BR_HELLO_TIMER                16\n-#define IFLA_BR_TCN_TIMER                  17\n-#define IFLA_BR_TOPOLOGY_CHANGE_TIMER      18\n-#define IFLA_BR_GC_TIMER                   19\n-#define IFLA_BR_GROUP_ADDR                 20\n-#define IFLA_BR_FDB_FLUSH                  21\n-#define IFLA_BR_MCAST_ROUTER               22\n-#define IFLA_BR_MCAST_SNOOPING             23\n-#define IFLA_BR_MCAST_QUERY_USE_IFADDR     24\n-#define IFLA_BR_MCAST_QUERIER              25\n-#define IFLA_BR_MCAST_HASH_ELASTICITY      26\n-#define IFLA_BR_MCAST_HASH_MAX             27\n-#define IFLA_BR_MCAST_LAST_MEMBER_CNT      28\n-#define IFLA_BR_MCAST_STARTUP_QUERY_CNT    29\n-#define IFLA_BR_MCAST_LAST_MEMBER_INTVL    30\n-#define IFLA_BR_MCAST_MEMBERSHIP_INTVL     31\n-#define IFLA_BR_MCAST_QUERIER_INTVL        32\n-#define IFLA_BR_MCAST_QUERY_INTVL          33\n-#define IFLA_BR_MCAST_QUERY_RESPONSE_INTVL 34\n-#define IFLA_BR_MCAST_STARTUP_QUERY_INTVL  35\n-#define IFLA_BR_NF_CALL_IPTABLES           36\n-#define IFLA_BR_NF_CALL_IP6TABLES          37\n-#define IFLA_BR_NF_CALL_ARPTABLES          38\n-#define IFLA_BR_VLAN_DEFAULT_PVID          39\n-#endif\n-#if !HAVE_IFLA_BR_VLAN_STATS_ENABLED /* linux@12a0faa3bd76157b9dc096758d6818ff535e4586, 6dada9b10a0818ba72c249526a742c8c41274a73 (4.7) */\n-#define IFLA_BR_PAD                        40\n-#define IFLA_BR_VLAN_STATS_ENABLED         41\n-#endif\n-#if !HAVE_IFLA_BR_MCAST_STATS_ENABLED /* linux@1080ab95e3c7bdd77870e209aff83c763fdcf439 (4.8) */\n-#define IFLA_BR_MCAST_STATS_ENABLED        42\n-#endif\n-#if !HAVE_IFLA_BR_MCAST_MLD_VERSION /* linux@5e9235853d652a295d5f56cb8652950b6b5bf56b, aa2ae3e71c74cc00ec22f133dc900b3817415785 (4.10) */\n-#define IFLA_BR_MCAST_IGMP_VERSION         43\n-#define IFLA_BR_MCAST_MLD_VERSION          44\n-#endif\n-#if !HAVE_IFLA_BR_VLAN_STATS_PER_PORT /* linux@9163a0fc1f0c0980f117cc25f4fa6ba9b0750a36 (4.20) */\n-#define IFLA_BR_VLAN_STATS_PER_PORT        45\n-\n-#undef  IFLA_BR_MAX\n-#define IFLA_BR_MAX                        45\n-#endif\n-#endif\n-\n-#if !HAVE_IFLA_BRPORT_LEARNING_SYNC /* linux@958501163ddd6ea22a98f94fa0e7ce6d4734e5c4, efacacdaf7cb5a0592ed772e3731636b2742e34a (3.19)*/\n-#define IFLA_BRPORT_PROXYARP            10\n-#define IFLA_BRPORT_LEARNING_SYNC       11\n-#endif\n-#if !HAVE_IFLA_BRPORT_PROXYARP_WIFI /* linux@842a9ae08a25671db3d4f689eed68b4d64be15b5 (4.1) */\n-#define IFLA_BRPORT_PROXYARP_WIFI       12\n-#endif\n-#if !HAVE_IFLA_BRPORT_MULTICAST_ROUTER /* linux@4ebc7660ab4559cad10b6595e05f70562bb26dc5..5d6ae479ab7ddf77bb22bdf739268581453ff886 (4.4) */\n-#define IFLA_BRPORT_ROOT_ID             13\n-#define IFLA_BRPORT_BRIDGE_ID           14\n-#define IFLA_BRPORT_DESIGNATED_PORT     15\n-#define IFLA_BRPORT_DESIGNATED_COST     16\n-#define IFLA_BRPORT_ID                  17\n-#define IFLA_BRPORT_NO                  18\n-#define IFLA_BRPORT_TOPOLOGY_CHANGE_ACK 19\n-#define IFLA_BRPORT_CONFIG_PENDING      20\n-#define IFLA_BRPORT_MESSAGE_AGE_TIMER   21\n-#define IFLA_BRPORT_FORWARD_DELAY_TIMER 22\n-#define IFLA_BRPORT_HOLD_TIMER          23\n-#define IFLA_BRPORT_FLUSH               24\n-#define IFLA_BRPORT_MULTICAST_ROUTER    25\n-#endif\n-#if !HAVE_IFLA_BRPORT_PAD /* linux@12a0faa3bd76157b9dc096758d6818ff535e4586 (4.7) */\n-#define IFLA_BRPORT_PAD                 26\n-#endif\n-#if !HAVE_IFLA_BRPORT_MCAST_FLOOD /* linux@b6cb5ac8331b6bcfe9ce38c7f7f58db6e1d6270a (4.9) */\n-#define IFLA_BRPORT_MCAST_FLOOD         27\n-#endif\n-#if !HAVE_IFLA_BRPORT_VLAN_TUNNEL /* linux@6db6f0eae6052b70885562e1733896647ec1d807, b3c7ef0adadc5768e0baa786213c6bd1ce521a77 (4.11) */\n-#define IFLA_BRPORT_MCAST_TO_UCAST      28\n-#define IFLA_BRPORT_VLAN_TUNNEL         29\n-#endif\n-#if !HAVE_IFLA_BRPORT_BCAST_FLOOD /* linux@99f906e9ad7b6e79ffeda30f45906a8448b9d6a2 (4.12) */\n-#define IFLA_BRPORT_BCAST_FLOOD         30\n-#endif\n-#if !HAVE_IFLA_BRPORT_NEIGH_SUPPRESS /* linux@5af48b59f35cf712793badabe1a574a0d0ce3bd3, 821f1b21cabb46827ce39ddf82e2789680b5042a (4.15) */\n-#define IFLA_BRPORT_GROUP_FWD_MASK      31\n-#define IFLA_BRPORT_NEIGH_SUPPRESS      32\n-#endif\n-#if !HAVE_IFLA_BRPORT_ISOLATED /* linux@7d850abd5f4edb1b1ca4b4141a4453305736f564 (4.18) */\n-#define IFLA_BRPORT_ISOLATED            33\n-#endif\n-#if !HAVE_IFLA_BRPORT_BACKUP_PORT /* linux@2756f68c314917d03eb348084edb08bb929139d9 (4.19) */\n-#define IFLA_BRPORT_BACKUP_PORT         34\n-\n-#undef  IFLA_BRPORT_MAX\n-#define IFLA_BRPORT_MAX                 34\n-#endif\n-\n-#if !HAVE_IFLA_VRF_TABLE /* linux@4e3c89920cd3a6cfce22c6f537690747c26128dd (4.3) */\n-enum {\n-        IFLA_VRF_UNSPEC,\n-        IFLA_VRF_TABLE,\n-        __IFLA_VRF_MAX\n-};\n-#define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1)\n-#endif\ndiff --git a/src/basic/missing_if_tunnel.h b/src/basic/missing_if_tunnel.h\ndeleted file mode 100644\nindex f51fdd1ed78..00000000000\n--- a/src/basic/missing_if_tunnel.h\n+++ /dev/null\n@@ -1,59 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1+ */\n-#pragma once\n-\n-#if !HAVE_IFLA_VTI_FWMARK /* linux@0a473b82cb23e7a35c4be6e9765c8487a65e8f55 (4.12) */\n-#define IFLA_VTI_FWMARK 6\n-\n-#undef  IFLA_VTI_MAX\n-#define IFLA_VTI_MAX    6\n-#endif\n-\n-#if !HAVE_IFLA_IPTUN_ENCAP_DPORT /* linux@56328486539ddd07cbaafec7a542a2c8a3043623 (3.18)*/\n-#define IFLA_IPTUN_ENCAP_TYPE       15\n-#define IFLA_IPTUN_ENCAP_FLAGS      16\n-#define IFLA_IPTUN_ENCAP_SPORT      17\n-#define IFLA_IPTUN_ENCAP_DPORT      18\n-#endif\n-\n-#if !HAVE_IFLA_IPTUN_COLLECT_METADATA /* linux@cfc7381b3002756b1dcada32979e942aa3126e31 (4.9) */\n-#define IFLA_IPTUN_COLLECT_METADATA 19\n-#endif\n-\n-#if !HAVE_IFLA_IPTUN_FWMARK /* linux@0a473b82cb23e7a35c4be6e9765c8487a65e8f55 (4.12) */\n-#define IFLA_IPTUN_FWMARK           20\n-\n-#undef  IFLA_IPTUN_MAX\n-#define IFLA_IPTUN_MAX              20\n-#endif\n-\n-#if !HAVE_IFLA_GRE_ENCAP_DPORT /* linux@4565e9919cda747815547e2e5d7b78f15efbffdf (3.18) */\n-#define IFLA_GRE_ENCAP_TYPE       14\n-#define IFLA_GRE_ENCAP_FLAGS      15\n-#define IFLA_GRE_ENCAP_SPORT      16\n-#define IFLA_GRE_ENCAP_DPORT      17\n-#endif\n-\n-#if !HAVE_IFLA_GRE_COLLECT_METADATA /* linux@2e15ea390e6f4466655066d97e22ec66870a042c (4.3) */\n-#define IFLA_GRE_COLLECT_METADATA 18\n-#endif\n-\n-#if !HAVE_IFLA_GRE_IGNORE_DF /* linux@22a59be8b7693eb2d0897a9638f5991f2f8e4ddd (4.8) */\n-#define IFLA_GRE_IGNORE_DF        19\n-#endif\n-\n-#if !HAVE_IFLA_GRE_FWMARK /* linux@0a473b82cb23e7a35c4be6e9765c8487a65e8f55 (4.12) */\n-#define IFLA_GRE_FWMARK           20\n-#endif\n-\n-#if !HAVE_IFLA_GRE_ERSPAN_INDEX /* linux@84e54fe0a5eaed696dee4019c396f8396f5a908b (4.14) */\n-#define IFLA_GRE_ERSPAN_INDEX     21\n-#endif\n-\n-#if !HAVE_IFLA_GRE_ERSPAN_HWID /* linux@f551c91de262ba36b20c3ac19538afb4f4507441 (4.16) */\n-#define IFLA_GRE_ERSPAN_VER       22\n-#define IFLA_GRE_ERSPAN_DIR       23\n-#define IFLA_GRE_ERSPAN_HWID      24\n-\n-#undef  IFLA_GRE_MAX\n-#define IFLA_GRE_MAX              24\n-#endif\ndiff --git a/src/basic/missing_network.h b/src/basic/missing_network.h\nindex 80ef13fd3ea..257879405c9 100644\n--- a/src/basic/missing_network.h\n+++ b/src/basic/missing_network.h\n@@ -1,158 +1,22 @@\n /* SPDX-License-Identifier: LGPL-2.1+ */\n #pragma once\n \n-#include <linux/loop.h>\n-#include <linux/rtnetlink.h>\n-#include <net/ethernet.h>\n-\n-#include \"missing_ethtool.h\"\n-#include \"missing_fib_rules.h\"\n-#include \"missing_fou.h\"\n-#include \"missing_if_bridge.h\"\n-#include \"missing_if_link.h\"\n-#include \"missing_if_tunnel.h\"\n-#include \"missing_vxcan.h\"\n-\n-/* if.h */\n-/* The following two defines are actually available in the kernel headers for longer, but we define them here anyway,\n- * since that makes it easier to use them in conjunction with the glibc net/if.h header which conflicts with\n- * linux/if.h. */\n-#ifndef IF_OPER_UNKNOWN\n-#define IF_OPER_UNKNOWN 0\n-#endif\n-\n-#ifndef IF_OPER_UP\n-#define IF_OPER_UP 6\n-#endif\n-\n-#ifndef IFF_LOWER_UP\n-#define IFF_LOWER_UP 0x10000\n-#endif\n-\n-#ifndef IFF_DORMANT\n-#define IFF_DORMANT 0x20000\n-#endif\n-\n-/* if_addr.h */\n-#if !HAVE_IFA_FLAGS\n-#define IFA_FLAGS 8\n-#endif\n-\n-#ifndef IFA_F_MANAGETEMPADDR\n-#define IFA_F_MANAGETEMPADDR 0x100\n-#endif\n-\n-#ifndef IFA_F_NOPREFIXROUTE\n-#define IFA_F_NOPREFIXROUTE 0x200\n-#endif\n-\n-#ifndef IFA_F_MCAUTOJOIN\n-#define IFA_F_MCAUTOJOIN 0x400\n-#endif\n-\n-/* if_arp.h */\n-#ifndef ARPHRD_IP6GRE\n-#define ARPHRD_IP6GRE 823\n-#endif\n-\n-/* if_bonding.h */\n-#ifndef BOND_XMIT_POLICY_ENCAP23\n-#define BOND_XMIT_POLICY_ENCAP23 3\n-#endif\n-\n-#ifndef BOND_XMIT_POLICY_ENCAP34\n-#define BOND_XMIT_POLICY_ENCAP34 4\n-#endif\n-\n-/* if_tun.h */\n-#ifndef IFF_MULTI_QUEUE\n-#define IFF_MULTI_QUEUE 0x100\n-#endif\n-\n-/* in6.h */\n+/* linux/in6.h or netinet/in.h */\n #ifndef IPV6_UNICAST_IF\n #define IPV6_UNICAST_IF 76\n #endif\n \n-/* ip.h */\n+/* Not exposed but defined at include/net/ip.h */\n #ifndef IPV4_MIN_MTU\n #define IPV4_MIN_MTU 68\n #endif\n \n-/* ipv6.h */\n+/* linux/ipv6.h */\n #ifndef IPV6_MIN_MTU\n #define IPV6_MIN_MTU 1280\n #endif\n \n-/* loop.h */\n-#if !HAVE_LO_FLAGS_PARTSCAN\n-#define LO_FLAGS_PARTSCAN 8\n-#endif\n-\n-#ifndef LOOP_CTL_REMOVE\n-#define LOOP_CTL_REMOVE 0x4C81\n-#endif\n-\n-#ifndef LOOP_CTL_GET_FREE\n-#define LOOP_CTL_GET_FREE 0x4C82\n-#endif\n-\n-/* netdevice.h */\n-#ifndef NET_ADDR_PERM\n-#define NET_ADDR_PERM 0\n-#endif\n-\n-#ifndef NET_ADDR_RANDOM\n-#define NET_ADDR_RANDOM 1\n-#endif\n-\n-#ifndef NET_ADDR_STOLEN\n-#define NET_ADDR_STOLEN 2\n-#endif\n-\n-#ifndef NET_ADDR_SET\n-#define NET_ADDR_SET 3\n-#endif\n-\n-#ifndef NET_NAME_UNKNOWN\n-#define NET_NAME_UNKNOWN 0\n-#endif\n-\n-#ifndef NET_NAME_ENUM\n-#define NET_NAME_ENUM 1\n-#endif\n-\n-#ifndef NET_NAME_PREDICTABLE\n-#define NET_NAME_PREDICTABLE 2\n-#endif\n-\n-#ifndef NET_NAME_USER\n-#define NET_NAME_USER 3\n-#endif\n-\n-#ifndef NET_NAME_RENAMED\n-#define NET_NAME_RENAMED 4\n-#endif\n-\n-/* netlink.h */\n-#ifndef NETLINK_LIST_MEMBERSHIPS /* b42be38b2778eda2237fc759e55e3b698b05b315 (4.2) */\n-#define NETLINK_LIST_MEMBERSHIPS 9\n-#endif\n-\n-/* rtnetlink.h */\n-#ifndef RTA_PREF\n-#define RTA_PREF 20\n-#endif\n-\n-#ifndef RTAX_QUICKACK\n-#define RTAX_QUICKACK 15\n-#endif\n-\n-#ifndef RTA_EXPIRES\n-#define RTA_EXPIRES 23\n-#endif\n-\n-/* Note that LOOPBACK_IFINDEX is currently not exported by the\n+/* Note that LOOPBACK_IFINDEX is currently not exposed by the\n  * kernel/glibc, but hardcoded internally by the kernel.  However, as\n  * it is exported to userspace indirectly via rtnetlink and the\n  * ioctls, and made use of widely we define it here too, in a way that\ndiff --git a/src/basic/missing_vxcan.h b/src/basic/missing_vxcan.h\ndeleted file mode 100644\nindex be430f708dd..00000000000\n--- a/src/basic/missing_vxcan.h\n+++ /dev/null\n@@ -1,12 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1+ */\n-#pragma once\n-\n-#if !HAVE_LINUX_CAN_VXCAN_H /* linux@a8f820a380a2a06fc4fe1a54159067958f800929 (4.12) */\n-enum {\n-        VXCAN_INFO_UNSPEC,\n-        VXCAN_INFO_PEER,\n-\n-        __VXCAN_INFO_MAX\n-#define VXCAN_INFO_MAX        (__VXCAN_INFO_MAX - 1)\n-};\n-#endif\ndiff --git a/src/core/bpf-devices.c b/src/core/bpf-devices.c\nindex 81e91fcb362..9750c4c6827 100644\n--- a/src/core/bpf-devices.c\n+++ b/src/core/bpf-devices.c\n@@ -1,5 +1,5 @@\n /* SPDX-License-Identifier: LGPL-2.1+ */\n-#include <linux/libbpf.h>\n+#include <linux/bpf_insn.h>\n \n #include \"bpf-devices.h\"\n #include \"bpf-program.h\"\ndiff --git a/src/core/bpf-firewall.c b/src/core/bpf-firewall.c\nindex 2ecce300da1..723c7b4b4e1 100644\n--- a/src/core/bpf-firewall.c\n+++ b/src/core/bpf-firewall.c\n@@ -4,7 +4,7 @@\n #include <assert.h>\n #include <errno.h>\n #include <fcntl.h>\n-#include <linux/libbpf.h>\n+#include <linux/bpf_insn.h>\n #include <net/ethernet.h>\n #include <net/if.h>\n #include <netinet/ip.h>\ndiff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c\nindex 8248ac0f5a5..0c67d1c68f5 100644\n--- a/src/libsystemd/sd-netlink/netlink-types.c\n+++ b/src/libsystemd/sd-netlink/netlink-types.c\n@@ -3,6 +3,7 @@\n #include <netinet/in.h>\n #include <stdint.h>\n #include <sys/socket.h>\n+#include <linux/can/vxcan.h>\n #include <linux/netlink.h>\n #include <linux/rtnetlink.h>\n #include <linux/genetlink.h>\n@@ -10,6 +11,7 @@\n #include <linux/if.h>\n #include <linux/can/netlink.h>\n #include <linux/fib_rules.h>\n+#include <linux/fou.h>\n #include <linux/if_addr.h>\n #include <linux/if_addrlabel.h>\n #include <linux/if_bridge.h>\n@@ -17,14 +19,7 @@\n #include <linux/if_tunnel.h>\n #include <linux/l2tp.h>\n #include <linux/veth.h>\n-\n-#if HAVE_LINUX_FOU_H\n-#include <linux/fou.h>\n-#endif\n-\n-#if HAVE_LINUX_CAN_VXCAN_H\n-#include <linux/can/vxcan.h>\n-#endif\n+#include <linux/wireguard.h>\n \n #include \"macro.h\"\n #include \"missing.h\"\n@@ -32,7 +27,6 @@\n #include \"sd-netlink.h\"\n #include \"string-table.h\"\n #include \"util.h\"\n-#include \"wireguard-netlink.h\"\n \n /* Maximum ARP IP target defined in kernel */\n #define BOND_MAX_ARP_TARGETS    16\ndiff --git a/src/network/netdev/fou-tunnel.h b/src/network/netdev/fou-tunnel.h\nindex 0e3fd7dd766..51eeac41bd2 100644\n--- a/src/network/netdev/fou-tunnel.h\n+++ b/src/network/netdev/fou-tunnel.h\n@@ -1,12 +1,9 @@\n /* SPDX-License-Identifier: LGPL-2.1+ */\n #pragma once\n \n-#if HAVE_LINUX_FOU_H\n #include <linux/fou.h>\n-#endif\n \n #include \"in-addr-util.h\"\n-#include \"missing_fou.h\"\n #include \"netdev/netdev.h\"\n \n typedef enum FooOverUDPEncapType {\ndiff --git a/src/network/netdev/ipvlan.h b/src/network/netdev/ipvlan.h\nindex fb426d37e5d..78f09dbb2d5 100644\n--- a/src/network/netdev/ipvlan.h\n+++ b/src/network/netdev/ipvlan.h\n@@ -3,7 +3,6 @@\n \n #include <linux/if_link.h>\n \n-#include \"missing_if_link.h\"\n #include \"netdev/netdev.h\"\n \n typedef enum IPVlanMode {\ndiff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c\nindex 719b5e4add5..84f6af8578f 100644\n--- a/src/network/netdev/tunnel.c\n+++ b/src/network/netdev/tunnel.c\n@@ -1,15 +1,11 @@\n /* SPDX-License-Identifier: LGPL-2.1+ */\n \n #include <arpa/inet.h>\n-#include <net/if.h>\n+#include <linux/fou.h>\n #include <linux/ip.h>\n #include <linux/if_tunnel.h>\n #include <linux/ip6_tunnel.h>\n \n-#if HAVE_LINUX_FOU_H\n-#include <linux/fou.h>\n-#endif\n-\n #include \"sd-netlink.h\"\n \n #include \"conf-parser.h\"\ndiff --git a/src/network/netdev/vxcan.c b/src/network/netdev/vxcan.c\nindex e8ea70a1edc..c5dd5df51c5 100644\n--- a/src/network/netdev/vxcan.c\n+++ b/src/network/netdev/vxcan.c\n@@ -1,10 +1,7 @@\n /* SPDX-License-Identifier: LGPL-2.1+ */\n \n-#if HAVE_LINUX_CAN_VXCAN_H\n #include <linux/can/vxcan.h>\n-#endif\n \n-#include \"missing.h\"\n #include \"netdev/vxcan.h\"\n \n static int netdev_vxcan_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {\ndiff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c\nindex 5aa10fc4dea..aa7d7be16e2 100644\n--- a/src/network/netdev/wireguard.c\n+++ b/src/network/netdev/wireguard.c\n@@ -23,7 +23,6 @@\n #include \"resolve-private.h\"\n #include \"string-util.h\"\n #include \"strv.h\"\n-#include \"wireguard-netlink.h\"\n #include \"wireguard.h\"\n \n static void resolve_endpoints(NetDev *netdev);\ndiff --git a/src/network/netdev/wireguard.h b/src/network/netdev/wireguard.h\nindex 4ae520c52ba..862f2a99c4c 100644\n--- a/src/network/netdev/wireguard.h\n+++ b/src/network/netdev/wireguard.h\n@@ -2,10 +2,11 @@\n \n typedef struct Wireguard Wireguard;\n \n+#include <linux/wireguard.h>\n+\n #include \"in-addr-util.h\"\n #include \"netdev.h\"\n #include \"socket-util.h\"\n-#include \"wireguard-netlink.h\"\n \n typedef struct WireguardIPmask {\n         uint16_t family;\ndiff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c\nindex 8377623da48..8f9103f1466 100644\n--- a/src/network/networkd-brvlan.c\n+++ b/src/network/networkd-brvlan.c\n@@ -9,7 +9,6 @@\n \n #include \"alloc-util.h\"\n #include \"conf-parser.h\"\n-#include \"missing_if_bridge.h\"\n #include \"netlink-util.h\"\n #include \"networkd-brvlan.h\"\n #include \"networkd-link.h\"\ndiff --git a/src/network/networkd-network.c b/src/network/networkd-network.c\nindex 836776ae849..2c8896530a0 100644\n--- a/src/network/networkd-network.c\n+++ b/src/network/networkd-network.c\n@@ -1,7 +1,6 @@\n /* SPDX-License-Identifier: LGPL-2.1+ */\n \n-#include <ctype.h>\n-#include <net/if.h>\n+#include <linux/netdevice.h>\n \n #include \"alloc-util.h\"\n #include \"conf-files.h\"\n@@ -10,7 +9,6 @@\n #include \"fd-util.h\"\n #include \"hostname-util.h\"\n #include \"in-addr-util.h\"\n-#include \"missing_network.h\"\n #include \"network-internal.h\"\n #include \"networkd-manager.h\"\n #include \"networkd-network.h\"\ndiff --git a/src/network/networkd-routing-policy-rule.h b/src/network/networkd-routing-policy-rule.h\nindex e1bd78f8095..28699ba2369 100644\n--- a/src/network/networkd-routing-policy-rule.h\n+++ b/src/network/networkd-routing-policy-rule.h\n@@ -7,7 +7,6 @@\n \n #include \"in-addr-util.h\"\n #include \"conf-parser.h\"\n-#include \"missing_fib_rules.h\"\n \n typedef struct RoutingPolicyRule RoutingPolicyRule;\n \ndiff --git a/src/partition/growfs.c b/src/partition/growfs.c\nindex 60a310946d0..ce86f96e13d 100644\n--- a/src/partition/growfs.c\n+++ b/src/partition/growfs.c\n@@ -3,6 +3,7 @@\n #include <errno.h>\n #include <fcntl.h>\n #include <getopt.h>\n+#include <linux/btrfs.h>\n #include <linux/magic.h>\n #include <sys/ioctl.h>\n #include <sys/mount.h>\ndiff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c\nindex 44f70aceaa3..50f9309f105 100644\n--- a/src/resolve/resolved-link.c\n+++ b/src/resolve/resolved-link.c\n@@ -1,7 +1,9 @@\n /* SPDX-License-Identifier: LGPL-2.1+ */\n \n #include <net/if.h>\n+#include <linux/if.h>\n #include <stdio_ext.h>\n+#include <unistd.h>\n \n #include \"sd-network.h\"\n \n@@ -9,7 +11,6 @@\n #include \"env-file.h\"\n #include \"fd-util.h\"\n #include \"fileio.h\"\n-#include \"missing.h\"\n #include \"mkdir.h\"\n #include \"parse-util.h\"\n #include \"resolved-link.h\"\ndiff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c\nindex ce210bfd436..ac2f7ceaf83 100644\n--- a/src/shared/dissect-image.c\n+++ b/src/shared/dissect-image.c\n@@ -1,5 +1,7 @@\n /* SPDX-License-Identifier: LGPL-2.1+ */\n \n+#include <linux/dm-ioctl.h>\n+#include <linux/loop.h>\n #include <sys/mount.h>\n #include <sys/prctl.h>\n #include <sys/wait.h>\n@@ -25,7 +27,6 @@\n #include \"hexdecoct.h\"\n #include \"hostname-util.h\"\n #include \"id128-util.h\"\n-#include \"linux-3.13/dm-ioctl.h\"\n #include \"missing.h\"\n #include \"mount-util.h\"\n #include \"mountpoint-util.h\"\ndiff --git a/src/shared/linux/README b/src/shared/linux/README\nnew file mode 100644\nindex 00000000000..34f90486bb8\n--- /dev/null\n+++ b/src/shared/linux/README\n@@ -0,0 +1,8 @@\n+The files in this directory are copied from kernel-5.0, and the following modifications are applied:\n+- auto_dev-ioctl.h: set AUTOFS_DEV_IOCTL_VERSION_MINOR to 0\n+- auto_dev-ioctl.h: define AUTOFS_IOCTL if not defined\n+- bpf_insn.h: This is imported from samples/bpf/bpf_insn.h\n+- bpf_insn.h: BPF_JMP_A() macro is also imported from include/linux/filter.h\n+- dm-ioctl.h: set DM_VERSION_MINOR to 27\n+- ethtool.h: add a type cast to SPEED_UNKNOWN\n+- ethtool.h: define __KERNEL_DIV_ROUND_UP if not defined\ndiff --git a/src/shared/linux/auto_dev-ioctl.h b/src/shared/linux/auto_dev-ioctl.h\nindex d9838eba494..261546c667d 100644\n--- a/src/shared/linux/auto_dev-ioctl.h\n+++ b/src/shared/linux/auto_dev-ioctl.h\n@@ -1,31 +1,24 @@\n-/* SPDX-License-Identifier: GPL-2.0+ */\n+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */\n /*\n- * Copyright © 2008 Red Hat, Inc. All rights reserved.\n- * Copyright © 2008 Ian Kent <raven@themaw.net>\n+ * Copyright 2008 Red Hat, Inc. All rights reserved.\n+ * Copyright 2008 Ian Kent <raven@themaw.net>\n  *\n  * This file is part of the Linux kernel and is made available under\n  * the terms of the GNU General Public License, version 2, or at your\n  * option, any later version, incorporated herein by reference.\n  */\n \n-#ifndef _LINUX_AUTO_DEV_IOCTL_H\n-#define _LINUX_AUTO_DEV_IOCTL_H\n+#ifndef _UAPI_LINUX_AUTO_DEV_IOCTL_H\n+#define _UAPI_LINUX_AUTO_DEV_IOCTL_H\n \n #include <linux/auto_fs.h>\n-\n-#ifdef __KERNEL__\n #include <linux/string.h>\n-#else\n-#include <string.h>\n-#endif /* __KERNEL__ */\n \n #define AUTOFS_DEVICE_NAME\t\t\"autofs\"\n \n #define AUTOFS_DEV_IOCTL_VERSION_MAJOR\t1\n #define AUTOFS_DEV_IOCTL_VERSION_MINOR\t0\n \n-#define AUTOFS_DEVID_LEN\t\t16\n-\n #define AUTOFS_DEV_IOCTL_SIZE\t\tsizeof(struct autofs_dev_ioctl)\n \n /*\n@@ -119,19 +112,15 @@ struct autofs_dev_ioctl {\n \tchar path[0];\n };\n \n-static inline void init_autofs_dev_ioctl(struct autofs_dev_ioctl *in) {\n-\tmemset(in, 0, sizeof(struct autofs_dev_ioctl));\n+static inline void init_autofs_dev_ioctl(struct autofs_dev_ioctl *in)\n+{\n+\tmemset(in, 0, AUTOFS_DEV_IOCTL_SIZE);\n \tin->ver_major = AUTOFS_DEV_IOCTL_VERSION_MAJOR;\n \tin->ver_minor = AUTOFS_DEV_IOCTL_VERSION_MINOR;\n-\tin->size = sizeof(struct autofs_dev_ioctl);\n+\tin->size = AUTOFS_DEV_IOCTL_SIZE;\n \tin->ioctlfd = -1;\n-\treturn;\n }\n \n-/*\n- * If you change this make sure you make the corresponding change\n- * to autofs-dev-ioctl.c:lookup_ioctl()\n- */\n enum {\n \t/* Get various version info */\n \tAUTOFS_DEV_IOCTL_VERSION_CMD = 0x71,\n@@ -168,7 +157,9 @@ enum {\n \tAUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD,\n };\n \n+#ifndef AUTOFS_IOCTL\n #define AUTOFS_IOCTL 0x93\n+#endif\n \n #define AUTOFS_DEV_IOCTL_VERSION \\\n \t_IOWR(AUTOFS_IOCTL, \\\n@@ -226,4 +217,4 @@ enum {\n \t_IOWR(AUTOFS_IOCTL, \\\n \t      AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD, struct autofs_dev_ioctl)\n \n-#endif\t/* _LINUX_AUTO_DEV_IOCTL_H */\n+#endif\t/* _UAPI_LINUX_AUTO_DEV_IOCTL_H */\ndiff --git a/src/shared/linux/bpf.h b/src/shared/linux/bpf.h\nindex 1df9e7e3d06..91c43884f29 100644\n--- a/src/shared/linux/bpf.h\n+++ b/src/shared/linux/bpf.h\n@@ -44,106 +44,149 @@\n \n /* Register numbers */\n enum {\n-        BPF_REG_0 = 0,\n-        BPF_REG_1,\n-        BPF_REG_2,\n-        BPF_REG_3,\n-        BPF_REG_4,\n-        BPF_REG_5,\n-        BPF_REG_6,\n-        BPF_REG_7,\n-        BPF_REG_8,\n-        BPF_REG_9,\n-        BPF_REG_10,\n-        __MAX_BPF_REG,\n+\tBPF_REG_0 = 0,\n+\tBPF_REG_1,\n+\tBPF_REG_2,\n+\tBPF_REG_3,\n+\tBPF_REG_4,\n+\tBPF_REG_5,\n+\tBPF_REG_6,\n+\tBPF_REG_7,\n+\tBPF_REG_8,\n+\tBPF_REG_9,\n+\tBPF_REG_10,\n+\t__MAX_BPF_REG,\n };\n \n /* BPF has 10 general purpose 64-bit registers and stack frame. */\n #define MAX_BPF_REG\t__MAX_BPF_REG\n \n struct bpf_insn {\n-        __u8\tcode;\t\t/* opcode */\n-        __u8\tdst_reg:4;\t/* dest register */\n-        __u8\tsrc_reg:4;\t/* source register */\n-        __s16\toff;\t\t/* signed offset */\n-        __s32\timm;\t\t/* signed immediate constant */\n+\t__u8\tcode;\t\t/* opcode */\n+\t__u8\tdst_reg:4;\t/* dest register */\n+\t__u8\tsrc_reg:4;\t/* source register */\n+\t__s16\toff;\t\t/* signed offset */\n+\t__s32\timm;\t\t/* signed immediate constant */\n };\n \n /* Key of an a BPF_MAP_TYPE_LPM_TRIE entry */\n struct bpf_lpm_trie_key {\n-        __u32\tprefixlen;\t/* up to 32 for AF_INET, 128 for AF_INET6 */\n-        __u8\tdata[0];\t/* Arbitrary size */\n+\t__u32\tprefixlen;\t/* up to 32 for AF_INET, 128 for AF_INET6 */\n+\t__u8\tdata[0];\t/* Arbitrary size */\n+};\n+\n+struct bpf_cgroup_storage_key {\n+\t__u64\tcgroup_inode_id;\t/* cgroup inode id */\n+\t__u32\tattach_type;\t\t/* program attach type */\n };\n \n /* BPF syscall commands, see bpf(2) man-page for details. */\n enum bpf_cmd {\n-        BPF_MAP_CREATE,\n-        BPF_MAP_LOOKUP_ELEM,\n-        BPF_MAP_UPDATE_ELEM,\n-        BPF_MAP_DELETE_ELEM,\n-        BPF_MAP_GET_NEXT_KEY,\n-        BPF_PROG_LOAD,\n-        BPF_OBJ_PIN,\n-        BPF_OBJ_GET,\n-        BPF_PROG_ATTACH,\n-        BPF_PROG_DETACH,\n-        BPF_PROG_TEST_RUN,\n-        BPF_PROG_GET_NEXT_ID,\n-        BPF_MAP_GET_NEXT_ID,\n-        BPF_PROG_GET_FD_BY_ID,\n-        BPF_MAP_GET_FD_BY_ID,\n-        BPF_OBJ_GET_INFO_BY_FD,\n-        BPF_PROG_QUERY,\n+\tBPF_MAP_CREATE,\n+\tBPF_MAP_LOOKUP_ELEM,\n+\tBPF_MAP_UPDATE_ELEM,\n+\tBPF_MAP_DELETE_ELEM,\n+\tBPF_MAP_GET_NEXT_KEY,\n+\tBPF_PROG_LOAD,\n+\tBPF_OBJ_PIN,\n+\tBPF_OBJ_GET,\n+\tBPF_PROG_ATTACH,\n+\tBPF_PROG_DETACH,\n+\tBPF_PROG_TEST_RUN,\n+\tBPF_PROG_GET_NEXT_ID,\n+\tBPF_MAP_GET_NEXT_ID,\n+\tBPF_PROG_GET_FD_BY_ID,\n+\tBPF_MAP_GET_FD_BY_ID,\n+\tBPF_OBJ_GET_INFO_BY_FD,\n+\tBPF_PROG_QUERY,\n+\tBPF_RAW_TRACEPOINT_OPEN,\n+\tBPF_BTF_LOAD,\n+\tBPF_BTF_GET_FD_BY_ID,\n+\tBPF_TASK_FD_QUERY,\n+\tBPF_MAP_LOOKUP_AND_DELETE_ELEM,\n };\n \n enum bpf_map_type {\n-        BPF_MAP_TYPE_UNSPEC,\n-        BPF_MAP_TYPE_HASH,\n-        BPF_MAP_TYPE_ARRAY,\n-        BPF_MAP_TYPE_PROG_ARRAY,\n-        BPF_MAP_TYPE_PERF_EVENT_ARRAY,\n-        BPF_MAP_TYPE_PERCPU_HASH,\n-        BPF_MAP_TYPE_PERCPU_ARRAY,\n-        BPF_MAP_TYPE_STACK_TRACE,\n-        BPF_MAP_TYPE_CGROUP_ARRAY,\n-        BPF_MAP_TYPE_LRU_HASH,\n-        BPF_MAP_TYPE_LRU_PERCPU_HASH,\n-        BPF_MAP_TYPE_LPM_TRIE,\n-        BPF_MAP_TYPE_ARRAY_OF_MAPS,\n-        BPF_MAP_TYPE_HASH_OF_MAPS,\n-        BPF_MAP_TYPE_DEVMAP,\n-        BPF_MAP_TYPE_SOCKMAP,\n-        BPF_MAP_TYPE_CPUMAP,\n+\tBPF_MAP_TYPE_UNSPEC,\n+\tBPF_MAP_TYPE_HASH,\n+\tBPF_MAP_TYPE_ARRAY,\n+\tBPF_MAP_TYPE_PROG_ARRAY,\n+\tBPF_MAP_TYPE_PERF_EVENT_ARRAY,\n+\tBPF_MAP_TYPE_PERCPU_HASH,\n+\tBPF_MAP_TYPE_PERCPU_ARRAY,\n+\tBPF_MAP_TYPE_STACK_TRACE,\n+\tBPF_MAP_TYPE_CGROUP_ARRAY,\n+\tBPF_MAP_TYPE_LRU_HASH,\n+\tBPF_MAP_TYPE_LRU_PERCPU_HASH,\n+\tBPF_MAP_TYPE_LPM_TRIE,\n+\tBPF_MAP_TYPE_ARRAY_OF_MAPS,\n+\tBPF_MAP_TYPE_HASH_OF_MAPS,\n+\tBPF_MAP_TYPE_DEVMAP,\n+\tBPF_MAP_TYPE_SOCKMAP,\n+\tBPF_MAP_TYPE_CPUMAP,\n+\tBPF_MAP_TYPE_XSKMAP,\n+\tBPF_MAP_TYPE_SOCKHASH,\n+\tBPF_MAP_TYPE_CGROUP_STORAGE,\n+\tBPF_MAP_TYPE_REUSEPORT_SOCKARRAY,\n+\tBPF_MAP_TYPE_PERCPU_CGROUP_STORAGE,\n+\tBPF_MAP_TYPE_QUEUE,\n+\tBPF_MAP_TYPE_STACK,\n };\n \n+/* Note that tracing related programs such as\n+ * BPF_PROG_TYPE_{KPROBE,TRACEPOINT,PERF_EVENT,RAW_TRACEPOINT}\n+ * are not subject to a stable API since kernel internal data\n+ * structures can change from release to release and may\n+ * therefore break existing tracing BPF programs. Tracing BPF\n+ * programs correspond to /a/ specific kernel which is to be\n+ * analyzed, and not /a/ specific kernel /and/ all future ones.\n+ */\n enum bpf_prog_type {\n-        BPF_PROG_TYPE_UNSPEC,\n-        BPF_PROG_TYPE_SOCKET_FILTER,\n-        BPF_PROG_TYPE_KPROBE,\n-        BPF_PROG_TYPE_SCHED_CLS,\n-        BPF_PROG_TYPE_SCHED_ACT,\n-        BPF_PROG_TYPE_TRACEPOINT,\n-        BPF_PROG_TYPE_XDP,\n-        BPF_PROG_TYPE_PERF_EVENT,\n-        BPF_PROG_TYPE_CGROUP_SKB,\n-        BPF_PROG_TYPE_CGROUP_SOCK,\n-        BPF_PROG_TYPE_LWT_IN,\n-        BPF_PROG_TYPE_LWT_OUT,\n-        BPF_PROG_TYPE_LWT_XMIT,\n-        BPF_PROG_TYPE_SOCK_OPS,\n-        BPF_PROG_TYPE_SK_SKB,\n-        BPF_PROG_TYPE_CGROUP_DEVICE,\n+\tBPF_PROG_TYPE_UNSPEC,\n+\tBPF_PROG_TYPE_SOCKET_FILTER,\n+\tBPF_PROG_TYPE_KPROBE,\n+\tBPF_PROG_TYPE_SCHED_CLS,\n+\tBPF_PROG_TYPE_SCHED_ACT,\n+\tBPF_PROG_TYPE_TRACEPOINT,\n+\tBPF_PROG_TYPE_XDP,\n+\tBPF_PROG_TYPE_PERF_EVENT,\n+\tBPF_PROG_TYPE_CGROUP_SKB,\n+\tBPF_PROG_TYPE_CGROUP_SOCK,\n+\tBPF_PROG_TYPE_LWT_IN,\n+\tBPF_PROG_TYPE_LWT_OUT,\n+\tBPF_PROG_TYPE_LWT_XMIT,\n+\tBPF_PROG_TYPE_SOCK_OPS,\n+\tBPF_PROG_TYPE_SK_SKB,\n+\tBPF_PROG_TYPE_CGROUP_DEVICE,\n+\tBPF_PROG_TYPE_SK_MSG,\n+\tBPF_PROG_TYPE_RAW_TRACEPOINT,\n+\tBPF_PROG_TYPE_CGROUP_SOCK_ADDR,\n+\tBPF_PROG_TYPE_LWT_SEG6LOCAL,\n+\tBPF_PROG_TYPE_LIRC_MODE2,\n+\tBPF_PROG_TYPE_SK_REUSEPORT,\n+\tBPF_PROG_TYPE_FLOW_DISSECTOR,\n };\n \n enum bpf_attach_type {\n-        BPF_CGROUP_INET_INGRESS,\n-        BPF_CGROUP_INET_EGRESS,\n-        BPF_CGROUP_INET_SOCK_CREATE,\n-        BPF_CGROUP_SOCK_OPS,\n-        BPF_SK_SKB_STREAM_PARSER,\n-        BPF_SK_SKB_STREAM_VERDICT,\n-        BPF_CGROUP_DEVICE,\n-        __MAX_BPF_ATTACH_TYPE\n+\tBPF_CGROUP_INET_INGRESS,\n+\tBPF_CGROUP_INET_EGRESS,\n+\tBPF_CGROUP_INET_SOCK_CREATE,\n+\tBPF_CGROUP_SOCK_OPS,\n+\tBPF_SK_SKB_STREAM_PARSER,\n+\tBPF_SK_SKB_STREAM_VERDICT,\n+\tBPF_CGROUP_DEVICE,\n+\tBPF_SK_MSG_VERDICT,\n+\tBPF_CGROUP_INET4_BIND,\n+\tBPF_CGROUP_INET6_BIND,\n+\tBPF_CGROUP_INET4_CONNECT,\n+\tBPF_CGROUP_INET6_CONNECT,\n+\tBPF_CGROUP_INET4_POST_BIND,\n+\tBPF_CGROUP_INET6_POST_BIND,\n+\tBPF_CGROUP_UDP4_SENDMSG,\n+\tBPF_CGROUP_UDP6_SENDMSG,\n+\tBPF_LIRC_MODE2,\n+\tBPF_FLOW_DISSECTOR,\n+\t__MAX_BPF_ATTACH_TYPE\n };\n \n #define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE\n@@ -197,6 +240,20 @@ enum bpf_attach_type {\n  */\n #define BPF_F_STRICT_ALIGNMENT\t(1U << 0)\n \n+/* If BPF_F_ANY_ALIGNMENT is used in BPF_PROF_LOAD command, the\n+ * verifier will allow any alignment whatsoever.  On platforms\n+ * with strict alignment requirements for loads ands stores (such\n+ * as sparc and mips) the verifier validates that all loads and\n+ * stores provably follow this requirement.  This flag turns that\n+ * checking and enforcement off.\n+ *\n+ * It is mostly used for testing when we want to validate the\n+ * context and memory access aspects of the verifier, but because\n+ * of an unaligned access the alignment check would trigger before\n+ * the one we are interested in.\n+ */\n+#define BPF_F_ANY_ALIGNMENT\t(1U << 1)\n+\n /* when bpf_ldimm64->src_reg == BPF_PSEUDO_MAP_FD, bpf_ldimm64->imm == fd */\n #define BPF_PSEUDO_MAP_FD\t1\n \n@@ -222,550 +279,2157 @@ enum bpf_attach_type {\n /* Specify numa node during map creation */\n #define BPF_F_NUMA_NODE\t\t(1U << 2)\n \n-/* flags for BPF_PROG_QUERY */\n-#define BPF_F_QUERY_EFFECTIVE\t(1U << 0)\n-\n #define BPF_OBJ_NAME_LEN 16U\n \n /* Flags for accessing BPF object */\n #define BPF_F_RDONLY\t\t(1U << 3)\n #define BPF_F_WRONLY\t\t(1U << 4)\n \n+/* Flag for stack_map, store build_id+offset instead of pointer */\n+#define BPF_F_STACK_BUILD_ID\t(1U << 5)\n+\n+/* Zero-initialize hash function seed. This should only be used for testing. */\n+#define BPF_F_ZERO_SEED\t\t(1U << 6)\n+\n+/* flags for BPF_PROG_QUERY */\n+#define BPF_F_QUERY_EFFECTIVE\t(1U << 0)\n+\n+enum bpf_stack_build_id_status {\n+\t/* user space need an empty entry to identify end of a trace */\n+\tBPF_STACK_BUILD_ID_EMPTY = 0,\n+\t/* with valid build_id and offset */\n+\tBPF_STACK_BUILD_ID_VALID = 1,\n+\t/* couldn't get build_id, fallback to ip */\n+\tBPF_STACK_BUILD_ID_IP = 2,\n+};\n+\n+#define BPF_BUILD_ID_SIZE 20\n+struct bpf_stack_build_id {\n+\t__s32\t\tstatus;\n+\tunsigned char\tbuild_id[BPF_BUILD_ID_SIZE];\n+\tunion {\n+\t\t__u64\toffset;\n+\t\t__u64\tip;\n+\t};\n+};\n+\n union bpf_attr {\n-        struct { /* anonymous struct used by BPF_MAP_CREATE command */\n-                __u32\tmap_type;\t/* one of enum bpf_map_type */\n-                __u32\tkey_size;\t/* size of key in bytes */\n-                __u32\tvalue_size;\t/* size of value in bytes */\n-                __u32\tmax_entries;\t/* max number of entries in a map */\n-                __u32\tmap_flags;\t/* BPF_MAP_CREATE related\n-                                         * flags defined above.\n-                                         */\n-                __u32\tinner_map_fd;\t/* fd pointing to the inner map */\n-                __u32\tnuma_node;\t/* numa node (effective only if\n-                                         * BPF_F_NUMA_NODE is set).\n-                                         */\n-                char\tmap_name[BPF_OBJ_NAME_LEN];\n-                __u32\tmap_ifindex;\t/* ifindex of netdev to create on */\n-        };\n-\n-        struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */\n-                __u32\t\tmap_fd;\n-                __aligned_u64\tkey;\n-                union {\n-                        __aligned_u64 value;\n-                        __aligned_u64 next_key;\n-                };\n-                __u64\t\tflags;\n-        };\n-\n-        struct { /* anonymous struct used by BPF_PROG_LOAD command */\n-                __u32\t\tprog_type;\t/* one of enum bpf_prog_type */\n-                __u32\t\tinsn_cnt;\n-                __aligned_u64\tinsns;\n-                __aligned_u64\tlicense;\n-                __u32\t\tlog_level;\t/* verbosity level of verifier */\n-                __u32\t\tlog_size;\t/* size of user buffer */\n-                __aligned_u64\tlog_buf;\t/* user supplied buffer */\n-                __u32\t\tkern_version;\t/* checked when prog_type=kprobe */\n-                __u32\t\tprog_flags;\n-                char\t\tprog_name[BPF_OBJ_NAME_LEN];\n-                __u32\t\tprog_ifindex;\t/* ifindex of netdev to prep for */\n-        };\n-\n-        struct { /* anonymous struct used by BPF_OBJ_* commands */\n-                __aligned_u64\tpathname;\n-                __u32\t\tbpf_fd;\n-                __u32\t\tfile_flags;\n-        };\n-\n-        struct { /* anonymous struct used by BPF_PROG_ATTACH/DETACH commands */\n-                __u32\t\ttarget_fd;\t/* container object to attach to */\n-                __u32\t\tattach_bpf_fd;\t/* eBPF program to attach */\n-                __u32\t\tattach_type;\n-                __u32\t\tattach_flags;\n-        };\n-\n-        struct { /* anonymous struct used by BPF_PROG_TEST_RUN command */\n-                __u32\t\tprog_fd;\n-                __u32\t\tretval;\n-                __u32\t\tdata_size_in;\n-                __u32\t\tdata_size_out;\n-                __aligned_u64\tdata_in;\n-                __aligned_u64\tdata_out;\n-                __u32\t\trepeat;\n-                __u32\t\tduration;\n-        } test;\n-\n-        struct { /* anonymous struct used by BPF_*_GET_*_ID */\n-                union {\n-                        __u32\t\tstart_id;\n-                        __u32\t\tprog_id;\n-                        __u32\t\tmap_id;\n-                };\n-                __u32\t\tnext_id;\n-                __u32\t\topen_flags;\n-        };\n-\n-        struct { /* anonymous struct used by BPF_OBJ_GET_INFO_BY_FD */\n-                __u32\t\tbpf_fd;\n-                __u32\t\tinfo_len;\n-                __aligned_u64\tinfo;\n-        } info;\n-\n-        struct { /* anonymous struct used by BPF_PROG_QUERY command */\n-                __u32\t\ttarget_fd;\t/* container object to query */\n-                __u32\t\tattach_type;\n-                __u32\t\tquery_flags;\n-                __u32\t\tattach_flags;\n-                __aligned_u64\tprog_ids;\n-                __u32\t\tprog_cnt;\n-        } query;\n+\tstruct { /* anonymous struct used by BPF_MAP_CREATE command */\n+\t\t__u32\tmap_type;\t/* one of enum bpf_map_type */\n+\t\t__u32\tkey_size;\t/* size of key in bytes */\n+\t\t__u32\tvalue_size;\t/* size of value in bytes */\n+\t\t__u32\tmax_entries;\t/* max number of entries in a map */\n+\t\t__u32\tmap_flags;\t/* BPF_MAP_CREATE related\n+\t\t\t\t\t * flags defined above.\n+\t\t\t\t\t */\n+\t\t__u32\tinner_map_fd;\t/* fd pointing to the inner map */\n+\t\t__u32\tnuma_node;\t/* numa node (effective only if\n+\t\t\t\t\t * BPF_F_NUMA_NODE is set).\n+\t\t\t\t\t */\n+\t\tchar\tmap_name[BPF_OBJ_NAME_LEN];\n+\t\t__u32\tmap_ifindex;\t/* ifindex of netdev to create on */\n+\t\t__u32\tbtf_fd;\t\t/* fd pointing to a BTF type data */\n+\t\t__u32\tbtf_key_type_id;\t/* BTF type_id of the key */\n+\t\t__u32\tbtf_value_type_id;\t/* BTF type_id of the value */\n+\t};\n+\n+\tstruct { /* anonymous struct used by BPF_MAP_*_ELEM commands */\n+\t\t__u32\t\tmap_fd;\n+\t\t__aligned_u64\tkey;\n+\t\tunion {\n+\t\t\t__aligned_u64 value;\n+\t\t\t__aligned_u64 next_key;\n+\t\t};\n+\t\t__u64\t\tflags;\n+\t};\n+\n+\tstruct { /* anonymous struct used by BPF_PROG_LOAD command */\n+\t\t__u32\t\tprog_type;\t/* one of enum bpf_prog_type */\n+\t\t__u32\t\tinsn_cnt;\n+\t\t__aligned_u64\tinsns;\n+\t\t__aligned_u64\tlicense;\n+\t\t__u32\t\tlog_level;\t/* verbosity level of verifier */\n+\t\t__u32\t\tlog_size;\t/* size of user buffer */\n+\t\t__aligned_u64\tlog_buf;\t/* user supplied buffer */\n+\t\t__u32\t\tkern_version;\t/* not used */\n+\t\t__u32\t\tprog_flags;\n+\t\tchar\t\tprog_name[BPF_OBJ_NAME_LEN];\n+\t\t__u32\t\tprog_ifindex;\t/* ifindex of netdev to prep for */\n+\t\t/* For some prog types expected attach type must be known at\n+\t\t * load time to verify attach type specific parts of prog\n+\t\t * (context accesses, allowed helpers, etc).\n+\t\t */\n+\t\t__u32\t\texpected_attach_type;\n+\t\t__u32\t\tprog_btf_fd;\t/* fd pointing to BTF type data */\n+\t\t__u32\t\tfunc_info_rec_size;\t/* userspace bpf_func_info size */\n+\t\t__aligned_u64\tfunc_info;\t/* func info */\n+\t\t__u32\t\tfunc_info_cnt;\t/* number of bpf_func_info records */\n+\t\t__u32\t\tline_info_rec_size;\t/* userspace bpf_line_info size */\n+\t\t__aligned_u64\tline_info;\t/* line info */\n+\t\t__u32\t\tline_info_cnt;\t/* number of bpf_line_info records */\n+\t};\n+\n+\tstruct { /* anonymous struct used by BPF_OBJ_* commands */\n+\t\t__aligned_u64\tpathname;\n+\t\t__u32\t\tbpf_fd;\n+\t\t__u32\t\tfile_flags;\n+\t};\n+\n+\tstruct { /* anonymous struct used by BPF_PROG_ATTACH/DETACH commands */\n+\t\t__u32\t\ttarget_fd;\t/* container object to attach to */\n+\t\t__u32\t\tattach_bpf_fd;\t/* eBPF program to attach */\n+\t\t__u32\t\tattach_type;\n+\t\t__u32\t\tattach_flags;\n+\t};\n+\n+\tstruct { /* anonymous struct used by BPF_PROG_TEST_RUN command */\n+\t\t__u32\t\tprog_fd;\n+\t\t__u32\t\tretval;\n+\t\t__u32\t\tdata_size_in;\t/* input: len of data_in */\n+\t\t__u32\t\tdata_size_out;\t/* input/output: len of data_out\n+\t\t\t\t\t\t *   returns ENOSPC if data_out\n+\t\t\t\t\t\t *   is too small.\n+\t\t\t\t\t\t */\n+\t\t__aligned_u64\tdata_in;\n+\t\t__aligned_u64\tdata_out;\n+\t\t__u32\t\trepeat;\n+\t\t__u32\t\tduration;\n+\t} test;\n+\n+\tstruct { /* anonymous struct used by BPF_*_GET_*_ID */\n+\t\tunion {\n+\t\t\t__u32\t\tstart_id;\n+\t\t\t__u32\t\tprog_id;\n+\t\t\t__u32\t\tmap_id;\n+\t\t\t__u32\t\tbtf_id;\n+\t\t};\n+\t\t__u32\t\tnext_id;\n+\t\t__u32\t\topen_flags;\n+\t};\n+\n+\tstruct { /* anonymous struct used by BPF_OBJ_GET_INFO_BY_FD */\n+\t\t__u32\t\tbpf_fd;\n+\t\t__u32\t\tinfo_len;\n+\t\t__aligned_u64\tinfo;\n+\t} info;\n+\n+\tstruct { /* anonymous struct used by BPF_PROG_QUERY command */\n+\t\t__u32\t\ttarget_fd;\t/* container object to query */\n+\t\t__u32\t\tattach_type;\n+\t\t__u32\t\tquery_flags;\n+\t\t__u32\t\tattach_flags;\n+\t\t__aligned_u64\tprog_ids;\n+\t\t__u32\t\tprog_cnt;\n+\t} query;\n+\n+\tstruct {\n+\t\t__u64 name;\n+\t\t__u32 prog_fd;\n+\t} raw_tracepoint;\n+\n+\tstruct { /* anonymous struct for BPF_BTF_LOAD */\n+\t\t__aligned_u64\tbtf;\n+\t\t__aligned_u64\tbtf_log_buf;\n+\t\t__u32\t\tbtf_size;\n+\t\t__u32\t\tbtf_log_size;\n+\t\t__u32\t\tbtf_log_level;\n+\t};\n+\n+\tstruct {\n+\t\t__u32\t\tpid;\t\t/* input: pid */\n+\t\t__u32\t\tfd;\t\t/* input: fd */\n+\t\t__u32\t\tflags;\t\t/* input: flags */\n+\t\t__u32\t\tbuf_len;\t/* input/output: buf len */\n+\t\t__aligned_u64\tbuf;\t\t/* input/output:\n+\t\t\t\t\t\t *   tp_name for tracepoint\n+\t\t\t\t\t\t *   symbol for kprobe\n+\t\t\t\t\t\t *   filename for uprobe\n+\t\t\t\t\t\t */\n+\t\t__u32\t\tprog_id;\t/* output: prod_id */\n+\t\t__u32\t\tfd_type;\t/* output: BPF_FD_TYPE_* */\n+\t\t__u64\t\tprobe_offset;\t/* output: probe_offset */\n+\t\t__u64\t\tprobe_addr;\t/* output: probe_addr */\n+\t} task_fd_query;\n } __attribute__((aligned(8)));\n \n-/* BPF helper function descriptions:\n- *\n- * void *bpf_map_lookup_elem(&map, &key)\n- *     Return: Map value or NULL\n- *\n- * int bpf_map_update_elem(&map, &key, &value, flags)\n- *     Return: 0 on success or negative error\n- *\n- * int bpf_map_delete_elem(&map, &key)\n- *     Return: 0 on success or negative error\n- *\n- * int bpf_probe_read(void *dst, int size, void *src)\n- *     Return: 0 on success or negative error\n+/* The description below is an attempt at providing documentation to eBPF\n+ * developers about the multiple available eBPF helper functions. It can be\n+ * parsed and used to produce a manual page. The workflow is the following,\n+ * and requires the rst2man utility:\n+ *\n+ *     $ ./scripts/bpf_helpers_doc.py \\\n+ *             --filename include/uapi/linux/bpf.h > /tmp/bpf-helpers.rst\n+ *     $ rst2man /tmp/bpf-helpers.rst > /tmp/bpf-helpers.7\n+ *     $ man /tmp/bpf-helpers.7\n+ *\n+ * Note that in order to produce this external documentation, some RST\n+ * formatting is used in the descriptions to get \"bold\" and \"italics\" in\n+ * manual pages. Also note that the few trailing white spaces are\n+ * intentional, removing them would break paragraphs for rst2man.\n+ *\n+ * Start of BPF helper function descriptions:\n+ *\n+ * void *bpf_map_lookup_elem(struct bpf_map *map, const void *key)\n+ * \tDescription\n+ * \t\tPerform a lookup in *map* for an entry associated to *key*.\n+ * \tReturn\n+ * \t\tMap value associated to *key*, or **NULL** if no entry was\n+ * \t\tfound.\n+ *\n+ * int bpf_map_update_elem(struct bpf_map *map, const void *key, const void *value, u64 flags)\n+ * \tDescription\n+ * \t\tAdd or update the value of the entry associated to *key* in\n+ * \t\t*map* with *value*. *flags* is one of:\n+ *\n+ * \t\t**BPF_NOEXIST**\n+ * \t\t\tThe entry for *key* must not exist in the map.\n+ * \t\t**BPF_EXIST**\n+ * \t\t\tThe entry for *key* must already exist in the map.\n+ * \t\t**BPF_ANY**\n+ * \t\t\tNo condition on the existence of the entry for *key*.\n+ *\n+ * \t\tFlag value **BPF_NOEXIST** cannot be used for maps of types\n+ * \t\t**BPF_MAP_TYPE_ARRAY** or **BPF_MAP_TYPE_PERCPU_ARRAY**  (all\n+ * \t\telements always exist), the helper would return an error.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_map_delete_elem(struct bpf_map *map, const void *key)\n+ * \tDescription\n+ * \t\tDelete entry with *key* from *map*.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_map_push_elem(struct bpf_map *map, const void *value, u64 flags)\n+ * \tDescription\n+ * \t\tPush an element *value* in *map*. *flags* is one of:\n+ *\n+ * \t\t**BPF_EXIST**\n+ * \t\tIf the queue/stack is full, the oldest element is removed to\n+ * \t\tmake room for this.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_probe_read(void *dst, u32 size, const void *src)\n+ * \tDescription\n+ * \t\tFor tracing programs, safely attempt to read *size* bytes from\n+ * \t\taddress *src* and store the data in *dst*.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n  *\n  * u64 bpf_ktime_get_ns(void)\n- *     Return: current ktime\n- *\n- * int bpf_trace_printk(const char *fmt, int fmt_size, ...)\n- *     Return: length of buffer written or negative error\n- *\n- * u32 bpf_prandom_u32(void)\n- *     Return: random value\n- *\n- * u32 bpf_raw_smp_processor_id(void)\n- *     Return: SMP processor ID\n- *\n- * int bpf_skb_store_bytes(skb, offset, from, len, flags)\n- *     store bytes into packet\n- *     @skb: pointer to skb\n- *     @offset: offset within packet from skb->mac_header\n- *     @from: pointer where to copy bytes from\n- *     @len: number of bytes to store into packet\n- *     @flags: bit 0 - if true, recompute skb->csum\n- *             other bits - reserved\n- *     Return: 0 on success or negative error\n- *\n- * int bpf_l3_csum_replace(skb, offset, from, to, flags)\n- *     recompute IP checksum\n- *     @skb: pointer to skb\n- *     @offset: offset within packet where IP checksum is located\n- *     @from: old value of header field\n- *     @to: new value of header field\n- *     @flags: bits 0-3 - size of header field\n- *             other bits - reserved\n- *     Return: 0 on success or negative error\n- *\n- * int bpf_l4_csum_replace(skb, offset, from, to, flags)\n- *     recompute TCP/UDP checksum\n- *     @skb: pointer to skb\n- *     @offset: offset within packet where TCP/UDP checksum is located\n- *     @from: old value of header field\n- *     @to: new value of header field\n- *     @flags: bits 0-3 - size of header field\n- *             bit 4 - is pseudo header\n- *             other bits - reserved\n- *     Return: 0 on success or negative error\n- *\n- * int bpf_tail_call(ctx, prog_array_map, index)\n- *     jump into another BPF program\n- *     @ctx: context pointer passed to next program\n- *     @prog_array_map: pointer to map which type is BPF_MAP_TYPE_PROG_ARRAY\n- *     @index: 32-bit index inside array that selects specific program to run\n- *     Return: 0 on success or negative error\n- *\n- * int bpf_clone_redirect(skb, ifindex, flags)\n- *     redirect to another netdev\n- *     @skb: pointer to skb\n- *     @ifindex: ifindex of the net device\n- *     @flags: bit 0 - if set, redirect to ingress instead of egress\n- *             other bits - reserved\n- *     Return: 0 on success or negative error\n+ * \tDescription\n+ * \t\tReturn the time elapsed since system boot, in nanoseconds.\n+ * \tReturn\n+ * \t\tCurrent *ktime*.\n+ *\n+ * int bpf_trace_printk(const char *fmt, u32 fmt_size, ...)\n+ * \tDescription\n+ * \t\tThis helper is a \"printk()-like\" facility for debugging. It\n+ * \t\tprints a message defined by format *fmt* (of size *fmt_size*)\n+ * \t\tto file *\\/sys/kernel/debug/tracing/trace* from DebugFS, if\n+ * \t\tavailable. It can take up to three additional **u64**\n+ * \t\targuments (as an eBPF helpers, the total number of arguments is\n+ * \t\tlimited to five).\n+ *\n+ * \t\tEach time the helper is called, it appends a line to the trace.\n+ * \t\tThe format of the trace is customizable, and the exact output\n+ * \t\tone will get depends on the options set in\n+ * \t\t*\\/sys/kernel/debug/tracing/trace_options* (see also the\n+ * \t\t*README* file under the same directory). However, it usually\n+ * \t\tdefaults to something like:\n+ *\n+ * \t\t::\n+ *\n+ * \t\t\ttelnet-470   [001] .N.. 419421.045894: 0x00000001: <formatted msg>\n+ *\n+ * \t\tIn the above:\n+ *\n+ * \t\t\t* ``telnet`` is the name of the current task.\n+ * \t\t\t* ``470`` is the PID of the current task.\n+ * \t\t\t* ``001`` is the CPU number on which the task is\n+ * \t\t\t  running.\n+ * \t\t\t* In ``.N..``, each character refers to a set of\n+ * \t\t\t  options (whether irqs are enabled, scheduling\n+ * \t\t\t  options, whether hard/softirqs are running, level of\n+ * \t\t\t  preempt_disabled respectively). **N** means that\n+ * \t\t\t  **TIF_NEED_RESCHED** and **PREEMPT_NEED_RESCHED**\n+ * \t\t\t  are set.\n+ * \t\t\t* ``419421.045894`` is a timestamp.\n+ * \t\t\t* ``0x00000001`` is a fake value used by BPF for the\n+ * \t\t\t  instruction pointer register.\n+ * \t\t\t* ``<formatted msg>`` is the message formatted with\n+ * \t\t\t  *fmt*.\n+ *\n+ * \t\tThe conversion specifiers supported by *fmt* are similar, but\n+ * \t\tmore limited than for printk(). They are **%d**, **%i**,\n+ * \t\t**%u**, **%x**, **%ld**, **%li**, **%lu**, **%lx**, **%lld**,\n+ * \t\t**%lli**, **%llu**, **%llx**, **%p**, **%s**. No modifier (size\n+ * \t\tof field, padding with zeroes, etc.) is available, and the\n+ * \t\thelper will return **-EINVAL** (but print nothing) if it\n+ * \t\tencounters an unknown specifier.\n+ *\n+ * \t\tAlso, note that **bpf_trace_printk**\\ () is slow, and should\n+ * \t\tonly be used for debugging purposes. For this reason, a notice\n+ * \t\tbloc (spanning several lines) is printed to kernel logs and\n+ * \t\tstates that the helper should not be used \"for production use\"\n+ * \t\tthe first time this helper is used (or more precisely, when\n+ * \t\t**trace_printk**\\ () buffers are allocated). For passing values\n+ * \t\tto user space, perf events should be preferred.\n+ * \tReturn\n+ * \t\tThe number of bytes written to the buffer, or a negative error\n+ * \t\tin case of failure.\n+ *\n+ * u32 bpf_get_prandom_u32(void)\n+ * \tDescription\n+ * \t\tGet a pseudo-random number.\n+ *\n+ * \t\tFrom a security point of view, this helper uses its own\n+ * \t\tpseudo-random internal state, and cannot be used to infer the\n+ * \t\tseed of other random functions in the kernel. However, it is\n+ * \t\tessential to note that the generator used by the helper is not\n+ * \t\tcryptographically secure.\n+ * \tReturn\n+ * \t\tA random 32-bit unsigned value.\n+ *\n+ * u32 bpf_get_smp_processor_id(void)\n+ * \tDescription\n+ * \t\tGet the SMP (symmetric multiprocessing) processor id. Note that\n+ * \t\tall programs run with preemption disabled, which means that the\n+ * \t\tSMP processor id is stable during all the execution of the\n+ * \t\tprogram.\n+ * \tReturn\n+ * \t\tThe SMP id of the processor running the program.\n+ *\n+ * int bpf_skb_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len, u64 flags)\n+ * \tDescription\n+ * \t\tStore *len* bytes from address *from* into the packet\n+ * \t\tassociated to *skb*, at *offset*. *flags* are a combination of\n+ * \t\t**BPF_F_RECOMPUTE_CSUM** (automatically recompute the\n+ * \t\tchecksum for the packet after storing the bytes) and\n+ * \t\t**BPF_F_INVALIDATE_HASH** (set *skb*\\ **->hash**, *skb*\\\n+ * \t\t**->swhash** and *skb*\\ **->l4hash** to 0).\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_l3_csum_replace(struct sk_buff *skb, u32 offset, u64 from, u64 to, u64 size)\n+ * \tDescription\n+ * \t\tRecompute the layer 3 (e.g. IP) checksum for the packet\n+ * \t\tassociated to *skb*. Computation is incremental, so the helper\n+ * \t\tmust know the former value of the header field that was\n+ * \t\tmodified (*from*), the new value of this field (*to*), and the\n+ * \t\tnumber of bytes (2 or 4) for this field, stored in *size*.\n+ * \t\tAlternatively, it is possible to store the difference between\n+ * \t\tthe previous and the new values of the header field in *to*, by\n+ * \t\tsetting *from* and *size* to 0. For both methods, *offset*\n+ * \t\tindicates the location of the IP checksum within the packet.\n+ *\n+ * \t\tThis helper works in combination with **bpf_csum_diff**\\ (),\n+ * \t\twhich does not update the checksum in-place, but offers more\n+ * \t\tflexibility and can handle sizes larger than 2 or 4 for the\n+ * \t\tchecksum to update.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_l4_csum_replace(struct sk_buff *skb, u32 offset, u64 from, u64 to, u64 flags)\n+ * \tDescription\n+ * \t\tRecompute the layer 4 (e.g. TCP, UDP or ICMP) checksum for the\n+ * \t\tpacket associated to *skb*. Computation is incremental, so the\n+ * \t\thelper must know the former value of the header field that was\n+ * \t\tmodified (*from*), the new value of this field (*to*), and the\n+ * \t\tnumber of bytes (2 or 4) for this field, stored on the lowest\n+ * \t\tfour bits of *flags*. Alternatively, it is possible to store\n+ * \t\tthe difference between the previous and the new values of the\n+ * \t\theader field in *to*, by setting *from* and the four lowest\n+ * \t\tbits of *flags* to 0. For both methods, *offset* indicates the\n+ * \t\tlocation of the IP checksum within the packet. In addition to\n+ * \t\tthe size of the field, *flags* can be added (bitwise OR) actual\n+ * \t\tflags. With **BPF_F_MARK_MANGLED_0**, a null checksum is left\n+ * \t\tuntouched (unless **BPF_F_MARK_ENFORCE** is added as well), and\n+ * \t\tfor updates resulting in a null checksum the value is set to\n+ * \t\t**CSUM_MANGLED_0** instead. Flag **BPF_F_PSEUDO_HDR** indicates\n+ * \t\tthe checksum is to be computed against a pseudo-header.\n+ *\n+ * \t\tThis helper works in combination with **bpf_csum_diff**\\ (),\n+ * \t\twhich does not update the checksum in-place, but offers more\n+ * \t\tflexibility and can handle sizes larger than 2 or 4 for the\n+ * \t\tchecksum to update.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_tail_call(void *ctx, struct bpf_map *prog_array_map, u32 index)\n+ * \tDescription\n+ * \t\tThis special helper is used to trigger a \"tail call\", or in\n+ * \t\tother words, to jump into another eBPF program. The same stack\n+ * \t\tframe is used (but values on stack and in registers for the\n+ * \t\tcaller are not accessible to the callee). This mechanism allows\n+ * \t\tfor program chaining, either for raising the maximum number of\n+ * \t\tavailable eBPF instructions, or to execute given programs in\n+ * \t\tconditional blocks. For security reasons, there is an upper\n+ * \t\tlimit to the number of successive tail calls that can be\n+ * \t\tperformed.\n+ *\n+ * \t\tUpon call of this helper, the program attempts to jump into a\n+ * \t\tprogram referenced at index *index* in *prog_array_map*, a\n+ * \t\tspecial map of type **BPF_MAP_TYPE_PROG_ARRAY**, and passes\n+ * \t\t*ctx*, a pointer to the context.\n+ *\n+ * \t\tIf the call succeeds, the kernel immediately runs the first\n+ * \t\tinstruction of the new program. This is not a function call,\n+ * \t\tand it never returns to the previous program. If the call\n+ * \t\tfails, then the helper has no effect, and the caller continues\n+ * \t\tto run its subsequent instructions. A call can fail if the\n+ * \t\tdestination program for the jump does not exist (i.e. *index*\n+ * \t\tis superior to the number of entries in *prog_array_map*), or\n+ * \t\tif the maximum number of tail calls has been reached for this\n+ * \t\tchain of programs. This limit is defined in the kernel by the\n+ * \t\tmacro **MAX_TAIL_CALL_CNT** (not accessible to user space),\n+ * \t\twhich is currently set to 32.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_clone_redirect(struct sk_buff *skb, u32 ifindex, u64 flags)\n+ * \tDescription\n+ * \t\tClone and redirect the packet associated to *skb* to another\n+ * \t\tnet device of index *ifindex*. Both ingress and egress\n+ * \t\tinterfaces can be used for redirection. The **BPF_F_INGRESS**\n+ * \t\tvalue in *flags* is used to make the distinction (ingress path\n+ * \t\tis selected if the flag is present, egress path otherwise).\n+ * \t\tThis is the only flag supported for now.\n+ *\n+ * \t\tIn comparison with **bpf_redirect**\\ () helper,\n+ * \t\t**bpf_clone_redirect**\\ () has the associated cost of\n+ * \t\tduplicating the packet buffer, but this can be executed out of\n+ * \t\tthe eBPF program. Conversely, **bpf_redirect**\\ () is more\n+ * \t\tefficient, but it is handled through an action code where the\n+ * \t\tredirection happens only after the eBPF program has returned.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n  *\n  * u64 bpf_get_current_pid_tgid(void)\n- *     Return: current->tgid << 32 | current->pid\n+ * \tReturn\n+ * \t\tA 64-bit integer containing the current tgid and pid, and\n+ * \t\tcreated as such:\n+ * \t\t*current_task*\\ **->tgid << 32 \\|**\n+ * \t\t*current_task*\\ **->pid**.\n  *\n  * u64 bpf_get_current_uid_gid(void)\n- *     Return: current_gid << 32 | current_uid\n- *\n- * int bpf_get_current_comm(char *buf, int size_of_buf)\n- *     stores current->comm into buf\n- *     Return: 0 on success or negative error\n- *\n- * u32 bpf_get_cgroup_classid(skb)\n- *     retrieve a proc's classid\n- *     @skb: pointer to skb\n- *     Return: classid if != 0\n- *\n- * int bpf_skb_vlan_push(skb, vlan_proto, vlan_tci)\n- *     Return: 0 on success or negative error\n- *\n- * int bpf_skb_vlan_pop(skb)\n- *     Return: 0 on success or negative error\n- *\n- * int bpf_skb_get_tunnel_key(skb, key, size, flags)\n- * int bpf_skb_set_tunnel_key(skb, key, size, flags)\n- *     retrieve or populate tunnel metadata\n- *     @skb: pointer to skb\n- *     @key: pointer to 'struct bpf_tunnel_key'\n- *     @size: size of 'struct bpf_tunnel_key'\n- *     @flags: room for future extensions\n- *     Return: 0 on success or negative error\n- *\n- * u64 bpf_perf_event_read(map, flags)\n- *     read perf event counter value\n- *     @map: pointer to perf_event_array map\n- *     @flags: index of event in the map or bitmask flags\n- *     Return: value of perf event counter read or error code\n- *\n- * int bpf_redirect(ifindex, flags)\n- *     redirect to another netdev\n- *     @ifindex: ifindex of the net device\n- *     @flags:\n- *\t  cls_bpf:\n- *          bit 0 - if set, redirect to ingress instead of egress\n- *          other bits - reserved\n- *\t  xdp_bpf:\n- *\t    all bits - reserved\n- *     Return: cls_bpf: TC_ACT_REDIRECT on success or TC_ACT_SHOT on error\n- *\t       xdp_bfp: XDP_REDIRECT on success or XDP_ABORT on error\n- * int bpf_redirect_map(map, key, flags)\n- *     redirect to endpoint in map\n- *     @map: pointer to dev map\n- *     @key: index in map to lookup\n- *     @flags: --\n- *     Return: XDP_REDIRECT on success or XDP_ABORT on error\n- *\n- * u32 bpf_get_route_realm(skb)\n- *     retrieve a dst's tclassid\n- *     @skb: pointer to skb\n- *     Return: realm if != 0\n- *\n- * int bpf_perf_event_output(ctx, map, flags, data, size)\n- *     output perf raw sample\n- *     @ctx: struct pt_regs*\n- *     @map: pointer to perf_event_array map\n- *     @flags: index of event in the map or bitmask flags\n- *     @data: data on stack to be output as raw data\n- *     @size: size of data\n- *     Return: 0 on success or negative error\n- *\n- * int bpf_get_stackid(ctx, map, flags)\n- *     walk user or kernel stack and return id\n- *     @ctx: struct pt_regs*\n- *     @map: pointer to stack_trace map\n- *     @flags: bits 0-7 - numer of stack frames to skip\n- *             bit 8 - collect user stack instead of kernel\n- *             bit 9 - compare stacks by hash only\n- *             bit 10 - if two different stacks hash into the same stackid\n- *                      discard old\n- *             other bits - reserved\n- *     Return: >= 0 stackid on success or negative error\n- *\n- * s64 bpf_csum_diff(from, from_size, to, to_size, seed)\n- *     calculate csum diff\n- *     @from: raw from buffer\n- *     @from_size: length of from buffer\n- *     @to: raw to buffer\n- *     @to_size: length of to buffer\n- *     @seed: optional seed\n- *     Return: csum result or negative error code\n- *\n- * int bpf_skb_get_tunnel_opt(skb, opt, size)\n- *     retrieve tunnel options metadata\n- *     @skb: pointer to skb\n- *     @opt: pointer to raw tunnel option data\n- *     @size: size of @opt\n- *     Return: option size\n- *\n- * int bpf_skb_set_tunnel_opt(skb, opt, size)\n- *     populate tunnel options metadata\n- *     @skb: pointer to skb\n- *     @opt: pointer to raw tunnel option data\n- *     @size: size of @opt\n- *     Return: 0 on success or negative error\n- *\n- * int bpf_skb_change_proto(skb, proto, flags)\n- *     Change protocol of the skb. Currently supported is v4 -> v6,\n- *     v6 -> v4 transitions. The helper will also resize the skb. eBPF\n- *     program is expected to fill the new headers via skb_store_bytes\n- *     and lX_csum_replace.\n- *     @skb: pointer to skb\n- *     @proto: new skb->protocol type\n- *     @flags: reserved\n- *     Return: 0 on success or negative error\n- *\n- * int bpf_skb_change_type(skb, type)\n- *     Change packet type of skb.\n- *     @skb: pointer to skb\n- *     @type: new skb->pkt_type type\n- *     Return: 0 on success or negative error\n- *\n- * int bpf_skb_under_cgroup(skb, map, index)\n- *     Check cgroup2 membership of skb\n- *     @skb: pointer to skb\n- *     @map: pointer to bpf_map in BPF_MAP_TYPE_CGROUP_ARRAY type\n- *     @index: index of the cgroup in the bpf_map\n- *     Return:\n- *       == 0 skb failed the cgroup2 descendant test\n- *       == 1 skb succeeded the cgroup2 descendant test\n- *        < 0 error\n- *\n- * u32 bpf_get_hash_recalc(skb)\n- *     Retrieve and possibly recalculate skb->hash.\n- *     @skb: pointer to skb\n- *     Return: hash\n+ * \tReturn\n+ * \t\tA 64-bit integer containing the current GID and UID, and\n+ * \t\tcreated as such: *current_gid* **<< 32 \\|** *current_uid*.\n+ *\n+ * int bpf_get_current_comm(char *buf, u32 size_of_buf)\n+ * \tDescription\n+ * \t\tCopy the **comm** attribute of the current task into *buf* of\n+ * \t\t*size_of_buf*. The **comm** attribute contains the name of\n+ * \t\tthe executable (excluding the path) for the current task. The\n+ * \t\t*size_of_buf* must be strictly positive. On success, the\n+ * \t\thelper makes sure that the *buf* is NUL-terminated. On failure,\n+ * \t\tit is filled with zeroes.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * u32 bpf_get_cgroup_classid(struct sk_buff *skb)\n+ * \tDescription\n+ * \t\tRetrieve the classid for the current task, i.e. for the net_cls\n+ * \t\tcgroup to which *skb* belongs.\n+ *\n+ * \t\tThis helper can be used on TC egress path, but not on ingress.\n+ *\n+ * \t\tThe net_cls cgroup provides an interface to tag network packets\n+ * \t\tbased on a user-provided identifier for all traffic coming from\n+ * \t\tthe tasks belonging to the related cgroup. See also the related\n+ * \t\tkernel documentation, available from the Linux sources in file\n+ * \t\t*Documentation/cgroup-v1/net_cls.txt*.\n+ *\n+ * \t\tThe Linux kernel has two versions for cgroups: there are\n+ * \t\tcgroups v1 and cgroups v2. Both are available to users, who can\n+ * \t\tuse a mixture of them, but note that the net_cls cgroup is for\n+ * \t\tcgroup v1 only. This makes it incompatible with BPF programs\n+ * \t\trun on cgroups, which is a cgroup-v2-only feature (a socket can\n+ * \t\tonly hold data for one version of cgroups at a time).\n+ *\n+ * \t\tThis helper is only available is the kernel was compiled with\n+ * \t\tthe **CONFIG_CGROUP_NET_CLASSID** configuration option set to\n+ * \t\t\"**y**\" or to \"**m**\".\n+ * \tReturn\n+ * \t\tThe classid, or 0 for the default unconfigured classid.\n+ *\n+ * int bpf_skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci)\n+ * \tDescription\n+ * \t\tPush a *vlan_tci* (VLAN tag control information) of protocol\n+ * \t\t*vlan_proto* to the packet associated to *skb*, then update\n+ * \t\tthe checksum. Note that if *vlan_proto* is different from\n+ * \t\t**ETH_P_8021Q** and **ETH_P_8021AD**, it is considered to\n+ * \t\tbe **ETH_P_8021Q**.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_skb_vlan_pop(struct sk_buff *skb)\n+ * \tDescription\n+ * \t\tPop a VLAN header from the packet associated to *skb*.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_skb_get_tunnel_key(struct sk_buff *skb, struct bpf_tunnel_key *key, u32 size, u64 flags)\n+ * \tDescription\n+ * \t\tGet tunnel metadata. This helper takes a pointer *key* to an\n+ * \t\tempty **struct bpf_tunnel_key** of **size**, that will be\n+ * \t\tfilled with tunnel metadata for the packet associated to *skb*.\n+ * \t\tThe *flags* can be set to **BPF_F_TUNINFO_IPV6**, which\n+ * \t\tindicates that the tunnel is based on IPv6 protocol instead of\n+ * \t\tIPv4.\n+ *\n+ * \t\tThe **struct bpf_tunnel_key** is an object that generalizes the\n+ * \t\tprincipal parameters used by various tunneling protocols into a\n+ * \t\tsingle struct. This way, it can be used to easily make a\n+ * \t\tdecision based on the contents of the encapsulation header,\n+ * \t\t\"summarized\" in this struct. In particular, it holds the IP\n+ * \t\taddress of the remote end (IPv4 or IPv6, depending on the case)\n+ * \t\tin *key*\\ **->remote_ipv4** or *key*\\ **->remote_ipv6**. Also,\n+ * \t\tthis struct exposes the *key*\\ **->tunnel_id**, which is\n+ * \t\tgenerally mapped to a VNI (Virtual Network Identifier), making\n+ * \t\tit programmable together with the **bpf_skb_set_tunnel_key**\\\n+ * \t\t() helper.\n+ *\n+ * \t\tLet's imagine that the following code is part of a program\n+ * \t\tattached to the TC ingress interface, on one end of a GRE\n+ * \t\ttunnel, and is supposed to filter out all messages coming from\n+ * \t\tremote ends with IPv4 address other than 10.0.0.1:\n+ *\n+ * \t\t::\n+ *\n+ * \t\t\tint ret;\n+ * \t\t\tstruct bpf_tunnel_key key = {};\n+ * \t\t\t\n+ * \t\t\tret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0);\n+ * \t\t\tif (ret < 0)\n+ * \t\t\t\treturn TC_ACT_SHOT;\t// drop packet\n+ * \t\t\t\n+ * \t\t\tif (key.remote_ipv4 != 0x0a000001)\n+ * \t\t\t\treturn TC_ACT_SHOT;\t// drop packet\n+ * \t\t\t\n+ * \t\t\treturn TC_ACT_OK;\t\t// accept packet\n+ *\n+ * \t\tThis interface can also be used with all encapsulation devices\n+ * \t\tthat can operate in \"collect metadata\" mode: instead of having\n+ * \t\tone network device per specific configuration, the \"collect\n+ * \t\tmetadata\" mode only requires a single device where the\n+ * \t\tconfiguration can be extracted from this helper.\n+ *\n+ * \t\tThis can be used together with various tunnels such as VXLan,\n+ * \t\tGeneve, GRE or IP in IP (IPIP).\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_skb_set_tunnel_key(struct sk_buff *skb, struct bpf_tunnel_key *key, u32 size, u64 flags)\n+ * \tDescription\n+ * \t\tPopulate tunnel metadata for packet associated to *skb.* The\n+ * \t\ttunnel metadata is set to the contents of *key*, of *size*. The\n+ * \t\t*flags* can be set to a combination of the following values:\n+ *\n+ * \t\t**BPF_F_TUNINFO_IPV6**\n+ * \t\t\tIndicate that the tunnel is based on IPv6 protocol\n+ * \t\t\tinstead of IPv4.\n+ * \t\t**BPF_F_ZERO_CSUM_TX**\n+ * \t\t\tFor IPv4 packets, add a flag to tunnel metadata\n+ * \t\t\tindicating that checksum computation should be skipped\n+ * \t\t\tand checksum set to zeroes.\n+ * \t\t**BPF_F_DONT_FRAGMENT**\n+ * \t\t\tAdd a flag to tunnel metadata indicating that the\n+ * \t\t\tpacket should not be fragmented.\n+ * \t\t**BPF_F_SEQ_NUMBER**\n+ * \t\t\tAdd a flag to tunnel metadata indicating that a\n+ * \t\t\tsequence number should be added to tunnel header before\n+ * \t\t\tsending the packet. This flag was added for GRE\n+ * \t\t\tencapsulation, but might be used with other protocols\n+ * \t\t\tas well in the future.\n+ *\n+ * \t\tHere is a typical usage on the transmit path:\n+ *\n+ * \t\t::\n+ *\n+ * \t\t\tstruct bpf_tunnel_key key;\n+ * \t\t\t     populate key ...\n+ * \t\t\tbpf_skb_set_tunnel_key(skb, &key, sizeof(key), 0);\n+ * \t\t\tbpf_clone_redirect(skb, vxlan_dev_ifindex, 0);\n+ *\n+ * \t\tSee also the description of the **bpf_skb_get_tunnel_key**\\ ()\n+ * \t\thelper for additional information.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * u64 bpf_perf_event_read(struct bpf_map *map, u64 flags)\n+ * \tDescription\n+ * \t\tRead the value of a perf event counter. This helper relies on a\n+ * \t\t*map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. The nature of\n+ * \t\tthe perf event counter is selected when *map* is updated with\n+ * \t\tperf event file descriptors. The *map* is an array whose size\n+ * \t\tis the number of available CPUs, and each cell contains a value\n+ * \t\trelative to one CPU. The value to retrieve is indicated by\n+ * \t\t*flags*, that contains the index of the CPU to look up, masked\n+ * \t\twith **BPF_F_INDEX_MASK**. Alternatively, *flags* can be set to\n+ * \t\t**BPF_F_CURRENT_CPU** to indicate that the value for the\n+ * \t\tcurrent CPU should be retrieved.\n+ *\n+ * \t\tNote that before Linux 4.13, only hardware perf event can be\n+ * \t\tretrieved.\n+ *\n+ * \t\tAlso, be aware that the newer helper\n+ * \t\t**bpf_perf_event_read_value**\\ () is recommended over\n+ * \t\t**bpf_perf_event_read**\\ () in general. The latter has some ABI\n+ * \t\tquirks where error and counter value are used as a return code\n+ * \t\t(which is wrong to do since ranges may overlap). This issue is\n+ * \t\tfixed with **bpf_perf_event_read_value**\\ (), which at the same\n+ * \t\ttime provides more features over the **bpf_perf_event_read**\\\n+ * \t\t() interface. Please refer to the description of\n+ * \t\t**bpf_perf_event_read_value**\\ () for details.\n+ * \tReturn\n+ * \t\tThe value of the perf event counter read from the map, or a\n+ * \t\tnegative error code in case of failure.\n+ *\n+ * int bpf_redirect(u32 ifindex, u64 flags)\n+ * \tDescription\n+ * \t\tRedirect the packet to another net device of index *ifindex*.\n+ * \t\tThis helper is somewhat similar to **bpf_clone_redirect**\\\n+ * \t\t(), except that the packet is not cloned, which provides\n+ * \t\tincreased performance.\n+ *\n+ * \t\tExcept for XDP, both ingress and egress interfaces can be used\n+ * \t\tfor redirection. The **BPF_F_INGRESS** value in *flags* is used\n+ * \t\tto make the distinction (ingress path is selected if the flag\n+ * \t\tis present, egress path otherwise). Currently, XDP only\n+ * \t\tsupports redirection to the egress interface, and accepts no\n+ * \t\tflag at all.\n+ *\n+ * \t\tThe same effect can be attained with the more generic\n+ * \t\t**bpf_redirect_map**\\ (), which requires specific maps to be\n+ * \t\tused but offers better performance.\n+ * \tReturn\n+ * \t\tFor XDP, the helper returns **XDP_REDIRECT** on success or\n+ * \t\t**XDP_ABORTED** on error. For other program types, the values\n+ * \t\tare **TC_ACT_REDIRECT** on success or **TC_ACT_SHOT** on\n+ * \t\terror.\n+ *\n+ * u32 bpf_get_route_realm(struct sk_buff *skb)\n+ * \tDescription\n+ * \t\tRetrieve the realm or the route, that is to say the\n+ * \t\t**tclassid** field of the destination for the *skb*. The\n+ * \t\tindentifier retrieved is a user-provided tag, similar to the\n+ * \t\tone used with the net_cls cgroup (see description for\n+ * \t\t**bpf_get_cgroup_classid**\\ () helper), but here this tag is\n+ * \t\theld by a route (a destination entry), not by a task.\n+ *\n+ * \t\tRetrieving this identifier works with the clsact TC egress hook\n+ * \t\t(see also **tc-bpf(8)**), or alternatively on conventional\n+ * \t\tclassful egress qdiscs, but not on TC ingress path. In case of\n+ * \t\tclsact TC egress hook, this has the advantage that, internally,\n+ * \t\tthe destination entry has not been dropped yet in the transmit\n+ * \t\tpath. Therefore, the destination entry does not need to be\n+ * \t\tartificially held via **netif_keep_dst**\\ () for a classful\n+ * \t\tqdisc until the *skb* is freed.\n+ *\n+ * \t\tThis helper is available only if the kernel was compiled with\n+ * \t\t**CONFIG_IP_ROUTE_CLASSID** configuration option.\n+ * \tReturn\n+ * \t\tThe realm of the route for the packet associated to *skb*, or 0\n+ * \t\tif none was found.\n+ *\n+ * int bpf_perf_event_output(struct pt_reg *ctx, struct bpf_map *map, u64 flags, void *data, u64 size)\n+ * \tDescription\n+ * \t\tWrite raw *data* blob into a special BPF perf event held by\n+ * \t\t*map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. This perf\n+ * \t\tevent must have the following attributes: **PERF_SAMPLE_RAW**\n+ * \t\tas **sample_type**, **PERF_TYPE_SOFTWARE** as **type**, and\n+ * \t\t**PERF_COUNT_SW_BPF_OUTPUT** as **config**.\n+ *\n+ * \t\tThe *flags* are used to indicate the index in *map* for which\n+ * \t\tthe value must be put, masked with **BPF_F_INDEX_MASK**.\n+ * \t\tAlternatively, *flags* can be set to **BPF_F_CURRENT_CPU**\n+ * \t\tto indicate that the index of the current CPU core should be\n+ * \t\tused.\n+ *\n+ * \t\tThe value to write, of *size*, is passed through eBPF stack and\n+ * \t\tpointed by *data*.\n+ *\n+ * \t\tThe context of the program *ctx* needs also be passed to the\n+ * \t\thelper.\n+ *\n+ * \t\tOn user space, a program willing to read the values needs to\n+ * \t\tcall **perf_event_open**\\ () on the perf event (either for\n+ * \t\tone or for all CPUs) and to store the file descriptor into the\n+ * \t\t*map*. This must be done before the eBPF program can send data\n+ * \t\tinto it. An example is available in file\n+ * \t\t*samples/bpf/trace_output_user.c* in the Linux kernel source\n+ * \t\ttree (the eBPF program counterpart is in\n+ * \t\t*samples/bpf/trace_output_kern.c*).\n+ *\n+ * \t\t**bpf_perf_event_output**\\ () achieves better performance\n+ * \t\tthan **bpf_trace_printk**\\ () for sharing data with user\n+ * \t\tspace, and is much better suitable for streaming data from eBPF\n+ * \t\tprograms.\n+ *\n+ * \t\tNote that this helper is not restricted to tracing use cases\n+ * \t\tand can be used with programs attached to TC or XDP as well,\n+ * \t\twhere it allows for passing data to user space listeners. Data\n+ * \t\tcan be:\n+ *\n+ * \t\t* Only custom structs,\n+ * \t\t* Only the packet payload, or\n+ * \t\t* A combination of both.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_skb_load_bytes(const struct sk_buff *skb, u32 offset, void *to, u32 len)\n+ * \tDescription\n+ * \t\tThis helper was provided as an easy way to load data from a\n+ * \t\tpacket. It can be used to load *len* bytes from *offset* from\n+ * \t\tthe packet associated to *skb*, into the buffer pointed by\n+ * \t\t*to*.\n+ *\n+ * \t\tSince Linux 4.7, usage of this helper has mostly been replaced\n+ * \t\tby \"direct packet access\", enabling packet data to be\n+ * \t\tmanipulated with *skb*\\ **->data** and *skb*\\ **->data_end**\n+ * \t\tpointing respectively to the first byte of packet data and to\n+ * \t\tthe byte after the last byte of packet data. However, it\n+ * \t\tremains useful if one wishes to read large quantities of data\n+ * \t\tat once from a packet into the eBPF stack.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_get_stackid(struct pt_reg *ctx, struct bpf_map *map, u64 flags)\n+ * \tDescription\n+ * \t\tWalk a user or a kernel stack and return its id. To achieve\n+ * \t\tthis, the helper needs *ctx*, which is a pointer to the context\n+ * \t\ton which the tracing program is executed, and a pointer to a\n+ * \t\t*map* of type **BPF_MAP_TYPE_STACK_TRACE**.\n+ *\n+ * \t\tThe last argument, *flags*, holds the number of stack frames to\n+ * \t\tskip (from 0 to 255), masked with\n+ * \t\t**BPF_F_SKIP_FIELD_MASK**. The next bits can be used to set\n+ * \t\ta combination of the following flags:\n+ *\n+ * \t\t**BPF_F_USER_STACK**\n+ * \t\t\tCollect a user space stack instead of a kernel stack.\n+ * \t\t**BPF_F_FAST_STACK_CMP**\n+ * \t\t\tCompare stacks by hash only.\n+ * \t\t**BPF_F_REUSE_STACKID**\n+ * \t\t\tIf two different stacks hash into the same *stackid*,\n+ * \t\t\tdiscard the old one.\n+ *\n+ * \t\tThe stack id retrieved is a 32 bit long integer handle which\n+ * \t\tcan be further combined with other data (including other stack\n+ * \t\tids) and used as a key into maps. This can be useful for\n+ * \t\tgenerating a variety of graphs (such as flame graphs or off-cpu\n+ * \t\tgraphs).\n+ *\n+ * \t\tFor walking a stack, this helper is an improvement over\n+ * \t\t**bpf_probe_read**\\ (), which can be used with unrolled loops\n+ * \t\tbut is not efficient and consumes a lot of eBPF instructions.\n+ * \t\tInstead, **bpf_get_stackid**\\ () can collect up to\n+ * \t\t**PERF_MAX_STACK_DEPTH** both kernel and user frames. Note that\n+ * \t\tthis limit can be controlled with the **sysctl** program, and\n+ * \t\tthat it should be manually increased in order to profile long\n+ * \t\tuser stacks (such as stacks for Java programs). To do so, use:\n+ *\n+ * \t\t::\n+ *\n+ * \t\t\t# sysctl kernel.perf_event_max_stack=<new value>\n+ * \tReturn\n+ * \t\tThe positive or null stack id on success, or a negative error\n+ * \t\tin case of failure.\n+ *\n+ * s64 bpf_csum_diff(__be32 *from, u32 from_size, __be32 *to, u32 to_size, __wsum seed)\n+ * \tDescription\n+ * \t\tCompute a checksum difference, from the raw buffer pointed by\n+ * \t\t*from*, of length *from_size* (that must be a multiple of 4),\n+ * \t\ttowards the raw buffer pointed by *to*, of size *to_size*\n+ * \t\t(same remark). An optional *seed* can be added to the value\n+ * \t\t(this can be cascaded, the seed may come from a previous call\n+ * \t\tto the helper).\n+ *\n+ * \t\tThis is flexible enough to be used in several ways:\n+ *\n+ * \t\t* With *from_size* == 0, *to_size* > 0 and *seed* set to\n+ * \t\t  checksum, it can be used when pushing new data.\n+ * \t\t* With *from_size* > 0, *to_size* == 0 and *seed* set to\n+ * \t\t  checksum, it can be used when removing data from a packet.\n+ * \t\t* With *from_size* > 0, *to_size* > 0 and *seed* set to 0, it\n+ * \t\t  can be used to compute a diff. Note that *from_size* and\n+ * \t\t  *to_size* do not need to be equal.\n+ *\n+ * \t\tThis helper can be used in combination with\n+ * \t\t**bpf_l3_csum_replace**\\ () and **bpf_l4_csum_replace**\\ (), to\n+ * \t\twhich one can feed in the difference computed with\n+ * \t\t**bpf_csum_diff**\\ ().\n+ * \tReturn\n+ * \t\tThe checksum result, or a negative error code in case of\n+ * \t\tfailure.\n+ *\n+ * int bpf_skb_get_tunnel_opt(struct sk_buff *skb, u8 *opt, u32 size)\n+ * \tDescription\n+ * \t\tRetrieve tunnel options metadata for the packet associated to\n+ * \t\t*skb*, and store the raw tunnel option data to the buffer *opt*\n+ * \t\tof *size*.\n+ *\n+ * \t\tThis helper can be used with encapsulation devices that can\n+ * \t\toperate in \"collect metadata\" mode (please refer to the related\n+ * \t\tnote in the description of **bpf_skb_get_tunnel_key**\\ () for\n+ * \t\tmore details). A particular example where this can be used is\n+ * \t\tin combination with the Geneve encapsulation protocol, where it\n+ * \t\tallows for pushing (with **bpf_skb_get_tunnel_opt**\\ () helper)\n+ * \t\tand retrieving arbitrary TLVs (Type-Length-Value headers) from\n+ * \t\tthe eBPF program. This allows for full customization of these\n+ * \t\theaders.\n+ * \tReturn\n+ * \t\tThe size of the option data retrieved.\n+ *\n+ * int bpf_skb_set_tunnel_opt(struct sk_buff *skb, u8 *opt, u32 size)\n+ * \tDescription\n+ * \t\tSet tunnel options metadata for the packet associated to *skb*\n+ * \t\tto the option data contained in the raw buffer *opt* of *size*.\n+ *\n+ * \t\tSee also the description of the **bpf_skb_get_tunnel_opt**\\ ()\n+ * \t\thelper for additional information.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_skb_change_proto(struct sk_buff *skb, __be16 proto, u64 flags)\n+ * \tDescription\n+ * \t\tChange the protocol of the *skb* to *proto*. Currently\n+ * \t\tsupported are transition from IPv4 to IPv6, and from IPv6 to\n+ * \t\tIPv4. The helper takes care of the groundwork for the\n+ * \t\ttransition, including resizing the socket buffer. The eBPF\n+ * \t\tprogram is expected to fill the new headers, if any, via\n+ * \t\t**skb_store_bytes**\\ () and to recompute the checksums with\n+ * \t\t**bpf_l3_csum_replace**\\ () and **bpf_l4_csum_replace**\\\n+ * \t\t(). The main case for this helper is to perform NAT64\n+ * \t\toperations out of an eBPF program.\n+ *\n+ * \t\tInternally, the GSO type is marked as dodgy so that headers are\n+ * \t\tchecked and segments are recalculated by the GSO/GRO engine.\n+ * \t\tThe size for GSO target is adapted as well.\n+ *\n+ * \t\tAll values for *flags* are reserved for future usage, and must\n+ * \t\tbe left at zero.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_skb_change_type(struct sk_buff *skb, u32 type)\n+ * \tDescription\n+ * \t\tChange the packet type for the packet associated to *skb*. This\n+ * \t\tcomes down to setting *skb*\\ **->pkt_type** to *type*, except\n+ * \t\tthe eBPF program does not have a write access to *skb*\\\n+ * \t\t**->pkt_type** beside this helper. Using a helper here allows\n+ * \t\tfor graceful handling of errors.\n+ *\n+ * \t\tThe major use case is to change incoming *skb*s to\n+ * \t\t**PACKET_HOST** in a programmatic way instead of having to\n+ * \t\trecirculate via **redirect**\\ (..., **BPF_F_INGRESS**), for\n+ * \t\texample.\n+ *\n+ * \t\tNote that *type* only allows certain values. At this time, they\n+ * \t\tare:\n+ *\n+ * \t\t**PACKET_HOST**\n+ * \t\t\tPacket is for us.\n+ * \t\t**PACKET_BROADCAST**\n+ * \t\t\tSend packet to all.\n+ * \t\t**PACKET_MULTICAST**\n+ * \t\t\tSend packet to group.\n+ * \t\t**PACKET_OTHERHOST**\n+ * \t\t\tSend packet to someone else.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_skb_under_cgroup(struct sk_buff *skb, struct bpf_map *map, u32 index)\n+ * \tDescription\n+ * \t\tCheck whether *skb* is a descendant of the cgroup2 held by\n+ * \t\t*map* of type **BPF_MAP_TYPE_CGROUP_ARRAY**, at *index*.\n+ * \tReturn\n+ * \t\tThe return value depends on the result of the test, and can be:\n+ *\n+ * \t\t* 0, if the *skb* failed the cgroup2 descendant test.\n+ * \t\t* 1, if the *skb* succeeded the cgroup2 descendant test.\n+ * \t\t* A negative error code, if an error occurred.\n+ *\n+ * u32 bpf_get_hash_recalc(struct sk_buff *skb)\n+ * \tDescription\n+ * \t\tRetrieve the hash of the packet, *skb*\\ **->hash**. If it is\n+ * \t\tnot set, in particular if the hash was cleared due to mangling,\n+ * \t\trecompute this hash. Later accesses to the hash can be done\n+ * \t\tdirectly with *skb*\\ **->hash**.\n+ *\n+ * \t\tCalling **bpf_set_hash_invalid**\\ (), changing a packet\n+ * \t\tprototype with **bpf_skb_change_proto**\\ (), or calling\n+ * \t\t**bpf_skb_store_bytes**\\ () with the\n+ * \t\t**BPF_F_INVALIDATE_HASH** are actions susceptible to clear\n+ * \t\tthe hash and to trigger a new computation for the next call to\n+ * \t\t**bpf_get_hash_recalc**\\ ().\n+ * \tReturn\n+ * \t\tThe 32-bit hash.\n  *\n  * u64 bpf_get_current_task(void)\n- *     Returns current task_struct\n- *     Return: current\n- *\n- * int bpf_probe_write_user(void *dst, void *src, int len)\n- *     safely attempt to write to a location\n- *     @dst: destination address in userspace\n- *     @src: source address on stack\n- *     @len: number of bytes to copy\n- *     Return: 0 on success or negative error\n- *\n- * int bpf_current_task_under_cgroup(map, index)\n- *     Check cgroup2 membership of current task\n- *     @map: pointer to bpf_map in BPF_MAP_TYPE_CGROUP_ARRAY type\n- *     @index: index of the cgroup in the bpf_map\n- *     Return:\n- *       == 0 current failed the cgroup2 descendant test\n- *       == 1 current succeeded the cgroup2 descendant test\n- *        < 0 error\n- *\n- * int bpf_skb_change_tail(skb, len, flags)\n- *     The helper will resize the skb to the given new size, to be used f.e.\n- *     with control messages.\n- *     @skb: pointer to skb\n- *     @len: new skb length\n- *     @flags: reserved\n- *     Return: 0 on success or negative error\n- *\n- * int bpf_skb_pull_data(skb, len)\n- *     The helper will pull in non-linear data in case the skb is non-linear\n- *     and not all of len are part of the linear section. Only needed for\n- *     read/write with direct packet access.\n- *     @skb: pointer to skb\n- *     @len: len to make read/writeable\n- *     Return: 0 on success or negative error\n- *\n- * s64 bpf_csum_update(skb, csum)\n- *     Adds csum into skb->csum in case of CHECKSUM_COMPLETE.\n- *     @skb: pointer to skb\n- *     @csum: csum to add\n- *     Return: csum on success or negative error\n- *\n- * void bpf_set_hash_invalid(skb)\n- *     Invalidate current skb->hash.\n- *     @skb: pointer to skb\n- *\n- * int bpf_get_numa_node_id()\n- *     Return: Id of current NUMA node.\n- *\n- * int bpf_skb_change_head()\n- *     Grows headroom of skb and adjusts MAC header offset accordingly.\n- *     Will extends/reallocae as required automatically.\n- *     May change skb data pointer and will thus invalidate any check\n- *     performed for direct packet access.\n- *     @skb: pointer to skb\n- *     @len: length of header to be pushed in front\n- *     @flags: Flags (unused for now)\n- *     Return: 0 on success or negative error\n- *\n- * int bpf_xdp_adjust_head(xdp_md, delta)\n- *     Adjust the xdp_md.data by delta\n- *     @xdp_md: pointer to xdp_md\n- *     @delta: An positive/negative integer to be added to xdp_md.data\n- *     Return: 0 on success or negative on error\n+ * \tReturn\n+ * \t\tA pointer to the current task struct.\n+ *\n+ * int bpf_probe_write_user(void *dst, const void *src, u32 len)\n+ * \tDescription\n+ * \t\tAttempt in a safe way to write *len* bytes from the buffer\n+ * \t\t*src* to *dst* in memory. It only works for threads that are in\n+ * \t\tuser context, and *dst* must be a valid user space address.\n+ *\n+ * \t\tThis helper should not be used to implement any kind of\n+ * \t\tsecurity mechanism because of TOC-TOU attacks, but rather to\n+ * \t\tdebug, divert, and manipulate execution of semi-cooperative\n+ * \t\tprocesses.\n+ *\n+ * \t\tKeep in mind that this feature is meant for experiments, and it\n+ * \t\thas a risk of crashing the system and running programs.\n+ * \t\tTherefore, when an eBPF program using this helper is attached,\n+ * \t\ta warning including PID and process name is printed to kernel\n+ * \t\tlogs.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_current_task_under_cgroup(struct bpf_map *map, u32 index)\n+ * \tDescription\n+ * \t\tCheck whether the probe is being run is the context of a given\n+ * \t\tsubset of the cgroup2 hierarchy. The cgroup2 to test is held by\n+ * \t\t*map* of type **BPF_MAP_TYPE_CGROUP_ARRAY**, at *index*.\n+ * \tReturn\n+ * \t\tThe return value depends on the result of the test, and can be:\n+ *\n+ * \t\t* 0, if the *skb* task belongs to the cgroup2.\n+ * \t\t* 1, if the *skb* task does not belong to the cgroup2.\n+ * \t\t* A negative error code, if an error occurred.\n+ *\n+ * int bpf_skb_change_tail(struct sk_buff *skb, u32 len, u64 flags)\n+ * \tDescription\n+ * \t\tResize (trim or grow) the packet associated to *skb* to the\n+ * \t\tnew *len*. The *flags* are reserved for future usage, and must\n+ * \t\tbe left at zero.\n+ *\n+ * \t\tThe basic idea is that the helper performs the needed work to\n+ * \t\tchange the size of the packet, then the eBPF program rewrites\n+ * \t\tthe rest via helpers like **bpf_skb_store_bytes**\\ (),\n+ * \t\t**bpf_l3_csum_replace**\\ (), **bpf_l3_csum_replace**\\ ()\n+ * \t\tand others. This helper is a slow path utility intended for\n+ * \t\treplies with control messages. And because it is targeted for\n+ * \t\tslow path, the helper itself can afford to be slow: it\n+ * \t\timplicitly linearizes, unclones and drops offloads from the\n+ * \t\t*skb*.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_skb_pull_data(struct sk_buff *skb, u32 len)\n+ * \tDescription\n+ * \t\tPull in non-linear data in case the *skb* is non-linear and not\n+ * \t\tall of *len* are part of the linear section. Make *len* bytes\n+ * \t\tfrom *skb* readable and writable. If a zero value is passed for\n+ * \t\t*len*, then the whole length of the *skb* is pulled.\n+ *\n+ * \t\tThis helper is only needed for reading and writing with direct\n+ * \t\tpacket access.\n+ *\n+ * \t\tFor direct packet access, testing that offsets to access\n+ * \t\tare within packet boundaries (test on *skb*\\ **->data_end**) is\n+ * \t\tsusceptible to fail if offsets are invalid, or if the requested\n+ * \t\tdata is in non-linear parts of the *skb*. On failure the\n+ * \t\tprogram can just bail out, or in the case of a non-linear\n+ * \t\tbuffer, use a helper to make the data available. The\n+ * \t\t**bpf_skb_load_bytes**\\ () helper is a first solution to access\n+ * \t\tthe data. Another one consists in using **bpf_skb_pull_data**\n+ * \t\tto pull in once the non-linear parts, then retesting and\n+ * \t\teventually access the data.\n+ *\n+ * \t\tAt the same time, this also makes sure the *skb* is uncloned,\n+ * \t\twhich is a necessary condition for direct write. As this needs\n+ * \t\tto be an invariant for the write part only, the verifier\n+ * \t\tdetects writes and adds a prologue that is calling\n+ * \t\t**bpf_skb_pull_data()** to effectively unclone the *skb* from\n+ * \t\tthe very beginning in case it is indeed cloned.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * s64 bpf_csum_update(struct sk_buff *skb, __wsum csum)\n+ * \tDescription\n+ * \t\tAdd the checksum *csum* into *skb*\\ **->csum** in case the\n+ * \t\tdriver has supplied a checksum for the entire packet into that\n+ * \t\tfield. Return an error otherwise. This helper is intended to be\n+ * \t\tused in combination with **bpf_csum_diff**\\ (), in particular\n+ * \t\twhen the checksum needs to be updated after data has been\n+ * \t\twritten into the packet through direct packet access.\n+ * \tReturn\n+ * \t\tThe checksum on success, or a negative error code in case of\n+ * \t\tfailure.\n+ *\n+ * void bpf_set_hash_invalid(struct sk_buff *skb)\n+ * \tDescription\n+ * \t\tInvalidate the current *skb*\\ **->hash**. It can be used after\n+ * \t\tmangling on headers through direct packet access, in order to\n+ * \t\tindicate that the hash is outdated and to trigger a\n+ * \t\trecalculation the next time the kernel tries to access this\n+ * \t\thash or when the **bpf_get_hash_recalc**\\ () helper is called.\n+ *\n+ * int bpf_get_numa_node_id(void)\n+ * \tDescription\n+ * \t\tReturn the id of the current NUMA node. The primary use case\n+ * \t\tfor this helper is the selection of sockets for the local NUMA\n+ * \t\tnode, when the program is attached to sockets using the\n+ * \t\t**SO_ATTACH_REUSEPORT_EBPF** option (see also **socket(7)**),\n+ * \t\tbut the helper is also available to other eBPF program types,\n+ * \t\tsimilarly to **bpf_get_smp_processor_id**\\ ().\n+ * \tReturn\n+ * \t\tThe id of current NUMA node.\n+ *\n+ * int bpf_skb_change_head(struct sk_buff *skb, u32 len, u64 flags)\n+ * \tDescription\n+ * \t\tGrows headroom of packet associated to *skb* and adjusts the\n+ * \t\toffset of the MAC header accordingly, adding *len* bytes of\n+ * \t\tspace. It automatically extends and reallocates memory as\n+ * \t\trequired.\n+ *\n+ * \t\tThis helper can be used on a layer 3 *skb* to push a MAC header\n+ * \t\tfor redirection into a layer 2 device.\n+ *\n+ * \t\tAll values for *flags* are reserved for future usage, and must\n+ * \t\tbe left at zero.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_xdp_adjust_head(struct xdp_buff *xdp_md, int delta)\n+ * \tDescription\n+ * \t\tAdjust (move) *xdp_md*\\ **->data** by *delta* bytes. Note that\n+ * \t\tit is possible to use a negative value for *delta*. This helper\n+ * \t\tcan be used to prepare the packet for pushing or popping\n+ * \t\theaders.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n  *\n  * int bpf_probe_read_str(void *dst, int size, const void *unsafe_ptr)\n- *     Copy a NUL terminated string from unsafe address. In case the string\n- *     length is smaller than size, the target is not padded with further NUL\n- *     bytes. In case the string length is larger than size, just count-1\n- *     bytes are copied and the last byte is set to NUL.\n- *     @dst: destination address\n- *     @size: maximum number of bytes to copy, including the trailing NUL\n- *     @unsafe_ptr: unsafe address\n- *     Return:\n- *       > 0 length of the string including the trailing NUL on success\n- *       < 0 error\n- *\n- * u64 bpf_get_socket_cookie(skb)\n- *     Get the cookie for the socket stored inside sk_buff.\n- *     @skb: pointer to skb\n- *     Return: 8 Bytes non-decreasing number on success or 0 if the socket\n- *     field is missing inside sk_buff\n- *\n- * u32 bpf_get_socket_uid(skb)\n- *     Get the owner uid of the socket stored inside sk_buff.\n- *     @skb: pointer to skb\n- *     Return: uid of the socket owner on success or overflowuid if failed.\n- *\n- * u32 bpf_set_hash(skb, hash)\n- *     Set full skb->hash.\n- *     @skb: pointer to skb\n- *     @hash: hash to set\n- *\n- * int bpf_setsockopt(bpf_socket, level, optname, optval, optlen)\n- *     Calls setsockopt. Not all opts are available, only those with\n- *     integer optvals plus TCP_CONGESTION.\n- *     Supported levels: SOL_SOCKET and IPPROTO_TCP\n- *     @bpf_socket: pointer to bpf_socket\n- *     @level: SOL_SOCKET or IPPROTO_TCP\n- *     @optname: option name\n- *     @optval: pointer to option value\n- *     @optlen: length of optval in bytes\n- *     Return: 0 or negative error\n- *\n- * int bpf_getsockopt(bpf_socket, level, optname, optval, optlen)\n- *     Calls getsockopt. Not all opts are available.\n- *     Supported levels: IPPROTO_TCP\n- *     @bpf_socket: pointer to bpf_socket\n- *     @level: IPPROTO_TCP\n- *     @optname: option name\n- *     @optval: pointer to option value\n- *     @optlen: length of optval in bytes\n- *     Return: 0 or negative error\n- *\n- * int bpf_sock_ops_cb_flags_set(bpf_sock_ops, flags)\n- *     Set callback flags for sock_ops\n- *     @bpf_sock_ops: pointer to bpf_sock_ops_kern struct\n- *     @flags: flags value\n- *     Return: 0 for no error\n- *             -EINVAL if there is no full tcp socket\n- *             bits in flags that are not supported by current kernel\n- *\n- * int bpf_skb_adjust_room(skb, len_diff, mode, flags)\n- *     Grow or shrink room in sk_buff.\n- *     @skb: pointer to skb\n- *     @len_diff: (signed) amount of room to grow/shrink\n- *     @mode: operation mode (enum bpf_adj_room_mode)\n- *     @flags: reserved for future use\n- *     Return: 0 on success or negative error code\n- *\n- * int bpf_sk_redirect_map(map, key, flags)\n- *     Redirect skb to a sock in map using key as a lookup key for the\n- *     sock in map.\n- *     @map: pointer to sockmap\n- *     @key: key to lookup sock in map\n- *     @flags: reserved for future use\n- *     Return: SK_PASS\n- *\n- * int bpf_sock_map_update(skops, map, key, flags)\n- *\t@skops: pointer to bpf_sock_ops\n- *\t@map: pointer to sockmap to update\n- *\t@key: key to insert/update sock in map\n- *\t@flags: same flags as map update elem\n- *\n- * int bpf_xdp_adjust_meta(xdp_md, delta)\n- *     Adjust the xdp_md.data_meta by delta\n- *     @xdp_md: pointer to xdp_md\n- *     @delta: An positive/negative integer to be added to xdp_md.data_meta\n- *     Return: 0 on success or negative on error\n- *\n- * int bpf_perf_event_read_value(map, flags, buf, buf_size)\n- *     read perf event counter value and perf event enabled/running time\n- *     @map: pointer to perf_event_array map\n- *     @flags: index of event in the map or bitmask flags\n- *     @buf: buf to fill\n- *     @buf_size: size of the buf\n- *     Return: 0 on success or negative error code\n- *\n- * int bpf_perf_prog_read_value(ctx, buf, buf_size)\n- *     read perf prog attached perf event counter and enabled/running time\n- *     @ctx: pointer to ctx\n- *     @buf: buf to fill\n- *     @buf_size: size of the buf\n- *     Return : 0 on success or negative error code\n- *\n- * int bpf_override_return(pt_regs, rc)\n- *\t@pt_regs: pointer to struct pt_regs\n- *\t@rc: the return value to set\n+ * \tDescription\n+ * \t\tCopy a NUL terminated string from an unsafe address\n+ * \t\t*unsafe_ptr* to *dst*. The *size* should include the\n+ * \t\tterminating NUL byte. In case the string length is smaller than\n+ * \t\t*size*, the target is not padded with further NUL bytes. If the\n+ * \t\tstring length is larger than *size*, just *size*-1 bytes are\n+ * \t\tcopied and the last byte is set to NUL.\n+ *\n+ * \t\tOn success, the length of the copied string is returned. This\n+ * \t\tmakes this helper useful in tracing programs for reading\n+ * \t\tstrings, and more importantly to get its length at runtime. See\n+ * \t\tthe following snippet:\n+ *\n+ * \t\t::\n+ *\n+ * \t\t\tSEC(\"kprobe/sys_open\")\n+ * \t\t\tvoid bpf_sys_open(struct pt_regs *ctx)\n+ * \t\t\t{\n+ * \t\t\t        char buf[PATHLEN]; // PATHLEN is defined to 256\n+ * \t\t\t        int res = bpf_probe_read_str(buf, sizeof(buf),\n+ * \t\t\t\t                             ctx->di);\n+ *\n+ * \t\t\t\t// Consume buf, for example push it to\n+ * \t\t\t\t// userspace via bpf_perf_event_output(); we\n+ * \t\t\t\t// can use res (the string length) as event\n+ * \t\t\t\t// size, after checking its boundaries.\n+ * \t\t\t}\n+ *\n+ * \t\tIn comparison, using **bpf_probe_read()** helper here instead\n+ * \t\tto read the string would require to estimate the length at\n+ * \t\tcompile time, and would often result in copying more memory\n+ * \t\tthan necessary.\n+ *\n+ * \t\tAnother useful use case is when parsing individual process\n+ * \t\targuments or individual environment variables navigating\n+ * \t\t*current*\\ **->mm->arg_start** and *current*\\\n+ * \t\t**->mm->env_start**: using this helper and the return value,\n+ * \t\tone can quickly iterate at the right offset of the memory area.\n+ * \tReturn\n+ * \t\tOn success, the strictly positive length of the string,\n+ * \t\tincluding the trailing NUL character. On error, a negative\n+ * \t\tvalue.\n+ *\n+ * u64 bpf_get_socket_cookie(struct sk_buff *skb)\n+ * \tDescription\n+ * \t\tIf the **struct sk_buff** pointed by *skb* has a known socket,\n+ * \t\tretrieve the cookie (generated by the kernel) of this socket.\n+ * \t\tIf no cookie has been set yet, generate a new cookie. Once\n+ * \t\tgenerated, the socket cookie remains stable for the life of the\n+ * \t\tsocket. This helper can be useful for monitoring per socket\n+ * \t\tnetworking traffic statistics as it provides a unique socket\n+ * \t\tidentifier per namespace.\n+ * \tReturn\n+ * \t\tA 8-byte long non-decreasing number on success, or 0 if the\n+ * \t\tsocket field is missing inside *skb*.\n+ *\n+ * u64 bpf_get_socket_cookie(struct bpf_sock_addr *ctx)\n+ * \tDescription\n+ * \t\tEquivalent to bpf_get_socket_cookie() helper that accepts\n+ * \t\t*skb*, but gets socket from **struct bpf_sock_addr** contex.\n+ * \tReturn\n+ * \t\tA 8-byte long non-decreasing number.\n+ *\n+ * u64 bpf_get_socket_cookie(struct bpf_sock_ops *ctx)\n+ * \tDescription\n+ * \t\tEquivalent to bpf_get_socket_cookie() helper that accepts\n+ * \t\t*skb*, but gets socket from **struct bpf_sock_ops** contex.\n+ * \tReturn\n+ * \t\tA 8-byte long non-decreasing number.\n+ *\n+ * u32 bpf_get_socket_uid(struct sk_buff *skb)\n+ * \tReturn\n+ * \t\tThe owner UID of the socket associated to *skb*. If the socket\n+ * \t\tis **NULL**, or if it is not a full socket (i.e. if it is a\n+ * \t\ttime-wait or a request socket instead), **overflowuid** value\n+ * \t\tis returned (note that **overflowuid** might also be the actual\n+ * \t\tUID value for the socket).\n+ *\n+ * u32 bpf_set_hash(struct sk_buff *skb, u32 hash)\n+ * \tDescription\n+ * \t\tSet the full hash for *skb* (set the field *skb*\\ **->hash**)\n+ * \t\tto value *hash*.\n+ * \tReturn\n+ * \t\t0\n+ *\n+ * int bpf_setsockopt(struct bpf_sock_ops *bpf_socket, int level, int optname, char *optval, int optlen)\n+ * \tDescription\n+ * \t\tEmulate a call to **setsockopt()** on the socket associated to\n+ * \t\t*bpf_socket*, which must be a full socket. The *level* at\n+ * \t\twhich the option resides and the name *optname* of the option\n+ * \t\tmust be specified, see **setsockopt(2)** for more information.\n+ * \t\tThe option value of length *optlen* is pointed by *optval*.\n+ *\n+ * \t\tThis helper actually implements a subset of **setsockopt()**.\n+ * \t\tIt supports the following *level*\\ s:\n+ *\n+ * \t\t* **SOL_SOCKET**, which supports the following *optname*\\ s:\n+ * \t\t  **SO_RCVBUF**, **SO_SNDBUF**, **SO_MAX_PACING_RATE**,\n+ * \t\t  **SO_PRIORITY**, **SO_RCVLOWAT**, **SO_MARK**.\n+ * \t\t* **IPPROTO_TCP**, which supports the following *optname*\\ s:\n+ * \t\t  **TCP_CONGESTION**, **TCP_BPF_IW**,\n+ * \t\t  **TCP_BPF_SNDCWND_CLAMP**.\n+ * \t\t* **IPPROTO_IP**, which supports *optname* **IP_TOS**.\n+ * \t\t* **IPPROTO_IPV6**, which supports *optname* **IPV6_TCLASS**.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_skb_adjust_room(struct sk_buff *skb, s32 len_diff, u32 mode, u64 flags)\n+ * \tDescription\n+ * \t\tGrow or shrink the room for data in the packet associated to\n+ * \t\t*skb* by *len_diff*, and according to the selected *mode*.\n+ *\n+ * \t\tThere is a single supported mode at this time:\n+ *\n+ * \t\t* **BPF_ADJ_ROOM_NET**: Adjust room at the network layer\n+ * \t\t  (room space is added or removed below the layer 3 header).\n+ *\n+ * \t\tAll values for *flags* are reserved for future usage, and must\n+ * \t\tbe left at zero.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_redirect_map(struct bpf_map *map, u32 key, u64 flags)\n+ * \tDescription\n+ * \t\tRedirect the packet to the endpoint referenced by *map* at\n+ * \t\tindex *key*. Depending on its type, this *map* can contain\n+ * \t\treferences to net devices (for forwarding packets through other\n+ * \t\tports), or to CPUs (for redirecting XDP frames to another CPU;\n+ * \t\tbut this is only implemented for native XDP (with driver\n+ * \t\tsupport) as of this writing).\n+ *\n+ * \t\tAll values for *flags* are reserved for future usage, and must\n+ * \t\tbe left at zero.\n+ *\n+ * \t\tWhen used to redirect packets to net devices, this helper\n+ * \t\tprovides a high performance increase over **bpf_redirect**\\ ().\n+ * \t\tThis is due to various implementation details of the underlying\n+ * \t\tmechanisms, one of which is the fact that **bpf_redirect_map**\\\n+ * \t\t() tries to send packet as a \"bulk\" to the device.\n+ * \tReturn\n+ * \t\t**XDP_REDIRECT** on success, or **XDP_ABORTED** on error.\n+ *\n+ * int bpf_sk_redirect_map(struct bpf_map *map, u32 key, u64 flags)\n+ * \tDescription\n+ * \t\tRedirect the packet to the socket referenced by *map* (of type\n+ * \t\t**BPF_MAP_TYPE_SOCKMAP**) at index *key*. Both ingress and\n+ * \t\tegress interfaces can be used for redirection. The\n+ * \t\t**BPF_F_INGRESS** value in *flags* is used to make the\n+ * \t\tdistinction (ingress path is selected if the flag is present,\n+ * \t\tegress path otherwise). This is the only flag supported for now.\n+ * \tReturn\n+ * \t\t**SK_PASS** on success, or **SK_DROP** on error.\n+ *\n+ * int bpf_sock_map_update(struct bpf_sock_ops *skops, struct bpf_map *map, void *key, u64 flags)\n+ * \tDescription\n+ * \t\tAdd an entry to, or update a *map* referencing sockets. The\n+ * \t\t*skops* is used as a new value for the entry associated to\n+ * \t\t*key*. *flags* is one of:\n+ *\n+ * \t\t**BPF_NOEXIST**\n+ * \t\t\tThe entry for *key* must not exist in the map.\n+ * \t\t**BPF_EXIST**\n+ * \t\t\tThe entry for *key* must already exist in the map.\n+ * \t\t**BPF_ANY**\n+ * \t\t\tNo condition on the existence of the entry for *key*.\n+ *\n+ * \t\tIf the *map* has eBPF programs (parser and verdict), those will\n+ * \t\tbe inherited by the socket being added. If the socket is\n+ * \t\talready attached to eBPF programs, this results in an error.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_xdp_adjust_meta(struct xdp_buff *xdp_md, int delta)\n+ * \tDescription\n+ * \t\tAdjust the address pointed by *xdp_md*\\ **->data_meta** by\n+ * \t\t*delta* (which can be positive or negative). Note that this\n+ * \t\toperation modifies the address stored in *xdp_md*\\ **->data**,\n+ * \t\tso the latter must be loaded only after the helper has been\n+ * \t\tcalled.\n+ *\n+ * \t\tThe use of *xdp_md*\\ **->data_meta** is optional and programs\n+ * \t\tare not required to use it. The rationale is that when the\n+ * \t\tpacket is processed with XDP (e.g. as DoS filter), it is\n+ * \t\tpossible to push further meta data along with it before passing\n+ * \t\tto the stack, and to give the guarantee that an ingress eBPF\n+ * \t\tprogram attached as a TC classifier on the same device can pick\n+ * \t\tthis up for further post-processing. Since TC works with socket\n+ * \t\tbuffers, it remains possible to set from XDP the **mark** or\n+ * \t\t**priority** pointers, or other pointers for the socket buffer.\n+ * \t\tHaving this scratch space generic and programmable allows for\n+ * \t\tmore flexibility as the user is free to store whatever meta\n+ * \t\tdata they need.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_perf_event_read_value(struct bpf_map *map, u64 flags, struct bpf_perf_event_value *buf, u32 buf_size)\n+ * \tDescription\n+ * \t\tRead the value of a perf event counter, and store it into *buf*\n+ * \t\tof size *buf_size*. This helper relies on a *map* of type\n+ * \t\t**BPF_MAP_TYPE_PERF_EVENT_ARRAY**. The nature of the perf event\n+ * \t\tcounter is selected when *map* is updated with perf event file\n+ * \t\tdescriptors. The *map* is an array whose size is the number of\n+ * \t\tavailable CPUs, and each cell contains a value relative to one\n+ * \t\tCPU. The value to retrieve is indicated by *flags*, that\n+ * \t\tcontains the index of the CPU to look up, masked with\n+ * \t\t**BPF_F_INDEX_MASK**. Alternatively, *flags* can be set to\n+ * \t\t**BPF_F_CURRENT_CPU** to indicate that the value for the\n+ * \t\tcurrent CPU should be retrieved.\n+ *\n+ * \t\tThis helper behaves in a way close to\n+ * \t\t**bpf_perf_event_read**\\ () helper, save that instead of\n+ * \t\tjust returning the value observed, it fills the *buf*\n+ * \t\tstructure. This allows for additional data to be retrieved: in\n+ * \t\tparticular, the enabled and running times (in *buf*\\\n+ * \t\t**->enabled** and *buf*\\ **->running**, respectively) are\n+ * \t\tcopied. In general, **bpf_perf_event_read_value**\\ () is\n+ * \t\trecommended over **bpf_perf_event_read**\\ (), which has some\n+ * \t\tABI issues and provides fewer functionalities.\n+ *\n+ * \t\tThese values are interesting, because hardware PMU (Performance\n+ * \t\tMonitoring Unit) counters are limited resources. When there are\n+ * \t\tmore PMU based perf events opened than available counters,\n+ * \t\tkernel will multiplex these events so each event gets certain\n+ * \t\tpercentage (but not all) of the PMU time. In case that\n+ * \t\tmultiplexing happens, the number of samples or counter value\n+ * \t\twill not reflect the case compared to when no multiplexing\n+ * \t\toccurs. This makes comparison between different runs difficult.\n+ * \t\tTypically, the counter value should be normalized before\n+ * \t\tcomparing to other experiments. The usual normalization is done\n+ * \t\tas follows.\n+ *\n+ * \t\t::\n+ *\n+ * \t\t\tnormalized_counter = counter * t_enabled / t_running\n+ *\n+ * \t\tWhere t_enabled is the time enabled for event and t_running is\n+ * \t\tthe time running for event since last normalization. The\n+ * \t\tenabled and running times are accumulated since the perf event\n+ * \t\topen. To achieve scaling factor between two invocations of an\n+ * \t\teBPF program, users can can use CPU id as the key (which is\n+ * \t\ttypical for perf array usage model) to remember the previous\n+ * \t\tvalue and do the calculation inside the eBPF program.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_perf_prog_read_value(struct bpf_perf_event_data *ctx, struct bpf_perf_event_value *buf, u32 buf_size)\n+ * \tDescription\n+ * \t\tFor en eBPF program attached to a perf event, retrieve the\n+ * \t\tvalue of the event counter associated to *ctx* and store it in\n+ * \t\tthe structure pointed by *buf* and of size *buf_size*. Enabled\n+ * \t\tand running times are also stored in the structure (see\n+ * \t\tdescription of helper **bpf_perf_event_read_value**\\ () for\n+ * \t\tmore details).\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_getsockopt(struct bpf_sock_ops *bpf_socket, int level, int optname, char *optval, int optlen)\n+ * \tDescription\n+ * \t\tEmulate a call to **getsockopt()** on the socket associated to\n+ * \t\t*bpf_socket*, which must be a full socket. The *level* at\n+ * \t\twhich the option resides and the name *optname* of the option\n+ * \t\tmust be specified, see **getsockopt(2)** for more information.\n+ * \t\tThe retrieved value is stored in the structure pointed by\n+ * \t\t*opval* and of length *optlen*.\n+ *\n+ * \t\tThis helper actually implements a subset of **getsockopt()**.\n+ * \t\tIt supports the following *level*\\ s:\n+ *\n+ * \t\t* **IPPROTO_TCP**, which supports *optname*\n+ * \t\t  **TCP_CONGESTION**.\n+ * \t\t* **IPPROTO_IP**, which supports *optname* **IP_TOS**.\n+ * \t\t* **IPPROTO_IPV6**, which supports *optname* **IPV6_TCLASS**.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_override_return(struct pt_reg *regs, u64 rc)\n+ * \tDescription\n+ * \t\tUsed for error injection, this helper uses kprobes to override\n+ * \t\tthe return value of the probed function, and to set it to *rc*.\n+ * \t\tThe first argument is the context *regs* on which the kprobe\n+ * \t\tworks.\n+ *\n+ * \t\tThis helper works by setting setting the PC (program counter)\n+ * \t\tto an override function which is run in place of the original\n+ * \t\tprobed function. This means the probed function is not run at\n+ * \t\tall. The replacement function just returns with the required\n+ * \t\tvalue.\n+ *\n+ * \t\tThis helper has security implications, and thus is subject to\n+ * \t\trestrictions. It is only available if the kernel was compiled\n+ * \t\twith the **CONFIG_BPF_KPROBE_OVERRIDE** configuration\n+ * \t\toption, and in this case it only works on functions tagged with\n+ * \t\t**ALLOW_ERROR_INJECTION** in the kernel code.\n+ *\n+ * \t\tAlso, the helper is only available for the architectures having\n+ * \t\tthe CONFIG_FUNCTION_ERROR_INJECTION option. As of this writing,\n+ * \t\tx86 architecture is the only one to support this feature.\n+ * \tReturn\n+ * \t\t0\n+ *\n+ * int bpf_sock_ops_cb_flags_set(struct bpf_sock_ops *bpf_sock, int argval)\n+ * \tDescription\n+ * \t\tAttempt to set the value of the **bpf_sock_ops_cb_flags** field\n+ * \t\tfor the full TCP socket associated to *bpf_sock_ops* to\n+ * \t\t*argval*.\n+ *\n+ * \t\tThe primary use of this field is to determine if there should\n+ * \t\tbe calls to eBPF programs of type\n+ * \t\t**BPF_PROG_TYPE_SOCK_OPS** at various points in the TCP\n+ * \t\tcode. A program of the same type can change its value, per\n+ * \t\tconnection and as necessary, when the connection is\n+ * \t\testablished. This field is directly accessible for reading, but\n+ * \t\tthis helper must be used for updates in order to return an\n+ * \t\terror if an eBPF program tries to set a callback that is not\n+ * \t\tsupported in the current kernel.\n+ *\n+ * \t\tThe supported callback values that *argval* can combine are:\n+ *\n+ * \t\t* **BPF_SOCK_OPS_RTO_CB_FLAG** (retransmission time out)\n+ * \t\t* **BPF_SOCK_OPS_RETRANS_CB_FLAG** (retransmission)\n+ * \t\t* **BPF_SOCK_OPS_STATE_CB_FLAG** (TCP state change)\n+ *\n+ * \t\tHere are some examples of where one could call such eBPF\n+ * \t\tprogram:\n+ *\n+ * \t\t* When RTO fires.\n+ * \t\t* When a packet is retransmitted.\n+ * \t\t* When the connection terminates.\n+ * \t\t* When a packet is sent.\n+ * \t\t* When a packet is received.\n+ * \tReturn\n+ * \t\tCode **-EINVAL** if the socket is not a full TCP socket;\n+ * \t\totherwise, a positive number containing the bits that could not\n+ * \t\tbe set is returned (which comes down to 0 if all bits were set\n+ * \t\tas required).\n+ *\n+ * int bpf_msg_redirect_map(struct sk_msg_buff *msg, struct bpf_map *map, u32 key, u64 flags)\n+ * \tDescription\n+ * \t\tThis helper is used in programs implementing policies at the\n+ * \t\tsocket level. If the message *msg* is allowed to pass (i.e. if\n+ * \t\tthe verdict eBPF program returns **SK_PASS**), redirect it to\n+ * \t\tthe socket referenced by *map* (of type\n+ * \t\t**BPF_MAP_TYPE_SOCKMAP**) at index *key*. Both ingress and\n+ * \t\tegress interfaces can be used for redirection. The\n+ * \t\t**BPF_F_INGRESS** value in *flags* is used to make the\n+ * \t\tdistinction (ingress path is selected if the flag is present,\n+ * \t\tegress path otherwise). This is the only flag supported for now.\n+ * \tReturn\n+ * \t\t**SK_PASS** on success, or **SK_DROP** on error.\n+ *\n+ * int bpf_msg_apply_bytes(struct sk_msg_buff *msg, u32 bytes)\n+ * \tDescription\n+ * \t\tFor socket policies, apply the verdict of the eBPF program to\n+ * \t\tthe next *bytes* (number of bytes) of message *msg*.\n+ *\n+ * \t\tFor example, this helper can be used in the following cases:\n+ *\n+ * \t\t* A single **sendmsg**\\ () or **sendfile**\\ () system call\n+ * \t\t  contains multiple logical messages that the eBPF program is\n+ * \t\t  supposed to read and for which it should apply a verdict.\n+ * \t\t* An eBPF program only cares to read the first *bytes* of a\n+ * \t\t  *msg*. If the message has a large payload, then setting up\n+ * \t\t  and calling the eBPF program repeatedly for all bytes, even\n+ * \t\t  though the verdict is already known, would create unnecessary\n+ * \t\t  overhead.\n+ *\n+ * \t\tWhen called from within an eBPF program, the helper sets a\n+ * \t\tcounter internal to the BPF infrastructure, that is used to\n+ * \t\tapply the last verdict to the next *bytes*. If *bytes* is\n+ * \t\tsmaller than the current data being processed from a\n+ * \t\t**sendmsg**\\ () or **sendfile**\\ () system call, the first\n+ * \t\t*bytes* will be sent and the eBPF program will be re-run with\n+ * \t\tthe pointer for start of data pointing to byte number *bytes*\n+ * \t\t**+ 1**. If *bytes* is larger than the current data being\n+ * \t\tprocessed, then the eBPF verdict will be applied to multiple\n+ * \t\t**sendmsg**\\ () or **sendfile**\\ () calls until *bytes* are\n+ * \t\tconsumed.\n+ *\n+ * \t\tNote that if a socket closes with the internal counter holding\n+ * \t\ta non-zero value, this is not a problem because data is not\n+ * \t\tbeing buffered for *bytes* and is sent as it is received.\n+ * \tReturn\n+ * \t\t0\n+ *\n+ * int bpf_msg_cork_bytes(struct sk_msg_buff *msg, u32 bytes)\n+ * \tDescription\n+ * \t\tFor socket policies, prevent the execution of the verdict eBPF\n+ * \t\tprogram for message *msg* until *bytes* (byte number) have been\n+ * \t\taccumulated.\n+ *\n+ * \t\tThis can be used when one needs a specific number of bytes\n+ * \t\tbefore a verdict can be assigned, even if the data spans\n+ * \t\tmultiple **sendmsg**\\ () or **sendfile**\\ () calls. The extreme\n+ * \t\tcase would be a user calling **sendmsg**\\ () repeatedly with\n+ * \t\t1-byte long message segments. Obviously, this is bad for\n+ * \t\tperformance, but it is still valid. If the eBPF program needs\n+ * \t\t*bytes* bytes to validate a header, this helper can be used to\n+ * \t\tprevent the eBPF program to be called again until *bytes* have\n+ * \t\tbeen accumulated.\n+ * \tReturn\n+ * \t\t0\n+ *\n+ * int bpf_msg_pull_data(struct sk_msg_buff *msg, u32 start, u32 end, u64 flags)\n+ * \tDescription\n+ * \t\tFor socket policies, pull in non-linear data from user space\n+ * \t\tfor *msg* and set pointers *msg*\\ **->data** and *msg*\\\n+ * \t\t**->data_end** to *start* and *end* bytes offsets into *msg*,\n+ * \t\trespectively.\n+ *\n+ * \t\tIf a program of type **BPF_PROG_TYPE_SK_MSG** is run on a\n+ * \t\t*msg* it can only parse data that the (**data**, **data_end**)\n+ * \t\tpointers have already consumed. For **sendmsg**\\ () hooks this\n+ * \t\tis likely the first scatterlist element. But for calls relying\n+ * \t\ton the **sendpage** handler (e.g. **sendfile**\\ ()) this will\n+ * \t\tbe the range (**0**, **0**) because the data is shared with\n+ * \t\tuser space and by default the objective is to avoid allowing\n+ * \t\tuser space to modify data while (or after) eBPF verdict is\n+ * \t\tbeing decided. This helper can be used to pull in data and to\n+ * \t\tset the start and end pointer to given values. Data will be\n+ * \t\tcopied if necessary (i.e. if data was not linear and if start\n+ * \t\tand end pointers do not point to the same chunk).\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ *\n+ * \t\tAll values for *flags* are reserved for future usage, and must\n+ * \t\tbe left at zero.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_bind(struct bpf_sock_addr *ctx, struct sockaddr *addr, int addr_len)\n+ * \tDescription\n+ * \t\tBind the socket associated to *ctx* to the address pointed by\n+ * \t\t*addr*, of length *addr_len*. This allows for making outgoing\n+ * \t\tconnection from the desired IP address, which can be useful for\n+ * \t\texample when all processes inside a cgroup should use one\n+ * \t\tsingle IP address on a host that has multiple IP configured.\n+ *\n+ * \t\tThis helper works for IPv4 and IPv6, TCP and UDP sockets. The\n+ * \t\tdomain (*addr*\\ **->sa_family**) must be **AF_INET** (or\n+ * \t\t**AF_INET6**). Looking for a free port to bind to can be\n+ * \t\texpensive, therefore binding to port is not permitted by the\n+ * \t\thelper: *addr*\\ **->sin_port** (or **sin6_port**, respectively)\n+ * \t\tmust be set to zero.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_xdp_adjust_tail(struct xdp_buff *xdp_md, int delta)\n+ * \tDescription\n+ * \t\tAdjust (move) *xdp_md*\\ **->data_end** by *delta* bytes. It is\n+ * \t\tonly possible to shrink the packet as of this writing,\n+ * \t\ttherefore *delta* must be a negative integer.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_skb_get_xfrm_state(struct sk_buff *skb, u32 index, struct bpf_xfrm_state *xfrm_state, u32 size, u64 flags)\n+ * \tDescription\n+ * \t\tRetrieve the XFRM state (IP transform framework, see also\n+ * \t\t**ip-xfrm(8)**) at *index* in XFRM \"security path\" for *skb*.\n+ *\n+ * \t\tThe retrieved value is stored in the **struct bpf_xfrm_state**\n+ * \t\tpointed by *xfrm_state* and of length *size*.\n+ *\n+ * \t\tAll values for *flags* are reserved for future usage, and must\n+ * \t\tbe left at zero.\n+ *\n+ * \t\tThis helper is available only if the kernel was compiled with\n+ * \t\t**CONFIG_XFRM** configuration option.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_get_stack(struct pt_regs *regs, void *buf, u32 size, u64 flags)\n+ * \tDescription\n+ * \t\tReturn a user or a kernel stack in bpf program provided buffer.\n+ * \t\tTo achieve this, the helper needs *ctx*, which is a pointer\n+ * \t\tto the context on which the tracing program is executed.\n+ * \t\tTo store the stacktrace, the bpf program provides *buf* with\n+ * \t\ta nonnegative *size*.\n+ *\n+ * \t\tThe last argument, *flags*, holds the number of stack frames to\n+ * \t\tskip (from 0 to 255), masked with\n+ * \t\t**BPF_F_SKIP_FIELD_MASK**. The next bits can be used to set\n+ * \t\tthe following flags:\n+ *\n+ * \t\t**BPF_F_USER_STACK**\n+ * \t\t\tCollect a user space stack instead of a kernel stack.\n+ * \t\t**BPF_F_USER_BUILD_ID**\n+ * \t\t\tCollect buildid+offset instead of ips for user stack,\n+ * \t\t\tonly valid if **BPF_F_USER_STACK** is also specified.\n+ *\n+ * \t\t**bpf_get_stack**\\ () can collect up to\n+ * \t\t**PERF_MAX_STACK_DEPTH** both kernel and user frames, subject\n+ * \t\tto sufficient large buffer size. Note that\n+ * \t\tthis limit can be controlled with the **sysctl** program, and\n+ * \t\tthat it should be manually increased in order to profile long\n+ * \t\tuser stacks (such as stacks for Java programs). To do so, use:\n+ *\n+ * \t\t::\n+ *\n+ * \t\t\t# sysctl kernel.perf_event_max_stack=<new value>\n+ * \tReturn\n+ * \t\tA non-negative value equal to or less than *size* on success,\n+ * \t\tor a negative error in case of failure.\n+ *\n+ * int bpf_skb_load_bytes_relative(const struct sk_buff *skb, u32 offset, void *to, u32 len, u32 start_header)\n+ * \tDescription\n+ * \t\tThis helper is similar to **bpf_skb_load_bytes**\\ () in that\n+ * \t\tit provides an easy way to load *len* bytes from *offset*\n+ * \t\tfrom the packet associated to *skb*, into the buffer pointed\n+ * \t\tby *to*. The difference to **bpf_skb_load_bytes**\\ () is that\n+ * \t\ta fifth argument *start_header* exists in order to select a\n+ * \t\tbase offset to start from. *start_header* can be one of:\n+ *\n+ * \t\t**BPF_HDR_START_MAC**\n+ * \t\t\tBase offset to load data from is *skb*'s mac header.\n+ * \t\t**BPF_HDR_START_NET**\n+ * \t\t\tBase offset to load data from is *skb*'s network header.\n+ *\n+ * \t\tIn general, \"direct packet access\" is the preferred method to\n+ * \t\taccess packet data, however, this helper is in particular useful\n+ * \t\tin socket filters where *skb*\\ **->data** does not always point\n+ * \t\tto the start of the mac header and where \"direct packet access\"\n+ * \t\tis not available.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_fib_lookup(void *ctx, struct bpf_fib_lookup *params, int plen, u32 flags)\n+ *\tDescription\n+ *\t\tDo FIB lookup in kernel tables using parameters in *params*.\n+ *\t\tIf lookup is successful and result shows packet is to be\n+ *\t\tforwarded, the neighbor tables are searched for the nexthop.\n+ *\t\tIf successful (ie., FIB lookup shows forwarding and nexthop\n+ *\t\tis resolved), the nexthop address is returned in ipv4_dst\n+ *\t\tor ipv6_dst based on family, smac is set to mac address of\n+ *\t\tegress device, dmac is set to nexthop mac address, rt_metric\n+ *\t\tis set to metric from route (IPv4/IPv6 only), and ifindex\n+ *\t\tis set to the device index of the nexthop from the FIB lookup.\n+ *\n+ *\t\t*plen* argument is the size of the passed in struct.\n+ *\t\t*flags* argument can be a combination of one or more of the\n+ *\t\tfollowing values:\n+ *\n+ *\t\t**BPF_FIB_LOOKUP_DIRECT**\n+ *\t\t\tDo a direct table lookup vs full lookup using FIB\n+ *\t\t\trules.\n+ *\t\t**BPF_FIB_LOOKUP_OUTPUT**\n+ *\t\t\tPerform lookup from an egress perspective (default is\n+ *\t\t\tingress).\n+ *\n+ *\t\t*ctx* is either **struct xdp_md** for XDP programs or\n+ *\t\t**struct sk_buff** tc cls_act programs.\n+ *\tReturn\n+ *\t\t* < 0 if any input argument is invalid\n+ *\t\t*   0 on success (packet is forwarded, nexthop neighbor exists)\n+ *\t\t* > 0 one of **BPF_FIB_LKUP_RET_** codes explaining why the\n+ *\t\t  packet is not forwarded or needs assist from full stack\n+ *\n+ * int bpf_sock_hash_update(struct bpf_sock_ops_kern *skops, struct bpf_map *map, void *key, u64 flags)\n+ *\tDescription\n+ *\t\tAdd an entry to, or update a sockhash *map* referencing sockets.\n+ *\t\tThe *skops* is used as a new value for the entry associated to\n+ *\t\t*key*. *flags* is one of:\n+ *\n+ *\t\t**BPF_NOEXIST**\n+ *\t\t\tThe entry for *key* must not exist in the map.\n+ *\t\t**BPF_EXIST**\n+ *\t\t\tThe entry for *key* must already exist in the map.\n+ *\t\t**BPF_ANY**\n+ *\t\t\tNo condition on the existence of the entry for *key*.\n+ *\n+ *\t\tIf the *map* has eBPF programs (parser and verdict), those will\n+ *\t\tbe inherited by the socket being added. If the socket is\n+ *\t\talready attached to eBPF programs, this results in an error.\n+ *\tReturn\n+ *\t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_msg_redirect_hash(struct sk_msg_buff *msg, struct bpf_map *map, void *key, u64 flags)\n+ *\tDescription\n+ *\t\tThis helper is used in programs implementing policies at the\n+ *\t\tsocket level. If the message *msg* is allowed to pass (i.e. if\n+ *\t\tthe verdict eBPF program returns **SK_PASS**), redirect it to\n+ *\t\tthe socket referenced by *map* (of type\n+ *\t\t**BPF_MAP_TYPE_SOCKHASH**) using hash *key*. Both ingress and\n+ *\t\tegress interfaces can be used for redirection. The\n+ *\t\t**BPF_F_INGRESS** value in *flags* is used to make the\n+ *\t\tdistinction (ingress path is selected if the flag is present,\n+ *\t\tegress path otherwise). This is the only flag supported for now.\n+ *\tReturn\n+ *\t\t**SK_PASS** on success, or **SK_DROP** on error.\n+ *\n+ * int bpf_sk_redirect_hash(struct sk_buff *skb, struct bpf_map *map, void *key, u64 flags)\n+ *\tDescription\n+ *\t\tThis helper is used in programs implementing policies at the\n+ *\t\tskb socket level. If the sk_buff *skb* is allowed to pass (i.e.\n+ *\t\tif the verdeict eBPF program returns **SK_PASS**), redirect it\n+ *\t\tto the socket referenced by *map* (of type\n+ *\t\t**BPF_MAP_TYPE_SOCKHASH**) using hash *key*. Both ingress and\n+ *\t\tegress interfaces can be used for redirection. The\n+ *\t\t**BPF_F_INGRESS** value in *flags* is used to make the\n+ *\t\tdistinction (ingress path is selected if the flag is present,\n+ *\t\tegress otherwise). This is the only flag supported for now.\n+ *\tReturn\n+ *\t\t**SK_PASS** on success, or **SK_DROP** on error.\n+ *\n+ * int bpf_lwt_push_encap(struct sk_buff *skb, u32 type, void *hdr, u32 len)\n+ *\tDescription\n+ *\t\tEncapsulate the packet associated to *skb* within a Layer 3\n+ *\t\tprotocol header. This header is provided in the buffer at\n+ *\t\taddress *hdr*, with *len* its size in bytes. *type* indicates\n+ *\t\tthe protocol of the header and can be one of:\n+ *\n+ *\t\t**BPF_LWT_ENCAP_SEG6**\n+ *\t\t\tIPv6 encapsulation with Segment Routing Header\n+ *\t\t\t(**struct ipv6_sr_hdr**). *hdr* only contains the SRH,\n+ *\t\t\tthe IPv6 header is computed by the kernel.\n+ *\t\t**BPF_LWT_ENCAP_SEG6_INLINE**\n+ *\t\t\tOnly works if *skb* contains an IPv6 packet. Insert a\n+ *\t\t\tSegment Routing Header (**struct ipv6_sr_hdr**) inside\n+ *\t\t\tthe IPv6 header.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ *\tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_lwt_seg6_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len)\n+ *\tDescription\n+ *\t\tStore *len* bytes from address *from* into the packet\n+ *\t\tassociated to *skb*, at *offset*. Only the flags, tag and TLVs\n+ *\t\tinside the outermost IPv6 Segment Routing Header can be\n+ *\t\tmodified through this helper.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ *\tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_lwt_seg6_adjust_srh(struct sk_buff *skb, u32 offset, s32 delta)\n+ *\tDescription\n+ *\t\tAdjust the size allocated to TLVs in the outermost IPv6\n+ *\t\tSegment Routing Header contained in the packet associated to\n+ *\t\t*skb*, at position *offset* by *delta* bytes. Only offsets\n+ *\t\tafter the segments are accepted. *delta* can be as well\n+ *\t\tpositive (growing) as negative (shrinking).\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ *\tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_lwt_seg6_action(struct sk_buff *skb, u32 action, void *param, u32 param_len)\n+ *\tDescription\n+ *\t\tApply an IPv6 Segment Routing action of type *action* to the\n+ *\t\tpacket associated to *skb*. Each action takes a parameter\n+ *\t\tcontained at address *param*, and of length *param_len* bytes.\n+ *\t\t*action* can be one of:\n+ *\n+ *\t\t**SEG6_LOCAL_ACTION_END_X**\n+ *\t\t\tEnd.X action: Endpoint with Layer-3 cross-connect.\n+ *\t\t\tType of *param*: **struct in6_addr**.\n+ *\t\t**SEG6_LOCAL_ACTION_END_T**\n+ *\t\t\tEnd.T action: Endpoint with specific IPv6 table lookup.\n+ *\t\t\tType of *param*: **int**.\n+ *\t\t**SEG6_LOCAL_ACTION_END_B6**\n+ *\t\t\tEnd.B6 action: Endpoint bound to an SRv6 policy.\n+ *\t\t\tType of param: **struct ipv6_sr_hdr**.\n+ *\t\t**SEG6_LOCAL_ACTION_END_B6_ENCAP**\n+ *\t\t\tEnd.B6.Encap action: Endpoint bound to an SRv6\n+ *\t\t\tencapsulation policy.\n+ *\t\t\tType of param: **struct ipv6_sr_hdr**.\n+ *\n+ * \t\tA call to this helper is susceptible to change the underlaying\n+ * \t\tpacket buffer. Therefore, at load time, all checks on pointers\n+ * \t\tpreviously done by the verifier are invalidated and must be\n+ * \t\tperformed again, if the helper is used in combination with\n+ * \t\tdirect packet access.\n+ *\tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_rc_keydown(void *ctx, u32 protocol, u64 scancode, u32 toggle)\n+ *\tDescription\n+ *\t\tThis helper is used in programs implementing IR decoding, to\n+ *\t\treport a successfully decoded key press with *scancode*,\n+ *\t\t*toggle* value in the given *protocol*. The scancode will be\n+ *\t\ttranslated to a keycode using the rc keymap, and reported as\n+ *\t\tan input key down event. After a period a key up event is\n+ *\t\tgenerated. This period can be extended by calling either\n+ *\t\t**bpf_rc_keydown**\\ () again with the same values, or calling\n+ *\t\t**bpf_rc_repeat**\\ ().\n+ *\n+ *\t\tSome protocols include a toggle bit, in case the button\twas\n+ *\t\treleased and pressed again between consecutive scancodes.\n+ *\n+ *\t\tThe *ctx* should point to the lirc sample as passed into\n+ *\t\tthe program.\n+ *\n+ *\t\tThe *protocol* is the decoded protocol number (see\n+ *\t\t**enum rc_proto** for some predefined values).\n+ *\n+ *\t\tThis helper is only available is the kernel was compiled with\n+ *\t\tthe **CONFIG_BPF_LIRC_MODE2** configuration option set to\n+ *\t\t\"**y**\".\n+ *\tReturn\n+ *\t\t0\n+ *\n+ * int bpf_rc_repeat(void *ctx)\n+ *\tDescription\n+ *\t\tThis helper is used in programs implementing IR decoding, to\n+ *\t\treport a successfully decoded repeat key message. This delays\n+ *\t\tthe generation of a key up event for previously generated\n+ *\t\tkey down event.\n+ *\n+ *\t\tSome IR protocols like NEC have a special IR message for\n+ *\t\trepeating last button, for when a button is held down.\n+ *\n+ *\t\tThe *ctx* should point to the lirc sample as passed into\n+ *\t\tthe program.\n+ *\n+ *\t\tThis helper is only available is the kernel was compiled with\n+ *\t\tthe **CONFIG_BPF_LIRC_MODE2** configuration option set to\n+ *\t\t\"**y**\".\n+ *\tReturn\n+ *\t\t0\n+ *\n+ * uint64_t bpf_skb_cgroup_id(struct sk_buff *skb)\n+ * \tDescription\n+ * \t\tReturn the cgroup v2 id of the socket associated with the *skb*.\n+ * \t\tThis is roughly similar to the **bpf_get_cgroup_classid**\\ ()\n+ * \t\thelper for cgroup v1 by providing a tag resp. identifier that\n+ * \t\tcan be matched on or used for map lookups e.g. to implement\n+ * \t\tpolicy. The cgroup v2 id of a given path in the hierarchy is\n+ * \t\texposed in user space through the f_handle API in order to get\n+ * \t\tto the same 64-bit id.\n+ *\n+ * \t\tThis helper can be used on TC egress path, but not on ingress,\n+ * \t\tand is available only if the kernel was compiled with the\n+ * \t\t**CONFIG_SOCK_CGROUP_DATA** configuration option.\n+ * \tReturn\n+ * \t\tThe id is returned or 0 in case the id could not be retrieved.\n+ *\n+ * u64 bpf_skb_ancestor_cgroup_id(struct sk_buff *skb, int ancestor_level)\n+ *\tDescription\n+ *\t\tReturn id of cgroup v2 that is ancestor of cgroup associated\n+ *\t\twith the *skb* at the *ancestor_level*.  The root cgroup is at\n+ *\t\t*ancestor_level* zero and each step down the hierarchy\n+ *\t\tincrements the level. If *ancestor_level* == level of cgroup\n+ *\t\tassociated with *skb*, then return value will be same as that\n+ *\t\tof **bpf_skb_cgroup_id**\\ ().\n+ *\n+ *\t\tThe helper is useful to implement policies based on cgroups\n+ *\t\tthat are upper in hierarchy than immediate cgroup associated\n+ *\t\twith *skb*.\n+ *\n+ *\t\tThe format of returned id and helper limitations are same as in\n+ *\t\t**bpf_skb_cgroup_id**\\ ().\n+ *\tReturn\n+ *\t\tThe id is returned or 0 in case the id could not be retrieved.\n+ *\n+ * u64 bpf_get_current_cgroup_id(void)\n+ * \tReturn\n+ * \t\tA 64-bit integer containing the current cgroup id based\n+ * \t\ton the cgroup within which the current task is running.\n+ *\n+ * void* get_local_storage(void *map, u64 flags)\n+ *\tDescription\n+ *\t\tGet the pointer to the local storage area.\n+ *\t\tThe type and the size of the local storage is defined\n+ *\t\tby the *map* argument.\n+ *\t\tThe *flags* meaning is specific for each map type,\n+ *\t\tand has to be 0 for cgroup local storage.\n+ *\n+ *\t\tDepending on the BPF program type, a local storage area\n+ *\t\tcan be shared between multiple instances of the BPF program,\n+ *\t\trunning simultaneously.\n+ *\n+ *\t\tA user should care about the synchronization by himself.\n+ *\t\tFor example, by using the **BPF_STX_XADD** instruction to alter\n+ *\t\tthe shared data.\n+ *\tReturn\n+ *\t\tA pointer to the local storage area.\n+ *\n+ * int bpf_sk_select_reuseport(struct sk_reuseport_md *reuse, struct bpf_map *map, void *key, u64 flags)\n+ *\tDescription\n+ *\t\tSelect a **SO_REUSEPORT** socket from a\n+ *\t\t**BPF_MAP_TYPE_REUSEPORT_ARRAY** *map*.\n+ *\t\tIt checks the selected socket is matching the incoming\n+ *\t\trequest in the socket buffer.\n+ *\tReturn\n+ *\t\t0 on success, or a negative error in case of failure.\n+ *\n+ * struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)\n+ *\tDescription\n+ *\t\tLook for TCP socket matching *tuple*, optionally in a child\n+ *\t\tnetwork namespace *netns*. The return value must be checked,\n+ *\t\tand if non-**NULL**, released via **bpf_sk_release**\\ ().\n+ *\n+ *\t\tThe *ctx* should point to the context of the program, such as\n+ *\t\tthe skb or socket (depending on the hook in use). This is used\n+ *\t\tto determine the base network namespace for the lookup.\n+ *\n+ *\t\t*tuple_size* must be one of:\n+ *\n+ *\t\t**sizeof**\\ (*tuple*\\ **->ipv4**)\n+ *\t\t\tLook for an IPv4 socket.\n+ *\t\t**sizeof**\\ (*tuple*\\ **->ipv6**)\n+ *\t\t\tLook for an IPv6 socket.\n+ *\n+ *\t\tIf the *netns* is a negative signed 32-bit integer, then the\n+ *\t\tsocket lookup table in the netns associated with the *ctx* will\n+ *\t\twill be used. For the TC hooks, this is the netns of the device\n+ *\t\tin the skb. For socket hooks, this is the netns of the socket.\n+ *\t\tIf *netns* is any other signed 32-bit value greater than or\n+ *\t\tequal to zero then it specifies the ID of the netns relative to\n+ *\t\tthe netns associated with the *ctx*. *netns* values beyond the\n+ *\t\trange of 32-bit integers are reserved for future use.\n+ *\n+ *\t\tAll values for *flags* are reserved for future usage, and must\n+ *\t\tbe left at zero.\n+ *\n+ *\t\tThis helper is available only if the kernel was compiled with\n+ *\t\t**CONFIG_NET** configuration option.\n+ *\tReturn\n+ *\t\tPointer to **struct bpf_sock**, or **NULL** in case of failure.\n+ *\t\tFor sockets with reuseport option, the **struct bpf_sock**\n+ *\t\tresult is from **reuse->socks**\\ [] using the hash of the tuple.\n+ *\n+ * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)\n+ *\tDescription\n+ *\t\tLook for UDP socket matching *tuple*, optionally in a child\n+ *\t\tnetwork namespace *netns*. The return value must be checked,\n+ *\t\tand if non-**NULL**, released via **bpf_sk_release**\\ ().\n+ *\n+ *\t\tThe *ctx* should point to the context of the program, such as\n+ *\t\tthe skb or socket (depending on the hook in use). This is used\n+ *\t\tto determine the base network namespace for the lookup.\n+ *\n+ *\t\t*tuple_size* must be one of:\n+ *\n+ *\t\t**sizeof**\\ (*tuple*\\ **->ipv4**)\n+ *\t\t\tLook for an IPv4 socket.\n+ *\t\t**sizeof**\\ (*tuple*\\ **->ipv6**)\n+ *\t\t\tLook for an IPv6 socket.\n+ *\n+ *\t\tIf the *netns* is a negative signed 32-bit integer, then the\n+ *\t\tsocket lookup table in the netns associated with the *ctx* will\n+ *\t\twill be used. For the TC hooks, this is the netns of the device\n+ *\t\tin the skb. For socket hooks, this is the netns of the socket.\n+ *\t\tIf *netns* is any other signed 32-bit value greater than or\n+ *\t\tequal to zero then it specifies the ID of the netns relative to\n+ *\t\tthe netns associated with the *ctx*. *netns* values beyond the\n+ *\t\trange of 32-bit integers are reserved for future use.\n+ *\n+ *\t\tAll values for *flags* are reserved for future usage, and must\n+ *\t\tbe left at zero.\n+ *\n+ *\t\tThis helper is available only if the kernel was compiled with\n+ *\t\t**CONFIG_NET** configuration option.\n+ *\tReturn\n+ *\t\tPointer to **struct bpf_sock**, or **NULL** in case of failure.\n+ *\t\tFor sockets with reuseport option, the **struct bpf_sock**\n+ *\t\tresult is from **reuse->socks**\\ [] using the hash of the tuple.\n+ *\n+ * int bpf_sk_release(struct bpf_sock *sock)\n+ *\tDescription\n+ *\t\tRelease the reference held by *sock*. *sock* must be a\n+ *\t\tnon-**NULL** pointer that was returned from\n+ *\t\t**bpf_sk_lookup_xxx**\\ ().\n+ *\tReturn\n+ *\t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_map_pop_elem(struct bpf_map *map, void *value)\n+ * \tDescription\n+ * \t\tPop an element from *map*.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_map_peek_elem(struct bpf_map *map, void *value)\n+ * \tDescription\n+ * \t\tGet an element from *map* without removing it.\n+ * \tReturn\n+ * \t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_msg_push_data(struct sk_buff *skb, u32 start, u32 len, u64 flags)\n+ *\tDescription\n+ *\t\tFor socket policies, insert *len* bytes into *msg* at offset\n+ *\t\t*start*.\n+ *\n+ *\t\tIf a program of type **BPF_PROG_TYPE_SK_MSG** is run on a\n+ *\t\t*msg* it may want to insert metadata or options into the *msg*.\n+ *\t\tThis can later be read and used by any of the lower layer BPF\n+ *\t\thooks.\n+ *\n+ *\t\tThis helper may fail if under memory pressure (a malloc\n+ *\t\tfails) in these cases BPF programs will get an appropriate\n+ *\t\terror and BPF programs will need to handle them.\n+ *\tReturn\n+ *\t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_msg_pop_data(struct sk_msg_buff *msg, u32 start, u32 pop, u64 flags)\n+ *\tDescription\n+ *\t\tWill remove *pop* bytes from a *msg* starting at byte *start*.\n+ *\t\tThis may result in **ENOMEM** errors under certain situations if\n+ *\t\tan allocation and copy are required due to a full ring buffer.\n+ *\t\tHowever, the helper will try to avoid doing the allocation\n+ *\t\tif possible. Other errors can occur if input parameters are\n+ *\t\tinvalid either due to *start* byte not being valid part of *msg*\n+ *\t\tpayload and/or *pop* value being to large.\n+ *\tReturn\n+ *\t\t0 on success, or a negative error in case of failure.\n+ *\n+ * int bpf_rc_pointer_rel(void *ctx, s32 rel_x, s32 rel_y)\n+ *\tDescription\n+ *\t\tThis helper is used in programs implementing IR decoding, to\n+ *\t\treport a successfully decoded pointer movement.\n+ *\n+ *\t\tThe *ctx* should point to the lirc sample as passed into\n+ *\t\tthe program.\n+ *\n+ *\t\tThis helper is only available is the kernel was compiled with\n+ *\t\tthe **CONFIG_BPF_LIRC_MODE2** configuration option set to\n+ *\t\t\"**y**\".\n+ *\tReturn\n+ *\t\t0\n  */\n #define __BPF_FUNC_MAPPER(FN)\t\t\\\n-        FN(unspec),\t\t\t\\\n-        FN(map_lookup_elem),\t\t\\\n-        FN(map_update_elem),\t\t\\\n-        FN(map_delete_elem),\t\t\\\n-        FN(probe_read),\t\t\t\\\n-        FN(ktime_get_ns),\t\t\\\n-        FN(trace_printk),\t\t\\\n-        FN(get_prandom_u32),\t\t\\\n-        FN(get_smp_processor_id),\t\\\n-        FN(skb_store_bytes),\t\t\\\n-        FN(l3_csum_replace),\t\t\\\n-        FN(l4_csum_replace),\t\t\\\n-        FN(tail_call),\t\t\t\\\n-        FN(clone_redirect),\t\t\\\n-        FN(get_current_pid_tgid),\t\\\n-        FN(get_current_uid_gid),\t\\\n-        FN(get_current_comm),\t\t\\\n-        FN(get_cgroup_classid),\t\t\\\n-        FN(skb_vlan_push),\t\t\\\n-        FN(skb_vlan_pop),\t\t\\\n-        FN(skb_get_tunnel_key),\t\t\\\n-        FN(skb_set_tunnel_key),\t\t\\\n-        FN(perf_event_read),\t\t\\\n-        FN(redirect),\t\t\t\\\n-        FN(get_route_realm),\t\t\\\n-        FN(perf_event_output),\t\t\\\n-        FN(skb_load_bytes),\t\t\\\n-        FN(get_stackid),\t\t\\\n-        FN(csum_diff),\t\t\t\\\n-        FN(skb_get_tunnel_opt),\t\t\\\n-        FN(skb_set_tunnel_opt),\t\t\\\n-        FN(skb_change_proto),\t\t\\\n-        FN(skb_change_type),\t\t\\\n-        FN(skb_under_cgroup),\t\t\\\n-        FN(get_hash_recalc),\t\t\\\n-        FN(get_current_task),\t\t\\\n-        FN(probe_write_user),\t\t\\\n-        FN(current_task_under_cgroup),\t\\\n-        FN(skb_change_tail),\t\t\\\n-        FN(skb_pull_data),\t\t\\\n-        FN(csum_update),\t\t\\\n-        FN(set_hash_invalid),\t\t\\\n-        FN(get_numa_node_id),\t\t\\\n-        FN(skb_change_head),\t\t\\\n-        FN(xdp_adjust_head),\t\t\\\n-        FN(probe_read_str),\t\t\\\n-        FN(get_socket_cookie),\t\t\\\n-        FN(get_socket_uid),\t\t\\\n-        FN(set_hash),\t\t\t\\\n-        FN(setsockopt),\t\t\t\\\n-        FN(skb_adjust_room),\t\t\\\n-        FN(redirect_map),\t\t\\\n-        FN(sk_redirect_map),\t\t\\\n-        FN(sock_map_update),\t\t\\\n-        FN(xdp_adjust_meta),\t\t\\\n-        FN(perf_event_read_value),\t\\\n-        FN(perf_prog_read_value),\t\\\n-        FN(getsockopt),\t\t\t\\\n-        FN(override_return),\t\t\\\n-        FN(sock_ops_cb_flags_set),\n+\tFN(unspec),\t\t\t\\\n+\tFN(map_lookup_elem),\t\t\\\n+\tFN(map_update_elem),\t\t\\\n+\tFN(map_delete_elem),\t\t\\\n+\tFN(probe_read),\t\t\t\\\n+\tFN(ktime_get_ns),\t\t\\\n+\tFN(trace_printk),\t\t\\\n+\tFN(get_prandom_u32),\t\t\\\n+\tFN(get_smp_processor_id),\t\\\n+\tFN(skb_store_bytes),\t\t\\\n+\tFN(l3_csum_replace),\t\t\\\n+\tFN(l4_csum_replace),\t\t\\\n+\tFN(tail_call),\t\t\t\\\n+\tFN(clone_redirect),\t\t\\\n+\tFN(get_current_pid_tgid),\t\\\n+\tFN(get_current_uid_gid),\t\\\n+\tFN(get_current_comm),\t\t\\\n+\tFN(get_cgroup_classid),\t\t\\\n+\tFN(skb_vlan_push),\t\t\\\n+\tFN(skb_vlan_pop),\t\t\\\n+\tFN(skb_get_tunnel_key),\t\t\\\n+\tFN(skb_set_tunnel_key),\t\t\\\n+\tFN(perf_event_read),\t\t\\\n+\tFN(redirect),\t\t\t\\\n+\tFN(get_route_realm),\t\t\\\n+\tFN(perf_event_output),\t\t\\\n+\tFN(skb_load_bytes),\t\t\\\n+\tFN(get_stackid),\t\t\\\n+\tFN(csum_diff),\t\t\t\\\n+\tFN(skb_get_tunnel_opt),\t\t\\\n+\tFN(skb_set_tunnel_opt),\t\t\\\n+\tFN(skb_change_proto),\t\t\\\n+\tFN(skb_change_type),\t\t\\\n+\tFN(skb_under_cgroup),\t\t\\\n+\tFN(get_hash_recalc),\t\t\\\n+\tFN(get_current_task),\t\t\\\n+\tFN(probe_write_user),\t\t\\\n+\tFN(current_task_under_cgroup),\t\\\n+\tFN(skb_change_tail),\t\t\\\n+\tFN(skb_pull_data),\t\t\\\n+\tFN(csum_update),\t\t\\\n+\tFN(set_hash_invalid),\t\t\\\n+\tFN(get_numa_node_id),\t\t\\\n+\tFN(skb_change_head),\t\t\\\n+\tFN(xdp_adjust_head),\t\t\\\n+\tFN(probe_read_str),\t\t\\\n+\tFN(get_socket_cookie),\t\t\\\n+\tFN(get_socket_uid),\t\t\\\n+\tFN(set_hash),\t\t\t\\\n+\tFN(setsockopt),\t\t\t\\\n+\tFN(skb_adjust_room),\t\t\\\n+\tFN(redirect_map),\t\t\\\n+\tFN(sk_redirect_map),\t\t\\\n+\tFN(sock_map_update),\t\t\\\n+\tFN(xdp_adjust_meta),\t\t\\\n+\tFN(perf_event_read_value),\t\\\n+\tFN(perf_prog_read_value),\t\\\n+\tFN(getsockopt),\t\t\t\\\n+\tFN(override_return),\t\t\\\n+\tFN(sock_ops_cb_flags_set),\t\\\n+\tFN(msg_redirect_map),\t\t\\\n+\tFN(msg_apply_bytes),\t\t\\\n+\tFN(msg_cork_bytes),\t\t\\\n+\tFN(msg_pull_data),\t\t\\\n+\tFN(bind),\t\t\t\\\n+\tFN(xdp_adjust_tail),\t\t\\\n+\tFN(skb_get_xfrm_state),\t\t\\\n+\tFN(get_stack),\t\t\t\\\n+\tFN(skb_load_bytes_relative),\t\\\n+\tFN(fib_lookup),\t\t\t\\\n+\tFN(sock_hash_update),\t\t\\\n+\tFN(msg_redirect_hash),\t\t\\\n+\tFN(sk_redirect_hash),\t\t\\\n+\tFN(lwt_push_encap),\t\t\\\n+\tFN(lwt_seg6_store_bytes),\t\\\n+\tFN(lwt_seg6_adjust_srh),\t\\\n+\tFN(lwt_seg6_action),\t\t\\\n+\tFN(rc_repeat),\t\t\t\\\n+\tFN(rc_keydown),\t\t\t\\\n+\tFN(skb_cgroup_id),\t\t\\\n+\tFN(get_current_cgroup_id),\t\\\n+\tFN(get_local_storage),\t\t\\\n+\tFN(sk_select_reuseport),\t\\\n+\tFN(skb_ancestor_cgroup_id),\t\\\n+\tFN(sk_lookup_tcp),\t\t\\\n+\tFN(sk_lookup_udp),\t\t\\\n+\tFN(sk_release),\t\t\t\\\n+\tFN(map_push_elem),\t\t\\\n+\tFN(map_pop_elem),\t\t\\\n+\tFN(map_peek_elem),\t\t\\\n+\tFN(msg_push_data),\t\t\\\n+\tFN(msg_pop_data),\t\t\\\n+\tFN(rc_pointer_rel),\n \n /* integer value in 'imm' field of BPF_CALL instruction selects which helper\n  * function eBPF program intends to call\n  */\n #define __BPF_ENUM_FN(x) BPF_FUNC_ ## x\n enum bpf_func_id {\n-        __BPF_FUNC_MAPPER(__BPF_ENUM_FN)\n-        __BPF_FUNC_MAX_ID,\n+\t__BPF_FUNC_MAPPER(__BPF_ENUM_FN)\n+\t__BPF_FUNC_MAX_ID,\n };\n #undef __BPF_ENUM_FN\n \n@@ -791,15 +2455,19 @@ enum bpf_func_id {\n /* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */\n #define BPF_F_TUNINFO_IPV6\t\t(1ULL << 0)\n \n-/* BPF_FUNC_get_stackid flags. */\n+/* flags for both BPF_FUNC_get_stackid and BPF_FUNC_get_stack. */\n #define BPF_F_SKIP_FIELD_MASK\t\t0xffULL\n #define BPF_F_USER_STACK\t\t(1ULL << 8)\n+/* flags used by BPF_FUNC_get_stackid only. */\n #define BPF_F_FAST_STACK_CMP\t\t(1ULL << 9)\n #define BPF_F_REUSE_STACKID\t\t(1ULL << 10)\n+/* flags used by BPF_FUNC_get_stack only. */\n+#define BPF_F_USER_BUILD_ID\t\t(1ULL << 11)\n \n /* BPF_FUNC_skb_set_tunnel_key flags. */\n #define BPF_F_ZERO_CSUM_TX\t\t(1ULL << 1)\n #define BPF_F_DONT_FRAGMENT\t\t(1ULL << 2)\n+#define BPF_F_SEQ_NUMBER\t\t(1ULL << 3)\n \n /* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and\n  * BPF_FUNC_perf_event_read_value flags.\n@@ -809,57 +2477,95 @@ enum bpf_func_id {\n /* BPF_FUNC_perf_event_output for sk_buff input context. */\n #define BPF_F_CTXLEN_MASK\t\t(0xfffffULL << 32)\n \n+/* Current network namespace */\n+#define BPF_F_CURRENT_NETNS\t\t(-1L)\n+\n /* Mode for BPF_FUNC_skb_adjust_room helper. */\n enum bpf_adj_room_mode {\n-        BPF_ADJ_ROOM_NET,\n+\tBPF_ADJ_ROOM_NET,\n+};\n+\n+/* Mode for BPF_FUNC_skb_load_bytes_relative helper. */\n+enum bpf_hdr_start_off {\n+\tBPF_HDR_START_MAC,\n+\tBPF_HDR_START_NET,\n };\n \n+/* Encapsulation type for BPF_FUNC_lwt_push_encap helper. */\n+enum bpf_lwt_encap_mode {\n+\tBPF_LWT_ENCAP_SEG6,\n+\tBPF_LWT_ENCAP_SEG6_INLINE\n+};\n+\n+#define __bpf_md_ptr(type, name)\t\\\n+union {\t\t\t\t\t\\\n+\ttype name;\t\t\t\\\n+\t__u64 :64;\t\t\t\\\n+} __attribute__((aligned(8)))\n+\n /* user accessible mirror of in-kernel sk_buff.\n  * new fields can only be added to the end of this structure\n  */\n struct __sk_buff {\n-        __u32 len;\n-        __u32 pkt_type;\n-        __u32 mark;\n-        __u32 queue_mapping;\n-        __u32 protocol;\n-        __u32 vlan_present;\n-        __u32 vlan_tci;\n-        __u32 vlan_proto;\n-        __u32 priority;\n-        __u32 ingress_ifindex;\n-        __u32 ifindex;\n-        __u32 tc_index;\n-        __u32 cb[5];\n-        __u32 hash;\n-        __u32 tc_classid;\n-        __u32 data;\n-        __u32 data_end;\n-        __u32 napi_id;\n-\n-        /* Accessed by BPF_PROG_TYPE_sk_skb types from here to ... */\n-        __u32 family;\n-        __u32 remote_ip4;\t/* Stored in network byte order */\n-        __u32 local_ip4;\t/* Stored in network byte order */\n-        __u32 remote_ip6[4];\t/* Stored in network byte order */\n-        __u32 local_ip6[4];\t/* Stored in network byte order */\n-        __u32 remote_port;\t/* Stored in network byte order */\n-        __u32 local_port;\t/* stored in host byte order */\n-        /* ... here. */\n-\n-        __u32 data_meta;\n+\t__u32 len;\n+\t__u32 pkt_type;\n+\t__u32 mark;\n+\t__u32 queue_mapping;\n+\t__u32 protocol;\n+\t__u32 vlan_present;\n+\t__u32 vlan_tci;\n+\t__u32 vlan_proto;\n+\t__u32 priority;\n+\t__u32 ingress_ifindex;\n+\t__u32 ifindex;\n+\t__u32 tc_index;\n+\t__u32 cb[5];\n+\t__u32 hash;\n+\t__u32 tc_classid;\n+\t__u32 data;\n+\t__u32 data_end;\n+\t__u32 napi_id;\n+\n+\t/* Accessed by BPF_PROG_TYPE_sk_skb types from here to ... */\n+\t__u32 family;\n+\t__u32 remote_ip4;\t/* Stored in network byte order */\n+\t__u32 local_ip4;\t/* Stored in network byte order */\n+\t__u32 remote_ip6[4];\t/* Stored in network byte order */\n+\t__u32 local_ip6[4];\t/* Stored in network byte order */\n+\t__u32 remote_port;\t/* Stored in network byte order */\n+\t__u32 local_port;\t/* stored in host byte order */\n+\t/* ... here. */\n+\n+\t__u32 data_meta;\n+\t__bpf_md_ptr(struct bpf_flow_keys *, flow_keys);\n+\t__u64 tstamp;\n+\t__u32 wire_len;\n };\n \n struct bpf_tunnel_key {\n-        __u32 tunnel_id;\n-        union {\n-                __u32 remote_ipv4;\n-                __u32 remote_ipv6[4];\n-        };\n-        __u8 tunnel_tos;\n-        __u8 tunnel_ttl;\n-        __u16 tunnel_ext;\n-        __u32 tunnel_label;\n+\t__u32 tunnel_id;\n+\tunion {\n+\t\t__u32 remote_ipv4;\n+\t\t__u32 remote_ipv6[4];\n+\t};\n+\t__u8 tunnel_tos;\n+\t__u8 tunnel_ttl;\n+\t__u16 tunnel_ext;\t/* Padding, future use. */\n+\t__u32 tunnel_label;\n+};\n+\n+/* user accessible mirror of in-kernel xfrm_state.\n+ * new fields can only be added to the end of this structure\n+ */\n+struct bpf_xfrm_state {\n+\t__u32 reqid;\n+\t__u32 spi;\t/* Stored in network byte order */\n+\t__u16 family;\n+\t__u16 ext;\t/* Padding, future use. */\n+\tunion {\n+\t\t__u32 remote_ipv4;\t/* Stored in network byte order */\n+\t\t__u32 remote_ipv6[4];\t/* Stored in network byte order */\n+\t};\n };\n \n /* Generic BPF return codes which all BPF program types may support.\n@@ -870,21 +2576,47 @@ struct bpf_tunnel_key {\n  * XDP is handled seprately, see XDP_*.\n  */\n enum bpf_ret_code {\n-        BPF_OK = 0,\n-        /* 1 reserved */\n-        BPF_DROP = 2,\n-        /* 3-6 reserved */\n-        BPF_REDIRECT = 7,\n-        /* >127 are reserved for prog type specific return codes */\n+\tBPF_OK = 0,\n+\t/* 1 reserved */\n+\tBPF_DROP = 2,\n+\t/* 3-6 reserved */\n+\tBPF_REDIRECT = 7,\n+\t/* >127 are reserved for prog type specific return codes */\n };\n \n struct bpf_sock {\n-        __u32 bound_dev_if;\n-        __u32 family;\n-        __u32 type;\n-        __u32 protocol;\n-        __u32 mark;\n-        __u32 priority;\n+\t__u32 bound_dev_if;\n+\t__u32 family;\n+\t__u32 type;\n+\t__u32 protocol;\n+\t__u32 mark;\n+\t__u32 priority;\n+\t__u32 src_ip4;\t\t/* Allows 1,2,4-byte read.\n+\t\t\t\t * Stored in network byte order.\n+\t\t\t\t */\n+\t__u32 src_ip6[4];\t/* Allows 1,2,4-byte read.\n+\t\t\t\t * Stored in network byte order.\n+\t\t\t\t */\n+\t__u32 src_port;\t\t/* Allows 4-byte read.\n+\t\t\t\t * Stored in host byte order\n+\t\t\t\t */\n+};\n+\n+struct bpf_sock_tuple {\n+\tunion {\n+\t\tstruct {\n+\t\t\t__be32 saddr;\n+\t\t\t__be32 daddr;\n+\t\t\t__be16 sport;\n+\t\t\t__be16 dport;\n+\t\t} ipv4;\n+\t\tstruct {\n+\t\t\t__be32 saddr[4];\n+\t\t\t__be32 daddr[4];\n+\t\t\t__be16 sport;\n+\t\t\t__be16 dport;\n+\t\t} ipv6;\n+\t};\n };\n \n #define XDP_PACKET_HEADROOM 256\n@@ -895,63 +2627,158 @@ struct bpf_sock {\n  * result in packet drops and a warning via bpf_warn_invalid_xdp_action().\n  */\n enum xdp_action {\n-        XDP_ABORTED = 0,\n-        XDP_DROP,\n-        XDP_PASS,\n-        XDP_TX,\n-        XDP_REDIRECT,\n+\tXDP_ABORTED = 0,\n+\tXDP_DROP,\n+\tXDP_PASS,\n+\tXDP_TX,\n+\tXDP_REDIRECT,\n };\n \n /* user accessible metadata for XDP packet hook\n  * new fields must be added to the end of this structure\n  */\n struct xdp_md {\n-        __u32 data;\n-        __u32 data_end;\n-        __u32 data_meta;\n-        /* Below access go through struct xdp_rxq_info */\n-        __u32 ingress_ifindex; /* rxq->dev->ifindex */\n-        __u32 rx_queue_index;  /* rxq->queue_index  */\n+\t__u32 data;\n+\t__u32 data_end;\n+\t__u32 data_meta;\n+\t/* Below access go through struct xdp_rxq_info */\n+\t__u32 ingress_ifindex; /* rxq->dev->ifindex */\n+\t__u32 rx_queue_index;  /* rxq->queue_index  */\n };\n \n enum sk_action {\n-        SK_DROP = 0,\n-        SK_PASS,\n+\tSK_DROP = 0,\n+\tSK_PASS,\n+};\n+\n+/* user accessible metadata for SK_MSG packet hook, new fields must\n+ * be added to the end of this structure\n+ */\n+struct sk_msg_md {\n+\t__bpf_md_ptr(void *, data);\n+\t__bpf_md_ptr(void *, data_end);\n+\n+\t__u32 family;\n+\t__u32 remote_ip4;\t/* Stored in network byte order */\n+\t__u32 local_ip4;\t/* Stored in network byte order */\n+\t__u32 remote_ip6[4];\t/* Stored in network byte order */\n+\t__u32 local_ip6[4];\t/* Stored in network byte order */\n+\t__u32 remote_port;\t/* Stored in network byte order */\n+\t__u32 local_port;\t/* stored in host byte order */\n+\t__u32 size;\t\t/* Total size of sk_msg */\n+};\n+\n+struct sk_reuseport_md {\n+\t/*\n+\t * Start of directly accessible data. It begins from\n+\t * the tcp/udp header.\n+\t */\n+\t__bpf_md_ptr(void *, data);\n+\t/* End of directly accessible data */\n+\t__bpf_md_ptr(void *, data_end);\n+\t/*\n+\t * Total length of packet (starting from the tcp/udp header).\n+\t * Note that the directly accessible bytes (data_end - data)\n+\t * could be less than this \"len\".  Those bytes could be\n+\t * indirectly read by a helper \"bpf_skb_load_bytes()\".\n+\t */\n+\t__u32 len;\n+\t/*\n+\t * Eth protocol in the mac header (network byte order). e.g.\n+\t * ETH_P_IP(0x0800) and ETH_P_IPV6(0x86DD)\n+\t */\n+\t__u32 eth_protocol;\n+\t__u32 ip_protocol;\t/* IP protocol. e.g. IPPROTO_TCP, IPPROTO_UDP */\n+\t__u32 bind_inany;\t/* Is sock bound to an INANY address? */\n+\t__u32 hash;\t\t/* A hash of the packet 4 tuples */\n };\n \n #define BPF_TAG_SIZE\t8\n \n struct bpf_prog_info {\n-        __u32 type;\n-        __u32 id;\n-        __u8  tag[BPF_TAG_SIZE];\n-        __u32 jited_prog_len;\n-        __u32 xlated_prog_len;\n-        __aligned_u64 jited_prog_insns;\n-        __aligned_u64 xlated_prog_insns;\n-        __u64 load_time;\t/* ns since boottime */\n-        __u32 created_by_uid;\n-        __u32 nr_map_ids;\n-        __aligned_u64 map_ids;\n-        char name[BPF_OBJ_NAME_LEN];\n-        __u32 ifindex;\n-        __u64 netns_dev;\n-        __u64 netns_ino;\n+\t__u32 type;\n+\t__u32 id;\n+\t__u8  tag[BPF_TAG_SIZE];\n+\t__u32 jited_prog_len;\n+\t__u32 xlated_prog_len;\n+\t__aligned_u64 jited_prog_insns;\n+\t__aligned_u64 xlated_prog_insns;\n+\t__u64 load_time;\t/* ns since boottime */\n+\t__u32 created_by_uid;\n+\t__u32 nr_map_ids;\n+\t__aligned_u64 map_ids;\n+\tchar name[BPF_OBJ_NAME_LEN];\n+\t__u32 ifindex;\n+\t__u32 gpl_compatible:1;\n+\t__u64 netns_dev;\n+\t__u64 netns_ino;\n+\t__u32 nr_jited_ksyms;\n+\t__u32 nr_jited_func_lens;\n+\t__aligned_u64 jited_ksyms;\n+\t__aligned_u64 jited_func_lens;\n+\t__u32 btf_id;\n+\t__u32 func_info_rec_size;\n+\t__aligned_u64 func_info;\n+\t__u32 nr_func_info;\n+\t__u32 nr_line_info;\n+\t__aligned_u64 line_info;\n+\t__aligned_u64 jited_line_info;\n+\t__u32 nr_jited_line_info;\n+\t__u32 line_info_rec_size;\n+\t__u32 jited_line_info_rec_size;\n+\t__u32 nr_prog_tags;\n+\t__aligned_u64 prog_tags;\n } __attribute__((aligned(8)));\n \n struct bpf_map_info {\n-        __u32 type;\n-        __u32 id;\n-        __u32 key_size;\n-        __u32 value_size;\n-        __u32 max_entries;\n-        __u32 map_flags;\n-        char  name[BPF_OBJ_NAME_LEN];\n-        __u32 ifindex;\n-        __u64 netns_dev;\n-        __u64 netns_ino;\n+\t__u32 type;\n+\t__u32 id;\n+\t__u32 key_size;\n+\t__u32 value_size;\n+\t__u32 max_entries;\n+\t__u32 map_flags;\n+\tchar  name[BPF_OBJ_NAME_LEN];\n+\t__u32 ifindex;\n+\t__u32 :32;\n+\t__u64 netns_dev;\n+\t__u64 netns_ino;\n+\t__u32 btf_id;\n+\t__u32 btf_key_type_id;\n+\t__u32 btf_value_type_id;\n } __attribute__((aligned(8)));\n \n+struct bpf_btf_info {\n+\t__aligned_u64 btf;\n+\t__u32 btf_size;\n+\t__u32 id;\n+} __attribute__((aligned(8)));\n+\n+/* User bpf_sock_addr struct to access socket fields and sockaddr struct passed\n+ * by user and intended to be used by socket (e.g. to bind to, depends on\n+ * attach attach type).\n+ */\n+struct bpf_sock_addr {\n+\t__u32 user_family;\t/* Allows 4-byte read, but no write. */\n+\t__u32 user_ip4;\t\t/* Allows 1,2,4-byte read and 4-byte write.\n+\t\t\t\t * Stored in network byte order.\n+\t\t\t\t */\n+\t__u32 user_ip6[4];\t/* Allows 1,2,4-byte read an 4-byte write.\n+\t\t\t\t * Stored in network byte order.\n+\t\t\t\t */\n+\t__u32 user_port;\t/* Allows 4-byte read and write.\n+\t\t\t\t * Stored in network byte order\n+\t\t\t\t */\n+\t__u32 family;\t\t/* Allows 4-byte read, but no write */\n+\t__u32 type;\t\t/* Allows 4-byte read, but no write */\n+\t__u32 protocol;\t\t/* Allows 4-byte read, but no write */\n+\t__u32 msg_src_ip4;\t/* Allows 1,2,4-byte read an 4-byte write.\n+\t\t\t\t * Stored in network byte order.\n+\t\t\t\t */\n+\t__u32 msg_src_ip6[4];\t/* Allows 1,2,4-byte read an 4-byte write.\n+\t\t\t\t * Stored in network byte order.\n+\t\t\t\t */\n+};\n+\n /* User bpf_sock_ops struct to access socket values and specify request ops\n  * and their replies.\n  * Some of this fields are in network (bigendian) byte order and may need\n@@ -959,48 +2786,48 @@ struct bpf_map_info {\n  * New fields can only be added at the end of this structure\n  */\n struct bpf_sock_ops {\n-        __u32 op;\n-        union {\n-                __u32 args[4];\t\t/* Optionally passed to bpf program */\n-                __u32 reply;\t\t/* Returned by bpf program\t    */\n-                __u32 replylong[4];\t/* Optionally returned by bpf prog  */\n-        };\n-        __u32 family;\n-        __u32 remote_ip4;\t/* Stored in network byte order */\n-        __u32 local_ip4;\t/* Stored in network byte order */\n-        __u32 remote_ip6[4];\t/* Stored in network byte order */\n-        __u32 local_ip6[4];\t/* Stored in network byte order */\n-        __u32 remote_port;\t/* Stored in network byte order */\n-        __u32 local_port;\t/* stored in host byte order */\n-        __u32 is_fullsock;\t/* Some TCP fields are only valid if\n-                                 * there is a full socket. If not, the\n-                                 * fields read as zero.\n-                                 */\n-        __u32 snd_cwnd;\n-        __u32 srtt_us;\t\t/* Averaged RTT << 3 in usecs */\n-        __u32 bpf_sock_ops_cb_flags; /* flags defined in uapi/linux/tcp.h */\n-        __u32 state;\n-        __u32 rtt_min;\n-        __u32 snd_ssthresh;\n-        __u32 rcv_nxt;\n-        __u32 snd_nxt;\n-        __u32 snd_una;\n-        __u32 mss_cache;\n-        __u32 ecn_flags;\n-        __u32 rate_delivered;\n-        __u32 rate_interval_us;\n-        __u32 packets_out;\n-        __u32 retrans_out;\n-        __u32 total_retrans;\n-        __u32 segs_in;\n-        __u32 data_segs_in;\n-        __u32 segs_out;\n-        __u32 data_segs_out;\n-        __u32 lost_out;\n-        __u32 sacked_out;\n-        __u32 sk_txhash;\n-        __u64 bytes_received;\n-        __u64 bytes_acked;\n+\t__u32 op;\n+\tunion {\n+\t\t__u32 args[4];\t\t/* Optionally passed to bpf program */\n+\t\t__u32 reply;\t\t/* Returned by bpf program\t    */\n+\t\t__u32 replylong[4];\t/* Optionally returned by bpf prog  */\n+\t};\n+\t__u32 family;\n+\t__u32 remote_ip4;\t/* Stored in network byte order */\n+\t__u32 local_ip4;\t/* Stored in network byte order */\n+\t__u32 remote_ip6[4];\t/* Stored in network byte order */\n+\t__u32 local_ip6[4];\t/* Stored in network byte order */\n+\t__u32 remote_port;\t/* Stored in network byte order */\n+\t__u32 local_port;\t/* stored in host byte order */\n+\t__u32 is_fullsock;\t/* Some TCP fields are only valid if\n+\t\t\t\t * there is a full socket. If not, the\n+\t\t\t\t * fields read as zero.\n+\t\t\t\t */\n+\t__u32 snd_cwnd;\n+\t__u32 srtt_us;\t\t/* Averaged RTT << 3 in usecs */\n+\t__u32 bpf_sock_ops_cb_flags; /* flags defined in uapi/linux/tcp.h */\n+\t__u32 state;\n+\t__u32 rtt_min;\n+\t__u32 snd_ssthresh;\n+\t__u32 rcv_nxt;\n+\t__u32 snd_nxt;\n+\t__u32 snd_una;\n+\t__u32 mss_cache;\n+\t__u32 ecn_flags;\n+\t__u32 rate_delivered;\n+\t__u32 rate_interval_us;\n+\t__u32 packets_out;\n+\t__u32 retrans_out;\n+\t__u32 total_retrans;\n+\t__u32 segs_in;\n+\t__u32 data_segs_in;\n+\t__u32 segs_out;\n+\t__u32 data_segs_out;\n+\t__u32 lost_out;\n+\t__u32 sacked_out;\n+\t__u32 sk_txhash;\n+\t__u64 bytes_received;\n+\t__u64 bytes_acked;\n };\n \n /* Definitions for bpf_sock_ops_cb_flags */\n@@ -1008,57 +2835,60 @@ struct bpf_sock_ops {\n #define BPF_SOCK_OPS_RETRANS_CB_FLAG\t(1<<1)\n #define BPF_SOCK_OPS_STATE_CB_FLAG\t(1<<2)\n #define BPF_SOCK_OPS_ALL_CB_FLAGS       0x7\t\t/* Mask of all currently\n-                                                         * supported cb flags\n-                                                         */\n+\t\t\t\t\t\t\t * supported cb flags\n+\t\t\t\t\t\t\t */\n \n /* List of known BPF sock_ops operators.\n  * New entries can only be added at the end\n  */\n enum {\n-        BPF_SOCK_OPS_VOID,\n-        BPF_SOCK_OPS_TIMEOUT_INIT,\t/* Should return SYN-RTO value to use or\n-                                         * -1 if default value should be used\n-                                         */\n-        BPF_SOCK_OPS_RWND_INIT,\t\t/* Should return initial advertized\n-                                         * window (in packets) or -1 if default\n-                                         * value should be used\n-                                         */\n-        BPF_SOCK_OPS_TCP_CONNECT_CB,\t/* Calls BPF program right before an\n-                                         * active connection is initialized\n-                                         */\n-        BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB,\t/* Calls BPF program when an\n-                                                 * active connection is\n-                                                 * established\n-                                                 */\n-        BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB,\t/* Calls BPF program when a\n-                                                 * passive connection is\n-                                                 * established\n-                                                 */\n-        BPF_SOCK_OPS_NEEDS_ECN,\t\t/* If connection's congestion control\n-                                         * needs ECN\n-                                         */\n-        BPF_SOCK_OPS_BASE_RTT,\t\t/* Get base RTT. The correct value is\n-                                         * based on the path and may be\n-                                         * dependent on the congestion control\n-                                         * algorithm. In general it indicates\n-                                         * a congestion threshold. RTTs above\n-                                         * this indicate congestion\n-                                         */\n-        BPF_SOCK_OPS_RTO_CB,\t\t/* Called when an RTO has triggered.\n-                                         * Arg1: value of icsk_retransmits\n-                                         * Arg2: value of icsk_rto\n-                                         * Arg3: whether RTO has expired\n-                                         */\n-        BPF_SOCK_OPS_RETRANS_CB,\t/* Called when skb is retransmitted.\n-                                         * Arg1: sequence number of 1st byte\n-                                         * Arg2: # segments\n-                                         * Arg3: return value of\n-                                         *       tcp_transmit_skb (0 => success)\n-                                         */\n-        BPF_SOCK_OPS_STATE_CB,\t\t/* Called when TCP changes state.\n-                                         * Arg1: old_state\n-                                         * Arg2: new_state\n-                                         */\n+\tBPF_SOCK_OPS_VOID,\n+\tBPF_SOCK_OPS_TIMEOUT_INIT,\t/* Should return SYN-RTO value to use or\n+\t\t\t\t\t * -1 if default value should be used\n+\t\t\t\t\t */\n+\tBPF_SOCK_OPS_RWND_INIT,\t\t/* Should return initial advertized\n+\t\t\t\t\t * window (in packets) or -1 if default\n+\t\t\t\t\t * value should be used\n+\t\t\t\t\t */\n+\tBPF_SOCK_OPS_TCP_CONNECT_CB,\t/* Calls BPF program right before an\n+\t\t\t\t\t * active connection is initialized\n+\t\t\t\t\t */\n+\tBPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB,\t/* Calls BPF program when an\n+\t\t\t\t\t\t * active connection is\n+\t\t\t\t\t\t * established\n+\t\t\t\t\t\t */\n+\tBPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB,\t/* Calls BPF program when a\n+\t\t\t\t\t\t * passive connection is\n+\t\t\t\t\t\t * established\n+\t\t\t\t\t\t */\n+\tBPF_SOCK_OPS_NEEDS_ECN,\t\t/* If connection's congestion control\n+\t\t\t\t\t * needs ECN\n+\t\t\t\t\t */\n+\tBPF_SOCK_OPS_BASE_RTT,\t\t/* Get base RTT. The correct value is\n+\t\t\t\t\t * based on the path and may be\n+\t\t\t\t\t * dependent on the congestion control\n+\t\t\t\t\t * algorithm. In general it indicates\n+\t\t\t\t\t * a congestion threshold. RTTs above\n+\t\t\t\t\t * this indicate congestion\n+\t\t\t\t\t */\n+\tBPF_SOCK_OPS_RTO_CB,\t\t/* Called when an RTO has triggered.\n+\t\t\t\t\t * Arg1: value of icsk_retransmits\n+\t\t\t\t\t * Arg2: value of icsk_rto\n+\t\t\t\t\t * Arg3: whether RTO has expired\n+\t\t\t\t\t */\n+\tBPF_SOCK_OPS_RETRANS_CB,\t/* Called when skb is retransmitted.\n+\t\t\t\t\t * Arg1: sequence number of 1st byte\n+\t\t\t\t\t * Arg2: # segments\n+\t\t\t\t\t * Arg3: return value of\n+\t\t\t\t\t *       tcp_transmit_skb (0 => success)\n+\t\t\t\t\t */\n+\tBPF_SOCK_OPS_STATE_CB,\t\t/* Called when TCP changes state.\n+\t\t\t\t\t * Arg1: old_state\n+\t\t\t\t\t * Arg2: new_state\n+\t\t\t\t\t */\n+\tBPF_SOCK_OPS_TCP_LISTEN_CB,\t/* Called on listen(2), right after\n+\t\t\t\t\t * socket transition to LISTEN state.\n+\t\t\t\t\t */\n };\n \n /* List of TCP states. There is a build check in net/ipv4/tcp.c to detect\n@@ -1067,29 +2897,29 @@ enum {\n  * the BPF sock_ops function.\n  */\n enum {\n-        BPF_TCP_ESTABLISHED = 1,\n-        BPF_TCP_SYN_SENT,\n-        BPF_TCP_SYN_RECV,\n-        BPF_TCP_FIN_WAIT1,\n-        BPF_TCP_FIN_WAIT2,\n-        BPF_TCP_TIME_WAIT,\n-        BPF_TCP_CLOSE,\n-        BPF_TCP_CLOSE_WAIT,\n-        BPF_TCP_LAST_ACK,\n-        BPF_TCP_LISTEN,\n-        BPF_TCP_CLOSING,\t/* Now a valid state */\n-        BPF_TCP_NEW_SYN_RECV,\n-\n-        BPF_TCP_MAX_STATES\t/* Leave at the end! */\n+\tBPF_TCP_ESTABLISHED = 1,\n+\tBPF_TCP_SYN_SENT,\n+\tBPF_TCP_SYN_RECV,\n+\tBPF_TCP_FIN_WAIT1,\n+\tBPF_TCP_FIN_WAIT2,\n+\tBPF_TCP_TIME_WAIT,\n+\tBPF_TCP_CLOSE,\n+\tBPF_TCP_CLOSE_WAIT,\n+\tBPF_TCP_LAST_ACK,\n+\tBPF_TCP_LISTEN,\n+\tBPF_TCP_CLOSING,\t/* Now a valid state */\n+\tBPF_TCP_NEW_SYN_RECV,\n+\n+\tBPF_TCP_MAX_STATES\t/* Leave at the end! */\n };\n \n #define TCP_BPF_IW\t\t1001\t/* Set TCP initial congestion window */\n #define TCP_BPF_SNDCWND_CLAMP\t1002\t/* Set sndcwnd_clamp */\n \n struct bpf_perf_event_value {\n-        __u64 counter;\n-        __u64 enabled;\n-        __u64 running;\n+\t__u64 counter;\n+\t__u64 enabled;\n+\t__u64 running;\n };\n \n #define BPF_DEVCG_ACC_MKNOD\t(1ULL << 0)\n@@ -1100,10 +2930,128 @@ struct bpf_perf_event_value {\n #define BPF_DEVCG_DEV_CHAR\t(1ULL << 1)\n \n struct bpf_cgroup_dev_ctx {\n-        /* access_type encoded as (BPF_DEVCG_ACC_* << 16) | BPF_DEVCG_DEV_* */\n-        __u32 access_type;\n-        __u32 major;\n-        __u32 minor;\n+\t/* access_type encoded as (BPF_DEVCG_ACC_* << 16) | BPF_DEVCG_DEV_* */\n+\t__u32 access_type;\n+\t__u32 major;\n+\t__u32 minor;\n+};\n+\n+struct bpf_raw_tracepoint_args {\n+\t__u64 args[0];\n+};\n+\n+/* DIRECT:  Skip the FIB rules and go to FIB table associated with device\n+ * OUTPUT:  Do lookup from egress perspective; default is ingress\n+ */\n+#define BPF_FIB_LOOKUP_DIRECT  BIT(0)\n+#define BPF_FIB_LOOKUP_OUTPUT  BIT(1)\n+\n+enum {\n+\tBPF_FIB_LKUP_RET_SUCCESS,      /* lookup successful */\n+\tBPF_FIB_LKUP_RET_BLACKHOLE,    /* dest is blackholed; can be dropped */\n+\tBPF_FIB_LKUP_RET_UNREACHABLE,  /* dest is unreachable; can be dropped */\n+\tBPF_FIB_LKUP_RET_PROHIBIT,     /* dest not allowed; can be dropped */\n+\tBPF_FIB_LKUP_RET_NOT_FWDED,    /* packet is not forwarded */\n+\tBPF_FIB_LKUP_RET_FWD_DISABLED, /* fwding is not enabled on ingress */\n+\tBPF_FIB_LKUP_RET_UNSUPP_LWT,   /* fwd requires encapsulation */\n+\tBPF_FIB_LKUP_RET_NO_NEIGH,     /* no neighbor entry for nh */\n+\tBPF_FIB_LKUP_RET_FRAG_NEEDED,  /* fragmentation required to fwd */\n+};\n+\n+struct bpf_fib_lookup {\n+\t/* input:  network family for lookup (AF_INET, AF_INET6)\n+\t * output: network family of egress nexthop\n+\t */\n+\t__u8\tfamily;\n+\n+\t/* set if lookup is to consider L4 data - e.g., FIB rules */\n+\t__u8\tl4_protocol;\n+\t__be16\tsport;\n+\t__be16\tdport;\n+\n+\t/* total length of packet from network header - used for MTU check */\n+\t__u16\ttot_len;\n+\n+\t/* input: L3 device index for lookup\n+\t * output: device index from FIB lookup\n+\t */\n+\t__u32\tifindex;\n+\n+\tunion {\n+\t\t/* inputs to lookup */\n+\t\t__u8\ttos;\t\t/* AF_INET  */\n+\t\t__be32\tflowinfo;\t/* AF_INET6, flow_label + priority */\n+\n+\t\t/* output: metric of fib result (IPv4/IPv6 only) */\n+\t\t__u32\trt_metric;\n+\t};\n+\n+\tunion {\n+\t\t__be32\t\tipv4_src;\n+\t\t__u32\t\tipv6_src[4];  /* in6_addr; network order */\n+\t};\n+\n+\t/* input to bpf_fib_lookup, ipv{4,6}_dst is destination address in\n+\t * network header. output: bpf_fib_lookup sets to gateway address\n+\t * if FIB lookup returns gateway route\n+\t */\n+\tunion {\n+\t\t__be32\t\tipv4_dst;\n+\t\t__u32\t\tipv6_dst[4];  /* in6_addr; network order */\n+\t};\n+\n+\t/* output */\n+\t__be16\th_vlan_proto;\n+\t__be16\th_vlan_TCI;\n+\t__u8\tsmac[6];     /* ETH_ALEN */\n+\t__u8\tdmac[6];     /* ETH_ALEN */\n+};\n+\n+enum bpf_task_fd_type {\n+\tBPF_FD_TYPE_RAW_TRACEPOINT,\t/* tp name */\n+\tBPF_FD_TYPE_TRACEPOINT,\t\t/* tp name */\n+\tBPF_FD_TYPE_KPROBE,\t\t/* (symbol + offset) or addr */\n+\tBPF_FD_TYPE_KRETPROBE,\t\t/* (symbol + offset) or addr */\n+\tBPF_FD_TYPE_UPROBE,\t\t/* filename + offset */\n+\tBPF_FD_TYPE_URETPROBE,\t\t/* filename + offset */\n+};\n+\n+struct bpf_flow_keys {\n+\t__u16\tnhoff;\n+\t__u16\tthoff;\n+\t__u16\taddr_proto;\t\t\t/* ETH_P_* of valid addrs */\n+\t__u8\tis_frag;\n+\t__u8\tis_first_frag;\n+\t__u8\tis_encap;\n+\t__u8\tip_proto;\n+\t__be16\tn_proto;\n+\t__be16\tsport;\n+\t__be16\tdport;\n+\tunion {\n+\t\tstruct {\n+\t\t\t__be32\tipv4_src;\n+\t\t\t__be32\tipv4_dst;\n+\t\t};\n+\t\tstruct {\n+\t\t\t__u32\tipv6_src[4];\t/* in6_addr; network order */\n+\t\t\t__u32\tipv6_dst[4];\t/* in6_addr; network order */\n+\t\t};\n+\t};\n+};\n+\n+struct bpf_func_info {\n+\t__u32\tinsn_off;\n+\t__u32\ttype_id;\n+};\n+\n+#define BPF_LINE_INFO_LINE_NUM(line_col)\t((line_col) >> 10)\n+#define BPF_LINE_INFO_LINE_COL(line_col)\t((line_col) & 0x3ff)\n+\n+struct bpf_line_info {\n+\t__u32\tinsn_off;\n+\t__u32\tfile_name_off;\n+\t__u32\tline_off;\n+\t__u32\tline_col;\n };\n \n #endif /* _UAPI__LINUX_BPF_H__ */\ndiff --git a/src/shared/linux/bpf_common.h b/src/shared/linux/bpf_common.h\nindex afe7433b989..ee97668bdad 100644\n--- a/src/shared/linux/bpf_common.h\n+++ b/src/shared/linux/bpf_common.h\n@@ -1,5 +1,6 @@\n-#ifndef __LINUX_BPF_COMMON_H__\n-#define __LINUX_BPF_COMMON_H__\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+#ifndef _UAPI__LINUX_BPF_COMMON_H__\n+#define _UAPI__LINUX_BPF_COMMON_H__\n \n /* Instruction classes */\n #define BPF_CLASS(code) ((code) & 0x07)\n@@ -14,9 +15,10 @@\n \n /* ld/ldx fields */\n #define BPF_SIZE(code)  ((code) & 0x18)\n-#define\t\tBPF_W\t\t0x00\n-#define\t\tBPF_H\t\t0x08\n-#define\t\tBPF_B\t\t0x10\n+#define\t\tBPF_W\t\t0x00 /* 32-bit */\n+#define\t\tBPF_H\t\t0x08 /* 16-bit */\n+#define\t\tBPF_B\t\t0x10 /*  8-bit */\n+/* eBPF\t\tBPF_DW\t\t0x18    64-bit */\n #define BPF_MODE(code)  ((code) & 0xe0)\n #define\t\tBPF_IMM\t\t0x00\n #define\t\tBPF_ABS\t\t0x20\n@@ -52,4 +54,4 @@\n #define BPF_MAXINSNS 4096\n #endif\n \n-#endif /* __LINUX_BPF_COMMON_H__ */\n+#endif /* _UAPI__LINUX_BPF_COMMON_H__ */\ndiff --git a/src/shared/linux/bpf_insn.h b/src/shared/linux/bpf_insn.h\nnew file mode 100644\nindex 00000000000..e88459fdaae\n--- /dev/null\n+++ b/src/shared/linux/bpf_insn.h\n@@ -0,0 +1,205 @@\n+/* SPDX-License-Identifier: GPL-2.0 */\n+/* eBPF instruction mini library */\n+#ifndef __BPF_INSN_H\n+#define __BPF_INSN_H\n+\n+struct bpf_insn;\n+\n+/* ALU ops on registers, bpf_add|sub|...: dst_reg += src_reg */\n+\n+#define BPF_ALU64_REG(OP, DST, SRC)\t\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_ALU64 | BPF_OP(OP) | BPF_X,\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = SRC,\t\t\t\t\t\\\n+\t\t.off   = 0,\t\t\t\t\t\\\n+\t\t.imm   = 0 })\n+\n+#define BPF_ALU32_REG(OP, DST, SRC)\t\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_ALU | BPF_OP(OP) | BPF_X,\t\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = SRC,\t\t\t\t\t\\\n+\t\t.off   = 0,\t\t\t\t\t\\\n+\t\t.imm   = 0 })\n+\n+/* ALU ops on immediates, bpf_add|sub|...: dst_reg += imm32 */\n+\n+#define BPF_ALU64_IMM(OP, DST, IMM)\t\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_ALU64 | BPF_OP(OP) | BPF_K,\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = 0,\t\t\t\t\t\\\n+\t\t.off   = 0,\t\t\t\t\t\\\n+\t\t.imm   = IMM })\n+\n+#define BPF_ALU32_IMM(OP, DST, IMM)\t\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_ALU | BPF_OP(OP) | BPF_K,\t\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = 0,\t\t\t\t\t\\\n+\t\t.off   = 0,\t\t\t\t\t\\\n+\t\t.imm   = IMM })\n+\n+/* Short form of mov, dst_reg = src_reg */\n+\n+#define BPF_MOV64_REG(DST, SRC)\t\t\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_ALU64 | BPF_MOV | BPF_X,\t\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = SRC,\t\t\t\t\t\\\n+\t\t.off   = 0,\t\t\t\t\t\\\n+\t\t.imm   = 0 })\n+\n+#define BPF_MOV32_REG(DST, SRC)\t\t\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_ALU | BPF_MOV | BPF_X,\t\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = SRC,\t\t\t\t\t\\\n+\t\t.off   = 0,\t\t\t\t\t\\\n+\t\t.imm   = 0 })\n+\n+/* Short form of mov, dst_reg = imm32 */\n+\n+#define BPF_MOV64_IMM(DST, IMM)\t\t\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_ALU64 | BPF_MOV | BPF_K,\t\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = 0,\t\t\t\t\t\\\n+\t\t.off   = 0,\t\t\t\t\t\\\n+\t\t.imm   = IMM })\n+\n+#define BPF_MOV32_IMM(DST, IMM)\t\t\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_ALU | BPF_MOV | BPF_K,\t\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = 0,\t\t\t\t\t\\\n+\t\t.off   = 0,\t\t\t\t\t\\\n+\t\t.imm   = IMM })\n+\n+/* BPF_LD_IMM64 macro encodes single 'load 64-bit immediate' insn */\n+#define BPF_LD_IMM64(DST, IMM)\t\t\t\t\t\\\n+\tBPF_LD_IMM64_RAW(DST, 0, IMM)\n+\n+#define BPF_LD_IMM64_RAW(DST, SRC, IMM)\t\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_LD | BPF_DW | BPF_IMM,\t\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = SRC,\t\t\t\t\t\\\n+\t\t.off   = 0,\t\t\t\t\t\\\n+\t\t.imm   = (__u32) (IMM) }),\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = 0, /* zero is reserved opcode */\t\\\n+\t\t.dst_reg = 0,\t\t\t\t\t\\\n+\t\t.src_reg = 0,\t\t\t\t\t\\\n+\t\t.off   = 0,\t\t\t\t\t\\\n+\t\t.imm   = ((__u64) (IMM)) >> 32 })\n+\n+#ifndef BPF_PSEUDO_MAP_FD\n+# define BPF_PSEUDO_MAP_FD\t1\n+#endif\n+\n+/* pseudo BPF_LD_IMM64 insn used to refer to process-local map_fd */\n+#define BPF_LD_MAP_FD(DST, MAP_FD)\t\t\t\t\\\n+\tBPF_LD_IMM64_RAW(DST, BPF_PSEUDO_MAP_FD, MAP_FD)\n+\n+\n+/* Direct packet access, R0 = *(uint *) (skb->data + imm32) */\n+\n+#define BPF_LD_ABS(SIZE, IMM)\t\t\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_LD | BPF_SIZE(SIZE) | BPF_ABS,\t\\\n+\t\t.dst_reg = 0,\t\t\t\t\t\\\n+\t\t.src_reg = 0,\t\t\t\t\t\\\n+\t\t.off   = 0,\t\t\t\t\t\\\n+\t\t.imm   = IMM })\n+\n+/* Memory load, dst_reg = *(uint *) (src_reg + off16) */\n+\n+#define BPF_LDX_MEM(SIZE, DST, SRC, OFF)\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_LDX | BPF_SIZE(SIZE) | BPF_MEM,\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = SRC,\t\t\t\t\t\\\n+\t\t.off   = OFF,\t\t\t\t\t\\\n+\t\t.imm   = 0 })\n+\n+/* Memory store, *(uint *) (dst_reg + off16) = src_reg */\n+\n+#define BPF_STX_MEM(SIZE, DST, SRC, OFF)\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_STX | BPF_SIZE(SIZE) | BPF_MEM,\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = SRC,\t\t\t\t\t\\\n+\t\t.off   = OFF,\t\t\t\t\t\\\n+\t\t.imm   = 0 })\n+\n+/* Atomic memory add, *(uint *)(dst_reg + off16) += src_reg */\n+\n+#define BPF_STX_XADD(SIZE, DST, SRC, OFF)\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_STX | BPF_SIZE(SIZE) | BPF_XADD,\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = SRC,\t\t\t\t\t\\\n+\t\t.off   = OFF,\t\t\t\t\t\\\n+\t\t.imm   = 0 })\n+\n+/* Memory store, *(uint *) (dst_reg + off16) = imm32 */\n+\n+#define BPF_ST_MEM(SIZE, DST, OFF, IMM)\t\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_ST | BPF_SIZE(SIZE) | BPF_MEM,\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = 0,\t\t\t\t\t\\\n+\t\t.off   = OFF,\t\t\t\t\t\\\n+\t\t.imm   = IMM })\n+\n+/* Conditional jumps against registers, if (dst_reg 'op' src_reg) goto pc + off16 */\n+\n+#define BPF_JMP_REG(OP, DST, SRC, OFF)\t\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_JMP | BPF_OP(OP) | BPF_X,\t\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = SRC,\t\t\t\t\t\\\n+\t\t.off   = OFF,\t\t\t\t\t\\\n+\t\t.imm   = 0 })\n+\n+/* Conditional jumps against immediates, if (dst_reg 'op' imm32) goto pc + off16 */\n+\n+#define BPF_JMP_IMM(OP, DST, IMM, OFF)\t\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_JMP | BPF_OP(OP) | BPF_K,\t\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = 0,\t\t\t\t\t\\\n+\t\t.off   = OFF,\t\t\t\t\t\\\n+\t\t.imm   = IMM })\n+\n+#define BPF_JMP_A(OFF)\t\t\t\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_JMP | BPF_JA,\t\t\t\\\n+\t\t.dst_reg = 0,\t\t\t\t\t\\\n+\t\t.src_reg = 0,\t\t\t\t\t\\\n+\t\t.off   = OFF,\t\t\t\t\t\\\n+\t\t.imm   = 0 })\n+\n+/* Raw code statement block */\n+\n+#define BPF_RAW_INSN(CODE, DST, SRC, OFF, IMM)\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = CODE,\t\t\t\t\t\\\n+\t\t.dst_reg = DST,\t\t\t\t\t\\\n+\t\t.src_reg = SRC,\t\t\t\t\t\\\n+\t\t.off   = OFF,\t\t\t\t\t\\\n+\t\t.imm   = IMM })\n+\n+/* Program exit */\n+\n+#define BPF_EXIT_INSN()\t\t\t\t\t\t\\\n+\t((struct bpf_insn) {\t\t\t\t\t\\\n+\t\t.code  = BPF_JMP | BPF_EXIT,\t\t\t\\\n+\t\t.dst_reg = 0,\t\t\t\t\t\\\n+\t\t.src_reg = 0,\t\t\t\t\t\\\n+\t\t.off   = 0,\t\t\t\t\t\\\n+\t\t.imm   = 0 })\n+\n+#endif\ndiff --git a/src/shared/linux-3.13/dm-ioctl.h b/src/shared/linux/dm-ioctl.h\nsimilarity index 96%\nrename from src/shared/linux-3.13/dm-ioctl.h\nrename to src/shared/linux/dm-ioctl.h\nindex c8a4302093a..8faa188c358 100644\n--- a/src/shared/linux-3.13/dm-ioctl.h\n+++ b/src/shared/linux/dm-ioctl.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: LGPL-2.0+ WITH Linux-syscall-note */\n /*\n  * Copyright (C) 2001 - 2003 Sistina Software (UK) Limited.\n  * Copyright (C) 2004 - 2009 Red Hat, Inc. All rights reserved.\n@@ -240,7 +241,8 @@ enum {\n \t/* Added later */\n \tDM_LIST_VERSIONS_CMD,\n \tDM_TARGET_MSG_CMD,\n-\tDM_DEV_SET_GEOMETRY_CMD\n+\tDM_DEV_SET_GEOMETRY_CMD,\n+\tDM_DEV_ARM_POLL_CMD,\n };\n \n #define DM_IOCTL 0xfd\n@@ -255,6 +257,7 @@ enum {\n #define DM_DEV_SUSPEND   _IOWR(DM_IOCTL, DM_DEV_SUSPEND_CMD, struct dm_ioctl)\n #define DM_DEV_STATUS    _IOWR(DM_IOCTL, DM_DEV_STATUS_CMD, struct dm_ioctl)\n #define DM_DEV_WAIT      _IOWR(DM_IOCTL, DM_DEV_WAIT_CMD, struct dm_ioctl)\n+#define DM_DEV_ARM_POLL  _IOWR(DM_IOCTL, DM_DEV_ARM_POLL_CMD, struct dm_ioctl)\n \n #define DM_TABLE_LOAD    _IOWR(DM_IOCTL, DM_TABLE_LOAD_CMD, struct dm_ioctl)\n #define DM_TABLE_CLEAR   _IOWR(DM_IOCTL, DM_TABLE_CLEAR_CMD, struct dm_ioctl)\n@@ -269,7 +272,7 @@ enum {\n #define DM_VERSION_MAJOR\t4\n #define DM_VERSION_MINOR\t27\n #define DM_VERSION_PATCHLEVEL\t0\n-#define DM_VERSION_EXTRA\t\"-ioctl (2013-10-30)\"\n+#define DM_VERSION_EXTRA\t\"-ioctl (2018-04-03)\"\n \n /* Status bits */\n #define DM_READONLY_FLAG\t(1 << 0) /* In/Out */\n@@ -352,4 +355,9 @@ enum {\n  */\n #define DM_DEFERRED_REMOVE\t\t(1 << 17) /* In/Out */\n \n+/*\n+ * If set, the device is suspended internally.\n+ */\n+#define DM_INTERNAL_SUSPEND_FLAG\t(1 << 18) /* Out */\n+\n #endif\t\t\t\t/* _LINUX_DM_IOCTL_H */\ndiff --git a/src/shared/linux/ethtool.h b/src/shared/linux/ethtool.h\nnew file mode 100644\nindex 00000000000..f6c45a36c92\n--- /dev/null\n+++ b/src/shared/linux/ethtool.h\n@@ -0,0 +1,1843 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+/*\n+ * ethtool.h: Defines for Linux ethtool.\n+ *\n+ * Copyright (C) 1998 David S. Miller (davem@redhat.com)\n+ * Copyright 2001 Jeff Garzik <jgarzik@pobox.com>\n+ * Portions Copyright 2001 Sun Microsystems (thockin@sun.com)\n+ * Portions Copyright 2002 Intel (eli.kupermann@intel.com,\n+ *                                christopher.leech@intel.com,\n+ *                                scott.feldman@intel.com)\n+ * Portions Copyright (C) Sun Microsystems 2008\n+ */\n+\n+#ifndef _UAPI_LINUX_ETHTOOL_H\n+#define _UAPI_LINUX_ETHTOOL_H\n+\n+#include <linux/kernel.h>\n+#include <linux/types.h>\n+#include <linux/if_ether.h>\n+\n+#ifndef __KERNEL__\n+#include <limits.h> /* for INT_MAX */\n+#endif\n+\n+#ifndef __KERNEL_DIV_ROUND_UP\n+#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))\n+#endif\n+\n+/* All structures exposed to userland should be defined such that they\n+ * have the same layout for 32-bit and 64-bit userland.\n+ */\n+\n+/**\n+ * struct ethtool_cmd - DEPRECATED, link control and status\n+ * This structure is DEPRECATED, please use struct ethtool_link_settings.\n+ * @cmd: Command number = %ETHTOOL_GSET or %ETHTOOL_SSET\n+ * @supported: Bitmask of %SUPPORTED_* flags for the link modes,\n+ *\tphysical connectors and other link features for which the\n+ *\tinterface supports autonegotiation or auto-detection.\n+ *\tRead-only.\n+ * @advertising: Bitmask of %ADVERTISED_* flags for the link modes,\n+ *\tphysical connectors and other link features that are\n+ *\tadvertised through autonegotiation or enabled for\n+ *\tauto-detection.\n+ * @speed: Low bits of the speed, 1Mb units, 0 to INT_MAX or SPEED_UNKNOWN\n+ * @duplex: Duplex mode; one of %DUPLEX_*\n+ * @port: Physical connector type; one of %PORT_*\n+ * @phy_address: MDIO address of PHY (transceiver); 0 or 255 if not\n+ *\tapplicable.  For clause 45 PHYs this is the PRTAD.\n+ * @transceiver: Historically used to distinguish different possible\n+ *\tPHY types, but not in a consistent way.  Deprecated.\n+ * @autoneg: Enable/disable autonegotiation and auto-detection;\n+ *\teither %AUTONEG_DISABLE or %AUTONEG_ENABLE\n+ * @mdio_support: Bitmask of %ETH_MDIO_SUPPORTS_* flags for the MDIO\n+ *\tprotocols supported by the interface; 0 if unknown.\n+ *\tRead-only.\n+ * @maxtxpkt: Historically used to report TX IRQ coalescing; now\n+ *\tobsoleted by &struct ethtool_coalesce.  Read-only; deprecated.\n+ * @maxrxpkt: Historically used to report RX IRQ coalescing; now\n+ *\tobsoleted by &struct ethtool_coalesce.  Read-only; deprecated.\n+ * @speed_hi: High bits of the speed, 1Mb units, 0 to INT_MAX or SPEED_UNKNOWN\n+ * @eth_tp_mdix: Ethernet twisted-pair MDI(-X) status; one of\n+ *\t%ETH_TP_MDI_*.  If the status is unknown or not applicable, the\n+ *\tvalue will be %ETH_TP_MDI_INVALID.  Read-only.\n+ * @eth_tp_mdix_ctrl: Ethernet twisted pair MDI(-X) control; one of\n+ *\t%ETH_TP_MDI_*.  If MDI(-X) control is not implemented, reads\n+ *\tyield %ETH_TP_MDI_INVALID and writes may be ignored or rejected.\n+ *\tWhen written successfully, the link should be renegotiated if\n+ *\tnecessary.\n+ * @lp_advertising: Bitmask of %ADVERTISED_* flags for the link modes\n+ *\tand other link features that the link partner advertised\n+ *\tthrough autonegotiation; 0 if unknown or not applicable.\n+ *\tRead-only.\n+ *\n+ * The link speed in Mbps is split between @speed and @speed_hi.  Use\n+ * the ethtool_cmd_speed() and ethtool_cmd_speed_set() functions to\n+ * access it.\n+ *\n+ * If autonegotiation is disabled, the speed and @duplex represent the\n+ * fixed link mode and are writable if the driver supports multiple\n+ * link modes.  If it is enabled then they are read-only; if the link\n+ * is up they represent the negotiated link mode; if the link is down,\n+ * the speed is 0, %SPEED_UNKNOWN or the highest enabled speed and\n+ * @duplex is %DUPLEX_UNKNOWN or the best enabled duplex mode.\n+ *\n+ * Some hardware interfaces may have multiple PHYs and/or physical\n+ * connectors fitted or do not allow the driver to detect which are\n+ * fitted.  For these interfaces @port and/or @phy_address may be\n+ * writable, possibly dependent on @autoneg being %AUTONEG_DISABLE.\n+ * Otherwise, attempts to write different values may be ignored or\n+ * rejected.\n+ *\n+ * Users should assume that all fields not marked read-only are\n+ * writable and subject to validation by the driver.  They should use\n+ * %ETHTOOL_GSET to get the current values before making specific\n+ * changes and then applying them with %ETHTOOL_SSET.\n+ *\n+ * Deprecated fields should be ignored by both users and drivers.\n+ */\n+struct ethtool_cmd {\n+\t__u32\tcmd;\n+\t__u32\tsupported;\n+\t__u32\tadvertising;\n+\t__u16\tspeed;\n+\t__u8\tduplex;\n+\t__u8\tport;\n+\t__u8\tphy_address;\n+\t__u8\ttransceiver;\n+\t__u8\tautoneg;\n+\t__u8\tmdio_support;\n+\t__u32\tmaxtxpkt;\n+\t__u32\tmaxrxpkt;\n+\t__u16\tspeed_hi;\n+\t__u8\teth_tp_mdix;\n+\t__u8\teth_tp_mdix_ctrl;\n+\t__u32\tlp_advertising;\n+\t__u32\treserved[2];\n+};\n+\n+static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep,\n+\t\t\t\t\t __u32 speed)\n+{\n+\tep->speed = (__u16)(speed & 0xFFFF);\n+\tep->speed_hi = (__u16)(speed >> 16);\n+}\n+\n+static inline __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep)\n+{\n+\treturn (ep->speed_hi << 16) | ep->speed;\n+}\n+\n+/* Device supports clause 22 register access to PHY or peripherals\n+ * using the interface defined in <linux/mii.h>.  This should not be\n+ * set if there are known to be no such peripherals present or if\n+ * the driver only emulates clause 22 registers for compatibility.\n+ */\n+#define ETH_MDIO_SUPPORTS_C22\t1\n+\n+/* Device supports clause 45 register access to PHY or peripherals\n+ * using the interface defined in <linux/mii.h> and <linux/mdio.h>.\n+ * This should not be set if there are known to be no such peripherals\n+ * present.\n+ */\n+#define ETH_MDIO_SUPPORTS_C45\t2\n+\n+#define ETHTOOL_FWVERS_LEN\t32\n+#define ETHTOOL_BUSINFO_LEN\t32\n+#define ETHTOOL_EROMVERS_LEN\t32\n+\n+/**\n+ * struct ethtool_drvinfo - general driver and device information\n+ * @cmd: Command number = %ETHTOOL_GDRVINFO\n+ * @driver: Driver short name.  This should normally match the name\n+ *\tin its bus driver structure (e.g. pci_driver::name).  Must\n+ *\tnot be an empty string.\n+ * @version: Driver version string; may be an empty string\n+ * @fw_version: Firmware version string; may be an empty string\n+ * @erom_version: Expansion ROM version string; may be an empty string\n+ * @bus_info: Device bus address.  This should match the dev_name()\n+ *\tstring for the underlying bus device, if there is one.  May be\n+ *\tan empty string.\n+ * @n_priv_flags: Number of flags valid for %ETHTOOL_GPFLAGS and\n+ *\t%ETHTOOL_SPFLAGS commands; also the number of strings in the\n+ *\t%ETH_SS_PRIV_FLAGS set\n+ * @n_stats: Number of u64 statistics returned by the %ETHTOOL_GSTATS\n+ *\tcommand; also the number of strings in the %ETH_SS_STATS set\n+ * @testinfo_len: Number of results returned by the %ETHTOOL_TEST\n+ *\tcommand; also the number of strings in the %ETH_SS_TEST set\n+ * @eedump_len: Size of EEPROM accessible through the %ETHTOOL_GEEPROM\n+ *\tand %ETHTOOL_SEEPROM commands, in bytes\n+ * @regdump_len: Size of register dump returned by the %ETHTOOL_GREGS\n+ *\tcommand, in bytes\n+ *\n+ * Users can use the %ETHTOOL_GSSET_INFO command to get the number of\n+ * strings in any string set (from Linux 2.6.34).\n+ *\n+ * Drivers should set at most @driver, @version, @fw_version and\n+ * @bus_info in their get_drvinfo() implementation.  The ethtool\n+ * core fills in the other fields using other driver operations.\n+ */\n+struct ethtool_drvinfo {\n+\t__u32\tcmd;\n+\tchar\tdriver[32];\n+\tchar\tversion[32];\n+\tchar\tfw_version[ETHTOOL_FWVERS_LEN];\n+\tchar\tbus_info[ETHTOOL_BUSINFO_LEN];\n+\tchar\terom_version[ETHTOOL_EROMVERS_LEN];\n+\tchar\treserved2[12];\n+\t__u32\tn_priv_flags;\n+\t__u32\tn_stats;\n+\t__u32\ttestinfo_len;\n+\t__u32\teedump_len;\n+\t__u32\tregdump_len;\n+};\n+\n+#define SOPASS_MAX\t6\n+\n+/**\n+ * struct ethtool_wolinfo - Wake-On-Lan configuration\n+ * @cmd: Command number = %ETHTOOL_GWOL or %ETHTOOL_SWOL\n+ * @supported: Bitmask of %WAKE_* flags for supported Wake-On-Lan modes.\n+ *\tRead-only.\n+ * @wolopts: Bitmask of %WAKE_* flags for enabled Wake-On-Lan modes.\n+ * @sopass: SecureOn(tm) password; meaningful only if %WAKE_MAGICSECURE\n+ *\tis set in @wolopts.\n+ */\n+struct ethtool_wolinfo {\n+\t__u32\tcmd;\n+\t__u32\tsupported;\n+\t__u32\twolopts;\n+\t__u8\tsopass[SOPASS_MAX];\n+};\n+\n+/* for passing single values */\n+struct ethtool_value {\n+\t__u32\tcmd;\n+\t__u32\tdata;\n+};\n+\n+#define PFC_STORM_PREVENTION_AUTO\t0xffff\n+#define PFC_STORM_PREVENTION_DISABLE\t0\n+\n+enum tunable_id {\n+\tETHTOOL_ID_UNSPEC,\n+\tETHTOOL_RX_COPYBREAK,\n+\tETHTOOL_TX_COPYBREAK,\n+\tETHTOOL_PFC_PREVENTION_TOUT, /* timeout in msecs */\n+\t/*\n+\t * Add your fresh new tunable attribute above and remember to update\n+\t * tunable_strings[] in net/core/ethtool.c\n+\t */\n+\t__ETHTOOL_TUNABLE_COUNT,\n+};\n+\n+enum tunable_type_id {\n+\tETHTOOL_TUNABLE_UNSPEC,\n+\tETHTOOL_TUNABLE_U8,\n+\tETHTOOL_TUNABLE_U16,\n+\tETHTOOL_TUNABLE_U32,\n+\tETHTOOL_TUNABLE_U64,\n+\tETHTOOL_TUNABLE_STRING,\n+\tETHTOOL_TUNABLE_S8,\n+\tETHTOOL_TUNABLE_S16,\n+\tETHTOOL_TUNABLE_S32,\n+\tETHTOOL_TUNABLE_S64,\n+};\n+\n+struct ethtool_tunable {\n+\t__u32\tcmd;\n+\t__u32\tid;\n+\t__u32\ttype_id;\n+\t__u32\tlen;\n+\tvoid\t*data[0];\n+};\n+\n+#define DOWNSHIFT_DEV_DEFAULT_COUNT\t0xff\n+#define DOWNSHIFT_DEV_DISABLE\t\t0\n+\n+enum phy_tunable_id {\n+\tETHTOOL_PHY_ID_UNSPEC,\n+\tETHTOOL_PHY_DOWNSHIFT,\n+\t/*\n+\t * Add your fresh new phy tunable attribute above and remember to update\n+\t * phy_tunable_strings[] in net/core/ethtool.c\n+\t */\n+\t__ETHTOOL_PHY_TUNABLE_COUNT,\n+};\n+\n+/**\n+ * struct ethtool_regs - hardware register dump\n+ * @cmd: Command number = %ETHTOOL_GREGS\n+ * @version: Dump format version.  This is driver-specific and may\n+ *\tdistinguish different chips/revisions.  Drivers must use new\n+ *\tversion numbers whenever the dump format changes in an\n+ *\tincompatible way.\n+ * @len: On entry, the real length of @data.  On return, the number of\n+ *\tbytes used.\n+ * @data: Buffer for the register dump\n+ *\n+ * Users should use %ETHTOOL_GDRVINFO to find the maximum length of\n+ * a register dump for the interface.  They must allocate the buffer\n+ * immediately following this structure.\n+ */\n+struct ethtool_regs {\n+\t__u32\tcmd;\n+\t__u32\tversion;\n+\t__u32\tlen;\n+\t__u8\tdata[0];\n+};\n+\n+/**\n+ * struct ethtool_eeprom - EEPROM dump\n+ * @cmd: Command number = %ETHTOOL_GEEPROM, %ETHTOOL_GMODULEEEPROM or\n+ *\t%ETHTOOL_SEEPROM\n+ * @magic: A 'magic cookie' value to guard against accidental changes.\n+ *\tThe value passed in to %ETHTOOL_SEEPROM must match the value\n+ *\treturned by %ETHTOOL_GEEPROM for the same device.  This is\n+ *\tunused when @cmd is %ETHTOOL_GMODULEEEPROM.\n+ * @offset: Offset within the EEPROM to begin reading/writing, in bytes\n+ * @len: On entry, number of bytes to read/write.  On successful\n+ *\treturn, number of bytes actually read/written.  In case of\n+ *\terror, this may indicate at what point the error occurred.\n+ * @data: Buffer to read/write from\n+ *\n+ * Users may use %ETHTOOL_GDRVINFO or %ETHTOOL_GMODULEINFO to find\n+ * the length of an on-board or module EEPROM, respectively.  They\n+ * must allocate the buffer immediately following this structure.\n+ */\n+struct ethtool_eeprom {\n+\t__u32\tcmd;\n+\t__u32\tmagic;\n+\t__u32\toffset;\n+\t__u32\tlen;\n+\t__u8\tdata[0];\n+};\n+\n+/**\n+ * struct ethtool_eee - Energy Efficient Ethernet information\n+ * @cmd: ETHTOOL_{G,S}EEE\n+ * @supported: Mask of %SUPPORTED_* flags for the speed/duplex combinations\n+ *\tfor which there is EEE support.\n+ * @advertised: Mask of %ADVERTISED_* flags for the speed/duplex combinations\n+ *\tadvertised as eee capable.\n+ * @lp_advertised: Mask of %ADVERTISED_* flags for the speed/duplex\n+ *\tcombinations advertised by the link partner as eee capable.\n+ * @eee_active: Result of the eee auto negotiation.\n+ * @eee_enabled: EEE configured mode (enabled/disabled).\n+ * @tx_lpi_enabled: Whether the interface should assert its tx lpi, given\n+ *\tthat eee was negotiated.\n+ * @tx_lpi_timer: Time in microseconds the interface delays prior to asserting\n+ *\tits tx lpi (after reaching 'idle' state). Effective only when eee\n+ *\twas negotiated and tx_lpi_enabled was set.\n+ */\n+struct ethtool_eee {\n+\t__u32\tcmd;\n+\t__u32\tsupported;\n+\t__u32\tadvertised;\n+\t__u32\tlp_advertised;\n+\t__u32\teee_active;\n+\t__u32\teee_enabled;\n+\t__u32\ttx_lpi_enabled;\n+\t__u32\ttx_lpi_timer;\n+\t__u32\treserved[2];\n+};\n+\n+/**\n+ * struct ethtool_modinfo - plugin module eeprom information\n+ * @cmd: %ETHTOOL_GMODULEINFO\n+ * @type: Standard the module information conforms to %ETH_MODULE_SFF_xxxx\n+ * @eeprom_len: Length of the eeprom\n+ *\n+ * This structure is used to return the information to\n+ * properly size memory for a subsequent call to %ETHTOOL_GMODULEEEPROM.\n+ * The type code indicates the eeprom data format\n+ */\n+struct ethtool_modinfo {\n+\t__u32   cmd;\n+\t__u32   type;\n+\t__u32   eeprom_len;\n+\t__u32   reserved[8];\n+};\n+\n+/**\n+ * struct ethtool_coalesce - coalescing parameters for IRQs and stats updates\n+ * @cmd: ETHTOOL_{G,S}COALESCE\n+ * @rx_coalesce_usecs: How many usecs to delay an RX interrupt after\n+ *\ta packet arrives.\n+ * @rx_max_coalesced_frames: Maximum number of packets to receive\n+ *\tbefore an RX interrupt.\n+ * @rx_coalesce_usecs_irq: Same as @rx_coalesce_usecs, except that\n+ *\tthis value applies while an IRQ is being serviced by the host.\n+ * @rx_max_coalesced_frames_irq: Same as @rx_max_coalesced_frames,\n+ *\texcept that this value applies while an IRQ is being serviced\n+ *\tby the host.\n+ * @tx_coalesce_usecs: How many usecs to delay a TX interrupt after\n+ *\ta packet is sent.\n+ * @tx_max_coalesced_frames: Maximum number of packets to be sent\n+ *\tbefore a TX interrupt.\n+ * @tx_coalesce_usecs_irq: Same as @tx_coalesce_usecs, except that\n+ *\tthis value applies while an IRQ is being serviced by the host.\n+ * @tx_max_coalesced_frames_irq: Same as @tx_max_coalesced_frames,\n+ *\texcept that this value applies while an IRQ is being serviced\n+ *\tby the host.\n+ * @stats_block_coalesce_usecs: How many usecs to delay in-memory\n+ *\tstatistics block updates.  Some drivers do not have an\n+ *\tin-memory statistic block, and in such cases this value is\n+ *\tignored.  This value must not be zero.\n+ * @use_adaptive_rx_coalesce: Enable adaptive RX coalescing.\n+ * @use_adaptive_tx_coalesce: Enable adaptive TX coalescing.\n+ * @pkt_rate_low: Threshold for low packet rate (packets per second).\n+ * @rx_coalesce_usecs_low: How many usecs to delay an RX interrupt after\n+ *\ta packet arrives, when the packet rate is below @pkt_rate_low.\n+ * @rx_max_coalesced_frames_low: Maximum number of packets to be received\n+ *\tbefore an RX interrupt, when the packet rate is below @pkt_rate_low.\n+ * @tx_coalesce_usecs_low: How many usecs to delay a TX interrupt after\n+ *\ta packet is sent, when the packet rate is below @pkt_rate_low.\n+ * @tx_max_coalesced_frames_low: Maximum nuumber of packets to be sent before\n+ *\ta TX interrupt, when the packet rate is below @pkt_rate_low.\n+ * @pkt_rate_high: Threshold for high packet rate (packets per second).\n+ * @rx_coalesce_usecs_high: How many usecs to delay an RX interrupt after\n+ *\ta packet arrives, when the packet rate is above @pkt_rate_high.\n+ * @rx_max_coalesced_frames_high: Maximum number of packets to be received\n+ *\tbefore an RX interrupt, when the packet rate is above @pkt_rate_high.\n+ * @tx_coalesce_usecs_high: How many usecs to delay a TX interrupt after\n+ *\ta packet is sent, when the packet rate is above @pkt_rate_high.\n+ * @tx_max_coalesced_frames_high: Maximum number of packets to be sent before\n+ *\ta TX interrupt, when the packet rate is above @pkt_rate_high.\n+ * @rate_sample_interval: How often to do adaptive coalescing packet rate\n+ *\tsampling, measured in seconds.  Must not be zero.\n+ *\n+ * Each pair of (usecs, max_frames) fields specifies that interrupts\n+ * should be coalesced until\n+ *\t(usecs > 0 && time_since_first_completion >= usecs) ||\n+ *\t(max_frames > 0 && completed_frames >= max_frames)\n+ *\n+ * It is illegal to set both usecs and max_frames to zero as this\n+ * would cause interrupts to never be generated.  To disable\n+ * coalescing, set usecs = 0 and max_frames = 1.\n+ *\n+ * Some implementations ignore the value of max_frames and use the\n+ * condition time_since_first_completion >= usecs\n+ *\n+ * This is deprecated.  Drivers for hardware that does not support\n+ * counting completions should validate that max_frames == !rx_usecs.\n+ *\n+ * Adaptive RX/TX coalescing is an algorithm implemented by some\n+ * drivers to improve latency under low packet rates and improve\n+ * throughput under high packet rates.  Some drivers only implement\n+ * one of RX or TX adaptive coalescing.  Anything not implemented by\n+ * the driver causes these values to be silently ignored.\n+ *\n+ * When the packet rate is below @pkt_rate_high but above\n+ * @pkt_rate_low (both measured in packets per second) the\n+ * normal {rx,tx}_* coalescing parameters are used.\n+ */\n+struct ethtool_coalesce {\n+\t__u32\tcmd;\n+\t__u32\trx_coalesce_usecs;\n+\t__u32\trx_max_coalesced_frames;\n+\t__u32\trx_coalesce_usecs_irq;\n+\t__u32\trx_max_coalesced_frames_irq;\n+\t__u32\ttx_coalesce_usecs;\n+\t__u32\ttx_max_coalesced_frames;\n+\t__u32\ttx_coalesce_usecs_irq;\n+\t__u32\ttx_max_coalesced_frames_irq;\n+\t__u32\tstats_block_coalesce_usecs;\n+\t__u32\tuse_adaptive_rx_coalesce;\n+\t__u32\tuse_adaptive_tx_coalesce;\n+\t__u32\tpkt_rate_low;\n+\t__u32\trx_coalesce_usecs_low;\n+\t__u32\trx_max_coalesced_frames_low;\n+\t__u32\ttx_coalesce_usecs_low;\n+\t__u32\ttx_max_coalesced_frames_low;\n+\t__u32\tpkt_rate_high;\n+\t__u32\trx_coalesce_usecs_high;\n+\t__u32\trx_max_coalesced_frames_high;\n+\t__u32\ttx_coalesce_usecs_high;\n+\t__u32\ttx_max_coalesced_frames_high;\n+\t__u32\trate_sample_interval;\n+};\n+\n+/**\n+ * struct ethtool_ringparam - RX/TX ring parameters\n+ * @cmd: Command number = %ETHTOOL_GRINGPARAM or %ETHTOOL_SRINGPARAM\n+ * @rx_max_pending: Maximum supported number of pending entries per\n+ *\tRX ring.  Read-only.\n+ * @rx_mini_max_pending: Maximum supported number of pending entries\n+ *\tper RX mini ring.  Read-only.\n+ * @rx_jumbo_max_pending: Maximum supported number of pending entries\n+ *\tper RX jumbo ring.  Read-only.\n+ * @tx_max_pending: Maximum supported number of pending entries per\n+ *\tTX ring.  Read-only.\n+ * @rx_pending: Current maximum number of pending entries per RX ring\n+ * @rx_mini_pending: Current maximum number of pending entries per RX\n+ *\tmini ring\n+ * @rx_jumbo_pending: Current maximum number of pending entries per RX\n+ *\tjumbo ring\n+ * @tx_pending: Current maximum supported number of pending entries\n+ *\tper TX ring\n+ *\n+ * If the interface does not have separate RX mini and/or jumbo rings,\n+ * @rx_mini_max_pending and/or @rx_jumbo_max_pending will be 0.\n+ *\n+ * There may also be driver-dependent minimum values for the number\n+ * of entries per ring.\n+ */\n+struct ethtool_ringparam {\n+\t__u32\tcmd;\n+\t__u32\trx_max_pending;\n+\t__u32\trx_mini_max_pending;\n+\t__u32\trx_jumbo_max_pending;\n+\t__u32\ttx_max_pending;\n+\t__u32\trx_pending;\n+\t__u32\trx_mini_pending;\n+\t__u32\trx_jumbo_pending;\n+\t__u32\ttx_pending;\n+};\n+\n+/**\n+ * struct ethtool_channels - configuring number of network channel\n+ * @cmd: ETHTOOL_{G,S}CHANNELS\n+ * @max_rx: Read only. Maximum number of receive channel the driver support.\n+ * @max_tx: Read only. Maximum number of transmit channel the driver support.\n+ * @max_other: Read only. Maximum number of other channel the driver support.\n+ * @max_combined: Read only. Maximum number of combined channel the driver\n+ *\tsupport. Set of queues RX, TX or other.\n+ * @rx_count: Valid values are in the range 1 to the max_rx.\n+ * @tx_count: Valid values are in the range 1 to the max_tx.\n+ * @other_count: Valid values are in the range 1 to the max_other.\n+ * @combined_count: Valid values are in the range 1 to the max_combined.\n+ *\n+ * This can be used to configure RX, TX and other channels.\n+ */\n+\n+struct ethtool_channels {\n+\t__u32\tcmd;\n+\t__u32\tmax_rx;\n+\t__u32\tmax_tx;\n+\t__u32\tmax_other;\n+\t__u32\tmax_combined;\n+\t__u32\trx_count;\n+\t__u32\ttx_count;\n+\t__u32\tother_count;\n+\t__u32\tcombined_count;\n+};\n+\n+/**\n+ * struct ethtool_pauseparam - Ethernet pause (flow control) parameters\n+ * @cmd: Command number = %ETHTOOL_GPAUSEPARAM or %ETHTOOL_SPAUSEPARAM\n+ * @autoneg: Flag to enable autonegotiation of pause frame use\n+ * @rx_pause: Flag to enable reception of pause frames\n+ * @tx_pause: Flag to enable transmission of pause frames\n+ *\n+ * Drivers should reject a non-zero setting of @autoneg when\n+ * autoneogotiation is disabled (or not supported) for the link.\n+ *\n+ * If the link is autonegotiated, drivers should use\n+ * mii_advertise_flowctrl() or similar code to set the advertised\n+ * pause frame capabilities based on the @rx_pause and @tx_pause flags,\n+ * even if @autoneg is zero.  They should also allow the advertised\n+ * pause frame capabilities to be controlled directly through the\n+ * advertising field of &struct ethtool_cmd.\n+ *\n+ * If @autoneg is non-zero, the MAC is configured to send and/or\n+ * receive pause frames according to the result of autonegotiation.\n+ * Otherwise, it is configured directly based on the @rx_pause and\n+ * @tx_pause flags.\n+ */\n+struct ethtool_pauseparam {\n+\t__u32\tcmd;\n+\t__u32\tautoneg;\n+\t__u32\trx_pause;\n+\t__u32\ttx_pause;\n+};\n+\n+#define ETH_GSTRING_LEN\t\t32\n+\n+/**\n+ * enum ethtool_stringset - string set ID\n+ * @ETH_SS_TEST: Self-test result names, for use with %ETHTOOL_TEST\n+ * @ETH_SS_STATS: Statistic names, for use with %ETHTOOL_GSTATS\n+ * @ETH_SS_PRIV_FLAGS: Driver private flag names, for use with\n+ *\t%ETHTOOL_GPFLAGS and %ETHTOOL_SPFLAGS\n+ * @ETH_SS_NTUPLE_FILTERS: Previously used with %ETHTOOL_GRXNTUPLE;\n+ *\tnow deprecated\n+ * @ETH_SS_FEATURES: Device feature names\n+ * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names\n+ * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS\n+ * @ETH_SS_PHY_TUNABLES: PHY tunable names\n+ */\n+enum ethtool_stringset {\n+\tETH_SS_TEST\t\t= 0,\n+\tETH_SS_STATS,\n+\tETH_SS_PRIV_FLAGS,\n+\tETH_SS_NTUPLE_FILTERS,\n+\tETH_SS_FEATURES,\n+\tETH_SS_RSS_HASH_FUNCS,\n+\tETH_SS_TUNABLES,\n+\tETH_SS_PHY_STATS,\n+\tETH_SS_PHY_TUNABLES,\n+};\n+\n+/**\n+ * struct ethtool_gstrings - string set for data tagging\n+ * @cmd: Command number = %ETHTOOL_GSTRINGS\n+ * @string_set: String set ID; one of &enum ethtool_stringset\n+ * @len: On return, the number of strings in the string set\n+ * @data: Buffer for strings.  Each string is null-padded to a size of\n+ *\t%ETH_GSTRING_LEN.\n+ *\n+ * Users must use %ETHTOOL_GSSET_INFO to find the number of strings in\n+ * the string set.  They must allocate a buffer of the appropriate\n+ * size immediately following this structure.\n+ */\n+struct ethtool_gstrings {\n+\t__u32\tcmd;\n+\t__u32\tstring_set;\n+\t__u32\tlen;\n+\t__u8\tdata[0];\n+};\n+\n+/**\n+ * struct ethtool_sset_info - string set information\n+ * @cmd: Command number = %ETHTOOL_GSSET_INFO\n+ * @sset_mask: On entry, a bitmask of string sets to query, with bits\n+ *\tnumbered according to &enum ethtool_stringset.  On return, a\n+ *\tbitmask of those string sets queried that are supported.\n+ * @data: Buffer for string set sizes.  On return, this contains the\n+ *\tsize of each string set that was queried and supported, in\n+ *\torder of ID.\n+ *\n+ * Example: The user passes in @sset_mask = 0x7 (sets 0, 1, 2) and on\n+ * return @sset_mask == 0x6 (sets 1, 2).  Then @data[0] contains the\n+ * size of set 1 and @data[1] contains the size of set 2.\n+ *\n+ * Users must allocate a buffer of the appropriate size (4 * number of\n+ * sets queried) immediately following this structure.\n+ */\n+struct ethtool_sset_info {\n+\t__u32\tcmd;\n+\t__u32\treserved;\n+\t__u64\tsset_mask;\n+\t__u32\tdata[0];\n+};\n+\n+/**\n+ * enum ethtool_test_flags - flags definition of ethtool_test\n+ * @ETH_TEST_FL_OFFLINE: if set perform online and offline tests, otherwise\n+ *\tonly online tests.\n+ * @ETH_TEST_FL_FAILED: Driver set this flag if test fails.\n+ * @ETH_TEST_FL_EXTERNAL_LB: Application request to perform external loopback\n+ *\ttest.\n+ * @ETH_TEST_FL_EXTERNAL_LB_DONE: Driver performed the external loopback test\n+ */\n+\n+enum ethtool_test_flags {\n+\tETH_TEST_FL_OFFLINE\t= (1 << 0),\n+\tETH_TEST_FL_FAILED\t= (1 << 1),\n+\tETH_TEST_FL_EXTERNAL_LB\t= (1 << 2),\n+\tETH_TEST_FL_EXTERNAL_LB_DONE\t= (1 << 3),\n+};\n+\n+/**\n+ * struct ethtool_test - device self-test invocation\n+ * @cmd: Command number = %ETHTOOL_TEST\n+ * @flags: A bitmask of flags from &enum ethtool_test_flags.  Some\n+ *\tflags may be set by the user on entry; others may be set by\n+ *\tthe driver on return.\n+ * @len: On return, the number of test results\n+ * @data: Array of test results\n+ *\n+ * Users must use %ETHTOOL_GSSET_INFO or %ETHTOOL_GDRVINFO to find the\n+ * number of test results that will be returned.  They must allocate a\n+ * buffer of the appropriate size (8 * number of results) immediately\n+ * following this structure.\n+ */\n+struct ethtool_test {\n+\t__u32\tcmd;\n+\t__u32\tflags;\n+\t__u32\treserved;\n+\t__u32\tlen;\n+\t__u64\tdata[0];\n+};\n+\n+/**\n+ * struct ethtool_stats - device-specific statistics\n+ * @cmd: Command number = %ETHTOOL_GSTATS\n+ * @n_stats: On return, the number of statistics\n+ * @data: Array of statistics\n+ *\n+ * Users must use %ETHTOOL_GSSET_INFO or %ETHTOOL_GDRVINFO to find the\n+ * number of statistics that will be returned.  They must allocate a\n+ * buffer of the appropriate size (8 * number of statistics)\n+ * immediately following this structure.\n+ */\n+struct ethtool_stats {\n+\t__u32\tcmd;\n+\t__u32\tn_stats;\n+\t__u64\tdata[0];\n+};\n+\n+/**\n+ * struct ethtool_perm_addr - permanent hardware address\n+ * @cmd: Command number = %ETHTOOL_GPERMADDR\n+ * @size: On entry, the size of the buffer.  On return, the size of the\n+ *\taddress.  The command fails if the buffer is too small.\n+ * @data: Buffer for the address\n+ *\n+ * Users must allocate the buffer immediately following this structure.\n+ * A buffer size of %MAX_ADDR_LEN should be sufficient for any address\n+ * type.\n+ */\n+struct ethtool_perm_addr {\n+\t__u32\tcmd;\n+\t__u32\tsize;\n+\t__u8\tdata[0];\n+};\n+\n+/* boolean flags controlling per-interface behavior characteristics.\n+ * When reading, the flag indicates whether or not a certain behavior\n+ * is enabled/present.  When writing, the flag indicates whether\n+ * or not the driver should turn on (set) or off (clear) a behavior.\n+ *\n+ * Some behaviors may read-only (unconditionally absent or present).\n+ * If such is the case, return EINVAL in the set-flags operation if the\n+ * flag differs from the read-only value.\n+ */\n+enum ethtool_flags {\n+\tETH_FLAG_TXVLAN\t\t= (1 << 7),\t/* TX VLAN offload enabled */\n+\tETH_FLAG_RXVLAN\t\t= (1 << 8),\t/* RX VLAN offload enabled */\n+\tETH_FLAG_LRO\t\t= (1 << 15),\t/* LRO is enabled */\n+\tETH_FLAG_NTUPLE\t\t= (1 << 27),\t/* N-tuple filters enabled */\n+\tETH_FLAG_RXHASH\t\t= (1 << 28),\n+};\n+\n+/* The following structures are for supporting RX network flow\n+ * classification and RX n-tuple configuration. Note, all multibyte\n+ * fields, e.g., ip4src, ip4dst, psrc, pdst, spi, etc. are expected to\n+ * be in network byte order.\n+ */\n+\n+/**\n+ * struct ethtool_tcpip4_spec - flow specification for TCP/IPv4 etc.\n+ * @ip4src: Source host\n+ * @ip4dst: Destination host\n+ * @psrc: Source port\n+ * @pdst: Destination port\n+ * @tos: Type-of-service\n+ *\n+ * This can be used to specify a TCP/IPv4, UDP/IPv4 or SCTP/IPv4 flow.\n+ */\n+struct ethtool_tcpip4_spec {\n+\t__be32\tip4src;\n+\t__be32\tip4dst;\n+\t__be16\tpsrc;\n+\t__be16\tpdst;\n+\t__u8    tos;\n+};\n+\n+/**\n+ * struct ethtool_ah_espip4_spec - flow specification for IPsec/IPv4\n+ * @ip4src: Source host\n+ * @ip4dst: Destination host\n+ * @spi: Security parameters index\n+ * @tos: Type-of-service\n+ *\n+ * This can be used to specify an IPsec transport or tunnel over IPv4.\n+ */\n+struct ethtool_ah_espip4_spec {\n+\t__be32\tip4src;\n+\t__be32\tip4dst;\n+\t__be32\tspi;\n+\t__u8    tos;\n+};\n+\n+#define\tETH_RX_NFC_IP4\t1\n+\n+/**\n+ * struct ethtool_usrip4_spec - general flow specification for IPv4\n+ * @ip4src: Source host\n+ * @ip4dst: Destination host\n+ * @l4_4_bytes: First 4 bytes of transport (layer 4) header\n+ * @tos: Type-of-service\n+ * @ip_ver: Value must be %ETH_RX_NFC_IP4; mask must be 0\n+ * @proto: Transport protocol number; mask must be 0\n+ */\n+struct ethtool_usrip4_spec {\n+\t__be32\tip4src;\n+\t__be32\tip4dst;\n+\t__be32\tl4_4_bytes;\n+\t__u8    tos;\n+\t__u8    ip_ver;\n+\t__u8    proto;\n+};\n+\n+/**\n+ * struct ethtool_tcpip6_spec - flow specification for TCP/IPv6 etc.\n+ * @ip6src: Source host\n+ * @ip6dst: Destination host\n+ * @psrc: Source port\n+ * @pdst: Destination port\n+ * @tclass: Traffic Class\n+ *\n+ * This can be used to specify a TCP/IPv6, UDP/IPv6 or SCTP/IPv6 flow.\n+ */\n+struct ethtool_tcpip6_spec {\n+\t__be32\tip6src[4];\n+\t__be32\tip6dst[4];\n+\t__be16\tpsrc;\n+\t__be16\tpdst;\n+\t__u8    tclass;\n+};\n+\n+/**\n+ * struct ethtool_ah_espip6_spec - flow specification for IPsec/IPv6\n+ * @ip6src: Source host\n+ * @ip6dst: Destination host\n+ * @spi: Security parameters index\n+ * @tclass: Traffic Class\n+ *\n+ * This can be used to specify an IPsec transport or tunnel over IPv6.\n+ */\n+struct ethtool_ah_espip6_spec {\n+\t__be32\tip6src[4];\n+\t__be32\tip6dst[4];\n+\t__be32\tspi;\n+\t__u8    tclass;\n+};\n+\n+/**\n+ * struct ethtool_usrip6_spec - general flow specification for IPv6\n+ * @ip6src: Source host\n+ * @ip6dst: Destination host\n+ * @l4_4_bytes: First 4 bytes of transport (layer 4) header\n+ * @tclass: Traffic Class\n+ * @l4_proto: Transport protocol number (nexthdr after any Extension Headers)\n+ */\n+struct ethtool_usrip6_spec {\n+\t__be32\tip6src[4];\n+\t__be32\tip6dst[4];\n+\t__be32\tl4_4_bytes;\n+\t__u8    tclass;\n+\t__u8    l4_proto;\n+};\n+\n+union ethtool_flow_union {\n+\tstruct ethtool_tcpip4_spec\t\ttcp_ip4_spec;\n+\tstruct ethtool_tcpip4_spec\t\tudp_ip4_spec;\n+\tstruct ethtool_tcpip4_spec\t\tsctp_ip4_spec;\n+\tstruct ethtool_ah_espip4_spec\t\tah_ip4_spec;\n+\tstruct ethtool_ah_espip4_spec\t\tesp_ip4_spec;\n+\tstruct ethtool_usrip4_spec\t\tusr_ip4_spec;\n+\tstruct ethtool_tcpip6_spec\t\ttcp_ip6_spec;\n+\tstruct ethtool_tcpip6_spec\t\tudp_ip6_spec;\n+\tstruct ethtool_tcpip6_spec\t\tsctp_ip6_spec;\n+\tstruct ethtool_ah_espip6_spec\t\tah_ip6_spec;\n+\tstruct ethtool_ah_espip6_spec\t\tesp_ip6_spec;\n+\tstruct ethtool_usrip6_spec\t\tusr_ip6_spec;\n+\tstruct ethhdr\t\t\t\tether_spec;\n+\t__u8\t\t\t\t\thdata[52];\n+};\n+\n+/**\n+ * struct ethtool_flow_ext - additional RX flow fields\n+ * @h_dest: destination MAC address\n+ * @vlan_etype: VLAN EtherType\n+ * @vlan_tci: VLAN tag control information\n+ * @data: user defined data\n+ *\n+ * Note, @vlan_etype, @vlan_tci, and @data are only valid if %FLOW_EXT\n+ * is set in &struct ethtool_rx_flow_spec @flow_type.\n+ * @h_dest is valid if %FLOW_MAC_EXT is set.\n+ */\n+struct ethtool_flow_ext {\n+\t__u8\t\tpadding[2];\n+\tunsigned char\th_dest[ETH_ALEN];\n+\t__be16\t\tvlan_etype;\n+\t__be16\t\tvlan_tci;\n+\t__be32\t\tdata[2];\n+};\n+\n+/**\n+ * struct ethtool_rx_flow_spec - classification rule for RX flows\n+ * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW\n+ * @h_u: Flow fields to match (dependent on @flow_type)\n+ * @h_ext: Additional fields to match\n+ * @m_u: Masks for flow field bits to be matched\n+ * @m_ext: Masks for additional field bits to be matched\n+ *\tNote, all additional fields must be ignored unless @flow_type\n+ *\tincludes the %FLOW_EXT or %FLOW_MAC_EXT flag\n+ *\t(see &struct ethtool_flow_ext description).\n+ * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC\n+ *\tif packets should be discarded, or %RX_CLS_FLOW_WAKE if the\n+ *\tpackets should be used for Wake-on-LAN with %WAKE_FILTER\n+ * @location: Location of rule in the table.  Locations must be\n+ *\tnumbered such that a flow matching multiple rules will be\n+ *\tclassified according to the first (lowest numbered) rule.\n+ */\n+struct ethtool_rx_flow_spec {\n+\t__u32\t\tflow_type;\n+\tunion ethtool_flow_union h_u;\n+\tstruct ethtool_flow_ext h_ext;\n+\tunion ethtool_flow_union m_u;\n+\tstruct ethtool_flow_ext m_ext;\n+\t__u64\t\tring_cookie;\n+\t__u32\t\tlocation;\n+};\n+\n+/* How rings are laid out when accessing virtual functions or\n+ * offloaded queues is device specific. To allow users to do flow\n+ * steering and specify these queues the ring cookie is partitioned\n+ * into a 32bit queue index with an 8 bit virtual function id.\n+ * This also leaves the 3bytes for further specifiers. It is possible\n+ * future devices may support more than 256 virtual functions if\n+ * devices start supporting PCIe w/ARI. However at the moment I\n+ * do not know of any devices that support this so I do not reserve\n+ * space for this at this time. If a future patch consumes the next\n+ * byte it should be aware of this possibility.\n+ */\n+#define ETHTOOL_RX_FLOW_SPEC_RING\t0x00000000FFFFFFFFLL\n+#define ETHTOOL_RX_FLOW_SPEC_RING_VF\t0x000000FF00000000LL\n+#define ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF 32\n+static inline __u64 ethtool_get_flow_spec_ring(__u64 ring_cookie)\n+{\n+\treturn ETHTOOL_RX_FLOW_SPEC_RING & ring_cookie;\n+}\n+\n+static inline __u64 ethtool_get_flow_spec_ring_vf(__u64 ring_cookie)\n+{\n+\treturn (ETHTOOL_RX_FLOW_SPEC_RING_VF & ring_cookie) >>\n+\t\t\t\tETHTOOL_RX_FLOW_SPEC_RING_VF_OFF;\n+}\n+\n+/**\n+ * struct ethtool_rxnfc - command to get or set RX flow classification rules\n+ * @cmd: Specific command number - %ETHTOOL_GRXFH, %ETHTOOL_SRXFH,\n+ *\t%ETHTOOL_GRXRINGS, %ETHTOOL_GRXCLSRLCNT, %ETHTOOL_GRXCLSRULE,\n+ *\t%ETHTOOL_GRXCLSRLALL, %ETHTOOL_SRXCLSRLDEL or %ETHTOOL_SRXCLSRLINS\n+ * @flow_type: Type of flow to be affected, e.g. %TCP_V4_FLOW\n+ * @data: Command-dependent value\n+ * @fs: Flow classification rule\n+ * @rss_context: RSS context to be affected\n+ * @rule_cnt: Number of rules to be affected\n+ * @rule_locs: Array of used rule locations\n+ *\n+ * For %ETHTOOL_GRXFH and %ETHTOOL_SRXFH, @data is a bitmask indicating\n+ * the fields included in the flow hash, e.g. %RXH_IP_SRC.  The following\n+ * structure fields must not be used, except that if @flow_type includes\n+ * the %FLOW_RSS flag, then @rss_context determines which RSS context to\n+ * act on.\n+ *\n+ * For %ETHTOOL_GRXRINGS, @data is set to the number of RX rings/queues\n+ * on return.\n+ *\n+ * For %ETHTOOL_GRXCLSRLCNT, @rule_cnt is set to the number of defined\n+ * rules on return.  If @data is non-zero on return then it is the\n+ * size of the rule table, plus the flag %RX_CLS_LOC_SPECIAL if the\n+ * driver supports any special location values.  If that flag is not\n+ * set in @data then special location values should not be used.\n+ *\n+ * For %ETHTOOL_GRXCLSRULE, @fs.@location specifies the location of an\n+ * existing rule on entry and @fs contains the rule on return; if\n+ * @fs.@flow_type includes the %FLOW_RSS flag, then @rss_context is\n+ * filled with the RSS context ID associated with the rule.\n+ *\n+ * For %ETHTOOL_GRXCLSRLALL, @rule_cnt specifies the array size of the\n+ * user buffer for @rule_locs on entry.  On return, @data is the size\n+ * of the rule table, @rule_cnt is the number of defined rules, and\n+ * @rule_locs contains the locations of the defined rules.  Drivers\n+ * must use the second parameter to get_rxnfc() instead of @rule_locs.\n+ *\n+ * For %ETHTOOL_SRXCLSRLINS, @fs specifies the rule to add or update.\n+ * @fs.@location either specifies the location to use or is a special\n+ * location value with %RX_CLS_LOC_SPECIAL flag set.  On return,\n+ * @fs.@location is the actual rule location.  If @fs.@flow_type\n+ * includes the %FLOW_RSS flag, @rss_context is the RSS context ID to\n+ * use for flow spreading traffic which matches this rule.  The value\n+ * from the rxfh indirection table will be added to @fs.@ring_cookie\n+ * to choose which ring to deliver to.\n+ *\n+ * For %ETHTOOL_SRXCLSRLDEL, @fs.@location specifies the location of an\n+ * existing rule on entry.\n+ *\n+ * A driver supporting the special location values for\n+ * %ETHTOOL_SRXCLSRLINS may add the rule at any suitable unused\n+ * location, and may remove a rule at a later location (lower\n+ * priority) that matches exactly the same set of flows.  The special\n+ * values are %RX_CLS_LOC_ANY, selecting any location;\n+ * %RX_CLS_LOC_FIRST, selecting the first suitable location (maximum\n+ * priority); and %RX_CLS_LOC_LAST, selecting the last suitable\n+ * location (minimum priority).  Additional special values may be\n+ * defined in future and drivers must return -%EINVAL for any\n+ * unrecognised value.\n+ */\n+struct ethtool_rxnfc {\n+\t__u32\t\t\t\tcmd;\n+\t__u32\t\t\t\tflow_type;\n+\t__u64\t\t\t\tdata;\n+\tstruct ethtool_rx_flow_spec\tfs;\n+\tunion {\n+\t\t__u32\t\t\trule_cnt;\n+\t\t__u32\t\t\trss_context;\n+\t};\n+\t__u32\t\t\t\trule_locs[0];\n+};\n+\n+\n+/**\n+ * struct ethtool_rxfh_indir - command to get or set RX flow hash indirection\n+ * @cmd: Specific command number - %ETHTOOL_GRXFHINDIR or %ETHTOOL_SRXFHINDIR\n+ * @size: On entry, the array size of the user buffer, which may be zero.\n+ *\tOn return from %ETHTOOL_GRXFHINDIR, the array size of the hardware\n+ *\tindirection table.\n+ * @ring_index: RX ring/queue index for each hash value\n+ *\n+ * For %ETHTOOL_GRXFHINDIR, a @size of zero means that only the size\n+ * should be returned.  For %ETHTOOL_SRXFHINDIR, a @size of zero means\n+ * the table should be reset to default values.  This last feature\n+ * is not supported by the original implementations.\n+ */\n+struct ethtool_rxfh_indir {\n+\t__u32\tcmd;\n+\t__u32\tsize;\n+\t__u32\tring_index[0];\n+};\n+\n+/**\n+ * struct ethtool_rxfh - command to get/set RX flow hash indir or/and hash key.\n+ * @cmd: Specific command number - %ETHTOOL_GRSSH or %ETHTOOL_SRSSH\n+ * @rss_context: RSS context identifier.  Context 0 is the default for normal\n+ *\ttraffic; other contexts can be referenced as the destination for RX flow\n+ *\tclassification rules.  %ETH_RXFH_CONTEXT_ALLOC is used with command\n+ *\t%ETHTOOL_SRSSH to allocate a new RSS context; on return this field will\n+ *\tcontain the ID of the newly allocated context.\n+ * @indir_size: On entry, the array size of the user buffer for the\n+ *\tindirection table, which may be zero, or (for %ETHTOOL_SRSSH),\n+ *\t%ETH_RXFH_INDIR_NO_CHANGE.  On return from %ETHTOOL_GRSSH,\n+ *\tthe array size of the hardware indirection table.\n+ * @key_size: On entry, the array size of the user buffer for the hash key,\n+ *\twhich may be zero.  On return from %ETHTOOL_GRSSH, the size of the\n+ *\thardware hash key.\n+ * @hfunc: Defines the current RSS hash function used by HW (or to be set to).\n+ *\tValid values are one of the %ETH_RSS_HASH_*.\n+ * @rsvd:\tReserved for future extensions.\n+ * @rss_config: RX ring/queue index for each hash value i.e., indirection table\n+ *\tof @indir_size __u32 elements, followed by hash key of @key_size\n+ *\tbytes.\n+ *\n+ * For %ETHTOOL_GRSSH, a @indir_size and key_size of zero means that only the\n+ * size should be returned.  For %ETHTOOL_SRSSH, an @indir_size of\n+ * %ETH_RXFH_INDIR_NO_CHANGE means that indir table setting is not requested\n+ * and a @indir_size of zero means the indir table should be reset to default\n+ * values (if @rss_context == 0) or that the RSS context should be deleted.\n+ * An hfunc of zero means that hash function setting is not requested.\n+ */\n+struct ethtool_rxfh {\n+\t__u32   cmd;\n+\t__u32\trss_context;\n+\t__u32   indir_size;\n+\t__u32   key_size;\n+\t__u8\thfunc;\n+\t__u8\trsvd8[3];\n+\t__u32\trsvd32;\n+\t__u32   rss_config[0];\n+};\n+#define ETH_RXFH_CONTEXT_ALLOC\t\t0xffffffff\n+#define ETH_RXFH_INDIR_NO_CHANGE\t0xffffffff\n+\n+/**\n+ * struct ethtool_rx_ntuple_flow_spec - specification for RX flow filter\n+ * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW\n+ * @h_u: Flow field values to match (dependent on @flow_type)\n+ * @m_u: Masks for flow field value bits to be ignored\n+ * @vlan_tag: VLAN tag to match\n+ * @vlan_tag_mask: Mask for VLAN tag bits to be ignored\n+ * @data: Driver-dependent data to match\n+ * @data_mask: Mask for driver-dependent data bits to be ignored\n+ * @action: RX ring/queue index to deliver to (non-negative) or other action\n+ *\t(negative, e.g. %ETHTOOL_RXNTUPLE_ACTION_DROP)\n+ *\n+ * For flow types %TCP_V4_FLOW, %UDP_V4_FLOW and %SCTP_V4_FLOW, where\n+ * a field value and mask are both zero this is treated as if all mask\n+ * bits are set i.e. the field is ignored.\n+ */\n+struct ethtool_rx_ntuple_flow_spec {\n+\t__u32\t\t flow_type;\n+\tunion {\n+\t\tstruct ethtool_tcpip4_spec\t\ttcp_ip4_spec;\n+\t\tstruct ethtool_tcpip4_spec\t\tudp_ip4_spec;\n+\t\tstruct ethtool_tcpip4_spec\t\tsctp_ip4_spec;\n+\t\tstruct ethtool_ah_espip4_spec\t\tah_ip4_spec;\n+\t\tstruct ethtool_ah_espip4_spec\t\tesp_ip4_spec;\n+\t\tstruct ethtool_usrip4_spec\t\tusr_ip4_spec;\n+\t\tstruct ethhdr\t\t\t\tether_spec;\n+\t\t__u8\t\t\t\t\thdata[72];\n+\t} h_u, m_u;\n+\n+\t__u16\t        vlan_tag;\n+\t__u16\t        vlan_tag_mask;\n+\t__u64\t\tdata;\n+\t__u64\t\tdata_mask;\n+\n+\t__s32\t\taction;\n+#define ETHTOOL_RXNTUPLE_ACTION_DROP\t(-1)\t/* drop packet */\n+#define ETHTOOL_RXNTUPLE_ACTION_CLEAR\t(-2)\t/* clear filter */\n+};\n+\n+/**\n+ * struct ethtool_rx_ntuple - command to set or clear RX flow filter\n+ * @cmd: Command number - %ETHTOOL_SRXNTUPLE\n+ * @fs: Flow filter specification\n+ */\n+struct ethtool_rx_ntuple {\n+\t__u32\t\t\t\t\tcmd;\n+\tstruct ethtool_rx_ntuple_flow_spec\tfs;\n+};\n+\n+#define ETHTOOL_FLASH_MAX_FILENAME\t128\n+enum ethtool_flash_op_type {\n+\tETHTOOL_FLASH_ALL_REGIONS\t= 0,\n+};\n+\n+/* for passing firmware flashing related parameters */\n+struct ethtool_flash {\n+\t__u32\tcmd;\n+\t__u32\tregion;\n+\tchar\tdata[ETHTOOL_FLASH_MAX_FILENAME];\n+};\n+\n+/**\n+ * struct ethtool_dump - used for retrieving, setting device dump\n+ * @cmd: Command number - %ETHTOOL_GET_DUMP_FLAG, %ETHTOOL_GET_DUMP_DATA, or\n+ * \t%ETHTOOL_SET_DUMP\n+ * @version: FW version of the dump, filled in by driver\n+ * @flag: driver dependent flag for dump setting, filled in by driver during\n+ *        get and filled in by ethtool for set operation.\n+ *        flag must be initialized by macro ETH_FW_DUMP_DISABLE value when\n+ *        firmware dump is disabled.\n+ * @len: length of dump data, used as the length of the user buffer on entry to\n+ * \t %ETHTOOL_GET_DUMP_DATA and this is returned as dump length by driver\n+ * \t for %ETHTOOL_GET_DUMP_FLAG command\n+ * @data: data collected for get dump data operation\n+ */\n+struct ethtool_dump {\n+\t__u32\tcmd;\n+\t__u32\tversion;\n+\t__u32\tflag;\n+\t__u32\tlen;\n+\t__u8\tdata[0];\n+};\n+\n+#define ETH_FW_DUMP_DISABLE 0\n+\n+/* for returning and changing feature sets */\n+\n+/**\n+ * struct ethtool_get_features_block - block with state of 32 features\n+ * @available: mask of changeable features\n+ * @requested: mask of features requested to be enabled if possible\n+ * @active: mask of currently enabled features\n+ * @never_changed: mask of features not changeable for any device\n+ */\n+struct ethtool_get_features_block {\n+\t__u32\tavailable;\n+\t__u32\trequested;\n+\t__u32\tactive;\n+\t__u32\tnever_changed;\n+};\n+\n+/**\n+ * struct ethtool_gfeatures - command to get state of device's features\n+ * @cmd: command number = %ETHTOOL_GFEATURES\n+ * @size: On entry, the number of elements in the features[] array;\n+ *\ton return, the number of elements in features[] needed to hold\n+ *\tall features\n+ * @features: state of features\n+ */\n+struct ethtool_gfeatures {\n+\t__u32\tcmd;\n+\t__u32\tsize;\n+\tstruct ethtool_get_features_block features[0];\n+};\n+\n+/**\n+ * struct ethtool_set_features_block - block with request for 32 features\n+ * @valid: mask of features to be changed\n+ * @requested: values of features to be changed\n+ */\n+struct ethtool_set_features_block {\n+\t__u32\tvalid;\n+\t__u32\trequested;\n+};\n+\n+/**\n+ * struct ethtool_sfeatures - command to request change in device's features\n+ * @cmd: command number = %ETHTOOL_SFEATURES\n+ * @size: array size of the features[] array\n+ * @features: feature change masks\n+ */\n+struct ethtool_sfeatures {\n+\t__u32\tcmd;\n+\t__u32\tsize;\n+\tstruct ethtool_set_features_block features[0];\n+};\n+\n+/**\n+ * struct ethtool_ts_info - holds a device's timestamping and PHC association\n+ * @cmd: command number = %ETHTOOL_GET_TS_INFO\n+ * @so_timestamping: bit mask of the sum of the supported SO_TIMESTAMPING flags\n+ * @phc_index: device index of the associated PHC, or -1 if there is none\n+ * @tx_types: bit mask of the supported hwtstamp_tx_types enumeration values\n+ * @rx_filters: bit mask of the supported hwtstamp_rx_filters enumeration values\n+ *\n+ * The bits in the 'tx_types' and 'rx_filters' fields correspond to\n+ * the 'hwtstamp_tx_types' and 'hwtstamp_rx_filters' enumeration values,\n+ * respectively.  For example, if the device supports HWTSTAMP_TX_ON,\n+ * then (1 << HWTSTAMP_TX_ON) in 'tx_types' will be set.\n+ *\n+ * Drivers should only report the filters they actually support without\n+ * upscaling in the SIOCSHWTSTAMP ioctl. If the SIOCSHWSTAMP request for\n+ * HWTSTAMP_FILTER_V1_SYNC is supported by HWTSTAMP_FILTER_V1_EVENT, then the\n+ * driver should only report HWTSTAMP_FILTER_V1_EVENT in this op.\n+ */\n+struct ethtool_ts_info {\n+\t__u32\tcmd;\n+\t__u32\tso_timestamping;\n+\t__s32\tphc_index;\n+\t__u32\ttx_types;\n+\t__u32\ttx_reserved[3];\n+\t__u32\trx_filters;\n+\t__u32\trx_reserved[3];\n+};\n+\n+/*\n+ * %ETHTOOL_SFEATURES changes features present in features[].valid to the\n+ * values of corresponding bits in features[].requested. Bits in .requested\n+ * not set in .valid or not changeable are ignored.\n+ *\n+ * Returns %EINVAL when .valid contains undefined or never-changeable bits\n+ * or size is not equal to required number of features words (32-bit blocks).\n+ * Returns >= 0 if request was completed; bits set in the value mean:\n+ *   %ETHTOOL_F_UNSUPPORTED - there were bits set in .valid that are not\n+ *\tchangeable (not present in %ETHTOOL_GFEATURES' features[].available)\n+ *\tthose bits were ignored.\n+ *   %ETHTOOL_F_WISH - some or all changes requested were recorded but the\n+ *      resulting state of bits masked by .valid is not equal to .requested.\n+ *      Probably there are other device-specific constraints on some features\n+ *      in the set. When %ETHTOOL_F_UNSUPPORTED is set, .valid is considered\n+ *      here as though ignored bits were cleared.\n+ *   %ETHTOOL_F_COMPAT - some or all changes requested were made by calling\n+ *      compatibility functions. Requested offload state cannot be properly\n+ *      managed by kernel.\n+ *\n+ * Meaning of bits in the masks are obtained by %ETHTOOL_GSSET_INFO (number of\n+ * bits in the arrays - always multiple of 32) and %ETHTOOL_GSTRINGS commands\n+ * for ETH_SS_FEATURES string set. First entry in the table corresponds to least\n+ * significant bit in features[0] fields. Empty strings mark undefined features.\n+ */\n+enum ethtool_sfeatures_retval_bits {\n+\tETHTOOL_F_UNSUPPORTED__BIT,\n+\tETHTOOL_F_WISH__BIT,\n+\tETHTOOL_F_COMPAT__BIT,\n+};\n+\n+#define ETHTOOL_F_UNSUPPORTED   (1 << ETHTOOL_F_UNSUPPORTED__BIT)\n+#define ETHTOOL_F_WISH          (1 << ETHTOOL_F_WISH__BIT)\n+#define ETHTOOL_F_COMPAT        (1 << ETHTOOL_F_COMPAT__BIT)\n+\n+#define MAX_NUM_QUEUE\t\t4096\n+\n+/**\n+ * struct ethtool_per_queue_op - apply sub command to the queues in mask.\n+ * @cmd: ETHTOOL_PERQUEUE\n+ * @sub_command: the sub command which apply to each queues\n+ * @queue_mask: Bitmap of the queues which sub command apply to\n+ * @data: A complete command structure following for each of the queues addressed\n+ */\n+struct ethtool_per_queue_op {\n+\t__u32\tcmd;\n+\t__u32\tsub_command;\n+\t__u32\tqueue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)];\n+\tchar\tdata[];\n+};\n+\n+/**\n+ * struct ethtool_fecparam - Ethernet forward error correction(fec) parameters\n+ * @cmd: Command number = %ETHTOOL_GFECPARAM or %ETHTOOL_SFECPARAM\n+ * @active_fec: FEC mode which is active on porte\n+ * @fec: Bitmask of supported/configured FEC modes\n+ * @rsvd: Reserved for future extensions. i.e FEC bypass feature.\n+ *\n+ * Drivers should reject a non-zero setting of @autoneg when\n+ * autoneogotiation is disabled (or not supported) for the link.\n+ *\n+ */\n+struct ethtool_fecparam {\n+\t__u32   cmd;\n+\t/* bitmask of FEC modes */\n+\t__u32   active_fec;\n+\t__u32   fec;\n+\t__u32   reserved;\n+};\n+\n+/**\n+ * enum ethtool_fec_config_bits - flags definition of ethtool_fec_configuration\n+ * @ETHTOOL_FEC_NONE: FEC mode configuration is not supported\n+ * @ETHTOOL_FEC_AUTO: Default/Best FEC mode provided by driver\n+ * @ETHTOOL_FEC_OFF: No FEC Mode\n+ * @ETHTOOL_FEC_RS: Reed-Solomon Forward Error Detection mode\n+ * @ETHTOOL_FEC_BASER: Base-R/Reed-Solomon Forward Error Detection mode\n+ */\n+enum ethtool_fec_config_bits {\n+\tETHTOOL_FEC_NONE_BIT,\n+\tETHTOOL_FEC_AUTO_BIT,\n+\tETHTOOL_FEC_OFF_BIT,\n+\tETHTOOL_FEC_RS_BIT,\n+\tETHTOOL_FEC_BASER_BIT,\n+};\n+\n+#define ETHTOOL_FEC_NONE\t\t(1 << ETHTOOL_FEC_NONE_BIT)\n+#define ETHTOOL_FEC_AUTO\t\t(1 << ETHTOOL_FEC_AUTO_BIT)\n+#define ETHTOOL_FEC_OFF\t\t\t(1 << ETHTOOL_FEC_OFF_BIT)\n+#define ETHTOOL_FEC_RS\t\t\t(1 << ETHTOOL_FEC_RS_BIT)\n+#define ETHTOOL_FEC_BASER\t\t(1 << ETHTOOL_FEC_BASER_BIT)\n+\n+/* CMDs currently supported */\n+#define ETHTOOL_GSET\t\t0x00000001 /* DEPRECATED, Get settings.\n+\t\t\t\t\t    * Please use ETHTOOL_GLINKSETTINGS\n+\t\t\t\t\t    */\n+#define ETHTOOL_SSET\t\t0x00000002 /* DEPRECATED, Set settings.\n+\t\t\t\t\t    * Please use ETHTOOL_SLINKSETTINGS\n+\t\t\t\t\t    */\n+#define ETHTOOL_GDRVINFO\t0x00000003 /* Get driver info. */\n+#define ETHTOOL_GREGS\t\t0x00000004 /* Get NIC registers. */\n+#define ETHTOOL_GWOL\t\t0x00000005 /* Get wake-on-lan options. */\n+#define ETHTOOL_SWOL\t\t0x00000006 /* Set wake-on-lan options. */\n+#define ETHTOOL_GMSGLVL\t\t0x00000007 /* Get driver message level */\n+#define ETHTOOL_SMSGLVL\t\t0x00000008 /* Set driver msg level. */\n+#define ETHTOOL_NWAY_RST\t0x00000009 /* Restart autonegotiation. */\n+/* Get link status for host, i.e. whether the interface *and* the\n+ * physical port (if there is one) are up (ethtool_value). */\n+#define ETHTOOL_GLINK\t\t0x0000000a\n+#define ETHTOOL_GEEPROM\t\t0x0000000b /* Get EEPROM data */\n+#define ETHTOOL_SEEPROM\t\t0x0000000c /* Set EEPROM data. */\n+#define ETHTOOL_GCOALESCE\t0x0000000e /* Get coalesce config */\n+#define ETHTOOL_SCOALESCE\t0x0000000f /* Set coalesce config. */\n+#define ETHTOOL_GRINGPARAM\t0x00000010 /* Get ring parameters */\n+#define ETHTOOL_SRINGPARAM\t0x00000011 /* Set ring parameters. */\n+#define ETHTOOL_GPAUSEPARAM\t0x00000012 /* Get pause parameters */\n+#define ETHTOOL_SPAUSEPARAM\t0x00000013 /* Set pause parameters. */\n+#define ETHTOOL_GRXCSUM\t\t0x00000014 /* Get RX hw csum enable (ethtool_value) */\n+#define ETHTOOL_SRXCSUM\t\t0x00000015 /* Set RX hw csum enable (ethtool_value) */\n+#define ETHTOOL_GTXCSUM\t\t0x00000016 /* Get TX hw csum enable (ethtool_value) */\n+#define ETHTOOL_STXCSUM\t\t0x00000017 /* Set TX hw csum enable (ethtool_value) */\n+#define ETHTOOL_GSG\t\t0x00000018 /* Get scatter-gather enable\n+\t\t\t\t\t    * (ethtool_value) */\n+#define ETHTOOL_SSG\t\t0x00000019 /* Set scatter-gather enable\n+\t\t\t\t\t    * (ethtool_value). */\n+#define ETHTOOL_TEST\t\t0x0000001a /* execute NIC self-test. */\n+#define ETHTOOL_GSTRINGS\t0x0000001b /* get specified string set */\n+#define ETHTOOL_PHYS_ID\t\t0x0000001c /* identify the NIC */\n+#define ETHTOOL_GSTATS\t\t0x0000001d /* get NIC-specific statistics */\n+#define ETHTOOL_GTSO\t\t0x0000001e /* Get TSO enable (ethtool_value) */\n+#define ETHTOOL_STSO\t\t0x0000001f /* Set TSO enable (ethtool_value) */\n+#define ETHTOOL_GPERMADDR\t0x00000020 /* Get permanent hardware address */\n+#define ETHTOOL_GUFO\t\t0x00000021 /* Get UFO enable (ethtool_value) */\n+#define ETHTOOL_SUFO\t\t0x00000022 /* Set UFO enable (ethtool_value) */\n+#define ETHTOOL_GGSO\t\t0x00000023 /* Get GSO enable (ethtool_value) */\n+#define ETHTOOL_SGSO\t\t0x00000024 /* Set GSO enable (ethtool_value) */\n+#define ETHTOOL_GFLAGS\t\t0x00000025 /* Get flags bitmap(ethtool_value) */\n+#define ETHTOOL_SFLAGS\t\t0x00000026 /* Set flags bitmap(ethtool_value) */\n+#define ETHTOOL_GPFLAGS\t\t0x00000027 /* Get driver-private flags bitmap */\n+#define ETHTOOL_SPFLAGS\t\t0x00000028 /* Set driver-private flags bitmap */\n+\n+#define ETHTOOL_GRXFH\t\t0x00000029 /* Get RX flow hash configuration */\n+#define ETHTOOL_SRXFH\t\t0x0000002a /* Set RX flow hash configuration */\n+#define ETHTOOL_GGRO\t\t0x0000002b /* Get GRO enable (ethtool_value) */\n+#define ETHTOOL_SGRO\t\t0x0000002c /* Set GRO enable (ethtool_value) */\n+#define ETHTOOL_GRXRINGS\t0x0000002d /* Get RX rings available for LB */\n+#define ETHTOOL_GRXCLSRLCNT\t0x0000002e /* Get RX class rule count */\n+#define ETHTOOL_GRXCLSRULE\t0x0000002f /* Get RX classification rule */\n+#define ETHTOOL_GRXCLSRLALL\t0x00000030 /* Get all RX classification rule */\n+#define ETHTOOL_SRXCLSRLDEL\t0x00000031 /* Delete RX classification rule */\n+#define ETHTOOL_SRXCLSRLINS\t0x00000032 /* Insert RX classification rule */\n+#define ETHTOOL_FLASHDEV\t0x00000033 /* Flash firmware to device */\n+#define ETHTOOL_RESET\t\t0x00000034 /* Reset hardware */\n+#define ETHTOOL_SRXNTUPLE\t0x00000035 /* Add an n-tuple filter to device */\n+#define ETHTOOL_GRXNTUPLE\t0x00000036 /* deprecated */\n+#define ETHTOOL_GSSET_INFO\t0x00000037 /* Get string set info */\n+#define ETHTOOL_GRXFHINDIR\t0x00000038 /* Get RX flow hash indir'n table */\n+#define ETHTOOL_SRXFHINDIR\t0x00000039 /* Set RX flow hash indir'n table */\n+\n+#define ETHTOOL_GFEATURES\t0x0000003a /* Get device offload settings */\n+#define ETHTOOL_SFEATURES\t0x0000003b /* Change device offload settings */\n+#define ETHTOOL_GCHANNELS\t0x0000003c /* Get no of channels */\n+#define ETHTOOL_SCHANNELS\t0x0000003d /* Set no of channels */\n+#define ETHTOOL_SET_DUMP\t0x0000003e /* Set dump settings */\n+#define ETHTOOL_GET_DUMP_FLAG\t0x0000003f /* Get dump settings */\n+#define ETHTOOL_GET_DUMP_DATA\t0x00000040 /* Get dump data */\n+#define ETHTOOL_GET_TS_INFO\t0x00000041 /* Get time stamping and PHC info */\n+#define ETHTOOL_GMODULEINFO\t0x00000042 /* Get plug-in module information */\n+#define ETHTOOL_GMODULEEEPROM\t0x00000043 /* Get plug-in module eeprom */\n+#define ETHTOOL_GEEE\t\t0x00000044 /* Get EEE settings */\n+#define ETHTOOL_SEEE\t\t0x00000045 /* Set EEE settings */\n+\n+#define ETHTOOL_GRSSH\t\t0x00000046 /* Get RX flow hash configuration */\n+#define ETHTOOL_SRSSH\t\t0x00000047 /* Set RX flow hash configuration */\n+#define ETHTOOL_GTUNABLE\t0x00000048 /* Get tunable configuration */\n+#define ETHTOOL_STUNABLE\t0x00000049 /* Set tunable configuration */\n+#define ETHTOOL_GPHYSTATS\t0x0000004a /* get PHY-specific statistics */\n+\n+#define ETHTOOL_PERQUEUE\t0x0000004b /* Set per queue options */\n+\n+#define ETHTOOL_GLINKSETTINGS\t0x0000004c /* Get ethtool_link_settings */\n+#define ETHTOOL_SLINKSETTINGS\t0x0000004d /* Set ethtool_link_settings */\n+#define ETHTOOL_PHY_GTUNABLE\t0x0000004e /* Get PHY tunable configuration */\n+#define ETHTOOL_PHY_STUNABLE\t0x0000004f /* Set PHY tunable configuration */\n+#define ETHTOOL_GFECPARAM\t0x00000050 /* Get FEC settings */\n+#define ETHTOOL_SFECPARAM\t0x00000051 /* Set FEC settings */\n+\n+/* compatibility with older code */\n+#define SPARC_ETH_GSET\t\tETHTOOL_GSET\n+#define SPARC_ETH_SSET\t\tETHTOOL_SSET\n+\n+/* Link mode bit indices */\n+enum ethtool_link_mode_bit_indices {\n+\tETHTOOL_LINK_MODE_10baseT_Half_BIT\t= 0,\n+\tETHTOOL_LINK_MODE_10baseT_Full_BIT\t= 1,\n+\tETHTOOL_LINK_MODE_100baseT_Half_BIT\t= 2,\n+\tETHTOOL_LINK_MODE_100baseT_Full_BIT\t= 3,\n+\tETHTOOL_LINK_MODE_1000baseT_Half_BIT\t= 4,\n+\tETHTOOL_LINK_MODE_1000baseT_Full_BIT\t= 5,\n+\tETHTOOL_LINK_MODE_Autoneg_BIT\t\t= 6,\n+\tETHTOOL_LINK_MODE_TP_BIT\t\t= 7,\n+\tETHTOOL_LINK_MODE_AUI_BIT\t\t= 8,\n+\tETHTOOL_LINK_MODE_MII_BIT\t\t= 9,\n+\tETHTOOL_LINK_MODE_FIBRE_BIT\t\t= 10,\n+\tETHTOOL_LINK_MODE_BNC_BIT\t\t= 11,\n+\tETHTOOL_LINK_MODE_10000baseT_Full_BIT\t= 12,\n+\tETHTOOL_LINK_MODE_Pause_BIT\t\t= 13,\n+\tETHTOOL_LINK_MODE_Asym_Pause_BIT\t= 14,\n+\tETHTOOL_LINK_MODE_2500baseX_Full_BIT\t= 15,\n+\tETHTOOL_LINK_MODE_Backplane_BIT\t\t= 16,\n+\tETHTOOL_LINK_MODE_1000baseKX_Full_BIT\t= 17,\n+\tETHTOOL_LINK_MODE_10000baseKX4_Full_BIT\t= 18,\n+\tETHTOOL_LINK_MODE_10000baseKR_Full_BIT\t= 19,\n+\tETHTOOL_LINK_MODE_10000baseR_FEC_BIT\t= 20,\n+\tETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT = 21,\n+\tETHTOOL_LINK_MODE_20000baseKR2_Full_BIT\t= 22,\n+\tETHTOOL_LINK_MODE_40000baseKR4_Full_BIT\t= 23,\n+\tETHTOOL_LINK_MODE_40000baseCR4_Full_BIT\t= 24,\n+\tETHTOOL_LINK_MODE_40000baseSR4_Full_BIT\t= 25,\n+\tETHTOOL_LINK_MODE_40000baseLR4_Full_BIT\t= 26,\n+\tETHTOOL_LINK_MODE_56000baseKR4_Full_BIT\t= 27,\n+\tETHTOOL_LINK_MODE_56000baseCR4_Full_BIT\t= 28,\n+\tETHTOOL_LINK_MODE_56000baseSR4_Full_BIT\t= 29,\n+\tETHTOOL_LINK_MODE_56000baseLR4_Full_BIT\t= 30,\n+\tETHTOOL_LINK_MODE_25000baseCR_Full_BIT\t= 31,\n+\tETHTOOL_LINK_MODE_25000baseKR_Full_BIT\t= 32,\n+\tETHTOOL_LINK_MODE_25000baseSR_Full_BIT\t= 33,\n+\tETHTOOL_LINK_MODE_50000baseCR2_Full_BIT\t= 34,\n+\tETHTOOL_LINK_MODE_50000baseKR2_Full_BIT\t= 35,\n+\tETHTOOL_LINK_MODE_100000baseKR4_Full_BIT\t= 36,\n+\tETHTOOL_LINK_MODE_100000baseSR4_Full_BIT\t= 37,\n+\tETHTOOL_LINK_MODE_100000baseCR4_Full_BIT\t= 38,\n+\tETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT\t= 39,\n+\tETHTOOL_LINK_MODE_50000baseSR2_Full_BIT\t\t= 40,\n+\tETHTOOL_LINK_MODE_1000baseX_Full_BIT\t= 41,\n+\tETHTOOL_LINK_MODE_10000baseCR_Full_BIT\t= 42,\n+\tETHTOOL_LINK_MODE_10000baseSR_Full_BIT\t= 43,\n+\tETHTOOL_LINK_MODE_10000baseLR_Full_BIT\t= 44,\n+\tETHTOOL_LINK_MODE_10000baseLRM_Full_BIT\t= 45,\n+\tETHTOOL_LINK_MODE_10000baseER_Full_BIT\t= 46,\n+\tETHTOOL_LINK_MODE_2500baseT_Full_BIT\t= 47,\n+\tETHTOOL_LINK_MODE_5000baseT_Full_BIT\t= 48,\n+\n+\tETHTOOL_LINK_MODE_FEC_NONE_BIT\t= 49,\n+\tETHTOOL_LINK_MODE_FEC_RS_BIT\t= 50,\n+\tETHTOOL_LINK_MODE_FEC_BASER_BIT\t= 51,\n+\n+\t/* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit\n+\t * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_*\n+\t * macro for bits > 31. The only way to use indices > 31 is to\n+\t * use the new ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API.\n+\t */\n+\n+\t__ETHTOOL_LINK_MODE_LAST\n+\t  = ETHTOOL_LINK_MODE_FEC_BASER_BIT,\n+};\n+\n+#define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name)\t\\\n+\t(1UL << (ETHTOOL_LINK_MODE_ ## base_name ## _BIT))\n+\n+/* DEPRECATED macros. Please migrate to\n+ * ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API. Please do NOT\n+ * define any new SUPPORTED_* macro for bits > 31.\n+ */\n+#define SUPPORTED_10baseT_Half\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half)\n+#define SUPPORTED_10baseT_Full\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full)\n+#define SUPPORTED_100baseT_Half\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half)\n+#define SUPPORTED_100baseT_Full\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full)\n+#define SUPPORTED_1000baseT_Half\t__ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half)\n+#define SUPPORTED_1000baseT_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full)\n+#define SUPPORTED_Autoneg\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg)\n+#define SUPPORTED_TP\t\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(TP)\n+#define SUPPORTED_AUI\t\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(AUI)\n+#define SUPPORTED_MII\t\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(MII)\n+#define SUPPORTED_FIBRE\t\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE)\n+#define SUPPORTED_BNC\t\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(BNC)\n+#define SUPPORTED_10000baseT_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full)\n+#define SUPPORTED_Pause\t\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(Pause)\n+#define SUPPORTED_Asym_Pause\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause)\n+#define SUPPORTED_2500baseX_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full)\n+#define SUPPORTED_Backplane\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane)\n+#define SUPPORTED_1000baseKX_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full)\n+#define SUPPORTED_10000baseKX4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full)\n+#define SUPPORTED_10000baseKR_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full)\n+#define SUPPORTED_10000baseR_FEC\t__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC)\n+#define SUPPORTED_20000baseMLD2_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full)\n+#define SUPPORTED_20000baseKR2_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full)\n+#define SUPPORTED_40000baseKR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full)\n+#define SUPPORTED_40000baseCR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full)\n+#define SUPPORTED_40000baseSR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full)\n+#define SUPPORTED_40000baseLR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full)\n+#define SUPPORTED_56000baseKR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full)\n+#define SUPPORTED_56000baseCR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full)\n+#define SUPPORTED_56000baseSR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full)\n+#define SUPPORTED_56000baseLR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full)\n+/* Please do not define any new SUPPORTED_* macro for bits > 31, see\n+ * notice above.\n+ */\n+\n+/*\n+ * DEPRECATED macros. Please migrate to\n+ * ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API. Please do NOT\n+ * define any new ADERTISE_* macro for bits > 31.\n+ */\n+#define ADVERTISED_10baseT_Half\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half)\n+#define ADVERTISED_10baseT_Full\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full)\n+#define ADVERTISED_100baseT_Half\t__ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half)\n+#define ADVERTISED_100baseT_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full)\n+#define ADVERTISED_1000baseT_Half\t__ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half)\n+#define ADVERTISED_1000baseT_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full)\n+#define ADVERTISED_Autoneg\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg)\n+#define ADVERTISED_TP\t\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(TP)\n+#define ADVERTISED_AUI\t\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(AUI)\n+#define ADVERTISED_MII\t\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(MII)\n+#define ADVERTISED_FIBRE\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE)\n+#define ADVERTISED_BNC\t\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(BNC)\n+#define ADVERTISED_10000baseT_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full)\n+#define ADVERTISED_Pause\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(Pause)\n+#define ADVERTISED_Asym_Pause\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause)\n+#define ADVERTISED_2500baseX_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full)\n+#define ADVERTISED_Backplane\t\t__ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane)\n+#define ADVERTISED_1000baseKX_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full)\n+#define ADVERTISED_10000baseKX4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full)\n+#define ADVERTISED_10000baseKR_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full)\n+#define ADVERTISED_10000baseR_FEC\t__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC)\n+#define ADVERTISED_20000baseMLD2_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full)\n+#define ADVERTISED_20000baseKR2_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full)\n+#define ADVERTISED_40000baseKR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full)\n+#define ADVERTISED_40000baseCR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full)\n+#define ADVERTISED_40000baseSR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full)\n+#define ADVERTISED_40000baseLR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full)\n+#define ADVERTISED_56000baseKR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full)\n+#define ADVERTISED_56000baseCR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full)\n+#define ADVERTISED_56000baseSR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full)\n+#define ADVERTISED_56000baseLR4_Full\t__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full)\n+/* Please do not define any new ADVERTISED_* macro for bits > 31, see\n+ * notice above.\n+ */\n+\n+/* The following are all involved in forcing a particular link\n+ * mode for the device for setting things.  When getting the\n+ * devices settings, these indicate the current mode and whether\n+ * it was forced up into this mode or autonegotiated.\n+ */\n+\n+/* The forced speed, in units of 1Mb. All values 0 to INT_MAX are legal.\n+ * Update drivers/net/phy/phy.c:phy_speed_to_str() and\n+ * drivers/net/bonding/bond_3ad.c:__get_link_speed() when adding new values.\n+ */\n+#define SPEED_10\t\t10\n+#define SPEED_100\t\t100\n+#define SPEED_1000\t\t1000\n+#define SPEED_2500\t\t2500\n+#define SPEED_5000\t\t5000\n+#define SPEED_10000\t\t10000\n+#define SPEED_14000\t\t14000\n+#define SPEED_20000\t\t20000\n+#define SPEED_25000\t\t25000\n+#define SPEED_40000\t\t40000\n+#define SPEED_50000\t\t50000\n+#define SPEED_56000\t\t56000\n+#define SPEED_100000\t\t100000\n+\n+#define SPEED_UNKNOWN\t\t((__u32) -1)\n+\n+static inline int ethtool_validate_speed(__u32 speed)\n+{\n+\treturn speed <= INT_MAX || speed == SPEED_UNKNOWN;\n+}\n+\n+/* Duplex, half or full. */\n+#define DUPLEX_HALF\t\t0x00\n+#define DUPLEX_FULL\t\t0x01\n+#define DUPLEX_UNKNOWN\t\t0xff\n+\n+static inline int ethtool_validate_duplex(__u8 duplex)\n+{\n+\tswitch (duplex) {\n+\tcase DUPLEX_HALF:\n+\tcase DUPLEX_FULL:\n+\tcase DUPLEX_UNKNOWN:\n+\t\treturn 1;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+/* Which connector port. */\n+#define PORT_TP\t\t\t0x00\n+#define PORT_AUI\t\t0x01\n+#define PORT_MII\t\t0x02\n+#define PORT_FIBRE\t\t0x03\n+#define PORT_BNC\t\t0x04\n+#define PORT_DA\t\t\t0x05\n+#define PORT_NONE\t\t0xef\n+#define PORT_OTHER\t\t0xff\n+\n+/* Which transceiver to use. */\n+#define XCVR_INTERNAL\t\t0x00 /* PHY and MAC are in the same package */\n+#define XCVR_EXTERNAL\t\t0x01 /* PHY and MAC are in different packages */\n+#define XCVR_DUMMY1\t\t0x02\n+#define XCVR_DUMMY2\t\t0x03\n+#define XCVR_DUMMY3\t\t0x04\n+\n+/* Enable or disable autonegotiation. */\n+#define AUTONEG_DISABLE\t\t0x00\n+#define AUTONEG_ENABLE\t\t0x01\n+\n+/* MDI or MDI-X status/control - if MDI/MDI_X/AUTO is set then\n+ * the driver is required to renegotiate link\n+ */\n+#define ETH_TP_MDI_INVALID\t0x00 /* status: unknown; control: unsupported */\n+#define ETH_TP_MDI\t\t0x01 /* status: MDI;     control: force MDI */\n+#define ETH_TP_MDI_X\t\t0x02 /* status: MDI-X;   control: force MDI-X */\n+#define ETH_TP_MDI_AUTO\t\t0x03 /*                  control: auto-select */\n+\n+/* Wake-On-Lan options. */\n+#define WAKE_PHY\t\t(1 << 0)\n+#define WAKE_UCAST\t\t(1 << 1)\n+#define WAKE_MCAST\t\t(1 << 2)\n+#define WAKE_BCAST\t\t(1 << 3)\n+#define WAKE_ARP\t\t(1 << 4)\n+#define WAKE_MAGIC\t\t(1 << 5)\n+#define WAKE_MAGICSECURE\t(1 << 6) /* only meaningful if WAKE_MAGIC */\n+#define WAKE_FILTER\t\t(1 << 7)\n+\n+/* L2-L4 network traffic flow types */\n+#define\tTCP_V4_FLOW\t0x01\t/* hash or spec (tcp_ip4_spec) */\n+#define\tUDP_V4_FLOW\t0x02\t/* hash or spec (udp_ip4_spec) */\n+#define\tSCTP_V4_FLOW\t0x03\t/* hash or spec (sctp_ip4_spec) */\n+#define\tAH_ESP_V4_FLOW\t0x04\t/* hash only */\n+#define\tTCP_V6_FLOW\t0x05\t/* hash or spec (tcp_ip6_spec; nfc only) */\n+#define\tUDP_V6_FLOW\t0x06\t/* hash or spec (udp_ip6_spec; nfc only) */\n+#define\tSCTP_V6_FLOW\t0x07\t/* hash or spec (sctp_ip6_spec; nfc only) */\n+#define\tAH_ESP_V6_FLOW\t0x08\t/* hash only */\n+#define\tAH_V4_FLOW\t0x09\t/* hash or spec (ah_ip4_spec) */\n+#define\tESP_V4_FLOW\t0x0a\t/* hash or spec (esp_ip4_spec) */\n+#define\tAH_V6_FLOW\t0x0b\t/* hash or spec (ah_ip6_spec; nfc only) */\n+#define\tESP_V6_FLOW\t0x0c\t/* hash or spec (esp_ip6_spec; nfc only) */\n+#define\tIPV4_USER_FLOW\t0x0d\t/* spec only (usr_ip4_spec) */\n+#define\tIP_USER_FLOW\tIPV4_USER_FLOW\n+#define\tIPV6_USER_FLOW\t0x0e\t/* spec only (usr_ip6_spec; nfc only) */\n+#define\tIPV4_FLOW\t0x10\t/* hash only */\n+#define\tIPV6_FLOW\t0x11\t/* hash only */\n+#define\tETHER_FLOW\t0x12\t/* spec only (ether_spec) */\n+/* Flag to enable additional fields in struct ethtool_rx_flow_spec */\n+#define\tFLOW_EXT\t0x80000000\n+#define\tFLOW_MAC_EXT\t0x40000000\n+/* Flag to enable RSS spreading of traffic matching rule (nfc only) */\n+#define\tFLOW_RSS\t0x20000000\n+\n+/* L3-L4 network traffic flow hash options */\n+#define\tRXH_L2DA\t(1 << 1)\n+#define\tRXH_VLAN\t(1 << 2)\n+#define\tRXH_L3_PROTO\t(1 << 3)\n+#define\tRXH_IP_SRC\t(1 << 4)\n+#define\tRXH_IP_DST\t(1 << 5)\n+#define\tRXH_L4_B_0_1\t(1 << 6) /* src port in case of TCP/UDP/SCTP */\n+#define\tRXH_L4_B_2_3\t(1 << 7) /* dst port in case of TCP/UDP/SCTP */\n+#define\tRXH_DISCARD\t(1 << 31)\n+\n+#define\tRX_CLS_FLOW_DISC\t0xffffffffffffffffULL\n+#define RX_CLS_FLOW_WAKE\t0xfffffffffffffffeULL\n+\n+/* Special RX classification rule insert location values */\n+#define RX_CLS_LOC_SPECIAL\t0x80000000\t/* flag */\n+#define RX_CLS_LOC_ANY\t\t0xffffffff\n+#define RX_CLS_LOC_FIRST\t0xfffffffe\n+#define RX_CLS_LOC_LAST\t\t0xfffffffd\n+\n+/* EEPROM Standards for plug in modules */\n+#define ETH_MODULE_SFF_8079\t\t0x1\n+#define ETH_MODULE_SFF_8079_LEN\t\t256\n+#define ETH_MODULE_SFF_8472\t\t0x2\n+#define ETH_MODULE_SFF_8472_LEN\t\t512\n+#define ETH_MODULE_SFF_8636\t\t0x3\n+#define ETH_MODULE_SFF_8636_LEN\t\t256\n+#define ETH_MODULE_SFF_8436\t\t0x4\n+#define ETH_MODULE_SFF_8436_LEN\t\t256\n+\n+/* Reset flags */\n+/* The reset() operation must clear the flags for the components which\n+ * were actually reset.  On successful return, the flags indicate the\n+ * components which were not reset, either because they do not exist\n+ * in the hardware or because they cannot be reset independently.  The\n+ * driver must never reset any components that were not requested.\n+ */\n+enum ethtool_reset_flags {\n+\t/* These flags represent components dedicated to the interface\n+\t * the command is addressed to.  Shift any flag left by\n+\t * ETH_RESET_SHARED_SHIFT to reset a shared component of the\n+\t * same type.\n+\t */\n+\tETH_RESET_MGMT\t\t= 1 << 0,\t/* Management processor */\n+\tETH_RESET_IRQ\t\t= 1 << 1,\t/* Interrupt requester */\n+\tETH_RESET_DMA\t\t= 1 << 2,\t/* DMA engine */\n+\tETH_RESET_FILTER\t= 1 << 3,\t/* Filtering/flow direction */\n+\tETH_RESET_OFFLOAD\t= 1 << 4,\t/* Protocol offload */\n+\tETH_RESET_MAC\t\t= 1 << 5,\t/* Media access controller */\n+\tETH_RESET_PHY\t\t= 1 << 6,\t/* Transceiver/PHY */\n+\tETH_RESET_RAM\t\t= 1 << 7,\t/* RAM shared between\n+\t\t\t\t\t\t * multiple components */\n+\tETH_RESET_AP\t\t= 1 << 8,\t/* Application processor */\n+\n+\tETH_RESET_DEDICATED\t= 0x0000ffff,\t/* All components dedicated to\n+\t\t\t\t\t\t * this interface */\n+\tETH_RESET_ALL\t\t= 0xffffffff,\t/* All components used by this\n+\t\t\t\t\t\t * interface, even if shared */\n+};\n+#define ETH_RESET_SHARED_SHIFT\t16\n+\n+\n+/**\n+ * struct ethtool_link_settings - link control and status\n+ *\n+ * IMPORTANT, Backward compatibility notice: When implementing new\n+ *\tuser-space tools, please first try %ETHTOOL_GLINKSETTINGS, and\n+ *\tif it succeeds use %ETHTOOL_SLINKSETTINGS to change link\n+ *\tsettings; do not use %ETHTOOL_SSET if %ETHTOOL_GLINKSETTINGS\n+ *\tsucceeded: stick to %ETHTOOL_GLINKSETTINGS/%SLINKSETTINGS in\n+ *\tthat case.  Conversely, if %ETHTOOL_GLINKSETTINGS fails, use\n+ *\t%ETHTOOL_GSET to query and %ETHTOOL_SSET to change link\n+ *\tsettings; do not use %ETHTOOL_SLINKSETTINGS if\n+ *\t%ETHTOOL_GLINKSETTINGS failed: stick to\n+ *\t%ETHTOOL_GSET/%ETHTOOL_SSET in that case.\n+ *\n+ * @cmd: Command number = %ETHTOOL_GLINKSETTINGS or %ETHTOOL_SLINKSETTINGS\n+ * @speed: Link speed (Mbps)\n+ * @duplex: Duplex mode; one of %DUPLEX_*\n+ * @port: Physical connector type; one of %PORT_*\n+ * @phy_address: MDIO address of PHY (transceiver); 0 or 255 if not\n+ *\tapplicable.  For clause 45 PHYs this is the PRTAD.\n+ * @autoneg: Enable/disable autonegotiation and auto-detection;\n+ *\teither %AUTONEG_DISABLE or %AUTONEG_ENABLE\n+ * @mdio_support: Bitmask of %ETH_MDIO_SUPPORTS_* flags for the MDIO\n+ *\tprotocols supported by the interface; 0 if unknown.\n+ *\tRead-only.\n+ * @eth_tp_mdix: Ethernet twisted-pair MDI(-X) status; one of\n+ *\t%ETH_TP_MDI_*.  If the status is unknown or not applicable, the\n+ *\tvalue will be %ETH_TP_MDI_INVALID.  Read-only.\n+ * @eth_tp_mdix_ctrl: Ethernet twisted pair MDI(-X) control; one of\n+ *\t%ETH_TP_MDI_*.  If MDI(-X) control is not implemented, reads\n+ *\tyield %ETH_TP_MDI_INVALID and writes may be ignored or rejected.\n+ *\tWhen written successfully, the link should be renegotiated if\n+ *\tnecessary.\n+ * @link_mode_masks_nwords: Number of 32-bit words for each of the\n+ *\tsupported, advertising, lp_advertising link mode bitmaps. For\n+ *\t%ETHTOOL_GLINKSETTINGS: on entry, number of words passed by user\n+ *\t(>= 0); on return, if handshake in progress, negative if\n+ *\trequest size unsupported by kernel: absolute value indicates\n+ *\tkernel expected size and all the other fields but cmd\n+ *\tare 0; otherwise (handshake completed), strictly positive\n+ *\tto indicate size used by kernel and cmd field stays\n+ *\t%ETHTOOL_GLINKSETTINGS, all other fields populated by driver. For\n+ *\t%ETHTOOL_SLINKSETTINGS: must be valid on entry, ie. a positive\n+ *\tvalue returned previously by %ETHTOOL_GLINKSETTINGS, otherwise\n+ *\trefused. For drivers: ignore this field (use kernel's\n+ *\t__ETHTOOL_LINK_MODE_MASK_NBITS instead), any change to it will\n+ *\tbe overwritten by kernel.\n+ * @supported: Bitmap with each bit meaning given by\n+ *\t%ethtool_link_mode_bit_indices for the link modes, physical\n+ *\tconnectors and other link features for which the interface\n+ *\tsupports autonegotiation or auto-detection.  Read-only.\n+ * @advertising: Bitmap with each bit meaning given by\n+ *\t%ethtool_link_mode_bit_indices for the link modes, physical\n+ *\tconnectors and other link features that are advertised through\n+ *\tautonegotiation or enabled for auto-detection.\n+ * @lp_advertising: Bitmap with each bit meaning given by\n+ *\t%ethtool_link_mode_bit_indices for the link modes, and other\n+ *\tlink features that the link partner advertised through\n+ *\tautonegotiation; 0 if unknown or not applicable.  Read-only.\n+ * @transceiver: Used to distinguish different possible PHY types,\n+ *\treported consistently by PHYLIB.  Read-only.\n+ *\n+ * If autonegotiation is disabled, the speed and @duplex represent the\n+ * fixed link mode and are writable if the driver supports multiple\n+ * link modes.  If it is enabled then they are read-only; if the link\n+ * is up they represent the negotiated link mode; if the link is down,\n+ * the speed is 0, %SPEED_UNKNOWN or the highest enabled speed and\n+ * @duplex is %DUPLEX_UNKNOWN or the best enabled duplex mode.\n+ *\n+ * Some hardware interfaces may have multiple PHYs and/or physical\n+ * connectors fitted or do not allow the driver to detect which are\n+ * fitted.  For these interfaces @port and/or @phy_address may be\n+ * writable, possibly dependent on @autoneg being %AUTONEG_DISABLE.\n+ * Otherwise, attempts to write different values may be ignored or\n+ * rejected.\n+ *\n+ * Deprecated %ethtool_cmd fields transceiver, maxtxpkt and maxrxpkt\n+ * are not available in %ethtool_link_settings. These fields will be\n+ * always set to zero in %ETHTOOL_GSET reply and %ETHTOOL_SSET will\n+ * fail if any of them is set to non-zero value.\n+ *\n+ * Users should assume that all fields not marked read-only are\n+ * writable and subject to validation by the driver.  They should use\n+ * %ETHTOOL_GLINKSETTINGS to get the current values before making specific\n+ * changes and then applying them with %ETHTOOL_SLINKSETTINGS.\n+ *\n+ * Drivers that implement %get_link_ksettings and/or\n+ * %set_link_ksettings should ignore the @cmd\n+ * and @link_mode_masks_nwords fields (any change to them overwritten\n+ * by kernel), and rely only on kernel's internal\n+ * %__ETHTOOL_LINK_MODE_MASK_NBITS and\n+ * %ethtool_link_mode_mask_t. Drivers that implement\n+ * %set_link_ksettings() should validate all fields other than @cmd\n+ * and @link_mode_masks_nwords that are not described as read-only or\n+ * deprecated, and must ignore all fields described as read-only.\n+ */\n+struct ethtool_link_settings {\n+\t__u32\tcmd;\n+\t__u32\tspeed;\n+\t__u8\tduplex;\n+\t__u8\tport;\n+\t__u8\tphy_address;\n+\t__u8\tautoneg;\n+\t__u8\tmdio_support;\n+\t__u8\teth_tp_mdix;\n+\t__u8\teth_tp_mdix_ctrl;\n+\t__s8\tlink_mode_masks_nwords;\n+\t__u8\ttransceiver;\n+\t__u8\treserved1[3];\n+\t__u32\treserved[7];\n+\t__u32\tlink_mode_masks[0];\n+\t/* layout of link_mode_masks fields:\n+\t * __u32 map_supported[link_mode_masks_nwords];\n+\t * __u32 map_advertising[link_mode_masks_nwords];\n+\t * __u32 map_lp_advertising[link_mode_masks_nwords];\n+\t */\n+};\n+#endif /* _UAPI_LINUX_ETHTOOL_H */\ndiff --git a/src/shared/linux/libbpf.h b/src/shared/linux/libbpf.h\ndeleted file mode 100644\nindex 391eee5a4e3..00000000000\n--- a/src/shared/linux/libbpf.h\n+++ /dev/null\n@@ -1,207 +0,0 @@\n-/* eBPF mini library */\n-#ifndef __LIBBPF_H\n-#define __LIBBPF_H\n-\n-#include <linux/bpf.h>\n-\n-struct bpf_insn;\n-\n-/* ALU ops on registers, bpf_add|sub|...: dst_reg += src_reg */\n-\n-#define BPF_ALU64_REG(OP, DST, SRC)\t\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_ALU64 | BPF_OP(OP) | BPF_X,\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = SRC,\t\t\t\t\t\\\n-                .off   = 0,\t\t\t\t\t\\\n-                .imm   = 0 })\n-\n-#define BPF_ALU32_REG(OP, DST, SRC)\t\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_ALU | BPF_OP(OP) | BPF_X,\t\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = SRC,\t\t\t\t\t\\\n-                .off   = 0,\t\t\t\t\t\\\n-                .imm   = 0 })\n-\n-/* ALU ops on immediates, bpf_add|sub|...: dst_reg += imm32 */\n-\n-#define BPF_ALU64_IMM(OP, DST, IMM)\t\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_ALU64 | BPF_OP(OP) | BPF_K,\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = 0,\t\t\t\t\t\\\n-                .off   = 0,\t\t\t\t\t\\\n-                .imm   = IMM })\n-\n-#define BPF_ALU32_IMM(OP, DST, IMM)\t\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_ALU | BPF_OP(OP) | BPF_K,\t\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = 0,\t\t\t\t\t\\\n-                .off   = 0,\t\t\t\t\t\\\n-                .imm   = IMM })\n-\n-/* Short form of mov, dst_reg = src_reg */\n-\n-#define BPF_MOV64_REG(DST, SRC)\t\t\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_ALU64 | BPF_MOV | BPF_X,\t\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = SRC,\t\t\t\t\t\\\n-                .off   = 0,\t\t\t\t\t\\\n-                .imm   = 0 })\n-\n-#define BPF_MOV32_REG(DST, SRC)\t\t\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_ALU | BPF_MOV | BPF_X,\t\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = SRC,\t\t\t\t\t\\\n-                .off   = 0,\t\t\t\t\t\\\n-                .imm   = 0 })\n-\n-/* Short form of mov, dst_reg = imm32 */\n-\n-#define BPF_MOV64_IMM(DST, IMM)\t\t\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_ALU64 | BPF_MOV | BPF_K,\t\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = 0,\t\t\t\t\t\\\n-                .off   = 0,\t\t\t\t\t\\\n-                .imm   = IMM })\n-\n-#define BPF_MOV32_IMM(DST, IMM)\t\t\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_ALU | BPF_MOV | BPF_K,\t\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = 0,\t\t\t\t\t\\\n-                .off   = 0,\t\t\t\t\t\\\n-                .imm   = IMM })\n-\n-/* BPF_LD_IMM64 macro encodes single 'load 64-bit immediate' insn */\n-#define BPF_LD_IMM64(DST, IMM)\t\t\t\t\t\\\n-        BPF_LD_IMM64_RAW(DST, 0, IMM)\n-\n-#define BPF_LD_IMM64_RAW(DST, SRC, IMM)\t\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_LD | BPF_DW | BPF_IMM,\t\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = SRC,\t\t\t\t\t\\\n-                .off   = 0,\t\t\t\t\t\\\n-                .imm   = (__u32) (IMM) }),\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = 0, /* zero is reserved opcode */\t\\\n-                .dst_reg = 0,\t\t\t\t\t\\\n-                .src_reg = 0,\t\t\t\t\t\\\n-                .off   = 0,\t\t\t\t\t\\\n-                .imm   = ((__u64) (IMM)) >> 32 })\n-\n-#ifndef BPF_PSEUDO_MAP_FD\n-# define BPF_PSEUDO_MAP_FD\t1\n-#endif\n-\n-/* pseudo BPF_LD_IMM64 insn used to refer to process-local map_fd */\n-#define BPF_LD_MAP_FD(DST, MAP_FD)\t\t\t\t\\\n-        BPF_LD_IMM64_RAW(DST, BPF_PSEUDO_MAP_FD, MAP_FD)\n-\n-/* Direct packet access, R0 = *(uint *) (skb->data + imm32) */\n-\n-#define BPF_LD_ABS(SIZE, IMM)\t\t\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_LD | BPF_SIZE(SIZE) | BPF_ABS,\t\\\n-                .dst_reg = 0,\t\t\t\t\t\\\n-                .src_reg = 0,\t\t\t\t\t\\\n-                .off   = 0,\t\t\t\t\t\\\n-                .imm   = IMM })\n-\n-/* Memory load, dst_reg = *(uint *) (src_reg + off16) */\n-\n-#define BPF_LDX_MEM(SIZE, DST, SRC, OFF)\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_LDX | BPF_SIZE(SIZE) | BPF_MEM,\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = SRC,\t\t\t\t\t\\\n-                .off   = OFF,\t\t\t\t\t\\\n-                .imm   = 0 })\n-\n-/* Memory store, *(uint *) (dst_reg + off16) = src_reg */\n-\n-#define BPF_STX_MEM(SIZE, DST, SRC, OFF)\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_STX | BPF_SIZE(SIZE) | BPF_MEM,\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = SRC,\t\t\t\t\t\\\n-                .off   = OFF,\t\t\t\t\t\\\n-                .imm   = 0 })\n-\n-/* Atomic memory add, *(uint *)(dst_reg + off16) += src_reg */\n-\n-#define BPF_STX_XADD(SIZE, DST, SRC, OFF)\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_STX | BPF_SIZE(SIZE) | BPF_XADD,\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = SRC,\t\t\t\t\t\\\n-                .off   = OFF,\t\t\t\t\t\\\n-                .imm   = 0 })\n-\n-/* Memory store, *(uint *) (dst_reg + off16) = imm32 */\n-\n-#define BPF_ST_MEM(SIZE, DST, OFF, IMM)\t\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_ST | BPF_SIZE(SIZE) | BPF_MEM,\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = 0,\t\t\t\t\t\\\n-                .off   = OFF,\t\t\t\t\t\\\n-                .imm   = IMM })\n-\n-/* Conditional jumps against registers, if (dst_reg 'op' src_reg) goto pc + off16 */\n-\n-#define BPF_JMP_REG(OP, DST, SRC, OFF)\t\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_JMP | BPF_OP(OP) | BPF_X,\t\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = SRC,\t\t\t\t\t\\\n-                .off   = OFF,\t\t\t\t\t\\\n-                .imm   = 0 })\n-\n-/* Conditional jumps against immediates, if (dst_reg 'op' imm32) goto pc + off16 */\n-\n-#define BPF_JMP_IMM(OP, DST, IMM, OFF)\t\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_JMP | BPF_OP(OP) | BPF_K,\t\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = 0,\t\t\t\t\t\\\n-                .off   = OFF,\t\t\t\t\t\\\n-                .imm   = IMM })\n-\n-/* Unconditional jumps */\n-\n-#define BPF_JMP_A(OFF)\t\t\t\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_JMP | BPF_JA,\t\t\t\\\n-                .dst_reg = 0,\t\t\t\t\t\\\n-                .src_reg = 0,\t\t\t\t\t\\\n-                .off   = OFF,\t\t\t\t\t\\\n-                .imm   = 0 })\n-\n-/* Raw code statement block */\n-\n-#define BPF_RAW_INSN(CODE, DST, SRC, OFF, IMM)\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = CODE,\t\t\t\t\t\\\n-                .dst_reg = DST,\t\t\t\t\t\\\n-                .src_reg = SRC,\t\t\t\t\t\\\n-                .off   = OFF,\t\t\t\t\t\\\n-                .imm   = IMM })\n-\n-/* Program exit */\n-\n-#define BPF_EXIT_INSN()\t\t\t\t\t\t\\\n-        ((struct bpf_insn) {\t\t\t\t\t\\\n-                .code  = BPF_JMP | BPF_EXIT,\t\t\t\\\n-                .dst_reg = 0,\t\t\t\t\t\\\n-                .src_reg = 0,\t\t\t\t\t\\\n-                .off   = 0,\t\t\t\t\t\\\n-                .imm   = 0 })\n-\n-#endif\ndiff --git a/src/shared/linux/netdevice.h b/src/shared/linux/netdevice.h\nnew file mode 100644\nindex 00000000000..f3770c5b0fa\n--- /dev/null\n+++ b/src/shared/linux/netdevice.h\n@@ -0,0 +1,66 @@\n+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */\n+/*\n+ * INET\t\tAn implementation of the TCP/IP protocol suite for the LINUX\n+ *\t\toperating system.  INET is implemented using the  BSD Socket\n+ *\t\tinterface as the means of communication with the user level.\n+ *\n+ *\t\tDefinitions for the Interfaces handler.\n+ *\n+ * Version:\t@(#)dev.h\t1.0.10\t08/12/93\n+ *\n+ * Authors:\tRoss Biro\n+ *\t\tFred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>\n+ *\t\tCorey Minyard <wf-rch!minyard@relay.EU.net>\n+ *\t\tDonald J. Becker, <becker@cesdis.gsfc.nasa.gov>\n+ *\t\tAlan Cox, <alan@lxorguk.ukuu.org.uk>\n+ *\t\tBjorn Ekwall. <bj0rn@blox.se>\n+ *              Pekka Riikonen <priikone@poseidon.pspt.fi>\n+ *\n+ *\t\tThis program is free software; you can redistribute it and/or\n+ *\t\tmodify it under the terms of the GNU General Public License\n+ *\t\tas published by the Free Software Foundation; either version\n+ *\t\t2 of the License, or (at your option) any later version.\n+ *\n+ *\t\tMoved to /usr/include/linux for NET3\n+ */\n+#ifndef _UAPI_LINUX_NETDEVICE_H\n+#define _UAPI_LINUX_NETDEVICE_H\n+\n+#include <linux/if.h>\n+#include <linux/if_ether.h>\n+#include <linux/if_packet.h>\n+#include <linux/if_link.h>\n+\n+\n+#define MAX_ADDR_LEN\t32\t\t/* Largest hardware address length */\n+\n+/* Initial net device group. All devices belong to group 0 by default. */\n+#define INIT_NETDEV_GROUP\t0\n+\n+\n+/* interface name assignment types (sysfs name_assign_type attribute) */\n+#define NET_NAME_UNKNOWN\t0\t/* unknown origin (not exposed to userspace) */\n+#define NET_NAME_ENUM\t\t1\t/* enumerated by kernel */\n+#define NET_NAME_PREDICTABLE\t2\t/* predictably named by the kernel */\n+#define NET_NAME_USER\t\t3\t/* provided by user-space */\n+#define NET_NAME_RENAMED\t4\t/* renamed by user-space */\n+\n+/* Media selection options. */\n+enum {\n+        IF_PORT_UNKNOWN = 0,\n+        IF_PORT_10BASE2,\n+        IF_PORT_10BASET,\n+        IF_PORT_AUI,\n+        IF_PORT_100BASET,\n+        IF_PORT_100BASETX,\n+        IF_PORT_100BASEFX\n+};\n+\n+/* hardware address assignment types */\n+#define NET_ADDR_PERM\t\t0\t/* address is permanent (default) */\n+#define NET_ADDR_RANDOM\t\t1\t/* address is generated randomly */\n+#define NET_ADDR_STOLEN\t\t2\t/* address is stolen from other device */\n+#define NET_ADDR_SET\t\t3\t/* address is set using\n+\t\t\t\t\t * dev_set_mac_address() */\n+\n+#endif /* _UAPI_LINUX_NETDEVICE_H */\ndiff --git a/src/shared/meson.build b/src/shared/meson.build\nindex e05fbce30f3..15466bcaf1f 100644\n--- a/src/shared/meson.build\n+++ b/src/shared/meson.build\n@@ -96,6 +96,13 @@ shared_sources = files('''\n         json.c\n         json.h\n         libmount-util.h\n+        linux/auto_dev-ioctl.h\n+        linux/bpf.h\n+        linux/bpf_common.h\n+        linux/bpf_insn.h\n+        linux/dm-ioctl.h\n+        linux/ethtool.h\n+        linux/netdevice.h\n         lockfile-util.c\n         lockfile-util.h\n         log-link.h\n@@ -168,7 +175,6 @@ shared_sources = files('''\n         watchdog.h\n         web-util.c\n         web-util.h\n-        wireguard-netlink.h\n         xml.c\n         xml.h\n '''.split())\ndiff --git a/src/shared/wireguard-netlink.h b/src/shared/wireguard-netlink.h\ndeleted file mode 100644\nindex eb170915a6a..00000000000\n--- a/src/shared/wireguard-netlink.h\n+++ /dev/null\n@@ -1,179 +0,0 @@\n-#pragma once\n-\n-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR MIT)\n- *\n- * Copyright (C) 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.\n- *\n- * Documentation\n- * =============\n- *\n- * The below enums and macros are for interfacing with WireGuard, using generic\n- * netlink, with family WG_GENL_NAME and version WG_GENL_VERSION. It defines two\n- * methods: get and set. Note that while they share many common attributes, these\n- * two functions actually accept a slightly different set of inputs and outputs.\n- *\n- * WG_CMD_GET_DEVICE\n- * -----------------\n- *\n- * May only be called via NLM_F_REQUEST | NLM_F_DUMP. The command should contain\n- * one but not both of:\n- *\n- *\tWGDEVICE_A_IFINDEX: NLA_U32\n- *\tWGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMESIZ - 1\n- *\n- * The kernel will then return several messages (NLM_F_MULTI) containing the following\n- * tree of nested items:\n- *\n- *\tWGDEVICE_A_IFINDEX: NLA_U32\n- *\tWGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMESIZ - 1\n- *\tWGDEVICE_A_PRIVATE_KEY: len WG_KEY_LEN\n- *\tWGDEVICE_A_PUBLIC_KEY: len WG_KEY_LEN\n- *\tWGDEVICE_A_LISTEN_PORT: NLA_U16\n- *\tWGDEVICE_A_FWMARK: NLA_U32\n- *\tWGDEVICE_A_PEERS: NLA_NESTED\n- *\t\t0: NLA_NESTED\n- *\t\t\tWGPEER_A_PUBLIC_KEY: len WG_KEY_LEN\n- *\t\t\tWGPEER_A_PRESHARED_KEY: len WG_KEY_LEN\n- *\t\t\tWGPEER_A_ENDPOINT: struct sockaddr_in or struct sockaddr_in6\n- *\t\t\tWGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16\n- *\t\t\tWGPEER_A_LAST_HANDSHAKE_TIME: struct timespec\n- *\t\t\tWGPEER_A_RX_BYTES: NLA_U64\n- *\t\t\tWGPEER_A_TX_BYTES: NLA_U64\n- *\t\t\tWGPEER_A_ALLOWEDIPS: NLA_NESTED\n- *\t\t\t\t0: NLA_NESTED\n- *\t\t\t\t\tWGALLOWEDIP_A_FAMILY: NLA_U16\n- *\t\t\t\t\tWGALLOWEDIP_A_IPADDR: struct in_addr or struct in6_addr\n- *\t\t\t\t\tWGALLOWEDIP_A_CIDR_MASK: NLA_U8\n- *\t\t\t\t1: NLA_NESTED\n- *\t\t\t\t\t...\n- *\t\t\t\t2: NLA_NESTED\n- *\t\t\t\t\t...\n- *\t\t\t\t...\n- *\t\t1: NLA_NESTED\n- *\t\t\t...\n- *\t\t...\n- *\n- * It is possible that all of the allowed IPs of a single peer will not\n- * fit within a single netlink message. In that case, the same peer will\n- * be written in the following message, except it will only contain\n- * WGPEER_A_PUBLIC_KEY and WGPEER_A_ALLOWEDIPS. This may occur several\n- * times in a row for the same peer. It is then up to the receiver to\n- * coalesce adjacent peers. Likewise, it is possible that all peers will\n- * not fit within a single message. So, subsequent peers will be sent\n- * in following messages, except those will only contain WGDEVICE_A_IFNAME\n- * and WGDEVICE_A_PEERS. It is then up to the receiver to coalesce these\n- * messages to form the complete list of peers.\n- *\n- * Since this is an NLA_F_DUMP command, the final message will always be\n- * NLMSG_DONE, even if an error occurs. However, this NLMSG_DONE message\n- * contains an integer error code. It is either zero or a negative error\n- * code corresponding to the errno.\n- *\n- * WG_CMD_SET_DEVICE\n- * -----------------\n- *\n- * May only be called via NLM_F_REQUEST. The command should contain the following\n- * tree of nested items, containing one but not both of WGDEVICE_A_IFINDEX\n- * and WGDEVICE_A_IFNAME:\n- *\n- *\tWGDEVICE_A_IFINDEX: NLA_U32\n- *\tWGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMESIZ - 1\n- *\tWGDEVICE_A_FLAGS: NLA_U32, 0 or WGDEVICE_F_REPLACE_PEERS if all current\n- *\t\t\t  peers should be removed prior to adding the list below.\n- *\tWGDEVICE_A_PRIVATE_KEY: len WG_KEY_LEN, all zeros to remove\n- *\tWGDEVICE_A_LISTEN_PORT: NLA_U16, 0 to choose randomly\n- *\tWGDEVICE_A_FWMARK: NLA_U32, 0 to disable\n- *\tWGDEVICE_A_PEERS: NLA_NESTED\n- *\t\t0: NLA_NESTED\n- *\t\t\tWGPEER_A_PUBLIC_KEY: len WG_KEY_LEN\n- *\t\t\tWGPEER_A_FLAGS: NLA_U32, 0 and/or WGPEER_F_REMOVE_ME if the specified peer\n- *\t\t\t\t\tshould be removed rather than added/updated and/or\n- *\t\t\t\t\tWGPEER_F_REPLACE_ALLOWEDIPS if all current allowed IPs of\n- *\t\t\t\t\tthis peer should be removed prior to adding the list below.\n- *\t\t\tWGPEER_A_PRESHARED_KEY: len WG_KEY_LEN, all zeros to remove\n- *\t\t\tWGPEER_A_ENDPOINT: struct sockaddr_in or struct sockaddr_in6\n- *\t\t\tWGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16, 0 to disable\n- *\t\t\tWGPEER_A_ALLOWEDIPS: NLA_NESTED\n- *\t\t\t\t0: NLA_NESTED\n- *\t\t\t\t\tWGALLOWEDIP_A_FAMILY: NLA_U16\n- *\t\t\t\t\tWGALLOWEDIP_A_IPADDR: struct in_addr or struct in6_addr\n- *\t\t\t\t\tWGALLOWEDIP_A_CIDR_MASK: NLA_U8\n- *\t\t\t\t1: NLA_NESTED\n- *\t\t\t\t\t...\n- *\t\t\t\t2: NLA_NESTED\n- *\t\t\t\t\t...\n- *\t\t\t\t...\n- *\t\t1: NLA_NESTED\n- *\t\t\t...\n- *\t\t...\n- *\n- * It is possible that the amount of configuration data exceeds that of\n- * the maximum message length accepted by the kernel. In that case,\n- * several messages should be sent one after another, with each\n- * successive one filling in information not contained in the prior. Note\n- * that if WGDEVICE_F_REPLACE_PEERS is specified in the first message, it\n- * probably should not be specified in fragments that come after, so that\n- * the list of peers is only cleared the first time but appened after.\n- * Likewise for peers, if WGPEER_F_REPLACE_ALLOWEDIPS is specified in the\n- * first message of a peer, it likely should not be specified in subsequent\n- * fragments.\n- *\n- * If an error occurs, NLMSG_ERROR will reply containing an errno.\n- */\n-\n-#define WG_GENL_NAME \"wireguard\"\n-#define WG_GENL_VERSION 1\n-\n-#define WG_KEY_LEN 32\n-\n-enum wg_cmd {\n-        WG_CMD_GET_DEVICE,\n-        WG_CMD_SET_DEVICE,\n-        __WG_CMD_MAX\n-};\n-#define WG_CMD_MAX (__WG_CMD_MAX - 1)\n-\n-enum wgdevice_flag {\n- WGDEVICE_F_REPLACE_PEERS = 1U << 0\n-};\n-enum wgdevice_attribute {\n-        WGDEVICE_A_UNSPEC,\n-        WGDEVICE_A_IFINDEX,\n-        WGDEVICE_A_IFNAME,\n-        WGDEVICE_A_PRIVATE_KEY,\n-        WGDEVICE_A_PUBLIC_KEY,\n-        WGDEVICE_A_FLAGS,\n-        WGDEVICE_A_LISTEN_PORT,\n-        WGDEVICE_A_FWMARK,\n-        WGDEVICE_A_PEERS,\n-        __WGDEVICE_A_LAST\n-};\n-#define WGDEVICE_A_MAX (__WGDEVICE_A_LAST - 1)\n-\n-enum wgpeer_flag {\n-        WGPEER_F_REMOVE_ME = 1U << 0,\n-        WGPEER_F_REPLACE_ALLOWEDIPS = 1U << 1\n-};\n-enum wgpeer_attribute {\n-        WGPEER_A_UNSPEC,\n-        WGPEER_A_PUBLIC_KEY,\n-        WGPEER_A_PRESHARED_KEY,\n-        WGPEER_A_FLAGS,\n-        WGPEER_A_ENDPOINT,\n-        WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL,\n-        WGPEER_A_LAST_HANDSHAKE_TIME,\n-        WGPEER_A_RX_BYTES,\n-        WGPEER_A_TX_BYTES,\n-        WGPEER_A_ALLOWEDIPS,\n-        __WGPEER_A_LAST\n-};\n-#define WGPEER_A_MAX (__WGPEER_A_LAST - 1)\n-\n-enum wgallowedip_attribute {\n-        WGALLOWEDIP_A_UNSPEC,\n-        WGALLOWEDIP_A_FAMILY,\n-        WGALLOWEDIP_A_IPADDR,\n-        WGALLOWEDIP_A_CIDR_MASK,\n-        __WGALLOWEDIP_A_LAST\n-};\n-#define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1)\ndiff --git a/src/shutdown/umount.c b/src/shutdown/umount.c\nindex 928bae6ab19..6afa512bfff 100644\n--- a/src/shutdown/umount.c\n+++ b/src/shutdown/umount.c\n@@ -5,6 +5,7 @@\n \n #include <errno.h>\n #include <fcntl.h>\n+#include <linux/dm-ioctl.h>\n #include <linux/loop.h>\n #include <string.h>\n #include <sys/mount.h>\n@@ -23,7 +24,6 @@\n #include \"fd-util.h\"\n #include \"fstab-util.h\"\n #include \"libmount-util.h\"\n-#include \"linux-3.13/dm-ioctl.h\"\n #include \"mount-setup.h\"\n #include \"mount-util.h\"\n #include \"mountpoint-util.h\"\ndiff --git a/src/test/test-arphrd-list.c b/src/test/test-arphrd-list.c\nindex 3005fc1b696..02bb25b6956 100644\n--- a/src/test/test-arphrd-list.c\n+++ b/src/test/test-arphrd-list.c\n@@ -1,10 +1,9 @@\n /* SPDX-License-Identifier: LGPL-2.1+ */\n \n-#include <net/if_arp.h>\n+#include <linux/if_arp.h>\n #include <string.h>\n \n #include \"macro.h\"\n-#include \"missing_network.h\"\n #include \"string-util.h\"\n \n _unused_ \\\ndiff --git a/src/test/test-bpf.c b/src/test/test-bpf.c\nindex cd8d68f215b..6a0bf1462fa 100644\n--- a/src/test/test-bpf.c\n+++ b/src/test/test-bpf.c\n@@ -1,6 +1,6 @@\n /* SPDX-License-Identifier: LGPL-2.1+ */\n \n-#include <linux/libbpf.h>\n+#include <linux/bpf_insn.h>\n #include <string.h>\n #include <sys/mman.h>\n #include <unistd.h>\ndiff --git a/src/test/test-netlink-manual.c b/src/test/test-netlink-manual.c\nindex a1a5eb47788..031a47605e2 100644\n--- a/src/test/test-netlink-manual.c\n+++ b/src/test/test-netlink-manual.c\n@@ -2,9 +2,8 @@\n \n #include <arpa/inet.h>\n #include <libkmod.h>\n-#include <linux/ip.h>\n-#include <net/if.h>\n #include <linux/if_tunnel.h>\n+#include <linux/ip.h>\n #include <sys/types.h>\n #include <unistd.h>\n \ndiff --git a/src/udev/net/ethtool-util.h b/src/udev/net/ethtool-util.h\nindex 618b26bf59f..7ca703d22cc 100644\n--- a/src/udev/net/ethtool-util.h\n+++ b/src/udev/net/ethtool-util.h\n@@ -5,7 +5,6 @@\n #include <linux/ethtool.h>\n \n #include \"conf-parser.h\"\n-#include \"missing_network.h\"\n \n struct link_config;\n \ndiff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c\nindex 14690e364b9..a26c4cefa82 100644\n--- a/src/udev/net/link-config.c\n+++ b/src/udev/net/link-config.c\n@@ -1,5 +1,6 @@\n /* SPDX-License-Identifier: LGPL-2.1+ */\n \n+#include <linux/netdevice.h>\n #include <netinet/ether.h>\n \n #include \"sd-device.h\"\n@@ -15,7 +16,6 @@\n #include \"link-config.h\"\n #include \"log.h\"\n #include \"memory-util.h\"\n-#include \"missing_network.h\"\n #include \"naming-scheme.h\"\n #include \"netlink-util.h\"\n #include \"network-internal.h\"\ndiff --git a/src/udev/udev-builtin-btrfs.c b/src/udev/udev-builtin-btrfs.c\nindex 956be59afb9..6a69dae3af7 100644\n--- a/src/udev/udev-builtin-btrfs.c\n+++ b/src/udev/udev-builtin-btrfs.c\n@@ -1,12 +1,12 @@\n /* SPDX-License-Identifier: LGPL-2.1+ */\n \n #include <fcntl.h>\n+#include <linux/btrfs.h>\n #include <stdlib.h>\n #include <sys/ioctl.h>\n \n #include \"device-util.h\"\n #include \"fd-util.h\"\n-#include \"missing.h\"\n #include \"string-util.h\"\n #include \"strxcpyx.h\"\n #include \"udev-builtin.h\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/patches/amlogic/systemd-9999.2-backport.patch",
    "content": "From 76566792e33f054dd02df84db044f5ae747afe67 Mon Sep 17 00:00:00 2001\nFrom: Yu Watanabe <watanabe.yu+github@gmail.com>\nDate: Sat, 13 Apr 2019 18:33:34 +0900\nSubject: [PATCH] linux: move netdevice.h from shared/linux to basic/linux\n\nAs the header linux/if_arp.h includes linux/netdevice.h.\n---\n src/{shared => basic}/linux/netdevice.h | 0\n src/basic/meson.build                   | 1 +\n src/shared/meson.build                  | 1 -\n 3 files changed, 1 insertion(+), 1 deletion(-)\n rename src/{shared => basic}/linux/netdevice.h (100%)\n\ndiff --git a/src/shared/linux/netdevice.h b/src/basic/linux/netdevice.h\nsimilarity index 100%\nrename from src/shared/linux/netdevice.h\nrename to src/basic/linux/netdevice.h\ndiff --git a/src/basic/meson.build b/src/basic/meson.build\nindex 524f3785dc0..81c3d0f3e80 100644\n--- a/src/basic/meson.build\n+++ b/src/basic/meson.build\n@@ -99,6 +99,7 @@ basic_sources = files('''\n         linux/if_tun.h\n         linux/if_tunnel.h\n         linux/libc-compat.h\n+        linux/netdevice.h\n         linux/netlink.h\n         linux/rtnetlink.h\n         linux/wireguard.h\ndiff --git a/src/shared/meson.build b/src/shared/meson.build\nindex 15466bcaf1f..c80a67cdde4 100644\n--- a/src/shared/meson.build\n+++ b/src/shared/meson.build\n@@ -102,7 +102,6 @@ shared_sources = files('''\n         linux/bpf_insn.h\n         linux/dm-ioctl.h\n         linux/ethtool.h\n-        linux/netdevice.h\n         lockfile-util.c\n         lockfile-util.h\n         log-link.h\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/patches/amlogic/systemd-9999.3-backport.patch",
    "content": "From 7057b6144f4c5cb7e284a409c7f24b84c16a3bb8 Mon Sep 17 00:00:00 2001\nFrom: Yu Watanabe <watanabe.yu+github@gmail.com>\nDate: Sat, 13 Apr 2019 18:46:40 +0900\nSubject: [PATCH] linux: also import linux/in.h and in6.h from kernel-5.0\n\nNow linux/in.h has better conflict detection with glibc's\nnetinet/in.h. So, let's import the headers.\n\nNote that our code already have many workarounds for the conflict,\nbut in this commit does not drop them. Let's do that in the later\ncommits if this really helps.\n---\n src/basic/linux/in.h  | 305 ++++++++++++++++++++++++++++++++++++++++++\n src/basic/linux/in6.h | 299 +++++++++++++++++++++++++++++++++++++++++\n src/basic/meson.build |   2 +\n 3 files changed, 606 insertions(+)\n create mode 100644 src/basic/linux/in.h\n create mode 100644 src/basic/linux/in6.h\n\ndiff --git a/src/basic/linux/in.h b/src/basic/linux/in.h\nnew file mode 100644\nindex 00000000000..a55cb8b1016\n--- /dev/null\n+++ b/src/basic/linux/in.h\n@@ -0,0 +1,305 @@\n+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */\n+/*\n+ * INET\t\tAn implementation of the TCP/IP protocol suite for the LINUX\n+ *\t\toperating system.  INET is implemented using the  BSD Socket\n+ *\t\tinterface as the means of communication with the user level.\n+ *\n+ *\t\tDefinitions of the Internet Protocol.\n+ *\n+ * Version:\t@(#)in.h\t1.0.1\t04/21/93\n+ *\n+ * Authors:\tOriginal taken from the GNU Project <netinet/in.h> file.\n+ *\t\tFred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>\n+ *\n+ *\t\tThis program is free software; you can redistribute it and/or\n+ *\t\tmodify it under the terms of the GNU General Public License\n+ *\t\tas published by the Free Software Foundation; either version\n+ *\t\t2 of the License, or (at your option) any later version.\n+ */\n+#ifndef _UAPI_LINUX_IN_H\n+#define _UAPI_LINUX_IN_H\n+\n+#include <linux/types.h>\n+#include <linux/libc-compat.h>\n+#include <linux/socket.h>\n+\n+#if __UAPI_DEF_IN_IPPROTO\n+/* Standard well-defined IP protocols.  */\n+enum {\n+  IPPROTO_IP = 0,\t\t/* Dummy protocol for TCP\t\t*/\n+#define IPPROTO_IP\t\tIPPROTO_IP\n+  IPPROTO_ICMP = 1,\t\t/* Internet Control Message Protocol\t*/\n+#define IPPROTO_ICMP\t\tIPPROTO_ICMP\n+  IPPROTO_IGMP = 2,\t\t/* Internet Group Management Protocol\t*/\n+#define IPPROTO_IGMP\t\tIPPROTO_IGMP\n+  IPPROTO_IPIP = 4,\t\t/* IPIP tunnels (older KA9Q tunnels use 94) */\n+#define IPPROTO_IPIP\t\tIPPROTO_IPIP\n+  IPPROTO_TCP = 6,\t\t/* Transmission Control Protocol\t*/\n+#define IPPROTO_TCP\t\tIPPROTO_TCP\n+  IPPROTO_EGP = 8,\t\t/* Exterior Gateway Protocol\t\t*/\n+#define IPPROTO_EGP\t\tIPPROTO_EGP\n+  IPPROTO_PUP = 12,\t\t/* PUP protocol\t\t\t\t*/\n+#define IPPROTO_PUP\t\tIPPROTO_PUP\n+  IPPROTO_UDP = 17,\t\t/* User Datagram Protocol\t\t*/\n+#define IPPROTO_UDP\t\tIPPROTO_UDP\n+  IPPROTO_IDP = 22,\t\t/* XNS IDP protocol\t\t\t*/\n+#define IPPROTO_IDP\t\tIPPROTO_IDP\n+  IPPROTO_TP = 29,\t\t/* SO Transport Protocol Class 4\t*/\n+#define IPPROTO_TP\t\tIPPROTO_TP\n+  IPPROTO_DCCP = 33,\t\t/* Datagram Congestion Control Protocol */\n+#define IPPROTO_DCCP\t\tIPPROTO_DCCP\n+  IPPROTO_IPV6 = 41,\t\t/* IPv6-in-IPv4 tunnelling\t\t*/\n+#define IPPROTO_IPV6\t\tIPPROTO_IPV6\n+  IPPROTO_RSVP = 46,\t\t/* RSVP Protocol\t\t\t*/\n+#define IPPROTO_RSVP\t\tIPPROTO_RSVP\n+  IPPROTO_GRE = 47,\t\t/* Cisco GRE tunnels (rfc 1701,1702)\t*/\n+#define IPPROTO_GRE\t\tIPPROTO_GRE\n+  IPPROTO_ESP = 50,\t\t/* Encapsulation Security Payload protocol */\n+#define IPPROTO_ESP\t\tIPPROTO_ESP\n+  IPPROTO_AH = 51,\t\t/* Authentication Header protocol\t*/\n+#define IPPROTO_AH\t\tIPPROTO_AH\n+  IPPROTO_MTP = 92,\t\t/* Multicast Transport Protocol\t\t*/\n+#define IPPROTO_MTP\t\tIPPROTO_MTP\n+  IPPROTO_BEETPH = 94,\t\t/* IP option pseudo header for BEET\t*/\n+#define IPPROTO_BEETPH\t\tIPPROTO_BEETPH\n+  IPPROTO_ENCAP = 98,\t\t/* Encapsulation Header\t\t\t*/\n+#define IPPROTO_ENCAP\t\tIPPROTO_ENCAP\n+  IPPROTO_PIM = 103,\t\t/* Protocol Independent Multicast\t*/\n+#define IPPROTO_PIM\t\tIPPROTO_PIM\n+  IPPROTO_COMP = 108,\t\t/* Compression Header Protocol\t\t*/\n+#define IPPROTO_COMP\t\tIPPROTO_COMP\n+  IPPROTO_SCTP = 132,\t\t/* Stream Control Transport Protocol\t*/\n+#define IPPROTO_SCTP\t\tIPPROTO_SCTP\n+  IPPROTO_UDPLITE = 136,\t/* UDP-Lite (RFC 3828)\t\t\t*/\n+#define IPPROTO_UDPLITE\t\tIPPROTO_UDPLITE\n+  IPPROTO_MPLS = 137,\t\t/* MPLS in IP (RFC 4023)\t\t*/\n+#define IPPROTO_MPLS\t\tIPPROTO_MPLS\n+  IPPROTO_RAW = 255,\t\t/* Raw IP packets\t\t\t*/\n+#define IPPROTO_RAW\t\tIPPROTO_RAW\n+  IPPROTO_MAX\n+};\n+#endif\n+\n+#if __UAPI_DEF_IN_ADDR\n+/* Internet address. */\n+struct in_addr {\n+\t__be32\ts_addr;\n+};\n+#endif\n+\n+#define IP_TOS\t\t1\n+#define IP_TTL\t\t2\n+#define IP_HDRINCL\t3\n+#define IP_OPTIONS\t4\n+#define IP_ROUTER_ALERT\t5\n+#define IP_RECVOPTS\t6\n+#define IP_RETOPTS\t7\n+#define IP_PKTINFO\t8\n+#define IP_PKTOPTIONS\t9\n+#define IP_MTU_DISCOVER\t10\n+#define IP_RECVERR\t11\n+#define IP_RECVTTL\t12\n+#define\tIP_RECVTOS\t13\n+#define IP_MTU\t\t14\n+#define IP_FREEBIND\t15\n+#define IP_IPSEC_POLICY\t16\n+#define IP_XFRM_POLICY\t17\n+#define IP_PASSSEC\t18\n+#define IP_TRANSPARENT\t19\n+\n+/* BSD compatibility */\n+#define IP_RECVRETOPTS\tIP_RETOPTS\n+\n+/* TProxy original addresses */\n+#define IP_ORIGDSTADDR       20\n+#define IP_RECVORIGDSTADDR   IP_ORIGDSTADDR\n+\n+#define IP_MINTTL       21\n+#define IP_NODEFRAG     22\n+#define IP_CHECKSUM\t23\n+#define IP_BIND_ADDRESS_NO_PORT\t24\n+#define IP_RECVFRAGSIZE\t25\n+\n+/* IP_MTU_DISCOVER values */\n+#define IP_PMTUDISC_DONT\t\t0\t/* Never send DF frames */\n+#define IP_PMTUDISC_WANT\t\t1\t/* Use per route hints\t*/\n+#define IP_PMTUDISC_DO\t\t\t2\t/* Always DF\t\t*/\n+#define IP_PMTUDISC_PROBE\t\t3       /* Ignore dst pmtu      */\n+/* Always use interface mtu (ignores dst pmtu) but don't set DF flag.\n+ * Also incoming ICMP frag_needed notifications will be ignored on\n+ * this socket to prevent accepting spoofed ones.\n+ */\n+#define IP_PMTUDISC_INTERFACE\t\t4\n+/* weaker version of IP_PMTUDISC_INTERFACE, which allos packets to get\n+ * fragmented if they exeed the interface mtu\n+ */\n+#define IP_PMTUDISC_OMIT\t\t5\n+\n+#define IP_MULTICAST_IF\t\t\t32\n+#define IP_MULTICAST_TTL \t\t33\n+#define IP_MULTICAST_LOOP \t\t34\n+#define IP_ADD_MEMBERSHIP\t\t35\n+#define IP_DROP_MEMBERSHIP\t\t36\n+#define IP_UNBLOCK_SOURCE\t\t37\n+#define IP_BLOCK_SOURCE\t\t\t38\n+#define IP_ADD_SOURCE_MEMBERSHIP\t39\n+#define IP_DROP_SOURCE_MEMBERSHIP\t40\n+#define IP_MSFILTER\t\t\t41\n+#define MCAST_JOIN_GROUP\t\t42\n+#define MCAST_BLOCK_SOURCE\t\t43\n+#define MCAST_UNBLOCK_SOURCE\t\t44\n+#define MCAST_LEAVE_GROUP\t\t45\n+#define MCAST_JOIN_SOURCE_GROUP\t\t46\n+#define MCAST_LEAVE_SOURCE_GROUP\t47\n+#define MCAST_MSFILTER\t\t\t48\n+#define IP_MULTICAST_ALL\t\t49\n+#define IP_UNICAST_IF\t\t\t50\n+\n+#define MCAST_EXCLUDE\t0\n+#define MCAST_INCLUDE\t1\n+\n+/* These need to appear somewhere around here */\n+#define IP_DEFAULT_MULTICAST_TTL        1\n+#define IP_DEFAULT_MULTICAST_LOOP       1\n+\n+/* Request struct for multicast socket ops */\n+\n+#if __UAPI_DEF_IP_MREQ\n+struct ip_mreq  {\n+\tstruct in_addr imr_multiaddr;\t/* IP multicast address of group */\n+\tstruct in_addr imr_interface;\t/* local IP address of interface */\n+};\n+\n+struct ip_mreqn {\n+\tstruct in_addr\timr_multiaddr;\t\t/* IP multicast address of group */\n+\tstruct in_addr\timr_address;\t\t/* local IP address of interface */\n+\tint\t\timr_ifindex;\t\t/* Interface index */\n+};\n+\n+struct ip_mreq_source {\n+\t__be32\t\timr_multiaddr;\n+\t__be32\t\timr_interface;\n+\t__be32\t\timr_sourceaddr;\n+};\n+\n+struct ip_msfilter {\n+\t__be32\t\timsf_multiaddr;\n+\t__be32\t\timsf_interface;\n+\t__u32\t\timsf_fmode;\n+\t__u32\t\timsf_numsrc;\n+\t__be32\t\timsf_slist[1];\n+};\n+\n+#define IP_MSFILTER_SIZE(numsrc) \\\n+\t(sizeof(struct ip_msfilter) - sizeof(__u32) \\\n+\t+ (numsrc) * sizeof(__u32))\n+\n+struct group_req {\n+\t__u32\t\t\t\t gr_interface;\t/* interface index */\n+\tstruct __kernel_sockaddr_storage gr_group;\t/* group address */\n+};\n+\n+struct group_source_req {\n+\t__u32\t\t\t\t gsr_interface;\t/* interface index */\n+\tstruct __kernel_sockaddr_storage gsr_group;\t/* group address */\n+\tstruct __kernel_sockaddr_storage gsr_source;\t/* source address */\n+};\n+\n+struct group_filter {\n+\t__u32\t\t\t\t gf_interface;\t/* interface index */\n+\tstruct __kernel_sockaddr_storage gf_group;\t/* multicast address */\n+\t__u32\t\t\t\t gf_fmode;\t/* filter mode */\n+\t__u32\t\t\t\t gf_numsrc;\t/* number of sources */\n+\tstruct __kernel_sockaddr_storage gf_slist[1];\t/* interface index */\n+};\n+\n+#define GROUP_FILTER_SIZE(numsrc) \\\n+\t(sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) \\\n+\t+ (numsrc) * sizeof(struct __kernel_sockaddr_storage))\n+#endif\n+\n+#if __UAPI_DEF_IN_PKTINFO\n+struct in_pktinfo {\n+\tint\t\tipi_ifindex;\n+\tstruct in_addr\tipi_spec_dst;\n+\tstruct in_addr\tipi_addr;\n+};\n+#endif\n+\n+/* Structure describing an Internet (IP) socket address. */\n+#if  __UAPI_DEF_SOCKADDR_IN\n+#define __SOCK_SIZE__\t16\t\t/* sizeof(struct sockaddr)\t*/\n+struct sockaddr_in {\n+  __kernel_sa_family_t\tsin_family;\t/* Address family\t\t*/\n+  __be16\t\tsin_port;\t/* Port number\t\t\t*/\n+  struct in_addr\tsin_addr;\t/* Internet address\t\t*/\n+\n+  /* Pad to size of `struct sockaddr'. */\n+  unsigned char\t\t__pad[__SOCK_SIZE__ - sizeof(short int) -\n+\t\t\tsizeof(unsigned short int) - sizeof(struct in_addr)];\n+};\n+#define sin_zero\t__pad\t\t/* for BSD UNIX comp. -FvK\t*/\n+#endif\n+\n+#if __UAPI_DEF_IN_CLASS\n+/*\n+ * Definitions of the bits in an Internet address integer.\n+ * On subnets, host and network parts are found according\n+ * to the subnet mask, not these masks.\n+ */\n+#define\tIN_CLASSA(a)\t\t((((long int) (a)) & 0x80000000) == 0)\n+#define\tIN_CLASSA_NET\t\t0xff000000\n+#define\tIN_CLASSA_NSHIFT\t24\n+#define\tIN_CLASSA_HOST\t\t(0xffffffff & ~IN_CLASSA_NET)\n+#define\tIN_CLASSA_MAX\t\t128\n+\n+#define\tIN_CLASSB(a)\t\t((((long int) (a)) & 0xc0000000) == 0x80000000)\n+#define\tIN_CLASSB_NET\t\t0xffff0000\n+#define\tIN_CLASSB_NSHIFT\t16\n+#define\tIN_CLASSB_HOST\t\t(0xffffffff & ~IN_CLASSB_NET)\n+#define\tIN_CLASSB_MAX\t\t65536\n+\n+#define\tIN_CLASSC(a)\t\t((((long int) (a)) & 0xe0000000) == 0xc0000000)\n+#define\tIN_CLASSC_NET\t\t0xffffff00\n+#define\tIN_CLASSC_NSHIFT\t8\n+#define\tIN_CLASSC_HOST\t\t(0xffffffff & ~IN_CLASSC_NET)\n+\n+#define\tIN_CLASSD(a)\t\t((((long int) (a)) & 0xf0000000) == 0xe0000000)\n+#define\tIN_MULTICAST(a)\t\tIN_CLASSD(a)\n+#define\tIN_MULTICAST_NET\t0xe0000000\n+\n+#define\tIN_BADCLASS(a)\t\t(((long int) (a) ) == (long int)0xffffffff)\n+#define\tIN_EXPERIMENTAL(a)\tIN_BADCLASS((a))\n+\n+#define\tIN_CLASSE(a)\t\t((((long int) (a)) & 0xf0000000) == 0xf0000000)\n+#define\tIN_CLASSE_NET\t\t0xffffffff\n+#define\tIN_CLASSE_NSHIFT\t0\n+\n+/* Address to accept any incoming messages. */\n+#define\tINADDR_ANY\t\t((unsigned long int) 0x00000000)\n+\n+/* Address to send to all hosts. */\n+#define\tINADDR_BROADCAST\t((unsigned long int) 0xffffffff)\n+\n+/* Address indicating an error return. */\n+#define\tINADDR_NONE\t\t((unsigned long int) 0xffffffff)\n+\n+/* Network number for local host loopback. */\n+#define\tIN_LOOPBACKNET\t\t127\n+\n+/* Address to loopback in software to local host.  */\n+#define\tINADDR_LOOPBACK\t\t0x7f000001\t/* 127.0.0.1   */\n+#define\tIN_LOOPBACK(a)\t\t((((long int) (a)) & 0xff000000) == 0x7f000000)\n+\n+/* Defines for Multicast INADDR */\n+#define INADDR_UNSPEC_GROUP   \t0xe0000000U\t/* 224.0.0.0   */\n+#define INADDR_ALLHOSTS_GROUP \t0xe0000001U\t/* 224.0.0.1   */\n+#define INADDR_ALLRTRS_GROUP    0xe0000002U\t/* 224.0.0.2 */\n+#define INADDR_MAX_LOCAL_GROUP  0xe00000ffU\t/* 224.0.0.255 */\n+#endif\n+\n+/* <asm/byteorder.h> contains the htonl type stuff.. */\n+#include <asm/byteorder.h> \n+\n+\n+#endif /* _UAPI_LINUX_IN_H */\ndiff --git a/src/basic/linux/in6.h b/src/basic/linux/in6.h\nnew file mode 100644\nindex 00000000000..71d82fe15b0\n--- /dev/null\n+++ b/src/basic/linux/in6.h\n@@ -0,0 +1,299 @@\n+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */\n+/*\n+ *\tTypes and definitions for AF_INET6 \n+ *\tLinux INET6 implementation \n+ *\n+ *\tAuthors:\n+ *\tPedro Roque\t\t<roque@di.fc.ul.pt>\t\n+ *\n+ *\tSources:\n+ *\tIPv6 Program Interfaces for BSD Systems\n+ *      <draft-ietf-ipngwg-bsd-api-05.txt>\n+ *\n+ *\tAdvanced Sockets API for IPv6\n+ *\t<draft-stevens-advanced-api-00.txt>\n+ *\n+ *\tThis program is free software; you can redistribute it and/or\n+ *      modify it under the terms of the GNU General Public License\n+ *      as published by the Free Software Foundation; either version\n+ *      2 of the License, or (at your option) any later version.\n+ */\n+\n+#ifndef _UAPI_LINUX_IN6_H\n+#define _UAPI_LINUX_IN6_H\n+\n+#include <linux/types.h>\n+#include <linux/libc-compat.h>\n+\n+/*\n+ *\tIPv6 address structure\n+ */\n+\n+#if __UAPI_DEF_IN6_ADDR\n+struct in6_addr {\n+\tunion {\n+\t\t__u8\t\tu6_addr8[16];\n+#if __UAPI_DEF_IN6_ADDR_ALT\n+\t\t__be16\t\tu6_addr16[8];\n+\t\t__be32\t\tu6_addr32[4];\n+#endif\n+\t} in6_u;\n+#define s6_addr\t\t\tin6_u.u6_addr8\n+#if __UAPI_DEF_IN6_ADDR_ALT\n+#define s6_addr16\t\tin6_u.u6_addr16\n+#define s6_addr32\t\tin6_u.u6_addr32\n+#endif\n+};\n+#endif /* __UAPI_DEF_IN6_ADDR */\n+\n+#if __UAPI_DEF_SOCKADDR_IN6\n+struct sockaddr_in6 {\n+\tunsigned short int\tsin6_family;    /* AF_INET6 */\n+\t__be16\t\t\tsin6_port;      /* Transport layer port # */\n+\t__be32\t\t\tsin6_flowinfo;  /* IPv6 flow information */\n+\tstruct in6_addr\t\tsin6_addr;      /* IPv6 address */\n+\t__u32\t\t\tsin6_scope_id;  /* scope id (new in RFC2553) */\n+};\n+#endif /* __UAPI_DEF_SOCKADDR_IN6 */\n+\n+#if __UAPI_DEF_IPV6_MREQ\n+struct ipv6_mreq {\n+\t/* IPv6 multicast address of group */\n+\tstruct in6_addr ipv6mr_multiaddr;\n+\n+\t/* local IPv6 address of interface */\n+\tint\t\tipv6mr_ifindex;\n+};\n+#endif /* __UAPI_DEF_IVP6_MREQ */\n+\n+#define ipv6mr_acaddr\tipv6mr_multiaddr\n+\n+struct in6_flowlabel_req {\n+\tstruct in6_addr\tflr_dst;\n+\t__be32\tflr_label;\n+\t__u8\tflr_action;\n+\t__u8\tflr_share;\n+\t__u16\tflr_flags;\n+\t__u16 \tflr_expires;\n+\t__u16\tflr_linger;\n+\t__u32\t__flr_pad;\n+\t/* Options in format of IPV6_PKTOPTIONS */\n+};\n+\n+#define IPV6_FL_A_GET\t0\n+#define IPV6_FL_A_PUT\t1\n+#define IPV6_FL_A_RENEW\t2\n+\n+#define IPV6_FL_F_CREATE\t1\n+#define IPV6_FL_F_EXCL\t\t2\n+#define IPV6_FL_F_REFLECT\t4\n+#define IPV6_FL_F_REMOTE\t8\n+\n+#define IPV6_FL_S_NONE\t\t0\n+#define IPV6_FL_S_EXCL\t\t1\n+#define IPV6_FL_S_PROCESS\t2\n+#define IPV6_FL_S_USER\t\t3\n+#define IPV6_FL_S_ANY\t\t255\n+\n+\n+/*\n+ *\tBitmask constant declarations to help applications select out the \n+ *\tflow label and priority fields.\n+ *\n+ *\tNote that this are in host byte order while the flowinfo field of\n+ *\tsockaddr_in6 is in network byte order.\n+ */\n+\n+#define IPV6_FLOWINFO_FLOWLABEL\t\t0x000fffff\n+#define IPV6_FLOWINFO_PRIORITY\t\t0x0ff00000\n+\n+/* These definitions are obsolete */\n+#define IPV6_PRIORITY_UNCHARACTERIZED\t0x0000\n+#define IPV6_PRIORITY_FILLER\t\t0x0100\n+#define IPV6_PRIORITY_UNATTENDED\t0x0200\n+#define IPV6_PRIORITY_RESERVED1\t\t0x0300\n+#define IPV6_PRIORITY_BULK\t\t0x0400\n+#define IPV6_PRIORITY_RESERVED2\t\t0x0500\n+#define IPV6_PRIORITY_INTERACTIVE\t0x0600\n+#define IPV6_PRIORITY_CONTROL\t\t0x0700\n+#define IPV6_PRIORITY_8\t\t\t0x0800\n+#define IPV6_PRIORITY_9\t\t\t0x0900\n+#define IPV6_PRIORITY_10\t\t0x0a00\n+#define IPV6_PRIORITY_11\t\t0x0b00\n+#define IPV6_PRIORITY_12\t\t0x0c00\n+#define IPV6_PRIORITY_13\t\t0x0d00\n+#define IPV6_PRIORITY_14\t\t0x0e00\n+#define IPV6_PRIORITY_15\t\t0x0f00\n+\n+/*\n+ *\tIPV6 extension headers\n+ */\n+#if __UAPI_DEF_IPPROTO_V6\n+#define IPPROTO_HOPOPTS\t\t0\t/* IPv6 hop-by-hop options\t*/\n+#define IPPROTO_ROUTING\t\t43\t/* IPv6 routing header\t\t*/\n+#define IPPROTO_FRAGMENT\t44\t/* IPv6 fragmentation header\t*/\n+#define IPPROTO_ICMPV6\t\t58\t/* ICMPv6\t\t\t*/\n+#define IPPROTO_NONE\t\t59\t/* IPv6 no next header\t\t*/\n+#define IPPROTO_DSTOPTS\t\t60\t/* IPv6 destination options\t*/\n+#define IPPROTO_MH\t\t135\t/* IPv6 mobility header\t\t*/\n+#endif /* __UAPI_DEF_IPPROTO_V6 */\n+\n+/*\n+ *\tIPv6 TLV options.\n+ */\n+#define IPV6_TLV_PAD1\t\t0\n+#define IPV6_TLV_PADN\t\t1\n+#define IPV6_TLV_ROUTERALERT\t5\n+#define IPV6_TLV_CALIPSO\t7\t/* RFC 5570 */\n+#define IPV6_TLV_JUMBO\t\t194\n+#define IPV6_TLV_HAO\t\t201\t/* home address option */\n+\n+/*\n+ *\tIPV6 socket options\n+ */\n+#if __UAPI_DEF_IPV6_OPTIONS\n+#define IPV6_ADDRFORM\t\t1\n+#define IPV6_2292PKTINFO\t2\n+#define IPV6_2292HOPOPTS\t3\n+#define IPV6_2292DSTOPTS\t4\n+#define IPV6_2292RTHDR\t\t5\n+#define IPV6_2292PKTOPTIONS\t6\n+#define IPV6_CHECKSUM\t\t7\n+#define IPV6_2292HOPLIMIT\t8\n+#define IPV6_NEXTHOP\t\t9\n+#define IPV6_AUTHHDR\t\t10\t/* obsolete */\n+#define IPV6_FLOWINFO\t\t11\n+\n+#define IPV6_UNICAST_HOPS\t16\n+#define IPV6_MULTICAST_IF\t17\n+#define IPV6_MULTICAST_HOPS\t18\n+#define IPV6_MULTICAST_LOOP\t19\n+#define IPV6_ADD_MEMBERSHIP\t20\n+#define IPV6_DROP_MEMBERSHIP\t21\n+#define IPV6_ROUTER_ALERT\t22\n+#define IPV6_MTU_DISCOVER\t23\n+#define IPV6_MTU\t\t24\n+#define IPV6_RECVERR\t\t25\n+#define IPV6_V6ONLY\t\t26\n+#define IPV6_JOIN_ANYCAST\t27\n+#define IPV6_LEAVE_ANYCAST\t28\n+#define IPV6_MULTICAST_ALL\t29\n+\n+/* IPV6_MTU_DISCOVER values */\n+#define IPV6_PMTUDISC_DONT\t\t0\n+#define IPV6_PMTUDISC_WANT\t\t1\n+#define IPV6_PMTUDISC_DO\t\t2\n+#define IPV6_PMTUDISC_PROBE\t\t3\n+/* same as IPV6_PMTUDISC_PROBE, provided for symetry with IPv4\n+ * also see comments on IP_PMTUDISC_INTERFACE\n+ */\n+#define IPV6_PMTUDISC_INTERFACE\t\t4\n+/* weaker version of IPV6_PMTUDISC_INTERFACE, which allows packets to\n+ * get fragmented if they exceed the interface mtu\n+ */\n+#define IPV6_PMTUDISC_OMIT\t\t5\n+\n+/* Flowlabel */\n+#define IPV6_FLOWLABEL_MGR\t32\n+#define IPV6_FLOWINFO_SEND\t33\n+\n+#define IPV6_IPSEC_POLICY\t34\n+#define IPV6_XFRM_POLICY\t35\n+#define IPV6_HDRINCL\t\t36\n+#endif\n+\n+/*\n+ * Multicast:\n+ * Following socket options are shared between IPv4 and IPv6.\n+ *\n+ * MCAST_JOIN_GROUP\t\t42\n+ * MCAST_BLOCK_SOURCE\t\t43\n+ * MCAST_UNBLOCK_SOURCE\t\t44\n+ * MCAST_LEAVE_GROUP\t\t45\n+ * MCAST_JOIN_SOURCE_GROUP\t46\n+ * MCAST_LEAVE_SOURCE_GROUP\t47\n+ * MCAST_MSFILTER\t\t48\n+ */\n+\n+/*\n+ * Advanced API (RFC3542) (1)\n+ *\n+ * Note: IPV6_RECVRTHDRDSTOPTS does not exist. see net/ipv6/datagram.c.\n+ */\n+\n+#define IPV6_RECVPKTINFO\t49\n+#define IPV6_PKTINFO\t\t50\n+#define IPV6_RECVHOPLIMIT\t51\n+#define IPV6_HOPLIMIT\t\t52\n+#define IPV6_RECVHOPOPTS\t53\n+#define IPV6_HOPOPTS\t\t54\n+#define IPV6_RTHDRDSTOPTS\t55\n+#define IPV6_RECVRTHDR\t\t56\n+#define IPV6_RTHDR\t\t57\n+#define IPV6_RECVDSTOPTS\t58\n+#define IPV6_DSTOPTS\t\t59\n+#define IPV6_RECVPATHMTU\t60\n+#define IPV6_PATHMTU\t\t61\n+#define IPV6_DONTFRAG\t\t62\n+#if 0\t/* not yet */\n+#define IPV6_USE_MIN_MTU\t63\n+#endif\n+\n+/*\n+ * Netfilter (1)\n+ *\n+ * Following socket options are used in ip6_tables;\n+ * see include/linux/netfilter_ipv6/ip6_tables.h.\n+ *\n+ * IP6T_SO_SET_REPLACE / IP6T_SO_GET_INFO\t\t64\n+ * IP6T_SO_SET_ADD_COUNTERS / IP6T_SO_GET_ENTRIES\t65\n+ */\n+\n+/*\n+ * Advanced API (RFC3542) (2)\n+ */\n+#define IPV6_RECVTCLASS\t\t66\n+#define IPV6_TCLASS\t\t67\n+\n+/*\n+ * Netfilter (2)\n+ *\n+ * Following socket options are used in ip6_tables;\n+ * see include/linux/netfilter_ipv6/ip6_tables.h.\n+ *\n+ * IP6T_SO_GET_REVISION_MATCH\t68\n+ * IP6T_SO_GET_REVISION_TARGET\t69\n+ * IP6T_SO_ORIGINAL_DST\t\t80\n+ */\n+\n+#define IPV6_AUTOFLOWLABEL\t70\n+/* RFC5014: Source address selection */\n+#define IPV6_ADDR_PREFERENCES\t72\n+\n+#define IPV6_PREFER_SRC_TMP\t\t0x0001\n+#define IPV6_PREFER_SRC_PUBLIC\t\t0x0002\n+#define IPV6_PREFER_SRC_PUBTMP_DEFAULT\t0x0100\n+#define IPV6_PREFER_SRC_COA\t\t0x0004\n+#define IPV6_PREFER_SRC_HOME\t\t0x0400\n+#define IPV6_PREFER_SRC_CGA\t\t0x0008\n+#define IPV6_PREFER_SRC_NONCGA\t\t0x0800\n+\n+/* RFC5082: Generalized Ttl Security Mechanism */\n+#define IPV6_MINHOPCOUNT\t\t73\n+\n+#define IPV6_ORIGDSTADDR        74\n+#define IPV6_RECVORIGDSTADDR    IPV6_ORIGDSTADDR\n+#define IPV6_TRANSPARENT        75\n+#define IPV6_UNICAST_IF         76\n+#define IPV6_RECVFRAGSIZE\t77\n+#define IPV6_FREEBIND\t\t78\n+\n+/*\n+ * Multicast Routing:\n+ * see include/uapi/linux/mroute6.h.\n+ *\n+ * MRT6_BASE\t\t\t200\n+ * ...\n+ * MRT6_MAX\n+ */\n+#endif /* _UAPI_LINUX_IN6_H */\ndiff --git a/src/basic/meson.build b/src/basic/meson.build\nindex 81c3d0f3e80..26c7fc42c76 100644\n--- a/src/basic/meson.build\n+++ b/src/basic/meson.build\n@@ -98,6 +98,8 @@ basic_sources = files('''\n         linux/if_macsec.h\n         linux/if_tun.h\n         linux/if_tunnel.h\n+        linux/in.h\n+        linux/in6.h\n         linux/libc-compat.h\n         linux/netdevice.h\n         linux/netlink.h\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/patches/amlogic/systemd-9999.4-backport.patch",
    "content": "From aa8129049564627fd9eb7866fa58c9bc9f47c672 Mon Sep 17 00:00:00 2001\nFrom: Yu Watanabe <watanabe.yu+github@gmail.com>\nDate: Sat, 13 Apr 2019 18:35:15 +0900\nSubject: [PATCH] linux: also import l2tp.h from kernel-5.0\n\nThe L2TP_ATTR_UDP_ZERO_CSUM6_{TX,RX} attributes are introduced by\n6b649feafe10b293f4bd5a74aca95faf625ae525, which is included in\nkernel-3.16. To support older kernel, let's import the header.\n\nFixes #12300.\n---\n src/basic/linux/l2tp.h | 201 +++++++++++++++++++++++++++++++++++++++++\n src/basic/meson.build  |   1 +\n 2 files changed, 202 insertions(+)\n create mode 100644 src/basic/linux/l2tp.h\n\ndiff --git a/src/basic/linux/l2tp.h b/src/basic/linux/l2tp.h\nnew file mode 100644\nindex 00000000000..61158f5a1a5\n--- /dev/null\n+++ b/src/basic/linux/l2tp.h\n@@ -0,0 +1,201 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+/*\n+ * L2TP-over-IP socket for L2TPv3.\n+ *\n+ * Author: James Chapman <jchapman@katalix.com>\n+ */\n+\n+#ifndef _UAPI_LINUX_L2TP_H_\n+#define _UAPI_LINUX_L2TP_H_\n+\n+#include <linux/types.h>\n+#include <linux/socket.h>\n+#include <linux/in.h>\n+#include <linux/in6.h>\n+\n+#define IPPROTO_L2TP\t\t115\n+\n+/**\n+ * struct sockaddr_l2tpip - the sockaddr structure for L2TP-over-IP sockets\n+ * @l2tp_family:  address family number AF_L2TPIP.\n+ * @l2tp_addr:    protocol specific address information\n+ * @l2tp_conn_id: connection id of tunnel\n+ */\n+#define __SOCK_SIZE__\t16\t\t/* sizeof(struct sockaddr)\t*/\n+struct sockaddr_l2tpip {\n+\t/* The first fields must match struct sockaddr_in */\n+\t__kernel_sa_family_t l2tp_family; /* AF_INET */\n+\t__be16\t\tl2tp_unused;\t/* INET port number (unused) */\n+\tstruct in_addr\tl2tp_addr;\t/* Internet address */\n+\n+\t__u32\t\tl2tp_conn_id;\t/* Connection ID of tunnel */\n+\n+\t/* Pad to size of `struct sockaddr'. */\n+\tunsigned char\t__pad[__SOCK_SIZE__ -\n+\t\t\t      sizeof(__kernel_sa_family_t) -\n+\t\t\t      sizeof(__be16) - sizeof(struct in_addr) -\n+\t\t\t      sizeof(__u32)];\n+};\n+\n+/**\n+ * struct sockaddr_l2tpip6 - the sockaddr structure for L2TP-over-IPv6 sockets\n+ * @l2tp_family:  address family number AF_L2TPIP.\n+ * @l2tp_addr:    protocol specific address information\n+ * @l2tp_conn_id: connection id of tunnel\n+ */\n+struct sockaddr_l2tpip6 {\n+\t/* The first fields must match struct sockaddr_in6 */\n+\t__kernel_sa_family_t l2tp_family; /* AF_INET6 */\n+\t__be16\t\tl2tp_unused;\t/* INET port number (unused) */\n+\t__be32\t\tl2tp_flowinfo;\t/* IPv6 flow information */\n+\tstruct in6_addr\tl2tp_addr;\t/* IPv6 address */\n+\t__u32\t\tl2tp_scope_id;\t/* scope id (new in RFC2553) */\n+\t__u32\t\tl2tp_conn_id;\t/* Connection ID of tunnel */\n+};\n+\n+/*****************************************************************************\n+ *  NETLINK_GENERIC netlink family.\n+ *****************************************************************************/\n+\n+/*\n+ * Commands.\n+ * Valid TLVs of each command are:-\n+ * TUNNEL_CREATE\t- CONN_ID, pw_type, netns, ifname, ipinfo, udpinfo, udpcsum\n+ * TUNNEL_DELETE\t- CONN_ID\n+ * TUNNEL_MODIFY\t- CONN_ID, udpcsum\n+ * TUNNEL_GETSTATS\t- CONN_ID, (stats)\n+ * TUNNEL_GET\t\t- CONN_ID, (...)\n+ * SESSION_CREATE\t- SESSION_ID, PW_TYPE, cookie, peer_cookie, l2spec\n+ * SESSION_DELETE\t- SESSION_ID\n+ * SESSION_MODIFY\t- SESSION_ID\n+ * SESSION_GET\t\t- SESSION_ID, (...)\n+ * SESSION_GETSTATS\t- SESSION_ID, (stats)\n+ *\n+ */\n+enum {\n+\tL2TP_CMD_NOOP,\n+\tL2TP_CMD_TUNNEL_CREATE,\n+\tL2TP_CMD_TUNNEL_DELETE,\n+\tL2TP_CMD_TUNNEL_MODIFY,\n+\tL2TP_CMD_TUNNEL_GET,\n+\tL2TP_CMD_SESSION_CREATE,\n+\tL2TP_CMD_SESSION_DELETE,\n+\tL2TP_CMD_SESSION_MODIFY,\n+\tL2TP_CMD_SESSION_GET,\n+\t__L2TP_CMD_MAX,\n+};\n+\n+#define L2TP_CMD_MAX\t\t\t(__L2TP_CMD_MAX - 1)\n+\n+/*\n+ * ATTR types defined for L2TP\n+ */\n+enum {\n+\tL2TP_ATTR_NONE,\t\t\t/* no data */\n+\tL2TP_ATTR_PW_TYPE,\t\t/* u16, enum l2tp_pwtype */\n+\tL2TP_ATTR_ENCAP_TYPE,\t\t/* u16, enum l2tp_encap_type */\n+\tL2TP_ATTR_OFFSET,\t\t/* u16 (not used) */\n+\tL2TP_ATTR_DATA_SEQ,\t\t/* u16 (not used) */\n+\tL2TP_ATTR_L2SPEC_TYPE,\t\t/* u8, enum l2tp_l2spec_type */\n+\tL2TP_ATTR_L2SPEC_LEN,\t\t/* u8 (not used) */\n+\tL2TP_ATTR_PROTO_VERSION,\t/* u8 */\n+\tL2TP_ATTR_IFNAME,\t\t/* string */\n+\tL2TP_ATTR_CONN_ID,\t\t/* u32 */\n+\tL2TP_ATTR_PEER_CONN_ID,\t\t/* u32 */\n+\tL2TP_ATTR_SESSION_ID,\t\t/* u32 */\n+\tL2TP_ATTR_PEER_SESSION_ID,\t/* u32 */\n+\tL2TP_ATTR_UDP_CSUM,\t\t/* u8 */\n+\tL2TP_ATTR_VLAN_ID,\t\t/* u16 (not used) */\n+\tL2TP_ATTR_COOKIE,\t\t/* 0, 4 or 8 bytes */\n+\tL2TP_ATTR_PEER_COOKIE,\t\t/* 0, 4 or 8 bytes */\n+\tL2TP_ATTR_DEBUG,\t\t/* u32, enum l2tp_debug_flags */\n+\tL2TP_ATTR_RECV_SEQ,\t\t/* u8 */\n+\tL2TP_ATTR_SEND_SEQ,\t\t/* u8 */\n+\tL2TP_ATTR_LNS_MODE,\t\t/* u8 */\n+\tL2TP_ATTR_USING_IPSEC,\t\t/* u8 */\n+\tL2TP_ATTR_RECV_TIMEOUT,\t\t/* msec */\n+\tL2TP_ATTR_FD,\t\t\t/* int */\n+\tL2TP_ATTR_IP_SADDR,\t\t/* u32 */\n+\tL2TP_ATTR_IP_DADDR,\t\t/* u32 */\n+\tL2TP_ATTR_UDP_SPORT,\t\t/* u16 */\n+\tL2TP_ATTR_UDP_DPORT,\t\t/* u16 */\n+\tL2TP_ATTR_MTU,\t\t\t/* u16 (not used) */\n+\tL2TP_ATTR_MRU,\t\t\t/* u16 (not used) */\n+\tL2TP_ATTR_STATS,\t\t/* nested */\n+\tL2TP_ATTR_IP6_SADDR,\t\t/* struct in6_addr */\n+\tL2TP_ATTR_IP6_DADDR,\t\t/* struct in6_addr */\n+\tL2TP_ATTR_UDP_ZERO_CSUM6_TX,\t/* flag */\n+\tL2TP_ATTR_UDP_ZERO_CSUM6_RX,\t/* flag */\n+\tL2TP_ATTR_PAD,\n+\t__L2TP_ATTR_MAX,\n+};\n+\n+#define L2TP_ATTR_MAX\t\t\t(__L2TP_ATTR_MAX - 1)\n+\n+/* Nested in L2TP_ATTR_STATS */\n+enum {\n+\tL2TP_ATTR_STATS_NONE,\t\t/* no data */\n+\tL2TP_ATTR_TX_PACKETS,\t\t/* u64 */\n+\tL2TP_ATTR_TX_BYTES,\t\t/* u64 */\n+\tL2TP_ATTR_TX_ERRORS,\t\t/* u64 */\n+\tL2TP_ATTR_RX_PACKETS,\t\t/* u64 */\n+\tL2TP_ATTR_RX_BYTES,\t\t/* u64 */\n+\tL2TP_ATTR_RX_SEQ_DISCARDS,\t/* u64 */\n+\tL2TP_ATTR_RX_OOS_PACKETS,\t/* u64 */\n+\tL2TP_ATTR_RX_ERRORS,\t\t/* u64 */\n+\tL2TP_ATTR_STATS_PAD,\n+\t__L2TP_ATTR_STATS_MAX,\n+};\n+\n+#define L2TP_ATTR_STATS_MAX\t\t(__L2TP_ATTR_STATS_MAX - 1)\n+\n+enum l2tp_pwtype {\n+\tL2TP_PWTYPE_NONE = 0x0000,\n+\tL2TP_PWTYPE_ETH_VLAN = 0x0004,\n+\tL2TP_PWTYPE_ETH = 0x0005,\n+\tL2TP_PWTYPE_PPP = 0x0007,\n+\tL2TP_PWTYPE_PPP_AC = 0x0008,\n+\tL2TP_PWTYPE_IP = 0x000b,\n+\t__L2TP_PWTYPE_MAX\n+};\n+\n+enum l2tp_l2spec_type {\n+\tL2TP_L2SPECTYPE_NONE,\n+\tL2TP_L2SPECTYPE_DEFAULT,\n+};\n+\n+enum l2tp_encap_type {\n+\tL2TP_ENCAPTYPE_UDP,\n+\tL2TP_ENCAPTYPE_IP,\n+};\n+\n+/* For L2TP_ATTR_DATA_SEQ. Unused. */\n+enum l2tp_seqmode {\n+\tL2TP_SEQ_NONE = 0,\n+\tL2TP_SEQ_IP = 1,\n+\tL2TP_SEQ_ALL = 2,\n+};\n+\n+/**\n+ * enum l2tp_debug_flags - debug message categories for L2TP tunnels/sessions\n+ *\n+ * @L2TP_MSG_DEBUG: verbose debug (if compiled in)\n+ * @L2TP_MSG_CONTROL: userspace - kernel interface\n+ * @L2TP_MSG_SEQ: sequence numbers\n+ * @L2TP_MSG_DATA: data packets\n+ */\n+enum l2tp_debug_flags {\n+\tL2TP_MSG_DEBUG\t\t= (1 << 0),\n+\tL2TP_MSG_CONTROL\t= (1 << 1),\n+\tL2TP_MSG_SEQ\t\t= (1 << 2),\n+\tL2TP_MSG_DATA\t\t= (1 << 3),\n+};\n+\n+/*\n+ * NETLINK_GENERIC related info\n+ */\n+#define L2TP_GENL_NAME\t\t\"l2tp\"\n+#define L2TP_GENL_VERSION\t0x1\n+#define L2TP_GENL_MCGROUP       \"l2tp\"\n+\n+#endif /* _UAPI_LINUX_L2TP_H_ */\ndiff --git a/src/basic/meson.build b/src/basic/meson.build\nindex 26c7fc42c76..67f04bcbc4b 100644\n--- a/src/basic/meson.build\n+++ b/src/basic/meson.build\n@@ -100,6 +100,7 @@ basic_sources = files('''\n         linux/if_tunnel.h\n         linux/in.h\n         linux/in6.h\n+        linux/l2tp.h\n         linux/libc-compat.h\n         linux/netdevice.h\n         linux/netlink.h\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/patches/systemd-0001-move-etc-systemd-system-to-storage-.config-system.d.patch",
    "content": "commit abce2c21148f981034acf143a3c12e5919949198\nAuthor: Lukas Rusak <lorusak@gmail.com>\nDate:   Mon Oct 9 15:26:58 2017 -0700\n\n    move /etc/systemd/system to /storage/.config/system.d\n\ndiff --git a/meson.build b/meson.build\nindex f7a610a..b1144a6 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -146,7 +146,7 @@ if pamconfdir == ''\n endif\n \n conf.set_quoted('PKGSYSCONFDIR',                              pkgsysconfdir)\n-conf.set_quoted('SYSTEM_CONFIG_UNIT_PATH',                    join_paths(pkgsysconfdir, 'system'))\n+conf.set_quoted('SYSTEM_CONFIG_UNIT_PATH',                    '/storage/.config/system.d')\n conf.set_quoted('SYSTEM_DATA_UNIT_PATH',                      systemunitdir)\n conf.set_quoted('SYSTEM_SYSVINIT_PATH',                       sysvinit_path)\n conf.set_quoted('SYSTEM_SYSVRCND_PATH',                       sysvrcnd_path)\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/patches/systemd-0002-move-hwdb.bin-to-run.patch",
    "content": "From bf2776b7f9403057cb82c2697e4fca8b554db4bd Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Thu, 11 Apr 2019 20:00:05 +0100\nSubject: [PATCH] move hwdb.bin to /run\n\n---\n src/libsystemd/sd-hwdb/hwdb-util.c   | 2 +-\n src/libsystemd/sd-hwdb/sd-hwdb.c     | 2 +-\n units/systemd-hwdb-update.service.in | 2 +-\n 3 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c\nindex c83575c..6285f3d 100644\n--- a/src/libsystemd/sd-hwdb/hwdb-util.c\n+++ b/src/libsystemd/sd-hwdb/hwdb-util.c\n@@ -20,7 +20,7 @@\n #include \"strv.h\"\n #include \"tmpfile-util.h\"\n \n-static const char *default_hwdb_bin_dir = \"/etc/udev\";\n+static const char *default_hwdb_bin_dir = \"/run\";\n static const char * const conf_file_dirs[] = {\n         \"/etc/udev/hwdb.d\",\n         UDEVLIBEXECDIR \"/hwdb.d\",\ndiff --git a/src/libsystemd/sd-hwdb/sd-hwdb.c b/src/libsystemd/sd-hwdb/sd-hwdb.c\nindex 79fe1a8..0acbf71 100644\n--- a/src/libsystemd/sd-hwdb/sd-hwdb.c\n+++ b/src/libsystemd/sd-hwdb/sd-hwdb.c\n@@ -299,7 +299,7 @@ static int trie_search_f(sd_hwdb *hwdb, const char *search) {\n \n static const char hwdb_bin_paths[] =\n         \"/etc/systemd/hwdb/hwdb.bin\\0\"\n-        \"/etc/udev/hwdb.bin\\0\"\n+        \"/run/hwdb.bin\\0\"\n         \"/usr/lib/systemd/hwdb/hwdb.bin\\0\"\n #if HAVE_SPLIT_USR\n         \"/lib/systemd/hwdb/hwdb.bin\\0\"\ndiff --git a/units/systemd-hwdb-update.service.in b/units/systemd-hwdb-update.service.in\nindex 259fe0d..18d617f 100644\n--- a/units/systemd-hwdb-update.service.in\n+++ b/units/systemd-hwdb-update.service.in\n@@ -16,7 +16,7 @@ After=systemd-remount-fs.service\n Before=sysinit.target shutdown.target systemd-update-done.service\n ConditionNeedsUpdate=/etc\n ConditionPathExists=|!@udevlibexecdir@/hwdb.bin\n-ConditionPathExists=|/etc/udev/hwdb.bin\n+ConditionPathExists=|/run/hwdb.bin\n ConditionDirectoryNotEmpty=|/etc/udev/hwdb.d/\n \n [Service]\n-- \n2.14.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/patches/systemd-0003-remove-nonexistant-dependency.patch",
    "content": "From 382709612ae03d6f81049ac72ac2dabd7613763d Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Wed, 18 Feb 2015 18:23:47 +0200\nSubject: [PATCH 7/8] remove nonexistant dependency\n\n---\n units/graphical.target |    1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/units/graphical.target b/units/graphical.target\nindex 87be97e..b01b46d 100644\n--- a/units/graphical.target\n+++ b/units/graphical.target\n@@ -9,7 +9,6 @@\n Description=Graphical Interface\n Documentation=man:systemd.special(7)\n Requires=multi-user.target\n-Wants=display-manager.service\n Conflicts=rescue.service rescue.target\n After=multi-user.target rescue.service rescue.target display-manager.service\n AllowIsolate=yes\n-- \n1.7.10.4\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/patches/systemd-0200-persist-persistent-timer-stamps.patch",
    "content": "From c1bcb16c35724404d30fab53017b757c886e9ab7 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Mon, 8 Jan 2018 13:46:51 +0000\nSubject: [PATCH] timers: use a persistent filesystem for persistent timers\n\n---\n src/core/timer.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/src/core/timer.c b/src/core/timer.c\nindex 03935ee..bfd5c02 100644\n--- a/src/core/timer.c\n+++ b/src/core/timer.c\n@@ -154,11 +154,11 @@ static int timer_setup_persistent(Timer *t) {\n \n         if (MANAGER_IS_SYSTEM(UNIT(t)->manager)) {\n \n-                r = unit_require_mounts_for(UNIT(t), \"/var/lib/systemd/timers\", UNIT_DEPENDENCY_FILE);\n+                r = unit_require_mounts_for(UNIT(t), \"/storage/.cache/systemd/timers\", UNIT_DEPENDENCY_FILE);\n                 if (r < 0)\n                         return r;\n \n-                t->stamp_path = strappend(\"/var/lib/systemd/timers/stamp-\", UNIT(t)->id);\n+                t->stamp_path = strappend(\"/storage/.cache/systemd/timers/stamp-\", UNIT(t)->id);\n         } else {\n                 const char *e;\n \n-- \n2.14.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/patches/systemd-0300-config-env-unhide-cursor.patch",
    "content": "From 49285dae6756b22bc6881c04939f7c43c35b5506 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Sat, 29 Jun 2019 00:26:41 +0100\nSubject: [PATCH] debug-shell: configure environment, unhide cursor\n\n---\n units/debug-shell.service.in | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/units/debug-shell.service.in b/units/debug-shell.service.in\nindex 1127e68..4c3e971 100644\n--- a/units/debug-shell.service.in\n+++ b/units/debug-shell.service.in\n@@ -16,8 +16,8 @@ IgnoreOnIsolate=yes\n ConditionPathExists=@DEBUGTTY@\n \n [Service]\n-Environment=TERM=linux\n-ExecStart=@SUSHELL@\n+Environment=ENV=/etc/profile\n+ExecStart=/bin/sh -c 'echo -en \"\\033[?25h\"; exec /bin/sh'\n Restart=always\n RestartSec=0\n StandardInput=tty\n-- \n2.14.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/patches/systemd-0400-eat-up-rrdrand-on-amd.patch",
    "content": "From 0c0e3b8ec413a5b8151ad111b08c84ad07f1891b Mon Sep 17 00:00:00 2001\nFrom: Lennart Poettering <lennart@poettering.net>\nDate: Tue, 7 May 2019 18:51:26 -0400\nSubject: [PATCH 1/3] random-util: rename \"err\" to \"success\"\n\nAfter all rdrand returns 1 on success, and 0 on failure, hence let's\nname this accordingly.\n---\n src/basic/random-util.c | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/src/basic/random-util.c b/src/basic/random-util.c\nindex ca25fd2..f992c0c 100644\n--- a/src/basic/random-util.c\n+++ b/src/basic/random-util.c\n@@ -34,7 +34,7 @@ int rdrand(unsigned long *ret) {\n \n #if defined(__i386__) || defined(__x86_64__)\n         static int have_rdrand = -1;\n-        unsigned char err;\n+        uint8_t success;\n \n         if (have_rdrand < 0) {\n                 uint32_t eax, ebx, ecx, edx;\n@@ -54,9 +54,9 @@ int rdrand(unsigned long *ret) {\n         asm volatile(\"rdrand %0;\"\n                      \"setc %1\"\n                      : \"=r\" (*ret),\n-                       \"=qm\" (err));\n-        msan_unpoison(&err, sizeof(err));\n-        if (!err)\n+                       \"=qm\" (success));\n+        msan_unpoison(&success, sizeof(sucess));\n+        if (!success)\n                 return -EAGAIN;\n \n         return 0;\n-- \n2.14.1\n\n\nFrom 78b5b76ad2c82a9d184dfa777ac116bdf22189eb Mon Sep 17 00:00:00 2001\nFrom: Evgeny Vereshchagin <evvers@ya.ru>\nDate: Wed, 8 May 2019 15:50:53 +0200\nSubject: [PATCH 2/3] util-lib: fix a typo in rdrand\n\nOtherwise, the fuzzers will fail to compile with MSan:\n```\n../../src/systemd/src/basic/random-util.c:64:40: error: use of undeclared identifier 'sucess'; did you mean 'success'?\n        msan_unpoison(&success, sizeof(sucess));\n                                       ^~~~~~\n                                       success\n../../src/systemd/src/basic/alloc-util.h:169:50: note: expanded from macro 'msan_unpoison'\n                                                 ^\n../../src/systemd/src/basic/random-util.c:38:17: note: 'success' declared here\n        uint8_t success;\n                ^\n1 error generated.\n[80/545] Compiling C object 'src/basic/a6ba3eb@@basic@sta/process-util.c.o'.\nninja: build stopped: subcommand failed.\nFuzzers build failed\n```\n---\n src/basic/random-util.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/src/basic/random-util.c b/src/basic/random-util.c\nindex f992c0c..d67aa09 100644\n--- a/src/basic/random-util.c\n+++ b/src/basic/random-util.c\n@@ -55,7 +55,7 @@ int rdrand(unsigned long *ret) {\n                      \"setc %1\"\n                      : \"=r\" (*ret),\n                        \"=qm\" (success));\n-        msan_unpoison(&success, sizeof(sucess));\n+        msan_unpoison(&success, sizeof(success));\n         if (!success)\n                 return -EAGAIN;\n \n-- \n2.14.1\n\n\nFrom b0497c3005cc3a7975362d7e70d9ae2d0ffa6154 Mon Sep 17 00:00:00 2001\nFrom: Lennart Poettering <lennart@poettering.net>\nDate: Fri, 10 May 2019 15:16:16 -0400\nSubject: [PATCH 3/3] random-util: eat up bad RDRAND values seen on AMD CPUs\n\nAn ugly, ugly work-around for #11810. And no, we shouldn't have to do\nthis. This is something for AMD, the firmware or the kernel to\nfix/work-around, not us. But nonetheless, this should do it for now.\n\nFixes: #11810\n---\n src/basic/random-util.c | 15 ++++++++++++++-\n 1 file changed, 14 insertions(+), 1 deletion(-)\n\ndiff --git a/src/basic/random-util.c b/src/basic/random-util.c\nindex d67aa09..bd148ee 100644\n--- a/src/basic/random-util.c\n+++ b/src/basic/random-util.c\n@@ -34,6 +34,7 @@ int rdrand(unsigned long *ret) {\n \n #if defined(__i386__) || defined(__x86_64__)\n         static int have_rdrand = -1;\n+        unsigned long v;\n         uint8_t success;\n \n         if (have_rdrand < 0) {\n@@ -53,12 +54,24 @@ int rdrand(unsigned long *ret) {\n \n         asm volatile(\"rdrand %0;\"\n                      \"setc %1\"\n-                     : \"=r\" (*ret),\n+                     : \"=r\" (v),\n                        \"=qm\" (success));\n         msan_unpoison(&success, sizeof(success));\n         if (!success)\n                 return -EAGAIN;\n \n+        /* Apparently on some AMD CPUs RDRAND will sometimes (after a suspend/resume cycle?) report success\n+         * via the carry flag but nonetheless return the same fixed value -1 in all cases. This appears to be\n+         * a bad bug in the CPU or firmware. Let's deal with that and work-around this by explicitly checking\n+         * for this special value (and also 0, just to be sure) and filtering it out. This is a work-around\n+         * only however and something AMD really should fix properly. The Linux kernel should probably work\n+         * around this issue by turning off RDRAND altogether on those CPUs. See:\n+         * https://github.com/systemd/systemd/issues/11810 */\n+        if (v == 0 || v == ULONG_MAX)\n+                return log_debug_errno(SYNTHETIC_ERRNO(EUCLEAN),\n+                                       \"RDRAND returned suspicious value %lx, assuming bad hardware RNG, not using value.\", v);\n+\n+        *ret = v;\n         return 0;\n #else\n         return -EOPNOTSUPP;\n-- \n2.14.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/patches/systemd-0500-Add-working-directory-storage-for-debug-shell.patch",
    "content": "From c38a2fc53e5ebb3fc4637a168408591003aad0fb Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Mon, 30 Sep 2019 12:20:00 +0200\nSubject: [PATCH] Add working directory '/storage' for debug-shell\n\n---\n units/debug-shell.service.in | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/units/debug-shell.service.in b/units/debug-shell.service.in\nindex 9f3868e106..d5f93f18a6 100644\n--- a/units/debug-shell.service.in\n+++ b/units/debug-shell.service.in\n@@ -16,6 +16,7 @@ IgnoreOnIsolate=yes\n ConditionPathExists=@DEBUGTTY@\n \n [Service]\n+WorkingDirectory=/storage\n Environment=ENV=/etc/profile\n ExecStart=/bin/sh -c 'echo -en \"\\033[?25h\"; exec /bin/sh'\n Restart=always\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/patches/systemd-0900-backport-do-not-update-exec-deps-on-mountinfo-changes.patch",
    "content": "From 9074b57fd5a5c8ae20b15b59ed9abe9a7f0147b0 Mon Sep 17 00:00:00 2001\nFrom: Lennart Poettering <lennart@poettering.net>\nDate: Fri, 15 Nov 2019 14:00:54 +0100\nSubject: [PATCH] mount: do not update exec deps on mountinfo changes\n\nFixes: #13978\n---\n src/core/mount.c | 42 ++++++++++++++++++++++++++++--------------\n 1 file changed, 28 insertions(+), 14 deletions(-)\n\ndiff --git a/src/core/mount.c b/src/core/mount.c\nindex 1d1d2683da4..dfed691c43f 100644\n--- a/src/core/mount.c\n+++ b/src/core/mount.c\n@@ -550,6 +550,32 @@ static int mount_verify(Mount *m) {\n         return 0;\n }\n \n+static int mount_add_non_exec_dependencies(Mount *m) {\n+        int r;\n+        assert(m);\n+\n+        /* Adds in all dependencies directly responsible for ordering the mount, as opposed to dependencies\n+         * resulting from the ExecContext and such. */\n+\n+        r = mount_add_device_dependencies(m);\n+        if (r < 0)\n+                return r;\n+\n+        r = mount_add_mount_dependencies(m);\n+        if (r < 0)\n+                return r;\n+\n+        r = mount_add_quota_dependencies(m);\n+        if (r < 0)\n+                return r;\n+\n+        r = mount_add_default_dependencies(m);\n+        if (r < 0)\n+                return r;\n+\n+        return 0;\n+}\n+\n static int mount_add_extras(Mount *m) {\n         Unit *u = UNIT(m);\n         int r;\n@@ -577,18 +603,6 @@ static int mount_add_extras(Mount *m) {\n                         return r;\n         }\n \n-        r = mount_add_device_dependencies(m);\n-        if (r < 0)\n-                return r;\n-\n-        r = mount_add_mount_dependencies(m);\n-        if (r < 0)\n-                return r;\n-\n-        r = mount_add_quota_dependencies(m);\n-        if (r < 0)\n-                return r;\n-\n         r = unit_patch_contexts(u);\n         if (r < 0)\n                 return r;\n@@ -601,7 +615,7 @@ static int mount_add_extras(Mount *m) {\n         if (r < 0)\n                 return r;\n \n-        r = mount_add_default_dependencies(m);\n+        r = mount_add_non_exec_dependencies(m);\n         if (r < 0)\n                 return r;\n \n@@ -1574,7 +1588,7 @@ static int mount_setup_existing_unit(\n \n                 unit_remove_dependencies(u, UNIT_DEPENDENCY_MOUNTINFO_IMPLICIT);\n \n-                r = mount_add_extras(MOUNT(u));\n+                r = mount_add_non_exec_dependencies(MOUNT(u));\n                 if (r < 0)\n                         return r;\n         }\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/profile.d/90-systemd.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nexport SYSTEMD_COLORS=0\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/scripts/kernel-overlays-setup",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nSYSTEM_OVERLAYS_DIR=/usr/lib/kernel-overlays\nOVERLAY_CONFIG_DIR=/storage/.cache/kernel-overlays\nKVER=$(uname -r)\nMODULES_DIR=\"/var/lib/modules/${KVER}\"\nFIRMWARE_DIR=\"/var/lib/firmware\"\nUSER_FIRMWARE_DIR=\"/storage/.config/firmware\"\n\nmkdir -p \"${MODULES_DIR}\"\nmkdir -p \"${FIRMWARE_DIR}\"\nmkdir -p \"${OVERLAY_CONFIG_DIR}\"\n\nlog() {\n  echo \"kernel-overlays-setup: $@\" > /dev/kmsg\n}\n\napply_overlay() {\n  case \"$1\" in\n    /*)\n      modules_overlay_dir=\"${1}/lib/modules/${KVER}\"\n      firmware_overlay_dir=\"${1}/lib/firmware\"\n      ;;\n    *)\n      modules_overlay_dir=\"${SYSTEM_OVERLAYS_DIR}/${1}/lib/modules/${KVER}\"\n      firmware_overlay_dir=\"${SYSTEM_OVERLAYS_DIR}/${1}/lib/firmware\"\n      ;;\n  esac\n\n  if [ -d \"${modules_overlay_dir}\" ] ; then\n    GOT_MODULE_OVERLAY=\"yes\"\n\n    if cp -rfs \"${modules_overlay_dir}\"/* \"${MODULES_DIR}\" ; then\n      log \"added modules from $modules_overlay_dir\"\n    else\n      log \"failed to add modules from $modules_overlay_dir\"\n    fi\n  fi\n\n  if [ -d \"${firmware_overlay_dir}\" ] ; then\n    if cp -rfs \"${firmware_overlay_dir}\"/* \"${FIRMWARE_DIR}\" ; then\n      log \"added firmware from $firmware_overlay_dir\"\n    else\n      log \"failed to add firmware from $firmware_overlay_dir\"\n    fi\n  fi\n}\n\n# setup system base modules\n\nlog \"setup base modules\"\napply_overlay base\n\n# apply user-configured module overlays\n\nif [ -d \"${OVERLAY_CONFIG_DIR}\" ] ; then\n  log \"adding overlays from ${OVERLAY_CONFIG_DIR}\"\n  GOT_MODULE_OVERLAY=\"no\"\n\n  for conf in \"${OVERLAY_CONFIG_DIR}/\"*.conf ; do\n    if [ -e \"$conf\" ] ; then\n      log \"processing conf $conf\"\n      overlay=$(cat \"$conf\")\n      [ -n \"$overlay\" ] && apply_overlay \"$overlay\"\n    fi\n  done\n\n  if [ \"yes\" = \"$GOT_MODULE_OVERLAY\" ] ; then\n    log \"running depmod\"\n    /usr/sbin/depmod -a\n  fi\nfi\n\nif [ -d \"${USER_FIRMWARE_DIR}\" ] && [ -n \"$(ls ${USER_FIRMWARE_DIR})\" ] ; then\n  if cp -rfs \"${USER_FIRMWARE_DIR}\"/* \"${FIRMWARE_DIR}\" ; then\n    log \"added firmware from ${USER_FIRMWARE_DIR}\"\n  else\n    log \"failed to add firmware from ${USER_FIRMWARE_DIR}\"\n  fi\nfi\n\nlog \"done\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/scripts/network-base-setup",
    "content": "#!/bin/sh\n\n# setup hostname\nif [ -f /storage/.cache/hostname ]; then\n  cat /storage/.cache/hostname > /proc/sys/kernel/hostname\nfi\n\n# setup /etc/hosts\nrm -f /run/libreelec/hosts\nif [ -f /storage/.config/hosts.conf ]; then\n  cat /storage/.config/hosts.conf > /run/libreelec/hosts\nfi\n\n# setup /etc/resolv.conf\nrm -f /run/libreelec/resolv.conf\nif [ -f /storage/.config/resolv.conf ]; then\n  cat /storage/.config/resolv.conf > /run/libreelec/resolv.conf\nelif [ -f /dev/.kernel_ipconfig -a -f /proc/net/pnp ]; then\n  cat /proc/net/pnp > /run/libreelec/resolv.conf\nelse\n  cat << EOF > /run/libreelec/resolv.conf\nnameserver 8.8.8.8\nnameserver 8.8.4.4\nEOF\nfi\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/scripts/systemd-machine-id-setup",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n# remove old machine-id file\n[[ -f \"/storage/.cache/machine-id\" ]] && rm /storage/.cache/machine-id\n\n# test systemd-machine-id exists and is 32 hex chars or generate a new uuid\nMACHINEID=\"$(cat /storage/.cache/systemd-machine-id 2>/dev/null)\"\n[ \"${#MACHINEID}\" != \"32\" ] && MACHINEID=\n[[ \"${MACHINEID//[a-f0-9]/}\" != \"\" ]] && MACHINEID=\n[ -z \"${MACHINEID}\" ] && MACHINEID=$(/usr/bin/dbus-uuidgen)\n\n# persist uuid\nmkdir -p /storage/.cache\n  echo \"$MACHINEID\" > /storage/.cache/systemd-machine-id\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/scripts/systemd-timesyncd-setup",
    "content": "#!/bin/sh\nKERNEL_NTP=\"${1:-/proc/net/ipconfig/ntp_servers}\"\nNTP_SERVERS=\"\"\nif [ -f /proc/net/ipconfig/ntp_servers ]; then\n  for srv in $(cat /proc/net/ipconfig/ntp_servers); do\n    if [ -n \"$srv\" -a \"$srv\" != \"0.0.0.0\" ]; then\n      if [ -z \"$NTP_SERVERS\" ]; then\n        NTP_SERVERS=\"$srv\"\n      else\n        NTP_SERVERS=\"${NTP_SERVERS} $srv\"\n      fi\n    fi\n  done\n  if [ -n \"$NTP_SERVERS\" ]; then\n    mkdir -p /run/systemd/timesyncd.conf.d/\n    cat << EOF > /run/systemd/timesyncd.conf.d/kernel-ntp-servers.conf\n[Time]\nNTP=$NTP_SERVERS\nEOF\n  fi\nfi\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/scripts/usercache-setup",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n# Fix bug in older versions creating file /storage/.cache/services\n[ -f /storage/.cache/services ] && rm /storage/.cache/services && mkdir -p /storage/.cache/services\n\n# Copy cache files, but don't overwrite\nfalse | cp -iRp /usr/cache/* /storage/.cache/ &>/dev/null\n\n# Merge default and custom shadow file details\nif [ -f /storage/.cache/shadow -a -f /usr/cache/shadow ]; then\n  # Get existing root details (possibly user defined)\n  userroot=\"$(grep \"^root:\" /storage/.cache/shadow)\"\n\n  # Overwrite users shadow file with default details, replacing root with any existing value\n  # If current file is garbage (ie. missing root) then replace it\n  if [ -n \"${userroot}\" ]; then\n    sed -e \"s ^root:.* ${userroot} \" /usr/cache/shadow >/storage/.cache/shadow\n  else\n    cp -fp /usr/cache/shadow /storage/.cache/shadow\n  fi\n\n  # Make sure we have the correct permission\n  chmod 000 /storage/.cache/shadow\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/scripts/userconfig-setup",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n# Remove those sample files that we manage\nfor sample in $(find /storage/.config -name '*.sample' 2>/dev/null); do\n  [ -f /usr/config/${sample:16} ] && rm -f ${sample}\ndone\n\n# Copy config files, but don't overwrite - this should replace our sample files\nfalse | cp -iRp /usr/config/* /storage/.config/ &>/dev/null\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/system.d/debugconfig.service",
    "content": "[Unit]\nDescription=Setup debug config\nDefaultDependencies=no\nAfter=systemd-tmpfiles-setup.service\nConditionKernelCommandLine=|debugging\nConditionPathExists=|/storage/.cache/debug.libreelec\n\n[Service]\nType=oneshot\nExecStart=/bin/sh -c 'cp /usr/share/debugconf/*.conf /run/libreelec/debug'\nRemainAfterExit=yes\n\n[Install]\nWantedBy=sysinit.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/system.d/flash.mount.d/dependencies.conf",
    "content": "[Unit]\nDefaultDependencies=no\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/system.d/hwdb.service",
    "content": "[Unit]\nDescription=Update hwdb.bin\nDefaultDependencies=no\nAfter=systemd-tmpfiles-setup.service\nBefore=systemd-udevd.service\n\n[Service]\nType=oneshot\nExecStart=-/usr/bin/udevadm hwdb --update\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/system.d/kernel-overlays.service",
    "content": "[Unit]\nDescription=Create kernel modules tree from overlays\nDefaultDependencies=no\nAfter=var.mount\nBefore=systemd-udevd.service systemd-udev-trigger.service systemd-modules-load.service systemd-remount-fs.service swap.service machine-id.service kmod-static-nodes.service\n\n[Service]\nType=oneshot\nExecStart=/usr/sbin/kernel-overlays-setup\n\n[Install]\nWantedBy=local-fs.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/system.d/machine-id.service",
    "content": "[Unit]\nDescription=Setup machine-id\nDefaultDependencies=no\nBefore=systemd-journald.service systemd-tmpfiles-setup-dev.service\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/systemd-machine-id-setup\nRemainAfterExit=yes\n\n[Install]\nWantedBy=sysinit.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/system.d/network-base.service",
    "content": "[Unit]\nDescription=Base Network Configuration\nDefaultDependencies=no\nAfter=local-fs.target systemd-tmpfiles-setup.service userconfig.service\n\n[Service]\nType=oneshot\nExecStart=/usr/sbin/network-base-setup\nRemainAfterExit=yes\n\n[Install]\nWantedBy=network.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/system.d/storage.mount.d/dependencies.conf",
    "content": "[Unit]\nDefaultDependencies=no\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/system.d/systemd-timesyncd-setup.service",
    "content": "[Unit]\nDescription=Setup NTP servers for timesyncd\nDefaultDependencies=no\nAfter=systemd-remount-fs.service systemd-sysusers.service\n\n[Service]\nType=oneshot\nExecStart=/usr/sbin/systemd-timesyncd-setup\nRemainAfterExit=yes\n\n[Install]\nWantedBy=sysinit.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/system.d/systemd-timesyncd.service.d/depend-on-kernel-ip-config.conf",
    "content": "[Unit]\nConditionPathExists=/dev/.kernel_ipconfig\nAfter=systemd-timesyncd-setup.service network-base.service\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/system.d/usercache.service",
    "content": "[Unit]\nDescription=Setup User cache dir\nDefaultDependencies=no\nAfter=systemd-tmpfiles-setup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/usercache-setup\nRemainAfterExit=yes\n\n[Install]\nWantedBy=sysinit.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/system.d/userconfig.service",
    "content": "[Unit]\nDescription=Setup User config dir\nDefaultDependencies=no\nAfter=systemd-tmpfiles-setup.service\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/userconfig-setup\nRemainAfterExit=yes\n\n[Install]\nWantedBy=sysinit.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/tmpfiles.d/z_01_openelec.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nd    /run/libreelec       0755 root root - -\nd    /run/libreelec/debug 0755 root root - -\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/udev.d/51-these-are-not-joysticks.rules",
    "content": "# /etc/udev/rules.d/51-these-are-not-joysticks.rules\n#\n# This file is auto-generated. For more information:\n# https://github.com/denilsonsa/udev-joystick-blacklist\n\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"009d\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"009d\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"00b0\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"00b0\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"00b4\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"00b4\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"0730\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"0730\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"0745\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"0745\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"0748\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"0748\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"0750\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"0750\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"0768\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"0768\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"0773\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"0773\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"07a5\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"07a5\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"07b2\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"07b2\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"0800\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"045e\", ATTRS{idProduct}==\"0800\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"c30a\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"046d\", ATTRS{idProduct}==\"c30a\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"04d9\", ATTRS{idProduct}==\"a0df\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"04d9\", ATTRS{idProduct}==\"a0df\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0010\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0010\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0011\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0011\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0012\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0012\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0013\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0013\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0014\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0014\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0015\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0015\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0016\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0016\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0017\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0017\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0018\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0018\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0019\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"0019\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"00d1\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"00d1\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"030e\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"056a\", ATTRS{idProduct}==\"030e\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"054f\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"054f\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"1410\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"1410\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"3043\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"3043\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"31b5\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"31b5\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"3997\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"3997\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"3f8b\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"3f8b\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"51f4\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"51f4\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"5589\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"5589\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"7b22\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"7b22\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"7f2d\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"7f2d\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"8090\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"8090\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"9033\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"9033\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"9066\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"9066\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"9090\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"9090\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"90c0\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"90c0\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"f012\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"f012\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"f32a\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"f32a\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"f613\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"f613\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"f624\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"09da\", ATTRS{idProduct}==\"f624\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"1b1c\", ATTRS{idProduct}==\"1b3c\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"1b1c\", ATTRS{idProduct}==\"1b3c\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"1d57\", ATTRS{idProduct}==\"ad03\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"1d57\", ATTRS{idProduct}==\"ad03\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"1e7d\", ATTRS{idProduct}==\"2e4a\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"1e7d\", ATTRS{idProduct}==\"2e4a\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"20a0\", ATTRS{idProduct}==\"422d\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"20a0\", ATTRS{idProduct}==\"422d\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"2516\", ATTRS{idProduct}==\"001f\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"2516\", ATTRS{idProduct}==\"001f\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"2516\", ATTRS{idProduct}==\"0028\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{idVendor}==\"2516\", ATTRS{idProduct}==\"0028\", KERNEL==\"js[0-9]*\", MODE=\"0000\", ENV{ID_INPUT_JOYSTICK}=\"\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/udev.d/60-not-joysticks.rules",
    "content": "SUBSYSTEM==\"input\", ATTRS{name}==\"aml_keypad\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\nSUBSYSTEM==\"input\", ATTRS{name}==\"Remote+\", ENV{ID_INPUT_JOYSTICK}==\"?*\", ENV{ID_INPUT_JOYSTICK}=\"\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/systemd/udev.d/80-clock.rules",
    "content": "ACTION==\"add\", SUBSYSTEM==\"rtc\", RUN+=\"/sbin/hwclock --hctosys --utc --rtc=/dev/%k\"\nACTION==\"add\", ENV{MAJOR}==\"10\", ENV{MINOR}==\"135\", RUN+=\"/sbin/hwclock --hctosys --utc --rtc=/dev/%k\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/u-boot/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot\"\nPKG_VERSION=\"1.0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_CANUPDATE=\"${PROJECT}*\"\n[ ${PROJECT} = \"Amlogic-ce\" ] && PKG_CANUPDATE=\"${DEVICE}*\"\nPKG_NEED_UNPACK=\"$PROJECT_DIR/$PROJECT/bootloader \"\n\nfor PKG_SUBDEVICE in $SUBDEVICES; do\n  PKG_DEPENDS_TARGET+=\" u-boot-${PKG_SUBDEVICE}\"\n  PKG_NEED_UNPACK+=\" $(get_pkg_directory u-boot-${PKG_SUBDEVICE})\"\ndone\n\nmake_target() {\n  : # nothing\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/share/bootloader\n\n  # Always install the update script\n  find_file_path bootloader/update.sh && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n  sed -e \"s/@KERNEL_NAME@/$KERNEL_NAME/g\" \\\n      -e \"s/@LEGACY_KERNEL_NAME@/$LEGACY_KERNEL_NAME/g\" \\\n      -e \"s/@LEGACY_DTB_NAME@/$LEGACY_DTB_NAME/g\" \\\n      -i $INSTALL/usr/share/bootloader/update.sh\n\n  # Always install the canupdate script\n  if find_file_path bootloader/canupdate.sh; then\n    cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n  fi\n\n  for PKG_SUBDEVICE in $SUBDEVICES; do\n    find_file_path bootloader/${PKG_SUBDEVICE}_boot.ini && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n    if [ $PKG_SUBDEVICE = \"Odroid_C2\" ]; then\n      PKG_UBOOTBIN=$(get_build_dir u-boot-${PKG_SUBDEVICE})/u-boot.bin\n    else\n      PKG_UBOOTBIN=$(get_build_dir u-boot-${PKG_SUBDEVICE})/fip/u-boot.bin.sd.bin\n    fi\n    cp -av ${PKG_UBOOTBIN} $INSTALL/usr/share/bootloader/${PKG_SUBDEVICE}_u-boot\n    PKG_CANUPDATE+=\"|${PKG_SUBDEVICE}*\"\n  done\n  find_file_path bootloader/config.ini && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n    sed -e \"s/@PROJECT@/${PKG_CANUPDATE}/g\" \\\n        -i $INSTALL/usr/share/bootloader/canupdate.sh\n  find_file_path splash/boot-logo.bmp.gz && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n  find_file_path splash/boot-logo-1080.bmp.gz && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n  find_file_path splash/timeout-logo-1080.bmp.gz && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/u-boot-LePotato/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-LePotato\"\nPKG_VERSION=\"de12d9be7324f7d26b8721de1eb64715b444bdad\"\nPKG_SHA256=\"f71d5ecb5e11f6f531ae0182c8f1de55468f990c46afdc5a8361b5311bf7da74\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\nconfigure_package() {\n  PKG_UBOOT_CONFIG=\"libretech_cc_defconfig\"\n}\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/gx*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make $PKG_UBOOT_CONFIG\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"$HOST_CC\" HOSTSTRIP=\"true\"\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/u-boot-Odroid_C2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot-Odroid_C2\"\nPKG_VERSION=\"a2eb29f823e8cfc6fee325f69116334c6f1ba6c0\"\nPKG_SHA256=\"a7b9d7dc7f3048dc5479dc90c094760d03f4a8e83db86823d8f951f53641cf69\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host u-boot_firmware\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\nconfigure_package() {\n  PKG_UBOOT_CONFIG=\"odroidc2_defconfig\"\n}\n\npre_configure_target() {\n  cp -r $(get_build_dir u-boot_firmware)/* $PKG_BUILD\n}\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/gx*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make $PKG_UBOOT_CONFIG\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"$HOST_CC\" HOSTSTRIP=\"true\"\n}\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/u-boot-tools-aml/config/fw_env.config",
    "content": "# Configuration file for fw_(printenv/setenv) utility.\n# Up to two entries are valid, in this case the redundant\n# environment sector is assumed present.\n# Notice, that the \"Number of sectors\" is not required on NOR and SPI-dataflash.\n# Futhermore, if the Flash sector size is ommitted, this value is assumed to\n# be the same as the Environment size, which is valid for NOR and SPI-dataflash\n\n# NOR example\n# MTD device name\tDevice offset\tEnv. size\tFlash sector size\tNumber of sectors\n#/dev/mtd1\t\t0x0000\t\t0x4000\t\t0x4000\n#/dev/mtd2\t\t0x0000\t\t0x4000\t\t0x4000\n\n# MTD SPI-dataflash example\n# MTD device name\tDevice offset\tEnv. size\tFlash sector size\tNumber of sectors\n#/dev/mtd5\t\t0x4200\t\t0x4200\n#/dev/mtd6\t\t0x4200\t\t0x4200\n\n# NAND example\n#/dev/mtd0\t\t0x4000\t\t0x4000\t\t0x20000\t\t\t2\n\n# Block device example\n#/dev/mmcblk0\t\t0xc0000\t\t0x20000\n\n# VFAT example\n#/boot/uboot.env\t0x0000          0x4000\n\n# Amlogic NAND\n/dev/nand_env\t\t0x000000\t0x10000 \t0x10000\n\n# Amlogic eMMC\n/dev/env\t\t0x000000\t0x10000 \t0x10000\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/u-boot-tools-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"u-boot-tools-aml\"\nPKG_VERSION=\"2016.03\"\nPKG_SHA256=\"e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"ftp://ftp.denx.de/pub/u-boot/u-boot-$PKG_VERSION.tar.bz2\"\nPKG_DEPENDS_HOST=\"gcc:host\"\nPKG_DEPENDS_TARGET=\"toolchain u-boot-tools-aml:host\"\nPKG_LICENSE=\"GPL\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\n\nmake_host() {\n  make mrproper\n  make dummy_defconfig\n  make tools-only\n}\n\nmake_target() {\n  CROSS_COMPILE=\"$TARGET_PREFIX\" LDFLAGS=\"\" ARCH=arm make dummy_defconfig\n  CROSS_COMPILE=\"$TARGET_PREFIX\" LDFLAGS=\"\" ARCH=arm make env\n}\n\nmakeinstall_host() {\n  mkdir -p $TOOLCHAIN/bin\n    cp tools/mkimage $TOOLCHAIN/bin\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/etc\n    cp $PKG_DIR/config/fw_env.config $INSTALL/etc/fw_env.config\n\n  mkdir -p $INSTALL/usr/sbin\n    cp tools/env/fw_printenv $INSTALL/usr/sbin/fw_printenv\n    cp tools/env/fw_printenv $INSTALL/usr/sbin/fw_setenv\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/u-boot-tools-aml/patches/u-boot-tools-0001-dummy_defconfig.patch",
    "content": "--- a/configs/dummy_defconfig\n+++ b/configs/dummy_defconfig\n@@ -0,0 +1,2 @@\n+CONFIG_ARM=y\n+\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/u-boot-tools-aml/patches/u-boot-tools-0002-allow-multiple-entries.patch",
    "content": "--- u-boot-tools-2016.01/tools/env/fw_env.c.orig\t2016-01-12 15:06:54.000000000 +0100\n+++ u-boot-tools-2016.01/tools/env/fw_env.c\t2016-03-22 09:47:07.014381827 +0100\n@@ -1453,6 +1453,7 @@\n \tint rc;\n \tchar dump[128];\n \tchar *devname;\n+\tint fd_test;\n \n \tfp = fopen (fname, \"r\");\n \tif (fp == NULL)\n@@ -1473,6 +1474,12 @@\n \t\tif (rc < 3)\n \t\t\tcontinue;\n \n+\t\tfd_test = open (devname, O_RDWR);\n+\t\tif (fd_test < 0)\n+\t\t\tcontinue;\n+\t\tif (close (fd_test))\n+\t\t\tcontinue;\n+\n \t\tDEVNAME(i) = devname;\n \n \t\tif (rc < 4)\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/u-boot-tools-aml/patches/u-boot-tools-0003-nand_env-hack.patch",
    "content": "diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c\nindex 8b0317a..575f12a 100644\n--- a/tools/env/fw_env.c\n+++ b/tools/env/fw_env.c\n@@ -888,12 +888,13 @@ static int flash_write_buf (int dev, int fd, void *buf, size_t count,\n \t\t\t\t}\n \t\t}\n \n-\t\tif (lseek (fd, blockstart, SEEK_SET) == -1) {\n-\t\t\tfprintf (stderr,\n-\t\t\t\t \"Seek error on %s: %s\\n\",\n-\t\t\t\t DEVNAME (dev), strerror (errno));\n-\t\t\treturn -1;\n-\t\t}\n+\t\tif (blockstart != 0)\n+\t\t\tif (lseek (fd, blockstart, SEEK_SET) == -1) {\n+\t\t\t\tfprintf (stderr,\n+\t\t\t\t\t \"Seek error on %s: %s\\n\",\n+\t\t\t\t\t DEVNAME (dev), strerror (errno));\n+\t\t\t\treturn -1;\n+\t\t\t}\n \n #ifdef DEBUG\n \t\tfprintf(stderr, \"Write 0x%x bytes at 0x%llx\\n\", erasesize,\n@@ -1025,25 +1026,8 @@ static int flash_read (int fd)\n \t\treturn -1;\n \t}\n \n-\tif (S_ISCHR(st.st_mode)) {\n-\t\trc = ioctl(fd, MEMGETINFO, &mtdinfo);\n-\t\tif (rc < 0) {\n-\t\t\tfprintf(stderr, \"Cannot get MTD information for %s\\n\",\n-\t\t\t\tDEVNAME(dev_current));\n-\t\t\treturn -1;\n-\t\t}\n-\t\tif (mtdinfo.type != MTD_NORFLASH &&\n-\t\t    mtdinfo.type != MTD_NANDFLASH &&\n-\t\t    mtdinfo.type != MTD_DATAFLASH &&\n-\t\t    mtdinfo.type != MTD_UBIVOLUME) {\n-\t\t\tfprintf (stderr, \"Unsupported flash type %u on %s\\n\",\n-\t\t\t\t mtdinfo.type, DEVNAME(dev_current));\n-\t\t\treturn -1;\n-\t\t}\n-\t} else {\n-\t\tmemset(&mtdinfo, 0, sizeof(mtdinfo));\n-\t\tmtdinfo.type = MTD_ABSENT;\n-\t}\n+\tmemset(&mtdinfo, 0, sizeof(mtdinfo));\n+\tmtdinfo.type = MTD_ABSENT;\n \n \tDEVTYPE(dev_current) = mtdinfo.type;\n \n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/u-boot_firmware/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"u-boot_firmware\"\nPKG_VERSION=\"2986172ef237858fb95bd5e4fa41ee89a660153e\"\nPKG_SHA256=\"f22f472f6cff1707789e055a4552b6bcb57671ae7d89044a66fdc4a5803f5a08\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/hardkernel/u-boot_firmware\"\nPKG_URL=\"https://github.com/CoreELEC/u-boot_firmware/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"u-boot_firmware: Required firmware Files for U-Boot\"\nPKG_TOOLCHAIN=manual\n\nmakeinstall_target() {\n  : # nothing\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/util-linux/config/swap.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nSWAPFILE=\"$HOME/.cache/swapfile\"\nSWAPFILESIZE=\"@SWAPFILESIZE@\"\nSWAP_ENABLED=\"@SWAP_ENABLED_DEFAULT@\""
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/util-linux/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"util-linux\"\nPKG_VERSION=\"2.35.2\"\nPKG_SHA256=\"21b7431e82f6bcd9441a01beeec3d57ed33ee948f8a5b41da577073c372eb58a\"\nPKG_LICENSE=\"GPL\"\nPKG_URL=\"http://www.kernel.org/pub/linux/utils/util-linux/v${PKG_VERSION%.*}/$PKG_NAME-$PKG_VERSION.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host autoconf:host automake:host intltool:host libtool:host pkg-config:host\"\nPKG_DEPENDS_TARGET=\"toolchain ncurses\"\nPKG_DEPENDS_INIT=\"toolchain\"\nPKG_LONGDESC=\"A large variety of low-level system utilities that are necessary for a Linux system to function.\"\nPKG_TOOLCHAIN=\"autotools\"\nPKG_BUILD_FLAGS=\"+pic:host\"\n\nUTILLINUX_CONFIG_DEFAULT=\"--disable-gtk-doc \\\n                          --disable-nls \\\n                          --disable-rpath \\\n                          --enable-tls \\\n                          --disable-all-programs \\\n                          --enable-chsh-only-listed \\\n                          --disable-bash-completion \\\n                          --disable-colors-default \\\n                          --disable-pylibmount \\\n                          --disable-pg-bell \\\n                          --disable-use-tty-group \\\n                          --disable-makeinstall-chown \\\n                          --disable-makeinstall-setuid \\\n                          --disable-widechar \\\n                          --with-gnu-ld \\\n                          --without-selinux \\\n                          --without-audit \\\n                          --without-udev \\\n                          --without-ncursesw \\\n                          --without-readline \\\n                          --without-slang \\\n                          --without-tinfo \\\n                          --without-utempter \\\n                          --without-util \\\n                          --without-libz \\\n                          --without-user \\\n                          --without-systemd \\\n                          --without-smack \\\n                          --without-python \\\n                          --without-systemdsystemunitdir\"\n\nPKG_CONFIGURE_OPTS_TARGET=\"$UTILLINUX_CONFIG_DEFAULT \\\n                           --enable-libuuid \\\n                           --enable-libblkid \\\n                           --enable-libmount \\\n                           --enable-libsmartcols \\\n                           --enable-losetup \\\n                           --enable-fsck \\\n                           --enable-fstrim \\\n                           --enable-blkid \\\n                           --with-ncurses \\\n                           --enable-setterm \\\n\t\t\t\t\t\t   --without-ncursesw \\\n                           --enable-lscpu\"\n\nif [ \"$SWAP_SUPPORT\" = \"yes\" ]; then\n  PKG_CONFIGURE_OPTS_TARGET=\"$PKG_CONFIGURE_OPTS_TARGET --enable-swapon\"\nfi\n\nPKG_CONFIGURE_OPTS_HOST=\"--enable-static \\\n                         --disable-shared \\\n                         $UTILLINUX_CONFIG_DEFAULT \\\n                         --enable-uuidgen \\\n                         --enable-libuuid\"\n\nPKG_CONFIGURE_OPTS_INIT=\"$UTILLINUX_CONFIG_DEFAULT \\\n                         --enable-libblkid \\\n                         --enable-libmount \\\n                         --enable-fsck\"\n\nif [ \"$INITRAMFS_PARTED_SUPPORT\" = \"yes\" ]; then\n  PKG_CONFIGURE_OPTS_INIT=\"$PKG_CONFIGURE_OPTS_INIT --enable-mkfs --enable-libuuid\"\nfi\n\npre_makeinstall_target() {\nmkdir -p $INSTALL/usr/bin\ncp $PKG_BUILD/.$TARGET_NAME/setterm $INSTALL/usr/bin\n}\n\npost_makeinstall_target() {\n  if [ \"$SWAP_SUPPORT\" = \"yes\" ]; then\n    mkdir -p $INSTALL/usr/lib/coreelec\n      cp -PR $PKG_DIR/scripts/mount-swap $INSTALL/usr/lib/coreelec\n\n    mkdir -p $INSTALL/etc\n      cat $PKG_DIR/config/swap.conf | \\\n        sed -e \"s,@SWAPFILESIZE@,$SWAPFILESIZE,g\" \\\n            -e \"s,@SWAP_ENABLED_DEFAULT@,$SWAP_ENABLED_DEFAULT,g\" \\\n            > $INSTALL/etc/swap.conf\n  fi\n}\n\npost_install () {\n  if [ \"$SWAP_SUPPORT\" = \"yes\" ]; then\n    enable_service swap.service\n  fi\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/util-linux/patches/util-linux-01-fix-pkgconf.patch",
    "content": "From 4856beb5186760419bafd1f5686d6492d2d36907 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Sat, 16 Aug 2014 13:40:57 +0300\nSubject: [PATCH] fix pkgconf\n\n---\n libblkid/blkid.pc.in         |    6 +++---\n libmount/mount.pc.in         |    6 +++---\n libsmartcols/smartcols.pc.in |    6 +++---\n libuuid/uuid.pc.in           |    6 +++---\n 4 files changed, 12 insertions(+), 12 deletions(-)\n\ndiff --git a/libblkid/blkid.pc.in b/libblkid/blkid.pc.in\nindex 40ec8a9..056ae64 100644\n--- a/libblkid/blkid.pc.in\n+++ b/libblkid/blkid.pc.in\n@@ -1,7 +1,7 @@\n prefix=@prefix@\n-exec_prefix=@exec_prefix@\n-libdir=@usrlib_execdir@\n-includedir=@includedir@\n+exec_prefix=${prefix}\n+libdir=${exec_prefix}/lib\n+includedir=${prefix}/include\n \n Name: blkid\n Description: Block device id library\ndiff --git a/libmount/mount.pc.in b/libmount/mount.pc.in\nindex 2c32797..c8112c6 100644\n--- a/libmount/mount.pc.in\n+++ b/libmount/mount.pc.in\n@@ -1,7 +1,7 @@\n prefix=@prefix@\n-exec_prefix=@exec_prefix@\n-libdir=@usrlib_execdir@\n-includedir=@includedir@\n+exec_prefix=${prefix}\n+libdir=${exec_prefix}/lib\n+includedir=${prefix}/include\n \n Name: mount\n Description: mount library\ndiff --git a/libsmartcols/smartcols.pc.in b/libsmartcols/smartcols.pc.in\nindex 0b16739..8f474ef 100644\n--- a/libsmartcols/smartcols.pc.in\n+++ b/libsmartcols/smartcols.pc.in\n@@ -1,7 +1,7 @@\n prefix=@prefix@\n-exec_prefix=@exec_prefix@\n-libdir=@usrlib_execdir@\n-includedir=@includedir@\n+exec_prefix=${prefix}\n+libdir=${exec_prefix}/lib\n+includedir=${prefix}/include\n \n Name: smartcols\n Description: table or tree library\ndiff --git a/libuuid/uuid.pc.in b/libuuid/uuid.pc.in\nindex 875de19..ef1009e 100644\n--- a/libuuid/uuid.pc.in\n+++ b/libuuid/uuid.pc.in\n@@ -1,7 +1,7 @@\n prefix=@prefix@\n-exec_prefix=@exec_prefix@\n-libdir=@usrlib_execdir@\n-includedir=@includedir@\n+exec_prefix=${prefix}\n+libdir=${exec_prefix}/lib\n+includedir=${prefix}/include\n \n Name: uuid\n Description: Universally unique id library\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/util-linux/patches/util-linux-0100-enable-lscpu.patch",
    "content": "diff --git a/configure.ac b/configure.ac\nindex a05a294..558851d 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -1498,7 +1498,11 @@ UL_REQUIRES_BUILD([lsblk], [libsmartcols])\n AM_CONDITIONAL([BUILD_LSBLK], [test \"x$build_lsblk\" = xyes])\n \n \n-UL_BUILD_INIT([lscpu], [check])\n+AC_ARG_ENABLE([lscpu],\n+  AS_HELP_STRING([--disable-lscpu], [do not build lscpu]),\n+  [], [UL_DEFAULT_ENABLE([lscpu], [check])]\n+)\n+UL_BUILD_INIT([lscpu])\n UL_REQUIRES_LINUX([lscpu])\n UL_REQUIRES_BUILD([lscpu], [libsmartcols])\n UL_REQUIRES_HAVE([lscpu], [cpu_set_t], [cpu_set_t type])\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/util-linux/patches/util-linux-blkid_swapon_mkfs_uuidgen.patch",
    "content": "diff --git a/configure.ac b/configure.ac\nindex 1899ec3..e4be942 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -1156,7 +1156,11 @@ AS_IF([test \"x$build_uuidd\" = xyes || test \"x$enable_libuuid_force_uuidd\" == xye\n AM_CONDITIONAL([BUILD_UUIDD], [test \"x$build_uuidd\" = xyes])\n \n \n-UL_BUILD_INIT([uuidgen], [check])\n+AC_ARG_ENABLE([uuidgen],\n+  AS_HELP_STRING([--disable-uuidgen], [do not build uuidgen]),\n+  [], [UL_DEFAULT_ENABLE([uuidgen], [check])]\n+)\n+UL_BUILD_INIT([uuidgen])\n UL_REQUIRES_BUILD([uuidgen], [libuuid])\n AM_CONDITIONAL([BUILD_UUIDGEN], [test \"x$build_uuidgen\" = xyes])\n \n@@ -1165,7 +1169,11 @@ UL_REQUIRES_BUILD([uuidparse], [libuuid])\n UL_REQUIRES_BUILD([uuidparse], [libsmartcols])\n AM_CONDITIONAL([BUILD_UUIDPARSE], [test \"x$build_uuidparse\" = xyes])\n \n-UL_BUILD_INIT([blkid], [check])\n+AC_ARG_ENABLE([blkid],\n+  AS_HELP_STRING([--disable-blkid], [do not build blkid(8)]),\n+  [], [UL_DEFAULT_ENABLE([blkid], [check])]\n+)\n+UL_BUILD_INIT([blkid])\n UL_REQUIRES_BUILD([blkid], [libblkid])\n AM_CONDITIONAL([BUILD_BLKID], [test \"x$build_blkid\" = xyes])\n \n@@ -1403,20 +1411,32 @@ UL_REQUIRES_HAVE([hwclock], [io, linuxdummy], [ioperm iopl function or Linux])\n AM_CONDITIONAL([BUILD_HWCLOCK], [test \"x$build_hwclock\" = xyes])\n \n \n-UL_BUILD_INIT([mkfs], [yes])\n+AC_ARG_ENABLE([mkfs],\n+  AS_HELP_STRING([--disable-mkfs], [do not build mkfs(8)]),\n+  [], [UL_DEFAULT_ENABLE([mkfs], [check])]\n+)\n+UL_BUILD_INIT([mkfs])\n AM_CONDITIONAL([BUILD_MKFS], [test \"x$build_mkfs\" = xyes])\n \n UL_BUILD_INIT([isosize], [yes])\n AM_CONDITIONAL([BUILD_ISOSIZE], [test \"x$build_isosize\" = xyes])\n \n \n-UL_BUILD_INIT([fstrim], [check])\n+AC_ARG_ENABLE([fstrim],\n+  AS_HELP_STRING([--disable-fstrim], [do not build fstrim(8)]),\n+  [], [UL_DEFAULT_ENABLE([fstrim], [check])]\n+)\n+UL_BUILD_INIT([fstrim])\n UL_REQUIRES_LINUX([fstrim])\n UL_REQUIRES_BUILD([fstrim], [libmount])\n AM_CONDITIONAL([BUILD_FSTRIM], [test \"x$build_fstrim\" = xyes])\n \n \n-UL_BUILD_INIT([swapon], [check])\n+AC_ARG_ENABLE([swapon],\n+  AS_HELP_STRING([--disable-swapon], [do not build swapon(8) and swapoff(8)]),\n+  [], [UL_DEFAULT_ENABLE([swapon], [check])]\n+)\n+UL_BUILD_INIT([swapon])\n UL_REQUIRES_LINUX([swapon])\n UL_REQUIRES_BUILD([swapon], [libblkid])\n UL_REQUIRES_BUILD([swapon], [libmount])\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/util-linux/scripts/mount-swap",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /etc/swap.conf\n. /etc/profile\n\nif [ -f /storage/.config/swap.conf ]; then\n  . /storage/.config/swap.conf\nfi\n\nif [ -e /dev/.storage_netboot ] ; then\n  logger -t Boot \"### netbooting... swap disabled ###\"\n  exit 0\nfi\n\nif [ ! \"$SWAP_ENABLED\" = yes ] ; then\n  logger -t Boot \"### swap disabled via configfile ###\"\n  exit 0\nfi\n\nSWAP=`blkid -t TYPE=\"swap\" -o device`\n\ncase $1 in\n  create)\n    if [ -z \"$SWAP\" -a ! -f \"$SWAPFILE\" ]; then\n      mkdir -p `dirname $SWAPFILE`\n      dd if=/dev/zero of=$SWAPFILE bs=1M count=$SWAPFILESIZE\n      chmod 0600 $SWAPFILE\n      mkswap $SWAPFILE\n    fi\n    ;;\n  mount)\n    [ -z \"$SWAP\" -a -f \"$SWAPFILE\" ] && SWAP=$SWAPFILE\n    for i in $SWAP; do\n      swapon -p 10000 $i\n    done\n    ;;\n  unmount)\n    swapoff -a\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/util-linux/sysctl.d/swappiness.conf",
    "content": "vm.swappiness=10"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/packages/util-linux/system.d/swap.service",
    "content": "[Unit]\nDescription=Mounting swapfile\nDefaultDependencies=false\n\nBefore=swap.target shutdown.target\nConflicts=shutdown.target\nWants=swap.target\n\nConditionPathExists=/proc/swaps\nConditionKernelCommandLine=!noswap\nConditionKernelCommandLine=!installer\n\n[Service]\nEnvironment=HOME=/storage\nType=oneshot\nExecStartPre=/usr/lib/coreelec/mount-swap create\nExecStart=/usr/lib/coreelec/mount-swap mount\nRemainAfterExit=yes\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/patches/box64/01-fixhwcapatomics.patch",
    "content": "--- a/src/main.c\n+++ b/src/main.c\n@@ -15,6 +15,10 @@\n #include <linux/auxvec.h>\n #include <asm/hwcap.h>\n #endif\n+#endif\n+\n+#ifndef HWCAP_ATOMICS\n+#define HWCAP_ATOMICS (1<<8)\n #endif\n \n #include \"build_info.h\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/patches/box86/01-fixhwcap.patch",
    "content": "--- a/src/main.c\n+++ b/src/main.c\n@@ -26,6 +26,11 @@\n #include <asm/hwcap.h>\n #endif\n #endif\n+\n+#define HWCAP2_CRC32\t(1 << 4)\n+#define HWCAP2_AES\t(1 << 0)\n+\n+\n \n #include \"build_info.h\"\n #include \"debug.h\"\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/patches/linux/0001-backport-upstream-fix-8c0d0da3197815f04252866c2cbd5b.patch",
    "content": "From cdb1843faefdd8b3959073488201f4bd6e008ad0 Mon Sep 17 00:00:00 2001\nFrom: 7Ji <pugokushin@gmail.com>\nDate: Mon, 6 Jun 2022 11:07:02 +0800\nSubject: [PATCH 1/2] backport upstream fix\n 8c0d0da3197815f04252866c2cbd5b8ebbe1c895\n\n---\n arch/arm64/kernel/module.c | 51 ++++++++++++++------------------------\n 1 file changed, 18 insertions(+), 33 deletions(-)\n\ndiff --git a/arch/arm64/kernel/module.c b/arch/arm64/kernel/module.c\nindex 1eb1cc95513..5cb980e7bf5 100644\n--- a/arch/arm64/kernel/module.c\n+++ b/arch/arm64/kernel/module.c\n@@ -27,9 +27,6 @@\n #include <linux/vmalloc.h>\n #include <asm/insn.h>\n \n-#define\tAARCH64_INSN_IMM_MOVNZ\t\tAARCH64_INSN_IMM_MAX\n-#define\tAARCH64_INSN_IMM_MOVK\t\tAARCH64_INSN_IMM_16\n-\n void *module_alloc(unsigned long size)\n {\n \treturn __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END,\n@@ -98,16 +95,20 @@ static int reloc_data(enum aarch64_reloc_op op, void *place, u64 val, int len)\n \treturn 0;\n }\n \n+enum aarch64_insn_movw_imm_type {\n+\tAARCH64_INSN_IMM_MOVNZ,\n+\tAARCH64_INSN_IMM_MOVKZ,\n+};\n+\n static int reloc_insn_movw(enum aarch64_reloc_op op, void *place, u64 val,\n-\t\t\t   int lsb, enum aarch64_insn_imm_type imm_type)\n+\t\t\t   int lsb, enum aarch64_insn_movw_imm_type imm_type)\n {\n-\tu64 imm, limit = 0;\n+\tu64 imm;\n \ts64 sval;\n \tu32 insn = le32_to_cpu(*(u32 *)place);\n \n \tsval = do_reloc(op, place, val);\n-\tsval >>= lsb;\n-\timm = sval & 0xffff;\n+\timm = sval >> lsb;\n \n \tif (imm_type == AARCH64_INSN_IMM_MOVNZ) {\n \t\t/*\n@@ -116,7 +117,7 @@ static int reloc_insn_movw(enum aarch64_reloc_op op, void *place, u64 val,\n \t\t * immediate is less than zero.\n \t\t */\n \t\tinsn &= ~(3 << 29);\n-\t\tif ((s64)imm >= 0) {\n+\t\tif (sval >= 0) {\n \t\t\t/* >=0: Set the instruction to MOVZ (opcode 10b). */\n \t\t\tinsn |= 2 << 29;\n \t\t} else {\n@@ -128,29 +129,13 @@ static int reloc_insn_movw(enum aarch64_reloc_op op, void *place, u64 val,\n \t\t\t */\n \t\t\timm = ~imm;\n \t\t}\n-\t\timm_type = AARCH64_INSN_IMM_MOVK;\n \t}\n \n \t/* Update the instruction with the new encoding. */\n-\tinsn = aarch64_insn_encode_immediate(imm_type, insn, imm);\n+\tinsn = aarch64_insn_encode_immediate(AARCH64_INSN_IMM_16, insn, imm);\n \t*(u32 *)place = cpu_to_le32(insn);\n \n-\t/* Shift out the immediate field. */\n-\tsval >>= 16;\n-\n-\t/*\n-\t * For unsigned immediates, the overflow check is straightforward.\n-\t * For signed immediates, the sign bit is actually the bit past the\n-\t * most significant bit of the field.\n-\t * The AARCH64_INSN_IMM_16 immediate type is unsigned.\n-\t */\n-\tif (imm_type != AARCH64_INSN_IMM_16) {\n-\t\tsval++;\n-\t\tlimit++;\n-\t}\n-\n-\t/* Check the upper bits depending on the sign of the immediate. */\n-\tif ((u64)sval > limit)\n+\tif (imm > U16_MAX)\n \t\treturn -ERANGE;\n \n \treturn 0;\n@@ -255,25 +240,25 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,\n \t\t\toverflow_check = false;\n \t\tcase R_AARCH64_MOVW_UABS_G0:\n \t\t\tovf = reloc_insn_movw(RELOC_OP_ABS, loc, val, 0,\n-\t\t\t\t\t      AARCH64_INSN_IMM_16);\n+\t\t\t\t\t      AARCH64_INSN_IMM_MOVKZ);\n \t\t\tbreak;\n \t\tcase R_AARCH64_MOVW_UABS_G1_NC:\n \t\t\toverflow_check = false;\n \t\tcase R_AARCH64_MOVW_UABS_G1:\n \t\t\tovf = reloc_insn_movw(RELOC_OP_ABS, loc, val, 16,\n-\t\t\t\t\t      AARCH64_INSN_IMM_16);\n+\t\t\t\t\t      AARCH64_INSN_IMM_MOVKZ);\n \t\t\tbreak;\n \t\tcase R_AARCH64_MOVW_UABS_G2_NC:\n \t\t\toverflow_check = false;\n \t\tcase R_AARCH64_MOVW_UABS_G2:\n \t\t\tovf = reloc_insn_movw(RELOC_OP_ABS, loc, val, 32,\n-\t\t\t\t\t      AARCH64_INSN_IMM_16);\n+\t\t\t\t\t      AARCH64_INSN_IMM_MOVKZ);\n \t\t\tbreak;\n \t\tcase R_AARCH64_MOVW_UABS_G3:\n \t\t\t/* We're using the top bits so we can't overflow. */\n \t\t\toverflow_check = false;\n \t\t\tovf = reloc_insn_movw(RELOC_OP_ABS, loc, val, 48,\n-\t\t\t\t\t      AARCH64_INSN_IMM_16);\n+\t\t\t\t\t      AARCH64_INSN_IMM_MOVKZ);\n \t\t\tbreak;\n \t\tcase R_AARCH64_MOVW_SABS_G0:\n \t\t\tovf = reloc_insn_movw(RELOC_OP_ABS, loc, val, 0,\n@@ -290,7 +275,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,\n \t\tcase R_AARCH64_MOVW_PREL_G0_NC:\n \t\t\toverflow_check = false;\n \t\t\tovf = reloc_insn_movw(RELOC_OP_PREL, loc, val, 0,\n-\t\t\t\t\t      AARCH64_INSN_IMM_MOVK);\n+\t\t\t\t\t      AARCH64_INSN_IMM_MOVKZ);\n \t\t\tbreak;\n \t\tcase R_AARCH64_MOVW_PREL_G0:\n \t\t\tovf = reloc_insn_movw(RELOC_OP_PREL, loc, val, 0,\n@@ -299,7 +284,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,\n \t\tcase R_AARCH64_MOVW_PREL_G1_NC:\n \t\t\toverflow_check = false;\n \t\t\tovf = reloc_insn_movw(RELOC_OP_PREL, loc, val, 16,\n-\t\t\t\t\t      AARCH64_INSN_IMM_MOVK);\n+\t\t\t\t\t      AARCH64_INSN_IMM_MOVKZ);\n \t\t\tbreak;\n \t\tcase R_AARCH64_MOVW_PREL_G1:\n \t\t\tovf = reloc_insn_movw(RELOC_OP_PREL, loc, val, 16,\n@@ -308,7 +293,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,\n \t\tcase R_AARCH64_MOVW_PREL_G2_NC:\n \t\t\toverflow_check = false;\n \t\t\tovf = reloc_insn_movw(RELOC_OP_PREL, loc, val, 32,\n-\t\t\t\t\t      AARCH64_INSN_IMM_MOVK);\n+\t\t\t\t\t      AARCH64_INSN_IMM_MOVKZ);\n \t\t\tbreak;\n \t\tcase R_AARCH64_MOVW_PREL_G2:\n \t\t\tovf = reloc_insn_movw(RELOC_OP_PREL, loc, val, 32,\n-- \n2.36.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/patches/linux/0002-backport-upstream-fix-2cd5629f66e2d55b17d9c66affeccf.patch",
    "content": "From c4cc3184ccbcbadf0fc26a6ac0a703ba51d77308 Mon Sep 17 00:00:00 2001\nFrom: 7Ji <pugokushin@gmail.com>\nDate: Mon, 6 Jun 2022 11:09:09 +0800\nSubject: [PATCH 2/2] backport upstream fix\n 2cd5629f66e2d55b17d9c66affeccf2eb2027ef\n\n---\n arch/arm64/kernel/module.c | 19 ++++---------------\n 1 file changed, 4 insertions(+), 15 deletions(-)\n\ndiff --git a/arch/arm64/kernel/module.c b/arch/arm64/kernel/module.c\nindex 5cb980e7bf5..23cef35e77c 100644\n--- a/arch/arm64/kernel/module.c\n+++ b/arch/arm64/kernel/module.c\n@@ -60,15 +60,18 @@ static u64 do_reloc(enum aarch64_reloc_op reloc_op, void *place, u64 val)\n \n static int reloc_data(enum aarch64_reloc_op op, void *place, u64 val, int len)\n {\n-\tu64 imm_mask = (1 << len) - 1;\n \ts64 sval = do_reloc(op, place, val);\n \n \tswitch (len) {\n \tcase 16:\n \t\t*(s16 *)place = sval;\n+\t\tif (sval < S16_MIN || sval > U16_MAX)\n+\t\t\treturn -ERANGE;\n \t\tbreak;\n \tcase 32:\n \t\t*(s32 *)place = sval;\n+\t\tif (sval < S32_MIN || sval > U32_MAX)\n+\t\t\treturn -ERANGE;\n \t\tbreak;\n \tcase 64:\n \t\t*(s64 *)place = sval;\n@@ -78,20 +81,6 @@ static int reloc_data(enum aarch64_reloc_op op, void *place, u64 val, int len)\n \t\treturn 0;\n \t}\n \n-\t/*\n-\t * Extract the upper value bits (including the sign bit) and\n-\t * shift them to bit 0.\n-\t */\n-\tsval = (s64)(sval & ~(imm_mask >> 1)) >> (len - 1);\n-\n-\t/*\n-\t * Overflow has occurred if the value is not representable in\n-\t * len bits (i.e the bottom len bits are not sign-extended and\n-\t * the top bits are not all zero).\n-\t */\n-\tif ((u64)(sval + 1) > 2)\n-\t\treturn -ERANGE;\n-\n \treturn 0;\n }\n \n-- \n2.36.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/devices/Amlogic-old/patches/linux/linux-10-add-compatibility-macro-for-input_event_sec.patch",
    "content": "just define from\nhttps://github.com/torvalds/linux/commit/152194fe9c3f03232b9c0d0264793a7fa4af82f8\n\n--- a/include/uapi/linux/input.h\t2022-08-05 19:02:56.906792582 +0200\n+++ b/include/uapi/linux/input.h\t2022-08-05 19:03:30.788834870 +0200\n@@ -24,6 +24,8 @@\n \n struct input_event {\n \tstruct timeval time;\n+#define input_event_sec time.tv_sec\n+#define input_event_usec time.tv_usec\n \t__u16 type;\n \t__u16 code;\n \t__s32 value;\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/etc/dbus-1/system.d/coreelec.settings-xdbus-stoploop.conf",
    "content": "<!DOCTYPE busconfig PUBLIC\n          \"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN\"\n          \"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd\">\n<busconfig>\n  <policy user=\"root\">\n    <allow own=\"com.service.coreelec.settings.xdbus.stoploop\"/>\n  </policy>\n</busconfig>\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/etc/lirc/lircd.conf.d/odroid-amremote.conf",
    "content": "begin remote\n\n  name  odroid_amremote\n  bits           16\n  flags SPACE_ENC|CONST_LENGTH\n  eps            30\n  aeps          100\n\n  header       9000  4500\n  one           563  1687\n  zero          563   562\n  ptrail        563\n  repeat       9000  2250\n  pre_data_bits   16\n  pre_data       0x4DB2\n  gap          0\n  suppress_repeat 1\n\n      begin codes\n          KEY_POWER                0x3BC4\n          KEY_MUTE                 0x11EE\n          KEY_HOME                 0x41BE\n          KEY_OK                   0x738C\n          KEY_LEFT                 0x9966\n          KEY_RIGHT                0x837C\n          KEY_UP                   0x53AC\n          KEY_DOWN                 0x4BB4\n          KEY_BACK                 0x59A6\n          KEY_MENU                 0xA35C\n          KEY_VOLUMEDOWN           0x817E\n          KEY_VOLUMEUP             0x01FE\n      end codes\n\nend remote\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/usr/bin/cputemp",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nTEMP=\"$(cat /sys/class/thermal/thermal_zone0/temp)\"\necho \"$(( $TEMP / 1000 )) C\"\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/usr/lib/modprobe.d/disable-ir-remotes.conf",
    "content": "blacklist meson-ir\nblacklist meson-remote\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/usr/lib/modprobe.d/mali.conf",
    "content": "options mali mali_shared_mem_size=0x40000000\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/usr/lib/modules-load.d/amlvideodri.conf",
    "content": "amlvideodri\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/usr/lib/systemd/sleep.conf.d/sleep.conf",
    "content": "[Sleep]\nHibernateMode=false\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/usr/lib/systemd/system/amlogic-dvb.service",
    "content": "[Unit]\nDescription=Amlogic DVB module loader\nConditionPathExists=/proc/device-tree/dvb/\nAfter=kernel-overlays.service\n\n[Service]\nType=oneshot\nExecStart=-/bin/sh -c \"[ ! -f '/proc/device-tree/dvb/status' -a $(tr -d '\\\\0' < /proc/device-tree/dvb/compatible) = \"amlogic,dvb\" ] && /sbin/modprobe aml_fe\"\nExecStart=-/bin/sh -c \"[ -f '/proc/device-tree/dvb/status' -a $(tr -d '\\\\0' < /proc/device-tree/dvb/status) = \"okay\" ] && /sbin/modprobe aml_fe\"\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/usr/lib/systemd/system/smp-affinity.service",
    "content": "[Unit]\nDescription=Set smp_affinity from script\nBefore=kodi.service\nAfter=graphical.target\nConditionPathExists=/usr/lib/coreelec/smp-affinity.sh\n\n[Service]\nType=oneshot\nExecStart=-/bin/sh /usr/lib/coreelec/smp-affinity.sh\nRemainAfterExit=yes\n\n[Install]\nWantedBy=kodi.service\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/usr/lib/systemd/system-shutdown/disk-park.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nfunction disk_park() {\n  [ -z \"$PARK_WAIT\" ] && PARK_WAIT=\"10\"\n  echo \"disk-park: suspend disks: $PARK_HDD, park time: ${PARK_WAIT}s\" >/dev/kmsg\n\n  wait=0\n  for dev in /sys/block/sd* ; do\n    [ ! -e $dev ] && continue\n    DEV=\"${dev##*/}\"\n    [ \"$(udevadm info --query=all --name=$DEV | awk -F \"=\" '/ID_MODEL=/{print index($2, \"SSD\")}')\" != \"0\" ] && continue\n    [ -n \"$(hdparm -C /dev/$DEV | grep 'standby')\" ] && continue\n    echo \"disk-park: suspend disk /dev/$DEV\" >/dev/kmsg\n    hdparm -y /dev/$DEV >/dev/null && wait=$PARK_WAIT\n  done\n\n  if [ \"$wait\" = \"0\" ]; then\n    echo \"disk-park: no disk got sent to suspend\" >/dev/kmsg\n  else\n    sleep $wait\n  fi\n}\n\n[ -e /run/disk-park.dat ] && . /run/disk-park.dat || exit 0\n[ -z \"$PARK_HDD\" ] && exit 0\n\ncase \"$1\" in\n  reboot|post)\n    # do not park disks when rebooting or on suspend resume\n    ;;\n  *)\n    disk_park\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/usr/lib/systemd/system-sleep/reset_usb_hub.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\ncase \"$1\" in\n  pre)\n    # <do something on suspend>\n    ;;\n  post)\n    # <do something on resume>\n    DT_ID=$(dtname)\n    case $DT_ID in\n      *odroid_n2plus*)\n        wol=\"$(cat /flash/config.ini | awk -F \"=\" '/^wol=/{gsub(/\"|\\047/,\"\",$2); print $2}')\"\n        if [ \"$wol\" == \"1\" ]; then\n          echo \"reset\" > /sys/devices/platform/gpio-reset/reset-usb_hub/control\n        fi\n        ;;\n    esac\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/usr/lib/udev/hwdb.d/99-buzztv-bt-400-rf.hwdb",
    "content": "# BuzzTV BT-300/BT-400 smart remote\nevdev:input:b0005v0957p1001*\n KEYBOARD_KEY_c0040=c\n KEYBOARD_KEY_c0041=enter\n KEYBOARD_KEY_70040=z\n KEYBOARD_KEY_70041=esc\n KEYBOARD_KEY_70042=t\n KEYBOARD_KEY_70043=e\n KEYBOARD_KEY_70044=o\n KEYBOARD_KEY_70045=volumeup\n KEYBOARD_KEY_70069=volumedown\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/usr/lib/udev/rules.d/99-spidev.rules",
    "content": "KERNEL==\"spidev*\", SUBSYSTEMS==\"spidev\", SYMLINK+=\"spidev0.0\"\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/usr/lib/udev/rules.d/99-xpadneo.rules",
    "content": "# XPADNEO UDEV BINDING\n# by atar-axis (dollinger.florian@gmx.de)\n\n# in general those files with a higher leading number are processed\n# and executed _later_, that means assignment in those files can overwrite\n# assignments in other rules which are parsed earlier\n\n# every block is a rule. rules are collected from the .rules files\n# according to their name. on every kernel uevent, all rules are\n# compared to that event - one by one.\n\n# kernel versions        manual binding (bind/unbind)   bind uevent             hid_generic greedy      hid_microsoft support   gamepad     method\n# ---------------        ----------------------------   --------------          ------------------      ---------------------   -------     ------\n# [    ... - 2.6.13 [    no                             no                      yes                     no                      *           rmmod (not supported in xpadneo)\n# [ 2.6.13 - 4.14   [    yes                            no                      yes                     no                      *           1: add, hid_generic\n# [   4.14 - 4.16   [    yes                            yes                     yes                     no                      *           2: bind, hid_generc\n# [   4.16 - 4.20   [    yes                            yes                     no                      no                      *           automatic\n# [   4.20 - ...    ]    yes                            yes                     no                      yes                     02FD        3: bind, microsoft\n#                                                                                                                               02E0        automatic\n\nACTION==\"add\", \\\nKERNEL==\"0005:045E:02FD.*|0005:045E:02E0.*\", \\\nSUBSYSTEM==\"hid\", \\\nRUN:=\"/bin/sh -c 'echo xpadneo udev: $kernel > /dev/kmsg; modprobe hid_xpadneo; echo $kernel > /sys/bus/hid/drivers/hid-generic/unbind; echo $kernel > /sys/bus/hid/drivers/microsoft/unbind; echo $kernel > /sys/bus/hid/drivers/xpadneo/bind; echo xpadneo udev: ok > /dev/kmsg'\"\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/usr/sbin/rebootfromnand",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2016-2018 kszaq (kszaquitto@gmail.com)\n# Copyright (C) 2019-present Team CoreELEC (https://coreelec.org)\n\nDT_ID=$(cat /proc/device-tree/amlogic-dt-id 2>/dev/null | tr -d '\\0')\n\n# Check if Fire TV Cube (g12brevb_raven_2g) \nif [ \"${DT_ID}\" = \"g12brevb_raven_2g\" ]; then\n  /bin/systemctl reboot --reboot-argument=quiescent\nelse\n  if /usr/sbin/fw_printenv whereToBootFrom > /dev/null 2>&1; then\n    /usr/sbin/fw_setenv whereToBootFrom internal\n  fi\n  \n  /usr/sbin/fw_setenv bootfromnand 1\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/usr/share/alsa/cards/AML-AUGESOUND.conf",
    "content": "#\n# Configuration for Amlogic AUGE Audio\n#\n\nAML-AUGESOUND.pcm.default {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype softvol\n\tslave.pcm {\n\t\ttype plug\n\t\tslave {\n\t\t\tpcm {\n\t\t\t\ttype hw\n\t\t\t\tcard $CARD\n\t\t\t\tdevice 1\n\t\t\t}\n\t\t}\n\t}\n\tcontrol {\n\t\tname \"PCM Playback Volume\"\n\t\tcard $CARD\n\t}\n}\n\n<confdir:pcm/surround71.conf>\n\nAML-AUGESOUND.pcm.surround71.0 {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype softvol\n\tslave.pcm {\n\t\ttype plug\n\t\tslave {\n\t\t\tpcm {\n\t\t\t\ttype hw\n\t\t\t\tcard $CARD\n\t\t\t\tdevice 3\n\t\t\t}\n\t\t}\n\t}\n\tcontrol {\n\t\tname \"LPCM Playback Volume\"\n\t\tcard $CARD\n\t}\n}\n\n<confdir:pcm/hdmi.conf>\n\nAML-AUGESOUND.pcm.hdmi.0 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t\tdevice 0\n\t\tformat S16_LE\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tinterface MIXER\n\t\t\t\tname \"IEC958 Playback Default\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional true\n\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n\t\t\t}\n\t\t]\n\t}\n}\n\n<confdir:pcm/iec958.conf>\n\nAML-AUGESOUND.pcm.iec958.0 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t\tdevice 2\n\t\tformat S16_LE\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tinterface MIXER\n\t\t\t\tname \"IEC958 Playback Default\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional true\n\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n\t\t\t}\n\t\t]\n\t}\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/filesystem/usr/share/alsa/cards/AML-MESONAUDIO.conf",
    "content": "#\n# Configuration for Amlogic MESONAUDIO Audio\n#\n\nAML-MESONAUDIO.pcm.default {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype softvol\n\tslave.pcm {\n\t\ttype plug\n\t\tslave {\n\t\t\tpcm {\n\t\t\t\ttype hw\n\t\t\t\tcard $CARD\n\t\t\t\tdevice 0\n\t\t\t}\n\t\t}\n\t}\n\tcontrol {\n\t\tname \"PCM Playback Volume\"\n\t\tcard $CARD\n\t}\n}\n\n<confdir:pcm/hdmi.conf>\n\nAML-MESONAUDIO.pcm.hdmi.0 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t\tdevice 1\n\t\tformat S16_LE\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tinterface MIXER\n\t\t\t\tname \"IEC958 Playback Default\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional true\n\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n\t\t\t}\n\t\t]\n\t}\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/addon-depends/attrs/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"attrs\"\nPKG_VERSION=\"22.2.0\"\nPKG_SHA256=\"c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://pypi.org/project/attrs/\"\nPKG_URL=\"https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"Python3:host setuptools:host\"\nPKG_LONGDESC=\"Classes Without Boilerplate.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_host() {\n  exec_thread_safe python3 setup.py install --prefix=${TOOLCHAIN}\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/addon-depends/jsonschema/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"jsonschema\"\nPKG_VERSION=\"4.17.3\"\nPKG_SHA256=\"0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://pypi.org/project/jsonschema/\"\nPKG_URL=\"https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"Python3:host attrs:host pyrsistent:host\"\nPKG_LONGDESC=\"An implementation of JSON Schema validation for Python.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_host() {\n  cp -r ${PKG_BUILD}/jsonschema ${TOOLCHAIN}/lib/${PKG_PYTHON_VERSION}/site-packages\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/addon-depends/mbedtls/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"mbedtls\"\nPKG_VERSION=\"3.3.0\"\nPKG_SHA256=\"113fa84bc3cf862d56e7be0a656806a5d02448215d1e22c98176b1c372345d33\"\nPKG_LICENSE=\"Apache 2.0\"\nPKG_SITE=\"https://github.com/Mbed-TLS/mbedtls\"\nPKG_URL=\"https://github.com/Mbed-TLS/mbedtls/archive/v${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain jsonschema:host Jinja2:host\"\nPKG_LONGDESC=\"Mbed TLS is a C library that implements cryptographic primitives, X.509 certificate manipulation and the SSL/TLS and DTLS protocols.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DCMAKE_BUILD_TYPE=Release \\\n\t\t\t                 -DUSE_SHARED_MBEDTLS_LIBRARY=OFF \\\n\t\t\t                 -DUSE_STATIC_MBEDTLS_LIBRARY=ON \\\n\t\t\t                 -DENABLE_TESTING=OFF \\\n\t\t\t                 -DENABLE_PROGRAMS=OFF \\\n\t\t\t                 -DLINK_WITH_PTHREAD=ON \\\n\t\t\t                 -Wno-dev\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/addon-depends/pyrsistent/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"pyrsistent\"\nPKG_VERSION=\"0.19.3\"\nPKG_SHA256=\"1a2994773706bbb4995c31a97bc94f1418314923bd1048c6d964837040376440\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://pypi.org/project/pyrsistent/\"\nPKG_URL=\"https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"Python3:host setuptools:host\"\nPKG_LONGDESC=\"Persistent/Functional/Immutable data structures.\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_host() {\n  exec_thread_safe python3 setup.py install --prefix=${TOOLCHAIN}\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/addon-depends/qmdnsengine/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"qmdnsengine\"\nPKG_VERSION=\"0ca80117e853671d909b3cec9e2bdcac85a13b9f\"\nPKG_SHA256=\"3ae288458e3fc1c1e636869aaca0fd5c77bdd6aec6fd4d62217d0f46acd4042c\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/nitroshare/qmdnsengine\"\nPKG_URL=\"https://github.com/nitroshare/qmdnsengine/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain qt-everywhere\"\nPKG_LONGDESC=\"Library provides an implementation of multicast DNS as per RFC 6762.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DBUILD_SHARED_LIBS=OFF\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/crazycat/changelog.txt",
    "content": "100\n- Initial add-on\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/crazycat/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"crazycat\"\nPKG_REV=\"1\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/crazycat69/media_build\"\nPKG_DEPENDS_TARGET=\"toolchain linux media_tree_cc\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS} $(get_pkg_directory media_tree_cc)\"\nPKG_SECTION=\"driver.dvb\"\nPKG_LONGDESC=\"DVB driver for TBS cards with CrazyCats additions\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_ADDON_IS_STANDALONE=\"yes\"\nPKG_ADDON_NAME=\"DVB drivers for TBS\"\nPKG_ADDON_TYPE=\"xbmc.service\"\nPKG_ADDON_VERSION=\"${ADDON_VERSION}.${PKG_REV}\"\nPKG_ADDON_REQUIRES=\"script.program.driverselect:0.0.0\"\n\ncase \"${LINUX}\" in\n  amlogic-4.9)\n    PKG_VERSION=\"ca1ea9fc2cfaedfc32bd0ac628e03e9aa379e3ad\"\n    PKG_SHA256=\"6b44a96d82c4a3e052864a995baceaede46b37c048c5718a6f62a009492d08ff\"\n    PKG_URL=\"https://github.com/crazycat69/media_build/archive/${PKG_VERSION}.tar.gz\"\n    PKG_DEPENDS_TARGET+=\" media_tree_aml\"\n    PKG_NEED_UNPACK+=\" $(get_pkg_directory media_tree_aml)\"\n    PKG_PATCH_DIRS=\"amlogic-4.9\"\n    ;;\n  amlogic-5.4)\n    PKG_VERSION=\"b8d777fd6c5a274f5f87cb7e67dae22e543d6554\"\n    PKG_SHA256=\"7a886032177fc7ca12abd120a14f81af5ff0ebffc225e8538d8cc332bb5cd765\"\n    PKG_URL=\"https://github.com/crazycat69/media_build/archive/${PKG_VERSION}.tar.gz\"\n    PKG_PATCH_DIRS=\"amlogic-5.4\"\n    ;;\nesac\n\npre_make_target() {\n  export KERNEL_VER=$(get_module_dir)\n  export LDFLAGS=\"\"\n}\n\nmake_target() {\n  cp -RP $(get_build_dir media_tree_cc)/* ${PKG_BUILD}/linux\n  if [[ \"${DEVICE}\" = \"Amlogic-ng\"* ]]; then\n    cp -Lr $(get_build_dir media_tree_aml)/* ${PKG_BUILD}/linux\n    echo \"obj-y += video_dev/\" >> \"${PKG_BUILD}/linux/drivers/media/platform/meson/Makefile\"\n    echo \"obj-y += dvb/\" >> \"${PKG_BUILD}/linux/drivers/media/platform/meson/Makefile\"\n    echo 'source \"drivers/media/platform/meson/dvb/Kconfig\"' >>  \"${PKG_BUILD}/linux/drivers/media/platform/Kconfig\"\n    sed -e 's/ && RC_CORE//g' -i ${PKG_BUILD}/linux/drivers/media/usb/dvb-usb/Kconfig\n  fi\n\n  # make config all\n  kernel_make VER=${KERNEL_VER} SRCDIR=$(kernel_path) allyesconfig\n\n  # add menuconfig to edit .config\n  kernel_make VER=${KERNEL_VER} SRCDIR=$(kernel_path)\n}\n\nmakeinstall_target() {\n  install_driver_addon_files \"${PKG_BUILD}/v4l/\"\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/crazycat/patches/amlogic-4.9/driver.dvb.crazycat-01-remove-rmmod.pl.patch",
    "content": "[Patch] without this patch you need to install libproc-processtable-perl at host system\n\n--- a/v4l/Makefile\n+++ b/v4l/Makefile\n@@ -51,7 +51,7 @@\n \t@echo Kernel build directory is $(OUTDIR)\n \t$(MAKE) -C ../linux apply_patches\n \t$(MAKE) -C $(OUTDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules\n-\t./scripts/rmmod.pl check\n+#\t./scripts/rmmod.pl check\n #\t$(MAKE) checkpatch\n \n mismatch:: prepare firmware\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/crazycat/patches/amlogic-4.9/driver.dvb.crazycat-02-disable-modules.patch",
    "content": "--- a/v4l/scripts/make_kconfig.pl\n+++ b/v4l/scripts/make_kconfig.pl\n@@ -626,6 +626,12 @@ ($$)\n close OUT;\n \n # These options should default to off\n+disable_config('MEDIA_ANALOG_TV_SUPPORT');\n+disable_config('MEDIA_CAMERA_SUPPORT');\n+disable_config('MEDIA_CEC_SUPPORT');\n+disable_config('SOC_CAMERA');\n+disable_config('VIDEO_SAA7146_VV');\n+disable_config('RC_CORE');\n disable_config('DVB_AV7110_FIRMWARE');\n disable_config('DVB_CINERGYT2_TUNING');\n disable_config('VIDEO_HELPER_CHIPS_AUTO');\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/crazycat/patches/amlogic-4.9/driver.dvb.crazycat-03-config_mycompat_h.patch",
    "content": "--- /dev/null\n+++ b/v4l/config-mycompat.h\n@@ -0,0 +1,8 @@\n+#undef smp_mb__after_atomic\n+#define smp_mb__after_atomic()  smp_mb() /*mb*/\n+#undef NEED_SMP_MB_AFTER_ATOMIC\n+#undef writel_relaxed\n+#define writel_relaxed(v,c) ((void)__raw_writel((__force u32)cpu_to_le32(v),(c)))\n+#undef NEED_WRITEL_RELAXED\n+#undef NEED_PM_RUNTIME_GET\n+#undef NEED_OF_NODE_NAME_EQ\n--\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/crazycat/patches/amlogic-4.9/driver.dvb.crazycat-04-add-include-prandom-h.patch",
    "content": "From 10cee8e4d90788f865f6378a250cde4ab9d29f5d Mon Sep 17 00:00:00 2001\nFrom: Hans Verkuil <hverkuil-cisco@xs4all.nl>\nDate: Wed, 19 Aug 2020 09:51:02 +0200\nSubject: [PATCH] Add include/linux/prandom.h as alternate header to look in\n\nSigned-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>\n---\n v4l/scripts/make_config_compat.pl | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl\nindex 2591d92..f99a180 100644\n--- a/v4l/scripts/make_config_compat.pl\n+++ b/v4l/scripts/make_config_compat.pl\n@@ -655,8 +655,8 @@ sub check_other_dependencies()\n \tcheck_files_for_func(\"mp_mb__after_atomic\", \"NEED_SMP_MB_AFTER_ATOMIC\", \"include/asm-generic/barrier.h\");\n \tcheck_files_for_func(\"pci_zalloc_consistent\", \"NEED_PCI_ZALLOC_CONSISTENT\", \"include/asm-generic/pci-dma-compat.h\", \"include/linux/pci-dma-compat.h\");\n \tcheck_files_for_func(\"kref_get_unless_zero\", \"NEED_KREF_GET_UNLESS_ZERO\", \"include/linux/kref.h\");\n-\tcheck_files_for_func(\"prandom_u32_max\", \"NEED_PRANDOM_U32_MAX\", \"include/linux/random.h\");\n-\tcheck_files_for_func(\"prandom_u32\", \"NEED_PRANDOM_U32\", \"include/linux/random.h\");\n+\tcheck_files_for_func(\"prandom_u32_max\", \"NEED_PRANDOM_U32_MAX\", \"include/linux/random.h\", \"include/linux/prandom.h\");\n+\tcheck_files_for_func(\"prandom_u32\", \"NEED_PRANDOM_U32\", \"include/linux/random.h\", \"include/linux/prandom.h\");\n \tcheck_files_for_func(\"GENMASK\", \"NEED_GENMASK\", \"include/linux/bitops.h\", \"include/linux/bits.h\");\n \tcheck_files_for_func(\"mult_frac\", \"NEED_MULT_FRAC\", \"include/linux/kernel.h\");\n \tcheck_files_for_func(\"clk_prepare_enable\", \"NEED_CLOCK_HELPERS\", \"include/linux/clk.h\");\n@@ -718,7 +718,7 @@ sub check_other_dependencies()\n \tcheck_files_for_func(\"usb_urb_ep_type_check\", \"NEED_USB_EP_CHECK\", \"include/linux/usb.h\");\n \tcheck_files_for_func(\"get_user_pages_longterm\", \"NEED_GET_USER_PAGES_LONGTERM\", \"include/linux/mm.h\");\n \tcheck_files_for_func(\"__pfn_to_phys\", \"NEED_PFN_TO_PHYS\", \"include/asm-generic/memory_model.h\");\n-\tcheck_files_for_func(\"next_pseudo_random32\", \"NEED_NEXT_PSEUDO_RANDOM32\", \"include/linux/random.h\");\n+\tcheck_files_for_func(\"next_pseudo_random32\", \"NEED_NEXT_PSEUDO_RANDOM32\", \"include/linux/random.h\", \"include/linux/prandom.h\");\n \tcheck_files_for_func(\"i2c_new_secondary_device\", \"NEED_I2C_NEW_SECONDARY_DEV\", \"include/linux/i2c.h\");\n \tcheck_files_for_func(\"memdup_user_nul\", \"NEED_MEMDUP_USER_NUL\", \"include/linux/string.h\");\n \tcheck_files_for_func(\"STACK_FRAME_NON_STANDARD\", \"NEED_STACK_FRAME_NON_STANDARD\", \"include/linux/frame.h\");\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/crazycat/patches/amlogic-4.9/driver.dvb.crazycat-05-media_build-handle-kernel-sublevel-255.patch",
    "content": "From a313a759f6e46e50b33ac85739ddd7966367cdcd Mon Sep 17 00:00:00 2001\nFrom: Hans Verkuil <hverkuil-cisco@xs4all.nl>\nDate: Tue, 9 Mar 2021 12:01:55 +0100\nSubject: [PATCH] media_build: handle kernel sublevel > 255\n\nSigned-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>\n---\n backports/backports.txt     | 78 ++++++++++++++++++-------------------\n linux/Makefile              |  4 +-\n linux/patches_for_kernel.pl |  1 +\n linux/use_dir.pl            |  2 +-\n 4 files changed, 43 insertions(+), 42 deletions(-)\n\ndiff --git a/backports/backports.txt b/backports/backports.txt\nindex 0806864..1ade47e 100644\n--- a/backports/backports.txt\n+++ b/backports/backports.txt\n@@ -5,7 +5,7 @@\n # by summing the patches needed to backport to all kernel\n # versions higher or equal to the desired one. For example,\n # if this file has:\n-# [3.255.255]\n+# [3.255.1023]\n # add patch_for_upstream.patch\n # [2.6.38]\n # add patch_for_2.6.38.patch\n@@ -20,153 +20,153 @@\n # use linux/patches_for_kernel.pl <version>\n \n # All supported versions need those patches\n-[9.255.255]\n+[9.255.1023]\n add api_version.patch\n add pr_fmt.patch\n add debug.patch\n add drx39xxj.patch\n \n-[5.1.255]\n+[5.1.1023]\n add v5.1_vm_map_pages.patch\n \n-[5.0.255]\n+[5.0.1023]\n add v5.0_ipu3-cio2.patch\n \n-[4.20.255]\n+[4.20.1023]\n add v4.20_access_ok.patch\n \n-[4.18.255]\n+[4.18.1023]\n add v4.18_fwnode_args_args.patch\n add v4.18_add_map_atomic.patch\n \n-[4.17.255]\n+[4.17.1023]\n add v4.17_proc_create_single.patch\n add v4.17_i2c_check_num_msgs.patch\n \n-[4.15.255]\n+[4.15.1023]\n add v4.15_pmdown_time.patch\n \n-[4.14.255]\n+[4.14.1023]\n add v4.14_saa7146_timer_cast.patch\n add v4.14_module_param_call.patch\n \n-[4.13.255]\n+[4.13.1023]\n add v4.13_remove_nospec_h.patch\n add v4.13_drmP.patch\n \n-[4.12.255]\n+[4.12.1023]\n add v4.12_revert_solo6x10_copykerneluser.patch\n \n-[4.11.255]\n+[4.11.1023]\n add v4.11_drop_drm_file.patch\n \n-[4.10.255]\n+[4.10.1023]\n add v4.10_sched_signal.patch\n add v4.10_fault_page.patch\n add v4.10_refcount.patch\n \n-[4.9.255]\n+[4.9.1023]\n add v4.9_mm_address.patch\n add v4.9_dvb_net_max_mtu.patch\n \n-[4.8.255]\n+[4.8.1023]\n add v4.8_user_pages_flag.patch\n add v4.8_em28xx_bitfield.patch\n add v4.8_dma_map_resource.patch\n add v4.8_drm_crtc.patch\n \n-[4.7.255]\n+[4.7.1023]\n add v4.7_dma_attrs.patch\n add v4.7_pci_alloc_irq_vectors.patch\n add v4.7_copy_to_user_warning.patch\n add v4.7_objtool_warning.patch\n \n-[4.6.255]\n+[4.6.1023]\n add v4.6_i2c_mux.patch\n \n-[4.5.255]\n+[4.5.1023]\n add v4.5_gpiochip_data_pointer.patch\n add v4.5_get_user_pages.patch\n add v4.5_uvc_super_plus.patch\n add v4.5_copy_to_user_warning.patch\n \n-[4.4.255]\n+[4.4.1023]\n add v4.4_gpio_chip_parent.patch\n \n-[4.3.255]\n+[4.3.1023]\n add v4.3_bt87x_const_fix.patch\n \n-[4.2.255]\n+[4.2.1023]\n add v4.2_atomic64.patch\n add v4.2_frame_vector.patch\n \n-[4.1.255]\n+[4.1.1023]\n add v4.1_pat_enabled.patch\n add v4.1_drop_fwnode.patch\n \n-[4.0.255]\n+[4.0.1023]\n add v4.0_dma_buf_export.patch\n add v4.0_drop_trace.patch\n add v4.0_fwnode.patch\n \n-[3.19.255]\n+[3.19.1023]\n add v3.19_get_user_pages_unlocked.patch\n add v3.19_get_user_pages_locked.patch\n \n-[3.18.255]\n+[3.18.1023]\n add v3.18_drop_property_h.patch\n add v3.18_ktime_get_real_seconds.patch\n \n-[3.17.255]\n+[3.17.1023]\n add v3.17_fix_clamp.patch\n add v3.17_remove_bpf_h.patch\n \n-[3.16.255]\n+[3.16.1023]\n add v3.16_netdev.patch\n add v3.16_wait_on_bit.patch\n add v3.16_void_gpiochip_remove.patch\n \n-[3.13.255]\n+[3.13.1023]\n add v3.13_ddbridge_pcimsi.patch\n \n-[3.12.255]\n+[3.12.1023]\n add v3.12_kfifo_in.patch\n \n-[3.11.255]\n+[3.11.1023]\n add v3.11_dev_groups.patch\n \n-[3.10.255]\n+[3.10.1023]\n add v3.10_fw_driver_probe.patch\n add v3.10_ir_hix5hd2.patch\n add v3.10_const_snd_pcm_ops.patch\n \n-[3.9.255]\n+[3.9.1023]\n add v3.9_drxj_warnings.patch\n \n-[3.8.255]\n+[3.8.1023]\n add v3.8_config_of.patch\n \n-[3.6.255]\n+[3.6.1023]\n add v3.6_pci_error_handlers.patch\n add v3.6_i2c_add_mux_adapter.patch\n \n-[3.4.255]\n+[3.4.1023]\n add v3.4_i2c_add_mux_adapter.patch\n add v3.4_stk_webcam.patch\n \n-[3.3.255]\n+[3.3.1023]\n add v3.3_eprobe_defer.patch\n \n-[3.2.255]\n+[3.2.1023]\n add v3.2_devnode_uses_mode_t.patch\n add v3.2_alloc_ordered_workqueue.patch\n \n-[3.1.255]\n+[3.1.1023]\n add v3.1_no_export_h.patch\n add v3.1_no_dma_buf_h.patch\n add v3.1_no_pm_qos.patch\n \n-[3.0.255]\n+[3.0.1023]\n add no_atomic_include.patch\n add v3.0_ida2bit.patch\n add v3.0_remove_ida_lird_dev.patch\ndiff --git a/linux/Makefile b/linux/Makefile\nindex c7a4341..8cfc932 100644\n--- a/linux/Makefile\n+++ b/linux/Makefile\n@@ -80,7 +80,7 @@ todaytar:\n \t-rm -f $(PWD)/$(TODAY_TAR).bz2\n \ttar cf $(PWD)/$(TODAY_TAR) -C $(DIR) $(TARFILES)\n \tgit --git-dir $(DIR)/.git log --pretty=oneline -n3 |sed -r 's,([\\x22]),,g; s,([\\x25\\x5c]),\\1\\1,g' >git_log\n-\tperl -e 'while (<>) { $$a=$$1 if (m/^\\s*VERSION\\s*=\\s*(\\d+)/); $$b=$$1 if (m/^\\s*PATCHLEVEL\\s*=\\s*(\\d+)/); $$c=$$1 if (m/^\\s*SUBLEVEL\\s*=\\s*(\\d+)/); } printf \"#define V4L2_VERSION %d\\n\", ((($$a) << 16) + (($$b) << 8) + ($$c))' $(DIR)/Makefile > kernel_version.h\n+\tperl -e 'while (<>) { $$a=$$1 if (m/^\\s*VERSION\\s*=\\s*(\\d+)/); $$b=$$1 if (m/^\\s*PATCHLEVEL\\s*=\\s*(\\d+)/); $$c=$$1 if (m/^\\s*SUBLEVEL\\s*=\\s*(\\d+)/); } printf \"#define V4L2_VERSION %d\\n\", ((($$a) << 16) + (($$b) << 8) + ($$c > 255 ? 255 : $$c))' $(DIR)/Makefile > kernel_version.h\n \ttar rvf $(PWD)/$(TODAY_TAR) git_log kernel_version.h\n \n \tfor i in $(TARDIR); do \\\n@@ -99,7 +99,7 @@ tar:\n \t-rm -f $(PWD)/linux-media.tar.bz2\n \ttar cf $(PWD)/linux-media.tar -C $(DIR) $(TARFILES)\n \tgit --git-dir $(DIR)/.git log --pretty=oneline -n3 |sed -r 's,([\\x22]),,g; s,([\\x25\\x5c]),\\1\\1,g' >git_log\n-\tperl -e 'while (<>) { $$a=$$1 if (m/^\\s*VERSION\\s*=\\s*(\\d+)/); $$b=$$1 if (m/^\\s*PATCHLEVEL\\s*=\\s*(\\d+)/); $$c=$$1 if (m/^\\s*SUBLEVEL\\s*=\\s*(\\d+)/); } printf \"#define V4L2_VERSION %d\\n\", ((($$a) << 16) + (($$b) << 8) + ($$c))' $(DIR)/Makefile > kernel_version.h\n+\tperl -e 'while (<>) { $$a=$$1 if (m/^\\s*VERSION\\s*=\\s*(\\d+)/); $$b=$$1 if (m/^\\s*PATCHLEVEL\\s*=\\s*(\\d+)/); $$c=$$1 if (m/^\\s*SUBLEVEL\\s*=\\s*(\\d+)/); } printf \"#define V4L2_VERSION %d\\n\", ((($$a) << 16) + (($$b) << 8) + ($$c > 255 ? 255 : $$c))' $(DIR)/Makefile > kernel_version.h\n \ttar rvf $(PWD)/linux-media.tar git_log kernel_version.h\n \tfor i in $(TARDIR); do \\\n \t\tif [ \"`echo $$i|grep Documentation`\" = \"\" ]; then \\\ndiff --git a/linux/patches_for_kernel.pl b/linux/patches_for_kernel.pl\nindex 91b79fd..6ab3077 100755\n--- a/linux/patches_for_kernel.pl\n+++ b/linux/patches_for_kernel.pl\n@@ -22,6 +22,7 @@ sub kernel_version($) {\n \t\t$sublevel = 0;\n \t}\n \t$sublevel = 0 if ($sublevel == \"\");\n+\t$sublevel = 255 if ($sublevel > 255);\n \treturn ($version * 65536 + $patchlevel * 256 + $sublevel);\n }\n \ndiff --git a/linux/use_dir.pl b/linux/use_dir.pl\nindex b461ec5..7ca8b35 100755\n--- a/linux/use_dir.pl\n+++ b/linux/use_dir.pl\n@@ -291,7 +291,7 @@ sub sync_kernel_version()\n \t\t$c=$1 if (m/^\\s*SUBLEVEL\\s*=\\s*(\\d+)/);\n \t}\n \tclose IN;\n-\t$source_v4l_version = ((($a) << 16) + (($b) << 8) + ($c));\n+\t$source_v4l_version = ((($a) << 16) + (($b) << 8) + ($c > 255 ? 255 : $c));\n \n \tif (open IN, \"kernel_version.h\") {\n \t\twhile (<IN>) {\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/crazycat/patches/amlogic-5.4/driver.dvb.crazycat-01-remove-rmmod.pl.patch",
    "content": "[Patch] without this patch you need to install libproc-processtable-perl at host system\n\n--- a/v4l/Makefile\n+++ b/v4l/Makefile\n@@ -51,7 +51,7 @@ default:: prepare firmware\n \t@echo Kernel build directory is $(OUTDIR)\n \t$(MAKE) -C ../linux apply_patches\n \t$(MAKE) -C $(OUTDIR) M=$(PWD) $(MYCFLAGS) modules\n-\t./scripts/rmmod.pl check\n+#\t./scripts/rmmod.pl check\n #\t$(MAKE) checkpatch\n \n mismatch:: prepare firmware\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/crazycat/patches/amlogic-5.4/driver.dvb.crazycat-02-disable-modules.patch",
    "content": "--- a/v4l/scripts/make_kconfig.pl\n+++ b/v4l/scripts/make_kconfig.pl\n@@ -626,6 +626,12 @@ ($$)\n close OUT;\n \n # These options should default to off\n+disable_config('MEDIA_ANALOG_TV_SUPPORT');\n+disable_config('MEDIA_CAMERA_SUPPORT');\n+disable_config('MEDIA_CEC_SUPPORT');\n+disable_config('SOC_CAMERA');\n+disable_config('VIDEO_SAA7146_VV');\n+disable_config('RC_CORE');\n disable_config('DVB_AV7110_FIRMWARE');\n disable_config('DVB_CINERGYT2_TUNING');\n disable_config('VIDEO_HELPER_CHIPS_AUTO');\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/crazycat/patches/amlogic-5.4/driver.dvb.crazycat-03-config_mycompat_h.patch",
    "content": "--- /dev/null\n+++ b/v4l/config-mycompat.h\n@@ -0,0 +1,8 @@\n+#undef smp_mb__after_atomic\n+#define smp_mb__after_atomic()  smp_mb() /*mb*/\n+#undef NEED_SMP_MB_AFTER_ATOMIC\n+#undef writel_relaxed\n+#define writel_relaxed(v,c) ((void)__raw_writel((__force u32)cpu_to_le32(v),(c)))\n+#undef NEED_WRITEL_RELAXED\n+#undef NEED_PM_RUNTIME_GET\n+#undef NEED_OF_NODE_NAME_EQ\n--\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/crazycat/patches/amlogic-5.4/driver.dvb.crazycat-04-add-include-prandom-h.patch",
    "content": "From 3650720e6777c763627e78fc48075c86bef60a1b Mon Sep 17 00:00:00 2001\nFrom: Hans Verkuil <hverkuil-cisco@xs4all.nl>\nDate: Wed, 19 Aug 2020 09:51:02 +0200\nSubject: [PATCH] Add include/linux/prandom.h as alternate header to look in\n\nSigned-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>\n---\n v4l/scripts/make_config_compat.pl | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl\nindex 6a1ddf1..f579fc4 100644\n--- a/v4l/scripts/make_config_compat.pl\n+++ b/v4l/scripts/make_config_compat.pl\n@@ -656,8 +656,8 @@ sub check_other_dependencies()\n \tcheck_files_for_func(\"mp_mb__after_atomic\", \"NEED_SMP_MB_AFTER_ATOMIC\", \"include/asm-generic/barrier.h\");\n \tcheck_files_for_func(\"pci_zalloc_consistent\", \"NEED_PCI_ZALLOC_CONSISTENT\", \"include/asm-generic/pci-dma-compat.h\", \"include/linux/pci-dma-compat.h\");\n \tcheck_files_for_func(\"kref_get_unless_zero\", \"NEED_KREF_GET_UNLESS_ZERO\", \"include/linux/kref.h\");\n-\tcheck_files_for_func(\"prandom_u32_max\", \"NEED_PRANDOM_U32_MAX\", \"include/linux/random.h\");\n-\tcheck_files_for_func(\"prandom_u32\", \"NEED_PRANDOM_U32\", \"include/linux/random.h\");\n+\tcheck_files_for_func(\"prandom_u32_max\", \"NEED_PRANDOM_U32_MAX\", \"include/linux/random.h\", \"include/linux/prandom.h\");\n+\tcheck_files_for_func(\"prandom_u32\", \"NEED_PRANDOM_U32\", \"include/linux/random.h\", \"include/linux/prandom.h\");\n \tcheck_files_for_func(\"GENMASK\", \"NEED_GENMASK\", \"include/linux/bitops.h\", \"include/linux/bits.h\");\n \tcheck_files_for_func(\"mult_frac\", \"NEED_MULT_FRAC\", \"include/linux/kernel.h\");\n \tcheck_files_for_func(\"clk_prepare_enable\", \"NEED_CLOCK_HELPERS\", \"include/linux/clk.h\");\n@@ -720,7 +720,7 @@ sub check_other_dependencies()\n \tcheck_files_for_func(\"usb_urb_ep_type_check\", \"NEED_USB_EP_CHECK\", \"include/linux/usb.h\");\n \tcheck_files_for_func(\"get_user_pages_longterm\", \"NEED_GET_USER_PAGES_LONGTERM\", \"include/linux/mm.h\");\n \tcheck_files_for_func(\"__pfn_to_phys\", \"NEED_PFN_TO_PHYS\", \"include/asm-generic/memory_model.h\");\n-\tcheck_files_for_func(\"next_pseudo_random32\", \"NEED_NEXT_PSEUDO_RANDOM32\", \"include/linux/random.h\");\n+\tcheck_files_for_func(\"next_pseudo_random32\", \"NEED_NEXT_PSEUDO_RANDOM32\", \"include/linux/random.h\", \"include/linux/prandom.h\");\n \tcheck_files_for_func(\"memdup_user_nul\", \"NEED_MEMDUP_USER_NUL\", \"include/linux/string.h\");\n \tcheck_files_for_func(\"STACK_FRAME_NON_STANDARD\", \"NEED_STACK_FRAME_NON_STANDARD\", \"include/linux/frame.h\");\n \tcheck_files_for_func(\"pci_free_irq_vectors\", \"NEED_PCI_FREE_IRQ_VECTORS\", \"include/linux/pci.h\");\n-- \n2.38.2\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/crazycat/patches/amlogic-5.4/driver.dvb.crazycat-05-do-not-handle-warning-as-error.patch",
    "content": "diff --git a/v4l/Makefile b/v4l/Makefile\nindex d6e4d69..c0cf389 100644\n--- a/v4l/Makefile\n+++ b/v4l/Makefile\n@@ -146,6 +146,8 @@ EXTRA_CFLAGS += -include $(obj)/compat.h\n # gives too much warnings (false positives) -> disable it\n EXTRA_CFLAGS += -Wno-format-truncation\n \n+EXTRA_CFLAGS += -Wno-error\n+\n #################################################\n # Kernel 2.6/3.x specific rules\n \n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/crazycat/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/dvb-latest/changelog.txt",
    "content": "100\n- Initial add-on\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/dvb-latest/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"dvb-latest\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://git.linuxtv.org/media_build.git\"\nPKG_URL=\"https://git.linuxtv.org/media_build.git\"\nGET_HANDLER_SUPPORT=\"git\"\nPKG_DEPENDS_TARGET=\"toolchain linux media_tree\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS} $(get_pkg_directory media_tree)\"\nPKG_SECTION=\"driver.dvb\"\nPKG_LONGDESC=\"DVB drivers from the latest kernel (media_build)\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_ADDON_IS_STANDALONE=\"yes\"\nPKG_ADDON_NAME=\"DVB drivers from the latest kernel\"\nPKG_ADDON_TYPE=\"xbmc.service\"\nPKG_ADDON_VERSION=\"${ADDON_VERSION}.${PKG_REV}\"\nPKG_ADDON_REQUIRES=\"script.program.driverselect:0.0.0\"\n\nPKG_PATCH_DIRS=\"amlogic-common\"\ncase \"${LINUX}\" in\n  amlogic-4.9)\n    PKG_VERSION=\"0f25e6fb13b6bc345218800ad9ac863deb2ee9c8\"\n    PKG_DEPENDS_TARGET+=\" media_tree_aml\"\n    PKG_NEED_UNPACK+=\" $(get_pkg_directory media_tree_aml)\"\n    PKG_PATCH_DIRS+=\" amlogic-4.9\"\n    ;;\n  amlogic-5.4)\n    PKG_VERSION=\"680a07be51069bee47a07a4bcf36c5176f1290a4\"\n    PKG_PATCH_DIRS+=\" amlogic-5.4\"\n    ;;\nesac\n\npre_make_target() {\n  export KERNEL_VER=$(get_module_dir)\n  export LDFLAGS=\"\"\n}\n\nmake_target() {\n  cp -RP $(get_build_dir media_tree)/* ${PKG_BUILD}/linux\n\n  if [[ \"${DEVICE}\" = \"Amlogic-ng\"* ]]; then\n    cp -Lr $(get_build_dir media_tree_aml)/* ${PKG_BUILD}/linux\n\n    # compile modules\n    echo \"obj-y += video_dev/\" >> \"${PKG_BUILD}/linux/drivers/media/platform/meson/Makefile\"\n    echo \"obj-y += dvb/\" >> \"${PKG_BUILD}/linux/drivers/media/platform/meson/Makefile\"\n    echo 'source \"drivers/media/platform/meson/dvb/Kconfig\"' >>  \"${PKG_BUILD}/linux/drivers/media/platform/Kconfig\"\n    sed -e 's/ && RC_CORE//g' -i ${PKG_BUILD}/linux/drivers/media/usb/dvb-usb/Kconfig\n  fi\n\n  # make config all\n  kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path) allyesconfig\n\n  kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path)\n}\n\nmakeinstall_target() {\n  install_driver_addon_files \"${PKG_BUILD}/v4l/\"\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/dvb-latest/patches/amlogic-4.9/driver.dvb.dvb-latest-01-remove-rmmod.pl.patch",
    "content": "diff --git a/v4l/Makefile b/v4l/Makefile\n--- a/v4l/Makefile\n+++ b/v4l/Makefile\n@@ -51,7 +51,6 @@ default:: prepare firmware\n \t@echo Kernel build directory is $(OUTDIR)\n \t$(MAKE) -C ../linux apply_patches\n \t$(MAKE) -C $(OUTDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules\n-\t./scripts/rmmod.pl check\n #\t$(MAKE) checkpatch\n \n mismatch:: prepare firmware\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/dvb-latest/patches/amlogic-4.9/driver.dvb.dvb-latest-03-add-include-prandom-h.patch",
    "content": "From 10cee8e4d90788f865f6378a250cde4ab9d29f5d Mon Sep 17 00:00:00 2001\nFrom: Hans Verkuil <hverkuil-cisco@xs4all.nl>\nDate: Wed, 19 Aug 2020 09:51:02 +0200\nSubject: [PATCH] Add include/linux/prandom.h as alternate header to look in\n\nSigned-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>\n---\n v4l/scripts/make_config_compat.pl | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl\nindex 2591d92..f99a180 100644\n--- a/v4l/scripts/make_config_compat.pl\n+++ b/v4l/scripts/make_config_compat.pl\n@@ -655,8 +655,8 @@ sub check_other_dependencies()\n \tcheck_files_for_func(\"mp_mb__after_atomic\", \"NEED_SMP_MB_AFTER_ATOMIC\", \"include/asm-generic/barrier.h\");\n \tcheck_files_for_func(\"pci_zalloc_consistent\", \"NEED_PCI_ZALLOC_CONSISTENT\", \"include/asm-generic/pci-dma-compat.h\", \"include/linux/pci-dma-compat.h\");\n \tcheck_files_for_func(\"kref_get_unless_zero\", \"NEED_KREF_GET_UNLESS_ZERO\", \"include/linux/kref.h\");\n-\tcheck_files_for_func(\"prandom_u32_max\", \"NEED_PRANDOM_U32_MAX\", \"include/linux/random.h\");\n-\tcheck_files_for_func(\"prandom_u32\", \"NEED_PRANDOM_U32\", \"include/linux/random.h\");\n+\tcheck_files_for_func(\"prandom_u32_max\", \"NEED_PRANDOM_U32_MAX\", \"include/linux/random.h\", \"include/linux/prandom.h\");\n+\tcheck_files_for_func(\"prandom_u32\", \"NEED_PRANDOM_U32\", \"include/linux/random.h\", \"include/linux/prandom.h\");\n \tcheck_files_for_func(\"GENMASK\", \"NEED_GENMASK\", \"include/linux/bitops.h\", \"include/linux/bits.h\");\n \tcheck_files_for_func(\"mult_frac\", \"NEED_MULT_FRAC\", \"include/linux/kernel.h\");\n \tcheck_files_for_func(\"clk_prepare_enable\", \"NEED_CLOCK_HELPERS\", \"include/linux/clk.h\");\n@@ -718,7 +718,7 @@ sub check_other_dependencies()\n \tcheck_files_for_func(\"usb_urb_ep_type_check\", \"NEED_USB_EP_CHECK\", \"include/linux/usb.h\");\n \tcheck_files_for_func(\"get_user_pages_longterm\", \"NEED_GET_USER_PAGES_LONGTERM\", \"include/linux/mm.h\");\n \tcheck_files_for_func(\"__pfn_to_phys\", \"NEED_PFN_TO_PHYS\", \"include/asm-generic/memory_model.h\");\n-\tcheck_files_for_func(\"next_pseudo_random32\", \"NEED_NEXT_PSEUDO_RANDOM32\", \"include/linux/random.h\");\n+\tcheck_files_for_func(\"next_pseudo_random32\", \"NEED_NEXT_PSEUDO_RANDOM32\", \"include/linux/random.h\", \"include/linux/prandom.h\");\n \tcheck_files_for_func(\"i2c_new_secondary_device\", \"NEED_I2C_NEW_SECONDARY_DEV\", \"include/linux/i2c.h\");\n \tcheck_files_for_func(\"memdup_user_nul\", \"NEED_MEMDUP_USER_NUL\", \"include/linux/string.h\");\n \tcheck_files_for_func(\"STACK_FRAME_NON_STANDARD\", \"NEED_STACK_FRAME_NON_STANDARD\", \"include/linux/frame.h\");\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/dvb-latest/patches/amlogic-4.9/driver.dvb.dvb-latest-04-media_build-handle-kernel-sublevel-255.patch",
    "content": "From 367396dcd901cf3b6c8e988435cadfe178c00e51 Mon Sep 17 00:00:00 2001\nFrom: Hans Verkuil <hverkuil-cisco@xs4all.nl>\nDate: Tue, 9 Mar 2021 12:01:55 +0100\nSubject: [PATCH] media_build: handle kernel sublevel > 255\n\nSigned-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>\n---\n backports/backports.txt     | 76 ++++++++++++++++++-------------------\n linux/Makefile              |  4 +-\n linux/patches_for_kernel.pl |  1 +\n linux/use_dir.pl            |  2 +-\n 4 files changed, 42 insertions(+), 41 deletions(-)\n\ndiff --git a/backports/backports.txt b/backports/backports.txt\nindex 3c5ca37..605cc4a 100644\n--- a/backports/backports.txt\n+++ b/backports/backports.txt\n@@ -5,7 +5,7 @@\n # by summing the patches needed to backport to all kernel\n # versions higher or equal to the desired one. For example,\n # if this file has:\n-# [3.255.255]\n+# [3.255.1023]\n # add patch_for_upstream.patch\n # [2.6.38]\n # add patch_for_2.6.38.patch\n@@ -20,150 +20,150 @@\n # use linux/patches_for_kernel.pl <version>\n\n # All supported versions need those patches\n-[9.255.255]\n+[9.255.1023]\n add api_version.patch\n add pr_fmt.patch\n add debug.patch\n add drx39xxj.patch\n\n-[5.1.255]\n+[5.1.1023]\n add v5.1_vm_map_pages.patch\n\n-[5.0.255]\n+[5.0.1023]\n add v5.0_ipu3-cio2.patch\n\n\n-[4.18.255]\n+[4.18.1023]\n add v4.18_fwnode_args_args.patch\n add v4.18_add_map_atomic.patch\n\n-[4.17.255]\n+[4.17.1023]\n add v4.17_proc_create_single.patch\n add v4.17_i2c_check_num_msgs.patch\n\n-[4.15.255]\n+[4.15.1023]\n add v4.15_pmdown_time.patch\n\n-[4.14.255]\n+[4.14.1023]\n add v4.14_saa7146_timer_cast.patch\n add v4.14_module_param_call.patch\n\n-[4.13.255]\n+[4.13.1023]\n add v4.13_remove_nospec_h.patch\n add v4.13_drmP.patch\n\n-[4.12.255]\n+[4.12.1023]\n add v4.12_revert_solo6x10_copykerneluser.patch\n\n-[4.11.255]\n+[4.11.1023]\n add v4.11_drop_drm_file.patch\n\n-[4.10.255]\n+[4.10.1023]\n add v4.10_sched_signal.patch\n add v4.10_fault_page.patch\n add v4.10_refcount.patch\n\n-[4.9.255]\n+[4.9.1023]\n add v4.9_mm_address.patch\n add v4.9_dvb_net_max_mtu.patch\n\n-[4.8.255]\n+[4.8.1023]\n add v4.8_user_pages_flag.patch\n add v4.8_em28xx_bitfield.patch\n add v4.8_dma_map_resource.patch\n add v4.8_drm_crtc.patch\n\n-[4.7.255]\n+[4.7.1023]\n add v4.7_dma_attrs.patch\n add v4.7_pci_alloc_irq_vectors.patch\n add v4.7_copy_to_user_warning.patch\n add v4.7_objtool_warning.patch\n\n-[4.6.255]\n+[4.6.1023]\n add v4.6_i2c_mux.patch\n\n-[4.5.255]\n+[4.5.1023]\n add v4.5_gpiochip_data_pointer.patch\n add v4.5_get_user_pages.patch\n add v4.5_uvc_super_plus.patch\n add v4.5_copy_to_user_warning.patch\n\n-[4.4.255]\n+[4.4.1023]\n add v4.4_gpio_chip_parent.patch\n\n-[4.3.255]\n+[4.3.1023]\n add v4.3_bt87x_const_fix.patch\n\n-[4.2.255]\n+[4.2.1023]\n add v4.2_atomic64.patch\n add v4.2_frame_vector.patch\n\n-[4.1.255]\n+[4.1.1023]\n add v4.1_drop_fwnode.patch\n\n-[4.0.255]\n+[4.0.1023]\n add v4.0_dma_buf_export.patch\n add v4.0_drop_trace.patch\n add v4.0_fwnode.patch\n\n-[3.19.255]\n+[3.19.1023]\n add v3.19_get_user_pages_unlocked.patch\n add v3.19_get_user_pages_locked.patch\n\n-[3.18.255]\n+[3.18.1023]\n add v3.18_drop_property_h.patch\n add v3.18_ktime_get_real_seconds.patch\n\n-[3.17.255]\n+[3.17.1023]\n add v3.17_fix_clamp.patch\n add v3.17_remove_bpf_h.patch\n\n-[3.16.255]\n+[3.16.1023]\n add v3.16_netdev.patch\n add v3.16_wait_on_bit.patch\n add v3.16_void_gpiochip_remove.patch\n\n-[3.13.255]\n+[3.13.1023]\n add v3.13_ddbridge_pcimsi.patch\n\n-[3.12.255]\n+[3.12.1023]\n add v3.12_kfifo_in.patch\n\n-[3.11.255]\n+[3.11.1023]\n add v3.11_dev_groups.patch\n\n-[3.10.255]\n+[3.10.1023]\n add v3.10_fw_driver_probe.patch\n add v3.10_ir_hix5hd2.patch\n add v3.10_const_snd_pcm_ops.patch\n\n-[3.9.255]\n+[3.9.1023]\n add v3.9_drxj_warnings.patch\n\n-[3.8.255]\n+[3.8.1023]\n add v3.8_config_of.patch\n\n-[3.6.255]\n+[3.6.1023]\n add v3.6_pci_error_handlers.patch\n add v3.6_i2c_add_mux_adapter.patch\n\n-[3.4.255]\n+[3.4.1023]\n add v3.4_i2c_add_mux_adapter.patch\n add v3.4_stk_webcam.patch\n\n-[3.3.255]\n+[3.3.1023]\n add v3.3_eprobe_defer.patch\n\n-[3.2.255]\n+[3.2.1023]\n add v3.2_devnode_uses_mode_t.patch\n add v3.2_alloc_ordered_workqueue.patch\n\n-[3.1.255]\n+[3.1.1023]\n add v3.1_no_export_h.patch\n add v3.1_no_dma_buf_h.patch\n add v3.1_no_pm_qos.patch\n\n-[3.0.255]\n+[3.0.1023]\n add no_atomic_include.patch\n add v3.0_ida2bit.patch\n add v3.0_remove_ida_lird_dev.patch\ndiff --git a/linux/Makefile b/linux/Makefile\nindex e404db9..b028274 100644\n--- a/linux/Makefile\n+++ b/linux/Makefile\n@@ -79,7 +79,7 @@ todaytar:\n \t-rm -f $(PWD)/$(TODAY_TAR).bz2\n \ttar cf $(PWD)/$(TODAY_TAR) -C $(DIR) $(TARFILES)\n \tgit --git-dir $(DIR)/.git log --pretty=oneline -n3 |sed -r 's,([\\x22]),,g; s,([\\x25\\x5c]),\\1\\1,g' >git_log\n-\tperl -e 'while (<>) { $$a=$$1 if (m/^\\s*VERSION\\s*=\\s*(\\d+)/); $$b=$$1 if (m/^\\s*PATCHLEVEL\\s*=\\s*(\\d+)/); $$c=$$1 if (m/^\\s*SUBLEVEL\\s*=\\s*(\\d+)/); } printf \"#define V4L2_VERSION %d\\n\", ((($$a) << 16) + (($$b) << 8) + ($$c))' $(DIR)/Makefile > kernel_version.h\n+\tperl -e 'while (<>) { $$a=$$1 if (m/^\\s*VERSION\\s*=\\s*(\\d+)/); $$b=$$1 if (m/^\\s*PATCHLEVEL\\s*=\\s*(\\d+)/); $$c=$$1 if (m/^\\s*SUBLEVEL\\s*=\\s*(\\d+)/); } printf \"#define V4L2_VERSION %d\\n\", ((($$a) << 16) + (($$b) << 8) + ($$c > 255 ? 255 : $$c))' $(DIR)/Makefile > kernel_version.h\n \ttar rvf $(PWD)/$(TODAY_TAR) git_log kernel_version.h\n\n \tfor i in $(TARDIR); do \\\n@@ -98,7 +98,7 @@ tar:\n \t-rm -f $(PWD)/linux-media.tar.bz2\n \ttar cf $(PWD)/linux-media.tar -C $(DIR) $(TARFILES)\n \tgit --git-dir $(DIR)/.git log --pretty=oneline -n3 |sed -r 's,([\\x22]),,g; s,([\\x25\\x5c]),\\1\\1,g' >git_log\n-\tperl -e 'while (<>) { $$a=$$1 if (m/^\\s*VERSION\\s*=\\s*(\\d+)/); $$b=$$1 if (m/^\\s*PATCHLEVEL\\s*=\\s*(\\d+)/); $$c=$$1 if (m/^\\s*SUBLEVEL\\s*=\\s*(\\d+)/); } printf \"#define V4L2_VERSION %d\\n\", ((($$a) << 16) + (($$b) << 8) + ($$c))' $(DIR)/Makefile > kernel_version.h\n+\tperl -e 'while (<>) { $$a=$$1 if (m/^\\s*VERSION\\s*=\\s*(\\d+)/); $$b=$$1 if (m/^\\s*PATCHLEVEL\\s*=\\s*(\\d+)/); $$c=$$1 if (m/^\\s*SUBLEVEL\\s*=\\s*(\\d+)/); } printf \"#define V4L2_VERSION %d\\n\", ((($$a) << 16) + (($$b) << 8) + ($$c > 255 ? 255 : $$c))' $(DIR)/Makefile > kernel_version.h\n \ttar rvf $(PWD)/linux-media.tar git_log kernel_version.h\n \tfor i in $(TARDIR); do \\\n \t\tif [ \"`echo $$i|grep Documentation`\" = \"\" ]; then \\\ndiff --git a/linux/patches_for_kernel.pl b/linux/patches_for_kernel.pl\nindex 91b79fd..6ab3077 100755\n--- a/linux/patches_for_kernel.pl\n+++ b/linux/patches_for_kernel.pl\n@@ -22,6 +22,7 @@ sub kernel_version($) {\n \t\t$sublevel = 0;\n \t}\n \t$sublevel = 0 if ($sublevel == \"\");\n+\t$sublevel = 255 if ($sublevel > 255);\n \treturn ($version * 65536 + $patchlevel * 256 + $sublevel);\n }\n\ndiff --git a/linux/use_dir.pl b/linux/use_dir.pl\nindex b461ec5..7ca8b35 100755\n--- a/linux/use_dir.pl\n+++ b/linux/use_dir.pl\n@@ -291,7 +291,7 @@ sub sync_kernel_version()\n \t\t$c=$1 if (m/^\\s*SUBLEVEL\\s*=\\s*(\\d+)/);\n \t}\n \tclose IN;\n-\t$source_v4l_version = ((($a) << 16) + (($b) << 8) + ($c));\n+\t$source_v4l_version = ((($a) << 16) + (($b) << 8) + ($c > 255 ? 255 : $c));\n\n \tif (open IN, \"kernel_version.h\") {\n \t\twhile (<IN>) {\n--\n2.33.0\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/dvb-latest/patches/amlogic-5.4/driver.dvb.dvb-latest-01-remove-rmmod.pl.patch",
    "content": "diff --git a/v4l/Makefile b/v4l/Makefile\nindex c45102e..4057e7e 100644\n--- a/v4l/Makefile\n+++ b/v4l/Makefile\n@@ -51,7 +51,7 @@ default:: prepare\n \t@echo Kernel build directory is $(OUTDIR)\n \t$(MAKE) -C ../linux apply_patches\n \t$(MAKE) -C $(OUTDIR) M=$(PWD) $(MYCFLAGS) modules\n-\t./scripts/rmmod.pl check\n+#\t./scripts/rmmod.pl check\n #\t$(MAKE) checkpatch\n \n mismatch:: prepare\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/dvb-latest/patches/amlogic-5.4/driver.dvb.dvb-latest-03-add-include-prandom-h.patch",
    "content": "From 10cee8e4d90788f865f6378a250cde4ab9d29f5d Mon Sep 17 00:00:00 2001\nFrom: Hans Verkuil <hverkuil-cisco@xs4all.nl>\nDate: Wed, 19 Aug 2020 09:51:02 +0200\nSubject: [PATCH] Add include/linux/prandom.h as alternate header to look in\n\nSigned-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>\n---\n v4l/scripts/make_config_compat.pl | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl\nindex 6a1ddf1..f579fc4 100644\n--- a/v4l/scripts/make_config_compat.pl\n+++ b/v4l/scripts/make_config_compat.pl\n@@ -656,8 +656,8 @@ sub check_other_dependencies()\n \tcheck_files_for_func(\"mp_mb__after_atomic\", \"NEED_SMP_MB_AFTER_ATOMIC\", \"include/asm-generic/barrier.h\");\n \tcheck_files_for_func(\"pci_zalloc_consistent\", \"NEED_PCI_ZALLOC_CONSISTENT\", \"include/asm-generic/pci-dma-compat.h\", \"include/linux/pci-dma-compat.h\");\n \tcheck_files_for_func(\"kref_get_unless_zero\", \"NEED_KREF_GET_UNLESS_ZERO\", \"include/linux/kref.h\");\n-\tcheck_files_for_func(\"prandom_u32_max\", \"NEED_PRANDOM_U32_MAX\", \"include/linux/random.h\");\n-\tcheck_files_for_func(\"prandom_u32\", \"NEED_PRANDOM_U32\", \"include/linux/random.h\");\n+\tcheck_files_for_func(\"prandom_u32_max\", \"NEED_PRANDOM_U32_MAX\", \"include/linux/random.h\", \"include/linux/prandom.h\");\n+\tcheck_files_for_func(\"prandom_u32\", \"NEED_PRANDOM_U32\", \"include/linux/random.h\", \"include/linux/prandom.h\");\n \tcheck_files_for_func(\"GENMASK\", \"NEED_GENMASK\", \"include/linux/bitops.h\", \"include/linux/bits.h\");\n \tcheck_files_for_func(\"mult_frac\", \"NEED_MULT_FRAC\", \"include/linux/kernel.h\");\n \tcheck_files_for_func(\"clk_prepare_enable\", \"NEED_CLOCK_HELPERS\", \"include/linux/clk.h\");\n@@ -720,7 +720,7 @@ sub check_other_dependencies()\n \tcheck_files_for_func(\"usb_urb_ep_type_check\", \"NEED_USB_EP_CHECK\", \"include/linux/usb.h\");\n \tcheck_files_for_func(\"get_user_pages_longterm\", \"NEED_GET_USER_PAGES_LONGTERM\", \"include/linux/mm.h\");\n \tcheck_files_for_func(\"__pfn_to_phys\", \"NEED_PFN_TO_PHYS\", \"include/asm-generic/memory_model.h\");\n-\tcheck_files_for_func(\"next_pseudo_random32\", \"NEED_NEXT_PSEUDO_RANDOM32\", \"include/linux/random.h\");\n+\tcheck_files_for_func(\"next_pseudo_random32\", \"NEED_NEXT_PSEUDO_RANDOM32\", \"include/linux/random.h\", \"include/linux/prandom.h\");\n \tcheck_files_for_func(\"memdup_user_nul\", \"NEED_MEMDUP_USER_NUL\", \"include/linux/string.h\");\n \tcheck_files_for_func(\"STACK_FRAME_NON_STANDARD\", \"NEED_STACK_FRAME_NON_STANDARD\", \"include/linux/frame.h\");\n \tcheck_files_for_func(\"pci_free_irq_vectors\", \"NEED_PCI_FREE_IRQ_VECTORS\", \"include/linux/pci.h\");\n-- \n2.33.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/dvb-latest/patches/amlogic-5.4/driver.dvb.dvb-latest-05-do-not-handle-warning-as-error.patch",
    "content": "diff --git a/v4l/Makefile b/v4l/Makefile\nindex d6e4d69..c0cf389 100644\n--- a/v4l/Makefile\n+++ b/v4l/Makefile\n@@ -146,6 +146,8 @@ EXTRA_CFLAGS += -include $(obj)/compat.h\n # gives too much warnings (false positives) -> disable it\n EXTRA_CFLAGS += -Wno-format-truncation\n \n+EXTRA_CFLAGS += -Wno-error\n+\n #################################################\n # Kernel 2.6/3.x specific rules\n \n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/dvb-latest/patches/amlogic-common/driver.dvb.dvb-latest-01-config_mycompat_h.patch",
    "content": "--- /dev/null\n+++ b/v4l/config-mycompat.h\n@@ -0,0 +1,8 @@\n+#undef smp_mb__after_atomic\n+#define smp_mb__after_atomic()  smp_mb() /*mb*/\n+#undef NEED_SMP_MB_AFTER_ATOMIC\n+#undef writel_relaxed\n+#define writel_relaxed(v,c) ((void)__raw_writel((__force u32)cpu_to_le32(v),(c)))\n+#undef NEED_WRITEL_RELAXED\n+#undef NEED_PM_RUNTIME_GET\n+#undef NEED_OF_NODE_NAME_EQ\n--\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/dvb-latest/patches/amlogic-common/driver.dvb.dvb-latest-02-disable-modules.patch",
    "content": "--- a/v4l/scripts/make_kconfig.pl\n+++ b/v4l/scripts/make_kconfig.pl\n@@ -626,6 +626,12 @@ ($$)\n close OUT;\n \n # These options should default to off\n+disable_config('MEDIA_ANALOG_TV_SUPPORT');\n+disable_config('MEDIA_CAMERA_SUPPORT');\n+disable_config('MEDIA_CEC_SUPPORT');\n+disable_config('SOC_CAMERA');\n+disable_config('VIDEO_SAA7146_VV');\n+disable_config('RC_CORE');\n disable_config('DVB_AV7110_FIRMWARE');\n disable_config('DVB_CINERGYT2_TUNING');\n disable_config('VIDEO_HELPER_CHIPS_AUTO');\n\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/dvb-latest/patches/amlogic-common/driver.dvb.dvb-latest-03-versions.patch",
    "content": "--- a/v4l/versions.txt\t2018-06-26 18:42:30.000000000 +0200\n+++ b/v4l/versions.txt\t2018-08-14 15:28:29.713517240 +0200\n@@ -24,10 +24,6 @@\n VIDEO_ADV748X\n \n [4.7.0]\n-# needs i2c_mux_alloc\n-DVB_RTL2830\n-DVB_RTL2832\n-DVB_M88DS3103\n # needs struct i2c_mux_core\n DVB_AF9013\n \n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/dvb-latest/patches/amlogic-common/driver.dvb.dvb-latest-06-sched_signal-fix.patch",
    "content": "diff --git a/backports/v4.10_sched_signal.patch b/backports/v4.10_sched_signal.patch\nindex fbed946..59e275e 100644\n--- a/backports/v4.10_sched_signal.patch\n+++ b/backports/v4.10_sched_signal.patch\n@@ -86,66 +86,6 @@\n  \n  /* If you have already X v4l cards, then set this to X. This way\n     the device numbers stay matched. Example: you have a WinTV card\n-diff --git a/drivers/media/pci/ivtv/ivtv-driver.h b/drivers/media/pci/ivtv/ivtv-driver.h\n-index 6b099da..81f3c19 100644\n---- a/drivers/media/pci/ivtv/ivtv-driver.h\n-+++ b/drivers/media/pci/ivtv/ivtv-driver.h\n-@@ -39,38 +39,37 @@\n-  *                using information provided by Jiun-Kuei Jung @ AVerMedia.\n-  */\n- \n--#include <linux/module.h>\n--#include <linux/init.h>\n-+#include <asm/byteorder.h>\n- #include <linux/delay.h>\n--#include <linux/sched/signal.h>\n-+#include <linux/device.h>\n- #include <linux/fs.h>\n--#include <linux/pci.h>\n--#include <linux/interrupt.h>\n--#include <linux/spinlock.h>\n- #include <linux/i2c.h>\n- #include <linux/i2c-algo-bit.h>\n-+#include <linux/init.h>\n-+#include <linux/interrupt.h>\n-+#include <linux/ivtv.h>\n-+#include <linux/kernel.h>\n-+#include <linux/kthread.h>\n- #include <linux/list.h>\n--#include <linux/unistd.h>\n-+#include <linux/module.h>\n-+#include <linux/mutex.h>\n- #include <linux/pagemap.h>\n-+#include <linux/pci.h>\n- #include <linux/scatterlist.h>\n--#include <linux/kthread.h>\n--#include <linux/mutex.h>\n-+#include <linux/sched.h>\n- #include <linux/slab.h>\n-+#include <linux/spinlock.h>\n- #include <linux/uaccess.h>\n--#include <asm/byteorder.h>\n-+#include <linux/unistd.h>\n- \n--#include <linux/dvb/video.h>\n--#include <linux/dvb/audio.h>\n-+#include <media/drv-intf/cx2341x.h>\n-+#include <media/i2c/ir-kbd-i2c.h>\n-+#include <media/tuner.h>\n- #include <media/v4l2-common.h>\n--#include <media/v4l2-ioctl.h>\n- #include <media/v4l2-ctrls.h>\n- #include <media/v4l2-device.h>\n- #include <media/v4l2-fh.h>\n--#include <media/tuner.h>\n--#include <media/drv-intf/cx2341x.h>\n--#include <media/i2c/ir-kbd-i2c.h>\n--\n--#include <linux/ivtv.h>\n-+#include <media/v4l2-ioctl.h>\n- \n- /* Memory layout */\n- #define IVTV_ENCODER_OFFSET\t0x00000000\n diff --git a/drivers/media/pci/pt1/pt1.c b/drivers/media/pci/pt1/pt1.c\n index 5708f69..e306544 100644\n --- a/drivers/media/pci/pt1/pt1.c\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/dvb-latest/patches/driver.dvb.dvb-latest-02-add-to-backports.patch",
    "content": "--- a/backports/backports.txt\n+++ b/backports/backports.txt\n@@ -31,6 +31,4 @@\n add v4.18_add_map_atomic.patch\n \n-[4.20.255]\n-add v4.20_access_ok.patch\n \n [4.17.255]\n@@ -91,6 +89,5 @@\n \n [4.1.255]\n-add v4.1_pat_enabled.patch\n add v4.1_drop_fwnode.patch\n \n [4.0.255]\n--\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/driver/dvb-latest/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/aml-vnc/changelog.txt",
    "content": "20.3.5\n- replace package source git repository\n- creating a source directory with the necessary files and their modifications\n- modify the service start script to be compatible with the new binary\n- add Hungarian translation of the add-on\n- restart service on settings change\n\n20.3.4\n- performance fixes\n\n20.3.3\n- fix resolution issue when used other than native\n\n20.3.2\n- add option to set desktop name (hostname by default)\n\n20.3.1\n- make IPv6 listen port consistent with IPv4 port\n\n20.1.0\n- fix password authentication when building with openssl >=3.0.0\n\n20.0.104\n- update language strings file\n\n103\n- improvements\n\n102\n- libvncserver bump\n\n101\n- CoreELEC rebrand\n\n100\n- Initial release\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/aml-vnc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"aml-vnc\"\nPKG_VERSION=\"1.1.0\"\nPKG_SHA256=\"50a0040b46019c2781f671401907be4b24fb9f5749a7e439c4111c0853a4fe58\"\nPKG_REV=\"5\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/dtechsrv/aml-vnc-server/\"\nPKG_URL=\"https://github.com/dtechsrv/aml-vnc-server/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libvncserver\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Amlogic VNC server\"\nPKG_LONGDESC=\"Amlogic VNC server is a Virtual Network Computing (VNC) server for Amlogic devices\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Amlogic VNC\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\npre_configure_target() {\n  export CFLAGS+=\" -Wno-stringop-truncation\"\n}\n\nmakeinstall_target() {\n  :\n}\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/{bin,lib}\n  cp -P ${PKG_BUILD}/aml-vnc ${ADDON_BUILD}/${PKG_ADDON_ID}/bin\n  cp $(get_build_dir libvncserver)/.${TARGET_NAME}/libvncserver.so.? ${ADDON_BUILD}/${PKG_ADDON_ID}/lib\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/aml-vnc/source/bin/aml-vnc.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2016-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\n. /etc/profile\n\noe_setup_addon service.aml-vnc\n\nif [ ${AML_VNC_PORT} != \"5900\" ] ; then\n  export VNC_PORT=\"${AML_VNC_PORT}\"\nfi\n\nif [ ${AML_VNC_AUTH} == \"true\" ] ; then\n  export VNC_PASSWORD=\"${AML_VNC_PWD}\"\nfi\n\nif [ ${AML_VNC_STAT} == \"true\" ] ; then\n  export VNC_SERVERNAME=\"${AML_VNC_NAME}\"\nfi\n\nexec aml-vnc\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/aml-vnc/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nimport subprocess\nimport xbmc\nimport xbmcaddon\n\nclass Monitor(xbmc.Monitor):\n   def __init__(self, *args, **kwargs):\n      xbmc.Monitor.__init__(self)\n      self.id = xbmcaddon.Addon().getAddonInfo('id')\n\n   def onSettingsChanged(self):\n      subprocess.call(['systemctl', 'restart', self.id])\n\nif __name__ == \"__main__\":\n   Monitor().waitForAbort()\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/aml-vnc/source/power.d/aml-vnc.power",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2016-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\n. /etc/profile\n\nSERVICE=\"service.aml-vnc.service\"\n\ncase \"$1\" in\n  pre)\n    if systemctl is-active \"$SERVICE\" &>/dev/null ; then\n      systemctl stop \"$SERVICE\"\n    fi\n    ;;\n  post)\n    if systemctl is-enabled \"$SERVICE\" &>/dev/null ; then\n      systemctl start \"$SERVICE\"\n    fi\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/aml-vnc/source/resources/language/resource.language.en_gb/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: Amlogic VNC Server\n# Addon id: service.aml-vnc\n# Addon Provider: Team CoreELEC\nmsgid \"\"\nmsgstr \"\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\nmsgctxt \"#30000\"\nmsgid \"Server settings\"\nmsgstr \"\"\n\nmsgctxt \"#30001\"\nmsgid \"Port\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"Use authentication\"\nmsgstr \"\"\n\nmsgctxt \"#30003\"\nmsgid \"Password\"\nmsgstr \"\"\n\nmsgctxt \"#30004\"\nmsgid \"Use static name instead of hostname\"\nmsgstr \"\"\n\nmsgctxt \"#30005\"\nmsgid \"Name to be displayed\"\nmsgstr \"\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/aml-vnc/source/resources/language/resource.language.hu_hu/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: Amlogic VNC Server\n# Addon id: service.aml-vnc\n# Addon Provider: Team CoreELEC\nmsgid \"\"\nmsgstr \"\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Language: hu_HU\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\nmsgctxt \"#30000\"\nmsgid \"Server settings\"\nmsgstr \"Szerver beállítások\"\n\nmsgctxt \"#30001\"\nmsgid \"Port\"\nmsgstr \"\"\n\nmsgctxt \"#30002\"\nmsgid \"Use authentication\"\nmsgstr \"Hitelesítés használata\"\n\nmsgctxt \"#30003\"\nmsgid \"Password\"\nmsgstr \"Jelszó\"\n\nmsgctxt \"#30004\"\nmsgid \"Use static name instead of hostname\"\nmsgstr \"Statikus név használata a hosztnév helyett\"\n\nmsgctxt \"#30005\"\nmsgid \"Name to be displayed\"\nmsgstr \"Megjelenített név\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/aml-vnc/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n    <category label=\"30000\">\n\t\t<setting type=\"lsep\" />\n\t\t<setting id=\"AML_VNC_PORT\" type=\"number\" label=\"30001\" default=\"5900\" />\n\t\t<setting id=\"AML_VNC_AUTH\" type=\"bool\" label=\"30002\" default=\"true\" />\n\t\t<setting id=\"AML_VNC_PWD\" type=\"text\" label=\"30003\" default=\"coreelec\" visible=\"eq(-1,true)\" />\n\t\t<setting id=\"AML_VNC_STAT\" type=\"bool\" label=\"30004\" default=\"false\" />\n\t\t<setting id=\"AML_VNC_NAME\" type=\"text\" label=\"30005\" default=\"CoreELEC\" enable=\"eq(-1,true)\" />\n    </category>\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/aml-vnc/source/settings-default.xml",
    "content": "<settings>\n    <setting id=\"AML_VNC_PORT\" value=\"5900\" />\n    <setting id=\"AML_VNC_AUTH\" value=\"true\" />\n    <setting id=\"AML_VNC_PWD\" value=\"coreelec\" />\n    <setting id=\"AML_VNC_STAT\" value=\"false\" />\n    <setting id=\"AML_VNC_NAME\" value=\"CoreELEC\" />\n</settings>\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/aml-vnc/source/system.d/service.aml-vnc.service",
    "content": "[Unit]\nDescription=aml-vnc\nAfter=graphical.target\n\n[Service]\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.aml-vnc/bin/aml-vnc.start\"\nTimeoutStopSec=1\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/homatics-leds/LICENSE.txt",
    "content": "This program is free software: you can redistribute it and/or modify\r\nit under the terms of the GNU General Public License as published by\r\nthe Free Software Foundation, either version 3 of the License, or\r\n(at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful,\r\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\nGNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License\r\nalong with this program.  If not, see <http://www.gnu.org/licenses/>.\r\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/homatics-leds/addon.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"@PKG_ADDON_ID@\"\n       name=\"@ADDON_NAME@\"\n       version=\"@ADDON_VERSION@\"\n       provider-name=\"@PROVIDER_NAME@\">\n  <requires>\n    <import addon=\"xbmc.python\" version=\"3.0.0\"/>\n  </requires>\n  <extension point=\"xbmc.python.pluginsource\" library=\"default.py\">\n    <provides>executable</provides>\n  </extension>\n  <extension point=\"xbmc.service\" library=\"service.py\">\n    <provides/>\n  </extension>\n  <extension point=\"xbmc.addon.metadata\">\n    <summary lang=\"de_DE\">Homatics LED Kit Modus</summary>\n    <summary lang=\"en_GB\">Homatics LED Kit mode</summary>\n    <summary lang=\"hu_HU\">Homatics LED Kit üzemmód</summary>\n    <description lang=\"de_DE\">\nMit diesem Addon können die LEDs in den Knight-Rider-Modus gesetzt werden, oder ihre Farbe kann einfach angepasst werden...\nDanke an vpeter und FoLeY für die Unterstützung...\nhex grün 122e04, blau 101010, lila 800080, gelb ff4600, tiefblau 0d00bf,\nmagenta d8007a, orange f50e00, ff0000 rot, 00000 keine Farbe\n    </description>\n    <description lang=\"en_GB\">\nWith this addon, the LEDs can be set to knight rider mode, or their color can be simply customized...\nThanks to vpeter and FoLeY for the support...\nhex green 122e04, blue 101010, purple 800080, yellow ff4600, deepblue 0d00bf,\nmagenta d8007a, orange f50e00, ff0000 red, 00000 no color\n    </description>\n    <description lang=\"hu_HU\">\nA kiegészítővel beállíthatóak a ledek knight Rider módba, vagy simán testreszabható a színük ...\nKöszönet vpeter-nek, és FoLeY-nak a támogatásért...\nhex green 122e04, blue 101010, purple 800080, yellow ff4600,\ndeepblue 0d00bf, magenta d8007a, orange f50e00, ff0000 red,\n00000 no color\n    </description>\n    <disclaimer>\n    </disclaimer>\n    <platform>all</platform>\n    <news>\n20.3.2\n- added german translation\n20.3.1\n- added language strings\n    </news>\n    <assets>\n      <icon>resources/icon.png</icon>\n      <fanart>resources/fanart.jpg</fanart>\n    </assets>\n  </extension>\n</addon>\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/homatics-leds/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"homatics-leds\"\nPKG_VERSION=\"0.1\"\nPKG_SHA256=\"\"\nPKG_REV=\"2\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Homatics LED Kit mode\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Homatics LEDs\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\naddon() {\n  mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/resources\n\n  cp ${PKG_DIR}/LICENSE.txt ${ADDON_BUILD}/${PKG_ADDON_ID}\n  cp ${PKG_DIR}/addon.xml ${ADDON_BUILD}/${PKG_ADDON_ID}\n\n  # set only version (revision will be added by buildsystem)\n  sed -e \"s|@ADDON_VERSION@|${ADDON_VERSION}|g\" \\\n      -i ${ADDON_BUILD}/${PKG_ADDON_ID}/addon.xml\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/homatics-leds/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nimport urllib.request, urllib.parse, urllib.error\nimport urllib.parse\nimport sys\nimport xbmc\nimport xbmcgui\nimport xbmcplugin\nimport xbmcaddon\nimport os\nimport subprocess\n\nADDON_ID = 'service.homatics-leds'\naddon = xbmcaddon.Addon(ADDON_ID)\n\nbase_url = sys.argv[0]\naddon_handle = int(sys.argv[1])\nargs = urllib.parse.parse_qs(sys.argv[2][1:])\n\ndef build_url(query):\n  return base_url + '?' + urllib.parse.urlencode(query)\n\naddon_icon = 'special://home/addons/service.homatics-leds/resources/icon.png'\n\naddon_icon1 = 'special://home/addons/service.homatics-leds/resources/icon1.png'\n\naddon_icon2 = 'special://home/addons/service.homatics-leds/resources/icon2.png'\n\naddon_icon3 = 'special://home/addons/service.homatics-leds/resources/icon3.png'\n\naddon_icon4 = 'special://home/addons/service.homatics-leds/resources/icon4.png'\n\naddon_icon5 = 'special://home/addons/service.homatics-leds/resources/icon5.png'\n\naddon_icon6 = 'special://home/addons/service.homatics-leds/resources/icon6.png'\n\naddon_icon7 = 'special://home/addons/service.homatics-leds/resources/icon7.png'\n\naddon_icon8 = 'special://home/addons/service.homatics-leds/resources/icon8.png'\n\naddon_icon9 = 'special://home/addons/service.homatics-leds/resources/icon9.png'\n\nmode = args.get('mode', None)\n\nif mode is None:\n  url = build_url({'mode': 'red', 'foldername': 'LEDs red'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32009))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon1, 'thumb' : addon_icon1})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'blue', 'foldername': 'LEDs blue'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32010))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon2, 'thumb' : addon_icon2})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'green', 'foldername': 'LEDs green'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32011))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon3, 'thumb' : addon_icon3})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'purple', 'foldername': 'LEDs purple'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32012))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon4, 'thumb' : addon_icon4})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'yellow', 'foldername': 'LEDs yellow'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32013))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon5, 'thumb' : addon_icon5})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'deepblue', 'foldername': 'LEDs deepblue'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32014))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon6, 'thumb' : addon_icon6})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'magenta', 'foldername': 'LEDs magenta'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32015))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon7, 'thumb' : addon_icon7})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'orange', 'foldername': 'LEDs orange'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32016))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon8, 'thumb' : addon_icon8})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  url = build_url({'mode': 'purpleN', 'foldername': 'LEDs straight purple'})\n  li = xbmcgui.ListItem(addon.getLocalizedString(32017))\n  li.setArt({'fanart': addon.getAddonInfo('fanart'), 'icon': addon_icon9, 'thumb' : addon_icon9})\n  xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li, isFolder=False)\n\n  xbmcplugin.endOfDirectory(addon_handle)\nelif mode[0] == 'red' or mode[0] == 'orange' or mode[0] == 'green' or mode[0] == 'magenta' or mode[0] == 'deepblue' or mode[0] == 'blue' or mode[0] == 'purple' or mode[0] == 'yellow':\n  xbmc.log('mode[0] %s' % mode[0], level=xbmc.LOGERROR)\n  addon.setSetting('strip_color', mode[0])\n  addon.setSetting('solid_color_type_on', 'name')\n  addon.setSetting('solid_effect', 'effect')\n\n  xbmc.executeJSONRPC('{\"jsonrpc\":\"2.0\",\"method\":\"Addons.SetAddonEnabled\",\"id\":8,\"params\":{\"addonid\":\"%s\",\"enabled\":false}}'% ADDON_ID)\n  xbmc.sleep(2000)\n  xbmc.executeJSONRPC('{\"jsonrpc\":\"2.0\",\"method\":\"Addons.SetAddonEnabled\",\"id\":8,\"params\":{\"addonid\":\"%s\",\"enabled\":true}}'% ADDON_ID)\nelif mode[0] == 'purpleN':\n  xbmc.log('mode[0] %s' % 'purpleN', level=xbmc.LOGERROR)\n  addon.setSetting('strip_color', 'purple')\n  addon.setSetting('solid_color_type_on', 'name')\n  addon.setSetting('solid_effect', 'solid')\n\n  xbmc.executeJSONRPC('{\"jsonrpc\":\"2.0\",\"method\":\"Addons.SetAddonEnabled\",\"id\":8,\"params\":{\"addonid\":\"%s\",\"enabled\":false}}'% ADDON_ID)\n  xbmc.sleep(2000)\n  xbmc.executeJSONRPC('{\"jsonrpc\":\"2.0\",\"method\":\"Addons.SetAddonEnabled\",\"id\":8,\"params\":{\"addonid\":\"%s\",\"enabled\":true}}'% ADDON_ID)\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/homatics-leds/source/resources/language/resource.language.de_de/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: Homatics LED setup\n# Addon id: service.homatics-leds\n# Addon Provider: Team CoreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#32000\"\nmsgid \"LED\"\nmsgstr \"\"\n\nmsgctxt \"#32001\"\nmsgid \"Effect color\"\nmsgstr \"Farbe des Effekts\"\n\nmsgctxt \"#32002\"\nmsgid \"Effect or solid\"\nmsgstr \"Effekt oder Einfarbig\"\n\nmsgctxt \"#32003\"\nmsgid \"Color by name or hex\"\nmsgstr \"Farbe nach Name oder HEX\"\n\nmsgctxt \"#32004\"\nmsgid \"Solid color On\"\nmsgstr \"LED-Farbe: Eingeschaltet\"\n\nmsgctxt \"#32005\"\nmsgid \"Solid color Off\"\nmsgstr \"LED-Farbe: Ausgeschaltet\"\n\nmsgctxt \"#32006\"\nmsgid \"Solid color Suspend\"\nmsgstr \"LED-Farbe: Schlafmodus\"\n\nmsgctxt \"#32007\"\nmsgid \"Number of LEDs On\"\nmsgstr \"Anzahl der eingeschalteten LEDs\"\n\nmsgctxt \"#32009\"\nmsgid \"Set red Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Rot\"\n\nmsgctxt \"#32010\"\nmsgid \"Set blue Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Blau\"\n\nmsgctxt \"#32011\"\nmsgid \"Set green Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Grün\"\n\nmsgctxt \"#32012\"\nmsgid \"Set purple Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Lila\"\n\nmsgctxt \"#32013\"\nmsgid \"Set yellow Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Gelb\"\n\nmsgctxt \"#32014\"\nmsgid \"Set deepblue Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Tiefblau\"\n\nmsgctxt \"#32015\"\nmsgid \"Set magenta Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Magenta\"\n\nmsgctxt \"#32016\"\nmsgid \"Set orange Knight Rider effect\"\nmsgstr \"Knight-Rider-Effekt: Orange\"\n\nmsgctxt \"#32017\"\nmsgid \"Set straight purple color\"\nmsgstr \"Einfarbige Farbe: Lila\""
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/homatics-leds/source/resources/language/resource.language.en_gb/strings.po",
    "content": "# Kodi Media Center language file\n# Addon Name: Homatics LED setup\n# Addon id: service.homatics-leds\n# Addon Provider: Team CoreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#32000\"\nmsgid \"LED\"\nmsgstr \"\"\n\nmsgctxt \"#32001\"\nmsgid \"Effect color\"\nmsgstr \"\"\n\nmsgctxt \"#32002\"\nmsgid \"Effect or solid\"\nmsgstr \"\"\n\nmsgctxt \"#32003\"\nmsgid \"Color by name or hex\"\nmsgstr \"\"\n\nmsgctxt \"#32004\"\nmsgid \"Solid color On\"\nmsgstr \"\"\n\nmsgctxt \"#32005\"\nmsgid \"Solid color Off\"\nmsgstr \"\"\n\nmsgctxt \"#32006\"\nmsgid \"Solid color Suspend\"\nmsgstr \"\"\n\nmsgctxt \"#32007\"\nmsgid \"Number of LEDs On\"\nmsgstr \"\"\n\nmsgctxt \"#32009\"\nmsgid \"Set red Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32010\"\nmsgid \"Set blue Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32011\"\nmsgid \"Set green Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32012\"\nmsgid \"Set purple Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32013\"\nmsgid \"Set yellow Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32014\"\nmsgid \"Set deepblue Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32015\"\nmsgid \"Set magenta Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32016\"\nmsgid \"Set orange Knight Rider effect\"\nmsgstr \"\"\n\nmsgctxt \"#32017\"\nmsgid \"Set straight purple color\"\nmsgstr \"\""
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/homatics-leds/source/resources/language/resource.language.hu_hu/strings.po",
    "content": " Kodi Media Center language file\n# Addon Name: Homatics LED setup\n# Addon id: service.homatics-leds\n# Addon Provider: Team CoreELEC\nmsgid \"\"\nmsgstr \"\"\n\nmsgctxt \"#32000\"\nmsgid \"LED\"\nmsgstr \"\"\n\nmsgctxt \"#32001\"\nmsgid \"Effect color\"\nmsgstr \"Ledek színe\"\n\nmsgctxt \"#32002\"\nmsgid \"Effect or solid\"\nmsgstr \"Effekt vagy egyszerű szín\"\n\nmsgctxt \"#32003\"\nmsgid \"Color by name or hex\"\nmsgstr \"Szín neve vagy hex kód\"\n\nmsgctxt \"#32004\"\nmsgid \"Solid color On\"\nmsgstr \"Led színe: box bekapcsolva\"\n\nmsgctxt \"#32005\"\nmsgid \"Solid color Off\"\nmsgstr \"Led színe: box kikapcsolva\"\n\nmsgctxt \"#32006\"\nmsgid \"Solid color Suspend\"\nmsgstr \"Led színe: box alvó állapot\"\n\nmsgctxt \"#32007\"\nmsgid \"Number of LEDs On\"\nmsgstr \"Ledek száma\"\n\nmsgctxt \"#32009\"\nmsgid \"Set red Knight Rider effect\"\nmsgstr \"Vörös Knight rider effekt beállítása\"\n\nmsgctxt \"#32010\"\nmsgid \"Set blue Knight Rider effect\"\nmsgstr \"Kék Knight rider effekt\"\n\nmsgctxt \"#32011\"\nmsgid \"Set green Knight Rider effect\"\nmsgstr \"Zöld Knight rider effekt\"\n\nmsgctxt \"#32012\"\nmsgid \"Set purple Knight Rider effect\"\nmsgstr \"Lila Knight rider effekt\"\n\nmsgctxt \"#32013\"\nmsgid \"Set yellow Knight Rider effect\"\nmsgstr \"Sárga Knight rider effekt\"\n\nmsgctxt \"#32014\"\nmsgid \"Set deepblue Knight Rider effect\"\nmsgstr \"Sötétkék Knight rider effekt\"\n\nmsgctxt \"#32015\"\nmsgid \"Set magenta Knight Rider effect\"\nmsgstr \"Magenta Knight rider effekt\"\n\nmsgctxt \"#32016\"\nmsgid \"Set orange Knight Rider effect\"\nmsgstr \"Narancs Knight rider effekt\"\n\nmsgctxt \"#32017\"\nmsgid \"Set straight purple color\"\nmsgstr \"Állíts be sima lila színt\""
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/homatics-leds/source/resources/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<settings>\n    <category label=\"32000\">\n\t\t<setting type=\"lsep\" />\n\t\t<setting label=\"32001\" type=\"labelenum\" id=\"strip_color\" values=\"red|yellow|purple|blue|deepblue|magenta|green|orange\" default=\"red\"/>\n\t\t<setting label=\"32007\" type=\"labelenum\" id=\"number_leds\" values=\"1|all|8|6|4|2\" default=\"all\"/>\n\t\t<setting label=\"32002\" type=\"labelenum\" id=\"solid_effect\" values=\"effect|solid\" default=\"effect\"/>\n\t\t<setting label=\"32003\" type=\"labelenum\" id=\"solid_color_type_on\" values=\"name|hex\" default=\"name\"/>\n\t\t<setting label=\"32004\" type=\"text\" id=\"color_on\"      default=\"101010\"/>\n\t\t<setting label=\"32005\" type=\"text\" id=\"color_off\"     default=\"000000\"/>\n\t\t<setting label=\"32006\" type=\"text\" id=\"color_suspend\" default=\"800080\"/>\n    </category>\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/homatics-leds/source/service.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nfrom time import sleep\nimport os.path\nfrom threading import Thread, Event\nimport xbmc, xbmcaddon\n\nsysfs = '/sys/devices/platform/soc/fe000000.apb4/fe06c000.i2c/i2c-3/3-003c/leds/bct3236/'\nleds_count = 10  # do not change\ndelay = 90       # in milliseconds\n\n#####################################################################\ndef myLog(msg, level = xbmc.LOGINFO):\n  xbmc.log(addonid + ': ' + msg, level)\n\n#####################################################################\ndef write_sysfs(which, data):\n  if os.path.isfile(sysfs + which):\n    with open(sysfs + which, 'w') as file:\n      file.write(data)\n\n#####################################################################\ndef led_on(pos, pos_min, pos_max, color):\n  out_arr = []\n  out_str = ''\n\n  for i in range(leds_count):\n    out_arr.append('000000')\n\n  if pos >= 0:\n    out_arr[pos] = color\n  elif pos_min >= 0 and pos_max >= 0:\n    for pos in range(pos_min, pos_max + 1):\n      out_arr[pos] = color\n\n  for i in range(leds_count):\n    out_str += out_arr[i] + ' '\n\n  #myLog('out_str: %s' % out_str)\n  write_sysfs('colors', out_str)\n\n#####################################################################\nclass myEffectThread(Thread):\n  def __init__(self, color, run_daemon_mode = False):\n    Thread.__init__(self)\n    self.stop_event = Event()\n    self.running = True\n    self.color = color\n    myLog('myEffectThread color %s' % self.color)\n\n  def stop_event_is_set(self):\n    if self.stop_event.is_set():\n      self.stop_event.clear()\n      self.running = False\n      myLog('myEffectThread stopping')\n      led_on(-1, -1, -1, '')\n      return True\n    else:\n      return False\n\n  def stop(self):\n    self.stop_event.set()\n\n  def stop_and_join(self):\n    self.stop()\n\n    try:\n      self.join()\n    except:\n      pass\n\n  def run(self):\n    while self.running:\n      if self.stop_event_is_set():\n        break\n\n      # to right\n      for i in range(0, leds_count, 1):\n        led_on(i, -1, -1, self.color)\n        sleep(delay / 1000.0)\n\n        if self.stop_event_is_set():\n          break\n\n      sleep(delay / 1000.0)\n\n      # to left\n      for i in range(9, -1, -1):\n        led_on(i, -1, -1, self.color)\n        sleep(delay / 1000.0)\n\n        if self.stop_event_is_set():\n          break\n\n      sleep(delay / 1000.0)\n\n#####################################################################\ndef setup():\n  solid_effect = xbmcaddon.Addon().getSetting('solid_effect')\n  myLog('solid_effect %s' % solid_effect)\n\n  # set on/off/suspend colors and then start effect if active\n  set_solid()\n\n  if solid_effect == 'effect':\n    myLog('setup effect')\n    strip_color = xbmcaddon.Addon().getSetting('strip_color')\n    strip_color = color_name_to_hex(strip_color)\n\n    my_effect_thread = myEffectThread(strip_color, True)\n    my_effect_thread.start()\n  else:\n    myLog('setup solid')\n    my_effect_thread = None\n\n  return my_effect_thread\n\n#####################################################################\ndef set_solid():\n  color_on = xbmcaddon.Addon().getSetting('color_on')\n  color_off = xbmcaddon.Addon().getSetting('color_off')\n  color_suspend = xbmcaddon.Addon().getSetting('color_suspend')\n  number_leds = xbmcaddon.Addon().getSetting('number_leds')\n  solid_color_type_on = xbmcaddon.Addon().getSetting('solid_color_type_on')\n\n  if solid_color_type_on == 'name':\n    color_on = xbmcaddon.Addon().getSetting('strip_color')\n    color_on = color_name_to_hex(color_on)\n\n  if number_leds == 'all':\n    number_leds = 10\n  else:\n    number_leds = int(number_leds)\n\n  myLog('set_solid color_on %s' % color_on)\n  myLog('set_solid color_off %s' % color_off)\n  myLog('set_solid color_suspend %s' % color_suspend)\n  myLog('set_solid number_leds %d' % number_leds)\n\n  write_sysfs('edge_color_on', color_on)\n  write_sysfs('edge_color_off', color_off)\n  write_sysfs('edge_color_suspend', color_suspend)\n\n  # set only some LEDs on\n  if number_leds == 1:\n    led_on(4, -1, -1, color_on)\n  elif number_leds == 2:\n    led_on(-1, 4, 5, color_on)\n  elif number_leds == 4:\n    led_on(-1, 3, 6, color_on)\n  elif number_leds == 6:\n    led_on(-1, 2, 7, color_on)\n  elif number_leds == 8:\n    led_on(-1, 1, 8, color_on)\n\n#####################################################################\ndef color_name_to_hex(color):\n  if color == 'green':\n    return '122e04'\n  elif color == 'blue':\n    return '101010'\n  elif color == 'purple':\n    return '800080'\n  elif color == 'yellow':\n    return 'ff4600'\n  elif color == 'deepblue':\n    return '0d00bf'\n  elif color == 'magenta':\n    return 'd8007a'\n  elif color == 'orange':\n    return 'f50e00'\n  else:\n    return 'ff0000'  # red\n    \n#####################################################################\nclass xbmcMonitor(xbmc.Monitor):\n  def __init__(self, thread):\n    xbmc.Monitor.__init__(self)\n    self.my_effect_thread = thread\n\n  def onSettingsChanged(self):\n    myLog('settings changed, restart')\n\n    if self.my_effect_thread is not None:\n      self.my_effect_thread.stop_and_join()\n\n    self.my_effect_thread = setup()\n\n  def onNotification(self, sender, method, data):\n    myLog('notification %s' % (method))\n    if method == 'System.OnWake':\n      if self.my_effect_thread is None:\n        # set on/off/suspend colors\n        set_solid()\n    elif method == 'System.OnQuit':\n      # set on/off/suspend colors which will be changed to off color\n      set_solid()\n\n#####################################################################\nif __name__ == '__main__':\n  addonid = xbmcaddon.Addon().getAddonInfo('id')\n  led_on(-1, -1, -1, '')\n  my_effect_thread = setup()\n  monitor = xbmcMonitor(my_effect_thread)\n\n  while not monitor.abortRequested():\n    if monitor.waitForAbort(5):\n      if my_effect_thread is not None:\n        my_effect_thread.stop_and_join()\n\n      myLog('finished')\n      break\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/homatics-leds/source/settings-default.xml",
    "content": "<settings>\n  <setting id=\"strip_color\"   value=\"red\" />\n  <setting id=\"static_effect\" value=\"effect\" />\n  <setting id=\"number_leds\"   value=\"all\" />\n</settings>"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/hyperion.ng/changelog.txt",
    "content": "113\n- Update to 2.0.15\n112\n- fix dependencies and add new suspend/resume support suspend/resume support by PR hyperion-project/hyperion.ng#1535\n111\n- Update to 2.0.14\n110\n- Update to 2.0.13\n109\n- Update to 2.0.12\n108\n- Update to 2.0.0-alpha.11\n...\n101\n- Add Platform script\n100\n\n- Initial Release @e438bc6\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/hyperion.ng/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"hyperion.ng\"\nPKG_VERSION=\"2.0.15\"\nPKG_SHA256=\"2e47fe29b64e02a3438a3d142a737d28af3439e5cc4502d340a605017fda6013\"\nPKG_REV=\"113\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/hyperion-project/hyperion.ng\"\nPKG_URL=\"https://github.com/hyperion-project/hyperion.ng/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 avahi libusb qt-everywhere pcre protobuf flatbuffers:host flatbuffers libcec libjpeg-turbo qmdnsengine mbedtls alsa-lib\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"Hyperion.NG: an AmbiLight controller\"\nPKG_LONGDESC=\"Hyperion.NG($PKG_VERSION) is an modern opensource AmbiLight implementation.\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_NAME=\"Hyperion.NG\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \\\n                       -DCMAKE_BUILD_TYPE=Release \\\n                       -DUSE_SYSTEM_PROTO_LIBS=ON \\\n                       -DUSE_SYSTEM_FLATBUFFERS_LIBS=ON \\\n                       -DUSE_SYSTEM_QMDNS_LIBS=ON \\\n                       -DUSE_SYSTEM_MBEDTLS_LIBS=ON \\\n                       -DPLATFORM=amlogic \\\n                       -DENABLE_AMLOGIC=ON \\\n                       -DENABLE_DISPMANX=OFF \\\n                       -DENABLE_FB=ON \\\n                       -DENABLE_DEV_WS281XPWM=OFF \\\n                       -DENABLE_X11=OFF \\\n                       -DENABLE_V4L2=ON \\\n                       -DENABLE_OSX=OFF \\\n                       -DENABLE_DEV_SPI=ON \\\n                       -DENABLE_MDNS=ON \\\n                       -DENABLE_DEV_TINKERFORGE=OFF \\\n                       -DENABLE_TESTS=OFF \\\n                       -DENABLE_DEPLOY_DEPENDENCIES=OFF \\\n                       -Wno-dev\"\n\naddon() {\n  mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin\n    cp $PKG_BUILD/.$TARGET_NAME/bin/* $ADDON_BUILD/$PKG_ADDON_ID/bin\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/hyperion.ng/patches/Embed-QSQLITE-driver-and-qjpeg-plugin-at-Amlogic-platform.patch",
    "content": "From b392172a82f8a3e927ba8dcfa4a9d505405a4f2f Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Sun, 17 Nov 2019 09:20:38 +0100\nSubject: [PATCH] Embed QSQLITE driver and image format plugins at Amlogic\n platform\n\n---\n CMakeLists.txt                     | 11 +++++++++++\n libsrc/db/CMakeLists.txt           |  6 ++++++\n libsrc/db/DBManager.cpp            |  7 +++++++\n src/hyperion-aml/CMakeLists.txt    |  2 +-\n src/hyperion-remote/CMakeLists.txt |  2 +-\n src/hyperiond/CMakeLists.txt       |  2 +-\n src/hyperiond/hyperiond.cpp        |  6 ++++++\n 7 files changed, 33 insertions(+), 3 deletions(-)\n\ndiff --git a/CMakeLists.txt b/CMakeLists.txt\nindex 786b444a..fa2c773e 100644\n--- a/CMakeLists.txt\n+++ b/CMakeLists.txt\n@@ -384,6 +384,17 @@ if (APPLE AND (${QT_VERSION_MAJOR} GREATER_EQUAL 6) )\n \tset(OPENSSL_ROOT_DIR /usr/local/opt/openssl)\n ENDIF()\n\n+if (ENABLE_AMLOGIC)\n+ foreach(plugin ${Qt${QT_VERSION_MAJOR}Sql_PLUGINS} Qt${QT_VERSION_MAJOR}::Sql)\n+\t\tget_target_property(_loc ${plugin} LOCATION)\n+\t\tset(plugin_libs ${plugin_libs} ${_loc})\n+\tendforeach()\n+\tforeach(plugin ${Qt${QT_VERSION_MAJOR}Gui_PLUGINS} Qt${QT_VERSION_MAJOR}::Gui)\n+\t\tget_target_property(_loc ${plugin} LOCATION)\n+\t\tset(plugin_libs ${plugin_libs} ${_loc})\n+\tendforeach()\n+endif()\n+\n # Add libusb and pthreads\n find_package(libusb-1.0 REQUIRED)\n add_definitions(${QT_DEFINITIONS})\ndiff --git a/libsrc/db/CMakeLists.txt b/libsrc/db/CMakeLists.txt\nindex b81991e6..a09c06ef 100644\n--- a/libsrc/db/CMakeLists.txt\n+++ b/libsrc/db/CMakeLists.txt\n@@ -14,3 +14,9 @@ target_link_libraries(database\n \tQt${QT_VERSION_MAJOR}::Core\n \tQt${QT_VERSION_MAJOR}::Sql\n )\n+\n+if (ENABLE_AMLOGIC)\n+\ttarget_link_libraries(database\n+\t\t${plugin_libs}\n+\t)\n+endif()\ndiff --git a/libsrc/db/DBManager.cpp b/libsrc/db/DBManager.cpp\nindex c2f42deb..e3fd0901 100644\n--- a/libsrc/db/DBManager.cpp\n+++ b/libsrc/db/DBManager.cpp\n@@ -1,3 +1,5 @@\n+// Hyperion includes\n+#include <HyperionConfig.h>\n #include <db/DBManager.h>\n\n #include <QSqlDatabase>\n@@ -12,6 +14,11 @@\n \t#include <stdexcept>\n #endif\n\n+#ifdef ENABLE_AMLOGIC\n+#include <QtPlugin>\n+Q_IMPORT_PLUGIN(QSQLiteDriverPlugin)\n+#endif\n+\n // not in header because of linking\n static QString _rootPath;\n static QThreadStorage<QSqlDatabase> _databasePool;\ndiff --git a/src/hyperion-aml/CMakeLists.txt b/src/hyperion-aml/CMakeLists.txt\nindex c67da159..a7c6d7b0 100644\n--- a/src/hyperion-aml/CMakeLists.txt\n+++ b/src/hyperion-aml/CMakeLists.txt\n@@ -37,7 +37,7 @@ target_link_libraries(${PROJECT_NAME}\n\n if (ENABLE_AMLOGIC)\n \ttarget_link_libraries(${PROJECT_NAME}\n-\t\tpcre16 dl z\n+\t\tpcre16 dl z ${plugin_libs}\n \t)\n endif()\n\ndiff --git a/src/hyperion-remote/CMakeLists.txt b/src/hyperion-remote/CMakeLists.txt\nindex ab47420a..4a40ad33 100644\n--- a/src/hyperion-remote/CMakeLists.txt\n+++ b/src/hyperion-remote/CMakeLists.txt\n@@ -41,7 +41,7 @@ target_link_libraries(${PROJECT_NAME}\n\n if (ENABLE_AMLOGIC)\n \ttarget_link_libraries(${PROJECT_NAME}\n-\t\tpcre16 dl z\n+\t\tpcre16 dl z ${plugin_libs}\n \t)\n endif()\n\ndiff --git a/src/hyperiond/CMakeLists.txt b/src/hyperiond/CMakeLists.txt\nindex 2712cd51..06e6b58b 100644\n--- a/src/hyperiond/CMakeLists.txt\n+++ b/src/hyperiond/CMakeLists.txt\n@@ -75,7 +75,7 @@ endif (ENABLE_AVAHI)\n if (ENABLE_AMLOGIC)\n \ttarget_link_libraries(${PROJECT_NAME}\n \t\t#Qt${QT_VERSION_MAJOR}::Core\n-\t\tpcre16 dl z\n+\t\tpcre16 dl z ${plugin_libs}\n \t)\n endif(ENABLE_AMLOGIC)\n\ndiff --git a/src/hyperiond/hyperiond.cpp b/src/hyperiond/hyperiond.cpp\nindex 80d30eab..2ff75fb2 100644\n--- a/src/hyperiond/hyperiond.cpp\n+++ b/src/hyperiond/hyperiond.cpp\n@@ -28,6 +28,12 @@\n #include <webserver/WebServer.h>\n #include \"hyperiond.h\"\n\n+#ifdef ENABLE_AMLOGIC\n+#include <QtPlugin>\n+Q_IMPORT_PLUGIN(QJpegPlugin)\n+Q_IMPORT_PLUGIN(QGifPlugin)\n+#endif\n+\n // Flatbuffer Server\n #include <flatbufserver/FlatBufferServer.h>\n\n--\n2.33.1\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/hyperion.ng/patches/Fix-missing-Include.patch",
    "content": "From 637cad8794e1f6820b93ef14c8d28ebc06f44862 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 7 Mar 2023 19:47:25 +0100\nSubject: [PATCH] Fix missing Include 'std::numeric_limits' do need '#include\n <limits>'\n\n---\n CHANGELOG.md                                   | 1 +\n libsrc/utils/jsonschema/QJsonSchemaChecker.cpp | 1 +\n 2 files changed, 2 insertions(+)\n\ndiff --git a/CHANGELOG.md b/CHANGELOG.md\nindex f0daa08c..ce4dead4 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0\n ### Changed\n \n ### Fixed\n+- Fixed missing Include limits in QJsonSchemaChecker\n \n ## Removed\n \ndiff --git a/libsrc/utils/jsonschema/QJsonSchemaChecker.cpp b/libsrc/utils/jsonschema/QJsonSchemaChecker.cpp\nindex 5cec2ec3..685ab4c7 100644\n--- a/libsrc/utils/jsonschema/QJsonSchemaChecker.cpp\n+++ b/libsrc/utils/jsonschema/QJsonSchemaChecker.cpp\n@@ -1,4 +1,5 @@\n // stdlib includes\n+#include <limits>\n #include <iterator>\n #include <algorithm>\n #include <cmath>\n-- \n2.39.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/hyperion.ng/source/bin/hyperiond.start",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\n. /etc/profile\n\noe_setup_addon service.hyperion.ng\n\nexec hyperiond --userdata $ADDON_HOME &\necho $! > /run/hyperiond.pid\n\nif [ -f \"/usr/bin/Xorg\" ]; then\n  exec hyperion-x11 &\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/hyperion.ng/source/bin/platform.sh",
    "content": "#!/bin/sh\n\ncase \"$1\" in\n    start)\n        [ -d \"/sys/module/amvdec_h265\" ] && echo 3 > /sys/module/amvdec_h265/parameters/double_write_mode\n        [ -d \"/sys/module/amvdec_vp9\"  ] && echo 3 > /sys/module/amvdec_vp9/parameters/double_write_mode\n        [ -d \"/sys/module/amvdec_av1\"  ] && echo 3 > /sys/module/amvdec_av1/parameters/double_write_mode\n    ;;\n    stop)\n        [ -d \"/sys/module/amvdec_h265\" ] && echo 0 > /sys/module/amvdec_h265/parameters/double_write_mode\n        [ -d \"/sys/module/amvdec_vp9\"  ] && echo 0 > /sys/module/amvdec_vp9/parameters/double_write_mode\n        [ -d \"/sys/module/amvdec_av1\"  ] && echo 0 > /sys/module/amvdec_av1/parameters/double_write_mode\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/hyperion.ng/source/default.py",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nimport xbmc\n\nmonitor = xbmc.Monitor()\nmonitor.waitForAbort()\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/hyperion.ng/source/system.d/service.hyperion.ng.service",
    "content": "[Unit]\nDescription=Hyperion.NG service\nAfter=graphical.target\n\n[Service]\nType=forking\nExecStartPre=/bin/sh -c \"exec sh /storage/.kodi/addons/service.hyperion.ng/bin/platform.sh start\"\nExecStart=/bin/sh -c \"exec sh /storage/.kodi/addons/service.hyperion.ng/bin/hyperiond.start\"\nExecReload=/bin/kill -HUP $MAINPID\nExecStopPost=/bin/sh -c \"exec sh /storage/.kodi/addons/service.hyperion.ng/bin/platform.sh stop\"\nPIDFile=/run/hyperiond.pid\nTimeoutStopSec=2\nRestart=always\nRestartSec=10\nStartLimitInterval=0\n\n[Install]\nWantedBy=default.target\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/addons/service/openvfd/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Arthur Liberman (arthur_liberman@hotmail.com)\n\nPKG_NAME=\"openvfd\"\nPKG_VERSION=\"1.0.6\"\nPKG_SHA256=\"e531781921dbea3bed52304ccbf8722d85fc2141abeda11a0a2f405ecf7ff8b9\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/arthur-liberman/service.openvfd\"\nPKG_URL=\"https://github.com/arthur-liberman/service.openvfd/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"service\"\nPKG_SHORTDESC=\"OpenVFD: Service for controlling VFD displays\"\nPKG_LONGDESC=\"OpenVFD: Service for controlling VFD displays, e.g. Display icons (Ethernet/WiFi connection status) Time, Date, Playback time\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_IS_ADDON=\"yes\"\nPKG_ADDON_TYPE=\"xbmc.service\"\n\naddon() {\n  mkdir -p $ADDON_BUILD/$PKG_ADDON_ID\n    cp -PR $PKG_BUILD/* $ADDON_BUILD/$PKG_ADDON_ID\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/compress/cpio/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"cpio\"\nPKG_VERSION=\"2.12\"\nPKG_SHA256=\"08a35e92deb3c85d269a0059a27d4140a9667a6369459299d08c17f713a92e73\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.gnu.org/software/cpio/\"\nPKG_URL=\"http://ftpmirror.gnu.org/cpio/$PKG_NAME-$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain\"\nPKG_LONGDESC=\"A program to manage archives of files.\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/devel/android-headers/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"android-headers\"\nPKG_VERSION=\"25\"\nPKG_SHA256=\"1e0ecdf56c33aaa523109254e2c475878d8cfc5795ebd4bb5ecbaf80926f4fe9\"\nPKG_LICENSE=\"Apache\"\nPKG_SITE=\"https://android.googlesource.com/\"\nPKG_URL=\"$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Android Platform Headers from AOSP releases.\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/devel/msgpack-c/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"msgpack-c\"\nPKG_VERSION=\"c3df1bb26ebdd01d618ecca7ae2d6b4e37d5abd7\"\nPKG_SHA256=\"581442dd9b94de53b75eb3de3cc0bb96c52e6690125223ecf4fff407772d3949\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/msgpack/msgpack-c\"\nPKG_URL=\"https://github.com/msgpack/msgpack-c/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Its like JSON but fast and small.\"\n\nPKG_CMAKE_OPTS_TARGET=\"-DMSGPACK_ENABLE_SHARED=OFF \\\n                       -DMSGPACK_ENABLE_STATIC=ON\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/lang/gcc-linaro-aarch64-elf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gcc-linaro-aarch64-elf\"\nPKG_VERSION=\"4.9.4-2017.01\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"Linaro Aarch64 GNU Linux Binary Toolchain\"\nPKG_TOOLCHAIN=\"manual\"\n\nif [ \"${MACHINE_HARDWARE_NAME}\" = \"aarch64\" ]; then\n  PKG_SHA256=\"7b2082188cd94f35ae2185d0c37c22d0100982f5a8e1875b9b03c416ec653fd1\"\n  PKG_URL=\"https://sources.coreelec.org/gcc-linaro-${PKG_VERSION}-aarch64-elf.tar.xz\"\nelse\n  PKG_SHA256=\"00c79aaf7ff9b1c22f7b0443a730056b3936561a4206af187ef61a4e3cab1716\"\n  PKG_URL=\"https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/aarch64-elf/gcc-linaro-${PKG_VERSION}-x86_64_aarch64-elf.tar.xz\"\nfi\n\nmakeinstall_host() {\n  mkdir -p $TOOLCHAIN/lib/gcc-linaro-aarch64-elf/\n    cp -a * $TOOLCHAIN/lib/gcc-linaro-aarch64-elf\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/lang/gcc-linaro-arm-eabi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"gcc-linaro-arm-eabi\"\nPKG_VERSION=\"4.9.4-2017.01\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"Linaro ARM GNU Linux Binary Toolchain\"\nPKG_TOOLCHAIN=\"manual\"\n\nif [ \"${MACHINE_HARDWARE_NAME}\" = \"aarch64\" ]; then\n  PKG_SHA256=\"4b9a62d912de4c1fd2153e6652fbd296a62ac081515b6625edf3b8e0388ac6dd\"\n  PKG_URL=\"https://sources.coreelec.org/gcc-linaro-${PKG_VERSION}-arm-eabi.tar.xz\"\nelse\n  PKG_SHA256=\"5fa170a74db172dca098c70ae58f4c08d2fca0232ce135530b2ef4996326b4bd\"\n  PKG_URL=\"https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-eabi/gcc-linaro-${PKG_VERSION}-x86_64_arm-eabi.tar.xz\"\nfi\n\nmakeinstall_host() {\n  mkdir -p $TOOLCHAIN/lib/gcc-linaro-arm-eabi/\n    cp -a * $TOOLCHAIN/lib/gcc-linaro-arm-eabi\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/lang/gcc-riscv-none-embed/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"gcc-riscv-none-embed\"\nPKG_VERSION=\"8.3.0-1.2\"\nPKG_SHA256=\"079a88d7f7c18cfd735a9ed1f0eefa28ab28d3007b5f7591920ab25225c89248\"\nPKG_LICENSE=\"MIT\"\nPKG_SITE=\"https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack\"\nPKG_URL=\"https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases/download/v${PKG_VERSION}/xpack-riscv-none-embed-gcc-${PKG_VERSION}-linux-x64.tar.gz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"RISC-V GCC\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  mkdir -p ${TOOLCHAIN}/lib/${PKG_NAME}\n\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz -C ${TOOLCHAIN}/lib/${PKG_NAME}\n}\n\nmakeinstall_host() {\n  : # nothing, unpacked directly to toolchain\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/lang/gcc7-linaro-aarch64-elf/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"gcc7-linaro-aarch64-elf\"\nPKG_VERSION=\"7.5.0-2019.12\"\nPKG_SHA256=\"73689fb3e71beeecebd6434d60efad4cb926153d48399e4d16fb45395d9c81a0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.linaro.org/\"\nPKG_URL=\"https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/aarch64-elf/gcc-linaro-${PKG_VERSION}-x86_64_aarch64-elf.tar.xz\"\nPKG_DEPENDS_HOST=\"ccache:host\"\nPKG_LONGDESC=\"Linaro Aarch64 GNU Linux Binary Toolchain\"\nPKG_TOOLCHAIN=\"manual\"\n\nunpack() {\n  mkdir -p ${PKG_BUILD}\n  mkdir -p ${TOOLCHAIN}/lib/${PKG_NAME}\n\n  tar --strip-components=1 -xf ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.xz -C ${TOOLCHAIN}/lib/${PKG_NAME}\n}\n\nmakeinstall_host() {\n  : # nothing, unpacked directly to toolchain\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"linux\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kernel.org\"\nPKG_DEPENDS_HOST=\"ccache:host rsync:host openssl:host\"\nPKG_DEPENDS_TARGET=\"toolchain linux:host kmod:host xz:host keyutils aml-dtbtools:host aml-dtbtools $KERNEL_EXTRA_DEPENDS_TARGET\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS $(get_pkg_directory initramfs) $(get_pkg_variable initramfs PKG_NEED_UNPACK)\"\nPKG_LONGDESC=\"This package contains a precompiled kernel image and the modules.\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_STAMP=\"$KERNEL_TARGET $KERNEL_MAKE_EXTRACMD $KERNEL_UBOOT_EXTRA_TARGET\"\n\nPKG_PATCH_DIRS=\"$LINUX\"\n\ncase \"$LINUX\" in\n  amlogic-3.14)\n    PKG_VERSION=\"07d26b4ce91cf934d65a64e2da7ab3bc75e59fcc\"\n    PKG_SHA256=\"682f93c0bb8ad888a681e93882bc169007bacb880714b980af00ca34fb5b8365\"\n    PKG_URL=\"https://github.com/CoreELEC/linux-amlogic/archive/$PKG_VERSION.tar.gz\"\n    PKG_SOURCE_NAME=\"linux-$LINUX-$PKG_VERSION.tar.gz\"\n    PKG_DEPENDS_TARGET=\"$PKG_DEPENDS_TARGET aml-dtbtools:host\"\n    PKG_BUILD_PERF=\"no\"\n    ;;\n  amlogic-4.9)\n    PKG_VERSION=\"ab03043a776354e02be86d06007751f652680c00\"\n    PKG_SHA256=\"c75bbd36d0dc92b21d75ce82dd8e0a4fefac9cf4b62f5d21c33eb7d12ca5bc2a\"\n    PKG_URL=\"https://github.com/CoreELEC/linux-amlogic/archive/$PKG_VERSION.tar.gz\"\n    PKG_SOURCE_NAME=\"linux-$LINUX-$PKG_VERSION.tar.gz\"\n    PKG_DEPENDS_TARGET=\"$PKG_DEPENDS_TARGET aml-dtbtools:host\"\n    PKG_BUILD_PERF=\"no\"\n    PKG_GIT_BRANCH=\"amlogic-4.9-20\"\n    ;;\nesac\n\nPKG_KERNEL_CFG_FILE=$(kernel_config_path) || die\n\nif [ -n \"$KERNEL_TOOLCHAIN\" ]; then\n  PKG_DEPENDS_HOST=\"$PKG_DEPENDS_HOST gcc-$KERNEL_TOOLCHAIN:host\"\n  PKG_DEPENDS_TARGET=\"$PKG_DEPENDS_TARGET gcc-$KERNEL_TOOLCHAIN:host\"\n  HEADERS_ARCH=$TARGET_ARCH\nfi\n\nif [ \"$PKG_BUILD_PERF\" != \"no\" ] && grep -q ^CONFIG_PERF_EVENTS= $PKG_KERNEL_CFG_FILE ; then\n  PKG_BUILD_PERF=\"yes\"\n  PKG_DEPENDS_TARGET=\"$PKG_DEPENDS_TARGET binutils elfutils libunwind zlib openssl\"\nfi\n\nif [ \"$TARGET_ARCH\" = \"x86_64\" ]; then\n  PKG_DEPENDS_TARGET=\"$PKG_DEPENDS_TARGET elfutils:host\"\n  PKG_DEPENDS_UNPACK+=\" intel-ucode kernel-firmware\"\nfi\n\nif [[ \"$KERNEL_TARGET\" = uImage* ]]; then\n  PKG_DEPENDS_TARGET=\"$PKG_DEPENDS_TARGET u-boot-tools:host\"\nfi\n\nif [ \"$BUILD_ANDROID_BOOTIMG\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET=\"$PKG_DEPENDS_TARGET mkbootimg:host\"\nfi\n\n# Ensure that the dependencies of initramfs:target are built correctly, but\n# we don't want to add initramfs:target as a direct dependency as we install\n# this \"manually\" from within linux:target\nfor pkg in $(get_pkg_variable initramfs PKG_DEPENDS_TARGET); do\n  ! listcontains \"${PKG_DEPENDS_TARGET}\" \"${pkg}\" && PKG_DEPENDS_TARGET+=\" ${pkg}\" || true\ndone\n\npost_patch() {\n  # linux was already built and its build dir autoremoved - prepare it again for kernel packages\n  if [ -d $PKG_INSTALL/.image ]; then\n    cp -p $PKG_INSTALL/.image/.config $PKG_BUILD\n    kernel_make -C $PKG_BUILD prepare\n\n    # restore the required Module.symvers from an earlier build\n    cp -p $PKG_INSTALL/.image/Module.symvers $PKG_BUILD\n  else\n    cp $PKG_KERNEL_CFG_FILE $PKG_BUILD/.config\n\n    sed -i -e \"s|@INITRAMFS_SOURCE@|$(kernel_initramfs_confs) $BUILD/initramfs|\" $PKG_BUILD/.config\n\n    # set default hostname based on $DISTRONAME\n      sed -i -e \"s|@DISTRONAME@|$DISTRONAME|g\" $PKG_BUILD/.config\n\n    # disable swap support if not enabled\n    if [ ! \"$SWAP_SUPPORT\" = yes ]; then\n      sed -i -e \"s|^CONFIG_SWAP=.*$|# CONFIG_SWAP is not set|\" $PKG_BUILD/.config\n    fi\n\n    # disable nfs support if not enabled\n    if [ ! \"$NFS_SUPPORT\" = yes ]; then\n      sed -i -e \"s|^CONFIG_NFS_FS=.*$|# CONFIG_NFS_FS is not set|\" $PKG_BUILD/.config\n    fi\n\n    # disable cifs support if not enabled\n    if [ ! \"$SAMBA_SUPPORT\" = yes ]; then\n      sed -i -e \"s|^CONFIG_CIFS=.*$|# CONFIG_CIFS is not set|\" $PKG_BUILD/.config\n    fi\n\n    # disable iscsi support if not enabled\n    if [ ! \"$ISCSI_SUPPORT\" = yes ]; then\n      sed -i -e \"s|^CONFIG_SCSI_ISCSI_ATTRS=.*$|# CONFIG_SCSI_ISCSI_ATTRS is not set|\" $PKG_BUILD/.config\n      sed -i -e \"s|^CONFIG_ISCSI_TCP=.*$|# CONFIG_ISCSI_TCP is not set|\" $PKG_BUILD/.config\n      sed -i -e \"s|^CONFIG_ISCSI_BOOT_SYSFS=.*$|# CONFIG_ISCSI_BOOT_SYSFS is not set|\" $PKG_BUILD/.config\n      sed -i -e \"s|^CONFIG_ISCSI_IBFT_FIND=.*$|# CONFIG_ISCSI_IBFT_FIND is not set|\" $PKG_BUILD/.config\n      sed -i -e \"s|^CONFIG_ISCSI_IBFT=.*$|# CONFIG_ISCSI_IBFT is not set|\" $PKG_BUILD/.config\n    fi\n\n    # disable lima/panfrost if libmali is configured\n    if [ \"$OPENGLES\" = \"libmali\" ]; then\n      sed -e \"s|^CONFIG_DRM_LIMA=.*$|# CONFIG_DRM_LIMA is not set|\" -i $PKG_BUILD/.config\n      sed -e \"s|^CONFIG_DRM_PANFROST=.*$|# CONFIG_DRM_PANFROST is not set|\" -i $PKG_BUILD/.config\n    fi\n\n    # disable wireguard support if not enabled\n    if [ ! \"$WIREGUARD_SUPPORT\" = yes ]; then\n      sed -e \"s|^CONFIG_WIREGUARD=.*$|# CONFIG_WIREGUARD is not set|\" -i $PKG_BUILD/.config\n    fi\n  fi\n}\n\npost_unpack() {\n  # Add exFAT\n  ${SCRIPTS}/get exfat-linux\n  local PKG_BUILD_EXFAT=\"${PKG_BUILD}/fs/exfat\"\n  [ -e \"$PKG_BUILD_EXFAT\" ] && rm -rf \"$PKG_BUILD_EXFAT\"\n  mkdir -p \"$PKG_BUILD_EXFAT\"\n  tar --strip-components=1 -xf \"${SOURCES}/exfat-linux/exfat-linux-$(get_pkg_version exfat-linux).tar.gz\" -C \"$PKG_BUILD_EXFAT\"\n}\n\nmake_host() {\n  make \\\n    ARCH=${HEADERS_ARCH:-$TARGET_KERNEL_ARCH} \\\n    HOSTCC=\"$TOOLCHAIN/bin/host-gcc\" \\\n    HOSTCXX=\"$TOOLCHAIN/bin/host-g++\" \\\n    HOSTCFLAGS=\"$HOST_CFLAGS\" \\\n    HOSTCXXFLAGS=\"$HOST_CXXFLAGS\" \\\n    HOSTLDFLAGS=\"$HOST_LDFLAGS\" \\\n    headers_check\n}\n\nmakeinstall_host() {\n  make \\\n    ARCH=${HEADERS_ARCH:-$TARGET_KERNEL_ARCH} \\\n    HOSTCC=\"$TOOLCHAIN/bin/host-gcc\" \\\n    HOSTCXX=\"$TOOLCHAIN/bin/host-g++\" \\\n    HOSTCFLAGS=\"$HOST_CFLAGS\" \\\n    HOSTCXXFLAGS=\"$HOST_CXXFLAGS\" \\\n    HOSTLDFLAGS=\"$HOST_LDFLAGS\" \\\n    INSTALL_HDR_PATH=dest \\\n    headers_install\n  mkdir -p $SYSROOT_PREFIX/usr/include\n    cp -R dest/include/* $SYSROOT_PREFIX/usr/include\n}\n\npre_make_target() {\n  pkg_lock_status \"ACTIVE\" \"linux:target\" \"build\"\n\n  if [ \"$TARGET_ARCH\" = \"x86_64\" ]; then\n    # copy some extra firmware to linux tree\n    mkdir -p $PKG_BUILD/external-firmware\n      cp -a $(get_build_dir kernel-firmware)/.copied-firmware/{amdgpu,amd-ucode,i915,radeon,e100,rtl_nic} $PKG_BUILD/external-firmware\n\n    cp -a $(get_build_dir intel-ucode)/intel-ucode $PKG_BUILD/external-firmware\n\n    FW_LIST=\"$(find $PKG_BUILD/external-firmware \\( -type f -o -type l \\) \\( -iname '*.bin' -o -iname '*.fw' -o -path '*/intel-ucode/*' \\) | sed 's|.*external-firmware/||' | sort | xargs)\"\n    sed -i \"s|CONFIG_EXTRA_FIRMWARE=.*|CONFIG_EXTRA_FIRMWARE=\\\"${FW_LIST}\\\"|\" $PKG_BUILD/.config\n  fi\n\n  kernel_make oldconfig\n}\n\nmake_target() {\n  # arm64 target does not support creating uImage.\n  # Build Image first, then wrap it using u-boot's mkimage.\n  if [[ \"$TARGET_KERNEL_ARCH\" = \"arm64\" && \"$KERNEL_TARGET\" = uImage* ]]; then\n    if [ -z \"$KERNEL_UIMAGE_LOADADDR\" -o -z \"$KERNEL_UIMAGE_ENTRYADDR\" ]; then\n      die \"ERROR: KERNEL_UIMAGE_LOADADDR and KERNEL_UIMAGE_ENTRYADDR have to be set to build uImage - aborting\"\n    fi\n    KERNEL_UIMAGE_TARGET=\"$KERNEL_TARGET\"\n    KERNEL_TARGET=\"${KERNEL_TARGET/uImage/Image}\"\n  fi\n\n  kernel_make modules\n  kernel_make INSTALL_MOD_PATH=$INSTALL/$(get_kernel_overlay_dir) modules_install\n  rm -f $INSTALL/$(get_kernel_overlay_dir)/lib/modules/*/build\n  rm -f $INSTALL/$(get_kernel_overlay_dir)/lib/modules/*/source\n\n  rm -rf $BUILD/initramfs\n  rm -f ${STAMPS_INSTALL}/initramfs/install_target ${STAMPS_INSTALL}/*/install_init\n\n  if [ -n \"$INITRAMFS_MODULES\" ]; then\n    mkdir -p $BUILD/initramfs/etc\n    mkdir -p $BUILD/initramfs/usr/lib/modules\n\n    for i in $INITRAMFS_MODULES; do\n      module=$(find $INSTALL/$(get_full_module_dir)/kernel -name $i.ko)\n      if [ -n \"$module\" ]; then\n        echo $i >> $BUILD/initramfs/etc/modules\n        cp $module $BUILD/initramfs/usr/lib/modules\n      fi\n    done\n  fi\n\n  # create initramfs.cpio needed by Android boot image\n  (\n    cd $ROOT\n    $SCRIPTS/install initramfs\n  )\n\n  # the modules target is required to get a proper Module.symvers\n  # file with symbols from built-in and external modules.\n  # Without that it'll contain only the symbols from the kernel\n  kernel_make $KERNEL_TARGET $KERNEL_MAKE_EXTRACMD modules\n\n  # collect all device tree in 'coreelec' subfolders\n  DTB_PATH=\"arch/$TARGET_KERNEL_ARCH/boot/dts/amlogic\"\n  cp ${DTB_PATH}/coreelec-*/*.dtb $DTB_PATH 2>/dev/null || :\n\n  # combine Amlogic multidtb by dtb.conf\n  find_file_path bootloader/dtb.conf\n  MULTIDTB_CONF=\"${FOUND_PATH}\"\n  if [ -f $MULTIDTB_CONF ]; then\n    multidtb_cnt=$(xmlstarlet sel -t -c \"count(//dtb/multidtb)\" $MULTIDTB_CONF)\n    cnt_m=1\n    while [ $cnt_m -le $multidtb_cnt ]; do\n      multidtb=$(xmlstarlet sel -t -v \"//dtb/multidtb[$cnt_m]/@name\" $MULTIDTB_CONF)\n      echo\n      echo \"Making multidtb $multidtb\"\n      rm -fr \"$DTB_PATH/dtbtool_input\"\n      mkdir $DTB_PATH/dtbtool_input\n\n      files_cnt=$(xmlstarlet sel -t -c \"count(//dtb/multidtb[$cnt_m]/file)\" $MULTIDTB_CONF)\n      cnt_f=1\n      while [ $cnt_f -le $files_cnt ]; do\n        file=$(xmlstarlet sel -t -v \"//dtb/multidtb[$cnt_m]/file[$cnt_f]\" $MULTIDTB_CONF)\n        cnt_f=$((cnt_f+1))\n        mv $DTB_PATH/$file $DTB_PATH/dtbtool_input\n      done\n\n      dtbTool -c -o $DTB_PATH/$multidtb $DTB_PATH/dtbtool_input\n      rm -fr \"$DTB_PATH/dtbtool_input\"\n      cnt_m=$((cnt_m+1))\n    done\n    mkdir -p $INSTALL/usr/share/bootloader\n    install -m 0644 $MULTIDTB_CONF $INSTALL/usr/share/bootloader\n  fi\n\n  if [ \"$BUILD_ANDROID_BOOTIMG\" = \"yes\" ]; then\n    find_file_path bootloader/mkbootimg && source ${FOUND_PATH}\n    mv -f arch/$TARGET_KERNEL_ARCH/boot/boot.img arch/$TARGET_KERNEL_ARCH/boot/$KERNEL_TARGET\n  fi\n\n  if [ \"$PKG_BUILD_PERF\" = \"yes\" ] ; then\n    ( cd tools/perf\n\n      # arch specific perf build args\n      case \"$TARGET_ARCH\" in\n        x86_64)\n          PERF_BUILD_ARGS=\"ARCH=x86\"\n          ;;\n        aarch64)\n          PERF_BUILD_ARGS=\"ARCH=arm64\"\n          ;;\n        *)\n          PERF_BUILD_ARGS=\"ARCH=$TARGET_ARCH\"\n          ;;\n      esac\n\n      WERROR=0 \\\n      NO_LIBPERL=1 \\\n      NO_LIBPYTHON=1 \\\n      NO_SLANG=1 \\\n      NO_GTK2=1 \\\n      NO_LIBNUMA=1 \\\n      NO_LIBAUDIT=1 \\\n      NO_LZMA=1 \\\n      NO_SDT=1 \\\n      CROSS_COMPILE=\"$TARGET_PREFIX\" \\\n      JOBS=\"$CONCURRENCY_MAKE_LEVEL\" \\\n        make $PERF_BUILD_ARGS\n      mkdir -p $INSTALL/usr/bin\n        cp perf $INSTALL/usr/bin\n    )\n  fi\n\n  if [ -n \"$KERNEL_UIMAGE_TARGET\" ] ; then\n    # determine compression used for kernel image\n    KERNEL_UIMAGE_COMP=${KERNEL_UIMAGE_TARGET:7}\n    KERNEL_UIMAGE_COMP=$(echo ${KERNEL_UIMAGE_COMP:-none} | sed 's/gz/gzip/; s/bz2/bzip2/')\n\n    # calculate new load address to make kernel Image unpack to memory area after compressed image\n    if [ \"$KERNEL_UIMAGE_COMP\" != \"none\" ] ; then\n      COMPRESSED_SIZE=$(stat -t \"arch/$TARGET_KERNEL_ARCH/boot/$KERNEL_TARGET\" | awk '{print $2}')\n      # align to 1 MiB\n      COMPRESSED_SIZE=$(( (($COMPRESSED_SIZE - 1 >> 20) + 1) << 20 ))\n      PKG_KERNEL_UIMAGE_LOADADDR=$(printf '%X' \"$(( $KERNEL_UIMAGE_LOADADDR + $COMPRESSED_SIZE ))\")\n      PKG_KERNEL_UIMAGE_ENTRYADDR=$(printf '%X' \"$(( $KERNEL_UIMAGE_ENTRYADDR + $COMPRESSED_SIZE ))\")\n    else\n      PKG_KERNEL_UIMAGE_LOADADDR=${KERNEL_UIMAGE_LOADADDR}\n      PKG_KERNEL_UIMAGE_ENTRYADDR=${KERNEL_UIMAGE_ENTRYADDR}\n    fi\n\n    mkimage -A $TARGET_KERNEL_ARCH \\\n            -O linux \\\n            -T kernel \\\n            -C $KERNEL_UIMAGE_COMP \\\n            -a $PKG_KERNEL_UIMAGE_LOADADDR \\\n            -e $PKG_KERNEL_UIMAGE_ENTRYADDR \\\n            -d arch/$TARGET_KERNEL_ARCH/boot/$KERNEL_TARGET \\\n               arch/$TARGET_KERNEL_ARCH/boot/$KERNEL_UIMAGE_TARGET\n\n    KERNEL_TARGET=\"${KERNEL_UIMAGE_TARGET}\"\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/.image\n  cp -p arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_TARGET} System.map .config Module.symvers $INSTALL/.image/\n\n  if [ \"$BOOTLOADER\" = \"u-boot\" ]; then\n    mkdir -p $INSTALL/usr/share/bootloader/device_trees\n    if [ -d arch/$TARGET_KERNEL_ARCH/boot/dts/amlogic ]; then\n      cp arch/$TARGET_KERNEL_ARCH/boot/*dtb.img $INSTALL/usr/share/bootloader/ 2>/dev/null || :\n      cp arch/$TARGET_KERNEL_ARCH/boot/dts/amlogic/*.dtb $INSTALL/usr/share/bootloader/device_trees 2>/dev/null || :\n    fi\n  elif [ \"$BOOTLOADER\" = \"bcm2835-bootloader\" ]; then\n    mkdir -p $INSTALL/usr/share/bootloader/overlays\n\n    # install platform dtbs, but remove upstream kernel dtbs (i.e. without downstream\n    # drivers and decent USB support) as these are not required by LibreELEC\n    cp -p arch/$TARGET_KERNEL_ARCH/boot/dts/*.dtb $INSTALL/usr/share/bootloader\n    rm -f $INSTALL/usr/share/bootloader/bcm283*.dtb\n\n    # install overlay dtbs\n    for dtb in arch/$TARGET_KERNEL_ARCH/boot/dts/overlays/*.dtb \\\n               arch/$TARGET_KERNEL_ARCH/boot/dts/overlays/*.dtbo; do\n      cp $dtb $INSTALL/usr/share/bootloader/overlays 2>/dev/null || :\n    done\n    cp -p arch/$TARGET_KERNEL_ARCH/boot/dts/overlays/README $INSTALL/usr/share/bootloader/overlays\n  fi\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/amlogic-3.14/linux-010_sx05re_set_colordepth.patch",
    "content": "--- a/drivers/amlogic/display/osd/osd_fb.c\n+++ b/drivers/amlogic/display/osd/osd_fb.c\n@@ -215,11 +215,11 @@\n \t\t.yoffset         = 0,\n \t\t.bits_per_pixel = 32,\n \t\t.grayscale       = 0,\n-\t\t.red             = {0, 0, 0},\n-\t\t.green           = {0, 0, 0},\n-\t\t.blue            = {0, 0, 0},\n-\t\t.transp          = {0, 0, 0},\n-\t\t.nonstd          = 0,\n+\t\t.red             = {16, 8, 0},\n+\t\t.green           = {8, 8, 0},\n+\t\t.blue            = {0, 8, 0},\n+\t\t.transp          = {24, 0, 0},\n+\t\t.nonstd          = 1,\n \t\t.activate        = FB_ACTIVATE_NOW,\n \t\t.height          = -1,\n \t\t.width           = -1,\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/amlogic-3.14/linux-011-HID-input-fix-confusion-on-conflicting-mappings.patch",
    "content": "From 6ce901eb61aa30ba8565c62049ee80c90728ef14 Mon Sep 17 00:00:00 2001\nFrom: David Herrmann <dh.herrmann@gmail.com>\nDate: Mon, 29 Dec 2014 15:21:26 +0100\nSubject: [PATCH] HID: input: fix confusion on conflicting mappings\n\nOn an PC-101/103/104 keyboard (American layout) the 'Enter' key and its\nneighbours look like this:\n\n           +---+ +---+ +-------+\n           | 1 | | 2 | |   5   |\n           +---+ +---+ +-------+\n             +---+ +-----------+\n             | 3 | |     4     |\n             +---+ +-----------+\n\nOn a PC-102/105 keyboard (European layout) it looks like this:\n\n           +---+ +---+ +-------+\n           | 1 | | 2 | |       |\n           +---+ +---+ +-+  4  |\n             +---+ +---+ |     |\n             | 3 | | 5 | |     |\n             +---+ +---+ +-----+\n\n(Note that the number of keys is the same, but key '5' is moved down and\n the shape of key '4' is changed. Keys '1' to '3' are exactly the same.)\n\nThe keys 1-4 report the same scan-code in HID in both layouts, even though\nthe keysym they produce is usually different depending on the XKB-keymap\nused by user-space.\nHowever, key '5' (US 'backslash'/'pipe') reports 0x31 for the upper layout\nand 0x32 for the lower layout, as defined by the HID spec. This is highly\nconfusing as the linux-input API uses a single keycode for both.\n\nSo far, this was never a problem as there never has been a keyboard with\nboth of those keys present at the same time. It would have to look\nsomething like this:\n\n           +---+ +---+ +-------+\n           | 1 | | 2 | |  x31  |\n           +---+ +---+ +-------+\n             +---+ +---+ +-----+\n             | 3 | |x32| |  4  |\n             +---+ +---+ +-----+\n\nHID can represent such a keyboard, but the linux-input API cannot.\nFurthermore, any user-space mapping would be confused by this and,\nluckily, no-one ever produced such hardware.\n\nNow, the HID input layer fixed this mess by mapping both 0x31 and 0x32 to\nthe same keycode (KEY_BACKSLASH==0x2b). As only one of both physical keys\nis present on a hardware, this works just fine.\n\nLets introduce hardware-vendors into this:\n------------------------------------------\n\nUnfortunately, it seems way to expensive to produce a different device for\nAmerican and European layouts. Therefore, hardware-vendors put both keys,\n(0x31 and 0x32) on the same keyboard, but only one of them is hooked up\nto the physical button, the other one is 'dead'.\nThis means, they can use the same hardware, with a different button-layout\nand automatically produce the correct HID events for American *and*\nEuropean layouts. This is unproblematic for normal keyboards, as the\n'dead' key will never report any KEY-DOWN events. But RollOver keyboards\nsend the whole matrix on each key-event, allowing n-key roll-over mode.\nThis means, we get a 0x31 and 0x32 event on each key-press. One of them\nwill always be 0, the other reports the real state. As we map both to the\nsame keycode, we will get spurious key-events, even though the real\nkey-state never changed.\n\nThe easiest way would be to blacklist 'dead' keys and never handle those.\nWe could simply read the 'country' tag of USB devices and blacklist either\nkey according to the layout. But... hardware vendors... want the same\ndevice for all countries and thus many of them set 'country' to 0 for all\ndevices. Meh..\n\nSo we have to deal with this properly. As we cannot know which of the keys\nis 'dead', we either need a heuristic and track those keys, or we simply\nmake use of our value-tracking for HID fields. We simply ignore HID events\nfor absolute data if the data didn't change. As HID tracks events on the\nHID level, we haven't done the keycode translation, yet. Therefore, the\n'dead' key is tracked independently of the real key, therefore, any events\non it will be ignored.\n\nThis patch simply discards any HID events for absolute data if it didn't\nchange compared to the last report. We need to ignore relative and\nbuffered-byte reports for obvious reasons. But those cannot be affected by\nthis bug, so we're fine.\n\nPreferably, we'd do this filtering on the HID-core level. But this might\nbreak a lot of custom drivers, if they do not follow the HID specs.\nTherefore, we do this late in hid-input just before we inject it into the\ninput layer (which does the exact same filtering, but on the keycode\nlevel).\n\nIf this turns out to break some devices, we might have to limit filtering\nto EV_KEY events. But lets try to do the Right Thing first, and properly\nfilter any absolute data that didn't change.\n\nThis patch is tagged for 'stable' as it fixes a lot of n-key RollOver\nhardware. We might wanna wait with backporting for a while, before we know\nit doesn't break anything else, though.\n\nCc: <stable@vger.kernel.org>\nReported-by: Adam Goode <adam@spicenitz.org>\nReported-by: Fredrik Hallenberg <megahallon@gmail.com>\nTested-by: Fredrik Hallenberg <megahallon@gmail.com>\nSigned-off-by: David Herrmann <dh.herrmann@gmail.com>\nSigned-off-by: Jiri Kosina <jkosina@suse.cz>\n---\n drivers/hid/hid-input.c | 16 ++++++++++++++++\n 1 file changed, 16 insertions(+)\n\ndiff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c\nindex e0a0f06..84b6899 100644\n--- a/drivers/hid/hid-input.c\n+++ b/drivers/hid/hid-input.c\n@@ -1101,6 +1101,22 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct\n \t\treturn;\n \t}\n \n+\t/*\n+\t * Ignore reports for absolute data if the data didn't change. This is\n+\t * not only an optimization but also fixes 'dead' key reports. Some\n+\t * RollOver implementations for localized keys (like BACKSLASH/PIPE; HID\n+\t * 0x31 and 0x32) report multiple keys, even though a localized keyboard\n+\t * can only have one of them physically available. The 'dead' keys\n+\t * report constant 0. As all map to the same keycode, they'd confuse\n+\t * the input layer. If we filter the 'dead' keys on the HID level, we\n+\t * skip the keycode translation and only forward real events.\n+\t */\n+\tif (!(field->flags & (HID_MAIN_ITEM_RELATIVE |\n+\t                      HID_MAIN_ITEM_BUFFERED_BYTE)) &&\n+\t    usage->usage_index < field->maxusage &&\n+\t    value == field->value[usage->usage_index])\n+\t\treturn;\n+\n \t/* report the usage code as scancode if the key status has changed */\n \tif (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value)\n \t\tinput_event(input, EV_MSC, MSC_SCAN, usage->hid);\n-- \n2.9.5\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/amlogic-3.14/linux-012-HID-fixup-the-conflicting-keyboard-mappings-quirk.patch",
    "content": "From 8e7b341037db1835ee6eea64663013cbfcf33575 Mon Sep 17 00:00:00 2001\nFrom: Jiri Kosina <jkosina@suse.cz>\nDate: Tue, 6 Jan 2015 22:34:19 +0100\nSubject: [PATCH] HID: fixup the conflicting keyboard mappings quirk\n\nThe ignore check that got added in 6ce901eb61 (\"HID: input: fix confusion\non conflicting mappings\") needs to properly check for VARIABLE reports\nas well (ARRAY reports should be ignored), otherwise legitimate keyboards\nmight break.\n\nCc: <stable@vger.kernel.org>\nFixes: 6ce901eb61 (\"HID: input: fix confusion on conflicting mappings\")\nReported-by: Fredrik Hallenberg <megahallon@gmail.com>\nReported-by: David Herrmann <dh.herrmann@gmail.com>\nSigned-off-by: Jiri Kosina <jkosina@suse.cz>\n---\n drivers/hid/hid-input.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c\nindex 84b6899..a758900 100644\n--- a/drivers/hid/hid-input.c\n+++ b/drivers/hid/hid-input.c\n@@ -1113,6 +1113,7 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct\n \t */\n \tif (!(field->flags & (HID_MAIN_ITEM_RELATIVE |\n \t                      HID_MAIN_ITEM_BUFFERED_BYTE)) &&\n+\t\t\t      (field->flags & HID_MAIN_ITEM_VARIABLE) &&\n \t    usage->usage_index < field->maxusage &&\n \t    value == field->value[usage->usage_index])\n \t\treturn;\n-- \n2.9.5\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/default/linux-051-ouya_controller_support.patch",
    "content": "commit 5a596921a4636e62843a59b7eab7b87b70a6d296\nAuthor: Lukas Rusak <lorusak@gmail.com>\nDate:   Sun May 6 22:03:11 2018 -0700\n\n    HID: add ouya HID driver\n    \n    This driver is a simple implementation to get the controller working and mapped properly.\n    This driver does not include functionality for the touchpad (yet). The original driver\n    was taken from from the ouya linux tree and has been simplified. It seems there may have\n    been other versions of the controller present that had a broken report descriptor. I have\n    removed that for now.\n\ndiff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig\nindex 60252fd796f6..6be2c454e72e 100644\n--- a/drivers/hid/Kconfig\n+++ b/drivers/hid/Kconfig\n@@ -659,6 +659,12 @@ config HID_ORTEK\n \t   - Ortek WKB-2000\n \t   - Skycable wireless presenter\n \n+config HID_OUYA\n+\ttristate \"OUYA Game Controller\"\n+\tdepends on USB_HID\n+\t---help---\n+\t  Support for OUYA Game Controller.\n+\n config HID_PANTHERLORD\n \ttristate \"Pantherlord/GreenAsia game controller\"\n \tdepends on HID\ndiff --git a/drivers/hid/Makefile b/drivers/hid/Makefile\nindex 17a8bd97da9d..4425890934e4 100644\n--- a/drivers/hid/Makefile\n+++ b/drivers/hid/Makefile\n@@ -71,6 +71,7 @@ obj-$(CONFIG_HID_MULTITOUCH)\t+= hid-multitouch.o\n obj-$(CONFIG_HID_NTI)\t\t\t+= hid-nti.o\n obj-$(CONFIG_HID_NTRIG)\t\t+= hid-ntrig.o\n obj-$(CONFIG_HID_ORTEK)\t\t+= hid-ortek.o\n+obj-$(CONFIG_HID_OUYA)\t\t+= hid-ouya.o\n obj-$(CONFIG_HID_PRODIKEYS)\t+= hid-prodikeys.o\n obj-$(CONFIG_HID_PANTHERLORD)\t+= hid-pl.o\n obj-$(CONFIG_HID_PENMOUNT)\t+= hid-penmount.o\ndiff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h\nindex 0b5cc910f62e..0528efb825fa 100644\n--- a/drivers/hid/hid-ids.h\n+++ b/drivers/hid/hid-ids.h\n@@ -859,6 +859,9 @@\n #define USB_DEVICE_ID_ORTEK_WKB2000\t0x2000\n #define USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S\t0x8003\n \n+#define USB_VENDOR_ID_OUYA 0x2836\n+#define USB_DEVICE_ID_OUYA_CONTROLLER 0x0001\n+\n #define USB_VENDOR_ID_PLANTRONICS\t0x047f\n \n #define USB_VENDOR_ID_PANASONIC\t\t0x04da\ndiff --git a/drivers/hid/hid-ouya.c b/drivers/hid/hid-ouya.c\nnew file mode 100644\nindex 000000000000..4344a47b40af\n--- /dev/null\n+++ b/drivers/hid/hid-ouya.c\n@@ -0,0 +1,131 @@\n+/*\n+ *  HID driver for OUYA Game Controller(s)\n+ *\n+ *  Copyright (c) 2013 OUYA\n+ *  Copyright (c) 2013 Gregorios Leach <optikflux@gmail.com>\n+ *  Copyright (c) 2018 Lukas Rusak <lorusak@gmail.com>\n+ */\n+\n+#include <linux/device.h>\n+#include <linux/hid.h>\n+#include <linux/input.h>\n+#include <linux/module.h>\n+\n+#include \"hid-ids.h\"\n+\n+static const unsigned int ouya_absmap[] = {\n+\t[0x30] = ABS_X,\t\t/* left stick X */\n+\t[0x31] = ABS_Y,\t\t/* left stick Y */\n+\t[0x32] = ABS_Z,\t\t/* L2 */\n+\t[0x33] = ABS_RX,\t/* right stick X */\n+\t[0x34] = ABS_RY,\t/* right stick Y */\n+\t[0x35] = ABS_RZ,\t/* R2 */\n+};\n+\n+static const unsigned int ouya_keymap[] = {\n+\t[0x1] = BTN_SOUTH,\t/* O */\n+\t[0x2] = BTN_WEST,\t/* U */\n+\t[0x3] = BTN_NORTH,\t/* Y */\n+\t[0x4] = BTN_EAST,\t/* A */\n+\t[0x5] = BTN_TL,\t\t/* L1 */\n+\t[0x6] = BTN_TR,\t\t/* R1 */\n+\t[0x7] = BTN_THUMBL,\t/* L3 */\n+\t[0x8] = BTN_THUMBR,\t/* R3 */\n+\t[0x9] = BTN_DPAD_UP,\t/* Up */\n+\t[0xa] = BTN_DPAD_DOWN,\t/* Down */\n+\t[0xb] = BTN_DPAD_LEFT,\t/* Left */\n+\t[0xc] = BTN_DPAD_RIGHT, /* Right */\n+\t[0xd] = BTN_TL2,\t/* L2 */\n+\t[0xe] = BTN_TR2,\t/* R2 */\n+\t[0xf] = BTN_MODE,\t/* Power */\n+};\n+\n+static int ouya_input_mapping(struct hid_device *hdev, struct hid_input *hi,\n+\t\t\t       struct hid_field *field, struct hid_usage *usage,\n+\t\t\t       unsigned long **bit, int *max)\n+{\n+\tif ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) {\n+\t\tunsigned int key = usage->hid & HID_USAGE;\n+\n+\t\tif (key >= ARRAY_SIZE(ouya_keymap))\n+\t\t\treturn -1;\n+\n+\t\tkey = ouya_keymap[key];\n+\t\thid_map_usage_clear(hi, usage, bit, max, EV_KEY, key);\n+\n+\t\treturn 1;\n+\n+\t} else if ((usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK) {\n+\t\tunsigned int abs = usage->hid & HID_USAGE;\n+\n+\t\tif (abs >= ARRAY_SIZE(ouya_absmap))\n+\t\t\treturn -1;\n+\n+\t\tabs = ouya_absmap[abs];\n+\t\thid_map_usage_clear(hi, usage, bit, max, EV_ABS, abs);\n+\n+\t\treturn 1;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int ouya_probe(struct hid_device *hdev, const struct hid_device_id *id)\n+{\n+\tint ret;\n+\n+\tret = hid_parse(hdev);\n+\tif (ret) {\n+\t\thid_err(hdev, \"parse failed\\n\");\n+\t\tgoto err_free;\n+\t}\n+\n+\tret = hid_hw_start(hdev, HID_CONNECT_DEFAULT | HID_CONNECT_HIDDEV_FORCE);\n+\tif (ret) {\n+\t\thid_err(hdev, \"hw start failed\\n\");\n+\t\tgoto err_free;\n+\t}\n+\n+\treturn 0;\n+\n+err_free:\n+\treturn ret;\n+}\n+\n+static void ouya_remove(struct hid_device *hdev)\n+{\n+\thid_hw_stop(hdev);\n+\tkfree(hid_get_drvdata(hdev));\n+}\n+\n+static const struct hid_device_id ouya_devices[] = {\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },\n+\t{ }\n+};\n+MODULE_DEVICE_TABLE(hid, ouya_devices);\n+\n+static struct hid_driver ouya_driver = {\n+\t.name = \"ouya\",\n+\t.id_table = ouya_devices,\n+\t.input_mapping = ouya_input_mapping,\n+\t.probe = ouya_probe,\n+\t.remove = ouya_remove,\n+};\n+\n+static int __init ouya_init(void)\n+{\n+\treturn hid_register_driver(&ouya_driver);\n+}\n+\n+static void __exit ouya_exit(void)\n+{\n+\thid_unregister_driver(&ouya_driver);\n+}\n+\n+module_init(ouya_init);\n+module_exit(ouya_exit);\n+\n+MODULE_LICENSE(\"GPL\");\n+MODULE_AUTHOR(\"Lukas Rusak <lorusak@gmail.com>\");\n+MODULE_AUTHOR(\"Gregorios Leach <optikflux@gmail.com>\");\n+MODULE_DESCRIPTION(\"Ouya Controller Driver\");\ndiff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c\nindex 587e2681a53f..b5adc13e0df1 100644\n--- a/drivers/hid/hid-quirks.c\n+++ b/drivers/hid/hid-quirks.c\n@@ -538,6 +538,9 @@ static const struct hid_device_id hid_have_special_driver[] = {\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },\n #endif\n+#if IS_ENABLED(CONFIG_HID_OUYA)\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },\n+#endif\n #if IS_ENABLED(CONFIG_HID_PANTHERLORD)\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/default/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch",
    "content": "From 7051422474e4c4e302ede3d07ffd8ef2682e07a2 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Tue, 22 Apr 2014 16:05:14 +0300\nSubject: [PATCH] [RFC] hid/sony: add autorepeat for PS3 remotes\n\nadapted to 4.6\n\nBetreff: [RFC] hid/sony: add autorepeat for PS3 remotes\nVon: David Dillow <dave@thedillows.org>\nDatum: 28.06.2013 04:28\nAn: linux-input@vger.kernel.org\nKopie (CC): Stephan Raue <stephan@openelec.tv>\n\nSome applications using the PS3 remote would like to have autorepeat\nfrom the device. Use the input subsystem's software emulation to provide\nthis capability, and enable those that don't need it to turn it off.\n---\nI'm not sure this is the correct approach, or if it is even appropriate\nfor a remote to do autorepeat. However, the media/rc subsystem does do\nit by default, and it's been requested by users, so there is at least\nsome demand.\n\nThis compiled against the hid-sony driver with the PS3 remote changes\nmerged, but I have done no testing of it. If the approach seems\nreasonable, I'll try to test it when the MythTV is idle.\n\nSigned-off-by: Matt DeVillier <matt.devillier@gmail.com>\n---\n drivers/hid/hid-sony.c | 21 +++++++++++++++++++++\n 1 file changed, 21 insertions(+)\n\ndiff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c\nindex 310436a..84f7f41 100644\n--- a/drivers/hid/hid-sony.c\n+++ b/drivers/hid/hid-sony.c\n@@ -1120,6 +1120,25 @@ static int ps3remote_mapping(struct hid_device *hdev, struct hid_input *hi,\n \treturn 1;\n }\n \n+static int ps3remote_setup_repeat(struct hid_device *hdev)\n+{\n+\tstruct hid_input *hidinput = list_first_entry(&hdev->inputs,\n+\t\t\t\t\t\t struct hid_input, list);\n+\tstruct input_dev *input = hidinput->input;\n+\n+\t/*\n+\t * Set up autorepeat defaults per the remote control subsystem;\n+\t * this must be done after hid_hw_start(), as having these non-zero\n+\t * at the time of input_register_device() tells the input system that\n+\t * the hardware does the autorepeat, and the PS3 remote does not.\n+\t*/\n+\tset_bit(EV_REP, input->evbit);\n+\tinput->rep[REP_DELAY]  = 500;\n+\tinput->rep[REP_PERIOD] = 125;\n+\n+\treturn 0;\n+}\n+\n static u8 *sony_report_fixup(struct hid_device *hdev, u8 *rdesc,\n \t\tunsigned int *rsize)\n {\n@@ -2372,6 +2391,8 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)\n \t\tsony_init_output_report(sc, dualshock4_send_output_report);\n \t} else if (sc->quirks & MOTION_CONTROLLER) {\n \t\tsony_init_output_report(sc, motion_send_output_report);\n+\t} else if (sc->quirks & PS3REMOTE) {\n+\t\tret = ps3remote_setup_repeat(hdev);\n \t} else {\n \t\tret = 0;\n \t}\n-- \n2.5.0\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/default/linux-062-imon_pad_ignore_diagonal.patch",
    "content": "diff -Naur linux-3.16.1/drivers/media/rc/imon.c linux-3.16.1.patch/drivers/media/rc/imon.c\n--- linux-3.16.1/drivers/media/rc/imon.c\t2014-08-14 04:36:35.000000000 +0200\n+++ linux-3.16.1.patch/drivers/media/rc/imon.c\t2014-08-15 13:57:16.587620642 +0200\n@@ -1344,6 +1344,17 @@\n \t\t\t}\n \t\t} else {\n \t\t\t/*\n+\t\t\t * For users without stabilized, just ignore any value getting\n+\t\t\t * to close to the diagonal.\n+\t\t\t */\n+\t\t\tif ((abs(rel_y) < 2 && abs(rel_x) < 2) ||\n+\t\t\t\tabs(abs(rel_y) - abs(rel_x)) < 2 ) {\n+\t\t\t\tspin_lock_irqsave(&ictx->kc_lock, flags);\n+\t\t\t\tictx->kc = KEY_UNKNOWN;\n+\t\t\t\tspin_unlock_irqrestore(&ictx->kc_lock, flags);\n+\t\t\t\treturn;\n+\t\t\t}\n+\t\t\t/*\n \t\t\t * Hack alert: instead of using keycodes, we have\n \t\t\t * to use hard-coded scancodes here...\n \t\t\t */\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/default/linux-904-improve-xbox-dvd-remote-performance.patch",
    "content": "From 55096db50d8cdbf777c67f672b493ef565a12c38 Mon Sep 17 00:00:00 2001\nFrom: Matthias Reichl <hias@horus.com>\nDate: Fri, 22 Mar 2019 12:26:17 +0100\nSubject: [PATCH] media: rc: xbox_remote: add protocol and set timeout\n\nThe timestamps in ir-keytable -t output showed that the Xbox DVD\nIR dongle decodes scancodes every 64ms. The last scancode of a\nlonger button press is decodes 64ms after the last-but-one which\nindicates the decoder doesn't use a timeout but decodes on the last\nedge of the signal.\n\n267.042629: lirc protocol(unknown): scancode = 0xace\n267.042665: event type EV_MSC(0x04): scancode = 0xace\n267.042665: event type EV_KEY(0x01) key_down: KEY_1(0x0002)\n267.042665: event type EV_SYN(0x00).\n267.106625: lirc protocol(unknown): scancode = 0xace\n267.106643: event type EV_MSC(0x04): scancode = 0xace\n267.106643: event type EV_SYN(0x00).\n267.170623: lirc protocol(unknown): scancode = 0xace\n267.170638: event type EV_MSC(0x04): scancode = 0xace\n267.170638: event type EV_SYN(0x00).\n267.234621: lirc protocol(unknown): scancode = 0xace\n267.234636: event type EV_MSC(0x04): scancode = 0xace\n267.234636: event type EV_SYN(0x00).\n267.298623: lirc protocol(unknown): scancode = 0xace\n267.298638: event type EV_MSC(0x04): scancode = 0xace\n267.298638: event type EV_SYN(0x00).\n267.543345: event type EV_KEY(0x01) key_down: KEY_1(0x0002)\n267.543345: event type EV_SYN(0x00).\n267.570015: event type EV_KEY(0x01) key_up: KEY_1(0x0002)\n267.570015: event type EV_SYN(0x00).\n\nAdd a protocol with the repeat value and set the timeout in the\ndriver to 10ms (to have a bit of headroom for delays) so the Xbox\nDVD remote performs more responsive.\n\nSigned-off-by: Matthias Reichl <hias@horus.com>\n---\n Documentation/media/lirc.h.rst.exceptions | 1 +\n drivers/media/rc/keymaps/rc-xbox-dvd.c    | 2 +-\n drivers/media/rc/rc-main.c                | 2 ++\n drivers/media/rc/xbox_remote.c            | 4 +++-\n include/media/rc-map.h                    | 4 +++-\n include/uapi/linux/lirc.h                 | 2 ++\n 6 files changed, 12 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/media/lirc.h.rst.exceptions b/Documentation/media/lirc.h.rst.exceptions\nindex e7a41d4b3d46..f8b5f1a32b7d 100644\n--- a/Documentation/media/lirc.h.rst.exceptions\n+++ b/Documentation/media/lirc.h.rst.exceptions\n@@ -61,6 +61,7 @@ ignore symbol RC_PROTO_IMON\n ignore symbol RC_PROTO_RCMM12\n ignore symbol RC_PROTO_RCMM24\n ignore symbol RC_PROTO_RCMM32\n+ignore symbol RC_PROTO_XBOX_DVD\n \n # Undocumented macros\n \ndiff --git a/drivers/media/rc/keymaps/rc-xbox-dvd.c b/drivers/media/rc/keymaps/rc-xbox-dvd.c\nindex af387244636b..42815ab57bff 100644\n--- a/drivers/media/rc/keymaps/rc-xbox-dvd.c\n+++ b/drivers/media/rc/keymaps/rc-xbox-dvd.c\n@@ -42,7 +42,7 @@ static struct rc_map_list xbox_dvd_map = {\n \t.map = {\n \t\t.scan     = xbox_dvd,\n \t\t.size     = ARRAY_SIZE(xbox_dvd),\n-\t\t.rc_proto = RC_PROTO_UNKNOWN,\n+\t\t.rc_proto = RC_PROTO_XBOX_DVD,\n \t\t.name     = RC_MAP_XBOX_DVD,\n \t}\n };\ndiff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c\nindex 78e79c37f208..7f1d5b226f68 100644\n--- a/drivers/media/rc/rc-main.c\n+++ b/drivers/media/rc/rc-main.c\n@@ -76,6 +76,7 @@ static const struct {\n \t\t.scancode_bits = 0x00ffffff, .repeat_period = 114 },\n \t[RC_PROTO_RCMM32] = { .name = \"rc-mm-32\",\n \t\t.scancode_bits = 0xffffffff, .repeat_period = 114 },\n+\t[RC_PROTO_XBOX_DVD] = { .name = \"xbox-dvd\", .repeat_period = 64 },\n };\n \n /* Used to keep track of known keymaps */\n@@ -1027,6 +1028,7 @@ static const struct {\n \t{ RC_PROTO_BIT_RCMM12 |\n \t  RC_PROTO_BIT_RCMM24 |\n \t  RC_PROTO_BIT_RCMM32,\t\"rc-mm\",\t\"ir-rcmm-decoder\"\t},\n+\t{ RC_PROTO_BIT_XBOX_DVD, \"xbox-dvd\",\tNULL\t\t\t},\n };\n \n /**\ndiff --git a/drivers/media/rc/xbox_remote.c b/drivers/media/rc/xbox_remote.c\nindex f959cbb94744..79470c09989e 100644\n--- a/drivers/media/rc/xbox_remote.c\n+++ b/drivers/media/rc/xbox_remote.c\n@@ -148,7 +148,7 @@ static void xbox_remote_rc_init(struct xbox_remote *xbox_remote)\n \tstruct rc_dev *rdev = xbox_remote->rdev;\n \n \trdev->priv = xbox_remote;\n-\trdev->allowed_protocols = RC_PROTO_BIT_UNKNOWN;\n+\trdev->allowed_protocols = RC_PROTO_BIT_XBOX_DVD;\n \trdev->driver_name = \"xbox_remote\";\n \n \trdev->open = xbox_remote_rc_open;\n@@ -157,6 +157,8 @@ static void xbox_remote_rc_init(struct xbox_remote *xbox_remote)\n \trdev->device_name = xbox_remote->rc_name;\n \trdev->input_phys = xbox_remote->rc_phys;\n \n+\trdev->timeout = MS_TO_NS(10);\n+\n \tusb_to_input_id(xbox_remote->udev, &rdev->input_id);\n \trdev->dev.parent = &xbox_remote->interface->dev;\n }\ndiff --git a/include/media/rc-map.h b/include/media/rc-map.h\nindex e5e86d595645..a0000f392362 100644\n--- a/include/media/rc-map.h\n+++ b/include/media/rc-map.h\n@@ -40,6 +40,7 @@\n #define RC_PROTO_BIT_RCMM12\t\tBIT_ULL(RC_PROTO_RCMM12)\n #define RC_PROTO_BIT_RCMM24\t\tBIT_ULL(RC_PROTO_RCMM24)\n #define RC_PROTO_BIT_RCMM32\t\tBIT_ULL(RC_PROTO_RCMM32)\n+#define RC_PROTO_BIT_XBOX_DVD\t\tBIT_ULL(RC_PROTO_XBOX_DVD)\n \n #define RC_PROTO_BIT_ALL \\\n \t\t\t(RC_PROTO_BIT_UNKNOWN | RC_PROTO_BIT_OTHER | \\\n@@ -55,7 +56,8 @@\n \t\t\t RC_PROTO_BIT_RC6_MCE | RC_PROTO_BIT_SHARP | \\\n \t\t\t RC_PROTO_BIT_XMP | RC_PROTO_BIT_CEC | \\\n \t\t\t RC_PROTO_BIT_IMON | RC_PROTO_BIT_RCMM12 | \\\n-\t\t\t RC_PROTO_BIT_RCMM24 | RC_PROTO_BIT_RCMM32)\n+\t\t\t RC_PROTO_BIT_RCMM24 | RC_PROTO_BIT_RCMM32 | \\\n+\t\t\t RC_PROTO_BIT_XBOX_DVD)\n /* All rc protocols for which we have decoders */\n #define RC_PROTO_BIT_ALL_IR_DECODER \\\n \t\t\t(RC_PROTO_BIT_RC5 | RC_PROTO_BIT_RC5X_20 | \\\ndiff --git a/include/uapi/linux/lirc.h b/include/uapi/linux/lirc.h\nindex 45fcbf99d72e..f99d9dcae667 100644\n--- a/include/uapi/linux/lirc.h\n+++ b/include/uapi/linux/lirc.h\n@@ -195,6 +195,7 @@ struct lirc_scancode {\n  * @RC_PROTO_RCMM12: RC-MM protocol 12 bits\n  * @RC_PROTO_RCMM24: RC-MM protocol 24 bits\n  * @RC_PROTO_RCMM32: RC-MM protocol 32 bits\n+ * @RC_PROTO_XBOX_DVD: Xbox DVD Movie Playback Kit protocol\n  */\n enum rc_proto {\n \tRC_PROTO_UNKNOWN\t= 0,\n@@ -224,6 +225,7 @@ enum rc_proto {\n \tRC_PROTO_RCMM12\t\t= 24,\n \tRC_PROTO_RCMM24\t\t= 25,\n \tRC_PROTO_RCMM32\t\t= 26,\n+\tRC_PROTO_XBOX_DVD\t= 27,\n };\n \n #endif\n-- \n2.20.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/default/linux-999-no-lzma-in-x86-perf-build.patch",
    "content": "diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config\nindex 0294bfb6c5f8..153036bbed7e 100644\n--- a/tools/perf/Makefile.config\n+++ b/tools/perf/Makefile.config\n@@ -35,7 +35,7 @@ ifeq ($(SRCARCH),x86)\n   ifeq (${IS_64_BIT}, 1)\n     CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT -DHAVE_SYSCALL_TABLE -I$(OUTPUT)arch/x86/include/generated\n     ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S\n-    LIBUNWIND_LIBS = -lunwind-x86_64 -lunwind -llzma\n+    LIBUNWIND_LIBS = -lunwind-x86_64 -lunwind\n     $(call detected,CONFIG_X86_64)\n   else\n     LIBUNWIND_LIBS = -lunwind-x86 -llzma -lunwind\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/default/linux-999.02-0001-pm-disable-async-suspend-resume-by-default.patch",
    "content": "From c314d9af9d774c052bea324e1a140ccdba0ca070 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Tue, 8 Apr 2014 14:02:53 +0300\nSubject: [PATCH] pm: disable async suspend/resume by default\n\n---\n kernel/power/main.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/kernel/power/main.c b/kernel/power/main.c\nindex 1d1bf63..361db93 100644\n--- a/kernel/power/main.c\n+++ b/kernel/power/main.c\n@@ -46,7 +46,7 @@ int pm_notifier_call_chain(unsigned long val)\n }\n \n /* If set, devices may be suspended and resumed asynchronously. */\n-int pm_async_enabled = 1;\n+int pm_async_enabled = 0;\n \n static ssize_t pm_async_show(struct kobject *kobj, struct kobj_attribute *attr,\n \t\t\t     char *buf)\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/default/linux-999.20-i915-pm-Be-less-agressive-with-clockfreq-changes-on-Bay-Trail.patch",
    "content": "From 28ad70a06fb84fe63cd036970db2561b2fd1562b Mon Sep 17 00:00:00 2001\nFrom: Hans de Goede <hdegoede@redhat.com>\nDate: Sun, 5 Nov 2017 16:51:23 +0100\nSubject: [PATCH v3 1/2] i915: pm: Be less agressive with clockfreq changes on\n Bay Trail\n\nBay Trail devices are known to hang when changing the frequency often,\nthis is discussed in great length in:\nhttps://bugzilla.kernel.org/show_bug.cgi?id=109051\n\nCommit 6067a27d1f01 (\"drm/i915: Avoid tweaking evaluation thresholds\non Baytrail v3\") is an attempt to workaround this. Several users in\nbko109051 report that an earlier version of this patch, v1:\nhttps://bugzilla.kernel.org/attachment.cgi?id=251471\n\nWorks better for them and they still see hangs with the merged v3.\n\nComparing the 2 versions shows that they are indeed not equivalent,\nv1 not only skips writing the GEN6_RP* registers from valleyview_set_rps,\nas v3 does. It also contained these modifications to i915_irq.c:\n\n     if (pm_iir & GEN6_PM_RP_DOWN_EI_EXPIRED) {\n         if (!vlv_c0_above(dev_priv,\n                   &dev_priv->rps.down_ei, &now,\n-                  dev_priv->rps.down_threshold))\n+                  VLV_RP_DOWN_EI_THRESHOLD))\n             events |= GEN6_PM_RP_DOWN_THRESHOLD;\n         dev_priv->rps.down_ei = now;\n     }\n\n     if (pm_iir & GEN6_PM_RP_UP_EI_EXPIRED) {\n         if (vlv_c0_above(dev_priv,\n                  &dev_priv->rps.up_ei, &now,\n-                 dev_priv->rps.up_threshold))\n+                 VLV_RP_UP_EI_THRESHOLD))\n             events |= GEN6_PM_RP_UP_THRESHOLD;\n         dev_priv->rps.up_ei = now;\n     }\n\nWhich use less aggressive up/down thresholds, which results in less\nGEN6_PM_RP_*_THRESHOLD events and thus in less calls to intel_set_rps() ->\nvalleyview_set_rps() -> vlv_punit_write(PUNIT_REG_GPU_FREQ_REQ).\nWith the last call being the likely cause of the hang.\n\nThis commit hardcodes the threshold_up and _down values for Bay Trail to\nless aggressive values, reducing the amount of clock frequency changes,\nthus avoiding the hangs some people are still seeing with the merged fix.\n\nBuglink: https://bugzilla.kernel.org/show_bug.cgi?id=109051\nSigned-off-by: Hans de Goede <hdegoede@redhat.com>\n---\n drivers/gpu/drm/i915/i915_reg.h | 3 +++\n drivers/gpu/drm/i915/intel_pm.c | 5 ++++-\n 2 files changed, 7 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h\nindex 68a58cce6ab1..2561af075ebb 100644\n--- a/drivers/gpu/drm/i915/i915_reg.h\n+++ b/drivers/gpu/drm/i915/i915_reg.h\n@@ -1355,6 +1355,9 @@ enum i915_power_well_id {\n #define \tVLV_BIAS_CPU_125_SOC_875 (6 << 2)\n #define \tCHV_BIAS_CPU_50_SOC_50 (3 << 2)\n \n+#define VLV_RP_UP_EI_THRESHOLD\t\t\t90\n+#define VLV_RP_DOWN_EI_THRESHOLD\t\t70\n+\n /* vlv2 north clock has */\n #define CCK_FUSE_REG\t\t\t\t0x8\n #define  CCK_FUSE_HPLL_FREQ_MASK\t\t0x3\ndiff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c\nindex 01966b89be14..177b6caa0a38 100644\n--- a/drivers/gpu/drm/i915/intel_pm.c\n+++ b/drivers/gpu/drm/i915/intel_pm.c\n@@ -6096,8 +6096,11 @@ static void gen6_set_rps_thresholds(struct drm_i915_private *dev_priv, u8 val)\n \t/* When byt can survive without system hang with dynamic\n \t * sw freq adjustments, this restriction can be lifted.\n \t */\n-\tif (IS_VALLEYVIEW(dev_priv))\n+\tif (IS_VALLEYVIEW(dev_priv)) {\n+\t\tthreshold_up = VLV_RP_UP_EI_THRESHOLD;\n+\t\tthreshold_down = VLV_RP_DOWN_EI_THRESHOLD;\n \t\tgoto skip_hw_write;\n+\t}\n \n \tI915_WRITE(GEN6_RP_UP_EI,\n \t\t   GT_INTERVAL_FROM_US(dev_priv, ei_up));\n-- \n2.14.3\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/default/linux-999.21-intel_idle-Disable-C6N-and-C6S-on-Bay-Trail.patch",
    "content": "From 945d0eb39d8920854c72ecb743c07d54b738cf7f Mon Sep 17 00:00:00 2001\nFrom: Hans de Goede <hdegoede@redhat.com>\nDate: Thu, 9 Nov 2017 14:21:24 +0100\nSubject: [PATCH v3 2/2] intel_idle: Disable C6N and C6S on Bay Trail\n\nIt seems that Bay Trail SoCs sometimes have issues waking from C6,\na lot of users even report Bay Trail devices only being stable\nwhen passing intel_idle.max_cstate=1 to the kernel.\n\nThis commits disables the C6 states while leaving the C7 states\navailable so that the cores can still reach deep sleep states.\n\nThere are several indicators that this is part of the solution for\nall the users who need to pass intel_idle.max_cstate=1:\n\n1) The \"VLP52 EOI Transactions May Not be Sent if Software\n   Enters Core C6 During an Interrupt Service Routine\" errata.\n\n2) Several users who need intel_idle.max_cstate=1 indicate in bko109051\n   (which has over 800 comments!) that using a shell script which\n   disables C6N and C6S through sysfs allows them to remove\n   intel_idle.max_cstate=1 and still have a stable system which does\n   use the C7 states for power-saving.\n\nBugLink: https://bugzilla.kernel.org/show_bug.cgi?id=109051\nSigned-off-by: Hans de Goede <hdegoede@redhat.com>\n---\n drivers/idle/intel_idle.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c\nindex 5dc7ea4b6bc4..fe05984c9e81 100644\n--- a/drivers/idle/intel_idle.c\n+++ b/drivers/idle/intel_idle.c\n@@ -221,6 +221,7 @@ static struct cpuidle_state byt_cstates[] = {\n \t\t.flags = MWAIT2flg(0x58) | CPUIDLE_FLAG_TLB_FLUSHED,\n \t\t.exit_latency = 300,\n \t\t.target_residency = 275,\n+\t\t.disabled = true,\n \t\t.enter = &intel_idle,\n \t\t.enter_s2idle = intel_idle_s2idle, },\n \t{\n@@ -229,6 +230,7 @@ static struct cpuidle_state byt_cstates[] = {\n \t\t.flags = MWAIT2flg(0x52) | CPUIDLE_FLAG_TLB_FLUSHED,\n \t\t.exit_latency = 500,\n \t\t.target_residency = 560,\n+\t\t.disabled = true,\n \t\t.enter = &intel_idle,\n \t\t.enter_s2idle = intel_idle_s2idle, },\n \t{\n-- \n2.14.3\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/linux-004_lower_undefined_mode_timeout.patch",
    "content": "diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/tty.c linux-2.6.23-rc9/arch/i386/boot/tty.c\n--- linux-2.6.23-rc9.orig/arch/x86/boot/tty.c\t2007-10-06 12:26:14.000000000 +0200\n+++ linux-2.6.23-rc9/arch/x86/boot/tty.c\t2007-10-06 12:37:47.000000000 +0200\n@@ -92,7 +92,7 @@\n \n int getchar_timeout(void)\n {\n-\tint cnt = 30;\n+\tint cnt = 3;\n \tint t0, t1;\n \n \tt0 = gettime();\ndiff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/video.c linux-2.6.23-rc9/arch/i386/boot/video.c\n--- linux-2.6.23-rc9.orig/arch/x86/boot/video.c\t2007-10-06 12:26:14.000000000 +0200\n+++ linux-2.6.23-rc9/arch/x86/boot/video.c\t2007-10-06 12:36:05.000000000 +0200\n@@ -329,7 +329,7 @@\n \tunsigned int sel;\n \n \tputs(\"Press <ENTER> to see video modes available, \"\n-\t     \"<SPACE> to continue, or wait 30 sec\\n\");\n+\t     \"<SPACE> to continue, or wait 3 sec\\n\");\n \n \tkbd_flush();\n \twhile (1) {\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/linux-007_die_floppy_die.patch",
    "content": "From 4ff58b642f80dedb20533978123d89b5ac9b1ed5 Mon Sep 17 00:00:00 2001\nFrom: Kyle McMartin <kyle@phobos.i.jkkm.org>\nDate: Tue, 30 Mar 2010 00:04:29 -0400\nSubject: die-floppy-die\n\nKill the floppy.ko pnp modalias. We were surviving just fine without\nautoloading floppy drivers, tyvm.\n\nPlease feel free to register all complaints in the wastepaper bin.\n---\n drivers/block/floppy.c |    3 +--\n 1 files changed, 1 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/block/floppy.c b/drivers/block/floppy.c\nindex 90c4038..f4a0b90 100644\n--- a/drivers/block/floppy.c\n+++ b/drivers/block/floppy.c\n@@ -4619,8 +4619,7 @@ static const struct pnp_device_id floppy_pnpids[] = {\n \t{\"PNP0700\", 0},\n \t{}\n };\n-\n-MODULE_DEVICE_TABLE(pnp, floppy_pnpids);\n+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */\n \n #else\n \n-- \n1.7.0.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/linux-009_disable_i8042_check_on_apple_mac.patch",
    "content": "From 2a79554c864ac58fa2ad982f0fcee2cc2aa33eb5 Mon Sep 17 00:00:00 2001\nFrom: Bastien Nocera <hadess@hadess.net>\nDate: Thu, 20 May 2010 10:30:31 -0400\nSubject: Disable i8042 checks on Intel Apple Macs\n\nAs those computers never had any i8042 controllers, and the\ncurrent lookup code could potentially lock up/hang/wait for\ntimeout for long periods of time.\n\nFixes intermittent hangs on boot on a MacbookAir1,1\n\nSigned-off-by: Bastien Nocera <hadess@hadess.net>\n---\n drivers/input/serio/i8042.c |   22 ++++++++++++++++++++++\n 1 files changed, 22 insertions(+), 0 deletions(-)\n\ndiff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c\nindex 6440a8f..4d7cf98 100644\n--- a/drivers/input/serio/i8042.c\n+++ b/drivers/input/serio/i8042.c\n@@ -1451,6 +1451,22 @@ static struct platform_driver i8042_driver = {\n \t.shutdown\t= i8042_shutdown,\n };\n \n+#ifdef CONFIG_DMI\n+static struct dmi_system_id __initdata dmi_system_table[] = {\n+\t{\n+\t\t.matches = {\n+\t\t\tDMI_MATCH(DMI_BIOS_VENDOR, \"Apple Computer, Inc.\")\n+\t\t},\n+\t},\n+\t{\n+\t\t.matches = {\n+\t\t\tDMI_MATCH(DMI_BIOS_VENDOR, \"Apple Inc.\")\n+\t\t},\n+\t},\n+\t{}\n+};\n+#endif /*CONFIG_DMI*/\n+\n static int __init i8042_init(void)\n {\n \tstruct platform_device *pdev;\n@@ -1458,6 +1474,12 @@ static int __init i8042_init(void)\n \n \tdbg_init();\n \n+#ifdef CONFIG_DMI\n+\t/* Intel Apple Macs never have an i8042 controller */\n+\tif (dmi_check_system(dmi_system_table) > 0)\n+\t\treturn -ENODEV;\n+#endif /*CONFIG_DMI*/\n+\n \terr = i8042_platform_init();\n \tif (err)\n \t\treturn err;\n-- \n1.7.0.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/raspberrypi/linux-051-ouya_controller_support.patch",
    "content": "commit 5a596921a4636e62843a59b7eab7b87b70a6d296\nAuthor: Lukas Rusak <lorusak@gmail.com>\nDate:   Sun May 6 22:03:11 2018 -0700\n\n    HID: add ouya HID driver\n    \n    This driver is a simple implementation to get the controller working and mapped properly.\n    This driver does not include functionality for the touchpad (yet). The original driver\n    was taken from from the ouya linux tree and has been simplified. It seems there may have\n    been other versions of the controller present that had a broken report descriptor. I have\n    removed that for now.\n\ndiff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig\nindex 60252fd796f6..6be2c454e72e 100644\n--- a/drivers/hid/Kconfig\n+++ b/drivers/hid/Kconfig\n@@ -659,6 +659,12 @@ config HID_ORTEK\n \t   - Ortek WKB-2000\n \t   - Skycable wireless presenter\n \n+config HID_OUYA\n+\ttristate \"OUYA Game Controller\"\n+\tdepends on USB_HID\n+\t---help---\n+\t  Support for OUYA Game Controller.\n+\n config HID_PANTHERLORD\n \ttristate \"Pantherlord/GreenAsia game controller\"\n \tdepends on HID\ndiff --git a/drivers/hid/Makefile b/drivers/hid/Makefile\nindex 17a8bd97da9d..4425890934e4 100644\n--- a/drivers/hid/Makefile\n+++ b/drivers/hid/Makefile\n@@ -71,6 +71,7 @@ obj-$(CONFIG_HID_MULTITOUCH)\t+= hid-multitouch.o\n obj-$(CONFIG_HID_NTI)\t\t\t+= hid-nti.o\n obj-$(CONFIG_HID_NTRIG)\t\t+= hid-ntrig.o\n obj-$(CONFIG_HID_ORTEK)\t\t+= hid-ortek.o\n+obj-$(CONFIG_HID_OUYA)\t\t+= hid-ouya.o\n obj-$(CONFIG_HID_PRODIKEYS)\t+= hid-prodikeys.o\n obj-$(CONFIG_HID_PANTHERLORD)\t+= hid-pl.o\n obj-$(CONFIG_HID_PENMOUNT)\t+= hid-penmount.o\ndiff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h\nindex 0b5cc910f62e..0528efb825fa 100644\n--- a/drivers/hid/hid-ids.h\n+++ b/drivers/hid/hid-ids.h\n@@ -859,6 +859,9 @@\n #define USB_DEVICE_ID_ORTEK_WKB2000\t0x2000\n #define USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S\t0x8003\n \n+#define USB_VENDOR_ID_OUYA 0x2836\n+#define USB_DEVICE_ID_OUYA_CONTROLLER 0x0001\n+\n #define USB_VENDOR_ID_PLANTRONICS\t0x047f\n \n #define USB_VENDOR_ID_PANASONIC\t\t0x04da\ndiff --git a/drivers/hid/hid-ouya.c b/drivers/hid/hid-ouya.c\nnew file mode 100644\nindex 000000000000..4344a47b40af\n--- /dev/null\n+++ b/drivers/hid/hid-ouya.c\n@@ -0,0 +1,131 @@\n+/*\n+ *  HID driver for OUYA Game Controller(s)\n+ *\n+ *  Copyright (c) 2013 OUYA\n+ *  Copyright (c) 2013 Gregorios Leach <optikflux@gmail.com>\n+ *  Copyright (c) 2018 Lukas Rusak <lorusak@gmail.com>\n+ */\n+\n+#include <linux/device.h>\n+#include <linux/hid.h>\n+#include <linux/input.h>\n+#include <linux/module.h>\n+\n+#include \"hid-ids.h\"\n+\n+static const unsigned int ouya_absmap[] = {\n+\t[0x30] = ABS_X,\t\t/* left stick X */\n+\t[0x31] = ABS_Y,\t\t/* left stick Y */\n+\t[0x32] = ABS_Z,\t\t/* L2 */\n+\t[0x33] = ABS_RX,\t/* right stick X */\n+\t[0x34] = ABS_RY,\t/* right stick Y */\n+\t[0x35] = ABS_RZ,\t/* R2 */\n+};\n+\n+static const unsigned int ouya_keymap[] = {\n+\t[0x1] = BTN_SOUTH,\t/* O */\n+\t[0x2] = BTN_WEST,\t/* U */\n+\t[0x3] = BTN_NORTH,\t/* Y */\n+\t[0x4] = BTN_EAST,\t/* A */\n+\t[0x5] = BTN_TL,\t\t/* L1 */\n+\t[0x6] = BTN_TR,\t\t/* R1 */\n+\t[0x7] = BTN_THUMBL,\t/* L3 */\n+\t[0x8] = BTN_THUMBR,\t/* R3 */\n+\t[0x9] = BTN_DPAD_UP,\t/* Up */\n+\t[0xa] = BTN_DPAD_DOWN,\t/* Down */\n+\t[0xb] = BTN_DPAD_LEFT,\t/* Left */\n+\t[0xc] = BTN_DPAD_RIGHT, /* Right */\n+\t[0xd] = BTN_TL2,\t/* L2 */\n+\t[0xe] = BTN_TR2,\t/* R2 */\n+\t[0xf] = BTN_MODE,\t/* Power */\n+};\n+\n+static int ouya_input_mapping(struct hid_device *hdev, struct hid_input *hi,\n+\t\t\t       struct hid_field *field, struct hid_usage *usage,\n+\t\t\t       unsigned long **bit, int *max)\n+{\n+\tif ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) {\n+\t\tunsigned int key = usage->hid & HID_USAGE;\n+\n+\t\tif (key >= ARRAY_SIZE(ouya_keymap))\n+\t\t\treturn -1;\n+\n+\t\tkey = ouya_keymap[key];\n+\t\thid_map_usage_clear(hi, usage, bit, max, EV_KEY, key);\n+\n+\t\treturn 1;\n+\n+\t} else if ((usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK) {\n+\t\tunsigned int abs = usage->hid & HID_USAGE;\n+\n+\t\tif (abs >= ARRAY_SIZE(ouya_absmap))\n+\t\t\treturn -1;\n+\n+\t\tabs = ouya_absmap[abs];\n+\t\thid_map_usage_clear(hi, usage, bit, max, EV_ABS, abs);\n+\n+\t\treturn 1;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int ouya_probe(struct hid_device *hdev, const struct hid_device_id *id)\n+{\n+\tint ret;\n+\n+\tret = hid_parse(hdev);\n+\tif (ret) {\n+\t\thid_err(hdev, \"parse failed\\n\");\n+\t\tgoto err_free;\n+\t}\n+\n+\tret = hid_hw_start(hdev, HID_CONNECT_DEFAULT | HID_CONNECT_HIDDEV_FORCE);\n+\tif (ret) {\n+\t\thid_err(hdev, \"hw start failed\\n\");\n+\t\tgoto err_free;\n+\t}\n+\n+\treturn 0;\n+\n+err_free:\n+\treturn ret;\n+}\n+\n+static void ouya_remove(struct hid_device *hdev)\n+{\n+\thid_hw_stop(hdev);\n+\tkfree(hid_get_drvdata(hdev));\n+}\n+\n+static const struct hid_device_id ouya_devices[] = {\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },\n+\t{ }\n+};\n+MODULE_DEVICE_TABLE(hid, ouya_devices);\n+\n+static struct hid_driver ouya_driver = {\n+\t.name = \"ouya\",\n+\t.id_table = ouya_devices,\n+\t.input_mapping = ouya_input_mapping,\n+\t.probe = ouya_probe,\n+\t.remove = ouya_remove,\n+};\n+\n+static int __init ouya_init(void)\n+{\n+\treturn hid_register_driver(&ouya_driver);\n+}\n+\n+static void __exit ouya_exit(void)\n+{\n+\thid_unregister_driver(&ouya_driver);\n+}\n+\n+module_init(ouya_init);\n+module_exit(ouya_exit);\n+\n+MODULE_LICENSE(\"GPL\");\n+MODULE_AUTHOR(\"Lukas Rusak <lorusak@gmail.com>\");\n+MODULE_AUTHOR(\"Gregorios Leach <optikflux@gmail.com>\");\n+MODULE_DESCRIPTION(\"Ouya Controller Driver\");\ndiff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c\nindex 587e2681a53f..b5adc13e0df1 100644\n--- a/drivers/hid/hid-quirks.c\n+++ b/drivers/hid/hid-quirks.c\n@@ -538,6 +538,9 @@ static const struct hid_device_id hid_have_special_driver[] = {\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },\n #endif\n+#if IS_ENABLED(CONFIG_HID_OUYA)\n+\t{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },\n+#endif\n #if IS_ENABLED(CONFIG_HID_PANTHERLORD)\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },\n \t{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/raspberrypi/linux-052-xbox_dvd_remote_support.patch",
    "content": "From 4d331d301222dc0585ab8864a842b3e460b1f744 Mon Sep 17 00:00:00 2001\nFrom: Benjamin Valentin <benpicco@googlemail.com>\nDate: Thu, 4 Oct 2018 02:57:10 +0200\nSubject: [PATCH] media: rc: add driver for Xbox DVD Movie Playback Kit\n\nThe Xbox DVD Movie Playback Kit is a USB dongle with an IR remote for the\nOriginal Xbox.\n\nHistorically it has been supported by the out-of-tree lirc_xbox driver,\nbut this one has fallen out of favour and was just dropped from popular\nKodi (formerly XBMC) distributions.\n\nThis driver is heaviely based on the ati_remote driver where all the\nboilerplate was taken from - I was mostly just removing code.\n\nSigned-off-by: Benjamin Valentin <benpicco@googlemail.com>\nSigned-off-by: Sean Young <sean@mess.org>\n---\n drivers/media/rc/Kconfig               |  12 +\n drivers/media/rc/Makefile              |   1 +\n drivers/media/rc/keymaps/Makefile      |   1 +\n drivers/media/rc/keymaps/rc-xbox-dvd.c |  63 +++++\n drivers/media/rc/xbox_remote.c         | 306 +++++++++++++++++++++++++\n include/media/rc-map.h                 |   1 +\n 6 files changed, 384 insertions(+)\n create mode 100644 drivers/media/rc/keymaps/rc-xbox-dvd.c\n create mode 100644 drivers/media/rc/xbox_remote.c\n\ndiff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig\nindex 1021c08a9ba4..8a216068a35a 100644\n--- a/drivers/media/rc/Kconfig\n+++ b/drivers/media/rc/Kconfig\n@@ -493,6 +493,18 @@ config IR_TANGO\n \t   The HW decoder supports NEC, RC-5, RC-6 IR protocols.\n \t   When compiled as a module, look for tango-ir.\n \n+config RC_XBOX_DVD\n+\ttristate \"Xbox DVD Movie Playback Kit\"\n+\tdepends on RC_CORE\n+\tdepends on USB_ARCH_HAS_HCD\n+\tselect USB\n+\thelp\n+\t   Say Y here if you want to use the Xbox DVD Movie Playback Kit.\n+\t   These are IR remotes with USB receivers for the Original Xbox (2001).\n+\n+\t   To compile this driver as a module, choose M here: the module will be\n+\t   called xbox_remote.\n+\n config IR_ZX\n \ttristate \"ZTE ZX IR remote control\"\n \tdepends on RC_CORE\ndiff --git a/drivers/media/rc/Makefile b/drivers/media/rc/Makefile\nindex e0340d043fe8..92c163816849 100644\n--- a/drivers/media/rc/Makefile\n+++ b/drivers/media/rc/Makefile\n@@ -48,3 +48,4 @@ obj-$(CONFIG_IR_SIR) += sir_ir.o\n obj-$(CONFIG_IR_MTK) += mtk-cir.o\n obj-$(CONFIG_IR_ZX) += zx-irdec.o\n obj-$(CONFIG_IR_TANGO) += tango-ir.o\n+obj-$(CONFIG_RC_XBOX_DVD) += xbox_remote.o\ndiff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile\nindex d6b913a3032d..5b1399af6b3a 100644\n--- a/drivers/media/rc/keymaps/Makefile\n+++ b/drivers/media/rc/keymaps/Makefile\n@@ -116,4 +116,5 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \\\n \t\t\trc-winfast.o \\\n \t\t\trc-winfast-usbii-deluxe.o \\\n \t\t\trc-su3000.o \\\n+\t\t\trc-xbox-dvd.o \\\n \t\t\trc-zx-irdec.o\ndiff --git a/drivers/media/rc/keymaps/rc-xbox-dvd.c b/drivers/media/rc/keymaps/rc-xbox-dvd.c\nnew file mode 100644\nindex 000000000000..af387244636b\n--- /dev/null\n+++ b/drivers/media/rc/keymaps/rc-xbox-dvd.c\n@@ -0,0 +1,63 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+// Keytable for Xbox DVD remote\n+// Copyright (c) 2018 by Benjamin Valentin <benpicco@googlemail.com>\n+\n+#include <media/rc-map.h>\n+#include <linux/module.h>\n+\n+/* based on lircd.conf.xbox */\n+static struct rc_map_table xbox_dvd[] = {\n+\t{0xa0b, KEY_OK},\n+\t{0xaa6, KEY_UP},\n+\t{0xaa7, KEY_DOWN},\n+\t{0xaa8, KEY_RIGHT},\n+\t{0xaa9, KEY_LEFT},\n+\t{0xac3, KEY_INFO},\n+\n+\t{0xac6, KEY_9},\n+\t{0xac7, KEY_8},\n+\t{0xac8, KEY_7},\n+\t{0xac9, KEY_6},\n+\t{0xaca, KEY_5},\n+\t{0xacb, KEY_4},\n+\t{0xacc, KEY_3},\n+\t{0xacd, KEY_2},\n+\t{0xace, KEY_1},\n+\t{0xacf, KEY_0},\n+\n+\t{0xad5, KEY_ANGLE},\n+\t{0xad8, KEY_BACK},\n+\t{0xadd, KEY_PREVIOUSSONG},\n+\t{0xadf, KEY_NEXTSONG},\n+\t{0xae0, KEY_STOP},\n+\t{0xae2, KEY_REWIND},\n+\t{0xae3, KEY_FASTFORWARD},\n+\t{0xae5, KEY_TITLE},\n+\t{0xae6, KEY_PAUSE},\n+\t{0xaea, KEY_PLAY},\n+\t{0xaf7, KEY_MENU},\n+};\n+\n+static struct rc_map_list xbox_dvd_map = {\n+\t.map = {\n+\t\t.scan     = xbox_dvd,\n+\t\t.size     = ARRAY_SIZE(xbox_dvd),\n+\t\t.rc_proto = RC_PROTO_UNKNOWN,\n+\t\t.name     = RC_MAP_XBOX_DVD,\n+\t}\n+};\n+\n+static int __init init_rc_map(void)\n+{\n+\treturn rc_map_register(&xbox_dvd_map);\n+}\n+\n+static void __exit exit_rc_map(void)\n+{\n+\trc_map_unregister(&xbox_dvd_map);\n+}\n+\n+module_init(init_rc_map)\n+module_exit(exit_rc_map)\n+\n+MODULE_LICENSE(\"GPL\");\ndiff --git a/drivers/media/rc/xbox_remote.c b/drivers/media/rc/xbox_remote.c\nnew file mode 100644\nindex 000000000000..07ed9be24a60\n--- /dev/null\n+++ b/drivers/media/rc/xbox_remote.c\n@@ -0,0 +1,306 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+// Driver for Xbox DVD Movie Playback Kit\n+// Copyright (c) 2018 by Benjamin Valentin <benpicco@googlemail.com>\n+\n+/*\n+ *  Xbox DVD Movie Playback Kit USB IR dongle support\n+ *\n+ *  The driver was derived from the ati_remote driver 2.2.1\n+ *          and used information from lirc_xbox.c\n+ *\n+ *          Copyright (c) 2011, 2012 Anssi Hannula <anssi.hannula@iki.fi>\n+ *          Copyright (c) 2004 Torrey Hoffman <thoffman@arnor.net>\n+ *          Copyright (c) 2002 Vladimir Dergachev\n+ *          Copyright (c) 2003-2004 Paul Miller <pmiller9@users.sourceforge.net>\n+ */\n+\n+#include <linux/slab.h>\n+#include <linux/module.h>\n+#include <linux/usb/input.h>\n+#include <media/rc-core.h>\n+\n+/*\n+ * Module and Version Information\n+ */\n+#define DRIVER_VERSION\t\"1.0.0\"\n+#define DRIVER_AUTHOR\t\"Benjamin Valentin <benpicco@googlemail.com>\"\n+#define DRIVER_DESC\t\t\"Xbox DVD USB Remote Control\"\n+\n+#define NAME_BUFSIZE      80    /* size of product name, path buffers */\n+#define DATA_BUFSIZE      8     /* size of URB data buffers */\n+\n+/*\n+ * USB vendor ids for XBOX DVD Dongles\n+ */\n+#define VENDOR_GAMESTER     0x040b\n+#define VENDOR_MICROSOFT    0x045e\n+\n+static const struct usb_device_id xbox_remote_table[] = {\n+\t/* Gamester Xbox DVD Movie Playback Kit IR */\n+\t{\n+\t\tUSB_DEVICE(VENDOR_GAMESTER, 0x6521),\n+\t},\n+\t/* Microsoft Xbox DVD Movie Playback Kit IR */\n+\t{\n+\t\tUSB_DEVICE(VENDOR_MICROSOFT, 0x0284),\n+\t},\n+\t{}\t/* Terminating entry */\n+};\n+\n+MODULE_DEVICE_TABLE(usb, xbox_remote_table);\n+\n+struct xbox_remote {\n+\tstruct rc_dev *rdev;\n+\tstruct usb_device *udev;\n+\tstruct usb_interface *interface;\n+\n+\tstruct urb *irq_urb;\n+\tunsigned char inbuf[DATA_BUFSIZE] __aligned(sizeof(u16));\n+\n+\tchar rc_name[NAME_BUFSIZE];\n+\tchar rc_phys[NAME_BUFSIZE];\n+};\n+\n+static int xbox_remote_rc_open(struct rc_dev *rdev)\n+{\n+\tstruct xbox_remote *xbox_remote = rdev->priv;\n+\n+\t/* On first open, submit the read urb which was set up previously. */\n+\txbox_remote->irq_urb->dev = xbox_remote->udev;\n+\tif (usb_submit_urb(xbox_remote->irq_urb, GFP_KERNEL)) {\n+\t\tdev_err(&xbox_remote->interface->dev,\n+\t\t\t\"%s: usb_submit_urb failed!\\n\", __func__);\n+\t\treturn -EIO;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static void xbox_remote_rc_close(struct rc_dev *rdev)\n+{\n+\tstruct xbox_remote *xbox_remote = rdev->priv;\n+\n+\tusb_kill_urb(xbox_remote->irq_urb);\n+}\n+\n+/*\n+ * xbox_remote_report_input\n+ */\n+static void xbox_remote_input_report(struct urb *urb)\n+{\n+\tstruct xbox_remote *xbox_remote = urb->context;\n+\tunsigned char *data = xbox_remote->inbuf;\n+\n+\t/*\n+\t * data[0] = 0x00\n+\t * data[1] = length - always 0x06\n+\t * data[2] = the key code\n+\t * data[3] = high part of key code\n+\t * data[4] = last_press_ms (low)\n+\t * data[5] = last_press_ms (high)\n+\t */\n+\n+\t/* Deal with strange looking inputs */\n+\tif (urb->actual_length != 6 || urb->actual_length != data[1]) {\n+\t\tdev_warn(&urb->dev->dev, \"Weird data, len=%d: %*ph\\n\",\n+\t\t\turb->actual_length, urb->actual_length, data);\n+\t\treturn;\n+\t}\n+\n+\trc_keydown(xbox_remote->rdev, RC_PROTO_UNKNOWN,\n+\t\t   le16_to_cpup((__le16*)(data + 2)), 0);\n+}\n+\n+/*\n+ * xbox_remote_irq_in\n+ */\n+static void xbox_remote_irq_in(struct urb *urb)\n+{\n+\tstruct xbox_remote *xbox_remote = urb->context;\n+\tint retval;\n+\n+\tswitch (urb->status) {\n+\tcase 0:\t\t\t/* success */\n+\t\txbox_remote_input_report(urb);\n+\t\tbreak;\n+\tcase -ECONNRESET:\t/* unlink */\n+\tcase -ENOENT:\n+\tcase -ESHUTDOWN:\n+\t\tdev_dbg(&xbox_remote->interface->dev,\n+\t\t\t\"%s: urb error status, unlink?\\n\",\n+\t\t\t__func__);\n+\t\treturn;\n+\tdefault:\t\t/* error */\n+\t\tdev_dbg(&xbox_remote->interface->dev,\n+\t\t\t\"%s: Nonzero urb status %d\\n\",\n+\t\t\t__func__, urb->status);\n+\t}\n+\n+\tretval = usb_submit_urb(urb, GFP_ATOMIC);\n+\tif (retval)\n+\t\tdev_err(&xbox_remote->interface->dev,\n+\t\t\t\"%s: usb_submit_urb()=%d\\n\",\n+\t\t\t__func__, retval);\n+}\n+\n+static void xbox_remote_rc_init(struct xbox_remote *xbox_remote)\n+{\n+\tstruct rc_dev *rdev = xbox_remote->rdev;\n+\n+\trdev->priv = xbox_remote;\n+\trdev->allowed_protocols = RC_PROTO_BIT_UNKNOWN;\n+\trdev->driver_name = \"xbox_remote\";\n+\n+\trdev->open = xbox_remote_rc_open;\n+\trdev->close = xbox_remote_rc_close;\n+\n+\trdev->device_name = xbox_remote->rc_name;\n+\trdev->input_phys = xbox_remote->rc_phys;\n+\n+\tusb_to_input_id(xbox_remote->udev, &rdev->input_id);\n+\trdev->dev.parent = &xbox_remote->interface->dev;\n+}\n+\n+static int xbox_remote_initialize(struct xbox_remote *xbox_remote,\n+\tstruct usb_endpoint_descriptor *endpoint_in)\n+{\n+\tstruct usb_device *udev = xbox_remote->udev;\n+\tint pipe, maxp;\n+\n+\t/* Set up irq_urb */\n+\tpipe = usb_rcvintpipe(udev, endpoint_in->bEndpointAddress);\n+\tmaxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));\n+\tmaxp = (maxp > DATA_BUFSIZE) ? DATA_BUFSIZE : maxp;\n+\n+\tusb_fill_int_urb(xbox_remote->irq_urb, udev, pipe, xbox_remote->inbuf,\n+\t\t\t maxp, xbox_remote_irq_in, xbox_remote,\n+\t\t\t endpoint_in->bInterval);\n+\n+\treturn 0;\n+}\n+\n+/*\n+ * xbox_remote_probe\n+ */\n+static int xbox_remote_probe(struct usb_interface *interface,\n+\tconst struct usb_device_id *id)\n+{\n+\tstruct usb_device *udev = interface_to_usbdev(interface);\n+\tstruct usb_host_interface *iface_host = interface->cur_altsetting;\n+\tstruct usb_endpoint_descriptor *endpoint_in;\n+\tstruct xbox_remote *xbox_remote;\n+\tstruct rc_dev *rc_dev;\n+\tint err = -ENOMEM;\n+\n+\t// why is there also a device with no endpoints?\n+\tif (iface_host->desc.bNumEndpoints == 0)\n+\t\treturn -ENODEV;\n+\n+\tif (iface_host->desc.bNumEndpoints != 1) {\n+\t\tpr_err(\"%s: Unexpected desc.bNumEndpoints: %d\\n\",\n+\t\t\t__func__, iface_host->desc.bNumEndpoints);\n+\t\treturn -ENODEV;\n+\t}\n+\n+\tendpoint_in = &iface_host->endpoint[0].desc;\n+\n+\tif (!usb_endpoint_is_int_in(endpoint_in)) {\n+\t\tpr_err(\"%s: Unexpected endpoint_in\\n\", __func__);\n+\t\treturn -ENODEV;\n+\t}\n+\tif (le16_to_cpu(endpoint_in->wMaxPacketSize) == 0) {\n+\t\tpr_err(\"%s: endpoint_in message size==0?\\n\", __func__);\n+\t\treturn -ENODEV;\n+\t}\n+\n+\txbox_remote = kzalloc(sizeof(*xbox_remote), GFP_KERNEL);\n+\trc_dev = rc_allocate_device(RC_DRIVER_SCANCODE);\n+\tif (!xbox_remote || !rc_dev)\n+\t\tgoto exit_free_dev_rdev;\n+\n+\t/* Allocate URB buffer */\n+\txbox_remote->irq_urb = usb_alloc_urb(0, GFP_KERNEL);\n+\tif (!xbox_remote->irq_urb)\n+\t\tgoto exit_free_buffers;\n+\n+\txbox_remote->udev = udev;\n+\txbox_remote->rdev = rc_dev;\n+\txbox_remote->interface = interface;\n+\n+\tusb_make_path(udev, xbox_remote->rc_phys, sizeof(xbox_remote->rc_phys));\n+\n+\tstrlcat(xbox_remote->rc_phys, \"/input0\", sizeof(xbox_remote->rc_phys));\n+\n+\tsnprintf(xbox_remote->rc_name, sizeof(xbox_remote->rc_name), \"%s%s%s\",\n+\t\tudev->manufacturer ?: \"\",\n+\t\tudev->manufacturer && udev->product ? \" \" : \"\",\n+\t\tudev->product ?: \"\");\n+\n+\tif (!strlen(xbox_remote->rc_name))\n+\t\tsnprintf(xbox_remote->rc_name, sizeof(xbox_remote->rc_name),\n+\t\t\tDRIVER_DESC \"(%04x,%04x)\",\n+\t\t\tle16_to_cpu(xbox_remote->udev->descriptor.idVendor),\n+\t\t\tle16_to_cpu(xbox_remote->udev->descriptor.idProduct));\n+\n+\trc_dev->map_name = RC_MAP_XBOX_DVD; /* default map */\n+\n+\txbox_remote_rc_init(xbox_remote);\n+\n+\t/* Device Hardware Initialization */\n+\terr = xbox_remote_initialize(xbox_remote, endpoint_in);\n+\tif (err)\n+\t\tgoto exit_kill_urbs;\n+\n+\t/* Set up and register rc device */\n+\terr = rc_register_device(xbox_remote->rdev);\n+\tif (err)\n+\t\tgoto exit_kill_urbs;\n+\n+\tusb_set_intfdata(interface, xbox_remote);\n+\n+\treturn 0;\n+\n+exit_kill_urbs:\n+\tusb_kill_urb(xbox_remote->irq_urb);\n+exit_free_buffers:\n+\tusb_free_urb(xbox_remote->irq_urb);\n+exit_free_dev_rdev:\n+\trc_free_device(rc_dev);\n+\tkfree(xbox_remote);\n+\n+\treturn err;\n+}\n+\n+/*\n+ * xbox_remote_disconnect\n+ */\n+static void xbox_remote_disconnect(struct usb_interface *interface)\n+{\n+\tstruct xbox_remote *xbox_remote;\n+\n+\txbox_remote = usb_get_intfdata(interface);\n+\tusb_set_intfdata(interface, NULL);\n+\tif (!xbox_remote) {\n+\t\tdev_warn(&interface->dev, \"%s - null device?\\n\", __func__);\n+\t\treturn;\n+\t}\n+\n+\tusb_kill_urb(xbox_remote->irq_urb);\n+\trc_unregister_device(xbox_remote->rdev);\n+\tusb_free_urb(xbox_remote->irq_urb);\n+\tkfree(xbox_remote);\n+}\n+\n+/* usb specific object to register with the usb subsystem */\n+static struct usb_driver xbox_remote_driver = {\n+\t.name         = \"xbox_remote\",\n+\t.probe        = xbox_remote_probe,\n+\t.disconnect   = xbox_remote_disconnect,\n+\t.id_table     = xbox_remote_table,\n+};\n+\n+module_usb_driver(xbox_remote_driver);\n+\n+MODULE_AUTHOR(DRIVER_AUTHOR);\n+MODULE_DESCRIPTION(DRIVER_DESC);\n+MODULE_LICENSE(\"GPL\");\ndiff --git a/include/media/rc-map.h b/include/media/rc-map.h\nindex bfa3017cecba..d621acadfbf3 100644\n--- a/include/media/rc-map.h\n+++ b/include/media/rc-map.h\n@@ -277,6 +277,7 @@ struct rc_map *rc_map_get(const char *name);\n #define RC_MAP_WINFAST                   \"rc-winfast\"\n #define RC_MAP_WINFAST_USBII_DELUXE      \"rc-winfast-usbii-deluxe\"\n #define RC_MAP_SU3000                    \"rc-su3000\"\n+#define RC_MAP_XBOX_DVD                  \"rc-xbox-dvd\"\n #define RC_MAP_ZX_IRDEC                  \"rc-zx-irdec\"\n \n /*\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/raspberrypi/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch",
    "content": "From 7051422474e4c4e302ede3d07ffd8ef2682e07a2 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Tue, 22 Apr 2014 16:05:14 +0300\nSubject: [PATCH] [RFC] hid/sony: add autorepeat for PS3 remotes\n\nadapted to 4.6\n\nBetreff: [RFC] hid/sony: add autorepeat for PS3 remotes\nVon: David Dillow <dave@thedillows.org>\nDatum: 28.06.2013 04:28\nAn: linux-input@vger.kernel.org\nKopie (CC): Stephan Raue <stephan@openelec.tv>\n\nSome applications using the PS3 remote would like to have autorepeat\nfrom the device. Use the input subsystem's software emulation to provide\nthis capability, and enable those that don't need it to turn it off.\n---\nI'm not sure this is the correct approach, or if it is even appropriate\nfor a remote to do autorepeat. However, the media/rc subsystem does do\nit by default, and it's been requested by users, so there is at least\nsome demand.\n\nThis compiled against the hid-sony driver with the PS3 remote changes\nmerged, but I have done no testing of it. If the approach seems\nreasonable, I'll try to test it when the MythTV is idle.\n\nSigned-off-by: Matt DeVillier <matt.devillier@gmail.com>\n---\n drivers/hid/hid-sony.c | 21 +++++++++++++++++++++\n 1 file changed, 21 insertions(+)\n\ndiff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c\nindex 310436a..84f7f41 100644\n--- a/drivers/hid/hid-sony.c\n+++ b/drivers/hid/hid-sony.c\n@@ -1120,6 +1120,25 @@ static int ps3remote_mapping(struct hid_device *hdev, struct hid_input *hi,\n \treturn 1;\n }\n \n+static int ps3remote_setup_repeat(struct hid_device *hdev)\n+{\n+\tstruct hid_input *hidinput = list_first_entry(&hdev->inputs,\n+\t\t\t\t\t\t struct hid_input, list);\n+\tstruct input_dev *input = hidinput->input;\n+\n+\t/*\n+\t * Set up autorepeat defaults per the remote control subsystem;\n+\t * this must be done after hid_hw_start(), as having these non-zero\n+\t * at the time of input_register_device() tells the input system that\n+\t * the hardware does the autorepeat, and the PS3 remote does not.\n+\t*/\n+\tset_bit(EV_REP, input->evbit);\n+\tinput->rep[REP_DELAY]  = 500;\n+\tinput->rep[REP_PERIOD] = 125;\n+\n+\treturn 0;\n+}\n+\n static u8 *sony_report_fixup(struct hid_device *hdev, u8 *rdesc,\n \t\tunsigned int *rsize)\n {\n@@ -2372,6 +2391,8 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)\n \t\tsony_init_output_report(sc, dualshock4_send_output_report);\n \t} else if (sc->quirks & MOTION_CONTROLLER) {\n \t\tsony_init_output_report(sc, motion_send_output_report);\n+\t} else if (sc->quirks & PS3REMOTE) {\n+\t\tret = ps3remote_setup_repeat(hdev);\n \t} else {\n \t\tret = 0;\n \t}\n-- \n2.5.0\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/raspberrypi/linux-062-imon_pad_ignore_diagonal.patch",
    "content": "diff -Naur linux-3.16.1/drivers/media/rc/imon.c linux-3.16.1.patch/drivers/media/rc/imon.c\n--- linux-3.16.1/drivers/media/rc/imon.c\t2014-08-14 04:36:35.000000000 +0200\n+++ linux-3.16.1.patch/drivers/media/rc/imon.c\t2014-08-15 13:57:16.587620642 +0200\n@@ -1344,6 +1344,17 @@\n \t\t\t}\n \t\t} else {\n \t\t\t/*\n+\t\t\t * For users without stabilized, just ignore any value getting\n+\t\t\t * to close to the diagonal.\n+\t\t\t */\n+\t\t\tif ((abs(rel_y) < 2 && abs(rel_x) < 2) ||\n+\t\t\t\tabs(abs(rel_y) - abs(rel_x)) < 2 ) {\n+\t\t\t\tspin_lock_irqsave(&ictx->kc_lock, flags);\n+\t\t\t\tictx->kc = KEY_UNKNOWN;\n+\t\t\t\tspin_unlock_irqrestore(&ictx->kc_lock, flags);\n+\t\t\t\treturn;\n+\t\t\t}\n+\t\t\t/*\n \t\t\t * Hack alert: instead of using keycodes, we have\n \t\t\t * to use hard-coded scancodes here...\n \t\t\t */\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/raspberrypi/linux-902-extend-rc6-toggle-support-for-zotac.patch",
    "content": "From ae1ccaa3587c0bd3d6d01841fa2e668cdf738f1e Mon Sep 17 00:00:00 2001\nFrom: Matthias Reichl <hias@horus.com>\nDate: Sun, 3 Feb 2019 14:24:00 +0100\nSubject: [PATCH] media: rc: ir-rc6-decoder: enable toggle bit for Zotac\n remotes\n\nThe Zotac RC2604323/01G and RC2604329/02BG remotes use the 32-bit\nrc6 protocol and toggle bit 15 (0x8000) on repeated button presses,\nlike MCE remotes.\n\nAdd the customer code 0x80340000 to the 32-bit rc6 toggle\nhandling code to get proper scancodes and toggle reports.\n\nSigned-off-by: Matthias Reichl <hias@horus.com>\n---\n drivers/media/rc/ir-rc6-decoder.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/drivers/media/rc/ir-rc6-decoder.c b/drivers/media/rc/ir-rc6-decoder.c\nindex d96aed1343e4..5cc302fa4daa 100644\n--- a/drivers/media/rc/ir-rc6-decoder.c\n+++ b/drivers/media/rc/ir-rc6-decoder.c\n@@ -40,6 +40,7 @@\n #define RC6_6A_MCE_TOGGLE_MASK\t0x8000\t/* for the body bits */\n #define RC6_6A_LCC_MASK\t\t0xffff0000 /* RC6-6A-32 long customer code mask */\n #define RC6_6A_MCE_CC\t\t0x800f0000 /* MCE customer code */\n+#define RC6_6A_ZOTAC_CC\t\t0x80340000 /* Zotac customer code */\n #define RC6_6A_KATHREIN_CC\t0x80460000 /* Kathrein RCU-676 customer code */\n #ifndef CHAR_BIT\n #define CHAR_BIT 8\t/* Normally in <limits.h> */\n@@ -246,6 +247,7 @@ static int ir_rc6_decode(struct rc_dev *dev, struct ir_raw_event ev)\n \t\t\t\tswitch (scancode & RC6_6A_LCC_MASK) {\n \t\t\t\tcase RC6_6A_MCE_CC:\n \t\t\t\tcase RC6_6A_KATHREIN_CC:\n+\t\t\t\tcase RC6_6A_ZOTAC_CC:\n \t\t\t\t\tprotocol = RC_PROTO_RC6_MCE;\n \t\t\t\t\ttoggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);\n \t\t\t\t\tscancode &= ~RC6_6A_MCE_TOGGLE_MASK;\n-- \n2.20.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/raspberrypi/linux-903-backport-rcmm-ir-decoder.patch",
    "content": "From da8a71104dda4a85a9d9546ff462542347f8efa6 Mon Sep 17 00:00:00 2001\nFrom: Matthias Reichl <hias@horus.com>\nDate: Wed, 20 Mar 2019 09:11:53 +0100\nSubject: [PATCH] media: rc: rcmm decoder and encoder\n\ncommit 721074b03411327e7bf41555d4cc7c18f49313f7 upstream.\n\nmedia: add support for RCMM infrared remote controls.\n\nSigned-off-by: Patrick Lerda <patrick9876@free.fr>\nSigned-off-by: Sean Young <sean@mess.org>\nSigned-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>\nSigned-off-by: Matthias Reichl <hias@horus.com>\n---\n Documentation/media/lirc.h.rst.exceptions |   3 +\n MAINTAINERS                               |   5 +\n drivers/media/rc/Kconfig                  |  13 ++\n drivers/media/rc/Makefile                 |   1 +\n drivers/media/rc/ir-rcmm-decoder.c        | 254 ++++++++++++++++++++++\n drivers/media/rc/rc-core-priv.h           |   5 +\n drivers/media/rc/rc-main.c                |   9 +\n include/media/rc-map.h                    |  14 +-\n include/uapi/linux/lirc.h                 |   6 +\n tools/include/uapi/linux/lirc.h           |  12 +\n 10 files changed, 319 insertions(+), 3 deletions(-)\n create mode 100644 drivers/media/rc/ir-rcmm-decoder.c\n\ndiff --git a/Documentation/media/lirc.h.rst.exceptions b/Documentation/media/lirc.h.rst.exceptions\nindex 984b61dc3f2e..e7a41d4b3d46 100644\n--- a/Documentation/media/lirc.h.rst.exceptions\n+++ b/Documentation/media/lirc.h.rst.exceptions\n@@ -58,6 +58,9 @@ ignore symbol RC_PROTO_SHARP\n ignore symbol RC_PROTO_XMP\n ignore symbol RC_PROTO_CEC\n ignore symbol RC_PROTO_IMON\n+ignore symbol RC_PROTO_RCMM12\n+ignore symbol RC_PROTO_RCMM24\n+ignore symbol RC_PROTO_RCMM32\n \n # Undocumented macros\n \ndiff --git a/MAINTAINERS b/MAINTAINERS\nindex 9e9b19ecf6f7..57b60dd42729 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -15837,6 +15837,11 @@ M:\tDavid Härdeman <david@hardeman.nu>\n S:\tMaintained\n F:\tdrivers/media/rc/winbond-cir.c\n \n+RCMM REMOTE CONTROLS DECODER\n+M:\tPatrick Lerda <patrick9876@free.fr>\n+S:\tMaintained\n+F:\tdrivers/media/rc/ir-rcmm-decoder.c\n+\n WINSYSTEMS EBC-C384 WATCHDOG DRIVER\n M:\tWilliam Breathitt Gray <vilhelm.gray@gmail.com>\n L:\tlinux-watchdog@vger.kernel.org\ndiff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig\nindex 1021c08a9ba4..8164a889011a 100644\n--- a/drivers/media/rc/Kconfig\n+++ b/drivers/media/rc/Kconfig\n@@ -133,6 +133,19 @@ config IR_IMON_DECODER\n \t   remote control and you would like to use it with a raw IR\n \t   receiver, or if you wish to use an encoder to transmit this IR.\n \n+config IR_RCMM_DECODER\n+\ttristate \"Enable IR raw decoder for the RC-MM protocol\"\n+\tdepends on RC_CORE\n+\thelp\n+\t   Enable this option when you have IR with RC-MM protocol, and\n+\t   you need the software decoder. The driver supports 12,\n+\t   24 and 32 bits RC-MM variants. You can enable or disable the\n+\t   different modes using the following RC protocol keywords:\n+\t   'rc-mm-12', 'rc-mm-24' and 'rc-mm-32'.\n+\n+\t   To compile this driver as a module, choose M here: the module\n+\t   will be called ir-rcmm-decoder.\n+\n endif #RC_DECODERS\n \n menuconfig RC_DEVICES\ndiff --git a/drivers/media/rc/Makefile b/drivers/media/rc/Makefile\nindex e0340d043fe8..fc4058013234 100644\n--- a/drivers/media/rc/Makefile\n+++ b/drivers/media/rc/Makefile\n@@ -16,6 +16,7 @@ obj-$(CONFIG_IR_SHARP_DECODER) += ir-sharp-decoder.o\n obj-$(CONFIG_IR_MCE_KBD_DECODER) += ir-mce_kbd-decoder.o\n obj-$(CONFIG_IR_XMP_DECODER) += ir-xmp-decoder.o\n obj-$(CONFIG_IR_IMON_DECODER) += ir-imon-decoder.o\n+obj-$(CONFIG_IR_RCMM_DECODER) += ir-rcmm-decoder.o\n \n # stand-alone IR receivers/transmitters\n obj-$(CONFIG_RC_ATI_REMOTE) += ati_remote.o\ndiff --git a/drivers/media/rc/ir-rcmm-decoder.c b/drivers/media/rc/ir-rcmm-decoder.c\nnew file mode 100644\nindex 000000000000..f1096ac1e5c5\n--- /dev/null\n+++ b/drivers/media/rc/ir-rcmm-decoder.c\n@@ -0,0 +1,254 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+// ir-rcmm-decoder.c - A decoder for the RCMM IR protocol\n+//\n+// Copyright (C) 2018 by Patrick Lerda <patrick9876@free.fr>\n+\n+#include \"rc-core-priv.h\"\n+#include <linux/module.h>\n+#include <linux/version.h>\n+\n+#define RCMM_UNIT\t\t166667\t/* nanosecs */\n+#define RCMM_PREFIX_PULSE\t416666  /* 166666.666666666*2.5 */\n+#define RCMM_PULSE_0            277777  /* 166666.666666666*(1+2/3) */\n+#define RCMM_PULSE_1            444444  /* 166666.666666666*(2+2/3) */\n+#define RCMM_PULSE_2            611111  /* 166666.666666666*(3+2/3) */\n+#define RCMM_PULSE_3            777778  /* 166666.666666666*(4+2/3) */\n+\n+enum rcmm_state {\n+\tSTATE_INACTIVE,\n+\tSTATE_LOW,\n+\tSTATE_BUMP,\n+\tSTATE_VALUE,\n+\tSTATE_FINISHED,\n+};\n+\n+static bool rcmm_mode(const struct rcmm_dec *data)\n+{\n+\treturn !((0x000c0000 & data->bits) == 0x000c0000);\n+}\n+\n+static int rcmm_miscmode(struct rc_dev *dev, struct rcmm_dec *data)\n+{\n+\tswitch (data->count) {\n+\tcase 24:\n+\t\tif (dev->enabled_protocols & RC_PROTO_BIT_RCMM24) {\n+\t\t\trc_keydown(dev, RC_PROTO_RCMM24, data->bits, 0);\n+\t\t\tdata->state = STATE_INACTIVE;\n+\t\t\treturn 0;\n+\t\t}\n+\t\treturn -1;\n+\n+\tcase 12:\n+\t\tif (dev->enabled_protocols & RC_PROTO_BIT_RCMM12) {\n+\t\t\trc_keydown(dev, RC_PROTO_RCMM12, data->bits, 0);\n+\t\t\tdata->state = STATE_INACTIVE;\n+\t\t\treturn 0;\n+\t\t}\n+\t\treturn -1;\n+\t}\n+\n+\treturn -1;\n+}\n+\n+/**\n+ * ir_rcmm_decode() - Decode one RCMM pulse or space\n+ * @dev:\tthe struct rc_dev descriptor of the device\n+ * @ev:\t\tthe struct ir_raw_event descriptor of the pulse/space\n+ *\n+ * This function returns -EINVAL if the pulse violates the state machine\n+ */\n+static int ir_rcmm_decode(struct rc_dev *dev, struct ir_raw_event ev)\n+{\n+\tstruct rcmm_dec *data = &dev->raw->rcmm;\n+\tu32 scancode;\n+\tu8 toggle;\n+\tint value;\n+\n+\tif (!(dev->enabled_protocols & (RC_PROTO_BIT_RCMM32 |\n+\t\t\t\t\t\t\tRC_PROTO_BIT_RCMM24 |\n+\t\t\t\t\t\t\tRC_PROTO_BIT_RCMM12)))\n+\t\treturn 0;\n+\n+\tif (!is_timing_event(ev)) {\n+\t\tif (ev.reset)\n+\t\t\tdata->state = STATE_INACTIVE;\n+\t\treturn 0;\n+\t}\n+\n+\tswitch (data->state) {\n+\tcase STATE_INACTIVE:\n+\t\tif (!ev.pulse)\n+\t\t\tbreak;\n+\n+\t\tif (!eq_margin(ev.duration, RCMM_PREFIX_PULSE, RCMM_UNIT / 2))\n+\t\t\tbreak;\n+\n+\t\tdata->state = STATE_LOW;\n+\t\tdata->count = 0;\n+\t\tdata->bits  = 0;\n+\t\treturn 0;\n+\n+\tcase STATE_LOW:\n+\t\tif (ev.pulse)\n+\t\t\tbreak;\n+\n+\t\tif (!eq_margin(ev.duration, RCMM_PULSE_0, RCMM_UNIT / 2))\n+\t\t\tbreak;\n+\n+\t\tdata->state = STATE_BUMP;\n+\t\treturn 0;\n+\n+\tcase STATE_BUMP:\n+\t\tif (!ev.pulse)\n+\t\t\tbreak;\n+\n+\t\tif (!eq_margin(ev.duration, RCMM_UNIT, RCMM_UNIT / 2))\n+\t\t\tbreak;\n+\n+\t\tdata->state = STATE_VALUE;\n+\t\treturn 0;\n+\n+\tcase STATE_VALUE:\n+\t\tif (ev.pulse)\n+\t\t\tbreak;\n+\n+\t\tif (eq_margin(ev.duration, RCMM_PULSE_0, RCMM_UNIT / 2))\n+\t\t\tvalue = 0;\n+\t\telse if (eq_margin(ev.duration, RCMM_PULSE_1, RCMM_UNIT / 2))\n+\t\t\tvalue = 1;\n+\t\telse if (eq_margin(ev.duration, RCMM_PULSE_2, RCMM_UNIT / 2))\n+\t\t\tvalue = 2;\n+\t\telse if (eq_margin(ev.duration, RCMM_PULSE_3, RCMM_UNIT / 2))\n+\t\t\tvalue = 3;\n+\t\telse\n+\t\t\tvalue = -1;\n+\n+\t\tif (value == -1) {\n+\t\t\tif (!rcmm_miscmode(dev, data))\n+\t\t\t\treturn 0;\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tdata->bits <<= 2;\n+\t\tdata->bits |= value;\n+\n+\t\tdata->count += 2;\n+\n+\t\tif (data->count < 32)\n+\t\t\tdata->state = STATE_BUMP;\n+\t\telse\n+\t\t\tdata->state = STATE_FINISHED;\n+\n+\t\treturn 0;\n+\n+\tcase STATE_FINISHED:\n+\t\tif (!ev.pulse)\n+\t\t\tbreak;\n+\n+\t\tif (!eq_margin(ev.duration, RCMM_UNIT, RCMM_UNIT / 2))\n+\t\t\tbreak;\n+\n+\t\tif (rcmm_mode(data)) {\n+\t\t\ttoggle = !!(0x8000 & data->bits);\n+\t\t\tscancode = data->bits & ~0x8000;\n+\t\t} else {\n+\t\t\ttoggle = 0;\n+\t\t\tscancode = data->bits;\n+\t\t}\n+\n+\t\tif (dev->enabled_protocols & RC_PROTO_BIT_RCMM32) {\n+\t\t\trc_keydown(dev, RC_PROTO_RCMM32, scancode, toggle);\n+\t\t\tdata->state = STATE_INACTIVE;\n+\t\t\treturn 0;\n+\t\t}\n+\n+\t\tbreak;\n+\t}\n+\n+\tdata->state = STATE_INACTIVE;\n+\treturn -EINVAL;\n+}\n+\n+static const int rcmmspace[] = {\n+\tRCMM_PULSE_0,\n+\tRCMM_PULSE_1,\n+\tRCMM_PULSE_2,\n+\tRCMM_PULSE_3,\n+};\n+\n+static int ir_rcmm_rawencoder(struct ir_raw_event **ev, unsigned int max,\n+\t\t\t      unsigned int n, u32 data)\n+{\n+\tint i;\n+\tint ret;\n+\n+\tret = ir_raw_gen_pulse_space(ev, &max, RCMM_PREFIX_PULSE, RCMM_PULSE_0);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tfor (i = n - 2; i >= 0; i -= 2) {\n+\t\tconst unsigned int space = rcmmspace[(data >> i) & 3];\n+\n+\t\tret = ir_raw_gen_pulse_space(ev, &max, RCMM_UNIT, space);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n+\treturn ir_raw_gen_pulse_space(ev, &max, RCMM_UNIT, RCMM_PULSE_3 * 2);\n+}\n+\n+static int ir_rcmm_encode(enum rc_proto protocol, u32 scancode,\n+\t\t\t  struct ir_raw_event *events, unsigned int max)\n+{\n+\tstruct ir_raw_event *e = events;\n+\tint ret;\n+\n+\tswitch (protocol) {\n+\tcase RC_PROTO_RCMM32:\n+\t\tret = ir_rcmm_rawencoder(&e, max, 32, scancode);\n+\t\tbreak;\n+\tcase RC_PROTO_RCMM24:\n+\t\tret = ir_rcmm_rawencoder(&e, max, 24, scancode);\n+\t\tbreak;\n+\tcase RC_PROTO_RCMM12:\n+\t\tret = ir_rcmm_rawencoder(&e, max, 12, scancode);\n+\t\tbreak;\n+\tdefault:\n+\t\tret = -EINVAL;\n+\t}\n+\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\treturn e - events;\n+}\n+\n+static struct ir_raw_handler rcmm_handler = {\n+\t.protocols\t= RC_PROTO_BIT_RCMM32 |\n+\t\t\t  RC_PROTO_BIT_RCMM24 |\n+\t\t\t  RC_PROTO_BIT_RCMM12,\n+\t.decode\t\t= ir_rcmm_decode,\n+\t.encode         = ir_rcmm_encode,\n+\t.carrier        = 36000,\n+\t.min_timeout\t= RCMM_PULSE_3 + RCMM_UNIT,\n+};\n+\n+static int __init ir_rcmm_decode_init(void)\n+{\n+\tir_raw_handler_register(&rcmm_handler);\n+\n+\tpr_info(\"IR RCMM protocol handler initialized\\n\");\n+\treturn 0;\n+}\n+\n+static void __exit ir_rcmm_decode_exit(void)\n+{\n+\tir_raw_handler_unregister(&rcmm_handler);\n+}\n+\n+module_init(ir_rcmm_decode_init);\n+module_exit(ir_rcmm_decode_exit);\n+\n+MODULE_LICENSE(\"GPL\");\n+MODULE_AUTHOR(\"Patrick Lerda\");\n+MODULE_DESCRIPTION(\"RCMM IR protocol decoder\");\ndiff --git a/drivers/media/rc/rc-core-priv.h b/drivers/media/rc/rc-core-priv.h\nindex e847bdad5c51..59c252f24194 100644\n--- a/drivers/media/rc/rc-core-priv.h\n+++ b/drivers/media/rc/rc-core-priv.h\n@@ -136,6 +136,11 @@ struct ir_raw_event_ctrl {\n \t\tstruct input_dev *idev;\n \t\tchar name[64];\n \t} imon;\n+\tstruct rcmm_dec {\n+\t\tint state;\n+\t\tunsigned int count;\n+\t\tu32 bits;\n+\t} rcmm;\n };\n \n /* Mutex for locking raw IR processing and handler change */\ndiff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c\nindex 0f218afdadaa..78e79c37f208 100644\n--- a/drivers/media/rc/rc-main.c\n+++ b/drivers/media/rc/rc-main.c\n@@ -70,6 +70,12 @@ static const struct {\n \t[RC_PROTO_CEC] = { .name = \"cec\", .repeat_period = 0 },\n \t[RC_PROTO_IMON] = { .name = \"imon\",\n \t\t.scancode_bits = 0x7fffffff, .repeat_period = 114 },\n+\t[RC_PROTO_RCMM12] = { .name = \"rc-mm-12\",\n+\t\t.scancode_bits = 0x00000fff, .repeat_period = 114 },\n+\t[RC_PROTO_RCMM24] = { .name = \"rc-mm-24\",\n+\t\t.scancode_bits = 0x00ffffff, .repeat_period = 114 },\n+\t[RC_PROTO_RCMM32] = { .name = \"rc-mm-32\",\n+\t\t.scancode_bits = 0xffffffff, .repeat_period = 114 },\n };\n \n /* Used to keep track of known keymaps */\n@@ -1018,6 +1024,9 @@ static const struct {\n \t{ RC_PROTO_BIT_XMP,\t\"xmp\",\t\t\"ir-xmp-decoder\"\t},\n \t{ RC_PROTO_BIT_CEC,\t\"cec\",\t\tNULL\t\t\t},\n \t{ RC_PROTO_BIT_IMON,\t\"imon\",\t\t\"ir-imon-decoder\"\t},\n+\t{ RC_PROTO_BIT_RCMM12 |\n+\t  RC_PROTO_BIT_RCMM24 |\n+\t  RC_PROTO_BIT_RCMM32,\t\"rc-mm\",\t\"ir-rcmm-decoder\"\t},\n };\n \n /**\ndiff --git a/include/media/rc-map.h b/include/media/rc-map.h\nindex bfa3017cecba..cf308b73edae 100644\n--- a/include/media/rc-map.h\n+++ b/include/media/rc-map.h\n@@ -37,6 +37,9 @@\n #define RC_PROTO_BIT_XMP\t\tBIT_ULL(RC_PROTO_XMP)\n #define RC_PROTO_BIT_CEC\t\tBIT_ULL(RC_PROTO_CEC)\n #define RC_PROTO_BIT_IMON\t\tBIT_ULL(RC_PROTO_IMON)\n+#define RC_PROTO_BIT_RCMM12\t\tBIT_ULL(RC_PROTO_RCMM12)\n+#define RC_PROTO_BIT_RCMM24\t\tBIT_ULL(RC_PROTO_RCMM24)\n+#define RC_PROTO_BIT_RCMM32\t\tBIT_ULL(RC_PROTO_RCMM32)\n \n #define RC_PROTO_BIT_ALL \\\n \t\t\t(RC_PROTO_BIT_UNKNOWN | RC_PROTO_BIT_OTHER | \\\n@@ -51,7 +54,8 @@\n \t\t\t RC_PROTO_BIT_RC6_6A_24 | RC_PROTO_BIT_RC6_6A_32 | \\\n \t\t\t RC_PROTO_BIT_RC6_MCE | RC_PROTO_BIT_SHARP | \\\n \t\t\t RC_PROTO_BIT_XMP | RC_PROTO_BIT_CEC | \\\n-\t\t\t RC_PROTO_BIT_IMON)\n+\t\t\t RC_PROTO_BIT_IMON | RC_PROTO_BIT_RCMM12 | \\\n+\t\t\t RC_PROTO_BIT_RCMM24 | RC_PROTO_BIT_RCMM32)\n /* All rc protocols for which we have decoders */\n #define RC_PROTO_BIT_ALL_IR_DECODER \\\n \t\t\t(RC_PROTO_BIT_RC5 | RC_PROTO_BIT_RC5X_20 | \\\n@@ -64,7 +68,9 @@\n \t\t\t RC_PROTO_BIT_RC6_0 | RC_PROTO_BIT_RC6_6A_20 | \\\n \t\t\t RC_PROTO_BIT_RC6_6A_24 |  RC_PROTO_BIT_RC6_6A_32 | \\\n \t\t\t RC_PROTO_BIT_RC6_MCE | RC_PROTO_BIT_SHARP | \\\n-\t\t\t RC_PROTO_BIT_XMP | RC_PROTO_BIT_IMON)\n+\t\t\t RC_PROTO_BIT_XMP | RC_PROTO_BIT_IMON | \\\n+\t\t\t RC_PROTO_BIT_RCMM12 | RC_PROTO_BIT_RCMM24 | \\\n+\t\t\t RC_PROTO_BIT_RCMM32)\n \n #define RC_PROTO_BIT_ALL_IR_ENCODER \\\n \t\t\t(RC_PROTO_BIT_RC5 | RC_PROTO_BIT_RC5X_20 | \\\n@@ -77,7 +83,9 @@\n \t\t\t RC_PROTO_BIT_RC6_0 | RC_PROTO_BIT_RC6_6A_20 | \\\n \t\t\t RC_PROTO_BIT_RC6_6A_24 | \\\n \t\t\t RC_PROTO_BIT_RC6_6A_32 | RC_PROTO_BIT_RC6_MCE | \\\n-\t\t\t RC_PROTO_BIT_SHARP | RC_PROTO_BIT_IMON)\n+\t\t\t RC_PROTO_BIT_SHARP | RC_PROTO_BIT_IMON | \\\n+\t\t\t RC_PROTO_BIT_RCMM12 | RC_PROTO_BIT_RCMM24 | \\\n+\t\t\t RC_PROTO_BIT_RCMM32)\n \n #define RC_SCANCODE_UNKNOWN(x)\t\t\t(x)\n #define RC_SCANCODE_OTHER(x)\t\t\t(x)\ndiff --git a/include/uapi/linux/lirc.h b/include/uapi/linux/lirc.h\nindex 6b319581882f..45fcbf99d72e 100644\n--- a/include/uapi/linux/lirc.h\n+++ b/include/uapi/linux/lirc.h\n@@ -192,6 +192,9 @@ struct lirc_scancode {\n  * @RC_PROTO_XMP: XMP protocol\n  * @RC_PROTO_CEC: CEC protocol\n  * @RC_PROTO_IMON: iMon Pad protocol\n+ * @RC_PROTO_RCMM12: RC-MM protocol 12 bits\n+ * @RC_PROTO_RCMM24: RC-MM protocol 24 bits\n+ * @RC_PROTO_RCMM32: RC-MM protocol 32 bits\n  */\n enum rc_proto {\n \tRC_PROTO_UNKNOWN\t= 0,\n@@ -218,6 +221,9 @@ enum rc_proto {\n \tRC_PROTO_XMP\t\t= 21,\n \tRC_PROTO_CEC\t\t= 22,\n \tRC_PROTO_IMON\t\t= 23,\n+\tRC_PROTO_RCMM12\t\t= 24,\n+\tRC_PROTO_RCMM24\t\t= 25,\n+\tRC_PROTO_RCMM32\t\t= 26,\n };\n \n #endif\ndiff --git a/tools/include/uapi/linux/lirc.h b/tools/include/uapi/linux/lirc.h\nindex f189931042a7..45fcbf99d72e 100644\n--- a/tools/include/uapi/linux/lirc.h\n+++ b/tools/include/uapi/linux/lirc.h\n@@ -133,6 +133,12 @@\n \n #define LIRC_SET_WIDEBAND_RECEIVER     _IOW('i', 0x00000023, __u32)\n \n+/*\n+ * Return the recording timeout, which is either set by\n+ * the ioctl LIRC_SET_REC_TIMEOUT or by the kernel after setting the protocols.\n+ */\n+#define LIRC_GET_REC_TIMEOUT\t       _IOR('i', 0x00000024, __u32)\n+\n /*\n  * struct lirc_scancode - decoded scancode with protocol for use with\n  *\tLIRC_MODE_SCANCODE\n@@ -186,6 +192,9 @@ struct lirc_scancode {\n  * @RC_PROTO_XMP: XMP protocol\n  * @RC_PROTO_CEC: CEC protocol\n  * @RC_PROTO_IMON: iMon Pad protocol\n+ * @RC_PROTO_RCMM12: RC-MM protocol 12 bits\n+ * @RC_PROTO_RCMM24: RC-MM protocol 24 bits\n+ * @RC_PROTO_RCMM32: RC-MM protocol 32 bits\n  */\n enum rc_proto {\n \tRC_PROTO_UNKNOWN\t= 0,\n@@ -212,6 +221,9 @@ enum rc_proto {\n \tRC_PROTO_XMP\t\t= 21,\n \tRC_PROTO_CEC\t\t= 22,\n \tRC_PROTO_IMON\t\t= 23,\n+\tRC_PROTO_RCMM12\t\t= 24,\n+\tRC_PROTO_RCMM24\t\t= 25,\n+\tRC_PROTO_RCMM32\t\t= 26,\n };\n \n #endif\n-- \n2.20.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/raspberrypi/linux-904-improve-xbox-dvd-remote-performance.patch",
    "content": "From 55096db50d8cdbf777c67f672b493ef565a12c38 Mon Sep 17 00:00:00 2001\nFrom: Matthias Reichl <hias@horus.com>\nDate: Fri, 22 Mar 2019 12:26:17 +0100\nSubject: [PATCH] media: rc: xbox_remote: add protocol and set timeout\n\nThe timestamps in ir-keytable -t output showed that the Xbox DVD\nIR dongle decodes scancodes every 64ms. The last scancode of a\nlonger button press is decodes 64ms after the last-but-one which\nindicates the decoder doesn't use a timeout but decodes on the last\nedge of the signal.\n\n267.042629: lirc protocol(unknown): scancode = 0xace\n267.042665: event type EV_MSC(0x04): scancode = 0xace\n267.042665: event type EV_KEY(0x01) key_down: KEY_1(0x0002)\n267.042665: event type EV_SYN(0x00).\n267.106625: lirc protocol(unknown): scancode = 0xace\n267.106643: event type EV_MSC(0x04): scancode = 0xace\n267.106643: event type EV_SYN(0x00).\n267.170623: lirc protocol(unknown): scancode = 0xace\n267.170638: event type EV_MSC(0x04): scancode = 0xace\n267.170638: event type EV_SYN(0x00).\n267.234621: lirc protocol(unknown): scancode = 0xace\n267.234636: event type EV_MSC(0x04): scancode = 0xace\n267.234636: event type EV_SYN(0x00).\n267.298623: lirc protocol(unknown): scancode = 0xace\n267.298638: event type EV_MSC(0x04): scancode = 0xace\n267.298638: event type EV_SYN(0x00).\n267.543345: event type EV_KEY(0x01) key_down: KEY_1(0x0002)\n267.543345: event type EV_SYN(0x00).\n267.570015: event type EV_KEY(0x01) key_up: KEY_1(0x0002)\n267.570015: event type EV_SYN(0x00).\n\nAdd a protocol with the repeat value and set the timeout in the\ndriver to 10ms (to have a bit of headroom for delays) so the Xbox\nDVD remote performs more responsive.\n\nSigned-off-by: Matthias Reichl <hias@horus.com>\n---\n Documentation/media/lirc.h.rst.exceptions | 1 +\n drivers/media/rc/keymaps/rc-xbox-dvd.c    | 2 +-\n drivers/media/rc/rc-main.c                | 2 ++\n drivers/media/rc/xbox_remote.c            | 4 +++-\n include/media/rc-map.h                    | 4 +++-\n include/uapi/linux/lirc.h                 | 2 ++\n 6 files changed, 12 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/media/lirc.h.rst.exceptions b/Documentation/media/lirc.h.rst.exceptions\nindex e7a41d4b3d46..f8b5f1a32b7d 100644\n--- a/Documentation/media/lirc.h.rst.exceptions\n+++ b/Documentation/media/lirc.h.rst.exceptions\n@@ -61,6 +61,7 @@ ignore symbol RC_PROTO_IMON\n ignore symbol RC_PROTO_RCMM12\n ignore symbol RC_PROTO_RCMM24\n ignore symbol RC_PROTO_RCMM32\n+ignore symbol RC_PROTO_XBOX_DVD\n \n # Undocumented macros\n \ndiff --git a/drivers/media/rc/keymaps/rc-xbox-dvd.c b/drivers/media/rc/keymaps/rc-xbox-dvd.c\nindex af387244636b..42815ab57bff 100644\n--- a/drivers/media/rc/keymaps/rc-xbox-dvd.c\n+++ b/drivers/media/rc/keymaps/rc-xbox-dvd.c\n@@ -42,7 +42,7 @@ static struct rc_map_list xbox_dvd_map = {\n \t.map = {\n \t\t.scan     = xbox_dvd,\n \t\t.size     = ARRAY_SIZE(xbox_dvd),\n-\t\t.rc_proto = RC_PROTO_UNKNOWN,\n+\t\t.rc_proto = RC_PROTO_XBOX_DVD,\n \t\t.name     = RC_MAP_XBOX_DVD,\n \t}\n };\ndiff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c\nindex 78e79c37f208..7f1d5b226f68 100644\n--- a/drivers/media/rc/rc-main.c\n+++ b/drivers/media/rc/rc-main.c\n@@ -76,6 +76,7 @@ static const struct {\n \t\t.scancode_bits = 0x00ffffff, .repeat_period = 114 },\n \t[RC_PROTO_RCMM32] = { .name = \"rc-mm-32\",\n \t\t.scancode_bits = 0xffffffff, .repeat_period = 114 },\n+\t[RC_PROTO_XBOX_DVD] = { .name = \"xbox-dvd\", .repeat_period = 64 },\n };\n \n /* Used to keep track of known keymaps */\n@@ -1027,6 +1028,7 @@ static const struct {\n \t{ RC_PROTO_BIT_RCMM12 |\n \t  RC_PROTO_BIT_RCMM24 |\n \t  RC_PROTO_BIT_RCMM32,\t\"rc-mm\",\t\"ir-rcmm-decoder\"\t},\n+\t{ RC_PROTO_BIT_XBOX_DVD, \"xbox-dvd\",\tNULL\t\t\t},\n };\n \n /**\ndiff --git a/drivers/media/rc/xbox_remote.c b/drivers/media/rc/xbox_remote.c\nindex f959cbb94744..79470c09989e 100644\n--- a/drivers/media/rc/xbox_remote.c\n+++ b/drivers/media/rc/xbox_remote.c\n@@ -148,7 +148,7 @@ static void xbox_remote_rc_init(struct xbox_remote *xbox_remote)\n \tstruct rc_dev *rdev = xbox_remote->rdev;\n \n \trdev->priv = xbox_remote;\n-\trdev->allowed_protocols = RC_PROTO_BIT_UNKNOWN;\n+\trdev->allowed_protocols = RC_PROTO_BIT_XBOX_DVD;\n \trdev->driver_name = \"xbox_remote\";\n \n \trdev->open = xbox_remote_rc_open;\n@@ -157,6 +157,8 @@ static void xbox_remote_rc_init(struct xbox_remote *xbox_remote)\n \trdev->device_name = xbox_remote->rc_name;\n \trdev->input_phys = xbox_remote->rc_phys;\n \n+\trdev->timeout = MS_TO_NS(10);\n+\n \tusb_to_input_id(xbox_remote->udev, &rdev->input_id);\n \trdev->dev.parent = &xbox_remote->interface->dev;\n }\ndiff --git a/include/media/rc-map.h b/include/media/rc-map.h\nindex e5e86d595645..a0000f392362 100644\n--- a/include/media/rc-map.h\n+++ b/include/media/rc-map.h\n@@ -40,6 +40,7 @@\n #define RC_PROTO_BIT_RCMM12\t\tBIT_ULL(RC_PROTO_RCMM12)\n #define RC_PROTO_BIT_RCMM24\t\tBIT_ULL(RC_PROTO_RCMM24)\n #define RC_PROTO_BIT_RCMM32\t\tBIT_ULL(RC_PROTO_RCMM32)\n+#define RC_PROTO_BIT_XBOX_DVD\t\tBIT_ULL(RC_PROTO_XBOX_DVD)\n \n #define RC_PROTO_BIT_ALL \\\n \t\t\t(RC_PROTO_BIT_UNKNOWN | RC_PROTO_BIT_OTHER | \\\n@@ -55,7 +56,8 @@\n \t\t\t RC_PROTO_BIT_RC6_MCE | RC_PROTO_BIT_SHARP | \\\n \t\t\t RC_PROTO_BIT_XMP | RC_PROTO_BIT_CEC | \\\n \t\t\t RC_PROTO_BIT_IMON | RC_PROTO_BIT_RCMM12 | \\\n-\t\t\t RC_PROTO_BIT_RCMM24 | RC_PROTO_BIT_RCMM32)\n+\t\t\t RC_PROTO_BIT_RCMM24 | RC_PROTO_BIT_RCMM32 | \\\n+\t\t\t RC_PROTO_BIT_XBOX_DVD)\n /* All rc protocols for which we have decoders */\n #define RC_PROTO_BIT_ALL_IR_DECODER \\\n \t\t\t(RC_PROTO_BIT_RC5 | RC_PROTO_BIT_RC5X_20 | \\\ndiff --git a/include/uapi/linux/lirc.h b/include/uapi/linux/lirc.h\nindex 45fcbf99d72e..f99d9dcae667 100644\n--- a/include/uapi/linux/lirc.h\n+++ b/include/uapi/linux/lirc.h\n@@ -195,6 +195,7 @@ struct lirc_scancode {\n  * @RC_PROTO_RCMM12: RC-MM protocol 12 bits\n  * @RC_PROTO_RCMM24: RC-MM protocol 24 bits\n  * @RC_PROTO_RCMM32: RC-MM protocol 32 bits\n+ * @RC_PROTO_XBOX_DVD: Xbox DVD Movie Playback Kit protocol\n  */\n enum rc_proto {\n \tRC_PROTO_UNKNOWN\t= 0,\n@@ -224,6 +225,7 @@ enum rc_proto {\n \tRC_PROTO_RCMM12\t\t= 24,\n \tRC_PROTO_RCMM24\t\t= 25,\n \tRC_PROTO_RCMM32\t\t= 26,\n+\tRC_PROTO_XBOX_DVD\t= 27,\n };\n \n #endif\n-- \n2.20.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/patches/raspberrypi/linux-999.02-0001-pm-disable-async-suspend-resume-by-default.patch",
    "content": "From c314d9af9d774c052bea324e1a140ccdba0ca070 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Tue, 8 Apr 2014 14:02:53 +0300\nSubject: [PATCH] pm: disable async suspend/resume by default\n\n---\n kernel/power/main.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/kernel/power/main.c b/kernel/power/main.c\nindex 1d1bf63..361db93 100644\n--- a/kernel/power/main.c\n+++ b/kernel/power/main.c\n@@ -46,7 +46,7 @@ int pm_notifier_call_chain(unsigned long val)\n }\n \n /* If set, devices may be suspended and resumed asynchronously. */\n-int pm_async_enabled = 1;\n+int pm_async_enabled = 0;\n \n static ssize_t pm_async_show(struct kobject *kobj, struct kobj_attribute *attr,\n \t\t\t     char *buf)\n-- \n1.7.2.5\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/sysctl.d/network.conf",
    "content": "net.ipv4.tcp_no_metrics_save=1\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/sysctl.d/qdisc.conf",
    "content": "net.core.default_qdisc = fq_codel\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux/udev.d/30-disable-wakeup.rules",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nACTION!=\"add|change\", GOTO=\"end\"\n\nDRIVER==\"ehci-pci|xhci_hcd\", RUN+=\"/usr/bin/sh -c 'echo disabled > /sys/$devpath/power/wakeup'\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-driver-addons/dvb/media_tree/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"media_tree\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://git.linuxtv.org/media_tree.git\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"Source of Linux Kernel media_tree subsystem to build with media_build.\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_PATCH_DIRS=\"${LINUX}\"\n\ncase \"${LINUX}\" in\n  amlogic-4.9)\n    PKG_VERSION=\"2019-07-11-22be8233b34f\"\n    PKG_SHA256=\"14363b1aacfe59805a1fe93739caed53036879e7b871f1d8d7061527c3cb9eb8\"\n    PKG_URL=\"http://linuxtv.org/downloads/drivers/linux-media-${PKG_VERSION}.tar.bz2\"\n    PKG_TAR_STRIP_COMPONENTS=\"yes\"\n    ;;\n  amlogic-5.4)\n    PKG_VERSION=\"d8675998dc4a902a4d01a6d4b85e83ef76d3374b\"\n    PKG_SHA256=\"2687f2fedebbee222e56da85d90f0b8bb446f148b63604272b6782ade87da1b9\"\n    PKG_URL=\"https://github.com/CoreELEC/media_tree/archive/${PKG_VERSION}.tar.gz\"\n    ;;\nesac\n\npost_unpack() {\n  # hack/workaround for borked upstream kernel/media_build\n  # without removing atomisp there a lot additional includes that\n  # slowdown build process after modpost from 3min to 6min\n  # even if atomisp is disabled via kernel.conf\n  rm -rf ${PKG_BUILD}/drivers/staging/media/atomisp\n\n  if [ -f ${PKG_BUILD}/drivers/staging/media/Kconfig ]; then\n    sed -i 's|^.*drivers/staging/media/atomisp.*$||' \\\n      ${PKG_BUILD}/drivers/staging/media/Kconfig\n  fi\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-driver-addons/dvb/media_tree/patches/amlogic-4.9/media_tree-01-m88ds3103b.patch",
    "content": "From: Brad Love <brad@nextdimension.cc>\nhttps://git.linuxtv.org/brad/media_tree.git/log/?h=Montage-3103b.v2\nsupport for m88ds3103b\n\ndiff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/media/dvb-frontends/m88ds3103.c\nindex 3a367a5..0d3b81d 100644\n--- a/drivers/media/dvb-frontends/m88ds3103.c\n+++ b/drivers/media/dvb-frontends/m88ds3103.c\n@@ -64,6 +64,92 @@ err:\n \treturn ret;\n }\n \n+/*\n+ * m88ds3103b demod has an internal device related to clocking. First the i2c\n+ * gate must be opened, for one transaction, then writes will be allowed.\n+ */\n+static int m88ds3103b_dt_write(struct m88ds3103_dev *dev, int reg, int data)\n+{\n+\tstruct i2c_client *client = dev->client;\n+\tu8 buf[] = {reg, data};\n+\tu8 val;\n+\tint ret;\n+\tstruct i2c_msg msg = {\n+\t\t.addr = dev->dt_addr, .flags = 0, .buf = buf, .len = 2\n+\t};\n+\n+\tm88ds3103_update_bits(dev, 0x11, 0x01, 0x00);\n+\n+\tval = 0x11;\n+\tret = regmap_write(dev->regmap, 0x03, val);\n+\tif (ret)\n+\t\tdev_dbg(&client->dev, \"fail=%d\\n\", ret);\n+\n+\tret = i2c_transfer(dev->client->adapter, &msg, 1);\n+\tif (ret != 1) {\n+\t\tdev_dbg(&client->dev, \"0x%02x (ret=%i, reg=0x%02x, value=0x%02x)\\n\",\n+\t\t\tdev->dt_addr, ret, reg, data);\n+\n+\t\tm88ds3103_update_bits(dev, 0x11, 0x01, 0x01);\n+\t\treturn -EREMOTEIO;\n+\t}\n+\tm88ds3103_update_bits(dev, 0x11, 0x01, 0x01);\n+\n+\tdev_dbg(&client->dev, \"0x%02x reg 0x%02x, value 0x%02x\\n\",\n+\t\tdev->dt_addr, reg, data);\n+\n+\treturn 0;\n+}\n+\n+/*\n+ * m88ds3103b demod has an internal device related to clocking. First the i2c\n+ * gate must be opened, for two transactions, then reads will be allowed.\n+ */\n+static int m88ds3103b_dt_read(struct m88ds3103_dev *dev, u8 reg)\n+{\n+\tstruct i2c_client *client = dev->client;\n+\tint ret;\n+\tu8 val;\n+\tu8 b0[] = { reg };\n+\tu8 b1[] = { 0 };\n+\tstruct i2c_msg msg[] = {\n+\t\t{\n+\t\t\t.addr = dev->dt_addr,\n+\t\t\t.flags = 0,\n+\t\t\t.buf = b0,\n+\t\t\t.len = 1\n+\t\t},\n+\t\t{\n+\t\t\t.addr = dev->dt_addr,\n+\t\t\t.flags = I2C_M_RD,\n+\t\t\t.buf = b1,\n+\t\t\t.len = 1\n+\t\t}\n+\t};\n+\n+\tm88ds3103_update_bits(dev, 0x11, 0x01, 0x00);\n+\n+\tval = 0x12;\n+\tret = regmap_write(dev->regmap, 0x03, val);\n+\tif (ret)\n+\t\tdev_dbg(&client->dev, \"fail=%d\\n\", ret);\n+\n+\tret = i2c_transfer(dev->client->adapter, msg, 2);\n+\tif (ret != 2) {\n+\t\tdev_dbg(&client->dev, \"0x%02x (err=%d, reg=0x%02x)\\n\",\n+\t\t\tdev->dt_addr, ret, reg);\n+\n+\t\tm88ds3103_update_bits(dev, 0x11, 0x01, 0x01);\n+\t\treturn -EREMOTEIO;\n+\t}\n+\tm88ds3103_update_bits(dev, 0x11, 0x01, 0x01);\n+\n+\tdev_dbg(&client->dev, \"0x%02x reg 0x%02x, value 0x%02x\\n\",\n+\t\tdev->dt_addr, reg, b1[0]);\n+\n+\treturn b1[0];\n+}\n+\n /*\n  * Get the demodulator AGC PWM voltage setting supplied to the tuner.\n  */\n@@ -288,6 +374,253 @@ err:\n \treturn ret;\n }\n \n+static int m88ds3103b_select_mclk(struct m88ds3103_dev *dev)\n+{\n+\tstruct i2c_client *client = dev->client;\n+\tstruct dtv_frontend_properties *c = &dev->fe.dtv_property_cache;\n+\tu32 adc_Freq_MHz[3] = {96, 93, 99};\n+\tu8  reg16_list[3] = {96, 92, 100}, reg16, reg15;\n+\tu32 offset_MHz[3];\n+\tu32 max_offset = 0;\n+\tu32 old_setting = dev->mclk;\n+\tu32 tuner_freq_MHz = c->frequency / 1000;\n+\tu8 i;\n+\tchar big_symbol = 0;\n+\n+\tbig_symbol = (c->symbol_rate > 45010000) ? 1 : 0;\n+\n+\tif (big_symbol) {\n+\t\treg16 = 115;\n+\t} else {\n+\t\treg16 = 96;\n+\n+\t\t/* TODO: IS THIS NECESSARY ? */\n+\t\tfor (i = 0; i < 3; i++) {\n+\t\t\toffset_MHz[i] = tuner_freq_MHz % adc_Freq_MHz[i];\n+\n+\t\t\tif (offset_MHz[i] > (adc_Freq_MHz[i] / 2))\n+\t\t\t\toffset_MHz[i] = adc_Freq_MHz[i] - offset_MHz[i];\n+\n+\t\t\tif (offset_MHz[i] > max_offset) {\n+\t\t\t\tmax_offset = offset_MHz[i];\n+\t\t\t\treg16 = reg16_list[i];\n+\t\t\t\tdev->mclk = adc_Freq_MHz[i] * 1000 * 1000;\n+\n+\t\t\t\tif (big_symbol)\n+\t\t\t\t\tdev->mclk /= 2;\n+\n+\t\t\t\tdev_dbg(&client->dev, \"modifying mclk %u -> %u\\n\",\n+\t\t\t\t\told_setting, dev->mclk);\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\tif (dev->mclk == 93000000)\n+\t\tregmap_write(dev->regmap, 0xA0, 0x42);\n+\telse if (dev->mclk == 96000000)\n+\t\tregmap_write(dev->regmap, 0xA0, 0x44);\n+\telse if (dev->mclk == 99000000)\n+\t\tregmap_write(dev->regmap, 0xA0, 0x46);\n+\telse if (dev->mclk == 110250000)\n+\t\tregmap_write(dev->regmap, 0xA0, 0x4E);\n+\telse\n+\t\tregmap_write(dev->regmap, 0xA0, 0x44);\n+\n+\treg15 = m88ds3103b_dt_read(dev, 0x15);\n+\n+\tm88ds3103b_dt_write(dev, 0x05, 0x40);\n+\tm88ds3103b_dt_write(dev, 0x11, 0x08);\n+\n+\tif (big_symbol)\n+\t\treg15 |= 0x02;\n+\telse\n+\t\treg15 &= ~0x02;\n+\n+\tm88ds3103b_dt_write(dev, 0x15, reg15);\n+\tm88ds3103b_dt_write(dev, 0x16, reg16);\n+\n+\tusleep_range(5000, 5500);\n+\n+\tm88ds3103b_dt_write(dev, 0x05, 0x00);\n+\tm88ds3103b_dt_write(dev, 0x11, (u8)(big_symbol ? 0x0E : 0x0A));\n+\n+\tusleep_range(5000, 5500);\n+\n+\treturn 0;\n+}\n+\n+static int m88ds3103b_set_mclk(struct m88ds3103_dev *dev, u32 mclk_khz)\n+{\n+\tu8 reg11 = 0x0A, reg15, reg16, reg1D, reg1E, reg1F, tmp;\n+\tu8 sm, f0 = 0, f1 = 0, f2 = 0, f3 = 0, pll_ldpc_mode;\n+\tu16 pll_div_fb, N;\n+\tu32 div;\n+\n+\treg15 = m88ds3103b_dt_read(dev, 0x15);\n+\treg16 = m88ds3103b_dt_read(dev, 0x16);\n+\treg1D = m88ds3103b_dt_read(dev, 0x1D);\n+\n+\tif (dev->cfg->ts_mode != M88DS3103_TS_SERIAL) {\n+\t\tif (reg16 == 92)\n+\t\t\ttmp = 93;\n+\t\telse if (reg16 == 100)\n+\t\t\ttmp = 99;\n+\t\telse\n+\t\t\ttmp = 96;\n+\n+\t\tmclk_khz *= tmp;\n+\t\tmclk_khz /= 96;\n+\t}\n+\n+\tpll_ldpc_mode = (reg15 >> 1) & 0x01;\n+\n+\tpll_div_fb = (reg15 & 0x01) << 8;\n+\tpll_div_fb += reg16;\n+\tpll_div_fb += 32;\n+\n+\tdiv = 9000 * pll_div_fb * 4;\n+\tdiv /= mclk_khz;\n+\n+\tif (dev->cfg->ts_mode == M88DS3103_TS_SERIAL) {\n+\t\treg11 |= 0x02;\n+\n+\t\tif (div <= 32) {\n+\t\t\tN = 2;\n+\n+\t\t\tf0 = 0;\n+\t\t\tf1 = div / N;\n+\t\t\tf2 = div - f1;\n+\t\t\tf3 = 0;\n+\t\t} else if (div <= 34) {\n+\t\t\tN = 3;\n+\n+\t\t\tf0 = div / N;\n+\t\t\tf1 = (div - f0) / (N - 1);\n+\t\t\tf2 = div - f0 - f1;\n+\t\t\tf3 = 0;\n+\t\t} else if (div <= 64) {\n+\t\t\tN = 4;\n+\n+\t\t\tf0 = div / N;\n+\t\t\tf1 = (div - f0) / (N - 1);\n+\t\t\tf2 = (div - f0 - f1) / (N - 2);\n+\t\t\tf3 = div - f0 - f1 - f2;\n+\t\t} else {\n+\t\t\tN = 4;\n+\n+\t\t\tf0 = 16;\n+\t\t\tf1 = 16;\n+\t\t\tf2 = 16;\n+\t\t\tf3 = 16;\n+\t\t}\n+\n+\t\tif (f0 == 16)\n+\t\t\tf0 = 0;\n+\t\telse if ((f0 < 8) && (f0 != 0))\n+\t\t\tf0 = 8;\n+\n+\t\tif (f1 == 16)\n+\t\t\tf1 = 0;\n+\t\telse if ((f1 < 8) && (f1 != 0))\n+\t\t\tf1 = 8;\n+\n+\t\tif (f2 == 16)\n+\t\t\tf2 = 0;\n+\t\telse if ((f2 < 8) && (f2 != 0))\n+\t\t\tf2 = 8;\n+\n+\t\tif (f3 == 16)\n+\t\t\tf3 = 0;\n+\t\telse if ((f3 < 8) && (f3 != 0))\n+\t\t\tf3 = 8;\n+\t} else {\n+\t\treg11 &= ~0x02;\n+\n+\t\tif (div <= 32) {\n+\t\t\tN = 2;\n+\n+\t\t\tf0 = 0;\n+\t\t\tf1 = div / N;\n+\t\t\tf2 = div - f1;\n+\t\t\tf3 = 0;\n+\t\t} else if (div <= 48) {\n+\t\t\tN = 3;\n+\n+\t\t\tf0 = div / N;\n+\t\t\tf1 = (div - f0) / (N - 1);\n+\t\t\tf2 = div - f0 - f1;\n+\t\t\tf3 = 0;\n+\t\t} else if (div <= 64) {\n+\t\t\tN = 4;\n+\n+\t\t\tf0 = div / N;\n+\t\t\tf1 = (div - f0) / (N - 1);\n+\t\t\tf2 = (div - f0 - f1) / (N - 2);\n+\t\t\tf3 = div - f0 - f1 - f2;\n+\t\t} else {\n+\t\t\tN = 4;\n+\n+\t\t\tf0 = 16;\n+\t\t\tf1 = 16;\n+\t\t\tf2 = 16;\n+\t\t\tf3 = 16;\n+\t\t}\n+\n+\t\tif (f0 == 16)\n+\t\t\tf0 = 0;\n+\t\telse if ((f0 < 9) && (f0 != 0))\n+\t\t\tf0 = 9;\n+\n+\t\tif (f1 == 16)\n+\t\t\tf1 = 0;\n+\t\telse if ((f1 < 9) && (f1 != 0))\n+\t\t\tf1 = 9;\n+\n+\t\tif (f2 == 16)\n+\t\t\tf2 = 0;\n+\t\telse if ((f2 < 9) && (f2 != 0))\n+\t\t\tf2 = 9;\n+\n+\t\tif (f3 == 16)\n+\t\t\tf3 = 0;\n+\t\telse if ((f3 < 9) && (f3 != 0))\n+\t\t\tf3 = 9;\n+\t}\n+\n+\tsm = N - 1;\n+\n+\t/* Write to registers */\n+\t//reg15 &= 0x01;\n+\t//reg15 |= (pll_div_fb >> 8) & 0x01;\n+\n+\t//reg16 = pll_div_fb & 0xFF;\n+\n+\treg1D &= ~0x03;\n+\treg1D |= sm;\n+\treg1D |= 0x80;\n+\n+\treg1E = ((f3 << 4) + f2) & 0xFF;\n+\treg1F = ((f1 << 4) + f0) & 0xFF;\n+\n+\tm88ds3103b_dt_write(dev, 0x05, 0x40);\n+\tm88ds3103b_dt_write(dev, 0x11, 0x08);\n+\tm88ds3103b_dt_write(dev, 0x1D, reg1D);\n+\tm88ds3103b_dt_write(dev, 0x1E, reg1E);\n+\tm88ds3103b_dt_write(dev, 0x1F, reg1F);\n+\n+\tm88ds3103b_dt_write(dev, 0x17, 0xc1);\n+\tm88ds3103b_dt_write(dev, 0x17, 0x81);\n+\n+\tusleep_range(5000, 5500);\n+\n+\tm88ds3103b_dt_write(dev, 0x05, 0x00);\n+\tm88ds3103b_dt_write(dev, 0x11, 0x0A);\n+\n+\tusleep_range(5000, 5500);\n+\n+\treturn 0;\n+}\n+\n static int m88ds3103_set_frontend(struct dvb_frontend *fe)\n {\n \tstruct m88ds3103_dev *dev = fe->demodulator_priv;\n@@ -298,7 +631,7 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)\n \tu8 u8tmp, u8tmp1 = 0, u8tmp2 = 0; /* silence compiler warning */\n \tu8 buf[3];\n \tu16 u16tmp;\n-\tu32 tuner_frequency_khz, target_mclk;\n+\tu32 tuner_frequency_khz, target_mclk, u32tmp;\n \ts32 s32tmp;\n \tstatic const struct reg_sequence reset_buf[] = {\n \t\t{0x07, 0x80}, {0x07, 0x00}\n@@ -321,6 +654,20 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)\n \n \t/* Disable demod clock path */\n \tif (dev->chip_id == M88RS6000_CHIP_ID) {\n+\t\tif (dev->chiptype == M88DS3103_CHIPTYPE_3103B) {\n+\t\t\tret = regmap_read(dev->regmap, 0xb2, &u32tmp);\n+\t\t\tif (ret)\n+\t\t\t\tgoto err;\n+\t\t\tif (u32tmp == 0x01) {\n+\t\t\t\tret = regmap_write(dev->regmap, 0x00, 0x00);\n+\t\t\t\tif (ret)\n+\t\t\t\t\tgoto err;\n+\t\t\t\tret = regmap_write(dev->regmap, 0xb2, 0x00);\n+\t\t\t\tif (ret)\n+\t\t\t\t\tgoto err;\n+\t\t\t}\n+\t\t}\n+\n \t\tret = regmap_write(dev->regmap, 0x06, 0xe0);\n \t\tif (ret)\n \t\t\tgoto err;\n@@ -346,7 +693,7 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)\n \t\ttuner_frequency_khz = c->frequency;\n \t}\n \n-\t/* select M88RS6000 demod main mclk and ts mclk from tuner die. */\n+\t/* set M88RS6000/DS3103B demod main mclk and ts mclk from tuner die */\n \tif (dev->chip_id == M88RS6000_CHIP_ID) {\n \t\tif (c->symbol_rate > 45010000)\n \t\t\tdev->mclk = 110250000;\n@@ -358,6 +705,11 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)\n \t\telse\n \t\t\ttarget_mclk = 144000000;\n \n+\t\tif (dev->chiptype == M88DS3103_CHIPTYPE_3103B) {\n+\t\t\tm88ds3103b_select_mclk(dev);\n+\t\t\tm88ds3103b_set_mclk(dev, target_mclk / 1000);\n+\t\t}\n+\n \t\t/* Enable demod clock path */\n \t\tret = regmap_write(dev->regmap, 0x06, 0x00);\n \t\tif (ret)\n@@ -469,12 +821,42 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)\n \t\tret = m88ds3103_update_bits(dev, 0x9d, 0x08, 0x08);\n \t\tif (ret)\n \t\t\tgoto err;\n+\n+\t\tif (dev->chiptype == M88DS3103_CHIPTYPE_3103B) {\n+\t\t\tbuf[0] = m88ds3103b_dt_read(dev, 0x15);\n+\t\t\tbuf[1] = m88ds3103b_dt_read(dev, 0x16);\n+\n+\t\t\tif (c->symbol_rate > 45010000) {\n+\t\t\t\tbuf[0] &= ~0x03;\n+\t\t\t\tbuf[0] |= 0x02;\n+\t\t\t\tbuf[0] |= ((147 - 32) >> 8) & 0x01;\n+\t\t\t\tbuf[1] = (147 - 32) & 0xFF;\n+\n+\t\t\t\tdev->mclk = 110250 * 1000;\n+\t\t\t} else {\n+\t\t\t\tbuf[0] &= ~0x03;\n+\t\t\t\tbuf[0] |= ((128 - 32) >> 8) & 0x01;\n+\t\t\t\tbuf[1] = (128 - 32) & 0xFF;\n+\n+\t\t\t\tdev->mclk = 96000 * 1000;\n+\t\t\t}\n+\t\t\tm88ds3103b_dt_write(dev, 0x15, buf[0]);\n+\t\t\tm88ds3103b_dt_write(dev, 0x16, buf[1]);\n+\n+\t\t\tregmap_read(dev->regmap, 0x30, &u32tmp);\n+\t\t\tu32tmp &= ~0x80;\n+\t\t\tregmap_write(dev->regmap, 0x30, u32tmp & 0xff);\n+\t\t}\n+\n \t\tret = regmap_write(dev->regmap, 0xf1, 0x01);\n \t\tif (ret)\n \t\t\tgoto err;\n-\t\tret = m88ds3103_update_bits(dev, 0x30, 0x80, 0x80);\n-\t\tif (ret)\n-\t\t\tgoto err;\n+\n+\t\tif (dev->chiptype != M88DS3103_CHIPTYPE_3103B) {\n+\t\t\tret = m88ds3103_update_bits(dev, 0x30, 0x80, 0x80);\n+\t\t\tif (ret)\n+\t\t\t\tgoto err;\n+\t\t}\n \t}\n \n \tswitch (dev->cfg->ts_mode) {\n@@ -488,6 +870,10 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)\n \t\tbreak;\n \tcase M88DS3103_TS_PARALLEL:\n \t\tu8tmp = 0x02;\n+\t\tif (dev->chiptype == M88DS3103_CHIPTYPE_3103B) {\n+\t\t\tu8tmp = 0x01;\n+\t\t\tu8tmp1 = 0x01;\n+\t\t}\n \t\tbreak;\n \tcase M88DS3103_TS_CI:\n \t\tu8tmp = 0x03;\n@@ -516,6 +902,12 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)\n \t\tu8tmp1 = 0x3f;\n \t\tu8tmp2 = 0x3f;\n \t\tbreak;\n+\tcase M88DS3103_TS_PARALLEL:\n+\t\tif (dev->chiptype == M88DS3103_CHIPTYPE_3103B) {\n+\t\t\tret = m88ds3103_update_bits(dev, 0x29, 0x01, u8tmp1);\n+\t\t\tif (ret)\n+\t\t\t\tgoto err;\n+\t\t}\n \tdefault:\n \t\tu16tmp = DIV_ROUND_UP(target_mclk, dev->cfg->ts_clk);\n \t\tu8tmp1 = u16tmp / 2 - 1;\n@@ -543,6 +935,9 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)\n \telse\n \t\tu8tmp = 0x06;\n \n+\tif (dev->chiptype == M88DS3103_CHIPTYPE_3103B)\n+\t\tm88ds3103b_set_mclk(dev, target_mclk / 1000);\n+\n \tret = regmap_write(dev->regmap, 0xc3, 0x08);\n \tif (ret)\n \t\tgoto err;\n@@ -578,6 +973,16 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)\n \tif (ret)\n \t\tgoto err;\n \n+\tif (dev->chiptype == M88DS3103_CHIPTYPE_3103B) {\n+\t\t/* enable/disable 192M LDPC clock */\n+\t\tret = m88ds3103_update_bits(dev, 0x29, 0x10,\n+\t\t\t\t\t(c->delivery_system == SYS_DVBS) ? 0x10 : 0x0);\n+\t\tif (ret)\n+\t\t\tgoto err;\n+\n+\t\tret = m88ds3103_update_bits(dev, 0xc9, 0x08, 0x08);\n+\t}\n+\n \tdev_dbg(&client->dev, \"carrier offset=%d\\n\",\n \t\t(tuner_frequency_khz - c->frequency));\n \n@@ -654,10 +1059,13 @@ static int m88ds3103_init(struct dvb_frontend *fe)\n \tdev_info(&client->dev, \"found a '%s' in cold state\\n\",\n \t\t m88ds3103_ops.info.name);\n \n-\tif (dev->chip_id == M88RS6000_CHIP_ID)\n+\tif (dev->chiptype == M88DS3103_CHIPTYPE_3103B)\n+\t\tname = M88DS3103B_FIRMWARE;\n+\telse if (dev->chip_id == M88RS6000_CHIP_ID)\n \t\tname = M88RS6000_FIRMWARE;\n \telse\n \t\tname = M88DS3103_FIRMWARE;\n+\n \t/* request the firmware, this will block and timeout */\n \tret = request_firmware(&firmware, name, &client->dev);\n \tif (ret) {\n@@ -704,6 +1112,12 @@ static int m88ds3103_init(struct dvb_frontend *fe)\n \tdev_info(&client->dev, \"firmware version: %X.%X\\n\",\n \t\t (utmp >> 4) & 0xf, (utmp >> 0 & 0xf));\n \n+\tif (dev->chiptype == M88DS3103_CHIPTYPE_3103B) {\n+\t\tm88ds3103b_dt_write(dev, 0x21, 0x92);\n+\t\tm88ds3103b_dt_write(dev, 0x15, 0x6C);\n+\t\tm88ds3103b_dt_write(dev, 0x17, 0xC1);\n+\t\tm88ds3103b_dt_write(dev, 0x17, 0x81);\n+\t}\n warm:\n \t/* warm state */\n \tdev->warm = true;\n@@ -1393,6 +1807,8 @@ static int m88ds3103_probe(struct i2c_client *client,\n \t\tgoto err_kfree;\n \n \tdev->chip_id = utmp >> 1;\n+\tdev->chiptype = (u8)id->driver_data;\n+\n \tdev_dbg(&client->dev, \"chip_id=%02x\\n\", dev->chip_id);\n \n \tswitch (dev->chip_id) {\n@@ -1470,6 +1886,19 @@ static int m88ds3103_probe(struct i2c_client *client,\n \t/* setup callbacks */\n \tpdata->get_dvb_frontend = m88ds3103_get_dvb_frontend;\n \tpdata->get_i2c_adapter = m88ds3103_get_i2c_adapter;\n+\n+\tif (dev->chiptype == M88DS3103_CHIPTYPE_3103B) {\n+\t\t/* enable i2c repeater for tuner */\n+\t\tm88ds3103_update_bits(dev, 0x11, 0x01, 0x01);\n+\n+\t\t/* get frontend address */\n+\t\tret = regmap_read(dev->regmap, 0x29, &utmp);\n+\t\tif (ret)\n+\t\t\tgoto err_kfree;\n+\t\tdev->dt_addr = ((utmp & 0x80) == 0) ? 0x42 >> 1 : 0x40 >> 1;\n+\t\tdev_err(&client->dev, \"dt addr is 0x%02x\", dev->dt_addr);\n+\t}\n+\n \treturn 0;\n err_kfree:\n \tkfree(dev);\n@@ -1491,7 +1920,9 @@ static int m88ds3103_remove(struct i2c_client *client)\n }\n \n static const struct i2c_device_id m88ds3103_id_table[] = {\n-\t{\"m88ds3103\", 0},\n+\t{\"m88ds3103\",  M88DS3103_CHIPTYPE_3103},\n+\t{\"m88rs6000\",  M88DS3103_CHIPTYPE_RS6000},\n+\t{\"m88ds3103b\", M88DS3103_CHIPTYPE_3103B},\n \t{}\n };\n MODULE_DEVICE_TABLE(i2c, m88ds3103_id_table);\n@@ -1513,3 +1944,4 @@ MODULE_DESCRIPTION(\"Montage Technology M88DS3103 DVB-S/S2 demodulator driver\");\n MODULE_LICENSE(\"GPL\");\n MODULE_FIRMWARE(M88DS3103_FIRMWARE);\n MODULE_FIRMWARE(M88RS6000_FIRMWARE);\n+MODULE_FIRMWARE(M88DS3103B_FIRMWARE);\ndiff --git a/drivers/media/dvb-frontends/m88ds3103_priv.h b/drivers/media/dvb-frontends/m88ds3103_priv.h\nindex c825032..d656ec2 100644\n--- a/drivers/media/dvb-frontends/m88ds3103_priv.h\n+++ b/drivers/media/dvb-frontends/m88ds3103_priv.h\n@@ -16,11 +16,17 @@\n #include <linux/regmap.h>\n #include <linux/math64.h>\n \n-#define M88DS3103_FIRMWARE \"dvb-demod-m88ds3103.fw\"\n-#define M88RS6000_FIRMWARE \"dvb-demod-m88rs6000.fw\"\n+#define M88DS3103B_FIRMWARE \"dvb-demod-m88ds3103b.fw\"\n+#define M88DS3103_FIRMWARE  \"dvb-demod-m88ds3103.fw\"\n+#define M88RS6000_FIRMWARE  \"dvb-demod-m88rs6000.fw\"\n+\n #define M88RS6000_CHIP_ID 0x74\n #define M88DS3103_CHIP_ID 0x70\n \n+#define M88DS3103_CHIPTYPE_3103   0\n+#define M88DS3103_CHIPTYPE_RS6000 1\n+#define M88DS3103_CHIPTYPE_3103B  2\n+\n struct m88ds3103_dev {\n \tstruct i2c_client *client;\n \tstruct regmap_config regmap_config;\n@@ -35,10 +41,13 @@ struct m88ds3103_dev {\n \tstruct i2c_mux_core *muxc;\n \t/* auto detect chip id to do different config */\n \tu8 chip_id;\n+\t/* chip type to differentiate m88rs6000 from m88ds3103b */\n+\tu8 chiptype;\n \t/* main mclk is calculated for M88RS6000 dynamically */\n \ts32 mclk;\n \tu64 post_bit_error;\n \tu64 post_bit_count;\n+\tu8 dt_addr;\n };\n \n struct m88ds3103_reg_val {\ndiff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c\nindex 1283c7c..6561f7b 100644\n--- a/drivers/media/usb/em28xx/em28xx-cards.c\n+++ b/drivers/media/usb/em28xx/em28xx-cards.c\n@@ -2397,6 +2397,20 @@ const struct em28xx_board em28xx_boards[] = {\n \t\t.has_dvb       = 1,\n \t\t.ir_codes      = RC_MAP_PINNACLE_PCTV_HD,\n \t},\n+\t/*\n+\t * 2013:0259 PCTV DVB-S2 Stick (461e_v2)\n+\t * Empia EM28178, Montage M88DS3103b, Montage M88TS2022, Allegro A8293\n+\t */\n+\t[EM28178_BOARD_PCTV_461E_V2] = {\n+\t\t.def_i2c_bus   = 1,\n+\t\t.i2c_speed     = EM28XX_I2C_CLK_WAIT_ENABLE |\n+\t\t\t\t EM28XX_I2C_FREQ_400_KHZ,\n+\t\t.name          = \"PCTV DVB-S2 Stick (461e v2)\",\n+\t\t.tuner_type    = TUNER_ABSENT,\n+\t\t.tuner_gpio    = pctv_461e,\n+\t\t.has_dvb       = 1,\n+\t\t.ir_codes      = RC_MAP_PINNACLE_PCTV_HD,\n+\t},\n \t/*\n \t * 2013:025f PCTV tripleStick (292e).\n \t * Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2157\n@@ -2678,6 +2692,10 @@ struct usb_device_id em28xx_id_table[] = {\n \t\t\t.driver_info = EM2765_BOARD_SPEEDLINK_VAD_LAPLACE },\n \t{ USB_DEVICE(0x2013, 0x0258),\n \t\t\t.driver_info = EM28178_BOARD_PCTV_461E },\n+\t{ USB_DEVICE(0x2013, 0x0461),\n+\t\t\t.driver_info = EM28178_BOARD_PCTV_461E_V2 },\n+\t{ USB_DEVICE(0x2013, 0x0259),\n+\t\t\t.driver_info = EM28178_BOARD_PCTV_461E_V2 },\n \t{ USB_DEVICE(0x2013, 0x025f),\n \t\t\t.driver_info = EM28178_BOARD_PCTV_292E },\n \t{ USB_DEVICE(0x2013, 0x0264), /* Hauppauge WinTV-soloHD 292e SE */\ndiff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c\nindex a73faf1..e2ddc25 100644\n--- a/drivers/media/usb/em28xx/em28xx-dvb.c\n+++ b/drivers/media/usb/em28xx/em28xx-dvb.c\n@@ -1219,6 +1219,65 @@ static int em28178_dvb_init_pctv_461e(struct em28xx *dev)\n \treturn 0;\n }\n \n+static int em28178_dvb_init_pctv_461e_v2(struct em28xx *dev)\n+{\n+\tstruct em28xx_dvb *dvb = dev->dvb;\n+\tstruct i2c_adapter *i2c_adapter;\n+\tstruct m88ds3103_platform_data m88ds3103_pdata = {};\n+\tstruct ts2020_config ts2020_config = {};\n+\tstruct a8293_platform_data a8293_pdata = {};\n+\n+\t/* attach demod */\n+\tm88ds3103_pdata.clk = 27000000;\n+\tm88ds3103_pdata.i2c_wr_max = 33;\n+\tm88ds3103_pdata.ts_mode = M88DS3103_TS_PARALLEL;\n+\tm88ds3103_pdata.ts_clk = 16000;\n+\tm88ds3103_pdata.ts_clk_pol = 1;\n+\tm88ds3103_pdata.agc = 0x99;\n+\tm88ds3103_pdata.agc_inv = 1;\n+\tm88ds3103_pdata.spec_inv = 1;\n+\tdvb->i2c_client_demod = dvb_module_probe(\"m88ds3103\", \"m88ds3103b\",\n+\t\t\t\t\t\t &dev->i2c_adap[dev->def_i2c_bus],\n+\t\t\t\t\t\t 0x6a, &m88ds3103_pdata);\n+\n+\tif (!dvb->i2c_client_demod) {\n+\t\tpr_err(\"%s() FUCK\\n\", __func__);\n+\t\treturn -ENODEV;\n+\t}\n+\n+\tdvb->fe[0] = m88ds3103_pdata.get_dvb_frontend(dvb->i2c_client_demod);\n+\ti2c_adapter = m88ds3103_pdata.get_i2c_adapter(dvb->i2c_client_demod);\n+\n+\t/* attach tuner */\n+\tts2020_config.fe = dvb->fe[0];\n+\tdvb->i2c_client_tuner = dvb_module_probe(\"ts2020\", \"ts2022\",\n+\t\t\t\t\t\t i2c_adapter,\n+\t\t\t\t\t\t 0x60, &ts2020_config);\n+\tif (!dvb->i2c_client_tuner) {\n+\t\tpr_err(\"%s() FUCK2\\n\", __func__);\n+\t\tdvb_module_release(dvb->i2c_client_demod);\n+\t\treturn -ENODEV;\n+\t}\n+\n+\t/* delegate signal strength measurement to tuner */\n+\tdvb->fe[0]->ops.read_signal_strength =\n+\t\t\tdvb->fe[0]->ops.tuner_ops.get_rf_strength;\n+\n+\t/* attach SEC */\n+\ta8293_pdata.dvb_frontend = dvb->fe[0];\n+\tdvb->i2c_client_sec = dvb_module_probe(\"a8293\", NULL,\n+\t\t\t\t\t       &dev->i2c_adap[dev->def_i2c_bus],\n+\t\t\t\t\t       0x08, &a8293_pdata);\n+\tif (!dvb->i2c_client_sec) {\n+\t\tpr_err(\"%s() FUCK3\\n\", __func__);\n+\t\tdvb_module_release(dvb->i2c_client_tuner);\n+\t\tdvb_module_release(dvb->i2c_client_demod);\n+\t\treturn -ENODEV;\n+\t}\n+\n+\treturn 0;\n+}\n+\n static int em28178_dvb_init_pctv_292e(struct em28xx *dev)\n {\n \tstruct em28xx_dvb *dvb = dev->dvb;\n@@ -1860,6 +1919,11 @@ static int em28xx_dvb_init(struct em28xx *dev)\n \t\tif (result)\n \t\t\tgoto out_free;\n \t\tbreak;\n+\tcase EM28178_BOARD_PCTV_461E_V2:\n+\t\tresult = em28178_dvb_init_pctv_461e_v2(dev);\n+\t\tif (result)\n+\t\t\tgoto out_free;\n+\t\tbreak;\n \tcase EM28178_BOARD_PCTV_292E:\n \t\tresult = em28178_dvb_init_pctv_292e(dev);\n \t\tif (result)\ndiff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h\nindex a551072..1affdd1 100644\n--- a/drivers/media/usb/em28xx/em28xx.h\n+++ b/drivers/media/usb/em28xx/em28xx.h\n@@ -149,6 +149,7 @@\n #define EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595 100\n #define EM2884_BOARD_TERRATEC_H6\t\t  101\n #define EM2882_BOARD_ZOLID_HYBRID_TV_STICK\t\t102\n+#define EM28178_BOARD_PCTV_461E_V2\t\t  103\n \n /* Limits minimum and default number of buffers */\n #define EM28XX_MIN_BUF 4\n-- \n2.17.1\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-driver-addons/dvb/media_tree/patches/amlogic-4.9/media_tree-02-add-t230c2.patch",
    "content": "From: Thomas Hollstegge <thomas.hollstegge@gmail.com>\n[v3] media: dvbsky: Add support for MyGica T230C v2\nhttps://lore.kernel.org/patchwork/cover/904817/\n\ndiff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c\nindex 4d43424..3402b96 100644\n--- a/drivers/media/dvb-frontends/si2168.c\n+++ b/drivers/media/dvb-frontends/si2168.c\n@@ -96,13 +96,15 @@ static int si2168_ts_bus_ctrl(struct dvb_frontend *fe, int acquire)\n \tdev_dbg(&client->dev, \"%s acquire: %d\\n\", __func__, acquire);\n \n \t/* set TS_MODE property */\n-\tmemcpy(cmd.args, \"\\x14\\x00\\x01\\x10\\x10\\x00\", 6);\n+\tmemcpy(cmd.args, \"\\x14\\x00\\x01\\x10\\x00\\x00\", 6);\n \tif (acquire)\n \t\tcmd.args[4] |= dev->ts_mode;\n \telse\n \t\tcmd.args[4] |= SI2168_TS_TRISTATE;\n \tif (dev->ts_clock_gapped)\n \t\tcmd.args[4] |= 0x40;\n+\tcmd.args[4] |= (dev->ts_clock_mode & 0x03) << 4;\n+\n \tcmd.wlen = 6;\n \tcmd.rlen = 4;\n \tret = si2168_cmd_execute(client, &cmd);\n@@ -644,6 +646,18 @@ static int si2168_set_frontend(struct dvb_frontend *fe)\n \tif (ret)\n \t\tgoto err;\n \n+\t/* set TS frequency */\n+\tif (dev->ts_clock_freq) {\n+\t\tmemcpy(cmd.args, \"\\x14\\x00\\x0d\\x10\", 4);\n+\t\tcmd.args[4] = ((dev->ts_clock_freq / 10000) >> 0) & 0xff;\n+\t\tcmd.args[5] = ((dev->ts_clock_freq / 10000) >> 8) & 0xff;\n+\t\tcmd.wlen = 6;\n+\t\tcmd.rlen = 4;\n+\t\tret = si2168_cmd_execute(client, &cmd);\n+\t\tif (ret)\n+\t\t\tgoto err;\n+\t}\n+\n \tmemcpy(cmd.args, \"\\x14\\x00\\x08\\x10\\xd7\\x05\", 6);\n \tcmd.args[5] |= dev->ts_clock_inv ? 0x00 : 0x10;\n \tcmd.wlen = 6;\n@@ -1057,6 +1071,10 @@ static int si2168_probe(struct i2c_client *client,\n \tdev->ts_mode = config->ts_mode;\n \tdev->ts_clock_inv = config->ts_clock_inv;\n \tdev->ts_clock_gapped = config->ts_clock_gapped;\n+\tdev->ts_clock_mode = config->ts_clock_mode;\n+\tif (dev->ts_clock_mode == 0)\n+\t\tdev->ts_clock_mode = SI2168_TS_CLOCK_MODE_AUTO_ADAPT;\n+\tdev->ts_clock_freq = config->ts_clock_freq;\n \tdev->spectral_inversion = config->spectral_inversion;\n \n \tdev_info(&client->dev, \"Silicon Labs Si2168-%c%d%d successfully identified\\n\",\ndiff --git a/drivers/media/dvb-frontends/si2168.h b/drivers/media/dvb-frontends/si2168.h\nindex d519edd..3f52ee8 100644\n--- a/drivers/media/dvb-frontends/si2168.h\n+++ b/drivers/media/dvb-frontends/si2168.h\n@@ -47,6 +47,14 @@ struct si2168_config {\n \t/* TS clock gapped */\n \tbool ts_clock_gapped;\n \n+\t/* TS clock mode */\n+#define SI2168_TS_CLOCK_MODE_AUTO_ADAPT\t0x01\n+#define SI2168_TS_CLOCK_MODE_MANUAL\t0x02\n+\tu8 ts_clock_mode;\n+\n+\t/* TS clock frequency (for manual mode) */\n+\tu32 ts_clock_freq;\n+\n \t/* Inverted spectrum */\n \tbool spectral_inversion;\n };\ndiff --git a/drivers/media/dvb-frontends/si2168_priv.h b/drivers/media/dvb-frontends/si2168_priv.h\nindex 2d362e1..8173d6c 100644\n--- a/drivers/media/dvb-frontends/si2168_priv.h\n+++ b/drivers/media/dvb-frontends/si2168_priv.h\n@@ -48,6 +48,8 @@ struct si2168_dev {\n \tu8 ts_mode;\n \tbool ts_clock_inv;\n \tbool ts_clock_gapped;\n+\tu8 ts_clock_mode;\n+\tu32 ts_clock_freq;\n \tbool spectral_inversion;\n };\n \ndiff --git a/drivers/media/usb/dvb-usb-v2/dvbsky.c b/drivers/media/usb/dvb-usb-v2/dvbsky.c\nindex e28bd88..4a4c6ae 100644\n--- a/drivers/media/usb/dvb-usb-v2/dvbsky.c\n+++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c\n@@ -583,6 +583,66 @@ static int dvbsky_mygica_t230c_attach(struct dvb_usb_adapter *adap)\n \treturn 0;\n }\n \n+static int dvbsky_mygica_t230c_v2_attach(struct dvb_usb_adapter *adap)\n+{\n+\tstruct dvbsky_state *state = adap_to_priv(adap);\n+\tstruct dvb_usb_device *d = adap_to_d(adap);\n+\tstruct i2c_adapter *i2c_adapter;\n+\tstruct i2c_client *client_demod, *client_tuner;\n+\tstruct i2c_board_info info;\n+\tstruct si2168_config si2168_config;\n+\tstruct si2157_config si2157_config;\n+\n+\t/* attach demod */\n+\tmemset(&si2168_config, 0, sizeof(si2168_config));\n+\tsi2168_config.i2c_adapter = &i2c_adapter;\n+\tsi2168_config.fe = &adap->fe[0];\n+\tsi2168_config.ts_mode = SI2168_TS_PARALLEL;\n+\tsi2168_config.ts_clock_inv = 1;\n+\tsi2168_config.ts_clock_mode = SI2168_TS_CLOCK_MODE_MANUAL;\n+\tsi2168_config.ts_clock_freq = 10000000;\n+\tmemset(&info, 0, sizeof(struct i2c_board_info));\n+\tstrlcpy(info.type, \"si2168\", sizeof(info.type));\n+\tinfo.addr = 0x64;\n+\tinfo.platform_data = &si2168_config;\n+\n+\trequest_module(\"si2168\");\n+\tclient_demod = i2c_new_device(&d->i2c_adap, &info);\n+\tif (!client_demod || !client_demod->dev.driver)\n+\t\tgoto fail_demod_device;\n+\tif (!try_module_get(client_demod->dev.driver->owner))\n+\t\tgoto fail_demod_module;\n+\n+\t/* attach tuner */\n+\tmemset(&si2157_config, 0, sizeof(si2157_config));\n+\tsi2157_config.fe = adap->fe[0];\n+\tsi2157_config.if_port = 0;\n+\tmemset(&info, 0, sizeof(struct i2c_board_info));\n+\tstrlcpy(info.type, \"si2141\", sizeof(info.type));\n+\tinfo.addr = 0x60;\n+\tinfo.platform_data = &si2157_config;\n+\n+\trequest_module(\"si2157\");\n+\tclient_tuner = i2c_new_device(i2c_adapter, &info);\n+\tif (!client_tuner || !client_tuner->dev.driver)\n+\t\tgoto fail_tuner_device;\n+\tif (!try_module_get(client_tuner->dev.driver->owner))\n+\t\tgoto fail_tuner_module;\n+\n+\tstate->i2c_client_demod = client_demod;\n+\tstate->i2c_client_tuner = client_tuner;\n+\treturn 0;\n+\n+fail_tuner_module:\n+\ti2c_unregister_device(client_tuner);\n+fail_tuner_device:\n+\tmodule_put(client_demod->dev.driver->owner);\n+fail_demod_module:\n+\ti2c_unregister_device(client_demod);\n+fail_demod_device:\n+\treturn -ENODEV;\n+}\n+\n \n static int dvbsky_identify_state(struct dvb_usb_device *d, const char **name)\n {\n@@ -762,6 +822,33 @@ static struct dvb_usb_device_properties mygica_t230c_props = {\n \t}\n };\n \n+static struct dvb_usb_device_properties mygica_t230c_v2_props = {\n+\t.driver_name = KBUILD_MODNAME,\n+\t.owner = THIS_MODULE,\n+\t.adapter_nr = adapter_nr,\n+\t.size_of_priv = sizeof(struct dvbsky_state),\n+\n+\t.generic_bulk_ctrl_endpoint = 0x01,\n+\t.generic_bulk_ctrl_endpoint_response = 0x81,\n+\t.generic_bulk_ctrl_delay = DVBSKY_MSG_DELAY,\n+\n+\t.i2c_algo         = &dvbsky_i2c_algo,\n+\t.frontend_attach  = dvbsky_mygica_t230c_v2_attach,\n+\t.init             = dvbsky_init,\n+\t.get_rc_config    = dvbsky_get_rc_config,\n+\t.streaming_ctrl   = dvbsky_streaming_ctrl,\n+\t.identify_state\t  = dvbsky_identify_state,\n+\t.exit             = dvbsky_exit,\n+\n+\t.num_adapters = 1,\n+\t.adapter = {\n+\t\t{\n+\t\t\t.stream = DVB_USB_STREAM_BULK(0x82, 8, 4096),\n+\t\t}\n+\t}\n+};\n+\n+\n static const struct usb_device_id dvbsky_id_table[] = {\n \t{ DVB_USB_DEVICE(0x0572, 0x6831,\n \t\t&dvbsky_s960_props, \"DVBSky S960/S860\", RC_MAP_DVBSKY) },\n@@ -797,6 +884,9 @@ static const struct usb_device_id dvbsky_id_table[] = {\n \t{ DVB_USB_DEVICE(USB_VID_CONEXANT, USB_PID_MYGICA_T230C,\n \t\t&mygica_t230c_props, \"MyGica Mini DVB-T2 USB Stick T230C\",\n \t\tRC_MAP_TOTAL_MEDIA_IN_HAND_02) },\n+\t{ DVB_USB_DEVICE(USB_VID_CONEXANT, USB_PID_MYGICA_T230C_V2,\n+\t\t&mygica_t230c_v2_props, \"MyGica Mini DVB-T2 USB Stick T230C v2\",\n+\t\tRC_MAP_TOTAL_MEDIA_IN_HAND_02) },\n \t{ }\n };\n MODULE_DEVICE_TABLE(usb, dvbsky_id_table);\ndiff --git a/include/media/dvb-usb-ids.h b/include/media/dvb-usb-ids.h\nindex f9e73b4..d606248 100644\n--- a/include/media/dvb-usb-ids.h\n+++ b/include/media/dvb-usb-ids.h\n@@ -387,6 +387,7 @@\n #define USB_PID_MYGICA_D689\t\t\t\t0xd811\n #define USB_PID_MYGICA_T230\t\t\t\t0xc688\n #define USB_PID_MYGICA_T230C\t\t\t\t0xc689\n+#define USB_PID_MYGICA_T230C_V2\t\t\t\t0xc68a\n #define USB_PID_ELGATO_EYETV_DIVERSITY\t\t\t0x0011\n #define USB_PID_ELGATO_EYETV_DTT\t\t\t0x0021\n #define USB_PID_ELGATO_EYETV_DTT_2\t\t\t0x003f\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-driver-addons/dvb/media_tree/patches/amlogic-4.9/media_tree-06-of-node.patch",
    "content": "--- a/drivers/media/v4l2-core/v4l2-fwnode.c\t2019-04-02 00:31:42.224001000 +0200\n+++ b/drivers/media/v4l2-core/v4l2-fwnode.c\t2019-04-02 00:31:42.256001000 +0200\n@@ -553,6 +553,20 @@\n }\n EXPORT_SYMBOL_GPL(v4l2_fwnode_endpoint_alloc_parse);\n \n+bool of_node_name_eq(const struct device_node *np, const char *name)\n+{\n+\tconst char *node_name;\n+\tsize_t len;\n+\n+\tif (!np)\n+\t\treturn false;\n+\n+\tnode_name = kbasename(np->full_name);\n+\tlen = strchrnul(node_name, '@') - node_name;\n+\n+\treturn (strlen(name) == len) && (strncmp(node_name, name, len) == 0);\n+}\n+\n int v4l2_fwnode_parse_link(struct fwnode_handle *__fwnode,\n \t\t\t   struct v4l2_fwnode_link *link)\n {\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-driver-addons/dvb/media_tree/patches/amlogic-4.9/media_tree-08-fix-dvbsky-frontend-detach.patch",
    "content": "media: dvbsky: Avoid leaking dvb frontend\n\nSource: https://git.linuxtv.org/media_tree.git/commit/drivers/media/usb/dvb-usb-v2?id=fdfa59cd63b184e1e96d51ff170fcac739bc6f6f\n\n--- a/drivers/media/usb/dvb-usb-v2/dvbsky.c\n+++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c\n@@ -834,11 +836,11 @@ static struct dvb_usb_device_properties mygica_t230c_v2_props = {\n \n \t.i2c_algo         = &dvbsky_i2c_algo,\n \t.frontend_attach  = dvbsky_mygica_t230c_v2_attach,\n+\t.frontend_detach  = dvbsky_frontend_detach,\n \t.init             = dvbsky_init,\n \t.get_rc_config    = dvbsky_get_rc_config,\n \t.streaming_ctrl   = dvbsky_streaming_ctrl,\n \t.identify_state\t  = dvbsky_identify_state,\n-\t.exit             = dvbsky_exit,\n \n \t.num_adapters = 1,\n \t.adapter = {\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-driver-addons/dvb/media_tree/patches/amlogic-4.9/media_tree-09-revert-access_ok.patch",
    "content": "--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c\t2019-06-15 02:14:51.909460692 +0200\n+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c\t2019-06-15 02:14:55.029460692 +0200\n@@ -1,4 +1,3 @@\n-// SPDX-License-Identifier: GPL-2.0-only\n /*\n  * ioctl32.c: Conversion between 32bit and 64bit native ioctls.\n  *\tSeparated from fs stuff by Arnd Bergmann <arnd@arndb.de>\n@@ -159,7 +158,7 @@\n \tcompat_caddr_t p;\n \tu32 clipcount;\n \n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_READ, p32, sizeof(*p32)) ||\n \t    copy_in_user(&p64->w, &p32->w, sizeof(p32->w)) ||\n \t    assign_in_user(&p64->field, &p32->field) ||\n \t    assign_in_user(&p64->chromakey, &p32->chromakey) ||\n@@ -284,7 +283,7 @@\n \n static int bufsize_v4l2_format(struct v4l2_format32 __user *p32, u32 *size)\n {\n-\tif (!access_ok(p32, sizeof(*p32)))\n+\tif (!access_ok(VERIFY_READ, p32, sizeof(*p32)))\n \t\treturn -EFAULT;\n \treturn __bufsize_v4l2_format(p32, size);\n }\n@@ -336,7 +335,7 @@\n \t\t\t     struct v4l2_format32 __user *p32,\n \t\t\t     void __user *aux_buf, u32 aux_space)\n {\n-\tif (!access_ok(p32, sizeof(*p32)))\n+\tif (!access_ok(VERIFY_READ, p32, sizeof(*p32)))\n \t\treturn -EFAULT;\n \treturn __get_v4l2_format32(p64, p32, aux_buf, aux_space);\n }\n@@ -344,7 +343,7 @@\n static int bufsize_v4l2_create(struct v4l2_create_buffers32 __user *p32,\n \t\t\t       u32 *size)\n {\n-\tif (!access_ok(p32, sizeof(*p32)))\n+\tif (!access_ok(VERIFY_READ, p32, sizeof(*p32)))\n \t\treturn -EFAULT;\n \treturn __bufsize_v4l2_format(&p32->format, size);\n }\n@@ -353,7 +352,7 @@\n \t\t\t     struct v4l2_create_buffers32 __user *p32,\n \t\t\t     void __user *aux_buf, u32 aux_space)\n {\n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_READ, p32, sizeof(*p32)) ||\n \t    copy_in_user(p64, p32,\n \t\t\t offsetof(struct v4l2_create_buffers32, format)))\n \t\treturn -EFAULT;\n@@ -405,7 +404,7 @@\n static int put_v4l2_format32(struct v4l2_format __user *p64,\n \t\t\t     struct v4l2_format32 __user *p32)\n {\n-\tif (!access_ok(p32, sizeof(*p32)))\n+\tif (!access_ok(VERIFY_WRITE, p32, sizeof(*p32)))\n \t\treturn -EFAULT;\n \treturn __put_v4l2_format32(p64, p32);\n }\n@@ -413,7 +412,7 @@\n static int put_v4l2_create32(struct v4l2_create_buffers __user *p64,\n \t\t\t     struct v4l2_create_buffers32 __user *p32)\n {\n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_WRITE, p32, sizeof(*p32)) ||\n \t    copy_in_user(p32, p64,\n \t\t\t offsetof(struct v4l2_create_buffers32, format)) ||\n \t    assign_in_user(&p32->capabilities, &p64->capabilities) ||\n@@ -435,7 +434,7 @@\n \t\t\t       struct v4l2_standard32 __user *p32)\n {\n \t/* other fields are not set by the user, nor used by the driver */\n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_READ, p32, sizeof(*p32)) ||\n \t    assign_in_user(&p64->index, &p32->index))\n \t\treturn -EFAULT;\n \treturn 0;\n@@ -444,7 +443,7 @@\n static int put_v4l2_standard32(struct v4l2_standard __user *p64,\n \t\t\t       struct v4l2_standard32 __user *p32)\n {\n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_WRITE, p32, sizeof(*p32)) ||\n \t    assign_in_user(&p32->index, &p64->index) ||\n \t    assign_in_user(&p32->id, &p64->id) ||\n \t    copy_in_user(p32->name, p64->name, sizeof(p32->name)) ||\n@@ -561,7 +560,7 @@\n \tu32 type;\n \tu32 length;\n \n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_READ, p32, sizeof(*p32)) ||\n \t    get_user(type, &p32->type) ||\n \t    get_user(length, &p32->length))\n \t\treturn -EFAULT;\n@@ -594,7 +593,7 @@\n \tcompat_caddr_t p;\n \tint ret;\n \n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_READ, p32, sizeof(*p32)) ||\n \t    assign_in_user(&p64->index, &p32->index) ||\n \t    get_user(type, &p32->type) ||\n \t    put_user(type, &p64->type) ||\n@@ -633,7 +632,7 @@\n \t\t\treturn -EFAULT;\n \n \t\tuplane32 = compat_ptr(p);\n-\t\tif (!access_ok(uplane32,\n+\t\tif (!access_ok(VERIFY_READ, uplane32,\n \t\t\t       num_planes * sizeof(*uplane32)))\n \t\t\treturn -EFAULT;\n \n@@ -692,7 +691,7 @@\n \tcompat_caddr_t p;\n \tint ret;\n \n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_WRITE, p32, sizeof(*p32)) ||\n \t    assign_in_user(&p32->index, &p64->index) ||\n \t    get_user(type, &p64->type) ||\n \t    put_user(type, &p32->type) ||\n@@ -782,7 +781,7 @@\n {\n \tcompat_caddr_t tmp;\n \n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_READ, p32, sizeof(*p32)) ||\n \t    get_user(tmp, &p32->base) ||\n \t    put_user_force(compat_ptr(tmp), &p64->base) ||\n \t    assign_in_user(&p64->capability, &p32->capability) ||\n@@ -797,7 +796,7 @@\n {\n \tvoid *base;\n \n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_WRITE, p32, sizeof(*p32)) ||\n \t    get_user(base, &p64->base) ||\n \t    put_user(ptr_to_compat((void __user *)base), &p32->base) ||\n \t    assign_in_user(&p32->capability, &p64->capability) ||\n@@ -894,7 +893,7 @@\n {\n \tu32 count;\n \n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_READ, p32, sizeof(*p32)) ||\n \t    get_user(count, &p32->count))\n \t\treturn -EFAULT;\n \tif (count > V4L2_CID_MAX_CTRLS)\n@@ -914,7 +913,7 @@\n \tu32 n;\n \tcompat_caddr_t p;\n \n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_READ, p32, sizeof(*p32)) ||\n \t    assign_in_user(&p64->which, &p32->which) ||\n \t    get_user(count, &p32->count) ||\n \t    put_user(count, &p64->count) ||\n@@ -930,7 +929,7 @@\n \tif (get_user(p, &p32->controls))\n \t\treturn -EFAULT;\n \tucontrols = compat_ptr(p);\n-\tif (!access_ok(ucontrols, count * sizeof(*ucontrols)))\n+\tif (!access_ok(VERIFY_READ, ucontrols, count * sizeof(*ucontrols)))\n \t\treturn -EFAULT;\n \tif (aux_space < count * sizeof(*kcontrols))\n \t\treturn -EFAULT;\n@@ -980,7 +979,7 @@\n \t * with __user causes smatch warnings, so instead declare it\n \t * without __user and cast it as a userspace pointer where needed.\n \t */\n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_WRITE, p32, sizeof(*p32)) ||\n \t    assign_in_user(&p32->which, &p64->which) ||\n \t    get_user(count, &p64->count) ||\n \t    put_user(count, &p32->count) ||\n@@ -995,7 +994,7 @@\n \tif (get_user(p, &p32->controls))\n \t\treturn -EFAULT;\n \tucontrols = compat_ptr(p);\n-\tif (!access_ok(ucontrols, count * sizeof(*ucontrols)))\n+\tif (!access_ok(VERIFY_WRITE, ucontrols, count * sizeof(*ucontrols)))\n \t\treturn -EFAULT;\n \n \tfor (n = 0; n < count; n++) {\n@@ -1044,7 +1043,7 @@\n static int put_v4l2_event32(struct v4l2_event __user *p64,\n \t\t\t    struct v4l2_event32 __user *p32)\n {\n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_WRITE, p32, sizeof(*p32)) ||\n \t    assign_in_user(&p32->type, &p64->type) ||\n \t    copy_in_user(&p32->u, &p64->u, sizeof(p64->u)) ||\n \t    assign_in_user(&p32->pending, &p64->pending) ||\n@@ -1070,7 +1069,7 @@\n {\n \tcompat_uptr_t tmp;\n \n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_READ, p32, sizeof(*p32)) ||\n \t    assign_in_user(&p64->pad, &p32->pad) ||\n \t    assign_in_user(&p64->start_block, &p32->start_block) ||\n \t    assign_in_user_cast(&p64->blocks, &p32->blocks) ||\n@@ -1086,7 +1085,7 @@\n {\n \tvoid *edid;\n \n-\tif (!access_ok(p32, sizeof(*p32)) ||\n+\tif (!access_ok(VERIFY_WRITE, p32, sizeof(*p32)) ||\n \t    assign_in_user(&p32->pad, &p64->pad) ||\n \t    assign_in_user(&p32->start_block, &p64->start_block) ||\n \t    assign_in_user(&p32->blocks, &p64->blocks) ||\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-driver-addons/dvb/media_tree/patches/amlogic-4.9/media_tree_01-m2m-job-resume-pause.patch",
    "content": "diff -ur a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c\n--- a/drivers/media/v4l2-core/v4l2-mem2mem.c\t2019-07-10 23:44:44.000000000 +0100\n+++ b/drivers/media/v4l2-core/v4l2-mem2mem.c\t2019-12-18 04:54:05.614904632 +0000\n@@ -443,6 +443,42 @@\n }\n EXPORT_SYMBOL(v4l2_m2m_job_finish);\n \n+void v4l2_m2m_job_pause(struct v4l2_m2m_dev *m2m_dev,\n+\t\t\t struct v4l2_m2m_ctx *m2m_ctx)\n+{\n+\tunsigned long flags;\n+\n+\tspin_lock_irqsave(&m2m_dev->job_spinlock, flags);\n+\tif (!m2m_dev->curr_ctx || m2m_dev->curr_ctx != m2m_ctx) {\n+\t\tspin_unlock_irqrestore(&m2m_dev->job_spinlock, flags);\n+\t\tdprintk(\"Called by an instance not currently running\\n\");\n+\t\treturn;\n+\t}\n+\n+\tlist_del(&m2m_dev->curr_ctx->queue);\n+\tm2m_dev->curr_ctx->job_flags &= ~(TRANS_QUEUED | TRANS_RUNNING);\n+\tm2m_dev->curr_ctx->job_flags |= TRANS_ABORT;\n+\twake_up(&m2m_dev->curr_ctx->finished);\n+\tm2m_dev->curr_ctx = NULL;\n+\n+\tspin_unlock_irqrestore(&m2m_dev->job_spinlock, flags);\n+}\n+EXPORT_SYMBOL(v4l2_m2m_job_pause);\n+\n+void v4l2_m2m_job_resume(struct v4l2_m2m_dev *m2m_dev,\n+\t\t\t struct v4l2_m2m_ctx *m2m_ctx)\n+{\n+\tunsigned long flags;\n+\n+\tspin_lock_irqsave(&m2m_dev->job_spinlock, flags);\n+\tm2m_ctx->job_flags &= ~TRANS_ABORT;\n+\tspin_unlock_irqrestore(&m2m_dev->job_spinlock, flags);\n+\n+\tv4l2_m2m_try_schedule(m2m_ctx);\n+\tv4l2_m2m_try_run(m2m_dev);\n+}\n+EXPORT_SYMBOL(v4l2_m2m_job_resume);\n+\n int v4l2_m2m_reqbufs(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,\n \t\t     struct v4l2_requestbuffers *reqbufs)\n {\ndiff -ur a/include/media/v4l2-mem2mem.h b/include/media/v4l2-mem2mem.h\n--- a/include/media/v4l2-mem2mem.h\t2019-07-10 23:44:45.000000000 +0100\n+++ b/include/media/v4l2-mem2mem.h\t2019-12-18 04:54:31.579097310 +0000\n@@ -573,6 +573,24 @@\n \treturn v4l2_m2m_buf_remove(&m2m_ctx->cap_q_ctx);\n }\n \n+/*\n+ * v4l2_m2m_job_pause() - paused the schedule of data which from the job queue.\n+ *\n+ * @m2m_dev: opaque pointer to the internal data to handle M2M context\n+ * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx\n+ */\n+void v4l2_m2m_job_pause(struct v4l2_m2m_dev *m2m_dev,\n+\t\t\t struct v4l2_m2m_ctx *m2m_ctx);\n+\n+ /*\n+  * v4l2_m2m_job_resume() - resumed the schedule of data which from the job que.\n+  *\n+  * @m2m_dev: opaque pointer to the internal data to handle M2M context\n+  * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx\n+  */\n+void v4l2_m2m_job_resume(struct v4l2_m2m_dev *m2m_dev,\n+\t\t\t struct v4l2_m2m_ctx *m2m_ctx);\n+\n /**\n  * v4l2_m2m_buf_remove_by_buf() - take off exact buffer from the list of ready\n  * buffers\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-driver-addons/dvb/media_tree/patches/amlogic-5.4/media_tree_01-m2m-job-resume-pause.patch",
    "content": "diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c\nindex 8986c31..4102b08 100644\n--- a/drivers/media/v4l2-core/v4l2-mem2mem.c\n+++ b/drivers/media/v4l2-core/v4l2-mem2mem.c\n@@ -519,6 +519,42 @@ unlock:\n }\n EXPORT_SYMBOL(v4l2_m2m_buf_done_and_job_finish);\n \n+void v4l2_m2m_job_pause(struct v4l2_m2m_dev *m2m_dev,\n+\t\t\t struct v4l2_m2m_ctx *m2m_ctx)\n+{\n+\tunsigned long flags;\n+\n+\tspin_lock_irqsave(&m2m_dev->job_spinlock, flags);\n+\tif (!m2m_dev->curr_ctx || m2m_dev->curr_ctx != m2m_ctx) {\n+\t\tspin_unlock_irqrestore(&m2m_dev->job_spinlock, flags);\n+\t\tdprintk(\"Called by an instance not currently running\\n\");\n+\t\treturn;\n+\t}\n+\n+\tlist_del(&m2m_dev->curr_ctx->queue);\n+\tm2m_dev->curr_ctx->job_flags &= ~(TRANS_QUEUED | TRANS_RUNNING);\n+\tm2m_dev->curr_ctx->job_flags |= TRANS_ABORT;\n+\twake_up(&m2m_dev->curr_ctx->finished);\n+\tm2m_dev->curr_ctx = NULL;\n+\n+\tspin_unlock_irqrestore(&m2m_dev->job_spinlock, flags);\n+}\n+EXPORT_SYMBOL(v4l2_m2m_job_pause);\n+\n+void v4l2_m2m_job_resume(struct v4l2_m2m_dev *m2m_dev,\n+\t\t\t struct v4l2_m2m_ctx *m2m_ctx)\n+{\n+\tunsigned long flags;\n+\n+\tspin_lock_irqsave(&m2m_dev->job_spinlock, flags);\n+\tm2m_ctx->job_flags &= ~TRANS_ABORT;\n+\tspin_unlock_irqrestore(&m2m_dev->job_spinlock, flags);\n+\n+\tv4l2_m2m_try_schedule(m2m_ctx);\n+\tv4l2_m2m_try_run(m2m_dev);\n+}\n+EXPORT_SYMBOL(v4l2_m2m_job_resume);\n+\n int v4l2_m2m_reqbufs(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,\n \t\t     struct v4l2_requestbuffers *reqbufs)\n {\ndiff --git a/include/media/v4l2-mem2mem.h b/include/media/v4l2-mem2mem.h\nindex 98753f0..797612f 100644\n--- a/include/media/v4l2-mem2mem.h\n+++ b/include/media/v4l2-mem2mem.h\n@@ -738,6 +738,24 @@ v4l2_m2m_dst_buf_remove(struct v4l2_m2m_ctx *m2m_ctx)\n \treturn v4l2_m2m_buf_remove(&m2m_ctx->cap_q_ctx);\n }\n \n+/*\n+ * v4l2_m2m_job_pause() - paused the schedule of data which from the job queue.\n+ *\n+ * @m2m_dev: opaque pointer to the internal data to handle M2M context\n+ * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx\n+ */\n+void v4l2_m2m_job_pause(struct v4l2_m2m_dev *m2m_dev,\n+\t\t\t struct v4l2_m2m_ctx *m2m_ctx);\n+\n+ /*\n+  * v4l2_m2m_job_resume() - resumed the schedule of data which from the job que.\n+  *\n+  * @m2m_dev: opaque pointer to the internal data to handle M2M context\n+  * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx\n+  */\n+void v4l2_m2m_job_resume(struct v4l2_m2m_dev *m2m_dev,\n+\t\t\t struct v4l2_m2m_ctx *m2m_ctx);\n+\n /**\n  * v4l2_m2m_buf_remove_by_buf() - take off exact buffer from the list of ready\n  * buffers\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-driver-addons/dvb/media_tree/patches/media_tree-04-fix-blocking-demux.patch",
    "content": "From d8e559ad66feeffa31eb473a9c9bce51d0863079 Mon Sep 17 00:00:00 2001\nFrom: alexelec <alexelecv5@gmail.com>\nDate: Mon, 11 Feb 2019 11:09:50 +0200\nSubject: [PATCH] dvb-core: fix blocking demux\n\n---\n drivers/media/dvb-core/dmxdev.c         | 37 +++++++++++++++++++------\n drivers/media/dvb-core/dvb_ringbuffer.c |  1 +\n drivers/media/dvb-core/dvb_ringbuffer.h |  1 +\n 3 files changed, 31 insertions(+), 8 deletions(-)\n\ndiff --git a/drivers/media/dvb-core/dmxdev.c b/drivers/media/dvb-core/dmxdev.c\nindex c0363f1b..da9ad1c8 100644\n--- a/drivers/media/dvb-core/dmxdev.c\n+++ b/drivers/media/dvb-core/dmxdev.c\n@@ -82,7 +82,11 @@ static ssize_t dvb_dmxdev_buffer_read(struct dvb_ringbuffer *src,\n \n \t\tret = wait_event_interruptible(src->queue,\n \t\t\t\t\t       !dvb_ringbuffer_empty(src) ||\n-\t\t\t\t\t       (src->error != 0));\n+\t\t\t\t\t       (src->error != 0) ||\n+\t\t\t\t\t       (src->do_wait != 1));\n+\t\tif (src->do_wait != 1)\n+\t\t\tret = -EINTR;\n+\n \t\tif (ret < 0)\n \t\t\tbreak;\n \n@@ -955,6 +959,23 @@ dvb_demux_read(struct file *file, char __user *buf, size_t count,\n \treturn ret;\n }\n \n+\n+static int dvb_demux_lock_filter(struct dmxdev_filter *dmxdevfilter)\n+{\n+       int ret;\n+\n+       dmxdevfilter->buffer.do_wait = 0;\n+\n+       if (waitqueue_active(&dmxdevfilter->buffer.queue))\n+               wake_up(&dmxdevfilter->buffer.queue);\n+\n+       ret = mutex_lock_interruptible(&dmxdevfilter->mutex);\n+\n+       dmxdevfilter->buffer.do_wait = 1;\n+\n+       return ret;\n+}\n+\n static int dvb_demux_do_ioctl(struct file *file,\n \t\t\t      unsigned int cmd, void *parg)\n {\n@@ -968,7 +989,7 @@ static int dvb_demux_do_ioctl(struct file *file,\n \n \tswitch (cmd) {\n \tcase DMX_START:\n-\t\tif (mutex_lock_interruptible(&dmxdevfilter->mutex)) {\n+\t\tif (dvb_demux_lock_filter(dmxdevfilter)) {\n \t\t\tmutex_unlock(&dmxdev->mutex);\n \t\t\treturn -ERESTARTSYS;\n \t\t}\n@@ -980,7 +1001,7 @@ static int dvb_demux_do_ioctl(struct file *file,\n \t\tbreak;\n \n \tcase DMX_STOP:\n-\t\tif (mutex_lock_interruptible(&dmxdevfilter->mutex)) {\n+\t\tif (dvb_demux_lock_filter(dmxdevfilter)) {\n \t\t\tmutex_unlock(&dmxdev->mutex);\n \t\t\treturn -ERESTARTSYS;\n \t\t}\n@@ -989,7 +1010,7 @@ static int dvb_demux_do_ioctl(struct file *file,\n \t\tbreak;\n \n \tcase DMX_SET_FILTER:\n-\t\tif (mutex_lock_interruptible(&dmxdevfilter->mutex)) {\n+\t\tif (dvb_demux_lock_filter(dmxdevfilter)) {\n \t\t\tmutex_unlock(&dmxdev->mutex);\n \t\t\treturn -ERESTARTSYS;\n \t\t}\n@@ -998,7 +1019,7 @@ static int dvb_demux_do_ioctl(struct file *file,\n \t\tbreak;\n \n \tcase DMX_SET_PES_FILTER:\n-\t\tif (mutex_lock_interruptible(&dmxdevfilter->mutex)) {\n+\t\tif (dvb_demux_lock_filter(dmxdevfilter)) {\n \t\t\tmutex_unlock(&dmxdev->mutex);\n \t\t\treturn -ERESTARTSYS;\n \t\t}\n@@ -1007,7 +1028,7 @@ static int dvb_demux_do_ioctl(struct file *file,\n \t\tbreak;\n \n \tcase DMX_SET_BUFFER_SIZE:\n-\t\tif (mutex_lock_interruptible(&dmxdevfilter->mutex)) {\n+\t\tif (dvb_demux_lock_filter(dmxdevfilter)) {\n \t\t\tmutex_unlock(&dmxdev->mutex);\n \t\t\treturn -ERESTARTSYS;\n \t\t}\n@@ -1051,7 +1072,7 @@ static int dvb_demux_do_ioctl(struct file *file,\n \t\tbreak;\n \n \tcase DMX_ADD_PID:\n-\t\tif (mutex_lock_interruptible(&dmxdevfilter->mutex)) {\n+\t\tif (dvb_demux_lock_filter(dmxdevfilter)) {\n \t\t\tret = -ERESTARTSYS;\n \t\t\tbreak;\n \t\t}\n@@ -1060,7 +1081,7 @@ static int dvb_demux_do_ioctl(struct file *file,\n \t\tbreak;\n \n \tcase DMX_REMOVE_PID:\n-\t\tif (mutex_lock_interruptible(&dmxdevfilter->mutex)) {\n+\t\tif (dvb_demux_lock_filter(dmxdevfilter)) {\n \t\t\tret = -ERESTARTSYS;\n \t\t\tbreak;\n \t\t}\ndiff --git a/drivers/media/dvb-core/dvb_ringbuffer.c b/drivers/media/dvb-core/dvb_ringbuffer.c\nindex a5712cd7..d5333f3a 100644\n--- a/drivers/media/dvb-core/dvb_ringbuffer.c\n+++ b/drivers/media/dvb-core/dvb_ringbuffer.c\n@@ -45,6 +45,7 @@ void dvb_ringbuffer_init(struct dvb_ringbuffer *rbuf, void *data, size_t len)\n \trbuf->data=data;\n \trbuf->size=len;\n \trbuf->error=0;\n+\trbuf->do_wait=1;\n \n \tinit_waitqueue_head(&rbuf->queue);\n \ndiff --git a/include/media/dvb_ringbuffer.h b/include/media/dvb_ringbuffer.h\nindex 41f04dae..25a853b5 100644\n--- a/include/media/dvb_ringbuffer.h\n+++ b/include/media/dvb_ringbuffer.h\n@@ -38,6 +38,7 @@ struct dvb_ringbuffer {\n \tint               error;\n \n \twait_queue_head_t queue;\n+\tint               do_wait;\n \tspinlock_t        lock;\n };\n \n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-driver-addons/dvb/media_tree/patches/media_tree-06-fix-si2168-cmd-timeout.patch",
    "content": "fix si2168 cmd timeout\n\nSome Si2168 demodulator commands may take 130-140 ms\n(DVB-T/T2 tuner MyGica T230C v2).\nDetails: https://github.com/CoreELEC/CoreELEC/pull/208\n\n--- a/drivers/media/dvb-frontends/si2168.c\n+++ b/drivers/media/dvb-frontends/si2168.c\n@@ -46,7 +46,7 @@ static int si2168_cmd_execute_unlocked(s\n \n \tif (cmd->rlen) {\n \t\t/* wait cmd execution terminate */\n-\t\t#define TIMEOUT 70\n+\t\t#define TIMEOUT 200\n \t\ttimeout = jiffies + msecs_to_jiffies(TIMEOUT);\n \t\twhile (!time_after(jiffies, timeout)) {\n \t\t\tret = i2c_master_recv(client, cmd->args, cmd->rlen);\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-driver-addons/dvb/media_tree/patches/media_tree-07-fix-si2157-init.patch",
    "content": "Fix compatibility with Si2141 tuner (e.g. MyGica T230C v2)\nwhich needs a next command for proper initialization.\n\n(Broken by media_tree-01-hauppauge.patch)\n\n--- a/drivers/media/tuners/si2157.c\n+++ b/drivers/media/tuners/si2157.c\n@@ -120,7 +120,7 @@ static int si2157_init(struct dvb_fronte\n \t}\n\tcmd.rlen = 1;\n \tret = si2157_cmd_execute(client, &cmd);\n-\tif (ret)\n+\tif (ret && (dev->chiptype != SI2157_CHIPTYPE_SI2141 || ret != -EAGAIN))\n \t\tgoto err;\n \n \t/* Si2141 needs a second command before it answers the revision query */\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-driver-addons/dvb/media_tree/patches/media_tree-10-revert-serialize-reset-messages-in-m88ds3103_set_frontend.patch",
    "content": "diff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/media/dvb-frontends/m88ds3103.c\nindex 123f2a3..403f428 100644\n--- a/drivers/media/dvb-frontends/m88ds3103.c\n+++ b/drivers/media/dvb-frontends/m88ds3103.c\n@@ -309,9 +309,6 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)\n \tu16 u16tmp;\n \tu32 tuner_frequency_khz, target_mclk;\n \ts32 s32tmp;\n-\tstatic const struct reg_sequence reset_buf[] = {\n-\t\t{0x07, 0x80}, {0x07, 0x00}\n-\t};\n \n \tdev_dbg(&client->dev,\n \t\t\"delivery_system=%d modulation=%d frequency=%u symbol_rate=%d inversion=%d pilot=%d rolloff=%d\\n\",\n@@ -324,7 +321,11 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)\n \t}\n \n \t/* reset */\n+\tret = regmap_write(dev->regmap, 0x07, 0x80);\n+\tif (ret)\n+\t\tgoto err;\n+\n+\tret = regmap_write(dev->regmap, 0x07, 0x00);\n-\tret = regmap_multi_reg_write(dev->regmap, reset_buf, 2);\n \tif (ret)\n \t\tgoto err;\n \n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-driver-addons/dvb/media_tree_aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"media_tree_aml\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Source of Linux Kernel amlogic drivers to build with media_build.\"\nPKG_TOOLCHAIN=\"manual\"\n\ncase \"$LINUX\" in\n  amlogic-3.14)\n    PKG_VERSION=\"f9a4b158183866c589ee8c06ab740f41aa08fa66\"\n    PKG_SHA256=\"ff629f20b39749e6523571409c74c38a27ba0101b0ffe2a1ecea3e4dafea6dd2\"\n    PKG_URL=\"https://github.com/CoreELEC/media_tree_aml/archive/${PKG_VERSION}.tar.gz\"\n    ;;\n  amlogic-4.9)\n    PKG_VERSION=\"d3d8e036546c254471e3903d199a30f8977f9f9b\"\n    PKG_SHA256=\"7d9dd87b075a31b27417c4a7b07586859766d06adee9300f7aadfbd9ec6085cc\"\n    PKG_URL=\"https://github.com/CoreELEC/media_tree_aml/archive/${PKG_VERSION}.tar.gz\"\n    ;;\nesac\n\nunpack() {\n  mkdir -p $PKG_BUILD/\n  tar -xf $SOURCES/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz -C $PKG_BUILD/../\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-driver-addons/dvb/media_tree_cc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"media_tree_cc\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://bitbucket.org/CrazyCat/media_build/downloads/\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Source of Linux Kernel media_tree subsystem to build with media_build.\"\nPKG_TOOLCHAIN=\"manual\"\n\ncase \"$LINUX\" in\n  amlogic-4.9)\n    PKG_VERSION=\"b78d5d591d2f1cd21a2a9f5ec157abbbf688bcb6\"\n    PKG_SHA256=\"cae8286b7f3ef59964c7cc20baf4d86f3103177f0a0559864e20cf77d718b1bc\"\n    PKG_URL=\"https://github.com/CoreELEC/media_tree_cc/archive/${PKG_VERSION}.tar.gz\"\n    ;;\n  amlogic-5.4)\n    PKG_VERSION=\"d12e1a94ddeab40f2b22555f2e1267be048acfa1\"\n    PKG_SHA256=\"d9c96939d716790cc5bdaa662fb58b12fede7ac9f8dc953c25bb6e235fad8297\"\n    PKG_URL=\"https://github.com/CoreELEC/media_tree_cc/archive/${PKG_VERSION}.tar.gz\"\n    ;;\nesac\n\npost_unpack() {\n  # hack/workaround for borked upstream kernel/media_build\n  # without removing atomisp there a lot additional includes that\n  # slowdown build process after modpost from 3min to 6min\n  # even if atomisp is disabled via kernel.conf\n  rm -rf $PKG_BUILD/drivers/staging/media/atomisp\n  sed -i 's|^.*drivers/staging/media/atomisp.*$||' \\\n    $PKG_BUILD/drivers/staging/media/Kconfig\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8188EU/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"RTL8188EU\"\nPKG_VERSION=\"9a56f32c2a46be5b81f0eedf49ad44ea8f10bfae\"\nPKG_SHA256=\"c8f225ff85cdc49e4a043773234e42de38aac0d2c9322829dac21c2ba72fed87\"\nPKG_LICENSE=\"GPL\"\n# realtek: PKG_SITE=\"http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PFid=48&Level=5&Conn=4&ProdID=274&DownTypeID=3&GetDown=false&Downloads=true\"\nPKG_SITE=\"https://github.com/lwfinger/rtl8188eu\"\nPKG_URL=\"https://github.com/lwfinger/rtl8188eu/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Realtek RTL81xxEU Linux 3.x driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make V=1 \\\n       ARCH=$TARGET_KERNEL_ARCH \\\n       KSRC=$(kernel_path) \\\n       CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n       CONFIG_POWER_SAVING=n\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    cp *.ko $INSTALL/$(get_full_module_dir)/$PKG_NAME\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8189FS/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"RTL8189FS\"\nPKG_VERSION=\"75a566a830037c7d1309c5a9fe411562772a1cf2\"\nPKG_SHA256=\"9ff7aa9ee8cd7a8f386531d3b009e7bcbce1ff71bb676c187c40e538755eb8b5\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/jwrdegoede/rtl8189ES_linux\"\nPKG_URL=\"https://github.com/jwrdegoede/rtl8189ES_linux/archive/${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"Realtek RTL8189FS Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\nmake_target() {\n  kernel_make \\\n    KSRC=$(kernel_path) \\\n    CONFIG_POWER_SAVING=n\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n  cp *.ko ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8189FS/patches/0001-Fix-build-for-Amlogic-kernel-version-5.15.78.patch",
    "content": "From cf038b41be0004f576fb606db1be90f8fe3bb08e Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Wed, 27 Dec 2023 21:13:16 +0100\nSubject: [PATCH 1/2] Fix build for Amlogic kernel version >= 5.15.78\n\n---\n core/rtw_wlan_util.c          |  1 +\n os_dep/linux/ioctl_cfg80211.c | 26 +++++++++++++-------------\n os_dep/osdep_service.c        |  1 +\n 3 files changed, 15 insertions(+), 13 deletions(-)\n\ndiff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c\nindex 1312d71..558ea81 100644\n--- a/core/rtw_wlan_util.c\n+++ b/core/rtw_wlan_util.c\n@@ -4810,6 +4810,7 @@ int rtw_parse_cipher_list(struct pno_nlo_info *nlo_info, char *list_str)\n \treturn 0;\n }\n \n+MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);\n int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t *ssid,\n \t\t int num, int pno_time, int pno_repeat, int pno_freq_expo_max)\n {\ndiff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c\nindex 87ee7e9..3f13a30 100644\n--- a/os_dep/linux/ioctl_cfg80211.c\n+++ b/os_dep/linux/ioctl_cfg80211.c\n@@ -420,7 +420,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8\n \t\tgoto exit;\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3, 0))\n \tcfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);\n-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2))\n+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \tcfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);\n #else\n \tcfg80211_ch_switch_notify(adapter->pnetdev, &chdef);\n@@ -1090,7 +1090,7 @@ check_bss:\n \t\t#endif\n \n #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \t\troam_info.links[0].bssid = cur_network->network.MacAddress;\n #else\n \t\troam_info.bssid = cur_network->network.MacAddress;\n@@ -1658,7 +1658,7 @@ exit:\n }\n \n static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \t,int link_id\n #endif\n \t, u8 key_index\n@@ -1805,7 +1805,7 @@ addkey_end:\n }\n \n static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \t,int link_id\n #endif\n \t, u8 keyid\n@@ -1973,7 +1973,7 @@ exit:\n }\n \n static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \tint link_id,\n #endif\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)\n@@ -1996,10 +1996,10 @@ static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,\n }\n \n static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,\n-\tstruct net_device *ndev, \n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+\tstruct net_device *ndev,\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \tint link_id,\n-#endif\t \t\n+#endif\n \tu8 key_index\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE)\n \t, bool unicast, bool multicast\n@@ -2048,10 +2048,10 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,\n \n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))\n int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy,\n-\tstruct net_device *ndev, \n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+\tstruct net_device *ndev,\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \tint link_id,\n-#endif\t\n+#endif\n \tu8 key_index)\n {\n #define SET_DEF_KEY_PARAM_FMT \" key_index=%d\"\n@@ -4991,7 +4991,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd\n \n \treturn ret;\n }\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)\n #else\n static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)\n@@ -9941,7 +9941,7 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)\n \trtw_cfg80211_indicate_scan_done(adapter, _TRUE);\n \n \t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)\n-\t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2))\n+\t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \tif (wdev->connected) {\n \t#else\n \tif (wdev->current_bss) {\ndiff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c\nindex 04000c7..b9487af 100644\n--- a/os_dep/osdep_service.c\n+++ b/os_dep/osdep_service.c\n@@ -2110,6 +2110,7 @@ inline bool ATOMIC_INC_UNLESS(ATOMIC_T *v, int u)\n * @param mode please refer to linux document\n * @return Linux specific error code\n */\n+MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);\n static int openFile(struct file **fpp, const char *path, int flag, int mode)\n {\n \tstruct file *fp;\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8189FS/patches/0002-Fix-build-for-Amlogic-kernel-version-5.15.119.patch",
    "content": "From 4db3829fab4202f0222977b751a11ab86aac7da3 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 2 Feb 2024 16:31:54 +0100\nSubject: [PATCH 2/2] Fix build for Amlogic kernel version >= 5.15.119\n\n---\n os_dep/linux/ioctl_cfg80211.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c\nindex 3f13a30..21784db 100644\n--- a/os_dep/linux/ioctl_cfg80211.c\n+++ b/os_dep/linux/ioctl_cfg80211.c\n@@ -418,7 +418,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8\n \tret = rtw_chbw_to_cfg80211_chan_def(wiphy, &chdef, ch, bw, offset, ht);\n \tif (ret != _SUCCESS)\n \t\tgoto exit;\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3, 0))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 119))\n \tcfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);\n #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \tcfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);\n-- \n2.34.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8189FS/patches/linux-6.7-temp.patch",
    "content": "From 221a84d92ec04505fa1aee0a8531b7df0b8be6eb Mon Sep 17 00:00:00 2001\nFrom: Jookia <contact@jookia.org>\nDate: Mon, 30 Oct 2023 16:46:06 +1100\nSubject: [PATCH] Fix cfg80211_rtw_change_beacon on kernel 6.5\n\n---\n os_dep/linux/ioctl_cfg80211.c | 7 +++++++\n 1 file changed, 7 insertions(+)\n\ndiff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c\nindex d63c89b0..4820315a 100644\n--- a/os_dep/linux/ioctl_cfg80211.c\n+++ b/os_dep/linux/ioctl_cfg80211.c\n@@ -5148,9 +5148,16 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev,\n \treturn ret;\n }\n \n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0))\n+static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,\n+\t\tstruct cfg80211_ap_update *params)\n+{\n+\t\tstruct cfg80211_beacon_data *info = &params->beacon;\n+#else\n static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,\n \t\tstruct cfg80211_beacon_data *info)\n {\n+#endif\n \tint ret = 0;\n \t_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);\n \n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8192CU/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"RTL8192CU\"\nPKG_VERSION=\"f32ef3984db7c7f7644edec0fa28a63a47b1a7d6\"\nPKG_SHA256=\"7e8df7cce0918630121c7493a6333d392b3099b1126e8c355aa221cee032c80b\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/pvaret/rtl8192cu-fixes\"\nPKG_URL=\"$PKG_SITE/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Realtek RTL81xxCU Linux 3.x driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make V=1 \\\n       ARCH=$TARGET_KERNEL_ARCH \\\n       KSRC=$(kernel_path) \\\n       CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n       CONFIG_POWER_SAVING=n\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    cp *.ko $INSTALL/$(get_full_module_dir)/$PKG_NAME\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8192CU/patches/RTL8192CU-0001-add_device_ID_330d.patch",
    "content": "diff -Naur RTL8192CU-v4.0.2_9000.20130911/hal/rtl8192c/usb/usb_halinit.c RTL8192CU-v4.0.2_9000.20130911.patch/hal/rtl8192c/usb/usb_halinit.c\n--- RTL8192CU-v4.0.2_9000.20130911/hal/rtl8192c/usb/usb_halinit.c\t2013-09-11 05:56:55.000000000 +0200\n+++ RTL8192CU-v4.0.2_9000.20130911.patch/hal/rtl8192c/usb/usb_halinit.c\t2014-04-01 20:17:59.270739417 +0200\n@@ -3509,6 +3509,8 @@\n \t\t\t\tpHalData->CustomerID = RT_CID_DLINK;\n \t\t\telse if((pHalData->EEPROMVID == 0x2001) && (pHalData->EEPROMPID == 0x330a))\n \t\t\t\tpHalData->CustomerID = RT_CID_DLINK;\n+\t\t\telse if((pHalData->EEPROMVID == 0x2001) && (pHalData->EEPROMPID == 0x330d))\n+\t\t\t\tpHalData->CustomerID = RT_CID_DLINK;\n \t\t\tbreak;\n \t\tcase EEPROM_CID_WHQL:\n /*\t\t\t\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8192CU/patches/RTL8192CU-0002-fix_310_proc2.patch",
    "content": "--- a/os_dep/linux/os_intfs.c\t2013-09-11 05:56:55.000000000 +0200\n+++ b/os_dep/linux/os_intfs.c\t2013-11-12 00:30:41.158248277 +0100\n@@ -277,6 +277,18 @@\n \n #define RTW_PROC_NAME DRV_NAME\n \n+#ifndef create_proc_entry\n+/* dummy routines */\n+void rtw_proc_remove_one(struct net_device *dev)\n+{\n+}\n+\n+void rtw_proc_init_one(struct net_device *dev)\n+{\n+}\n+\n+#else        /* create_proc_entry not defined */\n+\n void rtw_proc_init_one(struct net_device *dev)\n {\n \tstruct proc_dir_entry *dir_dev = NULL;\n@@ -751,6 +763,7 @@\n \t\t}\n \t}\n }\n+#endif  /* create_proc_entry not defined */\n #endif\n \n uint loadparam( _adapter *padapter,  _nic_hdl\tpnetdev);\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8192CU/patches/RTL8192CU-0101-gcc-4.9.patch",
    "content": "diff -Naur RTL8192CU-v4.0.2_9000.20130911/os_dep/linux/pci_intf.c RTL8192CU-v4.0.2_9000.20130911.patch/os_dep/linux/pci_intf.c\n--- RTL8192CU-v4.0.2_9000.20130911/os_dep/linux/pci_intf.c\t2013-09-11 05:56:55.000000000 +0200\n+++ RTL8192CU-v4.0.2_9000.20130911.patch/os_dep/linux/pci_intf.c\t2014-04-22 23:25:02.082908033 +0200\n@@ -1963,7 +1963,6 @@\n \n \tRT_TRACE(_module_hci_intfs_c_,_drv_err_,(\"+rtw_drv_entry\\n\"));\n \tDBG_871X(\"rtw driver version=%s\\n\", DRIVERVERSION);\n-\tDBG_871X(\"Build at: %s %s\\n\", __DATE__, __TIME__);\n \tpci_drvpriv.drv_registered = _TRUE;\n \n \trtw_suspend_lock_init();\ndiff -Naur RTL8192CU-v4.0.2_9000.20130911/os_dep/linux/usb_intf.c RTL8192CU-v4.0.2_9000.20130911.patch/os_dep/linux/usb_intf.c\n--- RTL8192CU-v4.0.2_9000.20130911/os_dep/linux/usb_intf.c\t2013-09-11 05:56:55.000000000 +0200\n+++ RTL8192CU-v4.0.2_9000.20130911.patch/os_dep/linux/usb_intf.c\t2014-04-22 23:25:21.337862827 +0200\n@@ -1577,7 +1577,6 @@\n \tRT_TRACE(_module_hci_intfs_c_,_drv_err_,(\"+rtw_drv_entry\\n\"));\n \n \tDBG_871X(DRV_NAME \" driver version=%s\\n\", DRIVERVERSION);\n-\tDBG_871X(\"build time: %s %s\\n\", __DATE__, __TIME__);\n \n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))\n \t//console_suspend_enabled=0;\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8192CU/patches/RTL8192CU-0102-gcc-5.patch",
    "content": "diff -Naur RTL8192CU-v4.0.2_9000.20130911/include/ieee80211.h RTL8192CU-v4.0.2_9000.20130911.patch/include/ieee80211.h\n--- RTL8192CU-v4.0.2_9000.20130911/include/ieee80211.h\t2013-09-11 05:56:55.000000000 +0200\n+++ RTL8192CU-v4.0.2_9000.20130911.patch/include/ieee80211.h\t2015-11-03 14:05:03.789280151 +0100\n@@ -1194,18 +1194,18 @@\n (((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \\\n (((Addr[5]) & 0xff) == 0xff))\n #else\n-extern __inline int is_multicast_mac_addr(const u8 *addr)\n+static __inline int is_multicast_mac_addr(const u8 *addr)\n {\n         return ((addr[0] != 0xff) && (0x01 & addr[0]));\n }\n \n-extern __inline int is_broadcast_mac_addr(const u8 *addr)\n+static __inline int is_broadcast_mac_addr(const u8 *addr)\n {\n \treturn ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) &&   \\\n \t\t(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));\n }\n \n-extern __inline int is_zero_mac_addr(const u8 *addr)\n+static __inline int is_zero_mac_addr(const u8 *addr)\n {\n \treturn ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) &&   \\\n \t\t(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8192DU/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"RTL8192DU\"\nPKG_VERSION=\"72b53f8a6c2a6696d60791df4455c3073fffc4e4\"\nPKG_SHA256=\"dec3cc45601c2c6dab47816523cb5a5731393d34cc75ec0f96a91191d3563fdd\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/lwfinger/rtl8192du\"\nPKG_URL=\"https://github.com/lwfinger/rtl8192du/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Realtek RTL8192DU Linux 3.x driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make V=1 \\\n       ARCH=$TARGET_KERNEL_ARCH \\\n       KSRC=$(kernel_path) \\\n       CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n       CONFIG_POWER_SAVING=n\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    cp *.ko $INSTALL/$(get_full_module_dir)/$PKG_NAME\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8192DU/patches/RTL8192DU-0001-remove_overlapping_pids.patch",
    "content": "diff -Naur RTL8192DU-085e206/os_dep/usb_intf.c RTL8192DU-085e206.patch/os_dep/usb_intf.c\n--- RTL8192DU-085e206/os_dep/usb_intf.c\t2014-03-25 15:48:57.000000000 +0100\n+++ RTL8192DU-085e206.patch/os_dep/usb_intf.c\t2014-04-11 09:23:12.097223906 +0200\n@@ -137,7 +137,7 @@\n \t{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8194)},/* 8192DU-VS */ \\\n \t{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8111)},/* Realtek 5G dongle for WiFi Display */ \\\n \t{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0193)},/* 8192DE-VAU */ \\\n-\t{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8171)},/* 8192DU-VC */ \\\n+/*\t{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8171)}, 8192DU-VC overlaps with in-kernel rtl8192se */ \\\n \t/*=== Customer ID ===*/ \\\n \t/****** 8192DU-VC ********/ \\\n \t{USB_DEVICE(0x2019, 0xAB2C)},/* PCI - Abocm */ \\\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8192DU/patches/RTL8192DU-0002-PR61.patch",
    "content": "From d295ee29d71a7969047fbe5042cec471408632c4 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Cl=C3=A9ment=20Peron?=\n <1859302+clementperon@users.noreply.github.com>\nDate: Wed, 6 Jun 2018 17:40:54 +0200\nSubject: [PATCH] Change __vfs_read_alt to __vfs_read\n\nFor kernel from 4.1 to 4.10 there is no call_read_iter used in new_sync_read.\nWhy create a new __vfs_read_alt whereas the __vfs_read is exported and seems to do exactly the same.\n\nRemove __vfs_read_alt code and it's dependencies and use the __vfs_read function instead\n---\n os_dep/osdep_service.c | 32 +-------------------------------\n 1 file changed, 1 insertion(+), 31 deletions(-)\n\ndiff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c\nindex 286096a..9dd3d2b 100644\n--- a/os_dep/osdep_service.c\n+++ b/os_dep/osdep_service.c\n@@ -40,36 +40,6 @@ atomic_t _malloc_cnt = ATOMIC_INIT(0);\n atomic_t _malloc_size = ATOMIC_INIT(0);\n #endif /* DBG_MEMORY_LEAK */\n \n-\n-static ssize_t new_sync_read(struct file *filp, void __user *buf, __kernel_size_t len, loff_t *ppos)\n-{\n-        struct iovec iov;\n-        struct kiocb kiocb;\n-        struct iov_iter iter;\n-        ssize_t ret;\n-\n-\tiov.iov_base = buf;\n-\tiov.iov_len = len;\n-        init_sync_kiocb(&kiocb, filp);\n-        kiocb.ki_pos = *ppos;\n-        iov_iter_init(&iter, READ, &iov, 1, len);\n-\n-        ret = call_read_iter(filp, &kiocb, &iter);\n-        BUG_ON(ret == -EIOCBQUEUED);\n-        *ppos = kiocb.ki_pos;\n-        return ret;\n-}\n-\n-static ssize_t __vfs_read_alt(struct file *file, char __user *buf, size_t count,\n-                   loff_t *pos)\n-{\n-        if (file->f_op->read)\n-                return file->f_op->read(file, buf, count, pos);\n-        else if (file->f_op->read_iter)\n-                return new_sync_read(file, (void *)buf, (__kernel_size_t)count, pos);\n-        else\n-                return -EINVAL;\n-}\n /*\n * Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE\n * @return: one of RTW_STATUS_CODE\n@@ -1086,7 +1056,7 @@ static int readFile(struct file *fp,char *buf,int len)\n \n \twhile(sum<len) {\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))\n-\t\trlen = __vfs_read_alt(fp, buf+sum, len-sum, &fp->f_pos);\n+\t\trlen = __vfs_read(fp, buf+sum, len-sum, &fp->f_pos);\n #else\n \t\trlen = fp->f_op->read(fp, buf+sum, len-sum, &fp->f_pos);\n #endif\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8192DU/patches/RTL8192DU-0003-fix-vfs-read.patch",
    "content": "From 9e477ff7fb1626f188e0d3314799371a5cce8681 Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Wed, 13 Jun 2018 18:54:09 +0100\nSubject: [PATCH] fix vfs_read with 4.14.y+\n\n---\n os_dep/osdep_service.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c\nindex 9dd3d2b..bd1df96 100644\n--- a/os_dep/osdep_service.c\n+++ b/os_dep/osdep_service.c\n@@ -1055,7 +1055,9 @@ static int readFile(struct file *fp,char *buf,int len)\n \t\treturn -EPERM;\n \n \twhile(sum<len) {\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))\n+\t\trlen = kernel_read(fp, buf+sum, len-sum, &fp->f_pos);\n+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))\n \t\trlen = __vfs_read(fp, buf+sum, len-sum, &fp->f_pos);\n #else\n \t\trlen = fp->f_op->read(fp, buf+sum, len-sum, &fp->f_pos);\n-- \n2.14.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8192DU/patches/RTL8192DU-0004-revert-fix-for-old-kernels.patch",
    "content": "From ad504e6bd4df0210904a10d57ddc48670bc41675 Mon Sep 17 00:00:00 2001\nFrom: 5schatten <supervisedthinking@gmail.com>\nDate: Thu, 21 Mar 2019 22:26:31 +0100\nSubject: [PATCH] Revert \"rtl8192du: Fix builds for kernels older than 4.11.0\"\n\nThis reverts commit 01722435acb1d62c9453b86161d2d8b99d702648.\n---\n os_dep/osdep_service.c | 8 --------\n 1 file changed, 8 deletions(-)\n\ndiff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c\nindex 9efffc4..99a424f 100644\n--- a/os_dep/osdep_service.c\n+++ b/os_dep/osdep_service.c\n@@ -34,14 +34,6 @@\n \n #define RT_TAG\t'1178'\n \n-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))\n-static inline ssize_t call_read_iter(struct file *file, struct kiocb *kio,\n-\t\t\t\t     struct iov_iter *iter)\n-{\n-\treturn file->f_op->read_iter(kio, iter);\n-}\n-#endif\n-\n #ifdef DBG_MEMORY_LEAK\n #include <asm/atomic.h>\n atomic_t _malloc_cnt = ATOMIC_INIT(0);\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8192DU/patches/aarch64/RTL8192DU-0101-PR63.patch",
    "content": "From fb85a57a5cd6241cc8c066c5efc5b43781b0e42d Mon Sep 17 00:00:00 2001\nFrom: MilhouseVH <milhouseVH.github@nmacleod.com>\nDate: Wed, 13 Jun 2018 06:43:10 +0100\nSubject: [PATCH] aarch64/4.4.y: implicit declaration of function\n 'csum_ipv6_magic'\n\n---\n core/rtw_br_ext.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c\nindex da9c5e5..19af0fe 100644\n--- a/core/rtw_br_ext.c\n+++ b/core/rtw_br_ext.c\n@@ -51,6 +51,7 @@\n #include <linux/icmpv6.h>\n #include <net/ndisc.h>\n #include <net/checksum.h>\n+#include <net/ip6_checksum.h>\n #endif\n #endif\n \n-- \n2.14.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8192DU/patches/aarch64/RTL8192DU-0102-fix-multiple-definitions.patch",
    "content": "diff --git a/include/ieee80211.h b/include/ieee80211.h\nindex 3c28a0b..2268fbd 100644\n--- a/include/ieee80211.h\n+++ b/include/ieee80211.h\n@@ -969,18 +969,18 @@ enum ieee80211_state {\n #define MAC_FMT \"%02x:%02x:%02x:%02x:%02x:%02x\"\n #define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]\n \n-extern __inline int is_multicast_mac_addr(const u8 *addr)\n+static __inline int is_multicast_mac_addr(const u8 *addr)\n {\n         return ((addr[0] != 0xff) && (0x01 & addr[0]));\n }\n \n-extern __inline int is_broadcast_mac_addr(const u8 *addr)\n+static __inline int is_broadcast_mac_addr(const u8 *addr)\n {\n \treturn ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) &&   \\\n \t\t(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));\n }\n \n-extern __inline int is_zero_mac_addr(const u8 *addr)\n+static __inline int is_zero_mac_addr(const u8 *addr)\n {\n \treturn ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) &&   \\\n \t\t(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8192EU/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"RTL8192EU\"\nPKG_VERSION=\"0a7199b457b25edc4d9534158a068e486b1c8bb0\"\nPKG_SHA256=\"defee6fda236bc9d77cd5cf0ceca8e86f820a1f9fa5d63c5ca7c369be1a3513e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/Mange/rtl8192eu-linux-driver\"\nPKG_URL=\"https://github.com/Mange/rtl8192eu-linux-driver/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Realtek RTL8192EU Linux 3.x driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make V=1 \\\n       ARCH=$TARGET_KERNEL_ARCH \\\n       KSRC=$(kernel_path) \\\n       CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n       CONFIG_POWER_SAVING=n \\\n       USER_EXTRA_CFLAGS=\"-Wno-error=date-time\"\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    cp *.ko $INSTALL/$(get_full_module_dir)/$PKG_NAME\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8192EU/patches/RTL8192EU-0101-gcc-5.patch",
    "content": "diff -Naur a/include/ieee80211.h b/include/ieee80211.h\n--- a/include/ieee80211.h\n+++ b/include/ieee80211.h\n@@ -1314,18 +1314,18 @@\n (((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \\\n (((Addr[5]) & 0xff) == 0xff))\n #else\n-extern __inline int is_multicast_mac_addr(const u8 *addr)\n+static __inline int is_multicast_mac_addr(const u8 *addr)\n {\n         return ((addr[0] != 0xff) && (0x01 & addr[0]));\n }\n \n-extern __inline int is_broadcast_mac_addr(const u8 *addr)\n+static __inline int is_broadcast_mac_addr(const u8 *addr)\n {\n \treturn ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) &&   \\\n \t\t(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));\n }\n \n-extern __inline int is_zero_mac_addr(const u8 *addr)\n+static __inline int is_zero_mac_addr(const u8 *addr)\n {\n \treturn ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) &&   \\\n \t\t(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8821CU/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"RTL8821CU\"\nPKG_VERSION=\"fdbb62727c1526778e408da928d8c3760cce0fa1\"\nPKG_SHA256=\"268e9967b575b48bfa518d2502bd38a919764778b123cdec5f132ffff5749448\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/morrownr/8821cu-20210916\"\nPKG_URL=\"https://github.com/morrownr/8821cu-20210916/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Realtek RTL8821CU Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make V=1 \\\n       ARCH=$TARGET_KERNEL_ARCH \\\n       KSRC=$(kernel_path) \\\n       CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n       CONFIG_POWER_SAVING=n\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    cp *.ko $INSTALL/$(get_full_module_dir)/$PKG_NAME\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/RTL8821CU/patches/001-Enable-RTW-debug-to-get-message-if-RFE-type-is-not-defined.patch",
    "content": "From 13e84821ee3868facaa116e593ddd6d8d0e09069 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 16 Nov 2023 10:48:44 +0100\nSubject: [PATCH] Enable RTW debug to get message if RFE type is not defined\n\n---\n Makefile | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 9364b54..735c553 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -116,10 +116,10 @@ EXTRA_CFLAGS += -DCONFIG_RTW_ANDROID=$(CONFIG_RTW_ANDROID)\n endif\n \n ########################## Debug ###########################\n-CONFIG_RTW_DEBUG = y\n+CONFIG_RTW_DEBUG = n\n # default log level is _DRV_INFO_ = 4,\n # please refer to \"How_to_set_driver_debug_log_level.doc\" to set the available level.\n-CONFIG_RTW_LOG_LEVEL = 1\n+CONFIG_RTW_LOG_LEVEL = 4\n \n # enable /proc/net/rtlxxxx/ debug interfaces\n CONFIG_PROC_DEBUG = n\n-- \n2.42.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/RTL8152-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"RTL8152-aml\"\nPKG_VERSION=\"cee2df544a6013a8efe4ed1493f594ca50b8d3c8\"\nPKG_SHA256=\"fadfebca469e2203e5aee1c727a7e3916f85a3a5f499c08fce0138bc67c1c92e\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/bb-qq/r8152\"\nPKG_URL=\"https://github.com/bb-qq/r8152/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Realtek RTL8152/RTL8153/RTL8156 Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  LDFLAGS=\"\" make -C $(kernel_path) M=$PKG_BUILD \\\n    ARCH=$TARGET_KERNEL_ARCH \\\n    KSRC=$(kernel_path) \\\n    CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n    USER_EXTRA_CFLAGS=\"-fgnu89-inline\"\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/RTL8188FTV-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"RTL8188FTV-aml\"\nPKG_VERSION=\"4e25b5eae05b2db736273dc36c9ce1979e001888\"\nPKG_SHA256=\"25e09d19ef8e6f4948a1db836fb29c55354732a58c124fb3212e10afb0251bc9\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/Stane1983/RTL8188FTV-aml\"\nPKG_URL=\"https://github.com/Stane1983/RTL8188FTV-aml/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Realtek RTL8188FTV Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g' $PKG_BUILD/*/Makefile\n  sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h\n  sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' $PKG_BUILD/*/core/rtw_ieee80211.c\n}\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make -C $(kernel_path) M=$PKG_BUILD/rtl8188FU \\\n    ARCH=$TARGET_KERNEL_ARCH \\\n    KSRC=$(kernel_path) \\\n    CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n    USER_EXTRA_CFLAGS=\"-fgnu89-inline\"\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n} \n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/RTL8189ES-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"RTL8189ES-aml\"\nPKG_VERSION=\"f971e4b\"\nPKG_SHA256=\"a87d891e3a42d70429b39f01216775dee95b0dc9093f9576ca7417e74f21ee2b\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/khadas/android_hardware_wifi_realtek_drivers_8189es\"\nPKG_URL=\"https://github.com/khadas/android_hardware_wifi_realtek_drivers_8189es/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Realtek RTL8189ES Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile\n  sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h\n  sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' $PKG_BUILD/*/core/rtw_ieee80211.c\n}\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make -C $(kernel_path) M=$PKG_BUILD/rtl8189ES \\\n    ARCH=$TARGET_KERNEL_ARCH \\\n    KSRC=$(kernel_path) \\\n    CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n    USER_EXTRA_CFLAGS=\"-fgnu89-inline\"\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/RTL8189FS-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"RTL8189FS-aml\"\nPKG_VERSION=\"11cdc07dd29ab4055ec76974e246708ae8457605\"\nPKG_SHA256=\"ea777e31551fb54446d9591d19c4ada0ce0ba9a6655e0e55c60693dafc4a9801\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/khadas/android_hardware_wifi_realtek_drivers_8189ftv\"\nPKG_URL=\"https://github.com/khadas/android_hardware_wifi_realtek_drivers_8189ftv/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Realtek RTL8189FS Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g' $PKG_BUILD/*/Makefile\n  sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h\n  sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' $PKG_BUILD/*/core/rtw_ieee80211.c\n}\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make -C $(kernel_path) M=$PKG_BUILD/rtl8189FS \\\n    ARCH=$TARGET_KERNEL_ARCH \\\n    KSRC=$(kernel_path) \\\n    CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n    USER_EXTRA_CFLAGS=\"-fgnu89-inline\"\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/RTL8723BS-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"RTL8723BS-aml\"\nPKG_VERSION=\"ee9d86a\"\nPKG_SHA256=\"4d1c5fe0d05edbf5eab96dfe5ff99b7d56c098f4d4d317351fa25e75606de094\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/khadas/android_hardware_wifi_realtek_drivers_8723bs\"\nPKG_URL=\"https://github.com/khadas/android_hardware_wifi_realtek_drivers_8723bs/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Realtek RTL8723BS Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile\n  sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h\n  sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' $PKG_BUILD/*/core/rtw_ieee80211.c\n}\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make -C $(kernel_path) M=$PKG_BUILD/rtl8723BS \\\n    ARCH=$TARGET_KERNEL_ARCH \\\n    KSRC=$(kernel_path) \\\n    CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n    USER_EXTRA_CFLAGS=\"-fgnu89-inline\"\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/RTL8821CS-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"RTL8821CS-aml\"\nPKG_VERSION=\"281217ab4707093738be5433deac33cb9ee0d310\"\nPKG_SHA256=\"a84a4ea4af4f3189c61d8d2b598b14669915d445d6e07841c845278a907765b7\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/RTL8821CS-aml\"\nPKG_URL=\"https://github.com/CoreELEC/RTL8821CS-aml/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Realtek RTL8821CS Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g' $PKG_BUILD/Makefile\n  sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' $PKG_BUILD/core/rtw_ieee80211.c\n}\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make -C $(kernel_path) M=$PKG_BUILD \\\n    ARCH=$TARGET_KERNEL_ARCH \\\n    KSRC=$(kernel_path) \\\n    CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n    USER_EXTRA_CFLAGS=\"-fgnu89-inline\"\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/RTL8822BS-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"RTL8822BS-aml\"\nPKG_VERSION=\"d2a5452a08084b3838083ba1eda3d1aeab82ee7c\"\nPKG_SHA256=\"31fafb5eb875de657c3316df1d72496958edfa16438248ec8f3661605f999ce1\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/khadas/android_hardware_wifi_realtek_drivers_8822bs\"\nPKG_URL=\"https://github.com/khadas/android_hardware_wifi_realtek_drivers_8822bs/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Realtek RTL8822BU Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/*/Makefile\n  sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/*/include/autoconf.h\n  sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' $PKG_BUILD/*/core/rtw_ieee80211.c\n  sed -i 's/rtw_drv_log_level/0/g' $PKG_BUILD/rtl8822BS/core/*.c\n}\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make -C $(kernel_path) M=$PKG_BUILD/rtl8822BS \\\n    ARCH=$TARGET_KERNEL_ARCH \\\n    KSRC=$(kernel_path) \\\n    CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n    USER_EXTRA_CFLAGS=\"-fgnu89-inline\"\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n}\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/RTL8822BU-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"RTL8822BU-aml\"\nPKG_VERSION=\"cd2b6cbd9c8fbfebee8a1f28fab8e4434450456c\"\nPKG_SHA256=\"63c7e297a0ab0202e0d4c1c25428a98841e18b7fca0c21cba5d43a941ff37b62\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/khadas/android_hardware_wifi_realtek_drivers_8822bu\"\nPKG_URL=\"https://github.com/morrownr/88x2bu-20210702/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"Realtek RTL8822BU Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' $PKG_BUILD/Makefile\n  sed -i 's/^#define CONFIG_DEBUG.*//g' $PKG_BUILD/include/autoconf.h\n  sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' $PKG_BUILD/core/rtw_ieee80211.c\n  sed -i 's/rtw_drv_log_level/0/g' $PKG_BUILD/core/*.c\n}\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make  \\\n    ARCH=$TARGET_KERNEL_ARCH \\\n    KSRC=$(kernel_path) \\\n    CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n    USER_EXTRA_CFLAGS=\"-fgnu89-inline\"\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/RTL8822CS-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"RTL8822CS-aml\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/RTL8822CS-aml\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"Realtek RTL8822CS Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\ncase \"${LINUX}\" in\n  amlogic-4.9)\n    PKG_VERSION=\"4e31d08990bc2a84c937bf17d5be4b899ceb70ed\"\n    PKG_SHA256=\"6df2e60689830f454111e2cd2c2873c05c9ac8e0f39e8eb1934dbcac62263900\"\n    ;;\n  amlogic-5.4)\n    PKG_VERSION=\"4a06b4470a91c3f142b50fb7b8643fdcaa4cc2fc\"\n    PKG_SHA256=\"12fa600f9497d800a7b280435561ad4848e360cc6de491a48ae5a537cf554899\"\n    ;;\nesac\n\nPKG_URL=\"https://github.com/CoreELEC/RTL8822CS-aml/archive/${PKG_VERSION}.tar.gz\"\n\npost_unpack() {\n  sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' ${PKG_BUILD}/rtl88x2CS/Makefile\n  sed -i 's/^#define CONFIG_DEBUG.*//g' ${PKG_BUILD}/rtl88x2CS/include/autoconf.h\n  sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' ${PKG_BUILD}/rtl88x2CS/core/rtw_ieee80211.c\n  sed -i 's/rtw_drv_log_level/0/g' ${PKG_BUILD}/rtl88x2CS/core/*.c\n}\n\nmake_target() {\n  kernel_make -C $(kernel_path) M=${PKG_BUILD}/rtl88x2CS \\\n    KSRC=$(kernel_path) \\\n    USER_EXTRA_CFLAGS=\"-fgnu89-inline\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n    find ${PKG_BUILD}/ -name \\*.ko -not -path '*/\\.*' -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/RTL8822CU-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"RTL8822CU-aml\"\nPKG_VERSION=\"f1a4a3abb993245bf28bf1e2254f47f76972fd6d\"\nPKG_SHA256=\"2ad96072107478964b9308c19fa0edefdbb70e4c088256432b6fe5b903ebcf35\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/khadas/android_vendor_wifi_driver_realtek_8822cu/\"\nPKG_URL=\"https://github.com/khadas/android_vendor_wifi_driver_realtek_8822cu/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"Realtek RTL8822CU Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  sed -i 's/-DCONFIG_CONCURRENT_MODE//g; s/^CONFIG_POWER_SAVING.*$/CONFIG_POWER_SAVING = n/g; s/^CONFIG_RTW_DEBUG.*/CONFIG_RTW_DEBUG = n/g' ${PKG_BUILD}/*/Makefile\n  sed -i 's/^#define CONFIG_DEBUG.*//g' ${PKG_BUILD}/*/include/autoconf.h\n  sed -i 's/#define DEFAULT_RANDOM_MACADDR.*1/#define DEFAULT_RANDOM_MACADDR 0/g' ${PKG_BUILD}/*/core/rtw_ieee80211.c\n  sed -i 's/rtw_drv_log_level/0/g' ${PKG_BUILD}/*/core/*.c\n}\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make -C $(kernel_path) M=${PKG_BUILD}/rtl88x2CU \\\n    ARCH=${TARGET_KERNEL_ARCH} \\\n    KSRC=$(kernel_path) \\\n    CROSS_COMPILE=${TARGET_KERNEL_PREFIX} \\\n    USER_EXTRA_CFLAGS=\"-fgnu89-inline\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n    find ${PKG_BUILD}/ -name \\*.ko -not -path '*/\\.*' -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/RTL8852BS-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"RTL8852BS-aml\"\nPKG_VERSION=\"dd202f37cbffb0e93ba15746d373a87228334e5f\"\nPKG_SHA256=\"0acc9c0eb4203e690b4254cd563526b7aabfc7d43ec85dc7f2f5ef54212e0b41\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/Stane1983/rtl8852bs-aml\"\nPKG_URL=\"https://github.com/Stane1983/rtl8852bs-aml/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"Realtek RTL8852BS Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_unpack() {\n  sed -i 's/#define DEFAULT_RANDOM_MACADDR.*/#define DEFAULT_RANDOM_MACADDR 0/g' ${PKG_BUILD}/core/rtw_ieee80211.c\n}\n\nmake_target() {\n  kernel_make -C ${PKG_BUILD} \\\n    M=${PKG_BUILD} \\\n    KSRC=$(kernel_path) \\\n    CONFIG_POWER_SAVE=n \\\n    CONFIG_RTW_DEBUG=n \\\n    modules\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n  find ${PKG_BUILD}/ -name \\*.ko -not -path '*/\\.*' -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/ap6xxx-aml/modprobe.d/dhd.conf",
    "content": "options dhd firmware_path=/usr/lib/firmware/brcm/ nvram_path=/usr/lib/firmware/brcm/\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/ap6xxx-aml/modprobe.d/dhd_sdio.conf",
    "content": "options dhd_sdio firmware_path=/usr/lib/firmware/brcm/ nvram_path=/usr/lib/firmware/brcm/\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/ap6xxx-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"ap6xxx-aml\"\nPKG_VERSION=\"91a6e2bd2ff5e52377190fea04a0433bdbe4e948\"\nPKG_SHA256=\"c1f96870858bd80adadb87a526286a2d82ed52da617b210af51db12def0d4725\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/ap6xxx-aml\"\nPKG_URL=\"https://github.com/CoreELEC/ap6xxx-aml/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"ap6xxx: Linux drivers for AP6xxx WLAN chips used in some devices based on Amlogic SoCs\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  echo\n  echo \"building ap6356s and others\"\n  make -C  $PKG_BUILD/bcmdhd.1.363.59.144.x.cn \\\n       PWD=$PKG_BUILD/bcmdhd.1.363.59.144.x.cn \\\n       KDIR=$(kernel_path) \\\n       ARCH=$TARGET_KERNEL_ARCH \\\n       CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n       CONFIG_BCMDHD_DISABLE_WOWLAN=y \\\n       dhd\n\n  if [[ \"$DEVICE\" = \"Amlogic-n\"* ]]; then\n    echo\n    echo \"building ap6275s\"\n    make -C  $PKG_BUILD/bcmdhd.100.10.545.x \\\n         PWD=$PKG_BUILD/bcmdhd.100.10.545.x \\\n         KDIR=$(kernel_path) \\\n         ARCH=$TARGET_KERNEL_ARCH \\\n         CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n         CONFIG_BCMDHD_DISABLE_WOWLAN=y \\\n         bcmdhd_sdio\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n\n  find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' \\\n    -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n}\n\npost_install() {\n  if [ \"$PROJECT\" = \"Amlogic\" ]; then\n    rm $INSTALL/usr/lib/modprobe.d/dhd_sdio.conf\n    rm $INSTALL/usr/lib/udev/rules.d/80-dhd_sdio.rules\n  fi\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/ap6xxx-aml/udev.d/80-dhd_sdio.rules",
    "content": "### Broadcom BCM43752 (AP6275S driver with dhd_sdio kernel module)\n### by default kernel module dhd is loaded first and retries few\n###   times until dhd_sdio is loaded (after almost 2 minutes)\n### to speed up load module manually\nENV{MODALIAS}==\"?*\", ENV{SUBSYSTEM}==\"sdio\", ENV{SDIO_ID}==\"02D0:4497\", GOTO=\"load_module\"\nENV{MODALIAS}==\"?*\", ENV{SUBSYSTEM}==\"sdio\", ENV{SDIO_ID}==\"02D0:4496\", GOTO=\"load_module\"\nENV{MODALIAS}==\"?*\", ENV{SUBSYSTEM}==\"sdio\", ENV{SDIO_ID}==\"02D0:4495\", GOTO=\"load_module\"\nENV{MODALIAS}==\"?*\", ENV{SUBSYSTEM}==\"sdio\", ENV{SDIO_ID}==\"02D0:A806\", GOTO=\"load_module\"\nENV{MODALIAS}==\"?*\", ENV{SUBSYSTEM}==\"sdio\", ENV{SDIO_ID}==\"02D0:A804\", GOTO=\"load_module\"\nENV{MODALIAS}==\"?*\", ENV{SUBSYSTEM}==\"sdio\", ENV{SDIO_ID}==\"02D0:AAE8\", GOTO=\"load_module\"\nENV{MODALIAS}==\"?*\", ENV{SUBSYSTEM}==\"sdio\", ENV{SDIO_ID}==\"02D0:AAE7\", GOTO=\"load_module\"\nENV{MODALIAS}==\"?*\", ENV{SUBSYSTEM}==\"sdio\", ENV{SDIO_ID}==\"02D0:4362\", GOTO=\"load_module\"\nGOTO=\"end\"\n\nLABEL=\"load_module\"\nENV{MODALIAS}==\"?*\", ENV{SUBSYSTEM}==\"sdio\", RUN{builtin}+=\"kmod load dhd_sdio\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/media_modules-aml/modules-load.d/media_modules.conf",
    "content": "amvdec_avs2\namvdec_avs\namvdec_mavs\namvdec_h264\namvdec_h264mvc\namvdec_h265\namvdec_mh264\namvdec_mjpeg\namvdec_mmjpeg\namvdec_mmpeg12\namvdec_mmpeg4\namvdec_mpeg12\namvdec_mpeg4\namvdec_ports\namvdec_real\namvdec_vc1\namvdec_av1\namvdec_vp9\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/media_modules-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"media_modules-aml\"\nPKG_VERSION=\"38132376658941c3c4b1e097628849eb256a7a08\"\nPKG_SHA256=\"f7e577e78d54c34d57a75dfd584a6b867a20b817dce24ddf273eb409629a4a70\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"https://github.com/CoreELEC/media_modules-aml/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"$PKG_NAME: Linux driver\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  kernel_make -C $(kernel_path) M=$PKG_BUILD/drivers \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_MPEG12=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_MPEG2_MULTI=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_MPEG4=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_MPEG4_MULTI=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_VC1=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_H264=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_H264_MULTI=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_H264_MVC=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_H265=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_VP9=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_MJPEG=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_MJPEG_MULTI=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_REAL=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_AVS=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_AVS_MULTI=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_AVS2=m \\\n    CONFIG_AMLOGIC_MEDIA_VDEC_AV1=m \\\n    CONFIG_AMLOGIC_MEDIA_VENC_H264=m \\\n    CONFIG_AMLOGIC_MEDIA_VENC_JPEG=m \\\n    CONFIG_AMLOGIC_MEDIA_VENC_H265=m\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n\n  mkdir -p ${INSTALL}/$(get_full_firmware_dir)/video\n    cp -PR ${PKG_BUILD}/firmware/. ${INSTALL}/$(get_full_firmware_dir)/video\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/media_modules-aml/patches/002-fix-building.patch",
    "content": "diff --git a/drivers/amvdec_ports/aml_vcodec_vfm.c b/drivers/amvdec_ports/aml_vcodec_vfm.c\nindex 62896ea0..a3e7be7c 100644\n--- a/drivers/amvdec_ports/aml_vcodec_vfm.c\n+++ b/drivers/amvdec_ports/aml_vcodec_vfm.c\n@@ -60,8 +60,6 @@ static void vdec_vf_put(struct vframe_s *vf, void *op_arg)\n \t\treturn;\n \t}\n \n-\tatomic_set(&vf->use_cnt, 1);\n-\n \tvfq_push(&vfm->vf_que_recycle, vf);\n \n \t/* schedule capture work. */\n@@ -105,7 +103,7 @@ void video_vf_put(char *receiver, struct vdec_v4l2_buffer *fb, int id)\n \t\tfb->m.mem[1].addr, fb->m.mem[1].size,\n \t\tfb->m.mem[2].addr, fb->m.mem[2].size);\n \n-\tif (vfp && vf && atomic_dec_and_test(&vf->use_cnt))\n+\tif (vfp && vf)\n \t\tvf_put(vf, receiver);\n }\n \ndiff --git a/drivers/amvdec_ports/decoder/vdec_av1_if.c b/drivers/amvdec_ports/decoder/vdec_av1_if.c\nindex e8693d40..0e5e791d 100644\n--- a/drivers/amvdec_ports/decoder/vdec_av1_if.c\n+++ b/drivers/amvdec_ports/decoder/vdec_av1_if.c\n@@ -553,8 +553,6 @@ static void vdec_av1_get_vf(struct vdec_av1_inst *inst, struct vdec_v4l2_buffer\n \t\treturn;\n \t}\n \n-\tatomic_set(&vf->use_cnt, 1);\n-\n \tfb = (struct vdec_v4l2_buffer *)vf->v4l_mem_handle;\n \tfb->vf_handle = (unsigned long)vf;\n \tfb->status = FB_ST_DISPLAY;\ndiff --git a/drivers/amvdec_ports/decoder/vdec_h264_if.c b/drivers/amvdec_ports/decoder/vdec_h264_if.c\nindex d7c4f437..2fedc273 100644\n--- a/drivers/amvdec_ports/decoder/vdec_h264_if.c\n+++ b/drivers/amvdec_ports/decoder/vdec_h264_if.c\n@@ -737,8 +737,6 @@ static void vdec_h264_get_vf(struct vdec_h264_inst *inst, struct vdec_v4l2_buffe\n \t\treturn;\n \t}\n \n-\tatomic_set(&vf->use_cnt, 1);\n-\n \tfb = (struct vdec_v4l2_buffer *)vf->v4l_mem_handle;\n \tif (fb) {\n \t\tfb->vf_handle = (unsigned long)vf;\ndiff --git a/drivers/amvdec_ports/decoder/vdec_hevc_if.c b/drivers/amvdec_ports/decoder/vdec_hevc_if.c\nindex 569806d3..fb4a5482 100644\n--- a/drivers/amvdec_ports/decoder/vdec_hevc_if.c\n+++ b/drivers/amvdec_ports/decoder/vdec_hevc_if.c\n@@ -575,8 +575,6 @@ static void vdec_hevc_get_vf(struct vdec_hevc_inst *inst, struct vdec_v4l2_buffe\n \t\treturn;\n \t}\n \n-\tatomic_set(&vf->use_cnt, 1);\n-\n \tfb = (struct vdec_v4l2_buffer *)vf->v4l_mem_handle;\n \tfb->vf_handle = (unsigned long)vf;\n \tfb->status = FB_ST_DISPLAY;\ndiff --git a/drivers/amvdec_ports/decoder/vdec_mjpeg_if.c b/drivers/amvdec_ports/decoder/vdec_mjpeg_if.c\nindex f9816cc3..c031aab8 100644\n--- a/drivers/amvdec_ports/decoder/vdec_mjpeg_if.c\n+++ b/drivers/amvdec_ports/decoder/vdec_mjpeg_if.c\n@@ -470,8 +470,6 @@ static void vdec_mjpeg_get_vf(struct vdec_mjpeg_inst *inst, struct vdec_v4l2_buf\n \t\treturn;\n \t}\n \n-\tatomic_set(&vf->use_cnt, 1);\n-\n \tfb = (struct vdec_v4l2_buffer *)vf->v4l_mem_handle;\n \tfb->vf_handle = (unsigned long)vf;\n \tfb->status = FB_ST_DISPLAY;\ndiff --git a/drivers/amvdec_ports/decoder/vdec_mpeg12_if.c b/drivers/amvdec_ports/decoder/vdec_mpeg12_if.c\nindex fa272841..528fb78e 100644\n--- a/drivers/amvdec_ports/decoder/vdec_mpeg12_if.c\n+++ b/drivers/amvdec_ports/decoder/vdec_mpeg12_if.c\n@@ -457,8 +457,6 @@ static void vdec_mpeg12_get_vf(struct vdec_mpeg12_inst *inst, struct vdec_v4l2_b\n \t\treturn;\n \t}\n \n-\tatomic_set(&vf->use_cnt, 1);\n-\n \tfb = (struct vdec_v4l2_buffer *)vf->v4l_mem_handle;\n \tfb->vf_handle = (unsigned long)vf;\n \tfb->status = FB_ST_DISPLAY;\ndiff --git a/drivers/amvdec_ports/decoder/vdec_mpeg4_if.c b/drivers/amvdec_ports/decoder/vdec_mpeg4_if.c\nindex e067e156..fb5ada67 100644\n--- a/drivers/amvdec_ports/decoder/vdec_mpeg4_if.c\n+++ b/drivers/amvdec_ports/decoder/vdec_mpeg4_if.c\n@@ -467,8 +467,6 @@ static void vdec_mpeg4_get_vf(struct vdec_mpeg4_inst *inst, struct vdec_v4l2_buf\n \t\treturn;\n \t}\n \n-\tatomic_set(&vf->use_cnt, 1);\n-\n \tfb = (struct vdec_v4l2_buffer *)vf->v4l_mem_handle;\n \tfb->vf_handle = (unsigned long)vf;\n \tfb->status = FB_ST_DISPLAY;\ndiff --git a/drivers/amvdec_ports/decoder/vdec_vp9_if.c b/drivers/amvdec_ports/decoder/vdec_vp9_if.c\nindex 6704350b..d865c25b 100644\n--- a/drivers/amvdec_ports/decoder/vdec_vp9_if.c\n+++ b/drivers/amvdec_ports/decoder/vdec_vp9_if.c\n@@ -604,8 +604,6 @@ static void vdec_vp9_get_vf(struct vdec_vp9_inst *inst, struct vdec_v4l2_buffer\n \t\treturn;\n \t}\n \n-\tatomic_set(&vf->use_cnt, 1);\n-\n \tfb = (struct vdec_v4l2_buffer *)vf->v4l_mem_handle;\n \tfb->vf_handle = (unsigned long)vf;\n \tfb->status = FB_ST_DISPLAY;\ndiff --git a/drivers/fake_video_out/fake_video.c b/drivers/fake_video_out/fake_video.c\nindex e0e9b164..3e3fe8d8 100644\n--- a/drivers/fake_video_out/fake_video.c\n+++ b/drivers/fake_video_out/fake_video.c\n@@ -72,20 +72,12 @@ static struct vframe_s *video_vf_get(void)\n \n \tvf = vf_get(RECEIVER_NAME);\n \n-\tif (vf) {\n-\t\tatomic_set(&vf->use_cnt, 1);\n-\t\t/*pr_err(\"Get vframe  w: %d, h: %d, fence: %lx, idx: %d\\n\",\n-\t\t\tvf->width, vf->height, (ulong)vf->fence, vf->index & 0xff);*/\n-\t}\n-\n \treturn vf;\n }\n \n static void video_vf_put(struct vframe_s *vf)\n {\n-\tstruct vframe_provider_s *vfp = vf_get_provider(RECEIVER_NAME);\n-\n-\tif (vfp && vf && atomic_dec_and_test(&vf->use_cnt)) {\n+\tif (vf) {\n \t\tvf_put(vf, RECEIVER_NAME);\n \t}\n }\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/media_modules-aml/patches/003-multi-decoders-limit-maximum-number-of-decoder.patch",
    "content": "From b99d31bfbc2cc973355ab5541908f0ee820b24fa Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Fri, 27 Dec 2019 20:11:58 +0100\nSubject: [PATCH] multi decoders: limit maximum number of decoder in parallel\n to 1   Kodi can only handle one decoder (12/2019). Because of threading\n issues in Kodi   it is needed to limit the multi decoder instances to a\n maximum of 1.   If Kodi do implement multiple decoder support in parallel\n this decoder limit   needs to be reverted.\n\n---\n drivers/frame_provider/decoder/utils/vdec.h         | 2 +-\n drivers/frame_provider/decoder/utils/vdec_profile.c | 2 --\n 2 files changed, 1 insertion(+), 3 deletions(-)\n\ndiff --git a/drivers/frame_provider/decoder/utils/vdec.h b/drivers/frame_provider/decoder/utils/vdec.h\nindex 18d7cd1..56f044a 100644\n--- a/drivers/frame_provider/decoder/utils/vdec.h\n+++ b/drivers/frame_provider/decoder/utils/vdec.h\n@@ -45,7 +45,7 @@ struct device *get_vdec_device(void);\n int vdec_module_init(void);\n void vdec_module_exit(void);\n \n-#define MAX_INSTANCE_MUN  9\n+#define MAX_INSTANCE_MUN  2\n \n #define VDEC_DEBUG_SUPPORT\n \ndiff --git a/drivers/frame_provider/decoder/utils/vdec_profile.c b/drivers/frame_provider/decoder/utils/vdec_profile.c\nindex d00987a..55e5213 100644\n--- a/drivers/frame_provider/decoder/utils/vdec_profile.c\n+++ b/drivers/frame_provider/decoder/utils/vdec_profile.c\n@@ -42,8 +42,6 @@ static uint dec_time_stat_reset;\n \n struct dentry *root, *event;\n \n-#define MAX_INSTANCE_MUN  9\n-\n struct vdec_profile_time_stat_s {\n \tint time_6ms_less_cnt;\n \tint time_6_9ms_cnt;\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/mt7668-wifi-bt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2024-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"mt7668-wifi-bt\"\nPKG_VERSION=\"ca5d377f3ec0ae495a13f9b022b02b5281469c50\"\nPKG_SHA256=\"894cf83dd31caad3c90d68062dd8ac9eb4be17f17e40957e3e026ed822498061\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/noob404yt/mt7668-wifi-bt\"\nPKG_URL=\"https://github.com/shantigilbert/mt7668-wifi-bt/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"mt7668-bt Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\ncd ${PKG_BUILD}/MT7668-Bluetooth\n  \n  kernel_make EXTRA_CFLAGS=\"-w\" \\\n    KERNEL_SRC=$(kernel_path)\n    \ncd ${PKG_BUILD}/MT7668-WiFi\n  \n  kernel_make EXTRA_CFLAGS=\"-w\" \\\n    KERNELDIR=$(kernel_path)\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n    find ${PKG_BUILD}/ -name \\*.ko -not -path '*/\\.*' -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \\;\n\n  mkdir -p ${INSTALL}/$(get_full_firmware_dir)\n    cp ${PKG_BUILD}/MT7668-WiFi/7668_firmware/* ${INSTALL}/$(get_full_firmware_dir)\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/opentee_linuxdriver/filesystem/aarch64/usr/lib/libteec.so.1",
    "content": "libteec.so.1.0"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/opentee_linuxdriver/filesystem/arm/usr/lib/libteec.so.1",
    "content": "libteec.so.1.0"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/opentee_linuxdriver/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"opentee_linuxdriver\"\nPKG_VERSION=\"0.1\"\nPKG_SHA256=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_LONGDESC=\"OP-TEE SECPU FW Loader\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  :\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/ta\n    ln -sf /var/lib/optee_armtz ${INSTALL}/usr/lib/optee_armtz\n\n    for soc in ${TEE_SOC}; do\n      DIRSOC=\"$(get_pkg_directory ${PKG_NAME})/filesystem/${ARCH}/ta/v3.8/dev/${soc}\"\n      [ -d ${DIRSOC} ] && cp -rP ${DIRSOC} ${INSTALL}/usr/lib/ta\n    done\n\n  mkdir -p ${INSTALL}/usr/lib/coreelec\n    install -m 0755 ${PKG_DIR}/scripts/tee-loader.sh ${INSTALL}/usr/lib/coreelec/tee-loader\n    install -m 0755 ${PKG_DIR}/scripts/dovi-loader.sh ${INSTALL}/usr/lib/coreelec/dovi-loader\n\n  cp -rP $(get_pkg_directory ${PKG_NAME})/filesystem/${ARCH}/usr ${INSTALL}\n}\n\npost_install() {\n  enable_service opentee_linuxdriver.service\n\n  # create mount points for Android partitions\n  # must be /vendor because .ta file is used by absolute path\n  mkdir -p ${INSTALL}/android/odm\n  mkdir -p ${INSTALL}/android/oem\n  mkdir -p ${INSTALL}/android/system\n  mkdir -p ${INSTALL}/android/vendor\n  ln -sf /android/system/system ${INSTALL}/system\n  ln -sf /android/vendor ${INSTALL}/vendor\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/opentee_linuxdriver/scripts/dovi-loader.sh",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\n# get coreelec release information\nsource /etc/os-release\n\nmessage() {\n  >&2 echo \"${@}\"\n}\n\n# Return 1 if given kernel version is lower than current dovi.ko module version\ncheck_dovi_version() {\n    version_higher=$(modinfo $1 | awk '/vermagic:/ {split($2, ver, \"-\"); print ver[1]}' | awk -F '.' \\\n      -v ker_ver=$2 -v maj_ver=$3 -v min_ver=$4 '{\n        if ($1 > ker_ver) { print \"Y\"; }\n        else if ($1 < ker_ver) { print \"N\"; }\n        else {\n          if ($2 > maj_ver) { print \"Y\"; }\n          else if ($2 < maj_ver) { print \"N\"; }\n          else {\n            if ($3 >= min_ver) { print \"Y\"; }\n            else { print \"N\"; }\n          }\n        }\n      }')\n\n    if [ \"$version_higher\" = \"Y\" ]; then\n      return 0\n    else\n      return 1\n    fi\n}\n\ninsmod_dovi() {\n  [ ! -f ${DOVI_KO_ANDROID} ] && return 1\n\n  modinfo ${DOVI_KO_ANDROID}\n\n  if check_dovi_version ${DOVI_KO_ANDROID} 5 15 137; then\n    message \"loading dovi module from android partition\"\n    insmod ${DOVI_KO_ANDROID}\n  else\n    cat > /tmp/dovi.message << 'EOF'\n[TITLE]CoreELEC Dolby Vision Media Playback[/TITLE]\n[B][COLOR red]Android Dolby Vision kernel module is not compatible[/COLOR][/B]\n[COLOR red]No Dolby Vision media playback possible![/COLOR]\n\nPlease upgrade Android firmware of your device to minimum Linux kernel version '5.15.137'.\nDolby Vision media will be displayed in HDR instead Dolby Vision until the firmware fulfill the minimum requirements.\nEOF\n  fi\n\n  return 0\n}\n\nload_dovi() {\n  # local dovi.ko\n  for DOVI_KO_STORAGE in /storage/.config/dovi.ko \\\n                         /flash/dovi.ko \\\n                         /storage/dovi.ko \\\n                         ; do\n    if [ -f ${DOVI_KO_STORAGE} ]; then\n      message \"loading dovi module from ce partition\"\n      modinfo ${DOVI_KO_STORAGE}\n      insmod ${DOVI_KO_STORAGE} && return\n    fi\n  done\n\n  # Android 12\n  if [ -b /dev/oem ]; then\n    mountpoint -q /android/oem || mount -o ro /dev/oem /android/oem\n\n    DOVI_KO_ANDROID=\"/android/oem/overlay/dovi.ko\"\n    insmod_dovi && return\n  fi\n\n  # Android 11\n  # if mounted from tee-loader don't mount/unmount from dovi-loader\n  if ! ls /dev/mapper/dynpart-* &>/dev/null && [ -b /dev/super ]; then\n    dmsetup create --concise \"$(parse-android-dynparts /dev/super)\"\n    systemctl set-environment dmsetup_remove=yes\n  fi\n\n  local active_slot=$(fw_printenv active_slot 2>/dev/null | awk -F '=' '/active_slot=/ {print $2}')\n\n  if [ -b /dev/mapper/dynpart-system_a ]; then\n    active_slot=\"_a\"\n  elif [ -b /dev/mapper/dynpart-system_b ]; then\n    active_slot=\"_b\"\n  else\n    active_slot=\"\"\n  fi\n\n  if [ -b /dev/mapper/dynpart-odm${active_slot} ]; then\n    mountpoint -q /android/odm || mount -o ro /dev/mapper/dynpart-odm${active_slot} /android/odm\n\n    DOVI_KO_ANDROID=\"/android/odm/lib/modules/dovi.ko\"\n    insmod_dovi && return\n  fi\n\n  # older Android\n  mountpoint -q /android/vendor || mount -o ro /dev/vendor /android/vendor\n\n  for DOVI_KO_ANDROID in /android/vendor/lib/modules/dovi.ko \\\n                         /android/vendor/lib/modules/dovi_vs10.ko \\\n                         ; do\n    insmod_dovi && return\n  done\n\n  cleanup_dovi\n}\n\ncleanup_dovi() {\n  rmmod dovi 2>/dev/null\n  mountpoint -q /android/odm && umount /android/odm\n  mountpoint -q /android/oem && umount /android/oem\n  mountpoint -q /android/vendor && umount /android/vendor\n  # unmount only if mounted from this script\n  [ \"${dmsetup_remove}\" = \"yes\" ] && \\\n    ls /dev/mapper/dynpart-* &>/dev/null && dmsetup remove /dev/mapper/dynpart-*\n}\n\nmessage \"run dovi '${1}'\"\n\ncase \"${1}\" in\n  start)\n    load_dovi\n    ;;\n  stop)\n    cleanup\n    ;;\nesac\n\nexit 0\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/opentee_linuxdriver/scripts/tee-loader.sh",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\n# get coreelec release information\nsource /etc/os-release\n\nVIDEO_UCODE_BIN_PATH=/lib/firmware/video/video_ucode.bin\nTEE_SUPPLICANT_PID_FILE=/var/run/tee-supplicant.pid\n\nmessage() {\n  >&2 echo \"${@}\"\n}\n\nandroid_wrapper() {\n  local android_arch=$(od -An -t x1 -j 4 -N 1 /vendor/bin/tee-supplicant | tr -d '[:space:]')\n  local bit64=\"\"\n  local arg_exec=\"\"\n\n  [ \"${android_arch}\" = \"02\" ] && bit64=\"64\"  # 01 for 32-bit, 02 for 64 bit\n\n  if [ \"${1}\" = \"exec\" ]; then\n    arg_exec=\"exec\"\n    shift\n  fi\n\n  LD_LIBRARY_PATH=/system/lib${bit64}/bootstrap:/system/lib${bit64}:/vendor/lib${bit64} \\\n    ${arg_exec} \\\n    /system/bin/bootstrap/linker${bit64} \\\n    ${@}\n\n  return ${?}\n}\n\nrun_tee_from_coreelec() {\n  message \"run tee from coreelec start\"\n\n  local SOC=$(awk '/SoC[ \\t]*:/ {printf \"%s\", $3}' /proc/cpuinfo)\n\n  if [ -z \"${SOC}\" ]; then\n    message \"SoC architecture unknown\"\n    return 1\n  fi\n\n  mkdir -p /var/lib\n  ln -sfn /usr/lib/ta/${SOC} /var/lib/optee_armtz\n\n  [ -f $(dirname ${VIDEO_UCODE_BIN_PATH})/${SOC}/video_ucode.bin ] && \\\n    ln -sfn ${SOC}/video_ucode.bin ${VIDEO_UCODE_BIN_PATH}\n\n  tee-supplicant &\n  echo ${!} >${TEE_SUPPLICANT_PID_FILE}\n  # wait for tee-supplicant process to start\n  sleep 5\n\n  tee_preload_fw ${VIDEO_UCODE_BIN_PATH}\n  local rv=${?}\n  message \"run tee from coreelec end\"\n  return ${rv}\n}\n\nrun_tee_from_android() {\n  message \"run tee from android start\"\n\n  ! ls /dev/mapper/dynpart-* &>/dev/null && dmsetup create --concise \"$(parse-android-dynparts /dev/super)\"\n\n  local active_slot=$(fw_printenv active_slot 2>/dev/null | awk -F '=' '/active_slot=/ {print $2}')\n  message \"fw active slot: '${active_slot}'\"\n\n  if [ -b /dev/mapper/dynpart-system_a ]; then\n    active_slot=\"_a\"\n  elif [ -b /dev/mapper/dynpart-system_b ]; then\n    active_slot=\"_b\"\n  else\n    active_slot=\"\"\n  fi\n\n  message \"active slot: '${active_slot}'\"\n\n  mountpoint -q /android/system || mount -o ro /dev/mapper/dynpart-system${active_slot} /android/system\n  mountpoint -q /android/vendor || mount -o ro /dev/mapper/dynpart-vendor${active_slot} /android/vendor\n\n  if [ ! -x /vendor/bin/tee-supplicant ]; then\n    message \"tee-supplicant does not exist on android\"\n    return 1\n  fi\n\n  android_wrapper exec /vendor/bin/tee-supplicant &\n  echo ${!} >${TEE_SUPPLICANT_PID_FILE}\n  # wait for tee-supplicant process to start\n  sleep 5\n\n  ln -sfn /vendor${VIDEO_UCODE_BIN_PATH} ${VIDEO_UCODE_BIN_PATH}\n\n  android_wrapper /vendor/bin/tee_preload_fw ${VIDEO_UCODE_BIN_PATH}\n  local rv=${?}\n  message \"run tee from android end\"\n  return ${rv}\n}\n\ncleanup_tee() {\n  message \"cleanup tee start\"\n\n  # process is killed by systemd\n  if [ -r ${TEE_SUPPLICANT_PID_FILE} ]; then\n    local tee_pid=$(cat ${TEE_SUPPLICANT_PID_FILE})\n    kill -s 0 ${tee_pid} 2>/dev/null && kill -KILL ${tee_pid}\n    rm -f ${TEE_SUPPLICANT_PID_FILE}\n  fi\n\n  mountpoint -q /android/system && umount /android/system\n  mountpoint -q /android/vendor && umount /android/vendor\n  ls /dev/mapper/dynpart-* &>/dev/null && dmsetup remove /dev/mapper/dynpart-*\n\n  message \"cleanup tee end\"\n}\n\n# run only if SoC is minimum SC2 (0x32) architecture\nSERIAL_THIS=$(awk '/^Serial[ \\t]*:/ {printf \"%d\", \"0x\" substr($3,0,2)}' /proc/cpuinfo)\nSERIAL_SC2=$(printf \"%d\" \"0x32\")\n\nif [ ${SERIAL_THIS} -lt ${SERIAL_SC2} ]; then\n  echo 1 > $(realpath /sys/module/*tee/parameters/disable_flag)\n  message \"tee not needed (SoC is less than SC2 (0x32) architecture)\"\n  ln -sfn NO_TEE/video_ucode.bin ${VIDEO_UCODE_BIN_PATH}\n  exit 0\nfi\n\ncase \"${1}\" in\n  start)\n    if [ -b /dev/super ]; then\n      run_tee_from_android\n      [ ${?} -eq 0 ] && exit 0\n\n      message \"using tee from android failed, trying from coreelec\"\n      cleanup_tee\n    fi\n\n    run_tee_from_coreelec\n    [ ${?} -eq 0 ] && exit 0\n\n    if [ ! -b /dev/super ]; then exit 0; fi\n\n    cat > /tmp/tee.message << 'EOF'\n[TITLE]CoreELEC Media Playback[/TITLE]\n[B][COLOR red]Missing partition 'super' on eMMC![/COLOR][/B]\n[COLOR red]No media playback possible![/COLOR]\n\nCurrent Android installed on eMMC does not have 'super' partition which is required for media playback in CoreELEC. Android must be reinstalled on your device to satisfy the requirements.\n\nIf you have a CoreELEC internal install by the tool 'ceemmc' it is possible to perform the internal install again after Android is restored.\n\nPlease ensure you have done a backup of your data before perform any recovery step.\nEOF\n\n    message \"using tee from coreelec failed\"\n    cleanup_tee\n    ;;\n  stop)\n    cleanup_tee\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/opentee_linuxdriver/system.d/opentee_linuxdriver.service",
    "content": "[Unit]\nDescription=Optee TEE-Supplicant and Video Firmware Preload service\nBefore=kodi.service\nAfter=local-fs.target\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/lib/coreelec/tee-loader start\nExecStart=/usr/lib/coreelec/dovi-loader start\nExecStop=/usr/lib/coreelec/dovi-loader stop\nExecStop=/usr/lib/coreelec/tee-loader stop\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/qca6174-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"qca6174-aml\"\nPKG_VERSION=\"c39cce4160817b0445afd4304b5b4dd2dcd29167\"\nPKG_SHA256=\"450df8193205b13e81342d90a7cfd6ee2842453b800b1080bfa8b365af2ba5b8\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/qca6174-aml\"\nPKG_URL=\"https://github.com/CoreELEC/qca6174-aml/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"qca6174 Linux Driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_PATCH_DIRS=\"$LINUX\"\n\npost_unpack() {\n  sed -i 's,-Wall,,g; s,-Werror,,g' ${PKG_BUILD}/AIO/drivers/qcacld-new/Kbuild\n  sed -i 's,CDEFINES :=,CDEFINES := -Wno-misleading-indentation -Wno-unused-variable -Wno-unused-function,g' ${PKG_BUILD}/AIO/drivers/qcacld-new/Kbuild\n}\n\npre_make_target() {\n  unset LDFLAGS\n  unset CFLAGS\n}\n\nmake_target() {\n  cd AIO/build\n  make KERNELPATH=\"$(kernel_path)\" \\\n    ARCH=${TARGET_KERNEL_ARCH} \\\n    CROSS_COMPILE=${TARGET_KERNEL_PREFIX} \\\n    INSTALL_ROOT=${PKG_BUILD} \\\n    CONFIG_BUILDROOT=y\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n    cp ${PKG_BUILD}/lib/modules/wlan.ko ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}/wlan-${PKG_NAME}.ko\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/qca9377-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"qca9377-aml\"\nPKG_VERSION=\"311e24939b53d0cbaf303cde3ed1dc22349602a9\"\nPKG_SHA256=\"238e0174ec5ca3f87c184fade5eb7d1e4522d6af279aac6bd87f8bab24fc13ad\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://boundarydevices.com/new-silex-wifi-802-11ac-bt4-1-module/\"\nPKG_URL=\"https://github.com/boundarydevices/qcacld-2.0/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"qca9377 Linux Driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nPKG_PATCH_DIRS=\"$LINUX\"\n\npost_unpack() {\n  sed -i 's,-Wall,,g; s,-Werror,,g' ${PKG_BUILD}/Kbuild\n  sed -i 's,CDEFINES :=,CDEFINES := -Wno-misleading-indentation -Wno-unused-variable -Wno-unused-function,g' ${PKG_BUILD}/Kbuild\n}\n\npre_make_target() {\n  unset LDFLAGS\n  unset CFLAGS\n}\n\nmake_target() {\n  make KERNEL_SRC=\"$(kernel_path)\" \\\n    ARCH=${TARGET_KERNEL_ARCH} \\\n    CROSS_COMPILE=${TARGET_KERNEL_PREFIX} \\\n    CONFIG_BUILDROOT=y\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n    cp ${PKG_BUILD}/wlan.ko ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}/wlan-${PKG_NAME}.ko\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/qca9377-aml/patches/amlogic-3.14/qca9377-aml-001-Modify-SDIO-and-firmware-handling-to-support-chips-u.patch",
    "content": "From 7d4ee23fb20cc5e17d8d79db20a0d6704ac3df6c Mon Sep 17 00:00:00 2001\nFrom: kszaq <kszaquitto@gmail.com>\nDate: Tue, 10 Jan 2017 22:43:12 +0100\nSubject: [PATCH] Modify SDIO and firmware handling to support chips used in\n Amlogic devices\n\n---\n CORE/HDD/src/wlan_hdd_cfg.c                        |  10 +-\n CORE/HDD/src/wlan_hdd_main.c                       | 180 ++++++++++++++++++++-\n CORE/SERVICES/BMI/ol_fw.c                          |   8 +-\n CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c         |   6 -\n .../sdio/linux/native_sdio/include/hif_internal.h  |   2 +-\n CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c |  62 +++----\n 6 files changed, 209 insertions(+), 59 deletions(-)\n\ndiff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c\nindex 14524ef..439b18a 100644\n--- a/CORE/HDD/src/wlan_hdd_cfg.c\n+++ b/CORE/HDD/src/wlan_hdd_cfg.c\n@@ -60,6 +60,8 @@\n #include <pmcApi.h>\n #include <wlan_hdd_misc.h>\n \n+extern int qca_request_firmware(const struct firmware **firmware_p, const char *name,struct device *device);\n+\n static char *mac_param;\n module_param_named(mac, mac_param, charp, S_IRUGO);\n MODULE_PARM_DESC(mac, \"mac address override\");\n@@ -4411,11 +4413,11 @@ VOS_STATUS hdd_parse_config_ini(hdd_context_t* pHddCtx)\n \n    memset(cfgIniTable, 0, sizeof(cfgIniTable));\n \n-   status = request_firmware(&fw, WLAN_INI_FILE, pHddCtx->parent_dev);\n+   status = qca_request_firmware(&fw, WLAN_INI_FILE, pHddCtx->parent_dev);\n \n    if(status)\n    {\n-      printk(\"%s: request_firmware failed %d\",__func__, status);\n+      printk(\"%s: qca_request_firmware failed %d\",__func__, status);\n       vos_status = VOS_STATUS_E_FAILURE;\n       goto config_exit;\n    }\n@@ -5104,11 +5106,11 @@ VOS_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx)\n    }\n \n    memset(macTable, 0, sizeof(macTable));\n-   status = request_firmware(&fw, WLAN_MAC_FILE, pHddCtx->parent_dev);\n+   status = qca_request_firmware(&fw, WLAN_MAC_FILE, pHddCtx->parent_dev);\n \n    if (status)\n    {\n-      hddLog(VOS_TRACE_LEVEL_WARN, \"%s: request_firmware failed %d\",\n+      hddLog(VOS_TRACE_LEVEL_WARN, \"%s: qca_request_firmware failed %d\",\n              __func__, status);\n       vos_status = VOS_STATUS_E_FAILURE;\n       return vos_status;\ndiff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c\nindex 00db789..7926902 100644\n--- a/CORE/HDD/src/wlan_hdd_main.c\n+++ b/CORE/HDD/src/wlan_hdd_main.c\n@@ -239,6 +239,163 @@ static VOS_STATUS hdd_parse_ese_beacon_req(tANI_U8 *pValue,\n /*\n  * Android DRIVER command structures\n  */\n+//tkun add\n+ typedef char            A_CHAR;\n+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)\n+ #define GET_INODE_FROM_FILEP(filp) \\\n+     (filp)->f_path.dentry->d_inode\n+ #else\n+ #define GET_INODE_FROM_FILEP(filp) \\\n+     (filp)->f_dentry->d_inode\n+ #endif\n+// #define A_MALLOC(size)                  kmalloc((size), GFP_KERNEL)\n+ #define A_MALLOC_NOWAIT(size)           kmalloc((size), GFP_ATOMIC)\n+// #define A_FREE(addr)                    kfree(addr);addr=NULL;\n+//#define A_MEMCPY(dst, src, len)         memcpy((dst), (src), (len))\n+// #define A_MEMZERO(addr, len)            memset((addr), 0, (len))\n+ #define A_MEMCMP(addr1, addr2, len)     memcmp((addr1), (addr2), (len))\n+ #define A_ROUND_UP(x, y)  ((((x) + ((y) - 1)) / (y)) * (y))\n+ \n+ char qcafwpath[256] = \"/lib/firmware\";\n+ \n+ int android_readwrite_file(const A_CHAR *filename, A_CHAR *rbuf, const A_CHAR *wbuf, size_t length)\n+ {\n+     int ret = 0;\n+     struct file *filp = (struct file *)-ENOENT;\n+     mm_segment_t oldfs;\n+     oldfs = get_fs();\n+     set_fs(KERNEL_DS);\n+ \n+ //    printk(\"%s: filename %s \\n\",__func__,filename);\n+     do {\n+         int mode = (wbuf) ? O_RDWR : O_RDONLY;\n+         filp = filp_open(filename, mode, S_IRUSR);\n+         if (IS_ERR(filp) || !filp->f_op) {\n+             printk(\"%s: file %s filp_open error\\n\", __FUNCTION__, filename);\n+             ret = -ENOENT;\n+             break;\n+         }\n+ \n+         if (length==0) {\n+             /* Read the length of the file only */\n+             struct inode    *inode;\n+ \n+             inode = GET_INODE_FROM_FILEP(filp);\n+             if (!inode) {\n+  //               printk(\"%s: Get inode from %s failed\\n\", __FUNCTION__, filen    ame);\n+                 ret = -ENOENT;\n+                 break;\n+             }\n+             ret = i_size_read(inode->i_mapping->host);\n+             break;\n+         }\n+ \n+         if (wbuf) {\n+            if ( (ret=filp->f_op->write(filp, wbuf, length, &filp->f_pos)) < 0) {\n+//                 printk(\"%s: Write %u bytes to file %s error %d\\n\", __FUNCTION__,\n+ //                                length, filename, ret);\n+                 break;\n+             }\n+         } else {\n+             if ( (ret=filp->f_op->read(filp, rbuf, length, &filp->f_pos)) < 0) {\n+//                 printk (\"%s: Read %u bytes from file %s error %d\\n\", __FUNCTION__,\n+ //                                length, filename, ret);\n+                 break;\n+             }\n+         }\n+     } while (0);\n+ \n+     if (!IS_ERR(filp)) {\n+         filp_close(filp, NULL);\n+     }\n+     set_fs(oldfs);\n+ \n+     return ret;\n+ }\n+ \n+ \n+ int android_request_firmware(const struct firmware **firmware_p, const char *name,struct device *device)\n+ {\n+     int ret = 0;\n+     struct firmware *firmware;\n+     char filename[256];\n+     const char *raw_filename = name;\n+     *firmware_p = firmware = A_MALLOC(sizeof(*firmware));\n+     if (!firmware)\n+         return -ENOMEM;\n+     A_MEMZERO(firmware, sizeof(*firmware));\n+     do {\n+         size_t length, bufsize, bmisize;\n+ \n+         if (snprintf(filename, sizeof(filename), \"%s/%s\", qcafwpath,\n+                                 raw_filename) >= sizeof(filename)) {\n+             printk(\"snprintf: %s/%s\\n\", qcafwpath, raw_filename);\n+             ret = -1;\n+             break;\n+         }\n+         if ( (ret=android_readwrite_file(filename, NULL, NULL, 0)) < 0) {\n+             break;\n+         } else {\n+             length = ret;\n+         }\n+ \n+         if (strcmp(raw_filename, \"softmac\") == 0) {\n+             bufsize = length = 17;\n+         } else {\n+             bufsize = ALIGN(length, PAGE_SIZE);\n+             bmisize = A_ROUND_UP(length, 4);\n+             bufsize = max(bmisize, bufsize);\n+         }\n+         firmware->data = vmalloc(bufsize);\n+         firmware->size = length;\n+ \n+   //    printk(\"AR6K: %s(): raw_filename=%s, bufsize=%d\\n\", __FUNCTION__, ra    w_filename, bufsize);\n+ \n+         if (!firmware->data) {\n+             printk(\"%s: Cannot allocate buffer for firmware\\n\", __FUNCTION__);\n+             ret = -ENOMEM;\n+             break;\n+         }\n+ \n+         if ( (ret=android_readwrite_file(filename, (char*)firmware->data, NULL, length)) != length) {\n+//             printk(\"%s: file read error, ret %d request %d\\n\", __FUNCTION__,ret,length);\n+//             ret = -1;\n+             break;\n+         }\n+ \n+     } while (0);\n+ \n+     if (ret<0) {\n+         if (firmware) {\n+         if (firmware->data)\n+                 vfree(firmware->data);\n+             A_FREE(firmware);\n+         }\n+         *firmware_p = NULL;\n+     } else {\n+         ret = 0;\n+     }\n+     return ret;\n+ }\n+ \n+ void android_release_firmware(const struct firmware *firmware)\n+ {\n+     if (firmware) {\n+         if (firmware->data)\n+             vfree(firmware->data);\n+         kfree(firmware);\n+     }\n+ }\n+extern int qca_request_firmware(const struct firmware **firmware_p,const char *name,struct device *device)\n+ {\n+   //      int uevent = 1;\n+ \n+         //return _request_firmware(firmware_p, name, device, uevent, false);\n+ \n+         return android_request_firmware(firmware_p, name,device);\n+ \n+ \n+ }\n struct android_wifi_reassoc_params {\n    unsigned char bssid[18];\n    int channel;\n@@ -7801,7 +7958,7 @@ VOS_STATUS hdd_get_cfg_file_size(v_VOID_t *pCtx, char *pFileName, v_SIZE_t *pBuf\n \n    ENTER();\n \n-   status = request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);\n+   status = qca_request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);\n \n    if(status || !pHddCtx->fw || !pHddCtx->fw->data) {\n       hddLog(VOS_TRACE_LEVEL_FATAL,\"%s: CFG download failed\",__func__);\n@@ -7842,7 +7999,7 @@ VOS_STATUS hdd_read_cfg_file(v_VOID_t *pCtx, char *pFileName,\n \n    ENTER();\n \n-   status = request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);\n+   status = qca_request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);\n \n    if(status || !pHddCtx->fw || !pHddCtx->fw->data) {\n       hddLog(VOS_TRACE_LEVEL_FATAL,\"%s: CFG download failed\",__func__);\n@@ -12886,15 +13043,34 @@ static int hdd_driver_init( void)\n   \\return - 0 for success, non zero for failure\n \n   --------------------------------------------------------------------------*/\n+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))\n+extern  int wifi_setup_dt(void);\n+extern  void wifi_teardown_dt(void);\n+#endif\n+extern  void extern_wifi_set_enable(int is_on);\n+extern  void sdio_reinit(void);\n+\n #ifdef MODULE\n static int __init hdd_module_init ( void)\n {\n+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))\n+    wifi_setup_dt();\n+#endif\n+        extern_wifi_set_enable(0);\n+        mdelay(200);\n+        extern_wifi_set_enable(1);\n+        mdelay(200);\n+sdio_reinit();\n+\n    return hdd_driver_init();\n }\n #else /* #ifdef MODULE */\n static int __init hdd_module_init ( void)\n {\n    /* Driver initialization is delayed to fwpath_changed_handler */\n+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))\n+wifi_teardown_dt();\n+#endif\n    return 0;\n }\n #endif /* #ifdef MODULE */\ndiff --git a/CORE/SERVICES/BMI/ol_fw.c b/CORE/SERVICES/BMI/ol_fw.c\nindex 466dbbc..95f1aee 100644\n--- a/CORE/SERVICES/BMI/ol_fw.c\n+++ b/CORE/SERVICES/BMI/ol_fw.c\n@@ -118,7 +118,7 @@ static int ol_get_fw_files_for_target(struct ol_fw_files *pfw_files,\n     return 0;\n }\n #endif\n-\n+extern int qca_request_firmware(const struct firmware **firmware_p, const char *name,struct device *device);\n #ifdef HIF_USB\n static A_STATUS ol_usb_extra_initialization(struct ol_softc *scn);\n #endif\n@@ -164,7 +164,7 @@ static int ol_transfer_single_bin_file(struct ol_softc *scn,\n \t\t\t\t__func__));\n \t}\n \n-\tif (request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)\n+\tif (qca_request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)\n \t{\n \t\tAR_DEBUG_PRINTF(ATH_DEBUG_ERR,\n \t\t\t\t(\"%s: Failed to get %s\\n\",\n@@ -492,7 +492,7 @@ static int ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file,\n \t\tbreak;\n \t}\n \n-\tif (request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)\n+\tif (qca_request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)\n \t{\n \t\tprintk(\"%s: Failed to get %s\\n\", __func__, filename);\n \n@@ -506,7 +506,7 @@ static int ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file,\n \t\t\tfilename = scn->fw_files.board_data;\n \t\t\tprintk(\"%s: Trying to load default %s\\n\",\n \t\t\t\t__func__, filename);\n-\t\t\tif (request_firmware(&fw_entry, filename,\n+\t\t\tif (qca_request_firmware(&fw_entry, filename,\n \t\t\t\tscn->sc_osdev->device) != 0) {\n \t\t\t\tprintk(\"%s: Failed to get %s\\n\",\n \t\t\t\t\t__func__, filename);\ndiff --git a/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c b/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c\nindex c99020e..6bafed8 100644\n--- a/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c\n+++ b/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c\n@@ -234,12 +234,6 @@ ath_hif_sdio_remove(void *context, void *hif_handle)\n {\n     ENTER();\n \n-    if (!sc) {\n-        VOS_TRACE(VOS_MODULE_ID_HIF, VOS_TRACE_LEVEL_ERROR,\n-                  \"Global SDIO context is NULL\");\n-        return A_ERROR;\n-    }\n-\n     athdiag_procfs_remove();\n \n #ifndef TARGET_DUMP_FOR_NON_QC_PLATFORM\ndiff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h b/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h\nindex 382e38c..234bc09 100644\n--- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h\n+++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/include/hif_internal.h\n@@ -112,7 +112,7 @@ struct hif_device {\n     A_BOOL swap_mailbox;\n };\n \n-#define HIF_DMA_BUFFER_SIZE (4 * 1024)\n+#define HIF_DMA_BUFFER_SIZE (56 * 1024)\n #define CMD53_FIXED_ADDRESS 1\n #define CMD53_INCR_ADDRESS  2\n \ndiff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c\nindex 1c54002..03401fd 100644\n--- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c\n+++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c\n@@ -64,7 +64,8 @@\n                 ((request->request & HIF_WRITE)&& \\\n                 (request->address >= 0x1000 && request->address < 0x1FFFF))\n #endif\n-unsigned int mmcbusmode = 0;\n+//unsigned int mmcbusmode = 0;\n+unsigned int mmcbusmode = 5;\n module_param(mmcbusmode, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);\n MODULE_PARM_DESC(mmcbusmode, \"Set MMC driver Bus Mode: 1-SDR12, 2-SDR25, 3-SDR50, 4-DDR50, 5-SDR104\");\n EXPORT_SYMBOL(mmcbusmode);\n@@ -74,7 +75,9 @@ module_param(mmcbuswidth, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);\n MODULE_PARM_DESC(mmcbuswidth, \"Set MMC driver Bus Width: 1-1Bit, 4-4Bit, 8-8Bit\");\n EXPORT_SYMBOL(mmcbuswidth);\n \n-unsigned int mmcclock = 0;\n+//unsigned int mmcclock = 0;\n+//unsigned int mmcclock = 166666666;\n+unsigned int mmcclock = 200000000;\n module_param(mmcclock, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);\n MODULE_PARM_DESC(mmcclock, \"Set MMC driver Clock value\");\n EXPORT_SYMBOL(mmcclock);\n@@ -95,7 +98,7 @@ unsigned int asyncintdelay = 2;\n module_param(asyncintdelay, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);\n MODULE_PARM_DESC(asyncintdelay, \"Delay clock count for aysnc interrupt, 2 is default, vaild values are 1 and 2\");\n #else\n-unsigned int asyncintdelay = 0;\n+unsigned int asyncintdelay = 2;\n module_param(asyncintdelay, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);\n MODULE_PARM_DESC(asyncintdelay, \"Delay clock count for aysnc interrupt, 0 is default, vaild values are 1 and 2\");\n #endif\n@@ -412,12 +415,6 @@ __HIFReadWrite(HIF_DEVICE *device,\n                 tbuffer = device->dma_buffer;\n                     /* copy the write data to the dma buffer */\n                 AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE);\n-                if (length > HIF_DMA_BUFFER_SIZE) {\n-                    AR_DEBUG_PRINTF(ATH_DEBUG_ERROR,\n-                            (\"AR6000: Invalid write length: %d\\n\", length));\n-                    status = A_EINVAL;\n-                    break;\n-                }\n                 memcpy(tbuffer, buffer, length);\n                 bounced = TRUE;\n             } else {\n@@ -440,12 +437,6 @@ __HIFReadWrite(HIF_DEVICE *device,\n             if (BUFFER_NEEDS_BOUNCE(buffer)) {\n                 AR_DEBUG_ASSERT(device->dma_buffer != NULL);\n                 AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE);\n-                if (length > HIF_DMA_BUFFER_SIZE) {\n-                    AR_DEBUG_PRINTF(ATH_DEBUG_ERROR,\n-                            (\"AR6000: Invalid read length: %d\\n\", length));\n-                    status = A_EINVAL;\n-                    break;\n-                }\n                 tbuffer = device->dma_buffer;\n                 bounced = TRUE;\n             } else {\n@@ -695,7 +686,7 @@ static int async_task(void *param)\n     complete_and_exit(&device->async_completion, 0);\n     return 0;\n }\n-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32))\n+#if 1\n static A_INT32 IssueSDCommand(HIF_DEVICE *device, A_UINT32 opcode, A_UINT32 arg, A_UINT32 flags, A_UINT32 *resp)\n {\n     struct mmc_command cmd;\n@@ -719,6 +710,7 @@ static A_INT32 IssueSDCommand(HIF_DEVICE *device, A_UINT32 opcode, A_UINT32 arg,\n     return err;\n }\n #endif\n+//extern int sdio_reset_comm(struct mmc_card *card);\n A_STATUS ReinitSDIO(HIF_DEVICE *device)\n {\n     A_INT32 err = 0;\n@@ -733,10 +725,12 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)\n     host = card->host;\n \n     AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, (\"AR6000: +ReinitSDIO \\n\"));\n+\t\n+//\terr = sdio_reset_comm(card);\n+#if 1\n     sdio_claim_host(func);\n \n     do {\n-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32))\n         /* 2.6.32 kernel does part of the SDIO initalization upon resume */\n         A_BOOL lt_2_6_32 = (LINUX_VERSION_CODE<KERNEL_VERSION(2,6,32));\n         if (lt_2_6_32) {\n@@ -783,19 +777,10 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)\n                 break;\n             }\n \n-            if (!host->ocr) {\n-                /* Issue CMD5, arg = 0 */\n-                err = IssueSDCommand(device, SD_IO_SEND_OP_COND, 0, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);\n-                if (err) {\n-                    AR_DEBUG_PRINTF(ATH_DEBUG_ERR, (\"ReinitSDIO: CMD5 failed : %d \\n\",err));\n-                    break;\n-                }\n-                host->ocr = resp;\n-            }\n \n             /* Issue CMD5, arg = ocr. Wait till card is ready  */\n             for (i=0;i<100;i++) {\n-                err = IssueSDCommand(device, SD_IO_SEND_OP_COND, host->ocr, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);\n+                err = IssueSDCommand(device, SD_IO_SEND_OP_COND, 0, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);\n                 if (err) {\n                     AR_DEBUG_PRINTF(ATH_DEBUG_ERR, (\"ReinitSDIO: CMD5 failed : %d \\n\",err));\n                     break;\n@@ -828,7 +813,7 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)\n                 break;\n             }\n         }\n-#endif\n+\n         /* Enable high speed */\n         if (card->host->caps & MMC_CAP_SD_HIGHSPEED) {\n             AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, (\"ReinitSDIO: Set high speed mode\\n\"));\n@@ -891,7 +876,7 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)\n \n     sdio_release_host(func);\n     AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, (\"AR6000: -ReinitSDIO \\n\"));\n-\n+#endif\n     return (err) ? A_ERROR : A_OK;\n }\n \n@@ -1320,6 +1305,7 @@ static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id\n /*\n TODO: MMC SDIO3.0 Setting should also be modified in ReInit() function when Power Manage work.\n */\n+#if 1\n         {\n             A_UINT32 clock, clock_set = 12500000;\n #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)\n@@ -1576,7 +1562,7 @@ TODO: MMC SDIO3.0 Setting should also be modified in ReInit() function when Powe\n \n             sdio_release_host(func);\n         }\n-\n+#endif\n         spin_lock_init(&device->lock);\n \n         spin_lock_init(&device->asynclock);\n@@ -2068,12 +2054,10 @@ static int hifDeviceSuspend(struct device *dev)\n                     return -1;\n                 }\n             } else {\n-                if (wma_suspend_target(temp_module, 0)) {\n-                   AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, (\"PDEV Suspend Failed\\n\"));\n-                   return -1;\n-                }\n+                  if (wma_suspend_target(temp_module, 0)) {\n+                     printk(KERN_ERR \"wma_suspend_target failed.\\n\");\n+\t\t  }\n             }\n-\n             if (pm_flag & MMC_PM_WAKE_SDIO_IRQ){\n                 AR_DEBUG_PRINTF(ATH_DEBUG_INFO, (\"hifDeviceSuspend: wow enter\\n\"));\n                 config = HIF_DEVICE_POWER_DOWN;\n@@ -2293,9 +2277,7 @@ static HIF_DEVICE *\n addHifDevice(struct sdio_func *func)\n {\n     HIF_DEVICE *hifdevice = NULL;\n-#if(LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)) && !defined(WITH_BACKPORTS)\n     int ret = 0;\n-#endif\n     ENTER();\n     AR_DEBUG_ASSERT(func != NULL);\n     hifdevice = (HIF_DEVICE *)A_MALLOC(sizeof(HIF_DEVICE));\n@@ -2308,13 +2290,9 @@ addHifDevice(struct sdio_func *func)\n     hifdevice->func = func;\n     hifdevice->powerConfig = HIF_DEVICE_POWER_UP;\n     hifdevice->DeviceState = HIF_DEVICE_STATE_ON;\n-#if(LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)) && !defined(WITH_BACKPORTS)\n     ret = sdio_set_drvdata(func, hifdevice);\n+\n     EXIT(\"status %d\", ret);\n-#else\n-    sdio_set_drvdata(func, hifdevice);\n-    EXIT();\n-#endif\n     return hifdevice;\n }\n \n-- \n2.7.4\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/qca9377-aml/patches/amlogic-4.9/qca9377-aml-001-fix-amlogic-4.9-compatibility.patch",
    "content": "From 3b0a139cea3a9b45db94923d4acba93b0267fc25 Mon Sep 17 00:00:00 2001\nFrom: Arthur Liberman <arthur_liberman@hotmail.com>\nDate: Fri, 17 Jul 2020 19:09:18 +0300\nSubject: [PATCH] Fix build on Amlogic's 4.9 kernel\n\n---\n CORE/HDD/src/wlan_hdd_main.c | 10 ++++++++--\n 1 file changed, 8 insertions(+), 2 deletions(-)\n\ndiff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c\nindex 00db78995..2afe68e23 100644\n--- a/CORE/HDD/src/wlan_hdd_main.c\n+++ b/CORE/HDD/src/wlan_hdd_main.c\n@@ -13015,9 +13015,15 @@ static void __exit hdd_module_exit(void)\n    hdd_driver_exit();\n }\n \n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0))\n+#define KERNEL_PARAM const struct kernel_param\n+#else\n+#define KERNEL_PARAM struct kernel_param\n+#endif\n+\n #ifdef MODULE\n static int fwpath_changed_handler(const char *kmessage,\n-                                 struct kernel_param *kp)\n+                                 KERNEL_PARAM *kp)\n {\n    return param_set_copystring(kmessage, kp);\n }\n@@ -13072,7 +13078,7 @@ static int kickstart_driver(void)\n \n   --------------------------------------------------------------------------*/\n static int fwpath_changed_handler(const char *kmessage,\n-                                  struct kernel_param *kp)\n+                                  KERNEL_PARAM *kp)\n {\n    int ret;\n \n-- \n2.20.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/qca9377-aml/patches/amlogic-4.9/qca9377-aml-002-sdio-enable-only-QCA9377-vendor-device-id.patch",
    "content": "From 2b4b3fccab7753a5d102c52c6261b099e25c1685 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 11 May 2021 07:40:40 +0200\nSubject: [PATCH 1/2] sdio: enable only QCA9377 vendor/device id\n\n---\n .../HIF/sdio/linux/native_sdio/src/hif.c      | 33 -------------------\n 1 file changed, 33 deletions(-)\n\ndiff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c\nindex 1c54002..5a23f80 100644\n--- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c\n+++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c\n@@ -158,35 +158,6 @@ A_UINT32 forcedriverstrength = 1; /* force driver strength to type D */\n \n /* ------ Static Variables ------ */\n static const struct sdio_device_id ar6k_id_table[] = {\n-#ifdef AR6002_HEADERS_DEF\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6002_BASE | 0x0))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6002_BASE | 0x1))  },\n-#endif\n-#ifdef AR6003_HEADERS_DEF\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6003_BASE | 0x0))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6003_BASE | 0x1))  },\n-#endif\n-#ifdef AR6004_HEADERS_DEF\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6004_BASE | 0x0))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6004_BASE | 0x1))  },\n-#endif\n-#ifdef AR6320_HEADERS_DEF\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0x0))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0x1))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0x2))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0x3))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0x4))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0x5))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0x6))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0x7))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0x8))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0x9))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0xA))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0xB))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0xC))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0xD))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0xE))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6320_BASE | 0xF))  },\n     {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9377_BASE | 0x0))  },\n     {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9377_BASE | 0x1))  },\n     {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9377_BASE | 0x2))  },\n@@ -203,10 +174,6 @@ static const struct sdio_device_id ar6k_id_table[] = {\n     {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9377_BASE | 0xD))  },\n     {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9377_BASE | 0xE))  },\n     {  SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9377_BASE | 0xF))  },\n-    /* TODO: just for compatible with old image which ManufacturerID is 0, should delete later */\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (0 | 0x0))  },\n-    {  SDIO_DEVICE(MANUFACTURER_CODE, (0 | 0x1))  },\n-#endif\n     { /* null */                                         },\n };\n MODULE_DEVICE_TABLE(sdio, ar6k_id_table);\n-- \n2.30.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/qca9377-aml/patches/amlogic-4.9/qca9377-aml-003-Add-Amlogic-CONFIG_BUILDROOT-for-firmware-path.patch",
    "content": "From 676c44bdd320fc4419efb5a1df0ba1277e1c453c Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Tue, 11 May 2021 07:54:08 +0200\nSubject: [PATCH] Add Amlogic CONFIG_BUILDROOT for firmware path\n\n---\n CORE/HDD/src/wlan_hdd_cfg.c  |  6 ++++--\n CORE/HDD/src/wlan_hdd_main.c | 15 +++++++++++++--\n CORE/SERVICES/BMI/ol_fw.c    |  8 +++++---\n Kbuild                       |  4 ++++\n 4 files changed, 26 insertions(+), 7 deletions(-)\n\ndiff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c\nindex 14524ef..2c9abd8 100644\n--- a/CORE/HDD/src/wlan_hdd_cfg.c\n+++ b/CORE/HDD/src/wlan_hdd_cfg.c\n@@ -60,6 +60,8 @@\n #include <pmcApi.h>\n #include <wlan_hdd_misc.h>\n\n+extern int qca_request_firmware(const struct firmware **firmware_p, const char *name,struct device *device);\n+\n static char *mac_param;\n module_param_named(mac, mac_param, charp, S_IRUGO);\n MODULE_PARM_DESC(mac, \"mac address override\");\n@@ -4411,7 +4413,7 @@ VOS_STATUS hdd_parse_config_ini(hdd_context_t* pHddCtx)\n\n    memset(cfgIniTable, 0, sizeof(cfgIniTable));\n\n-   status = request_firmware(&fw, WLAN_INI_FILE, pHddCtx->parent_dev);\n+   status = qca_request_firmware(&fw, WLAN_INI_FILE, pHddCtx->parent_dev);\n\n    if(status)\n    {\n@@ -5104,7 +5106,7 @@ VOS_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx)\n    }\n\n    memset(macTable, 0, sizeof(macTable));\n-   status = request_firmware(&fw, WLAN_MAC_FILE, pHddCtx->parent_dev);\n+   status = qca_request_firmware(&fw, WLAN_MAC_FILE, pHddCtx->parent_dev);\n\n    if (status)\n    {\ndiff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c\nindex 2afe68e..b0d2afd 100644\n--- a/CORE/HDD/src/wlan_hdd_main.c\n+++ b/CORE/HDD/src/wlan_hdd_main.c\n@@ -236,6 +236,17 @@ static VOS_STATUS hdd_parse_ese_beacon_req(tANI_U8 *pValue,\n  */\n #define NUM_OF_STA_DATA_TO_PRINT 16\n\n+int qca_request_firmware(const struct firmware **firmware_p,const char *name,struct device *device)\n+{\n+#ifdef CONFIG_BUILDROOT\n+    char final_name[512];\n+    sprintf(final_name,\"qca9377/%s\",name);\n+    return request_firmware(firmware_p, final_name, device);\n+#else\n+    return request_firmware(firmware_p, name, device);\n+#endif\n+}\n+\n /*\n  * Android DRIVER command structures\n  */\n@@ -7801,7 +7812,7 @@ VOS_STATUS hdd_get_cfg_file_size(v_VOID_t *pCtx, char *pFileName, v_SIZE_t *pBuf\n\n    ENTER();\n\n-   status = request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);\n+   status = qca_request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);\n\n    if(status || !pHddCtx->fw || !pHddCtx->fw->data) {\n       hddLog(VOS_TRACE_LEVEL_FATAL,\"%s: CFG download failed\",__func__);\n@@ -7842,7 +7853,7 @@ VOS_STATUS hdd_read_cfg_file(v_VOID_t *pCtx, char *pFileName,\n\n    ENTER();\n\n-   status = request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);\n+   status = qca_request_firmware(&pHddCtx->fw, pFileName, pHddCtx->parent_dev);\n\n    if(status || !pHddCtx->fw || !pHddCtx->fw->data) {\n       hddLog(VOS_TRACE_LEVEL_FATAL,\"%s: CFG download failed\",__func__);\ndiff --git a/CORE/SERVICES/BMI/ol_fw.c b/CORE/SERVICES/BMI/ol_fw.c\nindex 466dbbc..5bed9ed 100644\n--- a/CORE/SERVICES/BMI/ol_fw.c\n+++ b/CORE/SERVICES/BMI/ol_fw.c\n@@ -119,6 +119,8 @@ static int ol_get_fw_files_for_target(struct ol_fw_files *pfw_files,\n }\n #endif\n\n+extern int qca_request_firmware(const struct firmware **firmware_p, const char *name,struct device *device);\n+\n #ifdef HIF_USB\n static A_STATUS ol_usb_extra_initialization(struct ol_softc *scn);\n #endif\n@@ -164,7 +166,7 @@ static int ol_transfer_single_bin_file(struct ol_softc *scn,\n \t\t\t\t__func__));\n \t}\n\n-\tif (request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)\n+\tif (qca_request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)\n \t{\n \t\tAR_DEBUG_PRINTF(ATH_DEBUG_ERR,\n \t\t\t\t(\"%s: Failed to get %s\\n\",\n@@ -492,7 +494,7 @@ static int ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file,\n \t\tbreak;\n \t}\n\n-\tif (request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)\n+\tif (qca_request_firmware(&fw_entry, filename, scn->sc_osdev->device) != 0)\n \t{\n \t\tprintk(\"%s: Failed to get %s\\n\", __func__, filename);\n\n@@ -506,7 +508,7 @@ static int ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file,\n \t\t\tfilename = scn->fw_files.board_data;\n \t\t\tprintk(\"%s: Trying to load default %s\\n\",\n \t\t\t\t__func__, filename);\n-\t\t\tif (request_firmware(&fw_entry, filename,\n+\t\t\tif (qca_request_firmware(&fw_entry, filename,\n \t\t\t\tscn->sc_osdev->device) != 0) {\n \t\t\t\tprintk(\"%s: Failed to get %s\\n\",\n \t\t\t\t\t__func__, filename);\ndiff --git a/Kbuild b/Kbuild\nindex 0aee36f..13054e4 100644\n--- a/Kbuild\n+++ b/Kbuild\n@@ -6,6 +6,10 @@ else\n \tKERNEL_BUILD := 0\n endif\n\n+ifeq ($(CONFIG_BUILDROOT),y)\n+\tEXTRA_CFLAGS += -DCONFIG_BUILDROOT\n+endif\n+\n # This branch builds for SDIO devices by default\n ifeq ($(CONFIG_CLD_HL_SDIO_CORE),)\n         CONFIG_CLD_HL_SDIO_CORE := y\n--\n2.30.0\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/qca9377-aml/udev.d/99-qca9377-wireless.rules",
    "content": "ACTION==\"add|change\", SUBSYSTEM==\"net\", ENV{INTERFACE}==\"wlan*\", \\\n  ATTRS{vendor}==\"0x0271\", ATTRS{device}==\"0x070?\", \\\n  RUN+=\"/usr/bin/systemctl restart connman.service\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/ssv6xxx-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"ssv6xxx-aml\"\nPKG_VERSION=\"0dddfae91c07bd11274c443b6480a0a88234deed\"\nPKG_SHA256=\"59552fa1400c6c81d10d6fe75c70ea10358681c094aa77a3a130277ed58a5268\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/khadas/android_hardware_wifi_icomm_drivers_ssv6xxx/\"\nPKG_URL=\"https://github.com/khadas/android_hardware_wifi_icomm_drivers_ssv6xxx/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"ssv6xxx Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  if [ \"$TARGET_KERNEL_ARCH\" = \"arm64\" ]; then\n    PLATFORM=\"aml-s905\"\n  else\n    PLATFORM=\"aml-s805\"\n  fi\n\n  cd $PKG_BUILD/ssv6051\n    ./ver_info.pl include/ssv_version.h\n    cp Makefile.android Makefile\n    sed -i 's,PLATFORMS =,PLATFORMS = '\"$PLATFORM\"',g' Makefile\n    make module SSV_ARCH=\"$TARGET_KERNEL_ARCH\" \\\n      SSV_CROSS=\"$TARGET_KERNEL_PREFIX\" \\\n      SSV_KERNEL_PATH=\"$(kernel_path)\"\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ssv6051/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n\n  mkdir -p $INSTALL/$(get_full_firmware_dir)/ssv6051\n    cp -r $PKG_BUILD/ssv6051/image/* $INSTALL/$(get_full_firmware_dir)/ssv6051\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/ssv6xxx-aml/patches/ssv6xxx-aml-001-fix-build-and-firmware-path.patch",
    "content": "diff --git a/ssv6051/Makefile.android b/ssv6051/Makefile.android\nindex 43c268e..3f2fd8d 100755\n--- a/ssv6051/Makefile.android\n+++ b/ssv6051/Makefile.android\n@@ -1,8 +1,8 @@\n PLATFORMS =\n\n KBUILD_TOP := $(PWD)\n-include $(KBUILD_TOP)/platforms/$(PLATFORMS).cfg\n-include $(KBUILD_TOP)/platforms/platform-config.mak\n+include $(KBUILD_TOP)/ssv6051.cfg\n+include $(KBUILD_TOP)/platform-config.mak\n\n PWD := $(shell pwd)\n\n@@ -57,7 +57,7 @@ KERN_SRCS_S += crypto/sha1-armv4-large.S\n endif\n\n\n-KERN_SRCS += platforms/$(PLATFORMS)-generic-wlan.c\n+KERN_SRCS += ssv6051-generic-wlan.c\n\n $(KMODULE_NAME)-y += $(KERN_SRCS_S:.S=.o)\n $(KMODULE_NAME)-y += $(KERN_SRCS:.c=.o)\n@@ -67,7 +67,7 @@ obj-$(CONFIG_SSV6200_CORE) += $(KMODULE_NAME).o\n all:module strip\n\n module:\n-\tmake  -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \\\n+\t$(MAKE)  -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \\\n \tEXTRA_CFLAGS=\"$(EXTRA_CFLAGS)\" M=$(PWD) modules\n\n install:\n@@ -80,7 +80,7 @@ strip:\n \t#cp eagle.ko $(KO_NAME).ko\n \t#cp $(KO_NAME).ko $(DEFAULT_MODULES_DIR)\n \t#cp ssv6200.ko $(DEFAULT_MODULES_DIR)\n-\tcp platforms/$(PLATFORMS)-wifi.cfg image/$(KMODULE_NAME)-wifi.cfg\n+\t#cp platforms/$(PLATFORMS)-wifi.cfg image/$(KMODULE_NAME)-wifi.cfg\n \tcp $(KMODULE_NAME).ko image/$(KMODULE_NAME).ko\n \tcp platforms/cli image\n ifneq ($(SSV_STRIP),)\n@@ -90,6 +90,6 @@ ifneq ($(SSV_STRIP),)\n endif\n\n clean:\n-\tmake -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \\\n+\t$(MAKE) -C $(SSV_KERNEL_PATH) ARCH=$(SSV_ARCH) CROSS_COMPILE=$(SSV_CROSS) \\\n \tM=$(PWD) clean\n\ndiff --git a/ssv6051/hci/ssv_hci.c b/ssv6051/hci/ssv_hci.c\nindex f9c0a56..cafaffa 100755\n--- a/ssv6051/hci/ssv_hci.c\n+++ b/ssv6051/hci/ssv_hci.c\n@@ -21,7 +21,9 @@\n #include <linux/jiffies.h>\n #include <ssv6200.h>\n #include \"hctrl.h\"\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0))\n extern void sdio_clk_always_on(int on);\n+#endif\n MODULE_AUTHOR(\"iComm Semiconductor Co., Ltd\");\n MODULE_DESCRIPTION(\"HCI driver for SSV6xxx 802.11n wireless LAN cards.\");\n MODULE_SUPPORTED_DEVICE(\"SSV6xxx WLAN cards\");\n@@ -1112,7 +1114,9 @@ static int __init ssv6xxx_hci_init(void)\n #ifdef CONFIG_SSV6200_CLI_ENABLE\n     extern struct ssv6xxx_hci_ctrl *ssv_dbg_ctrl_hci;\n #endif\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0))\n     sdio_clk_always_on(1);\n+#endif\n     ctrl_hci = kzalloc(sizeof(*ctrl_hci), GFP_KERNEL);\n     if (ctrl_hci == NULL)\n         return -ENOMEM;\n@@ -1141,7 +1145,9 @@ static void __exit ssv6xxx_hci_exit(void)\n #ifdef CONFIG_SSV6200_CLI_ENABLE\n     ssv_dbg_ctrl_hci = NULL;\n #endif\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0))\n     sdio_clk_always_on(0);\n+#endif\n }\n #if (defined(CONFIG_SSV_SUPPORT_ANDROID)||defined(CONFIG_SSV_BUILD_AS_ONE_KO))\n EXPORT_SYMBOL(ssv6xxx_hci_init);\ndiff --git a/ssv6051/image/ssv6051-wifi.cfg b/ssv6051/image/ssv6051-wifi.cfg\nindex 46429fc..bc909c9 100755\n--- a/ssv6051/image/ssv6051-wifi.cfg\n+++ b/ssv6051/image/ssv6051-wifi.cfg\n@@ -9,7 +9,7 @@\n # Priority.2 firmware_path\n # Priority.3 default firmware\n ##################################################\n-firmware_path = /vendor/etc/wifi/ssv6051/\n+firmware_path = /usr/lib/firmware/ssv6051/\n #flash_bin_path = /tmp/flash.bin\n\n ############################################################\n@@ -68,7 +68,7 @@ hw_cap_security = on\n hw_cap_sgi_20 = on\n hw_cap_sgi_40 = off\n hw_cap_ap = on\n-hw_cap_p2p = on\n+hw_cap_p2p = off\n hw_cap_ampdu_rx = on\n hw_cap_ampdu_tx = on\n use_wpa2_only = 1\ndiff --git a/ssv6051/platform-config.mak b/ssv6051/platform-config.mak\nindex 5c37b23..8b74de6 100755\n--- a/ssv6051/platform-config.mak\n+++ b/ssv6051/platform-config.mak\n@@ -5,7 +5,7 @@ CONFIG_SSV6200_CORE=m\n ###########################################################################\n # Compiler options                                                        #\n ###########################################################################\n-ccflags-y += -Werror\n+# ccflags-y += -Werror\n\n # Enable -g to help debug. Deassembly from .o to .S would help to track to\n # the problomatic line from call stack dump.\ndiff --git a/ssv6051/ssv6051.cfg b/ssv6051/ssv6051.cfg\nindex 12f46ef..93ff793 100755\n--- a/ssv6051/ssv6051.cfg\n+++ b/ssv6051/ssv6051.cfg\n@@ -22,6 +22,6 @@ ccflags-y += -DCONFIG_MMC_DISALLOW_STACK\n #SSV_KERNEL_PATH = $(ANDROID_BUILD_TOP)/out/target/product/m201/obj/KERNEL_OBJ/\n #SSV_CROSS = $(ANDROID_BUILD_TOP)/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-\n #SSV_KERNEL_PATH = $(ANDROID_BUILD_TOP)/hardware/wifi/icomm/drivers/ssv6xxx/\n-SSV_ARCH = arm64\n+#SSV_ARCH = arm64\n #KMODDESTDIR = $(MODDESTDIR)\n\ndiff --git a/ssv6051/ssvdevice/ssvdevice.c b/ssv6051/ssvdevice/ssvdevice.c\nindex 4d9257f..cd53d9f 100755\n--- a/ssv6051/ssvdevice/ssvdevice.c\n+++ b/ssv6051/ssvdevice/ssvdevice.c\n@@ -36,7 +36,7 @@\n MODULE_AUTHOR(\"iComm Semiconductor Co., Ltd\");\n MODULE_DESCRIPTION(\"Shared library for SSV wireless LAN cards.\");\n MODULE_LICENSE(\"Dual BSD/GPL\");\n-static char *stacfgpath = NULL;\n+static char *stacfgpath = \"/usr/lib/firmware/ssv6051/ssv6051-wifi.cfg\";\n EXPORT_SYMBOL(stacfgpath);\n module_param(stacfgpath, charp, 0000);\n MODULE_PARM_DESC(stacfgpath, \"Get path of sta cfg\");\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/ssv6xxx-aml/patches/ssv6xxx-aml-002-fix-driver-after-update.patch",
    "content": "From 2cee7f60a8fc7b70738f7ac090b6861354206718 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Sun, 18 Apr 2021 20:36:04 +0200\nSubject: [PATCH 1/2] ssv6051: fix driver after update\n\n---\n ssv6051/hwif/sdio/sdio.c       | 2 --\n ssv6051/ssv6051-generic-wlan.c | 4 ++--\n ssv6051/ssvdevice/ssvdevice.c  | 2 +-\n 3 files changed, 3 insertions(+), 5 deletions(-)\n\ndiff --git a/ssv6051/hwif/sdio/sdio.c b/ssv6051/hwif/sdio/sdio.c\nindex 65f5dd1..14736b7 100755\n--- a/ssv6051/hwif/sdio/sdio.c\n+++ b/ssv6051/hwif/sdio/sdio.c\n@@ -94,9 +94,7 @@ static const struct sdio_device_id ssv6xxx_sdio_devices[] __devinitconst =\n static const struct sdio_device_id ssv6xxx_sdio_devices[] =\n #endif\n {\n-#if 0\n     { SDIO_DEVICE(SSV_VENDOR_ID, SSV_CABRIO_DEVID) },\n-#endif\n     {}\n };\n MODULE_DEVICE_TABLE(sdio, ssv6xxx_sdio_devices);\ndiff --git a/ssv6051/ssv6051-generic-wlan.c b/ssv6051/ssv6051-generic-wlan.c\nindex 1c679a7..12d7180 100755\n--- a/ssv6051/ssv6051-generic-wlan.c\n+++ b/ssv6051/ssv6051-generic-wlan.c\n@@ -113,7 +113,7 @@ void exitWlan(void)\n  }\n  return;\n }\n-static __init int generic_wifi_init_module(void)\n+static int generic_wifi_init_module(void)\n {\n  int ret, time = 5;\n  printk(\"%s\\n\", __func__);\n@@ -142,7 +142,7 @@ out:\n  printk(\"generic_wifi_init finished\\n\");\n  return ret;\n }\n-static __exit void generic_wifi_exit_module(void)\n+static void generic_wifi_exit_module(void)\n {\n  printk(\"%s\\n\", __func__);\n #ifdef CONFIG_SSV_SUPPORT_AES_ASM\ndiff --git a/ssv6051/ssvdevice/ssvdevice.c b/ssv6051/ssvdevice/ssvdevice.c\nindex cd53d9f..a520d4e 100755\n--- a/ssv6051/ssvdevice/ssvdevice.c\n+++ b/ssv6051/ssvdevice/ssvdevice.c\n@@ -280,7 +280,7 @@ static void __exit ssvdevice_exit(void)\n  remove_proc_entry(DEBUG_DIR_ENTRY, NULL);\n     kfree(ssv6xxx_cmd_buf);\n }\n-#if 0// (defined(CONFIG_SSV_SUPPORT_ANDROID)||defined(CONFIG_SSV_BUILD_AS_ONE_KO))\n+#if (defined(CONFIG_SSV_SUPPORT_ANDROID)||defined(CONFIG_SSV_BUILD_AS_ONE_KO))\n EXPORT_SYMBOL(ssvdevice_init);\n EXPORT_SYMBOL(ssvdevice_exit);\n #else\n-- \n2.31.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/ssv6xxx-aml/patches/ssv6xxx-aml-003-force-SSV6051P-when-SSV6030P-is-detected.patch",
    "content": "From 0b733e6fbfdd31b0a48c8cb1eba787eba65874aa Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Sun, 18 Apr 2021 20:36:33 +0200\nSubject: [PATCH 3/3] ssv6051: force SSV6051P when SSV6030P is detected Instead\n using force_chip_identity in cfg file force the id directly in driver source.\n\n---\n ssv6051/smac/init.c | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/ssv6051/smac/init.c b/ssv6051/smac/init.c\nindex fc8006c..ac84cd0 100755\n--- a/ssv6051/smac/init.c\n+++ b/ssv6051/smac/init.c\n@@ -1124,6 +1124,9 @@ static int ssv6xxx_init_hw(struct ssv_hw *sh)\n     sh->ampdu_divider = SSV6XXX_AMPDU_DIVIDER;\n     memset(sh->page_count, 0, sizeof(sh->page_count));\n #ifdef CONFIG_SSV_CABRIO_E\n+    if (sh->cfg.chip_identity == SSV6030P)\n+      sh->cfg.force_chip_identity = SSV6051P;\n+\n     if (sh->cfg.force_chip_identity)\n     {\n         printk(\"Force use external RF setting [%08x]\\n\",sh->cfg.force_chip_identity);\n-- \n2.31.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/uwe5631-aml/firmware/wifi_56630001_3ant.ini",
    "content": "[Section 1: Version]\nMajor = 2\nMinor = 2\n\n[Section 2: Board Config]\nCalib_Bypass = 3566\nTxChain_Mask = 3\nRxChain_Mask = 3\n\n[Section 3: Board Config TPC]\nDPD_LUT_idx = 0x33,0x33,0x00,0x11,0x22,0x33,0x33,0x33\nTPC_Goal_Chain0 = 180,177,174,178,180,177,174,178\nTPC_Goal_Chain1 = 190,191,188,175,190,191,188,175\n\n[Section 4: TPC-LUT]\nChain0_LUT_0 = 6,0,40,0\nChain0_LUT_1 = 6,1,24,0\nChain0_LUT_2 = 6,2,8,0\nChain0_LUT_3 = 10,2,0,0\nChain0_LUT_4 = 14,2,0,0\nChain0_LUT_5 = 18,2,0,0\nChain0_LUT_6 = 22,2,0,0\nChain0_LUT_7 = 26,2,0,0\nChain1_LUT_0 = 6,0,40,0\nChain1_LUT_1 = 6,1,24,0\nChain1_LUT_2 = 6,2,8,0\nChain1_LUT_3 = 10,2,0,0\nChain1_LUT_4 = 14,2,0,0\nChain1_LUT_5 = 18,2,0,0\nChain1_LUT_6 = 22,2,0,0\nChain1_LUT_7 = 26,2,0,0\n\n[Section 5: Board Config Frequency Compensation]\n2G_Channel_Chain0 = 6,6,6,6,8,8,8,8,9,9,9,9,9,9\n2G_Channel_Chain1 = 5,5,5,5,8,8,8,8,9,9,9,9,9,9\n5G_Channel_Chain0 = 5,5,5,5,5,5,5,5,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,7\n5G_Channel_Chain1 = 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,4,4,4,4,4\n\n[Section 6: Rate To Power with BW 20M]\n11b_Power = 0,0,0,0\n11ag_Power = 8,0,16,28,42,32,44,68\n11n_Power = 12,14,14,18,18,28,28,28,42,42,42,46,46,68,68,68,60\n11ac_Power = 44,46,46,50,50,58,58,58,80,80,46,46,46,50,50,58,58,58,80,80\n\n[Section 7: Power Backoff]\nGreen_WIFI_offset = 0\nHT40_Power_offset = 0\nVHT40_Power_offset = 0\nVHT80_Power_offset = 0\nSAR_Power_offset = 0\nMean_Power_offset = 38\nTPC_mode = 3\n\n[Section 8: Reg Domain]\nreg_domain1 = 0x00000001\nreg_domain2 = 0x00000002\n\n[Section 9: Band Edge Power offset (MKK, FCC, ETSI)]\nBW20M = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\nBW40M = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\nBW80M = 0,0,0,0,0,0\n\n[Section 10: TX Scale]\nChain0_1 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16\nChain1_1 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16\nChain0_2 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17\nChain1_2 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17\nChain0_3 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18\nChain1_3 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18\nChain0_4 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,19\nChain1_4 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,19\nChain0_5 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20\nChain1_5 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20\nChain0_6 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,21\nChain1_6 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,21\nChain0_7 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,22\nChain1_7 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,22\nChain0_8 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,23\nChain1_8 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,23\nChain0_9 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,24\nChain1_9 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,24\nChain0_10 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,25\nChain1_10 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,25\nChain0_11 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,26\nChain1_11 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,26\nChain0_12 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,27\nChain1_12 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,27\nChain0_13 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,28\nChain1_13 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,28\nChain0_14 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,29\nChain1_14 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,29\nChain0_36 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,30\nChain1_36 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,30\nChain0_40 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,31\nChain1_40 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,31\nChain0_44 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,32\nChain1_44 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,32\nChain0_48 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,33\nChain1_48 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,33\nChain0_52 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,34\nChain1_52 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,34\nChain0_56 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,35\nChain1_56 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,35\nChain0_60 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,36\nChain1_60 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,36\nChain0_64 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,37\nChain1_64 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,37\nChain0_100 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,38\nChain1_100 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,38\nChain0_104 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,39\nChain1_104 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,39\nChain0_108 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,40\nChain1_108 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,40\nChain0_112 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,41\nChain1_112 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,41\nChain0_116 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,42\nChain1_116 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,42\nChain0_120 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,43\nChain1_120 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,43\nChain0_124 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,44\nChain1_124 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,44\nChain0_128 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,45\nChain1_128 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,45\nChain0_132 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,46\nChain1_132 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,46\nChain0_136 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,47\nChain1_136 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,47\nChain0_140 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,48\nChain1_140 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,48\nChain0_144 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,49\nChain1_144 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,49\nChain0_149 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,50\nChain1_149 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,50\nChain0_153 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,51\nChain1_153 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,51\nChain0_157 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,52\nChain1_157 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,52\nChain0_161 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,53\nChain1_161 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,53\nChain0_165 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,54\nChain1_165 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,54\n\n[Section 11: misc]\nDFS_switch = 1\npower_save_switch = 2\nex-Fem_and_ex-LNA_param_setup = 3\nrssi_report_diff = 4\n\n[Section 12: debug reg]\naddress = 0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0x10,0x11,0x12,0x13,0x14,0x15,0x16\nvalue = 0x1,0x19,0x2,0x19,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x30,0x31\n\n[Section 13: coex_config]\nbt_performance_cfg0 = 0x01010101\nbt_performance_cfg1 = 0x01000000\nwifi_performance_cfg0 = 0x01050A01\nwifi_performance_cfg2 = 0x00000000\nstrategy_cfg0 = 0x01010100\nstrategy_cfg1 = 0x03000000\nstrategy_cfg2 = 0x08020000\ncompatibility_cfg0 = 0x04040000\ncompatibility_cfg1 = 0x0\nant_cfg0 = 0x7\nant_cfg1 = 0x0\nisolation_cfg0 = 0x0\nisolation_cfg1 = 0x0\nreserved_cfg0 = 0x0\nreserved_cfg1 = 0x0\nreserved_cfg2 = 0x0\nreserved_cfg3 = 0x0\nreserved_cfg4 = 0x0\nreserved_cfg5 = 0x0\nreserved_cfg6 = 0x0\nreserved_cfg7 = 0x0\n\n[Section 14: rf_tlv_config]\nrf_config = 0xAA,0x55,0x00,0xFF,0xB,0xB,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x9,0x4,0x0,0xB5\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/uwe5631-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"uwe5631-aml\"\nPKG_VERSION=\"c9621e32c743ed37bdb54a60f8aa8b329b4bb56f\"\nPKG_SHA256=\"19764d9bf428fa480708a767c6bfc9ab755d2559f58e17fed0c3659aa8608b74\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/uwe5631-aml\"\nPKG_URL=\"https://github.com/CoreELEC/uwe5631-aml/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"uwe5631-aml: Unisoc UWE5621 WIFI/BT driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  echo \"making WIFI\"\n  kernel_make -C ${PKG_BUILD} \\\n    M=${PKG_BUILD} \\\n    KERNEL_SRC=$(kernel_path) \\\n    EXTRA_CFLAGS=\"-fno-pic -Wno-sizeof-pointer-memaccess -Wno-declaration-after-statement -I${PKG_BUILD}/BSP/include -DCUSTOMIZE_WIFI_CFG_PATH=\\\\\\\"/lib/firmware/unisoc\\\\\\\"\" \\\n    modules\n\n  echo \"making BT\"\n  kernel_make -C ${PKG_BUILD}/BT/tty-sdio \\\n    M=${PKG_BUILD}/BT/tty-sdio \\\n    KERNEL_SRC=$(kernel_path) \\\n    CURFOLDER=${PKG_BUILD}/BSP \\\n    modules\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n\n  find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' \\\n    -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \\;\n\n  mkdir -p ${INSTALL}/$(get_kernel_overlay_dir)/lib/firmware/unisoc\n\n  cp -av ${PKG_DIR}/firmware/*.ini \\\n         ${PKG_BUILD}/BT/libbt/conf/sprd/runtime/*.ini \\\n         ${PKG_BUILD}/BSP/fw/wcnmodem.bin \\\n    ${INSTALL}/$(get_kernel_overlay_dir)/lib/firmware/unisoc\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/uwe5631-aml/system.d/sprd_sdio-firmware-aml.service",
    "content": "[Unit]\nDescription=Attach /dev/ttyBT0 to BlueZ stack using sprd type\nConditionPathExists=|!/sys/class/mmc_host/sdio/sdio:8800\nConditionPathExists=|!/sys/class/mmc_host/mmc2/mmc2:8800\nWants=bluetooth.service\nBefore=bluetooth.service\nAfter=dev-ttyBT0.device\n\n[Service]\nType=forking\nExecStartPre=/usr/sbin/rfkill unblock bluetooth\nExecStart=/usr/bin/hciattach -s 1500000 /dev/ttyBT0 sprd\nExecStopPost=/usr/sbin/rfkill block bluetooth\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/uwe5631-aml/udev.d/80-unisoc_sdio.rules",
    "content": "### UniSOC UWE5631 and UWE5621 kernel modules\nACTION==\"add\", ENV{SUBSYSTEM}==\"sdio\", ENV{OF_NAME}==\"wifi\", ENV{OF_COMPATIBLE_0}==\"sprd,unisoc-wifi\", \\\n  ATTRS{vendor}==\"0x0000\", ATTRS{device}==\"0x0000\", \\\n  RUN{builtin}+=\"kmod load sprdwl_ng sprdbt_tty hci_uart\", \\\n  TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"sprd_sdio-firmware-aml.service\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/w1-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"w1-aml\"\nPKG_VERSION=\"87d7603a6ec06688a3bb6bc68d9daad300e32de3\"\nPKG_SHA256=\"a3f1aad71b82b3bf08ee4936dced1844bcb57fe0a814811754aa99981c44b3c6\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/w1-aml\"\nPKG_URL=\"https://github.com/CoreELEC/w1-aml/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"Amlogic W150S1 Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\nif [ \"${TARGET_ARCH}\" = \"arm\" ]; then\n  kernel_make -C $(kernel_path) M=${PKG_BUILD}/project_w1/vmac\nelse\n  kernel_make -C $(kernel_path) M=${PKG_BUILD}/project_w1/vmac \\\n    subdir-ccflags-y=\"-mno-outline-atomics\"\nfi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n    find ${PKG_BUILD}/project_w1/vmac/ -name \\*.ko -not -path '*/\\.*' -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \\;\n\n  mkdir -p ${INSTALL}/$(get_full_firmware_dir)/w1\n    cp ${PKG_BUILD}/project_w1/vmac/aml_wifi*.txt ${INSTALL}/$(get_full_firmware_dir)/w1\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/w1-aml/udev.d/80-aml_sdio.rules",
    "content": "### Amlogic W150S1\n### this driver is split in two individual kernel modules\nENV{MODALIAS}==\"?*\", ENV{SUBSYSTEM}==\"sdio\", ENV{SDIO_ID}==\"8888:8888\", GOTO=\"load_module\"\nGOTO=\"end\"\n\nLABEL=\"load_module\"\nENV{MODALIAS}==\"?*\", ENV{SUBSYSTEM}==\"sdio\", RUN{builtin}+=\"kmod load aml_sdio\", RUN{builtin}+=\"kmod load vlsicomm\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/wifi_dummy-aml/modules-load.d/wifi_dummy.conf",
    "content": "wifi_dummy\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/wifi_dummy-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"wifi_dummy-aml\"\nPKG_VERSION=\"1.0\"\nPKG_SHA256=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"$PKG_NAME: Linux driver\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  kernel_make -C $(kernel_path) M=$PKG_BUILD\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/wifi_dummy-aml/sources/Makefile",
    "content": "obj-m += wifi_dummy.o\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/amlogic/wifi_dummy-aml/sources/wifi_dummy.c",
    "content": "#include <linux/delay.h>\n#include <linux/module.h>\n#include <linux/kernel.h>\n#include <linux/init.h>\n\nMODULE_LICENSE(\"GPL\");\nMODULE_AUTHOR(\"kszaq\");\nMODULE_DESCRIPTION(\"Amlogic WiFi power on and SDIO rescan module\");\n\nextern void extern_wifi_set_enable(int);\nextern void sdio_reinit(void);\n\nstatic int __init wifi_dummy_init(void)\n{\n\tprintk(KERN_INFO \"Triggered SDIO WiFi power on and bus rescan.\\n\");\n\textern_wifi_set_enable(0);\n\tmsleep(300);\n\textern_wifi_set_enable(1);\n\tmsleep(300);\n\tsdio_reinit();\n\treturn 0;\n}\n\nstatic void __exit wifi_dummy_cleanup(void)\n{\n    printk(KERN_INFO \"Cleaning up module.\\n\");\n}\n\nmodule_init(wifi_dummy_init);\nmodule_exit(wifi_dummy_cleanup);\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/gpu-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"gpu-aml\"\nPKG_VERSION=\"be29f1f274e3798d3ab2d7c489e47f8de20e8cf3\"\nPKG_SHA256=\"06ad5ca2ae39b032477e702169f2ad8b964b36a49d97c3055094943b12a7fa0c\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"https://github.com/khadas/android_hardware_arm_gpu/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"gpu-aml: Linux drivers for Mali GPUs found in Amlogic Meson SoCs\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_configure_target() {\n  sed -e \"s|shell date|shell date -R|g\" -i $PKG_BUILD/utgard/*/Kbuild\n  sed -e \"s|USING_GPU_UTILIZATION=1|USING_GPU_UTILIZATION=0|g\" -i $PKG_BUILD/utgard/platform/Kbuild.amlogic\n}\n\npre_make_target() {\n  ln -s $PKG_BUILD/utgard/platform $PKG_BUILD/utgard/r7p0/platform\n}\n\nmake_target() {\n  kernel_make -C $(kernel_path) M=$PKG_BUILD/bifrost/r12p0/kernel/drivers/gpu/arm \\\n    CONFIG_MALI_MIDGARD=m CONFIG_MALI_PLATFORM_NAME=\"devicetree\"\n\n  kernel_make -C $(kernel_path) M=$PKG_BUILD/utgard/r7p0 \\\n    EXTRA_CFLAGS=\"-DCONFIG_MALI450=y\" \\\n    CONFIG_MALI400=m CONFIG_MALI450=y\n}\n\nmakeinstall_target() {\n  kernel_make -C $(kernel_path) M=$PKG_BUILD/bifrost/r12p0/kernel/drivers/gpu/arm \\\n    INSTALL_MOD_PATH=$INSTALL/$(get_kernel_overlay_dir) INSTALL_MOD_STRIP=1 DEPMOD=: \\\n  modules_install\n  \n  kernel_make -C $(kernel_path) M=$PKG_BUILD/utgard/r7p0 \\\n    INSTALL_MOD_PATH=$INSTALL/$(get_kernel_overlay_dir) INSTALL_MOD_STRIP=1 DEPMOD=: \\\n  modules_install\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/gpu-aml/patches/gpu-aml-ng-01-fix-cp-error.patch",
    "content": "diff -Naur gpu-aml-fe7a4d8.orig/utgard/r5p1/common/mali_group.c gpu-aml-fe7a4d8/utgard/r5p1/common/mali_group.c\n--- gpu-aml-fe7a4d8.orig/utgard/r5p1/common/mali_group.c\t2017-12-08 12:39:53.000000000 +0100\n+++ gpu-aml-fe7a4d8/utgard/r5p1/common/mali_group.c\t2019-03-20 12:43:29.654721108 +0100\n@@ -639,7 +639,7 @@\n                 mali_pp_job_get_pid(job), mali_pp_job_get_tid(job), 0, 0, 0);\n #if defined(CONFIG_GPU_TRACEPOINTS) && defined(CONFIG_TRACEPOINTS)\n         trace_gpu_sched_switch(\n-                mali_pp_core_description(group->pp_core),\n+                mali_pp_core_description(child->pp_core),\n                 sched_clock(), mali_pp_job_get_tid(job),\n                 0, mali_pp_job_get_id(job));\n #endif\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/gpu-aml/patches/gpu-aml-ng-02-disable-tracepoints.patch",
    "content": "From ec748a4e13a77f0cc1f7c0c80114fa167a363a9c Mon Sep 17 00:00:00 2001\nFrom: cdu13a <cdu13a@gmail.com>\nDate: Mon, 26 Aug 2019 01:14:34 -0400\nSubject: more fixups for 4.9\n\n---\n utgard/r5p1/common/mali_group.c     | 4 ++++\n utgard/r5p1/common/mali_scheduler.c | 4 ++++\n utgard/r7p0/common/mali_group.c     | 4 ++++\n utgard/r7p0/common/mali_scheduler.c | 4 ++++\n 4 files changed, 16 insertions(+)\n\ndiff --git a/utgard/r5p1/common/mali_group.c b/utgard/r5p1/common/mali_group.c\nindex e174cdb..04b3e1e 100755\n--- a/utgard/r5p1/common/mali_group.c\n+++ b/utgard/r5p1/common/mali_group.c\n@@ -29,6 +29,10 @@\n #include \"mali_executor.h\"\n #include <mali_platform.h>\n \n+#ifdef CONFIG_GPU_TRACEPOINTS\n+#undef CONFIG_GPU_TRACEPOINTS\n+#endif\n+\n #if defined(CONFIG_GPU_TRACEPOINTS) && defined(CONFIG_TRACEPOINTS)\n #include <linux/sched.h>\n #include <trace/events/gpu.h>\ndiff --git a/utgard/r5p1/common/mali_scheduler.c b/utgard/r5p1/common/mali_scheduler.c\nindex b07f78a..8523c65 100755\n--- a/utgard/r5p1/common/mali_scheduler.c\n+++ b/utgard/r5p1/common/mali_scheduler.c\n@@ -23,6 +23,10 @@\n #include \"mali_memory_dma_buf.h\"\n #endif\n \n+#ifdef CONFIG_GPU_TRACEPOINTS\n+#undef CONFIG_GPU_TRACEPOINTS\n+#endif\n+\n #if defined(CONFIG_GPU_TRACEPOINTS) && defined(CONFIG_TRACEPOINTS)\n #include <linux/sched.h>\n #include <trace/events/gpu.h>\ndiff --git a/utgard/r7p0/common/mali_group.c b/utgard/r7p0/common/mali_group.c\nindex 26cbce4..bb9b21b 100644\n--- a/utgard/r7p0/common/mali_group.c\n+++ b/utgard/r7p0/common/mali_group.c\n@@ -30,6 +30,10 @@\n #include \"mali_executor.h\"\n #include <mali_platform.h>\n \n+#ifdef CONFIG_GPU_TRACEPOINTS\n+#undef CONFIG_GPU_TRACEPOINTS\n+#endif\n+\n #if defined(CONFIG_GPU_TRACEPOINTS) && defined(CONFIG_TRACEPOINTS)\n #include <linux/sched.h>\n #include <trace/events/gpu.h>\ndiff --git a/utgard/r7p0/common/mali_scheduler.c b/utgard/r7p0/common/mali_scheduler.c\nindex 68afc59..b513431 100644\n--- a/utgard/r7p0/common/mali_scheduler.c\n+++ b/utgard/r7p0/common/mali_scheduler.c\n@@ -30,6 +30,10 @@\n #endif\n #endif\n \n+#ifdef CONFIG_GPU_TRACEPOINTS\n+#undef CONFIG_GPU_TRACEPOINTS\n+#endif\n+\n #if defined(CONFIG_GPU_TRACEPOINTS) && defined(CONFIG_TRACEPOINTS)\n #include <linux/sched.h>\n #include <trace/events/gpu.h>\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/openvfd-driver/openvfd.conf.d/hc4.conf",
    "content": "vfd_gpio_clk='0,0,0xFF'\nvfd_gpio_dat='0,0,0xFF'\nvfd_gpio_stb='0,0,0xFF'\nvfd_gpio_protocol='1,2'\nvfd_chars='0,1,2,3,4'\nvfd_dot_bits='0,1,2,3,4,5,6'\nvfd_display_type='0x3F,0x3C,0x20,0xFD'\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/openvfd-driver/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Arthur Liberman (arthur_liberman@hotmail.com)\n\nPKG_NAME=\"openvfd-driver\"\nPKG_VERSION=\"3118dda3aeb5b2f02b0ac0b5d30cbef58947a805\"\nPKG_SHA256=\"fd0f38d059536e30000d3e2de3802ee97f8eeb7aac74143f0e588f803921a5ad\"\nPKG_LICENSE=\"GPLv3\"\nPKG_SITE=\"https://github.com/arthur-liberman/linux_openvfd\"\nPKG_URL=\"https://github.com/arthur-liberman/linux_openvfd/archive/$PKG_VERSION.tar.gz\"\nPKG_SOURCE_DIR=\"linux_openvfd-$PKG_VERSION*\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_LONGDESC=\"openvfd-driver: an open source Linux driver for VFD displays\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n  make ARCH=$TARGET_KERNEL_ARCH \\\n       CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n       -C \"$(kernel_path)\" M=\"$PKG_BUILD/driver\"\n\n  make OpenVFDService\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    find $PKG_BUILD/ -name \\*.ko -not -path '*/\\.*' -exec cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME \\;\n\n  mkdir -p $INSTALL/usr/sbin\n    cp -P OpenVFDService $INSTALL/usr/sbin\n\n  mkdir -p $INSTALL/usr/lib/coreelec\n    cp $PKG_DIR/scripts/* $INSTALL/usr/lib/coreelec/\n\n  mkdir -p $INSTALL/etc/openvfd.conf.d/\n    cp $PKG_DIR/openvfd.conf.d/* $INSTALL/etc/openvfd.conf.d/\n}\n\npost_install() {\n  enable_service openvfd.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/openvfd-driver/scripts/openvfd-start",
    "content": "#!/bin/sh\n\nOSRELEASEFILE=\"/etc/os-release\"\nUSRCONFFILE=\"/storage/.config/vfd.conf\"\nSYSCONFDIR=\"/etc/openvfd.conf.d\"\nPROC_DT=\"/proc/device-tree\"\nDT_ID=$(dtname)\n\ncase $DT_ID in\n  *odroid_hc4*)\n    SYSCONFFILE=\"$SYSCONFDIR/hc4.conf\"\n    ;;\nesac\n\nif [ \"$(tr -d '\\0' < $PROC_DT/openvfd/compatible)\" = \"open,vfd\" ]; then\n  if [ -f \"$USRCONFFILE\" ]; then\n    source \"$USRCONFFILE\"\n  elif [ -f \"$SYSCONFFILE\" ]; then\n    source \"$SYSCONFFILE\"\n  else\n    exit 0\n  fi\n  OS_SPLASH_OPT=\"\"\n  if [ -f \"$OSRELEASEFILE\" ]; then\n    source \"$OSRELEASEFILE\"\n    OS_SPLASH_OPT=\"-s CE${VERSION_ID%%.*}\"\n  fi\n  /sbin/modprobe openvfd vfd_gpio_clk=${vfd_gpio_clk} \\\n                         vfd_gpio_dat=${vfd_gpio_dat} \\\n                         vfd_gpio_stb=${vfd_gpio_stb:-0,0,0xFF} \\\n                         vfd_gpio0=${vfd_gpio0:-0,0,0xFF} \\\n                         vfd_gpio1=${vfd_gpio1:-0,0,0xFF} \\\n                         vfd_gpio2=${vfd_gpio2:-0,0,0xFF} \\\n                         vfd_gpio3=${vfd_gpio3:-0,0,0xFF} \\\n                         vfd_gpio_protocol=${vfd_gpio_protocol:-0,0} \\\n                         vfd_chars=${vfd_chars} vfd_dot_bits=${vfd_dot_bits} \\\n                         vfd_display_type=${vfd_display_type}\n  /usr/sbin/OpenVFDService $OS_SPLASH_OPT ${clock_12h_format:+-12h}\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/openvfd-driver/system.d/openvfd.service",
    "content": "[Unit]\nDescription=OpenVFD Service\nConditionPathExists=/proc/device-tree/openvfd/\nAfter=local-fs.target\n\n[Service]\nExecStart=/usr/lib/coreelec/openvfd-start\nExecStop=/bin/kill -TERM $MAINPID\nExecStopPost=-/usr/sbin/rmmod openvfd\nRemainAfterExit=yes\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-drivers/smartchip/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"smartchip\"\nPKG_VERSION=\"5d41ac040ecd2072498da88100305c1b444c12c7\"\nPKG_SHA256=\"89fde1c8d4850f72e821f044ff7050e4a0093b94a207b6478d31a5eaae40fddc\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/smartchip\"\nPKG_URL=\"https://github.com/CoreELEC/smartchip/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS}\"\nPKG_LONGDESC=\"SmartChip Integrated Circuits\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  for module in s9083 s9188 richv300; do\n    echo\n    echo \"making ${module}...\"\n    kernel_make -C ${PKG_BUILD}/trunk_driver \\\n      KSRC=$(kernel_path) \\\n      CONFIG_DRIVER_VER=\"${PKG_VERSION}\" \\\n      CONFIG_DBG_COLOR=n \\\n      CONFIG_HIF_PORT=sdio \\\n      CONFIG_CHIP=${module} \\\n      HOST_PLAT=amlogic905W2\n\n    mv ${PKG_BUILD}/trunk_driver/*.ko ${PKG_BUILD}\n\n    kernel_make -C ${PKG_BUILD}/trunk_driver \\\n      KSRC=$(kernel_path) \\\n      clean\n  done\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}\n    find ${PKG_BUILD}/ -name \\*.ko -not -path '*/\\.*' -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \\;\n\n  mkdir -p ${INSTALL}/$(get_full_firmware_dir)/smartchip\n    cp -r ${PKG_BUILD}/trunk_driver/fw/*.bin ${INSTALL}/$(get_full_firmware_dir)\n    cp -r ${PKG_BUILD}/trunk_driver/wifi.cfg ${INSTALL}/$(get_full_firmware_dir)/smartchip\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-firmware/amlogic/bl301_091020/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Team CoreELEC (https://coreelec.org)\n\n. $(get_pkg_directory bl301_xxxxxx)/package.mk\n\nBL2_MIN_VERSION=\"091020\"\nPKG_NAME=\"bl301_${BL2_MIN_VERSION}\"\nPKG_VERSION=\"fa9eb8911b119f0d09001faff3155746ea3aee7d\"\nPKG_SHA256=\"24304ad9d8ce6ab619d00043b454921b1bb0f2b4151832f2af8414cba05ad654\"\nPKG_URL=\"https://github.com/CoreELEC/bl301/archive/$PKG_VERSION.tar.gz\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-firmware/amlogic/bl301_221119/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Team CoreELEC (https://coreelec.org)\n\n. $(get_pkg_directory bl301_xxxxxx)/package.mk\n\nBL2_MIN_VERSION=\"221119\"\nPKG_NAME=\"bl301_${BL2_MIN_VERSION}\"\nPKG_VERSION=\"9565b2197eb9f829d1e4bffb6614f2318fd17544\"\nPKG_SHA256=\"14c80afb31685061b0cbf0006a96f266faa8dd9ca97b1083cf89ad3bd73adf66\"\nPKG_URL=\"https://github.com/CoreELEC/bl301/archive/$PKG_VERSION.tar.gz\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-firmware/amlogic/bl301_xxxxxx/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nBL2_MIN_VERSION=\"xxxxxx\"\nPKG_NAME=\"bl301_${BL2_MIN_VERSION}\"\nPKG_VERSION=\"4a953954c3324afdbb1263d6a1389175692580d5\"\nPKG_SHA256=\"bb2c5492a82b8d9db071602216abe5eeb5b9457fcb8e314a84e9c99db49e07fd\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"https://github.com/CoreELEC/bl301/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain gcc-linaro-aarch64-elf:host gcc-linaro-arm-eabi:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  sed -i \"s|arm-none-eabi-|arm-eabi-|g\" $PKG_BUILD/Makefile $PKG_BUILD/arch/arm/cpu/armv8/*/firmware/scp_task/Makefile 2>/dev/null || true\n}\n\nmake_target() {\n  [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n  export PATH=$TOOLCHAIN/lib/gcc-linaro-aarch64-elf/bin/:$TOOLCHAIN/lib/gcc-linaro-arm-eabi/bin/:$PATH\n  DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make mrproper\n\n  for f in $(find ${PKG_BUILD}/configs -mindepth 1); do\n    PKG_UBOOT_CONFIG=$(basename -- \"$f\")\n    PKG_BL301_SUBDEVICE=${PKG_UBOOT_CONFIG%_defconfig}\n    echo Building bl301 for ${PKG_BL301_SUBDEVICE}\n    DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make ${PKG_UBOOT_CONFIG}\n    DEBUG=${PKG_DEBUG} CROSS_COMPILE=aarch64-elf- ARCH=arm CFLAGS=\"\" LDFLAGS=\"\" make HOSTCC=\"${HOST_CC}\" HOSTSTRIP=\"true\" bl301.bin\n    mv ${PKG_BUILD}/build/scp_task/bl301.bin ${PKG_BUILD}/build/${PKG_BL301_SUBDEVICE}_bl301.bin\n    echo \"moved blob to: \" ${PKG_BUILD}/build/${PKG_BL301_SUBDEVICE}_bl301.bin\n    rm -rf ${PKG_BUILD}/build/scp_task\n  done\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/share/bootloader/bl301/${BL2_MIN_VERSION}\n\n  for f in $(find ${PKG_BUILD}/configs -mindepth 1); do\n    PKG_UBOOT_CONFIG=$(basename -- \"$f\")\n    PKG_BL301_SUBDEVICE=${PKG_UBOOT_CONFIG%_defconfig}\n    PKG_BIN=${PKG_BUILD}/build/${PKG_BL301_SUBDEVICE}_bl301.bin\n    cp -av ${PKG_BIN} ${INSTALL}/usr/share/bootloader/bl301/${BL2_MIN_VERSION}/${PKG_BL301_SUBDEVICE}_bl301.bin\n  done\n\n  [ -d \"${PKG_BUILD}/bl30\" ] && cp -av ${PKG_BUILD}/bl30 ${INSTALL}/usr/share/bootloader/bl301/${BL2_MIN_VERSION} || :\n  [ -d \"${PKG_BUILD}/bl31\" ] && cp -av ${PKG_BUILD}/bl31 ${INSTALL}/usr/share/bootloader/bl301/${BL2_MIN_VERSION} || :\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-firmware/amlogic/qca-firmware-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"qca-firmware-aml\"\nPKG_VERSION=\"56716df3468fd87ade0ac98af5ec687376e9b4ef\"\nPKG_SHA256=\"4f3dd7ad50695c3f8205e38a1a703801d6033fcfda969c55606589229738178e\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"BSD-3c\"\nPKG_SITE=\"https://github.com/CoreELEC/qca-firmware-aml\"\nPKG_URL=\"https://github.com/CoreELEC/qca-firmware-aml/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"qca Linux firmware\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/$(get_full_firmware_dir)\n    cp -a * ${INSTALL}/$(get_full_firmware_dir)\n\n  # create a default firmware.conf for loading bluetooth NVM binaries\n  # Possible parameter:\n  # DEEP_SLEEP: Disable = 0 / Enable = 1\n  # PCM: Master = 0 / Slave = 1\n  mkdir -p ${INSTALL}/etc/bluetooth\n    echo \"DEEP_SLEEP=0\n\" > ${INSTALL}/etc/bluetooth/firmware.conf\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-firmware/amlogic/qca-firmware-aml/system.d/qca-firmware-aml.service",
    "content": "[Unit]\nDescription=Attach /dev/ttyS1 to BlueZ stack using qca type\nWants=bluetooth.service\nBefore=bluetooth.service\nAfter=dev-ttyS1.device\nStartLimitInterval=60\nStartLimitBurst=2\n\n[Service]\nType=simple\nExecStartPre=/usr/sbin/rfkill unblock bluetooth\nExecStart=/usr/bin/hciattach -n -s 115200 /dev/ttyS1 qca 2000000\nExecStopPost=/usr/sbin/rfkill block bluetooth\nRestart=always\nRestartSec=2\nLimitNPROC=1\nTimeoutStopSec=1s\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-firmware/amlogic/qca-firmware-aml/udev.d/80-qca-firmware-aml.rules",
    "content": "################################################################################\n# udev rules file for loading qca-firmware-aml\n################################################################################\n\nACTION==\"add\", SUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x0271\", ATTRS{device}==\"0x0[578]0?\", \\\n  TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"qca-firmware-aml.service\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-firmware/amlogic/rtkbt-firmware-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"rtkbt-firmware-aml\"\nPKG_VERSION=\"4d95579f256383af2df39d796f38a91ee6ec0b80\"\nPKG_SHA256=\"7a2884532969f84596f469cde599b8ecc026e80263ae64c9faf0e22a0332f569\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/rtkbt-firmware-aml\"\nPKG_URL=\"https://github.com/CoreELEC/rtkbt-firmware-aml/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain rtk_hciattach\"\nPKG_LONGDESC=\"Realtek BT Linux firmware\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  FWDIR=$INSTALL/$(get_full_firmware_dir)/rtlbt\n\n  mkdir -p $FWDIR\n    cp -a $PKG_BUILD/* $FWDIR\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-firmware/amlogic/rtkbt-firmware-aml/system.d/rtkbt-firmware-aml.service",
    "content": "[Unit]\nDescription=Attach /dev/ttyS1 to BlueZ stack using rtk_h5 type\nWants=bluetooth.service\nBefore=bluetooth.service\nAfter=dev-ttyS1.device\n\n[Service]\nType=simple\nExecStartPre=/usr/sbin/rfkill unblock bluetooth\nExecStart=/usr/bin/rtk_hciattach -n -s 115200 /dev/ttyS1 rtk_h5\nExecStopPost=/usr/sbin/rfkill block bluetooth\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-firmware/amlogic/rtkbt-firmware-aml/udev.d/80-rtkbt-firmware-aml.rules",
    "content": "################################################################################\n# udev rules file for loading realtek bt firmware\n################################################################################\n\nACTION!=\"add\", GOTO=\"end\"\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x024c\", ATTRS{device}==\"0xb723\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"rtkbt-firmware-aml.service\"\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x024c\", ATTRS{device}==\"0xb822\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"rtkbt-firmware-aml.service\"\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x024c\", ATTRS{device}==\"0xc822\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"rtkbt-firmware-aml.service\"\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x024c\", ATTRS{device}==\"0xb852\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"rtkbt-firmware-aml.service\"\nGOTO=\"end\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-firmware/brcmfmac_sdio-firmware-aml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"brcmfmac_sdio-firmware-aml\"\nPKG_VERSION=\"e267c5bd059ed3645c5ecdfa484fa8efa84488a3\"\nPKG_SHA256=\"0bb6510be9063fa6db13f5f81b94962a4cdc801b3ae4c4e41c036c87af50b05e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/brcmfmac_sdio-firmware-aml\"\nPKG_URL=\"https://github.com/CoreELEC/brcmfmac_sdio-firmware-aml/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Firmware for brcm bluetooth chips used in some Amlogic based devices.\"\n\nmakeinstall_target() {\n  DESTDIR=$INSTALL FWDIR=$INSTALL/$(get_kernel_overlay_dir) make install\n\n  cd $INSTALL/$(get_full_firmware_dir)/brcm\n  for f in *.hcd; do\n    ln -sr $f $(grep --text -o 'BCM[24]\\S*' $f).hcd 2>/dev/null || true\n    ln -sr $f $(grep --text -o 'BCM[24]\\S*' $f | cut -c4-).hcd 2>/dev/null || true\n    ln -sr $f $(echo $f | sed -r 's/[^.]*/\\U&/') 2>/dev/null || true\n  done\n  ln -sr bcm4335_V0343.0353.hcd bcm4335a0.hcd 2>/dev/null || true\n  ln -sr bcm4335_V0343.0353.hcd BCM4335A0.hcd 2>/dev/null || true\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-firmware/brcmfmac_sdio-firmware-aml/system.d/brcmfmac_sdio-firmware-aml.service",
    "content": "[Unit]\nDescription=Attach /dev/ttyS1 to BlueZ stack using bcm43xx type\nWants=bluetooth.service\nBefore=bluetooth.service\nAfter=dev-ttyS1.device\n\n[Service]\nType=simple\nExecStartPre=/usr/sbin/rfkill unblock bluetooth\nExecStart=/usr/bin/hciattach -n -s 115200 /dev/ttyS1 bcm43xx 2000000\nExecStopPost=/usr/sbin/rfkill block bluetooth\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-firmware/brcmfmac_sdio-firmware-aml/system.d/brcmfmac_sdio-firmware@.service",
    "content": "[Unit]\nDescription=Broadcom sdio firmware update for %I\nWants=bluetooth.service\nBefore=bluetooth.service\nAfter=dev-ttyS1.device\n\n[Service]\nType=simple\nExecStart=/usr/bin/brcm_patchram_plus --patchram /usr/lib/kernel-overlays/base/lib/firmware/brcm/%I.hcd --baudrate 2000000 --use_baudrate_for_download /dev/ttyS1 --enable_hci --no2bytes --tosleep=50000\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-firmware/brcmfmac_sdio-firmware-aml/udev.d/80-brcmfmac_sdio.rules",
    "content": "################################################################################\n# udev rules file for loading brcmfmac_sdio-firmware-aml\n################################################################################\n\n### Broadcom bcm43362/bcm20710a1 bluetooth device\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x02d0\", ATTRS{device}==\"0xa962\", ACTION==\"add\", \\\n  TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"brcmfmac_sdio-firmware@bcm20710a1.service\", GOTO=\"end\"\n\nSUBSYSTEMS==\"sdio\", ATTRS{vendor}==\"0x02d0\", ACTION==\"add\", \\\n  TAG+=\"systemd\", ENV{SYSTEMD_WANTS}+=\"brcmfmac_sdio-firmware-aml.service\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/linux-firmware/wlan-firmware/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"wlan-firmware\"\nPKG_VERSION=\"2142727\"\nPKG_SHA256=\"d03e3108ef18ec10774b601d06d8445aebbd3c39f8ea3ab2b20a26c62af3500f\"\nPKG_LICENSE=\"Free-to-use\"\nPKG_SITE=\"https://github.com/LibreELEC/wlan-firmware\"\nPKG_URL=\"https://github.com/LibreELEC/wlan-firmware/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain rfkill\"\nPKG_LONGDESC=\"wlan-firmware: firmwares for various WLAN drivers\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  DESTDIR=$INSTALL/$(get_kernel_overlay_dir) ./install\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/CoreELEC-settings/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"CoreELEC-settings\"\nPKG_VERSION=\"68e4e13ddeaf84d994aae0eb23d714b2c542ed57\"\nPKG_SHA256=\"ecc26bda2bcdf2a4821b82aec440b80547002d5c02c63561109115b4fbb0dd19\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"https://github.com/CoreELEC/service.coreelec.settings/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain Python3 connman pygobject dbus-python\"\nPKG_LONGDESC=\"CoreELEC-settings: is a settings dialog for CoreELEC\"\n\nPKG_MAKE_OPTS_TARGET=\"DISTRONAME=$DISTRONAME ADDON_VERSION=$ADDON_VERSION ROOT_PASSWORD=$ROOT_PASSWORD\"\n\nif [ \"$DISPLAYSERVER\" = \"x11\" ]; then\n  PKG_DEPENDS_TARGET=\"$PKG_DEPENDS_TARGET setxkbmap\"\nelse\n  PKG_DEPENDS_TARGET=\"$PKG_DEPENDS_TARGET bkeymaps\"\nfi\n\npost_makeinstall_target() {\n  mkdir -p $INSTALL/usr/lib/coreelec\n    cp $PKG_DIR/scripts/* $INSTALL/usr/lib/coreelec\n\n  ADDON_INSTALL_DIR=$INSTALL/usr/share/kodi/addons/service.coreelec.settings\n\n  $TOOLCHAIN/bin/python -Wi -t -B $TOOLCHAIN/lib/$PKG_PYTHON_VERSION/compileall.py $ADDON_INSTALL_DIR/resources/lib/ -f\n  rm -rf $(find $ADDON_INSTALL_DIR/resources/lib/ -name \"*.py\")\n\n  $TOOLCHAIN/bin/python -Wi -t -B $TOOLCHAIN/lib/$PKG_PYTHON_VERSION/compileall.py $ADDON_INSTALL_DIR/oe.py -f\n  rm -rf $ADDON_INSTALL_DIR/oe.py\n}\n\npost_install() {\n  enable_service backup-restore.service\n  enable_service factory-reset.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/CoreELEC-settings/scripts/backup-restore",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /usr/lib/libreelec/functions\n\n# Get NAME, which is DISTRONAME, ie. CoreELEC\n. /etc/os-release\n\nhidecursor\n\nBACKUP_FILE=`ls -1 /storage/.restore/??????????????.tar 2>/dev/null | tail -1`\n\nif [ -f \"$BACKUP_FILE\" ] ; then\n  echo \"RESTORE IN PROGRESS\"\n  echo \"\"\n  echo \"Please do not reboot or turn off your ${NAME} device!\"\n  echo \"\"\n\n  StartProgress spinner \"Checking backup file... \"\n    tar tf $BACKUP_FILE &>/dev/null\n    ret=$?\n\n  if [ $ret -eq 0 ] ; then\n    StopProgress \"OK\"\n\n    echo\n    echo \"This may take some time to complete, please be patient.\"\n    echo\n\n    StartProgress spinner \"Restoring... \"\n      rm -rf /storage/.kodi &>/dev/null\n      rm -rf /storage/.cache &>/dev/null\n      rm -rf /storage/.config &>/dev/null\n      tar xf $BACKUP_FILE -C / &>/dev/null\n      rm -f $BACKUP_FILE &>/dev/null\n      # Leave a hint that we just did a restore\n      echo \"RESTORE\" > /storage/.config/boot.hint\n      sync\n      StopProgress \"done!\"\n\n    echo\n    StartProgress countdown \"Rebooting in 5s... \" 5 \"NOW\"\n  else\n    StopProgress \"FAILED\"\n\n    echo\n    echo \"Backup file is not valid, or corrupt.\"\n\n    echo\n    StartProgress spinner \"Removing file to allow normal restart... \"\n      rm -f $BACKUP_FILE &>/dev/null\n      sync\n      StopProgress \"done\"\n\n    echo\n    StartProgress countdown \"Rebooting in 30s... \" 30 \"NOW\"\n  fi\nfi\n\nsync\nreboot -f\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/CoreELEC-settings/scripts/factory-reset",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /usr/lib/libreelec/functions\n\n# Get NAME, which is DISTRONAME, ie. CoreELEC\n. /etc/os-release\n\nhidecursor\n\nlabel=\ntarget=\nuuid=\nceemmc=\n\nget_target() {\n  for arg in $(cat /proc/cmdline); do\n    case $arg in\n      disk=*)\n        disk=\"${arg#*=}\"\n        case $disk in\n          LABEL=*)\n            label=\"${disk#*=}\"\n            target=\"$(blkid -L $label)\"\n            ;;\n          UUID=*)\n            uuid=\"${disk#*=}\"\n            target=\"$(blkid -U $uuid)\"\n            ;;\n          FOLDER=*)\n            ceemmc=\"yes\"\n            target=\"${disk#*=}\"\n            ;;\n          /*)\n            target=\"$disk\"\n            ;;\n        esac\n        ;;\n    esac\n  done\n}\n\nshow_reset_msg() {\n  echo \"RESET IN PROGRESS\"\n  echo \"\"\n  echo \"Please do not reboot or turn off your ${NAME} device!\"\n  echo \"\"\n}\n\nif [ -f /storage/.cache/reset_hard ] ; then\n  # hard reset\n  rm -f /storage/.cache/reset_hard\n  get_target\n  if [ ! -z $target ] ; then\n    show_reset_msg\n\n    StartProgress spinner \"Performing hard reset... \"\n    if [ \"$ceemmc\" = \"yes\" ] ; then\n      # storage is just subfolder on Android data partition\n      rm -rf /storage/* &>/dev/null\n      rm -rf /storage/.[!.]* &>/dev/null\n    else\n      umount /storage\n      mke2fs -t ext4 -m 0 $target &>/dev/null\n      if [ ! -z $label ] ; then\n        tune2fs -U random -L $label $target &>/dev/null\n      fi\n      if [ ! -z $uuid ] ; then\n        tune2fs -U $uuid $target &>/dev/null\n      fi\n    fi\n    StopProgress \"done!\"\n\n    echo\n    StartProgress countdown \"Rebooting in 5s... \" 5 \"NOW\"\n  fi\nelif [ -f /storage/.cache/reset_soft ] ; then\n  # soft reset\n  rm -f /storage/.cache/reset_soft\n  get_target\n  if [ ! -z $target ] ; then\n    show_reset_msg\n\n    StartProgress spinner \"Performing soft reset... \"\n      rm -rf /storage/.??* &>/dev/null\n      # Leave a hint that we just did a soft reset\n      mkdir -p /storage/.config\n      echo \"RESET-SOFT\" > /storage/.config/boot.hint\n      StopProgress \"done!\"\n\n    echo\n    StartProgress countdown \"Rebooting in 5s... \" 5 \"NOW\"\n  fi\nfi\n\nsync\nreboot -f\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/CoreELEC-settings/system.d/backup-restore.service",
    "content": "[Unit]\nDescription=Restoring Backup\nDefaultDependencies=no\n\n[Service]\nType=idle\nExecStart=/usr/lib/coreelec/backup-restore\nStandardInput=tty-force\nStandardOutput=inherit\nStandardError=inherit\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/CoreELEC-settings/system.d/backup-restore.target",
    "content": "[Unit]\nDescription=Restoring Backup target\nRequires=backup-restore.service\nAfter=backup-restore.service\nAllowIsolate=yes\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/CoreELEC-settings/system.d/factory-reset.service",
    "content": "[Unit]\nDescription=Factory reset\nDefaultDependencies=no\n\n[Service]\nType=idle\nExecStart=/usr/lib/coreelec/factory-reset\nStandardInput=tty-force\nStandardOutput=inherit\nStandardError=inherit\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/CoreELEC-settings/system.d/factory-reset.target",
    "content": "[Unit]\nDescription=Factory reset target\nRequires=factory-reset.service\nAfter=factory-reset.service\nAllowIsolate=yes\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/config/advancedsettings.xml",
    "content": "<advancedsettings>\n  <cputempcommand>/usr/bin/cputemp</cputempcommand>\n  <gputempcommand>/usr/bin/gputemp</gputempcommand>\n\n  <showexitbutton>false</showexitbutton>\n  <remotedelay>1</remotedelay>\n  <samba>\n    <clienttimeout>30</clienttimeout>\n  </samba>\n  <splash>false</splash>\n</advancedsettings>\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/config/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n\n  <section id=\"games\">\n    <category id=\"gamesgeneral\">\n      <group id=\"1\">\n        <setting id=\"gamesgeneral.enablerewind\">\n          <default>false</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n  <section id=\"system\">\n    <category id=\"display\">\n      <group id=\"1\">\n        <setting id=\"videoscreen.screen\">\n          <visible>false</visible>\n        </setting>\n      </group>\n      <group id=\"3\">\n        <setting id=\"videoscreen.noofbuffers\">\n          <default>2</default>\n        </setting>\n      </group>\n    </category>\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.volumesteps\">\n          <default>20</default>\n        </setting>\n      </group>\n    </category>\n    <category id=\"logging\">\n      <group id=\"1\">\n        <setting id=\"debug.screenshotpath\">\n          <default>/storage/screenshots/</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n  <section id=\"services\">\n    <category id=\"airplay\">\n      <group id=\"1\">\n        <setting id=\"services.airplay\">\n          <default>true</default>\n        </setting>\n      </group>\n    </category>\n\n    <category id=\"smb\">\n      <group id=\"2\">\n        <setting id=\"smb.maxprotocol\">\n          <default>0</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n  <section id=\"pvr\">\n    <category id=\"epg\">\n      <group id=\"2\">\n        <setting id=\"epg.preventupdateswhileplayingtv\">\n          <default>true</default>\n        </setting>\n        <setting id=\"epg.ignoredbforclient\">\n          <default>true</default>\n        </setting>\n      </group>\n    </category>\n\n    <category id=\"pvrplayback\">\n      <group id=\"1\">\n        <setting id=\"pvrplayback.signalquality\">\n          <default>false</default>\n        </setting>\n      </group>\n    </category>\n\n    <category id=\"pvrpowermanagement\">\n      <group id=\"1\">\n        <setting id=\"pvrpowermanagement.setwakeupcmd\">\n          <default>/usr/bin/setwakeup.sh</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/config/guisettings.xml",
    "content": "<settings version=\"2\">\n  <general>\n    <settinglevel>2</settinglevel>\n  </general>\n</settings>\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/config/kodi.conf.in",
    "content": "KODI_AE_SINK=@KODI_AE_SINK@\nHOME=/storage\nKODI_TEMP=/storage/.kodi/temp\nKODI_HOME=/usr/share/kodi/\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/config/network_wait",
    "content": "WAIT_NETWORK=\"true\"\nWAIT_NETWORK_TIME=\"10\"\nWAIT_NETWORK_DEFAULT=\"true\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/config/repository.coreelec/addon.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<addon id=\"@ADDON_REPO_ID@\"\n\t\tname=\"@ADDON_REPO_NAME@\"\n\t\tversion=\"@ADDON_VERSION@\"\n\t\tprovider-name=\"CoreELEC\">\n\t<extension point=\"xbmc.addon.repository\"\n\t\tname=\"@ADDON_REPO_NAME@\">\n\t\t<dir>\n\t\t\t<info>@ADDON_URL@/addons.xml.gz</info>\n\t\t\t<checksum verify=\"sha256\">@ADDON_URL@/addons.xml.gz?sha256</checksum>\n\t\t\t<datadir>@ADDON_URL@</datadir>\n\t\t</dir>\n\t</extension>\n\t<extension point=\"xbmc.addon.metadata\">\n\t\t<summary>@ADDON_REPO_NAME@</summary>\n\t\t<description>The CoreELEC add-on repository contains Kodi PVR Clients and Servers, Screensavers, Visualisations, and more. Add-ons in this repository are maintained and supported by CoreELEC staff and YOU the community. If you find a broken or non-working add-on please report it via the forums, or help by submitting fixes via GitHub.</description>\n\t\t<platform>all</platform>\n\t</extension>\n</addon>\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/config/sources.xml",
    "content": "<sources>\n  <video>\n      <default pathversion=\"1\"></default>\n      <source>\n          <name>Videos</name>\n          <path pathversion=\"1\">/storage/videos/</path>\n          <allowsharing>true</allowsharing>\n      </source>\n      <source>\n          <name>TV Shows</name>\n          <path pathversion=\"1\">/storage/tvshows/</path>\n          <allowsharing>true</allowsharing>\n      </source>\n  </video>\n  <music>\n      <default pathversion=\"1\"></default>\n      <source>\n          <name>Music</name>\n          <path pathversion=\"1\">/storage/music/</path>\n          <allowsharing>true</allowsharing>\n      </source>\n  </music>\n  <pictures>\n      <default pathversion=\"1\"></default>\n      <source>\n          <name>Pictures</name>\n          <path pathversion=\"1\">/storage/pictures/</path>\n          <allowsharing>true</allowsharing>\n      </source>\n  </pictures>\n</sources>\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/debug.d/kodi.conf",
    "content": "KODI_DEBUG=\"--debug\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-2018 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.tv)\n\nPKG_NAME=\"kodi\"\nPKG_VERSION=\"513bcee15b79c4b75dabaf054f89f1aacd256248\"\nPKG_SHA256=\"343f3b132903ed1c4057380592029639ac556f20a576a91b06b7a654d54e7a28\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kodi.tv\"\nPKG_URL=\"https://github.com/CoreELEC/xbmc/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain JsonSchemaBuilder:host TexturePacker:host Python3 zlib systemd lzo pcre swig:host libass curl fontconfig fribidi tinyxml libjpeg-turbo freetype libcdio taglib libxml2 libxslt rapidjson sqlite ffmpeg crossguid libfmt lirc libfstrcmp flatbuffers:host flatbuffers libudfread spdlog obu_util\"\nPKG_DEPENDS_HOST=\"toolchain\"\nPKG_LONGDESC=\"A free and open source cross-platform media player.\"\nPKG_BUILD_FLAGS=\"+speed\"\n\npost_unpack() {\n  if [ -f ${DISTRO_DIR}/${DISTRO}/splash/${DEVICE}/splash-1080.png ]; then\n    rm -rf $(get_build_dir ${PKG_NAME})/media/splash.*\n    cp -PR ${DISTRO_DIR}/${DISTRO}/splash/${DEVICE}/splash-1080.png $(get_build_dir ${PKG_NAME})/media/splash.png\n  fi\n\n  sed -e \"s|@ADDON_REPO_ID@|${ADDON_REPO_ID}|g\" -i $(get_build_dir ${PKG_NAME})/version.txt\n  sed -e \"s|@ADDON_SERVER_URL@|${ADDON_SERVER_URL}|g\" -i $(get_build_dir ${PKG_NAME})/version.txt\n\n  # don't build internal TexturePacker\n  sed -i 's|set(INTERNAL_TEXTUREPACKER_INSTALLABLE TRUE|set(INTERNAL_TEXTUREPACKER_INSTALLABLE FALSE|' \\\n    $(get_build_dir ${PKG_NAME})/cmake/modules/buildtools/FindTexturePacker.cmake\n}\n\nconfigure_package() {\n  # Single threaded LTO is very slow so rely on Kodi for parallel LTO support\n  if [ \"${LTO_SUPPORT}\" = \"yes\" ] && ! build_with_debug; then\n    PKG_KODI_USE_LTO=\"-DUSE_LTO=${CONCURRENCY_MAKE_LEVEL}\"\n  fi\n\n  # Set linker options\n  case $(get_target_linker) in\n    gold)\n      PKG_KODI_LINKER=\"-DENABLE_GOLD=ON \\\n                       -DENABLE_MOLD=OFF\"\n      ;;\n    mold)\n      PKG_KODI_LINKER=\"-DENABLE_GOLD=OFF \\\n                       -DENABLE_MOLD=ON \\\n                       -DMOLD_EXECUTABLE=${TOOLCHAIN}/${TARGET_NAME}/bin/mold\"\n      ;;\n    *)\n      PKG_KODI_LINKER=\"-DENABLE_GOLD=OFF \\\n                       -DENABLE_MOLD=OFF\"\n      ;;\n  esac\n\n  get_graphicdrivers\n\n  PKG_DEPENDS_TARGET+=\" dbus\"\n\n  if [ \"${DEVICE}\" = \"Amlogic-ng-dv\" ]; then\n    PKG_DEPENDS_TARGET+=\" libdovi\"\n    PKG_CMAKE_OPTS_TARGET+=\" -DENABLE_LIBDOVI=ON\"\n  fi\n\n  if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_DEPENDS_TARGET+=\" libX11 libXext libdrm libXrandr\"\n    KODI_PLATFORM=\"-DCORE_PLATFORM_NAME=x11 \\\n                   -DAPP_RENDER_SYSTEM=gl\"\n  elif [ \"${DISPLAYSERVER}\" = \"wl\" ]; then\n    PKG_DEPENDS_TARGET+=\" wayland waylandpp\"\n    PKG_PATCH_DIRS+=\" wayland\"\n    CFLAGS+=\" -DEGL_NO_X11\"\n    CXXFLAGS+=\" -DEGL_NO_X11\"\n    KODI_PLATFORM=\"-DCORE_PLATFORM_NAME=wayland \\\n                   -DAPP_RENDER_SYSTEM=gles \\\n                   -DWAYLANDPP_SCANNER=${TOOLCHAIN}/bin/wayland-scanner++ \\\n                   -DWAYLANDPP_PROTOCOLS_DIR=${SYSROOT_PREFIX}/usr/share/waylandpp/protocols\"\n  fi\n\n  if [ ! \"${OPENGL}\" = \"no\" ]; then\n    PKG_DEPENDS_TARGET+=\" ${OPENGL} glu\"\n  fi\n\n  if [ \"${OPENGLES_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" ${OPENGLES}\"\n  fi\n\n  if [ \"${KODI_ALSA_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" alsa-lib\"\n    KODI_ALSA=\"-DENABLE_ALSA=ON\"\n  else\n    KODI_ALSA=\"-DENABLE_ALSA=OFF\"\n fi\n\n  if [ \"${KODI_PULSEAUDIO_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" pulseaudio\"\n    KODI_PULSEAUDIO=\"-DENABLE_PULSEAUDIO=ON\"\n  else\n    KODI_PULSEAUDIO=\"-DENABLE_PULSEAUDIO=OFF\"\n  fi\n\n  if [ \"${ESPEAK_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" espeak-ng\"\n  fi\n\n  if [ \"${KODI_PIPEWIRE_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" pipewire\"\n    KODI_PIPEWIRE=\"-DENABLE_PIPEWIRE=ON\"\n\n    if [ \"${KODI_PULSEAUDIO_SUPPORT}\" = \"yes\" -o \"${KODI_ALSA_SUPPORT}\" = \"yes\" ]; then\n      die \"KODI_PULSEAUDIO_SUPPORT and KODI_ALSA_SUPPORT cannot be used with KODI_PIPEWIRE_SUPPORT\"\n    fi\n  else\n    KODI_PIPEWIRE=\"-DENABLE_PIPEWIRE=OFF\"\n  fi\n\n  if [ \"${CEC_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libcec\"\n    KODI_CEC=\"-DENABLE_CEC=ON\"\n  else\n    KODI_CEC=\"-DENABLE_CEC=OFF\"\n  fi\n\n  if [ \"${CEC_FRAMEWORK_SUPPORT}\" = \"yes\" ]; then\n    PKG_PATCH_DIRS+=\" cec-framework\"\n  fi\n\n  if [ \"${KODI_OPTICAL_SUPPORT}\" = yes ]; then\n    KODI_OPTICAL=\"-DENABLE_OPTICAL=ON\"\n  else\n    KODI_OPTICAL=\"-DENABLE_OPTICAL=OFF\"\n  fi\n\n  if [ \"${KODI_BLURAY_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libbluray\"\n    KODI_BLURAY=\"-DENABLE_BLURAY=ON\"\n  else\n    KODI_BLURAY=\"-DENABLE_BLURAY=OFF\"\n  fi\n\n  if [ \"${AVAHI_DAEMON}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" avahi nss-mdns\"\n    KODI_AVAHI=\"-DENABLE_AVAHI=ON\"\n  else\n    KODI_AVAHI=\"-DENABLE_AVAHI=OFF\"\n  fi\n\n  case \"${KODI_MYSQL_SUPPORT}\" in\n    mysql)   PKG_DEPENDS_TARGET+=\" mysql\"\n             KODI_MYSQL=\"-DENABLE_MYSQLCLIENT=ON -DENABLE_MARIADBCLIENT=OFF\"\n             ;;\n    mariadb) PKG_DEPENDS_TARGET+=\" mariadb-connector-c\"\n             KODI_MYSQL=\"-DENABLE_MARIADBCLIENT=ON -DENABLE_MYSQLCLIENT=OFF\"\n             ;;\n    *)       KODI_MYSQL=\"-DENABLE_MYSQLCLIENT=OFF -DENABLE_MARIADBCLIENT=OFF\"\n  esac\n\n  if [ \"${KODI_AIRPLAY_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libplist\"\n    KODI_AIRPLAY=\"-DENABLE_PLIST=ON\"\n  else\n    KODI_AIRPLAY=\"-DENABLE_PLIST=OFF\"\n  fi\n\n  if [ \"${KODI_AIRTUNES_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libshairplay\"\n    KODI_AIRTUNES=\"-DENABLE_AIRTUNES=ON\"\n  else\n    KODI_AIRTUNES=\"-DENABLE_AIRTUNES=OFF\"\n  fi\n\n  if [ \"${KODI_NFS_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libnfs\"\n    KODI_NFS=\"-DENABLE_NFS=ON\"\n  else\n    KODI_NFS=\"-DENABLE_NFS=OFF\"\n  fi\n\n  if [ \"${KODI_SAMBA_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" samba\"\n    KODI_SAMBA=\"-DENABLE_SMBCLIENT=ON\"\n  else\n    KODI_SAMBA=\"-DENABLE_SMBCLIENT=OFF\"\n  fi\n\n  if [ \"${KODI_WEBSERVER_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libmicrohttpd\"\n  fi\n\n  if [ \"${KODI_UPNP_SUPPORT}\" = yes ]; then\n    KODI_UPNP=\"-DENABLE_UPNP=ON\"\n  else\n    KODI_UPNP=\"-DENABLE_UPNP=OFF\"\n  fi\n\n  if [ \"${TARGET_ARCH}\" = \"aarch64\" -o \"${TARGET_ARCH}\" = \"arm\" ]; then\n    if target_has_feature neon; then\n      KODI_NEON=\"-DENABLE_NEON=ON\"\n    else\n      KODI_NEON=\"-DENABLE_NEON=OFF\"\n    fi\n  else\n    KODI_NEON=\"\"\n  fi\n\n  if [ \"${VDPAU_SUPPORT}\" = \"yes\" -a \"${DISPLAYSERVER}\" = \"x11\" ]; then\n    PKG_DEPENDS_TARGET+=\" libvdpau\"\n    KODI_VDPAU=\"-DENABLE_VDPAU=ON\"\n  else\n    KODI_VDPAU=\"-DENABLE_VDPAU=OFF\"\n  fi\n\n  if [ \"${VAAPI_SUPPORT}\" = yes ]; then\n    PKG_DEPENDS_TARGET+=\" libva\"\n    KODI_VAAPI=\"-DENABLE_VAAPI=ON\"\n  else\n    KODI_VAAPI=\"-DENABLE_VAAPI=OFF\"\n  fi\n\n  if [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n    KODI_ARCH=\"-DWITH_CPU=${TARGET_ARCH}\"\n  else\n    KODI_ARCH=\"-DWITH_ARCH=${TARGET_ARCH}\"\n  fi\n\n  if [ ! \"${KODIPLAYER_DRIVER}\" = \"default\" -a \"${DISPLAYSERVER}\" = \"no\" ]; then\n    PKG_DEPENDS_TARGET+=\" ${KODIPLAYER_DRIVER} libinput libxkbcommon\"\n    if [ \"${OPENGLES_SUPPORT}\" = yes -a \"${KODIPLAYER_DRIVER}\" = \"${OPENGLES}\" ]; then\n      KODI_PLATFORM=\"-DCORE_PLATFORM_NAME=gbm -DAPP_RENDER_SYSTEM=gles\"\n      CFLAGS+=\" -DEGL_NO_X11\"\n      CXXFLAGS+=\" -DEGL_NO_X11\"\n      if [ \"${PROJECT}\" = \"Generic\" ]; then\n        PKG_APPLIANCE_XML=\"${PKG_DIR}/config/appliance-gbm-generic.xml\"\n      else\n        PKG_APPLIANCE_XML=\"${PKG_DIR}/config/appliance-gbm.xml\"\n      fi\n    elif [ \"${KODIPLAYER_DRIVER}\" = libamcodec ]; then\n      KODI_PLATFORM=\"-DCORE_PLATFORM_NAME=aml -DAPP_RENDER_SYSTEM=gles\"\n      PKG_APPLIANCE_XML_G12X=\"${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/kodi/g12x/appliance.xml\"\n      PKG_APPLIANCE_XML_GXX=\"${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/kodi/gxx/appliance.xml\"\n    fi\n  fi\n\n  PKG_CMAKE_OPTS_TARGET=\"-DNATIVEPREFIX=${TOOLCHAIN} \\\n                         -DWITH_TEXTUREPACKER=${TOOLCHAIN}/bin/TexturePacker \\\n                         -DWITH_JSONSCHEMABUILDER=${TOOLCHAIN}/bin/JsonSchemaBuilder \\\n                         -DDEPENDS_PATH=${PKG_BUILD}/depends \\\n                         -DSWIG_EXECUTABLE=${TOOLCHAIN}/bin/swig \\\n                         -DPYTHON_EXECUTABLE=${TOOLCHAIN}/bin/${PKG_PYTHON_VERSION} \\\n                         -DPYTHON_INCLUDE_DIRS=${SYSROOT_PREFIX}/usr/include/${PKG_PYTHON_VERSION} \\\n                         -DGIT_VERSION=${PKG_VERSION} \\\n                         -DFFMPEG_PATH=${SYSROOT_PREFIX}/usr \\\n                         -DENABLE_INTERNAL_FFMPEG=OFF \\\n                         -DENABLE_INTERNAL_CROSSGUID=OFF \\\n                         -DENABLE_INTERNAL_UDFREAD=OFF \\\n                         -DENABLE_INTERNAL_SPDLOG=OFF \\\n                         -DENABLE_INTERNAL_RapidJSON=OFF \\\n                         -DENABLE_UDEV=ON \\\n                         -DENABLE_DBUS=ON \\\n                         -DENABLE_XSLT=ON \\\n                         -DENABLE_CCACHE=OFF \\\n                         -DENABLE_LIRCCLIENT=ON \\\n                         -DENABLE_EVENTCLIENTS=ON \\\n                         -DENABLE_DEBUGFISSION=OFF \\\n                         -DENABLE_APP_AUTONAME=OFF \\\n                         -DENABLE_TESTING=OFF \\\n                         -DENABLE_INTERNAL_FLATBUFFERS=OFF \\\n                         -DENABLE_LCMS2=OFF \\\n                         -DADDONS_CONFIGURE_AT_STARTUP=OFF \\\n                         ${PKG_KODI_USE_LTO} \\\n                         ${PKG_KODI_LINKER} \\\n                         ${KODI_ARCH} \\\n                         ${KODI_NEON} \\\n                         ${KODI_VDPAU} \\\n                         ${KODI_VAAPI} \\\n                         ${KODI_CEC} \\\n                         ${KODI_PLATFORM} \\\n                         ${KODI_SAMBA} \\\n                         ${KODI_NFS} \\\n                         ${KODI_AVAHI} \\\n                         ${KODI_UPNP} \\\n                         ${KODI_MYSQL} \\\n                         ${KODI_AIRPLAY} \\\n                         ${KODI_AIRTUNES} \\\n                         ${KODI_OPTICAL} \\\n                         ${KODI_BLURAY} \\\n                         ${KODI_ALSA} \\\n                         ${KODI_PULSEAUDIO} \\\n                         ${KODI_PIPEWIRE}\"\n}\n\nprepare_libdvd_library() {\n  # arg1 is library name libdvdcss/libdvdnav/libdvdread\n  local LIBRARY_VERSION=\"$(awk -F= '/VERSION=/ {print $2}' ${PKG_BUILD}/tools/depends/target/${1}/${1^^}-VERSION)\"\n  local LIBRARY_SHA512=\"$(awk  -F= '/SHA512=/  {print $2}' ${PKG_BUILD}/tools/depends/target/${1}/${1^^}-VERSION)\"\n  local LIBRARY_ARCHIVE=\"${SOURCES}/${1}/${1}-${LIBRARY_VERSION}.tar.gz\"\n\n  if [ -f \"${LIBRARY_ARCHIVE}\" ]; then\n    local LIBRARY_ARCHIVE_SHA512=\"$(sha512sum \"${LIBRARY_ARCHIVE}\" | cut -d ' ' -f 1)\"\n    if [ \"${LIBRARY_ARCHIVE_SHA512}\" = \"${LIBRARY_SHA512}\" ]; then\n      KODI_LIBDVD+=\" -D${1^^}_URL=${LIBRARY_ARCHIVE}\"\n    fi\n  fi\n}\n\nconfigure_host() {\n  setup_toolchain target:cmake\n  cmake ${CMAKE_GENERATOR_NINJA} \\\n        -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CONF} \\\n        -DCMAKE_INSTALL_PREFIX=/usr \\\n        -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \\\n        -DHEADERS_ONLY=ON \\\n        ${KODI_ARCH} \\\n        ${KODI_NEON} \\\n        ${KODI_PLATFORM} ..\n}\n\nmake_host() {\n  :\n}\n\nmakeinstall_host() {\n  DESTDIR=${SYSROOT_PREFIX} cmake -DCMAKE_INSTALL_COMPONENT=\"kodi-addon-dev\" -P cmake_install.cmake\n\n  # more binaddons cross compile badness meh\n  sed -e \"s:INCLUDE_DIR /usr/include/kodi:INCLUDE_DIR ${SYSROOT_PREFIX}/usr/include/kodi:g\" \\\n      -e \"s:CMAKE_MODULE_PATH /usr/lib/kodi /usr/share/kodi/cmake:CMAKE_MODULE_PATH ${SYSROOT_PREFIX}/usr/share/kodi/cmake:g\" \\\n      -i ${SYSROOT_PREFIX}/usr/lib/kodi/cmake/KodiConfig.cmake\n}\n\npre_configure_target() {\n  export LIBS=\"${LIBS} -lncurses\"\n\n  if [ \"${KODI_DVDCSS_SUPPORT}\" = yes ]; then\n    KODI_LIBDVD=\"-DENABLE_DVDCSS=ON\"\n    prepare_libdvd_library libdvdcss\n  else\n    KODI_LIBDVD=\"-DENABLE_DVDCSS=OFF\"\n  fi\n\n  prepare_libdvd_library libdvdnav\n  prepare_libdvd_library libdvdread\n  PKG_CMAKE_OPTS_TARGET+=\" ${KODI_LIBDVD}\"\n}\n\npost_make_target() {\n  for libname in libdvdcss libdvdnav libdvdread; do\n    mkdir -p \"${SOURCES}/${libname}\"\n    cp \"${PKG_BUILD}/.${TARGET_NAME}/build/download/${libname}\"* \"${SOURCES}/${libname}\" || :\n  done\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/.noinstall\n    mv ${INSTALL}/usr/share/kodi/addons/skin.estouchy \\\n       ${INSTALL}/usr/share/kodi/addons/skin.estuary \\\n       ${INSTALL}/usr/share/kodi/addons/service.xbmc.versioncheck \\\n       ${INSTALL}/.noinstall\n\n  rm -rf ${INSTALL}/usr/bin/kodi\n  rm -rf ${INSTALL}/usr/bin/kodi-standalone\n  rm -rf ${INSTALL}/usr/bin/xbmc\n  rm -rf ${INSTALL}/usr/bin/xbmc-standalone\n  rm -rf ${INSTALL}/usr/share/kodi/cmake\n  rm -rf ${INSTALL}/usr/share/applications\n  rm -rf ${INSTALL}/usr/share/icons\n  rm -rf ${INSTALL}/usr/share/pixmaps\n  rm -rf ${INSTALL}/usr/share/xsessions\n\n  mkdir -p ${INSTALL}/usr/lib/kodi\n    cp ${PKG_DIR}/scripts/kodi-config ${INSTALL}/usr/lib/kodi\n    cp ${PKG_DIR}/scripts/kodi-after ${INSTALL}/usr/lib/kodi\n    cp ${PKG_DIR}/scripts/kodi-safe-mode ${INSTALL}/usr/lib/kodi\n    cp ${PKG_DIR}/scripts/kodi.sh ${INSTALL}/usr/lib/kodi\n\n  if [ \"${PROJECT}\" = \"Amlogic-ce\" ]; then\n    cp ${PKG_DIR}/scripts/aml-wait-for-dispcap.sh ${INSTALL}/usr/lib/kodi\n  fi\n\n    # Configure safe mode triggers - default 5 restarts within 900 seconds/15 minutes\n    sed -e \"s|@KODI_MAX_RESTARTS@|${KODI_MAX_RESTARTS:-5}|g\" \\\n        -e \"s|@KODI_MAX_SECONDS@|${KODI_MAX_SECONDS:-900}|g\" \\\n        -i ${INSTALL}/usr/lib/kodi/kodi.sh\n\n    if [ \"${KODI_PIPEWIRE_SUPPORT}\" = \"yes\" ]; then\n      KODI_AE_SINK=\"PIPEWIRE\"\n    elif [ \"${KODI_PULSEAUDIO_SUPPORT}\" = \"yes\" -a \"${KODI_ALSA_SUPPORT}\" = \"yes\" ]; then\n      KODI_AE_SINK=\"ALSA+PULSE\"\n    elif [ \"${KODI_PULSEAUDIO_SUPPORT}\" = \"yes\" -a \"${KODI_ALSA_SUPPORT}\" != \"yes\" ]; then\n      KODI_AE_SINK=\"PULSE\"\n    elif [ \"${KODI_PULSEAUDIO_SUPPORT}\" != \"yes\" -a \"${KODI_ALSA_SUPPORT}\" = \"yes\" ]; then\n      KODI_AE_SINK=\"ALSA\"\n    fi\n\n    # adjust audio output device to what was built\n    sed \"s/@KODI_AE_SINK@/${KODI_AE_SINK}/\" ${PKG_DIR}/config/kodi.conf.in > ${INSTALL}/usr/lib/kodi/kodi.conf\n\n    # set default display environment\n    if [ \"${DISPLAYSERVER}\" = \"x11\" ]; then\n      echo \"DISPLAY=:0.0\" >> ${INSTALL}/usr/lib/kodi/kodi.conf\n    elif [ \"${DISPLAYSERVER}\" = \"wl\" ]; then\n      echo \"WAYLAND_DISPLAY=wayland-1\" >> ${INSTALL}/usr/lib/kodi/kodi.conf\n    fi\n\n    # nvidia: Enable USLEEP to reduce CPU load while rendering\n    if listcontains \"${GRAPHIC_DRIVERS}\" \"nvidia\" || listcontains \"${GRAPHIC_DRIVERS}\" \"nvidia-legacy\"; then\n      echo \"__GL_YIELD=USLEEP\" >> ${INSTALL}/usr/lib/kodi/kodi.conf\n    fi\n\n  mkdir -p ${INSTALL}/usr/sbin\n    cp ${PKG_DIR}/scripts/service-addon-wrapper ${INSTALL}/usr/sbin\n\n  mkdir -p ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/kodi-remote ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/setwakeup.sh ${INSTALL}/usr/bin\n    cp ${PKG_DIR}/scripts/pastekodi ${INSTALL}/usr/bin\n    ln -sf /usr/bin/pastekodi ${INSTALL}/usr/bin/pastecrash\n\n  mkdir -p ${INSTALL}/usr/share/kodi/addons\n    cp -R ${PKG_DIR}/config/repository.coreelec ${INSTALL}/usr/share/kodi/addons/${ADDON_REPO_ID}\n    sed -e \"s|@ADDON_URL@|${ADDON_URL}|g\" -i ${INSTALL}/usr/share/kodi/addons/${ADDON_REPO_ID}/addon.xml\n    sed -e \"s|@ADDON_REPO_ID@|${ADDON_REPO_ID}|g\" -i ${INSTALL}/usr/share/kodi/addons/${ADDON_REPO_ID}/addon.xml\n    sed -e \"s|@ADDON_REPO_NAME@|${ADDON_REPO_NAME}|g\" -i ${INSTALL}/usr/share/kodi/addons/${ADDON_REPO_ID}/addon.xml\n    sed -e \"s|@ADDON_VERSION@|${ADDON_VERSION}|g\" -i ${INSTALL}/usr/share/kodi/addons/${ADDON_REPO_ID}/addon.xml\n\n  mkdir -p ${INSTALL}/usr/share/kodi/config\n\n  ln -sf /run/libreelec/cacert.pem ${INSTALL}/usr/share/kodi/system/certs/cacert.pem\n\n  mkdir -p ${INSTALL}/usr/share/kodi/system/settings\n\n  ${PKG_DIR}/scripts/xml_merge.py ${PKG_DIR}/config/guisettings.xml \\\n                                ${PROJECT_DIR}/${PROJECT}/kodi/guisettings.xml \\\n                                ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/kodi/guisettings.xml \\\n                                > ${INSTALL}/usr/share/kodi/config/guisettings.xml\n\n  ${PKG_DIR}/scripts/xml_merge.py ${PKG_DIR}/config/sources.xml \\\n                                ${PROJECT_DIR}/${PROJECT}/kodi/sources.xml \\\n                                ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/kodi/sources.xml \\\n                                > ${INSTALL}/usr/share/kodi/config/sources.xml\n\n  ${PKG_DIR}/scripts/xml_merge.py ${PKG_DIR}/config/advancedsettings.xml \\\n                                ${PROJECT_DIR}/${PROJECT}/kodi/advancedsettings.xml \\\n                                ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/kodi/advancedsettings.xml \\\n                                > ${INSTALL}/usr/share/kodi/system/advancedsettings.xml\n\n  ln -sf /var/share/kodi/system/settings/appliance.xml ${INSTALL}/usr/share/kodi/system/settings/appliance.xml\n\n  ${PKG_DIR}/scripts/xml_merge.py ${PKG_DIR}/config/appliance.xml \\\n                                ${PKG_APPLIANCE_XML_G12X} \\\n                                ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/kodi/appliance.xml \\\n                                > ${INSTALL}/usr/share/kodi/system/settings/appliance.g12x.xml\n\n  ${PKG_DIR}/scripts/xml_merge.py ${PKG_DIR}/config/appliance.xml \\\n                                ${PKG_APPLIANCE_XML_GXX} \\\n                                ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/kodi/appliance.xml \\\n                                > ${INSTALL}/usr/share/kodi/system/settings/appliance.gxx.xml\n\n  mkdir -p ${INSTALL}/usr/cache/coreelec\n    cp ${PKG_DIR}/config/network_wait ${INSTALL}/usr/cache/coreelec\n\n  # update addon manifest\n  ADDON_MANIFEST=${INSTALL}/usr/share/kodi/system/addon-manifest.xml\n  xmlstarlet ed -L -d \"/addons/addon[text()='service.xbmc.versioncheck']\" ${ADDON_MANIFEST}\n  xmlstarlet ed -L -d \"/addons/addon[text()='skin.estouchy']\" ${ADDON_MANIFEST}\n  xmlstarlet ed -L --subnode \"/addons\" -t elem -n \"addon\" -v \"${ADDON_REPO_ID}\" ${ADDON_MANIFEST}\n  if [ -n \"${DISTRO_PKG_SETTINGS}\" ]; then\n    xmlstarlet ed -L --subnode \"/addons\" -t elem -n \"addon\" -v \"${DISTRO_PKG_SETTINGS_ID}\" ${ADDON_MANIFEST}\n  fi\n\n  # more binaddons cross compile badness meh\n  sed -e \"s:INCLUDE_DIR /usr/include/kodi:INCLUDE_DIR ${SYSROOT_PREFIX}/usr/include/kodi:g\" \\\n      -e \"s:CMAKE_MODULE_PATH /usr/lib/kodi /usr/share/kodi/cmake:CMAKE_MODULE_PATH ${SYSROOT_PREFIX}/usr/share/kodi/cmake:g\" \\\n      -i ${SYSROOT_PREFIX}/usr/lib/kodi/cmake/KodiConfig.cmake\n\n  if [ \"${KODI_EXTRA_FONTS}\" = yes ]; then\n    mkdir -p ${INSTALL}/usr/share/kodi/media/Fonts\n      cp ${PKG_DIR}/fonts/*.ttf ${INSTALL}/usr/share/kodi/media/Fonts\n  fi\n\n  # Compile kodi Python site-packages to .pyc bytecode, and remove .py source code\n  python_compile ${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}/site-packages/kodi\n\n  debug_strip ${INSTALL}/usr/lib/kodi/kodi.bin\n}\n\npost_install() {\n  enable_service kodi.target\n  enable_service kodi-autostart.service\n  enable_service kodi-cleanlogs.service\n  enable_service kodi-halt.service\n  enable_service kodi-poweroff.service\n  enable_service kodi-reboot.service\n  enable_service kodi-waitonnetwork.service\n  enable_service kodi.service\n  enable_service kodi-lirc-suspend.service\n  enable_service kodi-cleanpackagecache.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/profile.d/00-addons.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n# addons profile.d/*.profile\nfor config in /storage/.kodi/addons/*/profile.d/*.profile; do\n  if [ -f \"$config\" ] ; then\n    . $config\n  fi\ndone\n\noe_setup_addon() {\n  if [ ! -z $1 ] ; then\n    DEF=\"/storage/.kodi/addons/$1/settings-default.xml\"\n    CUR=\"/storage/.kodi/userdata/addon_data/$1/settings.xml\"\n\n    # export some useful variables\n    ADDON_DIR=\"$HOME/.kodi/addons/$1\"\n    ADDON_HOME=\"$HOME/.kodi/userdata/addon_data/$1\"\n    ADDON_LOG_FILE=\"$ADDON_HOME/service.log\"\n\n    [ ! -d $ADDON_HOME ] && mkdir -p $ADDON_HOME\n\n    # copy defaults\n    if [ -f \"$DEF\" -a ! -f \"$CUR\" ] ; then\n      cp \"$DEF\" \"$CUR\"\n    fi\n\n    # parse config\n    for xml_file in \"$DEF\" \"$CUR\"; do\n      if [ -f \"$xml_file\" ]; then\n        XML_SETTINGS_VER=\"$(xmlstarlet sel -t -m settings -v @version $xml_file)\"\n        if [ \"$XML_SETTINGS_VER\" = \"2\" ]; then\n          eval $(xmlstarlet sel -t -m settings/setting -v @id -o \"=\" -v . -n \"$xml_file\" | sed -e \"s/'/'\\\\\\\\''/g; s/=/='/; s/$/'/\")\n        else\n          eval $(xmlstarlet sel -t -m settings -m setting -v @id -o \"=\" -v @value -n \"$xml_file\" | sed -e \"s/'/'\\\\\\\\''/g; s/=/='/; s/$/'/\")\n        fi\n      fi\n    done\n  fi\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/profile.d/99-kodi.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n# PATH\nfor addon in /storage/.kodi/addons/*/bin /usr/lib/kodi/addons/*/bin; do\n  [ -d \"$addon\" ] && PATH=\"$PATH:$addon\"\ndone\nexport PATH\n\n# LD_LIBRARY_PATH\nfor addon in /storage/.kodi/addons/*/lib /usr/lib/kodi/addons/*/lib; do\n  [ -d \"$addon\" ] && LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH:$addon\"\ndone\nexport LD_LIBRARY_PATH\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/scripts/aml-wait-for-dispcap.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nWAIT=1\nTIMEOUT=60\nSYSTEMDISPCAP=\"/sys/class/amhdmitx/amhdmitx0/disp_cap\"\nUSERDIR=\"/storage/.kodi/userdata\"\nUSERDISPCAP=\"$USERDIR/disp_cap\"\nUSERDISPADD=\"$USERDIR/disp_add\"\nTMPDISPADD=\"/run/disp_add\"\n\nSTART=0\nTIMEWAITED=0\nif (! grep -q '[^[:space:]]' \"$USERDISPCAP\" 2> /dev/null); then\n  while (! grep -q '[^[:space:]]' \"$SYSTEMDISPCAP\" 2> /dev/null) && [ $TIMEWAITED -le $TIMEOUT ]; do\n    if [ $START -eq 0 ];then\n      echo \"Display not ready. No disp_cap.\"\n      START=1\n    fi\n    sleep \"$WAIT\"\n    TIMEWAITED=$(( TIMEWAITED + WAIT ))\n  done\n  if [ $TIMEWAITED -ge $TIMEOUT ];then\n    echo \"Timeout: Display still not ready.\"\n    echo \"Starting Kodi anyway.\"\n    if [ ! -f \"$USERDISPADD\" ]; then\n      echo 1080p60hz > \"$TMPDISPADD\"\n    fi\n  fi\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/scripts/kodi-after",
    "content": "#!/bin/sh\n#\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Team CoreELEC (https://coreelec.org)\n\nBOOT_STATUS=$HOME/.config/boot.status\nBOOT_HINT=$HOME/.config/boot.hint\n\nBOOT_STATE=\"$(cat $BOOT_STATUS 2>/dev/null)\"\n\n\nprocess_boot_hint()\n{\n\n  if [ \"${BOOT_STATE}\" = \"OK\" ]; then\n    echo \"OK\" > $BOOT_HINT\n  fi\n\n  return 0\n}\n\nprocess_boot_hint\n\nexit 0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/scripts/kodi-config",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nKODI_ROOT=$HOME/.kodi\n\nBOOT_STATE=\"$(cat $HOME/.config/boot.status 2>/dev/null)\"\n\n# May not exist if testing a clean /storage/.kodi without rebooting\nmkdir -p $KODI_ROOT/userdata\n\n# hack: make addon-bins executable\n# done in kodi on addon install. but just in case..\nchmod +x $KODI_ROOT/addons/*/bin/* 2>/dev/null\n\n# remove any user installed CE repo\n[ -d $KODI_ROOT/addons/repository.coreelec ] && rm -rf $KODI_ROOT/addons/repository.coreelec\n\n# setup Kodi sources\nif [ ! -f $KODI_ROOT/userdata/sources.xml ]; then\n  if [ -f /usr/share/kodi/config/sources.xml ]; then\n    cp /usr/share/kodi/config/sources.xml $KODI_ROOT/userdata\n  fi\nfi\n\n#choose libCEC version, default is libcec package version\nln -sf /usr/lib/libcec.so.6.0.2 /var/lib/libcec.so.6\n\n#device specific configs\nmkdir -p /var/share/kodi/system/settings/\n\nif [ -d \"/proc/device-tree/auge_sound\" ]; then\n    ln -sf /usr/share/kodi/system/settings/appliance.g12x.xml /var/share/kodi/system/settings/appliance.xml\nelif [ -d \"/proc/device-tree/aml_sound_meson\" ]; then\n    ln -sf /usr/share/kodi/system/settings/appliance.gxx.xml /var/share/kodi/system/settings/appliance.xml\nfi\n\n# common setup guisettings\nif [ ! -f $KODI_ROOT/userdata/guisettings.xml ] ; then\n  if [ -f /usr/share/kodi/config/guisettings.xml ]; then\n    cp /usr/share/kodi/config/guisettings.xml $KODI_ROOT/userdata\n  fi\n  if [ \"$BOOT_STATE\" = \"SAFE\" ]; then\n    [ ! -f $KODI_ROOT/userdata/guisettings.xml ] && echo '<settings version=\"2\"></settings>' > $KODI_ROOT/userdata/guisettings.xml\n    xmlstarlet ed --omit-decl --inplace -s settings -t elem -n setting -v \"maroon\" -i settings/setting -t attr -n id -v lookandfeel.skincolors $KODI_ROOT/userdata/guisettings.xml\n  fi\nfi\n\nKODI_ARGS=\"\"\n\necho \"KODI_ARGS=\\\"$KODI_ARGS\\\"\" > /run/libreelec/kodi.conf\n\nif [ \"$(uname -m)\" = \"x86_64\" ]; then\n  echo \"MALLOC_MMAP_THRESHOLD_=524288\" >> /run/libreelec/kodi.conf\nelse #arm\n  echo \"MALLOC_MMAP_THRESHOLD_=8192\" >> /run/libreelec/kodi.conf\nfi\n\nif [ -f /storage/.config/kodi.conf ] ; then\n  cat /storage/.config/kodi.conf >>/run/libreelec/kodi.conf\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/scripts/kodi-remote",
    "content": "#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\necho \"Supported keys:\n← ↑ ↓ →         Left | Up | Down | Right\nContext Menu    c\nPlayer Debug    d\nFullscreen      f\nInfo            i\nCodec Info      o\nPause           p\nScreenshot      s\nSkin Debug      t\nStop            x\nVolume Down     -\nVolume Up       +\nBack            Backspace\nSelect          Enter\nQuit Remote     q or ctrl+c\n\"\n\ncom() {\n  kodi-send --action=\"$1\" > /dev/null 2>&1\n  echo -ne \"\\r$1\\e[K\";\n}\n\nwhile true; do\n  read -r -sn1 k\n  case \"$k\" in\n    A) com \"Up\";;\n    B) com \"Down\";;\n    C) com \"Right\";;\n    D) com \"Left\";;\n    c) com \"ContextMenu\";;\n    d) com \"PlayerDebug\";;\n    f) com \"FullScreen\";;\n    i) com \"Info\";;\n    o) com \"CodecInfo\";;\n    p) com \"Pause\";;\n    s) com \"TakeScreenshot\";;\n    t) com \"Skin.ToggleDebug\";;\n    x) com \"Stop\";;\n    -) com \"VolumeDown\";;\n    +) com \"VolumeUp\";;\n    $'\\177') com \"Back\";;\n    \"\") com \"Select\";;\n    q) exit\n  esac\ndone\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/scripts/kodi-safe-mode",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nKODI_ROOT=$HOME/.kodi\n\nKODI_ROOT_FAILED=$KODI_ROOT.FAILED\nBOOT_STATUS=$HOME/.config/boot.status\n\nprocess_boot_status()\n{\n  BOOT_STATE=\"$(cat $BOOT_STATUS 2>/dev/null)\"\n\n  if [ \"${BOOT_STATE}\" = \"SAFE\" ]; then\n    if [ ! -d $KODI_ROOT_FAILED ]; then\n      # entering safe mode - rename failed .kodi, and restart with clean .kodi\n      mv $KODI_ROOT $KODI_ROOT_FAILED\n      reboot\n    else\n      # exiting safe mode - restore failed .kodi\n      rm -fr $KODI_ROOT\n      mv $KODI_ROOT_FAILED $KODI_ROOT\n      echo \"OK\" > $BOOT_STATUS\n    fi\n  else\n    echo \"OK\" > $BOOT_STATUS\n  fi\n\n  return 0\n}\n\nprocess_boot_status\n\nexit 0\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/scripts/kodi.sh",
    "content": "#!/bin/sh\n#      Copyright (C) 2008-2013 Team XBMC\n#      http://xbmc.org\n#\n#  This Program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2, or (at your option)\n#  any later version.\n#\n#  This Program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#  GNU General Public License for more details.\n\n. /etc/profile\n\ntrap cleanup TERM\n\nKODI_ROOT=$HOME/.kodi\n\nSAVED_ARGS=\"$@\"\nCRASHLOG_DIR=$KODI_ROOT/temp\n\nBOOT_STATUS=$HOME/.config/boot.status\nNOSAFE_MODE=$HOME/.config/safemode.disable\nCRASH_HIST=/run/libreelec/crashes.dat\nKODI_MAX_RESTARTS=@KODI_MAX_RESTARTS@\nKODI_MAX_SECONDS=@KODI_MAX_SECONDS@\n\ncleanup() {\n  # make systemd happy by not exiting immediately but\n  # wait for kodi to exit\n  while killall -0 kodi.bin &>/dev/null; do\n    sleep 0.5\n  done\n}\n\ncommand_exists()\n{\n  command -v $1 &>/dev/null\n}\n\nsingle_stacktrace()\n{\n  # core filename is \"core.*kodi.bin.*\"\n  find \"$1\" -name 'core.*kodi.bin.*' | while read core; do\n    echo \"=====>  Core file: \"$core\"\" >> $FILE\n    echo \"        =========================================\" >> $FILE\n    if [ -f /storage/.config/debug.enhanced ]; then\n      gdb /usr/lib/kodi/kodi.bin --core=\"$core\" --batch -ex \"thread apply all bt full\" -ex \"info registers\" -ex \"set print asm-demangle on\" -ex \"disassemble\" 2>/dev/null >> $FILE\n    else\n      gdb /usr/lib/kodi/kodi.bin --core=\"$core\" --batch -ex \"thread apply all bt\" 2>/dev/null >> $FILE\n    fi\n    rm -f \"$core\"\n  done\n}\n\ndetect_crash_loop()\n{\n  # use monotonic time (in case date/time changes after booting)\n  NOW_TIME=$(awk '/^now/ {print int($3 / 1000000000)}' /proc/timer_list)\n  echo \"$NOW_TIME\" >> $CRASH_HIST\n\n  NUM_RESTARTS=$(wc -l $CRASH_HIST | cut -d' ' -f1)\n  FIRST_RESTART_TIME=$(tail -n $KODI_MAX_RESTARTS $CRASH_HIST | head -n 1)\n\n  # kodi restart loop detected? fail this kodi install\n  if [ $NUM_RESTARTS -ge $KODI_MAX_RESTARTS -a $KODI_MAX_SECONDS -ge $((NOW_TIME - FIRST_RESTART_TIME)) ]; then\n    return 0\n  else\n    return 1\n  fi\n}\n\nactivate_safe_mode()\n{\n  [ -f $NOSAFE_MODE ] && return 0\n\n  BOOT_STATE=\"$(cat $BOOT_STATUS 2>/dev/null)\"\n\n  if [ \"${BOOT_STATE:-OK}\" = \"OK\" ]; then\n    # generate logfiles zip for the failed kodi\n    /usr/bin/createlog\n    lastlog=$(ls -1 /storage/logfiles/*.zip | tail -n 1)\n    mv $lastlog /storage/logfiles/log-$(date -u +%Y-%m-%d-%H.%M.%S)-FAILED.zip\n\n    echo \"SAFE\" > $BOOT_STATUS\n  fi\n\n  return 0\n}\n\nprint_crash_report()\n{\n  mkdir -p $CRASHLOG_DIR\n\n  DATE=`date +%Y%m%d%H%M%S`\n  FILE=\"$CRASHLOG_DIR/.kodi_crashlog.log\"\n  echo \"############## kodi CRASH LOG ###############\" > $FILE\n  echo >> $FILE\n  echo \"################ SYSTEM INFO ################\" >> $FILE\n  echo -n \" Date: \" >> $FILE\n  date >> $FILE\n  echo \" kodi Options: $SAVED_ARGS\" >> $FILE\n  echo -n \" Arch: \" >> $FILE\n  uname -m >> $FILE\n  echo -n \" Kernel: \" >> $FILE\n  uname -rvs >> $FILE\n  echo -n \" Release: \" >> $FILE\n  . /etc/os-release\n  echo $NAME $VERSION >> $FILE\n  echo \"############## END SYSTEM INFO ##############\" >> $FILE\n  echo >> $FILE\n  echo \"############### STACK TRACE #################\" >> $FILE\n  if command_exists gdb; then\n    single_stacktrace /storage/.cache/cores\n  else\n    echo \"gdb not installed, can't get stack trace.\" >> $FILE\n  fi\n  echo \"############# END STACK TRACE ###############\" >> $FILE\n  echo >> $FILE\n  echo \"################# LOG FILE ##################\" >> $FILE\n  echo >> $FILE\n  cat $KODI_ROOT/temp/kodi.log >> $FILE\n  echo >> $FILE\n  echo \"############### END LOG FILE ################\" >> $FILE\n  echo >> $FILE\n  echo \"############ END kodi CRASH LOG #############\" >> $FILE\n  OFILE=\"$FILE\"\n  FILE=\"$CRASHLOG_DIR/kodi_crashlog_$DATE.log\"\n  mv \"$OFILE\" \"$FILE\"\n  ln -sf \"$(basename $FILE)\" \"$CRASHLOG_DIR/kodi_crash.log\"\n  echo \"Crash report available at $FILE\"\n}\n\nif command_exists gdb; then\n  ulimit -c unlimited\nfi\n\n# clean up any stale cores. just in case\nfind /storage/.cache/cores -type f -delete\n\n# clean zero-byte database files that prevent migration/startup\nfor file in $KODI_ROOT/userdata/Database/*.db; do\n  if [ -e \"$file\" ]; then\n    [ -s $file ] || rm -f $file\n  fi\ndone\n\n/usr/lib/kodi/kodi.bin $SAVED_ARGS\nRET=$?\n\nif [ $(( ($RET >= 131 && $RET <= 136) || $RET == 139 )) = \"1\" ] ; then\n  # Crashed with core dump\n  print_crash_report\n\n  # Cleanup. Keep only youngest 10 reports but current in any case\n  rm -f $(ls -1t $CRASHLOG_DIR/kodi_crashlog_*.log | grep -v \"$FILE\" | tail -n +10)\n\n  # Enable safe mode if a crash loop is detected\n  detect_crash_loop && activate_safe_mode\nfi\n\n# Filter Kodi powerdown/restartapp/reboot codes to satisfy systemd\n[ \"$RET\" -ge 64 -a \"$RET\" -le 66 ] && RET=0\n\nexit $RET\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/scripts/pastekodi",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019 Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2019-present Team CoreELEC (https://coreelec.org)\n\ncat_data() {\n  echo \"========== ${1} ==========\"\n  cat\n}\n\ncat_file() {\n  if [ -f \"${1}\" ]; then\n    cat \"${1}\" | cat_data \"${2:-${1}}\"\n  fi\n}\n\nusage() {\n  [ -n \"${1}\" ] && echo \"Unknown argument: ${1}\"\n  cat <<EOF\nUsage: $0 [-c] [-h]\n\n  -c   send output to stdout not via /usr/bin/pastebinit\n  -h   this help message\nEOF\n  exit 1\n}\n\nOUTPUT=\"/usr/bin/pastebinit\"\n\nwhile getopts \":hc\" opt; do\n  case ${opt} in\n    c) OUTPUT=\"cat\";;\n    ?) usage \"${OPTARG}\";;\n    h) usage;;\n  esac\ndone\n\nsource /etc/os-release\nSYSTEM_ARCH=\"${COREELEC_ARCH#*.}\"\n\n# If running in SAFE mode, send FAILED logs\nif [ \"$(cat \"/storage/.config/boot.status\" 2>/dev/null)\" = \"SAFE\" ]; then\n  KODI_ROOT=\"/storage/.kodi.FAILED/temp\"\nelse\n  KODI_ROOT=\"/storage/.kodi/temp\"\nfi\n\nif [ \"$(basename $0)\" = \"pastekodi\" ]; then\n  LOG_TYPE=\"System\"\n  LOG_FILE=\"${KODI_ROOT}/kodi.log\"\nelse\n  LOG_TYPE=\"Crash\"\n  LOG_FILE=\"${KODI_ROOT}/kodi_crash.log\"\nfi\n\n(\n  echo \"${LOG_TYPE} log output for: $(lsb_release)\"\n\n  if [ \"${SYSTEM_ARCH}\" = \"x86_64\" ]; then\n    if [ -d \"/sys/firmware/efi\" ]; then\n      echo \"Firmware Boot Mode: EFI\"\n    else\n      echo \"Firmware Boot Mode: BIOS\"\n    fi\n  fi\n  if [ \"${COREELEC_PROJECT}\" = \"RPi\" ]; then\n    echo \"RPi Hardware Revision: $(vcgencmd otp_dump | grep 30: | cut -d: -f2)\"\n  fi\n\n  cat_file \"${LOG_FILE}\"\n\n  journalctl -a -b -0 -o short-precise | cat_data \"journalctl -a -b -0\"\n\n  if [ \"${COREELEC_PROJECT}\" = \"RPi\" ]; then\n    bootloader_version=\"$(vcgencmd bootloader_version)\"\n    if ! echo \"${bootloader_version}\" | grep -q \"Command not registered\"; then\n      echo  \"${bootloader_version}\" | cat_data \"Bootloader version\"\n    fi\n  fi\n\n  cat_file \"/flash/config.txt\" # RPi\n  cat_file \"/flash/distroconfig.txt\" # RPi\n  cat_file \"/flash/cmdline.txt\" # RPi\n\n  cat_file \"/flash/syslinux.cfg\" # x86 BIOS\n  cat_file \"/flash/EFI/BOOT/syslinux.cfg\" # x86 EFI\n  cat_file \"/flash/extlinux.conf\" # x86 legacy\n\n  cat_file \"/flash/extlinux/extlinux.conf\" # u-boot\n\n  cat_file \"${KODI_ROOT}/.smb/smb.conf\"\n  cat_file \"${KODI_ROOT}/.smb/user.conf\"\n  cat_file \"/run/samba/smb.conf\"\n\n  pem_sys=\"$(sha256sum /etc/ssl/cacert.pem.system | cut -d' ' -f1)\"\n  pem_run=\"$(sha256sum /run/libreelec/cacert.pem | cut -d' ' -f1)\"\n  if [ \"${pem_sys}\" = \"${pem_run}\" ]; then\n    cat_data \"/run/libreelec/cacert.pem is default\" </dev/null\n  else\n    cat_file /run/libreelec/cacert.pem \"/run/libreelec/cacert.pem (modified)\"\n  fi\n\n  if [ \"${COREELEC_PROJECT}\" = \"Amlogic-ce\" ]; then\n    ce-debug -l | cat_data \"ce-debug -l\"\n  fi\n\n) | ${OUTPUT} 2>/dev/null\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/scripts/service-addon-wrapper",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nif [ $# -ne 3 ] ; then\n  echo \"$0 usage: context addon-id addon-path\"\n  exit 1\nfi\n\nCONTEXT=\"$1\"\nADDON_ID=\"$2\"\nADDON_PATH=\"$3\"\n\nif [ ! -d /storage/.config/system.d ] ; then\n  mkdir -p /storage/.config/system.d\nfi\n\nSERVICE_FILE=\"${ADDON_PATH}/system.d/${ADDON_ID}.service\"\n\nif [ -f \"${SERVICE_FILE}\" ] ; then\n  case \"${CONTEXT}\" in\n    enable)\n      systemctl enable \"${SERVICE_FILE}\"\n      chmod +x \"${ADDON_PATH}/bin\"/*\n      systemctl start \"${ADDON_ID}.service\"\n      ;;\n    disable | pre-uninstall)\n      systemctl stop \"${ADDON_ID}.service\"\n      systemctl disable \"${ADDON_ID}.service\"\n      ;;\n    post-update)\n      # post-update is triggered on update,\n      # make sure to stop and re-install service\n      systemctl stop \"${ADDON_ID}.service\"\n      systemctl disable \"${ADDON_ID}.service\"\n      systemctl enable \"${SERVICE_FILE}\"\n      chmod +x \"${ADDON_PATH}/bin\"/*\n      systemctl start \"${ADDON_ID}.service\"\n      ;;\n    restart)\n      systemctl restart \"${ADDON_ID}.service\"\n      ;;\n    reload)\n      systemctl reload \"${ADDON_ID}.service\"\n      ;;\n    *)\n      echo \"$0: unknown service context $CONTEXT\"\n      exit 1\n      ;;\n  esac\nfi\n\nif [ ! -d /storage/.cache/kernel-overlays ] ; then\n  mkdir -p /storage/.cache/kernel-overlays\nfi\n\n# kernel-overlay addons built into the image have their\n# files installed in the default /usr/lib/kernel-overlays\n# location, not inside the kodi addon dir\n\ncase \"${ADDON_PATH}\" in\n  /usr/share/kodi/addons/*)\n    OVERLAY_PATH=\"/usr/lib/kernel-overlays/${ADDON_ID}\"\n    ;;\n  *)\n    OVERLAY_PATH=\"${ADDON_PATH}/kernel-overlay\"\n    ;;\nesac\n\ncreate_overlay_conf() {\n  rm -f \"${OVERLAY_CONF}\"\n  echo \"${OVERLAY_PATH}\" > \"${OVERLAY_CONF}\"\n}\n\nif [ -d \"${OVERLAY_PATH}\" ] ; then\n  OVERLAY_CONF=\"/storage/.cache/kernel-overlays/50-${ADDON_ID}.conf\"\n\n  case \"${CONTEXT}\" in\n    enable | post-update )\n      create_overlay_conf\n      ;;\n    disable | pre-uninstall )\n      rm -f \"${OVERLAY_CONF}\"\n      ;;\n    update )\n      if [ -e \"${OVERLAY_CONF}\" ] ; then\n        create_overlay_conf\n      fi\n      ;;\n    *)\n      echo \"$0: unknown overlay context $CONTEXT\"\n      exit 1\n      ;;\n  esac\n\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/scripts/setwakeup.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nif [ -f /sys/class/rtc/rtc0/wakealarm ]; then\n  logger -t setwakeup.sh \"### Setting system wakeup time ###\"\n  echo 0 > /sys/class/rtc/rtc0/wakealarm\n  echo $1 > /sys/class/rtc/rtc0/wakealarm\n  logger -t setwakeup.sh \"### $(cat /proc/driver/rtc) ###\"\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/scripts/xml_merge.py",
    "content": "#!/usr/bin/env python3\n\n# taken from http://stackoverflow.com/a/14879370 with minor modifications\n\nfrom __future__ import print_function\nimport os\nimport sys\nimport xml.dom.minidom\nfrom xml.etree import ElementTree as et\n\ndef printerr(*args, **kwargs):\n    print(*args, file=sys.stderr, **kwargs)\n\nclass hashabledict(dict):\n    def __hash__(self):\n        return hash(tuple(sorted(self.items())))\n\nclass XMLCombiner(object):\n    def __init__(self, filenames):\n        if len(filenames) == 0:\n            raise Exception('No filenames!')\n\n        try:\n            self.roots = []\n            for f in filenames:\n              self.roots.append(et.parse(f).getroot())\n        except xml.etree.ElementTree.ParseError:\n            printerr(\"ERROR: Unable to parse XML file %s\" % f)\n            raise\n\n    def prettyPrint(self, etree_xml):\n        minidom = xml.dom.minidom.parseString(et.tostring(etree_xml))\n        return \"\\n\".join([line for line in minidom.toprettyxml(indent=\"  \", encoding=\"utf-8\").decode('utf-8').split('\\n') if line.strip() != \"\"])\n\n    def combine(self):\n        for r in self.roots[1:]:\n            self.combine_element(self.roots[0], r)\n        return self.prettyPrint(self.roots[0])\n\n    def combine_element(self, one, other):\n        mapping = {(el.tag, hashabledict(el.attrib)): el for el in one}\n        for el in other:\n            if len(el) == 0:\n                try:\n                    mapping[(el.tag, hashabledict(el.attrib))].text = el.text\n                except KeyError:\n                    mapping[(el.tag, hashabledict(el.attrib))] = el\n                    one.append(el)\n            else:\n                try:\n                    self.combine_element(mapping[(el.tag, hashabledict(el.attrib))], el)\n                except KeyError:\n                    mapping[(el.tag, hashabledict(el.attrib))] = el\n                    one.append(el)\n\nif __name__ == '__main__':\n    xmlfiles = [file for file in sys.argv[1:] if os.path.exists(file)]\n\n    r = XMLCombiner(xmlfiles).combine()\n\n    print(r)\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/sleep.d/openelec-sleep.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\nrun_scripts()\n{\n    list_scripts $1\n    for script in $SCRIPTS ; do\n        progress \"running sleep script $script ($1)...\"\n        sh /usr/lib/systemd/system-sleep.serial/$script $1\n    done\n}\n\nlist_scripts()\n{\n    case $1 in\n        pre)\n            SCRIPTS=$(ls /usr/lib/systemd/system-sleep.serial/ | sort)\n        ;;\n        post)\n            SCRIPTS=$(ls /usr/lib/systemd/system-sleep.serial/ | sort -r)\n        ;;\n    esac\n}\n\nrun_scripts $1\n\nexit 0\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/sleep.d/wifi.power",
    "content": "#!/bin/sh\ncase \"$1\" in\n  pre)\n    ;;\n  post)\n    connmanctl disable wifi\n    sleep 5\n    connmanctl enable wifi\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/sleep.d.serial/10-addon-sleep.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\n# see https://wiki.archlinux.org/index.php/Power_Management#Hooks_in_.2Fusr.2Flib.2Fsystemd.2Fsystem-sleep\n\nfor script in $HOME/.kodi/addons/*/sleep.d/*.power; do\n  if [ -f $script ]; then\n    progress \"running addon sleep script $script ($@)...\"\n    sh $script $@\n  fi\ndone\n\nexit 0"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/sleep.d.serial/20-custom-sleep.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2013 Stephan Raue (stephan@openelec.tv)\n\n. /etc/profile\n\n# see https://wiki.archlinux.org/index.php/Power_Management#Hooks_in_.2Fusr.2Flib.2Fsystemd.2Fsystem-sleep\n\nfor script in $HOME/.config/sleep.d/*.power; do\n  if [ -f $script ]; then\n    progress \"running custom sleep script $script ($@)...\"\n    sh $script $@\n  fi\ndone\n\nexit 0"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/system.d/kodi-autostart.service",
    "content": "[Unit]\nDescription=Kodi user autostart script\nBefore=kodi.service\nAfter=network-online.target graphical.target\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStart=-/bin/sh -c \". /etc/profile; test -f /storage/.config/autostart.sh && exec /bin/sh /storage/.config/autostart.sh\"\nExecStop=-/bin/sh -c \". /etc/profile; test -f /storage/.config/autostop.sh && exec /bin/sh /storage/.config/autostop.sh\"\nRemainAfterExit=yes\nTimeoutStopSec=5min\n\n[Install]\nWantedBy=kodi.service\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/system.d/kodi-cleanlogs.service",
    "content": "[Unit]\nDescription=Kodi clean debug logs\nConditionKernelCommandLine=!debugging\nConditionPathExists=!/storage/.cache/debug.libreelec\nBefore=kodi.service\n\n[Service]\nType=oneshot\nExecStart=-/bin/sh -c 'rm -rf /storage/.kodi/userdata/addon_data/*/*.log /storage/.kodi/userdata/addon_data/*/log/*'\nRemainAfterExit=yes\n\n[Install]\nWantedBy=kodi.service\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/system.d/kodi-cleanpackagecache.service",
    "content": "[Unit]\nDescription=Kodi clean package cache\nConditionPathExists=/storage/.kodi/addons/packages\nBefore=kodi.service\n\n[Service]\nType=oneshot\nExecStart=-/bin/sh -c 'rm -rf /storage/.kodi/addons/packages'\nRemainAfterExit=yes\n\n[Install]\nWantedBy=kodi.service\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/system.d/kodi-halt.service",
    "content": "[Unit]\nDescription=Kodi halt script\nAfter=kodi.service\nBefore=systemd-halt.service\nDefaultDependencies=no\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStartPre=-/usr/lib/kodi/kodi-after\nExecStart=-/bin/sh -c \". /etc/profile; exec /bin/sh /storage/.config/shutdown.sh halt\"\nRemainAfterExit=yes\n\n[Install]\nWantedBy=halt.target\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/system.d/kodi-lirc-suspend.service",
    "content": "[Unit]\nDescription=LIRC sleep hook\nBefore=sleep.target\nStopWhenUnneeded=yes\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=-/usr/bin/kodi-send --host=127.0.0.1 -a \"LIRC.Stop\"\nExecStop=-/usr/bin/kodi-send --host=127.0.0.1 -a \"LIRC.Start\"\n\n[Install]\nWantedBy=sleep.target\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/system.d/kodi-poweroff.service",
    "content": "[Unit]\nDescription=Kodi poweroff script\nAfter=kodi.service\nBefore=systemd-poweroff.service\nDefaultDependencies=no\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStartPre=-/usr/lib/kodi/kodi-after\nExecStart=-/bin/sh -c \". /etc/profile; exec /bin/sh /storage/.config/shutdown.sh poweroff\"\nRemainAfterExit=yes\n\n[Install]\nWantedBy=poweroff.target\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/system.d/kodi-reboot.service",
    "content": "[Unit]\nDescription=Kodi reboot script\nAfter=kodi.service\nBefore=systemd-reboot.service\nDefaultDependencies=no\n\n[Service]\nType=oneshot\nEnvironment=HOME=/storage\nExecStartPre=-/usr/lib/kodi/kodi-after\nExecStart=-/bin/sh -c \". /etc/profile; exec /bin/sh /storage/.config/shutdown.sh reboot\"\nRemainAfterExit=yes\n\n[Install]\nWantedBy=reboot.target\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/system.d/kodi-waitonnetwork.service",
    "content": "[Unit]\nDescription=Wait on network\nAfter=connman.service\nBefore=network-online.target\nDefaultDependencies=no\nConflicts=shutdown.target\nConditionFileNotEmpty=/storage/.cache/coreelec/network_wait\nConditionPathExists=!/dev/.kernel_ipconfig\nConditionPathExists=/storage/.kodi/userdata/addon_data/service.coreelec.settings/oe_settings.xml\n\n[Service]\nType=oneshot\nEnvironmentFile=/storage/.cache/coreelec/network_wait\nExecStart=/usr/sbin/connmand-wait-online --timeout=${WAIT_NETWORK_TIME}\nStandardOutput=tty\nRemainAfterExit=yes\nSuccessExitStatus=1\n\n[Install]\nWantedBy=network-online.target\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/system.d/kodi.service",
    "content": "[Unit]\nDescription=Kodi Media Center\nAfter=network-online.target graphical.target\nRequires=graphical.target\nWants=network-online.target\n\n[Service]\nEnvironmentFile=/usr/lib/kodi/kodi.conf\nEnvironmentFile=-/run/libreelec/kodi.conf\nEnvironmentFile=-/run/libreelec/debug/kodi.conf\nExecStartPre=-/usr/lib/kodi/aml-wait-for-dispcap.sh\nExecStartPre=-/usr/lib/kodi/kodi-config\nExecStart=/usr/lib/kodi/kodi.sh --standalone -fs $KODI_ARGS $KODI_DEBUG\nExecStop=/bin/kill -TERM $MAINPID\nExecStopPost=-/usr/lib/kodi/kodi-safe-mode\nTimeoutStopSec=30\nRestart=always\nRestartSec=2\nStartLimitInterval=0\nLimitNOFILE=16384\nTimeoutStartSec=300\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/system.d/kodi.target",
    "content": "[Unit]\nDescription=Kodi Mediacenter Interface\nRequires=multi-user.target graphical.target network-online.target\nAfter=network-online.target graphical.target\nWants=network-online.target\nConflicts=rescue.target\nAllowIsolate=yes\n\n[Install]\nAlias=default.target\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/tmpfiles.d/kodi-userdirs.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nd    /storage/music              0777 root root - -\nd    /storage/pictures           0777 root root - -\nd    /storage/tvshows            0777 root root - -\nd    /storage/videos             0777 root root - -\nd    /storage/screenshots        0777 root root - -\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/mediacenter/kodi/tmpfiles.d/kodi.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nd    /run/kodi     0755 root root - -\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/libamcodec/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"libamcodec\"\nPKG_LICENSE=\"proprietary\"\nPKG_SITE=\"http://openlinux.amlogic.com\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"libamplayer: Interface library for Amlogic media codecs\"\nPKG_TOOLCHAIN=\"manual\"\n\ncase \"${DEVICE}\" in\n  Amlogic-ng*)\n    PKG_VERSION=\"eb874808303936404027f3fc7f7434285d0a7d2f\"\n    PKG_SHA256=\"9465b1029aa8ca7e2d1c5ffc3c2c9c5c524682e1c84321d91766dbdc3f26ccb6\"\n    ;;\n  Amlogic-ne)\n    PKG_VERSION=\"0f27efb9e958eaa66144709f1964179a019f5c32\"\n    PKG_SHA256=\"9cd7497999bdf4a709aee8e0cefe51940b40b9091dc831dfc08509d82637da30\"\n    ;;\nesac\n\nPKG_SOURCE_NAME=\"${PKG_NAME}-${ARCH}-${PKG_VERSION}.tar.xz\"\nPKG_URL=\"https://sources.coreelec.org/${PKG_SOURCE_NAME}\"\n\nmake_target() {\n  cp -PR * $SYSROOT_PREFIX\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr\n    cp -PR usr/lib $INSTALL/usr\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/libdovi/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"libdovi\"\nPKG_VERSION=\"3ec01dccbf5a74dfc7c58e3864029187b715344f\"\nPKG_SITE=\"https://github.com/quietvoid/dovi_tool\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nif [ \"${BUILD_FROM_SRC}\" = \"yes\" ]; then\n  PKG_SHA256=\"9483c81af5ca34ad8081ee71b0c31bdb92114d29bdcb664774ede4071c3fcea2\"\n  PKG_URL=\"https://github.com/quietvoid/dovi_tool/archive/${PKG_VERSION}.tar.gz\"\n  PKG_DEPENDS_TARGET+=\" cargo-c:host\"\nelse\n  case \"${TARGET_ARCH}\" in\n    \"arm\")\n      PKG_SHA256=\"e034776d5e8fbad6f22092cd06c7a94252962467de7ae298cc98f2823281f8fa\"\n      ;;\n    \"aarch64\")\n      PKG_SHA256=\"6807b37cb55d49953196cc150941e6fe26c7deb42e25d266d82bb37b29e3c612\"\n      ;;\n  esac\n  PKG_SOURCE_NAME=\"${PKG_NAME}-${ARCH}-${PKG_VERSION}.tar.xz\"\n  PKG_URL=\"https://sources.coreelec.org/${PKG_SOURCE_NAME}\"\nfi\nPKG_LICENSE=\"MIT\"\nPKG_LONGDESC=\"dovi_tool is a CLI tool combining multiple utilities for working with Dolby Vision.\"\nPKG_TOOLCHAIN=\"manual\"\n\nif [ \"${BUILD_FROM_SRC}\" = \"yes\" ]; then\npre_make_target() {\n  CARGO_BASE_OPTS=\"--manifest-path ${PKG_BUILD}/dolby_vision/Cargo.toml \\\n                   --target ${TARGET_NAME}\"\n  CARGO_BUILD_OPTS=\"--library-type staticlib \\\n                    --profile release \\\n                    --prefix /usr\n                    ${CARGO_BASE_OPTS}\"\n}\n\nmake_target() {\n  cargo fetch ${CARGO_BASE_OPTS}\n  cargo cbuild ${CARGO_BUILD_OPTS}\n}\n\nmakeinstall_target() {\n  cargo cinstall ${CARGO_BUILD_OPTS} --destdir ${SYSROOT_PREFIX}\n  cargo cinstall ${CARGO_BUILD_OPTS} --destdir ${INSTALL}\n}\nelse\nmake_target() {\n  cp -PR * ${SYSROOT_PREFIX}\n}\n\nmakeinstall_target() {\n  : #\n}\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/obu_util/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"obu_util\"\nPKG_VERSION=\"0.1\"\nPKG_SHA256=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://aomedia.googlesource.com/aom/+/refs/tags/v3.3.0/av1/common/obu_util.c\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"av1 obu_util\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_target() {\n  ${CC} *.c -c -I. ${CFLAGS}\n  ${AR} -rcs libobu_util.a *.o\n  ${RANLIB}  libobu_util.a\n}\n\nmakeinstall_target() {\n  mkdir -p ${SYSROOT_PREFIX}/usr/{lib,include}\n  cp libobu_util.a ${SYSROOT_PREFIX}/usr/lib\n  cp obu_util.h aom_codec.h aom_image.h aom_integer.h ${SYSROOT_PREFIX}/usr/include\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/obu_util/sources/aom_codec.h",
    "content": "/*\n * Copyright (c) 2016, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n\n///////////////////////////////////////////////////////////////////////////////\n// Internal implementation details\n///////////////////////////////////////////////////////////////////////////////\n//\n// There are two levels of interfaces used to access the AOM codec: the\n// the aom_codec_iface and the aom_codec_ctx.\n//\n// 1. aom_codec_iface_t\n//    (Related files: aom/aom_codec.h, aom/src/aom_codec.c,\n//    aom/internal/aom_codec_internal.h, av1/av1_cx_iface.c,\n//    av1/av1_dx_iface.c)\n//\n// Used to initialize the codec context, which contains the configuration for\n// for modifying the encoder/decoder during run-time. See the other\n// documentation in this header file for more details. For the most part,\n// users will call helper functions, such as aom_codec_iface_name,\n// aom_codec_get_caps, etc., to interact with it.\n//\n// The main purpose of the aom_codec_iface_t is to provide a way to generate\n// a default codec config, find out what capabilities the implementation has,\n// and create an aom_codec_ctx_t (which is actually used to interact with the\n// codec).\n//\n// Note that the implementations for the AV1 algorithm are located in\n// av1/av1_cx_iface.c and av1/av1_dx_iface.c\n//\n//\n// 2. aom_codec_ctx_t\n//  (Related files: aom/aom_codec.h, av1/av1_cx_iface.c, av1/av1_dx_iface.c,\n//   aom/aomcx.h, aom/aomdx.h, aom/src/aom_encoder.c, aom/src/aom_decoder.c)\n//\n// The actual interface between user code and the codec. It stores the name\n// of the codec, a pointer back to the aom_codec_iface_t that initialized it,\n// initialization flags, a config for either encoder or the decoder, and a\n// pointer to internal data.\n//\n// The codec is configured / queried through calls to aom_codec_control,\n// which takes a control ID (listed in aomcx.h and aomdx.h) and a parameter.\n// In the case of \"getter\" control IDs, the parameter is modified to have\n// the requested value; in the case of \"setter\" control IDs, the codec's\n// configuration is changed based on the parameter. Note that a aom_codec_err_t\n// is returned, which indicates if the operation was successful or not.\n//\n// Note that for the encoder, the aom_codec_alg_priv_t points to the\n// the aom_codec_alg_priv structure in av1/av1_cx_iface.c, and for the decoder,\n// the struct in av1/av1_dx_iface.c. Variables such as AV1_COMP cpi are stored\n// here and also used in the core algorithm.\n//\n// At the end, aom_codec_destroy should be called for each initialized\n// aom_codec_ctx_t.\n\n/*!\\defgroup codec Common Algorithm Interface\n * This abstraction allows applications to easily support multiple video\n * formats with minimal code duplication. This section describes the interface\n * common to all codecs (both encoders and decoders).\n * @{\n */\n\n/*!\\file\n * \\brief Describes the codec algorithm interface to applications.\n *\n * This file describes the interface between an application and a\n * video codec algorithm.\n *\n * An application instantiates a specific codec instance by using\n * aom_codec_dec_init() or aom_codec_enc_init() and a pointer to the\n * algorithm's interface structure:\n *     <pre>\n *     my_app.c:\n *       extern aom_codec_iface_t my_codec;\n *       {\n *           aom_codec_ctx_t algo;\n *           int threads = 4;\n *           aom_codec_dec_cfg_t cfg = { threads, 0, 0, 1 };\n *           res = aom_codec_dec_init(&algo, &my_codec, &cfg, 0);\n *       }\n *     </pre>\n *\n * Once initialized, the instance is managed using other functions from\n * the aom_codec_* family.\n */\n#ifndef AOM_AOM_AOM_CODEC_H_\n#define AOM_AOM_AOM_CODEC_H_\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"aom_image.h\"\n#include \"aom_integer.h\"\n\n/*!\\brief Decorator indicating a function is deprecated */\n#ifndef AOM_DEPRECATED\n#if defined(__GNUC__) && __GNUC__\n#define AOM_DEPRECATED __attribute__((deprecated))\n#elif defined(_MSC_VER)\n#define AOM_DEPRECATED\n#else\n#define AOM_DEPRECATED\n#endif\n#endif /* AOM_DEPRECATED */\n\n#ifndef AOM_DECLSPEC_DEPRECATED\n#if defined(__GNUC__) && __GNUC__\n#define AOM_DECLSPEC_DEPRECATED /**< \\copydoc #AOM_DEPRECATED */\n#elif defined(_MSC_VER)\n/*!\\brief \\copydoc #AOM_DEPRECATED */\n#define AOM_DECLSPEC_DEPRECATED __declspec(deprecated)\n#else\n#define AOM_DECLSPEC_DEPRECATED /**< \\copydoc #AOM_DEPRECATED */\n#endif\n#endif /* AOM_DECLSPEC_DEPRECATED */\n\n/*!\\brief Decorator indicating a function is potentially unused */\n#ifdef AOM_UNUSED\n#elif defined(__GNUC__) || defined(__clang__)\n#define AOM_UNUSED __attribute__((unused))\n#else\n#define AOM_UNUSED\n#endif\n\n/*!\\brief Decorator indicating that given struct/union/enum is packed */\n#ifndef ATTRIBUTE_PACKED\n#if defined(__GNUC__) && __GNUC__\n#define ATTRIBUTE_PACKED __attribute__((packed))\n#elif defined(_MSC_VER)\n#define ATTRIBUTE_PACKED\n#else\n#define ATTRIBUTE_PACKED\n#endif\n#endif /* ATTRIBUTE_PACKED */\n\n/*!\\brief Current ABI version number\n *\n * \\internal\n * If this file is altered in any way that changes the ABI, this value\n * must be bumped.  Examples include, but are not limited to, changing\n * types, removing or reassigning enums, adding/removing/rearranging\n * fields to structures\n */\n#define AOM_CODEC_ABI_VERSION (7 + AOM_IMAGE_ABI_VERSION) /**<\\hideinitializer*/\n\n/*!\\brief Algorithm return codes */\ntypedef enum {\n  /*!\\brief Operation completed without error */\n  AOM_CODEC_OK,\n\n  /*!\\brief Unspecified error */\n  AOM_CODEC_ERROR,\n\n  /*!\\brief Memory operation failed */\n  AOM_CODEC_MEM_ERROR,\n\n  /*!\\brief ABI version mismatch */\n  AOM_CODEC_ABI_MISMATCH,\n\n  /*!\\brief Algorithm does not have required capability */\n  AOM_CODEC_INCAPABLE,\n\n  /*!\\brief The given bitstream is not supported.\n   *\n   * The bitstream was unable to be parsed at the highest level. The decoder\n   * is unable to proceed. This error \\ref SHOULD be treated as fatal to the\n   * stream. */\n  AOM_CODEC_UNSUP_BITSTREAM,\n\n  /*!\\brief Encoded bitstream uses an unsupported feature\n   *\n   * The decoder does not implement a feature required by the encoder. This\n   * return code should only be used for features that prevent future\n   * pictures from being properly decoded. This error \\ref MAY be treated as\n   * fatal to the stream or \\ref MAY be treated as fatal to the current GOP.\n   */\n  AOM_CODEC_UNSUP_FEATURE,\n\n  /*!\\brief The coded data for this stream is corrupt or incomplete\n   *\n   * There was a problem decoding the current frame.  This return code\n   * should only be used for failures that prevent future pictures from\n   * being properly decoded. This error \\ref MAY be treated as fatal to the\n   * stream or \\ref MAY be treated as fatal to the current GOP. If decoding\n   * is continued for the current GOP, artifacts may be present.\n   */\n  AOM_CODEC_CORRUPT_FRAME,\n\n  /*!\\brief An application-supplied parameter is not valid.\n   *\n   */\n  AOM_CODEC_INVALID_PARAM,\n\n  /*!\\brief An iterator reached the end of list.\n   *\n   */\n  AOM_CODEC_LIST_END\n\n} aom_codec_err_t;\n\n/*! \\brief Codec capabilities bitfield\n *\n *  Each codec advertises the capabilities it supports as part of its\n *  ::aom_codec_iface_t interface structure. Capabilities are extra interfaces\n *  or functionality, and are not required to be supported.\n *\n *  The available flags are specified by AOM_CODEC_CAP_* defines.\n */\ntypedef long aom_codec_caps_t;\n#define AOM_CODEC_CAP_DECODER 0x1 /**< Is a decoder */\n#define AOM_CODEC_CAP_ENCODER 0x2 /**< Is an encoder */\n\n/*! \\brief Initialization-time Feature Enabling\n *\n *  Certain codec features must be known at initialization time, to allow for\n *  proper memory allocation.\n *\n *  The available flags are specified by AOM_CODEC_USE_* defines.\n */\ntypedef long aom_codec_flags_t;\n\n/*!\\brief Time Stamp Type\n *\n * An integer, which when multiplied by the stream's time base, provides\n * the absolute time of a sample.\n */\ntypedef int64_t aom_codec_pts_t;\n\n/*!\\brief Codec interface structure.\n *\n * Contains function pointers and other data private to the codec\n * implementation. This structure is opaque to the application. Common\n * functions used with this structure:\n *   - aom_codec_iface_name(aom_codec_iface_t *iface): get the\n *     name of the codec\n *   - aom_codec_get_caps(aom_codec_iface_t *iface): returns\n *     the capabilities of the codec\n *   - aom_codec_enc_config_default: generate the default config for\n *     initializing the encoder (see documention in aom_encoder.h)\n *   - aom_codec_dec_init, aom_codec_enc_init: initialize the codec context\n *     structure (see documentation on aom_codec_ctx).\n *\n * To get access to the AV1 encoder and decoder, use aom_codec_av1_cx() and\n *  aom_codec_av1_dx().\n */\ntypedef const struct aom_codec_iface aom_codec_iface_t;\n\n/*!\\brief Codec private data structure.\n *\n * Contains data private to the codec implementation. This structure is opaque\n * to the application.\n */\ntypedef struct aom_codec_priv aom_codec_priv_t;\n\n/*!\\brief Compressed Frame Flags\n *\n * This type represents a bitfield containing information about a compressed\n * frame that may be useful to an application. The most significant 16 bits\n * can be used by an algorithm to provide additional detail, for example to\n * support frame types that are codec specific (MPEG-1 D-frames for example)\n */\ntypedef uint32_t aom_codec_frame_flags_t;\n#define AOM_FRAME_IS_KEY 0x1 /**< frame is the start of a GOP */\n/*!\\brief frame can be dropped without affecting the stream (no future frame\n * depends on this one) */\n#define AOM_FRAME_IS_DROPPABLE 0x2\n/*!\\brief this is an INTRA_ONLY frame */\n#define AOM_FRAME_IS_INTRAONLY 0x10\n/*!\\brief this is an S-frame */\n#define AOM_FRAME_IS_SWITCH 0x20\n/*!\\brief this is an error-resilient frame */\n#define AOM_FRAME_IS_ERROR_RESILIENT 0x40\n/*!\\brief this is a key-frame dependent recovery-point frame */\n#define AOM_FRAME_IS_DELAYED_RANDOM_ACCESS_POINT 0x80\n\n/*!\\brief Iterator\n *\n * Opaque storage used for iterating over lists.\n */\ntypedef const void *aom_codec_iter_t;\n\n/*!\\brief Codec context structure\n *\n * All codecs \\ref MUST support this context structure fully. In general,\n * this data should be considered private to the codec algorithm, and\n * not be manipulated or examined by the calling application. Applications\n * may reference the 'name' member to get a printable description of the\n * algorithm.\n */\ntypedef struct aom_codec_ctx {\n  const char *name;             /**< Printable interface name */\n  aom_codec_iface_t *iface;     /**< Interface pointers */\n  aom_codec_err_t err;          /**< Last returned error */\n  const char *err_detail;       /**< Detailed info, if available */\n  aom_codec_flags_t init_flags; /**< Flags passed at init time */\n  union {\n    /**< Decoder Configuration Pointer */\n    const struct aom_codec_dec_cfg *dec;\n    /**< Encoder Configuration Pointer */\n    const struct aom_codec_enc_cfg *enc;\n    const void *raw;\n  } config;               /**< Configuration pointer aliasing union */\n  aom_codec_priv_t *priv; /**< Algorithm private storage */\n} aom_codec_ctx_t;\n\n/*!\\brief Bit depth for codec\n * *\n * This enumeration determines the bit depth of the codec.\n */\ntypedef enum aom_bit_depth {\n  AOM_BITS_8 = 8,   /**<  8 bits */\n  AOM_BITS_10 = 10, /**< 10 bits */\n  AOM_BITS_12 = 12, /**< 12 bits */\n} aom_bit_depth_t;\n\n/*!\\brief Superblock size selection.\n *\n * Defines the superblock size used for encoding. The superblock size can\n * either be fixed at 64x64 or 128x128 pixels, or it can be dynamically\n * selected by the encoder for each frame.\n */\ntypedef enum aom_superblock_size {\n  AOM_SUPERBLOCK_SIZE_64X64,   /**< Always use 64x64 superblocks. */\n  AOM_SUPERBLOCK_SIZE_128X128, /**< Always use 128x128 superblocks. */\n  AOM_SUPERBLOCK_SIZE_DYNAMIC  /**< Select superblock size dynamically. */\n} aom_superblock_size_t;\n\n/*\n * Library Version Number Interface\n *\n * For example, see the following sample return values:\n *     aom_codec_version()           (1<<16 | 2<<8 | 3)\n *     aom_codec_version_str()       \"v1.2.3-rc1-16-gec6a1ba\"\n *     aom_codec_version_extra_str() \"rc1-16-gec6a1ba\"\n */\n\n/*!\\brief Return the version information (as an integer)\n *\n * Returns a packed encoding of the library version number. This will only\n * include the major.minor.patch component of the version number. Note that this\n * encoded value should be accessed through the macros provided, as the encoding\n * may change in the future.\n *\n */\nint aom_codec_version(void);\n\n/*!\\brief Return the major version number */\n#define aom_codec_version_major() ((aom_codec_version() >> 16) & 0xff)\n\n/*!\\brief Return the minor version number */\n#define aom_codec_version_minor() ((aom_codec_version() >> 8) & 0xff)\n\n/*!\\brief Return the patch version number */\n#define aom_codec_version_patch() ((aom_codec_version() >> 0) & 0xff)\n\n/*!\\brief Return the version information (as a string)\n *\n * Returns a printable string containing the full library version number. This\n * may contain additional text following the three digit version number, as to\n * indicate release candidates, prerelease versions, etc.\n *\n */\nconst char *aom_codec_version_str(void);\n\n/*!\\brief Return the version information (as a string)\n *\n * Returns a printable \"extra string\". This is the component of the string\n * returned by aom_codec_version_str() following the three digit version number.\n *\n */\nconst char *aom_codec_version_extra_str(void);\n\n/*!\\brief Return the build configuration\n *\n * Returns a printable string containing an encoded version of the build\n * configuration. This may be useful to aom support.\n *\n */\nconst char *aom_codec_build_config(void);\n\n/*!\\brief Return the name for a given interface\n *\n * Returns a human readable string for name of the given codec interface.\n *\n * \\param[in]    iface     Interface pointer\n *\n */\nconst char *aom_codec_iface_name(aom_codec_iface_t *iface);\n\n/*!\\brief Convert error number to printable string\n *\n * Returns a human readable string for the last error returned by the\n * algorithm. The returned error will be one line and will not contain\n * any newline characters.\n *\n *\n * \\param[in]    err     Error number.\n *\n */\nconst char *aom_codec_err_to_string(aom_codec_err_t err);\n\n/*!\\brief Retrieve error synopsis for codec context\n *\n * Returns a human readable string for the last error returned by the\n * algorithm. The returned error will be one line and will not contain\n * any newline characters.\n *\n *\n * \\param[in]    ctx     Pointer to this instance's context.\n *\n */\nconst char *aom_codec_error(aom_codec_ctx_t *ctx);\n\n/*!\\brief Retrieve detailed error information for codec context\n *\n * Returns a human readable string providing detailed information about\n * the last error.\n *\n * \\param[in]    ctx     Pointer to this instance's context.\n *\n * \\retval NULL\n *     No detailed information is available.\n */\nconst char *aom_codec_error_detail(aom_codec_ctx_t *ctx);\n\n/* REQUIRED FUNCTIONS\n *\n * The following functions are required to be implemented for all codecs.\n * They represent the base case functionality expected of all codecs.\n */\n\n/*!\\brief Destroy a codec instance\n *\n * Destroys a codec context, freeing any associated memory buffers.\n *\n * \\param[in] ctx   Pointer to this instance's context\n *\n * \\retval #AOM_CODEC_OK\n *     The codec algorithm initialized.\n * \\retval #AOM_CODEC_MEM_ERROR\n *     Memory allocation failed.\n */\naom_codec_err_t aom_codec_destroy(aom_codec_ctx_t *ctx);\n\n/*!\\brief Get the capabilities of an algorithm.\n *\n * Retrieves the capabilities bitfield from the algorithm's interface.\n *\n * \\param[in] iface   Pointer to the algorithm interface\n *\n */\naom_codec_caps_t aom_codec_get_caps(aom_codec_iface_t *iface);\n\n/*!\\name Codec Control\n *\n * The aom_codec_control function exchanges algorithm specific data with the\n * codec instance. Additionally, the macro AOM_CODEC_CONTROL_TYPECHECKED is\n * provided, which will type-check the parameter against the control ID before\n * calling aom_codec_control - note that this macro requires the control ID\n * to be directly encoded in it, e.g.,\n * AOM_CODEC_CONTROL_TYPECHECKED(&ctx, AOME_SET_CPUUSED, 8).\n *\n * The codec control IDs can be found in aom.h, aomcx.h, and aomdx.h\n * (defined as aom_com_control_id, aome_enc_control_id, and aom_dec_control_id).\n * @{\n */\n/*!\\brief Algorithm Control\n *\n * aom_codec_control takes a context, a control ID, and a third parameter\n * (with varying type). If the context is non-null and an error occurs,\n * ctx->err will be set to the same value as the return value.\n *\n * \\param[in]     ctx              Pointer to this instance's context\n * \\param[in]     ctrl_id          Algorithm specific control identifier.\n *                                 Must be nonzero.\n *\n * \\retval #AOM_CODEC_OK\n *     The control request was processed.\n * \\retval #AOM_CODEC_ERROR\n *     The control request was not processed.\n * \\retval #AOM_CODEC_INVALID_PARAM\n *     The control ID was zero, or the data was not valid.\n */\naom_codec_err_t aom_codec_control(aom_codec_ctx_t *ctx, int ctrl_id, ...);\n\n/*!\\brief Key & Value API\n *\n * aom_codec_set_option() takes a context, a key (option name) and a value. If\n * the context is non-null and an error occurs, ctx->err will be set to the same\n * value as the return value.\n *\n * \\param[in]     ctx              Pointer to this instance's context\n * \\param[in]     name             The name of the option (key)\n * \\param[in]     value            The value of the option\n *\n * \\retval #AOM_CODEC_OK\n *     The value of the option was set.\n * \\retval #AOM_CODEC_INVALID_PARAM\n *     The data was not valid.\n * \\retval #AOM_CODEC_ERROR\n *     The option was not successfully set.\n */\naom_codec_err_t aom_codec_set_option(aom_codec_ctx_t *ctx, const char *name,\n                                     const char *value);\n\n/*!\\brief aom_codec_control wrapper macro (adds type-checking, less flexible)\n *\n * This macro allows for type safe conversions across the variadic parameter\n * to aom_codec_control(). However, it requires the explicit control ID\n * be passed in (it cannot be passed in via a variable) -- otherwise a compiler\n * error will occur. After the type checking, it calls aom_codec_control.\n */\n#define AOM_CODEC_CONTROL_TYPECHECKED(ctx, id, data) \\\n  aom_codec_control_typechecked_##id(ctx, id, data) /**<\\hideinitializer*/\n\n/*!\\brief Creates typechecking mechanisms for aom_codec_control\n *\n * It defines a static function with the correctly typed arguments as a wrapper\n * to the type-unsafe aom_codec_control function. It also creates a typedef\n * for each type.\n */\n#define AOM_CTRL_USE_TYPE(id, typ)                           \\\n  static aom_codec_err_t aom_codec_control_typechecked_##id( \\\n      aom_codec_ctx_t *, int, typ) AOM_UNUSED;               \\\n  static aom_codec_err_t aom_codec_control_typechecked_##id( \\\n      aom_codec_ctx_t *ctx, int ctrl, typ data) {            \\\n    return aom_codec_control(ctx, ctrl, data);               \\\n  } /**<\\hideinitializer*/                                   \\\n  typedef typ aom_codec_control_type_##id;\n/*!@} end Codec Control group */\n\n/*!\\brief OBU types. */\ntypedef enum ATTRIBUTE_PACKED {\n  OBU_SEQUENCE_HEADER = 1,\n  OBU_TEMPORAL_DELIMITER = 2,\n  OBU_FRAME_HEADER = 3,\n  OBU_TILE_GROUP = 4,\n  OBU_METADATA = 5,\n  OBU_FRAME = 6,\n  OBU_REDUNDANT_FRAME_HEADER = 7,\n  OBU_TILE_LIST = 8,\n  OBU_PADDING = 15,\n} OBU_TYPE;\n\n/*!\\brief OBU metadata types. */\ntypedef enum {\n  OBU_METADATA_TYPE_AOM_RESERVED_0 = 0,\n  OBU_METADATA_TYPE_HDR_CLL = 1,\n  OBU_METADATA_TYPE_HDR_MDCV = 2,\n  OBU_METADATA_TYPE_SCALABILITY = 3,\n  OBU_METADATA_TYPE_ITUT_T35 = 4,\n  OBU_METADATA_TYPE_TIMECODE = 5,\n} OBU_METADATA_TYPE;\n\n/*!\\brief Returns string representation of OBU_TYPE.\n *\n * \\param[in]     type            The OBU_TYPE to convert to string.\n */\nconst char *aom_obu_type_to_string(OBU_TYPE type);\n\n/*!@} - end defgroup codec*/\n#ifdef __cplusplus\n}\n#endif\n#endif  // AOM_AOM_AOM_CODEC_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/obu_util/sources/aom_config.h",
    "content": "/* \n * copied from https://raw.githubusercontent.com/SDWebImage/libaom-Xcode/master/generate/config/aom_config.h\n */\n\n/*\n * Copyright (c) 2021, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n#ifndef AOM_CONFIG_H_\n#define AOM_CONFIG_H_\n\n#define ARCH_ARM 1\n#define ARCH_MIPS 0\n#define ARCH_PPC 0\n#define ARCH_X86 0\n#define ARCH_X86_64 0\n#define CONFIG_ACCOUNTING 0\n#define CONFIG_ANALYZER 0\n#define CONFIG_AV1_DECODER 1\n#define CONFIG_AV1_ENCODER 0\n#define CONFIG_AV1_HIGHBITDEPTH 1\n#define CONFIG_BIG_ENDIAN 0\n#define CONFIG_BITSTREAM_DEBUG 0\n#define CONFIG_COEFFICIENT_RANGE_CHECKING 0\n#define CONFIG_COLLECT_COMPONENT_TIMING 0\n#define CONFIG_COLLECT_PARTITION_STATS 0\n#define CONFIG_COLLECT_RD_STATS 0\n#define CONFIG_DEBUG 0\n#define CONFIG_DENOISE 1\n#define CONFIG_DISABLE_FULL_PIXEL_SPLIT_8X8 1\n#define CONFIG_DIST_8X8 0\n#define CONFIG_ENTROPY_STATS 0\n#define CONFIG_GCC 1\n#define CONFIG_GCOV 0\n#define CONFIG_GPROF 0\n#define CONFIG_HTB_TRELLIS 0\n#define CONFIG_INSPECTION 0\n#define CONFIG_INTERNAL_STATS 0\n#define CONFIG_INTER_STATS_ONLY 0\n#define CONFIG_LIBYUV 1\n#define CONFIG_LPF_MASK 0\n#define CONFIG_MAX_DECODE_PROFILE 2\n#define CONFIG_MISMATCH_DEBUG 0\n#define CONFIG_MULTITHREAD 1\n#define CONFIG_NN_V2 0\n#define CONFIG_NORMAL_TILE_MODE 0\n#define CONFIG_OS_SUPPORT 1\n#define CONFIG_PIC 0\n#define CONFIG_RD_DEBUG 0\n#define CONFIG_REALTIME_ONLY 0\n#define CONFIG_RUNTIME_CPU_DETECT 1\n#define CONFIG_SHARED 0\n#define CONFIG_SHARP_SETTINGS 0\n#define CONFIG_SIZE_LIMIT 0\n#define CONFIG_SPATIAL_RESAMPLING 1\n#define CONFIG_SPEED_STATS 0\n#define CONFIG_SUPERRES_IN_RECODE 1\n#define CONFIG_TUNE_VMAF 1\n#define CONFIG_WEBM_IO 1\n#define DECODE_HEIGHT_LIMIT 0\n#define DECODE_WIDTH_LIMIT 0\n#define FORCE_HIGHBITDEPTH_DECODING 0\n#define HAVE_AVX 0\n#define HAVE_AVX2 0\n#define HAVE_DSPR2 0\n#define HAVE_FEXCEPT 0\n#define HAVE_MIPS32 0\n#define HAVE_MIPS64 0\n#define HAVE_MMX 0\n#define HAVE_MSA 0\n#define HAVE_NEON 1\n#define HAVE_PTHREAD_H 1\n#define HAVE_SSE 0\n#define HAVE_SSE2 0\n#define HAVE_SSE3 0\n#define HAVE_SSE4_1 0\n#define HAVE_SSE4_2 0\n#define HAVE_SSSE3 0\n#define HAVE_UNISTD_H 1\n#define HAVE_VSX 0\n#define HAVE_WXWIDGETS 0\n#define INLINE inline\n\n#endif  // AOM_CONFIG_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/obu_util/sources/aom_config.h-orig.h",
    "content": "// from https://raw.githubusercontent.com/SDWebImage/libaom-Xcode/master/generate/config/aom_config.h\n\n/*\n * Copyright (c) 2021, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n#ifndef AOM_CONFIG_H_\n#define AOM_CONFIG_H_\n\n#define ARCH_ARM 0\n#define ARCH_MIPS 0\n#define ARCH_PPC 0\n#define ARCH_X86 0\n#define ARCH_X86_64 0\n#define CONFIG_ACCOUNTING 0\n#define CONFIG_ANALYZER 0\n#define CONFIG_AV1_DECODER 1\n#define CONFIG_AV1_ENCODER 1\n#define CONFIG_AV1_HIGHBITDEPTH 1\n#define CONFIG_BIG_ENDIAN 0\n#define CONFIG_BITSTREAM_DEBUG 0\n#define CONFIG_COEFFICIENT_RANGE_CHECKING 0\n#define CONFIG_COLLECT_COMPONENT_TIMING 0\n#define CONFIG_COLLECT_PARTITION_STATS 0\n#define CONFIG_COLLECT_RD_STATS 0\n#define CONFIG_DEBUG 0\n#define CONFIG_DENOISE 1\n#define CONFIG_DISABLE_FULL_PIXEL_SPLIT_8X8 1\n#define CONFIG_DIST_8X8 0\n#define CONFIG_ENTROPY_STATS 0\n#define CONFIG_GCC 1\n#define CONFIG_GCOV 0\n#define CONFIG_GPROF 0\n#define CONFIG_HTB_TRELLIS 0\n#define CONFIG_INSPECTION 0\n#define CONFIG_INTERNAL_STATS 0\n#define CONFIG_INTER_STATS_ONLY 0\n#define CONFIG_LIBYUV 1\n#define CONFIG_LPF_MASK 0\n#define CONFIG_MAX_DECODE_PROFILE 2\n#define CONFIG_MISMATCH_DEBUG 0\n#define CONFIG_MULTITHREAD 1\n#define CONFIG_NN_V2 0\n#define CONFIG_NORMAL_TILE_MODE 0\n#define CONFIG_OS_SUPPORT 1\n#define CONFIG_PIC 0\n#define CONFIG_RD_DEBUG 0\n#define CONFIG_REALTIME_ONLY 0\n#define CONFIG_RUNTIME_CPU_DETECT 1\n#define CONFIG_SHARED 0\n#define CONFIG_SHARP_SETTINGS 0\n#define CONFIG_SIZE_LIMIT 0\n#define CONFIG_SPATIAL_RESAMPLING 1\n#define CONFIG_SPEED_STATS 0\n#define CONFIG_SUPERRES_IN_RECODE 1\n#define CONFIG_TUNE_VMAF 1\n#define CONFIG_WEBM_IO 1\n#define DECODE_HEIGHT_LIMIT 0\n#define DECODE_WIDTH_LIMIT 0\n#define FORCE_HIGHBITDEPTH_DECODING 0\n#define HAVE_AVX 0\n#define HAVE_AVX2 0\n#define HAVE_DSPR2 0\n#define HAVE_FEXCEPT 0\n#define HAVE_MIPS32 0\n#define HAVE_MIPS64 0\n#define HAVE_MMX 0\n#define HAVE_MSA 0\n#define HAVE_NEON 0\n#define HAVE_PTHREAD_H 1\n#define HAVE_SSE 0\n#define HAVE_SSE2 0\n#define HAVE_SSE3 0\n#define HAVE_SSE4_1 0\n#define HAVE_SSE4_2 0\n#define HAVE_SSSE3 0\n#define HAVE_UNISTD_H 1\n#define HAVE_VSX 0\n#define HAVE_WXWIDGETS 0\n#define INLINE inline\n\n#endif  // AOM_CONFIG_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/obu_util/sources/aom_image.h",
    "content": "/*\n * Copyright (c) 2016, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n\n/*!\\file\n * \\brief Describes the aom image descriptor and associated operations\n *\n */\n#ifndef AOM_AOM_AOM_IMAGE_H_\n#define AOM_AOM_AOM_IMAGE_H_\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"aom_integer.h\"\n\n/*!\\brief Current ABI version number\n *\n * \\internal\n * If this file is altered in any way that changes the ABI, this value\n * must be bumped.  Examples include, but are not limited to, changing\n * types, removing or reassigning enums, adding/removing/rearranging\n * fields to structures\n */\n#define AOM_IMAGE_ABI_VERSION (9) /**<\\hideinitializer*/\n\n#define AOM_IMG_FMT_PLANAR 0x100  /**< Image is a planar format. */\n#define AOM_IMG_FMT_UV_FLIP 0x200 /**< V plane precedes U in memory. */\n/** 0x400 used to signal alpha channel, skipping for backwards compatibility. */\n#define AOM_IMG_FMT_HIGHBITDEPTH 0x800 /**< Image uses 16bit framebuffer. */\n\n/*!\\brief List of supported image formats */\ntypedef enum aom_img_fmt {\n  AOM_IMG_FMT_NONE,\n  AOM_IMG_FMT_YV12 =\n      AOM_IMG_FMT_PLANAR | AOM_IMG_FMT_UV_FLIP | 1, /**< planar YVU */\n  AOM_IMG_FMT_I420 = AOM_IMG_FMT_PLANAR | 2,\n  AOM_IMG_FMT_AOMYV12 = AOM_IMG_FMT_PLANAR | AOM_IMG_FMT_UV_FLIP |\n                        3, /** < planar 4:2:0 format with aom color space */\n  AOM_IMG_FMT_AOMI420 = AOM_IMG_FMT_PLANAR | 4,\n  AOM_IMG_FMT_I422 = AOM_IMG_FMT_PLANAR | 5,\n  AOM_IMG_FMT_I444 = AOM_IMG_FMT_PLANAR | 6,\n  AOM_IMG_FMT_I42016 = AOM_IMG_FMT_I420 | AOM_IMG_FMT_HIGHBITDEPTH,\n  AOM_IMG_FMT_YV1216 = AOM_IMG_FMT_YV12 | AOM_IMG_FMT_HIGHBITDEPTH,\n  AOM_IMG_FMT_I42216 = AOM_IMG_FMT_I422 | AOM_IMG_FMT_HIGHBITDEPTH,\n  AOM_IMG_FMT_I44416 = AOM_IMG_FMT_I444 | AOM_IMG_FMT_HIGHBITDEPTH,\n} aom_img_fmt_t; /**< alias for enum aom_img_fmt */\n\n/*!\\brief List of supported color primaries */\ntypedef enum aom_color_primaries {\n  AOM_CICP_CP_RESERVED_0 = 0,  /**< For future use */\n  AOM_CICP_CP_BT_709 = 1,      /**< BT.709 */\n  AOM_CICP_CP_UNSPECIFIED = 2, /**< Unspecified */\n  AOM_CICP_CP_RESERVED_3 = 3,  /**< For future use */\n  AOM_CICP_CP_BT_470_M = 4,    /**< BT.470 System M (historical) */\n  AOM_CICP_CP_BT_470_B_G = 5,  /**< BT.470 System B, G (historical) */\n  AOM_CICP_CP_BT_601 = 6,      /**< BT.601 */\n  AOM_CICP_CP_SMPTE_240 = 7,   /**< SMPTE 240 */\n  AOM_CICP_CP_GENERIC_FILM =\n      8, /**< Generic film (color filters using illuminant C) */\n  AOM_CICP_CP_BT_2020 = 9,      /**< BT.2020, BT.2100 */\n  AOM_CICP_CP_XYZ = 10,         /**< SMPTE 428 (CIE 1921 XYZ) */\n  AOM_CICP_CP_SMPTE_431 = 11,   /**< SMPTE RP 431-2 */\n  AOM_CICP_CP_SMPTE_432 = 12,   /**< SMPTE EG 432-1  */\n  AOM_CICP_CP_RESERVED_13 = 13, /**< For future use (values 13 - 21)  */\n  AOM_CICP_CP_EBU_3213 = 22,    /**< EBU Tech. 3213-E  */\n  AOM_CICP_CP_RESERVED_23 = 23  /**< For future use (values 23 - 255)  */\n} aom_color_primaries_t;        /**< alias for enum aom_color_primaries */\n\n/*!\\brief List of supported transfer functions */\ntypedef enum aom_transfer_characteristics {\n  AOM_CICP_TC_RESERVED_0 = 0,  /**< For future use */\n  AOM_CICP_TC_BT_709 = 1,      /**< BT.709 */\n  AOM_CICP_TC_UNSPECIFIED = 2, /**< Unspecified */\n  AOM_CICP_TC_RESERVED_3 = 3,  /**< For future use */\n  AOM_CICP_TC_BT_470_M = 4,    /**< BT.470 System M (historical)  */\n  AOM_CICP_TC_BT_470_B_G = 5,  /**< BT.470 System B, G (historical) */\n  AOM_CICP_TC_BT_601 = 6,      /**< BT.601 */\n  AOM_CICP_TC_SMPTE_240 = 7,   /**< SMPTE 240 M */\n  AOM_CICP_TC_LINEAR = 8,      /**< Linear */\n  AOM_CICP_TC_LOG_100 = 9,     /**< Logarithmic (100 : 1 range) */\n  AOM_CICP_TC_LOG_100_SQRT10 =\n      10,                     /**< Logarithmic (100 * Sqrt(10) : 1 range) */\n  AOM_CICP_TC_IEC_61966 = 11, /**< IEC 61966-2-4 */\n  AOM_CICP_TC_BT_1361 = 12,   /**< BT.1361 */\n  AOM_CICP_TC_SRGB = 13,      /**< sRGB or sYCC*/\n  AOM_CICP_TC_BT_2020_10_BIT = 14, /**< BT.2020 10-bit systems */\n  AOM_CICP_TC_BT_2020_12_BIT = 15, /**< BT.2020 12-bit systems */\n  AOM_CICP_TC_SMPTE_2084 = 16,     /**< SMPTE ST 2084, ITU BT.2100 PQ */\n  AOM_CICP_TC_SMPTE_428 = 17,      /**< SMPTE ST 428 */\n  AOM_CICP_TC_HLG = 18,            /**< BT.2100 HLG, ARIB STD-B67 */\n  AOM_CICP_TC_RESERVED_19 = 19     /**< For future use (values 19-255) */\n} aom_transfer_characteristics_t;  /**< alias for enum aom_transfer_function */\n\n/*!\\brief List of supported matrix coefficients */\ntypedef enum aom_matrix_coefficients {\n  AOM_CICP_MC_IDENTITY = 0,    /**< Identity matrix */\n  AOM_CICP_MC_BT_709 = 1,      /**< BT.709 */\n  AOM_CICP_MC_UNSPECIFIED = 2, /**< Unspecified */\n  AOM_CICP_MC_RESERVED_3 = 3,  /**< For future use */\n  AOM_CICP_MC_FCC = 4,         /**< US FCC 73.628 */\n  AOM_CICP_MC_BT_470_B_G = 5,  /**< BT.470 System B, G (historical) */\n  AOM_CICP_MC_BT_601 = 6,      /**< BT.601 */\n  AOM_CICP_MC_SMPTE_240 = 7,   /**< SMPTE 240 M */\n  AOM_CICP_MC_SMPTE_YCGCO = 8, /**< YCgCo */\n  AOM_CICP_MC_BT_2020_NCL =\n      9, /**< BT.2020 non-constant luminance, BT.2100 YCbCr  */\n  AOM_CICP_MC_BT_2020_CL = 10, /**< BT.2020 constant luminance */\n  AOM_CICP_MC_SMPTE_2085 = 11, /**< SMPTE ST 2085 YDzDx */\n  AOM_CICP_MC_CHROMAT_NCL =\n      12, /**< Chromaticity-derived non-constant luminance */\n  AOM_CICP_MC_CHROMAT_CL = 13, /**< Chromaticity-derived constant luminance */\n  AOM_CICP_MC_ICTCP = 14,      /**< BT.2100 ICtCp */\n  AOM_CICP_MC_RESERVED_15 = 15 /**< For future use (values 15-255)  */\n} aom_matrix_coefficients_t;\n\n/*!\\brief List of supported color range */\ntypedef enum aom_color_range {\n  AOM_CR_STUDIO_RANGE = 0, /**< Y [16..235], UV [16..240] */\n  AOM_CR_FULL_RANGE = 1    /**< YUV/RGB [0..255] */\n} aom_color_range_t;       /**< alias for enum aom_color_range */\n\n/*!\\brief List of chroma sample positions */\ntypedef enum aom_chroma_sample_position {\n  AOM_CSP_UNKNOWN = 0,          /**< Unknown */\n  AOM_CSP_VERTICAL = 1,         /**< Horizontally co-located with luma(0, 0)*/\n                                /**< sample, between two vertical samples */\n  AOM_CSP_COLOCATED = 2,        /**< Co-located with luma(0, 0) sample */\n  AOM_CSP_RESERVED = 3          /**< Reserved value */\n} aom_chroma_sample_position_t; /**< alias for enum aom_transfer_function */\n\n/*!\\brief List of insert flags for Metadata\n *\n * These flags control how the library treats metadata during encode.\n *\n * While encoding, when metadata is added to an aom_image via\n * aom_img_add_metadata(), the flag passed along with the metadata will\n * determine where the metadata OBU will be placed in the encoded OBU stream.\n * Metadata will be emitted into the output stream within the next temporal unit\n * if it satisfies the specified insertion flag.\n *\n * During decoding, when the library encounters a metadata OBU, it is always\n * flagged as AOM_MIF_ANY_FRAME and emitted with the next output aom_image.\n */\ntypedef enum aom_metadata_insert_flags {\n  AOM_MIF_NON_KEY_FRAME = 0, /**< Adds metadata if it's not keyframe */\n  AOM_MIF_KEY_FRAME = 1,     /**< Adds metadata only if it's a keyframe */\n  AOM_MIF_ANY_FRAME = 2      /**< Adds metadata to any type of frame */\n} aom_metadata_insert_flags_t;\n\n/*!\\brief Array of aom_metadata structs for an image. */\ntypedef struct aom_metadata_array aom_metadata_array_t;\n\n/*!\\brief Metadata payload. */\ntypedef struct aom_metadata {\n  uint32_t type;                           /**< Metadata type */\n  uint8_t *payload;                        /**< Metadata payload data */\n  size_t sz;                               /**< Metadata payload size */\n  aom_metadata_insert_flags_t insert_flag; /**< Metadata insertion flag */\n} aom_metadata_t;\n\n/**\\brief Image Descriptor */\ntypedef struct aom_image {\n  aom_img_fmt_t fmt;                 /**< Image Format */\n  aom_color_primaries_t cp;          /**< CICP Color Primaries */\n  aom_transfer_characteristics_t tc; /**< CICP Transfer Characteristics */\n  aom_matrix_coefficients_t mc;      /**< CICP Matrix Coefficients */\n  int monochrome;                    /**< Whether image is monochrome */\n  aom_chroma_sample_position_t csp;  /**< chroma sample position */\n  aom_color_range_t range;           /**< Color Range */\n\n  /* Image storage dimensions */\n  unsigned int w;         /**< Stored image width */\n  unsigned int h;         /**< Stored image height */\n  unsigned int bit_depth; /**< Stored image bit-depth */\n\n  /* Image display dimensions */\n  unsigned int d_w; /**< Displayed image width */\n  unsigned int d_h; /**< Displayed image height */\n\n  /* Image intended rendering dimensions */\n  unsigned int r_w; /**< Intended rendering image width */\n  unsigned int r_h; /**< Intended rendering image height */\n\n  /* Chroma subsampling info */\n  unsigned int x_chroma_shift; /**< subsampling order, X */\n  unsigned int y_chroma_shift; /**< subsampling order, Y */\n\n/* Image data pointers. */\n#define AOM_PLANE_PACKED 0  /**< To be used for all packed formats */\n#define AOM_PLANE_Y 0       /**< Y (Luminance) plane */\n#define AOM_PLANE_U 1       /**< U (Chroma) plane */\n#define AOM_PLANE_V 2       /**< V (Chroma) plane */\n  unsigned char *planes[3]; /**< pointer to the top left pixel for each plane */\n  int stride[3];            /**< stride between rows for each plane */\n  size_t sz;                /**< data size */\n\n  int bps; /**< bits per sample (for packed formats) */\n\n  int temporal_id; /**< Temporal layer Id of image */\n  int spatial_id;  /**< Spatial layer Id of image */\n\n  /*!\\brief The following member may be set by the application to associate\n   * data with this image.\n   */\n  void *user_priv;\n\n  /* The following members should be treated as private. */\n  unsigned char *img_data; /**< private */\n  int img_data_owner;      /**< private */\n  int self_allocd;         /**< private */\n\n  aom_metadata_array_t\n      *metadata; /**< Metadata payloads associated with the image. */\n\n  void *fb_priv; /**< Frame buffer data associated with the image. */\n} aom_image_t;   /**< alias for struct aom_image */\n\n/*!\\brief Open a descriptor, allocating storage for the underlying image\n *\n * Returns a descriptor for storing an image of the given format. The\n * storage for the image is allocated on the heap.\n *\n * \\param[in]    img       Pointer to storage for descriptor. If this parameter\n *                         is NULL, the storage for the descriptor will be\n *                         allocated on the heap.\n * \\param[in]    fmt       Format for the image\n * \\param[in]    d_w       Width of the image\n * \\param[in]    d_h       Height of the image\n * \\param[in]    align     Alignment, in bytes, of the image buffer and\n *                         each row in the image (stride).\n *\n * \\return Returns a pointer to the initialized image descriptor. If the img\n *         parameter is non-null, the value of the img parameter will be\n *         returned.\n */\naom_image_t *aom_img_alloc(aom_image_t *img, aom_img_fmt_t fmt,\n                           unsigned int d_w, unsigned int d_h,\n                           unsigned int align);\n\n/*!\\brief Open a descriptor, using existing storage for the underlying image\n *\n * Returns a descriptor for storing an image of the given format. The\n * storage for the image has been allocated elsewhere, and a descriptor is\n * desired to \"wrap\" that storage.\n *\n * \\param[in]    img       Pointer to storage for descriptor. If this parameter\n *                         is NULL, the storage for the descriptor will be\n *                         allocated on the heap.\n * \\param[in]    fmt       Format for the image\n * \\param[in]    d_w       Width of the image\n * \\param[in]    d_h       Height of the image\n * \\param[in]    align     Alignment, in bytes, of each row in the image\n *                         (stride).\n * \\param[in]    img_data  Storage to use for the image\n *\n * \\return Returns a pointer to the initialized image descriptor. If the img\n *         parameter is non-null, the value of the img parameter will be\n *         returned.\n */\naom_image_t *aom_img_wrap(aom_image_t *img, aom_img_fmt_t fmt, unsigned int d_w,\n                          unsigned int d_h, unsigned int align,\n                          unsigned char *img_data);\n\n/*!\\brief Open a descriptor, allocating storage for the underlying image with a\n * border\n *\n * Returns a descriptor for storing an image of the given format and its\n * borders. The storage for the image is allocated on the heap.\n *\n * \\param[in]    img        Pointer to storage for descriptor. If this parameter\n *                          is NULL, the storage for the descriptor will be\n *                          allocated on the heap.\n * \\param[in]    fmt        Format for the image\n * \\param[in]    d_w        Width of the image\n * \\param[in]    d_h        Height of the image\n * \\param[in]    align      Alignment, in bytes, of the image buffer and\n *                          each row in the image (stride).\n * \\param[in]    size_align Alignment, in pixels, of the image width and height.\n * \\param[in]    border     A border that is padded on four sides of the image.\n *\n * \\return Returns a pointer to the initialized image descriptor. If the img\n *         parameter is non-null, the value of the img parameter will be\n *         returned.\n */\naom_image_t *aom_img_alloc_with_border(aom_image_t *img, aom_img_fmt_t fmt,\n                                       unsigned int d_w, unsigned int d_h,\n                                       unsigned int align,\n                                       unsigned int size_align,\n                                       unsigned int border);\n\n/*!\\brief Set the rectangle identifying the displayed portion of the image\n *\n * Updates the displayed rectangle (aka viewport) on the image surface to\n * match the specified coordinates and size. Specifically, sets img->d_w,\n * img->d_h, and elements of the img->planes[] array.\n *\n * \\param[in]    img       Image descriptor\n * \\param[in]    x         leftmost column\n * \\param[in]    y         topmost row\n * \\param[in]    w         width\n * \\param[in]    h         height\n * \\param[in]    border    A border that is padded on four sides of the image.\n *\n * \\return 0 if the requested rectangle is valid, nonzero (-1) otherwise.\n */\nint aom_img_set_rect(aom_image_t *img, unsigned int x, unsigned int y,\n                     unsigned int w, unsigned int h, unsigned int border);\n\n/*!\\brief Flip the image vertically (top for bottom)\n *\n * Adjusts the image descriptor's pointers and strides to make the image\n * be referenced upside-down.\n *\n * \\param[in]    img       Image descriptor\n */\nvoid aom_img_flip(aom_image_t *img);\n\n/*!\\brief Close an image descriptor\n *\n * Frees all allocated storage associated with an image descriptor.\n *\n * \\param[in]    img       Image descriptor\n */\nvoid aom_img_free(aom_image_t *img);\n\n/*!\\brief Get the width of a plane\n *\n * Get the width of a plane of an image\n *\n * \\param[in]    img       Image descriptor\n * \\param[in]    plane     Plane index\n */\nint aom_img_plane_width(const aom_image_t *img, int plane);\n\n/*!\\brief Get the height of a plane\n *\n * Get the height of a plane of an image\n *\n * \\param[in]    img       Image descriptor\n * \\param[in]    plane     Plane index\n */\nint aom_img_plane_height(const aom_image_t *img, int plane);\n\n/*!\\brief Add metadata to image.\n *\n * Adds metadata to aom_image_t.\n * Function makes a copy of the provided data parameter.\n * Metadata insertion point is controlled by insert_flag.\n *\n * \\param[in]    img          Image descriptor\n * \\param[in]    type         Metadata type\n * \\param[in]    data         Metadata contents\n * \\param[in]    sz           Metadata contents size\n * \\param[in]    insert_flag  Metadata insert flag\n *\n * \\return Returns 0 on success. If img or data is NULL, sz is 0, or memory\n * allocation fails, it returns -1.\n */\nint aom_img_add_metadata(aom_image_t *img, uint32_t type, const uint8_t *data,\n                         size_t sz, aom_metadata_insert_flags_t insert_flag);\n\n/*!\\brief Return a metadata payload stored within the image metadata array.\n *\n * Gets the metadata (aom_metadata_t) at the indicated index in the image\n * metadata array.\n *\n * \\param[in] img          Pointer to image descriptor to get metadata from\n * \\param[in] index        Metadata index to get from metadata array\n *\n * \\return Returns a const pointer to the selected metadata, if img and/or index\n * is invalid, it returns NULL.\n */\nconst aom_metadata_t *aom_img_get_metadata(const aom_image_t *img,\n                                           size_t index);\n\n/*!\\brief Return the number of metadata blocks within the image.\n *\n * Gets the number of metadata blocks contained within the provided image\n * metadata array.\n *\n * \\param[in] img          Pointer to image descriptor to get metadata number\n * from.\n *\n * \\return Returns the size of the metadata array. If img or metadata is NULL,\n * it returns 0.\n */\nsize_t aom_img_num_metadata(const aom_image_t *img);\n\n/*!\\brief Remove metadata from image.\n *\n * Removes all metadata in image metadata list and sets metadata list pointer\n * to NULL.\n *\n * \\param[in]    img       Image descriptor\n */\nvoid aom_img_remove_metadata(aom_image_t *img);\n\n/*!\\brief Allocate memory for aom_metadata struct.\n *\n * Allocates storage for the metadata payload, sets its type and copies the\n * payload data into the aom_metadata struct. A metadata payload buffer of size\n * sz is allocated and sz bytes are copied from data into the payload buffer.\n *\n * \\param[in]    type         Metadata type\n * \\param[in]    data         Metadata data pointer\n * \\param[in]    sz           Metadata size\n * \\param[in]    insert_flag  Metadata insert flag\n *\n * \\return Returns the newly allocated aom_metadata struct. If data is NULL,\n * sz is 0, or memory allocation fails, it returns NULL.\n */\naom_metadata_t *aom_img_metadata_alloc(uint32_t type, const uint8_t *data,\n                                       size_t sz,\n                                       aom_metadata_insert_flags_t insert_flag);\n\n/*!\\brief Free metadata struct.\n *\n * Free metadata struct and its buffer.\n *\n * \\param[in]    metadata       Metadata struct pointer\n */\nvoid aom_img_metadata_free(aom_metadata_t *metadata);\n\n#ifdef __cplusplus\n}  // extern \"C\"\n#endif\n\n#endif  // AOM_AOM_AOM_IMAGE_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/obu_util/sources/aom_integer.c",
    "content": "/*\n * Copyright (c) 2018, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n#include <assert.h>\n\n#include \"aom_integer.h\"\n\nstatic const size_t kMaximumLeb128Size = 8;\nstatic const uint8_t kLeb128ByteMask = 0x7f;  // Binary: 01111111\n\n// Disallow values larger than 32-bits to ensure consistent behavior on 32 and\n// 64 bit targets: value is typically used to determine buffer allocation size\n// when decoded.\nstatic const uint64_t kMaximumLeb128Value = UINT32_MAX;\n\nsize_t aom_uleb_size_in_bytes(uint64_t value) {\n  size_t size = 0;\n  do {\n    ++size;\n  } while ((value >>= 7) != 0);\n  return size;\n}\n\nint aom_uleb_decode(const uint8_t *buffer, size_t available, uint64_t *value,\n                    size_t *length) {\n  if (buffer && value) {\n    *value = 0;\n    for (size_t i = 0; i < kMaximumLeb128Size && i < available; ++i) {\n      const uint8_t decoded_byte = *(buffer + i) & kLeb128ByteMask;\n      *value |= ((uint64_t)decoded_byte) << (i * 7);\n      if ((*(buffer + i) >> 7) == 0) {\n        if (length) {\n          *length = i + 1;\n        }\n\n        // Fail on values larger than 32-bits to ensure consistent behavior on\n        // 32 and 64 bit targets: value is typically used to determine buffer\n        // allocation size.\n        if (*value > UINT32_MAX) return -1;\n\n        return 0;\n      }\n    }\n  }\n\n  // If we get here, either the buffer/value pointers were invalid,\n  // or we ran over the available space\n  return -1;\n}\n\nint aom_uleb_encode(uint64_t value, size_t available, uint8_t *coded_value,\n                    size_t *coded_size) {\n  const size_t leb_size = aom_uleb_size_in_bytes(value);\n  if (value > kMaximumLeb128Value || leb_size > kMaximumLeb128Size ||\n      leb_size > available || !coded_value || !coded_size) {\n    return -1;\n  }\n\n  for (size_t i = 0; i < leb_size; ++i) {\n    uint8_t byte = value & 0x7f;\n    value >>= 7;\n\n    if (value != 0) byte |= 0x80;  // Signal that more bytes follow.\n\n    *(coded_value + i) = byte;\n  }\n\n  *coded_size = leb_size;\n  return 0;\n}\n\nint aom_uleb_encode_fixed_size(uint64_t value, size_t available,\n                               size_t pad_to_size, uint8_t *coded_value,\n                               size_t *coded_size) {\n  if (value > kMaximumLeb128Value || !coded_value || !coded_size ||\n      available < pad_to_size || pad_to_size > kMaximumLeb128Size) {\n    return -1;\n  }\n  const uint64_t limit = 1ULL << (7 * pad_to_size);\n  if (value >= limit) {\n    // Can't encode 'value' within 'pad_to_size' bytes\n    return -1;\n  }\n\n  for (size_t i = 0; i < pad_to_size; ++i) {\n    uint8_t byte = value & 0x7f;\n    value >>= 7;\n\n    if (i < pad_to_size - 1) byte |= 0x80;  // Signal that more bytes follow.\n\n    *(coded_value + i) = byte;\n  }\n\n  assert(value == 0);\n\n  *coded_size = pad_to_size;\n  return 0;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/obu_util/sources/aom_integer.h",
    "content": "/*\n * Copyright (c) 2016, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n#ifndef AOM_AOM_AOM_INTEGER_H_\n#define AOM_AOM_AOM_INTEGER_H_\n\n/* get ptrdiff_t, size_t, wchar_t, NULL */\n#include <stddef.h>\n\n#if defined(_MSC_VER)\n#define AOM_FORCE_INLINE __forceinline\n#define AOM_INLINE __inline\n#else\n#define AOM_FORCE_INLINE __inline__ __attribute__((always_inline))\n#define AOM_INLINE inline\n#endif\n\n/* Assume platforms have the C99 standard integer types. */\n\n#if defined(__cplusplus)\n#if !defined(__STDC_FORMAT_MACROS)\n#define __STDC_FORMAT_MACROS\n#endif\n#if !defined(__STDC_LIMIT_MACROS)\n#define __STDC_LIMIT_MACROS\n#endif\n#endif  // __cplusplus\n\n#include <stdint.h>\n#include <inttypes.h>\n\n#if defined(__cplusplus)\nextern \"C\" {\n#endif  // __cplusplus\n\n// Returns size of uint64_t when encoded using LEB128.\nsize_t aom_uleb_size_in_bytes(uint64_t value);\n\n// Returns 0 on success, -1 on decode failure.\n// On success, 'value' stores the decoded LEB128 value and 'length' stores\n// the number of bytes decoded.\nint aom_uleb_decode(const uint8_t *buffer, size_t available, uint64_t *value,\n                    size_t *length);\n\n// Encodes LEB128 integer. Returns 0 when successful, and -1 upon failure.\nint aom_uleb_encode(uint64_t value, size_t available, uint8_t *coded_value,\n                    size_t *coded_size);\n\n// Encodes LEB128 integer to size specified. Returns 0 when successful, and -1\n// upon failure.\n// Note: This will write exactly pad_to_size bytes; if the value cannot be\n// encoded in this many bytes, then this will fail.\nint aom_uleb_encode_fixed_size(uint64_t value, size_t available,\n                               size_t pad_to_size, uint8_t *coded_value,\n                               size_t *coded_size);\n\n#if defined(__cplusplus)\n}  // extern \"C\"\n#endif  // __cplusplus\n\n#endif  // AOM_AOM_AOM_INTEGER_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/obu_util/sources/bitops.h",
    "content": "/*\n * Copyright (c) 2016, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n\n#ifndef AOM_AOM_PORTS_BITOPS_H_\n#define AOM_AOM_PORTS_BITOPS_H_\n\n#include <assert.h>\n\n#include \"msvc.h\"\n#include \"aom_config.h\"\n\n#ifdef _MSC_VER\n#if defined(_M_X64) || defined(_M_IX86)\n#include <intrin.h>\n#define USE_MSC_INTRINSICS\n#endif\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// get_msb:\n// Returns (int)floor(log2(n)). n must be > 0.\n// These versions of get_msb() are only valid when n != 0 because all\n// of the optimized versions are undefined when n == 0:\n// https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html\n\n// use GNU builtins where available.\n#if defined(__GNUC__) && \\\n    ((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)\nstatic INLINE int get_msb(unsigned int n) {\n  assert(n != 0);\n  return 31 ^ __builtin_clz(n);\n}\n#elif defined(USE_MSC_INTRINSICS)\n#pragma intrinsic(_BitScanReverse)\n\nstatic INLINE int get_msb(unsigned int n) {\n  unsigned long first_set_bit;\n  assert(n != 0);\n  _BitScanReverse(&first_set_bit, n);\n  return first_set_bit;\n}\n#undef USE_MSC_INTRINSICS\n#else\nstatic INLINE int get_msb(unsigned int n) {\n  int log = 0;\n  unsigned int value = n;\n  int i;\n\n  assert(n != 0);\n\n  for (i = 4; i >= 0; --i) {\n    const int shift = (1 << i);\n    const unsigned int x = value >> shift;\n    if (x != 0) {\n      value = x;\n      log += shift;\n    }\n  }\n  return log;\n}\n#endif\n\n#ifdef __cplusplus\n}  // extern \"C\"\n#endif\n\n#endif  // AOM_AOM_PORTS_BITOPS_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/obu_util/sources/bitreader_buffer.c",
    "content": "/*\n * Copyright (c) 2016, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n\n#include <assert.h>\n\n#include \"aom_config.h\"\n\n#include \"bitreader_buffer.h\"\n#include \"recenter.h\"\n#include \"bitops.h\"\n\nsize_t aom_rb_bytes_read(const struct aom_read_bit_buffer *rb) {\n  return (rb->bit_offset + 7) >> 3;\n}\n\nint aom_rb_read_bit(struct aom_read_bit_buffer *rb) {\n  const uint32_t off = rb->bit_offset;\n  const uint32_t p = off >> 3;\n  const int q = 7 - (int)(off & 0x7);\n  if (rb->bit_buffer + p < rb->bit_buffer_end) {\n    const int bit = (rb->bit_buffer[p] >> q) & 1;\n    rb->bit_offset = off + 1;\n    return bit;\n  } else {\n    if (rb->error_handler) rb->error_handler(rb->error_handler_data);\n    return 0;\n  }\n}\n\nint aom_rb_read_literal(struct aom_read_bit_buffer *rb, int bits) {\n  assert(bits <= 31);\n  int value = 0, bit;\n  for (bit = bits - 1; bit >= 0; bit--) value |= aom_rb_read_bit(rb) << bit;\n  return value;\n}\n\nuint32_t aom_rb_read_unsigned_literal(struct aom_read_bit_buffer *rb,\n                                      int bits) {\n  assert(bits <= 32);\n  uint32_t value = 0;\n  int bit;\n  for (bit = bits - 1; bit >= 0; bit--)\n    value |= (uint32_t)aom_rb_read_bit(rb) << bit;\n  return value;\n}\n\nint aom_rb_read_inv_signed_literal(struct aom_read_bit_buffer *rb, int bits) {\n  const int nbits = sizeof(unsigned) * 8 - bits - 1;\n  const unsigned value = (unsigned)aom_rb_read_literal(rb, bits + 1) << nbits;\n  return ((int)value) >> nbits;\n}\n\nuint32_t aom_rb_read_uvlc(struct aom_read_bit_buffer *rb) {\n  int leading_zeros = 0;\n  while (leading_zeros < 32 && !aom_rb_read_bit(rb)) ++leading_zeros;\n  // Maximum 32 bits.\n  if (leading_zeros == 32) return UINT32_MAX;\n  const uint32_t base = (1u << leading_zeros) - 1;\n  const uint32_t value = aom_rb_read_literal(rb, leading_zeros);\n  return base + value;\n}\n\nstatic uint16_t aom_rb_read_primitive_quniform(struct aom_read_bit_buffer *rb,\n                                               uint16_t n) {\n  if (n <= 1) return 0;\n  const int l = get_msb(n) + 1;\n  const int m = (1 << l) - n;\n  const int v = aom_rb_read_literal(rb, l - 1);\n  return v < m ? v : (v << 1) - m + aom_rb_read_bit(rb);\n}\n\nstatic uint16_t aom_rb_read_primitive_subexpfin(struct aom_read_bit_buffer *rb,\n                                                uint16_t n, uint16_t k) {\n  int i = 0;\n  int mk = 0;\n\n  while (1) {\n    int b = (i ? k + i - 1 : k);\n    int a = (1 << b);\n\n    if (n <= mk + 3 * a) {\n      return aom_rb_read_primitive_quniform(rb, n - mk) + mk;\n    }\n\n    if (!aom_rb_read_bit(rb)) {\n      return aom_rb_read_literal(rb, b) + mk;\n    }\n\n    i = i + 1;\n    mk += a;\n  }\n\n  assert(0);\n  return 0;\n}\n\nstatic uint16_t aom_rb_read_primitive_refsubexpfin(\n    struct aom_read_bit_buffer *rb, uint16_t n, uint16_t k, uint16_t ref) {\n  return inv_recenter_finite_nonneg(n, ref,\n                                    aom_rb_read_primitive_subexpfin(rb, n, k));\n}\n\nint16_t aom_rb_read_signed_primitive_refsubexpfin(\n    struct aom_read_bit_buffer *rb, uint16_t n, uint16_t k, int16_t ref) {\n  ref += n - 1;\n  const uint16_t scaled_n = (n << 1) - 1;\n  return aom_rb_read_primitive_refsubexpfin(rb, scaled_n, k, ref) - n + 1;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/obu_util/sources/bitreader_buffer.h",
    "content": "/*\n * Copyright (c) 2016, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n\n#ifndef AOM_AOM_DSP_BITREADER_BUFFER_H_\n#define AOM_AOM_DSP_BITREADER_BUFFER_H_\n\n#include <limits.h>\n\n#include \"aom_integer.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef void (*aom_rb_error_handler)(void *data);\n\nstruct aom_read_bit_buffer {\n  const uint8_t *bit_buffer;\n  const uint8_t *bit_buffer_end;\n  uint32_t bit_offset;\n\n  void *error_handler_data;\n  aom_rb_error_handler error_handler;\n};\n\nsize_t aom_rb_bytes_read(const struct aom_read_bit_buffer *rb);\n\nint aom_rb_read_bit(struct aom_read_bit_buffer *rb);\n\nint aom_rb_read_literal(struct aom_read_bit_buffer *rb, int bits);\n\nuint32_t aom_rb_read_unsigned_literal(struct aom_read_bit_buffer *rb, int bits);\n\nint aom_rb_read_inv_signed_literal(struct aom_read_bit_buffer *rb, int bits);\n\nuint32_t aom_rb_read_uvlc(struct aom_read_bit_buffer *rb);\n\nint16_t aom_rb_read_signed_primitive_refsubexpfin(\n    struct aom_read_bit_buffer *rb, uint16_t n, uint16_t k, int16_t ref);\n\n#ifdef __cplusplus\n}  // extern \"C\"\n#endif\n\n#endif  // AOM_AOM_DSP_BITREADER_BUFFER_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/obu_util/sources/msvc.h",
    "content": "/*\n * Copyright (c) 2016, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n\n#ifndef AOM_AOM_PORTS_MSVC_H_\n#define AOM_AOM_PORTS_MSVC_H_\n#ifdef _MSC_VER\n\n#include \"aom_config.h\"\n\n#if _MSC_VER < 1900  // VS2015 provides snprintf\n#define snprintf _snprintf\n#endif  // _MSC_VER < 1900\n\n#if _MSC_VER < 1800  // VS2013 provides round\n#include <math.h>\nstatic INLINE double round(double x) {\n  if (x < 0)\n    return ceil(x - 0.5);\n  else\n    return floor(x + 0.5);\n}\n\nstatic INLINE float roundf(float x) {\n  if (x < 0)\n    return (float)ceil(x - 0.5f);\n  else\n    return (float)floor(x + 0.5f);\n}\n\nstatic INLINE long lroundf(float x) {\n  if (x < 0)\n    return (long)(x - 0.5f);\n  else\n    return (long)(x + 0.5f);\n}\n#endif  // _MSC_VER < 1800\n\n#if HAVE_AVX\n#include <immintrin.h>\n// Note:\n// _mm256_insert_epi16 intrinsics is available from vs2017.\n// We define this macro for vs2015 and earlier. The\n// intrinsics used here are in vs2015 document:\n// https://msdn.microsoft.com/en-us/library/hh977022.aspx\n// Input parameters:\n// a: __m256i,\n// d: int16_t,\n// indx: imm8 (0 - 15)\n#if _MSC_VER <= 1900\n#define _mm256_insert_epi16(a, d, indx)                                      \\\n  _mm256_insertf128_si256(                                                   \\\n      a,                                                                     \\\n      _mm_insert_epi16(_mm256_extractf128_si256(a, indx >> 3), d, indx % 8), \\\n      indx >> 3)\n\nstatic INLINE int _mm256_extract_epi32(__m256i a, const int i) {\n  return a.m256i_i32[i & 7];\n}\nstatic INLINE __m256i _mm256_insert_epi32(__m256i a, int b, const int i) {\n  __m256i c = a;\n  c.m256i_i32[i & 7] = b;\n  return c;\n}\n#endif  // _MSC_VER <= 1900\n#endif  // HAVE_AVX\n#endif  // _MSC_VER\n#endif  // AOM_AOM_PORTS_MSVC_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/obu_util/sources/obu_util.c",
    "content": "/*\n * Copyright (c) 2018, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n#include <assert.h>\n\n#include \"obu_util.h\"\n\n#include \"bitreader_buffer.h\"\n\nstatic aom_codec_err_t read_obu_size(const uint8_t *data,\n                                     size_t bytes_available,\n                                     size_t *const obu_size,\n                                     size_t *const length_field_size) {\n  uint64_t u_obu_size = 0;\n  if (aom_uleb_decode(data, bytes_available, &u_obu_size, length_field_size) !=\n      0) {\n    return AOM_CODEC_CORRUPT_FRAME;\n  }\n\n  if (u_obu_size > UINT32_MAX) return AOM_CODEC_CORRUPT_FRAME;\n  *obu_size = (size_t)u_obu_size;\n  return AOM_CODEC_OK;\n}\n\n// Parses OBU header and stores values in 'header'.\nstatic aom_codec_err_t read_obu_header(struct aom_read_bit_buffer *rb,\n                                       int is_annexb, ObuHeader *header) {\n  if (!rb || !header) return AOM_CODEC_INVALID_PARAM;\n\n  const ptrdiff_t bit_buffer_byte_length = rb->bit_buffer_end - rb->bit_buffer;\n  if (bit_buffer_byte_length < 1) return AOM_CODEC_CORRUPT_FRAME;\n\n  header->size = 1;\n\n  if (aom_rb_read_bit(rb) != 0) {\n    // Forbidden bit. Must not be set.\n    return AOM_CODEC_CORRUPT_FRAME;\n  }\n\n  header->type = (OBU_TYPE)aom_rb_read_literal(rb, 4);\n  header->has_extension = aom_rb_read_bit(rb);\n  header->has_size_field = aom_rb_read_bit(rb);\n\n  if (!header->has_size_field && !is_annexb) {\n    // section 5 obu streams must have obu_size field set.\n    return AOM_CODEC_UNSUP_BITSTREAM;\n  }\n\n  // obu_reserved_1bit must be set to 0. The value is ignored by a decoder.\n  aom_rb_read_bit(rb);\n\n  if (header->has_extension) {\n    if (bit_buffer_byte_length == 1) return AOM_CODEC_CORRUPT_FRAME;\n\n    header->size += 1;\n    header->temporal_layer_id = aom_rb_read_literal(rb, 3);\n    header->spatial_layer_id = aom_rb_read_literal(rb, 2);\n    // extension_header_reserved_3bits must be set to 0. The value is ignored by\n    // a decoder.\n    aom_rb_read_literal(rb, 3);\n  } else {\n    header->temporal_layer_id = 0;\n    header->spatial_layer_id = 0;\n  }\n\n  return AOM_CODEC_OK;\n}\n\naom_codec_err_t aom_read_obu_header(uint8_t *buffer, size_t buffer_length,\n                                    size_t *consumed, ObuHeader *header,\n                                    int is_annexb) {\n  if (buffer_length < 1 || !consumed || !header) return AOM_CODEC_INVALID_PARAM;\n\n  // TODO(tomfinegan): Set the error handler here and throughout this file, and\n  // confirm parsing work done via aom_read_bit_buffer is successful.\n  struct aom_read_bit_buffer rb = { buffer, buffer + buffer_length, 0, NULL,\n                                    NULL };\n  aom_codec_err_t parse_result = read_obu_header(&rb, is_annexb, header);\n  if (parse_result == AOM_CODEC_OK) *consumed = header->size;\n  return parse_result;\n}\n\naom_codec_err_t aom_read_obu_header_and_size(const uint8_t *data,\n                                             size_t bytes_available,\n                                             int is_annexb,\n                                             ObuHeader *obu_header,\n                                             size_t *const payload_size,\n                                             size_t *const bytes_read) {\n  size_t length_field_size_obu = 0;\n  size_t length_field_size_payload = 0;\n  size_t obu_size = 0;\n  aom_codec_err_t status;\n\n  if (is_annexb) {\n    // Size field comes before the OBU header, and includes the OBU header\n    status =\n        read_obu_size(data, bytes_available, &obu_size, &length_field_size_obu);\n\n    if (status != AOM_CODEC_OK) return status;\n  }\n\n  struct aom_read_bit_buffer rb = { data + length_field_size_obu,\n                                    data + bytes_available, 0, NULL, NULL };\n\n  status = read_obu_header(&rb, is_annexb, obu_header);\n  if (status != AOM_CODEC_OK) return status;\n\n  if (!obu_header->has_size_field) {\n    assert(is_annexb);\n    // Derive the payload size from the data we've already read\n    if (obu_size < obu_header->size) return AOM_CODEC_CORRUPT_FRAME;\n\n    *payload_size = obu_size - obu_header->size;\n  } else {\n    // Size field comes after the OBU header, and is just the payload size\n    status = read_obu_size(\n        data + length_field_size_obu + obu_header->size,\n        bytes_available - length_field_size_obu - obu_header->size,\n        payload_size, &length_field_size_payload);\n    if (status != AOM_CODEC_OK) return status;\n  }\n\n  *bytes_read =\n      length_field_size_obu + obu_header->size + length_field_size_payload;\n  return AOM_CODEC_OK;\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/obu_util/sources/obu_util.h",
    "content": "/*\n * Copyright (c) 2018, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n#ifndef AOM_AV1_COMMON_OBU_UTIL_H_\n#define AOM_AV1_COMMON_OBU_UTIL_H_\n\n#include \"aom_codec.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct {\n  size_t size;  // Size (1 or 2 bytes) of the OBU header (including the\n                // optional OBU extension header) in the bitstream.\n  OBU_TYPE type;\n  int has_size_field;\n  int has_extension;  // Whether the optional OBU extension header is present.\n  // The following fields come from the OBU extension header. They are set to 0\n  // if has_extension is false.\n  int temporal_layer_id;\n  int spatial_layer_id;\n} ObuHeader;\n\naom_codec_err_t aom_read_obu_header(uint8_t *buffer, size_t buffer_length,\n                                    size_t *consumed, ObuHeader *header,\n                                    int is_annexb);\n\naom_codec_err_t aom_read_obu_header_and_size(const uint8_t *data,\n                                             size_t bytes_available,\n                                             int is_annexb,\n                                             ObuHeader *obu_header,\n                                             size_t *const payload_size,\n                                             size_t *const bytes_read);\n\n#ifdef __cplusplus\n}  // extern \"C\"\n#endif\n\n#endif  // AOM_AV1_COMMON_OBU_UTIL_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/multimedia/obu_util/sources/recenter.h",
    "content": "/*\n * Copyright (c) 2018, Alliance for Open Media. All rights reserved\n *\n * This source code is subject to the terms of the BSD 2 Clause License and\n * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License\n * was not distributed with this source code in the LICENSE file, you can\n * obtain it at www.aomedia.org/license/software. If the Alliance for Open\n * Media Patent License 1.0 was not distributed with this source code in the\n * PATENTS file, you can obtain it at www.aomedia.org/license/patent.\n */\n\n#ifndef AOM_AOM_DSP_RECENTER_H_\n#define AOM_AOM_DSP_RECENTER_H_\n\n#include \"aom_config.h\"\n\n#include \"aom_integer.h\"\n\n// Inverse recenters a non-negative literal v around a reference r\nstatic INLINE uint16_t inv_recenter_nonneg(uint16_t r, uint16_t v) {\n  if (v > (r << 1))\n    return v;\n  else if ((v & 1) == 0)\n    return (v >> 1) + r;\n  else\n    return r - ((v + 1) >> 1);\n}\n\n// Inverse recenters a non-negative literal v in [0, n-1] around a\n// reference r also in [0, n-1]\nstatic INLINE uint16_t inv_recenter_finite_nonneg(uint16_t n, uint16_t r,\n                                                  uint16_t v) {\n  if ((r << 1) <= n) {\n    return inv_recenter_nonneg(r, v);\n  } else {\n    return n - 1 - inv_recenter_nonneg(n - 1 - r, v);\n  }\n}\n\n// Recenters a non-negative literal v around a reference r\nstatic INLINE uint16_t recenter_nonneg(uint16_t r, uint16_t v) {\n  if (v > (r << 1))\n    return v;\n  else if (v >= r)\n    return ((v - r) << 1);\n  else\n    return ((r - v) << 1) - 1;\n}\n\n// Recenters a non-negative literal v in [0, n-1] around a\n// reference r also in [0, n-1]\nstatic INLINE uint16_t recenter_finite_nonneg(uint16_t n, uint16_t r,\n                                              uint16_t v) {\n  if ((r << 1) <= n) {\n    return recenter_nonneg(r, v);\n  } else {\n    return recenter_nonneg(n - 1 - r, n - 1 - v);\n  }\n}\n\n#endif  // AOM_AOM_DSP_RECENTER_H_\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/network/rfkill/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rfkill\"\nPKG_VERSION=\"0.5\"\nPKG_SHA256=\"e0ae3004215e39a6c5c36e0726558740728d16f67ebdb8bea621250f6091d86a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://wireless.wiki.kernel.org/en/users/documentation/rfkill\"\nPKG_URL=\"https://www.kernel.org/pub/software/network/rfkill/$PKG_NAME-$PKG_VERSION.tar.xz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"A small userspace tool to query the state of the rfkill switches, buttons and subsystem interfaces.\"\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/network/rfkill/patches/rfkill-0001-fix-version-sh.patch",
    "content": "diff -Naur a/version.sh b/version.sh\n--- a/version.sh\n+++ b/version.sh\n@@ -12,19 +12,6 @@\n \n if test \"x$SUFFIX\" != 'x'; then\n \tv=\"$VERSION$SUFFIX\"\n-elif head=`git rev-parse --verify HEAD 2>/dev/null`; then\n-\tgit update-index --refresh --unmerged > /dev/null\n-\tdescr=$(git describe 2>/dev/null || echo \"v$VERSION\")\n-\n-\t# on git builds check that the version number above\n-\t# is correct...\n-\t[ \"${descr%%-*}\" = \"v$VERSION\" ] || exit 2\n-\n-\techo -n 'const char rfkill_version[] = \"' > \"$OUT\"\n-\tv=\"${descr#v}\"\n-\tif git diff-index --name-only HEAD | read dummy ; then\n-\t\tv=\"$v\"-dirty\n-\tfi\n else\n \tv=\"$VERSION\"\n fi\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/amremote/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"amremote\"\nPKG_LICENSE=\"other\"\nPKG_SITE=\"http://www.amlogic.com\"\nPKG_DEPENDS_TARGET=\"toolchain usbutils\"\nPKG_LONGDESC=\"amremote - IR remote configuration utility for Amlogic-based devices\"\n\ncase \"${LINUX}\" in\n  amlogic-4.9)\n    PKG_VERSION=\"1db130a0ccd47f6b5c3d1dffab1e89613b796a8c\"\n    PKG_SHA256=\"5b96f2a1dd03200909eed749f5d97d1d02ee7fc8ac92d8fce6b5d6772ee642dc\"\n    PKG_URL=\"https://github.com/CoreELEC/amremote/archive/${PKG_VERSION}.tar.gz\"\n    ;;\n  amlogic-5.4)\n    PKG_VERSION=\"455eb8ef8507acf899d4723c022de1c981bb697e\"\n    PKG_SHA256=\"985bd796995cd756b0edcc34a88e31392a21c04b6c9a4a46e20f4bca19ab1511\"\n    PKG_URL=\"https://github.com/CoreELEC/amremote/archive/${PKG_VERSION}.tar.gz\"\n    ;;\nesac\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp remotecfg ${INSTALL}/usr/bin\n\n  mkdir -p ${INSTALL}/usr/lib/coreelec\n    cp ${PKG_DIR}/scripts/* ${INSTALL}/usr/lib/coreelec\n}\n\npost_install() {\n  enable_service remote-config.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/amremote/scripts/remote-config",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nremap_keys () {\n  [ ! -f \"$1\" ] && return\n\n  sed -i 's/ 15[^0-9]*$/ 1/\n          s/ 63[^0-9]*$/ 90/\n          s/ 97[^0-9]*$/ 28/\n          s/ 102[^0-9]*$/ 172/\n          s/ 125[^0-9]*$/ 46/\n          s/ 128[^0-9]*$/ 45/\n          s/ 139[^0-9]*$/ 46/\n          s/ 142[^0-9]*$/ 116/\n          s/ 143[^0-9]*$/ 116/\n          s/ 158[^0-9]*$/ 1/\n          s/ 183[^0-9]*$/ 59/\n          s/ 184[^0-9]*$/ 399/\n          s/ 185[^0-9]*$/ 400/\n          s/ 186[^0-9]*$/ 60/\n          s/ 232[^0-9]*$/ 28/\n          s/ 240[^0-9]*$/ 164/\n          s/ 241[^0-9]*$/ 163/\n          s/ 242[^0-9]*$/ 165/\n          s/ 244[^0-9]*$/ 208/\n          s/ 245[^0-9]*$/ 168/\n          s/ 264[^0-9]*$/ 63/\n          s/ 704[^0-9]*$/ 116/' \\\n    \"$1\"\n}\n\n[ ! -e \"/proc/device-tree/meson-ir/compatible\" -o ! -e \"/proc/device-tree/meson-remote/compatible\" ] && exit\n\nif [ -f \"/flash/remote.disable\" -o -f \"/storage/.config/remote.disable\" ]; then\n  echo \"remote control disabled by user\"\n  exit 0\nfi\n\nif [ -f \"/flash/remote.force_meson_ir\" -o -f \"/storage/.config/remote.force_meson_ir\" ]; then\n  force_meson_ir=\"yes\"\nelse\n  force_meson_ir=\"no\"\nfi\n\nif [ -f \"/flash/remote.conf\" ]; then\n  REMOTE_CONF_DIR=\"/flash\"\nelif [ -f \"/storage/.config/remote.conf\" ]; then\n  REMOTE_CONF_DIR=\"/storage/.config\"\nelse\n  REMOTE_CONF_DIR=\"\"\n\n  if [ -d \"/proc/device-tree/custom_maps\" -a \"$force_meson_ir\" = \"no\" ]; then\n    MAP_NAME=$(tr -d '\\0' 2>/dev/null < /proc/device-tree/custom_maps/map_0/mapname)\n    echo \"using meson-remote, with pre-defined map '$MAP_NAME' from dtb\"\n    modprobe meson-remote\n    touch /run/use-meson-remote\n    exit 0\n  fi\nfi\n\nif [ -d \"$REMOTE_CONF_DIR\" ]; then\n  echo \"using meson-remote, conf from $REMOTE_CONF_DIR\"\n\n  if [ -d \"/proc/device-tree/custom_maps\" ]; then\n    MAP_NAME=$(tr -d '\\0' 2>/dev/null < /proc/device-tree/custom_maps/map_0/mapname)\n    echo \"also using pre-defined map '$MAP_NAME' from dtb\"\n  fi\n\n  modprobe meson-remote\n  touch /run/use-meson-remote\n\n  for f in $REMOTE_CONF_DIR/remote*.conf; do\n    echo \"configuring remote with $f\"\n    cp \"$f\" /tmp/remote.conf\n    remap_keys /tmp/remote.conf\n    remotecfg /tmp/remote.conf\n    rm -f /tmp/remote.conf\n  done\nelse\n  echo \"using meson-ir\"\n  modprobe meson-ir\n  touch /run/use-meson-ir\nfi\n\nexit 0\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/amremote/system.d/remote-config.service",
    "content": "[Unit]\nDescription=IR remote control support\nBefore=graphical.target kodi.service\nAfter=multi-user.target\nConditionPathExists=/proc/device-tree/meson-ir/compatible\nConditionPathExists=/proc/device-tree/meson-remote/compatible\n\n[Service]\nType=oneshot\nExecStart=/usr/lib/coreelec/remote-config\n\n[Install]\nWantedBy=graphical.target\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/dtb-xml/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"dtb-xml\"\nPKG_VERSION=\"1.0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Tool to handle custom dtb.img tweaks\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib/coreelec\n  mkdir -p ${INSTALL}/usr/share/bootloader\n    install -m 0755 ${PKG_DIR}/scripts/dtb-xml.sh ${INSTALL}/usr/lib/coreelec/dtb-xml\n    install -m 0644 ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/bootloader/dtb.xml ${INSTALL}/usr/share/bootloader/dtb.xml\n}\n\n# ---------------------------------------\n# No /flash/dtb.xml exist:\n# On first access of a variable by 'get_dtbxml_value' or 'get_dtbxml_multivalues'\n# by CE settings current defined default values are read by dtb-xml.sh and\n# migrated to /flash/dtb.xml.\n#\n# If a matching command value is found the option is set in dtb.xml. If no\n# matching value or the path is not found in dtb.img it get set to 'migrated'.\n# On next access of a option set to 'migrated' the dtb-xml.sh script try again\n# to read current value from dtb.img as it maybe turn to applicable after a\n# update of dtb.img by system update.\n#\n# /flash/dtb.xml get only be edited by dtb-xml.sh script and remain untouched\n# on update of the system. When a update is done user defined values are\n# applied to /flash/dtb.img by dtb.xml directly so no extra reboot is required.\n#\n# Any option node in /flash/dtb.xml can be forced updated by a tar update by\n# changing 'version' of a option node. So Team CoreELEC is still able to\n# maintain user /flash/dtb.xml.\n#\n# On bricked devices: remove /flash/dtb.xml and copy default dtb.img on /flash\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/dtb-xml/scripts/dtb-xml.sh",
    "content": "#!/bin/sh\n#\n# SPDX-License-Identifier: GPL-3.0-or-later\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n#\n#  Update dtb.img by dtb.xml\n#\n#####################################################\n#\n# Command Line Arguments\n# -v = Show verbose output\n# -m = migrate dtb.img settings to dtb.xml\n#\n#####################################################\n\nverbose=0\nchanged=0\nmigrate=0\nBOOT_ROOT='/flash'\namlogic_dt_id=''\n\nwhile [ $# -ne 0 ]; do\n  arg=\"$1\"\n  case \"$arg\" in\n      -v)\n        verbose=1\n        ;;\n      -m)\n        migrate=1\n        ;;\n      *)\n        echo \"Unknown option: '$arg'\"\n        exit\n        ;;\n  esac\n  [ $# -gt 0 ] && shift\ndone\n\nxml_file=\"$BOOT_ROOT/dtb.xml\"\ndefault_xml_file=\"/usr/share/bootloader/dtb.xml\"\ndtb_file=\"$BOOT_ROOT/dtb.img\"\n[ -f /proc/device-tree/amlogic-dt-id ] && amlogic_dt_id=$(tr -d '\\0' < /proc/device-tree/amlogic-dt-id)\nDT_ID=$(dtname)\n\n#########################################################\n# check_linux_version\n#########################################################\n# Return 1 if given kernel version is lower than current kernel version\nfunction check_linux_version() {\n    version_higher=$(uname -r | awk -F '.' \\\n      -v ker_ver=$1 -v maj_ver=$2 -v min_ver=$3 '{\n        if ($1 > ker_ver) { print \"Y\"; }\n        else if ($1 < ker_ver) { print \"N\"; }\n        else {\n          if ($2 > maj_ver) { print \"Y\"; }\n          else if ($2 < maj_ver) { print \"N\"; }\n          else {\n            if ($3 >= min_ver) { print \"Y\"; }\n            else { print \"N\"; }\n          }\n        }\n      }')\n\n    if [ \"$version_higher\" = \"Y\" ]; then\n      return 0\n    else\n      return 1\n    fi\n}\n\n#########################################################\n# log\n#########################################################\nfunction log() {\n  [ \"$verbose\" == 1 ] && echo \"$@\"\n}\n\n#########################################################\n# update_migrated_xml\n#########################################################\n# Update a specified option node if value in dtb.img\n# become applicable by parameter: $update_node\nfunction update_migrated_xml() {\n  update_node=\"$1\"\n  log \" try to update migrated node '$update_node' by dtb.img\"\n  option_nodes=$(xmlstarlet sel -t -m \"//$update_node/*\" -v \"name()\" -n $xml_file)\n\n  # check all options for specified migrated option node\n  for option in $option_nodes; do\n    cmd_count=$(xmlstarlet sel -t -c \"count(//$update_node/$option/cmd)\" $xml_file)\n\n    if [ \"$cmd_count\" == 0 ]; then\n      continue\n    fi\n\n    # check all commands for this current node of BOOT_ROOT dtb.xml if all commands are equal to dtb.img\n    for cnt in $(seq 1 $cmd_count); do\n      cmd_path=$(xmlstarlet sel -t -v \"//$update_node/$option/cmd[$cnt]/@path\" $xml_file)\n      fdt_option=$(xmlstarlet sel -t -v \"//$update_node/$option/cmd[$cnt]/@option\" $xml_file)\n      fdt_option=${fdt_option:-\"t\"}\n      cmd_type=$(xmlstarlet sel -t -m \"//$update_node/$option/cmd[$cnt]\" -v \"concat('-$fdt_option ', @type)\" $xml_file)\n      case \"$fdt_option\" in\n          t)\n            act_value=$(fdtget $amlogic_dt_id $cmd_type $dtb_file $cmd_path 2>/dev/null)\n            if [ \"$?\" == 0 ]; then\n              cmd_value=$(xmlstarlet sel -t -m \"//$update_node/$option\" -m \"cmd[$cnt]/value\" -v \"concat(.,' ')\" $xml_file)\n              [ -n \"$cmd_value\" ] && cmd_value=${cmd_value::-1}\n              [ -n \"$cmd_value\" ] && cmd_value=${cmd_value#\"0x\"}\n              if [ \"$act_value\" != \"$cmd_value\" ]; then\n                continue 2\n              fi\n            else\n              continue 2\n            fi\n            ;;\n          d|r)\n            [ -n \"$(fdtget $amlogic_dt_id $dtb_file $cmd_path 2>/dev/null)\" ] && continue 2\n            ;;\n      esac\n    done\n    # option status changed to applicable, update BOOT_ROOT dtb.xml by current status\n    name_option=$(xmlstarlet sel -t -v \"//$update_node/$option/@name\" -n $xml_file)\n    xmlstarlet ed -L -u \"//$update_node/@status\" -v \"$name_option\" $xml_file\n    xmlstarlet ed -L -d \"//$update_node/${update_node}_migrated\" $xml_file\n    changed=1\n    log \" option status changed from '$node_status' to '$name_option'\"\n    node_status=\"$name_option\"\n    break\n  done\n  # option is still not applicable\n  if [ \"$changed\" == 0 ]; then\n    log \" option status stay unchanged at '$node_status'\"\n  fi\n  log \"\"\n}\n\n#########################################################\n# migrate_dtb_to_xml\n#########################################################\n# Migrate BOOT_ROOT dtb.xml from dtb.img\n#\n# * If no BOOT_ROOT dtb.xml does exist the current values\n#   from dtb.img are migrated by reading each single\n#   option status value from current dtb.img\n# * If no matching option is found in BOOT_ROOT dtb.xml\n#   set the option status to 'migrated'\nfunction migrate_dtb_to_xml() {\n  log \"\"\n  log \"Migrate dtb.xml from dtb.img\"\n  log \"\"\n\n  # loop through all BOOT_ROOT dtb.xml options\n  root_nodes=$(xmlstarlet sel -t -m '/*/*' -v \"name()\" -n $xml_file)\n  for node in $root_nodes; do\n    node_status=$(xmlstarlet sel -t -v \"//$node/@status\" $xml_file)\n    log \"------------------------------------------\"\n    log \" node:  $node, status: '$node_status'\"\n    option_nodes=$(xmlstarlet sel -t -m \"//$node/*\" -v \"name()\" -n $xml_file)\n    name_option_available=0\n\n    # check if the node apply at all by dt_id\n    # if not skip any further check and set to 'migrated'\n    node_dt_id=$(xmlstarlet sel -t -v \"//$node/@dt_id\" $xml_file)\n    if [ -n \"$node_dt_id\" ]; then\n      log \" dt_id: $node_dt_id,  coreelec-dt-id: $DT_ID\"\n\n      dt_id_match=0\n      for dt_id in $node_dt_id; do\n        eval \"\n          case \\$DT_ID in\n            *\"$dt_id\"*)\n              dt_id_match=1\n              ;;\n          esac\n        \"\n      done\n\n      if [ \"$dt_id_match\" == 0 -o -z \"$DT_ID\" ]; then\n        option_nodes=\"\"\n      fi\n    fi\n\n    for option in $option_nodes; do\n      cmd_count=$(xmlstarlet sel -t -c \"count(//$node/$option/cmd)\" $xml_file)\n      cmd_remove_exist=$(xmlstarlet sel -t -m \"//$node/$option/cmd\" -i '@option=\"d\"' -o \"1\" -b -i '@option=\"r\"' -o \"1\" $xml_file)\n      # check all commands for this current node of BOOT_ROOT dtb.xml if all commands are equal to dtb.img\n      for cnt in $(seq 1 $cmd_count); do\n        cmd_path=$(xmlstarlet sel -t -v \"//$node/$option/cmd[$cnt]/@path\" $xml_file)\n        fdt_option=$(xmlstarlet sel -t -v \"//$update_node/$option/cmd[$cnt]/@option\" $xml_file)\n        fdt_option=${fdt_option:-\"t\"}\n        cmd_type=$(xmlstarlet sel -t -m \"//$node/$option/cmd[$cnt]\" -v \"concat('-$fdt_option ', @type)\" $xml_file)\n        case \"$fdt_option\" in\n            t)\n              act_value=$(fdtget $amlogic_dt_id $cmd_type $dtb_file $cmd_path 2>/dev/null)\n              if [ \"$?\" == 0 ]; then\n                cmd_value=$(xmlstarlet sel -t -m \"//$node/$option\" -m \"cmd[$cnt]/value\" -v \"concat(.,' ')\" $xml_file)\n                [ -n \"$cmd_value\" ] && cmd_value=${cmd_value::-1}\n                [ -n \"$cmd_value\" ] && cmd_value=${cmd_value#\"0x\"}\n                if [ \"$act_value\" != \"$cmd_value\" ]; then\n                  continue 2\n                fi\n              else\n                continue 2\n              fi\n              ;;\n            d|r)\n              [ -z \"$(fdtget $amlogic_dt_id $dtb_file $cmd_path 2>/dev/null)\" -a -n \"$cmd_remove_exist\" ] || continue 2\n              ;;\n      esac\n      done\n      name_option_available=1\n      name_option=$(xmlstarlet sel -t -v \"//$node/$option/@name\" -n $xml_file)\n      # if option is available set current status in BOOT_ROOT dtb.xml\n      if [ \"$node_status\" != \"$name_option\" ]; then\n        # special handling to migrate heartbeat setting from config.ini on Odroid devices\n        case $node in\n          sys_led)\n            case $DT_ID in\n              *odroid*)\n                log \" detected Odroid device, migrate heartbeat led setting from config.ini\"\n                heartbeat=\"$( cat /flash/config.ini | awk -F \"=\" '/^heartbeat=/{gsub(/\"|\\047/,\"\",$2); print $2}')\"\n                if [ \"$heartbeat\" == \"0\" ]; then\n                  name_option=\"off\"\n                  fdtput $amlogic_dt_id -t s $dtb_file /gpioleds/sys_led linux,default-trigger none\n                  echo none > /sys/class/leds/sys_led/trigger\n                fi\n                ;;\n            esac\n            ;;\n          wol)\n            if check_linux_version 5 4 210; then\n              wol=\"$( cat /flash/config.ini | awk -F \"=\" '/^wol=/{gsub(/\"|\\047/,\"\",$2); print $2}')\"\n              log \" migrate WOL setting ($wol) from config.ini\"\n              if [ \"$wol\" == \"1\" ]; then\n                name_option=\"on\"\n                fdtput $amlogic_dt_id -t i $dtb_file /soc/ethernet@fdc00000 wol 1\n              fi\n            fi\n            ;;\n        esac\n\n        log \" migrate dtb.xml node '$node' to '$name_option'\"\n        xmlstarlet ed -L -u \"//$node/@status\" -v \"$name_option\" $xml_file\n        continue 2\n      else\n        log \" option status already set, do not migrate option\"\n      fi\n    done\n    # if the option is not available in dtb.img set option status to 'migrated' with current dtb.img value\n    if [ \"$name_option_available\" == 0 ]; then\n      xmlstarlet ed -L -s \"//$node\" -t elem -n \"${node}_migrated\" $xml_file\n      xmlstarlet ed -L -u \"//$node/@status\" -v \"migrated\" $xml_file\n      xmlstarlet ed -L -i \"//${node}_migrated\" -t attr -n \"name\" -v \"migrated\" $xml_file\n      log \" option not applicable by default dtb.xml, migrate to '${node}_migrated'\"\n    fi\n  done\n  log \"------------------------------------------\"\n  log \"\"\n}\n\n#########################################################\n# update_dtb_by_dtb_xml\n#########################################################\n# Update dtb.img by BOOT_ROOT dtb.xml\n#\n# * Check if the option in BOOT_ROOT dtb.xml does include\n#   commands at all\n# * Check if the option in BOOT_ROOT dtb.xml commands are\n#   different and update dtb.img if needed\n# * If dtb.img path is not found set the option to\n#   'migrated' as not applicable\n# * If option is set to 'migrated' check if it became\n#   applicable after dtb.img update\nfunction update_dtb_by_dtb_xml() {\n  root_nodes=$(xmlstarlet sel -t -m '/*/*' -v \"name()\" -n $xml_file)\n\n  log \"\"\n  for node in $root_nodes; do\n    log \"------------------------------------------\"\n    log \" node:   $node\"\n\n    node_status=$(xmlstarlet sel -t -v \"//$node/@status\" $xml_file)\n    log \" status: $node_status\"\n\n    node_dt_id=$(xmlstarlet sel -t -v \"//$node/@dt_id\" $xml_file)\n\n    # check if dt_id is set for this node\n    # if yes compare if the setting does apply for this $dtb_file\n    # if not skip node and set to 'migrated' to hide the option in CoreELEC settings\n    if [ -n \"$node_dt_id\" ]; then\n      log \" dt_id: $node_dt_id\"\n      log \" coreelec-dt-id: $DT_ID\"\n\n      dt_id_match=0\n      for dt_id in $node_dt_id; do\n        eval \"\n          case \\$DT_ID in\n            *\"$dt_id\"*)\n              dt_id_match=1\n              ;;\n          esac\n        \"\n      done\n\n      if [ \"$dt_id_match\" == 0 -o -z \"$DT_ID\" ]; then\n        log \"\"\n        log \" not applicable as dt_id does not match\"\n        log \"\"\n        xmlstarlet ed -L -u \"//$node/@status\" -v \"migrated\" $xml_file\n        continue\n      fi\n    fi\n    log \"\"\n\n    # check if node is 'migrated' and update if possible\n    if [ \"$node_status\" == \"migrated\" ]; then\n      update_migrated_xml $node\n    fi\n\n    # check if node does include commands to be executed\n    cmd_count=$(xmlstarlet sel -t -c \"count(//$node/node()[@name='$node_status']/cmd)\" $xml_file)\n    cmd_remove_exist=$(xmlstarlet sel -t -m \"//$node/*/cmd\" -i '@option=\"d\"' -o \"1\" -b -i '@option=\"r\"' -o \"1\" $xml_file)\n\n    if [ \"$cmd_count\" == 0 ]; then\n      log \" no cmd for node status '$node_status' found\"\n      continue\n    fi\n\n    # check all commands for this current node of BOOT_ROOT dtb.xml if all commands are equal to dtb.img\n    for cnt in $(seq 1 $cmd_count); do\n      cmd_path=$(xmlstarlet sel -t -v \"//$node/node()[@name='$node_status']/cmd[$cnt]/@path\" $xml_file)\n      fdt_option=$(xmlstarlet sel -t -v \"//$node/node()[@name='$node_status']/cmd[$cnt]/@option\" $xml_file)\n      fdt_option=${fdt_option:-\"t\"}\n      cmd_type=$(xmlstarlet sel -t -m \"//$node/node()[@name='$node_status']/cmd[$cnt]\" -v \"concat('-${fdt_option} ', @type)\" $xml_file)\n\n      # check if node commands does exist in dtb.img at all\n      case \"$fdt_option\" in\n          t)\n            act_value=$(fdtget $amlogic_dt_id $cmd_type $dtb_file $cmd_path 2>/dev/null)\n            if [ \"$?\" == \"0\" -o -z \"$act_value\" -a -n \"$cmd_remove_exist\" ]; then\n              cmd_value=$(xmlstarlet sel -t -m \"//$node/node()[@name='$node_status']\" -m \"cmd[$cnt]/value\" -v \"concat('\\\"', .,'\\\" ')\" $xml_file)\n              [ -n \"$cmd_value\" ] && cmd_value=${cmd_value::-1}\n              cmd=\"fdtput $amlogic_dt_id $cmd_type $dtb_file $cmd_path $cmd_value\"\n              cmd_value=\"${cmd_value//\\\"}\"\n              [ -n \"$cmd_value\" ] && cmd_value=${cmd_value#\"0x\"}\n              # check if dtb.img value does match with current BOOT_ROOT dtb.xml status\n              if [ \"$act_value\" != \"$cmd_value\" ]; then\n                eval $cmd\n                log \" cmd[$cnt]: changed, $cmd_path: '$act_value' -> '$cmd_value', result: $?\"\n                changed=1\n              else\n                log \" cmd[$cnt]: unchanged, $cmd_path: '$cmd_value' == '$act_value'\"\n              fi\n            else\n              log \" not applicable\"\n              xmlstarlet ed -L -u \"//$node/@status\" -v \"migrated\" $xml_file\n              continue 2\n            fi\n            ;;\n          d|r)\n            if [ -z \"$(fdtget $amlogic_dt_id $dtb_file $cmd_path 2>/dev/null)\" ]; then\n              log \" cmd[$cnt]: unchanged, still not exist\"\n            else\n              cmd=\"fdtput $amlogic_dt_id $cmd_type $dtb_file $cmd_path\"\n              eval $cmd\n              log \" cmd[$cnt]: changed, $cmd_path: run option '$fdt_option', result: $?\"\n              changed=1\n            fi\n            ;;\n      esac\n    done\n  done\n  log \"------------------------------------------\"\n  log \"\"\n}\n\n#########################################################\n# update_dtb_xml\n#########################################################\n# Update BOOT_ROOT dtb.xml by default dtb.xml\n#\n# * Update whole BOOT_ROOT dtb.xml by default dtb.xml\n#   if dtb-settings version is higher\n# * Check if a new node got introduced by default dtb.xml\n# * Check if default dtb.xml version is higher than\n#   BOOT_ROOT dtb.xml version and update if needed\nfunction update_dtb_xml() {\n  root_node_version=$(xmlstarlet sel -t -v \"//dtb-settings/@version\" $xml_file)\n  default_root_node_version=$(xmlstarlet sel -t -v \"//dtb-settings/@version\" $default_xml_file)\n\n  log \"\"\n  log \"------------------------------------------\"\n  log \" dtb-settings version:           $root_node_version\"\n  log \" dtb-settings default version:   $default_root_node_version\"\n\n  # default dtb.xml version changed, overwrite BOOT_ROOT dtb.xml\n  if [ $root_node_version -lt $default_root_node_version ]; then\n    log \" update complete dtb.xml by default dtb.xml\"\n    cp -p $default_xml_file $xml_file\n  fi\n\n  root_nodes=$(xmlstarlet sel -t -m '/*/*' -v \"name()\" -n $xml_file)\n  default_root_nodes=$(xmlstarlet sel -t -m '/*/*' -v \"name()\" -n $default_xml_file)\n\n  # compare all default dtb.xml nodes with BOOT_ROOT dtb.xml\n  for default_node in $default_root_nodes; do\n    log \"------------------------------------------\"\n    log \" default node:   $default_node\"\n\n    default_node_status=$(xmlstarlet sel -t -v \"//$default_node/@status\" $default_xml_file)\n    default_node_version=$(xmlstarlet sel -t -v \"//$default_node/@version\" $default_xml_file)\n    log \" default status: $default_node_status, version: $default_node_version\"\n    node_status=$(xmlstarlet sel -t -v \"//$default_node/@status\" $xml_file)\n    # new node in default dtb.xml found, copy whole node\n    if [ -z \"$node_status\" ]; then\n      log \" node in current dtb.xml not found, get it from default dtb.xml\"\n      new_node=$(xmlstarlet sel -t -c \"//$default_node\" $default_xml_file)\n      xmlstarlet ed --subnode \"/dtb-settings\" -t text -n \"\" -v \"$new_node\" $xml_file | \\\n              xmlstarlet unesc | xmlstarlet format > tmp_file\n      mv tmp_file $xml_file\n    # node already exist in BOOT_ROOT dtb.xml, check if version update\n    else\n      node_version=$(xmlstarlet sel -t -v \"//$default_node/@version\" $xml_file)\n      log \" status: $node_status, version: $node_version\"\n      # newer version update node\n      if [ $node_version -lt $default_node_version ]; then\n        log \" update node to version $default_node_version\"\n        xmlstarlet ed -L -d \"//$default_node\" $xml_file\n        new_node=$(xmlstarlet sel -t -c \"//$default_node\" $default_xml_file)\n        xmlstarlet ed --subnode \"/dtb-settings\" -t text -n \"\" -v \"$new_node\" $xml_file | \\\n                xmlstarlet unesc | xmlstarlet format > tmp_file\n        mv tmp_file $xml_file\n        option_nodes=$(xmlstarlet sel -t -m \"//$default_node/*\" -v \"name()\" -n $xml_file)\n        # check if old status still apply and set it if true\n        for option in $option_nodes; do\n          option_node_name=$(xmlstarlet sel -t -v \"//$default_node/$option/@name\" $xml_file)\n          if [ \"$node_status\" == \"$option_node_name\" ]; then\n            xmlstarlet ed -L -u \"//$default_node/@status\" -v \"$node_status\" $xml_file\n            log \" updated node status to: $node_status\"\n            continue 2\n          fi\n        done\n      fi\n    fi\n  done\n\n  # compare all user dtb.xml nodes with default dtb.xml\n  for node in $root_nodes; do\n    log \"------------------------------------------\"\n    log \" node:   $node\"\n    node_status=$(xmlstarlet sel -t -v \"//$node/@status\" $default_xml_file)\n    if [ -z \"$node_status\" ]; then\n      xmlstarlet ed -L -d \"//$node\" $xml_file\n      log \" node got removed by default dtb.xml\"\n    else\n      log \" node still in use by default dtb.xml\"\n    fi\n  done\n\n  log \"------------------------------------------\"\n  log \"\"\n}\n\nif [ ! -f $dtb_file ]; then\n  log \"Error, not found: $dtb_file, exit now\"\n  exit 2\nfi\n\n# check if BOOT_ROOT is mounted as 'ro'\ngrep -q \" $BOOT_ROOT vfat ro,\" /proc/mounts\nrw=\"$?\"\n\n# remount as 'rw' if needed\nif [ \"$rw\" == \"0\" ]; then\n  log \"Try to remount '$BOOT_ROOT' in 'rw' mode\"\n  mount -o rw,remount \"$BOOT_ROOT\"\n  if [ \"$?\" != \"0\" ]; then\n    echo \"Failed to remount '$BOOT_ROOT' in 'rw' mode\"\n    exit 12\n  fi\nfi\n\n# copy default dtb.xml to BOOT_ROOT if not found\nif [ ! -f $xml_file ]; then\n  if [ -f $default_xml_file ]; then\n    log \"Creating dtb.xml...\"\n    cp -p $default_xml_file $xml_file\n  else\n    log \"Error, not found: '$default_xml_file', exit now\"\n    exit 2\n  fi\nfi\n\nif [ -n \"$amlogic_dt_id\" ]; then\n  log \"Using amlogic-dt-id: $amlogic_dt_id\"\n  amlogic_dt_id=\"-a $amlogic_dt_id\"\nfi\n\n# handle script parameter\nif [ \"$migrate\" == 1 ]; then\n  migrate_dtb_to_xml\nelse\n  update_dtb_xml\n  update_dtb_by_dtb_xml\nfi\n\n# remount as 'ro' if it was 'ro' before\nif [ \"$rw\" == \"0\" ]; then\n  log \"Try to remount '$BOOT_ROOT' in 'ro' mode\"\n  mount -o ro,remount \"$BOOT_ROOT\"\n  if [ \"$?\" != \"0\" ]; then\n    echo \"Failed to remount '$BOOT_ROOT' in 'ro' mode\"\n    exit 12\n  fi\nfi\n\nexit $changed\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/inject_bl301/config/bl301.conf",
    "content": "####################################################################\n#                  CoreELEC inject_bl301 config                    #\n#                                                                  #\n# coreelec-dt-id blob definition:                                  #\n#                                                                  #\n#  [substring coreelec-dt-id] = [substring BL301 blob binary]      #\n#                                                                  #\n#  [substring coreelec-dt-id] = [] -> \"Not supported\"              #\n#                                                                  #\n# config.ini parameter are auto generated from package bl301:      #\n#                                                                  #\n#  [config variable name]                                          #\n#    config_id = [unique unsigned int ID for variable]             #\n#    config_name = [unique matching config.ini key name]           #\n#                                                                  #\n#  This config parameter value is filled automatic by package.mk.  #\n#  Multiple sections are possible. Do not edit!                    #\n####################################################################\n\n[BL301]\nodroid=\nlepotato=\nlafrite=\nradxa=\ngxl_p212_2g_kvim=Khadas_VIM1\nkhadas_vim3=Khadas_VIM3\nbananapi_m5=Bananapi_M5\nbananapi_m2pro=Bananapi_M2Pro\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/inject_bl301/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"inject_bl301\"\nPKG_VERSION=\"cdaff43a6dc6b44381959bab27b687d6c922b1a0\"\ncase ${ARCH} in \n  'arm')\n    PKG_SHA256=\"65c3c86fe0068c195de6b0afd2791a479ebd4f563317b553cbeaa9326189f3ec\"\n    ;;\n  'aarch64')\n    PKG_SHA256=\"607be0ec8e0d931803a3c452bae6beccaedb443a1f51177981e14d792c435778\"\n    ;;\n  *)\n    PKG_SHA256=''\n    ;;\nesac\nPKG_ARCH=\"aarch64 arm\"\nPKG_SOURCE_NAME=\"$PKG_NAME-$ARCH-$PKG_VERSION.tar.xz\"\nPKG_LICENSE=\"proprietary\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_URL=\"https://sources.coreelec.org/$PKG_SOURCE_NAME\"\nPKG_DEPENDS_TARGET=\"toolchain bl301_xxxxxx bl301_221119 bl301_091020\"\nPKG_LONGDESC=\"Tool to inject bootloader blob BL301.bin on internal eMMC\"\nPKG_TOOLCHAIN=\"manual\"\n\npre_make_target() {\n  cp -av ${PKG_DIR}/config/bl301.conf ${PKG_BUILD}/bl301.conf\n  for PKG_DEPEND_TARGET in ${PKG_DEPENDS_TARGET}; do\n    case ${PKG_DEPEND_TARGET} in \"bl301_\"*)\n      for f in $(find $(get_build_dir ${PKG_DEPEND_TARGET}) -mindepth 1 -name 'coreelec_config.c'); do\n        cat ${f} | awk -F'[(),\"]' '/.config_id_a\\s*=\\s*HASH/ {printf(\"%s %s\\n\", $2, $3)}' | \\\n          while read id name; do\n            if ! grep -Fwq \"${id}\" ${PKG_BUILD}/bl301.conf; then\n              echo -e '\\n['${id}']' >> ${PKG_BUILD}/bl301.conf;\n              cat ${f%.*}.h | awk -v id=\"HASHSTR_${id} \" '$0 ~ id {printf(\"config_id=%s\\n\", $3)}' >> ${PKG_BUILD}/bl301.conf;\n              echo -e \"config_name=${name}\" >> ${PKG_BUILD}/bl301.conf;\n            fi\n          done\n      done\n    esac\n  done\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/sbin\n  mkdir -p ${INSTALL}/usr/lib/coreelec\n  mkdir -p ${INSTALL}/etc/inject_bl301\n    install -m 0755 inject_bl301 ${INSTALL}/usr/sbin/inject_bl301\n    install -m 0755 ${PKG_DIR}/scripts/check-bl301.sh ${INSTALL}/usr/lib/coreelec/check-bl301\n    install -m 0755 ${PKG_DIR}/scripts/update-bl301.sh ${INSTALL}/usr/lib/coreelec/update-bl301\n    install -m 0644 ${PKG_BUILD}/bl301.conf ${INSTALL}/etc/inject_bl301/bl301.conf\n}\n\npost_install() {\n  enable_service update-bl301.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/inject_bl301/scripts/check-bl301.sh",
    "content": "#!/bin/sh\n#\n# SPDX-License-Identifier: GPL-3.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n#\n#  Detect BL301 injection\n#\n#####################################################\n#\n# Comand Line Arguments\n# -v = Show verbose output\n#\n#####################################################\n\nVERBOSE=0\nINSTALLED=0\n\nif [ \"$1\" = \"-v\" ]; then\n  VERBOSE=1\nfi\n\nif [ -e /usr/sbin/inject_bl301 ]; then\n  inject_bl301 -i\n  if [ ${?} = 1 ]; then\n    INSTALLED=1\n  fi\nfi\n\nif [ \"$VERBOSE\" = 1 ]; then\n  if [ \"$INSTALLED\" = 1 ]; then\n    echo \"CoreELEC BL301 Installed\"\n  else\n    echo \"CoreELEC BL301 Not found\"\n  fi\nfi\nexit $INSTALLED\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/inject_bl301/scripts/update-bl301.sh",
    "content": "#!/bin/sh\n#\n# SPDX-License-Identifier: GPL-3.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n#\n#  Update BL301 injection\n#\n#####################################################\n#\n# Comand Line Arguments\n# -v = Show verbose output\n#\n#####################################################\n\nVERBOSE=0\nINSTALLED=0\nUPDATE=1\nRET=0\n\nif [ \"$1\" = \"-v\" ]; then\n  VERBOSE=1\nfi\n\nif [ -e /usr/lib/coreelec/check-bl301 ]; then\n  /usr/lib/coreelec/check-bl301\n  INSTALLED=${?}\n  if [ \"$INSTALLED\" = 1 ]; then\n    touch /run/bl301_injected\n  fi\nfi\n\nif [ -e /usr/sbin/inject_bl301 ] && [ \"$INSTALLED\" = 1 ]; then\n  inject_bl301 -Y > /storage/update-bl301.log\n  UPDATE=${?}\nfi\n\nif [ \"$VERBOSE\" = 1 ]; then\n  if [ \"$INSTALLED\" = 1 ] && [ \"$UPDATE\" = 0 ]; then\n    echo \"CoreELEC BL301 got updated\"\n  elif [ \"$INSTALLED\" = 1 ] && [ \"$UPDATE\" = 1 ]; then\n    echo \"CoreELEC BL301 installed but no update needed\"\n  elif [ \"$INSTALLED\" = 1 ]; then\n    echo \"CoreELEC BL301 installed but error on update: \" $UPDATE\n    RET=$UPDATE\n  elif [ \"$INSTALLED\" = 0 ]; then\n    echo \"CoreELEC BL301 not installed\"\n  fi\nfi\n\nif [ \"$INSTALLED\" = 1 ] && [ \"$UPDATE\" = 0 ]; then\n  sync && reboot\nfi\n\nexit $RET\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/inject_bl301/system.d/update-bl301.service",
    "content": "[Unit]\nDescription=CoreELEC BL301 Update Service\n\n[Service]\nType=oneshot\nExecStart=/usr/lib/coreelec/update-bl301 -v\nRemainAfterExit=no\n\n[Install]\nWantedBy=basic.target\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/tee_preload_fw/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"tee_preload_fw\"\nPKG_VERSION=\"0.1\"\nPKG_SHA256=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"opentee_linuxdriver\"\nPKG_LONGDESC=\"SECPU FW Loader\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/lib\n    ln -sf /var/lib/teetz ${INSTALL}/usr/lib/teetz\n    cp -rP $(get_pkg_directory ${PKG_NAME})/filesystem/. ${INSTALL}\n    cp ${PKG_DIR}/scripts/trusted-application-setup ${INSTALL}/usr/sbin\n}\n\npost_install() {\n  enable_service video-firmware-preload.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/tee_preload_fw/scripts/trusted-application-setup",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nif grep -q \"sc2\" /proc/device-tree/compatible; then\n  SOC=\"S905X4\"\nelif grep -q \"s4\" /proc/device-tree/compatible; then\n  DT_ID=$(dtname)\n  if echo \"${DT_ID}\" | grep -q \"s905y4\"; then\n    SOC=\"S905Y4\"\n  elif echo \"${DT_ID}\" | grep -q \"s905w2\"; then\n    SOC=\"S905W2\"\n  fi\nelif grep -q \"t7\" /proc/device-tree/compatible; then\n  SOC=\"A311D2\"\nfi\n\nif [ -n \"$SOC\" ]; then\n  mkdir -p /var/lib\n  ln -sfn /usr/lib/ta/${SOC} /var/lib/teetz\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/tmate/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"tmate\"\nPKG_VERSION=\"ac919516f4f1b10ec928e20b3a5034d18f609d68\"\nPKG_SHA256=\"a3acd7880e2cca0b2a3bd2d0071ae8ec2aeb0326ccf699b57f519d4a6d0258a2\"\nPKG_LICENSE=\"BSD\"\nPKG_SITE=\"https://github.com/tmate-io/tmate\"\nPKG_URL=\"https://github.com/tmate-io/tmate/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libevent libssh msgpack-c\"\nPKG_LONGDESC=\"Instant terminal sharing.\"\nPKG_TOOLCHAIN=\"autotools\"\n\npre_configure_target() {\n  export LIBS+=\" -lz -lcrypto\"\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n  cp tmate ${INSTALL}/usr/bin\n\n  mkdir -p ${INSTALL}/usr/lib/libreelec\n  cp ${PKG_DIR}/scripts/* ${INSTALL}/usr/lib/libreelec\n}\n\npost_install() {\n  enable_service tmate.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/tmate/patches/path-adjustments.patch",
    "content": "set socket path for easier usage of display command\n\n--- a/tmux.c\t2022-08-07 03:30:02.000000000 +0200\n+++ b/tmux.c\t2022-10-27 19:09:38.616947150 +0200\n@@ -265,6 +265,9 @@ main(int argc, char **argv)\n #endif\n \n \tlabel = path = NULL;\n+\n+\tpath = xstrdup(\"/var/run/tmate.sock\");\n+\n \twhile ((opt = getopt(argc, argv, \"h2c:CdFf:lL:qS:uUVvk:n:r:a:\")) != -1) {\n \t\tswitch (opt) {\n \t\tcase '2':\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/tmate/scripts/tmate-pre.sh",
    "content": "#!/bin/sh\n# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)\n\n[ -z \"${TMATE_CONF}\" ] && exit 1\n\nfor arg in $(cat /proc/cmdline); do\n  case $arg in\n    tmate)\n      TMATE_INVITE=true\n      ;;\n  esac\ndone\n\nMACHINE_ID=$(cat /storage/.cache/systemd-machine-id)\n[ -z \"${MACHINE_ID}\" ] && MACHINE_ID=\"$(openssl rand -hex 16)\"\n[ -n \"${TMATE_USERNAME}\" ] && MACHINE_ID=\"${TMATE_USERNAME}-${MACHINE_ID}\"\n\nTMATE_PUBLIC_KEY_CE=\"/var/run/tmate_id_ed25519_ce.pub\"\nTMATE_PUBLIC_KEY_USER=\"/storage/.config/tmate_id_ed25519_user\"\n\nif [ ! -f ${TMATE_PUBLIC_KEY_USER}.pub ]; then\n  ssh-keygen -t ed25519 -N \"\" -f ${TMATE_PUBLIC_KEY_USER}\n  mv ${TMATE_PUBLIC_KEY_USER} ${TMATE_PUBLIC_KEY_USER}.priv\nfi\n\nif [ \"${TMATE_INVITE}\" = \"true\" ]; then\n  curl --max-time 5 -o ${TMATE_PUBLIC_KEY_CE} \\\n    https://coreelec.org/tmate_id_ed25519_ce.pub\n\n  cat << EOF > \"${TMATE_CONF}\"\nset tmate-webhook-url \"https://eox9tx4pe3wsje1.m.pipedream.net\"\nset tmate-webhook-userdata \"${MACHINE_ID}\"\nset tmate-session-name \"${MACHINE_ID}\"\nset tmate-api-key \"tmk-GBXefJkTxSAW60efR5u6Z0cxrM\"\nset tmate-authorized-keys \"${TMATE_PUBLIC_KEY_CE}\"\nEOF\nelif [ \"${TMATE_SSH_KEY}\" = \"User key\" ]; then\n  cat << EOF > \"${TMATE_CONF}\"\nset tmate-session-name \"${MACHINE_ID}\"\nset tmate-api-key \"tmk-GBXefJkTxSAW60efR5u6Z0cxrM\"\nset tmate-authorized-keys \"${TMATE_PUBLIC_KEY_USER}.pub\"\nEOF\nelse\n  echo \"\" > \"${TMATE_CONF}\"\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/sysutils/tmate/system.d/tmate.service",
    "content": "[Unit]\nDescription=Tmate terminal sharing\nAfter=machine-id.service network-online.target\nConditionKernelCommandLine=|tmate\nConditionPathExists=|/storage/.cache/services/tmate.conf\n\n[Service]\nType=simple\nEnvironment=\"TMATE_CONF=/var/run/tmate.conf\"\nEnvironmentFile=-/storage/.cache/services/tmate.conf\nExecStartPre=/usr/lib/libreelec/tmate-pre.sh\nExecStart=/bin/sh -c \". /etc/profile; /usr/bin/tmate -f ${TMATE_CONF} -F\"\nExecStop=/bin/kill -TERM ${MAINPID}\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/CoreELEC-Debug-Scripts/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"CoreELEC-Debug-Scripts\"\nPKG_VERSION=\"1c7ff1b8c477c6ba0411d16ab0c15e0b3c3b3ff0\"\nPKG_SHA256=\"0ace545ae4db56f8631b6311c8af09f71f99782c3145a8ab9406bb955392098e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/CoreELEC/CoreELEC-Debug-Scripts\"\nPKG_URL=\"https://github.com/CoreELEC/CoreELEC-Debug-Scripts/archive/${PKG_VERSION}.tar.gz\"\nPKG_SOURCE_NAME=\"${PKG_NAME}-${PKG_VERSION}.tar.gz\"\nPKG_LONGDESC=\"A set of scripts to help debug user issues with CoreELEC\"\nPKG_TOOLCHAIN=\"manual\"\n\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    install -m 0755 debug-scripts-helper.sh ${INSTALL}/usr/bin/debug-scripts-helper.sh\n    install -m 0755 dispinfo.sh ${INSTALL}/usr/bin/dispinfo\n    install -m 0755 remoteinfo.sh ${INSTALL}/usr/bin/remoteinfo\n    install -m 0755 audinfo.sh ${INSTALL}/usr/bin/audinfo\n    install -m 0755 ce-debug.sh ${INSTALL}/usr/bin/ce-debug\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/aml-dtbtools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"aml-dtbtools\"\nPKG_VERSION=\"cce100f\"\nPKG_SHA256=\"8bcaa83fcc9e85c9c04930e7411447d96a97da0809c5ecd9af91c8b554133c41\"\nPKG_LICENSE=\"free\"\nPKG_SITE=\"https://github.com/Wilhansen/aml-dtbtools\"\nPKG_URL=\"https://github.com/Wilhansen/aml-dtbtools/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"gcc:host zlib:host dtc:host\"\nPKG_DEPENDS_TARGET=\"toolchain zlib dtc\"\nPKG_LONGDESC=\"AML DTB Tools\"\n\nPKG_MAKE_OPTS_HOST=\"dtbTool\"\nPKG_MAKE_OPTS_TARGET=\"dtbTool dtbSplit\"\n\npre_make_host() {\n  rm -f ${PKG_MAKE_OPTS_HOST}\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp dtbTool ${TOOLCHAIN}/bin\n}\n\npre_make_target() {\n  rm -f ${PKG_MAKE_OPTS_TARGET}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp dtbTool dtbSplit ${INSTALL}/usr/bin\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/aml-dtbtools/patches/0001-change-permisson-on-output-file.patch",
    "content": "From a2b989862cef8a0f64e3c4b2f5ed7f08b776eb17 Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Wed, 29 Jul 2020 09:57:32 +0200\nSubject: [PATCH 1/2] change permisson on output file\n\n---\n dtbTool.c | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/dtbTool.c b/dtbTool.c\nindex 385a03e..3335025 100644\n--- a/dtbTool.c\n+++ b/dtbTool.c\n@@ -377,7 +377,7 @@ int main(int argc, char **argv)\n             flen = strlen(dp->d_name);\n             if ((flen > 4) &&\n                 (strncmp(&dp->d_name[flen-4], \".dtb\", 4) == 0)) {\n-                log_info(\"Found file: %s ... \", dp->d_name);\n+                log_info(\"Found file: %s\\n  \", dp->d_name);\n \n                 flen = strlen(input_dir) + strlen(dp->d_name) + 1;\n                 filename = (char *)malloc(flen);\n@@ -439,7 +439,7 @@ int main(int argc, char **argv)\n \n     log_info(\"\\nGenerating master DTB... \");\n \n-    out_fd = open(output_file, O_WRONLY|O_CREAT | O_TRUNC, S_IRUSR|S_IWUSR);\n+    out_fd = open(output_file, O_WRONLY|O_CREAT | O_TRUNC, 0664);\n     if (!out_fd < 0) {\n         log_err(\"Cannot create '%s'\\n\", output_file);\n         rc = RC_ERROR;\n@@ -529,11 +529,11 @@ int main(int argc, char **argv)\n     close(out_fd);\n \n     if (expected != wrote) {\n-        log_err(\"error writing output file, please rerun: size mismatch %d vs %d\\n\",\n+        log_err(\"error writing output file, please rerun: size mismatch %lu vs %lu\\n\",\n                 expected, wrote);\n         rc = RC_ERROR;\n     } else\n-        log_dbg(\"Total wrote %u bytes\\n\", wrote);\n+        log_dbg(\"Total wrote %lu bytes\\n\", wrote);\n \n     if (rc != RC_SUCCESS)\n         unlink(output_file);\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/aml-dtbtools/patches/0002-add-gzip-compression-support.patch",
    "content": "From c642408b37b00dd9184445114a488796e0abf2e9 Mon Sep 17 00:00:00 2001\nFrom: Peter Vicman <peter.vicman@gmail.com>\nDate: Wed, 29 Jul 2020 10:00:36 +0200\nSubject: [PATCH 2/2] add gzip compression support\n\n---\n Makefile     |   6 +-\n dtbSplit.cpp |  83 +++++++++++++++++++--\n dtbTool.c    |  83 +++++++++++++++++++--\n gzip.c       | 199 +++++++++++++++++++++++++++++++++++++++++++++++++++\n gzip.h       |  52 ++++++++++++++\n 5 files changed, 411 insertions(+), 12 deletions(-)\n create mode 100644 gzip.c\n create mode 100644 gzip.h\n\ndiff --git a/Makefile b/Makefile\nindex c28230b..7352475 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1,7 +1,9 @@\n all: dtbTool dtbSplit\n \n dtbTool: dtbTool.c\n-\t$(CC) -o dtbTool dtbTool.c\n+\t$(CC) $(CFLAGS) $(LDFLAGS) -o dtbTool dtbTool.c gzip.c -lz\n \n dtbSplit: dtbSplit.cpp\n-\t$(CXX) -o dtbSplit -std=c++11 dtbSplit.cpp\n+\t$(CC) $(CFLAGS) -c gzip.c -Wno-pointer-arith\n+\t$(CXX) $(CXXFLAGS) -c dtbSplit.cpp -std=c++11\n+\t$(CXX) $(CXXFLAGS) $(LDFLAGS) -o dtbSplit -std=c++11 dtbSplit.o gzip.o -lz\ndiff --git a/dtbSplit.cpp b/dtbSplit.cpp\nindex c92dea7..b234a34 100644\n--- a/dtbSplit.cpp\n+++ b/dtbSplit.cpp\n@@ -34,10 +34,18 @@\n #include <string>\n #include <cstdio>\n #include <vector>\n+#include <streambuf>\n+\n+#include <arpa/inet.h>\n+extern \"C\" {\n+  #include \"gzip.h\"\n+}\n+\n using namespace std;\n \n #define AML_DT_HEADER 0x5f4c4d41\n #define DT_HEADER_MAGIC\t\t 0xedfe0dd0\n+#define IS_GZIP_FORMAT(data)\t\t((data & (0x0000FFFF)) == (0x00008B1F))\n #define AML_DT_ID_VARI_TOTAL\t\t3\n \n #pragma pack(push, 1)\n@@ -81,7 +89,7 @@ uint32_t swap_bytes_u32(uint32_t b) {\n            (b << 24);\n }\n template<unsigned int ID_SIZE>\n-void dumpData(const uint32_t entries, const string &dest, ifstream &dtb) {\n+void dumpData(const uint32_t entries, const string &dest, stringstream &dtb) {\n \ttypedef HeaderEntry<ID_SIZE> HeaderType;\n \n \tvector<HeaderType> headers;\n@@ -112,13 +120,13 @@ void dumpData(const uint32_t entries, const string &dest, ifstream &dtb) {\n \t\t} else {\n \t\t\tid.write(h.soc, sizeof(h.soc));\n \t\t}\n-\t\tid << '-';\n+\t\tid << '_';\n \t\tif ( h.plat[ID_SIZE-1] == 0 ) {\n \t\t\tid << h.plat;\n \t\t} else {\n \t\t\tid.write(h.plat, sizeof(h.plat));\n \t\t}\n-\t\tid << '-';\n+\t\tid << '_';\n \t\tif ( h.vari[ID_SIZE-1] == 0 ) {\n \t\t\tid << h.vari;\n \t\t} else {\n@@ -140,31 +148,90 @@ void dumpData(const uint32_t entries, const string &dest, ifstream &dtb) {\n \t\tdtb.seekg(h.offset);\n \t\tvector<char> data(dtheader.totalsize);\n \t\tdtb.read(data.data(), data.size());\n-\t\tofstream output(dest + id.str() + \".dtb\", ios::binary);\n+\t\tofstream output(dest + \"_\" + id.str() + \".dtb\", ios::binary);\n \t\toutput.write(data.data(), data.size());\n \t}\n }\n \n int main(int argc, char **argv) {\n+\tunsigned char *bufIn;\n+\tunsigned char *bufOut;\n+\tlong unsigned int lenup = GUNZIP_BUF_SIZE;\n+\tint ret;\n+\tstringstream dtb(std::stringstream::in | std::stringstream::out);\n+\n \tif ( argc < 3  ) {\n \t\tcerr << \"Usage: \" << argv[0] << \" boot.img out_prefix\\n\";\n \t\treturn 1;\n \t}\n \n-\tifstream dtb(argv[1], ios::binary);\n-\tif ( !dtb ) {\n+\tbufIn = (unsigned char *) calloc(1, GUNZIP_BUF_SIZE);\n+\tif (bufIn == NULL) {\n+\t\tcerr << \"Cannot allocate memmory, compression skipped\" << endl;\n+\t\treturn 1;\n+\t}\n+\n+\tbufOut = (unsigned char *) calloc(1, GUNZIP_BUF_SIZE);\n+\tif (bufOut == NULL) {\n+\t\tcerr << \"Cannot allocate memmory, compression skipped\" << endl;\n+\t\tfree(bufIn);\n+\t\treturn 1;\n+\t}\n+  \n+\tifstream dtbFile(argv[1], ios::binary);\n+\tif ( !dtbFile ) {\n \t\tcerr << \"Unable to open dtb file: \" << argv[2] << endl;\n+\t\tfree(bufIn);\n+\t\tfree(bufOut);\n \t\treturn 1;\n \t}\n+\n \tstring dest;\n \tif ( argc > 2 ) {\n \t\tdest = argv[2];\n \t}\n+\n \tHeader header;\n+\tdtbFile.read((char*)&header, sizeof(header));\n+\n+\tif ( IS_GZIP_FORMAT(header.magic) ) {\n+\t\tdtbFile.seekg(0, dtbFile.end);\n+\t\tsize_t length = dtbFile.tellg();\n+\t\tdtbFile.seekg(0, dtbFile.beg);\n+\t\tlength -= dtbFile.tellg();\n+\t\t\n+\t\tif (length > GUNZIP_BUF_SIZE) {\n+\t\t\tcerr << \"Dtb file too big.\" << endl;\n+\t\t\tfree(bufIn);\n+\t\t\tfree(bufOut);\n+\t\t\treturn 1;\n+\t\t}\n+\t\t\n+\t\tdtbFile.read((char *) bufIn, length);\n+\t\tret = gunzip(bufOut, GUNZIP_BUF_SIZE, (unsigned char *)bufIn, &lenup);\n+\t\tif (ret != 0) {\n+\t\t\tcerr << \"gzip error.\" << endl;\n+\t\t\tfree(bufIn);\n+\t\t\tfree(bufOut);\n+\t\t\treturn 1;\n+\t\t}\n+\n+\t\tfor (unsigned i=0; i<lenup; ++i)\n+\t\t\tdtb << bufOut[i];\n+\t} else {\n+\t\tdtbFile.seekg(0);\n+\t\t\n+  \tchar ch;\n+  \twhile (dtbFile.get(ch))\n+\t    dtb << ch;\n+\t}\n+\n \tdtb.read((char*)&header, sizeof(header));\n \n \tif ( header.magic != AML_DT_HEADER ) {\n \t\tcerr << \"Invalid AML DTB header.\" << endl;\n+\t\tfree(bufIn);\n+\t\tfree(bufOut);\n \t\treturn 1;\n \t}\n \tcout << \"DTB Version: \" << header.version << \" entries: \" << header.entry_count << endl;\n@@ -175,8 +242,12 @@ int main(int argc, char **argv) {\n \t\tdumpData<16>(header.entry_count, dest, dtb);\n \t} else {\n \t\tcerr << \"Unrecognized DTB version\" << endl;\n+\t\tfree(bufIn);\n+\t\tfree(bufOut);\n \t\treturn 1;\n \t}\n \n+\tfree(bufIn);\n+\tfree(bufOut);\n \treturn 0;\n }\n\\ No newline at end of file\ndiff --git a/dtbTool.c b/dtbTool.c\nindex 3335025..dcfc76c 100644\n--- a/dtbTool.c\n+++ b/dtbTool.c\n@@ -39,6 +39,8 @@\n #include <getopt.h>\n #include <errno.h>\n #include <unistd.h>\n+#include <time.h>\n+#include \"gzip.h\"\n \n #define AML_DT_MAGIC     \"AML_\"  /* Master DTB magic */\n #define AML_DT_VERSION   2       /* AML version */\n@@ -76,9 +78,74 @@ struct chipInfo_t *chip_list;\n char *input_dir;\n char *output_file;\n char *dtc_path;\n+int   compress_dtb;\n int   verbose;\n int   page_size = PAGE_SIZE_DEF;\n \n+void compress_file(char *output_file)\n+{\n+  FILE *pFile;\n+  unsigned char *bufIn;\n+  unsigned char *bufOut;\n+  long unsigned int bufOutLenp = GUNZIP_BUF_SIZE;\n+  int r;\n+  unsigned long bufInLen;\n+  time_t now = time(NULL);\n+\n+  log_info(\"Compressing master DTB... \");\n+  \n+  bufIn = calloc(1, GUNZIP_BUF_SIZE);\n+  if (bufIn == NULL) {\n+    log_err(\"Cannot allocate memmory, compression skipped\\n\");\n+    return;\n+  }\n+\n+  bufOut = calloc(1, GUNZIP_BUF_SIZE);\n+  if (bufOut == NULL) {\n+    log_err(\"Cannot allocate memmory, compression skipped\\n\");\n+    free(bufIn);\n+    return;\n+  }\n+\n+  pFile = fopen(output_file, \"rb+\");\n+  if (pFile == NULL) {\n+    log_err(\"Cannot open '%s'\\n\", output_file);\n+    free(bufIn);\n+    free(bufOut);\n+    return;\n+  }\n+\n+  bufInLen = fread(bufIn, 1, GUNZIP_BUF_SIZE, pFile);\n+  if (bufInLen <= 0) {\n+    log_err(\"Cannot read '%s'\\n\", output_file);\n+    fclose(pFile);\n+    free(bufIn);\n+    free(bufOut);\n+    return;\n+  }\n+\n+  r = gzip(bufOut, &bufOutLenp, bufIn, bufInLen);\n+  if (r < 0) {\n+    log_err(\"Failed to compress data to dtb: %d!\\n\", r);\n+    fclose(pFile);\n+    free(bufIn);\n+    free(bufOut);\n+    return;\n+  }\n+\n+  /* add time because Amlogic in u-boot expects it for multidtb */\n+  memcpy(&bufOut[4], &now, 4);\n+\n+  rewind(pFile);\n+  r = ftruncate(fileno(pFile), 0);\n+  fwrite(bufOut, 1, bufOutLenp, pFile);\n+  fclose(pFile);\n+\n+  free(bufIn);\n+  free(bufOut);\n+  log_info(\"completed\\n\");\n+}\n+\n int entry_cmp(uint8_t *a, uint8_t *b)\n {\n     return memcmp(a, b, INFO_ENTRY_SIZE);\n@@ -108,6 +175,7 @@ void print_help()\n     log_info(\"  --output-file/-o     output file\\n\");\n     log_info(\"  --dtc-path/-p        path to dtc\\n\");\n     log_info(\"  --page-size/-s       page size in bytes\\n\");\n+    log_info(\"  --compress/-c       compress dtb\\n\");\n     log_info(\"  --verbose/-v         verbose\\n\");\n     log_info(\"  --help/-h            this help screen\\n\");\n }\n@@ -120,12 +188,13 @@ int parse_commandline(int argc, char *const argv[])\n         {\"output-file\", 1, 0, 'o'},\n         {\"dtc-path\",    1, 0, 'p'},\n         {\"page-size\",   1, 0, 's'},\n+        {\"compress\",    0, 0, 'c'},\n         {\"verbose\",     0, 0, 'v'},\n         {\"help\",        0, 0, 'h'},\n         {0, 0, 0, 0}\n     };\n \n-    while ((c = getopt_long(argc, argv, \"-o:p:s:vh\", long_options, NULL))\n+    while ((c = getopt_long(argc, argv, \"-o:p:s:cvh\", long_options, NULL))\n            != -1) {\n         switch (c) {\n         case 1:\n@@ -155,6 +224,9 @@ int parse_commandline(int argc, char *const argv[])\n                 return RC_ERROR;\n             }\n             break;\n+        case 'c':\n+            compress_dtb = 1;\n+            break;\n         case 'v':\n             verbose = 1;\n             break;\n@@ -440,7 +512,7 @@ int main(int argc, char **argv)\n     log_info(\"\\nGenerating master DTB... \");\n \n     out_fd = open(output_file, O_WRONLY|O_CREAT | O_TRUNC, 0664);\n-    if (!out_fd < 0) {\n+    if (out_fd < 0) {\n         log_err(\"Cannot create '%s'\\n\", output_file);\n         rc = RC_ERROR;\n         goto cleanup;\n@@ -529,17 +601,20 @@ int main(int argc, char **argv)\n     close(out_fd);\n \n     if (expected != wrote) {\n-        log_err(\"error writing output file, please rerun: size mismatch %lu vs %lu\\n\",\n+        log_err(\"error writing output file, please rerun: size mismatch %zu vs %zu\\n\",\n                 expected, wrote);\n         rc = RC_ERROR;\n     } else\n-        log_dbg(\"Total wrote %lu bytes\\n\", wrote);\n+        log_dbg(\"Total wrote %zu bytes\\n\", wrote);\n \n     if (rc != RC_SUCCESS)\n         unlink(output_file);\n     else\n         log_info(\"completed\\n\");\n \n+    if (compress_dtb)\n+      compress_file(output_file);\n+\n cleanup:\n     free(filler);\n     chip_deleteall();\ndiff --git a/gzip.c b/gzip.c\nnew file mode 100644\nindex 0000000..457ab6c\n--- /dev/null\n+++ b/gzip.c\n@@ -0,0 +1,199 @@\n+/*\n+ * Simple tool for CoreELEC installation on eMMC\n+ *\n+ * Copyright (C) 2019 Team CoreELEC, vpeter, Portisch\n+ *\n+ *  This program is free software; you can redistribute it and/or modify\n+ *  it under the terms of the GNU General Public License as published by\n+ *  the Free Software Foundation; either version 2 of the License, or\n+ *  (at your option) any later version.\n+ *\n+ *  This program is distributed in the hope that it will be useful,\n+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ *  GNU General Public License for more details.\n+ */\n+\n+#include \"gzip.h\"\n+\n+static void *zalloc(void *x, unsigned items, unsigned size)\n+{\n+  void *p;\n+\n+  size *= items;\n+  size = (size + ZALLOC_ALIGNMENT - 1) & ~(ZALLOC_ALIGNMENT - 1);\n+\n+  p = malloc (size);\n+  return (p);\n+}\n+\n+static void zfree(void *x, void *addr)\n+{\n+  free (addr);\n+}\n+\n+// Uncompress blocks compressed with zlib without headers\n+static int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp,\n+            int stoponerr, int offset)\n+{\n+  z_stream s;\n+  int r;\n+\n+  s.zalloc = zalloc;\n+  s.zfree = zfree;\n+\n+  r = inflateInit2(&s, -MAX_WBITS);\n+  if (r != Z_OK) {\n+    printf (\"Error: inflateInit2() returned %d\\n\", r);\n+    return -1;\n+  }\n+\n+  s.next_in = src + offset;\n+  s.avail_in = *lenp - offset;\n+  s.next_out = (unsigned char *)dst;\n+  s.avail_out = dstlen;\n+\n+  do {\n+    r = inflate(&s, Z_FINISH);\n+    if (stoponerr == 1 && r != Z_STREAM_END &&\n+        (s.avail_out == 0 || r != Z_BUF_ERROR)) {\n+      printf(\"Error: inflate() returned %d\\n\", r);\n+      inflateEnd(&s);\n+      return -1;\n+    }\n+\n+    s.avail_in = *lenp - offset - (int)(s.next_out - (unsigned char*)dst);\n+  } while (r == Z_BUF_ERROR);\n+\n+  *lenp = s.next_out - (unsigned char *) dst;\n+  inflateEnd(&s);\n+  return 0;\n+}\n+\n+//  Compress blocks with zlib\n+static int zzip(void *dst, unsigned long *lenp, unsigned char *src,\n+    unsigned long srclen, int stoponerr,\n+    int (*func)(unsigned long, unsigned long))\n+{\n+  z_stream s;\n+  int r, flush, orig, window;\n+  unsigned long comp_len, left_len;\n+\n+  if (!srclen)\n+    return 0;\n+\n+#ifndef CONFIG_GZIP\n+  window = MAX_WBITS;\n+#else\n+  window = 2 * MAX_WBITS;\n+#endif\n+  orig = *lenp;\n+  s.zalloc = zalloc;\n+  s.zfree = zfree;\n+  s.opaque = Z_NULL;\n+\n+  r = deflateInit2_(&s, Z_DEFAULT_COMPRESSION, Z_DEFLATED,  window,\n+      DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,\n+      ZLIB_VERSION, sizeof(z_stream));\n+  if (r != Z_OK) {\n+    printf (\"Error: deflateInit2_() returned %d\\n\", r);\n+    return -1;\n+  }\n+\n+  while (srclen > 0) {\n+    comp_len = (srclen > CONFIG_GZIP_COMPRESS_DEF_SZ) ?\n+        CONFIG_GZIP_COMPRESS_DEF_SZ : srclen;\n+\n+    s.next_in = src;\n+    s.avail_in = comp_len;\n+    flush = (srclen > CONFIG_GZIP_COMPRESS_DEF_SZ)?\n+      Z_NO_FLUSH : Z_FINISH;\n+\n+    do {\n+      left_len = (*lenp > CONFIG_GZIP_COMPRESS_DEF_SZ) ?\n+          CONFIG_GZIP_COMPRESS_DEF_SZ : *lenp;\n+      s.next_out = (unsigned char *)dst;\n+      s.avail_out = left_len;\n+\n+      r = deflate(&s, flush);\n+      if (r == Z_STREAM_ERROR && stoponerr == 1) {\n+        printf(\"Error: deflate() returned %d\\n\", r);\n+        r = -1;\n+        goto bail;\n+      }\n+\n+      if (!func) {\n+        dst += (left_len - s.avail_out);\n+        *lenp -= (left_len - s.avail_out);\n+      } else if (left_len - s.avail_out > 0) {\n+        r = func((unsigned long)dst,\n+          left_len - s.avail_out);\n+        if (r < 0)\n+          goto bail;\n+      }\n+    } while (s.avail_out == 0 && (*lenp > 0));\n+\n+    if (s.avail_in) {\n+      printf(\"Deflate failed to consume %u bytes\", s.avail_in);\n+      r = -1;\n+      goto bail;\n+    }\n+\n+    if (*lenp == 0) {\n+      printf(\"Deflate need more space to compress \"\n+        \"left %lu bytes\\n\", srclen);\n+      r = -1;\n+      goto bail;\n+    }\n+\n+    srclen -= comp_len;\n+    src += comp_len;\n+  }\n+\n+  r = 0;\n+bail:\n+  deflateEnd(&s);\n+  *lenp = orig - *lenp;\n+  return r;\n+}\n+\n+int gzip(void *dst, unsigned long *lenp,\n+    unsigned char *src, unsigned long srclen)\n+{\n+  return zzip(dst, lenp, src, srclen, 1, NULL);\n+}\n+\n+int gunzip(void *dst, int dstlen,\n+    unsigned char *src, unsigned long *lenp)\n+{\n+  int i, flags;\n+\n+  // skip header\n+  i = 10;\n+  flags = src[3];\n+  if (src[2] != Z_DEFLATED || (flags & RESERVED) != 0) {\n+    puts (\"Error: Bad gzipped data\\n\");\n+    return (-1);\n+  }\n+\n+  if ((flags & EXTRA_FIELD) != 0)\n+    i = 12 + src[10] + (src[11] << 8);\n+\n+  if ((flags & ORIG_NAME) != 0)\n+    while (src[i++] != 0)\n+      ;\n+\n+  if ((flags & COMMENT) != 0)\n+    while (src[i++] != 0)\n+      ;\n+\n+  if ((flags & HEAD_CRC) != 0)\n+    i += 2;\n+\n+  if (i >= *lenp) {\n+    puts (\"Error: gunzip out of data in header\\n\");\n+    return (-1);\n+  }\n+\n+  return zunzip(dst, dstlen, src, lenp, 1, i);\n+}\ndiff --git a/gzip.h b/gzip.h\nnew file mode 100644\nindex 0000000..47d3f53\n--- /dev/null\n+++ b/gzip.h\n@@ -0,0 +1,52 @@\n+/*\n+ * Simple tool for CoreELEC installation on eMMC\n+ *\n+ * Copyright (C) 2019 Team CoreELEC, vpeter, Portisch\n+ *\n+ *  This program is free software; you can redistribute it and/or modify\n+ *  it under the terms of the GNU General Public License as published by\n+ *  the Free Software Foundation; either version 2 of the License, or\n+ *  (at your option) any later version.\n+ *\n+ *  This program is distributed in the hope that it will be useful,\n+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ *  GNU General Public License for more details.\n+ */\n+\n+#ifndef __ZLIB_H__\n+#define __ZLIB_H__\n+\n+#include <stdio.h>\n+#include <stdlib.h>\n+#include \"zlib.h\"\n+\n+// enable gzip mode of zlib\n+#define     CONFIG_GZIP\n+\n+// Maximum value for memLevel in deflateInit2\n+#define     DEF_MEM_LEVEL                   8\n+\n+#ifndef     CONFIG_GZIP_COMPRESS_DEF_SZ\n+#define     CONFIG_GZIP_COMPRESS_DEF_SZ     0x200\n+#endif\n+\n+#define     ZALLOC_ALIGNMENT                16\n+\n+// gzip flag byte\n+#define     ASCII_FLAG                      0x01 // bit 0 set: file probably ascii text\n+#define     HEAD_CRC                        0x02 // bit 1 set: header CRC present\n+#define     EXTRA_FIELD                     0x04 // bit 2 set: extra field present\n+#define     ORIG_NAME                       0x08 // bit 3 set: original file name present\n+#define     COMMENT                         0x10 // bit 4 set: file comment present\n+#define     RESERVED                        0xE0 // bits 5..7: reserved\n+\n+#define     SZ_1M                           0x00100000UL\n+#define     GUNZIP_BUF_SIZE                 (SZ_1M * 5UL)\n+\n+extern int gzip(void *dst, unsigned long *lenp,\n+    unsigned char *src, unsigned long srclen);\n+extern int gunzip(void *dst, int dstlen,\n+    unsigned char *src, unsigned long *lenp);\n+\n+#endif\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/ceemmc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"ceemmc\"\nPKG_LICENSE=\"proprietary\"\nPKG_SITE=\"https://coreelec.org\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Tool to install CoreELEC on internal eMMC\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_VERSION=\"d8058180fef88a8391f1f3410954922ee60bfa32\"\n\ncase \"${ARCH}\" in\n  arm)\n    PKG_SHA256=\"3b773532f7cb6f2a0934c27da6ee14f57d0fd53da9772846243c708b5cdddcd4\"\n    ;;\n  aarch64)\n    PKG_SHA256=\"5d2826f77eda075d4a24d11dc64111378615aa15baf651638ac638031cebe0ae\"\n    ;;\nesac\n\nPKG_SOURCE_NAME=\"${PKG_NAME}-${ARCH}-${PKG_VERSION}.tar.xz\"\nPKG_URL=\"https://sources.coreelec.org/${PKG_SOURCE_NAME}\"\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/sbin\n    install -m 0755 ceemmc ${INSTALL}/usr/sbin/ceemmc\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/entware/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"entware\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/Entware/Entware\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_SECTION=\"tools\"\nPKG_LONGDESC=\"entware: A software repository that offers various software programs that can be installed on your device\"\nPKG_TOOLCHAIN=\"manual\"\n\npost_install() {\n  mkdir -p $INSTALL/usr/sbin\n    cp -P $PKG_DIR/scripts/installentware $INSTALL/usr/sbin\n\n    # Replace Entware Arch\n    sed -e \"s/@ENTWARE_ARCH@/$ENTWARE_ARCH/g\" \\\n        -i $INSTALL/usr/sbin/installentware\n\n  enable_service entware.service\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/entware/profile.d/99-entware.conf",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\ncase $- in\n  *i*)\n    if [ -f /opt/etc/profile ]; then\n      # remove locale which interfere with CoreELEC\n      if grep -Eq '^export LANG=|^export LC_ALL=' /opt/etc/profile; then\n        sed -e \"s|^export LANG=\\(.*\\)|#CE  export LANG=\\1|g\" \\\n            -e \"s|^export LC_ALL=\\(.*\\)|#CE  export LC_ALL=\\1|g\" \\\n            -i /opt/etc/profile\n      fi\n\n      . /opt/etc/profile\n    fi\n    ;;\n  *)\n    ;;\nesac\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/entware/scripts/installentware",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nexport PATH=/opt/bin:/opt/sbin:$PATH\n\n[ ! -d /storage/.opt ] && mkdir -p /storage/.opt\n\nif [ ! -f /opt/bin/opkg ]; then\n  wget -O - http://bin.entware.net/@ENTWARE_ARCH@/installer/generic.sh | /bin/sh\n\n  echo \"\"\n  read -p \"Would you like to reboot now to finish installation (recommended) [y/N]? \" choice\n  case \"$choice\" in\n    [yY]*)\n      reboot\n      ;;\n  esac\nelse\n  echo \"Entware is already installed.\"\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/entware/system.d/entware.service",
    "content": "[Unit]\nDescription=Entware service\nAfter=systemd-tmpfiles-setup.service network-online.target\nBefore=kodi.service\nRequires=network-online.target\nConditionPathExists=/opt/etc/init.d/rc.unslung\n\n[Service]\nType=oneshot\nExecStart=/opt/etc/init.d/rc.unslung start\nExecStop=/opt/etc/init.d/rc.unslung stop\nRemainAfterExit=yes\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/rtk_hciattach/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)\n\nPKG_NAME=\"rtk_hciattach\"\nPKG_VERSION=\"3d0ed39cfdd24343715057e93134cd63b7321827\"\nPKG_SHA256=\"6c5908e4e07fe4a74c54f5b58f01bdbeffc2aa2f8b529c5f32ce897e087edf7a\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://github.com/Caesar-github/rkwifibt\"\nPKG_URL=\"https://github.com/Caesar-github/rkwifibt/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Realtek BT FW loader\"\nPKG_TOOLCHAIN=\"make\"\n\nunpack() {\n  mkdir -p $PKG_BUILD\n  tar --strip-components=3 -xf $SOURCES/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz -C $PKG_BUILD rkwifibt-$PKG_VERSION/realtek/rtk_hciattach\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/rtk_hciattach/patches/rtk_hciattach-01-Makefile.patch",
    "content": "--- a/Makefile\n+++ b/Makefile\n@@ -1,4 +1,4 @@\n-CFLAGS := -Wall -g\n+CFLAGS := -g\n #CC := $(CROSS_COMPLE)gcc\n all: rtk_hciattach\n OBJS := hciattach.o hciattach_rtk.o hciattach_h4.o rtb_fwc.o\n@@ -12,6 +12,10 @@\n clean:\n \trm -f $(OBJS)  rtk_hciattach\n \n+install:\n+\tinstall -m 755 -d $(DESTDIR)/usr/bin\n+\tinstall -m 755 rtk_hciattach $(DESTDIR)/usr/bin\n+\n tags: FORCE\n \tctags -R\n \tfind ./ -name \"*.h\" -o -name \"*.c\" -o -name \"*.cc\" -o -name \"*.cpp\" > cscope.files\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/rtk_hciattach/patches/rtk_hciattach-02-change-location-of-btaddr-file.patch",
    "content": "From ca8ab97b2d72632858867110d76b1d06123485c9 Mon Sep 17 00:00:00 2001\nFrom: Stanislav Vlasic <svlasic@gmail.com>\nDate: Mon, 15 Aug 2022 00:06:37 +0200\nSubject: [PATCH] Change location of btaddr file\n\n---\n realtek/rtk_hciattach/rtb_fwc.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/rtb_fwc.c b/rtb_fwc.c\nindex 5e9e370..cac9309 100644\n--- a/rtb_fwc.c\n+++ b/rtb_fwc.c\n@@ -39,7 +39,7 @@\n #define FIRMWARE_DIRECTORY\t\"/lib/firmware/rtlbt/\"\n #define BT_CONFIG_DIRECTORY\t\"/lib/firmware/rtlbt/\"\n #define EXTRA_CONFIG_FILE\t\"/opt/rtk_btconfig.txt\"\n-#define BT_ADDR_FILE\t\t\"/opt/bdaddr\"\n+#define BT_ADDR_FILE\t\t\"/storage/.config/btaddr\"\n #define BDADDR_STRING_LEN\t17\n \n struct list_head {\n-- \n2.37.2\n\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/u-boot-script/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"u-boot-script\"\nPKG_VERSION=\"1.0\"\nPKG_LICENSE=\"GPL\"\nPKG_DEPENDS_TARGET=\"u-boot-tools\"\nPKG_TOOLCHAIN=\"manual\"\nPKG_LONGDESC=\"Compile scripts for u-boot environment.\"\n\nPKG_NEED_UNPACK=\"$PROJECT_DIR/$PROJECT/bootloader\"\n[ -n \"$DEVICE\" ] && PKG_NEED_UNPACK+=\" $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader\"\n\nmake_target() {\n  if find_dir_path bootloader/scripts ; then\n    for src in $FOUND_PATH/*.src ; do\n      mkimage -A $TARGET_KERNEL_ARCH -O linux -T script -C none -d \"$src\" \"$(basename $src .src)\"\n    done\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/share/bootloader\n    cp -a $PKG_BUILD/* $INSTALL/usr/share/bootloader/\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/u-boot-tools/config/fw_env.config",
    "content": "# Configuration file for fw_(printenv/setenv) utility.\n# Up to two entries are valid, in this case the redundant\n# environment sector is assumed present.\n# Notice, that the \"Number of sectors\" is not required on NOR and SPI-dataflash.\n# Futhermore, if the Flash sector size is ommitted, this value is assumed to\n# be the same as the Environment size, which is valid for NOR and SPI-dataflash\n\n# NOR example\n# MTD device name\tDevice offset\tEnv. size\tFlash sector size\tNumber of sectors\n#/dev/mtd1\t\t0x0000\t\t0x4000\t\t0x4000\n#/dev/mtd2\t\t0x0000\t\t0x4000\t\t0x4000\n\n# MTD SPI-dataflash example\n# MTD device name\tDevice offset\tEnv. size\tFlash sector size\tNumber of sectors\n#/dev/mtd5\t\t0x4200\t\t0x4200\n#/dev/mtd6\t\t0x4200\t\t0x4200\n\n# NAND example\n#/dev/mtd0\t\t0x4000\t\t0x4000\t\t0x20000\t\t\t2\n\n# Block device example\n#/dev/mmcblk0\t\t0xc0000\t\t0x20000\n\n# VFAT example\n#/boot/uboot.env\t0x0000          0x4000\n\n# Amlogic NAND\n/dev/nand_env\t\t0x000000\t0x10000 \t0x10000\n\n# Amlogic eMMC\n/dev/env\t\t0x000000\t0x10000 \t0x10000\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/u-boot-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"u-boot-tools\"\nPKG_VERSION=\"2016.03\"\nPKG_SHA256=\"e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"ftp://ftp.denx.de/pub/u-boot/u-boot-$PKG_VERSION.tar.bz2\"\nPKG_DEPENDS_HOST=\"gcc:host\"\nPKG_DEPENDS_TARGET=\"toolchain u-boot-tools:host\"\nPKG_LICENSE=\"GPL\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\n\nmake_host() {\n  make mrproper\n  make dummy_defconfig\n  make tools-only\n}\n\nmake_target() {\n  CROSS_COMPILE=\"$TARGET_PREFIX\" LDFLAGS=\"\" ARCH=arm make dummy_defconfig\n  CROSS_COMPILE=\"$TARGET_PREFIX\" LDFLAGS=\"\" ARCH=arm make env\n}\n\nmakeinstall_host() {\n  mkdir -p $TOOLCHAIN/bin\n    cp tools/mkimage $TOOLCHAIN/bin\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/etc\n    cp $PKG_DIR/config/fw_env.config $INSTALL/etc/fw_env.config\n\n  mkdir -p $INSTALL/usr/sbin\n    cp tools/env/fw_printenv $INSTALL/usr/sbin/fw_printenv\n    cp tools/env/fw_printenv $INSTALL/usr/sbin/fw_setenv\n}\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/u-boot-tools/patches/u-boot-tools-0001-dummy_defconfig.patch",
    "content": "--- a/configs/dummy_defconfig\n+++ b/configs/dummy_defconfig\n@@ -0,0 +1,2 @@\n+CONFIG_ARM=y\n+\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/u-boot-tools/patches/u-boot-tools-0002-allow-multiple-entries.patch",
    "content": "--- u-boot-tools-2016.01/tools/env/fw_env.c.orig\t2016-01-12 15:06:54.000000000 +0100\n+++ u-boot-tools-2016.01/tools/env/fw_env.c\t2016-03-22 09:47:07.014381827 +0100\n@@ -1453,6 +1453,7 @@\n \tint rc;\n \tchar dump[128];\n \tchar *devname;\n+\tint fd_test;\n \n \tfp = fopen (fname, \"r\");\n \tif (fp == NULL)\n@@ -1473,6 +1474,12 @@\n \t\tif (rc < 3)\n \t\t\tcontinue;\n \n+\t\tfd_test = open (devname, O_RDWR);\n+\t\tif (fd_test < 0)\n+\t\t\tcontinue;\n+\t\tif (close (fd_test))\n+\t\t\tcontinue;\n+\n \t\tDEVNAME(i) = devname;\n \n \t\tif (rc < 4)\n"
  },
  {
    "path": "projects/Amlogic-ce/packages/tools/u-boot-tools/patches/u-boot-tools-0003-nand_env-hack.patch",
    "content": "diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c\nindex 8b0317a..575f12a 100644\n--- a/tools/env/fw_env.c\n+++ b/tools/env/fw_env.c\n@@ -888,12 +888,13 @@ static int flash_write_buf (int dev, int fd, void *buf, size_t count,\n \t\t\t\t}\n \t\t}\n \n-\t\tif (lseek (fd, blockstart, SEEK_SET) == -1) {\n-\t\t\tfprintf (stderr,\n-\t\t\t\t \"Seek error on %s: %s\\n\",\n-\t\t\t\t DEVNAME (dev), strerror (errno));\n-\t\t\treturn -1;\n-\t\t}\n+\t\tif (blockstart != 0)\n+\t\t\tif (lseek (fd, blockstart, SEEK_SET) == -1) {\n+\t\t\t\tfprintf (stderr,\n+\t\t\t\t\t \"Seek error on %s: %s\\n\",\n+\t\t\t\t\t DEVNAME (dev), strerror (errno));\n+\t\t\t\treturn -1;\n+\t\t\t}\n \n #ifdef DEBUG\n \t\tfprintf(stderr, \"Write 0x%x bytes at 0x%llx\\n\", erasesize,\n@@ -1025,25 +1026,8 @@ static int flash_read (int fd)\n \t\treturn -1;\n \t}\n \n-\tif (S_ISCHR(st.st_mode)) {\n-\t\trc = ioctl(fd, MEMGETINFO, &mtdinfo);\n-\t\tif (rc < 0) {\n-\t\t\tfprintf(stderr, \"Cannot get MTD information for %s\\n\",\n-\t\t\t\tDEVNAME(dev_current));\n-\t\t\treturn -1;\n-\t\t}\n-\t\tif (mtdinfo.type != MTD_NORFLASH &&\n-\t\t    mtdinfo.type != MTD_NANDFLASH &&\n-\t\t    mtdinfo.type != MTD_DATAFLASH &&\n-\t\t    mtdinfo.type != MTD_UBIVOLUME) {\n-\t\t\tfprintf (stderr, \"Unsupported flash type %u on %s\\n\",\n-\t\t\t\t mtdinfo.type, DEVNAME(dev_current));\n-\t\t\treturn -1;\n-\t\t}\n-\t} else {\n-\t\tmemset(&mtdinfo, 0, sizeof(mtdinfo));\n-\t\tmtdinfo.type = MTD_ABSENT;\n-\t}\n+\tmemset(&mtdinfo, 0, sizeof(mtdinfo));\n+\tmtdinfo.type = MTD_ABSENT;\n \n \tDEVTYPE(dev_current) = mtdinfo.type;\n \n"
  },
  {
    "path": "projects/Amlogic-ce/packages/virtual/remote/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\nPKG_NAME=\"remote\"\nPKG_VERSION=\"1\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.openelec.tv\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain eventlircd libirman v4l-utils evrepeat\"\nPKG_SECTION=\"virtual\"\nPKG_LONGDESC=\"Meta package for installing various tools needed for remote support\"\n\nif [ \"$AMREMOTE_SUPPORT\" = \"yes\" ]; then\n  PKG_DEPENDS_TARGET=\"$PKG_DEPENDS_TARGET amremote\"\nfi\n"
  },
  {
    "path": "projects/Amlogic-ce/patches/RTL8812AU-/0001-Fix-for-Amlogic-kernel-5.15.78.patch",
    "content": "From 40772ce7c3c30a467cd9e27fe6dca52c0685b021 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 23 Nov 2023 13:28:10 +0100\nSubject: [PATCH 1/2] Fix for Amlogic kernel >=5.15.78\n\nSome #if are adjusted to fit Amlogic kernel backports.\n---\n os_dep/linux/ioctl_cfg80211.c | 22 +++++++++++-----------\n 1 file changed, 11 insertions(+), 11 deletions(-)\n\ndiff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c\nindex 03f6240..62a6c20 100644\n--- a/os_dep/linux/ioctl_cfg80211.c\n+++ b/os_dep/linux/ioctl_cfg80211.c\n@@ -462,7 +462,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,\n \tif (started) {\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))\n \t\tcfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false, 0);\n-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \t\tcfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false);\n #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,0))\n \t\tcfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false);\n@@ -478,7 +478,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,\n \n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))\n \tcfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);\n-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2))\n+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \tcfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);\n #else\n \tcfg80211_ch_switch_notify(adapter->pnetdev, &chdef);\n@@ -1155,7 +1155,7 @@ check_bss:\n \t\t#endif\n \n \t\t#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \t\troam_info.links[0].bssid = cur_network->network.MacAddress;\n #else\n \t\troam_info.bssid = cur_network->network.MacAddress;\n@@ -1725,7 +1725,7 @@ exit:\n }\n \n static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \t, int link_id\n #endif\n \t, u8 key_index\n@@ -1872,7 +1872,7 @@ addkey_end:\n }\n \n static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \t, int link_id\n #endif\n \t, u8 keyid\n@@ -2040,7 +2040,7 @@ exit:\n }\n \n static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \tint link_id,\n #endif\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)\n@@ -2064,7 +2064,7 @@ static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,\n \n static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,\n \tstruct net_device *ndev,\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \tint link_id,\n #endif\n \tu8 key_index\n@@ -2116,7 +2116,7 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))\n int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy,\n \tstruct net_device *ndev,\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \tint link_id,\n #endif\n \tu8 key_index)\n@@ -5252,7 +5252,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd\n \treturn ret;\n }\n \n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)\n #else\n static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)\n@@ -6128,7 +6128,7 @@ static int\tcfg80211_rtw_set_channel(struct wiphy *wiphy\n \treturn 0;\n }\n \n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, unsigned int link_id, struct cfg80211_chan_def *chandef){\n #else\n static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, struct cfg80211_chan_def *chandef){\n@@ -10420,7 +10420,7 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)\n \t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)\n \t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))\n \tif (wdev->links[0].client.current_bss) {\n-\t#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))\n+\t#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78))\n \tif (wdev->connected) {\n \t#else\n \tif (wdev->current_bss) {\n-- \n2.35.0\n\n"
  },
  {
    "path": "projects/Amlogic-ce/patches/RTL8822BU-aml/0001-Fix-for-Amlogic-kernel-5.15.78.patch",
    "content": "From 041beabf517f080abf7894eafea3d05dc8a58bb7 Mon Sep 17 00:00:00 2001\nFrom: Portisch <hugo.portisch@yahoo.de>\nDate: Thu, 23 Nov 2023 13:28:10 +0100\nSubject: [PATCH] Fix for Amlogic kernel >=5.15.78\n\nSome #if are adjusted to fit Amlogic kernel backports.\n---\n os_dep/linux/ioctl_cfg80211.c | 64 +++++++++++++++++------------------\n 1 file changed, 32 insertions(+), 32 deletions(-)\n\ndiff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c\nindex 9af4e69..41737c1 100644\n--- a/os_dep/linux/ioctl_cfg80211.c\n+++ b/os_dep/linux/ioctl_cfg80211.c\n@@ -87,7 +87,7 @@\n #define WIFI_CIPHER_SUITE_BIP_CMAC_256\t0x000FAC0D\n \n /*\n- * If customer need, defining this flag will make driver \n+ * If customer need, defining this flag will make driver\n  * always return -EBUSY at the condition of scan deny.\n  */\n /* #define CONFIG_NOTIFY_SCAN_ABORT_WITH_BUSY */\n@@ -464,7 +464,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,\n \t\t *  called by others with block-tx.\n \t\t */\n \n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78) || defined(RHEL88))\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) || defined(RHEL89))\n \t\tcfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false, 0);\n #else\n@@ -483,7 +483,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,\n \tif (!rtw_cfg80211_allow_ch_switch_notify(adapter))\n \t\tgoto exit;\n \n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78) || defined(RHEL88))\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)  || defined(RHEL89))\n \tcfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);\n #else\n@@ -1159,7 +1159,7 @@ check_bss:\n \t\t#endif\n \n \t\t#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(RHEL88))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78) || defined(RHEL88))\n \t\troam_info.links[0].bssid = cur_network->network.MacAddress;\n #else\n \t\troam_info.bssid = cur_network->network.MacAddress;\n@@ -1821,8 +1821,8 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param\n \t\t\t\t\t\t_rtw_memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8);\n \t\t\t\t\t\t_rtw_memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8);\n \t\t\t\t\t\tpadapter->securitypriv.binstallGrpkey = _TRUE;\n-\t\t\t\t\t\tif (param->u.crypt.idx < 4) \n-\t\t\t\t\t\t\t_rtw_memcpy(padapter->securitypriv.iv_seq[param->u.crypt.idx], param->u.crypt.seq, 8);\t\t\t\t\t\t\t\n+\t\t\t\t\t\tif (param->u.crypt.idx < 4)\n+\t\t\t\t\t\t\t_rtw_memcpy(padapter->securitypriv.iv_seq[param->u.crypt.idx], param->u.crypt.seq, 8);\n \t\t\t\t\t\tpadapter->securitypriv.dot118021XGrpKeyid = param->u.crypt.idx;\n \t\t\t\t\t\trtw_set_key(padapter, &padapter->securitypriv, param->u.crypt.idx, 1, _TRUE);\n \t\t\t\t\t} else if (strcmp(param->u.crypt.alg, \"GCMP_256\") == 0\n@@ -1923,7 +1923,7 @@ exit:\n }\n \n static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78) || defined(RHEL88))\n \t, int link_id\n #endif\n \t, u8 key_index\n@@ -2088,7 +2088,7 @@ addkey_end:\n }\n \n static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78) || defined(RHEL88))\n \t, int link_id\n #endif\n \t, u8 keyid\n@@ -2279,7 +2279,7 @@ exit:\n }\n \n static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78) || defined(RHEL88))\n \tint link_id,\n #endif\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)\n@@ -2303,7 +2303,7 @@ static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,\n \n static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,\n \tstruct net_device *ndev,\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78) || defined(RHEL88))\n \tint link_id,\n #endif\n \tu8 key_index\n@@ -2355,7 +2355,7 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))\n int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy,\n \tstruct net_device *ndev,\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78) || defined(RHEL88))\n \tint link_id,\n #endif\n \tu8 key_index)\n@@ -3240,7 +3240,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy\n \tif (request->flags & NL80211_SCAN_FLAG_RANDOM_ADDR) {\n \t\tget_random_mask_addr(pwdev_priv->pno_mac_addr, request->mac_addr,\n \t\t\t\t     request->mac_addr_mask);\n-\t\tprint_hex_dump(KERN_DEBUG, \"random mac_addr: \", \n+\t\tprint_hex_dump(KERN_DEBUG, \"random mac_addr: \",\n \t\t\tDUMP_PREFIX_OFFSET, 16, 1, pwdev_priv->pno_mac_addr, ETH_ALEN, 1);\n \t}\n \telse\n@@ -3563,7 +3563,7 @@ check_need_indicate_scan_done:\n \t\tinfo.aborted = 0;\n #endif\n \t\t/* the process time of scan results must be over at least 1ms in the newly Android */\n-\t\trtw_msleep_os(1); \n+\t\trtw_msleep_os(1);\n \n \t\t_rtw_cfg80211_surveydone_event_callback(padapter, request);\n #if (KERNEL_VERSION(4, 8, 0) <= LINUX_VERSION_CODE)\n@@ -3823,8 +3823,8 @@ static int rtw_cfg80211_set_key_mgt(struct security_priv *psecuritypriv, u32 key\n \t\tpsecuritypriv->rsn_akm_suite_type = 4;\n \t}\n #endif\n-\telse if (key_mgt == WLAN_AKM_SUITE_SAE) { \n-\t\tpsecuritypriv->rsn_akm_suite_type = 8; \n+\telse if (key_mgt == WLAN_AKM_SUITE_SAE) {\n+\t\tpsecuritypriv->rsn_akm_suite_type = 8;\n \t} else {\n \t\tRTW_INFO(\"Invalid key mgt: 0x%x\\n\", key_mgt);\n \t\t/* return -EINVAL; */\n@@ -5409,7 +5409,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd\n \tstruct cfg80211_ap_update *info)\n #else\n \tstruct cfg80211_beacon_data *info)\n-#endif\t\t\n+#endif\n {\n \tint ret = 0;\n \t_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);\n@@ -5425,7 +5425,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd\n \treturn ret;\n }\n \n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78) || defined(RHEL88))\n static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev,\n \t\tunsigned int link_id)\n #else\n@@ -6063,7 +6063,7 @@ static int\tcfg80211_rtw_dump_station(struct wiphy *wiphy, struct net_device *nde\n \telse\n \t\t_rtw_memcpy(mac, plink->addr, ETH_ALEN);\n \t#endif\n-\t\n+\n \tsinfo->filled = 0;\n \n \tif (psta) {\n@@ -6810,7 +6810,7 @@ exit:\n \n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))\n static int cfg80211_rtw_get_channel(struct wiphy *wiphy,\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88))\n+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78) || defined(RHEL88))\n \tstruct wireless_dev *wdev, unsigned int link_id,\n #else\n \tstruct wireless_dev *wdev,\n@@ -8787,7 +8787,7 @@ void dump_mesh_config(void *sel, const struct mesh_config *conf)\n \tRTW_PRINT_SEL(sel, \"path_refresh_time:%u\\n\", conf->path_refresh_time);\n \tRTW_PRINT_SEL(sel, \"min_discovery_timeout:%u\\n\", conf->min_discovery_timeout);\n \tRTW_PRINT_SEL(sel, \"dot11MeshHWMPactivePathTimeout:%u\\n\", conf->dot11MeshHWMPactivePathTimeout);\n-\tRTW_PRINT_SEL(sel, \"dot11MeshHWMPpreqMinInterval:%u\\n\", conf->dot11MeshHWMPpreqMinInterval);\t\n+\tRTW_PRINT_SEL(sel, \"dot11MeshHWMPpreqMinInterval:%u\\n\", conf->dot11MeshHWMPpreqMinInterval);\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0))\n \tRTW_PRINT_SEL(sel, \"dot11MeshHWMPperrMinInterval:%u\\n\", conf->dot11MeshHWMPperrMinInterval);\n #endif\n@@ -8802,11 +8802,11 @@ void dump_mesh_config(void *sel, const struct mesh_config *conf)\n \tRTW_PRINT_SEL(sel, \"dot11MeshForwarding:%d\\n\", conf->dot11MeshForwarding);\n \tRTW_PRINT_SEL(sel, \"rssi_threshold:%d\\n\", conf->rssi_threshold);\n #endif\n-\t\n+\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0))\n \tRTW_PRINT_SEL(sel, \"ht_opmode:0x%04x\\n\", conf->ht_opmode);\n #endif\n-\t\n+\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))\n \tRTW_PRINT_SEL(sel, \"dot11MeshHWMPactivePathToRootTimeout:%u\\n\", conf->dot11MeshHWMPactivePathToRootTimeout);\n \tRTW_PRINT_SEL(sel, \"dot11MeshHWMProotInterval:%u\\n\", conf->dot11MeshHWMProotInterval);\n@@ -8817,7 +8817,7 @@ void dump_mesh_config(void *sel, const struct mesh_config *conf)\n \tRTW_PRINT_SEL(sel, \"power_mode:%s\\n\", nl80211_mesh_power_mode_str(conf->power_mode));\n \tRTW_PRINT_SEL(sel, \"dot11MeshAwakeWindowDuration:%u\\n\", conf->dot11MeshAwakeWindowDuration);\n #endif\n-\t\n+\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0))\n \tRTW_PRINT_SEL(sel, \"plink_timeout:%u\\n\", conf->plink_timeout);\n #endif\n@@ -8953,14 +8953,14 @@ static void rtw_cfg80211_mesh_cfg_set(_adapter *adapter, const struct mesh_confi\n \tif (chk_mesh_attr(NL80211_MESHCONF_HT_OPMODE, mask));\n #endif\n #endif\n-\t\n+\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))\n \tif (chk_mesh_attr(NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, mask))\n \t\tmcfg->dot11MeshHWMPactivePathToRootTimeout = conf->dot11MeshHWMPactivePathToRootTimeout;\n \tif (chk_mesh_attr(NL80211_MESHCONF_HWMP_ROOT_INTERVAL, mask))\n \t\tmcfg->dot11MeshHWMProotInterval = conf->dot11MeshHWMProotInterval;\n \tif (chk_mesh_attr(NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL, mask))\n-\t\tmcfg->dot11MeshHWMPconfirmationInterval = conf->dot11MeshHWMPconfirmationInterval;\t\n+\t\tmcfg->dot11MeshHWMPconfirmationInterval = conf->dot11MeshHWMPconfirmationInterval;\n #endif\n \n #if 0 /* TBD */\n@@ -9018,7 +9018,7 @@ u8 *rtw_cfg80211_construct_mesh_beacon_ies(struct wiphy *wiphy, _adapter *adapte\n #endif\n \tif (!ch)\n \t\tgoto exit;\n-\t\n+\n #if defined(CONFIG_80211AC_VHT) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))\n \tvht = ht && ch > 14 && bw >= CHANNEL_WIDTH_80; /* VHT40/VHT20? */\n #endif\n@@ -9349,7 +9349,7 @@ static int cfg80211_rtw_join_mesh(struct wiphy *wiphy, struct net_device *dev,\n \t\tret = -EINVAL;\n \t\tgoto exit;\n \t}\n-\t\n+\n \trtw_mesh_work(&adapter->mesh_work);\n \n exit:\n@@ -9429,7 +9429,7 @@ static int cfg80211_rtw_del_mpath(struct wiphy *wiphy, struct net_device *dev\n \t\t}\n \t} else {\n \t\trtw_mesh_path_flush_by_iface(adapter);\n-\t}\t\n+\t}\n \n exit:\n \treturn ret;\n@@ -9730,13 +9730,13 @@ int\tcfg80211_rtw_resume(struct wiphy *wiphy) {\n \t\t//rtw_sitesurvey_cmd(padapter, NULL);\n \t\trtw_sitesurvey_cmd(padapter, &parm);\n \t\t_exit_critical_bh(&pmlmepriv->lock, &irqL);\n-\t\t\n+\n \t\tfor (PNOWakeupScanWaitCnt = 0; PNOWakeupScanWaitCnt < 10; PNOWakeupScanWaitCnt++) {\n \t\t\tif(check_fwstate(pmlmepriv, WIFI_UNDER_SURVEY) == _FALSE)\n \t\t\t\tbreak;\n \t\t\trtw_msleep_os(1000);\n \t\t}\n-\t\t\n+\n \t\t_enter_critical_bh(&pmlmepriv->lock, &irqL);\n \t\tcfg80211_sched_scan_results(padapter->rtw_wdev->wiphy);\n \t\t_exit_critical_bh(&pmlmepriv->lock, &irqL);\n@@ -9744,7 +9744,7 @@ int\tcfg80211_rtw_resume(struct wiphy *wiphy) {\n \t}\n \tRTW_DBG(\"<== %s\\n\",__func__);\n \treturn 0;\n-\t\n+\n }\n #endif /* CONFIG_PNO_SUPPORT */\n \n@@ -10752,7 +10752,7 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)\n \trtw_cfg80211_indicate_scan_done(adapter, _TRUE);\n \n \t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)\n-\t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88))\n+\t#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 78) || defined(RHEL88))\n \tif (wdev->links[0].client.current_bss) {\n \t#else\n \tif (wdev->current_bss) {\n-- \n2.42.0\n\n"
  },
  {
    "path": "projects/Generic/config/ovf.template",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <Envelope vmw:buildId=\"build-3018522\" xmlns=\"http://schemas.dmtf.org/ovf/envelope/1\" \nxmlns:cim=\"http://schemas.dmtf.org/wbem/wscim/1/common\" xmlns:ovf=\"http://schemas.dmtf.org/ovf/envelope/1\" xmlns:rasd=\"http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData\" xmlns:vmw=\"http://www.vmware.com/schema/ovf\" \nxmlns:vssd=\"http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n  <References>\n    <File ovf:href=\"@DISK@.vmdk\" ovf:id=\"file\" ovf:size=\"@OVA_SIZE@\"/>\n  </References>\n  <DiskSection>\n    <Info>Virtual disk information</Info>\n    <Disk ovf:capacity=\"@OVA_SIZE@\" ovf:diskId=\"disk\" ovf:fileRef=\"file\" ovf:format=\"http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized\"/>\n  </DiskSection>\n  <NetworkSection>\n    <Info>The list of logical networks</Info>\n    <Network ovf:name=\"bridged\">\n      <Description>The bridged network</Description>\n    </Network>\n  </NetworkSection>\n  <VirtualSystem ovf:id=\"@DISTRO@\">\n    <Info>A virtual machine</Info>\n    <Name>@DISTRO@</Name>\n    <ProductSection>\n      <Info>Meta-information about the installed software</Info>\n      <Product>LibreELEC</Product>\n      <Vendor>LibreELEC</Vendor>\n      <ProductUrl>https://libreelec.tv</ProductUrl>\n      <VendorUrl>https://libreelec.tv</VendorUrl>\n    </ProductSection>\n    <AnnotationSection>\n      <Info>A human-readable annotation</Info>\n      <Annotation>LibreELEC is &#x2018;Just enough OS&#x2019; for Kodi, a Linux distribution built to run Kodi on current and popular mediacentre hardware. After importing the OVA image adjust CPU, RAM, and HDD storage to the required configuration before first boot.</Annotation>\n    </AnnotationSection>\n    <OperatingSystemSection ovf:id=\"94\" vmw:osType=\"Ubuntu 64-bit\">\n      <Info>The kind of installed guest operating system</Info>\n    </OperatingSystemSection>\n    <VirtualHardwareSection> <Info>Virtual hardware requirements</Info>\n      <System>\n        <vssd:ElementName>Virtual Hardware Family</vssd:ElementName>\n        <vssd:InstanceID>0</vssd:InstanceID>\n        <vssd:VirtualSystemIdentifier>LibreELEC</vssd:VirtualSystemIdentifier>\n        <vssd:VirtualSystemType>vmx-12</vssd:VirtualSystemType>\n      </System>\n      <Item>\n        <rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>\n        <rasd:Description>Number of Virtual CPUs</rasd:Description>\n        <rasd:ElementName>1 virtual CPU(s)</rasd:ElementName>\n        <rasd:InstanceID>1</rasd:InstanceID>\n        <rasd:ResourceType>3</rasd:ResourceType>\n        <rasd:VirtualQuantity>1</rasd:VirtualQuantity>\n      </Item>\n      <Item>\n        <rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>\n        <rasd:Description>Memory Size</rasd:Description>\n        <rasd:ElementName>1024MB of memory</rasd:ElementName>\n        <rasd:InstanceID>2</rasd:InstanceID>\n        <rasd:ResourceType>4</rasd:ResourceType>\n        <rasd:VirtualQuantity>1024</rasd:VirtualQuantity>\n      </Item>\n      <Item ovf:required=\"false\">\n        <rasd:Address>0</rasd:Address>\n        <rasd:Description>USB Controller (EHCI)</rasd:Description>\n        <rasd:ElementName>usb</rasd:ElementName>\n        <rasd:InstanceID>3</rasd:InstanceID>\n        <rasd:ResourceSubType>vmware.usb.ehci</rasd:ResourceSubType>\n        <rasd:ResourceType>23</rasd:ResourceType>\n        <vmw:Config ovf:required=\"false\" vmw:key=\"ehciEnabled\" vmw:value=\"true\"/>\n      </Item>\n      <Item>\n        <rasd:Address>0</rasd:Address>\n        <rasd:Description>IDE Controller</rasd:Description>\n        <rasd:ElementName>ideController0</rasd:ElementName>\n        <rasd:InstanceID>4</rasd:InstanceID>\n        <rasd:ResourceType>5</rasd:ResourceType>\n      </Item>\n      <Item>\n        <rasd:AddressOnParent>0</rasd:AddressOnParent>\n        <rasd:ElementName>disk0</rasd:ElementName>\n        <rasd:HostResource>ovf:/disk/disk</rasd:HostResource>\n        <rasd:InstanceID>5</rasd:InstanceID>\n        <rasd:Parent>4</rasd:Parent>\n        <rasd:ResourceType>17</rasd:ResourceType>\n      </Item>\n      <Item>\n        <rasd:AddressOnParent>1</rasd:AddressOnParent>\n        <rasd:AutomaticAllocation>true</rasd:AutomaticAllocation>\n        <rasd:Connection>bridged</rasd:Connection>\n        <rasd:Description>E1000 ethernet adapter on &quot;bridged&quot;</rasd:Description>\n        <rasd:ElementName>ethernet0</rasd:ElementName>\n        <rasd:InstanceID>6</rasd:InstanceID>\n        <rasd:ResourceSubType>E1000</rasd:ResourceSubType>\n        <rasd:ResourceType>10</rasd:ResourceType>\n        <vmw:Config ovf:required=\"false\" vmw:key=\"wakeOnLanEnabled\" vmw:value=\"false\"/>\n      </Item>\n      <Item ovf:required=\"false\">\n        <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>\n        <rasd:ElementName>sound</rasd:ElementName>\n        <rasd:InstanceID>7</rasd:InstanceID>\n        <rasd:ResourceSubType>vmware.soundcard.hdaudio</rasd:ResourceSubType>\n        <rasd:ResourceType>1</rasd:ResourceType>\n      </Item>\n      <Item ovf:required=\"false\">\n        <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>\n        <rasd:ElementName>video</rasd:ElementName>\n        <rasd:InstanceID>8</rasd:InstanceID>\n        <rasd:ResourceType>24</rasd:ResourceType>\n        <vmw:Config ovf:required=\"false\" vmw:key=\"enable3DSupport\" vmw:value=\"true\"/>\n      </Item>\n      <Item ovf:required=\"false\">\n        <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>\n        <rasd:ElementName>vmci</rasd:ElementName>\n        <rasd:InstanceID>9</rasd:InstanceID>\n        <rasd:ResourceSubType>vmware.vmci</rasd:ResourceSubType>\n        <rasd:ResourceType>1</rasd:ResourceType>\n      </Item>\n      <vmw:Config ovf:required=\"false\" vmw:key=\"cpuHotAddEnabled\" vmw:value=\"true\"/>\n      <vmw:Config ovf:required=\"false\" vmw:key=\"memoryHotAddEnabled\" vmw:value=\"true\"/>\n      <vmw:Config ovf:required=\"false\" vmw:key=\"powerOpInfo.powerOffType\" vmw:value=\"soft\"/>\n      <vmw:Config ovf:required=\"false\" vmw:key=\"powerOpInfo.resetType\" vmw:value=\"soft\"/>\n      <vmw:Config ovf:required=\"false\" vmw:key=\"powerOpInfo.suspendType\" vmw:value=\"soft\"/>\n    </VirtualHardwareSection>\n  </VirtualSystem>\n</Envelope>\n"
  },
  {
    "path": "projects/Generic/devices/gbm/options",
    "content": "# OpenGL(X) implementation to use (mesa / no)\n  OPENGL=\"no\"\n\n# OpenGL-ES implementation to use (mesa / no)\n  OPENGLES=\"mesa\"\n\n# Vulkan implementation to use (vulkan-loader / no)\n  VULKAN=\"no\"\n\n# Displayserver to use (weston / x11 / no)\n  DISPLAYSERVER=\"no\"\n\n# Windowmanager to use (fluxbox / weston / no)\n  WINDOWMANAGER=\"no\"\n\n# KODI Player implementation to use (mesa / default)\n  KODIPLAYER_DRIVER=\"mesa\"\n\n# set the addon project\n  ADDON_PROJECT=\"Generic\"\n\n# Mesa 3D Graphic drivers to use (all / crocus,i915,iris,r300,r600,radeonsi,vmware,virtio)\n# Space separated list is supported,\n# e.g. GRAPHIC_DRIVERS=\"crocus i915 iris r300 r600 radeonsi vmware virtio\"\n  GRAPHIC_DRIVERS=\"crocus i915 iris r300 r600 radeonsi vmware virtio\"\n"
  },
  {
    "path": "projects/Generic/devices/wayland/options",
    "content": "# OpenGL(X) implementation to use (mesa / no)\n  OPENGL=\"no\"\n\n# OpenGL-ES implementation to use (mesa / no)\n  OPENGLES=\"mesa\"\n\n# Vulkan implementation to use (vulkan-loader / no)\n  VULKAN=\"no\"\n\n# Displayserver to use (wl / x11 / no)\n  DISPLAYSERVER=\"wl\"\n\n# Windowmanager to use (fluxbox / sway / weston / no)\n  WINDOWMANAGER=\"sway\"\n\n# KODI Player implementation to use (mesa / default)\n  KODIPLAYER_DRIVER=\"mesa\"\n\n# set the addon project\n  ADDON_PROJECT=\"Generic\"\n\n# Mesa 3D Graphic / NVIDIA drivers to use (all / crocus,i915,iris,nvidia-ng,r300,r600,radeonsi,vmware,virtio)\n# Space separated list is supported,\n# e.g. GRAPHIC_DRIVERS=\"crocus i915 iris r300 r600 radeonsi vmware virtio\"\n  GRAPHIC_DRIVERS=\"crocus i915 iris nvidia-ng r300 r600 radeonsi vmware virtio\"\n"
  },
  {
    "path": "projects/Generic/devices/x11/filesystem/etc/X11/xorg-i915.conf",
    "content": "Section \"Device\"\n  Identifier  \"Device0\"\n  Driver      \"intel\"\n  VendorName  \"INTEL Corporation\"\n  Option \"TripleBuffer\" \"false\"\n  Option \"TearFree\" \"false\"\nEndSection\n"
  },
  {
    "path": "projects/Generic/devices/x11/filesystem/usr/bin/intel-fullrange.sh",
    "content": "#!/bin/sh\nFB_TYPE=\"$(grep '^0 ' /proc/fb | sed 's/[^[:space:]] //')\"\n\nif [ \"$FB_TYPE\" == \"inteldrmfb\" ] || echo \"$FB_TYPE\" | grep -q \"^i9[0-9]*drmfb$\"; then\n  OUTPUT=`/usr/bin/xrandr -display :0 -q | sed '/ connected/!d;s/ .*//;q'`\n  for out in $OUTPUT ; do\n    # Hack - something is not yet fully right\n    /usr/bin/xrandr -display :0 --output $out --set \"Broadcast RGB\" \"Full\"\n    # Seems there is a little race somewhere on some outputs\n    # Turn the display shortly off and on again\n    if [ -e \"/storage/.config/forcedisplay\" ]; then\n      /usr/bin/xrandr -display :0 --output $out --off ; /usr/bin/xrandr -display :0 --output $out --auto\n    fi\n  done\nfi\n"
  },
  {
    "path": "projects/Generic/devices/x11/filesystem/usr/lib/systemd/system/intel-fullrange-resume.service",
    "content": "[Unit]\nDescription=Restore full range after suspend\nBefore=sleep.target\nStopWhenUnneeded=yes\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/bin/true\nExecStop=-/bin/sh \"/usr/bin/intel-fullrange.sh\"\n\n[Install]\nWantedBy=sleep.target\n"
  },
  {
    "path": "projects/Generic/devices/x11/filesystem/usr/lib/systemd/system/intel-fullrange.service",
    "content": "[Unit]\nDescription=intel switch to full range\nBefore=kodi.service\nAfter=graphical.target\n\n[Service]\nType=oneshot\nEnvironment=DISPLAY=:0.0\nExecStart=-/bin/sh \"/usr/bin/intel-fullrange.sh\"\nStandardError=null\nRemainAfterExit=yes\n\n[Install]\nWantedBy=kodi.target\n"
  },
  {
    "path": "projects/Generic/devices/x11/options",
    "content": "# OpenGL(X) implementation to use (mesa / no)\n  OPENGL=\"mesa\"\n\n# OpenGL-ES implementation to use (mesa / no)\n  OPENGLES=\"no\"\n\n# Vulkan implementation to use (vulkan-loader / no)\n  VULKAN=\"no\"\n\n# Displayserver to use (weston / x11 / no)\n  DISPLAYSERVER=\"x11\"\n\n# Windowmanager to use (fluxbox / weston / no)\n  WINDOWMANAGER=\"fluxbox\"\n\n# KODI Player implementation to use (mesa / default)\n  KODIPLAYER_DRIVER=\"default\"\n\n# set the addon project\n  ADDON_PROJECT=\"Generic-legacy\"\n\n# Mesa 3D / Xorg Graphic drivers to use (all / crocus,i915,iris,r300,r600,radeonsi,nvidia,nvidia-legacy,vmware,virtio)\n# Space separated list is supported,\n# e.g. GRAPHIC_DRIVERS=\"crocus i915 iris r300 r600 radeonsi nvidia nvidia-legacy vmware virtio\"\n  GRAPHIC_DRIVERS=\"crocus i915 iris r300 r600 radeonsi nvidia nvidia-legacy vmware virtio\"\n"
  },
  {
    "path": "projects/Generic/devices/x11/patches/kodi/kodi-100.06-dont-set-_NET_WM_STATE_FULLSCREEN.patch",
    "content": "From c16e99234ce40f201e58a2595e6dfa0703cf554c Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Wed, 11 Mar 2015 20:56:15 +0200\nSubject: [PATCH 06/13] dont set _NET_WM_STATE_FULLSCREEN\n\nStart X11 applications like 'chrome' or 'st' on top of kodi.\n\nOutdated comment:\n## I dont remember why I added this. I guess it was for\n## some 3rdparty stuff that needed to go fullscreen but\n## xbmc was acting weird..\n## \n## this should probably be removed after OE 6\n---\n xbmc/windowing/X11/WinSystemX11.cpp | 2 --\n 1 file changed, 2 deletions(-)\n\n--- a/xbmc/windowing/X11/WinSystemX11.cpp\n+++ b/xbmc/windowing/X11/WinSystemX11.cpp\n@@ -765,8 +765,6 @@ bool CWinSystemX11::SetWindow(int width,\n \n     if (fullscreen && hasWM)\n     {\n-      Atom fs = XInternAtom(m_dpy, \"_NET_WM_STATE_FULLSCREEN\", True);\n-      XChangeProperty(m_dpy, m_mainWindow, XInternAtom(m_dpy, \"_NET_WM_STATE\", True), XA_ATOM, 32, PropModeReplace, (unsigned char *) &fs, 1);\n       // disable desktop compositing for KDE, when Kodi is in full-screen mode\n       int one = 1;\n       Atom composite = XInternAtom(m_dpy, \"_KDE_NET_WM_BLOCK_COMPOSITING\", True);\n"
  },
  {
    "path": "projects/Generic/devices/x11/patches/kodi/kodi-100.12-prevent-kodi-switching-to-windowed-mode.patch",
    "content": "From a2a5ae054768afe9906bbd7ea96d4eb69bf1b857 Mon Sep 17 00:00:00 2001\nFrom: Stefan Saraev <stefan@saraev.ca>\nDate: Sat, 18 Apr 2015 15:45:54 +0300\nSubject: [PATCH] prevent kodi switching to windowed mode\n\n---\n xbmc/windowing/X11/WinSystemX11.h | 1 +\n 1 file changed, 1 insertion(+)\n\n--- a/xbmc/windowing/X11/WinSystemX11.h\n+++ b/xbmc/windowing/X11/WinSystemX11.h\n@@ -48,6 +48,7 @@ public:\n   void FinishWindowResize(int newWidth, int newHeight) override;\n   bool SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool blankOtherDisplays) override;\n   void UpdateResolutions() override;\n+  bool CanDoWindowed() override { return false; }\n   void ShowOSMouse(bool show) override;\n \n   void NotifyAppActiveChange(bool bActivated) override;\n"
  },
  {
    "path": "projects/Generic/devices/x11/patches/linux/linux-revert-acpi-bus-get-device-5-18.patch",
    "content": "From ac2a3feefad549814f5e7cca30be07a255c8494a Mon Sep 17 00:00:00 2001\nFrom: \"Rafael J. Wysocki\" <rafael.j.wysocki@intel.com>\nDate: Tue, 5 Apr 2022 19:49:26 +0200\nSubject: Revert ACPI: bus: Eliminate acpi_bus_get_device()\n\nRevert d017a3167bcb76caedf2b444645bf4db75f775a5\n\n  Replace the last instance of acpi_bus_get_device(), added recently\n  by commit 87e59b36e5e2 (\"spi: Support selection of the index of the\n  ACPI Spi Resource before alloc\"), with acpi_fetch_acpi_dev() and\n  finally drop acpi_bus_get_device() that has no more users.\n\n---\n drivers/acpi/scan.c     | 13 +++++++++++++\n include/acpi/acpi_bus.h |  1 +\n 2 files changed, 14 insertions(+)\n\ndiff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c\nindex 9efbfe087de76..762b61f67e6c6 100644\n--- a/drivers/acpi/scan.c\n+++ b/drivers/acpi/scan.c\n@@ -588,6 +588,19 @@ static struct acpi_device *handle_to_device(acpi_handle handle,\n \treturn adev;\n }\n \n+int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device)\n+{\n+\tif (!device)\n+\t\treturn -EINVAL;\n+\n+\t*device = handle_to_device(handle, NULL);\n+\tif (!*device)\n+\t\treturn -ENODEV;\n+\n+\treturn 0;\n+}\n+EXPORT_SYMBOL(acpi_bus_get_device);\n+\n /**\n  * acpi_fetch_acpi_dev - Retrieve ACPI device object.\n  * @handle: ACPI handle associated with the requested ACPI device object.\ndiff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h\nindex 3f7f01f038690..c4b78c21d7930 100644\n--- a/include/acpi/acpi_bus.h\n+++ b/include/acpi/acpi_bus.h\n@@ -509,6 +509,7 @@ extern int unregister_acpi_notifier(struct notifier_block *);\n  * External Functions\n  */\n \n+int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device);\n struct acpi_device *acpi_fetch_acpi_dev(acpi_handle handle);\n acpi_status acpi_bus_get_status_handle(acpi_handle handle,\n \t\t\t\t       unsigned long long *sta);\n-- \ncgit 1.2.3-1.el7\n\n"
  },
  {
    "path": "projects/Generic/devices/x11/patches/linux/linux-revert-fbdev--Make-registered-fb---private-to-fbmem-6-1.patch",
    "content": "commit b6fa3778e84c9d2f6d9511189ba16078b6c37196\nAuthor: Rudi Heitbaum <rudi@heitbaum.com>\nDate:   Mon Oct 17 11:40:02 2022 +0000\n\n    Revert \"fbdev: Make registered_fb[] private to fbmem.c\"\n    \n    This reverts commit 5727dcfd8486399c40e39d2c08fe36fedab29d99.\n\ndiff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c\nindex 1e70d8c67653..6ae1c5fa19f9 100644\n--- a/drivers/video/fbdev/core/fbmem.c\n+++ b/drivers/video/fbdev/core/fbmem.c\n@@ -51,10 +51,10 @@\n static DEFINE_MUTEX(registration_lock);\n \n struct fb_info *registered_fb[FB_MAX] __read_mostly;\n+EXPORT_SYMBOL(registered_fb);\n+\n int num_registered_fb __read_mostly;\n-#define for_each_registered_fb(i)\t\t\\\n-\tfor (i = 0; i < FB_MAX; i++)\t\t\\\n-\t\tif (!registered_fb[i]) {} else\n+EXPORT_SYMBOL(num_registered_fb);\n \n bool fb_center_logo __read_mostly;\n \ndiff --git a/include/linux/fb.h b/include/linux/fb.h\nindex 0aff76bcbb00..453c3b2b6b8e 100644\n--- a/include/linux/fb.h\n+++ b/include/linux/fb.h\n@@ -627,10 +627,16 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var,\n extern int fb_get_options(const char *name, char **option);\n extern int fb_new_modelist(struct fb_info *info);\n \n+extern struct fb_info *registered_fb[FB_MAX];\n+extern int num_registered_fb;\n extern bool fb_center_logo;\n extern int fb_logo_count;\n extern struct class *fb_class;\n \n+#define for_each_registered_fb(i)\t\t\\\n+\tfor (i = 0; i < FB_MAX; i++)\t\t\\\n+\t\tif (!registered_fb[i]) {} else\n+\n static inline void lock_fb_info(struct fb_info *info)\n {\n \tmutex_lock(&info->lock);\n"
  },
  {
    "path": "projects/Generic/filesystem/usr/bin/cputemp",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nTEMP=0\n\nif [ $(basename \"$0\") = \"gputemp\" -o \"$1\" = \"gpu\" ]; then\n\n  if [ -x /usr/bin/nvidia-smi ]; then\n    TEMP=\"$(/usr/bin/nvidia-smi -q -x | grep '<gpu_temp>' | awk '{ print $1 }' | sed 's,<gpu_temp>,,g')\"\n  fi\n\n  if [ \"$TEMP\" = \"0\" ]; then\n    for hwmon in /sys/class/hwmon/*; do\n      if [ -f \"${hwmon}/name\" ]; then\n        case $(cat ${hwmon}/name) in\n          nouveau|radeon|amdgpu)\n            [[ -f \"${hwmon}/temp1_input\" ]] && TEMP=\"$(cat ${hwmon}/temp1_input)\" && break\n            [[ -f \"${hwmon}/temp2_input\" ]] && TEMP=\"$(cat ${hwmon}/temp2_input)\" && break\n            ;;\n          # intel gpu is supported by cpu coretemp below\n        esac\n      fi\n    done\n\n    TEMP=\"$(( $TEMP / 1000 ))\"\n  fi\nfi\n\nif [ \"$1\" = \"cpu\" -o \"$TEMP\" = \"0\" ]; then\n\n  for hwmon in /sys/class/hwmon/*; do\n    if [ -f \"${hwmon}/name\" ]; then\n      case $(cat ${hwmon}/name) in\n        coretemp|k10temp|scpi_sensors)\n          [[ -f \"${hwmon}/temp1_input\" ]] && TEMP=\"$(cat ${hwmon}/temp1_input)\" && break\n          [[ -f \"${hwmon}/temp2_input\" ]] && TEMP=\"$(cat ${hwmon}/temp2_input)\" && break\n          ;;\n      esac\n    fi\n  done\n\n  if [ \"$TEMP\" = \"0\" -a -f /sys/class/hwmon/hwmon0/device/temp1_input ]; then\n    TEMP=\"$(cat /sys/class/hwmon/hwmon0/device/temp1_input)\"\n  fi\n\n  TEMP=\"$(( $TEMP / 1000 ))\"\nfi\n\necho \"${TEMP} C\"\n"
  },
  {
    "path": "projects/Generic/filesystem/usr/share/bootloader/canupdate.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n# Allow upgrades between different Generic builds\nif [ \"$1\" = \"Virtual.x86_64\" -o \"$1\" = \"Generic.x86_64\" -o \"$1\" = \"Generic-legacy.x86_64\" -o \"$1\" = \"gbm.x86_64\" -o \"$1\" = \"wayland.x86_64\" -o \"$1\" = \"x11.x86_64\" ]; then\n  exit 0\nelse\n  exit 1\nfi\n"
  },
  {
    "path": "projects/Generic/kodi/advancedsettings.xml",
    "content": "<advancedsettings>\n  <video>\n    <latency>\n      <delay>0</delay>\n      <refresh>\n        <min>23</min>\n        <max>24</max>\n        <delay>175</delay>\n      </refresh>\n    </latency>\n  </video>\n</advancedsettings>\n"
  },
  {
    "path": "projects/Generic/linux/linux.x86_64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/x86 6.1.63 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"x86_64-libreelec-linux-gnu-gcc-12.2.0 (GCC) 12.2.0\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=120200\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23900\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23900\nCONFIG_LLD_VERSION=0\nCONFIG_CC_CAN_LINK=y\nCONFIG_CC_CAN_LINK_STATIC=y\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_BUILD_SALT=\"\"\nCONFIG_HAVE_KERNEL_GZIP=y\nCONFIG_HAVE_KERNEL_BZIP2=y\nCONFIG_HAVE_KERNEL_LZMA=y\nCONFIG_HAVE_KERNEL_XZ=y\nCONFIG_HAVE_KERNEL_LZO=y\nCONFIG_HAVE_KERNEL_LZ4=y\nCONFIG_HAVE_KERNEL_ZSTD=y\n# CONFIG_KERNEL_GZIP is not set\n# CONFIG_KERNEL_BZIP2 is not set\n# CONFIG_KERNEL_LZMA is not set\nCONFIG_KERNEL_XZ=y\n# CONFIG_KERNEL_LZO is not set\n# CONFIG_KERNEL_LZ4 is not set\n# CONFIG_KERNEL_ZSTD is not set\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_SYSVIPC_COMPAT=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\n# CONFIG_WATCH_QUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_GENERIC_PENDING_IRQ=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_MSI_IRQ=y\nCONFIG_GENERIC_MSI_IRQ_DOMAIN=y\nCONFIG_IRQ_MSI_IOMMU=y\nCONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y\nCONFIG_GENERIC_IRQ_RESERVATION_MODE=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_CLOCKSOURCE_WATCHDOG=y\nCONFIG_ARCH_CLOCKSOURCE_INIT=y\nCONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y\nCONFIG_GENERIC_CMOS_UPDATE=y\nCONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_CONTEXT_TRACKING=y\nCONFIG_CONTEXT_TRACKING_IDLE=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\nCONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US=100\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\nCONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\n# CONFIG_BPF_JIT is not set\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# end of BPF subsystem\n\nCONFIG_PREEMPT_VOLUNTARY_BUILD=y\n# CONFIG_PREEMPT_NONE is not set\nCONFIG_PREEMPT_VOLUNTARY=y\n# CONFIG_PREEMPT is not set\n# CONFIG_PREEMPT_DYNAMIC is not set\n# CONFIG_SCHED_CORE is not set\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\nCONFIG_HAVE_SCHED_AVG_IRQ=y\nCONFIG_BSD_PROCESS_ACCT=y\n# CONFIG_BSD_PROCESS_ACCT_V3 is not set\n# CONFIG_TASKSTATS is not set\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_RUDE_RCU=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\n# end of RCU Subsystem\n\nCONFIG_IKCONFIG=m\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=17\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# CONFIG_UCLAMP_TASK is not set\n# end of Scheduler features\n\nCONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y\nCONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y\nCONFIG_CC_HAS_INT128=y\nCONFIG_CC_IMPLICIT_FALLTHROUGH=\"-Wimplicit-fallthrough=5\"\nCONFIG_GCC11_NO_ARRAY_BOUNDS=y\nCONFIG_CC_NO_ARRAY_BOUNDS=y\nCONFIG_ARCH_SUPPORTS_INT128=y\nCONFIG_NUMA_BALANCING=y\nCONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\n# CONFIG_CGROUP_FAVOR_DYNMODS is not set\nCONFIG_MEMCG=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_BLK_CGROUP=y\nCONFIG_CGROUP_WRITEBACK=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\nCONFIG_CGROUP_PIDS=y\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_CGROUP_PERF=y\nCONFIG_CGROUP_BPF=y\n# CONFIG_CGROUP_MISC is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_TIME_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_CHECKPOINT_RESTORE is not set\n# CONFIG_SCHED_AUTOGROUP is not set\n# CONFIG_SYSFS_DEPRECATED is not set\nCONFIG_RELAY=y\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"@INITRAMFS_SOURCE@\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\n# CONFIG_RD_GZIP is not set\n# CONFIG_RD_BZIP2 is not set\n# CONFIG_RD_LZMA is not set\n# CONFIG_RD_XZ is not set\n# CONFIG_RD_LZO is not set\n# CONFIG_RD_LZ4 is not set\nCONFIG_RD_ZSTD=y\n# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set\nCONFIG_INITRAMFS_COMPRESSION_NONE=y\nCONFIG_BOOT_CONFIG=y\n# CONFIG_BOOT_CONFIG_EMBED is not set\nCONFIG_INITRAMFS_PRESERVE_MTIME=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\nCONFIG_HAVE_PCSPKR_PLATFORM=y\nCONFIG_EXPERT=y\n# CONFIG_UID16 is not set\nCONFIG_MULTIUSER=y\n# CONFIG_SGETMASK_SYSCALL is not set\n# CONFIG_SYSFS_SYSCALL is not set\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\n# CONFIG_PCSPKR_PLATFORM is not set\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\n# CONFIG_KALLSYMS_ALL is not set\nCONFIG_KALLSYMS_ABSOLUTE_PERCPU=y\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_DEBUG_RSEQ is not set\n# CONFIG_EMBEDDED is not set\nCONFIG_HAVE_PERF_EVENTS=y\n# CONFIG_PC104 is not set\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_SYSTEM_DATA_VERIFICATION=y\n# CONFIG_PROFILING is not set\nCONFIG_TRACEPOINTS=y\n# end of General setup\n\nCONFIG_64BIT=y\nCONFIG_X86_64=y\nCONFIG_X86=y\nCONFIG_INSTRUCTION_DECODER=y\nCONFIG_OUTPUT_FORMAT=\"elf64-x86-64\"\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_MMU=y\nCONFIG_ARCH_MMAP_RND_BITS_MIN=28\nCONFIG_ARCH_MMAP_RND_BITS_MAX=32\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_GENERIC_ISA_DMA=y\nCONFIG_GENERIC_BUG=y\nCONFIG_GENERIC_BUG_RELATIVE_POINTERS=y\nCONFIG_ARCH_MAY_HAVE_PC_FDC=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_HAS_CPU_RELAX=y\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARCH_NR_GPIO=1024\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\nCONFIG_AUDIT_ARCH=y\nCONFIG_HAVE_INTEL_TXT=y\nCONFIG_X86_64_SMP=y\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_PGTABLE_LEVELS=4\nCONFIG_CC_HAS_SANE_STACKPROTECTOR=y\n\n#\n# Processor type and features\n#\nCONFIG_SMP=y\nCONFIG_X86_FEATURE_NAMES=y\n# CONFIG_X86_X2APIC is not set\nCONFIG_X86_MPPARSE=y\n# CONFIG_GOLDFISH is not set\n# CONFIG_X86_CPU_RESCTRL is not set\n# CONFIG_X86_EXTENDED_PLATFORM is not set\nCONFIG_X86_INTEL_LPSS=y\nCONFIG_X86_AMD_PLATFORM_DEVICE=y\nCONFIG_IOSF_MBI=y\n# CONFIG_IOSF_MBI_DEBUG is not set\nCONFIG_SCHED_OMIT_FRAME_POINTER=y\nCONFIG_HYPERVISOR_GUEST=y\nCONFIG_PARAVIRT=y\n# CONFIG_PARAVIRT_DEBUG is not set\nCONFIG_PARAVIRT_SPINLOCKS=y\nCONFIG_X86_HV_CALLBACK_VECTOR=y\n# CONFIG_XEN is not set\nCONFIG_KVM_GUEST=y\nCONFIG_ARCH_CPUIDLE_HALTPOLL=y\n# CONFIG_PVH is not set\nCONFIG_PARAVIRT_TIME_ACCOUNTING=y\nCONFIG_PARAVIRT_CLOCK=y\n# CONFIG_JAILHOUSE_GUEST is not set\n# CONFIG_ACRN_GUEST is not set\n# CONFIG_MK8 is not set\n# CONFIG_MPSC is not set\n# CONFIG_MCORE2 is not set\n# CONFIG_MATOM is not set\nCONFIG_GENERIC_CPU=y\nCONFIG_X86_INTERNODE_CACHE_SHIFT=6\nCONFIG_X86_L1_CACHE_SHIFT=6\nCONFIG_X86_TSC=y\nCONFIG_X86_CMPXCHG64=y\nCONFIG_X86_CMOV=y\nCONFIG_X86_MINIMUM_CPU_FAMILY=64\nCONFIG_X86_DEBUGCTLMSR=y\nCONFIG_IA32_FEAT_CTL=y\nCONFIG_X86_VMX_FEATURE_NAMES=y\n# CONFIG_PROCESSOR_SELECT is not set\nCONFIG_CPU_SUP_INTEL=y\nCONFIG_CPU_SUP_AMD=y\nCONFIG_CPU_SUP_HYGON=y\nCONFIG_CPU_SUP_CENTAUR=y\nCONFIG_CPU_SUP_ZHAOXIN=y\nCONFIG_HPET_TIMER=y\nCONFIG_HPET_EMULATE_RTC=y\nCONFIG_DMI=y\nCONFIG_GART_IOMMU=y\nCONFIG_BOOT_VESA_SUPPORT=y\n# CONFIG_MAXSMP is not set\nCONFIG_NR_CPUS_RANGE_BEGIN=2\nCONFIG_NR_CPUS_RANGE_END=512\nCONFIG_NR_CPUS_DEFAULT=64\nCONFIG_NR_CPUS=16\n# CONFIG_SCHED_CLUSTER is not set\nCONFIG_SCHED_SMT=y\nCONFIG_SCHED_MC=y\nCONFIG_SCHED_MC_PRIO=y\nCONFIG_X86_LOCAL_APIC=y\nCONFIG_X86_IO_APIC=y\n# CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set\n# CONFIG_X86_MCE is not set\n\n#\n# Performance monitoring\n#\nCONFIG_PERF_EVENTS_INTEL_UNCORE=y\nCONFIG_PERF_EVENTS_INTEL_RAPL=y\nCONFIG_PERF_EVENTS_INTEL_CSTATE=y\nCONFIG_PERF_EVENTS_AMD_POWER=y\nCONFIG_PERF_EVENTS_AMD_UNCORE=y\n# CONFIG_PERF_EVENTS_AMD_BRS is not set\n# end of Performance monitoring\n\nCONFIG_X86_16BIT=y\nCONFIG_X86_ESPFIX64=y\nCONFIG_X86_VSYSCALL_EMULATION=y\nCONFIG_X86_IOPL_IOPERM=y\nCONFIG_MICROCODE=y\nCONFIG_MICROCODE_INTEL=y\nCONFIG_MICROCODE_AMD=y\n# CONFIG_MICROCODE_LATE_LOADING is not set\nCONFIG_X86_MSR=y\nCONFIG_X86_CPUID=y\n# CONFIG_X86_5LEVEL is not set\nCONFIG_X86_DIRECT_GBPAGES=y\n# CONFIG_X86_CPA_STATISTICS is not set\n# CONFIG_AMD_MEM_ENCRYPT is not set\nCONFIG_NUMA=y\n# CONFIG_AMD_NUMA is not set\nCONFIG_X86_64_ACPI_NUMA=y\n# CONFIG_NUMA_EMU is not set\nCONFIG_NODES_SHIFT=6\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_ARCH_SPARSEMEM_DEFAULT=y\nCONFIG_ARCH_PROC_KCORE_TEXT=y\nCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000\n# CONFIG_X86_PMEM_LEGACY is not set\nCONFIG_X86_CHECK_BIOS_CORRUPTION=y\nCONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y\nCONFIG_MTRR=y\nCONFIG_MTRR_SANITIZER=y\nCONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0\nCONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1\nCONFIG_X86_PAT=y\nCONFIG_ARCH_USES_PG_UNCACHED=y\nCONFIG_X86_UMIP=y\nCONFIG_CC_HAS_IBT=y\nCONFIG_X86_KERNEL_IBT=y\nCONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS=y\nCONFIG_X86_INTEL_TSX_MODE_OFF=y\n# CONFIG_X86_INTEL_TSX_MODE_ON is not set\n# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set\nCONFIG_EFI=y\nCONFIG_EFI_STUB=y\nCONFIG_EFI_MIXED=y\n# CONFIG_HZ_100 is not set\n# CONFIG_HZ_250 is not set\nCONFIG_HZ_300=y\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=300\nCONFIG_SCHED_HRTICK=y\n# CONFIG_KEXEC is not set\n# CONFIG_KEXEC_FILE is not set\n# CONFIG_CRASH_DUMP is not set\nCONFIG_PHYSICAL_START=0x1000000\nCONFIG_RELOCATABLE=y\nCONFIG_RANDOMIZE_BASE=y\nCONFIG_X86_NEED_RELOCS=y\nCONFIG_PHYSICAL_ALIGN=0x1000000\nCONFIG_DYNAMIC_MEMORY_LAYOUT=y\nCONFIG_RANDOMIZE_MEMORY=y\nCONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0x0\nCONFIG_HOTPLUG_CPU=y\n# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set\n# CONFIG_DEBUG_HOTPLUG_CPU0 is not set\n# CONFIG_COMPAT_VDSO is not set\nCONFIG_LEGACY_VSYSCALL_XONLY=y\n# CONFIG_LEGACY_VSYSCALL_NONE is not set\nCONFIG_CMDLINE_BOOL=y\nCONFIG_CMDLINE=\"root=/dev/ram0 rdinit=/init usbcore.autosuspend=-1\"\n# CONFIG_CMDLINE_OVERRIDE is not set\nCONFIG_MODIFY_LDT_SYSCALL=y\n# CONFIG_STRICT_SIGALTSTACK_SIZE is not set\nCONFIG_HAVE_LIVEPATCH=y\n# end of Processor type and features\n\nCONFIG_CC_HAS_SLS=y\nCONFIG_CC_HAS_RETURN_THUNK=y\nCONFIG_SPECULATION_MITIGATIONS=y\nCONFIG_PAGE_TABLE_ISOLATION=y\nCONFIG_RETPOLINE=y\nCONFIG_RETHUNK=y\nCONFIG_CPU_UNRET_ENTRY=y\nCONFIG_CPU_IBPB_ENTRY=y\nCONFIG_CPU_IBRS_ENTRY=y\nCONFIG_CPU_SRSO=y\n# CONFIG_SLS is not set\n# CONFIG_GDS_FORCE_MITIGATION is not set\nCONFIG_ARCH_HAS_ADD_PAGES=y\nCONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y\n\n#\n# Power management and ACPI options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_SUSPEND_SKIP_SYNC is not set\n# CONFIG_HIBERNATION is not set\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_USERSPACE_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\nCONFIG_PM=y\nCONFIG_PM_DEBUG=y\n# CONFIG_PM_ADVANCED_DEBUG is not set\nCONFIG_PM_TEST_SUSPEND=y\nCONFIG_PM_SLEEP_DEBUG=y\n# CONFIG_PM_TRACE_RTC is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\n# CONFIG_ENERGY_MODEL is not set\nCONFIG_ARCH_SUPPORTS_ACPI=y\nCONFIG_ACPI=y\nCONFIG_ACPI_LEGACY_TABLES_LOOKUP=y\nCONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y\nCONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y\n# CONFIG_ACPI_DEBUGGER is not set\nCONFIG_ACPI_SPCR_TABLE=y\n# CONFIG_ACPI_FPDT is not set\nCONFIG_ACPI_LPIT=y\nCONFIG_ACPI_SLEEP=y\nCONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y\n# CONFIG_ACPI_EC_DEBUGFS is not set\n# CONFIG_ACPI_AC is not set\nCONFIG_ACPI_BATTERY=y\nCONFIG_ACPI_BUTTON=y\nCONFIG_ACPI_VIDEO=y\nCONFIG_ACPI_FAN=y\n# CONFIG_ACPI_TAD is not set\n# CONFIG_ACPI_DOCK is not set\nCONFIG_ACPI_CPU_FREQ_PSS=y\nCONFIG_ACPI_PROCESSOR_CSTATE=y\nCONFIG_ACPI_PROCESSOR_IDLE=y\nCONFIG_ACPI_CPPC_LIB=y\nCONFIG_ACPI_PROCESSOR=y\nCONFIG_ACPI_HOTPLUG_CPU=y\nCONFIG_ACPI_PROCESSOR_AGGREGATOR=y\nCONFIG_ACPI_THERMAL=y\nCONFIG_ACPI_PLATFORM_PROFILE=m\nCONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y\nCONFIG_ACPI_TABLE_UPGRADE=y\n# CONFIG_ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD is not set\n# CONFIG_ACPI_DEBUG is not set\n# CONFIG_ACPI_PCI_SLOT is not set\nCONFIG_ACPI_CONTAINER=y\nCONFIG_ACPI_HOTPLUG_IOAPIC=y\n# CONFIG_ACPI_SBS is not set\n# CONFIG_ACPI_HED is not set\n# CONFIG_ACPI_CUSTOM_METHOD is not set\n# CONFIG_ACPI_BGRT is not set\n# CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set\n# CONFIG_ACPI_NFIT is not set\nCONFIG_ACPI_NUMA=y\n# CONFIG_ACPI_HMAT is not set\nCONFIG_HAVE_ACPI_APEI=y\nCONFIG_HAVE_ACPI_APEI_NMI=y\n# CONFIG_ACPI_APEI is not set\n# CONFIG_ACPI_DPTF is not set\n# CONFIG_ACPI_CONFIGFS is not set\n# CONFIG_ACPI_PFRUT is not set\nCONFIG_ACPI_PCC=y\n# CONFIG_PMIC_OPREGION is not set\nCONFIG_ACPI_PRMT=y\nCONFIG_X86_PM_TIMER=y\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=y\n# CONFIG_CPU_FREQ_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\nCONFIG_CPU_FREQ_GOV_SCHEDUTIL=y\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_X86_INTEL_PSTATE=y\nCONFIG_X86_PCC_CPUFREQ=m\n# CONFIG_X86_AMD_PSTATE is not set\n# CONFIG_X86_AMD_PSTATE_UT is not set\nCONFIG_X86_ACPI_CPUFREQ=y\nCONFIG_X86_ACPI_CPUFREQ_CPB=y\nCONFIG_X86_POWERNOW_K8=y\nCONFIG_X86_AMD_FREQ_SENSITIVITY=m\n# CONFIG_X86_SPEEDSTEP_CENTRINO is not set\nCONFIG_X86_P4_CLOCKMOD=y\n\n#\n# shared options\n#\nCONFIG_X86_SPEEDSTEP_LIB=y\n# end of CPU Frequency scaling\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\nCONFIG_CPU_IDLE_GOV_LADDER=y\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\n# CONFIG_CPU_IDLE_GOV_HALTPOLL is not set\nCONFIG_HALTPOLL_CPUIDLE=y\n# end of CPU Idle\n\nCONFIG_INTEL_IDLE=y\n# end of Power management and ACPI options\n\n#\n# Bus options (PCI etc.)\n#\nCONFIG_PCI_DIRECT=y\nCONFIG_PCI_MMCONFIG=y\nCONFIG_MMCONF_FAM10H=y\n# CONFIG_PCI_CNB20LE_QUIRK is not set\n# CONFIG_ISA_BUS is not set\nCONFIG_ISA_DMA_API=y\nCONFIG_AMD_NB=y\n# end of Bus options (PCI etc.)\n\n#\n# Binary Emulations\n#\nCONFIG_IA32_EMULATION=y\n# CONFIG_X86_X32_ABI is not set\nCONFIG_COMPAT_32=y\nCONFIG_COMPAT=y\nCONFIG_COMPAT_FOR_U64_ALIGNMENT=y\n# end of Binary Emulations\n\nCONFIG_HAVE_KVM=y\n# CONFIG_VIRTUALIZATION is not set\nCONFIG_AS_AVX512=y\nCONFIG_AS_SHA1_NI=y\nCONFIG_AS_SHA256_NI=y\nCONFIG_AS_TPAUSE=y\n\n#\n# General architecture-dependent options\n#\nCONFIG_CRASH_CORE=y\nCONFIG_HOTPLUG_SMT=y\nCONFIG_GENERIC_ENTRY=y\nCONFIG_KPROBES=y\nCONFIG_JUMP_LABEL=y\n# CONFIG_STATIC_KEYS_SELFTEST is not set\n# CONFIG_STATIC_CALL_SELFTEST is not set\nCONFIG_OPTPROBES=y\nCONFIG_KPROBES_ON_FTRACE=y\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_ARCH_USE_BUILTIN_BSWAP=y\nCONFIG_KRETPROBES=y\nCONFIG_KRETPROBE_ON_RETHOOK=y\nCONFIG_HAVE_IOREMAP_PROT=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_HAVE_OPTPROBES=y\nCONFIG_HAVE_KPROBES_ON_FTRACE=y\nCONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y\nCONFIG_HAVE_FUNCTION_ERROR_INJECTION=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_ARCH_HAS_SET_DIRECT_MAP=y\nCONFIG_ARCH_HAS_CPU_FINALIZE_INIT=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y\nCONFIG_ARCH_WANTS_NO_INSTR=y\nCONFIG_HAVE_ASM_MODVERSIONS=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_RUST=y\nCONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y\nCONFIG_HAVE_USER_RETURN_NOTIFIER=y\nCONFIG_HAVE_PERF_EVENTS_NMI=y\nCONFIG_HAVE_HARDLOCKUP_DETECTOR_PERF=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y\nCONFIG_MMU_GATHER_TABLE_FREE=y\nCONFIG_MMU_GATHER_RCU_TABLE_FREE=y\nCONFIG_MMU_GATHER_MERGE_VMAS=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_HAVE_ALIGNED_STRUCT_PAGE=y\nCONFIG_HAVE_CMPXCHG_LOCAL=y\nCONFIG_HAVE_CMPXCHG_DOUBLE=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_ARCH_WANT_OLD_COMPAT_IPC=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_ARCH_STACKLEAK=y\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_ARCH_SUPPORTS_LTO_CLANG=y\nCONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y\nCONFIG_LTO_NONE=y\nCONFIG_ARCH_SUPPORTS_CFI_CLANG=y\nCONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER_OFFSTACK=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOVE_PUD=y\nCONFIG_HAVE_MOVE_PMD=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD=y\nCONFIG_HAVE_ARCH_HUGE_VMAP=y\nCONFIG_HAVE_ARCH_HUGE_VMALLOC=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_HAVE_ARCH_SOFT_DIRTY=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y\nCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_HAVE_EXIT_THREAD=y\nCONFIG_ARCH_MMAP_RND_BITS=28\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=8\nCONFIG_HAVE_ARCH_COMPAT_MMAP_BASES=y\nCONFIG_PAGE_SIZE_LESS_THAN_64KB=y\nCONFIG_PAGE_SIZE_LESS_THAN_256KB=y\nCONFIG_HAVE_OBJTOOL=y\nCONFIG_HAVE_JUMP_LABEL_HACK=y\nCONFIG_HAVE_NOINSTR_HACK=y\nCONFIG_HAVE_NOINSTR_VALIDATION=y\nCONFIG_HAVE_UACCESS_VALIDATION=y\nCONFIG_HAVE_STACK_VALIDATION=y\nCONFIG_HAVE_RELIABLE_STACKTRACE=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y\nCONFIG_RANDOMIZE_KSTACK_OFFSET=y\n# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\nCONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y\nCONFIG_ARCH_USE_MEMREMAP_PROT=y\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_HAS_MEM_ENCRYPT=y\nCONFIG_HAVE_STATIC_CALL=y\nCONFIG_HAVE_STATIC_CALL_INLINE=y\nCONFIG_HAVE_PREEMPT_DYNAMIC=y\nCONFIG_HAVE_PREEMPT_DYNAMIC_CALL=y\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y\nCONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y\nCONFIG_ARCH_HAS_ELFCORE_COMPAT=y\nCONFIG_ARCH_HAS_PARANOID_L1D_FLUSH=y\nCONFIG_DYNAMIC_SIGFRAME=y\nCONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGINS is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/sbin/modprobe\"\n# CONFIG_TRIM_UNUSED_KSYMS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\n# CONFIG_BLOCK_LEGACY_AUTOLOAD is not set\nCONFIG_BLK_CGROUP_RWSTAT=y\nCONFIG_BLK_DEV_BSG_COMMON=y\nCONFIG_BLK_ICQ=y\nCONFIG_BLK_DEV_BSGLIB=y\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_DEV_ZONED is not set\nCONFIG_BLK_DEV_THROTTLING=y\n# CONFIG_BLK_DEV_THROTTLING_LOW is not set\n# CONFIG_BLK_WBT is not set\n# CONFIG_BLK_CGROUP_IOLATENCY is not set\n# CONFIG_BLK_CGROUP_IOCOST is not set\n# CONFIG_BLK_CGROUP_IOPRIO is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\nCONFIG_MAC_PARTITION=y\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\nCONFIG_LDM_PARTITION=y\n# CONFIG_LDM_DEBUG is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\n# CONFIG_CMDLINE_PARTITION is not set\n# end of Partition Types\n\nCONFIG_BLOCK_COMPAT=y\nCONFIG_BLK_MQ_PCI=y\nCONFIG_BLK_MQ_VIRTIO=y\nCONFIG_BLK_PM=y\nCONFIG_BLOCK_HOLDER_DEPRECATED=y\nCONFIG_BLK_MQ_STACKING=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\nCONFIG_IOSCHED_BFQ=y\n# CONFIG_BFQ_GROUP_IOSCHED is not set\n# end of IO Schedulers\n\nCONFIG_ASN1=y\nCONFIG_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_INLINE_READ_UNLOCK=y\nCONFIG_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_INLINE_WRITE_UNLOCK=y\nCONFIG_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_USE_QUEUED_SPINLOCKS=y\nCONFIG_QUEUED_SPINLOCKS=y\nCONFIG_ARCH_USE_QUEUED_RWLOCKS=y\nCONFIG_QUEUED_RWLOCKS=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_ARCH_HAS_SYNC_CORE_BEFORE_USERMODE=y\nCONFIG_ARCH_HAS_SYSCALL_WRAPPER=y\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_ELFCORE=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\nCONFIG_BINFMT_MISC=y\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\nCONFIG_SWAP=y\n# CONFIG_ZSWAP is not set\n\n#\n# SLAB allocator options\n#\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# end of SLAB allocator options\n\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\n# CONFIG_COMPAT_BRK is not set\nCONFIG_SPARSEMEM=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_FAST_GUP=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_EXCLUSIVE_SYSTEM_RAM=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y\n# CONFIG_MEMORY_HOTPLUG is not set\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y\nCONFIG_MEMORY_BALLOON=y\nCONFIG_BALLOON_COMPACTION=y\nCONFIG_COMPACTION=y\nCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1\nCONFIG_PAGE_REPORTING=y\nCONFIG_MIGRATION=y\nCONFIG_ARCH_ENABLE_THP_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\nCONFIG_PHYS_ADDR_T_64BIT=y\nCONFIG_MMU_NOTIFIER=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_WANT_GENERAL_HUGETLB=y\nCONFIG_ARCH_WANTS_THP_SWAP=y\nCONFIG_TRANSPARENT_HUGEPAGE=y\n# CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS is not set\nCONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y\nCONFIG_THP_SWAP=y\n# CONFIG_READ_ONLY_THP_FOR_FS is not set\nCONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y\nCONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y\nCONFIG_USE_PERCPU_NUMA_NODE_ID=y\nCONFIG_HAVE_SETUP_PER_CPU_AREA=y\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\n# CONFIG_CMA_DEBUGFS is not set\n# CONFIG_CMA_SYSFS is not set\nCONFIG_CMA_AREAS=19\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CACHE_LINE_SIZE=y\nCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y\nCONFIG_ARCH_HAS_PTE_DEVMAP=y\nCONFIG_ARCH_HAS_ZONE_DMA_SET=y\nCONFIG_ZONE_DMA=y\nCONFIG_ZONE_DMA32=y\nCONFIG_HMM_MIRROR=y\nCONFIG_VMAP_PFN=y\nCONFIG_ARCH_USES_HIGH_VMA_FLAGS=y\nCONFIG_ARCH_HAS_PKEYS=y\nCONFIG_VM_EVENT_COUNTERS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\nCONFIG_ARCH_HAS_PTE_SPECIAL=y\nCONFIG_MAPPING_DIRTY_HELPERS=y\nCONFIG_SECRETMEM=y\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_USERFAULTFD is not set\n# CONFIG_LRU_GEN is not set\nCONFIG_LOCK_MM_AND_FIND_VMA=y\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\nCONFIG_NET_INGRESS=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_USER_COMPAT is not set\n# CONFIG_XFRM_INTERFACE is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_XFRM_ESP=y\n# CONFIG_NET_KEY is not set\n# CONFIG_XDP_SOCKETS is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=m\nCONFIG_IP_MROUTE_COMMON=y\nCONFIG_IP_MROUTE=y\n# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set\n# CONFIG_IP_PIMSM_V1 is not set\n# CONFIG_IP_PIMSM_V2 is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=y\n# CONFIG_INET_ESP_OFFLOAD is not set\n# CONFIG_INET_ESPINTCP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=m\n# CONFIG_INET_DIAG is not set\nCONFIG_TCP_CONG_ADVANCED=y\n# CONFIG_TCP_CONG_BIC is not set\nCONFIG_TCP_CONG_CUBIC=y\n# CONFIG_TCP_CONG_WESTWOOD is not set\nCONFIG_TCP_CONG_HTCP=m\nCONFIG_TCP_CONG_HSTCP=m\n# CONFIG_TCP_CONG_HYBLA is not set\nCONFIG_TCP_CONG_VEGAS=m\n# CONFIG_TCP_CONG_NV is not set\nCONFIG_TCP_CONG_SCALABLE=m\n# CONFIG_TCP_CONG_LP is not set\nCONFIG_TCP_CONG_VENO=m\nCONFIG_TCP_CONG_YEAH=m\nCONFIG_TCP_CONG_ILLINOIS=m\n# CONFIG_TCP_CONG_DCTCP is not set\nCONFIG_TCP_CONG_CDG=m\n# CONFIG_TCP_CONG_BBR is not set\nCONFIG_DEFAULT_CUBIC=y\n# CONFIG_DEFAULT_RENO is not set\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_IPV6_VTI is not set\nCONFIG_IPV6_SIT=m\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\nCONFIG_IPV6_FOU=m\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_MPTCP is not set\n# CONFIG_NETWORK_SECMARK is not set\nCONFIG_NET_PTP_CLASSIFY=y\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\nCONFIG_NETFILTER_EGRESS=y\nCONFIG_NETFILTER_NETLINK=m\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\nCONFIG_NETFILTER_NETLINK_LOG=m\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\n# CONFIG_NF_LOG_SYSLOG is not set\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_ZONES is not set\n# CONFIG_NF_CONNTRACK_PROCFS is not set\n# CONFIG_NF_CONNTRACK_EVENTS is not set\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\n# CONFIG_NF_CT_PROTO_DCCP is not set\n# CONFIG_NF_CT_PROTO_SCTP is not set\n# CONFIG_NF_CT_PROTO_UDPLITE is not set\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\nCONFIG_NF_CONNTRACK_IRC=m\nCONFIG_NF_CONNTRACK_BROADCAST=m\nCONFIG_NF_CONNTRACK_NETBIOS_NS=m\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\nCONFIG_NF_CONNTRACK_SIP=m\nCONFIG_NF_CONNTRACK_TFTP=m\nCONFIG_NF_CT_NETLINK=m\n# CONFIG_NETFILTER_NETLINK_GLUE_CT is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_IRC=m\nCONFIG_NF_NAT_SIP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=y\nCONFIG_NF_NAT_MASQUERADE=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\nCONFIG_NETFILTER_XTABLES_COMPAT=y\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\nCONFIG_NETFILTER_XT_MATCH_IPRANGE=m\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\nCONFIG_NETFILTER_XT_MATCH_OWNER=m\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\nCONFIG_NETFILTER_XT_MATCH_STATE=m\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\nCONFIG_IP_VS=m\n# CONFIG_IP_VS_IPV6 is not set\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_MH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n# CONFIG_IP_VS_TWOS is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS MH scheduler\n#\nCONFIG_IP_VS_MH_TAB_INDEX=12\n\n#\n# IPVS application helper\n#\n# CONFIG_IP_VS_FTP is not set\nCONFIG_IP_VS_NFCT=y\n# CONFIG_IP_VS_PE_SIP is not set\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\n# CONFIG_NF_LOG_IPV6 is not set\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_MATCH_SRH is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\nCONFIG_NET_SCH_FQ_CODEL=y\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_FLOW is not set\nCONFIG_NET_CLS_CGROUP=m\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\nCONFIG_NET_L3_MASTER_DEV=y\n# CONFIG_QRTR is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_PCPU_DEV_REFCNT=y\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_SOCK_RX_QUEUE_MAPPING=y\nCONFIG_XPS=y\nCONFIG_CGROUP_NET_PRIO=y\nCONFIG_CGROUP_NET_CLASSID=y\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\nCONFIG_BT_RFCOMM_TTY=y\nCONFIG_BT_BNEP=m\nCONFIG_BT_BNEP_MC_FILTER=y\nCONFIG_BT_BNEP_PROTO_FILTER=y\nCONFIG_BT_HIDP=m\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_LEDS is not set\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\n# CONFIG_BT_DEBUGFS is not set\n# CONFIG_BT_SELFTEST is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_QCA=m\nCONFIG_BT_MTK=m\nCONFIG_BT_HCIBTUSB=m\nCONFIG_BT_HCIBTUSB_AUTOSUSPEND=y\nCONFIG_BT_HCIBTUSB_BCM=y\nCONFIG_BT_HCIBTUSB_MTK=y\nCONFIG_BT_HCIBTUSB_RTL=y\nCONFIG_BT_HCIBTSDIO=m\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_SERDEV=y\nCONFIG_BT_HCIUART_H4=y\n# CONFIG_BT_HCIUART_NOKIA is not set\nCONFIG_BT_HCIUART_BCSP=y\nCONFIG_BT_HCIUART_ATH3K=y\nCONFIG_BT_HCIUART_LL=y\nCONFIG_BT_HCIUART_3WIRE=y\nCONFIG_BT_HCIUART_INTEL=y\nCONFIG_BT_HCIUART_BCM=y\nCONFIG_BT_HCIUART_RTL=y\nCONFIG_BT_HCIUART_QCA=y\nCONFIG_BT_HCIUART_AG6XX=y\nCONFIG_BT_HCIUART_MRVL=y\nCONFIG_BT_HCIBCM203X=m\nCONFIG_BT_HCIBPA10X=m\nCONFIG_BT_HCIBFUSB=m\nCONFIG_BT_HCIVHCI=m\nCONFIG_BT_MRVL=m\nCONFIG_BT_MRVL_SDIO=m\nCONFIG_BT_ATH3K=m\nCONFIG_BT_MTKSDIO=m\nCONFIG_BT_MTKUART=m\n# CONFIG_BT_VIRTIO is not set\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_SPY=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=m\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\n# CONFIG_CFG80211_CRDA_SUPPORT is not set\nCONFIG_CFG80211_WEXT=y\nCONFIG_CFG80211_WEXT_EXPORT=y\nCONFIG_LIB80211=m\nCONFIG_LIB80211_CRYPT_WEP=m\nCONFIG_LIB80211_CRYPT_CCMP=m\nCONFIG_LIB80211_CRYPT_TKIP=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=m\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=m\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_NET_DEVLINK=y\nCONFIG_PAGE_POOL=y\n# CONFIG_PAGE_POOL_STATS is not set\nCONFIG_FAILOVER=y\nCONFIG_ETHTOOL_NETLINK=y\n\n#\n# Device Drivers\n#\nCONFIG_HAVE_EISA=y\n# CONFIG_EISA is not set\nCONFIG_HAVE_PCI=y\nCONFIG_PCI=y\nCONFIG_PCI_DOMAINS=y\nCONFIG_PCIEPORTBUS=y\nCONFIG_PCIEAER=y\n# CONFIG_PCIEAER_INJECT is not set\n# CONFIG_PCIE_ECRC is not set\nCONFIG_PCIEASPM=y\nCONFIG_PCIEASPM_DEFAULT=y\n# CONFIG_PCIEASPM_POWERSAVE is not set\n# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set\n# CONFIG_PCIEASPM_PERFORMANCE is not set\nCONFIG_PCIE_PME=y\n# CONFIG_PCIE_DPC is not set\n# CONFIG_PCIE_PTM is not set\nCONFIG_PCI_MSI=y\nCONFIG_PCI_MSI_IRQ_DOMAIN=y\nCONFIG_PCI_QUIRKS=y\n# CONFIG_PCI_DEBUG is not set\n# CONFIG_PCI_STUB is not set\nCONFIG_PCI_ATS=y\nCONFIG_PCI_LOCKLESS_CONFIG=y\n# CONFIG_PCI_IOV is not set\nCONFIG_PCI_PRI=y\nCONFIG_PCI_PASID=y\nCONFIG_PCI_LABEL=y\n# CONFIG_PCIE_BUS_TUNE_OFF is not set\nCONFIG_PCIE_BUS_DEFAULT=y\n# CONFIG_PCIE_BUS_SAFE is not set\n# CONFIG_PCIE_BUS_PERFORMANCE is not set\n# CONFIG_PCIE_BUS_PEER2PEER is not set\nCONFIG_VGA_ARB=y\nCONFIG_VGA_ARB_MAX_GPUS=16\n# CONFIG_HOTPLUG_PCI is not set\n\n#\n# PCI controller drivers\n#\n# CONFIG_VMD is not set\n\n#\n# DesignWare PCI Core Support\n#\n# CONFIG_PCIE_DW_PLAT_HOST is not set\n# CONFIG_PCI_MESON is not set\n# end of DesignWare PCI Core Support\n\n#\n# Mobiveil PCIe Core Support\n#\n# end of Mobiveil PCIe Core Support\n\n#\n# Cadence PCIe controllers support\n#\n# end of Cadence PCIe controllers support\n# end of PCI controller drivers\n\n#\n# PCI Endpoint\n#\n# CONFIG_PCI_ENDPOINT is not set\n# end of PCI Endpoint\n\n#\n# PCI switch controller drivers\n#\n# CONFIG_PCI_SW_SWITCHTEC is not set\n# end of PCI switch controller drivers\n\n# CONFIG_CXL_BUS is not set\n# CONFIG_PCCARD is not set\n# CONFIG_RAPIDIO is not set\n\n#\n# Generic Driver Options\n#\nCONFIG_AUXILIARY_BUS=y\n# CONFIG_UEVENT_HELPER is not set\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\n# CONFIG_DEVTMPFS_SAFE is not set\nCONFIG_STANDALONE=y\n# CONFIG_PREVENT_FIRMWARE_BUILD is not set\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\nCONFIG_FW_CACHE=y\n# CONFIG_FW_UPLOAD is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\n# CONFIG_ALLOW_DEV_COREDUMP is not set\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\n# CONFIG_MHI_BUS is not set\n# CONFIG_MHI_BUS_EP is not set\n# end of Bus devices\n\nCONFIG_CONNECTOR=y\nCONFIG_PROC_EVENTS=y\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\n# end of ARM System Control and Management Interface Protocol\n\n# CONFIG_EDD is not set\nCONFIG_FIRMWARE_MEMMAP=y\nCONFIG_DMIID=y\nCONFIG_DMI_SYSFS=m\nCONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y\n# CONFIG_ISCSI_IBFT is not set\n# CONFIG_FW_CFG_SYSFS is not set\nCONFIG_SYSFB=y\n# CONFIG_SYSFB_SIMPLEFB is not set\n# CONFIG_GOOGLE_FIRMWARE is not set\n\n#\n# EFI (Extensible Firmware Interface) Support\n#\nCONFIG_EFI_ESRT=y\n# CONFIG_EFI_FAKE_MEMMAP is not set\nCONFIG_EFI_DXE_MEM_ATTRIBUTES=y\nCONFIG_EFI_RUNTIME_WRAPPERS=y\nCONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y\n# CONFIG_EFI_BOOTLOADER_CONTROL is not set\n# CONFIG_EFI_CAPSULE_LOADER is not set\n# CONFIG_EFI_TEST is not set\nCONFIG_EFI_DEV_PATH_PARSER=y\nCONFIG_APPLE_PROPERTIES=y\n# CONFIG_RESET_ATTACK_MITIGATION is not set\n# CONFIG_EFI_RCI2_TABLE is not set\n# CONFIG_EFI_DISABLE_PCI_DMA is not set\nCONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y\n# CONFIG_EFI_DISABLE_RUNTIME is not set\n# CONFIG_EFI_COCO_SECRET is not set\n# end of EFI (Extensible Firmware Interface) Support\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\n# CONFIG_MTD is not set\n# CONFIG_OF is not set\nCONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y\n# CONFIG_PARPORT is not set\nCONFIG_PNP=y\n# CONFIG_PNP_DEBUG_MESSAGES is not set\n\n#\n# Protocols\n#\nCONFIG_PNPACPI=y\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\n# CONFIG_BLK_DEV_FD is not set\nCONFIG_CDROM=y\n# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=0\n# CONFIG_BLK_DEV_DRBD is not set\nCONFIG_BLK_DEV_NBD=y\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=16\nCONFIG_BLK_DEV_RAM_SIZE=16384\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\nCONFIG_VIRTIO_BLK=y\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_UBLK is not set\n\n#\n# NVME Support\n#\nCONFIG_NVME_CORE=y\nCONFIG_BLK_DEV_NVME=y\nCONFIG_NVME_MULTIPATH=y\n# CONFIG_NVME_VERBOSE_ERRORS is not set\nCONFIG_NVME_HWMON=y\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TCP is not set\n# CONFIG_NVME_AUTH is not set\n# CONFIG_NVME_TARGET is not set\n# end of NVME Support\n\n#\n# Misc devices\n#\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_IBM_ASM is not set\n# CONFIG_PHANTOM is not set\n# CONFIG_TIFM_CORE is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_HP_ILO is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_SRAM is not set\n# CONFIG_DW_XDATA_PCIE is not set\n# CONFIG_PCI_ENDPOINT_TEST is not set\n# CONFIG_XILINX_SDFEC is not set\nCONFIG_MISC_RTSX=y\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_IDT_89HPESX is not set\nCONFIG_EEPROM_EE1004=y\n# end of EEPROM support\n\n# CONFIG_CB710_CORE is not set\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_I2C is not set\nCONFIG_ALTERA_STAPL=m\n# CONFIG_INTEL_MEI is not set\n# CONFIG_INTEL_MEI_ME is not set\n# CONFIG_INTEL_MEI_TXE is not set\n# CONFIG_INTEL_MEI_HDCP is not set\n# CONFIG_INTEL_MEI_PXP is not set\n# CONFIG_VMWARE_VMCI is not set\n# CONFIG_GENWQE is not set\n# CONFIG_ECHO is not set\n# CONFIG_BCM_VK is not set\n# CONFIG_MISC_ALCOR_PCI is not set\nCONFIG_MISC_RTSX_PCI=y\nCONFIG_MISC_RTSX_USB=y\n# CONFIG_HABANA_AI is not set\n# CONFIG_UACCE is not set\n# CONFIG_PVPANIC is not set\n# CONFIG_GP_PCI1XXXX is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_PROC_FS is not set\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_CHR_DEV_SG=m\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\nCONFIG_SCSI_SCAN_ASYNC=y\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\nCONFIG_SCSI_SAS_ATTRS=y\nCONFIG_SCSI_SAS_LIBSAS=y\nCONFIG_SCSI_SAS_ATA=y\nCONFIG_SCSI_SAS_HOST_SMP=y\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_CXGB3_ISCSI is not set\n# CONFIG_SCSI_CXGB4_ISCSI is not set\n# CONFIG_SCSI_BNX2_ISCSI is not set\n# CONFIG_BE2ISCSI is not set\n# CONFIG_BLK_DEV_3W_XXXX_RAID is not set\n# CONFIG_SCSI_HPSA is not set\n# CONFIG_SCSI_3W_9XXX is not set\n# CONFIG_SCSI_3W_SAS is not set\n# CONFIG_SCSI_ACARD is not set\n# CONFIG_SCSI_AACRAID is not set\n# CONFIG_SCSI_AIC7XXX is not set\n# CONFIG_SCSI_AIC79XX is not set\n# CONFIG_SCSI_AIC94XX is not set\nCONFIG_SCSI_MVSAS=y\n# CONFIG_SCSI_MVSAS_DEBUG is not set\n# CONFIG_SCSI_MVSAS_TASKLET is not set\n# CONFIG_SCSI_MVUMI is not set\n# CONFIG_SCSI_ADVANSYS is not set\n# CONFIG_SCSI_ARCMSR is not set\n# CONFIG_SCSI_ESAS2R is not set\n# CONFIG_MEGARAID_NEWGEN is not set\n# CONFIG_MEGARAID_LEGACY is not set\nCONFIG_MEGARAID_SAS=y\n# CONFIG_SCSI_MPT3SAS is not set\n# CONFIG_SCSI_MPT2SAS is not set\n# CONFIG_SCSI_MPI3MR is not set\n# CONFIG_SCSI_SMARTPQI is not set\n# CONFIG_SCSI_HPTIOP is not set\n# CONFIG_SCSI_BUSLOGIC is not set\n# CONFIG_SCSI_MYRB is not set\n# CONFIG_SCSI_MYRS is not set\n# CONFIG_VMWARE_PVSCSI is not set\n# CONFIG_SCSI_SNIC is not set\n# CONFIG_SCSI_DMX3191D is not set\n# CONFIG_SCSI_FDOMAIN_PCI is not set\n# CONFIG_SCSI_ISCI is not set\n# CONFIG_SCSI_IPS is not set\n# CONFIG_SCSI_INITIO is not set\n# CONFIG_SCSI_INIA100 is not set\n# CONFIG_SCSI_STEX is not set\n# CONFIG_SCSI_SYM53C8XX_2 is not set\n# CONFIG_SCSI_IPR is not set\n# CONFIG_SCSI_QLOGIC_1280 is not set\n# CONFIG_SCSI_QLA_ISCSI is not set\n# CONFIG_SCSI_DC395x is not set\n# CONFIG_SCSI_AM53C974 is not set\n# CONFIG_SCSI_WD719X is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_PMCRAID is not set\n# CONFIG_SCSI_PM8001 is not set\nCONFIG_SCSI_VIRTIO=y\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\nCONFIG_ATA=y\nCONFIG_SATA_HOST=y\nCONFIG_PATA_TIMINGS=y\n# CONFIG_ATA_VERBOSE_ERROR is not set\nCONFIG_ATA_FORCE=y\nCONFIG_ATA_ACPI=y\n# CONFIG_SATA_ZPODD is not set\nCONFIG_SATA_PMP=y\n\n#\n# Controllers with non-SFF native interface\n#\nCONFIG_SATA_AHCI=y\nCONFIG_SATA_MOBILE_LPM_POLICY=0\nCONFIG_SATA_AHCI_PLATFORM=y\n# CONFIG_AHCI_DWC is not set\n# CONFIG_SATA_INIC162X is not set\n# CONFIG_SATA_ACARD_AHCI is not set\nCONFIG_SATA_SIL24=y\nCONFIG_ATA_SFF=y\n\n#\n# SFF controllers with custom DMA interface\n#\n# CONFIG_PDC_ADMA is not set\n# CONFIG_SATA_QSTOR is not set\n# CONFIG_SATA_SX4 is not set\nCONFIG_ATA_BMDMA=y\n\n#\n# SATA SFF controllers with BMDMA\n#\nCONFIG_ATA_PIIX=y\n# CONFIG_SATA_DWC is not set\n# CONFIG_SATA_MV is not set\nCONFIG_SATA_NV=y\n# CONFIG_SATA_PROMISE is not set\nCONFIG_SATA_SIL=y\nCONFIG_SATA_SIS=y\n# CONFIG_SATA_SVW is not set\nCONFIG_SATA_ULI=y\nCONFIG_SATA_VIA=y\n# CONFIG_SATA_VITESSE is not set\n\n#\n# PATA SFF controllers with BMDMA\n#\nCONFIG_PATA_ALI=y\nCONFIG_PATA_AMD=y\n# CONFIG_PATA_ARTOP is not set\nCONFIG_PATA_ATIIXP=y\n# CONFIG_PATA_ATP867X is not set\n# CONFIG_PATA_CMD64X is not set\n# CONFIG_PATA_CYPRESS is not set\n# CONFIG_PATA_EFAR is not set\n# CONFIG_PATA_HPT366 is not set\n# CONFIG_PATA_HPT37X is not set\n# CONFIG_PATA_HPT3X2N is not set\n# CONFIG_PATA_HPT3X3 is not set\n# CONFIG_PATA_IT8213 is not set\n# CONFIG_PATA_IT821X is not set\nCONFIG_PATA_JMICRON=y\nCONFIG_PATA_MARVELL=y\n# CONFIG_PATA_NETCELL is not set\n# CONFIG_PATA_NINJA32 is not set\n# CONFIG_PATA_NS87415 is not set\n# CONFIG_PATA_OLDPIIX is not set\n# CONFIG_PATA_OPTIDMA is not set\n# CONFIG_PATA_PDC2027X is not set\n# CONFIG_PATA_PDC_OLD is not set\n# CONFIG_PATA_RADISYS is not set\n# CONFIG_PATA_RDC is not set\n# CONFIG_PATA_SCH is not set\n# CONFIG_PATA_SERVERWORKS is not set\n# CONFIG_PATA_SIL680 is not set\nCONFIG_PATA_SIS=y\n# CONFIG_PATA_TOSHIBA is not set\n# CONFIG_PATA_TRIFLEX is not set\nCONFIG_PATA_VIA=y\n# CONFIG_PATA_WINBOND is not set\n\n#\n# PIO-only SFF controllers\n#\n# CONFIG_PATA_CMD640_PCI is not set\n# CONFIG_PATA_MPIIX is not set\n# CONFIG_PATA_NS87410 is not set\n# CONFIG_PATA_OPTI is not set\n# CONFIG_PATA_RZ1000 is not set\n\n#\n# Generic fallback / legacy drivers\n#\nCONFIG_PATA_ACPI=y\nCONFIG_ATA_GENERIC=y\n# CONFIG_PATA_LEGACY is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\n# CONFIG_DM_DEBUG is not set\nCONFIG_DM_BUFIO=m\n# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\n# CONFIG_DM_UNSTRIPED is not set\n# CONFIG_DM_CRYPT is not set\n# CONFIG_DM_SNAPSHOT is not set\nCONFIG_DM_THIN_PROVISIONING=m\n# CONFIG_DM_CACHE is not set\n# CONFIG_DM_WRITECACHE is not set\n# CONFIG_DM_EBS is not set\n# CONFIG_DM_ERA is not set\n# CONFIG_DM_CLONE is not set\n# CONFIG_DM_MIRROR is not set\n# CONFIG_DM_RAID is not set\n# CONFIG_DM_ZERO is not set\n# CONFIG_DM_MULTIPATH is not set\n# CONFIG_DM_DELAY is not set\n# CONFIG_DM_DUST is not set\n# CONFIG_DM_UEVENT is not set\n# CONFIG_DM_FLAKEY is not set\n# CONFIG_DM_VERITY is not set\n# CONFIG_DM_SWITCH is not set\n# CONFIG_DM_LOG_WRITES is not set\n# CONFIG_DM_INTEGRITY is not set\n# CONFIG_TARGET_CORE is not set\n# CONFIG_FUSION is not set\n\n#\n# IEEE 1394 (FireWire) support\n#\nCONFIG_FIREWIRE=m\nCONFIG_FIREWIRE_OHCI=m\nCONFIG_FIREWIRE_SBP2=m\n# CONFIG_FIREWIRE_NET is not set\n# CONFIG_FIREWIRE_NOSY is not set\n# end of IEEE 1394 (FireWire) support\n\n# CONFIG_MACINTOSH_DRIVERS is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\nCONFIG_DUMMY=m\nCONFIG_WIREGUARD=m\n# CONFIG_WIREGUARD_DEBUG is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_FC is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\n# CONFIG_MACVTAP is not set\nCONFIG_IPVLAN_L3S=y\nCONFIG_IPVLAN=m\n# CONFIG_IPVTAP is not set\nCONFIG_VXLAN=m\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_AMT is not set\n# CONFIG_MACSEC is not set\nCONFIG_NETCONSOLE=y\nCONFIG_NETCONSOLE_DYNAMIC=y\nCONFIG_NETPOLL=y\nCONFIG_NET_POLL_CONTROLLER=y\nCONFIG_TUN=y\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\nCONFIG_VIRTIO_NET=y\nCONFIG_NLMON=m\n# CONFIG_ARCNET is not set\nCONFIG_ETHERNET=y\nCONFIG_MDIO=y\nCONFIG_NET_VENDOR_3COM=y\nCONFIG_VORTEX=y\n# CONFIG_TYPHOON is not set\n# CONFIG_NET_VENDOR_ADAPTEC is not set\n# CONFIG_NET_VENDOR_AGERE is not set\n# CONFIG_NET_VENDOR_ALACRITECH is not set\n# CONFIG_NET_VENDOR_ALTEON is not set\n# CONFIG_ALTERA_TSE is not set\nCONFIG_NET_VENDOR_AMAZON=y\n# CONFIG_ENA_ETHERNET is not set\nCONFIG_NET_VENDOR_AMD=y\n# CONFIG_AMD8111_ETH is not set\nCONFIG_PCNET32=y\n# CONFIG_AMD_XGBE is not set\nCONFIG_NET_VENDOR_AQUANTIA=y\nCONFIG_AQTION=y\nCONFIG_NET_VENDOR_ARC=y\n# CONFIG_NET_VENDOR_ASIX is not set\nCONFIG_NET_VENDOR_ATHEROS=y\nCONFIG_ATL2=y\nCONFIG_ATL1=y\nCONFIG_ATL1E=y\nCONFIG_ATL1C=y\nCONFIG_ALX=y\n# CONFIG_CX_ECAT is not set\nCONFIG_NET_VENDOR_BROADCOM=y\nCONFIG_B44=y\nCONFIG_B44_PCI_AUTOSELECT=y\nCONFIG_B44_PCICORE_AUTOSELECT=y\nCONFIG_B44_PCI=y\n# CONFIG_BCMGENET is not set\nCONFIG_BNX2=y\nCONFIG_CNIC=y\nCONFIG_TIGON3=y\nCONFIG_TIGON3_HWMON=y\n# CONFIG_BNX2X is not set\n# CONFIG_SYSTEMPORT is not set\n# CONFIG_BNXT is not set\n# CONFIG_NET_VENDOR_CADENCE is not set\nCONFIG_NET_VENDOR_CAVIUM=y\n# CONFIG_THUNDER_NIC_PF is not set\n# CONFIG_THUNDER_NIC_VF is not set\n# CONFIG_THUNDER_NIC_BGX is not set\n# CONFIG_THUNDER_NIC_RGX is not set\n# CONFIG_CAVIUM_PTP is not set\n# CONFIG_LIQUIDIO is not set\n# CONFIG_LIQUIDIO_VF is not set\n# CONFIG_NET_VENDOR_CHELSIO is not set\n# CONFIG_NET_VENDOR_CISCO is not set\n# CONFIG_NET_VENDOR_CORTINA is not set\n# CONFIG_NET_VENDOR_DAVICOM is not set\n# CONFIG_DNET is not set\nCONFIG_NET_VENDOR_DEC=y\nCONFIG_NET_TULIP=y\n# CONFIG_DE2104X is not set\n# CONFIG_TULIP is not set\n# CONFIG_WINBOND_840 is not set\n# CONFIG_DM9102 is not set\nCONFIG_ULI526X=y\n# CONFIG_NET_VENDOR_DLINK is not set\n# CONFIG_NET_VENDOR_EMULEX is not set\n# CONFIG_NET_VENDOR_ENGLEDER is not set\nCONFIG_NET_VENDOR_EZCHIP=y\n# CONFIG_NET_VENDOR_FUNGIBLE is not set\n# CONFIG_NET_VENDOR_GOOGLE is not set\n# CONFIG_NET_VENDOR_HUAWEI is not set\nCONFIG_NET_VENDOR_I825XX=y\nCONFIG_NET_VENDOR_INTEL=y\nCONFIG_E100=y\nCONFIG_E1000=y\nCONFIG_E1000E=y\nCONFIG_E1000E_HWTS=y\nCONFIG_IGB=y\nCONFIG_IGB_HWMON=y\n# CONFIG_IGBVF is not set\nCONFIG_IXGB=y\nCONFIG_IXGBE=y\nCONFIG_IXGBE_HWMON=y\n# CONFIG_IXGBEVF is not set\n# CONFIG_I40E is not set\n# CONFIG_I40EVF is not set\nCONFIG_ICE=y\nCONFIG_ICE_HWTS=y\n# CONFIG_FM10K is not set\nCONFIG_IGC=y\n# CONFIG_NET_VENDOR_WANGXUN is not set\nCONFIG_JME=y\n# CONFIG_NET_VENDOR_LITEX is not set\nCONFIG_NET_VENDOR_MARVELL=y\n# CONFIG_MVMDIO is not set\nCONFIG_SKGE=y\n# CONFIG_SKGE_DEBUG is not set\nCONFIG_SKGE_GENESIS=y\nCONFIG_SKY2=y\n# CONFIG_SKY2_DEBUG is not set\n# CONFIG_OCTEON_EP is not set\n# CONFIG_NET_VENDOR_MELLANOX is not set\n# CONFIG_NET_VENDOR_MICREL is not set\nCONFIG_NET_VENDOR_MICROCHIP=y\nCONFIG_LAN743X=y\nCONFIG_NET_VENDOR_MICROSEMI=y\nCONFIG_NET_VENDOR_MICROSOFT=y\n# CONFIG_NET_VENDOR_MYRI is not set\n# CONFIG_FEALNX is not set\n# CONFIG_NET_VENDOR_NI is not set\n# CONFIG_NET_VENDOR_NATSEMI is not set\n# CONFIG_NET_VENDOR_NETERION is not set\nCONFIG_NET_VENDOR_NETRONOME=y\n# CONFIG_NFP is not set\nCONFIG_NET_VENDOR_NVIDIA=y\nCONFIG_FORCEDETH=y\n# CONFIG_NET_VENDOR_OKI is not set\n# CONFIG_ETHOC is not set\n# CONFIG_NET_VENDOR_PACKET_ENGINES is not set\n# CONFIG_NET_VENDOR_PENSANDO is not set\nCONFIG_NET_VENDOR_QLOGIC=y\nCONFIG_QLA3XXX=y\n# CONFIG_QLCNIC is not set\n# CONFIG_NETXEN_NIC is not set\n# CONFIG_QED is not set\n# CONFIG_NET_VENDOR_BROCADE is not set\n# CONFIG_NET_VENDOR_QUALCOMM is not set\n# CONFIG_NET_VENDOR_RDC is not set\nCONFIG_NET_VENDOR_REALTEK=y\n# CONFIG_8139CP is not set\nCONFIG_8139TOO=y\n# CONFIG_8139TOO_PIO is not set\n# CONFIG_8139TOO_TUNE_TWISTER is not set\n# CONFIG_8139TOO_8129 is not set\n# CONFIG_8139_OLD_RX_RESET is not set\nCONFIG_R8169=y\nCONFIG_NET_VENDOR_RENESAS=y\nCONFIG_NET_VENDOR_ROCKER=y\n# CONFIG_NET_VENDOR_SAMSUNG is not set\n# CONFIG_NET_VENDOR_SEEQ is not set\n# CONFIG_NET_VENDOR_SILAN is not set\nCONFIG_NET_VENDOR_SIS=y\nCONFIG_SIS900=y\nCONFIG_SIS190=y\n# CONFIG_NET_VENDOR_SOLARFLARE is not set\n# CONFIG_NET_VENDOR_SMSC is not set\n# CONFIG_NET_VENDOR_SOCIONEXT is not set\n# CONFIG_NET_VENDOR_STMICRO is not set\n# CONFIG_NET_VENDOR_SUN is not set\nCONFIG_NET_VENDOR_SYNOPSYS=y\n# CONFIG_DWC_XLGMAC is not set\n# CONFIG_NET_VENDOR_TEHUTI is not set\n# CONFIG_NET_VENDOR_TI is not set\n# CONFIG_NET_VENDOR_VERTEXCOM is not set\nCONFIG_NET_VENDOR_VIA=y\nCONFIG_VIA_RHINE=y\n# CONFIG_VIA_RHINE_MMIO is not set\nCONFIG_VIA_VELOCITY=y\n# CONFIG_NET_VENDOR_WIZNET is not set\n# CONFIG_NET_VENDOR_XILINX is not set\n# CONFIG_FDDI is not set\n# CONFIG_HIPPI is not set\n# CONFIG_NET_SB1000 is not set\nCONFIG_PHYLINK=m\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\nCONFIG_AMD_PHY=y\n# CONFIG_ADIN_PHY is not set\n# CONFIG_ADIN1100_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=m\nCONFIG_BROADCOM_PHY=y\n# CONFIG_BCM54140_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\nCONFIG_BCM_NET_PHYLIB=y\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\nCONFIG_MARVELL_PHY=y\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MARVELL_88X2222_PHY is not set\n# CONFIG_MAXLINEAR_GPHY is not set\n# CONFIG_MEDIATEK_GE_PHY is not set\n# CONFIG_MICREL_PHY is not set\n# CONFIG_MICROCHIP_PHY is not set\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_MOTORCOMM_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_NXP_TJA11XX_PHY is not set\nCONFIG_AT803X_PHY=y\n# CONFIG_QSEMI_PHY is not set\nCONFIG_REALTEK_PHY=y\n# CONFIG_RENESAS_PHY is not set\n# CONFIG_ROCKCHIP_PHY is not set\n# CONFIG_SMSC_PHY is not set\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_DP83TD510_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_PSE_CONTROLLER is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_ACPI_MDIO=y\nCONFIG_MDIO_DEVRES=y\n# CONFIG_MDIO_BITBANG is not set\n# CONFIG_MDIO_BCM_UNIMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_THUNDER is not set\n\n#\n# MDIO Multiplexers\n#\n\n#\n# PCS device drivers\n#\n# end of PCS device drivers\n\nCONFIG_PPP=m\nCONFIG_PPP_BSDCOMP=m\nCONFIG_PPP_DEFLATE=m\n# CONFIG_PPP_FILTER is not set\nCONFIG_PPP_MPPE=m\n# CONFIG_PPP_MULTILINK is not set\nCONFIG_PPPOE=m\nCONFIG_PPP_ASYNC=m\n# CONFIG_PPP_SYNC_TTY is not set\n# CONFIG_SLIP is not set\nCONFIG_SLHC=m\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\n# CONFIG_USB_PEGASUS is not set\n# CONFIG_USB_RTL8150 is not set\nCONFIG_USB_RTL8152=m\n# CONFIG_USB_LAN78XX is not set\nCONFIG_USB_USBNET=m\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\n# CONFIG_USB_NET_CDC_EEM is not set\n# CONFIG_USB_NET_CDC_NCM is not set\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\nCONFIG_USB_NET_DM9601=m\n# CONFIG_USB_NET_SR9700 is not set\n# CONFIG_USB_NET_SR9800 is not set\nCONFIG_USB_NET_SMSC75XX=m\n# CONFIG_USB_NET_SMSC95XX is not set\n# CONFIG_USB_NET_GL620A is not set\n# CONFIG_USB_NET_NET1080 is not set\n# CONFIG_USB_NET_PLUSB is not set\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\n# CONFIG_USB_NET_CDC_SUBSET is not set\n# CONFIG_USB_NET_ZAURUS is not set\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\nCONFIG_USB_HSO=m\n# CONFIG_USB_NET_INT51X1 is not set\nCONFIG_USB_IPHETH=m\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\n# CONFIG_USB_NET_AQC111 is not set\nCONFIG_USB_RTL8153_ECM=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\n# CONFIG_ADM8211 is not set\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\nCONFIG_ATH5K=m\n# CONFIG_ATH5K_DEBUG is not set\n# CONFIG_ATH5K_TRACER is not set\nCONFIG_ATH5K_PCI=y\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\nCONFIG_ATH9K=m\nCONFIG_ATH9K_PCI=y\nCONFIG_ATH9K_AHB=y\n# CONFIG_ATH9K_DEBUGFS is not set\n# CONFIG_ATH9K_DYNACK is not set\n# CONFIG_ATH9K_WOW is not set\nCONFIG_ATH9K_RFKILL=y\nCONFIG_ATH9K_CHANNEL_CONTEXT=y\nCONFIG_ATH9K_PCOEM=y\n# CONFIG_ATH9K_PCI_NO_EEPROM is not set\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\nCONFIG_ATH9K_HWRNG=y\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\n# CONFIG_CARL9170_HWRNG is not set\nCONFIG_ATH6KL=m\n# CONFIG_ATH6KL_SDIO is not set\nCONFIG_ATH6KL_USB=m\n# CONFIG_ATH6KL_DEBUG is not set\n# CONFIG_ATH6KL_TRACING is not set\nCONFIG_AR5523=m\n# CONFIG_WIL6210 is not set\nCONFIG_ATH10K=m\nCONFIG_ATH10K_CE=y\nCONFIG_ATH10K_PCI=m\n# CONFIG_ATH10K_SDIO is not set\nCONFIG_ATH10K_USB=m\n# CONFIG_ATH10K_DEBUG is not set\n# CONFIG_ATH10K_DEBUGFS is not set\n# CONFIG_ATH10K_TRACING is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\n# CONFIG_ATH11K is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\nCONFIG_ATMEL=m\nCONFIG_PCI_ATMEL=m\n# CONFIG_AT76C50X_USB is not set\nCONFIG_WLAN_VENDOR_BROADCOM=y\n# CONFIG_B43 is not set\n# CONFIG_B43LEGACY is not set\nCONFIG_BRCMUTIL=m\n# CONFIG_BRCMSMAC is not set\nCONFIG_BRCMFMAC=m\nCONFIG_BRCMFMAC_PROTO_BCDC=y\nCONFIG_BRCMFMAC_PROTO_MSGBUF=y\nCONFIG_BRCMFMAC_SDIO=y\nCONFIG_BRCMFMAC_USB=y\nCONFIG_BRCMFMAC_PCIE=y\n# CONFIG_BRCM_TRACING is not set\n# CONFIG_BRCMDBG is not set\nCONFIG_WLAN_VENDOR_CISCO=y\n# CONFIG_AIRO is not set\nCONFIG_WLAN_VENDOR_INTEL=y\nCONFIG_IPW2100=m\nCONFIG_IPW2100_MONITOR=y\n# CONFIG_IPW2100_DEBUG is not set\nCONFIG_IPW2200=m\nCONFIG_IPW2200_MONITOR=y\nCONFIG_IPW2200_RADIOTAP=y\nCONFIG_IPW2200_PROMISCUOUS=y\nCONFIG_IPW2200_QOS=y\n# CONFIG_IPW2200_DEBUG is not set\nCONFIG_LIBIPW=m\n# CONFIG_LIBIPW_DEBUG is not set\nCONFIG_IWLEGACY=m\nCONFIG_IWL4965=m\nCONFIG_IWL3945=m\n\n#\n# iwl3945 / iwl4965 Debugging Options\n#\n# CONFIG_IWLEGACY_DEBUG is not set\n# end of iwl3945 / iwl4965 Debugging Options\n\nCONFIG_IWLWIFI=m\nCONFIG_IWLWIFI_LEDS=y\nCONFIG_IWLDVM=m\nCONFIG_IWLMVM=m\nCONFIG_IWLWIFI_OPMODE_MODULAR=y\n\n#\n# Debugging Options\n#\n# CONFIG_IWLWIFI_DEBUG is not set\nCONFIG_IWLWIFI_DEVICE_TRACING=y\n# end of Debugging Options\n\nCONFIG_WLAN_VENDOR_INTERSIL=y\nCONFIG_HOSTAP=m\nCONFIG_HOSTAP_FIRMWARE=y\nCONFIG_HOSTAP_FIRMWARE_NVRAM=y\n# CONFIG_HOSTAP_PLX is not set\n# CONFIG_HOSTAP_PCI is not set\n# CONFIG_HERMES is not set\nCONFIG_P54_COMMON=m\nCONFIG_P54_USB=m\nCONFIG_P54_PCI=m\nCONFIG_P54_LEDS=y\nCONFIG_WLAN_VENDOR_MARVELL=y\nCONFIG_LIBERTAS=m\n# CONFIG_LIBERTAS_USB is not set\n# CONFIG_LIBERTAS_SDIO is not set\n# CONFIG_LIBERTAS_DEBUG is not set\n# CONFIG_LIBERTAS_MESH is not set\nCONFIG_LIBERTAS_THINFIRM=m\n# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set\nCONFIG_LIBERTAS_THINFIRM_USB=m\nCONFIG_MWIFIEX=m\nCONFIG_MWIFIEX_SDIO=m\n# CONFIG_MWIFIEX_PCIE is not set\nCONFIG_MWIFIEX_USB=m\n# CONFIG_MWL8K is not set\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_MT76_CORE=m\nCONFIG_MT76_LEDS=y\nCONFIG_MT76_USB=m\nCONFIG_MT76x02_LIB=m\nCONFIG_MT76x02_USB=m\nCONFIG_MT76_CONNAC_LIB=m\nCONFIG_MT76x0_COMMON=m\nCONFIG_MT76x0U=m\n# CONFIG_MT76x0E is not set\nCONFIG_MT76x2_COMMON=m\nCONFIG_MT76x2E=m\nCONFIG_MT76x2U=m\nCONFIG_MT7603E=m\nCONFIG_MT7615_COMMON=m\nCONFIG_MT7615E=m\nCONFIG_MT7663_USB_SDIO_COMMON=m\nCONFIG_MT7663U=m\n# CONFIG_MT7663S is not set\nCONFIG_MT7915E=m\n# CONFIG_MT7921E is not set\n# CONFIG_MT7921S is not set\n# CONFIG_MT7921U is not set\nCONFIG_WLAN_VENDOR_MICROCHIP=y\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WLAN_VENDOR_PURELIFI is not set\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\nCONFIG_RT2400PCI=m\nCONFIG_RT2500PCI=m\nCONFIG_RT61PCI=m\nCONFIG_RT2800PCI=m\nCONFIG_RT2800PCI_RT33XX=y\nCONFIG_RT2800PCI_RT35XX=y\nCONFIG_RT2800PCI_RT53XX=y\nCONFIG_RT2800PCI_RT3290=y\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2800_LIB_MMIO=m\nCONFIG_RT2X00_LIB_MMIO=m\nCONFIG_RT2X00_LIB_PCI=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\nCONFIG_RTL8180=m\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=m\nCONFIG_RTL8192CE=m\nCONFIG_RTL8192SE=m\nCONFIG_RTL8192DE=m\nCONFIG_RTL8723AE=m\nCONFIG_RTL8723BE=m\nCONFIG_RTL8188EE=m\nCONFIG_RTL8192EE=m\nCONFIG_RTL8821AE=m\n# CONFIG_RTL8192CU is not set\nCONFIG_RTLWIFI=m\nCONFIG_RTLWIFI_PCI=m\n# CONFIG_RTLWIFI_DEBUG is not set\nCONFIG_RTL8192C_COMMON=m\nCONFIG_RTL8723_COMMON=m\nCONFIG_RTLBTCOEXIST=m\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\nCONFIG_RTW88=m\nCONFIG_RTW88_CORE=m\nCONFIG_RTW88_PCI=m\nCONFIG_RTW88_USB=m\nCONFIG_RTW88_8822B=m\nCONFIG_RTW88_8822C=m\nCONFIG_RTW88_8723D=m\nCONFIG_RTW88_8821C=m\nCONFIG_RTW88_8822BE=m\n# CONFIG_RTW88_8822BS is not set\nCONFIG_RTW88_8822BU=m\nCONFIG_RTW88_8822CE=m\n# CONFIG_RTW88_8822CS is not set\nCONFIG_RTW88_8822CU=m\nCONFIG_RTW88_8723DE=m\nCONFIG_RTW88_8723DU=m\nCONFIG_RTW88_8821CE=m\n# CONFIG_RTW88_8821CS is not set\nCONFIG_RTW88_8821CU=m\n# CONFIG_RTW88_DEBUG is not set\n# CONFIG_RTW88_DEBUGFS is not set\n# CONFIG_RTW89 is not set\nCONFIG_WLAN_VENDOR_RSI=y\n# CONFIG_RSI_91X is not set\n# CONFIG_WLAN_VENDOR_SILABS is not set\nCONFIG_WLAN_VENDOR_ST=y\n# CONFIG_CW1200 is not set\nCONFIG_WLAN_VENDOR_TI=y\n# CONFIG_WL1251 is not set\n# CONFIG_WL12XX is not set\n# CONFIG_WL18XX is not set\n# CONFIG_WLCORE is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\nCONFIG_USB_ZD1201=m\nCONFIG_ZD1211RW=m\n# CONFIG_ZD1211RW_DEBUG is not set\n# CONFIG_WLAN_VENDOR_QUANTENNA is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\n# CONFIG_VMXNET3 is not set\n# CONFIG_FUJITSU_ES is not set\n# CONFIG_NETDEVSIM is not set\nCONFIG_NET_FAILOVER=y\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\n# CONFIG_INPUT_MATRIXKMAP is not set\nCONFIG_INPUT_VIVALDIFMAP=y\n\n#\n# Userland interfaces\n#\nCONFIG_INPUT_MOUSEDEV=y\n# CONFIG_INPUT_MOUSEDEV_PSAUX is not set\nCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024\nCONFIG_INPUT_MOUSEDEV_SCREEN_Y=768\nCONFIG_INPUT_JOYDEV=y\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\nCONFIG_KEYBOARD_ATKBD=y\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\n# CONFIG_KEYBOARD_GPIO is not set\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_PINEPHONE is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CYPRESS_SF is not set\nCONFIG_INPUT_MOUSE=y\nCONFIG_MOUSE_PS2=y\nCONFIG_MOUSE_PS2_ALPS=y\nCONFIG_MOUSE_PS2_BYD=y\nCONFIG_MOUSE_PS2_LOGIPS2PP=y\nCONFIG_MOUSE_PS2_SYNAPTICS=y\nCONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y\nCONFIG_MOUSE_PS2_CYPRESS=y\nCONFIG_MOUSE_PS2_LIFEBOOK=y\nCONFIG_MOUSE_PS2_TRACKPOINT=y\n# CONFIG_MOUSE_PS2_ELANTECH is not set\n# CONFIG_MOUSE_PS2_SENTELIC is not set\n# CONFIG_MOUSE_PS2_TOUCHKIT is not set\n# CONFIG_MOUSE_PS2_FOCALTECH is not set\n# CONFIG_MOUSE_PS2_VMMOUSE is not set\nCONFIG_MOUSE_PS2_SMBUS=y\n# CONFIG_MOUSE_SERIAL is not set\n# CONFIG_MOUSE_APPLETOUCH is not set\n# CONFIG_MOUSE_BCM5974 is not set\n# CONFIG_MOUSE_CYAPA is not set\n# CONFIG_MOUSE_ELAN_I2C is not set\n# CONFIG_MOUSE_VSXXXAA is not set\n# CONFIG_MOUSE_GPIO is not set\n# CONFIG_MOUSE_SYNAPTICS_I2C is not set\n# CONFIG_MOUSE_SYNAPTICS_USB is not set\nCONFIG_INPUT_JOYSTICK=y\n# CONFIG_JOYSTICK_ANALOG is not set\n# CONFIG_JOYSTICK_A3D is not set\n# CONFIG_JOYSTICK_ADI is not set\n# CONFIG_JOYSTICK_COBRA is not set\n# CONFIG_JOYSTICK_GF2K is not set\n# CONFIG_JOYSTICK_GRIP is not set\n# CONFIG_JOYSTICK_GRIP_MP is not set\n# CONFIG_JOYSTICK_GUILLEMOT is not set\n# CONFIG_JOYSTICK_INTERACT is not set\n# CONFIG_JOYSTICK_SIDEWINDER is not set\n# CONFIG_JOYSTICK_TMDC is not set\n# CONFIG_JOYSTICK_IFORCE is not set\n# CONFIG_JOYSTICK_WARRIOR is not set\n# CONFIG_JOYSTICK_MAGELLAN is not set\n# CONFIG_JOYSTICK_SPACEORB is not set\n# CONFIG_JOYSTICK_SPACEBALL is not set\n# CONFIG_JOYSTICK_STINGER is not set\n# CONFIG_JOYSTICK_TWIDJOY is not set\n# CONFIG_JOYSTICK_ZHENHUA is not set\n# CONFIG_JOYSTICK_AS5011 is not set\n# CONFIG_JOYSTICK_JOYDUMP is not set\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\n# CONFIG_JOYSTICK_PXRC is not set\n# CONFIG_JOYSTICK_QWIIC is not set\n# CONFIG_JOYSTICK_FSIA6B is not set\n# CONFIG_JOYSTICK_SENSEHAT is not set\n# CONFIG_INPUT_TABLET is not set\nCONFIG_INPUT_TOUCHSCREEN=y\n# CONFIG_TOUCHSCREEN_AD7879 is not set\n# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set\n# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_BU21013 is not set\n# CONFIG_TOUCHSCREEN_BU21029 is not set\n# CONFIG_TOUCHSCREEN_CHIPONE_ICN8505 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMA140 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set\n# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set\n# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set\n# CONFIG_TOUCHSCREEN_DYNAPRO is not set\n# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set\n# CONFIG_TOUCHSCREEN_EETI is not set\n# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set\n# CONFIG_TOUCHSCREEN_EXC3000 is not set\n# CONFIG_TOUCHSCREEN_FUJITSU is not set\n# CONFIG_TOUCHSCREEN_GOODIX is not set\n# CONFIG_TOUCHSCREEN_HIDEEP is not set\n# CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set\n# CONFIG_TOUCHSCREEN_ILI210X is not set\n# CONFIG_TOUCHSCREEN_ILITEK is not set\n# CONFIG_TOUCHSCREEN_S6SY761 is not set\n# CONFIG_TOUCHSCREEN_GUNZE is not set\n# CONFIG_TOUCHSCREEN_EKTF2127 is not set\nCONFIG_TOUCHSCREEN_ELAN=y\n# CONFIG_TOUCHSCREEN_ELO is not set\n# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set\n# CONFIG_TOUCHSCREEN_WACOM_I2C is not set\n# CONFIG_TOUCHSCREEN_MAX11801 is not set\n# CONFIG_TOUCHSCREEN_MCS5000 is not set\n# CONFIG_TOUCHSCREEN_MMS114 is not set\n# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set\n# CONFIG_TOUCHSCREEN_MSG2638 is not set\n# CONFIG_TOUCHSCREEN_MTOUCH is not set\n# CONFIG_TOUCHSCREEN_IMAGIS is not set\n# CONFIG_TOUCHSCREEN_INEXIO is not set\n# CONFIG_TOUCHSCREEN_MK712 is not set\n# CONFIG_TOUCHSCREEN_PENMOUNT is not set\n# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set\n# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set\n# CONFIG_TOUCHSCREEN_TOUCHWIN is not set\n# CONFIG_TOUCHSCREEN_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set\n# CONFIG_TOUCHSCREEN_WM97XX is not set\nCONFIG_TOUCHSCREEN_USB_COMPOSITE=m\nCONFIG_TOUCHSCREEN_USB_EGALAX=y\n# CONFIG_TOUCHSCREEN_USB_PANJIT is not set\nCONFIG_TOUCHSCREEN_USB_3M=y\n# CONFIG_TOUCHSCREEN_USB_ITM is not set\n# CONFIG_TOUCHSCREEN_USB_ETURBO is not set\n# CONFIG_TOUCHSCREEN_USB_GUNZE is not set\n# CONFIG_TOUCHSCREEN_USB_DMC_TSC10 is not set\n# CONFIG_TOUCHSCREEN_USB_IRTOUCH is not set\n# CONFIG_TOUCHSCREEN_USB_IDEALTEK is not set\n# CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH is not set\n# CONFIG_TOUCHSCREEN_USB_GOTOP is not set\n# CONFIG_TOUCHSCREEN_USB_JASTEC is not set\n# CONFIG_TOUCHSCREEN_USB_ELO is not set\n# CONFIG_TOUCHSCREEN_USB_E2I is not set\n# CONFIG_TOUCHSCREEN_USB_ZYTRONIC is not set\n# CONFIG_TOUCHSCREEN_USB_ETT_TC45USB is not set\n# CONFIG_TOUCHSCREEN_USB_NEXIO is not set\nCONFIG_TOUCHSCREEN_USB_EASYTOUCH=y\n# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set\n# CONFIG_TOUCHSCREEN_TSC_SERIO is not set\n# CONFIG_TOUCHSCREEN_TSC2004 is not set\n# CONFIG_TOUCHSCREEN_TSC2007 is not set\n# CONFIG_TOUCHSCREEN_RM_TS is not set\n# CONFIG_TOUCHSCREEN_SILEAD is not set\n# CONFIG_TOUCHSCREEN_SIS_I2C is not set\nCONFIG_TOUCHSCREEN_ST1232=m\n# CONFIG_TOUCHSCREEN_STMFTS is not set\n# CONFIG_TOUCHSCREEN_SUR40 is not set\n# CONFIG_TOUCHSCREEN_SX8654 is not set\n# CONFIG_TOUCHSCREEN_TPS6507X is not set\n# CONFIG_TOUCHSCREEN_ZET6223 is not set\n# CONFIG_TOUCHSCREEN_ZFORCE is not set\n# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set\n# CONFIG_TOUCHSCREEN_IQS5XX is not set\n# CONFIG_TOUCHSCREEN_ZINITIX is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_APANEL is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\n# CONFIG_INPUT_ATLAS_BTNS is not set\nCONFIG_INPUT_ATI_REMOTE2=m\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_IQS7222 is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_IDEAPAD_SLIDEBAR is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\nCONFIG_RMI4_CORE=y\n# CONFIG_RMI4_I2C is not set\n# CONFIG_RMI4_SMB is not set\nCONFIG_RMI4_F03=y\nCONFIG_RMI4_F03_SERIO=y\nCONFIG_RMI4_2D_SENSOR=y\nCONFIG_RMI4_F11=y\nCONFIG_RMI4_F12=y\nCONFIG_RMI4_F30=y\n# CONFIG_RMI4_F34 is not set\n# CONFIG_RMI4_F3A is not set\n# CONFIG_RMI4_F55 is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y\nCONFIG_SERIO_I8042=y\nCONFIG_SERIO_SERPORT=y\n# CONFIG_SERIO_CT82C710 is not set\n# CONFIG_SERIO_PCIPS2 is not set\nCONFIG_SERIO_LIBPS2=y\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_GPIO_PS2 is not set\n# CONFIG_USERIO is not set\n# CONFIG_GAMEPORT is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_8250=y\n# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set\nCONFIG_SERIAL_8250_PNP=y\n# CONFIG_SERIAL_8250_16550A_VARIANTS is not set\n# CONFIG_SERIAL_8250_FINTEK is not set\n# CONFIG_SERIAL_8250_CONSOLE is not set\nCONFIG_SERIAL_8250_DMA=y\nCONFIG_SERIAL_8250_PCI=y\nCONFIG_SERIAL_8250_EXAR=y\nCONFIG_SERIAL_8250_NR_UARTS=32\nCONFIG_SERIAL_8250_RUNTIME_UARTS=4\nCONFIG_SERIAL_8250_EXTENDED=y\nCONFIG_SERIAL_8250_MANY_PORTS=y\nCONFIG_SERIAL_8250_SHARE_IRQ=y\n# CONFIG_SERIAL_8250_DETECT_IRQ is not set\nCONFIG_SERIAL_8250_RSA=y\nCONFIG_SERIAL_8250_DWLIB=y\nCONFIG_SERIAL_8250_DW=y\n# CONFIG_SERIAL_8250_RT288X is not set\n# CONFIG_SERIAL_8250_LPSS is not set\nCONFIG_SERIAL_8250_MID=y\n# CONFIG_SERIAL_8250_PERICOM is not set\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\n# CONFIG_SERIAL_JSM is not set\n# CONFIG_SERIAL_LANTIQ is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_RP2 is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\nCONFIG_SERIAL_MCTRL_GPIO=y\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NOZOMI is not set\n# CONFIG_NULL_TTY is not set\nCONFIG_HVC_DRIVER=y\nCONFIG_SERIAL_DEV_BUS=y\nCONFIG_SERIAL_DEV_CTRL_TTYPORT=y\n# CONFIG_TTY_PRINTK is not set\nCONFIG_VIRTIO_CONSOLE=y\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=m\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\nCONFIG_HW_RANDOM_INTEL=m\nCONFIG_HW_RANDOM_AMD=m\n# CONFIG_HW_RANDOM_BA431 is not set\n# CONFIG_HW_RANDOM_VIA is not set\nCONFIG_HW_RANDOM_VIRTIO=m\n# CONFIG_HW_RANDOM_XIPHERA is not set\n# CONFIG_APPLICOM is not set\n# CONFIG_MWAVE is not set\nCONFIG_DEVMEM=y\n# CONFIG_NVRAM is not set\nCONFIG_DEVPORT=y\n# CONFIG_HPET is not set\n# CONFIG_HANGCHECK_TIMER is not set\n# CONFIG_TCG_TPM is not set\n# CONFIG_TELCLOCK is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\n# CONFIG_RANDOM_TRUST_CPU is not set\n# CONFIG_RANDOM_TRUST_BOOTLOADER is not set\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_ACPI_I2C_OPREGION=y\nCONFIG_I2C_BOARDINFO=y\n# CONFIG_I2C_COMPAT is not set\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=m\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_MUX_MLXCPLD is not set\n# end of Multiplexer I2C Chip support\n\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_SMBUS=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# PC SMBus host controller drivers\n#\nCONFIG_I2C_CCGX_UCSI=m\n# CONFIG_I2C_ALI1535 is not set\n# CONFIG_I2C_ALI1563 is not set\n# CONFIG_I2C_ALI15X3 is not set\n# CONFIG_I2C_AMD756 is not set\n# CONFIG_I2C_AMD8111 is not set\n# CONFIG_I2C_AMD_MP2 is not set\nCONFIG_I2C_I801=y\nCONFIG_I2C_ISCH=y\n# CONFIG_I2C_ISMT is not set\nCONFIG_I2C_PIIX4=y\nCONFIG_I2C_NFORCE2=y\n# CONFIG_I2C_NFORCE2_S4985 is not set\nCONFIG_I2C_NVIDIA_GPU=m\n# CONFIG_I2C_SIS5595 is not set\n# CONFIG_I2C_SIS630 is not set\n# CONFIG_I2C_SIS96X is not set\nCONFIG_I2C_VIA=y\nCONFIG_I2C_VIAPRO=y\n\n#\n# ACPI drivers\n#\n# CONFIG_I2C_SCMI is not set\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CBUS_GPIO is not set\nCONFIG_I2C_DESIGNWARE_CORE=y\n# CONFIG_I2C_DESIGNWARE_SLAVE is not set\nCONFIG_I2C_DESIGNWARE_PLATFORM=y\n# CONFIG_I2C_DESIGNWARE_AMDPSP is not set\nCONFIG_I2C_DESIGNWARE_BAYTRAIL=y\n# CONFIG_I2C_DESIGNWARE_PCI is not set\n# CONFIG_I2C_EMEV2 is not set\n# CONFIG_I2C_GPIO is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_PCI1XXXX is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_MLXCPLD is not set\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\n# CONFIG_SPI is not set\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\nCONFIG_PTP_1588_CLOCK_KVM=y\n# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set\n# CONFIG_PTP_1588_CLOCK_IDTCM is not set\n# CONFIG_PTP_1588_CLOCK_VMW is not set\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_AMD is not set\n# CONFIG_PINCTRL_CY8C95X0 is not set\n# CONFIG_PINCTRL_MCP23S08 is not set\n# CONFIG_PINCTRL_SX150X is not set\n\n#\n# Intel pinctrl drivers\n#\nCONFIG_PINCTRL_BAYTRAIL=y\nCONFIG_PINCTRL_CHERRYVIEW=y\nCONFIG_PINCTRL_LYNXPOINT=y\nCONFIG_PINCTRL_INTEL=y\n# CONFIG_PINCTRL_ALDERLAKE is not set\nCONFIG_PINCTRL_BROXTON=y\nCONFIG_PINCTRL_CANNONLAKE=y\nCONFIG_PINCTRL_CEDARFORK=y\nCONFIG_PINCTRL_DENVERTON=y\n# CONFIG_PINCTRL_ELKHARTLAKE is not set\nCONFIG_PINCTRL_EMMITSBURG=y\nCONFIG_PINCTRL_GEMINILAKE=y\nCONFIG_PINCTRL_ICELAKE=y\nCONFIG_PINCTRL_JASPERLAKE=y\n# CONFIG_PINCTRL_LAKEFIELD is not set\nCONFIG_PINCTRL_LEWISBURG=y\n# CONFIG_PINCTRL_METEORLAKE is not set\nCONFIG_PINCTRL_SUNRISEPOINT=y\nCONFIG_PINCTRL_TIGERLAKE=y\n# end of Intel pinctrl drivers\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_GPIO_ACPI=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_SYSFS=y\nCONFIG_GPIO_CDEV=y\nCONFIG_GPIO_CDEV_V1=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_AMDPT is not set\n# CONFIG_GPIO_DWAPB is not set\n# CONFIG_GPIO_EXAR is not set\n# CONFIG_GPIO_GENERIC_PLATFORM is not set\n# CONFIG_GPIO_MB86S7X is not set\n# CONFIG_GPIO_VX855 is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# Port-mapped I/O GPIO drivers\n#\n# CONFIG_GPIO_F7188X is not set\n# CONFIG_GPIO_IT87 is not set\n# CONFIG_GPIO_SCH is not set\n# CONFIG_GPIO_SCH311X is not set\n# CONFIG_GPIO_WINBOND is not set\n# CONFIG_GPIO_WS16C48 is not set\n# end of Port-mapped I/O GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\n# CONFIG_GPIO_PCA953X is not set\n# CONFIG_GPIO_PCA9570 is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\n# end of MFD GPIO expanders\n\n#\n# PCI GPIO expanders\n#\n# CONFIG_GPIO_AMD8111 is not set\n# CONFIG_GPIO_ML_IOH is not set\n# CONFIG_GPIO_PCI_IDIO_16 is not set\n# CONFIG_GPIO_PCIE_IDIO_24 is not set\n# CONFIG_GPIO_RDC321X is not set\n# end of PCI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_VIRTIO is not set\n# CONFIG_GPIO_SIM is not set\n# end of Virtual GPIO drivers\n\n# CONFIG_W1 is not set\n# CONFIG_POWER_RESET is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\nCONFIG_POWER_SUPPLY_HWMON=y\n# CONFIG_PDA_POWER is not set\n# CONFIG_IP5XXX_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SAMSUNG_SDI is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\n# CONFIG_CHARGER_MAX77976 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_BD99954 is not set\n# CONFIG_BATTERY_UG3105 is not set\nCONFIG_HWMON=y\nCONFIG_HWMON_VID=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_ABITUGURU is not set\n# CONFIG_SENSORS_ABITUGURU3 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM1177 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_AHT10 is not set\n# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set\n# CONFIG_SENSORS_AS370 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_AXI_FAN_CONTROL is not set\nCONFIG_SENSORS_K8TEMP=m\nCONFIG_SENSORS_K10TEMP=m\nCONFIG_SENSORS_FAM15H_POWER=m\n# CONFIG_SENSORS_APPLESMC is not set\n# CONFIG_SENSORS_ASB100 is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_CORSAIR_CPRO is not set\n# CONFIG_SENSORS_CORSAIR_PSU is not set\n# CONFIG_SENSORS_DRIVETEMP is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_DELL_SMM is not set\n# CONFIG_SENSORS_I5K_AMB is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FSCHMD is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_I5500 is not set\nCONFIG_SENSORS_CORETEMP=y\nCONFIG_SENSORS_IT87=m\nCONFIG_SENSORS_JC42=m\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2947_I2C is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC2992 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX127 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31730 is not set\n# CONFIG_SENSORS_MAX31760 is not set\n# CONFIG_SENSORS_MAX6620 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_TPS23861 is not set\n# CONFIG_SENSORS_MR75203 is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT6775_I2C is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_NZXT_KRAKEN2 is not set\n# CONFIG_SENSORS_NZXT_SMART2 is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\n# CONFIG_SENSORS_SBTSI is not set\n# CONFIG_SENSORS_SBRMI is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHT4x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_SIS5595 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC2305 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_INA238 is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_TMP464 is not set\n# CONFIG_SENSORS_TMP513 is not set\n# CONFIG_SENSORS_VIA_CPUTEMP is not set\n# CONFIG_SENSORS_VIA686A is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_VT8231 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\nCONFIG_SENSORS_W83627EHF=y\n# CONFIG_SENSORS_XGENE is not set\n\n#\n# ACPI drivers\n#\n# CONFIG_SENSORS_ACPI_POWER is not set\nCONFIG_SENSORS_ATK0110=m\n# CONFIG_SENSORS_ASUS_WMI is not set\n# CONFIG_SENSORS_ASUS_EC is not set\nCONFIG_THERMAL=y\nCONFIG_THERMAL_NETLINK=y\nCONFIG_THERMAL_STATISTICS=y\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_WRITABLE_TRIPS=y\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\nCONFIG_THERMAL_GOV_USER_SPACE=y\n# CONFIG_THERMAL_EMULATION is not set\n\n#\n# Intel thermal drivers\n#\nCONFIG_INTEL_POWERCLAMP=m\nCONFIG_X86_THERMAL_VECTOR=y\nCONFIG_X86_PKG_TEMP_THERMAL=m\nCONFIG_INTEL_SOC_DTS_IOSF_CORE=m\nCONFIG_INTEL_SOC_DTS_THERMAL=m\n\n#\n# ACPI INT340X thermal drivers\n#\n# CONFIG_INT340X_THERMAL is not set\n# end of ACPI INT340X thermal drivers\n\n# CONFIG_INTEL_PCH_THERMAL is not set\n# CONFIG_INTEL_TCC_COOLING is not set\n# CONFIG_INTEL_MENLOW is not set\nCONFIG_INTEL_HFI_THERMAL=y\n# end of Intel thermal drivers\n\n# CONFIG_WATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\nCONFIG_SSB=y\nCONFIG_SSB_SPROM=y\nCONFIG_SSB_PCIHOST_POSSIBLE=y\nCONFIG_SSB_PCIHOST=y\nCONFIG_SSB_SDIOHOST_POSSIBLE=y\nCONFIG_SSB_SDIOHOST=y\nCONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y\nCONFIG_SSB_DRIVER_PCICORE=y\n# CONFIG_SSB_DRIVER_GPIO is not set\nCONFIG_BCMA_POSSIBLE=y\nCONFIG_BCMA=m\nCONFIG_BCMA_HOST_PCI_POSSIBLE=y\nCONFIG_BCMA_HOST_PCI=y\n# CONFIG_BCMA_HOST_SOC is not set\nCONFIG_BCMA_DRIVER_PCI=y\nCONFIG_BCMA_DRIVER_GMAC_CMN=y\n# CONFIG_BCMA_DRIVER_GPIO is not set\n# CONFIG_BCMA_DEBUG is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AXP20X_I2C is not set\n# CONFIG_MFD_MADERA is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_MP2629 is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_MFD_INTEL_QUARK_I2C_GPIO is not set\n# CONFIG_LPC_ICH is not set\nCONFIG_LPC_SCH=y\n# CONFIG_INTEL_SOC_PMIC is not set\n# CONFIG_INTEL_SOC_PMIC_CHTWC is not set\n# CONFIG_INTEL_SOC_PMIC_CHTDC_TI is not set\nCONFIG_MFD_INTEL_LPSS=y\nCONFIG_MFD_INTEL_LPSS_ACPI=y\nCONFIG_MFD_INTEL_LPSS_PCI=y\n# CONFIG_MFD_INTEL_PMC_BXT is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_JANZ_CMODIO is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6370 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_UCB1400_CORE is not set\n# CONFIG_MFD_SY7636A is not set\n# CONFIG_MFD_RDC321X is not set\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RT5120 is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_SYSCON is not set\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\nCONFIG_MFD_WL1273_CORE=m\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_VX855 is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_MFD_ATC260X_I2C is not set\n# CONFIG_RAVE_SP_CORE is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\n# CONFIG_REGULATOR_FIXED_VOLTAGE is not set\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\n# CONFIG_REGULATOR_GPIO is not set\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX20086 is not set\n# CONFIG_REGULATOR_MAX77826 is not set\n# CONFIG_REGULATOR_MP8859 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT5190A is not set\n# CONFIG_REGULATOR_RT5759 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\n# CONFIG_REGULATOR_SLG51000 is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\nCONFIG_RC_CORE=y\nCONFIG_BPF_LIRC_MODE2=y\nCONFIG_LIRC=y\nCONFIG_RC_MAP=m\nCONFIG_RC_DECODERS=y\nCONFIG_IR_IMON_DECODER=m\nCONFIG_IR_JVC_DECODER=m\nCONFIG_IR_MCE_KBD_DECODER=m\nCONFIG_IR_NEC_DECODER=m\nCONFIG_IR_RC5_DECODER=m\nCONFIG_IR_RC6_DECODER=m\nCONFIG_IR_RCMM_DECODER=m\nCONFIG_IR_SANYO_DECODER=m\nCONFIG_IR_SHARP_DECODER=m\nCONFIG_IR_SONY_DECODER=m\nCONFIG_IR_XMP_DECODER=m\nCONFIG_RC_DEVICES=y\nCONFIG_IR_ENE=m\nCONFIG_IR_FINTEK=m\nCONFIG_IR_IGORPLUGUSB=m\nCONFIG_IR_IGUANA=m\nCONFIG_IR_IMON=m\nCONFIG_IR_IMON_RAW=m\nCONFIG_IR_ITE_CIR=m\nCONFIG_IR_MCEUSB=m\nCONFIG_IR_NUVOTON=m\nCONFIG_IR_REDRAT3=m\nCONFIG_IR_SERIAL=m\nCONFIG_IR_SERIAL_TRANSMITTER=y\nCONFIG_IR_STREAMZAP=m\nCONFIG_IR_TOY=m\nCONFIG_IR_TTUSBIR=m\nCONFIG_IR_WINBOND_CIR=m\nCONFIG_RC_ATI_REMOTE=m\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_RC_XBOX_DVD=m\nCONFIG_CEC_CORE=y\n\n#\n# CEC support\n#\n# CONFIG_MEDIA_CEC_RC is not set\n# CONFIG_MEDIA_CEC_SUPPORT is not set\n# end of CEC support\n\nCONFIG_MEDIA_SUPPORT=m\n# CONFIG_MEDIA_SUPPORT_FILTER is not set\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\nCONFIG_MEDIA_RADIO_SUPPORT=y\nCONFIG_MEDIA_SDR_SUPPORT=y\nCONFIG_MEDIA_PLATFORM_SUPPORT=y\nCONFIG_MEDIA_TEST_SUPPORT=y\n# end of Media device types\n\n#\n# Media core support\n#\nCONFIG_VIDEO_DEV=m\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_DVB_CORE=m\n# end of Media core support\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2_I2C=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_VIDEO_TUNER=m\n# CONFIG_V4L2_FLASH_LED_CLASS is not set\nCONFIG_V4L2_FWNODE=m\nCONFIG_V4L2_ASYNC=m\nCONFIG_VIDEOBUF_GEN=m\nCONFIG_VIDEOBUF_DMA_SG=m\nCONFIG_VIDEOBUF_VMALLOC=m\n# end of Video4Linux options\n\n#\n# Media controller options\n#\nCONFIG_MEDIA_CONTROLLER_DVB=y\n# end of Media controller options\n\n#\n# Digital TV options\n#\n# CONFIG_DVB_MMAP is not set\nCONFIG_DVB_NET=y\nCONFIG_DVB_MAX_ADAPTERS=64\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set\n# CONFIG_DVB_ULE_DEBUG is not set\n# end of Digital TV options\n\n#\n# Media drivers\n#\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_USB_S2255 is not set\nCONFIG_VIDEO_USBTV=m\nCONFIG_USB_VIDEO_CLASS=m\n# CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV is not set\n\n#\n# Analog TV USB devices\n#\n# CONFIG_VIDEO_GO7007 is not set\nCONFIG_VIDEO_HDPVR=m\nCONFIG_VIDEO_PVRUSB2=m\nCONFIG_VIDEO_PVRUSB2_SYSFS=y\nCONFIG_VIDEO_PVRUSB2_DVB=y\n# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set\nCONFIG_VIDEO_STK1160_COMMON=m\nCONFIG_VIDEO_STK1160=m\n\n#\n# Analog/digital TV USB devices\n#\nCONFIG_VIDEO_AU0828=m\nCONFIG_VIDEO_AU0828_V4L2=y\nCONFIG_VIDEO_AU0828_RC=y\nCONFIG_VIDEO_CX231XX=m\nCONFIG_VIDEO_CX231XX_RC=y\n# CONFIG_VIDEO_CX231XX_ALSA is not set\nCONFIG_VIDEO_CX231XX_DVB=m\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_AS102=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\n# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_DVBSKY=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_DVB_USB_ZD1301=m\nCONFIG_DVB_USB=m\n# CONFIG_DVB_USB_DEBUG is not set\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_CXUSB=m\n# CONFIG_DVB_USB_CXUSB_ANALOG is not set\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_DIB3000MC=m\nCONFIG_DVB_USB_DIBUSB_MB=m\nCONFIG_DVB_USB_DIBUSB_MB_FAULTY=y\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_DTT200U=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_OPERA1=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_SMS_USB_DRV=m\nCONFIG_DVB_TTUSB_BUDGET=m\nCONFIG_DVB_TTUSB_DEC=m\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\nCONFIG_VIDEO_EM28XX=m\n# CONFIG_VIDEO_EM28XX_V4L2 is not set\n# CONFIG_VIDEO_EM28XX_ALSA is not set\nCONFIG_VIDEO_EM28XX_DVB=m\nCONFIG_VIDEO_EM28XX_RC=m\n\n#\n# Software defined radio USB devices\n#\n# CONFIG_USB_AIRSPY is not set\n# CONFIG_USB_HACKRF is not set\nCONFIG_MEDIA_PCI_SUPPORT=y\n\n#\n# Media capture support\n#\n# CONFIG_VIDEO_SOLO6X10 is not set\n# CONFIG_VIDEO_TW5864 is not set\n# CONFIG_VIDEO_TW68 is not set\n# CONFIG_VIDEO_TW686X is not set\n# CONFIG_VIDEO_ZORAN is not set\n\n#\n# Media capture/analog TV support\n#\n# CONFIG_VIDEO_DT3155 is not set\n# CONFIG_VIDEO_IVTV is not set\n\n#\n# Media capture/analog/hybrid TV support\n#\nCONFIG_VIDEO_BT848=m\nCONFIG_DVB_BT8XX=m\nCONFIG_VIDEO_CX18=m\n# CONFIG_VIDEO_CX18_ALSA is not set\nCONFIG_VIDEO_CX23885=m\nCONFIG_MEDIA_ALTERA_CI=m\nCONFIG_VIDEO_CX25821=m\n# CONFIG_VIDEO_CX25821_ALSA is not set\nCONFIG_VIDEO_CX88=m\n# CONFIG_VIDEO_CX88_ALSA is not set\n# CONFIG_VIDEO_CX88_BLACKBIRD is not set\nCONFIG_VIDEO_CX88_DVB=m\nCONFIG_VIDEO_CX88_ENABLE_VP3054=y\nCONFIG_VIDEO_CX88_VP3054=m\nCONFIG_VIDEO_CX88_MPEG=m\nCONFIG_VIDEO_SAA7134=m\n# CONFIG_VIDEO_SAA7134_ALSA is not set\nCONFIG_VIDEO_SAA7134_RC=y\nCONFIG_VIDEO_SAA7134_DVB=m\nCONFIG_VIDEO_SAA7164=m\n\n#\n# Media digital TV PCI Adapters\n#\nCONFIG_DVB_B2C2_FLEXCOP_PCI=m\n# CONFIG_DVB_B2C2_FLEXCOP_PCI_DEBUG is not set\nCONFIG_DVB_DDBRIDGE=m\n# CONFIG_DVB_DDBRIDGE_MSIENABLE is not set\nCONFIG_DVB_DM1105=m\nCONFIG_MANTIS_CORE=m\nCONFIG_DVB_MANTIS=m\nCONFIG_DVB_HOPPER=m\nCONFIG_DVB_NGENE=m\n# CONFIG_DVB_PLUTO2 is not set\nCONFIG_DVB_PT1=m\nCONFIG_DVB_PT3=m\nCONFIG_DVB_SMIPCIE=m\nCONFIG_VIDEO_IPU3_CIO2=m\n# CONFIG_CIO2_BRIDGE is not set\nCONFIG_RADIO_ADAPTERS=m\nCONFIG_RADIO_MAXIRADIO=m\nCONFIG_RADIO_SAA7706H=m\nCONFIG_RADIO_SHARK=m\nCONFIG_RADIO_SHARK2=m\nCONFIG_RADIO_SI4713=m\nCONFIG_RADIO_TEA575X=m\nCONFIG_RADIO_TEA5764=m\nCONFIG_RADIO_TEF6862=m\nCONFIG_RADIO_WL1273=m\nCONFIG_USB_DSBR=m\nCONFIG_USB_KEENE=m\nCONFIG_USB_MA901=m\nCONFIG_USB_MR800=m\nCONFIG_USB_RAREMONO=m\nCONFIG_RADIO_SI470X=m\nCONFIG_USB_SI470X=m\nCONFIG_I2C_SI470X=m\nCONFIG_USB_SI4713=m\nCONFIG_PLATFORM_SI4713=m\nCONFIG_I2C_SI4713=m\nCONFIG_MEDIA_PLATFORM_DRIVERS=y\n# CONFIG_V4L_PLATFORM_DRIVERS is not set\n# CONFIG_SDR_PLATFORM_DRIVERS is not set\n# CONFIG_DVB_PLATFORM_DRIVERS is not set\n# CONFIG_V4L_MEM2MEM_DRIVERS is not set\n\n#\n# Allegro DVT media platform drivers\n#\n\n#\n# Amlogic media platform drivers\n#\n\n#\n# Amphion drivers\n#\n\n#\n# Aspeed media platform drivers\n#\n\n#\n# Atmel media platform drivers\n#\n\n#\n# Cadence media platform drivers\n#\n# CONFIG_VIDEO_CADENCE_CSI2RX is not set\n# CONFIG_VIDEO_CADENCE_CSI2TX is not set\n\n#\n# Chips&Media media platform drivers\n#\n\n#\n# Intel media platform drivers\n#\n\n#\n# Marvell media platform drivers\n#\n\n#\n# Mediatek media platform drivers\n#\n\n#\n# NVidia media platform drivers\n#\n\n#\n# NXP media platform drivers\n#\n\n#\n# Qualcomm media platform drivers\n#\n\n#\n# Renesas media platform drivers\n#\n\n#\n# Rockchip media platform drivers\n#\n\n#\n# Samsung media platform drivers\n#\n\n#\n# STMicroelectronics media platform drivers\n#\n\n#\n# Sunxi media platform drivers\n#\n\n#\n# Texas Instruments drivers\n#\n\n#\n# Verisilicon media platform drivers\n#\n\n#\n# VIA media platform drivers\n#\n\n#\n# Xilinx media platform drivers\n#\n\n#\n# MMC/SDIO DVB adapters\n#\nCONFIG_SMS_SDIO_DRV=m\n# CONFIG_V4L_TEST_DRIVERS is not set\n# CONFIG_DVB_TEST_DRIVERS is not set\n\n#\n# FireWire (IEEE 1394) Adapters\n#\nCONFIG_DVB_FIREDTV=m\nCONFIG_DVB_FIREDTV_INPUT=y\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_TTPCI_EEPROM=m\nCONFIG_VIDEO_CX2341X=m\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\n# CONFIG_SMS_SIANO_DEBUGFS is not set\nCONFIG_VIDEOBUF2_CORE=m\nCONFIG_VIDEOBUF2_V4L2=m\nCONFIG_VIDEOBUF2_MEMOPS=m\nCONFIG_VIDEOBUF2_VMALLOC=m\nCONFIG_VIDEOBUF2_DMA_SG=m\nCONFIG_VIDEOBUF2_DVB=m\n# end of Media drivers\n\n#\n# Media ancillary drivers\n#\nCONFIG_MEDIA_ATTACH=y\n\n#\n# IR I2C driver auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_IR_I2C=m\nCONFIG_VIDEO_CAMERA_SENSOR=y\n# CONFIG_VIDEO_AR0521 is not set\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_HI846 is not set\n# CONFIG_VIDEO_HI847 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\n# CONFIG_VIDEO_MT9V011 is not set\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_OG01A1B is not set\n# CONFIG_VIDEO_OV02A10 is not set\n# CONFIG_VIDEO_OV08D10 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\n# CONFIG_VIDEO_OV2640 is not set\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV2740 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5693 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV7251 is not set\n# CONFIG_VIDEO_OV7640 is not set\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_OV9734 is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# Audio decoders, processors and mixers\n#\nCONFIG_VIDEO_CS3308=m\nCONFIG_VIDEO_CS5345=m\nCONFIG_VIDEO_CS53L32A=m\nCONFIG_VIDEO_MSP3400=m\n# CONFIG_VIDEO_SONY_BTF_MPX is not set\n# CONFIG_VIDEO_TDA1997X is not set\nCONFIG_VIDEO_TDA7432=m\n# CONFIG_VIDEO_TDA9840 is not set\n# CONFIG_VIDEO_TEA6415C is not set\n# CONFIG_VIDEO_TEA6420 is not set\n# CONFIG_VIDEO_TLV320AIC23B is not set\nCONFIG_VIDEO_TVAUDIO=m\n# CONFIG_VIDEO_UDA1342 is not set\n# CONFIG_VIDEO_VP27SMPX is not set\n# CONFIG_VIDEO_WM8739 is not set\nCONFIG_VIDEO_WM8775=m\n# end of Audio decoders, processors and mixers\n\n#\n# RDS decoders\n#\nCONFIG_VIDEO_SAA6588=m\n# end of RDS decoders\n\n#\n# Video decoders\n#\nCONFIG_VIDEO_ADV7180=m\n# CONFIG_VIDEO_ADV7183 is not set\n# CONFIG_VIDEO_ADV7604 is not set\n# CONFIG_VIDEO_ADV7842 is not set\n# CONFIG_VIDEO_BT819 is not set\n# CONFIG_VIDEO_BT856 is not set\n# CONFIG_VIDEO_BT866 is not set\n# CONFIG_VIDEO_KS0127 is not set\n# CONFIG_VIDEO_ML86V7667 is not set\n# CONFIG_VIDEO_SAA7110 is not set\nCONFIG_VIDEO_SAA711X=m\n# CONFIG_VIDEO_TC358743 is not set\n# CONFIG_VIDEO_TVP514X is not set\n# CONFIG_VIDEO_TVP5150 is not set\n# CONFIG_VIDEO_TVP7002 is not set\n# CONFIG_VIDEO_TW2804 is not set\n# CONFIG_VIDEO_TW9903 is not set\n# CONFIG_VIDEO_TW9906 is not set\n# CONFIG_VIDEO_TW9910 is not set\n# CONFIG_VIDEO_VPX3220 is not set\n\n#\n# Video and audio decoders\n#\n# CONFIG_VIDEO_SAA717X is not set\nCONFIG_VIDEO_CX25840=m\n# end of Video decoders\n\n#\n# Video encoders\n#\n# CONFIG_VIDEO_AD9389B is not set\n# CONFIG_VIDEO_ADV7170 is not set\n# CONFIG_VIDEO_ADV7175 is not set\n# CONFIG_VIDEO_ADV7343 is not set\n# CONFIG_VIDEO_ADV7393 is not set\n# CONFIG_VIDEO_ADV7511 is not set\n# CONFIG_VIDEO_AK881X is not set\n# CONFIG_VIDEO_SAA7127 is not set\n# CONFIG_VIDEO_SAA7185 is not set\n# CONFIG_VIDEO_THS8200 is not set\n# end of Video encoders\n\n#\n# Video improvement chips\n#\n# CONFIG_VIDEO_UPD64031A is not set\n# CONFIG_VIDEO_UPD64083 is not set\n# end of Video improvement chips\n\n#\n# Audio/Video compression chips\n#\nCONFIG_VIDEO_SAA6752HS=m\n# end of Audio/Video compression chips\n\n#\n# SDR tuner chips\n#\nCONFIG_SDR_MAX2175=m\n# end of SDR tuner chips\n\n#\n# Miscellaneous helper chips\n#\n# CONFIG_VIDEO_I2C is not set\n# CONFIG_VIDEO_M52790 is not set\n# CONFIG_VIDEO_ST_MIPID02 is not set\n# CONFIG_VIDEO_THS7303 is not set\n# end of Miscellaneous helper chips\n\nCONFIG_MEDIA_TUNER=m\n\n#\n# Customize TV tuners\n#\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_IT913X=m\nCONFIG_MEDIA_TUNER_M88RS6000T=m\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_MC44S803=m\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT20XX=m\nCONFIG_MEDIA_TUNER_MT2131=m\nCONFIG_MEDIA_TUNER_MT2266=m\nCONFIG_MEDIA_TUNER_MXL301RF=m\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\nCONFIG_MEDIA_TUNER_QM1D1B0004=m\nCONFIG_MEDIA_TUNER_QM1D1C0042=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_R820T=m\nCONFIG_MEDIA_TUNER_SI2157=m\nCONFIG_MEDIA_TUNER_SIMPLE=m\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_TDA18250=m\nCONFIG_MEDIA_TUNER_TDA18271=m\nCONFIG_MEDIA_TUNER_TDA827X=m\nCONFIG_MEDIA_TUNER_TDA8290=m\nCONFIG_MEDIA_TUNER_TDA9887=m\nCONFIG_MEDIA_TUNER_TEA5761=m\nCONFIG_MEDIA_TUNER_TEA5767=m\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_XC2028=m\nCONFIG_MEDIA_TUNER_XC4000=m\nCONFIG_MEDIA_TUNER_XC5000=m\n# end of Customize TV tuners\n\n#\n# Customise DVB Frontends\n#\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_M88DS3103=m\nCONFIG_DVB_MXL5XX=m\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\nCONFIG_DVB_STV0910=m\nCONFIG_DVB_STV6110x=m\nCONFIG_DVB_STV6111=m\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_MN88472=m\nCONFIG_DVB_MN88473=m\nCONFIG_DVB_SI2165=m\nCONFIG_DVB_TDA18271C2DD=m\n\n#\n# DVB-S (satellite) frontends\n#\nCONFIG_DVB_CX24110=m\nCONFIG_DVB_CX24116=m\nCONFIG_DVB_CX24117=m\nCONFIG_DVB_CX24120=m\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_DS3000=m\nCONFIG_DVB_MB86A16=m\nCONFIG_DVB_MT312=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_TDA10071=m\nCONFIG_DVB_TDA10086=m\nCONFIG_DVB_TDA8083=m\nCONFIG_DVB_TDA8261=m\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_TS2020=m\nCONFIG_DVB_TUA6100=m\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TUNER_ITD1000=m\nCONFIG_DVB_VES1X93=m\nCONFIG_DVB_ZL10036=m\nCONFIG_DVB_ZL10039=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_AS102_FE=m\nCONFIG_DVB_CX22700=m\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_CXD2841ER=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\n# CONFIG_DVB_DIB9000 is not set\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_GP8PSK_FE=m\nCONFIG_DVB_L64781=m\nCONFIG_DVB_MT352=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\nCONFIG_DVB_RTL2832_SDR=m\n# CONFIG_DVB_S5H1432 is not set\nCONFIG_DVB_SI2168=m\nCONFIG_DVB_SP887X=m\nCONFIG_DVB_STV0367=m\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_ZD1301_DEMOD=m\nCONFIG_DVB_ZL10353=m\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_STV0297=m\nCONFIG_DVB_TDA10021=m\nCONFIG_DVB_TDA10023=m\nCONFIG_DVB_VES1820=m\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_AU8522=m\nCONFIG_DVB_AU8522_DTV=m\nCONFIG_DVB_AU8522_V4L=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LGDT3306A=m\nCONFIG_DVB_LGDT330X=m\nCONFIG_DVB_MXL692=m\nCONFIG_DVB_NXT200X=m\nCONFIG_DVB_OR51132=m\nCONFIG_DVB_OR51211=m\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_S5H1411=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\nCONFIG_DVB_S921=m\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\n# CONFIG_DVB_MN88443X is not set\nCONFIG_DVB_TC90522=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_A8293=m\nCONFIG_DVB_AF9033=m\n# CONFIG_DVB_ASCOT2E is not set\nCONFIG_DVB_ATBM8830=m\n# CONFIG_DVB_HELENE is not set\n# CONFIG_DVB_HORUS3A is not set\nCONFIG_DVB_ISL6405=m\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_IX2505V=m\n# CONFIG_DVB_LGS8GL5 is not set\nCONFIG_DVB_LGS8GXX=m\nCONFIG_DVB_LNBH25=m\n# CONFIG_DVB_LNBH29 is not set\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_M88RS2000=m\nCONFIG_DVB_TDA665x=m\nCONFIG_DVB_DRX39XYJ=m\n\n#\n# Common Interface (EN50221) controller drivers\n#\nCONFIG_DVB_CXD2099=m\nCONFIG_DVB_SP2=m\n# end of Customise DVB Frontends\n\n#\n# Tools to develop new frontends\n#\nCONFIG_DVB_DUMMY_FE=m\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\nCONFIG_APERTURE_HELPERS=y\nCONFIG_AGP=y\n# CONFIG_AGP_AMD64 is not set\nCONFIG_AGP_INTEL=y\n# CONFIG_AGP_SIS is not set\nCONFIG_AGP_VIA=y\nCONFIG_INTEL_GTT=y\nCONFIG_VGA_SWITCHEROO=y\nCONFIG_DRM=y\nCONFIG_DRM_MIPI_DSI=y\n# CONFIG_DRM_DEBUG_MM is not set\nCONFIG_DRM_KMS_HELPER=y\n# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set\n# CONFIG_DRM_DEBUG_MODESET_LOCK is not set\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\n# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\nCONFIG_DRM_DISPLAY_HELPER=y\nCONFIG_DRM_DISPLAY_DP_HELPER=y\nCONFIG_DRM_DISPLAY_HDCP_HELPER=y\nCONFIG_DRM_DISPLAY_HDMI_HELPER=y\nCONFIG_DRM_DP_AUX_CHARDEV=y\nCONFIG_DRM_DP_CEC=y\nCONFIG_DRM_TTM=y\nCONFIG_DRM_BUDDY=y\nCONFIG_DRM_TTM_HELPER=y\nCONFIG_DRM_GEM_SHMEM_HELPER=y\nCONFIG_DRM_SCHED=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# end of ARM devices\n\nCONFIG_DRM_RADEON=y\n# CONFIG_DRM_RADEON_USERPTR is not set\nCONFIG_DRM_AMDGPU=y\nCONFIG_DRM_AMDGPU_SI=y\nCONFIG_DRM_AMDGPU_CIK=y\nCONFIG_DRM_AMDGPU_USERPTR=y\n\n#\n# ACP (Audio CoProcessor) Configuration\n#\nCONFIG_DRM_AMD_ACP=y\n# end of ACP (Audio CoProcessor) Configuration\n\n#\n# Display Engine Configuration\n#\nCONFIG_DRM_AMD_DC=y\nCONFIG_DRM_AMD_DC_DCN=y\n# CONFIG_DRM_AMD_DC_HDCP is not set\n# CONFIG_DRM_AMD_DC_SI is not set\n# CONFIG_DRM_AMD_SECURE_DISPLAY is not set\n# end of Display Engine Configuration\n\nCONFIG_HSA_AMD=y\n# CONFIG_DRM_NOUVEAU is not set\nCONFIG_DRM_I915=y\nCONFIG_DRM_I915_FORCE_PROBE=\"\"\nCONFIG_DRM_I915_CAPTURE_ERROR=y\nCONFIG_DRM_I915_COMPRESS_ERROR=y\nCONFIG_DRM_I915_USERPTR=y\n\n#\n# drm/i915 Debugging\n#\n# CONFIG_DRM_I915_WERROR is not set\n# CONFIG_DRM_I915_DEBUG is not set\n# CONFIG_DRM_I915_DEBUG_MMIO is not set\n# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set\n# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set\n# CONFIG_DRM_I915_DEBUG_GUC is not set\n# CONFIG_DRM_I915_SELFTEST is not set\n# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set\n# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set\n# CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set\n# end of drm/i915 Debugging\n\n#\n# drm/i915 Profile Guided Optimisation\n#\nCONFIG_DRM_I915_REQUEST_TIMEOUT=20000\nCONFIG_DRM_I915_FENCE_TIMEOUT=10000\nCONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250\nCONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500\nCONFIG_DRM_I915_PREEMPT_TIMEOUT=640\nCONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000\nCONFIG_DRM_I915_STOP_TIMEOUT=100\nCONFIG_DRM_I915_TIMESLICE_DURATION=1\n# end of drm/i915 Profile Guided Optimisation\n\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\nCONFIG_DRM_VMWGFX=y\nCONFIG_DRM_VMWGFX_FBCON=y\n# CONFIG_DRM_VMWGFX_MKSSTATS is not set\n# CONFIG_DRM_GMA500 is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_AST is not set\n# CONFIG_DRM_MGAG200 is not set\n# CONFIG_DRM_QXL is not set\nCONFIG_DRM_VIRTIO_GPU=y\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# end of Display Interface Bridges\n\n# CONFIG_DRM_ETNAVIV is not set\n# CONFIG_DRM_BOCHS is not set\n# CONFIG_DRM_CIRRUS_QEMU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_DRM_VBOXVIDEO is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_SSD130X is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_DRM_NOMODESET=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\nCONFIG_FB_MODE_HELPERS=y\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_CIRRUS is not set\n# CONFIG_FB_PM2 is not set\n# CONFIG_FB_CYBER2000 is not set\n# CONFIG_FB_ARC is not set\n# CONFIG_FB_ASILIANT is not set\n# CONFIG_FB_IMSTT is not set\n# CONFIG_FB_VGA16 is not set\n# CONFIG_FB_UVESA is not set\n# CONFIG_FB_VESA is not set\nCONFIG_FB_EFI=y\n# CONFIG_FB_N411 is not set\n# CONFIG_FB_HGA is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_NVIDIA is not set\n# CONFIG_FB_RIVA is not set\n# CONFIG_FB_I740 is not set\n# CONFIG_FB_LE80578 is not set\n# CONFIG_FB_MATROX is not set\n# CONFIG_FB_RADEON is not set\n# CONFIG_FB_ATY128 is not set\n# CONFIG_FB_ATY is not set\n# CONFIG_FB_S3 is not set\n# CONFIG_FB_SAVAGE is not set\n# CONFIG_FB_SIS is not set\n# CONFIG_FB_VIA is not set\n# CONFIG_FB_NEOMAGIC is not set\n# CONFIG_FB_KYRO is not set\n# CONFIG_FB_3DFX is not set\n# CONFIG_FB_VOODOO1 is not set\n# CONFIG_FB_VT8623 is not set\n# CONFIG_FB_TRIDENT is not set\n# CONFIG_FB_ARK is not set\n# CONFIG_FB_PM3 is not set\n# CONFIG_FB_CARMINE is not set\n# CONFIG_FB_SMSCUFX is not set\nCONFIG_FB_UDL=m\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_MB862XX is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# CONFIG_FB_SM712 is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\n# CONFIG_LCD_CLASS_DEVICE is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\n# CONFIG_BACKLIGHT_KTD253 is not set\n# CONFIG_BACKLIGHT_APPLE is not set\n# CONFIG_BACKLIGHT_QCOM_WLED is not set\n# CONFIG_BACKLIGHT_SAHARA is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_GPIO is not set\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n# end of Backlight & LCD device support\n\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_VGA_CONSOLE=y\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_DUMMY_CONSOLE_COLUMNS=80\nCONFIG_DUMMY_CONSOLE_ROWS=25\nCONFIG_FRAMEBUFFER_CONSOLE=y\n# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\n# end of Console display driver support\n\n# CONFIG_LOGO is not set\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_HWDEP=m\nCONFIG_SND_RAWMIDI=m\nCONFIG_SND_COMPRESS_OFFLOAD=y\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\nCONFIG_SND_HRTIMER=y\nCONFIG_SND_DYNAMIC_MINORS=y\nCONFIG_SND_MAX_CARDS=32\n# CONFIG_SND_SUPPORT_OLD_API is not set\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_CTL_INPUT_VALIDATION is not set\nCONFIG_SND_VMASTER=y\nCONFIG_SND_DMA_SGBUF=y\nCONFIG_SND_CTL_LED=m\n# CONFIG_SND_SEQUENCER is not set\nCONFIG_SND_MPU401_UART=m\nCONFIG_SND_OPL3_LIB=m\nCONFIG_SND_AC97_CODEC=m\nCONFIG_SND_DRIVERS=y\n# CONFIG_SND_DUMMY is not set\n# CONFIG_SND_ALOOP is not set\n# CONFIG_SND_MTPAV is not set\n# CONFIG_SND_SERIAL_U16550 is not set\n# CONFIG_SND_MPU401 is not set\n# CONFIG_SND_AC97_POWER_SAVE is not set\nCONFIG_SND_PCI=y\n# CONFIG_SND_AD1889 is not set\n# CONFIG_SND_ALS300 is not set\n# CONFIG_SND_ALS4000 is not set\n# CONFIG_SND_ALI5451 is not set\n# CONFIG_SND_ASIHPI is not set\nCONFIG_SND_ATIIXP=m\n# CONFIG_SND_ATIIXP_MODEM is not set\n# CONFIG_SND_AU8810 is not set\n# CONFIG_SND_AU8820 is not set\n# CONFIG_SND_AU8830 is not set\n# CONFIG_SND_AW2 is not set\n# CONFIG_SND_AZT3328 is not set\n# CONFIG_SND_BT87X is not set\nCONFIG_SND_CA0106=m\nCONFIG_SND_CMIPCI=m\nCONFIG_SND_OXYGEN_LIB=m\nCONFIG_SND_OXYGEN=m\n# CONFIG_SND_CS4281 is not set\n# CONFIG_SND_CS46XX is not set\nCONFIG_SND_CTXFI=m\n# CONFIG_SND_DARLA20 is not set\n# CONFIG_SND_GINA20 is not set\n# CONFIG_SND_LAYLA20 is not set\n# CONFIG_SND_DARLA24 is not set\n# CONFIG_SND_GINA24 is not set\nCONFIG_SND_LAYLA24=m\n# CONFIG_SND_MONA is not set\n# CONFIG_SND_MIA is not set\n# CONFIG_SND_ECHO3G is not set\n# CONFIG_SND_INDIGO is not set\n# CONFIG_SND_INDIGOIO is not set\n# CONFIG_SND_INDIGODJ is not set\n# CONFIG_SND_INDIGOIOX is not set\n# CONFIG_SND_INDIGODJX is not set\nCONFIG_SND_EMU10K1=m\nCONFIG_SND_EMU10K1X=m\n# CONFIG_SND_ENS1370 is not set\n# CONFIG_SND_ENS1371 is not set\n# CONFIG_SND_ES1938 is not set\n# CONFIG_SND_ES1968 is not set\n# CONFIG_SND_FM801 is not set\n# CONFIG_SND_HDSP is not set\n# CONFIG_SND_HDSPM is not set\nCONFIG_SND_ICE1712=m\nCONFIG_SND_ICE1724=m\nCONFIG_SND_INTEL8X0=m\n# CONFIG_SND_INTEL8X0M is not set\n# CONFIG_SND_KORG1212 is not set\n# CONFIG_SND_LOLA is not set\n# CONFIG_SND_LX6464ES is not set\n# CONFIG_SND_MAESTRO3 is not set\n# CONFIG_SND_MIXART is not set\n# CONFIG_SND_NM256 is not set\n# CONFIG_SND_PCXHR is not set\n# CONFIG_SND_RIPTIDE is not set\n# CONFIG_SND_RME32 is not set\n# CONFIG_SND_RME96 is not set\nCONFIG_SND_RME9652=m\n# CONFIG_SND_SONICVIBES is not set\n# CONFIG_SND_TRIDENT is not set\nCONFIG_SND_VIA82XX=m\n# CONFIG_SND_VIA82XX_MODEM is not set\nCONFIG_SND_VIRTUOSO=m\n# CONFIG_SND_VX222 is not set\n# CONFIG_SND_YMFPCI is not set\n\n#\n# HD-Audio\n#\nCONFIG_SND_HDA=m\nCONFIG_SND_HDA_GENERIC_LEDS=y\nCONFIG_SND_HDA_INTEL=m\nCONFIG_SND_HDA_HWDEP=y\nCONFIG_SND_HDA_RECONFIG=y\nCONFIG_SND_HDA_INPUT_BEEP=y\nCONFIG_SND_HDA_INPUT_BEEP_MODE=1\nCONFIG_SND_HDA_PATCH_LOADER=y\n# CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set\nCONFIG_SND_HDA_CODEC_REALTEK=m\nCONFIG_SND_HDA_CODEC_ANALOG=m\nCONFIG_SND_HDA_CODEC_SIGMATEL=m\nCONFIG_SND_HDA_CODEC_VIA=m\nCONFIG_SND_HDA_CODEC_HDMI=m\nCONFIG_SND_HDA_CODEC_CIRRUS=m\n# CONFIG_SND_HDA_CODEC_CS8409 is not set\nCONFIG_SND_HDA_CODEC_CONEXANT=m\nCONFIG_SND_HDA_CODEC_CA0110=m\nCONFIG_SND_HDA_CODEC_CA0132=m\nCONFIG_SND_HDA_CODEC_CA0132_DSP=y\nCONFIG_SND_HDA_CODEC_CMEDIA=m\nCONFIG_SND_HDA_CODEC_SI3054=m\nCONFIG_SND_HDA_GENERIC=m\nCONFIG_SND_HDA_POWER_SAVE_DEFAULT=0\n# CONFIG_SND_HDA_INTEL_HDMI_SILENT_STREAM is not set\n# CONFIG_SND_HDA_CTL_DEV_ID is not set\n# end of HD-Audio\n\nCONFIG_SND_HDA_CORE=m\nCONFIG_SND_HDA_DSP_LOADER=y\nCONFIG_SND_HDA_COMPONENT=y\nCONFIG_SND_HDA_I915=y\nCONFIG_SND_HDA_EXT_CORE=m\nCONFIG_SND_HDA_PREALLOC_SIZE=0\nCONFIG_SND_INTEL_NHLT=y\nCONFIG_SND_INTEL_DSP_CONFIG=m\nCONFIG_SND_INTEL_SOUNDWIRE_ACPI=m\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=m\nCONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y\nCONFIG_SND_USB_UA101=m\nCONFIG_SND_USB_USX2Y=m\nCONFIG_SND_USB_CAIAQ=m\nCONFIG_SND_USB_CAIAQ_INPUT=y\nCONFIG_SND_USB_US122L=m\nCONFIG_SND_USB_6FIRE=m\nCONFIG_SND_USB_HIFACE=m\nCONFIG_SND_BCD2000=m\nCONFIG_SND_USB_LINE6=m\nCONFIG_SND_USB_POD=m\nCONFIG_SND_USB_PODHD=m\nCONFIG_SND_USB_TONEPORT=m\nCONFIG_SND_USB_VARIAX=m\nCONFIG_SND_FIREWIRE=y\n# CONFIG_SND_DICE is not set\n# CONFIG_SND_OXFW is not set\n# CONFIG_SND_ISIGHT is not set\n# CONFIG_SND_FIREWORKS is not set\n# CONFIG_SND_BEBOB is not set\n# CONFIG_SND_FIREWIRE_DIGI00X is not set\n# CONFIG_SND_FIREWIRE_TASCAM is not set\n# CONFIG_SND_FIREWIRE_MOTU is not set\n# CONFIG_SND_FIREFACE is not set\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_COMPRESS=y\nCONFIG_SND_SOC_TOPOLOGY=y\nCONFIG_SND_SOC_ACPI=m\n# CONFIG_SND_SOC_ADI is not set\nCONFIG_SND_SOC_AMD_ACP=m\nCONFIG_SND_SOC_AMD_CZ_DA7219MX98357_MACH=m\nCONFIG_SND_SOC_AMD_CZ_RT5645_MACH=m\n# CONFIG_SND_SOC_AMD_ST_ES8336_MACH is not set\nCONFIG_SND_SOC_AMD_ACP3x=m\nCONFIG_SND_SOC_AMD_RENOIR=m\nCONFIG_SND_SOC_AMD_RENOIR_MACH=m\n# CONFIG_SND_SOC_AMD_ACP5x is not set\n# CONFIG_SND_SOC_AMD_ACP6x is not set\nCONFIG_SND_AMD_ACP_CONFIG=m\n# CONFIG_SND_SOC_AMD_ACP_COMMON is not set\n# CONFIG_SND_SOC_AMD_RPL_ACP6x is not set\n# CONFIG_SND_SOC_AMD_PS is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_AUDMIX is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_FSL_MICFIL is not set\n# CONFIG_SND_SOC_FSL_XCVR is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\nCONFIG_SND_SOC_INTEL_SST_TOPLEVEL=y\nCONFIG_SND_SOC_INTEL_SST=m\n# CONFIG_SND_SOC_INTEL_CATPT is not set\nCONFIG_SND_SST_ATOM_HIFI2_PLATFORM=m\nCONFIG_SND_SST_ATOM_HIFI2_PLATFORM_PCI=m\nCONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI=m\nCONFIG_SND_SOC_INTEL_SKYLAKE=m\nCONFIG_SND_SOC_INTEL_SKL=m\nCONFIG_SND_SOC_INTEL_APL=m\nCONFIG_SND_SOC_INTEL_KBL=m\nCONFIG_SND_SOC_INTEL_GLK=m\nCONFIG_SND_SOC_INTEL_CNL=m\nCONFIG_SND_SOC_INTEL_CFL=m\nCONFIG_SND_SOC_INTEL_CML_H=m\nCONFIG_SND_SOC_INTEL_CML_LP=m\nCONFIG_SND_SOC_INTEL_SKYLAKE_FAMILY=m\nCONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=y\nCONFIG_SND_SOC_INTEL_SKYLAKE_COMMON=m\nCONFIG_SND_SOC_ACPI_INTEL_MATCH=m\nCONFIG_SND_SOC_INTEL_AVS=m\n\n#\n# Intel AVS Machine drivers\n#\n\n#\n# Available DSP configurations\n#\n# CONFIG_SND_SOC_INTEL_AVS_MACH_DA7219 is not set\n# CONFIG_SND_SOC_INTEL_AVS_MACH_DMIC is not set\n# CONFIG_SND_SOC_INTEL_AVS_MACH_HDAUDIO is not set\n# CONFIG_SND_SOC_INTEL_AVS_MACH_I2S_TEST is not set\n# CONFIG_SND_SOC_INTEL_AVS_MACH_MAX98357A is not set\n# CONFIG_SND_SOC_INTEL_AVS_MACH_MAX98373 is not set\n# CONFIG_SND_SOC_INTEL_AVS_MACH_NAU8825 is not set\n# CONFIG_SND_SOC_INTEL_AVS_MACH_RT274 is not set\n# CONFIG_SND_SOC_INTEL_AVS_MACH_RT286 is not set\n# CONFIG_SND_SOC_INTEL_AVS_MACH_RT298 is not set\n# CONFIG_SND_SOC_INTEL_AVS_MACH_RT5682 is not set\n# CONFIG_SND_SOC_INTEL_AVS_MACH_SSM4567 is not set\n# end of Intel AVS Machine drivers\n\nCONFIG_SND_SOC_INTEL_MACH=y\n# CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES is not set\nCONFIG_SND_SOC_INTEL_HDA_DSP_COMMON=m\nCONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m\nCONFIG_SND_SOC_INTEL_BYTCR_RT5651_MACH=m\nCONFIG_SND_SOC_INTEL_CHT_BSW_RT5672_MACH=m\nCONFIG_SND_SOC_INTEL_CHT_BSW_RT5645_MACH=m\nCONFIG_SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH=m\nCONFIG_SND_SOC_INTEL_CHT_BSW_NAU8824_MACH=m\nCONFIG_SND_SOC_INTEL_BYT_CHT_CX2072X_MACH=m\nCONFIG_SND_SOC_INTEL_BYT_CHT_DA7213_MACH=m\nCONFIG_SND_SOC_INTEL_BYT_CHT_ES8316_MACH=m\nCONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH=m\n# CONFIG_SND_SOC_INTEL_SKL_RT286_MACH is not set\n# CONFIG_SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH is not set\n# CONFIG_SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH is not set\n# CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH is not set\n# CONFIG_SND_SOC_INTEL_BXT_RT298_MACH is not set\n# CONFIG_SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH is not set\n# CONFIG_SND_SOC_INTEL_KBL_DA7219_MAX98357A_MACH is not set\n# CONFIG_SND_SOC_INTEL_KBL_DA7219_MAX98927_MACH is not set\n# CONFIG_SND_SOC_INTEL_KBL_RT5660_MACH is not set\nCONFIG_SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH=m\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\nCONFIG_SND_SOC_ADAU7002=m\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4375 is not set\n# CONFIG_SND_SOC_AK4458 is not set\n# CONFIG_SND_SOC_AK4554 is not set\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_AW8738 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS35L41_I2C is not set\n# CONFIG_SND_SOC_CS35L45_I2C is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS42L83 is not set\n# CONFIG_SND_SOC_CS4234 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\nCONFIG_SND_SOC_CX2072X=m\nCONFIG_SND_SOC_DA7213=m\nCONFIG_SND_SOC_DA7219=m\nCONFIG_SND_SOC_DMIC=m\n# CONFIG_SND_SOC_ES7134 is not set\n# CONFIG_SND_SOC_ES7241 is not set\nCONFIG_SND_SOC_ES8316=m\n# CONFIG_SND_SOC_ES8326 is not set\n# CONFIG_SND_SOC_ES8328_I2C is not set\n# CONFIG_SND_SOC_GTM601 is not set\nCONFIG_SND_SOC_HDAC_HDMI=m\nCONFIG_SND_SOC_HDAC_HDA=m\nCONFIG_SND_SOC_HDA=m\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\n# CONFIG_SND_SOC_MAX98088 is not set\nCONFIG_SND_SOC_MAX98090=m\nCONFIG_SND_SOC_MAX98357A=m\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\nCONFIG_SND_SOC_MAX98927=m\n# CONFIG_SND_SOC_MAX98520 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX98396 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM186X_I2C is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM5102A is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_RK3328 is not set\nCONFIG_SND_SOC_RL6231=m\n# CONFIG_SND_SOC_RT5616 is not set\n# CONFIG_SND_SOC_RT5631 is not set\nCONFIG_SND_SOC_RT5640=m\nCONFIG_SND_SOC_RT5645=m\nCONFIG_SND_SOC_RT5651=m\n# CONFIG_SND_SOC_RT5659 is not set\nCONFIG_SND_SOC_RT5670=m\nCONFIG_SND_SOC_RT5682=m\nCONFIG_SND_SOC_RT5682_I2C=m\n# CONFIG_SND_SOC_RT9120 is not set\n# CONFIG_SND_SOC_SGTL5000 is not set\n# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\nCONFIG_SND_SOC_SPDIF=m\n# CONFIG_SND_SOC_SRC4XXX_I2C is not set\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS2780 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805M is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320ADC3XXX is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\nCONFIG_SND_SOC_TS3A227E=m\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731_I2C is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8940 is not set\n# CONFIG_SND_SOC_WM8960 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8821 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\nCONFIG_SND_SOC_NAU8824=m\n# CONFIG_SND_SOC_TPA6130A2 is not set\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\n# end of CODEC drivers\n\nCONFIG_SND_SIMPLE_CARD_UTILS=m\nCONFIG_SND_SIMPLE_CARD=m\nCONFIG_SND_X86=y\nCONFIG_HDMI_LPE_AUDIO=m\n# CONFIG_SND_VIRTIO is not set\nCONFIG_AC97_BUS=m\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\nCONFIG_HID_APPLEIR=m\nCONFIG_HID_ASUS=y\nCONFIG_HID_AUREAL=y\nCONFIG_HID_BELKIN=y\n# CONFIG_HID_BETOP_FF is not set\nCONFIG_HID_BIGBEN_FF=m\nCONFIG_HID_CHERRY=y\nCONFIG_HID_CHICONY=y\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\nCONFIG_HID_CYPRESS=y\nCONFIG_HID_DRAGONRISE=m\nCONFIG_DRAGONRISE_FF=y\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\nCONFIG_HID_EZKEY=y\n# CONFIG_HID_FT260 is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_GLORIOUS is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\nCONFIG_HID_KYE=y\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_VRC2 is not set\n# CONFIG_HID_XIAOMI is not set\nCONFIG_HID_GYRATION=y\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_ITE is not set\n# CONFIG_HID_JABRA is not set\nCONFIG_HID_TWINHAN=y\nCONFIG_HID_KENSINGTON=y\nCONFIG_HID_LCPOWER=y\n# CONFIG_HID_LED is not set\nCONFIG_HID_LENOVO=y\n# CONFIG_HID_LETSKETCH is not set\nCONFIG_HID_LOGITECH=y\nCONFIG_HID_LOGITECH_DJ=y\nCONFIG_HID_LOGITECH_HIDPP=y\nCONFIG_LOGITECH_FF=y\nCONFIG_LOGIRUMBLEPAD2_FF=y\nCONFIG_LOGIG940_FF=y\nCONFIG_LOGIWHEELS_FF=y\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_MEGAWORLD_FF is not set\n# CONFIG_HID_REDRAGON is not set\nCONFIG_HID_MICROSOFT=y\nCONFIG_HID_MONTEREY=y\nCONFIG_HID_MULTITOUCH=m\nCONFIG_HID_NINTENDO=m\nCONFIG_NINTENDO_FF=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\nCONFIG_HID_ORTEK=y\nCONFIG_HID_OUYA=y\nCONFIG_HID_PANTHERLORD=y\nCONFIG_PANTHERLORD_FF=y\nCONFIG_HID_PENMOUNT=y\nCONFIG_HID_PETALYNX=y\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PXRC is not set\n# CONFIG_HID_RAZER is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\nCONFIG_HID_SAMSUNG=y\n# CONFIG_HID_SEMITEK is not set\n# CONFIG_HID_SIGMAMICRO is not set\nCONFIG_HID_SONY=y\nCONFIG_SONY_FF=y\n# CONFIG_HID_SPEEDLINK is not set\nCONFIG_HID_STEAM=m\n# CONFIG_HID_STEELSERIES is not set\nCONFIG_HID_SUNPLUS=y\nCONFIG_HID_RMI=y\n# CONFIG_HID_GREENASIA is not set\nCONFIG_HID_SMARTJOYPLUS=m\nCONFIG_SMARTJOYPLUS_FF=y\nCONFIG_HID_TIVO=y\nCONFIG_HID_TOPSEED=y\n# CONFIG_HID_TOPRE is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\nCONFIG_HID_WIIMOTE=m\nCONFIG_HID_XINMO=y\n# CONFIG_HID_ZEROPLUS is not set\nCONFIG_HID_ZYDACRON=y\n# CONFIG_HID_SENSOR_HUB is not set\nCONFIG_HID_ALPS=m\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n# end of USB HID support\n\n#\n# I2C HID support\n#\nCONFIG_I2C_HID_ACPI=y\n# end of I2C HID support\n\nCONFIG_I2C_HID_CORE=y\n\n#\n# Intel ISH HID support\n#\n# CONFIG_INTEL_ISH_HID is not set\n# end of Intel ISH HID support\n\n#\n# AMD SFH HID Support\n#\n# CONFIG_AMD_SFH_HID is not set\n# end of AMD SFH HID Support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_USB_ULPI_BUS is not set\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_PCI=y\n# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\n# CONFIG_USB_OTG is not set\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\nCONFIG_USB_MON=m\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\n# CONFIG_USB_XHCI_DBGCAP is not set\nCONFIG_USB_XHCI_PCI=y\nCONFIG_USB_XHCI_PCI_RENESAS=y\n# CONFIG_USB_XHCI_PLATFORM is not set\nCONFIG_USB_EHCI_HCD=y\nCONFIG_USB_EHCI_ROOT_HUB_TT=y\nCONFIG_USB_EHCI_TT_NEWSCHED=y\nCONFIG_USB_EHCI_PCI=y\n# CONFIG_USB_EHCI_FSL is not set\n# CONFIG_USB_EHCI_HCD_PLATFORM is not set\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\nCONFIG_USB_OHCI_HCD=y\nCONFIG_USB_OHCI_HCD_PCI=y\n# CONFIG_USB_OHCI_HCD_SSB is not set\n# CONFIG_USB_OHCI_HCD_PLATFORM is not set\nCONFIG_USB_UHCI_HCD=y\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_BCMA is not set\n# CONFIG_USB_HCD_SSB is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=m\n# CONFIG_USB_PRINTER is not set\n# CONFIG_USB_WDM is not set\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\nCONFIG_USB_UAS=y\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\n# CONFIG_USB_MUSB_HDRC is not set\n# CONFIG_USB_DWC3 is not set\n# CONFIG_USB_DWC2 is not set\n# CONFIG_USB_CHIPIDEA is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=m\n# CONFIG_USB_SERIAL_GENERIC is not set\n# CONFIG_USB_SERIAL_SIMPLE is not set\n# CONFIG_USB_SERIAL_AIRCABLE is not set\n# CONFIG_USB_SERIAL_ARK3116 is not set\n# CONFIG_USB_SERIAL_BELKIN is not set\nCONFIG_USB_SERIAL_CH341=m\n# CONFIG_USB_SERIAL_WHITEHEAT is not set\n# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set\nCONFIG_USB_SERIAL_CP210X=m\n# CONFIG_USB_SERIAL_CYPRESS_M8 is not set\n# CONFIG_USB_SERIAL_EMPEG is not set\nCONFIG_USB_SERIAL_FTDI_SIO=m\n# CONFIG_USB_SERIAL_VISOR is not set\n# CONFIG_USB_SERIAL_IPAQ is not set\n# CONFIG_USB_SERIAL_IR is not set\n# CONFIG_USB_SERIAL_EDGEPORT is not set\n# CONFIG_USB_SERIAL_EDGEPORT_TI is not set\n# CONFIG_USB_SERIAL_F81232 is not set\n# CONFIG_USB_SERIAL_F8153X is not set\n# CONFIG_USB_SERIAL_GARMIN is not set\n# CONFIG_USB_SERIAL_IPW is not set\nCONFIG_USB_SERIAL_IUU=m\n# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set\n# CONFIG_USB_SERIAL_KEYSPAN is not set\n# CONFIG_USB_SERIAL_KLSI is not set\n# CONFIG_USB_SERIAL_KOBIL_SCT is not set\n# CONFIG_USB_SERIAL_MCT_U232 is not set\n# CONFIG_USB_SERIAL_METRO is not set\n# CONFIG_USB_SERIAL_MOS7720 is not set\n# CONFIG_USB_SERIAL_MOS7840 is not set\n# CONFIG_USB_SERIAL_MXUPORT is not set\n# CONFIG_USB_SERIAL_NAVMAN is not set\nCONFIG_USB_SERIAL_PL2303=m\n# CONFIG_USB_SERIAL_OTI6858 is not set\n# CONFIG_USB_SERIAL_QCAUX is not set\n# CONFIG_USB_SERIAL_QUALCOMM is not set\n# CONFIG_USB_SERIAL_SPCP8X5 is not set\n# CONFIG_USB_SERIAL_SAFE is not set\n# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set\n# CONFIG_USB_SERIAL_SYMBOL is not set\n# CONFIG_USB_SERIAL_TI is not set\n# CONFIG_USB_SERIAL_CYBERJACK is not set\n# CONFIG_USB_SERIAL_OPTION is not set\n# CONFIG_USB_SERIAL_OMNINET is not set\n# CONFIG_USB_SERIAL_OPTICON is not set\n# CONFIG_USB_SERIAL_XSENS_MT is not set\n# CONFIG_USB_SERIAL_WISHBONE is not set\n# CONFIG_USB_SERIAL_SSU100 is not set\n# CONFIG_USB_SERIAL_QT2 is not set\n# CONFIG_USB_SERIAL_UPD78F0730 is not set\n# CONFIG_USB_SERIAL_XR is not set\n# CONFIG_USB_SERIAL_DEBUG is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\n# CONFIG_USB_EZUSB_FX2 is not set\n# CONFIG_USB_HUB_USB251XB is not set\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n\n#\n# USB Physical Layer drivers\n#\n# CONFIG_NOP_USB_XCEIV is not set\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\n# end of USB Physical Layer drivers\n\n# CONFIG_USB_GADGET is not set\nCONFIG_TYPEC=m\n# CONFIG_TYPEC_TCPM is not set\n# CONFIG_TYPEC_UCSI is not set\n# CONFIG_TYPEC_TPS6598X is not set\n# CONFIG_TYPEC_RT1719 is not set\n# CONFIG_TYPEC_STUSB160X is not set\n# CONFIG_TYPEC_WUSB3801 is not set\n\n#\n# USB Type-C Multiplexer/DeMultiplexer Switch support\n#\n# CONFIG_TYPEC_MUX_FSA4480 is not set\n# CONFIG_TYPEC_MUX_PI3USB30532 is not set\n# end of USB Type-C Multiplexer/DeMultiplexer Switch support\n\n#\n# USB Type-C Alternate Mode drivers\n#\n# CONFIG_TYPEC_DP_ALTMODE is not set\n# end of USB Type-C Alternate Mode drivers\n\n# CONFIG_USB_ROLE_SWITCH is not set\nCONFIG_MMC=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_DEBUG is not set\nCONFIG_MMC_SDHCI=y\nCONFIG_MMC_SDHCI_IO_ACCESSORS=y\nCONFIG_MMC_SDHCI_PCI=y\n# CONFIG_MMC_RICOH_MMC is not set\nCONFIG_MMC_SDHCI_ACPI=y\nCONFIG_MMC_SDHCI_PLTFM=y\n# CONFIG_MMC_SDHCI_F_SDH30 is not set\n# CONFIG_MMC_WBSD is not set\n# CONFIG_MMC_TIFM_SD is not set\n# CONFIG_MMC_CB710 is not set\n# CONFIG_MMC_VIA_SDMMC is not set\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_REALTEK_PCI=y\nCONFIG_MMC_REALTEK_USB=y\nCONFIG_MMC_CQHCI=y\nCONFIG_MMC_HSQ=y\nCONFIG_MMC_TOSHIBA_PCI=y\n# CONFIG_MMC_MTK is not set\n# CONFIG_MMC_SDHCI_XENON is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\nCONFIG_LEDS_CLASS_FLASH=y\n# CONFIG_LEDS_CLASS_MULTICOLOR is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_APU is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_PCA9532 is not set\n# CONFIG_LEDS_GPIO is not set\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_INTEL_SS4200 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_MLXCPLD is not set\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_NIC78BX is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\n# CONFIG_LEDS_AS3645A is not set\n# CONFIG_LEDS_LM3601X is not set\n# CONFIG_LEDS_RT8515 is not set\n# CONFIG_LEDS_SGM3140 is not set\n\n#\n# RGB LED drivers\n#\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\n# CONFIG_LEDS_TRIGGER_TIMER is not set\n# CONFIG_LEDS_TRIGGER_ONESHOT is not set\n# CONFIG_LEDS_TRIGGER_DISK is not set\n# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set\n# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set\n# CONFIG_LEDS_TRIGGER_CPU is not set\n# CONFIG_LEDS_TRIGGER_ACTIVITY is not set\n# CONFIG_LEDS_TRIGGER_GPIO is not set\n# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\n# CONFIG_LEDS_TRIGGER_TRANSIENT is not set\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\n# CONFIG_LEDS_TRIGGER_PANIC is not set\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\nCONFIG_LEDS_TRIGGER_AUDIO=m\n# CONFIG_LEDS_TRIGGER_TTY is not set\n\n#\n# Simple LED drivers\n#\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_ATOMIC_SCRUB=y\nCONFIG_EDAC_SUPPORT=y\n# CONFIG_EDAC is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_MC146818_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_MAX6900 is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\n# CONFIG_RTC_DRV_PCF8563 is not set\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\n# CONFIG_RTC_DRV_DS3232 is not set\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\nCONFIG_RTC_DRV_CMOS=y\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_FTRTC010 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_VIRTUAL_CHANNELS=y\nCONFIG_DMA_ACPI=y\n# CONFIG_ALTERA_MSGDMA is not set\nCONFIG_INTEL_IDMA64=m\n# CONFIG_INTEL_IDXD is not set\n# CONFIG_INTEL_IDXD_COMPAT is not set\nCONFIG_INTEL_IOATDMA=m\n# CONFIG_PLX_DMA is not set\n# CONFIG_AMD_PTDMA is not set\n# CONFIG_QCOM_HIDMA_MGMT is not set\n# CONFIG_QCOM_HIDMA is not set\nCONFIG_DW_DMAC_CORE=m\nCONFIG_DW_DMAC=m\nCONFIG_DW_DMAC_PCI=m\n# CONFIG_DW_EDMA is not set\n# CONFIG_DW_EDMA_PCIE is not set\nCONFIG_HSU_DMA=y\n# CONFIG_SF_PDMA is not set\n# CONFIG_INTEL_LDMA is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\nCONFIG_DMA_ENGINE_RAID=y\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\n# CONFIG_UDMABUF is not set\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\nCONFIG_DMABUF_HEAPS=y\n# CONFIG_DMABUF_SYSFS_STATS is not set\nCONFIG_DMABUF_HEAPS_SYSTEM=y\nCONFIG_DMABUF_HEAPS_CMA=y\n# end of DMABUF options\n\nCONFIG_DCA=m\n# CONFIG_AUXDISPLAY is not set\nCONFIG_UIO=y\n# CONFIG_UIO_CIF is not set\n# CONFIG_UIO_PDRV_GENIRQ is not set\n# CONFIG_UIO_DMEM_GENIRQ is not set\n# CONFIG_UIO_AEC is not set\n# CONFIG_UIO_SERCOS3 is not set\n# CONFIG_UIO_PCI_GENERIC is not set\n# CONFIG_UIO_NETX is not set\n# CONFIG_UIO_PRUSS is not set\n# CONFIG_UIO_MF624 is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\nCONFIG_VIRTIO_ANCHOR=y\nCONFIG_VIRTIO=y\nCONFIG_VIRTIO_PCI_LIB=y\nCONFIG_VIRTIO_PCI_LIB_LEGACY=y\nCONFIG_VIRTIO_MENU=y\nCONFIG_VIRTIO_PCI=y\nCONFIG_VIRTIO_PCI_LEGACY=y\nCONFIG_VIRTIO_BALLOON=y\nCONFIG_VIRTIO_INPUT=y\nCONFIG_VIRTIO_MMIO=y\n# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set\nCONFIG_VIRTIO_DMA_SHARED_BUFFER=y\n# CONFIG_VDPA is not set\n# CONFIG_VHOST_MENU is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# CONFIG_HYPERV is not set\n# end of Microsoft Hyper-V guest support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\nCONFIG_RTL8192U=m\n# CONFIG_RTLLIB is not set\nCONFIG_RTL8723BS=m\nCONFIG_R8712U=m\nCONFIG_R8188EU=m\nCONFIG_RTS5208=y\n# CONFIG_VT6655 is not set\nCONFIG_VT6656=m\n# CONFIG_FB_SM750 is not set\nCONFIG_STAGING_MEDIA=y\n# CONFIG_INTEL_ATOMISP is not set\nCONFIG_VIDEO_IPU3_IMGU=m\nCONFIG_STAGING_MEDIA_DEPRECATED=y\n# CONFIG_VIDEO_CPIA2 is not set\nCONFIG_VIDEO_SAA7146=m\nCONFIG_VIDEO_SAA7146_VV=m\nCONFIG_DVB_AV7110_IR=y\nCONFIG_DVB_AV7110=m\nCONFIG_DVB_AV7110_OSD=y\nCONFIG_DVB_BUDGET_PATCH=m\nCONFIG_DVB_SP8870=m\n# CONFIG_VIDEO_HEXIUM_GEMINI is not set\n# CONFIG_VIDEO_HEXIUM_ORION is not set\n# CONFIG_VIDEO_MXB is not set\nCONFIG_DVB_BUDGET_CORE=m\nCONFIG_DVB_BUDGET=m\nCONFIG_DVB_BUDGET_CI=m\nCONFIG_DVB_BUDGET_AV=m\n# CONFIG_VIDEO_STKWEBCAM is not set\nCONFIG_VIDEO_TM6000=m\n# CONFIG_VIDEO_TM6000_ALSA is not set\nCONFIG_VIDEO_TM6000_DVB=m\n# CONFIG_USB_ZR364XX is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_KS7010 is not set\n# CONFIG_FIELDBUS_DEV is not set\n# CONFIG_QLGE is not set\n# CONFIG_VME_BUS is not set\n# CONFIG_CHROME_PLATFORMS is not set\n# CONFIG_MELLANOX_PLATFORM is not set\nCONFIG_SURFACE_PLATFORMS=y\n# CONFIG_SURFACE_3_POWER_OPREGION is not set\n# CONFIG_SURFACE_GPE is not set\n# CONFIG_SURFACE_HOTPLUG is not set\n# CONFIG_SURFACE_PRO3_BUTTON is not set\n# CONFIG_SURFACE_AGGREGATOR is not set\nCONFIG_X86_PLATFORM_DEVICES=y\nCONFIG_ACPI_WMI=y\nCONFIG_WMI_BMOF=y\n# CONFIG_HUAWEI_WMI is not set\n# CONFIG_MXM_WMI is not set\n# CONFIG_PEAQ_WMI is not set\n# CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set\n# CONFIG_XIAOMI_WMI is not set\n# CONFIG_GIGABYTE_WMI is not set\n# CONFIG_YOGABOOK_WMI is not set\n# CONFIG_ACERHDF is not set\n# CONFIG_ACER_WIRELESS is not set\n# CONFIG_ACER_WMI is not set\nCONFIG_AMD_PMF=m\n# CONFIG_AMD_PMC is not set\n# CONFIG_AMD_HSMP is not set\n# CONFIG_ADV_SWBUTTON is not set\n# CONFIG_APPLE_GMUX is not set\n# CONFIG_ASUS_LAPTOP is not set\n# CONFIG_ASUS_WIRELESS is not set\n# CONFIG_ASUS_TF103C_DOCK is not set\n# CONFIG_X86_PLATFORM_DRIVERS_DELL is not set\n# CONFIG_AMILO_RFKILL is not set\n# CONFIG_FUJITSU_LAPTOP is not set\n# CONFIG_FUJITSU_TABLET is not set\n# CONFIG_GPD_POCKET_FAN is not set\nCONFIG_X86_PLATFORM_DRIVERS_HP=y\n# CONFIG_HP_ACCEL is not set\n# CONFIG_HP_WMI is not set\n# CONFIG_WIRELESS_HOTKEY is not set\n# CONFIG_IBM_RTL is not set\n# CONFIG_IDEAPAD_LAPTOP is not set\n# CONFIG_SENSORS_HDAPS is not set\n# CONFIG_THINKPAD_ACPI is not set\n# CONFIG_THINKPAD_LMI is not set\nCONFIG_INTEL_ATOMISP2_PDX86=y\nCONFIG_INTEL_ATOMISP2_PM=y\n# CONFIG_INTEL_SAR_INT1092 is not set\n# CONFIG_INTEL_SKL_INT3472 is not set\n# CONFIG_INTEL_PMC_CORE is not set\n\n#\n# Intel Speed Select Technology interface support\n#\n# CONFIG_INTEL_SPEED_SELECT_INTERFACE is not set\n# end of Intel Speed Select Technology interface support\n\n# CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set\n# CONFIG_INTEL_WMI_THUNDERBOLT is not set\n\n#\n# Intel Uncore Frequency Control\n#\n# CONFIG_INTEL_UNCORE_FREQ_CONTROL is not set\n# end of Intel Uncore Frequency Control\n\n# CONFIG_INTEL_HID_EVENT is not set\n# CONFIG_INTEL_VBTN is not set\n# CONFIG_INTEL_INT0002_VGPIO is not set\n# CONFIG_INTEL_OAKTRAIL is not set\n# CONFIG_INTEL_PUNIT_IPC is not set\n# CONFIG_INTEL_RST is not set\n# CONFIG_INTEL_SMARTCONNECT is not set\n# CONFIG_INTEL_TURBO_MAX_3 is not set\n# CONFIG_INTEL_VSEC is not set\n# CONFIG_MSI_LAPTOP is not set\n# CONFIG_MSI_WMI is not set\n# CONFIG_PCENGINES_APU2 is not set\n# CONFIG_BARCO_P50_GPIO is not set\n# CONFIG_SAMSUNG_LAPTOP is not set\n# CONFIG_SAMSUNG_Q10 is not set\n# CONFIG_TOSHIBA_BT_RFKILL is not set\n# CONFIG_TOSHIBA_HAPS is not set\n# CONFIG_TOSHIBA_WMI is not set\n# CONFIG_ACPI_CMPC is not set\n# CONFIG_COMPAL_LAPTOP is not set\n# CONFIG_LG_LAPTOP is not set\n# CONFIG_PANASONIC_LAPTOP is not set\n# CONFIG_SONY_LAPTOP is not set\n# CONFIG_SYSTEM76_ACPI is not set\n# CONFIG_TOPSTAR_LAPTOP is not set\n# CONFIG_MLX_PLATFORM is not set\n# CONFIG_INTEL_IPS is not set\n# CONFIG_INTEL_SCU_PCI is not set\n# CONFIG_INTEL_SCU_PLATFORM is not set\n# CONFIG_SIEMENS_SIMATIC_IPC is not set\n# CONFIG_WINMATE_FM07_KEYS is not set\nCONFIG_P2SB=y\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n# CONFIG_COMMON_CLK_MAX9485 is not set\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\n# CONFIG_XILINX_VCU is not set\n# CONFIG_HWSPINLOCK is not set\n\n#\n# Clock Source drivers\n#\nCONFIG_CLKEVT_I8253=y\nCONFIG_CLKBLD_I8253=y\n# end of Clock Source drivers\n\nCONFIG_MAILBOX=y\nCONFIG_PCC=y\n# CONFIG_ALTERA_MBOX is not set\nCONFIG_IOMMU_IOVA=y\nCONFIG_IOASID=y\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\nCONFIG_IOMMU_IO_PGTABLE=y\n# end of Generic IOMMU Pagetable Support\n\n# CONFIG_IOMMU_DEBUGFS is not set\n# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not set\n# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set\nCONFIG_IOMMU_DEFAULT_PASSTHROUGH=y\nCONFIG_IOMMU_DMA=y\nCONFIG_IOMMU_SVA=y\nCONFIG_AMD_IOMMU=y\nCONFIG_AMD_IOMMU_V2=y\nCONFIG_DMAR_TABLE=y\nCONFIG_INTEL_IOMMU=y\nCONFIG_INTEL_IOMMU_SVM=y\n# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set\nCONFIG_INTEL_IOMMU_FLOPPY_WA=y\n# CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON is not set\nCONFIG_IRQ_REMAP=y\n# CONFIG_VIRTIO_IOMMU is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\n# CONFIG_RPMSG_QCOM_GLINK_RPM is not set\n# CONFIG_RPMSG_VIRTIO is not set\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# fujitsu SoC drivers\n#\n# end of fujitsu SoC drivers\n\n#\n# i.MX SoC drivers\n#\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# end of Qualcomm SoC drivers\n\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\n# CONFIG_PM_DEVFREQ is not set\n# CONFIG_EXTCON is not set\n# CONFIG_MEMORY is not set\n# CONFIG_IIO is not set\n# CONFIG_NTB is not set\n# CONFIG_PWM is not set\n\n#\n# IRQ chip support\n#\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\nCONFIG_RESET_CONTROLLER=y\n# CONFIG_RESET_SIMPLE is not set\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_RESET_TI_TPS380X is not set\n\n#\n# PHY Subsystem\n#\n# CONFIG_GENERIC_PHY is not set\n# CONFIG_USB_LGM_PHY is not set\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\n\n#\n# PHY drivers for Broadcom platforms\n#\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# end of PHY drivers for Broadcom platforms\n\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_INTEL_LGM_EMMC is not set\n# end of PHY Subsystem\n\nCONFIG_POWERCAP=y\nCONFIG_INTEL_RAPL_CORE=m\nCONFIG_INTEL_RAPL=m\n# CONFIG_IDLE_INJECT is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# end of Performance monitor support\n\nCONFIG_RAS=y\n# CONFIG_USB4 is not set\n\n#\n# Android\n#\n# CONFIG_ANDROID_BINDER_IPC is not set\n# end of Android\n\n# CONFIG_LIBNVDIMM is not set\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\n# CONFIG_NVMEM_RMEM is not set\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_TEE is not set\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\n# CONFIG_PECI is not set\n# CONFIG_HTE is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_VALIDATE_FS_PARSER=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\nCONFIG_XFS_SUPPORT_V4=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=y\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\nCONFIG_F2FS_FS=y\nCONFIG_F2FS_STAT_FS=y\n# CONFIG_F2FS_FS_XATTR is not set\nCONFIG_F2FS_CHECK_FS=y\n# CONFIG_F2FS_FAULT_INJECTION is not set\n# CONFIG_F2FS_FS_COMPRESSION is not set\nCONFIG_F2FS_IOSTAT=y\n# CONFIG_F2FS_UNFAIR_RWSEM is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\n# CONFIG_QUOTA is not set\nCONFIG_AUTOFS4_FS=y\nCONFIG_AUTOFS_FS=y\nCONFIG_FUSE_FS=m\n# CONFIG_CUSE is not set\n# CONFIG_VIRTIO_FS is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_XINO_AUTO is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n\n#\n# Caches\n#\nCONFIG_NETFS_SUPPORT=y\n# CONFIG_NETFS_STATS is not set\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_CACHEFILES is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=m\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=m\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=m\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=m\n# CONFIG_NTFS3_64BIT_CLUSTER is not set\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\nCONFIG_PROC_KCORE=y\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_PROC_PID_ARCH_STATUS=y\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_TMPFS_INODE64 is not set\n# CONFIG_HUGETLBFS is not set\nCONFIG_ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP=y\nCONFIG_MEMFD_CREATE=y\nCONFIG_ARCH_HAS_GIGANTIC_PAGE=y\nCONFIG_CONFIGFS_FS=y\nCONFIG_EFIVAR_FS=y\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\n# CONFIG_HFS_FS is not set\nCONFIG_HFSPLUS_FS=m\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\n# CONFIG_SQUASHFS_FILE_CACHE is not set\nCONFIG_SQUASHFS_FILE_DIRECT=y\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\n# CONFIG_PSTORE is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EROFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\nCONFIG_NFS_SWAP=y\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\nCONFIG_NFS_V4_1_MIGRATION=y\nCONFIG_ROOT_NFS=y\nCONFIG_NFS_FSCACHE=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFS_DISABLE_UDP_SUPPORT=y\n# CONFIG_NFS_V4_2_READ_PLUS is not set\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_COMMON=y\nCONFIG_NFS_V4_2_SSC_HELPER=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\nCONFIG_SUNRPC_SWAP=y\nCONFIG_RPCSEC_GSS_KRB5=m\n# CONFIG_SUNRPC_DISABLE_INSECURE_ENCTYPES is not set\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS2=y\nCONFIG_CIFS_ALLOW_INSECURE_LEGACY=y\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\nCONFIG_CIFS_DEBUG=y\n# CONFIG_CIFS_DEBUG2 is not set\n# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\n# CONFIG_CIFS_SWN_UPCALL is not set\nCONFIG_CIFS_FSCACHE=y\n# CONFIG_CIFS_ROOT is not set\n# CONFIG_SMB_SERVER is not set\nCONFIG_SMBFS=y\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\nCONFIG_KEYS_REQUEST_CACHE=y\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\nCONFIG_KEY_DH_OPERATIONS=y\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY is not set\nCONFIG_SECURITYFS=y\n# CONFIG_INTEL_TXT is not set\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\n# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_LSM=\"yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n\nCONFIG_RANDSTRUCT_NONE=y\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=y\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\n# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set\n# CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is not set\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_CRYPTD=y\nCONFIG_CRYPTO_AUTHENC=y\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_SIMD=y\n# end of Crypto core or helper\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_DH=y\n# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set\nCONFIG_CRYPTO_ECC=m\nCONFIG_CRYPTO_ECDH=m\n# CONFIG_CRYPTO_ECDSA is not set\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\n# CONFIG_CRYPTO_CURVE25519 is not set\n# end of Public-key cryptography\n\n#\n# Block ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\n# CONFIG_CRYPTO_ARIA is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\n# CONFIG_CRYPTO_SM4_GENERIC is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n# end of Block ciphers\n\n#\n# Length-preserving ciphers and modes\n#\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_ARC4 is not set\n# CONFIG_CRYPTO_CHACHA20 is not set\nCONFIG_CRYPTO_CBC=y\nCONFIG_CRYPTO_CFB=m\nCONFIG_CRYPTO_CTR=y\nCONFIG_CRYPTO_CTS=m\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_HCTR2 is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_OFB is not set\n# CONFIG_CRYPTO_PCBC is not set\n# CONFIG_CRYPTO_XTS is not set\n# end of Length-preserving ciphers and modes\n\n#\n# AEAD (authenticated encryption with associated data) ciphers\n#\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\n# CONFIG_CRYPTO_ESSIV is not set\n# end of AEAD (authenticated encryption with associated data) ciphers\n\n#\n# Hashes, digests, and MACs\n#\nCONFIG_CRYPTO_BLAKE2B=y\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\nCONFIG_CRYPTO_MICHAEL_MIC=m\n# CONFIG_CRYPTO_POLY1305 is not set\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\n# CONFIG_CRYPTO_SM3_GENERIC is not set\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_VMAC is not set\n# CONFIG_CRYPTO_WP512 is not set\n# CONFIG_CRYPTO_XCBC is not set\nCONFIG_CRYPTO_XXHASH=y\n# end of Hashes, digests, and MACs\n\n#\n# CRCs (cyclic redundancy checks)\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=y\n# CONFIG_CRYPTO_CRCT10DIF is not set\n# end of CRCs (cyclic redundancy checks)\n\n#\n# Compression\n#\n# CONFIG_CRYPTO_DEFLATE is not set\n# CONFIG_CRYPTO_LZO is not set\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n# end of Compression\n\n#\n# Random number generation\n#\n# CONFIG_CRYPTO_ANSI_CPRNG is not set\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_KDF800108_CTR=y\n# end of Random number generation\n\n#\n# Userspace interface\n#\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\nCONFIG_CRYPTO_USER_API_AEAD=y\nCONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y\n# end of Userspace interface\n\nCONFIG_CRYPTO_HASH_INFO=y\n\n#\n# Accelerated Cryptographic Algorithms for CPU (x86)\n#\nCONFIG_CRYPTO_CURVE25519_X86=m\nCONFIG_CRYPTO_AES_NI_INTEL=y\n# CONFIG_CRYPTO_BLOWFISH_X86_64 is not set\n# CONFIG_CRYPTO_CAMELLIA_X86_64 is not set\n# CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64 is not set\n# CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64 is not set\n# CONFIG_CRYPTO_CAST5_AVX_X86_64 is not set\n# CONFIG_CRYPTO_CAST6_AVX_X86_64 is not set\nCONFIG_CRYPTO_DES3_EDE_X86_64=y\n# CONFIG_CRYPTO_SERPENT_SSE2_X86_64 is not set\n# CONFIG_CRYPTO_SERPENT_AVX_X86_64 is not set\n# CONFIG_CRYPTO_SERPENT_AVX2_X86_64 is not set\n# CONFIG_CRYPTO_SM4_AESNI_AVX_X86_64 is not set\n# CONFIG_CRYPTO_SM4_AESNI_AVX2_X86_64 is not set\n# CONFIG_CRYPTO_TWOFISH_X86_64 is not set\n# CONFIG_CRYPTO_TWOFISH_X86_64_3WAY is not set\n# CONFIG_CRYPTO_TWOFISH_AVX_X86_64 is not set\n# CONFIG_CRYPTO_ARIA_AESNI_AVX_X86_64 is not set\nCONFIG_CRYPTO_CHACHA20_X86_64=m\n# CONFIG_CRYPTO_AEGIS128_AESNI_SSE2 is not set\n# CONFIG_CRYPTO_NHPOLY1305_SSE2 is not set\n# CONFIG_CRYPTO_NHPOLY1305_AVX2 is not set\nCONFIG_CRYPTO_BLAKE2S_X86=y\n# CONFIG_CRYPTO_POLYVAL_CLMUL_NI is not set\nCONFIG_CRYPTO_POLY1305_X86_64=m\nCONFIG_CRYPTO_SHA1_SSSE3=y\nCONFIG_CRYPTO_SHA256_SSSE3=y\nCONFIG_CRYPTO_SHA512_SSSE3=y\n# CONFIG_CRYPTO_SM3_AVX_X86_64 is not set\n# CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL is not set\n# CONFIG_CRYPTO_CRC32C_INTEL is not set\n# CONFIG_CRYPTO_CRC32_PCLMUL is not set\n# end of Accelerated Cryptographic Algorithms for CPU (x86)\n\n# CONFIG_CRYPTO_HW is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n# CONFIG_FIPS_SIGNATURE_SELFTEST is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=y\n# CONFIG_RAID6_PQ_BENCHMARK is not set\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\n# CONFIG_CORDIC is not set\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_GENERIC_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_ARCH_HAS_FAST_MULTIPLIER=y\nCONFIG_ARCH_USE_SYM_ANNOTATIONS=y\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_UTILS=y\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=m\nCONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=y\nCONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=m\nCONFIG_CRYPTO_LIB_CHACHA_GENERIC=m\nCONFIG_CRYPTO_LIB_CHACHA=m\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CURVE25519=m\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=m\nCONFIG_CRYPTO_LIB_CURVE25519=m\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=11\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=m\nCONFIG_CRYPTO_LIB_POLY1305_GENERIC=m\nCONFIG_CRYPTO_LIB_POLY1305=m\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=m\nCONFIG_CRYPTO_LIB_SHA1=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_CRC_CCITT=y\nCONFIG_CRC16=y\n# CONFIG_CRC_T10DIF is not set\n# CONFIG_CRC64_ROCKSOFT is not set\nCONFIG_CRC_ITU_T=m\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC64 is not set\n# CONFIG_CRC4 is not set\n# CONFIG_CRC7 is not set\nCONFIG_LIBCRC32C=y\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=y\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMMON=y\nCONFIG_ZSTD_COMPRESS=y\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\n# CONFIG_XZ_DEC_X86 is not set\n# CONFIG_XZ_DEC_POWERPC is not set\n# CONFIG_XZ_DEC_IA64 is not set\n# CONFIG_XZ_DEC_ARM is not set\n# CONFIG_XZ_DEC_ARMTHUMB is not set\n# CONFIG_XZ_DEC_SPARC is not set\n# CONFIG_XZ_DEC_MICROLZMA is not set\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_ZSTD=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_INTERVAL_TREE=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_DMA_OPS=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_SWIOTLB=y\nCONFIG_DMA_CMA=y\n# CONFIG_DMA_PERNUMA_CMA is not set\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=256\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\nCONFIG_IOMMU_HELPER=y\nCONFIG_CHECK_SIGNATURE=y\n# CONFIG_FORCE_NR_CPUS is not set\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\nCONFIG_IRQ_POLL=y\nCONFIG_MPILIB=y\nCONFIG_DIMLIB=y\nCONFIG_OID_REGISTRY=y\nCONFIG_UCS2_STRING=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_GENERIC_VDSO_TIME_NS=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\nCONFIG_SG_POOL=y\nCONFIG_ARCH_HAS_PMEM_API=y\nCONFIG_ARCH_HAS_UACCESS_FLUSHCACHE=y\nCONFIG_ARCH_HAS_COPY_MC=y\nCONFIG_ARCH_STACKWALK=y\nCONFIG_STACKDEPOT=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_PLDMFW=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\n# CONFIG_STACKTRACE_BUILD_ID is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\nCONFIG_DYNAMIC_DEBUG_CORE=y\nCONFIG_SYMBOLIC_ERRNAME=y\nCONFIG_DEBUG_BUGVERBOSE=y\n# end of printk and dmesg options\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_AS_HAS_NON_CONST_LEB128=y\nCONFIG_DEBUG_INFO_NONE=y\n# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\nCONFIG_FRAME_WARN=1024\nCONFIG_STRIP_ASM_SYMS=y\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\n# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B is not set\nCONFIG_FRAME_POINTER=y\nCONFIG_OBJTOOL=y\nCONFIG_STACK_VALIDATION=y\n# CONFIG_VMLINUX_MAP is not set\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=\"\"\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\nCONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_ARCH_KCSAN=y\nCONFIG_HAVE_KCSAN_COMPILER=y\n# CONFIG_KCSAN is not set\n# end of Generic Kernel Debugging Instruments\n\n#\n# Networking Debugging\n#\n# CONFIG_NET_DEV_REFCNT_TRACKER is not set\n# CONFIG_NET_NS_REFCNT_TRACKER is not set\n# CONFIG_DEBUG_NET is not set\n# end of Networking Debugging\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_TABLE_CHECK is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_PAGE_REF is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\nCONFIG_ARCH_HAS_DEBUG_WX=y\n# CONFIG_DEBUG_WX is not set\nCONFIG_GENERIC_PTDUMP=y\n# CONFIG_PTDUMP_DEBUGFS is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SHRINKER_DEBUG is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\nCONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y\n# CONFIG_DEBUG_VM is not set\n# CONFIG_DEBUG_VM_PGTABLE is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\n# CONFIG_DEBUG_MEMORY_INIT is not set\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP=y\n# CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\nCONFIG_HAVE_ARCH_KMSAN=y\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\nCONFIG_LOCKUP_DETECTOR=y\nCONFIG_SOFTLOCKUP_DETECTOR=y\n# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set\nCONFIG_HARDLOCKUP_DETECTOR_PERF=y\nCONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y\nCONFIG_HARDLOCKUP_DETECTOR=y\n# CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set\nCONFIG_DETECT_HUNG_TASK=y\nCONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120\n# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\n# CONFIG_SCHED_DEBUG is not set\n# CONFIG_SCHEDSTATS is not set\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_RWSEMS is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# CONFIG_CSD_LOCK_WAIT_DEBUG is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\nCONFIG_TRACE_IRQFLAGS=y\nCONFIG_TRACE_IRQFLAGS_NMI=y\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_DEBUG_MAPLE_TREE is not set\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=60\nCONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_USER_STACKTRACE_SUPPORT=y\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_RETHOOK=y\nCONFIG_RETHOOK=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y\nCONFIG_HAVE_DYNAMIC_FTRACE_NO_PATCHABLE=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_FENTRY=y\nCONFIG_HAVE_OBJTOOL_MCOUNT=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_HAVE_BUILDTIME_MCOUNT_SORT=y\nCONFIG_BUILDTIME_MCOUNT_SORT=y\nCONFIG_TRACER_MAX_TRACE=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_RING_BUFFER_ALLOW_SWAP=y\nCONFIG_PREEMPTIRQ_TRACEPOINTS=y\nCONFIG_TRACING=y\nCONFIG_GENERIC_TRACER=y\nCONFIG_TRACING_SUPPORT=y\nCONFIG_FTRACE=y\nCONFIG_BOOTTIME_TRACING=y\nCONFIG_FUNCTION_TRACER=y\nCONFIG_FUNCTION_GRAPH_TRACER=y\nCONFIG_DYNAMIC_FTRACE=y\nCONFIG_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y\nCONFIG_DYNAMIC_FTRACE_WITH_ARGS=y\n# CONFIG_FPROBE is not set\n# CONFIG_FUNCTION_PROFILER is not set\nCONFIG_STACK_TRACER=y\nCONFIG_IRQSOFF_TRACER=y\nCONFIG_SCHED_TRACER=y\n# CONFIG_HWLAT_TRACER is not set\n# CONFIG_OSNOISE_TRACER is not set\n# CONFIG_TIMERLAT_TRACER is not set\n# CONFIG_MMIOTRACE is not set\n# CONFIG_FTRACE_SYSCALLS is not set\nCONFIG_TRACER_SNAPSHOT=y\nCONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP=y\nCONFIG_BRANCH_PROFILE_NONE=y\n# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set\n# CONFIG_PROFILE_ALL_BRANCHES is not set\nCONFIG_BLK_DEV_IO_TRACE=y\nCONFIG_KPROBE_EVENTS=y\n# CONFIG_KPROBE_EVENTS_ON_NOTRACE is not set\n# CONFIG_UPROBE_EVENTS is not set\nCONFIG_BPF_EVENTS=y\nCONFIG_DYNAMIC_EVENTS=y\nCONFIG_PROBE_EVENTS=y\n# CONFIG_BPF_KPROBE_OVERRIDE is not set\nCONFIG_FTRACE_MCOUNT_RECORD=y\nCONFIG_FTRACE_MCOUNT_USE_CC=y\n# CONFIG_SYNTH_EVENTS is not set\n# CONFIG_HIST_TRIGGERS is not set\n# CONFIG_TRACE_EVENT_INJECT is not set\n# CONFIG_TRACEPOINT_BENCHMARK is not set\n# CONFIG_RING_BUFFER_BENCHMARK is not set\n# CONFIG_TRACE_EVAL_MAP_FILE is not set\n# CONFIG_FTRACE_RECORD_RECURSION is not set\n# CONFIG_FTRACE_STARTUP_TEST is not set\n# CONFIG_FTRACE_SORT_STARTUP_TEST is not set\n# CONFIG_RING_BUFFER_STARTUP_TEST is not set\n# CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is not set\n# CONFIG_PREEMPTIRQ_DELAY_TEST is not set\n# CONFIG_KPROBE_EVENT_GEN_TEST is not set\n# CONFIG_RV is not set\n# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set\n# CONFIG_SAMPLES is not set\nCONFIG_HAVE_SAMPLE_FTRACE_DIRECT=y\nCONFIG_HAVE_SAMPLE_FTRACE_DIRECT_MULTI=y\nCONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y\nCONFIG_STRICT_DEVMEM=y\n# CONFIG_IO_STRICT_DEVMEM is not set\n\n#\n# x86 Debugging\n#\n# CONFIG_X86_VERBOSE_BOOTUP is not set\n# CONFIG_EARLY_PRINTK is not set\n# CONFIG_EFI_PGT_DUMP is not set\n# CONFIG_DEBUG_TLBFLUSH is not set\n# CONFIG_IOMMU_DEBUG is not set\nCONFIG_HAVE_MMIOTRACE_SUPPORT=y\n# CONFIG_X86_DECODER_SELFTEST is not set\nCONFIG_IO_DELAY_0X80=y\n# CONFIG_IO_DELAY_0XED is not set\n# CONFIG_IO_DELAY_UDELAY is not set\n# CONFIG_IO_DELAY_NONE is not set\n# CONFIG_DEBUG_BOOT_PARAMS is not set\n# CONFIG_CPA_DEBUG is not set\n# CONFIG_DEBUG_ENTRY is not set\n# CONFIG_DEBUG_NMI_SELFTEST is not set\nCONFIG_X86_DEBUG_FPU=y\n# CONFIG_PUNIT_ATOM_DEBUG is not set\n# CONFIG_UNWINDER_ORC is not set\nCONFIG_UNWINDER_FRAME_POINTER=y\n# end of x86 Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\nCONFIG_FUNCTION_ERROR_INJECTION=y\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\nCONFIG_RUNTIME_TESTING_MENU=y\n# CONFIG_LKDTM is not set\n# CONFIG_TEST_MIN_HEAP is not set\n# CONFIG_TEST_DIV64 is not set\n# CONFIG_BACKTRACE_SELF_TEST is not set\n# CONFIG_TEST_REF_TRACKER is not set\n# CONFIG_RBTREE_TEST is not set\n# CONFIG_REED_SOLOMON_TEST is not set\n# CONFIG_INTERVAL_TREE_TEST is not set\n# CONFIG_PERCPU_TEST is not set\n# CONFIG_ATOMIC64_SELFTEST is not set\n# CONFIG_TEST_HEXDUMP is not set\n# CONFIG_STRING_SELFTEST is not set\n# CONFIG_TEST_STRING_HELPERS is not set\n# CONFIG_TEST_STRSCPY is not set\n# CONFIG_TEST_KSTRTOX is not set\n# CONFIG_TEST_PRINTF is not set\n# CONFIG_TEST_SCANF is not set\n# CONFIG_TEST_BITMAP is not set\n# CONFIG_TEST_UUID is not set\n# CONFIG_TEST_XARRAY is not set\n# CONFIG_TEST_MAPLE_TREE is not set\n# CONFIG_TEST_RHASHTABLE is not set\n# CONFIG_TEST_SIPHASH is not set\n# CONFIG_TEST_IDA is not set\n# CONFIG_TEST_LKM is not set\n# CONFIG_TEST_BITOPS is not set\n# CONFIG_TEST_VMALLOC is not set\n# CONFIG_TEST_USER_COPY is not set\n# CONFIG_TEST_BPF is not set\n# CONFIG_TEST_BLACKHOLE_DEV is not set\n# CONFIG_FIND_BIT_BENCHMARK is not set\n# CONFIG_TEST_FIRMWARE is not set\n# CONFIG_TEST_SYSCTL is not set\n# CONFIG_TEST_UDELAY is not set\n# CONFIG_TEST_STATIC_KEYS is not set\n# CONFIG_TEST_DYNAMIC_DEBUG is not set\n# CONFIG_TEST_KMOD is not set\n# CONFIG_TEST_MEMCAT_P is not set\n# CONFIG_TEST_MEMINIT is not set\n# CONFIG_TEST_FREE_PAGES is not set\n# CONFIG_TEST_FPU is not set\n# CONFIG_TEST_CLOCKSOURCE_WATCHDOG is not set\nCONFIG_ARCH_USE_MEMTEST=y\n# CONFIG_MEMTEST is not set\n# end of Kernel Testing and Coverage\n\n#\n# Rust hacking\n#\n# end of Rust hacking\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/Generic/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      x86_64)\n        # Valid TARGET_CPU values as defined at:\n        # https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html\n        # x86-64       A generic CPU with 64-bit extensions.\n        #\n        # x86-64-v2    e.g. AMD CPU - Bulldozer - (bdver1)\n        #                   Intel CPU - Nehalem - (nehalem)\n        #\n        # x86-64-v3    e.g. AMD CPU - Bulldozer GEN4 - (bdver4)\n        #                   Intel CPU - Haswell - (haswell)\n        TARGET_CPU=\"x86-64\"\n        ;;\n    esac\n\n  # Bootloader to use (syslinux / u-boot)\n    BOOTLOADER=\"syslinux\"\n\n  # Kernel target\n    KERNEL_TARGET=\"bzImage\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"\"\n\n  # Additional kernel dependencies\n    KERNEL_EXTRA_DEPENDS_TARGET=\"\"\n\n  # Kernel to use. values can be:\n  # default:  default mainline kernel\n    LINUX=\"default\"\n\n\n################################################################################\n# setup build defaults\n################################################################################\n\n  # Project CFLAGS\n    PROJECT_CFLAGS=\"\"\n\n  # SquashFS compression method (gzip / lzo / xz / zstd)\n    SQUASHFS_COMPRESSION=\"zstd\"\n\n\n################################################################################\n# setup project defaults\n################################################################################\n\n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"misc-firmware wlan-firmware dvb-firmware iwlwifi-firmware\"\n\n  # additional drivers to install:\n  # for a list of additional drivers see packages/linux-drivers\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_DRIVERS+=\" DRIVER1 DRIVER2\"\n    ADDITIONAL_DRIVERS+=\" bcm_sta\"\n\n  # build and install driver addons (yes / no)\n    DRIVER_ADDONS_SUPPORT=\"no\"\n\n  # driver addons to install:\n  # for a list of additional drivers see packages/linux-driver-addons\n  # Space separated list is supported,\n    DRIVER_ADDONS=\"crazycat digital_devices dvb-latest\"\n\n  # Default size of the ova image, in MB, eg. 4096\n    OVA_SIZE=\"4096\"\n"
  },
  {
    "path": "projects/Generic/packages/initramfs/config/initramfs.x86_64.conf",
    "content": "slink lib64 usr/lib 0777 0 0\nslink usr/lib64 lib 0777 0 0\n"
  },
  {
    "path": "projects/Generic/packages/linux/modprobe.d/ath9k.conf",
    "content": "# ath9k.conf: setup modload options for module ath9k.\n#\n# enable \"Channel Context support\" to avoid buffering in live TV\n\noptions ath9k use_chanctx=1\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/bootloader/canupdate.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n[ \"$1\" = \"iMX6.arm\" ] && exit 0 || exit 1\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/bootloader/install",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\ncp -av u-boot.img $INSTALL/usr/share/bootloader\ncp -av SPL $INSTALL/usr/share/bootloader\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/bootloader/mkimage",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/u-boot.img\" ]; then\n  echo \"image: writing u-boot.img to $(basename $DISK)\"\n  dd if=\"$RELEASE_DIR/3rdparty/bootloader/u-boot.img\" of=\"$DISK\" bs=1K seek=69 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\nfi\n\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/SPL\" ]; then\n  echo \"image: writing SPL to $(basename $DISK)\"\n  dd if=\"$RELEASE_DIR/3rdparty/bootloader/SPL\" of=\"$DISK\" bs=1K seek=1 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\nfi\n\necho \"image: copying device trees\"\nmcopy -s -o \"${RELEASE_DIR}/3rdparty/bootloader\"/imx6d*${UBOOT_SYSTEM}*.dtb ::\nmcopy -s -o \"${RELEASE_DIR}/3rdparty/bootloader\"/imx6q*${UBOOT_SYSTEM}*.dtb ::\n\necho \"image: copying exlinux.conf\"\nmkdir -p \"${LE_TMP}/extlinux\"\ncat << EOF > \"${LE_TMP}/extlinux/extlinux.conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDTDIR /\n  APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}\nEOF\nmcopy -s -o \"${LE_TMP}/extlinux\" ::\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/bootloader/release",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nSRCDIR=\"$BUILD/image/system/usr/share/bootloader\"\nDSTDIR=\"$RELEASE_DIR/3rdparty/bootloader\"\n\nmkdir -p \"$DSTDIR\"\n  if [ -n \"$UBOOT_SYSTEM\" ]; then\n    cp -a \"$SRCDIR/u-boot.img\" \"$DSTDIR\"\n    cp -a \"$SRCDIR/SPL\" \"$DSTDIR\"\n  fi\n\n  cp -a \"$SRCDIR\"/*.dtb \"$DSTDIR\"\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/bootloader/update.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n[ -z \"$SYSTEM_ROOT\" ] && SYSTEM_ROOT=\"\"\n[ -z \"$BOOT_ROOT\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"$BOOT_PART\" ] && BOOT_PART=$(df \"$BOOT_ROOT\" | tail -1 | awk {' print $1 '})\nif [ -z \"$BOOT_DISK\" ]; then\n  case $BOOT_PART in\n    /dev/sd[a-z][0-9]*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,[0-9]*,,g\")\n      ;;\n    /dev/mmcblk*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,p[0-9]*,,g\")\n      ;;\n  esac\nfi\n\n# mount $BOOT_ROOT r/w\n  mount -o remount,rw $BOOT_ROOT\n\n# update extlinux device trees\n  for dtbfile in $BOOT_ROOT/*.dtb; do\n    dtb=$(basename $dtbfile)\n    echo \"Updating $dtb\"\n    cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT/ 2>/dev/null || true\n  done\n\n# update bootloader files\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/u-boot.img ]; then\n    echo \"Updating u-boot image on $BOOT_DISK\"\n    dd if=$SYSTEM_ROOT/usr/share/bootloader/u-boot.img of=\"$BOOT_DISK\" bs=1K seek=69 conv=fsync &>/dev/null\n  fi\n\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/SPL ]; then\n    echo \"Updating u-boot SPL on $BOOT_DISK\"\n    dd if=$SYSTEM_ROOT/usr/share/bootloader/SPL of=\"$BOOT_DISK\" bs=1k seek=1 conv=fsync &>/dev/null\n  fi\n\n# mount $BOOT_ROOT r/o\n  sync\n  mount -o remount,ro $BOOT_ROOT\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/filesystem/usr/bin/rdu-audio",
    "content": "#!/bin/sh\n\nif [ -z \"$1\" ]; then\n  echo \"usage: rdu-audio <0-100>\"\n  echo \"       The recommended level is 80\"\n  exit 1\nfi\n\nsleep 5\n\nVOLUME=\"$1%\"\n\namixer -q sset 'Headphone',0 $VOLUME\namixer -q sset 'Speaker',0 on\namixer -q sset 'Speaker Analog',0 $VOLUME\namixer -q sset 'Speaker Driver',0 $VOLUME\namixer -q sset 'Speaker Driver',0 on\namixer -q sset 'DAC',0 $VOLUME\namixer -q sset 'HP Analog',0 $VOLUME\namixer -q sset 'HP Driver',0 $VOLUME\namixer -q sset 'HP Driver',0 on\namixer -q sset 'HP Left',0 on\namixer -q sset 'HP Right',0 on\namixer -q sset 'Output Left From AIN1',0 on\namixer -q sset 'Output Left From AIN2',0 on\namixer -q sset 'Output Left From Left DAC',0 on\namixer -q sset 'Output Right From AIN2',0 on\namixer -q sset 'Output Right From Right DAC',0 on\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/filesystem/usr/bin/rdu-network",
    "content": "#!/bin/sh\n\nACTION=$1\n\nLOGGER_TAG=\"rdu-network\"\nMODEL=$(cat /sys/firmware/devicetree/base/model)\n\nIP_IFACE=\"\"\nBR_NAME=\"\"\nBR_IFACES=\"\"\nUNUSED_IFACES=\"\"\nUSED_IFACES=\"\"\n\nfunction log\n{\n    logger -t \"${LOGGER_TAG}\" \"$@\"\n}\n\nfunction logerr\n{\n    logger -t \"${LOGGER_TAG}\" -p \"err\" \"$@\"\n}\n\n# Select setup based on model\n\ncase \"${MODEL}\" in\n    \"ZII RDU2+ Board\" | \"ZII RDU2 Board\")\n        log \"Loading RDU2 networking setup...\"\n        IP_IFACE=\"eth1\"\n        BR_NAME=\"br0\"\n        BR_IFACES=\"netaux netleft netright gigabit_proc\"\n        ALL_IFACES=\"eth0 ${IP_IFACE} ${BR_IFACES} ${BR_NAME}\"\n        ;;\n    \"ZII RDU1 Board\")\n        log \"Loading RDU1 networking setup...\"\n        IP_IFACE=\"br0\"\n        BR_NAME=\"br0\"\n        BR_IFACES=\"netaux netleft netright\"\n        ALL_IFACES=\"eth0 ${BR_NAME} ${BR_IFACES}\"\n        ;;\n    *)\n        logerr \"invalid hardware model detected: ${MODEL}\"\n        exit 1\n        ;;\nesac\n\ncase \"${ACTION}\" in\n\n    \"start\")\n\n        # Assume RDU network is already started if the bridge is available\n        if [ -d /sys/class/net/${BR_NAME} ]; then\n            log \"Networking setup is already started\"\n            exit 0\n        fi\n\n        # Cleanup all addresses from all interfaces and bring them down\n        log \"Resetting interfaces...\"\n        for IFACE in ${ALL_IFACES}; do\n            log \"  Resetting ${IFACE}...\"\n            ip addr flush dev ${IFACE} >/dev/null 2>&1\n            ip link set dev ${IFACE} down >/dev/null 2>&1\n        done\n\n        # Create bridge with all interfaces\n        log \"Creating bridge interface...\"\n        brctl addbr ${BR_NAME} >/dev/null 2>&1\n        for IFACE in ${BR_IFACES}; do\n            log \"  Adding ${IFACE} to bridge...\"\n            brctl addif ${BR_NAME} ${IFACE} >/dev/null 2>&1\n        done\n\n        # Bring all bridge interfaces and the bridge itself up\n        log \"Bringing up all interfaces...\"\n        for IFACE in ${ALL_IFACES}; do\n            log \"  Bringing up ${IFACE}...\"\n            ip link set dev ${IFACE} up >/dev/null 2>&1\n        done\n\n        # All done\n        log \"RDU networking started\"\n        exit 0\n        ;;\n\n    \"stop\")\n\n        # Assume RDU network is already stopped if the bridge is available\n        if [ ! -d /sys/class/net/${BR_NAME} ]; then\n            log \"Networking setup is already stopped\"\n            exit 0\n        fi\n\n        # Cleanup all addresses from all interfaces and bring them down\n        log \"Resetting interfaces...\"\n        for IFACE in ${ALL_IFACES}; do\n            ip addr flush dev ${IFACE} >/dev/null 2>&1\n            ip link set dev ${IFACE} down >/dev/null 2>&1\n        done\n\n        # Remove bridge interfaces and bridge itself\n        log \"Removing bridge interface...\"\n        for IFACE in ${BR_IFACES}; do\n            brctl delif ${BR_NAME} ${IFACE} >/dev/null 2>&1\n        done\n        brctl delbr ${BR_NAME} >/dev/null 2>&1\n\n        # All done\n        log \"RDU networking stopped\"\n        exit 0\n        ;;\n\n    *)\n        logerr \"invalid action requested: ${ACTION}\"\n        exit 2\n        ;;\nesac\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/filesystem/usr/lib/systemd/system/rdu-audio.service",
    "content": "[Unit]\nDescription=RDU audio setup\nAfter=sound.target\nConditionPathExistsGlob=/flash/imx6*-zii-rdu2.dtb\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/rdu-audio 70\nRemainAfterExit=true\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/filesystem/usr/lib/systemd/system/rdu-network.service",
    "content": "[Unit]\nDescription=RDU network setup\nAfter=network-pre.target\nConditionPathExistsGlob=/flash/imx6*-zii-rdu2.dtb\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/rdu-network start\nRemainAfterExit=true\nExecStop=/usr/bin/rdu-network stop\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/filesystem/usr/share/alsa/cards/dw-hdmi-ahb-aud.conf",
    "content": "#\n# All PCM must be 24-bit for easy kernel conversion.\n# IEC958 formatted output can be sent directly.\n#\n# Direct-to-hardware converting to 24-bit output.\n#\ndw-hdmi-ahb-aud.pcm.hw-s24le {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype linear\n\tslave.pcm { \n\t\ttype hw\n\t\tcard $CARD\n\t}\n\tslave.format S24_LE\n}\n\n#\n# Dmix hardware 24-bit output.\n#\ndw-hdmi-ahb-aud.pcm.dmix-s24le {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype plug\n\tslave.pcm { @func concat strings [ \"dmix:\" $CARD \",FORMAT=S24_LE\" ] }\n}\n\n#\n# Softvol with dmix output\n#\ndw-hdmi-ahb-aud.pcm.default {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype asym\n\tplayback.pcm {\n\t\ttype softvol\n\t\tslave.pcm {\n\t\t\t@func refer name { \n\t\t\t\t@func concat strings [\n\t\t\t\t\t\"cards.\"\n\t\t\t\t\t{ @func card_driver card $CARD }\n\t\t\t\t\t\".pcm.dmix-s24le:CARD=\" $CARD\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t\tcontrol {\n\t\t\tname \"PCM Playback Volume\"\n\t\t\tcard $CARD\n\t\t}\n\t}\n}\n\n#\n# Common output path for front and surround outputs\n#\ndw-hdmi-ahb-aud.pcm.common.0 {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype asym\n\tplayback.pcm {\n\t\ttype softvol\n\t\tslave.pcm {\n\t\t\t@func refer name { \n\t\t\t\t@func concat strings [\n\t\t\t\t\t\"cards.\"\n\t\t\t\t\t{ @func card_driver card $CARD }\n\t\t\t\t\t\".pcm.hw-s24le:CARD=\" $CARD\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t\tcontrol {\n\t\t\tname \"PCM Playback Volume\"\n\t\t\tcard $CARD\n\t\t}\n\t}\n}\n\n<confdir:pcm/front.conf>\n\ndw-hdmi-ahb-aud.pcm.front.0 cards.dw-hdmi-ahb-aud.pcm.common.0\n\n# The mapping of ALSA channels to surround channels is very imprecise.\n# ALSA uses a different terminology and speaker placement to the CEA\n# surround positioning.  CEA has the positioning of:\n#\n#\t\t\tLFE\n#\tFL\tFLC\tFC\tFRC\tFR\n#\n#\n#\tRL\tRLC\tRC\tRRC\tRR\n#\n# ALSA's idea is:\n#\n#\t\t\tLFE\n#\t\tFL\tC\tFR\n#\n#\t\tSL\t\tSR\n#\n#\t\tRL\t\tRR\n#\n# We do our best to map between these representations.\n\n<confdir:pcm/surround40.conf>\n\ndw-hdmi-ahb-aud.pcm.surround40.0 {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype empty\n\tslave.pcm {\n\t\t@func refer\n\t\tname { \n\t\t\t@func concat strings [\n\t\t\t\t\"cards.dw-hdmi-ahb-aud.pcm.common.0:CARD=\"\n\t\t\t\t$CARD\n\t\t\t]\n\t\t}\n\t}\n}\n\n# surround 41 and surround50 are (annoyingly) mapped to surround51\n# We could do without stacking two 'route' plugins on top of each other\n\n<confdir:pcm/surround41.conf>\n<confdir:pcm/surround50.conf>\n<confdir:pcm/surround51.conf>\n\ndw-hdmi-ahb-aud.pcm.surround51.0 {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype route\n\tslave.pcm {\n\t\t@func refer\n\t\tname { \n\t\t\t@func concat strings [\n\t\t\t\t\"cards.dw-hdmi-ahb-aud.pcm.common.0:CARD=\"\n\t\t\t\t$CARD\n\t\t\t]\n\t\t}\n\t}\n\tttable.0.0 1.0 # FL  -> slave 0 -> hdmi 0 FL\n\tttable.1.1 1.0 # FR  -> slave 1 -> hdmi 1 FR\n\tttable.2.4 1.0 # RL  -> slave 4 -> hdmi 4 RL\n\tttable.3.5 1.0 # RR  -> slave 5 -> hdmi 5 RR\n\tttable.4.3 1.0 # C   -> slave 3 -> hdmi 3 FC \n\tttable.5.2 1.0 # LFE -> slave 2 -> hdmi 2 LFE\n}\n\n<confdir:pcm/surround71.conf>\n\ndw-hdmi-ahb-aud.pcm.surround71.0 {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype route\n\tslave.pcm {\n\t\t@func refer\n\t\tname { \n\t\t\t@func concat strings [\n\t\t\t\t\"cards.dw-hdmi-ahb-aud.pcm.common.0:CARD=\"\n\t\t\t\t$CARD\n\t\t\t]\n\t\t}\n\t}\n\tslave.channels 8\n\tttable.0.0 1.0 # FL  -> slave 0 -> hdmi 0 FL\n\tttable.1.1 1.0 # FR  -> slave 1 -> hdmi 1 FR\n\tttable.2.6 1.0 # RL  -> slave 6 -> hdmi 6 RLC/FLC\n\tttable.3.7 1.0 # RR  -> slave 7 -> hdmi 7 RRC/FRC\n\tttable.4.3 1.0 # C   -> slave 3 -> hdmi 3 FC\n\tttable.5.2 1.0 # LFE -> slave 2 -> hdmi 2 LFE\n\tttable.6.4 1.0 # SL  -> slave 4 -> hdmi 4 RL\n\tttable.7.5 1.0 # SR  -> slave 5 -> hdmi 5 RR\n}\n\n<confdir:pcm/hdmi.conf>\n\ndw-hdmi-ahb-aud.pcm.hdmi.0 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\ttype iec958\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t}\n\tslave.format IEC958_SUBFRAME_LE\n\t# $AES3 must be correct for some AV receivers to accept the stream\n\tstatus [ $AES0 $AES1 $AES2 $AES3 ]\n}\n\n<confdir:pcm/iec958.conf>\n\ndw-hdmi-ahb-aud.pcm.iec958.0 cards.dw-hdmi-ahb-aud.pcm.hdmi.0\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/linux/linux.arm.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm 6.1.1 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"armv7a-libreelec-linux-gnueabihf-gcc-12.2.0 (GCC) 12.2.0\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=120200\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23900\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23900\nCONFIG_LLD_VERSION=0\nCONFIG_CC_CAN_LINK=y\nCONFIG_CC_CAN_LINK_STATIC=y\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\nCONFIG_LOCALVERSION_AUTO=y\nCONFIG_BUILD_SALT=\"\"\nCONFIG_HAVE_KERNEL_GZIP=y\nCONFIG_HAVE_KERNEL_LZMA=y\nCONFIG_HAVE_KERNEL_XZ=y\nCONFIG_HAVE_KERNEL_LZO=y\nCONFIG_HAVE_KERNEL_LZ4=y\n# CONFIG_KERNEL_GZIP is not set\n# CONFIG_KERNEL_LZMA is not set\n# CONFIG_KERNEL_XZ is not set\nCONFIG_KERNEL_LZO=y\n# CONFIG_KERNEL_LZ4 is not set\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\n# CONFIG_WATCH_QUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_IRQ_IPI=y\nCONFIG_GENERIC_MSI_IRQ=y\nCONFIG_GENERIC_MSI_IRQ_DOMAIN=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_GENERIC_IRQ_MULTI_HANDLER=y\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\nCONFIG_CONTEXT_TRACKING=y\nCONFIG_CONTEXT_TRACKING_IDLE=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\n# CONFIG_BPF_JIT is not set\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# end of BPF subsystem\n\nCONFIG_PREEMPT_VOLUNTARY_BUILD=y\n# CONFIG_PREEMPT_NONE is not set\nCONFIG_PREEMPT_VOLUNTARY=y\n# CONFIG_PREEMPT is not set\nCONFIG_PREEMPT_COUNT=y\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\nCONFIG_SCHED_THERMAL_PRESSURE=y\n# CONFIG_BSD_PROCESS_ACCT is not set\n# CONFIG_TASKSTATS is not set\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\n# end of RCU Subsystem\n\nCONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=18\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# end of Scheduler features\n\nCONFIG_CC_IMPLICIT_FALLTHROUGH=\"-Wimplicit-fallthrough=5\"\nCONFIG_GCC11_NO_ARRAY_BOUNDS=y\nCONFIG_GCC12_NO_ARRAY_BOUNDS=y\nCONFIG_CC_NO_ARRAY_BOUNDS=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\n# CONFIG_CGROUP_FAVOR_DYNMODS is not set\nCONFIG_MEMCG=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_BLK_CGROUP=y\nCONFIG_CGROUP_WRITEBACK=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\nCONFIG_CGROUP_PIDS=y\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_CGROUP_PERF=y\nCONFIG_CGROUP_BPF=y\n# CONFIG_CGROUP_MISC is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_CHECKPOINT_RESTORE is not set\n# CONFIG_SCHED_AUTOGROUP is not set\n# CONFIG_SYSFS_DEPRECATED is not set\nCONFIG_RELAY=y\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"@INITRAMFS_SOURCE@\"\nCONFIG_INITRAMFS_FORCE=y\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\n# CONFIG_RD_GZIP is not set\n# CONFIG_RD_BZIP2 is not set\n# CONFIG_RD_LZMA is not set\n# CONFIG_RD_XZ is not set\n# CONFIG_RD_LZO is not set\n# CONFIG_RD_LZ4 is not set\nCONFIG_RD_ZSTD=y\n# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set\nCONFIG_INITRAMFS_COMPRESSION_NONE=y\n# CONFIG_BOOT_CONFIG is not set\nCONFIG_INITRAMFS_PRESERVE_MTIME=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_EXPERT=y\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\n# CONFIG_SGETMASK_SYSCALL is not set\nCONFIG_SYSFS_SYSCALL=y\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\nCONFIG_KALLSYMS_ALL=y\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_DEBUG_RSEQ is not set\n# CONFIG_EMBEDDED is not set\nCONFIG_HAVE_PERF_EVENTS=y\nCONFIG_PERF_USE_VMALLOC=y\n# CONFIG_PC104 is not set\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_SYSTEM_DATA_VERIFICATION=y\n# CONFIG_PROFILING is not set\nCONFIG_TRACEPOINTS=y\n# end of General setup\n\nCONFIG_ARM=y\nCONFIG_ARM_HAS_GROUP_RELOCS=y\nCONFIG_SYS_SUPPORTS_APM_EMULATION=y\nCONFIG_HAVE_PROC_CPU=y\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_ARM_PATCH_PHYS_VIRT=y\nCONFIG_GENERIC_BUG=y\nCONFIG_PGTABLE_LEVELS=2\n\n#\n# System Type\n#\nCONFIG_MMU=y\nCONFIG_ARCH_MMAP_RND_BITS_MIN=8\nCONFIG_ARCH_MMAP_RND_BITS_MAX=16\nCONFIG_ARCH_MULTIPLATFORM=y\n\n#\n# Platform selection\n#\n\n#\n# CPU Core family selection\n#\n# CONFIG_ARCH_MULTI_V6 is not set\nCONFIG_ARCH_MULTI_V7=y\nCONFIG_ARCH_MULTI_V6_V7=y\n# end of Platform selection\n\n# CONFIG_ARCH_VIRT is not set\n# CONFIG_ARCH_AIROHA is not set\n# CONFIG_ARCH_ACTIONS is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_ARTPEC is not set\n# CONFIG_ARCH_ASPEED is not set\n# CONFIG_ARCH_AT91 is not set\n# CONFIG_ARCH_BCM is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_DIGICOLOR is not set\n# CONFIG_ARCH_DOVE is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_HIGHBANK is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_HPE is not set\nCONFIG_ARCH_MXC=y\nCONFIG_HAVE_IMX_ANATOP=y\nCONFIG_HAVE_IMX_GPC=y\nCONFIG_HAVE_IMX_MMDC=y\nCONFIG_HAVE_IMX_SRC=y\n\n#\n# Cortex-A platforms\n#\n# CONFIG_SOC_IMX50 is not set\n# CONFIG_SOC_IMX51 is not set\n# CONFIG_SOC_IMX53 is not set\nCONFIG_SOC_IMX6=y\nCONFIG_SOC_IMX6Q=y\nCONFIG_SOC_IMX6SL=y\nCONFIG_SOC_IMX6SLL=y\nCONFIG_SOC_IMX6SX=y\nCONFIG_SOC_IMX6UL=y\n# CONFIG_SOC_LS1021A is not set\n\n#\n# Cortex-A/Cortex-M asymmetric multiprocessing platforms\n#\n# CONFIG_SOC_IMX7D is not set\n# CONFIG_SOC_IMX7ULP is not set\n# CONFIG_SOC_VF610 is not set\n# CONFIG_ARCH_KEYSTONE is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_MESON is not set\n# CONFIG_ARCH_MILBEAUT is not set\n# CONFIG_ARCH_MMP is not set\n# CONFIG_ARCH_MSTARV7 is not set\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_NPCM is not set\n\n#\n# TI OMAP/AM/DM/DRA Family\n#\n# CONFIG_ARCH_OMAP3 is not set\n# CONFIG_ARCH_OMAP4 is not set\n# CONFIG_SOC_OMAP5 is not set\n# CONFIG_SOC_AM33XX is not set\n# CONFIG_SOC_AM43XX is not set\n# CONFIG_SOC_DRA7XX is not set\n# end of TI OMAP/AM/DM/DRA Family\n\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_RDA is not set\n# CONFIG_ARCH_REALTEK is not set\n# CONFIG_ARCH_ROCKCHIP is not set\n# CONFIG_ARCH_S5PV210 is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_INTEL_SOCFPGA is not set\n# CONFIG_PLAT_SPEAR is not set\n# CONFIG_ARCH_STI is not set\n# CONFIG_ARCH_STM32 is not set\n# CONFIG_ARCH_SUNPLUS is not set\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_U8500 is not set\n# CONFIG_ARCH_REALVIEW is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_WM8850 is not set\n# CONFIG_ARCH_ZYNQ is not set\n\n#\n# Processor Type\n#\nCONFIG_CPU_V7=y\nCONFIG_CPU_THUMB_CAPABLE=y\nCONFIG_CPU_32v6K=y\nCONFIG_CPU_32v7=y\nCONFIG_CPU_ABRT_EV7=y\nCONFIG_CPU_PABRT_V7=y\nCONFIG_CPU_CACHE_V7=y\nCONFIG_CPU_CACHE_VIPT=y\nCONFIG_CPU_COPY_V6=y\nCONFIG_CPU_TLB_V7=y\nCONFIG_CPU_HAS_ASID=y\nCONFIG_CPU_CP15=y\nCONFIG_CPU_CP15_MMU=y\n\n#\n# Processor Features\n#\n# CONFIG_ARM_LPAE is not set\nCONFIG_ARM_THUMB=y\n# CONFIG_ARM_THUMBEE is not set\nCONFIG_ARM_VIRT_EXT=y\nCONFIG_SWP_EMULATE=y\nCONFIG_CPU_LITTLE_ENDIAN=y\n# CONFIG_CPU_BIG_ENDIAN is not set\n# CONFIG_CPU_ICACHE_DISABLE is not set\n# CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND is not set\n# CONFIG_CPU_BPREDICT_DISABLE is not set\nCONFIG_CPU_SPECTRE=y\nCONFIG_HARDEN_BRANCH_PREDICTOR=y\nCONFIG_HARDEN_BRANCH_HISTORY=y\nCONFIG_KUSER_HELPERS=y\nCONFIG_VDSO=y\nCONFIG_OUTER_CACHE=y\nCONFIG_OUTER_CACHE_SYNC=y\nCONFIG_MIGHT_HAVE_CACHE_L2X0=y\nCONFIG_CACHE_L2X0=y\n# CONFIG_CACHE_L2X0_PMU is not set\n# CONFIG_PL310_ERRATA_588369 is not set\n# CONFIG_PL310_ERRATA_727915 is not set\n# CONFIG_PL310_ERRATA_753970 is not set\nCONFIG_PL310_ERRATA_769419=y\nCONFIG_ARM_L1_CACHE_SHIFT_6=y\nCONFIG_ARM_L1_CACHE_SHIFT=6\nCONFIG_ARM_DMA_MEM_BUFFERABLE=y\nCONFIG_ARM_HEAVY_MB=y\nCONFIG_DEBUG_ALIGN_RODATA=y\n# CONFIG_ARM_ERRATA_430973 is not set\nCONFIG_ARM_ERRATA_643719=y\nCONFIG_ARM_ERRATA_720789=y\nCONFIG_ARM_ERRATA_754322=y\nCONFIG_ARM_ERRATA_754327=y\nCONFIG_ARM_ERRATA_764369=y\nCONFIG_ARM_ERRATA_764319=y\nCONFIG_ARM_ERRATA_775420=y\n# CONFIG_ARM_ERRATA_798181 is not set\n# CONFIG_ARM_ERRATA_773022 is not set\n# CONFIG_ARM_ERRATA_818325_852422 is not set\n# CONFIG_ARM_ERRATA_821420 is not set\n# CONFIG_ARM_ERRATA_825619 is not set\n# CONFIG_ARM_ERRATA_857271 is not set\n# CONFIG_ARM_ERRATA_852421 is not set\n# CONFIG_ARM_ERRATA_852423 is not set\n# CONFIG_ARM_ERRATA_857272 is not set\n# end of System Type\n\n#\n# Bus support\n#\nCONFIG_ARM_ERRATA_814220=y\n# end of Bus support\n\n#\n# Kernel Features\n#\nCONFIG_HAVE_SMP=y\nCONFIG_SMP=y\nCONFIG_SMP_ON_UP=y\nCONFIG_CURRENT_POINTER_IN_TPIDRURO=y\nCONFIG_IRQSTACKS=y\nCONFIG_ARM_CPU_TOPOLOGY=y\n# CONFIG_SCHED_MC is not set\n# CONFIG_SCHED_SMT is not set\nCONFIG_HAVE_ARM_SCU=y\nCONFIG_HAVE_ARM_ARCH_TIMER=y\nCONFIG_HAVE_ARM_TWD=y\n# CONFIG_MCPM is not set\n# CONFIG_BIG_LITTLE is not set\nCONFIG_VMSPLIT_3G=y\n# CONFIG_VMSPLIT_3G_OPT is not set\n# CONFIG_VMSPLIT_2G is not set\n# CONFIG_VMSPLIT_1G is not set\nCONFIG_PAGE_OFFSET=0xC0000000\nCONFIG_NR_CPUS=4\nCONFIG_HOTPLUG_CPU=y\nCONFIG_ARM_PSCI=y\nCONFIG_ARCH_NR_GPIO=0\nCONFIG_HZ_FIXED=0\nCONFIG_HZ_100=y\n# CONFIG_HZ_200 is not set\n# CONFIG_HZ_250 is not set\n# CONFIG_HZ_300 is not set\n# CONFIG_HZ_500 is not set\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=100\nCONFIG_SCHED_HRTICK=y\n# CONFIG_THUMB2_KERNEL is not set\nCONFIG_ARM_PATCH_IDIV=y\nCONFIG_AEABI=y\n# CONFIG_OABI_COMPAT is not set\nCONFIG_ARCH_SELECT_MEMORY_MODEL=y\nCONFIG_ARCH_FLATMEM_ENABLE=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_HIGHMEM=y\nCONFIG_HIGHPTE=y\nCONFIG_CPU_SW_DOMAIN_PAN=y\nCONFIG_HW_PERF_EVENTS=y\n# CONFIG_ARM_MODULE_PLTS is not set\nCONFIG_ARCH_FORCE_MAX_ORDER=11\nCONFIG_ALIGNMENT_TRAP=y\n# CONFIG_UACCESS_WITH_MEMCPY is not set\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\n# CONFIG_XEN is not set\nCONFIG_CC_HAVE_STACKPROTECTOR_TLS=y\nCONFIG_STACKPROTECTOR_PER_TASK=y\n# end of Kernel Features\n\n#\n# Boot options\n#\nCONFIG_USE_OF=y\nCONFIG_ATAGS=y\n# CONFIG_UNUSED_BOARD_FILES is not set\n# CONFIG_DEPRECATED_PARAM_STRUCT is not set\nCONFIG_ZBOOT_ROM_TEXT=0\nCONFIG_ZBOOT_ROM_BSS=0\n# CONFIG_ARM_APPENDED_DTB is not set\nCONFIG_CMDLINE=\"root=/dev/ram0 rdinit=/init rw rootwait\"\n# CONFIG_CMDLINE_FROM_BOOTLOADER is not set\nCONFIG_CMDLINE_EXTEND=y\n# CONFIG_CMDLINE_FORCE is not set\nCONFIG_KEXEC=y\nCONFIG_ATAGS_PROC=y\n# CONFIG_CRASH_DUMP is not set\nCONFIG_AUTO_ZRELADDR=y\n# CONFIG_EFI is not set\n# end of Boot options\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\n# CONFIG_CPU_FREQ_STAT is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=y\nCONFIG_CPU_FREQ_GOV_USERSPACE=y\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\nCONFIG_CPU_FREQ_GOV_CONSERVATIVE=y\n# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set\n\n#\n# CPU frequency scaling drivers\n#\n# CONFIG_CPUFREQ_DT is not set\nCONFIG_ARM_IMX6Q_CPUFREQ=y\n# end of CPU Frequency scaling\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\n\n#\n# ARM CPU Idle Drivers\n#\n# CONFIG_ARM_CPUIDLE is not set\n# CONFIG_ARM_PSCI_CPUIDLE is not set\n# CONFIG_ARM_HIGHBANK_CPUIDLE is not set\n# end of ARM CPU Idle Drivers\n# end of CPU Idle\n# end of CPU Power Management\n\n#\n# Floating point emulation\n#\n\n#\n# At least one emulation must be selected\n#\nCONFIG_VFP=y\nCONFIG_VFPv3=y\nCONFIG_NEON=y\n# CONFIG_KERNEL_MODE_NEON is not set\n# end of Floating point emulation\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_SUSPEND_SKIP_SYNC is not set\n# CONFIG_HIBERNATION is not set\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_USERSPACE_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\nCONFIG_PM=y\nCONFIG_PM_DEBUG=y\n# CONFIG_PM_ADVANCED_DEBUG is not set\nCONFIG_PM_TEST_SUSPEND=y\nCONFIG_PM_SLEEP_DEBUG=y\n# CONFIG_APM_EMULATION is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\n# CONFIG_ENERGY_MODEL is not set\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\nCONFIG_ARM_CPU_SUSPEND=y\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\n# end of Power management options\n\nCONFIG_AS_VFP_VMRS_FPINST=y\n\n#\n# General architecture-dependent options\n#\nCONFIG_CRASH_CORE=y\nCONFIG_KEXEC_CORE=y\n# CONFIG_KPROBES is not set\n# CONFIG_JUMP_LABEL is not set\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_ARCH_USE_BUILTIN_BSWAP=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_HAVE_OPTPROBES=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_KEEPINITRD=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_32BIT_OFF_T=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_ARCH_WANT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_LTO_NONE=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_REL=y\nCONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y\nCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_HAVE_EXIT_THREAD=y\nCONFIG_ARCH_MMAP_RND_BITS=8\nCONFIG_PAGE_SIZE_LESS_THAN_64KB=y\nCONFIG_PAGE_SIZE_LESS_THAN_256KB=y\nCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_ARCH_OPTIONAL_KERNEL_RWX=y\nCONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_HAVE_ARCH_PFN_VALID=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\nCONFIG_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set\nCONFIG_MODVERSIONS=y\nCONFIG_MODULE_SRCVERSION_ALL=y\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/sbin/modprobe\"\n# CONFIG_TRIM_UNUSED_KSYMS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\n# CONFIG_BLOCK_LEGACY_AUTOLOAD is not set\nCONFIG_BLK_CGROUP_RWSTAT=y\n# CONFIG_BLK_DEV_BSGLIB is not set\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_DEV_ZONED is not set\nCONFIG_BLK_DEV_THROTTLING=y\n# CONFIG_BLK_DEV_THROTTLING_LOW is not set\n# CONFIG_BLK_WBT is not set\n# CONFIG_BLK_CGROUP_IOLATENCY is not set\n# CONFIG_BLK_CGROUP_IOCOST is not set\n# CONFIG_BLK_CGROUP_IOPRIO is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\n# CONFIG_PARTITION_ADVANCED is not set\nCONFIG_MSDOS_PARTITION=y\nCONFIG_EFI_PARTITION=y\n# end of Partition Types\n\nCONFIG_BLK_MQ_PCI=y\nCONFIG_BLK_PM=y\nCONFIG_BLOCK_HOLDER_DEPRECATED=y\nCONFIG_BLK_MQ_STACKING=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\n# CONFIG_IOSCHED_BFQ is not set\n# end of IO Schedulers\n\nCONFIG_ASN1=y\nCONFIG_UNINLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\n# CONFIG_BINFMT_ELF_FDPIC is not set\nCONFIG_ELFCORE=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\nCONFIG_ARCH_HAS_BINFMT_FLAT=y\n# CONFIG_BINFMT_FLAT is not set\nCONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y\nCONFIG_BINFMT_MISC=m\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\nCONFIG_SWAP=y\n# CONFIG_ZSWAP is not set\n\n#\n# SLAB allocator options\n#\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# end of SLAB allocator options\n\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\n# CONFIG_COMPAT_BRK is not set\nCONFIG_SELECT_MEMORY_MODEL=y\nCONFIG_FLATMEM_MANUAL=y\n# CONFIG_SPARSEMEM_MANUAL is not set\nCONFIG_FLATMEM=y\nCONFIG_ARCH_KEEP_MEMBLOCK=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_COMPACTION=y\nCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1\n# CONFIG_PAGE_REPORTING is not set\nCONFIG_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\nCONFIG_BOUNCE=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_WANT_GENERAL_HUGETLB=y\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\n# CONFIG_CMA_DEBUGFS is not set\n# CONFIG_CMA_SYSFS is not set\nCONFIG_CMA_AREAS=7\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y\nCONFIG_VM_EVENT_COUNTERS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\nCONFIG_KMAP_LOCAL=y\nCONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_USERFAULTFD is not set\n# CONFIG_LRU_GEN is not set\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_NET_INGRESS=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_INTERFACE is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_XFRM_ESP=y\n# CONFIG_NET_KEY is not set\n# CONFIG_XDP_SOCKETS is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\n# CONFIG_IP_PNP_BOOTP is not set\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=y\n# CONFIG_IP_MROUTE is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=y\n# CONFIG_INET_ESP_OFFLOAD is not set\n# CONFIG_INET_ESPINTCP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=y\nCONFIG_INET_DIAG=y\nCONFIG_INET_TCP_DIAG=y\n# CONFIG_INET_UDP_DIAG is not set\n# CONFIG_INET_RAW_DIAG is not set\n# CONFIG_INET_DIAG_DESTROY is not set\n# CONFIG_TCP_CONG_ADVANCED is not set\nCONFIG_TCP_CONG_CUBIC=y\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_IPV6_VTI is not set\nCONFIG_IPV6_SIT=y\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\nCONFIG_IPV6_FOU=m\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_MPTCP is not set\n# CONFIG_NETWORK_SECMARK is not set\nCONFIG_NET_PTP_CLASSIFY=y\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\nCONFIG_NETFILTER_EGRESS=y\nCONFIG_NETFILTER_NETLINK=m\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\n# CONFIG_NETFILTER_NETLINK_LOG is not set\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\n# CONFIG_NF_LOG_SYSLOG is not set\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_ZONES is not set\nCONFIG_NF_CONNTRACK_PROCFS=y\nCONFIG_NF_CONNTRACK_EVENTS=y\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\nCONFIG_NF_CT_PROTO_DCCP=y\nCONFIG_NF_CT_PROTO_SCTP=y\nCONFIG_NF_CT_PROTO_UDPLITE=y\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\nCONFIG_NF_CONNTRACK_IRC=m\nCONFIG_NF_CONNTRACK_BROADCAST=m\nCONFIG_NF_CONNTRACK_NETBIOS_NS=m\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\nCONFIG_NF_CONNTRACK_SIP=m\nCONFIG_NF_CONNTRACK_TFTP=m\nCONFIG_NF_CT_NETLINK=m\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_IRC=m\nCONFIG_NF_NAT_SIP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=y\nCONFIG_NF_NAT_MASQUERADE=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\n# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\n# CONFIG_NETFILTER_XT_MATCH_OWNER is not set\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\n# CONFIG_NETFILTER_XT_MATCH_STATE is not set\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\nCONFIG_IP_VS=m\n# CONFIG_IP_VS_IPV6 is not set\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_MH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n# CONFIG_IP_VS_TWOS is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS MH scheduler\n#\nCONFIG_IP_VS_MH_TAB_INDEX=12\n\n#\n# IPVS application helper\n#\n# CONFIG_IP_VS_FTP is not set\nCONFIG_IP_VS_NFCT=y\n# CONFIG_IP_VS_PE_SIP is not set\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\n# CONFIG_NF_LOG_IPV6 is not set\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_MATCH_SRH is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\nCONFIG_NET_DSA=m\n# CONFIG_NET_DSA_TAG_AR9331 is not set\n# CONFIG_NET_DSA_TAG_BRCM is not set\n# CONFIG_NET_DSA_TAG_BRCM_LEGACY is not set\n# CONFIG_NET_DSA_TAG_BRCM_PREPEND is not set\n# CONFIG_NET_DSA_TAG_HELLCREEK is not set\n# CONFIG_NET_DSA_TAG_GSWIP is not set\nCONFIG_NET_DSA_TAG_DSA_COMMON=m\nCONFIG_NET_DSA_TAG_DSA=m\nCONFIG_NET_DSA_TAG_EDSA=m\n# CONFIG_NET_DSA_TAG_MTK is not set\n# CONFIG_NET_DSA_TAG_KSZ is not set\n# CONFIG_NET_DSA_TAG_OCELOT is not set\n# CONFIG_NET_DSA_TAG_OCELOT_8021Q is not set\n# CONFIG_NET_DSA_TAG_QCA is not set\n# CONFIG_NET_DSA_TAG_RTL4_A is not set\n# CONFIG_NET_DSA_TAG_RTL8_4 is not set\n# CONFIG_NET_DSA_TAG_RZN1_A5PSW is not set\n# CONFIG_NET_DSA_TAG_LAN9303 is not set\n# CONFIG_NET_DSA_TAG_SJA1105 is not set\n# CONFIG_NET_DSA_TAG_TRAILER is not set\n# CONFIG_NET_DSA_TAG_XRS700X is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\n# CONFIG_NET_SCH_FQ_CODEL is not set\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_TCINDEX is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_RSVP is not set\n# CONFIG_NET_CLS_RSVP6 is not set\n# CONFIG_NET_CLS_FLOW is not set\nCONFIG_NET_CLS_CGROUP=m\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\nCONFIG_NET_SWITCHDEV=y\nCONFIG_NET_L3_MASTER_DEV=y\n# CONFIG_QRTR is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_PCPU_DEV_REFCNT=y\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_SOCK_RX_QUEUE_MAPPING=y\nCONFIG_XPS=y\nCONFIG_CGROUP_NET_PRIO=y\nCONFIG_CGROUP_NET_CLASSID=y\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=y\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\nCONFIG_BT_RFCOMM_TTY=y\n# CONFIG_BT_BNEP is not set\n# CONFIG_BT_HIDP is not set\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\nCONFIG_BT_LEDS=y\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\nCONFIG_BT_DEBUGFS=y\n# CONFIG_BT_SELFTEST is not set\n# CONFIG_BT_FEATURE_DEBUG is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_QCA=m\nCONFIG_BT_MTK=m\nCONFIG_BT_HCIBTUSB=m\nCONFIG_BT_HCIBTUSB_AUTOSUSPEND=y\nCONFIG_BT_HCIBTUSB_BCM=y\nCONFIG_BT_HCIBTUSB_MTK=y\nCONFIG_BT_HCIBTUSB_RTL=y\nCONFIG_BT_HCIBTSDIO=m\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_SERDEV=y\nCONFIG_BT_HCIUART_H4=y\n# CONFIG_BT_HCIUART_NOKIA is not set\n# CONFIG_BT_HCIUART_BCSP is not set\n# CONFIG_BT_HCIUART_ATH3K is not set\nCONFIG_BT_HCIUART_LL=y\nCONFIG_BT_HCIUART_3WIRE=y\nCONFIG_BT_HCIUART_INTEL=y\nCONFIG_BT_HCIUART_BCM=y\n# CONFIG_BT_HCIUART_RTL is not set\nCONFIG_BT_HCIUART_QCA=y\nCONFIG_BT_HCIUART_AG6XX=y\nCONFIG_BT_HCIUART_MRVL=y\nCONFIG_BT_HCIBCM203X=m\nCONFIG_BT_HCIBPA10X=m\nCONFIG_BT_HCIBFUSB=m\nCONFIG_BT_HCIVHCI=m\nCONFIG_BT_MRVL=m\nCONFIG_BT_MRVL_SDIO=m\nCONFIG_BT_ATH3K=m\nCONFIG_BT_MTKSDIO=m\nCONFIG_BT_MTKUART=m\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=m\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\nCONFIG_CFG80211_CRDA_SUPPORT=y\nCONFIG_CFG80211_WEXT=y\nCONFIG_LIB80211=m\nCONFIG_LIB80211_CRYPT_WEP=m\nCONFIG_LIB80211_CRYPT_CCMP=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=m\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\n# CONFIG_MAC80211_LEDS is not set\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=m\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_NET_DEVLINK=y\nCONFIG_PAGE_POOL=y\n# CONFIG_PAGE_POOL_STATS is not set\n# CONFIG_FAILOVER is not set\nCONFIG_ETHTOOL_NETLINK=y\n\n#\n# Device Drivers\n#\nCONFIG_HAVE_PCI=y\nCONFIG_PCI=y\nCONFIG_PCI_DOMAINS=y\nCONFIG_PCI_DOMAINS_GENERIC=y\nCONFIG_PCI_SYSCALL=y\nCONFIG_PCIEPORTBUS=y\nCONFIG_PCIEAER=y\n# CONFIG_PCIEAER_INJECT is not set\n# CONFIG_PCIE_ECRC is not set\nCONFIG_PCIEASPM=y\nCONFIG_PCIEASPM_DEFAULT=y\n# CONFIG_PCIEASPM_POWERSAVE is not set\n# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set\n# CONFIG_PCIEASPM_PERFORMANCE is not set\nCONFIG_PCIE_PME=y\n# CONFIG_PCIE_DPC is not set\n# CONFIG_PCIE_PTM is not set\nCONFIG_PCI_MSI=y\nCONFIG_PCI_MSI_IRQ_DOMAIN=y\nCONFIG_PCI_QUIRKS=y\n# CONFIG_PCI_DEBUG is not set\n# CONFIG_PCI_STUB is not set\n# CONFIG_PCI_IOV is not set\n# CONFIG_PCI_PRI is not set\n# CONFIG_PCI_PASID is not set\n# CONFIG_PCIE_BUS_TUNE_OFF is not set\nCONFIG_PCIE_BUS_DEFAULT=y\n# CONFIG_PCIE_BUS_SAFE is not set\n# CONFIG_PCIE_BUS_PERFORMANCE is not set\n# CONFIG_PCIE_BUS_PEER2PEER is not set\nCONFIG_VGA_ARB=y\nCONFIG_VGA_ARB_MAX_GPUS=16\n# CONFIG_HOTPLUG_PCI is not set\n\n#\n# PCI controller drivers\n#\n# CONFIG_PCI_FTPCI100 is not set\n# CONFIG_PCI_HOST_GENERIC is not set\n# CONFIG_PCIE_XILINX is not set\n# CONFIG_PCI_V3_SEMI is not set\n# CONFIG_PCIE_ALTERA is not set\n# CONFIG_PCIE_MICROCHIP_HOST is not set\n\n#\n# DesignWare PCI Core Support\n#\nCONFIG_PCIE_DW=y\nCONFIG_PCIE_DW_HOST=y\n# CONFIG_PCIE_DW_PLAT_HOST is not set\nCONFIG_PCI_IMX6=y\n# CONFIG_PCI_LAYERSCAPE is not set\n# CONFIG_PCI_MESON is not set\n# end of DesignWare PCI Core Support\n\n#\n# Mobiveil PCIe Core Support\n#\n# end of Mobiveil PCIe Core Support\n\n#\n# Cadence PCIe controllers support\n#\n# CONFIG_PCIE_CADENCE_PLAT_HOST is not set\n# CONFIG_PCI_J721E_HOST is not set\n# end of Cadence PCIe controllers support\n# end of PCI controller drivers\n\n#\n# PCI Endpoint\n#\n# CONFIG_PCI_ENDPOINT is not set\n# end of PCI Endpoint\n\n#\n# PCI switch controller drivers\n#\n# CONFIG_PCI_SW_SWITCHTEC is not set\n# end of PCI switch controller drivers\n\n# CONFIG_CXL_BUS is not set\n# CONFIG_PCCARD is not set\n# CONFIG_RAPIDIO is not set\n\n#\n# Generic Driver Options\n#\n# CONFIG_UEVENT_HELPER is not set\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\n# CONFIG_DEVTMPFS_SAFE is not set\n# CONFIG_STANDALONE is not set\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\nCONFIG_FW_CACHE=y\n# CONFIG_FW_UPLOAD is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\nCONFIG_ALLOW_DEV_COREDUMP=y\nCONFIG_DEV_COREDUMP=y\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_SOC_BUS=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_MOXTET is not set\nCONFIG_IMX_WEIM=y\n# CONFIG_VEXPRESS_CONFIG is not set\n# CONFIG_FSL_MC_BUS is not set\n# CONFIG_MHI_BUS is not set\n# CONFIG_MHI_BUS_EP is not set\n# end of Bus devices\n\nCONFIG_CONNECTOR=y\nCONFIG_PROC_EVENTS=y\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\n# CONFIG_ARM_SCMI_PROTOCOL is not set\n# end of ARM System Control and Management Interface Protocol\n\n# CONFIG_FIRMWARE_MEMMAP is not set\n# CONFIG_FW_CFG_SYSFS is not set\n# CONFIG_TRUSTED_FOUNDATIONS is not set\n# CONFIG_GOOGLE_FIRMWARE is not set\nCONFIG_ARM_PSCI_FW=y\n# CONFIG_ARM_PSCI_CHECKER is not set\nCONFIG_HAVE_ARM_SMCCC=y\nCONFIG_HAVE_ARM_SMCCC_DISCOVERY=y\nCONFIG_ARM_SMCCC_SOC_ID=y\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n\n#\n# Partition parsers\n#\n# CONFIG_MTD_AR7_PARTS is not set\nCONFIG_MTD_CMDLINE_PARTS=y\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AFS_PARTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\n# end of Partition parsers\n\n#\n# User Modules And Translation Layers\n#\nCONFIG_MTD_BLKDEVS=y\nCONFIG_MTD_BLOCK=y\n\n#\n# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK.\n#\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\n# CONFIG_MTD_OOPS is not set\n# CONFIG_MTD_SWAP is not set\n# CONFIG_MTD_PARTITIONED_MASTER is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\nCONFIG_MTD_CFI=y\nCONFIG_MTD_JEDECPROBE=y\nCONFIG_MTD_GEN_PROBE=y\n# CONFIG_MTD_CFI_ADV_OPTIONS is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\nCONFIG_MTD_CFI_INTELEXT=y\nCONFIG_MTD_CFI_AMDSTD=y\nCONFIG_MTD_CFI_STAA=y\nCONFIG_MTD_CFI_UTIL=y\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n# end of RAM/ROM/Flash chip drivers\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_PHYSMAP is not set\n# CONFIG_MTD_IMPA7 is not set\n# CONFIG_MTD_INTEL_VR_NOR is not set\n# CONFIG_MTD_PLATRAM is not set\n# end of Mapping drivers for chip access\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_PMC551 is not set\nCONFIG_MTD_DATAFLASH=y\n# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set\n# CONFIG_MTD_DATAFLASH_OTP is not set\n# CONFIG_MTD_MCHP23K256 is not set\n# CONFIG_MTD_MCHP48L640 is not set\nCONFIG_MTD_SST25L=y\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\n# end of Self-contained MTD device drivers\n\n#\n# NAND\n#\n# CONFIG_MTD_ONENAND is not set\n# CONFIG_MTD_RAW_NAND is not set\n# CONFIG_MTD_SPI_NAND is not set\n\n#\n# ECC engine support\n#\n# CONFIG_MTD_NAND_ECC_SW_HAMMING is not set\n# CONFIG_MTD_NAND_ECC_SW_BCH is not set\n# CONFIG_MTD_NAND_ECC_MXIC is not set\n# end of ECC engine support\n# end of NAND\n\n#\n# LPDDR & LPDDR2 PCM memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\n# CONFIG_MTD_LPDDR2_NVM is not set\n# end of LPDDR & LPDDR2 PCM memory drivers\n\nCONFIG_MTD_SPI_NOR=y\nCONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y\n# CONFIG_MTD_SPI_NOR_SWP_DISABLE is not set\nCONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y\n# CONFIG_MTD_SPI_NOR_SWP_KEEP is not set\nCONFIG_MTD_UBI=y\nCONFIG_MTD_UBI_WL_THRESHOLD=4096\nCONFIG_MTD_UBI_BEB_LIMIT=20\nCONFIG_MTD_UBI_FASTMAP=y\n# CONFIG_MTD_UBI_GLUEBI is not set\nCONFIG_MTD_UBI_BLOCK=y\n# CONFIG_MTD_HYPERBUS is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\n# CONFIG_OF_OVERLAY is not set\nCONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\n# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set\n# CONFIG_ZRAM is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=8\n# CONFIG_BLK_DEV_DRBD is not set\n# CONFIG_BLK_DEV_NBD is not set\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=16\nCONFIG_BLK_DEV_RAM_SIZE=65536\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_UBLK is not set\n\n#\n# NVME Support\n#\n# CONFIG_BLK_DEV_NVME is not set\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TCP is not set\n# CONFIG_NVME_TARGET is not set\n# end of NVME Support\n\n#\n# Misc devices\n#\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_PHANTOM is not set\n# CONFIG_TIFM_CORE is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_HP_ILO is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\nCONFIG_SRAM=y\nCONFIG_SRAM_EXEC=y\n# CONFIG_DW_XDATA_PCIE is not set\n# CONFIG_PCI_ENDPOINT_TEST is not set\n# CONFIG_XILINX_SDFEC is not set\n# CONFIG_HISI_HIKEY_USB is not set\n# CONFIG_OPEN_DICE is not set\n# CONFIG_VCPU_STALL_DETECTOR is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\nCONFIG_EEPROM_AT24=y\nCONFIG_EEPROM_AT25=y\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\n# CONFIG_EEPROM_93CX6 is not set\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_EEPROM_EE1004 is not set\n# end of EEPROM support\n\n# CONFIG_CB710_CORE is not set\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n# CONFIG_ECHO is not set\n# CONFIG_BCM_VK is not set\n# CONFIG_MISC_ALCOR_PCI is not set\n# CONFIG_MISC_RTSX_PCI is not set\n# CONFIG_MISC_RTSX_USB is not set\n# CONFIG_HABANA_AI is not set\n# CONFIG_PVPANIC is not set\n# CONFIG_GP_PCI1XXXX is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_PROC_FS is not set\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\n# CONFIG_BLK_DEV_SR is not set\nCONFIG_CHR_DEV_SG=m\n# CONFIG_BLK_DEV_BSG is not set\n# CONFIG_CHR_DEV_SCH is not set\nCONFIG_SCSI_CONSTANTS=y\nCONFIG_SCSI_LOGGING=y\nCONFIG_SCSI_SCAN_ASYNC=y\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\n# CONFIG_SCSI_LOWLEVEL is not set\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\nCONFIG_ATA=y\nCONFIG_SATA_HOST=y\nCONFIG_PATA_TIMINGS=y\nCONFIG_ATA_VERBOSE_ERROR=y\nCONFIG_ATA_FORCE=y\nCONFIG_SATA_PMP=y\n\n#\n# Controllers with non-SFF native interface\n#\n# CONFIG_SATA_AHCI is not set\nCONFIG_SATA_AHCI_PLATFORM=y\n# CONFIG_AHCI_DWC is not set\nCONFIG_AHCI_IMX=y\n# CONFIG_AHCI_CEVA is not set\n# CONFIG_AHCI_QORIQ is not set\n# CONFIG_SATA_INIC162X is not set\n# CONFIG_SATA_ACARD_AHCI is not set\n# CONFIG_SATA_SIL24 is not set\nCONFIG_ATA_SFF=y\n\n#\n# SFF controllers with custom DMA interface\n#\n# CONFIG_PDC_ADMA is not set\n# CONFIG_SATA_QSTOR is not set\n# CONFIG_SATA_SX4 is not set\nCONFIG_ATA_BMDMA=y\n\n#\n# SATA SFF controllers with BMDMA\n#\n# CONFIG_ATA_PIIX is not set\n# CONFIG_SATA_DWC is not set\n# CONFIG_SATA_MV is not set\n# CONFIG_SATA_NV is not set\n# CONFIG_SATA_PROMISE is not set\n# CONFIG_SATA_SIL is not set\n# CONFIG_SATA_SIS is not set\n# CONFIG_SATA_SVW is not set\n# CONFIG_SATA_ULI is not set\n# CONFIG_SATA_VIA is not set\n# CONFIG_SATA_VITESSE is not set\n\n#\n# PATA SFF controllers with BMDMA\n#\n# CONFIG_PATA_ALI is not set\n# CONFIG_PATA_AMD is not set\n# CONFIG_PATA_ARTOP is not set\n# CONFIG_PATA_ATIIXP is not set\n# CONFIG_PATA_ATP867X is not set\n# CONFIG_PATA_CMD64X is not set\n# CONFIG_PATA_CYPRESS is not set\n# CONFIG_PATA_EFAR is not set\n# CONFIG_PATA_HPT366 is not set\n# CONFIG_PATA_HPT37X is not set\n# CONFIG_PATA_HPT3X2N is not set\n# CONFIG_PATA_HPT3X3 is not set\nCONFIG_PATA_IMX=y\n# CONFIG_PATA_IT8213 is not set\n# CONFIG_PATA_IT821X is not set\n# CONFIG_PATA_JMICRON is not set\n# CONFIG_PATA_MARVELL is not set\n# CONFIG_PATA_NETCELL is not set\n# CONFIG_PATA_NINJA32 is not set\n# CONFIG_PATA_NS87415 is not set\n# CONFIG_PATA_OLDPIIX is not set\n# CONFIG_PATA_OPTIDMA is not set\n# CONFIG_PATA_PDC2027X is not set\n# CONFIG_PATA_PDC_OLD is not set\n# CONFIG_PATA_RADISYS is not set\n# CONFIG_PATA_RDC is not set\n# CONFIG_PATA_SCH is not set\n# CONFIG_PATA_SERVERWORKS is not set\n# CONFIG_PATA_SIL680 is not set\n# CONFIG_PATA_SIS is not set\n# CONFIG_PATA_TOSHIBA is not set\n# CONFIG_PATA_TRIFLEX is not set\n# CONFIG_PATA_VIA is not set\n# CONFIG_PATA_WINBOND is not set\n\n#\n# PIO-only SFF controllers\n#\n# CONFIG_PATA_CMD640_PCI is not set\n# CONFIG_PATA_MPIIX is not set\n# CONFIG_PATA_NS87410 is not set\n# CONFIG_PATA_OPTI is not set\n# CONFIG_PATA_OF_PLATFORM is not set\n# CONFIG_PATA_RZ1000 is not set\n\n#\n# Generic fallback / legacy drivers\n#\n# CONFIG_ATA_GENERIC is not set\n# CONFIG_PATA_LEGACY is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\n# CONFIG_DM_DEBUG is not set\nCONFIG_DM_BUFIO=m\n# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\n# CONFIG_DM_UNSTRIPED is not set\n# CONFIG_DM_CRYPT is not set\n# CONFIG_DM_SNAPSHOT is not set\nCONFIG_DM_THIN_PROVISIONING=m\n# CONFIG_DM_CACHE is not set\n# CONFIG_DM_WRITECACHE is not set\n# CONFIG_DM_ERA is not set\n# CONFIG_DM_CLONE is not set\n# CONFIG_DM_MIRROR is not set\n# CONFIG_DM_RAID is not set\n# CONFIG_DM_ZERO is not set\n# CONFIG_DM_MULTIPATH is not set\n# CONFIG_DM_DELAY is not set\n# CONFIG_DM_DUST is not set\n# CONFIG_DM_UEVENT is not set\n# CONFIG_DM_FLAKEY is not set\n# CONFIG_DM_VERITY is not set\n# CONFIG_DM_SWITCH is not set\n# CONFIG_DM_LOG_WRITES is not set\n# CONFIG_DM_INTEGRITY is not set\n# CONFIG_TARGET_CORE is not set\n# CONFIG_FUSION is not set\n\n#\n# IEEE 1394 (FireWire) support\n#\n# CONFIG_FIREWIRE is not set\n# CONFIG_FIREWIRE_NOSY is not set\n# end of IEEE 1394 (FireWire) support\n\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\nCONFIG_DUMMY=m\nCONFIG_WIREGUARD=m\n# CONFIG_WIREGUARD_DEBUG is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_FC is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\n# CONFIG_MACVTAP is not set\nCONFIG_IPVLAN_L3S=y\nCONFIG_IPVLAN=m\n# CONFIG_IPVTAP is not set\nCONFIG_VXLAN=m\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_AMT is not set\n# CONFIG_MACSEC is not set\n# CONFIG_NETCONSOLE is not set\n# CONFIG_TUN is not set\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\nCONFIG_NLMON=m\n# CONFIG_ARCNET is not set\n\n#\n# Distributed Switch Architecture drivers\n#\n# CONFIG_B53 is not set\n# CONFIG_NET_DSA_BCM_SF2 is not set\n# CONFIG_NET_DSA_LOOP is not set\n# CONFIG_NET_DSA_LANTIQ_GSWIP is not set\n# CONFIG_NET_DSA_MT7530 is not set\n# CONFIG_NET_DSA_MV88E6060 is not set\n# CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON is not set\nCONFIG_NET_DSA_MV88E6XXX=m\nCONFIG_NET_DSA_MV88E6XXX_PTP=y\n# CONFIG_NET_DSA_MSCC_FELIX is not set\n# CONFIG_NET_DSA_MSCC_SEVILLE is not set\n# CONFIG_NET_DSA_AR9331 is not set\n# CONFIG_NET_DSA_QCA8K is not set\n# CONFIG_NET_DSA_SJA1105 is not set\n# CONFIG_NET_DSA_XRS700X_I2C is not set\n# CONFIG_NET_DSA_XRS700X_MDIO is not set\n# CONFIG_NET_DSA_REALTEK is not set\n# CONFIG_NET_DSA_SMSC_LAN9303_I2C is not set\n# CONFIG_NET_DSA_SMSC_LAN9303_MDIO is not set\n# CONFIG_NET_DSA_VITESSE_VSC73XX_SPI is not set\n# CONFIG_NET_DSA_VITESSE_VSC73XX_PLATFORM is not set\n# end of Distributed Switch Architecture drivers\n\nCONFIG_ETHERNET=y\nCONFIG_NET_VENDOR_3COM=y\n# CONFIG_VORTEX is not set\n# CONFIG_TYPHOON is not set\nCONFIG_NET_VENDOR_ADAPTEC=y\n# CONFIG_ADAPTEC_STARFIRE is not set\nCONFIG_NET_VENDOR_AGERE=y\n# CONFIG_ET131X is not set\nCONFIG_NET_VENDOR_ALACRITECH=y\n# CONFIG_SLICOSS is not set\nCONFIG_NET_VENDOR_ALTEON=y\n# CONFIG_ACENIC is not set\n# CONFIG_ALTERA_TSE is not set\nCONFIG_NET_VENDOR_AMAZON=y\n# CONFIG_ENA_ETHERNET is not set\nCONFIG_NET_VENDOR_AMD=y\n# CONFIG_AMD8111_ETH is not set\n# CONFIG_PCNET32 is not set\nCONFIG_NET_VENDOR_AQUANTIA=y\n# CONFIG_AQTION is not set\nCONFIG_NET_VENDOR_ARC=y\n# CONFIG_NET_VENDOR_ASIX is not set\nCONFIG_NET_VENDOR_ATHEROS=y\n# CONFIG_ATL2 is not set\n# CONFIG_ATL1 is not set\n# CONFIG_ATL1E is not set\n# CONFIG_ATL1C is not set\n# CONFIG_ALX is not set\n# CONFIG_NET_VENDOR_BROADCOM is not set\nCONFIG_NET_VENDOR_CADENCE=y\n# CONFIG_MACB is not set\nCONFIG_NET_VENDOR_CAVIUM=y\nCONFIG_NET_VENDOR_CHELSIO=y\n# CONFIG_CHELSIO_T1 is not set\n# CONFIG_CHELSIO_T3 is not set\n# CONFIG_CHELSIO_T4 is not set\n# CONFIG_CHELSIO_T4VF is not set\nCONFIG_NET_VENDOR_CIRRUS=y\nCONFIG_CS89x0=y\nCONFIG_CS89x0_PLATFORM=y\nCONFIG_NET_VENDOR_CISCO=y\n# CONFIG_ENIC is not set\nCONFIG_NET_VENDOR_CORTINA=y\n# CONFIG_GEMINI_ETHERNET is not set\n# CONFIG_NET_VENDOR_DAVICOM is not set\n# CONFIG_DNET is not set\nCONFIG_NET_VENDOR_DEC=y\n# CONFIG_NET_TULIP is not set\nCONFIG_NET_VENDOR_DLINK=y\n# CONFIG_DL2K is not set\n# CONFIG_SUNDANCE is not set\nCONFIG_NET_VENDOR_EMULEX=y\n# CONFIG_BE2NET is not set\n# CONFIG_NET_VENDOR_ENGLEDER is not set\nCONFIG_NET_VENDOR_EZCHIP=y\n# CONFIG_EZCHIP_NPS_MANAGEMENT_ENET is not set\n# CONFIG_NET_VENDOR_FARADAY is not set\nCONFIG_NET_VENDOR_FREESCALE=y\nCONFIG_FEC=y\n# CONFIG_FSL_PQ_MDIO is not set\n# CONFIG_FSL_XGMAC_MDIO is not set\n# CONFIG_GIANFAR is not set\n# CONFIG_FSL_DPAA2_SWITCH is not set\n# CONFIG_FSL_ENETC is not set\n# CONFIG_FSL_ENETC_VF is not set\nCONFIG_FSL_ENETC_IERB=m\n# CONFIG_FSL_ENETC_MDIO is not set\n# CONFIG_NET_VENDOR_FUNGIBLE is not set\nCONFIG_NET_VENDOR_GOOGLE=y\n# CONFIG_GVE is not set\nCONFIG_NET_VENDOR_HISILICON=y\n# CONFIG_HIX5HD2_GMAC is not set\n# CONFIG_HISI_FEMAC is not set\n# CONFIG_HIP04_ETH is not set\n# CONFIG_HNS_DSAF is not set\n# CONFIG_HNS_ENET is not set\n# CONFIG_HNS3 is not set\nCONFIG_NET_VENDOR_HUAWEI=y\nCONFIG_NET_VENDOR_I825XX=y\nCONFIG_NET_VENDOR_INTEL=y\n# CONFIG_E100 is not set\n# CONFIG_E1000 is not set\n# CONFIG_E1000E is not set\nCONFIG_IGB=y\nCONFIG_IGB_HWMON=y\n# CONFIG_IGBVF is not set\n# CONFIG_IXGB is not set\n# CONFIG_IXGBE is not set\n# CONFIG_IXGBEVF is not set\n# CONFIG_I40E is not set\n# CONFIG_I40EVF is not set\n# CONFIG_ICE is not set\n# CONFIG_FM10K is not set\n# CONFIG_IGC is not set\n# CONFIG_NET_VENDOR_WANGXUN is not set\n# CONFIG_JME is not set\n# CONFIG_NET_VENDOR_ADI is not set\n# CONFIG_NET_VENDOR_LITEX is not set\n# CONFIG_NET_VENDOR_MARVELL is not set\nCONFIG_NET_VENDOR_MELLANOX=y\n# CONFIG_MLX4_EN is not set\n# CONFIG_MLX5_CORE is not set\n# CONFIG_MLXSW_CORE is not set\n# CONFIG_MLXFW is not set\n# CONFIG_NET_VENDOR_MICREL is not set\n# CONFIG_NET_VENDOR_MICROCHIP is not set\nCONFIG_NET_VENDOR_MICROSEMI=y\n# CONFIG_MSCC_OCELOT_SWITCH is not set\n# CONFIG_NET_VENDOR_MICROSOFT is not set\nCONFIG_NET_VENDOR_MYRI=y\n# CONFIG_MYRI10GE is not set\n# CONFIG_FEALNX is not set\nCONFIG_NET_VENDOR_NI=y\n# CONFIG_NI_XGE_MANAGEMENT_ENET is not set\n# CONFIG_NET_VENDOR_NATSEMI is not set\nCONFIG_NET_VENDOR_NETERION=y\n# CONFIG_S2IO is not set\nCONFIG_NET_VENDOR_NETRONOME=y\n# CONFIG_NFP is not set\nCONFIG_NET_VENDOR_NVIDIA=y\n# CONFIG_FORCEDETH is not set\nCONFIG_NET_VENDOR_OKI=y\n# CONFIG_ETHOC is not set\nCONFIG_NET_VENDOR_PACKET_ENGINES=y\n# CONFIG_HAMACHI is not set\n# CONFIG_YELLOWFIN is not set\nCONFIG_NET_VENDOR_PENSANDO=y\nCONFIG_NET_VENDOR_QLOGIC=y\n# CONFIG_QLA3XXX is not set\n# CONFIG_QLCNIC is not set\n# CONFIG_NETXEN_NIC is not set\n# CONFIG_QED is not set\nCONFIG_NET_VENDOR_BROCADE=y\n# CONFIG_BNA is not set\nCONFIG_NET_VENDOR_QUALCOMM=y\n# CONFIG_QCA7000_SPI is not set\n# CONFIG_QCA7000_UART is not set\n# CONFIG_QCOM_EMAC is not set\n# CONFIG_RMNET is not set\nCONFIG_NET_VENDOR_RDC=y\n# CONFIG_R6040 is not set\nCONFIG_NET_VENDOR_REALTEK=y\n# CONFIG_8139CP is not set\n# CONFIG_8139TOO is not set\n# CONFIG_R8169 is not set\nCONFIG_NET_VENDOR_RENESAS=y\nCONFIG_NET_VENDOR_ROCKER=y\n# CONFIG_ROCKER is not set\nCONFIG_NET_VENDOR_SAMSUNG=y\n# CONFIG_SXGBE_ETH is not set\n# CONFIG_NET_VENDOR_SEEQ is not set\nCONFIG_NET_VENDOR_SILAN=y\n# CONFIG_SC92031 is not set\nCONFIG_NET_VENDOR_SIS=y\n# CONFIG_SIS900 is not set\n# CONFIG_SIS190 is not set\nCONFIG_NET_VENDOR_SOLARFLARE=y\n# CONFIG_SFC is not set\n# CONFIG_SFC_FALCON is not set\n# CONFIG_SFC_SIENA is not set\nCONFIG_NET_VENDOR_SMSC=y\nCONFIG_SMC91X=y\n# CONFIG_EPIC100 is not set\nCONFIG_SMC911X=y\nCONFIG_SMSC911X=y\n# CONFIG_SMSC9420 is not set\nCONFIG_NET_VENDOR_SOCIONEXT=y\n# CONFIG_NET_VENDOR_STMICRO is not set\nCONFIG_NET_VENDOR_SUN=y\n# CONFIG_HAPPYMEAL is not set\n# CONFIG_SUNGEM is not set\n# CONFIG_CASSINI is not set\n# CONFIG_NIU is not set\nCONFIG_NET_VENDOR_SYNOPSYS=y\n# CONFIG_DWC_XLGMAC is not set\nCONFIG_NET_VENDOR_TEHUTI=y\n# CONFIG_TEHUTI is not set\nCONFIG_NET_VENDOR_TI=y\n# CONFIG_TI_CPSW_PHY_SEL is not set\n# CONFIG_TLAN is not set\n# CONFIG_NET_VENDOR_VERTEXCOM is not set\nCONFIG_NET_VENDOR_VIA=y\n# CONFIG_VIA_RHINE is not set\n# CONFIG_VIA_VELOCITY is not set\nCONFIG_NET_VENDOR_WIZNET=y\n# CONFIG_WIZNET_W5100 is not set\n# CONFIG_WIZNET_W5300 is not set\nCONFIG_NET_VENDOR_XILINX=y\n# CONFIG_XILINX_EMACLITE is not set\n# CONFIG_XILINX_AXI_EMAC is not set\n# CONFIG_XILINX_LL_TEMAC is not set\n# CONFIG_FDDI is not set\n# CONFIG_HIPPI is not set\nCONFIG_PHYLINK=y\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_ADIN_PHY is not set\n# CONFIG_ADIN1100_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=y\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM54140_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\nCONFIG_MARVELL_PHY=y\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MARVELL_88X2222_PHY is not set\n# CONFIG_MAXLINEAR_GPHY is not set\n# CONFIG_MEDIATEK_GE_PHY is not set\nCONFIG_MICREL_PHY=y\nCONFIG_MICROCHIP_PHY=y\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_MOTORCOMM_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_NXP_TJA11XX_PHY is not set\nCONFIG_AT803X_PHY=y\n# CONFIG_QSEMI_PHY is not set\n# CONFIG_REALTEK_PHY is not set\n# CONFIG_RENESAS_PHY is not set\n# CONFIG_ROCKCHIP_PHY is not set\nCONFIG_SMSC_PHY=y\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_DP83TD510_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\n# CONFIG_PSE_CONTROLLER is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_OF_MDIO=y\nCONFIG_MDIO_DEVRES=y\nCONFIG_MDIO_BITBANG=y\n# CONFIG_MDIO_BCM_UNIMAC is not set\nCONFIG_MDIO_GPIO=y\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_IPQ4019 is not set\n# CONFIG_MDIO_IPQ8064 is not set\n\n#\n# MDIO Multiplexers\n#\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n\n#\n# PCS device drivers\n#\n# end of PCS device drivers\n\n# CONFIG_PPP is not set\n# CONFIG_SLIP is not set\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\nCONFIG_USB_PEGASUS=m\nCONFIG_USB_RTL8150=m\nCONFIG_USB_RTL8152=m\n# CONFIG_USB_LAN78XX is not set\nCONFIG_USB_USBNET=y\nCONFIG_USB_NET_AX8817X=y\nCONFIG_USB_NET_AX88179_178A=y\nCONFIG_USB_NET_CDCETHER=y\nCONFIG_USB_NET_CDC_EEM=m\nCONFIG_USB_NET_CDC_NCM=y\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\n# CONFIG_USB_NET_DM9601 is not set\n# CONFIG_USB_NET_SR9700 is not set\n# CONFIG_USB_NET_SR9800 is not set\n# CONFIG_USB_NET_SMSC75XX is not set\n# CONFIG_USB_NET_SMSC95XX is not set\n# CONFIG_USB_NET_GL620A is not set\nCONFIG_USB_NET_NET1080=y\n# CONFIG_USB_NET_PLUSB is not set\n# CONFIG_USB_NET_MCS7830 is not set\n# CONFIG_USB_NET_RNDIS_HOST is not set\nCONFIG_USB_NET_CDC_SUBSET_ENABLE=y\nCONFIG_USB_NET_CDC_SUBSET=y\n# CONFIG_USB_ALI_M5632 is not set\n# CONFIG_USB_AN2720 is not set\nCONFIG_USB_BELKIN=y\nCONFIG_USB_ARMLINUX=y\n# CONFIG_USB_EPSON2888 is not set\n# CONFIG_USB_KC2190 is not set\nCONFIG_USB_NET_ZAURUS=y\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\n# CONFIG_USB_HSO is not set\n# CONFIG_USB_NET_INT51X1 is not set\n# CONFIG_USB_IPHETH is not set\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\n# CONFIG_USB_NET_AQC111 is not set\nCONFIG_USB_RTL8153_ECM=m\nCONFIG_WLAN=y\n# CONFIG_WLAN_VENDOR_ADMTEK is not set\n# CONFIG_WLAN_VENDOR_ATH is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\nCONFIG_ATMEL=m\n# CONFIG_PCI_ATMEL is not set\nCONFIG_AT76C50X_USB=m\nCONFIG_WLAN_VENDOR_BROADCOM=y\n# CONFIG_B43 is not set\n# CONFIG_B43LEGACY is not set\nCONFIG_BRCMUTIL=m\n# CONFIG_BRCMSMAC is not set\nCONFIG_BRCMFMAC=m\nCONFIG_BRCMFMAC_PROTO_BCDC=y\nCONFIG_BRCMFMAC_SDIO=y\n# CONFIG_BRCMFMAC_USB is not set\n# CONFIG_BRCMFMAC_PCIE is not set\n# CONFIG_BRCM_TRACING is not set\n# CONFIG_BRCMDBG is not set\n# CONFIG_WLAN_VENDOR_CISCO is not set\n# CONFIG_WLAN_VENDOR_INTEL is not set\n# CONFIG_WLAN_VENDOR_INTERSIL is not set\n# CONFIG_WLAN_VENDOR_MARVELL is not set\n# CONFIG_WLAN_VENDOR_MEDIATEK is not set\nCONFIG_WLAN_VENDOR_MICROCHIP=y\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\n# CONFIG_WLAN_VENDOR_PURELIFI is not set\n# CONFIG_WLAN_VENDOR_RALINK is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\n# CONFIG_RTL8180 is not set\n# CONFIG_RTL8187 is not set\nCONFIG_RTL_CARDS=m\n# CONFIG_RTL8192CE is not set\n# CONFIG_RTL8192SE is not set\n# CONFIG_RTL8192DE is not set\n# CONFIG_RTL8723AE is not set\n# CONFIG_RTL8723BE is not set\n# CONFIG_RTL8188EE is not set\n# CONFIG_RTL8192EE is not set\n# CONFIG_RTL8821AE is not set\n# CONFIG_RTL8192CU is not set\n# CONFIG_RTL8XXXU is not set\nCONFIG_RTW88=m\nCONFIG_RTW88_CORE=m\nCONFIG_RTW88_USB=m\nCONFIG_RTW88_8822B=m\nCONFIG_RTW88_8822C=m\nCONFIG_RTW88_8723D=m\nCONFIG_RTW88_8821C=m\n# CONFIG_RTW88_8822BE is not set\n# CONFIG_RTW88_8822BS is not set\nCONFIG_RTW88_8822BU=m\n# CONFIG_RTW88_8822CE is not set\n# CONFIG_RTW88_8822CS is not set\nCONFIG_RTW88_8822CU=m\n# CONFIG_RTW88_8723DE is not set\nCONFIG_RTW88_8723DU=m\n# CONFIG_RTW88_8821CE is not set\n# CONFIG_RTW88_8821CS is not set\nCONFIG_RTW88_8821CU=m\n# CONFIG_RTW88_DEBUG is not set\n# CONFIG_RTW88_DEBUGFS is not set\n# CONFIG_RTW89 is not set\n# CONFIG_WLAN_VENDOR_RSI is not set\n# CONFIG_WLAN_VENDOR_SILABS is not set\n# CONFIG_WLAN_VENDOR_ST is not set\n# CONFIG_WLAN_VENDOR_TI is not set\n# CONFIG_WLAN_VENDOR_ZYDAS is not set\n# CONFIG_WLAN_VENDOR_QUANTENNA is not set\n# CONFIG_MAC80211_HWSIM is not set\n# CONFIG_USB_NET_RNDIS_WLAN is not set\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\n# CONFIG_VMXNET3 is not set\n# CONFIG_NETDEVSIM is not set\n# CONFIG_NET_FAILOVER is not set\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\nCONFIG_INPUT_MATRIXKMAP=y\nCONFIG_INPUT_VIVALDIFMAP=y\n\n#\n# Userland interfaces\n#\n# CONFIG_INPUT_MOUSEDEV is not set\n# CONFIG_INPUT_JOYDEV is not set\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADC is not set\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\nCONFIG_KEYBOARD_ATKBD=y\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=y\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\nCONFIG_KEYBOARD_SNVS_PWRKEY=y\nCONFIG_KEYBOARD_IMX=y\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_PINEPHONE is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_STMPE is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\n# CONFIG_KEYBOARD_CYPRESS_SF is not set\nCONFIG_INPUT_MOUSE=y\nCONFIG_MOUSE_PS2=m\nCONFIG_MOUSE_PS2_ALPS=y\nCONFIG_MOUSE_PS2_BYD=y\nCONFIG_MOUSE_PS2_LOGIPS2PP=y\nCONFIG_MOUSE_PS2_SYNAPTICS=y\nCONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y\nCONFIG_MOUSE_PS2_CYPRESS=y\nCONFIG_MOUSE_PS2_TRACKPOINT=y\nCONFIG_MOUSE_PS2_ELANTECH=y\nCONFIG_MOUSE_PS2_ELANTECH_SMBUS=y\n# CONFIG_MOUSE_PS2_SENTELIC is not set\n# CONFIG_MOUSE_PS2_TOUCHKIT is not set\nCONFIG_MOUSE_PS2_FOCALTECH=y\nCONFIG_MOUSE_PS2_SMBUS=y\n# CONFIG_MOUSE_SERIAL is not set\n# CONFIG_MOUSE_APPLETOUCH is not set\n# CONFIG_MOUSE_BCM5974 is not set\n# CONFIG_MOUSE_CYAPA is not set\n# CONFIG_MOUSE_ELAN_I2C is not set\n# CONFIG_MOUSE_VSXXXAA is not set\n# CONFIG_MOUSE_GPIO is not set\n# CONFIG_MOUSE_SYNAPTICS_I2C is not set\n# CONFIG_MOUSE_SYNAPTICS_USB is not set\nCONFIG_INPUT_JOYSTICK=y\n# CONFIG_JOYSTICK_ANALOG is not set\n# CONFIG_JOYSTICK_A3D is not set\n# CONFIG_JOYSTICK_ADC is not set\n# CONFIG_JOYSTICK_ADI is not set\n# CONFIG_JOYSTICK_COBRA is not set\n# CONFIG_JOYSTICK_GF2K is not set\n# CONFIG_JOYSTICK_GRIP is not set\n# CONFIG_JOYSTICK_GRIP_MP is not set\n# CONFIG_JOYSTICK_GUILLEMOT is not set\n# CONFIG_JOYSTICK_INTERACT is not set\n# CONFIG_JOYSTICK_SIDEWINDER is not set\n# CONFIG_JOYSTICK_TMDC is not set\n# CONFIG_JOYSTICK_IFORCE is not set\n# CONFIG_JOYSTICK_WARRIOR is not set\n# CONFIG_JOYSTICK_MAGELLAN is not set\n# CONFIG_JOYSTICK_SPACEORB is not set\n# CONFIG_JOYSTICK_SPACEBALL is not set\n# CONFIG_JOYSTICK_STINGER is not set\n# CONFIG_JOYSTICK_TWIDJOY is not set\n# CONFIG_JOYSTICK_ZHENHUA is not set\n# CONFIG_JOYSTICK_AS5011 is not set\n# CONFIG_JOYSTICK_JOYDUMP is not set\nCONFIG_JOYSTICK_XPAD=y\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\n# CONFIG_JOYSTICK_PSXPAD_SPI is not set\n# CONFIG_JOYSTICK_PXRC is not set\n# CONFIG_JOYSTICK_QWIIC is not set\n# CONFIG_JOYSTICK_FSIA6B is not set\n# CONFIG_JOYSTICK_SENSEHAT is not set\n# CONFIG_INPUT_TABLET is not set\nCONFIG_INPUT_TOUCHSCREEN=y\nCONFIG_TOUCHSCREEN_ADS7846=y\n# CONFIG_TOUCHSCREEN_AD7877 is not set\n# CONFIG_TOUCHSCREEN_AD7879 is not set\n# CONFIG_TOUCHSCREEN_ADC is not set\n# CONFIG_TOUCHSCREEN_AR1021_I2C is not set\n# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set\n# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_BU21013 is not set\n# CONFIG_TOUCHSCREEN_BU21029 is not set\n# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMA140 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set\n# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set\n# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set\n# CONFIG_TOUCHSCREEN_DA9052 is not set\n# CONFIG_TOUCHSCREEN_DYNAPRO is not set\n# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set\n# CONFIG_TOUCHSCREEN_EETI is not set\nCONFIG_TOUCHSCREEN_EGALAX=y\n# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set\n# CONFIG_TOUCHSCREEN_EXC3000 is not set\n# CONFIG_TOUCHSCREEN_FUJITSU is not set\n# CONFIG_TOUCHSCREEN_GOODIX is not set\n# CONFIG_TOUCHSCREEN_HIDEEP is not set\n# CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set\n# CONFIG_TOUCHSCREEN_ILI210X is not set\n# CONFIG_TOUCHSCREEN_ILITEK is not set\n# CONFIG_TOUCHSCREEN_S6SY761 is not set\n# CONFIG_TOUCHSCREEN_GUNZE is not set\n# CONFIG_TOUCHSCREEN_EKTF2127 is not set\n# CONFIG_TOUCHSCREEN_ELAN is not set\n# CONFIG_TOUCHSCREEN_ELO is not set\n# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set\n# CONFIG_TOUCHSCREEN_WACOM_I2C is not set\nCONFIG_TOUCHSCREEN_MAX11801=y\n# CONFIG_TOUCHSCREEN_MCS5000 is not set\n# CONFIG_TOUCHSCREEN_MMS114 is not set\n# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set\n# CONFIG_TOUCHSCREEN_MSG2638 is not set\n# CONFIG_TOUCHSCREEN_MTOUCH is not set\n# CONFIG_TOUCHSCREEN_IMAGIS is not set\nCONFIG_TOUCHSCREEN_IMX6UL_TSC=y\n# CONFIG_TOUCHSCREEN_INEXIO is not set\n# CONFIG_TOUCHSCREEN_MK712 is not set\n# CONFIG_TOUCHSCREEN_PENMOUNT is not set\nCONFIG_TOUCHSCREEN_EDT_FT5X06=y\n# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set\n# CONFIG_TOUCHSCREEN_TOUCHWIN is not set\n# CONFIG_TOUCHSCREEN_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set\n# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set\nCONFIG_TOUCHSCREEN_MC13783=y\n# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set\n# CONFIG_TOUCHSCREEN_TSC_SERIO is not set\nCONFIG_TOUCHSCREEN_TSC200X_CORE=y\nCONFIG_TOUCHSCREEN_TSC2004=y\n# CONFIG_TOUCHSCREEN_TSC2005 is not set\nCONFIG_TOUCHSCREEN_TSC2007=y\n# CONFIG_TOUCHSCREEN_TSC2007_IIO is not set\n# CONFIG_TOUCHSCREEN_RM_TS is not set\n# CONFIG_TOUCHSCREEN_SILEAD is not set\n# CONFIG_TOUCHSCREEN_SIS_I2C is not set\n# CONFIG_TOUCHSCREEN_ST1232 is not set\n# CONFIG_TOUCHSCREEN_STMFTS is not set\nCONFIG_TOUCHSCREEN_STMPE=y\n# CONFIG_TOUCHSCREEN_SUR40 is not set\n# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set\nCONFIG_TOUCHSCREEN_SX8654=y\n# CONFIG_TOUCHSCREEN_TPS6507X is not set\n# CONFIG_TOUCHSCREEN_ZET6223 is not set\n# CONFIG_TOUCHSCREEN_ZFORCE is not set\nCONFIG_TOUCHSCREEN_COLIBRI_VF50=y\n# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set\n# CONFIG_TOUCHSCREEN_IQS5XX is not set\n# CONFIG_TOUCHSCREEN_ZINITIX is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MC13783_PWRBUTTON is not set\nCONFIG_INPUT_MMA8450=y\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_DA9052_ONKEY is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IBM_PANEL is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_IQS7222 is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\nCONFIG_INPUT_RAVE_SP_PWRBUTTON=y\nCONFIG_RMI4_CORE=y\nCONFIG_RMI4_I2C=y\nCONFIG_RMI4_SPI=y\nCONFIG_RMI4_SMB=y\nCONFIG_RMI4_F03=y\nCONFIG_RMI4_F03_SERIO=y\nCONFIG_RMI4_2D_SENSOR=y\nCONFIG_RMI4_F11=y\nCONFIG_RMI4_F12=y\nCONFIG_RMI4_F30=y\nCONFIG_RMI4_F34=y\n# CONFIG_RMI4_F3A is not set\nCONFIG_RMI4_F54=y\nCONFIG_RMI4_F55=y\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_SERIO_SERPORT=m\n# CONFIG_SERIO_PCIPS2 is not set\nCONFIG_SERIO_LIBPS2=y\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_SERIO_GPIO_PS2 is not set\n# CONFIG_USERIO is not set\n# CONFIG_GAMEPORT is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\n# CONFIG_SERIAL_8250 is not set\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\nCONFIG_SERIAL_IMX=y\nCONFIG_SERIAL_IMX_CONSOLE=y\n# CONFIG_SERIAL_IMX_EARLYCON is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_JSM is not set\n# CONFIG_SERIAL_SIFIVE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_RP2 is not set\nCONFIG_SERIAL_FSL_LPUART=y\nCONFIG_SERIAL_FSL_LPUART_CONSOLE=y\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_ST_ASC is not set\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\nCONFIG_SERIAL_MCTRL_GPIO=y\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NOZOMI is not set\n# CONFIG_NULL_TTY is not set\n# CONFIG_HVC_DCC is not set\nCONFIG_SERIAL_DEV_BUS=y\nCONFIG_SERIAL_DEV_CTRL_TTYPORT=y\n# CONFIG_TTY_PRINTK is not set\n# CONFIG_VIRTIO_CONSOLE is not set\n# CONFIG_IPMI_HANDLER is not set\n# CONFIG_IPMB_DEVICE_INTERFACE is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_BA431 is not set\nCONFIG_HW_RANDOM_IMX_RNGC=y\n# CONFIG_HW_RANDOM_CCTRNG is not set\n# CONFIG_HW_RANDOM_XIPHERA is not set\nCONFIG_HW_RANDOM_ARM_SMCCC_TRNG=m\n# CONFIG_APPLICOM is not set\nCONFIG_DEVMEM=y\nCONFIG_DEVPORT=y\n# CONFIG_TCG_TPM is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\nCONFIG_RANDOM_TRUST_CPU=y\n# CONFIG_RANDOM_TRUST_BOOTLOADER is not set\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\n# CONFIG_I2C_COMPAT is not set\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\nCONFIG_I2C_MUX_GPIO=y\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\n# CONFIG_I2C_MUX_PINCTRL is not set\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_DEMUX_PINCTRL is not set\n# CONFIG_I2C_MUX_MLXCPLD is not set\n# end of Multiplexer I2C Chip support\n\n# CONFIG_I2C_HELPER_AUTO is not set\n# CONFIG_I2C_SMBUS is not set\n\n#\n# I2C Algorithms\n#\nCONFIG_I2C_ALGOBIT=y\nCONFIG_I2C_ALGOPCF=m\nCONFIG_I2C_ALGOPCA=m\n# end of I2C Algorithms\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# PC SMBus host controller drivers\n#\n# CONFIG_I2C_ALI1535 is not set\n# CONFIG_I2C_ALI1563 is not set\n# CONFIG_I2C_ALI15X3 is not set\n# CONFIG_I2C_AMD756 is not set\n# CONFIG_I2C_AMD8111 is not set\n# CONFIG_I2C_I801 is not set\n# CONFIG_I2C_ISCH is not set\n# CONFIG_I2C_PIIX4 is not set\n# CONFIG_I2C_NFORCE2 is not set\n# CONFIG_I2C_NVIDIA_GPU is not set\n# CONFIG_I2C_SIS5595 is not set\n# CONFIG_I2C_SIS630 is not set\n# CONFIG_I2C_SIS96X is not set\n# CONFIG_I2C_VIA is not set\n# CONFIG_I2C_VIAPRO is not set\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CBUS_GPIO is not set\n# CONFIG_I2C_DESIGNWARE_PLATFORM is not set\n# CONFIG_I2C_DESIGNWARE_PCI is not set\n# CONFIG_I2C_EMEV2 is not set\nCONFIG_I2C_GPIO=y\n# CONFIG_I2C_GPIO_FAULT_INJECTOR is not set\nCONFIG_I2C_IMX=y\n# CONFIG_I2C_IMX_LPI2C is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_RK3X is not set\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_PCI1XXXX is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\nCONFIG_I2C_SLAVE=y\n# CONFIG_I2C_SLAVE_EEPROM is not set\n# CONFIG_I2C_SLAVE_TESTUNIT is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\nCONFIG_SPI_MEM=y\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\nCONFIG_SPI_BITBANG=y\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_CADENCE_QUADSPI is not set\n# CONFIG_SPI_CADENCE_XSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_FSL_LPSPI is not set\nCONFIG_SPI_FSL_QUADSPI=y\n# CONFIG_SPI_NXP_FLEXSPI is not set\n# CONFIG_SPI_GPIO is not set\nCONFIG_SPI_IMX=y\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_MICROCHIP_CORE is not set\n# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set\n# CONFIG_SPI_OC_TINY is not set\n# CONFIG_SPI_PXA2XX is not set\n# CONFIG_SPI_ROCKCHIP is not set\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_SIFIVE is not set\n# CONFIG_SPI_MXIC is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_AMD is not set\n\n#\n# SPI Multiplexer support\n#\n# CONFIG_SPI_MUX is not set\n\n#\n# SPI Protocol Masters\n#\n# CONFIG_SPI_SPIDEV is not set\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\n# CONFIG_PTP_1588_CLOCK_KVM is not set\n# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set\n# CONFIG_PTP_1588_CLOCK_IDTCM is not set\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_GENERIC_PINCTRL_GROUPS=y\nCONFIG_PINMUX=y\nCONFIG_GENERIC_PINMUX_FUNCTIONS=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_CY8C95X0 is not set\n# CONFIG_PINCTRL_MCP23S08 is not set\n# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set\n# CONFIG_PINCTRL_OCELOT is not set\n# CONFIG_PINCTRL_SINGLE is not set\n# CONFIG_PINCTRL_STMFX is not set\n# CONFIG_PINCTRL_SX150X is not set\nCONFIG_PINCTRL_IMX=y\nCONFIG_PINCTRL_IMX6Q=y\nCONFIG_PINCTRL_IMX6SL=y\nCONFIG_PINCTRL_IMX6SLL=y\nCONFIG_PINCTRL_IMX6SX=y\nCONFIG_PINCTRL_IMX6UL=y\n# CONFIG_PINCTRL_IMX8ULP is not set\n# CONFIG_PINCTRL_IMXRT1050 is not set\n# CONFIG_PINCTRL_IMX93 is not set\n# CONFIG_PINCTRL_IMXRT1170 is not set\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\nCONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_SYSFS=y\nCONFIG_GPIO_CDEV=y\nCONFIG_GPIO_CDEV_V1=y\nCONFIG_GPIO_GENERIC=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_CADENCE is not set\n# CONFIG_GPIO_DWAPB is not set\n# CONFIG_GPIO_FTGPIO010 is not set\n# CONFIG_GPIO_GENERIC_PLATFORM is not set\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_LOGICVC is not set\n# CONFIG_GPIO_MB86S7X is not set\n# CONFIG_GPIO_MPC8XXX is not set\nCONFIG_GPIO_MXC=y\n# CONFIG_GPIO_SIFIVE is not set\n# CONFIG_GPIO_SYSCON is not set\nCONFIG_GPIO_VF610=y\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_ZEVIO is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_GW_PLD is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\nCONFIG_GPIO_PCA953X=y\n# CONFIG_GPIO_PCA953X_IRQ is not set\n# CONFIG_GPIO_PCA9570 is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# CONFIG_GPIO_TS4900 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\n# CONFIG_GPIO_DA9052 is not set\n# CONFIG_HTC_EGPIO is not set\nCONFIG_GPIO_STMPE=y\n# CONFIG_GPIO_WM8994 is not set\n# end of MFD GPIO expanders\n\n#\n# PCI GPIO expanders\n#\n# CONFIG_GPIO_BT8XX is not set\n# CONFIG_GPIO_PCI_IDIO_16 is not set\n# CONFIG_GPIO_PCIE_IDIO_24 is not set\n# CONFIG_GPIO_RDC321X is not set\n# end of PCI GPIO expanders\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n# end of SPI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_SIM is not set\n# end of Virtual GPIO drivers\n\n# CONFIG_W1 is not set\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_BRCMKONA is not set\n# CONFIG_POWER_RESET_BRCMSTB is not set\n# CONFIG_POWER_RESET_GPIO is not set\n# CONFIG_POWER_RESET_GPIO_RESTART is not set\n# CONFIG_POWER_RESET_LTC2952 is not set\nCONFIG_POWER_RESET_REGULATOR=y\n# CONFIG_POWER_RESET_RESTART is not set\n# CONFIG_POWER_RESET_VERSATILE is not set\nCONFIG_POWER_RESET_SYSCON=y\nCONFIG_POWER_RESET_SYSCON_POWEROFF=y\n# CONFIG_SYSCON_REBOOT_MODE is not set\n# CONFIG_NVMEM_REBOOT_MODE is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\nCONFIG_POWER_SUPPLY_HWMON=y\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_IP5XXX_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SAMSUNG_SDI is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_DA9052 is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_MAX77976 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\nCONFIG_CHARGER_UCS1002=y\n# CONFIG_CHARGER_BD99954 is not set\n# CONFIG_BATTERY_UG3105 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM1177 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_AHT10 is not set\n# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set\n# CONFIG_SENSORS_AS370 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_AXI_FAN_CONTROL is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_CORSAIR_CPRO is not set\n# CONFIG_SENSORS_CORSAIR_PSU is not set\n# CONFIG_SENSORS_DRIVETEMP is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_DA9052_ADC is not set\n# CONFIG_SENSORS_I5K_AMB is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_MC13783_ADC is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\nCONFIG_SENSORS_GPIO_FAN=y\n# CONFIG_SENSORS_HIH6130 is not set\nCONFIG_SENSORS_IIO_HWMON=y\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2947_I2C is not set\n# CONFIG_SENSORS_LTC2947_SPI is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC2992 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX127 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX31730 is not set\n# CONFIG_SENSORS_MAX31760 is not set\n# CONFIG_SENSORS_MAX6620 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_TPS23861 is not set\n# CONFIG_SENSORS_MR75203 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT6775_I2C is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_NZXT_KRAKEN2 is not set\n# CONFIG_SENSORS_NZXT_SMART2 is not set\n# CONFIG_SENSORS_OCC_P8_I2C is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\n# CONFIG_SENSORS_PWM_FAN is not set\n# CONFIG_SENSORS_SBTSI is not set\n# CONFIG_SENSORS_SBRMI is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHT4x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_SIS5595 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC2305 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_INA238 is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_TMP464 is not set\n# CONFIG_SENSORS_TMP513 is not set\n# CONFIG_SENSORS_VIA686A is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_VT8231 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_NETLINK is not set\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\nCONFIG_THERMAL_WRITABLE_TRIPS=y\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\nCONFIG_CPU_THERMAL=y\nCONFIG_CPU_FREQ_THERMAL=y\n# CONFIG_THERMAL_EMULATION is not set\n# CONFIG_THERMAL_MMIO is not set\nCONFIG_IMX_THERMAL=y\n# CONFIG_IMX8MM_THERMAL is not set\n# CONFIG_GENERIC_ADC_THERMAL is not set\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\nCONFIG_WATCHDOG_OPEN_TIMEOUT=0\n# CONFIG_WATCHDOG_SYSFS is not set\n# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_DA9052_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\nCONFIG_ZIIRAVE_WATCHDOG=y\nCONFIG_RAVE_SP_WATCHDOG=y\n# CONFIG_CADENCE_WATCHDOG is not set\n# CONFIG_FTWDT010_WATCHDOG is not set\n# CONFIG_DW_WATCHDOG is not set\n# CONFIG_MAX63XX_WATCHDOG is not set\nCONFIG_IMX2_WDT=y\n# CONFIG_IMX7ULP_WDT is not set\n# CONFIG_ARM_SMC_WATCHDOG is not set\n# CONFIG_ALIM7101_WDT is not set\n# CONFIG_I6300ESB_WDT is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# PCI-based Watchdog Cards\n#\n# CONFIG_PCIPCWATCHDOG is not set\n# CONFIG_WDTPCI is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\n# CONFIG_SSB is not set\nCONFIG_BCMA_POSSIBLE=y\n# CONFIG_BCMA is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AXP20X_I2C is not set\n# CONFIG_MFD_MADERA is not set\n# CONFIG_MFD_ASIC3 is not set\n# CONFIG_PMIC_DA903X is not set\nCONFIG_PMIC_DA9052=y\n# CONFIG_MFD_DA9052_SPI is not set\nCONFIG_MFD_DA9052_I2C=y\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_GATEWORKS_GSC is not set\nCONFIG_MFD_MC13XXX=y\nCONFIG_MFD_MC13XXX_SPI=y\nCONFIG_MFD_MC13XXX_I2C=y\n# CONFIG_MFD_MP2629 is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_LPC_ICH is not set\n# CONFIG_LPC_SCH is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_JANZ_CMODIO is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77620 is not set\n# CONFIG_MFD_MAX77650 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77714 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6370 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_MFD_OCELOT is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_NTXEC is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_PM8XXX is not set\n# CONFIG_MFD_SY7636A is not set\n# CONFIG_MFD_RDC321X is not set\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RT5120 is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_RK808 is not set\n# CONFIG_MFD_RN5T618 is not set\n# CONFIG_MFD_SEC_CORE is not set\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\nCONFIG_MFD_STMPE=y\n\n#\n# STMicroelectronics STMPE Interface Drivers\n#\nCONFIG_STMPE_I2C=y\n# CONFIG_STMPE_SPI is not set\n# end of STMicroelectronics STMPE Interface Drivers\n\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_T7L66XB is not set\n# CONFIG_MFD_TC6387XB is not set\n# CONFIG_MFD_TC6393XB is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_VX855 is not set\n# CONFIG_MFD_LOCHNAGAR is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\nCONFIG_MFD_WM8994=y\n# CONFIG_MFD_ROHM_BD718XX is not set\n# CONFIG_MFD_ROHM_BD71828 is not set\n# CONFIG_MFD_ROHM_BD957XMUF is not set\n# CONFIG_MFD_STPMIC1 is not set\n# CONFIG_MFD_STMFX is not set\n# CONFIG_MFD_ATC260X_I2C is not set\n# CONFIG_MFD_QCOM_PM8008 is not set\nCONFIG_RAVE_SP_CORE=y\n# CONFIG_MFD_INTEL_M10_BMC is not set\n# CONFIG_MFD_RSMU_I2C is not set\n# CONFIG_MFD_RSMU_SPI is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\nCONFIG_REGULATOR_ANATOP=y\nCONFIG_REGULATOR_DA9052=y\n# CONFIG_REGULATOR_DA9121 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\n# CONFIG_REGULATOR_FAN53880 is not set\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MAX20086 is not set\n# CONFIG_REGULATOR_MAX77826 is not set\nCONFIG_REGULATOR_MC13XXX_CORE=y\nCONFIG_REGULATOR_MC13783=y\nCONFIG_REGULATOR_MC13892=y\n# CONFIG_REGULATOR_MCP16502 is not set\n# CONFIG_REGULATOR_MP5416 is not set\n# CONFIG_REGULATOR_MP8859 is not set\n# CONFIG_REGULATOR_MP886X is not set\n# CONFIG_REGULATOR_MPQ7920 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PF8X00 is not set\nCONFIG_REGULATOR_PFUZE100=y\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\n# CONFIG_REGULATOR_PWM is not set\n# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT5190A is not set\n# CONFIG_REGULATOR_RT5759 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\n# CONFIG_REGULATOR_SLG51000 is not set\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_SY8824X is not set\n# CONFIG_REGULATOR_SY8827N is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS6286X is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\n# CONFIG_REGULATOR_VCTRL is not set\n# CONFIG_REGULATOR_WM8994 is not set\nCONFIG_RC_CORE=y\nCONFIG_BPF_LIRC_MODE2=y\nCONFIG_LIRC=y\nCONFIG_RC_MAP=y\nCONFIG_RC_DECODERS=y\n# CONFIG_IR_IMON_DECODER is not set\nCONFIG_IR_JVC_DECODER=y\nCONFIG_IR_MCE_KBD_DECODER=y\nCONFIG_IR_NEC_DECODER=y\nCONFIG_IR_RC5_DECODER=y\nCONFIG_IR_RC6_DECODER=y\n# CONFIG_IR_RCMM_DECODER is not set\nCONFIG_IR_SANYO_DECODER=y\nCONFIG_IR_SHARP_DECODER=y\nCONFIG_IR_SONY_DECODER=y\nCONFIG_IR_XMP_DECODER=y\nCONFIG_RC_DEVICES=y\nCONFIG_IR_GPIO_CIR=y\n# CONFIG_IR_GPIO_TX is not set\n# CONFIG_IR_HIX5HD2 is not set\n# CONFIG_IR_IGORPLUGUSB is not set\n# CONFIG_IR_IGUANA is not set\n# CONFIG_IR_IMON is not set\n# CONFIG_IR_IMON_RAW is not set\n# CONFIG_IR_MCEUSB is not set\n# CONFIG_IR_PWM_TX is not set\n# CONFIG_IR_REDRAT3 is not set\n# CONFIG_IR_SERIAL is not set\n# CONFIG_IR_SPI is not set\n# CONFIG_IR_STREAMZAP is not set\nCONFIG_IR_TOY=m\n# CONFIG_IR_TTUSBIR is not set\n# CONFIG_RC_ATI_REMOTE is not set\n# CONFIG_RC_LOOPBACK is not set\n# CONFIG_RC_XBOX_DVD is not set\nCONFIG_CEC_CORE=y\nCONFIG_CEC_NOTIFIER=y\n\n#\n# CEC support\n#\n# CONFIG_MEDIA_CEC_RC is not set\n# CONFIG_MEDIA_CEC_SUPPORT is not set\n# end of CEC support\n\nCONFIG_MEDIA_SUPPORT=y\n# CONFIG_MEDIA_SUPPORT_FILTER is not set\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\nCONFIG_MEDIA_RADIO_SUPPORT=y\nCONFIG_MEDIA_SDR_SUPPORT=y\nCONFIG_MEDIA_PLATFORM_SUPPORT=y\nCONFIG_MEDIA_TEST_SUPPORT=y\n# end of Media device types\n\n#\n# Media core support\n#\nCONFIG_VIDEO_DEV=y\n# CONFIG_MEDIA_CONTROLLER is not set\nCONFIG_DVB_CORE=y\n# end of Media core support\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2_I2C=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_V4L2_JPEG_HELPER=y\nCONFIG_V4L2_MEM2MEM_DEV=y\n# end of Video4Linux options\n\n#\n# Digital TV options\n#\n# CONFIG_DVB_MMAP is not set\nCONFIG_DVB_NET=y\nCONFIG_DVB_MAX_ADAPTERS=16\nCONFIG_DVB_DYNAMIC_MINORS=y\n# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set\n# CONFIG_DVB_ULE_DEBUG is not set\n# end of Digital TV options\n\n#\n# Media drivers\n#\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\nCONFIG_USB_GSPCA=m\n# CONFIG_USB_GSPCA_BENQ is not set\n# CONFIG_USB_GSPCA_CONEX is not set\n# CONFIG_USB_GSPCA_CPIA1 is not set\n# CONFIG_USB_GSPCA_DTCS033 is not set\n# CONFIG_USB_GSPCA_ETOMS is not set\n# CONFIG_USB_GSPCA_FINEPIX is not set\n# CONFIG_USB_GSPCA_JEILINJ is not set\n# CONFIG_USB_GSPCA_JL2005BCD is not set\n# CONFIG_USB_GSPCA_KINECT is not set\n# CONFIG_USB_GSPCA_KONICA is not set\n# CONFIG_USB_GSPCA_MARS is not set\n# CONFIG_USB_GSPCA_MR97310A is not set\n# CONFIG_USB_GSPCA_NW80X is not set\n# CONFIG_USB_GSPCA_OV519 is not set\n# CONFIG_USB_GSPCA_OV534 is not set\n# CONFIG_USB_GSPCA_OV534_9 is not set\n# CONFIG_USB_GSPCA_PAC207 is not set\n# CONFIG_USB_GSPCA_PAC7302 is not set\n# CONFIG_USB_GSPCA_PAC7311 is not set\n# CONFIG_USB_GSPCA_SE401 is not set\n# CONFIG_USB_GSPCA_SN9C2028 is not set\n# CONFIG_USB_GSPCA_SN9C20X is not set\n# CONFIG_USB_GSPCA_SONIXB is not set\n# CONFIG_USB_GSPCA_SONIXJ is not set\n# CONFIG_USB_GSPCA_SPCA1528 is not set\n# CONFIG_USB_GSPCA_SPCA500 is not set\n# CONFIG_USB_GSPCA_SPCA501 is not set\n# CONFIG_USB_GSPCA_SPCA505 is not set\n# CONFIG_USB_GSPCA_SPCA506 is not set\n# CONFIG_USB_GSPCA_SPCA508 is not set\n# CONFIG_USB_GSPCA_SPCA561 is not set\n# CONFIG_USB_GSPCA_SQ905 is not set\n# CONFIG_USB_GSPCA_SQ905C is not set\n# CONFIG_USB_GSPCA_SQ930X is not set\n# CONFIG_USB_GSPCA_STK014 is not set\n# CONFIG_USB_GSPCA_STK1135 is not set\n# CONFIG_USB_GSPCA_STV0680 is not set\n# CONFIG_USB_GSPCA_SUNPLUS is not set\n# CONFIG_USB_GSPCA_T613 is not set\n# CONFIG_USB_GSPCA_TOPRO is not set\n# CONFIG_USB_GSPCA_TOUPTEK is not set\n# CONFIG_USB_GSPCA_TV8532 is not set\n# CONFIG_USB_GSPCA_VC032X is not set\n# CONFIG_USB_GSPCA_VICAM is not set\n# CONFIG_USB_GSPCA_XIRLINK_CIT is not set\n# CONFIG_USB_GSPCA_ZC3XX is not set\n# CONFIG_USB_GL860 is not set\n# CONFIG_USB_M5602 is not set\n# CONFIG_USB_STV06XX is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_USB_S2255 is not set\n# CONFIG_VIDEO_USBTV is not set\nCONFIG_USB_VIDEO_CLASS=m\n# CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV is not set\n\n#\n# Analog TV USB devices\n#\n# CONFIG_VIDEO_GO7007 is not set\n# CONFIG_VIDEO_HDPVR is not set\n# CONFIG_VIDEO_PVRUSB2 is not set\n# CONFIG_VIDEO_STK1160_COMMON is not set\n\n#\n# Analog/digital TV USB devices\n#\n# CONFIG_VIDEO_AU0828 is not set\n# CONFIG_VIDEO_CX231XX is not set\n\n#\n# Digital TV USB devices\n#\n# CONFIG_DVB_AS102 is not set\n# CONFIG_DVB_B2C2_FLEXCOP_USB is not set\n# CONFIG_DVB_USB_V2 is not set\n# CONFIG_DVB_USB is not set\n# CONFIG_SMS_USB_DRV is not set\n# CONFIG_DVB_TTUSB_BUDGET is not set\n# CONFIG_DVB_TTUSB_DEC is not set\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\n# CONFIG_VIDEO_EM28XX is not set\n\n#\n# Software defined radio USB devices\n#\n# CONFIG_USB_AIRSPY is not set\n# CONFIG_USB_HACKRF is not set\n# CONFIG_USB_MSI2500 is not set\n# CONFIG_MEDIA_PCI_SUPPORT is not set\nCONFIG_RADIO_ADAPTERS=y\n# CONFIG_RADIO_MAXIRADIO is not set\n# CONFIG_RADIO_SAA7706H is not set\n# CONFIG_RADIO_SHARK is not set\n# CONFIG_RADIO_SHARK2 is not set\n# CONFIG_RADIO_SI4713 is not set\n# CONFIG_RADIO_TEA5764 is not set\n# CONFIG_RADIO_TEF6862 is not set\n# CONFIG_RADIO_WL1273 is not set\n# CONFIG_USB_DSBR is not set\n# CONFIG_USB_KEENE is not set\n# CONFIG_USB_MA901 is not set\n# CONFIG_USB_MR800 is not set\n# CONFIG_USB_RAREMONO is not set\n# CONFIG_RADIO_SI470X is not set\nCONFIG_MEDIA_PLATFORM_DRIVERS=y\nCONFIG_V4L_PLATFORM_DRIVERS=y\n# CONFIG_SDR_PLATFORM_DRIVERS is not set\n# CONFIG_DVB_PLATFORM_DRIVERS is not set\nCONFIG_V4L_MEM2MEM_DRIVERS=y\nCONFIG_VIDEO_MEM2MEM_DEINTERLACE=m\n# CONFIG_VIDEO_MUX is not set\n\n#\n# Allegro DVT media platform drivers\n#\n\n#\n# Amlogic media platform drivers\n#\n\n#\n# Amphion drivers\n#\n\n#\n# Aspeed media platform drivers\n#\n# CONFIG_VIDEO_ASPEED is not set\n\n#\n# Atmel media platform drivers\n#\n\n#\n# Cadence media platform drivers\n#\n# CONFIG_VIDEO_CADENCE_CSI2RX is not set\n# CONFIG_VIDEO_CADENCE_CSI2TX is not set\n\n#\n# Chips&Media media platform drivers\n#\nCONFIG_VIDEO_CODA=y\nCONFIG_VIDEO_IMX_VDOA=y\n\n#\n# Intel media platform drivers\n#\n\n#\n# Marvell media platform drivers\n#\n# CONFIG_VIDEO_CAFE_CCIC is not set\n\n#\n# Mediatek media platform drivers\n#\n\n#\n# NVidia media platform drivers\n#\n\n#\n# NXP media platform drivers\n#\n# CONFIG_VIDEO_IMX_MIPI_CSIS is not set\n# CONFIG_VIDEO_IMX_PXP is not set\n# CONFIG_VIDEO_DW100 is not set\n# CONFIG_VIDEO_IMX8_JPEG is not set\n\n#\n# Qualcomm media platform drivers\n#\n\n#\n# Renesas media platform drivers\n#\n\n#\n# Rockchip media platform drivers\n#\n# CONFIG_VIDEO_ROCKCHIP_ISP1 is not set\n\n#\n# Samsung media platform drivers\n#\n\n#\n# STMicroelectronics media platform drivers\n#\n\n#\n# Sunxi media platform drivers\n#\n\n#\n# Texas Instruments drivers\n#\n\n#\n# Verisilicon media platform drivers\n#\n# CONFIG_VIDEO_HANTRO is not set\n\n#\n# VIA media platform drivers\n#\n\n#\n# Xilinx media platform drivers\n#\n# CONFIG_VIDEO_XILINX is not set\n\n#\n# MMC/SDIO DVB adapters\n#\n# CONFIG_SMS_SDIO_DRV is not set\n# CONFIG_V4L_TEST_DRIVERS is not set\n# CONFIG_DVB_TEST_DRIVERS is not set\nCONFIG_VIDEOBUF2_CORE=y\nCONFIG_VIDEOBUF2_V4L2=y\nCONFIG_VIDEOBUF2_MEMOPS=y\nCONFIG_VIDEOBUF2_DMA_CONTIG=y\nCONFIG_VIDEOBUF2_VMALLOC=y\nCONFIG_VIDEOBUF2_DMA_SG=m\n# end of Media drivers\n\n#\n# Media ancillary drivers\n#\nCONFIG_MEDIA_ATTACH=y\n\n#\n# IR I2C driver auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_IR_I2C=y\n\n#\n# Camera sensor devices\n#\n# CONFIG_VIDEO_AR0521 is not set\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_HI846 is not set\n# CONFIG_VIDEO_HI847 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_IMX412 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\n# CONFIG_VIDEO_MT9V011 is not set\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_OG01A1B is not set\n# CONFIG_VIDEO_OV02A10 is not set\n# CONFIG_VIDEO_OV08D10 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\n# CONFIG_VIDEO_OV2640 is not set\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5693 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV7251 is not set\n# CONFIG_VIDEO_OV7640 is not set\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9282 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n# end of Camera sensor devices\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# Audio decoders, processors and mixers\n#\n# CONFIG_VIDEO_CS3308 is not set\n# CONFIG_VIDEO_CS5345 is not set\n# CONFIG_VIDEO_CS53L32A is not set\n# CONFIG_VIDEO_MSP3400 is not set\n# CONFIG_VIDEO_SONY_BTF_MPX is not set\n# CONFIG_VIDEO_TDA1997X is not set\n# CONFIG_VIDEO_TDA7432 is not set\n# CONFIG_VIDEO_TDA9840 is not set\n# CONFIG_VIDEO_TEA6415C is not set\n# CONFIG_VIDEO_TEA6420 is not set\n# CONFIG_VIDEO_TLV320AIC23B is not set\n# CONFIG_VIDEO_TVAUDIO is not set\n# CONFIG_VIDEO_UDA1342 is not set\n# CONFIG_VIDEO_VP27SMPX is not set\n# CONFIG_VIDEO_WM8739 is not set\n# CONFIG_VIDEO_WM8775 is not set\n# end of Audio decoders, processors and mixers\n\n#\n# RDS decoders\n#\n# CONFIG_VIDEO_SAA6588 is not set\n# end of RDS decoders\n\n#\n# Video decoders\n#\n# CONFIG_VIDEO_ADV7180 is not set\n# CONFIG_VIDEO_ADV7183 is not set\n# CONFIG_VIDEO_ADV748X is not set\n# CONFIG_VIDEO_ADV7604 is not set\n# CONFIG_VIDEO_ADV7842 is not set\n# CONFIG_VIDEO_BT819 is not set\n# CONFIG_VIDEO_BT856 is not set\n# CONFIG_VIDEO_BT866 is not set\n# CONFIG_VIDEO_ISL7998X is not set\n# CONFIG_VIDEO_KS0127 is not set\n# CONFIG_VIDEO_MAX9286 is not set\n# CONFIG_VIDEO_ML86V7667 is not set\n# CONFIG_VIDEO_SAA7110 is not set\n# CONFIG_VIDEO_SAA711X is not set\n# CONFIG_VIDEO_TC358743 is not set\n# CONFIG_VIDEO_TVP514X is not set\n# CONFIG_VIDEO_TVP5150 is not set\n# CONFIG_VIDEO_TVP7002 is not set\n# CONFIG_VIDEO_TW2804 is not set\n# CONFIG_VIDEO_TW9903 is not set\n# CONFIG_VIDEO_TW9906 is not set\n# CONFIG_VIDEO_TW9910 is not set\n# CONFIG_VIDEO_VPX3220 is not set\n\n#\n# Video and audio decoders\n#\n# CONFIG_VIDEO_SAA717X is not set\n# CONFIG_VIDEO_CX25840 is not set\n# end of Video decoders\n\n#\n# Video encoders\n#\n# CONFIG_VIDEO_AD9389B is not set\n# CONFIG_VIDEO_ADV7170 is not set\n# CONFIG_VIDEO_ADV7175 is not set\n# CONFIG_VIDEO_ADV7343 is not set\n# CONFIG_VIDEO_ADV7393 is not set\n# CONFIG_VIDEO_ADV7511 is not set\n# CONFIG_VIDEO_AK881X is not set\n# CONFIG_VIDEO_SAA7127 is not set\n# CONFIG_VIDEO_SAA7185 is not set\n# CONFIG_VIDEO_THS8200 is not set\n# end of Video encoders\n\n#\n# Video improvement chips\n#\n# CONFIG_VIDEO_UPD64031A is not set\n# CONFIG_VIDEO_UPD64083 is not set\n# end of Video improvement chips\n\n#\n# Audio/Video compression chips\n#\n# CONFIG_VIDEO_SAA6752HS is not set\n# end of Audio/Video compression chips\n\n#\n# SDR tuner chips\n#\n# CONFIG_SDR_MAX2175 is not set\n# end of SDR tuner chips\n\n#\n# Miscellaneous helper chips\n#\n# CONFIG_VIDEO_I2C is not set\n# CONFIG_VIDEO_M52790 is not set\n# CONFIG_VIDEO_ST_MIPID02 is not set\n# CONFIG_VIDEO_THS7303 is not set\n# end of Miscellaneous helper chips\n\n#\n# Media SPI Adapters\n#\n# CONFIG_CXD2880_SPI_DRV is not set\n# CONFIG_VIDEO_GS1662 is not set\n# end of Media SPI Adapters\n\nCONFIG_MEDIA_TUNER=y\n\n#\n# Customize TV tuners\n#\n# CONFIG_MEDIA_TUNER_E4000 is not set\n# CONFIG_MEDIA_TUNER_FC0011 is not set\n# CONFIG_MEDIA_TUNER_FC0012 is not set\n# CONFIG_MEDIA_TUNER_FC0013 is not set\n# CONFIG_MEDIA_TUNER_FC2580 is not set\n# CONFIG_MEDIA_TUNER_IT913X is not set\n# CONFIG_MEDIA_TUNER_M88RS6000T is not set\n# CONFIG_MEDIA_TUNER_MAX2165 is not set\nCONFIG_MEDIA_TUNER_MC44S803=y\n# CONFIG_MEDIA_TUNER_MSI001 is not set\n# CONFIG_MEDIA_TUNER_MT2060 is not set\n# CONFIG_MEDIA_TUNER_MT2063 is not set\nCONFIG_MEDIA_TUNER_MT20XX=y\n# CONFIG_MEDIA_TUNER_MT2131 is not set\n# CONFIG_MEDIA_TUNER_MT2266 is not set\n# CONFIG_MEDIA_TUNER_MXL301RF is not set\n# CONFIG_MEDIA_TUNER_MXL5005S is not set\n# CONFIG_MEDIA_TUNER_MXL5007T is not set\n# CONFIG_MEDIA_TUNER_QM1D1B0004 is not set\n# CONFIG_MEDIA_TUNER_QM1D1C0042 is not set\n# CONFIG_MEDIA_TUNER_QT1010 is not set\n# CONFIG_MEDIA_TUNER_R820T is not set\n# CONFIG_MEDIA_TUNER_SI2157 is not set\nCONFIG_MEDIA_TUNER_SIMPLE=y\n# CONFIG_MEDIA_TUNER_TDA18212 is not set\n# CONFIG_MEDIA_TUNER_TDA18218 is not set\n# CONFIG_MEDIA_TUNER_TDA18250 is not set\nCONFIG_MEDIA_TUNER_TDA18271=y\nCONFIG_MEDIA_TUNER_TDA827X=y\nCONFIG_MEDIA_TUNER_TDA8290=y\nCONFIG_MEDIA_TUNER_TDA9887=y\nCONFIG_MEDIA_TUNER_TEA5761=y\nCONFIG_MEDIA_TUNER_TEA5767=y\n# CONFIG_MEDIA_TUNER_TUA9001 is not set\nCONFIG_MEDIA_TUNER_XC2028=y\nCONFIG_MEDIA_TUNER_XC4000=y\nCONFIG_MEDIA_TUNER_XC5000=y\n# end of Customize TV tuners\n\n#\n# Customise DVB Frontends\n#\n\n#\n# Multistandard (satellite) frontends\n#\n# CONFIG_DVB_M88DS3103 is not set\n# CONFIG_DVB_MXL5XX is not set\n# CONFIG_DVB_STB0899 is not set\n# CONFIG_DVB_STB6100 is not set\n# CONFIG_DVB_STV090x is not set\n# CONFIG_DVB_STV0910 is not set\n# CONFIG_DVB_STV6110x is not set\n# CONFIG_DVB_STV6111 is not set\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\n# CONFIG_DVB_DRXK is not set\n# CONFIG_DVB_MN88472 is not set\n# CONFIG_DVB_MN88473 is not set\n# CONFIG_DVB_SI2165 is not set\n# CONFIG_DVB_TDA18271C2DD is not set\n\n#\n# DVB-S (satellite) frontends\n#\n# CONFIG_DVB_CX24110 is not set\n# CONFIG_DVB_CX24116 is not set\n# CONFIG_DVB_CX24117 is not set\n# CONFIG_DVB_CX24120 is not set\n# CONFIG_DVB_CX24123 is not set\n# CONFIG_DVB_DS3000 is not set\n# CONFIG_DVB_MB86A16 is not set\n# CONFIG_DVB_MT312 is not set\n# CONFIG_DVB_S5H1420 is not set\n# CONFIG_DVB_SI21XX is not set\n# CONFIG_DVB_STB6000 is not set\n# CONFIG_DVB_STV0288 is not set\n# CONFIG_DVB_STV0299 is not set\n# CONFIG_DVB_STV0900 is not set\n# CONFIG_DVB_STV6110 is not set\n# CONFIG_DVB_TDA10071 is not set\n# CONFIG_DVB_TDA10086 is not set\n# CONFIG_DVB_TDA8083 is not set\n# CONFIG_DVB_TDA8261 is not set\n# CONFIG_DVB_TDA826X is not set\n# CONFIG_DVB_TS2020 is not set\n# CONFIG_DVB_TUA6100 is not set\n# CONFIG_DVB_TUNER_CX24113 is not set\n# CONFIG_DVB_TUNER_ITD1000 is not set\n# CONFIG_DVB_VES1X93 is not set\n# CONFIG_DVB_ZL10036 is not set\n# CONFIG_DVB_ZL10039 is not set\n\n#\n# DVB-T (terrestrial) frontends\n#\n# CONFIG_DVB_AF9013 is not set\n# CONFIG_DVB_CX22700 is not set\n# CONFIG_DVB_CX22702 is not set\n# CONFIG_DVB_CXD2820R is not set\n# CONFIG_DVB_CXD2841ER is not set\n# CONFIG_DVB_DIB3000MB is not set\n# CONFIG_DVB_DIB3000MC is not set\n# CONFIG_DVB_DIB7000M is not set\n# CONFIG_DVB_DIB7000P is not set\n# CONFIG_DVB_DIB9000 is not set\n# CONFIG_DVB_DRXD is not set\n# CONFIG_DVB_EC100 is not set\n# CONFIG_DVB_L64781 is not set\n# CONFIG_DVB_MT352 is not set\n# CONFIG_DVB_NXT6000 is not set\n# CONFIG_DVB_RTL2830 is not set\n# CONFIG_DVB_RTL2832 is not set\n# CONFIG_DVB_RTL2832_SDR is not set\n# CONFIG_DVB_S5H1432 is not set\n# CONFIG_DVB_SI2168 is not set\n# CONFIG_DVB_SP887X is not set\n# CONFIG_DVB_STV0367 is not set\n# CONFIG_DVB_TDA10048 is not set\n# CONFIG_DVB_TDA1004X is not set\n# CONFIG_DVB_ZD1301_DEMOD is not set\n# CONFIG_DVB_ZL10353 is not set\n# CONFIG_DVB_CXD2880 is not set\n\n#\n# DVB-C (cable) frontends\n#\n# CONFIG_DVB_STV0297 is not set\n# CONFIG_DVB_TDA10021 is not set\n# CONFIG_DVB_TDA10023 is not set\n# CONFIG_DVB_VES1820 is not set\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\n# CONFIG_DVB_AU8522_DTV is not set\n# CONFIG_DVB_AU8522_V4L is not set\n# CONFIG_DVB_BCM3510 is not set\n# CONFIG_DVB_LG2160 is not set\n# CONFIG_DVB_LGDT3305 is not set\n# CONFIG_DVB_LGDT3306A is not set\n# CONFIG_DVB_LGDT330X is not set\n# CONFIG_DVB_MXL692 is not set\n# CONFIG_DVB_NXT200X is not set\n# CONFIG_DVB_OR51132 is not set\n# CONFIG_DVB_OR51211 is not set\n# CONFIG_DVB_S5H1409 is not set\n# CONFIG_DVB_S5H1411 is not set\n\n#\n# ISDB-T (terrestrial) frontends\n#\n# CONFIG_DVB_DIB8000 is not set\n# CONFIG_DVB_MB86A20S is not set\n# CONFIG_DVB_S921 is not set\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\n# CONFIG_DVB_MN88443X is not set\n# CONFIG_DVB_TC90522 is not set\n\n#\n# Digital terrestrial only tuners/PLL\n#\n# CONFIG_DVB_PLL is not set\n# CONFIG_DVB_TUNER_DIB0070 is not set\n# CONFIG_DVB_TUNER_DIB0090 is not set\n\n#\n# SEC control devices for DVB-S\n#\n# CONFIG_DVB_A8293 is not set\n# CONFIG_DVB_AF9033 is not set\n# CONFIG_DVB_ASCOT2E is not set\n# CONFIG_DVB_ATBM8830 is not set\n# CONFIG_DVB_HELENE is not set\n# CONFIG_DVB_HORUS3A is not set\n# CONFIG_DVB_ISL6405 is not set\n# CONFIG_DVB_ISL6421 is not set\n# CONFIG_DVB_ISL6423 is not set\n# CONFIG_DVB_IX2505V is not set\n# CONFIG_DVB_LGS8GL5 is not set\n# CONFIG_DVB_LGS8GXX is not set\n# CONFIG_DVB_LNBH25 is not set\n# CONFIG_DVB_LNBH29 is not set\n# CONFIG_DVB_LNBP21 is not set\n# CONFIG_DVB_LNBP22 is not set\n# CONFIG_DVB_M88RS2000 is not set\n# CONFIG_DVB_TDA665x is not set\n# CONFIG_DVB_DRX39XYJ is not set\n\n#\n# Common Interface (EN50221) controller drivers\n#\n# CONFIG_DVB_CXD2099 is not set\n# CONFIG_DVB_SP2 is not set\n# end of Customise DVB Frontends\n\n#\n# Tools to develop new frontends\n#\n# CONFIG_DVB_DUMMY_FE is not set\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\nCONFIG_IMX_IPUV3_CORE=y\nCONFIG_DRM=y\nCONFIG_DRM_MIPI_DSI=y\n# CONFIG_DRM_DEBUG_MM is not set\nCONFIG_DRM_KMS_HELPER=y\n# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set\n# CONFIG_DRM_DEBUG_MODESET_LOCK is not set\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\n# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set\n# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set\nCONFIG_DRM_DP_AUX_BUS=y\nCONFIG_DRM_DISPLAY_HELPER=y\nCONFIG_DRM_DISPLAY_DP_HELPER=y\nCONFIG_DRM_DISPLAY_HDMI_HELPER=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_GEM_DMA_HELPER=y\nCONFIG_DRM_SCHED=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_KOMEDA is not set\n# end of ARM devices\n\n# CONFIG_DRM_RADEON is not set\n# CONFIG_DRM_AMDGPU is not set\n# CONFIG_DRM_NOUVEAU is not set\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\n# CONFIG_DRM_EXYNOS is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_AST is not set\n# CONFIG_DRM_MGAG200 is not set\n# CONFIG_DRM_ARMADA is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_USE_LVDS is not set\n# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set\n# CONFIG_DRM_OMAP is not set\n# CONFIG_DRM_TILCDC is not set\n# CONFIG_DRM_QXL is not set\n# CONFIG_DRM_VIRTIO_GPU is not set\n# CONFIG_DRM_FSL_DCU is not set\n# CONFIG_DRM_STM is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set\n# CONFIG_DRM_PANEL_ARM_VERSATILE is not set\n# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set\n# CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0 is not set\n# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set\n# CONFIG_DRM_PANEL_BOE_TV101WUM_NL6 is not set\n# CONFIG_DRM_PANEL_DSI_CM is not set\nCONFIG_DRM_PANEL_LVDS=y\nCONFIG_DRM_PANEL_SIMPLE=y\nCONFIG_DRM_PANEL_EDP=y\n# CONFIG_DRM_PANEL_EBBG_FT8719 is not set\n# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set\n# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set\n# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set\n# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set\n# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set\n# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set\n# CONFIG_DRM_PANEL_JDI_R63452 is not set\n# CONFIG_DRM_PANEL_KHADAS_TS050 is not set\n# CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LB035Q02 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set\n# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT36672A is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set\n# CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set\n# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set\n# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set\n# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set\n# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set\n# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set\n# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_SOFEF00 is not set\n# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set\n# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS060T1SX01 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7703 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set\n# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set\n# CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521 is not set\n# CONFIG_DRM_PANEL_TDO_TL070WSH30 is not set\n# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set\n# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set\n# CONFIG_DRM_PANEL_TPO_TPG110 is not set\n# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set\n# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set\n# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set\n# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_CHRONTEL_CH7033 is not set\n# CONFIG_DRM_DISPLAY_CONNECTOR is not set\n# CONFIG_DRM_FSL_LDB is not set\n# CONFIG_DRM_ITE_IT6505 is not set\n# CONFIG_DRM_LONTIUM_LT8912B is not set\n# CONFIG_DRM_LONTIUM_LT9211 is not set\n# CONFIG_DRM_LONTIUM_LT9611 is not set\n# CONFIG_DRM_LONTIUM_LT9611UXC is not set\n# CONFIG_DRM_ITE_IT66121 is not set\n# CONFIG_DRM_LVDS_CODEC is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NWL_MIPI_DSI is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_PARADE_PS8640 is not set\n# CONFIG_DRM_SIL_SII8620 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_SII9234 is not set\n# CONFIG_DRM_SIMPLE_BRIDGE is not set\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\n# CONFIG_DRM_TOSHIBA_TC358762 is not set\n# CONFIG_DRM_TOSHIBA_TC358764 is not set\nCONFIG_DRM_TOSHIBA_TC358767=y\n# CONFIG_DRM_TOSHIBA_TC358768 is not set\n# CONFIG_DRM_TOSHIBA_TC358775 is not set\n# CONFIG_DRM_TI_DLPC3433 is not set\n# CONFIG_DRM_TI_TFP410 is not set\n# CONFIG_DRM_TI_SN65DSI83 is not set\n# CONFIG_DRM_TI_SN65DSI86 is not set\n# CONFIG_DRM_TI_TPD12S015 is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_ANALOGIX_ANX7625 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_CDNS_MHDP8546 is not set\n# CONFIG_DRM_IMX8QM_LDB is not set\n# CONFIG_DRM_IMX8QXP_LDB is not set\n# CONFIG_DRM_IMX8QXP_PIXEL_COMBINER is not set\n# CONFIG_DRM_IMX8QXP_PIXEL_LINK_TO_DPI is not set\nCONFIG_DRM_DW_HDMI=y\nCONFIG_DRM_DW_HDMI_AHB_AUDIO=y\nCONFIG_DRM_DW_HDMI_I2S_AUDIO=y\n# CONFIG_DRM_DW_HDMI_GP_AUDIO is not set\nCONFIG_DRM_DW_HDMI_CEC=y\n# end of Display Interface Bridges\n\n# CONFIG_DRM_STI is not set\nCONFIG_DRM_IMX=y\nCONFIG_DRM_IMX_PARALLEL_DISPLAY=y\nCONFIG_DRM_IMX_TVE=y\nCONFIG_DRM_IMX_LDB=y\nCONFIG_DRM_IMX_HDMI=y\nCONFIG_DRM_ETNAVIV=y\nCONFIG_DRM_ETNAVIV_THERMAL=y\n# CONFIG_DRM_LOGICVC is not set\n# CONFIG_DRM_MXSFB is not set\n# CONFIG_DRM_IMX_LCDIF is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_BOCHS is not set\n# CONFIG_DRM_CIRRUS_QEMU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_PANEL_MIPI_DBI is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_TINYDRM_HX8357D is not set\n# CONFIG_TINYDRM_ILI9163 is not set\n# CONFIG_TINYDRM_ILI9225 is not set\n# CONFIG_TINYDRM_ILI9341 is not set\n# CONFIG_TINYDRM_ILI9486 is not set\n# CONFIG_TINYDRM_MI0283QT is not set\n# CONFIG_TINYDRM_REPAPER is not set\n# CONFIG_TINYDRM_ST7586 is not set\n# CONFIG_TINYDRM_ST7735R is not set\n# CONFIG_DRM_PL111 is not set\n# CONFIG_DRM_TVE200 is not set\n# CONFIG_DRM_LIMA is not set\n# CONFIG_DRM_PANFROST is not set\n# CONFIG_DRM_MCDE is not set\n# CONFIG_DRM_TIDSS is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_SSD130X is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_DRM_NOMODESET=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\nCONFIG_FB_MODE_HELPERS=y\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_CIRRUS is not set\n# CONFIG_FB_PM2 is not set\n# CONFIG_FB_IMX is not set\n# CONFIG_FB_CYBER2000 is not set\n# CONFIG_FB_ASILIANT is not set\n# CONFIG_FB_IMSTT is not set\n# CONFIG_FB_UVESA is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_NVIDIA is not set\n# CONFIG_FB_RIVA is not set\n# CONFIG_FB_I740 is not set\n# CONFIG_FB_MATROX is not set\n# CONFIG_FB_RADEON is not set\n# CONFIG_FB_ATY128 is not set\n# CONFIG_FB_ATY is not set\n# CONFIG_FB_S3 is not set\n# CONFIG_FB_SAVAGE is not set\n# CONFIG_FB_SIS is not set\n# CONFIG_FB_NEOMAGIC is not set\n# CONFIG_FB_KYRO is not set\n# CONFIG_FB_3DFX is not set\n# CONFIG_FB_VOODOO1 is not set\n# CONFIG_FB_VT8623 is not set\n# CONFIG_FB_TRIDENT is not set\n# CONFIG_FB_ARK is not set\n# CONFIG_FB_PM3 is not set\n# CONFIG_FB_CARMINE is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_MB862XX is not set\n# CONFIG_FB_MX3 is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# CONFIG_FB_SM712 is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\nCONFIG_LCD_CLASS_DEVICE=y\nCONFIG_LCD_L4F00242T03=y\n# CONFIG_LCD_LMS283GF05 is not set\n# CONFIG_LCD_LTV350QV is not set\n# CONFIG_LCD_ILI922X is not set\n# CONFIG_LCD_ILI9320 is not set\n# CONFIG_LCD_TDO24M is not set\n# CONFIG_LCD_VGG2432A4 is not set\nCONFIG_LCD_PLATFORM=y\n# CONFIG_LCD_AMS369FG06 is not set\n# CONFIG_LCD_LMS501KF03 is not set\n# CONFIG_LCD_HX8357 is not set\n# CONFIG_LCD_OTM3225A is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\n# CONFIG_BACKLIGHT_KTD253 is not set\nCONFIG_BACKLIGHT_PWM=y\n# CONFIG_BACKLIGHT_DA9052 is not set\n# CONFIG_BACKLIGHT_QCOM_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\nCONFIG_BACKLIGHT_GPIO=y\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\nCONFIG_BACKLIGHT_RAVE_SP=y\n# CONFIG_BACKLIGHT_LED is not set\n# end of Backlight & LCD device support\n\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_FRAMEBUFFER_CONSOLE=y\n# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\n# end of Console display driver support\n\n# CONFIG_LOGO is not set\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_HWDEP=m\nCONFIG_SND_RAWMIDI=m\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\n# CONFIG_SND_HRTIMER is not set\n# CONFIG_SND_DYNAMIC_MINORS is not set\nCONFIG_SND_SUPPORT_OLD_API=y\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_CTL_INPUT_VALIDATION is not set\n# CONFIG_SND_SEQUENCER is not set\nCONFIG_SND_DRIVERS=y\n# CONFIG_SND_DUMMY is not set\n# CONFIG_SND_ALOOP is not set\n# CONFIG_SND_MTPAV is not set\n# CONFIG_SND_SERIAL_U16550 is not set\n# CONFIG_SND_SERIAL_GENERIC is not set\n# CONFIG_SND_MPU401 is not set\nCONFIG_SND_PCI=y\n# CONFIG_SND_AD1889 is not set\n# CONFIG_SND_ATIIXP is not set\n# CONFIG_SND_ATIIXP_MODEM is not set\n# CONFIG_SND_AU8810 is not set\n# CONFIG_SND_AU8820 is not set\n# CONFIG_SND_AU8830 is not set\n# CONFIG_SND_AW2 is not set\n# CONFIG_SND_BT87X is not set\n# CONFIG_SND_CA0106 is not set\n# CONFIG_SND_CMIPCI is not set\n# CONFIG_SND_OXYGEN is not set\n# CONFIG_SND_CS4281 is not set\n# CONFIG_SND_CS46XX is not set\n# CONFIG_SND_CTXFI is not set\n# CONFIG_SND_DARLA20 is not set\n# CONFIG_SND_GINA20 is not set\n# CONFIG_SND_LAYLA20 is not set\n# CONFIG_SND_DARLA24 is not set\n# CONFIG_SND_GINA24 is not set\n# CONFIG_SND_LAYLA24 is not set\n# CONFIG_SND_MONA is not set\n# CONFIG_SND_MIA is not set\n# CONFIG_SND_ECHO3G is not set\n# CONFIG_SND_INDIGO is not set\n# CONFIG_SND_INDIGOIO is not set\n# CONFIG_SND_INDIGODJ is not set\n# CONFIG_SND_INDIGOIOX is not set\n# CONFIG_SND_INDIGODJX is not set\n# CONFIG_SND_ENS1370 is not set\n# CONFIG_SND_ENS1371 is not set\n# CONFIG_SND_FM801 is not set\n# CONFIG_SND_HDSP is not set\n# CONFIG_SND_HDSPM is not set\n# CONFIG_SND_ICE1724 is not set\n# CONFIG_SND_INTEL8X0 is not set\n# CONFIG_SND_INTEL8X0M is not set\n# CONFIG_SND_KORG1212 is not set\n# CONFIG_SND_LOLA is not set\n# CONFIG_SND_LX6464ES is not set\n# CONFIG_SND_MIXART is not set\n# CONFIG_SND_NM256 is not set\n# CONFIG_SND_PCXHR is not set\n# CONFIG_SND_RIPTIDE is not set\n# CONFIG_SND_RME32 is not set\n# CONFIG_SND_RME96 is not set\n# CONFIG_SND_RME9652 is not set\n# CONFIG_SND_SE6X is not set\n# CONFIG_SND_VIA82XX is not set\n# CONFIG_SND_VIA82XX_MODEM is not set\n# CONFIG_SND_VIRTUOSO is not set\n# CONFIG_SND_VX222 is not set\n# CONFIG_SND_YMFPCI is not set\n\n#\n# HD-Audio\n#\n# CONFIG_SND_HDA_INTEL is not set\n# end of HD-Audio\n\nCONFIG_SND_HDA_PREALLOC_SIZE=64\nCONFIG_SND_ARM=y\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=m\n# CONFIG_SND_USB_UA101 is not set\n# CONFIG_SND_USB_CAIAQ is not set\n# CONFIG_SND_USB_6FIRE is not set\n# CONFIG_SND_USB_HIFACE is not set\n# CONFIG_SND_BCD2000 is not set\n# CONFIG_SND_USB_POD is not set\n# CONFIG_SND_USB_PODHD is not set\n# CONFIG_SND_USB_TONEPORT is not set\n# CONFIG_SND_USB_VARIAX is not set\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\n# CONFIG_SND_SOC_ADI is not set\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_AMD_ACP_CONFIG is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\nCONFIG_SND_SOC_FSL_ASRC=y\nCONFIG_SND_SOC_FSL_SAI=y\n# CONFIG_SND_SOC_FSL_MQS is not set\n# CONFIG_SND_SOC_FSL_AUDMIX is not set\nCONFIG_SND_SOC_FSL_SSI=y\nCONFIG_SND_SOC_FSL_SPDIF=y\nCONFIG_SND_SOC_FSL_ESAI=y\n# CONFIG_SND_SOC_FSL_MICFIL is not set\n# CONFIG_SND_SOC_FSL_EASRC is not set\nCONFIG_SND_SOC_FSL_XCVR=y\nCONFIG_SND_SOC_FSL_AUD2HTX=y\nCONFIG_SND_SOC_FSL_UTILS=y\nCONFIG_SND_SOC_IMX_PCM_DMA=y\nCONFIG_SND_SOC_IMX_AUDMUX=y\nCONFIG_SND_IMX_SOC=y\n\n#\n# SoC Audio support for Freescale i.MX boards:\n#\nCONFIG_SND_SOC_EUKREA_TLV320=y\nCONFIG_SND_SOC_IMX_ES8328=y\nCONFIG_SND_SOC_IMX_SGTL5000=y\nCONFIG_SND_SOC_IMX_SPDIF=y\nCONFIG_SND_SOC_FSL_ASOC_CARD=y\n# CONFIG_SND_SOC_IMX_AUDMIX is not set\nCONFIG_SND_SOC_IMX_HDMI=m\nCONFIG_SND_SOC_IMX_CARD=m\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\nCONFIG_SND_SOC_WM_HUBS=y\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_SPI is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\n# CONFIG_SND_SOC_ADAU7002 is not set\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4375 is not set\nCONFIG_SND_SOC_AK4458=m\n# CONFIG_SND_SOC_AK4554 is not set\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\nCONFIG_SND_SOC_AK5558=m\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_AW8738 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS35L41_SPI is not set\n# CONFIG_SND_SOC_CS35L41_I2C is not set\n# CONFIG_SND_SOC_CS35L45_SPI is not set\n# CONFIG_SND_SOC_CS35L45_I2C is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS42L83 is not set\n# CONFIG_SND_SOC_CS4234 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\nCONFIG_SND_SOC_CS42XX8=y\nCONFIG_SND_SOC_CS42XX8_I2C=y\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\n# CONFIG_SND_SOC_DA7213 is not set\n# CONFIG_SND_SOC_DMIC is not set\nCONFIG_SND_SOC_HDMI_CODEC=y\n# CONFIG_SND_SOC_ES7134 is not set\n# CONFIG_SND_SOC_ES7241 is not set\n# CONFIG_SND_SOC_ES8316 is not set\n# CONFIG_SND_SOC_ES8326 is not set\nCONFIG_SND_SOC_ES8328=y\nCONFIG_SND_SOC_ES8328_I2C=y\nCONFIG_SND_SOC_ES8328_SPI=y\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_HDA is not set\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\n# CONFIG_SND_SOC_MAX98088 is not set\n# CONFIG_SND_SOC_MAX98357A is not set\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98520 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX98396 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM179X_SPI is not set\n# CONFIG_SND_SOC_PCM186X_I2C is not set\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3060_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\n# CONFIG_SND_SOC_PCM5102A is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK3328 is not set\n# CONFIG_SND_SOC_RT5616 is not set\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\n# CONFIG_SND_SOC_RT5659 is not set\n# CONFIG_SND_SOC_RT9120 is not set\nCONFIG_SND_SOC_SGTL5000=y\n# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\n# CONFIG_SND_SOC_SPDIF is not set\n# CONFIG_SND_SOC_SRC4XXX_I2C is not set\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS2780 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805M is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320ADC3XXX is not set\nCONFIG_SND_SOC_TLV320AIC23=y\nCONFIG_SND_SOC_TLV320AIC23_I2C=y\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\nCONFIG_SND_SOC_TLV320AIC31XX=y\n# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\nCONFIG_SND_SOC_TLV320AIC3X=y\nCONFIG_SND_SOC_TLV320AIC3X_I2C=y\nCONFIG_SND_SOC_TLV320AIC3X_SPI=y\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731_I2C is not set\n# CONFIG_SND_SOC_WM8731_SPI is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8940 is not set\nCONFIG_SND_SOC_WM8960=y\nCONFIG_SND_SOC_WM8962=y\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\nCONFIG_SND_SOC_WM8994=y\n# CONFIG_SND_SOC_ZL38060 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8821 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\nCONFIG_SND_SOC_TPA6130A2=y\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\n# end of CODEC drivers\n\nCONFIG_SND_SIMPLE_CARD_UTILS=y\nCONFIG_SND_SIMPLE_CARD=y\n# CONFIG_SND_AUDIO_GRAPH_CARD is not set\n# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set\n# CONFIG_SND_TEST_COMPONENT is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\nCONFIG_HID_BATTERY_STRENGTH=y\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\n# CONFIG_HID_A4TECH is not set\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\n# CONFIG_HID_APPLEIR is not set\n# CONFIG_HID_ASUS is not set\n# CONFIG_HID_AUREAL is not set\n# CONFIG_HID_BELKIN is not set\n# CONFIG_HID_BETOP_FF is not set\n# CONFIG_HID_BIGBEN_FF is not set\n# CONFIG_HID_CHERRY is not set\n# CONFIG_HID_CHICONY is not set\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\n# CONFIG_HID_CYPRESS is not set\n# CONFIG_HID_DRAGONRISE is not set\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\n# CONFIG_HID_EZKEY is not set\n# CONFIG_HID_FT260 is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_GLORIOUS is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\n# CONFIG_HID_KYE is not set\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_VRC2 is not set\n# CONFIG_HID_XIAOMI is not set\n# CONFIG_HID_GYRATION is not set\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_ITE is not set\n# CONFIG_HID_JABRA is not set\n# CONFIG_HID_TWINHAN is not set\n# CONFIG_HID_KENSINGTON is not set\n# CONFIG_HID_LCPOWER is not set\n# CONFIG_HID_LED is not set\n# CONFIG_HID_LENOVO is not set\n# CONFIG_HID_LETSKETCH is not set\n# CONFIG_HID_LOGITECH is not set\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_MEGAWORLD_FF is not set\n# CONFIG_HID_REDRAGON is not set\n# CONFIG_HID_MICROSOFT is not set\n# CONFIG_HID_MONTEREY is not set\nCONFIG_HID_MULTITOUCH=y\nCONFIG_HID_NINTENDO=m\nCONFIG_NINTENDO_FF=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\n# CONFIG_HID_ORTEK is not set\nCONFIG_HID_OUYA=y\n# CONFIG_HID_PANTHERLORD is not set\n# CONFIG_HID_PENMOUNT is not set\n# CONFIG_HID_PETALYNX is not set\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PXRC is not set\n# CONFIG_HID_RAZER is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\n# CONFIG_HID_SAMSUNG is not set\n# CONFIG_HID_SEMITEK is not set\n# CONFIG_HID_SIGMAMICRO is not set\nCONFIG_HID_SONY=y\nCONFIG_SONY_FF=y\n# CONFIG_HID_SPEEDLINK is not set\n# CONFIG_HID_STEAM is not set\n# CONFIG_HID_STEELSERIES is not set\n# CONFIG_HID_SUNPLUS is not set\n# CONFIG_HID_RMI is not set\n# CONFIG_HID_GREENASIA is not set\n# CONFIG_HID_SMARTJOYPLUS is not set\n# CONFIG_HID_TIVO is not set\n# CONFIG_HID_TOPSEED is not set\n# CONFIG_HID_TOPRE is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\n# CONFIG_HID_WIIMOTE is not set\n# CONFIG_HID_XINMO is not set\n# CONFIG_HID_ZEROPLUS is not set\n# CONFIG_HID_ZYDACRON is not set\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\n# CONFIG_USB_HIDDEV is not set\n# end of USB HID support\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID_OF is not set\n# CONFIG_I2C_HID_OF_ELAN is not set\n# CONFIG_I2C_HID_OF_GOODIX is not set\n# end of I2C HID support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\nCONFIG_USB_ULPI_BUS=y\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_PCI=y\n# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\n# CONFIG_USB_OTG is not set\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\n# CONFIG_USB_MON is not set\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\n# CONFIG_USB_XHCI_HCD is not set\nCONFIG_USB_EHCI_HCD=y\nCONFIG_USB_EHCI_ROOT_HUB_TT=y\nCONFIG_USB_EHCI_TT_NEWSCHED=y\nCONFIG_USB_EHCI_PCI=y\n# CONFIG_USB_EHCI_FSL is not set\n# CONFIG_USB_EHCI_HCD_PLATFORM is not set\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\n# CONFIG_USB_OHCI_HCD is not set\n# CONFIG_USB_UHCI_HCD is not set\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\n# CONFIG_USB_ACM is not set\n# CONFIG_USB_PRINTER is not set\n# CONFIG_USB_WDM is not set\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\n# CONFIG_USB_UAS is not set\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\n# CONFIG_USB_MUSB_HDRC is not set\n# CONFIG_USB_DWC3 is not set\n# CONFIG_USB_DWC2 is not set\nCONFIG_USB_CHIPIDEA=y\nCONFIG_USB_CHIPIDEA_UDC=y\nCONFIG_USB_CHIPIDEA_HOST=y\nCONFIG_USB_CHIPIDEA_PCI=y\nCONFIG_USB_CHIPIDEA_MSM=y\nCONFIG_USB_CHIPIDEA_IMX=y\nCONFIG_USB_CHIPIDEA_GENERIC=y\nCONFIG_USB_CHIPIDEA_TEGRA=y\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=m\nCONFIG_USB_SERIAL_GENERIC=y\n# CONFIG_USB_SERIAL_SIMPLE is not set\n# CONFIG_USB_SERIAL_AIRCABLE is not set\n# CONFIG_USB_SERIAL_ARK3116 is not set\n# CONFIG_USB_SERIAL_BELKIN is not set\n# CONFIG_USB_SERIAL_CH341 is not set\n# CONFIG_USB_SERIAL_WHITEHEAT is not set\n# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set\n# CONFIG_USB_SERIAL_CP210X is not set\n# CONFIG_USB_SERIAL_CYPRESS_M8 is not set\n# CONFIG_USB_SERIAL_EMPEG is not set\nCONFIG_USB_SERIAL_FTDI_SIO=m\n# CONFIG_USB_SERIAL_VISOR is not set\n# CONFIG_USB_SERIAL_IPAQ is not set\n# CONFIG_USB_SERIAL_IR is not set\n# CONFIG_USB_SERIAL_EDGEPORT is not set\n# CONFIG_USB_SERIAL_EDGEPORT_TI is not set\n# CONFIG_USB_SERIAL_F81232 is not set\n# CONFIG_USB_SERIAL_F8153X is not set\n# CONFIG_USB_SERIAL_GARMIN is not set\n# CONFIG_USB_SERIAL_IPW is not set\n# CONFIG_USB_SERIAL_IUU is not set\n# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set\n# CONFIG_USB_SERIAL_KEYSPAN is not set\n# CONFIG_USB_SERIAL_KLSI is not set\n# CONFIG_USB_SERIAL_KOBIL_SCT is not set\n# CONFIG_USB_SERIAL_MCT_U232 is not set\n# CONFIG_USB_SERIAL_METRO is not set\n# CONFIG_USB_SERIAL_MOS7720 is not set\n# CONFIG_USB_SERIAL_MOS7840 is not set\n# CONFIG_USB_SERIAL_MXUPORT is not set\n# CONFIG_USB_SERIAL_NAVMAN is not set\n# CONFIG_USB_SERIAL_PL2303 is not set\n# CONFIG_USB_SERIAL_OTI6858 is not set\n# CONFIG_USB_SERIAL_QCAUX is not set\n# CONFIG_USB_SERIAL_QUALCOMM is not set\n# CONFIG_USB_SERIAL_SPCP8X5 is not set\n# CONFIG_USB_SERIAL_SAFE is not set\n# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set\n# CONFIG_USB_SERIAL_SYMBOL is not set\n# CONFIG_USB_SERIAL_TI is not set\n# CONFIG_USB_SERIAL_CYBERJACK is not set\nCONFIG_USB_SERIAL_WWAN=m\nCONFIG_USB_SERIAL_OPTION=m\n# CONFIG_USB_SERIAL_OMNINET is not set\n# CONFIG_USB_SERIAL_OPTICON is not set\n# CONFIG_USB_SERIAL_XSENS_MT is not set\n# CONFIG_USB_SERIAL_WISHBONE is not set\n# CONFIG_USB_SERIAL_SSU100 is not set\n# CONFIG_USB_SERIAL_QT2 is not set\n# CONFIG_USB_SERIAL_UPD78F0730 is not set\n# CONFIG_USB_SERIAL_XR is not set\n# CONFIG_USB_SERIAL_DEBUG is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\nCONFIG_USB_TEST=m\nCONFIG_USB_EHSET_TEST_FIXTURE=m\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\n# CONFIG_USB_EZUSB_FX2 is not set\n# CONFIG_USB_HUB_USB251XB is not set\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n# CONFIG_USB_ONBOARD_HUB is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\nCONFIG_NOP_USB_XCEIV=y\n# CONFIG_AM335X_PHY_USB is not set\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\nCONFIG_USB_MXS_PHY=y\n# CONFIG_USB_ULPI is not set\n# end of USB Physical Layer drivers\n\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\n# CONFIG_USB_GADGET_DEBUG_FILES is not set\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=2\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n# CONFIG_U_SERIAL_CONSOLE is not set\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FUSB300 is not set\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\n# CONFIG_USB_SNP_UDC_PLAT is not set\n# CONFIG_USB_M66592 is not set\n# CONFIG_USB_BDC_UDC is not set\n# CONFIG_USB_AMD5536UDC is not set\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_NET2280 is not set\n# CONFIG_USB_GOKU is not set\n# CONFIG_USB_EG20T is not set\n# CONFIG_USB_GADGET_XILINX is not set\n# CONFIG_USB_MAX3420_UDC is not set\n# CONFIG_USB_DUMMY_HCD is not set\n# end of USB Peripheral Controller\n\nCONFIG_USB_LIBCOMPOSITE=m\nCONFIG_USB_F_ACM=m\nCONFIG_USB_F_SS_LB=m\nCONFIG_USB_U_SERIAL=m\nCONFIG_USB_U_ETHER=m\nCONFIG_USB_U_AUDIO=m\nCONFIG_USB_F_SERIAL=m\nCONFIG_USB_F_OBEX=m\nCONFIG_USB_F_NCM=m\nCONFIG_USB_F_ECM=m\nCONFIG_USB_F_EEM=m\nCONFIG_USB_F_SUBSET=m\nCONFIG_USB_F_RNDIS=m\nCONFIG_USB_F_MASS_STORAGE=m\nCONFIG_USB_F_FS=m\nCONFIG_USB_F_UAC1=m\nCONFIG_USB_F_UAC2=m\nCONFIG_USB_F_UVC=m\nCONFIG_USB_F_MIDI=m\nCONFIG_USB_F_HID=m\nCONFIG_USB_F_PRINTER=m\nCONFIG_USB_CONFIGFS=m\nCONFIG_USB_CONFIGFS_SERIAL=y\nCONFIG_USB_CONFIGFS_ACM=y\nCONFIG_USB_CONFIGFS_OBEX=y\nCONFIG_USB_CONFIGFS_NCM=y\nCONFIG_USB_CONFIGFS_ECM=y\nCONFIG_USB_CONFIGFS_ECM_SUBSET=y\nCONFIG_USB_CONFIGFS_RNDIS=y\nCONFIG_USB_CONFIGFS_EEM=y\nCONFIG_USB_CONFIGFS_MASS_STORAGE=y\nCONFIG_USB_CONFIGFS_F_LB_SS=y\nCONFIG_USB_CONFIGFS_F_FS=y\nCONFIG_USB_CONFIGFS_F_UAC1=y\n# CONFIG_USB_CONFIGFS_F_UAC1_LEGACY is not set\nCONFIG_USB_CONFIGFS_F_UAC2=y\nCONFIG_USB_CONFIGFS_F_MIDI=y\nCONFIG_USB_CONFIGFS_F_HID=y\nCONFIG_USB_CONFIGFS_F_UVC=y\nCONFIG_USB_CONFIGFS_F_PRINTER=y\n\n#\n# USB Gadget precomposed configurations\n#\nCONFIG_USB_ZERO=m\nCONFIG_USB_AUDIO=m\n# CONFIG_GADGET_UAC1 is not set\nCONFIG_USB_ETH=m\nCONFIG_USB_ETH_RNDIS=y\n# CONFIG_USB_ETH_EEM is not set\nCONFIG_USB_G_NCM=m\nCONFIG_USB_GADGETFS=m\nCONFIG_USB_FUNCTIONFS=m\n# CONFIG_USB_FUNCTIONFS_ETH is not set\n# CONFIG_USB_FUNCTIONFS_RNDIS is not set\nCONFIG_USB_FUNCTIONFS_GENERIC=y\nCONFIG_USB_MASS_STORAGE=m\nCONFIG_USB_G_SERIAL=m\n# CONFIG_USB_MIDI_GADGET is not set\n# CONFIG_USB_G_PRINTER is not set\n# CONFIG_USB_CDC_COMPOSITE is not set\n# CONFIG_USB_G_ACM_MS is not set\n# CONFIG_USB_G_MULTI is not set\n# CONFIG_USB_G_HID is not set\n# CONFIG_USB_G_DBGP is not set\n# CONFIG_USB_G_WEBCAM is not set\n# CONFIG_USB_RAW_GADGET is not set\n# end of USB Gadget precomposed configurations\n\n# CONFIG_TYPEC is not set\nCONFIG_USB_ROLE_SWITCH=y\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\n# CONFIG_PWRSEQ_SD8787 is not set\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=8\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_DEBUG is not set\nCONFIG_MMC_SDHCI=y\nCONFIG_MMC_SDHCI_IO_ACCESSORS=y\n# CONFIG_MMC_SDHCI_PCI is not set\nCONFIG_MMC_SDHCI_PLTFM=y\n# CONFIG_MMC_SDHCI_OF_ARASAN is not set\n# CONFIG_MMC_SDHCI_OF_AT91 is not set\n# CONFIG_MMC_SDHCI_OF_ESDHC is not set\n# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set\n# CONFIG_MMC_SDHCI_CADENCE is not set\nCONFIG_MMC_SDHCI_ESDHC_IMX=y\n# CONFIG_MMC_SDHCI_F_SDH30 is not set\n# CONFIG_MMC_SDHCI_MILBEAUT is not set\n# CONFIG_MMC_MXC is not set\n# CONFIG_MMC_TIFM_SD is not set\n# CONFIG_MMC_SPI is not set\n# CONFIG_MMC_CB710 is not set\n# CONFIG_MMC_VIA_SDMMC is not set\n# CONFIG_MMC_DW is not set\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_CQHCI=y\n# CONFIG_MMC_HSQ is not set\n# CONFIG_MMC_TOSHIBA_PCI is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MMC_SDHCI_XENON is not set\n# CONFIG_MMC_SDHCI_OMAP is not set\n# CONFIG_MMC_SDHCI_AM654 is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\n# CONFIG_LEDS_CLASS_FLASH is not set\n# CONFIG_LEDS_CLASS_MULTICOLOR is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AN30259A is not set\n# CONFIG_LEDS_AW2013 is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_EL15203000 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_LP55XX_COMMON is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DA9052 is not set\n# CONFIG_LEDS_DAC124S085 is not set\nCONFIG_LEDS_PWM=y\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_MC13783 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_SYSCON is not set\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_SPI_BYTE is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\n\n#\n# RGB LED drivers\n#\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\nCONFIG_LEDS_TRIGGER_TIMER=y\nCONFIG_LEDS_TRIGGER_ONESHOT=y\n# CONFIG_LEDS_TRIGGER_DISK is not set\n# CONFIG_LEDS_TRIGGER_MTD is not set\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\nCONFIG_LEDS_TRIGGER_BACKLIGHT=y\n# CONFIG_LEDS_TRIGGER_CPU is not set\n# CONFIG_LEDS_TRIGGER_ACTIVITY is not set\nCONFIG_LEDS_TRIGGER_GPIO=y\n# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\n# CONFIG_LEDS_TRIGGER_TRANSIENT is not set\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\n# CONFIG_LEDS_TRIGGER_PANIC is not set\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\n# CONFIG_LEDS_TRIGGER_AUDIO is not set\n# CONFIG_LEDS_TRIGGER_TTY is not set\n\n#\n# Simple LED drivers\n#\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_ATOMIC_SCRUB=y\nCONFIG_EDAC_SUPPORT=y\n# CONFIG_EDAC is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\nCONFIG_RTC_INTF_DEV_UIE_EMUL=y\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\nCONFIG_RTC_DRV_DS1307=y\n# CONFIG_RTC_DRV_DS1307_CENTURY is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_HYM8563 is not set\n# CONFIG_RTC_DRV_MAX6900 is not set\n# CONFIG_RTC_DRV_NCT3018Y is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\nCONFIG_RTC_DRV_ISL1208=y\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\nCONFIG_RTC_DRV_PCF8523=y\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\nCONFIG_RTC_DRV_PCF8563=y\n# CONFIG_RTC_DRV_PCF8583 is not set\nCONFIG_RTC_DRV_M41T80=y\n# CONFIG_RTC_DRV_M41T80_WDT is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\n# CONFIG_RTC_DRV_DS3232 is not set\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_CMOS is not set\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_DA9052 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_IMXDI is not set\n# CONFIG_RTC_DRV_CADENCE is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\nCONFIG_RTC_DRV_MC13XXX=y\nCONFIG_RTC_DRV_MXC=y\n# CONFIG_RTC_DRV_MXC_V2 is not set\nCONFIG_RTC_DRV_SNVS=y\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_VIRTUAL_CHANNELS=y\nCONFIG_DMA_OF=y\n# CONFIG_ALTERA_MSGDMA is not set\n# CONFIG_DW_AXI_DMAC is not set\nCONFIG_FSL_EDMA=y\n# CONFIG_FSL_QDMA is not set\n# CONFIG_IMX_DMA is not set\nCONFIG_IMX_SDMA=y\n# CONFIG_INTEL_IDMA64 is not set\nCONFIG_MXS_DMA=y\nCONFIG_MX3_IPU=y\nCONFIG_MX3_IPU_IRQS=4\n# CONFIG_NBPFAXI_DMA is not set\n# CONFIG_PLX_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DPDMA is not set\n# CONFIG_QCOM_HIDMA_MGMT is not set\n# CONFIG_QCOM_HIDMA is not set\n# CONFIG_DW_DMAC is not set\n# CONFIG_DW_DMAC_PCI is not set\n# CONFIG_DW_EDMA is not set\n# CONFIG_DW_EDMA_PCIE is not set\n# CONFIG_SF_PDMA is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\n# CONFIG_UDMABUF is not set\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\nCONFIG_DMABUF_HEAPS=y\n# CONFIG_DMABUF_SYSFS_STATS is not set\nCONFIG_DMABUF_HEAPS_SYSTEM=y\nCONFIG_DMABUF_HEAPS_CMA=y\n# end of DMABUF options\n\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\nCONFIG_VIRTIO_MENU=y\n# CONFIG_VIRTIO_PCI is not set\n# CONFIG_VIRTIO_MMIO is not set\n# CONFIG_VDPA is not set\nCONFIG_VHOST_MENU=y\n# CONFIG_VHOST_NET is not set\n# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# end of Microsoft Hyper-V guest support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_RTL8192U is not set\n# CONFIG_RTLLIB is not set\n# CONFIG_RTL8723BS is not set\n# CONFIG_R8712U is not set\nCONFIG_R8188EU=m\n# CONFIG_RTS5208 is not set\n# CONFIG_VT6655 is not set\n# CONFIG_VT6656 is not set\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16240 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7816 is not set\n# end of Analog to digital converters\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n# end of Analog digital bi-direction converters\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n# end of Direct Digital Synthesis\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n# end of Network Analyzer, Impedance Converters\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7854 is not set\n# end of Active energy metering IC\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S1210 is not set\n# end of Resolver to digital converters\n# end of IIO staging drivers\n\n# CONFIG_FB_SM750 is not set\n# CONFIG_STAGING_MEDIA is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_KS7010 is not set\n# CONFIG_PI433 is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_FIELDBUS_DEV is not set\n# CONFIG_QLGE is not set\n# CONFIG_VME_BUS is not set\n# CONFIG_GOLDFISH is not set\n# CONFIG_CHROME_PLATFORMS is not set\n# CONFIG_MELLANOX_PLATFORM is not set\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Clock driver for ARM Reference designs\n#\n# CONFIG_CLK_ICST is not set\n# CONFIG_CLK_SP810 is not set\n# end of Clock driver for ARM Reference designs\n\n# CONFIG_LMK04832 is not set\n# CONFIG_COMMON_CLK_MAX9485 is not set\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\nCONFIG_COMMON_CLK_CS2000_CP=y\n# CONFIG_COMMON_CLK_AXI_CLKGEN is not set\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_RS9_PCIE is not set\n# CONFIG_COMMON_CLK_VC5 is not set\n# CONFIG_COMMON_CLK_VC7 is not set\n# CONFIG_COMMON_CLK_FIXED_MMIO is not set\nCONFIG_MXC_CLK=y\nCONFIG_CLK_IMX6Q=y\nCONFIG_CLK_IMX6SL=y\nCONFIG_CLK_IMX6SLL=y\nCONFIG_CLK_IMX6SX=y\nCONFIG_CLK_IMX6UL=y\n# CONFIG_CLK_IMX8MM is not set\n# CONFIG_CLK_IMX8MN is not set\n# CONFIG_CLK_IMX8MP is not set\n# CONFIG_CLK_IMX8MQ is not set\n# CONFIG_CLK_IMX8ULP is not set\n# CONFIG_CLK_IMX93 is not set\n# CONFIG_XILINX_VCU is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\n# CONFIG_HWSPINLOCK is not set\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\nCONFIG_CLKSRC_MMIO=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_CLKSRC_IMX_GPT=y\n# CONFIG_MICROCHIP_PIT64B is not set\n# end of Clock Source drivers\n\n# CONFIG_MAILBOX is not set\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\n# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set\n# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set\n# end of Generic IOMMU Pagetable Support\n\n# CONFIG_IOMMU_DEBUGFS is not set\n# CONFIG_ARM_SMMU is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\n# CONFIG_RPMSG_VIRTIO is not set\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\n# CONFIG_SOC_BRCMSTB is not set\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# CONFIG_QUICC_ENGINE is not set\n# CONFIG_FSL_RCPM is not set\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# fujitsu SoC drivers\n#\n# end of fujitsu SoC drivers\n\n#\n# i.MX SoC drivers\n#\nCONFIG_IMX_GPCV2_PM_DOMAINS=y\n# CONFIG_SOC_IMX8M is not set\n# CONFIG_SOC_IMX9 is not set\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# CONFIG_LITEX_SOC_CONTROLLER is not set\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# end of Qualcomm SoC drivers\n\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\n# CONFIG_PM_DEVFREQ is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_FSA9480 is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_PTN5150 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\n# CONFIG_EXTCON_USB_GPIO is not set\n# CONFIG_MEMORY is not set\nCONFIG_IIO=y\nCONFIG_IIO_BUFFER=y\n# CONFIG_IIO_BUFFER_CB is not set\n# CONFIG_IIO_BUFFER_DMA is not set\n# CONFIG_IIO_BUFFER_DMAENGINE is not set\n# CONFIG_IIO_BUFFER_HW_CONSUMER is not set\nCONFIG_IIO_KFIFO_BUF=y\nCONFIG_IIO_TRIGGERED_BUFFER=y\n# CONFIG_IIO_CONFIGFS is not set\nCONFIG_IIO_TRIGGER=y\nCONFIG_IIO_CONSUMERS_PER_TRIGGER=2\n# CONFIG_IIO_SW_DEVICE is not set\n# CONFIG_IIO_SW_TRIGGER is not set\n# CONFIG_IIO_TRIGGERED_EVENT is not set\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADXL313_I2C is not set\n# CONFIG_ADXL313_SPI is not set\n# CONFIG_ADXL345_I2C is not set\n# CONFIG_ADXL345_SPI is not set\n# CONFIG_ADXL355_I2C is not set\n# CONFIG_ADXL355_SPI is not set\n# CONFIG_ADXL367_SPI is not set\n# CONFIG_ADXL367_I2C is not set\n# CONFIG_ADXL372_SPI is not set\n# CONFIG_ADXL372_I2C is not set\n# CONFIG_BMA180 is not set\n# CONFIG_BMA220 is not set\n# CONFIG_BMA400 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_BMI088_ACCEL is not set\n# CONFIG_DA280 is not set\n# CONFIG_DA311 is not set\n# CONFIG_DMARD06 is not set\n# CONFIG_DMARD09 is not set\n# CONFIG_DMARD10 is not set\n# CONFIG_FXLS8962AF_I2C is not set\n# CONFIG_FXLS8962AF_SPI is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MC3230 is not set\n# CONFIG_MMA7455_I2C is not set\n# CONFIG_MMA7455_SPI is not set\n# CONFIG_MMA7660 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MSA311 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_MXC6255 is not set\n# CONFIG_SCA3000 is not set\n# CONFIG_SCA3300 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7091R5 is not set\n# CONFIG_AD7124 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7266 is not set\n# CONFIG_AD7280 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7292 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7606_IFACE_PARALLEL is not set\n# CONFIG_AD7606_IFACE_SPI is not set\n# CONFIG_AD7766 is not set\n# CONFIG_AD7768_1 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD7949 is not set\n# CONFIG_AD799X is not set\n# CONFIG_ADI_AXI_ADC is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_ENVELOPE_DETECTOR is not set\n# CONFIG_HI8435 is not set\n# CONFIG_HX711 is not set\n# CONFIG_INA2XX_ADC is not set\nCONFIG_IMX7D_ADC=y\n# CONFIG_IMX8QXP_ADC is not set\n# CONFIG_LTC2471 is not set\n# CONFIG_LTC2485 is not set\n# CONFIG_LTC2496 is not set\n# CONFIG_LTC2497 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX11100 is not set\n# CONFIG_MAX1118 is not set\n# CONFIG_MAX11205 is not set\n# CONFIG_MAX1241 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MAX9611 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_MCP3911 is not set\n# CONFIG_NAU7802 is not set\n# CONFIG_RICHTEK_RTQ6056 is not set\n# CONFIG_SD_ADC_MODULATOR is not set\n# CONFIG_STMPE_ADC is not set\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC0832 is not set\n# CONFIG_TI_ADC084S021 is not set\n# CONFIG_TI_ADC12138 is not set\n# CONFIG_TI_ADC108S102 is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_TI_ADC161S626 is not set\n# CONFIG_TI_ADS1015 is not set\n# CONFIG_TI_ADS7950 is not set\n# CONFIG_TI_ADS8344 is not set\n# CONFIG_TI_ADS8688 is not set\n# CONFIG_TI_ADS124S08 is not set\n# CONFIG_TI_ADS131E08 is not set\n# CONFIG_TI_TLC4541 is not set\n# CONFIG_TI_TSC2046 is not set\nCONFIG_VF610_ADC=y\n# CONFIG_XILINX_XADC is not set\n# end of Analog to digital converters\n\n#\n# Analog to digital and digital to analog converters\n#\n# CONFIG_AD74413R is not set\n# end of Analog to digital and digital to analog converters\n\n#\n# Analog Front Ends\n#\n# CONFIG_IIO_RESCALE is not set\n# end of Analog Front Ends\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n# CONFIG_ADA4250 is not set\n# CONFIG_HMC425 is not set\n# end of Amplifiers\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7746 is not set\n# end of Capacitance to digital converters\n\n#\n# Chemical Sensors\n#\n# CONFIG_ATLAS_PH_SENSOR is not set\n# CONFIG_ATLAS_EZO_SENSOR is not set\n# CONFIG_BME680 is not set\n# CONFIG_CCS811 is not set\n# CONFIG_IAQCORE is not set\n# CONFIG_PMS7003 is not set\n# CONFIG_SCD30_CORE is not set\n# CONFIG_SCD4X is not set\n# CONFIG_SENSIRION_SGP30 is not set\n# CONFIG_SENSIRION_SGP40 is not set\n# CONFIG_SPS30_I2C is not set\n# CONFIG_SPS30_SERIAL is not set\n# CONFIG_SENSEAIR_SUNRISE_CO2 is not set\n# CONFIG_VZ89X is not set\n# end of Chemical Sensors\n\n#\n# Hid Sensor IIO Common\n#\n# end of Hid Sensor IIO Common\n\n#\n# IIO SCMI Sensors\n#\n# end of IIO SCMI Sensors\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n# end of SSP Sensor Common\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD3552R is not set\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5592R is not set\n# CONFIG_AD5593R is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_LTC2688 is not set\n# CONFIG_AD5686_SPI is not set\n# CONFIG_AD5696_I2C is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5758 is not set\n# CONFIG_AD5761 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5766 is not set\n# CONFIG_AD5770R is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7293 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_AD8801 is not set\n# CONFIG_DPOT_DAC is not set\n# CONFIG_DS4424 is not set\n# CONFIG_LTC1660 is not set\n# CONFIG_LTC2632 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n# CONFIG_TI_DAC082S085 is not set\n# CONFIG_TI_DAC5571 is not set\n# CONFIG_TI_DAC7311 is not set\n# CONFIG_TI_DAC7612 is not set\n# CONFIG_VF610_DAC is not set\n# end of Digital to analog converters\n\n#\n# IIO dummy driver\n#\n# end of IIO dummy driver\n\n#\n# Filters\n#\n# end of Filters\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n# end of Clock Generator/Distribution\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n# CONFIG_ADF4371 is not set\n# CONFIG_ADMV1013 is not set\n# CONFIG_ADMV4420 is not set\n# CONFIG_ADRF6780 is not set\n# end of Phase-Locked Loop (PLL) frequency synthesizers\n# end of Frequency Synthesizers DDS/PLL\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS290 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_FXAS21002C is not set\n# CONFIG_MPU3050_I2C is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n# end of Digital gyroscope sensors\n\n#\n# Health Sensors\n#\n\n#\n# Heart Rate Monitors\n#\n# CONFIG_AFE4403 is not set\n# CONFIG_AFE4404 is not set\n# CONFIG_MAX30100 is not set\n# CONFIG_MAX30102 is not set\n# end of Heart Rate Monitors\n# end of Health Sensors\n\n#\n# Humidity sensors\n#\n# CONFIG_AM2315 is not set\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HDC2010 is not set\n# CONFIG_HTS221 is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n# end of Humidity sensors\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16460 is not set\n# CONFIG_ADIS16475 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_BMI160_I2C is not set\n# CONFIG_BMI160_SPI is not set\n# CONFIG_BOSCH_BNO055_SERIAL is not set\n# CONFIG_BOSCH_BNO055_I2C is not set\n# CONFIG_FXOS8700_I2C is not set\n# CONFIG_FXOS8700_SPI is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_ICM42600_I2C is not set\n# CONFIG_INV_ICM42600_SPI is not set\n# CONFIG_INV_MPU6050_I2C is not set\n# CONFIG_INV_MPU6050_SPI is not set\n# CONFIG_IIO_ST_LSM6DSX is not set\n# CONFIG_IIO_ST_LSM9DS0 is not set\n# end of Inertial measurement units\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_ADUX1020 is not set\n# CONFIG_AL3010 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_AS73211 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_BH1780 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM3605 is not set\n# CONFIG_CM36651 is not set\n# CONFIG_GP2AP002 is not set\n# CONFIG_GP2AP020A00F is not set\n# CONFIG_SENSORS_ISL29018 is not set\n# CONFIG_SENSORS_ISL29028 is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_LTRF216A is not set\n# CONFIG_LV0104CS is not set\n# CONFIG_MAX44000 is not set\n# CONFIG_MAX44009 is not set\n# CONFIG_NOA1305 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_SI1133 is not set\n# CONFIG_SI1145 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_ST_UVIS25 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\n# CONFIG_SENSORS_TSL2563 is not set\n# CONFIG_TSL2583 is not set\n# CONFIG_TSL2591 is not set\n# CONFIG_TSL2772 is not set\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VCNL4035 is not set\n# CONFIG_VEML6030 is not set\n# CONFIG_VEML6070 is not set\n# CONFIG_VL6180 is not set\n# CONFIG_ZOPT2201 is not set\n# end of Light sensors\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8974 is not set\n# CONFIG_AK8975 is not set\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN_I2C is not set\n# CONFIG_BMC150_MAGN_SPI is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n# CONFIG_SENSORS_RM3100_I2C is not set\n# CONFIG_SENSORS_RM3100_SPI is not set\n# CONFIG_YAMAHA_YAS530 is not set\n# end of Magnetometer sensors\n\n#\n# Multiplexers\n#\n# CONFIG_IIO_MUX is not set\n# end of Multiplexers\n\n#\n# Inclinometer sensors\n#\n# end of Inclinometer sensors\n\n#\n# Triggers - standalone\n#\n# CONFIG_IIO_INTERRUPT_TRIGGER is not set\n# CONFIG_IIO_SYSFS_TRIGGER is not set\n# end of Triggers - standalone\n\n#\n# Linear and angular position sensors\n#\n# end of Linear and angular position sensors\n\n#\n# Digital potentiometers\n#\n# CONFIG_AD5110 is not set\n# CONFIG_AD5272 is not set\n# CONFIG_DS1803 is not set\n# CONFIG_MAX5432 is not set\n# CONFIG_MAX5481 is not set\n# CONFIG_MAX5487 is not set\n# CONFIG_MCP4018 is not set\n# CONFIG_MCP4131 is not set\n# CONFIG_MCP4531 is not set\n# CONFIG_MCP41010 is not set\n# CONFIG_TPL0102 is not set\n# end of Digital potentiometers\n\n#\n# Digital potentiostats\n#\n# CONFIG_LMP91000 is not set\n# end of Digital potentiostats\n\n#\n# Pressure sensors\n#\n# CONFIG_ABP060MG is not set\n# CONFIG_BMP280 is not set\n# CONFIG_DLHL60D is not set\n# CONFIG_DPS310 is not set\n# CONFIG_HP03 is not set\n# CONFIG_ICP10100 is not set\n# CONFIG_MPL115_I2C is not set\n# CONFIG_MPL115_SPI is not set\nCONFIG_MPL3115=y\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n# CONFIG_HP206C is not set\n# CONFIG_ZPA2326 is not set\n# end of Pressure sensors\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n# end of Lightning sensors\n\n#\n# Proximity and distance sensors\n#\n# CONFIG_ISL29501 is not set\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_MB1232 is not set\n# CONFIG_PING is not set\n# CONFIG_RFD77402 is not set\n# CONFIG_SRF04 is not set\n# CONFIG_SX9310 is not set\n# CONFIG_SX9324 is not set\n# CONFIG_SX9360 is not set\n# CONFIG_SX9500 is not set\n# CONFIG_SRF08 is not set\n# CONFIG_VCNL3020 is not set\n# CONFIG_VL53L0X_I2C is not set\n# end of Proximity and distance sensors\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1200 is not set\n# end of Resolver to digital converters\n\n#\n# Temperature sensors\n#\n# CONFIG_LTC2983 is not set\n# CONFIG_MAXIM_THERMOCOUPLE is not set\n# CONFIG_MLX90614 is not set\n# CONFIG_MLX90632 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TMP007 is not set\n# CONFIG_TMP117 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\n# CONFIG_MAX31856 is not set\n# CONFIG_MAX31865 is not set\n# end of Temperature sensors\n\n# CONFIG_NTB is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_DEBUG is not set\n# CONFIG_PWM_ATMEL_TCB is not set\n# CONFIG_PWM_CLK is not set\n# CONFIG_PWM_DWC is not set\nCONFIG_PWM_FSL_FTM=y\n# CONFIG_PWM_IMX1 is not set\n# CONFIG_PWM_IMX27 is not set\n# CONFIG_PWM_IMX_TPM is not set\n# CONFIG_PWM_PCA9685 is not set\n# CONFIG_PWM_STMPE is not set\n# CONFIG_PWM_XILINX is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\n# CONFIG_AL_FIC is not set\n# CONFIG_XILINX_INTC is not set\nCONFIG_IMX_IRQSTEER=y\nCONFIG_IMX_INTMUX=y\n# CONFIG_IMX_MU_MSI is not set\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\nCONFIG_ARCH_HAS_RESET_CONTROLLER=y\nCONFIG_RESET_CONTROLLER=y\n# CONFIG_RESET_SIMPLE is not set\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_RESET_TI_TPS380X is not set\n\n#\n# PHY Subsystem\n#\n# CONFIG_GENERIC_PHY is not set\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\n\n#\n# PHY drivers for Broadcom platforms\n#\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# end of PHY drivers for Broadcom platforms\n\n# CONFIG_PHY_CADENCE_TORRENT is not set\n# CONFIG_PHY_CADENCE_DPHY is not set\n# CONFIG_PHY_CADENCE_DPHY_RX is not set\n# CONFIG_PHY_CADENCE_SIERRA is not set\n# CONFIG_PHY_CADENCE_SALVO is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_LAN966X_SERDES is not set\n# CONFIG_PHY_CPCAP_USB is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\n# CONFIG_PHY_OCELOT_SERDES is not set\n# CONFIG_PHY_QCOM_USB_HS is not set\n# CONFIG_PHY_QCOM_USB_HSIC is not set\n# CONFIG_PHY_TUSB1210 is not set\n# end of PHY Subsystem\n\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\nCONFIG_ARM_PMU=y\n# CONFIG_FSL_IMX8_DDR_PMU is not set\n# end of Performance monitor support\n\nCONFIG_RAS=y\n# CONFIG_USB4 is not set\n\n#\n# Android\n#\n# CONFIG_ANDROID_BINDER_IPC is not set\n# end of Android\n\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\n# CONFIG_NVMEM_IMX_IIM is not set\nCONFIG_NVMEM_IMX_OCOTP=y\n# CONFIG_NVMEM_RAVE_SP_EEPROM is not set\n# CONFIG_NVMEM_RMEM is not set\n# CONFIG_NVMEM_SNVS_LPGPR is not set\nCONFIG_NVMEM_U_BOOT_ENV=m\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\n# CONFIG_TEE is not set\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\n# CONFIG_PECI is not set\n# CONFIG_HTE is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_VALIDATE_FS_PARSER=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\n# CONFIG_REISERFS_FS is not set\n# CONFIG_JFS_FS is not set\n# CONFIG_XFS_FS is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\n# CONFIG_F2FS_FS is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\n# CONFIG_FANOTIFY is not set\nCONFIG_QUOTA=y\nCONFIG_QUOTA_NETLINK_INTERFACE=y\n# CONFIG_PRINT_QUOTA_WARNING is not set\n# CONFIG_QUOTA_DEBUG is not set\n# CONFIG_QFMT_V1 is not set\n# CONFIG_QFMT_V2 is not set\nCONFIG_QUOTACTL=y\nCONFIG_AUTOFS4_FS=y\nCONFIG_AUTOFS_FS=y\nCONFIG_FUSE_FS=m\nCONFIG_CUSE=m\n# CONFIG_VIRTIO_FS is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n\n#\n# Caches\n#\n# CONFIG_FSCACHE is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=m\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=m\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\nCONFIG_MSDOS_FS=y\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=m\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=m\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\nCONFIG_MEMFD_CREATE=y\nCONFIG_CONFIGFS_FS=m\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\n# CONFIG_HFS_FS is not set\n# CONFIG_HFSPLUS_FS is not set\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\nCONFIG_JFFS2_FS=y\nCONFIG_JFFS2_FS_DEBUG=0\nCONFIG_JFFS2_FS_WRITEBUFFER=y\n# CONFIG_JFFS2_FS_WBUF_VERIFY is not set\n# CONFIG_JFFS2_SUMMARY is not set\n# CONFIG_JFFS2_FS_XATTR is not set\n# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set\nCONFIG_JFFS2_ZLIB=y\nCONFIG_JFFS2_RTIME=y\nCONFIG_UBIFS_FS=y\n# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set\nCONFIG_UBIFS_FS_LZO=y\nCONFIG_UBIFS_FS_ZLIB=y\nCONFIG_UBIFS_FS_ZSTD=y\n# CONFIG_UBIFS_ATIME_SUPPORT is not set\nCONFIG_UBIFS_FS_XATTR=y\nCONFIG_UBIFS_FS_SECURITY=y\n# CONFIG_UBIFS_FS_AUTHENTICATION is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\n# CONFIG_SQUASHFS_FILE_CACHE is not set\nCONFIG_SQUASHFS_FILE_DIRECT=y\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\nCONFIG_SQUASHFS_XATTR=y\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\n# CONFIG_PSTORE is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EROFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\nCONFIG_NFS_V3_ACL=y\nCONFIG_NFS_V4=y\n# CONFIG_NFS_SWAP is not set\n# CONFIG_NFS_V4_1 is not set\nCONFIG_ROOT_NFS=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFS_DISABLE_UDP_SUPPORT=y\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_ACL_SUPPORT=y\nCONFIG_NFS_COMMON=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\n# CONFIG_CIFS is not set\n# CONFIG_SMB_SERVER is not set\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_KEYS_REQUEST_CACHE is not set\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\nCONFIG_KEY_DH_OPERATIONS=y\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY is not set\nCONFIG_SECURITYFS=y\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_LSM=\"yama,loadpin,safesetid,integrity\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n\nCONFIG_RANDSTRUCT_NONE=y\n# CONFIG_RANDSTRUCT_FULL is not set\n# CONFIG_RANDSTRUCT_PERFORMANCE is not set\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\nCONFIG_CRYPTO_USER=y\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\n# CONFIG_CRYPTO_CRYPTD is not set\nCONFIG_CRYPTO_AUTHENC=y\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_ENGINE=y\n# end of Crypto core or helper\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_DH=y\n# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set\nCONFIG_CRYPTO_ECC=y\nCONFIG_CRYPTO_ECDH=y\n# CONFIG_CRYPTO_ECDSA is not set\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\n# CONFIG_CRYPTO_CURVE25519 is not set\n# end of Public-key cryptography\n\n#\n# Block ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\n# CONFIG_CRYPTO_ARIA is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\n# CONFIG_CRYPTO_SM4_GENERIC is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n# end of Block ciphers\n\n#\n# Length-preserving ciphers and modes\n#\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_ARC4 is not set\n# CONFIG_CRYPTO_CHACHA20 is not set\nCONFIG_CRYPTO_CBC=y\n# CONFIG_CRYPTO_CFB is not set\nCONFIG_CRYPTO_CTR=y\n# CONFIG_CRYPTO_CTS is not set\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_HCTR2 is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_OFB is not set\n# CONFIG_CRYPTO_PCBC is not set\nCONFIG_CRYPTO_XTS=y\n# end of Length-preserving ciphers and modes\n\n#\n# AEAD (authenticated encryption with associated data) ciphers\n#\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\n# CONFIG_CRYPTO_ESSIV is not set\n# end of AEAD (authenticated encryption with associated data) ciphers\n\n#\n# Hashes, digests, and MACs\n#\nCONFIG_CRYPTO_BLAKE2B=m\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\n# CONFIG_CRYPTO_POLY1305 is not set\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\n# CONFIG_CRYPTO_SM3_GENERIC is not set\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_VMAC is not set\n# CONFIG_CRYPTO_WP512 is not set\n# CONFIG_CRYPTO_XCBC is not set\nCONFIG_CRYPTO_XXHASH=m\n# end of Hashes, digests, and MACs\n\n#\n# CRCs (cyclic redundancy checks)\n#\nCONFIG_CRYPTO_CRC32C=y\n# CONFIG_CRYPTO_CRC32 is not set\nCONFIG_CRYPTO_CRCT10DIF=y\n# end of CRCs (cyclic redundancy checks)\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=y\nCONFIG_CRYPTO_LZO=y\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\nCONFIG_CRYPTO_ZSTD=y\n# end of Compression\n\n#\n# Random number generation\n#\n# CONFIG_CRYPTO_ANSI_CPRNG is not set\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_KDF800108_CTR=y\n# end of Random number generation\n\n#\n# Userspace interface\n#\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\nCONFIG_CRYPTO_USER_API_AEAD=y\nCONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y\n# CONFIG_CRYPTO_STATS is not set\n# end of Userspace interface\n\nCONFIG_CRYPTO_HASH_INFO=y\n\n#\n# Accelerated Cryptographic Algorithms for CPU (arm)\n#\nCONFIG_CRYPTO_POLY1305_ARM=y\nCONFIG_CRYPTO_BLAKE2S_ARM=y\nCONFIG_CRYPTO_SHA1_ARM=y\nCONFIG_CRYPTO_SHA256_ARM=y\nCONFIG_CRYPTO_SHA512_ARM=y\nCONFIG_CRYPTO_AES_ARM=y\nCONFIG_CRYPTO_CHACHA20_NEON=y\n# end of Accelerated Cryptographic Algorithms for CPU (arm)\n\nCONFIG_CRYPTO_HW=y\n# CONFIG_CRYPTO_DEV_HIFN_795X is not set\nCONFIG_CRYPTO_DEV_FSL_CAAM_COMMON=y\nCONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC=y\nCONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC=y\nCONFIG_CRYPTO_DEV_FSL_CAAM=y\n# CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set\nCONFIG_CRYPTO_DEV_FSL_CAAM_JR=y\nCONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9\n# CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set\nCONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y\nCONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y\nCONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y\nCONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y\nCONFIG_CRYPTO_DEV_FSL_CAAM_PRNG_API=y\nCONFIG_CRYPTO_DEV_SAHARA=y\n# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set\n# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set\n# CONFIG_CRYPTO_DEV_MXS_DCP is not set\n# CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set\n# CONFIG_CRYPTO_DEV_QAT_C3XXX is not set\n# CONFIG_CRYPTO_DEV_QAT_C62X is not set\n# CONFIG_CRYPTO_DEV_QAT_4XXX is not set\n# CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set\n# CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set\n# CONFIG_CRYPTO_DEV_QAT_C62XVF is not set\n# CONFIG_CRYPTO_DEV_SAFEXCEL is not set\n# CONFIG_CRYPTO_DEV_CCREE is not set\n# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n# CONFIG_FIPS_SIGNATURE_SELFTEST is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\nCONFIG_RAID6_PQ_BENCHMARK=y\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\n# CONFIG_CORDIC is not set\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_STMP_DEVICE=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_UTILS=y\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=m\nCONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CHACHA=m\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=m\nCONFIG_CRYPTO_LIB_CURVE25519=m\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_POLY1305=m\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=m\nCONFIG_CRYPTO_LIB_SHA1=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_CRC_CCITT=y\nCONFIG_CRC16=y\nCONFIG_CRC_T10DIF=y\n# CONFIG_CRC64_ROCKSOFT is not set\nCONFIG_CRC_ITU_T=m\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC64 is not set\n# CONFIG_CRC4 is not set\nCONFIG_CRC7=m\nCONFIG_LIBCRC32C=m\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=y\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMMON=y\nCONFIG_ZSTD_COMPRESS=y\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\nCONFIG_XZ_DEC_X86=y\nCONFIG_XZ_DEC_POWERPC=y\nCONFIG_XZ_DEC_IA64=y\nCONFIG_XZ_DEC_ARM=y\nCONFIG_XZ_DEC_ARMTHUMB=y\nCONFIG_XZ_DEC_SPARC=y\n# CONFIG_XZ_DEC_MICROLZMA is not set\nCONFIG_XZ_DEC_BCJ=y\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_ZSTD=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_DMA_OPS=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_DMA_DECLARE_COHERENT=y\nCONFIG_ARCH_HAS_SETUP_DMA_OPS=y\nCONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y\nCONFIG_DMA_NONCOHERENT_MMAP=y\nCONFIG_DMA_CMA=y\n# CONFIG_DMA_PERNUMA_CMA is not set\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=256\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\n# CONFIG_FORCE_NR_CPUS is not set\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_GENERIC_VDSO_32=y\nCONFIG_FONT_SUPPORT=y\nCONFIG_FONTS=y\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\n# CONFIG_FONT_6x11 is not set\n# CONFIG_FONT_7x14 is not set\n# CONFIG_FONT_PEARL_8x8 is not set\n# CONFIG_FONT_ACORN_8x8 is not set\n# CONFIG_FONT_MINI_4x6 is not set\n# CONFIG_FONT_6x10 is not set\n# CONFIG_FONT_10x18 is not set\n# CONFIG_FONT_SUN8x16 is not set\n# CONFIG_FONT_SUN12x22 is not set\n# CONFIG_FONT_TER16x32 is not set\n# CONFIG_FONT_6x8 is not set\nCONFIG_SG_POOL=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\n# CONFIG_STACKTRACE_BUILD_ID is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\n# CONFIG_DYNAMIC_DEBUG is not set\n# CONFIG_DYNAMIC_DEBUG_CORE is not set\nCONFIG_SYMBOLIC_ERRNAME=y\n# CONFIG_DEBUG_BUGVERBOSE is not set\n# end of printk and dmesg options\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_AS_HAS_NON_CONST_LEB128=y\nCONFIG_DEBUG_INFO_NONE=y\n# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\nCONFIG_FRAME_WARN=1024\n# CONFIG_STRIP_ASM_SYMS is not set\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\n# CONFIG_VMLINUX_MAP is not set\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=\"\"\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_KCSAN_COMPILER=y\n# end of Generic Kernel Debugging Instruments\n\n#\n# Networking Debugging\n#\n# CONFIG_NET_DEV_REFCNT_TRACKER is not set\n# CONFIG_NET_NS_REFCNT_TRACKER is not set\n# CONFIG_DEBUG_NET is not set\n# end of Networking Debugging\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\n# CONFIG_SLUB_DEBUG is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_PAGE_REF is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\n# CONFIG_DEBUG_WX is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SHRINKER_DEBUG is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\n# CONFIG_DEBUG_VM is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\n# CONFIG_DEBUG_MEMORY_INIT is not set\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\n# CONFIG_DEBUG_KMAP_LOCAL is not set\n# CONFIG_DEBUG_HIGHMEM is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\n# CONFIG_SOFTLOCKUP_DETECTOR is not set\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\n# CONFIG_SCHED_DEBUG is not set\n# CONFIG_SCHEDSTATS is not set\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\nCONFIG_PROVE_LOCKING=y\n# CONFIG_PROVE_RAW_LOCK_NESTING is not set\n# CONFIG_LOCK_STAT is not set\nCONFIG_DEBUG_RT_MUTEXES=y\nCONFIG_DEBUG_SPINLOCK=y\nCONFIG_DEBUG_MUTEXES=y\nCONFIG_DEBUG_WW_MUTEX_SLOWPATH=y\nCONFIG_DEBUG_RWSEMS=y\nCONFIG_DEBUG_LOCK_ALLOC=y\nCONFIG_LOCKDEP=y\nCONFIG_LOCKDEP_BITS=15\nCONFIG_LOCKDEP_CHAINS_BITS=16\nCONFIG_LOCKDEP_STACK_TRACE_BITS=19\nCONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14\nCONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS=12\n# CONFIG_DEBUG_LOCKDEP is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\nCONFIG_TRACE_IRQFLAGS=y\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_DEBUG_MAPLE_TREE is not set\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\nCONFIG_PROVE_RCU=y\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\nCONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0\nCONFIG_RCU_TRACE=y\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_HAVE_BUILDTIME_MCOUNT_SORT=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_PREEMPTIRQ_TRACEPOINTS=y\nCONFIG_TRACING=y\nCONFIG_TRACING_SUPPORT=y\n# CONFIG_FTRACE is not set\n# CONFIG_SAMPLES is not set\n# CONFIG_STRICT_DEVMEM is not set\n\n#\n# arm Debugging\n#\n# CONFIG_ARM_PTDUMP_DEBUGFS is not set\n# CONFIG_UNWINDER_FRAME_POINTER is not set\nCONFIG_UNWINDER_ARM=y\nCONFIG_ARM_UNWIND=y\n# CONFIG_BACKTRACE_VERBOSE is not set\n# CONFIG_DEBUG_USER is not set\n# CONFIG_DEBUG_LL is not set\nCONFIG_DEBUG_LL_INCLUDE=\"mach/debug-macro.S\"\nCONFIG_UNCOMPRESS_INCLUDE=\"debug/uncompress.h\"\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_CORESIGHT is not set\n# end of arm Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\nCONFIG_RUNTIME_TESTING_MENU=y\n# CONFIG_LKDTM is not set\n# CONFIG_TEST_MIN_HEAP is not set\n# CONFIG_TEST_DIV64 is not set\n# CONFIG_BACKTRACE_SELF_TEST is not set\n# CONFIG_TEST_REF_TRACKER is not set\n# CONFIG_RBTREE_TEST is not set\n# CONFIG_REED_SOLOMON_TEST is not set\n# CONFIG_INTERVAL_TREE_TEST is not set\n# CONFIG_PERCPU_TEST is not set\n# CONFIG_ATOMIC64_SELFTEST is not set\n# CONFIG_TEST_HEXDUMP is not set\n# CONFIG_STRING_SELFTEST is not set\n# CONFIG_TEST_STRING_HELPERS is not set\n# CONFIG_TEST_STRSCPY is not set\n# CONFIG_TEST_KSTRTOX is not set\n# CONFIG_TEST_PRINTF is not set\n# CONFIG_TEST_SCANF is not set\n# CONFIG_TEST_BITMAP is not set\n# CONFIG_TEST_UUID is not set\n# CONFIG_TEST_XARRAY is not set\n# CONFIG_TEST_MAPLE_TREE is not set\n# CONFIG_TEST_RHASHTABLE is not set\n# CONFIG_TEST_SIPHASH is not set\n# CONFIG_TEST_IDA is not set\n# CONFIG_TEST_LKM is not set\n# CONFIG_TEST_BITOPS is not set\n# CONFIG_TEST_VMALLOC is not set\n# CONFIG_TEST_USER_COPY is not set\n# CONFIG_TEST_BPF is not set\n# CONFIG_TEST_BLACKHOLE_DEV is not set\n# CONFIG_FIND_BIT_BENCHMARK is not set\n# CONFIG_TEST_FIRMWARE is not set\n# CONFIG_TEST_SYSCTL is not set\n# CONFIG_TEST_UDELAY is not set\n# CONFIG_TEST_STATIC_KEYS is not set\n# CONFIG_TEST_KMOD is not set\n# CONFIG_TEST_MEMCAT_P is not set\n# CONFIG_TEST_MEMINIT is not set\n# CONFIG_TEST_FREE_PAGES is not set\nCONFIG_ARCH_USE_MEMTEST=y\n# CONFIG_MEMTEST is not set\n# end of Kernel Testing and Coverage\n\n#\n# Rust hacking\n#\n# end of Rust hacking\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/options",
    "content": "################################################################################\n# setup device defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      arm)\n        TARGET_CPU=\"cortex-a9\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_FPU=\"neon-vfpv3\"\n        ;;\n    esac\n\n  # Kernel target\n    KERNEL_TARGET=\"zImage\"\n\n  # kernel serial console\n    EXTRA_CMDLINE=\"console=ttymxc0,115200 console=tty0\"\n\n  # debug tty path\n    DEBUG_TTY=\"/dev/ttymxc0\"\n\n  # set the addon project\n    ADDON_PROJECT=\"ARMv7\"\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/patches/kodi/0001-hack-force-YUYV-output-from-v4l2.patch",
    "content": "From 49cde01c0e015455173ea523d97831a0e5b9c986 Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Mon, 15 Feb 2021 11:43:26 -0800\nSubject: [PATCH 1/2] [hack] force YUYV output from v4l2\n\n---\n .../DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp          | 10 ++++++++++\n 1 file changed, 10 insertions(+)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\nindex 8024c20816..173c67f103 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n@@ -327,6 +327,16 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio\n   for (auto&& option : options.m_keys)\n     av_opt_set(m_pCodecContext, option.m_name.c_str(), option.m_value.c_str(), 0);\n \n+  int ret = av_opt_set_pixel_fmt(m_pCodecContext, \"pixel_format\", AV_PIX_FMT_YUYV422,\n+                                 AV_OPT_SEARCH_CHILDREN);\n+  if (ret < 0)\n+  {\n+    std::array<char, AV_ERROR_MAX_STRING_SIZE> buffer;\n+    av_make_error_string(buffer.data(), buffer.size(), ret);\n+    CLog::Log(LOGDEBUG, \"CDVDVideoCodecDRMPRIME::{} - unable to set pixelformat: {}\", __FUNCTION__,\n+              buffer.data());\n+  }\n+\n   if (avcodec_open2(m_pCodecContext, pCodec, nullptr) < 0)\n   {\n     CLog::Log(LOGINFO, \"CDVDVideoCodecDRMPRIME::{} - unable to open codec\", __FUNCTION__);\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/patches/kodi/0002-hack-disable-use-of-video-plane.patch",
    "content": "From 87a462afd9ff9f487b2a33f065df775ccfef8af2 Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Mon, 15 Feb 2021 14:22:28 -0800\nSubject: [PATCH 2/2] [hack] disable use of video plane\n\n---\n xbmc/windowing/gbm/drm/DRMUtils.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/xbmc/windowing/gbm/drm/DRMUtils.cpp b/xbmc/windowing/gbm/drm/DRMUtils.cpp\nindex 5593ce086b..603c8265c9 100644\n--- a/xbmc/windowing/gbm/drm/DRMUtils.cpp\n+++ b/xbmc/windowing/gbm/drm/DRMUtils.cpp\n@@ -184,7 +184,7 @@ bool CDRMUtils::FindPlanes()\n     auto videoPlane = std::find_if(m_planes.begin(), m_planes.end(), [&i](auto& plane) {\n       if (plane->GetPossibleCrtcs() & (1 << i))\n       {\n-        return plane->SupportsFormat(DRM_FORMAT_NV12);\n+        return false;\n       }\n       return false;\n     });\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/patches/linux/linux-001-imx6qdl-wandboard-revc1-dtsi-bluetooth.patch",
    "content": "Add MMC power sequence for usdhc2.\nAdd bluetooth node to uart3.\n\n--- a/arch/arm/boot/dts/imx6qdl-wandboard-revc1.dtsi\n+++ b/arch/arm/boot/dts/imx6qdl-wandboard-revc1.dtsi\n@@ -6,6 +6,15 @@\n \n #include \"imx6qdl-wandboard.dtsi\"\n \n+/ {\n+\tpwrseq_usdhc2: usdhc2pwrseq {\n+\t\tcompatible = \"mmc-pwrseq-simple\";\n+\t\treset-gpios = <&gpio1 26 GPIO_ACTIVE_LOW>,\t/* WL_REG_ON */\n+\t\t\t      <&gpio5 30 GPIO_ACTIVE_LOW>,\t/* BT_REG_ON */\n+\t\t\t      <&gpio5 21 GPIO_ACTIVE_LOW>;\t/* BT_RST_N */\n+\t};\n+};\n+\n &iomuxc {\n \tpinctrl-0 = <&pinctrl_hog>;\n \n@@ -28,8 +37,15 @@\n \t};\n };\n \n+&uart3 {\n+\tbluetooth {\n+\t\tcompatible = \"brcm,bcm4330-bt\";\n+\t};\n+};\n+\n &usdhc2 {\n \tpinctrl-names = \"default\";\n \tpinctrl-0 = <&pinctrl_usdhc2>;\n+\tmmc-pwrseq = <&pwrseq_usdhc2>;\n \tstatus = \"okay\";\n };\n"
  },
  {
    "path": "projects/NXP/devices/iMX6/patches/linux/linux-011-imx6qdl-sr-som-brcm-dtsi-bluetooth.patch",
    "content": "Add bluetooth node to uart4.\n\n--- a/arch/arm/boot/dts/imx6qdl-sr-som-brcm.dtsi\n+++ b/arch/arm/boot/dts/imx6qdl-sr-som-brcm.dtsi\n@@ -128,6 +127,10 @@\n \tpinctrl-0 = <&pinctrl_microsom_brcm_bt &pinctrl_microsom_uart4>;\n \tuart-has-rtscts;\n \tstatus = \"okay\";\n+\n+\tbluetooth {\n+\t\tcompatible = \"brcm,bcm4330-bt\";\n+\t};\n };\n \n /* USDHC1 - Connected to optional BRCM Wifi/BT/FM */\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/bootloader/firmware",
    "content": "\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n[ -n \"$ATF_PLATFORM\" ] && cp -av $(get_install_dir atf)/usr/share/bootloader/bl31.bin .\n\ncp -av $(get_build_dir firmware-imx)/firmware/hdmi/cadence/signed_hdmi_imx8m.bin $(get_build_dir $BOOTLOADER)/\ncp -av $(get_build_dir firmware-imx)/firmware/ddr/synopsys/lpddr4*.bin $(get_build_dir $BOOTLOADER)/\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/bootloader/install",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\ncp -av flash.bin $INSTALL/usr/share/bootloader/\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/bootloader/mkimage",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/flash.bin\" ]; then\n  echo \"Writing flash.bin to $(basename $DISK)\"\n  dd if=\"$RELEASE_DIR/3rdparty/bootloader/flash.bin\" of=\"$DISK\" bs=1024 seek=33 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\nfi\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/bootloader/release",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nmkdir -p $RELEASE_DIR/3rdparty/bootloader\n  if [ -n \"$UBOOT_SYSTEM\" ]; then\n    cp -a $(get_build_dir $BOOTLOADER)/flash.bin $RELEASE_DIR/3rdparty/bootloader/\n  fi\n\n  cp -a $(get_build_dir linux)/arch/$TARGET_KERNEL_ARCH/boot/dts/freescale/*.dtb $RELEASE_DIR/3rdparty/bootloader\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/bootloader/update.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n[ -z \"$SYSTEM_ROOT\" ] && SYSTEM_ROOT=\"\"\n[ -z \"$BOOT_ROOT\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"$BOOT_PART\" ] && BOOT_PART=$(df \"$BOOT_ROOT\" | tail -1 | awk {' print $1 '})\nif [ -z \"$BOOT_DISK\" ]; then\n  case $BOOT_PART in\n    /dev/sd[a-z][0-9]*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,[0-9]*,,g\")\n      ;;\n    /dev/mmcblk*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,p[0-9]*,,g\")\n      ;;\n  esac\nfi\n\n# mount $BOOT_ROOT r/w\n  mount -o remount,rw $BOOT_ROOT\n\n# update Device Tree Blobs\n  for all_dtb in /flash/*.dtb; do\n    dtb=$(basename $all_dtb)\n    if [ -f $SYSTEM_ROOT/usr/share/bootloader/$dtb ]; then\n      echo \"*** updating Device Tree Blob: $dtb ...\"\n      cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT\n    fi\n  done\n\n# update bootloader files\n  UBOOT=\"${SYSTEM_ROOT}/usr/share/bootloader/flash.bin\"\n  if [ -f \"${UBOOT}\" ]; then\n    DEVICE=\"$(basename ${BOOT_DISK})\"\n    if grep -q \"MMC\" /sys/class/block/${DEVICE}/device/type; then\n      echo 0 > /sys/block/${DEVICE}boot0/force_ro\n      echo \"*** updating u-boot image on: ${BOOT_DISK}boot0 ...\"\n      dd if=\"${UBOOT}\" of=\"${DEVICE}boot0\" bs=1024 seek=33 conv=fsync > /dev/null 2>&1\n      echo 0 > /sys/block/${DEVICE}boot1/force_ro\n      echo \"*** updating u-boot image on: ${BOOT_DISK}boot1 ...\"\n      dd if=\"${UBOOT}\" of=\"${DEVICE}boot1\" bs=1024 seek=33 conv=fsync > /dev/null 2>&1\n    else\n      echo \"*** updating u-boot image on: ${BOOT_DISK} ...\"\n      dd if=\"${UBOOT}\" of=\"$BOOT_DISK\" bs=1024 seek=33 conv=fsync &>/dev/null\n    fi\n  fi\n\n# mount $BOOT_ROOT r/o\n  sync\n  mount -o remount,ro $BOOT_ROOT\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/filesystem/usr/bin/cputemp",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nTEMP=\"$(cat /sys/class/thermal/thermal_zone0/temp)\"\necho \"$(( $TEMP / 1000 )) C\"\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/filesystem/usr/bin/gputemp",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nTEMP=\"$(cat /sys/class/thermal/thermal_zone1/temp)\"\necho \"$(( $TEMP / 1000 )) C\"\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/filesystem/usr/bin/install2emmc",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nTMP=/tmp/mnt/\n\nSYSTEM_SIZE=@SYSTEM_SIZE@\nUUID_SYSTEM=\"$(date '+%d%m')-$(date '+%M%S')\"\nUUID_STORAGE=\"$(uuidgen)\"\nBOOT=$(grep /flash /proc/mounts | awk '{print $1}' | sed 's/p[012]//g')\nDISK=\"\"\n\nUBOOT=\"/usr/share/bootloader/flash.bin\"\n\nif [ ! -f \"${UBOOT}\" ]; then\n  echo \"U-Boot not found. Please update current installation with board specific update or image first.\"\n  exit 1\nfi\n\nfor TYPE in /sys/class/block/mmcblk*/device/type; do\n  if grep -q \"MMC\" \"${TYPE}\"; then\n    DISK=\"/dev/$(echo \"${TYPE}\" | awk -F/ '{print $5}')\"\n    break\n  fi\ndone\n\nif [ -z \"${DISK}\" ]; then\n  echo \"Can't find eMMC module!\"\n  exit 1\nfi\n\nif [ \"${BOOT}\" = \"${DISK}\" ]; then\n  echo \"Your device is booted from the eMMC module!\"\n  exit 1\nfi\n\necho \"\"\necho -e \"\\033[36m===============================\"\necho \"Installing @DISTRONAME@ to eMMC\"\necho -e \"===============================\\033[37m\"\necho \"\"\necho \"eMMC found at ${DISK}\"\necho \"\"\n\nif [ ! -b \"${DISK}\" ]; then\n  echo \"Error: eMMC not found.\"\n  exit 1\nfi\n\necho \"\"\necho -n \"WARNING: ALL DATA ON eMMC WILL BE ERASED! Continue (y/N)?  \"\nread -n 1 ANSWER\n\nif [ ! \"${ANSWER}\" = \"y\" ]; then\n  echo \"\"\n  echo \"Aborting...\"\n  exit 0\nfi\necho \"\"\n\numount ${DISK}* > /dev/null 2>&1\n\necho \"Erasing eMMC ...\"\ndd if=/dev/zero of=\"${DISK}\" bs=1M count=1 conv=fsync > /dev/null 2>&1\n\necho \"Creating partitions\"\nparted -s \"${DISK}\" mklabel msdos\nparted -s \"${DISK}\" -a optimal mkpart primary fat32 0% ${SYSTEM_SIZE}MiB\nparted -s \"${DISK}\" set 1 boot on\nparted -s \"${DISK}\" -a optimal mkpart primary ext4 ${SYSTEM_SIZE}MiB 100%\nsync\n\necho \"Creating filesystems\"\ndd if=/dev/zero of=\"${DISK}p1\" bs=1M count=1 conv=fsync > /dev/null 2>&1\nmkfs.vfat -n SYSTEM -i ${UUID_SYSTEM//-/} ${DISK}p1 > /dev/null 2>&1\ndd if=/dev/zero of=\"${DISK}p2\" bs=1M count=1 conv=fsync > /dev/null 2>&1\nmkfs.ext4 -L STORAGE -U ${UUID_STORAGE} ${DISK}p2 > /dev/null 2>&1\nsync\n\necho \"Installing bootloader\"\necho 0 > /sys/block/mmcblk0boot0/force_ro\necho 0 > /sys/block/mmcblk0boot1/force_ro\ndd if=/dev/zero of=\"${DISK}boot0\" bs=1M count=4 conv=fsync > /dev/null 2>&1\ndd if=/dev/zero of=\"${DISK}boot1\" bs=1M count=4 conv=fsync > /dev/null 2>&1\ndd if=\"${UBOOT}\" of=\"${DISK}boot0\" bs=1024 seek=33 conv=fsync > /dev/null 2>&1\ndd if=\"${UBOOT}\" of=\"${DISK}boot1\" bs=1024 seek=33 conv=fsync > /dev/null 2>&1\n\necho \"Copying system files\"\n\nmkdir -p ${TMP}\n\nmount -t vfat ${DISK}p1 ${TMP}\n\ncp -R /flash/. ${TMP}/\nsync\n\necho \"Adjusting partition UUIDs\"\n\nsed -i \"s/boot=UUID=[0-9a-f\\-]*/boot=UUID=${UUID_SYSTEM}/g\" ${TMP}/extlinux/extlinux.conf\nsed -i \"s/disk=UUID=[0-9a-f\\-]*/disk=UUID=${UUID_STORAGE}/g\" ${TMP}/extlinux/extlinux.conf\n\numount ${TMP}\n\necho \"Done\"\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/linux/linux.aarch64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm64 6.1.0-rc6 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"aarch64-none-elf-gcc-12.2.0 (GCC) 12.2.0\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=120200\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23900\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23900\nCONFIG_LLD_VERSION=0\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_BUILD_SALT=\"\"\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_SYSVIPC_COMPAT=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\n# CONFIG_WATCH_QUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_IRQ_IPI=y\nCONFIG_GENERIC_MSI_IRQ=y\nCONFIG_GENERIC_MSI_IRQ_DOMAIN=y\nCONFIG_IRQ_MSI_IOMMU=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\nCONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_CONTEXT_TRACKING=y\nCONFIG_CONTEXT_TRACKING_IDLE=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\n# CONFIG_NO_HZ is not set\nCONFIG_HIGH_RES_TIMERS=y\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\nCONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\n# CONFIG_BPF_JIT is not set\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# end of BPF subsystem\n\nCONFIG_PREEMPT_VOLUNTARY_BUILD=y\n# CONFIG_PREEMPT_NONE is not set\nCONFIG_PREEMPT_VOLUNTARY=y\n# CONFIG_PREEMPT is not set\n# CONFIG_PREEMPT_DYNAMIC is not set\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\n# CONFIG_BSD_PROCESS_ACCT is not set\n# CONFIG_TASKSTATS is not set\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\n# end of RCU Subsystem\n\nCONFIG_IKCONFIG=m\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=17\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# end of Scheduler features\n\nCONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y\nCONFIG_CC_HAS_INT128=y\nCONFIG_CC_IMPLICIT_FALLTHROUGH=\"-Wimplicit-fallthrough=5\"\nCONFIG_GCC11_NO_ARRAY_BOUNDS=y\nCONFIG_GCC12_NO_ARRAY_BOUNDS=y\nCONFIG_CC_NO_ARRAY_BOUNDS=y\nCONFIG_ARCH_SUPPORTS_INT128=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\n# CONFIG_CGROUP_FAVOR_DYNMODS is not set\nCONFIG_MEMCG=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_BLK_CGROUP=y\nCONFIG_CGROUP_WRITEBACK=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\nCONFIG_CGROUP_PIDS=y\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_CGROUP_PERF=y\nCONFIG_CGROUP_BPF=y\n# CONFIG_CGROUP_MISC is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_TIME_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_CHECKPOINT_RESTORE is not set\n# CONFIG_SCHED_AUTOGROUP is not set\n# CONFIG_SYSFS_DEPRECATED is not set\n# CONFIG_RELAY is not set\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"@INITRAMFS_SOURCE@\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\n# CONFIG_RD_GZIP is not set\n# CONFIG_RD_BZIP2 is not set\n# CONFIG_RD_LZMA is not set\n# CONFIG_RD_XZ is not set\n# CONFIG_RD_LZO is not set\n# CONFIG_RD_LZ4 is not set\n# CONFIG_RD_ZSTD is not set\nCONFIG_INITRAMFS_COMPRESSION_NONE=y\n# CONFIG_BOOT_CONFIG is not set\nCONFIG_INITRAMFS_PRESERVE_MTIME=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\nCONFIG_EXPERT=y\n# CONFIG_UID16 is not set\nCONFIG_MULTIUSER=y\n# CONFIG_SGETMASK_SYSCALL is not set\n# CONFIG_SYSFS_SYSCALL is not set\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\n# CONFIG_KALLSYMS_ALL is not set\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_DEBUG_RSEQ is not set\nCONFIG_EMBEDDED=y\nCONFIG_HAVE_PERF_EVENTS=y\n# CONFIG_PC104 is not set\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_SYSTEM_DATA_VERIFICATION=y\nCONFIG_PROFILING=y\n# end of General setup\n\nCONFIG_ARM64=y\nCONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_64BIT=y\nCONFIG_MMU=y\nCONFIG_ARM64_PAGE_SHIFT=12\nCONFIG_ARM64_CONT_PTE_SHIFT=4\nCONFIG_ARM64_CONT_PMD_SHIFT=4\nCONFIG_ARCH_MMAP_RND_BITS_MIN=18\nCONFIG_ARCH_MMAP_RND_BITS_MAX=33\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_NO_IOPORT_MAP=y\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_GENERIC_BUG=y\nCONFIG_GENERIC_BUG_RELATIVE_POINTERS=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CSUM=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y\nCONFIG_SMP=y\nCONFIG_KERNEL_MODE_NEON=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_PGTABLE_LEVELS=4\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_ARCH_PROC_KCORE_TEXT=y\n\n#\n# Platform selection\n#\n# CONFIG_ARCH_ACTIONS is not set\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_APPLE is not set\n# CONFIG_ARCH_BCM is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_BITMAIN is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_SPARX5 is not set\n# CONFIG_ARCH_K3 is not set\n# CONFIG_ARCH_LG1K is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_KEEMBAY is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_MESON is not set\n# CONFIG_ARCH_MVEBU is not set\nCONFIG_ARCH_NXP=y\n# CONFIG_ARCH_LAYERSCAPE is not set\nCONFIG_ARCH_MXC=y\n# CONFIG_ARCH_S32 is not set\n# CONFIG_ARCH_NPCM is not set\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_REALTEK is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_ROCKCHIP is not set\n# CONFIG_ARCH_SEATTLE is not set\n# CONFIG_ARCH_INTEL_SOCFPGA is not set\n# CONFIG_ARCH_SYNQUACER is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_SPRD is not set\n# CONFIG_ARCH_THUNDER is not set\n# CONFIG_ARCH_THUNDER2 is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_VISCONTI is not set\n# CONFIG_ARCH_XGENE is not set\n# CONFIG_ARCH_ZYNQMP is not set\n# end of Platform selection\n\n#\n# Kernel Features\n#\n\n#\n# ARM errata workarounds via the alternatives framework\n#\nCONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y\nCONFIG_ARM64_ERRATUM_826319=y\nCONFIG_ARM64_ERRATUM_827319=y\nCONFIG_ARM64_ERRATUM_824069=y\nCONFIG_ARM64_ERRATUM_819472=y\n# CONFIG_ARM64_ERRATUM_832075 is not set\n# CONFIG_ARM64_ERRATUM_1742098 is not set\nCONFIG_ARM64_ERRATUM_845719=y\nCONFIG_ARM64_ERRATUM_843419=y\nCONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y\n# CONFIG_ARM64_ERRATUM_1024718 is not set\n# CONFIG_ARM64_ERRATUM_1418040 is not set\nCONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y\n# CONFIG_ARM64_ERRATUM_1165522 is not set\nCONFIG_ARM64_ERRATUM_1319367=y\n# CONFIG_ARM64_ERRATUM_1530923 is not set\n# CONFIG_ARM64_ERRATUM_2441007 is not set\n# CONFIG_ARM64_ERRATUM_1286807 is not set\n# CONFIG_ARM64_ERRATUM_1463225 is not set\n# CONFIG_ARM64_ERRATUM_1542419 is not set\n# CONFIG_ARM64_ERRATUM_1508412 is not set\n# CONFIG_ARM64_ERRATUM_2051678 is not set\n# CONFIG_ARM64_ERRATUM_2077057 is not set\n# CONFIG_ARM64_ERRATUM_2658417 is not set\n# CONFIG_ARM64_ERRATUM_2054223 is not set\n# CONFIG_ARM64_ERRATUM_2067961 is not set\n# CONFIG_ARM64_ERRATUM_2441009 is not set\n# CONFIG_CAVIUM_ERRATUM_22375 is not set\n# CONFIG_CAVIUM_ERRATUM_23154 is not set\n# CONFIG_CAVIUM_ERRATUM_27456 is not set\n# CONFIG_CAVIUM_ERRATUM_30115 is not set\n# CONFIG_CAVIUM_TX2_ERRATUM_219 is not set\n# CONFIG_FUJITSU_ERRATUM_010001 is not set\n# CONFIG_HISILICON_ERRATUM_161600802 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_1003 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_1009 is not set\n# CONFIG_QCOM_QDF2400_ERRATUM_0065 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_E1041 is not set\n# CONFIG_NVIDIA_CARMEL_CNP_ERRATUM is not set\n# CONFIG_SOCIONEXT_SYNQUACER_PREITS is not set\n# end of ARM errata workarounds via the alternatives framework\n\nCONFIG_ARM64_4K_PAGES=y\n# CONFIG_ARM64_16K_PAGES is not set\n# CONFIG_ARM64_64K_PAGES is not set\n# CONFIG_ARM64_VA_BITS_39 is not set\nCONFIG_ARM64_VA_BITS_48=y\nCONFIG_ARM64_VA_BITS=48\nCONFIG_ARM64_PA_BITS_48=y\nCONFIG_ARM64_PA_BITS=48\n# CONFIG_CPU_BIG_ENDIAN is not set\nCONFIG_CPU_LITTLE_ENDIAN=y\n# CONFIG_SCHED_MC is not set\n# CONFIG_SCHED_CLUSTER is not set\n# CONFIG_SCHED_SMT is not set\nCONFIG_NR_CPUS=8\nCONFIG_HOTPLUG_CPU=y\n# CONFIG_NUMA is not set\n# CONFIG_HZ_100 is not set\n# CONFIG_HZ_250 is not set\nCONFIG_HZ_300=y\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=300\nCONFIG_SCHED_HRTICK=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_CC_HAVE_SHADOW_CALL_STACK=y\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\n# CONFIG_KEXEC is not set\n# CONFIG_KEXEC_FILE is not set\n# CONFIG_CRASH_DUMP is not set\n# CONFIG_XEN is not set\nCONFIG_ARCH_FORCE_MAX_ORDER=11\nCONFIG_UNMAP_KERNEL_AT_EL0=y\nCONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y\nCONFIG_RODATA_FULL_DEFAULT_ENABLED=y\n# CONFIG_ARM64_SW_TTBR0_PAN is not set\nCONFIG_ARM64_TAGGED_ADDR_ABI=y\nCONFIG_COMPAT=y\nCONFIG_KUSER_HELPERS=y\n# CONFIG_COMPAT_ALIGNMENT_FIXUPS is not set\nCONFIG_ARMV8_DEPRECATED=y\nCONFIG_SWP_EMULATION=y\nCONFIG_CP15_BARRIER_EMULATION=y\nCONFIG_SETEND_EMULATION=y\n\n#\n# ARMv8.1 architectural features\n#\n# CONFIG_ARM64_HW_AFDBM is not set\n# CONFIG_ARM64_PAN is not set\nCONFIG_AS_HAS_LDAPR=y\nCONFIG_AS_HAS_LSE_ATOMICS=y\n# CONFIG_ARM64_USE_LSE_ATOMICS is not set\n# end of ARMv8.1 architectural features\n\n#\n# ARMv8.2 architectural features\n#\nCONFIG_AS_HAS_ARMV8_2=y\nCONFIG_AS_HAS_SHA3=y\n# CONFIG_ARM64_PMEM is not set\n# CONFIG_ARM64_RAS_EXTN is not set\n# CONFIG_ARM64_CNP is not set\n# end of ARMv8.2 architectural features\n\n#\n# ARMv8.3 architectural features\n#\n# CONFIG_ARM64_PTR_AUTH is not set\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET=y\nCONFIG_CC_HAS_SIGN_RETURN_ADDRESS=y\nCONFIG_AS_HAS_PAC=y\nCONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y\n# end of ARMv8.3 architectural features\n\n#\n# ARMv8.4 architectural features\n#\n# CONFIG_ARM64_AMU_EXTN is not set\nCONFIG_AS_HAS_ARMV8_4=y\n# CONFIG_ARM64_TLB_RANGE is not set\n# end of ARMv8.4 architectural features\n\n#\n# ARMv8.5 architectural features\n#\nCONFIG_AS_HAS_ARMV8_5=y\n# CONFIG_ARM64_BTI is not set\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI=y\n# CONFIG_ARM64_E0PD is not set\nCONFIG_ARM64_AS_HAS_MTE=y\n# end of ARMv8.5 architectural features\n\n#\n# ARMv8.7 architectural features\n#\n# end of ARMv8.7 architectural features\n\nCONFIG_ARM64_SVE=y\nCONFIG_ARM64_SME=y\nCONFIG_ARM64_MODULE_PLTS=y\n# CONFIG_ARM64_PSEUDO_NMI is not set\nCONFIG_RELOCATABLE=y\n# CONFIG_RANDOMIZE_BASE is not set\nCONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y\nCONFIG_STACKPROTECTOR_PER_TASK=y\nCONFIG_ARCH_NR_GPIO=0\n# end of Kernel Features\n\n#\n# Boot options\n#\nCONFIG_CMDLINE=\"\"\n# CONFIG_EFI is not set\n# end of Boot options\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_SUSPEND_SKIP_SYNC is not set\n# CONFIG_HIBERNATION is not set\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_USERSPACE_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\nCONFIG_PM=y\n# CONFIG_PM_DEBUG is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\n# CONFIG_ENERGY_MODEL is not set\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\n# end of Power management options\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\n\n#\n# ARM CPU Idle Drivers\n#\n# CONFIG_ARM_PSCI_CPUIDLE is not set\n# end of ARM CPU Idle Drivers\n# end of CPU Idle\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=y\n# CONFIG_CPU_FREQ_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\nCONFIG_CPUFREQ_DT_PLATDEV=y\nCONFIG_ARM_IMX_CPUFREQ_DT=y\n# end of CPU Frequency scaling\n# end of CPU Power Management\n\nCONFIG_HAVE_KVM=y\n# CONFIG_VIRTUALIZATION is not set\n\n#\n# General architecture-dependent options\n#\n# CONFIG_KPROBES is not set\nCONFIG_JUMP_LABEL=y\n# CONFIG_STATIC_KEYS_SELFTEST is not set\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_HAVE_IOREMAP_PROT=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y\nCONFIG_HAVE_FUNCTION_ERROR_INJECTION=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_KEEPINITRD=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_ARCH_HAS_SET_DIRECT_MAP=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_WANTS_NO_INSTR=y\nCONFIG_HAVE_ASM_MODVERSIONS=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y\nCONFIG_MMU_GATHER_TABLE_FREE=y\nCONFIG_MMU_GATHER_RCU_TABLE_FREE=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_HAVE_ALIGNED_STRUCT_PAGE=y\nCONFIG_HAVE_CMPXCHG_LOCAL=y\nCONFIG_HAVE_CMPXCHG_DOUBLE=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_ARCH_STACKLEAK=y\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_ARCH_SUPPORTS_SHADOW_CALL_STACK=y\n# CONFIG_SHADOW_CALL_STACK is not set\nCONFIG_ARCH_SUPPORTS_LTO_CLANG=y\nCONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y\nCONFIG_LTO_NONE=y\nCONFIG_ARCH_SUPPORTS_CFI_CLANG=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOVE_PUD=y\nCONFIG_HAVE_MOVE_PMD=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_HAVE_ARCH_HUGE_VMAP=y\nCONFIG_HAVE_ARCH_HUGE_VMALLOC=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_ARCH_MMAP_RND_BITS=18\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=11\nCONFIG_PAGE_SIZE_LESS_THAN_64KB=y\nCONFIG_PAGE_SIZE_LESS_THAN_256KB=y\nCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y\nCONFIG_RANDOMIZE_KSTACK_OFFSET=y\n# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\nCONFIG_HAVE_ARCH_COMPILER_H=y\nCONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_HAS_RELR=y\nCONFIG_HAVE_PREEMPT_DYNAMIC=y\nCONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y\nCONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y\nCONFIG_ARCH_HAVE_TRACE_MMIO_ACCESS=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\nCONFIG_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/sbin/modprobe\"\n# CONFIG_TRIM_UNUSED_KSYMS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\n# CONFIG_BLOCK_LEGACY_AUTOLOAD is not set\nCONFIG_BLK_CGROUP_RWSTAT=y\nCONFIG_BLK_DEV_BSG_COMMON=y\nCONFIG_BLK_ICQ=y\nCONFIG_BLK_DEV_BSGLIB=y\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_DEV_ZONED is not set\nCONFIG_BLK_DEV_THROTTLING=y\n# CONFIG_BLK_DEV_THROTTLING_LOW is not set\n# CONFIG_BLK_WBT is not set\n# CONFIG_BLK_CGROUP_IOLATENCY is not set\n# CONFIG_BLK_CGROUP_IOCOST is not set\n# CONFIG_BLK_CGROUP_IOPRIO is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\nCONFIG_MAC_PARTITION=y\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\nCONFIG_LDM_PARTITION=y\n# CONFIG_LDM_DEBUG is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\n# CONFIG_CMDLINE_PARTITION is not set\n# end of Partition Types\n\nCONFIG_BLOCK_COMPAT=y\nCONFIG_BLK_PM=y\nCONFIG_BLOCK_HOLDER_DEPRECATED=y\nCONFIG_BLK_MQ_STACKING=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\nCONFIG_IOSCHED_BFQ=y\n# CONFIG_BFQ_GROUP_IOSCHED is not set\n# end of IO Schedulers\n\nCONFIG_PADATA=y\nCONFIG_ASN1=y\nCONFIG_ARCH_INLINE_SPIN_TRYLOCK=y\nCONFIG_ARCH_INLINE_SPIN_TRYLOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_LOCK=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_INLINE_READ_LOCK=y\nCONFIG_ARCH_INLINE_READ_LOCK_BH=y\nCONFIG_ARCH_INLINE_READ_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_READ_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_READ_UNLOCK=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_INLINE_WRITE_LOCK=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_BH=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE=y\nCONFIG_INLINE_SPIN_TRYLOCK=y\nCONFIG_INLINE_SPIN_TRYLOCK_BH=y\nCONFIG_INLINE_SPIN_LOCK=y\nCONFIG_INLINE_SPIN_LOCK_BH=y\nCONFIG_INLINE_SPIN_LOCK_IRQ=y\nCONFIG_INLINE_SPIN_LOCK_IRQSAVE=y\nCONFIG_INLINE_SPIN_UNLOCK_BH=y\nCONFIG_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE=y\nCONFIG_INLINE_READ_LOCK=y\nCONFIG_INLINE_READ_LOCK_BH=y\nCONFIG_INLINE_READ_LOCK_IRQ=y\nCONFIG_INLINE_READ_LOCK_IRQSAVE=y\nCONFIG_INLINE_READ_UNLOCK=y\nCONFIG_INLINE_READ_UNLOCK_BH=y\nCONFIG_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_INLINE_READ_UNLOCK_IRQRESTORE=y\nCONFIG_INLINE_WRITE_LOCK=y\nCONFIG_INLINE_WRITE_LOCK_BH=y\nCONFIG_INLINE_WRITE_LOCK_IRQ=y\nCONFIG_INLINE_WRITE_LOCK_IRQSAVE=y\nCONFIG_INLINE_WRITE_UNLOCK=y\nCONFIG_INLINE_WRITE_UNLOCK_BH=y\nCONFIG_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_USE_QUEUED_SPINLOCKS=y\nCONFIG_QUEUED_SPINLOCKS=y\nCONFIG_ARCH_USE_QUEUED_RWLOCKS=y\nCONFIG_QUEUED_RWLOCKS=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_ARCH_HAS_SYSCALL_WRAPPER=y\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_ARCH_BINFMT_ELF_STATE=y\nCONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y\nCONFIG_ARCH_HAVE_ELF_PROT=y\nCONFIG_ARCH_USE_GNU_PROPERTY=y\nCONFIG_ELFCORE=y\n# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set\nCONFIG_BINFMT_SCRIPT=y\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\nCONFIG_SWAP=y\n# CONFIG_ZSWAP is not set\n\n#\n# SLAB allocator options\n#\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# end of SLAB allocator options\n\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\n# CONFIG_COMPAT_BRK is not set\nCONFIG_SPARSEMEM=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_FAST_GUP=y\nCONFIG_ARCH_KEEP_MEMBLOCK=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y\n# CONFIG_MEMORY_HOTPLUG is not set\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y\nCONFIG_COMPACTION=y\nCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1\n# CONFIG_PAGE_REPORTING is not set\nCONFIG_MIGRATION=y\nCONFIG_ARCH_ENABLE_THP_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\nCONFIG_PHYS_ADDR_T_64BIT=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y\n# CONFIG_MEMORY_FAILURE is not set\nCONFIG_ARCH_WANTS_THP_SWAP=y\nCONFIG_TRANSPARENT_HUGEPAGE=y\nCONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y\n# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set\nCONFIG_THP_SWAP=y\n# CONFIG_READ_ONLY_THP_FOR_FS is not set\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\nCONFIG_CMA_DEBUGFS=y\n# CONFIG_CMA_SYSFS is not set\nCONFIG_CMA_AREAS=7\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CACHE_LINE_SIZE=y\nCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y\nCONFIG_ARCH_HAS_PTE_DEVMAP=y\nCONFIG_ARCH_HAS_ZONE_DMA_SET=y\nCONFIG_ZONE_DMA=y\nCONFIG_ZONE_DMA32=y\nCONFIG_VM_EVENT_COUNTERS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\nCONFIG_ARCH_HAS_PTE_SPECIAL=y\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_USERFAULTFD is not set\n# CONFIG_LRU_GEN is not set\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\nCONFIG_NET_INGRESS=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_INTERFACE is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_XFRM_ESP=y\n# CONFIG_NET_KEY is not set\n# CONFIG_XDP_SOCKETS is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=m\nCONFIG_IP_MROUTE_COMMON=y\nCONFIG_IP_MROUTE=y\n# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set\n# CONFIG_IP_PIMSM_V1 is not set\n# CONFIG_IP_PIMSM_V2 is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=y\n# CONFIG_INET_ESP_OFFLOAD is not set\n# CONFIG_INET_ESPINTCP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=m\nCONFIG_INET_DIAG=y\nCONFIG_INET_TCP_DIAG=y\n# CONFIG_INET_UDP_DIAG is not set\n# CONFIG_INET_RAW_DIAG is not set\n# CONFIG_INET_DIAG_DESTROY is not set\nCONFIG_TCP_CONG_ADVANCED=y\n# CONFIG_TCP_CONG_BIC is not set\nCONFIG_TCP_CONG_CUBIC=y\n# CONFIG_TCP_CONG_WESTWOOD is not set\nCONFIG_TCP_CONG_HTCP=m\nCONFIG_TCP_CONG_HSTCP=m\n# CONFIG_TCP_CONG_HYBLA is not set\nCONFIG_TCP_CONG_VEGAS=m\n# CONFIG_TCP_CONG_NV is not set\nCONFIG_TCP_CONG_SCALABLE=m\n# CONFIG_TCP_CONG_LP is not set\nCONFIG_TCP_CONG_VENO=m\nCONFIG_TCP_CONG_YEAH=m\nCONFIG_TCP_CONG_ILLINOIS=m\n# CONFIG_TCP_CONG_DCTCP is not set\nCONFIG_TCP_CONG_CDG=m\n# CONFIG_TCP_CONG_BBR is not set\nCONFIG_DEFAULT_CUBIC=y\n# CONFIG_DEFAULT_RENO is not set\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_IPV6_VTI is not set\nCONFIG_IPV6_SIT=m\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\nCONFIG_IPV6_FOU=m\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_MPTCP is not set\n# CONFIG_NETWORK_SECMARK is not set\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\nCONFIG_NETFILTER_EGRESS=y\nCONFIG_NETFILTER_NETLINK=m\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\nCONFIG_NETFILTER_NETLINK_LOG=m\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\n# CONFIG_NF_LOG_SYSLOG is not set\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_ZONES is not set\nCONFIG_NF_CONNTRACK_PROCFS=y\nCONFIG_NF_CONNTRACK_EVENTS=y\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\n# CONFIG_NF_CT_PROTO_DCCP is not set\n# CONFIG_NF_CT_PROTO_SCTP is not set\n# CONFIG_NF_CT_PROTO_UDPLITE is not set\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\nCONFIG_NF_CONNTRACK_IRC=m\nCONFIG_NF_CONNTRACK_BROADCAST=m\nCONFIG_NF_CONNTRACK_NETBIOS_NS=m\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\nCONFIG_NF_CONNTRACK_SIP=m\nCONFIG_NF_CONNTRACK_TFTP=m\nCONFIG_NF_CT_NETLINK=m\n# CONFIG_NETFILTER_NETLINK_GLUE_CT is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_IRC=m\nCONFIG_NF_NAT_SIP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=y\nCONFIG_NF_NAT_MASQUERADE=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\nCONFIG_NETFILTER_XTABLES_COMPAT=y\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\nCONFIG_NETFILTER_XT_MATCH_IPRANGE=m\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\nCONFIG_NETFILTER_XT_MATCH_OWNER=m\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\nCONFIG_NETFILTER_XT_MATCH_STATE=m\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\nCONFIG_IP_VS=m\n# CONFIG_IP_VS_IPV6 is not set\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_MH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n# CONFIG_IP_VS_TWOS is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS MH scheduler\n#\nCONFIG_IP_VS_MH_TAB_INDEX=12\n\n#\n# IPVS application helper\n#\n# CONFIG_IP_VS_FTP is not set\nCONFIG_IP_VS_NFCT=y\n# CONFIG_IP_VS_PE_SIP is not set\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\n# CONFIG_NF_LOG_IPV6 is not set\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_MATCH_SRH is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\nCONFIG_NET_SCH_FQ_CODEL=y\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_TCINDEX is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_RSVP is not set\n# CONFIG_NET_CLS_RSVP6 is not set\n# CONFIG_NET_CLS_FLOW is not set\nCONFIG_NET_CLS_CGROUP=m\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\nCONFIG_NET_L3_MASTER_DEV=y\n# CONFIG_QRTR is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_PCPU_DEV_REFCNT=y\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_SOCK_RX_QUEUE_MAPPING=y\nCONFIG_XPS=y\nCONFIG_CGROUP_NET_PRIO=y\nCONFIG_CGROUP_NET_CLASSID=y\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\nCONFIG_BT_RFCOMM_TTY=y\n# CONFIG_BT_BNEP is not set\nCONFIG_BT_HIDP=m\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_LEDS is not set\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\n# CONFIG_BT_DEBUGFS is not set\n# CONFIG_BT_SELFTEST is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_QCA=m\nCONFIG_BT_HCIBTUSB=m\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\n# CONFIG_BT_HCIBTUSB_MTK is not set\nCONFIG_BT_HCIBTUSB_RTL=y\nCONFIG_BT_HCIBTSDIO=m\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_SERDEV=y\nCONFIG_BT_HCIUART_H4=y\n# CONFIG_BT_HCIUART_NOKIA is not set\n# CONFIG_BT_HCIUART_BCSP is not set\n# CONFIG_BT_HCIUART_ATH3K is not set\n# CONFIG_BT_HCIUART_LL is not set\nCONFIG_BT_HCIUART_3WIRE=y\n# CONFIG_BT_HCIUART_INTEL is not set\nCONFIG_BT_HCIUART_BCM=y\n# CONFIG_BT_HCIUART_RTL is not set\nCONFIG_BT_HCIUART_QCA=y\n# CONFIG_BT_HCIUART_AG6XX is not set\n# CONFIG_BT_HCIUART_MRVL is not set\nCONFIG_BT_HCIBCM203X=m\n# CONFIG_BT_HCIBPA10X is not set\nCONFIG_BT_HCIBFUSB=m\n# CONFIG_BT_HCIVHCI is not set\n# CONFIG_BT_MRVL is not set\nCONFIG_BT_ATH3K=m\n# CONFIG_BT_MTKSDIO is not set\n# CONFIG_BT_MTKUART is not set\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=m\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\n# CONFIG_CFG80211_DEFAULT_PS is not set\n# CONFIG_CFG80211_DEBUGFS is not set\n# CONFIG_CFG80211_CRDA_SUPPORT is not set\nCONFIG_CFG80211_WEXT=y\nCONFIG_LIB80211=m\nCONFIG_LIB80211_CRYPT_WEP=m\nCONFIG_LIB80211_CRYPT_CCMP=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=m\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=m\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\nCONFIG_RFKILL_GPIO=m\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_PAGE_POOL=y\n# CONFIG_PAGE_POOL_STATS is not set\nCONFIG_FAILOVER=y\nCONFIG_ETHTOOL_NETLINK=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\nCONFIG_HAVE_PCI=y\n# CONFIG_PCI is not set\n# CONFIG_PCCARD is not set\n\n#\n# Generic Driver Options\n#\n# CONFIG_UEVENT_HELPER is not set\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\n# CONFIG_DEVTMPFS_SAFE is not set\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\nCONFIG_FW_CACHE=y\n# CONFIG_FW_UPLOAD is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\n# CONFIG_ALLOW_DEV_COREDUMP is not set\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_SOC_BUS=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_MOXTET is not set\n# CONFIG_IMX_WEIM is not set\n# CONFIG_VEXPRESS_CONFIG is not set\n# CONFIG_MHI_BUS is not set\n# CONFIG_MHI_BUS_EP is not set\n# end of Bus devices\n\n# CONFIG_CONNECTOR is not set\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\n# CONFIG_ARM_SCMI_PROTOCOL is not set\n# end of ARM System Control and Management Interface Protocol\n\nCONFIG_ARM_SCPI_PROTOCOL=y\nCONFIG_ARM_SCPI_POWER_DOMAIN=y\n# CONFIG_FIRMWARE_MEMMAP is not set\n# CONFIG_ARM_FFA_TRANSPORT is not set\n# CONFIG_GOOGLE_FIRMWARE is not set\nCONFIG_IMX_DSP=m\nCONFIG_IMX_SCU=y\nCONFIG_IMX_SCU_PD=y\nCONFIG_ARM_PSCI_FW=y\n# CONFIG_ARM_PSCI_CHECKER is not set\nCONFIG_HAVE_ARM_SMCCC=y\nCONFIG_HAVE_ARM_SMCCC_DISCOVERY=y\nCONFIG_ARM_SMCCC_SOC_ID=y\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n\n#\n# Partition parsers\n#\n# CONFIG_MTD_AR7_PARTS is not set\n# CONFIG_MTD_CMDLINE_PARTS is not set\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AFS_PARTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\n# end of Partition parsers\n\n#\n# User Modules And Translation Layers\n#\nCONFIG_MTD_BLKDEVS=y\nCONFIG_MTD_BLOCK=y\n\n#\n# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK.\n#\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\n# CONFIG_MTD_OOPS is not set\n# CONFIG_MTD_SWAP is not set\n# CONFIG_MTD_PARTITIONED_MASTER is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\n# CONFIG_MTD_CFI is not set\n# CONFIG_MTD_JEDECPROBE is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n# end of RAM/ROM/Flash chip drivers\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_PLATRAM is not set\n# end of Mapping drivers for chip access\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_DATAFLASH is not set\n# CONFIG_MTD_MCHP23K256 is not set\n# CONFIG_MTD_MCHP48L640 is not set\n# CONFIG_MTD_SST25L is not set\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\n# end of Self-contained MTD device drivers\n\n#\n# NAND\n#\n# CONFIG_MTD_ONENAND is not set\n# CONFIG_MTD_RAW_NAND is not set\n# CONFIG_MTD_SPI_NAND is not set\n\n#\n# ECC engine support\n#\n# CONFIG_MTD_NAND_ECC_SW_HAMMING is not set\n# CONFIG_MTD_NAND_ECC_SW_BCH is not set\n# CONFIG_MTD_NAND_ECC_MXIC is not set\n# end of ECC engine support\n# end of NAND\n\n#\n# LPDDR & LPDDR2 PCM memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\n# end of LPDDR & LPDDR2 PCM memory drivers\n\nCONFIG_MTD_SPI_NOR=y\nCONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y\n# CONFIG_MTD_SPI_NOR_SWP_DISABLE is not set\nCONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y\n# CONFIG_MTD_SPI_NOR_SWP_KEEP is not set\n# CONFIG_MTD_UBI is not set\n# CONFIG_MTD_HYPERBUS is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_DYNAMIC=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\nCONFIG_OF_RESOLVE=y\nCONFIG_OF_OVERLAY=y\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_CDROM=y\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=0\n# CONFIG_BLK_DEV_DRBD is not set\nCONFIG_BLK_DEV_NBD=y\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=16\nCONFIG_BLK_DEV_RAM_SIZE=4096\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_UBLK is not set\n\n#\n# NVME Support\n#\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TCP is not set\n# CONFIG_NVME_TARGET is not set\n# end of NVME Support\n\n#\n# Misc devices\n#\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\n# CONFIG_SRAM is not set\n# CONFIG_XILINX_SDFEC is not set\n# CONFIG_HISI_HIKEY_USB is not set\n# CONFIG_OPEN_DICE is not set\n# CONFIG_VCPU_STALL_DETECTOR is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\nCONFIG_EEPROM_AT25=m\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_EEPROM_EE1004 is not set\n# end of EEPROM support\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n# CONFIG_ECHO is not set\n# CONFIG_MISC_RTSX_USB is not set\n# CONFIG_UACCE is not set\n# CONFIG_PVPANIC is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_PROC_FS is not set\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_CHR_DEV_SG=m\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\n# CONFIG_SCSI_SCAN_ASYNC is not set\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\nCONFIG_SCSI_SAS_ATTRS=y\nCONFIG_SCSI_SAS_LIBSAS=y\nCONFIG_SCSI_SAS_HOST_SMP=y\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\n# CONFIG_ATA is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\n# CONFIG_DM_DEBUG is not set\nCONFIG_DM_BUFIO=m\n# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\n# CONFIG_DM_UNSTRIPED is not set\n# CONFIG_DM_CRYPT is not set\n# CONFIG_DM_SNAPSHOT is not set\nCONFIG_DM_THIN_PROVISIONING=m\n# CONFIG_DM_CACHE is not set\n# CONFIG_DM_WRITECACHE is not set\n# CONFIG_DM_EBS is not set\n# CONFIG_DM_ERA is not set\n# CONFIG_DM_CLONE is not set\n# CONFIG_DM_MIRROR is not set\n# CONFIG_DM_RAID is not set\n# CONFIG_DM_ZERO is not set\n# CONFIG_DM_MULTIPATH is not set\n# CONFIG_DM_DELAY is not set\n# CONFIG_DM_DUST is not set\n# CONFIG_DM_UEVENT is not set\n# CONFIG_DM_FLAKEY is not set\n# CONFIG_DM_VERITY is not set\n# CONFIG_DM_SWITCH is not set\n# CONFIG_DM_LOG_WRITES is not set\n# CONFIG_DM_INTEGRITY is not set\n# CONFIG_TARGET_CORE is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\nCONFIG_DUMMY=m\nCONFIG_WIREGUARD=m\n# CONFIG_WIREGUARD_DEBUG is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\n# CONFIG_MACVTAP is not set\nCONFIG_IPVLAN_L3S=y\nCONFIG_IPVLAN=m\n# CONFIG_IPVTAP is not set\nCONFIG_VXLAN=m\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_AMT is not set\n# CONFIG_MACSEC is not set\nCONFIG_NETCONSOLE=y\nCONFIG_NETCONSOLE_DYNAMIC=y\nCONFIG_NETPOLL=y\nCONFIG_NET_POLL_CONTROLLER=y\nCONFIG_TUN=y\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\nCONFIG_NLMON=m\nCONFIG_ETHERNET=y\n# CONFIG_NET_VENDOR_ALACRITECH is not set\n# CONFIG_ALTERA_TSE is not set\n# CONFIG_NET_VENDOR_AMAZON is not set\n# CONFIG_NET_VENDOR_AMD is not set\n# CONFIG_NET_VENDOR_AQUANTIA is not set\n# CONFIG_NET_VENDOR_ARC is not set\n# CONFIG_NET_VENDOR_ASIX is not set\n# CONFIG_NET_VENDOR_BROADCOM is not set\n# CONFIG_NET_VENDOR_CADENCE is not set\n# CONFIG_NET_VENDOR_CAVIUM is not set\n# CONFIG_NET_VENDOR_CORTINA is not set\n# CONFIG_NET_VENDOR_DAVICOM is not set\n# CONFIG_DNET is not set\n# CONFIG_NET_VENDOR_ENGLEDER is not set\n# CONFIG_NET_VENDOR_EZCHIP is not set\nCONFIG_NET_VENDOR_FREESCALE=y\nCONFIG_FEC=y\n# CONFIG_FSL_PQ_MDIO is not set\n# CONFIG_FSL_XGMAC_MDIO is not set\n# CONFIG_GIANFAR is not set\n# CONFIG_FSL_ENETC_IERB is not set\n# CONFIG_NET_VENDOR_FUNGIBLE is not set\nCONFIG_NET_VENDOR_GOOGLE=y\n# CONFIG_NET_VENDOR_HISILICON is not set\n# CONFIG_NET_VENDOR_HUAWEI is not set\n# CONFIG_NET_VENDOR_INTEL is not set\n# CONFIG_NET_VENDOR_WANGXUN is not set\n# CONFIG_NET_VENDOR_ADI is not set\n# CONFIG_NET_VENDOR_LITEX is not set\n# CONFIG_NET_VENDOR_MARVELL is not set\n# CONFIG_NET_VENDOR_MELLANOX is not set\n# CONFIG_NET_VENDOR_MICREL is not set\n# CONFIG_NET_VENDOR_MICROCHIP is not set\n# CONFIG_NET_VENDOR_MICROSEMI is not set\n# CONFIG_NET_VENDOR_MICROSOFT is not set\n# CONFIG_NET_VENDOR_NI is not set\n# CONFIG_NET_VENDOR_NATSEMI is not set\n# CONFIG_NET_VENDOR_NETRONOME is not set\n# CONFIG_ETHOC is not set\nCONFIG_NET_VENDOR_PENSANDO=y\n# CONFIG_NET_VENDOR_QUALCOMM is not set\n# CONFIG_NET_VENDOR_RENESAS is not set\n# CONFIG_NET_VENDOR_ROCKER is not set\n# CONFIG_NET_VENDOR_SAMSUNG is not set\n# CONFIG_NET_VENDOR_SEEQ is not set\n# CONFIG_NET_VENDOR_SOLARFLARE is not set\n# CONFIG_NET_VENDOR_SMSC is not set\n# CONFIG_NET_VENDOR_SOCIONEXT is not set\nCONFIG_NET_VENDOR_STMICRO=y\nCONFIG_STMMAC_ETH=y\n# CONFIG_STMMAC_SELFTESTS is not set\nCONFIG_STMMAC_PLATFORM=y\n# CONFIG_DWMAC_DWC_QOS_ETH is not set\nCONFIG_DWMAC_GENERIC=y\nCONFIG_DWMAC_IMX8=y\n# CONFIG_DWMAC_INTEL_PLAT is not set\n# CONFIG_NET_VENDOR_SYNOPSYS is not set\n# CONFIG_NET_VENDOR_VERTEXCOM is not set\n# CONFIG_NET_VENDOR_VIA is not set\n# CONFIG_NET_VENDOR_WIZNET is not set\nCONFIG_NET_VENDOR_XILINX=y\n# CONFIG_XILINX_EMACLITE is not set\n# CONFIG_XILINX_AXI_EMAC is not set\n# CONFIG_XILINX_LL_TEMAC is not set\nCONFIG_PHYLINK=y\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_ADIN_PHY is not set\n# CONFIG_ADIN1100_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=m\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM54140_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MARVELL_88X2222_PHY is not set\n# CONFIG_MAXLINEAR_GPHY is not set\n# CONFIG_MEDIATEK_GE_PHY is not set\n# CONFIG_MICREL_PHY is not set\nCONFIG_MICROCHIP_PHY=m\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_MOTORCOMM_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_NXP_TJA11XX_PHY is not set\nCONFIG_AT803X_PHY=y\n# CONFIG_QSEMI_PHY is not set\nCONFIG_REALTEK_PHY=y\n# CONFIG_RENESAS_PHY is not set\n# CONFIG_ROCKCHIP_PHY is not set\nCONFIG_SMSC_PHY=m\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_DP83TD510_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\n# CONFIG_PSE_CONTROLLER is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_OF_MDIO=y\nCONFIG_MDIO_DEVRES=y\nCONFIG_MDIO_BITBANG=y\n# CONFIG_MDIO_BCM_UNIMAC is not set\n# CONFIG_MDIO_GPIO is not set\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_OCTEON is not set\n# CONFIG_MDIO_IPQ4019 is not set\n# CONFIG_MDIO_IPQ8064 is not set\n\n#\n# MDIO Multiplexers\n#\nCONFIG_MDIO_BUS_MUX=y\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set\nCONFIG_MDIO_BUS_MUX_MMIOREG=y\n\n#\n# PCS device drivers\n#\nCONFIG_PCS_XPCS=y\n# end of PCS device drivers\n\n# CONFIG_PPP is not set\n# CONFIG_SLIP is not set\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\nCONFIG_USB_PEGASUS=y\nCONFIG_USB_RTL8150=y\nCONFIG_USB_RTL8152=m\nCONFIG_USB_LAN78XX=m\nCONFIG_USB_USBNET=m\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\n# CONFIG_USB_NET_CDC_EEM is not set\n# CONFIG_USB_NET_CDC_NCM is not set\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\nCONFIG_USB_NET_DM9601=m\n# CONFIG_USB_NET_SR9700 is not set\n# CONFIG_USB_NET_SR9800 is not set\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=m\n# CONFIG_USB_NET_GL620A is not set\n# CONFIG_USB_NET_NET1080 is not set\n# CONFIG_USB_NET_PLUSB is not set\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\n# CONFIG_USB_NET_CDC_SUBSET is not set\nCONFIG_USB_NET_ZAURUS=m\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\nCONFIG_USB_HSO=m\n# CONFIG_USB_NET_INT51X1 is not set\nCONFIG_USB_IPHETH=m\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\n# CONFIG_USB_NET_AQC111 is not set\nCONFIG_USB_RTL8153_ECM=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\nCONFIG_ATH9K=m\n# CONFIG_ATH9K_AHB is not set\n# CONFIG_ATH9K_DEBUGFS is not set\n# CONFIG_ATH9K_DYNACK is not set\n# CONFIG_ATH9K_WOW is not set\nCONFIG_ATH9K_RFKILL=y\nCONFIG_ATH9K_CHANNEL_CONTEXT=y\nCONFIG_ATH9K_PCOEM=y\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\nCONFIG_ATH9K_HWRNG=y\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\nCONFIG_CARL9170_HWRNG=y\nCONFIG_ATH6KL=m\n# CONFIG_ATH6KL_SDIO is not set\nCONFIG_ATH6KL_USB=m\n# CONFIG_ATH6KL_DEBUG is not set\nCONFIG_AR5523=m\nCONFIG_ATH10K=m\nCONFIG_ATH10K_CE=y\nCONFIG_ATH10K_SDIO=m\nCONFIG_ATH10K_USB=m\n# CONFIG_ATH10K_DEBUG is not set\n# CONFIG_ATH10K_DEBUGFS is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\n# CONFIG_AT76C50X_USB is not set\nCONFIG_WLAN_VENDOR_BROADCOM=y\nCONFIG_B43=m\nCONFIG_B43_BCMA=y\nCONFIG_B43_SSB=y\nCONFIG_B43_BUSES_BCMA_AND_SSB=y\n# CONFIG_B43_BUSES_BCMA is not set\n# CONFIG_B43_BUSES_SSB is not set\n# CONFIG_B43_SDIO is not set\nCONFIG_B43_BCMA_PIO=y\nCONFIG_B43_PIO=y\nCONFIG_B43_PHY_G=y\nCONFIG_B43_PHY_N=y\nCONFIG_B43_PHY_LP=y\nCONFIG_B43_PHY_HT=y\nCONFIG_B43_LEDS=y\nCONFIG_B43_HWRNG=y\n# CONFIG_B43_DEBUG is not set\n# CONFIG_B43LEGACY is not set\nCONFIG_BRCMUTIL=m\n# CONFIG_BRCMSMAC is not set\nCONFIG_BRCMFMAC=m\nCONFIG_BRCMFMAC_PROTO_BCDC=y\nCONFIG_BRCMFMAC_SDIO=y\nCONFIG_BRCMFMAC_USB=y\n# CONFIG_BRCM_TRACING is not set\n# CONFIG_BRCMDBG is not set\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\nCONFIG_WLAN_VENDOR_INTERSIL=y\n# CONFIG_HOSTAP is not set\nCONFIG_P54_COMMON=m\nCONFIG_P54_USB=m\n# CONFIG_P54_SPI is not set\nCONFIG_P54_LEDS=y\nCONFIG_WLAN_VENDOR_MARVELL=y\n# CONFIG_LIBERTAS is not set\n# CONFIG_LIBERTAS_THINFIRM is not set\n# CONFIG_MWIFIEX is not set\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_MT76_CORE=m\nCONFIG_MT76_LEDS=y\nCONFIG_MT76_USB=m\nCONFIG_MT76x02_LIB=m\nCONFIG_MT76x02_USB=m\nCONFIG_MT76x0_COMMON=m\nCONFIG_MT76x0U=m\nCONFIG_MT76x2_COMMON=m\nCONFIG_MT76x2U=m\n# CONFIG_MT7663U is not set\n# CONFIG_MT7663S is not set\n# CONFIG_MT7921S is not set\n# CONFIG_MT7921U is not set\nCONFIG_WLAN_VENDOR_MICROCHIP=y\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\n# CONFIG_WLAN_VENDOR_PURELIFI is not set\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=m\n# CONFIG_RTL8192CU is not set\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\nCONFIG_RTW88=m\nCONFIG_RTW88_CORE=m\nCONFIG_RTW88_USB=m\nCONFIG_RTW88_8822B=m\nCONFIG_RTW88_8822C=m\nCONFIG_RTW88_8723D=m\nCONFIG_RTW88_8821C=m\n# CONFIG_RTW88_8822BS is not set\nCONFIG_RTW88_8822BU=m\n# CONFIG_RTW88_8822CS is not set\nCONFIG_RTW88_8822CU=m\nCONFIG_RTW88_8723DU=m\n# CONFIG_RTW88_8821CS is not set\nCONFIG_RTW88_8821CU=m\n# CONFIG_RTW88_DEBUG is not set\n# CONFIG_RTW88_DEBUGFS is not set\n# CONFIG_RTW89 is not set\nCONFIG_WLAN_VENDOR_RSI=y\n# CONFIG_RSI_91X is not set\n# CONFIG_WLAN_VENDOR_SILABS is not set\nCONFIG_WLAN_VENDOR_ST=y\n# CONFIG_CW1200 is not set\nCONFIG_WLAN_VENDOR_TI=y\n# CONFIG_WL1251 is not set\n# CONFIG_WL12XX is not set\nCONFIG_WL18XX=m\nCONFIG_WLCORE=m\n# CONFIG_WLCORE_SPI is not set\nCONFIG_WLCORE_SDIO=m\nCONFIG_WILINK_PLATFORM_DATA=y\nCONFIG_WLAN_VENDOR_ZYDAS=y\nCONFIG_USB_ZD1201=m\nCONFIG_ZD1211RW=m\n# CONFIG_ZD1211RW_DEBUG is not set\n# CONFIG_WLAN_VENDOR_QUANTENNA is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\n# CONFIG_NETDEVSIM is not set\n# CONFIG_NET_FAILOVER is not set\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\n# CONFIG_INPUT_MATRIXKMAP is not set\n\n#\n# Userland interfaces\n#\nCONFIG_INPUT_MOUSEDEV=y\n# CONFIG_INPUT_MOUSEDEV_PSAUX is not set\nCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024\nCONFIG_INPUT_MOUSEDEV_SCREEN_Y=768\nCONFIG_INPUT_JOYDEV=y\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADC is not set\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\n# CONFIG_KEYBOARD_ATKBD is not set\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=m\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_SNVS_PWRKEY is not set\n# CONFIG_KEYBOARD_IMX is not set\n# CONFIG_KEYBOARD_IMX_SC_KEY is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_PINEPHONE is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CROS_EC is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\n# CONFIG_KEYBOARD_CYPRESS_SF is not set\nCONFIG_INPUT_MOUSE=y\n# CONFIG_MOUSE_PS2 is not set\n# CONFIG_MOUSE_SERIAL is not set\n# CONFIG_MOUSE_APPLETOUCH is not set\n# CONFIG_MOUSE_BCM5974 is not set\n# CONFIG_MOUSE_CYAPA is not set\n# CONFIG_MOUSE_ELAN_I2C is not set\n# CONFIG_MOUSE_VSXXXAA is not set\n# CONFIG_MOUSE_GPIO is not set\n# CONFIG_MOUSE_SYNAPTICS_I2C is not set\n# CONFIG_MOUSE_SYNAPTICS_USB is not set\nCONFIG_INPUT_JOYSTICK=y\n# CONFIG_JOYSTICK_ANALOG is not set\n# CONFIG_JOYSTICK_A3D is not set\n# CONFIG_JOYSTICK_ADC is not set\n# CONFIG_JOYSTICK_ADI is not set\n# CONFIG_JOYSTICK_COBRA is not set\n# CONFIG_JOYSTICK_GF2K is not set\n# CONFIG_JOYSTICK_GRIP is not set\n# CONFIG_JOYSTICK_GRIP_MP is not set\n# CONFIG_JOYSTICK_GUILLEMOT is not set\n# CONFIG_JOYSTICK_INTERACT is not set\n# CONFIG_JOYSTICK_SIDEWINDER is not set\n# CONFIG_JOYSTICK_TMDC is not set\n# CONFIG_JOYSTICK_IFORCE is not set\n# CONFIG_JOYSTICK_WARRIOR is not set\n# CONFIG_JOYSTICK_MAGELLAN is not set\n# CONFIG_JOYSTICK_SPACEORB is not set\n# CONFIG_JOYSTICK_SPACEBALL is not set\n# CONFIG_JOYSTICK_STINGER is not set\n# CONFIG_JOYSTICK_TWIDJOY is not set\n# CONFIG_JOYSTICK_ZHENHUA is not set\n# CONFIG_JOYSTICK_AS5011 is not set\n# CONFIG_JOYSTICK_JOYDUMP is not set\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\nCONFIG_JOYSTICK_PSXPAD_SPI=m\nCONFIG_JOYSTICK_PSXPAD_SPI_FF=y\n# CONFIG_JOYSTICK_PXRC is not set\n# CONFIG_JOYSTICK_QWIIC is not set\n# CONFIG_JOYSTICK_FSIA6B is not set\n# CONFIG_JOYSTICK_SENSEHAT is not set\n# CONFIG_INPUT_TABLET is not set\n# CONFIG_INPUT_TOUCHSCREEN is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ARIZONA_HAPTICS is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\n# CONFIG_INPUT_RK805_PWRKEY is not set\nCONFIG_INPUT_GPIO_ROTARY_ENCODER=m\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IBM_PANEL is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_IQS7222 is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\nCONFIG_RMI4_CORE=y\n# CONFIG_RMI4_I2C is not set\n# CONFIG_RMI4_SPI is not set\n# CONFIG_RMI4_SMB is not set\nCONFIG_RMI4_F03=y\nCONFIG_RMI4_F03_SERIO=y\nCONFIG_RMI4_2D_SENSOR=y\nCONFIG_RMI4_F11=y\nCONFIG_RMI4_F12=y\nCONFIG_RMI4_F30=y\n# CONFIG_RMI4_F34 is not set\n# CONFIG_RMI4_F3A is not set\n# CONFIG_RMI4_F55 is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_SERIO_SERPORT=y\n# CONFIG_SERIO_AMBAKMI is not set\n# CONFIG_SERIO_LIBPS2 is not set\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_SERIO_GPIO_PS2 is not set\n# CONFIG_USERIO is not set\n# CONFIG_GAMEPORT is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\n# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set\nCONFIG_SERIAL_8250_16550A_VARIANTS=y\n# CONFIG_SERIAL_8250_FINTEK is not set\nCONFIG_SERIAL_8250_CONSOLE=y\nCONFIG_SERIAL_8250_DMA=y\nCONFIG_SERIAL_8250_NR_UARTS=1\nCONFIG_SERIAL_8250_RUNTIME_UARTS=0\nCONFIG_SERIAL_8250_EXTENDED=y\n# CONFIG_SERIAL_8250_MANY_PORTS is not set\nCONFIG_SERIAL_8250_SHARE_IRQ=y\n# CONFIG_SERIAL_8250_DETECT_IRQ is not set\n# CONFIG_SERIAL_8250_RSA is not set\nCONFIG_SERIAL_8250_DWLIB=y\nCONFIG_SERIAL_8250_FSL=y\nCONFIG_SERIAL_8250_DW=y\n# CONFIG_SERIAL_8250_RT288X is not set\nCONFIG_SERIAL_OF_PLATFORM=y\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\n# CONFIG_SERIAL_AMBA_PL011 is not set\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\nCONFIG_SERIAL_IMX=y\nCONFIG_SERIAL_IMX_CONSOLE=y\n# CONFIG_SERIAL_IMX_EARLYCON is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_SIFIVE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\nCONFIG_SERIAL_MCTRL_GPIO=y\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NULL_TTY is not set\n# CONFIG_HVC_DCC is not set\nCONFIG_SERIAL_DEV_BUS=y\nCONFIG_SERIAL_DEV_CTRL_TTYPORT=y\n# CONFIG_TTY_PRINTK is not set\n# CONFIG_VIRTIO_CONSOLE is not set\n# CONFIG_IPMI_HANDLER is not set\n# CONFIG_IPMB_DEVICE_INTERFACE is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_BA431 is not set\nCONFIG_HW_RANDOM_OPTEE=m\n# CONFIG_HW_RANDOM_CCTRNG is not set\n# CONFIG_HW_RANDOM_XIPHERA is not set\nCONFIG_HW_RANDOM_ARM_SMCCC_TRNG=m\nCONFIG_DEVMEM=y\n# CONFIG_TCG_TPM is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\nCONFIG_RANDOM_TRUST_CPU=y\n# CONFIG_RANDOM_TRUST_BOOTLOADER is not set\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=m\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\n# CONFIG_I2C_MUX_PINCTRL is not set\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_DEMUX_PINCTRL is not set\n# CONFIG_I2C_MUX_MLXCPLD is not set\n# end of Multiplexer I2C Chip support\n\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CADENCE is not set\n# CONFIG_I2C_CBUS_GPIO is not set\nCONFIG_I2C_DESIGNWARE_CORE=y\n# CONFIG_I2C_DESIGNWARE_SLAVE is not set\nCONFIG_I2C_DESIGNWARE_PLATFORM=y\n# CONFIG_I2C_EMEV2 is not set\n# CONFIG_I2C_GPIO is not set\nCONFIG_I2C_IMX=y\nCONFIG_I2C_IMX_LPI2C=y\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_RK3X is not set\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_CROS_EC_TUNNEL is not set\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\nCONFIG_I2C_SLAVE=y\n# CONFIG_I2C_SLAVE_EEPROM is not set\n# CONFIG_I2C_SLAVE_TESTUNIT is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\nCONFIG_SPI_MEM=y\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\nCONFIG_SPI_BITBANG=y\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_CADENCE_QUADSPI is not set\n# CONFIG_SPI_CADENCE_XSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_FSL_LPSPI is not set\n# CONFIG_SPI_FSL_QUADSPI is not set\n# CONFIG_SPI_NXP_FLEXSPI is not set\n# CONFIG_SPI_GPIO is not set\nCONFIG_SPI_IMX=y\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_MICROCHIP_CORE is not set\n# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set\n# CONFIG_SPI_OC_TINY is not set\nCONFIG_SPI_PL022=y\n# CONFIG_SPI_ROCKCHIP is not set\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_SIFIVE is not set\n# CONFIG_SPI_MXIC is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_AMD is not set\n\n#\n# SPI Multiplexer support\n#\n# CONFIG_SPI_MUX is not set\n\n#\n# SPI Protocol Masters\n#\n# CONFIG_SPI_SPIDEV is not set\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\nCONFIG_SPI_DYNAMIC=y\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\n# CONFIG_PTP_1588_CLOCK is not set\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_GENERIC_PINCTRL_GROUPS=y\nCONFIG_PINMUX=y\nCONFIG_GENERIC_PINMUX_FUNCTIONS=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_CY8C95X0 is not set\n# CONFIG_PINCTRL_MCP23S08 is not set\n# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set\n# CONFIG_PINCTRL_OCELOT is not set\n# CONFIG_PINCTRL_RK805 is not set\n# CONFIG_PINCTRL_SINGLE is not set\n# CONFIG_PINCTRL_STMFX is not set\n# CONFIG_PINCTRL_SX150X is not set\nCONFIG_PINCTRL_IMX=y\nCONFIG_PINCTRL_IMX_SCU=y\nCONFIG_PINCTRL_IMX8MM=y\n# CONFIG_PINCTRL_IMX8MN is not set\n# CONFIG_PINCTRL_IMX8MP is not set\nCONFIG_PINCTRL_IMX8MQ=y\nCONFIG_PINCTRL_IMX8QM=y\nCONFIG_PINCTRL_IMX8QXP=y\n# CONFIG_PINCTRL_IMX8DXL is not set\n# CONFIG_PINCTRL_IMX8ULP is not set\n# CONFIG_PINCTRL_IMXRT1050 is not set\n# CONFIG_PINCTRL_IMX93 is not set\n# CONFIG_PINCTRL_IMXRT1170 is not set\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_SYSFS=y\nCONFIG_GPIO_CDEV=y\nCONFIG_GPIO_CDEV_V1=y\nCONFIG_GPIO_GENERIC=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_CADENCE is not set\nCONFIG_GPIO_DWAPB=y\n# CONFIG_GPIO_FTGPIO010 is not set\nCONFIG_GPIO_GENERIC_PLATFORM=y\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\nCONFIG_GPIO_IMX_SCU=y\n# CONFIG_GPIO_LOGICVC is not set\n# CONFIG_GPIO_MB86S7X is not set\nCONFIG_GPIO_MXC=y\n# CONFIG_GPIO_PL061 is not set\n# CONFIG_GPIO_SIFIVE is not set\n# CONFIG_GPIO_SYSCON is not set\nCONFIG_GPIO_VF610=y\n# CONFIG_GPIO_XGENE is not set\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_GW_PLD is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\n# CONFIG_GPIO_PCA953X is not set\n# CONFIG_GPIO_PCA9570 is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\n# CONFIG_GPIO_ARIZONA is not set\n# CONFIG_GPIO_WM8994 is not set\n# end of MFD GPIO expanders\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n# end of SPI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_SIM is not set\n# end of Virtual GPIO drivers\n\n# CONFIG_W1 is not set\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_BRCMSTB is not set\nCONFIG_POWER_RESET_GPIO=y\nCONFIG_POWER_RESET_GPIO_RESTART=y\n# CONFIG_POWER_RESET_LTC2952 is not set\nCONFIG_POWER_RESET_REGULATOR=y\n# CONFIG_POWER_RESET_RESTART is not set\n# CONFIG_POWER_RESET_XGENE is not set\nCONFIG_POWER_RESET_SYSCON=y\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\n# CONFIG_SYSCON_REBOOT_MODE is not set\n# CONFIG_NVMEM_REBOOT_MODE is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\nCONFIG_POWER_SUPPLY_HWMON=y\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_IP5XXX_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SAMSUNG_SDI is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_MAX77976 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_RK817 is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_CROS_USBPD is not set\n# CONFIG_CHARGER_CROS_PCHG is not set\n# CONFIG_CHARGER_UCS1002 is not set\n# CONFIG_CHARGER_BD99954 is not set\n# CONFIG_BATTERY_UG3105 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM1177 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_AHT10 is not set\n# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set\n# CONFIG_SENSORS_AS370 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_AXI_FAN_CONTROL is not set\nCONFIG_SENSORS_ARM_SCPI=y\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_CORSAIR_CPRO is not set\n# CONFIG_SENSORS_CORSAIR_PSU is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\nCONFIG_SENSORS_GPIO_FAN=m\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IIO_HWMON is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2947_I2C is not set\n# CONFIG_SENSORS_LTC2947_SPI is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC2992 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX127 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX31730 is not set\n# CONFIG_SENSORS_MAX31760 is not set\n# CONFIG_SENSORS_MAX6620 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_TPS23861 is not set\n# CONFIG_SENSORS_MR75203 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT6775_I2C is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_NZXT_KRAKEN2 is not set\n# CONFIG_SENSORS_NZXT_SMART2 is not set\n# CONFIG_SENSORS_OCC_P8_I2C is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\nCONFIG_SENSORS_PWM_FAN=m\n# CONFIG_SENSORS_SBTSI is not set\n# CONFIG_SENSORS_SBRMI is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHT4x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC2305 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_INA238 is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_TMP464 is not set\n# CONFIG_SENSORS_TMP513 is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_NETLINK is not set\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\n# CONFIG_THERMAL_WRITABLE_TRIPS is not set\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\n# CONFIG_CPU_THERMAL is not set\n# CONFIG_DEVFREQ_THERMAL is not set\n# CONFIG_THERMAL_EMULATION is not set\n# CONFIG_THERMAL_MMIO is not set\n# CONFIG_IMX_THERMAL is not set\n# CONFIG_IMX_SC_THERMAL is not set\n# CONFIG_IMX8MM_THERMAL is not set\nCONFIG_QORIQ_THERMAL=y\n# CONFIG_GENERIC_ADC_THERMAL is not set\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\nCONFIG_WATCHDOG_OPEN_TIMEOUT=0\n# CONFIG_WATCHDOG_SYSFS is not set\n# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_ARM_SBSA_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\n# CONFIG_DW_WATCHDOG is not set\n# CONFIG_MAX63XX_WATCHDOG is not set\nCONFIG_IMX2_WDT=y\n# CONFIG_IMX_SC_WDT is not set\n# CONFIG_IMX7ULP_WDT is not set\n# CONFIG_ARM_SMC_WATCHDOG is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\nCONFIG_SSB=m\nCONFIG_SSB_BLOCKIO=y\nCONFIG_SSB_SDIOHOST_POSSIBLE=y\n# CONFIG_SSB_SDIOHOST is not set\n# CONFIG_SSB_DRIVER_GPIO is not set\nCONFIG_BCMA_POSSIBLE=y\nCONFIG_BCMA=m\nCONFIG_BCMA_BLOCKIO=y\n# CONFIG_BCMA_HOST_SOC is not set\n# CONFIG_BCMA_DRIVER_GMAC_CMN is not set\n# CONFIG_BCMA_DRIVER_GPIO is not set\n# CONFIG_BCMA_DEBUG is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AXP20X_I2C is not set\nCONFIG_MFD_CROS_EC_DEV=y\n# CONFIG_MFD_MADERA is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_GATEWORKS_GSC is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_MP2629 is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77620 is not set\n# CONFIG_MFD_MAX77650 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77714 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6370 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_MFD_OCELOT is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_NTXEC is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_SY7636A is not set\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RT5120 is not set\n# CONFIG_MFD_RC5T583 is not set\nCONFIG_MFD_RK808=y\n# CONFIG_MFD_RN5T618 is not set\nCONFIG_MFD_SEC_CORE=y\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_LOCHNAGAR is not set\nCONFIG_MFD_ARIZONA=m\nCONFIG_MFD_ARIZONA_I2C=m\nCONFIG_MFD_ARIZONA_SPI=m\n# CONFIG_MFD_CS47L24 is not set\nCONFIG_MFD_WM5102=y\n# CONFIG_MFD_WM5110 is not set\n# CONFIG_MFD_WM8997 is not set\n# CONFIG_MFD_WM8998 is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\nCONFIG_MFD_WM8994=y\nCONFIG_MFD_ROHM_BD718XX=y\n# CONFIG_MFD_ROHM_BD71828 is not set\n# CONFIG_MFD_ROHM_BD957XMUF is not set\n# CONFIG_MFD_STPMIC1 is not set\n# CONFIG_MFD_STMFX is not set\n# CONFIG_MFD_ATC260X_I2C is not set\n# CONFIG_MFD_QCOM_PM8008 is not set\n# CONFIG_RAVE_SP_CORE is not set\n# CONFIG_MFD_INTEL_M10_BMC is not set\n# CONFIG_MFD_RSMU_I2C is not set\n# CONFIG_MFD_RSMU_SPI is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\n# CONFIG_REGULATOR_ANATOP is not set\n# CONFIG_REGULATOR_ARIZONA_LDO1 is not set\n# CONFIG_REGULATOR_ARIZONA_MICSUPP is not set\n# CONFIG_REGULATOR_BD718XX is not set\n# CONFIG_REGULATOR_CROS_EC is not set\n# CONFIG_REGULATOR_DA9121 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\n# CONFIG_REGULATOR_FAN53880 is not set\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MAX20086 is not set\n# CONFIG_REGULATOR_MAX77826 is not set\n# CONFIG_REGULATOR_MCP16502 is not set\n# CONFIG_REGULATOR_MP5416 is not set\n# CONFIG_REGULATOR_MP8859 is not set\n# CONFIG_REGULATOR_MP886X is not set\n# CONFIG_REGULATOR_MPQ7920 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PF8X00 is not set\nCONFIG_REGULATOR_PFUZE100=y\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\n# CONFIG_REGULATOR_PWM is not set\n# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set\n# CONFIG_REGULATOR_RK808 is not set\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT5190A is not set\n# CONFIG_REGULATOR_RT5759 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\n# CONFIG_REGULATOR_S2MPA01 is not set\n# CONFIG_REGULATOR_S2MPS11 is not set\n# CONFIG_REGULATOR_S5M8767 is not set\n# CONFIG_REGULATOR_SLG51000 is not set\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_SY8824X is not set\n# CONFIG_REGULATOR_SY8827N is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS6286X is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\n# CONFIG_REGULATOR_VCTRL is not set\n# CONFIG_REGULATOR_WM8994 is not set\nCONFIG_RC_CORE=m\nCONFIG_LIRC=y\nCONFIG_RC_MAP=m\nCONFIG_RC_DECODERS=y\nCONFIG_IR_IMON_DECODER=m\nCONFIG_IR_JVC_DECODER=m\nCONFIG_IR_MCE_KBD_DECODER=m\nCONFIG_IR_NEC_DECODER=m\nCONFIG_IR_RC5_DECODER=m\nCONFIG_IR_RC6_DECODER=m\nCONFIG_IR_RCMM_DECODER=m\nCONFIG_IR_SANYO_DECODER=m\nCONFIG_IR_SHARP_DECODER=m\nCONFIG_IR_SONY_DECODER=m\nCONFIG_IR_XMP_DECODER=m\nCONFIG_RC_DEVICES=y\nCONFIG_IR_GPIO_CIR=m\nCONFIG_IR_GPIO_TX=m\n# CONFIG_IR_HIX5HD2 is not set\nCONFIG_IR_IGORPLUGUSB=m\nCONFIG_IR_IGUANA=m\nCONFIG_IR_IMON=m\nCONFIG_IR_IMON_RAW=m\nCONFIG_IR_MCEUSB=m\nCONFIG_IR_PWM_TX=m\nCONFIG_IR_REDRAT3=m\n# CONFIG_IR_SERIAL is not set\n# CONFIG_IR_SPI is not set\nCONFIG_IR_STREAMZAP=m\nCONFIG_IR_TOY=m\nCONFIG_IR_TTUSBIR=m\nCONFIG_RC_ATI_REMOTE=m\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_RC_XBOX_DVD=m\nCONFIG_CEC_CORE=y\nCONFIG_CEC_NOTIFIER=y\n\n#\n# CEC support\n#\nCONFIG_MEDIA_CEC_SUPPORT=y\n# CONFIG_CEC_CH7322 is not set\n# CONFIG_CEC_CROS_EC is not set\n# CONFIG_USB_PULSE8_CEC is not set\n# CONFIG_USB_RAINSHADOW_CEC is not set\n# end of CEC support\n\nCONFIG_MEDIA_SUPPORT=m\n# CONFIG_MEDIA_SUPPORT_FILTER is not set\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\nCONFIG_MEDIA_RADIO_SUPPORT=y\nCONFIG_MEDIA_SDR_SUPPORT=y\nCONFIG_MEDIA_PLATFORM_SUPPORT=y\nCONFIG_MEDIA_TEST_SUPPORT=y\n# end of Media device types\n\n#\n# Media core support\n#\nCONFIG_VIDEO_DEV=m\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_DVB_CORE=m\n# end of Media core support\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2_I2C=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_VIDEO_TUNER=m\nCONFIG_V4L2_JPEG_HELPER=m\nCONFIG_V4L2_H264=m\nCONFIG_V4L2_VP9=m\nCONFIG_V4L2_MEM2MEM_DEV=m\nCONFIG_VIDEOBUF_GEN=m\nCONFIG_VIDEOBUF_VMALLOC=m\n# end of Video4Linux options\n\n#\n# Media controller options\n#\nCONFIG_MEDIA_CONTROLLER_DVB=y\nCONFIG_MEDIA_CONTROLLER_REQUEST_API=y\n# end of Media controller options\n\n#\n# Digital TV options\n#\n# CONFIG_DVB_MMAP is not set\nCONFIG_DVB_NET=y\nCONFIG_DVB_MAX_ADAPTERS=8\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set\n# CONFIG_DVB_ULE_DEBUG is not set\n# end of Digital TV options\n\n#\n# Media drivers\n#\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_USB_S2255 is not set\nCONFIG_VIDEO_USBTV=m\nCONFIG_USB_VIDEO_CLASS=m\n# CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV is not set\n\n#\n# Analog TV USB devices\n#\n# CONFIG_VIDEO_GO7007 is not set\nCONFIG_VIDEO_HDPVR=m\nCONFIG_VIDEO_PVRUSB2=m\nCONFIG_VIDEO_PVRUSB2_SYSFS=y\nCONFIG_VIDEO_PVRUSB2_DVB=y\n# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set\nCONFIG_VIDEO_STK1160_COMMON=m\nCONFIG_VIDEO_STK1160=m\n\n#\n# Analog/digital TV USB devices\n#\nCONFIG_VIDEO_AU0828=m\nCONFIG_VIDEO_AU0828_V4L2=y\nCONFIG_VIDEO_AU0828_RC=y\nCONFIG_VIDEO_CX231XX=m\nCONFIG_VIDEO_CX231XX_RC=y\n# CONFIG_VIDEO_CX231XX_ALSA is not set\nCONFIG_VIDEO_CX231XX_DVB=m\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_AS102=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\n# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_DVBSKY=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_DVB_USB_ZD1301=m\nCONFIG_DVB_USB=m\n# CONFIG_DVB_USB_DEBUG is not set\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_CXUSB=m\n# CONFIG_DVB_USB_CXUSB_ANALOG is not set\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_DIB3000MC=m\nCONFIG_DVB_USB_DIBUSB_MB=m\nCONFIG_DVB_USB_DIBUSB_MB_FAULTY=y\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_DTT200U=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_OPERA1=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_SMS_USB_DRV=m\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\nCONFIG_VIDEO_EM28XX=m\n# CONFIG_VIDEO_EM28XX_V4L2 is not set\n# CONFIG_VIDEO_EM28XX_ALSA is not set\nCONFIG_VIDEO_EM28XX_DVB=m\nCONFIG_VIDEO_EM28XX_RC=m\n\n#\n# Software defined radio USB devices\n#\n# CONFIG_USB_AIRSPY is not set\n# CONFIG_USB_HACKRF is not set\n# CONFIG_USB_MSI2500 is not set\n# CONFIG_RADIO_ADAPTERS is not set\nCONFIG_MEDIA_PLATFORM_DRIVERS=y\n# CONFIG_V4L_PLATFORM_DRIVERS is not set\n# CONFIG_SDR_PLATFORM_DRIVERS is not set\n# CONFIG_DVB_PLATFORM_DRIVERS is not set\nCONFIG_V4L_MEM2MEM_DRIVERS=y\nCONFIG_VIDEO_MEM2MEM_DEINTERLACE=m\n\n#\n# Allegro DVT media platform drivers\n#\n\n#\n# Amlogic media platform drivers\n#\n\n#\n# Amphion drivers\n#\n# CONFIG_VIDEO_AMPHION_VPU is not set\n\n#\n# Aspeed media platform drivers\n#\n\n#\n# Atmel media platform drivers\n#\n\n#\n# Cadence media platform drivers\n#\n# CONFIG_VIDEO_CADENCE_CSI2RX is not set\n# CONFIG_VIDEO_CADENCE_CSI2TX is not set\n\n#\n# Chips&Media media platform drivers\n#\n# CONFIG_VIDEO_CODA is not set\n\n#\n# Intel media platform drivers\n#\n\n#\n# Marvell media platform drivers\n#\n\n#\n# Mediatek media platform drivers\n#\n\n#\n# NVidia media platform drivers\n#\n\n#\n# NXP media platform drivers\n#\n# CONFIG_VIDEO_IMX_MIPI_CSIS is not set\n# CONFIG_VIDEO_IMX_PXP is not set\n# CONFIG_VIDEO_DW100 is not set\nCONFIG_VIDEO_IMX8_JPEG=m\n\n#\n# Qualcomm media platform drivers\n#\n\n#\n# Renesas media platform drivers\n#\n\n#\n# Rockchip media platform drivers\n#\n\n#\n# Samsung media platform drivers\n#\n\n#\n# STMicroelectronics media platform drivers\n#\n\n#\n# Sunxi media platform drivers\n#\n\n#\n# Texas Instruments drivers\n#\n\n#\n# Verisilicon media platform drivers\n#\nCONFIG_VIDEO_HANTRO=m\nCONFIG_VIDEO_HANTRO_IMX8M=y\n\n#\n# VIA media platform drivers\n#\n\n#\n# Xilinx media platform drivers\n#\n\n#\n# MMC/SDIO DVB adapters\n#\n# CONFIG_SMS_SDIO_DRV is not set\n# CONFIG_V4L_TEST_DRIVERS is not set\n# CONFIG_DVB_TEST_DRIVERS is not set\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_TTPCI_EEPROM=m\nCONFIG_VIDEO_CX2341X=m\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\nCONFIG_VIDEOBUF2_CORE=m\nCONFIG_VIDEOBUF2_V4L2=m\nCONFIG_VIDEOBUF2_MEMOPS=m\nCONFIG_VIDEOBUF2_DMA_CONTIG=m\nCONFIG_VIDEOBUF2_VMALLOC=m\n# end of Media drivers\n\n#\n# Media ancillary drivers\n#\nCONFIG_MEDIA_ATTACH=y\n\n#\n# IR I2C driver auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_IR_I2C=m\n\n#\n# Camera sensor devices\n#\n# CONFIG_VIDEO_AR0521 is not set\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_HI846 is not set\n# CONFIG_VIDEO_HI847 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_IMX412 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\n# CONFIG_VIDEO_MT9V011 is not set\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_OG01A1B is not set\n# CONFIG_VIDEO_OV02A10 is not set\n# CONFIG_VIDEO_OV08D10 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\n# CONFIG_VIDEO_OV2640 is not set\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5693 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV7251 is not set\n# CONFIG_VIDEO_OV7640 is not set\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9282 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n# end of Camera sensor devices\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# Audio decoders, processors and mixers\n#\n# CONFIG_VIDEO_CS3308 is not set\n# CONFIG_VIDEO_CS5345 is not set\nCONFIG_VIDEO_CS53L32A=m\nCONFIG_VIDEO_MSP3400=m\n# CONFIG_VIDEO_SONY_BTF_MPX is not set\n# CONFIG_VIDEO_TDA1997X is not set\n# CONFIG_VIDEO_TDA7432 is not set\n# CONFIG_VIDEO_TDA9840 is not set\n# CONFIG_VIDEO_TEA6415C is not set\n# CONFIG_VIDEO_TEA6420 is not set\n# CONFIG_VIDEO_TLV320AIC23B is not set\n# CONFIG_VIDEO_TVAUDIO is not set\n# CONFIG_VIDEO_UDA1342 is not set\n# CONFIG_VIDEO_VP27SMPX is not set\n# CONFIG_VIDEO_WM8739 is not set\nCONFIG_VIDEO_WM8775=m\n# end of Audio decoders, processors and mixers\n\n#\n# RDS decoders\n#\n# CONFIG_VIDEO_SAA6588 is not set\n# end of RDS decoders\n\n#\n# Video decoders\n#\n# CONFIG_VIDEO_ADV7180 is not set\n# CONFIG_VIDEO_ADV7183 is not set\n# CONFIG_VIDEO_ADV748X is not set\n# CONFIG_VIDEO_ADV7604 is not set\n# CONFIG_VIDEO_ADV7842 is not set\n# CONFIG_VIDEO_BT819 is not set\n# CONFIG_VIDEO_BT856 is not set\n# CONFIG_VIDEO_BT866 is not set\n# CONFIG_VIDEO_ISL7998X is not set\n# CONFIG_VIDEO_KS0127 is not set\n# CONFIG_VIDEO_MAX9286 is not set\n# CONFIG_VIDEO_ML86V7667 is not set\n# CONFIG_VIDEO_SAA7110 is not set\nCONFIG_VIDEO_SAA711X=m\n# CONFIG_VIDEO_TC358743 is not set\n# CONFIG_VIDEO_TVP514X is not set\n# CONFIG_VIDEO_TVP5150 is not set\n# CONFIG_VIDEO_TVP7002 is not set\n# CONFIG_VIDEO_TW2804 is not set\n# CONFIG_VIDEO_TW9903 is not set\n# CONFIG_VIDEO_TW9906 is not set\n# CONFIG_VIDEO_TW9910 is not set\n# CONFIG_VIDEO_VPX3220 is not set\n\n#\n# Video and audio decoders\n#\n# CONFIG_VIDEO_SAA717X is not set\nCONFIG_VIDEO_CX25840=m\n# end of Video decoders\n\n#\n# Video encoders\n#\n# CONFIG_VIDEO_AD9389B is not set\n# CONFIG_VIDEO_ADV7170 is not set\n# CONFIG_VIDEO_ADV7175 is not set\n# CONFIG_VIDEO_ADV7343 is not set\n# CONFIG_VIDEO_ADV7393 is not set\n# CONFIG_VIDEO_ADV7511 is not set\n# CONFIG_VIDEO_AK881X is not set\n# CONFIG_VIDEO_SAA7127 is not set\n# CONFIG_VIDEO_SAA7185 is not set\n# CONFIG_VIDEO_THS8200 is not set\n# end of Video encoders\n\n#\n# Video improvement chips\n#\n# CONFIG_VIDEO_UPD64031A is not set\n# CONFIG_VIDEO_UPD64083 is not set\n# end of Video improvement chips\n\n#\n# Audio/Video compression chips\n#\n# CONFIG_VIDEO_SAA6752HS is not set\n# end of Audio/Video compression chips\n\n#\n# SDR tuner chips\n#\n# CONFIG_SDR_MAX2175 is not set\n# end of SDR tuner chips\n\n#\n# Miscellaneous helper chips\n#\n# CONFIG_VIDEO_I2C is not set\n# CONFIG_VIDEO_M52790 is not set\n# CONFIG_VIDEO_ST_MIPID02 is not set\n# CONFIG_VIDEO_THS7303 is not set\n# end of Miscellaneous helper chips\n\n#\n# Media SPI Adapters\n#\nCONFIG_CXD2880_SPI_DRV=m\n# CONFIG_VIDEO_GS1662 is not set\n# end of Media SPI Adapters\n\nCONFIG_MEDIA_TUNER=m\n\n#\n# Customize TV tuners\n#\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_IT913X=m\n# CONFIG_MEDIA_TUNER_M88RS6000T is not set\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_MC44S803=m\n# CONFIG_MEDIA_TUNER_MSI001 is not set\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT20XX=m\n# CONFIG_MEDIA_TUNER_MT2131 is not set\nCONFIG_MEDIA_TUNER_MT2266=m\n# CONFIG_MEDIA_TUNER_MXL301RF is not set\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\n# CONFIG_MEDIA_TUNER_QM1D1B0004 is not set\nCONFIG_MEDIA_TUNER_QM1D1C0042=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_R820T=m\nCONFIG_MEDIA_TUNER_SI2157=m\nCONFIG_MEDIA_TUNER_SIMPLE=m\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_TDA18250=m\nCONFIG_MEDIA_TUNER_TDA18271=m\nCONFIG_MEDIA_TUNER_TDA827X=m\nCONFIG_MEDIA_TUNER_TDA8290=m\nCONFIG_MEDIA_TUNER_TDA9887=m\nCONFIG_MEDIA_TUNER_TEA5761=m\nCONFIG_MEDIA_TUNER_TEA5767=m\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_XC2028=m\nCONFIG_MEDIA_TUNER_XC4000=m\nCONFIG_MEDIA_TUNER_XC5000=m\n# end of Customize TV tuners\n\n#\n# Customise DVB Frontends\n#\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_M88DS3103=m\n# CONFIG_DVB_MXL5XX is not set\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\n# CONFIG_DVB_STV0910 is not set\nCONFIG_DVB_STV6110x=m\n# CONFIG_DVB_STV6111 is not set\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_MN88472=m\nCONFIG_DVB_MN88473=m\nCONFIG_DVB_SI2165=m\nCONFIG_DVB_TDA18271C2DD=m\n\n#\n# DVB-S (satellite) frontends\n#\n# CONFIG_DVB_CX24110 is not set\nCONFIG_DVB_CX24116=m\n# CONFIG_DVB_CX24117 is not set\nCONFIG_DVB_CX24120=m\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_DS3000=m\n# CONFIG_DVB_MB86A16 is not set\nCONFIG_DVB_MT312=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_TDA10071=m\nCONFIG_DVB_TDA10086=m\n# CONFIG_DVB_TDA8083 is not set\n# CONFIG_DVB_TDA8261 is not set\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_TS2020=m\n# CONFIG_DVB_TUA6100 is not set\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TUNER_ITD1000=m\n# CONFIG_DVB_VES1X93 is not set\n# CONFIG_DVB_ZL10036 is not set\nCONFIG_DVB_ZL10039=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_AS102_FE=m\n# CONFIG_DVB_CX22700 is not set\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_CXD2841ER=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\n# CONFIG_DVB_DIB9000 is not set\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_GP8PSK_FE=m\n# CONFIG_DVB_L64781 is not set\nCONFIG_DVB_MT352=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\nCONFIG_DVB_RTL2832_SDR=m\n# CONFIG_DVB_S5H1432 is not set\nCONFIG_DVB_SI2168=m\n# CONFIG_DVB_SP887X is not set\n# CONFIG_DVB_STV0367 is not set\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_ZD1301_DEMOD=m\nCONFIG_DVB_ZL10353=m\n# CONFIG_DVB_CXD2880 is not set\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_STV0297=m\n# CONFIG_DVB_TDA10021 is not set\nCONFIG_DVB_TDA10023=m\n# CONFIG_DVB_VES1820 is not set\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_AU8522=m\nCONFIG_DVB_AU8522_DTV=m\nCONFIG_DVB_AU8522_V4L=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LGDT3306A=m\nCONFIG_DVB_LGDT330X=m\nCONFIG_DVB_MXL692=m\nCONFIG_DVB_NXT200X=m\n# CONFIG_DVB_OR51132 is not set\n# CONFIG_DVB_OR51211 is not set\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_S5H1411=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\nCONFIG_DVB_S921=m\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\n# CONFIG_DVB_MN88443X is not set\nCONFIG_DVB_TC90522=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_A8293=m\nCONFIG_DVB_AF9033=m\n# CONFIG_DVB_ASCOT2E is not set\nCONFIG_DVB_ATBM8830=m\n# CONFIG_DVB_HELENE is not set\n# CONFIG_DVB_HORUS3A is not set\n# CONFIG_DVB_ISL6405 is not set\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_IX2505V=m\n# CONFIG_DVB_LGS8GL5 is not set\nCONFIG_DVB_LGS8GXX=m\n# CONFIG_DVB_LNBH25 is not set\n# CONFIG_DVB_LNBH29 is not set\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_M88RS2000=m\n# CONFIG_DVB_TDA665x is not set\nCONFIG_DVB_DRX39XYJ=m\n\n#\n# Common Interface (EN50221) controller drivers\n#\n# CONFIG_DVB_CXD2099 is not set\nCONFIG_DVB_SP2=m\n# end of Customise DVB Frontends\n\n#\n# Tools to develop new frontends\n#\n# CONFIG_DVB_DUMMY_FE is not set\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\nCONFIG_DRM=y\n# CONFIG_DRM_DEBUG_MM is not set\nCONFIG_DRM_USE_DYNAMIC_DEBUG=y\nCONFIG_DRM_KMS_HELPER=y\n# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set\n# CONFIG_DRM_DEBUG_MODESET_LOCK is not set\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\n# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\nCONFIG_DRM_DP_AUX_BUS=y\nCONFIG_DRM_DISPLAY_HELPER=y\nCONFIG_DRM_DISPLAY_DP_HELPER=y\nCONFIG_DRM_DISPLAY_HDCP_HELPER=y\nCONFIG_DRM_DISPLAY_HDMI_HELPER=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_GEM_DMA_HELPER=y\nCONFIG_DRM_SCHED=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_KOMEDA is not set\n# end of ARM devices\n\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_USE_LVDS is not set\n# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set\n# CONFIG_DRM_PANEL_ARM_VERSATILE is not set\n# CONFIG_DRM_PANEL_LVDS is not set\nCONFIG_DRM_PANEL_SIMPLE=y\nCONFIG_DRM_PANEL_EDP=y\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set\n# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LB035Q02 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set\n# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set\n# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set\n# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set\n# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set\n# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set\n# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set\n# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set\n# CONFIG_DRM_PANEL_TPO_TPG110 is not set\n# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_CHRONTEL_CH7033 is not set\n# CONFIG_DRM_DISPLAY_CONNECTOR is not set\nCONFIG_DRM_FSL_LDB=m\n# CONFIG_DRM_ITE_IT6505 is not set\n# CONFIG_DRM_LONTIUM_LT8912B is not set\n# CONFIG_DRM_LONTIUM_LT9211 is not set\n# CONFIG_DRM_LONTIUM_LT9611 is not set\n# CONFIG_DRM_LONTIUM_LT9611UXC is not set\n# CONFIG_DRM_ITE_IT66121 is not set\n# CONFIG_DRM_LVDS_CODEC is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NWL_MIPI_DSI is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_PARADE_PS8640 is not set\n# CONFIG_DRM_SIL_SII8620 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_SII9234 is not set\n# CONFIG_DRM_SIMPLE_BRIDGE is not set\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\n# CONFIG_DRM_TOSHIBA_TC358762 is not set\n# CONFIG_DRM_TOSHIBA_TC358764 is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TOSHIBA_TC358768 is not set\n# CONFIG_DRM_TOSHIBA_TC358775 is not set\n# CONFIG_DRM_TI_DLPC3433 is not set\n# CONFIG_DRM_TI_TFP410 is not set\n# CONFIG_DRM_TI_SN65DSI83 is not set\n# CONFIG_DRM_TI_SN65DSI86 is not set\n# CONFIG_DRM_TI_TPD12S015 is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_ANALOGIX_ANX7625 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_CDNS_MHDP8546 is not set\nCONFIG_DRM_CDNS_MHDP=y\nCONFIG_DRM_CDNS_HDMI=y\nCONFIG_DRM_CDNS_DP=y\nCONFIG_DRM_CDNS_AUDIO=y\nCONFIG_DRM_CDNS_HDMI_HDCP=y\nCONFIG_DRM_CDNS_HDMI_CEC=y\n# CONFIG_DRM_IMX8QM_LDB is not set\n# CONFIG_DRM_IMX8QXP_LDB is not set\n# CONFIG_DRM_IMX8QXP_PIXEL_COMBINER is not set\n# CONFIG_DRM_IMX8QXP_PIXEL_LINK is not set\n# CONFIG_DRM_IMX8QXP_PIXEL_LINK_TO_DPI is not set\n# end of Display Interface Bridges\n\nCONFIG_DRM_IMX_DCSS=y\nCONFIG_DRM_IMX_CDNS_MHDP=y\nCONFIG_DRM_ETNAVIV=y\nCONFIG_DRM_ETNAVIV_THERMAL=y\n# CONFIG_DRM_HISI_KIRIN is not set\n# CONFIG_DRM_LOGICVC is not set\n# CONFIG_DRM_MXSFB is not set\n# CONFIG_DRM_IMX_LCDIF is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_PANEL_MIPI_DBI is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_TINYDRM_HX8357D is not set\n# CONFIG_TINYDRM_ILI9163 is not set\n# CONFIG_TINYDRM_ILI9225 is not set\n# CONFIG_TINYDRM_ILI9341 is not set\n# CONFIG_TINYDRM_ILI9486 is not set\n# CONFIG_TINYDRM_MI0283QT is not set\n# CONFIG_TINYDRM_REPAPER is not set\n# CONFIG_TINYDRM_ST7586 is not set\n# CONFIG_TINYDRM_ST7735R is not set\n# CONFIG_DRM_PL111 is not set\n# CONFIG_DRM_LIMA is not set\n# CONFIG_DRM_PANFROST is not set\n# CONFIG_DRM_TIDSS is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_SSD130X is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_DRM_NOMODESET=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\nCONFIG_FB_MODE_HELPERS=y\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\nCONFIG_FB_ARMCLCD=y\n# CONFIG_FB_IMX is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\nCONFIG_FB_MX3=y\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\n# CONFIG_LCD_CLASS_DEVICE is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\n# CONFIG_BACKLIGHT_KTD253 is not set\n# CONFIG_BACKLIGHT_PWM is not set\n# CONFIG_BACKLIGHT_QCOM_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\n# CONFIG_BACKLIGHT_GPIO is not set\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n# CONFIG_BACKLIGHT_LED is not set\n# end of Backlight & LCD device support\n\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_DUMMY_CONSOLE_COLUMNS=80\nCONFIG_DUMMY_CONSOLE_ROWS=25\nCONFIG_FRAMEBUFFER_CONSOLE=y\n# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\n# end of Console display driver support\n\n# CONFIG_LOGO is not set\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\n# CONFIG_SND_HRTIMER is not set\nCONFIG_SND_DYNAMIC_MINORS=y\nCONFIG_SND_MAX_CARDS=32\n# CONFIG_SND_SUPPORT_OLD_API is not set\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_CTL_INPUT_VALIDATION is not set\n# CONFIG_SND_SEQUENCER is not set\nCONFIG_SND_DRIVERS=y\n# CONFIG_SND_DUMMY is not set\n# CONFIG_SND_ALOOP is not set\n# CONFIG_SND_MTPAV is not set\n# CONFIG_SND_SERIAL_U16550 is not set\n# CONFIG_SND_SERIAL_GENERIC is not set\n# CONFIG_SND_MPU401 is not set\n\n#\n# HD-Audio\n#\n# end of HD-Audio\n\nCONFIG_SND_HDA_PREALLOC_SIZE=2048\nCONFIG_SND_SPI=y\n# CONFIG_SND_USB is not set\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\n# CONFIG_SND_SOC_ADI is not set\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_AMD_ACP_CONFIG is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\nCONFIG_SND_SOC_FSL_SAI=y\nCONFIG_SND_SOC_FSL_MQS=y\nCONFIG_SND_SOC_FSL_AUDMIX=y\nCONFIG_SND_SOC_FSL_SSI=y\nCONFIG_SND_SOC_FSL_SPDIF=y\nCONFIG_SND_SOC_FSL_ESAI=y\n# CONFIG_SND_SOC_FSL_MICFIL is not set\nCONFIG_SND_SOC_FSL_XCVR=m\nCONFIG_SND_SOC_FSL_AUD2HTX=y\nCONFIG_SND_SOC_FSL_UTILS=y\nCONFIG_SND_SOC_IMX_PCM_DMA=y\nCONFIG_SND_SOC_IMX_AUDMUX=y\nCONFIG_SND_IMX_SOC=y\n\n#\n# SoC Audio support for Freescale i.MX boards:\n#\nCONFIG_SND_SOC_IMX_ES8328=y\nCONFIG_SND_SOC_IMX_SGTL5000=y\nCONFIG_SND_SOC_IMX_SPDIF=y\nCONFIG_SND_SOC_FSL_ASOC_CARD=y\nCONFIG_SND_SOC_IMX_AUDMIX=y\nCONFIG_SND_SOC_IMX_HDMI=y\nCONFIG_SND_SOC_IMX_CARD=y\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\nCONFIG_SND_SOC_WM_HUBS=y\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_SPI is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\n# CONFIG_SND_SOC_ADAU7002 is not set\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4375 is not set\nCONFIG_SND_SOC_AK4458=y\n# CONFIG_SND_SOC_AK4554 is not set\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\nCONFIG_SND_SOC_AK5558=y\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_AW8738 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CROS_EC_CODEC is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS35L41_SPI is not set\n# CONFIG_SND_SOC_CS35L41_I2C is not set\n# CONFIG_SND_SOC_CS35L45_SPI is not set\n# CONFIG_SND_SOC_CS35L45_I2C is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS42L83 is not set\n# CONFIG_SND_SOC_CS4234 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\n# CONFIG_SND_SOC_DA7213 is not set\n# CONFIG_SND_SOC_DMIC is not set\nCONFIG_SND_SOC_HDMI_CODEC=y\nCONFIG_SND_SOC_ES7134=y\n# CONFIG_SND_SOC_ES7241 is not set\n# CONFIG_SND_SOC_ES8316 is not set\n# CONFIG_SND_SOC_ES8326 is not set\nCONFIG_SND_SOC_ES8328=y\nCONFIG_SND_SOC_ES8328_I2C=y\nCONFIG_SND_SOC_ES8328_SPI=y\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_HDA is not set\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\n# CONFIG_SND_SOC_MAX98088 is not set\n# CONFIG_SND_SOC_MAX98357A is not set\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98520 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX98396 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM179X_SPI is not set\n# CONFIG_SND_SOC_PCM186X_I2C is not set\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3060_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\n# CONFIG_SND_SOC_PCM5102A is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK3328 is not set\n# CONFIG_SND_SOC_RK817 is not set\n# CONFIG_SND_SOC_RT5616 is not set\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\n# CONFIG_SND_SOC_RT5659 is not set\n# CONFIG_SND_SOC_RT9120 is not set\nCONFIG_SND_SOC_SGTL5000=y\n# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\nCONFIG_SND_SOC_SPDIF=y\n# CONFIG_SND_SOC_SRC4XXX_I2C is not set\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS2780 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805M is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320ADC3XXX is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\nCONFIG_SND_SOC_TLV320AIC31XX=y\n# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\nCONFIG_SND_SOC_WM8524=y\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731_I2C is not set\n# CONFIG_SND_SOC_WM8731_SPI is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8940 is not set\n# CONFIG_SND_SOC_WM8960 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\nCONFIG_SND_SOC_WM8994=y\n# CONFIG_SND_SOC_ZL38060 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8821 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\n# end of CODEC drivers\n\nCONFIG_SND_SIMPLE_CARD_UTILS=y\nCONFIG_SND_SIMPLE_CARD=y\n# CONFIG_SND_AUDIO_GRAPH_CARD is not set\n# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set\n# CONFIG_SND_TEST_COMPONENT is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\n# CONFIG_HID_APPLEIR is not set\nCONFIG_HID_ASUS=y\nCONFIG_HID_AUREAL=y\n# CONFIG_HID_BELKIN is not set\n# CONFIG_HID_BETOP_FF is not set\nCONFIG_HID_BIGBEN_FF=m\nCONFIG_HID_CHERRY=y\nCONFIG_HID_CHICONY=y\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\nCONFIG_HID_CYPRESS=y\nCONFIG_HID_DRAGONRISE=m\nCONFIG_DRAGONRISE_FF=y\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\nCONFIG_HID_EZKEY=y\n# CONFIG_HID_FT260 is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_GLORIOUS is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_GOOGLE_HAMMER is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\nCONFIG_HID_KYE=y\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_VRC2 is not set\n# CONFIG_HID_XIAOMI is not set\nCONFIG_HID_GYRATION=y\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_ITE is not set\n# CONFIG_HID_JABRA is not set\nCONFIG_HID_TWINHAN=y\nCONFIG_HID_KENSINGTON=y\n# CONFIG_HID_LCPOWER is not set\n# CONFIG_HID_LED is not set\nCONFIG_HID_LENOVO=y\n# CONFIG_HID_LETSKETCH is not set\nCONFIG_HID_LOGITECH=y\nCONFIG_HID_LOGITECH_DJ=y\nCONFIG_HID_LOGITECH_HIDPP=y\nCONFIG_LOGITECH_FF=y\nCONFIG_LOGIRUMBLEPAD2_FF=y\nCONFIG_LOGIG940_FF=y\nCONFIG_LOGIWHEELS_FF=y\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_MEGAWORLD_FF is not set\n# CONFIG_HID_REDRAGON is not set\nCONFIG_HID_MICROSOFT=y\nCONFIG_HID_MONTEREY=y\nCONFIG_HID_MULTITOUCH=m\nCONFIG_HID_NINTENDO=m\nCONFIG_NINTENDO_FF=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\nCONFIG_HID_ORTEK=y\nCONFIG_HID_OUYA=y\nCONFIG_HID_PANTHERLORD=y\nCONFIG_PANTHERLORD_FF=y\nCONFIG_HID_PENMOUNT=y\nCONFIG_HID_PETALYNX=y\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PXRC is not set\n# CONFIG_HID_RAZER is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\nCONFIG_HID_SAMSUNG=y\n# CONFIG_HID_SEMITEK is not set\n# CONFIG_HID_SIGMAMICRO is not set\nCONFIG_HID_SONY=y\nCONFIG_SONY_FF=y\n# CONFIG_HID_SPEEDLINK is not set\nCONFIG_HID_STEAM=y\n# CONFIG_HID_STEELSERIES is not set\nCONFIG_HID_SUNPLUS=y\nCONFIG_HID_RMI=y\n# CONFIG_HID_GREENASIA is not set\nCONFIG_HID_SMARTJOYPLUS=m\nCONFIG_SMARTJOYPLUS_FF=y\nCONFIG_HID_TIVO=y\nCONFIG_HID_TOPSEED=y\n# CONFIG_HID_TOPRE is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\nCONFIG_HID_WIIMOTE=m\nCONFIG_HID_XINMO=y\n# CONFIG_HID_ZEROPLUS is not set\nCONFIG_HID_ZYDACRON=y\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n# end of USB HID support\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID_OF is not set\n# CONFIG_I2C_HID_OF_ELAN is not set\n# CONFIG_I2C_HID_OF_GOODIX is not set\n# end of I2C HID support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_USB_ULPI_BUS is not set\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\nCONFIG_USB_OTG=y\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set\n# CONFIG_USB_OTG_FSM is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\nCONFIG_USB_MON=m\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\n# CONFIG_USB_XHCI_DBGCAP is not set\n# CONFIG_USB_XHCI_PCI_RENESAS is not set\nCONFIG_USB_XHCI_PLATFORM=y\nCONFIG_USB_EHCI_HCD=y\nCONFIG_USB_EHCI_ROOT_HUB_TT=y\nCONFIG_USB_EHCI_TT_NEWSCHED=y\n# CONFIG_USB_EHCI_FSL is not set\nCONFIG_USB_EHCI_HCD_PLATFORM=y\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\nCONFIG_USB_OHCI_HCD=y\nCONFIG_USB_OHCI_HCD_PLATFORM=y\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_BCMA is not set\n# CONFIG_USB_HCD_SSB is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=m\n# CONFIG_USB_PRINTER is not set\n# CONFIG_USB_WDM is not set\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\nCONFIG_USB_UAS=m\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\n# CONFIG_USB_MUSB_HDRC is not set\nCONFIG_USB_DWC3=y\n# CONFIG_USB_DWC3_HOST is not set\n# CONFIG_USB_DWC3_GADGET is not set\nCONFIG_USB_DWC3_DUAL_ROLE=y\n\n#\n# Platform Glue Driver Support\n#\nCONFIG_USB_DWC3_OF_SIMPLE=y\nCONFIG_USB_DWC3_IMX8MP=y\nCONFIG_USB_DWC2=y\n# CONFIG_USB_DWC2_HOST is not set\n\n#\n# Gadget/Dual-role mode requires USB Gadget support to be enabled\n#\n# CONFIG_USB_DWC2_PERIPHERAL is not set\nCONFIG_USB_DWC2_DUAL_ROLE=y\n# CONFIG_USB_DWC2_DEBUG is not set\n# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set\n# CONFIG_USB_CHIPIDEA is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=m\nCONFIG_USB_SERIAL_GENERIC=y\n# CONFIG_USB_SERIAL_SIMPLE is not set\n# CONFIG_USB_SERIAL_AIRCABLE is not set\n# CONFIG_USB_SERIAL_ARK3116 is not set\n# CONFIG_USB_SERIAL_BELKIN is not set\nCONFIG_USB_SERIAL_CH341=m\n# CONFIG_USB_SERIAL_WHITEHEAT is not set\n# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set\nCONFIG_USB_SERIAL_CP210X=m\n# CONFIG_USB_SERIAL_CYPRESS_M8 is not set\n# CONFIG_USB_SERIAL_EMPEG is not set\nCONFIG_USB_SERIAL_FTDI_SIO=m\n# CONFIG_USB_SERIAL_VISOR is not set\n# CONFIG_USB_SERIAL_IPAQ is not set\n# CONFIG_USB_SERIAL_IR is not set\n# CONFIG_USB_SERIAL_EDGEPORT is not set\n# CONFIG_USB_SERIAL_EDGEPORT_TI is not set\n# CONFIG_USB_SERIAL_F81232 is not set\n# CONFIG_USB_SERIAL_F8153X is not set\n# CONFIG_USB_SERIAL_GARMIN is not set\n# CONFIG_USB_SERIAL_IPW is not set\nCONFIG_USB_SERIAL_IUU=m\n# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set\n# CONFIG_USB_SERIAL_KEYSPAN is not set\n# CONFIG_USB_SERIAL_KLSI is not set\n# CONFIG_USB_SERIAL_KOBIL_SCT is not set\n# CONFIG_USB_SERIAL_MCT_U232 is not set\n# CONFIG_USB_SERIAL_METRO is not set\n# CONFIG_USB_SERIAL_MOS7720 is not set\n# CONFIG_USB_SERIAL_MOS7840 is not set\n# CONFIG_USB_SERIAL_MXUPORT is not set\n# CONFIG_USB_SERIAL_NAVMAN is not set\nCONFIG_USB_SERIAL_PL2303=m\n# CONFIG_USB_SERIAL_OTI6858 is not set\n# CONFIG_USB_SERIAL_QCAUX is not set\n# CONFIG_USB_SERIAL_QUALCOMM is not set\n# CONFIG_USB_SERIAL_SPCP8X5 is not set\n# CONFIG_USB_SERIAL_SAFE is not set\n# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set\n# CONFIG_USB_SERIAL_SYMBOL is not set\n# CONFIG_USB_SERIAL_TI is not set\n# CONFIG_USB_SERIAL_CYBERJACK is not set\n# CONFIG_USB_SERIAL_OPTION is not set\n# CONFIG_USB_SERIAL_OMNINET is not set\n# CONFIG_USB_SERIAL_OPTICON is not set\n# CONFIG_USB_SERIAL_XSENS_MT is not set\n# CONFIG_USB_SERIAL_WISHBONE is not set\n# CONFIG_USB_SERIAL_SSU100 is not set\n# CONFIG_USB_SERIAL_QT2 is not set\n# CONFIG_USB_SERIAL_UPD78F0730 is not set\n# CONFIG_USB_SERIAL_XR is not set\n# CONFIG_USB_SERIAL_DEBUG is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\n# CONFIG_USB_EZUSB_FX2 is not set\n# CONFIG_USB_HUB_USB251XB is not set\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n# CONFIG_USB_ONBOARD_HUB is not set\n\n#\n# USB Physical Layer drivers\n#\n# CONFIG_NOP_USB_XCEIV is not set\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\n# CONFIG_USB_MXS_PHY is not set\nCONFIG_USB_ULPI=y\nCONFIG_USB_ULPI_VIEWPORT=y\n# end of USB Physical Layer drivers\n\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\n# CONFIG_USB_GADGET_DEBUG_FILES is not set\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=2\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\n# CONFIG_USB_SNP_UDC_PLAT is not set\n# CONFIG_USB_M66592 is not set\n# CONFIG_USB_BDC_UDC is not set\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_GADGET_XILINX is not set\n# CONFIG_USB_MAX3420_UDC is not set\n# CONFIG_USB_DUMMY_HCD is not set\n# end of USB Peripheral Controller\n\n# CONFIG_USB_CONFIGFS is not set\n\n#\n# USB Gadget precomposed configurations\n#\n# CONFIG_USB_ZERO is not set\n# CONFIG_USB_AUDIO is not set\n# CONFIG_USB_ETH is not set\n# CONFIG_USB_G_NCM is not set\n# CONFIG_USB_GADGETFS is not set\n# CONFIG_USB_FUNCTIONFS is not set\n# CONFIG_USB_MASS_STORAGE is not set\n# CONFIG_USB_G_SERIAL is not set\n# CONFIG_USB_MIDI_GADGET is not set\n# CONFIG_USB_G_PRINTER is not set\n# CONFIG_USB_CDC_COMPOSITE is not set\n# CONFIG_USB_G_ACM_MS is not set\n# CONFIG_USB_G_MULTI is not set\n# CONFIG_USB_G_HID is not set\n# CONFIG_USB_G_DBGP is not set\n# CONFIG_USB_G_WEBCAM is not set\n# CONFIG_USB_RAW_GADGET is not set\n# end of USB Gadget precomposed configurations\n\n# CONFIG_TYPEC is not set\nCONFIG_USB_ROLE_SWITCH=y\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_DEBUG is not set\n# CONFIG_MMC_ARMMMCI is not set\nCONFIG_MMC_SDHCI=y\nCONFIG_MMC_SDHCI_IO_ACCESSORS=y\nCONFIG_MMC_SDHCI_PLTFM=y\n# CONFIG_MMC_SDHCI_OF_ARASAN is not set\n# CONFIG_MMC_SDHCI_OF_AT91 is not set\nCONFIG_MMC_SDHCI_OF_ESDHC=y\n# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set\n# CONFIG_MMC_SDHCI_CADENCE is not set\nCONFIG_MMC_SDHCI_ESDHC_IMX=y\n# CONFIG_MMC_SDHCI_F_SDH30 is not set\n# CONFIG_MMC_SDHCI_MILBEAUT is not set\n# CONFIG_MMC_MXC is not set\nCONFIG_MMC_SPI=y\n# CONFIG_MMC_DW is not set\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_CQHCI=y\n# CONFIG_MMC_HSQ is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MMC_SDHCI_XENON is not set\n# CONFIG_MMC_SDHCI_OMAP is not set\n# CONFIG_MMC_SDHCI_AM654 is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\n# CONFIG_LEDS_CLASS_FLASH is not set\n# CONFIG_LEDS_CLASS_MULTICOLOR is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AN30259A is not set\n# CONFIG_LEDS_AW2013 is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_EL15203000 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_LP55XX_COMMON is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\n# CONFIG_LEDS_PWM is not set\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\nCONFIG_LEDS_SYSCON=y\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_SPI_BYTE is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\n\n#\n# RGB LED drivers\n#\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\n# CONFIG_LEDS_TRIGGER_TIMER is not set\n# CONFIG_LEDS_TRIGGER_ONESHOT is not set\n# CONFIG_LEDS_TRIGGER_MTD is not set\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\n# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set\nCONFIG_LEDS_TRIGGER_CPU=y\n# CONFIG_LEDS_TRIGGER_ACTIVITY is not set\n# CONFIG_LEDS_TRIGGER_GPIO is not set\n# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\n# CONFIG_LEDS_TRIGGER_TRANSIENT is not set\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\n# CONFIG_LEDS_TRIGGER_PANIC is not set\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\n# CONFIG_LEDS_TRIGGER_AUDIO is not set\n# CONFIG_LEDS_TRIGGER_TTY is not set\n\n#\n# Simple LED drivers\n#\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_SUPPORT=y\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_HYM8563 is not set\n# CONFIG_RTC_DRV_MAX6900 is not set\n# CONFIG_RTC_DRV_NCT3018Y is not set\n# CONFIG_RTC_DRV_RK808 is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\n# CONFIG_RTC_DRV_PCF8563 is not set\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n# CONFIG_RTC_DRV_S5M is not set\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\nCONFIG_RTC_DRV_DS3232=y\nCONFIG_RTC_DRV_DS3232_HWMON=y\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_OPTEE is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n# CONFIG_RTC_DRV_CROS_EC is not set\n\n#\n# on-CPU RTC drivers\n#\nCONFIG_RTC_DRV_IMXDI=y\n# CONFIG_RTC_DRV_PL030 is not set\nCONFIG_RTC_DRV_PL031=y\n# CONFIG_RTC_DRV_CADENCE is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\nCONFIG_RTC_DRV_MXC=y\nCONFIG_RTC_DRV_MXC_V2=y\nCONFIG_RTC_DRV_SNVS=y\n# CONFIG_RTC_DRV_IMX_SC is not set\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_VIRTUAL_CHANNELS=m\nCONFIG_DMA_OF=y\n# CONFIG_ALTERA_MSGDMA is not set\n# CONFIG_AMBA_PL08X is not set\n# CONFIG_BCM_SBA_RAID is not set\n# CONFIG_DW_AXI_DMAC is not set\n# CONFIG_FSL_EDMA is not set\n# CONFIG_FSL_QDMA is not set\nCONFIG_IMX_DMA=m\nCONFIG_IMX_SDMA=m\n# CONFIG_INTEL_IDMA64 is not set\n# CONFIG_MV_XOR_V2 is not set\n# CONFIG_MXS_DMA is not set\nCONFIG_MX3_IPU=y\nCONFIG_MX3_IPU_IRQS=4\nCONFIG_PL330_DMA=m\n# CONFIG_XILINX_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DPDMA is not set\n# CONFIG_QCOM_HIDMA_MGMT is not set\n# CONFIG_QCOM_HIDMA is not set\nCONFIG_DW_DMAC_CORE=m\nCONFIG_DW_DMAC=m\n# CONFIG_SF_PDMA is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\n# CONFIG_UDMABUF is not set\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\nCONFIG_DMABUF_HEAPS=y\n# CONFIG_DMABUF_SYSFS_STATS is not set\nCONFIG_DMABUF_HEAPS_SYSTEM=y\nCONFIG_DMABUF_HEAPS_CMA=y\n# end of DMABUF options\n\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\n# CONFIG_VIRTIO_MENU is not set\n# CONFIG_VDPA is not set\nCONFIG_VHOST_MENU=y\n# CONFIG_VHOST_NET is not set\n# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# end of Microsoft Hyper-V guest support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_RTLLIB is not set\n# CONFIG_RTL8723BS is not set\n# CONFIG_R8712U is not set\nCONFIG_R8188EU=m\n# CONFIG_VT6656 is not set\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16240 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7816 is not set\n# end of Analog to digital converters\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n# end of Analog digital bi-direction converters\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n# end of Direct Digital Synthesis\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n# end of Network Analyzer, Impedance Converters\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7854 is not set\n# end of Active energy metering IC\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S1210 is not set\n# end of Resolver to digital converters\n# end of IIO staging drivers\n\nCONFIG_STAGING_MEDIA=y\n# CONFIG_VIDEO_IMX_MEDIA is not set\n# CONFIG_VIDEO_MAX96712 is not set\nCONFIG_STAGING_MEDIA_DEPRECATED=y\n# CONFIG_VIDEO_CPIA2 is not set\n# CONFIG_VIDEO_STKWEBCAM is not set\nCONFIG_VIDEO_TM6000=m\n# CONFIG_VIDEO_TM6000_ALSA is not set\nCONFIG_VIDEO_TM6000_DVB=m\n# CONFIG_USB_ZR364XX is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_KS7010 is not set\n# CONFIG_PI433 is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_FIELDBUS_DEV is not set\n# CONFIG_GOLDFISH is not set\nCONFIG_CHROME_PLATFORMS=y\nCONFIG_CROS_EC=y\n# CONFIG_CROS_EC_I2C is not set\n# CONFIG_CROS_EC_SPI is not set\nCONFIG_CROS_EC_PROTO=y\n# CONFIG_CROS_KBD_LED_BACKLIGHT is not set\nCONFIG_CROS_EC_CHARDEV=y\nCONFIG_CROS_EC_LIGHTBAR=y\nCONFIG_CROS_EC_VBC=y\nCONFIG_CROS_EC_DEBUGFS=y\nCONFIG_CROS_EC_SENSORHUB=y\nCONFIG_CROS_EC_SYSFS=y\nCONFIG_CROS_USBPD_NOTIFY=y\n# CONFIG_MELLANOX_PLATFORM is not set\n# CONFIG_SURFACE_PLATFORMS is not set\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Clock driver for ARM Reference designs\n#\n# CONFIG_CLK_ICST is not set\n# CONFIG_CLK_SP810 is not set\n# end of Clock driver for ARM Reference designs\n\n# CONFIG_LMK04832 is not set\n# CONFIG_COMMON_CLK_MAX9485 is not set\n# CONFIG_COMMON_CLK_RK808 is not set\n# CONFIG_COMMON_CLK_SCPI is not set\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\n# CONFIG_COMMON_CLK_S2MPS11 is not set\n# CONFIG_COMMON_CLK_AXI_CLKGEN is not set\n# CONFIG_COMMON_CLK_XGENE is not set\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_RS9_PCIE is not set\n# CONFIG_COMMON_CLK_VC5 is not set\n# CONFIG_COMMON_CLK_VC7 is not set\n# CONFIG_COMMON_CLK_BD718XX is not set\n# CONFIG_COMMON_CLK_FIXED_MMIO is not set\nCONFIG_MXC_CLK=y\nCONFIG_MXC_CLK_SCU=y\nCONFIG_CLK_IMX8MM=y\n# CONFIG_CLK_IMX8MN is not set\n# CONFIG_CLK_IMX8MP is not set\nCONFIG_CLK_IMX8MQ=y\nCONFIG_CLK_IMX8QXP=y\n# CONFIG_CLK_IMX8ULP is not set\n# CONFIG_CLK_IMX93 is not set\n# CONFIG_XILINX_VCU is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\n# CONFIG_HWSPINLOCK is not set\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y\nCONFIG_FSL_ERRATUM_A008585=y\n# CONFIG_HISILICON_ERRATUM_161010101 is not set\n# CONFIG_ARM64_ERRATUM_858921 is not set\nCONFIG_TIMER_IMX_SYS_CTR=y\n# CONFIG_MICROCHIP_PIT64B is not set\n# end of Clock Source drivers\n\nCONFIG_MAILBOX=y\nCONFIG_ARM_MHU=y\n# CONFIG_ARM_MHU_V2 is not set\nCONFIG_IMX_MBOX=y\nCONFIG_PLATFORM_MHU=y\n# CONFIG_PL320_MBOX is not set\n# CONFIG_ALTERA_MBOX is not set\n# CONFIG_MAILBOX_TEST is not set\nCONFIG_IOMMU_IOVA=y\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\nCONFIG_IOMMU_IO_PGTABLE=y\nCONFIG_IOMMU_IO_PGTABLE_LPAE=y\n# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set\n# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set\n# CONFIG_IOMMU_IO_PGTABLE_DART is not set\n# end of Generic IOMMU Pagetable Support\n\n# CONFIG_IOMMU_DEBUGFS is not set\nCONFIG_IOMMU_DEFAULT_DMA_STRICT=y\n# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set\n# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set\nCONFIG_OF_IOMMU=y\nCONFIG_IOMMU_DMA=y\n# CONFIG_ARM_SMMU is not set\n# CONFIG_ARM_SMMU_V3 is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\n# CONFIG_RPMSG_QCOM_GLINK_RPM is not set\n# CONFIG_RPMSG_VIRTIO is not set\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\n# CONFIG_SOC_BRCMSTB is not set\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# CONFIG_QUICC_ENGINE is not set\nCONFIG_FSL_GUTS=y\n# CONFIG_FSL_RCPM is not set\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# fujitsu SoC drivers\n#\n# end of fujitsu SoC drivers\n\n#\n# i.MX SoC drivers\n#\nCONFIG_IMX_GPCV2_PM_DOMAINS=y\nCONFIG_SOC_IMX8M=y\n# CONFIG_SOC_IMX9 is not set\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# CONFIG_LITEX_SOC_CONTROLLER is not set\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# end of Qualcomm SoC drivers\n\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=m\nCONFIG_DEVFREQ_GOV_PERFORMANCE=m\nCONFIG_DEVFREQ_GOV_POWERSAVE=m\n# CONFIG_DEVFREQ_GOV_USERSPACE is not set\n# CONFIG_DEVFREQ_GOV_PASSIVE is not set\n\n#\n# DEVFREQ Drivers\n#\n# CONFIG_ARM_IMX_BUS_DEVFREQ is not set\n# CONFIG_ARM_IMX8M_DDRC_DEVFREQ is not set\n# CONFIG_PM_DEVFREQ_EVENT is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_FSA9480 is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_PTN5150 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\nCONFIG_EXTCON_USB_GPIO=y\n# CONFIG_EXTCON_USBC_CROS_EC is not set\n# CONFIG_MEMORY is not set\nCONFIG_IIO=y\n# CONFIG_IIO_BUFFER is not set\n# CONFIG_IIO_CONFIGFS is not set\n# CONFIG_IIO_TRIGGER is not set\n# CONFIG_IIO_SW_DEVICE is not set\n# CONFIG_IIO_SW_TRIGGER is not set\n# CONFIG_IIO_TRIGGERED_EVENT is not set\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADXL313_I2C is not set\n# CONFIG_ADXL313_SPI is not set\n# CONFIG_ADXL345_I2C is not set\n# CONFIG_ADXL345_SPI is not set\n# CONFIG_ADXL355_I2C is not set\n# CONFIG_ADXL355_SPI is not set\n# CONFIG_ADXL367_SPI is not set\n# CONFIG_ADXL367_I2C is not set\n# CONFIG_ADXL372_SPI is not set\n# CONFIG_ADXL372_I2C is not set\n# CONFIG_BMA180 is not set\n# CONFIG_BMA220 is not set\n# CONFIG_BMA400 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_BMI088_ACCEL is not set\n# CONFIG_DA280 is not set\n# CONFIG_DA311 is not set\n# CONFIG_DMARD06 is not set\n# CONFIG_DMARD09 is not set\n# CONFIG_DMARD10 is not set\n# CONFIG_FXLS8962AF_I2C is not set\n# CONFIG_FXLS8962AF_SPI is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MC3230 is not set\n# CONFIG_MMA7455_I2C is not set\n# CONFIG_MMA7455_SPI is not set\n# CONFIG_MMA7660 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MSA311 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_MXC6255 is not set\n# CONFIG_SCA3000 is not set\n# CONFIG_SCA3300 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7091R5 is not set\n# CONFIG_AD7124 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7266 is not set\n# CONFIG_AD7280 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7292 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7606_IFACE_PARALLEL is not set\n# CONFIG_AD7606_IFACE_SPI is not set\n# CONFIG_AD7766 is not set\n# CONFIG_AD7768_1 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD7949 is not set\n# CONFIG_AD799X is not set\n# CONFIG_ADI_AXI_ADC is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_ENVELOPE_DETECTOR is not set\n# CONFIG_HI8435 is not set\n# CONFIG_HX711 is not set\n# CONFIG_INA2XX_ADC is not set\n# CONFIG_IMX7D_ADC is not set\n# CONFIG_IMX8QXP_ADC is not set\n# CONFIG_LTC2471 is not set\n# CONFIG_LTC2485 is not set\n# CONFIG_LTC2496 is not set\n# CONFIG_LTC2497 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX11100 is not set\n# CONFIG_MAX1118 is not set\n# CONFIG_MAX11205 is not set\n# CONFIG_MAX1241 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MAX9611 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_MCP3911 is not set\n# CONFIG_NAU7802 is not set\n# CONFIG_RICHTEK_RTQ6056 is not set\n# CONFIG_SD_ADC_MODULATOR is not set\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC0832 is not set\n# CONFIG_TI_ADC084S021 is not set\n# CONFIG_TI_ADC12138 is not set\n# CONFIG_TI_ADC108S102 is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_TI_ADC161S626 is not set\n# CONFIG_TI_ADS1015 is not set\n# CONFIG_TI_ADS7950 is not set\n# CONFIG_TI_ADS8344 is not set\n# CONFIG_TI_ADS8688 is not set\n# CONFIG_TI_ADS124S08 is not set\n# CONFIG_TI_ADS131E08 is not set\n# CONFIG_TI_TLC4541 is not set\n# CONFIG_TI_TSC2046 is not set\n# CONFIG_VF610_ADC is not set\n# CONFIG_XILINX_XADC is not set\n# end of Analog to digital converters\n\n#\n# Analog to digital and digital to analog converters\n#\n# CONFIG_AD74413R is not set\n# end of Analog to digital and digital to analog converters\n\n#\n# Analog Front Ends\n#\n# CONFIG_IIO_RESCALE is not set\n# end of Analog Front Ends\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n# CONFIG_ADA4250 is not set\n# CONFIG_HMC425 is not set\n# end of Amplifiers\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7746 is not set\n# end of Capacitance to digital converters\n\n#\n# Chemical Sensors\n#\n# CONFIG_ATLAS_PH_SENSOR is not set\n# CONFIG_ATLAS_EZO_SENSOR is not set\n# CONFIG_BME680 is not set\n# CONFIG_CCS811 is not set\n# CONFIG_IAQCORE is not set\n# CONFIG_PMS7003 is not set\n# CONFIG_SCD30_CORE is not set\n# CONFIG_SCD4X is not set\n# CONFIG_SENSIRION_SGP30 is not set\n# CONFIG_SENSIRION_SGP40 is not set\n# CONFIG_SPS30_I2C is not set\n# CONFIG_SPS30_SERIAL is not set\n# CONFIG_SENSEAIR_SUNRISE_CO2 is not set\n# CONFIG_VZ89X is not set\n# end of Chemical Sensors\n\n# CONFIG_IIO_CROS_EC_SENSORS_CORE is not set\n\n#\n# Hid Sensor IIO Common\n#\n# end of Hid Sensor IIO Common\n\n#\n# IIO SCMI Sensors\n#\n# end of IIO SCMI Sensors\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n# end of SSP Sensor Common\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD3552R is not set\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5592R is not set\n# CONFIG_AD5593R is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_LTC2688 is not set\n# CONFIG_AD5686_SPI is not set\n# CONFIG_AD5696_I2C is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5758 is not set\n# CONFIG_AD5761 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5766 is not set\n# CONFIG_AD5770R is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7293 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_AD8801 is not set\n# CONFIG_DPOT_DAC is not set\n# CONFIG_DS4424 is not set\n# CONFIG_LTC1660 is not set\n# CONFIG_LTC2632 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n# CONFIG_TI_DAC082S085 is not set\n# CONFIG_TI_DAC5571 is not set\n# CONFIG_TI_DAC7311 is not set\n# CONFIG_TI_DAC7612 is not set\n# CONFIG_VF610_DAC is not set\n# end of Digital to analog converters\n\n#\n# IIO dummy driver\n#\n# end of IIO dummy driver\n\n#\n# Filters\n#\n# CONFIG_ADMV8818 is not set\n# end of Filters\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n# end of Clock Generator/Distribution\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n# CONFIG_ADF4371 is not set\n# CONFIG_ADMV1013 is not set\n# CONFIG_ADMV1014 is not set\n# CONFIG_ADMV4420 is not set\n# CONFIG_ADRF6780 is not set\n# end of Phase-Locked Loop (PLL) frequency synthesizers\n# end of Frequency Synthesizers DDS/PLL\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS290 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_FXAS21002C is not set\n# CONFIG_MPU3050_I2C is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n# end of Digital gyroscope sensors\n\n#\n# Health Sensors\n#\n\n#\n# Heart Rate Monitors\n#\n# CONFIG_AFE4403 is not set\n# CONFIG_AFE4404 is not set\n# CONFIG_MAX30100 is not set\n# CONFIG_MAX30102 is not set\n# end of Heart Rate Monitors\n# end of Health Sensors\n\n#\n# Humidity sensors\n#\n# CONFIG_AM2315 is not set\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HDC2010 is not set\n# CONFIG_HTS221 is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n# end of Humidity sensors\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16460 is not set\n# CONFIG_ADIS16475 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_BMI160_I2C is not set\n# CONFIG_BMI160_SPI is not set\n# CONFIG_BOSCH_BNO055_SERIAL is not set\n# CONFIG_BOSCH_BNO055_I2C is not set\n# CONFIG_FXOS8700_I2C is not set\n# CONFIG_FXOS8700_SPI is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_ICM42600_I2C is not set\n# CONFIG_INV_ICM42600_SPI is not set\n# CONFIG_INV_MPU6050_I2C is not set\n# CONFIG_INV_MPU6050_SPI is not set\n# CONFIG_IIO_ST_LSM6DSX is not set\n# CONFIG_IIO_ST_LSM9DS0 is not set\n# end of Inertial measurement units\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_ADUX1020 is not set\n# CONFIG_AL3010 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_AS73211 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_BH1780 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM3605 is not set\n# CONFIG_CM36651 is not set\n# CONFIG_GP2AP002 is not set\n# CONFIG_GP2AP020A00F is not set\n# CONFIG_SENSORS_ISL29018 is not set\n# CONFIG_SENSORS_ISL29028 is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_LTRF216A is not set\n# CONFIG_LV0104CS is not set\n# CONFIG_MAX44000 is not set\n# CONFIG_MAX44009 is not set\n# CONFIG_NOA1305 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_SI1133 is not set\n# CONFIG_SI1145 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_ST_UVIS25 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\n# CONFIG_SENSORS_TSL2563 is not set\n# CONFIG_TSL2583 is not set\n# CONFIG_TSL2591 is not set\n# CONFIG_TSL2772 is not set\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VCNL4035 is not set\n# CONFIG_VEML6030 is not set\n# CONFIG_VEML6070 is not set\n# CONFIG_VL6180 is not set\n# CONFIG_ZOPT2201 is not set\n# end of Light sensors\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8974 is not set\n# CONFIG_AK8975 is not set\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN_I2C is not set\n# CONFIG_BMC150_MAGN_SPI is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n# CONFIG_SENSORS_RM3100_I2C is not set\n# CONFIG_SENSORS_RM3100_SPI is not set\n# CONFIG_YAMAHA_YAS530 is not set\n# end of Magnetometer sensors\n\n#\n# Multiplexers\n#\n# CONFIG_IIO_MUX is not set\n# end of Multiplexers\n\n#\n# Inclinometer sensors\n#\n# end of Inclinometer sensors\n\n#\n# Linear and angular position sensors\n#\n# end of Linear and angular position sensors\n\n#\n# Digital potentiometers\n#\n# CONFIG_AD5110 is not set\n# CONFIG_AD5272 is not set\n# CONFIG_DS1803 is not set\n# CONFIG_MAX5432 is not set\n# CONFIG_MAX5481 is not set\n# CONFIG_MAX5487 is not set\n# CONFIG_MCP4018 is not set\n# CONFIG_MCP4131 is not set\n# CONFIG_MCP4531 is not set\n# CONFIG_MCP41010 is not set\n# CONFIG_TPL0102 is not set\n# end of Digital potentiometers\n\n#\n# Digital potentiostats\n#\n# CONFIG_LMP91000 is not set\n# end of Digital potentiostats\n\n#\n# Pressure sensors\n#\n# CONFIG_ABP060MG is not set\n# CONFIG_BMP280 is not set\n# CONFIG_DLHL60D is not set\n# CONFIG_DPS310 is not set\n# CONFIG_HP03 is not set\n# CONFIG_ICP10100 is not set\n# CONFIG_MPL115_I2C is not set\n# CONFIG_MPL115_SPI is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n# CONFIG_HP206C is not set\n# CONFIG_ZPA2326 is not set\n# end of Pressure sensors\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n# end of Lightning sensors\n\n#\n# Proximity and distance sensors\n#\n# CONFIG_CROS_EC_MKBP_PROXIMITY is not set\n# CONFIG_ISL29501 is not set\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_MB1232 is not set\n# CONFIG_PING is not set\n# CONFIG_RFD77402 is not set\n# CONFIG_SRF04 is not set\n# CONFIG_SX9310 is not set\n# CONFIG_SX9324 is not set\n# CONFIG_SX9360 is not set\n# CONFIG_SX9500 is not set\n# CONFIG_SRF08 is not set\n# CONFIG_VCNL3020 is not set\n# CONFIG_VL53L0X_I2C is not set\n# end of Proximity and distance sensors\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1200 is not set\n# end of Resolver to digital converters\n\n#\n# Temperature sensors\n#\n# CONFIG_LTC2983 is not set\n# CONFIG_MAXIM_THERMOCOUPLE is not set\n# CONFIG_MLX90614 is not set\n# CONFIG_MLX90632 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TMP007 is not set\n# CONFIG_TMP117 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\n# CONFIG_MAX31856 is not set\n# CONFIG_MAX31865 is not set\n# end of Temperature sensors\n\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_DEBUG is not set\n# CONFIG_PWM_ATMEL_TCB is not set\n# CONFIG_PWM_CLK is not set\n# CONFIG_PWM_CROS_EC is not set\n# CONFIG_PWM_FSL_FTM is not set\n# CONFIG_PWM_IMX1 is not set\n# CONFIG_PWM_IMX27 is not set\n# CONFIG_PWM_IMX_TPM is not set\n# CONFIG_PWM_PCA9685 is not set\n# CONFIG_PWM_XILINX is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\nCONFIG_ARM_GIC_V3=y\nCONFIG_ARM_GIC_V3_ITS=y\n# CONFIG_AL_FIC is not set\n# CONFIG_XILINX_INTC is not set\nCONFIG_IMX_GPCV2=y\nCONFIG_PARTITION_PERCPU=y\nCONFIG_IMX_IRQSTEER=y\nCONFIG_IMX_INTMUX=y\n# CONFIG_IMX_MU_MSI is not set\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\nCONFIG_RESET_CONTROLLER=y\nCONFIG_RESET_IMX7=y\n# CONFIG_RESET_SIMPLE is not set\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_RESET_TI_TPS380X is not set\n\n#\n# PHY Subsystem\n#\nCONFIG_GENERIC_PHY=y\n# CONFIG_PHY_XGENE is not set\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\n\n#\n# PHY drivers for Broadcom platforms\n#\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# end of PHY drivers for Broadcom platforms\n\n# CONFIG_PHY_CADENCE_TORRENT is not set\n# CONFIG_PHY_CADENCE_DPHY is not set\n# CONFIG_PHY_CADENCE_DPHY_RX is not set\n# CONFIG_PHY_CADENCE_SIERRA is not set\n# CONFIG_PHY_CADENCE_SALVO is not set\nCONFIG_PHY_FSL_IMX8MQ_USB=y\n# CONFIG_PHY_MIXEL_LVDS_PHY is not set\n# CONFIG_PHY_MIXEL_MIPI_DPHY is not set\nCONFIG_PHY_FSL_IMX8M_PCIE=y\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_LAN966X_SERDES is not set\n# CONFIG_PHY_CPCAP_USB is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\n# CONFIG_PHY_OCELOT_SERDES is not set\n# CONFIG_PHY_SAMSUNG_USB2 is not set\n# end of PHY Subsystem\n\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\n# CONFIG_ARM_CMN is not set\nCONFIG_ARM_PMU=y\n# CONFIG_ARM_DSU_PMU is not set\nCONFIG_FSL_IMX8_DDR_PMU=y\n# CONFIG_ARM_SPE_PMU is not set\n# end of Performance monitor support\n\n# CONFIG_RAS is not set\n\n#\n# Android\n#\n# CONFIG_ANDROID_BINDER_IPC is not set\n# end of Android\n\n# CONFIG_LIBNVDIMM is not set\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\n# CONFIG_NVMEM_IMX_IIM is not set\nCONFIG_NVMEM_IMX_OCOTP=y\n# CONFIG_NVMEM_IMX_OCOTP_SCU is not set\n# CONFIG_NVMEM_RMEM is not set\n# CONFIG_NVMEM_SNVS_LPGPR is not set\nCONFIG_NVMEM_U_BOOT_ENV=m\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\nCONFIG_TEE=y\nCONFIG_OPTEE=y\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\n# CONFIG_PECI is not set\n# CONFIG_HTE is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_VALIDATE_FS_PARSER=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\nCONFIG_XFS_SUPPORT_V4=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\nCONFIG_F2FS_FS=m\nCONFIG_F2FS_STAT_FS=y\n# CONFIG_F2FS_FS_XATTR is not set\nCONFIG_F2FS_CHECK_FS=y\n# CONFIG_F2FS_FAULT_INJECTION is not set\n# CONFIG_F2FS_FS_COMPRESSION is not set\nCONFIG_F2FS_IOSTAT=y\n# CONFIG_F2FS_UNFAIR_RWSEM is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\n# CONFIG_QUOTA is not set\nCONFIG_AUTOFS4_FS=y\nCONFIG_AUTOFS_FS=y\nCONFIG_FUSE_FS=m\n# CONFIG_CUSE is not set\n# CONFIG_VIRTIO_FS is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_XINO_AUTO is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n\n#\n# Caches\n#\nCONFIG_NETFS_SUPPORT=y\n# CONFIG_NETFS_STATS is not set\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_CACHEFILES is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=m\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=m\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=m\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=m\n# CONFIG_NTFS3_64BIT_CLUSTER is not set\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\n# CONFIG_PROC_KCORE is not set\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_TMPFS_INODE64 is not set\nCONFIG_ARCH_SUPPORTS_HUGETLBFS=y\n# CONFIG_HUGETLBFS is not set\nCONFIG_ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP=y\nCONFIG_MEMFD_CREATE=y\nCONFIG_ARCH_HAS_GIGANTIC_PAGE=y\nCONFIG_CONFIGFS_FS=y\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\nCONFIG_HFS_FS=m\nCONFIG_HFSPLUS_FS=m\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_JFFS2_FS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\n# CONFIG_SQUASHFS_FILE_CACHE is not set\nCONFIG_SQUASHFS_FILE_DIRECT=y\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\n# CONFIG_PSTORE is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EROFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\n# CONFIG_NFS_SWAP is not set\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\nCONFIG_NFS_V4_1_MIGRATION=y\nCONFIG_ROOT_NFS=y\nCONFIG_NFS_FSCACHE=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFS_DISABLE_UDP_SUPPORT=y\n# CONFIG_NFS_V4_2_READ_PLUS is not set\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_COMMON=y\nCONFIG_NFS_V4_2_SSC_HELPER=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\nCONFIG_RPCSEC_GSS_KRB5=m\n# CONFIG_SUNRPC_DISABLE_INSECURE_ENCTYPES is not set\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\n# CONFIG_CIFS is not set\n# CONFIG_SMB_SERVER is not set\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_KEYS_REQUEST_CACHE is not set\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\nCONFIG_KEY_DH_OPERATIONS=y\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY is not set\n# CONFIG_SECURITYFS is not set\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_LSM=\"yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_GCC_PLUGIN_STACKLEAK is not set\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n\nCONFIG_RANDSTRUCT_NONE=y\n# CONFIG_RANDSTRUCT_FULL is not set\n# CONFIG_RANDSTRUCT_PERFORMANCE is not set\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\nCONFIG_CRYPTO_PCRYPT=y\nCONFIG_CRYPTO_CRYPTD=y\nCONFIG_CRYPTO_AUTHENC=y\n# CONFIG_CRYPTO_TEST is not set\n# end of Crypto core or helper\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_DH=y\n# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set\nCONFIG_CRYPTO_ECC=y\nCONFIG_CRYPTO_ECDH=y\n# CONFIG_CRYPTO_ECDSA is not set\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\n# CONFIG_CRYPTO_CURVE25519 is not set\n# end of Public-key cryptography\n\n#\n# Block ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\n# CONFIG_CRYPTO_ARIA is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\nCONFIG_CRYPTO_SM4=y\n# CONFIG_CRYPTO_SM4_GENERIC is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n# end of Block ciphers\n\n#\n# Length-preserving ciphers and modes\n#\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_ARC4 is not set\nCONFIG_CRYPTO_CHACHA20=y\nCONFIG_CRYPTO_CBC=y\nCONFIG_CRYPTO_CFB=y\nCONFIG_CRYPTO_CTR=y\nCONFIG_CRYPTO_CTS=y\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_HCTR2 is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_OFB is not set\n# CONFIG_CRYPTO_PCBC is not set\n# CONFIG_CRYPTO_XTS is not set\n# end of Length-preserving ciphers and modes\n\n#\n# AEAD (authenticated encryption with associated data) ciphers\n#\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\n# CONFIG_CRYPTO_ESSIV is not set\n# end of AEAD (authenticated encryption with associated data) ciphers\n\n#\n# Hashes, digests, and MACs\n#\nCONFIG_CRYPTO_BLAKE2B=m\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\n# CONFIG_CRYPTO_POLY1305 is not set\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\nCONFIG_CRYPTO_SM3=y\n# CONFIG_CRYPTO_SM3_GENERIC is not set\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_VMAC is not set\n# CONFIG_CRYPTO_WP512 is not set\n# CONFIG_CRYPTO_XCBC is not set\nCONFIG_CRYPTO_XXHASH=m\n# end of Hashes, digests, and MACs\n\n#\n# CRCs (cyclic redundancy checks)\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=y\nCONFIG_CRYPTO_CRCT10DIF=y\n# end of CRCs (cyclic redundancy checks)\n\n#\n# Compression\n#\n# CONFIG_CRYPTO_DEFLATE is not set\n# CONFIG_CRYPTO_LZO is not set\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n# end of Compression\n\n#\n# Random number generation\n#\nCONFIG_CRYPTO_ANSI_CPRNG=y\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_KDF800108_CTR=y\n# end of Random number generation\n\n#\n# Userspace interface\n#\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\n# CONFIG_CRYPTO_USER_API_AEAD is not set\nCONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y\n# end of Userspace interface\n\nCONFIG_CRYPTO_HASH_INFO=y\n# CONFIG_CRYPTO_NHPOLY1305_NEON is not set\nCONFIG_CRYPTO_CHACHA20_NEON=y\n\n#\n# Accelerated Cryptographic Algorithms for CPU (arm64)\n#\nCONFIG_CRYPTO_GHASH_ARM64_CE=y\nCONFIG_CRYPTO_POLY1305_NEON=y\nCONFIG_CRYPTO_SHA1_ARM64_CE=y\nCONFIG_CRYPTO_SHA256_ARM64=y\nCONFIG_CRYPTO_SHA2_ARM64_CE=y\nCONFIG_CRYPTO_SHA512_ARM64=y\nCONFIG_CRYPTO_SHA512_ARM64_CE=m\n# CONFIG_CRYPTO_SHA3_ARM64 is not set\nCONFIG_CRYPTO_SM3_NEON=y\n# CONFIG_CRYPTO_SM3_ARM64_CE is not set\n# CONFIG_CRYPTO_POLYVAL_ARM64_CE is not set\nCONFIG_CRYPTO_AES_ARM64=y\nCONFIG_CRYPTO_AES_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64_CE_BLK=y\nCONFIG_CRYPTO_AES_ARM64_NEON_BLK=y\nCONFIG_CRYPTO_AES_ARM64_BS=y\n# CONFIG_CRYPTO_SM4_ARM64_CE is not set\nCONFIG_CRYPTO_SM4_ARM64_CE_BLK=y\nCONFIG_CRYPTO_SM4_ARM64_NEON_BLK=y\nCONFIG_CRYPTO_AES_ARM64_CE_CCM=y\n# end of Accelerated Cryptographic Algorithms for CPU (arm64)\n\nCONFIG_CRYPTO_HW=y\n# CONFIG_CRYPTO_DEV_FSL_CAAM is not set\n# CONFIG_CRYPTO_DEV_SAHARA is not set\n# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set\n# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set\n# CONFIG_CRYPTO_DEV_CCP is not set\n# CONFIG_CRYPTO_DEV_MXS_DCP is not set\n# CONFIG_CRYPTO_DEV_SAFEXCEL is not set\n# CONFIG_CRYPTO_DEV_CCREE is not set\n# CONFIG_CRYPTO_DEV_HISI_SEC is not set\n# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n# CONFIG_FIPS_SIGNATURE_SELFTEST is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\n# CONFIG_RAID6_PQ_BENCHMARK is not set\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_CORDIC=m\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_ARCH_HAS_FAST_MULTIPLIER=y\nCONFIG_ARCH_USE_SYM_ANNOTATIONS=y\n# CONFIG_INDIRECT_PIO is not set\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_UTILS=y\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=m\nCONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CHACHA_GENERIC=y\nCONFIG_CRYPTO_LIB_CHACHA=m\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=m\nCONFIG_CRYPTO_LIB_CURVE25519=m\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_POLY1305=m\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=m\nCONFIG_CRYPTO_LIB_SHA1=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_CRC_CCITT=m\nCONFIG_CRC16=y\n# CONFIG_CRC_T10DIF is not set\n# CONFIG_CRC64_ROCKSOFT is not set\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC64 is not set\n# CONFIG_CRC4 is not set\nCONFIG_CRC7=y\nCONFIG_LIBCRC32C=m\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=y\nCONFIG_AUDIT_ARCH_COMPAT_GENERIC=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=m\nCONFIG_LZO_COMPRESS=m\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMMON=y\nCONFIG_ZSTD_COMPRESS=m\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\n# CONFIG_XZ_DEC_X86 is not set\n# CONFIG_XZ_DEC_POWERPC is not set\n# CONFIG_XZ_DEC_IA64 is not set\n# CONFIG_XZ_DEC_ARM is not set\n# CONFIG_XZ_DEC_ARMTHUMB is not set\n# CONFIG_XZ_DEC_SPARC is not set\n# CONFIG_XZ_DEC_MICROLZMA is not set\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_DMA=y\nCONFIG_DMA_OPS=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_DMA_DECLARE_COHERENT=y\nCONFIG_ARCH_HAS_SETUP_DMA_OPS=y\nCONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y\nCONFIG_ARCH_HAS_DMA_PREP_COHERENT=y\nCONFIG_SWIOTLB=y\n# CONFIG_DMA_RESTRICTED_POOL is not set\nCONFIG_DMA_NONCOHERENT_MMAP=y\nCONFIG_DMA_COHERENT_POOL=y\nCONFIG_DMA_DIRECT_REMAP=y\nCONFIG_DMA_CMA=y\n# CONFIG_DMA_PERNUMA_CMA is not set\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=256\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\n# CONFIG_FORCE_NR_CPUS is not set\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_GENERIC_VDSO_TIME_NS=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\nCONFIG_SG_POOL=y\nCONFIG_ARCH_STACKWALK=y\nCONFIG_STACKDEPOT=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_GENERIC_IOREMAP=y\nCONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\n# CONFIG_STACKTRACE_BUILD_ID is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\nCONFIG_DYNAMIC_DEBUG_CORE=y\nCONFIG_SYMBOLIC_ERRNAME=y\n# CONFIG_DEBUG_BUGVERBOSE is not set\n# end of printk and dmesg options\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_AS_HAS_NON_CONST_LEB128=y\nCONFIG_DEBUG_INFO_NONE=y\n# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\nCONFIG_FRAME_WARN=2048\nCONFIG_STRIP_ASM_SYMS=y\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\n# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B is not set\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_VMLINUX_MAP is not set\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=\"\"\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\nCONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_ARCH_KCSAN=y\nCONFIG_HAVE_KCSAN_COMPILER=y\n# CONFIG_KCSAN is not set\n# end of Generic Kernel Debugging Instruments\n\n#\n# Networking Debugging\n#\n# CONFIG_NET_DEV_REFCNT_TRACKER is not set\n# CONFIG_NET_NS_REFCNT_TRACKER is not set\n# CONFIG_DEBUG_NET is not set\n# end of Networking Debugging\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_TABLE_CHECK is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\nCONFIG_ARCH_HAS_DEBUG_WX=y\n# CONFIG_DEBUG_WX is not set\nCONFIG_GENERIC_PTDUMP=y\n# CONFIG_PTDUMP_DEBUGFS is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SHRINKER_DEBUG is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\nCONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y\n# CONFIG_DEBUG_VM is not set\n# CONFIG_DEBUG_VM_PGTABLE is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\n# CONFIG_DEBUG_MEMORY_INIT is not set\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_SW_TAGS=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_KASAN_SW_TAGS=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\n# CONFIG_SOFTLOCKUP_DETECTOR is not set\nCONFIG_DETECT_HUNG_TASK=y\nCONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120\n# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\n# CONFIG_SCHED_DEBUG is not set\n# CONFIG_SCHEDSTATS is not set\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_RWSEMS is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# CONFIG_CSD_LOCK_WAIT_DEBUG is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_DEBUG_MAPLE_TREE is not set\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\nCONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACING_SUPPORT=y\n# CONFIG_FTRACE is not set\n# CONFIG_SAMPLES is not set\n# CONFIG_STRICT_DEVMEM is not set\n\n#\n# arm64 Debugging\n#\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_ARM64_RELOC_TEST is not set\n# CONFIG_CORESIGHT is not set\n# end of arm64 Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\n# CONFIG_RUNTIME_TESTING_MENU is not set\nCONFIG_ARCH_USE_MEMTEST=y\n# CONFIG_MEMTEST is not set\n# end of Kernel Testing and Coverage\n\n#\n# Rust hacking\n#\n# end of Rust hacking\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/options",
    "content": "################################################################################\n# setup device defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc+fp+simd\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_FLOAT=hard\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"neon-fp-armv8\"\n        ;;\n    esac\n\n  # Kernel target\n    KERNEL_TARGET=\"Image\"\n\n  # kernel serial console\n    EXTRA_CMDLINE=\"console=ttymxc0,115200 console=tty0\"\n\n  # debug tty path\n    DEBUG_TTY=\"/dev/ttymxc0\"\n\n  # ATF platform\n    ATF_PLATFORM=\"imx8mq\"\n\n  # uboot firmware\n    UBOOT_FIRMWARE=\"atf firmware-imx\"\n\n  # uboot target\n    UBOOT_TARGET=\"flash.bin\"\n\n  # Set the addon project\n    ADDON_PROJECT=\"ARMv8\"\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0001-drm-bridge-mhdp-Add-cdns-mhdp-driver-bridge-driver.patch",
    "content": "From c50c4f565797ac47544e1f0a2669d9cf1cb9d1c7 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Mon, 20 Apr 2020 23:01:50 +0800\nSubject: [PATCH 01/49] drm: bridge: mhdp: Add cdns mhdp driver bridge driver\n\nBase on rockchip cdn-dp-reg.c code,\ncreate cdns mhdp DP API functions driver.\nMove the driver to a separate directory.\nAdded HDMI/Audio/CEC API functions.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\n[ Aisheng: fix conflict due to below commit\n611e22b1d9f6 (\"drm/rockchip: Remove unneeded semicolon\") ]\nSigned-off-by: Dong Aisheng <aisheng.dong@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/Kconfig        |  26 +\n drivers/gpu/drm/bridge/cadence/Makefile       |   9 +\n drivers/gpu/drm/bridge/cadence/cdns-dp-core.c | 574 +++++++++++\n .../gpu/drm/bridge/cadence/cdns-hdmi-core.c   | 690 +++++++++++++\n .../gpu/drm/bridge/cadence/cdns-mhdp-audio.c  | 395 +++++++\n .../gpu/drm/bridge/cadence/cdns-mhdp-cec.c    | 341 +++++++\n .../gpu/drm/bridge/cadence/cdns-mhdp-common.c | 795 +++++++++++++++\n drivers/gpu/drm/bridge/cadence/cdns-mhdp-dp.c | 172 ++++\n .../gpu/drm/bridge/cadence/cdns-mhdp-hdmi.c   | 332 ++++++\n drivers/gpu/drm/bridge/cadence/cdns-mhdp.h    | 209 ++++\n drivers/gpu/drm/rockchip/Makefile             |   2 +-\n drivers/gpu/drm/rockchip/cdn-dp-core.c        | 241 ++---\n drivers/gpu/drm/rockchip/cdn-dp-core.h        |  44 +-\n drivers/gpu/drm/rockchip/cdn-dp-reg.c         | 960 ------------------\n .../drm/bridge/cdns-mhdp.h                    | 389 ++++++-\n 15 files changed, 4034 insertions(+), 1145 deletions(-)\n create mode 100644 drivers/gpu/drm/bridge/cadence/cdns-dp-core.c\n create mode 100644 drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n create mode 100644 drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c\n create mode 100644 drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c\n create mode 100644 drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\n create mode 100644 drivers/gpu/drm/bridge/cadence/cdns-mhdp-dp.c\n create mode 100644 drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdmi.c\n create mode 100644 drivers/gpu/drm/bridge/cadence/cdns-mhdp.h\n delete mode 100644 drivers/gpu/drm/rockchip/cdn-dp-reg.c\n rename drivers/gpu/drm/rockchip/cdn-dp-reg.h => include/drm/bridge/cdns-mhdp.h (53%)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/Kconfig b/drivers/gpu/drm/bridge/cadence/Kconfig\nindex ef8c230e0f62..bb1865b15aca 100644\n--- a/drivers/gpu/drm/bridge/cadence/Kconfig\n+++ b/drivers/gpu/drm/bridge/cadence/Kconfig\n@@ -22,3 +22,31 @@ config DRM_CDNS_MHDP8546_J721E\n \t  initializes the J721E Display Port and sets up the\n \t  clock and data muxes.\n endif\n+\n+config DRM_CDNS_MHDP\n+\ttristate \"Cadence MHDP COMMON API driver\"\n+\tselect DRM_KMS_HELPER\n+\tselect DRM_PANEL_BRIDGE\n+\tdepends on OF\n+\thelp\n+\t  Support Cadence MHDP API library.\n+\n+config DRM_CDNS_HDMI\n+\ttristate \"Cadence HDMI DRM driver\"\n+\tdepends on DRM_CDNS_MHDP\n+\tselect DRM_DISPLAY_HDCP_HELPER\n+\tselect DRM_DISPLAY_HDMI_HELPER\n+\n+config DRM_CDNS_DP\n+\ttristate \"Cadence DP DRM driver\"\n+\tdepends on DRM_CDNS_MHDP\n+\n+config DRM_CDNS_AUDIO\n+\ttristate \"Cadence MHDP Audio driver\"\n+\tdepends on DRM_CDNS_MHDP\n+\n+config DRM_CDNS_HDMI_CEC\n+\ttristate \"Cadence MHDP HDMI CEC driver\"\n+\tdepends on DRM_CDNS_HDMI\n+\tselect CEC_CORE\n+\tselect CEC_NOTIFIER\ndiff --git a/drivers/gpu/drm/bridge/cadence/Makefile b/drivers/gpu/drm/bridge/cadence/Makefile\nindex 8f647991b374..618290870ba5 100644\n--- a/drivers/gpu/drm/bridge/cadence/Makefile\n+++ b/drivers/gpu/drm/bridge/cadence/Makefile\n@@ -1,4 +1,13 @@\n # SPDX-License-Identifier: GPL-2.0-only\n obj-$(CONFIG_DRM_CDNS_MHDP8546) += cdns-mhdp8546.o\n cdns-mhdp8546-y := cdns-mhdp8546-core.o cdns-mhdp8546-hdcp.o\n cdns-mhdp8546-$(CONFIG_DRM_CDNS_MHDP8546_J721E) += cdns-mhdp8546-j721e.o\n+\n+cdns_mhdp_drmcore-y := cdns-mhdp-common.o cdns-mhdp-dp.o cdns-mhdp-hdmi.o\n+\n+cdns_mhdp_drmcore-$(CONFIG_DRM_CDNS_HDMI) += cdns-hdmi-core.o\n+cdns_mhdp_drmcore-$(CONFIG_DRM_CDNS_DP) += cdns-dp-core.o\n+cdns_mhdp_drmcore-$(CONFIG_DRM_CDNS_AUDIO) += cdns-mhdp-audio.o\n+cdns_mhdp_drmcore-$(CONFIG_DRM_CDNS_HDMI_CEC) += cdns-mhdp-cec.o\n+\n+obj-$(CONFIG_DRM_CDNS_MHDP)\t\t+= cdns_mhdp_drmcore.o\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c b/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c\nnew file mode 100644\nindex 000000000000..acb5c860da73\n--- /dev/null\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c\n@@ -0,0 +1,574 @@\n+/*\n+ * Cadence Display Port Interface (DP) driver\n+ *\n+ * Copyright (C) 2019 NXP Semiconductor, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ *\n+ */\n+#include <drm/bridge/cdns-mhdp.h>\n+#include <drm/drm_atomic_helper.h>\n+#include <drm/drm_crtc_helper.h>\n+#include <drm/drm_edid.h>\n+#include <drm/drm_encoder_slave.h>\n+#include <drm/drm_of.h>\n+#include <drm/drm_probe_helper.h>\n+#include <drm/drm_vblank.h>\n+#include <drm/drm_print.h>\n+#include <linux/delay.h>\n+#include <linux/err.h>\n+#include <linux/irq.h>\n+#include <linux/module.h>\n+#include <linux/mutex.h>\n+#include <linux/of_device.h>\n+\n+/*\n+ * This function only implements native DPDC reads and writes\n+ */\n+static ssize_t dp_aux_transfer(struct drm_dp_aux *aux,\n+\t\tstruct drm_dp_aux_msg *msg)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(aux->dev);\n+\tbool native = msg->request & (DP_AUX_NATIVE_WRITE & DP_AUX_NATIVE_READ);\n+\tint ret;\n+\n+\t/* Ignore address only message */\n+\tif ((msg->size == 0) || (msg->buffer == NULL)) {\n+\t\tmsg->reply = native ?\n+\t\t\tDP_AUX_NATIVE_REPLY_ACK : DP_AUX_I2C_REPLY_ACK;\n+\t\treturn msg->size;\n+\t}\n+\n+\tif (!native) {\n+\t\tdev_err(mhdp->dev, \"%s: only native messages supported\\n\", __func__);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/* msg sanity check */\n+\tif (msg->size > DP_AUX_MAX_PAYLOAD_BYTES) {\n+\t\tdev_err(mhdp->dev, \"%s: invalid msg: size(%zu), request(%x)\\n\",\n+\t\t\t\t\t\t__func__, msg->size, (unsigned int)msg->request);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (msg->request == DP_AUX_NATIVE_WRITE) {\n+\t\tconst u8 *buf = msg->buffer;\n+\t\tint i;\n+\t\tfor (i = 0; i < msg->size; ++i) {\n+\t\t\tret = cdns_mhdp_dpcd_write(mhdp,\n+\t\t\t\t\t\t   msg->address + i, buf[i]);\n+\t\t\tif (!ret)\n+\t\t\t\tcontinue;\n+\n+\t\t\tDRM_DEV_ERROR(mhdp->dev, \"Failed to write DPCD\\n\");\n+\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n+\tif (msg->request == DP_AUX_NATIVE_READ) {\n+\t\tret = cdns_mhdp_dpcd_read(mhdp, msg->address, msg->buffer, msg->size);\n+\t\tif (ret < 0)\n+\t\t\treturn -EIO;\n+\t\tmsg->reply = DP_AUX_NATIVE_REPLY_ACK;\n+\t\treturn msg->size;\n+\t}\n+\treturn 0;\n+}\n+\n+static int dp_aux_init(struct cdns_mhdp_device *mhdp,\n+\t\t  struct device *dev)\n+{\n+\tint ret;\n+\n+\tmhdp->dp.aux.name = \"imx_dp_aux\";\n+\tmhdp->dp.aux.dev = dev;\n+\tmhdp->dp.aux.transfer = dp_aux_transfer;\n+\n+\tret = drm_dp_aux_register(&mhdp->dp.aux);\n+\n+\treturn ret;\n+}\n+\n+static int dp_aux_destroy(struct cdns_mhdp_device *mhdp)\n+{\n+\tdrm_dp_aux_unregister(&mhdp->dp.aux);\n+\treturn 0;\n+}\n+\n+static void dp_pixel_clk_reset(struct cdns_mhdp_device *mhdp)\n+{\n+\tu32 val;\n+\n+\t/* reset pixel clk */\n+\tval = cdns_mhdp_reg_read(mhdp, SOURCE_HDTX_CAR);\n+\tcdns_mhdp_reg_write(mhdp, SOURCE_HDTX_CAR, val & 0xFD);\n+\tcdns_mhdp_reg_write(mhdp, SOURCE_HDTX_CAR, val);\n+}\n+\n+static void cdns_dp_mode_set(struct cdns_mhdp_device *mhdp)\n+{\n+\tu32 lane_mapping = mhdp->lane_mapping;\n+\tint ret;\n+\n+\tcdns_mhdp_plat_call(mhdp, pclk_rate);\n+\n+\t/* delay for DP FW stable after pixel clock relock */\n+\tmsleep(50);\n+\n+\tdp_pixel_clk_reset(mhdp);\n+\n+\t/* Get DP Caps  */\n+\tret = drm_dp_dpcd_read(&mhdp->dp.aux, DP_DPCD_REV, mhdp->dp.dpcd,\n+\t\t\t       DP_RECEIVER_CAP_SIZE);\n+\tif (ret < 0) {\n+\t\tDRM_ERROR(\"Failed to get caps %d\\n\", ret);\n+\t\treturn;\n+\t}\n+\n+\tmhdp->dp.rate = drm_dp_max_link_rate(mhdp->dp.dpcd);\n+\tmhdp->dp.num_lanes = drm_dp_max_lane_count(mhdp->dp.dpcd);\n+\n+\t/* check the max link rate */\n+\tif (mhdp->dp.rate > CDNS_DP_MAX_LINK_RATE)\n+\t\tmhdp->dp.rate = CDNS_DP_MAX_LINK_RATE;\n+\n+\t/* Initialize link rate/num_lanes as panel max link rate/max_num_lanes */\n+\tcdns_mhdp_plat_call(mhdp, phy_set);\n+\n+\t/* Video off */\n+\tret = cdns_mhdp_set_video_status(mhdp, CONTROL_VIDEO_IDLE);\n+\tif (ret) {\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"Failed to valid video %d\\n\", ret);\n+\t\treturn;\n+\t}\n+\n+\t/* Line swaping */\n+\tcdns_mhdp_reg_write(mhdp, LANES_CONFIG, 0x00400000 | lane_mapping);\n+\n+\t/* Set DP host capability */\n+\tret = cdns_mhdp_set_host_cap(mhdp, false);\n+\tif (ret) {\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"Failed to set host cap %d\\n\", ret);\n+\t\treturn;\n+\t}\n+\n+\tret = cdns_mhdp_config_video(mhdp);\n+\tif (ret) {\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"Failed to config video %d\\n\", ret);\n+\t\treturn;\n+\t}\n+\n+\treturn;\n+}\n+\n+/* -----------------------------------------------------------------------------\n+ * dp TX Setup\n+ */\n+static enum drm_connector_status\n+cdns_dp_connector_detect(struct drm_connector *connector, bool force)\n+{\n+\tstruct cdns_mhdp_device *mhdp = container_of(connector,\n+\t\t\t\t\tstruct cdns_mhdp_device, connector.base);\n+\tu8 hpd = 0xf;\n+\n+\thpd = cdns_mhdp_read_hpd(mhdp);\n+\tif (hpd == 1)\n+\t\t/* Cable Connected */\n+\t\treturn connector_status_connected;\n+\telse if (hpd == 0)\n+\t\t/* Cable Disconnedted */\n+\t\treturn connector_status_disconnected;\n+\telse {\n+\t\t/* Cable status unknown */\n+\t\tDRM_INFO(\"Unknow cable status, hdp=%u\\n\", hpd);\n+\t\treturn connector_status_unknown;\n+\t}\n+}\n+\n+static int cdns_dp_connector_get_modes(struct drm_connector *connector)\n+{\n+\tstruct cdns_mhdp_device *mhdp = container_of(connector,\n+\t\t\t\t\tstruct cdns_mhdp_device, connector.base);\n+\tint num_modes = 0;\n+\tstruct edid *edid;\n+\n+\tedid = drm_do_get_edid(&mhdp->connector.base,\n+\t\t\t\t   cdns_mhdp_get_edid_block, mhdp);\n+\tif (edid) {\n+\t\tdev_info(mhdp->dev, \"%x,%x,%x,%x,%x,%x,%x,%x\\n\",\n+\t\t\t edid->header[0], edid->header[1],\n+\t\t\t edid->header[2], edid->header[3],\n+\t\t\t edid->header[4], edid->header[5],\n+\t\t\t edid->header[6], edid->header[7]);\n+\t\tdrm_connector_update_edid_property(connector, edid);\n+\t\tnum_modes = drm_add_edid_modes(connector, edid);\n+\t\tkfree(edid);\n+\t}\n+\n+\tif (num_modes == 0)\n+\t\tDRM_ERROR(\"Invalid edid\\n\");\n+\treturn num_modes;\n+}\n+\n+static const struct drm_connector_funcs cdns_dp_connector_funcs = {\n+\t.fill_modes = drm_helper_probe_single_connector_modes,\n+\t.detect = cdns_dp_connector_detect,\n+\t.destroy = drm_connector_cleanup,\n+\t.reset = drm_atomic_helper_connector_reset,\n+\t.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,\n+\t.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,\n+};\n+\n+static const struct drm_connector_helper_funcs cdns_dp_connector_helper_funcs = {\n+\t.get_modes = cdns_dp_connector_get_modes,\n+};\n+\n+static int cdns_dp_bridge_attach(struct drm_bridge *bridge,\n+\t\t\t\t enum drm_bridge_attach_flags flags)\n+{\n+\tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n+\tstruct drm_encoder *encoder = bridge->encoder;\n+\tstruct drm_connector *connector = &mhdp->connector.base;\n+\n+\tconnector->interlace_allowed = 1;\n+\n+\tif (mhdp->is_hpd)\n+\t\tconnector->polled = DRM_CONNECTOR_POLL_HPD;\n+\telse\n+\t\tconnector->polled = DRM_CONNECTOR_POLL_CONNECT |\n+\t\tDRM_CONNECTOR_POLL_DISCONNECT;\n+\n+\tdrm_connector_helper_add(connector, &cdns_dp_connector_helper_funcs);\n+\n+\tdrm_connector_init(bridge->dev, connector, &cdns_dp_connector_funcs,\n+\t\t\t   DRM_MODE_CONNECTOR_DisplayPort);\n+\n+\tdrm_connector_attach_encoder(connector, encoder);\n+\n+\treturn 0;\n+}\n+\n+static enum drm_mode_status\n+cdns_dp_bridge_mode_valid(struct drm_bridge *bridge,\n+\t\t\t  const struct drm_display_mode *mode)\n+{\n+\tenum drm_mode_status mode_status = MODE_OK;\n+\n+\t/* We don't support double-clocked modes */\n+\tif (mode->flags & DRM_MODE_FLAG_DBLCLK ||\n+\t\t\tmode->flags & DRM_MODE_FLAG_INTERLACE)\n+\t\treturn MODE_BAD;\n+\n+\t/* MAX support pixel clock rate 594MHz */\n+\tif (mode->clock > 594000)\n+\t\treturn MODE_CLOCK_HIGH;\n+\n+\t/* 4096x2160 is not supported now */\n+\tif (mode->hdisplay > 3840)\n+\t\treturn MODE_BAD_HVALUE;\n+\n+\tif (mode->vdisplay > 2160)\n+\t\treturn MODE_BAD_VVALUE;\n+\n+\treturn mode_status;\n+}\n+\n+static void cdns_dp_bridge_mode_set(struct drm_bridge *bridge,\n+\t\t\t\t    const struct drm_display_mode *orig_mode,\n+\t\t\t\t    const struct drm_display_mode *mode)\n+{\n+\tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n+\tstruct drm_display_info *display_info = &mhdp->connector.base.display_info;\n+\tstruct video_info *video = &mhdp->video_info;\n+\n+\tswitch (display_info->bpc) {\n+\tcase 10:\n+\t\tvideo->color_depth = 10;\n+\t\tbreak;\n+\tcase 6:\n+\t\tvideo->color_depth = 6;\n+\t\tbreak;\n+\tdefault:\n+\t\tvideo->color_depth = 8;\n+\t\tbreak;\n+\t}\n+\n+\tvideo->color_fmt = PXL_RGB;\n+\tvideo->v_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NVSYNC);\n+\tvideo->h_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NHSYNC);\n+\n+\tDRM_INFO(\"Mode: %dx%dp%d\\n\", mode->hdisplay, mode->vdisplay, mode->clock); \n+\tmemcpy(&mhdp->mode, mode, sizeof(struct drm_display_mode));\n+\n+\tmutex_lock(&mhdp->lock);\n+\tcdns_dp_mode_set(mhdp);\n+\tmutex_unlock(&mhdp->lock);\n+\n+\t/* reset force mode set flag */\n+\tmhdp->force_mode_set = false;\n+}\n+\n+static void cdn_dp_bridge_enable(struct drm_bridge *bridge)\n+{\n+\tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n+\tint ret;\n+\n+\t/* Link trainning */\n+\tret = cdns_mhdp_train_link(mhdp);\n+\tif (ret) {\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"Failed link train %d\\n\", ret);\n+\t\treturn;\n+\t}\n+\n+\tret = cdns_mhdp_set_video_status(mhdp, CONTROL_VIDEO_VALID);\n+\tif (ret) {\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"Failed to valid video %d\\n\", ret);\n+\t\treturn;\n+\t}\n+}\n+\n+static void cdn_dp_bridge_disable(struct drm_bridge *bridge)\n+{\t\n+\tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n+\n+\tcdns_mhdp_set_video_status(mhdp, CONTROL_VIDEO_IDLE);\n+}\n+\n+static const struct drm_bridge_funcs cdns_dp_bridge_funcs = {\n+\t.attach = cdns_dp_bridge_attach,\n+\t.enable = cdn_dp_bridge_enable,\n+\t.disable = cdn_dp_bridge_disable,\n+\t.mode_set = cdns_dp_bridge_mode_set,\n+\t.mode_valid = cdns_dp_bridge_mode_valid,\n+};\n+\n+static void hotplug_work_func(struct work_struct *work)\n+{\n+\tstruct cdns_mhdp_device *mhdp = container_of(work,\n+\t\t\t\t\t   struct cdns_mhdp_device, hotplug_work.work);\n+\tstruct drm_connector *connector = &mhdp->connector.base;\n+\n+\tdrm_helper_hpd_irq_event(connector->dev);\n+\n+\tif (connector->status == connector_status_connected) {\n+\t\t/* Cable connedted  */\n+\t\tDRM_INFO(\"HDMI/DP Cable Plug In\\n\");\n+\t\tenable_irq(mhdp->irq[IRQ_OUT]);\n+\t} else if (connector->status == connector_status_disconnected) {\n+\t\t/* Cable Disconnedted  */\n+\t\tDRM_INFO(\"HDMI/DP Cable Plug Out\\n\");\n+\t\t/* force mode set for cable replugin to recovery DP video modes */\n+\t\tmhdp->force_mode_set = true;\n+\t\tenable_irq(mhdp->irq[IRQ_IN]);\n+\t}\n+}\n+\n+static irqreturn_t cdns_dp_irq_thread(int irq, void *data)\n+{\n+\tstruct cdns_mhdp_device *mhdp = data;\n+\n+\tdisable_irq_nosync(irq);\n+\n+\tmod_delayed_work(system_wq, &mhdp->hotplug_work,\n+\t\t\tmsecs_to_jiffies(HOTPLUG_DEBOUNCE_MS));\n+\n+\treturn IRQ_HANDLED;\n+}\n+\n+static void cdns_dp_parse_dt(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct device_node *of_node = mhdp->dev->of_node;\n+\tint ret;\n+\n+\tret = of_property_read_u32(of_node, \"lane-mapping\",\n+\t\t\t\t\t\t&mhdp->lane_mapping);\n+\tif (ret) {\n+\t\tmhdp->lane_mapping = 0xc6;\n+\t\tdev_warn(mhdp->dev, \"Failed to get lane_mapping - using default 0xc6\\n\");\n+\t}\n+\tdev_info(mhdp->dev, \"lane-mapping 0x%02x\\n\", mhdp->lane_mapping);\n+}\n+\n+static int __cdns_dp_probe(struct platform_device *pdev,\n+\t\tstruct cdns_mhdp_device *mhdp)\n+{\n+\tstruct device *dev = &pdev->dev;\n+\tstruct resource *iores = NULL;\n+\tint ret;\n+\n+\tmutex_init(&mhdp->lock);\n+\tmutex_init(&mhdp->iolock);\n+\n+\tINIT_DELAYED_WORK(&mhdp->hotplug_work, hotplug_work_func);\n+\n+\tiores = platform_get_resource(pdev, IORESOURCE_MEM, 0);\n+\tif (iores) {\n+\t\tmhdp->regs_base = devm_ioremap(dev, iores->start,\n+\t\t\t\t\t       resource_size(iores));\n+\t\tif (IS_ERR(mhdp->regs_base))\n+\t\t\treturn -ENOMEM;\n+\t}\n+\n+\tiores = platform_get_resource(pdev, IORESOURCE_MEM, 1);\n+\tif (iores) {\n+\t\tmhdp->regs_sec = devm_ioremap(dev, iores->start,\n+\t\t\t\t\t      resource_size(iores));\n+\t\tif (IS_ERR(mhdp->regs_sec))\n+\t\t\treturn -ENOMEM;\n+\t}\n+\n+\tmhdp->is_hpd = true;\n+\tmhdp->is_ls1028a = false;\n+\n+\tmhdp->irq[IRQ_IN] = platform_get_irq_byname(pdev, \"plug_in\");\n+\tif (mhdp->irq[IRQ_IN] < 0) {\n+\t\tmhdp->is_hpd = false;\n+\t\tdev_info(dev, \"No plug_in irq number\\n\");\n+\t}\n+\n+\tmhdp->irq[IRQ_OUT] = platform_get_irq_byname(pdev, \"plug_out\");\n+\tif (mhdp->irq[IRQ_OUT] < 0) {\n+\t\tmhdp->is_hpd = false;\n+\t\tdev_info(dev, \"No plug_out irq number\\n\");\n+\t}\n+\n+\tcdns_dp_parse_dt(mhdp);\n+\n+\tif (of_device_is_compatible(dev->of_node, \"cdn,ls1028a-dp\"))\n+\t\tmhdp->is_ls1028a = true;\n+\n+\tcdns_mhdp_plat_call(mhdp, power_on);\n+\n+\tcdns_mhdp_plat_call(mhdp, firmware_init);\n+\n+\t/* DP FW alive check */\n+\tret = cdns_mhdp_check_alive(mhdp);\n+\tif (ret == false) {\n+\t\tDRM_ERROR(\"NO dp FW running\\n\");\n+\t\treturn -ENXIO;\n+\t}\n+\n+\t/* DP PHY init before AUX init */\n+\tcdns_mhdp_plat_call(mhdp, phy_set);\n+\n+\t/* Enable Hotplug Detect IRQ thread */\n+\tif (mhdp->is_hpd) {\n+\t\tirq_set_status_flags(mhdp->irq[IRQ_IN], IRQ_NOAUTOEN);\n+\t\tret = devm_request_threaded_irq(dev, mhdp->irq[IRQ_IN],\n+\t\t\t\t\t\tNULL, cdns_dp_irq_thread,\n+\t\t\t\t\t\tIRQF_ONESHOT, dev_name(dev),\n+\t\t\t\t\t\tmhdp);\n+\t\n+\t\tif (ret) {\n+\t\t\tdev_err(dev, \"can't claim irq %d\\n\",\n+\t\t\t\t\tmhdp->irq[IRQ_IN]);\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n+\t\tirq_set_status_flags(mhdp->irq[IRQ_OUT], IRQ_NOAUTOEN);\n+\t\tret = devm_request_threaded_irq(dev, mhdp->irq[IRQ_OUT],\n+\t\t\t\t\t\tNULL, cdns_dp_irq_thread,\n+\t\t\t\t\t\tIRQF_ONESHOT, dev_name(dev),\n+\t\t\t\t\t\tmhdp);\n+\n+\t\tif (ret) {\n+\t\t\tdev_err(dev, \"can't claim irq %d\\n\",\n+\t\t\t\t\tmhdp->irq[IRQ_OUT]);\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n+\t\tif (cdns_mhdp_read_hpd(mhdp))\n+\t\t\tenable_irq(mhdp->irq[IRQ_OUT]);\n+\t\telse\n+\t\t\tenable_irq(mhdp->irq[IRQ_IN]);\n+\t}\n+\n+\tmhdp->bridge.base.driver_private = mhdp;\n+\tmhdp->bridge.base.funcs = &cdns_dp_bridge_funcs;\n+#ifdef CONFIG_OF\n+\tmhdp->bridge.base.of_node = dev->of_node;\n+#endif\n+\n+\tdev_set_drvdata(dev, mhdp);\n+\t\n+\t/* register audio driver */\n+\tcdns_mhdp_register_audio_driver(dev);\n+\n+\tdp_aux_init(mhdp, dev);\n+\n+\treturn 0;\n+}\n+\n+static void __cdns_dp_remove(struct cdns_mhdp_device *mhdp)\n+{\n+\tdp_aux_destroy(mhdp);\n+\tcdns_mhdp_unregister_audio_driver(mhdp->dev);\n+}\n+\n+/* -----------------------------------------------------------------------------\n+ * Probe/remove API, used from platforms based on the DRM bridge API.\n+ */\n+int cdns_dp_probe(struct platform_device *pdev,\n+\t\t  struct cdns_mhdp_device *mhdp)\n+{\n+\tint ret;\n+\n+\tret = __cdns_dp_probe(pdev, mhdp);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tdrm_bridge_add(&mhdp->bridge.base);\n+\n+\treturn 0;\n+}\n+EXPORT_SYMBOL_GPL(cdns_dp_probe);\n+\n+void cdns_dp_remove(struct platform_device *pdev)\n+{\n+\tstruct cdns_mhdp_device *mhdp = platform_get_drvdata(pdev);\n+\n+\tdrm_bridge_remove(&mhdp->bridge.base);\n+\n+\t__cdns_dp_remove(mhdp);\n+}\n+EXPORT_SYMBOL_GPL(cdns_dp_remove);\n+\n+/* -----------------------------------------------------------------------------\n+ * Bind/unbind API, used from platforms based on the component framework.\n+ */\n+int cdns_dp_bind(struct platform_device *pdev, struct drm_encoder *encoder,\n+\t\tstruct cdns_mhdp_device *mhdp)\n+{\n+\tint ret;\n+\n+\tret = __cdns_dp_probe(pdev, mhdp);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tret = drm_bridge_attach(encoder, &mhdp->bridge.base, NULL, 0);\n+\tif (ret) {\n+\t\tcdns_dp_remove(pdev);\n+\t\tDRM_ERROR(\"Failed to initialize bridge with drm\\n\");\n+\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n+}\n+EXPORT_SYMBOL_GPL(cdns_dp_bind);\n+\n+void cdns_dp_unbind(struct device *dev)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\n+\t__cdns_dp_remove(mhdp);\n+}\n+EXPORT_SYMBOL_GPL(cdns_dp_unbind);\n+\n+MODULE_AUTHOR(\"Sandor Yu <sandor.yu@nxp.com>\");\n+MODULE_DESCRIPTION(\"Cadence Display Port transmitter driver\");\n+MODULE_LICENSE(\"GPL\");\n+MODULE_ALIAS(\"platform:cdn-dp\");\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\nnew file mode 100644\nindex 000000000000..da40f62617ef\n--- /dev/null\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n@@ -0,0 +1,690 @@\n+/*\n+ * Cadence High-Definition Multimedia Interface (HDMI) driver\n+ *\n+ * Copyright (C) 2019 NXP Semiconductor, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ *\n+ */\n+#include <drm/bridge/cdns-mhdp.h>\n+#include <drm/drm_atomic_helper.h>\n+#include <drm/drm_edid.h>\n+#include <drm/drm_encoder_slave.h>\n+#include <drm/drm_of.h>\n+#include <drm/drm_probe_helper.h>\n+#include <drm/drm_print.h>\n+#include <drm/display/drm_scdc_helper.h>\n+#include <drm/drm_vblank.h>\n+#include <linux/delay.h>\n+#include <linux/err.h>\n+#include <linux/hdmi.h>\n+#include <linux/irq.h>\n+#include <linux/module.h>\n+#include <linux/mfd/syscon.h>\n+#include <linux/mutex.h>\n+#include <linux/of_device.h>\n+\n+static void hdmi_sink_config(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct drm_scdc *scdc = &mhdp->connector.base.display_info.hdmi.scdc;\n+\tu8 buff = 0;\n+\n+\t/* Default work in HDMI1.4 */\n+\tmhdp->hdmi.hdmi_type = MODE_HDMI_1_4;\n+\n+\t/* check sink support SCDC or not */\n+\tif (scdc->supported != true) {\n+\t\tDRM_INFO(\"Sink Not Support SCDC\\n\");\n+\t\treturn;\n+\t}\n+\n+\tif (mhdp->hdmi.char_rate > 340000) {\n+\t\t/*\n+\t\t * TMDS Character Rate above 340MHz should working in HDMI2.0\n+\t\t * Enable scrambling and TMDS_Bit_Clock_Ratio\n+\t\t */\n+\t\tbuff = SCDC_TMDS_BIT_CLOCK_RATIO_BY_40 | SCDC_SCRAMBLING_ENABLE;\n+\t\tmhdp->hdmi.hdmi_type = MODE_HDMI_2_0;\n+\t} else  if (scdc->scrambling.low_rates) {\n+\t\t/*\n+\t\t * Enable scrambling and HDMI2.0 when scrambling capability of sink\n+\t\t * be indicated in the HF-VSDB LTE_340Mcsc_scramble bit\n+\t\t */\n+\t\tbuff = SCDC_SCRAMBLING_ENABLE;\n+\t\tmhdp->hdmi.hdmi_type = MODE_HDMI_2_0;\n+\t}\n+\n+\t/* TMDS config */\n+\tcdns_hdmi_scdc_write(mhdp, 0x20, buff);\n+}\n+\n+static void hdmi_lanes_config(struct cdns_mhdp_device *mhdp)\n+{\n+\t/* Line swaping */\n+\tcdns_mhdp_reg_write(mhdp, LANES_CONFIG, 0x00400000 | mhdp->lane_mapping);\n+}\n+\n+static int hdmi_avi_info_set(struct cdns_mhdp_device *mhdp,\n+\t\t\t     struct drm_display_mode *mode)\n+{\n+\tstruct hdmi_avi_infoframe frame;\n+\tint format = mhdp->video_info.color_fmt;\n+\tstruct drm_connector_state *conn_state = mhdp->connector.base.state;\n+\tstruct drm_display_mode *adj_mode;\n+\tenum hdmi_quantization_range qr;\n+\tu8 buf[32];\n+\tint ret;\n+\n+\t/* Initialise info frame from DRM mode */\n+\tdrm_hdmi_avi_infoframe_from_display_mode(&frame, &mhdp->connector.base,\n+\t\t\t\t\t\t mode);\n+\n+\tswitch (format) {\n+\tcase YCBCR_4_4_4:\n+\t\tframe.colorspace = HDMI_COLORSPACE_YUV444;\n+\t\tbreak;\n+\tcase YCBCR_4_2_2:\n+\t\tframe.colorspace = HDMI_COLORSPACE_YUV422;\n+\t\tbreak;\n+\tcase YCBCR_4_2_0:\n+\t\tframe.colorspace = HDMI_COLORSPACE_YUV420;\n+\t\tbreak;\n+\tdefault:\n+\t\tframe.colorspace = HDMI_COLORSPACE_RGB;\n+\t\tbreak;\n+\t}\n+\n+\tdrm_hdmi_avi_infoframe_colorimetry(&frame, conn_state);\n+\n+\tadj_mode = &mhdp->bridge.base.encoder->crtc->state->adjusted_mode;\n+\n+\tqr = drm_default_rgb_quant_range(adj_mode);\n+\n+\tdrm_hdmi_avi_infoframe_quant_range(&frame, &mhdp->connector.base,\n+\t\t\t\t\t   adj_mode, qr);\n+\n+\tret = hdmi_avi_infoframe_check(&frame);\n+\tif (WARN_ON(ret))\n+\t\treturn false;\n+\n+\tret = hdmi_avi_infoframe_pack(&frame, buf + 1, sizeof(buf) - 1);\n+\tif (ret < 0) {\n+\t\tDRM_ERROR(\"failed to pack AVI infoframe: %d\\n\", ret);\n+\t\treturn -1;\n+\t}\n+\n+\tbuf[0] = 0;\n+\tcdns_mhdp_infoframe_set(mhdp, 0, sizeof(buf), buf, HDMI_INFOFRAME_TYPE_AVI);\n+\treturn 0;\n+}\n+\n+static void hdmi_vendor_info_set(struct cdns_mhdp_device *mhdp,\n+\t\t\t\tstruct drm_display_mode *mode)\n+{\n+\tstruct hdmi_vendor_infoframe frame;\n+\tu8 buf[32];\n+\tint ret;\n+\n+\t/* Initialise vendor frame from DRM mode */\n+\tret = drm_hdmi_vendor_infoframe_from_display_mode(&frame, &mhdp->connector.base, mode);\n+\tif (ret < 0) {\n+\t\tDRM_INFO(\"No vendor infoframe\\n\");\n+\t\treturn;\n+\t}\n+\n+\tret = hdmi_vendor_infoframe_pack(&frame, buf + 1, sizeof(buf) - 1);\n+\tif (ret < 0) {\n+\t\tDRM_WARN(\"Unable to pack vendor infoframe: %d\\n\", ret);\n+\t\treturn;\n+\t}\n+\n+\tbuf[0] = 0;\n+\tcdns_mhdp_infoframe_set(mhdp, 3, sizeof(buf), buf, HDMI_INFOFRAME_TYPE_VENDOR);\n+}\n+\n+static void hdmi_drm_info_set(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct drm_connector_state *conn_state;\n+\tstruct hdmi_drm_infoframe frame;\n+\tu8 buf[32];\n+\tint ret;\n+\n+\tconn_state = mhdp->connector.base.state;\n+\n+\tif (!conn_state->hdr_output_metadata)\n+\t\treturn;\n+\n+\tret = drm_hdmi_infoframe_set_hdr_metadata(&frame, conn_state);\n+\tif (ret < 0) {\n+\t\tDRM_DEBUG_KMS(\"couldn't set HDR metadata in infoframe\\n\");\n+\t\treturn;\n+\t}\n+\n+\tret = hdmi_drm_infoframe_pack(&frame, buf + 1, sizeof(buf) - 1);\n+\tif (ret < 0) {\n+\t\tDRM_DEBUG_KMS(\"couldn't pack HDR infoframe\\n\");\n+\t\treturn;\n+\t}\n+\n+\tbuf[0] = 0;\n+\tcdns_mhdp_infoframe_set(mhdp, 3, sizeof(buf),\n+\t\t\t\tbuf, HDMI_INFOFRAME_TYPE_DRM);\n+}\n+\n+void cdns_hdmi_mode_set(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct drm_display_mode *mode = &mhdp->mode;\n+\tint ret;\n+\n+\t/* video mode valid check */\n+\tif (mode->clock == 0 || mode->hdisplay == 0 ||  mode->vdisplay == 0)\n+\t\treturn;\n+\n+\thdmi_lanes_config(mhdp);\n+\n+\tcdns_mhdp_plat_call(mhdp, pclk_rate);\n+\n+\t/* delay for HDMI FW stable after pixel clock relock */\n+\tmsleep(20);\n+\n+\tcdns_mhdp_plat_call(mhdp, phy_set);\n+\n+\thdmi_sink_config(mhdp);\n+\n+\tret = cdns_hdmi_ctrl_init(mhdp, mhdp->hdmi.hdmi_type, mhdp->hdmi.char_rate);\n+\tif (ret < 0) {\n+\t\tDRM_ERROR(\"%s, ret = %d\\n\", __func__, ret);\n+\t\treturn;\n+\t}\n+\n+\t/* Config GCP */\n+\tif (mhdp->video_info.color_depth == 8)\n+\t\tcdns_hdmi_disable_gcp(mhdp);\n+\telse\n+\t\tcdns_hdmi_enable_gcp(mhdp);\n+\n+\tret = hdmi_avi_info_set(mhdp, mode);\n+\tif (ret < 0) {\n+\t\tDRM_ERROR(\"%s ret = %d\\n\", __func__, ret);\n+\t\treturn;\n+\t}\n+\n+\t/* vendor info frame is enable only  when HDMI1.4 4K mode */\n+\thdmi_vendor_info_set(mhdp, mode);\n+\n+\thdmi_drm_info_set(mhdp);\n+\n+\tret = cdns_hdmi_mode_config(mhdp, mode, &mhdp->video_info);\n+\tif (ret < 0) {\n+\t\tDRM_ERROR(\"CDN_API_HDMITX_SetVic_blocking ret = %d\\n\", ret);\n+\t\treturn;\n+\t}\n+}\n+\n+static enum drm_connector_status\n+cdns_hdmi_connector_detect(struct drm_connector *connector, bool force)\n+{\n+\tstruct cdns_mhdp_device *mhdp =\n+\t\t\t\tcontainer_of(connector, struct cdns_mhdp_device, connector.base);\n+\n+\tu8 hpd = 0xf;\n+\n+\thpd = cdns_mhdp_read_hpd(mhdp);\n+\n+\tif (hpd == 1)\n+\t\t/* Cable Connected */\n+\t\treturn connector_status_connected;\n+\telse if (hpd == 0)\n+\t\t/* Cable Disconnedted */\n+\t\treturn connector_status_disconnected;\n+\telse {\n+\t\t/* Cable status unknown */\n+\t\tDRM_INFO(\"Unknow cable status, hdp=%u\\n\", hpd);\n+\t\treturn connector_status_unknown;\n+\t}\n+}\n+\n+static int cdns_hdmi_connector_get_modes(struct drm_connector *connector)\n+{\n+\tstruct cdns_mhdp_device *mhdp =\n+\t\t\t\tcontainer_of(connector, struct cdns_mhdp_device, connector.base);\n+\tint num_modes = 0;\n+\tstruct edid *edid;\n+\n+\tedid = drm_do_get_edid(&mhdp->connector.base,\n+\t\t\t\t   cdns_hdmi_get_edid_block, mhdp);\n+\tif (edid) {\n+\t\tdev_info(mhdp->dev, \"%x,%x,%x,%x,%x,%x,%x,%x\\n\",\n+\t\t\t edid->header[0], edid->header[1],\n+\t\t\t edid->header[2], edid->header[3],\n+\t\t\t edid->header[4], edid->header[5],\n+\t\t\t edid->header[6], edid->header[7]);\n+\t\tdrm_connector_update_edid_property(connector, edid);\n+\t\tnum_modes = drm_add_edid_modes(connector, edid);\n+\t\tkfree(edid);\n+\t}\n+\n+\tif (num_modes == 0)\n+\t\tDRM_ERROR(\"Invalid edid\\n\");\n+\treturn num_modes;\n+}\n+\n+static bool blob_equal(const struct drm_property_blob *a,\n+\t\t       const struct drm_property_blob *b)\n+{\n+\tif (a && b)\n+\t\treturn a->length == b->length &&\n+\t\t\t!memcmp(a->data, b->data, a->length);\n+\n+\treturn !a == !b;\n+}\n+\n+static int cdns_hdmi_connector_atomic_check(struct drm_connector *connector,\n+\t\t\t\t\t    struct drm_atomic_state *state)\n+{\n+\tstruct drm_connector_state *new_con_state =\n+\t\tdrm_atomic_get_new_connector_state(state, connector);\n+\tstruct drm_connector_state *old_con_state =\n+\t\tdrm_atomic_get_old_connector_state(state, connector);\n+\tstruct drm_crtc *crtc = new_con_state->crtc;\n+\tstruct drm_crtc_state *new_crtc_state;\n+\n+\tif (!blob_equal(new_con_state->hdr_output_metadata,\n+\t\t\told_con_state->hdr_output_metadata) ||\n+\t    new_con_state->colorspace != old_con_state->colorspace) {\n+\t\tnew_crtc_state = drm_atomic_get_crtc_state(state, crtc);\n+\t\tif (IS_ERR(new_crtc_state))\n+\t\t\treturn PTR_ERR(new_crtc_state);\n+\n+\t\tnew_crtc_state->mode_changed =\n+\t\t\t!new_con_state->hdr_output_metadata ||\n+\t\t\t!old_con_state->hdr_output_metadata ||\n+\t\t\tnew_con_state->colorspace != old_con_state->colorspace;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static const struct drm_connector_funcs cdns_hdmi_connector_funcs = {\n+\t.fill_modes = drm_helper_probe_single_connector_modes,\n+\t.detect = cdns_hdmi_connector_detect,\n+\t.destroy = drm_connector_cleanup,\n+\t.reset = drm_atomic_helper_connector_reset,\n+\t.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,\n+\t.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,\n+};\n+\n+static const struct drm_connector_helper_funcs cdns_hdmi_connector_helper_funcs = {\n+\t.get_modes = cdns_hdmi_connector_get_modes,\n+\t.atomic_check = cdns_hdmi_connector_atomic_check,\n+};\n+\n+static int cdns_hdmi_bridge_attach(struct drm_bridge *bridge,\n+\t\t\t\t enum drm_bridge_attach_flags flags)\n+{\n+\tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n+\tstruct drm_mode_config *config = &bridge->dev->mode_config;\n+\tstruct drm_encoder *encoder = bridge->encoder;\n+\tstruct drm_connector *connector = &mhdp->connector.base;\n+\n+\tconnector->interlace_allowed = 1;\n+\tconnector->polled = DRM_CONNECTOR_POLL_HPD;\n+\n+\tdrm_connector_helper_add(connector, &cdns_hdmi_connector_helper_funcs);\n+\n+\tdrm_connector_init(bridge->dev, connector, &cdns_hdmi_connector_funcs,\n+\t\t\t   DRM_MODE_CONNECTOR_HDMIA);\n+\n+\tif (!strncmp(\"imx8mq-hdmi\", mhdp->plat_data->plat_name, 11)) {\n+\t\tdrm_object_attach_property(&connector->base,\n+\t\t\t\t\t   config->hdr_output_metadata_property,\n+\t\t\t\t\t   0);\n+\n+\t\tif (!drm_mode_create_hdmi_colorspace_property(connector))\n+\t\t\tdrm_object_attach_property(&connector->base,\n+\t\t\t\t\t\tconnector->colorspace_property,\n+\t\t\t\t\t\t0);\n+\t}\n+\n+\tdrm_connector_attach_encoder(connector, encoder);\n+\n+\treturn 0;\n+}\n+\n+static enum drm_mode_status\n+cdns_hdmi_bridge_mode_valid(struct drm_bridge *bridge,\n+\t\t\t  const struct drm_display_mode *mode)\n+{\n+\tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n+\tenum drm_mode_status mode_status = MODE_OK;\n+\tint ret;\n+\n+\t/* We don't support double-clocked and Interlaced modes */\n+\tif (mode->flags & DRM_MODE_FLAG_DBLCLK ||\n+\t\t\tmode->flags & DRM_MODE_FLAG_INTERLACE)\n+\t\treturn MODE_BAD;\n+\n+\t/* MAX support pixel clock rate 594MHz */\n+\tif (mode->clock > 594000)\n+\t\treturn MODE_CLOCK_HIGH;\n+\n+\t/* 4096x2160 is not supported */\n+\tif (mode->hdisplay > 3840 || mode->vdisplay > 2160)\n+\t\treturn MODE_BAD_HVALUE;\n+\n+\tmhdp->valid_mode = mode;\n+\tret = cdns_mhdp_plat_call(mhdp, phy_video_valid);\n+\tif (ret == false)\n+\t\treturn MODE_CLOCK_RANGE;\n+\n+\treturn mode_status;\n+}\n+\n+static void cdns_hdmi_bridge_mode_set(struct drm_bridge *bridge,\n+\t\t\t\t    const struct drm_display_mode *orig_mode,\n+\t\t\t\t    const struct drm_display_mode *mode)\n+{\n+\tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n+\tstruct video_info *video = &mhdp->video_info;\n+\n+\tvideo->v_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NVSYNC);\n+\tvideo->h_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NHSYNC);\n+\n+\tDRM_INFO(\"Mode: %dx%dp%d\\n\", mode->hdisplay, mode->vdisplay, mode->clock); \n+\tmemcpy(&mhdp->mode, mode, sizeof(struct drm_display_mode));\n+\n+\tmutex_lock(&mhdp->lock);\n+\tcdns_hdmi_mode_set(mhdp);\n+\tmutex_unlock(&mhdp->lock);\n+\t/* reset force mode set flag */\n+\tmhdp->force_mode_set = false;\n+}\n+\n+bool cdns_hdmi_bridge_mode_fixup(struct drm_bridge *bridge,\n+\t\t\t\t const struct drm_display_mode *mode,\n+\t\t\t\t struct drm_display_mode *adjusted_mode)\n+{\n+\tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n+\tstruct drm_display_info *di = &mhdp->connector.base.display_info;\n+\tstruct video_info *video = &mhdp->video_info;\n+\tint vic = drm_match_cea_mode(mode);\n+\n+\tvideo->color_depth = 8;\n+\tvideo->color_fmt = PXL_RGB;\n+\n+\t/* for all other platforms, other than imx8mq */\n+\tif (strncmp(\"imx8mq-hdmi\", mhdp->plat_data->plat_name, 11)) {\n+\t\tif (di->bpc == 10 || di->bpc == 6)\n+\t\t\tvideo->color_depth = di->bpc;\n+\n+\t\treturn true;\n+\t}\n+\n+\t/* imx8mq */\n+\tif (vic == 97 || vic == 96) {\n+\t\tif (di->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_36)\n+\t\t\tvideo->color_depth = 12;\n+\t\telse if (di->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_30)\n+\t\t\tvideo->color_depth = 10;\n+\n+\t\tif (drm_mode_is_420_only(di, mode) ||\n+\t\t    (drm_mode_is_420_also(di, mode) &&\n+\t\t     video->color_depth > 8)) {\n+\t\t\tvideo->color_fmt = YCBCR_4_2_0;\n+\n+\t\t\tadjusted_mode->private_flags = 1;\n+\t\t\treturn true;\n+\t\t}\n+\n+\t\tvideo->color_depth = 8;\n+\t\treturn true;\n+\t}\n+\n+\t/* Any defined maximum tmds clock limit we must not exceed*/\n+\tif ((di->edid_hdmi_rgb444_dc_modes & DRM_EDID_HDMI_DC_36) &&\n+\t    (mode->clock * 3 / 2 <= di->max_tmds_clock))\n+\t\tvideo->color_depth = 12;\n+\telse if ((di->edid_hdmi_rgb444_dc_modes & DRM_EDID_HDMI_DC_30) &&\n+\t\t (mode->clock * 5 / 4 <= di->max_tmds_clock))\n+\t\tvideo->color_depth = 10;\n+\n+\t/* 10-bit color depth for the following modes is not supported */\n+\tif ((vic == 95 || vic == 94 || vic == 93) && video->color_depth == 10)\n+\t\tvideo->color_depth = 8;\n+\n+\treturn true;\n+}\n+\n+static const struct drm_bridge_funcs cdns_hdmi_bridge_funcs = {\n+\t.attach = cdns_hdmi_bridge_attach,\n+\t.mode_set = cdns_hdmi_bridge_mode_set,\n+\t.mode_valid = cdns_hdmi_bridge_mode_valid,\n+\t.mode_fixup = cdns_hdmi_bridge_mode_fixup,\n+};\n+\n+static void hotplug_work_func(struct work_struct *work)\n+{\n+\tstruct cdns_mhdp_device *mhdp = container_of(work,\n+\t\t\t\t\t   struct cdns_mhdp_device, hotplug_work.work);\n+\tstruct drm_connector *connector = &mhdp->connector.base;\n+\n+\tdrm_helper_hpd_irq_event(connector->dev);\n+\n+\tif (connector->status == connector_status_connected) {\n+\t\tDRM_INFO(\"HDMI Cable Plug In\\n\");\n+\t\tmhdp->force_mode_set = true;\n+\t\tenable_irq(mhdp->irq[IRQ_OUT]);\n+\t} else if (connector->status == connector_status_disconnected) {\n+\t\t/* Cable Disconnedted  */\n+\t\tDRM_INFO(\"HDMI Cable Plug Out\\n\");\n+\t\t/* force mode set for cable replugin to recovery HDMI2.0 video modes */\n+\t\tmhdp->force_mode_set = true;\n+\t\tenable_irq(mhdp->irq[IRQ_IN]);\n+\t}\n+}\n+\n+static irqreturn_t cdns_hdmi_irq_thread(int irq, void *data)\n+{\n+\tstruct cdns_mhdp_device *mhdp = data;\n+\n+\tdisable_irq_nosync(irq);\n+\n+\tmod_delayed_work(system_wq, &mhdp->hotplug_work,\n+\t\t\tmsecs_to_jiffies(HOTPLUG_DEBOUNCE_MS));\n+\n+\treturn IRQ_HANDLED;\n+}\n+\n+static void cdns_hdmi_parse_dt(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct device_node *of_node = mhdp->dev->of_node;\n+\tint ret;\n+\n+\tret = of_property_read_u32(of_node, \"lane-mapping\", &mhdp->lane_mapping);\n+\tif (ret) {\n+\t\tmhdp->lane_mapping = 0xc6;\n+\t\tdev_warn(mhdp->dev, \"Failed to get lane_mapping - using default 0xc6\\n\");\n+\t}\n+\tdev_info(mhdp->dev, \"lane-mapping 0x%02x\\n\", mhdp->lane_mapping);\n+}\n+\n+static int __cdns_hdmi_probe(struct platform_device *pdev,\n+\t\t  struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct device *dev = &pdev->dev;\n+\tstruct platform_device_info pdevinfo;\n+\tstruct resource *iores = NULL;\n+\tint ret;\n+\n+\tmutex_init(&mhdp->lock);\n+\tmutex_init(&mhdp->iolock);\n+\n+\tINIT_DELAYED_WORK(&mhdp->hotplug_work, hotplug_work_func);\n+\n+\tiores = platform_get_resource(pdev, IORESOURCE_MEM, 0);\n+\tmhdp->regs_base = devm_ioremap(dev, iores->start, resource_size(iores));\n+\tif (IS_ERR(mhdp->regs_base)) {\n+\t\tdev_err(dev, \"No regs_base memory\\n\");\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\t/* sec register base */\n+\tiores = platform_get_resource(pdev, IORESOURCE_MEM, 1);\n+\tmhdp->regs_sec = devm_ioremap(dev, iores->start, resource_size(iores));\n+\tif (IS_ERR(mhdp->regs_sec)) {\n+\t\tdev_err(dev, \"No regs_sec memory\\n\");\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\tmhdp->irq[IRQ_IN] = platform_get_irq_byname(pdev, \"plug_in\");\n+\tif (mhdp->irq[IRQ_IN] < 0) {\n+\t\tdev_info(dev, \"No plug_in irq number\\n\");\n+\t\treturn -EPROBE_DEFER;\n+\t}\n+\n+\tmhdp->irq[IRQ_OUT] = platform_get_irq_byname(pdev, \"plug_out\");\n+\tif (mhdp->irq[IRQ_OUT] < 0) {\n+\t\tdev_info(dev, \"No plug_out irq number\\n\");\n+\t\treturn -EPROBE_DEFER;\n+\t}\n+\n+\tcdns_mhdp_plat_call(mhdp, power_on);\n+\n+\t/* Initialize FW */\n+\tcdns_mhdp_plat_call(mhdp, firmware_init);\n+\n+\t/* HDMI FW alive check */\n+\tret = cdns_mhdp_check_alive(mhdp);\n+\tif (ret == false) {\n+\t\tdev_err(dev, \"NO HDMI FW running\\n\");\n+\t\treturn -ENXIO;\n+\t}\n+\n+\t/* Enable Hotplug Detect thread */\n+\tirq_set_status_flags(mhdp->irq[IRQ_IN], IRQ_NOAUTOEN);\n+\tret = devm_request_threaded_irq(dev, mhdp->irq[IRQ_IN],\n+\t\t\t\t\tNULL, cdns_hdmi_irq_thread,\n+\t\t\t\t\tIRQF_ONESHOT, dev_name(dev),\n+\t\t\t\t\tmhdp);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"can't claim irq %d\\n\",\n+\t\t\t\t\t\tmhdp->irq[IRQ_IN]);\n+\t\treturn -EINVAL;\n+\t}\n+\t\n+\tirq_set_status_flags(mhdp->irq[IRQ_OUT], IRQ_NOAUTOEN);\n+\tret = devm_request_threaded_irq(dev, mhdp->irq[IRQ_OUT],\n+\t\t\t\t\tNULL, cdns_hdmi_irq_thread,\n+\t\t\t\t\tIRQF_ONESHOT, dev_name(dev),\n+\t\t\t\t\tmhdp);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"can't claim irq %d\\n\",\n+\t\t\t\t\t\tmhdp->irq[IRQ_OUT]);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tcdns_hdmi_parse_dt(mhdp);\n+\n+\tif (cdns_mhdp_read_hpd(mhdp))\n+\t\tenable_irq(mhdp->irq[IRQ_OUT]);\n+\telse\n+\t\tenable_irq(mhdp->irq[IRQ_IN]);\n+\n+\tmhdp->bridge.base.driver_private = mhdp;\n+\tmhdp->bridge.base.funcs = &cdns_hdmi_bridge_funcs;\n+#ifdef CONFIG_OF\n+\tmhdp->bridge.base.of_node = dev->of_node;\n+#endif\n+\n+\tmemset(&pdevinfo, 0, sizeof(pdevinfo));\n+\tpdevinfo.parent = dev;\n+\tpdevinfo.id = PLATFORM_DEVID_AUTO;\n+\n+\tdev_set_drvdata(dev, mhdp);\n+\n+\t/* register audio driver */\n+\tcdns_mhdp_register_audio_driver(dev);\n+\n+\t/* register cec driver */\n+#ifdef CONFIG_DRM_CDNS_HDMI_CEC\n+\tcdns_mhdp_register_cec_driver(dev);\n+#endif\n+\n+\treturn 0;\n+}\n+\n+static void __cdns_hdmi_remove(struct cdns_mhdp_device *mhdp)\n+{\n+\t/* unregister cec driver */\n+#ifdef CONFIG_DRM_CDNS_HDMI_CEC\n+\tcdns_mhdp_unregister_cec_driver(mhdp->dev);\n+#endif\n+\tcdns_mhdp_unregister_audio_driver(mhdp->dev);\n+}\n+\n+/* -----------------------------------------------------------------------------\n+ * Probe/remove API, used from platforms based on the DRM bridge API.\n+ */\n+int cdns_hdmi_probe(struct platform_device *pdev,\n+\t\tstruct cdns_mhdp_device *mhdp)\n+{\n+\tint ret;\n+\n+\tret  = __cdns_hdmi_probe(pdev, mhdp);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tdrm_bridge_add(&mhdp->bridge.base);\n+\n+\treturn 0;\n+}\n+EXPORT_SYMBOL_GPL(cdns_hdmi_probe);\n+\n+void cdns_hdmi_remove(struct platform_device *pdev)\n+{\n+\tstruct cdns_mhdp_device *mhdp = platform_get_drvdata(pdev);\n+\n+\tdrm_bridge_remove(&mhdp->bridge.base);\n+\n+\t__cdns_hdmi_remove(mhdp);\n+}\n+EXPORT_SYMBOL_GPL(cdns_hdmi_remove);\n+\n+/* -----------------------------------------------------------------------------\n+ * Bind/unbind API, used from platforms based on the component framework.\n+ */\n+int cdns_hdmi_bind(struct platform_device *pdev, struct drm_encoder *encoder,\n+\t\t\tstruct cdns_mhdp_device *mhdp)\n+{\n+\tint ret;\n+\n+\tret = __cdns_hdmi_probe(pdev, mhdp);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = drm_bridge_attach(encoder, &mhdp->bridge.base, NULL, 0);\n+\tif (ret) {\n+\t\tcdns_hdmi_remove(pdev);\n+\t\tDRM_ERROR(\"Failed to initialize bridge with drm\\n\");\n+\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n+}\n+EXPORT_SYMBOL_GPL(cdns_hdmi_bind);\n+\n+void cdns_hdmi_unbind(struct device *dev)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\n+\t__cdns_hdmi_remove(mhdp);\n+}\n+EXPORT_SYMBOL_GPL(cdns_hdmi_unbind);\n+\n+MODULE_AUTHOR(\"Sandor Yu <sandor.yu@nxp.com>\");\n+MODULE_DESCRIPTION(\"Cadence HDMI transmitter driver\");\n+MODULE_LICENSE(\"GPL\");\n+MODULE_ALIAS(\"platform:cdn-hdmi\");\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c\nnew file mode 100644\nindex 000000000000..86174fb633bc\n--- /dev/null\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c\n@@ -0,0 +1,395 @@\n+// SPDX-License-Identifier: GPL-2.0\n+/*\n+ * Copyright (C) Fuzhou Rockchip Electronics Co.Ltd\n+ * Author: Chris Zhong <zyw@rock-chips.com>\n+ *\n+ * This software is licensed under the terms of the GNU General Public\n+ * License version 2, as published by the Free Software Foundation, and\n+ * may be copied, distributed, and modified under those terms.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ */\n+#include <linux/clk.h>\n+#include <linux/reset.h>\n+#include <drm/bridge/cdns-mhdp.h>\n+#include <sound/hdmi-codec.h>\n+#include <drm/drm_of.h>\n+#include <drm/drm_vblank.h>\n+#include <drm/drm_print.h>\n+\n+#define CDNS_DP_SPDIF_CLK\t\t200000000\n+\n+static u32 TMDS_rate_table[7] = {\n+\t25200, 27000, 54000, 74250, 148500, 297000, 594000,\n+};\n+\n+static u32 N_table_32k[7] = {\n+/* 25200/27000/54000/74250/148500/297000/594000 */\n+\t4096, 4096, 4096, 4096, 4096, 3072, 3072,\n+};\n+\n+static u32 N_table_44k[7] = {\n+\t6272, 6272, 6272, 6272, 6272, 4704, 9408,\n+};\n+\n+static u32 N_table_48k[7] = {\n+\t6144, 6144, 6144, 6144, 6144, 5120, 6144,\n+};\n+\n+static int select_N_index(u32 pclk)\n+{\n+\tint num = sizeof(TMDS_rate_table)/sizeof(int);\n+\tint i = 0;\n+\n+\tfor (i = 0; i < num ; i++)\n+\t\tif (pclk == TMDS_rate_table[i])\n+\t\t\tbreak;\n+\n+\tif (i == num) {\n+\t\tDRM_WARN(\"pclkc %d is not supported!\\n\", pclk);\n+\t\treturn num-1;\n+\t}\n+\n+\treturn i;\n+}\n+\n+static void hdmi_audio_avi_set(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\t\tu32 channels)\n+{\n+\tstruct hdmi_audio_infoframe frame;\n+\tu8 buf[32];\n+\tint ret;\n+\n+\thdmi_audio_infoframe_init(&frame);\n+\n+\tframe.channels = channels;\n+\tframe.coding_type = HDMI_AUDIO_CODING_TYPE_STREAM;\n+\n+\tif (channels == 2)\n+\t\tframe.channel_allocation = 0;\n+\telse if (channels == 4)\n+\t\tframe.channel_allocation = 0x3;\n+\telse if (channels == 8)\n+\t\tframe.channel_allocation = 0x13;\n+\n+\tret = hdmi_audio_infoframe_pack(&frame, buf + 1, sizeof(buf) - 1);\n+\tif (ret < 0) {\n+\t\tDRM_ERROR(\"failed to pack audio infoframe: %d\\n\", ret);\n+\t\treturn;\n+\t}\n+\n+\tbuf[0] = 0;\n+\n+\tcdns_mhdp_infoframe_set(mhdp, 1, sizeof(buf), buf, HDMI_INFOFRAME_TYPE_AUDIO);\n+}\n+\n+int cdns_mhdp_audio_stop(struct cdns_mhdp_device *mhdp,\n+\t\t\t struct audio_info *audio)\n+{\n+\tint ret;\n+\n+\tif (audio->connector_type == DRM_MODE_CONNECTOR_DisplayPort) {\n+\t\tret = cdns_mhdp_reg_write(mhdp, AUDIO_PACK_CONTROL, 0);\n+\t\tif (ret) {\n+\t\t\tDRM_DEV_ERROR(mhdp->dev, \"audio stop failed: %d\\n\", ret);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n+\tcdns_mhdp_bus_write(0, mhdp, SPDIF_CTRL_ADDR);\n+\n+\t/* clearn the audio config and reset */\n+\tcdns_mhdp_bus_write(0, mhdp, AUDIO_SRC_CNTL);\n+\tcdns_mhdp_bus_write(0, mhdp, AUDIO_SRC_CNFG);\n+\tcdns_mhdp_bus_write(AUDIO_SW_RST, mhdp, AUDIO_SRC_CNTL);\n+\tcdns_mhdp_bus_write(0, mhdp, AUDIO_SRC_CNTL);\n+\n+\t/* reset smpl2pckt component  */\n+\tcdns_mhdp_bus_write(0, mhdp, SMPL2PKT_CNTL);\n+\tcdns_mhdp_bus_write(AUDIO_SW_RST, mhdp, SMPL2PKT_CNTL);\n+\tcdns_mhdp_bus_write(0, mhdp, SMPL2PKT_CNTL);\n+\n+\t/* reset FIFO */\n+\tcdns_mhdp_bus_write(AUDIO_SW_RST, mhdp, FIFO_CNTL);\n+\tcdns_mhdp_bus_write(0, mhdp, FIFO_CNTL);\n+\n+\tif (audio->format == AFMT_SPDIF_INT)\n+\t\tclk_disable_unprepare(mhdp->spdif_clk);\n+\n+\treturn 0;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_audio_stop);\n+\n+int cdns_mhdp_audio_mute(struct cdns_mhdp_device *mhdp, bool enable)\n+{\n+\tstruct audio_info *audio = &mhdp->audio_info;\n+\tint ret = true;\n+\n+\tif (audio->connector_type == DRM_MODE_CONNECTOR_DisplayPort) {\n+\t\tret = cdns_mhdp_reg_write_bit(mhdp, DP_VB_ID, 4, 1, enable);\n+\t\tif (ret)\n+\t\t\tDRM_DEV_ERROR(mhdp->dev, \"audio mute failed: %d\\n\", ret);\n+\t}\n+\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_audio_mute);\n+\n+static void cdns_mhdp_audio_config_i2s(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t       struct audio_info *audio)\n+{\n+\tint sub_pckt_num = 1, i2s_port_en_val = 0xf, i;\n+\tint idx = select_N_index(mhdp->mode.clock);\n+\tu32 val, ncts;\n+\n+\tif (audio->channels == 2) {\n+\t\tif (mhdp->dp.num_lanes == 1)\n+\t\t\tsub_pckt_num = 2;\n+\t\telse\n+\t\t\tsub_pckt_num = 4;\n+\n+\t\ti2s_port_en_val = 1;\n+\t} else if (audio->channels == 4) {\n+\t\ti2s_port_en_val = 3;\n+\t}\n+\n+\tcdns_mhdp_bus_write(0x0, mhdp, SPDIF_CTRL_ADDR);\n+\n+\tcdns_mhdp_bus_write(SYNC_WR_TO_CH_ZERO, mhdp, FIFO_CNTL);\n+\n+\tval = MAX_NUM_CH(audio->channels);\n+\tval |= NUM_OF_I2S_PORTS(audio->channels);\n+\tval |= AUDIO_TYPE_LPCM;\n+\tval |= CFG_SUB_PCKT_NUM(sub_pckt_num);\n+\tcdns_mhdp_bus_write(val, mhdp, SMPL2PKT_CNFG);\n+\n+\tif (audio->sample_width == 16)\n+\t\tval = 0;\n+\telse if (audio->sample_width == 24)\n+\t\tval = 1 << 9;\n+\telse\n+\t\tval = 2 << 9;\n+\n+\tval |= AUDIO_CH_NUM(audio->channels);\n+\tval |= I2S_DEC_PORT_EN(i2s_port_en_val);\n+\tval |= TRANS_SMPL_WIDTH_32;\n+\tcdns_mhdp_bus_write(val, mhdp, AUDIO_SRC_CNFG);\n+\n+\tfor (i = 0; i < (audio->channels + 1) / 2; i++) {\n+\t\tif (audio->sample_width == 16)\n+\t\t\tval = (0x02 << 8) | (0x02 << 20);\n+\t\telse if (audio->sample_width == 24)\n+\t\t\tval = (0x0b << 8) | (0x0b << 20);\n+\n+\t\tval |= ((2 * i) << 4) | ((2 * i + 1) << 16);\n+\t\tcdns_mhdp_bus_write(val, mhdp, STTS_BIT_CH(i));\n+\t}\n+\n+\tswitch (audio->sample_rate) {\n+\tcase 32000:\n+\t\tval = SAMPLING_FREQ(3) |\n+\t\t      ORIGINAL_SAMP_FREQ(0xc);\n+\t\tncts = N_table_32k[idx];\n+\t\tbreak;\n+\tcase 44100:\n+\t\tval = SAMPLING_FREQ(0) |\n+\t\t      ORIGINAL_SAMP_FREQ(0xf);\n+\t\tncts = N_table_44k[idx];\n+\t\tbreak;\n+\tcase 48000:\n+\t\tval = SAMPLING_FREQ(2) |\n+\t\t      ORIGINAL_SAMP_FREQ(0xd);\n+\t\tncts = N_table_48k[idx];\n+\t\tbreak;\n+\tcase 88200:\n+\t\tval = SAMPLING_FREQ(8) |\n+\t\t      ORIGINAL_SAMP_FREQ(0x7);\n+\t\tncts = N_table_44k[idx] * 2;\n+\t\tbreak;\n+\tcase 96000:\n+\t\tval = SAMPLING_FREQ(0xa) |\n+\t\t      ORIGINAL_SAMP_FREQ(5);\n+\t\tncts = N_table_48k[idx] * 2;\n+\t\tbreak;\n+\tcase 176400:\n+\t\tval = SAMPLING_FREQ(0xc) |\n+\t\t      ORIGINAL_SAMP_FREQ(3);\n+\t\tncts = N_table_44k[idx] * 4;\n+\t\tbreak;\n+\tcase 192000:\n+\tdefault:\n+\t\tval = SAMPLING_FREQ(0xe) |\n+\t\t      ORIGINAL_SAMP_FREQ(1);\n+\t\tncts = N_table_48k[idx] * 4;\n+\t\tbreak;\n+\t}\n+\tval |= 4;\n+\tcdns_mhdp_bus_write(val, mhdp, COM_CH_STTS_BITS);\n+\n+\tif (audio->connector_type == DRM_MODE_CONNECTOR_HDMIA)\n+\t\tcdns_mhdp_reg_write(mhdp, CM_I2S_CTRL, ncts | 0x4000000);\n+\n+\tcdns_mhdp_bus_write(SMPL2PKT_EN, mhdp, SMPL2PKT_CNTL);\n+\tcdns_mhdp_bus_write(I2S_DEC_START, mhdp, AUDIO_SRC_CNTL);\n+}\n+\n+static void cdns_mhdp_audio_config_spdif(struct cdns_mhdp_device *mhdp)\n+{\n+\tu32 val;\n+\n+\tcdns_mhdp_bus_write(SYNC_WR_TO_CH_ZERO, mhdp, FIFO_CNTL);\n+\n+\tval = MAX_NUM_CH(2) | AUDIO_TYPE_LPCM | CFG_SUB_PCKT_NUM(4);\n+\tcdns_mhdp_bus_write(val, mhdp, SMPL2PKT_CNFG);\n+\tcdns_mhdp_bus_write(SMPL2PKT_EN, mhdp, SMPL2PKT_CNTL);\n+\n+\tval = SPDIF_ENABLE | SPDIF_AVG_SEL | SPDIF_JITTER_BYPASS;\n+\tcdns_mhdp_bus_write(val, mhdp, SPDIF_CTRL_ADDR);\n+\n+\tclk_prepare_enable(mhdp->spdif_clk);\n+\tclk_set_rate(mhdp->spdif_clk, CDNS_DP_SPDIF_CLK);\n+}\n+\n+int cdns_mhdp_audio_config(struct cdns_mhdp_device *mhdp,\n+\t\t\t   struct audio_info *audio)\n+{\n+\tint ret;\n+\n+\t/* reset the spdif clk before config */\n+\tif (audio->format == AFMT_SPDIF_INT) {\n+\t\treset_control_assert(mhdp->spdif_rst);\n+\t\treset_control_deassert(mhdp->spdif_rst);\n+\t}\n+\n+\tif (audio->connector_type == DRM_MODE_CONNECTOR_DisplayPort) {\n+\t\tret = cdns_mhdp_reg_write(mhdp, CM_LANE_CTRL, LANE_REF_CYC);\n+\t\tif (ret)\n+\t\t\tgoto err_audio_config;\n+\n+\t\tret = cdns_mhdp_reg_write(mhdp, CM_CTRL, 0);\n+\t\tif (ret)\n+\t\t\tgoto err_audio_config;\n+\t} else {\n+\t\t/* HDMI Mode */\n+\t\tret = cdns_mhdp_reg_write(mhdp, CM_CTRL, 8);\n+\t\tif (ret)\n+\t\t\tgoto err_audio_config;\n+\t}\n+\n+\tif (audio->format == AFMT_I2S)\n+\t\tcdns_mhdp_audio_config_i2s(mhdp, audio);\n+\telse if (audio->format == AFMT_SPDIF_INT)\n+\t\tcdns_mhdp_audio_config_spdif(mhdp);\n+\n+\tif (audio->connector_type == DRM_MODE_CONNECTOR_DisplayPort)\n+\t\tret = cdns_mhdp_reg_write(mhdp, AUDIO_PACK_CONTROL, AUDIO_PACK_EN);\n+\n+\tif (audio->connector_type == DRM_MODE_CONNECTOR_HDMIA)\n+\t\thdmi_audio_avi_set(mhdp, audio->channels);\n+\n+err_audio_config:\n+\tif (ret)\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"audio config failed: %d\\n\", ret);\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_audio_config);\n+\n+static int audio_hw_params(struct device *dev,  void *data,\n+\t\t\t\t  struct hdmi_codec_daifmt *daifmt,\n+\t\t\t\t  struct hdmi_codec_params *params)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\tstruct audio_info audio = {\n+\t\t.sample_width = params->sample_width,\n+\t\t.sample_rate = params->sample_rate,\n+\t\t.channels = params->channels,\n+\t\t.connector_type = mhdp->connector.base.connector_type,\n+\t};\n+\tint ret;\n+\n+\tswitch (daifmt->fmt) {\n+\tcase HDMI_I2S:\n+\t\taudio.format = AFMT_I2S;\n+\t\tbreak;\n+\tcase HDMI_SPDIF:\n+\t\taudio.format = AFMT_SPDIF_EXT;\n+\t\tbreak;\n+\tdefault:\n+\t\tDRM_DEV_ERROR(dev, \"Invalid format %d\\n\", daifmt->fmt);\n+\t\tret = -EINVAL;\n+\t\tgoto out;\n+\t}\n+\n+\tret = cdns_mhdp_audio_config(mhdp, &audio);\n+\tif (!ret)\n+\t\tmhdp->audio_info = audio;\n+\n+out:\n+\treturn ret;\n+}\n+\n+static void audio_shutdown(struct device *dev, void *data)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\tint ret;\n+\n+\tret = cdns_mhdp_audio_stop(mhdp, &mhdp->audio_info);\n+\tif (!ret)\n+\t\tmhdp->audio_info.format = AFMT_UNUSED;\n+}\n+\n+static int audio_digital_mute(struct device *dev, void *data,\n+\t\t\t\t     bool enable)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\tint ret;\n+\n+\tret = cdns_mhdp_audio_mute(mhdp, enable);\n+\n+\treturn ret;\n+}\n+\n+static int audio_get_eld(struct device *dev, void *data,\n+\t\t\t\tu8 *buf, size_t len)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\n+\tmemcpy(buf, mhdp->connector.base.eld,\n+\t       min(sizeof(mhdp->connector.base.eld), len));\n+\n+\treturn 0;\n+}\n+\n+static const struct hdmi_codec_ops audio_codec_ops = {\n+\t.hw_params = audio_hw_params,\n+\t.audio_shutdown = audio_shutdown,\n+\t.digital_mute = audio_digital_mute,\n+\t.get_eld = audio_get_eld,\n+};\n+\n+int cdns_mhdp_register_audio_driver(struct device *dev)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\tstruct hdmi_codec_pdata codec_data = {\n+\t\t.i2s = 1,\n+\t\t.spdif = 1,\n+\t\t.ops = &audio_codec_ops,\n+\t\t.max_i2s_channels = 8,\n+\t};\n+\n+\tmhdp->audio_pdev = platform_device_register_data(\n+\t\t\t      dev, HDMI_CODEC_DRV_NAME, 1,\n+\t\t\t      &codec_data, sizeof(codec_data));\n+\n+\treturn PTR_ERR_OR_ZERO(mhdp->audio_pdev);\n+}\n+\n+void cdns_mhdp_unregister_audio_driver(struct device *dev)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\n+\tplatform_device_unregister(mhdp->audio_pdev);\n+}\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c\nnew file mode 100644\nindex 000000000000..5717bb0bcb75\n--- /dev/null\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c\n@@ -0,0 +1,341 @@\n+/*\n+ * Copyright 2019 NXP\n+ *\n+ * This program is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU General Public License\n+ * as published by the Free Software Foundation; either version 2\n+ * of the License, or (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ */\n+#include <linux/module.h>\n+#include <linux/workqueue.h>\n+#include <linux/kthread.h>\n+#include <linux/freezer.h>\n+#include <drm/bridge/cdns-mhdp.h>\n+\n+#define CEC_NAME\t\"cdns-mhdp-cec\"\n+\n+#define REG_ADDR_OFF 4\n+\n+/* regsiter define */\n+#define TX_MSG_HEADER 0x33800\n+#define TX_MSG_LENGTH 0x33840\n+#define TX_MSG_CMD 0x33844\n+#define RX_MSG_CMD 0x33850\n+#define RX_CLEAR_BUF 0x33854\n+#define LOGICAL_ADDRESS_LA0 0x33858\n+\n+#define CLK_DIV_MSB 0x3386c\n+#define CLK_DIV_LSB 0x33870\n+#define RX_MSG_DATA1 0x33900\n+#define RX_MSG_LENGTH 0x33940\n+#define RX_MSG_STATUS 0x33944\n+#define NUM_OF_MSG_RX_BUF 0x33948\n+#define TX_MSG_STATUS 0x3394c\n+#define DB_L_TIMER 0x33980\n+\n+/**\n+ * CEC Transceiver operation.\n+ */\n+enum {\n+\tCEC_TX_STOP,\n+\tCEC_TX_TRANSMIT,\n+\tCEC_TX_ABORT,\n+\tCEC_TX_ABORT_AND_TRANSMIT\n+};\n+\n+/**\n+ * CEC Transceiver status.\n+ */\n+enum {\n+\tCEC_STS_IDLE,\n+\tCEC_STS_BUSY,\n+\tCEC_STS_SUCCESS,\n+\tCEC_STS_ERROR\n+};\n+\n+/**\n+ * CEC Receiver operation.\n+ */\n+enum {\n+\tCEC_RX_STOP,\n+\tCEC_RX_READ,\n+\tCEC_RX_DISABLE,\n+\tCEC_RX_ABORT_AND_CLR_FIFO\n+};\n+/**\n+ * Maximum number of Messages in the RX Buffers.\n+ */\n+#define CEC_MAX_RX_MSGS 2\n+\n+static u32 mhdp_cec_read(struct cdns_mhdp_cec *cec, u32 offset)\n+{\n+\tstruct cdns_mhdp_device *mhdp =\n+\t\t\tcontainer_of(cec, struct cdns_mhdp_device, hdmi.cec);\n+\treturn cdns_mhdp_bus_read(mhdp, offset);\n+}\n+\n+static void mhdp_cec_write(struct cdns_mhdp_cec *cec, u32 offset, u32 val)\n+{\n+\tstruct cdns_mhdp_device *mhdp =\n+\t\t\tcontainer_of(cec, struct cdns_mhdp_device, hdmi.cec);\n+\tcdns_mhdp_bus_write(val, mhdp, offset);\n+}\n+\n+static void mhdp_cec_clear_rx_buffer(struct cdns_mhdp_cec *cec)\n+{\n+\tmhdp_cec_write(cec, RX_CLEAR_BUF, 1);\n+\tmhdp_cec_write(cec, RX_CLEAR_BUF, 0);\n+}\n+\n+static void mhdp_cec_set_divider(struct cdns_mhdp_cec *cec)\n+{\n+\tstruct cdns_mhdp_device *mhdp =\n+\t\t\tcontainer_of(cec, struct cdns_mhdp_device, hdmi.cec);\n+\tu32 clk_div;\n+\n+\t/* Set clock divider */\n+\tclk_div = cdns_mhdp_get_fw_clk(mhdp) * 10;\n+\n+\tmhdp_cec_write(cec, CLK_DIV_MSB,\n+\t\t\t  (clk_div >> 8) & 0xFF);\n+\tmhdp_cec_write(cec, CLK_DIV_LSB, clk_div & 0xFF);\n+}\n+\n+static u32 mhdp_cec_read_message(struct cdns_mhdp_cec *cec)\n+{\n+\tstruct cec_msg *msg = &cec->msg;\n+\tint len;\n+\tint i;\n+\n+\tmhdp_cec_write(cec, RX_MSG_CMD, CEC_RX_READ);\n+\n+\tlen = mhdp_cec_read(cec, RX_MSG_LENGTH);\n+\tmsg->len = len + 1;\n+\tdev_dbg(cec->dev, \"RX MSG len =%d\\n\", len);\n+\n+\t/* Read RX MSG bytes */\n+\tfor (i = 0; i < msg->len; ++i) {\n+\t\tmsg->msg[i] = (u8) mhdp_cec_read(cec, RX_MSG_DATA1 + (i * REG_ADDR_OFF));\n+\t\tdev_dbg(cec->dev, \"RX MSG[%d]=0x%x\\n\", i, msg->msg[i]);\n+\t}\n+\n+\tmhdp_cec_write(cec, RX_MSG_CMD, CEC_RX_STOP);\n+\n+\treturn true;\n+}\n+\n+static u32 mhdp_cec_write_message(struct cdns_mhdp_cec *cec, struct cec_msg *msg)\n+{\n+\tu8 i;\n+\n+\tmhdp_cec_write(cec, TX_MSG_CMD, CEC_TX_STOP);\n+\n+\tif (msg->len > CEC_MAX_MSG_SIZE) {\n+\t\tdev_err(cec->dev, \"Invalid MSG size!\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tfor (i = 0; i < msg->len; ++i)\n+\t\tprintk(\"msg[%d]=0x%x\\n\",i, msg->msg[i]);\n+\n+\t/* Write Message to register */\n+\tfor (i = 0; i < msg->len; ++i) {\n+\t\tmhdp_cec_write(cec, TX_MSG_HEADER + (i * REG_ADDR_OFF),\n+\t\t\t  msg->msg[i]);\n+\t}\n+\t/* Write Message Length (payload + opcode) */\n+\tmhdp_cec_write(cec, TX_MSG_LENGTH, msg->len - 1);\n+\n+\tmhdp_cec_write(cec, TX_MSG_CMD, CEC_TX_TRANSMIT);\n+\n+\treturn true;\n+}\n+\n+static int mhdp_cec_set_logical_addr(struct cdns_mhdp_cec *cec, u32 la)\n+{\n+\tu8 la_reg;\n+\tu8 i;\n+\n+\tif (la == CEC_LOG_ADDR_INVALID)\n+\t\t/* invalid all LA address */\n+\t\tfor (i = 0; i < CEC_MAX_LOG_ADDRS; ++i) {\n+\t\t\tmhdp_cec_write(cec, LOGICAL_ADDRESS_LA0 + (i * REG_ADDR_OFF), 0);\n+\t\t\treturn 0;\n+\t\t}\n+\n+\t/* In fact cdns mhdp cec could support max 5 La address */\n+\tfor (i = 0; i < CEC_MAX_LOG_ADDRS; ++i) {\n+\t\tla_reg = mhdp_cec_read(cec, LOGICAL_ADDRESS_LA0 + (i * REG_ADDR_OFF));\n+\t\t/* Check LA already used */\n+\t\tif (la_reg & 0x10)\n+\t\t\tcontinue;\n+\n+\t\tif ((la_reg & 0xF) == la) {\n+\t\t\tdev_warn(cec->dev, \"Warning. LA already in use.\\n\");\n+\t\t\treturn 0;\n+\t\t}\n+\n+\t\tla = (la & 0xF) | (1 << 4);\n+\n+\t\tmhdp_cec_write(cec, LOGICAL_ADDRESS_LA0 + (i * REG_ADDR_OFF), la);\n+\t\treturn 0;\n+\t}\n+\n+\tdev_warn(cec->dev, \"All LA in use\\n\");\n+\n+\treturn -ENXIO;\n+}\n+\n+static int mhdp_cec_poll_worker(void *_cec)\n+{\n+\tstruct cdns_mhdp_cec *cec = (struct cdns_mhdp_cec *)_cec;\n+\tint num_rx_msgs, i;\n+\tint sts;\n+\n+\tset_freezable();\n+\n+\tfor (;;) {\n+\t\tif (kthread_freezable_should_stop(NULL))\n+\t\t\tbreak;\n+\n+\t\t/* Check TX State */\n+\t\tsts = mhdp_cec_read(cec, TX_MSG_STATUS);\n+\t\tswitch (sts) {\n+\t\tcase CEC_STS_SUCCESS:\n+\t\t\tcec_transmit_done(cec->adap, CEC_TX_STATUS_OK, 0, 0, 0,\n+\t\t\t\t\t  0);\n+\t\t\tmhdp_cec_write(cec, TX_MSG_CMD, CEC_TX_STOP);\n+\t\t\tbreak;\n+\t\tcase CEC_STS_ERROR:\n+\t\t\tmhdp_cec_write(cec, TX_MSG_CMD, CEC_TX_STOP);\n+\t\t\tcec_transmit_done(cec->adap,\n+\t\t\t\t\t  CEC_TX_STATUS_MAX_RETRIES |\n+\t\t\t\t\t  CEC_TX_STATUS_NACK, 0, 1, 0, 0);\n+\t\t\tbreak;\n+\t\tcase CEC_STS_BUSY:\n+\t\tdefault:\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\t/* Check RX State */\n+\t\tsts = mhdp_cec_read(cec, RX_MSG_STATUS);\n+\t\tnum_rx_msgs = mhdp_cec_read(cec, NUM_OF_MSG_RX_BUF);\n+\t\tswitch (sts) {\n+\t\tcase CEC_STS_SUCCESS:\n+\t\t\tif (num_rx_msgs == 0xf)\n+\t\t\t\tnum_rx_msgs = CEC_MAX_RX_MSGS;\n+\n+\t\t\tif (num_rx_msgs > CEC_MAX_RX_MSGS) {\n+\t\t\t\tdev_err(cec->dev, \"Error rx msg num %d\\n\",\n+\t\t\t\t\tnum_rx_msgs);\n+\t\t\t\tmhdp_cec_clear_rx_buffer(cec);\n+\t\t\t\tbreak;\n+\t\t\t}\n+\n+\t\t\t/* Rx FIFO Depth 2 RX MSG */\n+\t\t\tfor (i = 0; i < num_rx_msgs; i++) {\n+\t\t\t\tmhdp_cec_read_message(cec);\n+\t\t\t\tcec->msg.rx_status = CEC_RX_STATUS_OK;\n+\t\t\t\tcec_received_msg(cec->adap, &cec->msg);\n+\t\t\t}\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tif (!kthread_should_stop())\n+\t\t\tschedule_timeout_idle(20);\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int mhdp_cec_adap_enable(struct cec_adapter *adap, bool enable)\n+{\n+\tstruct cdns_mhdp_cec *cec = cec_get_drvdata(adap);\n+\n+\tif (enable) {\n+\t\tmhdp_cec_write(cec, DB_L_TIMER, 0x10);\n+\t\tmhdp_cec_set_divider(cec);\n+\t} else\n+\t\tmhdp_cec_set_divider(cec);\n+\n+\treturn 0;\n+}\n+\n+static int mhdp_cec_adap_log_addr(struct cec_adapter *adap, u8 addr)\n+{\n+\tstruct cdns_mhdp_cec *cec = cec_get_drvdata(adap);\n+\n+\treturn mhdp_cec_set_logical_addr(cec, addr);\n+}\n+\n+static int mhdp_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,\n+\t\t\t\t u32 signal_free_time, struct cec_msg *msg)\n+{\n+\tstruct cdns_mhdp_cec *cec = cec_get_drvdata(adap);\n+\n+\tmhdp_cec_write_message(cec, msg);\n+\n+\treturn 0;\n+}\n+\n+static const struct cec_adap_ops cdns_mhdp_cec_adap_ops = {\n+\t.adap_enable = mhdp_cec_adap_enable,\n+\t.adap_log_addr = mhdp_cec_adap_log_addr,\n+\t.adap_transmit = mhdp_cec_adap_transmit,\n+};\n+\n+int cdns_mhdp_register_cec_driver(struct device *dev)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\tstruct cdns_mhdp_cec *cec = &mhdp->hdmi.cec;\n+\tint ret;\n+\n+\tcec->adap = cec_allocate_adapter(&cdns_mhdp_cec_adap_ops, cec,\n+\t\t\t\t\t CEC_NAME,\n+\t\t\t\t\t CEC_CAP_PHYS_ADDR | CEC_CAP_LOG_ADDRS |\n+\t\t\t\t\t CEC_CAP_TRANSMIT | CEC_CAP_PASSTHROUGH\n+\t\t\t\t\t | CEC_CAP_RC, CEC_MAX_LOG_ADDRS);\n+\tret = PTR_ERR_OR_ZERO(cec->adap);\n+\tif (ret)\n+\t\treturn ret;\n+\tret = cec_register_adapter(cec->adap, dev);\n+\tif (ret) {\n+\t\tcec_delete_adapter(cec->adap);\n+\t\treturn ret;\n+\t}\n+\n+\tcec->dev = dev;\n+\n+\tcec->cec_worker = kthread_create(mhdp_cec_poll_worker, cec, \"cdns-mhdp-cec\");\n+\tif (IS_ERR(cec->cec_worker))\n+\t\tdev_err(cec->dev, \"failed  create hdp cec thread\\n\");\n+\n+\twake_up_process(cec->cec_worker);\n+\n+\tdev_dbg(dev, \"CEC successfuly probed\\n\");\n+\treturn 0;\n+}\n+\n+int cdns_mhdp_unregister_cec_driver(struct device *dev)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\tstruct cdns_mhdp_cec *cec = &mhdp->hdmi.cec;\n+\n+\tif (cec->cec_worker) {\n+\t\tkthread_stop(cec->cec_worker);\n+\t\tcec->cec_worker = NULL;\n+\t}\n+\tcec_unregister_adapter(cec->adap);\n+\treturn 0;\n+}\n+\n+MODULE_AUTHOR(\"Sandor.Yu@NXP.com\");\n+MODULE_LICENSE(\"GPL\");\n+MODULE_DESCRIPTION(\"NXP CDNS MHDP HDMI CEC driver\");\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\nnew file mode 100644\nindex 000000000000..91d1cfd4b2af\n--- /dev/null\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\n@@ -0,0 +1,795 @@\n+// SPDX-License-Identifier: GPL-2.0\n+/*\n+ * Copyright (C) Fuzhou Rockchip Electronics Co.Ltd\n+ * Author: Chris Zhong <zyw@rock-chips.com>\n+ *\n+ * This software is licensed under the terms of the GNU General Public\n+ * License version 2, as published by the Free Software Foundation, and\n+ * may be copied, distributed, and modified under those terms.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ */\n+\n+#include <linux/clk.h>\n+#include <linux/delay.h>\n+#include <linux/device.h>\n+#include <linux/io.h>\n+#include <linux/iopoll.h>\n+#include <linux/reset.h>\n+\n+#include <asm/unaligned.h>\n+\n+#include <drm/bridge/cdns-mhdp.h>\n+#include <drm/drm_modes.h>\n+#include <drm/drm_print.h>\n+#include <linux/regmap.h>\n+\n+#define CDNS_DP_SPDIF_CLK\t\t200000000\n+#define FW_ALIVE_TIMEOUT_US\t\t1000000\n+#define MAILBOX_RETRY_US\t\t1000\n+#define MAILBOX_TIMEOUT_US\t\t5000000\n+\n+#define mhdp_readx_poll_timeout(op, addr, offset, val, cond, sleep_us, timeout_us)\t\\\n+({ \\\n+\tu64 __timeout_us = (timeout_us); \\\n+\tunsigned long __sleep_us = (sleep_us); \\\n+\tktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \\\n+\tmight_sleep_if((__sleep_us) != 0); \\\n+\tfor (;;) { \\\n+\t\t(val) = op(addr, offset); \\\n+\t\tif (cond) \\\n+\t\t\tbreak; \\\n+\t\tif (__timeout_us && \\\n+\t\t    ktime_compare(ktime_get(), __timeout) > 0) { \\\n+\t\t\t(val) = op(addr, offset); \\\n+\t\t\tbreak; \\\n+\t\t} \\\n+\t\tif (__sleep_us) \\\n+\t\t\tusleep_range((__sleep_us >> 2) + 1, __sleep_us); \\\n+\t} \\\n+\t(cond) ? 0 : -ETIMEDOUT; \\\n+})\n+\n+u32 cdns_mhdp_bus_read(struct cdns_mhdp_device *mhdp, u32 offset)\n+{\n+\tu32 val;\n+\n+\tmutex_lock(&mhdp->iolock);\n+\n+\tif (mhdp->bus_type == BUS_TYPE_LOW4K_SAPB) {\n+\t\t/* Remap address to low 4K SAPB bus */\n+\t\twritel(offset >> 12, mhdp->regs_sec + 0xc);\n+\t\tval = readl((offset & 0xfff) + mhdp->regs_base);\n+\t} else if (mhdp->bus_type == BUS_TYPE_LOW4K_APB) {\n+\t\t/* Remap address to low 4K memory */\n+\t\twritel(offset >> 12, mhdp->regs_sec + 8);\n+\t\tval = readl((offset & 0xfff) + mhdp->regs_base);\n+\t} else if (mhdp->bus_type == BUS_TYPE_NORMAL_SAPB)\n+\t\tval = readl(mhdp->regs_sec + offset);\n+\telse\n+\t\tval = readl(mhdp->regs_base + offset);\n+\n+\tmutex_unlock(&mhdp->iolock);\n+\n+\treturn val;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_bus_read);\n+\n+void cdns_mhdp_bus_write(u32 val, struct cdns_mhdp_device *mhdp, u32 offset)\n+{\n+\tmutex_lock(&mhdp->iolock);\n+\n+\tif (mhdp->bus_type == BUS_TYPE_LOW4K_SAPB) {\n+\t\t/* Remap address to low 4K SAPB bus */\n+\t\twritel(offset >> 12, mhdp->regs_sec + 0xc);\n+\t\twritel(val, (offset & 0xfff) + mhdp->regs_base);\n+\t} else if (mhdp->bus_type == BUS_TYPE_LOW4K_APB) {\n+\t\t/* Remap address to low 4K memory */\n+\t\twritel(offset >> 12, mhdp->regs_sec + 8);\n+\t\twritel(val, (offset & 0xfff) + mhdp->regs_base);\n+\t} else if (mhdp->bus_type == BUS_TYPE_NORMAL_SAPB)\n+\t\twritel(val, mhdp->regs_sec + offset);\n+\telse\n+\t\twritel(val, mhdp->regs_base + offset);\n+\n+\tmutex_unlock(&mhdp->iolock);\n+}\n+EXPORT_SYMBOL(cdns_mhdp_bus_write);\n+\n+u32 cdns_mhdp_get_fw_clk(struct cdns_mhdp_device *mhdp)\n+{\n+\treturn cdns_mhdp_bus_read(mhdp, SW_CLK_H);\n+}\n+EXPORT_SYMBOL(cdns_mhdp_get_fw_clk);\n+\n+void cdns_mhdp_set_fw_clk(struct cdns_mhdp_device *mhdp, unsigned long clk)\n+{\n+\tcdns_mhdp_bus_write(clk / 1000000, mhdp, SW_CLK_H);\n+}\n+EXPORT_SYMBOL(cdns_mhdp_set_fw_clk);\n+\n+void cdns_mhdp_clock_reset(struct cdns_mhdp_device *mhdp)\n+{\n+\tu32 val;\n+\n+\tval = DPTX_FRMR_DATA_CLK_RSTN_EN |\n+\t      DPTX_FRMR_DATA_CLK_EN |\n+\t      DPTX_PHY_DATA_RSTN_EN |\n+\t      DPTX_PHY_DATA_CLK_EN |\n+\t      DPTX_PHY_CHAR_RSTN_EN |\n+\t      DPTX_PHY_CHAR_CLK_EN |\n+\t      SOURCE_AUX_SYS_CLK_RSTN_EN |\n+\t      SOURCE_AUX_SYS_CLK_EN |\n+\t      DPTX_SYS_CLK_RSTN_EN |\n+\t      DPTX_SYS_CLK_EN |\n+\t      CFG_DPTX_VIF_CLK_RSTN_EN |\n+\t      CFG_DPTX_VIF_CLK_EN;\n+\tcdns_mhdp_bus_write(val, mhdp, SOURCE_DPTX_CAR);\n+\n+\tval = SOURCE_PHY_RSTN_EN | SOURCE_PHY_CLK_EN;\n+\tcdns_mhdp_bus_write(val, mhdp, SOURCE_PHY_CAR);\n+\n+\tval = SOURCE_PKT_SYS_RSTN_EN |\n+\t      SOURCE_PKT_SYS_CLK_EN |\n+\t      SOURCE_PKT_DATA_RSTN_EN |\n+\t      SOURCE_PKT_DATA_CLK_EN;\n+\tcdns_mhdp_bus_write(val, mhdp, SOURCE_PKT_CAR);\n+\n+\tval = SPDIF_CDR_CLK_RSTN_EN |\n+\t      SPDIF_CDR_CLK_EN |\n+\t      SOURCE_AIF_SYS_RSTN_EN |\n+\t      SOURCE_AIF_SYS_CLK_EN |\n+\t      SOURCE_AIF_CLK_RSTN_EN |\n+\t      SOURCE_AIF_CLK_EN;\n+\tcdns_mhdp_bus_write(val, mhdp, SOURCE_AIF_CAR);\n+\n+\tval = SOURCE_CIPHER_SYSTEM_CLK_RSTN_EN |\n+\t      SOURCE_CIPHER_SYS_CLK_EN |\n+\t      SOURCE_CIPHER_CHAR_CLK_RSTN_EN |\n+\t      SOURCE_CIPHER_CHAR_CLK_EN;\n+\tcdns_mhdp_bus_write(val, mhdp, SOURCE_CIPHER_CAR);\n+\n+\tval = SOURCE_CRYPTO_SYS_CLK_RSTN_EN |\n+\t      SOURCE_CRYPTO_SYS_CLK_EN;\n+\tcdns_mhdp_bus_write(val, mhdp, SOURCE_CRYPTO_CAR);\n+\n+\t/* enable Mailbox and PIF interrupt */\n+\tcdns_mhdp_bus_write(0, mhdp, APB_INT_MASK);\n+}\n+EXPORT_SYMBOL(cdns_mhdp_clock_reset);\n+\n+bool cdns_mhdp_check_alive(struct cdns_mhdp_device *mhdp)\n+{\n+\tu32  alive, newalive;\n+\tu8 retries_left = 50;\n+\n+\talive = cdns_mhdp_bus_read(mhdp, KEEP_ALIVE);\n+\n+\twhile (retries_left--) {\n+\t\tudelay(2);\n+\n+\t\tnewalive = cdns_mhdp_bus_read(mhdp, KEEP_ALIVE);\n+\t\tif (alive == newalive)\n+\t\t\tcontinue;\n+\t\treturn true;\n+\t}\n+\treturn false;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_check_alive);\n+\n+static int mhdp_mailbox_read(struct cdns_mhdp_device *mhdp)\n+{\n+\tint val, ret;\n+\n+\tret = mhdp_readx_poll_timeout(cdns_mhdp_bus_read, mhdp, MAILBOX_EMPTY_ADDR,\n+\t\t\t\t val, !val, MAILBOX_RETRY_US,\n+\t\t\t\t MAILBOX_TIMEOUT_US);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\treturn cdns_mhdp_bus_read(mhdp, MAILBOX0_RD_DATA) & 0xff;\n+}\n+\n+static int mhdp_mailbox_write(struct cdns_mhdp_device *mhdp, u8 val)\n+{\n+\tint ret, full;\n+\n+\tret = mhdp_readx_poll_timeout(cdns_mhdp_bus_read, mhdp, MAILBOX_FULL_ADDR,\n+\t\t\t\t full, !full, MAILBOX_RETRY_US,\n+\t\t\t\t MAILBOX_TIMEOUT_US);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tcdns_mhdp_bus_write(val, mhdp, MAILBOX0_WR_DATA);\n+\n+\treturn 0;\n+}\n+\n+int cdns_mhdp_mailbox_validate_receive(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\t      u8 module_id, u8 opcode,\n+\t\t\t\t\t      u16 req_size)\n+{\n+\tu32 mbox_size, i;\n+\tu8 header[4];\n+\tint ret;\n+\n+\t/* read the header of the message */\n+\tfor (i = 0; i < 4; i++) {\n+\t\tret = mhdp_mailbox_read(mhdp);\n+\t\tif (ret < 0)\n+\t\t\treturn ret;\n+\n+\t\theader[i] = ret;\n+\t}\n+\n+\tmbox_size = get_unaligned_be16(header + 2);\n+\n+\tif (opcode != header[0] || module_id != header[1] ||\n+\t    req_size != mbox_size) {\n+\t\t/*\n+\t\t * If the message in mailbox is not what we want, we need to\n+\t\t * clear the mailbox by reading its contents.\n+\t\t */\n+\t\tfor (i = 0; i < mbox_size; i++)\n+\t\t\tif (mhdp_mailbox_read(mhdp) < 0)\n+\t\t\t\tbreak;\n+\n+\t\treturn -EINVAL;\n+\t}\n+\n+\treturn 0;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_mailbox_validate_receive);\n+\n+int cdns_mhdp_mailbox_read_receive(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\t  u8 *buff, u16 buff_size)\n+{\n+\tu32 i;\n+\tint ret;\n+\n+\tfor (i = 0; i < buff_size; i++) {\n+\t\tret = mhdp_mailbox_read(mhdp);\n+\t\tif (ret < 0)\n+\t\t\treturn ret;\n+\n+\t\tbuff[i] = ret;\n+\t}\n+\n+\treturn 0;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_mailbox_read_receive);\n+\n+int cdns_mhdp_mailbox_send(struct cdns_mhdp_device *mhdp, u8 module_id,\n+\t\t\t\t  u8 opcode, u16 size, u8 *message)\n+{\n+\tu8 header[4];\n+\tint ret, i;\n+\n+\theader[0] = opcode;\n+\theader[1] = module_id;\n+\tput_unaligned_be16(size, header + 2);\n+\n+\tfor (i = 0; i < 4; i++) {\n+\t\tret = mhdp_mailbox_write(mhdp, header[i]);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n+\tfor (i = 0; i < size; i++) {\n+\t\tret = mhdp_mailbox_write(mhdp, message[i]);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_mailbox_send);\n+\n+int cdns_mhdp_reg_read(struct cdns_mhdp_device *mhdp, u32 addr)\n+{\n+\tu8 msg[4], resp[8];\n+\tu32 val;\n+\tint ret;\n+\n+\tif (addr == 0) {\n+\t\tret = -EINVAL;\n+\t\tgoto err_reg_read;\n+\t}\n+\n+\tput_unaligned_be32(addr, msg);\n+\n+\tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_GENERAL,\n+\t\t\t\t     GENERAL_READ_REGISTER,\n+\t\t\t\t     sizeof(msg), msg);\n+\tif (ret)\n+\t\tgoto err_reg_read;\n+\n+\tret = cdns_mhdp_mailbox_validate_receive(mhdp, MB_MODULE_ID_GENERAL,\n+\t\t\t\t\t\t GENERAL_READ_REGISTER,\n+\t\t\t\t\t\t sizeof(resp));\n+\tif (ret)\n+\t\tgoto err_reg_read;\n+\n+\tret = cdns_mhdp_mailbox_read_receive(mhdp, resp, sizeof(resp));\n+\tif (ret)\n+\t\tgoto err_reg_read;\n+\n+\t/* Returned address value should be the same as requested */\n+\tif (memcmp(msg, resp, sizeof(msg))) {\n+\t\tret = -EINVAL;\n+\t\tgoto err_reg_read;\n+\t}\n+\n+\tval = get_unaligned_be32(resp + 4);\n+\n+\treturn val;\n+err_reg_read:\n+\tDRM_DEV_ERROR(mhdp->dev, \"Failed to read register.\\n\");\n+\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_reg_read);\n+\n+int cdns_mhdp_reg_write(struct cdns_mhdp_device *mhdp, u32 addr, u32 val)\n+{\n+\tu8 msg[8];\n+\n+\tput_unaligned_be32(addr, msg);\n+\tput_unaligned_be32(val, msg + 4);\n+\n+\treturn cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_GENERAL,\n+\t\t\t\t      GENERAL_WRITE_REGISTER, sizeof(msg), msg);\n+}\n+EXPORT_SYMBOL(cdns_mhdp_reg_write);\n+\n+int cdns_mhdp_reg_write_bit(struct cdns_mhdp_device *mhdp, u16 addr,\n+\t\t\t\t   u8 start_bit, u8 bits_no, u32 val)\n+{\n+\tu8 field[8];\n+\n+\tput_unaligned_be16(addr, field);\n+\tfield[2] = start_bit;\n+\tfield[3] = bits_no;\n+\tput_unaligned_be32(val, field + 4);\n+\n+\treturn cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_DP_TX,\n+\t\t\t\t      DPTX_WRITE_FIELD, sizeof(field), field);\n+}\n+EXPORT_SYMBOL(cdns_mhdp_reg_write_bit);\n+\n+int cdns_mhdp_load_firmware(struct cdns_mhdp_device *mhdp, const u32 *i_mem,\n+\t\t\t    u32 i_size, const u32 *d_mem, u32 d_size)\n+{\n+\tu32 reg;\n+\tint i, ret;\n+\n+\t/* reset ucpu before load firmware*/\n+\tcdns_mhdp_bus_write(APB_IRAM_PATH | APB_DRAM_PATH | APB_XT_RESET,\n+\t       mhdp, APB_CTRL);\n+\n+\tfor (i = 0; i < i_size; i += 4)\n+\t\tcdns_mhdp_bus_write(*i_mem++, mhdp, ADDR_IMEM + i);\n+\n+\tfor (i = 0; i < d_size; i += 4)\n+\t\tcdns_mhdp_bus_write(*d_mem++, mhdp, ADDR_DMEM + i);\n+\n+\t/* un-reset ucpu */\n+\tcdns_mhdp_bus_write(0, mhdp, APB_CTRL);\n+\n+\t/* check the keep alive register to make sure fw working */\n+\tret = mhdp_readx_poll_timeout(cdns_mhdp_bus_read, mhdp, KEEP_ALIVE,\n+\t\t\t\t reg, reg, 2000, FW_ALIVE_TIMEOUT_US);\n+\tif (ret < 0) {\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"failed to loaded the FW reg = %x\\n\",\n+\t\t\t      reg);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\treg = cdns_mhdp_bus_read(mhdp, VER_L) & 0xff;\n+\tmhdp->fw_version = reg;\n+\treg = cdns_mhdp_bus_read(mhdp, VER_H) & 0xff;\n+\tmhdp->fw_version |= reg << 8;\n+\treg = cdns_mhdp_bus_read(mhdp, VER_LIB_L_ADDR) & 0xff;\n+\tmhdp->fw_version |= reg << 16;\n+\treg = cdns_mhdp_bus_read(mhdp, VER_LIB_H_ADDR) & 0xff;\n+\tmhdp->fw_version |= reg << 24;\n+\n+\tDRM_DEV_DEBUG(mhdp->dev, \"firmware version: %x\\n\", mhdp->fw_version);\n+\n+\treturn 0;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_load_firmware);\n+\n+int cdns_mhdp_set_firmware_active(struct cdns_mhdp_device *mhdp, bool enable)\n+{\n+\tu8 msg[5];\n+\tint ret, i;\n+\n+\tmsg[0] = GENERAL_MAIN_CONTROL;\n+\tmsg[1] = MB_MODULE_ID_GENERAL;\n+\tmsg[2] = 0;\n+\tmsg[3] = 1;\n+\tmsg[4] = enable ? FW_ACTIVE : FW_STANDBY;\n+\n+\tfor (i = 0; i < sizeof(msg); i++) {\n+\t\tret = mhdp_mailbox_write(mhdp, msg[i]);\n+\t\tif (ret)\n+\t\t\tgoto err_set_firmware_active;\n+\t}\n+\n+\t/* read the firmware state */\n+\tfor (i = 0; i < sizeof(msg); i++)  {\n+\t\tret = mhdp_mailbox_read(mhdp);\n+\t\tif (ret < 0)\n+\t\t\tgoto err_set_firmware_active;\n+\n+\t\tmsg[i] = ret;\n+\t}\n+\n+\tret = 0;\n+\n+err_set_firmware_active:\n+\tif (ret < 0)\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"set firmware active failed\\n\");\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_set_firmware_active);\n+\n+int cdns_mhdp_set_host_cap(struct cdns_mhdp_device *mhdp, bool flip)\n+{\n+\tu8 msg[8];\n+\tint ret;\n+\n+\tmsg[0] = drm_dp_link_rate_to_bw_code(mhdp->dp.rate);\n+\tmsg[1] = mhdp->dp.num_lanes | SCRAMBLER_EN;\n+\tmsg[2] = VOLTAGE_LEVEL_2;\n+\tmsg[3] = PRE_EMPHASIS_LEVEL_3;\n+\tmsg[4] = PTS1 | PTS2 | PTS3 | PTS4;\n+\tmsg[5] = FAST_LT_NOT_SUPPORT;\n+\tmsg[6] = flip ? LANE_MAPPING_FLIPPED : LANE_MAPPING_NORMAL;\n+\tmsg[7] = ENHANCED;\n+\n+\tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_DP_TX,\n+\t\t\t\t     DPTX_SET_HOST_CAPABILITIES,\n+\t\t\t\t     sizeof(msg), msg);\n+\tif (ret)\n+\t\tgoto err_set_host_cap;\n+\n+/* TODO Sandor */\n+//\tret = cdns_mhdp_reg_write(mhdp, DP_AUX_SWAP_INVERSION_CONTROL,\n+//\t\t\t\t  AUX_HOST_INVERT);\n+\n+err_set_host_cap:\n+\tif (ret)\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"set host cap failed: %d\\n\", ret);\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_set_host_cap);\n+\n+int cdns_mhdp_event_config(struct cdns_mhdp_device *mhdp)\n+{\n+\tu8 msg[5];\n+\tint ret;\n+\n+\tmemset(msg, 0, sizeof(msg));\n+\n+\tmsg[0] = MHDP_EVENT_ENABLE_HPD | MHDP_EVENT_ENABLE_TRAINING;\n+\n+\tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_DP_TX,\n+\t\t\t\t     DPTX_ENABLE_EVENT, sizeof(msg), msg);\n+\tif (ret)\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"set event config failed: %d\\n\", ret);\n+\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_event_config);\n+\n+u32 cdns_mhdp_get_event(struct cdns_mhdp_device *mhdp)\n+{\n+\treturn cdns_mhdp_bus_read(mhdp, SW_EVENTS0);\n+}\n+EXPORT_SYMBOL(cdns_mhdp_get_event);\n+\n+int cdns_mhdp_read_hpd(struct cdns_mhdp_device *mhdp)\n+{\n+\tu8 status;\n+\tint ret;\n+\n+\tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_GENERAL, GENERAL_GET_HPD_STATE,\n+\t\t\t\t  0, NULL);\n+\tif (ret)\n+\t\tgoto err_get_hpd;\n+\n+\tret = cdns_mhdp_mailbox_validate_receive(mhdp, MB_MODULE_ID_GENERAL,\n+\t\t\t\t\t\t\tGENERAL_GET_HPD_STATE, sizeof(status));\n+\tif (ret)\n+\t\tgoto err_get_hpd;\n+\n+\tret = cdns_mhdp_mailbox_read_receive(mhdp, &status, sizeof(status));\n+\tif (ret)\n+\t\tgoto err_get_hpd;\n+\n+\treturn status;\n+\n+err_get_hpd:\n+\tDRM_ERROR(\"read hpd  failed: %d\\n\", ret);\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_read_hpd);\n+\n+int cdns_mhdp_get_edid_block(void *data, u8 *edid,\n+\t\t\t  unsigned int block, size_t length)\n+{\n+\tstruct cdns_mhdp_device *mhdp = data;\n+\tu8 msg[2], reg[2], i;\n+\tint ret;\n+\n+\tfor (i = 0; i < 4; i++) {\n+\t\tmsg[0] = block / 2;\n+\t\tmsg[1] = block % 2;\n+\n+\t\tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_DP_TX,\n+\t\t\t\t\t     DPTX_GET_EDID, sizeof(msg), msg);\n+\t\tif (ret)\n+\t\t\tcontinue;\n+\n+\t\tret = cdns_mhdp_mailbox_validate_receive(mhdp,\n+\t\t\t\t\t\t\t MB_MODULE_ID_DP_TX,\n+\t\t\t\t\t\t\t DPTX_GET_EDID,\n+\t\t\t\t\t\t\t sizeof(reg) + length);\n+\t\tif (ret)\n+\t\t\tcontinue;\n+\n+\t\tret = cdns_mhdp_mailbox_read_receive(mhdp, reg, sizeof(reg));\n+\t\tif (ret)\n+\t\t\tcontinue;\n+\n+\t\tret = cdns_mhdp_mailbox_read_receive(mhdp, edid, length);\n+\t\tif (ret)\n+\t\t\tcontinue;\n+\n+\t\tif (reg[0] == length && reg[1] == block / 2)\n+\t\t\tbreak;\n+\t}\n+\n+\tif (ret)\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"get block[%d] edid failed: %d\\n\",\n+\t\t\t      block, ret);\n+\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_get_edid_block);\n+\n+int cdns_mhdp_set_video_status(struct cdns_mhdp_device *mhdp, int active)\n+{\n+\tu8 msg;\n+\tint ret;\n+\n+\tmsg = !!active;\n+\n+\tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_DP_TX,\n+\t\t\t\t     DPTX_SET_VIDEO, sizeof(msg), &msg);\n+\tif (ret)\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"set video status failed: %d\\n\", ret);\n+\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_set_video_status);\n+\n+static int mhdp_get_msa_misc(struct video_info *video,\n+\t\t\t\t  struct drm_display_mode *mode)\n+{\n+\tu32 msa_misc;\n+\tu8 val[2] = {0};\n+\n+\tswitch (video->color_fmt) {\n+\tcase PXL_RGB:\n+\tcase Y_ONLY:\n+\t\tval[0] = 0;\n+\t\tbreak;\n+\t/* set YUV default color space conversion to BT601 */\n+\tcase YCBCR_4_4_4:\n+\t\tval[0] = 6 + BT_601 * 8;\n+\t\tbreak;\n+\tcase YCBCR_4_2_2:\n+\t\tval[0] = 5 + BT_601 * 8;\n+\t\tbreak;\n+\tcase YCBCR_4_2_0:\n+\t\tval[0] = 5;\n+\t\tbreak;\n+\t}\n+\n+\tswitch (video->color_depth) {\n+\tcase 6:\n+\t\tval[1] = 0;\n+\t\tbreak;\n+\tcase 8:\n+\t\tval[1] = 1;\n+\t\tbreak;\n+\tcase 10:\n+\t\tval[1] = 2;\n+\t\tbreak;\n+\tcase 12:\n+\t\tval[1] = 3;\n+\t\tbreak;\n+\tcase 16:\n+\t\tval[1] = 4;\n+\t\tbreak;\n+\t}\n+\n+\tmsa_misc = 2 * val[0] + 32 * val[1] +\n+\t\t   ((video->color_fmt == Y_ONLY) ? (1 << 14) : 0);\n+\n+\treturn msa_misc;\n+}\n+\n+int cdns_mhdp_config_video(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct video_info *video = &mhdp->video_info;\n+\tstruct drm_display_mode *mode = &mhdp->mode;\n+\tu64 symbol;\n+\tu32 val, link_rate, rem;\n+\tu8 bit_per_pix, tu_size_reg = TU_SIZE;\n+\tint ret;\n+\n+\tbit_per_pix = (video->color_fmt == YCBCR_4_2_2) ?\n+\t\t      (video->color_depth * 2) : (video->color_depth * 3);\n+\n+\tlink_rate = mhdp->dp.rate / 1000;\n+\n+\tret = cdns_mhdp_reg_write(mhdp, BND_HSYNC2VSYNC, VIF_BYPASS_INTERLACE);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\tret = cdns_mhdp_reg_write(mhdp, HSYNC2VSYNC_POL_CTRL, 0);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\t/*\n+\t * get a best tu_size and valid symbol:\n+\t * 1. chose Lclk freq(162Mhz, 270Mhz, 540Mhz), set TU to 32\n+\t * 2. calculate VS(valid symbol) = TU * Pclk * Bpp / (Lclk * Lanes)\n+\t * 3. if VS > *.85 or VS < *.1 or VS < 2 or TU < VS + 4, then set\n+\t *    TU += 2 and repeat 2nd step.\n+\t */\n+\tdo {\n+\t\ttu_size_reg += 2;\n+\t\tsymbol = tu_size_reg * mode->clock * bit_per_pix;\n+\t\tdo_div(symbol, mhdp->dp.num_lanes * link_rate * 8);\n+\t\trem = do_div(symbol, 1000);\n+\t\tif (tu_size_reg > 64) {\n+\t\t\tret = -EINVAL;\n+\t\t\tDRM_DEV_ERROR(mhdp->dev,\n+\t\t\t\t      \"tu error, clk:%d, lanes:%d, rate:%d\\n\",\n+\t\t\t\t      mode->clock, mhdp->dp.num_lanes,\n+\t\t\t\t      link_rate);\n+\t\t\tgoto err_config_video;\n+\t\t}\n+\t} while ((symbol <= 1) || (tu_size_reg - symbol < 4) ||\n+\t\t (rem > 850) || (rem < 100));\n+\n+\tval = symbol + (tu_size_reg << 8);\n+\tval |= TU_CNT_RST_EN;\n+\tret = cdns_mhdp_reg_write(mhdp, DP_FRAMER_TU, val);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\t/* set the FIFO Buffer size */\n+\tval = div_u64(mode->clock * (symbol + 1), 1000) + link_rate;\n+\tval /= (mhdp->dp.num_lanes * link_rate);\n+\tval = div_u64(8 * (symbol + 1), bit_per_pix) - val;\n+\tval += 2;\n+\tret = cdns_mhdp_reg_write(mhdp, DP_VC_TABLE(15), val);\n+\n+\tswitch (video->color_depth) {\n+\tcase 6:\n+\t\tval = BCS_6;\n+\t\tbreak;\n+\tcase 8:\n+\t\tval = BCS_8;\n+\t\tbreak;\n+\tcase 10:\n+\t\tval = BCS_10;\n+\t\tbreak;\n+\tcase 12:\n+\t\tval = BCS_12;\n+\t\tbreak;\n+\tcase 16:\n+\t\tval = BCS_16;\n+\t\tbreak;\n+\t}\n+\n+\tval += video->color_fmt << 8;\n+\tret = cdns_mhdp_reg_write(mhdp, DP_FRAMER_PXL_REPR, val);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\tval = video->h_sync_polarity ? DP_FRAMER_SP_HSP : 0;\n+\tval |= video->v_sync_polarity ? DP_FRAMER_SP_VSP : 0;\n+\tret = cdns_mhdp_reg_write(mhdp, DP_FRAMER_SP, val);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\tval = (mode->hsync_start - mode->hdisplay) << 16;\n+\tval |= mode->htotal - mode->hsync_end;\n+\tret = cdns_mhdp_reg_write(mhdp, DP_FRONT_BACK_PORCH, val);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\tval = mode->hdisplay * bit_per_pix / 8;\n+\tret = cdns_mhdp_reg_write(mhdp, DP_BYTE_COUNT, val);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\tval = mode->htotal | ((mode->htotal - mode->hsync_start) << 16);\n+\tret = cdns_mhdp_reg_write(mhdp, MSA_HORIZONTAL_0, val);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\tval = mode->hsync_end - mode->hsync_start;\n+\tval |= (mode->hdisplay << 16) | (video->h_sync_polarity << 15);\n+\tret = cdns_mhdp_reg_write(mhdp, MSA_HORIZONTAL_1, val);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\tval = mode->vtotal;\n+\tval |= (mode->vtotal - mode->vsync_start) << 16;\n+\tret = cdns_mhdp_reg_write(mhdp, MSA_VERTICAL_0, val);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\tval = mode->vsync_end - mode->vsync_start;\n+\tval |= (mode->vdisplay << 16) | (video->v_sync_polarity << 15);\n+\tret = cdns_mhdp_reg_write(mhdp, MSA_VERTICAL_1, val);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\tval = mhdp_get_msa_misc(video, mode);\n+\tret = cdns_mhdp_reg_write(mhdp, MSA_MISC, val);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\tret = cdns_mhdp_reg_write(mhdp, STREAM_CONFIG, 1);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\tval = mode->hsync_end - mode->hsync_start;\n+\tval |= mode->hdisplay << 16;\n+\tret = cdns_mhdp_reg_write(mhdp, DP_HORIZONTAL, val);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\tval = mode->vdisplay;\n+\tval |= (mode->vtotal - mode->vsync_start) << 16;\n+\tret = cdns_mhdp_reg_write(mhdp, DP_VERTICAL_0, val);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\tval = mode->vtotal;\n+\tret = cdns_mhdp_reg_write(mhdp, DP_VERTICAL_1, val);\n+\tif (ret)\n+\t\tgoto err_config_video;\n+\n+\tret = cdns_mhdp_reg_write_bit(mhdp, DP_VB_ID, 2, 1, 0);\n+\n+err_config_video:\n+\tif (ret)\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"config video failed: %d\\n\", ret);\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_config_video);\n+\n+int cdns_phy_reg_write(struct cdns_mhdp_device *mhdp, u32 addr, u32 val)\n+{\n+\treturn cdns_mhdp_reg_write(mhdp, ADDR_PHY_AFE + (addr << 2), val);\n+}\n+EXPORT_SYMBOL(cdns_phy_reg_write);\n+\n+u32 cdns_phy_reg_read(struct cdns_mhdp_device *mhdp, u32 addr)\n+{\n+\treturn cdns_mhdp_reg_read(mhdp, ADDR_PHY_AFE + (addr << 2));\n+}\n+EXPORT_SYMBOL(cdns_phy_reg_read);\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-dp.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-dp.c\nnew file mode 100644\nindex 000000000000..f025c39d12ea\n--- /dev/null\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-dp.c\n@@ -0,0 +1,172 @@\n+// SPDX-License-Identifier: GPL-2.0-or-later\n+\n+#include <asm/unaligned.h>\n+#include <drm/bridge/cdns-mhdp.h>\n+#include <drm/drm_print.h>\n+#include <linux/io.h>\n+\n+#define LINK_TRAINING_TIMEOUT_MS\t500\n+#define LINK_TRAINING_RETRY_MS\t\t20\n+\n+int cdns_mhdp_dpcd_read(struct cdns_mhdp_device *mhdp,\n+\t\t\tu32 addr, u8 *data, u16 len)\n+{\n+\tu8 msg[5], reg[5];\n+\tint ret;\n+\n+\tput_unaligned_be16(len, msg);\n+\tput_unaligned_be24(addr, msg + 2);\n+\n+\tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_DP_TX,\n+\t\t\t\t     DPTX_READ_DPCD, sizeof(msg), msg);\n+\tif (ret)\n+\t\tgoto err_dpcd_read;\n+\n+\tret = cdns_mhdp_mailbox_validate_receive(mhdp, MB_MODULE_ID_DP_TX,\n+\t\t\t\t\t\t DPTX_READ_DPCD,\n+\t\t\t\t\t\t sizeof(reg) + len);\n+\tif (ret)\n+\t\tgoto err_dpcd_read;\n+\n+\tret = cdns_mhdp_mailbox_read_receive(mhdp, reg, sizeof(reg));\n+\tif (ret)\n+\t\tgoto err_dpcd_read;\n+\n+\tret = cdns_mhdp_mailbox_read_receive(mhdp, data, len);\n+\n+err_dpcd_read:\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_dpcd_read);\n+\n+int cdns_mhdp_dpcd_write(struct cdns_mhdp_device *mhdp, u32 addr, u8 value)\n+{\n+\tu8 msg[6], reg[5];\n+\tint ret;\n+\n+\tput_unaligned_be16(1, msg);\n+\tput_unaligned_be24(addr, msg + 2);\n+\tmsg[5] = value;\n+\n+\tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_DP_TX,\n+\t\t\t\t     DPTX_WRITE_DPCD, sizeof(msg), msg);\n+\tif (ret)\n+\t\tgoto err_dpcd_write;\n+\n+\tret = cdns_mhdp_mailbox_validate_receive(mhdp, MB_MODULE_ID_DP_TX,\n+\t\t\t\t\t\t DPTX_WRITE_DPCD, sizeof(reg));\n+\tif (ret)\n+\t\tgoto err_dpcd_write;\n+\n+\tret = cdns_mhdp_mailbox_read_receive(mhdp, reg, sizeof(reg));\n+\tif (ret)\n+\t\tgoto err_dpcd_write;\n+\n+\tif (addr != get_unaligned_be24(reg + 2))\n+\t\tret = -EINVAL;\n+\n+err_dpcd_write:\n+\tif (ret)\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"dpcd write failed: %d\\n\", ret);\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_dpcd_write);\n+\n+static int cdns_mhdp_training_start(struct cdns_mhdp_device *mhdp)\n+{\n+\tunsigned long timeout;\n+\tu8 msg, event[2];\n+\tint ret;\n+\n+\tmsg = LINK_TRAINING_RUN;\n+\n+\t/* start training */\n+\tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_DP_TX,\n+\t\t\t\t     DPTX_TRAINING_CONTROL, sizeof(msg), &msg);\n+\tif (ret)\n+\t\tgoto err_training_start;\n+\n+\ttimeout = jiffies + msecs_to_jiffies(LINK_TRAINING_TIMEOUT_MS);\n+\twhile (time_before(jiffies, timeout)) {\n+\t\tmsleep(LINK_TRAINING_RETRY_MS);\n+\t\tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_DP_TX,\n+\t\t\t\t\t     DPTX_READ_EVENT, 0, NULL);\n+\t\tif (ret)\n+\t\t\tgoto err_training_start;\n+\n+\t\tret = cdns_mhdp_mailbox_validate_receive(mhdp,\n+\t\t\t\t\t\t\t MB_MODULE_ID_DP_TX,\n+\t\t\t\t\t\t\t DPTX_READ_EVENT,\n+\t\t\t\t\t\t\t sizeof(event));\n+\t\tif (ret)\n+\t\t\tgoto err_training_start;\n+\n+\t\tret = cdns_mhdp_mailbox_read_receive(mhdp, event,\n+\t\t\t\t\t\t     sizeof(event));\n+\t\tif (ret)\n+\t\t\tgoto err_training_start;\n+\n+\t\tif (event[1] & EQ_PHASE_FINISHED)\n+\t\t\treturn 0;\n+\t}\n+\n+\tret = -ETIMEDOUT;\n+\n+err_training_start:\n+\tDRM_DEV_ERROR(mhdp->dev, \"training failed: %d\\n\", ret);\n+\treturn ret;\n+}\n+\n+static int cdns_mhdp_get_training_status(struct cdns_mhdp_device *mhdp)\n+{\n+\tu8 status[10];\n+\tint ret;\n+\n+\tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_DP_TX,\n+\t\t\t\t     DPTX_READ_LINK_STAT, 0, NULL);\n+\tif (ret)\n+\t\tgoto err_get_training_status;\n+\n+\tret = cdns_mhdp_mailbox_validate_receive(mhdp, MB_MODULE_ID_DP_TX,\n+\t\t\t\t\t\t DPTX_READ_LINK_STAT,\n+\t\t\t\t\t\t sizeof(status));\n+\tif (ret)\n+\t\tgoto err_get_training_status;\n+\n+\tret = cdns_mhdp_mailbox_read_receive(mhdp, status, sizeof(status));\n+\tif (ret)\n+\t\tgoto err_get_training_status;\n+\n+\tmhdp->dp.rate = drm_dp_bw_code_to_link_rate(status[0]);\n+\tmhdp->dp.num_lanes = status[1];\n+\n+err_get_training_status:\n+\tif (ret)\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"get training status failed: %d\\n\",\n+\t\t\t      ret);\n+\treturn ret;\n+}\n+\n+int cdns_mhdp_train_link(struct cdns_mhdp_device *mhdp)\n+{\n+\tint ret;\n+\n+\tret = cdns_mhdp_training_start(mhdp);\n+\tif (ret) {\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"Failed to start training %d\\n\",\n+\t\t\t      ret);\n+\t\treturn ret;\n+\t}\n+\n+\tret = cdns_mhdp_get_training_status(mhdp);\n+\tif (ret) {\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"Failed to get training stat %d\\n\",\n+\t\t\t      ret);\n+\t\treturn ret;\n+\t}\n+\n+\tDRM_DEV_DEBUG_KMS(mhdp->dev, \"rate:0x%x, lanes:%d\\n\", mhdp->dp.rate,\n+\t\t\t  mhdp->dp.num_lanes);\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_train_link);\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdmi.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdmi.c\nnew file mode 100644\nindex 000000000000..c37a7ac6af9b\n--- /dev/null\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdmi.c\n@@ -0,0 +1,332 @@\n+/*\n+ * Copyright (C) 2019 NXP Semiconductor, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ */\n+\n+#include <drm/drm_vblank.h>\n+#include <drm/drm_print.h>\n+#include <linux/io.h>\n+#include <drm/bridge/cdns-mhdp.h>\n+#include <linux/regmap.h>\n+\n+void cdns_mhdp_infoframe_set(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\tu8 entry_id, u8 packet_len, u8 *packet, u8 packet_type)\n+{\n+\tu32 *packet32, len32;\n+\tu32 val, i;\n+\n+\t/* invalidate entry */\n+\tval = F_ACTIVE_IDLE_TYPE(1) | F_PKT_ALLOC_ADDRESS(entry_id);\n+\tcdns_mhdp_bus_write(val, mhdp, SOURCE_PIF_PKT_ALLOC_REG);\n+\tcdns_mhdp_bus_write(F_PKT_ALLOC_WR_EN(1), mhdp, SOURCE_PIF_PKT_ALLOC_WR_EN);\n+\n+\t/* flush fifo 1 */\n+\tcdns_mhdp_bus_write(F_FIFO1_FLUSH(1), mhdp, SOURCE_PIF_FIFO1_FLUSH);\n+\n+\t/* write packet into memory */\n+\tpacket32 = (u32 *)packet;\n+\tlen32 = packet_len / 4;\n+\tfor (i = 0; i < len32; i++)\n+\t\tcdns_mhdp_bus_write(F_DATA_WR(packet32[i]), mhdp, SOURCE_PIF_DATA_WR);\n+\n+\t/* write entry id */\n+\tcdns_mhdp_bus_write(F_WR_ADDR(entry_id), mhdp, SOURCE_PIF_WR_ADDR);\n+\n+\t/* write request */\n+\tcdns_mhdp_bus_write(F_HOST_WR(1), mhdp, SOURCE_PIF_WR_REQ);\n+\n+\t/* update entry */\n+\tval =  F_ACTIVE_IDLE_TYPE(1) | F_TYPE_VALID(1) |\n+\t\t\tF_PACKET_TYPE(packet_type) | F_PKT_ALLOC_ADDRESS(entry_id);\n+\tcdns_mhdp_bus_write(val, mhdp, SOURCE_PIF_PKT_ALLOC_REG);\n+\n+\tcdns_mhdp_bus_write(F_PKT_ALLOC_WR_EN(1), mhdp, SOURCE_PIF_PKT_ALLOC_WR_EN);\n+}\n+\n+int cdns_hdmi_get_edid_block(void *data, u8 *edid,\n+\t\t\t  u32 block, size_t length)\n+{\n+\tstruct cdns_mhdp_device *mhdp = data;\n+\tu8 msg[2], reg[5], i;\n+\tint ret;\n+\n+\tfor (i = 0; i < 4; i++) {\n+\t\tmsg[0] = block / 2;\n+\t\tmsg[1] = block % 2;\n+\n+\t\tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_HDMI_TX, HDMI_TX_EDID,\n+\t\t\t\t\t  sizeof(msg), msg);\n+\t\tif (ret)\n+\t\t\tcontinue;\n+\n+\t\tret = cdns_mhdp_mailbox_validate_receive(mhdp, MB_MODULE_ID_HDMI_TX,\n+\t\t\t\t\t\t      HDMI_TX_EDID, sizeof(reg) + length);\n+\t\tif (ret)\n+\t\t\tcontinue;\n+\n+\t\tret = cdns_mhdp_mailbox_read_receive(mhdp, reg, sizeof(reg));\n+\t\tif (ret)\n+\t\t\tcontinue;\n+\n+\t\tret = cdns_mhdp_mailbox_read_receive(mhdp, edid, length);\n+\t\tif (ret)\n+\t\t\tcontinue;\n+\n+\t\tif ((reg[3] << 8 | reg[4]) == length)\n+\t\t\tbreak;\n+\t}\n+\n+\tif (ret)\n+\t\tDRM_ERROR(\"get block[%d] edid failed: %d\\n\", block, ret);\n+\treturn ret;\n+}\n+\n+int cdns_hdmi_scdc_read(struct cdns_mhdp_device *mhdp, u8 addr, u8 *data)\n+{\n+\tu8 msg[4], reg[6];\n+\tint ret;\n+\n+\tmsg[0] = 0x54;\n+\tmsg[1] = addr;\n+\tmsg[2] = 0;\n+\tmsg[3] = 1;\n+\tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_HDMI_TX, HDMI_TX_READ,\n+\t\t\t\t  sizeof(msg), msg);\n+\tif (ret)\n+\t\tgoto err_scdc_read;\n+\n+\tret = cdns_mhdp_mailbox_validate_receive(mhdp, MB_MODULE_ID_HDMI_TX,\n+\t\t\t\t\t      HDMI_TX_READ, sizeof(reg));\n+\tif (ret)\n+\t\tgoto err_scdc_read;\n+\n+\tret = cdns_mhdp_mailbox_read_receive(mhdp, reg, sizeof(reg));\n+\tif (ret)\n+\t\tgoto err_scdc_read;\n+\n+\t*data = reg[5];\n+\n+err_scdc_read:\n+\tif (ret)\n+\t\tDRM_ERROR(\"scdc read failed: %d\\n\", ret);\n+\treturn ret;\n+}\n+\n+int cdns_hdmi_scdc_write(struct cdns_mhdp_device *mhdp, u8 addr, u8 value)\n+{\n+\tu8 msg[5], reg[5];\n+\tint ret;\n+\n+\tmsg[0] = 0x54;\n+\tmsg[1] = addr;\n+\tmsg[2] = 0;\n+\tmsg[3] = 1;\n+\tmsg[4] = value;\n+\tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_HDMI_TX, HDMI_TX_WRITE,\n+\t\t\t\t  sizeof(msg), msg);\n+\tif (ret)\n+\t\tgoto err_scdc_write;\n+\n+\tret = cdns_mhdp_mailbox_validate_receive(mhdp, MB_MODULE_ID_HDMI_TX,\n+\t\t\t\t\t      HDMI_TX_WRITE, sizeof(reg));\n+\tif (ret)\n+\t\tgoto err_scdc_write;\n+\n+\tret = cdns_mhdp_mailbox_read_receive(mhdp, reg, sizeof(reg));\n+\tif (ret)\n+\t\tgoto err_scdc_write;\n+\n+\tif (reg[0] != 0)\n+\t\tret = -EINVAL;\n+\n+err_scdc_write:\n+\tif (ret)\n+\t\tDRM_ERROR(\"scdc write failed: %d\\n\", ret);\n+\treturn ret;\n+}\n+\n+int cdns_hdmi_ctrl_init(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t int protocol,\n+\t\t\t\t u32 char_rate)\n+{\n+\tu32 reg0;\n+\tu32 reg1;\n+\tu32 val;\n+\tint ret;\n+\n+\t/* Set PHY to HDMI data */\n+\tret = cdns_mhdp_reg_write(mhdp, PHY_DATA_SEL, F_SOURCE_PHY_MHDP_SEL(1));\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tret = cdns_mhdp_reg_write(mhdp, HDTX_HPD,\n+\t\t\t\t\tF_HPD_VALID_WIDTH(4) | F_HPD_GLITCH_WIDTH(0));\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\t/* open CARS */\n+\tret = cdns_mhdp_reg_write(mhdp, SOURCE_PHY_CAR, 0xF);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\tret = cdns_mhdp_reg_write(mhdp, SOURCE_HDTX_CAR, 0xFF);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\tret = cdns_mhdp_reg_write(mhdp, SOURCE_PKT_CAR, 0xF);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\tret = cdns_mhdp_reg_write(mhdp, SOURCE_AIF_CAR, 0xF);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\tret = cdns_mhdp_reg_write(mhdp, SOURCE_CIPHER_CAR, 0xF);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\tret = cdns_mhdp_reg_write(mhdp, SOURCE_CRYPTO_CAR, 0xF);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\tret = cdns_mhdp_reg_write(mhdp, SOURCE_CEC_CAR, 3);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\treg0 = reg1 = 0x7c1f;\n+\tif (protocol == MODE_HDMI_2_0 && char_rate >= 340000) {\n+\t\treg0 = 0;\n+\t\treg1 = 0xFFFFF;\n+\t}\n+\tret = cdns_mhdp_reg_write(mhdp, HDTX_CLOCK_REG_0, reg0);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\tret = cdns_mhdp_reg_write(mhdp, HDTX_CLOCK_REG_1, reg1);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\t/* set hdmi mode and preemble mode data enable */\n+\tval = F_HDMI_MODE(protocol) | F_HDMI2_PREAMBLE_EN(1) |  F_DATA_EN(1) |\n+\t\t\tF_HDMI2_CTRL_IL_MODE(1) | F_BCH_EN(1) | F_PIC_3D(0XF);\n+\tret = cdns_mhdp_reg_write(mhdp, HDTX_CONTROLLER, val);\n+\n+\treturn ret;\n+}\n+\n+int cdns_hdmi_mode_config(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\t      struct drm_display_mode *mode,\n+\t\t\t\t\t\t  struct video_info *video_info)\n+{\n+\tint ret;\n+\tu32 val;\n+\tu32 vsync_lines = mode->vsync_end - mode->vsync_start;\n+\tu32 eof_lines = mode->vsync_start - mode->vdisplay;\n+\tu32 sof_lines = mode->vtotal - mode->vsync_end;\n+\tu32 hblank = mode->htotal - mode->hdisplay;\n+\tu32 hactive = mode->hdisplay;\n+\tu32 vblank = mode->vtotal - mode->vdisplay;\n+\tu32 vactive = mode->vdisplay;\n+\tu32 hfront = mode->hsync_start - mode->hdisplay;\n+\tu32 hback = mode->htotal - mode->hsync_end;\n+\tu32 vfront = eof_lines;\n+\tu32 hsync = hblank - hfront - hback;\n+\tu32 vsync = vsync_lines;\n+\tu32 vback = sof_lines;\n+\tu32 v_h_polarity = ((mode->flags & DRM_MODE_FLAG_NHSYNC) ? 0 : 1) +\n+\t\t\t\t\t\t((mode->flags & DRM_MODE_FLAG_NVSYNC) ? 0 : 2);\n+\n+\tret = cdns_mhdp_reg_write(mhdp, SCHEDULER_H_SIZE, (hactive << 16) + hblank);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tret = cdns_mhdp_reg_write(mhdp, SCHEDULER_V_SIZE, (vactive << 16) + vblank);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tret = cdns_mhdp_reg_write(mhdp, HDTX_SIGNAL_FRONT_WIDTH, (vfront << 16) + hfront);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tret = cdns_mhdp_reg_write(mhdp, HDTX_SIGNAL_SYNC_WIDTH, (vsync << 16) + hsync);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tret = cdns_mhdp_reg_write(mhdp, HDTX_SIGNAL_BACK_WIDTH, (vback << 16) + hback);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tret = cdns_mhdp_reg_write(mhdp, HSYNC2VSYNC_POL_CTRL, v_h_polarity);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\t/* Reset Data Enable */\n+\tval = cdns_mhdp_reg_read(mhdp, HDTX_CONTROLLER);\n+\tval &= ~F_DATA_EN(1);\n+\tret = cdns_mhdp_reg_write(mhdp, HDTX_CONTROLLER, val);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\t/* Set bpc */\n+\tval &= ~F_VIF_DATA_WIDTH(3);\n+\tswitch (video_info->color_depth) {\n+\tcase 10:\n+\t\tval |= F_VIF_DATA_WIDTH(1);\n+\t\tbreak;\n+\tcase 12:\n+\t\tval |= F_VIF_DATA_WIDTH(2);\n+\t\tbreak;\n+\tcase 16:\n+\t\tval |= F_VIF_DATA_WIDTH(3);\n+\t\tbreak;\n+\tcase 8:\n+\tdefault:\n+\t\tval |= F_VIF_DATA_WIDTH(0);\n+\t\tbreak;\n+\t}\n+\n+\t/* select color encoding */\n+\tval &= ~F_HDMI_ENCODING(3);\n+\tswitch (video_info->color_fmt) {\n+\tcase YCBCR_4_4_4:\n+\t\tval |= F_HDMI_ENCODING(2);\n+\t\tbreak;\n+\tcase YCBCR_4_2_2:\n+\t\tval |= F_HDMI_ENCODING(1);\n+\t\tbreak;\n+\tcase YCBCR_4_2_0:\n+\t\tval |= F_HDMI_ENCODING(3);\n+\t\tbreak;\n+\tcase PXL_RGB:\n+\tdefault:\n+\t\tval |= F_HDMI_ENCODING(0);\n+\t\tbreak;\n+\t}\n+\n+\tret = cdns_mhdp_reg_write(mhdp, HDTX_CONTROLLER, val);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\t/* set data enable */\n+\tval |= F_DATA_EN(1);\n+\tret = cdns_mhdp_reg_write(mhdp, HDTX_CONTROLLER, val);\n+\n+\treturn ret;\n+}\n+\n+int cdns_hdmi_disable_gcp(struct cdns_mhdp_device *mhdp)\n+{\n+\tu32 val;\n+\n+\tval = cdns_mhdp_reg_read(mhdp, HDTX_CONTROLLER);\n+\tval &= ~F_GCP_EN(1);\n+\n+\treturn cdns_mhdp_reg_write(mhdp, HDTX_CONTROLLER, val);\n+}\n+\n+int cdns_hdmi_enable_gcp(struct cdns_mhdp_device *mhdp)\n+{\n+\tu32 val;\n+\n+\tval = cdns_mhdp_reg_read(mhdp, HDTX_CONTROLLER);\n+\tval |= F_GCP_EN(1);\n+\n+\treturn cdns_mhdp_reg_write(mhdp, HDTX_CONTROLLER, val);\n+}\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp.h b/drivers/gpu/drm/bridge/cadence/cdns-mhdp.h\nnew file mode 100644\nindex 000000000000..399c3f6f86ad\n--- /dev/null\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp.h\n@@ -0,0 +1,209 @@\n+/* SPDX-License-Identifier: GPL-2.0 */\n+/*\n+ * Cadence MHDP DP MST bridge driver.\n+ *\n+ * Copyright: 2018 Cadence Design Systems, Inc.\n+ *\n+ * Author: Quentin Schulz <quentin.schulz@free-electrons.com>\n+ */\n+\n+\n+#ifndef CDNS_MHDP_H\n+#define CDNS_MHDP_H\n+\n+#include <drm/display/drm_dp_mst_helper.h>\n+\n+#define CDNS_APB_CFG\t\t\t\t0x00000\n+#define CDNS_APB_CTRL\t\t\t\t(CDNS_APB_CFG + 0x00)\n+#define CDNS_MAILBOX_FULL\t\t\t(CDNS_APB_CFG + 0x08)\n+#define CDNS_MAILBOX_EMPTY\t\t\t(CDNS_APB_CFG + 0x0c)\n+#define CDNS_MAILBOX_TX_DATA\t\t\t(CDNS_APB_CFG + 0x10)\n+#define CDNS_MAILBOX_RX_DATA\t\t\t(CDNS_APB_CFG + 0x14)\n+#define CDNS_KEEP_ALIVE\t\t\t\t(CDNS_APB_CFG + 0x18)\n+#define CDNS_KEEP_ALIVE_MASK\t\t\tGENMASK(7, 0)\n+\n+#define CDNS_MB_INT_MASK\t\t\t(CDNS_APB_CFG + 0x34)\n+\n+#define CDNS_SW_CLK_L\t\t\t\t(CDNS_APB_CFG + 0x3c)\n+#define CDNS_SW_CLK_H\t\t\t\t(CDNS_APB_CFG + 0x40)\n+#define CDNS_SW_EVENT0\t\t\t\t(CDNS_APB_CFG + 0x44)\n+#define CDNS_DPTX_HPD\t\t\t\tBIT(0)\n+\n+#define CDNS_SW_EVENT1\t\t\t\t(CDNS_APB_CFG + 0x48)\n+#define CDNS_SW_EVENT2\t\t\t\t(CDNS_APB_CFG + 0x4c)\n+#define CDNS_SW_EVENT3\t\t\t\t(CDNS_APB_CFG + 0x50)\n+\n+#define CDNS_APB_INT_MASK\t\t\t(CDNS_APB_CFG + 0x6C)\n+#define CDNS_APB_INT_MASK_MAILBOX_INT\t\tBIT(0)\n+#define CDNS_APB_INT_MASK_SW_EVENT_INT\t\tBIT(1)\n+\n+#define CDNS_DPTX_CAR\t\t\t\t(CDNS_APB_CFG + 0x904)\n+#define CDNS_VIF_CLK_EN\t\t\t\tBIT(0)\n+#define CDNS_VIF_CLK_RSTN\t\t\tBIT(1)\n+\n+#define CDNS_SOURCE_VIDEO_IF(s)\t\t\t(0x00b00 + (s * 0x20))\n+#define CDNS_BND_HSYNC2VSYNC(s)\t\t\t(CDNS_SOURCE_VIDEO_IF(s) + \\\n+\t\t\t\t\t\t 0x00)\n+#define CDNS_IP_DTCT_WIN\t\t\tGENMASK(11, 0)\n+#define CDNS_IP_DET_INTERLACE_FORMAT\t\tBIT(12)\n+#define CDNS_IP_BYPASS_V_INTERFACE\t\tBIT(13)\n+\n+#define CDNS_HSYNC2VSYNC_POL_CTRL(s)\t\t(CDNS_SOURCE_VIDEO_IF(s) + \\\n+\t\t\t\t\t\t 0x10)\n+#define CDNS_H2V_HSYNC_POL_ACTIVE_LOW\t\tBIT(1)\n+#define CDNS_H2V_VSYNC_POL_ACTIVE_LOW\t\tBIT(2)\n+\n+#define CDNS_DPTX_PHY_CONFIG\t\t\t0x02000\n+#define CDNS_PHY_TRAINING_EN\t\t\tBIT(0)\n+#define CDNS_PHY_TRAINING_TYPE(x)\t\t(((x) & GENMASK(3, 0)) << 1)\n+#define CDNS_PHY_SCRAMBLER_BYPASS\t\tBIT(5)\n+#define CDNS_PHY_ENCODER_BYPASS\t\t\tBIT(6)\n+#define CDNS_PHY_SKEW_BYPASS\t\t\tBIT(7)\n+#define CDNS_PHY_TRAINING_AUTO\t\t\tBIT(8)\n+#define CDNS_PHY_LANE0_SKEW(x)\t\t\t(((x) & GENMASK(2, 0)) << 9)\n+#define CDNS_PHY_LANE1_SKEW(x)\t\t\t(((x) & GENMASK(2, 0)) << 12)\n+#define CDNS_PHY_LANE2_SKEW(x)\t\t\t(((x) & GENMASK(2, 0)) << 15)\n+#define CDNS_PHY_LANE3_SKEW(x)\t\t\t(((x) & GENMASK(2, 0)) << 18)\n+#define CDNS_PHY_COMMON_CONFIG\t\t\t(CDNS_PHY_LANE1_SKEW(1) | \\\n+\t\t\t\t\t\tCDNS_PHY_LANE2_SKEW(2) |  \\\n+\t\t\t\t\t\tCDNS_PHY_LANE3_SKEW(3))\n+#define CDNS_PHY_10BIT_EN\t\t\tBIT(21)\n+\n+#define CDNS_DPTX_FRAMER\t\t\t0x02200\n+#define CDNS_DP_FRAMER_GLOBAL_CONFIG\t\t(CDNS_DPTX_FRAMER + 0x00)\n+#define CDNS_DP_NUM_LANES(x)\t\t\t(x - 1)\n+#define CDNS_DP_MST_EN\t\t\t\tBIT(2)\n+#define CDNS_DP_FRAMER_EN\t\t\tBIT(3)\n+#define CDNS_DP_RATE_GOVERNOR_EN\t\tBIT(4)\n+#define CDNS_DP_NO_VIDEO_MODE\t\t\tBIT(5)\n+#define CDNS_DP_DISABLE_PHY_RST\t\t\tBIT(6)\n+#define CDNS_DP_WR_FAILING_EDGE_VSYNC\t\tBIT(7)\n+\n+#define CDNS_DP_SW_RESET\t\t\t(CDNS_DPTX_FRAMER + 0x04)\n+#define CDNS_DP_FRAMER_TU\t\t\t(CDNS_DPTX_FRAMER + 0x08)\n+#define CDNS_DP_FRAMER_TU_SIZE(x)\t\t(((x) & GENMASK(6, 0)) << 8)\n+#define CDNS_DP_FRAMER_TU_VS(x)\t\t\t((x) & GENMASK(5, 0))\n+#define CDNS_DP_FRAMER_TU_CNT_RST_EN\t\tBIT(15)\n+\n+#define CDNS_DPTX_STREAM(s)\t\t\t(0x03000 + s * 0x80)\n+#define CDNS_DP_MSA_HORIZONTAL_0(s)\t\t(CDNS_DPTX_STREAM(s) + 0x00)\n+#define CDNS_DP_MSAH0_H_TOTAL(x)\t\t(x)\n+#define CDNS_DP_MSAH0_HSYNC_START(x)\t\t((x) << 16)\n+\n+#define CDNS_DP_MSA_HORIZONTAL_1(s)\t\t(CDNS_DPTX_STREAM(s) + 0x04)\n+#define CDNS_DP_MSAH1_HSYNC_WIDTH(x)\t\t(x)\n+#define CDNS_DP_MSAH1_HSYNC_POL_LOW\t\tBIT(15)\n+#define CDNS_DP_MSAH1_HDISP_WIDTH(x)\t\t((x) << 16)\n+\n+#define CDNS_DP_MSA_VERTICAL_0(s)\t\t(CDNS_DPTX_STREAM(s) + 0x08)\n+#define CDNS_DP_MSAV0_V_TOTAL(x)\t\t(x)\n+#define CDNS_DP_MSAV0_VSYNC_START(x)\t\t((x) << 16)\n+\n+#define CDNS_DP_MSA_VERTICAL_1(s)\t\t(CDNS_DPTX_STREAM(s) + 0x0c)\n+#define CDNS_DP_MSAV1_VSYNC_WIDTH(x)\t\t(x)\n+#define CDNS_DP_MSAV1_VSYNC_POL_LOW\t\tBIT(15)\n+#define CDNS_DP_MSAV1_VDISP_WIDTH(x)\t\t((x) << 16)\n+\n+#define CDNS_DP_MSA_MISC(s)\t\t\t(CDNS_DPTX_STREAM(s) + 0x10)\n+#define CDNS_DP_STREAM_CONFIGs(s)\t\t(CDNS_DPTX_STREAM(s) + 0x14)\n+#define CDNS_DP_STREAM_CONFIG_2(s)\t\t(CDNS_DPTX_STREAM(s) + 0x2c)\n+#define CDNS_DP_SC2_TU_VS_DIFF(x)\t\t((x) << 8)\n+\n+#define CDNS_DP_HORIZONTAL(s)\t\t\t(CDNS_DPTX_STREAM(s) + 0x30)\n+#define CDNS_DP_H_HSYNC_WIDTH(x)\t\t(x)\n+#define CDNS_DP_H_H_TOTAL(x)\t\t\t((x) << 16)\n+\n+#define CDNS_DP_VERTICAL_0(s)\t\t\t(CDNS_DPTX_STREAM(s) + 0x34)\n+#define CDNS_DP_V0_VHEIGHT(x)\t\t\t(x)\n+#define CDNS_DP_V0_VSTART(x)\t\t\t((x) << 16)\n+\n+#define CDNS_DP_VERTICAL_1(s)\t\t\t(CDNS_DPTX_STREAM(s) + 0x38)\n+#define CDNS_DP_V1_VTOTAL(x)\t\t\t(x)\n+#define CDNS_DP_V1_VTOTAL_EVEN\t\t\tBIT(16)\n+\n+#define CDNS_DP_FRAMER_PXL_REPR(s)\t\t(CDNS_DPTX_STREAM(s) + 0x4c)\n+#define CDNS_DP_FRAMER_6_BPC\t\t\tBIT(0)\n+#define CDNS_DP_FRAMER_8_BPC\t\t\tBIT(1)\n+#define CDNS_DP_FRAMER_10_BPC\t\t\tBIT(2)\n+#define CDNS_DP_FRAMER_12_BPC\t\t\tBIT(3)\n+#define CDNS_DP_FRAMER_16_BPC\t\t\tBIT(4)\n+#define CDNS_DP_FRAMER_PXL_FORMAT\t\t0x8\n+#define CDNS_DP_FRAMER_RGB\t\t\tBIT(0)\n+#define CDNS_DP_FRAMER_YCBCR444\t\t\tBIT(1)\n+#define CDNS_DP_FRAMER_YCBCR422\t\t\tBIT(2)\n+#define CDNS_DP_FRAMER_YCBCR420\t\t\tBIT(3)\n+#define CDNS_DP_FRAMER_Y_ONLY\t\t\tBIT(4)\n+\n+#define CDNS_DP_FRAMER_SP(s)\t\t\t(CDNS_DPTX_STREAM(s) + 0x10)\n+#define CDNS_DP_FRAMER_VSYNC_POL_LOW\t\tBIT(0)\n+#define CDNS_DP_FRAMER_HSYNC_POL_LOW\t\tBIT(1)\n+#define CDNS_DP_FRAMER_INTERLACE\t\tBIT(2)\n+\n+#define CDNS_DP_LINE_THRESH(s)\t\t\t(CDNS_DPTX_STREAM(s) + 0x64)\n+#define CDNS_DP_ACTIVE_LINE_THRESH(x)\t\t(x)\n+\n+#define CDNS_DP_VB_ID(s)\t\t\t(CDNS_DPTX_STREAM(s) + 0x68)\n+#define CDNS_DP_VB_ID_INTERLACED\t\tBIT(2)\n+#define CDNS_DP_VB_ID_COMPRESSED\t\tBIT(6)\n+\n+#define CDNS_DP_FRONT_BACK_PORCH(s)\t\t(CDNS_DPTX_STREAM(s) + 0x78)\n+#define CDNS_DP_BACK_PORCH(x)\t\t\t(x)\n+#define CDNS_DP_FRONT_PORCH(x)\t\t\t((x) << 16)\n+\n+#define CDNS_DP_BYTE_COUNT(s)\t\t\t(CDNS_DPTX_STREAM(s) + 0x7c)\n+#define CDNS_DP_BYTE_COUNT_BYTES_IN_CHUNK_SHIFT\t16\n+\n+#define CDNS_DP_MST_STREAM_CONFIG(s)\t\t(CDNS_DPTX_STREAM(s) + 0x14)\n+#define CDNS_DP_MST_STRM_CFG_STREAM_EN\t\tBIT(0)\n+#define CDNS_DP_MST_STRM_CFG_NO_VIDEO\t\tBIT(1)\n+\n+#define CDNS_DP_MST_SLOT_ALLOCATE(s)\t\t(CDNS_DPTX_STREAM(s) + 0x44)\n+#define CDNS_DP_S_ALLOC_START_SLOT(x)\t\t(x)\n+#define CDNS_DP_S_ALLOC_END_SLOT(x)\t\t((x) << 8)\n+\n+#define CDNS_DP_RATE_GOVERNING(s)\t\t(CDNS_DPTX_STREAM(s) + 0x48)\n+#define CDNS_DP_RG_TARG_AV_SLOTS_Y(x)\t\t(x)\n+#define CDNS_DP_RG_TARG_AV_SLOTS_X(x)\t\t(x << 4)\n+#define CDNS_DP_RG_ENABLE\t\t\tBIT(10)\n+\n+#define CDNS_DP_MTPH_CONTROL\t\t\t0x2264\n+#define CDNS_DP_MTPH_ECF_EN\t\t\tBIT(0)\n+#define CDNS_DP_MTPH_ACT_EN\t\t\tBIT(1)\n+#define CDNS_DP_MTPH_LVP_EN\t\t\tBIT(2)\n+\n+#define CDNS_DP_MTPH_STATUS\t\t\t0x226C\n+#define CDNS_DP_MTPH_ACT_STATUS\t\t\tBIT(0)\n+\n+\n+#define CDNS_DPTX_GLOBAL\t\t\t0x02300\n+#define CDNS_DP_LANE_EN\t\t\t\t(CDNS_DPTX_GLOBAL + 0x00)\n+#define CDNS_DP_LANE_EN_LANES(x)\t\tGENMASK(x - 1, 0)\n+#define CDNS_DP_ENHNCD\t\t\t\t(CDNS_DPTX_GLOBAL + 0x04)\n+\n+\n+#define to_mhdp_connector(x) container_of(x, struct cdns_mhdp_connector, base)\n+#define to_mhdp_bridge(x) container_of(x, struct cdns_mhdp_bridge, base)\n+#define mgr_to_mhdp(x) container_of(x, struct cdns_mhdp_device, mst_mgr)\n+\n+#define CDNS_MHDP_MAX_STREAMS   4\n+\n+enum pixel_format {\n+\tPIXEL_FORMAT_RGB = 1,\n+\tPIXEL_FORMAT_YCBCR_444 = 2,\n+\tPIXEL_FORMAT_YCBCR_422 = 4,\n+\tPIXEL_FORMAT_YCBCR_420 = 8,\n+\tPIXEL_FORMAT_Y_ONLY = 16,\n+};\n+\n+\n+int cdns_mhdp_mst_init(struct cdns_mhdp_device *mhdp);\n+void cdns_mhdp_mst_deinit(struct cdns_mhdp_device *mhdp);\n+bool cdns_mhdp_mst_probe(struct cdns_mhdp_device *mhdp);\n+enum pixel_format cdns_mhdp_get_pxlfmt(u32 color_formats);\n+u32 cdns_mhdp_get_bpp(u32 bpc, u32 color_formats);\n+void cdns_mhdp_configure_video(struct drm_bridge *bridge);\n+void cdns_mhdp_mst_enable(struct drm_bridge *bridge);\n+void cdns_mhdp_mst_disable(struct drm_bridge *bridge);\n+void cdns_mhdp_enable(struct drm_bridge *bridge);\n+\n+#endif\ndiff --git a/drivers/gpu/drm/rockchip/Makefile b/drivers/gpu/drm/rockchip/Makefile\nindex 17a9e7eb2130..bd013659404f 100644\n--- a/drivers/gpu/drm/rockchip/Makefile\n+++ b/drivers/gpu/drm/rockchip/Makefile\n@@ -8,7 +8,7 @@ rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o \\\n rockchipdrm-$(CONFIG_ROCKCHIP_VOP2) += rockchip_drm_vop2.o rockchip_vop2_reg.o\n rockchipdrm-$(CONFIG_ROCKCHIP_VOP) += rockchip_drm_vop.o rockchip_vop_reg.o\n rockchipdrm-$(CONFIG_ROCKCHIP_ANALOGIX_DP) += analogix_dp-rockchip.o\n-rockchipdrm-$(CONFIG_ROCKCHIP_CDN_DP) += cdn-dp-core.o cdn-dp-reg.o\n+rockchipdrm-$(CONFIG_ROCKCHIP_CDN_DP) += cdn-dp-core.o\n rockchipdrm-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o\n rockchipdrm-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi-rockchip.o\n rockchipdrm-$(CONFIG_ROCKCHIP_INNO_HDMI) += inno_hdmi.o\ndiff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c\nindex a4a45daf93f2..058bc372f02b 100644\n--- a/drivers/gpu/drm/rockchip/cdn-dp-core.c\n+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c\n@@ -23,11 +23,10 @@\n #include <drm/drm_simple_kms_helper.h>\n \n #include \"cdn-dp-core.h\"\n-#include \"cdn-dp-reg.h\"\n #include \"rockchip_drm_vop.h\"\n \n static inline struct cdn_dp_device *connector_to_dp(struct drm_connector *connector)\n {\n-\treturn container_of(connector, struct cdn_dp_device, connector);\n+\treturn container_of(connector, struct cdn_dp_device, mhdp.connector.base);\n }\n \n@@ -62,17 +61,18 @@ MODULE_DEVICE_TABLE(of, cdn_dp_dt_ids);\n static int cdn_dp_grf_write(struct cdn_dp_device *dp,\n \t\t\t    unsigned int reg, unsigned int val)\n {\n+\tstruct device *dev = dp->mhdp.dev;\n \tint ret;\n \n \tret = clk_prepare_enable(dp->grf_clk);\n \tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"Failed to prepare_enable grf clock\\n\");\n+\t\tDRM_DEV_ERROR(dev, \"Failed to prepare_enable grf clock\\n\");\n \t\treturn ret;\n \t}\n \n \tret = regmap_write(dp->grf, reg, val);\n \tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"Could not write to GRF: %d\\n\", ret);\n+\t\tDRM_DEV_ERROR(dev, \"Could not write to GRF: %d\\n\", ret);\n \t\tclk_disable_unprepare(dp->grf_clk);\n \t\treturn ret;\n \t}\n@@ -83,24 +83,25 @@ static int cdn_dp_grf_write(struct cdn_dp_device *dp,\n \n static int cdn_dp_clk_enable(struct cdn_dp_device *dp)\n {\n+\tstruct device *dev = dp->mhdp.dev;\n \tint ret;\n \tunsigned long rate;\n \n \tret = clk_prepare_enable(dp->pclk);\n \tif (ret < 0) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"cannot enable dp pclk %d\\n\", ret);\n+\t\tDRM_DEV_ERROR(dev, \"cannot enable dp pclk %d\\n\", ret);\n \t\tgoto err_pclk;\n \t}\n \n \tret = clk_prepare_enable(dp->core_clk);\n \tif (ret < 0) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"cannot enable core_clk %d\\n\", ret);\n+\t\tDRM_DEV_ERROR(dev, \"cannot enable core_clk %d\\n\", ret);\n \t\tgoto err_core_clk;\n \t}\n \n-\tret = pm_runtime_get_sync(dp->dev);\n+\tret = pm_runtime_get_sync(dev);\n \tif (ret < 0) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"cannot get pm runtime %d\\n\", ret);\n+\t\tDRM_DEV_ERROR(dev, \"cannot get pm runtime %d\\n\", ret);\n \t\tgoto err_pm_runtime_get;\n \t}\n \n@@ -113,18 +114,18 @@ static int cdn_dp_clk_enable(struct cdn_dp_device *dp)\n \n \trate = clk_get_rate(dp->core_clk);\n \tif (!rate) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"get clk rate failed\\n\");\n+\t\tDRM_DEV_ERROR(dev, \"get clk rate failed\\n\");\n \t\tret = -EINVAL;\n \t\tgoto err_set_rate;\n \t}\n \n-\tcdn_dp_set_fw_clk(dp, rate);\n-\tcdn_dp_clock_reset(dp);\n+\tcdns_mhdp_set_fw_clk(&dp->mhdp, rate);\n+\tcdns_mhdp_clock_reset(&dp->mhdp);\n \n \treturn 0;\n \n err_set_rate:\n-\tpm_runtime_put(dp->dev);\n+\tpm_runtime_put(dev);\n err_pm_runtime_get:\n \tclk_disable_unprepare(dp->core_clk);\n err_core_clk:\n@@ -135,7 +136,7 @@ static int cdn_dp_clk_enable(struct cdn_dp_device *dp)\n \n static void cdn_dp_clk_disable(struct cdn_dp_device *dp)\n {\n-\tpm_runtime_put_sync(dp->dev);\n+\tpm_runtime_put_sync(dp->mhdp.dev);\n \tclk_disable_unprepare(dp->pclk);\n \tclk_disable_unprepare(dp->core_clk);\n }\n@@ -168,7 +169,7 @@ static int cdn_dp_get_sink_count(struct cdn_dp_device *dp, u8 *sink_count)\n \tu8 value;\n \n \t*sink_count = 0;\n-\tret = cdn_dp_dpcd_read(dp, DP_SINK_COUNT, &value, 1);\n+\tret = drm_dp_dpcd_read(&dp->mhdp.dp.aux, DP_SINK_COUNT, &value, 1);\n \tif (ret)\n \t\treturn ret;\n \n@@ -192,12 +193,13 @@ static struct cdn_dp_port *cdn_dp_connected_port(struct cdn_dp_device *dp)\n \n static bool cdn_dp_check_sink_connection(struct cdn_dp_device *dp)\n {\n+\tstruct device *dev = dp->mhdp.dev;\n \tunsigned long timeout = jiffies + msecs_to_jiffies(CDN_DPCD_TIMEOUT_MS);\n \tstruct cdn_dp_port *port;\n \tu8 sink_count = 0;\n \n \tif (dp->active_port < 0 || dp->active_port >= dp->ports) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"active_port is wrong!\\n\");\n+\t\tDRM_DEV_ERROR(dev, \"active_port is wrong!\\n\");\n \t\treturn false;\n \t}\n \n@@ -219,7 +221,7 @@ static bool cdn_dp_check_sink_connection(struct cdn_dp_device *dp)\n \t\tusleep_range(5000, 10000);\n \t}\n \n-\tDRM_DEV_ERROR(dp->dev, \"Get sink capability timed out\\n\");\n+\tDRM_DEV_ERROR(dev, \"Get sink capability timed out\\n\");\n \treturn false;\n }\n \n@@ -261,7 +263,8 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector)\n \tmutex_lock(&dp->lock);\n \tedid = dp->edid;\n \tif (edid) {\n-\t\tDRM_DEV_DEBUG_KMS(dp->dev, \"got edid: width[%d] x height[%d]\\n\",\n+\t\tDRM_DEV_DEBUG_KMS(dp->mhdp.dev,\n+\t\t\t\t  \"got edid: width[%d] x height[%d]\\n\",\n \t\t\t\t  edid->width_cm, edid->height_cm);\n \n \t\tdp->sink_has_audio = drm_detect_monitor_audio(edid);\n@@ -279,7 +282,8 @@ cdn_dp_connector_mode_valid(struct drm_connector *connector,\n \t\t\t    struct drm_display_mode *mode)\n {\n \tstruct cdn_dp_device *dp = connector_to_dp(connector);\n-\tstruct drm_display_info *display_info = &dp->connector.display_info;\n+\tstruct drm_display_info *display_info =\n+\t\t&dp->mhdp.connector.base.display_info;\n \tu32 requested, actual, rate, sink_max, source_max = 0;\n \tu8 lanes, bpc;\n \n@@ -302,11 +306,11 @@ static int cdn_dp_connector_mode_valid(struct drm_connector *connector,\n \trequested = mode->clock * bpc * 3 / 1000;\n \n \tsource_max = dp->lanes;\n-\tsink_max = drm_dp_max_lane_count(dp->dpcd);\n+\tsink_max = drm_dp_max_lane_count(dp->mhdp.dp.dpcd);\n \tlanes = min(source_max, sink_max);\n \n-\tsource_max = drm_dp_bw_code_to_link_rate(CDN_DP_MAX_LINK_RATE);\n-\tsink_max = drm_dp_max_link_rate(dp->dpcd);\n+\tsource_max = CDNS_DP_MAX_LINK_RATE;\n+\tsink_max = drm_dp_max_link_rate(dp->mhdp.dp.dpcd);\n \trate = min(source_max, sink_max);\n \n \tactual = rate * lanes / 100;\n@@ -315,7 +319,7 @@ static int cdn_dp_connector_mode_valid(struct drm_connector *connector,\n \tactual = actual * 8 / 10;\n \n \tif (requested > actual) {\n-\t\tDRM_DEV_DEBUG_KMS(dp->dev,\n+\t\tDRM_DEV_DEBUG_KMS(dp->mhdp.dev,\n \t\t\t\t  \"requested=%d, actual=%d, clock=%d\\n\",\n \t\t\t\t  requested, actual, mode->clock);\n \t\treturn MODE_CLOCK_HIGH;\n@@ -335,59 +339,62 @@ static int cdn_dp_firmware_init(struct cdn_dp_device *dp)\n \tconst u32 *iram_data, *dram_data;\n \tconst struct firmware *fw = dp->fw;\n \tconst struct cdn_firmware_header *hdr;\n+\tstruct device *dev = dp->mhdp.dev;\n \n \thdr = (struct cdn_firmware_header *)fw->data;\n \tif (fw->size != le32_to_cpu(hdr->size_bytes)) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"firmware is invalid\\n\");\n+\t\tDRM_DEV_ERROR(dev, \"firmware is invalid\\n\");\n \t\treturn -EINVAL;\n \t}\n \n \tiram_data = (const u32 *)(fw->data + hdr->header_size);\n \tdram_data = (const u32 *)(fw->data + hdr->header_size + hdr->iram_size);\n \n-\tret = cdn_dp_load_firmware(dp, iram_data, hdr->iram_size,\n-\t\t\t\t   dram_data, hdr->dram_size);\n+\tret = cdns_mhdp_load_firmware(&dp->mhdp, iram_data, hdr->iram_size,\n+\t\t\t\t      dram_data, hdr->dram_size);\n \tif (ret)\n \t\treturn ret;\n \n-\tret = cdn_dp_set_firmware_active(dp, true);\n+\tret = cdns_mhdp_set_firmware_active(&dp->mhdp, true);\n \tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"active ucpu failed: %d\\n\", ret);\n+\t\tDRM_DEV_ERROR(dev, \"active ucpu failed: %d\\n\", ret);\n \t\treturn ret;\n \t}\n \n-\treturn cdn_dp_event_config(dp);\n+\treturn cdns_mhdp_event_config(&dp->mhdp);\n }\n \n static int cdn_dp_get_sink_capability(struct cdn_dp_device *dp)\n {\n+\tstruct cdns_mhdp_device *mhdp = &dp->mhdp;\n \tint ret;\n \n \tif (!cdn_dp_check_sink_connection(dp))\n \t\treturn -ENODEV;\n \n-\tret = cdn_dp_dpcd_read(dp, DP_DPCD_REV, dp->dpcd,\n+\tret = drm_dp_dpcd_read(&mhdp->dp.aux, DP_DPCD_REV, mhdp->dp.dpcd,\n \t\t\t       DP_RECEIVER_CAP_SIZE);\n \tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"Failed to get caps %d\\n\", ret);\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"Failed to get caps %d\\n\", ret);\n \t\treturn ret;\n \t}\n \n \tkfree(dp->edid);\n-\tdp->edid = drm_do_get_edid(&dp->connector,\n-\t\t\t\t   cdn_dp_get_edid_block, dp);\n+\tdp->edid = drm_do_get_edid(&mhdp->connector.base,\n+\t\t\t\t   cdns_mhdp_get_edid_block, mhdp);\n \treturn 0;\n }\n \n static int cdn_dp_enable_phy(struct cdn_dp_device *dp, struct cdn_dp_port *port)\n {\n+\tstruct device *dev = dp->mhdp.dev;\n \tunion extcon_property_value property;\n \tint ret;\n \n \tif (!port->phy_enabled) {\n \t\tret = phy_power_on(port->phy);\n \t\tif (ret) {\n-\t\t\tDRM_DEV_ERROR(dp->dev, \"phy power on failed: %d\\n\",\n+\t\t\tDRM_DEV_ERROR(dev, \"phy power on failed: %d\\n\",\n \t\t\t\t      ret);\n \t\t\tgoto err_phy;\n \t\t}\n@@ -397,28 +404,28 @@ static int cdn_dp_enable_phy(struct cdn_dp_device *dp, struct cdn_dp_port *port)\n \tret = cdn_dp_grf_write(dp, GRF_SOC_CON26,\n \t\t\t       DPTX_HPD_SEL_MASK | DPTX_HPD_SEL);\n \tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"Failed to write HPD_SEL %d\\n\", ret);\n+\t\tDRM_DEV_ERROR(dev, \"Failed to write HPD_SEL %d\\n\", ret);\n \t\tgoto err_power_on;\n \t}\n \n-\tret = cdn_dp_get_hpd_status(dp);\n+\tret = cdns_mhdp_read_hpd(&dp->mhdp);\n \tif (ret <= 0) {\n \t\tif (!ret)\n-\t\t\tDRM_DEV_ERROR(dp->dev, \"hpd does not exist\\n\");\n+\t\t\tDRM_DEV_ERROR(dev, \"hpd does not exist\\n\");\n \t\tgoto err_power_on;\n \t}\n \n \tret = extcon_get_property(port->extcon, EXTCON_DISP_DP,\n \t\t\t\t  EXTCON_PROP_USB_TYPEC_POLARITY, &property);\n \tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"get property failed\\n\");\n+\t\tDRM_DEV_ERROR(dev, \"get property failed\\n\");\n \t\tgoto err_power_on;\n \t}\n \n \tport->lanes = cdn_dp_get_port_lanes(port);\n-\tret = cdn_dp_set_host_cap(dp, port->lanes, property.intval);\n+\tret = cdns_mhdp_set_host_cap(&dp->mhdp, property.intval);\n \tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"set host capabilities failed: %d\\n\",\n+\t\tDRM_DEV_ERROR(dev, \"set host capabilities failed: %d\\n\",\n \t\t\t      ret);\n \t\tgoto err_power_on;\n \t}\n@@ -428,7 +435,7 @@ static int cdn_dp_enable_phy(struct cdn_dp_device *dp, struct cdn_dp_port *port)\n \n err_power_on:\n \tif (phy_power_off(port->phy))\n-\t\tDRM_DEV_ERROR(dp->dev, \"phy power off failed: %d\", ret);\n+\t\tDRM_DEV_ERROR(dev, \"phy power off failed: %d\", ret);\n \telse\n \t\tport->phy_enabled = false;\n \n@@ -446,7 +453,8 @@ static int cdn_dp_disable_phy(struct cdn_dp_device *dp,\n \tif (port->phy_enabled) {\n \t\tret = phy_power_off(port->phy);\n \t\tif (ret) {\n-\t\t\tDRM_DEV_ERROR(dp->dev, \"phy power off failed: %d\", ret);\n+\t\t\tDRM_DEV_ERROR(dp->mhdp.dev,\n+\t\t\t\t      \"phy power off failed: %d\", ret);\n \t\t\treturn ret;\n \t\t}\n \t}\n@@ -470,16 +478,16 @@ static int cdn_dp_disable(struct cdn_dp_device *dp)\n \tret = cdn_dp_grf_write(dp, GRF_SOC_CON26,\n \t\t\t       DPTX_HPD_SEL_MASK | DPTX_HPD_DEL);\n \tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"Failed to clear hpd sel %d\\n\",\n+\t\tDRM_DEV_ERROR(dp->mhdp.dev, \"Failed to clear hpd sel %d\\n\",\n \t\t\t      ret);\n \t\treturn ret;\n \t}\n \n-\tcdn_dp_set_firmware_active(dp, false);\n+\tcdns_mhdp_set_firmware_active(&dp->mhdp, false);\n \tcdn_dp_clk_disable(dp);\n \tdp->active = false;\n-\tdp->max_lanes = 0;\n-\tdp->max_rate = 0;\n+\tdp->mhdp.dp.rate = 0;\n+\tdp->mhdp.dp.num_lanes = 0;\n \tif (!dp->connected) {\n \t\tkfree(dp->edid);\n \t\tdp->edid = NULL;\n@@ -492,11 +500,11 @@ static int cdn_dp_enable(struct cdn_dp_device *dp)\n {\n \tint ret, i, lanes;\n \tstruct cdn_dp_port *port;\n+\tstruct device *dev = dp->mhdp.dev;\n \n \tport = cdn_dp_connected_port(dp);\n \tif (!port) {\n-\t\tDRM_DEV_ERROR(dp->dev,\n-\t\t\t      \"Can't enable without connection\\n\");\n+\t\tDRM_DEV_ERROR(dev, \"Can't enable without connection\\n\");\n \t\treturn -ENODEV;\n \t}\n \n@@ -509,7 +517,7 @@ static int cdn_dp_enable(struct cdn_dp_device *dp)\n \n \tret = cdn_dp_firmware_init(dp);\n \tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"firmware init failed: %d\", ret);\n+\t\tDRM_DEV_ERROR(dp->mhdp.dev, \"firmware init failed: %d\", ret);\n \t\tgoto err_clk_disable;\n \t}\n \n@@ -543,8 +551,9 @@ static void cdn_dp_encoder_mode_set(struct drm_encoder *encoder,\n \t\t\t\t    struct drm_display_mode *adjusted)\n {\n \tstruct cdn_dp_device *dp = encoder_to_dp(encoder);\n-\tstruct drm_display_info *display_info = &dp->connector.display_info;\n-\tstruct video_info *video = &dp->video_info;\n+\tstruct drm_display_info *display_info =\n+\t\t&dp->mhdp.connector.base.display_info;\n+\tstruct video_info *video = &dp->mhdp.video_info;\n \n \tswitch (display_info->bpc) {\n \tcase 10:\n@@ -562,20 +571,20 @@ static void cdn_dp_encoder_mode_set(struct drm_encoder *encoder,\n \tvideo->v_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NVSYNC);\n \tvideo->h_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NHSYNC);\n \n-\tdrm_mode_copy(&dp->mode, adjusted);\n+\tdrm_mode_copy(&dp->mhdp.mode, adjusted);\n }\n \n static bool cdn_dp_check_link_status(struct cdn_dp_device *dp)\n {\n \tu8 link_status[DP_LINK_STATUS_SIZE];\n \tstruct cdn_dp_port *port = cdn_dp_connected_port(dp);\n-\tu8 sink_lanes = drm_dp_max_lane_count(dp->dpcd);\n+\tu8 sink_lanes = drm_dp_max_lane_count(dp->mhdp.dp.dpcd);\n \n-\tif (!port || !dp->max_rate || !dp->max_lanes)\n+\tif (!port || !dp->mhdp.dp.rate || !dp->mhdp.dp.num_lanes)\n \t\treturn false;\n \n-\tif (cdn_dp_dpcd_read(dp, DP_LANE0_1_STATUS, link_status,\n-\t\t\t     DP_LINK_STATUS_SIZE)) {\n+\tif (drm_dp_dpcd_read(&dp->mhdp.dp.aux, DP_LANE0_1_STATUS, link_status,\n+\t\t\t\tDP_LINK_STATUS_SIZE)) {\n \t\tDRM_ERROR(\"Failed to get link status\\n\");\n \t\treturn false;\n \t}\n@@ -587,15 +596,16 @@ static bool cdn_dp_check_link_status(struct cdn_dp_device *dp)\n static void cdn_dp_encoder_enable(struct drm_encoder *encoder)\n {\n \tstruct cdn_dp_device *dp = encoder_to_dp(encoder);\n+\tstruct device *dev = dp->mhdp.dev;\n \tint ret, val;\n \n-\tret = drm_of_encoder_active_endpoint_id(dp->dev->of_node, encoder);\n+\tret = drm_of_encoder_active_endpoint_id(dev->of_node, encoder);\n \tif (ret < 0) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"Could not get vop id, %d\", ret);\n+\t\tDRM_DEV_ERROR(dev, \"Could not get vop id, %d\", ret);\n \t\treturn;\n \t}\n \n-\tDRM_DEV_DEBUG_KMS(dp->dev, \"vop %s output to cdn-dp\\n\",\n+\tDRM_DEV_DEBUG_KMS(dev, \"vop %s output to cdn-dp\\n\",\n \t\t\t  (ret) ? \"LIT\" : \"BIG\");\n \tif (ret)\n \t\tval = DP_SEL_VOP_LIT | (DP_SEL_VOP_LIT << 16);\n@@ -610,33 +620,33 @@ static void cdn_dp_encoder_enable(struct drm_encoder *encoder)\n \n \tret = cdn_dp_enable(dp);\n \tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"Failed to enable encoder %d\\n\",\n+\t\tDRM_DEV_ERROR(dev, \"Failed to enable encoder %d\\n\",\n \t\t\t      ret);\n \t\tgoto out;\n \t}\n \tif (!cdn_dp_check_link_status(dp)) {\n-\t\tret = cdn_dp_train_link(dp);\n+\t\tret = cdns_mhdp_train_link(&dp->mhdp);\n \t\tif (ret) {\n-\t\t\tDRM_DEV_ERROR(dp->dev, \"Failed link train %d\\n\", ret);\n+\t\t\tDRM_DEV_ERROR(dev, \"Failed link train %d\\n\", ret);\n \t\t\tgoto out;\n \t\t}\n \t}\n \n-\tret = cdn_dp_set_video_status(dp, CONTROL_VIDEO_IDLE);\n+\tret = cdns_mhdp_set_video_status(&dp->mhdp, CONTROL_VIDEO_IDLE);\n \tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"Failed to idle video %d\\n\", ret);\n+\t\tDRM_DEV_ERROR(dev, \"Failed to idle video %d\\n\", ret);\n \t\tgoto out;\n \t}\n \n-\tret = cdn_dp_config_video(dp);\n+\tret = cdns_mhdp_config_video(&dp->mhdp);\n \tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"Failed to config video %d\\n\", ret);\n+\t\tDRM_DEV_ERROR(dev, \"Failed to config video %d\\n\", ret);\n \t\tgoto out;\n \t}\n \n-\tret = cdn_dp_set_video_status(dp, CONTROL_VIDEO_VALID);\n+\tret = cdns_mhdp_set_video_status(&dp->mhdp, CONTROL_VIDEO_VALID);\n \tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"Failed to valid video %d\\n\", ret);\n+\t\tDRM_DEV_ERROR(dev, \"Failed to valid video %d\\n\", ret);\n \t\tgoto out;\n \t}\n \n@@ -652,7 +662,8 @@ static void cdn_dp_encoder_disable(struct drm_encoder *encoder)\n \tif (dp->active) {\n \t\tret = cdn_dp_disable(dp);\n \t\tif (ret) {\n-\t\t\tDRM_DEV_ERROR(dp->dev, \"Failed to disable encoder %d\\n\",\n+\t\t\tDRM_DEV_ERROR(dp->mhdp.dev,\n+\t\t\t\t      \"Failed to disable encoder %d\\n\",\n \t\t\t\t      ret);\n \t\t}\n \t}\n@@ -692,7 +703,7 @@ static const struct drm_encoder_helper_funcs cdn_dp_encoder_helper_funcs = {\n \n static int cdn_dp_parse_dt(struct cdn_dp_device *dp)\n {\n-\tstruct device *dev = dp->dev;\n+\tstruct device *dev = dp->mhdp.dev;\n \tstruct device_node *np = dev->of_node;\n \tstruct platform_device *pdev = to_platform_device(dev);\n \n@@ -704,10 +715,10 @@ static int cdn_dp_parse_dt(struct cdn_dp_device *dp)\n \t\treturn PTR_ERR(dp->grf);\n \t}\n \n-\tdp->regs = devm_platform_ioremap_resource(pdev, 0);\n-\tif (IS_ERR(dp->regs)) {\n+\tdp->mhdp.regs_base = devm_platform_ioremap_resource(pdev, 0);\n+\tif (IS_ERR(dp->mhdp.regs_base)) {\n \t\tDRM_DEV_ERROR(dev, \"ioremap reg failed\\n\");\n-\t\treturn PTR_ERR(dp->regs);\n+\t\treturn PTR_ERR(dp->mhdp.regs_base);\n \t}\n \n \tdp->core_clk = devm_clk_get(dev, \"core-clk\");\n@@ -722,10 +733,10 @@ static int cdn_dp_parse_dt(struct cdn_dp_device *dp)\n \t\treturn PTR_ERR(dp->pclk);\n \t}\n \n-\tdp->spdif_clk = devm_clk_get(dev, \"spdif\");\n-\tif (IS_ERR(dp->spdif_clk)) {\n+\tdp->mhdp.spdif_clk = devm_clk_get(dev, \"spdif\");\n+\tif (IS_ERR(dp->mhdp.spdif_clk)) {\n \t\tDRM_DEV_ERROR(dev, \"cannot get spdif_clk\\n\");\n-\t\treturn PTR_ERR(dp->spdif_clk);\n+\t\treturn PTR_ERR(dp->mhdp.spdif_clk);\n \t}\n \n \tdp->grf_clk = devm_clk_get(dev, \"grf\");\n@@ -734,10 +745,10 @@ static int cdn_dp_parse_dt(struct cdn_dp_device *dp)\n \t\treturn PTR_ERR(dp->grf_clk);\n \t}\n \n-\tdp->spdif_rst = devm_reset_control_get(dev, \"spdif\");\n-\tif (IS_ERR(dp->spdif_rst)) {\n+\tdp->mhdp.spdif_rst = devm_reset_control_get(dev, \"spdif\");\n+\tif (IS_ERR(dp->mhdp.spdif_rst)) {\n \t\tDRM_DEV_ERROR(dev, \"no spdif reset control found\\n\");\n-\t\treturn PTR_ERR(dp->spdif_rst);\n+\t\treturn PTR_ERR(dp->mhdp.spdif_rst);\n \t}\n \n \tdp->dptx_rst = devm_reset_control_get(dev, \"dptx\");\n@@ -784,7 +795,7 @@ static int cdn_dp_audio_hw_params(struct device *dev,  void *data,\n \t\taudio.format = AFMT_I2S;\n \t\tbreak;\n \tcase HDMI_SPDIF:\n-\t\taudio.format = AFMT_SPDIF;\n+\t\taudio.format = AFMT_SPDIF_INT;\n \t\tbreak;\n \tdefault:\n \t\tDRM_DEV_ERROR(dev, \"Invalid format %d\\n\", daifmt->fmt);\n@@ -792,9 +803,9 @@ static int cdn_dp_audio_hw_params(struct device *dev,  void *data,\n \t\tgoto out;\n \t}\n \n-\tret = cdn_dp_audio_config(dp, &audio);\n+\tret = cdns_mhdp_audio_config(&dp->mhdp, &audio);\n \tif (!ret)\n-\t\tdp->audio_info = audio;\n+\t\tdp->mhdp.audio_info = audio;\n \n out:\n \tmutex_unlock(&dp->lock);\n@@ -810,9 +821,9 @@ static void cdn_dp_audio_shutdown(struct device *dev, void *data)\n \tif (!dp->active)\n \t\tgoto out;\n \n-\tret = cdn_dp_audio_stop(dp, &dp->audio_info);\n+\tret = cdns_mhdp_audio_stop(&dp->mhdp, &dp->mhdp.audio_info);\n \tif (!ret)\n-\t\tdp->audio_info.format = AFMT_UNUSED;\n+\t\tdp->mhdp.audio_info.format = AFMT_UNUSED;\n out:\n \tmutex_unlock(&dp->lock);\n }\n@@ -829,7 +840,7 @@ static int cdn_dp_audio_mute_stream(struct device *dev, void *data,\n \t\tgoto out;\n \t}\n \n-\tret = cdn_dp_audio_mute(dp, enable);\n+\tret = cdns_mhdp_audio_mute(&dp->mhdp, enable);\n \n out:\n \tmutex_unlock(&dp->lock);\n@@ -841,7 +852,8 @@ static int cdn_dp_audio_get_eld(struct device *dev, void *data,\n {\n \tstruct cdn_dp_device *dp = dev_get_drvdata(dev);\n \n-\tmemcpy(buf, dp->connector.eld, min(sizeof(dp->connector.eld), len));\n+\tmemcpy(buf, dp->mhdp.connector.base.eld,\n+\t       min(sizeof(dp->mhdp.connector.base.eld), len));\n \n \treturn 0;\n }\n@@ -864,11 +876,11 @@ static int cdn_dp_audio_codec_init(struct cdn_dp_device *dp,\n \t\t.max_i2s_channels = 8,\n \t};\n \n-\tdp->audio_pdev = platform_device_register_data(\n-\t\t\t dev, HDMI_CODEC_DRV_NAME, PLATFORM_DEVID_AUTO,\n-\t\t\t &codec_data, sizeof(codec_data));\n+\tdp->mhdp.audio_pdev = platform_device_register_data(\n+\t\t\t      dev, HDMI_CODEC_DRV_NAME, PLATFORM_DEVID_AUTO,\n+\t\t\t      &codec_data, sizeof(codec_data));\n \n-\treturn PTR_ERR_OR_ZERO(dp->audio_pdev);\n+\treturn PTR_ERR_OR_ZERO(dp->mhdp.audio_pdev);\n }\n \n static int cdn_dp_request_firmware(struct cdn_dp_device *dp)\n@@ -876,6 +888,7 @@ static int cdn_dp_request_firmware(struct cdn_dp_device *dp)\n \tint ret;\n \tunsigned long timeout = jiffies + msecs_to_jiffies(CDN_FW_TIMEOUT_MS);\n \tunsigned long sleep = 1000;\n+\tstruct device *dev = dp->mhdp.dev;\n \n \tWARN_ON(!mutex_is_locked(&dp->lock));\n \n@@ -886,13 +899,13 @@ static int cdn_dp_request_firmware(struct cdn_dp_device *dp)\n \tmutex_unlock(&dp->lock);\n \n \twhile (time_before(jiffies, timeout)) {\n-\t\tret = request_firmware(&dp->fw, CDN_DP_FIRMWARE, dp->dev);\n+\t\tret = request_firmware(&dp->fw, CDN_DP_FIRMWARE, dev);\n \t\tif (ret == -ENOENT) {\n \t\t\tmsleep(sleep);\n \t\t\tsleep *= 2;\n \t\t\tcontinue;\n \t\t} else if (ret) {\n-\t\t\tDRM_DEV_ERROR(dp->dev,\n+\t\t\tDRM_DEV_ERROR(dev,\n \t\t\t\t      \"failed to request firmware: %d\\n\", ret);\n \t\t\tgoto out;\n \t\t}\n@@ -902,7 +915,7 @@ static int cdn_dp_request_firmware(struct cdn_dp_device *dp)\n \t\tgoto out;\n \t}\n \n-\tDRM_DEV_ERROR(dp->dev, \"Timed out trying to load firmware\\n\");\n+\tDRM_DEV_ERROR(dev, \"Timed out trying to load firmware\\n\");\n \tret = -ETIMEDOUT;\n out:\n \tmutex_lock(&dp->lock);\n@@ -913,8 +926,9 @@ static void cdn_dp_pd_event_work(struct work_struct *work)\n {\n \tstruct cdn_dp_device *dp = container_of(work, struct cdn_dp_device,\n \t\t\t\t\t\tevent_work);\n-\tstruct drm_connector *connector = &dp->connector;\n+\tstruct drm_connector *connector = &dp->mhdp.connector.base;\n \tenum drm_connector_status old_status;\n+\tstruct device *dev = dp->mhdp.dev;\n \n \tint ret;\n \n@@ -931,44 +945,45 @@ static void cdn_dp_pd_event_work(struct work_struct *work)\n \n \t/* Not connected, notify userspace to disable the block */\n \tif (!cdn_dp_connected_port(dp)) {\n-\t\tDRM_DEV_INFO(dp->dev, \"Not connected. Disabling cdn\\n\");\n+\t\tDRM_DEV_INFO(dev, \"Not connected. Disabling cdn\\n\");\n \t\tdp->connected = false;\n \n \t/* Connected but not enabled, enable the block */\n \t} else if (!dp->active) {\n-\t\tDRM_DEV_INFO(dp->dev, \"Connected, not enabled. Enabling cdn\\n\");\n+\t\tDRM_DEV_INFO(dev, \"Connected, not enabled. Enabling cdn\\n\");\n \t\tret = cdn_dp_enable(dp);\n \t\tif (ret) {\n-\t\t\tDRM_DEV_ERROR(dp->dev, \"Enable dp failed %d\\n\", ret);\n+\t\t\tDRM_DEV_ERROR(dev, \"Enable dp failed %d\\n\", ret);\n \t\t\tdp->connected = false;\n \t\t}\n \n \t/* Enabled and connected to a dongle without a sink, notify userspace */\n \t} else if (!cdn_dp_check_sink_connection(dp)) {\n-\t\tDRM_DEV_INFO(dp->dev, \"Connected without sink. Assert hpd\\n\");\n+\t\tDRM_DEV_INFO(dev, \"Connected without sink. Assert hpd\\n\");\n \t\tdp->connected = false;\n \n \t/* Enabled and connected with a sink, re-train if requested */\n \t} else if (!cdn_dp_check_link_status(dp)) {\n-\t\tunsigned int rate = dp->max_rate;\n-\t\tunsigned int lanes = dp->max_lanes;\n-\t\tstruct drm_display_mode *mode = &dp->mode;\n+\t\tunsigned int rate = dp->mhdp.dp.rate;\n+\t\tunsigned int lanes = dp->mhdp.dp.num_lanes;\n+\t\tstruct drm_display_mode *mode = &dp->mhdp.mode;\n \n-\t\tDRM_DEV_INFO(dp->dev, \"Connected with sink. Re-train link\\n\");\n-\t\tret = cdn_dp_train_link(dp);\n+\t\tDRM_DEV_INFO(dev, \"Connected with sink. Re-train link\\n\");\n+\t\tret = cdns_mhdp_train_link(&dp->mhdp);\n \t\tif (ret) {\n \t\t\tdp->connected = false;\n-\t\t\tDRM_DEV_ERROR(dp->dev, \"Train link failed %d\\n\", ret);\n+\t\t\tDRM_DEV_ERROR(dev, \"Train link failed %d\\n\", ret);\n \t\t\tgoto out;\n \t\t}\n \n \t\t/* If training result is changed, update the video config */\n \t\tif (mode->clock &&\n-\t\t    (rate != dp->max_rate || lanes != dp->max_lanes)) {\n-\t\t\tret = cdn_dp_config_video(dp);\n+\t\t    (rate != dp->mhdp.dp.rate ||\n+\t\t     lanes != dp->mhdp.dp.num_lanes)) {\n+\t\t\tret = cdns_mhdp_config_video(&dp->mhdp);\n \t\t\tif (ret) {\n \t\t\t\tdp->connected = false;\n-\t\t\t\tDRM_DEV_ERROR(dp->dev,\n+\t\t\t\tDRM_DEV_ERROR(dev,\n \t\t\t\t\t      \"Failed to config video %d\\n\",\n \t\t\t\t\t      ret);\n \t\t\t}\n@@ -1037,7 +1052,7 @@ static int cdn_dp_bind(struct device *dev, struct device *master, void *data)\n \n \tdrm_encoder_helper_add(encoder, &cdn_dp_encoder_helper_funcs);\n \n-\tconnector = &dp->connector;\n+\tconnector = &dp->mhdp.connector.base;\n \tconnector->polled = DRM_CONNECTOR_POLL_HPD;\n \tconnector->dpms = DRM_MODE_DPMS_OFF;\n \n@@ -1061,7 +1076,7 @@ static int cdn_dp_bind(struct device *dev, struct device *master, void *data)\n \t\tport = dp->port[i];\n \n \t\tport->event_nb.notifier_call = cdn_dp_pd_event;\n-\t\tret = devm_extcon_register_notifier(dp->dev, port->extcon,\n+\t\tret = devm_extcon_register_notifier(dp->mhdp.dev, port->extcon,\n \t\t\t\t\t\t    EXTCON_DISP_DP,\n \t\t\t\t\t\t    &port->event_nb);\n \t\tif (ret) {\n@@ -1088,7 +1103,7 @@ static void cdn_dp_unbind(struct device *dev, struct device *master, void *data)\n {\n \tstruct cdn_dp_device *dp = dev_get_drvdata(dev);\n \tstruct drm_encoder *encoder = &dp->encoder.encoder;\n-\tstruct drm_connector *connector = &dp->connector;\n+\tstruct drm_connector *connector = &dp->mhdp.connector.base;\n \n \tcancel_work_sync(&dp->event_work);\n \tcdn_dp_encoder_disable(encoder);\n@@ -1148,7 +1163,7 @@ static int cdn_dp_probe(struct platform_device *pdev)\n \tdp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL);\n \tif (!dp)\n \t\treturn -ENOMEM;\n-\tdp->dev = dev;\n+\tdp->mhdp.dev = dev;\n \n \tmatch = of_match_node(cdn_dp_dt_ids, pdev->dev.of_node);\n \tdp_data = (struct cdn_dp_data *)match->data;\n@@ -1192,8 +1207,8 @@ static int cdn_dp_remove(struct platform_device *pdev)\n {\n \tstruct cdn_dp_device *dp = platform_get_drvdata(pdev);\n \n-\tplatform_device_unregister(dp->audio_pdev);\n-\tcdn_dp_suspend(dp->dev);\n+\tplatform_device_unregister(dp->mhdp.audio_pdev);\n+\tcdn_dp_suspend(dp->mhdp.dev);\n \tcomponent_del(&pdev->dev, &cdn_dp_component_ops);\n \n \treturn 0;\n@@ -1203,7 +1218,7 @@ static void cdn_dp_shutdown(struct platform_device *pdev)\n {\n \tstruct cdn_dp_device *dp = platform_get_drvdata(pdev);\n \n-\tcdn_dp_suspend(dp->dev);\n+\tcdn_dp_suspend(dp->mhdp.dev);\n }\n \n static const struct dev_pm_ops cdn_dp_pm_ops = {\ndiff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.h b/drivers/gpu/drm/rockchip/cdn-dp-core.h\nindex 81ac9b658a70..8b1b15b92503 100644\n--- a/drivers/gpu/drm/rockchip/cdn-dp-core.h\n+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.h\n@@ -7,6 +7,7 @@\n #ifndef _CDN_DP_CORE_H\n #define _CDN_DP_CORE_H\n \n+#include <drm/bridge/cdns-mhdp.h>\n #include <drm/display/drm_dp_helper.h>\n #include <drm/drm_panel.h>\n #include <drm/drm_probe_helper.h>\n@@ -15,35 +16,6 @@\n \n #define MAX_PHY\t\t2\n \n-enum audio_format {\n-\tAFMT_I2S = 0,\n-\tAFMT_SPDIF = 1,\n-\tAFMT_UNUSED,\n-};\n-\n-struct audio_info {\n-\tenum audio_format format;\n-\tint sample_rate;\n-\tint channels;\n-\tint sample_width;\n-};\n-\n-enum vic_pxl_encoding_format {\n-\tPXL_RGB = 0x1,\n-\tYCBCR_4_4_4 = 0x2,\n-\tYCBCR_4_2_2 = 0x4,\n-\tYCBCR_4_2_0 = 0x8,\n-\tY_ONLY = 0x10,\n-};\n-\n-struct video_info {\n-\tbool h_sync_polarity;\n-\tbool v_sync_polarity;\n-\tbool interlaced;\n-\tint color_depth;\n-\tenum vic_pxl_encoding_format color_fmt;\n-};\n-\n struct cdn_firmware_header {\n \tu32 size_bytes; /* size of the entire header+image(s) in bytes */\n \tu32 header_size; /* size of just the header in bytes */\n@@ -62,12 +34,9 @@ struct cdn_dp_port {\n };\n \n struct cdn_dp_device {\n-\tstruct device *dev;\n+\tstruct cdns_mhdp_device mhdp;\n \tstruct drm_device *drm_dev;\n-\tstruct drm_connector connector;\n \tstruct rockchip_encoder encoder;\n-\tstruct drm_display_mode mode;\n-\tstruct platform_device *audio_pdev;\n \tstruct work_struct event_work;\n \tstruct edid *edid;\n \n@@ -77,29 +46,20 @@ struct cdn_dp_device {\n \tbool suspended;\n \n \tconst struct firmware *fw;\t/* cdn dp firmware */\n-\tunsigned int fw_version;\t/* cdn fw version */\n \tbool fw_loaded;\n \n-\tvoid __iomem *regs;\n \tstruct regmap *grf;\n \tstruct clk *core_clk;\n \tstruct clk *pclk;\n-\tstruct clk *spdif_clk;\n \tstruct clk *grf_clk;\n-\tstruct reset_control *spdif_rst;\n \tstruct reset_control *dptx_rst;\n \tstruct reset_control *apb_rst;\n \tstruct reset_control *core_rst;\n-\tstruct audio_info audio_info;\n-\tstruct video_info video_info;\n \tstruct cdn_dp_port *port[MAX_PHY];\n \tu8 ports;\n-\tu8 max_lanes;\n-\tunsigned int max_rate;\n \tu8 lanes;\n \tint active_port;\n \n-\tu8 dpcd[DP_RECEIVER_CAP_SIZE];\n \tbool sink_has_audio;\n \n \thdmi_codec_plugged_cb plugged_cb;\ndiff --git a/drivers/gpu/drm/rockchip/cdn-dp-reg.c b/drivers/gpu/drm/rockchip/cdn-dp-reg.c\ndeleted file mode 100644\nindex 9d2163ef4d6e..000000000000\n--- a/drivers/gpu/drm/rockchip/cdn-dp-reg.c\n+++ /dev/null\n@@ -1,960 +0,0 @@\n-// SPDX-License-Identifier: GPL-2.0-only\n-/*\n- * Copyright (C) Fuzhou Rockchip Electronics Co.Ltd\n- * Author: Chris Zhong <zyw@rock-chips.com>\n- */\n-\n-#include <linux/clk.h>\n-#include <linux/device.h>\n-#include <linux/delay.h>\n-#include <linux/io.h>\n-#include <linux/iopoll.h>\n-#include <linux/reset.h>\n-\n-#include \"cdn-dp-core.h\"\n-#include \"cdn-dp-reg.h\"\n-\n-#define CDN_DP_SPDIF_CLK\t\t200000000\n-#define FW_ALIVE_TIMEOUT_US\t\t1000000\n-#define MAILBOX_RETRY_US\t\t1000\n-#define MAILBOX_TIMEOUT_US\t\t5000000\n-#define LINK_TRAINING_RETRY_MS\t\t20\n-#define LINK_TRAINING_TIMEOUT_MS\t500\n-\n-void cdn_dp_set_fw_clk(struct cdn_dp_device *dp, unsigned long clk)\n-{\n-\twritel(clk / 1000000, dp->regs + SW_CLK_H);\n-}\n-\n-void cdn_dp_clock_reset(struct cdn_dp_device *dp)\n-{\n-\tu32 val;\n-\n-\tval = DPTX_FRMR_DATA_CLK_RSTN_EN |\n-\t      DPTX_FRMR_DATA_CLK_EN |\n-\t      DPTX_PHY_DATA_RSTN_EN |\n-\t      DPTX_PHY_DATA_CLK_EN |\n-\t      DPTX_PHY_CHAR_RSTN_EN |\n-\t      DPTX_PHY_CHAR_CLK_EN |\n-\t      SOURCE_AUX_SYS_CLK_RSTN_EN |\n-\t      SOURCE_AUX_SYS_CLK_EN |\n-\t      DPTX_SYS_CLK_RSTN_EN |\n-\t      DPTX_SYS_CLK_EN |\n-\t      CFG_DPTX_VIF_CLK_RSTN_EN |\n-\t      CFG_DPTX_VIF_CLK_EN;\n-\twritel(val, dp->regs + SOURCE_DPTX_CAR);\n-\n-\tval = SOURCE_PHY_RSTN_EN | SOURCE_PHY_CLK_EN;\n-\twritel(val, dp->regs + SOURCE_PHY_CAR);\n-\n-\tval = SOURCE_PKT_SYS_RSTN_EN |\n-\t      SOURCE_PKT_SYS_CLK_EN |\n-\t      SOURCE_PKT_DATA_RSTN_EN |\n-\t      SOURCE_PKT_DATA_CLK_EN;\n-\twritel(val, dp->regs + SOURCE_PKT_CAR);\n-\n-\tval = SPDIF_CDR_CLK_RSTN_EN |\n-\t      SPDIF_CDR_CLK_EN |\n-\t      SOURCE_AIF_SYS_RSTN_EN |\n-\t      SOURCE_AIF_SYS_CLK_EN |\n-\t      SOURCE_AIF_CLK_RSTN_EN |\n-\t      SOURCE_AIF_CLK_EN;\n-\twritel(val, dp->regs + SOURCE_AIF_CAR);\n-\n-\tval = SOURCE_CIPHER_SYSTEM_CLK_RSTN_EN |\n-\t      SOURCE_CIPHER_SYS_CLK_EN |\n-\t      SOURCE_CIPHER_CHAR_CLK_RSTN_EN |\n-\t      SOURCE_CIPHER_CHAR_CLK_EN;\n-\twritel(val, dp->regs + SOURCE_CIPHER_CAR);\n-\n-\tval = SOURCE_CRYPTO_SYS_CLK_RSTN_EN |\n-\t      SOURCE_CRYPTO_SYS_CLK_EN;\n-\twritel(val, dp->regs + SOURCE_CRYPTO_CAR);\n-\n-\t/* enable Mailbox and PIF interrupt */\n-\twritel(0, dp->regs + APB_INT_MASK);\n-}\n-\n-static int cdn_dp_mailbox_read(struct cdn_dp_device *dp)\n-{\n-\tint val, ret;\n-\n-\tret = readx_poll_timeout(readl, dp->regs + MAILBOX_EMPTY_ADDR,\n-\t\t\t\t val, !val, MAILBOX_RETRY_US,\n-\t\t\t\t MAILBOX_TIMEOUT_US);\n-\tif (ret < 0)\n-\t\treturn ret;\n-\n-\treturn readl(dp->regs + MAILBOX0_RD_DATA) & 0xff;\n-}\n-\n-static int cdp_dp_mailbox_write(struct cdn_dp_device *dp, u8 val)\n-{\n-\tint ret, full;\n-\n-\tret = readx_poll_timeout(readl, dp->regs + MAILBOX_FULL_ADDR,\n-\t\t\t\t full, !full, MAILBOX_RETRY_US,\n-\t\t\t\t MAILBOX_TIMEOUT_US);\n-\tif (ret < 0)\n-\t\treturn ret;\n-\n-\twritel(val, dp->regs + MAILBOX0_WR_DATA);\n-\n-\treturn 0;\n-}\n-\n-static int cdn_dp_mailbox_validate_receive(struct cdn_dp_device *dp,\n-\t\t\t\t\t   u8 module_id, u8 opcode,\n-\t\t\t\t\t   u16 req_size)\n-{\n-\tu32 mbox_size, i;\n-\tu8 header[4];\n-\tint ret;\n-\n-\t/* read the header of the message */\n-\tfor (i = 0; i < 4; i++) {\n-\t\tret = cdn_dp_mailbox_read(dp);\n-\t\tif (ret < 0)\n-\t\t\treturn ret;\n-\n-\t\theader[i] = ret;\n-\t}\n-\n-\tmbox_size = (header[2] << 8) | header[3];\n-\n-\tif (opcode != header[0] || module_id != header[1] ||\n-\t    req_size != mbox_size) {\n-\t\t/*\n-\t\t * If the message in mailbox is not what we want, we need to\n-\t\t * clear the mailbox by reading its contents.\n-\t\t */\n-\t\tfor (i = 0; i < mbox_size; i++)\n-\t\t\tif (cdn_dp_mailbox_read(dp) < 0)\n-\t\t\t\tbreak;\n-\n-\t\treturn -EINVAL;\n-\t}\n-\n-\treturn 0;\n-}\n-\n-static int cdn_dp_mailbox_read_receive(struct cdn_dp_device *dp,\n-\t\t\t\t       u8 *buff, u16 buff_size)\n-{\n-\tu32 i;\n-\tint ret;\n-\n-\tfor (i = 0; i < buff_size; i++) {\n-\t\tret = cdn_dp_mailbox_read(dp);\n-\t\tif (ret < 0)\n-\t\t\treturn ret;\n-\n-\t\tbuff[i] = ret;\n-\t}\n-\n-\treturn 0;\n-}\n-\n-static int cdn_dp_mailbox_send(struct cdn_dp_device *dp, u8 module_id,\n-\t\t\t       u8 opcode, u16 size, u8 *message)\n-{\n-\tu8 header[4];\n-\tint ret, i;\n-\n-\theader[0] = opcode;\n-\theader[1] = module_id;\n-\theader[2] = (size >> 8) & 0xff;\n-\theader[3] = size & 0xff;\n-\n-\tfor (i = 0; i < 4; i++) {\n-\t\tret = cdp_dp_mailbox_write(dp, header[i]);\n-\t\tif (ret)\n-\t\t\treturn ret;\n-\t}\n-\n-\tfor (i = 0; i < size; i++) {\n-\t\tret = cdp_dp_mailbox_write(dp, message[i]);\n-\t\tif (ret)\n-\t\t\treturn ret;\n-\t}\n-\n-\treturn 0;\n-}\n-\n-static int cdn_dp_reg_write(struct cdn_dp_device *dp, u16 addr, u32 val)\n-{\n-\tu8 msg[6];\n-\n-\tmsg[0] = (addr >> 8) & 0xff;\n-\tmsg[1] = addr & 0xff;\n-\tmsg[2] = (val >> 24) & 0xff;\n-\tmsg[3] = (val >> 16) & 0xff;\n-\tmsg[4] = (val >> 8) & 0xff;\n-\tmsg[5] = val & 0xff;\n-\treturn cdn_dp_mailbox_send(dp, MB_MODULE_ID_DP_TX, DPTX_WRITE_REGISTER,\n-\t\t\t\t   sizeof(msg), msg);\n-}\n-\n-static int cdn_dp_reg_write_bit(struct cdn_dp_device *dp, u16 addr,\n-\t\t\t\tu8 start_bit, u8 bits_no, u32 val)\n-{\n-\tu8 field[8];\n-\n-\tfield[0] = (addr >> 8) & 0xff;\n-\tfield[1] = addr & 0xff;\n-\tfield[2] = start_bit;\n-\tfield[3] = bits_no;\n-\tfield[4] = (val >> 24) & 0xff;\n-\tfield[5] = (val >> 16) & 0xff;\n-\tfield[6] = (val >> 8) & 0xff;\n-\tfield[7] = val & 0xff;\n-\n-\treturn cdn_dp_mailbox_send(dp, MB_MODULE_ID_DP_TX, DPTX_WRITE_FIELD,\n-\t\t\t\t   sizeof(field), field);\n-}\n-\n-int cdn_dp_dpcd_read(struct cdn_dp_device *dp, u32 addr, u8 *data, u16 len)\n-{\n-\tu8 msg[5], reg[5];\n-\tint ret;\n-\n-\tmsg[0] = (len >> 8) & 0xff;\n-\tmsg[1] = len & 0xff;\n-\tmsg[2] = (addr >> 16) & 0xff;\n-\tmsg[3] = (addr >> 8) & 0xff;\n-\tmsg[4] = addr & 0xff;\n-\tret = cdn_dp_mailbox_send(dp, MB_MODULE_ID_DP_TX, DPTX_READ_DPCD,\n-\t\t\t\t  sizeof(msg), msg);\n-\tif (ret)\n-\t\tgoto err_dpcd_read;\n-\n-\tret = cdn_dp_mailbox_validate_receive(dp, MB_MODULE_ID_DP_TX,\n-\t\t\t\t\t      DPTX_READ_DPCD,\n-\t\t\t\t\t      sizeof(reg) + len);\n-\tif (ret)\n-\t\tgoto err_dpcd_read;\n-\n-\tret = cdn_dp_mailbox_read_receive(dp, reg, sizeof(reg));\n-\tif (ret)\n-\t\tgoto err_dpcd_read;\n-\n-\tret = cdn_dp_mailbox_read_receive(dp, data, len);\n-\n-err_dpcd_read:\n-\treturn ret;\n-}\n-\n-int cdn_dp_dpcd_write(struct cdn_dp_device *dp, u32 addr, u8 value)\n-{\n-\tu8 msg[6], reg[5];\n-\tint ret;\n-\n-\tmsg[0] = 0;\n-\tmsg[1] = 1;\n-\tmsg[2] = (addr >> 16) & 0xff;\n-\tmsg[3] = (addr >> 8) & 0xff;\n-\tmsg[4] = addr & 0xff;\n-\tmsg[5] = value;\n-\tret = cdn_dp_mailbox_send(dp, MB_MODULE_ID_DP_TX, DPTX_WRITE_DPCD,\n-\t\t\t\t  sizeof(msg), msg);\n-\tif (ret)\n-\t\tgoto err_dpcd_write;\n-\n-\tret = cdn_dp_mailbox_validate_receive(dp, MB_MODULE_ID_DP_TX,\n-\t\t\t\t\t      DPTX_WRITE_DPCD, sizeof(reg));\n-\tif (ret)\n-\t\tgoto err_dpcd_write;\n-\n-\tret = cdn_dp_mailbox_read_receive(dp, reg, sizeof(reg));\n-\tif (ret)\n-\t\tgoto err_dpcd_write;\n-\n-\tif (addr != (reg[2] << 16 | reg[3] << 8 | reg[4]))\n-\t\tret = -EINVAL;\n-\n-err_dpcd_write:\n-\tif (ret)\n-\t\tDRM_DEV_ERROR(dp->dev, \"dpcd write failed: %d\\n\", ret);\n-\treturn ret;\n-}\n-\n-int cdn_dp_load_firmware(struct cdn_dp_device *dp, const u32 *i_mem,\n-\t\t\t u32 i_size, const u32 *d_mem, u32 d_size)\n-{\n-\tu32 reg;\n-\tint i, ret;\n-\n-\t/* reset ucpu before load firmware*/\n-\twritel(APB_IRAM_PATH | APB_DRAM_PATH | APB_XT_RESET,\n-\t       dp->regs + APB_CTRL);\n-\n-\tfor (i = 0; i < i_size; i += 4)\n-\t\twritel(*i_mem++, dp->regs + ADDR_IMEM + i);\n-\n-\tfor (i = 0; i < d_size; i += 4)\n-\t\twritel(*d_mem++, dp->regs + ADDR_DMEM + i);\n-\n-\t/* un-reset ucpu */\n-\twritel(0, dp->regs + APB_CTRL);\n-\n-\t/* check the keep alive register to make sure fw working */\n-\tret = readx_poll_timeout(readl, dp->regs + KEEP_ALIVE,\n-\t\t\t\t reg, reg, 2000, FW_ALIVE_TIMEOUT_US);\n-\tif (ret < 0) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"failed to loaded the FW reg = %x\\n\",\n-\t\t\t      reg);\n-\t\treturn -EINVAL;\n-\t}\n-\n-\treg = readl(dp->regs + VER_L) & 0xff;\n-\tdp->fw_version = reg;\n-\treg = readl(dp->regs + VER_H) & 0xff;\n-\tdp->fw_version |= reg << 8;\n-\treg = readl(dp->regs + VER_LIB_L_ADDR) & 0xff;\n-\tdp->fw_version |= reg << 16;\n-\treg = readl(dp->regs + VER_LIB_H_ADDR) & 0xff;\n-\tdp->fw_version |= reg << 24;\n-\n-\tDRM_DEV_DEBUG(dp->dev, \"firmware version: %x\\n\", dp->fw_version);\n-\n-\treturn 0;\n-}\n-\n-int cdn_dp_set_firmware_active(struct cdn_dp_device *dp, bool enable)\n-{\n-\tu8 msg[5];\n-\tint ret, i;\n-\n-\tmsg[0] = GENERAL_MAIN_CONTROL;\n-\tmsg[1] = MB_MODULE_ID_GENERAL;\n-\tmsg[2] = 0;\n-\tmsg[3] = 1;\n-\tmsg[4] = enable ? FW_ACTIVE : FW_STANDBY;\n-\n-\tfor (i = 0; i < sizeof(msg); i++) {\n-\t\tret = cdp_dp_mailbox_write(dp, msg[i]);\n-\t\tif (ret)\n-\t\t\tgoto err_set_firmware_active;\n-\t}\n-\n-\t/* read the firmware state */\n-\tfor (i = 0; i < sizeof(msg); i++)  {\n-\t\tret = cdn_dp_mailbox_read(dp);\n-\t\tif (ret < 0)\n-\t\t\tgoto err_set_firmware_active;\n-\n-\t\tmsg[i] = ret;\n-\t}\n-\n-\tret = 0;\n-\n-err_set_firmware_active:\n-\tif (ret < 0)\n-\t\tDRM_DEV_ERROR(dp->dev, \"set firmware active failed\\n\");\n-\treturn ret;\n-}\n-\n-int cdn_dp_set_host_cap(struct cdn_dp_device *dp, u8 lanes, bool flip)\n-{\n-\tu8 msg[8];\n-\tint ret;\n-\n-\tmsg[0] = CDN_DP_MAX_LINK_RATE;\n-\tmsg[1] = lanes | SCRAMBLER_EN;\n-\tmsg[2] = VOLTAGE_LEVEL_2;\n-\tmsg[3] = PRE_EMPHASIS_LEVEL_3;\n-\tmsg[4] = PTS1 | PTS2 | PTS3 | PTS4;\n-\tmsg[5] = FAST_LT_NOT_SUPPORT;\n-\tmsg[6] = flip ? LANE_MAPPING_FLIPPED : LANE_MAPPING_NORMAL;\n-\tmsg[7] = ENHANCED;\n-\n-\tret = cdn_dp_mailbox_send(dp, MB_MODULE_ID_DP_TX,\n-\t\t\t\t  DPTX_SET_HOST_CAPABILITIES,\n-\t\t\t\t  sizeof(msg), msg);\n-\tif (ret)\n-\t\tgoto err_set_host_cap;\n-\n-\tret = cdn_dp_reg_write(dp, DP_AUX_SWAP_INVERSION_CONTROL,\n-\t\t\t       AUX_HOST_INVERT);\n-\n-err_set_host_cap:\n-\tif (ret)\n-\t\tDRM_DEV_ERROR(dp->dev, \"set host cap failed: %d\\n\", ret);\n-\treturn ret;\n-}\n-\n-int cdn_dp_event_config(struct cdn_dp_device *dp)\n-{\n-\tu8 msg[5];\n-\tint ret;\n-\n-\tmemset(msg, 0, sizeof(msg));\n-\n-\tmsg[0] = DPTX_EVENT_ENABLE_HPD | DPTX_EVENT_ENABLE_TRAINING;\n-\n-\tret = cdn_dp_mailbox_send(dp, MB_MODULE_ID_DP_TX, DPTX_ENABLE_EVENT,\n-\t\t\t\t  sizeof(msg), msg);\n-\tif (ret)\n-\t\tDRM_DEV_ERROR(dp->dev, \"set event config failed: %d\\n\", ret);\n-\n-\treturn ret;\n-}\n-\n-u32 cdn_dp_get_event(struct cdn_dp_device *dp)\n-{\n-\treturn readl(dp->regs + SW_EVENTS0);\n-}\n-\n-int cdn_dp_get_hpd_status(struct cdn_dp_device *dp)\n-{\n-\tu8 status;\n-\tint ret;\n-\n-\tret = cdn_dp_mailbox_send(dp, MB_MODULE_ID_DP_TX, DPTX_HPD_STATE,\n-\t\t\t\t  0, NULL);\n-\tif (ret)\n-\t\tgoto err_get_hpd;\n-\n-\tret = cdn_dp_mailbox_validate_receive(dp, MB_MODULE_ID_DP_TX,\n-\t\t\t\t\t      DPTX_HPD_STATE, sizeof(status));\n-\tif (ret)\n-\t\tgoto err_get_hpd;\n-\n-\tret = cdn_dp_mailbox_read_receive(dp, &status, sizeof(status));\n-\tif (ret)\n-\t\tgoto err_get_hpd;\n-\n-\treturn status;\n-\n-err_get_hpd:\n-\tDRM_DEV_ERROR(dp->dev, \"get hpd status failed: %d\\n\", ret);\n-\treturn ret;\n-}\n-\n-int cdn_dp_get_edid_block(void *data, u8 *edid,\n-\t\t\t  unsigned int block, size_t length)\n-{\n-\tstruct cdn_dp_device *dp = data;\n-\tu8 msg[2], reg[2], i;\n-\tint ret;\n-\n-\tfor (i = 0; i < 4; i++) {\n-\t\tmsg[0] = block / 2;\n-\t\tmsg[1] = block % 2;\n-\n-\t\tret = cdn_dp_mailbox_send(dp, MB_MODULE_ID_DP_TX, DPTX_GET_EDID,\n-\t\t\t\t\t  sizeof(msg), msg);\n-\t\tif (ret)\n-\t\t\tcontinue;\n-\n-\t\tret = cdn_dp_mailbox_validate_receive(dp, MB_MODULE_ID_DP_TX,\n-\t\t\t\t\t\t      DPTX_GET_EDID,\n-\t\t\t\t\t\t      sizeof(reg) + length);\n-\t\tif (ret)\n-\t\t\tcontinue;\n-\n-\t\tret = cdn_dp_mailbox_read_receive(dp, reg, sizeof(reg));\n-\t\tif (ret)\n-\t\t\tcontinue;\n-\n-\t\tret = cdn_dp_mailbox_read_receive(dp, edid, length);\n-\t\tif (ret)\n-\t\t\tcontinue;\n-\n-\t\tif (reg[0] == length && reg[1] == block / 2)\n-\t\t\tbreak;\n-\t}\n-\n-\tif (ret)\n-\t\tDRM_DEV_ERROR(dp->dev, \"get block[%d] edid failed: %d\\n\", block,\n-\t\t\t      ret);\n-\n-\treturn ret;\n-}\n-\n-static int cdn_dp_training_start(struct cdn_dp_device *dp)\n-{\n-\tunsigned long timeout;\n-\tu8 msg, event[2];\n-\tint ret;\n-\n-\tmsg = LINK_TRAINING_RUN;\n-\n-\t/* start training */\n-\tret = cdn_dp_mailbox_send(dp, MB_MODULE_ID_DP_TX, DPTX_TRAINING_CONTROL,\n-\t\t\t\t  sizeof(msg), &msg);\n-\tif (ret)\n-\t\tgoto err_training_start;\n-\n-\ttimeout = jiffies + msecs_to_jiffies(LINK_TRAINING_TIMEOUT_MS);\n-\twhile (time_before(jiffies, timeout)) {\n-\t\tmsleep(LINK_TRAINING_RETRY_MS);\n-\t\tret = cdn_dp_mailbox_send(dp, MB_MODULE_ID_DP_TX,\n-\t\t\t\t\t  DPTX_READ_EVENT, 0, NULL);\n-\t\tif (ret)\n-\t\t\tgoto err_training_start;\n-\n-\t\tret = cdn_dp_mailbox_validate_receive(dp, MB_MODULE_ID_DP_TX,\n-\t\t\t\t\t\t      DPTX_READ_EVENT,\n-\t\t\t\t\t\t      sizeof(event));\n-\t\tif (ret)\n-\t\t\tgoto err_training_start;\n-\n-\t\tret = cdn_dp_mailbox_read_receive(dp, event, sizeof(event));\n-\t\tif (ret)\n-\t\t\tgoto err_training_start;\n-\n-\t\tif (event[1] & EQ_PHASE_FINISHED)\n-\t\t\treturn 0;\n-\t}\n-\n-\tret = -ETIMEDOUT;\n-\n-err_training_start:\n-\tDRM_DEV_ERROR(dp->dev, \"training failed: %d\\n\", ret);\n-\treturn ret;\n-}\n-\n-static int cdn_dp_get_training_status(struct cdn_dp_device *dp)\n-{\n-\tu8 status[10];\n-\tint ret;\n-\n-\tret = cdn_dp_mailbox_send(dp, MB_MODULE_ID_DP_TX, DPTX_READ_LINK_STAT,\n-\t\t\t\t  0, NULL);\n-\tif (ret)\n-\t\tgoto err_get_training_status;\n-\n-\tret = cdn_dp_mailbox_validate_receive(dp, MB_MODULE_ID_DP_TX,\n-\t\t\t\t\t      DPTX_READ_LINK_STAT,\n-\t\t\t\t\t      sizeof(status));\n-\tif (ret)\n-\t\tgoto err_get_training_status;\n-\n-\tret = cdn_dp_mailbox_read_receive(dp, status, sizeof(status));\n-\tif (ret)\n-\t\tgoto err_get_training_status;\n-\n-\tdp->max_rate = drm_dp_bw_code_to_link_rate(status[0]);\n-\tdp->max_lanes = status[1];\n-\n-err_get_training_status:\n-\tif (ret)\n-\t\tDRM_DEV_ERROR(dp->dev, \"get training status failed: %d\\n\", ret);\n-\treturn ret;\n-}\n-\n-int cdn_dp_train_link(struct cdn_dp_device *dp)\n-{\n-\tint ret;\n-\n-\tret = cdn_dp_training_start(dp);\n-\tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"Failed to start training %d\\n\", ret);\n-\t\treturn ret;\n-\t}\n-\n-\tret = cdn_dp_get_training_status(dp);\n-\tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"Failed to get training stat %d\\n\", ret);\n-\t\treturn ret;\n-\t}\n-\n-\tDRM_DEV_DEBUG_KMS(dp->dev, \"rate:0x%x, lanes:%d\\n\", dp->max_rate,\n-\t\t\t  dp->max_lanes);\n-\treturn ret;\n-}\n-\n-int cdn_dp_set_video_status(struct cdn_dp_device *dp, int active)\n-{\n-\tu8 msg;\n-\tint ret;\n-\n-\tmsg = !!active;\n-\n-\tret = cdn_dp_mailbox_send(dp, MB_MODULE_ID_DP_TX, DPTX_SET_VIDEO,\n-\t\t\t\t  sizeof(msg), &msg);\n-\tif (ret)\n-\t\tDRM_DEV_ERROR(dp->dev, \"set video status failed: %d\\n\", ret);\n-\n-\treturn ret;\n-}\n-\n-static int cdn_dp_get_msa_misc(struct video_info *video,\n-\t\t\t       struct drm_display_mode *mode)\n-{\n-\tu32 msa_misc;\n-\tu8 val[2] = {0};\n-\n-\tswitch (video->color_fmt) {\n-\tcase PXL_RGB:\n-\tcase Y_ONLY:\n-\t\tval[0] = 0;\n-\t\tbreak;\n-\t/* set YUV default color space conversion to BT601 */\n-\tcase YCBCR_4_4_4:\n-\t\tval[0] = 6 + BT_601 * 8;\n-\t\tbreak;\n-\tcase YCBCR_4_2_2:\n-\t\tval[0] = 5 + BT_601 * 8;\n-\t\tbreak;\n-\tcase YCBCR_4_2_0:\n-\t\tval[0] = 5;\n-\t\tbreak;\n-\t}\n-\n-\tswitch (video->color_depth) {\n-\tcase 6:\n-\t\tval[1] = 0;\n-\t\tbreak;\n-\tcase 8:\n-\t\tval[1] = 1;\n-\t\tbreak;\n-\tcase 10:\n-\t\tval[1] = 2;\n-\t\tbreak;\n-\tcase 12:\n-\t\tval[1] = 3;\n-\t\tbreak;\n-\tcase 16:\n-\t\tval[1] = 4;\n-\t\tbreak;\n-\t}\n-\n-\tmsa_misc = 2 * val[0] + 32 * val[1] +\n-\t\t   ((video->color_fmt == Y_ONLY) ? (1 << 14) : 0);\n-\n-\treturn msa_misc;\n-}\n-\n-int cdn_dp_config_video(struct cdn_dp_device *dp)\n-{\n-\tstruct video_info *video = &dp->video_info;\n-\tstruct drm_display_mode *mode = &dp->mode;\n-\tu64 symbol;\n-\tu32 val, link_rate, rem;\n-\tu8 bit_per_pix, tu_size_reg = TU_SIZE;\n-\tint ret;\n-\n-\tbit_per_pix = (video->color_fmt == YCBCR_4_2_2) ?\n-\t\t      (video->color_depth * 2) : (video->color_depth * 3);\n-\n-\tlink_rate = dp->max_rate / 1000;\n-\n-\tret = cdn_dp_reg_write(dp, BND_HSYNC2VSYNC, VIF_BYPASS_INTERLACE);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\tret = cdn_dp_reg_write(dp, HSYNC2VSYNC_POL_CTRL, 0);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\t/*\n-\t * get a best tu_size and valid symbol:\n-\t * 1. chose Lclk freq(162Mhz, 270Mhz, 540Mhz), set TU to 32\n-\t * 2. calculate VS(valid symbol) = TU * Pclk * Bpp / (Lclk * Lanes)\n-\t * 3. if VS > *.85 or VS < *.1 or VS < 2 or TU < VS + 4, then set\n-\t *    TU += 2 and repeat 2nd step.\n-\t */\n-\tdo {\n-\t\ttu_size_reg += 2;\n-\t\tsymbol = (u64)tu_size_reg * mode->clock * bit_per_pix;\n-\t\tdo_div(symbol, dp->max_lanes * link_rate * 8);\n-\t\trem = do_div(symbol, 1000);\n-\t\tif (tu_size_reg > 64) {\n-\t\t\tret = -EINVAL;\n-\t\t\tDRM_DEV_ERROR(dp->dev,\n-\t\t\t\t      \"tu error, clk:%d, lanes:%d, rate:%d\\n\",\n-\t\t\t\t      mode->clock, dp->max_lanes, link_rate);\n-\t\t\tgoto err_config_video;\n-\t\t}\n-\t} while ((symbol <= 1) || (tu_size_reg - symbol < 4) ||\n-\t\t (rem > 850) || (rem < 100));\n-\n-\tval = symbol + (tu_size_reg << 8);\n-\tval |= TU_CNT_RST_EN;\n-\tret = cdn_dp_reg_write(dp, DP_FRAMER_TU, val);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\t/* set the FIFO Buffer size */\n-\tval = div_u64(mode->clock * (symbol + 1), 1000) + link_rate;\n-\tval /= (dp->max_lanes * link_rate);\n-\tval = div_u64(8 * (symbol + 1), bit_per_pix) - val;\n-\tval += 2;\n-\tret = cdn_dp_reg_write(dp, DP_VC_TABLE(15), val);\n-\n-\tswitch (video->color_depth) {\n-\tcase 6:\n-\t\tval = BCS_6;\n-\t\tbreak;\n-\tcase 8:\n-\t\tval = BCS_8;\n-\t\tbreak;\n-\tcase 10:\n-\t\tval = BCS_10;\n-\t\tbreak;\n-\tcase 12:\n-\t\tval = BCS_12;\n-\t\tbreak;\n-\tcase 16:\n-\t\tval = BCS_16;\n-\t\tbreak;\n-\t}\n-\n-\tval += video->color_fmt << 8;\n-\tret = cdn_dp_reg_write(dp, DP_FRAMER_PXL_REPR, val);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\tval = video->h_sync_polarity ? DP_FRAMER_SP_HSP : 0;\n-\tval |= video->v_sync_polarity ? DP_FRAMER_SP_VSP : 0;\n-\tret = cdn_dp_reg_write(dp, DP_FRAMER_SP, val);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\tval = (mode->hsync_start - mode->hdisplay) << 16;\n-\tval |= mode->htotal - mode->hsync_end;\n-\tret = cdn_dp_reg_write(dp, DP_FRONT_BACK_PORCH, val);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\tval = mode->hdisplay * bit_per_pix / 8;\n-\tret = cdn_dp_reg_write(dp, DP_BYTE_COUNT, val);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\tval = mode->htotal | ((mode->htotal - mode->hsync_start) << 16);\n-\tret = cdn_dp_reg_write(dp, MSA_HORIZONTAL_0, val);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\tval = mode->hsync_end - mode->hsync_start;\n-\tval |= (mode->hdisplay << 16) | (video->h_sync_polarity << 15);\n-\tret = cdn_dp_reg_write(dp, MSA_HORIZONTAL_1, val);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\tval = mode->vtotal;\n-\tval |= (mode->vtotal - mode->vsync_start) << 16;\n-\tret = cdn_dp_reg_write(dp, MSA_VERTICAL_0, val);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\tval = mode->vsync_end - mode->vsync_start;\n-\tval |= (mode->vdisplay << 16) | (video->v_sync_polarity << 15);\n-\tret = cdn_dp_reg_write(dp, MSA_VERTICAL_1, val);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\tval = cdn_dp_get_msa_misc(video, mode);\n-\tret = cdn_dp_reg_write(dp, MSA_MISC, val);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\tret = cdn_dp_reg_write(dp, STREAM_CONFIG, 1);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\tval = mode->hsync_end - mode->hsync_start;\n-\tval |= mode->hdisplay << 16;\n-\tret = cdn_dp_reg_write(dp, DP_HORIZONTAL, val);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\tval = mode->vdisplay;\n-\tval |= (mode->vtotal - mode->vsync_start) << 16;\n-\tret = cdn_dp_reg_write(dp, DP_VERTICAL_0, val);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\tval = mode->vtotal;\n-\tret = cdn_dp_reg_write(dp, DP_VERTICAL_1, val);\n-\tif (ret)\n-\t\tgoto err_config_video;\n-\n-\tret = cdn_dp_reg_write_bit(dp, DP_VB_ID, 2, 1, 0);\n-\n-err_config_video:\n-\tif (ret)\n-\t\tDRM_DEV_ERROR(dp->dev, \"config video failed: %d\\n\", ret);\n-\treturn ret;\n-}\n-\n-int cdn_dp_audio_stop(struct cdn_dp_device *dp, struct audio_info *audio)\n-{\n-\tint ret;\n-\n-\tret = cdn_dp_reg_write(dp, AUDIO_PACK_CONTROL, 0);\n-\tif (ret) {\n-\t\tDRM_DEV_ERROR(dp->dev, \"audio stop failed: %d\\n\", ret);\n-\t\treturn ret;\n-\t}\n-\n-\twritel(0, dp->regs + SPDIF_CTRL_ADDR);\n-\n-\t/* clearn the audio config and reset */\n-\twritel(0, dp->regs + AUDIO_SRC_CNTL);\n-\twritel(0, dp->regs + AUDIO_SRC_CNFG);\n-\twritel(AUDIO_SW_RST, dp->regs + AUDIO_SRC_CNTL);\n-\twritel(0, dp->regs + AUDIO_SRC_CNTL);\n-\n-\t/* reset smpl2pckt component  */\n-\twritel(0, dp->regs + SMPL2PKT_CNTL);\n-\twritel(AUDIO_SW_RST, dp->regs + SMPL2PKT_CNTL);\n-\twritel(0, dp->regs + SMPL2PKT_CNTL);\n-\n-\t/* reset FIFO */\n-\twritel(AUDIO_SW_RST, dp->regs + FIFO_CNTL);\n-\twritel(0, dp->regs + FIFO_CNTL);\n-\n-\tif (audio->format == AFMT_SPDIF)\n-\t\tclk_disable_unprepare(dp->spdif_clk);\n-\n-\treturn 0;\n-}\n-\n-int cdn_dp_audio_mute(struct cdn_dp_device *dp, bool enable)\n-{\n-\tint ret;\n-\n-\tret = cdn_dp_reg_write_bit(dp, DP_VB_ID, 4, 1, enable);\n-\tif (ret)\n-\t\tDRM_DEV_ERROR(dp->dev, \"audio mute failed: %d\\n\", ret);\n-\n-\treturn ret;\n-}\n-\n-static void cdn_dp_audio_config_i2s(struct cdn_dp_device *dp,\n-\t\t\t\t    struct audio_info *audio)\n-{\n-\tint sub_pckt_num = 1, i2s_port_en_val = 0xf, i;\n-\tu32 val;\n-\n-\tif (audio->channels == 2) {\n-\t\tif (dp->max_lanes == 1)\n-\t\t\tsub_pckt_num = 2;\n-\t\telse\n-\t\t\tsub_pckt_num = 4;\n-\n-\t\ti2s_port_en_val = 1;\n-\t} else if (audio->channels == 4) {\n-\t\ti2s_port_en_val = 3;\n-\t}\n-\n-\twritel(0x0, dp->regs + SPDIF_CTRL_ADDR);\n-\n-\twritel(SYNC_WR_TO_CH_ZERO, dp->regs + FIFO_CNTL);\n-\n-\tval = MAX_NUM_CH(audio->channels);\n-\tval |= NUM_OF_I2S_PORTS(audio->channels);\n-\tval |= AUDIO_TYPE_LPCM;\n-\tval |= CFG_SUB_PCKT_NUM(sub_pckt_num);\n-\twritel(val, dp->regs + SMPL2PKT_CNFG);\n-\n-\tif (audio->sample_width == 16)\n-\t\tval = 0;\n-\telse if (audio->sample_width == 24)\n-\t\tval = 1 << 9;\n-\telse\n-\t\tval = 2 << 9;\n-\n-\tval |= AUDIO_CH_NUM(audio->channels);\n-\tval |= I2S_DEC_PORT_EN(i2s_port_en_val);\n-\tval |= TRANS_SMPL_WIDTH_32;\n-\twritel(val, dp->regs + AUDIO_SRC_CNFG);\n-\n-\tfor (i = 0; i < (audio->channels + 1) / 2; i++) {\n-\t\tif (audio->sample_width == 16)\n-\t\t\tval = (0x02 << 8) | (0x02 << 20);\n-\t\telse if (audio->sample_width == 24)\n-\t\t\tval = (0x0b << 8) | (0x0b << 20);\n-\n-\t\tval |= ((2 * i) << 4) | ((2 * i + 1) << 16);\n-\t\twritel(val, dp->regs + STTS_BIT_CH(i));\n-\t}\n-\n-\tswitch (audio->sample_rate) {\n-\tcase 32000:\n-\t\tval = SAMPLING_FREQ(3) |\n-\t\t      ORIGINAL_SAMP_FREQ(0xc);\n-\t\tbreak;\n-\tcase 44100:\n-\t\tval = SAMPLING_FREQ(0) |\n-\t\t      ORIGINAL_SAMP_FREQ(0xf);\n-\t\tbreak;\n-\tcase 48000:\n-\t\tval = SAMPLING_FREQ(2) |\n-\t\t      ORIGINAL_SAMP_FREQ(0xd);\n-\t\tbreak;\n-\tcase 88200:\n-\t\tval = SAMPLING_FREQ(8) |\n-\t\t      ORIGINAL_SAMP_FREQ(0x7);\n-\t\tbreak;\n-\tcase 96000:\n-\t\tval = SAMPLING_FREQ(0xa) |\n-\t\t      ORIGINAL_SAMP_FREQ(5);\n-\t\tbreak;\n-\tcase 176400:\n-\t\tval = SAMPLING_FREQ(0xc) |\n-\t\t      ORIGINAL_SAMP_FREQ(3);\n-\t\tbreak;\n-\tcase 192000:\n-\t\tval = SAMPLING_FREQ(0xe) |\n-\t\t      ORIGINAL_SAMP_FREQ(1);\n-\t\tbreak;\n-\t}\n-\tval |= 4;\n-\twritel(val, dp->regs + COM_CH_STTS_BITS);\n-\n-\twritel(SMPL2PKT_EN, dp->regs + SMPL2PKT_CNTL);\n-\twritel(I2S_DEC_START, dp->regs + AUDIO_SRC_CNTL);\n-}\n-\n-static void cdn_dp_audio_config_spdif(struct cdn_dp_device *dp)\n-{\n-\tu32 val;\n-\n-\twritel(SYNC_WR_TO_CH_ZERO, dp->regs + FIFO_CNTL);\n-\n-\tval = MAX_NUM_CH(2) | AUDIO_TYPE_LPCM | CFG_SUB_PCKT_NUM(4);\n-\twritel(val, dp->regs + SMPL2PKT_CNFG);\n-\twritel(SMPL2PKT_EN, dp->regs + SMPL2PKT_CNTL);\n-\n-\tval = SPDIF_ENABLE | SPDIF_AVG_SEL | SPDIF_JITTER_BYPASS;\n-\twritel(val, dp->regs + SPDIF_CTRL_ADDR);\n-\n-\tclk_prepare_enable(dp->spdif_clk);\n-\tclk_set_rate(dp->spdif_clk, CDN_DP_SPDIF_CLK);\n-}\n-\n-int cdn_dp_audio_config(struct cdn_dp_device *dp, struct audio_info *audio)\n-{\n-\tint ret;\n-\n-\t/* reset the spdif clk before config */\n-\tif (audio->format == AFMT_SPDIF) {\n-\t\treset_control_assert(dp->spdif_rst);\n-\t\treset_control_deassert(dp->spdif_rst);\n-\t}\n-\n-\tret = cdn_dp_reg_write(dp, CM_LANE_CTRL, LANE_REF_CYC);\n-\tif (ret)\n-\t\tgoto err_audio_config;\n-\n-\tret = cdn_dp_reg_write(dp, CM_CTRL, 0);\n-\tif (ret)\n-\t\tgoto err_audio_config;\n-\n-\tif (audio->format == AFMT_I2S)\n-\t\tcdn_dp_audio_config_i2s(dp, audio);\n-\telse if (audio->format == AFMT_SPDIF)\n-\t\tcdn_dp_audio_config_spdif(dp);\n-\n-\tret = cdn_dp_reg_write(dp, AUDIO_PACK_CONTROL, AUDIO_PACK_EN);\n-\n-err_audio_config:\n-\tif (ret)\n-\t\tDRM_DEV_ERROR(dp->dev, \"audio config failed: %d\\n\", ret);\n-\treturn ret;\n-}\ndiff --git a/drivers/gpu/drm/rockchip/cdn-dp-reg.h b/include/drm/bridge/cdns-mhdp.h\nsimilarity index 53%\nrename from drivers/gpu/drm/rockchip/cdn-dp-reg.h\nrename to include/drm/bridge/cdns-mhdp.h\nindex 441248b7a79e..d76716d4edc6 100644\n--- a/drivers/gpu/drm/rockchip/cdn-dp-reg.h\n+++ b/include/drm/bridge/cdns-mhdp.h\n@@ -1,16 +1,31 @@\n-/* SPDX-License-Identifier: GPL-2.0-only */\n+/* SPDX-License-Identifier: GPL-2.0 */\n /*\n  * Copyright (C) Fuzhou Rockchip Electronics Co.Ltd\n  * Author: Chris Zhong <zyw@rock-chips.com>\n+ *\n+ * This software is licensed under the terms of the GNU General Public\n+ * License version 2, as published by the Free Software Foundation, and\n+ * may be copied, distributed, and modified under those terms.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n  */\n \n-#ifndef _CDN_DP_REG_H\n-#define _CDN_DP_REG_H\n+#ifndef CDNS_MHDP_H_\n+#define CDNS_MHDP_H_\n \n+#include <drm/drm_bridge.h>\n+#include <drm/drm_connector.h>\n+#include <drm/display/drm_dp_helper.h>\n+#include <drm/display/drm_dp_mst_helper.h>\n+#include <media/cec.h>\n #include <linux/bitops.h>\n \n #define ADDR_IMEM\t\t0x10000\n #define ADDR_DMEM\t\t0x20000\n+#define ADDR_PHY_AFE\t0x80000\n \n /* APB CFG addr */\n #define APB_CTRL\t\t\t0\n@@ -78,6 +93,10 @@\n #define SOURCE_PIF_SW_RESET\t\t0x30834\n \n /* bellow registers need access by mailbox */\n+/* source phy comp */\n+#define PHY_DATA_SEL\t\t\t0x0818\n+#define LANES_CONFIG\t\t\t0x0814\n+\n /* source car addr */\n #define SOURCE_HDTX_CAR\t\t\t0x0900\n #define SOURCE_DPTX_CAR\t\t\t0x0904\n@@ -89,6 +108,17 @@\n #define SOURCE_CIPHER_CAR\t\t0x0920\n #define SOURCE_CRYPTO_CAR\t\t0x0924\n \n+/* mhdp tx_top_comp */\n+#define SCHEDULER_H_SIZE\t\t0x1000\n+#define SCHEDULER_V_SIZE\t\t0x1004\n+#define HDTX_SIGNAL_FRONT_WIDTH\t0x100c\n+#define HDTX_SIGNAL_SYNC_WIDTH\t0x1010\n+#define HDTX_SIGNAL_BACK_WIDTH\t0x1014\n+#define HDTX_CONTROLLER\t\t\t0x1018\n+#define HDTX_HPD\t\t\t\t0x1020\n+#define HDTX_CLOCK_REG_0\t\t0x1024\n+#define HDTX_CLOCK_REG_1\t\t0x1028\n+\n /* clock meters addr */\n #define CM_CTRL\t\t\t\t0x0a00\n #define CM_I2S_CTRL\t\t\t0x0a04\n@@ -308,18 +338,24 @@\n #define MB_SIZE_LSB_ID\t\t\t3\n #define MB_DATA_ID\t\t\t4\n \n-#define MB_MODULE_ID_DP_TX\t\t0x01\n+#define MB_MODULE_ID_DP_TX\t\t\t0x01\n+#define MB_MODULE_ID_HDMI_TX\t\t0x03\n #define MB_MODULE_ID_HDCP_TX\t\t0x07\n #define MB_MODULE_ID_HDCP_RX\t\t0x08\n #define MB_MODULE_ID_HDCP_GENERAL\t0x09\n-#define MB_MODULE_ID_GENERAL\t\t0x0a\n+#define MB_MODULE_ID_GENERAL\t\t0x0A\n \n /* general opcode */\n #define GENERAL_MAIN_CONTROL            0x01\n #define GENERAL_TEST_ECHO               0x02\n #define GENERAL_BUS_SETTINGS            0x03\n #define GENERAL_TEST_ACCESS             0x04\n+#define GENERAL_WRITE_REGISTER          0x05\n+#define GENERAL_WRITE_FIELD             0x06\n+#define GENERAL_READ_REGISTER           0x07\n+#define GENERAL_GET_HPD_STATE           0x11\n \n+/* DPTX opcode */\n #define DPTX_SET_POWER_MNG\t\t\t0x00\n #define DPTX_SET_HOST_CAPABILITIES\t\t0x01\n #define DPTX_GET_EDID\t\t\t\t0x02\n@@ -338,12 +374,24 @@\n #define DPTX_SET_LINK_BREAK_POINT\t\t0x0f\n #define DPTX_FORCE_LANES\t\t\t0x10\n #define DPTX_HPD_STATE\t\t\t\t0x11\n+#define DPTX_ADJUST_LT\t\t\t\t0x12\n+\n+/* HDMI TX opcode */\n+#define HDMI_TX_READ\t\t\t\t0x00\n+#define HDMI_TX_WRITE\t\t\t\t0x01\n+#define HDMI_TX_UPDATE_READ\t\t\t0x02\n+#define HDMI_TX_EDID\t\t\t\t0x03\n+#define HDMI_TX_EVENTS\t\t\t\t0x04\n+#define HDMI_TX_HPD_STATUS\t\t\t0x05\n+#define HDMI_TX_DEBUG_ECHO\t\t\t0xAA\n+#define HDMI_TX_TEST\t\t\t\t0xBB\n+#define HDMI_TX_EDID_INTERNAL\t\t0xF0\n \n #define FW_STANDBY\t\t\t\t0\n #define FW_ACTIVE\t\t\t\t1\n \n-#define DPTX_EVENT_ENABLE_HPD\t\t\tBIT(0)\n-#define DPTX_EVENT_ENABLE_TRAINING\t\tBIT(1)\n+#define MHDP_EVENT_ENABLE_HPD\t\t\tBIT(0)\n+#define MHDP_EVENT_ENABLE_TRAINING\t\tBIT(1)\n \n #define LINK_TRAINING_NOT_ACTIVE\t\t0\n #define LINK_TRAINING_RUN\t\t\t1\n@@ -387,7 +435,35 @@\n #define HDCP_TX_IS_RECEIVER_ID_VALID_EVENT\tBIT(7)\n \n #define TU_SIZE\t\t\t\t\t30\n-#define CDN_DP_MAX_LINK_RATE\t\t\tDP_LINK_BW_5_4\n+#define CDNS_DP_MAX_LINK_RATE\t540000\n+\n+#define F_HDMI_ENCODING(x) (((x) & ((1 << 2) - 1)) << 16)\n+#define F_VIF_DATA_WIDTH(x) (((x) & ((1 << 2) - 1)) << 2)\n+#define F_HDMI_MODE(x) (((x) & ((1 << 2) - 1)) << 0)\n+#define F_GCP_EN(x) (((x) & ((1 << 1) - 1)) << 12)\n+#define F_DATA_EN(x) (((x) & ((1 << 1) - 1)) << 15)\n+#define F_HDMI2_PREAMBLE_EN(x) (((x) & ((1 << 1) - 1)) << 18)\n+#define F_PIC_3D(x) (((x) & ((1 << 4) - 1)) << 7)\n+#define F_BCH_EN(x) (((x) & ((1 << 1) - 1)) << 11)\n+#define F_SOURCE_PHY_MHDP_SEL(x) (((x) & ((1 << 2) - 1)) << 3)\n+#define F_HPD_VALID_WIDTH(x) (((x) & ((1 << 12) - 1)) << 0)\n+#define F_HPD_GLITCH_WIDTH(x) (((x) & ((1 << 8) - 1)) << 12)\n+#define F_HDMI2_CTRL_IL_MODE(x) (((x) & ((1 << 1) - 1)) << 19)\n+#define F_SOURCE_PHY_LANE0_SWAP(x) (((x) & ((1 << 2) - 1)) << 0)\n+#define F_SOURCE_PHY_LANE1_SWAP(x) (((x) & ((1 << 2) - 1)) << 2)\n+#define F_SOURCE_PHY_LANE2_SWAP(x) (((x) & ((1 << 2) - 1)) << 4)\n+#define F_SOURCE_PHY_LANE3_SWAP(x) (((x) & ((1 << 2) - 1)) << 6)\n+#define F_SOURCE_PHY_COMB_BYPASS(x) (((x) & ((1 << 1) - 1)) << 21)\n+#define F_SOURCE_PHY_20_10(x) (((x) & ((1 << 1) - 1)) << 22)\n+#define F_PKT_ALLOC_ADDRESS(x) (((x) & ((1 << 4) - 1)) << 0)\n+#define F_ACTIVE_IDLE_TYPE(x) (((x) & ((1 << 1) - 1)) << 17)\n+#define F_FIFO1_FLUSH(x) (((x) & ((1 << 1) - 1)) << 0)\n+#define F_PKT_ALLOC_WR_EN(x) (((x) & ((1 << 1) - 1)) << 0)\n+#define F_DATA_WR(x) (x)\n+#define F_WR_ADDR(x) (((x) & ((1 << 4) - 1)) << 0)\n+#define F_HOST_WR(x) (((x) & ((1 << 1) - 1)) << 0)\n+#define F_TYPE_VALID(x) (((x) & ((1 << 1) - 1)) << 16)\n+#define F_PACKET_TYPE(x) (((x) & ((1 << 8) - 1)) << 8)\n \n /* audio */\n #define AUDIO_PACK_EN\t\t\t\tBIT(8)\n@@ -416,6 +492,24 @@\n /* Reference cycles when using lane clock as reference */\n #define LANE_REF_CYC\t\t\t\t0x8000\n \n+#define HOTPLUG_DEBOUNCE_MS\t\t200\n+\n+#define IRQ_IN    0\n+#define IRQ_OUT   1\n+#define IRQ_NUM   2\n+\n+#define cdns_mhdp_plat_call(mhdp, operation)\t\t\t\\\n+\t(!(mhdp) ? -ENODEV : (((mhdp)->plat_data && (mhdp)->plat_data->operation) ?\t\\\n+\t (mhdp)->plat_data->operation(mhdp) : ENOIOCTLCMD))\n+\n+/* bus access type */\n+enum {\n+\tBUS_TYPE_NORMAL_APB = 0,\n+\tBUS_TYPE_NORMAL_SAPB = 1,\n+\tBUS_TYPE_LOW4K_APB = 2,\n+\tBUS_TYPE_LOW4K_SAPB = 3,\n+};\n+\n enum voltage_swing_level {\n \tVOLTAGE_LEVEL_0,\n \tVOLTAGE_LEVEL_1,\n@@ -451,24 +545,261 @@ enum vic_bt_type {\n \tBT_709 = 0x1,\n };\n \n-void cdn_dp_clock_reset(struct cdn_dp_device *dp);\n+enum audio_format {\n+\tAFMT_I2S = 0,\n+\tAFMT_SPDIF_INT = 1,\n+\tAFMT_SPDIF_EXT = 2,\n+\tAFMT_UNUSED,\n+};\n+\n+enum {\n+\tMODE_DVI,\n+\tMODE_HDMI_1_4,\n+\tMODE_HDMI_2_0,\n+};\n+\n+struct audio_info {\n+\tenum audio_format format;\n+\tint sample_rate;\n+\tint channels;\n+\tint sample_width;\n+\tint connector_type;\n+};\n+\n+enum vic_pxl_encoding_format {\n+\tPXL_RGB = 0x1,\n+\tYCBCR_4_4_4 = 0x2,\n+\tYCBCR_4_2_2 = 0x4,\n+\tYCBCR_4_2_0 = 0x8,\n+\tY_ONLY = 0x10,\n+};\n+\n+struct video_info {\n+\tbool h_sync_polarity;\n+\tbool v_sync_polarity;\n+\tbool interlaced;\n+\tint color_depth;\n+\tenum vic_pxl_encoding_format color_fmt;\n+};\n+\n+struct cdns_mhdp_host {\n+\tunsigned int\tlink_rate;\n+\tu8\tlanes_cnt;\n+\tu8\tvolt_swing;\n+\tu8\tpre_emphasis;\n+\tu8\tpattern_supp;\n+\tu8\tfast_link;\n+\tu8\tlane_mapping;\n+\tu8\tenhanced;\n+};\n+\n+struct cdns_mhdp_sink {\n+\tunsigned int\tlink_rate;\n+\tu8\tlanes_cnt;\n+\tu8\tpattern_supp;\n+\tu8\tfast_link;\n+\tu8\tenhanced;\n+};\n+\n+struct cdns_mhdp_bridge;\n+struct cdns_mhdp_connector;\n+\n+struct cdns_mhdp_bridge {\n+\tstruct cdns_mhdp_device *mhdp;\n+\tstruct drm_bridge base;\n+\tint pbn;\n+\tint8_t stream_id;\n+\tstruct cdns_mhdp_connector *connector;\n+\tbool is_active;\n+};\n+\n+struct cdns_mhdp_connector {\n+\tstruct drm_connector base;\n+\tbool is_mst_connector;\n+\tstruct drm_dp_mst_port *port;\n+\tstruct cdns_mhdp_bridge *bridge;\n+};\n+\n+struct cdns_mhdp_cec {\n+       struct cec_adapter *adap;\n+       struct device *dev;\n+       struct mutex lock;\n+\n+       struct cec_msg msg;\n+       struct task_struct *cec_worker;\n+};\n+\n+struct cdns_plat_data {\n+\t/* Vendor PHY support */\n+\tint (*bind)(struct platform_device *pdev,\n+\t\t\tstruct drm_encoder *encoder,\n+\t\t\tstruct cdns_mhdp_device *mhdp);\n+\tvoid (*unbind)(struct device *dev);\n+\n+\tvoid (*plat_init)(struct cdns_mhdp_device *mhdp);\n+\tvoid (*plat_deinit)(struct cdns_mhdp_device *mhdp);\n+\n+\tint (*phy_set)(struct cdns_mhdp_device *mhdp);\n+\tbool (*phy_video_valid)(struct cdns_mhdp_device *mhdp);\n+\tint (*firmware_init)(struct cdns_mhdp_device *mhdp);\n+\tvoid (*pclk_rate)(struct cdns_mhdp_device *mhdp);\n+\n+\tint (*suspend)(struct cdns_mhdp_device *mhdp);\n+\tint (*resume)(struct cdns_mhdp_device *mhdp);\n+\n+\tint (*power_on)(struct cdns_mhdp_device *mhdp);\n+\tint (*power_off)(struct cdns_mhdp_device *mhdp);\n+\n+\tint bus_type;\n+\tint video_format;\n+\tchar is_dp;\n+\tchar *plat_name;\n+};\n+\n+struct cdns_mhdp_device {\n+\tvoid __iomem\t\t*regs_base;\n+\tvoid __iomem\t\t*regs_sec;\n+\n+\tint bus_type;\n+\n+\tstruct device\t\t*dev;\n+\n+\tstruct cdns_mhdp_connector  connector;\n+\tstruct clk\t\t*spdif_clk;\n+\tstruct reset_control\t*spdif_rst;\n+\n+\tstruct platform_device\t*audio_pdev;\n+\tstruct audio_info\taudio_info;\n+\n+\tstruct cdns_mhdp_bridge\tbridge;\n+\tstruct phy\t\t*phy;\n+\n+\tstruct video_info\tvideo_info;\n+\tstruct drm_display_mode\tmode;\n+\tconst struct drm_display_mode\t*valid_mode;\n+\tunsigned int\t\tfw_version;\n+\n+\tstruct drm_dp_mst_topology_mgr mst_mgr;\n+\tstruct delayed_work hotplug_work;\n+\n+\tu32 lane_mapping;\n+\tbool link_up;\n+\tbool power_up;\n+\tbool plugged;\n+\tbool force_mode_set;\n+\tbool is_hpd;\n+\tbool is_ls1028a;\n+\tstruct mutex lock;\n+\tstruct mutex iolock;\n+\n+\tint irq[IRQ_NUM];\n+\n+\tunion {\n+\t\tstruct _dp_data {\n+\t\t\tu8 dpcd[DP_RECEIVER_CAP_SIZE];\n+\t\t\tu32 rate;\n+\t\t\tu8 num_lanes;\n+\t\t\tstruct drm_dp_aux\taux;\n+\t\t\tstruct cdns_mhdp_host\thost;\n+\t\t\tstruct cdns_mhdp_sink\tsink;\n+\t\t\tbool is_mst;\n+\t\t\tbool can_mst;\n+\t\t} dp;\n+\t\tstruct _hdmi_data {\n+\t\t\tstruct cdns_mhdp_cec cec;\n+\t\t\tu32 char_rate;\n+\t\t\tu32 hdmi_type;\n+\t\t} hdmi;\n+\t};\n+\tconst struct cdns_plat_data *plat_data;\n+\n+};\n+\n+u32 cdns_mhdp_bus_read(struct cdns_mhdp_device *mhdp, u32 offset);\n+void cdns_mhdp_bus_write(u32 val, struct cdns_mhdp_device *mhdp, u32 offset);\n+void cdns_mhdp_clock_reset(struct cdns_mhdp_device *mhdp);\n+void cdns_mhdp_set_fw_clk(struct cdns_mhdp_device *mhdp, unsigned long clk);\n+u32 cdns_mhdp_get_fw_clk(struct cdns_mhdp_device *mhdp);\n+int cdns_mhdp_load_firmware(struct cdns_mhdp_device *mhdp, const u32 *i_mem,\n+\t\t\t    u32 i_size, const u32 *d_mem, u32 d_size);\n+int cdns_mhdp_set_firmware_active(struct cdns_mhdp_device *mhdp, bool enable);\n+int cdns_mhdp_set_host_cap(struct cdns_mhdp_device *mhdp, bool flip);\n+int cdns_mhdp_event_config(struct cdns_mhdp_device *mhdp);\n+u32 cdns_mhdp_get_event(struct cdns_mhdp_device *mhdp);\n+int cdns_mhdp_dpcd_write(struct cdns_mhdp_device *mhdp, u32 addr, u8 value);\n+int cdns_mhdp_dpcd_read(struct cdns_mhdp_device *mhdp,\n+\t\t\tu32 addr, u8 *data, u16 len);\n+int cdns_mhdp_get_edid_block(void *mhdp, u8 *edid,\n+\t\t\t     unsigned int block, size_t length);\n+int cdns_mhdp_train_link(struct cdns_mhdp_device *mhdp);\n+int cdns_mhdp_set_video_status(struct cdns_mhdp_device *mhdp, int active);\n+int cdns_mhdp_config_video(struct cdns_mhdp_device *mhdp);\n+\n+/* Audio */\n+int cdns_mhdp_audio_stop(struct cdns_mhdp_device *mhdp,\n+\t\t\t struct audio_info *audio);\n+int cdns_mhdp_audio_mute(struct cdns_mhdp_device *mhdp, bool enable);\n+int cdns_mhdp_audio_config(struct cdns_mhdp_device *mhdp,\n+\t\t\t   struct audio_info *audio);\n+int cdns_mhdp_register_audio_driver(struct device *dev);\n+void cdns_mhdp_unregister_audio_driver(struct device *dev);\n+\n+int cdns_mhdp_reg_read(struct cdns_mhdp_device *mhdp, u32 addr);\n+int cdns_mhdp_reg_write(struct cdns_mhdp_device *mhdp, u32 addr, u32 val);\n+int cdns_mhdp_reg_write_bit(struct cdns_mhdp_device *mhdp, u16 addr,\n+\t\t\t    u8 start_bit, u8 bits_no, u32 val);\n+int cdns_mhdp_adjust_lt(struct cdns_mhdp_device *mhdp, u8 nlanes,\n+\t\t\tu16 udelay, u8 *lanes_data,\n+\t\t\tu8 *dpcd);\n+\n+int cdns_mhdp_read_hpd(struct cdns_mhdp_device *mhdp);\n+u32 cdns_phy_reg_read(struct cdns_mhdp_device *mhdp, u32 addr);\n+int cdns_phy_reg_write(struct cdns_mhdp_device *mhdp, u32 addr, u32 val);\n+int cdns_mhdp_mailbox_send(struct cdns_mhdp_device *mhdp, u8 module_id,\n+\t\t\t\t  u8 opcode, u16 size, u8 *message);\n+int cdns_mhdp_mailbox_read_receive(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\t  u8 *buff, u16 buff_size);\n+int cdns_mhdp_mailbox_validate_receive(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\t      u8 module_id, u8 opcode,\n+\t\t\t\t\t      u16 req_size);\n+int cdns_mhdp_mailbox_read(struct cdns_mhdp_device *mhdp);\n+\n+void cdns_mhdp_infoframe_set(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\tu8 entry_id, u8 packet_len, u8 *packet, u8 packet_type);\n+int cdns_hdmi_get_edid_block(void *data, u8 *edid, u32 block, size_t length);\n+int cdns_hdmi_scdc_read(struct cdns_mhdp_device *mhdp, u8 addr, u8 *data);\n+int cdns_hdmi_scdc_write(struct cdns_mhdp_device *mhdp, u8 addr, u8 value);\n+int cdns_hdmi_ctrl_init(struct cdns_mhdp_device *mhdp, int protocol, u32 char_rate);\n+int cdns_hdmi_mode_config(struct cdns_mhdp_device *mhdp, struct drm_display_mode *mode,\n+\t\t\t\tstruct video_info *video_info);\n+int cdns_hdmi_disable_gcp(struct cdns_mhdp_device *mhdp);\n+int cdns_hdmi_enable_gcp(struct cdns_mhdp_device *mhdp);\n+\n+bool cdns_mhdp_check_alive(struct cdns_mhdp_device *mhdp);\n+\n+/* HDMI */\n+int cdns_hdmi_probe(struct platform_device *pdev,\n+\t\t struct cdns_mhdp_device *mhdp);\n+void cdns_hdmi_remove(struct platform_device *pdev);\n+void cdns_hdmi_unbind(struct device *dev);\n+int cdns_hdmi_bind(struct platform_device *pdev,\n+\t\t\tstruct drm_encoder *encoder, struct cdns_mhdp_device *mhdp);\n+void cdns_hdmi_set_sample_rate(struct cdns_mhdp_device *mhdp, unsigned int rate);\n+void cdns_hdmi_audio_enable(struct cdns_mhdp_device *mhdp);\n+void cdns_hdmi_audio_disable(struct cdns_mhdp_device *mhdp);\n+\n+/* DP  */\n+int cdns_dp_probe(struct platform_device *pdev,\n+\t\t struct cdns_mhdp_device *mhdp);\n+void cdns_dp_remove(struct platform_device *pdev);\n+void cdns_dp_unbind(struct device *dev);\n+int cdns_dp_bind(struct platform_device *pdev,\n+\t\t\tstruct drm_encoder *encoder, struct cdns_mhdp_device *mhdp);\n+\n+/* CEC */\n+#ifdef CONFIG_DRM_CDNS_HDMI_CEC\n+int cdns_mhdp_register_cec_driver(struct device *dev);\n+int cdns_mhdp_unregister_cec_driver(struct device *dev);\n+#endif\n \n-void cdn_dp_set_fw_clk(struct cdn_dp_device *dp, unsigned long clk);\n-int cdn_dp_load_firmware(struct cdn_dp_device *dp, const u32 *i_mem,\n-\t\t\t u32 i_size, const u32 *d_mem, u32 d_size);\n-int cdn_dp_set_firmware_active(struct cdn_dp_device *dp, bool enable);\n-int cdn_dp_set_host_cap(struct cdn_dp_device *dp, u8 lanes, bool flip);\n-int cdn_dp_event_config(struct cdn_dp_device *dp);\n-u32 cdn_dp_get_event(struct cdn_dp_device *dp);\n-int cdn_dp_get_hpd_status(struct cdn_dp_device *dp);\n-int cdn_dp_dpcd_write(struct cdn_dp_device *dp, u32 addr, u8 value);\n-int cdn_dp_dpcd_read(struct cdn_dp_device *dp, u32 addr, u8 *data, u16 len);\n-int cdn_dp_get_edid_block(void *dp, u8 *edid,\n-\t\t\t  unsigned int block, size_t length);\n-int cdn_dp_train_link(struct cdn_dp_device *dp);\n-int cdn_dp_set_video_status(struct cdn_dp_device *dp, int active);\n-int cdn_dp_config_video(struct cdn_dp_device *dp);\n-int cdn_dp_audio_stop(struct cdn_dp_device *dp, struct audio_info *audio);\n-int cdn_dp_audio_mute(struct cdn_dp_device *dp, bool enable);\n-int cdn_dp_audio_config(struct cdn_dp_device *dp, struct audio_info *audio);\n-#endif /* _CDN_DP_REG_H */\n+#endif /* CDNS_MHDP_H_ */\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0002-MLK-24065-1-drm-bridge-cadence-fix-dp_aux_transfer-w.patch",
    "content": "From 55eb19200d650ead73139ee8444db9119718fd31 Mon Sep 17 00:00:00 2001\nFrom: Sergey Zhuravlevich <zhurxx@gmail.com>\nDate: Tue, 12 May 2020 14:23:15 +0200\nSubject: [PATCH 02/49] MLK-24065-1: drm: bridge: cadence: fix dp_aux_transfer\n write return value\n\nAfter exiting the loop in DP_AUX_NATIVE_WRITE it was returning 0. It's supposed\nto return the number of bytes transferred on success.\n\nSigned-off-by: Sergey Zhuravlevich <zhurxx@gmail.com>\nAcked-by: Sandor Yu <sandor.yu@nxp.com>\nTested-By: Sandor Yu <sandor.yu@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-dp-core.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c b/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c\nindex acb5c860da73..aa92029f44e9 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c\n@@ -67,6 +67,8 @@ static ssize_t dp_aux_transfer(struct drm_dp_aux *aux,\n \n \t\t\treturn ret;\n \t\t}\n+\t\tmsg->reply = DP_AUX_NATIVE_REPLY_ACK;\n+\t\treturn msg->size;\n \t}\n \n \tif (msg->request == DP_AUX_NATIVE_READ) {\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0003-MLK-24065-3-drm-bridge-cadence-use-the-lane-mapping-.patch",
    "content": "From 90e1a010995c0a87b0216706b1255ca5d0c36286 Mon Sep 17 00:00:00 2001\nFrom: Sergey Zhuravlevich <zhurxx@gmail.com>\nDate: Tue, 12 May 2020 14:23:15 +0200\nSubject: [PATCH 03/49] MLK-24065-3: drm: bridge: cadence: use the lane mapping\n from dt when setting host capabilities\n\nSigned-off-by: Sergey Zhuravlevich <zhurxx@gmail.com>\nAcked-by: Sandor Yu <sandor.yu@nxp.com>\nTested-By: Sandor Yu <sandor.yu@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-dp-core.c     | 2 +-\n drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c | 4 ++--\n include/drm/bridge/cdns-mhdp.h                    | 2 +-\n 3 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c b/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c\nindex aa92029f44e9..c059d56b4f46 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c\n@@ -152,7 +152,7 @@ static void cdns_dp_mode_set(struct cdns_mhdp_device *mhdp)\n \tcdns_mhdp_reg_write(mhdp, LANES_CONFIG, 0x00400000 | lane_mapping);\n \n \t/* Set DP host capability */\n-\tret = cdns_mhdp_set_host_cap(mhdp, false);\n+\tret = cdns_mhdp_set_host_cap(mhdp);\n \tif (ret) {\n \t\tDRM_DEV_ERROR(mhdp->dev, \"Failed to set host cap %d\\n\", ret);\n \t\treturn;\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\nindex 91d1cfd4b2af..9c0a2668e494 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\n@@ -438,7 +438,7 @@ int cdns_mhdp_set_firmware_active(struct cdns_mhdp_device *mhdp, bool enable)\n }\n EXPORT_SYMBOL(cdns_mhdp_set_firmware_active);\n \n-int cdns_mhdp_set_host_cap(struct cdns_mhdp_device *mhdp, bool flip)\n+int cdns_mhdp_set_host_cap(struct cdns_mhdp_device *mhdp)\n {\n \tu8 msg[8];\n \tint ret;\n@@ -449,7 +449,7 @@ int cdns_mhdp_set_host_cap(struct cdns_mhdp_device *mhdp, bool flip)\n \tmsg[3] = PRE_EMPHASIS_LEVEL_3;\n \tmsg[4] = PTS1 | PTS2 | PTS3 | PTS4;\n \tmsg[5] = FAST_LT_NOT_SUPPORT;\n-\tmsg[6] = flip ? LANE_MAPPING_FLIPPED : LANE_MAPPING_NORMAL;\n+\tmsg[6] = mhdp->lane_mapping;\n \tmsg[7] = ENHANCED;\n \n \tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_DP_TX,\ndiff --git a/include/drm/bridge/cdns-mhdp.h b/include/drm/bridge/cdns-mhdp.h\nindex d76716d4edc6..4dc6e428b5f7 100644\n--- a/include/drm/bridge/cdns-mhdp.h\n+++ b/include/drm/bridge/cdns-mhdp.h\n@@ -723,7 +723,7 @@ u32 cdns_mhdp_get_fw_clk(struct cdns_mhdp_device *mhdp);\n int cdns_mhdp_load_firmware(struct cdns_mhdp_device *mhdp, const u32 *i_mem,\n \t\t\t    u32 i_size, const u32 *d_mem, u32 d_size);\n int cdns_mhdp_set_firmware_active(struct cdns_mhdp_device *mhdp, bool enable);\n-int cdns_mhdp_set_host_cap(struct cdns_mhdp_device *mhdp, bool flip);\n+int cdns_mhdp_set_host_cap(struct cdns_mhdp_device *mhdp);\n int cdns_mhdp_event_config(struct cdns_mhdp_device *mhdp);\n u32 cdns_mhdp_get_event(struct cdns_mhdp_device *mhdp);\n int cdns_mhdp_dpcd_write(struct cdns_mhdp_device *mhdp, u32 addr, u8 value);\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0004-MLK-24065-2-drm-bridge-cadence-print-error-when-cloc.patch",
    "content": "From 62c1852bc0f94efb6884d34c2c27dcf1efa3b282 Mon Sep 17 00:00:00 2001\nFrom: Sergey Zhuravlevich <zhurxx@gmail.com>\nDate: Tue, 12 May 2020 14:23:15 +0200\nSubject: [PATCH 04/49] MLK-24065-2: drm: bridge: cadence: print error when\n clock recovery fails\n\nSigned-off-by: Sergey Zhuravlevich <zhurxx@gmail.com>\nAcked-by: Sandor Yu <sandor.yu@nxp.com>\nTested-By: Sandor Yu <sandor.yu@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-mhdp-dp.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-dp.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-dp.c\nindex f025c39d12ea..a032e19765a4 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-dp.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-dp.c\n@@ -106,7 +106,9 @@ static int cdns_mhdp_training_start(struct cdns_mhdp_device *mhdp)\n \t\tif (ret)\n \t\t\tgoto err_training_start;\n \n-\t\tif (event[1] & EQ_PHASE_FINISHED)\n+\t\tif (event[1] & CLK_RECOVERY_FAILED)\n+\t\t\tDRM_DEV_ERROR(mhdp->dev, \"clock recovery failed\\n\");\n+\t\telse if (event[1] & EQ_PHASE_FINISHED)\n \t\t\treturn 0;\n \t}\n \n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0005-LF-1511-drm-cdn-cec-replace-i-with-i-in-loop.patch",
    "content": "From eb19fd99254d6a0aa97bb08c09b9f82ebff306c5 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Fri, 19 Jun 2020 15:32:28 +0800\nSubject: [PATCH 05/49] LF-1511: drm: cdn-cec: replace ++i with i++ in loop\n\nreplace ++i with i++ in loop to prevent Coverity issue.\nCoverity ID 9000767\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Fancy Fang <chen.fang@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c\nindex 5717bb0bcb75..029ad761606a 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c\n@@ -163,13 +163,13 @@ static int mhdp_cec_set_logical_addr(struct cdns_mhdp_cec *cec, u32 la)\n \n \tif (la == CEC_LOG_ADDR_INVALID)\n \t\t/* invalid all LA address */\n-\t\tfor (i = 0; i < CEC_MAX_LOG_ADDRS; ++i) {\n+\t\tfor (i = 0; i < CEC_MAX_LOG_ADDRS; i++) {\n \t\t\tmhdp_cec_write(cec, LOGICAL_ADDRESS_LA0 + (i * REG_ADDR_OFF), 0);\n \t\t\treturn 0;\n \t\t}\n \n \t/* In fact cdns mhdp cec could support max 5 La address */\n-\tfor (i = 0; i < CEC_MAX_LOG_ADDRS; ++i) {\n+\tfor (i = 0; i < CEC_MAX_LOG_ADDRS; i++) {\n \t\tla_reg = mhdp_cec_read(cec, LOGICAL_ADDRESS_LA0 + (i * REG_ADDR_OFF));\n \t\t/* Check LA already used */\n \t\tif (la_reg & 0x10)\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0006-LF-1512-drm-cdns-mhdp-avoid-potentially-overflowing.patch",
    "content": "From 09dfa5b8ba1a38050e4e95faab1cf07c6a509dad Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Fri, 19 Jun 2020 16:05:42 +0800\nSubject: [PATCH 06/49] LF-1512: drm: cdns mhdp: avoid potentially overflowing\n\ncovert to unsigned 64 bits to avoid potentially overflowing.\nReport by Coverity ID 6652952 6652952.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Fancy Fang <chen.fang@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\nindex 9c0a2668e494..890add9b7c67 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\n@@ -657,7 +657,7 @@ int cdns_mhdp_config_video(struct cdns_mhdp_device *mhdp)\n \t */\n \tdo {\n \t\ttu_size_reg += 2;\n-\t\tsymbol = tu_size_reg * mode->clock * bit_per_pix;\n+\t\tsymbol = (u64) tu_size_reg * mode->clock * bit_per_pix;\n \t\tdo_div(symbol, mhdp->dp.num_lanes * link_rate * 8);\n \t\trem = do_div(symbol, 1000);\n \t\tif (tu_size_reg > 64) {\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0007-MLK-24335-drm-bridge-cdns-hdmi-support-work-in-DVI-m.patch",
    "content": "From a1b02ef19cbc24603e1e212f4f4258ca2c59aaad Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Thu, 18 Jun 2020 14:18:04 +0800\nSubject: [PATCH 07/49] MLK-24335: drm: bridge: cdns: hdmi support work in DVI\n mode\n\nhdmi support work in DVI mode.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\nindex da40f62617ef..5f2442fa761f 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n@@ -32,8 +32,9 @@ static void hdmi_sink_config(struct cdns_mhdp_device *mhdp)\n \tstruct drm_scdc *scdc = &mhdp->connector.base.display_info.hdmi.scdc;\n \tu8 buff = 0;\n \n-\t/* Default work in HDMI1.4 */\n-\tmhdp->hdmi.hdmi_type = MODE_HDMI_1_4;\n+\t/* return if hdmi work in DVI mode */\n+\tif (mhdp->hdmi.hdmi_type == MODE_DVI)\n+\t\treturn;\n \n \t/* check sink support SCDC or not */\n \tif (scdc->supported != true) {\n@@ -264,6 +265,8 @@ static int cdns_hdmi_connector_get_modes(struct drm_connector *connector)\n \t\t\t edid->header[6], edid->header[7]);\n \t\tdrm_connector_update_edid_property(connector, edid);\n \t\tnum_modes = drm_add_edid_modes(connector, edid);\n+\t\tmhdp->hdmi.hdmi_type = drm_detect_hdmi_monitor(edid) ?\n+\t\t\t\t\t\tMODE_HDMI_1_4 : MODE_DVI;\n \t\tkfree(edid);\n \t}\n \n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0008-LF-1762-21-gpu-drm-bridge-cadence-hdmi-update-API-.m.patch",
    "content": "From 83f932299b9969a1823b085d2269db677362f897 Mon Sep 17 00:00:00 2001\nFrom: Dong Aisheng <aisheng.dong@nxp.com>\nDate: Tue, 14 Jul 2020 19:18:25 +0800\nSubject: [PATCH 08/49] LF-1762-21 gpu: drm: bridge: cadence: hdmi: update API\n .mode_valid()\n\nAPI changed since:\n12c683e12cd8 (\"drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid()\")\n\nSigned-off-by: Dong Aisheng <aisheng.dong@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-dp-core.c   | 1 +\n drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c | 1 +\n 2 files changed, 2 insertions(+)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c b/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c\nindex c059d56b4f46..cb4897c664f0 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c\n@@ -256,6 +256,7 @@ static int cdns_dp_bridge_attach(struct drm_bridge *bridge,\n \n static enum drm_mode_status\n cdns_dp_bridge_mode_valid(struct drm_bridge *bridge,\n+\t\t\tconst struct drm_display_info *info,\n \t\t\t  const struct drm_display_mode *mode)\n {\n \tenum drm_mode_status mode_status = MODE_OK;\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\nindex 5f2442fa761f..1e5130e295f7 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n@@ -359,6 +359,7 @@ static int cdns_hdmi_bridge_attach(struct drm_bridge *bridge,\n \n static enum drm_mode_status\n cdns_hdmi_bridge_mode_valid(struct drm_bridge *bridge,\n+\t\t\t    const struct drm_display_info *info,\n \t\t\t  const struct drm_display_mode *mode)\n {\n \tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0009-LF-2271-1-drm-bridge-cdns-Use-colorspace-connector-p.patch",
    "content": "From 150d291f3e5cb47a97790b89e79d8f1a5aa797dd Mon Sep 17 00:00:00 2001\nFrom: Laurentiu Palcu <laurentiu.palcu@nxp.com>\nDate: Fri, 28 Aug 2020 10:26:31 +0300\nSubject: [PATCH 09/49] LF-2271-1: drm/bridge/cdns: Use colorspace connector\n property for imx8mq\n\nThis patch achieves 2 goals:\n * Make use of colorspace property when setting up the color_depth and\n   color_fmt. The userspace can now choose which colorspace to use by changing\n   the colorspace property;\n * Do not use drm_display_mode private_flags to signal CRTC which pixel encoding\n   is being used by connector. Upstream is getting rid of 'private_flags' usage\n   and the declaration will probably be removed in the next release;\n\nSigned-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>\nReviewed-by: Robert Chiras <robert.chiras@nxp.com>\n---\n .../gpu/drm/bridge/cadence/cdns-hdmi-core.c   | 58 ++++++++++++-------\n 1 file changed, 36 insertions(+), 22 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\nindex 1e5130e295f7..2796252adf68 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n@@ -412,6 +412,7 @@ bool cdns_hdmi_bridge_mode_fixup(struct drm_bridge *bridge,\n \t\t\t\t struct drm_display_mode *adjusted_mode)\n {\n \tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n+\tstruct drm_connector_state *conn_state = mhdp->connector.base.state;\n \tstruct drm_display_info *di = &mhdp->connector.base.display_info;\n \tstruct video_info *video = &mhdp->video_info;\n \tint vic = drm_match_cea_mode(mode);\n@@ -428,36 +429,49 @@ bool cdns_hdmi_bridge_mode_fixup(struct drm_bridge *bridge,\n \t}\n \n \t/* imx8mq */\n-\tif (vic == 97 || vic == 96) {\n-\t\tif (di->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_36)\n-\t\t\tvideo->color_depth = 12;\n-\t\telse if (di->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_30)\n-\t\t\tvideo->color_depth = 10;\n-\n-\t\tif (drm_mode_is_420_only(di, mode) ||\n-\t\t    (drm_mode_is_420_also(di, mode) &&\n-\t\t     video->color_depth > 8)) {\n+\tif (conn_state->colorspace == DRM_MODE_COLORIMETRY_DEFAULT)\n+\t\treturn !drm_mode_is_420_only(di, mode);\n+\n+\tif (conn_state->colorspace == DRM_MODE_COLORIMETRY_BT2020_RGB) {\n+\t\tif (drm_mode_is_420_only(di, mode))\n+\t\t\treturn false;\n+\n+\t\t/* 10b RGB is not supported for following VICs */\n+\t\tif (vic == 97 || vic == 96 || vic == 95 || vic == 93 || vic == 94)\n+\t\t\treturn false;\n+\n+\t\tvideo->color_depth = 10;\n+\n+\t\treturn true;\n+\t}\n+\n+\tif (conn_state->colorspace == DRM_MODE_COLORIMETRY_BT2020_CYCC ||\n+\t    conn_state->colorspace == DRM_MODE_COLORIMETRY_BT2020_YCC) {\n+\t\tif (drm_mode_is_420_only(di, mode)) {\n \t\t\tvideo->color_fmt = YCBCR_4_2_0;\n \n-\t\t\tadjusted_mode->private_flags = 1;\n+\t\t\tif (di->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_36)\n+\t\t\t\tvideo->color_depth = 12;\n+\t\t\telse if (di->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_30)\n+\t\t\t\tvideo->color_depth = 10;\n+\t\t\telse\n+\t\t\t\treturn false;\n+\n \t\t\treturn true;\n \t\t}\n \n-\t\tvideo->color_depth = 8;\n-\t\treturn true;\n-\t}\n+\t\tvideo->color_fmt = YCBCR_4_2_2;\n+\n+\t\tif (!(di->edid_hdmi_rgb444_dc_modes & DRM_EDID_HDMI_DC_36))\n+\t\t\treturn false;\n \n-\t/* Any defined maximum tmds clock limit we must not exceed*/\n-\tif ((di->edid_hdmi_rgb444_dc_modes & DRM_EDID_HDMI_DC_36) &&\n-\t    (mode->clock * 3 / 2 <= di->max_tmds_clock))\n \t\tvideo->color_depth = 12;\n-\telse if ((di->edid_hdmi_rgb444_dc_modes & DRM_EDID_HDMI_DC_30) &&\n-\t\t (mode->clock * 5 / 4 <= di->max_tmds_clock))\n-\t\tvideo->color_depth = 10;\n \n-\t/* 10-bit color depth for the following modes is not supported */\n-\tif ((vic == 95 || vic == 94 || vic == 93) && video->color_depth == 10)\n-\t\tvideo->color_depth = 8;\n+\t\treturn true;\n+\t}\n+\n+\tvideo->color_fmt = drm_mode_is_420_only(di, mode) ? YCBCR_4_2_0 : YCBCR_4_4_4;\n+\tvideo->color_depth = 8;\n \n \treturn true;\n }\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0010-MLK-24770-drm-mhdp-Sync-DPTX-capability-with-Cadence.patch",
    "content": "From 04a71f1da60e51f277d4979c698e52cacb028666 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Mon, 14 Sep 2020 15:06:35 +0800\nSubject: [PATCH 10/49] MLK-24770: drm: mhdp: Sync DPTX capability with Cadence\n sample code\n\nSync the max vswing and pre-emphasis setting with Cadence sample code.\nThe max vswing is VOLTAGE_LEVEL_3 and\nthe max pre-emphasis is PRE_EMPHASIS_LEVEL_2 now.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\nindex 890add9b7c67..2043016f176b 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\n@@ -445,8 +445,8 @@ int cdns_mhdp_set_host_cap(struct cdns_mhdp_device *mhdp)\n \n \tmsg[0] = drm_dp_link_rate_to_bw_code(mhdp->dp.rate);\n \tmsg[1] = mhdp->dp.num_lanes | SCRAMBLER_EN;\n-\tmsg[2] = VOLTAGE_LEVEL_2;\n-\tmsg[3] = PRE_EMPHASIS_LEVEL_3;\n+\tmsg[2] = VOLTAGE_LEVEL_3;\n+\tmsg[3] = PRE_EMPHASIS_LEVEL_2;\n \tmsg[4] = PTS1 | PTS2 | PTS3 | PTS4;\n \tmsg[5] = FAST_LT_NOT_SUPPORT;\n \tmsg[6] = mhdp->lane_mapping;\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0011-MLK-24520-drm-bridge-cdns-increase-maximum-width-fro.patch",
    "content": "From 11b66e4bdb8ba6dc4e6981ecef69534c3d6d8df8 Mon Sep 17 00:00:00 2001\nFrom: \"Oliver F. Brown\" <oliver.brown@nxp.com>\nDate: Thu, 23 Jul 2020 18:24:23 -0500\nSubject: [PATCH 11/49] MLK-24520: drm: bridge: cdns: increase maximum width\n from 4096 to 5120.\n\nThis patch increases the maximum width to 5120.\n\nSigned-off-by: Oliver F. Brown <oliver.brown@nxp.com>\nReviewed-by: Liu Ying <victor.liu@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-dp-core.c   | 4 ++--\n drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c | 4 ++--\n 2 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c b/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c\nindex cb4897c664f0..0f2a38d19a57 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c\n@@ -270,8 +270,8 @@ cdns_dp_bridge_mode_valid(struct drm_bridge *bridge,\n \tif (mode->clock > 594000)\n \t\treturn MODE_CLOCK_HIGH;\n \n-\t/* 4096x2160 is not supported now */\n-\tif (mode->hdisplay > 3840)\n+\t/* 5120 x 2160 is the maximum supported resulution */\n+\tif (mode->hdisplay > 5120)\n \t\treturn MODE_BAD_HVALUE;\n \n \tif (mode->vdisplay > 2160)\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\nindex 2796252adf68..442df6284c49 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n@@ -375,8 +375,8 @@ cdns_hdmi_bridge_mode_valid(struct drm_bridge *bridge,\n \tif (mode->clock > 594000)\n \t\treturn MODE_CLOCK_HIGH;\n \n-\t/* 4096x2160 is not supported */\n-\tif (mode->hdisplay > 3840 || mode->vdisplay > 2160)\n+\t/* 5120 x 2160 is the maximum supported resolution */\n+\tif (mode->hdisplay > 5120 || mode->vdisplay > 2160)\n \t\treturn MODE_BAD_HVALUE;\n \n \tmhdp->valid_mode = mode;\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0012-MLK-24521-drm-bridge-hdmi-Prevent-the-driver-from-re.patch",
    "content": "From 4cb4fe3262fbbf6b31731b6b076698bcf951b9a1 Mon Sep 17 00:00:00 2001\nFrom: \"Oliver F. Brown\" <oliver.brown@nxp.com>\nDate: Fri, 24 Jul 2020 14:28:05 -0500\nSubject: [PATCH 12/49] MLK-24521: drm: bridge: hdmi: Prevent the driver from\n rejecting VIC 0 modes\n\niMX8QM can support the non CEA modes, iMX8M cannot support non CEA modes.\nSo driver should allow non CEA modes for iMX8QM.\n\nSigned-off-by: Oliver F. Brown <oliver.brown@nxp.com>\nReviewed-by: Liu Ying <victor.liu@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c | 8 ++++++++\n 1 file changed, 8 insertions(+)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\nindex 442df6284c49..a8fa559de9e9 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n@@ -364,6 +364,7 @@ cdns_hdmi_bridge_mode_valid(struct drm_bridge *bridge,\n {\n \tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n \tenum drm_mode_status mode_status = MODE_OK;\n+\tu32 vic;\n \tint ret;\n \n \t/* We don't support double-clocked and Interlaced modes */\n@@ -379,6 +380,13 @@ cdns_hdmi_bridge_mode_valid(struct drm_bridge *bridge,\n \tif (mode->hdisplay > 5120 || mode->vdisplay > 2160)\n \t\treturn MODE_BAD_HVALUE;\n \n+\t/* imx8mq-hdmi does not support non CEA modes */\n+\tif (!strncmp(\"imx8mq-hdmi\", mhdp->plat_data->plat_name, 11)) {\n+\t\tvic = drm_match_cea_mode(mode);\n+\t\tif (vic == 0)\n+\t\t\treturn MODE_BAD;\n+\t}\n+\n \tmhdp->valid_mode = mode;\n \tret = cdns_mhdp_plat_call(mhdp, phy_video_valid);\n \tif (ret == false)\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0013-MLK-23642-1-drm-bridge-cadence-support-HBR-and-6-cha.patch",
    "content": "From cd7804fc3777e0b53d69d34058fee39accc72072 Mon Sep 17 00:00:00 2001\nFrom: Shengjiu Wang <shengjiu.wang@nxp.com>\nDate: Wed, 29 Apr 2020 17:34:07 +0800\nSubject: [PATCH 13/49] MLK-23642-1: drm: bridge: cadence: support HBR and 6\n channel\n\nSupport HBR and 6 channel.\n\nFor HBR, it only support compressed bitstream, sample rate\nis 192kHz, and 8 channels.\n\nSigned-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>\nReviewed-by: Viorel Suman <viorel.suman@nxp.com>\n---\n .../gpu/drm/bridge/cadence/cdns-mhdp-audio.c  | 33 ++++++++++++++-----\n include/drm/bridge/cdns-mhdp.h                |  1 +\n 2 files changed, 26 insertions(+), 8 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c\nindex 86174fb633bc..fa1dcf781539 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c\n@@ -72,6 +72,8 @@ static void hdmi_audio_avi_set(struct cdns_mhdp_device *mhdp,\n \t\tframe.channel_allocation = 0;\n \telse if (channels == 4)\n \t\tframe.channel_allocation = 0x3;\n+\telse if (channels == 6)\n+\t\tframe.channel_allocation = 0xB;\n \telse if (channels == 8)\n \t\tframe.channel_allocation = 0x13;\n \n@@ -143,26 +145,38 @@ static void cdns_mhdp_audio_config_i2s(struct cdns_mhdp_device *mhdp,\n {\n \tint sub_pckt_num = 1, i2s_port_en_val = 0xf, i;\n \tint idx = select_N_index(mhdp->mode.clock);\n+\tint numofchannels = audio->channels;\n \tu32 val, ncts;\n+\tu32 disable_port3 = 0;\n+\tu32 audio_type = 0x2; /* L-PCM */\n+\tu32 transmission_type = 0; /* not required for L-PCM */\n \n-\tif (audio->channels == 2) {\n+\tif (numofchannels == 2) {\n \t\tif (mhdp->dp.num_lanes == 1)\n \t\t\tsub_pckt_num = 2;\n \t\telse\n \t\t\tsub_pckt_num = 4;\n \n \t\ti2s_port_en_val = 1;\n-\t} else if (audio->channels == 4) {\n+\t} else if (numofchannels == 4) {\n \t\ti2s_port_en_val = 3;\n+\t} else if (numofchannels == 6) {\n+\t\tnumofchannels = 8;\n+\t\tdisable_port3 = 1;\n+\t} else if ((numofchannels == 8) && (audio->non_pcm)) {\n+\t\taudio_type = 0x9;         /* HBR packet type */\n+\t\ttransmission_type = 0x9;  /* HBR packet type */\n \t}\n \n \tcdns_mhdp_bus_write(0x0, mhdp, SPDIF_CTRL_ADDR);\n \n-\tcdns_mhdp_bus_write(SYNC_WR_TO_CH_ZERO, mhdp, FIFO_CNTL);\n+\tval = SYNC_WR_TO_CH_ZERO;\n+\tval |= disable_port3 << 4;\n+\tcdns_mhdp_bus_write(val, mhdp, FIFO_CNTL);\n \n-\tval = MAX_NUM_CH(audio->channels);\n-\tval |= NUM_OF_I2S_PORTS(audio->channels);\n-\tval |= AUDIO_TYPE_LPCM;\n+\tval = MAX_NUM_CH(numofchannels);\n+\tval |= NUM_OF_I2S_PORTS(numofchannels);\n+\tval |= audio_type << 7;\n \tval |= CFG_SUB_PCKT_NUM(sub_pckt_num);\n \tcdns_mhdp_bus_write(val, mhdp, SMPL2PKT_CNFG);\n \n@@ -173,12 +187,13 @@ static void cdns_mhdp_audio_config_i2s(struct cdns_mhdp_device *mhdp,\n \telse\n \t\tval = 2 << 9;\n \n-\tval |= AUDIO_CH_NUM(audio->channels);\n+\tval |= AUDIO_CH_NUM(numofchannels);\n \tval |= I2S_DEC_PORT_EN(i2s_port_en_val);\n \tval |= TRANS_SMPL_WIDTH_32;\n+\tval |= transmission_type << 13;\n \tcdns_mhdp_bus_write(val, mhdp, AUDIO_SRC_CNFG);\n \n-\tfor (i = 0; i < (audio->channels + 1) / 2; i++) {\n+\tfor (i = 0; i < (numofchannels + 1) / 2; i++) {\n \t\tif (audio->sample_width == 16)\n \t\t\tval = (0x02 << 8) | (0x02 << 20);\n \t\telse if (audio->sample_width == 24)\n@@ -323,6 +338,8 @@ static int audio_hw_params(struct device *dev,  void *data,\n \t\tgoto out;\n \t}\n \n+\taudio.non_pcm = params->iec.status[0] & IEC958_AES0_NONAUDIO;\n+\n \tret = cdns_mhdp_audio_config(mhdp, &audio);\n \tif (!ret)\n \t\tmhdp->audio_info = audio;\ndiff --git a/include/drm/bridge/cdns-mhdp.h b/include/drm/bridge/cdns-mhdp.h\nindex 4dc6e428b5f7..1f8fd024cdfa 100644\n--- a/include/drm/bridge/cdns-mhdp.h\n+++ b/include/drm/bridge/cdns-mhdp.h\n@@ -564,6 +564,7 @@ struct audio_info {\n \tint channels;\n \tint sample_width;\n \tint connector_type;\n+\tbool non_pcm;\n };\n \n enum vic_pxl_encoding_format {\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0014-MLK-24611-2-drm-bridge-cdns-Add-callback-function-fo.patch",
    "content": "From 46bf1dc2ba34440e8f83b3f70e3e4d6b3f9e6183 Mon Sep 17 00:00:00 2001\nFrom: Shengjiu Wang <shengjiu.wang@nxp.com>\nDate: Mon, 31 Aug 2020 14:50:29 +0800\nSubject: [PATCH 14/49] MLK-24611-2: drm: bridge: cdns: Add callback function\n for plug/unplug event\n\ncdns-hdmi-core exports a function cdns_hdmi_set_plugged_cb so\nplatform device can register the callback\n\nimplement hook_plugged_cb to register callback function for hdmi cable\nplug/unplug event.\n\nSigned-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>\nReviewed-by: Sandor Yu <Sandor.yu@nxp.com>\n---\n .../gpu/drm/bridge/cadence/cdns-hdmi-core.c   | 41 +++++++++++++++++--\n .../gpu/drm/bridge/cadence/cdns-mhdp-audio.c  | 10 +++++\n include/drm/bridge/cdns-mhdp.h                |  6 +++\n 3 files changed, 54 insertions(+), 3 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\nindex a8fa559de9e9..5890da8aa1a1 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n@@ -225,11 +225,35 @@ void cdns_hdmi_mode_set(struct cdns_mhdp_device *mhdp)\n \t}\n }\n \n+static void handle_plugged_change(struct cdns_mhdp_device *mhdp, bool plugged)\n+{\n+\tif (mhdp->plugged_cb && mhdp->codec_dev)\n+\t\tmhdp->plugged_cb(mhdp->codec_dev, plugged);\n+}\n+\n+int cdns_hdmi_set_plugged_cb(struct cdns_mhdp_device *mhdp,\n+\t\t\t     hdmi_codec_plugged_cb fn,\n+\t\t\t     struct device *codec_dev)\n+{\n+\tbool plugged;\n+\n+\tmutex_lock(&mhdp->lock);\n+\tmhdp->plugged_cb = fn;\n+\tmhdp->codec_dev = codec_dev;\n+\tplugged = mhdp->last_connector_result == connector_status_connected;\n+\thandle_plugged_change(mhdp, plugged);\n+\tmutex_unlock(&mhdp->lock);\n+\n+\treturn 0;\n+}\n+EXPORT_SYMBOL_GPL(cdns_hdmi_set_plugged_cb);\n+\n static enum drm_connector_status\n cdns_hdmi_connector_detect(struct drm_connector *connector, bool force)\n {\n \tstruct cdns_mhdp_device *mhdp =\n \t\t\t\tcontainer_of(connector, struct cdns_mhdp_device, connector.base);\n+\tenum drm_connector_status result;\n \n \tu8 hpd = 0xf;\n \n@@ -237,15 +261,25 @@ cdns_hdmi_connector_detect(struct drm_connector *connector, bool force)\n \n \tif (hpd == 1)\n \t\t/* Cable Connected */\n-\t\treturn connector_status_connected;\n+\t\tresult = connector_status_connected;\n \telse if (hpd == 0)\n \t\t/* Cable Disconnedted */\n-\t\treturn connector_status_disconnected;\n+\t\tresult = connector_status_disconnected;\n \telse {\n \t\t/* Cable status unknown */\n \t\tDRM_INFO(\"Unknow cable status, hdp=%u\\n\", hpd);\n-\t\treturn connector_status_unknown;\n+\t\tresult = connector_status_unknown;\n+\t}\n+\n+\tmutex_lock(&mhdp->lock);\n+\tif (result != mhdp->last_connector_result) {\n+\t\thandle_plugged_change(mhdp,\n+\t\t\t\t      result == connector_status_connected);\n+\t\tmhdp->last_connector_result = result;\n \t}\n+\tmutex_unlock(&mhdp->lock);\n+\n+\treturn result;\n }\n \n static int cdns_hdmi_connector_get_modes(struct drm_connector *connector)\n@@ -624,6 +658,7 @@ static int __cdns_hdmi_probe(struct platform_device *pdev,\n #ifdef CONFIG_OF\n \tmhdp->bridge.base.of_node = dev->of_node;\n #endif\n+\tmhdp->last_connector_result = connector_status_disconnected;\n \n \tmemset(&pdevinfo, 0, sizeof(pdevinfo));\n \tpdevinfo.parent = dev;\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c\nindex fa1dcf781539..f4f3f9ca437c 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c\n@@ -380,11 +380,21 @@ static int audio_get_eld(struct device *dev, void *data,\n \treturn 0;\n }\n \n+static int audio_hook_plugged_cb(struct device *dev, void *data,\n+\t\t\t\t hdmi_codec_plugged_cb fn,\n+\t\t\t\t struct device *codec_dev)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\n+\treturn cdns_hdmi_set_plugged_cb(mhdp, fn, codec_dev);\n+}\n+\n static const struct hdmi_codec_ops audio_codec_ops = {\n \t.hw_params = audio_hw_params,\n \t.audio_shutdown = audio_shutdown,\n \t.digital_mute = audio_digital_mute,\n \t.get_eld = audio_get_eld,\n+\t.hook_plugged_cb = audio_hook_plugged_cb,\n };\n \n int cdns_mhdp_register_audio_driver(struct device *dev)\ndiff --git a/include/drm/bridge/cdns-mhdp.h b/include/drm/bridge/cdns-mhdp.h\nindex 1f8fd024cdfa..6bfd82a3d9a2 100644\n--- a/include/drm/bridge/cdns-mhdp.h\n+++ b/include/drm/bridge/cdns-mhdp.h\n@@ -22,6 +22,7 @@\n #include <drm/display/drm_dp_mst_helper.h>\n #include <media/cec.h>\n #include <linux/bitops.h>\n+#include <sound/hdmi-codec.h>\n \n #define ADDR_IMEM\t\t0x10000\n #define ADDR_DMEM\t\t0x20000\n@@ -714,6 +715,9 @@ struct cdns_mhdp_device {\n \t};\n \tconst struct cdns_plat_data *plat_data;\n \n+\thdmi_codec_plugged_cb plugged_cb;\n+\tstruct device *codec_dev;\n+\tenum drm_connector_status last_connector_result;\n };\n \n u32 cdns_mhdp_bus_read(struct cdns_mhdp_device *mhdp, u32 offset);\n@@ -796,6 +800,8 @@ void cdns_dp_remove(struct platform_device *pdev);\n void cdns_dp_unbind(struct device *dev);\n int cdns_dp_bind(struct platform_device *pdev,\n \t\t\tstruct drm_encoder *encoder, struct cdns_mhdp_device *mhdp);\n+int cdns_hdmi_set_plugged_cb(struct cdns_mhdp_device *mhdp, hdmi_codec_plugged_cb fn,\n+\t\t\t     struct device *codec_dev);\n \n /* CEC */\n #ifdef CONFIG_DRM_CDNS_HDMI_CEC\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0015-gpu-drm-dridge-hdp-audio-change-to-mute_stream.patch",
    "content": "From 1b0a179061890c0a2f6748426f03e8cd2176d3e2 Mon Sep 17 00:00:00 2001\nFrom: Dong Aisheng <aisheng.dong@nxp.com>\nDate: Wed, 5 Aug 2020 21:31:04 +0800\nSubject: [PATCH 15/49] gpu: drm: dridge: hdp-audio: change to mute_stream\n\nTo cope with upstream API change:\ne2978c45e5ed (\"ASoC: soc-dai: remove .digital_mute\")\n\nSigned-off-by: Dong Aisheng <aisheng.dong@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c\nindex f4f3f9ca437c..85f526175439 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-audio.c\n@@ -358,8 +358,8 @@ static void audio_shutdown(struct device *dev, void *data)\n \t\tmhdp->audio_info.format = AFMT_UNUSED;\n }\n \n-static int audio_digital_mute(struct device *dev, void *data,\n-\t\t\t\t     bool enable)\n+static int audio_mute_stream(struct device *dev, void *data,\n+\t\t\t\t     bool enable, int direction)\n {\n \tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n \tint ret;\n@@ -392,9 +392,10 @@ static int audio_hook_plugged_cb(struct device *dev, void *data,\n static const struct hdmi_codec_ops audio_codec_ops = {\n \t.hw_params = audio_hw_params,\n \t.audio_shutdown = audio_shutdown,\n-\t.digital_mute = audio_digital_mute,\n+\t.mute_stream = audio_mute_stream,\n \t.get_eld = audio_get_eld,\n \t.hook_plugged_cb = audio_hook_plugged_cb,\n+\t.no_capture_mute = 1,\n };\n \n int cdns_mhdp_register_audio_driver(struct device *dev)\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0016-LF-2744-drm-cdns-reset-force_mode_set-flag-in-atomic.patch",
    "content": "From 4a406e182a709718a769c37d33530ed2e6b23b39 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Tue, 17 Nov 2020 15:47:36 +0800\nSubject: [PATCH 16/49] LF-2744: drm: cdns: reset force_mode_set flag in\n atomic_check\n\nReset force_mode_set flag in atomic_check function\nto avoid set mode_changed flag multi times when cable plugin.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c | 4 +---\n 1 file changed, 1 insertion(+), 3 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\nindex 5890da8aa1a1..e796c2c0e895 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n@@ -1,7 +1,7 @@\n /*\n  * Cadence High-Definition Multimedia Interface (HDMI) driver\n  *\n- * Copyright (C) 2019 NXP Semiconductor, Inc.\n+ * Copyright (C) 2019-2020 NXP Semiconductor, Inc.\n  *\n  * This program is free software; you can redistribute it and/or modify\n  * it under the terms of the GNU General Public License as published by\n@@ -445,8 +445,6 @@ static void cdns_hdmi_bridge_mode_set(struct drm_bridge *bridge,\n \tmutex_lock(&mhdp->lock);\n \tcdns_hdmi_mode_set(mhdp);\n \tmutex_unlock(&mhdp->lock);\n-\t/* reset force mode set flag */\n-\tmhdp->force_mode_set = false;\n }\n \n bool cdns_hdmi_bridge_mode_fixup(struct drm_bridge *bridge,\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0017-MLK-24081-03-drm-bridge-cdns-cec-support-hdmi-rx-cec.patch",
    "content": "From f7f5ec54b815df2c9a92f0fd6edea4f5d0700937 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Mon, 16 Nov 2020 10:56:44 +0800\nSubject: [PATCH 17/49] MLK-24081-03: drm: bridge: cdns-cec: support hdmi rx\n cec\n\nCreate struct cdns_mhdp_cec and cec specific bus_read/write function.\nCEC driver could be reuse by hdmi rx.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/Kconfig        |  1 -\n .../gpu/drm/bridge/cadence/cdns-hdmi-core.c   | 18 ++++-\n .../gpu/drm/bridge/cadence/cdns-mhdp-cec.c    | 66 +++++++++++++------\n .../gpu/drm/bridge/cadence/cdns-mhdp-common.c |  6 --\n include/drm/bridge/cdns-mhdp.h                | 19 +++---\n 5 files changed, 72 insertions(+), 38 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/Kconfig b/drivers/gpu/drm/bridge/cadence/Kconfig\nindex bb1865b15aca..c271ab24a99a 100644\n--- a/drivers/gpu/drm/bridge/cadence/Kconfig\n+++ b/drivers/gpu/drm/bridge/cadence/Kconfig\n@@ -45,6 +45,5 @@ config DRM_CDNS_AUDIO\n \n config DRM_CDNS_HDMI_CEC\n \ttristate \"Cadence MHDP HDMI CEC driver\"\n-\tdepends on DRM_CDNS_HDMI\n \tselect CEC_CORE\n \tselect CEC_NOTIFIER\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\nindex e796c2c0e895..84c175997740 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n@@ -569,6 +569,19 @@ static void cdns_hdmi_parse_dt(struct cdns_mhdp_device *mhdp)\n \tdev_info(mhdp->dev, \"lane-mapping 0x%02x\\n\", mhdp->lane_mapping);\n }\n \n+#ifdef CONFIG_DRM_CDNS_HDMI_CEC\n+static void cdns_mhdp_cec_init(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct cdns_mhdp_cec *cec = &mhdp->hdmi.cec;\n+\n+\tcec->dev = mhdp->dev;\n+\tcec->iolock = &mhdp->iolock;\n+\tcec->regs_base = mhdp->regs_base;\n+\tcec->regs_sec = mhdp->regs_sec;\n+\tcec->bus_type = mhdp->bus_type;\n+}\n+#endif\n+\n static int __cdns_hdmi_probe(struct platform_device *pdev,\n \t\t  struct cdns_mhdp_device *mhdp)\n {\n@@ -669,7 +682,8 @@ static int __cdns_hdmi_probe(struct platform_device *pdev,\n \n \t/* register cec driver */\n #ifdef CONFIG_DRM_CDNS_HDMI_CEC\n-\tcdns_mhdp_register_cec_driver(dev);\n+\tcdns_mhdp_cec_init(mhdp);\n+\tcdns_mhdp_register_cec_driver(&mhdp->hdmi.cec);\n #endif\n \n \treturn 0;\n@@ -679,7 +693,7 @@ static void __cdns_hdmi_remove(struct cdns_mhdp_device *mhdp)\n {\n \t/* unregister cec driver */\n #ifdef CONFIG_DRM_CDNS_HDMI_CEC\n-\tcdns_mhdp_unregister_cec_driver(mhdp->dev);\n+\tcdns_mhdp_unregister_cec_driver(&mhdp->hdmi.cec);\n #endif\n \tcdns_mhdp_unregister_audio_driver(mhdp->dev);\n }\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c\nindex 029ad761606a..25cf9e91e64f 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c\n@@ -1,5 +1,5 @@\n /*\n- * Copyright 2019 NXP\n+ * Copyright 2019-2020 NXP\n  *\n  * This program is free software; you can redistribute it and/or\n  * modify it under the terms of the GNU General Public License\n@@ -74,16 +74,49 @@ enum {\n \n static u32 mhdp_cec_read(struct cdns_mhdp_cec *cec, u32 offset)\n {\n-\tstruct cdns_mhdp_device *mhdp =\n-\t\t\tcontainer_of(cec, struct cdns_mhdp_device, hdmi.cec);\n-\treturn cdns_mhdp_bus_read(mhdp, offset);\n+\tu32 val;\n+\n+\tmutex_lock(cec->iolock);\n+\n+\tif (cec->bus_type == BUS_TYPE_LOW4K_HDMI_RX) {\n+\t\t/* Remap address to low 4K HDMI RX */\n+\t\twritel(offset >> 12, cec->regs_sec + 4);\n+\t\tval = readl((offset & 0xfff) + cec->regs_base);\n+\t} else if (cec->bus_type == BUS_TYPE_LOW4K_APB) {\n+\t\t/* Remap address to low 4K memory */\n+\t\twritel(offset >> 12, cec->regs_sec + 8);\n+\t\tval = readl((offset & 0xfff) + cec->regs_base);\n+\t} else\n+\t\tval = readl(cec->regs_base + offset);\n+\n+\tmutex_unlock(cec->iolock);\n+\n+\treturn val;\n }\n \n static void mhdp_cec_write(struct cdns_mhdp_cec *cec, u32 offset, u32 val)\n {\n-\tstruct cdns_mhdp_device *mhdp =\n-\t\t\tcontainer_of(cec, struct cdns_mhdp_device, hdmi.cec);\n-\tcdns_mhdp_bus_write(val, mhdp, offset);\n+\tmutex_lock(cec->iolock);\n+\n+\tif (cec->bus_type == BUS_TYPE_LOW4K_HDMI_RX) {\n+\t\t/* Remap address to low 4K SAPB bus */\n+\t\twritel(offset >> 12, cec->regs_sec + 4);\n+\t\twritel(val, (offset & 0xfff) + cec->regs_base);\n+\t} else if (cec->bus_type == BUS_TYPE_LOW4K_APB) {\n+\t\t/* Remap address to low 4K memory */\n+\t\twritel(offset >> 12, cec->regs_sec + 8);\n+\t\twritel(val, (offset & 0xfff) + cec->regs_base);\n+\t} else if (cec->bus_type == BUS_TYPE_NORMAL_SAPB)\n+\t\twritel(val, cec->regs_sec + offset);\n+\telse\n+\t\twritel(val, cec->regs_base + offset);\n+\n+\tmutex_unlock(cec->iolock);\n+}\n+\n+static u32 mhdp_get_fw_clk(struct cdns_mhdp_cec *cec)\n+{\n+\treturn mhdp_cec_read(cec, SW_CLK_H);\n }\n \n static void mhdp_cec_clear_rx_buffer(struct cdns_mhdp_cec *cec)\n@@ -94,12 +127,10 @@ static void mhdp_cec_clear_rx_buffer(struct cdns_mhdp_cec *cec)\n \n static void mhdp_cec_set_divider(struct cdns_mhdp_cec *cec)\n {\n-\tstruct cdns_mhdp_device *mhdp =\n-\t\t\tcontainer_of(cec, struct cdns_mhdp_device, hdmi.cec);\n \tu32 clk_div;\n \n \t/* Set clock divider */\n-\tclk_div = cdns_mhdp_get_fw_clk(mhdp) * 10;\n+\tclk_div = mhdp_get_fw_clk(cec) * 10;\n \n \tmhdp_cec_write(cec, CLK_DIV_MSB,\n \t\t\t  (clk_div >> 8) & 0xFF);\n@@ -291,10 +322,8 @@ static const struct cec_adap_ops cdns_mhdp_cec_adap_ops = {\n \t.adap_transmit = mhdp_cec_adap_transmit,\n };\n \n-int cdns_mhdp_register_cec_driver(struct device *dev)\n+int cdns_mhdp_register_cec_driver(struct cdns_mhdp_cec *cec)\n {\n-\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n-\tstruct cdns_mhdp_cec *cec = &mhdp->hdmi.cec;\n \tint ret;\n \n \tcec->adap = cec_allocate_adapter(&cdns_mhdp_cec_adap_ops, cec,\n@@ -305,29 +334,24 @@ int cdns_mhdp_register_cec_driver(struct device *dev)\n \tret = PTR_ERR_OR_ZERO(cec->adap);\n \tif (ret)\n \t\treturn ret;\n-\tret = cec_register_adapter(cec->adap, dev);\n+\tret = cec_register_adapter(cec->adap, cec->dev);\n \tif (ret) {\n \t\tcec_delete_adapter(cec->adap);\n \t\treturn ret;\n \t}\n \n-\tcec->dev = dev;\n-\n \tcec->cec_worker = kthread_create(mhdp_cec_poll_worker, cec, \"cdns-mhdp-cec\");\n \tif (IS_ERR(cec->cec_worker))\n \t\tdev_err(cec->dev, \"failed  create hdp cec thread\\n\");\n \n \twake_up_process(cec->cec_worker);\n \n-\tdev_dbg(dev, \"CEC successfuly probed\\n\");\n+\tdev_dbg(cec->dev, \"CEC successfuly probed\\n\");\n \treturn 0;\n }\n \n-int cdns_mhdp_unregister_cec_driver(struct device *dev)\n+int cdns_mhdp_unregister_cec_driver(struct cdns_mhdp_cec *cec)\n {\n-\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n-\tstruct cdns_mhdp_cec *cec = &mhdp->hdmi.cec;\n-\n \tif (cec->cec_worker) {\n \t\tkthread_stop(cec->cec_worker);\n \t\tcec->cec_worker = NULL;\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\nindex 2043016f176b..ff37cc4e57e6 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\n@@ -99,12 +99,6 @@ void cdns_mhdp_bus_write(u32 val, struct cdns_mhdp_device *mhdp, u32 offset)\n }\n EXPORT_SYMBOL(cdns_mhdp_bus_write);\n \n-u32 cdns_mhdp_get_fw_clk(struct cdns_mhdp_device *mhdp)\n-{\n-\treturn cdns_mhdp_bus_read(mhdp, SW_CLK_H);\n-}\n-EXPORT_SYMBOL(cdns_mhdp_get_fw_clk);\n-\n void cdns_mhdp_set_fw_clk(struct cdns_mhdp_device *mhdp, unsigned long clk)\n {\n \tcdns_mhdp_bus_write(clk / 1000000, mhdp, SW_CLK_H);\ndiff --git a/include/drm/bridge/cdns-mhdp.h b/include/drm/bridge/cdns-mhdp.h\nindex 6bfd82a3d9a2..338fa55b8bdf 100644\n--- a/include/drm/bridge/cdns-mhdp.h\n+++ b/include/drm/bridge/cdns-mhdp.h\n@@ -509,6 +509,7 @@ enum {\n \tBUS_TYPE_NORMAL_SAPB = 1,\n \tBUS_TYPE_LOW4K_APB = 2,\n \tBUS_TYPE_LOW4K_SAPB = 3,\n+\tBUS_TYPE_LOW4K_HDMI_RX = 4,\n };\n \n enum voltage_swing_level {\n@@ -623,12 +624,15 @@ struct cdns_mhdp_connector {\n };\n \n struct cdns_mhdp_cec {\n-       struct cec_adapter *adap;\n-       struct device *dev;\n-       struct mutex lock;\n+\tstruct cec_adapter *adap;\n+\tstruct device *dev;\n+\tstruct mutex *iolock;\n+\tvoid __iomem\t\t*regs_base;\n+\tvoid __iomem\t\t*regs_sec;\n+\tint bus_type;\n \n-       struct cec_msg msg;\n-       struct task_struct *cec_worker;\n+\tstruct cec_msg msg;\n+\tstruct task_struct *cec_worker;\n };\n \n struct cdns_plat_data {\n@@ -724,7 +728,6 @@ u32 cdns_mhdp_bus_read(struct cdns_mhdp_device *mhdp, u32 offset);\n void cdns_mhdp_bus_write(u32 val, struct cdns_mhdp_device *mhdp, u32 offset);\n void cdns_mhdp_clock_reset(struct cdns_mhdp_device *mhdp);\n void cdns_mhdp_set_fw_clk(struct cdns_mhdp_device *mhdp, unsigned long clk);\n-u32 cdns_mhdp_get_fw_clk(struct cdns_mhdp_device *mhdp);\n int cdns_mhdp_load_firmware(struct cdns_mhdp_device *mhdp, const u32 *i_mem,\n \t\t\t    u32 i_size, const u32 *d_mem, u32 d_size);\n int cdns_mhdp_set_firmware_active(struct cdns_mhdp_device *mhdp, bool enable);\n@@ -805,8 +808,8 @@ int cdns_hdmi_set_plugged_cb(struct cdns_mhdp_device *mhdp, hdmi_codec_plugged_c\n \n /* CEC */\n #ifdef CONFIG_DRM_CDNS_HDMI_CEC\n-int cdns_mhdp_register_cec_driver(struct device *dev);\n-int cdns_mhdp_unregister_cec_driver(struct device *dev);\n+int cdns_mhdp_register_cec_driver(struct cdns_mhdp_cec *cec);\n+int cdns_mhdp_unregister_cec_driver(struct cdns_mhdp_cec *cec);\n #endif\n \n #endif /* CDNS_MHDP_H_ */\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0018-MLK-25199-3-drm-bridge-mhdp_common-add-apb-config-fu.patch",
    "content": "From 0021b4b1afc0d88c013e2484009004b19bc2ece4 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Wed, 30 Dec 2020 16:04:20 +0800\nSubject: [PATCH 18/49] MLK-25199-3: drm: bridge: mhdp_common: add apb config\n function\n\nAdd apb config function, move mhdp poll function\nto mhdp head file, they will be used by hdcp driver.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n .../gpu/drm/bridge/cadence/cdns-mhdp-common.c | 54 ++++++++++---------\n drivers/gpu/drm/bridge/cadence/cdns-mhdp.h    | 25 ++++++++-\n 2 files changed, 54 insertions(+), 25 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\nindex ff37cc4e57e6..2a8ab0872f25 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\n@@ -27,31 +27,10 @@\n #include <drm/drm_print.h>\n #include <linux/regmap.h>\n \n+#include \"cdns-mhdp.h\"\n+\n #define CDNS_DP_SPDIF_CLK\t\t200000000\n #define FW_ALIVE_TIMEOUT_US\t\t1000000\n-#define MAILBOX_RETRY_US\t\t1000\n-#define MAILBOX_TIMEOUT_US\t\t5000000\n-\n-#define mhdp_readx_poll_timeout(op, addr, offset, val, cond, sleep_us, timeout_us)\t\\\n-({ \\\n-\tu64 __timeout_us = (timeout_us); \\\n-\tunsigned long __sleep_us = (sleep_us); \\\n-\tktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \\\n-\tmight_sleep_if((__sleep_us) != 0); \\\n-\tfor (;;) { \\\n-\t\t(val) = op(addr, offset); \\\n-\t\tif (cond) \\\n-\t\t\tbreak; \\\n-\t\tif (__timeout_us && \\\n-\t\t    ktime_compare(ktime_get(), __timeout) > 0) { \\\n-\t\t\t(val) = op(addr, offset); \\\n-\t\t\tbreak; \\\n-\t\t} \\\n-\t\tif (__sleep_us) \\\n-\t\t\tusleep_range((__sleep_us >> 2) + 1, __sleep_us); \\\n-\t} \\\n-\t(cond) ? 0 : -ETIMEDOUT; \\\n-})\n \n u32 cdns_mhdp_bus_read(struct cdns_mhdp_device *mhdp, u32 offset)\n {\n@@ -174,7 +153,7 @@ bool cdns_mhdp_check_alive(struct cdns_mhdp_device *mhdp)\n }\n EXPORT_SYMBOL(cdns_mhdp_check_alive);\n \n-static int mhdp_mailbox_read(struct cdns_mhdp_device *mhdp)\n+int mhdp_mailbox_read(struct cdns_mhdp_device *mhdp)\n {\n \tint val, ret;\n \n@@ -432,6 +411,33 @@ int cdns_mhdp_set_firmware_active(struct cdns_mhdp_device *mhdp, bool enable)\n }\n EXPORT_SYMBOL(cdns_mhdp_set_firmware_active);\n \n+int cdns_mhdp_apb_conf(struct cdns_mhdp_device *mhdp, u8 sel)\n+{\n+\tu8 status;\n+\tint ret;\n+\n+\tret = cdns_mhdp_mailbox_send(mhdp, MB_MODULE_ID_GENERAL, GENERAL_BUS_SETTINGS,\n+\t\t\t\t  sizeof(sel), &sel);\n+\tif (ret)\n+\t\tgoto err_apb_conf;\n+\n+\tret = cdns_mhdp_mailbox_validate_receive(mhdp, MB_MODULE_ID_GENERAL,\n+\t\t\t\t\t\t\tGENERAL_BUS_SETTINGS, sizeof(status));\n+\tif (ret)\n+\t\tgoto err_apb_conf;\n+\n+\tret = cdns_mhdp_mailbox_read_receive(mhdp, &status, sizeof(status));\n+\tif (ret)\n+\t\tgoto err_apb_conf;\n+\n+\treturn status;\n+\n+err_apb_conf:\n+\tDRM_ERROR(\"apb conf failed: %d\\n\", ret);\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_apb_conf);\n+\n int cdns_mhdp_set_host_cap(struct cdns_mhdp_device *mhdp)\n {\n \tu8 msg[8];\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp.h b/drivers/gpu/drm/bridge/cadence/cdns-mhdp.h\nindex 399c3f6f86ad..8ad99eb8f86e 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp.h\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp.h\n@@ -174,7 +174,6 @@\n #define CDNS_DP_MTPH_STATUS\t\t\t0x226C\n #define CDNS_DP_MTPH_ACT_STATUS\t\t\tBIT(0)\n \n-\n #define CDNS_DPTX_GLOBAL\t\t\t0x02300\n #define CDNS_DP_LANE_EN\t\t\t\t(CDNS_DPTX_GLOBAL + 0x00)\n #define CDNS_DP_LANE_EN_LANES(x)\t\tGENMASK(x - 1, 0)\n@@ -187,6 +186,30 @@\n \n #define CDNS_MHDP_MAX_STREAMS   4\n \n+#define MAILBOX_RETRY_US\t\t1000\n+#define MAILBOX_TIMEOUT_US\t\t5000000\n+\n+#define mhdp_readx_poll_timeout(op, addr, offset, val, cond, sleep_us, timeout_us)\t\\\n+({ \\\n+\tu64 __timeout_us = (timeout_us); \\\n+\tunsigned long __sleep_us = (sleep_us); \\\n+\tktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \\\n+\tmight_sleep_if((__sleep_us) != 0); \\\n+\tfor (;;) { \\\n+\t\t(val) = op(addr, offset); \\\n+\t\tif (cond) \\\n+\t\t\tbreak; \\\n+\t\tif (__timeout_us && \\\n+\t\t    ktime_compare(ktime_get(), __timeout) > 0) { \\\n+\t\t\t(val) = op(addr, offset); \\\n+\t\t\tbreak; \\\n+\t\t} \\\n+\t\tif (__sleep_us) \\\n+\t\t\tusleep_range((__sleep_us >> 2) + 1, __sleep_us); \\\n+\t} \\\n+\t(cond) ? 0 : -ETIMEDOUT; \\\n+})\n+\n enum pixel_format {\n \tPIXEL_FORMAT_RGB = 1,\n \tPIXEL_FORMAT_YCBCR_444 = 2,\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0019-MLK-25199-4-drm-bridge-mhdp_hdmi-set-clear-avmute-bi.patch",
    "content": "From 1793e95601a15f93e5d9e2846281f86eb19e8fe4 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Wed, 30 Dec 2020 16:05:29 +0800\nSubject: [PATCH 19/49] MLK-25199-4: drm: bridge: mhdp_hdmi: set clear avmute\n bit\n\nSync HDMI TX configuation with 4.14 hdmi driver.\nClear avmute bit must be set otherwise imx8qm hdcp not work.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdmi.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdmi.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdmi.c\nindex c37a7ac6af9b..3ff43f7fb0a6 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdmi.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdmi.c\n@@ -1,5 +1,5 @@\n /*\n- * Copyright (C) 2019 NXP Semiconductor, Inc.\n+ * Copyright (C) 2019-2021 NXP Semiconductor, Inc.\n  *\n  * This program is free software; you can redistribute it and/or modify\n  * it under the terms of the GNU General Public License as published by\n@@ -205,7 +205,7 @@ int cdns_hdmi_ctrl_init(struct cdns_mhdp_device *mhdp,\n \n \t/* set hdmi mode and preemble mode data enable */\n \tval = F_HDMI_MODE(protocol) | F_HDMI2_PREAMBLE_EN(1) |  F_DATA_EN(1) |\n-\t\t\tF_HDMI2_CTRL_IL_MODE(1) | F_BCH_EN(1) | F_PIC_3D(0XF);\n+\t\t\tF_HDMI2_CTRL_IL_MODE(1) | F_BCH_EN(1) | F_PIC_3D(0XF) | F_CLEAR_AVMUTE(1);\n \tret = cdns_mhdp_reg_write(mhdp, HDTX_CONTROLLER, val);\n \n \treturn ret;\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0020-MLK-25199-5-drm-bridge-mhdp_hdcp-add-HDMI-TX-HDCP-dr.patch",
    "content": "From 9d940175bbffc82b5ec70b195312c6f32b35f51f Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Wed, 30 Dec 2020 16:07:41 +0800\nSubject: [PATCH 20/49] MLK-25199-5: drm: bridge: mhdp_hdcp: add HDMI TX HDCP\n driver\n\nThis patch adds an initial HDMI TX HDCP driver\nfor Cadence MHDP HDMI TX hardware.\n\nBoth HDCP2.2 and HDCP1.4 are supported.\n\nHDCP function could be enabled by command:\nmodetest -w CONNECTOR_ID:\"Content Protection\":1\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/Kconfig        |    4 +\n drivers/gpu/drm/bridge/cadence/Makefile       |    1 +\n .../gpu/drm/bridge/cadence/cdns-hdmi-core.c   |  190 ++-\n .../gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c   | 1167 +++++++++++++++++\n .../gpu/drm/bridge/cadence/cdns-mhdp-hdcp.c   |  300 +++++\n .../gpu/drm/bridge/cadence/cdns-mhdp-hdcp.h   |   36 +\n include/drm/bridge/cdns-mhdp.h                |   92 +-\n 7 files changed, 1776 insertions(+), 14 deletions(-)\n create mode 100644 drivers/gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c\n create mode 100644 drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdcp.c\n create mode 100644 drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdcp.h\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/Kconfig b/drivers/gpu/drm/bridge/cadence/Kconfig\nindex c271ab24a99a..4c27836eb367 100644\n--- a/drivers/gpu/drm/bridge/cadence/Kconfig\n+++ b/drivers/gpu/drm/bridge/cadence/Kconfig\n@@ -43,6 +43,11 @@ config DRM_CDNS_AUDIO\n \ttristate \"Cadence MHDP Audio driver\"\n \tdepends on DRM_CDNS_MHDP\n \n+config DRM_CDNS_HDMI_HDCP\n+\ttristate \"Cadence MHDP HDMI HDCP driver\"\n+\tdepends on DRM_CDNS_HDMI\n+\tselect DRM_DISPLAY_HDCP_HELPER\n+\n config DRM_CDNS_HDMI_CEC\n \ttristate \"Cadence MHDP HDMI CEC driver\"\n \tselect CEC_CORE\ndiff --git a/drivers/gpu/drm/bridge/cadence/Makefile b/drivers/gpu/drm/bridge/cadence/Makefile\nindex 618290870ba5..1b824252ae76 100644\n--- a/drivers/gpu/drm/bridge/cadence/Makefile\n+++ b/drivers/gpu/drm/bridge/cadence/Makefile\n@@ -8,6 +8,7 @@ cdns_mhdp_drmcore-y := cdns-mhdp-common.o cdns-mhdp-dp.o cdns-mhdp-hdmi.o\n cdns_mhdp_drmcore-$(CONFIG_DRM_CDNS_HDMI) += cdns-hdmi-core.o\n cdns_mhdp_drmcore-$(CONFIG_DRM_CDNS_DP) += cdns-dp-core.o\n cdns_mhdp_drmcore-$(CONFIG_DRM_CDNS_AUDIO) += cdns-mhdp-audio.o\n+cdns_mhdp_drmcore-$(CONFIG_DRM_CDNS_HDMI_HDCP) += cdns-mhdp-hdcp.o cdns-hdmi-hdcp.o\n cdns_mhdp_drmcore-$(CONFIG_DRM_CDNS_HDMI_CEC) += cdns-mhdp-cec.o\n \n obj-$(CONFIG_DRM_CDNS_MHDP)\t\t+= cdns_mhdp_drmcore.o\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\nindex 84c175997740..dc393f6b75e7 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n@@ -1,7 +1,7 @@\n /*\n  * Cadence High-Definition Multimedia Interface (HDMI) driver\n  *\n- * Copyright (C) 2019-2020 NXP Semiconductor, Inc.\n+ * Copyright (C) 2019-2021 NXP Semiconductor, Inc.\n  *\n  * This program is free software; you can redistribute it and/or modify\n  * it under the terms of the GNU General Public License as published by\n@@ -13,6 +13,7 @@\n #include <drm/drm_atomic_helper.h>\n #include <drm/drm_edid.h>\n #include <drm/drm_encoder_slave.h>\n+#include <drm/display/drm_hdcp.h>\n #include <drm/drm_of.h>\n #include <drm/drm_probe_helper.h>\n #include <drm/drm_print.h>\n@@ -27,6 +28,131 @@\n #include <linux/mutex.h>\n #include <linux/of_device.h>\n \n+#include \"cdns-mhdp-hdcp.h\"\n+\n+static ssize_t HDCPTX_do_reauth_store(struct device *dev,\n+\t\t\tstruct device_attribute *attr, const char *buf, size_t count);\n+static struct device_attribute HDCPTX_do_reauth = __ATTR_WO(HDCPTX_do_reauth);\n+\n+static ssize_t HDCPTX_do_reauth_store(struct device *dev,\n+\t\t\tstruct device_attribute *attr, const char *buf, size_t count)\n+{\n+    int value, ret;\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\n+\tret = cdns_mhdp_hdcp_tx_reauth(mhdp, 1);\n+\n+\tsscanf(buf, \"%d\", &value);\n+\n+    if (ret < 0) {\n+\t\tdev_err(dev, \"%s cdns_mhdp_hdcp_tx_reauth failed\\n\", __func__);\n+\t\treturn -1;\n+\t}\n+\treturn count;\n+}\n+\n+static ssize_t HDCPTX_Version_show(struct device *dev,\n+\t\t\tstruct device_attribute *attr, char *buf);\n+static ssize_t HDCPTX_Version_store(struct device *dev,\n+\t\t\tstruct device_attribute *attr, const char *buf, size_t count);\n+static struct device_attribute HDCPTX_Version = __ATTR_RW(HDCPTX_Version);\n+\n+static ssize_t HDCPTX_Version_store(struct device *dev,\n+\t\t\tstruct device_attribute *attr, const char *buf, size_t count)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\tint value;\n+\n+\tsscanf(buf, \"%d\", &value);\n+\tif (value == 2)\n+\t\tmhdp->hdcp.config = 2;\n+\telse if (value == 1)\n+\t\tmhdp->hdcp.config = 1;\n+\telse if (value == 3)\n+\t\tmhdp->hdcp.config = 3;\n+\telse\n+\t\tmhdp->hdcp.config = 0;\n+\n+\treturn count;\n+}\n+\n+ssize_t HDCPTX_Version_show(struct device *dev,\n+\t\t\tstruct device_attribute *attr, char *buf)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\treturn sprintf(buf, \"%d\\n\", mhdp->hdcp.config);\n+}\n+\n+static ssize_t HDCPTX_Status_show(struct device *dev,\n+\t\t\tstruct device_attribute *attr, char *buf);\n+static ssize_t HDCPTX_Status_store(struct device *dev,\n+\t\t\tstruct device_attribute *attr, const char *buf, size_t count);\n+static struct device_attribute HDCPTX_Status = __ATTR_RW(HDCPTX_Status);\n+\n+ssize_t HDCPTX_Status_show(struct device *dev,\n+\t\t\tstruct device_attribute *attr, char *buf)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\n+\tswitch (mhdp->hdcp.state) {\n+\tcase HDCP_STATE_NO_AKSV:\n+\t\treturn sprintf(buf, \"%d :HDCP_STATE_NO_AKSV \\n\", mhdp->hdcp.state);\n+\tcase HDCP_STATE_INACTIVE:\n+\t\treturn sprintf(buf, \"%d :HDCP_STATE_INACTIVE \\n\", mhdp->hdcp.state);\n+\tcase HDCP_STATE_ENABLING:\n+\t\treturn sprintf(buf, \"%d :HDCP_STATE_ENABLING \\n\", mhdp->hdcp.state);\n+\tcase HDCP_STATE_AUTHENTICATING:\n+\t\treturn sprintf(buf, \"%d :HDCP_STATE_AUTHENTICATING \\n\", mhdp->hdcp.state);\n+\tcase HDCP_STATE_AUTHENTICATED:\n+\t\treturn sprintf(buf, \"%d :HDCP_STATE_AUTHENTICATED \\n\", mhdp->hdcp.state);\n+\tcase HDCP_STATE_DISABLING:\n+\t\treturn sprintf(buf, \"%d :HDCP_STATE_DISABLING \\n\", mhdp->hdcp.state);\n+\tcase HDCP_STATE_AUTH_FAILED:\n+\t\treturn sprintf(buf, \"%d :HDCP_STATE_AUTH_FAILED \\n\", mhdp->hdcp.state);\n+\tdefault:\n+\t\treturn sprintf(buf, \"%d :HDCP_STATE don't exist \\n\", mhdp->hdcp.state);\n+    }\n+}\n+\n+ssize_t HDCPTX_Status_store(struct device *dev,\n+\t\t\tstruct device_attribute *attr, const char *buf, size_t count)\n+{\n+\tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n+\tint value;\n+\n+\tif (count == 2) {\n+\t\tsscanf(buf, \"%d\", &value);\n+\t\tif ((value >= HDCP_STATE_NO_AKSV) && (value <= HDCP_STATE_AUTH_FAILED)) {\n+\t\t\tmhdp->hdcp.state = value;\n+\t\t\treturn count;\n+\t\t} else {\n+\t\t\tdev_err(dev, \"%s &hdp->state invalid\\n\", __func__);\n+\t\t\treturn -1;\n+\t\t}\n+\t}\n+\n+\tdev_info(dev, \"%s &hdp->state desired %s count=%d\\n \", __func__, buf, (int)count);\n+\n+    if (strncmp(buf, \"HDCP_STATE_NO_AKSV\", count - 1) == 0)\n+\t\tmhdp->hdcp.state = HDCP_STATE_NO_AKSV;\n+    else if (strncmp(buf, \"HDCP_STATE_INACTIVE\", count - 1) == 0)\n+\t\tmhdp->hdcp.state = HDCP_STATE_INACTIVE;\n+    else if (strncmp(buf, \"HDCP_STATE_ENABLING\", count - 1) == 0)\n+\t\tmhdp->hdcp.state = HDCP_STATE_ENABLING;\n+    else if (strncmp(buf, \"HDCP_STATE_AUTHENTICATING\", count - 1) == 0)\n+\t\tmhdp->hdcp.state = HDCP_STATE_AUTHENTICATING;\n+    else if (strncmp(buf, \"HDCP_STATE_AUTHENTICATED\", count - 1) == 0)\n+\t\tmhdp->hdcp.state = HDCP_STATE_AUTHENTICATED;\n+    else if (strncmp(buf, \"HDCP_STATE_DISABLING\", count - 1) == 0)\n+\t\tmhdp->hdcp.state = HDCP_STATE_DISABLING;\n+    else if (strncmp(buf, \"HDCP_STATE_AUTH_FAILED\", count - 1) == 0)\n+\t\tmhdp->hdcp.state = HDCP_STATE_AUTH_FAILED;\n+    else\n+\t\tdev_err(dev, \"%s &hdp->state invalid\\n\", __func__);\n+\t\treturn -1;\n+    return count;\n+}\n+\n static void hdmi_sink_config(struct cdns_mhdp_device *mhdp)\n {\n \tstruct drm_scdc *scdc = &mhdp->connector.base.display_info.hdmi.scdc;\n@@ -319,6 +445,22 @@ static bool blob_equal(const struct drm_property_blob *a,\n \treturn !a == !b;\n }\n \n+static void cdns_hdmi_bridge_disable(struct drm_bridge *bridge)\n+{\n+\tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n+\n+\tcdns_hdmi_hdcp_disable(mhdp);\n+}\n+\n+static void cdns_hdmi_bridge_enable(struct drm_bridge *bridge)\n+{\n+\tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n+\tstruct drm_connector_state *conn_state = mhdp->connector.base.state;\n+\n+\tif (conn_state->content_protection == DRM_MODE_CONTENT_PROTECTION_DESIRED)\n+\t\tcdns_hdmi_hdcp_enable(mhdp);\n+}\n+\n static int cdns_hdmi_connector_atomic_check(struct drm_connector *connector,\n \t\t\t\t\t    struct drm_atomic_state *state)\n {\n@@ -329,12 +471,17 @@ static int cdns_hdmi_connector_atomic_check(struct drm_connector *connector,\n \tstruct drm_crtc *crtc = new_con_state->crtc;\n \tstruct drm_crtc_state *new_crtc_state;\n \n+\tcdns_hdmi_hdcp_atomic_check(connector, old_con_state, new_con_state);\n+\tif (!new_con_state->crtc)\n+\t\treturn 0;\n+\n+\tnew_crtc_state = drm_atomic_get_crtc_state(state, crtc);\n+\tif (IS_ERR(new_crtc_state))\n+\t\treturn PTR_ERR(new_crtc_state);\n+\n \tif (!blob_equal(new_con_state->hdr_output_metadata,\n \t\t\told_con_state->hdr_output_metadata) ||\n \t    new_con_state->colorspace != old_con_state->colorspace) {\n-\t\tnew_crtc_state = drm_atomic_get_crtc_state(state, crtc);\n-\t\tif (IS_ERR(new_crtc_state))\n-\t\t\treturn PTR_ERR(new_crtc_state);\n \n \t\tnew_crtc_state->mode_changed =\n \t\t\t!new_con_state->hdr_output_metadata ||\n@@ -342,6 +489,15 @@ static int cdns_hdmi_connector_atomic_check(struct drm_connector *connector,\n \t\t\tnew_con_state->colorspace != old_con_state->colorspace;\n \t}\n \n+\t/*\n+\t * These properties are handled by fastset, and might not end up in a\n+\t * modeset.\n+\t */\n+\tif (new_con_state->picture_aspect_ratio !=\n+\t    old_con_state->picture_aspect_ratio ||\n+\t    new_con_state->content_type != old_con_state->content_type ||\n+\t    new_con_state->scaling_mode != old_con_state->scaling_mode)\n+\t\tnew_crtc_state->mode_changed = true;\n \treturn 0;\n }\n \n@@ -388,6 +544,7 @@ static int cdns_hdmi_bridge_attach(struct drm_bridge *bridge,\n \n \tdrm_connector_attach_encoder(connector, encoder);\n \n+\tdrm_connector_attach_content_protection_property(connector, true);\n \treturn 0;\n }\n \n@@ -439,7 +596,7 @@ static void cdns_hdmi_bridge_mode_set(struct drm_bridge *bridge,\n \tvideo->v_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NVSYNC);\n \tvideo->h_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NHSYNC);\n \n-\tDRM_INFO(\"Mode: %dx%dp%d\\n\", mode->hdisplay, mode->vdisplay, mode->clock); \n+\tDRM_INFO(\"Mode: %dx%dp%d\\n\", mode->hdisplay, mode->vdisplay, mode->clock);\n \tmemcpy(&mhdp->mode, mode, sizeof(struct drm_display_mode));\n \n \tmutex_lock(&mhdp->lock);\n@@ -518,6 +675,8 @@ bool cdns_hdmi_bridge_mode_fixup(struct drm_bridge *bridge,\n \n static const struct drm_bridge_funcs cdns_hdmi_bridge_funcs = {\n \t.attach = cdns_hdmi_bridge_attach,\n+\t.enable = cdns_hdmi_bridge_enable,\n+\t.disable = cdns_hdmi_bridge_disable,\n \t.mode_set = cdns_hdmi_bridge_mode_set,\n \t.mode_valid = cdns_hdmi_bridge_mode_valid,\n \t.mode_fixup = cdns_hdmi_bridge_mode_fixup,\n@@ -645,7 +804,7 @@ static int __cdns_hdmi_probe(struct platform_device *pdev,\n \t\t\t\t\t\tmhdp->irq[IRQ_IN]);\n \t\treturn -EINVAL;\n \t}\n-\t\n+\n \tirq_set_status_flags(mhdp->irq[IRQ_OUT], IRQ_NOAUTOEN);\n \tret = devm_request_threaded_irq(dev, mhdp->irq[IRQ_OUT],\n \t\t\t\t\tNULL, cdns_hdmi_irq_thread,\n@@ -659,6 +818,25 @@ static int __cdns_hdmi_probe(struct platform_device *pdev,\n \n \tcdns_hdmi_parse_dt(mhdp);\n \n+\tret = cdns_hdmi_hdcp_init(mhdp, pdev->dev.of_node);\n+\tif (ret < 0)\n+\t\tDRM_WARN(\"Failed to initialize HDCP\\n\");\n+\n+\tif (device_create_file(mhdp->dev, &HDCPTX_do_reauth)) {\n+\t\tprintk(KERN_ERR \"Unable to create HDCPTX_do_reauth sysfs\\n\");\n+\t\tdevice_remove_file(mhdp->dev, &HDCPTX_do_reauth);\n+\t}\n+\n+\tif (device_create_file(mhdp->dev, &HDCPTX_Version)) {\n+\t\tprintk(KERN_ERR \"Unable to create HDCPTX_Version sysfs\\n\");\n+\t\tdevice_remove_file(mhdp->dev, &HDCPTX_Version);\n+\t}\n+\n+\tif (device_create_file(mhdp->dev, &HDCPTX_Status)) {\n+\t\tprintk(KERN_ERR \"Unable to create HDCPTX_Status sysfs\\n\");\n+\t\tdevice_remove_file(mhdp->dev, &HDCPTX_Status);\n+\t}\n+\n \tif (cdns_mhdp_read_hpd(mhdp))\n \t\tenable_irq(mhdp->irq[IRQ_OUT]);\n \telse\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c\nnew file mode 100644\nindex 000000000000..e2a3bc7fb42b\n--- /dev/null\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c\n@@ -0,0 +1,1167 @@\n+/*\n+ * Cadence HDMI HDCP driver\n+ *\n+ * Copyright (C) 2021 NXP Semiconductor, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ *\n+ */\n+#include <drm/bridge/cdns-mhdp.h>\n+#include <drm/display/drm_hdcp.h>\n+#include <drm/drm_print.h>\n+#include <linux/firmware.h>\n+\n+#include \"cdns-mhdp-hdcp.h\"\n+\n+/* Default will be to use KM unless it has been explicitly */\n+#ifndef HDCP_USE_KMKEY\n+\t#define HDCP_USE_KMKEY 1\n+#endif\n+\n+#define CDNS_HDCP_ACTIVATE (0x1 << 2)\n+\n+#define IMX_FW_TIMEOUT_MS      (64 * 1000)\n+#define IMX_HDCP_PAIRING_FIRMWARE \"imx/hdcp-pairing.bin\"\n+\n+#define GENERAL_BUS_SETTINGS_DPCD_BUS_BIT           0\n+#define GENERAL_BUS_SETTINGS_DPCD_BUS_LOCK_BIT      1\n+#define GENERAL_BUS_SETTINGS_HDCP_BUS_BIT           2\n+#define GENERAL_BUS_SETTINGS_HDCP_BUS_LOCK_BIT      3\n+#define GENERAL_BUS_SETTINGS_CAPB_OWNER_BIT         4\n+#define GENERAL_BUS_SETTINGS_CAPB_OWNER_LOCK_BIT    5\n+\n+#define GENERAL_BUS_SETTINGS_RESP_DPCD_BUS_BIT      0\n+#define GENERAL_BUS_SETTINGS_RESP_HDCP_BUS_BIT      1\n+#define GENERAL_BUS_SETTINGS_RESP_CAPB_OWNER_BIT    2\n+\n+/* HDCP TX ports working mode (HDCP 2.2 or 1.4) */\n+enum {\n+\tHDCP_TX_2,\t\t/* lock only with HDCP2 */\n+\tHDCP_TX_1,\t\t/* lock only with HDCP1 */\n+\tHDCP_TX_BOTH,\t/* lock on HDCP2 or 1 depend on other side */\n+};\n+\n+/* HDCP TX ports stream type (relevant if receiver is repeater) */\n+enum {\n+\tHDCP_CONTENT_TYPE_0,  /* May be transmitted by\n+\t\t\t\t\t\t\t The HDCP Repeater to all HDCP Devices. */\n+\tHDCP_CONTENT_TYPE_1,  /* Must not be transmitted by the HDCP Repeater to\n+\t\t\t\t\t\t\t HDCP 1.x-compliant Devices and HDCP 2.0-compliant Repeaters */\n+};\n+\n+/* different error types for HDCP_TX_STATUS_CHANGE */\n+enum {\n+\tHDCP_TRAN_ERR_NO_ERROR,\n+\tHDCP_TRAN_ERR_HPD_IS_DOWN,\n+\tHDCP_TRAN_ERR_SRM_FAILURE,\n+\tHDCP_TRAN_ERR_SIGNATURE_VERIFICATION,\n+\tHDCP_TRAN_ERR_H_TAG_DIFF_H,\n+\tHDCP_TRAN_ERR_V_TAG_DIFF_V,\n+\tHDCP_TRAN_ERR_LOCALITY_CHECK,\n+\tHDCP_TRAN_ERR_DDC,\n+\tHDCP_TRAN_ERR_REAUTH_REQ,\n+\tHDCP_TRAN_ERR_TOPOLOGY,\n+\tHDCP_TRAN_ERR_HDCP_RSVD1,\n+\tHDCP_TRAN_ERR_HDMI_CAPABILITY,\n+\tHDCP_TRAN_ERR_RI,\n+\tHDCP_TRAN_ERR_WATCHDOG_EXPIRED,\n+};\n+\n+static char const *g_last_error[16] = {\n+\t\"No Error\",\n+\t\"HPD is down\",\n+\t\"SRM failure\",\n+\t\"Signature verification error\",\n+\t\"h tag != h\",\n+\t\"V tag diff v\",\n+\t\"Locality check\",\n+\t\"DDC error\",\n+\t\"REAUTH_REQ\",\n+\t\"Topology error\",\n+\t\"Verify receiver ID list failed\",\n+\t\"HDCP_RSVD1 was not 0,0,0\",\n+\t\"HDMI capability or mode\",\n+\t\"RI result was different than expected\",\n+\t\"WatchDog expired\",\n+\t\"Repeater integrity failed\"\n+};\n+\n+#define HDCP_MAX_RECEIVERS 32\n+#define HDCP_RECEIVER_ID_SIZE_BYTES 5\n+#define HPD_EVENT 1\n+#define HDCP_STATUS_SIZE         0x5\n+#define HDCP_PORT_STS_AUTH       0x1\n+#define HDCP_PORT_STS_REPEATER   0x2\n+#define HDCP_PORT_STS_TYPE_MASK  0xc\n+#define HDCP_PORT_STS_TYPE_SHIFT 0x2\n+#define HDCP_PORT_STS_AUTH_STREAM_ID_SHIFT 0x4\n+#define HDCP_PORT_STS_AUTH_STREAM_ID_MASK 0x10\n+#define HDCP_PORT_STS_LAST_ERR_SHIFT 0x5\n+#define HDCP_PORT_STS_LAST_ERR_MASK  (0x0F << 5)\n+#define GET_HDCP_PORT_STS_LAST_ERR(__sts__) \\\n+\t(((__sts__) & HDCP_PORT_STS_LAST_ERR_MASK) >> \\\n+\t HDCP_PORT_STS_LAST_ERR_SHIFT)\n+#define HDCP_PORT_STS_1_1_FEATURES   0x200\n+\n+#define HDCP_CONFIG_NONE    ((u8) 0)\n+#define HDCP_CONFIG_1_4     ((u8) 1) /* use HDCP 1.4 only */\n+#define HDCP_CONFIG_2_2     ((u8) 2) /* use HDCP 2.2 only */\n+\n+/* Default timeout to use for wait4event in milliseconds */\n+#define HDCP_EVENT_TO_DEF 800\n+/* Timeout value to use for repeater receiver ID check, spec says 3s */\n+#define HDCP_EVENT_TO_RPT 3500\n+\n+static int hdmi_hdcp_check_link(struct cdns_mhdp_device *mhdp);\n+\n+static void print_port_status(u16 sts)\n+{\n+\tchar const *rx_type[4] = { \"Unknown\", \"HDCP 1\", \"HDCP 2\", \"Unknown\" };\n+\n+\tDRM_DEBUG_KMS(\"INFO: HDCP Port Status: 0x%04x\\n\", sts);\n+\tDRM_DEBUG_KMS(\" Authenticated: %d\\n\", sts & HDCP_PORT_STS_AUTH);\n+\tDRM_DEBUG_KMS(\" Receiver is repeater: %d\\n\", sts & HDCP_PORT_STS_REPEATER);\n+\tDRM_DEBUG_KMS(\" RX Type: %s\\n\",\n+\t\t\t\trx_type[(sts & HDCP_PORT_STS_TYPE_MASK) >> HDCP_PORT_STS_TYPE_SHIFT]);\n+\tDRM_DEBUG_KMS(\" AuthStreamId: %d\\n\", sts & HDCP_PORT_STS_AUTH_STREAM_ID_MASK);\n+\tDRM_DEBUG_KMS(\" Last Error: %s\\n\",\n+\t\t\t\tg_last_error[(sts & HDCP_PORT_STS_LAST_ERR_MASK) >> HDCP_PORT_STS_LAST_ERR_SHIFT]);\n+\tDRM_DEBUG_KMS(\" Enable 1.1 Features: %d\\n\", sts & HDCP_PORT_STS_1_1_FEATURES);\n+}\n+\n+static void print_events(u8 events)\n+{\n+\tif (events & HDMI_TX_HPD_EVENT)\n+\t\tDRM_INFO(\"INFO: HDMI_TX_HPD_EVENT\\n\");\n+\tif (events & HDCPTX_STATUS_EVENT)\n+\t\tDRM_INFO(\"INFO: HDCPTX_STATUS_EVENT\\n\");\n+\tif (events & HDCPTX_IS_KM_STORED_EVENT)\n+\t\tDRM_INFO(\"INFO: HDCPTX_IS_KM_STORED_EVENT\\n\");\n+\tif (events & HDCPTX_STORE_KM_EVENT)\n+\t\tDRM_INFO(\"INFO: HDCPTX_STORE_KM_EVENT\\n\");\n+\tif (events & HDCPTX_IS_RECEIVER_ID_VALID_EVENT)\n+\t\tDRM_INFO(\"INFO: HDCPTX_IS_RECEIVER_ID_VALID_EVENT\\n\");\n+}\n+\n+static u8 wait4event(struct cdns_mhdp_device *mhdp, u8 *events,\n+\t\t\t       u32 event_to_wait, u32 timeout_ms)\n+{\n+\tu8 reg_events;\n+\tu8 returned_events;\n+\tu8 event_mask = event_to_wait | HDCPTX_STATUS_EVENT;\n+\tunsigned timeout;\n+\n+\ttimeout = timeout_ms;\n+\tdo {\n+\t\tif (timeout == 0)\n+\t\t\tgoto timeout_err;\n+\t\ttimeout--;\n+\t\tudelay(1000);\n+\t\treg_events = cdns_mhdp_get_event(mhdp);\n+\t\t*events |= reg_events;\n+\t} while (((event_mask & *events) == 0) && (event_to_wait > HDMI_TX_HPD_EVENT));\n+\n+\treturned_events = *events & event_mask;\n+\tif (*events != returned_events) {\n+\t\tu32 unexpected_events = ~event_mask & *events;\n+\n+\t\tDRM_INFO(\"INFO: %s() all 0x%08x  expected 0x%08x unexpected 0x%08x\",\n+\t\t\t __func__, *events, returned_events, unexpected_events);\n+\t\tDRM_INFO(\"INFO: %s() All events:\\n\", __func__);\n+\t\tprint_events(*events);\n+\n+\t\tDRM_INFO(\"INFO: %s() expected events:\\n\", __func__);\n+\t\tprint_events(returned_events);\n+\n+\t\tDRM_INFO(\"INFO: %s() unexpected events:\\n\", __func__);\n+\t\tprint_events(unexpected_events);\n+\t} else\n+\t\tprint_events(*events);\n+\n+\t*events &= ~event_mask;\n+\n+\treturn returned_events;\n+\n+timeout_err:\n+\tDRM_INFO(\"INFO: %s() Timed out with events:\\n\", __func__);\n+\tprint_events(event_to_wait);\n+\treturn 0;\n+}\n+\n+static u16 hdmi_hdcp_get_status(struct cdns_mhdp_device *mhdp)\n+{\n+\tu8 hdcp_status[HDCP_STATUS_SIZE];\n+\tu16 hdcp_port_status;\n+\n+\tcdns_mhdp_hdcp_tx_status_req(mhdp, hdcp_status, HDCP_STATUS_SIZE);\n+\thdcp_port_status = (hdcp_status[0] << 8) | hdcp_status[1];\n+\n+\treturn hdcp_port_status;\n+}\n+\n+static inline u8 check_event(u8 events, u8 tested)\n+{\n+\tif ((events & tested) == 0)\n+\t\treturn 0;\n+\treturn 1;\n+}\n+\n+/* Prints status. Returns error code (0 = no error) */\n+static u8 hdmi_hdcp_handle_status(u16 status)\n+{\n+\tprint_port_status(status);\n+\tif (status & HDCP_PORT_STS_LAST_ERR_MASK)\n+\t\tDRM_ERROR(\"ERROR: HDCP error was set to %s\\n\",\n+\t\t\t  g_last_error[((status & HDCP_PORT_STS_LAST_ERR_MASK)\n+\t\t\t\t\t>> HDCP_PORT_STS_LAST_ERR_SHIFT)]);\n+\treturn GET_HDCP_PORT_STS_LAST_ERR(status);\n+}\n+\n+static int hdmi_hdcp_set_config(struct cdns_mhdp_device *mhdp, u8 hdcp_config)\n+{\n+\tu8 bus_config, retEvents;\n+\tu16 hdcp_port_status;\n+\tint ret;\n+\n+\t/* Clearing out existing events */\n+\twait4event(mhdp, &mhdp->hdcp.events, HDMI_TX_HPD_EVENT, HDCP_EVENT_TO_DEF);\n+\tmhdp->hdcp.events = 0;\n+\n+\tif (!strncmp(\"imx8mq-hdmi\", mhdp->plat_data->plat_name, 11)) {\n+\t\tDRM_DEBUG_KMS(\"INFO: Switching HDCP Commands to SAPB.\\n\");\n+\t\tbus_config = (1 << GENERAL_BUS_SETTINGS_HDCP_BUS_BIT);\n+\t\tret = cdns_mhdp_apb_conf(mhdp, bus_config);\n+\t\tif (ret) {\n+\t\t\tDRM_ERROR(\"Failed to set APB configuration.\\n\");\n+\t\t\tif (ret & (1 << GENERAL_BUS_SETTINGS_RESP_HDCP_BUS_BIT))/* 1 - locked */\n+\t\t\t\tDRM_ERROR(\"Failed to switch HDCP to SAPB Mailbox\\n\");\n+\t\t\treturn -1;\n+\t\t}\n+\t\tDRM_DEBUG_KMS(\"INFO: HDCP switched to SAPB\\n\");\n+\t}\n+\n+\t/* HDCP 2.2(and/or 1.4) | activate | km-key |  0 */\n+\thdcp_config |=  CDNS_HDCP_ACTIVATE | (HDCP_USE_KMKEY << 4) | (HDCP_CONTENT_TYPE_0 << 3);\n+\n+\tDRM_DEBUG_KMS(\"INFO: Enabling HDCP...\\n\");\n+\tret = cdns_mhdp_hdcp_tx_config(mhdp, hdcp_config);\n+\tif (ret < 0)\n+\t\tDRM_DEBUG_KMS(\"cdns_mhdp_hdcp_tx_config failed\\n\");\n+\n+\t/* Wait until HDCP_TX_STATUS EVENT appears */\n+\tDRM_DEBUG_KMS(\"INFO: wait4event -> HDCPTX_STATUS_EVENT\\n\");\n+\tretEvents = wait4event(mhdp, &mhdp->hdcp.events, HDCPTX_STATUS_EVENT, HDCP_EVENT_TO_DEF);\n+\n+\t/* Set TX STATUS REQUEST */\n+\tDRM_DEBUG_KMS(\"INFO: Getting port status\\n\");\n+\thdcp_port_status = hdmi_hdcp_get_status(mhdp);\n+\tif (hdmi_hdcp_handle_status(hdcp_port_status) != 0)\n+\t\treturn -1;\n+\n+\treturn 0;\n+}\n+\n+static int hdmi_hdcp_auth_check(struct cdns_mhdp_device *mhdp)\n+{\n+\tu16 hdcp_port_status;\n+\tint ret;\n+\n+\tDRM_DEBUG_KMS(\"INFO: wait4event -> HDCPTX_STATUS_EVENT\\n\");\n+\tmhdp->hdcp.events = wait4event(mhdp, &mhdp->hdcp.events, HDCPTX_STATUS_EVENT, HDCP_EVENT_TO_DEF+HDCP_EVENT_TO_DEF);\n+\tif (mhdp->hdcp.events == 0)\n+\t\treturn -1;\n+\n+\tDRM_DEBUG_KMS(\"HDCP: HDCPTX_STATUS_EVENT\\n\");\n+\thdcp_port_status = hdmi_hdcp_get_status(mhdp);\n+\tret = hdmi_hdcp_handle_status(hdcp_port_status);\n+\tif (ret != 0) {\n+\t\tif (ret == HDCP_TRAN_ERR_REAUTH_REQ) {\n+\t\t\tDRM_ERROR(\"HDCP_TRAN_ERR_REAUTH_REQ-->one more try!\\n\");\n+\t\t\treturn 1;\n+\t\t} else\n+\t\t\treturn -1;\n+\t}\n+\n+\tif (hdcp_port_status & HDCP_PORT_STS_AUTH) {\n+\t\tDRM_INFO(\"Authentication completed successfully!\\n\");\n+\t\t/* Dump hdmi and phy register */\n+\t\tmhdp->hdcp.state = HDCP_STATE_AUTHENTICATED;\n+\t\treturn 0;\n+\t}\n+\n+\tDRM_WARN(\"Authentication failed\\n\");\n+\tmhdp->hdcp.state = HDCP_STATE_AUTH_FAILED;\n+\treturn -1;\n+}\n+\n+inline void hdmi_hdcp_swap_id(u8 *in, u8 *out)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < HDCP_RECEIVER_ID_SIZE_BYTES; i++)\n+\t\tout[HDCP_RECEIVER_ID_SIZE_BYTES - (i + 1)] = in[i];\n+}\n+\n+inline void hdmi_hdcp_swap_list(u8 *list_in, u8 *list_out, int num_ids)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < num_ids; i++)\n+\t\thdmi_hdcp_swap_id(&list_in[i * HDCP_RECEIVER_ID_SIZE_BYTES],\n+\t\t\t\t &list_out[i * HDCP_RECEIVER_ID_SIZE_BYTES]);\n+}\n+\n+static int hdmi_hdcp_check_receviers(struct cdns_mhdp_device *mhdp)\n+{\n+\tu8 ret_events;\n+\tu8 hdcp_num_rec, i;\n+\tu8 hdcp_rec_id[HDCP_MAX_RECEIVERS][HDCP_RECEIVER_ID_SIZE_BYTES];\n+\tu8 hdcp_rec_id_temp[HDCP_MAX_RECEIVERS][HDCP_RECEIVER_ID_SIZE_BYTES];\n+\tu16 hdcp_port_status = 0;\n+\tint ret;\n+\n+\tDRM_INFO(\"INFO: Waiting for Receiver ID valid event\\n\");\n+\tret_events = 0;\n+\tdo {\n+\t\tu8 events = 0;\n+\t\tu8 hdcp_last_error = 0;\n+\t\tevents = check_event(ret_events,\n+\t\t\t\t     HDCPTX_IS_RECEIVER_ID_VALID_EVENT);\n+\t\tDRM_DEBUG_KMS(\"INFO: Waiting HDCPTX_IS_RECEIVER_ID_VALID_EVENT\\n\");\n+\t\tret_events = wait4event(mhdp, &mhdp->hdcp.events,\n+\t\t\t\t\tHDCPTX_IS_RECEIVER_ID_VALID_EVENT,\n+\t\t\t\t\t(mhdp->hdcp.sink_is_repeater ?\n+\t\t\t\t\t HDCP_EVENT_TO_RPT : HDCP_EVENT_TO_DEF));\n+\t\tif (ret_events == 0) {\n+\t\t\t/* time out occurred, return error */\n+\t\t\tDRM_ERROR(\"HDCP error did not get receiver IDs\\n\");\n+\t\t\treturn -1;\n+\t\t}\n+\t\tif (check_event(ret_events, HDCPTX_STATUS_EVENT) != 0) {\n+\t\t\t/* There was a status update, could be due to HPD\n+\t\t\t   going down or some other error, check if an error\n+\t\t\t   was set, if so exit.\n+\t\t\t*/\n+\t\t\thdcp_port_status = hdmi_hdcp_get_status(mhdp);\n+\t\t\thdcp_last_error = GET_HDCP_PORT_STS_LAST_ERR(hdcp_port_status);\n+\t\t\tif (hdmi_hdcp_handle_status(hdcp_port_status)) {\n+\t\t\t\tDRM_ERROR(\"HDCP error no: %u\\n\", hdcp_last_error);\n+\t\t\t\treturn -1;\n+\t\t\t} else {\n+\t\t\t\t/* No error logged, keep going.\n+\t\t\t\t * If this somehow happened at same time, then need to\n+\t\t\t\t * put the HDCPTX_STATUS_EVENT back into the global\n+\t\t\t\t * events pool and checked later. */\n+\t\t\t\tmhdp->hdcp.events |= HDCPTX_STATUS_EVENT;\n+\n+\t\t\t\t/* Special condition when connected to HDCP 1.4 repeater\n+\t\t\t\t * with no downstream devices attached, then will not\n+\t\t\t\t * get receiver ID list but instead will reach\n+\t\t\t\t * authenticated state. */\n+\t\t\t\tif ((mhdp->hdcp.hdcp_version == HDCP_TX_1) && (mhdp->hdcp.sink_is_repeater == 1) &&\n+\t\t\t\t    ((hdcp_port_status & HDCP_PORT_STS_AUTH) == HDCP_PORT_STS_AUTH)) {\n+\t\t\t\t\tDRM_INFO(\"Connected to HDCP 1.4 repeater with no downstream devices!\\n\");\n+\t\t\t\t\treturn 0;\n+\t\t\t\t}\n+\n+\t\t\t\tmsleep(20);\n+\t\t\t}\n+\t\t}\n+\t} while (check_event(ret_events,\n+\t\t\t     HDCPTX_IS_RECEIVER_ID_VALID_EVENT) == 0);\n+\n+\tDRM_INFO(\"INFO: Requesting Receivers ID's\\n\");\n+\n+\thdcp_num_rec = 0;\n+\tmemset(&hdcp_rec_id, 0, sizeof(hdcp_rec_id));\n+\n+\tret = cdns_mhdp_hdcp_tx_is_receiver_id_valid(mhdp, (u8 *)hdcp_rec_id, &hdcp_num_rec);\n+\tif (ret) {\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"Failed to hdcp tx receiver ID.\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\tif (hdcp_num_rec == 0) {\n+\t\tDRM_DEBUG_KMS(\"WARN: Failed to get receiver list\\n\");\n+\t\t/* Unknown problem, return error */\n+\t\treturn -1;\n+\t}\n+\n+\tDRM_INFO(\"INFO: Number of Receivers: %d\\n\", hdcp_num_rec);\n+\n+\tfor (i = 0; i < hdcp_num_rec; ++i) {\n+\t\tDRM_INFO(\"\\tReveiver ID%2d: %.2X%.2X%.2X%.2X%.2X\\n\",\n+\t\t\t i,\n+\t\t\t hdcp_rec_id[i][0],\n+\t\t\t hdcp_rec_id[i][1],\n+\t\t\t hdcp_rec_id[i][2],\n+\t\t\t hdcp_rec_id[i][3],\n+\t\t\t hdcp_rec_id[i][4]\n+\t\t\t);\n+\t}\n+\n+\t/* swap ids byte order */\n+\thdmi_hdcp_swap_list(&hdcp_rec_id[0][0],\n+\t\t\t   &hdcp_rec_id_temp[0][0], hdcp_num_rec);\n+\n+\t/* Check Receiver ID's against revocation list in SRM */\n+\tif (drm_hdcp_check_ksvs_revoked(mhdp->drm_dev, (u8 *)hdcp_rec_id_temp, hdcp_num_rec)) {\n+\t\tmhdp->hdcp.state = HDCP_STATE_AUTH_FAILED;\n+\t\tDRM_ERROR(\"INFO: Receiver check fails\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\tret = cdns_mhdp_hdcp_tx_respond_receiver_id_valid(mhdp, 1);\n+\tDRM_INFO(\"INFO: Responding with Receiver ID's OK!, ret=%d\\n\", ret);\n+\treturn ret;\n+}\n+\n+#ifdef STORE_PAIRING\n+static int hdmi_hdcp_get_stored_pairing(struct cdns_mhdp_device *mhdp)\n+{\n+\tint ret = 0;\n+\tunsigned long timeout = jiffies + msecs_to_jiffies(IMX_FW_TIMEOUT_MS);\n+\tunsigned long sleep = 1000;\n+\tconst struct firmware *fw;\n+\n+\tDRM_DEBUG_KMS(\"%s()\\n\", __func__);\n+\n+\twhile (time_before(jiffies, timeout)) {\n+\t\tret = request_firmware(&fw, hdmi_hdcp_PAIRING_FIRMWARE, mhdp->dev);\n+\t\tif (ret == -ENOENT) {\n+\t\t\tmsleep(sleep);\n+\t\t\tsleep *= 2;\n+\t\t\tcontinue;\n+\t\t} else if (ret) {\n+\t\t\tDRM_DEV_INFO(mhdp->dev, \"HDCP pairing data not found\\n\");\n+\t\t\tgoto out;\n+\t\t}\n+\n+\t\tmhdp->hdcp.num_paired = fw->size /\n+\t\t\tsizeof(struct hdcp_trans_pairing_data);\n+\t\tif (mhdp->hdcp.num_paired > MAX_STORED_KM) {\n+\t\t\t/* todo: handle dropping */\n+\t\t\tmhdp->hdcp.num_paired = MAX_STORED_KM;\n+\t\t\tDRM_DEV_INFO(mhdp->dev,\n+\t\t\t\t     \"too many paired receivers - dropping older entries\\n\");\n+\t\t}\n+\t\tmemcpy(&mhdp->hdcp.pairing[0], fw->data,\n+\t\t       sizeof(struct hdcp_trans_pairing_data) * mhdp->hdcp.num_paired);\n+\t\trelease_firmware(fw);\n+\t\tgoto out;\n+\t}\n+\n+\tDRM_DEV_ERROR(mhdp->dev, \"Timed out trying to load firmware\\n\");\n+\tret = -ETIMEDOUT;\n+\tout:\n+\treturn ret;\n+}\n+#endif\n+\n+static int hdmi_hdcp_find_km_store(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t  u8 receiver[HDCP_PAIRING_R_ID])\n+{\n+\tint i;\n+\n+\tDRM_DEBUG_KMS(\"%s()\\n\", __func__);\n+\tfor (i = 0; i < mhdp->hdcp.num_paired; i++) {\n+\t\tif (memcmp(receiver, mhdp->hdcp.pairing[i].receiver_id,\n+\t\t\t   HDCP_PAIRING_R_ID) == 0) {\n+\t\t\tDRM_INFO(\"HDCP: found receiver id: 0x%x%x%x%x%x\\n\",\n+\t\t\treceiver[0], receiver[1], receiver[2], receiver[3], receiver[4]);\n+\t\t\treturn i;\n+\t\t}\n+\t}\n+\tDRM_INFO(\"HDCP: receiver id: 0x%x%x%x%x%x not stored\\n\",\n+\t\t receiver[0], receiver[1], receiver[2], receiver[3], receiver[4]);\n+\treturn -1;\n+}\n+\n+static int hdmi_hdcp_store_km(struct cdns_mhdp_device *mhdp,\n+\t\t\t     struct hdcp_trans_pairing_data *pairing,\n+\t\t\t     int stored_km_index)\n+{\n+\tint i, temp_index;\n+\tstruct hdcp_trans_pairing_data temp_pairing;\n+\n+\tDRM_DEBUG_KMS(\"%s()\\n\", __func__);\n+\n+\tif (stored_km_index < 0) {\n+\t\t/* drop one entry if array is full */\n+\t\tif (mhdp->hdcp.num_paired == MAX_STORED_KM)\n+\t\t\tmhdp->hdcp.num_paired--;\n+\n+\t\ttemp_index = mhdp->hdcp.num_paired;\n+\t\tmhdp->hdcp.num_paired++;\n+\t\tif (!pairing) {\n+\t\t\tDRM_ERROR(\"NULL HDCP pairing data!\\n\");\n+\t\t\treturn  -1;\n+\t\t} else\n+\t\t\t/* save the new stored km */\n+\t\t\ttemp_pairing = *pairing;\n+\t} else {\n+\t\t/* save the current stored km */\n+\t\ttemp_index = stored_km_index;\n+\t\ttemp_pairing = mhdp->hdcp.pairing[stored_km_index];\n+\t}\n+\n+\t/* move entries one slot to the end */\n+\tfor (i = temp_index; i > 0; i--)\n+\t\tmhdp->hdcp.pairing[i] = mhdp->hdcp.pairing[i - 1];\n+\n+\t/* save the current/new entry at the beginning */\n+\tmhdp->hdcp.pairing[0] = temp_pairing;\n+\n+\treturn 0;\n+}\n+\n+static inline int hdmi_hdcp_auth_22(struct cdns_mhdp_device *mhdp)\n+{\n+\tint km_idx = -1;\n+\tu8 retEvents;\n+\tu16 hdcp_port_status;\n+\tu8 resp[HDCP_STATUS_SIZE];\n+\tstruct hdcp_trans_pairing_data pairing;\n+\tint ret;\n+\n+\tDRM_DEBUG_KMS(\"HDCP: Start 2.2 Authentication\\n\");\n+\tmhdp->hdcp.sink_is_repeater = 0;\n+\n+\t/* Wait until HDCP2_TX_IS_KM_STORED EVENT appears */\n+\tretEvents = 0;\n+\tDRM_DEBUG_KMS(\"INFO: Wait until HDCP2_TX_IS_KM_STORED EVENT appears\\n\");\n+\twhile (check_event(retEvents, HDCPTX_IS_KM_STORED_EVENT) == 0) {\n+\t\tDRM_DEBUG_KMS(\"INFO: Waiting FOR _IS_KM_STORED EVENT\\n\");\n+\t\tretEvents = wait4event(mhdp, &mhdp->hdcp.events,\n+\t\t\t\t       HDCPTX_IS_KM_STORED_EVENT, HDCP_EVENT_TO_DEF);\n+\t\tif (retEvents == 0)\n+\t\t\t/* time out occurred, return error */\n+\t\t\treturn -1;\n+\t\tif (check_event(retEvents, HDCPTX_STATUS_EVENT) != 0) {\n+\t\t\t/* There was a status update, could be due to HPD\n+\t\t\t   going down or some other error, check if an error\n+\t\t\t   was set, if so exit.\n+\t\t\t*/\n+\t\t\thdcp_port_status = hdmi_hdcp_get_status(mhdp);\n+\t\t\tif (hdmi_hdcp_handle_status(hdcp_port_status) != 0)\n+\t\t\t\treturn -1;\n+\t\t}\n+\t}\n+\n+\tDRM_DEBUG_KMS(\"HDCP: HDCPTX_IS_KM_STORED_EVENT\\n\");\n+\n+\t/* Set HDCP2 TX KM STORED REQUEST */\n+\tret = cdns_mhdp_hdcp2_tx_is_km_stored_req(mhdp, resp, HDCP_STATUS_SIZE);\n+\tif (ret) {\n+\t\tDRM_DEV_ERROR(mhdp->dev, \"Failed to hdcp2 tx km stored.\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\tDRM_DEBUG_KMS(\"HDCP: CDN_API_HDCP2_TX_IS_KM_STORED_REQ_blocking\\n\");\n+\tDRM_DEBUG_KMS(\"HDCP: Receiver ID: 0x%x%x%x%x%x\\n\",\n+\t\t      resp[0], resp[1], resp[2], resp[3], resp[4]);\n+\n+\tkm_idx = hdmi_hdcp_find_km_store(mhdp, resp);\n+\n+\t/* Check if KM is stored */\n+\tif (km_idx >= 0) {\n+\t\tDRM_DEBUG_KMS(\"INFO: KM is stored\\n\");\n+\t\t/* Set HDCP2 TX RESPOND KM with stored KM */\n+\t\tret = cdns_mhdp_hdcp2_tx_respond_km(mhdp, (u8 *)&mhdp->hdcp.pairing[km_idx],\n+\t\t\t\tsizeof(struct hdcp_trans_pairing_data));\n+\n+\t\tDRM_DEBUG_KMS(\"HDCP: CDN_API_HDCP2_TX_RESPOND_KM_blocking, ret=%d\\n\", ret);\n+\t} else { /* KM is not stored */\n+\t\t/* Set HDCP2 TX RESPOND KM with empty data */\n+\t\tret = cdns_mhdp_hdcp2_tx_respond_km(mhdp, NULL, 0);\n+\t\tDRM_DEBUG_KMS(\"INFO: KM is not stored ret=%d\\n\", ret);\n+\t}\n+\n+\tif (hdmi_hdcp_check_receviers(mhdp))\n+\t\treturn -1;\n+\n+\t/* Check if KM is not stored */\n+\tif (km_idx < 0) {\n+\t\tint loop_cnt = 0;\n+\n+\t\t/* Wait until HDCP2_TX_STORE_KM EVENT appears */\n+\t\tretEvents = 0;\n+\t\tDRM_DEBUG_KMS(\"INFO: wait4event -> HDCPTX_STORE_KM_EVENT\\n\");\n+\t\twhile (check_event(retEvents, HDCPTX_STORE_KM_EVENT) == 0) {\n+\t\t\tretEvents = wait4event(mhdp, &mhdp->hdcp.events,\n+\t\t\t\t\t       HDCPTX_STORE_KM_EVENT, HDCP_EVENT_TO_DEF);\n+\t\t\tif (check_event(retEvents, HDCPTX_STATUS_EVENT)\n+\t\t\t    != 0) {\n+\t\t\t\thdcp_port_status = hdmi_hdcp_get_status(mhdp);\n+\t\t\t\tif (hdmi_hdcp_handle_status(hdcp_port_status)\n+\t\t\t\t    != 0)\n+\t\t\t\t\treturn -1;\n+\t\t\t}\n+\t\t\tif (loop_cnt > 2) {\n+\t\t\t\tDRM_ERROR(\"Did not get event HDCPTX_STORE_KM_EVENT in time\\n\");\n+\t\t\t\treturn -1;\n+\t\t\t} else\n+\t\t\t\tloop_cnt++;\n+\t\t}\n+\t\tDRM_DEBUG_KMS(\"HDCP: HDCPTX_STORE_KM_EVENT\\n\");\n+\n+\t\t/* Set HDCP2_TX_STORE_KM REQUEST */\n+\t\tret = cdns_mhdp_hdcp2_tx_store_km(mhdp, (u8 *)&pairing, sizeof(struct  hdcp_trans_pairing_data));\n+\t\tDRM_DEBUG_KMS(\"HDCP: CDN_API_HDCP2_TX_STORE_KM_REQ_blocking ret=%d\\n\", ret);\n+\t\thdmi_hdcp_store_km(mhdp, &pairing, km_idx);\n+\t} else\n+\t\thdmi_hdcp_store_km(mhdp, NULL, km_idx);\n+\n+\t/* Check if device was a repeater */\n+\thdcp_port_status = hdmi_hdcp_get_status(mhdp);\n+\n+\t/* Exit if there was any errors logged at this point... */\n+\tif (GET_HDCP_PORT_STS_LAST_ERR(hdcp_port_status) > 0) {\n+\t\thdmi_hdcp_handle_status(hdcp_port_status);\n+\t\treturn -1;\n+\t}\n+\n+\tif (hdcp_port_status & HDCP_PORT_STS_REPEATER)\n+\t\tmhdp->hdcp.sink_is_repeater = 1;\n+\n+\t/* If sink was a repeater, we will be getting additional IDs to validate...\n+\t * Note that this one may take some time since spec allows up to 3s... */\n+\tif (mhdp->hdcp.sink_is_repeater)\n+\t\tif (hdmi_hdcp_check_receviers(mhdp))\n+\t\t\treturn -1;\n+\n+\t/* Slight delay to allow firmware to finish setting up authenticated state */\n+\tmsleep(300);\n+\n+\tDRM_INFO(\"Finished hdmi_hdcp_auth_22\\n\");\n+\treturn 0;\n+}\n+\n+static inline int hdmi_hdcp_auth_14(struct cdns_mhdp_device *mhdp)\n+{\n+\tu16 hdcp_port_status;\n+\tint ret = 0;\n+\n+\tDRM_DEBUG_KMS(\"HDCP: Starting 1.4 Authentication\\n\");\n+\tmhdp->hdcp.sink_is_repeater = 0;\n+\n+\tret = hdmi_hdcp_check_receviers(mhdp);\n+\tif (ret)\n+\t\treturn -1;\n+\n+\t/* Check if device was a repeater */\n+\thdcp_port_status = hdmi_hdcp_get_status(mhdp);\n+\n+\t/* Exit if there was any errors logged at this point... */\n+\tif (GET_HDCP_PORT_STS_LAST_ERR(hdcp_port_status) > 0) {\n+\t\thdmi_hdcp_handle_status(hdcp_port_status);\n+\t\treturn -1;\n+\t}\n+\n+\tif (hdcp_port_status & HDCP_PORT_STS_REPEATER) {\n+\t\tDRM_INFO(\"Connected to a repeater\\n\");\n+\t\tmhdp->hdcp.sink_is_repeater = 1;\n+\t} else\n+\t\tDRM_INFO(\"Connected to a normal sink\\n\");\n+\n+\t/* If sink was a repeater, we will be getting additional IDs to validate...\n+\t * Note that this one may take some time since spec allows up to 3s... */\n+\tif (mhdp->hdcp.sink_is_repeater)\n+\t\tret = hdmi_hdcp_check_receviers(mhdp);\n+\n+\t/* Slight delay to allow firmware to finish setting up authenticated state */\n+\tmsleep(300);\n+\n+\treturn ret;\n+}\n+\n+static int hdmi_hdcp_auth(struct cdns_mhdp_device *mhdp, u8 hdcp_config)\n+{\n+\tint ret = 0;\n+\n+\tDRM_DEBUG_KMS(\"HDCP: Start Authentication\\n\");\n+\n+\tif (mhdp->hdcp.reauth_in_progress == 0) {\n+\t\tret = hdmi_hdcp_set_config(mhdp, hdcp_config);\n+\t\tif (ret) {\n+\t\t\tDRM_ERROR(\"hdmi_hdcp_set_config failed\\n\");\n+\t\t\treturn -1;\n+\t\t}\n+\t}\n+\n+\tmhdp->hdcp.reauth_in_progress = 0;\n+\tmhdp->hdcp.sink_is_repeater   = 0;\n+\tmhdp->hdcp.hdcp_version       = hdcp_config;\n+\n+\tdo {\n+\t\tif (mhdp->hdcp.cancel == 1) {\n+\t\t\tDRM_ERROR(\"mhdp->hdcp.cancel is TRUE\\n\");\n+\t\t\treturn -ECANCELED;\n+\t\t}\n+\n+\t\tif (hdcp_config == HDCP_TX_1)\n+\t\t\tret = hdmi_hdcp_auth_14(mhdp);\n+\t\telse\n+\t\t\tret = hdmi_hdcp_auth_22(mhdp);\n+\t\tif (ret) {\n+\t\t\tu16 hdcp_port_status;\n+\t\t\tDRM_ERROR(\"hdmi_hdcp_auth_%s failed\\n\",\n+\t\t\t\t  (hdcp_config == HDCP_TX_1) ? \"14\" : \"22\");\n+\t\t\thdcp_port_status = hdmi_hdcp_get_status(mhdp);\n+\t\t\thdmi_hdcp_handle_status(hdcp_port_status);\n+\t\t\treturn -1;\n+\t\t}\n+\n+\t\tret = hdmi_hdcp_auth_check(mhdp);\n+\t} while (ret == 1);\n+\n+\treturn ret;\n+}\n+\n+static int _hdmi_hdcp_disable(struct cdns_mhdp_device *mhdp)\n+{\n+\tint ret = 0;\n+\tu8 hdcp_cfg = (HDCP_USE_KMKEY << 4);\n+\n+\tDRM_DEBUG_KMS(\"[%s:%d] HDCP is being disabled...\\n\",\n+\t\t      mhdp->connector.base.name, mhdp->connector.base.base.id);\n+\tDRM_DEBUG_KMS(\"INFO: Disabling HDCP...\\n\");\n+\n+\tret = cdns_mhdp_hdcp_tx_config(mhdp, hdcp_cfg);\n+\tif (ret < 0)\n+\t\tDRM_DEBUG_KMS(\"cdns_mhdp_hdcp_tx_config failed\\n\");\n+\n+\tDRM_DEBUG_KMS(\"HDCP is disabled\\n\");\n+\n+\tmhdp->hdcp.events = 0;\n+\n+\treturn ret;\n+}\n+\n+static int _hdmi_hdcp_enable(struct cdns_mhdp_device *mhdp)\n+{\n+\tint i, ret = 0, tries = 9;\n+\tu8 hpd_sts;\n+\n+\thpd_sts = cdns_mhdp_read_hpd(mhdp);\n+\tif (1 != hpd_sts) {\n+\t\tdev_info(mhdp->dev, \"%s HDP detected low, set state to DISABLING\\n\", __func__);\n+\t\tmhdp->hdcp.state = HDCP_STATE_DISABLING;\n+\t\treturn -1;\n+\t}\n+\n+\tDRM_DEBUG_KMS(\"[%s:%d] HDCP is being enabled...\\n\",\n+\t\t      mhdp->connector.base.name, mhdp->connector.base.base.id);\n+\n+\tmhdp->hdcp.events = 0;\n+\n+\t/* Incase of authentication failures, HDCP spec expects reauth. */\n+\t/* TBD should this actually try 2.2 n times then 1.4? */\n+\tfor (i = 0; i < tries; i++) {\n+\t\tif (mhdp->hdcp.config & HDCP_CONFIG_2_2) {\n+\t\t\tret = hdmi_hdcp_auth(mhdp, HDCP_TX_2);\n+\t\t\tif (ret == 0)\n+\t\t\t\treturn 0;\n+\t\t\telse if (ret == -ECANCELED)\n+\t\t\t\treturn ret;\n+\t\t\t_hdmi_hdcp_disable(mhdp);\n+\t\t}\n+\t}\n+\n+\tfor (i = 0; i < tries; i++) {\n+\t\tif (mhdp->hdcp.config & HDCP_CONFIG_1_4) {\n+\t\t\tret = hdmi_hdcp_auth(mhdp, HDCP_TX_1);\n+\t\t\tif (ret == 0)\n+\t\t\t\treturn 0;\n+\t\t\telse if (ret == -ECANCELED)\n+\t\t\t\treturn ret;\n+\t\t\t_hdmi_hdcp_disable(mhdp);\n+\t\t}\n+\t\tDRM_DEBUG_KMS(\"HDCP Auth failure (%d)\\n\", ret);\n+\t}\n+\n+\tDRM_ERROR(\"HDCP authentication failed (%d tries/%d)\\n\", tries, ret);\n+\treturn ret;\n+}\n+\n+static void hdmi_hdcp_check_work(struct work_struct *work)\n+{\n+\tstruct cdns_mhdp_hdcp *hdcp = container_of(work,\n+\t\t\t\t\t     struct cdns_mhdp_hdcp, check_work.work);\n+\tstruct cdns_mhdp_device *mhdp = container_of(hdcp,\n+\t\t\t\t\t   struct cdns_mhdp_device, hdcp);\n+\n+\t/* todo: maybe we don't need to always schedule */\n+\thdmi_hdcp_check_link(mhdp);\n+\tschedule_delayed_work(&hdcp->check_work, 50);\n+}\n+\n+static void hdmi_hdcp_prop_work(struct work_struct *work)\n+{\n+\tstruct cdns_mhdp_hdcp *hdcp = container_of(work,\n+\t\t\t\t\t     struct cdns_mhdp_hdcp, prop_work);\n+\tstruct cdns_mhdp_device *mhdp = container_of(hdcp,\n+\t\t\t\t\t   struct cdns_mhdp_device, hdcp);\n+\n+\tstruct drm_device *dev = mhdp->drm_dev;\n+\tstruct drm_connector_state *state;\n+\n+\tdrm_modeset_lock(&dev->mode_config.connection_mutex, NULL);\n+\tmutex_lock(&mhdp->hdcp.mutex);\n+\n+\t/*\n+\t * This worker is only used to flip between ENABLED/DESIRED. Either of\n+\t * those to UNDESIRED is handled by core. If hdcp_value == UNDESIRED,\n+\t * we're running just after hdcp has been disabled, so just exit\n+\t */\n+\tif (mhdp->hdcp.value != DRM_MODE_CONTENT_PROTECTION_UNDESIRED) {\n+\t\tstate = mhdp->connector.base.state;\n+\t\tstate->content_protection = mhdp->hdcp.value;\n+\t}\n+\n+\tmutex_unlock(&mhdp->hdcp.mutex);\n+\tdrm_modeset_unlock(&dev->mode_config.connection_mutex);\n+}\n+\n+static void show_hdcp_supported(struct cdns_mhdp_device *mhdp)\n+{\n+\tif ((mhdp->hdcp.config & (HDCP_CONFIG_1_4 | HDCP_CONFIG_2_2)) ==\n+\t\t    (HDCP_CONFIG_1_4 | HDCP_CONFIG_2_2))\n+\t\tDRM_INFO(\"Both HDCP 1.4 and 2 2 are enabled\\n\");\n+\telse if (mhdp->hdcp.config & HDCP_CONFIG_1_4)\n+\t\tDRM_INFO(\"Only HDCP 1.4 is enabled\\n\");\n+\telse if (mhdp->hdcp.config & HDCP_CONFIG_2_2)\n+\t\tDRM_INFO(\"Only HDCP 2.2 is enabled\\n\");\n+\telse\n+\t\tDRM_INFO(\"HDCP is disabled\\n\");\n+}\n+\n+#ifdef DEBUG\n+void hdmi_hdcp_show_pairing(struct cdns_mhdp_device *mhdp, struct hdcp_trans_pairing_data *p)\n+{\n+\tchar s[80];\n+\tint i, k;\n+\n+\tDRM_INFO(\"Reveiver ID: %.2X%.2X%.2X%.2X%.2X\\n\",\n+\t\t p->receiver_id[0],\n+\t\t p->receiver_id[1],\n+\t\t p->receiver_id[2],\n+\t\t p->receiver_id[3],\n+\t\t p->receiver_id[4]);\n+\tfor (k = 0, i = 0; k < 16; k++)\n+\t\ti += snprintf(&s[i], sizeof(s), \"%02x\", p->m[k]);\n+\n+\tDRM_INFO(\"\\tm: %s\\n\", s);\n+\n+\tfor (k = 0, i = 0; k < 16; k++)\n+\t\ti += snprintf(&s[i], sizeof(s), \"%02x\", p->km[k]);\n+\n+\tDRM_INFO(\"\\tkm: %s\\n\", s);\n+\n+\tfor (k = 0, i = 0; k < 16; k++)\n+\t\ti += snprintf(&s[i], sizeof(s), \"%02x\", p->ekh[k]);\n+\n+\tDRM_INFO(\"\\tekh: %s\\n\", s);\n+}\n+#endif\n+\n+void hdmi_hdcp_dump_pairing(struct seq_file *s, void *data)\n+{\n+\tstruct cdns_mhdp_device *mhdp = data;\n+#ifdef DEBUG\n+\tint i;\n+\tfor (i = 0; i < mhdp->hdcp.num_paired; i++)\n+\t\thdmi_hdcp_show_pairing(mhdp, &mhdp->hdcp.pairing[i]);\n+#endif\n+\tseq_write(s, &mhdp->hdcp.pairing[0],\n+\t\t  mhdp->hdcp.num_paired * sizeof(struct hdcp_trans_pairing_data));\n+}\n+\n+static int hdmi_hdcp_pairing_show(struct seq_file *s, void *data)\n+{\n+\thdmi_hdcp_dump_pairing(s, s->private);\n+\treturn 0;\n+}\n+\n+static int hdmi_hdcp_dump_pairing_open(struct inode *inode, struct file *file)\n+{\n+\treturn single_open(file, hdmi_hdcp_pairing_show, inode->i_private);\n+}\n+\n+static const struct file_operations hdmi_hdcp_dump_fops = {\n+\t.open\t\t= hdmi_hdcp_dump_pairing_open,\n+\t.read\t\t= seq_read,\n+\t.llseek\t\t= seq_lseek,\n+\t.release\t= single_release,\n+};\n+\n+static void hdmi_hdcp_debugfs_init(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct dentry *d, *root;\n+\n+\troot = debugfs_create_dir(\"imx-hdcp\", NULL);\n+\tif (IS_ERR(root) || !root)\n+\t\tgoto err;\n+\n+\td = debugfs_create_file(\"dump_pairing\", 0444, root, mhdp,\n+\t\t\t\t&hdmi_hdcp_dump_fops);\n+\tif (!d)\n+\t\tgoto err;\n+\treturn;\n+\n+err:\n+\tdev_err(mhdp->dev, \"Unable to create debugfs entries\\n\");\n+}\n+\n+int cdns_hdmi_hdcp_init(struct cdns_mhdp_device *mhdp, struct device_node *of_node)\n+{\n+\tconst char *compat;\n+\tu32 temp;\n+\tint ret;\n+\n+\tret = of_property_read_string(of_node, \"compatible\", &compat);\n+\tif (ret) {\n+\t\tDRM_ERROR(\"Failed to compatible dts string\\n\");\n+\t\treturn ret;\n+\t}\n+\tif (!strstr(compat, \"hdmi\"))\n+\t\treturn -EPERM;\n+\n+\tret = of_property_read_u32(of_node, \"hdcp-config\", &temp);\n+\tif (ret) {\n+\t\t/* using highest level by default */\n+\t\tmhdp->hdcp.config = HDCP_CONFIG_2_2;\n+\t\tDRM_INFO(\"Failed to get HDCP config - using HDCP 2.2 only\\n\");\n+\t} else {\n+\t\tmhdp->hdcp.config = temp;\n+\t\tshow_hdcp_supported(mhdp);\n+\t}\n+\n+\thdmi_hdcp_debugfs_init(mhdp);\n+\n+#ifdef USE_DEBUG_KEYS  /* reserve for hdcp test key */\n+\t{\n+\t\tu8 hdcp_cfg;\n+\t\thdcp_cfg = HDCP_TX_2 | (HDCP_USE_KMKEY << 4) | (HDCP_CONTENT_TYPE_0 << 3);\n+\t\timx_hdmi_load_test_keys(mhdp, &hdcp_cfg);\n+\t}\n+#endif\n+\n+\tmhdp->hdcp.state = HDCP_STATE_INACTIVE;\n+\n+\tmutex_init(&mhdp->hdcp.mutex);\n+\tINIT_DELAYED_WORK(&mhdp->hdcp.check_work, hdmi_hdcp_check_work);\n+\tINIT_WORK(&mhdp->hdcp.prop_work, hdmi_hdcp_prop_work);\n+\n+\treturn 0;\n+}\n+\n+int cdns_hdmi_hdcp_enable(struct cdns_mhdp_device *mhdp)\n+{\n+\tint ret = 0;\n+\n+\tmhdp->hdcp.reauth_in_progress = 0;\n+\n+#ifdef STORE_PAIRING\n+\thdmi_hdcp_get_stored_pairing(mhdp);\n+#endif\n+\tmsleep(500);\n+\n+\tmutex_lock(&mhdp->hdcp.mutex);\n+\n+\tmhdp->hdcp.value = DRM_MODE_CONTENT_PROTECTION_DESIRED;\n+\tmhdp->hdcp.state = HDCP_STATE_ENABLING;\n+\tmhdp->hdcp.cancel = 0;\n+\n+\tschedule_work(&mhdp->hdcp.prop_work);\n+\tschedule_delayed_work(&mhdp->hdcp.check_work, 50);\n+\n+\tmutex_unlock(&mhdp->hdcp.mutex);\n+\n+\treturn ret;\n+}\n+\n+int cdns_hdmi_hdcp_disable(struct cdns_mhdp_device *mhdp)\n+{\n+\tint ret = 0;\n+\n+\tmutex_lock(&mhdp->hdcp.mutex);\n+\tif (mhdp->hdcp.value != DRM_MODE_CONTENT_PROTECTION_UNDESIRED) {\n+\t\tmhdp->hdcp.value = DRM_MODE_CONTENT_PROTECTION_UNDESIRED;\n+\t\tmhdp->hdcp.state = HDCP_STATE_DISABLING;\n+\t\tmhdp->hdcp.cancel = 1;\n+\t\tschedule_work(&mhdp->hdcp.prop_work);\n+\t}\n+\n+\tmutex_unlock(&mhdp->hdcp.mutex);\n+\n+\tcancel_delayed_work_sync(&mhdp->hdcp.check_work);\n+\n+\treturn ret;\n+}\n+\n+void cdns_hdmi_hdcp_atomic_check(struct drm_connector *connector,\n+\t\t\t   struct drm_connector_state *old_state,\n+\t\t\t   struct drm_connector_state *new_state)\n+{\n+\tu64 old_cp = old_state->content_protection;\n+\tu64 new_cp = new_state->content_protection;\n+\tstruct drm_crtc_state *crtc_state;\n+\n+\tif (!new_state->crtc) {\n+\t\t/*\n+\t\t * If the connector is being disabled with CP enabled, mark it\n+\t\t * desired so it's re-enabled when the connector is brought back\n+\t\t */\n+\t\tif (old_cp == DRM_MODE_CONTENT_PROTECTION_ENABLED)\n+\t\t\tnew_state->content_protection =\n+\t\t\t\tDRM_MODE_CONTENT_PROTECTION_DESIRED;\n+\t\treturn;\n+\t}\n+\n+\t/*\n+\t * Nothing to do if the state didn't change, or HDCP was activated since\n+\t * the last commit\n+\t */\n+\tif (old_cp == new_cp ||\n+\t    (old_cp == DRM_MODE_CONTENT_PROTECTION_DESIRED &&\n+\t     new_cp == DRM_MODE_CONTENT_PROTECTION_ENABLED))\n+\t\treturn;\n+\n+\tcrtc_state = drm_atomic_get_new_crtc_state(new_state->state, new_state->crtc);\n+\tcrtc_state->mode_changed = true;\n+}\n+\n+static int hdmi_hdcp_check_link(struct cdns_mhdp_device *mhdp)\n+{\n+\tu16 hdcp_port_status = 0;\n+\tu8 hdcp_last_error = 0;\n+\tu8 hpd_sts;\n+\tint ret = 0;\n+\n+\tmhdp->hdcp.reauth_in_progress = 0;\n+\tmutex_lock(&mhdp->lock);\n+\n+\tif ((mhdp->hdcp.state == HDCP_STATE_AUTHENTICATED)  ||\n+\t\t(mhdp->hdcp.state == HDCP_STATE_AUTHENTICATING) ||\n+\t\t(mhdp->hdcp.state == HDCP_STATE_REAUTHENTICATING) ||\n+\t\t(mhdp->hdcp.state == HDCP_STATE_ENABLING)) {\n+\n+\t\t/* In active states, check the HPD signal. Because of the IRQ\n+\t\t * debounce delay, the state might not reflect the disconnection.\n+\t\t * The FW could already have detected the HDP down and reported error */\n+\t   hpd_sts = cdns_mhdp_read_hpd(mhdp);\n+\t\tif (1 != hpd_sts)\n+\t\t\tmhdp->hdcp.state = HDCP_STATE_DISABLING;\n+\t}\n+\n+\tif (mhdp->hdcp.state == HDCP_STATE_INACTIVE)\n+\t\tgoto out;\n+\n+\tif (mhdp->hdcp.state == HDCP_STATE_DISABLING) {\n+\t\t_hdmi_hdcp_disable(mhdp);\n+\t\tmhdp->hdcp.state = HDCP_STATE_INACTIVE;\n+\t\tgoto out;\n+\t}\n+\n+/* TODO items:\n+    Need to make sure that any requests from the firmware are actually\n+    processed so want to remove this first jump to 'out', i.e. process\n+    reauthentication requests, cleanup errors and repeater receiver id\n+    checks.\n+*/\n+\tif (mhdp->hdcp.state == HDCP_STATE_AUTHENTICATED) {\n+\t\t/* get port status */\n+\t\thdcp_port_status = hdmi_hdcp_get_status(mhdp);\n+\t\thdcp_last_error = GET_HDCP_PORT_STS_LAST_ERR(hdcp_port_status);\n+\t\tif (hdcp_last_error == HDCP_TRAN_ERR_REAUTH_REQ) {\n+\t\t\tDRM_INFO(\"Sink requesting re-authentication\\n\");\n+\t\t\tmhdp->hdcp.state = HDCP_STATE_REAUTHENTICATING;\n+\t\t} else if (hdcp_last_error) {\n+\t\t\tDRM_ERROR(\"HDCP error no: %u\\n\", hdcp_last_error);\n+\n+\t\t\tif (mhdp->hdcp.value == DRM_MODE_CONTENT_PROTECTION_UNDESIRED)\n+\t\t\t\tgoto out;\n+\t\t\tif (hdcp_port_status &  HDCP_PORT_STS_AUTH) {\n+\t\t\t\tif (mhdp->hdcp.value !=\n+\t\t\t\t\t    DRM_MODE_CONTENT_PROTECTION_UNDESIRED) {\n+\t\t\t\t\tmhdp->hdcp.value =\n+\t\t\t\t\t\tDRM_MODE_CONTENT_PROTECTION_ENABLED;\n+\t\t\t\t\tschedule_work(&mhdp->hdcp.prop_work);\n+\t\t\t\t\tgoto out;\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\tmhdp->hdcp.state = HDCP_STATE_AUTH_FAILED;\n+\n+\t\t} else if (mhdp->hdcp.sink_is_repeater) {\n+\t\t\tu8 new_events;\n+\t\t\t/* Check events... and process if HDCPTX_IS_RECEIVER_ID_VALID_EVENT. */\n+\t\t\tnew_events = cdns_mhdp_get_event(mhdp);\n+\t\t\tmhdp->hdcp.events |= new_events;\n+\t\t\tif (check_event(mhdp->hdcp.events, HDCPTX_IS_RECEIVER_ID_VALID_EVENT)) {\n+\t\t\t\tDRM_INFO(\"Sink repeater updating receiver ID list...\\n\");\n+\t\t\t\tif (hdmi_hdcp_check_receviers(mhdp))\n+\t\t\t\t\tmhdp->hdcp.state = HDCP_STATE_AUTH_FAILED;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\tif (mhdp->hdcp.state == HDCP_STATE_REAUTHENTICATING) {\n+\t\t/* For now just deal with HDCP2.2 */\n+\t\tif (mhdp->hdcp.hdcp_version == HDCP_TX_2)\n+\t\t\tmhdp->hdcp.reauth_in_progress = 1;\n+\t\telse\n+\t\t\tmhdp->hdcp.state = HDCP_STATE_AUTH_FAILED;\n+\t}\n+\n+\tif (mhdp->hdcp.state == HDCP_STATE_ENABLING) {\n+\t\tmhdp->hdcp.state = HDCP_STATE_AUTHENTICATING;\n+\t\tret = _hdmi_hdcp_enable(mhdp);\n+\t\tif (ret == -ECANCELED)\n+\t\t\tgoto out;\n+\t\telse if (ret) {\n+\t\t\tDRM_ERROR(\"Failed to enable hdcp (%d)\\n\", ret);\n+\t\t\tmhdp->hdcp.value = DRM_MODE_CONTENT_PROTECTION_DESIRED;\n+\t\t\tschedule_work(&mhdp->hdcp.prop_work);\n+\t\t\tgoto out;\n+\t\t}\n+\t}\n+\n+\tif ((mhdp->hdcp.state == HDCP_STATE_AUTH_FAILED) ||\n+\t\t\t(mhdp->hdcp.state == HDCP_STATE_REAUTHENTICATING)) {\n+\n+\t\tprint_port_status(hdcp_port_status);\n+\t\tif (mhdp->hdcp.state == HDCP_STATE_AUTH_FAILED) {\n+\t\t\tDRM_DEBUG_KMS(\"[%s:%d] HDCP link failed, retrying authentication 0x%2x\\n\",\n+\t\t\t\t      mhdp->connector.base.name, mhdp->connector.base.base.id, hdcp_port_status);\n+\t\t\tret = _hdmi_hdcp_disable(mhdp);\n+\t\t\tif (ret) {\n+\t\t\t\tDRM_ERROR(\"Failed to disable hdcp (%d)\\n\", ret);\n+\t\t\t\tmhdp->hdcp.value = DRM_MODE_CONTENT_PROTECTION_DESIRED;\n+\t\t\t\tschedule_work(&mhdp->hdcp.prop_work);\n+\t\t\t\tgoto out;\n+\t\t\t}\n+\t\t} else\n+\t\t\tDRM_DEBUG_KMS(\"[%s:%d] HDCP attempt reauthentication 0x%2x\\n\",\n+\t\t\t\t      mhdp->connector.base.name, mhdp->connector.base.base.id, hdcp_port_status);\n+\n+\t\tret = _hdmi_hdcp_enable(mhdp);\n+\t\tif (ret == -ECANCELED)\n+\t\t\tgoto out;\n+\t\telse if (ret) {\n+\t\t\tDRM_ERROR(\"Failed to enable hdcp (%d)\\n\", ret);\n+\t\t\tmhdp->hdcp.value = DRM_MODE_CONTENT_PROTECTION_DESIRED;\n+\t\t\tschedule_work(&mhdp->hdcp.prop_work);\n+\t\t\tgoto out;\n+\t\t}\n+\t}\n+\n+out:\n+\tmutex_unlock(&mhdp->lock);\n+\n+\treturn ret;\n+}\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdcp.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdcp.c\nnew file mode 100644\nindex 000000000000..587c5f953489\n--- /dev/null\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdcp.c\n@@ -0,0 +1,300 @@\n+/*\n+ * Cadence HDCP API driver\n+ *\n+ * Copyright (C) 2021 NXP Semiconductor, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ */\n+\n+#include <asm/unaligned.h>\n+#include <drm/bridge/cdns-mhdp.h>\n+#include <drm/drm_print.h>\n+\n+#include \"cdns-mhdp.h\"\n+\n+static u32 mhdp_hdcp_bus_read(struct cdns_mhdp_device *mhdp, u32 offset)\n+{\n+\tu32 val;\n+\n+\tmutex_lock(&mhdp->iolock);\n+\n+\tif (mhdp->bus_type == BUS_TYPE_LOW4K_APB) {\n+\t\t/* Remap address to low 4K APB bus */\n+\t\twritel(offset >> 12, mhdp->regs_sec + 8);\n+\t\tval = readl((offset & 0xfff) + mhdp->regs_base);\n+\t} else if (mhdp->bus_type == BUS_TYPE_NORMAL_APB)\n+\t\tval = readl(mhdp->regs_sec + offset);\n+\n+\tmutex_unlock(&mhdp->iolock);\n+\n+\treturn val;\n+}\n+\n+static void mhdp_hdcp_bus_write(u32 val, struct cdns_mhdp_device *mhdp, u32 offset)\n+{\n+\tmutex_lock(&mhdp->iolock);\n+\n+\tif (mhdp->bus_type == BUS_TYPE_LOW4K_APB) {\n+\t\t/* Remap address to low 4K APB bus */\n+\t\twritel(offset >> 12, mhdp->regs_sec + 8);\n+\t\twritel(val, (offset & 0xfff) + mhdp->regs_base);\n+\t} else if (mhdp->bus_type == BUS_TYPE_NORMAL_APB)\n+\t\twritel(val, mhdp->regs_sec + offset);\n+\n+\tmutex_unlock(&mhdp->iolock);\n+}\n+\n+static int mhdp_hdcp_mailbox_read(struct cdns_mhdp_device *mhdp)\n+{\n+\tint val, ret;\n+\n+\tret = mhdp_readx_poll_timeout(mhdp_hdcp_bus_read, mhdp, MAILBOX_EMPTY_ADDR,\n+\t\t\t\t val, !val, MAILBOX_RETRY_US,\n+\t\t\t\t MAILBOX_TIMEOUT_US);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\treturn mhdp_hdcp_bus_read(mhdp, MAILBOX0_RD_DATA) & 0xff;\n+}\n+\n+static int mhdp_hdcp_mailbox_write(struct cdns_mhdp_device *mhdp, u8 val)\n+{\n+\tint ret, full;\n+\n+\tret = mhdp_readx_poll_timeout(mhdp_hdcp_bus_read, mhdp, MAILBOX_FULL_ADDR,\n+\t\t\t\t full, !full, MAILBOX_RETRY_US,\n+\t\t\t\t MAILBOX_TIMEOUT_US);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tmhdp_hdcp_bus_write(val, mhdp, MAILBOX0_WR_DATA);\n+\n+\treturn 0;\n+}\n+\n+static int mhdp_hdcp_mailbox_validate_receive(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\t      u8 module_id, u8 opcode, u16 req_size)\n+{\n+\tu32 mbox_size, i;\n+\tu8 header[4];\n+\tint ret;\n+\n+\t/* read the header of the message */\n+\tfor (i = 0; i < 4; i++) {\n+\t\tret = mhdp_hdcp_mailbox_read(mhdp);\n+\t\tif (ret < 0)\n+\t\t\treturn ret;\n+\n+\t\theader[i] = ret;\n+\t}\n+\n+\tmbox_size = get_unaligned_be16(header + 2);\n+\n+\tif (opcode != header[0] || module_id != header[1] ||\n+\t    req_size != mbox_size) {\n+\t\t/*\n+\t\t * If the message in mailbox is not what we want, we need to\n+\t\t * clear the mailbox by reading its contents.\n+\t\t */\n+\t\tfor (i = 0; i < mbox_size; i++)\n+\t\t\tif (mhdp_hdcp_mailbox_read(mhdp) < 0)\n+\t\t\t\tbreak;\n+\n+\t\treturn -EINVAL;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int mhdp_hdcp_mailbox_read_receive(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\t  u8 *buff, u16 buff_size)\n+{\n+\tu32 i;\n+\tint ret;\n+\n+\tfor (i = 0; i < buff_size; i++) {\n+\t\tret = mhdp_hdcp_mailbox_read(mhdp);\n+\t\tif (ret < 0)\n+\t\t\treturn ret;\n+\n+\t\tbuff[i] = ret;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int mhdp_hdcp_mailbox_send(struct cdns_mhdp_device *mhdp, u8 module_id,\n+\t\t\t\t  u8 opcode, u16 size, u8 *message)\n+{\n+\tu8 header[4];\n+\tint ret, i;\n+\n+\theader[0] = opcode;\n+\theader[1] = module_id;\n+\tput_unaligned_be16(size, header + 2);\n+\n+\tfor (i = 0; i < 4; i++) {\n+\t\tret = mhdp_hdcp_mailbox_write(mhdp, header[i]);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n+\tfor (i = 0; i < size; i++) {\n+\t\tret = mhdp_hdcp_mailbox_write(mhdp, message[i]);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+/* HDCP API */\n+int cdns_mhdp_hdcp_tx_config(struct cdns_mhdp_device *mhdp, u8 config)\n+{\n+\treturn mhdp_hdcp_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX,\n+\t\t\t\t     HDCP_TX_CONFIGURATION, sizeof(config), &config);\n+}\n+EXPORT_SYMBOL(cdns_mhdp_hdcp_tx_config);\n+\n+int cdns_mhdp_hdcp2_tx_respond_km(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\tu8 *msg, u16 len)\n+{\n+\treturn mhdp_hdcp_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX,\n+\t\t\t\t      HDCP2_TX_RESPOND_KM, len, msg);\n+}\n+EXPORT_SYMBOL(cdns_mhdp_hdcp2_tx_respond_km);\n+\n+int cdns_mhdp_hdcp_tx_status_req(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\tu8 *status, u16 len)\n+{\n+\tint ret;\n+\n+\tret = mhdp_hdcp_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX,\n+\t\t\t\t     HDCP_TX_STATUS_CHANGE, 0, NULL);\n+\tif (ret)\n+\t\tgoto err_tx_req;\n+\n+\tret = mhdp_hdcp_mailbox_validate_receive(mhdp, MB_MODULE_ID_HDCP_TX,\n+\t\t\t\t\t\t HDCP_TX_STATUS_CHANGE, len);\n+\tif (ret)\n+\t\tgoto err_tx_req;\n+\n+\tret = mhdp_hdcp_mailbox_read_receive(mhdp, status, len);\n+\tif (ret)\n+\t\tgoto err_tx_req;\n+\n+err_tx_req:\n+\tif (ret)\n+\t\tDRM_ERROR(\"hdcp tx status req failed: %d\\n\", ret);\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_hdcp_tx_status_req);\n+\n+int cdns_mhdp_hdcp2_tx_is_km_stored_req(struct cdns_mhdp_device *mhdp, u8 *data, u16 len)\n+{\n+\tint ret;\n+\n+\tret = mhdp_hdcp_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX,\n+\t\t\t\t      HDCP2_TX_IS_KM_STORED, 0, NULL);\n+\tif (ret)\n+\t\tgoto err_is_km;\n+\n+\tret = mhdp_hdcp_mailbox_validate_receive(mhdp, MB_MODULE_ID_HDCP_TX,\n+\t\t\t\t      HDCP2_TX_IS_KM_STORED, len);\n+\tif (ret)\n+\t\tgoto err_is_km;\n+\n+\tret = mhdp_hdcp_mailbox_read_receive(mhdp, data, len);\n+\n+err_is_km:\n+\tif (ret)\n+\t\tDRM_ERROR(\"hdcp2 tx is km stored req failed: %d\\n\", ret);\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_hdcp2_tx_is_km_stored_req);\n+\n+int cdns_mhdp_hdcp2_tx_store_km(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\tu8 *resp, u16 len)\n+{\n+\tint ret;\n+\n+\tret = mhdp_hdcp_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX,\n+\t\t\t\t      HDCP2_TX_STORE_KM, 0, NULL);\n+\tif (ret)\n+\t\tgoto err_store_km;\n+\n+\tret = mhdp_hdcp_mailbox_validate_receive(mhdp, MB_MODULE_ID_HDCP_TX,\n+\t\t\t\t      HDCP2_TX_STORE_KM, len);\n+\tif (ret)\n+\t\tgoto err_store_km;\n+\n+\tret = mhdp_hdcp_mailbox_read_receive(mhdp, resp, len);\n+\n+err_store_km:\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_hdcp2_tx_store_km);\n+\n+int cdns_mhdp_hdcp_tx_is_receiver_id_valid(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\tu8 *rx_id, u8 *num)\n+{\n+\tu32 mbox_size, i;\n+\tu8 header[4];\n+\tu8 temp;\n+\tint ret;\n+\n+\tret = mhdp_hdcp_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX,\n+\t\t\t\t      HDCP_TX_IS_RECEIVER_ID_VALID, 0, NULL);\n+\tif (ret)\n+\t\tgoto err_rx_id;\n+\n+\t/* read the header of the message */\n+\tfor (i = 0; i < 4; i++) {\n+\t\tret = mhdp_hdcp_mailbox_read(mhdp);\n+\t\tif (ret < 0)\n+\t\t\treturn ret;\n+\n+\t\theader[i] = ret;\n+\t}\n+\n+\tmbox_size = get_unaligned_be16(header + 2);\n+\n+\tif (HDCP_TX_IS_RECEIVER_ID_VALID != header[0] ||\n+\t\t\tMB_MODULE_ID_HDCP_TX != header[1])\n+\t\treturn -EINVAL;\n+\n+\t/* First get num of receivers */\n+\tret = mhdp_hdcp_mailbox_read_receive(mhdp, num, 1);\n+\tif (ret)\n+\t\tgoto err_rx_id;\n+\n+\t/* skip second data */\n+\tret = mhdp_hdcp_mailbox_read_receive(mhdp, &temp, 1);\n+\tif (ret)\n+\t\tgoto err_rx_id;\n+\n+\t/* get receivers ID */\n+\tret = mhdp_hdcp_mailbox_read_receive(mhdp, rx_id, mbox_size - 2);\n+\n+err_rx_id:\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(cdns_mhdp_hdcp_tx_is_receiver_id_valid);\n+\n+int cdns_mhdp_hdcp_tx_respond_receiver_id_valid(\n+\t\t\t\tstruct cdns_mhdp_device *mhdp, u8 val)\n+{\n+\treturn mhdp_hdcp_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX,\n+\t\t\t\t      HDCP_TX_RESPOND_RECEIVER_ID_VALID, sizeof(val), &val);\n+}\n+EXPORT_SYMBOL(cdns_mhdp_hdcp_tx_respond_receiver_id_valid);\n+\n+int cdns_mhdp_hdcp_tx_reauth(struct cdns_mhdp_device *mhdp, u8 msg)\n+{\n+\treturn mhdp_hdcp_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX,\n+\t\t\t\t     HDCP_TX_DO_AUTH_REQ, sizeof(msg), &msg);\n+}\n+EXPORT_SYMBOL(cdns_mhdp_hdcp_tx_reauth);\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdcp.h b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdcp.h\nnew file mode 100644\nindex 000000000000..4ce76dd1ee58\n--- /dev/null\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdcp.h\n@@ -0,0 +1,36 @@\n+/*\n+ * Copyright (C) 2021 NXP Semiconductor, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ *\n+ */\n+\n+#ifndef CDNS_HDMI_HDCP_H\n+#define CDNS_HDMI_HDCP_H\n+\n+int cdns_mhdp_hdcp2_tx_respond_km(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\tu8 *msg, u16 len);\n+int cdns_mhdp_hdcp_tx_config(struct cdns_mhdp_device *mhdp, u8 config);\n+int cdns_mhdp_hdcp_tx_status_req(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\tu8 *status, u16 len);\n+int cdns_mhdp_hdcp2_tx_is_km_stored_req(struct cdns_mhdp_device *mhdp, u8 *data, u16 len);\n+int cdns_mhdp_hdcp2_tx_store_km(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\tu8 *reg, u16 len);\n+int cdns_mhdp_hdcp_tx_is_receiver_id_valid(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\tu8 *rx_id, u8 *num);\n+int cdns_mhdp_hdcp_tx_respond_receiver_id_valid(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\tu8 val);\n+int cdns_mhdp_hdcp_tx_test_keys(struct cdns_mhdp_device *mhdp, u8 type, u8 resp);\n+int cdns_mhdp_hdcp_tx_reauth(struct cdns_mhdp_device *mhdp, u8 msg);\n+\n+int cdns_hdmi_hdcp_init(struct cdns_mhdp_device *mhdp, struct device_node *of_node);\n+int cdns_hdmi_hdcp_enable(struct cdns_mhdp_device *mhdp);\n+int cdns_hdmi_hdcp_disable(struct cdns_mhdp_device *mhdp);\n+void cdns_hdmi_hdcp_atomic_check(struct drm_connector *connector,\n+\t\t\t   struct drm_connector_state *old_state,\n+\t\t\t   struct drm_connector_state *new_state);\n+\n+#endif /* CDNS_HDMI_HDCP_H */\ndiff --git a/include/drm/bridge/cdns-mhdp.h b/include/drm/bridge/cdns-mhdp.h\nindex 338fa55b8bdf..5752c47b1a16 100644\n--- a/include/drm/bridge/cdns-mhdp.h\n+++ b/include/drm/bridge/cdns-mhdp.h\n@@ -388,6 +388,27 @@\n #define HDMI_TX_TEST\t\t\t\t0xBB\n #define HDMI_TX_EDID_INTERNAL\t\t0xF0\n \n+/* HDCP General opcode */\n+#define HDCP_GENERAL_SET_LC_128\t\t0x00\n+#define HDCP_GENERAL_SET_SEED\t\t0x01\n+\n+/* HDCP TX opcode */\n+#define HDCP_TX_CONFIGURATION\t\t\t\t0x00\n+#define HDCP2_TX_SET_PUBLIC_KEY_PARAMS\t\t0x01\n+#define HDCP2_TX_SET_DEBUG_RANDOM_NUMBERS\t0x02\n+#define HDCP2_TX_RESPOND_KM\t\t\t\t\t0x03\n+#define HDCP1_TX_SEND_KEYS\t\t\t\t\t0x04\n+#define HDCP1_TX_SEND_RANDOM_AN\t\t\t\t0x05\n+#define HDCP_TX_STATUS_CHANGE\t\t\t\t0x06\n+#define HDCP2_TX_IS_KM_STORED\t\t\t\t0x07\n+#define HDCP2_TX_STORE_KM\t\t\t\t\t0x08\n+#define HDCP_TX_IS_RECEIVER_ID_VALID\t\t0x09\n+#define HDCP_TX_RESPOND_RECEIVER_ID_VALID\t0x0A\n+#define HDCP_TX_TEST_KEYS\t\t\t\t\t0x0B\n+#define HDCP2_TX_SET_KM_KEY_PARAMS\t\t\t0x0C\n+#define HDCP_TX_SET_CP_IRQ\t\t\t\t\t0x0D\n+#define HDCP_TX_DO_AUTH_REQ\t\t\t\t\t0x0E\n+\n #define FW_STANDBY\t\t\t\t0\n #define FW_ACTIVE\t\t\t\t1\n \n@@ -428,12 +449,16 @@\n #define EQ_PHASE_FAILED\t\t\t\tBIT(6)\n #define FASE_LT_FAILED\t\t\t\tBIT(7)\n \n-#define DPTX_HPD_EVENT\t\t\t\tBIT(0)\n-#define DPTX_TRAINING_EVENT\t\t\tBIT(1)\n-#define HDCP_TX_STATUS_EVENT\t\t\tBIT(4)\n-#define HDCP2_TX_IS_KM_STORED_EVENT\t\tBIT(5)\n-#define HDCP2_TX_STORE_KM_EVENT\t\t\tBIT(6)\n-#define HDCP_TX_IS_RECEIVER_ID_VALID_EVENT\tBIT(7)\n+#define DPTX_HPD_EVENT\t\t\t\t\t\t   BIT(0)\n+#define HDMI_TX_HPD_EVENT\t\t\t\t\t   BIT(0)\n+#define HDMI_RX_5V_EVENT\t\t\t\t\t   BIT(0)\n+#define DPTX_TRAINING_EVENT\t\t\t\t\t   BIT(1)\n+#define HDMI_RX_SCDC_CHANGE_EVENT\t\t\t   BIT(1)\n+#define HDCPTX_STATUS_EVENT\t\t\t\t\t   BIT(4)\n+#define HDCPRX_STATUS_EVENT\t\t\t\t\t   BIT(4)\n+#define HDCPTX_IS_KM_STORED_EVENT\t\t\t   BIT(5)\n+#define HDCPTX_STORE_KM_EVENT\t\t\t\t   BIT(6)\n+#define HDCPTX_IS_RECEIVER_ID_VALID_EVENT\t   BIT(7)\n \n #define TU_SIZE\t\t\t\t\t30\n #define CDNS_DP_MAX_LINK_RATE\t540000\n@@ -442,6 +467,7 @@\n #define F_VIF_DATA_WIDTH(x) (((x) & ((1 << 2) - 1)) << 2)\n #define F_HDMI_MODE(x) (((x) & ((1 << 2) - 1)) << 0)\n #define F_GCP_EN(x) (((x) & ((1 << 1) - 1)) << 12)\n+#define F_CLEAR_AVMUTE(x) (((x) & ((1 << 1) - 1)) << 14)\n #define F_DATA_EN(x) (((x) & ((1 << 1) - 1)) << 15)\n #define F_HDMI2_PREAMBLE_EN(x) (((x) & ((1 << 1) - 1)) << 18)\n #define F_PIC_3D(x) (((x) & ((1 << 4) - 1)) << 7)\n@@ -662,6 +688,55 @@ struct cdns_plat_data {\n \tchar *plat_name;\n };\n \n+/* HDCP */\n+#define MAX_STORED_KM 64\n+#define HDCP_PAIRING_M_LEN 16\n+#define HDCP_PAIRING_M_EKH 16\n+#define HDCP_PAIRING_R_ID 5\n+\n+/* HDCP2_TX_SET_DEBUG_RANDOM_NUMBERS */\n+#define DEBUG_RANDOM_NUMBERS_KM_LEN 16\n+#define DEBUG_RANDOM_NUMBERS_RN_LEN 8\n+#define DEBUG_RANDOM_NUMBERS_KS_LEN 16\n+#define DEBUG_RANDOM_NUMBERS_RIV_LEN 8\n+#define DEBUG_RANDOM_NUMBERS_RTX_LEN 8\n+\n+struct hdcp_trans_pairing_data {\n+\tu8 receiver_id[HDCP_PAIRING_R_ID];\n+\tu8 m[HDCP_PAIRING_M_LEN];\n+\tu8 km[DEBUG_RANDOM_NUMBERS_KM_LEN];\n+\tu8 ekh[HDCP_PAIRING_M_EKH];\n+};\n+\n+enum hdmi_hdcp_state {\n+\tHDCP_STATE_NO_AKSV,\n+\tHDCP_STATE_INACTIVE,\n+\tHDCP_STATE_ENABLING,\n+\tHDCP_STATE_AUTHENTICATING,\n+\tHDCP_STATE_REAUTHENTICATING,\n+\tHDCP_STATE_AUTHENTICATED,\n+\tHDCP_STATE_DISABLING,\n+\tHDCP_STATE_AUTH_FAILED\n+};\n+\n+struct cdns_mhdp_hdcp {\n+\tstruct mutex mutex;\n+\tu64 value; /* protected by hdcp_mutex */\n+\tstruct delayed_work check_work;\n+\tstruct work_struct prop_work;\n+\tu8 state;\n+\tu8 cancel;\n+\tu8 bus_type;\n+\tu8 config;\n+\tstruct hdcp_trans_pairing_data pairing[MAX_STORED_KM];\n+\tu8 num_paired;\n+\n+\tu8 events;\n+\tu8 sink_is_repeater;\n+\tu8 reauth_in_progress;\n+\tu8 hdcp_version;\n+};\n+\n struct cdns_mhdp_device {\n \tvoid __iomem\t\t*regs_base;\n \tvoid __iomem\t\t*regs_sec;\n@@ -669,6 +744,7 @@ struct cdns_mhdp_device {\n \tint bus_type;\n \n \tstruct device\t\t*dev;\n+\tstruct drm_device *drm_dev;\n \n \tstruct cdns_mhdp_connector  connector;\n \tstruct clk\t\t*spdif_clk;\n@@ -722,6 +798,7 @@ struct cdns_mhdp_device {\n \thdmi_codec_plugged_cb plugged_cb;\n \tstruct device *codec_dev;\n \tenum drm_connector_status last_connector_result;\n+\tstruct cdns_mhdp_hdcp hdcp;\n };\n \n u32 cdns_mhdp_bus_read(struct cdns_mhdp_device *mhdp, u32 offset);\n@@ -742,6 +819,7 @@ int cdns_mhdp_get_edid_block(void *mhdp, u8 *edid,\n int cdns_mhdp_train_link(struct cdns_mhdp_device *mhdp);\n int cdns_mhdp_set_video_status(struct cdns_mhdp_device *mhdp, int active);\n int cdns_mhdp_config_video(struct cdns_mhdp_device *mhdp);\n+int cdns_mhdp_apb_conf(struct cdns_mhdp_device *mhdp, u8 sel);\n \n /* Audio */\n int cdns_mhdp_audio_stop(struct cdns_mhdp_device *mhdp,\n@@ -770,8 +848,6 @@ int cdns_mhdp_mailbox_read_receive(struct cdns_mhdp_device *mhdp,\n int cdns_mhdp_mailbox_validate_receive(struct cdns_mhdp_device *mhdp,\n \t\t\t\t\t      u8 module_id, u8 opcode,\n \t\t\t\t\t      u16 req_size);\n-int cdns_mhdp_mailbox_read(struct cdns_mhdp_device *mhdp);\n-\n void cdns_mhdp_infoframe_set(struct cdns_mhdp_device *mhdp,\n \t\t\t\t\tu8 entry_id, u8 packet_len, u8 *packet, u8 packet_type);\n int cdns_hdmi_get_edid_block(void *data, u8 *edid, u32 block, size_t length);\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0021-LF-3272-drm-cdns_mhdp-fix-Coverity-Issue-11566406.patch",
    "content": "From 2a093769a29f03103195b34c269411ee21b646e2 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Wed, 20 Jan 2021 10:37:09 +0800\nSubject: [PATCH 21/49] LF-3272: drm: cdns_mhdp: fix Coverity Issue: 11566406\n\nAdd default access hdcp bus to fix\nCoverity Issue: 11566406 Uninitialized scalar variable.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdcp.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdcp.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdcp.c\nindex 587c5f953489..b3c931382013 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdcp.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-hdcp.c\n@@ -27,6 +27,8 @@ static u32 mhdp_hdcp_bus_read(struct cdns_mhdp_device *mhdp, u32 offset)\n \t\tval = readl((offset & 0xfff) + mhdp->regs_base);\n \t} else if (mhdp->bus_type == BUS_TYPE_NORMAL_APB)\n \t\tval = readl(mhdp->regs_sec + offset);\n+\telse\n+\t\tval = readl(mhdp->regs_base + offset);\n \n \tmutex_unlock(&mhdp->iolock);\n \n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0022-LF-3271-drm-cdns-hdmi-fix-Coverity-Issue-11566407.patch",
    "content": "From 85ad1a878118a8dbaf9da5f85a2e088880d5ea01 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Wed, 20 Jan 2021 10:44:17 +0800\nSubject: [PATCH 22/49] LF-3271: drm: cdns-hdmi: fix Coverity Issue: 11566407\n\nDelete dead code to fix Coverity Issue: 11566407.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\nindex dc393f6b75e7..a89c8cba4788 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n@@ -150,7 +150,6 @@ ssize_t HDCPTX_Status_store(struct device *dev,\n     else\n \t\tdev_err(dev, \"%s &hdp->state invalid\\n\", __func__);\n \t\treturn -1;\n-    return count;\n }\n \n static void hdmi_sink_config(struct cdns_mhdp_device *mhdp)\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0023-LF-3270-drm-cdns-hdmi-fix-coverity-Issue-11566405.patch",
    "content": "From ddfa5aeb97c12fb7a67e6507ef2ae051658f112b Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Wed, 20 Jan 2021 10:49:13 +0800\nSubject: [PATCH 23/49] LF-3270: drm: cdns-hdmi: fix coverity Issue: 11566405\n\nDelete unused code to fix coverity Issue: 11566405.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\nindex a89c8cba4788..2300c3d8a91d 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n@@ -37,17 +37,15 @@ static struct device_attribute HDCPTX_do_reauth = __ATTR_WO(HDCPTX_do_reauth);\n static ssize_t HDCPTX_do_reauth_store(struct device *dev,\n \t\t\tstruct device_attribute *attr, const char *buf, size_t count)\n {\n-    int value, ret;\n+    int ret;\n \tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n \n \tret = cdns_mhdp_hdcp_tx_reauth(mhdp, 1);\n-\n-\tsscanf(buf, \"%d\", &value);\n-\n     if (ret < 0) {\n \t\tdev_err(dev, \"%s cdns_mhdp_hdcp_tx_reauth failed\\n\", __func__);\n \t\treturn -1;\n \t}\n+\n \treturn count;\n }\n \n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0024-LF-3269-drm-cdns-hdmi-fix-coverity-Issue-11566404.patch",
    "content": "From 2812d071eb348d903620f7ebadaf848024b3c672 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Wed, 20 Jan 2021 11:04:41 +0800\nSubject: [PATCH 24/49] LF-3269: drm: cdns-hdmi: fix coverity Issue: 11566404\n\nCheck return value to fix coverity Issue: 11566404.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\nindex 2300c3d8a91d..df8ac87b3a54 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n@@ -59,9 +59,12 @@ static ssize_t HDCPTX_Version_store(struct device *dev,\n \t\t\tstruct device_attribute *attr, const char *buf, size_t count)\n {\n \tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n-\tint value;\n+\tint value, ret;\n+\n+\tret = sscanf(buf, \"%d\", &value);\n+\tif (ret != 1)\n+\t\treturn -EINVAL;\n \n-\tsscanf(buf, \"%d\", &value);\n \tif (value == 2)\n \t\tmhdp->hdcp.config = 2;\n \telse if (value == 1)\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0025-LF-3268-drm-cdns-hdmi-fix-Coverity-Issue-11566403.patch",
    "content": "From cd49375db5c05acb824fa18ae9d19290073cda08 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Wed, 20 Jan 2021 11:07:32 +0800\nSubject: [PATCH 25/49] LF-3268: drm: cdns-hdmi: fix Coverity Issue: 11566403\n\nCheck return value to fix Coverity Issue: 11566403.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\nindex df8ac87b3a54..28193178140f 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\n@@ -119,10 +119,13 @@ ssize_t HDCPTX_Status_store(struct device *dev,\n \t\t\tstruct device_attribute *attr, const char *buf, size_t count)\n {\n \tstruct cdns_mhdp_device *mhdp = dev_get_drvdata(dev);\n-\tint value;\n+\tint value, ret;\n \n \tif (count == 2) {\n-\t\tsscanf(buf, \"%d\", &value);\n+\t\tret = sscanf(buf, \"%d\", &value);\n+\t\tif (ret != 1)\n+\t\t\treturn -EINVAL;\n+\n \t\tif ((value >= HDCP_STATE_NO_AKSV) && (value <= HDCP_STATE_AUTH_FAILED)) {\n \t\t\tmhdp->hdcp.state = value;\n \t\t\treturn count;\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0026-LF-3367-1-drm-cdns_hdmi-HDCP_STATE_DISABLING-may-mis.patch",
    "content": "From 54a5d4d3ba2de923fa4a4e5ef5e90151fb7f2fd8 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Thu, 18 Feb 2021 16:25:52 +0800\nSubject: [PATCH 26/49] LF-3367-1: drm: cdns_hdmi: HDCP_STATE_DISABLING may\n missed by check link\n\nPolling thread check_work is designed to handle all hdcp state change.\nIn HDCP disable function, check_work thread will be stopped after\nhdcp.state is set to HDCP_STATE_DISABLING. check_work thread may miss\nthe state change, call check link function make sure HDCP_STATE_DISABLING\nstate is properly handled.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\nAcked-by: Jason Liu <jason.hui.liu@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c\nindex e2a3bc7fb42b..9119f2063098 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c\n@@ -988,6 +988,8 @@ int cdns_hdmi_hdcp_disable(struct cdns_mhdp_device *mhdp)\n {\n \tint ret = 0;\n \n+\tcancel_delayed_work_sync(&mhdp->hdcp.check_work);\n+\n \tmutex_lock(&mhdp->hdcp.mutex);\n \tif (mhdp->hdcp.value != DRM_MODE_CONTENT_PROTECTION_UNDESIRED) {\n \t\tmhdp->hdcp.value = DRM_MODE_CONTENT_PROTECTION_UNDESIRED;\n@@ -998,7 +1000,8 @@ int cdns_hdmi_hdcp_disable(struct cdns_mhdp_device *mhdp)\n \n \tmutex_unlock(&mhdp->hdcp.mutex);\n \n-\tcancel_delayed_work_sync(&mhdp->hdcp.check_work);\n+\t/* Make sure HDCP_STATE_DISABLING state is handled */\n+\thdmi_hdcp_check_link(mhdp);\n \n \treturn ret;\n }\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0027-LF-3367-2-drm-mhdp-more-time-for-FW-alive-check.patch",
    "content": "From 42394af5975326eb20901d65eac47963847006e2 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Fri, 19 Feb 2021 16:41:31 +0800\nSubject: [PATCH 27/49] LF-3367-2: drm: mhdp: more time for FW alive check\n\nFW alive check function may return false in hdcp enable/disable stress test.\nAdd more time for FW alive check, make sure get correct state.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\nAcked-by: Jason Liu <jason.hui.liu@nxp.com>\n---\n drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\nindex 2a8ab0872f25..3487a2fa335c 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-common.c\n@@ -142,7 +142,7 @@ bool cdns_mhdp_check_alive(struct cdns_mhdp_device *mhdp)\n \talive = cdns_mhdp_bus_read(mhdp, KEEP_ALIVE);\n \n \twhile (retries_left--) {\n-\t\tudelay(2);\n+\t\tmsleep(1);\n \n \t\tnewalive = cdns_mhdp_bus_read(mhdp, KEEP_ALIVE);\n \t\tif (alive == newalive)\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0028-LF-3367-3-drm-mhdp-hdcp-adjust-state-handle-priority.patch",
    "content": "From 60f6b8c90766663303f6005468502798eb2b0f44 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Fri, 19 Feb 2021 17:53:54 +0800\nSubject: [PATCH 28/49] LF-3367-3: drm: mhdp-hdcp: adjust state handle priority\n\nHandle HDCP_STATE_INACTIVE and HDCP_STATE_DISABLING state priority\nto avoid unnecessary HPD state check, drm has check it when hdcp\nenable/disable.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\nAcked-by: Jason Liu <jason.hui.liu@nxp.com>\n---\n .../gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c   | 24 ++++++++++---------\n 1 file changed, 13 insertions(+), 11 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c\nindex 9119f2063098..5dfbd7943306 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c\n@@ -1048,6 +1048,15 @@ static int hdmi_hdcp_check_link(struct cdns_mhdp_device *mhdp)\n \tmhdp->hdcp.reauth_in_progress = 0;\n \tmutex_lock(&mhdp->lock);\n \n+\tif (mhdp->hdcp.state == HDCP_STATE_INACTIVE)\n+\t\tgoto out;\n+\n+\tif (mhdp->hdcp.state == HDCP_STATE_DISABLING) {\n+\t\t_hdmi_hdcp_disable(mhdp);\n+\t\tmhdp->hdcp.state = HDCP_STATE_INACTIVE;\n+\t\tgoto out;\n+\t}\n+\n \tif ((mhdp->hdcp.state == HDCP_STATE_AUTHENTICATED)  ||\n \t\t(mhdp->hdcp.state == HDCP_STATE_AUTHENTICATING) ||\n \t\t(mhdp->hdcp.state == HDCP_STATE_REAUTHENTICATING) ||\n@@ -1056,18 +1065,11 @@ static int hdmi_hdcp_check_link(struct cdns_mhdp_device *mhdp)\n \t\t/* In active states, check the HPD signal. Because of the IRQ\n \t\t * debounce delay, the state might not reflect the disconnection.\n \t\t * The FW could already have detected the HDP down and reported error */\n-\t   hpd_sts = cdns_mhdp_read_hpd(mhdp);\n-\t\tif (1 != hpd_sts)\n+\t\thpd_sts = cdns_mhdp_read_hpd(mhdp);\n+\t\tif (1 != hpd_sts) {\n \t\t\tmhdp->hdcp.state = HDCP_STATE_DISABLING;\n-\t}\n-\n-\tif (mhdp->hdcp.state == HDCP_STATE_INACTIVE)\n-\t\tgoto out;\n-\n-\tif (mhdp->hdcp.state == HDCP_STATE_DISABLING) {\n-\t\t_hdmi_hdcp_disable(mhdp);\n-\t\tmhdp->hdcp.state = HDCP_STATE_INACTIVE;\n-\t\tgoto out;\n+\t\t\tgoto out;\n+\t\t}\n \t}\n \n /* TODO items:\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0029-clk-imx8mq-add-27MHz-PHY-ref-clock.patch",
    "content": "From afbe8e0ae318f407d64bbc48b784d93c782b6564 Mon Sep 17 00:00:00 2001\nFrom: Laurentiu Palcu <laurentiu.palcu@nxp.com>\nDate: Thu, 5 Sep 2019 13:07:22 +0300\nSubject: [PATCH 29/49] clk: imx8mq: add 27MHz PHY ref clock\n\nThis clock is a high precision clock on imx8mq-evk board that will be used by\nHDMI phy.\n\nSigned-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>\n---\n drivers/clk/imx/clk-imx8mq.c             | 3 ++-\n include/dt-bindings/clock/imx8mq-clock.h | 4 +++-\n 2 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/clk/imx/clk-imx8mq.c b/drivers/clk/imx/clk-imx8mq.c\nindex 06292d4a98ff..6bd2fe0ae71d 100644\n--- a/drivers/clk/imx/clk-imx8mq.c\n+++ b/drivers/clk/imx/clk-imx8mq.c\n@@ -304,6 +304,7 @@ static int imx8mq_clocks_probe(struct platform_device *pdev)\n \thws[IMX8MQ_CLK_EXT2] = imx_obtain_fixed_clk_hw(np, \"clk_ext2\");\n \thws[IMX8MQ_CLK_EXT3] = imx_obtain_fixed_clk_hw(np, \"clk_ext3\");\n \thws[IMX8MQ_CLK_EXT4] = imx_obtain_fixed_clk_hw(np, \"clk_ext4\");\n+\thws[IMX8MQ_CLK_PHY_27MHZ] = imx_obtain_fixed_clk_hw(np, \"hdmi_phy_27m\");\n \n \tnp = of_find_compatible_node(NULL, NULL, \"fsl,imx8mq-anatop\");\n \tbase = of_iomap(np, 0);\ndiff --git a/include/dt-bindings/clock/imx8mq-clock.h b/include/dt-bindings/clock/imx8mq-clock.h\nindex 9b8045d75b8b..2a81f96b7c74 100644\n--- a/include/dt-bindings/clock/imx8mq-clock.h\n+++ b/include/dt-bindings/clock/imx8mq-clock.h\n@@ -431,6 +431,7 @@\n #define IMX8MQ_CLK_MON_SEL\t\t\t301\n #define IMX8MQ_CLK_MON_CLK2_OUT\t\t302\n+#define IMX8MQ_CLK_PHY_27MHZ\t\t\t303\n \n-#define IMX8MQ_CLK_END\t\t\t\t303\n+#define IMX8MQ_CLK_END\t\t\t\t304\n \n #endif /* __DT_BINDINGS_CLOCK_IMX8MQ_H */\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0030-drm-imx-Add-mhdp-dp-hdmi-driver-for-imx8x-platform.patch",
    "content": "From 09102ec28d08ae95d476ee241ed016d2fe9da894 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Mon, 20 Apr 2020 22:47:36 +0800\nSubject: [PATCH 30/49] drm: imx: Add mhdp dp/hdmi driver for imx8x platform\n\nAdded i.MX8MQ HDMI/DP driver.\nAdded i.MX8MQ HDMI/DP driver.\nAdded LS1028A DP driver.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\n---\n drivers/gpu/drm/imx/Kconfig                   |   1 +\n drivers/gpu/drm/imx/Makefile                  |   1 +\n drivers/gpu/drm/imx/mhdp/Kconfig              |  11 +\n drivers/gpu/drm/imx/mhdp/Makefile             |   5 +\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-dp-phy.c   | 531 ++++++++++++\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-hdmi-phy.c | 764 ++++++++++++++++++\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx.h      |  75 ++\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c   | 638 +++++++++++++++\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c   | 257 ++++++\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-ls1028a.c  | 110 +++\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-phy.h      | 155 ++++\n 11 files changed, 2548 insertions(+)\n create mode 100644 drivers/gpu/drm/imx/mhdp/Kconfig\n create mode 100644 drivers/gpu/drm/imx/mhdp/Makefile\n create mode 100644 drivers/gpu/drm/imx/mhdp/cdns-mhdp-dp-phy.c\n create mode 100644 drivers/gpu/drm/imx/mhdp/cdns-mhdp-hdmi-phy.c\n create mode 100644 drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx.h\n create mode 100644 drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c\n create mode 100644 drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c\n create mode 100644 drivers/gpu/drm/imx/mhdp/cdns-mhdp-ls1028a.c\n create mode 100644 drivers/gpu/drm/imx/mhdp/cdns-mhdp-phy.h\n\ndiff --git a/drivers/gpu/drm/imx/Kconfig b/drivers/gpu/drm/imx/Kconfig\nindex 6231048aa5aa..4af2f575f04b 100644\n--- a/drivers/gpu/drm/imx/Kconfig\n+++ b/drivers/gpu/drm/imx/Kconfig\n@@ -41,3 +41,4 @@ config DRM_IMX_HDMI\n \t  Choose this if you want to use HDMI on i.MX6.\n \n source \"drivers/gpu/drm/imx/dcss/Kconfig\"\n+source \"drivers/gpu/drm/imx/mhdp/Kconfig\"\ndiff --git a/drivers/gpu/drm/imx/Makefile b/drivers/gpu/drm/imx/Makefile\nindex b644deffe948..0b46c46b19a8 100644\n--- a/drivers/gpu/drm/imx/Makefile\n+++ b/drivers/gpu/drm/imx/Makefile\n@@ -10,3 +10,4 @@ obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o\n \n obj-$(CONFIG_DRM_IMX_HDMI) += dw_hdmi-imx.o\n obj-$(CONFIG_DRM_IMX_DCSS) += dcss/\n+obj-$(CONFIG_DRM_IMX_CDNS_MHDP) += mhdp/\ndiff --git a/drivers/gpu/drm/imx/mhdp/Kconfig b/drivers/gpu/drm/imx/mhdp/Kconfig\nnew file mode 100644\nindex 000000000000..86950badb947\n--- /dev/null\n+++ b/drivers/gpu/drm/imx/mhdp/Kconfig\n@@ -0,0 +1,11 @@\n+# SPDX-License-Identifier: GPL-2.0-only\n+\n+config DRM_IMX_CDNS_MHDP\n+\ttristate \"NXP i.MX MX8 DRM HDMI/DP\"\n+\tselect DRM_CDNS_MHDP\n+\tselect DRM_CDNS_DP\n+\tselect DRM_CDNS_HDMI\n+\tselect DRM_CDNS_AUDIO\n+\tdepends on DRM_IMX\n+\thelp\n+\t  Choose this if you want to use HDMI on i.MX8.\ndiff --git a/drivers/gpu/drm/imx/mhdp/Makefile b/drivers/gpu/drm/imx/mhdp/Makefile\nnew file mode 100644\nindex 000000000000..235fa2d515e9\n--- /dev/null\n+++ b/drivers/gpu/drm/imx/mhdp/Makefile\n@@ -0,0 +1,5 @@\n+# SPDX-License-Identifier: GPL-2.0\n+\n+cdns_mhdp_imx-objs := cdns-mhdp-imxdrv.o cdns-mhdp-dp-phy.o \\\n+\t\tcdns-mhdp-hdmi-phy.o cdns-mhdp-imx8qm.o cdns-mhdp-ls1028a.o\n+obj-$(CONFIG_DRM_IMX_CDNS_MHDP) += cdns_mhdp_imx.o\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-dp-phy.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-dp-phy.c\nnew file mode 100644\nindex 000000000000..a6d03c94d196\n--- /dev/null\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-dp-phy.c\n@@ -0,0 +1,531 @@\n+/*\n+ * Cadence Display Port Interface (DP) PHY driver\n+ *\n+ * Copyright (C) 2019 NXP Semiconductor, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ *\n+ */\n+#include <linux/clk.h>\n+#include <linux/kernel.h>\n+#include <drm/display/drm_dp_helper.h>\n+#include <drm/bridge/cdns-mhdp.h>\n+#include \"cdns-mhdp-phy.h\"\n+\n+enum dp_link_rate {\n+\tRATE_1_6 = 162000,\n+\tRATE_2_1 = 216000,\n+\tRATE_2_4 = 243000,\n+\tRATE_2_7 = 270000,\n+\tRATE_3_2 = 324000,\n+\tRATE_4_3 = 432000,\n+\tRATE_5_4 = 540000,\n+\tRATE_8_1 = 810000,\n+};\n+\n+struct phy_pll_reg {\n+\tu16 val[7];\n+\tu32 addr;\n+};\n+\n+static const struct phy_pll_reg phy_pll_27m_cfg[] = {\n+\t/*  1.62    2.16    2.43    2.7     3.24    4.32    5.4      register address */\n+\t{{ 0x010E, 0x010E, 0x010E, 0x010E, 0x010E, 0x010E, 0x010E }, CMN_PLL0_VCOCAL_INIT_TMR },\n+\t{{ 0x001B, 0x001B, 0x001B, 0x001B, 0x001B, 0x001B, 0x001B }, CMN_PLL0_VCOCAL_ITER_TMR },\n+\t{{ 0x30B9, 0x3087, 0x3096, 0x30B4, 0x30B9, 0x3087, 0x30B4 }, CMN_PLL0_VCOCAL_START },\n+\t{{ 0x0077, 0x009F, 0x00B3, 0x00C7, 0x0077, 0x009F, 0x00C7 }, CMN_PLL0_INTDIV },\n+\t{{ 0xF9DA, 0xF7CD, 0xF6C7, 0xF5C1, 0xF9DA, 0xF7CD, 0xF5C1 }, CMN_PLL0_FRACDIV },\n+\t{{ 0x001E, 0x0028, 0x002D, 0x0032, 0x001E, 0x0028, 0x0032 }, CMN_PLL0_HIGH_THR },\n+\t{{ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020 }, CMN_PLL0_DSM_DIAG },\n+\t{{ 0x0000, 0x1000, 0x1000, 0x1000, 0x0000, 0x1000, 0x1000 }, CMN_PLLSM0_USER_DEF_CTRL },\n+\t{{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, CMN_DIAG_PLL0_OVRD },\n+\t{{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, CMN_DIAG_PLL0_FBH_OVRD },\n+\t{{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, CMN_DIAG_PLL0_FBL_OVRD },\n+\t{{ 0x0006, 0x0007, 0x0007, 0x0007, 0x0006, 0x0007, 0x0007 }, CMN_DIAG_PLL0_V2I_TUNE },\n+\t{{ 0x0043, 0x0043, 0x0043, 0x0042, 0x0043, 0x0043, 0x0042 }, CMN_DIAG_PLL0_CP_TUNE },\n+\t{{ 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008 }, CMN_DIAG_PLL0_LF_PROG },\n+\t{{ 0x0100, 0x0001, 0x0001, 0x0001, 0x0100, 0x0001, 0x0001 }, CMN_DIAG_PLL0_PTATIS_TUNE1 },\n+\t{{ 0x0007, 0x0001, 0x0001, 0x0001, 0x0007, 0x0001, 0x0001 }, CMN_DIAG_PLL0_PTATIS_TUNE2 },\n+\t{{ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020 }, CMN_DIAG_PLL0_TEST_MODE},\n+\t{{ 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016 }, CMN_PSM_CLK_CTRL }\n+};\n+\n+static const struct phy_pll_reg phy_pll_24m_cfg[] = {\n+\t/*  1.62    2.16    2.43    2.7     3.24    4.32    5.4      register address */\n+\t{{ 0x00F0, 0x00F0, 0x00F0, 0x00F0, 0x00F0, 0x00F0, 0x00F0 }, CMN_PLL0_VCOCAL_INIT_TMR },\n+\t{{ 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018 }, CMN_PLL0_VCOCAL_ITER_TMR },\n+\t{{ 0x3061, 0x3092, 0x30B3, 0x30D0, 0x3061, 0x3092, 0x30D0 }, CMN_PLL0_VCOCAL_START },\n+\t{{ 0x0086, 0x00B3, 0x00CA, 0x00E0, 0x0086, 0x00B3, 0x00E0 }, CMN_PLL0_INTDIV },\n+\t{{ 0xF917, 0xF6C7, 0x75A1, 0xF479, 0xF917, 0xF6C7, 0xF479 }, CMN_PLL0_FRACDIV },\n+\t{{ 0x0022, 0x002D, 0x0033, 0x0038, 0x0022, 0x002D, 0x0038 }, CMN_PLL0_HIGH_THR },\n+\t{{ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020 }, CMN_PLL0_DSM_DIAG },\n+\t{{ 0x0000, 0x1000, 0x1000, 0x1000, 0x0000, 0x1000, 0x1000 }, CMN_PLLSM0_USER_DEF_CTRL },\n+\t{{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, CMN_DIAG_PLL0_OVRD },\n+\t{{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, CMN_DIAG_PLL0_FBH_OVRD },\n+\t{{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, CMN_DIAG_PLL0_FBL_OVRD },\n+\t{{ 0x0006, 0x0007, 0x0007, 0x0007, 0x0006, 0x0007, 0x0007 }, CMN_DIAG_PLL0_V2I_TUNE },\n+\t{{ 0x0026, 0x0029, 0x0029, 0x0029, 0x0026, 0x0029, 0x0029 }, CMN_DIAG_PLL0_CP_TUNE },\n+\t{{ 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008 }, CMN_DIAG_PLL0_LF_PROG },\n+\t{{ 0x008C, 0x008C, 0x008C, 0x008C, 0x008C, 0x008C, 0x008C }, CMN_DIAG_PLL0_PTATIS_TUNE1 },\n+\t{{ 0x002E, 0x002E, 0x002E, 0x002E, 0x002E, 0x002E, 0x002E }, CMN_DIAG_PLL0_PTATIS_TUNE2 },\n+\t{{ 0x0022, 0x0022, 0x0022, 0x0022, 0x0022, 0x0022, 0x0022 }, CMN_DIAG_PLL0_TEST_MODE},\n+\t{{ 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016 }, CMN_PSM_CLK_CTRL }\n+};\n+\n+static int link_rate_index(u32 rate)\n+{\n+\tswitch (rate) {\n+\tcase RATE_1_6:\n+\t\treturn 0;\n+\tcase RATE_2_1:\n+\t\treturn 1;\n+\tcase RATE_2_4:\n+\t\treturn 2;\n+\tcase RATE_2_7:\n+\t\treturn 3;\n+\tcase RATE_3_2:\n+\t\treturn 4;\n+\tcase RATE_4_3:\n+\t\treturn 5;\n+\tcase RATE_5_4:\n+\t\treturn 6;\n+\tdefault:\n+\t\treturn -1;\n+\t}\n+}\n+\n+static void dp_aux_cfg(struct cdns_mhdp_device *mhdp)\n+{\n+\t/* Power up Aux */\n+\tcdns_phy_reg_write(mhdp, TXDA_CYA_AUXDA_CYA, 1);\n+\n+\tcdns_phy_reg_write(mhdp, TX_DIG_CTRL_REG_1, 0x3);\n+\tndelay(150);\n+\tcdns_phy_reg_write(mhdp, TX_DIG_CTRL_REG_2, 36);\n+\tndelay(150);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_2, 0x0100);\n+\tndelay(150);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_2, 0x0300);\n+\tndelay(150);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_3, 0x0000);\n+\tndelay(150);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_1, 0x2008);\n+\tndelay(150);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_1, 0x2018);\n+\tndelay(150);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_1, 0xA018);\n+\tndelay(150);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_2, 0x030C);\n+\tndelay(150);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_5, 0x0000);\n+\tndelay(150);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_4, 0x1001);\n+\tndelay(150);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_1, 0xA098);\n+\tndelay(150);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_1, 0xA198);\n+\tndelay(150);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_2, 0x030d);\n+\tndelay(150);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_2, 0x030f);\n+}\n+\n+/* PMA common configuration for 24MHz */\n+static void dp_phy_pma_cmn_cfg_24mhz(struct cdns_mhdp_device *mhdp)\n+{\n+\tint k;\n+\tu32 num_lanes = mhdp->dp.num_lanes;\n+\tu16 val;\n+\n+\tval = cdns_phy_reg_read(mhdp, PHY_PMA_CMN_CTRL1);\n+\tval &= 0xFFF7;\n+\tval |= 0x0008;\n+\tcdns_phy_reg_write(mhdp, PHY_PMA_CMN_CTRL1, val);\n+\n+\tfor (k = 0; k < num_lanes; k++) {\n+\t\t/* Transceiver control and diagnostic registers */\n+\t\tcdns_phy_reg_write(mhdp, XCVR_DIAG_LANE_FCM_EN_MGN_TMR | (k << 9), 0x0090);\n+\t\t/* Transmitter receiver detect registers */\n+\t\tcdns_phy_reg_write(mhdp, TX_RCVDET_EN_TMR | (k << 9), 0x0960);\n+\t\tcdns_phy_reg_write(mhdp, TX_RCVDET_ST_TMR | (k << 9), 0x0030);\n+\t}\n+}\n+\n+/* Valid for 24 MHz only */\n+static void dp_phy_pma_cmn_pll0_24mhz(struct cdns_mhdp_device *mhdp)\n+{\n+\tu32 num_lanes = mhdp->dp.num_lanes;\n+\tu32 link_rate = mhdp->dp.rate;\n+\tu16 val;\n+\tint index, i, k;\n+\n+\t/*\n+\t * PLL reference clock source select\n+\t * for single ended reference clock val |= 0x0030;\n+\t * for differential clock  val |= 0x0000;\n+\t */\n+\tval = cdns_phy_reg_read(mhdp, PHY_PMA_CMN_CTRL1);\n+\tval = val & 0xFF8F;\n+\tval = val | 0x0030;\n+\tcdns_phy_reg_write(mhdp, PHY_PMA_CMN_CTRL1, val);\n+\n+\t/* DP PLL data rate 0/1 clock divider value */\n+\tval = cdns_phy_reg_read(mhdp, PHY_HDP_CLK_CTL);\n+\tval &= 0x00FF;\n+\tif (link_rate <= RATE_2_7)\n+\t\tval |= 0x2400;\n+\telse\n+\t\tval |= 0x1200;\n+\tcdns_phy_reg_write(mhdp, PHY_HDP_CLK_CTL, val);\n+\n+\t/* High speed clock 0/1 div */\n+\tval = cdns_phy_reg_read(mhdp, CMN_DIAG_HSCLK_SEL);\n+\tval &= 0xFFCC;\n+\tif (link_rate <= RATE_2_7)\n+\t\tval |= 0x0011;\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_HSCLK_SEL, val);\n+\n+\tfor (k = 0; k < num_lanes; k = k + 1) {\n+\t\tval = cdns_phy_reg_read(mhdp, (XCVR_DIAG_HSCLK_SEL | (k << 9)));\n+\t\tval &= 0xCFFF;\n+\t\tif (link_rate <= RATE_2_7)\n+\t\t\tval |= 0x1000;\n+\t\tcdns_phy_reg_write(mhdp, (XCVR_DIAG_HSCLK_SEL | (k << 9)), val);\n+\t}\n+\n+\t/* DP PHY PLL 24MHz configuration */\n+\tindex = link_rate_index(link_rate);\n+\tfor (i = 0; i < ARRAY_SIZE(phy_pll_24m_cfg); i++)\n+\t\tcdns_phy_reg_write(mhdp, phy_pll_24m_cfg[i].addr, phy_pll_24m_cfg[i].val[index]);\n+\n+\t/* Transceiver control and diagnostic registers */\n+\tfor (k = 0; k < num_lanes; k = k + 1) {\n+\t\tval = cdns_phy_reg_read(mhdp, (XCVR_DIAG_PLLDRC_CTRL | (k << 9)));\n+\t\tval &= 0x8FFF;\n+\t\tif (link_rate <= RATE_2_7)\n+\t\t\tval |= 0x2000;\n+\t\telse\n+\t\t\tval |= 0x1000;\n+\t\tcdns_phy_reg_write(mhdp, (XCVR_DIAG_PLLDRC_CTRL | (k << 9)), val);\n+\t}\n+\n+\tfor (k = 0; k < num_lanes; k = k + 1) {\n+\t\tcdns_phy_reg_write(mhdp, (XCVR_PSM_RCTRL | (k << 9)), 0xBEFC);\n+\t\tcdns_phy_reg_write(mhdp, (TX_PSC_A0 | (k << 9)), 0x6799);\n+\t\tcdns_phy_reg_write(mhdp, (TX_PSC_A1 | (k << 9)), 0x6798);\n+\t\tcdns_phy_reg_write(mhdp, (TX_PSC_A2 | (k << 9)), 0x0098);\n+\t\tcdns_phy_reg_write(mhdp, (TX_PSC_A3 | (k << 9)), 0x0098);\n+\t}\n+}\n+\n+/* PMA common configuration for 27MHz */\n+static void dp_phy_pma_cmn_cfg_27mhz(struct cdns_mhdp_device *mhdp)\n+{\n+\tu32 num_lanes = mhdp->dp.num_lanes;\n+\tu16 val;\n+\tint k;\n+\n+\tval = cdns_phy_reg_read(mhdp, PHY_PMA_CMN_CTRL1);\n+\tval &= 0xFFF7;\n+\tval |= 0x0008;\n+\tcdns_phy_reg_write(mhdp, PHY_PMA_CMN_CTRL1, val);\n+\n+\t/* Startup state machine registers */\n+\tcdns_phy_reg_write(mhdp, CMN_SSM_BIAS_TMR, 0x0087);\n+\tcdns_phy_reg_write(mhdp, CMN_PLLSM0_PLLEN_TMR, 0x001B);\n+\tcdns_phy_reg_write(mhdp, CMN_PLLSM0_PLLPRE_TMR, 0x0036);\n+\tcdns_phy_reg_write(mhdp, CMN_PLLSM0_PLLVREF_TMR, 0x001B);\n+\tcdns_phy_reg_write(mhdp, CMN_PLLSM0_PLLLOCK_TMR, 0x006C);\n+\n+\t/* Current calibration registers */\n+\tcdns_phy_reg_write(mhdp, CMN_ICAL_INIT_TMR, 0x0044);\n+\tcdns_phy_reg_write(mhdp, CMN_ICAL_ITER_TMR, 0x0006);\n+\tcdns_phy_reg_write(mhdp, CMN_ICAL_ADJ_INIT_TMR, 0x0022);\n+\tcdns_phy_reg_write(mhdp, CMN_ICAL_ADJ_ITER_TMR, 0x0006);\n+\n+\t/* Resistor calibration registers */\n+\tcdns_phy_reg_write(mhdp, CMN_TXPUCAL_INIT_TMR, 0x0022);\n+\tcdns_phy_reg_write(mhdp, CMN_TXPUCAL_ITER_TMR, 0x0006);\n+\tcdns_phy_reg_write(mhdp, CMN_TXPU_ADJ_INIT_TMR, 0x0022);\n+\tcdns_phy_reg_write(mhdp, CMN_TXPU_ADJ_ITER_TMR, 0x0006);\n+\tcdns_phy_reg_write(mhdp, CMN_TXPDCAL_INIT_TMR, 0x0022);\n+\tcdns_phy_reg_write(mhdp, CMN_TXPDCAL_ITER_TMR, 0x0006);\n+\tcdns_phy_reg_write(mhdp, CMN_TXPD_ADJ_INIT_TMR, 0x0022);\n+\tcdns_phy_reg_write(mhdp, CMN_TXPD_ADJ_ITER_TMR, 0x0006);\n+\tcdns_phy_reg_write(mhdp, CMN_RXCAL_INIT_TMR, 0x0022);\n+\tcdns_phy_reg_write(mhdp, CMN_RXCAL_ITER_TMR, 0x0006);\n+\tcdns_phy_reg_write(mhdp, CMN_RX_ADJ_INIT_TMR, 0x0022);\n+\tcdns_phy_reg_write(mhdp, CMN_RX_ADJ_ITER_TMR, 0x0006);\n+\n+\tfor (k = 0; k < num_lanes; k = k + 1) {\n+\t\t/* Power state machine registers */\n+\t\tcdns_phy_reg_write(mhdp, XCVR_PSM_CAL_TMR  | (k << 9), 0x016D);\n+\t\tcdns_phy_reg_write(mhdp, XCVR_PSM_A0IN_TMR | (k << 9), 0x016D);\n+\t\t/* Transceiver control and diagnostic registers */\n+\t\tcdns_phy_reg_write(mhdp, XCVR_DIAG_LANE_FCM_EN_MGN_TMR | (k << 9), 0x00A2);\n+\t\tcdns_phy_reg_write(mhdp, TX_DIAG_BGREF_PREDRV_DELAY    | (k << 9), 0x0097);\n+\t\t/* Transmitter receiver detect registers */\n+\t\tcdns_phy_reg_write(mhdp, TX_RCVDET_EN_TMR | (k << 9), 0x0A8C);\n+\t\tcdns_phy_reg_write(mhdp, TX_RCVDET_ST_TMR | (k << 9), 0x0036);\n+\t}\n+}\n+\n+static void dp_phy_pma_cmn_pll0_27mhz(struct cdns_mhdp_device *mhdp)\n+{\n+\tu32 num_lanes = mhdp->dp.num_lanes;\n+\tu32 link_rate = mhdp->dp.rate;\n+\tu16 val;\n+\tint index, i, k;\n+\n+\t/*\n+\t * PLL reference clock source select\n+\t * for single ended reference clock val |= 0x0030;\n+\t * for differential clock  val |= 0x0000;\n+\t */\n+\tval = cdns_phy_reg_read(mhdp, PHY_PMA_CMN_CTRL1);\n+\tval &= 0xFF8F;\n+\tcdns_phy_reg_write(mhdp, PHY_PMA_CMN_CTRL1, val);\n+\n+\t/* for differential clock on the refclk_p and refclk_m off chip pins:\n+\t * CMN_DIAG_ACYA[8]=1'b1\n+\t */\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_ACYA, 0x0100);\n+\n+\t/* DP PLL data rate 0/1 clock divider value */\n+\tval = cdns_phy_reg_read(mhdp, PHY_HDP_CLK_CTL);\n+\tval &= 0x00FF;\n+\tif (link_rate <= RATE_2_7)\n+\t\tval |= 0x2400;\n+\telse\n+\t\tval |= 0x1200;\n+\tcdns_phy_reg_write(mhdp, PHY_HDP_CLK_CTL, val);\n+\n+\t/* High speed clock 0/1 div */\n+\tval = cdns_phy_reg_read(mhdp, CMN_DIAG_HSCLK_SEL);\n+\tval &= 0xFFCC;\n+\tif (link_rate <= RATE_2_7)\n+\t\tval |= 0x0011;\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_HSCLK_SEL, val);\n+\n+\tfor (k = 0; k < num_lanes; k++) {\n+\t\tval = cdns_phy_reg_read(mhdp, (XCVR_DIAG_HSCLK_SEL | (k << 9)));\n+\t\tval = val & 0xCFFF;\n+\t\tif (link_rate <= RATE_2_7)\n+\t\t\tval |= 0x1000;\n+\t\tcdns_phy_reg_write(mhdp, (XCVR_DIAG_HSCLK_SEL | (k << 9)), val);\n+\t}\n+\n+\t/* DP PHY PLL 27MHz configuration */\n+\tindex = link_rate_index(link_rate);\n+\tfor (i = 0; i < ARRAY_SIZE(phy_pll_27m_cfg); i++)\n+\t\tcdns_phy_reg_write(mhdp, phy_pll_27m_cfg[i].addr, phy_pll_27m_cfg[i].val[index]);\n+\n+\t/* Transceiver control and diagnostic registers */\n+\tfor (k = 0; k < num_lanes; k++) {\n+\t\tval = cdns_phy_reg_read(mhdp, (XCVR_DIAG_PLLDRC_CTRL | (k << 9)));\n+\t\tval = val & 0x8FFF;\n+\t\tif (link_rate <= RATE_2_7)\n+\t\t\tval |= 0x2000;\n+\t\telse\n+\t\t\tval |= 0x1000;\n+\t\tcdns_phy_reg_write(mhdp, (XCVR_DIAG_PLLDRC_CTRL | (k << 9)), val);\n+\t}\n+\n+\tfor (k = 0; k < num_lanes; k = k + 1) {\n+\t\t/* Power state machine registers */\n+\t\tcdns_phy_reg_write(mhdp, (XCVR_PSM_RCTRL | (k << 9)),  0xBEFC);\n+\t\tcdns_phy_reg_write(mhdp, (TX_PSC_A0 | (k << 9)), 0x6799);\n+\t\tcdns_phy_reg_write(mhdp, (TX_PSC_A1 | (k << 9)), 0x6798);\n+\t\tcdns_phy_reg_write(mhdp, (TX_PSC_A2 | (k << 9)), 0x0098);\n+\t\tcdns_phy_reg_write(mhdp, (TX_PSC_A3 | (k << 9)), 0x0098);\n+\t\t/* Receiver calibration power state definition register */\n+\t\tval = cdns_phy_reg_read(mhdp, RX_PSC_CAL | (k << 9));\n+\t\tval &= 0xFFBB;\n+\t\tcdns_phy_reg_write(mhdp, (RX_PSC_CAL | (k << 9)), val);\n+\t\tval = cdns_phy_reg_read(mhdp, RX_PSC_A0  | (k << 9));\n+\t\tval &= 0xFFBB;\n+\t\tcdns_phy_reg_write(mhdp, (RX_PSC_A0  | (k << 9)), val);\n+\t}\n+}\n+\n+static void dp_phy_power_down(struct cdns_mhdp_device *mhdp)\n+{\n+\tu16 val;\n+\tint i;\n+\n+\tif (!mhdp->power_up)\n+\t\treturn;\n+\n+\t/* Place the PHY lanes in the A3 power state. */\n+\tcdns_phy_reg_write(mhdp, PHY_HDP_MODE_CTRL, 0x8);\n+\t/* Wait for Power State A3 Ack */\n+\tfor (i = 0; i < 10; i++) {\n+\t\tval = cdns_phy_reg_read(mhdp, PHY_HDP_MODE_CTRL);\n+\t\tif (val & (1 << 7))\n+\t\t\tbreak;\n+\t\tmsleep(20);\n+\t}\n+\tif (i == 10) {\n+\t\tdev_err(mhdp->dev, \"Wait A3 Ack failed\\n\");\n+\t\treturn;\n+\t}\n+\n+\t/* Disable HDP PLL’s data rate and full rate clocks out of PMA. */\n+\tval = cdns_phy_reg_read(mhdp, PHY_HDP_CLK_CTL);\n+\tval &= ~(1 << 2);\n+\tcdns_phy_reg_write(mhdp, PHY_HDP_CLK_CTL, val);\n+\t/* Wait for PLL clock gate ACK */\n+\tfor (i = 0; i < 10; i++) {\n+\t\tval = cdns_phy_reg_read(mhdp, PHY_HDP_CLK_CTL);\n+\t\tif (!(val & (1 << 3)))\n+\t\t\tbreak;\n+\t\tmsleep(20);\n+\t}\n+\tif (i == 10) {\n+\t\tdev_err(mhdp->dev, \"Wait PLL clock gate Ack failed\\n\");\n+\t\treturn;\n+\t}\n+\n+\t/* Disable HDP PLL’s for high speed clocks */\n+\tval = cdns_phy_reg_read(mhdp, PHY_HDP_CLK_CTL);\n+\tval &= ~(1 << 0);\n+\tcdns_phy_reg_write(mhdp, PHY_HDP_CLK_CTL, val);\n+\t/* Wait for PLL disable ACK */\n+\tfor (i = 0; i < 10; i++) {\n+\t\tval = cdns_phy_reg_read(mhdp, PHY_HDP_CLK_CTL);\n+\t\tif (!(val & (1 << 1)))\n+\t\t\tbreak;\n+\t\tmsleep(20);\n+\t}\n+\tif (i == 10) {\n+\t\tdev_err(mhdp->dev, \"Wait PLL disable Ack failed\\n\");\n+\t\treturn;\n+\t}\n+}\n+\n+static int dp_phy_power_up(struct cdns_mhdp_device *mhdp)\n+{\n+\tu32 val, i;\n+\n+\t/* Enable HDP PLL’s for high speed clocks */\n+\tval = cdns_phy_reg_read(mhdp, PHY_HDP_CLK_CTL);\n+\tval |= (1 << 0);\n+\tcdns_phy_reg_write(mhdp, PHY_HDP_CLK_CTL, val);\n+\t/* Wait for PLL ready ACK */\n+\tfor (i = 0; i < 10; i++) {\n+\t\tval = cdns_phy_reg_read(mhdp, PHY_HDP_CLK_CTL);\n+\t\tif (val & (1 << 1))\n+\t\t\tbreak;\n+\t\tmsleep(20);\n+\t}\n+\tif (i == 10) {\n+\t\tdev_err(mhdp->dev, \"Wait PLL Ack failed\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\t/* Enable HDP PLL’s data rate and full rate clocks out of PMA. */\n+\tval = cdns_phy_reg_read(mhdp, PHY_HDP_CLK_CTL);\n+\tval |= (1 << 2);\n+\tcdns_phy_reg_write(mhdp, PHY_HDP_CLK_CTL, val);\n+\t/* Wait for PLL clock enable ACK */\n+\tfor (i = 0; i < 10; i++) {\n+\t\tval = cdns_phy_reg_read(mhdp, PHY_HDP_CLK_CTL);\n+\t\tif (val & (1 << 3))\n+\t\t\tbreak;\n+\t\tmsleep(20);\n+\t}\n+\tif (i == 10) {\n+\t\tdev_err(mhdp->dev, \"Wait PLL clock enable ACk failed\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\t/* Configure PHY in A2 Mode */\n+\tcdns_phy_reg_write(mhdp, PHY_HDP_MODE_CTRL, 0x0004);\n+\t/* Wait for Power State A2 Ack */\n+\tfor (i = 0; i < 10; i++) {\n+\t\tval = cdns_phy_reg_read(mhdp, PHY_HDP_MODE_CTRL);\n+\t\tif (val & (1 << 6))\n+\t\t\tbreak;\n+\t\tmsleep(20);\n+\t}\n+\tif (i == 10) {\n+\t\tdev_err(mhdp->dev, \"Wait A2 Ack failed\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\t/* Configure PHY in A0 mode (PHY must be in the A0 power\n+\t * state in order to transmit data)\n+\t */\n+\tcdns_phy_reg_write(mhdp, PHY_HDP_MODE_CTRL, 0x0101);\n+\n+\t/* Wait for Power State A0 Ack */\n+\tfor (i = 0; i < 10; i++) {\n+\t\tval = cdns_phy_reg_read(mhdp, PHY_HDP_MODE_CTRL);\n+\t\tif (val & (1 << 4))\n+\t\t\tbreak;\n+\t\tmsleep(20);\n+\t}\n+\tif (i == 10) {\n+\t\tdev_err(mhdp->dev, \"Wait A0 Ack failed\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\tmhdp->power_up = true;\n+\n+\treturn 0;\n+}\n+\n+int cdns_dp_phy_set_imx8mq(struct cdns_mhdp_device *mhdp)\n+{\n+\tint ret;\n+\n+\t/* Disable phy clock if PHY in power up state */\n+\tdp_phy_power_down(mhdp);\n+\n+\tdp_phy_pma_cmn_cfg_27mhz(mhdp);\n+\n+\tdp_phy_pma_cmn_pll0_27mhz(mhdp);\n+\n+\tcdns_phy_reg_write(mhdp, TX_DIAG_ACYA_0, 1);\n+\tcdns_phy_reg_write(mhdp, TX_DIAG_ACYA_1, 1);\n+\tcdns_phy_reg_write(mhdp, TX_DIAG_ACYA_2, 1);\n+\tcdns_phy_reg_write(mhdp, TX_DIAG_ACYA_3, 1);\n+\n+\t/* PHY power up */\n+\tret = dp_phy_power_up(mhdp);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tdp_aux_cfg(mhdp);\n+\n+\treturn ret;\n+}\n+\n+int cdns_dp_phy_set_imx8qm(struct cdns_mhdp_device *mhdp)\n+{\n+\tint ret;\n+\n+\t/* Disable phy clock if PHY in power up state */\n+\tdp_phy_power_down(mhdp);\n+\n+\tdp_phy_pma_cmn_cfg_24mhz(mhdp);\n+\n+\tdp_phy_pma_cmn_pll0_24mhz(mhdp);\n+\n+\tcdns_phy_reg_write(mhdp, TX_DIAG_ACYA_0, 1);\n+\tcdns_phy_reg_write(mhdp, TX_DIAG_ACYA_1, 1);\n+\tcdns_phy_reg_write(mhdp, TX_DIAG_ACYA_2, 1);\n+\tcdns_phy_reg_write(mhdp, TX_DIAG_ACYA_3, 1);\n+\n+\t/* PHY power up */\n+\tret = dp_phy_power_up(mhdp);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\tdp_aux_cfg(mhdp);\n+\n+\treturn true;\n+}\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-hdmi-phy.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-hdmi-phy.c\nnew file mode 100644\nindex 000000000000..120300e6a2df\n--- /dev/null\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-hdmi-phy.c\n@@ -0,0 +1,764 @@\n+/*\n+ * Cadence High-Definition Multimedia Interface (HDMI) driver\n+ *\n+ * Copyright (C) 2019 NXP Semiconductor, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ *\n+ */\n+#include <drm/drm_of.h>\n+#include <drm/drm_vblank.h>\n+#include <drm/drm_print.h>\n+#include <drm/drm_crtc_helper.h>\n+#include <linux/io.h>\n+#include <drm/drm_edid.h>\n+#include <drm/drm_encoder_slave.h>\n+#include <drm/drm_atomic.h>\n+#include <linux/io.h>\n+\n+#include <drm/bridge/cdns-mhdp.h>\n+#include \"cdns-mhdp-phy.h\"\n+\n+/* HDMI TX clock control settings */\n+struct hdmi_ctrl {\n+\tu32 pixel_clk_freq_min;\n+\tu32 pixel_clk_freq_max;\n+\tu32 feedback_factor;\n+\tu32 data_range_kbps_min;\n+\tu32 data_range_kbps_max;\n+\tu32 cmnda_pll0_ip_div;\n+\tu32 cmn_ref_clk_dig_div;\n+\tu32 ref_clk_divider_scaler;\n+\tu32 pll_fb_div_total;\n+\tu32 cmnda_pll0_fb_div_low;\n+\tu32 cmnda_pll0_fb_div_high;\n+\tu32 pixel_div_total;\n+\tu32 cmnda_pll0_pxdiv_low;\n+\tu32 cmnda_pll0_pxdiv_high;\n+\tu32 vco_freq_min;\n+\tu32 vco_freq_max;\n+\tu32 vco_ring_select;\n+\tu32 cmnda_hs_clk_0_sel;\n+\tu32 cmnda_hs_clk_1_sel;\n+\tu32 hsclk_div_at_xcvr;\n+\tu32 hsclk_div_tx_sub_rate;\n+\tu32 cmnda_pll0_hs_sym_div_sel;\n+\tu32 cmnda_pll0_clk_freq_min;\n+\tu32 cmnda_pll0_clk_freq_max;\n+};\n+\n+/* HDMI TX clock control settings, pixel clock is output */\n+static const struct hdmi_ctrl imx8mq_ctrl_table[] = {\n+/*Minclk  Maxclk Fdbak  DR_min   DR_max  ip_d  dig  DS    Totl */\n+{ 27000,  27000, 1000,  270000,  270000, 0x03, 0x1, 0x1,  240, 0x0BC, 0x030,  80, 0x026, 0x026, 2160000, 2160000, 0, 2, 2, 2, 4, 0x3,  27000,  27000},\n+{ 27000,  27000, 1250,  337500,  337500, 0x03, 0x1, 0x1,  300, 0x0EC, 0x03C, 100, 0x030, 0x030, 2700000, 2700000, 0, 2, 2, 2, 4, 0x3,  33750,  33750},\n+{ 27000,  27000, 1500,  405000,  405000, 0x03, 0x1, 0x1,  360, 0x11C, 0x048, 120, 0x03A, 0x03A, 3240000, 3240000, 0, 2, 2, 2, 4, 0x3,  40500,  40500},\n+{ 27000,  27000, 2000,  540000,  540000, 0x03, 0x1, 0x1,  240, 0x0BC, 0x030,  80, 0x026, 0x026, 2160000, 2160000, 0, 2, 2, 2, 4, 0x2,  54000,  54000},\n+{ 54000,  54000, 1000,  540000,  540000, 0x03, 0x1, 0x1,  480, 0x17C, 0x060,  80, 0x026, 0x026, 4320000, 4320000, 1, 2, 2, 2, 4, 0x3,  54000,  54000},\n+{ 54000,  54000, 1250,  675000,  675000, 0x04, 0x1, 0x1,  400, 0x13C, 0x050,  50, 0x017, 0x017, 2700000, 2700000, 0, 1, 1, 2, 4, 0x2,  67500,  67500},\n+{ 54000,  54000, 1500,  810000,  810000, 0x04, 0x1, 0x1,  480, 0x17C, 0x060,  60, 0x01C, 0x01C, 3240000, 3240000, 0, 2, 2, 2, 2, 0x2,  81000,  81000},\n+{ 54000,  54000, 2000, 1080000, 1080000, 0x03, 0x1, 0x1,  240, 0x0BC, 0x030,  40, 0x012, 0x012, 2160000, 2160000, 0, 2, 2, 2, 1, 0x1, 108000, 108000},\n+{ 74250,  74250, 1000,  742500,  742500, 0x03, 0x1, 0x1,  660, 0x20C, 0x084,  80, 0x026, 0x026, 5940000, 5940000, 1, 2, 2, 2, 4, 0x3,  74250,  74250},\n+{ 74250,  74250, 1250,  928125,  928125, 0x04, 0x1, 0x1,  550, 0x1B4, 0x06E,  50, 0x017, 0x017, 3712500, 3712500, 1, 1, 1, 2, 4, 0x2,  92812,  92812},\n+{ 74250,  74250, 1500, 1113750, 1113750, 0x04, 0x1, 0x1,  660, 0x20C, 0x084,  60, 0x01C, 0x01C, 4455000, 4455000, 1, 2, 2, 2, 2, 0x2, 111375, 111375},\n+{ 74250,  74250, 2000, 1485000, 1485000, 0x03, 0x1, 0x1,  330, 0x104, 0x042,  40, 0x012, 0x012, 2970000, 2970000, 0, 2, 2, 2, 1, 0x1, 148500, 148500},\n+{ 99000,  99000, 1000,  990000,  990000, 0x03, 0x1, 0x1,  440, 0x15C, 0x058,  40, 0x012, 0x012, 3960000, 3960000, 1, 2, 2, 2, 2, 0x2,  99000,  99000},\n+{ 99000,  99000, 1250, 1237500, 1237500, 0x03, 0x1, 0x1,  275, 0x0D8, 0x037,  25, 0x00B, 0x00A, 2475000, 2475000, 0, 1, 1, 2, 2, 0x1, 123750, 123750},\n+{ 99000,  99000, 1500, 1485000, 1485000, 0x03, 0x1, 0x1,  330, 0x104, 0x042,  30, 0x00D, 0x00D, 2970000, 2970000, 0, 2, 2, 2, 1, 0x1, 148500, 148500},\n+{ 99000,  99000, 2000, 1980000, 1980000, 0x03, 0x1, 0x1,  440, 0x15C, 0x058,  40, 0x012, 0x012, 3960000, 3960000, 1, 2, 2, 2, 1, 0x1, 198000, 198000},\n+{148500, 148500, 1000, 1485000, 1485000, 0x03, 0x1, 0x1,  660, 0x20C, 0x084,  40, 0x012, 0x012, 5940000, 5940000, 1, 2, 2, 2, 2, 0x2, 148500, 148500},\n+{148500, 148500, 1250, 1856250, 1856250, 0x04, 0x1, 0x1,  550, 0x1B4, 0x06E,  25, 0x00B, 0x00A, 3712500, 3712500, 1, 1, 1, 2, 2, 0x1, 185625, 185625},\n+{148500, 148500, 1500, 2227500, 2227500, 0x03, 0x1, 0x1,  495, 0x188, 0x063,  30, 0x00D, 0x00D, 4455000, 4455000, 1, 1, 1, 2, 2, 0x1, 222750, 222750},\n+{148500, 148500, 2000, 2970000, 2970000, 0x03, 0x1, 0x1,  660, 0x20C, 0x084,  40, 0x012, 0x012, 5940000, 5940000, 1, 2, 2, 2, 1, 0x1, 297000, 297000},\n+{198000, 198000, 1000, 1980000, 1980000, 0x03, 0x1, 0x1,  220, 0x0AC, 0x02C,  10, 0x003, 0x003, 1980000, 1980000, 0, 1, 1, 2, 1, 0x0, 198000, 198000},\n+{198000, 198000, 1250, 2475000, 2475000, 0x03, 0x1, 0x1,  550, 0x1B4, 0x06E,  25, 0x00B, 0x00A, 4950000, 4950000, 1, 1, 1, 2, 2, 0x1, 247500, 247500},\n+{198000, 198000, 1500, 2970000, 2970000, 0x03, 0x1, 0x1,  330, 0x104, 0x042,  15, 0x006, 0x005, 2970000, 2970000, 0, 1, 1, 2, 1, 0x0, 297000, 297000},\n+{198000, 198000, 2000, 3960000, 3960000, 0x03, 0x1, 0x1,  440, 0x15C, 0x058,  20, 0x008, 0x008, 3960000, 3960000, 1, 1, 1, 2, 1, 0x0, 396000, 396000},\n+{297000, 297000, 1000, 2970000, 2970000, 0x03, 0x1, 0x1,  330, 0x104, 0x042,  10, 0x003, 0x003, 2970000, 2970000, 0, 1, 1, 2, 1, 0x0, 297000, 297000},\n+{297000, 297000, 1500, 4455000, 4455000, 0x03, 0x1, 0x1,  495, 0x188, 0x063,  15, 0x006, 0x005, 4455000, 4455000, 1, 1, 1, 2, 1, 0x0, 445500, 445500},\n+{297000, 297000, 2000, 5940000, 5940000, 0x03, 0x1, 0x1,  660, 0x20C, 0x084,  20, 0x008, 0x008, 5940000, 5940000, 1, 1, 1, 2, 1, 0x0, 594000, 594000},\n+{594000, 594000, 1000, 5940000, 5940000, 0x03, 0x1, 0x1,  660, 0x20C, 0x084,  10, 0x003, 0x003, 5940000, 5940000, 1, 1, 1, 2, 1, 0x0, 594000, 594000},\n+{594000, 594000,  750, 4455000, 4455000, 0x03, 0x1, 0x1,  495, 0x188, 0x063,  10, 0x003, 0x003, 4455000, 4455000, 1, 1, 1, 2, 1, 0x0, 445500, 445500},\n+{594000, 594000,  625, 3712500, 3712500, 0x04, 0x1, 0x1,  550, 0x1B4, 0x06E,  10, 0x003, 0x003, 3712500, 3712500, 1, 1, 1, 2, 1, 0x0, 371250, 371250},\n+{594000, 594000,  500, 2970000, 2970000, 0x03, 0x1, 0x1,  660, 0x20C, 0x084,  10, 0x003, 0x003, 5940000, 5940000, 1, 1, 1, 2, 2, 0x1, 297000, 297000},\n+};\n+\n+/* HDMI TX clock control settings, pixel clock is input */\n+static const struct hdmi_ctrl imx8qm_ctrl_table[] = {\n+/*pclk_l  pclk_h  fd    DRR_L    DRR_H   PLLD */\n+{ 25000,  42500, 1000,  250000,  425000, 0x05, 0x01, 0x01, 400, 0x182, 0x00A, 0, 0, 0, 2000000, 3400000, 0, 2, 2, 2, 4, 0x03,  25000,  42500},\n+{ 42500,  85000, 1000,  425000,  850000, 0x08, 0x03, 0x01, 320, 0x132, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 4, 0x02,  42500,  85000},\n+{ 85000, 170000, 1000,  850000, 1700000, 0x11, 0x00, 0x07, 340, 0x146, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 2, 0x01,  85000, 170000},\n+{170000, 340000, 1000, 1700000, 3400000, 0x22, 0x01, 0x07, 340, 0x146, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 1, 0x00, 170000, 340000},\n+{340000, 600000, 1000, 3400000, 6000000, 0x3C, 0x03, 0x06, 600, 0x24A, 0x00A, 0, 0, 0, 3400000, 6000000, 1, 1, 1, 2, 1, 0x00, 340000, 600000},\n+{ 25000,  34000, 1205,  312500,  425000, 0x04, 0x01, 0x01, 400, 0x182, 0x00A, 0, 0, 0, 2500000, 3400000, 0, 2, 2, 2, 4, 0x03,  31250,  42500},\n+{ 34000,  68000, 1205,  425000,  850000, 0x06, 0x02, 0x01, 300, 0x11E, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 4, 0x02,  42500,  85000},\n+{ 68000, 136000, 1205,  850000, 1700000, 0x0D, 0x02, 0x02, 325, 0x137, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 2, 0x01,  85000, 170000},\n+{136000, 272000, 1205, 1700000, 3400000, 0x1A, 0x02, 0x04, 325, 0x137, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 1, 0x00, 170000, 340000},\n+{272000, 480000, 1205, 3400000, 6000000, 0x30, 0x03, 0x05, 600, 0x24A, 0x00A, 0, 0, 0, 3400000, 6000000, 1, 1, 1, 2, 1, 0x00, 340000, 600000},\n+{ 25000,  28000, 1500,  375000,  420000, 0x03, 0x01, 0x01, 360, 0x15A, 0x00A, 0, 0, 0, 3000000, 3360000, 0, 2, 2, 2, 4, 0x03,  37500,  42000},\n+{ 28000,  56000, 1500,  420000,  840000, 0x06, 0x02, 0x01, 360, 0x15A, 0x00A, 0, 0, 0, 1680000, 3360000, 0, 1, 1, 2, 4, 0x02,  42000,  84000},\n+{ 56000, 113000, 1500,  840000, 1695000, 0x0B, 0x00, 0x05, 330, 0x13C, 0x00A, 0, 0, 0, 1680000, 3390000, 0, 1, 1, 2, 2, 0x01,  84000, 169500},\n+{113000, 226000, 1500, 1695000, 3390000, 0x16, 0x01, 0x05, 330, 0x13C, 0x00A, 0, 0, 0, 1695000, 3390000, 0, 1, 1, 2, 1, 0x00, 169500, 339000},\n+{226000, 400000, 1500, 3390000, 6000000, 0x28, 0x03, 0x04, 600, 0x24A, 0x00A, 0, 0, 0, 3390000, 6000000, 1, 1, 1, 2, 1, 0x00, 339000, 600000},\n+{ 25000,  42500, 2000,  500000,  850000, 0x05, 0x01, 0x01, 400, 0x182, 0x00A, 0, 0, 0, 2000000, 3400000, 0, 1, 1, 2, 4, 0x02,  50000,  85000},\n+{ 42500,  85000, 2000,  850000, 1700000, 0x08, 0x03, 0x01, 320, 0x132, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 2, 0x01,  85000, 170000},\n+{ 85000, 170000, 2000, 1700000, 3400000, 0x11, 0x00, 0x07, 340, 0x146, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 1, 0x00, 170000, 340000},\n+{170000, 300000, 2000, 3400000, 6000000, 0x22, 0x01, 0x06, 680, 0x29A, 0x00A, 0, 0, 0, 3400000, 6000000, 1, 1, 1, 2, 1, 0x00, 340000, 600000},\n+{594000, 594000, 5000, 2970000, 2970000, 0x3C, 0x03, 0x06, 600, 0x24A, 0x00A, 0, 0, 0, 5940000, 5940000, 1, 1, 1, 2, 2, 0x01, 297000, 297000},\n+{594000, 594000, 6250, 3712500, 3712500, 0x3C, 0x03, 0x06, 375, 0x169, 0x00A, 0, 0, 0, 3712500, 3712500, 1, 1, 1, 2, 1, 0x00, 371250, 371250},\n+{594000, 594000, 7500, 4455000, 4455000, 0x3C, 0x03, 0x06, 450, 0x1B4, 0x00A, 0, 0, 0, 4455000, 4455000, 1, 1, 1, 2, 1, 0x00, 445500, 445500},\n+};\n+\n+/* HDMI TX PLL tuning settings */\n+struct hdmi_pll_tuning {\n+\tu32 vco_freq_bin;\n+\tu32 vco_freq_min;\n+\tu32 vco_freq_max;\n+\tu32 volt_to_current_coarse;\n+\tu32 volt_to_current;\n+\tu32 ndac_ctrl;\n+\tu32 pmos_ctrl;\n+\tu32 ptat_ndac_ctrl;\n+\tu32 feedback_div_total;\n+\tu32 charge_pump_gain;\n+\tu32 coarse_code;\n+\tu32 v2i_code;\n+\tu32 vco_cal_code;\n+};\n+\n+/* HDMI TX PLL tuning settings, pixel clock is output */\n+static const struct hdmi_pll_tuning imx8mq_pll_table[] = {\n+/*    bin VCO_freq min/max  coar  cod NDAC  PMOS PTAT div-T P-Gain Coa V2I CAL */\n+    {  1, 1980000, 1980000, 0x4, 0x3, 0x0, 0x09, 0x09, 220, 0x42, 160, 5, 183 },\n+    {  2, 2160000, 2160000, 0x4, 0x3, 0x0, 0x09, 0x09, 240, 0x42, 166, 6, 208 },\n+    {  3, 2475000, 2475000, 0x5, 0x3, 0x1, 0x00, 0x07, 275, 0x42, 167, 6, 209 },\n+    {  4, 2700000, 2700000, 0x5, 0x3, 0x1, 0x00, 0x07, 300, 0x42, 188, 6, 230 },\n+    {  4, 2700000, 2700000, 0x5, 0x3, 0x1, 0x00, 0x07, 400, 0x4C, 188, 6, 230 },\n+    {  5, 2970000, 2970000, 0x6, 0x3, 0x1, 0x00, 0x07, 330, 0x42, 183, 6, 225 },\n+    {  6, 3240000, 3240000, 0x6, 0x3, 0x1, 0x00, 0x07, 360, 0x42, 203, 7, 256 },\n+    {  6, 3240000, 3240000, 0x6, 0x3, 0x1, 0x00, 0x07, 480, 0x4C, 203, 7, 256 },\n+    {  7, 3712500, 3712500, 0x4, 0x3, 0x0, 0x07, 0x0F, 550, 0x4C, 212, 7, 257 },\n+    {  8, 3960000, 3960000, 0x5, 0x3, 0x0, 0x07, 0x0F, 440, 0x42, 184, 6, 226 },\n+    {  9, 4320000, 4320000, 0x5, 0x3, 0x1, 0x07, 0x0F, 480, 0x42, 205, 7, 258 },\n+    { 10, 4455000, 4455000, 0x5, 0x3, 0x0, 0x07, 0x0F, 495, 0x42, 219, 7, 272 },\n+    { 10, 4455000, 4455000, 0x5, 0x3, 0x0, 0x07, 0x0F, 660, 0x4C, 219, 7, 272 },\n+    { 11, 4950000, 4950000, 0x6, 0x3, 0x1, 0x00, 0x07, 550, 0x42, 213, 7, 258 },\n+    { 12, 5940000, 5940000, 0x7, 0x3, 0x1, 0x00, 0x07, 660, 0x42, 244, 8, 292 },\n+};\n+\n+/* HDMI TX PLL tuning settings, pixel clock is input */\n+static const struct hdmi_pll_tuning imx8qm_pll_table[] = {\n+/*  bin VCO_freq min/max  coar  cod NDAC  PMOS PTAT div-T P-Gain  pad only */\n+\t{ 0, 1700000, 2000000, 0x3, 0x1, 0x0, 0x8C, 0x2E, 300, 0x08D, 0, 0, 0 },\n+\t{ 0, 1700000, 2000000, 0x3, 0x1, 0x0, 0x8C, 0x2E, 320, 0x08E, 0, 0, 0 },\n+\t{ 0, 1700000, 2000000, 0x3, 0x1, 0x0, 0x8C, 0x2E, 325, 0x08E, 0, 0, 0 },\n+\t{ 0, 1700000, 2000000, 0x3, 0x1, 0x0, 0x8C, 0x2E, 330, 0x08E, 0, 0, 0 },\n+\t{ 0, 1700000, 2000000, 0x3, 0x1, 0x0, 0x8C, 0x2E, 340, 0x08F, 0, 0, 0 },\n+\t{ 0, 1700000, 2000000, 0x3, 0x1, 0x0, 0x8C, 0x2E, 360, 0x0A7, 0, 0, 0 },\n+\t{ 0, 1700000, 2000000, 0x3, 0x1, 0x0, 0x8C, 0x2E, 400, 0x0C5, 0, 0, 0 },\n+\t{ 1, 2000000, 2400000, 0x3, 0x1, 0x0, 0x8C, 0x2E, 300, 0x086, 0, 0, 0 },\n+\t{ 1, 2000000, 2400000, 0x3, 0x1, 0x0, 0x8C, 0x2E, 320, 0x087, 0, 0, 0 },\n+\t{ 1, 2000000, 2400000, 0x3, 0x1, 0x0, 0x8C, 0x2E, 325, 0x087, 0, 0, 0 },\n+\t{ 1, 2000000, 2400000, 0x3, 0x1, 0x0, 0x8C, 0x2E, 330, 0x104, 0, 0, 0 },\n+\t{ 1, 2000000, 2400000, 0x3, 0x1, 0x0, 0x8C, 0x2E, 340, 0x08B, 0, 0, 0 },\n+\t{ 1, 2000000, 2400000, 0x3, 0x1, 0x0, 0x8C, 0x2E, 360, 0x08D, 0, 0, 0 },\n+\t{ 1, 2000000, 2400000, 0x3, 0x1, 0x0, 0x8C, 0x2E, 400, 0x0A6, 0, 0, 0 },\n+\t{ 2, 2400000, 2800000, 0x3, 0x1, 0x0, 0x04, 0x0D, 300, 0x04E, 0, 0, 0 },\n+\t{ 2, 2400000, 2800000, 0x3, 0x1, 0x0, 0x04, 0x0D, 320, 0x04F, 0, 0, 0 },\n+\t{ 2, 2400000, 2800000, 0x3, 0x1, 0x0, 0x04, 0x0D, 325, 0x04F, 0, 0, 0 },\n+\t{ 2, 2400000, 2800000, 0x3, 0x1, 0x0, 0x04, 0x0D, 330, 0x085, 0, 0, 0 },\n+\t{ 2, 2400000, 2800000, 0x3, 0x1, 0x0, 0x04, 0x0D, 340, 0x085, 0, 0, 0 },\n+\t{ 2, 2400000, 2800000, 0x3, 0x1, 0x0, 0x04, 0x0D, 360, 0x086, 0, 0, 0 },\n+\t{ 2, 2400000, 2800000, 0x3, 0x1, 0x0, 0x04, 0x0D, 400, 0x08B, 0, 0, 0 },\n+\t{ 3, 2800000, 3400000, 0x3, 0x1, 0x0, 0x04, 0x0D, 300, 0x047, 0, 0, 0 },\n+\t{ 3, 2800000, 3400000, 0x3, 0x1, 0x0, 0x04, 0x0D, 320, 0x04B, 0, 0, 0 },\n+\t{ 3, 2800000, 3400000, 0x3, 0x1, 0x0, 0x04, 0x0D, 325, 0x04B, 0, 0, 0 },\n+\t{ 3, 2800000, 3400000, 0x3, 0x1, 0x0, 0x04, 0x0D, 330, 0x04B, 0, 0, 0 },\n+\t{ 3, 2800000, 3400000, 0x3, 0x1, 0x0, 0x04, 0x0D, 340, 0x04D, 0, 0, 0 },\n+\t{ 3, 2800000, 3400000, 0x3, 0x1, 0x0, 0x04, 0x0D, 360, 0x04E, 0, 0, 0 },\n+\t{ 3, 2800000, 3400000, 0x3, 0x1, 0x0, 0x04, 0x0D, 400, 0x085, 0, 0, 0 },\n+\t{ 4, 3400000, 3900000, 0x7, 0x1, 0x0, 0x8E, 0x2F, 375, 0x041, 0, 0, 0 },\n+\t{ 4, 3400000, 3900000, 0x7, 0x1, 0x0, 0x8E, 0x2F, 600, 0x08D, 0, 0, 0 },\n+\t{ 4, 3400000, 3900000, 0x7, 0x1, 0x0, 0x8E, 0x2F, 680, 0x0A6, 0, 0, 0 },\n+\t{ 5, 3900000, 4500000, 0x7, 0x1, 0x0, 0x8E, 0x2F, 450, 0x041, 0, 0, 0 },\n+\t{ 5, 3900000, 4500000, 0x7, 0x1, 0x0, 0x8E, 0x2F, 600, 0x087, 0, 0, 0 },\n+\t{ 5, 3900000, 4500000, 0x7, 0x1, 0x0, 0x8E, 0x2F, 680, 0x0A4, 0, 0, 0 },\n+\t{ 6, 4500000, 5200000, 0x7, 0x1, 0x0, 0x04, 0x0D, 600, 0x04F, 0, 0, 0 },\n+\t{ 6, 4500000, 5200000, 0x7, 0x1, 0x0, 0x04, 0x0D, 680, 0x086, 0, 0, 0 },\n+\t{ 7, 5200000, 6000000, 0x7, 0x1, 0x0, 0x04, 0x0D, 600, 0x04D, 0, 0, 0 },\n+\t{ 7, 5200000, 6000000, 0x7, 0x1, 0x0, 0x04, 0x0D, 680, 0x04F, 0, 0, 0 }\n+};\n+\n+static void hdmi_arc_config(struct cdns_mhdp_device *mhdp)\n+{\n+\tu16 txpu_calib_code;\n+\tu16 txpd_calib_code;\n+\tu16 txpu_adj_calib_code;\n+\tu16 txpd_adj_calib_code;\n+\tu16 prev_calib_code;\n+\tu16 new_calib_code;\n+\tu16 rdata;\n+\n+\t/* Power ARC */\n+\tcdns_phy_reg_write(mhdp, TXDA_CYA_AUXDA_CYA, 0x0001);\n+\n+\tprev_calib_code = cdns_phy_reg_read(mhdp, TX_DIG_CTRL_REG_2);\n+\ttxpu_calib_code = cdns_phy_reg_read(mhdp, CMN_TXPUCAL_CTRL);\n+\ttxpd_calib_code = cdns_phy_reg_read(mhdp, CMN_TXPDCAL_CTRL);\n+\ttxpu_adj_calib_code = cdns_phy_reg_read(mhdp, CMN_TXPU_ADJ_CTRL);\n+\ttxpd_adj_calib_code = cdns_phy_reg_read(mhdp, CMN_TXPD_ADJ_CTRL);\n+\n+\tnew_calib_code = ((txpu_calib_code + txpd_calib_code) / 2)\n+\t\t+ txpu_adj_calib_code + txpd_adj_calib_code;\n+\n+\tif (new_calib_code != prev_calib_code) {\n+\t\trdata = cdns_phy_reg_read(mhdp, TX_ANA_CTRL_REG_1);\n+\t\trdata &= 0xDFFF;\n+\t\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_1, rdata);\n+\t\tcdns_phy_reg_write(mhdp, TX_DIG_CTRL_REG_2, new_calib_code);\n+\t\tmdelay(10);\n+\t\trdata |= 0x2000;\n+\t\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_1, rdata);\n+\t\tudelay(150);\n+\t}\n+\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_2, 0x0100);\n+\tudelay(100);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_2, 0x0300);\n+\tudelay(100);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_3, 0x0000);\n+\tudelay(100);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_1, 0x2008);\n+\tudelay(100);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_1, 0x2018);\n+\tudelay(100);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_1, 0x2098);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_2, 0x030C);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_5, 0x0010);\n+\tudelay(100);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_4, 0x4001);\n+\tmdelay(5);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_1, 0x2198);\n+\tmdelay(5);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_2, 0x030D);\n+\tudelay(100);\n+\tcdns_phy_reg_write(mhdp, TX_ANA_CTRL_REG_2, 0x030F);\n+}\n+\n+static void hdmi_phy_set_vswing(struct cdns_mhdp_device *mhdp)\n+{\n+\tconst u32 num_lanes = 4;\n+\tu32 k;\n+\n+\tfor (k = 0; k < num_lanes; k++) {\n+\t\tcdns_phy_reg_write(mhdp, (TX_DIAG_TX_DRV | (k << 9)), 0x7c0);\n+\t\tcdns_phy_reg_write(mhdp, (TX_TXCC_CPOST_MULT_00_0 | (k << 9)), 0x0);\n+\t\tcdns_phy_reg_write(mhdp, (TX_TXCC_CAL_SCLR_MULT_0 | (k << 9)), 0x120);\n+\t}\n+}\n+\n+static int hdmi_feedback_factor(struct cdns_mhdp_device *mhdp)\n+{\n+\tu32 feedback_factor;\n+\n+\tswitch (mhdp->video_info.color_fmt) {\n+\tcase YCBCR_4_2_2:\n+\t\tfeedback_factor = 1000;\n+\t\tbreak;\n+\tcase YCBCR_4_2_0:\n+\t\tswitch (mhdp->video_info.color_depth) {\n+\t\tcase 8:\n+\t\t\tfeedback_factor = 500;\n+\t\t\tbreak;\n+\t\tcase 10:\n+\t\t\tfeedback_factor = 625;\n+\t\t\tbreak;\n+\t\tcase 12:\n+\t\t\tfeedback_factor = 750;\n+\t\t\tbreak;\n+\t\tcase 16:\n+\t\t\tfeedback_factor = 1000;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tDRM_ERROR(\"Invalid ColorDepth\\n\");\n+\t\t\treturn 0;\n+\t\t}\n+\t\tbreak;\n+\tdefault:\n+\t\t/* Assume RGB/YUV444 */\n+\t\tswitch (mhdp->video_info.color_depth) {\n+\t\tcase 10:\n+\t\t\tfeedback_factor = 1250;\n+\t\t\tbreak;\n+\t\tcase 12:\n+\t\t\tfeedback_factor = 1500;\n+\t\t\tbreak;\n+\t\tcase 16:\n+\t\t\tfeedback_factor = 2000;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tfeedback_factor = 1000;\n+\t\t}\n+\t}\n+\treturn feedback_factor;\n+}\n+\n+static int hdmi_phy_config(struct cdns_mhdp_device *mhdp,\n+\t\t\t\t\tconst struct hdmi_ctrl *p_ctrl_table,\n+\t\t\t\t\tconst struct hdmi_pll_tuning *p_pll_table,\n+\t\t\t\t\tchar pclk_in)\n+{\n+\tconst u32 num_lanes = 4;\n+\tu32 val, i, k;\n+\n+\t/* enable PHY isolation mode only for CMN */\n+\tcdns_phy_reg_write(mhdp, PHY_PMA_ISOLATION_CTRL, 0xD000);\n+\n+\t/* set cmn_pll0_clk_datart1_div/cmn_pll0_clk_datart0_div dividers */\n+\tval = cdns_phy_reg_read(mhdp, PHY_PMA_ISO_PLL_CTRL1);\n+\tval &= 0xFF00;\n+\tval |= 0x0012;\n+\tcdns_phy_reg_write(mhdp, PHY_PMA_ISO_PLL_CTRL1, val);\n+\n+\t/* assert PHY reset from isolation register */\n+\tcdns_phy_reg_write(mhdp, PHY_ISO_CMN_CTRL, 0x0000);\n+\t/* assert PMA CMN reset */\n+\tcdns_phy_reg_write(mhdp, PHY_PMA_ISO_CMN_CTRL, 0x0000);\n+\n+\t/* register XCVR_DIAG_BIDI_CTRL */\n+\tfor (k = 0; k < num_lanes; k++)\n+\t\tcdns_phy_reg_write(mhdp, XCVR_DIAG_BIDI_CTRL | (k << 9), 0x00FF);\n+\n+\t/* Describing Task phy_cfg_hdp */\n+\n+\tval = cdns_phy_reg_read(mhdp, PHY_PMA_CMN_CTRL1);\n+\tval &= 0xFFF7;\n+\tval |= 0x0008;\n+\tcdns_phy_reg_write(mhdp, PHY_PMA_CMN_CTRL1, val);\n+\n+\t/* PHY Registers */\n+\tval = cdns_phy_reg_read(mhdp, PHY_PMA_CMN_CTRL1);\n+\tval &= 0xCFFF;\n+\tval |= p_ctrl_table->cmn_ref_clk_dig_div << 12;\n+\tcdns_phy_reg_write(mhdp, PHY_PMA_CMN_CTRL1, val);\n+\n+\tval = cdns_phy_reg_read(mhdp, PHY_HDP_CLK_CTL);\n+\tval &= 0x00FF;\n+\tval |= 0x1200;\n+\tcdns_phy_reg_write(mhdp, PHY_HDP_CLK_CTL, val);\n+\n+\t/* Common control module control and diagnostic registers */\n+\tval = cdns_phy_reg_read(mhdp, CMN_CDIAG_REFCLK_CTRL);\n+\tval &= 0x8FFF;\n+\tval |= p_ctrl_table->ref_clk_divider_scaler << 12;\n+\tval |= 0x00C0;\n+\tcdns_phy_reg_write(mhdp, CMN_CDIAG_REFCLK_CTRL, val);\n+\n+\t/* High speed clock used */\n+\tval = cdns_phy_reg_read(mhdp, CMN_DIAG_HSCLK_SEL);\n+\tval &= 0xFF00;\n+\tval |= (p_ctrl_table->cmnda_hs_clk_0_sel >> 1) << 0;\n+\tval |= (p_ctrl_table->cmnda_hs_clk_1_sel >> 1) << 4;\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_HSCLK_SEL, val);\n+\n+\tfor (k = 0; k < num_lanes; k++) {\n+\t\tval = cdns_phy_reg_read(mhdp, (XCVR_DIAG_HSCLK_SEL | (k << 9)));\n+\t\tval &= 0xCFFF;\n+\t\tval |= (p_ctrl_table->cmnda_hs_clk_0_sel >> 1) << 12;\n+\t\tcdns_phy_reg_write(mhdp, (XCVR_DIAG_HSCLK_SEL | (k << 9)), val);\n+\t}\n+\n+\t/* PLL 0 control state machine registers */\n+\tval = p_ctrl_table->vco_ring_select << 12;\n+\tcdns_phy_reg_write(mhdp, CMN_PLLSM0_USER_DEF_CTRL, val);\n+\n+\tif (pclk_in == true)\n+\t\tval = 0x30A0;\n+\telse {\n+\t\tval = cdns_phy_reg_read(mhdp, CMN_PLL0_VCOCAL_START);\n+\t\tval &= 0xFE00;\n+\t\tval |= p_pll_table->vco_cal_code;\n+\t}\n+\tcdns_phy_reg_write(mhdp, CMN_PLL0_VCOCAL_START, val);\n+\n+\tcdns_phy_reg_write(mhdp, CMN_PLL0_VCOCAL_INIT_TMR, 0x0064);\n+\tcdns_phy_reg_write(mhdp, CMN_PLL0_VCOCAL_ITER_TMR, 0x000A);\n+\n+\t/* Common functions control and diagnostics registers */\n+\tval = p_ctrl_table->cmnda_pll0_hs_sym_div_sel << 8;\n+\tval |= p_ctrl_table->cmnda_pll0_ip_div;\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_PLL0_INCLK_CTRL, val);\n+\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_PLL0_OVRD, 0x0000);\n+\n+\tval = p_ctrl_table->cmnda_pll0_fb_div_high;\n+\tval |= (1 << 15);\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_PLL0_FBH_OVRD, val);\n+\n+\tval = p_ctrl_table->cmnda_pll0_fb_div_low;\n+\tval |= (1 << 15);\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_PLL0_FBL_OVRD, val);\n+\n+\tif (pclk_in == false) {\n+\t\tval = p_ctrl_table->cmnda_pll0_pxdiv_low;\n+\t\tcdns_phy_reg_write(mhdp, CMN_DIAG_PLL0_PXL_DIVL, val);\n+\n+\t\tval = p_ctrl_table->cmnda_pll0_pxdiv_high;\n+\t\tval |= (1 << 15);\n+\t\tcdns_phy_reg_write(mhdp, CMN_DIAG_PLL0_PXL_DIVH, val);\n+\t}\n+\n+\tval = p_pll_table->volt_to_current_coarse;\n+\tval |= (p_pll_table->volt_to_current) << 4;\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_PLL0_V2I_TUNE, val);\n+\n+\tval = p_pll_table->charge_pump_gain;\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_PLL0_CP_TUNE, val);\n+\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_PLL0_LF_PROG, 0x0008);\n+\n+\tval = p_pll_table->pmos_ctrl;\n+\tval |= (p_pll_table->ndac_ctrl) << 8;\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_PLL0_PTATIS_TUNE1, val);\n+\n+\tval = p_pll_table->ptat_ndac_ctrl;\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_PLL0_PTATIS_TUNE2, val);\n+\n+\tif (pclk_in == true)\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_PLL0_TEST_MODE, 0x0022);\n+\telse\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_PLL0_TEST_MODE, 0x0020);\n+\tcdns_phy_reg_write(mhdp, CMN_PSM_CLK_CTRL, 0x0016);\n+\n+\t/* Transceiver control and diagnostic registers */\n+\tfor (k = 0; k < num_lanes; k++) {\n+\t\tval = cdns_phy_reg_read(mhdp, (XCVR_DIAG_PLLDRC_CTRL | (k << 9)));\n+\t\tval &= 0xBFFF;\n+\t\tcdns_phy_reg_write(mhdp, (XCVR_DIAG_PLLDRC_CTRL | (k << 9)), val);\n+\t}\n+\n+\tfor (k = 0; k < num_lanes; k++) {\n+\t\tval = cdns_phy_reg_read(mhdp, (TX_DIAG_TX_CTRL | (k << 9)));\n+\t\tval &= 0xFF3F;\n+\t\tval |= (p_ctrl_table->hsclk_div_tx_sub_rate >> 1) << 6;\n+\t\tcdns_phy_reg_write(mhdp, (TX_DIAG_TX_CTRL | (k << 9)), val);\n+\t}\n+\n+\t/*\n+\t * for single ended reference clock val |= 0x0030;\n+\t * for differential clock  val |= 0x0000;\n+\t */\n+\tval = cdns_phy_reg_read(mhdp, PHY_PMA_CMN_CTRL1);\n+\tval &= 0xFF8F;\n+\tif (pclk_in == true)\n+\t\tval |= 0x0030;\n+\tcdns_phy_reg_write(mhdp, PHY_PMA_CMN_CTRL1, val);\n+\n+\t/* for differential clock on the refclk_p and\n+\t * refclk_m off chip pins: CMN_DIAG_ACYA[8]=1'b1 */\n+\tcdns_phy_reg_write(mhdp, CMN_DIAG_ACYA, 0x0100);\n+\n+\t/* Deassert PHY reset */\n+\tcdns_phy_reg_write(mhdp, PHY_ISO_CMN_CTRL, 0x0001);\n+\tcdns_phy_reg_write(mhdp, PHY_PMA_ISO_CMN_CTRL, 0x0003);\n+\n+\t/* Power state machine registers */\n+\tfor (k = 0; k < num_lanes; k++)\n+\t\tcdns_phy_reg_write(mhdp, XCVR_PSM_RCTRL | (k << 9), 0xFEFC);\n+\n+\t/* Assert cmn_macro_pwr_en */\n+\tcdns_phy_reg_write(mhdp, PHY_PMA_ISO_CMN_CTRL, 0x0013);\n+\n+\t/* wait for cmn_macro_pwr_en_ack */\n+\tfor (i = 0; i < 10; i++) {\n+\t\tval = cdns_phy_reg_read(mhdp, PHY_PMA_ISO_CMN_CTRL);\n+\t\tif (val & (1 << 5))\n+\t\t\tbreak;\n+\t\tmsleep(20);\n+\t}\n+\tif (i == 10) {\n+\t\tDRM_ERROR(\"PMA ouput macro power up failed\\n\");\n+\t\treturn false;\n+\t}\n+\n+\t/* wait for cmn_ready */\n+\tfor (i = 0; i < 10; i++) {\n+\t\tval = cdns_phy_reg_read(mhdp, PHY_PMA_CMN_CTRL1);\n+\t\tif (val & (1 << 0))\n+\t\t\tbreak;\n+\t\tmsleep(20);\n+\t}\n+\tif (i == 10) {\n+\t\tDRM_ERROR(\"PMA output ready failed\\n\");\n+\t\treturn false;\n+\t}\n+\n+\tfor (k = 0; k < num_lanes; k++) {\n+\t\tcdns_phy_reg_write(mhdp, TX_PSC_A0 | (k << 9), 0x6791);\n+\t\tcdns_phy_reg_write(mhdp, TX_PSC_A1 | (k << 9), 0x6790);\n+\t\tcdns_phy_reg_write(mhdp, TX_PSC_A2 | (k << 9), 0x0090);\n+\t\tcdns_phy_reg_write(mhdp, TX_PSC_A3 | (k << 9), 0x0090);\n+\n+\t\tval = cdns_phy_reg_read(mhdp, RX_PSC_CAL | (k << 9));\n+\t\tval &= 0xFFBB;\n+\t\tcdns_phy_reg_write(mhdp, RX_PSC_CAL | (k << 9), val);\n+\n+\t\tval = cdns_phy_reg_read(mhdp, RX_PSC_A0 | (k << 9));\n+\t\tval &= 0xFFBB;\n+\t\tcdns_phy_reg_write(mhdp, RX_PSC_A0 | (k << 9), val);\n+\t}\n+\treturn true;\n+}\n+\n+static int hdmi_phy_cfg_t28hpc(struct cdns_mhdp_device *mhdp,\n+\t\t\t\tstruct drm_display_mode *mode)\n+{\n+\tconst struct hdmi_ctrl *p_ctrl_table;\n+\tconst struct hdmi_pll_tuning *p_pll_table;\n+\tconst u32 refclk_freq_khz = 27000;\n+\tconst u8 pclk_in = false;\n+\tu32 pixel_freq = mode->clock;\n+\tu32 vco_freq, char_freq;\n+\tu32 div_total, feedback_factor;\n+\tu32 i, ret;\n+\n+\tfeedback_factor = hdmi_feedback_factor(mhdp);\n+\n+\tchar_freq = pixel_freq * feedback_factor / 1000;\n+\n+\tDRM_INFO(\"Pixel clock: %d KHz, character clock: %d, bpc is %0d-bit.\\n\",\n+\t     pixel_freq, char_freq, mhdp->video_info.color_depth);\n+\n+\t/* Get right row from the ctrl_table table.\n+\t * Check if 'pixel_freq_khz' value matches the PIXEL_CLK_FREQ column.\n+\t * Consider only the rows with FEEDBACK_FACTOR column matching feedback_factor. */\n+\tfor (i = 0; i < ARRAY_SIZE(imx8mq_ctrl_table); i++) {\n+\t\tif (feedback_factor == imx8mq_ctrl_table[i].feedback_factor &&\n+\t\t\t\tpixel_freq == imx8mq_ctrl_table[i].pixel_clk_freq_min) {\n+\t\t\tp_ctrl_table = &imx8mq_ctrl_table[i];\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\tif (i == ARRAY_SIZE(imx8mq_ctrl_table)) {\n+\t\tDRM_WARN(\"Pixel clk (%d KHz) not supported, color depth (%0d-bit)\\n\",\n+\t\t     pixel_freq, mhdp->video_info.color_depth);\n+\t\treturn 0;\n+\t}\n+\n+\tdiv_total = p_ctrl_table->pll_fb_div_total;\n+\tvco_freq = refclk_freq_khz * div_total / p_ctrl_table->cmnda_pll0_ip_div;\n+\n+\t/* Get right row from the imx8mq_pll_table table.\n+\t * Check if vco_freq_khz and feedback_div_total\n+\t * column matching with imx8mq_pll_table. */\n+\tfor (i = 0; i < ARRAY_SIZE(imx8mq_pll_table); i++) {\n+\t\tif (vco_freq == imx8mq_pll_table[i].vco_freq_min &&\n+\t\t\t\tdiv_total == imx8mq_pll_table[i].feedback_div_total) {\n+\t\t\tp_pll_table = &imx8mq_pll_table[i];\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\tif (i == ARRAY_SIZE(imx8mq_pll_table)) {\n+\t\tDRM_WARN(\"VCO (%d KHz) not supported\\n\", vco_freq);\n+\t\treturn 0;\n+\t}\n+\tDRM_INFO(\"VCO frequency is %d KHz\\n\", vco_freq);\n+\n+\tret = hdmi_phy_config(mhdp, p_ctrl_table, p_pll_table, pclk_in);\n+\tif (ret == false)\n+\t\treturn 0;\n+\n+\treturn char_freq;\n+}\n+\n+static int hdmi_phy_cfg_ss28fdsoi(struct cdns_mhdp_device *mhdp,\n+\t\t\t\tstruct drm_display_mode *mode)\n+{\n+\tconst struct hdmi_ctrl *p_ctrl_table;\n+\tconst struct hdmi_pll_tuning *p_pll_table;\n+\tconst u8 pclk_in = true;\n+\tu32 pixel_freq = mode->clock;\n+\tu32 vco_freq, char_freq;\n+\tu32 div_total, feedback_factor;\n+\tu32 ret, i;\n+\n+\tfeedback_factor = hdmi_feedback_factor(mhdp);\n+\n+\tchar_freq = pixel_freq * feedback_factor / 1000;\n+\n+\tDRM_INFO(\"Pixel clock: %d KHz, character clock: %d, bpc is %0d-bit.\\n\",\n+\t     pixel_freq, char_freq, mhdp->video_info.color_depth);\n+\n+\t/* Get right row from the ctrl_table table.\n+\t * Check if 'pixel_freq_khz' value matches the PIXEL_CLK_FREQ column.\n+\t * Consider only the rows with FEEDBACK_FACTOR column matching feedback_factor. */\n+\tfor (i = 0; i < ARRAY_SIZE(imx8qm_ctrl_table); i++) {\n+\t\tif (feedback_factor == imx8qm_ctrl_table[i].feedback_factor &&\n+\t\t\t\tpixel_freq >= imx8qm_ctrl_table[i].pixel_clk_freq_min &&\n+\t\t\t\tpixel_freq <= imx8qm_ctrl_table[i].pixel_clk_freq_max) {\n+\t\t\tp_ctrl_table = &imx8qm_ctrl_table[i];\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\tif (i == ARRAY_SIZE(imx8qm_ctrl_table)) {\n+\t\tDRM_WARN(\"Pixel clk (%d KHz) not supported, color depth (%0d-bit)\\n\",\n+\t\t     pixel_freq, mhdp->video_info.color_depth);\n+\t\treturn 0;\n+\t}\n+\n+\tdiv_total = p_ctrl_table->pll_fb_div_total;\n+\tvco_freq = pixel_freq * div_total / p_ctrl_table->cmnda_pll0_ip_div;\n+\n+\t/* Get right row from the imx8mq_pll_table table.\n+\t * Check if vco_freq_khz and feedback_div_total\n+\t * column matching with imx8mq_pll_table. */\n+\tfor (i = 0; i < ARRAY_SIZE(imx8qm_pll_table); i++) {\n+\t\tif (vco_freq >= imx8qm_pll_table[i].vco_freq_min &&\n+\t\t\t\tvco_freq < imx8qm_pll_table[i].vco_freq_max &&\n+\t\t\t\tdiv_total == imx8qm_pll_table[i].feedback_div_total) {\n+\t\t\tp_pll_table = &imx8qm_pll_table[i];\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\tif (i == ARRAY_SIZE(imx8qm_pll_table)) {\n+\t\tDRM_WARN(\"VCO (%d KHz) not supported\\n\", vco_freq);\n+\t\treturn 0;\n+\t}\n+\tDRM_INFO(\"VCO frequency is %d KHz\\n\", vco_freq);\n+\n+\tret = hdmi_phy_config(mhdp, p_ctrl_table, p_pll_table, pclk_in);\n+\tif (ret == false)\n+\t\treturn 0;\n+\n+\treturn char_freq;\n+}\n+\n+static int hdmi_phy_power_up(struct cdns_mhdp_device *mhdp)\n+{\n+\tu32 val, i;\n+\n+\t/* set Power State to A2 */\n+\tcdns_phy_reg_write(mhdp, PHY_HDP_MODE_CTRL, 0x0004);\n+\n+\tcdns_phy_reg_write(mhdp, TX_DIAG_ACYA_0, 1);\n+\tcdns_phy_reg_write(mhdp, TX_DIAG_ACYA_1, 1);\n+\tcdns_phy_reg_write(mhdp, TX_DIAG_ACYA_2, 1);\n+\tcdns_phy_reg_write(mhdp, TX_DIAG_ACYA_3, 1);\n+\n+\t/* Wait for Power State A2 Ack */\n+\tfor (i = 0; i < 10; i++) {\n+\t\tval = cdns_phy_reg_read(mhdp, PHY_HDP_MODE_CTRL);\n+\t\tif (val & (1 << 6))\n+\t\t\tbreak;\n+\t\tmsleep(20);\n+\t}\n+\tif (i == 10) {\n+\t\tdev_err(mhdp->dev, \"Wait A2 Ack failed\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\t/* Power up ARC */\n+\thdmi_arc_config(mhdp);\n+\n+\t/* Configure PHY in A0 mode (PHY must be in the A0 power\n+\t * state in order to transmit data)\n+\t */\n+\t//cdns_phy_reg_write(mhdp, PHY_HDP_MODE_CTRL, 0x0101); //imx8mq\n+\tcdns_phy_reg_write(mhdp, PHY_HDP_MODE_CTRL, 0x0001);\n+\n+\t/* Wait for Power State A0 Ack */\n+\tfor (i = 0; i < 10; i++) {\n+\t\tval = cdns_phy_reg_read(mhdp, PHY_HDP_MODE_CTRL);\n+\t\tif (val & (1 << 4))\n+\t\t\tbreak;\n+\t\tmsleep(20);\n+\t}\n+\tif (i == 10) {\n+\t\tdev_err(mhdp->dev, \"Wait A0 Ack failed\\n\");\n+\t\treturn -1;\n+\t}\n+\treturn 0;\n+}\n+\n+bool cdns_hdmi_phy_video_valid_imx8mq(struct cdns_mhdp_device *mhdp)\n+{\n+\tu32 rate = mhdp->valid_mode->clock;\n+\tint i;\n+\n+\tfor (i = 0; i < ARRAY_SIZE(imx8mq_ctrl_table); i++)\n+\t\t\tif(rate == imx8mq_ctrl_table[i].pixel_clk_freq_min)\n+\t\t\t\treturn true;\n+\treturn false;\n+}\n+\n+int cdns_hdmi_phy_set_imx8mq(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct drm_display_mode *mode = &mhdp->mode;\n+\tint ret;\n+\n+\t/* Check HDMI FW alive before HDMI PHY init */\n+\tret = cdns_mhdp_check_alive(mhdp);\n+\tif (ret == false) {\n+\t\tDRM_ERROR(\"NO HDMI FW running\\n\");\n+\t\treturn -ENXIO;\n+\t}\n+\n+\t/* Configure PHY */\n+\tmhdp->hdmi.char_rate = hdmi_phy_cfg_t28hpc(mhdp, mode);\n+\tif (mhdp->hdmi.char_rate == 0) {\n+\t\tDRM_ERROR(\"failed to set phy pclock\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tret = hdmi_phy_power_up(mhdp);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\thdmi_phy_set_vswing(mhdp);\n+\n+\treturn true;\n+}\n+\n+bool cdns_hdmi_phy_video_valid_imx8qm(struct cdns_mhdp_device *mhdp)\n+{\n+\tu32 rate = mhdp->valid_mode->clock;\n+\tint i;\n+\n+\tfor (i = 0; i < ARRAY_SIZE(imx8qm_ctrl_table); i++)\n+\t\t\tif(rate >= imx8qm_ctrl_table[i].pixel_clk_freq_min &&\n+\t\t\t\trate <= imx8qm_ctrl_table[i].pixel_clk_freq_max)\n+\t\t\t\treturn true;\n+\treturn false;\n+}\n+\n+int cdns_hdmi_phy_set_imx8qm(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct drm_display_mode *mode = &mhdp->mode;\n+\tint ret;\n+\n+\t/* Check HDMI FW alive before HDMI PHY init */\n+\tret = cdns_mhdp_check_alive(mhdp);\n+\tif (ret == false) {\n+\t\tDRM_ERROR(\"NO HDMI FW running\\n\");\n+\t\treturn -ENXIO;\n+\t}\n+\n+\t/* Configure PHY */\n+\tmhdp->hdmi.char_rate = hdmi_phy_cfg_ss28fdsoi(mhdp, mode);\n+\tif (mhdp->hdmi.char_rate == 0) {\n+\t\tDRM_ERROR(\"failed to set phy pclock\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tret = hdmi_phy_power_up(mhdp);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\thdmi_phy_set_vswing(mhdp);\n+\n+\treturn true;\n+}\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx.h b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx.h\nnew file mode 100644\nindex 000000000000..fc3247dada2d\n--- /dev/null\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx.h\n@@ -0,0 +1,75 @@\n+/*\n+ * Cadence High-Definition Multimedia Interface (HDMI) driver\n+ *\n+ * Copyright (C) 2019 NXP Semiconductor, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ *\n+ */\n+#ifndef CDNS_MHDP_IMX_H_\n+#define CDNS_MHDP_IMX_H_\n+\n+#include <drm/bridge/cdns-mhdp.h>\n+#include <drm/drm_encoder_slave.h>\n+\n+\n+struct imx_mhdp_device;\n+\n+struct imx_hdp_clks {\n+\tstruct clk *av_pll;\n+\tstruct clk *dig_pll;\n+\tstruct clk *clk_ipg;\n+\tstruct clk *clk_core;\n+\tstruct clk *clk_pxl;\n+\tstruct clk *clk_pxl_mux;\n+\tstruct clk *clk_pxl_link;\n+\n+\tstruct clk *lpcg_hdp;\n+\tstruct clk *lpcg_msi;\n+\tstruct clk *lpcg_pxl;\n+\tstruct clk *lpcg_vif;\n+\tstruct clk *lpcg_lis;\n+\tstruct clk *lpcg_apb;\n+\tstruct clk *lpcg_apb_csr;\n+\tstruct clk *lpcg_apb_ctrl;\n+\n+\tstruct clk *lpcg_i2s;\n+\tstruct clk *clk_i2s_bypass;\n+};\n+\n+struct imx_mhdp_device {\n+\tstruct cdns_mhdp_device mhdp;\n+\tstruct drm_encoder encoder;\n+\n+\tstruct mutex audio_mutex;\n+\tspinlock_t audio_lock;\n+\tbool connected;\n+\tbool active;\n+\tbool suspended;\n+\tstruct imx_hdp_clks clks;\n+\tconst struct firmware *fw;\n+\tconst char *firmware_name;\n+\n+\tint bus_type;\n+\n+\tstruct device\t\t*pd_mhdp_dev;\n+\tstruct device\t\t*pd_pll0_dev;\n+\tstruct device\t\t*pd_pll1_dev;\n+\tstruct device_link\t*pd_mhdp_link;\n+\tstruct device_link\t*pd_pll0_link;\n+\tstruct device_link\t*pd_pll1_link;\n+};\n+\n+void cdns_mhdp_plat_init_imx8qm(struct cdns_mhdp_device *mhdp);\n+void cdns_mhdp_plat_deinit_imx8qm(struct cdns_mhdp_device *mhdp);\n+void cdns_mhdp_pclk_rate_imx8qm(struct cdns_mhdp_device *mhdp);\n+int cdns_mhdp_firmware_init_imx8qm(struct cdns_mhdp_device *mhdp);\n+int cdns_mhdp_resume_imx8qm(struct cdns_mhdp_device *mhdp);\n+int cdns_mhdp_suspend_imx8qm(struct cdns_mhdp_device *mhdp);\n+int cdns_mhdp_power_on_imx8qm(struct cdns_mhdp_device *mhdp);\n+int cdns_mhdp_power_on_ls1028a(struct cdns_mhdp_device *mhdp);\n+void cdns_mhdp_pclk_rate_ls1028a(struct cdns_mhdp_device *mhdp);\n+#endif /* CDNS_MHDP_IMX_H_ */\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c\nnew file mode 100644\nindex 000000000000..a3ba3da4b05d\n--- /dev/null\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c\n@@ -0,0 +1,638 @@\n+/*\n+ * copyright (c) 2019 nxp semiconductor, inc.\n+ *\n+ * this program is free software; you can redistribute it and/or modify\n+ * it under the terms of the gnu general public license version 2 as\n+ * published by the free software foundation.\n+ */\n+#include <dt-bindings/firmware/imx/rsrc.h>\n+#include <linux/firmware/imx/sci.h>\n+#include <linux/firmware.h>\n+#include <linux/pm_domain.h>\n+#include <linux/clk.h>\n+#include <drm/drm_vblank.h>\n+#include <drm/drm_print.h>\n+\n+#include \"cdns-mhdp-imx.h\"\n+\n+#define FW_IRAM_OFFSET\t\t0x2000\n+#define FW_IRAM_SIZE\t\t0x10000\n+#define FW_DRAM_SIZE\t\t0x8000\n+\n+#define PLL_800MHZ (800000000)\n+\n+#define HDP_DUAL_MODE_MIN_PCLK_RATE\t300000\t/* KHz */\n+#define HDP_SINGLE_MODE_MAX_WIDTH\t1920\n+\n+#define CSR_PIXEL_LINK_MUX_CTL\t\t0x00\n+#define CSR_PIXEL_LINK_MUX_VCP_OFFSET\t\t5\n+#define CSR_PIXEL_LINK_MUX_HCP_OFFSET\t\t4\n+\n+static bool imx8qm_video_dual_mode(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct drm_display_mode *mode = &mhdp->mode;\n+\treturn (mode->clock > HDP_DUAL_MODE_MIN_PCLK_RATE ||\n+\t\tmode->hdisplay > HDP_SINGLE_MODE_MAX_WIDTH) ? true : false;\n+}\n+\n+static void imx8qm_pixel_link_mux(struct imx_mhdp_device *imx_mhdp)\n+{\n+\tstruct drm_display_mode *mode = &imx_mhdp->mhdp.mode;\n+\tbool dual_mode;\n+\tu32 val;\n+\n+\tdual_mode = imx8qm_video_dual_mode(&imx_mhdp->mhdp);\n+\n+\tval = 0x4;\t/* RGB */\n+\tif (dual_mode)\n+\t\tval |= 0x2;\t/* pixel link 0 and 1 are active */\n+\tif (mode->flags & DRM_MODE_FLAG_PVSYNC)\n+\t\tval |= 1 << CSR_PIXEL_LINK_MUX_VCP_OFFSET;\n+\tif (mode->flags & DRM_MODE_FLAG_PHSYNC)\n+\t\tval |= 1 << CSR_PIXEL_LINK_MUX_HCP_OFFSET;\n+\tif (mode->flags & DRM_MODE_FLAG_INTERLACE)\n+\t\tval |= 0x2;\n+\n+\twritel(val, imx_mhdp->mhdp.regs_sec);\n+}\n+\n+static void imx8qm_pixel_link_valid(u32 dual_mode)\n+{\n+\tstruct imx_sc_ipc *handle;\n+\n+\timx_scu_get_handle(&handle);\n+\n+\timx_sc_misc_set_control(handle, IMX_SC_R_DC_0, IMX_SC_C_PXL_LINK_MST1_VLD, 1);\n+\tif (dual_mode)\n+\t\timx_sc_misc_set_control(handle, IMX_SC_R_DC_0, IMX_SC_C_PXL_LINK_MST2_VLD, 1);\n+}\n+\n+static void imx8qm_pixel_link_invalid(u32 dual_mode)\n+{\n+\tstruct imx_sc_ipc *handle;\n+\n+\timx_scu_get_handle(&handle);\n+\n+\timx_sc_misc_set_control(handle, IMX_SC_R_DC_0, IMX_SC_C_PXL_LINK_MST1_VLD, 0);\n+\tif (dual_mode)\n+\t\timx_sc_misc_set_control(handle, IMX_SC_R_DC_0, IMX_SC_C_PXL_LINK_MST2_VLD, 0);\n+}\n+\n+static void imx8qm_pixel_link_sync_enable(u32 dual_mode)\n+{\n+\tstruct imx_sc_ipc *handle;\n+\n+\timx_scu_get_handle(&handle);\n+\n+\tif (dual_mode)\n+\t\timx_sc_misc_set_control(handle, IMX_SC_R_DC_0, IMX_SC_C_SYNC_CTRL, 3);\n+\telse\n+\t\timx_sc_misc_set_control(handle, IMX_SC_R_DC_0, IMX_SC_C_SYNC_CTRL0, 1);\n+}\n+\n+static void imx8qm_pixel_link_sync_disable(u32 dual_mode)\n+{\n+\tstruct imx_sc_ipc *handle;\n+\n+\timx_scu_get_handle(&handle);\n+\n+\tif (dual_mode)\n+\t\timx_sc_misc_set_control(handle, IMX_SC_R_DC_0, IMX_SC_C_SYNC_CTRL, 0);\n+\telse\n+\t\timx_sc_misc_set_control(handle, IMX_SC_R_DC_0, IMX_SC_C_SYNC_CTRL0, 0);\n+}\n+\n+static void imx8qm_phy_reset(u8 reset)\n+{\n+\tstruct imx_sc_ipc *handle;\n+\n+\timx_scu_get_handle(&handle);\n+\n+\t/* set the pixel link mode and pixel type */\n+\timx_sc_misc_set_control(handle, IMX_SC_R_HDMI, IMX_SC_C_PHY_RESET, reset);\n+}\n+\n+static void imx8qm_clk_mux(u8 is_dp)\n+{\n+\tstruct imx_sc_ipc *handle;\n+\n+\timx_scu_get_handle(&handle);\n+\n+\tif (is_dp)\n+\t\t/* Enable the 24MHz for HDP PHY */\n+\t\timx_sc_misc_set_control(handle, IMX_SC_R_HDMI, IMX_SC_C_MODE, 1);\n+\telse\n+\t\timx_sc_misc_set_control(handle, IMX_SC_R_HDMI, IMX_SC_C_MODE, 0);\n+}\n+\n+int imx8qm_clocks_init(struct imx_mhdp_device *imx_mhdp)\n+{\n+\tstruct device *dev = imx_mhdp->mhdp.dev;\n+\tstruct imx_hdp_clks *clks = &imx_mhdp->clks;\n+\n+\tclks->dig_pll = devm_clk_get(dev, \"dig_pll\");\n+\tif (IS_ERR(clks->dig_pll)) {\n+\t\tdev_warn(dev, \"failed to get dig pll clk\\n\");\n+\t\treturn PTR_ERR(clks->dig_pll);\n+\t}\n+\n+\tclks->av_pll = devm_clk_get(dev, \"av_pll\");\n+\tif (IS_ERR(clks->av_pll)) {\n+\t\tdev_warn(dev, \"failed to get av pll clk\\n\");\n+\t\treturn PTR_ERR(clks->av_pll);\n+\t}\n+\n+\tclks->clk_ipg = devm_clk_get(dev, \"clk_ipg\");\n+\tif (IS_ERR(clks->clk_ipg)) {\n+\t\tdev_warn(dev, \"failed to get dp ipg clk\\n\");\n+\t\treturn PTR_ERR(clks->clk_ipg);\n+\t}\n+\n+\tclks->clk_core = devm_clk_get(dev, \"clk_core\");\n+\tif (IS_ERR(clks->clk_core)) {\n+\t\tdev_warn(dev, \"failed to get hdp core clk\\n\");\n+\t\treturn PTR_ERR(clks->clk_core);\n+\t}\n+\n+\tclks->clk_pxl = devm_clk_get(dev, \"clk_pxl\");\n+\tif (IS_ERR(clks->clk_pxl)) {\n+\t\tdev_warn(dev, \"failed to get pxl clk\\n\");\n+\t\treturn PTR_ERR(clks->clk_pxl);\n+\t}\n+\n+\tclks->clk_pxl_mux = devm_clk_get(dev, \"clk_pxl_mux\");\n+\tif (IS_ERR(clks->clk_pxl_mux)) {\n+\t\tdev_warn(dev, \"failed to get pxl mux clk\\n\");\n+\t\treturn PTR_ERR(clks->clk_pxl_mux);\n+\t}\n+\n+\tclks->clk_pxl_link = devm_clk_get(dev, \"clk_pxl_link\");\n+\tif (IS_ERR(clks->clk_pxl_mux)) {\n+\t\tdev_warn(dev, \"failed to get pxl link clk\\n\");\n+\t\treturn PTR_ERR(clks->clk_pxl_link);\n+\t}\n+\n+\tclks->lpcg_hdp = devm_clk_get(dev, \"lpcg_hdp\");\n+\tif (IS_ERR(clks->lpcg_hdp)) {\n+\t\tdev_warn(dev, \"failed to get lpcg hdp clk\\n\");\n+\t\treturn PTR_ERR(clks->lpcg_hdp);\n+\t}\n+\n+\tclks->lpcg_msi = devm_clk_get(dev, \"lpcg_msi\");\n+\tif (IS_ERR(clks->lpcg_msi)) {\n+\t\tdev_warn(dev, \"failed to get lpcg msi clk\\n\");\n+\t\treturn PTR_ERR(clks->lpcg_msi);\n+\t}\n+\n+\tclks->lpcg_pxl = devm_clk_get(dev, \"lpcg_pxl\");\n+\tif (IS_ERR(clks->lpcg_pxl)) {\n+\t\tdev_warn(dev, \"failed to get lpcg pxl clk\\n\");\n+\t\treturn PTR_ERR(clks->lpcg_pxl);\n+\t}\n+\n+\tclks->lpcg_vif = devm_clk_get(dev, \"lpcg_vif\");\n+\tif (IS_ERR(clks->lpcg_vif)) {\n+\t\tdev_warn(dev, \"failed to get lpcg vif clk\\n\");\n+\t\treturn PTR_ERR(clks->lpcg_vif);\n+\t}\n+\n+\tclks->lpcg_lis = devm_clk_get(dev, \"lpcg_lis\");\n+\tif (IS_ERR(clks->lpcg_lis)) {\n+\t\tdev_warn(dev, \"failed to get lpcg lis clk\\n\");\n+\t\treturn PTR_ERR(clks->lpcg_lis);\n+\t}\n+\n+\tclks->lpcg_apb = devm_clk_get(dev, \"lpcg_apb\");\n+\tif (IS_ERR(clks->lpcg_apb)) {\n+\t\tdev_warn(dev, \"failed to get lpcg apb clk\\n\");\n+\t\treturn PTR_ERR(clks->lpcg_apb);\n+\t}\n+\n+\tclks->lpcg_apb_csr = devm_clk_get(dev, \"lpcg_apb_csr\");\n+\tif (IS_ERR(clks->lpcg_apb_csr)) {\n+\t\tdev_warn(dev, \"failed to get apb csr clk\\n\");\n+\t\treturn PTR_ERR(clks->lpcg_apb_csr);\n+\t}\n+\n+\tclks->lpcg_apb_ctrl = devm_clk_get(dev, \"lpcg_apb_ctrl\");\n+\tif (IS_ERR(clks->lpcg_apb_ctrl)) {\n+\t\tdev_warn(dev, \"failed to get lpcg apb ctrl clk\\n\");\n+\t\treturn PTR_ERR(clks->lpcg_apb_ctrl);\n+\t}\n+\n+\tclks->clk_i2s_bypass = devm_clk_get(dev, \"clk_i2s_bypass\");\n+\tif (IS_ERR(clks->clk_i2s_bypass)) {\n+\t\tdev_err(dev, \"failed to get i2s bypass clk\\n\");\n+\t\treturn PTR_ERR(clks->clk_i2s_bypass);\n+\t}\n+\n+\tclks->lpcg_i2s = devm_clk_get(dev, \"lpcg_i2s\");\n+\tif (IS_ERR(clks->lpcg_i2s)) {\n+\t\tdev_err(dev, \"failed to get lpcg i2s clk\\n\");\n+\t\treturn PTR_ERR(clks->lpcg_i2s);\n+\t}\n+\treturn true;\n+}\n+\n+static int imx8qm_pixel_clk_enable(struct imx_mhdp_device *imx_mhdp)\n+{\n+\tstruct imx_hdp_clks *clks = &imx_mhdp->clks;\n+\tstruct device *dev = imx_mhdp->mhdp.dev;\n+\tint ret;\n+\n+\tret = clk_prepare_enable(clks->av_pll);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre av pll  error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\n+\tret = clk_prepare_enable(clks->clk_pxl);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre clk pxl error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\tret = clk_prepare_enable(clks->clk_pxl_mux);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre clk pxl mux error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\n+\tret = clk_prepare_enable(clks->clk_pxl_link);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre clk pxl link error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\tret = clk_prepare_enable(clks->lpcg_vif);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre clk vif error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\tret = clk_prepare_enable(clks->lpcg_pxl);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre lpcg pxl error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\tret = clk_prepare_enable(clks->lpcg_hdp);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre lpcg hdp error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\treturn ret;\n+}\n+\n+static void imx8qm_pixel_clk_disable(struct imx_mhdp_device *imx_mhdp)\n+{\n+\tstruct imx_hdp_clks *clks = &imx_mhdp->clks;\n+\n+\tclk_disable_unprepare(clks->lpcg_pxl);\n+\tclk_disable_unprepare(clks->lpcg_hdp);\n+\tclk_disable_unprepare(clks->lpcg_vif);\n+\tclk_disable_unprepare(clks->clk_pxl);\n+\tclk_disable_unprepare(clks->clk_pxl_link);\n+\tclk_disable_unprepare(clks->clk_pxl_mux);\n+\tclk_disable_unprepare(clks->av_pll);\n+}\n+\n+static void imx8qm_pixel_clk_set_rate(struct imx_mhdp_device *imx_mhdp, u32 pclock)\n+{\n+\tbool dual_mode = imx8qm_video_dual_mode(&imx_mhdp->mhdp);\n+\tstruct imx_hdp_clks *clks = &imx_mhdp->clks;\n+\n+\t/* pixel clock for HDMI */\n+\tclk_set_rate(clks->av_pll, pclock);\n+\n+\tif (dual_mode == true) {\n+\t\tclk_set_rate(clks->clk_pxl, pclock/2);\n+\t\tclk_set_rate(clks->clk_pxl_link, pclock/2);\n+\t} else {\n+\t\tclk_set_rate(clks->clk_pxl_link, pclock);\n+\t\tclk_set_rate(clks->clk_pxl, pclock);\n+\t}\n+\tclk_set_rate(clks->clk_pxl_mux, pclock);\n+}\n+\n+static int imx8qm_ipg_clk_enable(struct imx_mhdp_device *imx_mhdp)\n+{\n+\tint ret;\n+\tstruct imx_hdp_clks *clks = &imx_mhdp->clks;\n+\tstruct device *dev = imx_mhdp->mhdp.dev;\n+\n+\tret = clk_prepare_enable(clks->dig_pll);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre dig pll error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\n+\tret = clk_prepare_enable(clks->clk_ipg);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre clk_ipg error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\n+\tret = clk_prepare_enable(clks->clk_core);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre clk core error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\n+\tret = clk_prepare_enable(clks->lpcg_apb);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre clk apb error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\tret = clk_prepare_enable(clks->lpcg_lis);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre clk lis error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\tret = clk_prepare_enable(clks->lpcg_msi);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre clk msierror\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\tret = clk_prepare_enable(clks->lpcg_apb_csr);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre clk apb csr error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\tret = clk_prepare_enable(clks->lpcg_apb_ctrl);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre clk apb ctrl error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\tret = clk_prepare_enable(clks->lpcg_i2s);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre clk i2s error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\tret = clk_prepare_enable(clks->clk_i2s_bypass);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre clk i2s bypass error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\treturn ret;\n+}\n+\n+static void imx8qm_ipg_clk_set_rate(struct imx_mhdp_device *imx_mhdp)\n+{\n+\tstruct imx_hdp_clks *clks = &imx_mhdp->clks;\n+\n+\t/* ipg/core clock */\n+\tclk_set_rate(clks->dig_pll,  PLL_800MHZ);\n+\tclk_set_rate(clks->clk_core, PLL_800MHZ/4);\n+\tclk_set_rate(clks->clk_ipg,  PLL_800MHZ/8);\n+}\n+\n+static void imx8qm_detach_pm_domains(struct imx_mhdp_device *imx_mhdp)\n+{\n+\tif (imx_mhdp->pd_pll1_link && !IS_ERR(imx_mhdp->pd_pll1_link))\n+\t\tdevice_link_del(imx_mhdp->pd_pll1_link);\n+\tif (imx_mhdp->pd_pll1_dev && !IS_ERR(imx_mhdp->pd_pll1_dev))\n+\t\tdev_pm_domain_detach(imx_mhdp->pd_pll1_dev, true);\n+\n+\tif (imx_mhdp->pd_pll0_link && !IS_ERR(imx_mhdp->pd_pll0_link))\n+\t\tdevice_link_del(imx_mhdp->pd_pll0_link);\n+\tif (imx_mhdp->pd_pll0_dev && !IS_ERR(imx_mhdp->pd_pll0_dev))\n+\t\tdev_pm_domain_detach(imx_mhdp->pd_pll0_dev, true);\n+\n+\tif (imx_mhdp->pd_mhdp_link && !IS_ERR(imx_mhdp->pd_mhdp_link))\n+\t\tdevice_link_del(imx_mhdp->pd_mhdp_link);\n+\tif (imx_mhdp->pd_mhdp_dev && !IS_ERR(imx_mhdp->pd_mhdp_dev))\n+\t\tdev_pm_domain_detach(imx_mhdp->pd_mhdp_dev, true);\n+\n+\timx_mhdp->pd_mhdp_dev = NULL;\n+\timx_mhdp->pd_mhdp_link = NULL;\n+\timx_mhdp->pd_pll0_dev = NULL;\n+\timx_mhdp->pd_pll0_link = NULL;\n+\timx_mhdp->pd_pll1_dev = NULL;\n+\timx_mhdp->pd_pll1_link = NULL;\n+}\n+\n+static int imx8qm_attach_pm_domains(struct imx_mhdp_device *imx_mhdp)\n+{\n+\tstruct device *dev = imx_mhdp->mhdp.dev;\n+\tu32 flags = DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVE;\n+\tint ret = 0;\n+\n+\timx_mhdp->pd_mhdp_dev = dev_pm_domain_attach_by_name(dev, \"hdmi\");\n+\tif (IS_ERR(imx_mhdp->pd_mhdp_dev)) {\n+\t\tret = PTR_ERR(imx_mhdp->pd_mhdp_dev);\n+\t\tdev_err(dev, \"Failed to attach dc pd dev: %d\\n\", ret);\n+\t\tgoto fail;\n+\t}\n+\timx_mhdp->pd_mhdp_link = device_link_add(dev, imx_mhdp->pd_mhdp_dev, flags);\n+\tif (IS_ERR(imx_mhdp->pd_mhdp_link)) {\n+\t\tret = PTR_ERR(imx_mhdp->pd_mhdp_link);\n+\t\tdev_err(dev, \"Failed to add device link to dc pd dev: %d\\n\",\n+\t\t\tret);\n+\t\tgoto fail;\n+\t}\n+\n+\timx_mhdp->pd_pll0_dev = dev_pm_domain_attach_by_name(dev, \"pll0\");\n+\tif (IS_ERR(imx_mhdp->pd_pll0_dev)) {\n+\t\tret = PTR_ERR(imx_mhdp->pd_pll0_dev);\n+\t\tdev_err(dev, \"Failed to attach pll0 pd dev: %d\\n\", ret);\n+\t\tgoto fail;\n+\t}\n+\timx_mhdp->pd_pll0_link = device_link_add(dev, imx_mhdp->pd_pll0_dev, flags);\n+\tif (IS_ERR(imx_mhdp->pd_pll0_link)) {\n+\t\tret = PTR_ERR(imx_mhdp->pd_pll0_link);\n+\t\tdev_err(dev, \"Failed to add device link to pll0 pd dev: %d\\n\",\n+\t\t\tret);\n+\t\tgoto fail;\n+\t}\n+\n+\timx_mhdp->pd_pll1_dev = dev_pm_domain_attach_by_name(dev, \"pll1\");\n+\tif (IS_ERR(imx_mhdp->pd_pll1_dev)) {\n+\t\tret = PTR_ERR(imx_mhdp->pd_pll1_dev);\n+\t\tdev_err(dev, \"Failed to attach pll0 pd dev: %d\\n\", ret);\n+\t\tgoto fail;\n+\t}\n+\timx_mhdp->pd_pll1_link = device_link_add(dev, imx_mhdp->pd_pll1_dev, flags);\n+\tif (IS_ERR(imx_mhdp->pd_pll1_link)) {\n+\t\tret = PTR_ERR(imx_mhdp->pd_pll1_link);\n+\t\tdev_err(dev, \"Failed to add device link to pll1 pd dev: %d\\n\",\n+\t\t\tret);\n+\t\tgoto fail;\n+\t}\n+fail:\n+\timx8qm_detach_pm_domains(imx_mhdp);\n+\treturn ret;\n+}\n+\n+int cdns_mhdp_power_on_imx8qm(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct imx_mhdp_device *imx_mhdp =\n+\t\t\t\tcontainer_of(mhdp, struct imx_mhdp_device, mhdp);\n+\t/* Power on PM Domains */\n+\n+\timx8qm_attach_pm_domains(imx_mhdp);\n+\n+\t/* clock init and  rate set */\n+\timx8qm_clocks_init(imx_mhdp);\n+\n+\timx8qm_ipg_clk_set_rate(imx_mhdp);\n+\n+\t/* Init pixel clock with 148.5MHz before FW init */\n+\timx8qm_pixel_clk_set_rate(imx_mhdp, 148500000);\n+\n+\timx8qm_ipg_clk_enable(imx_mhdp);\n+\n+\timx8qm_clk_mux(imx_mhdp->mhdp.plat_data->is_dp);\n+\n+\timx8qm_pixel_clk_enable(imx_mhdp);\n+\n+\timx8qm_phy_reset(1);\n+\n+\treturn 0;\n+}\n+\n+void cdns_mhdp_plat_init_imx8qm(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct imx_mhdp_device *imx_mhdp =\n+\t\t\t\tcontainer_of(mhdp, struct imx_mhdp_device, mhdp);\n+\tbool dual_mode = imx8qm_video_dual_mode(&imx_mhdp->mhdp);\n+\n+\timx8qm_pixel_link_sync_disable(dual_mode);\n+\timx8qm_pixel_link_invalid(dual_mode);\n+}\n+\n+void cdns_mhdp_plat_deinit_imx8qm(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct imx_mhdp_device *imx_mhdp =\n+\t\t\t\tcontainer_of(mhdp, struct imx_mhdp_device, mhdp);\n+\tbool dual_mode = imx8qm_video_dual_mode(&imx_mhdp->mhdp);\n+\n+\timx8qm_pixel_link_valid(dual_mode);\n+\timx8qm_pixel_link_sync_enable(dual_mode);\n+}\n+\n+void cdns_mhdp_pclk_rate_imx8qm(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct imx_mhdp_device *imx_mhdp =\n+\t\t\t\tcontainer_of(mhdp, struct imx_mhdp_device, mhdp);\n+\n+\t/* set pixel clock before video mode setup */\n+\timx8qm_pixel_clk_disable(imx_mhdp);\n+\n+\timx8qm_pixel_clk_set_rate(imx_mhdp, imx_mhdp->mhdp.mode.clock * 1000);\n+\n+\timx8qm_pixel_clk_enable(imx_mhdp);\n+\n+\t/* Config pixel link mux */\n+\timx8qm_pixel_link_mux(imx_mhdp);\n+}\n+\n+int cdns_mhdp_firmware_write_section(struct imx_mhdp_device *imx_mhdp,\n+\t\t\t\t\tconst u8 *data, int size, int addr)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < size; i += 4) {\n+\t\tu32 val = (unsigned int)data[i] << 0 |\n+\t\t\t\t\t(unsigned int)data[i + 1] << 8 |\n+\t\t\t\t\t(unsigned int)data[i + 2] << 16 |\n+\t\t\t\t\t(unsigned int)data[i + 3] << 24;\n+\t\tcdns_mhdp_bus_write(val, &imx_mhdp->mhdp, addr + i);\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static void cdns_mhdp_firmware_load_cont(const struct firmware *fw, void *context)\n+{\n+\tstruct imx_mhdp_device *imx_mhdp = context;\n+\n+\timx_mhdp->fw = fw;\n+}\n+\n+static int cdns_mhdp_firmware_load(struct imx_mhdp_device *imx_mhdp)\n+{\n+\tconst u8 *iram;\n+\tconst u8 *dram;\n+\tu32 rate;\n+\tint ret;\n+\n+\t/* configure HDMI/DP core clock */\n+\trate = clk_get_rate(imx_mhdp->clks.clk_core);\n+\tif (imx_mhdp->mhdp.is_ls1028a)\n+\t\trate = rate / 4;\n+\n+\tcdns_mhdp_set_fw_clk(&imx_mhdp->mhdp, rate);\n+\n+\t/* skip fw loading if none is specified */\n+\tif (!imx_mhdp->firmware_name)\n+\t\tgoto out;\n+\n+\tif (!imx_mhdp->fw) {\n+\t\tret = request_firmware_nowait(THIS_MODULE, FW_ACTION_NOUEVENT,\n+\t\t\t\t\t\timx_mhdp->firmware_name,\n+\t\t\t\t\t\timx_mhdp->mhdp.dev, GFP_KERNEL,\n+\t\t\t\t\t\timx_mhdp,\n+\t\t\t\t\t\tcdns_mhdp_firmware_load_cont);\n+\t\tif (ret < 0) {\n+\t\t\tDRM_ERROR(\"failed to load firmware\\n\");\n+\t\t\treturn -ENOENT;\n+\t\t}\n+\t} else {\n+\t\tiram = imx_mhdp->fw->data + FW_IRAM_OFFSET;\n+\t\tdram = iram + FW_IRAM_SIZE;\n+\n+\t\tcdns_mhdp_firmware_write_section(imx_mhdp, iram, FW_IRAM_SIZE, ADDR_IMEM);\n+\t\tcdns_mhdp_firmware_write_section(imx_mhdp, dram, FW_DRAM_SIZE, ADDR_DMEM);\n+\t}\n+\n+out:\n+\t/* un-reset ucpu */\n+\tcdns_mhdp_bus_write(0, &imx_mhdp->mhdp, APB_CTRL);\n+\tDRM_INFO(\"Started firmware!\\n\");\n+\n+\treturn 0;\n+}\n+\n+int cdns_mhdp_firmware_init_imx8qm(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct imx_mhdp_device *imx_mhdp =\n+\t\t\t\tcontainer_of(mhdp, struct imx_mhdp_device, mhdp);\n+\tint ret;\n+\n+\t/* load firmware */\n+\tret = cdns_mhdp_firmware_load(imx_mhdp);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = cdns_mhdp_check_alive(&imx_mhdp->mhdp);\n+\tif (ret == false) {\n+\t\tDRM_ERROR(\"NO HDMI FW running\\n\");\n+\t\treturn -ENXIO;\n+\t}\n+\n+\t/* turn on IP activity */\n+\tcdns_mhdp_set_firmware_active(&imx_mhdp->mhdp, 1);\n+\n+\tDRM_INFO(\"HDP FW Version - ver %d verlib %d\\n\",\n+\t\t\tcdns_mhdp_bus_read(mhdp, VER_L) + (cdns_mhdp_bus_read(mhdp, VER_H) << 8),\n+\t\t\tcdns_mhdp_bus_read(mhdp, VER_LIB_H_ADDR) + (cdns_mhdp_bus_read(mhdp, VER_LIB_H_ADDR) << 8));\n+\n+\treturn 0;\n+}\n+\n+int cdns_mhdp_suspend_imx8qm(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct imx_mhdp_device *imx_mhdp =\n+\t\t\t\tcontainer_of(mhdp, struct imx_mhdp_device, mhdp);\n+\n+\timx8qm_pixel_clk_disable(imx_mhdp);\n+\n+\treturn 0;\n+}\n+\n+int cdns_mhdp_resume_imx8qm(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct imx_mhdp_device *imx_mhdp =\n+\t\t\t\tcontainer_of(mhdp, struct imx_mhdp_device, mhdp);\n+\n+\timx8qm_pixel_clk_enable(imx_mhdp);\n+\n+\treturn cdns_mhdp_firmware_init_imx8qm(mhdp);\n+}\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c\nnew file mode 100644\nindex 000000000000..3acbdf575ee2\n--- /dev/null\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c\n@@ -0,0 +1,259 @@\n+/*\n+ * copyright (c) 2019 nxp semiconductor, inc.\n+ *\n+ * this program is free software; you can redistribute it and/or modify\n+ * it under the terms of the gnu general public license version 2 as\n+ * published by the free software foundation.\n+ */\n+#include <linux/module.h>\n+#include <linux/platform_device.h>\n+#include <linux/component.h>\n+#include <drm/drm_of.h>\n+#include <drm/drm_vblank.h>\n+#include <drm/drm_crtc_helper.h>\n+#include <drm/drm_encoder_slave.h>\n+\n+#include <uapi/linux/media-bus-format.h>\n+\n+#include \"cdns-mhdp-imx.h\"\n+#include \"cdns-mhdp-phy.h\"\n+#include \"../imx-drm.h\"\n+\n+static void cdns_mhdp_imx_encoder_disable(struct drm_encoder *encoder)\n+{\n+\tstruct drm_bridge *bridge = drm_bridge_chain_get_first_bridge(encoder);\n+\tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n+\n+\tcdns_mhdp_plat_call(mhdp, plat_init);\n+}\n+\n+static void cdns_mhdp_imx_encoder_enable(struct drm_encoder *encoder)\n+{\n+\tstruct drm_bridge *bridge = drm_bridge_chain_get_first_bridge(encoder);\n+\tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n+\n+\tcdns_mhdp_plat_call(mhdp, plat_deinit);\n+}\n+\n+static int cdns_mhdp_imx_encoder_atomic_check(struct drm_encoder *encoder,\n+\t\t\t\t    struct drm_crtc_state *crtc_state,\n+\t\t\t\t    struct drm_connector_state *conn_state)\n+{\n+\tstruct imx_crtc_state *imx_crtc_state = to_imx_crtc_state(crtc_state);\n+\tstruct drm_bridge *bridge = drm_bridge_chain_get_first_bridge(encoder);\n+\tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n+\n+\tif (mhdp->plat_data->video_format != 0)\n+\t\timx_crtc_state->bus_format = mhdp->plat_data->video_format;\n+\n+\tif (mhdp->force_mode_set)\n+\t\tcrtc_state->mode_changed = true;\n+\n+\treturn 0;\n+}\n+\n+static const struct drm_encoder_helper_funcs cdns_mhdp_imx_encoder_helper_funcs = {\n+\t.enable     = cdns_mhdp_imx_encoder_enable,\n+\t.disable    = cdns_mhdp_imx_encoder_disable,\n+\t.atomic_check = cdns_mhdp_imx_encoder_atomic_check,\n+};\n+\n+static const struct drm_encoder_funcs cdns_mhdp_imx_encoder_funcs = {\n+\t.destroy = drm_encoder_cleanup,\n+};\n+\n+static struct cdns_plat_data imx8mq_hdmi_drv_data = {\n+\t.plat_name = \"imx8mq-hdmi\",\n+\t.bind\t= cdns_hdmi_bind,\n+\t.unbind\t= cdns_hdmi_unbind,\n+\t.phy_set = cdns_hdmi_phy_set_imx8mq,\n+\t.phy_video_valid = cdns_hdmi_phy_video_valid_imx8mq,\n+\t.bus_type = BUS_TYPE_NORMAL_APB,\n+};\n+\n+static struct cdns_plat_data imx8mq_dp_drv_data = {\n+\t.plat_name = \"imx8mq-dp\",\n+\t.bind\t= cdns_dp_bind,\n+\t.unbind\t= cdns_dp_unbind,\n+\t.phy_set = cdns_dp_phy_set_imx8mq,\n+\t.bus_type = BUS_TYPE_NORMAL_APB,\n+};\n+\n+static struct cdns_plat_data imx8qm_hdmi_drv_data = {\n+\t.plat_name = \"imx8qm-hdmi\",\n+\t.bind\t= cdns_hdmi_bind,\n+\t.unbind\t= cdns_hdmi_unbind,\n+\t.phy_set = cdns_hdmi_phy_set_imx8qm,\n+\t.phy_video_valid = cdns_hdmi_phy_video_valid_imx8qm,\n+\t.power_on = cdns_mhdp_power_on_imx8qm,\n+\t.firmware_init = cdns_mhdp_firmware_init_imx8qm,\n+\t.resume = cdns_mhdp_resume_imx8qm,\n+\t.suspend = cdns_mhdp_suspend_imx8qm,\n+\t.pclk_rate = cdns_mhdp_pclk_rate_imx8qm,\n+\t.plat_init = cdns_mhdp_plat_init_imx8qm,\n+\t.plat_deinit = cdns_mhdp_plat_deinit_imx8qm,\n+\t.bus_type = BUS_TYPE_LOW4K_APB,\n+\t.video_format =  MEDIA_BUS_FMT_RGB101010_1X30,\n+};\n+\n+static struct cdns_plat_data imx8qm_dp_drv_data = {\n+\t.plat_name = \"imx8qm-dp\",\n+\t.bind\t= cdns_dp_bind,\n+\t.unbind\t= cdns_dp_unbind,\n+\t.phy_set = cdns_dp_phy_set_imx8qm,\n+\t.power_on = cdns_mhdp_power_on_imx8qm,\n+\t.firmware_init = cdns_mhdp_firmware_init_imx8qm,\n+\t.pclk_rate = cdns_mhdp_pclk_rate_imx8qm,\n+\t.plat_init = cdns_mhdp_plat_init_imx8qm,\n+\t.plat_deinit = cdns_mhdp_plat_deinit_imx8qm,\n+\t.bus_type = BUS_TYPE_LOW4K_APB,\n+\t.video_format =  MEDIA_BUS_FMT_RGB101010_1X30,\n+\t.is_dp = true,\n+};\n+\n+static struct cdns_plat_data ls1028a_dp_drv_data = {\n+\t.bind = cdns_dp_bind,\n+\t.unbind = cdns_dp_unbind,\n+\t.phy_set = cdns_dp_phy_set_imx8mq,\n+\t.power_on = cdns_mhdp_power_on_ls1028a,\n+\t.firmware_init = cdns_mhdp_firmware_init_imx8qm,\n+\t.pclk_rate = cdns_mhdp_pclk_rate_ls1028a,\n+\t.bus_type = BUS_TYPE_NORMAL_APB,\n+};\n+\n+static const struct of_device_id cdns_mhdp_imx_dt_ids[] = {\n+\t{ .compatible = \"cdn,imx8mq-hdmi\",\n+\t  .data = &imx8mq_hdmi_drv_data\n+\t},\n+\t{ .compatible = \"cdn,imx8mq-dp\",\n+\t  .data = &imx8mq_dp_drv_data\n+\t},\n+\t{ .compatible = \"cdn,imx8qm-hdmi\",\n+\t  .data = &imx8qm_hdmi_drv_data\n+\t},\n+\t{ .compatible = \"cdn,imx8qm-dp\",\n+\t  .data = &imx8qm_dp_drv_data\n+\t},\n+\t{ .compatible = \"cdn,ls1028a-dp\",\n+\t  .data = &ls1028a_dp_drv_data\n+\t},\n+\t{},\n+};\n+MODULE_DEVICE_TABLE(of, cdns_mhdp_imx_dt_ids);\n+\n+static int cdns_mhdp_imx_bind(struct device *dev, struct device *master,\n+\t\t\t    void *data)\n+{\n+\tstruct platform_device *pdev = to_platform_device(dev);\n+\tconst struct cdns_plat_data *plat_data;\n+\tconst struct of_device_id *match;\n+\tstruct drm_device *drm = data;\n+\tstruct drm_encoder *encoder;\n+\tstruct imx_mhdp_device *imx_mhdp;\n+\tint ret;\n+\n+\tif (!pdev->dev.of_node)\n+\t\treturn -ENODEV;\n+\n+\timx_mhdp = devm_kzalloc(&pdev->dev, sizeof(*imx_mhdp), GFP_KERNEL);\n+\tif (!imx_mhdp)\n+\t\treturn -ENOMEM;\n+\n+\tmatch = of_match_node(cdns_mhdp_imx_dt_ids, pdev->dev.of_node);\n+\tplat_data = match->data;\n+\tencoder = &imx_mhdp->encoder;\n+\n+\tencoder->possible_crtcs = drm_of_find_possible_crtcs(drm, dev->of_node);\n+\n+\tret = of_property_read_string(pdev->dev.of_node, \"firmware-name\",\n+\t\t\t\t\t&imx_mhdp->firmware_name);\n+\t/*\n+\t * If we failed to find the CRTC(s) which this encoder is\n+\t * supposed to be connected to, it's because the CRTC has\n+\t * not been registered yet.  Defer probing, and hope that\n+\t * the required CRTC is added later.\n+\t */\n+\tif (encoder->possible_crtcs == 0)\n+\t\treturn -EPROBE_DEFER;\n+\n+\tdrm_encoder_helper_add(encoder, &cdns_mhdp_imx_encoder_helper_funcs);\n+\tdrm_encoder_init(drm, encoder, &cdns_mhdp_imx_encoder_funcs,\n+\t\t\t DRM_MODE_ENCODER_TMDS, NULL);\n+\n+\n+\timx_mhdp->mhdp.plat_data = plat_data;\n+\timx_mhdp->mhdp.dev = dev;\n+\timx_mhdp->mhdp.bus_type = plat_data->bus_type;\n+\tret = plat_data->bind(pdev, encoder, &imx_mhdp->mhdp);\n+\t/*\n+\t * If cdns_mhdp_bind() fails we'll never call cdns_mhdp_unbind(),\n+\t * which would have called the encoder cleanup.  Do it manually.\n+\t */\n+\tif (ret < 0)\n+\t\tdrm_encoder_cleanup(encoder);\n+\n+\treturn ret;\n+}\n+\n+static void cdns_mhdp_imx_unbind(struct device *dev, struct device *master,\n+\t\t\t       void *data)\n+{\n+\tstruct imx_mhdp_device *imx_mhdp = dev_get_drvdata(dev);\n+\n+\timx_mhdp->mhdp.plat_data->unbind(dev);\n+}\n+\n+static const struct component_ops cdns_mhdp_imx_ops = {\n+\t.bind\t= cdns_mhdp_imx_bind,\n+\t.unbind\t= cdns_mhdp_imx_unbind,\n+};\n+\n+static int cdns_mhdp_imx_suspend(struct device *dev)\n+{\n+\tstruct imx_mhdp_device *imx_mhdp = dev_get_drvdata(dev);\n+\n+\tcdns_mhdp_plat_call(&imx_mhdp->mhdp, suspend);\n+\n+\treturn 0;\n+}\n+\n+static int cdns_mhdp_imx_resume(struct device *dev)\n+{\n+\tstruct imx_mhdp_device *imx_mhdp = dev_get_drvdata(dev);\n+\n+\tcdns_mhdp_plat_call(&imx_mhdp->mhdp, resume);\n+\n+\treturn 0;\n+}\n+\n+static int cdns_mhdp_imx_probe(struct platform_device *pdev)\n+{\n+\treturn component_add(&pdev->dev, &cdns_mhdp_imx_ops);\n+}\n+\n+static int cdns_mhdp_imx_remove(struct platform_device *pdev)\n+{\n+\tcomponent_del(&pdev->dev, &cdns_mhdp_imx_ops);\n+\n+\treturn 0;\n+}\n+\n+static const struct dev_pm_ops cdns_mhdp_imx_pm_ops = {\n+        SET_LATE_SYSTEM_SLEEP_PM_OPS(cdns_mhdp_imx_suspend, cdns_mhdp_imx_resume)\n+};\n+\n+static struct platform_driver cdns_mhdp_imx_platform_driver = {\n+\t.probe  = cdns_mhdp_imx_probe,\n+\t.remove = cdns_mhdp_imx_remove,\n+\t.driver = {\n+\t\t.name = \"cdns-mhdp-imx\",\n+\t\t.of_match_table = cdns_mhdp_imx_dt_ids,\n+\t\t.pm = &cdns_mhdp_imx_pm_ops,\n+\t},\n+};\n+\n+module_platform_driver(cdns_mhdp_imx_platform_driver);\n+\n+MODULE_AUTHOR(\"Sandor YU <sandor.yu@nxp.com>\");\n+MODULE_LICENSE(\"GPL\");\n+MODULE_ALIAS(\"platform:cdnhdmi-imx\");\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-ls1028a.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-ls1028a.c\nnew file mode 100644\nindex 000000000000..4cc71301f5fe\n--- /dev/null\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-ls1028a.c\n@@ -0,0 +1,110 @@\n+// SPDX-License-Identifier: GPL-2.0\n+/*\n+ * Copyright 2019 NXP\n+ *\n+ */\n+#include <linux/clk.h>\n+#include <drm/drm_vblank.h>\n+#include <linux/of.h>\n+#include <linux/of_address.h>\n+#include <linux/of_device.h>\n+\n+#include \"cdns-mhdp-imx.h\"\n+\n+static const struct of_device_id scfg_device_ids[] = {\n+\t{ .compatible = \"fsl,ls1028a-scfg\", },\n+\t{}\n+};\n+\n+static void ls1028a_phy_reset(u8 reset)\n+{\n+\tstruct device_node *scfg_node;\n+\tvoid __iomem *scfg_base = NULL;\n+\n+\tscfg_node = of_find_matching_node(NULL, scfg_device_ids);\n+\tif (scfg_node)\n+\t\tscfg_base = of_iomap(scfg_node, 0);\n+\n+\tiowrite32(reset, scfg_base + 0x230);\n+}\n+\n+int ls1028a_clocks_init(struct imx_mhdp_device *imx_mhdp)\n+{\n+\tstruct device *dev = imx_mhdp->mhdp.dev;\n+\tstruct imx_hdp_clks *clks = &imx_mhdp->clks;\n+\n+\tclks->clk_core = devm_clk_get(dev, \"clk_core\");\n+\tif (IS_ERR(clks->clk_core)) {\n+\t\tdev_warn(dev, \"failed to get hdp core clk\\n\");\n+\t\treturn PTR_ERR(clks->clk_core);\n+\t}\n+\n+\tclks->clk_pxl = devm_clk_get(dev, \"clk_pxl\");\n+\tif (IS_ERR(clks->clk_pxl)) {\n+\t\tdev_warn(dev, \"failed to get pxl clk\\n\");\n+\t\treturn PTR_ERR(clks->clk_pxl);\n+\t}\n+\n+\treturn true;\n+}\n+\n+static int ls1028a_pixel_clk_enable(struct imx_mhdp_device *imx_mhdp)\n+{\n+\tstruct imx_hdp_clks *clks = &imx_mhdp->clks;\n+\tstruct device *dev = imx_mhdp->mhdp.dev;\n+\tint ret;\n+\n+\tret = clk_prepare_enable(clks->clk_pxl);\n+\tif (ret < 0) {\n+\t\tdev_err(dev, \"%s, pre clk pxl error\\n\", __func__);\n+\t\treturn ret;\n+\t}\n+\n+\treturn ret;\n+}\n+\n+static void ls1028a_pixel_clk_disable(struct imx_mhdp_device *imx_mhdp)\n+{\n+\tstruct imx_hdp_clks *clks = &imx_mhdp->clks;\n+\n+\tclk_disable_unprepare(clks->clk_pxl);\n+}\n+\n+static void ls1028a_pixel_clk_set_rate(struct imx_mhdp_device *imx_mhdp,\n+\t\t\t\t       u32 pclock)\n+{\n+\tstruct imx_hdp_clks *clks = &imx_mhdp->clks;\n+\n+\tclk_set_rate(clks->clk_pxl, pclock);\n+}\n+\n+int cdns_mhdp_power_on_ls1028a(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct imx_mhdp_device *imx_mhdp = container_of\n+\t\t\t\t(mhdp, struct imx_mhdp_device, mhdp);\n+\n+\t/* clock init and  rate set */\n+\tls1028a_clocks_init(imx_mhdp);\n+\n+\tls1028a_pixel_clk_enable(imx_mhdp);\n+\n+\t/* Init pixel clock with 148.5MHz before FW init */\n+\tls1028a_pixel_clk_set_rate(imx_mhdp, 148500000);\n+\n+\tls1028a_phy_reset(1);\n+\n+\treturn 0;\n+}\n+\n+void cdns_mhdp_pclk_rate_ls1028a(struct cdns_mhdp_device *mhdp)\n+{\n+\tstruct imx_mhdp_device *imx_mhdp = container_of\n+\t\t\t\t(mhdp, struct imx_mhdp_device, mhdp);\n+\n+\t/* set pixel clock before video mode setup */\n+\tls1028a_pixel_clk_disable(imx_mhdp);\n+\n+\tls1028a_pixel_clk_set_rate(imx_mhdp, imx_mhdp->mhdp.mode.clock * 1000);\n+\n+\tls1028a_pixel_clk_enable(imx_mhdp);\n+}\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-phy.h b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-phy.h\nnew file mode 100644\nindex 000000000000..5682b9fbc90f\n--- /dev/null\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-phy.h\n@@ -0,0 +1,155 @@\n+/*\n+ * Copyright (C) 2019 NXP Semiconductor, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ */\n+\n+#ifndef _CDN_DP_PHY_H\n+#define _CDN_DP_PHY_H\n+\n+#include <drm/bridge/cdns-mhdp.h>\n+\n+#define CMN_SSM_BIAS_TMR                0x0022\n+#define CMN_PLLSM0_PLLEN_TMR            0x0029\n+#define CMN_PLLSM0_PLLPRE_TMR           0x002A\n+#define CMN_PLLSM0_PLLVREF_TMR          0x002B\n+#define CMN_PLLSM0_PLLLOCK_TMR          0x002C\n+#define CMN_PLLSM0_USER_DEF_CTRL        0x002F\n+#define CMN_PSM_CLK_CTRL                0x0061\n+#define CMN_CDIAG_REFCLK_CTRL           0x0062\n+#define CMN_PLL0_VCOCAL_START           0x0081\n+#define CMN_PLL0_VCOCAL_INIT_TMR        0x0084\n+#define CMN_PLL0_VCOCAL_ITER_TMR        0x0085\n+#define CMN_PLL0_INTDIV                 0x0094\n+#define CMN_PLL0_FRACDIV                0x0095\n+#define CMN_PLL0_HIGH_THR               0x0096\n+#define CMN_PLL0_DSM_DIAG               0x0097\n+#define CMN_PLL0_SS_CTRL1               0x0098\n+#define CMN_PLL0_SS_CTRL2               0x0099\n+#define CMN_ICAL_INIT_TMR               0x00C4\n+#define CMN_ICAL_ITER_TMR               0x00C5\n+#define CMN_RXCAL_INIT_TMR              0x00D4\n+#define CMN_RXCAL_ITER_TMR              0x00D5\n+#define CMN_TXPUCAL_CTRL                0x00E0\n+#define CMN_TXPUCAL_INIT_TMR            0x00E4\n+#define CMN_TXPUCAL_ITER_TMR            0x00E5\n+#define CMN_TXPDCAL_CTRL                0x00F0\n+#define CMN_TXPDCAL_INIT_TMR            0x00F4\n+#define CMN_TXPDCAL_ITER_TMR            0x00F5\n+#define CMN_ICAL_ADJ_INIT_TMR           0x0102\n+#define CMN_ICAL_ADJ_ITER_TMR           0x0103\n+#define CMN_RX_ADJ_INIT_TMR             0x0106\n+#define CMN_RX_ADJ_ITER_TMR             0x0107\n+#define CMN_TXPU_ADJ_CTRL               0x0108\n+#define CMN_TXPU_ADJ_INIT_TMR           0x010A\n+#define CMN_TXPU_ADJ_ITER_TMR           0x010B\n+#define CMN_TXPD_ADJ_CTRL               0x010c\n+#define CMN_TXPD_ADJ_INIT_TMR           0x010E\n+#define CMN_TXPD_ADJ_ITER_TMR           0x010F\n+#define CMN_DIAG_PLL0_FBH_OVRD          0x01C0\n+#define CMN_DIAG_PLL0_FBL_OVRD          0x01C1\n+#define CMN_DIAG_PLL0_OVRD              0x01C2\n+#define CMN_DIAG_PLL0_TEST_MODE         0x01C4\n+#define CMN_DIAG_PLL0_V2I_TUNE          0x01C5\n+#define CMN_DIAG_PLL0_CP_TUNE           0x01C6\n+#define CMN_DIAG_PLL0_LF_PROG           0x01C7\n+#define CMN_DIAG_PLL0_PTATIS_TUNE1      0x01C8\n+#define CMN_DIAG_PLL0_PTATIS_TUNE2      0x01C9\n+#define CMN_DIAG_PLL0_INCLK_CTRL        0x01CA\n+#define CMN_DIAG_PLL0_PXL_DIVH          0x01CB\n+#define CMN_DIAG_PLL0_PXL_DIVL          0x01CC\n+#define CMN_DIAG_HSCLK_SEL              0x01E0\n+#define CMN_DIAG_PER_CAL_ADJ            0x01EC\n+#define CMN_DIAG_CAL_CTRL               0x01ED\n+#define CMN_DIAG_ACYA                   0x01FF\n+#define XCVR_PSM_RCTRL                  0x4001\n+#define XCVR_PSM_CAL_TMR                0x4002\n+#define XCVR_PSM_A0IN_TMR               0x4003\n+#define TX_TXCC_CAL_SCLR_MULT_0         0x4047\n+#define TX_TXCC_CPOST_MULT_00_0         0x404C\n+#define TX_TXCC_MGNFS_MULT_000_0        0x4050\n+#define XCVR_DIAG_PLLDRC_CTRL           0x40E0\n+#define XCVR_DIAG_PLLDRC_CTRL           0x40E0\n+#define XCVR_DIAG_HSCLK_SEL             0x40E1\n+#define XCVR_DIAG_BIDI_CTRL             0x40E8\n+#define XCVR_DIAG_LANE_FCM_EN_MGN_TMR   0x40F2\n+#define XCVR_DIAG_LANE_FCM_EN_MGN       0x40F2\n+#define TX_PSC_A0                       0x4100\n+#define TX_PSC_A1                       0x4101\n+#define TX_PSC_A2                       0x4102\n+#define TX_PSC_A3                       0x4103\n+#define TX_RCVDET_CTRL                  0x4120\n+#define TX_RCVDET_EN_TMR                0x4122\n+#define TX_RCVDET_EN_TMR                0x4122\n+#define TX_RCVDET_ST_TMR                0x4123\n+#define TX_RCVDET_ST_TMR                0x4123\n+#define TX_BIST_CTRL                    0x4140\n+#define TX_BIST_UDDWR                   0x4141\n+#define TX_DIAG_TX_CTRL                 0x41E0\n+#define TX_DIAG_TX_DRV                  0x41E1\n+#define TX_DIAG_BGREF_PREDRV_DELAY      0x41E7\n+#define TX_DIAG_BGREF_PREDRV_DELAY      0x41E7\n+#define XCVR_PSM_RCTRL_1                0x4201\n+#define TX_TXCC_CAL_SCLR_MULT_1         0x4247\n+#define TX_TXCC_CPOST_MULT_00_1         0x424C\n+#define TX_TXCC_MGNFS_MULT_000_1        0x4250\n+#define XCVR_DIAG_PLLDRC_CTRL_1         0x42E0\n+#define XCVR_DIAG_HSCLK_SEL_1           0x42E1\n+#define XCVR_DIAG_LANE_FCM_EN_MGN_TMR_1 0x42F2\n+#define TX_RCVDET_EN_TMR_1              0x4322\n+#define TX_RCVDET_ST_TMR_1              0x4323\n+#define TX_DIAG_ACYA_0                  0x41FF\n+#define TX_DIAG_ACYA_1                  0x43FF\n+#define TX_DIAG_ACYA_2                  0x45FF\n+#define TX_DIAG_ACYA_3                  0x47FF\n+#define TX_ANA_CTRL_REG_1               0x5020\n+#define TX_ANA_CTRL_REG_2               0x5021\n+#define TXDA_COEFF_CALC                 0x5022\n+#define TX_DIG_CTRL_REG_1               0x5023\n+#define TX_DIG_CTRL_REG_2               0x5024\n+#define TXDA_CYA_AUXDA_CYA              0x5025\n+#define TX_ANA_CTRL_REG_3               0x5026\n+#define TX_ANA_CTRL_REG_4               0x5027\n+#define TX_ANA_CTRL_REG_5               0x5029\n+#define RX_PSC_A0                       0x8000\n+#define RX_PSC_CAL                      0x8006\n+#define PMA_LANE_CFG                    0xC000\n+#define PIPE_CMN_CTRL1                  0xC001\n+#define PIPE_CMN_CTRL2                  0xC002\n+#define PIPE_COM_LOCK_CFG1              0xC003\n+#define PIPE_COM_LOCK_CFG2              0xC004\n+#define PIPE_RCV_DET_INH                0xC005\n+#define PHY_HDP_MODE_CTRL               0xC008\n+#define PHY_HDP_CLK_CTL                 0xC009\n+#define STS                             0xC00F\n+#define PHY_ISO_CMN_CTRL                0xC010\n+#define PHY_ISO_CMN_CTRL                0xC010\n+#define PHY_HDP_TX_CTL_L0               0xC408\n+#define PHY_DP_TX_CTL                   0xC408\n+#define PHY_HDP_TX_CTL_L1               0xC448\n+#define PHY_HDP_TX_CTL_L2               0xC488\n+#define PHY_HDP_TX_CTL_L3               0xC4C8\n+#define PHY_PMA_CMN_CTRL1               0xC800\n+#define PMA_CMN_CTRL1                   0xC800\n+#define PHY_PMA_ISO_CMN_CTRL            0xC810\n+#define PHY_PMA_ISO_PLL_CTRL1           0xC812\n+#define PHY_PMA_ISOLATION_CTRL          0xC81F\n+#define PHY_ISOLATION_CTRL              0xC81F\n+#define PHY_PMA_ISO_XCVR_CTRL           0xCC11\n+#define PHY_PMA_ISO_LINK_MODE           0xCC12\n+#define PHY_PMA_ISO_PWRST_CTRL          0xCC13\n+#define PHY_PMA_ISO_TX_DATA_LO          0xCC14\n+#define PHY_PMA_ISO_TX_DATA_HI          0xCC15\n+#define PHY_PMA_ISO_RX_DATA_LO          0xCC16\n+#define PHY_PMA_ISO_RX_DATA_HI          0xCC17\n+\n+int cdns_dp_phy_set_imx8mq(struct cdns_mhdp_device *hdp);\n+int cdns_dp_phy_set_imx8qm(struct cdns_mhdp_device *hdp);\n+bool cdns_hdmi_phy_video_valid_imx8mq(struct cdns_mhdp_device *hdp);\n+bool cdns_hdmi_phy_video_valid_imx8qm(struct cdns_mhdp_device *hdp);\n+int cdns_hdmi_phy_set_imx8mq(struct cdns_mhdp_device *hdp);\n+int cdns_hdmi_phy_set_imx8qm(struct cdns_mhdp_device *hdp);\n+#endif /* _CDNS_MHDP_PHY_H */\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0031-LF-1514-drm-cdns-mhdp-check-link-rate-index.patch",
    "content": "From 8aa7d7baa5eb142261ddafc91b0ba884aa670421 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Fri, 19 Jun 2020 16:17:55 +0800\nSubject: [PATCH 31/49] LF-1514: drm: cdns-mhdp: check link rate index\n\nCheck link rate index to advoid negative array index read.\nreport by Coverity ID:6652950 6652949.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Fancy Fang <chen.fang@nxp.com>\n---\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-dp-phy.c | 8 ++++++++\n 1 file changed, 8 insertions(+)\n\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-dp-phy.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-dp-phy.c\nindex a6d03c94d196..5c75e7d40cc0 100644\n--- a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-dp-phy.c\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-dp-phy.c\n@@ -198,6 +198,10 @@ static void dp_phy_pma_cmn_pll0_24mhz(struct cdns_mhdp_device *mhdp)\n \n \t/* DP PHY PLL 24MHz configuration */\n \tindex = link_rate_index(link_rate);\n+\tif (index < 0) {\n+\t\tdev_err(mhdp->dev, \"wrong link rate index\\n\");\n+\t\treturn;\n+\t}\n \tfor (i = 0; i < ARRAY_SIZE(phy_pll_24m_cfg); i++)\n \t\tcdns_phy_reg_write(mhdp, phy_pll_24m_cfg[i].addr, phy_pll_24m_cfg[i].val[index]);\n \n@@ -320,6 +324,10 @@ static void dp_phy_pma_cmn_pll0_27mhz(struct cdns_mhdp_device *mhdp)\n \n \t/* DP PHY PLL 27MHz configuration */\n \tindex = link_rate_index(link_rate);\n+\tif (index < 0) {\n+\t\tdev_err(mhdp->dev, \"wrong link rate index\\n\");\n+\t\treturn;\n+\t}\n \tfor (i = 0; i < ARRAY_SIZE(phy_pll_27m_cfg); i++)\n \t\tcdns_phy_reg_write(mhdp, phy_pll_27m_cfg[i].addr, phy_pll_27m_cfg[i].val[index]);\n \n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0032-LF-1516-drm-cdns-mhdp-fix-error-check-variable-name-.patch",
    "content": "From b2ea44969c5e51a5809622384728859d7f3a2b8a Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Fri, 19 Jun 2020 16:25:51 +0800\nSubject: [PATCH 32/49] LF-1516: drm: cdns-mhdp: fix error check variable name\n for clk_pxl_link\n\nfix error check variable name for clk_pxl_link.\nReport by Coverity ID:6652947\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Fancy Fang <chen.fang@nxp.com>\n---\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c\nindex a3ba3da4b05d..2ee4e8748b77 100644\n--- a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c\n@@ -167,7 +167,7 @@ int imx8qm_clocks_init(struct imx_mhdp_device *imx_mhdp)\n \t}\n \n \tclks->clk_pxl_link = devm_clk_get(dev, \"clk_pxl_link\");\n-\tif (IS_ERR(clks->clk_pxl_mux)) {\n+\tif (IS_ERR(clks->clk_pxl_link)) {\n \t\tdev_warn(dev, \"failed to get pxl link clk\\n\");\n \t\treturn PTR_ERR(clks->clk_pxl_link);\n \t}\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0033-MLK-24601-drm-imx-mhdp-DP-PHY-support-1-2-lanes-mode.patch",
    "content": "From c789945d09e4c77eb30af1a8db1425cefab52080 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Fri, 28 Aug 2020 10:09:12 +0800\nSubject: [PATCH 33/49] MLK-24601: drm: imx: mhdp: DP PHY support 1/2 lanes\n mode\n\nAll four lanes should be configurated for 1/2/4 lanes modes in driver.\nThe DP FW will power down unused PHY lanes after negotiation.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-dp-phy.c | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-dp-phy.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-dp-phy.c\nindex 5c75e7d40cc0..3d17840b0941 100644\n--- a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-dp-phy.c\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-dp-phy.c\n@@ -137,7 +137,7 @@ static void dp_aux_cfg(struct cdns_mhdp_device *mhdp)\n static void dp_phy_pma_cmn_cfg_24mhz(struct cdns_mhdp_device *mhdp)\n {\n \tint k;\n-\tu32 num_lanes = mhdp->dp.num_lanes;\n+\tu32 num_lanes = 4;\n \tu16 val;\n \n \tval = cdns_phy_reg_read(mhdp, PHY_PMA_CMN_CTRL1);\n@@ -157,7 +157,7 @@ static void dp_phy_pma_cmn_cfg_24mhz(struct cdns_mhdp_device *mhdp)\n /* Valid for 24 MHz only */\n static void dp_phy_pma_cmn_pll0_24mhz(struct cdns_mhdp_device *mhdp)\n {\n-\tu32 num_lanes = mhdp->dp.num_lanes;\n+\tu32 num_lanes = 4;\n \tu32 link_rate = mhdp->dp.rate;\n \tu16 val;\n \tint index, i, k;\n@@ -228,7 +228,7 @@ static void dp_phy_pma_cmn_pll0_24mhz(struct cdns_mhdp_device *mhdp)\n /* PMA common configuration for 27MHz */\n static void dp_phy_pma_cmn_cfg_27mhz(struct cdns_mhdp_device *mhdp)\n {\n-\tu32 num_lanes = mhdp->dp.num_lanes;\n+\tu32 num_lanes = 4;\n \tu16 val;\n \tint k;\n \n@@ -279,7 +279,7 @@ static void dp_phy_pma_cmn_cfg_27mhz(struct cdns_mhdp_device *mhdp)\n \n static void dp_phy_pma_cmn_pll0_27mhz(struct cdns_mhdp_device *mhdp)\n {\n-\tu32 num_lanes = mhdp->dp.num_lanes;\n+\tu32 num_lanes = 4;\n \tu32 link_rate = mhdp->dp.rate;\n \tu16 val;\n \tint index, i, k;\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0034-MLK-24519-2-gpu-imx-Increase-maximum-single-pipe-wid.patch",
    "content": "From 7772a57acd0e05353caead7eb7d064e36bcb92e6 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Sun, 20 Sep 2020 19:32:28 +0800\nSubject: [PATCH 34/49] MLK-24519-2 gpu: imx: Increase maximum single pipe\n width to 2560\n\nThis patch increase the DPU single pipe maximum from 1920 to 2560 for HDMI/DP.\n\nSigned-off-by: Oliver F. Brown <oliver.brown@nxp.com>\nReviewed-by: Liu Ying <victor.liu@nxp.com>\n---\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c\nindex 2ee4e8748b77..cda4d245bab8 100644\n--- a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c\n@@ -22,7 +22,7 @@\n #define PLL_800MHZ (800000000)\n \n #define HDP_DUAL_MODE_MIN_PCLK_RATE\t300000\t/* KHz */\n-#define HDP_SINGLE_MODE_MAX_WIDTH\t1920\n+#define HDP_SINGLE_MODE_MAX_WIDTH\t2560\n \n #define CSR_PIXEL_LINK_MUX_CTL\t\t0x00\n #define CSR_PIXEL_LINK_MUX_VCP_OFFSET\t\t5\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0035-MLK-24072-drm-imx8-correct-mhdp-files-copyright.patch",
    "content": "From 60077991d60b1ba96e52d5a6568ae65ae7143ee2 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Wed, 20 May 2020 10:56:53 +0800\nSubject: [PATCH 35/49] MLK-24072: drm: imx8: correct mhdp files copyright\n\nCorrect mhdp files copyright.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c | 2 +-\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c\nindex cda4d245bab8..38f9defa42f8 100644\n--- a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c\n@@ -1,5 +1,5 @@\n /*\n- * copyright (c) 2019 nxp semiconductor, inc.\n+ * Copyright (c) 2019 NXP semiconductor, inc.\n  *\n  * this program is free software; you can redistribute it and/or modify\n  * it under the terms of the gnu general public license version 2 as\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c\nindex 3acbdf575ee2..cc429fe48abd 100644\n--- a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c\n@@ -1,5 +1,5 @@\n /*\n- * copyright (c) 2019 nxp semiconductor, inc.\n+ * Copyright (c) 2019 NXP semiconductor, inc.\n  *\n  * this program is free software; you can redistribute it and/or modify\n  * it under the terms of the gnu general public license version 2 as\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0036-LF-2744-drm-cdns-reset-force_mode_set-flag-in-atomic.patch",
    "content": "From 93502b984119af556f8a204bf80a62bc1c21fbfd Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Tue, 17 Nov 2020 15:47:36 +0800\nSubject: [PATCH 36/49] LF-2744: drm: cdns: reset force_mode_set flag in\n atomic_check\n\nReset force_mode_set flag in atomic_check function\nto avoid set mode_changed flag multi times when cable plugin.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c\nindex cc429fe48abd..9fa0df74ad7c 100644\n--- a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c\n@@ -1,5 +1,5 @@\n /*\n- * Copyright (c) 2019 NXP semiconductor, inc.\n+ * Copyright (c) 2019-2020 NXP semiconductor, inc.\n  *\n  * this program is free software; you can redistribute it and/or modify\n  * it under the terms of the gnu general public license version 2 as\n@@ -44,8 +44,11 @@ static int cdns_mhdp_imx_encoder_atomic_check(struct drm_encoder *encoder,\n \tif (mhdp->plat_data->video_format != 0)\n \t\timx_crtc_state->bus_format = mhdp->plat_data->video_format;\n \n-\tif (mhdp->force_mode_set)\n+\tif (mhdp->force_mode_set) {\n \t\tcrtc_state->mode_changed = true;\n+\t\t/* reset force mode set flag */\n+\t\tmhdp->force_mode_set = false;\n+\t}\n \n \treturn 0;\n }\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0037-MLK-25199-1-drm-mhdp-Add-hdmi-phy-reset-poweroff-fun.patch",
    "content": "From 38f1f4ecd038628f4ce7a47114455123e5db3367 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Wed, 30 Dec 2020 16:02:52 +0800\nSubject: [PATCH 37/49] MLK-25199-1: drm: mhdp: Add hdmi phy reset/poweroff\n function\n\nAdd hdmi phy reset and power off function.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-hdmi-phy.c | 28 ++++++++++++++++++-\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx.h      |  3 +-\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c   |  4 +--\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c   |  2 ++\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-phy.h      |  3 +-\n 5 files changed, 35 insertions(+), 5 deletions(-)\n\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-hdmi-phy.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-hdmi-phy.c\nindex 120300e6a2df..212f3f4f1e26 100644\n--- a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-hdmi-phy.c\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-hdmi-phy.c\n@@ -1,7 +1,7 @@\n /*\n  * Cadence High-Definition Multimedia Interface (HDMI) driver\n  *\n- * Copyright (C) 2019 NXP Semiconductor, Inc.\n+ * Copyright (C) 2019-2021 NXP Semiconductor, Inc.\n  *\n  * This program is free software; you can redistribute it and/or modify\n  * it under the terms of the GNU General Public License as published by\n@@ -21,6 +21,7 @@\n \n #include <drm/bridge/cdns-mhdp.h>\n #include \"cdns-mhdp-phy.h\"\n+#include \"cdns-mhdp-imx.h\"\n \n /* HDMI TX clock control settings */\n struct hdmi_ctrl {\n@@ -746,6 +747,7 @@ int cdns_hdmi_phy_set_imx8qm(struct cdns_mhdp_device *mhdp)\n \t\tDRM_ERROR(\"NO HDMI FW running\\n\");\n \t\treturn -ENXIO;\n \t}\n+\timx8qm_phy_reset(0);\n \n \t/* Configure PHY */\n \tmhdp->hdmi.char_rate = hdmi_phy_cfg_ss28fdsoi(mhdp, mode);\n@@ -753,6 +755,7 @@ int cdns_hdmi_phy_set_imx8qm(struct cdns_mhdp_device *mhdp)\n \t\tDRM_ERROR(\"failed to set phy pclock\\n\");\n \t\treturn -EINVAL;\n \t}\n+\timx8qm_phy_reset(1);\n \n \tret = hdmi_phy_power_up(mhdp);\n \tif (ret < 0)\n@@ -762,3 +765,26 @@ int cdns_hdmi_phy_set_imx8qm(struct cdns_mhdp_device *mhdp)\n \n \treturn true;\n }\n+\n+int cdns_hdmi_phy_shutdown(struct cdns_mhdp_device *mhdp)\n+{\n+\tint timeout;\n+\tu32 reg_val;\n+\n+\treg_val = cdns_phy_reg_read(mhdp, PHY_HDP_MODE_CTRL);\n+\treg_val &= 0xfff0;\n+\t/* PHY_DP_MODE_CTL set to A3 power state*/\n+\tcdns_phy_reg_write(mhdp, PHY_HDP_MODE_CTRL, reg_val | 0x8);\n+\n+\t/* PHY_DP_MODE_CTL */\n+\ttimeout = 0;\n+\tdo {\n+\t\treg_val = cdns_phy_reg_read(mhdp, PHY_HDP_MODE_CTRL);\n+\t\tDRM_INFO(\"Reg val is 0x%04x\\n\", reg_val);\n+\t\ttimeout++;\n+\t\tmsleep(100);\n+\t} while (!(reg_val & (0x8 << 4)) && (timeout < 10));\t/* Wait for A3 acknowledge */\n+\n+\tDRM_INFO(\"hdmi phy shutdown complete\\n\");\n+\treturn 0;\n+}\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx.h b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx.h\nindex fc3247dada2d..a12005ae4c53 100644\n--- a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx.h\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx.h\n@@ -1,7 +1,7 @@\n /*\n  * Cadence High-Definition Multimedia Interface (HDMI) driver\n  *\n- * Copyright (C) 2019 NXP Semiconductor, Inc.\n+ * Copyright (C) 2019-2021 NXP Semiconductor, Inc.\n  *\n  * This program is free software; you can redistribute it and/or modify\n  * it under the terms of the GNU General Public License as published by\n@@ -72,4 +72,5 @@ int cdns_mhdp_suspend_imx8qm(struct cdns_mhdp_device *mhdp);\n int cdns_mhdp_power_on_imx8qm(struct cdns_mhdp_device *mhdp);\n int cdns_mhdp_power_on_ls1028a(struct cdns_mhdp_device *mhdp);\n void cdns_mhdp_pclk_rate_ls1028a(struct cdns_mhdp_device *mhdp);\n+void imx8qm_phy_reset(u8 reset);\n #endif /* CDNS_MHDP_IMX_H_ */\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c\nindex 38f9defa42f8..46c0500da4c3 100644\n--- a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imx8qm.c\n@@ -1,5 +1,5 @@\n /*\n- * Copyright (c) 2019 NXP semiconductor, inc.\n+ * Copyright (c) 2019-2021 NXP semiconductor, inc.\n  *\n  * this program is free software; you can redistribute it and/or modify\n  * it under the terms of the gnu general public license version 2 as\n@@ -102,7 +102,7 @@ static void imx8qm_pixel_link_sync_disable(u32 dual_mode)\n \t\timx_sc_misc_set_control(handle, IMX_SC_R_DC_0, IMX_SC_C_SYNC_CTRL0, 0);\n }\n \n-static void imx8qm_phy_reset(u8 reset)\n+void imx8qm_phy_reset(u8 reset)\n {\n \tstruct imx_sc_ipc *handle;\n \ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c\nindex 9fa0df74ad7c..4c4ce9d3c847 100644\n--- a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-imxdrv.c\n@@ -22,6 +22,7 @@ static void cdns_mhdp_imx_encoder_disable(struct drm_encoder *encoder)\n \tstruct drm_bridge *bridge = drm_bridge_chain_get_first_bridge(encoder);\n \tstruct cdns_mhdp_device *mhdp = bridge->driver_private;\n \n+\tcdns_hdmi_phy_shutdown(mhdp);\n \tcdns_mhdp_plat_call(mhdp, plat_init);\n }\n \n@@ -184,6 +185,7 @@ static int cdns_mhdp_imx_bind(struct device *dev, struct device *master,\n \n \timx_mhdp->mhdp.plat_data = plat_data;\n \timx_mhdp->mhdp.dev = dev;\n+\timx_mhdp->mhdp.drm_dev = drm;\n \timx_mhdp->mhdp.bus_type = plat_data->bus_type;\n \tret = plat_data->bind(pdev, encoder, &imx_mhdp->mhdp);\n \t/*\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-phy.h b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-phy.h\nindex 5682b9fbc90f..9035f1f71eee 100644\n--- a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-phy.h\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-phy.h\n@@ -1,5 +1,5 @@\n /*\n- * Copyright (C) 2019 NXP Semiconductor, Inc.\n+ * Copyright (C) 2019-2021 NXP Semiconductor, Inc.\n  *\n  * This program is free software; you can redistribute it and/or modify\n  * it under the terms of the GNU General Public License as published by\n@@ -152,4 +152,5 @@ bool cdns_hdmi_phy_video_valid_imx8mq(struct cdns_mhdp_device *hdp);\n bool cdns_hdmi_phy_video_valid_imx8qm(struct cdns_mhdp_device *hdp);\n int cdns_hdmi_phy_set_imx8mq(struct cdns_mhdp_device *hdp);\n int cdns_hdmi_phy_set_imx8qm(struct cdns_mhdp_device *hdp);\n+int cdns_hdmi_phy_shutdown(struct cdns_mhdp_device *mhdp);\n #endif /* _CDNS_MHDP_PHY_H */\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0038-MLK-25199-2-drm-mhdp-Fix-typo-for-hdmi-phy-configura.patch",
    "content": "From d77cbee9949eda85baba634bdf6c6c2afe0b64e4 Mon Sep 17 00:00:00 2001\nFrom: Sandor Yu <Sandor.yu@nxp.com>\nDate: Thu, 31 Dec 2020 10:13:55 +0800\nSubject: [PATCH 38/49] MLK-25199-2: drm: mhdp: Fix typo for hdmi phy\n configuration table\n\nFix typo for imx8qm hdmi phy configuration table.\n\nSigned-off-by: Sandor Yu <Sandor.yu@nxp.com>\nReviewed-by: Robby Cai <robby.cai@nxp.com>\n---\n drivers/gpu/drm/imx/mhdp/cdns-mhdp-hdmi-phy.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-hdmi-phy.c b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-hdmi-phy.c\nindex 212f3f4f1e26..f96b200885df 100644\n--- a/drivers/gpu/drm/imx/mhdp/cdns-mhdp-hdmi-phy.c\n+++ b/drivers/gpu/drm/imx/mhdp/cdns-mhdp-hdmi-phy.c\n@@ -95,11 +95,11 @@ static const struct hdmi_ctrl imx8qm_ctrl_table[] = {\n { 85000, 170000, 1000,  850000, 1700000, 0x11, 0x00, 0x07, 340, 0x146, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 2, 0x01,  85000, 170000},\n {170000, 340000, 1000, 1700000, 3400000, 0x22, 0x01, 0x07, 340, 0x146, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 1, 0x00, 170000, 340000},\n {340000, 600000, 1000, 3400000, 6000000, 0x3C, 0x03, 0x06, 600, 0x24A, 0x00A, 0, 0, 0, 3400000, 6000000, 1, 1, 1, 2, 1, 0x00, 340000, 600000},\n-{ 25000,  34000, 1205,  312500,  425000, 0x04, 0x01, 0x01, 400, 0x182, 0x00A, 0, 0, 0, 2500000, 3400000, 0, 2, 2, 2, 4, 0x03,  31250,  42500},\n-{ 34000,  68000, 1205,  425000,  850000, 0x06, 0x02, 0x01, 300, 0x11E, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 4, 0x02,  42500,  85000},\n-{ 68000, 136000, 1205,  850000, 1700000, 0x0D, 0x02, 0x02, 325, 0x137, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 2, 0x01,  85000, 170000},\n-{136000, 272000, 1205, 1700000, 3400000, 0x1A, 0x02, 0x04, 325, 0x137, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 1, 0x00, 170000, 340000},\n-{272000, 480000, 1205, 3400000, 6000000, 0x30, 0x03, 0x05, 600, 0x24A, 0x00A, 0, 0, 0, 3400000, 6000000, 1, 1, 1, 2, 1, 0x00, 340000, 600000},\n+{ 25000,  34000, 1250,  312500,  425000, 0x04, 0x01, 0x01, 400, 0x182, 0x00A, 0, 0, 0, 2500000, 3400000, 0, 2, 2, 2, 4, 0x03,  31250,  42500},\n+{ 34000,  68000, 1250,  425000,  850000, 0x06, 0x02, 0x01, 300, 0x11E, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 4, 0x02,  42500,  85000},\n+{ 68000, 136000, 1250,  850000, 1700000, 0x0D, 0x02, 0x02, 325, 0x137, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 2, 0x01,  85000, 170000},\n+{136000, 272000, 1250, 1700000, 3400000, 0x1A, 0x02, 0x04, 325, 0x137, 0x00A, 0, 0, 0, 1700000, 3400000, 0, 1, 1, 2, 1, 0x00, 170000, 340000},\n+{272000, 480000, 1250, 3400000, 6000000, 0x30, 0x03, 0x05, 600, 0x24A, 0x00A, 0, 0, 0, 3400000, 6000000, 1, 1, 1, 2, 1, 0x00, 340000, 600000},\n { 25000,  28000, 1500,  375000,  420000, 0x03, 0x01, 0x01, 360, 0x15A, 0x00A, 0, 0, 0, 3000000, 3360000, 0, 2, 2, 2, 4, 0x03,  37500,  42000},\n { 28000,  56000, 1500,  420000,  840000, 0x06, 0x02, 0x01, 360, 0x15A, 0x00A, 0, 0, 0, 1680000, 3360000, 0, 1, 1, 2, 4, 0x02,  42000,  84000},\n { 56000, 113000, 1500,  840000, 1695000, 0x0B, 0x00, 0x05, 330, 0x13C, 0x00A, 0, 0, 0, 1680000, 3390000, 0, 1, 1, 2, 2, 0x01,  84000, 169500},\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0040-drm-imx-dcss-use-the-external-27MHz-phy-clock.patch",
    "content": "From c2af9b24bfa69ffb12e72153f89ed3bb3245fafb Mon Sep 17 00:00:00 2001\nFrom: Laurentiu Palcu <laurentiu.palcu@nxp.com>\nDate: Fri, 22 Nov 2019 10:00:56 +0200\nSubject: [PATCH 40/49] drm/imx/dcss: use the external 27MHz phy clock\n\nThe 27MHz external oscillator offers a high precision low jitter clock and\nis suitable for high pixel clocks modes(ie 4K@60).\n\nSigned-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>\n---\n drivers/gpu/drm/imx/dcss/dcss-dev.c | 25 +++++++++++++++++++------\n drivers/gpu/drm/imx/dcss/dcss-dtg.c | 11 +++++++++++\n 2 files changed, 30 insertions(+), 6 deletions(-)\n\ndiff --git a/drivers/gpu/drm/imx/dcss/dcss-dev.c b/drivers/gpu/drm/imx/dcss/dcss-dev.c\nindex c849533ca83e..1977f6b058f8 100644\n--- a/drivers/gpu/drm/imx/dcss/dcss-dev.c\n+++ b/drivers/gpu/drm/imx/dcss/dcss-dev.c\n@@ -17,6 +17,11 @@\n \n static void dcss_clocks_enable(struct dcss_dev *dcss)\n {\n+\tif (dcss->hdmi_output) {\n+\t\tclk_prepare_enable(dcss->pll_phy_ref_clk);\n+\t\tclk_prepare_enable(dcss->pll_src_clk);\n+\t}\n+\n \tclk_prepare_enable(dcss->axi_clk);\n \tclk_prepare_enable(dcss->apb_clk);\n \tclk_prepare_enable(dcss->rtrm_clk);\n@@ -31,6 +36,11 @@ static void dcss_clocks_disable(struct dcss_dev *dcss)\n \tclk_disable_unprepare(dcss->rtrm_clk);\n \tclk_disable_unprepare(dcss->apb_clk);\n \tclk_disable_unprepare(dcss->axi_clk);\n+\n+\tif (dcss->hdmi_output) {\n+\t\tclk_disable_unprepare(dcss->pll_src_clk);\n+\t\tclk_disable_unprepare(dcss->pll_phy_ref_clk);\n+\t}\n }\n \n static void dcss_disable_dtg_and_ss_cb(void *data)\n@@ -133,17 +143,20 @@ static int dcss_clks_init(struct dcss_dev *dcss)\n \tstruct {\n \t\tconst char *id;\n \t\tstruct clk **clk;\n+\t\tbool required;\n \t} clks[] = {\n-\t\t{\"apb\",   &dcss->apb_clk},\n-\t\t{\"axi\",   &dcss->axi_clk},\n-\t\t{\"pix\",   &dcss->pix_clk},\n-\t\t{\"rtrm\",  &dcss->rtrm_clk},\n-\t\t{\"dtrc\",  &dcss->dtrc_clk},\n+\t\t{\"apb\",   &dcss->apb_clk, true},\n+\t\t{\"axi\",   &dcss->axi_clk, true},\n+\t\t{\"pix\",   &dcss->pix_clk, true},\n+\t\t{\"rtrm\",  &dcss->rtrm_clk, true},\n+\t\t{\"dtrc\",  &dcss->dtrc_clk, true},\n+\t\t{\"pll_src\",  &dcss->pll_src_clk, dcss->hdmi_output},\n+\t\t{\"pll_phy_ref\",  &dcss->pll_phy_ref_clk, dcss->hdmi_output},\n \t};\n \n \tfor (i = 0; i < ARRAY_SIZE(clks); i++) {\n \t\t*clks[i].clk = devm_clk_get(dcss->dev, clks[i].id);\n-\t\tif (IS_ERR(*clks[i].clk)) {\n+\t\tif (IS_ERR(*clks[i].clk) && clks[i].required) {\n \t\t\tdev_err(dcss->dev, \"failed to get %s clock\\n\",\n \t\t\t\tclks[i].id);\n \t\t\treturn PTR_ERR(*clks[i].clk);\ndiff --git a/drivers/gpu/drm/imx/dcss/dcss-dtg.c b/drivers/gpu/drm/imx/dcss/dcss-dtg.c\nindex 30de00540f63..b70785d69ad9 100644\n--- a/drivers/gpu/drm/imx/dcss/dcss-dtg.c\n+++ b/drivers/gpu/drm/imx/dcss/dcss-dtg.c\n@@ -83,6 +83,7 @@ struct dcss_dtg {\n \tu32 ctx_id;\n \n \tbool in_use;\n+\tbool hdmi_output;\n \n \tu32 dis_ulc_x;\n \tu32 dis_ulc_y;\n@@ -159,6 +160,7 @@ int dcss_dtg_init(struct dcss_dev *dcss, unsigned long dtg_base)\n \tdcss->dtg = dtg;\n \tdtg->dev = dcss->dev;\n \tdtg->ctxld = dcss->ctxld;\n+\tdtg->hdmi_output = dcss->hdmi_output;\n \n \tdtg->base_reg = ioremap(dtg_base, SZ_4K);\n \tif (!dtg->base_reg) {\n@@ -221,6 +223,15 @@ void dcss_dtg_sync_set(struct dcss_dtg *dtg, struct videomode *vm)\n \t\t    vm->vactive - 1;\n \n \tclk_disable_unprepare(dcss->pix_clk);\n+\tif (dcss->hdmi_output) {\n+\t\tint err;\n+\n+\t\tclk_disable_unprepare(dcss->pll_src_clk);\n+\t\terr = clk_set_parent(dcss->pll_src_clk, dcss->pll_phy_ref_clk);\n+\t\tif (err < 0)\n+\t\t\tdev_warn(dcss->dev, \"clk_set_parent() returned %d\", err);\n+\t\tclk_prepare_enable(dcss->pll_src_clk);\n+\t}\n \tclk_set_rate(dcss->pix_clk, vm->pixelclock);\n \tclk_prepare_enable(dcss->pix_clk);\n \n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0041-drm-imx-dcss-add-component-framework-functionality.patch",
    "content": "From ec59d2988d1ac50acea0fdaa63513f216ddf016d Mon Sep 17 00:00:00 2001\nFrom: Laurentiu Palcu <laurentiu.palcu@nxp.com>\nDate: Thu, 9 Jul 2020 19:47:31 +0300\nSubject: [PATCH 41/49] drm/imx/dcss: add component framework functionality\n\nComponent framework is needed by HDP driver.\n\nSigned-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>\n---\n drivers/gpu/drm/imx/dcss/dcss-drv.c | 89 ++++++++++++++++++++++-------\n drivers/gpu/drm/imx/dcss/dcss-kms.c | 23 +++++---\n drivers/gpu/drm/imx/dcss/dcss-kms.h |  4 +-\n 3 files changed, 85 insertions(+), 31 deletions(-)\n\ndiff --git a/drivers/gpu/drm/imx/dcss/dcss-drv.c b/drivers/gpu/drm/imx/dcss/dcss-drv.c\nindex 8dc2f85c514b..09d0ac28e28a 100644\n--- a/drivers/gpu/drm/imx/dcss/dcss-drv.c\n+++ b/drivers/gpu/drm/imx/dcss/dcss-drv.c\n@@ -6,6 +6,7 @@\n #include <linux/kernel.h>\n #include <linux/platform_device.h>\n #include <drm/drm_module.h>\n+#include <linux/component.h>\n #include <drm/drm_of.h>\n \n #include \"dcss-dev.h\"\n@@ -14,6 +15,8 @@\n struct dcss_drv {\n \tstruct dcss_dev *dcss;\n \tstruct dcss_kms_dev *kms;\n+\n+\tbool is_componentized;\n };\n \n struct dcss_dev *dcss_drv_dev_to_dcss(struct device *dev)\n@@ -30,30 +33,18 @@ struct drm_device *dcss_drv_dev_to_drm(struct device *dev)\n \treturn mdrv ? &mdrv->kms->base : NULL;\n }\n \n-static int dcss_drv_platform_probe(struct platform_device *pdev)\n+static int dcss_drv_init(struct device *dev, bool componentized)\n {\n-\tstruct device *dev = &pdev->dev;\n-\tstruct device_node *remote;\n \tstruct dcss_drv *mdrv;\n \tint err = 0;\n-\tbool hdmi_output = true;\n-\n-\tif (!dev->of_node)\n-\t\treturn -ENODEV;\n-\n-\tremote = of_graph_get_remote_node(dev->of_node, 0, 0);\n-\tif (!remote)\n-\t\treturn -ENODEV;\n-\n-\thdmi_output = !of_device_is_compatible(remote, \"fsl,imx8mq-nwl-dsi\");\n-\n-\tof_node_put(remote);\n \n \tmdrv = kzalloc(sizeof(*mdrv), GFP_KERNEL);\n \tif (!mdrv)\n \t\treturn -ENOMEM;\n \n-\tmdrv->dcss = dcss_dev_create(dev, hdmi_output);\n+\tmdrv->is_componentized = componentized;\n+\n+\tmdrv->dcss = dcss_dev_create(dev, componentized);\n \tif (IS_ERR(mdrv->dcss)) {\n \t\terr = PTR_ERR(mdrv->dcss);\n \t\tgoto err;\n@@ -61,7 +52,7 @@ static int dcss_drv_platform_probe(struct platform_device *pdev)\n \n \tdev_set_drvdata(dev, mdrv);\n \n-\tmdrv->kms = dcss_kms_attach(mdrv->dcss);\n+\tmdrv->kms = dcss_kms_attach(mdrv->dcss, componentized);\n \tif (IS_ERR(mdrv->kms)) {\n \t\terr = PTR_ERR(mdrv->kms);\n \t\tgoto dcss_shutoff;\n@@ -79,19 +70,73 @@ static int dcss_drv_platform_probe(struct platform_device *pdev)\n \treturn err;\n }\n \n-static int dcss_drv_platform_remove(struct platform_device *pdev)\n+static void dcss_drv_deinit(struct device *dev, bool componentized)\n {\n-\tstruct dcss_drv *mdrv = dev_get_drvdata(&pdev->dev);\n+\tstruct dcss_drv *mdrv = dev_get_drvdata(dev);\n \n \tif (!mdrv)\n-\t\treturn 0;\n+\t\treturn;\n \n-\tdcss_kms_detach(mdrv->kms);\n+\tdcss_kms_detach(mdrv->kms, componentized);\n \tdcss_dev_destroy(mdrv->dcss);\n \n-\tdev_set_drvdata(&pdev->dev, NULL);\n+\tdev_set_drvdata(dev, NULL);\n \n \tkfree(mdrv);\n+}\n+\n+static int dcss_drv_bind(struct device *dev)\n+{\n+\treturn dcss_drv_init(dev, true);\n+}\n+\n+static void dcss_drv_unbind(struct device *dev)\n+{\n+\treturn dcss_drv_deinit(dev, true);\n+}\n+\n+static const struct component_master_ops dcss_master_ops = {\n+\t.bind\t= dcss_drv_bind,\n+\t.unbind\t= dcss_drv_unbind,\n+};\n+\n+static int compare_of(struct device *dev, void *data)\n+{\n+\treturn dev->of_node == data;\n+}\n+\n+static int dcss_drv_platform_probe(struct platform_device *pdev)\n+{\n+\tstruct device *dev = &pdev->dev;\n+\tstruct component_match *match = NULL;\n+\tstruct device_node *remote;\n+\n+\tif (!dev->of_node)\n+\t\treturn -ENODEV;\n+\n+\tremote = of_graph_get_remote_node(dev->of_node, 0, 0);\n+\tif (!remote)\n+\t\treturn -ENODEV;\n+\n+\tif (of_device_is_compatible(remote, \"fsl,imx8mq-nwl-dsi\")) {\n+\t\tof_node_put(remote);\n+\t\treturn dcss_drv_init(dev, false);\n+\t}\n+\n+\tdrm_of_component_match_add(dev, &match, compare_of, remote);\n+\tof_node_put(remote);\n+\n+\treturn component_master_add_with_match(dev, &dcss_master_ops, match);\n+}\n+\n+static int dcss_drv_platform_remove(struct platform_device *pdev)\n+{\n+\tstruct dcss_drv *mdrv = dev_get_drvdata(&pdev->dev);\n+\n+\tif (mdrv->is_componentized)\n+\t\tcomponent_master_del(&pdev->dev, &dcss_master_ops);\n+\telse\n+\t\tdcss_drv_deinit(&pdev->dev, false);\n \n \treturn 0;\n }\ndiff --git a/drivers/gpu/drm/imx/dcss/dcss-kms.c b/drivers/gpu/drm/imx/dcss/dcss-kms.c\nindex 135a62366ab8..cafb09df6c75 100644\n--- a/drivers/gpu/drm/imx/dcss/dcss-kms.c\n+++ b/drivers/gpu/drm/imx/dcss/dcss-kms.c\n@@ -13,6 +13,7 @@\n #include <drm/drm_of.h>\n #include <drm/drm_probe_helper.h>\n #include <drm/drm_vblank.h>\n+#include <linux/component.h>\n \n #include \"dcss-dev.h\"\n #include \"dcss-kms.h\"\n@@ -123,7 +124,7 @@ static int dcss_kms_bridge_connector_init(struct dcss_kms_dev *kms)\n \treturn 0;\n }\n \n-struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss)\n+struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss, bool componentized)\n {\n \tstruct dcss_kms_dev *kms;\n \tstruct drm_device *drm;\n@@ -148,13 +149,16 @@ struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss)\n \n \t\tgoto cleanup_mode_config;\n \n-\tret = dcss_kms_bridge_connector_init(kms);\n+\tret = dcss_crtc_init(crtc, drm);\n \tif (ret)\n \t\tgoto cleanup_mode_config;\n \n-\tret = dcss_crtc_init(crtc, drm);\n+\tif (componentized)\n+\t\tret = component_bind_all(dcss->dev, kms);\n+\telse\n+\t\tret = dcss_kms_bridge_connector_init(kms);\n \tif (ret)\n-\t\tgoto cleanup_mode_config;\n+\t\tgoto cleanup_crtc;\n \n \tdrm_mode_config_reset(drm);\n \n@@ -171,7 +176,8 @@ struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss)\n \treturn kms;\n \n cleanup_crtc:\n-\tdrm_bridge_connector_disable_hpd(kms->connector);\n+\tif (!componentized)\n+\t\tdrm_bridge_connector_disable_hpd(kms->connector);\n \tdrm_kms_helper_poll_fini(drm);\n \tdcss_crtc_deinit(crtc, drm);\n \n@@ -182,9 +188,10 @@ struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss)\n \treturn ERR_PTR(ret);\n }\n \n-void dcss_kms_detach(struct dcss_kms_dev *kms)\n+void dcss_kms_detach(struct dcss_kms_dev *kms, bool componentized)\n {\n \tstruct drm_device *drm = &kms->base;\n+\tstruct dcss_dev *dcss = drm->dev_private;\n \n \tdrm_dev_unregister(drm);\n \tdrm_bridge_connector_disable_hpd(kms->connector);\n@@ -194,5 +201,7 @@ void dcss_kms_detach(struct dcss_kms_dev *kms)\n \tdrm->irq_enabled = false;\n \tdrm_mode_config_cleanup(drm);\n \tdcss_crtc_deinit(&kms->crtc, drm);\n+\tif (componentized)\n+\t\tcomponent_unbind_all(dcss->dev, drm);\n \tdrm->dev_private = NULL;\n }\ndiff --git a/drivers/gpu/drm/imx/dcss/dcss-kms.h b/drivers/gpu/drm/imx/dcss/dcss-kms.h\nindex dfe5dd99eea3..e98d9c587a43 100644\n--- a/drivers/gpu/drm/imx/dcss/dcss-kms.h\n+++ b/drivers/gpu/drm/imx/dcss/dcss-kms.h\n@@ -32,8 +32,8 @@ struct dcss_kms_dev {\n \tstruct drm_connector *connector;\n };\n \n-struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss);\n-void dcss_kms_detach(struct dcss_kms_dev *kms);\n+struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss, bool componentized);\n+void dcss_kms_detach(struct dcss_kms_dev *kms, bool componentized);\n int dcss_crtc_init(struct dcss_crtc *crtc, struct drm_device *drm);\n void dcss_crtc_deinit(struct dcss_crtc *crtc, struct drm_device *drm);\n struct dcss_plane *dcss_plane_init(struct drm_device *drm,\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0043-arm64-dts-imx8mq-add-DCSS-node.patch",
    "content": "From bd9c83ea41380f584fdd8f2781112b530c84ebba Mon Sep 17 00:00:00 2001\nFrom: Laurentiu Palcu <laurentiu.palcu@nxp.com>\nDate: Thu, 9 Jul 2020 19:47:33 +0300\nSubject: [PATCH 43/49] arm64: dts: imx8mq: add DCSS node\n\nThis patch adds the node for iMX8MQ Display Controller Subsystem.\n\nSigned-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>\n---\n arch/arm64/boot/dts/freescale/imx8mq.dtsi | 23 +++++++++++++++++++++++\n 1 file changed, 23 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi\nindex 5e0e7d0f1bc4..5a617f9ed8b5 100644\n--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi\n+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi\n@@ -1103,6 +1103,29 @@ bus@32c00000 { /* AIPS4 */\n \t\t\t#size-cells = <1>;\n \t\t\tranges = <0x32c00000 0x32c00000 0x400000>;\n \n+\t\t\tdcss: display-controller@32e00000 {\n+\t\t\t\tcompatible = \"nxp,imx8mq-dcss\";\n+\t\t\t\treg = <0x32e00000 0x2d000>, <0x32e2f000 0x1000>;\n+\t\t\t\tinterrupts = <6>, <8>, <9>;\n+\t\t\t\tinterrupt-names = \"ctxld\", \"ctxld_kick\", \"vblank\";\n+\t\t\t\tinterrupt-parent = <&irqsteer>;\n+\t\t\t\tclocks = <&clk IMX8MQ_CLK_DISP_APB_ROOT>,\n+\t\t\t\t\t <&clk IMX8MQ_CLK_DISP_AXI_ROOT>,\n+\t\t\t\t\t <&clk IMX8MQ_CLK_DISP_RTRM_ROOT>,\n+\t\t\t\t\t <&clk IMX8MQ_VIDEO2_PLL_OUT>,\n+\t\t\t\t\t <&clk IMX8MQ_CLK_DISP_DTRC>;\n+\t\t\t\tclock-names = \"apb\", \"axi\", \"rtrm\", \"pix\", \"dtrc\";\n+\t\t\t\tassigned-clocks = <&clk IMX8MQ_CLK_DISP_AXI>,\n+\t\t\t\t\t\t  <&clk IMX8MQ_CLK_DISP_RTRM>,\n+\t\t\t\t\t\t  <&clk IMX8MQ_VIDEO2_PLL1_REF_SEL>;\n+\t\t\t\tassigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_800M>,\n+\t\t\t\t\t\t\t <&clk IMX8MQ_SYS1_PLL_800M>,\n+\t\t\t\t\t\t\t <&clk IMX8MQ_CLK_27M>;\n+\t\t\t\tassigned-clock-rates = <800000000>,\n+\t\t\t\t\t\t       <400000000>;\n+\t\t\t\tstatus = \"disabled\";\n+\t\t\t};\n+\n \t\t\tirqsteer: interrupt-controller@32e2d000 {\n \t\t\t\tcompatible = \"fsl,imx8m-irqsteer\", \"fsl,imx-irqsteer\";\n \t\t\t\treg = <0x32e2d000 0x1000>;\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0044-arm64-dts-imx8mq-add-DCSS-external-oscillator-suppor.patch",
    "content": "From 8e5a885158f430de3ea36b1439dd8c0058ce95df Mon Sep 17 00:00:00 2001\nFrom: Laurentiu Palcu <laurentiu.palcu@nxp.com>\nDate: Fri, 22 Nov 2019 10:12:50 +0200\nSubject: [PATCH 44/49] arm64: dts: imx8mq: add DCSS external oscillator\n support\n\nThe external oscillator, which is high precision, will be used when DCSS output\ngoes to HDMI.\n\nSigned-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>\n---\n arch/arm64/boot/dts/freescale/imx8mq.dtsi | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi\nindex 5a617f9ed8b5..b75252a65c44 100644\n--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi\n+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi\n@@ -1113,8 +1113,11 @@ dcss: display-controller@32e00000 {\n \t\t\t\t\t <&clk IMX8MQ_CLK_DISP_AXI_ROOT>,\n \t\t\t\t\t <&clk IMX8MQ_CLK_DISP_RTRM_ROOT>,\n \t\t\t\t\t <&clk IMX8MQ_VIDEO2_PLL_OUT>,\n-\t\t\t\t\t <&clk IMX8MQ_CLK_DISP_DTRC>;\n-\t\t\t\tclock-names = \"apb\", \"axi\", \"rtrm\", \"pix\", \"dtrc\";\n+\t\t\t\t\t <&clk IMX8MQ_CLK_DISP_DTRC>,\n+\t\t\t\t\t <&clk IMX8MQ_VIDEO2_PLL1_REF_SEL>,\n+\t\t\t\t\t <&clk IMX8MQ_CLK_PHY_27MHZ>;\n+\t\t\t\tclock-names = \"apb\", \"axi\", \"rtrm\", \"pix\", \"dtrc\", \"pll_src\",\n+\t\t\t\t\t\t      \"pll_phy_ref\";\n \t\t\t\tassigned-clocks = <&clk IMX8MQ_CLK_DISP_AXI>,\n \t\t\t\t\t\t  <&clk IMX8MQ_CLK_DISP_RTRM>,\n \t\t\t\t\t\t  <&clk IMX8MQ_VIDEO2_PLL1_REF_SEL>;\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0045-arm64-dts-fsl-imx8mq-add-HDP-bridge-node.patch",
    "content": "From 0327e9fc14269069711cd2d45d60130b318532fe Mon Sep 17 00:00:00 2001\nFrom: Lucas Stach <l.stach@pengutronix.de>\nDate: Tue, 13 Feb 2018 12:30:58 +0100\nSubject: [PATCH 45/49] arm64: dts: fsl: imx8mq: add HDP bridge node\n\nSigned-off-by: Lucas Stach <l.stach@pengutronix.de>\n---\n arch/arm64/boot/dts/freescale/imx8mq.dtsi | 10 ++++++++++\n 1 file changed, 10 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi\nindex b75252a65c44..aad21d6f1da7 100644\n--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi\n+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi\n@@ -1103,6 +1103,16 @@ bus@32c00000 { /* AIPS4 */\n \t\t\t#size-cells = <1>;\n \t\t\tranges = <0x32c00000 0x32c00000 0x400000>;\n \n+\t\t\thdmi: hdmi@32c00000 {\n+\t\t\t\treg = <0x32c00000 0x33800>,     /* HDP registers */\n+\t\t\t\t      <0x32e40000 0x40000>,     /* HDP SEC register */\n+\t\t\t\t      <0x32e2f000 0x10>;        /* RESET register */\n+\t\t\t\tinterrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,\n+\t\t\t\t             <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;\n+\t\t\t\tinterrupt-names = \"plug_in\", \"plug_out\";\n+\t\t\t\tstatus = \"disabled\";\n+\t\t\t};\n+\n \t\t\tdcss: display-controller@32e00000 {\n \t\t\t\tcompatible = \"nxp,imx8mq-dcss\";\n \t\t\t\treg = <0x32e00000 0x2d000>, <0x32e2f000 0x1000>;\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0046-arm64-dts-fsl-imx8mq-evk-enable-DCSS-and-HDMI.patch",
    "content": "From 96ab278661207096c013ad1b39ed36f5f9a35ffd Mon Sep 17 00:00:00 2001\nFrom: Lucas Stach <l.stach@pengutronix.de>\nDate: Tue, 13 Feb 2018 12:47:09 +0100\nSubject: [PATCH 46/49] arm64: dts: fsl: imx8mq-evk: enable DCSS and HDMI\n\nSigned-off-by: Lucas Stach <l.stach@pengutronix.de>\n---\n arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 22 ++++++++++++++++++++\n 1 file changed, 22 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts\nindex 2418cca00bc5..71eeda6de3d7 100644\n--- a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts\n+++ b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts\n@@ -132,6 +132,16 @@ opp-800M {\n \t};\n };\n \n+&dcss {\n+\tstatus = \"okay\";\n+\n+\tport {\n+\t\tdcss_out: endpoint {\n+\t\t\tremote-endpoint = <&hdmi_in>;\n+\t\t};\n+\t};\n+};\n+\n &dphy {\n \tstatus = \"okay\";\n };\n@@ -168,6 +178,18 @@ wl-reg-on-hog {\n \t};\n };\n \n+&hdmi {\n+\tcompatible = \"cdn,imx8mq-hdmi\";\n+\tlane-mapping = <0xe4>;\n+\tstatus = \"okay\";\n+\n+\tport {\n+\t\thdmi_in: endpoint {\n+\t\t\tremote-endpoint = <&dcss_out>;\n+\t\t};\n+\t};\n+};\n+\n &i2c1 {\n \tclock-frequency = <100000>;\n \tpinctrl-names = \"default\";\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0047-arm64-dts-fsl-imx8mq-pico-pi-enable-DCSS-and-HDMI.patch",
    "content": "From 5a139d07d03076be7972db4b022558dffcfd685b Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Tue, 9 Mar 2021 10:47:27 -0800\nSubject: [PATCH 47/49] arm64: dts: fsl: imx8mq-pico-pi: enable DCSS and HDMI\n\n---\n .../boot/dts/freescale/imx8mq-pico-pi.dts     | 22 +++++++++++++++++++\n 1 file changed, 22 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts b/arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts\nindex 89cbec5c41b2..03734145c50e 100644\n--- a/arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts\n+++ b/arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts\n@@ -37,6 +37,16 @@ reg_usb_otg_vbus: regulator-usb-otg-vbus {\n \t};\n };\n \n+&dcss {\n+\tstatus = \"okay\";\n+\n+\tport {\n+\t\tdcss_out: endpoint {\n+\t\t\tremote-endpoint = <&hdmi_in>;\n+\t\t};\n+\t};\n+};\n+\n &fec1 {\n \tpinctrl-names = \"default\";\n \tpinctrl-0 = <&pinctrl_fec1 &pinctrl_enet_3v3>;\n@@ -56,6 +66,18 @@ ethphy0: ethernet-phy@1 {\n \t};\n };\n \n+&hdmi {\n+    compatible = \"cdn,imx8mq-hdmi\";\n+    lane-mapping = <0xe4>;\n+    status = \"okay\";\n+\n+    port {\n+        hdmi_in: endpoint {\n+            remote-endpoint = <&dcss_out>;\n+        };\n+    };\n+};\n+\n &i2c1 {\n \tclock-frequency = <100000>;\n \tpinctrl-names = \"default\";\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0048-drm-imx-mhdp-don-t-depend-on-DRM_IMX.patch",
    "content": "From f94717816b9a39869219ede859fe74af3f2ecd19 Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Wed, 24 Mar 2021 14:27:43 -0700\nSubject: [PATCH 48/49] drm: imx: mhdp: don't depend on DRM_IMX\n\n---\n drivers/gpu/drm/imx/mhdp/Kconfig | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/drivers/gpu/drm/imx/mhdp/Kconfig b/drivers/gpu/drm/imx/mhdp/Kconfig\nindex 86950badb947..cf7dfacdd434 100644\n--- a/drivers/gpu/drm/imx/mhdp/Kconfig\n+++ b/drivers/gpu/drm/imx/mhdp/Kconfig\n@@ -6,6 +6,5 @@ config DRM_IMX_CDNS_MHDP\n \tselect DRM_CDNS_DP\n \tselect DRM_CDNS_HDMI\n \tselect DRM_CDNS_AUDIO\n-\tdepends on DRM_IMX\n \thelp\n \t  Choose this if you want to use HDMI on i.MX8.\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0049-drm-cadence-shutup-cec-logging.patch",
    "content": "From 3111faf58971c2c517457e62f84d138a3d62464e Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Wed, 24 Mar 2021 15:14:57 -0700\nSubject: [PATCH 49/49] drm: cadence: shutup cec logging\n\n---\n drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c\nindex 25cf9e91e64f..e91de13eae58 100644\n--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-cec.c\n@@ -171,8 +171,8 @@ static u32 mhdp_cec_write_message(struct cdns_mhdp_cec *cec, struct cec_msg *msg\n \t\treturn -EINVAL;\n \t}\n \n-\tfor (i = 0; i < msg->len; ++i)\n-\t\tprintk(\"msg[%d]=0x%x\\n\",i, msg->msg[i]);\n+\t// for (i = 0; i < msg->len; ++i)\n+\t// \tprintk(\"msg[%d]=0x%x\\n\",i, msg->msg[i]);\n \n \t/* Write Message to register */\n \tfor (i = 0; i < msg->len; ++i) {\n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/linux/0050-drm-display-drm-hdmi-helper-h.patch",
    "content": "--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\t2022-06-28 15:48:27.254022595 +0000\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c\t2022-06-28 15:46:14.919939083 +0000\n@@ -14,6 +14,8 @@\n #include <drm/drm_edid.h>\n #include <drm/drm_encoder_slave.h>\n #include <drm/display/drm_hdcp.h>\n+#include <drm/display/drm_hdcp_helper.h>\n+#include <drm/display/drm_hdmi_helper.h>\n #include <drm/drm_of.h>\n #include <drm/drm_probe_helper.h>\n #include <drm/drm_print.h>\n--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c\t2022-06-28 15:53:59.618466556 +0000\n+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-hdcp.c\t2022-06-28 15:56:01.987635836 +0000\n@@ -11,6 +11,7 @@\n  */\n #include <drm/bridge/cdns-mhdp.h>\n #include <drm/display/drm_hdcp.h>\n+#include <drm/display/drm_hdcp_helper.h>\n #include <drm/drm_print.h>\n #include <linux/firmware.h>\n \n"
  },
  {
    "path": "projects/NXP/devices/iMX8/patches/u-boot/0005-pico-imx8mq-add-distro-boot-cmd-support.patch",
    "content": "From ee72c64b4ad8ef5aaefb8ab7e2f5288a9655dd3a Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Tue, 9 Mar 2021 10:13:23 -0800\nSubject: [PATCH 5/5] pico-imx8mq add distro boot cmd support\n\n---\n configs/pico-imx8mq_defconfig |  1 +\n include/configs/pico-imx8mq.h | 64 +++++++++--------------------------\n 2 files changed, 17 insertions(+), 48 deletions(-)\n\ndiff --git a/configs/pico-imx8mq_defconfig b/configs/pico-imx8mq_defconfig\nindex e2e3a15da1..d70d7fc1cc 100644\n--- a/configs/pico-imx8mq_defconfig\n+++ b/configs/pico-imx8mq_defconfig\n@@ -83,3 +83,4 @@ CONFIG_DM_REGULATOR_GPIO=y\n CONFIG_DM_RESET=y\n CONFIG_MXC_UART=y\n CONFIG_DM_THERMAL=y\n+CONFIG_DISTRO_DEFAULTS=y\ndiff --git a/include/configs/pico-imx8mq.h b/include/configs/pico-imx8mq.h\nindex 7a5891652f..e301bc736d 100644\n--- a/include/configs/pico-imx8mq.h\n+++ b/include/configs/pico-imx8mq.h\n@@ -41,42 +41,22 @@\n #define IMX_FEC_BASE\t\t\t0x30BE0000\n #endif\n \n-/* Initial environment variables */\n-#define CONFIG_EXTRA_ENV_SETTINGS\t\t\t\t\t\\\n-\t\"script=boot.scr\\0\"\t\t\t\t\t\t\\\n-\t\"image=Image\\0\"\t\t\t\t\t\t\t\\\n-\t\"console=ttymxc0,115200\\0\"\t\t\t\t\t\\\n-\t\"fdt_addr=0x43000000\\0\"\t\t\t\t\t\t\\\n-\t\"fdt_high=0xffffffffffffffff\\0\"\t\t\t\t\t\\\n-\t\"fdt_file=imx8mq-pico-pi.dtb\\0\"\t\t\t\t\t\\\n-\t\"initrd_addr=0x43800000\\0\"\t\t\t\t\t\\\n-\t\"initrd_high=0xffffffffffffffff\\0\"\t\t\t\t\\\n-\t\"mmcdev=\" __stringify(CONFIG_SYS_MMC_ENV_DEV) \"\\0\"\t\t\\\n-\t\"mmcpart=1\\0\"\t\\\n-\t\"mmcroot=/dev/mmcblk1p2 rootwait rw\\0\"\t\t\t\\\n-\t\"mmcautodetect=yes\\0\"\t\t\t\t\t\t\\\n-\t\"mmcargs=setenv bootargs console=${console} root=${mmcroot}\\0 \"\t\\\n-\t\"loadbootscript=\"\t\t\t\t\t\t\\\n-\t\t\"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\\0\" \\\n-\t\"bootscript=echo Running bootscript from mmc ...; source\\0\"\t\\\n-\t\"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\\0\" \\\n-\t\"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\\0\" \\\n-\t\"mmcboot=echo Booting from mmc ...; \"\t\t\t\t\\\n-\t\t\"run mmcargs; \"\t\t\t\t\t\t\\\n-\t\t\"echo wait for boot; \"\t\t\t\t\t\\\n-\t\t\"fi;\\0\"\t\t\t\t\t\t\t\\\n-\t\"netargs=setenv bootargs console=${console} \"\t\t\t\\\n-\t\t\"root=/dev/nfs \"\t\t\t\t\t\\\n-\t\t\"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\\0\"\t\\\n-\t\"netboot=echo Booting from net ...; \"\t\t\t\t\\\n-\t\t\"run netargs;  \"\t\t\t\t\t\\\n-\t\t\"if test ${ip_dyn} = yes; then \"\t\t\t\\\n-\t\t\t\"setenv get_cmd dhcp; \"\t\t\t\t\\\n-\t\t\"else \"\t\t\t\t\t\t\t\\\n-\t\t\t\"setenv get_cmd tftp; \"\t\t\t\t\\\n-\t\t\"fi; \"\t\t\t\t\t\t\t\\\n-\t\t\"${get_cmd} ${loadaddr} ${image}; \"\t\t\t\\\n-\t\t\"booti; \"\n+#define BOOT_TARGET_DEVICES(func) \\\n+        func(MMC, mmc, 1) \\\n+        func(MMC, mmc, 0) \\\n+        func(PXE, pxe, na) \\\n+        func(DHCP, dhcp, na)\n+\n+#include <config_distro_bootcmd.h>\n+\n+#define CONFIG_EXTRA_ENV_SETTINGS\t\t\\\n+\t\"console=ttymxc0,115200\\0\" \\\n+\t\"loadaddr=0x40480000\\0\" \\\n+\t\"kernel_addr_r=0x40480000\\0\" \\\n+\t\"fdt_addr_r=0x43000000\\0\"\t\t\t\\\n+\t\"scriptaddr=0x50480000\\0\" \\\n+\t\"pxefile_addr_r=0x50580000\\0\" \\\n+\tBOOTENV\n \n /* Link Definitions */\n \n-- \n2.29.2\n\n"
  },
  {
    "path": "projects/NXP/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # Bootloader to use (syslinux / u-boot / bcm2835-bootloader)\n    BOOTLOADER=\"u-boot\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"dtbs\"\n\n  # Kernel to use. values can be:\n  # default:  default mainline kernel\n    LINUX=\"default\"\n\n################################################################################\n# setup build defaults\n################################################################################\n\n  # Project CFLAGS\n    PROJECT_CFLAGS=\"\"\n\n  # SquashFS compression method (gzip / lzo / xz)\n    SQUASHFS_COMPRESSION=\"zstd\"\n\n################################################################################\n# setup project defaults\n################################################################################\n\n  # OpenGL(X) implementation to use (no / mesa)\n    OPENGL=\"no\"\n\n  # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q / opengl-meson6)\n    OPENGLES=\"mesa\"\n\n  # Vulkan implementation to use (vulkan-loader / no)\n    VULKAN=\"no\"\n\n  # include uvesafb support (yes / no)\n    UVESAFB_SUPPORT=\"no\"\n\n  # Displayserver to use (wl / no)\n    DISPLAYSERVER=\"no\"\n\n  # Windowmanager to use (weston / no)\n    WINDOWMANAGER=\"no\"\n\n  # Xorg Graphic drivers to use (all / etnaviv)\n  # Space separated list is supported,\n  # e.g. GRAPHIC_DRIVERS=\"etnaviv\"\n    GRAPHIC_DRIVERS=\"etnaviv\"\n\n  # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)\n    KODIPLAYER_DRIVER=\"mesa\"\n\n  # build and install driver addons (yes / no)\n    DRIVER_ADDONS_SUPPORT=\"no\"\n\n  # driver addons to install:\n  # for a list of additional drivers see packages/linux-driver-addons\n  # Space separated list is supported,\n    DRIVER_ADDONS=\"crazycat dvb-latest\"\n\n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware\"\n\n  # build with installer (yes / no)\n    INSTALLER_SUPPORT=\"no\"\n\n  # use the kernel CEC framework for libcec (yes / no)\n    CEC_FRAMEWORK_SUPPORT=\"yes\"\n"
  },
  {
    "path": "projects/Qualcomm/devices/Dragonboard/README.md",
    "content": "## Install Instructions\n\nThe Dragonboard is unique in the way that it uses and android bootloader to load the OS. This makes it difficult for a few reasons:\n\n1) Requires a very specific partition layout\n2) Typically requires a secondary bootloader (usually little kernel (LK). we use u-boot).\n\nAll this makes it difficult to create a disk image that can easily be flashed and booted natively. After some time trying various different configurations this is what I landed on:\n\n#### Flash the .img file to and SD card (dd, rufus, LE disk image tool, etc)\n```\ngunzip LibreELEC-Dragonboard.arm-9.80-devel-20190706164625-ce7dc9b-410c.img.gz\ndd if=LibreELEC-Dragonboard.arm-9.80-devel-20190706164625-ce7dc9b-410c.img of=/dev/sdx bs=4M\n```\n\n #### Mount the first partition\n ```\n mount /dev/sdx1 /mnt (or similar)\n```\n\n#### Mount the squashfs SYSTEM file\n```\n mount -o loop /mnt/SYSTEM /mnt2 (or similar)\n ```\n#### Write the u-boot bootloader using fastboot\n\nto write u-boot to the boot partition on the emmc you will need to use fastboot. (NOTE: this will wipe out whatever you have in the boot partition on the emmc and will make it so that OS does not boot anymore).\n\nTo enter fastboot mode read the following instructions:\n\n1) While holding the Vol (-) button, power on the DragonBoard™ 410c by plugging it in\n2) Once DragonBoard™ 410c is plugged into power, release your hold on the Vol (-) button.\n3) Wait for about 20 seconds.\n4) Board should boot into fastboot mode.\n```\nfastboot flash boot /mnt2/usr/share/bootloader/u-boot.img\n```\n\n#### Unmount partitions\n```\numount /mnt2\numount /mnt\n```\n\n#### Plug SD card into Dragonboard and power on\n"
  },
  {
    "path": "projects/Qualcomm/devices/Dragonboard/bootloader/install",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\ndtbTool -o dt.img arch/arm/dts/\n\ntouch rd\n\nmkbootimg --kernel=u-boot-dtb.bin \\\n          --ramdisk=rd \\\n          --dt=dt.img \\\n          --pagesize 2048 \\\n          --base 0x80000000 \\\n          --cmdline=\"\" \\\n          --output=u-boot.img\n\nrm rd\n\ncp -av u-boot.img $INSTALL/usr/share/bootloader\n"
  },
  {
    "path": "projects/Qualcomm/devices/Dragonboard/bootloader/release",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nSRCDIR=\"$BUILD/image/system/usr/share/bootloader\"\nDSTDIR=\"$RELEASE_DIR/3rdparty/bootloader\"\n\nmkdir -p \"$DSTDIR\"\n  if [ -n \"$UBOOT_SYSTEM\" ]; then\n    cp -a \"$SRCDIR/u-boot.img\" \"$DSTDIR\"\n  fi\n\n  cp -a \"$SRCDIR\"/*.dtb \"$DSTDIR\"\n"
  },
  {
    "path": "projects/Qualcomm/devices/Dragonboard/bootloader/update.sh",
    "content": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n[ -z \"$BOOT_ROOT\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"$BOOT_PART\" ] && BOOT_PART=$(df \"$BOOT_ROOT\" | tail -1 | awk {' print $1 '})\nif [ -z \"$BOOT_DISK\" ]; then\n  case $BOOT_PART in\n    /dev/sd[a-z][0-9]*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,[0-9]*,,g\")\n      ;;\n    /dev/mmcblk*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,p[0-9]*,,g\")\n      ;;\n  esac\nfi\n\n# mount $BOOT_ROOT r/w\n  mount -o remount,rw $BOOT_ROOT\n\n# update Device Tree Blobs\n  for all_dtb in /flash/*.dtb; do\n    dtb=$(basename $all_dtb)\n    if [ -f $SYSTEM_ROOT/usr/share/bootloader/$dtb ]; then\n      echo \"*** updating Device Tree Blob: $dtb ...\"\n      cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT\n    fi\n  done\n\n# mount $BOOT_ROOT r/o\n  sync\n  mount -o remount,ro $BOOT_ROOT\n"
  },
  {
    "path": "projects/Qualcomm/devices/Dragonboard/linux/linux.aarch64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm64 6.1.0-rc6 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"aarch64-none-elf-gcc-12.2.0 (GCC) 12.2.0\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=120200\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23900\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23900\nCONFIG_LLD_VERSION=0\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\nCONFIG_LOCALVERSION_AUTO=y\nCONFIG_BUILD_SALT=\"\"\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_SYSVIPC_COMPAT=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\n# CONFIG_WATCH_QUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\nCONFIG_AUDIT=y\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\nCONFIG_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y\nCONFIG_GENERIC_IRQ_IPI=y\nCONFIG_GENERIC_MSI_IRQ=y\nCONFIG_GENERIC_MSI_IRQ_DOMAIN=y\nCONFIG_IRQ_MSI_IOMMU=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\nCONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_CONTEXT_TRACKING=y\nCONFIG_CONTEXT_TRACKING_IDLE=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\n# CONFIG_NO_HZ is not set\nCONFIG_HIGH_RES_TIMERS=y\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\nCONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\nCONFIG_BPF_JIT=y\n# CONFIG_BPF_JIT_ALWAYS_ON is not set\nCONFIG_BPF_JIT_DEFAULT_ON=y\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# end of BPF subsystem\n\nCONFIG_PREEMPT_BUILD=y\n# CONFIG_PREEMPT_NONE is not set\n# CONFIG_PREEMPT_VOLUNTARY is not set\nCONFIG_PREEMPT=y\nCONFIG_PREEMPT_COUNT=y\nCONFIG_PREEMPTION=y\n# CONFIG_PREEMPT_DYNAMIC is not set\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\nCONFIG_SCHED_THERMAL_PRESSURE=y\nCONFIG_BSD_PROCESS_ACCT=y\nCONFIG_BSD_PROCESS_ACCT_V3=y\nCONFIG_TASKSTATS=y\nCONFIG_TASK_DELAY_ACCT=y\nCONFIG_TASK_XACCT=y\nCONFIG_TASK_IO_ACCOUNTING=y\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\nCONFIG_PREEMPT_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_RCU=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\n# end of RCU Subsystem\n\nCONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=14\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# end of Scheduler features\n\nCONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y\nCONFIG_CC_HAS_INT128=y\nCONFIG_CC_IMPLICIT_FALLTHROUGH=\"-Wimplicit-fallthrough=5\"\nCONFIG_GCC11_NO_ARRAY_BOUNDS=y\nCONFIG_GCC12_NO_ARRAY_BOUNDS=y\nCONFIG_CC_NO_ARRAY_BOUNDS=y\nCONFIG_ARCH_SUPPORTS_INT128=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\n# CONFIG_CGROUP_FAVOR_DYNMODS is not set\nCONFIG_MEMCG=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_BLK_CGROUP=y\nCONFIG_CGROUP_WRITEBACK=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\nCONFIG_CGROUP_PIDS=y\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_CGROUP_PERF=y\nCONFIG_CGROUP_BPF=y\n# CONFIG_CGROUP_MISC is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_TIME_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_CHECKPOINT_RESTORE is not set\nCONFIG_SCHED_AUTOGROUP=y\n# CONFIG_SYSFS_DEPRECATED is not set\n# CONFIG_RELAY is not set\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"@INITRAMFS_SOURCE@\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\nCONFIG_RD_GZIP=y\n# CONFIG_RD_BZIP2 is not set\n# CONFIG_RD_LZMA is not set\n# CONFIG_RD_XZ is not set\n# CONFIG_RD_LZO is not set\n# CONFIG_RD_LZ4 is not set\nCONFIG_RD_ZSTD=y\nCONFIG_INITRAMFS_COMPRESSION_GZIP=y\n# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set\n# CONFIG_INITRAMFS_COMPRESSION_NONE is not set\n# CONFIG_BOOT_CONFIG is not set\nCONFIG_INITRAMFS_PRESERVE_MTIME=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\n# CONFIG_EXPERT is not set\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\nCONFIG_SYSFS_SYSCALL=y\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\nCONFIG_KALLSYMS_ALL=y\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_EMBEDDED is not set\nCONFIG_HAVE_PERF_EVENTS=y\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_SYSTEM_DATA_VERIFICATION=y\nCONFIG_PROFILING=y\n# end of General setup\n\nCONFIG_ARM64=y\nCONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_64BIT=y\nCONFIG_MMU=y\nCONFIG_ARM64_PAGE_SHIFT=12\nCONFIG_ARM64_CONT_PTE_SHIFT=4\nCONFIG_ARM64_CONT_PMD_SHIFT=4\nCONFIG_ARCH_MMAP_RND_BITS_MIN=18\nCONFIG_ARCH_MMAP_RND_BITS_MAX=33\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_GENERIC_BUG=y\nCONFIG_GENERIC_BUG_RELATIVE_POINTERS=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CSUM=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y\nCONFIG_SMP=y\nCONFIG_KERNEL_MODE_NEON=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_PGTABLE_LEVELS=4\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_ARCH_PROC_KCORE_TEXT=y\n\n#\n# Platform selection\n#\n# CONFIG_ARCH_ACTIONS is not set\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_APPLE is not set\n# CONFIG_ARCH_BCM is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_BITMAIN is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_SPARX5 is not set\n# CONFIG_ARCH_K3 is not set\n# CONFIG_ARCH_LG1K is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_KEEMBAY is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_MESON is not set\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_NXP is not set\n# CONFIG_ARCH_NPCM is not set\nCONFIG_ARCH_QCOM=y\n# CONFIG_ARCH_REALTEK is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_ROCKCHIP is not set\n# CONFIG_ARCH_SEATTLE is not set\n# CONFIG_ARCH_INTEL_SOCFPGA is not set\n# CONFIG_ARCH_SYNQUACER is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_SPRD is not set\n# CONFIG_ARCH_THUNDER is not set\n# CONFIG_ARCH_THUNDER2 is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_VISCONTI is not set\n# CONFIG_ARCH_XGENE is not set\n# CONFIG_ARCH_ZYNQMP is not set\n# end of Platform selection\n\n#\n# Kernel Features\n#\n\n#\n# ARM errata workarounds via the alternatives framework\n#\nCONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y\nCONFIG_ARM64_ERRATUM_826319=y\nCONFIG_ARM64_ERRATUM_827319=y\nCONFIG_ARM64_ERRATUM_824069=y\nCONFIG_ARM64_ERRATUM_819472=y\n# CONFIG_ARM64_ERRATUM_832075 is not set\n# CONFIG_ARM64_ERRATUM_1742098 is not set\nCONFIG_ARM64_ERRATUM_845719=y\nCONFIG_ARM64_ERRATUM_843419=y\nCONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y\n# CONFIG_ARM64_ERRATUM_1024718 is not set\n# CONFIG_ARM64_ERRATUM_1418040 is not set\n# CONFIG_ARM64_ERRATUM_1165522 is not set\n# CONFIG_ARM64_ERRATUM_1319367 is not set\n# CONFIG_ARM64_ERRATUM_1530923 is not set\n# CONFIG_ARM64_ERRATUM_2441007 is not set\n# CONFIG_ARM64_ERRATUM_1286807 is not set\n# CONFIG_ARM64_ERRATUM_1463225 is not set\n# CONFIG_ARM64_ERRATUM_1542419 is not set\n# CONFIG_ARM64_ERRATUM_1508412 is not set\n# CONFIG_ARM64_ERRATUM_2051678 is not set\n# CONFIG_ARM64_ERRATUM_2077057 is not set\n# CONFIG_ARM64_ERRATUM_2658417 is not set\n# CONFIG_ARM64_ERRATUM_2054223 is not set\n# CONFIG_ARM64_ERRATUM_2067961 is not set\n# CONFIG_ARM64_ERRATUM_2441009 is not set\n# CONFIG_CAVIUM_ERRATUM_22375 is not set\n# CONFIG_CAVIUM_ERRATUM_23154 is not set\n# CONFIG_CAVIUM_ERRATUM_27456 is not set\n# CONFIG_CAVIUM_ERRATUM_30115 is not set\n# CONFIG_CAVIUM_TX2_ERRATUM_219 is not set\n# CONFIG_FUJITSU_ERRATUM_010001 is not set\n# CONFIG_HISILICON_ERRATUM_161600802 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_1003 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_1009 is not set\n# CONFIG_QCOM_QDF2400_ERRATUM_0065 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_E1041 is not set\n# CONFIG_NVIDIA_CARMEL_CNP_ERRATUM is not set\n# CONFIG_SOCIONEXT_SYNQUACER_PREITS is not set\n# end of ARM errata workarounds via the alternatives framework\n\nCONFIG_ARM64_4K_PAGES=y\n# CONFIG_ARM64_16K_PAGES is not set\n# CONFIG_ARM64_64K_PAGES is not set\n# CONFIG_ARM64_VA_BITS_39 is not set\nCONFIG_ARM64_VA_BITS_48=y\nCONFIG_ARM64_VA_BITS=48\nCONFIG_ARM64_PA_BITS_48=y\nCONFIG_ARM64_PA_BITS=48\n# CONFIG_CPU_BIG_ENDIAN is not set\nCONFIG_CPU_LITTLE_ENDIAN=y\nCONFIG_SCHED_MC=y\n# CONFIG_SCHED_CLUSTER is not set\n# CONFIG_SCHED_SMT is not set\nCONFIG_NR_CPUS=4\nCONFIG_HOTPLUG_CPU=y\n# CONFIG_NUMA is not set\n# CONFIG_HZ_100 is not set\nCONFIG_HZ_250=y\n# CONFIG_HZ_300 is not set\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=250\nCONFIG_SCHED_HRTICK=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_CC_HAVE_SHADOW_CALL_STACK=y\nCONFIG_PARAVIRT=y\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\nCONFIG_KEXEC=y\n# CONFIG_KEXEC_FILE is not set\n# CONFIG_CRASH_DUMP is not set\nCONFIG_TRANS_TABLE=y\nCONFIG_XEN_DOM0=y\nCONFIG_XEN=y\nCONFIG_ARCH_FORCE_MAX_ORDER=11\nCONFIG_UNMAP_KERNEL_AT_EL0=y\nCONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y\nCONFIG_RODATA_FULL_DEFAULT_ENABLED=y\n# CONFIG_ARM64_SW_TTBR0_PAN is not set\nCONFIG_ARM64_TAGGED_ADDR_ABI=y\nCONFIG_COMPAT=y\nCONFIG_KUSER_HELPERS=y\n# CONFIG_COMPAT_ALIGNMENT_FIXUPS is not set\nCONFIG_ARMV8_DEPRECATED=y\nCONFIG_SWP_EMULATION=y\nCONFIG_CP15_BARRIER_EMULATION=y\nCONFIG_SETEND_EMULATION=y\n\n#\n# ARMv8.1 architectural features\n#\n# CONFIG_ARM64_HW_AFDBM is not set\n# CONFIG_ARM64_PAN is not set\nCONFIG_AS_HAS_LDAPR=y\nCONFIG_AS_HAS_LSE_ATOMICS=y\n# CONFIG_ARM64_USE_LSE_ATOMICS is not set\n# end of ARMv8.1 architectural features\n\n#\n# ARMv8.2 architectural features\n#\nCONFIG_AS_HAS_ARMV8_2=y\nCONFIG_AS_HAS_SHA3=y\n# CONFIG_ARM64_PMEM is not set\n# CONFIG_ARM64_RAS_EXTN is not set\n# CONFIG_ARM64_CNP is not set\n# end of ARMv8.2 architectural features\n\n#\n# ARMv8.3 architectural features\n#\n# CONFIG_ARM64_PTR_AUTH is not set\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET=y\nCONFIG_CC_HAS_SIGN_RETURN_ADDRESS=y\nCONFIG_AS_HAS_PAC=y\nCONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y\n# end of ARMv8.3 architectural features\n\n#\n# ARMv8.4 architectural features\n#\n# CONFIG_ARM64_AMU_EXTN is not set\nCONFIG_AS_HAS_ARMV8_4=y\n# CONFIG_ARM64_TLB_RANGE is not set\n# end of ARMv8.4 architectural features\n\n#\n# ARMv8.5 architectural features\n#\nCONFIG_AS_HAS_ARMV8_5=y\n# CONFIG_ARM64_BTI is not set\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI=y\n# CONFIG_ARM64_E0PD is not set\nCONFIG_ARM64_AS_HAS_MTE=y\n# end of ARMv8.5 architectural features\n\n#\n# ARMv8.7 architectural features\n#\n# end of ARMv8.7 architectural features\n\nCONFIG_ARM64_SVE=y\nCONFIG_ARM64_SME=y\nCONFIG_ARM64_MODULE_PLTS=y\n# CONFIG_ARM64_PSEUDO_NMI is not set\nCONFIG_RELOCATABLE=y\n# CONFIG_RANDOMIZE_BASE is not set\nCONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y\nCONFIG_STACKPROTECTOR_PER_TASK=y\nCONFIG_ARCH_NR_GPIO=0\n# end of Kernel Features\n\n#\n# Boot options\n#\n# CONFIG_ARM64_ACPI_PARKING_PROTOCOL is not set\nCONFIG_CMDLINE=\"\"\nCONFIG_EFI_STUB=y\nCONFIG_EFI=y\nCONFIG_DMI=y\n# end of Boot options\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_USERSPACE_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\nCONFIG_PM=y\n# CONFIG_PM_DEBUG is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\n# CONFIG_ENERGY_MODEL is not set\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\n# end of Power management options\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\n\n#\n# ARM CPU Idle Drivers\n#\n# CONFIG_ARM_PSCI_CPUIDLE is not set\n# end of ARM CPU Idle Drivers\n# end of CPU Idle\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\n# CONFIG_CPU_FREQ_STAT is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=y\nCONFIG_CPU_FREQ_GOV_USERSPACE=y\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\nCONFIG_CPU_FREQ_GOV_CONSERVATIVE=y\n# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\nCONFIG_CPUFREQ_DT_PLATDEV=y\n# CONFIG_ACPI_CPPC_CPUFREQ is not set\nCONFIG_ARM_SCPI_CPUFREQ=y\nCONFIG_ARM_QCOM_CPUFREQ_HW=y\n# end of CPU Frequency scaling\n# end of CPU Power Management\n\nCONFIG_ARCH_SUPPORTS_ACPI=y\nCONFIG_ACPI=y\nCONFIG_ACPI_GENERIC_GSI=y\nCONFIG_ACPI_CCA_REQUIRED=y\n# CONFIG_ACPI_DEBUGGER is not set\nCONFIG_ACPI_SPCR_TABLE=y\n# CONFIG_ACPI_EC_DEBUGFS is not set\nCONFIG_ACPI_AC=y\nCONFIG_ACPI_BATTERY=y\nCONFIG_ACPI_BUTTON=y\n# CONFIG_ACPI_VIDEO is not set\nCONFIG_ACPI_FAN=y\n# CONFIG_ACPI_TAD is not set\n# CONFIG_ACPI_DOCK is not set\nCONFIG_ACPI_PROCESSOR_IDLE=y\nCONFIG_ACPI_MCFG=y\nCONFIG_ACPI_PROCESSOR=y\nCONFIG_ACPI_HOTPLUG_CPU=y\nCONFIG_ACPI_THERMAL=y\nCONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y\nCONFIG_ACPI_TABLE_UPGRADE=y\n# CONFIG_ACPI_DEBUG is not set\n# CONFIG_ACPI_PCI_SLOT is not set\nCONFIG_ACPI_CONTAINER=y\n# CONFIG_ACPI_HED is not set\n# CONFIG_ACPI_CUSTOM_METHOD is not set\n# CONFIG_ACPI_BGRT is not set\nCONFIG_ACPI_REDUCED_HARDWARE_ONLY=y\nCONFIG_HAVE_ACPI_APEI=y\n# CONFIG_ACPI_APEI is not set\n# CONFIG_ACPI_CONFIGFS is not set\n# CONFIG_ACPI_PFRUT is not set\nCONFIG_ACPI_IORT=y\nCONFIG_ACPI_GTDT=y\nCONFIG_ACPI_PPTT=y\n# CONFIG_PMIC_OPREGION is not set\nCONFIG_ACPI_PRMT=y\nCONFIG_IRQ_BYPASS_MANAGER=y\nCONFIG_HAVE_KVM=y\nCONFIG_VIRTUALIZATION=y\n# CONFIG_KVM is not set\n\n#\n# General architecture-dependent options\n#\nCONFIG_CRASH_CORE=y\nCONFIG_KEXEC_CORE=y\n# CONFIG_KPROBES is not set\nCONFIG_JUMP_LABEL=y\n# CONFIG_STATIC_KEYS_SELFTEST is not set\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_HAVE_IOREMAP_PROT=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y\nCONFIG_HAVE_FUNCTION_ERROR_INJECTION=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_KEEPINITRD=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_ARCH_HAS_SET_DIRECT_MAP=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_WANTS_NO_INSTR=y\nCONFIG_HAVE_ASM_MODVERSIONS=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y\nCONFIG_MMU_GATHER_TABLE_FREE=y\nCONFIG_MMU_GATHER_RCU_TABLE_FREE=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_HAVE_ALIGNED_STRUCT_PAGE=y\nCONFIG_HAVE_CMPXCHG_LOCAL=y\nCONFIG_HAVE_CMPXCHG_DOUBLE=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_ARCH_STACKLEAK=y\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_ARCH_SUPPORTS_SHADOW_CALL_STACK=y\n# CONFIG_SHADOW_CALL_STACK is not set\nCONFIG_ARCH_SUPPORTS_LTO_CLANG=y\nCONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y\nCONFIG_LTO_NONE=y\nCONFIG_ARCH_SUPPORTS_CFI_CLANG=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOVE_PUD=y\nCONFIG_HAVE_MOVE_PMD=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_HAVE_ARCH_HUGE_VMAP=y\nCONFIG_HAVE_ARCH_HUGE_VMALLOC=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_ARCH_MMAP_RND_BITS=18\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=11\nCONFIG_PAGE_SIZE_LESS_THAN_64KB=y\nCONFIG_PAGE_SIZE_LESS_THAN_256KB=y\nCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y\nCONFIG_RANDOMIZE_KSTACK_OFFSET=y\n# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\nCONFIG_HAVE_ARCH_COMPILER_H=y\nCONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y\nCONFIG_ARCH_USE_MEMREMAP_PROT=y\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_HAS_RELR=y\nCONFIG_HAVE_PREEMPT_DYNAMIC=y\nCONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y\nCONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y\nCONFIG_ARCH_HAVE_TRACE_MMIO_ACCESS=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\nCONFIG_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/sbin/modprobe\"\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\n# CONFIG_BLOCK_LEGACY_AUTOLOAD is not set\nCONFIG_BLK_CGROUP_RWSTAT=y\nCONFIG_BLK_DEV_BSG_COMMON=y\nCONFIG_BLK_DEV_BSGLIB=y\nCONFIG_BLK_DEV_INTEGRITY=y\nCONFIG_BLK_DEV_INTEGRITY_T10=y\n# CONFIG_BLK_DEV_ZONED is not set\nCONFIG_BLK_DEV_THROTTLING=y\n# CONFIG_BLK_DEV_THROTTLING_LOW is not set\n# CONFIG_BLK_WBT is not set\n# CONFIG_BLK_CGROUP_IOLATENCY is not set\n# CONFIG_BLK_CGROUP_IOCOST is not set\n# CONFIG_BLK_CGROUP_IOPRIO is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\n# CONFIG_PARTITION_ADVANCED is not set\nCONFIG_MSDOS_PARTITION=y\nCONFIG_EFI_PARTITION=y\n# end of Partition Types\n\nCONFIG_BLOCK_COMPAT=y\nCONFIG_BLK_MQ_PCI=y\nCONFIG_BLK_MQ_VIRTIO=y\nCONFIG_BLK_PM=y\nCONFIG_BLOCK_HOLDER_DEPRECATED=y\nCONFIG_BLK_MQ_STACKING=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\n# CONFIG_IOSCHED_BFQ is not set\n# end of IO Schedulers\n\nCONFIG_ASN1=y\nCONFIG_UNINLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_USE_QUEUED_SPINLOCKS=y\nCONFIG_QUEUED_SPINLOCKS=y\nCONFIG_ARCH_USE_QUEUED_RWLOCKS=y\nCONFIG_QUEUED_RWLOCKS=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_ARCH_HAS_SYSCALL_WRAPPER=y\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_ARCH_BINFMT_ELF_STATE=y\nCONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y\nCONFIG_ARCH_HAVE_ELF_PROT=y\nCONFIG_ARCH_USE_GNU_PROPERTY=y\nCONFIG_ELFCORE=y\n# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set\nCONFIG_BINFMT_SCRIPT=y\nCONFIG_BINFMT_MISC=m\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\n# CONFIG_SWAP is not set\n\n#\n# SLAB allocator options\n#\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# end of SLAB allocator options\n\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\n# CONFIG_COMPAT_BRK is not set\nCONFIG_SPARSEMEM=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_FAST_GUP=y\nCONFIG_ARCH_KEEP_MEMBLOCK=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y\n# CONFIG_MEMORY_HOTPLUG is not set\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y\nCONFIG_MEMORY_BALLOON=y\nCONFIG_BALLOON_COMPACTION=y\nCONFIG_COMPACTION=y\nCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1\nCONFIG_PAGE_REPORTING=y\nCONFIG_MIGRATION=y\nCONFIG_ARCH_ENABLE_THP_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\nCONFIG_PHYS_ADDR_T_64BIT=y\nCONFIG_MMU_NOTIFIER=y\nCONFIG_KSM=y\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y\n# CONFIG_MEMORY_FAILURE is not set\nCONFIG_ARCH_WANTS_THP_SWAP=y\nCONFIG_TRANSPARENT_HUGEPAGE=y\nCONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y\n# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set\n# CONFIG_READ_ONLY_THP_FOR_FS is not set\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\n# CONFIG_CMA_DEBUGFS is not set\n# CONFIG_CMA_SYSFS is not set\nCONFIG_CMA_AREAS=7\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CACHE_LINE_SIZE=y\nCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y\nCONFIG_ARCH_HAS_PTE_DEVMAP=y\nCONFIG_ZONE_DMA=y\nCONFIG_ZONE_DMA32=y\nCONFIG_VM_EVENT_COUNTERS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\nCONFIG_ARCH_HAS_PTE_SPECIAL=y\nCONFIG_SECRETMEM=y\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_USERFAULTFD is not set\n# CONFIG_LRU_GEN is not set\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\nCONFIG_NET_INGRESS=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_INTERFACE is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_XFRM_ESP=y\n# CONFIG_NET_KEY is not set\n# CONFIG_XDP_SOCKETS is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=y\nCONFIG_IP_MROUTE_COMMON=y\n# CONFIG_IP_MROUTE is not set\nCONFIG_SYN_COOKIES=y\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=y\n# CONFIG_INET_ESP_OFFLOAD is not set\n# CONFIG_INET_ESPINTCP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=y\nCONFIG_INET_DIAG=y\nCONFIG_INET_TCP_DIAG=y\n# CONFIG_INET_UDP_DIAG is not set\n# CONFIG_INET_RAW_DIAG is not set\n# CONFIG_INET_DIAG_DESTROY is not set\n# CONFIG_TCP_CONG_ADVANCED is not set\nCONFIG_TCP_CONG_CUBIC=y\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\nCONFIG_IPV6_ROUTER_PREF=y\nCONFIG_IPV6_ROUTE_INFO=y\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\nCONFIG_IPV6_MIP6=m\nCONFIG_IPV6_ILA=m\nCONFIG_INET6_TUNNEL=m\nCONFIG_IPV6_VTI=m\nCONFIG_IPV6_SIT=y\nCONFIG_IPV6_SIT_6RD=y\nCONFIG_IPV6_NDISC_NODETYPE=y\nCONFIG_IPV6_TUNNEL=m\nCONFIG_IPV6_FOU=m\nCONFIG_IPV6_MULTIPLE_TABLES=y\nCONFIG_IPV6_SUBTREES=y\nCONFIG_IPV6_MROUTE=y\nCONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y\nCONFIG_IPV6_PIMSM_V2=y\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_NETLABEL is not set\n# CONFIG_MPTCP is not set\n# CONFIG_NETWORK_SECMARK is not set\nCONFIG_NET_PTP_CLASSIFY=y\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\nCONFIG_NETFILTER_EGRESS=y\nCONFIG_NETFILTER_NETLINK=m\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\n# CONFIG_NETFILTER_NETLINK_HOOK is not set\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\n# CONFIG_NETFILTER_NETLINK_LOG is not set\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\nCONFIG_NF_LOG_SYSLOG=m\nCONFIG_NF_CONNTRACK_MARK=y\n# CONFIG_NF_CONNTRACK_ZONES is not set\nCONFIG_NF_CONNTRACK_PROCFS=y\nCONFIG_NF_CONNTRACK_EVENTS=y\nCONFIG_NF_CONNTRACK_TIMEOUT=y\nCONFIG_NF_CONNTRACK_TIMESTAMP=y\n# CONFIG_NF_CONNTRACK_LABELS is not set\n# CONFIG_NF_CT_PROTO_DCCP is not set\nCONFIG_NF_CT_PROTO_GRE=y\n# CONFIG_NF_CT_PROTO_SCTP is not set\n# CONFIG_NF_CT_PROTO_UDPLITE is not set\nCONFIG_NF_CONNTRACK_AMANDA=m\nCONFIG_NF_CONNTRACK_FTP=m\nCONFIG_NF_CONNTRACK_H323=m\nCONFIG_NF_CONNTRACK_IRC=m\nCONFIG_NF_CONNTRACK_BROADCAST=m\nCONFIG_NF_CONNTRACK_NETBIOS_NS=m\nCONFIG_NF_CONNTRACK_SNMP=m\nCONFIG_NF_CONNTRACK_PPTP=m\nCONFIG_NF_CONNTRACK_SANE=m\nCONFIG_NF_CONNTRACK_SIP=m\nCONFIG_NF_CONNTRACK_TFTP=m\n# CONFIG_NF_CT_NETLINK is not set\n# CONFIG_NF_CT_NETLINK_TIMEOUT is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_AMANDA=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_IRC=m\nCONFIG_NF_NAT_SIP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=y\nCONFIG_NF_NAT_MASQUERADE=y\nCONFIG_NETFILTER_SYNPROXY=m\nCONFIG_NF_TABLES=m\n# CONFIG_NF_TABLES_INET is not set\n# CONFIG_NF_TABLES_NETDEV is not set\n# CONFIG_NFT_NUMGEN is not set\n# CONFIG_NFT_CT is not set\n# CONFIG_NFT_CONNLIMIT is not set\n# CONFIG_NFT_LOG is not set\n# CONFIG_NFT_LIMIT is not set\n# CONFIG_NFT_MASQ is not set\n# CONFIG_NFT_REDIR is not set\n# CONFIG_NFT_TUNNEL is not set\n# CONFIG_NFT_OBJREF is not set\n# CONFIG_NFT_QUOTA is not set\n# CONFIG_NFT_REJECT is not set\n# CONFIG_NFT_COMPAT is not set\n# CONFIG_NFT_HASH is not set\n# CONFIG_NFT_XFRM is not set\n# CONFIG_NFT_SOCKET is not set\n# CONFIG_NFT_OSF is not set\n# CONFIG_NFT_TPROXY is not set\n# CONFIG_NFT_SYNPROXY is not set\n# CONFIG_NF_FLOW_TABLE is not set\nCONFIG_NETFILTER_XTABLES=m\nCONFIG_NETFILTER_XTABLES_COMPAT=y\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set\nCONFIG_NETFILTER_XT_TARGET_CHECKSUM=m\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_CT is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\nCONFIG_NETFILTER_XT_TARGET_HL=m\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\nCONFIG_NETFILTER_XT_TARGET_LOG=m\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TRACE is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\nCONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\nCONFIG_NETFILTER_XT_MATCH_HL=m\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\n# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\n# CONFIG_NETFILTER_XT_MATCH_OWNER is not set\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\n# CONFIG_NETFILTER_XT_MATCH_STATE is not set\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\nCONFIG_IP_VS=m\n# CONFIG_IP_VS_IPV6 is not set\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_MH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n# CONFIG_IP_VS_TWOS is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS MH scheduler\n#\nCONFIG_IP_VS_MH_TAB_INDEX=12\n\n#\n# IPVS application helper\n#\n# CONFIG_IP_VS_FTP is not set\nCONFIG_IP_VS_NFCT=y\n# CONFIG_IP_VS_PE_SIP is not set\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_TABLES_IPV4 is not set\n# CONFIG_NF_TABLES_ARP is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\nCONFIG_NF_LOG_IPV4=m\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_NF_NAT_SNMP_BASIC=m\nCONFIG_NF_NAT_PPTP=m\nCONFIG_NF_NAT_H323=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\nCONFIG_IP_NF_RAW=m\nCONFIG_IP_NF_SECURITY=m\n# CONFIG_IP_NF_ARPTABLES is not set\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_TABLES_IPV6 is not set\nCONFIG_NF_DUP_IPV6=m\nCONFIG_NF_REJECT_IPV6=m\nCONFIG_NF_LOG_IPV6=m\nCONFIG_IP6_NF_IPTABLES=m\nCONFIG_IP6_NF_MATCH_AH=m\nCONFIG_IP6_NF_MATCH_EUI64=m\nCONFIG_IP6_NF_MATCH_FRAG=m\nCONFIG_IP6_NF_MATCH_OPTS=m\nCONFIG_IP6_NF_MATCH_HL=m\nCONFIG_IP6_NF_MATCH_IPV6HEADER=m\nCONFIG_IP6_NF_MATCH_MH=m\nCONFIG_IP6_NF_MATCH_RPFILTER=m\nCONFIG_IP6_NF_MATCH_RT=m\n# CONFIG_IP6_NF_MATCH_SRH is not set\nCONFIG_IP6_NF_TARGET_HL=m\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\nCONFIG_IP6_NF_TARGET_SYNPROXY=m\nCONFIG_IP6_NF_MANGLE=m\nCONFIG_IP6_NF_RAW=m\nCONFIG_IP6_NF_SECURITY=m\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\nCONFIG_IP6_NF_TARGET_NPT=m\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_TABLES_BRIDGE is not set\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\nCONFIG_6LOWPAN=y\n# CONFIG_6LOWPAN_DEBUGFS is not set\nCONFIG_6LOWPAN_NHC=m\nCONFIG_6LOWPAN_NHC_DEST=m\nCONFIG_6LOWPAN_NHC_FRAGMENT=m\nCONFIG_6LOWPAN_NHC_HOP=m\nCONFIG_6LOWPAN_NHC_IPV6=m\nCONFIG_6LOWPAN_NHC_MOBILITY=m\nCONFIG_6LOWPAN_NHC_ROUTING=m\nCONFIG_6LOWPAN_NHC_UDP=m\n# CONFIG_6LOWPAN_GHC_EXT_HDR_HOP is not set\n# CONFIG_6LOWPAN_GHC_UDP is not set\n# CONFIG_6LOWPAN_GHC_ICMPV6 is not set\n# CONFIG_6LOWPAN_GHC_EXT_HDR_DEST is not set\n# CONFIG_6LOWPAN_GHC_EXT_HDR_FRAG is not set\n# CONFIG_6LOWPAN_GHC_EXT_HDR_ROUTE is not set\nCONFIG_IEEE802154=y\nCONFIG_IEEE802154_NL802154_EXPERIMENTAL=y\nCONFIG_IEEE802154_SOCKET=m\nCONFIG_IEEE802154_6LOWPAN=m\nCONFIG_MAC802154=m\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\n# CONFIG_NET_SCH_FQ_CODEL is not set\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_TCINDEX is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_RSVP is not set\n# CONFIG_NET_CLS_RSVP6 is not set\n# CONFIG_NET_CLS_FLOW is not set\nCONFIG_NET_CLS_CGROUP=m\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\nCONFIG_NET_L3_MASTER_DEV=y\nCONFIG_QRTR=y\nCONFIG_QRTR_SMD=y\n# CONFIG_QRTR_TUN is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_PCPU_DEV_REFCNT=y\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_SOCK_RX_QUEUE_MAPPING=y\nCONFIG_XPS=y\nCONFIG_CGROUP_NET_PRIO=y\nCONFIG_CGROUP_NET_CLASSID=y\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=y\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=y\nCONFIG_BT_RFCOMM_TTY=y\nCONFIG_BT_BNEP=y\nCONFIG_BT_BNEP_MC_FILTER=y\nCONFIG_BT_BNEP_PROTO_FILTER=y\nCONFIG_BT_HIDP=y\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_6LOWPAN is not set\nCONFIG_BT_LEDS=y\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\nCONFIG_BT_DEBUGFS=y\n# CONFIG_BT_SELFTEST is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=y\nCONFIG_BT_BCM=y\nCONFIG_BT_RTL=y\nCONFIG_BT_QCA=y\nCONFIG_BT_HCIBTUSB=y\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\n# CONFIG_BT_HCIBTUSB_MTK is not set\nCONFIG_BT_HCIBTUSB_RTL=y\nCONFIG_BT_HCIBTSDIO=y\nCONFIG_BT_HCIUART=y\nCONFIG_BT_HCIUART_H4=y\nCONFIG_BT_HCIUART_BCSP=y\n# CONFIG_BT_HCIUART_ATH3K is not set\n# CONFIG_BT_HCIUART_INTEL is not set\n# CONFIG_BT_HCIUART_AG6XX is not set\n# CONFIG_BT_HCIBCM203X is not set\n# CONFIG_BT_HCIBPA10X is not set\n# CONFIG_BT_HCIBFUSB is not set\n# CONFIG_BT_HCIVHCI is not set\n# CONFIG_BT_MRVL is not set\n# CONFIG_BT_ATH3K is not set\n# CONFIG_BT_MTKSDIO is not set\nCONFIG_BT_QCOMSMD=y\n# CONFIG_BT_VIRTIO is not set\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=y\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\n# CONFIG_CFG80211_DEFAULT_PS is not set\n# CONFIG_CFG80211_DEBUGFS is not set\nCONFIG_CFG80211_CRDA_SUPPORT=y\nCONFIG_CFG80211_WEXT=y\nCONFIG_MAC80211=y\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=m\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\nCONFIG_LWTUNNEL=y\nCONFIG_LWTUNNEL_BPF=y\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_PAGE_POOL=y\n# CONFIG_PAGE_POOL_STATS is not set\nCONFIG_FAILOVER=y\nCONFIG_ETHTOOL_NETLINK=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\nCONFIG_HAVE_PCI=y\nCONFIG_PCI=y\nCONFIG_PCI_DOMAINS=y\nCONFIG_PCI_DOMAINS_GENERIC=y\nCONFIG_PCI_SYSCALL=y\nCONFIG_PCIEPORTBUS=y\nCONFIG_PCIEAER=y\n# CONFIG_PCIEAER_INJECT is not set\n# CONFIG_PCIE_ECRC is not set\nCONFIG_PCIEASPM=y\nCONFIG_PCIEASPM_DEFAULT=y\n# CONFIG_PCIEASPM_POWERSAVE is not set\n# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set\n# CONFIG_PCIEASPM_PERFORMANCE is not set\nCONFIG_PCIE_PME=y\n# CONFIG_PCIE_DPC is not set\n# CONFIG_PCIE_PTM is not set\nCONFIG_PCI_MSI=y\nCONFIG_PCI_MSI_IRQ_DOMAIN=y\nCONFIG_PCI_QUIRKS=y\n# CONFIG_PCI_DEBUG is not set\n# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set\n# CONFIG_PCI_STUB is not set\n# CONFIG_PCI_PF_STUB is not set\nCONFIG_PCI_ATS=y\nCONFIG_PCI_ECAM=y\nCONFIG_PCI_IOV=y\n# CONFIG_PCI_PRI is not set\n# CONFIG_PCI_PASID is not set\nCONFIG_PCI_LABEL=y\nCONFIG_VGA_ARB=y\nCONFIG_VGA_ARB_MAX_GPUS=16\n# CONFIG_HOTPLUG_PCI is not set\n\n#\n# PCI controller drivers\n#\n# CONFIG_PCI_FTPCI100 is not set\nCONFIG_PCI_HOST_COMMON=y\nCONFIG_PCI_HOST_GENERIC=y\n# CONFIG_PCIE_XILINX is not set\nCONFIG_PCI_XGENE=y\nCONFIG_PCI_XGENE_MSI=y\n# CONFIG_PCIE_ALTERA is not set\n# CONFIG_PCI_HOST_THUNDER_PEM is not set\n# CONFIG_PCI_HOST_THUNDER_ECAM is not set\n# CONFIG_PCIE_MICROCHIP_HOST is not set\n\n#\n# DesignWare PCI Core Support\n#\nCONFIG_PCIE_DW=y\nCONFIG_PCIE_DW_HOST=y\n# CONFIG_PCIE_DW_PLAT_HOST is not set\nCONFIG_PCI_HISI=y\nCONFIG_PCIE_QCOM=y\n# CONFIG_PCIE_KIRIN is not set\n# CONFIG_PCI_MESON is not set\n# CONFIG_PCIE_AL is not set\n# end of DesignWare PCI Core Support\n\n#\n# Mobiveil PCIe Core Support\n#\n# end of Mobiveil PCIe Core Support\n\n#\n# Cadence PCIe controllers support\n#\n# CONFIG_PCIE_CADENCE_PLAT_HOST is not set\n# CONFIG_PCI_J721E_HOST is not set\n# end of Cadence PCIe controllers support\n# end of PCI controller drivers\n\n#\n# PCI Endpoint\n#\n# CONFIG_PCI_ENDPOINT is not set\n# end of PCI Endpoint\n\n#\n# PCI switch controller drivers\n#\n# CONFIG_PCI_SW_SWITCHTEC is not set\n# end of PCI switch controller drivers\n\n# CONFIG_CXL_BUS is not set\n# CONFIG_PCCARD is not set\n# CONFIG_RAPIDIO is not set\n\n#\n# Generic Driver Options\n#\n# CONFIG_UEVENT_HELPER is not set\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\n# CONFIG_DEVTMPFS_SAFE is not set\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\nCONFIG_FW_CACHE=y\n# CONFIG_FW_UPLOAD is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\nCONFIG_ALLOW_DEV_COREDUMP=y\nCONFIG_DEV_COREDUMP=y\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_SYS_HYPERVISOR=y\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_SOC_BUS=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_SPMI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_MOXTET is not set\n# CONFIG_QCOM_EBI2 is not set\n# CONFIG_QCOM_SSC_BLOCK_BUS is not set\nCONFIG_VEXPRESS_CONFIG=y\n# CONFIG_MHI_BUS is not set\n# CONFIG_MHI_BUS_EP is not set\n# end of Bus devices\n\n# CONFIG_CONNECTOR is not set\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\n# CONFIG_ARM_SCMI_PROTOCOL is not set\n# end of ARM System Control and Management Interface Protocol\n\nCONFIG_ARM_SCPI_PROTOCOL=y\nCONFIG_ARM_SCPI_POWER_DOMAIN=y\nCONFIG_DMIID=y\n# CONFIG_DMI_SYSFS is not set\n# CONFIG_ISCSI_IBFT is not set\n# CONFIG_FW_CFG_SYSFS is not set\nCONFIG_QCOM_SCM=y\n# CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is not set\n# CONFIG_SYSFB_SIMPLEFB is not set\n# CONFIG_ARM_FFA_TRANSPORT is not set\n# CONFIG_GOOGLE_FIRMWARE is not set\n\n#\n# EFI (Extensible Firmware Interface) Support\n#\nCONFIG_EFI_ESRT=y\nCONFIG_EFI_PARAMS_FROM_FDT=y\nCONFIG_EFI_RUNTIME_WRAPPERS=y\nCONFIG_EFI_GENERIC_STUB=y\n# CONFIG_EFI_ZBOOT is not set\nCONFIG_EFI_ARMSTUB_DTB_LOADER=y\nCONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y\n# CONFIG_EFI_BOOTLOADER_CONTROL is not set\n# CONFIG_EFI_CAPSULE_LOADER is not set\n# CONFIG_EFI_TEST is not set\n# CONFIG_RESET_ATTACK_MITIGATION is not set\n# CONFIG_EFI_DISABLE_PCI_DMA is not set\nCONFIG_EFI_EARLYCON=y\nCONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y\n# CONFIG_EFI_DISABLE_RUNTIME is not set\n# CONFIG_EFI_COCO_SECRET is not set\n# end of EFI (Extensible Firmware Interface) Support\n\nCONFIG_ARM_PSCI_FW=y\n# CONFIG_ARM_PSCI_CHECKER is not set\nCONFIG_HAVE_ARM_SMCCC=y\nCONFIG_HAVE_ARM_SMCCC_DISCOVERY=y\nCONFIG_ARM_SMCCC_SOC_ID=y\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n\n#\n# Partition parsers\n#\n# CONFIG_MTD_AR7_PARTS is not set\n# CONFIG_MTD_CMDLINE_PARTS is not set\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AFS_PARTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\n# CONFIG_MTD_QCOMSMEM_PARTS is not set\n# end of Partition parsers\n\n#\n# User Modules And Translation Layers\n#\n# CONFIG_MTD_BLOCK is not set\n# CONFIG_MTD_BLOCK_RO is not set\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\n# CONFIG_MTD_OOPS is not set\n# CONFIG_MTD_PARTITIONED_MASTER is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\n# CONFIG_MTD_CFI is not set\n# CONFIG_MTD_JEDECPROBE is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n# end of RAM/ROM/Flash chip drivers\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_INTEL_VR_NOR is not set\n# CONFIG_MTD_PLATRAM is not set\n# end of Mapping drivers for chip access\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_PMC551 is not set\n# CONFIG_MTD_DATAFLASH is not set\n# CONFIG_MTD_MCHP23K256 is not set\n# CONFIG_MTD_MCHP48L640 is not set\n# CONFIG_MTD_SST25L is not set\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\n# end of Self-contained MTD device drivers\n\n#\n# NAND\n#\n# CONFIG_MTD_ONENAND is not set\n# CONFIG_MTD_RAW_NAND is not set\n# CONFIG_MTD_SPI_NAND is not set\n\n#\n# ECC engine support\n#\n# CONFIG_MTD_NAND_ECC_SW_HAMMING is not set\n# CONFIG_MTD_NAND_ECC_SW_BCH is not set\n# CONFIG_MTD_NAND_ECC_MXIC is not set\n# end of ECC engine support\n# end of NAND\n\n#\n# LPDDR & LPDDR2 PCM memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\n# end of LPDDR & LPDDR2 PCM memory drivers\n\nCONFIG_MTD_SPI_NOR=y\nCONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y\n# CONFIG_MTD_SPI_NOR_SWP_DISABLE is not set\nCONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y\n# CONFIG_MTD_SPI_NOR_SWP_KEEP is not set\n# CONFIG_MTD_UBI is not set\n# CONFIG_MTD_HYPERBUS is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\n# CONFIG_OF_OVERLAY is not set\n# CONFIG_PARPORT is not set\nCONFIG_PNP=y\nCONFIG_PNP_DEBUG_MESSAGES=y\n\n#\n# Protocols\n#\nCONFIG_PNPACPI=y\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\n# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=8\n# CONFIG_BLK_DEV_DRBD is not set\nCONFIG_BLK_DEV_NBD=m\n# CONFIG_BLK_DEV_RAM is not set\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\nCONFIG_XEN_BLKDEV_FRONTEND=y\n# CONFIG_XEN_BLKDEV_BACKEND is not set\nCONFIG_VIRTIO_BLK=y\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_UBLK is not set\n\n#\n# NVME Support\n#\n# CONFIG_BLK_DEV_NVME is not set\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TCP is not set\n# CONFIG_NVME_TARGET is not set\n# end of NVME Support\n\n#\n# Misc devices\n#\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_PHANTOM is not set\n# CONFIG_TIFM_CORE is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_HI6421V600_IRQ is not set\n# CONFIG_HP_ILO is not set\n# CONFIG_QCOM_COINCELL is not set\n# CONFIG_QCOM_FASTRPC is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\nCONFIG_SRAM=y\n# CONFIG_DW_XDATA_PCIE is not set\n# CONFIG_PCI_ENDPOINT_TEST is not set\n# CONFIG_XILINX_SDFEC is not set\n# CONFIG_HISI_HIKEY_USB is not set\n# CONFIG_OPEN_DICE is not set\n# CONFIG_VCPU_STALL_DETECTOR is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\n# CONFIG_EEPROM_AT25 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\n# CONFIG_EEPROM_93CX6 is not set\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_EEPROM_EE1004 is not set\n# end of EEPROM support\n\n# CONFIG_CB710_CORE is not set\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n# CONFIG_VMWARE_VMCI is not set\n# CONFIG_GENWQE is not set\n# CONFIG_ECHO is not set\n# CONFIG_BCM_VK is not set\n# CONFIG_MISC_ALCOR_PCI is not set\n# CONFIG_MISC_RTSX_PCI is not set\n# CONFIG_MISC_RTSX_USB is not set\n# CONFIG_HABANA_AI is not set\n# CONFIG_UACCE is not set\n# CONFIG_PVPANIC is not set\n# CONFIG_GP_PCI1XXXX is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_PROC_FS is not set\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\n# CONFIG_BLK_DEV_SR is not set\nCONFIG_CHR_DEV_SG=m\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\n# CONFIG_SCSI_SCAN_ASYNC is not set\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\nCONFIG_SCSI_SAS_ATTRS=y\nCONFIG_SCSI_SAS_LIBSAS=y\nCONFIG_SCSI_SAS_ATA=y\nCONFIG_SCSI_SAS_HOST_SMP=y\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_CXGB3_ISCSI is not set\n# CONFIG_SCSI_CXGB4_ISCSI is not set\n# CONFIG_SCSI_BNX2_ISCSI is not set\n# CONFIG_BE2ISCSI is not set\n# CONFIG_BLK_DEV_3W_XXXX_RAID is not set\n# CONFIG_SCSI_HPSA is not set\n# CONFIG_SCSI_3W_9XXX is not set\n# CONFIG_SCSI_3W_SAS is not set\n# CONFIG_SCSI_ACARD is not set\n# CONFIG_SCSI_AACRAID is not set\n# CONFIG_SCSI_AIC7XXX is not set\n# CONFIG_SCSI_AIC79XX is not set\n# CONFIG_SCSI_AIC94XX is not set\nCONFIG_SCSI_HISI_SAS=y\n# CONFIG_SCSI_HISI_SAS_PCI is not set\n# CONFIG_SCSI_HISI_SAS_DEBUGFS_DEFAULT_ENABLE is not set\n# CONFIG_SCSI_MVSAS is not set\n# CONFIG_SCSI_MVUMI is not set\n# CONFIG_SCSI_ADVANSYS is not set\n# CONFIG_SCSI_ARCMSR is not set\n# CONFIG_SCSI_ESAS2R is not set\n# CONFIG_MEGARAID_NEWGEN is not set\n# CONFIG_MEGARAID_LEGACY is not set\n# CONFIG_MEGARAID_SAS is not set\n# CONFIG_SCSI_MPT3SAS is not set\n# CONFIG_SCSI_MPT2SAS is not set\n# CONFIG_SCSI_MPI3MR is not set\n# CONFIG_SCSI_SMARTPQI is not set\n# CONFIG_SCSI_HPTIOP is not set\n# CONFIG_SCSI_BUSLOGIC is not set\n# CONFIG_SCSI_MYRB is not set\n# CONFIG_SCSI_MYRS is not set\n# CONFIG_XEN_SCSI_FRONTEND is not set\n# CONFIG_SCSI_SNIC is not set\n# CONFIG_SCSI_DMX3191D is not set\n# CONFIG_SCSI_FDOMAIN_PCI is not set\n# CONFIG_SCSI_IPS is not set\n# CONFIG_SCSI_INITIO is not set\n# CONFIG_SCSI_INIA100 is not set\n# CONFIG_SCSI_STEX is not set\n# CONFIG_SCSI_SYM53C8XX_2 is not set\n# CONFIG_SCSI_IPR is not set\n# CONFIG_SCSI_QLOGIC_1280 is not set\n# CONFIG_SCSI_QLA_ISCSI is not set\n# CONFIG_SCSI_DC395x is not set\n# CONFIG_SCSI_AM53C974 is not set\n# CONFIG_SCSI_WD719X is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_PMCRAID is not set\n# CONFIG_SCSI_PM8001 is not set\n# CONFIG_SCSI_VIRTIO is not set\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\nCONFIG_ATA=y\nCONFIG_SATA_HOST=y\nCONFIG_PATA_TIMINGS=y\nCONFIG_ATA_VERBOSE_ERROR=y\nCONFIG_ATA_FORCE=y\nCONFIG_ATA_ACPI=y\n# CONFIG_SATA_ZPODD is not set\nCONFIG_SATA_PMP=y\n\n#\n# Controllers with non-SFF native interface\n#\nCONFIG_SATA_AHCI=y\nCONFIG_SATA_MOBILE_LPM_POLICY=0\nCONFIG_SATA_AHCI_PLATFORM=y\n# CONFIG_AHCI_DWC is not set\nCONFIG_AHCI_CEVA=y\nCONFIG_AHCI_XGENE=y\nCONFIG_AHCI_QORIQ=y\n# CONFIG_SATA_INIC162X is not set\n# CONFIG_SATA_ACARD_AHCI is not set\nCONFIG_SATA_SIL24=y\nCONFIG_ATA_SFF=y\n\n#\n# SFF controllers with custom DMA interface\n#\n# CONFIG_PDC_ADMA is not set\n# CONFIG_SATA_QSTOR is not set\n# CONFIG_SATA_SX4 is not set\nCONFIG_ATA_BMDMA=y\n\n#\n# SATA SFF controllers with BMDMA\n#\n# CONFIG_ATA_PIIX is not set\n# CONFIG_SATA_DWC is not set\n# CONFIG_SATA_MV is not set\n# CONFIG_SATA_NV is not set\n# CONFIG_SATA_PROMISE is not set\n# CONFIG_SATA_SIL is not set\n# CONFIG_SATA_SIS is not set\n# CONFIG_SATA_SVW is not set\n# CONFIG_SATA_ULI is not set\n# CONFIG_SATA_VIA is not set\n# CONFIG_SATA_VITESSE is not set\n\n#\n# PATA SFF controllers with BMDMA\n#\n# CONFIG_PATA_ALI is not set\n# CONFIG_PATA_AMD is not set\n# CONFIG_PATA_ARTOP is not set\n# CONFIG_PATA_ATIIXP is not set\n# CONFIG_PATA_ATP867X is not set\n# CONFIG_PATA_CMD64X is not set\n# CONFIG_PATA_CYPRESS is not set\n# CONFIG_PATA_EFAR is not set\n# CONFIG_PATA_HPT366 is not set\n# CONFIG_PATA_HPT37X is not set\n# CONFIG_PATA_HPT3X2N is not set\n# CONFIG_PATA_HPT3X3 is not set\n# CONFIG_PATA_IT8213 is not set\n# CONFIG_PATA_IT821X is not set\n# CONFIG_PATA_JMICRON is not set\n# CONFIG_PATA_MARVELL is not set\n# CONFIG_PATA_NETCELL is not set\n# CONFIG_PATA_NINJA32 is not set\n# CONFIG_PATA_NS87415 is not set\n# CONFIG_PATA_OLDPIIX is not set\n# CONFIG_PATA_OPTIDMA is not set\n# CONFIG_PATA_PDC2027X is not set\n# CONFIG_PATA_PDC_OLD is not set\n# CONFIG_PATA_RADISYS is not set\n# CONFIG_PATA_RDC is not set\n# CONFIG_PATA_SCH is not set\n# CONFIG_PATA_SERVERWORKS is not set\n# CONFIG_PATA_SIL680 is not set\n# CONFIG_PATA_SIS is not set\n# CONFIG_PATA_TOSHIBA is not set\n# CONFIG_PATA_TRIFLEX is not set\n# CONFIG_PATA_VIA is not set\n# CONFIG_PATA_WINBOND is not set\n\n#\n# PIO-only SFF controllers\n#\n# CONFIG_PATA_CMD640_PCI is not set\n# CONFIG_PATA_MPIIX is not set\n# CONFIG_PATA_NS87410 is not set\n# CONFIG_PATA_OPTI is not set\nCONFIG_PATA_PLATFORM=y\nCONFIG_PATA_OF_PLATFORM=y\n# CONFIG_PATA_RZ1000 is not set\n\n#\n# Generic fallback / legacy drivers\n#\n# CONFIG_PATA_ACPI is not set\n# CONFIG_ATA_GENERIC is not set\n# CONFIG_PATA_LEGACY is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\n# CONFIG_DM_DEBUG is not set\nCONFIG_DM_BUFIO=m\n# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\n# CONFIG_DM_UNSTRIPED is not set\n# CONFIG_DM_CRYPT is not set\n# CONFIG_DM_SNAPSHOT is not set\nCONFIG_DM_THIN_PROVISIONING=m\n# CONFIG_DM_CACHE is not set\n# CONFIG_DM_WRITECACHE is not set\n# CONFIG_DM_EBS is not set\n# CONFIG_DM_ERA is not set\n# CONFIG_DM_CLONE is not set\n# CONFIG_DM_MIRROR is not set\n# CONFIG_DM_RAID is not set\n# CONFIG_DM_ZERO is not set\n# CONFIG_DM_MULTIPATH is not set\n# CONFIG_DM_DELAY is not set\n# CONFIG_DM_DUST is not set\n# CONFIG_DM_UEVENT is not set\n# CONFIG_DM_FLAKEY is not set\n# CONFIG_DM_VERITY is not set\n# CONFIG_DM_SWITCH is not set\n# CONFIG_DM_LOG_WRITES is not set\n# CONFIG_DM_INTEGRITY is not set\n# CONFIG_DM_AUDIT is not set\n# CONFIG_TARGET_CORE is not set\n# CONFIG_FUSION is not set\n\n#\n# IEEE 1394 (FireWire) support\n#\n# CONFIG_FIREWIRE is not set\n# CONFIG_FIREWIRE_NOSY is not set\n# end of IEEE 1394 (FireWire) support\n\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\nCONFIG_DUMMY=m\nCONFIG_WIREGUARD=m\n# CONFIG_WIREGUARD_DEBUG is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_FC is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\n# CONFIG_MACVTAP is not set\nCONFIG_IPVLAN_L3S=y\nCONFIG_IPVLAN=m\n# CONFIG_IPVTAP is not set\nCONFIG_VXLAN=m\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_AMT is not set\n# CONFIG_MACSEC is not set\n# CONFIG_NETCONSOLE is not set\nCONFIG_TUN=y\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\n# CONFIG_VIRTIO_NET is not set\nCONFIG_NLMON=m\n# CONFIG_NET_VRF is not set\n# CONFIG_ARCNET is not set\nCONFIG_ETHERNET=y\nCONFIG_NET_VENDOR_3COM=y\n# CONFIG_VORTEX is not set\n# CONFIG_TYPHOON is not set\nCONFIG_NET_VENDOR_ADAPTEC=y\n# CONFIG_ADAPTEC_STARFIRE is not set\nCONFIG_NET_VENDOR_AGERE=y\n# CONFIG_ET131X is not set\nCONFIG_NET_VENDOR_ALACRITECH=y\n# CONFIG_SLICOSS is not set\nCONFIG_NET_VENDOR_ALTEON=y\n# CONFIG_ACENIC is not set\n# CONFIG_ALTERA_TSE is not set\nCONFIG_NET_VENDOR_AMAZON=y\n# CONFIG_ENA_ETHERNET is not set\nCONFIG_NET_VENDOR_AMD=y\n# CONFIG_AMD8111_ETH is not set\n# CONFIG_PCNET32 is not set\nCONFIG_AMD_XGBE=y\nCONFIG_NET_VENDOR_AQUANTIA=y\n# CONFIG_AQTION is not set\nCONFIG_NET_VENDOR_ARC=y\n# CONFIG_NET_VENDOR_ASIX is not set\nCONFIG_NET_VENDOR_ATHEROS=y\n# CONFIG_ATL2 is not set\n# CONFIG_ATL1 is not set\n# CONFIG_ATL1E is not set\nCONFIG_ATL1C=y\n# CONFIG_ALX is not set\nCONFIG_NET_VENDOR_BROADCOM=y\n# CONFIG_B44 is not set\n# CONFIG_BCMGENET is not set\n# CONFIG_BNX2 is not set\n# CONFIG_CNIC is not set\n# CONFIG_TIGON3 is not set\n# CONFIG_BNX2X is not set\n# CONFIG_SYSTEMPORT is not set\n# CONFIG_BNXT is not set\nCONFIG_NET_VENDOR_CADENCE=y\nCONFIG_MACB=y\nCONFIG_MACB_USE_HWSTAMP=y\n# CONFIG_MACB_PCI is not set\nCONFIG_NET_VENDOR_CAVIUM=y\n# CONFIG_THUNDER_NIC_PF is not set\n# CONFIG_THUNDER_NIC_VF is not set\n# CONFIG_THUNDER_NIC_BGX is not set\n# CONFIG_THUNDER_NIC_RGX is not set\nCONFIG_CAVIUM_PTP=y\n# CONFIG_LIQUIDIO is not set\n# CONFIG_LIQUIDIO_VF is not set\nCONFIG_NET_VENDOR_CHELSIO=y\n# CONFIG_CHELSIO_T1 is not set\n# CONFIG_CHELSIO_T3 is not set\n# CONFIG_CHELSIO_T4 is not set\n# CONFIG_CHELSIO_T4VF is not set\nCONFIG_NET_VENDOR_CISCO=y\n# CONFIG_ENIC is not set\nCONFIG_NET_VENDOR_CORTINA=y\n# CONFIG_GEMINI_ETHERNET is not set\n# CONFIG_NET_VENDOR_DAVICOM is not set\n# CONFIG_DNET is not set\nCONFIG_NET_VENDOR_DEC=y\n# CONFIG_NET_TULIP is not set\nCONFIG_NET_VENDOR_DLINK=y\n# CONFIG_DL2K is not set\n# CONFIG_SUNDANCE is not set\nCONFIG_NET_VENDOR_EMULEX=y\n# CONFIG_BE2NET is not set\n# CONFIG_NET_VENDOR_ENGLEDER is not set\nCONFIG_NET_VENDOR_EZCHIP=y\n# CONFIG_EZCHIP_NPS_MANAGEMENT_ENET is not set\n# CONFIG_NET_VENDOR_FUNGIBLE is not set\nCONFIG_NET_VENDOR_GOOGLE=y\n# CONFIG_GVE is not set\nCONFIG_NET_VENDOR_HISILICON=y\n# CONFIG_HIX5HD2_GMAC is not set\n# CONFIG_HISI_FEMAC is not set\n# CONFIG_HIP04_ETH is not set\nCONFIG_HNS_MDIO=y\nCONFIG_HNS=y\nCONFIG_HNS_DSAF=y\nCONFIG_HNS_ENET=y\n# CONFIG_HNS3 is not set\nCONFIG_NET_VENDOR_HUAWEI=y\n# CONFIG_HINIC is not set\nCONFIG_NET_VENDOR_I825XX=y\nCONFIG_NET_VENDOR_INTEL=y\n# CONFIG_E100 is not set\n# CONFIG_E1000 is not set\nCONFIG_E1000E=y\nCONFIG_IGB=y\nCONFIG_IGBVF=y\n# CONFIG_IXGB is not set\n# CONFIG_IXGBE is not set\n# CONFIG_IXGBEVF is not set\n# CONFIG_I40E is not set\n# CONFIG_I40EVF is not set\n# CONFIG_ICE is not set\n# CONFIG_FM10K is not set\n# CONFIG_IGC is not set\n# CONFIG_NET_VENDOR_WANGXUN is not set\n# CONFIG_JME is not set\n# CONFIG_NET_VENDOR_ADI is not set\n# CONFIG_NET_VENDOR_LITEX is not set\nCONFIG_NET_VENDOR_MARVELL=y\n# CONFIG_MVMDIO is not set\n# CONFIG_SKGE is not set\nCONFIG_SKY2=y\n# CONFIG_SKY2_DEBUG is not set\n# CONFIG_OCTEONTX2_AF is not set\n# CONFIG_OCTEONTX2_PF is not set\n# CONFIG_OCTEON_EP is not set\nCONFIG_NET_VENDOR_MELLANOX=y\n# CONFIG_MLX4_EN is not set\n# CONFIG_MLX5_CORE is not set\n# CONFIG_MLXSW_CORE is not set\n# CONFIG_MLXFW is not set\n# CONFIG_MLXBF_GIGE is not set\nCONFIG_NET_VENDOR_MICREL=y\n# CONFIG_KS8842 is not set\n# CONFIG_KS8851 is not set\n# CONFIG_KS8851_MLL is not set\n# CONFIG_KSZ884X_PCI is not set\nCONFIG_NET_VENDOR_MICROCHIP=y\n# CONFIG_ENC28J60 is not set\n# CONFIG_ENCX24J600 is not set\n# CONFIG_LAN743X is not set\nCONFIG_NET_VENDOR_MICROSEMI=y\n# CONFIG_NET_VENDOR_MICROSOFT is not set\nCONFIG_NET_VENDOR_MYRI=y\n# CONFIG_MYRI10GE is not set\n# CONFIG_FEALNX is not set\nCONFIG_NET_VENDOR_NI=y\n# CONFIG_NI_XGE_MANAGEMENT_ENET is not set\nCONFIG_NET_VENDOR_NATSEMI=y\n# CONFIG_NATSEMI is not set\n# CONFIG_NS83820 is not set\nCONFIG_NET_VENDOR_NETERION=y\n# CONFIG_S2IO is not set\nCONFIG_NET_VENDOR_NETRONOME=y\n# CONFIG_NFP is not set\nCONFIG_NET_VENDOR_8390=y\n# CONFIG_NE2K_PCI is not set\nCONFIG_NET_VENDOR_NVIDIA=y\n# CONFIG_FORCEDETH is not set\nCONFIG_NET_VENDOR_OKI=y\n# CONFIG_ETHOC is not set\nCONFIG_NET_VENDOR_PACKET_ENGINES=y\n# CONFIG_HAMACHI is not set\n# CONFIG_YELLOWFIN is not set\nCONFIG_NET_VENDOR_PENSANDO=y\n# CONFIG_IONIC is not set\nCONFIG_NET_VENDOR_QLOGIC=y\n# CONFIG_QLA3XXX is not set\n# CONFIG_QLCNIC is not set\n# CONFIG_NETXEN_NIC is not set\n# CONFIG_QED is not set\nCONFIG_NET_VENDOR_BROCADE=y\n# CONFIG_BNA is not set\nCONFIG_NET_VENDOR_QUALCOMM=y\n# CONFIG_QCA7000_SPI is not set\n# CONFIG_QCOM_EMAC is not set\n# CONFIG_RMNET is not set\nCONFIG_NET_VENDOR_RDC=y\n# CONFIG_R6040 is not set\nCONFIG_NET_VENDOR_REALTEK=y\n# CONFIG_8139CP is not set\n# CONFIG_8139TOO is not set\n# CONFIG_R8169 is not set\nCONFIG_NET_VENDOR_RENESAS=y\nCONFIG_NET_VENDOR_ROCKER=y\nCONFIG_NET_VENDOR_SAMSUNG=y\n# CONFIG_SXGBE_ETH is not set\nCONFIG_NET_VENDOR_SEEQ=y\nCONFIG_NET_VENDOR_SILAN=y\n# CONFIG_SC92031 is not set\nCONFIG_NET_VENDOR_SIS=y\n# CONFIG_SIS900 is not set\n# CONFIG_SIS190 is not set\nCONFIG_NET_VENDOR_SOLARFLARE=y\n# CONFIG_SFC is not set\n# CONFIG_SFC_FALCON is not set\n# CONFIG_SFC_SIENA is not set\nCONFIG_NET_VENDOR_SMSC=y\nCONFIG_SMC91X=y\n# CONFIG_EPIC100 is not set\nCONFIG_SMSC911X=y\n# CONFIG_SMSC9420 is not set\nCONFIG_NET_VENDOR_SOCIONEXT=y\nCONFIG_NET_VENDOR_STMICRO=y\nCONFIG_STMMAC_ETH=m\n# CONFIG_STMMAC_SELFTESTS is not set\nCONFIG_STMMAC_PLATFORM=m\n# CONFIG_DWMAC_DWC_QOS_ETH is not set\nCONFIG_DWMAC_GENERIC=m\nCONFIG_DWMAC_IPQ806X=m\nCONFIG_DWMAC_QCOM_ETHQOS=m\n# CONFIG_DWMAC_INTEL_PLAT is not set\n# CONFIG_DWMAC_LOONGSON is not set\n# CONFIG_STMMAC_PCI is not set\nCONFIG_NET_VENDOR_SUN=y\n# CONFIG_HAPPYMEAL is not set\n# CONFIG_SUNGEM is not set\n# CONFIG_CASSINI is not set\n# CONFIG_NIU is not set\nCONFIG_NET_VENDOR_SYNOPSYS=y\n# CONFIG_DWC_XLGMAC is not set\nCONFIG_NET_VENDOR_TEHUTI=y\n# CONFIG_TEHUTI is not set\nCONFIG_NET_VENDOR_TI=y\n# CONFIG_TI_CPSW_PHY_SEL is not set\n# CONFIG_TLAN is not set\n# CONFIG_NET_VENDOR_VERTEXCOM is not set\nCONFIG_NET_VENDOR_VIA=y\n# CONFIG_VIA_RHINE is not set\n# CONFIG_VIA_VELOCITY is not set\nCONFIG_NET_VENDOR_WIZNET=y\n# CONFIG_WIZNET_W5100 is not set\n# CONFIG_WIZNET_W5300 is not set\nCONFIG_NET_VENDOR_XILINX=y\n# CONFIG_XILINX_EMACLITE is not set\n# CONFIG_XILINX_AXI_EMAC is not set\n# CONFIG_XILINX_LL_TEMAC is not set\n# CONFIG_FDDI is not set\n# CONFIG_HIPPI is not set\n# CONFIG_NET_SB1000 is not set\nCONFIG_PHYLINK=y\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_ADIN_PHY is not set\n# CONFIG_ADIN1100_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=y\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM54140_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MARVELL_88X2222_PHY is not set\n# CONFIG_MAXLINEAR_GPHY is not set\n# CONFIG_MEDIATEK_GE_PHY is not set\nCONFIG_MICREL_PHY=y\nCONFIG_MICROCHIP_PHY=m\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_MOTORCOMM_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_QSEMI_PHY is not set\nCONFIG_REALTEK_PHY=m\n# CONFIG_RENESAS_PHY is not set\n# CONFIG_ROCKCHIP_PHY is not set\nCONFIG_SMSC_PHY=m\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_DP83TD510_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\n# CONFIG_PSE_CONTROLLER is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_OF_MDIO=y\nCONFIG_ACPI_MDIO=y\nCONFIG_MDIO_DEVRES=y\nCONFIG_MDIO_BITBANG=y\n# CONFIG_MDIO_BCM_UNIMAC is not set\n# CONFIG_MDIO_GPIO is not set\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_OCTEON is not set\n# CONFIG_MDIO_IPQ4019 is not set\n# CONFIG_MDIO_IPQ8064 is not set\n# CONFIG_MDIO_THUNDER is not set\n\n#\n# MDIO Multiplexers\n#\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n\n#\n# PCS device drivers\n#\nCONFIG_PCS_XPCS=m\n# end of PCS device drivers\n\n# CONFIG_PPP is not set\n# CONFIG_SLIP is not set\nCONFIG_USB_NET_DRIVERS=y\nCONFIG_USB_CATC=m\nCONFIG_USB_KAWETH=m\nCONFIG_USB_PEGASUS=m\nCONFIG_USB_RTL8150=m\nCONFIG_USB_RTL8152=m\nCONFIG_USB_LAN78XX=m\nCONFIG_USB_USBNET=y\nCONFIG_USB_NET_AX8817X=y\nCONFIG_USB_NET_AX88179_178A=y\nCONFIG_USB_NET_CDCETHER=y\n# CONFIG_USB_NET_CDC_EEM is not set\nCONFIG_USB_NET_CDC_NCM=y\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\nCONFIG_USB_NET_DM9601=m\nCONFIG_USB_NET_SR9700=m\nCONFIG_USB_NET_SR9800=m\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=m\n# CONFIG_USB_NET_GL620A is not set\nCONFIG_USB_NET_NET1080=y\nCONFIG_USB_NET_PLUSB=m\nCONFIG_USB_NET_MCS7830=m\n# CONFIG_USB_NET_RNDIS_HOST is not set\nCONFIG_USB_NET_CDC_SUBSET_ENABLE=y\nCONFIG_USB_NET_CDC_SUBSET=y\n# CONFIG_USB_ALI_M5632 is not set\n# CONFIG_USB_AN2720 is not set\nCONFIG_USB_BELKIN=y\nCONFIG_USB_ARMLINUX=y\n# CONFIG_USB_EPSON2888 is not set\n# CONFIG_USB_KC2190 is not set\nCONFIG_USB_NET_ZAURUS=y\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\n# CONFIG_USB_HSO is not set\n# CONFIG_USB_NET_INT51X1 is not set\n# CONFIG_USB_IPHETH is not set\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\n# CONFIG_USB_NET_AQC111 is not set\nCONFIG_USB_RTL8153_ECM=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\n# CONFIG_ADM8211 is not set\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\n# CONFIG_ATH5K is not set\n# CONFIG_ATH5K_PCI is not set\n# CONFIG_ATH9K is not set\n# CONFIG_ATH9K_HTC is not set\n# CONFIG_CARL9170 is not set\n# CONFIG_ATH6KL is not set\n# CONFIG_AR5523 is not set\n# CONFIG_WIL6210 is not set\n# CONFIG_ATH10K is not set\nCONFIG_WCN36XX=y\n# CONFIG_WCN36XX_DEBUGFS is not set\n# CONFIG_ATH11K is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\nCONFIG_ATMEL=y\n# CONFIG_PCI_ATMEL is not set\nCONFIG_AT76C50X_USB=y\n# CONFIG_WLAN_VENDOR_BROADCOM is not set\n# CONFIG_WLAN_VENDOR_CISCO is not set\n# CONFIG_WLAN_VENDOR_INTEL is not set\n# CONFIG_WLAN_VENDOR_INTERSIL is not set\n# CONFIG_WLAN_VENDOR_MARVELL is not set\n# CONFIG_WLAN_VENDOR_MEDIATEK is not set\nCONFIG_WLAN_VENDOR_MICROCHIP=y\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\n# CONFIG_WLAN_VENDOR_PURELIFI is not set\n# CONFIG_WLAN_VENDOR_RALINK is not set\n# CONFIG_WLAN_VENDOR_REALTEK is not set\n# CONFIG_WLAN_VENDOR_RSI is not set\n# CONFIG_WLAN_VENDOR_SILABS is not set\n# CONFIG_WLAN_VENDOR_ST is not set\n# CONFIG_WLAN_VENDOR_TI is not set\n# CONFIG_WLAN_VENDOR_ZYDAS is not set\n# CONFIG_WLAN_VENDOR_QUANTENNA is not set\n# CONFIG_MAC80211_HWSIM is not set\n# CONFIG_USB_NET_RNDIS_WLAN is not set\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n# CONFIG_IEEE802154_DRIVERS is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\nCONFIG_XEN_NETDEV_FRONTEND=y\n# CONFIG_XEN_NETDEV_BACKEND is not set\n# CONFIG_VMXNET3 is not set\n# CONFIG_FUJITSU_ES is not set\n# CONFIG_NETDEVSIM is not set\nCONFIG_NET_FAILOVER=y\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\n# CONFIG_INPUT_MATRIXKMAP is not set\nCONFIG_INPUT_VIVALDIFMAP=y\n\n#\n# Userland interfaces\n#\nCONFIG_INPUT_MOUSEDEV=y\nCONFIG_INPUT_MOUSEDEV_PSAUX=y\nCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024\nCONFIG_INPUT_MOUSEDEV_SCREEN_Y=768\nCONFIG_INPUT_JOYDEV=m\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADC is not set\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\nCONFIG_KEYBOARD_ATKBD=y\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=y\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_PINEPHONE is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\n# CONFIG_KEYBOARD_CYPRESS_SF is not set\nCONFIG_INPUT_MOUSE=y\nCONFIG_MOUSE_PS2=y\nCONFIG_MOUSE_PS2_ALPS=y\nCONFIG_MOUSE_PS2_BYD=y\nCONFIG_MOUSE_PS2_LOGIPS2PP=y\nCONFIG_MOUSE_PS2_SYNAPTICS=y\nCONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y\nCONFIG_MOUSE_PS2_CYPRESS=y\nCONFIG_MOUSE_PS2_TRACKPOINT=y\n# CONFIG_MOUSE_PS2_ELANTECH is not set\n# CONFIG_MOUSE_PS2_SENTELIC is not set\n# CONFIG_MOUSE_PS2_TOUCHKIT is not set\nCONFIG_MOUSE_PS2_FOCALTECH=y\nCONFIG_MOUSE_PS2_SMBUS=y\n# CONFIG_MOUSE_SERIAL is not set\n# CONFIG_MOUSE_APPLETOUCH is not set\n# CONFIG_MOUSE_BCM5974 is not set\n# CONFIG_MOUSE_CYAPA is not set\n# CONFIG_MOUSE_ELAN_I2C is not set\n# CONFIG_MOUSE_VSXXXAA is not set\n# CONFIG_MOUSE_GPIO is not set\n# CONFIG_MOUSE_SYNAPTICS_I2C is not set\n# CONFIG_MOUSE_SYNAPTICS_USB is not set\n# CONFIG_INPUT_JOYSTICK is not set\n# CONFIG_INPUT_TABLET is not set\nCONFIG_INPUT_TOUCHSCREEN=y\n# CONFIG_TOUCHSCREEN_ADS7846 is not set\n# CONFIG_TOUCHSCREEN_AD7877 is not set\n# CONFIG_TOUCHSCREEN_AD7879 is not set\n# CONFIG_TOUCHSCREEN_ADC is not set\n# CONFIG_TOUCHSCREEN_AR1021_I2C is not set\n# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set\n# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_BU21013 is not set\n# CONFIG_TOUCHSCREEN_BU21029 is not set\n# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set\n# CONFIG_TOUCHSCREEN_CHIPONE_ICN8505 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMA140 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set\n# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set\n# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set\n# CONFIG_TOUCHSCREEN_DYNAPRO is not set\n# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set\n# CONFIG_TOUCHSCREEN_EETI is not set\n# CONFIG_TOUCHSCREEN_EGALAX is not set\n# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set\n# CONFIG_TOUCHSCREEN_EXC3000 is not set\n# CONFIG_TOUCHSCREEN_FUJITSU is not set\n# CONFIG_TOUCHSCREEN_GOODIX is not set\n# CONFIG_TOUCHSCREEN_HIDEEP is not set\n# CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set\n# CONFIG_TOUCHSCREEN_ILI210X is not set\n# CONFIG_TOUCHSCREEN_ILITEK is not set\n# CONFIG_TOUCHSCREEN_S6SY761 is not set\n# CONFIG_TOUCHSCREEN_GUNZE is not set\n# CONFIG_TOUCHSCREEN_EKTF2127 is not set\n# CONFIG_TOUCHSCREEN_ELAN is not set\n# CONFIG_TOUCHSCREEN_ELO is not set\n# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set\n# CONFIG_TOUCHSCREEN_WACOM_I2C is not set\n# CONFIG_TOUCHSCREEN_MAX11801 is not set\n# CONFIG_TOUCHSCREEN_MCS5000 is not set\n# CONFIG_TOUCHSCREEN_MMS114 is not set\n# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set\n# CONFIG_TOUCHSCREEN_MSG2638 is not set\n# CONFIG_TOUCHSCREEN_MTOUCH is not set\n# CONFIG_TOUCHSCREEN_IMAGIS is not set\n# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set\n# CONFIG_TOUCHSCREEN_INEXIO is not set\n# CONFIG_TOUCHSCREEN_MK712 is not set\n# CONFIG_TOUCHSCREEN_PENMOUNT is not set\n# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set\n# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set\n# CONFIG_TOUCHSCREEN_TOUCHWIN is not set\n# CONFIG_TOUCHSCREEN_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set\nCONFIG_TOUCHSCREEN_USB_COMPOSITE=m\nCONFIG_TOUCHSCREEN_USB_EGALAX=y\nCONFIG_TOUCHSCREEN_USB_PANJIT=y\nCONFIG_TOUCHSCREEN_USB_3M=y\nCONFIG_TOUCHSCREEN_USB_ITM=y\nCONFIG_TOUCHSCREEN_USB_ETURBO=y\nCONFIG_TOUCHSCREEN_USB_GUNZE=y\nCONFIG_TOUCHSCREEN_USB_DMC_TSC10=y\nCONFIG_TOUCHSCREEN_USB_IRTOUCH=y\nCONFIG_TOUCHSCREEN_USB_IDEALTEK=y\nCONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y\nCONFIG_TOUCHSCREEN_USB_GOTOP=y\nCONFIG_TOUCHSCREEN_USB_JASTEC=y\nCONFIG_TOUCHSCREEN_USB_ELO=y\nCONFIG_TOUCHSCREEN_USB_E2I=y\nCONFIG_TOUCHSCREEN_USB_ZYTRONIC=y\nCONFIG_TOUCHSCREEN_USB_ETT_TC45USB=y\nCONFIG_TOUCHSCREEN_USB_NEXIO=y\nCONFIG_TOUCHSCREEN_USB_EASYTOUCH=y\n# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set\n# CONFIG_TOUCHSCREEN_TSC_SERIO is not set\n# CONFIG_TOUCHSCREEN_TSC2004 is not set\n# CONFIG_TOUCHSCREEN_TSC2005 is not set\n# CONFIG_TOUCHSCREEN_TSC2007 is not set\n# CONFIG_TOUCHSCREEN_RM_TS is not set\n# CONFIG_TOUCHSCREEN_SILEAD is not set\n# CONFIG_TOUCHSCREEN_SIS_I2C is not set\n# CONFIG_TOUCHSCREEN_ST1232 is not set\n# CONFIG_TOUCHSCREEN_STMFTS is not set\n# CONFIG_TOUCHSCREEN_SUR40 is not set\n# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set\n# CONFIG_TOUCHSCREEN_SX8654 is not set\n# CONFIG_TOUCHSCREEN_TPS6507X is not set\n# CONFIG_TOUCHSCREEN_ZET6223 is not set\n# CONFIG_TOUCHSCREEN_ZFORCE is not set\n# CONFIG_TOUCHSCREEN_COLIBRI_VF50 is not set\n# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set\n# CONFIG_TOUCHSCREEN_IQS5XX is not set\n# CONFIG_TOUCHSCREEN_ZINITIX is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\nCONFIG_INPUT_PM8941_PWRKEY=y\n# CONFIG_INPUT_PM8XXX_VIBRATOR is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\n# CONFIG_INPUT_UINPUT is not set\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IBM_PANEL is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_IQS7222 is not set\n# CONFIG_INPUT_CMA3000 is not set\nCONFIG_INPUT_XEN_KBDDEV_FRONTEND=y\n# CONFIG_INPUT_SOC_BUTTON_ARRAY is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\n# CONFIG_RMI4_CORE is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\n# CONFIG_SERIO_SERPORT is not set\nCONFIG_SERIO_AMBAKMI=y\n# CONFIG_SERIO_PCIPS2 is not set\nCONFIG_SERIO_LIBPS2=y\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_SERIO_GPIO_PS2 is not set\n# CONFIG_USERIO is not set\n# CONFIG_GAMEPORT is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\nCONFIG_LEGACY_PTYS=y\nCONFIG_LEGACY_PTY_COUNT=16\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\nCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y\nCONFIG_SERIAL_8250_PNP=y\nCONFIG_SERIAL_8250_16550A_VARIANTS=y\n# CONFIG_SERIAL_8250_FINTEK is not set\nCONFIG_SERIAL_8250_CONSOLE=y\nCONFIG_SERIAL_8250_DMA=y\nCONFIG_SERIAL_8250_PCI=y\nCONFIG_SERIAL_8250_EXAR=y\nCONFIG_SERIAL_8250_NR_UARTS=4\nCONFIG_SERIAL_8250_RUNTIME_UARTS=4\n# CONFIG_SERIAL_8250_EXTENDED is not set\nCONFIG_SERIAL_8250_DWLIB=y\nCONFIG_SERIAL_8250_FSL=y\nCONFIG_SERIAL_8250_DW=y\n# CONFIG_SERIAL_8250_RT288X is not set\n# CONFIG_SERIAL_8250_PERICOM is not set\nCONFIG_SERIAL_OF_PLATFORM=y\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\nCONFIG_SERIAL_AMBA_PL011=y\nCONFIG_SERIAL_AMBA_PL011_CONSOLE=y\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_JSM is not set\nCONFIG_SERIAL_MSM=y\nCONFIG_SERIAL_MSM_CONSOLE=y\n# CONFIG_SERIAL_SIFIVE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\nCONFIG_SERIAL_XILINX_PS_UART=y\nCONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_RP2 is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\nCONFIG_SERIAL_MCTRL_GPIO=y\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NOZOMI is not set\n# CONFIG_NULL_TTY is not set\nCONFIG_HVC_DRIVER=y\nCONFIG_HVC_IRQ=y\nCONFIG_HVC_XEN=y\nCONFIG_HVC_XEN_FRONTEND=y\n# CONFIG_HVC_DCC is not set\n# CONFIG_RPMSG_TTY is not set\n# CONFIG_SERIAL_DEV_BUS is not set\nCONFIG_VIRTIO_CONSOLE=y\n# CONFIG_IPMI_HANDLER is not set\n# CONFIG_IPMB_DEVICE_INTERFACE is not set\nCONFIG_HW_RANDOM=m\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_BA431 is not set\nCONFIG_HW_RANDOM_VIRTIO=m\n# CONFIG_HW_RANDOM_CCTRNG is not set\n# CONFIG_HW_RANDOM_XIPHERA is not set\nCONFIG_HW_RANDOM_ARM_SMCCC_TRNG=m\n# CONFIG_HW_RANDOM_CN10K is not set\n# CONFIG_APPLICOM is not set\nCONFIG_DEVMEM=y\nCONFIG_DEVPORT=y\n# CONFIG_TCG_TPM is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\nCONFIG_RANDOM_TRUST_CPU=y\n# CONFIG_RANDOM_TRUST_BOOTLOADER is not set\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_ACPI_I2C_OPREGION=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\nCONFIG_I2C_MUX_PCA954x=y\n# CONFIG_I2C_MUX_PINCTRL is not set\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_DEMUX_PINCTRL is not set\n# CONFIG_I2C_MUX_MLXCPLD is not set\n# end of Multiplexer I2C Chip support\n\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# PC SMBus host controller drivers\n#\n# CONFIG_I2C_ALI1535 is not set\n# CONFIG_I2C_ALI1563 is not set\n# CONFIG_I2C_ALI15X3 is not set\n# CONFIG_I2C_AMD756 is not set\n# CONFIG_I2C_AMD8111 is not set\n# CONFIG_I2C_AMD_MP2 is not set\n# CONFIG_I2C_I801 is not set\n# CONFIG_I2C_ISCH is not set\n# CONFIG_I2C_PIIX4 is not set\n# CONFIG_I2C_NFORCE2 is not set\n# CONFIG_I2C_NVIDIA_GPU is not set\n# CONFIG_I2C_SIS5595 is not set\n# CONFIG_I2C_SIS630 is not set\n# CONFIG_I2C_SIS96X is not set\n# CONFIG_I2C_VIA is not set\n# CONFIG_I2C_VIAPRO is not set\n\n#\n# ACPI drivers\n#\n# CONFIG_I2C_SCMI is not set\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CADENCE is not set\n# CONFIG_I2C_CBUS_GPIO is not set\nCONFIG_I2C_DESIGNWARE_CORE=y\n# CONFIG_I2C_DESIGNWARE_SLAVE is not set\nCONFIG_I2C_DESIGNWARE_PLATFORM=y\n# CONFIG_I2C_DESIGNWARE_PCI is not set\n# CONFIG_I2C_EMEV2 is not set\n# CONFIG_I2C_GPIO is not set\n# CONFIG_I2C_HISI is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_QCOM_CCI is not set\nCONFIG_I2C_QUP=y\n# CONFIG_I2C_RK3X is not set\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_THUNDERX is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_PCI1XXXX is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\nCONFIG_I2C_SLAVE=y\n# CONFIG_I2C_SLAVE_EEPROM is not set\n# CONFIG_I2C_SLAVE_TESTUNIT is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\nCONFIG_SPI_MEM=y\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\n# CONFIG_SPI_BITBANG is not set\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_CADENCE_QUADSPI is not set\n# CONFIG_SPI_CADENCE_XSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_HISI_KUNPENG is not set\n# CONFIG_SPI_HISI_SFC_V3XX is not set\n# CONFIG_SPI_NXP_FLEXSPI is not set\n# CONFIG_SPI_GPIO is not set\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_MICROCHIP_CORE is not set\n# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set\n# CONFIG_SPI_OC_TINY is not set\nCONFIG_SPI_PL022=y\n# CONFIG_SPI_PXA2XX is not set\n# CONFIG_SPI_ROCKCHIP is not set\n# CONFIG_SPI_QCOM_QSPI is not set\nCONFIG_SPI_QUP=y\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_SIFIVE is not set\n# CONFIG_SPI_MXIC is not set\n# CONFIG_SPI_THUNDERX is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_AMD is not set\n\n#\n# SPI Multiplexer support\n#\n# CONFIG_SPI_MUX is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=m\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\nCONFIG_SPI_DYNAMIC=y\nCONFIG_SPMI=y\n# CONFIG_SPMI_HISI3670 is not set\nCONFIG_SPMI_MSM_PMIC_ARB=y\n# CONFIG_HSI is not set\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\n# CONFIG_PTP_1588_CLOCK_KVM is not set\n# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set\n# CONFIG_PTP_1588_CLOCK_IDTCM is not set\n# CONFIG_PTP_1588_CLOCK_OCP is not set\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_GENERIC_PINCTRL_GROUPS=y\nCONFIG_PINMUX=y\nCONFIG_GENERIC_PINMUX_FUNCTIONS=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_AMD is not set\n# CONFIG_PINCTRL_CY8C95X0 is not set\nCONFIG_PINCTRL_MAX77620=y\n# CONFIG_PINCTRL_MCP23S08 is not set\n# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set\n# CONFIG_PINCTRL_OCELOT is not set\nCONFIG_PINCTRL_SINGLE=y\n# CONFIG_PINCTRL_STMFX is not set\n# CONFIG_PINCTRL_SX150X is not set\nCONFIG_PINCTRL_MSM=y\nCONFIG_PINCTRL_IPQ8074=y\n# CONFIG_PINCTRL_IPQ6018 is not set\n# CONFIG_PINCTRL_MDM9607 is not set\nCONFIG_PINCTRL_MSM8916=y\n# CONFIG_PINCTRL_MSM8953 is not set\n# CONFIG_PINCTRL_MSM8976 is not set\nCONFIG_PINCTRL_MSM8994=y\nCONFIG_PINCTRL_MSM8996=y\n# CONFIG_PINCTRL_MSM8998 is not set\n# CONFIG_PINCTRL_QCM2290 is not set\n# CONFIG_PINCTRL_QCS404 is not set\nCONFIG_PINCTRL_QDF2XXX=y\nCONFIG_PINCTRL_QCOM_SPMI_PMIC=y\nCONFIG_PINCTRL_QCOM_SSBI_PMIC=y\n# CONFIG_PINCTRL_SC7180 is not set\n# CONFIG_PINCTRL_SC7280 is not set\n# CONFIG_PINCTRL_SC8180X is not set\n# CONFIG_PINCTRL_SC8280XP is not set\n# CONFIG_PINCTRL_SDM660 is not set\n# CONFIG_PINCTRL_SDM845 is not set\n# CONFIG_PINCTRL_SM6115 is not set\n# CONFIG_PINCTRL_SM6125 is not set\n# CONFIG_PINCTRL_SM6350 is not set\n# CONFIG_PINCTRL_SM6375 is not set\n# CONFIG_PINCTRL_SM8150 is not set\n# CONFIG_PINCTRL_SM8250 is not set\n# CONFIG_PINCTRL_SM8350 is not set\n# CONFIG_PINCTRL_SM8450 is not set\n# CONFIG_PINCTRL_LPASS_LPI is not set\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_GPIO_ACPI=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_CDEV=y\nCONFIG_GPIO_CDEV_V1=y\nCONFIG_GPIO_GENERIC=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_AMDPT is not set\n# CONFIG_GPIO_CADENCE is not set\nCONFIG_GPIO_DWAPB=y\n# CONFIG_GPIO_EXAR is not set\n# CONFIG_GPIO_FTGPIO010 is not set\nCONFIG_GPIO_GENERIC_PLATFORM=y\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HISI is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_LOGICVC is not set\n# CONFIG_GPIO_MB86S7X is not set\nCONFIG_GPIO_PL061=y\n# CONFIG_GPIO_SIFIVE is not set\n# CONFIG_GPIO_SYSCON is not set\nCONFIG_GPIO_XGENE=y\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_GW_PLD is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\nCONFIG_GPIO_PCA953X=y\nCONFIG_GPIO_PCA953X_IRQ=y\n# CONFIG_GPIO_PCA9570 is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\nCONFIG_GPIO_MAX77620=y\n# end of MFD GPIO expanders\n\n#\n# PCI GPIO expanders\n#\n# CONFIG_GPIO_BT8XX is not set\n# CONFIG_GPIO_PCI_IDIO_16 is not set\n# CONFIG_GPIO_PCIE_IDIO_24 is not set\n# CONFIG_GPIO_RDC321X is not set\n# end of PCI GPIO expanders\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n# end of SPI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_VIRTIO is not set\n# CONFIG_GPIO_SIM is not set\n# end of Virtual GPIO drivers\n\n# CONFIG_W1 is not set\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_BRCMSTB is not set\n# CONFIG_POWER_RESET_GPIO is not set\n# CONFIG_POWER_RESET_GPIO_RESTART is not set\nCONFIG_POWER_RESET_MSM=y\n# CONFIG_POWER_RESET_QCOM_PON is not set\n# CONFIG_POWER_RESET_LTC2952 is not set\nCONFIG_POWER_RESET_REGULATOR=y\n# CONFIG_POWER_RESET_RESTART is not set\nCONFIG_POWER_RESET_VEXPRESS=y\nCONFIG_POWER_RESET_XGENE=y\nCONFIG_POWER_RESET_SYSCON=y\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\n# CONFIG_SYSCON_REBOOT_MODE is not set\n# CONFIG_NVMEM_REBOOT_MODE is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_IP5XXX_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SAMSUNG_SDI is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\nCONFIG_BATTERY_BQ27XXX=y\nCONFIG_BATTERY_BQ27XXX_I2C=y\n# CONFIG_BATTERY_BQ27XXX_DT_UPDATES_NVM is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_MAX77976 is not set\n# CONFIG_CHARGER_QCOM_SMBB is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_UCS1002 is not set\n# CONFIG_CHARGER_BD99954 is not set\n# CONFIG_BATTERY_UG3105 is not set\n# CONFIG_HWMON is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_NETLINK is not set\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_OF=y\n# CONFIG_THERMAL_WRITABLE_TRIPS is not set\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\nCONFIG_CPU_THERMAL=y\nCONFIG_CPU_FREQ_THERMAL=y\n# CONFIG_DEVFREQ_THERMAL is not set\nCONFIG_THERMAL_EMULATION=y\n# CONFIG_THERMAL_MMIO is not set\n# CONFIG_MAX77620_THERMAL is not set\n# CONFIG_GENERIC_ADC_THERMAL is not set\n\n#\n# Qualcomm thermal drivers\n#\n# CONFIG_QCOM_SPMI_ADC_TM5 is not set\n# CONFIG_QCOM_SPMI_TEMP_ALARM is not set\nCONFIG_QCOM_LMH=m\n# end of Qualcomm thermal drivers\n\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\nCONFIG_WATCHDOG_OPEN_TIMEOUT=0\n# CONFIG_WATCHDOG_SYSFS is not set\n# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_WDAT_WDT is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_ARM_SBSA_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\n# CONFIG_DW_WATCHDOG is not set\n# CONFIG_MAX63XX_WATCHDOG is not set\n# CONFIG_MAX77620_WATCHDOG is not set\n# CONFIG_QCOM_WDT is not set\n# CONFIG_ARM_SMC_WATCHDOG is not set\n# CONFIG_PM8916_WATCHDOG is not set\n# CONFIG_ALIM7101_WDT is not set\n# CONFIG_I6300ESB_WDT is not set\n# CONFIG_HP_WATCHDOG is not set\n# CONFIG_MEN_A21_WDT is not set\n# CONFIG_XEN_WDT is not set\n\n#\n# PCI-based Watchdog Cards\n#\n# CONFIG_PCIPCWATCHDOG is not set\n# CONFIG_WDTPCI is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\n# CONFIG_SSB is not set\nCONFIG_BCMA_POSSIBLE=y\n# CONFIG_BCMA is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AXP20X_I2C is not set\n# CONFIG_MFD_MADERA is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_GATEWORKS_GSC is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_MP2629 is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_MFD_HI6421_SPMI is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_LPC_ICH is not set\n# CONFIG_LPC_SCH is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_JANZ_CMODIO is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\nCONFIG_MFD_MAX77620=y\n# CONFIG_MFD_MAX77650 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77714 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6370 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_MFD_OCELOT is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_NTXEC is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_QCOM_RPM is not set\nCONFIG_MFD_SPMI_PMIC=y\n# CONFIG_MFD_SY7636A is not set\n# CONFIG_MFD_RDC321X is not set\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RT5120 is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_RK808 is not set\n# CONFIG_MFD_RN5T618 is not set\nCONFIG_MFD_SEC_CORE=y\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_VX855 is not set\n# CONFIG_MFD_LOCHNAGAR is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_MFD_ROHM_BD718XX is not set\n# CONFIG_MFD_ROHM_BD71828 is not set\n# CONFIG_MFD_ROHM_BD957XMUF is not set\n# CONFIG_MFD_STPMIC1 is not set\n# CONFIG_MFD_STMFX is not set\n# CONFIG_MFD_ATC260X_I2C is not set\n# CONFIG_MFD_QCOM_PM8008 is not set\nCONFIG_MFD_VEXPRESS_SYSREG=y\n# CONFIG_MFD_INTEL_M10_BMC is not set\n# CONFIG_MFD_RSMU_I2C is not set\n# CONFIG_MFD_RSMU_SPI is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\n# CONFIG_REGULATOR_DA9121 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\n# CONFIG_REGULATOR_FAN53880 is not set\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\nCONFIG_REGULATOR_MAX77620=y\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MAX20086 is not set\n# CONFIG_REGULATOR_MAX77826 is not set\n# CONFIG_REGULATOR_MCP16502 is not set\n# CONFIG_REGULATOR_MP5416 is not set\n# CONFIG_REGULATOR_MP8859 is not set\n# CONFIG_REGULATOR_MP886X is not set\n# CONFIG_REGULATOR_MPQ7920 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_MT6315 is not set\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PF8X00 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\nCONFIG_REGULATOR_PWM=y\nCONFIG_REGULATOR_QCOM_SMD_RPM=y\nCONFIG_REGULATOR_QCOM_SPMI=y\n# CONFIG_REGULATOR_QCOM_USB_VBUS is not set\n# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT5190A is not set\n# CONFIG_REGULATOR_RT5759 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\n# CONFIG_REGULATOR_S2MPA01 is not set\nCONFIG_REGULATOR_S2MPS11=y\n# CONFIG_REGULATOR_S5M8767 is not set\n# CONFIG_REGULATOR_SLG51000 is not set\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_SY8824X is not set\n# CONFIG_REGULATOR_SY8827N is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS6286X is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\n# CONFIG_REGULATOR_VCTRL is not set\n# CONFIG_REGULATOR_VEXPRESS is not set\n# CONFIG_REGULATOR_VQMMC_IPQ4019 is not set\n# CONFIG_REGULATOR_QCOM_LABIBB is not set\nCONFIG_RC_CORE=y\n# CONFIG_LIRC is not set\nCONFIG_RC_MAP=y\nCONFIG_RC_DECODERS=y\n# CONFIG_IR_IMON_DECODER is not set\nCONFIG_IR_JVC_DECODER=y\nCONFIG_IR_MCE_KBD_DECODER=y\nCONFIG_IR_NEC_DECODER=y\nCONFIG_IR_RC5_DECODER=y\nCONFIG_IR_RC6_DECODER=y\n# CONFIG_IR_RCMM_DECODER is not set\nCONFIG_IR_SANYO_DECODER=y\nCONFIG_IR_SHARP_DECODER=y\nCONFIG_IR_SONY_DECODER=y\nCONFIG_IR_XMP_DECODER=y\n# CONFIG_RC_DEVICES is not set\nCONFIG_CEC_CORE=y\n\n#\n# CEC support\n#\n# CONFIG_MEDIA_CEC_RC is not set\n# CONFIG_MEDIA_CEC_SUPPORT is not set\n# end of CEC support\n\nCONFIG_MEDIA_SUPPORT=y\nCONFIG_MEDIA_SUPPORT_FILTER=y\n# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\n# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set\n# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set\n# CONFIG_MEDIA_RADIO_SUPPORT is not set\n# CONFIG_MEDIA_SDR_SUPPORT is not set\n# CONFIG_MEDIA_PLATFORM_SUPPORT is not set\n# CONFIG_MEDIA_TEST_SUPPORT is not set\n# end of Media device types\n\nCONFIG_VIDEO_DEV=y\nCONFIG_MEDIA_CONTROLLER=y\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2_I2C=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\n# end of Video4Linux options\n\n#\n# Media controller options\n#\n# end of Media controller options\n\n#\n# Media drivers\n#\n\n#\n# Drivers filtered as selected at 'Filter media drivers'\n#\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\nCONFIG_USB_GSPCA=m\nCONFIG_USB_GSPCA_BENQ=m\nCONFIG_USB_GSPCA_CONEX=m\nCONFIG_USB_GSPCA_CPIA1=m\nCONFIG_USB_GSPCA_DTCS033=m\nCONFIG_USB_GSPCA_ETOMS=m\nCONFIG_USB_GSPCA_FINEPIX=m\nCONFIG_USB_GSPCA_JEILINJ=m\nCONFIG_USB_GSPCA_JL2005BCD=m\nCONFIG_USB_GSPCA_KINECT=m\nCONFIG_USB_GSPCA_KONICA=m\nCONFIG_USB_GSPCA_MARS=m\nCONFIG_USB_GSPCA_MR97310A=m\nCONFIG_USB_GSPCA_NW80X=m\nCONFIG_USB_GSPCA_OV519=m\nCONFIG_USB_GSPCA_OV534=m\nCONFIG_USB_GSPCA_OV534_9=m\nCONFIG_USB_GSPCA_PAC207=m\nCONFIG_USB_GSPCA_PAC7302=m\nCONFIG_USB_GSPCA_PAC7311=m\nCONFIG_USB_GSPCA_SE401=m\nCONFIG_USB_GSPCA_SN9C2028=m\nCONFIG_USB_GSPCA_SN9C20X=m\nCONFIG_USB_GSPCA_SONIXB=m\nCONFIG_USB_GSPCA_SONIXJ=m\nCONFIG_USB_GSPCA_SPCA1528=m\nCONFIG_USB_GSPCA_SPCA500=m\nCONFIG_USB_GSPCA_SPCA501=m\nCONFIG_USB_GSPCA_SPCA505=m\nCONFIG_USB_GSPCA_SPCA506=m\nCONFIG_USB_GSPCA_SPCA508=m\nCONFIG_USB_GSPCA_SPCA561=m\nCONFIG_USB_GSPCA_SQ905=m\nCONFIG_USB_GSPCA_SQ905C=m\nCONFIG_USB_GSPCA_SQ930X=m\nCONFIG_USB_GSPCA_STK014=m\nCONFIG_USB_GSPCA_STK1135=m\nCONFIG_USB_GSPCA_STV0680=m\nCONFIG_USB_GSPCA_SUNPLUS=m\nCONFIG_USB_GSPCA_T613=m\nCONFIG_USB_GSPCA_TOPRO=m\nCONFIG_USB_GSPCA_TOUPTEK=m\nCONFIG_USB_GSPCA_TV8532=m\nCONFIG_USB_GSPCA_VC032X=m\nCONFIG_USB_GSPCA_VICAM=m\nCONFIG_USB_GSPCA_XIRLINK_CIT=m\nCONFIG_USB_GSPCA_ZC3XX=m\nCONFIG_USB_GL860=m\nCONFIG_USB_M5602=m\nCONFIG_USB_STV06XX=m\nCONFIG_USB_PWC=m\n# CONFIG_USB_PWC_DEBUG is not set\nCONFIG_USB_PWC_INPUT_EVDEV=y\nCONFIG_USB_S2255=m\n# CONFIG_VIDEO_USBTV is not set\nCONFIG_USB_VIDEO_CLASS=m\nCONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\n# CONFIG_VIDEO_EM28XX is not set\n# CONFIG_MEDIA_PCI_SUPPORT is not set\nCONFIG_VIDEOBUF2_CORE=m\nCONFIG_VIDEOBUF2_V4L2=m\nCONFIG_VIDEOBUF2_MEMOPS=m\nCONFIG_VIDEOBUF2_VMALLOC=m\n# end of Media drivers\n\n#\n# Media ancillary drivers\n#\nCONFIG_VIDEO_IR_I2C=y\n\n#\n# Camera sensor devices\n#\n# CONFIG_VIDEO_AR0521 is not set\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_HI846 is not set\n# CONFIG_VIDEO_HI847 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_IMX412 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\n# CONFIG_VIDEO_MT9V011 is not set\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_OG01A1B is not set\n# CONFIG_VIDEO_OV02A10 is not set\n# CONFIG_VIDEO_OV08D10 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\n# CONFIG_VIDEO_OV2640 is not set\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV2740 is not set\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5693 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV7251 is not set\n# CONFIG_VIDEO_OV7640 is not set\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9282 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_OV9734 is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n# end of Camera sensor devices\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# Audio decoders, processors and mixers\n#\n# CONFIG_VIDEO_CS3308 is not set\n# CONFIG_VIDEO_CS5345 is not set\n# CONFIG_VIDEO_CS53L32A is not set\n# CONFIG_VIDEO_MSP3400 is not set\n# CONFIG_VIDEO_SONY_BTF_MPX is not set\n# CONFIG_VIDEO_TDA1997X is not set\n# CONFIG_VIDEO_TDA7432 is not set\n# CONFIG_VIDEO_TDA9840 is not set\n# CONFIG_VIDEO_TEA6415C is not set\n# CONFIG_VIDEO_TEA6420 is not set\n# CONFIG_VIDEO_TLV320AIC23B is not set\n# CONFIG_VIDEO_TVAUDIO is not set\n# CONFIG_VIDEO_UDA1342 is not set\n# CONFIG_VIDEO_VP27SMPX is not set\n# CONFIG_VIDEO_WM8739 is not set\n# CONFIG_VIDEO_WM8775 is not set\n# end of Audio decoders, processors and mixers\n\n#\n# RDS decoders\n#\n# CONFIG_VIDEO_SAA6588 is not set\n# end of RDS decoders\n\n#\n# Video decoders\n#\n# CONFIG_VIDEO_ADV7180 is not set\n# CONFIG_VIDEO_ADV7183 is not set\n# CONFIG_VIDEO_ADV748X is not set\n# CONFIG_VIDEO_ADV7604 is not set\n# CONFIG_VIDEO_ADV7842 is not set\n# CONFIG_VIDEO_BT819 is not set\n# CONFIG_VIDEO_BT856 is not set\n# CONFIG_VIDEO_BT866 is not set\n# CONFIG_VIDEO_ISL7998X is not set\n# CONFIG_VIDEO_KS0127 is not set\n# CONFIG_VIDEO_MAX9286 is not set\n# CONFIG_VIDEO_ML86V7667 is not set\n# CONFIG_VIDEO_SAA7110 is not set\n# CONFIG_VIDEO_SAA711X is not set\n# CONFIG_VIDEO_TC358743 is not set\n# CONFIG_VIDEO_TVP514X is not set\n# CONFIG_VIDEO_TVP5150 is not set\n# CONFIG_VIDEO_TVP7002 is not set\n# CONFIG_VIDEO_TW2804 is not set\n# CONFIG_VIDEO_TW9903 is not set\n# CONFIG_VIDEO_TW9906 is not set\n# CONFIG_VIDEO_TW9910 is not set\n# CONFIG_VIDEO_VPX3220 is not set\n\n#\n# Video and audio decoders\n#\n# CONFIG_VIDEO_SAA717X is not set\n# CONFIG_VIDEO_CX25840 is not set\n# end of Video decoders\n\n#\n# Video encoders\n#\n# CONFIG_VIDEO_AD9389B is not set\n# CONFIG_VIDEO_ADV7170 is not set\n# CONFIG_VIDEO_ADV7175 is not set\n# CONFIG_VIDEO_ADV7343 is not set\n# CONFIG_VIDEO_ADV7393 is not set\n# CONFIG_VIDEO_AK881X is not set\n# CONFIG_VIDEO_SAA7127 is not set\n# CONFIG_VIDEO_SAA7185 is not set\n# CONFIG_VIDEO_THS8200 is not set\n# end of Video encoders\n\n#\n# Video improvement chips\n#\n# CONFIG_VIDEO_UPD64031A is not set\n# CONFIG_VIDEO_UPD64083 is not set\n# end of Video improvement chips\n\n#\n# Audio/Video compression chips\n#\n# CONFIG_VIDEO_SAA6752HS is not set\n# end of Audio/Video compression chips\n\n#\n# SDR tuner chips\n#\n# end of SDR tuner chips\n\n#\n# Miscellaneous helper chips\n#\n# CONFIG_VIDEO_I2C is not set\n# CONFIG_VIDEO_M52790 is not set\n# CONFIG_VIDEO_ST_MIPID02 is not set\n# CONFIG_VIDEO_THS7303 is not set\n# end of Miscellaneous helper chips\n\n#\n# Media SPI Adapters\n#\n# CONFIG_VIDEO_GS1662 is not set\n# end of Media SPI Adapters\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\nCONFIG_DRM=y\nCONFIG_DRM_MIPI_DSI=y\n# CONFIG_DRM_DEBUG_MM is not set\nCONFIG_DRM_USE_DYNAMIC_DEBUG=y\nCONFIG_DRM_KMS_HELPER=y\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\nCONFIG_DRM_DP_AUX_BUS=y\nCONFIG_DRM_DISPLAY_HELPER=y\nCONFIG_DRM_DISPLAY_DP_HELPER=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_SCHED=y\n\n#\n# I2C encoder or helper chips\n#\nCONFIG_DRM_I2C_CH7006=m\nCONFIG_DRM_I2C_SIL164=m\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_KOMEDA is not set\n# end of ARM devices\n\n# CONFIG_DRM_RADEON is not set\n# CONFIG_DRM_AMDGPU is not set\n# CONFIG_DRM_NOUVEAU is not set\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\n# CONFIG_DRM_VMWGFX is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_AST is not set\n# CONFIG_DRM_MGAG200 is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_USE_LVDS is not set\n# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set\n# CONFIG_DRM_QXL is not set\n# CONFIG_DRM_VIRTIO_GPU is not set\nCONFIG_DRM_MSM=y\nCONFIG_DRM_MSM_GPU_STATE=y\nCONFIG_DRM_MSM_MDSS=y\n# CONFIG_DRM_MSM_MDP4 is not set\nCONFIG_DRM_MSM_MDP5=y\n# CONFIG_DRM_MSM_DPU is not set\nCONFIG_DRM_MSM_DP=y\nCONFIG_DRM_MSM_DSI=y\nCONFIG_DRM_MSM_DSI_28NM_PHY=y\nCONFIG_DRM_MSM_DSI_20NM_PHY=y\nCONFIG_DRM_MSM_DSI_28NM_8960_PHY=y\nCONFIG_DRM_MSM_DSI_14NM_PHY=y\nCONFIG_DRM_MSM_DSI_10NM_PHY=y\nCONFIG_DRM_MSM_DSI_7NM_PHY=y\nCONFIG_DRM_MSM_HDMI=y\n# CONFIG_DRM_MSM_HDMI_HDCP is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set\n# CONFIG_DRM_PANEL_ARM_VERSATILE is not set\n# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set\n# CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0 is not set\n# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set\n# CONFIG_DRM_PANEL_BOE_TV101WUM_NL6 is not set\n# CONFIG_DRM_PANEL_DSI_CM is not set\n# CONFIG_DRM_PANEL_LVDS is not set\nCONFIG_DRM_PANEL_SIMPLE=y\nCONFIG_DRM_PANEL_EDP=y\n# CONFIG_DRM_PANEL_EBBG_FT8719 is not set\n# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set\n# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set\n# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set\n# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set\n# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set\n# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set\n# CONFIG_DRM_PANEL_JDI_R63452 is not set\n# CONFIG_DRM_PANEL_KHADAS_TS050 is not set\n# CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LB035Q02 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set\n# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT36672A is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set\n# CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set\n# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set\n# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set\n# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set\n# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set\n# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set\n# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_SOFEF00 is not set\n# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set\n# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS060T1SX01 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7703 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set\n# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set\n# CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521 is not set\n# CONFIG_DRM_PANEL_TDO_TL070WSH30 is not set\n# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set\n# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set\n# CONFIG_DRM_PANEL_TPO_TPG110 is not set\n# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set\n# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set\n# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set\n# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_CHRONTEL_CH7033 is not set\n# CONFIG_DRM_DISPLAY_CONNECTOR is not set\n# CONFIG_DRM_ITE_IT6505 is not set\n# CONFIG_DRM_LONTIUM_LT8912B is not set\n# CONFIG_DRM_LONTIUM_LT9211 is not set\n# CONFIG_DRM_LONTIUM_LT9611 is not set\n# CONFIG_DRM_LONTIUM_LT9611UXC is not set\n# CONFIG_DRM_ITE_IT66121 is not set\n# CONFIG_DRM_LVDS_CODEC is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NWL_MIPI_DSI is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_PARADE_PS8640 is not set\n# CONFIG_DRM_SIL_SII8620 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_SII9234 is not set\n# CONFIG_DRM_SIMPLE_BRIDGE is not set\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\n# CONFIG_DRM_TOSHIBA_TC358762 is not set\n# CONFIG_DRM_TOSHIBA_TC358764 is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TOSHIBA_TC358768 is not set\n# CONFIG_DRM_TOSHIBA_TC358775 is not set\n# CONFIG_DRM_TI_DLPC3433 is not set\n# CONFIG_DRM_TI_TFP410 is not set\n# CONFIG_DRM_TI_SN65DSI83 is not set\n# CONFIG_DRM_TI_SN65DSI86 is not set\n# CONFIG_DRM_TI_TPD12S015 is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_ANALOGIX_ANX7625 is not set\nCONFIG_DRM_I2C_ADV7511=y\nCONFIG_DRM_I2C_ADV7511_AUDIO=y\nCONFIG_DRM_I2C_ADV7511_CEC=y\n# CONFIG_DRM_CDNS_MHDP8546 is not set\n# end of Display Interface Bridges\n\n# CONFIG_DRM_ETNAVIV is not set\n# CONFIG_DRM_HISI_HIBMC is not set\n# CONFIG_DRM_HISI_KIRIN is not set\n# CONFIG_DRM_LOGICVC is not set\n# CONFIG_DRM_MXSFB is not set\n# CONFIG_DRM_IMX_LCDIF is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_BOCHS is not set\n# CONFIG_DRM_CIRRUS_QEMU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_PANEL_MIPI_DBI is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_TINYDRM_HX8357D is not set\n# CONFIG_TINYDRM_ILI9163 is not set\n# CONFIG_TINYDRM_ILI9225 is not set\n# CONFIG_TINYDRM_ILI9341 is not set\n# CONFIG_TINYDRM_ILI9486 is not set\n# CONFIG_TINYDRM_MI0283QT is not set\n# CONFIG_TINYDRM_REPAPER is not set\n# CONFIG_TINYDRM_ST7586 is not set\n# CONFIG_TINYDRM_ST7735R is not set\n# CONFIG_DRM_PL111 is not set\n# CONFIG_DRM_XEN_FRONTEND is not set\n# CONFIG_DRM_LIMA is not set\n# CONFIG_DRM_PANFROST is not set\n# CONFIG_DRM_TIDSS is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_SSD130X is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_DRM_NOMODESET=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\nCONFIG_FB_MODE_HELPERS=y\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_CIRRUS is not set\n# CONFIG_FB_PM2 is not set\nCONFIG_FB_ARMCLCD=y\n# CONFIG_FB_CYBER2000 is not set\n# CONFIG_FB_ASILIANT is not set\n# CONFIG_FB_IMSTT is not set\n# CONFIG_FB_EFI is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_NVIDIA is not set\n# CONFIG_FB_RIVA is not set\n# CONFIG_FB_I740 is not set\n# CONFIG_FB_MATROX is not set\n# CONFIG_FB_RADEON is not set\n# CONFIG_FB_ATY128 is not set\n# CONFIG_FB_ATY is not set\n# CONFIG_FB_S3 is not set\n# CONFIG_FB_SAVAGE is not set\n# CONFIG_FB_SIS is not set\n# CONFIG_FB_NEOMAGIC is not set\n# CONFIG_FB_KYRO is not set\n# CONFIG_FB_3DFX is not set\n# CONFIG_FB_VOODOO1 is not set\n# CONFIG_FB_VT8623 is not set\n# CONFIG_FB_TRIDENT is not set\n# CONFIG_FB_ARK is not set\n# CONFIG_FB_PM3 is not set\n# CONFIG_FB_CARMINE is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\nCONFIG_XEN_FBDEV_FRONTEND=y\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_MB862XX is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# CONFIG_FB_SM712 is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\n# CONFIG_LCD_CLASS_DEVICE is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\n# CONFIG_BACKLIGHT_KTD253 is not set\n# CONFIG_BACKLIGHT_PWM is not set\n# CONFIG_BACKLIGHT_QCOM_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\n# CONFIG_BACKLIGHT_GPIO is not set\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n# CONFIG_BACKLIGHT_LED is not set\n# end of Backlight & LCD device support\n\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_DUMMY_CONSOLE_COLUMNS=80\nCONFIG_DUMMY_CONSOLE_ROWS=25\nCONFIG_FRAMEBUFFER_CONSOLE=y\n# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\n# end of Console display driver support\n\n# CONFIG_LOGO is not set\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_HWDEP=y\nCONFIG_SND_RAWMIDI=y\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\n# CONFIG_SND_HRTIMER is not set\n# CONFIG_SND_DYNAMIC_MINORS is not set\nCONFIG_SND_SUPPORT_OLD_API=y\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_CTL_INPUT_VALIDATION is not set\n# CONFIG_SND_SEQUENCER is not set\nCONFIG_SND_DRIVERS=y\n# CONFIG_SND_DUMMY is not set\n# CONFIG_SND_ALOOP is not set\n# CONFIG_SND_MTPAV is not set\n# CONFIG_SND_SERIAL_U16550 is not set\n# CONFIG_SND_MPU401 is not set\nCONFIG_SND_PCI=y\n# CONFIG_SND_AD1889 is not set\n# CONFIG_SND_ALS300 is not set\n# CONFIG_SND_ALI5451 is not set\n# CONFIG_SND_ATIIXP is not set\n# CONFIG_SND_ATIIXP_MODEM is not set\n# CONFIG_SND_AU8810 is not set\n# CONFIG_SND_AU8820 is not set\n# CONFIG_SND_AU8830 is not set\n# CONFIG_SND_AW2 is not set\n# CONFIG_SND_AZT3328 is not set\n# CONFIG_SND_BT87X is not set\n# CONFIG_SND_CA0106 is not set\n# CONFIG_SND_CMIPCI is not set\n# CONFIG_SND_OXYGEN is not set\n# CONFIG_SND_CS4281 is not set\n# CONFIG_SND_CS46XX is not set\n# CONFIG_SND_CTXFI is not set\n# CONFIG_SND_DARLA20 is not set\n# CONFIG_SND_GINA20 is not set\n# CONFIG_SND_LAYLA20 is not set\n# CONFIG_SND_DARLA24 is not set\n# CONFIG_SND_GINA24 is not set\n# CONFIG_SND_LAYLA24 is not set\n# CONFIG_SND_MONA is not set\n# CONFIG_SND_MIA is not set\n# CONFIG_SND_ECHO3G is not set\n# CONFIG_SND_INDIGO is not set\n# CONFIG_SND_INDIGOIO is not set\n# CONFIG_SND_INDIGODJ is not set\n# CONFIG_SND_INDIGOIOX is not set\n# CONFIG_SND_INDIGODJX is not set\n# CONFIG_SND_EMU10K1 is not set\n# CONFIG_SND_EMU10K1X is not set\n# CONFIG_SND_ENS1370 is not set\n# CONFIG_SND_ENS1371 is not set\n# CONFIG_SND_ES1938 is not set\n# CONFIG_SND_ES1968 is not set\n# CONFIG_SND_FM801 is not set\n# CONFIG_SND_HDSP is not set\n# CONFIG_SND_HDSPM is not set\n# CONFIG_SND_ICE1712 is not set\n# CONFIG_SND_ICE1724 is not set\n# CONFIG_SND_INTEL8X0 is not set\n# CONFIG_SND_INTEL8X0M is not set\n# CONFIG_SND_KORG1212 is not set\n# CONFIG_SND_LOLA is not set\n# CONFIG_SND_LX6464ES is not set\n# CONFIG_SND_MAESTRO3 is not set\n# CONFIG_SND_MIXART is not set\n# CONFIG_SND_NM256 is not set\n# CONFIG_SND_PCXHR is not set\n# CONFIG_SND_RIPTIDE is not set\n# CONFIG_SND_RME32 is not set\n# CONFIG_SND_RME96 is not set\n# CONFIG_SND_RME9652 is not set\n# CONFIG_SND_SE6X is not set\n# CONFIG_SND_SONICVIBES is not set\n# CONFIG_SND_TRIDENT is not set\n# CONFIG_SND_VIA82XX is not set\n# CONFIG_SND_VIA82XX_MODEM is not set\n# CONFIG_SND_VIRTUOSO is not set\n# CONFIG_SND_VX222 is not set\n# CONFIG_SND_YMFPCI is not set\n\n#\n# HD-Audio\n#\n# CONFIG_SND_HDA_INTEL is not set\n# end of HD-Audio\n\nCONFIG_SND_HDA_PREALLOC_SIZE=64\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=y\nCONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y\n# CONFIG_SND_USB_UA101 is not set\n# CONFIG_SND_USB_CAIAQ is not set\n# CONFIG_SND_USB_6FIRE is not set\n# CONFIG_SND_USB_HIFACE is not set\n# CONFIG_SND_BCD2000 is not set\n# CONFIG_SND_USB_POD is not set\n# CONFIG_SND_USB_PODHD is not set\n# CONFIG_SND_USB_TONEPORT is not set\n# CONFIG_SND_USB_VARIAX is not set\nCONFIG_SND_SOC=y\n# CONFIG_SND_SOC_ADI is not set\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_AMD_ACP_CONFIG is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_AUDMIX is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_FSL_MICFIL is not set\n# CONFIG_SND_SOC_FSL_XCVR is not set\n# CONFIG_SND_SOC_FSL_RPMSG is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\nCONFIG_SND_SOC_QCOM=y\nCONFIG_SND_SOC_LPASS_CPU=y\nCONFIG_SND_SOC_LPASS_PLATFORM=y\nCONFIG_SND_SOC_LPASS_APQ8016=y\n# CONFIG_SND_SOC_STORM is not set\nCONFIG_SND_SOC_APQ8016_SBC=y\nCONFIG_SND_SOC_QCOM_COMMON=y\n# CONFIG_SND_SOC_SC7180 is not set\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_SPI is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\n# CONFIG_SND_SOC_ADAU7002 is not set\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4375 is not set\n# CONFIG_SND_SOC_AK4458 is not set\n# CONFIG_SND_SOC_AK4554 is not set\nCONFIG_SND_SOC_AK4613=y\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_AW8738 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS35L41_SPI is not set\n# CONFIG_SND_SOC_CS35L41_I2C is not set\n# CONFIG_SND_SOC_CS35L45_SPI is not set\n# CONFIG_SND_SOC_CS35L45_I2C is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS42L83 is not set\n# CONFIG_SND_SOC_CS4234 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\n# CONFIG_SND_SOC_DA7213 is not set\n# CONFIG_SND_SOC_DMIC is not set\nCONFIG_SND_SOC_HDMI_CODEC=y\n# CONFIG_SND_SOC_ES7134 is not set\n# CONFIG_SND_SOC_ES7241 is not set\n# CONFIG_SND_SOC_ES8316 is not set\n# CONFIG_SND_SOC_ES8326 is not set\n# CONFIG_SND_SOC_ES8328_I2C is not set\n# CONFIG_SND_SOC_ES8328_SPI is not set\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_HDA is not set\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\n# CONFIG_SND_SOC_MAX98088 is not set\n# CONFIG_SND_SOC_MAX98357A is not set\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98520 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX98396 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\nCONFIG_SND_SOC_MSM8916_WCD_ANALOG=y\nCONFIG_SND_SOC_MSM8916_WCD_DIGITAL=y\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM179X_SPI is not set\n# CONFIG_SND_SOC_PCM186X_I2C is not set\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3060_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\n# CONFIG_SND_SOC_PCM5102A is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK3328 is not set\n# CONFIG_SND_SOC_RT5616 is not set\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\n# CONFIG_SND_SOC_RT5659 is not set\n# CONFIG_SND_SOC_RT9120 is not set\n# CONFIG_SND_SOC_SGTL5000 is not set\n# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\n# CONFIG_SND_SOC_SPDIF is not set\n# CONFIG_SND_SOC_SRC4XXX_I2C is not set\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS2780 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805M is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320ADC3XXX is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731_I2C is not set\n# CONFIG_SND_SOC_WM8731_SPI is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8940 is not set\n# CONFIG_SND_SOC_WM8960 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_ZL38060 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8821 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\n# end of CODEC drivers\n\nCONFIG_SND_SIMPLE_CARD_UTILS=y\nCONFIG_SND_SIMPLE_CARD=y\n# CONFIG_SND_AUDIO_GRAPH_CARD is not set\n# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set\n# CONFIG_SND_TEST_COMPONENT is not set\n# CONFIG_SND_XEN_FRONTEND is not set\n# CONFIG_SND_VIRTIO is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\n# CONFIG_HIDRAW is not set\n# CONFIG_UHID is not set\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\n# CONFIG_HID_APPLEIR is not set\n# CONFIG_HID_ASUS is not set\n# CONFIG_HID_AUREAL is not set\nCONFIG_HID_BELKIN=y\n# CONFIG_HID_BETOP_FF is not set\n# CONFIG_HID_BIGBEN_FF is not set\nCONFIG_HID_CHERRY=y\nCONFIG_HID_CHICONY=y\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\nCONFIG_HID_CYPRESS=y\n# CONFIG_HID_DRAGONRISE is not set\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\nCONFIG_HID_EZKEY=y\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_GLORIOUS is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\n# CONFIG_HID_KYE is not set\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_VRC2 is not set\n# CONFIG_HID_XIAOMI is not set\n# CONFIG_HID_GYRATION is not set\n# CONFIG_HID_ICADE is not set\nCONFIG_HID_ITE=y\n# CONFIG_HID_JABRA is not set\n# CONFIG_HID_TWINHAN is not set\nCONFIG_HID_KENSINGTON=y\n# CONFIG_HID_LCPOWER is not set\n# CONFIG_HID_LED is not set\n# CONFIG_HID_LENOVO is not set\n# CONFIG_HID_LETSKETCH is not set\nCONFIG_HID_LOGITECH=m\n# CONFIG_HID_LOGITECH_HIDPP is not set\n# CONFIG_LOGITECH_FF is not set\n# CONFIG_LOGIRUMBLEPAD2_FF is not set\n# CONFIG_LOGIG940_FF is not set\n# CONFIG_LOGIWHEELS_FF is not set\nCONFIG_HID_MAGICMOUSE=m\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_MEGAWORLD_FF is not set\nCONFIG_HID_REDRAGON=y\nCONFIG_HID_MICROSOFT=m\nCONFIG_HID_MONTEREY=y\nCONFIG_HID_MULTITOUCH=m\nCONFIG_HID_NINTENDO=m\nCONFIG_NINTENDO_FF=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\n# CONFIG_HID_ORTEK is not set\nCONFIG_HID_OUYA=y\n# CONFIG_HID_PANTHERLORD is not set\n# CONFIG_HID_PENMOUNT is not set\n# CONFIG_HID_PETALYNX is not set\n# CONFIG_HID_PICOLCD is not set\nCONFIG_HID_PLANTRONICS=m\n# CONFIG_HID_PXRC is not set\n# CONFIG_HID_RAZER is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\n# CONFIG_HID_SAMSUNG is not set\n# CONFIG_HID_SEMITEK is not set\n# CONFIG_HID_SIGMAMICRO is not set\nCONFIG_HID_SONY=y\nCONFIG_SONY_FF=y\n# CONFIG_HID_SPEEDLINK is not set\n# CONFIG_HID_STEAM is not set\n# CONFIG_HID_STEELSERIES is not set\n# CONFIG_HID_SUNPLUS is not set\n# CONFIG_HID_RMI is not set\n# CONFIG_HID_GREENASIA is not set\n# CONFIG_HID_SMARTJOYPLUS is not set\n# CONFIG_HID_TIVO is not set\n# CONFIG_HID_TOPSEED is not set\n# CONFIG_HID_TOPRE is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\n# CONFIG_HID_WIIMOTE is not set\n# CONFIG_HID_XINMO is not set\n# CONFIG_HID_ZEROPLUS is not set\n# CONFIG_HID_ZYDACRON is not set\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\n# CONFIG_USB_HIDDEV is not set\n# end of USB HID support\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID_ACPI is not set\n# CONFIG_I2C_HID_OF is not set\n# CONFIG_I2C_HID_OF_ELAN is not set\n# CONFIG_I2C_HID_OF_GOODIX is not set\n# end of I2C HID support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\nCONFIG_USB_ULPI_BUS=y\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_PCI=y\n# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\nCONFIG_USB_OTG=y\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set\n# CONFIG_USB_OTG_FSM is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\n# CONFIG_USB_MON is not set\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\n# CONFIG_USB_XHCI_DBGCAP is not set\nCONFIG_USB_XHCI_PCI=y\n# CONFIG_USB_XHCI_PCI_RENESAS is not set\nCONFIG_USB_XHCI_PLATFORM=y\nCONFIG_USB_EHCI_HCD=y\nCONFIG_USB_EHCI_ROOT_HUB_TT=y\nCONFIG_USB_EHCI_TT_NEWSCHED=y\nCONFIG_USB_EHCI_PCI=y\n# CONFIG_USB_EHCI_FSL is not set\nCONFIG_USB_EHCI_HCD_PLATFORM=y\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\nCONFIG_USB_OHCI_HCD=y\nCONFIG_USB_OHCI_HCD_PCI=y\nCONFIG_USB_OHCI_HCD_PLATFORM=y\n# CONFIG_USB_UHCI_HCD is not set\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n# CONFIG_USB_XEN_HCD is not set\n\n#\n# USB Device Class drivers\n#\n# CONFIG_USB_ACM is not set\n# CONFIG_USB_PRINTER is not set\n# CONFIG_USB_WDM is not set\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\n# CONFIG_USB_UAS is not set\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\n# CONFIG_USB_MUSB_HDRC is not set\nCONFIG_USB_DWC3=y\n# CONFIG_USB_DWC3_ULPI is not set\n# CONFIG_USB_DWC3_HOST is not set\n# CONFIG_USB_DWC3_GADGET is not set\nCONFIG_USB_DWC3_DUAL_ROLE=y\n\n#\n# Platform Glue Driver Support\n#\nCONFIG_USB_DWC3_PCI=y\nCONFIG_USB_DWC3_HAPS=y\nCONFIG_USB_DWC3_OF_SIMPLE=y\nCONFIG_USB_DWC3_QCOM=y\nCONFIG_USB_DWC2=y\n# CONFIG_USB_DWC2_HOST is not set\n\n#\n# Gadget/Dual-role mode requires USB Gadget support to be enabled\n#\n# CONFIG_USB_DWC2_PERIPHERAL is not set\nCONFIG_USB_DWC2_DUAL_ROLE=y\n# CONFIG_USB_DWC2_PCI is not set\n# CONFIG_USB_DWC2_DEBUG is not set\n# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set\nCONFIG_USB_CHIPIDEA=y\nCONFIG_USB_CHIPIDEA_UDC=y\nCONFIG_USB_CHIPIDEA_HOST=y\nCONFIG_USB_CHIPIDEA_MSM=y\nCONFIG_USB_CHIPIDEA_IMX=y\nCONFIG_USB_CHIPIDEA_GENERIC=y\nCONFIG_USB_CHIPIDEA_TEGRA=y\nCONFIG_USB_ISP1760=y\nCONFIG_USB_ISP1760_HCD=y\nCONFIG_USB_ISP1761_UDC=y\n# CONFIG_USB_ISP1760_HOST_ROLE is not set\n# CONFIG_USB_ISP1760_GADGET_ROLE is not set\nCONFIG_USB_ISP1760_DUAL_ROLE=y\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=y\nCONFIG_USB_SERIAL_CONSOLE=y\nCONFIG_USB_SERIAL_GENERIC=y\nCONFIG_USB_SERIAL_SIMPLE=m\nCONFIG_USB_SERIAL_AIRCABLE=m\nCONFIG_USB_SERIAL_ARK3116=m\nCONFIG_USB_SERIAL_BELKIN=m\nCONFIG_USB_SERIAL_CH341=m\nCONFIG_USB_SERIAL_WHITEHEAT=m\nCONFIG_USB_SERIAL_DIGI_ACCELEPORT=m\nCONFIG_USB_SERIAL_CP210X=m\nCONFIG_USB_SERIAL_CYPRESS_M8=m\nCONFIG_USB_SERIAL_EMPEG=m\nCONFIG_USB_SERIAL_FTDI_SIO=m\nCONFIG_USB_SERIAL_VISOR=m\nCONFIG_USB_SERIAL_IPAQ=m\nCONFIG_USB_SERIAL_IR=m\nCONFIG_USB_SERIAL_EDGEPORT=m\nCONFIG_USB_SERIAL_EDGEPORT_TI=m\nCONFIG_USB_SERIAL_F81232=m\n# CONFIG_USB_SERIAL_F8153X is not set\nCONFIG_USB_SERIAL_GARMIN=m\nCONFIG_USB_SERIAL_IPW=m\nCONFIG_USB_SERIAL_IUU=m\nCONFIG_USB_SERIAL_KEYSPAN_PDA=m\n# CONFIG_USB_SERIAL_KEYSPAN is not set\nCONFIG_USB_SERIAL_KLSI=m\nCONFIG_USB_SERIAL_KOBIL_SCT=m\nCONFIG_USB_SERIAL_MCT_U232=m\nCONFIG_USB_SERIAL_METRO=m\nCONFIG_USB_SERIAL_MOS7720=m\nCONFIG_USB_SERIAL_MOS7840=m\nCONFIG_USB_SERIAL_MXUPORT=m\nCONFIG_USB_SERIAL_NAVMAN=m\nCONFIG_USB_SERIAL_PL2303=m\nCONFIG_USB_SERIAL_OTI6858=m\nCONFIG_USB_SERIAL_QCAUX=m\nCONFIG_USB_SERIAL_QUALCOMM=m\nCONFIG_USB_SERIAL_SPCP8X5=m\nCONFIG_USB_SERIAL_SAFE=m\n# CONFIG_USB_SERIAL_SAFE_PADDED is not set\nCONFIG_USB_SERIAL_SIERRAWIRELESS=m\nCONFIG_USB_SERIAL_SYMBOL=m\nCONFIG_USB_SERIAL_TI=m\nCONFIG_USB_SERIAL_CYBERJACK=m\nCONFIG_USB_SERIAL_WWAN=m\nCONFIG_USB_SERIAL_OPTION=m\nCONFIG_USB_SERIAL_OMNINET=m\nCONFIG_USB_SERIAL_OPTICON=m\nCONFIG_USB_SERIAL_XSENS_MT=m\nCONFIG_USB_SERIAL_WISHBONE=m\nCONFIG_USB_SERIAL_SSU100=m\nCONFIG_USB_SERIAL_QT2=m\n# CONFIG_USB_SERIAL_UPD78F0730 is not set\n# CONFIG_USB_SERIAL_XR is not set\n# CONFIG_USB_SERIAL_DEBUG is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_USB_QCOM_EUD is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\nCONFIG_USB_EZUSB_FX2=m\n# CONFIG_USB_HUB_USB251XB is not set\nCONFIG_USB_HSIC_USB3503=y\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n# CONFIG_USB_ONBOARD_HUB is not set\n\n#\n# USB Physical Layer drivers\n#\n# CONFIG_NOP_USB_XCEIV is not set\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\nCONFIG_USB_ULPI=y\nCONFIG_USB_ULPI_VIEWPORT=y\n# end of USB Physical Layer drivers\n\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\n# CONFIG_USB_GADGET_DEBUG_FILES is not set\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=500\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n# CONFIG_U_SERIAL_CONSOLE is not set\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\nCONFIG_USB_SNP_CORE=y\nCONFIG_USB_SNP_UDC_PLAT=y\n# CONFIG_USB_M66592 is not set\n# CONFIG_USB_BDC_UDC is not set\n# CONFIG_USB_AMD5536UDC is not set\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_NET2280 is not set\n# CONFIG_USB_GOKU is not set\n# CONFIG_USB_EG20T is not set\n# CONFIG_USB_GADGET_XILINX is not set\n# CONFIG_USB_MAX3420_UDC is not set\n# CONFIG_USB_DUMMY_HCD is not set\n# end of USB Peripheral Controller\n\nCONFIG_USB_LIBCOMPOSITE=m\nCONFIG_USB_F_ACM=m\nCONFIG_USB_F_SS_LB=m\nCONFIG_USB_U_SERIAL=m\nCONFIG_USB_U_ETHER=m\nCONFIG_USB_F_SERIAL=m\nCONFIG_USB_F_OBEX=m\nCONFIG_USB_F_ECM=m\nCONFIG_USB_F_SUBSET=m\nCONFIG_USB_F_RNDIS=m\nCONFIG_USB_F_MASS_STORAGE=m\nCONFIG_USB_CONFIGFS=m\n# CONFIG_USB_CONFIGFS_SERIAL is not set\n# CONFIG_USB_CONFIGFS_ACM is not set\n# CONFIG_USB_CONFIGFS_OBEX is not set\n# CONFIG_USB_CONFIGFS_NCM is not set\n# CONFIG_USB_CONFIGFS_ECM is not set\n# CONFIG_USB_CONFIGFS_ECM_SUBSET is not set\n# CONFIG_USB_CONFIGFS_RNDIS is not set\n# CONFIG_USB_CONFIGFS_EEM is not set\n# CONFIG_USB_CONFIGFS_MASS_STORAGE is not set\n# CONFIG_USB_CONFIGFS_F_LB_SS is not set\n# CONFIG_USB_CONFIGFS_F_FS is not set\n# CONFIG_USB_CONFIGFS_F_UAC1 is not set\n# CONFIG_USB_CONFIGFS_F_UAC1_LEGACY is not set\n# CONFIG_USB_CONFIGFS_F_UAC2 is not set\n# CONFIG_USB_CONFIGFS_F_MIDI is not set\n# CONFIG_USB_CONFIGFS_F_HID is not set\n# CONFIG_USB_CONFIGFS_F_UVC is not set\n# CONFIG_USB_CONFIGFS_F_PRINTER is not set\n\n#\n# USB Gadget precomposed configurations\n#\nCONFIG_USB_ZERO=m\n# CONFIG_USB_ZERO_HNPTEST is not set\n# CONFIG_USB_AUDIO is not set\nCONFIG_USB_ETH=m\nCONFIG_USB_ETH_RNDIS=y\n# CONFIG_USB_ETH_EEM is not set\n# CONFIG_USB_G_NCM is not set\n# CONFIG_USB_GADGETFS is not set\n# CONFIG_USB_FUNCTIONFS is not set\nCONFIG_USB_MASS_STORAGE=m\nCONFIG_USB_G_SERIAL=m\n# CONFIG_USB_MIDI_GADGET is not set\n# CONFIG_USB_G_PRINTER is not set\n# CONFIG_USB_CDC_COMPOSITE is not set\n# CONFIG_USB_G_ACM_MS is not set\n# CONFIG_USB_G_MULTI is not set\n# CONFIG_USB_G_HID is not set\n# CONFIG_USB_G_DBGP is not set\n# CONFIG_USB_G_WEBCAM is not set\n# CONFIG_USB_RAW_GADGET is not set\n# end of USB Gadget precomposed configurations\n\n# CONFIG_TYPEC is not set\nCONFIG_USB_ROLE_SWITCH=y\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_DEBUG is not set\nCONFIG_MMC_ARMMMCI=y\nCONFIG_MMC_QCOM_DML=y\nCONFIG_MMC_STM32_SDMMC=y\nCONFIG_MMC_SDHCI=y\nCONFIG_MMC_SDHCI_IO_ACCESSORS=y\n# CONFIG_MMC_SDHCI_PCI is not set\nCONFIG_MMC_SDHCI_ACPI=y\nCONFIG_MMC_SDHCI_PLTFM=y\n# CONFIG_MMC_SDHCI_OF_ARASAN is not set\n# CONFIG_MMC_SDHCI_OF_AT91 is not set\n# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set\n# CONFIG_MMC_SDHCI_CADENCE is not set\n# CONFIG_MMC_SDHCI_F_SDH30 is not set\n# CONFIG_MMC_SDHCI_MILBEAUT is not set\nCONFIG_MMC_SDHCI_MSM=y\n# CONFIG_MMC_TIFM_SD is not set\nCONFIG_MMC_SPI=y\n# CONFIG_MMC_CB710 is not set\n# CONFIG_MMC_VIA_SDMMC is not set\nCONFIG_MMC_DW=y\nCONFIG_MMC_DW_PLTFM=y\n# CONFIG_MMC_DW_BLUEFIELD is not set\nCONFIG_MMC_DW_EXYNOS=y\n# CONFIG_MMC_DW_HI3798CV200 is not set\nCONFIG_MMC_DW_K3=y\n# CONFIG_MMC_DW_PCI is not set\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_CQHCI=y\n# CONFIG_MMC_HSQ is not set\n# CONFIG_MMC_TOSHIBA_PCI is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MMC_SDHCI_XENON is not set\n# CONFIG_MMC_SDHCI_OMAP is not set\n# CONFIG_MMC_SDHCI_AM654 is not set\nCONFIG_SCSI_UFSHCD=y\n# CONFIG_SCSI_UFS_BSG is not set\n# CONFIG_SCSI_UFS_HPB is not set\nCONFIG_SCSI_UFSHCD_PCI=y\n# CONFIG_SCSI_UFS_DWC_TC_PCI is not set\nCONFIG_SCSI_UFSHCD_PLATFORM=y\n# CONFIG_SCSI_UFS_CDNS_PLATFORM is not set\n# CONFIG_SCSI_UFS_DWC_TC_PLATFORM is not set\nCONFIG_SCSI_UFS_QCOM=y\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\n# CONFIG_LEDS_CLASS_FLASH is not set\n# CONFIG_LEDS_CLASS_MULTICOLOR is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AN30259A is not set\n# CONFIG_LEDS_AW2013 is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_EL15203000 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_LP55XX_COMMON is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\n# CONFIG_LEDS_PWM is not set\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\nCONFIG_LEDS_SYSCON=y\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_SPI_BYTE is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\n\n#\n# RGB LED drivers\n#\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\nCONFIG_LEDS_TRIGGER_TIMER=y\nCONFIG_LEDS_TRIGGER_ONESHOT=y\n# CONFIG_LEDS_TRIGGER_DISK is not set\n# CONFIG_LEDS_TRIGGER_MTD is not set\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\nCONFIG_LEDS_TRIGGER_BACKLIGHT=y\nCONFIG_LEDS_TRIGGER_CPU=y\n# CONFIG_LEDS_TRIGGER_ACTIVITY is not set\nCONFIG_LEDS_TRIGGER_GPIO=y\nCONFIG_LEDS_TRIGGER_DEFAULT_ON=y\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\n# CONFIG_LEDS_TRIGGER_TRANSIENT is not set\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\n# CONFIG_LEDS_TRIGGER_PANIC is not set\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\n# CONFIG_LEDS_TRIGGER_AUDIO is not set\n# CONFIG_LEDS_TRIGGER_TTY is not set\n\n#\n# Simple LED drivers\n#\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_SUPPORT=y\n# CONFIG_EDAC is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_HYM8563 is not set\n# CONFIG_RTC_DRV_MAX6900 is not set\nCONFIG_RTC_DRV_MAX77686=y\n# CONFIG_RTC_DRV_NCT3018Y is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\n# CONFIG_RTC_DRV_PCF8563 is not set\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\nCONFIG_RTC_DRV_S5M=y\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\nCONFIG_RTC_DRV_DS3232=y\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\nCONFIG_RTC_DRV_EFI=y\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\nCONFIG_RTC_DRV_PL031=y\n# CONFIG_RTC_DRV_CADENCE is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\n# CONFIG_RTC_DRV_PM8XXX is not set\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_VIRTUAL_CHANNELS=y\nCONFIG_DMA_ACPI=y\nCONFIG_DMA_OF=y\n# CONFIG_ALTERA_MSGDMA is not set\n# CONFIG_AMBA_PL08X is not set\nCONFIG_BCM_SBA_RAID=m\n# CONFIG_DW_AXI_DMAC is not set\n# CONFIG_FSL_EDMA is not set\n# CONFIG_FSL_QDMA is not set\n# CONFIG_HISI_DMA is not set\n# CONFIG_INTEL_IDMA64 is not set\n# CONFIG_MV_XOR_V2 is not set\nCONFIG_PL330_DMA=y\n# CONFIG_PLX_DMA is not set\n# CONFIG_XILINX_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DPDMA is not set\nCONFIG_QCOM_BAM_DMA=y\n# CONFIG_QCOM_GPI_DMA is not set\nCONFIG_QCOM_HIDMA_MGMT=y\nCONFIG_QCOM_HIDMA=y\n# CONFIG_DW_DMAC is not set\n# CONFIG_DW_DMAC_PCI is not set\n# CONFIG_DW_EDMA is not set\n# CONFIG_DW_EDMA_PCIE is not set\n# CONFIG_SF_PDMA is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\nCONFIG_DMA_ENGINE_RAID=y\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\n# CONFIG_UDMABUF is not set\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\n# CONFIG_DMABUF_HEAPS is not set\n# CONFIG_DMABUF_SYSFS_STATS is not set\n# end of DMABUF options\n\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\nCONFIG_VFIO=y\nCONFIG_VFIO_IOMMU_TYPE1=y\nCONFIG_VFIO_VIRQFD=y\n# CONFIG_VFIO_NOIOMMU is not set\nCONFIG_VFIO_PCI_CORE=y\nCONFIG_VFIO_PCI_MMAP=y\nCONFIG_VFIO_PCI_INTX=y\nCONFIG_VFIO_PCI=y\n# CONFIG_VFIO_PLATFORM is not set\n# CONFIG_VFIO_MDEV is not set\n# CONFIG_VIRT_DRIVERS is not set\nCONFIG_VIRTIO_ANCHOR=y\nCONFIG_VIRTIO=y\nCONFIG_VIRTIO_PCI_LIB=y\nCONFIG_VIRTIO_PCI_LIB_LEGACY=y\nCONFIG_VIRTIO_MENU=y\nCONFIG_VIRTIO_PCI=y\nCONFIG_VIRTIO_PCI_LEGACY=y\nCONFIG_VIRTIO_BALLOON=y\n# CONFIG_VIRTIO_INPUT is not set\nCONFIG_VIRTIO_MMIO=y\n# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set\n# CONFIG_VDPA is not set\nCONFIG_VHOST_MENU=y\n# CONFIG_VHOST_NET is not set\n# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# CONFIG_HYPERV is not set\n# end of Microsoft Hyper-V guest support\n\n#\n# Xen driver support\n#\nCONFIG_XEN_BALLOON=y\nCONFIG_XEN_SCRUB_PAGES_DEFAULT=y\nCONFIG_XEN_DEV_EVTCHN=y\nCONFIG_XEN_BACKEND=y\nCONFIG_XENFS=y\nCONFIG_XEN_COMPAT_XENFS=y\nCONFIG_XEN_SYS_HYPERVISOR=y\nCONFIG_XEN_XENBUS_FRONTEND=y\nCONFIG_XEN_GNTDEV=y\nCONFIG_XEN_GRANT_DEV_ALLOC=y\n# CONFIG_XEN_GRANT_DMA_ALLOC is not set\nCONFIG_SWIOTLB_XEN=y\n# CONFIG_XEN_PCIDEV_STUB is not set\n# CONFIG_XEN_PVCALLS_FRONTEND is not set\n# CONFIG_XEN_PVCALLS_BACKEND is not set\nCONFIG_XEN_PRIVCMD=y\nCONFIG_XEN_EFI=y\nCONFIG_XEN_AUTO_XLATE=y\n# CONFIG_XEN_VIRTIO is not set\n# end of Xen driver support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\n# CONFIG_STAGING is not set\n# CONFIG_GOLDFISH is not set\nCONFIG_CHROME_PLATFORMS=y\n# CONFIG_CHROMEOS_ACPI is not set\n# CONFIG_CHROMEOS_TBMC is not set\n# CONFIG_CROS_EC is not set\n# CONFIG_CROS_KBD_LED_BACKLIGHT is not set\n# CONFIG_CHROMEOS_PRIVACY_SCREEN is not set\n# CONFIG_MELLANOX_PLATFORM is not set\n# CONFIG_SURFACE_PLATFORMS is not set\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Clock driver for ARM Reference designs\n#\n# CONFIG_CLK_ICST is not set\n# CONFIG_CLK_SP810 is not set\n# CONFIG_CLK_VEXPRESS_OSC is not set\n# end of Clock driver for ARM Reference designs\n\n# CONFIG_LMK04832 is not set\n# CONFIG_COMMON_CLK_MAX77686 is not set\n# CONFIG_COMMON_CLK_MAX9485 is not set\nCONFIG_COMMON_CLK_SCPI=y\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\nCONFIG_COMMON_CLK_CS2000_CP=y\nCONFIG_COMMON_CLK_S2MPS11=y\n# CONFIG_COMMON_CLK_AXI_CLKGEN is not set\nCONFIG_COMMON_CLK_XGENE=y\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_RS9_PCIE is not set\n# CONFIG_COMMON_CLK_VC5 is not set\n# CONFIG_COMMON_CLK_VC7 is not set\n# CONFIG_COMMON_CLK_FIXED_MMIO is not set\nCONFIG_QCOM_GDSC=y\nCONFIG_QCOM_RPMCC=y\nCONFIG_COMMON_CLK_QCOM=y\nCONFIG_QCOM_A53PLL=y\n# CONFIG_QCOM_A7PLL is not set\n# CONFIG_QCOM_CLK_APCC_MSM8996 is not set\nCONFIG_QCOM_CLK_SMD_RPM=y\nCONFIG_APQ_GCC_8084=y\nCONFIG_APQ_MMCC_8084=y\n# CONFIG_IPQ_APSS_PLL is not set\nCONFIG_IPQ_GCC_4019=y\n# CONFIG_IPQ_GCC_6018 is not set\nCONFIG_IPQ_GCC_806X=y\nCONFIG_IPQ_LCC_806X=y\nCONFIG_IPQ_GCC_8074=y\nCONFIG_MSM_GCC_8660=y\n# CONFIG_MSM_GCC_8909 is not set\nCONFIG_MSM_GCC_8916=y\n# CONFIG_MSM_GCC_8939 is not set\nCONFIG_MSM_GCC_8960=y\nCONFIG_MSM_LCC_8960=y\n# CONFIG_MDM_GCC_9607 is not set\nCONFIG_MDM_GCC_9615=y\nCONFIG_MDM_LCC_9615=y\nCONFIG_MSM_MMCC_8960=y\n# CONFIG_MSM_GCC_8953 is not set\nCONFIG_MSM_GCC_8974=y\nCONFIG_MSM_MMCC_8974=y\n# CONFIG_MSM_GCC_8976 is not set\n# CONFIG_MSM_MMCC_8994 is not set\nCONFIG_MSM_GCC_8994=y\nCONFIG_MSM_GCC_8996=y\nCONFIG_MSM_MMCC_8996=y\n# CONFIG_MSM_GCC_8998 is not set\n# CONFIG_MSM_GPUCC_8998 is not set\n# CONFIG_MSM_MMCC_8998 is not set\n# CONFIG_QCM_GCC_2290 is not set\n# CONFIG_QCM_DISPCC_2290 is not set\n# CONFIG_QCS_GCC_404 is not set\n# CONFIG_SC_CAMCC_7180 is not set\n# CONFIG_SC_CAMCC_7280 is not set\n# CONFIG_SC_DISPCC_7180 is not set\n# CONFIG_SC_DISPCC_7280 is not set\n# CONFIG_SC_GCC_7180 is not set\n# CONFIG_SC_GCC_7280 is not set\n# CONFIG_SC_GCC_8180X is not set\n# CONFIG_SC_GCC_8280XP is not set\n# CONFIG_SC_GPUCC_7180 is not set\n# CONFIG_SC_GPUCC_7280 is not set\n# CONFIG_SC_GPUCC_8280XP is not set\n# CONFIG_SC_LPASSCC_7280 is not set\n# CONFIG_SC_LPASS_CORECC_7180 is not set\n# CONFIG_SC_LPASS_CORECC_7280 is not set\n# CONFIG_SC_MSS_7180 is not set\n# CONFIG_SC_VIDEOCC_7180 is not set\n# CONFIG_SC_VIDEOCC_7280 is not set\n# CONFIG_SDM_CAMCC_845 is not set\n# CONFIG_SDM_GCC_660 is not set\n# CONFIG_SDM_MMCC_660 is not set\n# CONFIG_SDM_GPUCC_660 is not set\n# CONFIG_QCS_TURING_404 is not set\n# CONFIG_QCS_Q6SSTOP_404 is not set\n# CONFIG_SDM_GCC_845 is not set\n# CONFIG_SDM_GPUCC_845 is not set\n# CONFIG_SDM_VIDEOCC_845 is not set\n# CONFIG_SDM_DISPCC_845 is not set\n# CONFIG_SDM_LPASSCC_845 is not set\n# CONFIG_SDX_GCC_55 is not set\n# CONFIG_SDX_GCC_65 is not set\n# CONFIG_SM_CAMCC_8250 is not set\n# CONFIG_SM_CAMCC_8450 is not set\n# CONFIG_SM_GCC_6115 is not set\n# CONFIG_SM_GCC_6125 is not set\n# CONFIG_SM_GCC_6350 is not set\n# CONFIG_SM_GCC_6375 is not set\n# CONFIG_SM_GCC_8150 is not set\n# CONFIG_SM_GCC_8250 is not set\n# CONFIG_SM_GCC_8350 is not set\n# CONFIG_SM_GCC_8450 is not set\n# CONFIG_SM_GPUCC_6350 is not set\n# CONFIG_SM_GPUCC_8150 is not set\n# CONFIG_SM_GPUCC_8250 is not set\n# CONFIG_SM_GPUCC_8350 is not set\n# CONFIG_SM_VIDEOCC_8150 is not set\n# CONFIG_SM_VIDEOCC_8250 is not set\n# CONFIG_SPMI_PMIC_CLKDIV is not set\n# CONFIG_QCOM_HFPLL is not set\n# CONFIG_KPSS_XCC is not set\n# CONFIG_CLK_GFM_LPASS_SM8250 is not set\n# CONFIG_XILINX_VCU is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\nCONFIG_HWSPINLOCK=y\nCONFIG_HWSPINLOCK_QCOM=y\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_ACPI=y\nCONFIG_TIMER_PROBE=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y\nCONFIG_FSL_ERRATUM_A008585=y\nCONFIG_HISILICON_ERRATUM_161010101=y\nCONFIG_ARM64_ERRATUM_858921=y\n# CONFIG_MICROCHIP_PIT64B is not set\n# end of Clock Source drivers\n\nCONFIG_MAILBOX=y\nCONFIG_ARM_MHU=y\nCONFIG_ARM_MHU_V2=m\n# CONFIG_PLATFORM_MHU is not set\n# CONFIG_PL320_MBOX is not set\n# CONFIG_PCC is not set\n# CONFIG_ALTERA_MBOX is not set\n# CONFIG_MAILBOX_TEST is not set\n# CONFIG_QCOM_APCS_IPC is not set\n# CONFIG_QCOM_IPCC is not set\nCONFIG_IOMMU_IOVA=y\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\nCONFIG_IOMMU_IO_PGTABLE=y\nCONFIG_IOMMU_IO_PGTABLE_LPAE=y\n# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set\n# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set\n# CONFIG_IOMMU_IO_PGTABLE_DART is not set\n# end of Generic IOMMU Pagetable Support\n\n# CONFIG_IOMMU_DEBUGFS is not set\nCONFIG_IOMMU_DEFAULT_DMA_STRICT=y\n# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set\n# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set\nCONFIG_OF_IOMMU=y\nCONFIG_IOMMU_DMA=y\nCONFIG_ARM_SMMU=y\n# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set\nCONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y\nCONFIG_ARM_SMMU_QCOM=y\n# CONFIG_ARM_SMMU_QCOM_DEBUG is not set\n# CONFIG_ARM_SMMU_V3 is not set\nCONFIG_QCOM_IOMMU=y\n# CONFIG_VIRTIO_IOMMU is not set\n\n#\n# Remoteproc drivers\n#\nCONFIG_REMOTEPROC=y\n# CONFIG_REMOTEPROC_CDEV is not set\nCONFIG_QCOM_PIL_INFO=m\nCONFIG_QCOM_RPROC_COMMON=m\n# CONFIG_QCOM_Q6V5_ADSP is not set\n# CONFIG_QCOM_Q6V5_MSS is not set\n# CONFIG_QCOM_Q6V5_PAS is not set\n# CONFIG_QCOM_Q6V5_WCSS is not set\n# CONFIG_QCOM_SYSMON is not set\nCONFIG_QCOM_WCNSS_PIL=m\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\nCONFIG_RPMSG=y\nCONFIG_RPMSG_CHAR=y\n# CONFIG_RPMSG_CTRL is not set\n# CONFIG_RPMSG_NS is not set\n# CONFIG_RPMSG_QCOM_GLINK_RPM is not set\n# CONFIG_RPMSG_QCOM_GLINK_SMEM is not set\nCONFIG_RPMSG_QCOM_SMD=y\n# CONFIG_RPMSG_VIRTIO is not set\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\n# CONFIG_SOC_BRCMSTB is not set\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# CONFIG_QUICC_ENGINE is not set\n# CONFIG_FSL_RCPM is not set\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# fujitsu SoC drivers\n#\n# CONFIG_A64FX_DIAG is not set\n# end of fujitsu SoC drivers\n\n#\n# i.MX SoC drivers\n#\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# CONFIG_LITEX_SOC_CONTROLLER is not set\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# CONFIG_QCOM_AOSS_QMP is not set\nCONFIG_QCOM_COMMAND_DB=y\n# CONFIG_QCOM_CPR is not set\n# CONFIG_QCOM_GENI_SE is not set\n# CONFIG_QCOM_GSBI is not set\n# CONFIG_QCOM_LLCC is not set\nCONFIG_QCOM_MDT_LOADER=y\n# CONFIG_QCOM_OCMEM is not set\n# CONFIG_QCOM_RMTFS_MEM is not set\n# CONFIG_QCOM_RPMH is not set\n# CONFIG_QCOM_RPMPD is not set\nCONFIG_QCOM_SMEM=y\nCONFIG_QCOM_SMD_RPM=y\nCONFIG_QCOM_SMEM_STATE=y\nCONFIG_QCOM_SMP2P=y\nCONFIG_QCOM_SMSM=y\nCONFIG_QCOM_SOCINFO=y\nCONFIG_QCOM_SPM=y\nCONFIG_QCOM_STATS=y\nCONFIG_QCOM_WCNSS_CTRL=y\n# CONFIG_QCOM_APR is not set\n# CONFIG_QCOM_ICC_BWMON is not set\n# end of Qualcomm SoC drivers\n\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y\n# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set\n# CONFIG_DEVFREQ_GOV_POWERSAVE is not set\n# CONFIG_DEVFREQ_GOV_USERSPACE is not set\n# CONFIG_DEVFREQ_GOV_PASSIVE is not set\n\n#\n# DEVFREQ Drivers\n#\n# CONFIG_PM_DEVFREQ_EVENT is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_FSA9480 is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_PTN5150 is not set\n# CONFIG_EXTCON_QCOM_SPMI_MISC is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\nCONFIG_EXTCON_USB_GPIO=y\n# CONFIG_MEMORY is not set\nCONFIG_IIO=y\n# CONFIG_IIO_BUFFER is not set\n# CONFIG_IIO_CONFIGFS is not set\n# CONFIG_IIO_TRIGGER is not set\n# CONFIG_IIO_SW_DEVICE is not set\n# CONFIG_IIO_SW_TRIGGER is not set\n# CONFIG_IIO_TRIGGERED_EVENT is not set\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADXL313_I2C is not set\n# CONFIG_ADXL313_SPI is not set\n# CONFIG_ADXL345_I2C is not set\n# CONFIG_ADXL345_SPI is not set\n# CONFIG_ADXL355_I2C is not set\n# CONFIG_ADXL355_SPI is not set\n# CONFIG_ADXL367_SPI is not set\n# CONFIG_ADXL367_I2C is not set\n# CONFIG_ADXL372_SPI is not set\n# CONFIG_ADXL372_I2C is not set\n# CONFIG_BMA180 is not set\n# CONFIG_BMA220 is not set\n# CONFIG_BMA400 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_BMI088_ACCEL is not set\n# CONFIG_DA280 is not set\n# CONFIG_DA311 is not set\n# CONFIG_DMARD06 is not set\n# CONFIG_DMARD09 is not set\n# CONFIG_DMARD10 is not set\n# CONFIG_FXLS8962AF_I2C is not set\n# CONFIG_FXLS8962AF_SPI is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MC3230 is not set\n# CONFIG_MMA7455_I2C is not set\n# CONFIG_MMA7455_SPI is not set\n# CONFIG_MMA7660 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MSA311 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_MXC6255 is not set\n# CONFIG_SCA3000 is not set\n# CONFIG_SCA3300 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7091R5 is not set\n# CONFIG_AD7124 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7266 is not set\n# CONFIG_AD7280 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7292 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7606_IFACE_PARALLEL is not set\n# CONFIG_AD7606_IFACE_SPI is not set\n# CONFIG_AD7766 is not set\n# CONFIG_AD7768_1 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD7949 is not set\n# CONFIG_AD799X is not set\n# CONFIG_ADI_AXI_ADC is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_ENVELOPE_DETECTOR is not set\n# CONFIG_HI8435 is not set\n# CONFIG_HX711 is not set\n# CONFIG_INA2XX_ADC is not set\n# CONFIG_LTC2471 is not set\n# CONFIG_LTC2485 is not set\n# CONFIG_LTC2496 is not set\n# CONFIG_LTC2497 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX11100 is not set\n# CONFIG_MAX1118 is not set\n# CONFIG_MAX11205 is not set\n# CONFIG_MAX1241 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MAX9611 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_MCP3911 is not set\n# CONFIG_NAU7802 is not set\n# CONFIG_QCOM_SPMI_RRADC is not set\n# CONFIG_QCOM_SPMI_IADC is not set\n# CONFIG_QCOM_SPMI_VADC is not set\n# CONFIG_QCOM_SPMI_ADC5 is not set\n# CONFIG_RICHTEK_RTQ6056 is not set\n# CONFIG_SD_ADC_MODULATOR is not set\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC0832 is not set\n# CONFIG_TI_ADC084S021 is not set\n# CONFIG_TI_ADC12138 is not set\n# CONFIG_TI_ADC108S102 is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_TI_ADC161S626 is not set\n# CONFIG_TI_ADS1015 is not set\n# CONFIG_TI_ADS7950 is not set\n# CONFIG_TI_ADS8344 is not set\n# CONFIG_TI_ADS8688 is not set\n# CONFIG_TI_ADS124S08 is not set\n# CONFIG_TI_ADS131E08 is not set\n# CONFIG_TI_TLC4541 is not set\n# CONFIG_TI_TSC2046 is not set\n# CONFIG_VF610_ADC is not set\n# CONFIG_XILINX_XADC is not set\n# end of Analog to digital converters\n\n#\n# Analog to digital and digital to analog converters\n#\n# CONFIG_AD74413R is not set\n# end of Analog to digital and digital to analog converters\n\n#\n# Analog Front Ends\n#\n# CONFIG_IIO_RESCALE is not set\n# end of Analog Front Ends\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n# CONFIG_ADA4250 is not set\n# CONFIG_HMC425 is not set\n# end of Amplifiers\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7746 is not set\n# end of Capacitance to digital converters\n\n#\n# Chemical Sensors\n#\n# CONFIG_ATLAS_PH_SENSOR is not set\n# CONFIG_ATLAS_EZO_SENSOR is not set\n# CONFIG_BME680 is not set\n# CONFIG_CCS811 is not set\n# CONFIG_IAQCORE is not set\n# CONFIG_SCD30_CORE is not set\n# CONFIG_SCD4X is not set\n# CONFIG_SENSIRION_SGP30 is not set\n# CONFIG_SENSIRION_SGP40 is not set\n# CONFIG_SPS30_I2C is not set\n# CONFIG_SENSEAIR_SUNRISE_CO2 is not set\n# CONFIG_VZ89X is not set\n# end of Chemical Sensors\n\n#\n# Hid Sensor IIO Common\n#\n# end of Hid Sensor IIO Common\n\n#\n# IIO SCMI Sensors\n#\n# end of IIO SCMI Sensors\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n# end of SSP Sensor Common\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD3552R is not set\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5592R is not set\n# CONFIG_AD5593R is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_LTC2688 is not set\n# CONFIG_AD5686_SPI is not set\n# CONFIG_AD5696_I2C is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5758 is not set\n# CONFIG_AD5761 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5766 is not set\n# CONFIG_AD5770R is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7293 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_AD8801 is not set\n# CONFIG_DPOT_DAC is not set\n# CONFIG_DS4424 is not set\n# CONFIG_LTC1660 is not set\n# CONFIG_LTC2632 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n# CONFIG_TI_DAC082S085 is not set\n# CONFIG_TI_DAC5571 is not set\n# CONFIG_TI_DAC7311 is not set\n# CONFIG_TI_DAC7612 is not set\n# CONFIG_VF610_DAC is not set\n# end of Digital to analog converters\n\n#\n# IIO dummy driver\n#\n# end of IIO dummy driver\n\n#\n# Filters\n#\n# CONFIG_ADMV8818 is not set\n# end of Filters\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n# end of Clock Generator/Distribution\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n# CONFIG_ADF4371 is not set\n# CONFIG_ADMV1013 is not set\n# CONFIG_ADMV1014 is not set\n# CONFIG_ADMV4420 is not set\n# CONFIG_ADRF6780 is not set\n# end of Phase-Locked Loop (PLL) frequency synthesizers\n# end of Frequency Synthesizers DDS/PLL\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS290 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_FXAS21002C is not set\n# CONFIG_MPU3050_I2C is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n# end of Digital gyroscope sensors\n\n#\n# Health Sensors\n#\n\n#\n# Heart Rate Monitors\n#\n# CONFIG_AFE4403 is not set\n# CONFIG_AFE4404 is not set\n# CONFIG_MAX30100 is not set\n# CONFIG_MAX30102 is not set\n# end of Heart Rate Monitors\n# end of Health Sensors\n\n#\n# Humidity sensors\n#\n# CONFIG_AM2315 is not set\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HDC2010 is not set\n# CONFIG_HTS221 is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n# end of Humidity sensors\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16460 is not set\n# CONFIG_ADIS16475 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_BMI160_I2C is not set\n# CONFIG_BMI160_SPI is not set\n# CONFIG_BOSCH_BNO055_I2C is not set\n# CONFIG_FXOS8700_I2C is not set\n# CONFIG_FXOS8700_SPI is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_ICM42600_I2C is not set\n# CONFIG_INV_ICM42600_SPI is not set\n# CONFIG_INV_MPU6050_I2C is not set\n# CONFIG_INV_MPU6050_SPI is not set\n# CONFIG_IIO_ST_LSM6DSX is not set\n# CONFIG_IIO_ST_LSM9DS0 is not set\n# end of Inertial measurement units\n\n#\n# Light sensors\n#\n# CONFIG_ACPI_ALS is not set\n# CONFIG_ADJD_S311 is not set\n# CONFIG_ADUX1020 is not set\n# CONFIG_AL3010 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_AS73211 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_BH1780 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM3605 is not set\n# CONFIG_CM36651 is not set\n# CONFIG_GP2AP002 is not set\n# CONFIG_GP2AP020A00F is not set\n# CONFIG_SENSORS_ISL29018 is not set\n# CONFIG_SENSORS_ISL29028 is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_LTRF216A is not set\n# CONFIG_LV0104CS is not set\n# CONFIG_MAX44000 is not set\n# CONFIG_MAX44009 is not set\n# CONFIG_NOA1305 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_SI1133 is not set\n# CONFIG_SI1145 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_ST_UVIS25 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\n# CONFIG_SENSORS_TSL2563 is not set\n# CONFIG_TSL2583 is not set\n# CONFIG_TSL2591 is not set\n# CONFIG_TSL2772 is not set\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VCNL4035 is not set\n# CONFIG_VEML6030 is not set\n# CONFIG_VEML6070 is not set\n# CONFIG_VL6180 is not set\n# CONFIG_ZOPT2201 is not set\n# end of Light sensors\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8974 is not set\n# CONFIG_AK8975 is not set\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN_I2C is not set\n# CONFIG_BMC150_MAGN_SPI is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n# CONFIG_SENSORS_RM3100_I2C is not set\n# CONFIG_SENSORS_RM3100_SPI is not set\n# CONFIG_YAMAHA_YAS530 is not set\n# end of Magnetometer sensors\n\n#\n# Multiplexers\n#\n# CONFIG_IIO_MUX is not set\n# end of Multiplexers\n\n#\n# Inclinometer sensors\n#\n# end of Inclinometer sensors\n\n#\n# Linear and angular position sensors\n#\n# end of Linear and angular position sensors\n\n#\n# Digital potentiometers\n#\n# CONFIG_AD5110 is not set\n# CONFIG_AD5272 is not set\n# CONFIG_DS1803 is not set\n# CONFIG_MAX5432 is not set\n# CONFIG_MAX5481 is not set\n# CONFIG_MAX5487 is not set\n# CONFIG_MCP4018 is not set\n# CONFIG_MCP4131 is not set\n# CONFIG_MCP4531 is not set\n# CONFIG_MCP41010 is not set\n# CONFIG_TPL0102 is not set\n# end of Digital potentiometers\n\n#\n# Digital potentiostats\n#\n# CONFIG_LMP91000 is not set\n# end of Digital potentiostats\n\n#\n# Pressure sensors\n#\n# CONFIG_ABP060MG is not set\n# CONFIG_BMP280 is not set\n# CONFIG_DLHL60D is not set\n# CONFIG_DPS310 is not set\n# CONFIG_HP03 is not set\n# CONFIG_ICP10100 is not set\n# CONFIG_MPL115_I2C is not set\n# CONFIG_MPL115_SPI is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n# CONFIG_HP206C is not set\n# CONFIG_ZPA2326 is not set\n# end of Pressure sensors\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n# end of Lightning sensors\n\n#\n# Proximity and distance sensors\n#\n# CONFIG_ISL29501 is not set\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_MB1232 is not set\n# CONFIG_PING is not set\n# CONFIG_RFD77402 is not set\n# CONFIG_SRF04 is not set\n# CONFIG_SX9310 is not set\n# CONFIG_SX9324 is not set\n# CONFIG_SX9360 is not set\n# CONFIG_SX9500 is not set\n# CONFIG_SRF08 is not set\n# CONFIG_VCNL3020 is not set\n# CONFIG_VL53L0X_I2C is not set\n# end of Proximity and distance sensors\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1200 is not set\n# end of Resolver to digital converters\n\n#\n# Temperature sensors\n#\n# CONFIG_LTC2983 is not set\n# CONFIG_MAXIM_THERMOCOUPLE is not set\n# CONFIG_MLX90614 is not set\n# CONFIG_MLX90632 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TMP007 is not set\n# CONFIG_TMP117 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\n# CONFIG_MAX31856 is not set\n# CONFIG_MAX31865 is not set\n# end of Temperature sensors\n\n# CONFIG_NTB is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_DEBUG is not set\n# CONFIG_PWM_ATMEL_TCB is not set\n# CONFIG_PWM_CLK is not set\n# CONFIG_PWM_DWC is not set\n# CONFIG_PWM_FSL_FTM is not set\n# CONFIG_PWM_PCA9685 is not set\n# CONFIG_PWM_XILINX is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\nCONFIG_ARM_GIC_V2M=y\nCONFIG_ARM_GIC_V3=y\nCONFIG_ARM_GIC_V3_ITS=y\nCONFIG_ARM_GIC_V3_ITS_PCI=y\n# CONFIG_AL_FIC is not set\n# CONFIG_XILINX_INTC is not set\nCONFIG_PARTITION_PERCPU=y\n# CONFIG_QCOM_IRQ_COMBINER is not set\n# CONFIG_QCOM_PDC is not set\n# CONFIG_QCOM_MPM is not set\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\nCONFIG_RESET_CONTROLLER=y\n# CONFIG_RESET_QCOM_AOSS is not set\n# CONFIG_RESET_QCOM_PDC is not set\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_RESET_TI_TPS380X is not set\n\n#\n# PHY Subsystem\n#\nCONFIG_GENERIC_PHY=y\nCONFIG_PHY_XGENE=y\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\n\n#\n# PHY drivers for Broadcom platforms\n#\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# end of PHY drivers for Broadcom platforms\n\n# CONFIG_PHY_CADENCE_TORRENT is not set\n# CONFIG_PHY_CADENCE_DPHY is not set\n# CONFIG_PHY_CADENCE_DPHY_RX is not set\n# CONFIG_PHY_CADENCE_SIERRA is not set\n# CONFIG_PHY_CADENCE_SALVO is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_LAN966X_SERDES is not set\n# CONFIG_PHY_CPCAP_USB is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\n# CONFIG_PHY_OCELOT_SERDES is not set\nCONFIG_PHY_QCOM_APQ8064_SATA=y\n# CONFIG_PHY_QCOM_EDP is not set\n# CONFIG_PHY_QCOM_IPQ4019_USB is not set\nCONFIG_PHY_QCOM_IPQ806X_SATA=y\n# CONFIG_PHY_QCOM_PCIE2 is not set\nCONFIG_PHY_QCOM_QMP=y\nCONFIG_PHY_QCOM_QUSB2=y\nCONFIG_PHY_QCOM_USB_HS=y\n# CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2 is not set\nCONFIG_PHY_QCOM_USB_HSIC=y\n# CONFIG_PHY_QCOM_USB_HS_28NM is not set\n# CONFIG_PHY_QCOM_USB_SS is not set\n# CONFIG_PHY_QCOM_IPQ806X_USB is not set\nCONFIG_PHY_SAMSUNG_USB2=y\n# CONFIG_PHY_TUSB1210 is not set\n# end of PHY Subsystem\n\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\n# CONFIG_ARM_CMN is not set\nCONFIG_ARM_PMU=y\nCONFIG_ARM_PMU_ACPI=y\n# CONFIG_ARM_SMMU_V3_PMU is not set\n# CONFIG_ARM_DSU_PMU is not set\n# CONFIG_QCOM_L2_PMU is not set\n# CONFIG_QCOM_L3_PMU is not set\n# CONFIG_ARM_SPE_PMU is not set\n# CONFIG_ARM_DMC620_PMU is not set\n# CONFIG_ALIBABA_UNCORE_DRW_PMU is not set\n# CONFIG_HISI_PMU is not set\n# CONFIG_HISI_PCIE_PMU is not set\n# CONFIG_HNS3_PMU is not set\n# end of Performance monitor support\n\nCONFIG_RAS=y\n# CONFIG_USB4 is not set\n\n#\n# Android\n#\n# CONFIG_ANDROID_BINDER_IPC is not set\n# end of Android\n\n# CONFIG_LIBNVDIMM is not set\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\n# CONFIG_NVMEM_QCOM_QFPROM is not set\n# CONFIG_NVMEM_RMEM is not set\n# CONFIG_NVMEM_SPMI_SDAM is not set\nCONFIG_NVMEM_U_BOOT_ENV=m\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# CONFIG_HISI_PTT is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\n# CONFIG_TEE is not set\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\n# CONFIG_PECI is not set\n# CONFIG_HTE is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_VALIDATE_FS_PARSER=y\nCONFIG_FS_IOMAP=y\nCONFIG_EXT2_FS=y\nCONFIG_EXT2_FS_XATTR=y\nCONFIG_EXT2_FS_POSIX_ACL=y\nCONFIG_EXT2_FS_SECURITY=y\nCONFIG_EXT3_FS=y\nCONFIG_EXT3_FS_POSIX_ACL=y\nCONFIG_EXT3_FS_SECURITY=y\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\n# CONFIG_REISERFS_FS is not set\n# CONFIG_JFS_FS is not set\n# CONFIG_XFS_FS is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=y\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\n# CONFIG_F2FS_FS is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\nCONFIG_FANOTIFY_ACCESS_PERMISSIONS=y\nCONFIG_QUOTA=y\n# CONFIG_QUOTA_NETLINK_INTERFACE is not set\nCONFIG_PRINT_QUOTA_WARNING=y\n# CONFIG_QUOTA_DEBUG is not set\n# CONFIG_QFMT_V1 is not set\n# CONFIG_QFMT_V2 is not set\nCONFIG_QUOTACTL=y\nCONFIG_AUTOFS4_FS=y\nCONFIG_AUTOFS_FS=y\nCONFIG_FUSE_FS=m\nCONFIG_CUSE=m\n# CONFIG_VIRTIO_FS is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_XINO_AUTO is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n\n#\n# Caches\n#\n# CONFIG_FSCACHE is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\n# CONFIG_ISO9660_FS is not set\n# CONFIG_UDF_FS is not set\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\nCONFIG_MSDOS_FS=y\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=m\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=m\n# CONFIG_NTFS3_64BIT_CLUSTER is not set\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\n# CONFIG_PROC_KCORE is not set\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_TMPFS_INODE64 is not set\nCONFIG_ARCH_SUPPORTS_HUGETLBFS=y\n# CONFIG_HUGETLBFS is not set\nCONFIG_ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP=y\nCONFIG_MEMFD_CREATE=y\nCONFIG_ARCH_HAS_GIGANTIC_PAGE=y\nCONFIG_CONFIGFS_FS=y\nCONFIG_EFIVAR_FS=y\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\n# CONFIG_HFS_FS is not set\n# CONFIG_HFSPLUS_FS is not set\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_JFFS2_FS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\n# CONFIG_SQUASHFS_FILE_CACHE is not set\nCONFIG_SQUASHFS_FILE_DIRECT=y\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\nCONFIG_SQUASHFS_XATTR=y\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\n# CONFIG_PSTORE is not set\n# CONFIG_SYSV_FS is not set\nCONFIG_UFS_FS=y\n# CONFIG_UFS_FS_WRITE is not set\nCONFIG_UFS_DEBUG=y\n# CONFIG_EROFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\n# CONFIG_NFS_V4_1_MIGRATION is not set\nCONFIG_NFS_V4_SECURITY_LABEL=y\nCONFIG_ROOT_NFS=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFS_DISABLE_UDP_SUPPORT=y\n# CONFIG_NFS_V4_2_READ_PLUS is not set\nCONFIG_NFSD=m\nCONFIG_NFSD_V2_ACL=y\nCONFIG_NFSD_V3_ACL=y\n# CONFIG_NFSD_V4 is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_ACL_SUPPORT=m\nCONFIG_NFS_COMMON=y\nCONFIG_NFS_V4_2_SSC_HELPER=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\n# CONFIG_CIFS is not set\n# CONFIG_SMB_SERVER is not set\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_KEYS_REQUEST_CACHE is not set\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_BIG_KEYS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\nCONFIG_KEY_DH_OPERATIONS=y\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\nCONFIG_SECURITY=y\nCONFIG_SECURITYFS=y\n# CONFIG_SECURITY_NETWORK is not set\n# CONFIG_SECURITY_PATH is not set\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\n# CONFIG_SECURITY_SMACK is not set\n# CONFIG_SECURITY_TOMOYO is not set\n# CONFIG_SECURITY_APPARMOR is not set\n# CONFIG_SECURITY_LOADPIN is not set\n# CONFIG_SECURITY_YAMA is not set\n# CONFIG_SECURITY_SAFESETID is not set\n# CONFIG_SECURITY_LOCKDOWN_LSM is not set\n# CONFIG_SECURITY_LANDLOCK is not set\nCONFIG_INTEGRITY=y\n# CONFIG_INTEGRITY_SIGNATURE is not set\nCONFIG_INTEGRITY_AUDIT=y\n# CONFIG_IMA is not set\n# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set\n# CONFIG_EVM is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_LSM=\"yama,loadpin,safesetid,integrity\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_GCC_PLUGIN_STACKLEAK is not set\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n\nCONFIG_RANDSTRUCT_NONE=y\n# CONFIG_RANDSTRUCT_FULL is not set\n# CONFIG_RANDSTRUCT_PERFORMANCE is not set\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=y\nCONFIG_ASYNC_TX_DISABLE_PQ_VAL_DMA=y\nCONFIG_ASYNC_TX_DISABLE_XOR_VAL_DMA=y\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_CRYPTD=y\nCONFIG_CRYPTO_AUTHENC=y\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_ENGINE=m\n# end of Crypto core or helper\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_DH=y\n# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set\nCONFIG_CRYPTO_ECC=y\nCONFIG_CRYPTO_ECDH=y\n# CONFIG_CRYPTO_ECDSA is not set\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\n# CONFIG_CRYPTO_CURVE25519 is not set\n# end of Public-key cryptography\n\n#\n# Block ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\n# CONFIG_CRYPTO_ARIA is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\nCONFIG_CRYPTO_SM4=y\n# CONFIG_CRYPTO_SM4_GENERIC is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n# end of Block ciphers\n\n#\n# Length-preserving ciphers and modes\n#\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_ARC4 is not set\n# CONFIG_CRYPTO_CHACHA20 is not set\nCONFIG_CRYPTO_CBC=y\n# CONFIG_CRYPTO_CFB is not set\nCONFIG_CRYPTO_CTR=y\n# CONFIG_CRYPTO_CTS is not set\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_HCTR2 is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_OFB is not set\n# CONFIG_CRYPTO_PCBC is not set\n# CONFIG_CRYPTO_XTS is not set\nCONFIG_CRYPTO_NHPOLY1305=y\n# end of Length-preserving ciphers and modes\n\n#\n# AEAD (authenticated encryption with associated data) ciphers\n#\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\n# CONFIG_CRYPTO_ESSIV is not set\n# end of AEAD (authenticated encryption with associated data) ciphers\n\n#\n# Hashes, digests, and MACs\n#\nCONFIG_CRYPTO_BLAKE2B=y\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\nCONFIG_CRYPTO_MICHAEL_MIC=y\nCONFIG_CRYPTO_POLYVAL=y\n# CONFIG_CRYPTO_POLY1305 is not set\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\nCONFIG_CRYPTO_SM3=y\n# CONFIG_CRYPTO_SM3_GENERIC is not set\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_VMAC is not set\n# CONFIG_CRYPTO_WP512 is not set\n# CONFIG_CRYPTO_XCBC is not set\nCONFIG_CRYPTO_XXHASH=y\n# end of Hashes, digests, and MACs\n\n#\n# CRCs (cyclic redundancy checks)\n#\nCONFIG_CRYPTO_CRC32C=y\n# CONFIG_CRYPTO_CRC32 is not set\nCONFIG_CRYPTO_CRCT10DIF=y\nCONFIG_CRYPTO_CRC64_ROCKSOFT=y\n# end of CRCs (cyclic redundancy checks)\n\n#\n# Compression\n#\n# CONFIG_CRYPTO_DEFLATE is not set\n# CONFIG_CRYPTO_LZO is not set\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n# end of Compression\n\n#\n# Random number generation\n#\nCONFIG_CRYPTO_ANSI_CPRNG=y\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_KDF800108_CTR=y\n# end of Random number generation\n\n#\n# Userspace interface\n#\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\nCONFIG_CRYPTO_USER_API_RNG=y\n# CONFIG_CRYPTO_USER_API_RNG_CAVP is not set\nCONFIG_CRYPTO_USER_API_AEAD=y\nCONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y\n# end of Userspace interface\n\nCONFIG_CRYPTO_HASH_INFO=y\nCONFIG_CRYPTO_NHPOLY1305_NEON=y\nCONFIG_CRYPTO_CHACHA20_NEON=y\n\n#\n# Accelerated Cryptographic Algorithms for CPU (arm64)\n#\nCONFIG_CRYPTO_GHASH_ARM64_CE=y\nCONFIG_CRYPTO_POLY1305_NEON=y\nCONFIG_CRYPTO_SHA1_ARM64_CE=y\nCONFIG_CRYPTO_SHA256_ARM64=y\nCONFIG_CRYPTO_SHA2_ARM64_CE=y\nCONFIG_CRYPTO_SHA512_ARM64=y\nCONFIG_CRYPTO_SHA512_ARM64_CE=y\n# CONFIG_CRYPTO_SHA3_ARM64 is not set\nCONFIG_CRYPTO_SM3_NEON=y\n# CONFIG_CRYPTO_SM3_ARM64_CE is not set\nCONFIG_CRYPTO_POLYVAL_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64=y\nCONFIG_CRYPTO_AES_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64_CE_BLK=y\nCONFIG_CRYPTO_AES_ARM64_NEON_BLK=y\nCONFIG_CRYPTO_AES_ARM64_BS=y\n# CONFIG_CRYPTO_SM4_ARM64_CE is not set\nCONFIG_CRYPTO_SM4_ARM64_CE_BLK=y\nCONFIG_CRYPTO_SM4_ARM64_NEON_BLK=y\nCONFIG_CRYPTO_AES_ARM64_CE_CCM=y\nCONFIG_CRYPTO_CRCT10DIF_ARM64_CE=y\n# end of Accelerated Cryptographic Algorithms for CPU (arm64)\n\nCONFIG_CRYPTO_HW=y\n# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set\n# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set\n# CONFIG_CRYPTO_DEV_CCP is not set\n# CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set\n# CONFIG_CRYPTO_DEV_QAT_C3XXX is not set\n# CONFIG_CRYPTO_DEV_QAT_C62X is not set\n# CONFIG_CRYPTO_DEV_QAT_4XXX is not set\n# CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set\n# CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set\n# CONFIG_CRYPTO_DEV_QAT_C62XVF is not set\n# CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set\n# CONFIG_CRYPTO_DEV_CAVIUM_ZIP is not set\n# CONFIG_CRYPTO_DEV_QCE is not set\n# CONFIG_CRYPTO_DEV_QCOM_RNG is not set\nCONFIG_CRYPTO_DEV_VIRTIO=m\n# CONFIG_CRYPTO_DEV_SAFEXCEL is not set\n# CONFIG_CRYPTO_DEV_CCREE is not set\n# CONFIG_CRYPTO_DEV_HISI_SEC is not set\n# CONFIG_CRYPTO_DEV_HISI_SEC2 is not set\n# CONFIG_CRYPTO_DEV_HISI_ZIP is not set\n# CONFIG_CRYPTO_DEV_HISI_HPRE is not set\n# CONFIG_CRYPTO_DEV_HISI_TRNG is not set\n# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n# CONFIG_FIPS_SIGNATURE_SELFTEST is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=y\nCONFIG_RAID6_PQ_BENCHMARK=y\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\n# CONFIG_CORDIC is not set\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_ARCH_HAS_FAST_MULTIPLIER=y\nCONFIG_ARCH_USE_SYM_ANNOTATIONS=y\n# CONFIG_INDIRECT_PIO is not set\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_UTILS=y\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=y\nCONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CHACHA_GENERIC=y\nCONFIG_CRYPTO_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=y\nCONFIG_CRYPTO_LIB_CURVE25519=y\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_POLY1305_GENERIC=y\nCONFIG_CRYPTO_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=y\nCONFIG_CRYPTO_LIB_SHA1=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_CRC_CCITT=m\nCONFIG_CRC16=y\nCONFIG_CRC_T10DIF=y\nCONFIG_CRC64_ROCKSOFT=y\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\nCONFIG_CRC64=y\n# CONFIG_CRC4 is not set\nCONFIG_CRC7=y\nCONFIG_LIBCRC32C=y\nCONFIG_CRC8=y\nCONFIG_XXHASH=y\nCONFIG_AUDIT_GENERIC=y\nCONFIG_AUDIT_ARCH_COMPAT_GENERIC=y\nCONFIG_AUDIT_COMPAT_GENERIC=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=y\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMMON=y\nCONFIG_ZSTD_COMPRESS=y\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\nCONFIG_XZ_DEC_X86=y\nCONFIG_XZ_DEC_POWERPC=y\nCONFIG_XZ_DEC_IA64=y\nCONFIG_XZ_DEC_ARM=y\nCONFIG_XZ_DEC_ARMTHUMB=y\nCONFIG_XZ_DEC_SPARC=y\n# CONFIG_XZ_DEC_MICROLZMA is not set\nCONFIG_XZ_DEC_BCJ=y\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_GZIP=y\nCONFIG_DECOMPRESS_ZSTD=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_TEXTSEARCH=y\nCONFIG_TEXTSEARCH_KMP=m\nCONFIG_INTERVAL_TREE=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_DMA_OPS=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_DMA_DECLARE_COHERENT=y\nCONFIG_ARCH_HAS_SETUP_DMA_OPS=y\nCONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y\nCONFIG_ARCH_HAS_DMA_PREP_COHERENT=y\nCONFIG_SWIOTLB=y\n# CONFIG_DMA_RESTRICTED_POOL is not set\nCONFIG_DMA_NONCOHERENT_MMAP=y\nCONFIG_DMA_COHERENT_POOL=y\nCONFIG_DMA_DIRECT_REMAP=y\nCONFIG_DMA_CMA=y\n# CONFIG_DMA_PERNUMA_CMA is not set\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=128\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\n# CONFIG_FORCE_NR_CPUS is not set\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_UCS2_STRING=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_GENERIC_VDSO_TIME_NS=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\nCONFIG_SG_POOL=y\nCONFIG_ARCH_STACKWALK=y\nCONFIG_STACKDEPOT=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_GENERIC_IOREMAP=y\nCONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\n# CONFIG_STACKTRACE_BUILD_ID is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\nCONFIG_DYNAMIC_DEBUG_CORE=y\nCONFIG_SYMBOLIC_ERRNAME=y\nCONFIG_DEBUG_BUGVERBOSE=y\n# end of printk and dmesg options\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_DEBUG_INFO=y\nCONFIG_AS_HAS_NON_CONST_LEB128=y\n# CONFIG_DEBUG_INFO_NONE is not set\nCONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\n# CONFIG_DEBUG_INFO_REDUCED is not set\n# CONFIG_DEBUG_INFO_COMPRESSED is not set\n# CONFIG_DEBUG_INFO_SPLIT is not set\n# CONFIG_DEBUG_INFO_BTF is not set\n# CONFIG_GDB_SCRIPTS is not set\nCONFIG_FRAME_WARN=2048\n# CONFIG_STRIP_ASM_SYMS is not set\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=\"\"\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\nCONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_KCSAN_COMPILER=y\n# end of Generic Kernel Debugging Instruments\n\n#\n# Networking Debugging\n#\n# CONFIG_NET_DEV_REFCNT_TRACKER is not set\n# CONFIG_NET_NS_REFCNT_TRACKER is not set\n# CONFIG_DEBUG_NET is not set\n# end of Networking Debugging\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_TABLE_CHECK is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\nCONFIG_ARCH_HAS_DEBUG_WX=y\n# CONFIG_DEBUG_WX is not set\nCONFIG_GENERIC_PTDUMP=y\n# CONFIG_PTDUMP_DEBUGFS is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SHRINKER_DEBUG is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\nCONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y\n# CONFIG_DEBUG_VM is not set\n# CONFIG_DEBUG_VM_PGTABLE is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\nCONFIG_DEBUG_MEMORY_INIT=y\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_SW_TAGS=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_KASAN_SW_TAGS=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\n# CONFIG_SOFTLOCKUP_DETECTOR is not set\nCONFIG_DETECT_HUNG_TASK=y\nCONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120\n# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\nCONFIG_SCHED_DEBUG=y\nCONFIG_SCHED_INFO=y\nCONFIG_SCHEDSTATS=y\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\n# CONFIG_DEBUG_PREEMPT is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_RWSEMS is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# CONFIG_CSD_LOCK_WAIT_DEBUG is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_DEBUG_MAPLE_TREE is not set\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\nCONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACING_SUPPORT=y\n# CONFIG_FTRACE is not set\n# CONFIG_SAMPLES is not set\n# CONFIG_STRICT_DEVMEM is not set\n\n#\n# arm64 Debugging\n#\nCONFIG_PID_IN_CONTEXTIDR=y\n# CONFIG_DEBUG_EFI is not set\n# CONFIG_ARM64_RELOC_TEST is not set\nCONFIG_CORESIGHT=y\nCONFIG_CORESIGHT_LINKS_AND_SINKS=y\nCONFIG_CORESIGHT_LINK_AND_SINK_TMC=y\n# CONFIG_CORESIGHT_CATU is not set\nCONFIG_CORESIGHT_SINK_TPIU=y\nCONFIG_CORESIGHT_SINK_ETBV10=y\nCONFIG_CORESIGHT_SOURCE_ETM4X=y\n# CONFIG_ETM4X_IMPDEF_FEATURE is not set\n# CONFIG_CORESIGHT_STM is not set\n# CONFIG_CORESIGHT_CPU_DEBUG is not set\n# CONFIG_CORESIGHT_CTI is not set\n# CONFIG_CORESIGHT_TRBE is not set\n# end of arm64 Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\nCONFIG_RUNTIME_TESTING_MENU=y\n# CONFIG_LKDTM is not set\n# CONFIG_TEST_MIN_HEAP is not set\n# CONFIG_TEST_DIV64 is not set\n# CONFIG_BACKTRACE_SELF_TEST is not set\n# CONFIG_TEST_REF_TRACKER is not set\n# CONFIG_RBTREE_TEST is not set\n# CONFIG_REED_SOLOMON_TEST is not set\n# CONFIG_INTERVAL_TREE_TEST is not set\n# CONFIG_PERCPU_TEST is not set\n# CONFIG_ATOMIC64_SELFTEST is not set\n# CONFIG_TEST_HEXDUMP is not set\n# CONFIG_STRING_SELFTEST is not set\n# CONFIG_TEST_STRING_HELPERS is not set\n# CONFIG_TEST_STRSCPY is not set\n# CONFIG_TEST_KSTRTOX is not set\n# CONFIG_TEST_PRINTF is not set\n# CONFIG_TEST_SCANF is not set\n# CONFIG_TEST_BITMAP is not set\n# CONFIG_TEST_UUID is not set\n# CONFIG_TEST_XARRAY is not set\n# CONFIG_TEST_MAPLE_TREE is not set\n# CONFIG_TEST_RHASHTABLE is not set\n# CONFIG_TEST_SIPHASH is not set\n# CONFIG_TEST_IDA is not set\n# CONFIG_TEST_LKM is not set\n# CONFIG_TEST_BITOPS is not set\n# CONFIG_TEST_VMALLOC is not set\n# CONFIG_TEST_USER_COPY is not set\n# CONFIG_TEST_BPF is not set\n# CONFIG_TEST_BLACKHOLE_DEV is not set\n# CONFIG_FIND_BIT_BENCHMARK is not set\n# CONFIG_TEST_FIRMWARE is not set\n# CONFIG_TEST_SYSCTL is not set\n# CONFIG_TEST_UDELAY is not set\n# CONFIG_TEST_STATIC_KEYS is not set\n# CONFIG_TEST_DYNAMIC_DEBUG is not set\n# CONFIG_TEST_KMOD is not set\n# CONFIG_TEST_MEMCAT_P is not set\n# CONFIG_TEST_MEMINIT is not set\n# CONFIG_TEST_FREE_PAGES is not set\nCONFIG_ARCH_USE_MEMTEST=y\nCONFIG_MEMTEST=y\n# end of Kernel Testing and Coverage\n\n#\n# Rust hacking\n#\n# end of Rust hacking\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/Qualcomm/devices/Dragonboard/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc+fp+simd\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_FLOAT=hard\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"neon-fp-armv8\"\n        ;;\n    esac\n\n  # Bootloader to use (syslinux / u-boot / atv-bootloader / bcm2835-bootloader)\n    BOOTLOADER=\"u-boot\"\n\n  # U-Boot firmware package(s) to use (this is a bit of a hack as mkbootimg isn't firmware but is needed by the host to build the u-boot uImage)\n    UBOOT_FIRMWARE=\"mkbootimg:host\"\n\n  # Kernel target\n    KERNEL_TARGET=\"Image\"\n\n  # Kernel uImage load address\n    KERNEL_UIMAGE_LOADADDR=\"0x80080000\"\n\n  # Kernel uImage entry address\n    KERNEL_UIMAGE_ENTRYADDR=\"0x80080000\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"dtbs\"\n\n  # Kernel to use. values can be:\n  # default:  default mainline kernel\n    LINUX=\"default\"\n\n################################################################################\n# setup build defaults\n################################################################################\n\n  # Project CFLAGS\n    PROJECT_CFLAGS=\"\"\n\n  # SquashFS compression method (gzip / lzo / xz)\n    SQUASHFS_COMPRESSION=\"zstd\"\n\n################################################################################\n# setup project defaults\n################################################################################\n\n  # OpenGL(X) implementation to use (no / Mesa)\n    OPENGL=\"no\"\n\n  # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q / opengl-meson6)\n    OPENGLES=\"mesa\"\n\n  # Vulkan implementation to use (vulkan-loader / no)\n    VULKAN=\"no\"\n\n  # include uvesafb support (yes / no)\n    UVESAFB_SUPPORT=\"no\"\n\n  # Displayserver to use (wl / no)\n    DISPLAYSERVER=\"no\"\n\n  # Windowmanager to use (weston / no)\n    WINDOWMANAGER=\"no\"\n\n  # Xorg Graphic drivers to use (all / freedreno)\n  # Space separated list is supported,\n  # e.g. GRAPHIC_DRIVERS=\"freedreno\"\n    GRAPHIC_DRIVERS=\"freedreno\"\n\n  # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap / libamcodec)\n    KODIPLAYER_DRIVER=\"mesa\"\n\n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"misc-firmware wlan-firmware dvb-firmware firmware-dragonboard\"\n\n  # build and install driver addons (yes / no)\n    DRIVER_ADDONS_SUPPORT=\"no\"\n\n  # driver addons to install:\n  # for a list of additional drivers see packages/linux-driver-addons\n  # Space separated list is supported,\n    DRIVER_ADDONS=\"crazycat dvb-latest\"\n\n  # build with installer (yes / no)\n    INSTALLER_SUPPORT=\"no\"\n\n  # kernel serial console\n    EXTRA_CMDLINE=\"console=ttyMSM0,115200n8 console=tty0\"\n\n  # debug tty path\n    DEBUG_TTY=\"/dev/ttyMSM0\"\n\n  # set the addon project\n    ADDON_PROJECT=\"ARMv8\"\n"
  },
  {
    "path": "projects/Qualcomm/devices/Dragonboard/packages/mkbootimg/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"mkbootimg\"\nPKG_VERSION=\"1.6.0\"\nPKG_SHA256=\"7930b7dba25e5b4a39e6d19ccce9005e17c98a2b6c9e1aa6408a88c716755aaf\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://source.codeaurora.org/quic/kernel/skales/\"\nPKG_URL=\"https://source.codeaurora.org/quic/kernel/skales/snapshot/$PKG_VERSION.tar.xz\"\nPKG_DEPENDS_HOST=\"dtc:host\"\nPKG_LONGDESC=\"mkbootimg: Creates kernel boot images for Android\"\nPKG_TOOLCHAIN=\"manual\"\n\nmake_host() {\n  sed \"s|libfdt.so|$TOOLCHAIN/lib/libfdt.so|\" -i dtbTool\n}\n\nmakeinstall_host() {\n  cp mkbootimg $TOOLCHAIN/bin/\n  cp dtbTool $TOOLCHAIN/bin/\n}\n"
  },
  {
    "path": "projects/Qualcomm/devices/Dragonboard/packages/mkbootimg/patches/mkbootimg-0001-add-extra-devices.patch",
    "content": "diff -Naur a/dtbTool b/dtbTool\n--- a/dtbTool\t2017-02-01 14:07:03.000000000 -0800\n+++ b/dtbTool\t2017-10-23 22:32:17.090949808 -0700\n@@ -84,6 +84,7 @@\n \t\t'apq8096'        : 291,\n \t\t'msm8998'        : 292,\n \t\t'msm8996sg'      : 305,\n+\t\t'ipq8074'        : 306,\n \t}\n \n platform_type = {\n@@ -108,6 +109,7 @@\n \t\t'stp'         : 23,\n \t\t'sbc'         : 24,\n \t\t'cls'         : 29,\n+\t\t'hk01'        : 30,\n \t\t}\n \n pmic_ids = {\n"
  },
  {
    "path": "projects/Qualcomm/devices/Dragonboard/patches/linux/linux-0001-set-default-mac.patch",
    "content": "diff -Naur a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi\n--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi\t2017-05-10 06:07:46.000000000 -0700\n+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi\t2017-06-01 11:45:44.805705640 -0700\n@@ -1177,6 +1177,7 @@\n \t\t\t\t\t\tinterrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>,\n \t\t\t\t\t\t\t     <0 146 IRQ_TYPE_LEVEL_HIGH>;\n \t\t\t\t\t\tinterrupt-names = \"tx\", \"rx\";\n+\t\t\t\t\t\tlocal-mac-address = [02 00 27 60 25 28];\n \n \t\t\t\t\t\tqcom,smem-states = <&apps_smsm 10>, <&apps_smsm 9>;\n \t\t\t\t\t\tqcom,smem-state-names = \"tx-enable\", \"tx-rings-empty\";\n"
  },
  {
    "path": "projects/RPi/devices/RPi/config/distroconfig.txt",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!\ndisplay_auto_detect=1\ndtoverlay=vc4-kms-v3d,cma-128\ndtoverlay=\ndisable_overscan=1\ndisable_fw_kms_setup=1\n"
  },
  {
    "path": "projects/RPi/devices/RPi/kodi/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n  <section id=\"system\">\n    <category id=\"display\">\n      <group id=\"1\">\n        <setting id=\"videoscreen.limitguisize\">\n          <default>3</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n</settings>\n"
  },
  {
    "path": "projects/RPi/devices/RPi/linux/linux.arm.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm 6.1.66 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"arm-linux-gnueabihf-gcc (GCC) 13.0.0 20220604 (experimental) [master revision aec868578d8515763d75693c1fdfbc30ff0a1e68]\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=130000\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23850\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23850\nCONFIG_LLD_VERSION=0\nCONFIG_CC_CAN_LINK=y\nCONFIG_CC_CAN_LINK_STATIC=y\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_BROKEN_ON_SMP=y\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_BUILD_SALT=\"\"\nCONFIG_HAVE_KERNEL_GZIP=y\nCONFIG_HAVE_KERNEL_LZMA=y\nCONFIG_HAVE_KERNEL_XZ=y\nCONFIG_HAVE_KERNEL_LZO=y\nCONFIG_HAVE_KERNEL_LZ4=y\nCONFIG_KERNEL_GZIP=y\n# CONFIG_KERNEL_LZMA is not set\n# CONFIG_KERNEL_XZ is not set\n# CONFIG_KERNEL_LZO is not set\n# CONFIG_KERNEL_LZ4 is not set\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\n# CONFIG_WATCH_QUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_GENERIC_IRQ_MULTI_HANDLER=y\nCONFIG_GENERIC_CLOCKEVENTS=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\n# CONFIG_BPF_JIT is not set\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# end of BPF subsystem\n\nCONFIG_PREEMPT_VOLUNTARY_BUILD=y\n# CONFIG_PREEMPT_NONE is not set\nCONFIG_PREEMPT_VOLUNTARY=y\n# CONFIG_PREEMPT is not set\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\n# CONFIG_BSD_PROCESS_ACCT is not set\n# CONFIG_TASKSTATS is not set\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\n#\n# RCU Subsystem\n#\nCONFIG_TINY_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TINY_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_RUDE_RCU=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_NEED_SEGCBLIST=y\n# end of RCU Subsystem\n\nCONFIG_IKCONFIG=m\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=17\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# end of Scheduler features\n\nCONFIG_CC_IMPLICIT_FALLTHROUGH=\"-Wimplicit-fallthrough=5\"\nCONFIG_GCC11_NO_ARRAY_BOUNDS=y\nCONFIG_CC_NO_ARRAY_BOUNDS=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\n# CONFIG_CGROUP_FAVOR_DYNMODS is not set\nCONFIG_MEMCG=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_BLK_CGROUP=y\nCONFIG_CGROUP_WRITEBACK=y\nCONFIG_CGROUP_SCHED=y\n# CONFIG_FAIR_GROUP_SCHED is not set\n# CONFIG_RT_GROUP_SCHED is not set\n# CONFIG_CGROUP_PIDS is not set\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\n# CONFIG_CGROUP_PERF is not set\nCONFIG_CGROUP_BPF=y\n# CONFIG_CGROUP_MISC is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_IPC_NS=y\n# CONFIG_USER_NS is not set\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_CHECKPOINT_RESTORE is not set\n# CONFIG_SCHED_AUTOGROUP is not set\n# CONFIG_SYSFS_DEPRECATED is not set\nCONFIG_RELAY=y\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"@INITRAMFS_SOURCE@\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\n# CONFIG_RD_GZIP is not set\n# CONFIG_RD_BZIP2 is not set\n# CONFIG_RD_LZMA is not set\n# CONFIG_RD_XZ is not set\n# CONFIG_RD_LZO is not set\n# CONFIG_RD_LZ4 is not set\n# CONFIG_RD_ZSTD is not set\nCONFIG_INITRAMFS_COMPRESSION_NONE=y\nCONFIG_BOOT_CONFIG=y\n# CONFIG_BOOT_CONFIG_EMBED is not set\nCONFIG_INITRAMFS_PRESERVE_MTIME=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_EXPERT=y\n# CONFIG_UID16 is not set\nCONFIG_MULTIUSER=y\n# CONFIG_SGETMASK_SYSCALL is not set\n# CONFIG_SYSFS_SYSCALL is not set\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\n# CONFIG_KALLSYMS_ALL is not set\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_DEBUG_RSEQ is not set\nCONFIG_EMBEDDED=y\nCONFIG_HAVE_PERF_EVENTS=y\nCONFIG_PERF_USE_VMALLOC=y\n# CONFIG_PC104 is not set\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_SYSTEM_DATA_VERIFICATION=y\nCONFIG_PROFILING=y\nCONFIG_TRACEPOINTS=y\n# end of General setup\n\nCONFIG_ARM=y\nCONFIG_ARM_HAS_GROUP_RELOCS=y\nCONFIG_SYS_SUPPORTS_APM_EMULATION=y\nCONFIG_HAVE_PROC_CPU=y\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_FIQ=y\nCONFIG_ARM_PATCH_PHYS_VIRT=y\nCONFIG_GENERIC_BUG=y\nCONFIG_PGTABLE_LEVELS=2\n\n#\n# System Type\n#\nCONFIG_MMU=y\nCONFIG_ARCH_MMAP_RND_BITS_MIN=8\nCONFIG_ARCH_MMAP_RND_BITS_MAX=15\nCONFIG_ARCH_MULTIPLATFORM=y\n\n#\n# Platform selection\n#\n\n#\n# CPU Core family selection\n#\nCONFIG_ARCH_MULTI_V6=y\n# CONFIG_ARCH_MULTI_V7 is not set\nCONFIG_ARCH_MULTI_V6_V7=y\n# end of Platform selection\n\n# CONFIG_ARCH_ASPEED is not set\nCONFIG_ARCH_BCM=y\n\n#\n# IPROC architected SoCs\n#\n\n#\n# KONA architected SoCs\n#\n\n#\n# Other Architectures\n#\nCONFIG_ARCH_BCM2835=y\nCONFIG_BCM2835_FAST_MEMCPY=y\n\n#\n# BCMBCA sub platforms\n#\n# CONFIG_ARCH_MXC is not set\n\n#\n# TI OMAP/AM/DM/DRA Family\n#\n# CONFIG_ARCH_OMAP2 is not set\n# end of TI OMAP/AM/DM/DRA Family\n\n# CONFIG_ARCH_OXNAS is not set\n# CONFIG_ARCH_S3C64XX is not set\n# CONFIG_ARCH_INTEGRATOR is not set\n# CONFIG_ARCH_REALVIEW is not set\n# CONFIG_ARCH_WM8750 is not set\n\n#\n# Processor Type\n#\nCONFIG_CPU_V6K=y\nCONFIG_CPU_THUMB_CAPABLE=y\nCONFIG_CPU_32v6=y\nCONFIG_CPU_32v6K=y\nCONFIG_CPU_ABRT_EV6=y\nCONFIG_CPU_PABRT_V6=y\nCONFIG_CPU_CACHE_V6=y\nCONFIG_CPU_CACHE_VIPT=y\nCONFIG_CPU_COPY_V6=y\nCONFIG_CPU_TLB_V6=y\nCONFIG_CPU_HAS_ASID=y\nCONFIG_CPU_CP15=y\nCONFIG_CPU_CP15_MMU=y\n\n#\n# Processor Features\n#\nCONFIG_ARM_THUMB=y\nCONFIG_CPU_LITTLE_ENDIAN=y\n# CONFIG_CPU_BIG_ENDIAN is not set\n# CONFIG_CPU_ICACHE_DISABLE is not set\n# CONFIG_CPU_DCACHE_DISABLE is not set\n# CONFIG_CPU_BPREDICT_DISABLE is not set\nCONFIG_KUSER_HELPERS=y\nCONFIG_MIGHT_HAVE_CACHE_L2X0=y\n# CONFIG_CACHE_L2X0 is not set\nCONFIG_ARM_L1_CACHE_SHIFT=5\nCONFIG_ARM_DMA_MEM_BUFFERABLE=y\nCONFIG_ARM_ERRATA_411920=y\n# end of System Type\n\n#\n# Bus support\n#\n# end of Bus support\n\n#\n# Kernel Features\n#\nCONFIG_CURRENT_POINTER_IN_TPIDRURO=y\nCONFIG_IRQSTACKS=y\n# CONFIG_VMSPLIT_3G is not set\n# CONFIG_VMSPLIT_3G_OPT is not set\nCONFIG_VMSPLIT_2G=y\n# CONFIG_VMSPLIT_1G is not set\nCONFIG_PAGE_OFFSET=0x80000000\nCONFIG_ARCH_NR_GPIO=0\nCONFIG_HZ_FIXED=0\n# CONFIG_HZ_100 is not set\n# CONFIG_HZ_200 is not set\n# CONFIG_HZ_250 is not set\nCONFIG_HZ_300=y\n# CONFIG_HZ_500 is not set\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=300\nCONFIG_SCHED_HRTICK=y\nCONFIG_AEABI=y\n# CONFIG_OABI_COMPAT is not set\nCONFIG_ARCH_SELECT_MEMORY_MODEL=y\nCONFIG_ARCH_FLATMEM_ENABLE=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\n# CONFIG_HIGHMEM is not set\n# CONFIG_CPU_SW_DOMAIN_PAN is not set\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_ARM_MODULE_PLTS=y\nCONFIG_ARCH_FORCE_MAX_ORDER=11\nCONFIG_ALIGNMENT_TRAP=y\nCONFIG_UACCESS_WITH_MEMCPY=y\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\nCONFIG_CC_HAVE_STACKPROTECTOR_TLS=y\nCONFIG_STACKPROTECTOR_PER_TASK=y\n# end of Kernel Features\n\n#\n# Boot options\n#\nCONFIG_USE_OF=y\nCONFIG_ATAGS=y\n# CONFIG_UNUSED_BOARD_FILES is not set\n# CONFIG_DEPRECATED_PARAM_STRUCT is not set\nCONFIG_ZBOOT_ROM_TEXT=0x0\nCONFIG_ZBOOT_ROM_BSS=0x0\n# CONFIG_ARM_APPENDED_DTB is not set\nCONFIG_CMDLINE=\"\"\n# CONFIG_KEXEC is not set\n# CONFIG_CRASH_DUMP is not set\nCONFIG_AUTO_ZRELADDR=y\n# CONFIG_EFI is not set\n# end of Boot options\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=y\n# CONFIG_CPU_FREQ_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\nCONFIG_CPUFREQ_DT_PLATDEV=y\nCONFIG_ARM_RASPBERRYPI_CPUFREQ=y\n# end of CPU Frequency scaling\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\nCONFIG_CPU_IDLE_GOV_LADDER=y\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\n\n#\n# ARM CPU Idle Drivers\n#\n# CONFIG_ARM_CPUIDLE is not set\n# end of ARM CPU Idle Drivers\n# end of CPU Idle\n# end of CPU Power Management\n\n#\n# Floating point emulation\n#\n\n#\n# At least one emulation must be selected\n#\nCONFIG_VFP=y\n# end of Floating point emulation\n\n#\n# Power management options\n#\n# CONFIG_SUSPEND is not set\n# CONFIG_HIBERNATION is not set\nCONFIG_PM=y\n# CONFIG_PM_DEBUG is not set\n# CONFIG_APM_EMULATION is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\n# end of Power management options\n\nCONFIG_AS_VFP_VMRS_FPINST=y\n\n#\n# General architecture-dependent options\n#\nCONFIG_KPROBES=y\nCONFIG_JUMP_LABEL=y\n# CONFIG_STATIC_KEYS_SELFTEST is not set\nCONFIG_OPTPROBES=y\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_ARCH_USE_BUILTIN_BSWAP=y\nCONFIG_KRETPROBES=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_HAVE_OPTPROBES=y\nCONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_KEEPINITRD=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_ARCH_HAS_CPU_FINALIZE_INIT=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_32BIT_OFF_T=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_ARCH_WANT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_LTO_NONE=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_REL=y\nCONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y\nCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_HAVE_EXIT_THREAD=y\nCONFIG_ARCH_MMAP_RND_BITS=8\nCONFIG_PAGE_SIZE_LESS_THAN_64KB=y\nCONFIG_PAGE_SIZE_LESS_THAN_256KB=y\nCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_ARCH_OPTIONAL_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\n# CONFIG_STRICT_KERNEL_RWX is not set\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\n# CONFIG_STRICT_MODULE_RWX is not set\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_HAVE_ARCH_PFN_VALID=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\nCONFIG_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/sbin/modprobe\"\n# CONFIG_TRIM_UNUSED_KSYMS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\nCONFIG_BLOCK_LEGACY_AUTOLOAD=y\nCONFIG_BLK_DEV_BSG_COMMON=y\nCONFIG_BLK_ICQ=y\nCONFIG_BLK_DEV_BSGLIB=y\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_DEV_ZONED is not set\n# CONFIG_BLK_DEV_THROTTLING is not set\n# CONFIG_BLK_WBT is not set\n# CONFIG_BLK_CGROUP_IOLATENCY is not set\n# CONFIG_BLK_CGROUP_IOCOST is not set\n# CONFIG_BLK_CGROUP_IOPRIO is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\nCONFIG_MAC_PARTITION=y\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\nCONFIG_LDM_PARTITION=y\n# CONFIG_LDM_DEBUG is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\n# CONFIG_CMDLINE_PARTITION is not set\n# end of Partition Types\n\nCONFIG_BLK_PM=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\nCONFIG_IOSCHED_BFQ=y\n# CONFIG_BFQ_GROUP_IOSCHED is not set\n# end of IO Schedulers\n\nCONFIG_ASN1=y\nCONFIG_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_INLINE_READ_UNLOCK=y\nCONFIG_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_INLINE_WRITE_UNLOCK=y\nCONFIG_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\n# CONFIG_BINFMT_ELF_FDPIC is not set\nCONFIG_ELFCORE=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\nCONFIG_ARCH_HAS_BINFMT_FLAT=y\n# CONFIG_BINFMT_FLAT is not set\nCONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\nCONFIG_SWAP=y\n# CONFIG_ZSWAP is not set\n\n#\n# SLAB allocator options\n#\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SLUB_STATS is not set\n# end of SLAB allocator options\n\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\n# CONFIG_COMPAT_BRK is not set\nCONFIG_SELECT_MEMORY_MODEL=y\nCONFIG_FLATMEM_MANUAL=y\n# CONFIG_SPARSEMEM_MANUAL is not set\nCONFIG_FLATMEM=y\nCONFIG_ARCH_KEEP_MEMBLOCK=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_COMPACTION=y\nCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1\n# CONFIG_PAGE_REPORTING is not set\nCONFIG_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_WANT_GENERAL_HUGETLB=y\nCONFIG_NEED_PER_CPU_KM=y\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\nCONFIG_CMA_DEBUGFS=y\n# CONFIG_CMA_SYSFS is not set\nCONFIG_CMA_AREAS=7\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y\nCONFIG_VM_EVENT_COUNTERS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_USERFAULTFD is not set\n# CONFIG_LRU_GEN is not set\nCONFIG_LOCK_MM_AND_FIND_VMA=y\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\n# CONFIG_XFRM_USER is not set\n# CONFIG_NET_KEY is not set\n# CONFIG_XDP_SOCKETS is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=m\nCONFIG_IP_MROUTE_COMMON=y\nCONFIG_IP_MROUTE=y\n# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set\n# CONFIG_IP_PIMSM_V1 is not set\n# CONFIG_IP_PIMSM_V2 is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\n# CONFIG_INET_ESP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=m\n# CONFIG_INET_DIAG is not set\nCONFIG_TCP_CONG_ADVANCED=y\n# CONFIG_TCP_CONG_BIC is not set\nCONFIG_TCP_CONG_CUBIC=y\n# CONFIG_TCP_CONG_WESTWOOD is not set\nCONFIG_TCP_CONG_HTCP=m\nCONFIG_TCP_CONG_HSTCP=m\n# CONFIG_TCP_CONG_HYBLA is not set\nCONFIG_TCP_CONG_VEGAS=m\n# CONFIG_TCP_CONG_NV is not set\nCONFIG_TCP_CONG_SCALABLE=m\n# CONFIG_TCP_CONG_LP is not set\nCONFIG_TCP_CONG_VENO=m\nCONFIG_TCP_CONG_YEAH=m\nCONFIG_TCP_CONG_ILLINOIS=m\n# CONFIG_TCP_CONG_DCTCP is not set\nCONFIG_TCP_CONG_CDG=m\n# CONFIG_TCP_CONG_BBR is not set\nCONFIG_DEFAULT_CUBIC=y\n# CONFIG_DEFAULT_RENO is not set\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_IPV6_VTI is not set\nCONFIG_IPV6_SIT=m\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\nCONFIG_IPV6_FOU=m\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_MPTCP is not set\n# CONFIG_NETWORK_SECMARK is not set\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\n# CONFIG_NETFILTER_INGRESS is not set\nCONFIG_NETFILTER_EGRESS=y\nCONFIG_NETFILTER_NETLINK=m\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\nCONFIG_NETFILTER_NETLINK_LOG=m\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\n# CONFIG_NF_LOG_SYSLOG is not set\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_ZONES is not set\n# CONFIG_NF_CONNTRACK_PROCFS is not set\n# CONFIG_NF_CONNTRACK_EVENTS is not set\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\n# CONFIG_NF_CT_PROTO_DCCP is not set\n# CONFIG_NF_CT_PROTO_SCTP is not set\n# CONFIG_NF_CT_PROTO_UDPLITE is not set\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\nCONFIG_NF_CONNTRACK_IRC=m\nCONFIG_NF_CONNTRACK_BROADCAST=m\nCONFIG_NF_CONNTRACK_NETBIOS_NS=m\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\nCONFIG_NF_CONNTRACK_SIP=m\n# CONFIG_NF_CONNTRACK_TFTP is not set\nCONFIG_NF_CT_NETLINK=m\n# CONFIG_NETFILTER_NETLINK_GLUE_CT is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_IRC=m\nCONFIG_NF_NAT_SIP=m\nCONFIG_NF_NAT_MASQUERADE=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\n\n#\n# Xtables combined modules\n#\n# CONFIG_NETFILTER_XT_MARK is not set\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\n# CONFIG_NETFILTER_XT_TARGET_REDIRECT is not set\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\nCONFIG_NETFILTER_XT_MATCH_IPRANGE=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\nCONFIG_NETFILTER_XT_MATCH_OWNER=m\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\nCONFIG_NETFILTER_XT_MATCH_STATE=m\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\n# CONFIG_IP_VS is not set\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\n# CONFIG_IP_NF_TARGET_REDIRECT is not set\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\n# CONFIG_NF_LOG_IPV6 is not set\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_MATCH_SRH is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\nCONFIG_IP6_NF_NAT=m\n# CONFIG_IP6_NF_TARGET_MASQUERADE is not set\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\n# CONFIG_BRIDGE_VLAN_FILTERING is not set\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\nCONFIG_NET_SCH_FQ_CODEL=y\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_FLOW is not set\n# CONFIG_NET_CLS_CGROUP is not set\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\n# CONFIG_NET_L3_MASTER_DEV is not set\n# CONFIG_QRTR is not set\n# CONFIG_NET_NCSI is not set\n# CONFIG_CGROUP_NET_PRIO is not set\n# CONFIG_CGROUP_NET_CLASSID is not set\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\nCONFIG_BT_RFCOMM_TTY=y\n# CONFIG_BT_BNEP is not set\nCONFIG_BT_HIDP=m\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_LEDS is not set\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\n# CONFIG_BT_DEBUGFS is not set\n# CONFIG_BT_SELFTEST is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_MTK=m\nCONFIG_BT_HCIBTUSB=m\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\nCONFIG_BT_HCIBTUSB_MTK=y\nCONFIG_BT_HCIBTUSB_RTL=y\n# CONFIG_BT_HCIBTSDIO is not set\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_SERDEV=y\nCONFIG_BT_HCIUART_H4=y\n# CONFIG_BT_HCIUART_NOKIA is not set\n# CONFIG_BT_HCIUART_BCSP is not set\n# CONFIG_BT_HCIUART_ATH3K is not set\n# CONFIG_BT_HCIUART_LL is not set\nCONFIG_BT_HCIUART_3WIRE=y\n# CONFIG_BT_HCIUART_INTEL is not set\nCONFIG_BT_HCIUART_BCM=y\n# CONFIG_BT_HCIUART_RTL is not set\n# CONFIG_BT_HCIUART_QCA is not set\n# CONFIG_BT_HCIUART_AG6XX is not set\n# CONFIG_BT_HCIUART_MRVL is not set\nCONFIG_BT_HCIBCM203X=m\n# CONFIG_BT_HCIBPA10X is not set\nCONFIG_BT_HCIBFUSB=m\n# CONFIG_BT_HCIVHCI is not set\n# CONFIG_BT_MRVL is not set\nCONFIG_BT_ATH3K=m\nCONFIG_BT_MTKSDIO=m\n# CONFIG_BT_MTKUART is not set\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=m\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\n# CONFIG_CFG80211_CRDA_SUPPORT is not set\nCONFIG_CFG80211_WEXT=y\nCONFIG_LIB80211=m\nCONFIG_LIB80211_CRYPT_WEP=m\nCONFIG_LIB80211_CRYPT_CCMP=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=m\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=m\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_PAGE_POOL=y\n# CONFIG_PAGE_POOL_STATS is not set\n# CONFIG_FAILOVER is not set\nCONFIG_ETHTOOL_NETLINK=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\nCONFIG_HAVE_PCI=y\n# CONFIG_PCI is not set\n# CONFIG_PCCARD is not set\n\n#\n# Generic Driver Options\n#\n# CONFIG_UEVENT_HELPER is not set\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\n# CONFIG_DEVTMPFS_SAFE is not set\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\n# CONFIG_FW_UPLOAD is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\n# CONFIG_ALLOW_DEV_COREDUMP is not set\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=m\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_MOXTET is not set\n# CONFIG_VEXPRESS_CONFIG is not set\n# CONFIG_MHI_BUS is not set\n# CONFIG_MHI_BUS_EP is not set\n# end of Bus devices\n\n# CONFIG_CONNECTOR is not set\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\n# CONFIG_ARM_SCMI_PROTOCOL is not set\n# end of ARM System Control and Management Interface Protocol\n\n# CONFIG_ARM_SCPI_PROTOCOL is not set\n# CONFIG_FIRMWARE_MEMMAP is not set\nCONFIG_RASPBERRYPI_FIRMWARE=y\n# CONFIG_FW_CFG_SYSFS is not set\nCONFIG_CS_DSP=m\n# CONFIG_GOOGLE_FIRMWARE is not set\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\n# CONFIG_MTD is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_DYNAMIC=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\nCONFIG_OF_RESOLVE=y\nCONFIG_OF_OVERLAY=y\nCONFIG_OF_CONFIGFS=y\nCONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_CDROM=y\n# CONFIG_ZRAM is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=0\n# CONFIG_BLK_DEV_DRBD is not set\nCONFIG_BLK_DEV_NBD=y\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=16\nCONFIG_BLK_DEV_RAM_SIZE=4096\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_UBLK is not set\n\n#\n# NVME Support\n#\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TCP is not set\n# CONFIG_NVME_TARGET is not set\n# end of NVME Support\n\n#\n# Misc devices\n#\nCONFIG_BCM2835_SMI=m\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\n# CONFIG_SRAM is not set\n# CONFIG_XILINX_SDFEC is not set\nCONFIG_MISC_RTSX=y\n# CONFIG_OPEN_DICE is not set\n# CONFIG_VCPU_STALL_DETECTOR is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\n# CONFIG_EEPROM_AT25 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_EEPROM_EE1004 is not set\n# end of EEPROM support\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n# CONFIG_ECHO is not set\nCONFIG_MISC_RTSX_USB=y\n# CONFIG_PVPANIC is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_PROC_FS is not set\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_CHR_DEV_SG=m\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\n# CONFIG_SCSI_SCAN_ASYNC is not set\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\nCONFIG_SCSI_ISCSI_ATTRS=y\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\nCONFIG_SCSI_LOWLEVEL=y\nCONFIG_ISCSI_TCP=y\nCONFIG_ISCSI_BOOT_SYSFS=y\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\n# CONFIG_ATA is not set\n# CONFIG_MD is not set\n# CONFIG_TARGET_CORE is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\n# CONFIG_DUMMY is not set\nCONFIG_WIREGUARD=m\n# CONFIG_WIREGUARD_DEBUG is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\n# CONFIG_MACVTAP is not set\n# CONFIG_IPVLAN is not set\n# CONFIG_VXLAN is not set\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_AMT is not set\n# CONFIG_MACSEC is not set\nCONFIG_NETCONSOLE=y\nCONFIG_NETCONSOLE_DYNAMIC=y\nCONFIG_NETPOLL=y\nCONFIG_NET_POLL_CONTROLLER=y\nCONFIG_TUN=y\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\nCONFIG_NLMON=m\n# CONFIG_ETHERNET is not set\nCONFIG_PHYLINK=m\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_ADIN_PHY is not set\n# CONFIG_ADIN1100_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=m\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM54140_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MARVELL_88X2222_PHY is not set\n# CONFIG_MAXLINEAR_GPHY is not set\n# CONFIG_MEDIATEK_GE_PHY is not set\n# CONFIG_MICREL_PHY is not set\nCONFIG_MICROCHIP_PHY=y\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_MOTORCOMM_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_NXP_TJA11XX_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_QSEMI_PHY is not set\n# CONFIG_REALTEK_PHY is not set\n# CONFIG_RENESAS_PHY is not set\n# CONFIG_ROCKCHIP_PHY is not set\nCONFIG_SMSC_PHY=y\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_DP83TD510_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\n# CONFIG_PSE_CONTROLLER is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_OF_MDIO=y\nCONFIG_MDIO_DEVRES=y\n# CONFIG_MDIO_BITBANG is not set\n# CONFIG_MDIO_BCM_UNIMAC is not set\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_IPQ4019 is not set\n\n#\n# MDIO Multiplexers\n#\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n\n#\n# PCS device drivers\n#\n# end of PCS device drivers\n\nCONFIG_PPP=m\nCONFIG_PPP_BSDCOMP=m\nCONFIG_PPP_DEFLATE=m\n# CONFIG_PPP_FILTER is not set\nCONFIG_PPP_MPPE=m\n# CONFIG_PPP_MULTILINK is not set\nCONFIG_PPPOE=m\nCONFIG_PPP_ASYNC=m\n# CONFIG_PPP_SYNC_TTY is not set\n# CONFIG_SLIP is not set\nCONFIG_SLHC=m\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\n# CONFIG_USB_PEGASUS is not set\n# CONFIG_USB_RTL8150 is not set\nCONFIG_USB_RTL8152=m\nCONFIG_USB_LAN78XX=y\nCONFIG_USB_USBNET=y\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\n# CONFIG_USB_NET_CDC_EEM is not set\n# CONFIG_USB_NET_CDC_NCM is not set\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\nCONFIG_USB_NET_DM9601=m\n# CONFIG_USB_NET_SR9700 is not set\n# CONFIG_USB_NET_SR9800 is not set\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=y\n# CONFIG_USB_NET_GL620A is not set\n# CONFIG_USB_NET_NET1080 is not set\n# CONFIG_USB_NET_PLUSB is not set\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\n# CONFIG_USB_NET_CDC_SUBSET is not set\n# CONFIG_USB_NET_ZAURUS is not set\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\nCONFIG_USB_HSO=m\n# CONFIG_USB_NET_INT51X1 is not set\nCONFIG_USB_IPHETH=m\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\n# CONFIG_USB_NET_AQC111 is not set\nCONFIG_USB_RTL8153_ECM=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\nCONFIG_ATH9K=m\nCONFIG_ATH9K_AHB=y\n# CONFIG_ATH9K_DEBUGFS is not set\n# CONFIG_ATH9K_DYNACK is not set\n# CONFIG_ATH9K_WOW is not set\nCONFIG_ATH9K_RFKILL=y\nCONFIG_ATH9K_CHANNEL_CONTEXT=y\nCONFIG_ATH9K_PCOEM=y\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\nCONFIG_ATH9K_HWRNG=y\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\nCONFIG_CARL9170_HWRNG=y\nCONFIG_ATH6KL=m\n# CONFIG_ATH6KL_SDIO is not set\nCONFIG_ATH6KL_USB=m\n# CONFIG_ATH6KL_DEBUG is not set\n# CONFIG_ATH6KL_TRACING is not set\nCONFIG_AR5523=m\n# CONFIG_ATH10K is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\n# CONFIG_AT76C50X_USB is not set\nCONFIG_WLAN_VENDOR_BROADCOM=y\nCONFIG_B43=m\nCONFIG_B43_BCMA=y\nCONFIG_B43_SSB=y\nCONFIG_B43_BUSES_BCMA_AND_SSB=y\n# CONFIG_B43_BUSES_BCMA is not set\n# CONFIG_B43_BUSES_SSB is not set\n# CONFIG_B43_SDIO is not set\nCONFIG_B43_BCMA_PIO=y\nCONFIG_B43_PIO=y\nCONFIG_B43_PHY_G=y\nCONFIG_B43_PHY_N=y\nCONFIG_B43_PHY_LP=y\nCONFIG_B43_PHY_HT=y\nCONFIG_B43_LEDS=y\nCONFIG_B43_HWRNG=y\n# CONFIG_B43_DEBUG is not set\n# CONFIG_B43LEGACY is not set\nCONFIG_BRCMUTIL=m\n# CONFIG_BRCMSMAC is not set\nCONFIG_BRCMFMAC=m\nCONFIG_BRCMFMAC_PROTO_BCDC=y\nCONFIG_BRCMFMAC_SDIO=y\nCONFIG_BRCMFMAC_USB=y\n# CONFIG_BRCM_TRACING is not set\n# CONFIG_BRCMDBG is not set\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\nCONFIG_WLAN_VENDOR_INTERSIL=y\n# CONFIG_HOSTAP is not set\nCONFIG_P54_COMMON=m\nCONFIG_P54_USB=m\n# CONFIG_P54_SPI is not set\nCONFIG_P54_LEDS=y\nCONFIG_WLAN_VENDOR_MARVELL=y\n# CONFIG_LIBERTAS is not set\n# CONFIG_LIBERTAS_THINFIRM is not set\n# CONFIG_MWIFIEX is not set\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_MT76_CORE=m\nCONFIG_MT76_LEDS=y\nCONFIG_MT76_USB=m\nCONFIG_MT76x02_LIB=m\nCONFIG_MT76x02_USB=m\nCONFIG_MT76_CONNAC_LIB=m\nCONFIG_MT76x0_COMMON=m\nCONFIG_MT76x0U=m\nCONFIG_MT76x2_COMMON=m\nCONFIG_MT76x2U=m\nCONFIG_MT7615_COMMON=m\nCONFIG_MT7663_USB_SDIO_COMMON=m\nCONFIG_MT7663U=m\n# CONFIG_MT7663S is not set\n# CONFIG_MT7921S is not set\n# CONFIG_MT7921U is not set\nCONFIG_WLAN_VENDOR_MICROCHIP=y\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\nCONFIG_WLAN_VENDOR_PURELIFI=y\n# CONFIG_PLFXLC is not set\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=m\n# CONFIG_RTL8192CU is not set\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\nCONFIG_RTW88=m\n# CONFIG_RTW89 is not set\nCONFIG_WLAN_VENDOR_RSI=y\n# CONFIG_RSI_91X is not set\nCONFIG_WLAN_VENDOR_SILABS=y\n# CONFIG_WFX is not set\nCONFIG_WLAN_VENDOR_ST=y\n# CONFIG_CW1200 is not set\nCONFIG_WLAN_VENDOR_TI=y\n# CONFIG_WL1251 is not set\n# CONFIG_WL12XX is not set\n# CONFIG_WL18XX is not set\n# CONFIG_WLCORE is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\nCONFIG_USB_ZD1201=m\nCONFIG_ZD1211RW=m\n# CONFIG_ZD1211RW_DEBUG is not set\n# CONFIG_WLAN_VENDOR_QUANTENNA is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\n# CONFIG_NETDEVSIM is not set\n# CONFIG_NET_FAILOVER is not set\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\n# CONFIG_INPUT_MATRIXKMAP is not set\n\n#\n# Userland interfaces\n#\nCONFIG_INPUT_MOUSEDEV=y\n# CONFIG_INPUT_MOUSEDEV_PSAUX is not set\nCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024\nCONFIG_INPUT_MOUSEDEV_SCREEN_Y=768\nCONFIG_INPUT_JOYDEV=y\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\n# CONFIG_KEYBOARD_ATKBD is not set\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=m\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_PINEPHONE is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\n# CONFIG_KEYBOARD_CYPRESS_SF is not set\n# CONFIG_INPUT_MOUSE is not set\nCONFIG_INPUT_JOYSTICK=y\n# CONFIG_JOYSTICK_ANALOG is not set\n# CONFIG_JOYSTICK_A3D is not set\n# CONFIG_JOYSTICK_ADI is not set\n# CONFIG_JOYSTICK_COBRA is not set\n# CONFIG_JOYSTICK_GF2K is not set\n# CONFIG_JOYSTICK_GRIP is not set\n# CONFIG_JOYSTICK_GRIP_MP is not set\n# CONFIG_JOYSTICK_GUILLEMOT is not set\n# CONFIG_JOYSTICK_INTERACT is not set\n# CONFIG_JOYSTICK_SIDEWINDER is not set\n# CONFIG_JOYSTICK_TMDC is not set\n# CONFIG_JOYSTICK_IFORCE is not set\n# CONFIG_JOYSTICK_WARRIOR is not set\n# CONFIG_JOYSTICK_MAGELLAN is not set\n# CONFIG_JOYSTICK_SPACEORB is not set\n# CONFIG_JOYSTICK_SPACEBALL is not set\n# CONFIG_JOYSTICK_STINGER is not set\n# CONFIG_JOYSTICK_TWIDJOY is not set\n# CONFIG_JOYSTICK_ZHENHUA is not set\n# CONFIG_JOYSTICK_AS5011 is not set\n# CONFIG_JOYSTICK_JOYDUMP is not set\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\nCONFIG_JOYSTICK_PSXPAD_SPI=m\nCONFIG_JOYSTICK_PSXPAD_SPI_FF=y\n# CONFIG_JOYSTICK_PXRC is not set\n# CONFIG_JOYSTICK_QWIIC is not set\n# CONFIG_JOYSTICK_FSIA6B is not set\n# CONFIG_JOYSTICK_SENSEHAT is not set\n# CONFIG_JOYSTICK_RPISENSE is not set\n# CONFIG_INPUT_TABLET is not set\nCONFIG_INPUT_TOUCHSCREEN=y\nCONFIG_TOUCHSCREEN_ADS7846=m\n# CONFIG_TOUCHSCREEN_AD7877 is not set\n# CONFIG_TOUCHSCREEN_AD7879 is not set\n# CONFIG_TOUCHSCREEN_AR1021_I2C is not set\n# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set\n# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_BU21013 is not set\n# CONFIG_TOUCHSCREEN_BU21029 is not set\n# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMA140 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set\n# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set\n# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set\n# CONFIG_TOUCHSCREEN_DYNAPRO is not set\n# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set\n# CONFIG_TOUCHSCREEN_EETI is not set\nCONFIG_TOUCHSCREEN_EGALAX=m\n# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set\n# CONFIG_TOUCHSCREEN_EXC3000 is not set\n# CONFIG_TOUCHSCREEN_FUJITSU is not set\n# CONFIG_TOUCHSCREEN_GOODIX is not set\n# CONFIG_TOUCHSCREEN_HIDEEP is not set\n# CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set\n# CONFIG_TOUCHSCREEN_ILI210X is not set\n# CONFIG_TOUCHSCREEN_ILITEK is not set\n# CONFIG_TOUCHSCREEN_S6SY761 is not set\n# CONFIG_TOUCHSCREEN_GUNZE is not set\n# CONFIG_TOUCHSCREEN_EKTF2127 is not set\n# CONFIG_TOUCHSCREEN_ELAN is not set\n# CONFIG_TOUCHSCREEN_ELO is not set\n# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set\n# CONFIG_TOUCHSCREEN_WACOM_I2C is not set\n# CONFIG_TOUCHSCREEN_MAX11801 is not set\n# CONFIG_TOUCHSCREEN_MCS5000 is not set\n# CONFIG_TOUCHSCREEN_MMS114 is not set\n# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set\n# CONFIG_TOUCHSCREEN_MSG2638 is not set\n# CONFIG_TOUCHSCREEN_MTOUCH is not set\n# CONFIG_TOUCHSCREEN_IMAGIS is not set\n# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set\n# CONFIG_TOUCHSCREEN_INEXIO is not set\n# CONFIG_TOUCHSCREEN_MK712 is not set\n# CONFIG_TOUCHSCREEN_PENMOUNT is not set\nCONFIG_TOUCHSCREEN_EDT_FT5X06=m\nCONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m\n# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set\n# CONFIG_TOUCHSCREEN_TOUCHWIN is not set\n# CONFIG_TOUCHSCREEN_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set\nCONFIG_TOUCHSCREEN_USB_COMPOSITE=m\nCONFIG_TOUCHSCREEN_USB_EGALAX=y\n# CONFIG_TOUCHSCREEN_USB_PANJIT is not set\nCONFIG_TOUCHSCREEN_USB_3M=y\n# CONFIG_TOUCHSCREEN_USB_ITM is not set\n# CONFIG_TOUCHSCREEN_USB_ETURBO is not set\n# CONFIG_TOUCHSCREEN_USB_GUNZE is not set\n# CONFIG_TOUCHSCREEN_USB_DMC_TSC10 is not set\n# CONFIG_TOUCHSCREEN_USB_IRTOUCH is not set\n# CONFIG_TOUCHSCREEN_USB_IDEALTEK is not set\n# CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH is not set\n# CONFIG_TOUCHSCREEN_USB_GOTOP is not set\n# CONFIG_TOUCHSCREEN_USB_JASTEC is not set\n# CONFIG_TOUCHSCREEN_USB_ELO is not set\n# CONFIG_TOUCHSCREEN_USB_E2I is not set\n# CONFIG_TOUCHSCREEN_USB_ZYTRONIC is not set\n# CONFIG_TOUCHSCREEN_USB_ETT_TC45USB is not set\n# CONFIG_TOUCHSCREEN_USB_NEXIO is not set\n# CONFIG_TOUCHSCREEN_USB_EASYTOUCH is not set\n# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set\n# CONFIG_TOUCHSCREEN_TSC_SERIO is not set\n# CONFIG_TOUCHSCREEN_TSC2004 is not set\n# CONFIG_TOUCHSCREEN_TSC2005 is not set\n# CONFIG_TOUCHSCREEN_TSC2007 is not set\n# CONFIG_TOUCHSCREEN_RM_TS is not set\n# CONFIG_TOUCHSCREEN_SILEAD is not set\n# CONFIG_TOUCHSCREEN_SIS_I2C is not set\nCONFIG_TOUCHSCREEN_ST1232=m\n# CONFIG_TOUCHSCREEN_STMFTS is not set\n# CONFIG_TOUCHSCREEN_SUR40 is not set\n# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set\n# CONFIG_TOUCHSCREEN_SX8654 is not set\n# CONFIG_TOUCHSCREEN_TPS6507X is not set\n# CONFIG_TOUCHSCREEN_ZET6223 is not set\n# CONFIG_TOUCHSCREEN_ZFORCE is not set\n# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set\n# CONFIG_TOUCHSCREEN_IQS5XX is not set\n# CONFIG_TOUCHSCREEN_ZINITIX is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ARIZONA_HAPTICS is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\nCONFIG_INPUT_GPIO_ROTARY_ENCODER=m\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_IQS7222 is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\n# CONFIG_INPUT_RASPBERRYPI_BUTTON is not set\nCONFIG_RMI4_CORE=y\n# CONFIG_RMI4_I2C is not set\n# CONFIG_RMI4_SPI is not set\n# CONFIG_RMI4_SMB is not set\nCONFIG_RMI4_F03=y\nCONFIG_RMI4_F03_SERIO=y\nCONFIG_RMI4_2D_SENSOR=y\nCONFIG_RMI4_F11=y\nCONFIG_RMI4_F12=y\nCONFIG_RMI4_F30=y\n# CONFIG_RMI4_F34 is not set\n# CONFIG_RMI4_F3A is not set\n# CONFIG_RMI4_F55 is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_SERIO_SERPORT=y\n# CONFIG_SERIO_AMBAKMI is not set\n# CONFIG_SERIO_LIBPS2 is not set\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_SERIO_GPIO_PS2 is not set\n# CONFIG_USERIO is not set\n# CONFIG_GAMEPORT is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_BRCM_CHAR_DRIVERS=y\nCONFIG_BCM2708_VCMEM=y\nCONFIG_BCM_VCIO=y\nCONFIG_BCM2835_SMI_DEV=m\n# CONFIG_RPIVID_MEM is not set\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\n# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set\nCONFIG_SERIAL_8250_16550A_VARIANTS=y\n# CONFIG_SERIAL_8250_FINTEK is not set\nCONFIG_SERIAL_8250_CONSOLE=y\n# CONFIG_SERIAL_8250_DMA is not set\nCONFIG_SERIAL_8250_NR_UARTS=1\nCONFIG_SERIAL_8250_RUNTIME_UARTS=0\nCONFIG_SERIAL_8250_EXTENDED=y\n# CONFIG_SERIAL_8250_MANY_PORTS is not set\nCONFIG_SERIAL_8250_SHARE_IRQ=y\n# CONFIG_SERIAL_8250_DETECT_IRQ is not set\n# CONFIG_SERIAL_8250_RSA is not set\nCONFIG_SERIAL_8250_BCM2835AUX=y\nCONFIG_SERIAL_8250_FSL=y\n# CONFIG_SERIAL_8250_DW is not set\n# CONFIG_SERIAL_8250_RT288X is not set\nCONFIG_SERIAL_OF_PLATFORM=y\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\nCONFIG_SERIAL_AMBA_PL011=y\nCONFIG_SERIAL_AMBA_PL011_CONSOLE=y\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_SIFIVE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_ST_ASC is not set\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\nCONFIG_SERIAL_MCTRL_GPIO=y\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NULL_TTY is not set\n# CONFIG_HVC_DCC is not set\nCONFIG_SERIAL_DEV_BUS=y\nCONFIG_SERIAL_DEV_CTRL_TTYPORT=y\n# CONFIG_TTY_PRINTK is not set\n# CONFIG_VIRTIO_CONSOLE is not set\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_BA431 is not set\nCONFIG_HW_RANDOM_BCM2835=y\nCONFIG_HW_RANDOM_IPROC_RNG200=y\n# CONFIG_HW_RANDOM_CCTRNG is not set\n# CONFIG_HW_RANDOM_XIPHERA is not set\nCONFIG_DEVMEM=y\n# CONFIG_TCG_TPM is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\nCONFIG_RANDOM_TRUST_CPU=y\nCONFIG_RANDOM_TRUST_BOOTLOADER=y\nCONFIG_RASPBERRYPI_GPIOMEM=y\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\n# CONFIG_I2C_COMPAT is not set\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\nCONFIG_I2C_MUX_PINCTRL=y\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_DEMUX_PINCTRL is not set\n# CONFIG_I2C_MUX_MLXCPLD is not set\n# end of Multiplexer I2C Chip support\n\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\nCONFIG_I2C_BCM2708=y\nCONFIG_I2C_BCM2708_BAUDRATE=100000\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\nCONFIG_I2C_BCM2835=y\n# CONFIG_I2C_BRCMSTB is not set\n# CONFIG_I2C_CBUS_GPIO is not set\n# CONFIG_I2C_DESIGNWARE_PLATFORM is not set\n# CONFIG_I2C_EMEV2 is not set\nCONFIG_I2C_GPIO=y\n# CONFIG_I2C_GPIO_FAULT_INJECTOR is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_RK3X is not set\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\n# CONFIG_SPI_MEM is not set\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\nCONFIG_SPI_BCM2835=m\nCONFIG_SPI_BCM2835AUX=m\n# CONFIG_SPI_BCM_QSPI is not set\n# CONFIG_SPI_BITBANG is not set\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_CADENCE_QUADSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_NXP_FLEXSPI is not set\n# CONFIG_SPI_GPIO is not set\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_MICROCHIP_CORE is not set\n# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set\n# CONFIG_SPI_OC_TINY is not set\n# CONFIG_SPI_PL022 is not set\n# CONFIG_SPI_ROCKCHIP is not set\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_SIFIVE is not set\n# CONFIG_SPI_MXIC is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_AMD is not set\n\n#\n# SPI Multiplexer support\n#\n# CONFIG_SPI_MUX is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=y\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\nCONFIG_SPI_DYNAMIC=y\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\n# CONFIG_PPS is not set\n\n#\n# PTP clock support\n#\n# CONFIG_PTP_1588_CLOCK is not set\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_CY8C95X0 is not set\n# CONFIG_PINCTRL_MCP23S08 is not set\n# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set\n# CONFIG_PINCTRL_OCELOT is not set\n# CONFIG_PINCTRL_SINGLE is not set\n# CONFIG_PINCTRL_STMFX is not set\n# CONFIG_PINCTRL_SX150X is not set\n# CONFIG_PINCTRL_RP1 is not set\n# CONFIG_PINCTRL_BCM2712 is not set\nCONFIG_PINCTRL_BCM2835=y\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\nCONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_SYSFS=y\nCONFIG_GPIO_CDEV=y\nCONFIG_GPIO_CDEV_V1=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\nCONFIG_GPIO_RASPBERRYPI_EXP=y\nCONFIG_GPIO_BCM_VIRT=y\n# CONFIG_GPIO_BRCMSTB is not set\n# CONFIG_GPIO_CADENCE is not set\n# CONFIG_GPIO_DWAPB is not set\n# CONFIG_GPIO_FTGPIO010 is not set\n# CONFIG_GPIO_GENERIC_PLATFORM is not set\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_MB86S7X is not set\n# CONFIG_GPIO_MPC8XXX is not set\n# CONFIG_GPIO_PL061 is not set\n# CONFIG_GPIO_PWM is not set\n# CONFIG_GPIO_SIFIVE is not set\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_ZEVIO is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_GW_PLD is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\n# CONFIG_GPIO_PCA953X is not set\n# CONFIG_GPIO_PCA9570 is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\nCONFIG_GPIO_ARIZONA=m\n# CONFIG_HTC_EGPIO is not set\nCONFIG_GPIO_FSM=m\n# end of MFD GPIO expanders\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n# end of SPI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_SIM is not set\n# end of Virtual GPIO drivers\n\nCONFIG_W1=m\n\n#\n# 1-wire Bus Masters\n#\n# CONFIG_W1_MASTER_DS2490 is not set\n# CONFIG_W1_MASTER_DS2482 is not set\n# CONFIG_W1_MASTER_DS1WM is not set\nCONFIG_W1_MASTER_GPIO=m\n# CONFIG_W1_MASTER_SGI is not set\n# end of 1-wire Bus Masters\n\n#\n# 1-wire Slaves\n#\nCONFIG_W1_SLAVE_THERM=m\n# CONFIG_W1_SLAVE_SMEM is not set\n# CONFIG_W1_SLAVE_DS2405 is not set\n# CONFIG_W1_SLAVE_DS2408 is not set\n# CONFIG_W1_SLAVE_DS2413 is not set\n# CONFIG_W1_SLAVE_DS2406 is not set\n# CONFIG_W1_SLAVE_DS2423 is not set\n# CONFIG_W1_SLAVE_DS2805 is not set\n# CONFIG_W1_SLAVE_DS2430 is not set\n# CONFIG_W1_SLAVE_DS2431 is not set\n# CONFIG_W1_SLAVE_DS2433 is not set\n# CONFIG_W1_SLAVE_DS2438 is not set\n# CONFIG_W1_SLAVE_DS250X is not set\n# CONFIG_W1_SLAVE_DS2780 is not set\n# CONFIG_W1_SLAVE_DS2781 is not set\n# CONFIG_W1_SLAVE_DS28E04 is not set\n# CONFIG_W1_SLAVE_DS28E17 is not set\n# end of 1-wire Slaves\n\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_BRCMKONA is not set\nCONFIG_POWER_RESET_GPIO=y\nCONFIG_POWER_RESET_GPIO_RESTART=y\n# CONFIG_POWER_RESET_LTC2952 is not set\n# CONFIG_POWER_RESET_REGULATOR is not set\nCONFIG_POWER_RESET_RESTART=y\n# CONFIG_POWER_RESET_SYSCON is not set\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\n# CONFIG_NVMEM_REBOOT_MODE is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\nCONFIG_POWER_SUPPLY_HWMON=y\nCONFIG_RPI_POE_POWER=m\n# CONFIG_PDA_POWER is not set\n# CONFIG_IP5XXX_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2760 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SAMSUNG_SDI is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_BATTERY_MAX1721X is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_MAX77976 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_UCS1002 is not set\n# CONFIG_CHARGER_BD99954 is not set\n# CONFIG_BATTERY_UG3105 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM1177 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_AHT10 is not set\n# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set\n# CONFIG_SENSORS_AS370 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_AXI_FAN_CONTROL is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_CORSAIR_CPRO is not set\n# CONFIG_SENSORS_CORSAIR_PSU is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\nCONFIG_SENSORS_GPIO_FAN=m\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2947_I2C is not set\n# CONFIG_SENSORS_LTC2947_SPI is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC2992 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX127 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX31730 is not set\n# CONFIG_SENSORS_MAX31760 is not set\n# CONFIG_SENSORS_MAX6620 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_TPS23861 is not set\n# CONFIG_SENSORS_MR75203 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775_I2C is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_NZXT_KRAKEN2 is not set\n# CONFIG_SENSORS_NZXT_SMART2 is not set\n# CONFIG_SENSORS_OCC_P8_I2C is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\nCONFIG_SENSORS_PWM_FAN=m\nCONFIG_SENSORS_RASPBERRYPI_HWMON=y\n# CONFIG_SENSORS_SBTSI is not set\n# CONFIG_SENSORS_SBRMI is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHT4x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC2305 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_INA238 is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_TMP464 is not set\n# CONFIG_SENSORS_TMP513 is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_NETLINK is not set\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\n# CONFIG_THERMAL_WRITABLE_TRIPS is not set\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\n# CONFIG_CPU_THERMAL is not set\n# CONFIG_THERMAL_EMULATION is not set\n# CONFIG_THERMAL_MMIO is not set\n\n#\n# Broadcom thermal drivers\n#\nCONFIG_BCM2835_THERMAL=y\n# end of Broadcom thermal drivers\n\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\nCONFIG_WATCHDOG_OPEN_TIMEOUT=0\n# CONFIG_WATCHDOG_SYSFS is not set\n# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\n# CONFIG_FTWDT010_WATCHDOG is not set\n# CONFIG_DW_WATCHDOG is not set\n# CONFIG_MAX63XX_WATCHDOG is not set\nCONFIG_BCM2835_WDT=y\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\nCONFIG_SSB=m\nCONFIG_SSB_BLOCKIO=y\nCONFIG_SSB_SDIOHOST_POSSIBLE=y\n# CONFIG_SSB_SDIOHOST is not set\n# CONFIG_SSB_DRIVER_GPIO is not set\nCONFIG_BCMA_POSSIBLE=y\nCONFIG_BCMA=m\nCONFIG_BCMA_BLOCKIO=y\n# CONFIG_BCMA_HOST_SOC is not set\nCONFIG_BCMA_DRIVER_GMAC_CMN=y\n# CONFIG_BCMA_DRIVER_GPIO is not set\n# CONFIG_BCMA_DEBUG is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_RPISENSE_CORE is not set\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AXP20X_I2C is not set\n# CONFIG_MFD_MADERA is not set\n# CONFIG_MFD_ASIC3 is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_GATEWORKS_GSC is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_MP2629 is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77620 is not set\n# CONFIG_MFD_MAX77650 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77714 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6370 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_MFD_OCELOT is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_NTXEC is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_PM8XXX is not set\n# CONFIG_MFD_SY7636A is not set\nCONFIG_MFD_RASPBERRYPI_POE_HAT=m\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RT5120 is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_RK808 is not set\n# CONFIG_MFD_RN5T618 is not set\n# CONFIG_MFD_SEC_CORE is not set\n# CONFIG_MFD_SI476X_CORE is not set\nCONFIG_MFD_SIMPLE_MFD_I2C=m\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_STMPE is not set\n# CONFIG_MFD_SYSCON is not set\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_T7L66XB is not set\n# CONFIG_MFD_TC6387XB is not set\n# CONFIG_MFD_TC6393XB is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_LOCHNAGAR is not set\nCONFIG_MFD_ARIZONA=m\nCONFIG_MFD_ARIZONA_I2C=m\nCONFIG_MFD_ARIZONA_SPI=m\n# CONFIG_MFD_CS47L24 is not set\nCONFIG_MFD_WM5102=y\n# CONFIG_MFD_WM5110 is not set\n# CONFIG_MFD_WM8997 is not set\n# CONFIG_MFD_WM8998 is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_MFD_ROHM_BD718XX is not set\n# CONFIG_MFD_ROHM_BD71828 is not set\n# CONFIG_MFD_ROHM_BD957XMUF is not set\n# CONFIG_MFD_STPMIC1 is not set\n# CONFIG_MFD_STMFX is not set\n# CONFIG_MFD_ATC260X_I2C is not set\n# CONFIG_MFD_QCOM_PM8008 is not set\n# CONFIG_RAVE_SP_CORE is not set\n# CONFIG_MFD_INTEL_M10_BMC is not set\n# CONFIG_MFD_RSMU_I2C is not set\n# CONFIG_MFD_RSMU_SPI is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\nCONFIG_REGULATOR_ARIZONA_LDO1=m\nCONFIG_REGULATOR_ARIZONA_MICSUPP=m\n# CONFIG_REGULATOR_DA9121 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\n# CONFIG_REGULATOR_FAN53880 is not set\n# CONFIG_REGULATOR_GPIO is not set\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MAX20086 is not set\n# CONFIG_REGULATOR_MAX77826 is not set\n# CONFIG_REGULATOR_MCP16502 is not set\n# CONFIG_REGULATOR_MP5416 is not set\n# CONFIG_REGULATOR_MP8859 is not set\n# CONFIG_REGULATOR_MP886X is not set\n# CONFIG_REGULATOR_MPQ7920 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PF8X00 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\n# CONFIG_REGULATOR_PWM is not set\nCONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=y\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT5190A is not set\n# CONFIG_REGULATOR_RT5759 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\n# CONFIG_REGULATOR_SLG51000 is not set\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_SY8824X is not set\n# CONFIG_REGULATOR_SY8827N is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS6286X is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\n# CONFIG_REGULATOR_VCTRL is not set\nCONFIG_RC_CORE=y\nCONFIG_BPF_LIRC_MODE2=y\nCONFIG_LIRC=y\nCONFIG_RC_MAP=m\nCONFIG_RC_DECODERS=y\nCONFIG_IR_IMON_DECODER=m\nCONFIG_IR_JVC_DECODER=m\nCONFIG_IR_MCE_KBD_DECODER=m\nCONFIG_IR_NEC_DECODER=m\nCONFIG_IR_RC5_DECODER=m\nCONFIG_IR_RC6_DECODER=m\nCONFIG_IR_RCMM_DECODER=m\nCONFIG_IR_SANYO_DECODER=m\nCONFIG_IR_SHARP_DECODER=m\nCONFIG_IR_SONY_DECODER=m\nCONFIG_IR_XMP_DECODER=m\nCONFIG_RC_DEVICES=y\nCONFIG_IR_GPIO_CIR=m\nCONFIG_IR_GPIO_TX=m\n# CONFIG_IR_HIX5HD2 is not set\nCONFIG_IR_IGORPLUGUSB=m\nCONFIG_IR_IGUANA=m\nCONFIG_IR_IMON=m\nCONFIG_IR_IMON_RAW=m\nCONFIG_IR_MCEUSB=m\nCONFIG_IR_PWM_TX=m\nCONFIG_IR_REDRAT3=m\n# CONFIG_IR_SERIAL is not set\n# CONFIG_IR_SPI is not set\nCONFIG_IR_STREAMZAP=m\nCONFIG_IR_TOY=m\nCONFIG_IR_TTUSBIR=m\nCONFIG_RC_ATI_REMOTE=m\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_RC_XBOX_DVD=m\nCONFIG_CEC_CORE=y\n\n#\n# CEC support\n#\n# CONFIG_MEDIA_CEC_RC is not set\n# CONFIG_MEDIA_CEC_SUPPORT is not set\n# end of CEC support\n\nCONFIG_MEDIA_SUPPORT=m\n# CONFIG_MEDIA_SUPPORT_FILTER is not set\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\nCONFIG_MEDIA_RADIO_SUPPORT=y\nCONFIG_MEDIA_SDR_SUPPORT=y\nCONFIG_MEDIA_PLATFORM_SUPPORT=y\nCONFIG_MEDIA_TEST_SUPPORT=y\n# end of Media device types\n\n#\n# Media core support\n#\nCONFIG_VIDEO_DEV=m\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_DVB_CORE=m\n# end of Media core support\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2_I2C=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_VIDEO_TUNER=m\nCONFIG_V4L2_MEM2MEM_DEV=m\n# CONFIG_V4L2_FLASH_LED_CLASS is not set\nCONFIG_V4L2_FWNODE=m\nCONFIG_V4L2_ASYNC=m\n# end of Video4Linux options\n\n#\n# Media controller options\n#\nCONFIG_MEDIA_CONTROLLER_DVB=y\n# end of Media controller options\n\n#\n# Digital TV options\n#\n# CONFIG_DVB_MMAP is not set\nCONFIG_DVB_NET=y\nCONFIG_DVB_MAX_ADAPTERS=8\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set\n# CONFIG_DVB_ULE_DEBUG is not set\n# end of Digital TV options\n\n#\n# Media drivers\n#\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_USB_S2255 is not set\nCONFIG_VIDEO_USBTV=m\nCONFIG_USB_VIDEO_CLASS=m\n# CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV is not set\n\n#\n# Analog TV USB devices\n#\n# CONFIG_VIDEO_GO7007 is not set\nCONFIG_VIDEO_HDPVR=m\nCONFIG_VIDEO_PVRUSB2=m\nCONFIG_VIDEO_PVRUSB2_SYSFS=y\nCONFIG_VIDEO_PVRUSB2_DVB=y\n# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set\nCONFIG_VIDEO_STK1160_COMMON=m\nCONFIG_VIDEO_STK1160=m\n\n#\n# Analog/digital TV USB devices\n#\nCONFIG_VIDEO_AU0828=m\nCONFIG_VIDEO_AU0828_V4L2=y\nCONFIG_VIDEO_AU0828_RC=y\nCONFIG_VIDEO_CX231XX=m\nCONFIG_VIDEO_CX231XX_RC=y\n# CONFIG_VIDEO_CX231XX_ALSA is not set\nCONFIG_VIDEO_CX231XX_DVB=m\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_AS102=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\n# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_DVBSKY=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_DVB_USB_ZD1301=m\nCONFIG_DVB_USB=m\n# CONFIG_DVB_USB_DEBUG is not set\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_CXUSB=m\n# CONFIG_DVB_USB_CXUSB_ANALOG is not set\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_DIB3000MC=m\nCONFIG_DVB_USB_DIBUSB_MB=m\nCONFIG_DVB_USB_DIBUSB_MB_FAULTY=y\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_DTT200U=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_OPERA1=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_SMS_USB_DRV=m\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\nCONFIG_VIDEO_EM28XX=m\n# CONFIG_VIDEO_EM28XX_V4L2 is not set\n# CONFIG_VIDEO_EM28XX_ALSA is not set\nCONFIG_VIDEO_EM28XX_DVB=m\nCONFIG_VIDEO_EM28XX_RC=m\n\n#\n# Software defined radio USB devices\n#\n# CONFIG_USB_AIRSPY is not set\n# CONFIG_USB_HACKRF is not set\n# CONFIG_USB_MSI2500 is not set\n# CONFIG_RADIO_ADAPTERS is not set\nCONFIG_MEDIA_PLATFORM_DRIVERS=y\n# CONFIG_V4L_PLATFORM_DRIVERS is not set\n# CONFIG_SDR_PLATFORM_DRIVERS is not set\n# CONFIG_DVB_PLATFORM_DRIVERS is not set\n# CONFIG_V4L_MEM2MEM_DRIVERS is not set\n\n#\n# Allegro DVT media platform drivers\n#\n\n#\n# Amlogic media platform drivers\n#\n\n#\n# Amphion drivers\n#\n\n#\n# Aspeed media platform drivers\n#\n\n#\n# Atmel media platform drivers\n#\n# CONFIG_VIDEO_BCM2835_UNICAM is not set\n\n#\n# Cadence media platform drivers\n#\n# CONFIG_VIDEO_CADENCE_CSI2RX is not set\n# CONFIG_VIDEO_CADENCE_CSI2TX is not set\n\n#\n# Chips&Media media platform drivers\n#\n\n#\n# Intel media platform drivers\n#\n\n#\n# Marvell media platform drivers\n#\n\n#\n# Mediatek media platform drivers\n#\n\n#\n# NVidia media platform drivers\n#\n\n#\n# NXP media platform drivers\n#\n\n#\n# Qualcomm media platform drivers\n#\n\n#\n# Raspberry Pi media platform drivers\n#\n# CONFIG_VIDEO_RASPBERRYPI_PISP_BE is not set\n# CONFIG_VIDEO_RP1_CFE is not set\n\n#\n# Renesas media platform drivers\n#\n\n#\n# Rockchip media platform drivers\n#\n\n#\n# Samsung media platform drivers\n#\n\n#\n# STMicroelectronics media platform drivers\n#\n\n#\n# Sunxi media platform drivers\n#\n\n#\n# Texas Instruments drivers\n#\n\n#\n# Verisilicon media platform drivers\n#\n\n#\n# VIA media platform drivers\n#\n\n#\n# Xilinx media platform drivers\n#\n\n#\n# MMC/SDIO DVB adapters\n#\nCONFIG_SMS_SDIO_DRV=m\n# CONFIG_V4L_TEST_DRIVERS is not set\n# CONFIG_DVB_TEST_DRIVERS is not set\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_TTPCI_EEPROM=m\nCONFIG_VIDEO_CX2341X=m\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\n# CONFIG_SMS_SIANO_DEBUGFS is not set\nCONFIG_VIDEOBUF2_CORE=m\nCONFIG_VIDEOBUF2_V4L2=m\nCONFIG_VIDEOBUF2_MEMOPS=m\nCONFIG_VIDEOBUF2_DMA_CONTIG=m\nCONFIG_VIDEOBUF2_VMALLOC=m\n# end of Media drivers\n\n#\n# Media ancillary drivers\n#\nCONFIG_MEDIA_ATTACH=y\n\n#\n# IR I2C driver auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_IR_I2C=m\nCONFIG_VIDEO_CAMERA_SENSOR=y\n# CONFIG_VIDEO_AR0521 is not set\n# CONFIG_VIDEO_ARDUCAM_64MP is not set\n# CONFIG_VIDEO_ARDUCAM_PIVARIETY is not set\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_HI846 is not set\n# CONFIG_VIDEO_HI847 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX296 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_IMX412 is not set\n# CONFIG_VIDEO_IMX477 is not set\n# CONFIG_VIDEO_IMX519 is not set\n# CONFIG_VIDEO_IMX708 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\n# CONFIG_VIDEO_MT9V011 is not set\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_OG01A1B is not set\n# CONFIG_VIDEO_OV02A10 is not set\n# CONFIG_VIDEO_OV08D10 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\n# CONFIG_VIDEO_OV2311 is not set\n# CONFIG_VIDEO_OV2640 is not set\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5693 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV64A40 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV7251 is not set\n# CONFIG_VIDEO_OV7640 is not set\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9282 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5398 is not set\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_BU64754 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# Audio decoders, processors and mixers\n#\n# CONFIG_VIDEO_CS3308 is not set\n# CONFIG_VIDEO_CS5345 is not set\nCONFIG_VIDEO_CS53L32A=m\nCONFIG_VIDEO_MSP3400=m\n# CONFIG_VIDEO_SONY_BTF_MPX is not set\n# CONFIG_VIDEO_TDA1997X is not set\n# CONFIG_VIDEO_TDA7432 is not set\n# CONFIG_VIDEO_TDA9840 is not set\n# CONFIG_VIDEO_TEA6415C is not set\n# CONFIG_VIDEO_TEA6420 is not set\n# CONFIG_VIDEO_TLV320AIC23B is not set\n# CONFIG_VIDEO_TVAUDIO is not set\n# CONFIG_VIDEO_UDA1342 is not set\n# CONFIG_VIDEO_VP27SMPX is not set\n# CONFIG_VIDEO_WM8739 is not set\nCONFIG_VIDEO_WM8775=m\n# end of Audio decoders, processors and mixers\n\n#\n# RDS decoders\n#\n# CONFIG_VIDEO_SAA6588 is not set\n# end of RDS decoders\n\n#\n# Video decoders\n#\n# CONFIG_VIDEO_ADV7180 is not set\n# CONFIG_VIDEO_ADV7183 is not set\n# CONFIG_VIDEO_ADV748X is not set\n# CONFIG_VIDEO_ADV7604 is not set\n# CONFIG_VIDEO_ADV7842 is not set\n# CONFIG_VIDEO_BT819 is not set\n# CONFIG_VIDEO_BT856 is not set\n# CONFIG_VIDEO_BT866 is not set\n# CONFIG_VIDEO_ISL7998X is not set\n# CONFIG_VIDEO_KS0127 is not set\n# CONFIG_VIDEO_MAX9286 is not set\n# CONFIG_VIDEO_ML86V7667 is not set\n# CONFIG_VIDEO_SAA7110 is not set\nCONFIG_VIDEO_SAA711X=m\n# CONFIG_VIDEO_TC358743 is not set\n# CONFIG_VIDEO_TVP514X is not set\n# CONFIG_VIDEO_TVP5150 is not set\n# CONFIG_VIDEO_TVP7002 is not set\n# CONFIG_VIDEO_TW2804 is not set\n# CONFIG_VIDEO_OV9281 is not set\n# CONFIG_VIDEO_TW9903 is not set\n# CONFIG_VIDEO_TW9906 is not set\n# CONFIG_VIDEO_TW9910 is not set\n# CONFIG_VIDEO_IRS1125 is not set\n# CONFIG_VIDEO_VPX3220 is not set\n\n#\n# Video and audio decoders\n#\n# CONFIG_VIDEO_SAA717X is not set\nCONFIG_VIDEO_CX25840=m\n# end of Video decoders\n\n#\n# Video encoders\n#\n# CONFIG_VIDEO_AD9389B is not set\n# CONFIG_VIDEO_ADV7170 is not set\n# CONFIG_VIDEO_ADV7175 is not set\n# CONFIG_VIDEO_ADV7343 is not set\n# CONFIG_VIDEO_ADV7393 is not set\n# CONFIG_VIDEO_ADV7511 is not set\n# CONFIG_VIDEO_AK881X is not set\n# CONFIG_VIDEO_SAA7127 is not set\n# CONFIG_VIDEO_SAA7185 is not set\n# CONFIG_VIDEO_THS8200 is not set\n# end of Video encoders\n\n#\n# Video improvement chips\n#\n# CONFIG_VIDEO_UPD64031A is not set\n# CONFIG_VIDEO_UPD64083 is not set\n# end of Video improvement chips\n\n#\n# Audio/Video compression chips\n#\n# CONFIG_VIDEO_SAA6752HS is not set\n# end of Audio/Video compression chips\n\n#\n# SDR tuner chips\n#\n# CONFIG_SDR_MAX2175 is not set\n# end of SDR tuner chips\n\n#\n# Miscellaneous helper chips\n#\n# CONFIG_VIDEO_I2C is not set\n# CONFIG_VIDEO_M52790 is not set\n# CONFIG_VIDEO_ST_MIPID02 is not set\n# CONFIG_VIDEO_THS7303 is not set\n# end of Miscellaneous helper chips\n\n#\n# Media SPI Adapters\n#\nCONFIG_CXD2880_SPI_DRV=m\n# CONFIG_VIDEO_GS1662 is not set\n# end of Media SPI Adapters\n\nCONFIG_MEDIA_TUNER=m\n\n#\n# Customize TV tuners\n#\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_IT913X=m\n# CONFIG_MEDIA_TUNER_M88RS6000T is not set\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_MC44S803=m\n# CONFIG_MEDIA_TUNER_MSI001 is not set\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT20XX=m\n# CONFIG_MEDIA_TUNER_MT2131 is not set\nCONFIG_MEDIA_TUNER_MT2266=m\n# CONFIG_MEDIA_TUNER_MXL301RF is not set\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\n# CONFIG_MEDIA_TUNER_QM1D1B0004 is not set\nCONFIG_MEDIA_TUNER_QM1D1C0042=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_R820T=m\nCONFIG_MEDIA_TUNER_SI2157=m\nCONFIG_MEDIA_TUNER_SIMPLE=m\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_TDA18250=m\nCONFIG_MEDIA_TUNER_TDA18271=m\nCONFIG_MEDIA_TUNER_TDA827X=m\nCONFIG_MEDIA_TUNER_TDA8290=m\nCONFIG_MEDIA_TUNER_TDA9887=m\nCONFIG_MEDIA_TUNER_TEA5761=m\nCONFIG_MEDIA_TUNER_TEA5767=m\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_XC2028=m\nCONFIG_MEDIA_TUNER_XC4000=m\nCONFIG_MEDIA_TUNER_XC5000=m\n# end of Customize TV tuners\n\n#\n# Customise DVB Frontends\n#\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_M88DS3103=m\n# CONFIG_DVB_MXL5XX is not set\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\n# CONFIG_DVB_STV0910 is not set\nCONFIG_DVB_STV6110x=m\n# CONFIG_DVB_STV6111 is not set\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_MN88472=m\nCONFIG_DVB_MN88473=m\nCONFIG_DVB_SI2165=m\nCONFIG_DVB_TDA18271C2DD=m\n\n#\n# DVB-S (satellite) frontends\n#\n# CONFIG_DVB_CX24110 is not set\nCONFIG_DVB_CX24116=m\n# CONFIG_DVB_CX24117 is not set\nCONFIG_DVB_CX24120=m\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_DS3000=m\n# CONFIG_DVB_MB86A16 is not set\nCONFIG_DVB_MT312=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_TDA10071=m\nCONFIG_DVB_TDA10086=m\n# CONFIG_DVB_TDA8083 is not set\n# CONFIG_DVB_TDA8261 is not set\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_TS2020=m\n# CONFIG_DVB_TUA6100 is not set\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TUNER_ITD1000=m\n# CONFIG_DVB_VES1X93 is not set\n# CONFIG_DVB_ZL10036 is not set\nCONFIG_DVB_ZL10039=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_AS102_FE=m\n# CONFIG_DVB_CX22700 is not set\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_CXD2841ER=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\n# CONFIG_DVB_DIB9000 is not set\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_GP8PSK_FE=m\n# CONFIG_DVB_L64781 is not set\nCONFIG_DVB_MT352=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\nCONFIG_DVB_RTL2832_SDR=m\n# CONFIG_DVB_S5H1432 is not set\nCONFIG_DVB_SI2168=m\n# CONFIG_DVB_SP887X is not set\n# CONFIG_DVB_STV0367 is not set\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_ZD1301_DEMOD=m\nCONFIG_DVB_ZL10353=m\nCONFIG_DVB_CXD2880=m\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_STV0297=m\n# CONFIG_DVB_TDA10021 is not set\nCONFIG_DVB_TDA10023=m\n# CONFIG_DVB_VES1820 is not set\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_AU8522=m\nCONFIG_DVB_AU8522_DTV=m\nCONFIG_DVB_AU8522_V4L=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LGDT3306A=m\nCONFIG_DVB_LGDT330X=m\nCONFIG_DVB_MXL692=m\nCONFIG_DVB_NXT200X=m\n# CONFIG_DVB_OR51132 is not set\n# CONFIG_DVB_OR51211 is not set\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_S5H1411=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\nCONFIG_DVB_S921=m\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\n# CONFIG_DVB_MN88443X is not set\nCONFIG_DVB_TC90522=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_A8293=m\nCONFIG_DVB_AF9033=m\n# CONFIG_DVB_ASCOT2E is not set\nCONFIG_DVB_ATBM8830=m\n# CONFIG_DVB_HELENE is not set\n# CONFIG_DVB_HORUS3A is not set\n# CONFIG_DVB_ISL6405 is not set\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_IX2505V=m\n# CONFIG_DVB_LGS8GL5 is not set\nCONFIG_DVB_LGS8GXX=m\n# CONFIG_DVB_LNBH25 is not set\n# CONFIG_DVB_LNBH29 is not set\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_M88RS2000=m\n# CONFIG_DVB_TDA665x is not set\nCONFIG_DVB_DRX39XYJ=m\n\n#\n# Common Interface (EN50221) controller drivers\n#\n# CONFIG_DVB_CXD2099 is not set\nCONFIG_DVB_SP2=m\n# end of Customise DVB Frontends\n\n#\n# Tools to develop new frontends\n#\n# CONFIG_DVB_DUMMY_FE is not set\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\n# CONFIG_IMX_IPUV3_CORE is not set\nCONFIG_DRM=y\nCONFIG_DRM_MIPI_DSI=y\n# CONFIG_DRM_DEBUG_MM is not set\nCONFIG_DRM_KMS_HELPER=y\n# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set\n# CONFIG_DRM_DEBUG_MODESET_LOCK is not set\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\n# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\nCONFIG_DRM_DISPLAY_HELPER=y\nCONFIG_DRM_DISPLAY_HDMI_HELPER=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_GEM_DMA_HELPER=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_KOMEDA is not set\n# end of ARM devices\n\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\n# CONFIG_DRM_EXYNOS is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_ARMADA is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_USE_LVDS is not set\n# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set\n# CONFIG_DRM_OMAP is not set\n# CONFIG_DRM_TILCDC is not set\n# CONFIG_DRM_FSL_DCU is not set\n# CONFIG_DRM_STM is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set\n# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set\n# CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0 is not set\n# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set\n# CONFIG_DRM_PANEL_BOE_TV101WUM_NL6 is not set\n# CONFIG_DRM_PANEL_DSI_CM is not set\n# CONFIG_DRM_PANEL_LVDS is not set\nCONFIG_DRM_PANEL_SIMPLE=y\n# CONFIG_DRM_PANEL_EDP is not set\n# CONFIG_DRM_PANEL_EBBG_FT8719 is not set\n# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set\n# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set\n# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9806E is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set\n# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set\n# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set\n# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set\n# CONFIG_DRM_PANEL_JDI_R63452 is not set\n# CONFIG_DRM_PANEL_KHADAS_TS050 is not set\n# CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LB035Q02 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set\n# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT36672A is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set\n# CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set\n# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set\n# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set\n# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set\n# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set\n# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set\n# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_SOFEF00 is not set\n# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set\n# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS060T1SX01 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7703 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set\n# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set\n# CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521 is not set\n# CONFIG_DRM_PANEL_TDO_TL070WSH30 is not set\n# CONFIG_DRM_PANEL_TPO_Y17P is not set\n# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set\n# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set\n# CONFIG_DRM_PANEL_TPO_TPG110 is not set\n# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set\n# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set\n# CONFIG_DRM_PANEL_WAVESHARE_TOUCHSCREEN is not set\n# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set\n# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_CHRONTEL_CH7033 is not set\n# CONFIG_DRM_DISPLAY_CONNECTOR is not set\n# CONFIG_DRM_ITE_IT6505 is not set\n# CONFIG_DRM_LONTIUM_LT8912B is not set\n# CONFIG_DRM_LONTIUM_LT9211 is not set\n# CONFIG_DRM_LONTIUM_LT9611 is not set\n# CONFIG_DRM_LONTIUM_LT9611UXC is not set\n# CONFIG_DRM_ITE_IT66121 is not set\n# CONFIG_DRM_LVDS_CODEC is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NWL_MIPI_DSI is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_PARADE_PS8640 is not set\n# CONFIG_DRM_SIL_SII8620 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_SII9234 is not set\nCONFIG_DRM_SIMPLE_BRIDGE=y\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\nCONFIG_DRM_TOSHIBA_TC358762=y\n# CONFIG_DRM_TOSHIBA_TC358764 is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TOSHIBA_TC358768 is not set\n# CONFIG_DRM_TOSHIBA_TC358775 is not set\n# CONFIG_DRM_TI_DLPC3433 is not set\n# CONFIG_DRM_TI_TFP410 is not set\n# CONFIG_DRM_TI_SN65DSI83 is not set\n# CONFIG_DRM_TI_SN65DSI86 is not set\n# CONFIG_DRM_TI_TPD12S015 is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_ANALOGIX_ANX7625 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_CDNS_MHDP8546 is not set\n# end of Display Interface Bridges\n\n# CONFIG_DRM_STI is not set\n# CONFIG_DRM_V3D is not set\nCONFIG_DRM_VC4=y\nCONFIG_DRM_VC4_HDMI_CEC=y\n# CONFIG_DRM_RP1_DSI is not set\n# CONFIG_DRM_RP1_DPI is not set\n# CONFIG_DRM_RP1_VEC is not set\n# CONFIG_DRM_ETNAVIV is not set\n# CONFIG_DRM_LOGICVC is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_PANEL_MIPI_DBI is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_TINYDRM_HX8357D is not set\n# CONFIG_TINYDRM_ILI9163 is not set\n# CONFIG_TINYDRM_ILI9225 is not set\n# CONFIG_TINYDRM_ILI9341 is not set\n# CONFIG_TINYDRM_ILI9486 is not set\n# CONFIG_TINYDRM_MI0283QT is not set\n# CONFIG_TINYDRM_REPAPER is not set\n# CONFIG_TINYDRM_ST7586 is not set\n# CONFIG_TINYDRM_ST7735R is not set\n# CONFIG_DRM_PL111 is not set\n# CONFIG_DRM_TVE200 is not set\n# CONFIG_DRM_LIMA is not set\n# CONFIG_DRM_PANFROST is not set\n# CONFIG_DRM_MCDE is not set\n# CONFIG_DRM_TIDSS is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_SSD130X is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_DRM_NOMODESET=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\n# CONFIG_FB_MODE_HELPERS is not set\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\nCONFIG_FB_BCM2708=y\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# CONFIG_FB_RPISENSE is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\nCONFIG_LCD_CLASS_DEVICE=y\n# CONFIG_LCD_L4F00242T03 is not set\n# CONFIG_LCD_LMS283GF05 is not set\n# CONFIG_LCD_LTV350QV is not set\n# CONFIG_LCD_ILI922X is not set\n# CONFIG_LCD_ILI9320 is not set\n# CONFIG_LCD_TDO24M is not set\n# CONFIG_LCD_VGG2432A4 is not set\n# CONFIG_LCD_PLATFORM is not set\n# CONFIG_LCD_AMS369FG06 is not set\n# CONFIG_LCD_LMS501KF03 is not set\n# CONFIG_LCD_HX8357 is not set\n# CONFIG_LCD_OTM3225A is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\n# CONFIG_BACKLIGHT_KTD253 is not set\n# CONFIG_BACKLIGHT_PWM is not set\nCONFIG_BACKLIGHT_RPI=y\n# CONFIG_BACKLIGHT_QCOM_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\nCONFIG_BACKLIGHT_GPIO=y\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n# CONFIG_BACKLIGHT_LED is not set\n# end of Backlight & LCD device support\n\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_FRAMEBUFFER_CONSOLE=y\n# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\n# end of Console display driver support\n\n# CONFIG_LOGO is not set\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_HWDEP=m\nCONFIG_SND_RAWMIDI=m\nCONFIG_SND_COMPRESS_OFFLOAD=y\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\nCONFIG_SND_HRTIMER=m\nCONFIG_SND_DYNAMIC_MINORS=y\nCONFIG_SND_MAX_CARDS=32\n# CONFIG_SND_SUPPORT_OLD_API is not set\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_CTL_INPUT_VALIDATION is not set\nCONFIG_SND_VMASTER=y\n# CONFIG_SND_SEQUENCER is not set\n# CONFIG_SND_DRIVERS is not set\n\n#\n# HD-Audio\n#\n# end of HD-Audio\n\nCONFIG_SND_HDA_PREALLOC_SIZE=2048\nCONFIG_SND_ARM=y\n# CONFIG_SND_ARMAACI is not set\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=m\nCONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y\nCONFIG_SND_USB_UA101=m\nCONFIG_SND_USB_CAIAQ=m\nCONFIG_SND_USB_CAIAQ_INPUT=y\nCONFIG_SND_USB_6FIRE=m\nCONFIG_SND_USB_HIFACE=m\nCONFIG_SND_BCD2000=m\nCONFIG_SND_USB_LINE6=m\nCONFIG_SND_USB_POD=m\nCONFIG_SND_USB_PODHD=m\nCONFIG_SND_USB_TONEPORT=m\nCONFIG_SND_USB_VARIAX=m\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\nCONFIG_SND_SOC_COMPRESS=y\n# CONFIG_SND_SOC_ADI is not set\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_AMD_ACP_CONFIG is not set\n# CONFIG_SND_ATMEL_SOC is not set\nCONFIG_SND_BCM2835_SOC_I2S=m\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\nCONFIG_SND_BCM2708_SOC_CHIPDIP_DAC=m\nCONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSHD=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADC=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m\nCONFIG_SND_BCM2708_SOC_PIFI_40=m\nCONFIG_SND_BCM2708_SOC_RPI_CIRRUS=m\nCONFIG_SND_BCM2708_SOC_RPI_DAC=m\nCONFIG_SND_BCM2708_SOC_RPI_PROTO=m\nCONFIG_SND_BCM2708_SOC_JUSTBOOM_BOTH=m\nCONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m\nCONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI=m\nCONFIG_SND_BCM2708_SOC_IQAUDIO_CODEC=m\nCONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m\nCONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI=m\nCONFIG_SND_BCM2708_SOC_I_SABRE_Q2M=m\nCONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m\nCONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m\nCONFIG_SND_AUDIOINJECTOR_OCTO_SOUNDCARD=m\nCONFIG_SND_AUDIOINJECTOR_ISOLATED_SOUNDCARD=m\nCONFIG_SND_AUDIOSENSE_PI=m\nCONFIG_SND_DIGIDAC1_SOUNDCARD=m\nCONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m\nCONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m\nCONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m\nCONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m\nCONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m\nCONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m\nCONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m\nCONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m\nCONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m\nCONFIG_SND_PISOUND=m\nCONFIG_SND_RPI_SIMPLE_SOUNDCARD=m\nCONFIG_SND_RPI_WM8804_SOUNDCARD=m\nCONFIG_SND_DACBERRY400=m\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_AUDMIX is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_FSL_MICFIL is not set\n# CONFIG_SND_SOC_FSL_XCVR is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\nCONFIG_SND_SOC_ARIZONA=m\nCONFIG_SND_SOC_WM_ADSP=m\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_AD193X_SPI is not set\n# CONFIG_SND_SOC_AD193X_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_SPI is not set\nCONFIG_SND_SOC_ADAU1701=m\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\nCONFIG_SND_SOC_ADAU1977=m\nCONFIG_SND_SOC_ADAU1977_I2C=m\nCONFIG_SND_SOC_ADAU7002=m\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4375 is not set\n# CONFIG_SND_SOC_AK4458 is not set\nCONFIG_SND_SOC_AK4554=m\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_AW8738 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS35L41_SPI is not set\n# CONFIG_SND_SOC_CS35L41_I2C is not set\n# CONFIG_SND_SOC_CS35L45_SPI is not set\n# CONFIG_SND_SOC_CS35L45_I2C is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS42L83 is not set\n# CONFIG_SND_SOC_CS4234 is not set\nCONFIG_SND_SOC_CS4265=m\n# CONFIG_SND_SOC_CS4270 is not set\nCONFIG_SND_SOC_CS4271=m\nCONFIG_SND_SOC_CS4271_I2C=m\n# CONFIG_SND_SOC_CS4271_SPI is not set\nCONFIG_SND_SOC_CS42XX8=m\nCONFIG_SND_SOC_CS42XX8_I2C=m\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\nCONFIG_SND_SOC_DA7213=m\nCONFIG_SND_SOC_DMIC=m\nCONFIG_SND_SOC_HDMI_CODEC=y\n# CONFIG_SND_SOC_ES7134 is not set\n# CONFIG_SND_SOC_ES7241 is not set\n# CONFIG_SND_SOC_ES8316 is not set\n# CONFIG_SND_SOC_ES8326 is not set\n# CONFIG_SND_SOC_ES8328_I2C is not set\n# CONFIG_SND_SOC_ES8328_SPI is not set\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_HDA is not set\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\nCONFIG_SND_SOC_MA120X0P=m\n# CONFIG_SND_SOC_MAX98088 is not set\n# CONFIG_SND_SOC_MAX98357A is not set\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98520 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX98396 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\nCONFIG_SND_SOC_PCM179X=m\nCONFIG_SND_SOC_PCM179X_I2C=m\n# CONFIG_SND_SOC_PCM179X_SPI is not set\nCONFIG_SND_SOC_PCM186X=m\nCONFIG_SND_SOC_PCM186X_I2C=m\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3060_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\nCONFIG_SND_SOC_PCM5102A=m\nCONFIG_SND_SOC_PCM512x=m\nCONFIG_SND_SOC_PCM512x_I2C=m\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK3328 is not set\n# CONFIG_SND_SOC_RT5616 is not set\nCONFIG_SND_SOC_PCM1794A=m\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\n# CONFIG_SND_SOC_RT5659 is not set\n# CONFIG_SND_SOC_RT9120 is not set\nCONFIG_SND_SOC_SGTL5000=m\nCONFIG_SND_SOC_SIGMADSP=m\nCONFIG_SND_SOC_SIGMADSP_I2C=m\nCONFIG_SND_SOC_SIMPLE_AMPLIFIER=m\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\nCONFIG_SND_SOC_SPDIF=m\n# CONFIG_SND_SOC_SRC4XXX_I2C is not set\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\nCONFIG_SND_SOC_STA32X=m\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS2780 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\nCONFIG_SND_SOC_TAS571X=m\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805M is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\nCONFIG_SND_SOC_TAS5713=m\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320ADC3XXX is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\nCONFIG_SND_SOC_TLV320AIC32X4=m\nCONFIG_SND_SOC_TLV320AIC32X4_I2C=m\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\nCONFIG_SND_SOC_TLV320AIC3X=m\nCONFIG_SND_SOC_TLV320AIC3X_I2C=m\n# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\nCONFIG_SND_SOC_WM5102=m\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\nCONFIG_SND_SOC_WM8731=m\nCONFIG_SND_SOC_WM8731_I2C=m\n# CONFIG_SND_SOC_WM8731_SPI is not set\n# CONFIG_SND_SOC_WM8737 is not set\nCONFIG_SND_SOC_WM8741=m\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\nCONFIG_SND_SOC_WM8804=m\nCONFIG_SND_SOC_WM8804_I2C=m\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8940 is not set\nCONFIG_SND_SOC_WM8960=m\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_ZL38060 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8821 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\nCONFIG_SND_SOC_TPA6130A2=m\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\nCONFIG_SND_SOC_I_SABRE_CODEC=m\n# end of CODEC drivers\n\nCONFIG_SND_SIMPLE_CARD_UTILS=m\nCONFIG_SND_SIMPLE_CARD=m\nCONFIG_SND_AUDIO_GRAPH_CARD=m\n# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set\n# CONFIG_SND_TEST_COMPONENT is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\n# CONFIG_HID_APPLEIR is not set\nCONFIG_HID_ASUS=y\nCONFIG_HID_AUREAL=y\nCONFIG_HID_BELKIN=y\n# CONFIG_HID_BETOP_FF is not set\nCONFIG_HID_BIGBEN_FF=m\nCONFIG_HID_CHERRY=y\nCONFIG_HID_CHICONY=y\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\nCONFIG_HID_CYPRESS=y\nCONFIG_HID_DRAGONRISE=m\nCONFIG_DRAGONRISE_FF=y\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\nCONFIG_HID_EZKEY=y\n# CONFIG_HID_FT260 is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_GLORIOUS is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\nCONFIG_HID_KYE=y\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_VRC2 is not set\n# CONFIG_HID_XIAOMI is not set\nCONFIG_HID_GYRATION=y\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_ITE is not set\n# CONFIG_HID_JABRA is not set\nCONFIG_HID_TWINHAN=y\nCONFIG_HID_KENSINGTON=y\nCONFIG_HID_LCPOWER=y\n# CONFIG_HID_LED is not set\nCONFIG_HID_LENOVO=y\n# CONFIG_HID_LETSKETCH is not set\nCONFIG_HID_LOGITECH=y\nCONFIG_HID_LOGITECH_DJ=y\nCONFIG_HID_LOGITECH_HIDPP=y\nCONFIG_LOGITECH_FF=y\nCONFIG_LOGIRUMBLEPAD2_FF=y\nCONFIG_LOGIG940_FF=y\nCONFIG_LOGIWHEELS_FF=y\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_MEGAWORLD_FF is not set\n# CONFIG_HID_REDRAGON is not set\nCONFIG_HID_MICROSOFT=y\nCONFIG_HID_MONTEREY=y\nCONFIG_HID_MULTITOUCH=m\nCONFIG_HID_NINTENDO=m\nCONFIG_NINTENDO_FF=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\nCONFIG_HID_ORTEK=y\nCONFIG_HID_OUYA=y\nCONFIG_HID_PANTHERLORD=y\nCONFIG_PANTHERLORD_FF=y\nCONFIG_HID_PENMOUNT=y\nCONFIG_HID_PETALYNX=y\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PXRC is not set\n# CONFIG_HID_RAZER is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\nCONFIG_HID_SAMSUNG=y\n# CONFIG_HID_SEMITEK is not set\n# CONFIG_HID_SIGMAMICRO is not set\nCONFIG_HID_SONY=y\nCONFIG_SONY_FF=y\n# CONFIG_HID_SPEEDLINK is not set\nCONFIG_HID_STEAM=m\n# CONFIG_HID_STEELSERIES is not set\nCONFIG_HID_SUNPLUS=y\nCONFIG_HID_RMI=y\n# CONFIG_HID_GREENASIA is not set\nCONFIG_HID_SMARTJOYPLUS=m\nCONFIG_SMARTJOYPLUS_FF=y\nCONFIG_HID_TIVO=y\nCONFIG_HID_TOPSEED=y\n# CONFIG_HID_TOPRE is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\nCONFIG_HID_WIIMOTE=m\nCONFIG_HID_XINMO=y\n# CONFIG_HID_ZEROPLUS is not set\nCONFIG_HID_ZYDACRON=y\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n# end of USB HID support\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID_OF is not set\n# CONFIG_I2C_HID_OF_ELAN is not set\n# CONFIG_I2C_HID_OF_GOODIX is not set\n# end of I2C HID support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_USB_ULPI_BUS is not set\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\n# CONFIG_USB_OTG is not set\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\nCONFIG_USB_MON=m\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\n# CONFIG_USB_XHCI_HCD is not set\n# CONFIG_USB_EHCI_HCD is not set\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\n# CONFIG_USB_OHCI_HCD is not set\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\nCONFIG_USB_DWCOTG=y\n# CONFIG_USB_HCD_BCMA is not set\n# CONFIG_USB_HCD_SSB is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=m\n# CONFIG_USB_PRINTER is not set\n# CONFIG_USB_WDM is not set\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\n# CONFIG_USB_UAS is not set\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\n# CONFIG_USB_MUSB_HDRC is not set\n# CONFIG_USB_DWC3 is not set\n# CONFIG_USB_DWC2 is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=m\nCONFIG_USB_SERIAL_GENERIC=y\n# CONFIG_USB_SERIAL_SIMPLE is not set\n# CONFIG_USB_SERIAL_AIRCABLE is not set\n# CONFIG_USB_SERIAL_ARK3116 is not set\n# CONFIG_USB_SERIAL_BELKIN is not set\nCONFIG_USB_SERIAL_CH341=m\n# CONFIG_USB_SERIAL_WHITEHEAT is not set\n# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set\nCONFIG_USB_SERIAL_CP210X=m\n# CONFIG_USB_SERIAL_CYPRESS_M8 is not set\n# CONFIG_USB_SERIAL_EMPEG is not set\nCONFIG_USB_SERIAL_FTDI_SIO=m\n# CONFIG_USB_SERIAL_VISOR is not set\n# CONFIG_USB_SERIAL_IPAQ is not set\n# CONFIG_USB_SERIAL_IR is not set\n# CONFIG_USB_SERIAL_EDGEPORT is not set\n# CONFIG_USB_SERIAL_EDGEPORT_TI is not set\n# CONFIG_USB_SERIAL_F81232 is not set\n# CONFIG_USB_SERIAL_F8153X is not set\n# CONFIG_USB_SERIAL_GARMIN is not set\n# CONFIG_USB_SERIAL_IPW is not set\nCONFIG_USB_SERIAL_IUU=m\n# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set\n# CONFIG_USB_SERIAL_KEYSPAN is not set\n# CONFIG_USB_SERIAL_KLSI is not set\n# CONFIG_USB_SERIAL_KOBIL_SCT is not set\n# CONFIG_USB_SERIAL_MCT_U232 is not set\n# CONFIG_USB_SERIAL_METRO is not set\n# CONFIG_USB_SERIAL_MOS7720 is not set\n# CONFIG_USB_SERIAL_MOS7840 is not set\n# CONFIG_USB_SERIAL_MXUPORT is not set\n# CONFIG_USB_SERIAL_NAVMAN is not set\nCONFIG_USB_SERIAL_PL2303=m\n# CONFIG_USB_SERIAL_OTI6858 is not set\n# CONFIG_USB_SERIAL_QCAUX is not set\n# CONFIG_USB_SERIAL_QUALCOMM is not set\n# CONFIG_USB_SERIAL_SPCP8X5 is not set\n# CONFIG_USB_SERIAL_SAFE is not set\n# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set\n# CONFIG_USB_SERIAL_SYMBOL is not set\n# CONFIG_USB_SERIAL_TI is not set\n# CONFIG_USB_SERIAL_CYBERJACK is not set\n# CONFIG_USB_SERIAL_OPTION is not set\n# CONFIG_USB_SERIAL_OMNINET is not set\n# CONFIG_USB_SERIAL_OPTICON is not set\n# CONFIG_USB_SERIAL_XSENS_MT is not set\n# CONFIG_USB_SERIAL_WISHBONE is not set\n# CONFIG_USB_SERIAL_SSU100 is not set\n# CONFIG_USB_SERIAL_QT2 is not set\n# CONFIG_USB_SERIAL_UPD78F0730 is not set\n# CONFIG_USB_SERIAL_XR is not set\n# CONFIG_USB_SERIAL_DEBUG is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\n# CONFIG_USB_EZUSB_FX2 is not set\n# CONFIG_USB_HUB_USB251XB is not set\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n# CONFIG_USB_ONBOARD_HUB is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\nCONFIG_NOP_USB_XCEIV=y\n# CONFIG_AM335X_PHY_USB is not set\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\n# CONFIG_USB_ULPI is not set\n# end of USB Physical Layer drivers\n\n# CONFIG_USB_GADGET is not set\n# CONFIG_TYPEC is not set\n# CONFIG_USB_ROLE_SWITCH is not set\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\nCONFIG_MMC_BCM2835_MMC=y\nCONFIG_MMC_BCM2835_DMA=y\nCONFIG_MMC_BCM2835_PIO_DMA_BARRIER=2\nCONFIG_MMC_BCM2835_SDHOST=y\n# CONFIG_MMC_DEBUG is not set\n# CONFIG_MMC_ARMMMCI is not set\nCONFIG_MMC_SDHCI=y\nCONFIG_MMC_SDHCI_PLTFM=y\n# CONFIG_MMC_SDHCI_OF_ARASAN is not set\n# CONFIG_MMC_SDHCI_OF_AT91 is not set\n# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set\n# CONFIG_MMC_SDHCI_CADENCE is not set\n# CONFIG_MMC_SDHCI_F_SDH30 is not set\n# CONFIG_MMC_SDHCI_MILBEAUT is not set\n# CONFIG_MMC_SDHCI_IPROC is not set\n# CONFIG_MMC_SPI is not set\n# CONFIG_MMC_DW is not set\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_REALTEK_USB=m\n# CONFIG_MMC_CQHCI is not set\n# CONFIG_MMC_HSQ is not set\n# CONFIG_MMC_BCM2835 is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MMC_SDHCI_XENON is not set\n# CONFIG_MMC_SDHCI_OMAP is not set\n# CONFIG_MMC_SDHCI_AM654 is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\nCONFIG_LEDS_CLASS_FLASH=y\n# CONFIG_LEDS_CLASS_MULTICOLOR is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AN30259A is not set\n# CONFIG_LEDS_AW2013 is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_EL15203000 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_LP55XX_COMMON is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\n# CONFIG_LEDS_PWM is not set\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_SPI_BYTE is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\n# CONFIG_LEDS_AAT1290 is not set\n# CONFIG_LEDS_AS3645A is not set\n# CONFIG_LEDS_KTD2692 is not set\n# CONFIG_LEDS_LM3601X is not set\n# CONFIG_LEDS_RT4505 is not set\n# CONFIG_LEDS_RT8515 is not set\n# CONFIG_LEDS_SGM3140 is not set\n\n#\n# RGB LED drivers\n#\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\nCONFIG_LEDS_TRIGGER_TIMER=y\nCONFIG_LEDS_TRIGGER_ONESHOT=y\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\nCONFIG_LEDS_TRIGGER_BACKLIGHT=y\nCONFIG_LEDS_TRIGGER_CPU=y\n# CONFIG_LEDS_TRIGGER_ACTIVITY is not set\nCONFIG_LEDS_TRIGGER_GPIO=y\nCONFIG_LEDS_TRIGGER_DEFAULT_ON=y\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\nCONFIG_LEDS_TRIGGER_TRANSIENT=y\nCONFIG_LEDS_TRIGGER_CAMERA=y\nCONFIG_LEDS_TRIGGER_INPUT=y\n# CONFIG_LEDS_TRIGGER_PANIC is not set\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\n# CONFIG_LEDS_TRIGGER_AUDIO is not set\n# CONFIG_LEDS_TRIGGER_TTY is not set\nCONFIG_LEDS_TRIGGER_ACTPWR=y\n\n#\n# Simple LED drivers\n#\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_ATOMIC_SCRUB=y\nCONFIG_EDAC_SUPPORT=y\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\nCONFIG_RTC_DRV_ABX80X=m\nCONFIG_RTC_DRV_DS1307=m\n# CONFIG_RTC_DRV_DS1307_CENTURY is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_HYM8563 is not set\n# CONFIG_RTC_DRV_MAX6900 is not set\n# CONFIG_RTC_DRV_NCT3018Y is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\nCONFIG_RTC_DRV_PCF8523=m\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\nCONFIG_RTC_DRV_PCF8563=m\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\nCONFIG_RTC_DRV_DS3232=m\nCONFIG_RTC_DRV_DS3232_HWMON=y\nCONFIG_RTC_DRV_PCF2127=m\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_CMOS is not set\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\n# CONFIG_RTC_DRV_PL031 is not set\n# CONFIG_RTC_DRV_CADENCE is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_VIRTUAL_CHANNELS=y\nCONFIG_DMA_OF=y\n# CONFIG_ALTERA_MSGDMA is not set\n# CONFIG_AMBA_PL08X is not set\nCONFIG_DMA_BCM2835=y\n# CONFIG_DW_AXI_DMAC is not set\n# CONFIG_FSL_EDMA is not set\n# CONFIG_FSL_QDMA is not set\n# CONFIG_INTEL_IDMA64 is not set\n# CONFIG_NBPFAXI_DMA is not set\n# CONFIG_PL330_DMA is not set\nCONFIG_DMA_BCM2708=y\n# CONFIG_XILINX_ZYNQMP_DPDMA is not set\n# CONFIG_QCOM_HIDMA_MGMT is not set\n# CONFIG_QCOM_HIDMA is not set\n# CONFIG_DW_DMAC is not set\n# CONFIG_SF_PDMA is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\n# CONFIG_UDMABUF is not set\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\nCONFIG_DMABUF_HEAPS=y\n# CONFIG_DMABUF_SYSFS_STATS is not set\nCONFIG_DMABUF_HEAPS_SYSTEM=y\nCONFIG_DMABUF_HEAPS_CMA=y\n# end of DMABUF options\n\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\n# CONFIG_VIRTIO_MENU is not set\n# CONFIG_VDPA is not set\nCONFIG_VHOST_MENU=y\n# CONFIG_VHOST_NET is not set\n# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# end of Microsoft Hyper-V guest support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_RTLLIB is not set\nCONFIG_RTL8723BS=m\nCONFIG_R8712U=m\nCONFIG_R8188EU=m\nCONFIG_VT6656=m\nCONFIG_STAGING_MEDIA=y\n# CONFIG_VIDEO_MAX96712 is not set\n# CONFIG_VIDEO_RPIVID is not set\n# CONFIG_STAGING_MEDIA_DEPRECATED is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_KS7010 is not set\nCONFIG_BCM_VIDEOCORE=y\nCONFIG_BCM2835_VCHIQ=y\nCONFIG_VCHIQ_CDEV=y\nCONFIG_SND_BCM2835=m\n# CONFIG_VIDEO_BCM2835 is not set\nCONFIG_BCM_VC_SM_CMA=y\nCONFIG_VIDEO_CODEC_BCM2835=m\nCONFIG_VIDEO_ISP_BCM2835=m\nCONFIG_BCM2835_VCHIQ_MMAL=y\n# CONFIG_PI433 is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_FIELDBUS_DEV is not set\n# CONFIG_GOLDFISH is not set\n# CONFIG_CHROME_PLATFORMS is not set\n# CONFIG_MELLANOX_PLATFORM is not set\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Clock driver for ARM Reference designs\n#\n# CONFIG_CLK_ICST is not set\n# CONFIG_CLK_SP810 is not set\n# end of Clock driver for ARM Reference designs\n\n# CONFIG_LMK04832 is not set\n# CONFIG_COMMON_CLK_MAX9485 is not set\nCONFIG_COMMON_CLK_HIFIBERRY_DACPLUSHD=m\nCONFIG_COMMON_CLK_HIFIBERRY_DACPRO=m\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\n# CONFIG_COMMON_CLK_AXI_CLKGEN is not set\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_RS9_PCIE is not set\n# CONFIG_COMMON_CLK_VC5 is not set\n# CONFIG_COMMON_CLK_VC7 is not set\n# CONFIG_COMMON_CLK_FIXED_MMIO is not set\n# CONFIG_CLK_BCM2711_DVP is not set\nCONFIG_CLK_BCM2835=y\nCONFIG_CLK_RASPBERRYPI=y\n# CONFIG_XILINX_VCU is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\n# CONFIG_HWSPINLOCK is not set\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\nCONFIG_CLKSRC_MMIO=y\nCONFIG_BCM2835_TIMER=y\nCONFIG_ARM_TIMER_SP804=y\n# CONFIG_MICROCHIP_PIT64B is not set\n# end of Clock Source drivers\n\nCONFIG_MAILBOX=y\n# CONFIG_ARM_MHU is not set\n# CONFIG_ARM_MHU_V2 is not set\n# CONFIG_PLATFORM_MHU is not set\n# CONFIG_PL320_MBOX is not set\n# CONFIG_ALTERA_MBOX is not set\nCONFIG_BCM2835_MBOX=y\n# CONFIG_MAILBOX_TEST is not set\n# CONFIG_IOMMU_SUPPORT is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\n# CONFIG_RPMSG_QCOM_GLINK_RPM is not set\n# CONFIG_RPMSG_VIRTIO is not set\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\nCONFIG_BCM2835_POWER=y\nCONFIG_RASPBERRYPI_POWER=y\n# CONFIG_SOC_BRCMSTB is not set\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# CONFIG_QUICC_ENGINE is not set\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# fujitsu SoC drivers\n#\n# end of fujitsu SoC drivers\n\n#\n# i.MX SoC drivers\n#\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# CONFIG_LITEX_SOC_CONTROLLER is not set\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# end of Qualcomm SoC drivers\n\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\n# CONFIG_PM_DEVFREQ is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_FSA9480 is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_PTN5150 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\n# CONFIG_EXTCON_USB_GPIO is not set\n# CONFIG_MEMORY is not set\n# CONFIG_IIO is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_DEBUG is not set\n# CONFIG_PWM_ATMEL_TCB is not set\nCONFIG_PWM_BCM2835=m\n# CONFIG_PWM_CLK is not set\n# CONFIG_PWM_FSL_FTM is not set\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_PWM_RASPBERRYPI_POE=m\n# CONFIG_PWM_RP1 is not set\n# CONFIG_PWM_XILINX is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\n# CONFIG_AL_FIC is not set\nCONFIG_BRCMSTB_L2_IRQ=y\n# CONFIG_XILINX_INTC is not set\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\nCONFIG_RESET_CONTROLLER=y\n# CONFIG_RESET_BRCMSTB is not set\n# CONFIG_RESET_RASPBERRYPI is not set\n# CONFIG_RESET_SIMPLE is not set\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_RESET_TI_TPS380X is not set\n\n#\n# PHY Subsystem\n#\n# CONFIG_GENERIC_PHY is not set\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\n\n#\n# PHY drivers for Broadcom platforms\n#\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# CONFIG_PHY_BRCM_USB is not set\n# end of PHY drivers for Broadcom platforms\n\n# CONFIG_PHY_CADENCE_TORRENT is not set\n# CONFIG_PHY_CADENCE_DPHY is not set\n# CONFIG_PHY_CADENCE_DPHY_RX is not set\n# CONFIG_PHY_CADENCE_SIERRA is not set\n# CONFIG_PHY_CADENCE_SALVO is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\n# end of PHY Subsystem\n\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCN is not set\nCONFIG_ARM_PMU=y\nCONFIG_RPI_AXIPERF=m\n# end of Performance monitor support\n\n# CONFIG_RAS is not set\n\n#\n# Android\n#\n# CONFIG_ANDROID_BINDER_IPC is not set\n# end of Android\n\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\n# CONFIG_NVMEM_RMEM is not set\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\n# CONFIG_PECI is not set\n# CONFIG_HTE is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_VALIDATE_FS_PARSER=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\nCONFIG_XFS_SUPPORT_V4=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\nCONFIG_F2FS_FS=y\nCONFIG_F2FS_STAT_FS=y\n# CONFIG_F2FS_FS_XATTR is not set\nCONFIG_F2FS_CHECK_FS=y\n# CONFIG_F2FS_FAULT_INJECTION is not set\n# CONFIG_F2FS_FS_COMPRESSION is not set\nCONFIG_F2FS_IOSTAT=y\n# CONFIG_F2FS_UNFAIR_RWSEM is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\n# CONFIG_QUOTA is not set\n# CONFIG_AUTOFS4_FS is not set\nCONFIG_AUTOFS_FS=y\nCONFIG_FUSE_FS=m\n# CONFIG_CUSE is not set\n# CONFIG_VIRTIO_FS is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n\n#\n# Caches\n#\nCONFIG_NETFS_SUPPORT=y\n# CONFIG_NETFS_STATS is not set\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_CACHEFILES is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=y\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=m\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=m\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\nCONFIG_MEMFD_CREATE=y\nCONFIG_CONFIGFS_FS=y\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\nCONFIG_HFS_FS=y\nCONFIG_HFSPLUS_FS=y\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\n# CONFIG_SQUASHFS_FILE_CACHE is not set\nCONFIG_SQUASHFS_FILE_DIRECT=y\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\nCONFIG_PSTORE=y\nCONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240\nCONFIG_PSTORE_DEFLATE_COMPRESS=y\n# CONFIG_PSTORE_LZO_COMPRESS is not set\n# CONFIG_PSTORE_LZ4_COMPRESS is not set\n# CONFIG_PSTORE_LZ4HC_COMPRESS is not set\n# CONFIG_PSTORE_842_COMPRESS is not set\n# CONFIG_PSTORE_ZSTD_COMPRESS is not set\nCONFIG_PSTORE_COMPRESS=y\nCONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y\nCONFIG_PSTORE_COMPRESS_DEFAULT=\"deflate\"\nCONFIG_PSTORE_CONSOLE=y\n# CONFIG_PSTORE_PMSG is not set\n# CONFIG_PSTORE_FTRACE is not set\nCONFIG_PSTORE_RAM=y\n# CONFIG_PSTORE_BLK is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EROFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\nCONFIG_NFS_SWAP=y\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\nCONFIG_NFS_V4_1_MIGRATION=y\nCONFIG_ROOT_NFS=y\nCONFIG_NFS_FSCACHE=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFS_DISABLE_UDP_SUPPORT=y\n# CONFIG_NFS_V4_2_READ_PLUS is not set\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_COMMON=y\nCONFIG_NFS_V4_2_SSC_HELPER=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\nCONFIG_SUNRPC_SWAP=y\nCONFIG_RPCSEC_GSS_KRB5=m\n# CONFIG_SUNRPC_DISABLE_INSECURE_ENCTYPES is not set\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS2=y\nCONFIG_CIFS_ALLOW_INSECURE_LEGACY=y\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\nCONFIG_CIFS_DEBUG=y\n# CONFIG_CIFS_DEBUG2 is not set\n# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\n# CONFIG_CIFS_SWN_UPCALL is not set\nCONFIG_CIFS_FSCACHE=y\n# CONFIG_CIFS_ROOT is not set\n# CONFIG_SMB_SERVER is not set\nCONFIG_SMBFS=y\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_KEYS_REQUEST_CACHE is not set\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\nCONFIG_KEY_DH_OPERATIONS=y\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY is not set\nCONFIG_SECURITYFS=y\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_LSM=\"yama,loadpin,safesetid,integrity\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n\nCONFIG_RANDSTRUCT_NONE=y\n# CONFIG_RANDSTRUCT_FULL is not set\n# CONFIG_RANDSTRUCT_PERFORMANCE is not set\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_CRYPTD is not set\n# CONFIG_CRYPTO_AUTHENC is not set\n# CONFIG_CRYPTO_TEST is not set\n# end of Crypto core or helper\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_DH=y\n# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set\nCONFIG_CRYPTO_ECC=m\nCONFIG_CRYPTO_ECDH=m\n# CONFIG_CRYPTO_ECDSA is not set\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\n# CONFIG_CRYPTO_CURVE25519 is not set\n# end of Public-key cryptography\n\n#\n# Block ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\n# CONFIG_CRYPTO_ARIA is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\n# CONFIG_CRYPTO_SM4_GENERIC is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n# end of Block ciphers\n\n#\n# Length-preserving ciphers and modes\n#\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_ARC4 is not set\n# CONFIG_CRYPTO_CHACHA20 is not set\nCONFIG_CRYPTO_CBC=y\nCONFIG_CRYPTO_CFB=m\nCONFIG_CRYPTO_CTR=y\nCONFIG_CRYPTO_CTS=m\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_HCTR2 is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_OFB is not set\n# CONFIG_CRYPTO_PCBC is not set\n# CONFIG_CRYPTO_XTS is not set\n# end of Length-preserving ciphers and modes\n\n#\n# AEAD (authenticated encryption with associated data) ciphers\n#\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=m\n# CONFIG_CRYPTO_ESSIV is not set\n# end of AEAD (authenticated encryption with associated data) ciphers\n\n#\n# Hashes, digests, and MACs\n#\nCONFIG_CRYPTO_BLAKE2B=m\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\n# CONFIG_CRYPTO_POLY1305 is not set\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\n# CONFIG_CRYPTO_SM3_GENERIC is not set\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_VMAC is not set\n# CONFIG_CRYPTO_WP512 is not set\n# CONFIG_CRYPTO_XCBC is not set\nCONFIG_CRYPTO_XXHASH=m\n# end of Hashes, digests, and MACs\n\n#\n# CRCs (cyclic redundancy checks)\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=y\n# CONFIG_CRYPTO_CRCT10DIF is not set\n# end of CRCs (cyclic redundancy checks)\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=y\nCONFIG_CRYPTO_LZO=m\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n# end of Compression\n\n#\n# Random number generation\n#\n# CONFIG_CRYPTO_ANSI_CPRNG is not set\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_KDF800108_CTR=y\n# end of Random number generation\n\n#\n# Userspace interface\n#\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\nCONFIG_CRYPTO_USER_API_AEAD=y\nCONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y\n# end of Userspace interface\n\nCONFIG_CRYPTO_HASH_INFO=y\n\n#\n# Accelerated Cryptographic Algorithms for CPU (arm)\n#\nCONFIG_CRYPTO_POLY1305_ARM=m\nCONFIG_CRYPTO_BLAKE2S_ARM=y\nCONFIG_CRYPTO_SHA1_ARM=m\nCONFIG_CRYPTO_SHA256_ARM=m\n# CONFIG_CRYPTO_SHA512_ARM is not set\nCONFIG_CRYPTO_AES_ARM=m\nCONFIG_CRYPTO_CHACHA20_NEON=m\n# end of Accelerated Cryptographic Algorithms for CPU (arm)\n\n# CONFIG_CRYPTO_HW is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n# CONFIG_FIPS_SIGNATURE_SELFTEST is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\nCONFIG_RAID6_PQ_BENCHMARK=y\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_CORDIC=m\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_UTILS=y\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=m\nCONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=m\nCONFIG_CRYPTO_LIB_CHACHA=m\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=m\nCONFIG_CRYPTO_LIB_CURVE25519=m\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=m\nCONFIG_CRYPTO_LIB_POLY1305=m\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=m\nCONFIG_CRYPTO_LIB_SHA1=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_CRC_CCITT=m\nCONFIG_CRC16=y\n# CONFIG_CRC_T10DIF is not set\n# CONFIG_CRC64_ROCKSOFT is not set\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC64 is not set\n# CONFIG_CRC4 is not set\n# CONFIG_CRC7 is not set\nCONFIG_LIBCRC32C=m\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=m\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMMON=y\nCONFIG_ZSTD_COMPRESS=m\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\n# CONFIG_XZ_DEC_X86 is not set\n# CONFIG_XZ_DEC_POWERPC is not set\n# CONFIG_XZ_DEC_IA64 is not set\n# CONFIG_XZ_DEC_ARM is not set\n# CONFIG_XZ_DEC_ARMTHUMB is not set\n# CONFIG_XZ_DEC_SPARC is not set\n# CONFIG_XZ_DEC_MICROLZMA is not set\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_REED_SOLOMON=y\nCONFIG_REED_SOLOMON_ENC8=y\nCONFIG_REED_SOLOMON_DEC8=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_DMA_OPS=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_DMA_DECLARE_COHERENT=y\nCONFIG_ARCH_HAS_SETUP_DMA_OPS=y\nCONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y\nCONFIG_DMA_NONCOHERENT_MMAP=y\nCONFIG_DMA_CMA=y\n# CONFIG_DMA_PERNUMA_CMA is not set\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=5\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\nCONFIG_SG_POOL=y\nCONFIG_STACKDEPOT=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\n# CONFIG_STACKTRACE_BUILD_ID is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\nCONFIG_DYNAMIC_DEBUG_CORE=y\nCONFIG_SYMBOLIC_ERRNAME=y\n# CONFIG_DEBUG_BUGVERBOSE is not set\n# end of printk and dmesg options\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_AS_HAS_NON_CONST_LEB128=y\nCONFIG_DEBUG_INFO_NONE=y\n# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\nCONFIG_FRAME_WARN=1024\nCONFIG_STRIP_ASM_SYMS=y\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_VMLINUX_MAP is not set\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=\"\"\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_KCSAN_COMPILER=y\n# end of Generic Kernel Debugging Instruments\n\n#\n# Networking Debugging\n#\n# CONFIG_NET_DEV_REFCNT_TRACKER is not set\n# CONFIG_NET_NS_REFCNT_TRACKER is not set\n# CONFIG_DEBUG_NET is not set\n# end of Networking Debugging\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_PAGE_REF is not set\n# CONFIG_DEBUG_WX is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SHRINKER_DEBUG is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\n# CONFIG_DEBUG_VM is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\n# CONFIG_DEBUG_MEMORY_INIT is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\n# CONFIG_SOFTLOCKUP_DETECTOR is not set\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\n# CONFIG_SCHED_DEBUG is not set\n# CONFIG_SCHEDSTATS is not set\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_RWSEMS is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_DEBUG_MAPLE_TREE is not set\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_HAVE_BUILDTIME_MCOUNT_SORT=y\nCONFIG_BUILDTIME_MCOUNT_SORT=y\nCONFIG_TRACER_MAX_TRACE=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_RING_BUFFER_ALLOW_SWAP=y\nCONFIG_TRACING=y\nCONFIG_GENERIC_TRACER=y\nCONFIG_TRACING_SUPPORT=y\nCONFIG_FTRACE=y\nCONFIG_BOOTTIME_TRACING=y\nCONFIG_FUNCTION_TRACER=y\nCONFIG_FUNCTION_GRAPH_TRACER=y\nCONFIG_DYNAMIC_FTRACE=y\nCONFIG_DYNAMIC_FTRACE_WITH_REGS=y\n# CONFIG_FUNCTION_PROFILER is not set\nCONFIG_STACK_TRACER=y\n# CONFIG_IRQSOFF_TRACER is not set\n# CONFIG_SCHED_TRACER is not set\n# CONFIG_HWLAT_TRACER is not set\n# CONFIG_OSNOISE_TRACER is not set\n# CONFIG_TIMERLAT_TRACER is not set\n# CONFIG_FTRACE_SYSCALLS is not set\nCONFIG_TRACER_SNAPSHOT=y\nCONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP=y\nCONFIG_BRANCH_PROFILE_NONE=y\n# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set\n# CONFIG_PROFILE_ALL_BRANCHES is not set\nCONFIG_BLK_DEV_IO_TRACE=y\nCONFIG_KPROBE_EVENTS=y\n# CONFIG_KPROBE_EVENTS_ON_NOTRACE is not set\n# CONFIG_UPROBE_EVENTS is not set\nCONFIG_BPF_EVENTS=y\nCONFIG_DYNAMIC_EVENTS=y\nCONFIG_PROBE_EVENTS=y\nCONFIG_FTRACE_MCOUNT_RECORD=y\nCONFIG_FTRACE_MCOUNT_USE_RECORDMCOUNT=y\n# CONFIG_SYNTH_EVENTS is not set\n# CONFIG_HIST_TRIGGERS is not set\n# CONFIG_TRACE_EVENT_INJECT is not set\n# CONFIG_TRACEPOINT_BENCHMARK is not set\n# CONFIG_RING_BUFFER_BENCHMARK is not set\n# CONFIG_TRACE_EVAL_MAP_FILE is not set\n# CONFIG_FTRACE_RECORD_RECURSION is not set\n# CONFIG_FTRACE_STARTUP_TEST is not set\n# CONFIG_FTRACE_SORT_STARTUP_TEST is not set\n# CONFIG_RING_BUFFER_STARTUP_TEST is not set\n# CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is not set\n# CONFIG_PREEMPTIRQ_DELAY_TEST is not set\n# CONFIG_KPROBE_EVENT_GEN_TEST is not set\n# CONFIG_RV is not set\n# CONFIG_SAMPLES is not set\n# CONFIG_STRICT_DEVMEM is not set\n\n#\n# arm Debugging\n#\n# CONFIG_ARM_PTDUMP_DEBUGFS is not set\nCONFIG_UNWINDER_FRAME_POINTER=y\n# CONFIG_UNWINDER_ARM is not set\n# CONFIG_BACKTRACE_VERBOSE is not set\n# CONFIG_DEBUG_USER is not set\n# CONFIG_DEBUG_LL is not set\nCONFIG_DEBUG_LL_INCLUDE=\"mach/debug-macro.S\"\nCONFIG_UNCOMPRESS_INCLUDE=\"debug/uncompress.h\"\n# CONFIG_ARM_KPROBES_TEST is not set\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_CORESIGHT is not set\n# end of arm Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\n# CONFIG_RUNTIME_TESTING_MENU is not set\nCONFIG_ARCH_USE_MEMTEST=y\n# CONFIG_MEMTEST is not set\n# end of Kernel Testing and Coverage\n\n#\n# Rust hacking\n#\n# end of Rust hacking\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/RPi/devices/RPi/options",
    "content": "################################################################################\n# Device defaults\n################################################################################\n\n  # NOOBS supported hex versions (legacy)\n    NOOBS_HEX=\"2,3,4,5,6,7,8,9,d,e,f,10,11,12,14,19,0092,0093\"\n\n  # NOOBS supported model versions\n    NOOBS_SUPPORTED_MODELS='\"Pi Model\",\"Pi Compute Module\",\"Pi Zero\"'\n"
  },
  {
    "path": "projects/RPi/devices/RPi2/config/distroconfig-composite.txt",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)\n\n# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!\ndisplay_auto_detect=1\ndtoverlay=vc4-kms-v3d,cma-384,composite=1\ndtoverlay=\ndisable_overscan=1\ndisable_fw_kms_setup=1\n"
  },
  {
    "path": "projects/RPi/devices/RPi2/config/distroconfig.txt",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)\n\n# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!\ndisplay_auto_detect=1\ndtoverlay=vc4-kms-v3d,cma-384\ndtoverlay=\ndisable_overscan=1\ndisable_fw_kms_setup=1\n"
  },
  {
    "path": "projects/RPi/devices/RPi2/linux/linux.arm.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm 6.1.66 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"arm-linux-gnueabihf-gcc (GCC) 13.0.0 20220604 (experimental) [master revision aec868578d8515763d75693c1fdfbc30ff0a1e68]\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=130000\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23850\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23850\nCONFIG_LLD_VERSION=0\nCONFIG_CC_CAN_LINK=y\nCONFIG_CC_CAN_LINK_STATIC=y\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_BUILD_SALT=\"\"\nCONFIG_HAVE_KERNEL_GZIP=y\nCONFIG_HAVE_KERNEL_LZMA=y\nCONFIG_HAVE_KERNEL_XZ=y\nCONFIG_HAVE_KERNEL_LZO=y\nCONFIG_HAVE_KERNEL_LZ4=y\nCONFIG_KERNEL_GZIP=y\n# CONFIG_KERNEL_LZMA is not set\n# CONFIG_KERNEL_XZ is not set\n# CONFIG_KERNEL_LZO is not set\n# CONFIG_KERNEL_LZ4 is not set\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\n# CONFIG_WATCH_QUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_IRQ_IPI=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_GENERIC_IRQ_MULTI_HANDLER=y\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\nCONFIG_CONTEXT_TRACKING=y\nCONFIG_CONTEXT_TRACKING_IDLE=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\n# CONFIG_BPF_JIT is not set\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# end of BPF subsystem\n\nCONFIG_PREEMPT_VOLUNTARY_BUILD=y\n# CONFIG_PREEMPT_NONE is not set\nCONFIG_PREEMPT_VOLUNTARY=y\n# CONFIG_PREEMPT is not set\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\n# CONFIG_BSD_PROCESS_ACCT is not set\n# CONFIG_TASKSTATS is not set\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_RUDE_RCU=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\n# end of RCU Subsystem\n\nCONFIG_IKCONFIG=m\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=17\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# end of Scheduler features\n\nCONFIG_CC_IMPLICIT_FALLTHROUGH=\"-Wimplicit-fallthrough=5\"\nCONFIG_GCC11_NO_ARRAY_BOUNDS=y\nCONFIG_CC_NO_ARRAY_BOUNDS=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\n# CONFIG_CGROUP_FAVOR_DYNMODS is not set\nCONFIG_MEMCG=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_BLK_CGROUP=y\nCONFIG_CGROUP_WRITEBACK=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\nCONFIG_CGROUP_PIDS=y\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_CGROUP_PERF=y\nCONFIG_CGROUP_BPF=y\n# CONFIG_CGROUP_MISC is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_CHECKPOINT_RESTORE is not set\n# CONFIG_SCHED_AUTOGROUP is not set\n# CONFIG_SYSFS_DEPRECATED is not set\nCONFIG_RELAY=y\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"@INITRAMFS_SOURCE@\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\n# CONFIG_RD_GZIP is not set\n# CONFIG_RD_BZIP2 is not set\n# CONFIG_RD_LZMA is not set\n# CONFIG_RD_XZ is not set\n# CONFIG_RD_LZO is not set\n# CONFIG_RD_LZ4 is not set\n# CONFIG_RD_ZSTD is not set\nCONFIG_INITRAMFS_COMPRESSION_NONE=y\nCONFIG_BOOT_CONFIG=y\n# CONFIG_BOOT_CONFIG_EMBED is not set\nCONFIG_INITRAMFS_PRESERVE_MTIME=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_EXPERT=y\n# CONFIG_UID16 is not set\nCONFIG_MULTIUSER=y\n# CONFIG_SGETMASK_SYSCALL is not set\n# CONFIG_SYSFS_SYSCALL is not set\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\n# CONFIG_KALLSYMS_ALL is not set\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_DEBUG_RSEQ is not set\nCONFIG_EMBEDDED=y\nCONFIG_HAVE_PERF_EVENTS=y\nCONFIG_PERF_USE_VMALLOC=y\n# CONFIG_PC104 is not set\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_SYSTEM_DATA_VERIFICATION=y\nCONFIG_PROFILING=y\nCONFIG_TRACEPOINTS=y\n# end of General setup\n\nCONFIG_ARM=y\nCONFIG_ARM_HAS_GROUP_RELOCS=y\nCONFIG_SYS_SUPPORTS_APM_EMULATION=y\nCONFIG_HAVE_PROC_CPU=y\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_FIQ=y\nCONFIG_ARM_PATCH_PHYS_VIRT=y\nCONFIG_GENERIC_BUG=y\nCONFIG_PGTABLE_LEVELS=2\n\n#\n# System Type\n#\nCONFIG_MMU=y\nCONFIG_ARCH_MMAP_RND_BITS_MIN=8\nCONFIG_ARCH_MMAP_RND_BITS_MAX=15\nCONFIG_ARCH_MULTIPLATFORM=y\n\n#\n# Platform selection\n#\n\n#\n# CPU Core family selection\n#\n# CONFIG_ARCH_MULTI_V6 is not set\nCONFIG_ARCH_MULTI_V7=y\nCONFIG_ARCH_MULTI_V6_V7=y\n# end of Platform selection\n\n# CONFIG_ARCH_VIRT is not set\n# CONFIG_ARCH_AIROHA is not set\n# CONFIG_ARCH_ACTIONS is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_ARTPEC is not set\n# CONFIG_ARCH_ASPEED is not set\n# CONFIG_ARCH_AT91 is not set\nCONFIG_ARCH_BCM=y\n\n#\n# IPROC architected SoCs\n#\n# CONFIG_ARCH_BCM_CYGNUS is not set\n# CONFIG_ARCH_BCM_HR2 is not set\n# CONFIG_ARCH_BCM_NSP is not set\n# CONFIG_ARCH_BCM_5301X is not set\n\n#\n# KONA architected SoCs\n#\n# CONFIG_ARCH_BCM_281XX is not set\n# CONFIG_ARCH_BCM_21664 is not set\n# CONFIG_ARCH_BCM_23550 is not set\n\n#\n# Other Architectures\n#\nCONFIG_ARCH_BCM2835=y\n# CONFIG_ARCH_BCM_53573 is not set\n# CONFIG_ARCH_BCM_63XX is not set\n# CONFIG_ARCH_BRCMSTB is not set\n# CONFIG_ARCH_BCMBCA is not set\n\n#\n# BCMBCA sub platforms\n#\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_DIGICOLOR is not set\n# CONFIG_ARCH_DOVE is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_HIGHBANK is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_HPE is not set\n# CONFIG_ARCH_MXC is not set\n# CONFIG_ARCH_KEYSTONE is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_MESON is not set\n# CONFIG_ARCH_MILBEAUT is not set\n# CONFIG_ARCH_MMP is not set\n# CONFIG_ARCH_MSTARV7 is not set\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_NPCM is not set\n\n#\n# TI OMAP/AM/DM/DRA Family\n#\n# CONFIG_ARCH_OMAP3 is not set\n# CONFIG_ARCH_OMAP4 is not set\n# CONFIG_SOC_OMAP5 is not set\n# CONFIG_SOC_AM33XX is not set\n# CONFIG_SOC_AM43XX is not set\n# CONFIG_SOC_DRA7XX is not set\n# end of TI OMAP/AM/DM/DRA Family\n\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_RDA is not set\n# CONFIG_ARCH_REALTEK is not set\n# CONFIG_ARCH_ROCKCHIP is not set\n# CONFIG_ARCH_S5PV210 is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_INTEL_SOCFPGA is not set\n# CONFIG_PLAT_SPEAR is not set\n# CONFIG_ARCH_STI is not set\n# CONFIG_ARCH_STM32 is not set\n# CONFIG_ARCH_SUNPLUS is not set\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_U8500 is not set\n# CONFIG_ARCH_REALVIEW is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_WM8850 is not set\n# CONFIG_ARCH_ZYNQ is not set\n\n#\n# Processor Type\n#\nCONFIG_CPU_V7=y\nCONFIG_CPU_THUMB_CAPABLE=y\nCONFIG_CPU_32v6K=y\nCONFIG_CPU_32v7=y\nCONFIG_CPU_ABRT_EV7=y\nCONFIG_CPU_PABRT_V7=y\nCONFIG_CPU_CACHE_V7=y\nCONFIG_CPU_CACHE_VIPT=y\nCONFIG_CPU_COPY_V6=y\nCONFIG_CPU_TLB_V7=y\nCONFIG_CPU_HAS_ASID=y\nCONFIG_CPU_CP15=y\nCONFIG_CPU_CP15_MMU=y\n\n#\n# Processor Features\n#\n# CONFIG_ARM_LPAE is not set\nCONFIG_ARM_THUMB=y\n# CONFIG_ARM_THUMBEE is not set\nCONFIG_ARM_VIRT_EXT=y\nCONFIG_SWP_EMULATE=y\nCONFIG_CPU_LITTLE_ENDIAN=y\n# CONFIG_CPU_BIG_ENDIAN is not set\n# CONFIG_CPU_ICACHE_DISABLE is not set\n# CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND is not set\n# CONFIG_CPU_BPREDICT_DISABLE is not set\nCONFIG_CPU_SPECTRE=y\nCONFIG_HARDEN_BRANCH_PREDICTOR=y\nCONFIG_HARDEN_BRANCH_HISTORY=y\nCONFIG_KUSER_HELPERS=y\nCONFIG_VDSO=y\nCONFIG_MIGHT_HAVE_CACHE_L2X0=y\n# CONFIG_CACHE_L2X0 is not set\nCONFIG_ARM_L1_CACHE_SHIFT_6=y\nCONFIG_ARM_L1_CACHE_SHIFT=6\nCONFIG_ARM_DMA_MEM_BUFFERABLE=y\nCONFIG_DEBUG_ALIGN_RODATA=y\n# CONFIG_ARM_ERRATA_430973 is not set\n# CONFIG_ARM_ERRATA_643719 is not set\n# CONFIG_ARM_ERRATA_720789 is not set\n# CONFIG_ARM_ERRATA_754322 is not set\n# CONFIG_ARM_ERRATA_754327 is not set\n# CONFIG_ARM_ERRATA_764369 is not set\n# CONFIG_ARM_ERRATA_764319 is not set\n# CONFIG_ARM_ERRATA_775420 is not set\n# CONFIG_ARM_ERRATA_798181 is not set\n# CONFIG_ARM_ERRATA_773022 is not set\n# CONFIG_ARM_ERRATA_818325_852422 is not set\n# CONFIG_ARM_ERRATA_821420 is not set\n# CONFIG_ARM_ERRATA_825619 is not set\n# CONFIG_ARM_ERRATA_857271 is not set\n# CONFIG_ARM_ERRATA_852421 is not set\n# CONFIG_ARM_ERRATA_852423 is not set\n# CONFIG_ARM_ERRATA_857272 is not set\n# end of System Type\n\n#\n# Bus support\n#\n# CONFIG_ARM_ERRATA_814220 is not set\n# end of Bus support\n\n#\n# Kernel Features\n#\nCONFIG_HAVE_SMP=y\nCONFIG_SMP=y\nCONFIG_SMP_ON_UP=y\nCONFIG_CURRENT_POINTER_IN_TPIDRURO=y\nCONFIG_IRQSTACKS=y\nCONFIG_ARM_CPU_TOPOLOGY=y\n# CONFIG_SCHED_MC is not set\n# CONFIG_SCHED_SMT is not set\nCONFIG_HAVE_ARM_ARCH_TIMER=y\n# CONFIG_MCPM is not set\n# CONFIG_BIG_LITTLE is not set\n# CONFIG_VMSPLIT_3G is not set\n# CONFIG_VMSPLIT_3G_OPT is not set\nCONFIG_VMSPLIT_2G=y\n# CONFIG_VMSPLIT_1G is not set\nCONFIG_PAGE_OFFSET=0x80000000\nCONFIG_NR_CPUS=4\n# CONFIG_HOTPLUG_CPU is not set\n# CONFIG_ARM_PSCI is not set\nCONFIG_ARCH_NR_GPIO=0\nCONFIG_HZ_FIXED=0\n# CONFIG_HZ_100 is not set\n# CONFIG_HZ_200 is not set\n# CONFIG_HZ_250 is not set\nCONFIG_HZ_300=y\n# CONFIG_HZ_500 is not set\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=300\nCONFIG_SCHED_HRTICK=y\n# CONFIG_THUMB2_KERNEL is not set\nCONFIG_ARM_PATCH_IDIV=y\nCONFIG_AEABI=y\n# CONFIG_OABI_COMPAT is not set\nCONFIG_ARCH_SELECT_MEMORY_MODEL=y\nCONFIG_ARCH_FLATMEM_ENABLE=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\n# CONFIG_HIGHMEM is not set\n# CONFIG_CPU_SW_DOMAIN_PAN is not set\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_ARM_MODULE_PLTS=y\nCONFIG_ARCH_FORCE_MAX_ORDER=11\nCONFIG_ALIGNMENT_TRAP=y\nCONFIG_UACCESS_WITH_MEMCPY=y\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\n# CONFIG_XEN is not set\nCONFIG_CC_HAVE_STACKPROTECTOR_TLS=y\nCONFIG_STACKPROTECTOR_PER_TASK=y\n# end of Kernel Features\n\n#\n# Boot options\n#\nCONFIG_USE_OF=y\nCONFIG_ATAGS=y\n# CONFIG_UNUSED_BOARD_FILES is not set\n# CONFIG_DEPRECATED_PARAM_STRUCT is not set\nCONFIG_ZBOOT_ROM_TEXT=0x0\nCONFIG_ZBOOT_ROM_BSS=0x0\n# CONFIG_ARM_APPENDED_DTB is not set\nCONFIG_CMDLINE=\"\"\n# CONFIG_CRASH_DUMP is not set\nCONFIG_AUTO_ZRELADDR=y\n# CONFIG_EFI is not set\n# end of Boot options\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=y\n# CONFIG_CPU_FREQ_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\nCONFIG_CPUFREQ_DT_PLATDEV=y\nCONFIG_ARM_RASPBERRYPI_CPUFREQ=y\n# end of CPU Frequency scaling\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\nCONFIG_CPU_IDLE_GOV_LADDER=y\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\n\n#\n# ARM CPU Idle Drivers\n#\n# CONFIG_ARM_CPUIDLE is not set\n# end of ARM CPU Idle Drivers\n# end of CPU Idle\n# end of CPU Power Management\n\n#\n# Floating point emulation\n#\n\n#\n# At least one emulation must be selected\n#\nCONFIG_VFP=y\nCONFIG_VFPv3=y\nCONFIG_NEON=y\nCONFIG_KERNEL_MODE_NEON=y\n# end of Floating point emulation\n\n#\n# Power management options\n#\n# CONFIG_SUSPEND is not set\n# CONFIG_HIBERNATION is not set\nCONFIG_PM=y\n# CONFIG_PM_DEBUG is not set\n# CONFIG_APM_EMULATION is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\n# CONFIG_ENERGY_MODEL is not set\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\n# end of Power management options\n\nCONFIG_AS_VFP_VMRS_FPINST=y\n\n#\n# General architecture-dependent options\n#\nCONFIG_KPROBES=y\nCONFIG_JUMP_LABEL=y\n# CONFIG_STATIC_KEYS_SELFTEST is not set\nCONFIG_OPTPROBES=y\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_ARCH_USE_BUILTIN_BSWAP=y\nCONFIG_KRETPROBES=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_HAVE_OPTPROBES=y\nCONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_KEEPINITRD=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_ARCH_HAS_CPU_FINALIZE_INIT=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_32BIT_OFF_T=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_ARCH_WANT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_LTO_NONE=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_REL=y\nCONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y\nCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_HAVE_EXIT_THREAD=y\nCONFIG_ARCH_MMAP_RND_BITS=8\nCONFIG_PAGE_SIZE_LESS_THAN_64KB=y\nCONFIG_PAGE_SIZE_LESS_THAN_256KB=y\nCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_ARCH_OPTIONAL_KERNEL_RWX=y\nCONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_HAVE_ARCH_PFN_VALID=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\nCONFIG_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/sbin/modprobe\"\n# CONFIG_TRIM_UNUSED_KSYMS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\nCONFIG_BLOCK_LEGACY_AUTOLOAD=y\nCONFIG_BLK_CGROUP_RWSTAT=y\nCONFIG_BLK_DEV_BSG_COMMON=y\nCONFIG_BLK_ICQ=y\nCONFIG_BLK_DEV_BSGLIB=y\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_DEV_ZONED is not set\nCONFIG_BLK_DEV_THROTTLING=y\n# CONFIG_BLK_DEV_THROTTLING_LOW is not set\n# CONFIG_BLK_WBT is not set\n# CONFIG_BLK_CGROUP_IOLATENCY is not set\n# CONFIG_BLK_CGROUP_IOCOST is not set\n# CONFIG_BLK_CGROUP_IOPRIO is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\nCONFIG_MAC_PARTITION=y\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\nCONFIG_LDM_PARTITION=y\n# CONFIG_LDM_DEBUG is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\n# CONFIG_CMDLINE_PARTITION is not set\n# end of Partition Types\n\nCONFIG_BLK_PM=y\nCONFIG_BLOCK_HOLDER_DEPRECATED=y\nCONFIG_BLK_MQ_STACKING=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\nCONFIG_IOSCHED_BFQ=y\n# CONFIG_BFQ_GROUP_IOSCHED is not set\n# end of IO Schedulers\n\nCONFIG_ASN1=y\nCONFIG_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_INLINE_READ_UNLOCK=y\nCONFIG_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_INLINE_WRITE_UNLOCK=y\nCONFIG_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\n# CONFIG_BINFMT_ELF_FDPIC is not set\nCONFIG_ELFCORE=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\nCONFIG_ARCH_HAS_BINFMT_FLAT=y\n# CONFIG_BINFMT_FLAT is not set\nCONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\nCONFIG_SWAP=y\n# CONFIG_ZSWAP is not set\n\n#\n# SLAB allocator options\n#\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# end of SLAB allocator options\n\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\n# CONFIG_COMPAT_BRK is not set\nCONFIG_SELECT_MEMORY_MODEL=y\nCONFIG_FLATMEM_MANUAL=y\n# CONFIG_SPARSEMEM_MANUAL is not set\nCONFIG_FLATMEM=y\nCONFIG_ARCH_KEEP_MEMBLOCK=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_COMPACTION=y\nCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1\n# CONFIG_PAGE_REPORTING is not set\nCONFIG_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_WANT_GENERAL_HUGETLB=y\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\nCONFIG_CMA_DEBUGFS=y\n# CONFIG_CMA_SYSFS is not set\nCONFIG_CMA_AREAS=7\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y\nCONFIG_ZONE_DMA=y\nCONFIG_VM_EVENT_COUNTERS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_USERFAULTFD is not set\n# CONFIG_LRU_GEN is not set\nCONFIG_LOCK_MM_AND_FIND_VMA=y\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_INTERFACE is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_XFRM_ESP=y\n# CONFIG_NET_KEY is not set\n# CONFIG_XDP_SOCKETS is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=m\nCONFIG_IP_MROUTE_COMMON=y\nCONFIG_IP_MROUTE=y\n# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set\n# CONFIG_IP_PIMSM_V1 is not set\n# CONFIG_IP_PIMSM_V2 is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=y\n# CONFIG_INET_ESP_OFFLOAD is not set\n# CONFIG_INET_ESPINTCP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=m\n# CONFIG_INET_DIAG is not set\nCONFIG_TCP_CONG_ADVANCED=y\n# CONFIG_TCP_CONG_BIC is not set\nCONFIG_TCP_CONG_CUBIC=y\n# CONFIG_TCP_CONG_WESTWOOD is not set\nCONFIG_TCP_CONG_HTCP=m\nCONFIG_TCP_CONG_HSTCP=m\n# CONFIG_TCP_CONG_HYBLA is not set\nCONFIG_TCP_CONG_VEGAS=m\n# CONFIG_TCP_CONG_NV is not set\nCONFIG_TCP_CONG_SCALABLE=m\n# CONFIG_TCP_CONG_LP is not set\nCONFIG_TCP_CONG_VENO=m\nCONFIG_TCP_CONG_YEAH=m\nCONFIG_TCP_CONG_ILLINOIS=m\n# CONFIG_TCP_CONG_DCTCP is not set\nCONFIG_TCP_CONG_CDG=m\n# CONFIG_TCP_CONG_BBR is not set\nCONFIG_DEFAULT_CUBIC=y\n# CONFIG_DEFAULT_RENO is not set\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_IPV6_VTI is not set\nCONFIG_IPV6_SIT=m\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\nCONFIG_IPV6_FOU=m\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_MPTCP is not set\n# CONFIG_NETWORK_SECMARK is not set\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\n# CONFIG_NETFILTER_INGRESS is not set\nCONFIG_NETFILTER_EGRESS=y\nCONFIG_NETFILTER_NETLINK=m\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\nCONFIG_NETFILTER_NETLINK_LOG=m\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\n# CONFIG_NF_LOG_SYSLOG is not set\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_ZONES is not set\n# CONFIG_NF_CONNTRACK_PROCFS is not set\n# CONFIG_NF_CONNTRACK_EVENTS is not set\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\n# CONFIG_NF_CT_PROTO_DCCP is not set\n# CONFIG_NF_CT_PROTO_SCTP is not set\n# CONFIG_NF_CT_PROTO_UDPLITE is not set\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\nCONFIG_NF_CONNTRACK_IRC=m\nCONFIG_NF_CONNTRACK_BROADCAST=m\nCONFIG_NF_CONNTRACK_NETBIOS_NS=m\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\nCONFIG_NF_CONNTRACK_SIP=m\nCONFIG_NF_CONNTRACK_TFTP=m\nCONFIG_NF_CT_NETLINK=m\n# CONFIG_NETFILTER_NETLINK_GLUE_CT is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_IRC=m\nCONFIG_NF_NAT_SIP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=y\nCONFIG_NF_NAT_MASQUERADE=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\nCONFIG_NETFILTER_XT_MATCH_IPRANGE=m\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\nCONFIG_NETFILTER_XT_MATCH_OWNER=m\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\nCONFIG_NETFILTER_XT_MATCH_STATE=m\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\nCONFIG_IP_VS=m\n# CONFIG_IP_VS_IPV6 is not set\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_MH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n# CONFIG_IP_VS_TWOS is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS MH scheduler\n#\nCONFIG_IP_VS_MH_TAB_INDEX=12\n\n#\n# IPVS application helper\n#\n# CONFIG_IP_VS_FTP is not set\nCONFIG_IP_VS_NFCT=y\n# CONFIG_IP_VS_PE_SIP is not set\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\n# CONFIG_NF_LOG_IPV6 is not set\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_MATCH_SRH is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\nCONFIG_NET_SCH_FQ_CODEL=y\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_FLOW is not set\nCONFIG_NET_CLS_CGROUP=m\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\nCONFIG_NET_L3_MASTER_DEV=y\n# CONFIG_QRTR is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_PCPU_DEV_REFCNT=y\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_SOCK_RX_QUEUE_MAPPING=y\nCONFIG_XPS=y\nCONFIG_CGROUP_NET_PRIO=y\nCONFIG_CGROUP_NET_CLASSID=y\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\nCONFIG_BT_RFCOMM_TTY=y\n# CONFIG_BT_BNEP is not set\nCONFIG_BT_HIDP=m\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_LEDS is not set\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\n# CONFIG_BT_DEBUGFS is not set\n# CONFIG_BT_SELFTEST is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_MTK=m\nCONFIG_BT_HCIBTUSB=m\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\nCONFIG_BT_HCIBTUSB_MTK=y\nCONFIG_BT_HCIBTUSB_RTL=y\n# CONFIG_BT_HCIBTSDIO is not set\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_SERDEV=y\nCONFIG_BT_HCIUART_H4=y\n# CONFIG_BT_HCIUART_NOKIA is not set\n# CONFIG_BT_HCIUART_BCSP is not set\n# CONFIG_BT_HCIUART_ATH3K is not set\n# CONFIG_BT_HCIUART_LL is not set\nCONFIG_BT_HCIUART_3WIRE=y\n# CONFIG_BT_HCIUART_INTEL is not set\nCONFIG_BT_HCIUART_BCM=y\n# CONFIG_BT_HCIUART_RTL is not set\n# CONFIG_BT_HCIUART_QCA is not set\n# CONFIG_BT_HCIUART_AG6XX is not set\n# CONFIG_BT_HCIUART_MRVL is not set\nCONFIG_BT_HCIBCM203X=m\n# CONFIG_BT_HCIBPA10X is not set\nCONFIG_BT_HCIBFUSB=m\n# CONFIG_BT_HCIVHCI is not set\n# CONFIG_BT_MRVL is not set\nCONFIG_BT_ATH3K=m\nCONFIG_BT_MTKSDIO=m\n# CONFIG_BT_MTKUART is not set\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=m\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\n# CONFIG_CFG80211_CRDA_SUPPORT is not set\nCONFIG_CFG80211_WEXT=y\nCONFIG_LIB80211=m\nCONFIG_LIB80211_CRYPT_WEP=m\nCONFIG_LIB80211_CRYPT_CCMP=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=m\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=m\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_PAGE_POOL=y\n# CONFIG_PAGE_POOL_STATS is not set\n# CONFIG_FAILOVER is not set\nCONFIG_ETHTOOL_NETLINK=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\nCONFIG_HAVE_PCI=y\n# CONFIG_PCI is not set\n# CONFIG_PCCARD is not set\n\n#\n# Generic Driver Options\n#\n# CONFIG_UEVENT_HELPER is not set\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\n# CONFIG_DEVTMPFS_SAFE is not set\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\n# CONFIG_FW_UPLOAD is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\n# CONFIG_ALLOW_DEV_COREDUMP is not set\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_MOXTET is not set\n# CONFIG_VEXPRESS_CONFIG is not set\n# CONFIG_MHI_BUS is not set\n# CONFIG_MHI_BUS_EP is not set\n# end of Bus devices\n\n# CONFIG_CONNECTOR is not set\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\n# CONFIG_ARM_SCMI_PROTOCOL is not set\n# end of ARM System Control and Management Interface Protocol\n\n# CONFIG_ARM_SCPI_PROTOCOL is not set\n# CONFIG_FIRMWARE_MEMMAP is not set\nCONFIG_RASPBERRYPI_FIRMWARE=y\n# CONFIG_FW_CFG_SYSFS is not set\n# CONFIG_TRUSTED_FOUNDATIONS is not set\nCONFIG_CS_DSP=m\n# CONFIG_GOOGLE_FIRMWARE is not set\nCONFIG_HAVE_ARM_SMCCC=y\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\n# CONFIG_MTD is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_DYNAMIC=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\nCONFIG_OF_RESOLVE=y\nCONFIG_OF_OVERLAY=y\nCONFIG_OF_CONFIGFS=y\nCONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_CDROM=y\n# CONFIG_ZRAM is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=0\n# CONFIG_BLK_DEV_DRBD is not set\nCONFIG_BLK_DEV_NBD=y\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=16\nCONFIG_BLK_DEV_RAM_SIZE=4096\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_UBLK is not set\n\n#\n# NVME Support\n#\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TCP is not set\n# CONFIG_NVME_TARGET is not set\n# end of NVME Support\n\n#\n# Misc devices\n#\nCONFIG_BCM2835_SMI=m\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\n# CONFIG_SRAM is not set\n# CONFIG_XILINX_SDFEC is not set\nCONFIG_MISC_RTSX=y\n# CONFIG_OPEN_DICE is not set\n# CONFIG_VCPU_STALL_DETECTOR is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\n# CONFIG_EEPROM_AT25 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_EEPROM_EE1004 is not set\n# end of EEPROM support\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n# CONFIG_ECHO is not set\nCONFIG_MISC_RTSX_USB=y\n# CONFIG_PVPANIC is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_PROC_FS is not set\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_CHR_DEV_SG=m\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\n# CONFIG_SCSI_SCAN_ASYNC is not set\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\nCONFIG_SCSI_ISCSI_ATTRS=y\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\nCONFIG_SCSI_LOWLEVEL=y\nCONFIG_ISCSI_TCP=y\nCONFIG_ISCSI_BOOT_SYSFS=y\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\n# CONFIG_ATA is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\n# CONFIG_DM_DEBUG is not set\nCONFIG_DM_BUFIO=m\n# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\n# CONFIG_DM_UNSTRIPED is not set\n# CONFIG_DM_CRYPT is not set\n# CONFIG_DM_SNAPSHOT is not set\nCONFIG_DM_THIN_PROVISIONING=m\n# CONFIG_DM_CACHE is not set\n# CONFIG_DM_WRITECACHE is not set\n# CONFIG_DM_EBS is not set\n# CONFIG_DM_ERA is not set\n# CONFIG_DM_CLONE is not set\n# CONFIG_DM_MIRROR is not set\n# CONFIG_DM_RAID is not set\n# CONFIG_DM_ZERO is not set\n# CONFIG_DM_MULTIPATH is not set\n# CONFIG_DM_DELAY is not set\n# CONFIG_DM_DUST is not set\n# CONFIG_DM_UEVENT is not set\n# CONFIG_DM_FLAKEY is not set\n# CONFIG_DM_VERITY is not set\n# CONFIG_DM_SWITCH is not set\n# CONFIG_DM_LOG_WRITES is not set\n# CONFIG_DM_INTEGRITY is not set\n# CONFIG_TARGET_CORE is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\nCONFIG_DUMMY=m\nCONFIG_WIREGUARD=m\n# CONFIG_WIREGUARD_DEBUG is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\n# CONFIG_MACVTAP is not set\nCONFIG_IPVLAN_L3S=y\nCONFIG_IPVLAN=m\n# CONFIG_IPVTAP is not set\nCONFIG_VXLAN=m\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_AMT is not set\n# CONFIG_MACSEC is not set\nCONFIG_NETCONSOLE=y\nCONFIG_NETCONSOLE_DYNAMIC=y\nCONFIG_NETPOLL=y\nCONFIG_NET_POLL_CONTROLLER=y\nCONFIG_TUN=y\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\nCONFIG_NLMON=m\n# CONFIG_ETHERNET is not set\nCONFIG_PHYLINK=m\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_ADIN_PHY is not set\n# CONFIG_ADIN1100_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=m\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM54140_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MARVELL_88X2222_PHY is not set\n# CONFIG_MAXLINEAR_GPHY is not set\n# CONFIG_MEDIATEK_GE_PHY is not set\n# CONFIG_MICREL_PHY is not set\nCONFIG_MICROCHIP_PHY=y\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_MOTORCOMM_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_NXP_TJA11XX_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_QSEMI_PHY is not set\n# CONFIG_REALTEK_PHY is not set\n# CONFIG_RENESAS_PHY is not set\n# CONFIG_ROCKCHIP_PHY is not set\nCONFIG_SMSC_PHY=y\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_DP83TD510_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\n# CONFIG_PSE_CONTROLLER is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_OF_MDIO=y\nCONFIG_MDIO_DEVRES=y\n# CONFIG_MDIO_BITBANG is not set\n# CONFIG_MDIO_BCM_UNIMAC is not set\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_IPQ4019 is not set\n# CONFIG_MDIO_IPQ8064 is not set\n\n#\n# MDIO Multiplexers\n#\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n\n#\n# PCS device drivers\n#\n# end of PCS device drivers\n\nCONFIG_PPP=m\nCONFIG_PPP_BSDCOMP=m\nCONFIG_PPP_DEFLATE=m\n# CONFIG_PPP_FILTER is not set\nCONFIG_PPP_MPPE=m\n# CONFIG_PPP_MULTILINK is not set\nCONFIG_PPPOE=m\nCONFIG_PPP_ASYNC=m\n# CONFIG_PPP_SYNC_TTY is not set\n# CONFIG_SLIP is not set\nCONFIG_SLHC=m\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\n# CONFIG_USB_PEGASUS is not set\n# CONFIG_USB_RTL8150 is not set\nCONFIG_USB_RTL8152=m\nCONFIG_USB_LAN78XX=y\nCONFIG_USB_USBNET=y\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\n# CONFIG_USB_NET_CDC_EEM is not set\n# CONFIG_USB_NET_CDC_NCM is not set\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\nCONFIG_USB_NET_DM9601=y\n# CONFIG_USB_NET_SR9700 is not set\n# CONFIG_USB_NET_SR9800 is not set\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=y\n# CONFIG_USB_NET_GL620A is not set\n# CONFIG_USB_NET_NET1080 is not set\n# CONFIG_USB_NET_PLUSB is not set\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\n# CONFIG_USB_NET_CDC_SUBSET is not set\n# CONFIG_USB_NET_ZAURUS is not set\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\nCONFIG_USB_HSO=m\n# CONFIG_USB_NET_INT51X1 is not set\nCONFIG_USB_IPHETH=m\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\n# CONFIG_USB_NET_AQC111 is not set\nCONFIG_USB_RTL8153_ECM=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\nCONFIG_ATH9K=m\nCONFIG_ATH9K_AHB=y\n# CONFIG_ATH9K_DEBUGFS is not set\n# CONFIG_ATH9K_DYNACK is not set\n# CONFIG_ATH9K_WOW is not set\nCONFIG_ATH9K_RFKILL=y\nCONFIG_ATH9K_CHANNEL_CONTEXT=y\nCONFIG_ATH9K_PCOEM=y\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\nCONFIG_ATH9K_HWRNG=y\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\nCONFIG_CARL9170_HWRNG=y\nCONFIG_ATH6KL=m\n# CONFIG_ATH6KL_SDIO is not set\nCONFIG_ATH6KL_USB=m\n# CONFIG_ATH6KL_DEBUG is not set\n# CONFIG_ATH6KL_TRACING is not set\nCONFIG_AR5523=m\n# CONFIG_ATH10K is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\n# CONFIG_AT76C50X_USB is not set\nCONFIG_WLAN_VENDOR_BROADCOM=y\nCONFIG_B43=m\nCONFIG_B43_BCMA=y\nCONFIG_B43_SSB=y\nCONFIG_B43_BUSES_BCMA_AND_SSB=y\n# CONFIG_B43_BUSES_BCMA is not set\n# CONFIG_B43_BUSES_SSB is not set\n# CONFIG_B43_SDIO is not set\nCONFIG_B43_BCMA_PIO=y\nCONFIG_B43_PIO=y\nCONFIG_B43_PHY_G=y\nCONFIG_B43_PHY_N=y\nCONFIG_B43_PHY_LP=y\nCONFIG_B43_PHY_HT=y\nCONFIG_B43_LEDS=y\nCONFIG_B43_HWRNG=y\n# CONFIG_B43_DEBUG is not set\n# CONFIG_B43LEGACY is not set\nCONFIG_BRCMUTIL=m\n# CONFIG_BRCMSMAC is not set\nCONFIG_BRCMFMAC=m\nCONFIG_BRCMFMAC_PROTO_BCDC=y\nCONFIG_BRCMFMAC_SDIO=y\nCONFIG_BRCMFMAC_USB=y\n# CONFIG_BRCM_TRACING is not set\n# CONFIG_BRCMDBG is not set\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\nCONFIG_WLAN_VENDOR_INTERSIL=y\n# CONFIG_HOSTAP is not set\nCONFIG_P54_COMMON=m\nCONFIG_P54_USB=m\n# CONFIG_P54_SPI is not set\nCONFIG_P54_LEDS=y\nCONFIG_WLAN_VENDOR_MARVELL=y\n# CONFIG_LIBERTAS is not set\n# CONFIG_LIBERTAS_THINFIRM is not set\n# CONFIG_MWIFIEX is not set\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_MT76_CORE=m\nCONFIG_MT76_LEDS=y\nCONFIG_MT76_USB=m\nCONFIG_MT76x02_LIB=m\nCONFIG_MT76x02_USB=m\nCONFIG_MT76_CONNAC_LIB=m\nCONFIG_MT76x0_COMMON=m\nCONFIG_MT76x0U=m\nCONFIG_MT76x2_COMMON=m\nCONFIG_MT76x2U=m\nCONFIG_MT7615_COMMON=m\nCONFIG_MT7663_USB_SDIO_COMMON=m\nCONFIG_MT7663U=m\n# CONFIG_MT7663S is not set\n# CONFIG_MT7921S is not set\n# CONFIG_MT7921U is not set\nCONFIG_WLAN_VENDOR_MICROCHIP=y\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\nCONFIG_WLAN_VENDOR_PURELIFI=y\n# CONFIG_PLFXLC is not set\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=m\n# CONFIG_RTL8192CU is not set\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\nCONFIG_RTW88=m\n# CONFIG_RTW89 is not set\nCONFIG_WLAN_VENDOR_RSI=y\n# CONFIG_RSI_91X is not set\nCONFIG_WLAN_VENDOR_SILABS=y\n# CONFIG_WFX is not set\nCONFIG_WLAN_VENDOR_ST=y\n# CONFIG_CW1200 is not set\nCONFIG_WLAN_VENDOR_TI=y\n# CONFIG_WL1251 is not set\n# CONFIG_WL12XX is not set\n# CONFIG_WL18XX is not set\n# CONFIG_WLCORE is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\nCONFIG_USB_ZD1201=m\nCONFIG_ZD1211RW=m\n# CONFIG_ZD1211RW_DEBUG is not set\n# CONFIG_WLAN_VENDOR_QUANTENNA is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\n# CONFIG_NETDEVSIM is not set\n# CONFIG_NET_FAILOVER is not set\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\n# CONFIG_INPUT_MATRIXKMAP is not set\n\n#\n# Userland interfaces\n#\nCONFIG_INPUT_MOUSEDEV=y\n# CONFIG_INPUT_MOUSEDEV_PSAUX is not set\nCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024\nCONFIG_INPUT_MOUSEDEV_SCREEN_Y=768\nCONFIG_INPUT_JOYDEV=y\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\n# CONFIG_KEYBOARD_ATKBD is not set\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=m\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_PINEPHONE is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\n# CONFIG_KEYBOARD_CYPRESS_SF is not set\n# CONFIG_INPUT_MOUSE is not set\nCONFIG_INPUT_JOYSTICK=y\n# CONFIG_JOYSTICK_ANALOG is not set\n# CONFIG_JOYSTICK_A3D is not set\n# CONFIG_JOYSTICK_ADI is not set\n# CONFIG_JOYSTICK_COBRA is not set\n# CONFIG_JOYSTICK_GF2K is not set\n# CONFIG_JOYSTICK_GRIP is not set\n# CONFIG_JOYSTICK_GRIP_MP is not set\n# CONFIG_JOYSTICK_GUILLEMOT is not set\n# CONFIG_JOYSTICK_INTERACT is not set\n# CONFIG_JOYSTICK_SIDEWINDER is not set\n# CONFIG_JOYSTICK_TMDC is not set\n# CONFIG_JOYSTICK_IFORCE is not set\n# CONFIG_JOYSTICK_WARRIOR is not set\n# CONFIG_JOYSTICK_MAGELLAN is not set\n# CONFIG_JOYSTICK_SPACEORB is not set\n# CONFIG_JOYSTICK_SPACEBALL is not set\n# CONFIG_JOYSTICK_STINGER is not set\n# CONFIG_JOYSTICK_TWIDJOY is not set\n# CONFIG_JOYSTICK_ZHENHUA is not set\n# CONFIG_JOYSTICK_AS5011 is not set\n# CONFIG_JOYSTICK_JOYDUMP is not set\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\nCONFIG_JOYSTICK_PSXPAD_SPI=m\nCONFIG_JOYSTICK_PSXPAD_SPI_FF=y\n# CONFIG_JOYSTICK_PXRC is not set\n# CONFIG_JOYSTICK_QWIIC is not set\n# CONFIG_JOYSTICK_FSIA6B is not set\n# CONFIG_JOYSTICK_SENSEHAT is not set\n# CONFIG_JOYSTICK_RPISENSE is not set\n# CONFIG_INPUT_TABLET is not set\nCONFIG_INPUT_TOUCHSCREEN=y\nCONFIG_TOUCHSCREEN_ADS7846=m\n# CONFIG_TOUCHSCREEN_AD7877 is not set\n# CONFIG_TOUCHSCREEN_AD7879 is not set\n# CONFIG_TOUCHSCREEN_AR1021_I2C is not set\n# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set\n# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_BU21013 is not set\n# CONFIG_TOUCHSCREEN_BU21029 is not set\n# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMA140 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set\n# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set\n# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set\n# CONFIG_TOUCHSCREEN_DYNAPRO is not set\n# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set\n# CONFIG_TOUCHSCREEN_EETI is not set\nCONFIG_TOUCHSCREEN_EGALAX=m\n# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set\n# CONFIG_TOUCHSCREEN_EXC3000 is not set\n# CONFIG_TOUCHSCREEN_FUJITSU is not set\n# CONFIG_TOUCHSCREEN_GOODIX is not set\n# CONFIG_TOUCHSCREEN_HIDEEP is not set\n# CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set\n# CONFIG_TOUCHSCREEN_ILI210X is not set\n# CONFIG_TOUCHSCREEN_ILITEK is not set\n# CONFIG_TOUCHSCREEN_S6SY761 is not set\n# CONFIG_TOUCHSCREEN_GUNZE is not set\n# CONFIG_TOUCHSCREEN_EKTF2127 is not set\n# CONFIG_TOUCHSCREEN_ELAN is not set\n# CONFIG_TOUCHSCREEN_ELO is not set\n# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set\n# CONFIG_TOUCHSCREEN_WACOM_I2C is not set\n# CONFIG_TOUCHSCREEN_MAX11801 is not set\n# CONFIG_TOUCHSCREEN_MCS5000 is not set\n# CONFIG_TOUCHSCREEN_MMS114 is not set\n# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set\n# CONFIG_TOUCHSCREEN_MSG2638 is not set\n# CONFIG_TOUCHSCREEN_MTOUCH is not set\n# CONFIG_TOUCHSCREEN_IMAGIS is not set\n# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set\n# CONFIG_TOUCHSCREEN_INEXIO is not set\n# CONFIG_TOUCHSCREEN_MK712 is not set\n# CONFIG_TOUCHSCREEN_PENMOUNT is not set\nCONFIG_TOUCHSCREEN_EDT_FT5X06=m\nCONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m\n# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set\n# CONFIG_TOUCHSCREEN_TOUCHWIN is not set\n# CONFIG_TOUCHSCREEN_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set\nCONFIG_TOUCHSCREEN_USB_COMPOSITE=m\nCONFIG_TOUCHSCREEN_USB_EGALAX=y\n# CONFIG_TOUCHSCREEN_USB_PANJIT is not set\nCONFIG_TOUCHSCREEN_USB_3M=y\n# CONFIG_TOUCHSCREEN_USB_ITM is not set\n# CONFIG_TOUCHSCREEN_USB_ETURBO is not set\n# CONFIG_TOUCHSCREEN_USB_GUNZE is not set\n# CONFIG_TOUCHSCREEN_USB_DMC_TSC10 is not set\n# CONFIG_TOUCHSCREEN_USB_IRTOUCH is not set\n# CONFIG_TOUCHSCREEN_USB_IDEALTEK is not set\n# CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH is not set\n# CONFIG_TOUCHSCREEN_USB_GOTOP is not set\n# CONFIG_TOUCHSCREEN_USB_JASTEC is not set\n# CONFIG_TOUCHSCREEN_USB_ELO is not set\n# CONFIG_TOUCHSCREEN_USB_E2I is not set\n# CONFIG_TOUCHSCREEN_USB_ZYTRONIC is not set\n# CONFIG_TOUCHSCREEN_USB_ETT_TC45USB is not set\n# CONFIG_TOUCHSCREEN_USB_NEXIO is not set\n# CONFIG_TOUCHSCREEN_USB_EASYTOUCH is not set\n# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set\n# CONFIG_TOUCHSCREEN_TSC_SERIO is not set\n# CONFIG_TOUCHSCREEN_TSC2004 is not set\n# CONFIG_TOUCHSCREEN_TSC2005 is not set\n# CONFIG_TOUCHSCREEN_TSC2007 is not set\n# CONFIG_TOUCHSCREEN_RM_TS is not set\n# CONFIG_TOUCHSCREEN_SILEAD is not set\n# CONFIG_TOUCHSCREEN_SIS_I2C is not set\nCONFIG_TOUCHSCREEN_ST1232=m\n# CONFIG_TOUCHSCREEN_STMFTS is not set\n# CONFIG_TOUCHSCREEN_SUR40 is not set\n# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set\n# CONFIG_TOUCHSCREEN_SX8654 is not set\n# CONFIG_TOUCHSCREEN_TPS6507X is not set\n# CONFIG_TOUCHSCREEN_ZET6223 is not set\n# CONFIG_TOUCHSCREEN_ZFORCE is not set\n# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set\n# CONFIG_TOUCHSCREEN_IQS5XX is not set\n# CONFIG_TOUCHSCREEN_ZINITIX is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ARIZONA_HAPTICS is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\nCONFIG_INPUT_GPIO_ROTARY_ENCODER=m\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_IQS7222 is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\n# CONFIG_INPUT_RASPBERRYPI_BUTTON is not set\nCONFIG_RMI4_CORE=y\n# CONFIG_RMI4_I2C is not set\n# CONFIG_RMI4_SPI is not set\n# CONFIG_RMI4_SMB is not set\nCONFIG_RMI4_F03=y\nCONFIG_RMI4_F03_SERIO=y\nCONFIG_RMI4_2D_SENSOR=y\nCONFIG_RMI4_F11=y\nCONFIG_RMI4_F12=y\nCONFIG_RMI4_F30=y\n# CONFIG_RMI4_F34 is not set\n# CONFIG_RMI4_F3A is not set\n# CONFIG_RMI4_F55 is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_SERIO_SERPORT=y\n# CONFIG_SERIO_AMBAKMI is not set\n# CONFIG_SERIO_LIBPS2 is not set\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_SERIO_GPIO_PS2 is not set\n# CONFIG_USERIO is not set\n# CONFIG_GAMEPORT is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_BRCM_CHAR_DRIVERS=y\nCONFIG_BCM2708_VCMEM=y\nCONFIG_BCM_VCIO=y\nCONFIG_BCM2835_SMI_DEV=m\n# CONFIG_RPIVID_MEM is not set\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\n# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set\nCONFIG_SERIAL_8250_16550A_VARIANTS=y\n# CONFIG_SERIAL_8250_FINTEK is not set\nCONFIG_SERIAL_8250_CONSOLE=y\n# CONFIG_SERIAL_8250_DMA is not set\nCONFIG_SERIAL_8250_NR_UARTS=1\nCONFIG_SERIAL_8250_RUNTIME_UARTS=0\nCONFIG_SERIAL_8250_EXTENDED=y\n# CONFIG_SERIAL_8250_MANY_PORTS is not set\nCONFIG_SERIAL_8250_SHARE_IRQ=y\n# CONFIG_SERIAL_8250_DETECT_IRQ is not set\n# CONFIG_SERIAL_8250_RSA is not set\nCONFIG_SERIAL_8250_BCM2835AUX=y\nCONFIG_SERIAL_8250_FSL=y\n# CONFIG_SERIAL_8250_DW is not set\n# CONFIG_SERIAL_8250_RT288X is not set\nCONFIG_SERIAL_OF_PLATFORM=y\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\nCONFIG_SERIAL_AMBA_PL011=y\nCONFIG_SERIAL_AMBA_PL011_CONSOLE=y\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_SIFIVE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_ST_ASC is not set\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\nCONFIG_SERIAL_MCTRL_GPIO=y\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NULL_TTY is not set\n# CONFIG_HVC_DCC is not set\nCONFIG_SERIAL_DEV_BUS=y\nCONFIG_SERIAL_DEV_CTRL_TTYPORT=y\n# CONFIG_TTY_PRINTK is not set\n# CONFIG_VIRTIO_CONSOLE is not set\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_BA431 is not set\nCONFIG_HW_RANDOM_BCM2835=y\nCONFIG_HW_RANDOM_IPROC_RNG200=y\n# CONFIG_HW_RANDOM_CCTRNG is not set\n# CONFIG_HW_RANDOM_XIPHERA is not set\nCONFIG_DEVMEM=y\n# CONFIG_TCG_TPM is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\nCONFIG_RANDOM_TRUST_CPU=y\nCONFIG_RANDOM_TRUST_BOOTLOADER=y\nCONFIG_RASPBERRYPI_GPIOMEM=y\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\n# CONFIG_I2C_COMPAT is not set\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\nCONFIG_I2C_MUX_PINCTRL=y\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_DEMUX_PINCTRL is not set\n# CONFIG_I2C_MUX_MLXCPLD is not set\n# end of Multiplexer I2C Chip support\n\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\nCONFIG_I2C_BCM2708=y\nCONFIG_I2C_BCM2708_BAUDRATE=100000\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\nCONFIG_I2C_BCM2835=y\n# CONFIG_I2C_BRCMSTB is not set\n# CONFIG_I2C_CBUS_GPIO is not set\n# CONFIG_I2C_DESIGNWARE_PLATFORM is not set\n# CONFIG_I2C_EMEV2 is not set\nCONFIG_I2C_GPIO=y\n# CONFIG_I2C_GPIO_FAULT_INJECTOR is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_RK3X is not set\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\n# CONFIG_SPI_MEM is not set\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\nCONFIG_SPI_BCM2835=m\nCONFIG_SPI_BCM2835AUX=m\n# CONFIG_SPI_BCM_QSPI is not set\n# CONFIG_SPI_BITBANG is not set\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_CADENCE_QUADSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_NXP_FLEXSPI is not set\n# CONFIG_SPI_GPIO is not set\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_MICROCHIP_CORE is not set\n# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set\n# CONFIG_SPI_OC_TINY is not set\n# CONFIG_SPI_PL022 is not set\n# CONFIG_SPI_ROCKCHIP is not set\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_SIFIVE is not set\n# CONFIG_SPI_MXIC is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_AMD is not set\n\n#\n# SPI Multiplexer support\n#\n# CONFIG_SPI_MUX is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=y\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\nCONFIG_SPI_DYNAMIC=y\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\n# CONFIG_PPS is not set\n\n#\n# PTP clock support\n#\n# CONFIG_PTP_1588_CLOCK is not set\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_CY8C95X0 is not set\n# CONFIG_PINCTRL_MCP23S08 is not set\n# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set\n# CONFIG_PINCTRL_OCELOT is not set\n# CONFIG_PINCTRL_SINGLE is not set\n# CONFIG_PINCTRL_STMFX is not set\n# CONFIG_PINCTRL_SX150X is not set\n# CONFIG_PINCTRL_RP1 is not set\n# CONFIG_PINCTRL_BCM2712 is not set\nCONFIG_PINCTRL_BCM2835=y\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\nCONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_SYSFS=y\nCONFIG_GPIO_CDEV=y\nCONFIG_GPIO_CDEV_V1=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\nCONFIG_GPIO_RASPBERRYPI_EXP=y\nCONFIG_GPIO_BCM_VIRT=y\n# CONFIG_GPIO_BRCMSTB is not set\n# CONFIG_GPIO_CADENCE is not set\n# CONFIG_GPIO_DWAPB is not set\n# CONFIG_GPIO_FTGPIO010 is not set\n# CONFIG_GPIO_GENERIC_PLATFORM is not set\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_LOGICVC is not set\n# CONFIG_GPIO_MB86S7X is not set\n# CONFIG_GPIO_MPC8XXX is not set\n# CONFIG_GPIO_PL061 is not set\n# CONFIG_GPIO_PWM is not set\n# CONFIG_GPIO_SIFIVE is not set\n# CONFIG_GPIO_SYSCON is not set\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_ZEVIO is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_GW_PLD is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\n# CONFIG_GPIO_PCA953X is not set\n# CONFIG_GPIO_PCA9570 is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\nCONFIG_GPIO_ARIZONA=m\n# CONFIG_HTC_EGPIO is not set\nCONFIG_GPIO_FSM=m\n# end of MFD GPIO expanders\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n# end of SPI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_SIM is not set\n# end of Virtual GPIO drivers\n\nCONFIG_W1=m\n\n#\n# 1-wire Bus Masters\n#\n# CONFIG_W1_MASTER_DS2490 is not set\n# CONFIG_W1_MASTER_DS2482 is not set\n# CONFIG_W1_MASTER_DS1WM is not set\nCONFIG_W1_MASTER_GPIO=m\n# CONFIG_W1_MASTER_SGI is not set\n# end of 1-wire Bus Masters\n\n#\n# 1-wire Slaves\n#\nCONFIG_W1_SLAVE_THERM=m\n# CONFIG_W1_SLAVE_SMEM is not set\n# CONFIG_W1_SLAVE_DS2405 is not set\n# CONFIG_W1_SLAVE_DS2408 is not set\n# CONFIG_W1_SLAVE_DS2413 is not set\n# CONFIG_W1_SLAVE_DS2406 is not set\n# CONFIG_W1_SLAVE_DS2423 is not set\n# CONFIG_W1_SLAVE_DS2805 is not set\n# CONFIG_W1_SLAVE_DS2430 is not set\n# CONFIG_W1_SLAVE_DS2431 is not set\n# CONFIG_W1_SLAVE_DS2433 is not set\n# CONFIG_W1_SLAVE_DS2438 is not set\n# CONFIG_W1_SLAVE_DS250X is not set\n# CONFIG_W1_SLAVE_DS2780 is not set\n# CONFIG_W1_SLAVE_DS2781 is not set\n# CONFIG_W1_SLAVE_DS28E04 is not set\n# CONFIG_W1_SLAVE_DS28E17 is not set\n# end of 1-wire Slaves\n\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_BRCMKONA is not set\n# CONFIG_POWER_RESET_BRCMSTB is not set\nCONFIG_POWER_RESET_GPIO=y\nCONFIG_POWER_RESET_GPIO_RESTART=y\n# CONFIG_POWER_RESET_LTC2952 is not set\n# CONFIG_POWER_RESET_REGULATOR is not set\nCONFIG_POWER_RESET_RESTART=y\n# CONFIG_POWER_RESET_VERSATILE is not set\n# CONFIG_POWER_RESET_SYSCON is not set\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\n# CONFIG_SYSCON_REBOOT_MODE is not set\n# CONFIG_NVMEM_REBOOT_MODE is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\nCONFIG_POWER_SUPPLY_HWMON=y\nCONFIG_RPI_POE_POWER=m\n# CONFIG_PDA_POWER is not set\n# CONFIG_IP5XXX_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2760 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SAMSUNG_SDI is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_BATTERY_MAX1721X is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_MAX77976 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_UCS1002 is not set\n# CONFIG_CHARGER_BD99954 is not set\n# CONFIG_BATTERY_UG3105 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM1177 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_AHT10 is not set\n# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set\n# CONFIG_SENSORS_AS370 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_AXI_FAN_CONTROL is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_CORSAIR_CPRO is not set\n# CONFIG_SENSORS_CORSAIR_PSU is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\nCONFIG_SENSORS_GPIO_FAN=m\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2947_I2C is not set\n# CONFIG_SENSORS_LTC2947_SPI is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC2992 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX127 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX31730 is not set\n# CONFIG_SENSORS_MAX31760 is not set\n# CONFIG_SENSORS_MAX6620 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_TPS23861 is not set\n# CONFIG_SENSORS_MR75203 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775_I2C is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_NZXT_KRAKEN2 is not set\n# CONFIG_SENSORS_NZXT_SMART2 is not set\n# CONFIG_SENSORS_OCC_P8_I2C is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\nCONFIG_SENSORS_PWM_FAN=m\nCONFIG_SENSORS_RASPBERRYPI_HWMON=y\n# CONFIG_SENSORS_SBTSI is not set\n# CONFIG_SENSORS_SBRMI is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHT4x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC2305 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_INA238 is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_TMP464 is not set\n# CONFIG_SENSORS_TMP513 is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_NETLINK is not set\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\n# CONFIG_THERMAL_WRITABLE_TRIPS is not set\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\n# CONFIG_CPU_THERMAL is not set\n# CONFIG_THERMAL_EMULATION is not set\n# CONFIG_THERMAL_MMIO is not set\n\n#\n# Broadcom thermal drivers\n#\n# CONFIG_BCM2711_THERMAL is not set\nCONFIG_BCM2835_THERMAL=y\n# end of Broadcom thermal drivers\n\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\nCONFIG_WATCHDOG_OPEN_TIMEOUT=0\n# CONFIG_WATCHDOG_SYSFS is not set\n# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\n# CONFIG_FTWDT010_WATCHDOG is not set\n# CONFIG_DW_WATCHDOG is not set\n# CONFIG_MAX63XX_WATCHDOG is not set\n# CONFIG_ARM_SMC_WATCHDOG is not set\nCONFIG_BCM2835_WDT=y\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\nCONFIG_SSB=m\nCONFIG_SSB_BLOCKIO=y\nCONFIG_SSB_SDIOHOST_POSSIBLE=y\n# CONFIG_SSB_SDIOHOST is not set\n# CONFIG_SSB_DRIVER_GPIO is not set\nCONFIG_BCMA_POSSIBLE=y\nCONFIG_BCMA=m\nCONFIG_BCMA_BLOCKIO=y\n# CONFIG_BCMA_HOST_SOC is not set\nCONFIG_BCMA_DRIVER_GMAC_CMN=y\n# CONFIG_BCMA_DRIVER_GPIO is not set\n# CONFIG_BCMA_DEBUG is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_RPISENSE_CORE is not set\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AXP20X_I2C is not set\n# CONFIG_MFD_MADERA is not set\n# CONFIG_MFD_ASIC3 is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_GATEWORKS_GSC is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_MP2629 is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77620 is not set\n# CONFIG_MFD_MAX77650 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77714 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6370 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_MFD_OCELOT is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_NTXEC is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_PM8XXX is not set\n# CONFIG_MFD_SY7636A is not set\nCONFIG_MFD_RASPBERRYPI_POE_HAT=m\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RT5120 is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_RK808 is not set\n# CONFIG_MFD_RN5T618 is not set\n# CONFIG_MFD_SEC_CORE is not set\n# CONFIG_MFD_SI476X_CORE is not set\nCONFIG_MFD_SIMPLE_MFD_I2C=m\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_T7L66XB is not set\n# CONFIG_MFD_TC6387XB is not set\n# CONFIG_MFD_TC6393XB is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_LOCHNAGAR is not set\nCONFIG_MFD_ARIZONA=m\nCONFIG_MFD_ARIZONA_I2C=m\nCONFIG_MFD_ARIZONA_SPI=m\n# CONFIG_MFD_CS47L24 is not set\nCONFIG_MFD_WM5102=y\n# CONFIG_MFD_WM5110 is not set\n# CONFIG_MFD_WM8997 is not set\n# CONFIG_MFD_WM8998 is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_MFD_ROHM_BD718XX is not set\n# CONFIG_MFD_ROHM_BD71828 is not set\n# CONFIG_MFD_ROHM_BD957XMUF is not set\n# CONFIG_MFD_STPMIC1 is not set\n# CONFIG_MFD_STMFX is not set\n# CONFIG_MFD_ATC260X_I2C is not set\n# CONFIG_MFD_QCOM_PM8008 is not set\n# CONFIG_RAVE_SP_CORE is not set\n# CONFIG_MFD_INTEL_M10_BMC is not set\n# CONFIG_MFD_RSMU_I2C is not set\n# CONFIG_MFD_RSMU_SPI is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\nCONFIG_REGULATOR_ARIZONA_LDO1=m\nCONFIG_REGULATOR_ARIZONA_MICSUPP=m\n# CONFIG_REGULATOR_DA9121 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\n# CONFIG_REGULATOR_FAN53880 is not set\n# CONFIG_REGULATOR_GPIO is not set\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MAX20086 is not set\n# CONFIG_REGULATOR_MAX77826 is not set\n# CONFIG_REGULATOR_MCP16502 is not set\n# CONFIG_REGULATOR_MP5416 is not set\n# CONFIG_REGULATOR_MP8859 is not set\n# CONFIG_REGULATOR_MP886X is not set\n# CONFIG_REGULATOR_MPQ7920 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PF8X00 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\n# CONFIG_REGULATOR_PWM is not set\nCONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=y\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT5190A is not set\n# CONFIG_REGULATOR_RT5759 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\n# CONFIG_REGULATOR_SLG51000 is not set\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_SY8824X is not set\n# CONFIG_REGULATOR_SY8827N is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS6286X is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\n# CONFIG_REGULATOR_VCTRL is not set\nCONFIG_RC_CORE=y\nCONFIG_BPF_LIRC_MODE2=y\nCONFIG_LIRC=y\nCONFIG_RC_MAP=m\nCONFIG_RC_DECODERS=y\nCONFIG_IR_IMON_DECODER=m\nCONFIG_IR_JVC_DECODER=m\nCONFIG_IR_MCE_KBD_DECODER=m\nCONFIG_IR_NEC_DECODER=m\nCONFIG_IR_RC5_DECODER=m\nCONFIG_IR_RC6_DECODER=m\nCONFIG_IR_RCMM_DECODER=m\nCONFIG_IR_SANYO_DECODER=m\nCONFIG_IR_SHARP_DECODER=m\nCONFIG_IR_SONY_DECODER=m\nCONFIG_IR_XMP_DECODER=m\nCONFIG_RC_DEVICES=y\nCONFIG_IR_GPIO_CIR=m\nCONFIG_IR_GPIO_TX=m\n# CONFIG_IR_HIX5HD2 is not set\nCONFIG_IR_IGORPLUGUSB=m\nCONFIG_IR_IGUANA=m\nCONFIG_IR_IMON=m\nCONFIG_IR_IMON_RAW=m\nCONFIG_IR_MCEUSB=m\nCONFIG_IR_PWM_TX=m\nCONFIG_IR_REDRAT3=m\n# CONFIG_IR_SERIAL is not set\n# CONFIG_IR_SPI is not set\nCONFIG_IR_STREAMZAP=m\nCONFIG_IR_TOY=m\nCONFIG_IR_TTUSBIR=m\nCONFIG_RC_ATI_REMOTE=m\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_RC_XBOX_DVD=m\nCONFIG_CEC_CORE=y\n\n#\n# CEC support\n#\n# CONFIG_MEDIA_CEC_RC is not set\n# CONFIG_MEDIA_CEC_SUPPORT is not set\n# end of CEC support\n\nCONFIG_MEDIA_SUPPORT=m\n# CONFIG_MEDIA_SUPPORT_FILTER is not set\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\nCONFIG_MEDIA_RADIO_SUPPORT=y\nCONFIG_MEDIA_SDR_SUPPORT=y\nCONFIG_MEDIA_PLATFORM_SUPPORT=y\nCONFIG_MEDIA_TEST_SUPPORT=y\n# end of Media device types\n\n#\n# Media core support\n#\nCONFIG_VIDEO_DEV=m\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_DVB_CORE=m\n# end of Media core support\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2_I2C=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_VIDEO_TUNER=m\nCONFIG_V4L2_MEM2MEM_DEV=m\n# CONFIG_V4L2_FLASH_LED_CLASS is not set\nCONFIG_V4L2_FWNODE=m\nCONFIG_V4L2_ASYNC=m\n# end of Video4Linux options\n\n#\n# Media controller options\n#\nCONFIG_MEDIA_CONTROLLER_DVB=y\n# end of Media controller options\n\n#\n# Digital TV options\n#\n# CONFIG_DVB_MMAP is not set\nCONFIG_DVB_NET=y\nCONFIG_DVB_MAX_ADAPTERS=8\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set\n# CONFIG_DVB_ULE_DEBUG is not set\n# end of Digital TV options\n\n#\n# Media drivers\n#\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_USB_S2255 is not set\nCONFIG_VIDEO_USBTV=m\nCONFIG_USB_VIDEO_CLASS=m\n# CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV is not set\n\n#\n# Analog TV USB devices\n#\n# CONFIG_VIDEO_GO7007 is not set\nCONFIG_VIDEO_HDPVR=m\nCONFIG_VIDEO_PVRUSB2=m\nCONFIG_VIDEO_PVRUSB2_SYSFS=y\nCONFIG_VIDEO_PVRUSB2_DVB=y\n# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set\nCONFIG_VIDEO_STK1160_COMMON=m\nCONFIG_VIDEO_STK1160=m\n\n#\n# Analog/digital TV USB devices\n#\nCONFIG_VIDEO_AU0828=m\nCONFIG_VIDEO_AU0828_V4L2=y\nCONFIG_VIDEO_AU0828_RC=y\nCONFIG_VIDEO_CX231XX=m\nCONFIG_VIDEO_CX231XX_RC=y\n# CONFIG_VIDEO_CX231XX_ALSA is not set\nCONFIG_VIDEO_CX231XX_DVB=m\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_AS102=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\n# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_DVBSKY=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_DVB_USB_ZD1301=m\nCONFIG_DVB_USB=m\n# CONFIG_DVB_USB_DEBUG is not set\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_CXUSB=m\n# CONFIG_DVB_USB_CXUSB_ANALOG is not set\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_DIB3000MC=m\nCONFIG_DVB_USB_DIBUSB_MB=m\nCONFIG_DVB_USB_DIBUSB_MB_FAULTY=y\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_DTT200U=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_OPERA1=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_SMS_USB_DRV=m\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\nCONFIG_VIDEO_EM28XX=m\n# CONFIG_VIDEO_EM28XX_V4L2 is not set\n# CONFIG_VIDEO_EM28XX_ALSA is not set\nCONFIG_VIDEO_EM28XX_DVB=m\nCONFIG_VIDEO_EM28XX_RC=m\n\n#\n# Software defined radio USB devices\n#\n# CONFIG_USB_AIRSPY is not set\n# CONFIG_USB_HACKRF is not set\n# CONFIG_USB_MSI2500 is not set\n# CONFIG_RADIO_ADAPTERS is not set\nCONFIG_MEDIA_PLATFORM_DRIVERS=y\n# CONFIG_V4L_PLATFORM_DRIVERS is not set\n# CONFIG_SDR_PLATFORM_DRIVERS is not set\n# CONFIG_DVB_PLATFORM_DRIVERS is not set\n# CONFIG_V4L_MEM2MEM_DRIVERS is not set\n\n#\n# Allegro DVT media platform drivers\n#\n\n#\n# Amlogic media platform drivers\n#\n\n#\n# Amphion drivers\n#\n\n#\n# Aspeed media platform drivers\n#\n\n#\n# Atmel media platform drivers\n#\n# CONFIG_VIDEO_BCM2835_UNICAM is not set\n\n#\n# Cadence media platform drivers\n#\n# CONFIG_VIDEO_CADENCE_CSI2RX is not set\n# CONFIG_VIDEO_CADENCE_CSI2TX is not set\n\n#\n# Chips&Media media platform drivers\n#\n\n#\n# Intel media platform drivers\n#\n\n#\n# Marvell media platform drivers\n#\n\n#\n# Mediatek media platform drivers\n#\n\n#\n# NVidia media platform drivers\n#\n\n#\n# NXP media platform drivers\n#\n\n#\n# Qualcomm media platform drivers\n#\n\n#\n# Raspberry Pi media platform drivers\n#\n# CONFIG_VIDEO_RASPBERRYPI_PISP_BE is not set\n# CONFIG_VIDEO_RP1_CFE is not set\n\n#\n# Renesas media platform drivers\n#\n\n#\n# Rockchip media platform drivers\n#\n\n#\n# Samsung media platform drivers\n#\n\n#\n# STMicroelectronics media platform drivers\n#\n\n#\n# Sunxi media platform drivers\n#\n\n#\n# Texas Instruments drivers\n#\n\n#\n# Verisilicon media platform drivers\n#\n\n#\n# VIA media platform drivers\n#\n\n#\n# Xilinx media platform drivers\n#\n\n#\n# MMC/SDIO DVB adapters\n#\nCONFIG_SMS_SDIO_DRV=m\n# CONFIG_V4L_TEST_DRIVERS is not set\n# CONFIG_DVB_TEST_DRIVERS is not set\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_TTPCI_EEPROM=m\nCONFIG_VIDEO_CX2341X=m\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\n# CONFIG_SMS_SIANO_DEBUGFS is not set\nCONFIG_VIDEOBUF2_CORE=m\nCONFIG_VIDEOBUF2_V4L2=m\nCONFIG_VIDEOBUF2_MEMOPS=m\nCONFIG_VIDEOBUF2_DMA_CONTIG=m\nCONFIG_VIDEOBUF2_VMALLOC=m\n# end of Media drivers\n\n#\n# Media ancillary drivers\n#\nCONFIG_MEDIA_ATTACH=y\n\n#\n# IR I2C driver auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_IR_I2C=m\nCONFIG_VIDEO_CAMERA_SENSOR=y\n# CONFIG_VIDEO_AR0521 is not set\n# CONFIG_VIDEO_ARDUCAM_64MP is not set\n# CONFIG_VIDEO_ARDUCAM_PIVARIETY is not set\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_HI846 is not set\n# CONFIG_VIDEO_HI847 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX296 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_IMX412 is not set\n# CONFIG_VIDEO_IMX477 is not set\n# CONFIG_VIDEO_IMX519 is not set\n# CONFIG_VIDEO_IMX708 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\n# CONFIG_VIDEO_MT9V011 is not set\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_OG01A1B is not set\n# CONFIG_VIDEO_OV02A10 is not set\n# CONFIG_VIDEO_OV08D10 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\n# CONFIG_VIDEO_OV2311 is not set\n# CONFIG_VIDEO_OV2640 is not set\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5693 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV64A40 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV7251 is not set\n# CONFIG_VIDEO_OV7640 is not set\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9282 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5398 is not set\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_BU64754 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# Audio decoders, processors and mixers\n#\n# CONFIG_VIDEO_CS3308 is not set\n# CONFIG_VIDEO_CS5345 is not set\nCONFIG_VIDEO_CS53L32A=m\nCONFIG_VIDEO_MSP3400=m\n# CONFIG_VIDEO_SONY_BTF_MPX is not set\n# CONFIG_VIDEO_TDA1997X is not set\n# CONFIG_VIDEO_TDA7432 is not set\n# CONFIG_VIDEO_TDA9840 is not set\n# CONFIG_VIDEO_TEA6415C is not set\n# CONFIG_VIDEO_TEA6420 is not set\n# CONFIG_VIDEO_TLV320AIC23B is not set\n# CONFIG_VIDEO_TVAUDIO is not set\n# CONFIG_VIDEO_UDA1342 is not set\n# CONFIG_VIDEO_VP27SMPX is not set\n# CONFIG_VIDEO_WM8739 is not set\nCONFIG_VIDEO_WM8775=m\n# end of Audio decoders, processors and mixers\n\n#\n# RDS decoders\n#\n# CONFIG_VIDEO_SAA6588 is not set\n# end of RDS decoders\n\n#\n# Video decoders\n#\n# CONFIG_VIDEO_ADV7180 is not set\n# CONFIG_VIDEO_ADV7183 is not set\n# CONFIG_VIDEO_ADV748X is not set\n# CONFIG_VIDEO_ADV7604 is not set\n# CONFIG_VIDEO_ADV7842 is not set\n# CONFIG_VIDEO_BT819 is not set\n# CONFIG_VIDEO_BT856 is not set\n# CONFIG_VIDEO_BT866 is not set\n# CONFIG_VIDEO_ISL7998X is not set\n# CONFIG_VIDEO_KS0127 is not set\n# CONFIG_VIDEO_MAX9286 is not set\n# CONFIG_VIDEO_ML86V7667 is not set\n# CONFIG_VIDEO_SAA7110 is not set\nCONFIG_VIDEO_SAA711X=m\n# CONFIG_VIDEO_TC358743 is not set\n# CONFIG_VIDEO_TVP514X is not set\n# CONFIG_VIDEO_TVP5150 is not set\n# CONFIG_VIDEO_TVP7002 is not set\n# CONFIG_VIDEO_TW2804 is not set\n# CONFIG_VIDEO_OV9281 is not set\n# CONFIG_VIDEO_TW9903 is not set\n# CONFIG_VIDEO_TW9906 is not set\n# CONFIG_VIDEO_TW9910 is not set\n# CONFIG_VIDEO_IRS1125 is not set\n# CONFIG_VIDEO_VPX3220 is not set\n\n#\n# Video and audio decoders\n#\n# CONFIG_VIDEO_SAA717X is not set\nCONFIG_VIDEO_CX25840=m\n# end of Video decoders\n\n#\n# Video encoders\n#\n# CONFIG_VIDEO_AD9389B is not set\n# CONFIG_VIDEO_ADV7170 is not set\n# CONFIG_VIDEO_ADV7175 is not set\n# CONFIG_VIDEO_ADV7343 is not set\n# CONFIG_VIDEO_ADV7393 is not set\n# CONFIG_VIDEO_ADV7511 is not set\n# CONFIG_VIDEO_AK881X is not set\n# CONFIG_VIDEO_SAA7127 is not set\n# CONFIG_VIDEO_SAA7185 is not set\n# CONFIG_VIDEO_THS8200 is not set\n# end of Video encoders\n\n#\n# Video improvement chips\n#\n# CONFIG_VIDEO_UPD64031A is not set\n# CONFIG_VIDEO_UPD64083 is not set\n# end of Video improvement chips\n\n#\n# Audio/Video compression chips\n#\n# CONFIG_VIDEO_SAA6752HS is not set\n# end of Audio/Video compression chips\n\n#\n# SDR tuner chips\n#\n# CONFIG_SDR_MAX2175 is not set\n# end of SDR tuner chips\n\n#\n# Miscellaneous helper chips\n#\n# CONFIG_VIDEO_I2C is not set\n# CONFIG_VIDEO_M52790 is not set\n# CONFIG_VIDEO_ST_MIPID02 is not set\n# CONFIG_VIDEO_THS7303 is not set\n# end of Miscellaneous helper chips\n\n#\n# Media SPI Adapters\n#\nCONFIG_CXD2880_SPI_DRV=m\n# CONFIG_VIDEO_GS1662 is not set\n# end of Media SPI Adapters\n\nCONFIG_MEDIA_TUNER=m\n\n#\n# Customize TV tuners\n#\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_IT913X=m\n# CONFIG_MEDIA_TUNER_M88RS6000T is not set\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_MC44S803=m\n# CONFIG_MEDIA_TUNER_MSI001 is not set\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT20XX=m\n# CONFIG_MEDIA_TUNER_MT2131 is not set\nCONFIG_MEDIA_TUNER_MT2266=m\n# CONFIG_MEDIA_TUNER_MXL301RF is not set\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\n# CONFIG_MEDIA_TUNER_QM1D1B0004 is not set\nCONFIG_MEDIA_TUNER_QM1D1C0042=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_R820T=m\nCONFIG_MEDIA_TUNER_SI2157=m\nCONFIG_MEDIA_TUNER_SIMPLE=m\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_TDA18250=m\nCONFIG_MEDIA_TUNER_TDA18271=m\nCONFIG_MEDIA_TUNER_TDA827X=m\nCONFIG_MEDIA_TUNER_TDA8290=m\nCONFIG_MEDIA_TUNER_TDA9887=m\nCONFIG_MEDIA_TUNER_TEA5761=m\nCONFIG_MEDIA_TUNER_TEA5767=m\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_XC2028=m\nCONFIG_MEDIA_TUNER_XC4000=m\nCONFIG_MEDIA_TUNER_XC5000=m\n# end of Customize TV tuners\n\n#\n# Customise DVB Frontends\n#\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_M88DS3103=m\n# CONFIG_DVB_MXL5XX is not set\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\n# CONFIG_DVB_STV0910 is not set\nCONFIG_DVB_STV6110x=m\n# CONFIG_DVB_STV6111 is not set\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_MN88472=m\nCONFIG_DVB_MN88473=m\nCONFIG_DVB_SI2165=m\nCONFIG_DVB_TDA18271C2DD=m\n\n#\n# DVB-S (satellite) frontends\n#\n# CONFIG_DVB_CX24110 is not set\nCONFIG_DVB_CX24116=m\n# CONFIG_DVB_CX24117 is not set\nCONFIG_DVB_CX24120=m\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_DS3000=m\n# CONFIG_DVB_MB86A16 is not set\nCONFIG_DVB_MT312=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_TDA10071=m\nCONFIG_DVB_TDA10086=m\n# CONFIG_DVB_TDA8083 is not set\n# CONFIG_DVB_TDA8261 is not set\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_TS2020=m\n# CONFIG_DVB_TUA6100 is not set\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TUNER_ITD1000=m\n# CONFIG_DVB_VES1X93 is not set\n# CONFIG_DVB_ZL10036 is not set\nCONFIG_DVB_ZL10039=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_AS102_FE=m\n# CONFIG_DVB_CX22700 is not set\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_CXD2841ER=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\n# CONFIG_DVB_DIB9000 is not set\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_GP8PSK_FE=m\n# CONFIG_DVB_L64781 is not set\nCONFIG_DVB_MT352=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\nCONFIG_DVB_RTL2832_SDR=m\n# CONFIG_DVB_S5H1432 is not set\nCONFIG_DVB_SI2168=m\n# CONFIG_DVB_SP887X is not set\n# CONFIG_DVB_STV0367 is not set\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_ZD1301_DEMOD=m\nCONFIG_DVB_ZL10353=m\nCONFIG_DVB_CXD2880=m\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_STV0297=m\n# CONFIG_DVB_TDA10021 is not set\nCONFIG_DVB_TDA10023=m\n# CONFIG_DVB_VES1820 is not set\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_AU8522=m\nCONFIG_DVB_AU8522_DTV=m\nCONFIG_DVB_AU8522_V4L=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LGDT3306A=m\nCONFIG_DVB_LGDT330X=m\nCONFIG_DVB_MXL692=m\nCONFIG_DVB_NXT200X=m\n# CONFIG_DVB_OR51132 is not set\n# CONFIG_DVB_OR51211 is not set\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_S5H1411=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\nCONFIG_DVB_S921=m\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\n# CONFIG_DVB_MN88443X is not set\nCONFIG_DVB_TC90522=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_A8293=m\nCONFIG_DVB_AF9033=m\n# CONFIG_DVB_ASCOT2E is not set\nCONFIG_DVB_ATBM8830=m\n# CONFIG_DVB_HELENE is not set\n# CONFIG_DVB_HORUS3A is not set\n# CONFIG_DVB_ISL6405 is not set\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_IX2505V=m\n# CONFIG_DVB_LGS8GL5 is not set\nCONFIG_DVB_LGS8GXX=m\n# CONFIG_DVB_LNBH25 is not set\n# CONFIG_DVB_LNBH29 is not set\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_M88RS2000=m\n# CONFIG_DVB_TDA665x is not set\nCONFIG_DVB_DRX39XYJ=m\n\n#\n# Common Interface (EN50221) controller drivers\n#\n# CONFIG_DVB_CXD2099 is not set\nCONFIG_DVB_SP2=m\n# end of Customise DVB Frontends\n\n#\n# Tools to develop new frontends\n#\n# CONFIG_DVB_DUMMY_FE is not set\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\n# CONFIG_IMX_IPUV3_CORE is not set\nCONFIG_DRM=y\nCONFIG_DRM_MIPI_DSI=y\n# CONFIG_DRM_DEBUG_MM is not set\nCONFIG_DRM_KMS_HELPER=y\n# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set\n# CONFIG_DRM_DEBUG_MODESET_LOCK is not set\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\n# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\nCONFIG_DRM_DISPLAY_HELPER=y\nCONFIG_DRM_DISPLAY_HDMI_HELPER=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_GEM_DMA_HELPER=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_KOMEDA is not set\n# end of ARM devices\n\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\n# CONFIG_DRM_EXYNOS is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_ARMADA is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_USE_LVDS is not set\n# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set\n# CONFIG_DRM_OMAP is not set\n# CONFIG_DRM_TILCDC is not set\n# CONFIG_DRM_FSL_DCU is not set\n# CONFIG_DRM_STM is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set\n# CONFIG_DRM_PANEL_ARM_VERSATILE is not set\n# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set\n# CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0 is not set\n# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set\n# CONFIG_DRM_PANEL_BOE_TV101WUM_NL6 is not set\n# CONFIG_DRM_PANEL_DSI_CM is not set\n# CONFIG_DRM_PANEL_LVDS is not set\nCONFIG_DRM_PANEL_SIMPLE=y\n# CONFIG_DRM_PANEL_EDP is not set\n# CONFIG_DRM_PANEL_EBBG_FT8719 is not set\n# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set\n# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set\n# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9806E is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set\n# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set\n# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set\n# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set\n# CONFIG_DRM_PANEL_JDI_R63452 is not set\n# CONFIG_DRM_PANEL_KHADAS_TS050 is not set\n# CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LB035Q02 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set\n# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT36672A is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set\n# CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set\n# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set\n# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set\n# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set\n# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set\n# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set\n# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_SOFEF00 is not set\n# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set\n# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS060T1SX01 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7703 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set\n# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set\n# CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521 is not set\n# CONFIG_DRM_PANEL_TDO_TL070WSH30 is not set\n# CONFIG_DRM_PANEL_TPO_Y17P is not set\n# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set\n# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set\n# CONFIG_DRM_PANEL_TPO_TPG110 is not set\n# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set\n# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set\n# CONFIG_DRM_PANEL_WAVESHARE_TOUCHSCREEN is not set\n# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set\n# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_CHRONTEL_CH7033 is not set\n# CONFIG_DRM_DISPLAY_CONNECTOR is not set\n# CONFIG_DRM_ITE_IT6505 is not set\n# CONFIG_DRM_LONTIUM_LT8912B is not set\n# CONFIG_DRM_LONTIUM_LT9211 is not set\n# CONFIG_DRM_LONTIUM_LT9611 is not set\n# CONFIG_DRM_LONTIUM_LT9611UXC is not set\n# CONFIG_DRM_ITE_IT66121 is not set\n# CONFIG_DRM_LVDS_CODEC is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NWL_MIPI_DSI is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_PARADE_PS8640 is not set\n# CONFIG_DRM_SIL_SII8620 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_SII9234 is not set\nCONFIG_DRM_SIMPLE_BRIDGE=y\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\nCONFIG_DRM_TOSHIBA_TC358762=y\n# CONFIG_DRM_TOSHIBA_TC358764 is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TOSHIBA_TC358768 is not set\n# CONFIG_DRM_TOSHIBA_TC358775 is not set\n# CONFIG_DRM_TI_DLPC3433 is not set\n# CONFIG_DRM_TI_TFP410 is not set\n# CONFIG_DRM_TI_SN65DSI83 is not set\n# CONFIG_DRM_TI_SN65DSI86 is not set\n# CONFIG_DRM_TI_TPD12S015 is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_ANALOGIX_ANX7625 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_CDNS_MHDP8546 is not set\n# end of Display Interface Bridges\n\n# CONFIG_DRM_STI is not set\n# CONFIG_DRM_V3D is not set\nCONFIG_DRM_VC4=y\nCONFIG_DRM_VC4_HDMI_CEC=y\n# CONFIG_DRM_RP1_DSI is not set\n# CONFIG_DRM_RP1_DPI is not set\n# CONFIG_DRM_RP1_VEC is not set\n# CONFIG_DRM_ETNAVIV is not set\n# CONFIG_DRM_LOGICVC is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_PANEL_MIPI_DBI is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_TINYDRM_HX8357D is not set\n# CONFIG_TINYDRM_ILI9163 is not set\n# CONFIG_TINYDRM_ILI9225 is not set\n# CONFIG_TINYDRM_ILI9341 is not set\n# CONFIG_TINYDRM_ILI9486 is not set\n# CONFIG_TINYDRM_MI0283QT is not set\n# CONFIG_TINYDRM_REPAPER is not set\n# CONFIG_TINYDRM_ST7586 is not set\n# CONFIG_TINYDRM_ST7735R is not set\n# CONFIG_DRM_PL111 is not set\n# CONFIG_DRM_TVE200 is not set\n# CONFIG_DRM_LIMA is not set\n# CONFIG_DRM_PANFROST is not set\n# CONFIG_DRM_MCDE is not set\n# CONFIG_DRM_TIDSS is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_SSD130X is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_DRM_NOMODESET=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\n# CONFIG_FB_MODE_HELPERS is not set\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\nCONFIG_FB_BCM2708=y\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# CONFIG_FB_RPISENSE is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\nCONFIG_LCD_CLASS_DEVICE=m\n# CONFIG_LCD_L4F00242T03 is not set\n# CONFIG_LCD_LMS283GF05 is not set\n# CONFIG_LCD_LTV350QV is not set\n# CONFIG_LCD_ILI922X is not set\n# CONFIG_LCD_ILI9320 is not set\n# CONFIG_LCD_TDO24M is not set\n# CONFIG_LCD_VGG2432A4 is not set\n# CONFIG_LCD_PLATFORM is not set\n# CONFIG_LCD_AMS369FG06 is not set\n# CONFIG_LCD_LMS501KF03 is not set\n# CONFIG_LCD_HX8357 is not set\n# CONFIG_LCD_OTM3225A is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\n# CONFIG_BACKLIGHT_KTD253 is not set\n# CONFIG_BACKLIGHT_PWM is not set\nCONFIG_BACKLIGHT_RPI=y\n# CONFIG_BACKLIGHT_QCOM_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\nCONFIG_BACKLIGHT_GPIO=y\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n# CONFIG_BACKLIGHT_LED is not set\n# end of Backlight & LCD device support\n\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_FRAMEBUFFER_CONSOLE=y\n# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\n# end of Console display driver support\n\n# CONFIG_LOGO is not set\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_HWDEP=m\nCONFIG_SND_RAWMIDI=m\nCONFIG_SND_COMPRESS_OFFLOAD=y\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\nCONFIG_SND_HRTIMER=m\nCONFIG_SND_DYNAMIC_MINORS=y\nCONFIG_SND_MAX_CARDS=32\n# CONFIG_SND_SUPPORT_OLD_API is not set\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_CTL_INPUT_VALIDATION is not set\nCONFIG_SND_VMASTER=y\n# CONFIG_SND_SEQUENCER is not set\n# CONFIG_SND_DRIVERS is not set\n\n#\n# HD-Audio\n#\n# end of HD-Audio\n\nCONFIG_SND_HDA_PREALLOC_SIZE=2048\nCONFIG_SND_ARM=y\n# CONFIG_SND_ARMAACI is not set\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=m\nCONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y\nCONFIG_SND_USB_UA101=m\nCONFIG_SND_USB_CAIAQ=m\nCONFIG_SND_USB_CAIAQ_INPUT=y\nCONFIG_SND_USB_6FIRE=m\nCONFIG_SND_USB_HIFACE=m\nCONFIG_SND_BCD2000=m\nCONFIG_SND_USB_LINE6=m\nCONFIG_SND_USB_POD=m\nCONFIG_SND_USB_PODHD=m\nCONFIG_SND_USB_TONEPORT=m\nCONFIG_SND_USB_VARIAX=m\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\nCONFIG_SND_SOC_COMPRESS=y\n# CONFIG_SND_SOC_ADI is not set\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_AMD_ACP_CONFIG is not set\n# CONFIG_SND_ATMEL_SOC is not set\nCONFIG_SND_BCM2835_SOC_I2S=m\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\nCONFIG_SND_BCM2708_SOC_CHIPDIP_DAC=m\nCONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSHD=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADC=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m\nCONFIG_SND_BCM2708_SOC_PIFI_40=m\nCONFIG_SND_BCM2708_SOC_RPI_CIRRUS=m\nCONFIG_SND_BCM2708_SOC_RPI_DAC=m\nCONFIG_SND_BCM2708_SOC_RPI_PROTO=m\nCONFIG_SND_BCM2708_SOC_JUSTBOOM_BOTH=m\nCONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m\nCONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI=m\nCONFIG_SND_BCM2708_SOC_IQAUDIO_CODEC=m\nCONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m\nCONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI=m\nCONFIG_SND_BCM2708_SOC_I_SABRE_Q2M=m\nCONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m\nCONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m\nCONFIG_SND_AUDIOINJECTOR_OCTO_SOUNDCARD=m\nCONFIG_SND_AUDIOINJECTOR_ISOLATED_SOUNDCARD=m\nCONFIG_SND_AUDIOSENSE_PI=m\nCONFIG_SND_DIGIDAC1_SOUNDCARD=m\nCONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m\nCONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m\nCONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m\nCONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m\nCONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m\nCONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m\nCONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m\nCONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m\nCONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m\nCONFIG_SND_PISOUND=m\nCONFIG_SND_RPI_SIMPLE_SOUNDCARD=m\nCONFIG_SND_RPI_WM8804_SOUNDCARD=m\nCONFIG_SND_DACBERRY400=m\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_AUDMIX is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_FSL_MICFIL is not set\n# CONFIG_SND_SOC_FSL_XCVR is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\nCONFIG_SND_SOC_ARIZONA=m\nCONFIG_SND_SOC_WM_ADSP=m\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_AD193X_SPI is not set\n# CONFIG_SND_SOC_AD193X_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_SPI is not set\nCONFIG_SND_SOC_ADAU1701=m\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\nCONFIG_SND_SOC_ADAU1977=m\nCONFIG_SND_SOC_ADAU1977_I2C=m\nCONFIG_SND_SOC_ADAU7002=m\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4375 is not set\n# CONFIG_SND_SOC_AK4458 is not set\nCONFIG_SND_SOC_AK4554=m\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_AW8738 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS35L41_SPI is not set\n# CONFIG_SND_SOC_CS35L41_I2C is not set\n# CONFIG_SND_SOC_CS35L45_SPI is not set\n# CONFIG_SND_SOC_CS35L45_I2C is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS42L83 is not set\n# CONFIG_SND_SOC_CS4234 is not set\nCONFIG_SND_SOC_CS4265=m\n# CONFIG_SND_SOC_CS4270 is not set\nCONFIG_SND_SOC_CS4271=m\nCONFIG_SND_SOC_CS4271_I2C=m\n# CONFIG_SND_SOC_CS4271_SPI is not set\nCONFIG_SND_SOC_CS42XX8=m\nCONFIG_SND_SOC_CS42XX8_I2C=m\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\nCONFIG_SND_SOC_DA7213=m\nCONFIG_SND_SOC_DMIC=m\nCONFIG_SND_SOC_HDMI_CODEC=y\n# CONFIG_SND_SOC_ES7134 is not set\n# CONFIG_SND_SOC_ES7241 is not set\n# CONFIG_SND_SOC_ES8316 is not set\n# CONFIG_SND_SOC_ES8326 is not set\n# CONFIG_SND_SOC_ES8328_I2C is not set\n# CONFIG_SND_SOC_ES8328_SPI is not set\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_HDA is not set\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\nCONFIG_SND_SOC_MA120X0P=m\n# CONFIG_SND_SOC_MAX98088 is not set\n# CONFIG_SND_SOC_MAX98357A is not set\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98520 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX98396 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\nCONFIG_SND_SOC_PCM179X=m\nCONFIG_SND_SOC_PCM179X_I2C=m\n# CONFIG_SND_SOC_PCM179X_SPI is not set\nCONFIG_SND_SOC_PCM186X=m\nCONFIG_SND_SOC_PCM186X_I2C=m\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3060_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\nCONFIG_SND_SOC_PCM5102A=m\nCONFIG_SND_SOC_PCM512x=m\nCONFIG_SND_SOC_PCM512x_I2C=m\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK3328 is not set\n# CONFIG_SND_SOC_RT5616 is not set\nCONFIG_SND_SOC_PCM1794A=m\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\n# CONFIG_SND_SOC_RT5659 is not set\n# CONFIG_SND_SOC_RT9120 is not set\nCONFIG_SND_SOC_SGTL5000=m\nCONFIG_SND_SOC_SIGMADSP=m\nCONFIG_SND_SOC_SIGMADSP_I2C=m\nCONFIG_SND_SOC_SIMPLE_AMPLIFIER=m\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\nCONFIG_SND_SOC_SPDIF=m\n# CONFIG_SND_SOC_SRC4XXX_I2C is not set\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\nCONFIG_SND_SOC_STA32X=m\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS2780 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\nCONFIG_SND_SOC_TAS571X=m\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805M is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\nCONFIG_SND_SOC_TAS5713=m\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320ADC3XXX is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\nCONFIG_SND_SOC_TLV320AIC32X4=m\nCONFIG_SND_SOC_TLV320AIC32X4_I2C=m\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\nCONFIG_SND_SOC_TLV320AIC3X=m\nCONFIG_SND_SOC_TLV320AIC3X_I2C=m\n# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\nCONFIG_SND_SOC_WM5102=m\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\nCONFIG_SND_SOC_WM8731=m\nCONFIG_SND_SOC_WM8731_I2C=m\n# CONFIG_SND_SOC_WM8731_SPI is not set\n# CONFIG_SND_SOC_WM8737 is not set\nCONFIG_SND_SOC_WM8741=m\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\nCONFIG_SND_SOC_WM8804=m\nCONFIG_SND_SOC_WM8804_I2C=m\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8940 is not set\nCONFIG_SND_SOC_WM8960=m\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_ZL38060 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8821 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\nCONFIG_SND_SOC_TPA6130A2=m\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\nCONFIG_SND_SOC_I_SABRE_CODEC=m\n# end of CODEC drivers\n\nCONFIG_SND_SIMPLE_CARD_UTILS=m\nCONFIG_SND_SIMPLE_CARD=m\nCONFIG_SND_AUDIO_GRAPH_CARD=m\n# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set\n# CONFIG_SND_TEST_COMPONENT is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\n# CONFIG_HID_APPLEIR is not set\nCONFIG_HID_ASUS=y\nCONFIG_HID_AUREAL=y\nCONFIG_HID_BELKIN=y\n# CONFIG_HID_BETOP_FF is not set\nCONFIG_HID_BIGBEN_FF=m\nCONFIG_HID_CHERRY=y\nCONFIG_HID_CHICONY=y\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\nCONFIG_HID_CYPRESS=y\nCONFIG_HID_DRAGONRISE=m\nCONFIG_DRAGONRISE_FF=y\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\nCONFIG_HID_EZKEY=y\n# CONFIG_HID_FT260 is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_GLORIOUS is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\nCONFIG_HID_KYE=y\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_VRC2 is not set\n# CONFIG_HID_XIAOMI is not set\nCONFIG_HID_GYRATION=y\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_ITE is not set\n# CONFIG_HID_JABRA is not set\nCONFIG_HID_TWINHAN=y\nCONFIG_HID_KENSINGTON=y\nCONFIG_HID_LCPOWER=y\n# CONFIG_HID_LED is not set\nCONFIG_HID_LENOVO=y\n# CONFIG_HID_LETSKETCH is not set\nCONFIG_HID_LOGITECH=y\nCONFIG_HID_LOGITECH_DJ=y\nCONFIG_HID_LOGITECH_HIDPP=y\nCONFIG_LOGITECH_FF=y\nCONFIG_LOGIRUMBLEPAD2_FF=y\nCONFIG_LOGIG940_FF=y\nCONFIG_LOGIWHEELS_FF=y\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_MEGAWORLD_FF is not set\n# CONFIG_HID_REDRAGON is not set\nCONFIG_HID_MICROSOFT=y\nCONFIG_HID_MONTEREY=y\nCONFIG_HID_MULTITOUCH=m\nCONFIG_HID_NINTENDO=m\nCONFIG_NINTENDO_FF=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\nCONFIG_HID_ORTEK=y\nCONFIG_HID_OUYA=y\nCONFIG_HID_PANTHERLORD=y\nCONFIG_PANTHERLORD_FF=y\nCONFIG_HID_PENMOUNT=y\nCONFIG_HID_PETALYNX=y\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PXRC is not set\n# CONFIG_HID_RAZER is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\nCONFIG_HID_SAMSUNG=y\n# CONFIG_HID_SEMITEK is not set\n# CONFIG_HID_SIGMAMICRO is not set\nCONFIG_HID_SONY=y\nCONFIG_SONY_FF=y\n# CONFIG_HID_SPEEDLINK is not set\nCONFIG_HID_STEAM=m\n# CONFIG_HID_STEELSERIES is not set\nCONFIG_HID_SUNPLUS=y\nCONFIG_HID_RMI=y\n# CONFIG_HID_GREENASIA is not set\nCONFIG_HID_SMARTJOYPLUS=m\nCONFIG_SMARTJOYPLUS_FF=y\nCONFIG_HID_TIVO=y\nCONFIG_HID_TOPSEED=y\n# CONFIG_HID_TOPRE is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\nCONFIG_HID_WIIMOTE=m\nCONFIG_HID_XINMO=y\n# CONFIG_HID_ZEROPLUS is not set\nCONFIG_HID_ZYDACRON=y\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n# end of USB HID support\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID_OF is not set\n# CONFIG_I2C_HID_OF_ELAN is not set\n# CONFIG_I2C_HID_OF_GOODIX is not set\n# end of I2C HID support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_USB_ULPI_BUS is not set\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\n# CONFIG_USB_OTG is not set\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\nCONFIG_USB_MON=m\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\n# CONFIG_USB_XHCI_HCD is not set\n# CONFIG_USB_EHCI_HCD is not set\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\n# CONFIG_USB_OHCI_HCD is not set\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\nCONFIG_USB_DWCOTG=y\n# CONFIG_USB_HCD_BCMA is not set\n# CONFIG_USB_HCD_SSB is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=m\n# CONFIG_USB_PRINTER is not set\n# CONFIG_USB_WDM is not set\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\n# CONFIG_USB_UAS is not set\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\n# CONFIG_USB_MUSB_HDRC is not set\n# CONFIG_USB_DWC3 is not set\n# CONFIG_USB_DWC2 is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=m\nCONFIG_USB_SERIAL_GENERIC=y\n# CONFIG_USB_SERIAL_SIMPLE is not set\n# CONFIG_USB_SERIAL_AIRCABLE is not set\n# CONFIG_USB_SERIAL_ARK3116 is not set\n# CONFIG_USB_SERIAL_BELKIN is not set\nCONFIG_USB_SERIAL_CH341=m\n# CONFIG_USB_SERIAL_WHITEHEAT is not set\n# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set\nCONFIG_USB_SERIAL_CP210X=m\n# CONFIG_USB_SERIAL_CYPRESS_M8 is not set\n# CONFIG_USB_SERIAL_EMPEG is not set\nCONFIG_USB_SERIAL_FTDI_SIO=m\n# CONFIG_USB_SERIAL_VISOR is not set\n# CONFIG_USB_SERIAL_IPAQ is not set\n# CONFIG_USB_SERIAL_IR is not set\n# CONFIG_USB_SERIAL_EDGEPORT is not set\n# CONFIG_USB_SERIAL_EDGEPORT_TI is not set\n# CONFIG_USB_SERIAL_F81232 is not set\n# CONFIG_USB_SERIAL_F8153X is not set\n# CONFIG_USB_SERIAL_GARMIN is not set\n# CONFIG_USB_SERIAL_IPW is not set\nCONFIG_USB_SERIAL_IUU=m\n# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set\n# CONFIG_USB_SERIAL_KEYSPAN is not set\n# CONFIG_USB_SERIAL_KLSI is not set\n# CONFIG_USB_SERIAL_KOBIL_SCT is not set\n# CONFIG_USB_SERIAL_MCT_U232 is not set\n# CONFIG_USB_SERIAL_METRO is not set\n# CONFIG_USB_SERIAL_MOS7720 is not set\n# CONFIG_USB_SERIAL_MOS7840 is not set\n# CONFIG_USB_SERIAL_MXUPORT is not set\n# CONFIG_USB_SERIAL_NAVMAN is not set\nCONFIG_USB_SERIAL_PL2303=m\n# CONFIG_USB_SERIAL_OTI6858 is not set\n# CONFIG_USB_SERIAL_QCAUX is not set\n# CONFIG_USB_SERIAL_QUALCOMM is not set\n# CONFIG_USB_SERIAL_SPCP8X5 is not set\n# CONFIG_USB_SERIAL_SAFE is not set\n# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set\n# CONFIG_USB_SERIAL_SYMBOL is not set\n# CONFIG_USB_SERIAL_TI is not set\n# CONFIG_USB_SERIAL_CYBERJACK is not set\n# CONFIG_USB_SERIAL_OPTION is not set\n# CONFIG_USB_SERIAL_OMNINET is not set\n# CONFIG_USB_SERIAL_OPTICON is not set\n# CONFIG_USB_SERIAL_XSENS_MT is not set\n# CONFIG_USB_SERIAL_WISHBONE is not set\n# CONFIG_USB_SERIAL_SSU100 is not set\n# CONFIG_USB_SERIAL_QT2 is not set\n# CONFIG_USB_SERIAL_UPD78F0730 is not set\n# CONFIG_USB_SERIAL_XR is not set\n# CONFIG_USB_SERIAL_DEBUG is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\n# CONFIG_USB_EZUSB_FX2 is not set\n# CONFIG_USB_HUB_USB251XB is not set\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n# CONFIG_USB_ONBOARD_HUB is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\nCONFIG_NOP_USB_XCEIV=y\n# CONFIG_AM335X_PHY_USB is not set\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\n# CONFIG_USB_ULPI is not set\n# end of USB Physical Layer drivers\n\n# CONFIG_USB_GADGET is not set\n# CONFIG_TYPEC is not set\n# CONFIG_USB_ROLE_SWITCH is not set\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\nCONFIG_MMC_BCM2835_MMC=y\nCONFIG_MMC_BCM2835_DMA=y\nCONFIG_MMC_BCM2835_PIO_DMA_BARRIER=2\nCONFIG_MMC_BCM2835_SDHOST=y\n# CONFIG_MMC_DEBUG is not set\n# CONFIG_MMC_ARMMMCI is not set\nCONFIG_MMC_SDHCI=y\nCONFIG_MMC_SDHCI_PLTFM=y\n# CONFIG_MMC_SDHCI_OF_ARASAN is not set\n# CONFIG_MMC_SDHCI_OF_AT91 is not set\n# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set\n# CONFIG_MMC_SDHCI_CADENCE is not set\n# CONFIG_MMC_SDHCI_F_SDH30 is not set\n# CONFIG_MMC_SDHCI_MILBEAUT is not set\n# CONFIG_MMC_SDHCI_IPROC is not set\n# CONFIG_MMC_SPI is not set\n# CONFIG_MMC_DW is not set\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_REALTEK_USB=m\n# CONFIG_MMC_CQHCI is not set\n# CONFIG_MMC_HSQ is not set\n# CONFIG_MMC_BCM2835 is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MMC_SDHCI_XENON is not set\n# CONFIG_MMC_SDHCI_OMAP is not set\n# CONFIG_MMC_SDHCI_AM654 is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\nCONFIG_LEDS_CLASS_FLASH=y\n# CONFIG_LEDS_CLASS_MULTICOLOR is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AN30259A is not set\n# CONFIG_LEDS_AW2013 is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_EL15203000 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_LP55XX_COMMON is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\n# CONFIG_LEDS_PWM is not set\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_SYSCON is not set\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_SPI_BYTE is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\n# CONFIG_LEDS_AAT1290 is not set\n# CONFIG_LEDS_AS3645A is not set\n# CONFIG_LEDS_KTD2692 is not set\n# CONFIG_LEDS_LM3601X is not set\n# CONFIG_LEDS_RT4505 is not set\n# CONFIG_LEDS_RT8515 is not set\n# CONFIG_LEDS_SGM3140 is not set\n\n#\n# RGB LED drivers\n#\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\nCONFIG_LEDS_TRIGGER_TIMER=y\nCONFIG_LEDS_TRIGGER_ONESHOT=y\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\nCONFIG_LEDS_TRIGGER_BACKLIGHT=y\nCONFIG_LEDS_TRIGGER_CPU=y\n# CONFIG_LEDS_TRIGGER_ACTIVITY is not set\nCONFIG_LEDS_TRIGGER_GPIO=y\nCONFIG_LEDS_TRIGGER_DEFAULT_ON=y\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\nCONFIG_LEDS_TRIGGER_TRANSIENT=y\nCONFIG_LEDS_TRIGGER_CAMERA=y\nCONFIG_LEDS_TRIGGER_INPUT=y\n# CONFIG_LEDS_TRIGGER_PANIC is not set\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\n# CONFIG_LEDS_TRIGGER_AUDIO is not set\n# CONFIG_LEDS_TRIGGER_TTY is not set\nCONFIG_LEDS_TRIGGER_ACTPWR=y\n\n#\n# Simple LED drivers\n#\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_ATOMIC_SCRUB=y\nCONFIG_EDAC_SUPPORT=y\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\nCONFIG_RTC_DRV_ABX80X=m\nCONFIG_RTC_DRV_DS1307=m\n# CONFIG_RTC_DRV_DS1307_CENTURY is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_HYM8563 is not set\n# CONFIG_RTC_DRV_MAX6900 is not set\n# CONFIG_RTC_DRV_NCT3018Y is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\nCONFIG_RTC_DRV_PCF8523=m\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\nCONFIG_RTC_DRV_PCF8563=m\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\nCONFIG_RTC_DRV_DS3232=m\nCONFIG_RTC_DRV_DS3232_HWMON=y\nCONFIG_RTC_DRV_PCF2127=m\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_CMOS is not set\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\n# CONFIG_RTC_DRV_PL031 is not set\n# CONFIG_RTC_DRV_CADENCE is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_VIRTUAL_CHANNELS=y\nCONFIG_DMA_OF=y\n# CONFIG_ALTERA_MSGDMA is not set\n# CONFIG_AMBA_PL08X is not set\nCONFIG_DMA_BCM2835=y\n# CONFIG_DW_AXI_DMAC is not set\n# CONFIG_FSL_EDMA is not set\n# CONFIG_FSL_QDMA is not set\n# CONFIG_INTEL_IDMA64 is not set\n# CONFIG_NBPFAXI_DMA is not set\n# CONFIG_PL330_DMA is not set\nCONFIG_DMA_BCM2708=y\n# CONFIG_XILINX_ZYNQMP_DPDMA is not set\n# CONFIG_QCOM_HIDMA_MGMT is not set\n# CONFIG_QCOM_HIDMA is not set\n# CONFIG_DW_DMAC is not set\n# CONFIG_SF_PDMA is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\n# CONFIG_UDMABUF is not set\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\nCONFIG_DMABUF_HEAPS=y\n# CONFIG_DMABUF_SYSFS_STATS is not set\nCONFIG_DMABUF_HEAPS_SYSTEM=y\nCONFIG_DMABUF_HEAPS_CMA=y\n# end of DMABUF options\n\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\n# CONFIG_VIRTIO_MENU is not set\n# CONFIG_VDPA is not set\nCONFIG_VHOST_MENU=y\n# CONFIG_VHOST_NET is not set\n# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# end of Microsoft Hyper-V guest support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_RTLLIB is not set\nCONFIG_RTL8723BS=m\nCONFIG_R8712U=m\nCONFIG_R8188EU=m\nCONFIG_VT6656=m\nCONFIG_STAGING_MEDIA=y\n# CONFIG_VIDEO_MAX96712 is not set\n# CONFIG_VIDEO_RPIVID is not set\n# CONFIG_STAGING_MEDIA_DEPRECATED is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_KS7010 is not set\nCONFIG_BCM_VIDEOCORE=y\nCONFIG_BCM2835_VCHIQ=y\nCONFIG_VCHIQ_CDEV=y\nCONFIG_SND_BCM2835=m\n# CONFIG_VIDEO_BCM2835 is not set\nCONFIG_BCM_VC_SM_CMA=y\nCONFIG_VIDEO_CODEC_BCM2835=m\nCONFIG_VIDEO_ISP_BCM2835=m\nCONFIG_BCM2835_VCHIQ_MMAL=y\n# CONFIG_PI433 is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_FIELDBUS_DEV is not set\n# CONFIG_GOLDFISH is not set\n# CONFIG_CHROME_PLATFORMS is not set\n# CONFIG_MELLANOX_PLATFORM is not set\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Clock driver for ARM Reference designs\n#\n# CONFIG_CLK_ICST is not set\n# CONFIG_CLK_SP810 is not set\n# end of Clock driver for ARM Reference designs\n\n# CONFIG_LMK04832 is not set\n# CONFIG_COMMON_CLK_MAX9485 is not set\nCONFIG_COMMON_CLK_HIFIBERRY_DACPLUSHD=m\nCONFIG_COMMON_CLK_HIFIBERRY_DACPRO=m\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\n# CONFIG_COMMON_CLK_AXI_CLKGEN is not set\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_RS9_PCIE is not set\n# CONFIG_COMMON_CLK_VC5 is not set\n# CONFIG_COMMON_CLK_VC7 is not set\n# CONFIG_COMMON_CLK_FIXED_MMIO is not set\n# CONFIG_CLK_BCM2711_DVP is not set\nCONFIG_CLK_BCM2835=y\nCONFIG_CLK_RASPBERRYPI=y\n# CONFIG_XILINX_VCU is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\n# CONFIG_HWSPINLOCK is not set\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\nCONFIG_CLKSRC_MMIO=y\nCONFIG_BCM2835_TIMER=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_ARM_TIMER_SP804=y\n# CONFIG_MICROCHIP_PIT64B is not set\n# end of Clock Source drivers\n\nCONFIG_MAILBOX=y\n# CONFIG_ARM_MHU is not set\n# CONFIG_ARM_MHU_V2 is not set\n# CONFIG_PLATFORM_MHU is not set\n# CONFIG_PL320_MBOX is not set\n# CONFIG_ALTERA_MBOX is not set\nCONFIG_BCM2835_MBOX=y\n# CONFIG_MAILBOX_TEST is not set\n# CONFIG_IOMMU_SUPPORT is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\n# CONFIG_RPMSG_QCOM_GLINK_RPM is not set\n# CONFIG_RPMSG_VIRTIO is not set\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\nCONFIG_BCM2835_POWER=y\nCONFIG_RASPBERRYPI_POWER=y\n# CONFIG_SOC_BRCMSTB is not set\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# CONFIG_QUICC_ENGINE is not set\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# fujitsu SoC drivers\n#\n# end of fujitsu SoC drivers\n\n#\n# i.MX SoC drivers\n#\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# CONFIG_LITEX_SOC_CONTROLLER is not set\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# end of Qualcomm SoC drivers\n\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\n# CONFIG_PM_DEVFREQ is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_FSA9480 is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_PTN5150 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\n# CONFIG_EXTCON_USB_GPIO is not set\n# CONFIG_MEMORY is not set\n# CONFIG_IIO is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_DEBUG is not set\n# CONFIG_PWM_ATMEL_TCB is not set\nCONFIG_PWM_BCM2835=m\n# CONFIG_PWM_CLK is not set\n# CONFIG_PWM_FSL_FTM is not set\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_PWM_RASPBERRYPI_POE=m\n# CONFIG_PWM_RP1 is not set\n# CONFIG_PWM_XILINX is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\n# CONFIG_AL_FIC is not set\n# CONFIG_BCM2712_MIP is not set\nCONFIG_BRCMSTB_L2_IRQ=y\n# CONFIG_XILINX_INTC is not set\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\nCONFIG_RESET_CONTROLLER=y\n# CONFIG_RESET_BRCMSTB is not set\n# CONFIG_RESET_RASPBERRYPI is not set\n# CONFIG_RESET_SIMPLE is not set\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_RESET_TI_TPS380X is not set\n\n#\n# PHY Subsystem\n#\n# CONFIG_GENERIC_PHY is not set\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\n\n#\n# PHY drivers for Broadcom platforms\n#\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# CONFIG_PHY_BRCM_USB is not set\n# end of PHY drivers for Broadcom platforms\n\n# CONFIG_PHY_CADENCE_TORRENT is not set\n# CONFIG_PHY_CADENCE_DPHY is not set\n# CONFIG_PHY_CADENCE_DPHY_RX is not set\n# CONFIG_PHY_CADENCE_SIERRA is not set\n# CONFIG_PHY_CADENCE_SALVO is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_LAN966X_SERDES is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\n# CONFIG_PHY_OCELOT_SERDES is not set\n# end of PHY Subsystem\n\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\nCONFIG_ARM_PMU=y\nCONFIG_RPI_AXIPERF=m\n# end of Performance monitor support\n\n# CONFIG_RAS is not set\n\n#\n# Android\n#\n# CONFIG_ANDROID_BINDER_IPC is not set\n# end of Android\n\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\n# CONFIG_NVMEM_RMEM is not set\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\n# CONFIG_TEE is not set\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\n# CONFIG_PECI is not set\n# CONFIG_HTE is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_VALIDATE_FS_PARSER=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\nCONFIG_XFS_SUPPORT_V4=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\nCONFIG_F2FS_FS=y\nCONFIG_F2FS_STAT_FS=y\n# CONFIG_F2FS_FS_XATTR is not set\nCONFIG_F2FS_CHECK_FS=y\n# CONFIG_F2FS_FAULT_INJECTION is not set\n# CONFIG_F2FS_FS_COMPRESSION is not set\nCONFIG_F2FS_IOSTAT=y\n# CONFIG_F2FS_UNFAIR_RWSEM is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\n# CONFIG_QUOTA is not set\n# CONFIG_AUTOFS4_FS is not set\nCONFIG_AUTOFS_FS=y\nCONFIG_FUSE_FS=m\n# CONFIG_CUSE is not set\n# CONFIG_VIRTIO_FS is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n\n#\n# Caches\n#\nCONFIG_NETFS_SUPPORT=y\n# CONFIG_NETFS_STATS is not set\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_CACHEFILES is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=y\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=m\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=m\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\nCONFIG_MEMFD_CREATE=y\nCONFIG_CONFIGFS_FS=y\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\nCONFIG_HFS_FS=y\nCONFIG_HFSPLUS_FS=y\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\n# CONFIG_SQUASHFS_FILE_CACHE is not set\nCONFIG_SQUASHFS_FILE_DIRECT=y\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\nCONFIG_PSTORE=y\nCONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240\nCONFIG_PSTORE_DEFLATE_COMPRESS=y\n# CONFIG_PSTORE_LZO_COMPRESS is not set\n# CONFIG_PSTORE_LZ4_COMPRESS is not set\n# CONFIG_PSTORE_LZ4HC_COMPRESS is not set\n# CONFIG_PSTORE_842_COMPRESS is not set\n# CONFIG_PSTORE_ZSTD_COMPRESS is not set\nCONFIG_PSTORE_COMPRESS=y\nCONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y\nCONFIG_PSTORE_COMPRESS_DEFAULT=\"deflate\"\nCONFIG_PSTORE_CONSOLE=y\n# CONFIG_PSTORE_PMSG is not set\n# CONFIG_PSTORE_FTRACE is not set\nCONFIG_PSTORE_RAM=y\n# CONFIG_PSTORE_BLK is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EROFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\nCONFIG_NFS_SWAP=y\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\nCONFIG_NFS_V4_1_MIGRATION=y\nCONFIG_ROOT_NFS=y\nCONFIG_NFS_FSCACHE=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFS_DISABLE_UDP_SUPPORT=y\n# CONFIG_NFS_V4_2_READ_PLUS is not set\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_COMMON=y\nCONFIG_NFS_V4_2_SSC_HELPER=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\nCONFIG_SUNRPC_SWAP=y\nCONFIG_RPCSEC_GSS_KRB5=m\n# CONFIG_SUNRPC_DISABLE_INSECURE_ENCTYPES is not set\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS2=y\nCONFIG_CIFS_ALLOW_INSECURE_LEGACY=y\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\nCONFIG_CIFS_DEBUG=y\n# CONFIG_CIFS_DEBUG2 is not set\n# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\n# CONFIG_CIFS_SWN_UPCALL is not set\nCONFIG_CIFS_FSCACHE=y\n# CONFIG_CIFS_ROOT is not set\n# CONFIG_SMB_SERVER is not set\nCONFIG_SMBFS=y\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_KEYS_REQUEST_CACHE is not set\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\nCONFIG_KEY_DH_OPERATIONS=y\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY is not set\nCONFIG_SECURITYFS=y\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_LSM=\"yama,loadpin,safesetid,integrity\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n\nCONFIG_RANDSTRUCT_NONE=y\n# CONFIG_RANDSTRUCT_FULL is not set\n# CONFIG_RANDSTRUCT_PERFORMANCE is not set\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_CRYPTD=m\nCONFIG_CRYPTO_AUTHENC=y\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_SIMD=m\n# end of Crypto core or helper\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_DH=y\n# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set\nCONFIG_CRYPTO_ECC=m\nCONFIG_CRYPTO_ECDH=m\n# CONFIG_CRYPTO_ECDSA is not set\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\n# CONFIG_CRYPTO_CURVE25519 is not set\n# end of Public-key cryptography\n\n#\n# Block ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\n# CONFIG_CRYPTO_ARIA is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\n# CONFIG_CRYPTO_SM4_GENERIC is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n# end of Block ciphers\n\n#\n# Length-preserving ciphers and modes\n#\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_ARC4 is not set\n# CONFIG_CRYPTO_CHACHA20 is not set\nCONFIG_CRYPTO_CBC=y\nCONFIG_CRYPTO_CFB=m\nCONFIG_CRYPTO_CTR=y\nCONFIG_CRYPTO_CTS=m\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_HCTR2 is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_OFB is not set\n# CONFIG_CRYPTO_PCBC is not set\n# CONFIG_CRYPTO_XTS is not set\n# end of Length-preserving ciphers and modes\n\n#\n# AEAD (authenticated encryption with associated data) ciphers\n#\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\n# CONFIG_CRYPTO_ESSIV is not set\n# end of AEAD (authenticated encryption with associated data) ciphers\n\n#\n# Hashes, digests, and MACs\n#\nCONFIG_CRYPTO_BLAKE2B=m\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\n# CONFIG_CRYPTO_POLY1305 is not set\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\n# CONFIG_CRYPTO_SM3_GENERIC is not set\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_VMAC is not set\n# CONFIG_CRYPTO_WP512 is not set\n# CONFIG_CRYPTO_XCBC is not set\nCONFIG_CRYPTO_XXHASH=m\n# end of Hashes, digests, and MACs\n\n#\n# CRCs (cyclic redundancy checks)\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=y\n# CONFIG_CRYPTO_CRCT10DIF is not set\n# end of CRCs (cyclic redundancy checks)\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=y\nCONFIG_CRYPTO_LZO=m\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n# end of Compression\n\n#\n# Random number generation\n#\n# CONFIG_CRYPTO_ANSI_CPRNG is not set\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_KDF800108_CTR=y\n# end of Random number generation\n\n#\n# Userspace interface\n#\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\nCONFIG_CRYPTO_USER_API_AEAD=y\nCONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y\n# end of Userspace interface\n\nCONFIG_CRYPTO_HASH_INFO=y\n\n#\n# Accelerated Cryptographic Algorithms for CPU (arm)\n#\nCONFIG_CRYPTO_CURVE25519_NEON=m\n# CONFIG_CRYPTO_GHASH_ARM_CE is not set\n# CONFIG_CRYPTO_NHPOLY1305_NEON is not set\nCONFIG_CRYPTO_POLY1305_ARM=m\nCONFIG_CRYPTO_BLAKE2S_ARM=y\n# CONFIG_CRYPTO_BLAKE2B_NEON is not set\nCONFIG_CRYPTO_SHA1_ARM=y\nCONFIG_CRYPTO_SHA1_ARM_NEON=y\n# CONFIG_CRYPTO_SHA1_ARM_CE is not set\n# CONFIG_CRYPTO_SHA2_ARM_CE is not set\nCONFIG_CRYPTO_SHA256_ARM=m\n# CONFIG_CRYPTO_SHA512_ARM is not set\nCONFIG_CRYPTO_AES_ARM=m\nCONFIG_CRYPTO_AES_ARM_BS=m\n# CONFIG_CRYPTO_AES_ARM_CE is not set\nCONFIG_CRYPTO_CHACHA20_NEON=m\nCONFIG_CRYPTO_CRC32_ARM_CE=y\n# end of Accelerated Cryptographic Algorithms for CPU (arm)\n\n# CONFIG_CRYPTO_HW is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n# CONFIG_FIPS_SIGNATURE_SELFTEST is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\nCONFIG_RAID6_PQ_BENCHMARK=y\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_CORDIC=m\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_UTILS=y\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=m\nCONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=m\nCONFIG_CRYPTO_LIB_CHACHA=m\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CURVE25519=m\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=m\nCONFIG_CRYPTO_LIB_CURVE25519=m\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=m\nCONFIG_CRYPTO_LIB_POLY1305=m\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=m\nCONFIG_CRYPTO_LIB_SHA1=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_CRC_CCITT=m\nCONFIG_CRC16=y\n# CONFIG_CRC_T10DIF is not set\n# CONFIG_CRC64_ROCKSOFT is not set\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC64 is not set\n# CONFIG_CRC4 is not set\n# CONFIG_CRC7 is not set\nCONFIG_LIBCRC32C=m\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=m\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMMON=y\nCONFIG_ZSTD_COMPRESS=m\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\n# CONFIG_XZ_DEC_X86 is not set\n# CONFIG_XZ_DEC_POWERPC is not set\n# CONFIG_XZ_DEC_IA64 is not set\n# CONFIG_XZ_DEC_ARM is not set\n# CONFIG_XZ_DEC_ARMTHUMB is not set\n# CONFIG_XZ_DEC_SPARC is not set\n# CONFIG_XZ_DEC_MICROLZMA is not set\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_REED_SOLOMON=y\nCONFIG_REED_SOLOMON_ENC8=y\nCONFIG_REED_SOLOMON_DEC8=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_DMA_OPS=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_DMA_DECLARE_COHERENT=y\nCONFIG_ARCH_HAS_SETUP_DMA_OPS=y\nCONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y\nCONFIG_DMA_NONCOHERENT_MMAP=y\nCONFIG_DMA_CMA=y\n# CONFIG_DMA_PERNUMA_CMA is not set\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=5\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\n# CONFIG_FORCE_NR_CPUS is not set\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_GENERIC_VDSO_32=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\nCONFIG_SG_POOL=y\nCONFIG_STACKDEPOT=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\n# CONFIG_STACKTRACE_BUILD_ID is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\nCONFIG_DYNAMIC_DEBUG_CORE=y\nCONFIG_SYMBOLIC_ERRNAME=y\n# CONFIG_DEBUG_BUGVERBOSE is not set\n# end of printk and dmesg options\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_AS_HAS_NON_CONST_LEB128=y\nCONFIG_DEBUG_INFO_NONE=y\n# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\nCONFIG_FRAME_WARN=1024\nCONFIG_STRIP_ASM_SYMS=y\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_VMLINUX_MAP is not set\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=\"\"\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_KCSAN_COMPILER=y\n# end of Generic Kernel Debugging Instruments\n\n#\n# Networking Debugging\n#\n# CONFIG_NET_DEV_REFCNT_TRACKER is not set\n# CONFIG_NET_NS_REFCNT_TRACKER is not set\n# CONFIG_DEBUG_NET is not set\n# end of Networking Debugging\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_PAGE_REF is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\n# CONFIG_DEBUG_WX is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SHRINKER_DEBUG is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\n# CONFIG_DEBUG_VM is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\n# CONFIG_DEBUG_MEMORY_INIT is not set\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\n# CONFIG_SOFTLOCKUP_DETECTOR is not set\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\n# CONFIG_SCHED_DEBUG is not set\n# CONFIG_SCHEDSTATS is not set\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_RWSEMS is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_DEBUG_MAPLE_TREE is not set\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\nCONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_HAVE_BUILDTIME_MCOUNT_SORT=y\nCONFIG_BUILDTIME_MCOUNT_SORT=y\nCONFIG_TRACER_MAX_TRACE=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_RING_BUFFER_ALLOW_SWAP=y\nCONFIG_TRACING=y\nCONFIG_GENERIC_TRACER=y\nCONFIG_TRACING_SUPPORT=y\nCONFIG_FTRACE=y\nCONFIG_BOOTTIME_TRACING=y\nCONFIG_FUNCTION_TRACER=y\nCONFIG_FUNCTION_GRAPH_TRACER=y\nCONFIG_DYNAMIC_FTRACE=y\nCONFIG_DYNAMIC_FTRACE_WITH_REGS=y\n# CONFIG_FUNCTION_PROFILER is not set\nCONFIG_STACK_TRACER=y\n# CONFIG_IRQSOFF_TRACER is not set\n# CONFIG_SCHED_TRACER is not set\n# CONFIG_HWLAT_TRACER is not set\n# CONFIG_OSNOISE_TRACER is not set\n# CONFIG_TIMERLAT_TRACER is not set\n# CONFIG_FTRACE_SYSCALLS is not set\nCONFIG_TRACER_SNAPSHOT=y\nCONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP=y\nCONFIG_BRANCH_PROFILE_NONE=y\n# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set\n# CONFIG_PROFILE_ALL_BRANCHES is not set\nCONFIG_BLK_DEV_IO_TRACE=y\nCONFIG_KPROBE_EVENTS=y\n# CONFIG_KPROBE_EVENTS_ON_NOTRACE is not set\n# CONFIG_UPROBE_EVENTS is not set\nCONFIG_BPF_EVENTS=y\nCONFIG_DYNAMIC_EVENTS=y\nCONFIG_PROBE_EVENTS=y\nCONFIG_FTRACE_MCOUNT_RECORD=y\nCONFIG_FTRACE_MCOUNT_USE_RECORDMCOUNT=y\n# CONFIG_SYNTH_EVENTS is not set\n# CONFIG_HIST_TRIGGERS is not set\n# CONFIG_TRACE_EVENT_INJECT is not set\n# CONFIG_TRACEPOINT_BENCHMARK is not set\n# CONFIG_RING_BUFFER_BENCHMARK is not set\n# CONFIG_TRACE_EVAL_MAP_FILE is not set\n# CONFIG_FTRACE_RECORD_RECURSION is not set\n# CONFIG_FTRACE_STARTUP_TEST is not set\n# CONFIG_FTRACE_SORT_STARTUP_TEST is not set\n# CONFIG_RING_BUFFER_STARTUP_TEST is not set\n# CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is not set\n# CONFIG_PREEMPTIRQ_DELAY_TEST is not set\n# CONFIG_KPROBE_EVENT_GEN_TEST is not set\n# CONFIG_RV is not set\n# CONFIG_SAMPLES is not set\n# CONFIG_STRICT_DEVMEM is not set\n\n#\n# arm Debugging\n#\n# CONFIG_ARM_PTDUMP_DEBUGFS is not set\nCONFIG_UNWINDER_FRAME_POINTER=y\n# CONFIG_UNWINDER_ARM is not set\n# CONFIG_BACKTRACE_VERBOSE is not set\n# CONFIG_DEBUG_USER is not set\n# CONFIG_DEBUG_LL is not set\nCONFIG_DEBUG_LL_INCLUDE=\"mach/debug-macro.S\"\nCONFIG_UNCOMPRESS_INCLUDE=\"debug/uncompress.h\"\n# CONFIG_ARM_KPROBES_TEST is not set\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_CORESIGHT is not set\n# end of arm Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\n# CONFIG_RUNTIME_TESTING_MENU is not set\nCONFIG_ARCH_USE_MEMTEST=y\n# CONFIG_MEMTEST is not set\n# end of Kernel Testing and Coverage\n\n#\n# Rust hacking\n#\n# end of Rust hacking\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/RPi/devices/RPi2/options",
    "content": "################################################################################\n# Device defaults\n################################################################################\n\n  # NOOBS supported hex versions (legacy)\n    NOOBS_HEX=\"1040,1041,2082\"\n\n  # NOOBS supported model versions\n    NOOBS_SUPPORTED_MODELS='\"Pi 2\",\"Pi 3\"'\n\n  # set the addon project\n    ADDON_PROJECT=\"ARMv7\"\n"
  },
  {
    "path": "projects/RPi/devices/RPi4/config/distroconfig-composite.txt",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)\n\n# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!\narm_boost=1\narm_64bit=1\nkernel=kernel.img\ndisplay_auto_detect=1\nenable_tvout=1\ndtoverlay=vc4-kms-v3d,cma-512,composite=1\ndtoverlay=\ndisable_overscan=1\ndisable_fw_kms_setup=1\n"
  },
  {
    "path": "projects/RPi/devices/RPi4/config/distroconfig.txt",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!\narm_boost=1\narm_64bit=1\nkernel=kernel.img\ndisplay_auto_detect=1\ndtoverlay=vc4-kms-v3d,cma-512\ndtoverlay=\ndisable_overscan=1\ndisable_fw_kms_setup=1\n"
  },
  {
    "path": "projects/RPi/devices/RPi4/kodi/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n\n  <section id=\"system\">\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.audiodevice\">\n          <default>ALSA:hdmi:CARD=vc4hdmi0,DEV=0</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n</settings>\n"
  },
  {
    "path": "projects/RPi/devices/RPi4/linux/linux.aarch64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm64 6.1.66 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"aarch64-linux-gnu-gcc (GCC) 13.0.0 20220604 (experimental) [master revision aec868578d8515763d75693c1fdfbc30ff0a1e68]\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=130000\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23850\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23850\nCONFIG_LLD_VERSION=0\nCONFIG_CC_CAN_LINK=y\nCONFIG_CC_CAN_LINK_STATIC=y\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_BUILD_SALT=\"\"\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_SYSVIPC_COMPAT=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\n# CONFIG_WATCH_QUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_IRQ_IPI=y\nCONFIG_GENERIC_MSI_IRQ=y\nCONFIG_GENERIC_MSI_IRQ_DOMAIN=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\nCONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_CONTEXT_TRACKING=y\nCONFIG_CONTEXT_TRACKING_IDLE=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\nCONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\n# CONFIG_BPF_JIT is not set\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# end of BPF subsystem\n\nCONFIG_PREEMPT_VOLUNTARY_BUILD=y\n# CONFIG_PREEMPT_NONE is not set\nCONFIG_PREEMPT_VOLUNTARY=y\n# CONFIG_PREEMPT is not set\n# CONFIG_PREEMPT_DYNAMIC is not set\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\n# CONFIG_BSD_PROCESS_ACCT is not set\n# CONFIG_TASKSTATS is not set\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_RUDE_RCU=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\n# end of RCU Subsystem\n\nCONFIG_IKCONFIG=m\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=17\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# end of Scheduler features\n\nCONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y\nCONFIG_CC_HAS_INT128=y\nCONFIG_CC_IMPLICIT_FALLTHROUGH=\"-Wimplicit-fallthrough=5\"\nCONFIG_GCC11_NO_ARRAY_BOUNDS=y\nCONFIG_CC_NO_ARRAY_BOUNDS=y\nCONFIG_ARCH_SUPPORTS_INT128=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\n# CONFIG_CGROUP_FAVOR_DYNMODS is not set\nCONFIG_MEMCG=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_BLK_CGROUP=y\nCONFIG_CGROUP_WRITEBACK=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\nCONFIG_CGROUP_PIDS=y\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_CGROUP_PERF=y\nCONFIG_CGROUP_BPF=y\n# CONFIG_CGROUP_MISC is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_TIME_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_CHECKPOINT_RESTORE is not set\n# CONFIG_SCHED_AUTOGROUP is not set\n# CONFIG_SYSFS_DEPRECATED is not set\nCONFIG_RELAY=y\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"@INITRAMFS_SOURCE@\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\n# CONFIG_RD_GZIP is not set\n# CONFIG_RD_BZIP2 is not set\n# CONFIG_RD_LZMA is not set\n# CONFIG_RD_XZ is not set\n# CONFIG_RD_LZO is not set\n# CONFIG_RD_LZ4 is not set\n# CONFIG_RD_ZSTD is not set\nCONFIG_INITRAMFS_COMPRESSION_NONE=y\nCONFIG_BOOT_CONFIG=y\n# CONFIG_BOOT_CONFIG_EMBED is not set\nCONFIG_INITRAMFS_PRESERVE_MTIME=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\nCONFIG_EXPERT=y\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\n# CONFIG_SGETMASK_SYSCALL is not set\n# CONFIG_SYSFS_SYSCALL is not set\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\n# CONFIG_KALLSYMS_ALL is not set\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_DEBUG_RSEQ is not set\nCONFIG_EMBEDDED=y\nCONFIG_HAVE_PERF_EVENTS=y\n# CONFIG_PC104 is not set\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_SYSTEM_DATA_VERIFICATION=y\nCONFIG_PROFILING=y\nCONFIG_TRACEPOINTS=y\n# end of General setup\n\nCONFIG_ARM64=y\nCONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_64BIT=y\nCONFIG_MMU=y\nCONFIG_ARM64_PAGE_SHIFT=12\nCONFIG_ARM64_CONT_PTE_SHIFT=4\nCONFIG_ARM64_CONT_PMD_SHIFT=4\nCONFIG_ARCH_MMAP_RND_BITS_MIN=18\nCONFIG_ARCH_MMAP_RND_BITS_MAX=24\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_GENERIC_BUG=y\nCONFIG_GENERIC_BUG_RELATIVE_POINTERS=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CSUM=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y\nCONFIG_SMP=y\nCONFIG_KERNEL_MODE_NEON=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_PGTABLE_LEVELS=3\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_ARCH_PROC_KCORE_TEXT=y\n\n#\n# Platform selection\n#\n# CONFIG_ARCH_ACTIONS is not set\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_APPLE is not set\nCONFIG_ARCH_BCM=y\nCONFIG_ARCH_BCM2835=y\n# CONFIG_ARCH_BCM_IPROC is not set\n# CONFIG_ARCH_BCMBCA is not set\n# CONFIG_ARCH_BRCMSTB is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_BITMAIN is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_SPARX5 is not set\n# CONFIG_ARCH_K3 is not set\n# CONFIG_ARCH_LG1K is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_KEEMBAY is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_MESON is not set\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_NXP is not set\n# CONFIG_ARCH_NPCM is not set\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_REALTEK is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_ROCKCHIP is not set\n# CONFIG_ARCH_SEATTLE is not set\n# CONFIG_ARCH_INTEL_SOCFPGA is not set\n# CONFIG_ARCH_SYNQUACER is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_SPRD is not set\n# CONFIG_ARCH_THUNDER is not set\n# CONFIG_ARCH_THUNDER2 is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_VISCONTI is not set\n# CONFIG_ARCH_XGENE is not set\n# CONFIG_ARCH_ZYNQMP is not set\n# end of Platform selection\n\n#\n# Kernel Features\n#\n\n#\n# ARM errata workarounds via the alternatives framework\n#\nCONFIG_AMPERE_ERRATUM_AC03_CPU_38=y\nCONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y\nCONFIG_ARM64_ERRATUM_826319=y\nCONFIG_ARM64_ERRATUM_827319=y\nCONFIG_ARM64_ERRATUM_824069=y\nCONFIG_ARM64_ERRATUM_819472=y\nCONFIG_ARM64_ERRATUM_832075=y\nCONFIG_ARM64_ERRATUM_1742098=y\nCONFIG_ARM64_ERRATUM_845719=y\nCONFIG_ARM64_ERRATUM_843419=y\nCONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y\nCONFIG_ARM64_ERRATUM_1024718=y\nCONFIG_ARM64_ERRATUM_1418040=y\nCONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y\nCONFIG_ARM64_ERRATUM_1165522=y\nCONFIG_ARM64_ERRATUM_1319367=y\nCONFIG_ARM64_ERRATUM_1530923=y\nCONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y\nCONFIG_ARM64_ERRATUM_2441007=y\nCONFIG_ARM64_ERRATUM_1286807=y\nCONFIG_ARM64_ERRATUM_1463225=y\nCONFIG_ARM64_ERRATUM_1542419=y\nCONFIG_ARM64_ERRATUM_1508412=y\nCONFIG_ARM64_ERRATUM_2051678=y\nCONFIG_ARM64_ERRATUM_2077057=y\nCONFIG_ARM64_ERRATUM_2658417=y\nCONFIG_ARM64_WORKAROUND_TSB_FLUSH_FAILURE=y\nCONFIG_ARM64_ERRATUM_2054223=y\nCONFIG_ARM64_ERRATUM_2067961=y\nCONFIG_ARM64_ERRATUM_2441009=y\nCONFIG_ARM64_ERRATUM_2457168=y\nCONFIG_ARM64_ERRATUM_2966298=y\nCONFIG_CAVIUM_ERRATUM_22375=y\nCONFIG_CAVIUM_ERRATUM_23154=y\nCONFIG_CAVIUM_ERRATUM_27456=y\nCONFIG_CAVIUM_ERRATUM_30115=y\nCONFIG_CAVIUM_TX2_ERRATUM_219=y\nCONFIG_FUJITSU_ERRATUM_010001=y\nCONFIG_HISILICON_ERRATUM_161600802=y\nCONFIG_QCOM_FALKOR_ERRATUM_1003=y\nCONFIG_QCOM_FALKOR_ERRATUM_1009=y\nCONFIG_QCOM_QDF2400_ERRATUM_0065=y\nCONFIG_QCOM_FALKOR_ERRATUM_E1041=y\nCONFIG_NVIDIA_CARMEL_CNP_ERRATUM=y\nCONFIG_SOCIONEXT_SYNQUACER_PREITS=y\n# end of ARM errata workarounds via the alternatives framework\n\nCONFIG_ARM64_4K_PAGES=y\n# CONFIG_ARM64_16K_PAGES is not set\n# CONFIG_ARM64_64K_PAGES is not set\nCONFIG_ARM64_VA_BITS_39=y\n# CONFIG_ARM64_VA_BITS_48 is not set\nCONFIG_ARM64_VA_BITS=39\nCONFIG_ARM64_PA_BITS_48=y\nCONFIG_ARM64_PA_BITS=48\n# CONFIG_CPU_BIG_ENDIAN is not set\nCONFIG_CPU_LITTLE_ENDIAN=y\n# CONFIG_SCHED_MC is not set\n# CONFIG_SCHED_CLUSTER is not set\n# CONFIG_SCHED_SMT is not set\nCONFIG_NR_CPUS=256\n# CONFIG_HOTPLUG_CPU is not set\n# CONFIG_NUMA is not set\n# CONFIG_HZ_100 is not set\n# CONFIG_HZ_250 is not set\nCONFIG_HZ_300=y\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=300\nCONFIG_SCHED_HRTICK=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_CC_HAVE_SHADOW_CALL_STACK=y\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\n# CONFIG_KEXEC_FILE is not set\n# CONFIG_CRASH_DUMP is not set\n# CONFIG_XEN is not set\nCONFIG_ARCH_FORCE_MAX_ORDER=11\nCONFIG_UNMAP_KERNEL_AT_EL0=y\nCONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y\nCONFIG_RODATA_FULL_DEFAULT_ENABLED=y\n# CONFIG_ARM64_SW_TTBR0_PAN is not set\nCONFIG_ARM64_TAGGED_ADDR_ABI=y\nCONFIG_COMPAT=y\nCONFIG_KUSER_HELPERS=y\n# CONFIG_COMPAT_ALIGNMENT_FIXUPS is not set\nCONFIG_ARMV8_DEPRECATED=y\nCONFIG_SWP_EMULATION=y\nCONFIG_CP15_BARRIER_EMULATION=y\nCONFIG_SETEND_EMULATION=y\n\n#\n# ARMv8.1 architectural features\n#\nCONFIG_ARM64_HW_AFDBM=y\nCONFIG_ARM64_PAN=y\nCONFIG_AS_HAS_LDAPR=y\nCONFIG_AS_HAS_LSE_ATOMICS=y\nCONFIG_ARM64_LSE_ATOMICS=y\nCONFIG_ARM64_USE_LSE_ATOMICS=y\n# end of ARMv8.1 architectural features\n\n#\n# ARMv8.2 architectural features\n#\nCONFIG_AS_HAS_ARMV8_2=y\nCONFIG_AS_HAS_SHA3=y\n# CONFIG_ARM64_PMEM is not set\nCONFIG_ARM64_RAS_EXTN=y\nCONFIG_ARM64_CNP=y\n# end of ARMv8.2 architectural features\n\n#\n# ARMv8.3 architectural features\n#\nCONFIG_ARM64_PTR_AUTH=y\nCONFIG_ARM64_PTR_AUTH_KERNEL=y\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET=y\nCONFIG_CC_HAS_SIGN_RETURN_ADDRESS=y\nCONFIG_AS_HAS_PAC=y\nCONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y\n# end of ARMv8.3 architectural features\n\n#\n# ARMv8.4 architectural features\n#\nCONFIG_ARM64_AMU_EXTN=y\nCONFIG_AS_HAS_ARMV8_4=y\nCONFIG_ARM64_TLB_RANGE=y\n# end of ARMv8.4 architectural features\n\n#\n# ARMv8.5 architectural features\n#\nCONFIG_AS_HAS_ARMV8_5=y\nCONFIG_ARM64_BTI=y\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI=y\nCONFIG_ARM64_E0PD=y\nCONFIG_ARM64_AS_HAS_MTE=y\nCONFIG_ARM64_MTE=y\n# end of ARMv8.5 architectural features\n\n#\n# ARMv8.7 architectural features\n#\nCONFIG_ARM64_EPAN=y\n# end of ARMv8.7 architectural features\n\nCONFIG_ARM64_SVE=y\nCONFIG_ARM64_SME=y\nCONFIG_ARM64_MODULE_PLTS=y\n# CONFIG_ARM64_PSEUDO_NMI is not set\nCONFIG_RELOCATABLE=y\n# CONFIG_RANDOMIZE_BASE is not set\nCONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y\nCONFIG_STACKPROTECTOR_PER_TASK=y\nCONFIG_ARCH_NR_GPIO=0\n# end of Kernel Features\n\n#\n# Boot options\n#\nCONFIG_CMDLINE=\"\"\nCONFIG_EFI_STUB=y\nCONFIG_EFI=y\nCONFIG_DMI=y\n# end of Boot options\n\n#\n# Power management options\n#\n# CONFIG_SUSPEND is not set\n# CONFIG_HIBERNATION is not set\nCONFIG_PM=y\n# CONFIG_PM_DEBUG is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\n# CONFIG_ENERGY_MODEL is not set\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\n# end of Power management options\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\n\n#\n# ARM CPU Idle Drivers\n#\n# CONFIG_ARM_PSCI_CPUIDLE is not set\n# end of ARM CPU Idle Drivers\n# end of CPU Idle\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=y\n# CONFIG_CPU_FREQ_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\nCONFIG_CPUFREQ_DT_PLATDEV=y\nCONFIG_ARM_RASPBERRYPI_CPUFREQ=y\n# end of CPU Frequency scaling\n# end of CPU Power Management\n\nCONFIG_ARCH_SUPPORTS_ACPI=y\n# CONFIG_ACPI is not set\nCONFIG_HAVE_KVM=y\n# CONFIG_VIRTUALIZATION is not set\n\n#\n# General architecture-dependent options\n#\nCONFIG_ARCH_HAS_SUBPAGE_FAULTS=y\nCONFIG_KPROBES=y\nCONFIG_JUMP_LABEL=y\n# CONFIG_STATIC_KEYS_SELFTEST is not set\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_KRETPROBES=y\nCONFIG_HAVE_IOREMAP_PROT=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y\nCONFIG_HAVE_FUNCTION_ERROR_INJECTION=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_KEEPINITRD=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_ARCH_HAS_SET_DIRECT_MAP=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_WANTS_NO_INSTR=y\nCONFIG_HAVE_ASM_MODVERSIONS=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y\nCONFIG_MMU_GATHER_TABLE_FREE=y\nCONFIG_MMU_GATHER_RCU_TABLE_FREE=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_HAVE_ALIGNED_STRUCT_PAGE=y\nCONFIG_HAVE_CMPXCHG_LOCAL=y\nCONFIG_HAVE_CMPXCHG_DOUBLE=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_ARCH_STACKLEAK=y\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_ARCH_SUPPORTS_SHADOW_CALL_STACK=y\n# CONFIG_SHADOW_CALL_STACK is not set\nCONFIG_ARCH_SUPPORTS_LTO_CLANG=y\nCONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y\nCONFIG_LTO_NONE=y\nCONFIG_ARCH_SUPPORTS_CFI_CLANG=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOVE_PUD=y\nCONFIG_HAVE_MOVE_PMD=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_HAVE_ARCH_HUGE_VMAP=y\nCONFIG_HAVE_ARCH_HUGE_VMALLOC=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_ARCH_MMAP_RND_BITS=18\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=11\nCONFIG_PAGE_SIZE_LESS_THAN_64KB=y\nCONFIG_PAGE_SIZE_LESS_THAN_256KB=y\nCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y\nCONFIG_RANDOMIZE_KSTACK_OFFSET=y\n# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\nCONFIG_HAVE_ARCH_COMPILER_H=y\nCONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y\nCONFIG_ARCH_USE_MEMREMAP_PROT=y\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_HAS_RELR=y\nCONFIG_HAVE_PREEMPT_DYNAMIC=y\nCONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y\nCONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y\nCONFIG_ARCH_HAVE_TRACE_MMIO_ACCESS=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\nCONFIG_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/sbin/modprobe\"\n# CONFIG_TRIM_UNUSED_KSYMS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\nCONFIG_BLOCK_LEGACY_AUTOLOAD=y\nCONFIG_BLK_CGROUP_RWSTAT=y\nCONFIG_BLK_DEV_BSG_COMMON=y\nCONFIG_BLK_ICQ=y\nCONFIG_BLK_DEV_BSGLIB=y\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_DEV_ZONED is not set\nCONFIG_BLK_DEV_THROTTLING=y\n# CONFIG_BLK_DEV_THROTTLING_LOW is not set\n# CONFIG_BLK_WBT is not set\n# CONFIG_BLK_CGROUP_IOLATENCY is not set\n# CONFIG_BLK_CGROUP_IOCOST is not set\n# CONFIG_BLK_CGROUP_IOPRIO is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\nCONFIG_MAC_PARTITION=y\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\nCONFIG_LDM_PARTITION=y\n# CONFIG_LDM_DEBUG is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\n# CONFIG_CMDLINE_PARTITION is not set\n# end of Partition Types\n\nCONFIG_BLOCK_COMPAT=y\nCONFIG_BLK_MQ_PCI=y\nCONFIG_BLK_PM=y\nCONFIG_BLOCK_HOLDER_DEPRECATED=y\nCONFIG_BLK_MQ_STACKING=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\nCONFIG_IOSCHED_BFQ=y\n# CONFIG_BFQ_GROUP_IOSCHED is not set\n# end of IO Schedulers\n\nCONFIG_ASN1=y\nCONFIG_ARCH_INLINE_SPIN_TRYLOCK=y\nCONFIG_ARCH_INLINE_SPIN_TRYLOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_LOCK=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_INLINE_READ_LOCK=y\nCONFIG_ARCH_INLINE_READ_LOCK_BH=y\nCONFIG_ARCH_INLINE_READ_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_READ_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_READ_UNLOCK=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_INLINE_WRITE_LOCK=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_BH=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE=y\nCONFIG_INLINE_SPIN_TRYLOCK=y\nCONFIG_INLINE_SPIN_TRYLOCK_BH=y\nCONFIG_INLINE_SPIN_LOCK=y\nCONFIG_INLINE_SPIN_LOCK_BH=y\nCONFIG_INLINE_SPIN_LOCK_IRQ=y\nCONFIG_INLINE_SPIN_LOCK_IRQSAVE=y\nCONFIG_INLINE_SPIN_UNLOCK_BH=y\nCONFIG_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE=y\nCONFIG_INLINE_READ_LOCK=y\nCONFIG_INLINE_READ_LOCK_BH=y\nCONFIG_INLINE_READ_LOCK_IRQ=y\nCONFIG_INLINE_READ_LOCK_IRQSAVE=y\nCONFIG_INLINE_READ_UNLOCK=y\nCONFIG_INLINE_READ_UNLOCK_BH=y\nCONFIG_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_INLINE_READ_UNLOCK_IRQRESTORE=y\nCONFIG_INLINE_WRITE_LOCK=y\nCONFIG_INLINE_WRITE_LOCK_BH=y\nCONFIG_INLINE_WRITE_LOCK_IRQ=y\nCONFIG_INLINE_WRITE_LOCK_IRQSAVE=y\nCONFIG_INLINE_WRITE_UNLOCK=y\nCONFIG_INLINE_WRITE_UNLOCK_BH=y\nCONFIG_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_USE_QUEUED_SPINLOCKS=y\nCONFIG_QUEUED_SPINLOCKS=y\nCONFIG_ARCH_USE_QUEUED_RWLOCKS=y\nCONFIG_QUEUED_RWLOCKS=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_ARCH_HAS_SYSCALL_WRAPPER=y\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_ARCH_BINFMT_ELF_STATE=y\nCONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y\nCONFIG_ARCH_HAVE_ELF_PROT=y\nCONFIG_ARCH_USE_GNU_PROPERTY=y\nCONFIG_ELFCORE=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\nCONFIG_SWAP=y\n# CONFIG_ZSWAP is not set\n\n#\n# SLAB allocator options\n#\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# end of SLAB allocator options\n\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\n# CONFIG_COMPAT_BRK is not set\nCONFIG_SPARSEMEM=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_FAST_GUP=y\nCONFIG_ARCH_KEEP_MEMBLOCK=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_EXCLUSIVE_SYSTEM_RAM=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y\n# CONFIG_MEMORY_HOTPLUG is not set\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y\nCONFIG_COMPACTION=y\nCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1\n# CONFIG_PAGE_REPORTING is not set\nCONFIG_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\nCONFIG_PHYS_ADDR_T_64BIT=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y\n# CONFIG_MEMORY_FAILURE is not set\nCONFIG_ARCH_WANTS_THP_SWAP=y\n# CONFIG_TRANSPARENT_HUGEPAGE is not set\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\nCONFIG_CMA_DEBUGFS=y\n# CONFIG_CMA_SYSFS is not set\nCONFIG_CMA_AREAS=7\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CACHE_LINE_SIZE=y\nCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y\nCONFIG_ARCH_HAS_PTE_DEVMAP=y\nCONFIG_ARCH_HAS_ZONE_DMA_SET=y\nCONFIG_ZONE_DMA=y\nCONFIG_ZONE_DMA32=y\nCONFIG_ARCH_USES_HIGH_VMA_FLAGS=y\nCONFIG_VM_EVENT_COUNTERS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\nCONFIG_ARCH_HAS_PTE_SPECIAL=y\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_USERFAULTFD is not set\n# CONFIG_LRU_GEN is not set\nCONFIG_LOCK_MM_AND_FIND_VMA=y\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_INTERFACE is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_XFRM_ESP=y\n# CONFIG_NET_KEY is not set\n# CONFIG_XDP_SOCKETS is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=m\nCONFIG_IP_MROUTE_COMMON=y\nCONFIG_IP_MROUTE=y\n# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set\n# CONFIG_IP_PIMSM_V1 is not set\n# CONFIG_IP_PIMSM_V2 is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=y\n# CONFIG_INET_ESP_OFFLOAD is not set\n# CONFIG_INET_ESPINTCP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=m\n# CONFIG_INET_DIAG is not set\nCONFIG_TCP_CONG_ADVANCED=y\n# CONFIG_TCP_CONG_BIC is not set\nCONFIG_TCP_CONG_CUBIC=y\n# CONFIG_TCP_CONG_WESTWOOD is not set\nCONFIG_TCP_CONG_HTCP=m\nCONFIG_TCP_CONG_HSTCP=m\n# CONFIG_TCP_CONG_HYBLA is not set\nCONFIG_TCP_CONG_VEGAS=m\n# CONFIG_TCP_CONG_NV is not set\nCONFIG_TCP_CONG_SCALABLE=m\n# CONFIG_TCP_CONG_LP is not set\nCONFIG_TCP_CONG_VENO=m\nCONFIG_TCP_CONG_YEAH=m\nCONFIG_TCP_CONG_ILLINOIS=m\n# CONFIG_TCP_CONG_DCTCP is not set\nCONFIG_TCP_CONG_CDG=m\n# CONFIG_TCP_CONG_BBR is not set\nCONFIG_DEFAULT_CUBIC=y\n# CONFIG_DEFAULT_RENO is not set\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_IPV6_VTI is not set\nCONFIG_IPV6_SIT=m\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\nCONFIG_IPV6_FOU=m\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_MPTCP is not set\n# CONFIG_NETWORK_SECMARK is not set\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\n# CONFIG_NETFILTER_INGRESS is not set\nCONFIG_NETFILTER_EGRESS=y\nCONFIG_NETFILTER_NETLINK=m\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\nCONFIG_NETFILTER_NETLINK_LOG=m\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\n# CONFIG_NF_LOG_SYSLOG is not set\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_ZONES is not set\n# CONFIG_NF_CONNTRACK_PROCFS is not set\n# CONFIG_NF_CONNTRACK_EVENTS is not set\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\n# CONFIG_NF_CT_PROTO_DCCP is not set\n# CONFIG_NF_CT_PROTO_SCTP is not set\n# CONFIG_NF_CT_PROTO_UDPLITE is not set\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\nCONFIG_NF_CONNTRACK_IRC=m\nCONFIG_NF_CONNTRACK_BROADCAST=m\nCONFIG_NF_CONNTRACK_NETBIOS_NS=m\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\nCONFIG_NF_CONNTRACK_SIP=m\nCONFIG_NF_CONNTRACK_TFTP=m\nCONFIG_NF_CT_NETLINK=m\n# CONFIG_NETFILTER_NETLINK_GLUE_CT is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_IRC=m\nCONFIG_NF_NAT_SIP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=y\nCONFIG_NF_NAT_MASQUERADE=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\nCONFIG_NETFILTER_XTABLES_COMPAT=y\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\nCONFIG_NETFILTER_XT_MATCH_IPRANGE=m\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\nCONFIG_NETFILTER_XT_MATCH_OWNER=m\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\nCONFIG_NETFILTER_XT_MATCH_STATE=m\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\nCONFIG_IP_VS=m\n# CONFIG_IP_VS_IPV6 is not set\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_MH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n# CONFIG_IP_VS_TWOS is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS MH scheduler\n#\nCONFIG_IP_VS_MH_TAB_INDEX=12\n\n#\n# IPVS application helper\n#\n# CONFIG_IP_VS_FTP is not set\nCONFIG_IP_VS_NFCT=y\n# CONFIG_IP_VS_PE_SIP is not set\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\n# CONFIG_NF_LOG_IPV6 is not set\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_MATCH_SRH is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\nCONFIG_NET_SCH_FQ_CODEL=y\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_FLOW is not set\nCONFIG_NET_CLS_CGROUP=m\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\nCONFIG_NET_L3_MASTER_DEV=y\n# CONFIG_QRTR is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_PCPU_DEV_REFCNT=y\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_SOCK_RX_QUEUE_MAPPING=y\nCONFIG_XPS=y\nCONFIG_CGROUP_NET_PRIO=y\nCONFIG_CGROUP_NET_CLASSID=y\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\nCONFIG_BT_RFCOMM_TTY=y\n# CONFIG_BT_BNEP is not set\nCONFIG_BT_HIDP=m\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_LEDS is not set\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\n# CONFIG_BT_DEBUGFS is not set\n# CONFIG_BT_SELFTEST is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_MTK=m\nCONFIG_BT_HCIBTUSB=m\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\nCONFIG_BT_HCIBTUSB_MTK=y\nCONFIG_BT_HCIBTUSB_RTL=y\n# CONFIG_BT_HCIBTSDIO is not set\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_SERDEV=y\nCONFIG_BT_HCIUART_H4=y\n# CONFIG_BT_HCIUART_NOKIA is not set\n# CONFIG_BT_HCIUART_BCSP is not set\n# CONFIG_BT_HCIUART_ATH3K is not set\n# CONFIG_BT_HCIUART_LL is not set\nCONFIG_BT_HCIUART_3WIRE=y\n# CONFIG_BT_HCIUART_INTEL is not set\nCONFIG_BT_HCIUART_BCM=y\n# CONFIG_BT_HCIUART_RTL is not set\n# CONFIG_BT_HCIUART_QCA is not set\n# CONFIG_BT_HCIUART_AG6XX is not set\n# CONFIG_BT_HCIUART_MRVL is not set\nCONFIG_BT_HCIBCM203X=m\n# CONFIG_BT_HCIBPA10X is not set\nCONFIG_BT_HCIBFUSB=m\n# CONFIG_BT_HCIVHCI is not set\n# CONFIG_BT_MRVL is not set\nCONFIG_BT_ATH3K=m\n# CONFIG_BT_MTKSDIO is not set\n# CONFIG_BT_MTKUART is not set\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=m\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\n# CONFIG_CFG80211_CRDA_SUPPORT is not set\nCONFIG_CFG80211_WEXT=y\nCONFIG_LIB80211=m\nCONFIG_LIB80211_CRYPT_WEP=m\nCONFIG_LIB80211_CRYPT_CCMP=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=m\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=m\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_PAGE_POOL=y\n# CONFIG_PAGE_POOL_STATS is not set\n# CONFIG_FAILOVER is not set\nCONFIG_ETHTOOL_NETLINK=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\nCONFIG_HAVE_PCI=y\nCONFIG_PCI=y\nCONFIG_PCI_DOMAINS=y\nCONFIG_PCI_DOMAINS_GENERIC=y\nCONFIG_PCI_SYSCALL=y\nCONFIG_PCIEPORTBUS=y\nCONFIG_PCIEAER=y\n# CONFIG_PCIEAER_INJECT is not set\n# CONFIG_PCIE_ECRC is not set\n# CONFIG_PCIEASPM is not set\nCONFIG_PCIE_PME=y\n# CONFIG_PCIE_DPC is not set\n# CONFIG_PCIE_PTM is not set\nCONFIG_PCI_MSI=y\nCONFIG_PCI_MSI_IRQ_DOMAIN=y\nCONFIG_PCI_QUIRKS=y\n# CONFIG_PCI_DEBUG is not set\n# CONFIG_PCI_STUB is not set\n# CONFIG_PCI_IOV is not set\n# CONFIG_PCI_PRI is not set\n# CONFIG_PCI_PASID is not set\nCONFIG_PCI_LABEL=y\n# CONFIG_PCIE_BUS_TUNE_OFF is not set\nCONFIG_PCIE_BUS_DEFAULT=y\n# CONFIG_PCIE_BUS_SAFE is not set\n# CONFIG_PCIE_BUS_PERFORMANCE is not set\n# CONFIG_PCIE_BUS_PEER2PEER is not set\nCONFIG_VGA_ARB=y\nCONFIG_VGA_ARB_MAX_GPUS=16\n# CONFIG_HOTPLUG_PCI is not set\n\n#\n# PCI controller drivers\n#\n# CONFIG_PCI_FTPCI100 is not set\n# CONFIG_PCI_HOST_GENERIC is not set\n# CONFIG_PCIE_XILINX is not set\n# CONFIG_PCI_XGENE is not set\n# CONFIG_PCIE_ALTERA is not set\n# CONFIG_PCI_HOST_THUNDER_PEM is not set\n# CONFIG_PCI_HOST_THUNDER_ECAM is not set\nCONFIG_PCIE_BRCMSTB=y\n# CONFIG_PCIE_MICROCHIP_HOST is not set\n\n#\n# DesignWare PCI Core Support\n#\n# CONFIG_PCIE_DW_PLAT_HOST is not set\n# CONFIG_PCI_HISI is not set\n# CONFIG_PCIE_KIRIN is not set\n# CONFIG_PCI_MESON is not set\n# CONFIG_PCIE_AL is not set\n# end of DesignWare PCI Core Support\n\n#\n# Mobiveil PCIe Core Support\n#\n# end of Mobiveil PCIe Core Support\n\n#\n# Cadence PCIe controllers support\n#\n# CONFIG_PCIE_CADENCE_PLAT_HOST is not set\n# CONFIG_PCI_J721E_HOST is not set\n# end of Cadence PCIe controllers support\n# end of PCI controller drivers\n\n#\n# PCI Endpoint\n#\n# CONFIG_PCI_ENDPOINT is not set\n# end of PCI Endpoint\n\n#\n# PCI switch controller drivers\n#\n# CONFIG_PCI_SW_SWITCHTEC is not set\n# end of PCI switch controller drivers\n\n# CONFIG_CXL_BUS is not set\n# CONFIG_PCCARD is not set\n# CONFIG_RAPIDIO is not set\n\n#\n# Generic Driver Options\n#\n# CONFIG_UEVENT_HELPER is not set\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\n# CONFIG_DEVTMPFS_SAFE is not set\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\n# CONFIG_FW_UPLOAD is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\n# CONFIG_ALLOW_DEV_COREDUMP is not set\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_SOC_BUS=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_MOXTET is not set\n# CONFIG_VEXPRESS_CONFIG is not set\n# CONFIG_MHI_BUS is not set\n# CONFIG_MHI_BUS_EP is not set\n# end of Bus devices\n\n# CONFIG_CONNECTOR is not set\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\n# CONFIG_ARM_SCMI_PROTOCOL is not set\n# end of ARM System Control and Management Interface Protocol\n\n# CONFIG_ARM_SCPI_PROTOCOL is not set\n# CONFIG_FIRMWARE_MEMMAP is not set\nCONFIG_DMIID=y\n# CONFIG_DMI_SYSFS is not set\nCONFIG_RASPBERRYPI_FIRMWARE=y\n# CONFIG_FW_CFG_SYSFS is not set\n# CONFIG_SYSFB_SIMPLEFB is not set\n# CONFIG_ARM_FFA_TRANSPORT is not set\nCONFIG_CS_DSP=m\n# CONFIG_GOOGLE_FIRMWARE is not set\n\n#\n# EFI (Extensible Firmware Interface) Support\n#\nCONFIG_EFI_ESRT=y\n# CONFIG_EFI_VARS_PSTORE is not set\nCONFIG_EFI_PARAMS_FROM_FDT=y\nCONFIG_EFI_RUNTIME_WRAPPERS=y\nCONFIG_EFI_GENERIC_STUB=y\n# CONFIG_EFI_ZBOOT is not set\nCONFIG_EFI_ARMSTUB_DTB_LOADER=y\nCONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y\n# CONFIG_EFI_BOOTLOADER_CONTROL is not set\n# CONFIG_EFI_CAPSULE_LOADER is not set\n# CONFIG_EFI_TEST is not set\n# CONFIG_RESET_ATTACK_MITIGATION is not set\n# CONFIG_EFI_DISABLE_PCI_DMA is not set\nCONFIG_EFI_EARLYCON=y\n# CONFIG_EFI_DISABLE_RUNTIME is not set\n# CONFIG_EFI_COCO_SECRET is not set\n# end of EFI (Extensible Firmware Interface) Support\n\nCONFIG_ARM_PSCI_FW=y\nCONFIG_HAVE_ARM_SMCCC=y\nCONFIG_HAVE_ARM_SMCCC_DISCOVERY=y\nCONFIG_ARM_SMCCC_SOC_ID=y\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\n# CONFIG_MTD is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_DYNAMIC=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\nCONFIG_OF_RESOLVE=y\nCONFIG_OF_OVERLAY=y\nCONFIG_OF_CONFIGFS=y\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_CDROM=y\n# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set\n# CONFIG_ZRAM is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=0\n# CONFIG_BLK_DEV_DRBD is not set\nCONFIG_BLK_DEV_NBD=y\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=16\nCONFIG_BLK_DEV_RAM_SIZE=4096\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_UBLK is not set\n\n#\n# NVME Support\n#\nCONFIG_NVME_CORE=y\nCONFIG_BLK_DEV_NVME=y\n# CONFIG_NVME_MULTIPATH is not set\n# CONFIG_NVME_VERBOSE_ERRORS is not set\n# CONFIG_NVME_HWMON is not set\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TCP is not set\n# CONFIG_NVME_AUTH is not set\n# CONFIG_NVME_TARGET is not set\n# end of NVME Support\n\n#\n# Misc devices\n#\nCONFIG_BCM2835_SMI=m\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_PHANTOM is not set\n# CONFIG_TIFM_CORE is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_HP_ILO is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\n# CONFIG_SRAM is not set\n# CONFIG_DW_XDATA_PCIE is not set\n# CONFIG_PCI_ENDPOINT_TEST is not set\n# CONFIG_XILINX_SDFEC is not set\nCONFIG_MISC_RTSX=y\n# CONFIG_OPEN_DICE is not set\n# CONFIG_VCPU_STALL_DETECTOR is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\n# CONFIG_EEPROM_AT25 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_EEPROM_EE1004 is not set\n# end of EEPROM support\n\n# CONFIG_CB710_CORE is not set\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n# CONFIG_VMWARE_VMCI is not set\n# CONFIG_GENWQE is not set\n# CONFIG_ECHO is not set\n# CONFIG_BCM_VK is not set\n# CONFIG_MISC_ALCOR_PCI is not set\n# CONFIG_MISC_RTSX_PCI is not set\nCONFIG_MISC_RTSX_USB=y\n# CONFIG_HABANA_AI is not set\n# CONFIG_PVPANIC is not set\n# CONFIG_GP_PCI1XXXX is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_PROC_FS is not set\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_CHR_DEV_SG=m\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\n# CONFIG_SCSI_SCAN_ASYNC is not set\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\nCONFIG_SCSI_ISCSI_ATTRS=y\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\nCONFIG_SCSI_LOWLEVEL=y\nCONFIG_ISCSI_TCP=y\nCONFIG_ISCSI_BOOT_SYSFS=y\n# CONFIG_SCSI_CXGB3_ISCSI is not set\n# CONFIG_SCSI_CXGB4_ISCSI is not set\n# CONFIG_SCSI_BNX2_ISCSI is not set\n# CONFIG_BE2ISCSI is not set\n# CONFIG_BLK_DEV_3W_XXXX_RAID is not set\n# CONFIG_SCSI_HPSA is not set\n# CONFIG_SCSI_3W_9XXX is not set\n# CONFIG_SCSI_3W_SAS is not set\n# CONFIG_SCSI_ACARD is not set\n# CONFIG_SCSI_AACRAID is not set\n# CONFIG_SCSI_AIC7XXX is not set\n# CONFIG_SCSI_AIC79XX is not set\n# CONFIG_SCSI_AIC94XX is not set\n# CONFIG_SCSI_MVSAS is not set\n# CONFIG_SCSI_MVUMI is not set\n# CONFIG_SCSI_ADVANSYS is not set\n# CONFIG_SCSI_ARCMSR is not set\n# CONFIG_SCSI_ESAS2R is not set\n# CONFIG_MEGARAID_NEWGEN is not set\n# CONFIG_MEGARAID_LEGACY is not set\n# CONFIG_MEGARAID_SAS is not set\n# CONFIG_SCSI_MPT3SAS is not set\n# CONFIG_SCSI_MPT2SAS is not set\n# CONFIG_SCSI_MPI3MR is not set\n# CONFIG_SCSI_SMARTPQI is not set\n# CONFIG_SCSI_HPTIOP is not set\n# CONFIG_SCSI_BUSLOGIC is not set\n# CONFIG_SCSI_MYRB is not set\n# CONFIG_SCSI_MYRS is not set\n# CONFIG_SCSI_SNIC is not set\n# CONFIG_SCSI_DMX3191D is not set\n# CONFIG_SCSI_FDOMAIN_PCI is not set\n# CONFIG_SCSI_IPS is not set\n# CONFIG_SCSI_INITIO is not set\n# CONFIG_SCSI_INIA100 is not set\n# CONFIG_SCSI_STEX is not set\n# CONFIG_SCSI_SYM53C8XX_2 is not set\n# CONFIG_SCSI_QLOGIC_1280 is not set\n# CONFIG_SCSI_QLA_ISCSI is not set\n# CONFIG_SCSI_DC395x is not set\n# CONFIG_SCSI_AM53C974 is not set\n# CONFIG_SCSI_WD719X is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_PMCRAID is not set\n# CONFIG_SCSI_PM8001 is not set\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\n# CONFIG_ATA is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\n# CONFIG_DM_DEBUG is not set\nCONFIG_DM_BUFIO=m\n# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\n# CONFIG_DM_UNSTRIPED is not set\n# CONFIG_DM_CRYPT is not set\n# CONFIG_DM_SNAPSHOT is not set\nCONFIG_DM_THIN_PROVISIONING=m\n# CONFIG_DM_CACHE is not set\n# CONFIG_DM_WRITECACHE is not set\n# CONFIG_DM_EBS is not set\n# CONFIG_DM_ERA is not set\n# CONFIG_DM_CLONE is not set\n# CONFIG_DM_MIRROR is not set\n# CONFIG_DM_RAID is not set\n# CONFIG_DM_ZERO is not set\n# CONFIG_DM_MULTIPATH is not set\n# CONFIG_DM_DELAY is not set\n# CONFIG_DM_DUST is not set\n# CONFIG_DM_UEVENT is not set\n# CONFIG_DM_FLAKEY is not set\n# CONFIG_DM_VERITY is not set\n# CONFIG_DM_SWITCH is not set\n# CONFIG_DM_LOG_WRITES is not set\n# CONFIG_DM_INTEGRITY is not set\n# CONFIG_TARGET_CORE is not set\n# CONFIG_FUSION is not set\n\n#\n# IEEE 1394 (FireWire) support\n#\n# CONFIG_FIREWIRE is not set\n# CONFIG_FIREWIRE_NOSY is not set\n# end of IEEE 1394 (FireWire) support\n\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\nCONFIG_DUMMY=m\nCONFIG_WIREGUARD=m\n# CONFIG_WIREGUARD_DEBUG is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_FC is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\n# CONFIG_MACVTAP is not set\nCONFIG_IPVLAN_L3S=y\nCONFIG_IPVLAN=m\n# CONFIG_IPVTAP is not set\nCONFIG_VXLAN=m\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_AMT is not set\n# CONFIG_MACSEC is not set\nCONFIG_NETCONSOLE=y\nCONFIG_NETCONSOLE_DYNAMIC=y\nCONFIG_NETPOLL=y\nCONFIG_NET_POLL_CONTROLLER=y\nCONFIG_TUN=y\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\nCONFIG_NLMON=m\n# CONFIG_ARCNET is not set\nCONFIG_ETHERNET=y\nCONFIG_NET_VENDOR_3COM=y\n# CONFIG_VORTEX is not set\n# CONFIG_TYPHOON is not set\nCONFIG_NET_VENDOR_ADAPTEC=y\n# CONFIG_ADAPTEC_STARFIRE is not set\nCONFIG_NET_VENDOR_AGERE=y\n# CONFIG_ET131X is not set\nCONFIG_NET_VENDOR_ALACRITECH=y\n# CONFIG_SLICOSS is not set\nCONFIG_NET_VENDOR_ALTEON=y\n# CONFIG_ACENIC is not set\n# CONFIG_ALTERA_TSE is not set\nCONFIG_NET_VENDOR_AMAZON=y\n# CONFIG_ENA_ETHERNET is not set\nCONFIG_NET_VENDOR_AMD=y\n# CONFIG_AMD8111_ETH is not set\n# CONFIG_PCNET32 is not set\n# CONFIG_AMD_XGBE is not set\nCONFIG_NET_VENDOR_AQUANTIA=y\n# CONFIG_AQTION is not set\nCONFIG_NET_VENDOR_ARC=y\nCONFIG_NET_VENDOR_ASIX=y\n# CONFIG_SPI_AX88796C is not set\nCONFIG_NET_VENDOR_ATHEROS=y\n# CONFIG_ATL2 is not set\n# CONFIG_ATL1 is not set\n# CONFIG_ATL1E is not set\n# CONFIG_ATL1C is not set\n# CONFIG_ALX is not set\nCONFIG_NET_VENDOR_BROADCOM=y\n# CONFIG_B44 is not set\nCONFIG_BCMGENET=y\n# CONFIG_BNX2 is not set\n# CONFIG_CNIC is not set\n# CONFIG_TIGON3 is not set\n# CONFIG_BNX2X is not set\n# CONFIG_SYSTEMPORT is not set\n# CONFIG_BNXT is not set\nCONFIG_NET_VENDOR_CADENCE=y\n# CONFIG_MACB is not set\nCONFIG_NET_VENDOR_CAVIUM=y\n# CONFIG_THUNDER_NIC_PF is not set\n# CONFIG_THUNDER_NIC_VF is not set\n# CONFIG_THUNDER_NIC_BGX is not set\n# CONFIG_THUNDER_NIC_RGX is not set\n# CONFIG_LIQUIDIO is not set\n# CONFIG_LIQUIDIO_VF is not set\nCONFIG_NET_VENDOR_CHELSIO=y\n# CONFIG_CHELSIO_T1 is not set\n# CONFIG_CHELSIO_T3 is not set\n# CONFIG_CHELSIO_T4 is not set\n# CONFIG_CHELSIO_T4VF is not set\nCONFIG_NET_VENDOR_CISCO=y\n# CONFIG_ENIC is not set\nCONFIG_NET_VENDOR_CORTINA=y\n# CONFIG_GEMINI_ETHERNET is not set\nCONFIG_NET_VENDOR_DAVICOM=y\n# CONFIG_DM9051 is not set\n# CONFIG_DNET is not set\nCONFIG_NET_VENDOR_DEC=y\n# CONFIG_NET_TULIP is not set\nCONFIG_NET_VENDOR_DLINK=y\n# CONFIG_DL2K is not set\n# CONFIG_SUNDANCE is not set\nCONFIG_NET_VENDOR_EMULEX=y\n# CONFIG_BE2NET is not set\nCONFIG_NET_VENDOR_ENGLEDER=y\n# CONFIG_TSNEP is not set\nCONFIG_NET_VENDOR_EZCHIP=y\n# CONFIG_EZCHIP_NPS_MANAGEMENT_ENET is not set\nCONFIG_NET_VENDOR_FUNGIBLE=y\n# CONFIG_FUN_ETH is not set\nCONFIG_NET_VENDOR_GOOGLE=y\n# CONFIG_GVE is not set\nCONFIG_NET_VENDOR_HISILICON=y\n# CONFIG_HIX5HD2_GMAC is not set\n# CONFIG_HISI_FEMAC is not set\n# CONFIG_HIP04_ETH is not set\n# CONFIG_HNS_DSAF is not set\n# CONFIG_HNS_ENET is not set\n# CONFIG_HNS3 is not set\nCONFIG_NET_VENDOR_HUAWEI=y\n# CONFIG_HINIC is not set\nCONFIG_NET_VENDOR_I825XX=y\nCONFIG_NET_VENDOR_INTEL=y\n# CONFIG_E100 is not set\n# CONFIG_E1000 is not set\n# CONFIG_E1000E is not set\n# CONFIG_IGB is not set\n# CONFIG_IGBVF is not set\n# CONFIG_IXGB is not set\n# CONFIG_IXGBE is not set\n# CONFIG_IXGBEVF is not set\n# CONFIG_I40E is not set\n# CONFIG_I40EVF is not set\n# CONFIG_ICE is not set\n# CONFIG_FM10K is not set\n# CONFIG_IGC is not set\nCONFIG_NET_VENDOR_WANGXUN=y\n# CONFIG_NGBE is not set\n# CONFIG_TXGBE is not set\n# CONFIG_JME is not set\nCONFIG_NET_VENDOR_ADI=y\nCONFIG_NET_VENDOR_LITEX=y\n# CONFIG_LITEX_LITEETH is not set\nCONFIG_NET_VENDOR_MARVELL=y\n# CONFIG_MVMDIO is not set\n# CONFIG_SKGE is not set\n# CONFIG_SKY2 is not set\n# CONFIG_OCTEONTX2_AF is not set\n# CONFIG_OCTEONTX2_PF is not set\n# CONFIG_OCTEON_EP is not set\nCONFIG_NET_VENDOR_MELLANOX=y\n# CONFIG_MLX4_EN is not set\n# CONFIG_MLX5_CORE is not set\n# CONFIG_MLXSW_CORE is not set\n# CONFIG_MLXFW is not set\nCONFIG_NET_VENDOR_MICREL=y\n# CONFIG_KS8842 is not set\n# CONFIG_KS8851 is not set\n# CONFIG_KS8851_MLL is not set\n# CONFIG_KSZ884X_PCI is not set\nCONFIG_NET_VENDOR_MICROCHIP=y\n# CONFIG_ENC28J60 is not set\n# CONFIG_ENCX24J600 is not set\n# CONFIG_LAN743X is not set\nCONFIG_NET_VENDOR_MICROSEMI=y\nCONFIG_NET_VENDOR_MICROSOFT=y\nCONFIG_NET_VENDOR_MYRI=y\n# CONFIG_MYRI10GE is not set\n# CONFIG_FEALNX is not set\nCONFIG_NET_VENDOR_NI=y\n# CONFIG_NI_XGE_MANAGEMENT_ENET is not set\nCONFIG_NET_VENDOR_NATSEMI=y\n# CONFIG_NATSEMI is not set\n# CONFIG_NS83820 is not set\nCONFIG_NET_VENDOR_NETERION=y\n# CONFIG_S2IO is not set\nCONFIG_NET_VENDOR_NETRONOME=y\n# CONFIG_NFP is not set\nCONFIG_NET_VENDOR_8390=y\n# CONFIG_NE2K_PCI is not set\nCONFIG_NET_VENDOR_NVIDIA=y\n# CONFIG_FORCEDETH is not set\nCONFIG_NET_VENDOR_OKI=y\n# CONFIG_ETHOC is not set\nCONFIG_NET_VENDOR_PACKET_ENGINES=y\n# CONFIG_HAMACHI is not set\n# CONFIG_YELLOWFIN is not set\n# CONFIG_NET_VENDOR_PENSANDO is not set\nCONFIG_NET_VENDOR_QLOGIC=y\n# CONFIG_QLA3XXX is not set\n# CONFIG_QLCNIC is not set\n# CONFIG_NETXEN_NIC is not set\n# CONFIG_QED is not set\nCONFIG_NET_VENDOR_BROCADE=y\n# CONFIG_BNA is not set\nCONFIG_NET_VENDOR_QUALCOMM=y\n# CONFIG_QCA7000_SPI is not set\n# CONFIG_QCA7000_UART is not set\n# CONFIG_QCOM_EMAC is not set\n# CONFIG_RMNET is not set\nCONFIG_NET_VENDOR_RDC=y\n# CONFIG_R6040 is not set\nCONFIG_NET_VENDOR_REALTEK=y\n# CONFIG_8139CP is not set\n# CONFIG_8139TOO is not set\n# CONFIG_R8169 is not set\nCONFIG_NET_VENDOR_RENESAS=y\nCONFIG_NET_VENDOR_ROCKER=y\nCONFIG_NET_VENDOR_SAMSUNG=y\n# CONFIG_SXGBE_ETH is not set\nCONFIG_NET_VENDOR_SEEQ=y\nCONFIG_NET_VENDOR_SILAN=y\n# CONFIG_SC92031 is not set\nCONFIG_NET_VENDOR_SIS=y\n# CONFIG_SIS900 is not set\n# CONFIG_SIS190 is not set\nCONFIG_NET_VENDOR_SOLARFLARE=y\n# CONFIG_SFC is not set\n# CONFIG_SFC_FALCON is not set\nCONFIG_NET_VENDOR_SMSC=y\n# CONFIG_SMC91X is not set\n# CONFIG_EPIC100 is not set\n# CONFIG_SMSC911X is not set\n# CONFIG_SMSC9420 is not set\nCONFIG_NET_VENDOR_SOCIONEXT=y\nCONFIG_NET_VENDOR_STMICRO=y\n# CONFIG_STMMAC_ETH is not set\nCONFIG_NET_VENDOR_SUN=y\n# CONFIG_HAPPYMEAL is not set\n# CONFIG_SUNGEM is not set\n# CONFIG_CASSINI is not set\n# CONFIG_NIU is not set\nCONFIG_NET_VENDOR_SYNOPSYS=y\n# CONFIG_DWC_XLGMAC is not set\nCONFIG_NET_VENDOR_TEHUTI=y\n# CONFIG_TEHUTI is not set\nCONFIG_NET_VENDOR_TI=y\n# CONFIG_TI_CPSW_PHY_SEL is not set\n# CONFIG_TLAN is not set\nCONFIG_NET_VENDOR_VERTEXCOM=y\n# CONFIG_MSE102X is not set\nCONFIG_NET_VENDOR_VIA=y\n# CONFIG_VIA_RHINE is not set\n# CONFIG_VIA_VELOCITY is not set\nCONFIG_NET_VENDOR_WIZNET=y\n# CONFIG_WIZNET_W5100 is not set\n# CONFIG_WIZNET_W5300 is not set\nCONFIG_NET_VENDOR_XILINX=y\n# CONFIG_XILINX_EMACLITE is not set\n# CONFIG_XILINX_AXI_EMAC is not set\n# CONFIG_XILINX_LL_TEMAC is not set\n# CONFIG_FDDI is not set\n# CONFIG_HIPPI is not set\nCONFIG_PHYLINK=m\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_ADIN_PHY is not set\n# CONFIG_ADIN1100_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=m\nCONFIG_BROADCOM_PHY=y\n# CONFIG_BCM54140_PHY is not set\nCONFIG_BCM7XXX_PHY=y\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\nCONFIG_BCM_NET_PHYLIB=y\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MARVELL_88X2222_PHY is not set\n# CONFIG_MAXLINEAR_GPHY is not set\n# CONFIG_MEDIATEK_GE_PHY is not set\n# CONFIG_MICREL_PHY is not set\nCONFIG_MICROCHIP_PHY=y\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_MOTORCOMM_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_NXP_TJA11XX_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_QSEMI_PHY is not set\n# CONFIG_REALTEK_PHY is not set\n# CONFIG_RENESAS_PHY is not set\n# CONFIG_ROCKCHIP_PHY is not set\nCONFIG_SMSC_PHY=y\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_DP83TD510_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\n# CONFIG_PSE_CONTROLLER is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_OF_MDIO=y\nCONFIG_MDIO_DEVRES=y\n# CONFIG_MDIO_BITBANG is not set\nCONFIG_MDIO_BCM_UNIMAC=y\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_OCTEON is not set\n# CONFIG_MDIO_IPQ4019 is not set\n# CONFIG_MDIO_IPQ8064 is not set\n# CONFIG_MDIO_THUNDER is not set\n\n#\n# MDIO Multiplexers\n#\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n\n#\n# PCS device drivers\n#\n# end of PCS device drivers\n\nCONFIG_PPP=m\nCONFIG_PPP_BSDCOMP=m\nCONFIG_PPP_DEFLATE=m\n# CONFIG_PPP_FILTER is not set\nCONFIG_PPP_MPPE=m\n# CONFIG_PPP_MULTILINK is not set\nCONFIG_PPPOE=m\nCONFIG_PPP_ASYNC=m\n# CONFIG_PPP_SYNC_TTY is not set\n# CONFIG_SLIP is not set\nCONFIG_SLHC=m\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\n# CONFIG_USB_PEGASUS is not set\n# CONFIG_USB_RTL8150 is not set\nCONFIG_USB_RTL8152=m\nCONFIG_USB_LAN78XX=y\nCONFIG_USB_USBNET=y\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\n# CONFIG_USB_NET_CDC_EEM is not set\n# CONFIG_USB_NET_CDC_NCM is not set\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\nCONFIG_USB_NET_DM9601=y\n# CONFIG_USB_NET_SR9700 is not set\n# CONFIG_USB_NET_SR9800 is not set\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=y\n# CONFIG_USB_NET_GL620A is not set\n# CONFIG_USB_NET_NET1080 is not set\n# CONFIG_USB_NET_PLUSB is not set\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\n# CONFIG_USB_NET_CDC_SUBSET is not set\n# CONFIG_USB_NET_ZAURUS is not set\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\nCONFIG_USB_HSO=m\n# CONFIG_USB_NET_INT51X1 is not set\nCONFIG_USB_IPHETH=m\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\n# CONFIG_USB_NET_AQC111 is not set\nCONFIG_USB_RTL8153_ECM=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\n# CONFIG_ADM8211 is not set\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\n# CONFIG_ATH5K is not set\n# CONFIG_ATH5K_PCI is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\nCONFIG_ATH9K=m\nCONFIG_ATH9K_PCI=y\nCONFIG_ATH9K_AHB=y\n# CONFIG_ATH9K_DEBUGFS is not set\n# CONFIG_ATH9K_DYNACK is not set\n# CONFIG_ATH9K_WOW is not set\nCONFIG_ATH9K_RFKILL=y\nCONFIG_ATH9K_CHANNEL_CONTEXT=y\nCONFIG_ATH9K_PCOEM=y\n# CONFIG_ATH9K_PCI_NO_EEPROM is not set\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\nCONFIG_ATH9K_HWRNG=y\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\nCONFIG_CARL9170_HWRNG=y\nCONFIG_ATH6KL=m\n# CONFIG_ATH6KL_SDIO is not set\nCONFIG_ATH6KL_USB=m\n# CONFIG_ATH6KL_DEBUG is not set\n# CONFIG_ATH6KL_TRACING is not set\nCONFIG_AR5523=m\n# CONFIG_WIL6210 is not set\n# CONFIG_ATH10K is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\n# CONFIG_ATMEL is not set\n# CONFIG_AT76C50X_USB is not set\nCONFIG_WLAN_VENDOR_BROADCOM=y\nCONFIG_B43=m\nCONFIG_B43_BCMA=y\nCONFIG_B43_SSB=y\nCONFIG_B43_BUSES_BCMA_AND_SSB=y\n# CONFIG_B43_BUSES_BCMA is not set\n# CONFIG_B43_BUSES_SSB is not set\nCONFIG_B43_PCI_AUTOSELECT=y\nCONFIG_B43_PCICORE_AUTOSELECT=y\n# CONFIG_B43_SDIO is not set\nCONFIG_B43_BCMA_PIO=y\nCONFIG_B43_PIO=y\nCONFIG_B43_PHY_G=y\nCONFIG_B43_PHY_N=y\nCONFIG_B43_PHY_LP=y\nCONFIG_B43_PHY_HT=y\nCONFIG_B43_LEDS=y\nCONFIG_B43_HWRNG=y\n# CONFIG_B43_DEBUG is not set\n# CONFIG_B43LEGACY is not set\nCONFIG_BRCMUTIL=m\n# CONFIG_BRCMSMAC is not set\nCONFIG_BRCMFMAC=m\nCONFIG_BRCMFMAC_PROTO_BCDC=y\nCONFIG_BRCMFMAC_SDIO=y\nCONFIG_BRCMFMAC_USB=y\n# CONFIG_BRCMFMAC_PCIE is not set\n# CONFIG_BRCM_TRACING is not set\nCONFIG_BRCMDBG=y\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\n# CONFIG_IPW2100 is not set\n# CONFIG_IPW2200 is not set\n# CONFIG_IWL4965 is not set\n# CONFIG_IWL3945 is not set\n# CONFIG_IWLWIFI is not set\nCONFIG_WLAN_VENDOR_INTERSIL=y\n# CONFIG_HOSTAP is not set\n# CONFIG_HERMES is not set\nCONFIG_P54_COMMON=m\nCONFIG_P54_USB=m\n# CONFIG_P54_PCI is not set\n# CONFIG_P54_SPI is not set\nCONFIG_P54_LEDS=y\nCONFIG_WLAN_VENDOR_MARVELL=y\n# CONFIG_LIBERTAS is not set\n# CONFIG_LIBERTAS_THINFIRM is not set\n# CONFIG_MWIFIEX is not set\n# CONFIG_MWL8K is not set\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_MT76_CORE=m\nCONFIG_MT76_LEDS=y\nCONFIG_MT76_USB=m\nCONFIG_MT76x02_LIB=m\nCONFIG_MT76x02_USB=m\nCONFIG_MT76_CONNAC_LIB=m\nCONFIG_MT76x0_COMMON=m\nCONFIG_MT76x0U=m\n# CONFIG_MT76x0E is not set\nCONFIG_MT76x2_COMMON=m\n# CONFIG_MT76x2E is not set\nCONFIG_MT76x2U=m\n# CONFIG_MT7603E is not set\nCONFIG_MT7615_COMMON=m\n# CONFIG_MT7615E is not set\nCONFIG_MT7663_USB_SDIO_COMMON=m\nCONFIG_MT7663U=m\n# CONFIG_MT7663S is not set\n# CONFIG_MT7915E is not set\n# CONFIG_MT7921E is not set\n# CONFIG_MT7921S is not set\n# CONFIG_MT7921U is not set\nCONFIG_WLAN_VENDOR_MICROCHIP=y\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\nCONFIG_WLAN_VENDOR_PURELIFI=y\n# CONFIG_PLFXLC is not set\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\n# CONFIG_RT2400PCI is not set\n# CONFIG_RT2500PCI is not set\n# CONFIG_RT61PCI is not set\n# CONFIG_RT2800PCI is not set\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\n# CONFIG_RTL8180 is not set\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=m\n# CONFIG_RTL8192CE is not set\n# CONFIG_RTL8192SE is not set\n# CONFIG_RTL8192DE is not set\n# CONFIG_RTL8723AE is not set\n# CONFIG_RTL8723BE is not set\n# CONFIG_RTL8188EE is not set\n# CONFIG_RTL8192EE is not set\n# CONFIG_RTL8821AE is not set\n# CONFIG_RTL8192CU is not set\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\nCONFIG_RTW88=m\n# CONFIG_RTW88_8822BE is not set\n# CONFIG_RTW88_8822CE is not set\n# CONFIG_RTW88_8723DE is not set\n# CONFIG_RTW88_8821CE is not set\n# CONFIG_RTW89 is not set\nCONFIG_WLAN_VENDOR_RSI=y\n# CONFIG_RSI_91X is not set\nCONFIG_WLAN_VENDOR_SILABS=y\n# CONFIG_WFX is not set\nCONFIG_WLAN_VENDOR_ST=y\n# CONFIG_CW1200 is not set\nCONFIG_WLAN_VENDOR_TI=y\n# CONFIG_WL1251 is not set\n# CONFIG_WL12XX is not set\n# CONFIG_WL18XX is not set\n# CONFIG_WLCORE is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\nCONFIG_USB_ZD1201=m\nCONFIG_ZD1211RW=m\n# CONFIG_ZD1211RW_DEBUG is not set\n# CONFIG_WLAN_VENDOR_QUANTENNA is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\n# CONFIG_VMXNET3 is not set\n# CONFIG_NETDEVSIM is not set\n# CONFIG_NET_FAILOVER is not set\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\n# CONFIG_INPUT_MATRIXKMAP is not set\n\n#\n# Userland interfaces\n#\nCONFIG_INPUT_MOUSEDEV=y\n# CONFIG_INPUT_MOUSEDEV_PSAUX is not set\nCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024\nCONFIG_INPUT_MOUSEDEV_SCREEN_Y=768\nCONFIG_INPUT_JOYDEV=y\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\n# CONFIG_KEYBOARD_ATKBD is not set\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=m\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_PINEPHONE is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\n# CONFIG_KEYBOARD_CYPRESS_SF is not set\n# CONFIG_INPUT_MOUSE is not set\nCONFIG_INPUT_JOYSTICK=y\n# CONFIG_JOYSTICK_ANALOG is not set\n# CONFIG_JOYSTICK_A3D is not set\n# CONFIG_JOYSTICK_ADI is not set\n# CONFIG_JOYSTICK_COBRA is not set\n# CONFIG_JOYSTICK_GF2K is not set\n# CONFIG_JOYSTICK_GRIP is not set\n# CONFIG_JOYSTICK_GRIP_MP is not set\n# CONFIG_JOYSTICK_GUILLEMOT is not set\n# CONFIG_JOYSTICK_INTERACT is not set\n# CONFIG_JOYSTICK_SIDEWINDER is not set\n# CONFIG_JOYSTICK_TMDC is not set\n# CONFIG_JOYSTICK_IFORCE is not set\n# CONFIG_JOYSTICK_WARRIOR is not set\n# CONFIG_JOYSTICK_MAGELLAN is not set\n# CONFIG_JOYSTICK_SPACEORB is not set\n# CONFIG_JOYSTICK_SPACEBALL is not set\n# CONFIG_JOYSTICK_STINGER is not set\n# CONFIG_JOYSTICK_TWIDJOY is not set\n# CONFIG_JOYSTICK_ZHENHUA is not set\n# CONFIG_JOYSTICK_AS5011 is not set\n# CONFIG_JOYSTICK_JOYDUMP is not set\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\nCONFIG_JOYSTICK_PSXPAD_SPI=m\nCONFIG_JOYSTICK_PSXPAD_SPI_FF=y\n# CONFIG_JOYSTICK_PXRC is not set\n# CONFIG_JOYSTICK_QWIIC is not set\n# CONFIG_JOYSTICK_FSIA6B is not set\n# CONFIG_JOYSTICK_SENSEHAT is not set\n# CONFIG_JOYSTICK_RPISENSE is not set\n# CONFIG_INPUT_TABLET is not set\nCONFIG_INPUT_TOUCHSCREEN=y\nCONFIG_TOUCHSCREEN_ADS7846=m\n# CONFIG_TOUCHSCREEN_AD7877 is not set\n# CONFIG_TOUCHSCREEN_AD7879 is not set\n# CONFIG_TOUCHSCREEN_AR1021_I2C is not set\n# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set\n# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_BU21013 is not set\n# CONFIG_TOUCHSCREEN_BU21029 is not set\n# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMA140 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set\n# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set\n# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set\n# CONFIG_TOUCHSCREEN_DYNAPRO is not set\n# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set\n# CONFIG_TOUCHSCREEN_EETI is not set\nCONFIG_TOUCHSCREEN_EGALAX=m\n# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set\n# CONFIG_TOUCHSCREEN_EXC3000 is not set\n# CONFIG_TOUCHSCREEN_FUJITSU is not set\n# CONFIG_TOUCHSCREEN_GOODIX is not set\n# CONFIG_TOUCHSCREEN_HIDEEP is not set\n# CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set\n# CONFIG_TOUCHSCREEN_ILI210X is not set\n# CONFIG_TOUCHSCREEN_ILITEK is not set\n# CONFIG_TOUCHSCREEN_S6SY761 is not set\n# CONFIG_TOUCHSCREEN_GUNZE is not set\n# CONFIG_TOUCHSCREEN_EKTF2127 is not set\n# CONFIG_TOUCHSCREEN_ELAN is not set\n# CONFIG_TOUCHSCREEN_ELO is not set\n# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set\n# CONFIG_TOUCHSCREEN_WACOM_I2C is not set\n# CONFIG_TOUCHSCREEN_MAX11801 is not set\n# CONFIG_TOUCHSCREEN_MCS5000 is not set\n# CONFIG_TOUCHSCREEN_MMS114 is not set\n# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set\n# CONFIG_TOUCHSCREEN_MSG2638 is not set\n# CONFIG_TOUCHSCREEN_MTOUCH is not set\n# CONFIG_TOUCHSCREEN_IMAGIS is not set\n# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set\n# CONFIG_TOUCHSCREEN_INEXIO is not set\n# CONFIG_TOUCHSCREEN_MK712 is not set\n# CONFIG_TOUCHSCREEN_PENMOUNT is not set\nCONFIG_TOUCHSCREEN_EDT_FT5X06=m\nCONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m\n# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set\n# CONFIG_TOUCHSCREEN_TOUCHWIN is not set\n# CONFIG_TOUCHSCREEN_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set\nCONFIG_TOUCHSCREEN_USB_COMPOSITE=m\nCONFIG_TOUCHSCREEN_USB_EGALAX=y\n# CONFIG_TOUCHSCREEN_USB_PANJIT is not set\nCONFIG_TOUCHSCREEN_USB_3M=y\n# CONFIG_TOUCHSCREEN_USB_ITM is not set\n# CONFIG_TOUCHSCREEN_USB_ETURBO is not set\n# CONFIG_TOUCHSCREEN_USB_GUNZE is not set\n# CONFIG_TOUCHSCREEN_USB_DMC_TSC10 is not set\n# CONFIG_TOUCHSCREEN_USB_IRTOUCH is not set\n# CONFIG_TOUCHSCREEN_USB_IDEALTEK is not set\n# CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH is not set\n# CONFIG_TOUCHSCREEN_USB_GOTOP is not set\n# CONFIG_TOUCHSCREEN_USB_JASTEC is not set\n# CONFIG_TOUCHSCREEN_USB_ELO is not set\n# CONFIG_TOUCHSCREEN_USB_E2I is not set\n# CONFIG_TOUCHSCREEN_USB_ZYTRONIC is not set\n# CONFIG_TOUCHSCREEN_USB_ETT_TC45USB is not set\n# CONFIG_TOUCHSCREEN_USB_NEXIO is not set\n# CONFIG_TOUCHSCREEN_USB_EASYTOUCH is not set\n# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set\n# CONFIG_TOUCHSCREEN_TSC_SERIO is not set\n# CONFIG_TOUCHSCREEN_TSC2004 is not set\n# CONFIG_TOUCHSCREEN_TSC2005 is not set\n# CONFIG_TOUCHSCREEN_TSC2007 is not set\n# CONFIG_TOUCHSCREEN_RM_TS is not set\n# CONFIG_TOUCHSCREEN_SILEAD is not set\n# CONFIG_TOUCHSCREEN_SIS_I2C is not set\nCONFIG_TOUCHSCREEN_ST1232=m\n# CONFIG_TOUCHSCREEN_STMFTS is not set\n# CONFIG_TOUCHSCREEN_SUR40 is not set\n# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set\n# CONFIG_TOUCHSCREEN_SX8654 is not set\n# CONFIG_TOUCHSCREEN_TPS6507X is not set\n# CONFIG_TOUCHSCREEN_ZET6223 is not set\n# CONFIG_TOUCHSCREEN_ZFORCE is not set\n# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set\n# CONFIG_TOUCHSCREEN_IQS5XX is not set\n# CONFIG_TOUCHSCREEN_ZINITIX is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ARIZONA_HAPTICS is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\nCONFIG_INPUT_GPIO_ROTARY_ENCODER=m\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_IQS7222 is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\n# CONFIG_INPUT_RASPBERRYPI_BUTTON is not set\nCONFIG_RMI4_CORE=y\n# CONFIG_RMI4_I2C is not set\n# CONFIG_RMI4_SPI is not set\n# CONFIG_RMI4_SMB is not set\nCONFIG_RMI4_F03=y\nCONFIG_RMI4_F03_SERIO=y\nCONFIG_RMI4_2D_SENSOR=y\nCONFIG_RMI4_F11=y\nCONFIG_RMI4_F12=y\nCONFIG_RMI4_F30=y\n# CONFIG_RMI4_F34 is not set\n# CONFIG_RMI4_F3A is not set\n# CONFIG_RMI4_F55 is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_SERIO_SERPORT=y\n# CONFIG_SERIO_AMBAKMI is not set\n# CONFIG_SERIO_PCIPS2 is not set\n# CONFIG_SERIO_LIBPS2 is not set\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_SERIO_GPIO_PS2 is not set\n# CONFIG_USERIO is not set\n# CONFIG_GAMEPORT is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_BRCM_CHAR_DRIVERS=y\nCONFIG_BCM2708_VCMEM=y\nCONFIG_BCM_VCIO=y\nCONFIG_BCM2835_SMI_DEV=m\n# CONFIG_RPIVID_MEM is not set\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\n# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set\nCONFIG_SERIAL_8250_16550A_VARIANTS=y\n# CONFIG_SERIAL_8250_FINTEK is not set\nCONFIG_SERIAL_8250_CONSOLE=y\n# CONFIG_SERIAL_8250_DMA is not set\nCONFIG_SERIAL_8250_PCI=y\nCONFIG_SERIAL_8250_EXAR=y\nCONFIG_SERIAL_8250_NR_UARTS=1\nCONFIG_SERIAL_8250_RUNTIME_UARTS=0\nCONFIG_SERIAL_8250_EXTENDED=y\n# CONFIG_SERIAL_8250_MANY_PORTS is not set\nCONFIG_SERIAL_8250_SHARE_IRQ=y\n# CONFIG_SERIAL_8250_DETECT_IRQ is not set\n# CONFIG_SERIAL_8250_RSA is not set\nCONFIG_SERIAL_8250_BCM2835AUX=y\nCONFIG_SERIAL_8250_FSL=y\n# CONFIG_SERIAL_8250_DW is not set\n# CONFIG_SERIAL_8250_RT288X is not set\nCONFIG_SERIAL_8250_PERICOM=y\nCONFIG_SERIAL_OF_PLATFORM=y\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\nCONFIG_SERIAL_AMBA_PL011=y\nCONFIG_SERIAL_AMBA_PL011_CONSOLE=y\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_JSM is not set\n# CONFIG_SERIAL_SIFIVE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_RP2 is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\nCONFIG_SERIAL_MCTRL_GPIO=y\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NOZOMI is not set\n# CONFIG_NULL_TTY is not set\n# CONFIG_HVC_DCC is not set\nCONFIG_SERIAL_DEV_BUS=y\nCONFIG_SERIAL_DEV_CTRL_TTYPORT=y\n# CONFIG_TTY_PRINTK is not set\n# CONFIG_VIRTIO_CONSOLE is not set\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_BA431 is not set\nCONFIG_HW_RANDOM_BCM2835=y\nCONFIG_HW_RANDOM_IPROC_RNG200=y\n# CONFIG_HW_RANDOM_CCTRNG is not set\n# CONFIG_HW_RANDOM_XIPHERA is not set\nCONFIG_HW_RANDOM_ARM_SMCCC_TRNG=y\nCONFIG_HW_RANDOM_CN10K=y\n# CONFIG_APPLICOM is not set\nCONFIG_DEVMEM=y\nCONFIG_DEVPORT=y\n# CONFIG_TCG_TPM is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\nCONFIG_RANDOM_TRUST_CPU=y\nCONFIG_RANDOM_TRUST_BOOTLOADER=y\nCONFIG_RASPBERRYPI_GPIOMEM=y\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\n# CONFIG_I2C_COMPAT is not set\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\nCONFIG_I2C_MUX_PINCTRL=y\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_DEMUX_PINCTRL is not set\n# CONFIG_I2C_MUX_MLXCPLD is not set\n# end of Multiplexer I2C Chip support\n\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# PC SMBus host controller drivers\n#\nCONFIG_I2C_BCM2708=y\nCONFIG_I2C_BCM2708_BAUDRATE=100000\n# CONFIG_I2C_ALI1535 is not set\n# CONFIG_I2C_ALI1563 is not set\n# CONFIG_I2C_ALI15X3 is not set\n# CONFIG_I2C_AMD756 is not set\n# CONFIG_I2C_AMD8111 is not set\n# CONFIG_I2C_I801 is not set\n# CONFIG_I2C_ISCH is not set\n# CONFIG_I2C_PIIX4 is not set\n# CONFIG_I2C_NFORCE2 is not set\n# CONFIG_I2C_NVIDIA_GPU is not set\n# CONFIG_I2C_SIS5595 is not set\n# CONFIG_I2C_SIS630 is not set\n# CONFIG_I2C_SIS96X is not set\n# CONFIG_I2C_VIA is not set\n# CONFIG_I2C_VIAPRO is not set\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\nCONFIG_I2C_BCM2835=y\nCONFIG_I2C_BRCMSTB=y\n# CONFIG_I2C_CADENCE is not set\n# CONFIG_I2C_CBUS_GPIO is not set\n# CONFIG_I2C_DESIGNWARE_PLATFORM is not set\n# CONFIG_I2C_DESIGNWARE_PCI is not set\n# CONFIG_I2C_EMEV2 is not set\nCONFIG_I2C_GPIO=y\n# CONFIG_I2C_GPIO_FAULT_INJECTOR is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_RK3X is not set\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_THUNDERX is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_PCI1XXXX is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\n# CONFIG_SPI_MEM is not set\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\nCONFIG_SPI_BCM2835=m\nCONFIG_SPI_BCM2835AUX=m\n# CONFIG_SPI_BCM_QSPI is not set\n# CONFIG_SPI_BITBANG is not set\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_CADENCE_QUADSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_NXP_FLEXSPI is not set\n# CONFIG_SPI_GPIO is not set\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_MICROCHIP_CORE is not set\n# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set\n# CONFIG_SPI_OC_TINY is not set\n# CONFIG_SPI_PL022 is not set\n# CONFIG_SPI_PXA2XX is not set\n# CONFIG_SPI_ROCKCHIP is not set\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_SIFIVE is not set\n# CONFIG_SPI_MXIC is not set\n# CONFIG_SPI_THUNDERX is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_AMD is not set\n\n#\n# SPI Multiplexer support\n#\n# CONFIG_SPI_MUX is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=y\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\nCONFIG_SPI_DYNAMIC=y\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\n# CONFIG_PPS is not set\n\n#\n# PTP clock support\n#\n# CONFIG_PTP_1588_CLOCK is not set\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_CY8C95X0 is not set\n# CONFIG_PINCTRL_MCP23S08 is not set\n# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set\n# CONFIG_PINCTRL_OCELOT is not set\n# CONFIG_PINCTRL_SINGLE is not set\n# CONFIG_PINCTRL_STMFX is not set\n# CONFIG_PINCTRL_SX150X is not set\n# CONFIG_PINCTRL_RP1 is not set\n# CONFIG_PINCTRL_BCM2712 is not set\nCONFIG_PINCTRL_BCM2835=y\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_SYSFS=y\nCONFIG_GPIO_CDEV=y\nCONFIG_GPIO_CDEV_V1=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\nCONFIG_GPIO_RASPBERRYPI_EXP=y\nCONFIG_GPIO_BCM_VIRT=y\n# CONFIG_GPIO_BRCMSTB is not set\n# CONFIG_GPIO_CADENCE is not set\n# CONFIG_GPIO_DWAPB is not set\n# CONFIG_GPIO_EXAR is not set\n# CONFIG_GPIO_FTGPIO010 is not set\n# CONFIG_GPIO_GENERIC_PLATFORM is not set\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_LOGICVC is not set\n# CONFIG_GPIO_MB86S7X is not set\n# CONFIG_GPIO_PL061 is not set\n# CONFIG_GPIO_PWM is not set\n# CONFIG_GPIO_SIFIVE is not set\n# CONFIG_GPIO_SYSCON is not set\n# CONFIG_GPIO_XGENE is not set\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_GW_PLD is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\n# CONFIG_GPIO_PCA953X is not set\n# CONFIG_GPIO_PCA9570 is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\nCONFIG_GPIO_ARIZONA=m\nCONFIG_GPIO_FSM=m\n# end of MFD GPIO expanders\n\n#\n# PCI GPIO expanders\n#\n# CONFIG_GPIO_BT8XX is not set\n# CONFIG_GPIO_PCI_IDIO_16 is not set\n# CONFIG_GPIO_PCIE_IDIO_24 is not set\n# CONFIG_GPIO_RDC321X is not set\n# end of PCI GPIO expanders\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n# end of SPI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_SIM is not set\n# end of Virtual GPIO drivers\n\nCONFIG_W1=m\n\n#\n# 1-wire Bus Masters\n#\n# CONFIG_W1_MASTER_MATROX is not set\n# CONFIG_W1_MASTER_DS2490 is not set\n# CONFIG_W1_MASTER_DS2482 is not set\n# CONFIG_W1_MASTER_DS1WM is not set\nCONFIG_W1_MASTER_GPIO=m\n# CONFIG_W1_MASTER_SGI is not set\n# end of 1-wire Bus Masters\n\n#\n# 1-wire Slaves\n#\nCONFIG_W1_SLAVE_THERM=m\n# CONFIG_W1_SLAVE_SMEM is not set\n# CONFIG_W1_SLAVE_DS2405 is not set\n# CONFIG_W1_SLAVE_DS2408 is not set\n# CONFIG_W1_SLAVE_DS2413 is not set\n# CONFIG_W1_SLAVE_DS2406 is not set\n# CONFIG_W1_SLAVE_DS2423 is not set\n# CONFIG_W1_SLAVE_DS2805 is not set\n# CONFIG_W1_SLAVE_DS2430 is not set\n# CONFIG_W1_SLAVE_DS2431 is not set\n# CONFIG_W1_SLAVE_DS2433 is not set\n# CONFIG_W1_SLAVE_DS2438 is not set\n# CONFIG_W1_SLAVE_DS250X is not set\n# CONFIG_W1_SLAVE_DS2780 is not set\n# CONFIG_W1_SLAVE_DS2781 is not set\n# CONFIG_W1_SLAVE_DS28E04 is not set\n# CONFIG_W1_SLAVE_DS28E17 is not set\n# end of 1-wire Slaves\n\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_BRCMSTB is not set\nCONFIG_POWER_RESET_GPIO=y\nCONFIG_POWER_RESET_GPIO_RESTART=y\n# CONFIG_POWER_RESET_LTC2952 is not set\n# CONFIG_POWER_RESET_REGULATOR is not set\nCONFIG_POWER_RESET_RESTART=y\n# CONFIG_POWER_RESET_XGENE is not set\n# CONFIG_POWER_RESET_SYSCON is not set\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\n# CONFIG_SYSCON_REBOOT_MODE is not set\n# CONFIG_NVMEM_REBOOT_MODE is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\nCONFIG_POWER_SUPPLY_HWMON=y\nCONFIG_RPI_POE_POWER=m\n# CONFIG_PDA_POWER is not set\n# CONFIG_IP5XXX_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2760 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SAMSUNG_SDI is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_BATTERY_MAX1721X is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_MAX77976 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_UCS1002 is not set\n# CONFIG_CHARGER_BD99954 is not set\n# CONFIG_BATTERY_UG3105 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM1177 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_AHT10 is not set\n# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set\n# CONFIG_SENSORS_AS370 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_AXI_FAN_CONTROL is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_CORSAIR_CPRO is not set\n# CONFIG_SENSORS_CORSAIR_PSU is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_I5K_AMB is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\nCONFIG_SENSORS_GPIO_FAN=m\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2947_I2C is not set\n# CONFIG_SENSORS_LTC2947_SPI is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC2992 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX127 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX31730 is not set\n# CONFIG_SENSORS_MAX31760 is not set\n# CONFIG_SENSORS_MAX6620 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_TPS23861 is not set\n# CONFIG_SENSORS_MR75203 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT6775_I2C is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_NZXT_KRAKEN2 is not set\n# CONFIG_SENSORS_NZXT_SMART2 is not set\n# CONFIG_SENSORS_OCC_P8_I2C is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\nCONFIG_SENSORS_PWM_FAN=m\nCONFIG_SENSORS_RASPBERRYPI_HWMON=y\n# CONFIG_SENSORS_SBTSI is not set\n# CONFIG_SENSORS_SBRMI is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHT4x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_SIS5595 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC2305 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_INA238 is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_TMP464 is not set\n# CONFIG_SENSORS_TMP513 is not set\n# CONFIG_SENSORS_VIA686A is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_VT8231 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_NETLINK is not set\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\n# CONFIG_THERMAL_WRITABLE_TRIPS is not set\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\n# CONFIG_CPU_THERMAL is not set\n# CONFIG_THERMAL_EMULATION is not set\n# CONFIG_THERMAL_MMIO is not set\n\n#\n# Broadcom thermal drivers\n#\nCONFIG_BCM2711_THERMAL=y\nCONFIG_BCM2835_THERMAL=y\n# end of Broadcom thermal drivers\n\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\nCONFIG_WATCHDOG_OPEN_TIMEOUT=0\n# CONFIG_WATCHDOG_SYSFS is not set\n# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_ARM_SBSA_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\n# CONFIG_DW_WATCHDOG is not set\n# CONFIG_MAX63XX_WATCHDOG is not set\n# CONFIG_ARM_SMC_WATCHDOG is not set\n# CONFIG_ALIM7101_WDT is not set\n# CONFIG_I6300ESB_WDT is not set\n# CONFIG_HP_WATCHDOG is not set\nCONFIG_BCM2835_WDT=y\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# PCI-based Watchdog Cards\n#\n# CONFIG_PCIPCWATCHDOG is not set\n# CONFIG_WDTPCI is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\nCONFIG_SSB=m\nCONFIG_SSB_SPROM=y\nCONFIG_SSB_BLOCKIO=y\nCONFIG_SSB_PCIHOST_POSSIBLE=y\nCONFIG_SSB_PCIHOST=y\nCONFIG_SSB_B43_PCI_BRIDGE=y\nCONFIG_SSB_SDIOHOST_POSSIBLE=y\n# CONFIG_SSB_SDIOHOST is not set\nCONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y\nCONFIG_SSB_DRIVER_PCICORE=y\n# CONFIG_SSB_DRIVER_GPIO is not set\nCONFIG_BCMA_POSSIBLE=y\nCONFIG_BCMA=m\nCONFIG_BCMA_BLOCKIO=y\nCONFIG_BCMA_HOST_PCI_POSSIBLE=y\nCONFIG_BCMA_HOST_PCI=y\n# CONFIG_BCMA_HOST_SOC is not set\nCONFIG_BCMA_DRIVER_PCI=y\nCONFIG_BCMA_DRIVER_GMAC_CMN=y\n# CONFIG_BCMA_DRIVER_GPIO is not set\n# CONFIG_BCMA_DEBUG is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_RPISENSE_CORE is not set\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AXP20X_I2C is not set\n# CONFIG_MFD_MADERA is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_GATEWORKS_GSC is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_MP2629 is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_LPC_ICH is not set\n# CONFIG_LPC_SCH is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_JANZ_CMODIO is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77620 is not set\n# CONFIG_MFD_MAX77650 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77714 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6370 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_MFD_OCELOT is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_NTXEC is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_SY7636A is not set\nCONFIG_MFD_RASPBERRYPI_POE_HAT=m\n# CONFIG_MFD_RDC321X is not set\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RT5120 is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_RK808 is not set\n# CONFIG_MFD_RN5T618 is not set\n# CONFIG_MFD_SEC_CORE is not set\n# CONFIG_MFD_SI476X_CORE is not set\nCONFIG_MFD_SIMPLE_MFD_I2C=m\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_VX855 is not set\n# CONFIG_MFD_LOCHNAGAR is not set\nCONFIG_MFD_ARIZONA=m\nCONFIG_MFD_ARIZONA_I2C=m\nCONFIG_MFD_ARIZONA_SPI=m\n# CONFIG_MFD_CS47L24 is not set\nCONFIG_MFD_WM5102=y\n# CONFIG_MFD_WM5110 is not set\n# CONFIG_MFD_WM8997 is not set\n# CONFIG_MFD_WM8998 is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_MFD_ROHM_BD718XX is not set\n# CONFIG_MFD_ROHM_BD71828 is not set\n# CONFIG_MFD_ROHM_BD957XMUF is not set\n# CONFIG_MFD_STPMIC1 is not set\n# CONFIG_MFD_STMFX is not set\n# CONFIG_MFD_ATC260X_I2C is not set\n# CONFIG_MFD_QCOM_PM8008 is not set\n# CONFIG_RAVE_SP_CORE is not set\n# CONFIG_MFD_INTEL_M10_BMC is not set\n# CONFIG_MFD_RP1 is not set\n# CONFIG_MFD_RSMU_I2C is not set\n# CONFIG_MFD_RSMU_SPI is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\nCONFIG_REGULATOR_ARIZONA_LDO1=m\nCONFIG_REGULATOR_ARIZONA_MICSUPP=m\n# CONFIG_REGULATOR_DA9121 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\n# CONFIG_REGULATOR_FAN53880 is not set\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MAX20086 is not set\n# CONFIG_REGULATOR_MAX77826 is not set\n# CONFIG_REGULATOR_MCP16502 is not set\n# CONFIG_REGULATOR_MP5416 is not set\n# CONFIG_REGULATOR_MP8859 is not set\n# CONFIG_REGULATOR_MP886X is not set\n# CONFIG_REGULATOR_MPQ7920 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PF8X00 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\n# CONFIG_REGULATOR_PWM is not set\nCONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=y\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT5190A is not set\n# CONFIG_REGULATOR_RT5759 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\n# CONFIG_REGULATOR_SLG51000 is not set\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_SY8824X is not set\n# CONFIG_REGULATOR_SY8827N is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS6286X is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\n# CONFIG_REGULATOR_VCTRL is not set\nCONFIG_RC_CORE=y\nCONFIG_BPF_LIRC_MODE2=y\nCONFIG_LIRC=y\nCONFIG_RC_MAP=m\nCONFIG_RC_DECODERS=y\nCONFIG_IR_IMON_DECODER=m\nCONFIG_IR_JVC_DECODER=m\nCONFIG_IR_MCE_KBD_DECODER=m\nCONFIG_IR_NEC_DECODER=m\nCONFIG_IR_RC5_DECODER=m\nCONFIG_IR_RC6_DECODER=m\nCONFIG_IR_RCMM_DECODER=m\nCONFIG_IR_SANYO_DECODER=m\nCONFIG_IR_SHARP_DECODER=m\nCONFIG_IR_SONY_DECODER=m\nCONFIG_IR_XMP_DECODER=m\nCONFIG_RC_DEVICES=y\nCONFIG_IR_GPIO_CIR=m\nCONFIG_IR_GPIO_TX=m\n# CONFIG_IR_HIX5HD2 is not set\nCONFIG_IR_IGORPLUGUSB=m\nCONFIG_IR_IGUANA=m\nCONFIG_IR_IMON=m\nCONFIG_IR_IMON_RAW=m\nCONFIG_IR_MCEUSB=m\nCONFIG_IR_PWM_TX=m\nCONFIG_IR_REDRAT3=m\n# CONFIG_IR_SERIAL is not set\n# CONFIG_IR_SPI is not set\nCONFIG_IR_STREAMZAP=m\nCONFIG_IR_TOY=m\nCONFIG_IR_TTUSBIR=m\nCONFIG_RC_ATI_REMOTE=m\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_RC_XBOX_DVD=m\nCONFIG_CEC_CORE=y\n\n#\n# CEC support\n#\n# CONFIG_MEDIA_CEC_RC is not set\n# CONFIG_MEDIA_CEC_SUPPORT is not set\n# end of CEC support\n\nCONFIG_MEDIA_SUPPORT=m\n# CONFIG_MEDIA_SUPPORT_FILTER is not set\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\nCONFIG_MEDIA_RADIO_SUPPORT=y\nCONFIG_MEDIA_SDR_SUPPORT=y\nCONFIG_MEDIA_PLATFORM_SUPPORT=y\nCONFIG_MEDIA_TEST_SUPPORT=y\n# end of Media device types\n\n#\n# Media core support\n#\nCONFIG_VIDEO_DEV=m\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_DVB_CORE=m\n# end of Media core support\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2_I2C=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_VIDEO_TUNER=m\nCONFIG_V4L2_MEM2MEM_DEV=m\n# CONFIG_V4L2_FLASH_LED_CLASS is not set\nCONFIG_V4L2_FWNODE=m\nCONFIG_V4L2_ASYNC=m\n# end of Video4Linux options\n\n#\n# Media controller options\n#\nCONFIG_MEDIA_CONTROLLER_DVB=y\nCONFIG_MEDIA_CONTROLLER_REQUEST_API=y\n# end of Media controller options\n\n#\n# Digital TV options\n#\n# CONFIG_DVB_MMAP is not set\nCONFIG_DVB_NET=y\nCONFIG_DVB_MAX_ADAPTERS=8\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set\n# CONFIG_DVB_ULE_DEBUG is not set\n# end of Digital TV options\n\n#\n# Media drivers\n#\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_USB_S2255 is not set\nCONFIG_VIDEO_USBTV=m\nCONFIG_USB_VIDEO_CLASS=m\n# CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV is not set\n\n#\n# Analog TV USB devices\n#\n# CONFIG_VIDEO_GO7007 is not set\nCONFIG_VIDEO_HDPVR=m\nCONFIG_VIDEO_PVRUSB2=m\nCONFIG_VIDEO_PVRUSB2_SYSFS=y\nCONFIG_VIDEO_PVRUSB2_DVB=y\n# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set\nCONFIG_VIDEO_STK1160_COMMON=m\nCONFIG_VIDEO_STK1160=m\n\n#\n# Analog/digital TV USB devices\n#\nCONFIG_VIDEO_AU0828=m\nCONFIG_VIDEO_AU0828_V4L2=y\nCONFIG_VIDEO_AU0828_RC=y\nCONFIG_VIDEO_CX231XX=m\nCONFIG_VIDEO_CX231XX_RC=y\n# CONFIG_VIDEO_CX231XX_ALSA is not set\nCONFIG_VIDEO_CX231XX_DVB=m\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_AS102=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\n# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_DVBSKY=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_DVB_USB_ZD1301=m\nCONFIG_DVB_USB=m\n# CONFIG_DVB_USB_DEBUG is not set\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_CXUSB=m\n# CONFIG_DVB_USB_CXUSB_ANALOG is not set\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_DIB3000MC=m\nCONFIG_DVB_USB_DIBUSB_MB=m\nCONFIG_DVB_USB_DIBUSB_MB_FAULTY=y\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_DTT200U=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_OPERA1=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_SMS_USB_DRV=m\n# CONFIG_DVB_TTUSB_BUDGET is not set\n# CONFIG_DVB_TTUSB_DEC is not set\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\nCONFIG_VIDEO_EM28XX=m\n# CONFIG_VIDEO_EM28XX_V4L2 is not set\n# CONFIG_VIDEO_EM28XX_ALSA is not set\nCONFIG_VIDEO_EM28XX_DVB=m\nCONFIG_VIDEO_EM28XX_RC=m\n\n#\n# Software defined radio USB devices\n#\n# CONFIG_USB_AIRSPY is not set\n# CONFIG_USB_HACKRF is not set\n# CONFIG_USB_MSI2500 is not set\n# CONFIG_MEDIA_PCI_SUPPORT is not set\n# CONFIG_RADIO_ADAPTERS is not set\nCONFIG_MEDIA_PLATFORM_DRIVERS=y\n# CONFIG_V4L_PLATFORM_DRIVERS is not set\n# CONFIG_SDR_PLATFORM_DRIVERS is not set\n# CONFIG_DVB_PLATFORM_DRIVERS is not set\n# CONFIG_V4L_MEM2MEM_DRIVERS is not set\n\n#\n# Allegro DVT media platform drivers\n#\n\n#\n# Amlogic media platform drivers\n#\n\n#\n# Amphion drivers\n#\n\n#\n# Aspeed media platform drivers\n#\n\n#\n# Atmel media platform drivers\n#\n# CONFIG_VIDEO_BCM2835_UNICAM is not set\n\n#\n# Cadence media platform drivers\n#\n# CONFIG_VIDEO_CADENCE_CSI2RX is not set\n# CONFIG_VIDEO_CADENCE_CSI2TX is not set\n\n#\n# Chips&Media media platform drivers\n#\n\n#\n# Intel media platform drivers\n#\n\n#\n# Marvell media platform drivers\n#\n\n#\n# Mediatek media platform drivers\n#\n\n#\n# NVidia media platform drivers\n#\n\n#\n# NXP media platform drivers\n#\n\n#\n# Qualcomm media platform drivers\n#\n\n#\n# Raspberry Pi media platform drivers\n#\n# CONFIG_VIDEO_RASPBERRYPI_PISP_BE is not set\n# CONFIG_VIDEO_RP1_CFE is not set\n\n#\n# Renesas media platform drivers\n#\n\n#\n# Rockchip media platform drivers\n#\n\n#\n# Samsung media platform drivers\n#\n\n#\n# STMicroelectronics media platform drivers\n#\n\n#\n# Sunxi media platform drivers\n#\n\n#\n# Texas Instruments drivers\n#\n\n#\n# Verisilicon media platform drivers\n#\n\n#\n# VIA media platform drivers\n#\n\n#\n# Xilinx media platform drivers\n#\n\n#\n# MMC/SDIO DVB adapters\n#\nCONFIG_SMS_SDIO_DRV=m\n# CONFIG_V4L_TEST_DRIVERS is not set\n# CONFIG_DVB_TEST_DRIVERS is not set\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_TTPCI_EEPROM=m\nCONFIG_VIDEO_CX2341X=m\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\n# CONFIG_SMS_SIANO_DEBUGFS is not set\nCONFIG_VIDEOBUF2_CORE=m\nCONFIG_VIDEOBUF2_V4L2=m\nCONFIG_VIDEOBUF2_MEMOPS=m\nCONFIG_VIDEOBUF2_DMA_CONTIG=m\nCONFIG_VIDEOBUF2_VMALLOC=m\n# end of Media drivers\n\n#\n# Media ancillary drivers\n#\nCONFIG_MEDIA_ATTACH=y\n\n#\n# IR I2C driver auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_IR_I2C=m\nCONFIG_VIDEO_CAMERA_SENSOR=y\n# CONFIG_VIDEO_AR0521 is not set\n# CONFIG_VIDEO_ARDUCAM_64MP is not set\n# CONFIG_VIDEO_ARDUCAM_PIVARIETY is not set\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_HI846 is not set\n# CONFIG_VIDEO_HI847 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX296 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_IMX412 is not set\n# CONFIG_VIDEO_IMX477 is not set\n# CONFIG_VIDEO_IMX519 is not set\n# CONFIG_VIDEO_IMX708 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\n# CONFIG_VIDEO_MT9V011 is not set\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_OG01A1B is not set\n# CONFIG_VIDEO_OV02A10 is not set\n# CONFIG_VIDEO_OV08D10 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\n# CONFIG_VIDEO_OV2311 is not set\n# CONFIG_VIDEO_OV2640 is not set\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5693 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV64A40 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV7251 is not set\n# CONFIG_VIDEO_OV7640 is not set\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9282 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5398 is not set\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_BU64754 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# Audio decoders, processors and mixers\n#\n# CONFIG_VIDEO_CS3308 is not set\n# CONFIG_VIDEO_CS5345 is not set\nCONFIG_VIDEO_CS53L32A=m\nCONFIG_VIDEO_MSP3400=m\n# CONFIG_VIDEO_SONY_BTF_MPX is not set\n# CONFIG_VIDEO_TDA1997X is not set\n# CONFIG_VIDEO_TDA7432 is not set\n# CONFIG_VIDEO_TDA9840 is not set\n# CONFIG_VIDEO_TEA6415C is not set\n# CONFIG_VIDEO_TEA6420 is not set\n# CONFIG_VIDEO_TLV320AIC23B is not set\n# CONFIG_VIDEO_TVAUDIO is not set\n# CONFIG_VIDEO_UDA1342 is not set\n# CONFIG_VIDEO_VP27SMPX is not set\n# CONFIG_VIDEO_WM8739 is not set\nCONFIG_VIDEO_WM8775=m\n# end of Audio decoders, processors and mixers\n\n#\n# RDS decoders\n#\n# CONFIG_VIDEO_SAA6588 is not set\n# end of RDS decoders\n\n#\n# Video decoders\n#\n# CONFIG_VIDEO_ADV7180 is not set\n# CONFIG_VIDEO_ADV7183 is not set\n# CONFIG_VIDEO_ADV748X is not set\n# CONFIG_VIDEO_ADV7604 is not set\n# CONFIG_VIDEO_ADV7842 is not set\n# CONFIG_VIDEO_BT819 is not set\n# CONFIG_VIDEO_BT856 is not set\n# CONFIG_VIDEO_BT866 is not set\n# CONFIG_VIDEO_ISL7998X is not set\n# CONFIG_VIDEO_KS0127 is not set\n# CONFIG_VIDEO_MAX9286 is not set\n# CONFIG_VIDEO_ML86V7667 is not set\n# CONFIG_VIDEO_SAA7110 is not set\nCONFIG_VIDEO_SAA711X=m\n# CONFIG_VIDEO_TC358743 is not set\n# CONFIG_VIDEO_TVP514X is not set\n# CONFIG_VIDEO_TVP5150 is not set\n# CONFIG_VIDEO_TVP7002 is not set\n# CONFIG_VIDEO_TW2804 is not set\n# CONFIG_VIDEO_OV9281 is not set\n# CONFIG_VIDEO_TW9903 is not set\n# CONFIG_VIDEO_TW9906 is not set\n# CONFIG_VIDEO_TW9910 is not set\n# CONFIG_VIDEO_IRS1125 is not set\n# CONFIG_VIDEO_VPX3220 is not set\n\n#\n# Video and audio decoders\n#\n# CONFIG_VIDEO_SAA717X is not set\nCONFIG_VIDEO_CX25840=m\n# end of Video decoders\n\n#\n# Video encoders\n#\n# CONFIG_VIDEO_AD9389B is not set\n# CONFIG_VIDEO_ADV7170 is not set\n# CONFIG_VIDEO_ADV7175 is not set\n# CONFIG_VIDEO_ADV7343 is not set\n# CONFIG_VIDEO_ADV7393 is not set\n# CONFIG_VIDEO_ADV7511 is not set\n# CONFIG_VIDEO_AK881X is not set\n# CONFIG_VIDEO_SAA7127 is not set\n# CONFIG_VIDEO_SAA7185 is not set\n# CONFIG_VIDEO_THS8200 is not set\n# end of Video encoders\n\n#\n# Video improvement chips\n#\n# CONFIG_VIDEO_UPD64031A is not set\n# CONFIG_VIDEO_UPD64083 is not set\n# end of Video improvement chips\n\n#\n# Audio/Video compression chips\n#\n# CONFIG_VIDEO_SAA6752HS is not set\n# end of Audio/Video compression chips\n\n#\n# SDR tuner chips\n#\n# CONFIG_SDR_MAX2175 is not set\n# end of SDR tuner chips\n\n#\n# Miscellaneous helper chips\n#\n# CONFIG_VIDEO_I2C is not set\n# CONFIG_VIDEO_M52790 is not set\n# CONFIG_VIDEO_ST_MIPID02 is not set\n# CONFIG_VIDEO_THS7303 is not set\n# end of Miscellaneous helper chips\n\n#\n# Media SPI Adapters\n#\nCONFIG_CXD2880_SPI_DRV=m\n# CONFIG_VIDEO_GS1662 is not set\n# end of Media SPI Adapters\n\nCONFIG_MEDIA_TUNER=m\n\n#\n# Customize TV tuners\n#\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_IT913X=m\n# CONFIG_MEDIA_TUNER_M88RS6000T is not set\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_MC44S803=m\n# CONFIG_MEDIA_TUNER_MSI001 is not set\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT20XX=m\n# CONFIG_MEDIA_TUNER_MT2131 is not set\nCONFIG_MEDIA_TUNER_MT2266=m\n# CONFIG_MEDIA_TUNER_MXL301RF is not set\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\n# CONFIG_MEDIA_TUNER_QM1D1B0004 is not set\nCONFIG_MEDIA_TUNER_QM1D1C0042=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_R820T=m\nCONFIG_MEDIA_TUNER_SI2157=m\nCONFIG_MEDIA_TUNER_SIMPLE=m\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_TDA18250=m\nCONFIG_MEDIA_TUNER_TDA18271=m\nCONFIG_MEDIA_TUNER_TDA827X=m\nCONFIG_MEDIA_TUNER_TDA8290=m\nCONFIG_MEDIA_TUNER_TDA9887=m\nCONFIG_MEDIA_TUNER_TEA5761=m\nCONFIG_MEDIA_TUNER_TEA5767=m\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_XC2028=m\nCONFIG_MEDIA_TUNER_XC4000=m\nCONFIG_MEDIA_TUNER_XC5000=m\n# end of Customize TV tuners\n\n#\n# Customise DVB Frontends\n#\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_M88DS3103=m\n# CONFIG_DVB_MXL5XX is not set\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\n# CONFIG_DVB_STV0910 is not set\nCONFIG_DVB_STV6110x=m\n# CONFIG_DVB_STV6111 is not set\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_MN88472=m\nCONFIG_DVB_MN88473=m\nCONFIG_DVB_SI2165=m\nCONFIG_DVB_TDA18271C2DD=m\n\n#\n# DVB-S (satellite) frontends\n#\n# CONFIG_DVB_CX24110 is not set\nCONFIG_DVB_CX24116=m\n# CONFIG_DVB_CX24117 is not set\nCONFIG_DVB_CX24120=m\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_DS3000=m\n# CONFIG_DVB_MB86A16 is not set\nCONFIG_DVB_MT312=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_TDA10071=m\nCONFIG_DVB_TDA10086=m\n# CONFIG_DVB_TDA8083 is not set\n# CONFIG_DVB_TDA8261 is not set\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_TS2020=m\n# CONFIG_DVB_TUA6100 is not set\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TUNER_ITD1000=m\n# CONFIG_DVB_VES1X93 is not set\n# CONFIG_DVB_ZL10036 is not set\nCONFIG_DVB_ZL10039=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_AS102_FE=m\n# CONFIG_DVB_CX22700 is not set\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_CXD2841ER=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\n# CONFIG_DVB_DIB9000 is not set\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_GP8PSK_FE=m\n# CONFIG_DVB_L64781 is not set\nCONFIG_DVB_MT352=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\nCONFIG_DVB_RTL2832_SDR=m\n# CONFIG_DVB_S5H1432 is not set\nCONFIG_DVB_SI2168=m\n# CONFIG_DVB_SP887X is not set\n# CONFIG_DVB_STV0367 is not set\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_ZD1301_DEMOD=m\nCONFIG_DVB_ZL10353=m\nCONFIG_DVB_CXD2880=m\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_STV0297=m\n# CONFIG_DVB_TDA10021 is not set\nCONFIG_DVB_TDA10023=m\n# CONFIG_DVB_VES1820 is not set\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_AU8522=m\nCONFIG_DVB_AU8522_DTV=m\nCONFIG_DVB_AU8522_V4L=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LGDT3306A=m\nCONFIG_DVB_LGDT330X=m\nCONFIG_DVB_MXL692=m\nCONFIG_DVB_NXT200X=m\n# CONFIG_DVB_OR51132 is not set\n# CONFIG_DVB_OR51211 is not set\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_S5H1411=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\nCONFIG_DVB_S921=m\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\n# CONFIG_DVB_MN88443X is not set\nCONFIG_DVB_TC90522=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_A8293=m\nCONFIG_DVB_AF9033=m\n# CONFIG_DVB_ASCOT2E is not set\nCONFIG_DVB_ATBM8830=m\n# CONFIG_DVB_HELENE is not set\n# CONFIG_DVB_HORUS3A is not set\n# CONFIG_DVB_ISL6405 is not set\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_IX2505V=m\n# CONFIG_DVB_LGS8GL5 is not set\nCONFIG_DVB_LGS8GXX=m\n# CONFIG_DVB_LNBH25 is not set\n# CONFIG_DVB_LNBH29 is not set\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_M88RS2000=m\n# CONFIG_DVB_TDA665x is not set\nCONFIG_DVB_DRX39XYJ=m\n\n#\n# Common Interface (EN50221) controller drivers\n#\n# CONFIG_DVB_CXD2099 is not set\nCONFIG_DVB_SP2=m\n# end of Customise DVB Frontends\n\n#\n# Tools to develop new frontends\n#\n# CONFIG_DVB_DUMMY_FE is not set\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\nCONFIG_DRM=y\nCONFIG_DRM_MIPI_DSI=y\n# CONFIG_DRM_DEBUG_MM is not set\nCONFIG_DRM_KMS_HELPER=y\n# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set\n# CONFIG_DRM_DEBUG_MODESET_LOCK is not set\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\n# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\nCONFIG_DRM_DISPLAY_HELPER=y\nCONFIG_DRM_DISPLAY_HDMI_HELPER=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_GEM_DMA_HELPER=y\nCONFIG_DRM_GEM_SHMEM_HELPER=y\nCONFIG_DRM_SCHED=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_KOMEDA is not set\n# end of ARM devices\n\n# CONFIG_DRM_RADEON is not set\n# CONFIG_DRM_AMDGPU is not set\n# CONFIG_DRM_NOUVEAU is not set\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\n# CONFIG_DRM_VMWGFX is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_AST is not set\n# CONFIG_DRM_MGAG200 is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_USE_LVDS is not set\n# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set\n# CONFIG_DRM_QXL is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set\n# CONFIG_DRM_PANEL_ARM_VERSATILE is not set\n# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set\n# CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0 is not set\n# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set\n# CONFIG_DRM_PANEL_BOE_TV101WUM_NL6 is not set\n# CONFIG_DRM_PANEL_DSI_CM is not set\n# CONFIG_DRM_PANEL_LVDS is not set\nCONFIG_DRM_PANEL_SIMPLE=y\n# CONFIG_DRM_PANEL_EDP is not set\n# CONFIG_DRM_PANEL_EBBG_FT8719 is not set\n# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set\n# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set\n# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9806E is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set\n# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set\n# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set\n# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set\n# CONFIG_DRM_PANEL_JDI_R63452 is not set\n# CONFIG_DRM_PANEL_KHADAS_TS050 is not set\n# CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LB035Q02 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set\n# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT36672A is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set\n# CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set\n# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set\n# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set\n# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set\n# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set\n# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set\n# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_SOFEF00 is not set\n# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set\n# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS060T1SX01 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7703 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set\n# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set\n# CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521 is not set\n# CONFIG_DRM_PANEL_TDO_TL070WSH30 is not set\n# CONFIG_DRM_PANEL_TPO_Y17P is not set\n# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set\n# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set\n# CONFIG_DRM_PANEL_TPO_TPG110 is not set\n# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set\n# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set\n# CONFIG_DRM_PANEL_WAVESHARE_TOUCHSCREEN is not set\n# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set\n# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_CHRONTEL_CH7033 is not set\n# CONFIG_DRM_DISPLAY_CONNECTOR is not set\n# CONFIG_DRM_ITE_IT6505 is not set\n# CONFIG_DRM_LONTIUM_LT8912B is not set\n# CONFIG_DRM_LONTIUM_LT9211 is not set\n# CONFIG_DRM_LONTIUM_LT9611 is not set\n# CONFIG_DRM_LONTIUM_LT9611UXC is not set\n# CONFIG_DRM_ITE_IT66121 is not set\n# CONFIG_DRM_LVDS_CODEC is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NWL_MIPI_DSI is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_PARADE_PS8640 is not set\n# CONFIG_DRM_SIL_SII8620 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_SII9234 is not set\nCONFIG_DRM_SIMPLE_BRIDGE=y\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\nCONFIG_DRM_TOSHIBA_TC358762=y\n# CONFIG_DRM_TOSHIBA_TC358764 is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TOSHIBA_TC358768 is not set\n# CONFIG_DRM_TOSHIBA_TC358775 is not set\n# CONFIG_DRM_TI_DLPC3433 is not set\n# CONFIG_DRM_TI_TFP410 is not set\n# CONFIG_DRM_TI_SN65DSI83 is not set\n# CONFIG_DRM_TI_SN65DSI86 is not set\n# CONFIG_DRM_TI_TPD12S015 is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_ANALOGIX_ANX7625 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_CDNS_MHDP8546 is not set\n# end of Display Interface Bridges\n\nCONFIG_DRM_V3D=y\nCONFIG_DRM_VC4=y\nCONFIG_DRM_VC4_HDMI_CEC=y\n# CONFIG_DRM_RP1_DSI is not set\n# CONFIG_DRM_RP1_DPI is not set\n# CONFIG_DRM_RP1_VEC is not set\n# CONFIG_DRM_ETNAVIV is not set\n# CONFIG_DRM_HISI_HIBMC is not set\n# CONFIG_DRM_HISI_KIRIN is not set\n# CONFIG_DRM_LOGICVC is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_BOCHS is not set\n# CONFIG_DRM_CIRRUS_QEMU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_PANEL_MIPI_DBI is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_TINYDRM_HX8357D is not set\n# CONFIG_TINYDRM_ILI9163 is not set\n# CONFIG_TINYDRM_ILI9225 is not set\n# CONFIG_TINYDRM_ILI9341 is not set\n# CONFIG_TINYDRM_ILI9486 is not set\n# CONFIG_TINYDRM_MI0283QT is not set\n# CONFIG_TINYDRM_REPAPER is not set\n# CONFIG_TINYDRM_ST7586 is not set\n# CONFIG_TINYDRM_ST7735R is not set\n# CONFIG_DRM_PL111 is not set\n# CONFIG_DRM_LIMA is not set\n# CONFIG_DRM_PANFROST is not set\n# CONFIG_DRM_TIDSS is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_SSD130X is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_DRM_NOMODESET=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\n# CONFIG_FB_MODE_HELPERS is not set\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_BCM2708 is not set\n# CONFIG_FB_CIRRUS is not set\n# CONFIG_FB_PM2 is not set\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_CYBER2000 is not set\n# CONFIG_FB_ASILIANT is not set\n# CONFIG_FB_IMSTT is not set\n# CONFIG_FB_EFI is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_NVIDIA is not set\n# CONFIG_FB_RIVA is not set\n# CONFIG_FB_I740 is not set\n# CONFIG_FB_MATROX is not set\n# CONFIG_FB_RADEON is not set\n# CONFIG_FB_ATY128 is not set\n# CONFIG_FB_ATY is not set\n# CONFIG_FB_S3 is not set\n# CONFIG_FB_SAVAGE is not set\n# CONFIG_FB_SIS is not set\n# CONFIG_FB_NEOMAGIC is not set\n# CONFIG_FB_KYRO is not set\n# CONFIG_FB_3DFX is not set\n# CONFIG_FB_VOODOO1 is not set\n# CONFIG_FB_VT8623 is not set\n# CONFIG_FB_TRIDENT is not set\n# CONFIG_FB_ARK is not set\n# CONFIG_FB_PM3 is not set\n# CONFIG_FB_CARMINE is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_MB862XX is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# CONFIG_FB_SM712 is not set\n# CONFIG_FB_RPISENSE is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\nCONFIG_LCD_CLASS_DEVICE=m\n# CONFIG_LCD_L4F00242T03 is not set\n# CONFIG_LCD_LMS283GF05 is not set\n# CONFIG_LCD_LTV350QV is not set\n# CONFIG_LCD_ILI922X is not set\n# CONFIG_LCD_ILI9320 is not set\n# CONFIG_LCD_TDO24M is not set\n# CONFIG_LCD_VGG2432A4 is not set\n# CONFIG_LCD_PLATFORM is not set\n# CONFIG_LCD_AMS369FG06 is not set\n# CONFIG_LCD_LMS501KF03 is not set\n# CONFIG_LCD_HX8357 is not set\n# CONFIG_LCD_OTM3225A is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\n# CONFIG_BACKLIGHT_KTD253 is not set\n# CONFIG_BACKLIGHT_PWM is not set\nCONFIG_BACKLIGHT_RPI=y\n# CONFIG_BACKLIGHT_QCOM_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\nCONFIG_BACKLIGHT_GPIO=y\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n# CONFIG_BACKLIGHT_LED is not set\n# end of Backlight & LCD device support\n\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_DUMMY_CONSOLE_COLUMNS=80\nCONFIG_DUMMY_CONSOLE_ROWS=25\nCONFIG_FRAMEBUFFER_CONSOLE=y\n# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\n# end of Console display driver support\n\n# CONFIG_LOGO is not set\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_HWDEP=m\nCONFIG_SND_RAWMIDI=m\nCONFIG_SND_COMPRESS_OFFLOAD=y\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\nCONFIG_SND_HRTIMER=m\nCONFIG_SND_DYNAMIC_MINORS=y\nCONFIG_SND_MAX_CARDS=32\n# CONFIG_SND_SUPPORT_OLD_API is not set\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_CTL_INPUT_VALIDATION is not set\nCONFIG_SND_VMASTER=y\n# CONFIG_SND_SEQUENCER is not set\n# CONFIG_SND_DRIVERS is not set\nCONFIG_SND_PCI=y\n# CONFIG_SND_AD1889 is not set\n# CONFIG_SND_ALS300 is not set\n# CONFIG_SND_ALI5451 is not set\n# CONFIG_SND_ATIIXP is not set\n# CONFIG_SND_ATIIXP_MODEM is not set\n# CONFIG_SND_AU8810 is not set\n# CONFIG_SND_AU8820 is not set\n# CONFIG_SND_AU8830 is not set\n# CONFIG_SND_AW2 is not set\n# CONFIG_SND_AZT3328 is not set\n# CONFIG_SND_BT87X is not set\n# CONFIG_SND_CA0106 is not set\n# CONFIG_SND_CMIPCI is not set\n# CONFIG_SND_OXYGEN is not set\n# CONFIG_SND_CS4281 is not set\n# CONFIG_SND_CS46XX is not set\n# CONFIG_SND_CTXFI is not set\n# CONFIG_SND_DARLA20 is not set\n# CONFIG_SND_GINA20 is not set\n# CONFIG_SND_LAYLA20 is not set\n# CONFIG_SND_DARLA24 is not set\n# CONFIG_SND_GINA24 is not set\n# CONFIG_SND_LAYLA24 is not set\n# CONFIG_SND_MONA is not set\n# CONFIG_SND_MIA is not set\n# CONFIG_SND_ECHO3G is not set\n# CONFIG_SND_INDIGO is not set\n# CONFIG_SND_INDIGOIO is not set\n# CONFIG_SND_INDIGODJ is not set\n# CONFIG_SND_INDIGOIOX is not set\n# CONFIG_SND_INDIGODJX is not set\n# CONFIG_SND_EMU10K1 is not set\n# CONFIG_SND_EMU10K1X is not set\n# CONFIG_SND_ENS1370 is not set\n# CONFIG_SND_ENS1371 is not set\n# CONFIG_SND_ES1938 is not set\n# CONFIG_SND_ES1968 is not set\n# CONFIG_SND_FM801 is not set\n# CONFIG_SND_HDSP is not set\n# CONFIG_SND_HDSPM is not set\n# CONFIG_SND_ICE1712 is not set\n# CONFIG_SND_ICE1724 is not set\n# CONFIG_SND_INTEL8X0 is not set\n# CONFIG_SND_INTEL8X0M is not set\n# CONFIG_SND_KORG1212 is not set\n# CONFIG_SND_LOLA is not set\n# CONFIG_SND_LX6464ES is not set\n# CONFIG_SND_MAESTRO3 is not set\n# CONFIG_SND_MIXART is not set\n# CONFIG_SND_NM256 is not set\n# CONFIG_SND_PCXHR is not set\n# CONFIG_SND_RIPTIDE is not set\n# CONFIG_SND_RME32 is not set\n# CONFIG_SND_RME96 is not set\n# CONFIG_SND_RME9652 is not set\n# CONFIG_SND_SE6X is not set\n# CONFIG_SND_SONICVIBES is not set\n# CONFIG_SND_TRIDENT is not set\n# CONFIG_SND_VIA82XX is not set\n# CONFIG_SND_VIA82XX_MODEM is not set\n# CONFIG_SND_VIRTUOSO is not set\n# CONFIG_SND_VX222 is not set\n# CONFIG_SND_YMFPCI is not set\n\n#\n# HD-Audio\n#\n# CONFIG_SND_HDA_INTEL is not set\n# end of HD-Audio\n\nCONFIG_SND_HDA_PREALLOC_SIZE=2048\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=m\nCONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y\nCONFIG_SND_USB_UA101=m\nCONFIG_SND_USB_CAIAQ=m\nCONFIG_SND_USB_CAIAQ_INPUT=y\nCONFIG_SND_USB_6FIRE=m\nCONFIG_SND_USB_HIFACE=m\nCONFIG_SND_BCD2000=m\nCONFIG_SND_USB_LINE6=m\nCONFIG_SND_USB_POD=m\nCONFIG_SND_USB_PODHD=m\nCONFIG_SND_USB_TONEPORT=m\nCONFIG_SND_USB_VARIAX=m\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\nCONFIG_SND_SOC_COMPRESS=y\n# CONFIG_SND_SOC_ADI is not set\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_AMD_ACP_CONFIG is not set\n# CONFIG_SND_ATMEL_SOC is not set\nCONFIG_SND_BCM2835_SOC_I2S=m\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\nCONFIG_SND_BCM2708_SOC_CHIPDIP_DAC=m\nCONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSHD=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADC=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m\nCONFIG_SND_BCM2708_SOC_PIFI_40=m\nCONFIG_SND_BCM2708_SOC_RPI_CIRRUS=m\nCONFIG_SND_BCM2708_SOC_RPI_DAC=m\nCONFIG_SND_BCM2708_SOC_RPI_PROTO=m\nCONFIG_SND_BCM2708_SOC_JUSTBOOM_BOTH=m\nCONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m\nCONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI=m\nCONFIG_SND_BCM2708_SOC_IQAUDIO_CODEC=m\nCONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m\nCONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI=m\nCONFIG_SND_BCM2708_SOC_I_SABRE_Q2M=m\nCONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m\nCONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m\nCONFIG_SND_AUDIOINJECTOR_OCTO_SOUNDCARD=m\nCONFIG_SND_AUDIOINJECTOR_ISOLATED_SOUNDCARD=m\nCONFIG_SND_AUDIOSENSE_PI=m\nCONFIG_SND_DIGIDAC1_SOUNDCARD=m\nCONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m\nCONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m\nCONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m\nCONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m\nCONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m\nCONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m\nCONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m\nCONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m\nCONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m\nCONFIG_SND_PISOUND=m\nCONFIG_SND_RPI_SIMPLE_SOUNDCARD=m\nCONFIG_SND_RPI_WM8804_SOUNDCARD=m\nCONFIG_SND_DACBERRY400=m\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_AUDMIX is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_FSL_MICFIL is not set\n# CONFIG_SND_SOC_FSL_XCVR is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\nCONFIG_SND_SOC_ARIZONA=m\nCONFIG_SND_SOC_WM_ADSP=m\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_AD193X_SPI is not set\n# CONFIG_SND_SOC_AD193X_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_SPI is not set\nCONFIG_SND_SOC_ADAU1701=m\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\nCONFIG_SND_SOC_ADAU1977=m\nCONFIG_SND_SOC_ADAU1977_I2C=m\nCONFIG_SND_SOC_ADAU7002=m\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4375 is not set\n# CONFIG_SND_SOC_AK4458 is not set\nCONFIG_SND_SOC_AK4554=m\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_AW8738 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS35L41_SPI is not set\n# CONFIG_SND_SOC_CS35L41_I2C is not set\n# CONFIG_SND_SOC_CS35L45_SPI is not set\n# CONFIG_SND_SOC_CS35L45_I2C is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS42L83 is not set\n# CONFIG_SND_SOC_CS4234 is not set\nCONFIG_SND_SOC_CS4265=m\n# CONFIG_SND_SOC_CS4270 is not set\nCONFIG_SND_SOC_CS4271=m\nCONFIG_SND_SOC_CS4271_I2C=m\n# CONFIG_SND_SOC_CS4271_SPI is not set\nCONFIG_SND_SOC_CS42XX8=m\nCONFIG_SND_SOC_CS42XX8_I2C=m\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\nCONFIG_SND_SOC_DA7213=m\nCONFIG_SND_SOC_DMIC=m\nCONFIG_SND_SOC_HDMI_CODEC=y\n# CONFIG_SND_SOC_ES7134 is not set\n# CONFIG_SND_SOC_ES7241 is not set\n# CONFIG_SND_SOC_ES8316 is not set\n# CONFIG_SND_SOC_ES8326 is not set\n# CONFIG_SND_SOC_ES8328_I2C is not set\n# CONFIG_SND_SOC_ES8328_SPI is not set\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_HDA is not set\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\nCONFIG_SND_SOC_MA120X0P=m\n# CONFIG_SND_SOC_MAX98088 is not set\n# CONFIG_SND_SOC_MAX98357A is not set\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98520 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX98396 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\nCONFIG_SND_SOC_PCM179X=m\nCONFIG_SND_SOC_PCM179X_I2C=m\n# CONFIG_SND_SOC_PCM179X_SPI is not set\nCONFIG_SND_SOC_PCM186X=m\nCONFIG_SND_SOC_PCM186X_I2C=m\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3060_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\nCONFIG_SND_SOC_PCM5102A=m\nCONFIG_SND_SOC_PCM512x=m\nCONFIG_SND_SOC_PCM512x_I2C=m\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK3328 is not set\n# CONFIG_SND_SOC_RT5616 is not set\nCONFIG_SND_SOC_PCM1794A=m\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\n# CONFIG_SND_SOC_RT5659 is not set\n# CONFIG_SND_SOC_RT9120 is not set\nCONFIG_SND_SOC_SGTL5000=m\nCONFIG_SND_SOC_SIGMADSP=m\nCONFIG_SND_SOC_SIGMADSP_I2C=m\nCONFIG_SND_SOC_SIMPLE_AMPLIFIER=m\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\nCONFIG_SND_SOC_SPDIF=m\n# CONFIG_SND_SOC_SRC4XXX_I2C is not set\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\nCONFIG_SND_SOC_STA32X=m\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS2780 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\nCONFIG_SND_SOC_TAS571X=m\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805M is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\nCONFIG_SND_SOC_TAS5713=m\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320ADC3XXX is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\nCONFIG_SND_SOC_TLV320AIC32X4=m\nCONFIG_SND_SOC_TLV320AIC32X4_I2C=m\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\nCONFIG_SND_SOC_TLV320AIC3X=m\nCONFIG_SND_SOC_TLV320AIC3X_I2C=m\n# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\nCONFIG_SND_SOC_WM5102=m\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\nCONFIG_SND_SOC_WM8731=m\nCONFIG_SND_SOC_WM8731_I2C=m\n# CONFIG_SND_SOC_WM8731_SPI is not set\n# CONFIG_SND_SOC_WM8737 is not set\nCONFIG_SND_SOC_WM8741=m\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\nCONFIG_SND_SOC_WM8804=m\nCONFIG_SND_SOC_WM8804_I2C=m\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8940 is not set\nCONFIG_SND_SOC_WM8960=m\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_ZL38060 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8821 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\nCONFIG_SND_SOC_TPA6130A2=m\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\nCONFIG_SND_SOC_I_SABRE_CODEC=m\n# end of CODEC drivers\n\nCONFIG_SND_SIMPLE_CARD_UTILS=m\nCONFIG_SND_SIMPLE_CARD=m\nCONFIG_SND_AUDIO_GRAPH_CARD=m\n# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set\n# CONFIG_SND_TEST_COMPONENT is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\n# CONFIG_HID_APPLEIR is not set\nCONFIG_HID_ASUS=y\nCONFIG_HID_AUREAL=y\nCONFIG_HID_BELKIN=y\n# CONFIG_HID_BETOP_FF is not set\nCONFIG_HID_BIGBEN_FF=m\nCONFIG_HID_CHERRY=y\nCONFIG_HID_CHICONY=y\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\nCONFIG_HID_CYPRESS=y\nCONFIG_HID_DRAGONRISE=m\nCONFIG_DRAGONRISE_FF=y\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\nCONFIG_HID_EZKEY=y\n# CONFIG_HID_FT260 is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_GLORIOUS is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\nCONFIG_HID_KYE=y\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_VRC2 is not set\n# CONFIG_HID_XIAOMI is not set\nCONFIG_HID_GYRATION=y\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_ITE is not set\n# CONFIG_HID_JABRA is not set\nCONFIG_HID_TWINHAN=y\nCONFIG_HID_KENSINGTON=y\nCONFIG_HID_LCPOWER=y\n# CONFIG_HID_LED is not set\nCONFIG_HID_LENOVO=y\n# CONFIG_HID_LETSKETCH is not set\nCONFIG_HID_LOGITECH=y\nCONFIG_HID_LOGITECH_DJ=y\nCONFIG_HID_LOGITECH_HIDPP=y\nCONFIG_LOGITECH_FF=y\nCONFIG_LOGIRUMBLEPAD2_FF=y\nCONFIG_LOGIG940_FF=y\nCONFIG_LOGIWHEELS_FF=y\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_MEGAWORLD_FF is not set\n# CONFIG_HID_REDRAGON is not set\nCONFIG_HID_MICROSOFT=y\nCONFIG_HID_MONTEREY=y\nCONFIG_HID_MULTITOUCH=m\nCONFIG_HID_NINTENDO=m\nCONFIG_NINTENDO_FF=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\nCONFIG_HID_ORTEK=y\nCONFIG_HID_OUYA=y\nCONFIG_HID_PANTHERLORD=y\nCONFIG_PANTHERLORD_FF=y\nCONFIG_HID_PENMOUNT=y\nCONFIG_HID_PETALYNX=y\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PXRC is not set\n# CONFIG_HID_RAZER is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\nCONFIG_HID_SAMSUNG=y\n# CONFIG_HID_SEMITEK is not set\n# CONFIG_HID_SIGMAMICRO is not set\nCONFIG_HID_SONY=y\nCONFIG_SONY_FF=y\n# CONFIG_HID_SPEEDLINK is not set\nCONFIG_HID_STEAM=m\n# CONFIG_HID_STEELSERIES is not set\nCONFIG_HID_SUNPLUS=y\nCONFIG_HID_RMI=y\n# CONFIG_HID_GREENASIA is not set\nCONFIG_HID_SMARTJOYPLUS=m\nCONFIG_SMARTJOYPLUS_FF=y\nCONFIG_HID_TIVO=y\nCONFIG_HID_TOPSEED=y\n# CONFIG_HID_TOPRE is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\nCONFIG_HID_WIIMOTE=m\nCONFIG_HID_XINMO=y\n# CONFIG_HID_ZEROPLUS is not set\nCONFIG_HID_ZYDACRON=y\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n# end of USB HID support\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID_OF is not set\n# CONFIG_I2C_HID_OF_ELAN is not set\n# CONFIG_I2C_HID_OF_GOODIX is not set\n# end of I2C HID support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_USB_ULPI_BUS is not set\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_PCI=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\n# CONFIG_USB_OTG is not set\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\nCONFIG_USB_MON=m\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\n# CONFIG_USB_XHCI_DBGCAP is not set\nCONFIG_USB_XHCI_PCI=y\n# CONFIG_USB_XHCI_PCI_RENESAS is not set\nCONFIG_USB_XHCI_PLATFORM=y\n# CONFIG_USB_EHCI_HCD is not set\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\n# CONFIG_USB_OHCI_HCD is not set\n# CONFIG_USB_UHCI_HCD is not set\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\nCONFIG_USB_DWCOTG=y\n# CONFIG_USB_HCD_BCMA is not set\n# CONFIG_USB_HCD_SSB is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=m\n# CONFIG_USB_PRINTER is not set\n# CONFIG_USB_WDM is not set\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\nCONFIG_USB_UAS=y\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\n# CONFIG_USB_MUSB_HDRC is not set\n# CONFIG_USB_DWC3 is not set\n# CONFIG_USB_DWC2 is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=m\nCONFIG_USB_SERIAL_GENERIC=y\n# CONFIG_USB_SERIAL_SIMPLE is not set\n# CONFIG_USB_SERIAL_AIRCABLE is not set\n# CONFIG_USB_SERIAL_ARK3116 is not set\n# CONFIG_USB_SERIAL_BELKIN is not set\nCONFIG_USB_SERIAL_CH341=m\n# CONFIG_USB_SERIAL_WHITEHEAT is not set\n# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set\nCONFIG_USB_SERIAL_CP210X=m\n# CONFIG_USB_SERIAL_CYPRESS_M8 is not set\n# CONFIG_USB_SERIAL_EMPEG is not set\nCONFIG_USB_SERIAL_FTDI_SIO=m\n# CONFIG_USB_SERIAL_VISOR is not set\n# CONFIG_USB_SERIAL_IPAQ is not set\n# CONFIG_USB_SERIAL_IR is not set\n# CONFIG_USB_SERIAL_EDGEPORT is not set\n# CONFIG_USB_SERIAL_EDGEPORT_TI is not set\n# CONFIG_USB_SERIAL_F81232 is not set\n# CONFIG_USB_SERIAL_F8153X is not set\n# CONFIG_USB_SERIAL_GARMIN is not set\n# CONFIG_USB_SERIAL_IPW is not set\nCONFIG_USB_SERIAL_IUU=m\n# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set\n# CONFIG_USB_SERIAL_KEYSPAN is not set\n# CONFIG_USB_SERIAL_KLSI is not set\n# CONFIG_USB_SERIAL_KOBIL_SCT is not set\n# CONFIG_USB_SERIAL_MCT_U232 is not set\n# CONFIG_USB_SERIAL_METRO is not set\n# CONFIG_USB_SERIAL_MOS7720 is not set\n# CONFIG_USB_SERIAL_MOS7840 is not set\n# CONFIG_USB_SERIAL_MXUPORT is not set\n# CONFIG_USB_SERIAL_NAVMAN is not set\nCONFIG_USB_SERIAL_PL2303=m\n# CONFIG_USB_SERIAL_OTI6858 is not set\n# CONFIG_USB_SERIAL_QCAUX is not set\n# CONFIG_USB_SERIAL_QUALCOMM is not set\n# CONFIG_USB_SERIAL_SPCP8X5 is not set\n# CONFIG_USB_SERIAL_SAFE is not set\n# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set\n# CONFIG_USB_SERIAL_SYMBOL is not set\n# CONFIG_USB_SERIAL_TI is not set\n# CONFIG_USB_SERIAL_CYBERJACK is not set\n# CONFIG_USB_SERIAL_OPTION is not set\n# CONFIG_USB_SERIAL_OMNINET is not set\n# CONFIG_USB_SERIAL_OPTICON is not set\n# CONFIG_USB_SERIAL_XSENS_MT is not set\n# CONFIG_USB_SERIAL_WISHBONE is not set\n# CONFIG_USB_SERIAL_SSU100 is not set\n# CONFIG_USB_SERIAL_QT2 is not set\n# CONFIG_USB_SERIAL_UPD78F0730 is not set\n# CONFIG_USB_SERIAL_XR is not set\n# CONFIG_USB_SERIAL_DEBUG is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\n# CONFIG_USB_EZUSB_FX2 is not set\n# CONFIG_USB_HUB_USB251XB is not set\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n# CONFIG_USB_ONBOARD_HUB is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\nCONFIG_NOP_USB_XCEIV=y\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\n# CONFIG_USB_ULPI is not set\n# end of USB Physical Layer drivers\n\n# CONFIG_USB_GADGET is not set\n# CONFIG_TYPEC is not set\n# CONFIG_USB_ROLE_SWITCH is not set\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\nCONFIG_MMC_BCM2835_MMC=y\nCONFIG_MMC_BCM2835_DMA=y\nCONFIG_MMC_BCM2835_PIO_DMA_BARRIER=2\nCONFIG_MMC_BCM2835_SDHOST=y\n# CONFIG_MMC_DEBUG is not set\n# CONFIG_MMC_ARMMMCI is not set\nCONFIG_MMC_SDHCI=y\nCONFIG_MMC_SDHCI_IO_ACCESSORS=y\n# CONFIG_MMC_SDHCI_PCI is not set\nCONFIG_MMC_SDHCI_PLTFM=y\n# CONFIG_MMC_SDHCI_OF_ARASAN is not set\n# CONFIG_MMC_SDHCI_OF_AT91 is not set\n# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set\n# CONFIG_MMC_SDHCI_CADENCE is not set\n# CONFIG_MMC_SDHCI_F_SDH30 is not set\n# CONFIG_MMC_SDHCI_MILBEAUT is not set\nCONFIG_MMC_SDHCI_IPROC=y\n# CONFIG_MMC_TIFM_SD is not set\n# CONFIG_MMC_SPI is not set\n# CONFIG_MMC_CB710 is not set\n# CONFIG_MMC_VIA_SDMMC is not set\n# CONFIG_MMC_DW is not set\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_REALTEK_USB=m\n# CONFIG_MMC_CQHCI is not set\n# CONFIG_MMC_HSQ is not set\n# CONFIG_MMC_TOSHIBA_PCI is not set\n# CONFIG_MMC_BCM2835 is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MMC_SDHCI_XENON is not set\n# CONFIG_MMC_SDHCI_OMAP is not set\n# CONFIG_MMC_SDHCI_AM654 is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\nCONFIG_LEDS_CLASS_FLASH=y\n# CONFIG_LEDS_CLASS_MULTICOLOR is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AN30259A is not set\n# CONFIG_LEDS_AW2013 is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_EL15203000 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_LP55XX_COMMON is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\n# CONFIG_LEDS_PWM is not set\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_SYSCON is not set\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_SPI_BYTE is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\n# CONFIG_LEDS_AAT1290 is not set\n# CONFIG_LEDS_AS3645A is not set\n# CONFIG_LEDS_KTD2692 is not set\n# CONFIG_LEDS_LM3601X is not set\n# CONFIG_LEDS_RT4505 is not set\n# CONFIG_LEDS_RT8515 is not set\n# CONFIG_LEDS_SGM3140 is not set\n\n#\n# RGB LED drivers\n#\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\nCONFIG_LEDS_TRIGGER_TIMER=y\nCONFIG_LEDS_TRIGGER_ONESHOT=y\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\nCONFIG_LEDS_TRIGGER_BACKLIGHT=y\nCONFIG_LEDS_TRIGGER_CPU=y\n# CONFIG_LEDS_TRIGGER_ACTIVITY is not set\nCONFIG_LEDS_TRIGGER_GPIO=y\nCONFIG_LEDS_TRIGGER_DEFAULT_ON=y\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\nCONFIG_LEDS_TRIGGER_TRANSIENT=y\nCONFIG_LEDS_TRIGGER_CAMERA=y\nCONFIG_LEDS_TRIGGER_INPUT=y\n# CONFIG_LEDS_TRIGGER_PANIC is not set\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\n# CONFIG_LEDS_TRIGGER_AUDIO is not set\n# CONFIG_LEDS_TRIGGER_TTY is not set\nCONFIG_LEDS_TRIGGER_ACTPWR=y\n\n#\n# Simple LED drivers\n#\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_SUPPORT=y\n# CONFIG_EDAC is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\nCONFIG_RTC_DRV_ABX80X=m\nCONFIG_RTC_DRV_DS1307=m\n# CONFIG_RTC_DRV_DS1307_CENTURY is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_HYM8563 is not set\n# CONFIG_RTC_DRV_MAX6900 is not set\n# CONFIG_RTC_DRV_NCT3018Y is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\nCONFIG_RTC_DRV_PCF8523=m\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\nCONFIG_RTC_DRV_PCF8563=m\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\nCONFIG_RTC_DRV_DS3232=m\nCONFIG_RTC_DRV_DS3232_HWMON=y\nCONFIG_RTC_DRV_PCF2127=m\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_EFI is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\n# CONFIG_RTC_DRV_PL031 is not set\n# CONFIG_RTC_DRV_CADENCE is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_VIRTUAL_CHANNELS=y\nCONFIG_DMA_OF=y\n# CONFIG_ALTERA_MSGDMA is not set\n# CONFIG_AMBA_PL08X is not set\n# CONFIG_BCM_SBA_RAID is not set\nCONFIG_DMA_BCM2835=y\n# CONFIG_DW_AXI_DMAC is not set\n# CONFIG_FSL_EDMA is not set\n# CONFIG_FSL_QDMA is not set\n# CONFIG_INTEL_IDMA64 is not set\n# CONFIG_MV_XOR_V2 is not set\n# CONFIG_PL330_DMA is not set\n# CONFIG_PLX_DMA is not set\n# CONFIG_DMA_BCM2708 is not set\n# CONFIG_XILINX_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DPDMA is not set\n# CONFIG_QCOM_HIDMA_MGMT is not set\n# CONFIG_QCOM_HIDMA is not set\n# CONFIG_DW_DMAC is not set\n# CONFIG_DW_DMAC_PCI is not set\n# CONFIG_DW_EDMA is not set\n# CONFIG_DW_EDMA_PCIE is not set\n# CONFIG_SF_PDMA is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\n# CONFIG_UDMABUF is not set\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\nCONFIG_DMABUF_HEAPS=y\n# CONFIG_DMABUF_SYSFS_STATS is not set\nCONFIG_DMABUF_HEAPS_SYSTEM=y\nCONFIG_DMABUF_HEAPS_CMA=y\n# end of DMABUF options\n\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\n# CONFIG_VIRTIO_MENU is not set\n# CONFIG_VDPA is not set\nCONFIG_VHOST_MENU=y\n# CONFIG_VHOST_NET is not set\n# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# end of Microsoft Hyper-V guest support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_RTL8192U is not set\n# CONFIG_RTLLIB is not set\nCONFIG_RTL8723BS=m\nCONFIG_R8712U=m\nCONFIG_R8188EU=m\n# CONFIG_RTS5208 is not set\n# CONFIG_VT6655 is not set\nCONFIG_VT6656=m\n# CONFIG_FB_SM750 is not set\nCONFIG_STAGING_MEDIA=y\n# CONFIG_VIDEO_MAX96712 is not set\nCONFIG_VIDEO_RPIVID=m\n# CONFIG_STAGING_MEDIA_DEPRECATED is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_KS7010 is not set\nCONFIG_BCM_VIDEOCORE=y\nCONFIG_BCM2835_VCHIQ=y\nCONFIG_VCHIQ_CDEV=y\nCONFIG_SND_BCM2835=m\n# CONFIG_VIDEO_BCM2835 is not set\nCONFIG_BCM_VC_SM_CMA=y\nCONFIG_VIDEO_CODEC_BCM2835=m\nCONFIG_VIDEO_ISP_BCM2835=m\nCONFIG_BCM2835_VCHIQ_MMAL=m\n# CONFIG_PI433 is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_FIELDBUS_DEV is not set\n# CONFIG_QLGE is not set\n# CONFIG_VME_BUS is not set\n# CONFIG_GOLDFISH is not set\n# CONFIG_CHROME_PLATFORMS is not set\n# CONFIG_MELLANOX_PLATFORM is not set\nCONFIG_SURFACE_PLATFORMS=y\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Clock driver for ARM Reference designs\n#\n# CONFIG_CLK_ICST is not set\n# CONFIG_CLK_SP810 is not set\n# end of Clock driver for ARM Reference designs\n\n# CONFIG_LMK04832 is not set\n# CONFIG_COMMON_CLK_MAX9485 is not set\n# CONFIG_COMMON_CLK_RP1 is not set\nCONFIG_COMMON_CLK_HIFIBERRY_DACPLUSHD=m\nCONFIG_COMMON_CLK_HIFIBERRY_DACPRO=m\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\n# CONFIG_COMMON_CLK_AXI_CLKGEN is not set\n# CONFIG_COMMON_CLK_XGENE is not set\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_RS9_PCIE is not set\n# CONFIG_COMMON_CLK_VC5 is not set\n# CONFIG_COMMON_CLK_VC7 is not set\n# CONFIG_COMMON_CLK_FIXED_MMIO is not set\nCONFIG_CLK_BCM2711_DVP=y\nCONFIG_CLK_BCM2835=y\nCONFIG_CLK_RASPBERRYPI=y\n# CONFIG_XILINX_VCU is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\n# CONFIG_HWSPINLOCK is not set\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\nCONFIG_CLKSRC_MMIO=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y\nCONFIG_FSL_ERRATUM_A008585=y\nCONFIG_HISILICON_ERRATUM_161010101=y\nCONFIG_ARM64_ERRATUM_858921=y\nCONFIG_ARM_TIMER_SP804=y\n# CONFIG_MICROCHIP_PIT64B is not set\n# end of Clock Source drivers\n\nCONFIG_MAILBOX=y\n# CONFIG_ARM_MHU is not set\n# CONFIG_ARM_MHU_V2 is not set\n# CONFIG_PLATFORM_MHU is not set\n# CONFIG_PL320_MBOX is not set\n# CONFIG_ALTERA_MBOX is not set\nCONFIG_BCM2835_MBOX=y\n# CONFIG_MAILBOX_TEST is not set\n# CONFIG_IOMMU_SUPPORT is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\n# CONFIG_RPMSG_QCOM_GLINK_RPM is not set\n# CONFIG_RPMSG_VIRTIO is not set\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\nCONFIG_BCM2835_POWER=y\nCONFIG_RASPBERRYPI_POWER=y\n# CONFIG_SOC_BRCMSTB is not set\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# CONFIG_QUICC_ENGINE is not set\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# fujitsu SoC drivers\n#\n# end of fujitsu SoC drivers\n\n#\n# i.MX SoC drivers\n#\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# CONFIG_LITEX_SOC_CONTROLLER is not set\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# end of Qualcomm SoC drivers\n\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\n# CONFIG_PM_DEVFREQ is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_FSA9480 is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_PTN5150 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\n# CONFIG_EXTCON_USB_GPIO is not set\n# CONFIG_MEMORY is not set\n# CONFIG_IIO is not set\n# CONFIG_NTB is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_DEBUG is not set\n# CONFIG_PWM_ATMEL_TCB is not set\nCONFIG_PWM_BCM2835=m\n# CONFIG_PWM_CLK is not set\n# CONFIG_PWM_DWC is not set\n# CONFIG_PWM_FSL_FTM is not set\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_PWM_RASPBERRYPI_POE=m\n# CONFIG_PWM_RP1 is not set\n# CONFIG_PWM_XILINX is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\nCONFIG_ARM_GIC_V2M=y\nCONFIG_ARM_GIC_V3=y\nCONFIG_ARM_GIC_V3_ITS=y\nCONFIG_ARM_GIC_V3_ITS_PCI=y\n# CONFIG_AL_FIC is not set\n# CONFIG_BCM2712_MIP is not set\nCONFIG_BRCMSTB_L2_IRQ=y\n# CONFIG_XILINX_INTC is not set\nCONFIG_PARTITION_PERCPU=y\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\nCONFIG_RESET_CONTROLLER=y\n# CONFIG_RESET_BRCMSTB is not set\nCONFIG_RESET_RASPBERRYPI=y\nCONFIG_RESET_SIMPLE=y\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_RESET_TI_TPS380X is not set\n\n#\n# PHY Subsystem\n#\n# CONFIG_GENERIC_PHY is not set\n# CONFIG_PHY_XGENE is not set\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\n\n#\n# PHY drivers for Broadcom platforms\n#\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# CONFIG_PHY_BRCM_USB is not set\n# end of PHY drivers for Broadcom platforms\n\n# CONFIG_PHY_CADENCE_TORRENT is not set\n# CONFIG_PHY_CADENCE_DPHY is not set\n# CONFIG_PHY_CADENCE_DPHY_RX is not set\n# CONFIG_PHY_CADENCE_SIERRA is not set\n# CONFIG_PHY_CADENCE_SALVO is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_LAN966X_SERDES is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\n# CONFIG_PHY_OCELOT_SERDES is not set\n# end of PHY Subsystem\n\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\n# CONFIG_ARM_CMN is not set\nCONFIG_ARM_PMU=y\n# CONFIG_ARM_DSU_PMU is not set\n# CONFIG_ARM_SPE_PMU is not set\nCONFIG_RPI_AXIPERF=m\n# CONFIG_HISI_PCIE_PMU is not set\n# CONFIG_HNS3_PMU is not set\n# end of Performance monitor support\n\nCONFIG_RAS=y\n# CONFIG_USB4 is not set\n\n#\n# Android\n#\n# CONFIG_ANDROID_BINDER_IPC is not set\n# end of Android\n\n# CONFIG_LIBNVDIMM is not set\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\nCONFIG_NVMEM_RMEM=m\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# CONFIG_HISI_PTT is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\n# CONFIG_TEE is not set\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\n# CONFIG_PECI is not set\n# CONFIG_HTE is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_VALIDATE_FS_PARSER=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\nCONFIG_XFS_SUPPORT_V4=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\nCONFIG_F2FS_FS=y\nCONFIG_F2FS_STAT_FS=y\n# CONFIG_F2FS_FS_XATTR is not set\nCONFIG_F2FS_CHECK_FS=y\n# CONFIG_F2FS_FAULT_INJECTION is not set\n# CONFIG_F2FS_FS_COMPRESSION is not set\nCONFIG_F2FS_IOSTAT=y\n# CONFIG_F2FS_UNFAIR_RWSEM is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\n# CONFIG_QUOTA is not set\n# CONFIG_AUTOFS4_FS is not set\nCONFIG_AUTOFS_FS=y\nCONFIG_FUSE_FS=m\n# CONFIG_CUSE is not set\n# CONFIG_VIRTIO_FS is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_XINO_AUTO is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n\n#\n# Caches\n#\nCONFIG_NETFS_SUPPORT=y\n# CONFIG_NETFS_STATS is not set\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_CACHEFILES is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=y\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=m\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=m\n# CONFIG_NTFS3_64BIT_CLUSTER is not set\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\n# CONFIG_PROC_KCORE is not set\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_TMPFS_INODE64 is not set\nCONFIG_ARCH_SUPPORTS_HUGETLBFS=y\n# CONFIG_HUGETLBFS is not set\nCONFIG_MEMFD_CREATE=y\nCONFIG_ARCH_HAS_GIGANTIC_PAGE=y\nCONFIG_CONFIGFS_FS=y\nCONFIG_EFIVAR_FS=m\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\nCONFIG_HFS_FS=y\nCONFIG_HFSPLUS_FS=y\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\n# CONFIG_SQUASHFS_FILE_CACHE is not set\nCONFIG_SQUASHFS_FILE_DIRECT=y\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\nCONFIG_PSTORE=y\nCONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240\nCONFIG_PSTORE_DEFLATE_COMPRESS=y\n# CONFIG_PSTORE_LZO_COMPRESS is not set\n# CONFIG_PSTORE_LZ4_COMPRESS is not set\n# CONFIG_PSTORE_LZ4HC_COMPRESS is not set\n# CONFIG_PSTORE_842_COMPRESS is not set\n# CONFIG_PSTORE_ZSTD_COMPRESS is not set\nCONFIG_PSTORE_COMPRESS=y\nCONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y\nCONFIG_PSTORE_COMPRESS_DEFAULT=\"deflate\"\nCONFIG_PSTORE_CONSOLE=y\n# CONFIG_PSTORE_PMSG is not set\n# CONFIG_PSTORE_FTRACE is not set\nCONFIG_PSTORE_RAM=y\n# CONFIG_PSTORE_BLK is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EROFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\nCONFIG_NFS_SWAP=y\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\nCONFIG_NFS_V4_1_MIGRATION=y\nCONFIG_ROOT_NFS=y\nCONFIG_NFS_FSCACHE=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFS_DISABLE_UDP_SUPPORT=y\n# CONFIG_NFS_V4_2_READ_PLUS is not set\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_COMMON=y\nCONFIG_NFS_V4_2_SSC_HELPER=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\nCONFIG_SUNRPC_SWAP=y\nCONFIG_RPCSEC_GSS_KRB5=m\n# CONFIG_SUNRPC_DISABLE_INSECURE_ENCTYPES is not set\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS2=y\nCONFIG_CIFS_ALLOW_INSECURE_LEGACY=y\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\nCONFIG_CIFS_DEBUG=y\n# CONFIG_CIFS_DEBUG2 is not set\n# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\n# CONFIG_CIFS_SWN_UPCALL is not set\nCONFIG_CIFS_FSCACHE=y\n# CONFIG_CIFS_ROOT is not set\n# CONFIG_SMB_SERVER is not set\nCONFIG_SMBFS=y\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_KEYS_REQUEST_CACHE is not set\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\nCONFIG_KEY_DH_OPERATIONS=y\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY is not set\n# CONFIG_SECURITYFS is not set\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\n# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_LSM=\"yama,loadpin,safesetid,integrity\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_GCC_PLUGIN_STACKLEAK is not set\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n\nCONFIG_RANDSTRUCT_NONE=y\n# CONFIG_RANDSTRUCT_FULL is not set\n# CONFIG_RANDSTRUCT_PERFORMANCE is not set\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_CRYPTD=y\nCONFIG_CRYPTO_AUTHENC=y\n# CONFIG_CRYPTO_TEST is not set\n# end of Crypto core or helper\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_DH=y\n# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set\nCONFIG_CRYPTO_ECC=m\nCONFIG_CRYPTO_ECDH=m\n# CONFIG_CRYPTO_ECDSA is not set\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\n# CONFIG_CRYPTO_CURVE25519 is not set\n# end of Public-key cryptography\n\n#\n# Block ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\n# CONFIG_CRYPTO_ARIA is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\n# CONFIG_CRYPTO_SM4_GENERIC is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n# end of Block ciphers\n\n#\n# Length-preserving ciphers and modes\n#\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_ARC4 is not set\n# CONFIG_CRYPTO_CHACHA20 is not set\nCONFIG_CRYPTO_CBC=y\nCONFIG_CRYPTO_CFB=m\nCONFIG_CRYPTO_CTR=y\nCONFIG_CRYPTO_CTS=m\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_HCTR2 is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_LRW is not set\nCONFIG_CRYPTO_OFB=m\n# CONFIG_CRYPTO_PCBC is not set\n# CONFIG_CRYPTO_XTS is not set\n# end of Length-preserving ciphers and modes\n\n#\n# AEAD (authenticated encryption with associated data) ciphers\n#\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\n# CONFIG_CRYPTO_ESSIV is not set\n# end of AEAD (authenticated encryption with associated data) ciphers\n\n#\n# Hashes, digests, and MACs\n#\nCONFIG_CRYPTO_BLAKE2B=m\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\n# CONFIG_CRYPTO_POLY1305 is not set\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\n# CONFIG_CRYPTO_SM3_GENERIC is not set\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_VMAC is not set\n# CONFIG_CRYPTO_WP512 is not set\n# CONFIG_CRYPTO_XCBC is not set\nCONFIG_CRYPTO_XXHASH=m\n# end of Hashes, digests, and MACs\n\n#\n# CRCs (cyclic redundancy checks)\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=y\n# CONFIG_CRYPTO_CRCT10DIF is not set\n# end of CRCs (cyclic redundancy checks)\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=y\nCONFIG_CRYPTO_LZO=m\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n# end of Compression\n\n#\n# Random number generation\n#\n# CONFIG_CRYPTO_ANSI_CPRNG is not set\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_KDF800108_CTR=y\n# end of Random number generation\n\n#\n# Userspace interface\n#\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\n# CONFIG_CRYPTO_USER_API_AEAD is not set\nCONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y\n# end of Userspace interface\n\nCONFIG_CRYPTO_HASH_INFO=y\n# CONFIG_CRYPTO_NHPOLY1305_NEON is not set\nCONFIG_CRYPTO_CHACHA20_NEON=m\n\n#\n# Accelerated Cryptographic Algorithms for CPU (arm64)\n#\n# CONFIG_CRYPTO_GHASH_ARM64_CE is not set\nCONFIG_CRYPTO_POLY1305_NEON=m\n# CONFIG_CRYPTO_SHA1_ARM64_CE is not set\n# CONFIG_CRYPTO_SHA256_ARM64 is not set\n# CONFIG_CRYPTO_SHA2_ARM64_CE is not set\n# CONFIG_CRYPTO_SHA512_ARM64 is not set\n# CONFIG_CRYPTO_SHA512_ARM64_CE is not set\n# CONFIG_CRYPTO_SHA3_ARM64 is not set\n# CONFIG_CRYPTO_SM3_NEON is not set\n# CONFIG_CRYPTO_SM3_ARM64_CE is not set\n# CONFIG_CRYPTO_POLYVAL_ARM64_CE is not set\nCONFIG_CRYPTO_AES_ARM64=y\n# CONFIG_CRYPTO_AES_ARM64_CE is not set\n# CONFIG_CRYPTO_AES_ARM64_CE_BLK is not set\nCONFIG_CRYPTO_AES_ARM64_NEON_BLK=y\nCONFIG_CRYPTO_AES_ARM64_BS=y\n# CONFIG_CRYPTO_SM4_ARM64_CE is not set\n# CONFIG_CRYPTO_SM4_ARM64_CE_BLK is not set\n# CONFIG_CRYPTO_SM4_ARM64_NEON_BLK is not set\n# CONFIG_CRYPTO_AES_ARM64_CE_CCM is not set\n# end of Accelerated Cryptographic Algorithms for CPU (arm64)\n\n# CONFIG_CRYPTO_HW is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n# CONFIG_FIPS_SIGNATURE_SELFTEST is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\nCONFIG_RAID6_PQ_BENCHMARK=y\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_CORDIC=m\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_ARCH_HAS_FAST_MULTIPLIER=y\nCONFIG_ARCH_USE_SYM_ANNOTATIONS=y\n# CONFIG_INDIRECT_PIO is not set\n# CONFIG_TRACE_MMIO_ACCESS is not set\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_UTILS=y\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=m\nCONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=m\nCONFIG_CRYPTO_LIB_CHACHA_GENERIC=m\nCONFIG_CRYPTO_LIB_CHACHA=m\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=m\nCONFIG_CRYPTO_LIB_CURVE25519=m\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=m\nCONFIG_CRYPTO_LIB_POLY1305=m\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=m\nCONFIG_CRYPTO_LIB_SHA1=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_CRC_CCITT=m\nCONFIG_CRC16=y\n# CONFIG_CRC_T10DIF is not set\n# CONFIG_CRC64_ROCKSOFT is not set\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC64 is not set\n# CONFIG_CRC4 is not set\n# CONFIG_CRC7 is not set\nCONFIG_LIBCRC32C=m\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=y\nCONFIG_AUDIT_ARCH_COMPAT_GENERIC=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=m\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMMON=y\nCONFIG_ZSTD_COMPRESS=m\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\n# CONFIG_XZ_DEC_X86 is not set\n# CONFIG_XZ_DEC_POWERPC is not set\n# CONFIG_XZ_DEC_IA64 is not set\n# CONFIG_XZ_DEC_ARM is not set\n# CONFIG_XZ_DEC_ARMTHUMB is not set\n# CONFIG_XZ_DEC_SPARC is not set\n# CONFIG_XZ_DEC_MICROLZMA is not set\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_REED_SOLOMON=y\nCONFIG_REED_SOLOMON_ENC8=y\nCONFIG_REED_SOLOMON_DEC8=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_DMA_DECLARE_COHERENT=y\nCONFIG_ARCH_HAS_SETUP_DMA_OPS=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y\nCONFIG_ARCH_HAS_DMA_PREP_COHERENT=y\nCONFIG_SWIOTLB=y\n# CONFIG_DMA_RESTRICTED_POOL is not set\nCONFIG_DMA_NONCOHERENT_MMAP=y\nCONFIG_DMA_COHERENT_POOL=y\nCONFIG_DMA_DIRECT_REMAP=y\nCONFIG_DMA_CMA=y\n# CONFIG_DMA_PERNUMA_CMA is not set\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=5\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\n# CONFIG_FORCE_NR_CPUS is not set\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_DIMLIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_UCS2_STRING=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_GENERIC_VDSO_TIME_NS=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\nCONFIG_SG_POOL=y\nCONFIG_ARCH_STACKWALK=y\nCONFIG_STACKDEPOT=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_GENERIC_IOREMAP=y\nCONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\n# CONFIG_STACKTRACE_BUILD_ID is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\nCONFIG_DYNAMIC_DEBUG_CORE=y\nCONFIG_SYMBOLIC_ERRNAME=y\n# CONFIG_DEBUG_BUGVERBOSE is not set\n# end of printk and dmesg options\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_AS_HAS_NON_CONST_LEB128=y\nCONFIG_DEBUG_INFO_NONE=y\n# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\nCONFIG_FRAME_WARN=2048\nCONFIG_STRIP_ASM_SYMS=y\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\n# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B is not set\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_VMLINUX_MAP is not set\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=\"\"\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\nCONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_ARCH_KCSAN=y\nCONFIG_HAVE_KCSAN_COMPILER=y\n# CONFIG_KCSAN is not set\n# end of Generic Kernel Debugging Instruments\n\n#\n# Networking Debugging\n#\n# CONFIG_NET_DEV_REFCNT_TRACKER is not set\n# CONFIG_NET_NS_REFCNT_TRACKER is not set\n# CONFIG_DEBUG_NET is not set\n# end of Networking Debugging\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_TABLE_CHECK is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_PAGE_REF is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\nCONFIG_ARCH_HAS_DEBUG_WX=y\n# CONFIG_DEBUG_WX is not set\nCONFIG_GENERIC_PTDUMP=y\n# CONFIG_PTDUMP_DEBUGFS is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SHRINKER_DEBUG is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\nCONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y\n# CONFIG_DEBUG_VM is not set\n# CONFIG_DEBUG_VM_PGTABLE is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\n# CONFIG_DEBUG_MEMORY_INIT is not set\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_SW_TAGS=y\nCONFIG_HAVE_ARCH_KASAN_HW_TAGS=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_KASAN_SW_TAGS=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\n# CONFIG_SOFTLOCKUP_DETECTOR is not set\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\n# CONFIG_SCHED_DEBUG is not set\n# CONFIG_SCHEDSTATS is not set\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_RWSEMS is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# CONFIG_CSD_LOCK_WAIT_DEBUG is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_DEBUG_MAPLE_TREE is not set\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\nCONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACER_MAX_TRACE=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_RING_BUFFER_ALLOW_SWAP=y\nCONFIG_TRACING=y\nCONFIG_GENERIC_TRACER=y\nCONFIG_TRACING_SUPPORT=y\nCONFIG_FTRACE=y\nCONFIG_BOOTTIME_TRACING=y\nCONFIG_FUNCTION_TRACER=y\nCONFIG_FUNCTION_GRAPH_TRACER=y\nCONFIG_DYNAMIC_FTRACE=y\nCONFIG_DYNAMIC_FTRACE_WITH_REGS=y\n# CONFIG_FUNCTION_PROFILER is not set\nCONFIG_STACK_TRACER=y\n# CONFIG_IRQSOFF_TRACER is not set\n# CONFIG_SCHED_TRACER is not set\n# CONFIG_HWLAT_TRACER is not set\n# CONFIG_OSNOISE_TRACER is not set\n# CONFIG_TIMERLAT_TRACER is not set\n# CONFIG_FTRACE_SYSCALLS is not set\nCONFIG_TRACER_SNAPSHOT=y\nCONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP=y\nCONFIG_BRANCH_PROFILE_NONE=y\n# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set\n# CONFIG_PROFILE_ALL_BRANCHES is not set\nCONFIG_BLK_DEV_IO_TRACE=y\nCONFIG_KPROBE_EVENTS=y\n# CONFIG_KPROBE_EVENTS_ON_NOTRACE is not set\n# CONFIG_UPROBE_EVENTS is not set\nCONFIG_BPF_EVENTS=y\nCONFIG_DYNAMIC_EVENTS=y\nCONFIG_PROBE_EVENTS=y\n# CONFIG_BPF_KPROBE_OVERRIDE is not set\nCONFIG_FTRACE_MCOUNT_RECORD=y\nCONFIG_FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY=y\n# CONFIG_SYNTH_EVENTS is not set\n# CONFIG_HIST_TRIGGERS is not set\n# CONFIG_TRACE_EVENT_INJECT is not set\n# CONFIG_TRACEPOINT_BENCHMARK is not set\n# CONFIG_RING_BUFFER_BENCHMARK is not set\n# CONFIG_TRACE_EVAL_MAP_FILE is not set\n# CONFIG_FTRACE_RECORD_RECURSION is not set\n# CONFIG_FTRACE_STARTUP_TEST is not set\n# CONFIG_RING_BUFFER_STARTUP_TEST is not set\n# CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is not set\n# CONFIG_PREEMPTIRQ_DELAY_TEST is not set\n# CONFIG_KPROBE_EVENT_GEN_TEST is not set\n# CONFIG_RV is not set\n# CONFIG_SAMPLES is not set\nCONFIG_STRICT_DEVMEM=y\n# CONFIG_IO_STRICT_DEVMEM is not set\n\n#\n# arm64 Debugging\n#\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_ARM64_RELOC_TEST is not set\n# CONFIG_CORESIGHT is not set\n# end of arm64 Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\nCONFIG_FUNCTION_ERROR_INJECTION=y\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\n# CONFIG_RUNTIME_TESTING_MENU is not set\nCONFIG_ARCH_USE_MEMTEST=y\n# CONFIG_MEMTEST is not set\n# end of Kernel Testing and Coverage\n\n#\n# Rust hacking\n#\n# end of Rust hacking\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/RPi/devices/RPi4/options",
    "content": "################################################################################\n# Device defaults\n################################################################################\n\n  # NOOBS supported hex versions (legacy) is not relevant for RPi4\n    unset NOOBS_HEX\n\n  # NOOBS supported model versions\n    NOOBS_SUPPORTED_MODELS='\"Pi 4\"'\n\n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n    FIRMWARE=\"${FIRMWARE} rpi-eeprom\"\n\n  # set the addon project\n    ADDON_PROJECT=\"ARMv8\"\n\n  # build 64bit kernel\n    case $TARGET_ARCH in\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_KERNEL_PATCH_ARCH=\"aarch64\"\n        ;;\n    esac\n\n  # Kernel target\n    KERNEL_TARGET=\"Image\"\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/config/config.txt",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n################################################################################\n# Bootloader configuration\n# config.txt version v1 (do not remove or change this line!)\n################################################################################\n# For more options and information see\n# http://rpf.io/configtxt\n################################################################################\n\n# Don't send initial active source message.\n# Avoids bringing CEC (enabled TV) out of standby and channel switch when\n# rebooting.\nhdmi_ignore_cec_init=1\n\n[all]\n################################################################################\n# Use distroconfig-composite.txt instead of distroconfig.txt to enable\n# composite video output.\n# The composite video mode needs to be configured in cmdline.txt:\n# For PAL add: video=Composite-1:720x576@50ie\n# For NTSC add: video=Composite-1:720x480@60ie\n################################################################################\ninclude distroconfig.txt\n#include distroconfig-composite.txt\n\n# uncomment to enable infrared remote receiver connected to GPIO 18\n#dtoverlay=gpio-ir,gpio_pin=18\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/config/distroconfig-composite.txt",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2023-present Team LibreELEC (https://libreelec.tv)\n\n# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!\narm_boost=1\narm_64bit=1\nkernel=kernel.img\ndisplay_auto_detect=1\nenable_tvout=1\ndtoverlay=vc4-kms-v3d,cma-512,composite=1\ndtoverlay=\ndisable_overscan=1\ndisable_fw_kms_setup=1\nmax_framebuffers=0\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/config/distroconfig.txt",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!\narm_boost=1\narm_64bit=1\nkernel=kernel.img\ndisplay_auto_detect=1\ndtoverlay=vc4-kms-v3d,cma-512\ndtoverlay=\ndisable_overscan=1\ndisable_fw_kms_setup=1\nmax_framebuffers=0\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/kodi/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n\n  <section id=\"system\">\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.audiodevice\">\n          <default>ALSA:hdmi:CARD=vc4hdmi0,DEV=0</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n</settings>\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/linux/linux.aarch64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm64 6.1.66 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"aarch64-linux-gnu-gcc (GCC) 13.0.0 20220604 (experimental) [master revision aec868578d8515763d75693c1fdfbc30ff0a1e68]\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=130000\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23850\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23850\nCONFIG_LLD_VERSION=0\nCONFIG_CC_CAN_LINK=y\nCONFIG_CC_CAN_LINK_STATIC=y\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_BUILD_SALT=\"\"\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_SYSVIPC_COMPAT=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\n# CONFIG_WATCH_QUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_IRQ_IPI=y\nCONFIG_GENERIC_MSI_IRQ=y\nCONFIG_GENERIC_MSI_IRQ_DOMAIN=y\nCONFIG_IRQ_MSI_IOMMU=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\nCONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_CONTEXT_TRACKING=y\nCONFIG_CONTEXT_TRACKING_IDLE=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\nCONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\n# CONFIG_BPF_JIT is not set\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# end of BPF subsystem\n\nCONFIG_PREEMPT_VOLUNTARY_BUILD=y\n# CONFIG_PREEMPT_NONE is not set\nCONFIG_PREEMPT_VOLUNTARY=y\n# CONFIG_PREEMPT is not set\n# CONFIG_PREEMPT_DYNAMIC is not set\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\n# CONFIG_BSD_PROCESS_ACCT is not set\n# CONFIG_TASKSTATS is not set\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_RUDE_RCU=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\n# end of RCU Subsystem\n\nCONFIG_IKCONFIG=m\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=17\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# end of Scheduler features\n\nCONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y\nCONFIG_CC_HAS_INT128=y\nCONFIG_CC_IMPLICIT_FALLTHROUGH=\"-Wimplicit-fallthrough=5\"\nCONFIG_GCC11_NO_ARRAY_BOUNDS=y\nCONFIG_CC_NO_ARRAY_BOUNDS=y\nCONFIG_ARCH_SUPPORTS_INT128=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\n# CONFIG_CGROUP_FAVOR_DYNMODS is not set\nCONFIG_MEMCG=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_BLK_CGROUP=y\nCONFIG_CGROUP_WRITEBACK=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\nCONFIG_CGROUP_PIDS=y\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_CGROUP_PERF=y\nCONFIG_CGROUP_BPF=y\n# CONFIG_CGROUP_MISC is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_TIME_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_CHECKPOINT_RESTORE is not set\n# CONFIG_SCHED_AUTOGROUP is not set\n# CONFIG_SYSFS_DEPRECATED is not set\nCONFIG_RELAY=y\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"@INITRAMFS_SOURCE@\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\n# CONFIG_RD_GZIP is not set\n# CONFIG_RD_BZIP2 is not set\n# CONFIG_RD_LZMA is not set\n# CONFIG_RD_XZ is not set\n# CONFIG_RD_LZO is not set\n# CONFIG_RD_LZ4 is not set\n# CONFIG_RD_ZSTD is not set\nCONFIG_INITRAMFS_COMPRESSION_NONE=y\nCONFIG_BOOT_CONFIG=y\n# CONFIG_BOOT_CONFIG_EMBED is not set\nCONFIG_INITRAMFS_PRESERVE_MTIME=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\nCONFIG_EXPERT=y\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\n# CONFIG_SGETMASK_SYSCALL is not set\n# CONFIG_SYSFS_SYSCALL is not set\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\n# CONFIG_KALLSYMS_ALL is not set\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_DEBUG_RSEQ is not set\nCONFIG_EMBEDDED=y\nCONFIG_HAVE_PERF_EVENTS=y\n# CONFIG_PC104 is not set\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_SYSTEM_DATA_VERIFICATION=y\nCONFIG_PROFILING=y\nCONFIG_TRACEPOINTS=y\n# end of General setup\n\nCONFIG_ARM64=y\nCONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_64BIT=y\nCONFIG_MMU=y\nCONFIG_ARM64_PAGE_SHIFT=12\nCONFIG_ARM64_CONT_PTE_SHIFT=4\nCONFIG_ARM64_CONT_PMD_SHIFT=4\nCONFIG_ARCH_MMAP_RND_BITS_MIN=18\nCONFIG_ARCH_MMAP_RND_BITS_MAX=24\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_GENERIC_BUG=y\nCONFIG_GENERIC_BUG_RELATIVE_POINTERS=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CSUM=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y\nCONFIG_SMP=y\nCONFIG_KERNEL_MODE_NEON=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_PGTABLE_LEVELS=3\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_ARCH_PROC_KCORE_TEXT=y\n\n#\n# Platform selection\n#\n# CONFIG_ARCH_ACTIONS is not set\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_APPLE is not set\nCONFIG_ARCH_BCM=y\nCONFIG_ARCH_BCM2835=y\n# CONFIG_ARCH_BCM_IPROC is not set\n# CONFIG_ARCH_BCMBCA is not set\nCONFIG_ARCH_BRCMSTB=y\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_BITMAIN is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_SPARX5 is not set\n# CONFIG_ARCH_K3 is not set\n# CONFIG_ARCH_LG1K is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_KEEMBAY is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_MESON is not set\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_NXP is not set\n# CONFIG_ARCH_NPCM is not set\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_REALTEK is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_ROCKCHIP is not set\n# CONFIG_ARCH_SEATTLE is not set\n# CONFIG_ARCH_INTEL_SOCFPGA is not set\n# CONFIG_ARCH_SYNQUACER is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_SPRD is not set\n# CONFIG_ARCH_THUNDER is not set\n# CONFIG_ARCH_THUNDER2 is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_VISCONTI is not set\n# CONFIG_ARCH_XGENE is not set\n# CONFIG_ARCH_ZYNQMP is not set\n# end of Platform selection\n\n#\n# Kernel Features\n#\n\n#\n# ARM errata workarounds via the alternatives framework\n#\nCONFIG_AMPERE_ERRATUM_AC03_CPU_38=y\nCONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y\nCONFIG_ARM64_ERRATUM_826319=y\nCONFIG_ARM64_ERRATUM_827319=y\nCONFIG_ARM64_ERRATUM_824069=y\nCONFIG_ARM64_ERRATUM_819472=y\nCONFIG_ARM64_ERRATUM_832075=y\nCONFIG_ARM64_ERRATUM_1742098=y\nCONFIG_ARM64_ERRATUM_845719=y\nCONFIG_ARM64_ERRATUM_843419=y\nCONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y\nCONFIG_ARM64_ERRATUM_1024718=y\nCONFIG_ARM64_ERRATUM_1418040=y\nCONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y\nCONFIG_ARM64_ERRATUM_1165522=y\nCONFIG_ARM64_ERRATUM_1319367=y\nCONFIG_ARM64_ERRATUM_1530923=y\nCONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y\nCONFIG_ARM64_ERRATUM_2441007=y\nCONFIG_ARM64_ERRATUM_1286807=y\nCONFIG_ARM64_ERRATUM_1463225=y\nCONFIG_ARM64_ERRATUM_1542419=y\nCONFIG_ARM64_ERRATUM_1508412=y\nCONFIG_ARM64_ERRATUM_2051678=y\nCONFIG_ARM64_ERRATUM_2077057=y\nCONFIG_ARM64_ERRATUM_2658417=y\nCONFIG_ARM64_WORKAROUND_TSB_FLUSH_FAILURE=y\nCONFIG_ARM64_ERRATUM_2054223=y\nCONFIG_ARM64_ERRATUM_2067961=y\nCONFIG_ARM64_ERRATUM_2441009=y\nCONFIG_ARM64_ERRATUM_2457168=y\nCONFIG_ARM64_ERRATUM_2966298=y\nCONFIG_CAVIUM_ERRATUM_22375=y\nCONFIG_CAVIUM_ERRATUM_23154=y\nCONFIG_CAVIUM_ERRATUM_27456=y\nCONFIG_CAVIUM_ERRATUM_30115=y\nCONFIG_CAVIUM_TX2_ERRATUM_219=y\nCONFIG_FUJITSU_ERRATUM_010001=y\nCONFIG_HISILICON_ERRATUM_161600802=y\nCONFIG_QCOM_FALKOR_ERRATUM_1003=y\nCONFIG_QCOM_FALKOR_ERRATUM_1009=y\nCONFIG_QCOM_QDF2400_ERRATUM_0065=y\nCONFIG_QCOM_FALKOR_ERRATUM_E1041=y\nCONFIG_NVIDIA_CARMEL_CNP_ERRATUM=y\nCONFIG_SOCIONEXT_SYNQUACER_PREITS=y\n# end of ARM errata workarounds via the alternatives framework\n\nCONFIG_ARM64_4K_PAGES=y\n# CONFIG_ARM64_16K_PAGES is not set\n# CONFIG_ARM64_64K_PAGES is not set\nCONFIG_ARM64_VA_BITS_39=y\n# CONFIG_ARM64_VA_BITS_48 is not set\nCONFIG_ARM64_VA_BITS=39\nCONFIG_ARM64_PA_BITS_48=y\nCONFIG_ARM64_PA_BITS=48\n# CONFIG_CPU_BIG_ENDIAN is not set\nCONFIG_CPU_LITTLE_ENDIAN=y\n# CONFIG_SCHED_MC is not set\n# CONFIG_SCHED_CLUSTER is not set\n# CONFIG_SCHED_SMT is not set\nCONFIG_NR_CPUS=256\n# CONFIG_HOTPLUG_CPU is not set\n# CONFIG_NUMA is not set\n# CONFIG_HZ_100 is not set\n# CONFIG_HZ_250 is not set\nCONFIG_HZ_300=y\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=300\nCONFIG_SCHED_HRTICK=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_CC_HAVE_SHADOW_CALL_STACK=y\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\n# CONFIG_KEXEC_FILE is not set\n# CONFIG_CRASH_DUMP is not set\n# CONFIG_XEN is not set\nCONFIG_ARCH_FORCE_MAX_ORDER=11\nCONFIG_UNMAP_KERNEL_AT_EL0=y\nCONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y\nCONFIG_RODATA_FULL_DEFAULT_ENABLED=y\n# CONFIG_ARM64_SW_TTBR0_PAN is not set\nCONFIG_ARM64_TAGGED_ADDR_ABI=y\nCONFIG_COMPAT=y\nCONFIG_KUSER_HELPERS=y\n# CONFIG_COMPAT_ALIGNMENT_FIXUPS is not set\nCONFIG_ARMV8_DEPRECATED=y\nCONFIG_SWP_EMULATION=y\nCONFIG_CP15_BARRIER_EMULATION=y\nCONFIG_SETEND_EMULATION=y\n\n#\n# ARMv8.1 architectural features\n#\nCONFIG_ARM64_HW_AFDBM=y\nCONFIG_ARM64_PAN=y\nCONFIG_AS_HAS_LDAPR=y\nCONFIG_AS_HAS_LSE_ATOMICS=y\nCONFIG_ARM64_LSE_ATOMICS=y\nCONFIG_ARM64_USE_LSE_ATOMICS=y\n# end of ARMv8.1 architectural features\n\n#\n# ARMv8.2 architectural features\n#\nCONFIG_AS_HAS_ARMV8_2=y\nCONFIG_AS_HAS_SHA3=y\n# CONFIG_ARM64_PMEM is not set\nCONFIG_ARM64_RAS_EXTN=y\nCONFIG_ARM64_CNP=y\n# end of ARMv8.2 architectural features\n\n#\n# ARMv8.3 architectural features\n#\nCONFIG_ARM64_PTR_AUTH=y\nCONFIG_ARM64_PTR_AUTH_KERNEL=y\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET=y\nCONFIG_CC_HAS_SIGN_RETURN_ADDRESS=y\nCONFIG_AS_HAS_PAC=y\nCONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y\n# end of ARMv8.3 architectural features\n\n#\n# ARMv8.4 architectural features\n#\nCONFIG_ARM64_AMU_EXTN=y\nCONFIG_AS_HAS_ARMV8_4=y\nCONFIG_ARM64_TLB_RANGE=y\n# end of ARMv8.4 architectural features\n\n#\n# ARMv8.5 architectural features\n#\nCONFIG_AS_HAS_ARMV8_5=y\nCONFIG_ARM64_BTI=y\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI=y\nCONFIG_ARM64_E0PD=y\nCONFIG_ARM64_AS_HAS_MTE=y\nCONFIG_ARM64_MTE=y\n# end of ARMv8.5 architectural features\n\n#\n# ARMv8.7 architectural features\n#\nCONFIG_ARM64_EPAN=y\n# end of ARMv8.7 architectural features\n\nCONFIG_ARM64_SVE=y\nCONFIG_ARM64_SME=y\nCONFIG_ARM64_MODULE_PLTS=y\n# CONFIG_ARM64_PSEUDO_NMI is not set\nCONFIG_RELOCATABLE=y\n# CONFIG_RANDOMIZE_BASE is not set\nCONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y\nCONFIG_STACKPROTECTOR_PER_TASK=y\nCONFIG_ARCH_NR_GPIO=0\n# end of Kernel Features\n\n#\n# Boot options\n#\nCONFIG_CMDLINE=\"\"\nCONFIG_EFI_STUB=y\nCONFIG_EFI=y\nCONFIG_DMI=y\n# end of Boot options\n\n#\n# Power management options\n#\n# CONFIG_SUSPEND is not set\n# CONFIG_HIBERNATION is not set\nCONFIG_PM=y\n# CONFIG_PM_DEBUG is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\n# CONFIG_ENERGY_MODEL is not set\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\n# end of Power management options\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\n\n#\n# ARM CPU Idle Drivers\n#\n# CONFIG_ARM_PSCI_CPUIDLE is not set\n# end of ARM CPU Idle Drivers\n# end of CPU Idle\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=y\n# CONFIG_CPU_FREQ_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\nCONFIG_CPUFREQ_DT_PLATDEV=y\nCONFIG_ARM_BRCMSTB_AVS_CPUFREQ=y\nCONFIG_ARM_RASPBERRYPI_CPUFREQ=y\n# end of CPU Frequency scaling\n# end of CPU Power Management\n\nCONFIG_ARCH_SUPPORTS_ACPI=y\n# CONFIG_ACPI is not set\nCONFIG_HAVE_KVM=y\n# CONFIG_VIRTUALIZATION is not set\n\n#\n# General architecture-dependent options\n#\nCONFIG_ARCH_HAS_SUBPAGE_FAULTS=y\nCONFIG_KPROBES=y\nCONFIG_JUMP_LABEL=y\n# CONFIG_STATIC_KEYS_SELFTEST is not set\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_KRETPROBES=y\nCONFIG_HAVE_IOREMAP_PROT=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y\nCONFIG_HAVE_FUNCTION_ERROR_INJECTION=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_KEEPINITRD=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_ARCH_HAS_SET_DIRECT_MAP=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_WANTS_NO_INSTR=y\nCONFIG_HAVE_ASM_MODVERSIONS=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y\nCONFIG_MMU_GATHER_TABLE_FREE=y\nCONFIG_MMU_GATHER_RCU_TABLE_FREE=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_HAVE_ALIGNED_STRUCT_PAGE=y\nCONFIG_HAVE_CMPXCHG_LOCAL=y\nCONFIG_HAVE_CMPXCHG_DOUBLE=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_ARCH_STACKLEAK=y\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_ARCH_SUPPORTS_SHADOW_CALL_STACK=y\n# CONFIG_SHADOW_CALL_STACK is not set\nCONFIG_ARCH_SUPPORTS_LTO_CLANG=y\nCONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y\nCONFIG_LTO_NONE=y\nCONFIG_ARCH_SUPPORTS_CFI_CLANG=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOVE_PUD=y\nCONFIG_HAVE_MOVE_PMD=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_HAVE_ARCH_HUGE_VMAP=y\nCONFIG_HAVE_ARCH_HUGE_VMALLOC=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_ARCH_MMAP_RND_BITS=18\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=11\nCONFIG_PAGE_SIZE_LESS_THAN_64KB=y\nCONFIG_PAGE_SIZE_LESS_THAN_256KB=y\nCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y\nCONFIG_RANDOMIZE_KSTACK_OFFSET=y\n# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\nCONFIG_HAVE_ARCH_COMPILER_H=y\nCONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y\nCONFIG_ARCH_USE_MEMREMAP_PROT=y\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_HAS_RELR=y\nCONFIG_HAVE_PREEMPT_DYNAMIC=y\nCONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y\nCONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y\nCONFIG_ARCH_HAVE_TRACE_MMIO_ACCESS=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\nCONFIG_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/sbin/modprobe\"\n# CONFIG_TRIM_UNUSED_KSYMS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\nCONFIG_BLOCK_LEGACY_AUTOLOAD=y\nCONFIG_BLK_CGROUP_RWSTAT=y\nCONFIG_BLK_DEV_BSG_COMMON=y\nCONFIG_BLK_ICQ=y\nCONFIG_BLK_DEV_BSGLIB=y\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_DEV_ZONED is not set\nCONFIG_BLK_DEV_THROTTLING=y\n# CONFIG_BLK_DEV_THROTTLING_LOW is not set\n# CONFIG_BLK_WBT is not set\n# CONFIG_BLK_CGROUP_IOLATENCY is not set\n# CONFIG_BLK_CGROUP_IOCOST is not set\n# CONFIG_BLK_CGROUP_IOPRIO is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\nCONFIG_MAC_PARTITION=y\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\nCONFIG_LDM_PARTITION=y\n# CONFIG_LDM_DEBUG is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\n# CONFIG_CMDLINE_PARTITION is not set\n# end of Partition Types\n\nCONFIG_BLOCK_COMPAT=y\nCONFIG_BLK_MQ_PCI=y\nCONFIG_BLK_PM=y\nCONFIG_BLOCK_HOLDER_DEPRECATED=y\nCONFIG_BLK_MQ_STACKING=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\nCONFIG_IOSCHED_BFQ=y\n# CONFIG_BFQ_GROUP_IOSCHED is not set\n# end of IO Schedulers\n\nCONFIG_ASN1=y\nCONFIG_ARCH_INLINE_SPIN_TRYLOCK=y\nCONFIG_ARCH_INLINE_SPIN_TRYLOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_LOCK=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_INLINE_READ_LOCK=y\nCONFIG_ARCH_INLINE_READ_LOCK_BH=y\nCONFIG_ARCH_INLINE_READ_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_READ_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_READ_UNLOCK=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_INLINE_WRITE_LOCK=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_BH=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE=y\nCONFIG_INLINE_SPIN_TRYLOCK=y\nCONFIG_INLINE_SPIN_TRYLOCK_BH=y\nCONFIG_INLINE_SPIN_LOCK=y\nCONFIG_INLINE_SPIN_LOCK_BH=y\nCONFIG_INLINE_SPIN_LOCK_IRQ=y\nCONFIG_INLINE_SPIN_LOCK_IRQSAVE=y\nCONFIG_INLINE_SPIN_UNLOCK_BH=y\nCONFIG_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE=y\nCONFIG_INLINE_READ_LOCK=y\nCONFIG_INLINE_READ_LOCK_BH=y\nCONFIG_INLINE_READ_LOCK_IRQ=y\nCONFIG_INLINE_READ_LOCK_IRQSAVE=y\nCONFIG_INLINE_READ_UNLOCK=y\nCONFIG_INLINE_READ_UNLOCK_BH=y\nCONFIG_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_INLINE_READ_UNLOCK_IRQRESTORE=y\nCONFIG_INLINE_WRITE_LOCK=y\nCONFIG_INLINE_WRITE_LOCK_BH=y\nCONFIG_INLINE_WRITE_LOCK_IRQ=y\nCONFIG_INLINE_WRITE_LOCK_IRQSAVE=y\nCONFIG_INLINE_WRITE_UNLOCK=y\nCONFIG_INLINE_WRITE_UNLOCK_BH=y\nCONFIG_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_USE_QUEUED_SPINLOCKS=y\nCONFIG_QUEUED_SPINLOCKS=y\nCONFIG_ARCH_USE_QUEUED_RWLOCKS=y\nCONFIG_QUEUED_RWLOCKS=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_ARCH_HAS_SYSCALL_WRAPPER=y\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_ARCH_BINFMT_ELF_STATE=y\nCONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y\nCONFIG_ARCH_HAVE_ELF_PROT=y\nCONFIG_ARCH_USE_GNU_PROPERTY=y\nCONFIG_ELFCORE=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\nCONFIG_SWAP=y\n# CONFIG_ZSWAP is not set\n\n#\n# SLAB allocator options\n#\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# end of SLAB allocator options\n\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\n# CONFIG_COMPAT_BRK is not set\nCONFIG_SPARSEMEM=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_FAST_GUP=y\nCONFIG_ARCH_KEEP_MEMBLOCK=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y\n# CONFIG_MEMORY_HOTPLUG is not set\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y\nCONFIG_COMPACTION=y\nCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1\n# CONFIG_PAGE_REPORTING is not set\nCONFIG_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\nCONFIG_PHYS_ADDR_T_64BIT=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y\n# CONFIG_MEMORY_FAILURE is not set\nCONFIG_ARCH_WANTS_THP_SWAP=y\n# CONFIG_TRANSPARENT_HUGEPAGE is not set\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\nCONFIG_CMA_DEBUGFS=y\n# CONFIG_CMA_SYSFS is not set\nCONFIG_CMA_AREAS=7\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CACHE_LINE_SIZE=y\nCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y\nCONFIG_ARCH_HAS_PTE_DEVMAP=y\nCONFIG_ARCH_HAS_ZONE_DMA_SET=y\nCONFIG_ZONE_DMA=y\nCONFIG_ZONE_DMA32=y\nCONFIG_ARCH_USES_HIGH_VMA_FLAGS=y\nCONFIG_VM_EVENT_COUNTERS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\nCONFIG_ARCH_HAS_PTE_SPECIAL=y\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_USERFAULTFD is not set\n# CONFIG_LRU_GEN is not set\nCONFIG_LOCK_MM_AND_FIND_VMA=y\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_INTERFACE is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_XFRM_ESP=y\n# CONFIG_NET_KEY is not set\n# CONFIG_XDP_SOCKETS is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=m\nCONFIG_IP_MROUTE_COMMON=y\nCONFIG_IP_MROUTE=y\n# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set\n# CONFIG_IP_PIMSM_V1 is not set\n# CONFIG_IP_PIMSM_V2 is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=y\n# CONFIG_INET_ESP_OFFLOAD is not set\n# CONFIG_INET_ESPINTCP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=m\n# CONFIG_INET_DIAG is not set\nCONFIG_TCP_CONG_ADVANCED=y\n# CONFIG_TCP_CONG_BIC is not set\nCONFIG_TCP_CONG_CUBIC=y\n# CONFIG_TCP_CONG_WESTWOOD is not set\nCONFIG_TCP_CONG_HTCP=m\nCONFIG_TCP_CONG_HSTCP=m\n# CONFIG_TCP_CONG_HYBLA is not set\nCONFIG_TCP_CONG_VEGAS=m\n# CONFIG_TCP_CONG_NV is not set\nCONFIG_TCP_CONG_SCALABLE=m\n# CONFIG_TCP_CONG_LP is not set\nCONFIG_TCP_CONG_VENO=m\nCONFIG_TCP_CONG_YEAH=m\nCONFIG_TCP_CONG_ILLINOIS=m\n# CONFIG_TCP_CONG_DCTCP is not set\nCONFIG_TCP_CONG_CDG=m\n# CONFIG_TCP_CONG_BBR is not set\nCONFIG_DEFAULT_CUBIC=y\n# CONFIG_DEFAULT_RENO is not set\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_IPV6_VTI is not set\nCONFIG_IPV6_SIT=m\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\nCONFIG_IPV6_FOU=m\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_MPTCP is not set\n# CONFIG_NETWORK_SECMARK is not set\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\n# CONFIG_NETFILTER_INGRESS is not set\nCONFIG_NETFILTER_EGRESS=y\nCONFIG_NETFILTER_NETLINK=m\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\nCONFIG_NETFILTER_NETLINK_LOG=m\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\n# CONFIG_NF_LOG_SYSLOG is not set\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_ZONES is not set\n# CONFIG_NF_CONNTRACK_PROCFS is not set\n# CONFIG_NF_CONNTRACK_EVENTS is not set\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\n# CONFIG_NF_CT_PROTO_DCCP is not set\n# CONFIG_NF_CT_PROTO_SCTP is not set\n# CONFIG_NF_CT_PROTO_UDPLITE is not set\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\nCONFIG_NF_CONNTRACK_IRC=m\nCONFIG_NF_CONNTRACK_BROADCAST=m\nCONFIG_NF_CONNTRACK_NETBIOS_NS=m\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\nCONFIG_NF_CONNTRACK_SIP=m\nCONFIG_NF_CONNTRACK_TFTP=m\nCONFIG_NF_CT_NETLINK=m\n# CONFIG_NETFILTER_NETLINK_GLUE_CT is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_IRC=m\nCONFIG_NF_NAT_SIP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=y\nCONFIG_NF_NAT_MASQUERADE=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\nCONFIG_NETFILTER_XTABLES_COMPAT=y\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\nCONFIG_NETFILTER_XT_MATCH_IPRANGE=m\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\nCONFIG_NETFILTER_XT_MATCH_OWNER=m\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\nCONFIG_NETFILTER_XT_MATCH_STATE=m\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\nCONFIG_IP_VS=m\n# CONFIG_IP_VS_IPV6 is not set\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_MH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n# CONFIG_IP_VS_TWOS is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS MH scheduler\n#\nCONFIG_IP_VS_MH_TAB_INDEX=12\n\n#\n# IPVS application helper\n#\n# CONFIG_IP_VS_FTP is not set\nCONFIG_IP_VS_NFCT=y\n# CONFIG_IP_VS_PE_SIP is not set\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\n# CONFIG_NF_LOG_IPV6 is not set\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_MATCH_SRH is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\nCONFIG_NET_SCH_FQ_CODEL=y\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_FLOW is not set\nCONFIG_NET_CLS_CGROUP=m\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\nCONFIG_NET_L3_MASTER_DEV=y\n# CONFIG_QRTR is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_PCPU_DEV_REFCNT=y\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_SOCK_RX_QUEUE_MAPPING=y\nCONFIG_XPS=y\nCONFIG_CGROUP_NET_PRIO=y\nCONFIG_CGROUP_NET_CLASSID=y\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\nCONFIG_BT_RFCOMM_TTY=y\n# CONFIG_BT_BNEP is not set\nCONFIG_BT_HIDP=m\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_LEDS is not set\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\n# CONFIG_BT_DEBUGFS is not set\n# CONFIG_BT_SELFTEST is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_MTK=m\nCONFIG_BT_HCIBTUSB=m\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\nCONFIG_BT_HCIBTUSB_MTK=y\nCONFIG_BT_HCIBTUSB_RTL=y\n# CONFIG_BT_HCIBTSDIO is not set\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_SERDEV=y\nCONFIG_BT_HCIUART_H4=y\n# CONFIG_BT_HCIUART_NOKIA is not set\n# CONFIG_BT_HCIUART_BCSP is not set\n# CONFIG_BT_HCIUART_ATH3K is not set\n# CONFIG_BT_HCIUART_LL is not set\nCONFIG_BT_HCIUART_3WIRE=y\n# CONFIG_BT_HCIUART_INTEL is not set\nCONFIG_BT_HCIUART_BCM=y\n# CONFIG_BT_HCIUART_RTL is not set\n# CONFIG_BT_HCIUART_QCA is not set\n# CONFIG_BT_HCIUART_AG6XX is not set\n# CONFIG_BT_HCIUART_MRVL is not set\nCONFIG_BT_HCIBCM203X=m\n# CONFIG_BT_HCIBPA10X is not set\nCONFIG_BT_HCIBFUSB=m\n# CONFIG_BT_HCIVHCI is not set\n# CONFIG_BT_MRVL is not set\nCONFIG_BT_ATH3K=m\n# CONFIG_BT_MTKSDIO is not set\n# CONFIG_BT_MTKUART is not set\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=m\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\n# CONFIG_CFG80211_CRDA_SUPPORT is not set\nCONFIG_CFG80211_WEXT=y\nCONFIG_LIB80211=m\nCONFIG_LIB80211_CRYPT_WEP=m\nCONFIG_LIB80211_CRYPT_CCMP=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=m\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=m\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_PAGE_POOL=y\n# CONFIG_PAGE_POOL_STATS is not set\n# CONFIG_FAILOVER is not set\nCONFIG_ETHTOOL_NETLINK=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\nCONFIG_HAVE_PCI=y\nCONFIG_PCI=y\nCONFIG_PCI_DOMAINS=y\nCONFIG_PCI_DOMAINS_GENERIC=y\nCONFIG_PCI_SYSCALL=y\nCONFIG_PCIEPORTBUS=y\nCONFIG_PCIEAER=y\n# CONFIG_PCIEAER_INJECT is not set\n# CONFIG_PCIE_ECRC is not set\nCONFIG_PCIEASPM=y\n# CONFIG_PCIEASPM_DEFAULT is not set\nCONFIG_PCIEASPM_POWERSAVE=y\n# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set\n# CONFIG_PCIEASPM_PERFORMANCE is not set\nCONFIG_PCIE_PME=y\nCONFIG_PCIE_DPC=y\n# CONFIG_PCIE_PTM is not set\nCONFIG_PCI_MSI=y\nCONFIG_PCI_MSI_IRQ_DOMAIN=y\nCONFIG_PCI_QUIRKS=y\n# CONFIG_PCI_DEBUG is not set\n# CONFIG_PCI_STUB is not set\n# CONFIG_PCI_IOV is not set\n# CONFIG_PCI_PRI is not set\n# CONFIG_PCI_PASID is not set\nCONFIG_PCI_LABEL=y\n# CONFIG_PCIE_BUS_TUNE_OFF is not set\nCONFIG_PCIE_BUS_DEFAULT=y\n# CONFIG_PCIE_BUS_SAFE is not set\n# CONFIG_PCIE_BUS_PERFORMANCE is not set\n# CONFIG_PCIE_BUS_PEER2PEER is not set\nCONFIG_VGA_ARB=y\nCONFIG_VGA_ARB_MAX_GPUS=16\n# CONFIG_HOTPLUG_PCI is not set\n\n#\n# PCI controller drivers\n#\n# CONFIG_PCI_FTPCI100 is not set\n# CONFIG_PCI_HOST_GENERIC is not set\n# CONFIG_PCIE_XILINX is not set\n# CONFIG_PCI_XGENE is not set\n# CONFIG_PCIE_ALTERA is not set\n# CONFIG_PCI_HOST_THUNDER_PEM is not set\n# CONFIG_PCI_HOST_THUNDER_ECAM is not set\nCONFIG_PCIE_BRCMSTB=y\n# CONFIG_PCIE_MICROCHIP_HOST is not set\n\n#\n# DesignWare PCI Core Support\n#\n# CONFIG_PCIE_DW_PLAT_HOST is not set\n# CONFIG_PCI_HISI is not set\n# CONFIG_PCIE_KIRIN is not set\n# CONFIG_PCI_MESON is not set\n# CONFIG_PCIE_AL is not set\n# end of DesignWare PCI Core Support\n\n#\n# Mobiveil PCIe Core Support\n#\n# end of Mobiveil PCIe Core Support\n\n#\n# Cadence PCIe controllers support\n#\n# CONFIG_PCIE_CADENCE_PLAT_HOST is not set\n# CONFIG_PCI_J721E_HOST is not set\n# end of Cadence PCIe controllers support\n# end of PCI controller drivers\n\n#\n# PCI Endpoint\n#\n# CONFIG_PCI_ENDPOINT is not set\n# end of PCI Endpoint\n\n#\n# PCI switch controller drivers\n#\n# CONFIG_PCI_SW_SWITCHTEC is not set\n# end of PCI switch controller drivers\n\n# CONFIG_CXL_BUS is not set\n# CONFIG_PCCARD is not set\n# CONFIG_RAPIDIO is not set\n\n#\n# Generic Driver Options\n#\n# CONFIG_UEVENT_HELPER is not set\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\n# CONFIG_DEVTMPFS_SAFE is not set\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\n# CONFIG_FW_UPLOAD is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\n# CONFIG_ALLOW_DEV_COREDUMP is not set\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_SOC_BUS=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_MOXTET is not set\n# CONFIG_VEXPRESS_CONFIG is not set\n# CONFIG_MHI_BUS is not set\n# CONFIG_MHI_BUS_EP is not set\n# end of Bus devices\n\n# CONFIG_CONNECTOR is not set\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\n# CONFIG_ARM_SCMI_PROTOCOL is not set\n# end of ARM System Control and Management Interface Protocol\n\n# CONFIG_ARM_SCPI_PROTOCOL is not set\n# CONFIG_FIRMWARE_MEMMAP is not set\nCONFIG_DMIID=y\n# CONFIG_DMI_SYSFS is not set\nCONFIG_RASPBERRYPI_FIRMWARE=y\n# CONFIG_FW_CFG_SYSFS is not set\n# CONFIG_SYSFB_SIMPLEFB is not set\n# CONFIG_ARM_FFA_TRANSPORT is not set\nCONFIG_CS_DSP=m\n# CONFIG_GOOGLE_FIRMWARE is not set\n\n#\n# EFI (Extensible Firmware Interface) Support\n#\nCONFIG_EFI_ESRT=y\n# CONFIG_EFI_VARS_PSTORE is not set\nCONFIG_EFI_PARAMS_FROM_FDT=y\nCONFIG_EFI_RUNTIME_WRAPPERS=y\nCONFIG_EFI_GENERIC_STUB=y\n# CONFIG_EFI_ZBOOT is not set\nCONFIG_EFI_ARMSTUB_DTB_LOADER=y\nCONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y\n# CONFIG_EFI_BOOTLOADER_CONTROL is not set\n# CONFIG_EFI_CAPSULE_LOADER is not set\n# CONFIG_EFI_TEST is not set\n# CONFIG_RESET_ATTACK_MITIGATION is not set\n# CONFIG_EFI_DISABLE_PCI_DMA is not set\nCONFIG_EFI_EARLYCON=y\n# CONFIG_EFI_DISABLE_RUNTIME is not set\n# CONFIG_EFI_COCO_SECRET is not set\n# end of EFI (Extensible Firmware Interface) Support\n\nCONFIG_ARM_PSCI_FW=y\nCONFIG_HAVE_ARM_SMCCC=y\nCONFIG_HAVE_ARM_SMCCC_DISCOVERY=y\nCONFIG_ARM_SMCCC_SOC_ID=y\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\n# CONFIG_MTD is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_DYNAMIC=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\nCONFIG_OF_RESOLVE=y\nCONFIG_OF_OVERLAY=y\nCONFIG_OF_CONFIGFS=y\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_CDROM=y\n# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set\n# CONFIG_ZRAM is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=0\n# CONFIG_BLK_DEV_DRBD is not set\nCONFIG_BLK_DEV_NBD=y\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=16\nCONFIG_BLK_DEV_RAM_SIZE=4096\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_UBLK is not set\n\n#\n# NVME Support\n#\nCONFIG_NVME_CORE=y\nCONFIG_BLK_DEV_NVME=y\n# CONFIG_NVME_MULTIPATH is not set\n# CONFIG_NVME_VERBOSE_ERRORS is not set\n# CONFIG_NVME_HWMON is not set\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TCP is not set\n# CONFIG_NVME_AUTH is not set\n# CONFIG_NVME_TARGET is not set\n# end of NVME Support\n\n#\n# Misc devices\n#\nCONFIG_BCM2835_SMI=m\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_PHANTOM is not set\n# CONFIG_TIFM_CORE is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_HP_ILO is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\n# CONFIG_SRAM is not set\n# CONFIG_DW_XDATA_PCIE is not set\n# CONFIG_PCI_ENDPOINT_TEST is not set\n# CONFIG_XILINX_SDFEC is not set\nCONFIG_MISC_RTSX=y\n# CONFIG_HISI_HIKEY_USB is not set\n# CONFIG_OPEN_DICE is not set\n# CONFIG_VCPU_STALL_DETECTOR is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\n# CONFIG_EEPROM_AT25 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_EEPROM_EE1004 is not set\n# end of EEPROM support\n\n# CONFIG_CB710_CORE is not set\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n# CONFIG_VMWARE_VMCI is not set\n# CONFIG_GENWQE is not set\n# CONFIG_ECHO is not set\n# CONFIG_BCM_VK is not set\n# CONFIG_MISC_ALCOR_PCI is not set\n# CONFIG_MISC_RTSX_PCI is not set\nCONFIG_MISC_RTSX_USB=y\n# CONFIG_HABANA_AI is not set\n# CONFIG_UACCE is not set\n# CONFIG_PVPANIC is not set\n# CONFIG_GP_PCI1XXXX is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_PROC_FS is not set\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_CHR_DEV_SG=m\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\n# CONFIG_SCSI_SCAN_ASYNC is not set\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\nCONFIG_SCSI_ISCSI_ATTRS=y\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\nCONFIG_SCSI_LOWLEVEL=y\nCONFIG_ISCSI_TCP=y\nCONFIG_ISCSI_BOOT_SYSFS=y\n# CONFIG_SCSI_CXGB3_ISCSI is not set\n# CONFIG_SCSI_CXGB4_ISCSI is not set\n# CONFIG_SCSI_BNX2_ISCSI is not set\n# CONFIG_BE2ISCSI is not set\n# CONFIG_BLK_DEV_3W_XXXX_RAID is not set\n# CONFIG_SCSI_HPSA is not set\n# CONFIG_SCSI_3W_9XXX is not set\n# CONFIG_SCSI_3W_SAS is not set\n# CONFIG_SCSI_ACARD is not set\n# CONFIG_SCSI_AACRAID is not set\n# CONFIG_SCSI_AIC7XXX is not set\n# CONFIG_SCSI_AIC79XX is not set\n# CONFIG_SCSI_AIC94XX is not set\n# CONFIG_SCSI_MVSAS is not set\n# CONFIG_SCSI_MVUMI is not set\n# CONFIG_SCSI_ADVANSYS is not set\n# CONFIG_SCSI_ARCMSR is not set\n# CONFIG_SCSI_ESAS2R is not set\n# CONFIG_MEGARAID_NEWGEN is not set\n# CONFIG_MEGARAID_LEGACY is not set\n# CONFIG_MEGARAID_SAS is not set\n# CONFIG_SCSI_MPT3SAS is not set\n# CONFIG_SCSI_MPT2SAS is not set\n# CONFIG_SCSI_MPI3MR is not set\n# CONFIG_SCSI_SMARTPQI is not set\n# CONFIG_SCSI_HPTIOP is not set\n# CONFIG_SCSI_BUSLOGIC is not set\n# CONFIG_SCSI_MYRB is not set\n# CONFIG_SCSI_MYRS is not set\n# CONFIG_SCSI_SNIC is not set\n# CONFIG_SCSI_DMX3191D is not set\n# CONFIG_SCSI_FDOMAIN_PCI is not set\n# CONFIG_SCSI_IPS is not set\n# CONFIG_SCSI_INITIO is not set\n# CONFIG_SCSI_INIA100 is not set\n# CONFIG_SCSI_STEX is not set\n# CONFIG_SCSI_SYM53C8XX_2 is not set\n# CONFIG_SCSI_QLOGIC_1280 is not set\n# CONFIG_SCSI_QLA_ISCSI is not set\n# CONFIG_SCSI_DC395x is not set\n# CONFIG_SCSI_AM53C974 is not set\n# CONFIG_SCSI_WD719X is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_PMCRAID is not set\n# CONFIG_SCSI_PM8001 is not set\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\n# CONFIG_ATA is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\n# CONFIG_DM_DEBUG is not set\nCONFIG_DM_BUFIO=m\n# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\n# CONFIG_DM_UNSTRIPED is not set\n# CONFIG_DM_CRYPT is not set\n# CONFIG_DM_SNAPSHOT is not set\nCONFIG_DM_THIN_PROVISIONING=m\n# CONFIG_DM_CACHE is not set\n# CONFIG_DM_WRITECACHE is not set\n# CONFIG_DM_EBS is not set\n# CONFIG_DM_ERA is not set\n# CONFIG_DM_CLONE is not set\n# CONFIG_DM_MIRROR is not set\n# CONFIG_DM_RAID is not set\n# CONFIG_DM_ZERO is not set\n# CONFIG_DM_MULTIPATH is not set\n# CONFIG_DM_DELAY is not set\n# CONFIG_DM_DUST is not set\n# CONFIG_DM_UEVENT is not set\n# CONFIG_DM_FLAKEY is not set\n# CONFIG_DM_VERITY is not set\n# CONFIG_DM_SWITCH is not set\n# CONFIG_DM_LOG_WRITES is not set\n# CONFIG_DM_INTEGRITY is not set\n# CONFIG_TARGET_CORE is not set\n# CONFIG_FUSION is not set\n\n#\n# IEEE 1394 (FireWire) support\n#\n# CONFIG_FIREWIRE is not set\n# CONFIG_FIREWIRE_NOSY is not set\n# end of IEEE 1394 (FireWire) support\n\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\nCONFIG_DUMMY=m\nCONFIG_WIREGUARD=m\n# CONFIG_WIREGUARD_DEBUG is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_FC is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\n# CONFIG_MACVTAP is not set\nCONFIG_IPVLAN_L3S=y\nCONFIG_IPVLAN=m\n# CONFIG_IPVTAP is not set\nCONFIG_VXLAN=m\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_AMT is not set\n# CONFIG_MACSEC is not set\nCONFIG_NETCONSOLE=y\nCONFIG_NETCONSOLE_DYNAMIC=y\nCONFIG_NETPOLL=y\nCONFIG_NET_POLL_CONTROLLER=y\nCONFIG_TUN=y\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\nCONFIG_NLMON=m\n# CONFIG_ARCNET is not set\nCONFIG_ETHERNET=y\nCONFIG_NET_VENDOR_3COM=y\n# CONFIG_VORTEX is not set\n# CONFIG_TYPHOON is not set\nCONFIG_NET_VENDOR_ADAPTEC=y\n# CONFIG_ADAPTEC_STARFIRE is not set\nCONFIG_NET_VENDOR_AGERE=y\n# CONFIG_ET131X is not set\nCONFIG_NET_VENDOR_ALACRITECH=y\n# CONFIG_SLICOSS is not set\nCONFIG_NET_VENDOR_ALTEON=y\n# CONFIG_ACENIC is not set\n# CONFIG_ALTERA_TSE is not set\nCONFIG_NET_VENDOR_AMAZON=y\n# CONFIG_ENA_ETHERNET is not set\nCONFIG_NET_VENDOR_AMD=y\n# CONFIG_AMD8111_ETH is not set\n# CONFIG_PCNET32 is not set\n# CONFIG_AMD_XGBE is not set\nCONFIG_NET_VENDOR_AQUANTIA=y\n# CONFIG_AQTION is not set\nCONFIG_NET_VENDOR_ARC=y\nCONFIG_NET_VENDOR_ASIX=y\n# CONFIG_SPI_AX88796C is not set\nCONFIG_NET_VENDOR_ATHEROS=y\n# CONFIG_ATL2 is not set\n# CONFIG_ATL1 is not set\n# CONFIG_ATL1E is not set\n# CONFIG_ATL1C is not set\n# CONFIG_ALX is not set\nCONFIG_NET_VENDOR_BROADCOM=y\n# CONFIG_B44 is not set\nCONFIG_BCMGENET=y\n# CONFIG_BNX2 is not set\n# CONFIG_CNIC is not set\n# CONFIG_TIGON3 is not set\n# CONFIG_BNX2X is not set\n# CONFIG_SYSTEMPORT is not set\n# CONFIG_BNXT is not set\nCONFIG_NET_VENDOR_CADENCE=y\nCONFIG_MACB=y\n# CONFIG_MACB_PCI is not set\nCONFIG_NET_VENDOR_CAVIUM=y\n# CONFIG_THUNDER_NIC_PF is not set\n# CONFIG_THUNDER_NIC_VF is not set\n# CONFIG_THUNDER_NIC_BGX is not set\n# CONFIG_THUNDER_NIC_RGX is not set\n# CONFIG_LIQUIDIO is not set\n# CONFIG_LIQUIDIO_VF is not set\nCONFIG_NET_VENDOR_CHELSIO=y\n# CONFIG_CHELSIO_T1 is not set\n# CONFIG_CHELSIO_T3 is not set\n# CONFIG_CHELSIO_T4 is not set\n# CONFIG_CHELSIO_T4VF is not set\nCONFIG_NET_VENDOR_CISCO=y\n# CONFIG_ENIC is not set\nCONFIG_NET_VENDOR_CORTINA=y\n# CONFIG_GEMINI_ETHERNET is not set\nCONFIG_NET_VENDOR_DAVICOM=y\n# CONFIG_DM9051 is not set\n# CONFIG_DNET is not set\nCONFIG_NET_VENDOR_DEC=y\n# CONFIG_NET_TULIP is not set\nCONFIG_NET_VENDOR_DLINK=y\n# CONFIG_DL2K is not set\n# CONFIG_SUNDANCE is not set\nCONFIG_NET_VENDOR_EMULEX=y\n# CONFIG_BE2NET is not set\nCONFIG_NET_VENDOR_ENGLEDER=y\n# CONFIG_TSNEP is not set\nCONFIG_NET_VENDOR_EZCHIP=y\n# CONFIG_EZCHIP_NPS_MANAGEMENT_ENET is not set\nCONFIG_NET_VENDOR_FUNGIBLE=y\n# CONFIG_FUN_ETH is not set\nCONFIG_NET_VENDOR_GOOGLE=y\n# CONFIG_GVE is not set\nCONFIG_NET_VENDOR_HISILICON=y\n# CONFIG_HIX5HD2_GMAC is not set\n# CONFIG_HISI_FEMAC is not set\n# CONFIG_HIP04_ETH is not set\n# CONFIG_HNS_DSAF is not set\n# CONFIG_HNS_ENET is not set\n# CONFIG_HNS3 is not set\nCONFIG_NET_VENDOR_HUAWEI=y\n# CONFIG_HINIC is not set\nCONFIG_NET_VENDOR_I825XX=y\nCONFIG_NET_VENDOR_INTEL=y\n# CONFIG_E100 is not set\n# CONFIG_E1000 is not set\n# CONFIG_E1000E is not set\n# CONFIG_IGB is not set\n# CONFIG_IGBVF is not set\n# CONFIG_IXGB is not set\n# CONFIG_IXGBE is not set\n# CONFIG_IXGBEVF is not set\n# CONFIG_I40E is not set\n# CONFIG_I40EVF is not set\n# CONFIG_ICE is not set\n# CONFIG_FM10K is not set\n# CONFIG_IGC is not set\nCONFIG_NET_VENDOR_WANGXUN=y\n# CONFIG_NGBE is not set\n# CONFIG_TXGBE is not set\n# CONFIG_JME is not set\nCONFIG_NET_VENDOR_ADI=y\nCONFIG_NET_VENDOR_LITEX=y\n# CONFIG_LITEX_LITEETH is not set\nCONFIG_NET_VENDOR_MARVELL=y\n# CONFIG_MVMDIO is not set\n# CONFIG_SKGE is not set\n# CONFIG_SKY2 is not set\n# CONFIG_OCTEONTX2_AF is not set\n# CONFIG_OCTEONTX2_PF is not set\n# CONFIG_OCTEON_EP is not set\nCONFIG_NET_VENDOR_MELLANOX=y\n# CONFIG_MLX4_EN is not set\n# CONFIG_MLX5_CORE is not set\n# CONFIG_MLXSW_CORE is not set\n# CONFIG_MLXFW is not set\nCONFIG_NET_VENDOR_MICREL=y\n# CONFIG_KS8842 is not set\n# CONFIG_KS8851 is not set\n# CONFIG_KS8851_MLL is not set\n# CONFIG_KSZ884X_PCI is not set\nCONFIG_NET_VENDOR_MICROCHIP=y\n# CONFIG_ENC28J60 is not set\n# CONFIG_ENCX24J600 is not set\n# CONFIG_LAN743X is not set\nCONFIG_NET_VENDOR_MICROSEMI=y\nCONFIG_NET_VENDOR_MICROSOFT=y\nCONFIG_NET_VENDOR_MYRI=y\n# CONFIG_MYRI10GE is not set\n# CONFIG_FEALNX is not set\nCONFIG_NET_VENDOR_NI=y\n# CONFIG_NI_XGE_MANAGEMENT_ENET is not set\nCONFIG_NET_VENDOR_NATSEMI=y\n# CONFIG_NATSEMI is not set\n# CONFIG_NS83820 is not set\nCONFIG_NET_VENDOR_NETERION=y\n# CONFIG_S2IO is not set\nCONFIG_NET_VENDOR_NETRONOME=y\n# CONFIG_NFP is not set\nCONFIG_NET_VENDOR_8390=y\n# CONFIG_NE2K_PCI is not set\nCONFIG_NET_VENDOR_NVIDIA=y\n# CONFIG_FORCEDETH is not set\nCONFIG_NET_VENDOR_OKI=y\n# CONFIG_ETHOC is not set\nCONFIG_NET_VENDOR_PACKET_ENGINES=y\n# CONFIG_HAMACHI is not set\n# CONFIG_YELLOWFIN is not set\n# CONFIG_NET_VENDOR_PENSANDO is not set\nCONFIG_NET_VENDOR_QLOGIC=y\n# CONFIG_QLA3XXX is not set\n# CONFIG_QLCNIC is not set\n# CONFIG_NETXEN_NIC is not set\n# CONFIG_QED is not set\nCONFIG_NET_VENDOR_BROCADE=y\n# CONFIG_BNA is not set\nCONFIG_NET_VENDOR_QUALCOMM=y\n# CONFIG_QCA7000_SPI is not set\n# CONFIG_QCA7000_UART is not set\n# CONFIG_QCOM_EMAC is not set\n# CONFIG_RMNET is not set\nCONFIG_NET_VENDOR_RDC=y\n# CONFIG_R6040 is not set\nCONFIG_NET_VENDOR_REALTEK=y\n# CONFIG_8139CP is not set\n# CONFIG_8139TOO is not set\n# CONFIG_R8169 is not set\nCONFIG_NET_VENDOR_RENESAS=y\nCONFIG_NET_VENDOR_ROCKER=y\nCONFIG_NET_VENDOR_SAMSUNG=y\n# CONFIG_SXGBE_ETH is not set\nCONFIG_NET_VENDOR_SEEQ=y\nCONFIG_NET_VENDOR_SILAN=y\n# CONFIG_SC92031 is not set\nCONFIG_NET_VENDOR_SIS=y\n# CONFIG_SIS900 is not set\n# CONFIG_SIS190 is not set\nCONFIG_NET_VENDOR_SOLARFLARE=y\n# CONFIG_SFC is not set\n# CONFIG_SFC_FALCON is not set\nCONFIG_NET_VENDOR_SMSC=y\n# CONFIG_SMC91X is not set\n# CONFIG_EPIC100 is not set\n# CONFIG_SMSC911X is not set\n# CONFIG_SMSC9420 is not set\nCONFIG_NET_VENDOR_SOCIONEXT=y\nCONFIG_NET_VENDOR_STMICRO=y\n# CONFIG_STMMAC_ETH is not set\nCONFIG_NET_VENDOR_SUN=y\n# CONFIG_HAPPYMEAL is not set\n# CONFIG_SUNGEM is not set\n# CONFIG_CASSINI is not set\n# CONFIG_NIU is not set\nCONFIG_NET_VENDOR_SYNOPSYS=y\n# CONFIG_DWC_XLGMAC is not set\nCONFIG_NET_VENDOR_TEHUTI=y\n# CONFIG_TEHUTI is not set\nCONFIG_NET_VENDOR_TI=y\n# CONFIG_TI_CPSW_PHY_SEL is not set\n# CONFIG_TLAN is not set\nCONFIG_NET_VENDOR_VERTEXCOM=y\n# CONFIG_MSE102X is not set\nCONFIG_NET_VENDOR_VIA=y\n# CONFIG_VIA_RHINE is not set\n# CONFIG_VIA_VELOCITY is not set\nCONFIG_NET_VENDOR_WIZNET=y\n# CONFIG_WIZNET_W5100 is not set\n# CONFIG_WIZNET_W5300 is not set\nCONFIG_NET_VENDOR_XILINX=y\n# CONFIG_XILINX_EMACLITE is not set\n# CONFIG_XILINX_AXI_EMAC is not set\n# CONFIG_XILINX_LL_TEMAC is not set\n# CONFIG_FDDI is not set\n# CONFIG_HIPPI is not set\nCONFIG_PHYLINK=y\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_ADIN_PHY is not set\n# CONFIG_ADIN1100_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=m\nCONFIG_BROADCOM_PHY=y\n# CONFIG_BCM54140_PHY is not set\nCONFIG_BCM7XXX_PHY=y\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\nCONFIG_BCM_NET_PHYLIB=y\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MARVELL_88X2222_PHY is not set\n# CONFIG_MAXLINEAR_GPHY is not set\n# CONFIG_MEDIATEK_GE_PHY is not set\nCONFIG_MICREL_PHY=y\nCONFIG_MICROCHIP_PHY=y\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_MOTORCOMM_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_NXP_TJA11XX_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_QSEMI_PHY is not set\n# CONFIG_REALTEK_PHY is not set\n# CONFIG_RENESAS_PHY is not set\n# CONFIG_ROCKCHIP_PHY is not set\nCONFIG_SMSC_PHY=y\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_DP83TD510_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\n# CONFIG_PSE_CONTROLLER is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_OF_MDIO=y\nCONFIG_MDIO_DEVRES=y\n# CONFIG_MDIO_BITBANG is not set\nCONFIG_MDIO_BCM_UNIMAC=y\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_OCTEON is not set\n# CONFIG_MDIO_IPQ4019 is not set\n# CONFIG_MDIO_IPQ8064 is not set\n# CONFIG_MDIO_THUNDER is not set\n\n#\n# MDIO Multiplexers\n#\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n\n#\n# PCS device drivers\n#\n# end of PCS device drivers\n\nCONFIG_PPP=m\nCONFIG_PPP_BSDCOMP=m\nCONFIG_PPP_DEFLATE=m\n# CONFIG_PPP_FILTER is not set\nCONFIG_PPP_MPPE=m\n# CONFIG_PPP_MULTILINK is not set\nCONFIG_PPPOE=m\nCONFIG_PPP_ASYNC=m\n# CONFIG_PPP_SYNC_TTY is not set\n# CONFIG_SLIP is not set\nCONFIG_SLHC=m\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\n# CONFIG_USB_PEGASUS is not set\n# CONFIG_USB_RTL8150 is not set\nCONFIG_USB_RTL8152=m\nCONFIG_USB_LAN78XX=y\nCONFIG_USB_USBNET=y\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\n# CONFIG_USB_NET_CDC_EEM is not set\n# CONFIG_USB_NET_CDC_NCM is not set\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\nCONFIG_USB_NET_DM9601=y\n# CONFIG_USB_NET_SR9700 is not set\n# CONFIG_USB_NET_SR9800 is not set\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=y\n# CONFIG_USB_NET_GL620A is not set\n# CONFIG_USB_NET_NET1080 is not set\n# CONFIG_USB_NET_PLUSB is not set\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\n# CONFIG_USB_NET_CDC_SUBSET is not set\n# CONFIG_USB_NET_ZAURUS is not set\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\nCONFIG_USB_HSO=m\n# CONFIG_USB_NET_INT51X1 is not set\nCONFIG_USB_IPHETH=m\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\n# CONFIG_USB_NET_AQC111 is not set\nCONFIG_USB_RTL8153_ECM=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\n# CONFIG_ADM8211 is not set\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\n# CONFIG_ATH5K is not set\n# CONFIG_ATH5K_PCI is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\nCONFIG_ATH9K=m\nCONFIG_ATH9K_PCI=y\nCONFIG_ATH9K_AHB=y\n# CONFIG_ATH9K_DEBUGFS is not set\n# CONFIG_ATH9K_DYNACK is not set\n# CONFIG_ATH9K_WOW is not set\nCONFIG_ATH9K_RFKILL=y\nCONFIG_ATH9K_CHANNEL_CONTEXT=y\nCONFIG_ATH9K_PCOEM=y\n# CONFIG_ATH9K_PCI_NO_EEPROM is not set\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\nCONFIG_ATH9K_HWRNG=y\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\nCONFIG_CARL9170_HWRNG=y\nCONFIG_ATH6KL=m\n# CONFIG_ATH6KL_SDIO is not set\nCONFIG_ATH6KL_USB=m\n# CONFIG_ATH6KL_DEBUG is not set\n# CONFIG_ATH6KL_TRACING is not set\nCONFIG_AR5523=m\n# CONFIG_WIL6210 is not set\n# CONFIG_ATH10K is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\n# CONFIG_ATMEL is not set\n# CONFIG_AT76C50X_USB is not set\nCONFIG_WLAN_VENDOR_BROADCOM=y\nCONFIG_B43=m\nCONFIG_B43_BCMA=y\nCONFIG_B43_SSB=y\nCONFIG_B43_BUSES_BCMA_AND_SSB=y\n# CONFIG_B43_BUSES_BCMA is not set\n# CONFIG_B43_BUSES_SSB is not set\nCONFIG_B43_PCI_AUTOSELECT=y\nCONFIG_B43_PCICORE_AUTOSELECT=y\n# CONFIG_B43_SDIO is not set\nCONFIG_B43_BCMA_PIO=y\nCONFIG_B43_PIO=y\nCONFIG_B43_PHY_G=y\nCONFIG_B43_PHY_N=y\nCONFIG_B43_PHY_LP=y\nCONFIG_B43_PHY_HT=y\nCONFIG_B43_LEDS=y\nCONFIG_B43_HWRNG=y\n# CONFIG_B43_DEBUG is not set\n# CONFIG_B43LEGACY is not set\nCONFIG_BRCMUTIL=m\n# CONFIG_BRCMSMAC is not set\nCONFIG_BRCMFMAC=m\nCONFIG_BRCMFMAC_PROTO_BCDC=y\nCONFIG_BRCMFMAC_SDIO=y\nCONFIG_BRCMFMAC_USB=y\n# CONFIG_BRCMFMAC_PCIE is not set\n# CONFIG_BRCM_TRACING is not set\nCONFIG_BRCMDBG=y\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\n# CONFIG_IPW2100 is not set\n# CONFIG_IPW2200 is not set\n# CONFIG_IWL4965 is not set\n# CONFIG_IWL3945 is not set\n# CONFIG_IWLWIFI is not set\nCONFIG_WLAN_VENDOR_INTERSIL=y\n# CONFIG_HOSTAP is not set\n# CONFIG_HERMES is not set\nCONFIG_P54_COMMON=m\nCONFIG_P54_USB=m\n# CONFIG_P54_PCI is not set\n# CONFIG_P54_SPI is not set\nCONFIG_P54_LEDS=y\nCONFIG_WLAN_VENDOR_MARVELL=y\n# CONFIG_LIBERTAS is not set\n# CONFIG_LIBERTAS_THINFIRM is not set\n# CONFIG_MWIFIEX is not set\n# CONFIG_MWL8K is not set\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_MT76_CORE=m\nCONFIG_MT76_LEDS=y\nCONFIG_MT76_USB=m\nCONFIG_MT76x02_LIB=m\nCONFIG_MT76x02_USB=m\nCONFIG_MT76_CONNAC_LIB=m\nCONFIG_MT76x0_COMMON=m\nCONFIG_MT76x0U=m\n# CONFIG_MT76x0E is not set\nCONFIG_MT76x2_COMMON=m\n# CONFIG_MT76x2E is not set\nCONFIG_MT76x2U=m\n# CONFIG_MT7603E is not set\nCONFIG_MT7615_COMMON=m\n# CONFIG_MT7615E is not set\nCONFIG_MT7663_USB_SDIO_COMMON=m\nCONFIG_MT7663U=m\n# CONFIG_MT7663S is not set\n# CONFIG_MT7915E is not set\n# CONFIG_MT7921E is not set\n# CONFIG_MT7921S is not set\n# CONFIG_MT7921U is not set\nCONFIG_WLAN_VENDOR_MICROCHIP=y\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\nCONFIG_WLAN_VENDOR_PURELIFI=y\n# CONFIG_PLFXLC is not set\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\n# CONFIG_RT2400PCI is not set\n# CONFIG_RT2500PCI is not set\n# CONFIG_RT61PCI is not set\n# CONFIG_RT2800PCI is not set\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\n# CONFIG_RTL8180 is not set\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=m\n# CONFIG_RTL8192CE is not set\n# CONFIG_RTL8192SE is not set\n# CONFIG_RTL8192DE is not set\n# CONFIG_RTL8723AE is not set\n# CONFIG_RTL8723BE is not set\n# CONFIG_RTL8188EE is not set\n# CONFIG_RTL8192EE is not set\n# CONFIG_RTL8821AE is not set\n# CONFIG_RTL8192CU is not set\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\nCONFIG_RTW88=m\n# CONFIG_RTW88_8822BE is not set\n# CONFIG_RTW88_8822CE is not set\n# CONFIG_RTW88_8723DE is not set\n# CONFIG_RTW88_8821CE is not set\n# CONFIG_RTW89 is not set\nCONFIG_WLAN_VENDOR_RSI=y\n# CONFIG_RSI_91X is not set\nCONFIG_WLAN_VENDOR_SILABS=y\n# CONFIG_WFX is not set\nCONFIG_WLAN_VENDOR_ST=y\n# CONFIG_CW1200 is not set\nCONFIG_WLAN_VENDOR_TI=y\n# CONFIG_WL1251 is not set\n# CONFIG_WL12XX is not set\n# CONFIG_WL18XX is not set\n# CONFIG_WLCORE is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\nCONFIG_USB_ZD1201=m\nCONFIG_ZD1211RW=m\n# CONFIG_ZD1211RW_DEBUG is not set\n# CONFIG_WLAN_VENDOR_QUANTENNA is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\n# CONFIG_VMXNET3 is not set\n# CONFIG_NETDEVSIM is not set\n# CONFIG_NET_FAILOVER is not set\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\n# CONFIG_INPUT_MATRIXKMAP is not set\n\n#\n# Userland interfaces\n#\nCONFIG_INPUT_MOUSEDEV=y\n# CONFIG_INPUT_MOUSEDEV_PSAUX is not set\nCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024\nCONFIG_INPUT_MOUSEDEV_SCREEN_Y=768\nCONFIG_INPUT_JOYDEV=y\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\n# CONFIG_KEYBOARD_ATKBD is not set\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=m\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_PINEPHONE is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\n# CONFIG_KEYBOARD_CYPRESS_SF is not set\n# CONFIG_INPUT_MOUSE is not set\nCONFIG_INPUT_JOYSTICK=y\n# CONFIG_JOYSTICK_ANALOG is not set\n# CONFIG_JOYSTICK_A3D is not set\n# CONFIG_JOYSTICK_ADI is not set\n# CONFIG_JOYSTICK_COBRA is not set\n# CONFIG_JOYSTICK_GF2K is not set\n# CONFIG_JOYSTICK_GRIP is not set\n# CONFIG_JOYSTICK_GRIP_MP is not set\n# CONFIG_JOYSTICK_GUILLEMOT is not set\n# CONFIG_JOYSTICK_INTERACT is not set\n# CONFIG_JOYSTICK_SIDEWINDER is not set\n# CONFIG_JOYSTICK_TMDC is not set\n# CONFIG_JOYSTICK_IFORCE is not set\n# CONFIG_JOYSTICK_WARRIOR is not set\n# CONFIG_JOYSTICK_MAGELLAN is not set\n# CONFIG_JOYSTICK_SPACEORB is not set\n# CONFIG_JOYSTICK_SPACEBALL is not set\n# CONFIG_JOYSTICK_STINGER is not set\n# CONFIG_JOYSTICK_TWIDJOY is not set\n# CONFIG_JOYSTICK_ZHENHUA is not set\n# CONFIG_JOYSTICK_AS5011 is not set\n# CONFIG_JOYSTICK_JOYDUMP is not set\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\nCONFIG_JOYSTICK_PSXPAD_SPI=m\nCONFIG_JOYSTICK_PSXPAD_SPI_FF=y\n# CONFIG_JOYSTICK_PXRC is not set\n# CONFIG_JOYSTICK_QWIIC is not set\n# CONFIG_JOYSTICK_FSIA6B is not set\n# CONFIG_JOYSTICK_SENSEHAT is not set\n# CONFIG_JOYSTICK_RPISENSE is not set\n# CONFIG_INPUT_TABLET is not set\nCONFIG_INPUT_TOUCHSCREEN=y\nCONFIG_TOUCHSCREEN_ADS7846=m\n# CONFIG_TOUCHSCREEN_AD7877 is not set\n# CONFIG_TOUCHSCREEN_AD7879 is not set\n# CONFIG_TOUCHSCREEN_AR1021_I2C is not set\n# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set\n# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_BU21013 is not set\n# CONFIG_TOUCHSCREEN_BU21029 is not set\n# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMA140 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set\n# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set\n# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set\n# CONFIG_TOUCHSCREEN_DYNAPRO is not set\n# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set\n# CONFIG_TOUCHSCREEN_EETI is not set\nCONFIG_TOUCHSCREEN_EGALAX=m\n# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set\n# CONFIG_TOUCHSCREEN_EXC3000 is not set\n# CONFIG_TOUCHSCREEN_FUJITSU is not set\n# CONFIG_TOUCHSCREEN_GOODIX is not set\n# CONFIG_TOUCHSCREEN_HIDEEP is not set\n# CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set\n# CONFIG_TOUCHSCREEN_ILI210X is not set\n# CONFIG_TOUCHSCREEN_ILITEK is not set\n# CONFIG_TOUCHSCREEN_S6SY761 is not set\n# CONFIG_TOUCHSCREEN_GUNZE is not set\n# CONFIG_TOUCHSCREEN_EKTF2127 is not set\n# CONFIG_TOUCHSCREEN_ELAN is not set\n# CONFIG_TOUCHSCREEN_ELO is not set\n# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set\n# CONFIG_TOUCHSCREEN_WACOM_I2C is not set\n# CONFIG_TOUCHSCREEN_MAX11801 is not set\n# CONFIG_TOUCHSCREEN_MCS5000 is not set\n# CONFIG_TOUCHSCREEN_MMS114 is not set\n# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set\n# CONFIG_TOUCHSCREEN_MSG2638 is not set\n# CONFIG_TOUCHSCREEN_MTOUCH is not set\n# CONFIG_TOUCHSCREEN_IMAGIS is not set\n# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set\n# CONFIG_TOUCHSCREEN_INEXIO is not set\n# CONFIG_TOUCHSCREEN_MK712 is not set\n# CONFIG_TOUCHSCREEN_PENMOUNT is not set\nCONFIG_TOUCHSCREEN_EDT_FT5X06=m\nCONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m\n# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set\n# CONFIG_TOUCHSCREEN_TOUCHWIN is not set\n# CONFIG_TOUCHSCREEN_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set\nCONFIG_TOUCHSCREEN_USB_COMPOSITE=m\nCONFIG_TOUCHSCREEN_USB_EGALAX=y\n# CONFIG_TOUCHSCREEN_USB_PANJIT is not set\nCONFIG_TOUCHSCREEN_USB_3M=y\n# CONFIG_TOUCHSCREEN_USB_ITM is not set\n# CONFIG_TOUCHSCREEN_USB_ETURBO is not set\n# CONFIG_TOUCHSCREEN_USB_GUNZE is not set\n# CONFIG_TOUCHSCREEN_USB_DMC_TSC10 is not set\n# CONFIG_TOUCHSCREEN_USB_IRTOUCH is not set\n# CONFIG_TOUCHSCREEN_USB_IDEALTEK is not set\n# CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH is not set\n# CONFIG_TOUCHSCREEN_USB_GOTOP is not set\n# CONFIG_TOUCHSCREEN_USB_JASTEC is not set\n# CONFIG_TOUCHSCREEN_USB_ELO is not set\n# CONFIG_TOUCHSCREEN_USB_E2I is not set\n# CONFIG_TOUCHSCREEN_USB_ZYTRONIC is not set\n# CONFIG_TOUCHSCREEN_USB_ETT_TC45USB is not set\n# CONFIG_TOUCHSCREEN_USB_NEXIO is not set\n# CONFIG_TOUCHSCREEN_USB_EASYTOUCH is not set\n# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set\n# CONFIG_TOUCHSCREEN_TSC_SERIO is not set\n# CONFIG_TOUCHSCREEN_TSC2004 is not set\n# CONFIG_TOUCHSCREEN_TSC2005 is not set\n# CONFIG_TOUCHSCREEN_TSC2007 is not set\n# CONFIG_TOUCHSCREEN_RM_TS is not set\n# CONFIG_TOUCHSCREEN_SILEAD is not set\n# CONFIG_TOUCHSCREEN_SIS_I2C is not set\nCONFIG_TOUCHSCREEN_ST1232=m\n# CONFIG_TOUCHSCREEN_STMFTS is not set\n# CONFIG_TOUCHSCREEN_SUR40 is not set\n# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set\n# CONFIG_TOUCHSCREEN_SX8654 is not set\n# CONFIG_TOUCHSCREEN_TPS6507X is not set\n# CONFIG_TOUCHSCREEN_ZET6223 is not set\n# CONFIG_TOUCHSCREEN_ZFORCE is not set\n# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set\n# CONFIG_TOUCHSCREEN_IQS5XX is not set\n# CONFIG_TOUCHSCREEN_ZINITIX is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ARIZONA_HAPTICS is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\nCONFIG_INPUT_GPIO_ROTARY_ENCODER=m\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_IQS7222 is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\nCONFIG_INPUT_RASPBERRYPI_BUTTON=y\nCONFIG_RMI4_CORE=y\n# CONFIG_RMI4_I2C is not set\n# CONFIG_RMI4_SPI is not set\n# CONFIG_RMI4_SMB is not set\nCONFIG_RMI4_F03=y\nCONFIG_RMI4_F03_SERIO=y\nCONFIG_RMI4_2D_SENSOR=y\nCONFIG_RMI4_F11=y\nCONFIG_RMI4_F12=y\nCONFIG_RMI4_F30=y\n# CONFIG_RMI4_F34 is not set\n# CONFIG_RMI4_F3A is not set\n# CONFIG_RMI4_F55 is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_SERIO_SERPORT=y\n# CONFIG_SERIO_AMBAKMI is not set\n# CONFIG_SERIO_PCIPS2 is not set\n# CONFIG_SERIO_LIBPS2 is not set\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_SERIO_GPIO_PS2 is not set\n# CONFIG_USERIO is not set\n# CONFIG_GAMEPORT is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_BRCM_CHAR_DRIVERS=y\n# CONFIG_BCM2708_VCMEM is not set\nCONFIG_BCM_VCIO=y\nCONFIG_BCM2835_SMI_DEV=m\n# CONFIG_RPIVID_MEM is not set\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\n# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set\nCONFIG_SERIAL_8250_16550A_VARIANTS=y\n# CONFIG_SERIAL_8250_FINTEK is not set\nCONFIG_SERIAL_8250_CONSOLE=y\n# CONFIG_SERIAL_8250_DMA is not set\nCONFIG_SERIAL_8250_PCI=y\nCONFIG_SERIAL_8250_EXAR=y\nCONFIG_SERIAL_8250_NR_UARTS=1\nCONFIG_SERIAL_8250_RUNTIME_UARTS=0\nCONFIG_SERIAL_8250_EXTENDED=y\n# CONFIG_SERIAL_8250_MANY_PORTS is not set\nCONFIG_SERIAL_8250_SHARE_IRQ=y\n# CONFIG_SERIAL_8250_DETECT_IRQ is not set\n# CONFIG_SERIAL_8250_RSA is not set\nCONFIG_SERIAL_8250_BCM2835AUX=y\nCONFIG_SERIAL_8250_FSL=y\n# CONFIG_SERIAL_8250_DW is not set\n# CONFIG_SERIAL_8250_RT288X is not set\nCONFIG_SERIAL_8250_PERICOM=y\nCONFIG_SERIAL_8250_BCM7271=y\nCONFIG_SERIAL_OF_PLATFORM=y\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\nCONFIG_SERIAL_AMBA_PL011=y\nCONFIG_SERIAL_AMBA_PL011_CONSOLE=y\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_JSM is not set\n# CONFIG_SERIAL_SIFIVE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_RP2 is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\nCONFIG_SERIAL_MCTRL_GPIO=y\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NOZOMI is not set\n# CONFIG_NULL_TTY is not set\n# CONFIG_HVC_DCC is not set\nCONFIG_SERIAL_DEV_BUS=y\nCONFIG_SERIAL_DEV_CTRL_TTYPORT=y\n# CONFIG_TTY_PRINTK is not set\n# CONFIG_VIRTIO_CONSOLE is not set\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_BA431 is not set\nCONFIG_HW_RANDOM_BCM2835=y\nCONFIG_HW_RANDOM_IPROC_RNG200=y\n# CONFIG_HW_RANDOM_CCTRNG is not set\n# CONFIG_HW_RANDOM_XIPHERA is not set\nCONFIG_HW_RANDOM_ARM_SMCCC_TRNG=y\nCONFIG_HW_RANDOM_CN10K=y\n# CONFIG_APPLICOM is not set\nCONFIG_DEVMEM=y\nCONFIG_DEVPORT=y\n# CONFIG_TCG_TPM is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\nCONFIG_RANDOM_TRUST_CPU=y\nCONFIG_RANDOM_TRUST_BOOTLOADER=y\nCONFIG_RASPBERRYPI_GPIOMEM=y\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\n# CONFIG_I2C_COMPAT is not set\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\nCONFIG_I2C_MUX_PINCTRL=y\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_DEMUX_PINCTRL is not set\n# CONFIG_I2C_MUX_MLXCPLD is not set\n# end of Multiplexer I2C Chip support\n\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# PC SMBus host controller drivers\n#\nCONFIG_I2C_BCM2708=y\nCONFIG_I2C_BCM2708_BAUDRATE=100000\n# CONFIG_I2C_ALI1535 is not set\n# CONFIG_I2C_ALI1563 is not set\n# CONFIG_I2C_ALI15X3 is not set\n# CONFIG_I2C_AMD756 is not set\n# CONFIG_I2C_AMD8111 is not set\n# CONFIG_I2C_I801 is not set\n# CONFIG_I2C_ISCH is not set\n# CONFIG_I2C_PIIX4 is not set\n# CONFIG_I2C_NFORCE2 is not set\n# CONFIG_I2C_NVIDIA_GPU is not set\n# CONFIG_I2C_SIS5595 is not set\n# CONFIG_I2C_SIS630 is not set\n# CONFIG_I2C_SIS96X is not set\n# CONFIG_I2C_VIA is not set\n# CONFIG_I2C_VIAPRO is not set\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\nCONFIG_I2C_BCM2835=y\nCONFIG_I2C_BRCMSTB=y\n# CONFIG_I2C_CADENCE is not set\n# CONFIG_I2C_CBUS_GPIO is not set\nCONFIG_I2C_DESIGNWARE_CORE=y\n# CONFIG_I2C_DESIGNWARE_SLAVE is not set\nCONFIG_I2C_DESIGNWARE_PLATFORM=y\n# CONFIG_I2C_DESIGNWARE_PCI is not set\n# CONFIG_I2C_EMEV2 is not set\nCONFIG_I2C_GPIO=y\n# CONFIG_I2C_GPIO_FAULT_INJECTOR is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_RK3X is not set\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_THUNDERX is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_PCI1XXXX is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\n# CONFIG_SPI_MEM is not set\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\nCONFIG_SPI_BCM2835=m\nCONFIG_SPI_BCM2835AUX=m\n# CONFIG_SPI_BCM_QSPI is not set\n# CONFIG_SPI_BITBANG is not set\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_CADENCE_QUADSPI is not set\nCONFIG_SPI_DESIGNWARE=m\nCONFIG_SPI_DW_DMA=y\n# CONFIG_SPI_DW_PCI is not set\nCONFIG_SPI_DW_MMIO=m\n# CONFIG_SPI_NXP_FLEXSPI is not set\n# CONFIG_SPI_GPIO is not set\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_MICROCHIP_CORE is not set\n# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set\n# CONFIG_SPI_OC_TINY is not set\n# CONFIG_SPI_PL022 is not set\n# CONFIG_SPI_PXA2XX is not set\n# CONFIG_SPI_ROCKCHIP is not set\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_SIFIVE is not set\n# CONFIG_SPI_MXIC is not set\n# CONFIG_SPI_THUNDERX is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_AMD is not set\n\n#\n# SPI Multiplexer support\n#\n# CONFIG_SPI_MUX is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=y\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\nCONFIG_SPI_DYNAMIC=y\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\n# CONFIG_PPS is not set\n\n#\n# PTP clock support\n#\n# CONFIG_PTP_1588_CLOCK is not set\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_CY8C95X0 is not set\n# CONFIG_PINCTRL_MCP23S08 is not set\n# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set\n# CONFIG_PINCTRL_OCELOT is not set\n# CONFIG_PINCTRL_SINGLE is not set\n# CONFIG_PINCTRL_STMFX is not set\n# CONFIG_PINCTRL_SX150X is not set\nCONFIG_PINCTRL_RP1=y\nCONFIG_PINCTRL_BCM2712=y\nCONFIG_PINCTRL_BCM2835=y\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_SYSFS=y\nCONFIG_GPIO_CDEV=y\nCONFIG_GPIO_CDEV_V1=y\nCONFIG_GPIO_GENERIC=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\nCONFIG_GPIO_RASPBERRYPI_EXP=y\nCONFIG_GPIO_BCM_VIRT=y\nCONFIG_GPIO_BRCMSTB=y\n# CONFIG_GPIO_CADENCE is not set\n# CONFIG_GPIO_DWAPB is not set\n# CONFIG_GPIO_EXAR is not set\n# CONFIG_GPIO_FTGPIO010 is not set\n# CONFIG_GPIO_GENERIC_PLATFORM is not set\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_LOGICVC is not set\n# CONFIG_GPIO_MB86S7X is not set\n# CONFIG_GPIO_PL061 is not set\n# CONFIG_GPIO_PWM is not set\n# CONFIG_GPIO_SIFIVE is not set\n# CONFIG_GPIO_SYSCON is not set\n# CONFIG_GPIO_XGENE is not set\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_GW_PLD is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\n# CONFIG_GPIO_PCA953X is not set\n# CONFIG_GPIO_PCA9570 is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\nCONFIG_GPIO_ARIZONA=m\nCONFIG_GPIO_FSM=y\n# end of MFD GPIO expanders\n\n#\n# PCI GPIO expanders\n#\n# CONFIG_GPIO_BT8XX is not set\n# CONFIG_GPIO_PCI_IDIO_16 is not set\n# CONFIG_GPIO_PCIE_IDIO_24 is not set\n# CONFIG_GPIO_RDC321X is not set\n# end of PCI GPIO expanders\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n# end of SPI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_SIM is not set\n# end of Virtual GPIO drivers\n\nCONFIG_W1=m\n\n#\n# 1-wire Bus Masters\n#\n# CONFIG_W1_MASTER_MATROX is not set\n# CONFIG_W1_MASTER_DS2490 is not set\n# CONFIG_W1_MASTER_DS2482 is not set\n# CONFIG_W1_MASTER_DS1WM is not set\nCONFIG_W1_MASTER_GPIO=m\n# CONFIG_W1_MASTER_SGI is not set\n# end of 1-wire Bus Masters\n\n#\n# 1-wire Slaves\n#\nCONFIG_W1_SLAVE_THERM=m\n# CONFIG_W1_SLAVE_SMEM is not set\n# CONFIG_W1_SLAVE_DS2405 is not set\n# CONFIG_W1_SLAVE_DS2408 is not set\n# CONFIG_W1_SLAVE_DS2413 is not set\n# CONFIG_W1_SLAVE_DS2406 is not set\n# CONFIG_W1_SLAVE_DS2423 is not set\n# CONFIG_W1_SLAVE_DS2805 is not set\n# CONFIG_W1_SLAVE_DS2430 is not set\n# CONFIG_W1_SLAVE_DS2431 is not set\n# CONFIG_W1_SLAVE_DS2433 is not set\n# CONFIG_W1_SLAVE_DS2438 is not set\n# CONFIG_W1_SLAVE_DS250X is not set\n# CONFIG_W1_SLAVE_DS2780 is not set\n# CONFIG_W1_SLAVE_DS2781 is not set\n# CONFIG_W1_SLAVE_DS28E04 is not set\n# CONFIG_W1_SLAVE_DS28E17 is not set\n# end of 1-wire Slaves\n\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_BRCMSTB is not set\nCONFIG_POWER_RESET_GPIO=y\nCONFIG_POWER_RESET_GPIO_RESTART=y\n# CONFIG_POWER_RESET_LTC2952 is not set\n# CONFIG_POWER_RESET_REGULATOR is not set\nCONFIG_POWER_RESET_RESTART=y\n# CONFIG_POWER_RESET_XGENE is not set\n# CONFIG_POWER_RESET_SYSCON is not set\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\n# CONFIG_SYSCON_REBOOT_MODE is not set\n# CONFIG_NVMEM_REBOOT_MODE is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\nCONFIG_POWER_SUPPLY_HWMON=y\nCONFIG_RPI_POE_POWER=m\n# CONFIG_PDA_POWER is not set\n# CONFIG_IP5XXX_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2760 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SAMSUNG_SDI is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_BATTERY_MAX1721X is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_MAX77976 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_UCS1002 is not set\n# CONFIG_CHARGER_BD99954 is not set\n# CONFIG_BATTERY_UG3105 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM1177 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_AHT10 is not set\n# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set\n# CONFIG_SENSORS_AS370 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_AXI_FAN_CONTROL is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_CORSAIR_CPRO is not set\n# CONFIG_SENSORS_CORSAIR_PSU is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_I5K_AMB is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\nCONFIG_SENSORS_GPIO_FAN=m\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2947_I2C is not set\n# CONFIG_SENSORS_LTC2947_SPI is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC2992 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX127 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX31730 is not set\n# CONFIG_SENSORS_MAX31760 is not set\n# CONFIG_SENSORS_MAX6620 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_TPS23861 is not set\n# CONFIG_SENSORS_MR75203 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT6775_I2C is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_NZXT_KRAKEN2 is not set\n# CONFIG_SENSORS_NZXT_SMART2 is not set\n# CONFIG_SENSORS_OCC_P8_I2C is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\nCONFIG_SENSORS_PWM_FAN=y\nCONFIG_SENSORS_RASPBERRYPI_HWMON=y\n# CONFIG_SENSORS_SBTSI is not set\n# CONFIG_SENSORS_SBRMI is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHT4x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_SIS5595 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC2305 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_INA238 is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_TMP464 is not set\n# CONFIG_SENSORS_TMP513 is not set\n# CONFIG_SENSORS_VIA686A is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_VT8231 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_SENSORS_RP1_ADC=m\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_NETLINK is not set\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\n# CONFIG_THERMAL_WRITABLE_TRIPS is not set\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\n# CONFIG_CPU_THERMAL is not set\n# CONFIG_THERMAL_EMULATION is not set\n# CONFIG_THERMAL_MMIO is not set\n\n#\n# Broadcom thermal drivers\n#\nCONFIG_BCM2711_THERMAL=y\nCONFIG_BCM2835_THERMAL=y\n# CONFIG_BRCMSTB_THERMAL is not set\n# end of Broadcom thermal drivers\n\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\nCONFIG_WATCHDOG_OPEN_TIMEOUT=0\n# CONFIG_WATCHDOG_SYSFS is not set\n# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_ARM_SBSA_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\n# CONFIG_DW_WATCHDOG is not set\n# CONFIG_MAX63XX_WATCHDOG is not set\n# CONFIG_ARM_SMC_WATCHDOG is not set\n# CONFIG_ALIM7101_WDT is not set\n# CONFIG_I6300ESB_WDT is not set\n# CONFIG_HP_WATCHDOG is not set\nCONFIG_BCM2835_WDT=y\n# CONFIG_BCM7038_WDT is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# PCI-based Watchdog Cards\n#\n# CONFIG_PCIPCWATCHDOG is not set\n# CONFIG_WDTPCI is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\nCONFIG_SSB=m\nCONFIG_SSB_SPROM=y\nCONFIG_SSB_BLOCKIO=y\nCONFIG_SSB_PCIHOST_POSSIBLE=y\nCONFIG_SSB_PCIHOST=y\nCONFIG_SSB_B43_PCI_BRIDGE=y\nCONFIG_SSB_SDIOHOST_POSSIBLE=y\n# CONFIG_SSB_SDIOHOST is not set\nCONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y\nCONFIG_SSB_DRIVER_PCICORE=y\n# CONFIG_SSB_DRIVER_GPIO is not set\nCONFIG_BCMA_POSSIBLE=y\nCONFIG_BCMA=m\nCONFIG_BCMA_BLOCKIO=y\nCONFIG_BCMA_HOST_PCI_POSSIBLE=y\nCONFIG_BCMA_HOST_PCI=y\n# CONFIG_BCMA_HOST_SOC is not set\nCONFIG_BCMA_DRIVER_PCI=y\nCONFIG_BCMA_DRIVER_GMAC_CMN=y\n# CONFIG_BCMA_DRIVER_GPIO is not set\n# CONFIG_BCMA_DEBUG is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_RPISENSE_CORE is not set\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AXP20X_I2C is not set\n# CONFIG_MFD_MADERA is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_GATEWORKS_GSC is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_MP2629 is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_LPC_ICH is not set\n# CONFIG_LPC_SCH is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_JANZ_CMODIO is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77620 is not set\n# CONFIG_MFD_MAX77650 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77714 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6370 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_MFD_OCELOT is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_NTXEC is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_SY7636A is not set\nCONFIG_MFD_RASPBERRYPI_POE_HAT=m\n# CONFIG_MFD_RDC321X is not set\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RT5120 is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_RK808 is not set\n# CONFIG_MFD_RN5T618 is not set\n# CONFIG_MFD_SEC_CORE is not set\n# CONFIG_MFD_SI476X_CORE is not set\nCONFIG_MFD_SIMPLE_MFD_I2C=m\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_VX855 is not set\n# CONFIG_MFD_LOCHNAGAR is not set\nCONFIG_MFD_ARIZONA=m\nCONFIG_MFD_ARIZONA_I2C=m\nCONFIG_MFD_ARIZONA_SPI=m\n# CONFIG_MFD_CS47L24 is not set\nCONFIG_MFD_WM5102=y\n# CONFIG_MFD_WM5110 is not set\n# CONFIG_MFD_WM8997 is not set\n# CONFIG_MFD_WM8998 is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_MFD_ROHM_BD718XX is not set\n# CONFIG_MFD_ROHM_BD71828 is not set\n# CONFIG_MFD_ROHM_BD957XMUF is not set\n# CONFIG_MFD_STPMIC1 is not set\n# CONFIG_MFD_STMFX is not set\n# CONFIG_MFD_ATC260X_I2C is not set\n# CONFIG_MFD_QCOM_PM8008 is not set\n# CONFIG_RAVE_SP_CORE is not set\n# CONFIG_MFD_INTEL_M10_BMC is not set\nCONFIG_MFD_RP1=y\n# CONFIG_MFD_RSMU_I2C is not set\n# CONFIG_MFD_RSMU_SPI is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\nCONFIG_REGULATOR_ARIZONA_LDO1=m\nCONFIG_REGULATOR_ARIZONA_MICSUPP=m\n# CONFIG_REGULATOR_DA9121 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\n# CONFIG_REGULATOR_FAN53880 is not set\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MAX20086 is not set\n# CONFIG_REGULATOR_MAX77826 is not set\n# CONFIG_REGULATOR_MCP16502 is not set\n# CONFIG_REGULATOR_MP5416 is not set\n# CONFIG_REGULATOR_MP8859 is not set\n# CONFIG_REGULATOR_MP886X is not set\n# CONFIG_REGULATOR_MPQ7920 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PF8X00 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\n# CONFIG_REGULATOR_PWM is not set\nCONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=y\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT5190A is not set\n# CONFIG_REGULATOR_RT5759 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\n# CONFIG_REGULATOR_SLG51000 is not set\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_SY8824X is not set\n# CONFIG_REGULATOR_SY8827N is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS6286X is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\n# CONFIG_REGULATOR_VCTRL is not set\nCONFIG_RC_CORE=y\nCONFIG_BPF_LIRC_MODE2=y\nCONFIG_LIRC=y\nCONFIG_RC_MAP=m\nCONFIG_RC_DECODERS=y\nCONFIG_IR_IMON_DECODER=m\nCONFIG_IR_JVC_DECODER=m\nCONFIG_IR_MCE_KBD_DECODER=m\nCONFIG_IR_NEC_DECODER=m\nCONFIG_IR_RC5_DECODER=m\nCONFIG_IR_RC6_DECODER=m\nCONFIG_IR_RCMM_DECODER=m\nCONFIG_IR_SANYO_DECODER=m\nCONFIG_IR_SHARP_DECODER=m\nCONFIG_IR_SONY_DECODER=m\nCONFIG_IR_XMP_DECODER=m\nCONFIG_RC_DEVICES=y\nCONFIG_IR_GPIO_CIR=m\nCONFIG_IR_GPIO_TX=m\n# CONFIG_IR_HIX5HD2 is not set\nCONFIG_IR_IGORPLUGUSB=m\nCONFIG_IR_IGUANA=m\nCONFIG_IR_IMON=m\nCONFIG_IR_IMON_RAW=m\nCONFIG_IR_MCEUSB=m\nCONFIG_IR_PWM_TX=m\nCONFIG_IR_REDRAT3=m\n# CONFIG_IR_SERIAL is not set\n# CONFIG_IR_SPI is not set\nCONFIG_IR_STREAMZAP=m\nCONFIG_IR_TOY=m\nCONFIG_IR_TTUSBIR=m\nCONFIG_RC_ATI_REMOTE=m\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_RC_XBOX_DVD=m\nCONFIG_CEC_CORE=y\n\n#\n# CEC support\n#\n# CONFIG_MEDIA_CEC_RC is not set\n# CONFIG_MEDIA_CEC_SUPPORT is not set\n# end of CEC support\n\nCONFIG_MEDIA_SUPPORT=m\n# CONFIG_MEDIA_SUPPORT_FILTER is not set\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\nCONFIG_MEDIA_RADIO_SUPPORT=y\nCONFIG_MEDIA_SDR_SUPPORT=y\nCONFIG_MEDIA_PLATFORM_SUPPORT=y\nCONFIG_MEDIA_TEST_SUPPORT=y\n# end of Media device types\n\n#\n# Media core support\n#\nCONFIG_VIDEO_DEV=m\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_DVB_CORE=m\n# end of Media core support\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2_I2C=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_VIDEO_TUNER=m\nCONFIG_V4L2_MEM2MEM_DEV=m\n# CONFIG_V4L2_FLASH_LED_CLASS is not set\nCONFIG_V4L2_FWNODE=m\nCONFIG_V4L2_ASYNC=m\n# end of Video4Linux options\n\n#\n# Media controller options\n#\nCONFIG_MEDIA_CONTROLLER_DVB=y\nCONFIG_MEDIA_CONTROLLER_REQUEST_API=y\n# end of Media controller options\n\n#\n# Digital TV options\n#\n# CONFIG_DVB_MMAP is not set\nCONFIG_DVB_NET=y\nCONFIG_DVB_MAX_ADAPTERS=8\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set\n# CONFIG_DVB_ULE_DEBUG is not set\n# end of Digital TV options\n\n#\n# Media drivers\n#\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_USB_S2255 is not set\nCONFIG_VIDEO_USBTV=m\nCONFIG_USB_VIDEO_CLASS=m\n# CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV is not set\n\n#\n# Analog TV USB devices\n#\n# CONFIG_VIDEO_GO7007 is not set\nCONFIG_VIDEO_HDPVR=m\nCONFIG_VIDEO_PVRUSB2=m\nCONFIG_VIDEO_PVRUSB2_SYSFS=y\nCONFIG_VIDEO_PVRUSB2_DVB=y\n# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set\nCONFIG_VIDEO_STK1160_COMMON=m\nCONFIG_VIDEO_STK1160=m\n\n#\n# Analog/digital TV USB devices\n#\nCONFIG_VIDEO_AU0828=m\nCONFIG_VIDEO_AU0828_V4L2=y\nCONFIG_VIDEO_AU0828_RC=y\nCONFIG_VIDEO_CX231XX=m\nCONFIG_VIDEO_CX231XX_RC=y\n# CONFIG_VIDEO_CX231XX_ALSA is not set\nCONFIG_VIDEO_CX231XX_DVB=m\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_AS102=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\n# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_DVBSKY=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_DVB_USB_ZD1301=m\nCONFIG_DVB_USB=m\n# CONFIG_DVB_USB_DEBUG is not set\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_CXUSB=m\n# CONFIG_DVB_USB_CXUSB_ANALOG is not set\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_DIB3000MC=m\nCONFIG_DVB_USB_DIBUSB_MB=m\nCONFIG_DVB_USB_DIBUSB_MB_FAULTY=y\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_DTT200U=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_OPERA1=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_SMS_USB_DRV=m\n# CONFIG_DVB_TTUSB_BUDGET is not set\n# CONFIG_DVB_TTUSB_DEC is not set\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\nCONFIG_VIDEO_EM28XX=m\n# CONFIG_VIDEO_EM28XX_V4L2 is not set\n# CONFIG_VIDEO_EM28XX_ALSA is not set\nCONFIG_VIDEO_EM28XX_DVB=m\nCONFIG_VIDEO_EM28XX_RC=m\n\n#\n# Software defined radio USB devices\n#\n# CONFIG_USB_AIRSPY is not set\n# CONFIG_USB_HACKRF is not set\n# CONFIG_USB_MSI2500 is not set\n# CONFIG_MEDIA_PCI_SUPPORT is not set\n# CONFIG_RADIO_ADAPTERS is not set\nCONFIG_MEDIA_PLATFORM_DRIVERS=y\n# CONFIG_V4L_PLATFORM_DRIVERS is not set\n# CONFIG_SDR_PLATFORM_DRIVERS is not set\n# CONFIG_DVB_PLATFORM_DRIVERS is not set\n# CONFIG_V4L_MEM2MEM_DRIVERS is not set\n\n#\n# Allegro DVT media platform drivers\n#\n\n#\n# Amlogic media platform drivers\n#\n\n#\n# Amphion drivers\n#\n\n#\n# Aspeed media platform drivers\n#\n\n#\n# Atmel media platform drivers\n#\n# CONFIG_VIDEO_BCM2835_UNICAM is not set\n\n#\n# Cadence media platform drivers\n#\n# CONFIG_VIDEO_CADENCE_CSI2RX is not set\n# CONFIG_VIDEO_CADENCE_CSI2TX is not set\n\n#\n# Chips&Media media platform drivers\n#\n\n#\n# Intel media platform drivers\n#\n\n#\n# Marvell media platform drivers\n#\n\n#\n# Mediatek media platform drivers\n#\n\n#\n# NVidia media platform drivers\n#\n\n#\n# NXP media platform drivers\n#\n\n#\n# Qualcomm media platform drivers\n#\n\n#\n# Raspberry Pi media platform drivers\n#\nCONFIG_VIDEO_RASPBERRYPI_PISP_BE=m\nCONFIG_VIDEO_RP1_CFE=m\n\n#\n# Renesas media platform drivers\n#\n\n#\n# Rockchip media platform drivers\n#\n\n#\n# Samsung media platform drivers\n#\n\n#\n# STMicroelectronics media platform drivers\n#\n\n#\n# Sunxi media platform drivers\n#\n\n#\n# Texas Instruments drivers\n#\n\n#\n# Verisilicon media platform drivers\n#\n\n#\n# VIA media platform drivers\n#\n\n#\n# Xilinx media platform drivers\n#\n\n#\n# MMC/SDIO DVB adapters\n#\nCONFIG_SMS_SDIO_DRV=m\n# CONFIG_V4L_TEST_DRIVERS is not set\n# CONFIG_DVB_TEST_DRIVERS is not set\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_TTPCI_EEPROM=m\nCONFIG_VIDEO_CX2341X=m\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\n# CONFIG_SMS_SIANO_DEBUGFS is not set\nCONFIG_VIDEOBUF2_CORE=m\nCONFIG_VIDEOBUF2_V4L2=m\nCONFIG_VIDEOBUF2_MEMOPS=m\nCONFIG_VIDEOBUF2_DMA_CONTIG=m\nCONFIG_VIDEOBUF2_VMALLOC=m\n# end of Media drivers\n\n#\n# Media ancillary drivers\n#\nCONFIG_MEDIA_ATTACH=y\n\n#\n# IR I2C driver auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_IR_I2C=m\nCONFIG_VIDEO_CAMERA_SENSOR=y\n# CONFIG_VIDEO_AR0521 is not set\n# CONFIG_VIDEO_ARDUCAM_64MP is not set\n# CONFIG_VIDEO_ARDUCAM_PIVARIETY is not set\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_HI846 is not set\n# CONFIG_VIDEO_HI847 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX296 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_IMX412 is not set\n# CONFIG_VIDEO_IMX477 is not set\n# CONFIG_VIDEO_IMX519 is not set\n# CONFIG_VIDEO_IMX708 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\n# CONFIG_VIDEO_MT9V011 is not set\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_OG01A1B is not set\n# CONFIG_VIDEO_OV02A10 is not set\n# CONFIG_VIDEO_OV08D10 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\n# CONFIG_VIDEO_OV2311 is not set\n# CONFIG_VIDEO_OV2640 is not set\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5693 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV64A40 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV7251 is not set\n# CONFIG_VIDEO_OV7640 is not set\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9282 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5398 is not set\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_BU64754 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# Audio decoders, processors and mixers\n#\n# CONFIG_VIDEO_CS3308 is not set\n# CONFIG_VIDEO_CS5345 is not set\nCONFIG_VIDEO_CS53L32A=m\nCONFIG_VIDEO_MSP3400=m\n# CONFIG_VIDEO_SONY_BTF_MPX is not set\n# CONFIG_VIDEO_TDA1997X is not set\n# CONFIG_VIDEO_TDA7432 is not set\n# CONFIG_VIDEO_TDA9840 is not set\n# CONFIG_VIDEO_TEA6415C is not set\n# CONFIG_VIDEO_TEA6420 is not set\n# CONFIG_VIDEO_TLV320AIC23B is not set\n# CONFIG_VIDEO_TVAUDIO is not set\n# CONFIG_VIDEO_UDA1342 is not set\n# CONFIG_VIDEO_VP27SMPX is not set\n# CONFIG_VIDEO_WM8739 is not set\nCONFIG_VIDEO_WM8775=m\n# end of Audio decoders, processors and mixers\n\n#\n# RDS decoders\n#\n# CONFIG_VIDEO_SAA6588 is not set\n# end of RDS decoders\n\n#\n# Video decoders\n#\n# CONFIG_VIDEO_ADV7180 is not set\n# CONFIG_VIDEO_ADV7183 is not set\n# CONFIG_VIDEO_ADV748X is not set\n# CONFIG_VIDEO_ADV7604 is not set\n# CONFIG_VIDEO_ADV7842 is not set\n# CONFIG_VIDEO_BT819 is not set\n# CONFIG_VIDEO_BT856 is not set\n# CONFIG_VIDEO_BT866 is not set\n# CONFIG_VIDEO_ISL7998X is not set\n# CONFIG_VIDEO_KS0127 is not set\n# CONFIG_VIDEO_MAX9286 is not set\n# CONFIG_VIDEO_ML86V7667 is not set\n# CONFIG_VIDEO_SAA7110 is not set\nCONFIG_VIDEO_SAA711X=m\n# CONFIG_VIDEO_TC358743 is not set\n# CONFIG_VIDEO_TVP514X is not set\n# CONFIG_VIDEO_TVP5150 is not set\n# CONFIG_VIDEO_TVP7002 is not set\n# CONFIG_VIDEO_TW2804 is not set\n# CONFIG_VIDEO_OV9281 is not set\n# CONFIG_VIDEO_TW9903 is not set\n# CONFIG_VIDEO_TW9906 is not set\n# CONFIG_VIDEO_TW9910 is not set\n# CONFIG_VIDEO_IRS1125 is not set\n# CONFIG_VIDEO_VPX3220 is not set\n\n#\n# Video and audio decoders\n#\n# CONFIG_VIDEO_SAA717X is not set\nCONFIG_VIDEO_CX25840=m\n# end of Video decoders\n\n#\n# Video encoders\n#\n# CONFIG_VIDEO_AD9389B is not set\n# CONFIG_VIDEO_ADV7170 is not set\n# CONFIG_VIDEO_ADV7175 is not set\n# CONFIG_VIDEO_ADV7343 is not set\n# CONFIG_VIDEO_ADV7393 is not set\n# CONFIG_VIDEO_ADV7511 is not set\n# CONFIG_VIDEO_AK881X is not set\n# CONFIG_VIDEO_SAA7127 is not set\n# CONFIG_VIDEO_SAA7185 is not set\n# CONFIG_VIDEO_THS8200 is not set\n# end of Video encoders\n\n#\n# Video improvement chips\n#\n# CONFIG_VIDEO_UPD64031A is not set\n# CONFIG_VIDEO_UPD64083 is not set\n# end of Video improvement chips\n\n#\n# Audio/Video compression chips\n#\n# CONFIG_VIDEO_SAA6752HS is not set\n# end of Audio/Video compression chips\n\n#\n# SDR tuner chips\n#\n# CONFIG_SDR_MAX2175 is not set\n# end of SDR tuner chips\n\n#\n# Miscellaneous helper chips\n#\n# CONFIG_VIDEO_I2C is not set\n# CONFIG_VIDEO_M52790 is not set\n# CONFIG_VIDEO_ST_MIPID02 is not set\n# CONFIG_VIDEO_THS7303 is not set\n# end of Miscellaneous helper chips\n\n#\n# Media SPI Adapters\n#\nCONFIG_CXD2880_SPI_DRV=m\n# CONFIG_VIDEO_GS1662 is not set\n# end of Media SPI Adapters\n\nCONFIG_MEDIA_TUNER=m\n\n#\n# Customize TV tuners\n#\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_IT913X=m\n# CONFIG_MEDIA_TUNER_M88RS6000T is not set\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_MC44S803=m\n# CONFIG_MEDIA_TUNER_MSI001 is not set\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT20XX=m\n# CONFIG_MEDIA_TUNER_MT2131 is not set\nCONFIG_MEDIA_TUNER_MT2266=m\n# CONFIG_MEDIA_TUNER_MXL301RF is not set\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\n# CONFIG_MEDIA_TUNER_QM1D1B0004 is not set\nCONFIG_MEDIA_TUNER_QM1D1C0042=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_R820T=m\nCONFIG_MEDIA_TUNER_SI2157=m\nCONFIG_MEDIA_TUNER_SIMPLE=m\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_TDA18250=m\nCONFIG_MEDIA_TUNER_TDA18271=m\nCONFIG_MEDIA_TUNER_TDA827X=m\nCONFIG_MEDIA_TUNER_TDA8290=m\nCONFIG_MEDIA_TUNER_TDA9887=m\nCONFIG_MEDIA_TUNER_TEA5761=m\nCONFIG_MEDIA_TUNER_TEA5767=m\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_XC2028=m\nCONFIG_MEDIA_TUNER_XC4000=m\nCONFIG_MEDIA_TUNER_XC5000=m\n# end of Customize TV tuners\n\n#\n# Customise DVB Frontends\n#\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_M88DS3103=m\n# CONFIG_DVB_MXL5XX is not set\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\n# CONFIG_DVB_STV0910 is not set\nCONFIG_DVB_STV6110x=m\n# CONFIG_DVB_STV6111 is not set\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_MN88472=m\nCONFIG_DVB_MN88473=m\nCONFIG_DVB_SI2165=m\nCONFIG_DVB_TDA18271C2DD=m\n\n#\n# DVB-S (satellite) frontends\n#\n# CONFIG_DVB_CX24110 is not set\nCONFIG_DVB_CX24116=m\n# CONFIG_DVB_CX24117 is not set\nCONFIG_DVB_CX24120=m\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_DS3000=m\n# CONFIG_DVB_MB86A16 is not set\nCONFIG_DVB_MT312=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_TDA10071=m\nCONFIG_DVB_TDA10086=m\n# CONFIG_DVB_TDA8083 is not set\n# CONFIG_DVB_TDA8261 is not set\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_TS2020=m\n# CONFIG_DVB_TUA6100 is not set\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TUNER_ITD1000=m\n# CONFIG_DVB_VES1X93 is not set\n# CONFIG_DVB_ZL10036 is not set\nCONFIG_DVB_ZL10039=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_AS102_FE=m\n# CONFIG_DVB_CX22700 is not set\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_CXD2841ER=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\n# CONFIG_DVB_DIB9000 is not set\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_GP8PSK_FE=m\n# CONFIG_DVB_L64781 is not set\nCONFIG_DVB_MT352=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\nCONFIG_DVB_RTL2832_SDR=m\n# CONFIG_DVB_S5H1432 is not set\nCONFIG_DVB_SI2168=m\n# CONFIG_DVB_SP887X is not set\n# CONFIG_DVB_STV0367 is not set\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_ZD1301_DEMOD=m\nCONFIG_DVB_ZL10353=m\nCONFIG_DVB_CXD2880=m\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_STV0297=m\n# CONFIG_DVB_TDA10021 is not set\nCONFIG_DVB_TDA10023=m\n# CONFIG_DVB_VES1820 is not set\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_AU8522=m\nCONFIG_DVB_AU8522_DTV=m\nCONFIG_DVB_AU8522_V4L=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LGDT3306A=m\nCONFIG_DVB_LGDT330X=m\nCONFIG_DVB_MXL692=m\nCONFIG_DVB_NXT200X=m\n# CONFIG_DVB_OR51132 is not set\n# CONFIG_DVB_OR51211 is not set\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_S5H1411=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\nCONFIG_DVB_S921=m\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\n# CONFIG_DVB_MN88443X is not set\nCONFIG_DVB_TC90522=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_A8293=m\nCONFIG_DVB_AF9033=m\n# CONFIG_DVB_ASCOT2E is not set\nCONFIG_DVB_ATBM8830=m\n# CONFIG_DVB_HELENE is not set\n# CONFIG_DVB_HORUS3A is not set\n# CONFIG_DVB_ISL6405 is not set\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_IX2505V=m\n# CONFIG_DVB_LGS8GL5 is not set\nCONFIG_DVB_LGS8GXX=m\n# CONFIG_DVB_LNBH25 is not set\n# CONFIG_DVB_LNBH29 is not set\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_M88RS2000=m\n# CONFIG_DVB_TDA665x is not set\nCONFIG_DVB_DRX39XYJ=m\n\n#\n# Common Interface (EN50221) controller drivers\n#\n# CONFIG_DVB_CXD2099 is not set\nCONFIG_DVB_SP2=m\n# end of Customise DVB Frontends\n\n#\n# Tools to develop new frontends\n#\n# CONFIG_DVB_DUMMY_FE is not set\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\nCONFIG_DRM=y\nCONFIG_DRM_MIPI_DSI=y\n# CONFIG_DRM_DEBUG_MM is not set\nCONFIG_DRM_KMS_HELPER=y\n# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set\n# CONFIG_DRM_DEBUG_MODESET_LOCK is not set\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\n# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\nCONFIG_DRM_DISPLAY_HELPER=y\nCONFIG_DRM_DISPLAY_HDMI_HELPER=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_TTM=y\nCONFIG_DRM_VRAM_HELPER=y\nCONFIG_DRM_TTM_HELPER=y\nCONFIG_DRM_GEM_DMA_HELPER=y\nCONFIG_DRM_GEM_SHMEM_HELPER=y\nCONFIG_DRM_SCHED=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_KOMEDA is not set\n# end of ARM devices\n\n# CONFIG_DRM_RADEON is not set\n# CONFIG_DRM_AMDGPU is not set\n# CONFIG_DRM_NOUVEAU is not set\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\n# CONFIG_DRM_VMWGFX is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_AST is not set\n# CONFIG_DRM_MGAG200 is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_USE_LVDS is not set\n# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set\n# CONFIG_DRM_QXL is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set\n# CONFIG_DRM_PANEL_ARM_VERSATILE is not set\n# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set\n# CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0 is not set\n# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set\n# CONFIG_DRM_PANEL_BOE_TV101WUM_NL6 is not set\n# CONFIG_DRM_PANEL_DSI_CM is not set\n# CONFIG_DRM_PANEL_LVDS is not set\nCONFIG_DRM_PANEL_SIMPLE=y\n# CONFIG_DRM_PANEL_EDP is not set\n# CONFIG_DRM_PANEL_EBBG_FT8719 is not set\n# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set\n# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set\n# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9806E is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set\n# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set\n# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set\n# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set\n# CONFIG_DRM_PANEL_JDI_R63452 is not set\n# CONFIG_DRM_PANEL_KHADAS_TS050 is not set\n# CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LB035Q02 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set\n# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT36672A is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set\n# CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set\n# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set\n# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set\n# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set\n# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set\n# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set\n# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_SOFEF00 is not set\n# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set\n# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS060T1SX01 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7703 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set\n# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set\n# CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521 is not set\n# CONFIG_DRM_PANEL_TDO_TL070WSH30 is not set\n# CONFIG_DRM_PANEL_TPO_Y17P is not set\n# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set\n# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set\n# CONFIG_DRM_PANEL_TPO_TPG110 is not set\n# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set\n# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set\n# CONFIG_DRM_PANEL_WAVESHARE_TOUCHSCREEN is not set\n# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set\n# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_CHRONTEL_CH7033 is not set\n# CONFIG_DRM_DISPLAY_CONNECTOR is not set\n# CONFIG_DRM_ITE_IT6505 is not set\n# CONFIG_DRM_LONTIUM_LT8912B is not set\n# CONFIG_DRM_LONTIUM_LT9211 is not set\n# CONFIG_DRM_LONTIUM_LT9611 is not set\n# CONFIG_DRM_LONTIUM_LT9611UXC is not set\n# CONFIG_DRM_ITE_IT66121 is not set\n# CONFIG_DRM_LVDS_CODEC is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NWL_MIPI_DSI is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_PARADE_PS8640 is not set\n# CONFIG_DRM_SIL_SII8620 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_SII9234 is not set\nCONFIG_DRM_SIMPLE_BRIDGE=y\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\nCONFIG_DRM_TOSHIBA_TC358762=y\n# CONFIG_DRM_TOSHIBA_TC358764 is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TOSHIBA_TC358768 is not set\n# CONFIG_DRM_TOSHIBA_TC358775 is not set\n# CONFIG_DRM_TI_DLPC3433 is not set\n# CONFIG_DRM_TI_TFP410 is not set\n# CONFIG_DRM_TI_SN65DSI83 is not set\n# CONFIG_DRM_TI_SN65DSI86 is not set\n# CONFIG_DRM_TI_TPD12S015 is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_ANALOGIX_ANX7625 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_CDNS_MHDP8546 is not set\n# end of Display Interface Bridges\n\nCONFIG_DRM_V3D=y\nCONFIG_DRM_VC4=y\nCONFIG_DRM_VC4_HDMI_CEC=y\nCONFIG_DRM_RP1_DSI=y\nCONFIG_DRM_RP1_DPI=y\nCONFIG_DRM_RP1_VEC=y\n# CONFIG_DRM_ETNAVIV is not set\n# CONFIG_DRM_HISI_HIBMC is not set\n# CONFIG_DRM_HISI_KIRIN is not set\n# CONFIG_DRM_LOGICVC is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_BOCHS is not set\n# CONFIG_DRM_CIRRUS_QEMU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_PANEL_MIPI_DBI is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_TINYDRM_HX8357D is not set\n# CONFIG_TINYDRM_ILI9163 is not set\n# CONFIG_TINYDRM_ILI9225 is not set\n# CONFIG_TINYDRM_ILI9341 is not set\n# CONFIG_TINYDRM_ILI9486 is not set\n# CONFIG_TINYDRM_MI0283QT is not set\n# CONFIG_TINYDRM_REPAPER is not set\n# CONFIG_TINYDRM_ST7586 is not set\n# CONFIG_TINYDRM_ST7735R is not set\n# CONFIG_DRM_PL111 is not set\n# CONFIG_DRM_LIMA is not set\n# CONFIG_DRM_PANFROST is not set\n# CONFIG_DRM_TIDSS is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_SSD130X is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_DRM_NOMODESET=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\n# CONFIG_FB_MODE_HELPERS is not set\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_BCM2708 is not set\n# CONFIG_FB_CIRRUS is not set\n# CONFIG_FB_PM2 is not set\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_CYBER2000 is not set\n# CONFIG_FB_ASILIANT is not set\n# CONFIG_FB_IMSTT is not set\n# CONFIG_FB_EFI is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_NVIDIA is not set\n# CONFIG_FB_RIVA is not set\n# CONFIG_FB_I740 is not set\n# CONFIG_FB_MATROX is not set\n# CONFIG_FB_RADEON is not set\n# CONFIG_FB_ATY128 is not set\n# CONFIG_FB_ATY is not set\n# CONFIG_FB_S3 is not set\n# CONFIG_FB_SAVAGE is not set\n# CONFIG_FB_SIS is not set\n# CONFIG_FB_NEOMAGIC is not set\n# CONFIG_FB_KYRO is not set\n# CONFIG_FB_3DFX is not set\n# CONFIG_FB_VOODOO1 is not set\n# CONFIG_FB_VT8623 is not set\n# CONFIG_FB_TRIDENT is not set\n# CONFIG_FB_ARK is not set\n# CONFIG_FB_PM3 is not set\n# CONFIG_FB_CARMINE is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_MB862XX is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# CONFIG_FB_SM712 is not set\n# CONFIG_FB_RPISENSE is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\nCONFIG_LCD_CLASS_DEVICE=m\n# CONFIG_LCD_L4F00242T03 is not set\n# CONFIG_LCD_LMS283GF05 is not set\n# CONFIG_LCD_LTV350QV is not set\n# CONFIG_LCD_ILI922X is not set\n# CONFIG_LCD_ILI9320 is not set\n# CONFIG_LCD_TDO24M is not set\n# CONFIG_LCD_VGG2432A4 is not set\n# CONFIG_LCD_PLATFORM is not set\n# CONFIG_LCD_AMS369FG06 is not set\n# CONFIG_LCD_LMS501KF03 is not set\n# CONFIG_LCD_HX8357 is not set\n# CONFIG_LCD_OTM3225A is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\n# CONFIG_BACKLIGHT_KTD253 is not set\n# CONFIG_BACKLIGHT_PWM is not set\nCONFIG_BACKLIGHT_RPI=y\n# CONFIG_BACKLIGHT_QCOM_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\nCONFIG_BACKLIGHT_GPIO=y\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n# CONFIG_BACKLIGHT_LED is not set\n# end of Backlight & LCD device support\n\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_DUMMY_CONSOLE_COLUMNS=80\nCONFIG_DUMMY_CONSOLE_ROWS=25\nCONFIG_FRAMEBUFFER_CONSOLE=y\n# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\n# end of Console display driver support\n\n# CONFIG_LOGO is not set\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_HWDEP=m\nCONFIG_SND_RAWMIDI=m\nCONFIG_SND_COMPRESS_OFFLOAD=y\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\nCONFIG_SND_HRTIMER=m\nCONFIG_SND_DYNAMIC_MINORS=y\nCONFIG_SND_MAX_CARDS=32\n# CONFIG_SND_SUPPORT_OLD_API is not set\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_CTL_INPUT_VALIDATION is not set\nCONFIG_SND_VMASTER=y\n# CONFIG_SND_SEQUENCER is not set\n# CONFIG_SND_DRIVERS is not set\nCONFIG_SND_PCI=y\n# CONFIG_SND_AD1889 is not set\n# CONFIG_SND_ALS300 is not set\n# CONFIG_SND_ALI5451 is not set\n# CONFIG_SND_ATIIXP is not set\n# CONFIG_SND_ATIIXP_MODEM is not set\n# CONFIG_SND_AU8810 is not set\n# CONFIG_SND_AU8820 is not set\n# CONFIG_SND_AU8830 is not set\n# CONFIG_SND_AW2 is not set\n# CONFIG_SND_AZT3328 is not set\n# CONFIG_SND_BT87X is not set\n# CONFIG_SND_CA0106 is not set\n# CONFIG_SND_CMIPCI is not set\n# CONFIG_SND_OXYGEN is not set\n# CONFIG_SND_CS4281 is not set\n# CONFIG_SND_CS46XX is not set\n# CONFIG_SND_CTXFI is not set\n# CONFIG_SND_DARLA20 is not set\n# CONFIG_SND_GINA20 is not set\n# CONFIG_SND_LAYLA20 is not set\n# CONFIG_SND_DARLA24 is not set\n# CONFIG_SND_GINA24 is not set\n# CONFIG_SND_LAYLA24 is not set\n# CONFIG_SND_MONA is not set\n# CONFIG_SND_MIA is not set\n# CONFIG_SND_ECHO3G is not set\n# CONFIG_SND_INDIGO is not set\n# CONFIG_SND_INDIGOIO is not set\n# CONFIG_SND_INDIGODJ is not set\n# CONFIG_SND_INDIGOIOX is not set\n# CONFIG_SND_INDIGODJX is not set\n# CONFIG_SND_EMU10K1 is not set\n# CONFIG_SND_EMU10K1X is not set\n# CONFIG_SND_ENS1370 is not set\n# CONFIG_SND_ENS1371 is not set\n# CONFIG_SND_ES1938 is not set\n# CONFIG_SND_ES1968 is not set\n# CONFIG_SND_FM801 is not set\n# CONFIG_SND_HDSP is not set\n# CONFIG_SND_HDSPM is not set\n# CONFIG_SND_ICE1712 is not set\n# CONFIG_SND_ICE1724 is not set\n# CONFIG_SND_INTEL8X0 is not set\n# CONFIG_SND_INTEL8X0M is not set\n# CONFIG_SND_KORG1212 is not set\n# CONFIG_SND_LOLA is not set\n# CONFIG_SND_LX6464ES is not set\n# CONFIG_SND_MAESTRO3 is not set\n# CONFIG_SND_MIXART is not set\n# CONFIG_SND_NM256 is not set\n# CONFIG_SND_PCXHR is not set\n# CONFIG_SND_RIPTIDE is not set\n# CONFIG_SND_RME32 is not set\n# CONFIG_SND_RME96 is not set\n# CONFIG_SND_RME9652 is not set\n# CONFIG_SND_SE6X is not set\n# CONFIG_SND_SONICVIBES is not set\n# CONFIG_SND_TRIDENT is not set\n# CONFIG_SND_VIA82XX is not set\n# CONFIG_SND_VIA82XX_MODEM is not set\n# CONFIG_SND_VIRTUOSO is not set\n# CONFIG_SND_VX222 is not set\n# CONFIG_SND_YMFPCI is not set\n\n#\n# HD-Audio\n#\n# CONFIG_SND_HDA_INTEL is not set\n# end of HD-Audio\n\nCONFIG_SND_HDA_PREALLOC_SIZE=2048\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=m\nCONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y\nCONFIG_SND_USB_UA101=m\nCONFIG_SND_USB_CAIAQ=m\nCONFIG_SND_USB_CAIAQ_INPUT=y\nCONFIG_SND_USB_6FIRE=m\nCONFIG_SND_USB_HIFACE=m\nCONFIG_SND_BCD2000=m\nCONFIG_SND_USB_LINE6=m\nCONFIG_SND_USB_POD=m\nCONFIG_SND_USB_PODHD=m\nCONFIG_SND_USB_TONEPORT=m\nCONFIG_SND_USB_VARIAX=m\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\nCONFIG_SND_SOC_COMPRESS=y\n# CONFIG_SND_SOC_ADI is not set\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_AMD_ACP_CONFIG is not set\n# CONFIG_SND_ATMEL_SOC is not set\nCONFIG_SND_BCM2835_SOC_I2S=m\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\nCONFIG_SND_BCM2708_SOC_CHIPDIP_DAC=m\nCONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSHD=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADC=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m\nCONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m\nCONFIG_SND_BCM2708_SOC_PIFI_40=m\nCONFIG_SND_BCM2708_SOC_RPI_CIRRUS=m\nCONFIG_SND_BCM2708_SOC_RPI_DAC=m\nCONFIG_SND_BCM2708_SOC_RPI_PROTO=m\nCONFIG_SND_BCM2708_SOC_JUSTBOOM_BOTH=m\nCONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m\nCONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI=m\nCONFIG_SND_BCM2708_SOC_IQAUDIO_CODEC=m\nCONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m\nCONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI=m\nCONFIG_SND_BCM2708_SOC_I_SABRE_Q2M=m\nCONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m\nCONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m\nCONFIG_SND_AUDIOINJECTOR_OCTO_SOUNDCARD=m\nCONFIG_SND_AUDIOINJECTOR_ISOLATED_SOUNDCARD=m\nCONFIG_SND_AUDIOSENSE_PI=m\nCONFIG_SND_DIGIDAC1_SOUNDCARD=m\nCONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m\nCONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m\nCONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m\nCONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m\nCONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m\nCONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m\nCONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m\nCONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m\nCONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m\nCONFIG_SND_PISOUND=m\nCONFIG_SND_RPI_SIMPLE_SOUNDCARD=m\nCONFIG_SND_RPI_WM8804_SOUNDCARD=m\nCONFIG_SND_DACBERRY400=m\nCONFIG_SND_DESIGNWARE_I2S=m\nCONFIG_SND_DESIGNWARE_PCM=y\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_AUDMIX is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_FSL_MICFIL is not set\n# CONFIG_SND_SOC_FSL_XCVR is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\nCONFIG_SND_SOC_ARIZONA=m\nCONFIG_SND_SOC_WM_ADSP=m\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_AD193X_SPI is not set\n# CONFIG_SND_SOC_AD193X_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_SPI is not set\nCONFIG_SND_SOC_ADAU1701=m\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\nCONFIG_SND_SOC_ADAU1977=m\nCONFIG_SND_SOC_ADAU1977_I2C=m\nCONFIG_SND_SOC_ADAU7002=m\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4375 is not set\n# CONFIG_SND_SOC_AK4458 is not set\nCONFIG_SND_SOC_AK4554=m\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_AW8738 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS35L41_SPI is not set\n# CONFIG_SND_SOC_CS35L41_I2C is not set\n# CONFIG_SND_SOC_CS35L45_SPI is not set\n# CONFIG_SND_SOC_CS35L45_I2C is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS42L83 is not set\n# CONFIG_SND_SOC_CS4234 is not set\nCONFIG_SND_SOC_CS4265=m\n# CONFIG_SND_SOC_CS4270 is not set\nCONFIG_SND_SOC_CS4271=m\nCONFIG_SND_SOC_CS4271_I2C=m\n# CONFIG_SND_SOC_CS4271_SPI is not set\nCONFIG_SND_SOC_CS42XX8=m\nCONFIG_SND_SOC_CS42XX8_I2C=m\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\nCONFIG_SND_SOC_DA7213=m\nCONFIG_SND_SOC_DMIC=m\nCONFIG_SND_SOC_HDMI_CODEC=y\n# CONFIG_SND_SOC_ES7134 is not set\n# CONFIG_SND_SOC_ES7241 is not set\n# CONFIG_SND_SOC_ES8316 is not set\n# CONFIG_SND_SOC_ES8326 is not set\n# CONFIG_SND_SOC_ES8328_I2C is not set\n# CONFIG_SND_SOC_ES8328_SPI is not set\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_HDA is not set\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\nCONFIG_SND_SOC_MA120X0P=m\n# CONFIG_SND_SOC_MAX98088 is not set\n# CONFIG_SND_SOC_MAX98357A is not set\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98520 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX98396 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\nCONFIG_SND_SOC_PCM179X=m\nCONFIG_SND_SOC_PCM179X_I2C=m\n# CONFIG_SND_SOC_PCM179X_SPI is not set\nCONFIG_SND_SOC_PCM186X=m\nCONFIG_SND_SOC_PCM186X_I2C=m\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3060_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\nCONFIG_SND_SOC_PCM5102A=m\nCONFIG_SND_SOC_PCM512x=m\nCONFIG_SND_SOC_PCM512x_I2C=m\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK3328 is not set\n# CONFIG_SND_SOC_RT5616 is not set\nCONFIG_SND_SOC_PCM1794A=m\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\n# CONFIG_SND_SOC_RT5659 is not set\n# CONFIG_SND_SOC_RT9120 is not set\nCONFIG_SND_SOC_SGTL5000=m\nCONFIG_SND_SOC_SIGMADSP=m\nCONFIG_SND_SOC_SIGMADSP_I2C=m\nCONFIG_SND_SOC_SIMPLE_AMPLIFIER=m\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\nCONFIG_SND_SOC_SPDIF=m\n# CONFIG_SND_SOC_SRC4XXX_I2C is not set\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\nCONFIG_SND_SOC_STA32X=m\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS2780 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\nCONFIG_SND_SOC_TAS571X=m\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805M is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\nCONFIG_SND_SOC_TAS5713=m\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320ADC3XXX is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\nCONFIG_SND_SOC_TLV320AIC32X4=m\nCONFIG_SND_SOC_TLV320AIC32X4_I2C=m\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\nCONFIG_SND_SOC_TLV320AIC3X=m\nCONFIG_SND_SOC_TLV320AIC3X_I2C=m\n# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\nCONFIG_SND_SOC_WM5102=m\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\nCONFIG_SND_SOC_WM8731=m\nCONFIG_SND_SOC_WM8731_I2C=m\n# CONFIG_SND_SOC_WM8731_SPI is not set\n# CONFIG_SND_SOC_WM8737 is not set\nCONFIG_SND_SOC_WM8741=m\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\nCONFIG_SND_SOC_WM8804=m\nCONFIG_SND_SOC_WM8804_I2C=m\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8940 is not set\nCONFIG_SND_SOC_WM8960=m\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_ZL38060 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8821 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\nCONFIG_SND_SOC_TPA6130A2=m\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\nCONFIG_SND_SOC_I_SABRE_CODEC=m\n# end of CODEC drivers\n\nCONFIG_SND_SIMPLE_CARD_UTILS=m\nCONFIG_SND_SIMPLE_CARD=m\nCONFIG_SND_AUDIO_GRAPH_CARD=m\n# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set\n# CONFIG_SND_TEST_COMPONENT is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\n# CONFIG_HID_APPLEIR is not set\nCONFIG_HID_ASUS=y\nCONFIG_HID_AUREAL=y\nCONFIG_HID_BELKIN=y\n# CONFIG_HID_BETOP_FF is not set\nCONFIG_HID_BIGBEN_FF=m\nCONFIG_HID_CHERRY=y\nCONFIG_HID_CHICONY=y\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\nCONFIG_HID_CYPRESS=y\nCONFIG_HID_DRAGONRISE=m\nCONFIG_DRAGONRISE_FF=y\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\nCONFIG_HID_EZKEY=y\n# CONFIG_HID_FT260 is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_GLORIOUS is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\nCONFIG_HID_KYE=y\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_VRC2 is not set\n# CONFIG_HID_XIAOMI is not set\nCONFIG_HID_GYRATION=y\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_ITE is not set\n# CONFIG_HID_JABRA is not set\nCONFIG_HID_TWINHAN=y\nCONFIG_HID_KENSINGTON=y\nCONFIG_HID_LCPOWER=y\n# CONFIG_HID_LED is not set\nCONFIG_HID_LENOVO=y\n# CONFIG_HID_LETSKETCH is not set\nCONFIG_HID_LOGITECH=y\nCONFIG_HID_LOGITECH_DJ=y\nCONFIG_HID_LOGITECH_HIDPP=y\nCONFIG_LOGITECH_FF=y\nCONFIG_LOGIRUMBLEPAD2_FF=y\nCONFIG_LOGIG940_FF=y\nCONFIG_LOGIWHEELS_FF=y\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_MEGAWORLD_FF is not set\n# CONFIG_HID_REDRAGON is not set\nCONFIG_HID_MICROSOFT=y\nCONFIG_HID_MONTEREY=y\nCONFIG_HID_MULTITOUCH=m\nCONFIG_HID_NINTENDO=m\nCONFIG_NINTENDO_FF=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\nCONFIG_HID_ORTEK=y\nCONFIG_HID_OUYA=y\nCONFIG_HID_PANTHERLORD=y\nCONFIG_PANTHERLORD_FF=y\nCONFIG_HID_PENMOUNT=y\nCONFIG_HID_PETALYNX=y\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PXRC is not set\n# CONFIG_HID_RAZER is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\nCONFIG_HID_SAMSUNG=y\n# CONFIG_HID_SEMITEK is not set\n# CONFIG_HID_SIGMAMICRO is not set\nCONFIG_HID_SONY=y\nCONFIG_SONY_FF=y\n# CONFIG_HID_SPEEDLINK is not set\nCONFIG_HID_STEAM=m\n# CONFIG_HID_STEELSERIES is not set\nCONFIG_HID_SUNPLUS=y\nCONFIG_HID_RMI=y\n# CONFIG_HID_GREENASIA is not set\nCONFIG_HID_SMARTJOYPLUS=m\nCONFIG_SMARTJOYPLUS_FF=y\nCONFIG_HID_TIVO=y\nCONFIG_HID_TOPSEED=y\n# CONFIG_HID_TOPRE is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\nCONFIG_HID_WIIMOTE=m\nCONFIG_HID_XINMO=y\n# CONFIG_HID_ZEROPLUS is not set\nCONFIG_HID_ZYDACRON=y\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n# end of USB HID support\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID_OF is not set\n# CONFIG_I2C_HID_OF_ELAN is not set\n# CONFIG_I2C_HID_OF_GOODIX is not set\n# end of I2C HID support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_USB_ULPI_BUS is not set\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_PCI=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\n# CONFIG_USB_OTG is not set\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\nCONFIG_USB_MON=m\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\n# CONFIG_USB_XHCI_DBGCAP is not set\nCONFIG_USB_XHCI_PCI=y\n# CONFIG_USB_XHCI_PCI_RENESAS is not set\nCONFIG_USB_XHCI_PLATFORM=y\n# CONFIG_USB_BRCMSTB is not set\n# CONFIG_USB_EHCI_HCD is not set\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\n# CONFIG_USB_OHCI_HCD is not set\n# CONFIG_USB_UHCI_HCD is not set\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\nCONFIG_USB_DWCOTG=y\n# CONFIG_USB_HCD_BCMA is not set\n# CONFIG_USB_HCD_SSB is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=m\n# CONFIG_USB_PRINTER is not set\n# CONFIG_USB_WDM is not set\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\nCONFIG_USB_UAS=y\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\n# CONFIG_USB_MUSB_HDRC is not set\nCONFIG_USB_DWC3=y\nCONFIG_USB_DWC3_HOST=y\n\n#\n# Platform Glue Driver Support\n#\nCONFIG_USB_DWC3_HAPS=y\nCONFIG_USB_DWC3_OF_SIMPLE=y\nCONFIG_USB_DWC2=y\nCONFIG_USB_DWC2_HOST=y\n\n#\n# Gadget/Dual-role mode requires USB Gadget support to be enabled\n#\n# CONFIG_USB_DWC2_PCI is not set\n# CONFIG_USB_DWC2_DEBUG is not set\n# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=m\nCONFIG_USB_SERIAL_GENERIC=y\n# CONFIG_USB_SERIAL_SIMPLE is not set\n# CONFIG_USB_SERIAL_AIRCABLE is not set\n# CONFIG_USB_SERIAL_ARK3116 is not set\n# CONFIG_USB_SERIAL_BELKIN is not set\nCONFIG_USB_SERIAL_CH341=m\n# CONFIG_USB_SERIAL_WHITEHEAT is not set\n# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set\nCONFIG_USB_SERIAL_CP210X=m\n# CONFIG_USB_SERIAL_CYPRESS_M8 is not set\n# CONFIG_USB_SERIAL_EMPEG is not set\nCONFIG_USB_SERIAL_FTDI_SIO=m\n# CONFIG_USB_SERIAL_VISOR is not set\n# CONFIG_USB_SERIAL_IPAQ is not set\n# CONFIG_USB_SERIAL_IR is not set\n# CONFIG_USB_SERIAL_EDGEPORT is not set\n# CONFIG_USB_SERIAL_EDGEPORT_TI is not set\n# CONFIG_USB_SERIAL_F81232 is not set\n# CONFIG_USB_SERIAL_F8153X is not set\n# CONFIG_USB_SERIAL_GARMIN is not set\n# CONFIG_USB_SERIAL_IPW is not set\nCONFIG_USB_SERIAL_IUU=m\n# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set\n# CONFIG_USB_SERIAL_KEYSPAN is not set\n# CONFIG_USB_SERIAL_KLSI is not set\n# CONFIG_USB_SERIAL_KOBIL_SCT is not set\n# CONFIG_USB_SERIAL_MCT_U232 is not set\n# CONFIG_USB_SERIAL_METRO is not set\n# CONFIG_USB_SERIAL_MOS7720 is not set\n# CONFIG_USB_SERIAL_MOS7840 is not set\n# CONFIG_USB_SERIAL_MXUPORT is not set\n# CONFIG_USB_SERIAL_NAVMAN is not set\nCONFIG_USB_SERIAL_PL2303=m\n# CONFIG_USB_SERIAL_OTI6858 is not set\n# CONFIG_USB_SERIAL_QCAUX is not set\n# CONFIG_USB_SERIAL_QUALCOMM is not set\n# CONFIG_USB_SERIAL_SPCP8X5 is not set\n# CONFIG_USB_SERIAL_SAFE is not set\n# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set\n# CONFIG_USB_SERIAL_SYMBOL is not set\n# CONFIG_USB_SERIAL_TI is not set\n# CONFIG_USB_SERIAL_CYBERJACK is not set\n# CONFIG_USB_SERIAL_OPTION is not set\n# CONFIG_USB_SERIAL_OMNINET is not set\n# CONFIG_USB_SERIAL_OPTICON is not set\n# CONFIG_USB_SERIAL_XSENS_MT is not set\n# CONFIG_USB_SERIAL_WISHBONE is not set\n# CONFIG_USB_SERIAL_SSU100 is not set\n# CONFIG_USB_SERIAL_QT2 is not set\n# CONFIG_USB_SERIAL_UPD78F0730 is not set\n# CONFIG_USB_SERIAL_XR is not set\n# CONFIG_USB_SERIAL_DEBUG is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\n# CONFIG_USB_EZUSB_FX2 is not set\n# CONFIG_USB_HUB_USB251XB is not set\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\nCONFIG_BRCM_USB_PINMAP=y\n# CONFIG_USB_ONBOARD_HUB is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\nCONFIG_NOP_USB_XCEIV=y\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\n# CONFIG_USB_ULPI is not set\n# end of USB Physical Layer drivers\n\n# CONFIG_USB_GADGET is not set\n# CONFIG_TYPEC is not set\nCONFIG_USB_ROLE_SWITCH=y\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_BCM2835_MMC is not set\nCONFIG_MMC_BCM2835_SDHOST=y\n# CONFIG_MMC_DEBUG is not set\n# CONFIG_MMC_ARMMMCI is not set\nCONFIG_MMC_SDHCI=y\nCONFIG_MMC_SDHCI_IO_ACCESSORS=y\n# CONFIG_MMC_SDHCI_PCI is not set\nCONFIG_MMC_SDHCI_PLTFM=y\n# CONFIG_MMC_SDHCI_OF_ARASAN is not set\n# CONFIG_MMC_SDHCI_OF_AT91 is not set\nCONFIG_MMC_SDHCI_OF_DWCMSHC=m\n# CONFIG_MMC_SDHCI_CADENCE is not set\n# CONFIG_MMC_SDHCI_F_SDH30 is not set\n# CONFIG_MMC_SDHCI_MILBEAUT is not set\nCONFIG_MMC_SDHCI_IPROC=y\n# CONFIG_MMC_TIFM_SD is not set\n# CONFIG_MMC_SPI is not set\n# CONFIG_MMC_CB710 is not set\n# CONFIG_MMC_VIA_SDMMC is not set\n# CONFIG_MMC_DW is not set\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_REALTEK_USB=m\nCONFIG_MMC_CQHCI=y\n# CONFIG_MMC_HSQ is not set\n# CONFIG_MMC_TOSHIBA_PCI is not set\n# CONFIG_MMC_BCM2835 is not set\n# CONFIG_MMC_MTK is not set\nCONFIG_MMC_SDHCI_BRCMSTB=y\n# CONFIG_MMC_SDHCI_XENON is not set\n# CONFIG_MMC_SDHCI_OMAP is not set\n# CONFIG_MMC_SDHCI_AM654 is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\nCONFIG_LEDS_CLASS_FLASH=y\n# CONFIG_LEDS_CLASS_MULTICOLOR is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AN30259A is not set\n# CONFIG_LEDS_AW2013 is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_EL15203000 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_LP55XX_COMMON is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\nCONFIG_LEDS_PWM=y\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_SYSCON is not set\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_SPI_BYTE is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\n# CONFIG_LEDS_AAT1290 is not set\n# CONFIG_LEDS_AS3645A is not set\n# CONFIG_LEDS_KTD2692 is not set\n# CONFIG_LEDS_LM3601X is not set\n# CONFIG_LEDS_RT4505 is not set\n# CONFIG_LEDS_RT8515 is not set\n# CONFIG_LEDS_SGM3140 is not set\n\n#\n# RGB LED drivers\n#\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\nCONFIG_LEDS_TRIGGER_TIMER=y\nCONFIG_LEDS_TRIGGER_ONESHOT=y\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\nCONFIG_LEDS_TRIGGER_BACKLIGHT=y\nCONFIG_LEDS_TRIGGER_CPU=y\n# CONFIG_LEDS_TRIGGER_ACTIVITY is not set\nCONFIG_LEDS_TRIGGER_GPIO=y\nCONFIG_LEDS_TRIGGER_DEFAULT_ON=y\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\nCONFIG_LEDS_TRIGGER_TRANSIENT=y\nCONFIG_LEDS_TRIGGER_CAMERA=y\nCONFIG_LEDS_TRIGGER_INPUT=y\n# CONFIG_LEDS_TRIGGER_PANIC is not set\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\n# CONFIG_LEDS_TRIGGER_AUDIO is not set\n# CONFIG_LEDS_TRIGGER_TTY is not set\nCONFIG_LEDS_TRIGGER_ACTPWR=y\n\n#\n# Simple LED drivers\n#\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_SUPPORT=y\n# CONFIG_EDAC is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\nCONFIG_RTC_DRV_ABX80X=m\nCONFIG_RTC_DRV_RPI=y\nCONFIG_RTC_DRV_BRCMSTB=y\nCONFIG_RTC_DRV_DS1307=m\n# CONFIG_RTC_DRV_DS1307_CENTURY is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_HYM8563 is not set\n# CONFIG_RTC_DRV_MAX6900 is not set\n# CONFIG_RTC_DRV_NCT3018Y is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\nCONFIG_RTC_DRV_PCF8523=m\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\nCONFIG_RTC_DRV_PCF8563=m\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\nCONFIG_RTC_DRV_DS3232=m\nCONFIG_RTC_DRV_DS3232_HWMON=y\nCONFIG_RTC_DRV_PCF2127=m\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_EFI is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\n# CONFIG_RTC_DRV_PL031 is not set\n# CONFIG_RTC_DRV_CADENCE is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_VIRTUAL_CHANNELS=y\nCONFIG_DMA_OF=y\n# CONFIG_ALTERA_MSGDMA is not set\n# CONFIG_AMBA_PL08X is not set\n# CONFIG_BCM_SBA_RAID is not set\nCONFIG_DMA_BCM2835=y\nCONFIG_DW_AXI_DMAC=y\n# CONFIG_FSL_EDMA is not set\n# CONFIG_FSL_QDMA is not set\n# CONFIG_INTEL_IDMA64 is not set\n# CONFIG_MV_XOR_V2 is not set\n# CONFIG_PL330_DMA is not set\n# CONFIG_PLX_DMA is not set\n# CONFIG_DMA_BCM2708 is not set\n# CONFIG_XILINX_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DPDMA is not set\n# CONFIG_QCOM_HIDMA_MGMT is not set\n# CONFIG_QCOM_HIDMA is not set\n# CONFIG_DW_DMAC is not set\n# CONFIG_DW_DMAC_PCI is not set\n# CONFIG_DW_EDMA is not set\n# CONFIG_DW_EDMA_PCIE is not set\n# CONFIG_SF_PDMA is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\n# CONFIG_UDMABUF is not set\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\nCONFIG_DMABUF_HEAPS=y\n# CONFIG_DMABUF_SYSFS_STATS is not set\nCONFIG_DMABUF_HEAPS_SYSTEM=y\nCONFIG_DMABUF_HEAPS_CMA=y\n# end of DMABUF options\n\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\n# CONFIG_VIRTIO_MENU is not set\n# CONFIG_VDPA is not set\nCONFIG_VHOST_MENU=y\n# CONFIG_VHOST_NET is not set\n# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# end of Microsoft Hyper-V guest support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_RTL8192U is not set\n# CONFIG_RTLLIB is not set\nCONFIG_RTL8723BS=m\nCONFIG_R8712U=m\nCONFIG_R8188EU=m\n# CONFIG_RTS5208 is not set\n# CONFIG_VT6655 is not set\nCONFIG_VT6656=m\n# CONFIG_FB_SM750 is not set\nCONFIG_STAGING_MEDIA=y\n# CONFIG_VIDEO_MAX96712 is not set\nCONFIG_VIDEO_RPIVID=m\n# CONFIG_STAGING_MEDIA_DEPRECATED is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_KS7010 is not set\n# CONFIG_BCM_VIDEOCORE is not set\n# CONFIG_PI433 is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_FIELDBUS_DEV is not set\n# CONFIG_QLGE is not set\n# CONFIG_VME_BUS is not set\n# CONFIG_GOLDFISH is not set\n# CONFIG_CHROME_PLATFORMS is not set\n# CONFIG_MELLANOX_PLATFORM is not set\nCONFIG_SURFACE_PLATFORMS=y\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Clock driver for ARM Reference designs\n#\n# CONFIG_CLK_ICST is not set\n# CONFIG_CLK_SP810 is not set\n# end of Clock driver for ARM Reference designs\n\n# CONFIG_LMK04832 is not set\n# CONFIG_COMMON_CLK_MAX9485 is not set\nCONFIG_COMMON_CLK_RP1=y\nCONFIG_COMMON_CLK_RP1_SDIO=y\nCONFIG_COMMON_CLK_HIFIBERRY_DACPLUSHD=m\nCONFIG_COMMON_CLK_HIFIBERRY_DACPRO=m\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\n# CONFIG_COMMON_CLK_AXI_CLKGEN is not set\n# CONFIG_COMMON_CLK_XGENE is not set\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_RS9_PCIE is not set\n# CONFIG_COMMON_CLK_VC5 is not set\n# CONFIG_COMMON_CLK_VC7 is not set\n# CONFIG_COMMON_CLK_FIXED_MMIO is not set\nCONFIG_CLK_BCM2711_DVP=y\nCONFIG_CLK_BCM2835=y\nCONFIG_CLK_RASPBERRYPI=y\n# CONFIG_XILINX_VCU is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\n# CONFIG_HWSPINLOCK is not set\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\nCONFIG_CLKSRC_MMIO=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y\nCONFIG_FSL_ERRATUM_A008585=y\nCONFIG_HISILICON_ERRATUM_161010101=y\nCONFIG_ARM64_ERRATUM_858921=y\nCONFIG_ARM_TIMER_SP804=y\n# CONFIG_MICROCHIP_PIT64B is not set\n# end of Clock Source drivers\n\nCONFIG_MAILBOX=y\n# CONFIG_ARM_MHU is not set\n# CONFIG_ARM_MHU_V2 is not set\n# CONFIG_PLATFORM_MHU is not set\n# CONFIG_PL320_MBOX is not set\n# CONFIG_ALTERA_MBOX is not set\nCONFIG_BCM2835_MBOX=y\n# CONFIG_MAILBOX_TEST is not set\nCONFIG_IOMMU_IOVA=y\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\n# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set\n# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set\n# CONFIG_IOMMU_IO_PGTABLE_DART is not set\n# end of Generic IOMMU Pagetable Support\n\n# CONFIG_IOMMU_DEBUGFS is not set\nCONFIG_IOMMU_DEFAULT_DMA_STRICT=y\n# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set\n# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set\nCONFIG_OF_IOMMU=y\nCONFIG_IOMMU_DMA=y\n# CONFIG_ARM_SMMU is not set\n# CONFIG_ARM_SMMU_V3 is not set\nCONFIG_BCM2712_IOMMU=y\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\n# CONFIG_RPMSG_QCOM_GLINK_RPM is not set\n# CONFIG_RPMSG_VIRTIO is not set\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\nCONFIG_BCM2835_POWER=y\nCONFIG_RASPBERRYPI_POWER=y\nCONFIG_SOC_BRCMSTB=y\nCONFIG_BRCMSTB_PM=y\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# CONFIG_QUICC_ENGINE is not set\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# fujitsu SoC drivers\n#\n# end of fujitsu SoC drivers\n\n#\n# i.MX SoC drivers\n#\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# CONFIG_LITEX_SOC_CONTROLLER is not set\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# end of Qualcomm SoC drivers\n\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\n# CONFIG_PM_DEVFREQ is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_FSA9480 is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_PTN5150 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\n# CONFIG_EXTCON_USB_GPIO is not set\n# CONFIG_MEMORY is not set\n# CONFIG_IIO is not set\n# CONFIG_NTB is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_DEBUG is not set\n# CONFIG_PWM_ATMEL_TCB is not set\nCONFIG_PWM_BCM2835=m\nCONFIG_PWM_BRCMSTB=y\n# CONFIG_PWM_CLK is not set\n# CONFIG_PWM_DWC is not set\n# CONFIG_PWM_FSL_FTM is not set\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_PWM_RASPBERRYPI_POE=m\nCONFIG_PWM_RP1=y\n# CONFIG_PWM_XILINX is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\nCONFIG_ARM_GIC_V2M=y\nCONFIG_ARM_GIC_V3=y\nCONFIG_ARM_GIC_V3_ITS=y\nCONFIG_ARM_GIC_V3_ITS_PCI=y\n# CONFIG_AL_FIC is not set\nCONFIG_BCM2712_MIP=y\nCONFIG_BCM7038_L1_IRQ=y\nCONFIG_BCM7120_L2_IRQ=y\nCONFIG_BRCMSTB_L2_IRQ=y\n# CONFIG_XILINX_INTC is not set\nCONFIG_PARTITION_PERCPU=y\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\nCONFIG_ARCH_HAS_RESET_CONTROLLER=y\nCONFIG_RESET_CONTROLLER=y\nCONFIG_RESET_BRCMSTB=y\nCONFIG_RESET_BRCMSTB_RESCAL=y\nCONFIG_RESET_RASPBERRYPI=y\nCONFIG_RESET_SIMPLE=y\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_RESET_TI_TPS380X is not set\n\n#\n# PHY Subsystem\n#\nCONFIG_GENERIC_PHY=y\nCONFIG_GENERIC_PHY_MIPI_DPHY=y\n# CONFIG_PHY_XGENE is not set\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\n\n#\n# PHY drivers for Broadcom platforms\n#\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# CONFIG_PHY_BRCM_SATA is not set\nCONFIG_PHY_BRCM_USB=y\n# end of PHY drivers for Broadcom platforms\n\n# CONFIG_PHY_CADENCE_TORRENT is not set\n# CONFIG_PHY_CADENCE_DPHY is not set\n# CONFIG_PHY_CADENCE_DPHY_RX is not set\n# CONFIG_PHY_CADENCE_SIERRA is not set\n# CONFIG_PHY_CADENCE_SALVO is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_LAN966X_SERDES is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\n# CONFIG_PHY_OCELOT_SERDES is not set\n# CONFIG_PHY_SAMSUNG_USB2 is not set\n# end of PHY Subsystem\n\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\n# CONFIG_ARM_CMN is not set\nCONFIG_ARM_PMU=y\n# CONFIG_ARM_DSU_PMU is not set\n# CONFIG_ARM_SPE_PMU is not set\nCONFIG_RPI_AXIPERF=m\n# CONFIG_HISI_PCIE_PMU is not set\n# CONFIG_HNS3_PMU is not set\n# end of Performance monitor support\n\nCONFIG_RAS=y\n# CONFIG_USB4 is not set\n\n#\n# Android\n#\n# CONFIG_ANDROID_BINDER_IPC is not set\n# end of Android\n\n# CONFIG_LIBNVDIMM is not set\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\nCONFIG_NVMEM_RMEM=m\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# CONFIG_HISI_PTT is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\n# CONFIG_TEE is not set\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\n# CONFIG_PECI is not set\n# CONFIG_HTE is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_VALIDATE_FS_PARSER=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\nCONFIG_XFS_SUPPORT_V4=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\n# CONFIG_F2FS_FS is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\n# CONFIG_QUOTA is not set\nCONFIG_AUTOFS4_FS=y\nCONFIG_AUTOFS_FS=y\nCONFIG_FUSE_FS=m\n# CONFIG_CUSE is not set\n# CONFIG_VIRTIO_FS is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_XINO_AUTO is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n\n#\n# Caches\n#\nCONFIG_NETFS_SUPPORT=y\n# CONFIG_NETFS_STATS is not set\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_CACHEFILES is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=y\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=m\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=m\n# CONFIG_NTFS3_64BIT_CLUSTER is not set\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\n# CONFIG_PROC_KCORE is not set\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_TMPFS_INODE64 is not set\nCONFIG_ARCH_SUPPORTS_HUGETLBFS=y\n# CONFIG_HUGETLBFS is not set\nCONFIG_MEMFD_CREATE=y\nCONFIG_ARCH_HAS_GIGANTIC_PAGE=y\nCONFIG_CONFIGFS_FS=y\nCONFIG_EFIVAR_FS=m\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\nCONFIG_HFS_FS=y\nCONFIG_HFSPLUS_FS=y\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\n# CONFIG_SQUASHFS_FILE_CACHE is not set\nCONFIG_SQUASHFS_FILE_DIRECT=y\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\nCONFIG_PSTORE=y\nCONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240\nCONFIG_PSTORE_DEFLATE_COMPRESS=y\n# CONFIG_PSTORE_LZO_COMPRESS is not set\n# CONFIG_PSTORE_LZ4_COMPRESS is not set\n# CONFIG_PSTORE_LZ4HC_COMPRESS is not set\n# CONFIG_PSTORE_842_COMPRESS is not set\n# CONFIG_PSTORE_ZSTD_COMPRESS is not set\nCONFIG_PSTORE_COMPRESS=y\nCONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y\nCONFIG_PSTORE_COMPRESS_DEFAULT=\"deflate\"\nCONFIG_PSTORE_CONSOLE=y\n# CONFIG_PSTORE_PMSG is not set\n# CONFIG_PSTORE_FTRACE is not set\nCONFIG_PSTORE_RAM=y\n# CONFIG_PSTORE_BLK is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EROFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\nCONFIG_NFS_SWAP=y\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\nCONFIG_NFS_V4_1_MIGRATION=y\nCONFIG_ROOT_NFS=y\nCONFIG_NFS_FSCACHE=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFS_DISABLE_UDP_SUPPORT=y\n# CONFIG_NFS_V4_2_READ_PLUS is not set\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_COMMON=y\nCONFIG_NFS_V4_2_SSC_HELPER=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\nCONFIG_SUNRPC_SWAP=y\nCONFIG_RPCSEC_GSS_KRB5=m\n# CONFIG_SUNRPC_DISABLE_INSECURE_ENCTYPES is not set\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS2=y\nCONFIG_CIFS_ALLOW_INSECURE_LEGACY=y\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\nCONFIG_CIFS_DEBUG=y\n# CONFIG_CIFS_DEBUG2 is not set\n# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\n# CONFIG_CIFS_SWN_UPCALL is not set\nCONFIG_CIFS_FSCACHE=y\n# CONFIG_CIFS_ROOT is not set\n# CONFIG_SMB_SERVER is not set\nCONFIG_SMBFS=y\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_KEYS_REQUEST_CACHE is not set\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\nCONFIG_KEY_DH_OPERATIONS=y\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY is not set\n# CONFIG_SECURITYFS is not set\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\n# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_LSM=\"yama,loadpin,safesetid,integrity\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_GCC_PLUGIN_STACKLEAK is not set\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n\nCONFIG_RANDSTRUCT_NONE=y\n# CONFIG_RANDSTRUCT_FULL is not set\n# CONFIG_RANDSTRUCT_PERFORMANCE is not set\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_CRYPTD=y\nCONFIG_CRYPTO_AUTHENC=y\n# CONFIG_CRYPTO_TEST is not set\n# end of Crypto core or helper\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_DH=y\n# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set\nCONFIG_CRYPTO_ECC=m\nCONFIG_CRYPTO_ECDH=m\n# CONFIG_CRYPTO_ECDSA is not set\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\n# CONFIG_CRYPTO_CURVE25519 is not set\n# end of Public-key cryptography\n\n#\n# Block ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\n# CONFIG_CRYPTO_ARIA is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\nCONFIG_CRYPTO_SM4=m\n# CONFIG_CRYPTO_SM4_GENERIC is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n# end of Block ciphers\n\n#\n# Length-preserving ciphers and modes\n#\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_ARC4 is not set\n# CONFIG_CRYPTO_CHACHA20 is not set\nCONFIG_CRYPTO_CBC=y\nCONFIG_CRYPTO_CFB=m\nCONFIG_CRYPTO_CTR=y\nCONFIG_CRYPTO_CTS=m\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_HCTR2 is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_LRW is not set\nCONFIG_CRYPTO_OFB=m\n# CONFIG_CRYPTO_PCBC is not set\n# CONFIG_CRYPTO_XTS is not set\n# end of Length-preserving ciphers and modes\n\n#\n# AEAD (authenticated encryption with associated data) ciphers\n#\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\n# CONFIG_CRYPTO_ESSIV is not set\n# end of AEAD (authenticated encryption with associated data) ciphers\n\n#\n# Hashes, digests, and MACs\n#\nCONFIG_CRYPTO_BLAKE2B=m\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\n# CONFIG_CRYPTO_POLY1305 is not set\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\nCONFIG_CRYPTO_SHA3=m\nCONFIG_CRYPTO_SM3=m\n# CONFIG_CRYPTO_SM3_GENERIC is not set\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_VMAC is not set\n# CONFIG_CRYPTO_WP512 is not set\n# CONFIG_CRYPTO_XCBC is not set\nCONFIG_CRYPTO_XXHASH=m\n# end of Hashes, digests, and MACs\n\n#\n# CRCs (cyclic redundancy checks)\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=y\n# CONFIG_CRYPTO_CRCT10DIF is not set\n# end of CRCs (cyclic redundancy checks)\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=y\nCONFIG_CRYPTO_LZO=m\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n# end of Compression\n\n#\n# Random number generation\n#\n# CONFIG_CRYPTO_ANSI_CPRNG is not set\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_KDF800108_CTR=y\n# end of Random number generation\n\n#\n# Userspace interface\n#\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\n# CONFIG_CRYPTO_USER_API_AEAD is not set\nCONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y\n# end of Userspace interface\n\nCONFIG_CRYPTO_HASH_INFO=y\n# CONFIG_CRYPTO_NHPOLY1305_NEON is not set\nCONFIG_CRYPTO_CHACHA20_NEON=m\n\n#\n# Accelerated Cryptographic Algorithms for CPU (arm64)\n#\nCONFIG_CRYPTO_GHASH_ARM64_CE=m\nCONFIG_CRYPTO_POLY1305_NEON=m\nCONFIG_CRYPTO_SHA1_ARM64_CE=m\nCONFIG_CRYPTO_SHA256_ARM64=m\nCONFIG_CRYPTO_SHA2_ARM64_CE=m\nCONFIG_CRYPTO_SHA512_ARM64=m\nCONFIG_CRYPTO_SHA512_ARM64_CE=m\nCONFIG_CRYPTO_SHA3_ARM64=m\n# CONFIG_CRYPTO_SM3_NEON is not set\nCONFIG_CRYPTO_SM3_ARM64_CE=m\n# CONFIG_CRYPTO_POLYVAL_ARM64_CE is not set\nCONFIG_CRYPTO_AES_ARM64=y\nCONFIG_CRYPTO_AES_ARM64_CE=m\nCONFIG_CRYPTO_AES_ARM64_CE_BLK=m\nCONFIG_CRYPTO_AES_ARM64_NEON_BLK=m\nCONFIG_CRYPTO_AES_ARM64_BS=m\nCONFIG_CRYPTO_SM4_ARM64_CE=m\n# CONFIG_CRYPTO_SM4_ARM64_CE_BLK is not set\n# CONFIG_CRYPTO_SM4_ARM64_NEON_BLK is not set\nCONFIG_CRYPTO_AES_ARM64_CE_CCM=m\n# end of Accelerated Cryptographic Algorithms for CPU (arm64)\n\n# CONFIG_CRYPTO_HW is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n# CONFIG_FIPS_SIGNATURE_SELFTEST is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\nCONFIG_RAID6_PQ_BENCHMARK=y\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_CORDIC=m\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_ARCH_HAS_FAST_MULTIPLIER=y\nCONFIG_ARCH_USE_SYM_ANNOTATIONS=y\n# CONFIG_INDIRECT_PIO is not set\n# CONFIG_TRACE_MMIO_ACCESS is not set\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_UTILS=y\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=m\nCONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=m\nCONFIG_CRYPTO_LIB_CHACHA_GENERIC=m\nCONFIG_CRYPTO_LIB_CHACHA=m\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=m\nCONFIG_CRYPTO_LIB_CURVE25519=m\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=m\nCONFIG_CRYPTO_LIB_POLY1305=m\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=m\nCONFIG_CRYPTO_LIB_SHA1=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_CRC_CCITT=m\nCONFIG_CRC16=y\n# CONFIG_CRC_T10DIF is not set\n# CONFIG_CRC64_ROCKSOFT is not set\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC64 is not set\n# CONFIG_CRC4 is not set\n# CONFIG_CRC7 is not set\nCONFIG_LIBCRC32C=m\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=y\nCONFIG_AUDIT_ARCH_COMPAT_GENERIC=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=m\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMMON=y\nCONFIG_ZSTD_COMPRESS=m\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\n# CONFIG_XZ_DEC_X86 is not set\n# CONFIG_XZ_DEC_POWERPC is not set\n# CONFIG_XZ_DEC_IA64 is not set\n# CONFIG_XZ_DEC_ARM is not set\n# CONFIG_XZ_DEC_ARMTHUMB is not set\n# CONFIG_XZ_DEC_SPARC is not set\n# CONFIG_XZ_DEC_MICROLZMA is not set\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_REED_SOLOMON=y\nCONFIG_REED_SOLOMON_ENC8=y\nCONFIG_REED_SOLOMON_DEC8=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_DMA_OPS=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_DMA_DECLARE_COHERENT=y\nCONFIG_ARCH_HAS_SETUP_DMA_OPS=y\nCONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y\nCONFIG_ARCH_HAS_DMA_PREP_COHERENT=y\nCONFIG_SWIOTLB=y\n# CONFIG_DMA_RESTRICTED_POOL is not set\nCONFIG_DMA_NONCOHERENT_MMAP=y\nCONFIG_DMA_COHERENT_POOL=y\nCONFIG_DMA_DIRECT_REMAP=y\nCONFIG_DMA_CMA=y\n# CONFIG_DMA_PERNUMA_CMA is not set\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=5\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\n# CONFIG_FORCE_NR_CPUS is not set\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_DIMLIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_UCS2_STRING=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_GENERIC_VDSO_TIME_NS=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\nCONFIG_SG_POOL=y\nCONFIG_ARCH_STACKWALK=y\nCONFIG_STACKDEPOT=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_GENERIC_IOREMAP=y\nCONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\n# CONFIG_STACKTRACE_BUILD_ID is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\nCONFIG_DYNAMIC_DEBUG_CORE=y\nCONFIG_SYMBOLIC_ERRNAME=y\n# CONFIG_DEBUG_BUGVERBOSE is not set\n# end of printk and dmesg options\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_AS_HAS_NON_CONST_LEB128=y\nCONFIG_DEBUG_INFO_NONE=y\n# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\nCONFIG_FRAME_WARN=2048\nCONFIG_STRIP_ASM_SYMS=y\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\n# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B is not set\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_VMLINUX_MAP is not set\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=\"\"\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\nCONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_ARCH_KCSAN=y\nCONFIG_HAVE_KCSAN_COMPILER=y\n# CONFIG_KCSAN is not set\n# end of Generic Kernel Debugging Instruments\n\n#\n# Networking Debugging\n#\n# CONFIG_NET_DEV_REFCNT_TRACKER is not set\n# CONFIG_NET_NS_REFCNT_TRACKER is not set\n# CONFIG_DEBUG_NET is not set\n# end of Networking Debugging\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_PAGE_REF is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\nCONFIG_ARCH_HAS_DEBUG_WX=y\n# CONFIG_DEBUG_WX is not set\nCONFIG_GENERIC_PTDUMP=y\n# CONFIG_PTDUMP_DEBUGFS is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SHRINKER_DEBUG is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\nCONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y\n# CONFIG_DEBUG_VM is not set\n# CONFIG_DEBUG_VM_PGTABLE is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\n# CONFIG_DEBUG_MEMORY_INIT is not set\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_SW_TAGS=y\nCONFIG_HAVE_ARCH_KASAN_HW_TAGS=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_KASAN_SW_TAGS=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\n# CONFIG_SOFTLOCKUP_DETECTOR is not set\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\n# CONFIG_SCHED_DEBUG is not set\n# CONFIG_SCHEDSTATS is not set\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_RWSEMS is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# CONFIG_CSD_LOCK_WAIT_DEBUG is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_DEBUG_MAPLE_TREE is not set\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\nCONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACER_MAX_TRACE=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_RING_BUFFER_ALLOW_SWAP=y\nCONFIG_TRACING=y\nCONFIG_GENERIC_TRACER=y\nCONFIG_TRACING_SUPPORT=y\nCONFIG_FTRACE=y\nCONFIG_BOOTTIME_TRACING=y\nCONFIG_FUNCTION_TRACER=y\nCONFIG_FUNCTION_GRAPH_TRACER=y\nCONFIG_DYNAMIC_FTRACE=y\nCONFIG_DYNAMIC_FTRACE_WITH_REGS=y\n# CONFIG_FUNCTION_PROFILER is not set\nCONFIG_STACK_TRACER=y\n# CONFIG_IRQSOFF_TRACER is not set\n# CONFIG_SCHED_TRACER is not set\n# CONFIG_HWLAT_TRACER is not set\n# CONFIG_OSNOISE_TRACER is not set\n# CONFIG_TIMERLAT_TRACER is not set\n# CONFIG_FTRACE_SYSCALLS is not set\nCONFIG_TRACER_SNAPSHOT=y\nCONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP=y\nCONFIG_BRANCH_PROFILE_NONE=y\n# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set\n# CONFIG_PROFILE_ALL_BRANCHES is not set\nCONFIG_BLK_DEV_IO_TRACE=y\nCONFIG_KPROBE_EVENTS=y\n# CONFIG_KPROBE_EVENTS_ON_NOTRACE is not set\n# CONFIG_UPROBE_EVENTS is not set\nCONFIG_BPF_EVENTS=y\nCONFIG_DYNAMIC_EVENTS=y\nCONFIG_PROBE_EVENTS=y\n# CONFIG_BPF_KPROBE_OVERRIDE is not set\nCONFIG_FTRACE_MCOUNT_RECORD=y\nCONFIG_FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY=y\n# CONFIG_SYNTH_EVENTS is not set\n# CONFIG_HIST_TRIGGERS is not set\n# CONFIG_TRACE_EVENT_INJECT is not set\n# CONFIG_TRACEPOINT_BENCHMARK is not set\n# CONFIG_RING_BUFFER_BENCHMARK is not set\n# CONFIG_TRACE_EVAL_MAP_FILE is not set\n# CONFIG_FTRACE_RECORD_RECURSION is not set\n# CONFIG_FTRACE_STARTUP_TEST is not set\n# CONFIG_RING_BUFFER_STARTUP_TEST is not set\n# CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is not set\n# CONFIG_PREEMPTIRQ_DELAY_TEST is not set\n# CONFIG_KPROBE_EVENT_GEN_TEST is not set\n# CONFIG_RV is not set\n# CONFIG_SAMPLES is not set\n# CONFIG_STRICT_DEVMEM is not set\n\n#\n# arm64 Debugging\n#\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_ARM64_RELOC_TEST is not set\n# CONFIG_CORESIGHT is not set\n# end of arm64 Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\nCONFIG_FUNCTION_ERROR_INJECTION=y\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\n# CONFIG_RUNTIME_TESTING_MENU is not set\nCONFIG_ARCH_USE_MEMTEST=y\n# CONFIG_MEMTEST is not set\n# end of Kernel Testing and Coverage\n\n#\n# Rust hacking\n#\n# end of Rust hacking\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/options",
    "content": "################################################################################\n# Device defaults\n################################################################################\n\n  # NOOBS supported hex versions (legacy) is not relevant for RPi4\n    unset NOOBS_HEX\n\n  # NOOBS supported model versions\n    NOOBS_SUPPORTED_MODELS='\"Pi 5\"'\n\n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n    FIRMWARE=\"${FIRMWARE} rpi-eeprom flashrom\"\n\n  # set the addon project\n    ADDON_PROJECT=\"ARMv8\"\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        TARGET_CPU=\"cortex-a76\"\n        TARGET_CPU_FLAGS=\"+crc+crypto\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_KERNEL_PATCH_ARCH=\"aarch64\"\n        TARGET_FLOAT=\"hard\"\n        # cortex-a72 caused issues in the past, so use a53\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc+crypto\"\n        TARGET_FPU=\"neon-fp-armv8\"\n        ;;\n    esac\n\n  # Kernel target\n    KERNEL_TARGET=\"Image\"\n\n  # debug tty path\n    DEBUG_TTY=\"/dev/ttyAMA10\"\n\n  # serial console\n    EXTRA_CMDLINE=\"console=ttyAMA10,115200 console=tty0\"\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0001-broadcom-cle-clif-common-simulator-add-7.1-version-o.patch",
    "content": "From f62aa2640f92796ff5216da0a5d3c8f46a2855b4 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Mon, 26 Apr 2021 00:02:21 +0200\nSubject: [PATCH 001/142] broadcom(cle,clif,common,simulator): add 7.1 version\n on the list of versions to build\n\nThis adds 7.1 to the list of available V3D_VERSION, and first changes\non the simulator needed to get it working.\n\nNote that we needed to touch all those 4 codebases because it is\nneeded if we want to use V3D_DEBUG=clif with the simulator, that it is\nthe easier way to see which packets a vulkan program is using.\n\nAbout the simulator, this commit only handle the rename of some\nregisters. Any additional changes needed to get a proper support for\nv71 will be handled them on following commits.\n---\n src/broadcom/cle/meson.build            |  3 +-\n src/broadcom/cle/v3dx_pack.h            |  2 +\n src/broadcom/clif/clif_private.h        |  2 +\n src/broadcom/common/v3d_device_info.c   |  1 +\n src/broadcom/common/v3d_macros.h        |  3 +\n src/broadcom/meson.build                |  2 +-\n src/broadcom/simulator/v3d_simulator.c  | 81 +++++++++++++++++++------\n src/broadcom/simulator/v3d_simulator.h  |  5 ++\n src/broadcom/simulator/v3dx_simulator.c | 31 ++++++++--\n 9 files changed, 106 insertions(+), 24 deletions(-)\n\ndiff --git a/src/broadcom/cle/meson.build b/src/broadcom/cle/meson.build\nindex 31a0d5bfa94..8ac32b313e4 100644\n--- a/src/broadcom/cle/meson.build\n+++ b/src/broadcom/cle/meson.build\n@@ -23,7 +23,8 @@ v3d_versions = [\n   [21, 21],\n   [33, 33],\n   [41, 33],\n-  [42, 33]\n+  [42, 33],\n+  [71, 33]\n ]\n \n v3d_xml_files = []\ndiff --git a/src/broadcom/cle/v3dx_pack.h b/src/broadcom/cle/v3dx_pack.h\nindex 5762e5aaa70..e5a1eb26698 100644\n--- a/src/broadcom/cle/v3dx_pack.h\n+++ b/src/broadcom/cle/v3dx_pack.h\n@@ -37,6 +37,8 @@\n #  include \"cle/v3d_packet_v41_pack.h\"\n #elif (V3D_VERSION == 42)\n #  include \"cle/v3d_packet_v42_pack.h\"\n+#elif (V3D_VERSION == 71)\n+#  include \"cle/v3d_packet_v71_pack.h\"\n #else\n #  error \"Need to add a pack header include for this v3d version\"\n #endif\ndiff --git a/src/broadcom/clif/clif_private.h b/src/broadcom/clif/clif_private.h\nindex 6ace62b0310..cda407a00bf 100644\n--- a/src/broadcom/clif/clif_private.h\n+++ b/src/broadcom/clif/clif_private.h\n@@ -101,6 +101,8 @@ bool v3d41_clif_dump_packet(struct clif_dump *clif, uint32_t offset,\n                             const uint8_t *cl, uint32_t *size, bool reloc_mode);\n bool v3d42_clif_dump_packet(struct clif_dump *clif, uint32_t offset,\n                             const uint8_t *cl, uint32_t *size, bool reloc_mode);\n+bool v3d71_clif_dump_packet(struct clif_dump *clif, uint32_t offset,\n+                            const uint8_t *cl, uint32_t *size, bool reloc_mode);\n \n static inline void\n out(struct clif_dump *clif, const char *fmt, ...)\ndiff --git a/src/broadcom/common/v3d_device_info.c b/src/broadcom/common/v3d_device_info.c\nindex 272190eb2e5..7e0862f1f02 100644\n--- a/src/broadcom/common/v3d_device_info.c\n+++ b/src/broadcom/common/v3d_device_info.c\n@@ -66,6 +66,7 @@ v3d_get_device_info(int fd, struct v3d_device_info* devinfo, v3d_ioctl_fun drm_i\n         case 33:\n         case 41:\n         case 42:\n+        case 71:\n                 break;\n         default:\n                 fprintf(stderr,\ndiff --git a/src/broadcom/common/v3d_macros.h b/src/broadcom/common/v3d_macros.h\nindex fe89398208a..b4291fb5350 100644\n--- a/src/broadcom/common/v3d_macros.h\n+++ b/src/broadcom/common/v3d_macros.h\n@@ -41,6 +41,9 @@\n #elif (V3D_VERSION == 42)\n #  define V3DX(x) V3D42_##x\n #  define v3dX(x) v3d42_##x\n+#elif (V3D_VERSION == 71)\n+#  define V3DX(x) V3D71_##x\n+#  define v3dX(x) v3d71_##x\n #else\n #  error \"Need to add prefixing macros for this v3d version\"\n #endif\ndiff --git a/src/broadcom/meson.build b/src/broadcom/meson.build\nindex 2c10e46b188..73cb7aa0575 100644\n--- a/src/broadcom/meson.build\n+++ b/src/broadcom/meson.build\n@@ -22,7 +22,7 @@ inc_broadcom = include_directories('.', 'cle')\n \n subdir('cle')\n \n-v3d_versions = ['33', '41', '42']\n+v3d_versions = ['33', '41', '42', '71']\n v3d_libs = []\n \n if with_gallium_v3d or with_broadcom_vk\ndiff --git a/src/broadcom/simulator/v3d_simulator.c b/src/broadcom/simulator/v3d_simulator.c\nindex eea5d3f050e..5cceb1a82cc 100644\n--- a/src/broadcom/simulator/v3d_simulator.c\n+++ b/src/broadcom/simulator/v3d_simulator.c\n@@ -490,10 +490,20 @@ v3d_simulator_submit_cl_ioctl(int fd, struct drm_v3d_submit_cl *submit)\n \n         v3d_simulator_perfmon_switch(fd, submit->perfmon_id);\n \n-        if (sim_state.ver >= 41)\n-                v3d41_simulator_submit_cl_ioctl(sim_state.v3d, submit, file->gmp->ofs);\n-        else\n-                v3d33_simulator_submit_cl_ioctl(sim_state.v3d, submit, file->gmp->ofs);\n+        switch(sim_state.ver) {\n+        case 33:\n+           v3d33_simulator_submit_cl_ioctl(sim_state.v3d, submit, file->gmp->ofs);\n+           break;\n+        case 41:\n+        case 42:\n+           v3d41_simulator_submit_cl_ioctl(sim_state.v3d, submit, file->gmp->ofs);\n+           break;\n+        case 71:\n+           v3d71_simulator_submit_cl_ioctl(sim_state.v3d, submit, file->gmp->ofs);\n+           break;\n+        default:\n+           unreachable(\"Unsupported V3D version\\n\");\n+        }\n \n         util_dynarray_foreach(&sim_state.bin_oom, struct v3d_simulator_bo *,\n                               sim_bo) {\n@@ -635,10 +645,17 @@ v3d_simulator_gem_close_ioctl(int fd, struct drm_gem_close *args)\n static int\n v3d_simulator_get_param_ioctl(int fd, struct drm_v3d_get_param *args)\n {\n-        if (sim_state.ver >= 41)\n-                return v3d41_simulator_get_param_ioctl(sim_state.v3d, args);\n-        else\n+        switch(sim_state.ver) {\n+        case 33:\n                 return v3d33_simulator_get_param_ioctl(sim_state.v3d, args);\n+        case 41:\n+        case 42:\n+                return v3d41_simulator_get_param_ioctl(sim_state.v3d, args);\n+        case 71:\n+                return v3d71_simulator_get_param_ioctl(sim_state.v3d, args);\n+        default:\n+                unreachable(\"Unsupported V3D version\\n\");\n+        }\n }\n \n static int\n@@ -652,10 +669,20 @@ v3d_simulator_submit_tfu_ioctl(int fd, struct drm_v3d_submit_tfu *args)\n         v3d_simulator_copy_in_handle(file, args->bo_handles[2]);\n         v3d_simulator_copy_in_handle(file, args->bo_handles[3]);\n \n-        if (sim_state.ver >= 41)\n-                ret = v3d41_simulator_submit_tfu_ioctl(sim_state.v3d, args);\n-        else\n+        switch(sim_state.ver) {\n+        case 33:\n                 ret = v3d33_simulator_submit_tfu_ioctl(sim_state.v3d, args);\n+                break;\n+        case 41:\n+        case 42:\n+                ret = v3d41_simulator_submit_tfu_ioctl(sim_state.v3d, args);\n+                break;\n+        case 71:\n+                ret = v3d71_simulator_submit_tfu_ioctl(sim_state.v3d, args);\n+                break;\n+        default:\n+                unreachable(\"Unsupported V3D version\\n\");\n+        }\n \n         v3d_simulator_copy_out_handle(file, args->bo_handles[0]);\n \n@@ -682,11 +709,19 @@ v3d_simulator_submit_csd_ioctl(int fd, struct drm_v3d_submit_csd *args)\n \n         v3d_simulator_perfmon_switch(fd, args->perfmon_id);\n \n-        if (sim_state.ver >= 41)\n-                ret = v3d41_simulator_submit_csd_ioctl(sim_state.v3d, args,\n-                                                       file->gmp->ofs);\n-        else\n-                ret = -1;\n+        switch(sim_state.ver) {\n+        case 41:\n+        case 42:\n+           ret = v3d41_simulator_submit_csd_ioctl(sim_state.v3d, args,\n+                                                  file->gmp->ofs);\n+           break;\n+        case 71:\n+           ret = v3d71_simulator_submit_csd_ioctl(sim_state.v3d, args,\n+                                                  file->gmp->ofs);\n+           break;\n+        default:\n+           ret = -1;\n+        }\n \n         for (int i = 0; i < args->bo_handle_count; i++)\n                 v3d_simulator_copy_out_handle(file, bo_handles[i]);\n@@ -880,10 +915,20 @@ v3d_simulator_init_global()\n \n         util_dynarray_init(&sim_state.bin_oom, NULL);\n \n-        if (sim_state.ver >= 41)\n-                v3d41_simulator_init_regs(sim_state.v3d);\n-        else\n+        switch(sim_state.ver) {\n+        case 33:\n                 v3d33_simulator_init_regs(sim_state.v3d);\n+                break;\n+        case 41:\n+        case 42:\n+                v3d41_simulator_init_regs(sim_state.v3d);\n+                break;\n+        case 71:\n+                v3d71_simulator_init_regs(sim_state.v3d);\n+                break;\n+        default:\n+                unreachable(\"Not supported V3D version\\n\");\n+        }\n }\n \n struct v3d_simulator_file *\ndiff --git a/src/broadcom/simulator/v3d_simulator.h b/src/broadcom/simulator/v3d_simulator.h\nindex ddb079c1455..1472c313a03 100644\n--- a/src/broadcom/simulator/v3d_simulator.h\n+++ b/src/broadcom/simulator/v3d_simulator.h\n@@ -52,6 +52,11 @@ uint32_t v3d_simulator_get_mem_free(void);\n #  define v3dX(x) v3d41_##x\n #  include \"v3dx_simulator.h\"\n #  undef v3dX\n+\n+#  define v3dX(x) v3d71_##x\n+#  include \"v3dx_simulator.h\"\n+#  undef v3dX\n+\n #endif\n \n #endif\ndiff --git a/src/broadcom/simulator/v3dx_simulator.c b/src/broadcom/simulator/v3dx_simulator.c\nindex c9322f0397b..723796b16c9 100644\n--- a/src/broadcom/simulator/v3dx_simulator.c\n+++ b/src/broadcom/simulator/v3dx_simulator.c\n@@ -46,11 +46,15 @@\n \n #define HW_REGISTER_RO(x) (x)\n #define HW_REGISTER_RW(x) (x)\n-#if V3D_VERSION >= 41\n+#if V3D_VERSION == 71\n+#include \"libs/core/v3d/registers/7.1.5.1/v3d.h\"\n+#else\n+#if V3D_VERSION == 41 || V3D_VERSION == 42\n #include \"libs/core/v3d/registers/4.1.35.0/v3d.h\"\n #else\n #include \"libs/core/v3d/registers/3.3.0.0/v3d.h\"\n #endif\n+#endif\n \n #define V3D_WRITE(reg, val) v3d_hw_write_reg(v3d, reg, val)\n #define V3D_READ(reg) v3d_hw_read_reg(v3d, reg)\n@@ -310,16 +314,17 @@ v3d_isr_core(struct v3d_hw *v3d,\n                 return;\n         }\n \n+#if V3D_VERSION <= 42\n         if (core_status & V3D_CTL_0_INT_STS_INT_GMPV_SET) {\n                 fprintf(stderr, \"GMP violation at 0x%08x\\n\",\n                         V3D_READ(V3D_GMP_VIO_ADDR));\n-                abort();\n         } else {\n                 fprintf(stderr,\n                         \"Unexpected ISR with core status 0x%08x\\n\",\n                         core_status);\n         }\n         abort();\n+#endif\n }\n \n static void\n@@ -396,6 +401,18 @@ v3d_isr_hub(struct v3d_hw *v3d)\n         }\n \n         handle_mmu_interruptions(v3d, hub_status);\n+\n+#if V3D_VERSION == 71\n+        if (hub_status & V3D_HUB_CTL_INT_STS_INT_GMPV_SET) {\n+                fprintf(stderr, \"GMP violation at 0x%08x\\n\",\n+                        V3D_READ(V3D_GMP_VIO_ADDR));\n+        } else {\n+                fprintf(stderr,\n+                        \"Unexpected ISR with status 0x%08x\\n\",\n+                        hub_status);\n+        }\n+        abort();\n+#endif\n }\n \n static void\n@@ -436,8 +453,11 @@ v3dX(simulator_init_regs)(struct v3d_hw *v3d)\n          * for tracing. Perhaps we should evaluate to do the same here and add\n          * some debug options.\n          */\n-        uint32_t core_interrupts = (V3D_CTL_0_INT_STS_INT_GMPV_SET |\n-                                    V3D_CTL_0_INT_STS_INT_OUTOMEM_SET);\n+        uint32_t core_interrupts = V3D_CTL_0_INT_STS_INT_OUTOMEM_SET;\n+#if V3D_VERSION <= 42\n+        core_interrupts |= V3D_CTL_0_INT_STS_INT_GMPV_SET;\n+#endif\n+\n         V3D_WRITE(V3D_CTL_0_INT_MSK_SET, ~core_interrupts);\n         V3D_WRITE(V3D_CTL_0_INT_MSK_CLR, core_interrupts);\n \n@@ -447,6 +467,9 @@ v3dX(simulator_init_regs)(struct v3d_hw *v3d)\n             V3D_HUB_CTL_INT_STS_INT_MMU_CAP_SET |  /* CAP exceeded */\n             V3D_HUB_CTL_INT_STS_INT_TFUC_SET); /* TFU conversion */\n \n+#if V3D_VERSION == 71\n+        hub_interrupts |= V3D_HUB_CTL_INT_STS_INT_GMPV_SET;\n+#endif\n         V3D_WRITE(V3D_HUB_CTL_INT_MSK_SET, ~hub_interrupts);\n         V3D_WRITE(V3D_HUB_CTL_INT_MSK_CLR, hub_interrupts);\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0002-broadcom-simulator-reset-CFG7-for-compute-dispatch-i.patch",
    "content": "From 9e85edd1b347b0e779b393f463f42044a720bcff Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 28 Sep 2021 13:16:49 +0200\nSubject: [PATCH 002/142] broadcom/simulator: reset CFG7 for compute dispatch\n in v71\n\nThis register is new in 7.x, it doesn't seem that we need to\ndo anything specific for now, but let's make sure it is reset\nevery time.\n---\n src/broadcom/simulator/v3dx_simulator.c | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/src/broadcom/simulator/v3dx_simulator.c b/src/broadcom/simulator/v3dx_simulator.c\nindex 723796b16c9..f23b0538de3 100644\n--- a/src/broadcom/simulator/v3dx_simulator.c\n+++ b/src/broadcom/simulator/v3dx_simulator.c\n@@ -227,6 +227,9 @@ v3dX(simulator_submit_csd_ioctl)(struct v3d_hw *v3d,\n         V3D_WRITE(V3D_CSD_0_QUEUED_CFG4, args->cfg[4]);\n         V3D_WRITE(V3D_CSD_0_QUEUED_CFG5, args->cfg[5]);\n         V3D_WRITE(V3D_CSD_0_QUEUED_CFG6, args->cfg[6]);\n+#if V3D_VERSION >= 71\n+        V3D_WRITE(V3D_CSD_0_QUEUED_CFG7, 0);\n+#endif\n         /* CFG0 kicks off the job */\n         V3D_WRITE(V3D_CSD_0_QUEUED_CFG0, args->cfg[0]);\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0003-broadcom-cle-update-the-packet-definitions-for-new-g.patch",
    "content": "From 6f744bc4bec98f9769486d427e8e2d4e314ae056 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Tue, 29 Jun 2021 12:03:24 +0200\nSubject: [PATCH 003/142] broadcom/cle: update the packet definitions for new\n generation v71\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nUsing as reference the spec for 7.1.5. This include totally new\npackets, and redefine some that already existed on v42.\n\nFull list:\n * Add Depth Bounds Test Limits\n * Redefine Tile Binning Mode Cfg\n * Redefine Cfg Bits. There are some changes on the fields:\n   * Line Rasterization is now 1 bit size\n   * Depth Bounds Enable (that takes one of the bits of Line Rasterization)\n   * Early-Z/Early-Z updates enable bits (16-17) figure now as reserved.\n   * New Z-Clipping mode field\n * Redefine Tile Rendering Mode Cfg (Common). Changes with respect to v42:\n   * New log2 tile height/width fields starting at bit 52/55\n   * Due those two news, end pad is smaller\n   * sub-id has now a size of 3. Bit 4 is reserved.\n   * Number of render targets: this field max value is now 7 (not\n     reflected on the xml).\n   * Maximum BPP is removed on v71 (now bits 40-41 are reserved)\n   * Depth Buffer disable: on bit 44\n * Update Store Tile Buffer General\n * Adding Cfg Render Target Part1/2/3 packets: they replace v4X \"Tile\n   Rendering Mode Cfg (Color)\" (real name \"Rendering Configuration\n   (Render Targets Config)\"), \"Tile Rendering Mode Cfg (Clear Colors\n   Part1)\", \"Tile Rendering Mode Cfg (Clear Colors Part2)\", and \"Tile\n   Rendering Mode Cfg (Clear Colors Part3)\". On those old versions,\n   the first packet is used to configure 4 render targets. Now that 8\n   are supported, invididual per-render-target are used.\n * Update ZS clear values packet.\n * Add new v71 output formats\n * Define Clear Render Targets (Replaces Clear Tile Buffers from v42)\n * Redefine GL Shader State Record. Changes copared with v42:\n   * Fields removed:\n     * \"Coordinate shader has separate input and output VPM blocks\"\n       (reserved bit now)\n     * \"Vertex shader has separate input and output VPM blocks\"\n       (reserved bit now)\n     * \"Address of table of default attribute Values.\" (we needed to\n       change the start position for all the following fields)\n   * New field:\n     * \"Never defer FEP depth writes to fragment shader auto Z writes\n        on scoreboard conflict\"\n * Redefine clipper xy scaling: Now it uses 1/64ths of pixels, instead\n   of 1/256ths\n * Update texture shader state.\n   * Notice we don't use an address type for these fields in the XML\n     description. This is because the addresses are 64-bit aligned\n     (even though the PRM doesn't say it) which means the 6 LSB bits\n     are implicitly 0, but the fields are encoded before the 6th bit\n     of their starting byte, so we can't use the usual trick we do\n     with address types where the first 6 bits in the byte are\n     implicitly overwritten by other fields and we have to encode this\n     manually as a uint field. This would mean that if we had an\n     actual BO we would also need to add it manually to the job's\n     list, but since we don't have one, we don't have to do anything\n     about it.\n   * Add new RB_Swap field for texture shader state\n   * Document Cb/Cr addresses as uint fields in texture shader state\n * Fixup Blend Config description: we now support 8 RTs.\n * TMU config parameter 2 has new fields\n * Add new clipper Z without guardband packet in v71\n * Add enums for the Z clip modes accepted in v71\n * Fix texture state array stride packing for V3D 7.1.5\n\nSigned-off-by: Iago Toral Quiroga <itoral@igalia.com>\nSigned-off-by: Alejandro Piñeiro <apinheiro@igalia.com>\n\nbroadcom/cle: rb_swap\n---\n src/broadcom/cle/v3d_packet_v33.xml | 386 ++++++++++++++++++++++++++--\n 1 file changed, 368 insertions(+), 18 deletions(-)\n\ndiff --git a/src/broadcom/cle/v3d_packet_v33.xml b/src/broadcom/cle/v3d_packet_v33.xml\nindex a0242b5f1c2..624353ca2bf 100644\n--- a/src/broadcom/cle/v3d_packet_v33.xml\n+++ b/src/broadcom/cle/v3d_packet_v33.xml\n@@ -1,4 +1,4 @@\n-<vcxml gen=\"3.3\" min_ver=\"33\" max_ver=\"42\">\n+<vcxml gen=\"3.3\" min_ver=\"33\" max_ver=\"71\">\n \n   <enum name=\"Compare Function\" prefix=\"V3D_COMPARE_FUNC\">\n     <value name=\"NEVER\" value=\"0\"/>\n@@ -167,13 +167,36 @@\n     <value name=\"depth_16\" value=\"2\"/>\n   </enum>\n \n-  <enum name=\"Render Target Clamp\" prefix=\"V3D_RENDER_TARGET_CLAMP\" min_ver=\"41\">\n+  <enum name=\"Render Target Clamp\" prefix=\"V3D_RENDER_TARGET_CLAMP\" min_ver=\"41\" max_ver=\"42\">\n     <value name=\"none\" value=\"0\"/> <!-- no clamping -->\n     <value name=\"norm\" value=\"1\"/> <!-- [0,1] for f16 -->\n     <value name=\"pos\" value=\"2\"/> <!-- [0, for f16 -->\n     <value name=\"int\" value=\"3\" min_ver=\"42\"/> <!-- clamp to integer RT's range -->\n   </enum>\n \n+  <enum name=\"Render Target Type Clamp\" prefix=\"V3D_RENDER_TARGET_TYPE_CLAMP\" min_ver=\"71\">\n+    <value name=\"8i\"             value=\"0\"/>  <!-- no clamping -->\n+    <value name=\"16i\"            value=\"1\"/>  <!-- no clamping -->\n+    <value name=\"32i\"            value=\"2\"/>  <!-- no clamping -->\n+    <value name=\"8ui\"            value=\"4\"/>  <!-- no clamping -->\n+    <value name=\"16ui\"           value=\"5\"/>  <!-- no clamping -->\n+    <value name=\"32ui\"           value=\"6\"/>  <!-- no clamping -->\n+    <value name=\"8\"              value=\"8\"/>  <!-- no clamping -->\n+    <value name=\"16f\"            value=\"9\"/>  <!-- no clamping -->\n+    <value name=\"32f\"            value=\"10\"/> <!-- no clamping -->\n+    <value name=\"8i_clamped\"     value=\"16\"/> <!-- clamp to integer RT's range -->\n+    <value name=\"16i_clamped\"    value=\"17\"/> <!-- clamp to integer RT's range -->\n+    <value name=\"32i_clamped\"    value=\"18\"/> <!-- clamp to integer RT's range -->\n+    <value name=\"8ui_clamped\"    value=\"20\"/> <!-- clamp to integer RT's range -->\n+    <value name=\"16ui_clamped\"   value=\"21\"/> <!-- clamp to integer RT's range -->\n+    <value name=\"32ui_clamped\"   value=\"22\"/> <!-- clamp to integer RT's range -->\n+    <value name=\"16f_clamp_norm\" value=\"24\"/> <!-- [0,1] for f16 -->\n+    <value name=\"16f_clamp_pos\"  value=\"25\"/> <!-- [0, for f16 -->\n+    <value name=\"16f_clamp_pq\"   value=\"26\"/> <!-- PQ lin range, colour to [0, 125], alpha to [0, 1] for f16 -->\n+    <value name=\"16f_clamp_hlg\"  value=\"27\"/> <!-- HLG lin range, colour to [0, 12], alpha to [0, 1] for f16 -->\n+    <value name=\"invalid\"        value=\"32\"/>\n+  </enum>\n+\n   <!---\n     CL cache flush commands are not fully documented and subject to a\n     number of hardware issues that make them unreliable. Specifically:\n@@ -263,13 +286,27 @@\n     <value name=\"r8ui\"     value=\"36\"/>\n     <value name=\"srgbx8\"   value=\"37\" max_ver=\"33\"/>\n     <value name=\"rgbx8\"    value=\"38\" max_ver=\"33\"/>\n-    <value name=\"bstc\"     value=\"39\" min_ver=\"41\"/>\n+    <value name=\"bstc8\"    value=\"39\" min_ver=\"41\"/>\n     <value name=\"d32f\"     value=\"40\" min_ver=\"41\"/>\n     <value name=\"d24\"      value=\"41\" min_ver=\"41\"/>\n     <value name=\"d16\"      value=\"42\" min_ver=\"41\"/>\n     <value name=\"d24s8\"    value=\"43\" min_ver=\"41\"/>\n     <value name=\"s8\"       value=\"44\" min_ver=\"41\"/>\n     <value name=\"rgba5551\" value=\"45\" min_ver=\"41\"/>\n+    <value name=\"bstc8_srgb\"          value=\"46\" min_ver=\"71\"/>\n+    <value name=\"bstc10\"              value=\"47\" min_ver=\"71\"/>\n+    <value name=\"bstc10_srgb\"         value=\"48\" min_ver=\"71\"/>\n+    <value name=\"bstc10_pq\"           value=\"49\" min_ver=\"71\"/>\n+    <value name=\"rgba10x6\"            value=\"50\" min_ver=\"71\"/>\n+    <value name=\"bstc10_hlg\"          value=\"55\" min_ver=\"71\"/>\n+    <value name=\"rgba10x6_hlg\"        value=\"56\" min_ver=\"71\"/>\n+    <value name=\"rgb10_a2_hlg\"        value=\"57\" min_ver=\"71\"/>\n+    <value name=\"bstc10_pq_bt1886\"    value=\"58\" min_ver=\"71\"/>\n+    <value name=\"rgba10x6_pq_bt1886\"  value=\"59\" min_ver=\"71\"/>\n+    <value name=\"rgb10_a2_pq_bt1886\"  value=\"60\" min_ver=\"71\"/>\n+    <value name=\"bstc10_hlg_bt1886\"   value=\"61\" min_ver=\"71\"/>\n+    <value name=\"rgba10x6_hlg_bt1886\" value=\"62\" min_ver=\"71\"/>\n+    <value name=\"rgb10_a2_hlg_bt1886\" value=\"63\" min_ver=\"71\"/>\n   </enum>\n \n   <enum name=\"Z/S Output Image Format\" prefix=\"V3D_OUTPUT_IMAGE_FORMAT_ZS\" max_ver=\"33\">\n@@ -314,6 +351,12 @@\n     <value name=\"perp end caps\" value=\"1\"/>\n   </enum>\n \n+  <enum name=\"Z Clip Mode\" prefix=\"V3D_Z_CLIP_MODE\">\n+    <value name=\"NONE\" value=\"0\"/>\n+    <value name=\"MIN_ONE_TO_ONE\" value=\"1\"/>\n+    <value name=\"ZERO_TO_ONE\" value=\"2\"/>\n+  </enum>\n+\n   <packet code=\"0\" name=\"Halt\"/>\n   <packet code=\"1\" name=\"NOP\"/>\n   <packet code=\"4\" name=\"Flush\"/>\n@@ -381,11 +424,13 @@\n     <field name=\"Last Tile of Frame\" size=\"1\" start=\"0\" type=\"bool\"/>\n   </packet>\n \n-  <packet code=\"25\" shortname=\"clear\" name=\"Clear Tile Buffers\" cl=\"R\" min_ver=\"41\">\n+  <packet code=\"25\" shortname=\"clear\" name=\"Clear Tile Buffers\" cl=\"R\" min_ver=\"41\" max_ver=\"42\">\n     <field name=\"Clear Z/Stencil Buffer\" size=\"1\" start=\"1\" type=\"bool\"/>\n     <field name=\"Clear all Render Targets\" size=\"1\" start=\"0\" type=\"bool\"/>\n   </packet>\n \n+  <packet code=\"25\" shortname=\"clear_rt\" name=\"Clear Render Targets\" cl=\"R\" min_ver=\"71\"/>\n+\n   <packet code=\"26\" shortname=\"load\" name=\"Reload Tile Color Buffer\" cl=\"R\" max_ver=\"33\">\n     <field name=\"Disable Color Buffer load\" size=\"8\" start=\"8\" type=\"uint\"/>\n     <field name=\"Enable Z load\" size=\"1\" start=\"7\" type=\"bool\"/>\n@@ -443,6 +488,10 @@\n       <value name=\"Render target 1\" value=\"1\"/>\n       <value name=\"Render target 2\" value=\"2\"/>\n       <value name=\"Render target 3\" value=\"3\"/>\n+      <value name=\"Render target 4\" value=\"4\" min_ver=\"71\"/>\n+      <value name=\"Render target 5\" value=\"5\" min_ver=\"71\"/>\n+      <value name=\"Render target 6\" value=\"6\" min_ver=\"71\"/>\n+      <value name=\"Render target 7\" value=\"7\" min_ver=\"71\"/>\n       <value name=\"None\" value=\"8\"/>\n       <value name=\"Z\" value=\"9\"/>\n       <value name=\"Stencil\" value=\"10\"/>\n@@ -789,7 +838,7 @@\n     <field name=\"Alpha blend mode\" size=\"4\" start=\"0\" type=\"Blend Mode\"/>\n   </packet>\n \n-  <packet code=\"84\" name=\"Blend Cfg\" min_ver=\"41\">\n+  <packet code=\"84\" name=\"Blend Cfg\" min_ver=\"41\" max_ver=\"42\">\n     <field name=\"Render Target Mask\" size=\"4\" start=\"24\" type=\"uint\"/>\n     <field name=\"Color blend dst factor\" size=\"4\" start=\"20\" type=\"Blend Factor\"/>\n     <field name=\"Color blend src factor\" size=\"4\" start=\"16\" type=\"Blend Factor\"/>\n@@ -799,6 +848,16 @@\n     <field name=\"Alpha blend mode\" size=\"4\" start=\"0\" type=\"Blend Mode\"/>\n   </packet>\n \n+  <packet code=\"84\" name=\"Blend Cfg\" min_ver=\"71\">\n+    <field name=\"Render Target Mask\" size=\"8\" start=\"24\" type=\"uint\"/>\n+    <field name=\"Color blend dst factor\" size=\"4\" start=\"20\" type=\"Blend Factor\"/>\n+    <field name=\"Color blend src factor\" size=\"4\" start=\"16\" type=\"Blend Factor\"/>\n+    <field name=\"Color blend mode\" size=\"4\" start=\"12\" type=\"Blend Mode\"/>\n+    <field name=\"Alpha blend dst factor\" size=\"4\" start=\"8\" type=\"Blend Factor\"/>\n+    <field name=\"Alpha blend src factor\" size=\"4\" start=\"4\" type=\"Blend Factor\"/>\n+    <field name=\"Alpha blend mode\" size=\"4\" start=\"0\" type=\"Blend Mode\"/>\n+  </packet>\n+\n   <packet code=\"86\" shortname=\"blend_ccolor\" name=\"Blend Constant Color\">\n     <field name=\"Alpha (F16)\" size=\"16\" start=\"48\" type=\"uint\"/>\n     <field name=\"Blue (F16)\" size=\"16\" start=\"32\" type=\"uint\"/>\n@@ -828,7 +887,12 @@\n     <field name=\"address\" size=\"32\" start=\"0\" type=\"address\"/>\n   </packet>\n \n-  <packet code=\"96\" name=\"Cfg Bits\">\n+  <packet code=\"93\" name=\"Depth Bounds Test Limits\" min_ver=\"71\">\n+    <field name=\"Lower Test Limit\" size=\"32\" start=\"0\" type=\"float\"/>\n+    <field name=\"Upper Test Limit\" size=\"32\" start=\"32\" type=\"float\"/>\n+  </packet>\n+\n+  <packet code=\"96\" name=\"Cfg Bits\" max_ver=\"42\">\n     <field name=\"Direct3D Provoking Vertex\" size=\"1\" start=\"21\" type=\"bool\"/>\n     <field name=\"Direct3D 'Point-fill' mode\" size=\"1\" start=\"20\" type=\"bool\"/>\n     <field name=\"Blend enable\" size=\"1\" start=\"19\" type=\"bool\"/>\n@@ -846,6 +910,25 @@\n     <field name=\"Enable Forward Facing Primitive\" size=\"1\" start=\"0\" type=\"bool\"/>\n   </packet>\n \n+  <packet code=\"96\" name=\"Cfg Bits\" min_ver=\"71\">\n+    <field name=\"Z Clipping mode\" size=\"2\" start=\"22\" type=\"Z Clip Mode\"/>\n+    <field name=\"Direct3D Provoking Vertex\" size=\"1\" start=\"21\" type=\"bool\"/>\n+    <field name=\"Direct3D 'Point-fill' mode\" size=\"1\" start=\"20\" type=\"bool\"/>\n+    <field name=\"Blend enable\" size=\"1\" start=\"19\" type=\"bool\"/>\n+    <field name=\"Stencil enable\" size=\"1\" start=\"18\" type=\"bool\"/>\n+    <field name=\"Z updates enable\" size=\"1\" start=\"15\" type=\"bool\"/>\n+    <field name=\"Depth-Test Function\" size=\"3\" start=\"12\" type=\"Compare Function\"/>\n+    <field name=\"Direct3D Wireframe triangles mode\" size=\"1\" start=\"11\" type=\"bool\"/>\n+    <field name=\"Z Clamp Mode\" size=\"1\" start=\"10\" type=\"bool\"/>\n+    <field name=\"Rasterizer Oversample Mode\" size=\"2\" start=\"6\" type=\"uint\"/>\n+    <field name=\"Depth Bounds Test Enable\" size=\"1\" start=\"5\" type=\"bool\"/>\n+    <field name=\"Line Rasterization\" size=\"1\" start=\"4\" type=\"uint\"/>\n+    <field name=\"Enable Depth Offset\" size=\"1\" start=\"3\" type=\"bool\"/>\n+    <field name=\"Clockwise Primitives\" size=\"1\" start=\"2\" type=\"bool\"/>\n+    <field name=\"Enable Reverse Facing Primitive\" size=\"1\" start=\"1\" type=\"bool\"/>\n+    <field name=\"Enable Forward Facing Primitive\" size=\"1\" start=\"0\" type=\"bool\"/>\n+  </packet>\n+\n   <packet code=\"97\" shortname=\"zero_all_flatshade_flags\" name=\"Zero All Flat Shade Flags\"/>\n \n   <packet code=\"98\" shortname=\"flatshade_flags\" name=\"Flat Shade Flags\">\n@@ -907,16 +990,26 @@\n     <field name=\"Minimum Zw\" size=\"32\" start=\"0\" type=\"float\"/>\n   </packet>\n \n-  <packet shortname=\"clipper_xy\" name=\"Clipper XY Scaling\" code=\"110\" cl=\"B\">\n+  <packet shortname=\"clipper_xy\" name=\"Clipper XY Scaling\" code=\"110\" cl=\"B\" max_ver=\"42\">\n     <field name=\"Viewport Half-Height in 1/256th of pixel\" size=\"32\" start=\"32\" type=\"float\"/>\n     <field name=\"Viewport Half-Width in 1/256th of pixel\" size=\"32\" start=\"0\" type=\"float\"/>\n   </packet>\n \n+  <packet shortname=\"clipper_xy\" name=\"Clipper XY Scaling\" code=\"110\" cl=\"B\" min_ver=\"71\">\n+    <field name=\"Viewport Half-Height in 1/64th of pixel\" size=\"32\" start=\"32\" type=\"float\"/>\n+    <field name=\"Viewport Half-Width in 1/64th of pixel\" size=\"32\" start=\"0\" type=\"float\"/>\n+  </packet>\n+\n   <packet shortname=\"clipper_z\" name=\"Clipper Z Scale and Offset\" code=\"111\" cl=\"B\">\n     <field name=\"Viewport Z Offset (Zc to Zs)\" size=\"32\" start=\"32\" type=\"float\"/>\n     <field name=\"Viewport Z Scale (Zc to Zs)\" size=\"32\" start=\"0\" type=\"float\"/>\n   </packet>\n \n+  <packet shortname=\"clipper_z_no_guardband\" name=\"Clipper Z Scale and Offset no guardband\" code=\"112\" cl=\"B\" min_ver=\"71\">\n+    <field name=\"Viewport Z Offset (Zc to Zs)\" size=\"32\" start=\"32\" type=\"float\"/>\n+    <field name=\"Viewport Z Scale (Zc to Zs)\" size=\"32\" start=\"0\" type=\"float\"/>\n+  </packet>\n+\n   <packet name=\"Number of Layers\" code=\"119\" min_ver=\"41\">\n     <field name=\"Number of Layers\" size=\"8\" start=\"0\" type=\"uint\" minus_one=\"true\"/>\n   </packet>\n@@ -947,7 +1040,7 @@\n     <field name=\"sub-id\" size=\"1\" start=\"0\" type=\"uint\" default=\"0\"/>\n   </packet>\n \n-  <packet code=\"120\" name=\"Tile Binning Mode Cfg\" min_ver=\"41\">\n+  <packet code=\"120\" name=\"Tile Binning Mode Cfg\" min_ver=\"41\" max_ver=\"42\">\n \n     <field name=\"Height (in pixels)\" size=\"16\" start=\"48\" type=\"uint\" minus_one=\"true\"/>\n     <field name=\"Width (in pixels)\" size=\"16\" start=\"32\" type=\"uint\" minus_one=\"true\"/>\n@@ -971,6 +1064,35 @@\n     </field>\n   </packet>\n \n+  <packet code=\"120\" name=\"Tile Binning Mode Cfg\" min_ver=\"71\">\n+    <field name=\"Height (in pixels)\" size=\"16\" start=\"48\" type=\"uint\" minus_one=\"true\"/>\n+    <field name=\"Width (in pixels)\" size=\"16\" start=\"32\" type=\"uint\" minus_one=\"true\"/>\n+\n+    <field name=\"Log2 Tile Height\" size=\"3\" start=\"11\" type=\"uint\">\n+      <value name=\"tile height 8 pixels\" value=\"0\"/>\n+      <value name=\"tile height 16 pixels\" value=\"1\"/>\n+      <value name=\"tile height 32 pixels\" value=\"2\"/>\n+      <value name=\"tile height 64 pixels\" value=\"3\"/>\n+    </field>\n+    <field name=\"Log2 Tile Width\"  size=\"3\" start=\"8\" type=\"uint\">\n+      <value name=\"tile width 8 pixels\" value=\"0\"/>\n+      <value name=\"tile width 16 pixels\" value=\"1\"/>\n+      <value name=\"tile width 32 pixels\" value=\"2\"/>\n+      <value name=\"tile width 64 pixels\" value=\"3\"/>\n+    </field>\n+\n+    <field name=\"tile allocation block size\" size=\"2\" start=\"4\" type=\"uint\">\n+      <value name=\"tile allocation block size 64b\" value=\"0\"/>\n+      <value name=\"tile allocation block size 128b\" value=\"1\"/>\n+      <value name=\"tile allocation block size 256b\" value=\"2\"/>\n+    </field>\n+    <field name=\"tile allocation initial block size\" size=\"2\" start=\"2\" type=\"uint\">\n+      <value name=\"tile allocation initial block size 64b\" value=\"0\"/>\n+      <value name=\"tile allocation initial block size 128b\" value=\"1\"/>\n+      <value name=\"tile allocation initial block size 256b\" value=\"2\"/>\n+    </field>\n+  </packet>\n+\n   <packet code=\"120\" name=\"Tile Binning Mode Cfg (Part2)\" cl=\"B\" max_ver=\"33\">\n     <field name=\"Tile Allocation Memory Address\" size=\"32\" start=\"32\" type=\"address\"/>\n     <field name=\"Tile Allocation Memory Size\" size=\"32\" start=\"0\" type=\"uint\"/>\n@@ -1002,7 +1124,7 @@\n     <field name=\"sub-id\" size=\"4\" start=\"0\" type=\"uint\" default=\"0\"/>\n   </packet>\n \n-  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Common)\" cl=\"R\" min_ver=\"41\">\n+  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Common)\" cl=\"R\" min_ver=\"41\" max_ver=\"42\">\n     <field name=\"Pad\" size=\"12\" start=\"52\" type=\"uint\"/>\n \n     <field name=\"Early Depth/Stencil Clear\" size=\"1\" start=\"51\" type=\"bool\"/>\n@@ -1018,7 +1140,11 @@\n     <field name=\"Double-buffer in non-ms mode\" size=\"1\" start=\"43\" type=\"bool\"/>\n     <field name=\"Multisample Mode (4x)\" size=\"1\" start=\"42\" type=\"bool\"/>\n \n-    <field name=\"Maximum BPP of all render targets\" size=\"2\" start=\"40\" type=\"Internal BPP\"/>\n+    <field name=\"Maximum BPP of all render targets\" size=\"2\" start=\"40\" type=\"Internal BPP\">\n+      <value name=\"Render target maximum 32bpp\" value=\"0\"/>\n+      <value name=\"Render target maximum 64bpp\" value=\"1\"/>\n+      <value name=\"Render target maximum 128bpp\" value=\"2\"/>\n+    </field>\n \n     <field name=\"Image Height (pixels)\" size=\"16\" start=\"24\" type=\"uint\"/>\n     <field name=\"Image Width (pixels)\" size=\"16\" start=\"8\" type=\"uint\"/>\n@@ -1027,6 +1153,43 @@\n     <field name=\"sub-id\" size=\"4\" start=\"0\" type=\"uint\" default=\"0\"/>\n   </packet>\n \n+  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Common)\" cl=\"R\" min_ver=\"71\">\n+    <field name=\"Pad\" size=\"6\" start=\"58\" type=\"uint\"/>\n+\n+    <field name=\"Log2 Tile Height\" size=\"3\" start=\"55\" type=\"uint\">\n+      <value name=\"tile height 8 pixels\" value=\"0\"/>\n+      <value name=\"tile height 16 pixels\" value=\"1\"/>\n+      <value name=\"tile height 32 pixels\" value=\"2\"/>\n+      <value name=\"tile height 64 pixels\" value=\"3\"/>\n+    </field>\n+    <field name=\"Log2 Tile Width\"  size=\"3\" start=\"52\" type=\"uint\">\n+      <value name=\"tile width 8 pixels\" value=\"0\"/>\n+      <value name=\"tile width 16 pixels\" value=\"1\"/>\n+      <value name=\"tile width 32 pixels\" value=\"2\"/>\n+      <value name=\"tile width 64 pixels\" value=\"3\"/>\n+    </field>\n+\n+    <field name=\"Early Depth/Stencil Clear\" size=\"1\" start=\"51\" type=\"bool\"/>\n+    <field name=\"Internal Depth Type\" size=\"4\" start=\"47\" type=\"Internal Depth Type\"/>\n+\n+    <field name=\"Early-Z disable\" size=\"1\" start=\"46\" type=\"bool\"/>\n+\n+    <field name=\"Early-Z Test and Update Direction\" size=\"1\" start=\"45\" type=\"uint\">\n+      <value name=\"Early-Z direction LT/LE\" value=\"0\"/>\n+      <value name=\"Early-Z direction GT/GE\" value=\"1\"/>\n+    </field>\n+\n+    <field name=\"Depth-buffer disable\" size=\"1\" start=\"44\" type=\"bool\"/>\n+    <field name=\"Double-buffer in non-ms mode\" size=\"1\" start=\"43\" type=\"bool\"/>\n+    <field name=\"Multisample Mode (4x)\" size=\"1\" start=\"42\" type=\"bool\"/>\n+\n+    <field name=\"Image Height (pixels)\" size=\"16\" start=\"24\" type=\"uint\"/>\n+    <field name=\"Image Width (pixels)\" size=\"16\" start=\"8\" type=\"uint\"/>\n+    <field name=\"Number of Render Targets\" size=\"4\" start=\"4\" type=\"uint\" minus_one=\"true\"/>\n+\n+    <field name=\"sub-id\" size=\"3\" start=\"0\" type=\"uint\" default=\"0\"/>\n+  </packet>\n+\n   <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Color)\" cl=\"R\" max_ver=\"33\">\n     <field name=\"Address\" size=\"32\" start=\"32\" type=\"address\"/>\n \n@@ -1048,7 +1211,8 @@\n     <field name=\"sub-id\" size=\"4\" start=\"0\" type=\"uint\" default=\"2\"/>\n   </packet>\n \n-  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Color)\" cl=\"R\" min_ver=\"41\">\n+  <!-- On 4.1 the real name would be \"Tile Rendering Mode Cfg (Render Target Configs) -->\n+  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Color)\" cl=\"R\" min_ver=\"41\" max_ver=\"42\">\n \n     <field name=\"Pad\" size=\"28\" start=\"36\" type=\"uint\"/>\n \n@@ -1099,7 +1263,7 @@\n     <field name=\"sub-id\" size=\"4\" start=\"0\" type=\"uint\" default=\"3\"/>\n   </packet>\n \n-  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (ZS Clear Values)\" cl=\"R\" min_ver=\"41\">\n+  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (ZS Clear Values)\" cl=\"R\" min_ver=\"41\" max_ver=\"42\">\n     <field name=\"unused\" size=\"16\" start=\"48\" type=\"uint\"/>\n \n     <field name=\"Z Clear Value\" size=\"32\" start=\"16\" type=\"float\"/>\n@@ -1108,6 +1272,15 @@\n     <field name=\"sub-id\" size=\"4\" start=\"0\" type=\"uint\" default=\"2\"/>\n   </packet>\n \n+  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (ZS Clear Values)\" cl=\"R\" min_ver=\"71\">\n+    <field name=\"unused\" size=\"16\" start=\"48\" type=\"uint\"/>\n+\n+    <field name=\"Z Clear Value\" size=\"32\" start=\"16\" type=\"float\"/>\n+\n+    <field name=\"Stencil Clear Value\" size=\"8\" start=\"8\" type=\"uint\"/>\n+    <field name=\"sub-id\" size=\"4\" start=\"0\" type=\"uint\" default=\"1\"/>\n+  </packet>\n+\n   <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Clear Colors Part1)\" cl=\"R\" max_ver=\"33\">\n     <!-- Express this as a 56-bit field? -->\n     <field name=\"Clear Color next 24 bits\" size=\"24\" start=\"40\" type=\"uint\"/>\n@@ -1117,7 +1290,7 @@\n     <field name=\"sub-id\" size=\"4\" start=\"0\" type=\"uint\" default=\"4\"/>\n   </packet>\n \n-  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Clear Colors Part1)\" cl=\"R\" min_ver=\"41\">\n+  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Clear Colors Part1)\" cl=\"R\" min_ver=\"41\" max_ver=\"42\">\n     <!-- Express this as a 56-bit field? -->\n     <field name=\"Clear Color next 24 bits\" size=\"24\" start=\"40\" type=\"uint\"/>\n     <field name=\"Clear Color low 32 bits\" size=\"32\" start=\"8\" type=\"uint\"/>\n@@ -1126,6 +1299,19 @@\n     <field name=\"sub-id\" size=\"4\" start=\"0\" type=\"uint\" default=\"3\"/>\n   </packet>\n \n+  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Render Target Part1)\" cl=\"R\" min_ver=\"71\">\n+\n+    <field name=\"Clear Color low bits\" size=\"32\" start=\"32\" type=\"uint\"/>\n+    <field name=\"Internal Type and Clamping\" size=\"5\" start=\"27\" type=\"Render Target Type Clamp\"/>\n+    <field name=\"Internal BPP\" size=\"2\" start=\"25\" type=\"Internal BPP\"/>\n+\n+    <field name=\"Stride\" size=\"7\" start=\"18\" type=\"uint\" minus_one=\"true\"/>\n+    <!-- In multiples of 512 bits -->\n+    <field name=\"Base Address\" size=\"11\" start=\"7\" type=\"uint\"/>\n+    <field name=\"Render Target number\" size=\"3\" start=\"3\" type=\"uint\"/>\n+    <field name=\"sub-id\" size=\"3\" start=\"0\" type=\"uint\" default=\"2\"/>\n+  </packet>\n+\n   <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Clear Colors Part2)\" cl=\"R\" max_ver=\"33\">\n     <!-- Express this as a 56-bit field? -->\n     <field name=\"Clear Color mid-high 24 bits\" size=\"24\" start=\"40\" type=\"uint\"/>\n@@ -1135,7 +1321,7 @@\n     <field name=\"sub-id\" size=\"4\" start=\"0\" type=\"uint\" default=\"5\"/>\n   </packet>\n \n-  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Clear Colors Part2)\" cl=\"R\" min_ver=\"41\">\n+  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Clear Colors Part2)\" cl=\"R\" min_ver=\"41\" max_ver=\"42\">\n     <!-- Express this as a 56-bit field? -->\n     <field name=\"Clear Color mid-high 24 bits\" size=\"24\" start=\"40\" type=\"uint\"/>\n     <field name=\"Clear Color mid-low 32 bits\" size=\"32\" start=\"8\" type=\"uint\"/>\n@@ -1144,6 +1330,13 @@\n     <field name=\"sub-id\" size=\"4\" start=\"0\" type=\"uint\" default=\"4\"/>\n   </packet>\n \n+  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Render Target Part2)\" cl=\"R\" min_ver=\"71\">\n+    <field name=\"Clear Color mid bits\" size=\"40\" start=\"24\" type=\"uint\"/>\n+\n+    <field name=\"Render Target number\" size=\"3\" start=\"3\" type=\"uint\"/>\n+    <field name=\"sub-id\" size=\"3\" start=\"0\" type=\"uint\" default=\"3\"/>\n+  </packet>\n+\n   <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Clear Colors Part3)\" cl=\"R\" max_ver=\"33\">\n     <field name=\"pad\" size=\"11\" start=\"53\" type=\"uint\"/>\n     <field name=\"UIF padded height in UIF blocks\" size=\"13\" start=\"40\" type=\"uint\"/>\n@@ -1155,7 +1348,7 @@\n     <field name=\"sub-id\" size=\"4\" start=\"0\" type=\"uint\" default=\"6\"/>\n   </packet>\n \n-  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Clear Colors Part3)\" cl=\"R\" min_ver=\"41\">\n+  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Clear Colors Part3)\" cl=\"R\" min_ver=\"41\" max_ver=\"42\">\n     <field name=\"pad\" size=\"11\" start=\"53\" type=\"uint\"/>\n     <field name=\"UIF padded height in UIF blocks\" size=\"13\" start=\"40\" type=\"uint\"/>\n     <!-- image height is for Y flipping -->\n@@ -1166,6 +1359,13 @@\n     <field name=\"sub-id\" size=\"4\" start=\"0\" type=\"uint\" default=\"5\"/>\n   </packet>\n \n+  <packet code=\"121\" name=\"Tile Rendering Mode Cfg (Render Target Part3)\" cl=\"R\" min_ver=\"71\">\n+    <field name=\"Clear Color top bits\" size=\"56\" start=\"8\" type=\"uint\"/>\n+\n+    <field name=\"Render Target number\" size=\"3\" start=\"3\" type=\"uint\"/>\n+    <field name=\"sub-id\" size=\"3\" start=\"0\" type=\"uint\" default=\"4\"/>\n+  </packet>\n+\n   <packet code=\"124\" shortname=\"tile_coords\" name=\"Tile Coordinates\">\n     <field name=\"tile row number\" size=\"12\" start=\"12\" type=\"uint\"/>\n     <field name=\"tile column number\" size=\"12\" start=\"0\" type=\"uint\"/>\n@@ -1240,7 +1440,7 @@\n     <field name=\"Coordinate Shader Uniforms Address\" size=\"32\" start=\"32b\" type=\"address\"/>\n   </struct>\n \n-  <struct name=\"GL Shader State Record\" min_ver=\"41\">\n+  <struct name=\"GL Shader State Record\" min_ver=\"41\" max_ver=\"42\">\n     <field name=\"Point size in shaded vertex data\" size=\"1\" start=\"0\" type=\"bool\"/>\n     <field name=\"Enable clipping\" size=\"1\" start=\"1\" type=\"bool\"/>\n \n@@ -1299,6 +1499,63 @@\n     <field name=\"Coordinate Shader Uniforms Address\" size=\"32\" start=\"32b\" type=\"address\"/>\n   </struct>\n \n+  <struct name=\"GL Shader State Record\" min_ver=\"71\">\n+    <field name=\"Point size in shaded vertex data\" size=\"1\" start=\"0\" type=\"bool\"/>\n+    <field name=\"Enable clipping\" size=\"1\" start=\"1\" type=\"bool\"/>\n+\n+    <field name=\"Vertex ID read by coordinate shader\" size=\"1\" start=\"2\" type=\"bool\"/>\n+    <field name=\"Instance ID read by coordinate shader\" size=\"1\" start=\"3\" type=\"bool\"/>\n+    <field name=\"Base Instance ID read by coordinate shader\" size=\"1\" start=\"4\" type=\"bool\"/>\n+    <field name=\"Vertex ID read by vertex shader\" size=\"1\" start=\"5\" type=\"bool\"/>\n+    <field name=\"Instance ID read by vertex shader\" size=\"1\" start=\"6\" type=\"bool\"/>\n+    <field name=\"Base Instance ID read by vertex shader\" size=\"1\" start=\"7\" type=\"bool\"/>\n+\n+    <field name=\"Fragment shader does Z writes\" size=\"1\" start=\"8\" type=\"bool\"/>\n+    <field name=\"Turn off early-z test\" size=\"1\" start=\"9\" type=\"bool\"/>\n+\n+    <field name=\"Fragment shader uses real pixel centre W in addition to centroid W2\" size=\"1\" start=\"12\" type=\"bool\"/>\n+    <field name=\"Enable Sample Rate Shading\" size=\"1\" start=\"13\" type=\"bool\"/>\n+    <field name=\"Any shader reads hardware-written Primitive ID\" size=\"1\" start=\"14\" type=\"bool\"/>\n+    <field name=\"Insert Primitive ID as first varying to fragment shader\" size=\"1\" start=\"15\" type=\"bool\"/>\n+    <field name=\"Turn off scoreboard\" size=\"1\" start=\"16\" type=\"bool\"/>\n+    <field name=\"Do scoreboard wait on first thread switch\" size=\"1\" start=\"17\" type=\"bool\"/>\n+    <field name=\"Disable implicit point/line varyings\" size=\"1\" start=\"18\" type=\"bool\"/>\n+    <field name=\"No prim pack\" size=\"1\" start=\"19\" type=\"bool\"/>\n+    <field name=\"Never defer FEP depth writes\" size=\"1\" start=\"20\" type=\"bool\"/>\n+\n+    <field name=\"Number of varyings in Fragment Shader\" size=\"8\" start=\"3b\" type=\"uint\"/>\n+\n+    <field name=\"Coordinate Shader output VPM segment size\" size=\"4\" start=\"4b\" type=\"uint\"/>\n+    <field name=\"Min Coord Shader output segments required in play in addition to VCM cache size\" size=\"4\" start=\"36\" type=\"uint\"/>\n+\n+    <field name=\"Coordinate Shader input VPM segment size\" size=\"4\" start=\"5b\" type=\"uint\"/>\n+    <field name=\"Min Coord Shader input segments required in play\" size=\"4\" start=\"44\" type=\"uint\" minus_one=\"true\"/>\n+\n+    <field name=\"Vertex Shader output VPM segment size\" size=\"4\" start=\"6b\" type=\"uint\"/>\n+    <field name=\"Min Vertex Shader output segments required in play in addition to VCM cache size\" size=\"4\" start=\"52\" type=\"uint\"/>\n+\n+    <field name=\"Vertex Shader input VPM segment size\" size=\"4\" start=\"7b\" type=\"uint\"/>\n+    <field name=\"Min Vertex Shader input segments required in play\" size=\"4\" start=\"60\" type=\"uint\" minus_one=\"true\"/>\n+\n+    <field name=\"Fragment Shader Code Address\" size=\"29\" start=\"67\" type=\"address\"/>\n+    <field name=\"Fragment Shader 4-way threadable\" size=\"1\" start=\"64\" type=\"bool\"/>\n+    <field name=\"Fragment Shader start in final thread section\" size=\"1\" start=\"65\" type=\"bool\"/>\n+    <field name=\"Fragment Shader Propagate NaNs\" size=\"1\" start=\"66\" type=\"bool\"/>\n+    <field name=\"Fragment Shader Uniforms Address\" size=\"32\" start=\"12b\" type=\"address\"/>\n+\n+    <field name=\"Vertex Shader Code Address\" size=\"29\" start=\"131\" type=\"address\"/>\n+    <field name=\"Vertex Shader 4-way threadable\" size=\"1\" start=\"128\" type=\"bool\"/>\n+    <field name=\"Vertex Shader start in final thread section\" size=\"1\" start=\"129\" type=\"bool\"/>\n+    <field name=\"Vertex Shader Propagate NaNs\" size=\"1\" start=\"130\" type=\"bool\"/>\n+    <field name=\"Vertex Shader Uniforms Address\" size=\"32\" start=\"20b\" type=\"address\"/>\n+\n+    <field name=\"Coordinate Shader Code Address\" size=\"29\" start=\"195\" type=\"address\"/>\n+    <field name=\"Coordinate Shader 4-way threadable\" size=\"1\" start=\"192\" type=\"bool\"/>\n+    <field name=\"Coordinate Shader start in final thread section\" size=\"1\" start=\"193\" type=\"bool\"/>\n+    <field name=\"Coordinate Shader Propagate NaNs\" size=\"1\" start=\"194\" type=\"bool\"/>\n+    <field name=\"Coordinate Shader Uniforms Address\" size=\"32\" start=\"28b\" type=\"address\"/>\n+  </struct>\n+\n   <struct name=\"Geometry Shader State Record\" min_ver=\"41\">\n     <field name=\"Geometry Bin Mode Shader Code Address\" size=\"29\" start=\"3\" type=\"address\"/>\n     <field name=\"Geometry Bin Mode Shader 4-way threadable\" size=\"1\" start=\"0\" type=\"bool\"/>\n@@ -1543,7 +1800,7 @@\n     <field name=\"Offset Format 8\" size=\"1\" start=\"0\" type=\"bool\"/>\n   </struct>\n \n-  <struct name=\"TMU Config Parameter 2\" min_ver=\"42\">\n+  <struct name=\"TMU Config Parameter 2\" min_ver=\"42\" max_ver=\"42\">\n     <field name=\"Pad\" size=\"7\" start=\"25\" type=\"uint\"/>\n     <field name=\"LOD Query\" size=\"1\" start=\"24\" type=\"bool\"/>\n     <field name=\"Op\" size=\"4\" start=\"20\" type=\"TMU Op\"/>\n@@ -1558,6 +1815,23 @@\n     <field name=\"Offset Format 8\" size=\"1\" start=\"0\" type=\"bool\"/>\n   </struct>\n \n+  <struct name=\"TMU Config Parameter 2\" min_ver=\"71\">\n+    <field name=\"Pad\" size=\"5\" start=\"27\" type=\"uint\"/>\n+    <field name=\"Write conversion\" size=\"1\" start=\"26\" type=\"bool\"/>\n+    <field name=\"DIM query\" size=\"1\" start=\"25\" type=\"bool\"/>\n+    <field name=\"LOD Query\" size=\"1\" start=\"24\" type=\"bool\"/>\n+    <field name=\"Op\" size=\"4\" start=\"20\" type=\"TMU Op\"/>\n+    <field name=\"Offset R\" size=\"4\" start=\"16\" type=\"int\"/>\n+    <field name=\"Offset T\" size=\"4\" start=\"12\" type=\"int\"/>\n+    <field name=\"Offset S\" size=\"4\" start=\"8\" type=\"int\"/>\n+    <field name=\"Gather Mode\" size=\"1\" start=\"7\" type=\"bool\"/>\n+    <field name=\"Gather Component\" size=\"2\" start=\"5\" type=\"uint\"/>\n+    <field name=\"Coefficient Mode\" size=\"1\" start=\"4\" type=\"bool\"/>\n+    <field name=\"Sample Number\" size=\"2\" start=\"2\" type=\"uint\"/>\n+    <field name=\"Disable AutoLOD\" size=\"1\" start=\"1\" type=\"bool\"/>\n+    <field name=\"Offset Format 8\" size=\"1\" start=\"0\" type=\"bool\"/>\n+  </struct>\n+\n   <struct name=\"Texture Shader State\" max_ver=\"33\">\n     <field name=\"UIF XOR disable\" size=\"1\" start=\"255\" type=\"bool\"/>\n     <field name=\"Level 0 is strictly UIF\" size=\"1\" start=\"254\" type=\"bool\"/>\n@@ -1611,7 +1885,7 @@\n     <field name=\"Filter\" size=\"4\" start=\"0\" type=\"TMU Filter\"/>\n   </struct>\n \n-  <struct name=\"Texture Shader State\" min_ver=\"41\">\n+  <struct name=\"Texture Shader State\" min_ver=\"41\" max_ver=\"42\">\n     <field name=\"Pad\" size=\"56\" start=\"136\" type=\"uint\"/>\n     <field name=\"UIF XOR disable\" size=\"1\" start=\"135\" type=\"bool\"/>\n     <field name=\"Level 0 is strictly UIF\" size=\"1\" start=\"134\" type=\"bool\"/>\n@@ -1652,6 +1926,82 @@\n     <field name=\"Flip texture X Axis\" size=\"1\" start=\"0\" type=\"bool\"/>\n   </struct>\n \n+  <struct name=\"Texture Shader State\" min_ver=\"71\">\n+    <field name=\"Pad\" size=\"2\" start=\"190\" type=\"uint\"/>\n+    <!-- When we use an address type, there is an implicit requirement\n+         that the address is a 32-bit that is encoded starting at a 32-bit\n+         aligned bit offset into the packet. If the address field has less than\n+         32 bits, it is assumed that the address is aligned. For example, a\n+         26-bit address field is expected to be 64-byte aligned (6 lsb bits\n+         are 0) and that this will be encoded into a packet starting at bit\n+         offset 6 into a 32-bit dword (since bits 0..5 of the address are\n+         implicitly 0 and don't need to be explicitly encoded).\n+\n+         Unfortunately, the CB address below doesn't match this requirement:\n+         it starts at bit 138, which is 10 bits into a 32-bit dword, but it\n+         represents a 64-bit aligned address (6 lsb bits are 0), so we cannot\n+         encode it as an address type. To fix this we encode these addresses\n+         as uint types which has two implications:\n+         1. the driver is responsible for manually addinng the buffer objects\n+            for these addresses to the job BO list.\n+         2. the driver needs to pass an actual 26-bit address value by manually\n+            shifting the 6 lsb bits (that are implicitly 0).\n+    -->\n+    <field name=\"texture_base pointer_Cr\" size=\"26\" start=\"164\" type=\"uint\"/>\n+    <field name=\"texture base pointer Cb\" size=\"26\" start=\"138\" type=\"uint\"/>\n+    <field name=\"Chroma offset y\" size=\"1\" start=\"137\" type=\"uint\"/>\n+    <field name=\"Chroma offset x\" size=\"1\" start=\"136\" type=\"uint\"/>\n+\n+    <field name=\"UIF XOR disable\" size=\"1\" start=\"135\" type=\"bool\"/>\n+    <field name=\"Level 0 is strictly UIF\" size=\"1\" start=\"134\" type=\"bool\"/>\n+    <field name=\"Level 0 XOR enable\" size=\"1\" start=\"132\" type=\"bool\"/>\n+    <field name=\"Level 0 UB_PAD\" size=\"4\" start=\"128\" type=\"uint\"/>\n+\n+    <field name=\"Base Level\" size=\"4\" start=\"124\" type=\"uint\"/>\n+    <field name=\"Max Level\" size=\"4\" start=\"120\" type=\"uint\"/>\n+\n+    <field name=\"Swizzle A\" size=\"3\" start=\"117\" type=\"uint\">\n+      <value name=\"Swizzle Zero\" value=\"0\"/>\n+      <value name=\"Swizzle One\" value=\"1\"/>\n+      <value name=\"Swizzle Red\" value=\"2\"/>\n+      <value name=\"Swizzle Green\" value=\"3\"/>\n+      <value name=\"Swizzle Blue\" value=\"4\"/>\n+      <value name=\"Swizzle Alpha\" value=\"5\"/>\n+    </field>\n+\n+    <field name=\"Swizzle B\" size=\"3\" start=\"114\" type=\"uint\"/>\n+    <field name=\"Swizzle G\" size=\"3\" start=\"111\" type=\"uint\"/>\n+    <field name=\"Swizzle R\" size=\"3\" start=\"108\" type=\"uint\"/>\n+    <field name=\"Extended\" size=\"1\" start=\"107\" type=\"bool\"/>\n+\n+    <field name=\"Texture type\" size=\"7\" start=\"100\" type=\"uint\"/>\n+    <field name=\"Image Depth\" size=\"14\" start=\"86\" type=\"uint\"/>\n+    <field name=\"Image Height\" size=\"14\" start=\"72\" type=\"uint\"/>\n+    <field name=\"Image Width\" size=\"14\" start=\"58\" type=\"uint\"/>\n+\n+    <!-- V3D 7.1.2 doesn't have the RB swap bit and has Array Stride starting\n+         at bit 32. However, 7.1.5 included the RB swap bit at bit 32 and has\n+         Array Stride starting at 33, which is backwards incompatible,\n+         We use the definition from 7.1.5.\n+    -->\n+    <field name=\"Array Stride (64-byte aligned)\" size=\"24\" start=\"33\" type=\"uint\"/>\n+    <field name=\"R/B swap\" size=\"1\" start=\"32\" type=\"bool\"/>\n+\n+    <field name=\"Texture base pointer\" size=\"32\" start=\"0\" type=\"address\"/>\n+\n+    <field name=\"Reverse\" size=\"1\" start=\"5\" type=\"bool\"/>\n+    <field name=\"Transfer func\" size=\"3\" start=\"2\" type=\"uint\">\n+      <value name=\"Transfer Func None\" value=\"0\"/>\n+      <value name=\"Transfer Func sRGB\" value=\"1\"/>\n+      <value name=\"Transfer Func PQ\" value=\"2\"/>\n+      <value name=\"Transfer Func HLG\" value=\"3\"/>\n+      <value name=\"Transfer Func PQ BT1886\" value=\"4\"/>\n+      <value name=\"Transfer Func HLG BT1886\" value=\"5\"/>\n+    </field>\n+    <field name=\"Flip texture Y Axis\" size=\"1\" start=\"1\" type=\"bool\"/>\n+    <field name=\"Flip texture X Axis\" size=\"1\" start=\"0\" type=\"bool\"/>\n+  </struct>\n+\n   <struct name=\"Sampler State\" min_ver=\"41\">\n     <field name=\"Border color word 3\" size=\"32\" start=\"160\" type=\"uint\"/>\n     <field name=\"Border color word 2\" size=\"32\" start=\"128\" type=\"uint\"/>\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0004-broadcom-common-retrieve-V3D-revision-number.patch",
    "content": "From 569cbe4229df737ce5915c4be2cad534707fb4f7 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 9 Nov 2021 08:50:51 +0100\nSubject: [PATCH 004/142] broadcom/common: retrieve V3D revision number\n\nThe subrev field from the hub ident3 register is bumped with every\nhardware revision doing backwards incompatible changes so we want to\nkeep track of this.\n\nInstead of modifying the 'ver' field info to acommodate subrev info,\nwhich would require a lot of changes, simply add a new 'rev' field in\ndevinfo that we can use when we need to make changes based on the\nrevision number of a hardware release.\n---\n src/broadcom/common/v3d_device_info.c | 14 +++++++++++++-\n src/broadcom/common/v3d_device_info.h |  3 +++\n 2 files changed, 16 insertions(+), 1 deletion(-)\n\ndiff --git a/src/broadcom/common/v3d_device_info.c b/src/broadcom/common/v3d_device_info.c\nindex 7e0862f1f02..7512fe3a06b 100644\n--- a/src/broadcom/common/v3d_device_info.c\n+++ b/src/broadcom/common/v3d_device_info.c\n@@ -36,6 +36,9 @@ v3d_get_device_info(int fd, struct v3d_device_info* devinfo, v3d_ioctl_fun drm_i\n     struct drm_v3d_get_param ident1 = {\n             .param = DRM_V3D_PARAM_V3D_CORE0_IDENT1,\n     };\n+    struct drm_v3d_get_param hub_ident3 = {\n+            .param = DRM_V3D_PARAM_V3D_HUB_IDENT3,\n+    };\n     int ret;\n \n     ret = drm_ioctl(fd, DRM_IOCTL_V3D_GET_PARAM, &ident0);\n@@ -76,5 +79,14 @@ v3d_get_device_info(int fd, struct v3d_device_info* devinfo, v3d_ioctl_fun drm_i\n                 return false;\n     }\n \n-    return true;\n+    ret = drm_ioctl(fd, DRM_IOCTL_V3D_GET_PARAM, &hub_ident3);\n+    if (ret != 0) {\n+            fprintf(stderr, \"Couldn't get V3D core HUB IDENT3: %s\\n\",\n+                    strerror(errno));\n+            return false;\n+    }\n+\n+   devinfo->rev = (hub_ident3.value >> 8) & 0xff;\n+\n+   return true;\n }\ndiff --git a/src/broadcom/common/v3d_device_info.h b/src/broadcom/common/v3d_device_info.h\nindex 97abd9b8d9f..32cb65cf81f 100644\n--- a/src/broadcom/common/v3d_device_info.h\n+++ b/src/broadcom/common/v3d_device_info.h\n@@ -34,6 +34,9 @@ struct v3d_device_info {\n         /** Simple V3D version: major * 10 + minor */\n         uint8_t ver;\n \n+        /** V3D revision number */\n+        uint8_t rev;\n+\n         /** Size of the VPM, in bytes. */\n         int vpm_size;\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0005-broadcom-common-add-some-common-v71-helpers.patch",
    "content": "From c260843c882d25bd31e308566b45d4517fda0fa2 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Wed, 17 Nov 2021 14:40:47 +0100\nSubject: [PATCH 005/142] broadcom/common: add some common v71 helpers\n\n---\n src/broadcom/common/v3d_util.c | 27 +++++++++++++++++++++++++++\n src/broadcom/common/v3d_util.h | 27 +++++++++++++++++++++++++++\n 2 files changed, 54 insertions(+)\n\ndiff --git a/src/broadcom/common/v3d_util.c b/src/broadcom/common/v3d_util.c\nindex 57872a923d3..26f5c6b336f 100644\n--- a/src/broadcom/common/v3d_util.c\n+++ b/src/broadcom/common/v3d_util.c\n@@ -170,3 +170,30 @@ v3d_hw_prim_type(enum mesa_prim prim_type)\n       unreachable(\"Unsupported primitive type\");\n    }\n }\n+\n+uint32_t\n+v3d_internal_bpp_words(uint32_t internal_bpp)\n+{\n+        switch (internal_bpp) {\n+        case 0 /* V3D_INTERNAL_BPP_32 */:\n+                return 1;\n+        case 1 /* V3D_INTERNAL_BPP_64 */:\n+                return 2;\n+        case 2 /* V3D_INTERNAL_BPP_128 */:\n+                return 4;\n+        default:\n+                unreachable(\"Unsupported internal BPP\");\n+        }\n+}\n+\n+uint32_t\n+v3d_compute_rt_row_row_stride_128_bits(uint32_t tile_width,\n+                                       uint32_t bpp)\n+{\n+        /* stride in multiples of 128 bits, and covers 2 rows. This is the\n+         * reason we divide by 2 instead of 4, as we divide number of 32-bit\n+         * words per row by 2.\n+         */\n+\n+        return (tile_width * bpp) / 2;\n+}\ndiff --git a/src/broadcom/common/v3d_util.h b/src/broadcom/common/v3d_util.h\nindex eb802b77f67..864fc949ffa 100644\n--- a/src/broadcom/common/v3d_util.h\n+++ b/src/broadcom/common/v3d_util.h\n@@ -24,6 +24,7 @@\n #ifndef V3D_UTIL_H\n #define V3D_UTIL_H\n \n+#include \"util/macros.h\"\n #include \"common/v3d_device_info.h\"\n #include \"pipe/p_defines.h\"\n \n@@ -46,4 +47,30 @@ v3d_translate_pipe_swizzle(enum pipe_swizzle swizzle);\n uint32_t\n v3d_hw_prim_type(enum mesa_prim prim_type);\n \n+uint32_t\n+v3d_internal_bpp_words(uint32_t internal_bpp);\n+\n+/* Some configuration packets want the size on log2, but starting at 0 for\n+ * size 8.\n+ */\n+static inline uint8_t\n+log2_tile_size(uint32_t size)\n+{\n+        switch(size) {\n+        case 8:\n+                return 0;\n+        case 16:\n+                return 1;\n+        case 32:\n+                return 2;\n+        case 64:\n+                return 3;\n+        default:\n+                unreachable(\"Unsupported tile width/height\");\n+        }\n+}\n+\n+uint32_t\n+v3d_compute_rt_row_row_stride_128_bits(uint32_t tile_width,\n+                                       uint32_t bpp);\n #endif\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0006-broadcom-qpu-add-comments-on-waddr-not-used-on-V3D-7.patch",
    "content": "From a5211a4d71acc53183d2a90eb1694d8cce6eb44f Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 5 Aug 2021 01:03:11 +0200\nSubject: [PATCH 006/142] broadcom/qpu: add comments on waddr not used on V3D\n 7.x\n\n---\n src/broadcom/qpu/qpu_instr.h | 22 +++++++++++-----------\n 1 file changed, 11 insertions(+), 11 deletions(-)\n\ndiff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h\nindex 2e133472698..45a0cad9760 100644\n--- a/src/broadcom/qpu/qpu_instr.h\n+++ b/src/broadcom/qpu/qpu_instr.h\n@@ -88,11 +88,11 @@ enum v3d_qpu_uf {\n };\n \n enum v3d_qpu_waddr {\n-        V3D_QPU_WADDR_R0 = 0,\n-        V3D_QPU_WADDR_R1 = 1,\n-        V3D_QPU_WADDR_R2 = 2,\n-        V3D_QPU_WADDR_R3 = 3,\n-        V3D_QPU_WADDR_R4 = 4,\n+        V3D_QPU_WADDR_R0 = 0,    /* Reserved on V3D 7.x */\n+        V3D_QPU_WADDR_R1 = 1,    /* Reserved on V3D 7.x */\n+        V3D_QPU_WADDR_R2 = 2,    /* Reserved on V3D 7.x */\n+        V3D_QPU_WADDR_R3 = 3,    /* Reserved on V3D 7.x */\n+        V3D_QPU_WADDR_R4 = 4,    /* Reserved on V3D 7.x */\n         V3D_QPU_WADDR_R5 = 5,\n         V3D_QPU_WADDR_NOP = 6,\n         V3D_QPU_WADDR_TLB = 7,\n@@ -108,12 +108,12 @@ enum v3d_qpu_waddr {\n         V3D_QPU_WADDR_SYNC = 16,\n         V3D_QPU_WADDR_SYNCU = 17,\n         V3D_QPU_WADDR_SYNCB = 18,\n-        V3D_QPU_WADDR_RECIP = 19,\n-        V3D_QPU_WADDR_RSQRT = 20,\n-        V3D_QPU_WADDR_EXP = 21,\n-        V3D_QPU_WADDR_LOG = 22,\n-        V3D_QPU_WADDR_SIN = 23,\n-        V3D_QPU_WADDR_RSQRT2 = 24,\n+        V3D_QPU_WADDR_RECIP = 19,  /* Reserved on V3D 7.x */\n+        V3D_QPU_WADDR_RSQRT = 20,  /* Reserved on V3D 7.x */\n+        V3D_QPU_WADDR_EXP = 21,    /* Reserved on V3D 7.x */\n+        V3D_QPU_WADDR_LOG = 22,    /* Reserved on V3D 7.x */\n+        V3D_QPU_WADDR_SIN = 23,    /* Reserved on V3D 7.x */\n+        V3D_QPU_WADDR_RSQRT2 = 24, /* Reserved on V3D 7.x */\n         V3D_QPU_WADDR_TMUC = 32,\n         V3D_QPU_WADDR_TMUS = 33,\n         V3D_QPU_WADDR_TMUT = 34,\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0007-broadcom-qpu-set-V3D-7.x-names-for-some-waddr-aliasi.patch",
    "content": "From 0ccf3043e4a584e5592bb7fad737d5d98ed23db0 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 5 Aug 2021 01:00:47 +0200\nSubject: [PATCH 007/142] broadcom/qpu: set V3D 7.x names for some waddr\n aliasing\n\nV3D 7.x got rid of the accumulator, but still uses the values for\nWADDR_R5 and WADDR_R5REP, so let's return a proper name and add some\naliases.\n---\n src/broadcom/qpu/qpu_instr.c | 8 ++++++++\n src/broadcom/qpu/qpu_instr.h | 6 ++++--\n 2 files changed, 12 insertions(+), 2 deletions(-)\n\ndiff --git a/src/broadcom/qpu/qpu_instr.c b/src/broadcom/qpu/qpu_instr.c\nindex 60dabf74e8e..7759fb0efdf 100644\n--- a/src/broadcom/qpu/qpu_instr.c\n+++ b/src/broadcom/qpu/qpu_instr.c\n@@ -35,6 +35,14 @@ v3d_qpu_magic_waddr_name(const struct v3d_device_info *devinfo,\n         if (devinfo->ver < 40 && waddr == V3D_QPU_WADDR_TMU)\n                 return \"tmu\";\n \n+        /* V3D 7.x QUAD and REP aliases R5 and R5REPT in the table below\n+         */\n+        if (devinfo->ver >= 71 && waddr == V3D_QPU_WADDR_QUAD)\n+                return \"quad\";\n+\n+        if (devinfo->ver >= 71 && waddr == V3D_QPU_WADDR_REP)\n+                return \"rep\";\n+\n         static const char *waddr_magic[] = {\n                 [V3D_QPU_WADDR_R0] = \"r0\",\n                 [V3D_QPU_WADDR_R1] = \"r1\",\ndiff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h\nindex 45a0cad9760..19bf721dbe1 100644\n--- a/src/broadcom/qpu/qpu_instr.h\n+++ b/src/broadcom/qpu/qpu_instr.h\n@@ -93,7 +93,8 @@ enum v3d_qpu_waddr {\n         V3D_QPU_WADDR_R2 = 2,    /* Reserved on V3D 7.x */\n         V3D_QPU_WADDR_R3 = 3,    /* Reserved on V3D 7.x */\n         V3D_QPU_WADDR_R4 = 4,    /* Reserved on V3D 7.x */\n-        V3D_QPU_WADDR_R5 = 5,\n+        V3D_QPU_WADDR_R5 = 5,    /* V3D 4.x */\n+        V3D_QPU_WADDR_QUAD = 5,  /* V3D 7.x */\n         V3D_QPU_WADDR_NOP = 6,\n         V3D_QPU_WADDR_TLB = 7,\n         V3D_QPU_WADDR_TLBU = 8,\n@@ -129,7 +130,8 @@ enum v3d_qpu_waddr {\n         V3D_QPU_WADDR_TMUHSCM = 44,\n         V3D_QPU_WADDR_TMUHSF = 45,\n         V3D_QPU_WADDR_TMUHSLOD = 46,\n-        V3D_QPU_WADDR_R5REP = 55,\n+        V3D_QPU_WADDR_R5REP = 55, /* V3D 4.x */\n+        V3D_QPU_WADDR_REP = 55,   /* V3D 7.x */\n };\n \n struct v3d_qpu_flags {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0008-broadcom-compiler-rename-small_imm-to-small_imm_b.patch",
    "content": "From 18de3cc85cf8bbe294e044f7a12abe14e554de0a Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Sun, 19 Sep 2021 03:20:18 +0200\nSubject: [PATCH 008/142] broadcom/compiler: rename small_imm to small_imm_b\n\nCurrent small_imm is associated with the \"B\" read address.\n\nWe do this change in advance for v71 support, where we will have 4\ndifferent small_imm (a/b/c/d), so we start with a renaming.\n---\n src/broadcom/compiler/qpu_schedule.c          | 22 +++++++++----------\n .../compiler/vir_opt_small_immediates.c       |  4 ++--\n src/broadcom/compiler/vir_to_qpu.c            |  2 +-\n src/broadcom/qpu/qpu_disasm.c                 |  2 +-\n src/broadcom/qpu/qpu_instr.h                  |  2 +-\n src/broadcom/qpu/qpu_pack.c                   | 22 +++++++++----------\n 6 files changed, 27 insertions(+), 27 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex 3b32b48f86f..a10fa03ed10 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -160,7 +160,7 @@ process_mux_deps(struct schedule_state *state, struct schedule_node *n,\n                 add_read_dep(state, state->last_rf[n->inst->qpu.raddr_a], n);\n                 break;\n         case V3D_QPU_MUX_B:\n-                if (!n->inst->qpu.sig.small_imm) {\n+                if (!n->inst->qpu.sig.small_imm_b) {\n                         add_read_dep(state,\n                                      state->last_rf[n->inst->qpu.raddr_b], n);\n                 }\n@@ -615,7 +615,7 @@ qpu_instruction_uses_rf(const struct v3d_qpu_instr *inst,\n               return true;\n \n         if (v3d_qpu_uses_mux(inst, V3D_QPU_MUX_B) &&\n-            !inst->sig.small_imm && (inst->raddr_b == waddr))\n+            !inst->sig.small_imm_b && (inst->raddr_b == waddr))\n               return true;\n \n         return false;\n@@ -790,11 +790,11 @@ qpu_raddrs_used(const struct v3d_qpu_instr *a,\n         uint64_t raddrs_used = 0;\n         if (v3d_qpu_uses_mux(a, V3D_QPU_MUX_A))\n                 raddrs_used |= (1ll << a->raddr_a);\n-        if (!a->sig.small_imm && v3d_qpu_uses_mux(a, V3D_QPU_MUX_B))\n+        if (!a->sig.small_imm_b && v3d_qpu_uses_mux(a, V3D_QPU_MUX_B))\n                 raddrs_used |= (1ll << a->raddr_b);\n         if (v3d_qpu_uses_mux(b, V3D_QPU_MUX_A))\n                 raddrs_used |= (1ll << b->raddr_a);\n-        if (!b->sig.small_imm && v3d_qpu_uses_mux(b, V3D_QPU_MUX_B))\n+        if (!b->sig.small_imm_b && v3d_qpu_uses_mux(b, V3D_QPU_MUX_B))\n                 raddrs_used |= (1ll << b->raddr_b);\n \n         return raddrs_used;\n@@ -816,16 +816,16 @@ qpu_merge_raddrs(struct v3d_qpu_instr *result,\n         if (naddrs > 2)\n                 return false;\n \n-        if ((add_instr->sig.small_imm || mul_instr->sig.small_imm)) {\n+        if ((add_instr->sig.small_imm_b || mul_instr->sig.small_imm_b)) {\n                 if (naddrs > 1)\n                         return false;\n \n-                if (add_instr->sig.small_imm && mul_instr->sig.small_imm)\n+                if (add_instr->sig.small_imm_b && mul_instr->sig.small_imm_b)\n                         if (add_instr->raddr_b != mul_instr->raddr_b)\n                                 return false;\n \n-                result->sig.small_imm = true;\n-                result->raddr_b = add_instr->sig.small_imm ?\n+                result->sig.small_imm_b = true;\n+                result->raddr_b = add_instr->sig.small_imm_b ?\n                         add_instr->raddr_b : mul_instr->raddr_b;\n         }\n \n@@ -836,7 +836,7 @@ qpu_merge_raddrs(struct v3d_qpu_instr *result,\n         raddrs_used &= ~(1ll << raddr_a);\n         result->raddr_a = raddr_a;\n \n-        if (!result->sig.small_imm) {\n+        if (!result->sig.small_imm_b) {\n                 if (v3d_qpu_uses_mux(add_instr, V3D_QPU_MUX_B) &&\n                     raddr_a == add_instr->raddr_b) {\n                         if (add_instr->alu.add.a == V3D_QPU_MUX_B)\n@@ -1025,7 +1025,7 @@ qpu_merge_inst(const struct v3d_device_info *devinfo,\n         merge.sig.ldtmu |= b->sig.ldtmu;\n         merge.sig.ldvary |= b->sig.ldvary;\n         merge.sig.ldvpm |= b->sig.ldvpm;\n-        merge.sig.small_imm |= b->sig.small_imm;\n+        merge.sig.small_imm_b |= b->sig.small_imm_b;\n         merge.sig.ldtlb |= b->sig.ldtlb;\n         merge.sig.ldtlbu |= b->sig.ldtlbu;\n         merge.sig.ucb |= b->sig.ucb;\n@@ -1614,7 +1614,7 @@ qpu_inst_valid_in_thrend_slot(struct v3d_compile *c,\n                         return false;\n \n                 if (inst->raddr_b < 3 &&\n-                    !inst->sig.small_imm &&\n+                    !inst->sig.small_imm_b &&\n                     v3d_qpu_uses_mux(inst, V3D_QPU_MUX_B)) {\n                         return false;\n                 }\ndiff --git a/src/broadcom/compiler/vir_opt_small_immediates.c b/src/broadcom/compiler/vir_opt_small_immediates.c\nindex 47d7722968d..df0d6c36c9b 100644\n--- a/src/broadcom/compiler/vir_opt_small_immediates.c\n+++ b/src/broadcom/compiler/vir_opt_small_immediates.c\n@@ -80,7 +80,7 @@ vir_opt_small_immediates(struct v3d_compile *c)\n                          */\n                         struct v3d_qpu_sig new_sig = inst->qpu.sig;\n                         uint32_t sig_packed;\n-                        new_sig.small_imm = true;\n+                        new_sig.small_imm_b = true;\n                         if (!v3d_qpu_sig_pack(c->devinfo, &new_sig, &sig_packed))\n                                 continue;\n \n@@ -89,7 +89,7 @@ vir_opt_small_immediates(struct v3d_compile *c)\n                                 vir_dump_inst(c, inst);\n                                 fprintf(stderr, \"\\n\");\n                         }\n-                        inst->qpu.sig.small_imm = true;\n+                        inst->qpu.sig.small_imm_b = true;\n                         inst->qpu.raddr_b = packed;\n \n                         inst->src[i].file = QFILE_SMALL_IMM;\ndiff --git a/src/broadcom/compiler/vir_to_qpu.c b/src/broadcom/compiler/vir_to_qpu.c\nindex 45e6bfa1470..15c2e3674c2 100644\n--- a/src/broadcom/compiler/vir_to_qpu.c\n+++ b/src/broadcom/compiler/vir_to_qpu.c\n@@ -94,7 +94,7 @@ static void\n set_src(struct v3d_qpu_instr *instr, enum v3d_qpu_mux *mux, struct qpu_reg src)\n {\n         if (src.smimm) {\n-                assert(instr->sig.small_imm);\n+                assert(instr->sig.small_imm_b);\n                 *mux = V3D_QPU_MUX_B;\n                 return;\n         }\ndiff --git a/src/broadcom/qpu/qpu_disasm.c b/src/broadcom/qpu/qpu_disasm.c\nindex 28fb2357b97..6aca3c28e78 100644\n--- a/src/broadcom/qpu/qpu_disasm.c\n+++ b/src/broadcom/qpu/qpu_disasm.c\n@@ -62,7 +62,7 @@ v3d_qpu_disasm_raddr(struct disasm_state *disasm,\n         if (mux == V3D_QPU_MUX_A) {\n                 append(disasm, \"rf%d\", instr->raddr_a);\n         } else if (mux == V3D_QPU_MUX_B) {\n-                if (instr->sig.small_imm) {\n+                if (instr->sig.small_imm_b) {\n                         uint32_t val;\n                         ASSERTED bool ok =\n                                 v3d_qpu_small_imm_unpack(disasm->devinfo,\ndiff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h\nindex 19bf721dbe1..9cd831863b4 100644\n--- a/src/broadcom/qpu/qpu_instr.h\n+++ b/src/broadcom/qpu/qpu_instr.h\n@@ -50,7 +50,7 @@ struct v3d_qpu_sig {\n         bool ldvpm:1;\n         bool ldtlb:1;\n         bool ldtlbu:1;\n-        bool small_imm:1;\n+        bool small_imm_b:1;\n         bool ucb:1;\n         bool rotate:1;\n         bool wrtmuc:1;\ndiff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c\nindex a875683c6f8..beac591d3c1 100644\n--- a/src/broadcom/qpu/qpu_pack.c\n+++ b/src/broadcom/qpu/qpu_pack.c\n@@ -112,7 +112,7 @@\n #define LDTMU .ldtmu = true\n #define LDVARY .ldvary = true\n #define LDVPM .ldvpm = true\n-#define SMIMM .small_imm = true\n+#define SMIMM_B .small_imm_b = true\n #define LDTLB .ldtlb = true\n #define LDTLBU .ldtlbu = true\n #define UCB .ucb = true\n@@ -135,8 +135,8 @@ static const struct v3d_qpu_sig v33_sig_map[] = {\n         [11] = { THRSW, LDVARY,         LDUNIF },\n         [12] = {        LDVARY, LDTMU,         },\n         [13] = { THRSW, LDVARY, LDTMU,         },\n-        [14] = { SMIMM, LDVARY,                },\n-        [15] = { SMIMM,                        },\n+        [14] = { SMIMM_B, LDVARY,              },\n+        [15] = { SMIMM_B,                      },\n         [16] = {        LDTLB,                 },\n         [17] = {        LDTLBU,                },\n         /* 18-21 reserved */\n@@ -148,8 +148,8 @@ static const struct v3d_qpu_sig v33_sig_map[] = {\n         [27] = { THRSW, LDVPM,          LDUNIF },\n         [28] = {        LDVPM, LDTMU,          },\n         [29] = { THRSW, LDVPM, LDTMU,          },\n-        [30] = { SMIMM, LDVPM,                 },\n-        [31] = { SMIMM,                        },\n+        [30] = { SMIMM_B, LDVPM,               },\n+        [31] = { SMIMM_B,                      },\n };\n \n static const struct v3d_qpu_sig v40_sig_map[] = {\n@@ -167,8 +167,8 @@ static const struct v3d_qpu_sig v40_sig_map[] = {\n         [10] = {        LDVARY,         LDUNIF },\n         [11] = { THRSW, LDVARY,         LDUNIF },\n         /* 12-13 reserved */\n-        [14] = { SMIMM, LDVARY,                },\n-        [15] = { SMIMM,                        },\n+        [14] = { SMIMM_B, LDVARY,              },\n+        [15] = { SMIMM_B,                      },\n         [16] = {        LDTLB,                 },\n         [17] = {        LDTLBU,                },\n         [18] = {                        WRTMUC },\n@@ -178,7 +178,7 @@ static const struct v3d_qpu_sig v40_sig_map[] = {\n         [22] = { UCB,                          },\n         [23] = { ROT,                          },\n         /* 24-30 reserved */\n-        [31] = { SMIMM,         LDTMU,         },\n+        [31] = { SMIMM_B,       LDTMU,         },\n };\n \n static const struct v3d_qpu_sig v41_sig_map[] = {\n@@ -197,8 +197,8 @@ static const struct v3d_qpu_sig v41_sig_map[] = {\n         [11] = { THRSW,    LDVARY, LDUNIF },\n         [12] = { LDUNIFRF                 },\n         [13] = { THRSW,    LDUNIFRF       },\n-        [14] = { SMIMM,    LDVARY,        },\n-        [15] = { SMIMM,                   },\n+        [14] = { SMIMM_B,    LDVARY       },\n+        [15] = { SMIMM_B,                 },\n         [16] = {           LDTLB,         },\n         [17] = {           LDTLBU,        },\n         [18] = {                          WRTMUC },\n@@ -210,7 +210,7 @@ static const struct v3d_qpu_sig v41_sig_map[] = {\n         [24] = {                   LDUNIFA},\n         [25] = { LDUNIFARF                },\n         /* 26-30 reserved */\n-        [31] = { SMIMM,            LDTMU, },\n+        [31] = { SMIMM_B,          LDTMU, },\n };\n \n bool\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0009-broadcom-compiler-add-small_imm-a-c-d-on-v3d_qpu_sig.patch",
    "content": "From 0e87405fe73694c173b7ce14c3d60611f241922c Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 5 Aug 2021 00:50:12 +0200\nSubject: [PATCH 009/142] broadcom/compiler: add small_imm a/c/d on v3d_qpu_sig\n\nsmall_imm_a, small_imm_c and small_imm_d added on top of the already\nexisting small_imm_b, as V3D 7.1 defines 4 small immediates, tied to\nthe 4 raddr. Note that this is only the definition, and just a inst\nvalidation rule to check that are not used before v71. Any real use is\nstill pending.\n---\n src/broadcom/compiler/qpu_validate.c | 5 +++++\n src/broadcom/qpu/qpu_instr.h         | 5 ++++-\n 2 files changed, 9 insertions(+), 1 deletion(-)\n\ndiff --git a/src/broadcom/compiler/qpu_validate.c b/src/broadcom/compiler/qpu_validate.c\nindex 2cc7a0eb0ae..12788692432 100644\n--- a/src/broadcom/compiler/qpu_validate.c\n+++ b/src/broadcom/compiler/qpu_validate.c\n@@ -115,6 +115,11 @@ qpu_validate_inst(struct v3d_qpu_validate_state *state, struct qinst *qinst)\n         if (inst->type != V3D_QPU_INSTR_TYPE_ALU)\n                 return;\n \n+        if (devinfo->ver < 71) {\n+           if (inst->sig.small_imm_a || inst->sig.small_imm_c || inst->sig.small_imm_d)\n+              fail_instr(state, \"small imm a/c/d added after V3D 7.1\");\n+        }\n+\n         /* LDVARY writes r5 two instructions later and LDUNIF writes\n          * r5 one instruction later, which is illegal to have\n          * together.\ndiff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h\nindex 9cd831863b4..13b3f37d43f 100644\n--- a/src/broadcom/qpu/qpu_instr.h\n+++ b/src/broadcom/qpu/qpu_instr.h\n@@ -50,10 +50,13 @@ struct v3d_qpu_sig {\n         bool ldvpm:1;\n         bool ldtlb:1;\n         bool ldtlbu:1;\n-        bool small_imm_b:1;\n         bool ucb:1;\n         bool rotate:1;\n         bool wrtmuc:1;\n+        bool small_imm_a:1; /* raddr_a (add a), since V3D 7.x */\n+        bool small_imm_b:1; /* raddr_b (add b) */\n+        bool small_imm_c:1; /* raddr_c (mul a), since V3D 7.x */\n+        bool small_imm_d:1; /* raddr_d (mul b), since V3D 7.x */\n };\n \n enum v3d_qpu_cond {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0010-broadcom-qpu-add-v71-signal-map.patch",
    "content": "From eca19c911d9af3b0ab3b563ea65dc455e3d27987 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Wed, 4 Aug 2021 01:11:16 +0200\nSubject: [PATCH 010/142] broadcom/qpu: add v71 signal map\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nCompared with v41, the differences are:\n   * 14, 15, 29 and 30 are now about immediate a, b, c, d respectively\n   * 23 is now reserved. On v42 this was for rotate signals, that are\n     gone on v71.\n\nSigned-off-by: Alejandro Piñeiro <apinheiro@igalia.com>\nSigned-off-by: Iago Toral Quiroga <itoral@igalia.com>\n---\n src/broadcom/qpu/qpu_pack.c | 47 ++++++++++++++++++++++++++++++++++---\n 1 file changed, 44 insertions(+), 3 deletions(-)\n\ndiff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c\nindex beac591d3c1..2820d9d4c56 100644\n--- a/src/broadcom/qpu/qpu_pack.c\n+++ b/src/broadcom/qpu/qpu_pack.c\n@@ -112,12 +112,15 @@\n #define LDTMU .ldtmu = true\n #define LDVARY .ldvary = true\n #define LDVPM .ldvpm = true\n-#define SMIMM_B .small_imm_b = true\n #define LDTLB .ldtlb = true\n #define LDTLBU .ldtlbu = true\n #define UCB .ucb = true\n #define ROT .rotate = true\n #define WRTMUC .wrtmuc = true\n+#define SMIMM_A .small_imm_a = true\n+#define SMIMM_B .small_imm_b = true\n+#define SMIMM_C .small_imm_c = true\n+#define SMIMM_D .small_imm_d = true\n \n static const struct v3d_qpu_sig v33_sig_map[] = {\n         /*      MISC   R3       R4      R5 */\n@@ -213,6 +216,40 @@ static const struct v3d_qpu_sig v41_sig_map[] = {\n         [31] = { SMIMM_B,          LDTMU, },\n };\n \n+\n+static const struct v3d_qpu_sig v71_sig_map[] = {\n+        /*      MISC       phys    RF0 */\n+        [0]  = {                          },\n+        [1]  = { THRSW,                   },\n+        [2]  = {                   LDUNIF },\n+        [3]  = { THRSW,            LDUNIF },\n+        [4]  = {           LDTMU,         },\n+        [5]  = { THRSW,    LDTMU,         },\n+        [6]  = {           LDTMU,  LDUNIF },\n+        [7]  = { THRSW,    LDTMU,  LDUNIF },\n+        [8]  = {           LDVARY,        },\n+        [9]  = { THRSW,    LDVARY,        },\n+        [10] = {           LDVARY, LDUNIF },\n+        [11] = { THRSW,    LDVARY, LDUNIF },\n+        [12] = { LDUNIFRF                 },\n+        [13] = { THRSW,    LDUNIFRF       },\n+        [14] = { SMIMM_A,                 },\n+        [15] = { SMIMM_B,                 },\n+        [16] = {           LDTLB,         },\n+        [17] = {           LDTLBU,        },\n+        [18] = {                          WRTMUC },\n+        [19] = { THRSW,                   WRTMUC },\n+        [20] = {           LDVARY,        WRTMUC },\n+        [21] = { THRSW,    LDVARY,        WRTMUC },\n+        [22] = { UCB,                     },\n+        /* 23 reserved */\n+        [24] = {                   LDUNIFA},\n+        [25] = { LDUNIFARF                },\n+        /* 26-29 reserved */\n+        [30] = { SMIMM_C,                 },\n+        [31] = { SMIMM_D,                 },\n+};\n+\n bool\n v3d_qpu_sig_unpack(const struct v3d_device_info *devinfo,\n                    uint32_t packed_sig,\n@@ -221,7 +258,9 @@ v3d_qpu_sig_unpack(const struct v3d_device_info *devinfo,\n         if (packed_sig >= ARRAY_SIZE(v33_sig_map))\n                 return false;\n \n-        if (devinfo->ver >= 41)\n+        if (devinfo->ver >= 71)\n+                *sig = v71_sig_map[packed_sig];\n+        else if (devinfo->ver >= 41)\n                 *sig = v41_sig_map[packed_sig];\n         else if (devinfo->ver == 40)\n                 *sig = v40_sig_map[packed_sig];\n@@ -240,7 +279,9 @@ v3d_qpu_sig_pack(const struct v3d_device_info *devinfo,\n {\n         static const struct v3d_qpu_sig *map;\n \n-        if (devinfo->ver >= 41)\n+        if (devinfo->ver >= 71)\n+                map = v71_sig_map;\n+        else if (devinfo->ver >= 41)\n                 map = v41_sig_map;\n         else if (devinfo->ver == 40)\n                 map = v40_sig_map;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0011-broadcom-qpu-define-v3d_qpu_input-use-on-v3d_qpu_alu.patch",
    "content": "From d10e67a396d713ec81fb133f3516e09fe1e067b6 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Fri, 6 Aug 2021 01:22:31 +0200\nSubject: [PATCH 011/142] broadcom/qpu: define v3d_qpu_input, use on\n v3d_qpu_alu_instr\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nAt this point it just tidy up a little the alu_instr structure.\n\nBut also serves to prepare the structure for new changes, as 7.x uses\nraddr instead of mux, and it is just easier to add the raddr to the\nnew input structure.\n\nSigned-off-by: Alejandro Piñeiro <apinheiro@igalia.com>\nSigned-off-by: Iago Toral Quiroga <itoral@igalia.com>\n---\n src/broadcom/compiler/qpu_schedule.c          | 65 +++++++--------\n src/broadcom/compiler/vir.c                   | 16 ++--\n src/broadcom/compiler/vir_dump.c              |  8 +-\n .../compiler/vir_opt_copy_propagate.c         | 12 +--\n .../compiler/vir_opt_redundant_flags.c        |  8 +-\n src/broadcom/compiler/vir_to_qpu.c            | 30 +++----\n src/broadcom/qpu/qpu_disasm.c                 | 16 ++--\n src/broadcom/qpu/qpu_instr.c                  |  8 +-\n src/broadcom/qpu/qpu_instr.h                  | 13 +--\n src/broadcom/qpu/qpu_pack.c                   | 82 +++++++++----------\n src/broadcom/qpu/tests/qpu_disasm.c           |  8 +-\n 11 files changed, 134 insertions(+), 132 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex a10fa03ed10..455fa3867be 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -306,14 +306,14 @@ calculate_deps(struct schedule_state *state, struct schedule_node *n)\n         /* XXX: LOAD_IMM */\n \n         if (v3d_qpu_add_op_num_src(inst->alu.add.op) > 0)\n-                process_mux_deps(state, n, inst->alu.add.a);\n+                process_mux_deps(state, n, inst->alu.add.a.mux);\n         if (v3d_qpu_add_op_num_src(inst->alu.add.op) > 1)\n-                process_mux_deps(state, n, inst->alu.add.b);\n+                process_mux_deps(state, n, inst->alu.add.b.mux);\n \n         if (v3d_qpu_mul_op_num_src(inst->alu.mul.op) > 0)\n-                process_mux_deps(state, n, inst->alu.mul.a);\n+                process_mux_deps(state, n, inst->alu.mul.a.mux);\n         if (v3d_qpu_mul_op_num_src(inst->alu.mul.op) > 1)\n-                process_mux_deps(state, n, inst->alu.mul.b);\n+                process_mux_deps(state, n, inst->alu.mul.b.mux);\n \n         switch (inst->alu.add.op) {\n         case V3D_QPU_A_VPMSETUP:\n@@ -537,22 +537,22 @@ reads_too_soon_after_write(struct choose_scoreboard *scoreboard,\n \n         if (inst->alu.add.op != V3D_QPU_A_NOP) {\n                 if (v3d_qpu_add_op_num_src(inst->alu.add.op) > 0 &&\n-                    mux_reads_too_soon(scoreboard, inst, inst->alu.add.a)) {\n+                    mux_reads_too_soon(scoreboard, inst, inst->alu.add.a.mux)) {\n                         return true;\n                 }\n                 if (v3d_qpu_add_op_num_src(inst->alu.add.op) > 1 &&\n-                    mux_reads_too_soon(scoreboard, inst, inst->alu.add.b)) {\n+                    mux_reads_too_soon(scoreboard, inst, inst->alu.add.b.mux)) {\n                         return true;\n                 }\n         }\n \n         if (inst->alu.mul.op != V3D_QPU_M_NOP) {\n                 if (v3d_qpu_mul_op_num_src(inst->alu.mul.op) > 0 &&\n-                    mux_reads_too_soon(scoreboard, inst, inst->alu.mul.a)) {\n+                    mux_reads_too_soon(scoreboard, inst, inst->alu.mul.a.mux)) {\n                         return true;\n                 }\n                 if (v3d_qpu_mul_op_num_src(inst->alu.mul.op) > 1 &&\n-                    mux_reads_too_soon(scoreboard, inst, inst->alu.mul.b)) {\n+                    mux_reads_too_soon(scoreboard, inst, inst->alu.mul.b.mux)) {\n                         return true;\n                 }\n         }\n@@ -839,20 +839,20 @@ qpu_merge_raddrs(struct v3d_qpu_instr *result,\n         if (!result->sig.small_imm_b) {\n                 if (v3d_qpu_uses_mux(add_instr, V3D_QPU_MUX_B) &&\n                     raddr_a == add_instr->raddr_b) {\n-                        if (add_instr->alu.add.a == V3D_QPU_MUX_B)\n-                                result->alu.add.a = V3D_QPU_MUX_A;\n-                        if (add_instr->alu.add.b == V3D_QPU_MUX_B &&\n+                        if (add_instr->alu.add.a.mux == V3D_QPU_MUX_B)\n+                                result->alu.add.a.mux = V3D_QPU_MUX_A;\n+                        if (add_instr->alu.add.b.mux == V3D_QPU_MUX_B &&\n                             v3d_qpu_add_op_num_src(add_instr->alu.add.op) > 1) {\n-                                result->alu.add.b = V3D_QPU_MUX_A;\n+                                result->alu.add.b.mux = V3D_QPU_MUX_A;\n                         }\n                 }\n                 if (v3d_qpu_uses_mux(mul_instr, V3D_QPU_MUX_B) &&\n                     raddr_a == mul_instr->raddr_b) {\n-                        if (mul_instr->alu.mul.a == V3D_QPU_MUX_B)\n-                                result->alu.mul.a = V3D_QPU_MUX_A;\n-                        if (mul_instr->alu.mul.b == V3D_QPU_MUX_B &&\n+                        if (mul_instr->alu.mul.a.mux == V3D_QPU_MUX_B)\n+                                result->alu.mul.a.mux = V3D_QPU_MUX_A;\n+                        if (mul_instr->alu.mul.b.mux == V3D_QPU_MUX_B &&\n                             v3d_qpu_mul_op_num_src(mul_instr->alu.mul.op) > 1) {\n-                                result->alu.mul.b = V3D_QPU_MUX_A;\n+                                result->alu.mul.b.mux = V3D_QPU_MUX_A;\n                         }\n                 }\n         }\n@@ -863,20 +863,20 @@ qpu_merge_raddrs(struct v3d_qpu_instr *result,\n         result->raddr_b = raddr_b;\n         if (v3d_qpu_uses_mux(add_instr, V3D_QPU_MUX_A) &&\n             raddr_b == add_instr->raddr_a) {\n-                if (add_instr->alu.add.a == V3D_QPU_MUX_A)\n-                        result->alu.add.a = V3D_QPU_MUX_B;\n-                if (add_instr->alu.add.b == V3D_QPU_MUX_A &&\n+                if (add_instr->alu.add.a.mux == V3D_QPU_MUX_A)\n+                        result->alu.add.a.mux = V3D_QPU_MUX_B;\n+                if (add_instr->alu.add.b.mux == V3D_QPU_MUX_A &&\n                     v3d_qpu_add_op_num_src(add_instr->alu.add.op) > 1) {\n-                        result->alu.add.b = V3D_QPU_MUX_B;\n+                        result->alu.add.b.mux = V3D_QPU_MUX_B;\n                 }\n         }\n         if (v3d_qpu_uses_mux(mul_instr, V3D_QPU_MUX_A) &&\n             raddr_b == mul_instr->raddr_a) {\n-                if (mul_instr->alu.mul.a == V3D_QPU_MUX_A)\n-                        result->alu.mul.a = V3D_QPU_MUX_B;\n-                if (mul_instr->alu.mul.b == V3D_QPU_MUX_A &&\n+                if (mul_instr->alu.mul.a.mux == V3D_QPU_MUX_A)\n+                        result->alu.mul.a.mux = V3D_QPU_MUX_B;\n+                if (mul_instr->alu.mul.b.mux == V3D_QPU_MUX_A &&\n                     v3d_qpu_mul_op_num_src(mul_instr->alu.mul.op) > 1) {\n-                        result->alu.mul.b = V3D_QPU_MUX_B;\n+                        result->alu.mul.b.mux = V3D_QPU_MUX_B;\n                 }\n         }\n \n@@ -927,11 +927,12 @@ qpu_convert_add_to_mul(struct v3d_qpu_instr *inst)\n         inst->flags.auf = V3D_QPU_UF_NONE;\n \n         inst->alu.mul.output_pack = inst->alu.add.output_pack;\n-        inst->alu.mul.a_unpack = inst->alu.add.a_unpack;\n-        inst->alu.mul.b_unpack = inst->alu.add.b_unpack;\n+\n+        inst->alu.mul.a.unpack = inst->alu.add.a.unpack;\n+        inst->alu.mul.b.unpack = inst->alu.add.b.unpack;\n         inst->alu.add.output_pack = V3D_QPU_PACK_NONE;\n-        inst->alu.add.a_unpack = V3D_QPU_UNPACK_NONE;\n-        inst->alu.add.b_unpack = V3D_QPU_UNPACK_NONE;\n+        inst->alu.add.a.unpack = V3D_QPU_UNPACK_NONE;\n+        inst->alu.add.b.unpack = V3D_QPU_UNPACK_NONE;\n }\n \n static bool\n@@ -2064,12 +2065,12 @@ alu_reads_register(struct v3d_qpu_instr *inst,\n \n         if (add) {\n                 num_src = v3d_qpu_add_op_num_src(inst->alu.add.op);\n-                mux_a = inst->alu.add.a;\n-                mux_b = inst->alu.add.b;\n+                mux_a = inst->alu.add.a.mux;\n+                mux_b = inst->alu.add.b.mux;\n         } else {\n                 num_src = v3d_qpu_mul_op_num_src(inst->alu.mul.op);\n-                mux_a = inst->alu.mul.a;\n-                mux_b = inst->alu.mul.b;\n+                mux_a = inst->alu.mul.a.mux;\n+                mux_b = inst->alu.mul.b.mux;\n         }\n \n         for (int i = 0; i < num_src; i++) {\ndiff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c\nindex 660b11b0577..007cb0a941b 100644\n--- a/src/broadcom/compiler/vir.c\n+++ b/src/broadcom/compiler/vir.c\n@@ -113,10 +113,10 @@ vir_is_raw_mov(struct qinst *inst)\n                 return false;\n         }\n \n-        if (inst->qpu.alu.add.a_unpack != V3D_QPU_UNPACK_NONE ||\n-            inst->qpu.alu.add.b_unpack != V3D_QPU_UNPACK_NONE ||\n-            inst->qpu.alu.mul.a_unpack != V3D_QPU_UNPACK_NONE ||\n-            inst->qpu.alu.mul.b_unpack != V3D_QPU_UNPACK_NONE) {\n+        if (inst->qpu.alu.add.a.unpack != V3D_QPU_UNPACK_NONE ||\n+            inst->qpu.alu.add.b.unpack != V3D_QPU_UNPACK_NONE ||\n+            inst->qpu.alu.mul.a.unpack != V3D_QPU_UNPACK_NONE ||\n+            inst->qpu.alu.mul.b.unpack != V3D_QPU_UNPACK_NONE) {\n                 return false;\n         }\n \n@@ -209,15 +209,15 @@ vir_set_unpack(struct qinst *inst, int src,\n \n         if (vir_is_add(inst)) {\n                 if (src == 0)\n-                        inst->qpu.alu.add.a_unpack = unpack;\n+                        inst->qpu.alu.add.a.unpack = unpack;\n                 else\n-                        inst->qpu.alu.add.b_unpack = unpack;\n+                        inst->qpu.alu.add.b.unpack = unpack;\n         } else {\n                 assert(vir_is_mul(inst));\n                 if (src == 0)\n-                        inst->qpu.alu.mul.a_unpack = unpack;\n+                        inst->qpu.alu.mul.a.unpack = unpack;\n                 else\n-                        inst->qpu.alu.mul.b_unpack = unpack;\n+                        inst->qpu.alu.mul.b.unpack = unpack;\n         }\n }\n \ndiff --git a/src/broadcom/compiler/vir_dump.c b/src/broadcom/compiler/vir_dump.c\nindex 5c47bbdc1b0..ab5d4043039 100644\n--- a/src/broadcom/compiler/vir_dump.c\n+++ b/src/broadcom/compiler/vir_dump.c\n@@ -270,8 +270,8 @@ vir_dump_alu(struct v3d_compile *c, struct qinst *inst)\n                 vir_print_reg(c, inst, inst->dst);\n                 fprintf(stderr, \"%s\", v3d_qpu_pack_name(instr->alu.add.output_pack));\n \n-                unpack[0] = instr->alu.add.a_unpack;\n-                unpack[1] = instr->alu.add.b_unpack;\n+                unpack[0] = instr->alu.add.a.unpack;\n+                unpack[1] = instr->alu.add.b.unpack;\n         } else {\n                 fprintf(stderr, \"%s\", v3d_qpu_mul_op_name(instr->alu.mul.op));\n                 fprintf(stderr, \"%s\", v3d_qpu_cond_name(instr->flags.mc));\n@@ -282,8 +282,8 @@ vir_dump_alu(struct v3d_compile *c, struct qinst *inst)\n                 vir_print_reg(c, inst, inst->dst);\n                 fprintf(stderr, \"%s\", v3d_qpu_pack_name(instr->alu.mul.output_pack));\n \n-                unpack[0] = instr->alu.mul.a_unpack;\n-                unpack[1] = instr->alu.mul.b_unpack;\n+                unpack[0] = instr->alu.mul.a.unpack;\n+                unpack[1] = instr->alu.mul.b.unpack;\n         }\n \n         for (int i = 0; i < nsrc; i++) {\ndiff --git a/src/broadcom/compiler/vir_opt_copy_propagate.c b/src/broadcom/compiler/vir_opt_copy_propagate.c\nindex da121c2a5bd..c4aa7255a17 100644\n--- a/src/broadcom/compiler/vir_opt_copy_propagate.c\n+++ b/src/broadcom/compiler/vir_opt_copy_propagate.c\n@@ -104,14 +104,14 @@ vir_has_unpack(struct qinst *inst, int chan)\n \n         if (vir_is_add(inst)) {\n                 if (chan == 0)\n-                        return inst->qpu.alu.add.a_unpack != V3D_QPU_UNPACK_NONE;\n+                        return inst->qpu.alu.add.a.unpack != V3D_QPU_UNPACK_NONE;\n                 else\n-                        return inst->qpu.alu.add.b_unpack != V3D_QPU_UNPACK_NONE;\n+                        return inst->qpu.alu.add.b.unpack != V3D_QPU_UNPACK_NONE;\n         } else {\n                 if (chan == 0)\n-                        return inst->qpu.alu.mul.a_unpack != V3D_QPU_UNPACK_NONE;\n+                        return inst->qpu.alu.mul.a.unpack != V3D_QPU_UNPACK_NONE;\n                 else\n-                        return inst->qpu.alu.mul.b_unpack != V3D_QPU_UNPACK_NONE;\n+                        return inst->qpu.alu.mul.b.unpack != V3D_QPU_UNPACK_NONE;\n         }\n }\n \n@@ -161,7 +161,7 @@ try_copy_prop(struct v3d_compile *c, struct qinst *inst, struct qinst **movs)\n                                 continue;\n \n                         /* these ops can't represent abs. */\n-                        if (mov->qpu.alu.mul.a_unpack == V3D_QPU_UNPACK_ABS) {\n+                        if (mov->qpu.alu.mul.a.unpack == V3D_QPU_UNPACK_ABS) {\n                                 switch (inst->qpu.alu.add.op) {\n                                 case V3D_QPU_A_VFPACK:\n                                 case V3D_QPU_A_FROUND:\n@@ -189,7 +189,7 @@ try_copy_prop(struct v3d_compile *c, struct qinst *inst, struct qinst **movs)\n \n                 inst->src[i] = mov->src[0];\n                 if (vir_has_unpack(mov, 0)) {\n-                        enum v3d_qpu_input_unpack unpack = mov->qpu.alu.mul.a_unpack;\n+                        enum v3d_qpu_input_unpack unpack = mov->qpu.alu.mul.a.unpack;\n \n                         vir_set_unpack(inst, i, unpack);\n                 }\ndiff --git a/src/broadcom/compiler/vir_opt_redundant_flags.c b/src/broadcom/compiler/vir_opt_redundant_flags.c\nindex c7896d57f2b..6b61ed6a39a 100644\n--- a/src/broadcom/compiler/vir_opt_redundant_flags.c\n+++ b/src/broadcom/compiler/vir_opt_redundant_flags.c\n@@ -81,11 +81,11 @@ vir_instr_flags_op_equal(struct qinst *a, struct qinst *b)\n             a->qpu.flags.mpf != b->qpu.flags.mpf ||\n             a->qpu.alu.add.op != b->qpu.alu.add.op ||\n             a->qpu.alu.mul.op != b->qpu.alu.mul.op ||\n-            a->qpu.alu.add.a_unpack != b->qpu.alu.add.a_unpack ||\n-            a->qpu.alu.add.b_unpack != b->qpu.alu.add.b_unpack ||\n+            a->qpu.alu.add.a.unpack != b->qpu.alu.add.a.unpack ||\n+            a->qpu.alu.add.b.unpack != b->qpu.alu.add.b.unpack ||\n             a->qpu.alu.add.output_pack != b->qpu.alu.add.output_pack ||\n-            a->qpu.alu.mul.a_unpack != b->qpu.alu.mul.a_unpack ||\n-            a->qpu.alu.mul.b_unpack != b->qpu.alu.mul.b_unpack ||\n+            a->qpu.alu.mul.a.unpack != b->qpu.alu.mul.a.unpack ||\n+            a->qpu.alu.mul.b.unpack != b->qpu.alu.mul.b.unpack ||\n             a->qpu.alu.mul.output_pack != b->qpu.alu.mul.output_pack) {\n                 return false;\n         }\ndiff --git a/src/broadcom/compiler/vir_to_qpu.c b/src/broadcom/compiler/vir_to_qpu.c\nindex 15c2e3674c2..c8b6e0a91a0 100644\n--- a/src/broadcom/compiler/vir_to_qpu.c\n+++ b/src/broadcom/compiler/vir_to_qpu.c\n@@ -106,20 +106,20 @@ set_src(struct v3d_qpu_instr *instr, enum v3d_qpu_mux *mux, struct qpu_reg src)\n                 return;\n         }\n \n-        if (instr->alu.add.a != V3D_QPU_MUX_A &&\n-            instr->alu.add.b != V3D_QPU_MUX_A &&\n-            instr->alu.mul.a != V3D_QPU_MUX_A &&\n-            instr->alu.mul.b != V3D_QPU_MUX_A) {\n+        if (instr->alu.add.a.mux != V3D_QPU_MUX_A &&\n+            instr->alu.add.b.mux != V3D_QPU_MUX_A &&\n+            instr->alu.mul.a.mux != V3D_QPU_MUX_A &&\n+            instr->alu.mul.b.mux != V3D_QPU_MUX_A) {\n                 instr->raddr_a = src.index;\n                 *mux = V3D_QPU_MUX_A;\n         } else {\n                 if (instr->raddr_a == src.index) {\n                         *mux = V3D_QPU_MUX_A;\n                 } else {\n-                        assert(!(instr->alu.add.a == V3D_QPU_MUX_B &&\n-                                 instr->alu.add.b == V3D_QPU_MUX_B &&\n-                                 instr->alu.mul.a == V3D_QPU_MUX_B &&\n-                                 instr->alu.mul.b == V3D_QPU_MUX_B) ||\n+                        assert(!(instr->alu.add.a.mux == V3D_QPU_MUX_B &&\n+                                 instr->alu.add.b.mux == V3D_QPU_MUX_B &&\n+                                 instr->alu.mul.a.mux == V3D_QPU_MUX_B &&\n+                                 instr->alu.mul.b.mux == V3D_QPU_MUX_B) ||\n                                src.index == instr->raddr_b);\n \n                         instr->raddr_b = src.index;\n@@ -147,14 +147,14 @@ is_no_op_mov(struct qinst *qinst)\n                 if (waddr < V3D_QPU_WADDR_R0 || waddr > V3D_QPU_WADDR_R4)\n                         return false;\n \n-                if (qinst->qpu.alu.mul.a !=\n+                if (qinst->qpu.alu.mul.a.mux !=\n                     V3D_QPU_MUX_R0 + (waddr - V3D_QPU_WADDR_R0)) {\n                         return false;\n                 }\n         } else {\n                 int raddr;\n \n-                switch (qinst->qpu.alu.mul.a) {\n+                switch (qinst->qpu.alu.mul.a.mux) {\n                 case V3D_QPU_MUX_A:\n                         raddr = qinst->qpu.raddr_a;\n                         break;\n@@ -171,7 +171,7 @@ is_no_op_mov(struct qinst *qinst)\n         /* No packing or flags updates, or we need to execute the\n          * instruction.\n          */\n-        if (qinst->qpu.alu.mul.a_unpack != V3D_QPU_UNPACK_NONE ||\n+        if (qinst->qpu.alu.mul.a.unpack != V3D_QPU_UNPACK_NONE ||\n             qinst->qpu.alu.mul.output_pack != V3D_QPU_PACK_NONE ||\n             qinst->qpu.flags.mc != V3D_QPU_COND_NONE ||\n             qinst->qpu.flags.mpf != V3D_QPU_PF_NONE ||\n@@ -302,11 +302,11 @@ v3d_generate_code_block(struct v3d_compile *c,\n                                 assert(qinst->qpu.alu.mul.op == V3D_QPU_M_NOP);\n                                 if (nsrc >= 1) {\n                                         set_src(&qinst->qpu,\n-                                                &qinst->qpu.alu.add.a, src[0]);\n+                                                &qinst->qpu.alu.add.a.mux, src[0]);\n                                 }\n                                 if (nsrc >= 2) {\n                                         set_src(&qinst->qpu,\n-                                                &qinst->qpu.alu.add.b, src[1]);\n+                                                &qinst->qpu.alu.add.b.mux, src[1]);\n                                 }\n \n                                 qinst->qpu.alu.add.waddr = dst.index;\n@@ -314,11 +314,11 @@ v3d_generate_code_block(struct v3d_compile *c,\n                         } else {\n                                 if (nsrc >= 1) {\n                                         set_src(&qinst->qpu,\n-                                                &qinst->qpu.alu.mul.a, src[0]);\n+                                                &qinst->qpu.alu.mul.a.mux, src[0]);\n                                 }\n                                 if (nsrc >= 2) {\n                                         set_src(&qinst->qpu,\n-                                                &qinst->qpu.alu.mul.b, src[1]);\n+                                                &qinst->qpu.alu.mul.b.mux, src[1]);\n                                 }\n \n                                 qinst->qpu.alu.mul.waddr = dst.index;\ndiff --git a/src/broadcom/qpu/qpu_disasm.c b/src/broadcom/qpu/qpu_disasm.c\nindex 6aca3c28e78..588a665f770 100644\n--- a/src/broadcom/qpu/qpu_disasm.c\n+++ b/src/broadcom/qpu/qpu_disasm.c\n@@ -121,16 +121,16 @@ v3d_qpu_disasm_add(struct disasm_state *disasm,\n         if (num_src >= 1) {\n                 if (has_dst)\n                         append(disasm, \", \");\n-                v3d_qpu_disasm_raddr(disasm, instr, instr->alu.add.a);\n+                v3d_qpu_disasm_raddr(disasm, instr, instr->alu.add.a.mux);\n                 append(disasm, \"%s\",\n-                       v3d_qpu_unpack_name(instr->alu.add.a_unpack));\n+                       v3d_qpu_unpack_name(instr->alu.add.a.unpack));\n         }\n \n         if (num_src >= 2) {\n                 append(disasm, \", \");\n-                v3d_qpu_disasm_raddr(disasm, instr, instr->alu.add.b);\n+                v3d_qpu_disasm_raddr(disasm, instr, instr->alu.add.b.mux);\n                 append(disasm, \"%s\",\n-                       v3d_qpu_unpack_name(instr->alu.add.b_unpack));\n+                       v3d_qpu_unpack_name(instr->alu.add.b.unpack));\n         }\n }\n \n@@ -164,16 +164,16 @@ v3d_qpu_disasm_mul(struct disasm_state *disasm,\n         if (num_src >= 1) {\n                 if (has_dst)\n                         append(disasm, \", \");\n-                v3d_qpu_disasm_raddr(disasm, instr, instr->alu.mul.a);\n+                v3d_qpu_disasm_raddr(disasm, instr, instr->alu.mul.a.mux);\n                 append(disasm, \"%s\",\n-                       v3d_qpu_unpack_name(instr->alu.mul.a_unpack));\n+                       v3d_qpu_unpack_name(instr->alu.mul.a.unpack));\n         }\n \n         if (num_src >= 2) {\n                 append(disasm, \", \");\n-                v3d_qpu_disasm_raddr(disasm, instr, instr->alu.mul.b);\n+                v3d_qpu_disasm_raddr(disasm, instr, instr->alu.mul.b.mux);\n                 append(disasm, \"%s\",\n-                       v3d_qpu_unpack_name(instr->alu.mul.b_unpack));\n+                       v3d_qpu_unpack_name(instr->alu.mul.b.unpack));\n         }\n }\n \ndiff --git a/src/broadcom/qpu/qpu_instr.c b/src/broadcom/qpu/qpu_instr.c\nindex 7759fb0efdf..7ece8b5e570 100644\n--- a/src/broadcom/qpu/qpu_instr.c\n+++ b/src/broadcom/qpu/qpu_instr.c\n@@ -926,10 +926,10 @@ v3d_qpu_uses_mux(const struct v3d_qpu_instr *inst, enum v3d_qpu_mux mux)\n         int add_nsrc = v3d_qpu_add_op_num_src(inst->alu.add.op);\n         int mul_nsrc = v3d_qpu_mul_op_num_src(inst->alu.mul.op);\n \n-        return ((add_nsrc > 0 && inst->alu.add.a == mux) ||\n-                (add_nsrc > 1 && inst->alu.add.b == mux) ||\n-                (mul_nsrc > 0 && inst->alu.mul.a == mux) ||\n-                (mul_nsrc > 1 && inst->alu.mul.b == mux));\n+        return ((add_nsrc > 0 && inst->alu.add.a.mux == mux) ||\n+                (add_nsrc > 1 && inst->alu.add.b.mux == mux) ||\n+                (mul_nsrc > 0 && inst->alu.mul.a.mux == mux) ||\n+                (mul_nsrc > 1 && inst->alu.mul.b.mux == mux));\n }\n \n bool\ndiff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h\nindex 13b3f37d43f..53a51bfb3e1 100644\n--- a/src/broadcom/qpu/qpu_instr.h\n+++ b/src/broadcom/qpu/qpu_instr.h\n@@ -294,25 +294,26 @@ enum v3d_qpu_mux {\n         V3D_QPU_MUX_B,\n };\n \n+struct v3d_qpu_input {\n+        enum v3d_qpu_mux mux;\n+        enum v3d_qpu_input_unpack unpack;\n+};\n+\n struct v3d_qpu_alu_instr {\n         struct {\n                 enum v3d_qpu_add_op op;\n-                enum v3d_qpu_mux a, b;\n+                struct v3d_qpu_input a, b;\n                 uint8_t waddr;\n                 bool magic_write;\n                 enum v3d_qpu_output_pack output_pack;\n-                enum v3d_qpu_input_unpack a_unpack;\n-                enum v3d_qpu_input_unpack b_unpack;\n         } add;\n \n         struct {\n                 enum v3d_qpu_mul_op op;\n-                enum v3d_qpu_mux a, b;\n+                struct v3d_qpu_input a, b;\n                 uint8_t waddr;\n                 bool magic_write;\n                 enum v3d_qpu_output_pack output_pack;\n-                enum v3d_qpu_input_unpack a_unpack;\n-                enum v3d_qpu_input_unpack b_unpack;\n         } mul;\n };\n \ndiff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c\nindex 2820d9d4c56..6e975793fc0 100644\n--- a/src/broadcom/qpu/qpu_pack.c\n+++ b/src/broadcom/qpu/qpu_pack.c\n@@ -853,12 +853,12 @@ v3d_qpu_add_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n                         instr->alu.add.output_pack = V3D_QPU_PACK_NONE;\n \n                 if (!v3d_qpu_float32_unpack_unpack((op >> 2) & 0x3,\n-                                                   &instr->alu.add.a_unpack)) {\n+                                                   &instr->alu.add.a.unpack)) {\n                         return false;\n                 }\n \n                 if (!v3d_qpu_float32_unpack_unpack((op >> 0) & 0x3,\n-                                                   &instr->alu.add.b_unpack)) {\n+                                                   &instr->alu.add.b.unpack)) {\n                         return false;\n                 }\n                 break;\n@@ -872,7 +872,7 @@ v3d_qpu_add_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n                 instr->alu.add.output_pack = mux_b & 0x3;\n \n                 if (!v3d_qpu_float32_unpack_unpack((op >> 2) & 0x3,\n-                                                   &instr->alu.add.a_unpack)) {\n+                                                   &instr->alu.add.a.unpack)) {\n                         return false;\n                 }\n                 break;\n@@ -884,7 +884,7 @@ v3d_qpu_add_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n                 instr->alu.add.output_pack = V3D_QPU_PACK_NONE;\n \n                 if (!v3d_qpu_float32_unpack_unpack((op >> 2) & 0x3,\n-                                                   &instr->alu.add.a_unpack)) {\n+                                                   &instr->alu.add.a.unpack)) {\n                         return false;\n                 }\n                 break;\n@@ -892,23 +892,23 @@ v3d_qpu_add_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n         case V3D_QPU_A_VFMIN:\n         case V3D_QPU_A_VFMAX:\n                 if (!v3d_qpu_float16_unpack_unpack(op & 0x7,\n-                                                   &instr->alu.add.a_unpack)) {\n+                                                   &instr->alu.add.a.unpack)) {\n                         return false;\n                 }\n \n                 instr->alu.add.output_pack = V3D_QPU_PACK_NONE;\n-                instr->alu.add.b_unpack = V3D_QPU_UNPACK_NONE;\n+                instr->alu.add.b.unpack = V3D_QPU_UNPACK_NONE;\n                 break;\n \n         default:\n                 instr->alu.add.output_pack = V3D_QPU_PACK_NONE;\n-                instr->alu.add.a_unpack = V3D_QPU_UNPACK_NONE;\n-                instr->alu.add.b_unpack = V3D_QPU_UNPACK_NONE;\n+                instr->alu.add.a.unpack = V3D_QPU_UNPACK_NONE;\n+                instr->alu.add.b.unpack = V3D_QPU_UNPACK_NONE;\n                 break;\n         }\n \n-        instr->alu.add.a = mux_a;\n-        instr->alu.add.b = mux_b;\n+        instr->alu.add.a.mux = mux_a;\n+        instr->alu.add.b.mux = mux_b;\n         instr->alu.add.waddr = QPU_GET_FIELD(packed_inst, V3D_QPU_WADDR_A);\n \n         instr->alu.add.magic_write = false;\n@@ -956,12 +956,12 @@ v3d_qpu_mul_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n                 instr->alu.mul.output_pack = ((op >> 4) & 0x3) - 1;\n \n                 if (!v3d_qpu_float32_unpack_unpack((op >> 2) & 0x3,\n-                                                   &instr->alu.mul.a_unpack)) {\n+                                                   &instr->alu.mul.a.unpack)) {\n                         return false;\n                 }\n \n                 if (!v3d_qpu_float32_unpack_unpack((op >> 0) & 0x3,\n-                                                   &instr->alu.mul.b_unpack)) {\n+                                                   &instr->alu.mul.b.unpack)) {\n                         return false;\n                 }\n \n@@ -972,7 +972,7 @@ v3d_qpu_mul_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n                                               ((mux_b >> 2) & 1));\n \n                 if (!v3d_qpu_float32_unpack_unpack(mux_b & 0x3,\n-                                                   &instr->alu.mul.a_unpack)) {\n+                                                   &instr->alu.mul.a.unpack)) {\n                         return false;\n                 }\n \n@@ -982,23 +982,23 @@ v3d_qpu_mul_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n                 instr->alu.mul.output_pack = V3D_QPU_PACK_NONE;\n \n                 if (!v3d_qpu_float16_unpack_unpack(((op & 0x7) - 4) & 7,\n-                                                   &instr->alu.mul.a_unpack)) {\n+                                                   &instr->alu.mul.a.unpack)) {\n                         return false;\n                 }\n \n-                instr->alu.mul.b_unpack = V3D_QPU_UNPACK_NONE;\n+                instr->alu.mul.b.unpack = V3D_QPU_UNPACK_NONE;\n \n                 break;\n \n         default:\n                 instr->alu.mul.output_pack = V3D_QPU_PACK_NONE;\n-                instr->alu.mul.a_unpack = V3D_QPU_UNPACK_NONE;\n-                instr->alu.mul.b_unpack = V3D_QPU_UNPACK_NONE;\n+                instr->alu.mul.a.unpack = V3D_QPU_UNPACK_NONE;\n+                instr->alu.mul.b.unpack = V3D_QPU_UNPACK_NONE;\n                 break;\n         }\n \n-        instr->alu.mul.a = mux_a;\n-        instr->alu.mul.b = mux_b;\n+        instr->alu.mul.a.mux = mux_a;\n+        instr->alu.mul.b.mux = mux_b;\n         instr->alu.mul.waddr = QPU_GET_FIELD(packed_inst, V3D_QPU_WADDR_M);\n         instr->alu.mul.magic_write = packed_inst & V3D_QPU_MM;\n \n@@ -1030,8 +1030,8 @@ v3d_qpu_add_pack(const struct v3d_device_info *devinfo,\n                  const struct v3d_qpu_instr *instr, uint64_t *packed_instr)\n {\n         uint32_t waddr = instr->alu.add.waddr;\n-        uint32_t mux_a = instr->alu.add.a;\n-        uint32_t mux_b = instr->alu.add.b;\n+        uint32_t mux_a = instr->alu.add.a.mux;\n+        uint32_t mux_b = instr->alu.add.b.mux;\n         int nsrc = v3d_qpu_add_op_num_src(instr->alu.add.op);\n         const struct opcode_desc *desc =\n                 lookup_opcode_from_instr(devinfo, add_ops, ARRAY_SIZE(add_ops),\n@@ -1102,12 +1102,12 @@ v3d_qpu_add_pack(const struct v3d_device_info *devinfo,\n                 }\n                 opcode |= output_pack << 4;\n \n-                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.a_unpack,\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.a.unpack,\n                                                  &a_unpack)) {\n                         return false;\n                 }\n \n-                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.b_unpack,\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.b.unpack,\n                                                  &b_unpack)) {\n                         return false;\n                 }\n@@ -1141,17 +1141,17 @@ v3d_qpu_add_pack(const struct v3d_device_info *devinfo,\n                 uint32_t a_unpack;\n                 uint32_t b_unpack;\n \n-                if (instr->alu.add.a_unpack == V3D_QPU_UNPACK_ABS ||\n-                    instr->alu.add.b_unpack == V3D_QPU_UNPACK_ABS) {\n+                if (instr->alu.add.a.unpack == V3D_QPU_UNPACK_ABS ||\n+                    instr->alu.add.b.unpack == V3D_QPU_UNPACK_ABS) {\n                         return false;\n                 }\n \n-                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.a_unpack,\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.a.unpack,\n                                                  &a_unpack)) {\n                         return false;\n                 }\n \n-                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.b_unpack,\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.b.unpack,\n                                                  &b_unpack)) {\n                         return false;\n                 }\n@@ -1176,7 +1176,7 @@ v3d_qpu_add_pack(const struct v3d_device_info *devinfo,\n                 }\n                 mux_b |= packed;\n \n-                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.a_unpack,\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.a.unpack,\n                                                  &packed)) {\n                         return false;\n                 }\n@@ -1194,7 +1194,7 @@ v3d_qpu_add_pack(const struct v3d_device_info *devinfo,\n                         return false;\n \n                 uint32_t packed;\n-                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.a_unpack,\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.a.unpack,\n                                                  &packed)) {\n                         return false;\n                 }\n@@ -1207,11 +1207,11 @@ v3d_qpu_add_pack(const struct v3d_device_info *devinfo,\n         case V3D_QPU_A_VFMIN:\n         case V3D_QPU_A_VFMAX:\n                 if (instr->alu.add.output_pack != V3D_QPU_PACK_NONE ||\n-                    instr->alu.add.b_unpack != V3D_QPU_UNPACK_NONE) {\n+                    instr->alu.add.b.unpack != V3D_QPU_UNPACK_NONE) {\n                         return false;\n                 }\n \n-                if (!v3d_qpu_float16_unpack_pack(instr->alu.add.a_unpack,\n+                if (!v3d_qpu_float16_unpack_pack(instr->alu.add.a.unpack,\n                                                  &packed)) {\n                         return false;\n                 }\n@@ -1221,8 +1221,8 @@ v3d_qpu_add_pack(const struct v3d_device_info *devinfo,\n         default:\n                 if (instr->alu.add.op != V3D_QPU_A_NOP &&\n                     (instr->alu.add.output_pack != V3D_QPU_PACK_NONE ||\n-                     instr->alu.add.a_unpack != V3D_QPU_UNPACK_NONE ||\n-                     instr->alu.add.b_unpack != V3D_QPU_UNPACK_NONE)) {\n+                     instr->alu.add.a.unpack != V3D_QPU_UNPACK_NONE ||\n+                     instr->alu.add.b.unpack != V3D_QPU_UNPACK_NONE)) {\n                         return false;\n                 }\n                 break;\n@@ -1242,8 +1242,8 @@ static bool\n v3d_qpu_mul_pack(const struct v3d_device_info *devinfo,\n                  const struct v3d_qpu_instr *instr, uint64_t *packed_instr)\n {\n-        uint32_t mux_a = instr->alu.mul.a;\n-        uint32_t mux_b = instr->alu.mul.b;\n+        uint32_t mux_a = instr->alu.mul.a.mux;\n+        uint32_t mux_b = instr->alu.mul.b.mux;\n         int nsrc = v3d_qpu_mul_op_num_src(instr->alu.mul.op);\n \n         const struct opcode_desc *desc =\n@@ -1277,13 +1277,13 @@ v3d_qpu_mul_pack(const struct v3d_device_info *devinfo,\n                  */\n                 opcode += packed << 4;\n \n-                if (!v3d_qpu_float32_unpack_pack(instr->alu.mul.a_unpack,\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.mul.a.unpack,\n                                                  &packed)) {\n                         return false;\n                 }\n                 opcode |= packed << 2;\n \n-                if (!v3d_qpu_float32_unpack_pack(instr->alu.mul.b_unpack,\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.mul.b.unpack,\n                                                  &packed)) {\n                         return false;\n                 }\n@@ -1301,7 +1301,7 @@ v3d_qpu_mul_pack(const struct v3d_device_info *devinfo,\n                 opcode |= (packed >> 1) & 1;\n                 mux_b = (packed & 1) << 2;\n \n-                if (!v3d_qpu_float32_unpack_pack(instr->alu.mul.a_unpack,\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.mul.a.unpack,\n                                                  &packed)) {\n                         return false;\n                 }\n@@ -1315,16 +1315,16 @@ v3d_qpu_mul_pack(const struct v3d_device_info *devinfo,\n                 if (instr->alu.mul.output_pack != V3D_QPU_PACK_NONE)\n                         return false;\n \n-                if (!v3d_qpu_float16_unpack_pack(instr->alu.mul.a_unpack,\n+                if (!v3d_qpu_float16_unpack_pack(instr->alu.mul.a.unpack,\n                                                  &packed)) {\n                         return false;\n                 }\n-                if (instr->alu.mul.a_unpack == V3D_QPU_UNPACK_SWAP_16)\n+                if (instr->alu.mul.a.unpack == V3D_QPU_UNPACK_SWAP_16)\n                         opcode = 8;\n                 else\n                         opcode |= (packed + 4) & 7;\n \n-                if (instr->alu.mul.b_unpack != V3D_QPU_UNPACK_NONE)\n+                if (instr->alu.mul.b.unpack != V3D_QPU_UNPACK_NONE)\n                         return false;\n \n                 break;\ndiff --git a/src/broadcom/qpu/tests/qpu_disasm.c b/src/broadcom/qpu/tests/qpu_disasm.c\nindex 2f8e19c73fe..be7b78d5ef0 100644\n--- a/src/broadcom/qpu/tests/qpu_disasm.c\n+++ b/src/broadcom/qpu/tests/qpu_disasm.c\n@@ -160,10 +160,10 @@ main(int argc, char **argv)\n                                 /* Swap the operands to be sure that we test\n                                  * how the QPUs distinguish between these ops.\n                                  */\n-                                swap_mux(&instr.alu.add.a,\n-                                         &instr.alu.add.b);\n-                                swap_pack(&instr.alu.add.a_unpack,\n-                                          &instr.alu.add.b_unpack);\n+                                swap_mux(&instr.alu.add.a.mux,\n+                                         &instr.alu.add.b.mux);\n+                                swap_pack(&instr.alu.add.a.unpack,\n+                                          &instr.alu.add.b.unpack);\n                                 break;\n                         default:\n                                 break;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0012-broadcom-qpu-add-raddr-on-v3d_qpu_input.patch",
    "content": "From 52ea09792ff8a438ccdecac47b8415657be90098 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Fri, 6 Aug 2021 01:33:32 +0200\nSubject: [PATCH 012/142] broadcom/qpu: add raddr on v3d_qpu_input\n\nOn V3D 7.x mux are not used, and raddr_a/b/c/d are used instead\n\nThis is not perfect, as for v71, the raddr_a/b defined at qpu_instr\nbecame superfluous. But the alternative would be to define two\ndifferent structs, or even having them defined based on version\nifdefs, so this is a reasonable compromise.\n---\n src/broadcom/qpu/qpu_instr.h | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)\n\ndiff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h\nindex 53a51bfb3e1..9e56e2d6a99 100644\n--- a/src/broadcom/qpu/qpu_instr.h\n+++ b/src/broadcom/qpu/qpu_instr.h\n@@ -295,7 +295,10 @@ enum v3d_qpu_mux {\n };\n \n struct v3d_qpu_input {\n-        enum v3d_qpu_mux mux;\n+        union {\n+                enum v3d_qpu_mux mux; /* V3D 4.x */\n+                uint8_t raddr; /* V3D 7.x */\n+        };\n         enum v3d_qpu_input_unpack unpack;\n };\n \n@@ -385,8 +388,8 @@ struct v3d_qpu_instr {\n         struct v3d_qpu_sig sig;\n         uint8_t sig_addr;\n         bool sig_magic; /* If the signal writes to a magic address */\n-        uint8_t raddr_a;\n-        uint8_t raddr_b;\n+        uint8_t raddr_a; /* V3D 4.x */\n+        uint8_t raddr_b; /* V3D 4.x*/\n         struct v3d_qpu_flags flags;\n \n         union {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0013-broadcom-qpu-defining-shift-mask-for-raddr_c-d.patch",
    "content": "From 3e5ad0881c2789619cdf65f40a44d5481e28e800 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 12 Aug 2021 02:24:02 +0200\nSubject: [PATCH 013/142] broadcom/qpu: defining shift/mask for raddr_c/d\n\nOn V3D 7.x it replaces mul_a/b and add_a/b\n---\n src/broadcom/qpu/qpu_pack.c | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c\nindex 6e975793fc0..4f106909729 100644\n--- a/src/broadcom/qpu/qpu_pack.c\n+++ b/src/broadcom/qpu/qpu_pack.c\n@@ -84,6 +84,9 @@\n #define V3D_QPU_MUL_A_SHIFT                 18\n #define V3D_QPU_MUL_A_MASK                  QPU_MASK(20, 18)\n \n+#define V3D_QPU_RADDR_C_SHIFT               18\n+#define V3D_QPU_RADDR_C_MASK                QPU_MASK(23, 18)\n+\n #define V3D_QPU_ADD_B_SHIFT                 15\n #define V3D_QPU_ADD_B_MASK                  QPU_MASK(17, 15)\n \n@@ -98,6 +101,9 @@\n #define V3D_QPU_BRANCH_BDI_SHIFT            12\n #define V3D_QPU_BRANCH_BDI_MASK             QPU_MASK(13, 12)\n \n+#define V3D_QPU_RADDR_D_SHIFT               12\n+#define V3D_QPU_RADDR_D_MASK                QPU_MASK(17, 12)\n+\n #define V3D_QPU_RADDR_A_SHIFT               6\n #define V3D_QPU_RADDR_A_MASK                QPU_MASK(11, 6)\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0014-broadcom-commmon-add-has_accumulators-field-on-v3d_d.patch",
    "content": "From 81febf14fe05ad26e992275b911e8bc1e1416ebc Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Fri, 17 Sep 2021 01:04:31 +0200\nSubject: [PATCH 014/142] broadcom/commmon: add has_accumulators field on\n v3d_device_info\n\nEven if we can just check for the version on the code, checking for\nthis field makes several places more readable. So for example, on the\nregister allocate code we doesn't assign an accumulator because we\ndon't have accumulators on that hw, instead of because hw version is a\ngiven one.\n---\n src/broadcom/common/v3d_device_info.c | 2 ++\n src/broadcom/common/v3d_device_info.h | 3 +++\n 2 files changed, 5 insertions(+)\n\ndiff --git a/src/broadcom/common/v3d_device_info.c b/src/broadcom/common/v3d_device_info.c\nindex 7512fe3a06b..7bc2b662cfc 100644\n--- a/src/broadcom/common/v3d_device_info.c\n+++ b/src/broadcom/common/v3d_device_info.c\n@@ -65,6 +65,8 @@ v3d_get_device_info(int fd, struct v3d_device_info* devinfo, v3d_ioctl_fun drm_i\n     int qups = (ident1.value >> 8) & 0xf;\n     devinfo->qpu_count = nslc * qups;\n \n+    devinfo->has_accumulators = devinfo->ver < 71;\n+\n     switch (devinfo->ver) {\n         case 33:\n         case 41:\ndiff --git a/src/broadcom/common/v3d_device_info.h b/src/broadcom/common/v3d_device_info.h\nindex 32cb65cf81f..8dfc7858727 100644\n--- a/src/broadcom/common/v3d_device_info.h\n+++ b/src/broadcom/common/v3d_device_info.h\n@@ -42,6 +42,9 @@ struct v3d_device_info {\n \n         /* NSLC * QUPS from the core's IDENT registers. */\n         int qpu_count;\n+\n+        /* If the hw has accumulator registers */\n+        bool has_accumulators;\n };\n \n typedef int (*v3d_ioctl_fun)(int fd, unsigned long request, void *arg);\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0015-broadcom-qpu-add-qpu_writes_rf0_implicitly-helper.patch",
    "content": "From 7d42eca87b6e144697810405308d99d200dca62a Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Wed, 15 Sep 2021 10:56:43 +0200\nSubject: [PATCH 015/142] broadcom/qpu: add qpu_writes_rf0_implicitly helper\n\nOn v71 rf0 replaces r5 as the register that gets updated implicitly\nwith uniform loads, and gets the C coefficient with ldvary. This\nhelper return if rf0 gets implicitly updated.\n---\n src/broadcom/qpu/qpu_instr.c | 12 ++++++++++++\n src/broadcom/qpu/qpu_instr.h |  2 ++\n 2 files changed, 14 insertions(+)\n\ndiff --git a/src/broadcom/qpu/qpu_instr.c b/src/broadcom/qpu/qpu_instr.c\nindex 7ece8b5e570..8de99c611d5 100644\n--- a/src/broadcom/qpu/qpu_instr.c\n+++ b/src/broadcom/qpu/qpu_instr.c\n@@ -920,6 +920,18 @@ v3d_qpu_writes_accum(const struct v3d_device_info *devinfo,\n         return false;\n }\n \n+bool\n+v3d_qpu_writes_rf0_implicitly(const struct v3d_device_info *devinfo,\n+                              const struct v3d_qpu_instr *inst)\n+{\n+        if (devinfo->ver >= 71 &&\n+            (inst->sig.ldvary || inst->sig.ldunif || inst->sig.ldunifa)) {\n+                return true;\n+        }\n+\n+        return false;\n+}\n+\n bool\n v3d_qpu_uses_mux(const struct v3d_qpu_instr *inst, enum v3d_qpu_mux mux)\n {\ndiff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h\nindex 9e56e2d6a99..a25be8e0ee6 100644\n--- a/src/broadcom/qpu/qpu_instr.h\n+++ b/src/broadcom/qpu/qpu_instr.h\n@@ -473,6 +473,8 @@ bool v3d_qpu_writes_r4(const struct v3d_device_info *devinfo,\n                        const struct v3d_qpu_instr *instr) ATTRIBUTE_CONST;\n bool v3d_qpu_writes_r5(const struct v3d_device_info *devinfo,\n                        const struct v3d_qpu_instr *instr) ATTRIBUTE_CONST;\n+bool v3d_qpu_writes_rf0_implicitly(const struct v3d_device_info *devinfo,\n+                                   const struct v3d_qpu_instr *instr) ATTRIBUTE_CONST;\n bool v3d_qpu_writes_accum(const struct v3d_device_info *devinfo,\n                           const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;\n bool v3d_qpu_waits_on_tmu(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0016-broadcom-qpu-add-pack-unpack-support-for-v71.patch",
    "content": "From f0859613bd59e14fb21571e7978bb5c5d5e9c6d7 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Sat, 7 Aug 2021 02:20:39 +0200\nSubject: [PATCH 016/142] broadcom/qpu: add pack/unpack support for v71\n\nNote that we provide new v71 alu pack/unpack methods. As there are a\nlot that it is equivalent, initially we tried to use existing methods\nas template and add version checks on the existing methods. At some\nearly point that become just really unreadable, so it become better to\njust provide new methods, even if v42 and v71 methods have a really\nsimilar structure.\n\nNote that we have splitted the op tables, and created a two (add/mul)\nfor v71. As the description struct include versioning info, we could\nhave just used one table. But, specially with the add table, there are\na lot of differences with v71. So it is slightly tidier this\nway. Also, taking into account that we do a linear search on the\ntables, this can be even justified by performance.\n---\n src/broadcom/qpu/qpu_pack.c | 1049 ++++++++++++++++++++++++++++++-----\n 1 file changed, 904 insertions(+), 145 deletions(-)\n\ndiff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c\nindex 4f106909729..4045275cb9a 100644\n--- a/src/broadcom/qpu/qpu_pack.c\n+++ b/src/broadcom/qpu/qpu_pack.c\n@@ -490,16 +490,26 @@ v3d_qpu_flags_pack(const struct v3d_device_info *devinfo,\n \n /* Make a mapping of the table of opcodes in the spec.  The opcode is\n  * determined by a combination of the opcode field, and in the case of 0 or\n- * 1-arg opcodes, the mux_b field as well.\n+ * 1-arg opcodes, the mux (version <= 42) or raddr (version >= 71) field as\n+ * well.\n  */\n-#define MUX_MASK(bot, top) (((1 << (top + 1)) - 1) - ((1 << (bot)) - 1))\n-#define ANYMUX MUX_MASK(0, 7)\n+#define OP_MASK(val) BITFIELD64_BIT(val)\n+#define OP_RANGE(bot, top) BITFIELD64_RANGE(bot, top - bot + 1)\n+#define ANYMUX OP_RANGE(0, 7)\n+#define ANYOPMASK OP_RANGE(0, 63)\n \n struct opcode_desc {\n         uint8_t opcode_first;\n         uint8_t opcode_last;\n-        uint8_t mux_b_mask;\n-        uint8_t mux_a_mask;\n+\n+        union {\n+                struct {\n+                        uint8_t b_mask;\n+                        uint8_t a_mask;\n+                } mux;\n+                uint64_t raddr_mask;\n+        };\n+\n         uint8_t op;\n \n         /* first_ver == 0 if it's the same across all V3D versions.\n@@ -512,122 +522,288 @@ struct opcode_desc {\n         uint8_t last_ver;\n };\n \n-static const struct opcode_desc add_ops[] = {\n+static const struct opcode_desc add_ops_v33[] = {\n         /* FADD is FADDNF depending on the order of the mux_a/mux_b. */\n-        { 0,   47,  ANYMUX, ANYMUX, V3D_QPU_A_FADD },\n-        { 0,   47,  ANYMUX, ANYMUX, V3D_QPU_A_FADDNF },\n-        { 53,  55,  ANYMUX, ANYMUX, V3D_QPU_A_VFPACK },\n-        { 56,  56,  ANYMUX, ANYMUX, V3D_QPU_A_ADD },\n-        { 57,  59,  ANYMUX, ANYMUX, V3D_QPU_A_VFPACK },\n-        { 60,  60,  ANYMUX, ANYMUX, V3D_QPU_A_SUB },\n-        { 61,  63,  ANYMUX, ANYMUX, V3D_QPU_A_VFPACK },\n-        { 64,  111, ANYMUX, ANYMUX, V3D_QPU_A_FSUB },\n-        { 120, 120, ANYMUX, ANYMUX, V3D_QPU_A_MIN },\n-        { 121, 121, ANYMUX, ANYMUX, V3D_QPU_A_MAX },\n-        { 122, 122, ANYMUX, ANYMUX, V3D_QPU_A_UMIN },\n-        { 123, 123, ANYMUX, ANYMUX, V3D_QPU_A_UMAX },\n-        { 124, 124, ANYMUX, ANYMUX, V3D_QPU_A_SHL },\n-        { 125, 125, ANYMUX, ANYMUX, V3D_QPU_A_SHR },\n-        { 126, 126, ANYMUX, ANYMUX, V3D_QPU_A_ASR },\n-        { 127, 127, ANYMUX, ANYMUX, V3D_QPU_A_ROR },\n+        { 0,   47,  .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_FADD },\n+        { 0,   47,  .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_FADDNF },\n+        { 53,  55,  .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_VFPACK },\n+        { 56,  56,  .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_ADD },\n+        { 57,  59,  .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_VFPACK },\n+        { 60,  60,  .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_SUB },\n+        { 61,  63,  .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_VFPACK },\n+        { 64,  111, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_FSUB },\n+        { 120, 120, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_MIN },\n+        { 121, 121, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_MAX },\n+        { 122, 122, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_UMIN },\n+        { 123, 123, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_UMAX },\n+        { 124, 124, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_SHL },\n+        { 125, 125, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_SHR },\n+        { 126, 126, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_ASR },\n+        { 127, 127, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_ROR },\n         /* FMIN is instead FMAX depending on the order of the mux_a/mux_b. */\n-        { 128, 175, ANYMUX, ANYMUX, V3D_QPU_A_FMIN },\n-        { 128, 175, ANYMUX, ANYMUX, V3D_QPU_A_FMAX },\n-        { 176, 180, ANYMUX, ANYMUX, V3D_QPU_A_VFMIN },\n-\n-        { 181, 181, ANYMUX, ANYMUX, V3D_QPU_A_AND },\n-        { 182, 182, ANYMUX, ANYMUX, V3D_QPU_A_OR },\n-        { 183, 183, ANYMUX, ANYMUX, V3D_QPU_A_XOR },\n-\n-        { 184, 184, ANYMUX, ANYMUX, V3D_QPU_A_VADD },\n-        { 185, 185, ANYMUX, ANYMUX, V3D_QPU_A_VSUB },\n-        { 186, 186, 1 << 0, ANYMUX, V3D_QPU_A_NOT },\n-        { 186, 186, 1 << 1, ANYMUX, V3D_QPU_A_NEG },\n-        { 186, 186, 1 << 2, ANYMUX, V3D_QPU_A_FLAPUSH },\n-        { 186, 186, 1 << 3, ANYMUX, V3D_QPU_A_FLBPUSH },\n-        { 186, 186, 1 << 4, ANYMUX, V3D_QPU_A_FLPOP },\n-        { 186, 186, 1 << 5, ANYMUX, V3D_QPU_A_RECIP },\n-        { 186, 186, 1 << 6, ANYMUX, V3D_QPU_A_SETMSF },\n-        { 186, 186, 1 << 7, ANYMUX, V3D_QPU_A_SETREVF },\n-        { 187, 187, 1 << 0, 1 << 0, V3D_QPU_A_NOP, 0 },\n-        { 187, 187, 1 << 0, 1 << 1, V3D_QPU_A_TIDX },\n-        { 187, 187, 1 << 0, 1 << 2, V3D_QPU_A_EIDX },\n-        { 187, 187, 1 << 0, 1 << 3, V3D_QPU_A_LR },\n-        { 187, 187, 1 << 0, 1 << 4, V3D_QPU_A_VFLA },\n-        { 187, 187, 1 << 0, 1 << 5, V3D_QPU_A_VFLNA },\n-        { 187, 187, 1 << 0, 1 << 6, V3D_QPU_A_VFLB },\n-        { 187, 187, 1 << 0, 1 << 7, V3D_QPU_A_VFLNB },\n-\n-        { 187, 187, 1 << 1, MUX_MASK(0, 2), V3D_QPU_A_FXCD },\n-        { 187, 187, 1 << 1, 1 << 3, V3D_QPU_A_XCD },\n-        { 187, 187, 1 << 1, MUX_MASK(4, 6), V3D_QPU_A_FYCD },\n-        { 187, 187, 1 << 1, 1 << 7, V3D_QPU_A_YCD },\n-\n-        { 187, 187, 1 << 2, 1 << 0, V3D_QPU_A_MSF },\n-        { 187, 187, 1 << 2, 1 << 1, V3D_QPU_A_REVF },\n-        { 187, 187, 1 << 2, 1 << 2, V3D_QPU_A_VDWWT, 33 },\n-        { 187, 187, 1 << 2, 1 << 2, V3D_QPU_A_IID, 40 },\n-        { 187, 187, 1 << 2, 1 << 3, V3D_QPU_A_SAMPID, 40 },\n-        { 187, 187, 1 << 2, 1 << 4, V3D_QPU_A_BARRIERID, 40 },\n-        { 187, 187, 1 << 2, 1 << 5, V3D_QPU_A_TMUWT },\n-        { 187, 187, 1 << 2, 1 << 6, V3D_QPU_A_VPMWT },\n-        { 187, 187, 1 << 2, 1 << 7, V3D_QPU_A_FLAFIRST, 41 },\n-        { 187, 187, 1 << 3, 1 << 0, V3D_QPU_A_FLNAFIRST, 41 },\n-        { 187, 187, 1 << 3, ANYMUX, V3D_QPU_A_VPMSETUP, 33 },\n-\n-        { 188, 188, 1 << 0, ANYMUX, V3D_QPU_A_LDVPMV_IN, 40 },\n-        { 188, 188, 1 << 0, ANYMUX, V3D_QPU_A_LDVPMV_OUT, 40 },\n-        { 188, 188, 1 << 1, ANYMUX, V3D_QPU_A_LDVPMD_IN, 40 },\n-        { 188, 188, 1 << 1, ANYMUX, V3D_QPU_A_LDVPMD_OUT, 40 },\n-        { 188, 188, 1 << 2, ANYMUX, V3D_QPU_A_LDVPMP, 40 },\n-        { 188, 188, 1 << 3, ANYMUX, V3D_QPU_A_RSQRT, 41 },\n-        { 188, 188, 1 << 4, ANYMUX, V3D_QPU_A_EXP, 41 },\n-        { 188, 188, 1 << 5, ANYMUX, V3D_QPU_A_LOG, 41 },\n-        { 188, 188, 1 << 6, ANYMUX, V3D_QPU_A_SIN, 41 },\n-        { 188, 188, 1 << 7, ANYMUX, V3D_QPU_A_RSQRT2, 41 },\n-        { 189, 189, ANYMUX, ANYMUX, V3D_QPU_A_LDVPMG_IN, 40 },\n-        { 189, 189, ANYMUX, ANYMUX, V3D_QPU_A_LDVPMG_OUT, 40 },\n+        { 128, 175, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_FMIN },\n+        { 128, 175, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_FMAX },\n+        { 176, 180, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_VFMIN },\n+\n+        { 181, 181, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_AND },\n+        { 182, 182, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_OR },\n+        { 183, 183, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_XOR },\n+\n+        { 184, 184, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_VADD },\n+        { 185, 185, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_VSUB },\n+        { 186, 186, .mux.b_mask = OP_MASK(0), .mux.a_mask = ANYMUX, V3D_QPU_A_NOT },\n+        { 186, 186, .mux.b_mask = OP_MASK(1), .mux.a_mask = ANYMUX, V3D_QPU_A_NEG },\n+        { 186, 186, .mux.b_mask = OP_MASK(2), .mux.a_mask = ANYMUX, V3D_QPU_A_FLAPUSH },\n+        { 186, 186, .mux.b_mask = OP_MASK(3), .mux.a_mask = ANYMUX, V3D_QPU_A_FLBPUSH },\n+        { 186, 186, .mux.b_mask = OP_MASK(4), .mux.a_mask = ANYMUX, V3D_QPU_A_FLPOP },\n+        { 186, 186, .mux.b_mask = OP_MASK(5), .mux.a_mask = ANYMUX, V3D_QPU_A_RECIP },\n+        { 186, 186, .mux.b_mask = OP_MASK(6), .mux.a_mask = ANYMUX, V3D_QPU_A_SETMSF },\n+        { 186, 186, .mux.b_mask = OP_MASK(7), .mux.a_mask = ANYMUX, V3D_QPU_A_SETREVF },\n+        { 187, 187, .mux.b_mask = OP_MASK(0), .mux.a_mask = OP_MASK(0), V3D_QPU_A_NOP, 0 },\n+        { 187, 187, .mux.b_mask = OP_MASK(0), .mux.a_mask = OP_MASK(1), V3D_QPU_A_TIDX },\n+        { 187, 187, .mux.b_mask = OP_MASK(0), .mux.a_mask = OP_MASK(2), V3D_QPU_A_EIDX },\n+        { 187, 187, .mux.b_mask = OP_MASK(0), .mux.a_mask = OP_MASK(3), V3D_QPU_A_LR },\n+        { 187, 187, .mux.b_mask = OP_MASK(0), .mux.a_mask = OP_MASK(4), V3D_QPU_A_VFLA },\n+        { 187, 187, .mux.b_mask = OP_MASK(0), .mux.a_mask = OP_MASK(5), V3D_QPU_A_VFLNA },\n+        { 187, 187, .mux.b_mask = OP_MASK(0), .mux.a_mask = OP_MASK(6), V3D_QPU_A_VFLB },\n+        { 187, 187, .mux.b_mask = OP_MASK(0), .mux.a_mask = OP_MASK(7), V3D_QPU_A_VFLNB },\n+\n+        { 187, 187, .mux.b_mask = OP_MASK(1), .mux.a_mask = OP_RANGE(0, 2), V3D_QPU_A_FXCD },\n+        { 187, 187, .mux.b_mask = OP_MASK(1), .mux.a_mask = OP_MASK(3), V3D_QPU_A_XCD },\n+        { 187, 187, .mux.b_mask = OP_MASK(1), .mux.a_mask = OP_RANGE(4, 6), V3D_QPU_A_FYCD },\n+        { 187, 187, .mux.b_mask = OP_MASK(1), .mux.a_mask = OP_MASK(7), V3D_QPU_A_YCD },\n+\n+        { 187, 187, .mux.b_mask = OP_MASK(2), .mux.a_mask = OP_MASK(0), V3D_QPU_A_MSF },\n+        { 187, 187, .mux.b_mask = OP_MASK(2), .mux.a_mask = OP_MASK(1), V3D_QPU_A_REVF },\n+        { 187, 187, .mux.b_mask = OP_MASK(2), .mux.a_mask = OP_MASK(2), V3D_QPU_A_VDWWT, 33 },\n+        { 187, 187, .mux.b_mask = OP_MASK(2), .mux.a_mask = OP_MASK(2), V3D_QPU_A_IID, 40 },\n+        { 187, 187, .mux.b_mask = OP_MASK(2), .mux.a_mask = OP_MASK(3), V3D_QPU_A_SAMPID, 40 },\n+        { 187, 187, .mux.b_mask = OP_MASK(2), .mux.a_mask = OP_MASK(4), V3D_QPU_A_BARRIERID, 40 },\n+        { 187, 187, .mux.b_mask = OP_MASK(2), .mux.a_mask = OP_MASK(5), V3D_QPU_A_TMUWT },\n+        { 187, 187, .mux.b_mask = OP_MASK(2), .mux.a_mask = OP_MASK(6), V3D_QPU_A_VPMWT },\n+        { 187, 187, .mux.b_mask = OP_MASK(2), .mux.a_mask = OP_MASK(7), V3D_QPU_A_FLAFIRST, 41 },\n+        { 187, 187, .mux.b_mask = OP_MASK(3), .mux.a_mask = OP_MASK(0), V3D_QPU_A_FLNAFIRST, 41 },\n+        { 187, 187, .mux.b_mask = OP_MASK(3), .mux.a_mask = ANYMUX, V3D_QPU_A_VPMSETUP, 33 },\n+\n+        { 188, 188, .mux.b_mask = OP_MASK(0), .mux.a_mask = ANYMUX, V3D_QPU_A_LDVPMV_IN, 40 },\n+        { 188, 188, .mux.b_mask = OP_MASK(0), .mux.a_mask = ANYMUX, V3D_QPU_A_LDVPMV_OUT, 40 },\n+        { 188, 188, .mux.b_mask = OP_MASK(1), .mux.a_mask = ANYMUX, V3D_QPU_A_LDVPMD_IN, 40 },\n+        { 188, 188, .mux.b_mask = OP_MASK(1), .mux.a_mask = ANYMUX, V3D_QPU_A_LDVPMD_OUT, 40 },\n+        { 188, 188, .mux.b_mask = OP_MASK(2), .mux.a_mask = ANYMUX, V3D_QPU_A_LDVPMP, 40 },\n+        { 188, 188, .mux.b_mask = OP_MASK(3), .mux.a_mask = ANYMUX, V3D_QPU_A_RSQRT, 41 },\n+        { 188, 188, .mux.b_mask = OP_MASK(4), .mux.a_mask = ANYMUX, V3D_QPU_A_EXP, 41 },\n+        { 188, 188, .mux.b_mask = OP_MASK(5), .mux.a_mask = ANYMUX, V3D_QPU_A_LOG, 41 },\n+        { 188, 188, .mux.b_mask = OP_MASK(6), .mux.a_mask = ANYMUX, V3D_QPU_A_SIN, 41 },\n+        { 188, 188, .mux.b_mask = OP_MASK(7), .mux.a_mask = ANYMUX, V3D_QPU_A_RSQRT2, 41 },\n+        { 189, 189, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_LDVPMG_IN, 40 },\n+        { 189, 189, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_LDVPMG_OUT, 40 },\n \n         /* FIXME: MORE COMPLICATED */\n-        /* { 190, 191, ANYMUX, ANYMUX, V3D_QPU_A_VFMOVABSNEGNAB }, */\n+        /* { 190, 191, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_VFMOVABSNEGNAB }, */\n \n-        { 192, 239, ANYMUX, ANYMUX, V3D_QPU_A_FCMP },\n-        { 240, 244, ANYMUX, ANYMUX, V3D_QPU_A_VFMAX },\n+        { 192, 239, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_FCMP },\n+        { 240, 244, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_VFMAX },\n \n-        { 245, 245, MUX_MASK(0, 2), ANYMUX, V3D_QPU_A_FROUND },\n-        { 245, 245, 1 << 3, ANYMUX, V3D_QPU_A_FTOIN },\n-        { 245, 245, MUX_MASK(4, 6), ANYMUX, V3D_QPU_A_FTRUNC },\n-        { 245, 245, 1 << 7, ANYMUX, V3D_QPU_A_FTOIZ },\n-        { 246, 246, MUX_MASK(0, 2), ANYMUX, V3D_QPU_A_FFLOOR },\n-        { 246, 246, 1 << 3, ANYMUX, V3D_QPU_A_FTOUZ },\n-        { 246, 246, MUX_MASK(4, 6), ANYMUX, V3D_QPU_A_FCEIL },\n-        { 246, 246, 1 << 7, ANYMUX, V3D_QPU_A_FTOC },\n+        { 245, 245, .mux.b_mask = OP_RANGE(0, 2), .mux.a_mask = ANYMUX, V3D_QPU_A_FROUND },\n+        { 245, 245, .mux.b_mask = OP_MASK(3), .mux.a_mask = ANYMUX, V3D_QPU_A_FTOIN },\n+        { 245, 245, .mux.b_mask = OP_RANGE(4, 6), .mux.a_mask = ANYMUX, V3D_QPU_A_FTRUNC },\n+        { 245, 245, .mux.b_mask = OP_MASK(7), .mux.a_mask = ANYMUX, V3D_QPU_A_FTOIZ },\n+        { 246, 246, .mux.b_mask = OP_RANGE(0, 2), .mux.a_mask = ANYMUX, V3D_QPU_A_FFLOOR },\n+        { 246, 246, .mux.b_mask = OP_MASK(3), .mux.a_mask = ANYMUX, V3D_QPU_A_FTOUZ },\n+        { 246, 246, .mux.b_mask = OP_RANGE(4, 6), .mux.a_mask = ANYMUX, V3D_QPU_A_FCEIL },\n+        { 246, 246, .mux.b_mask = OP_MASK(7), .mux.a_mask = ANYMUX, V3D_QPU_A_FTOC },\n \n-        { 247, 247, MUX_MASK(0, 2), ANYMUX, V3D_QPU_A_FDX },\n-        { 247, 247, MUX_MASK(4, 6), ANYMUX, V3D_QPU_A_FDY },\n+        { 247, 247, .mux.b_mask = OP_RANGE(0, 2), .mux.a_mask = ANYMUX, V3D_QPU_A_FDX },\n+        { 247, 247, .mux.b_mask = OP_RANGE(4, 6), .mux.a_mask = ANYMUX, V3D_QPU_A_FDY },\n \n         /* The stvpms are distinguished by the waddr field. */\n-        { 248, 248, ANYMUX, ANYMUX, V3D_QPU_A_STVPMV },\n-        { 248, 248, ANYMUX, ANYMUX, V3D_QPU_A_STVPMD },\n-        { 248, 248, ANYMUX, ANYMUX, V3D_QPU_A_STVPMP },\n+        { 248, 248, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_STVPMV },\n+        { 248, 248, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_STVPMD },\n+        { 248, 248, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_A_STVPMP },\n+\n+        { 252, 252, .mux.b_mask = OP_RANGE(0, 2), .mux.a_mask = ANYMUX, V3D_QPU_A_ITOF },\n+        { 252, 252, .mux.b_mask = OP_MASK(3), .mux.a_mask = ANYMUX, V3D_QPU_A_CLZ },\n+        { 252, 252, .mux.b_mask = OP_RANGE(4, 6), .mux.a_mask = ANYMUX, V3D_QPU_A_UTOF },\n+};\n+\n+static const struct opcode_desc mul_ops_v33[] = {\n+        { 1, 1, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_M_ADD },\n+        { 2, 2, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_M_SUB },\n+        { 3, 3, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_M_UMUL24 },\n+        { 4, 8, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_M_VFMUL },\n+        { 9, 9, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_M_SMUL24 },\n+        { 10, 10, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_M_MULTOP },\n+        { 14, 14, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_M_FMOV, 33, 42 },\n+        { 15, 15, .mux.b_mask = OP_RANGE(0, 3), ANYMUX, V3D_QPU_M_FMOV, 33, 42},\n+        { 15, 15, .mux.b_mask = OP_MASK(4), .mux.a_mask = OP_MASK(0), V3D_QPU_M_NOP, 33, 42 },\n+        { 15, 15, .mux.b_mask = OP_MASK(7), .mux.a_mask = ANYMUX, V3D_QPU_M_MOV, 33, 42 },\n+\n+        { 16, 63, .mux.b_mask = ANYMUX, .mux.a_mask = ANYMUX, V3D_QPU_M_FMUL },\n+};\n+\n+/* Note that it would have been possible to define all the add/mul opcodes in\n+ * just one table, using the first_ver/last_ver. But taking into account that\n+ * for v71 there were a lot of changes, it was more tidy this way. Also right\n+ * now we are doing a linear search on those tables, so this maintains the\n+ * tables smaller.\n+ *\n+ * Just in case we merge the tables, we define the first_ver as 71 for those\n+ * opcodes that changed on v71\n+ */\n+static const struct opcode_desc add_ops_v71[] = {\n+        { 0,   47,  .raddr_mask = ANYOPMASK, V3D_QPU_A_FADD },\n+        { 53,  55,  .raddr_mask = ANYOPMASK, V3D_QPU_A_VFPACK },\n+        { 56,  56,  .raddr_mask = ANYOPMASK, V3D_QPU_A_ADD },\n+        { 57,  59,  .raddr_mask = ANYOPMASK, V3D_QPU_A_VFPACK },\n+        { 60,  60,  .raddr_mask = ANYOPMASK, V3D_QPU_A_SUB },\n+        { 61,  63,  .raddr_mask = ANYOPMASK, V3D_QPU_A_VFPACK },\n+        { 64,  111, .raddr_mask = ANYOPMASK, V3D_QPU_A_FSUB },\n+        { 120, 120, .raddr_mask = ANYOPMASK, V3D_QPU_A_MIN },\n+        { 121, 121, .raddr_mask = ANYOPMASK, V3D_QPU_A_MAX },\n+        { 122, 122, .raddr_mask = ANYOPMASK, V3D_QPU_A_UMIN },\n+        { 123, 123, .raddr_mask = ANYOPMASK, V3D_QPU_A_UMAX },\n+        { 124, 124, .raddr_mask = ANYOPMASK, V3D_QPU_A_SHL },\n+        { 125, 125, .raddr_mask = ANYOPMASK, V3D_QPU_A_SHR },\n+        { 126, 126, .raddr_mask = ANYOPMASK, V3D_QPU_A_ASR },\n+        { 127, 127, .raddr_mask = ANYOPMASK, V3D_QPU_A_ROR },\n+\n+        { 181, 181, .raddr_mask = ANYOPMASK, V3D_QPU_A_AND },\n+        { 182, 182, .raddr_mask = ANYOPMASK, V3D_QPU_A_OR },\n+        { 183, 183, .raddr_mask = ANYOPMASK, V3D_QPU_A_XOR },\n+        { 184, 184, .raddr_mask = ANYOPMASK, V3D_QPU_A_VADD },\n+        { 185, 185, .raddr_mask = ANYOPMASK, V3D_QPU_A_VSUB },\n+\n+        { 186, 186, .raddr_mask = OP_MASK(0), V3D_QPU_A_NOT },\n+        { 186, 186, .raddr_mask = OP_MASK(1), V3D_QPU_A_NEG },\n+        { 186, 186, .raddr_mask = OP_MASK(2), V3D_QPU_A_FLAPUSH },\n+        { 186, 186, .raddr_mask = OP_MASK(3), V3D_QPU_A_FLBPUSH },\n+        { 186, 186, .raddr_mask = OP_MASK(4), V3D_QPU_A_FLPOP },\n+        { 186, 186, .raddr_mask = OP_MASK(5), V3D_QPU_A_CLZ },\n+        { 186, 186, .raddr_mask = OP_MASK(6), V3D_QPU_A_SETMSF },\n+        { 186, 186, .raddr_mask = OP_MASK(7), V3D_QPU_A_SETREVF },\n+\n+        { 187, 187, .raddr_mask = OP_MASK(0), V3D_QPU_A_NOP, 0 },\n+        { 187, 187, .raddr_mask = OP_MASK(1), V3D_QPU_A_TIDX },\n+        { 187, 187, .raddr_mask = OP_MASK(2), V3D_QPU_A_EIDX },\n+        { 187, 187, .raddr_mask = OP_MASK(3), V3D_QPU_A_LR },\n+        { 187, 187, .raddr_mask = OP_MASK(4), V3D_QPU_A_VFLA },\n+        { 187, 187, .raddr_mask = OP_MASK(5), V3D_QPU_A_VFLNA },\n+        { 187, 187, .raddr_mask = OP_MASK(6), V3D_QPU_A_VFLB },\n+        { 187, 187, .raddr_mask = OP_MASK(7), V3D_QPU_A_VFLNB },\n+        { 187, 187, .raddr_mask = OP_MASK(8), V3D_QPU_A_XCD },\n+        { 187, 187, .raddr_mask = OP_MASK(9), V3D_QPU_A_YCD },\n+        { 187, 187, .raddr_mask = OP_MASK(10), V3D_QPU_A_MSF },\n+        { 187, 187, .raddr_mask = OP_MASK(11), V3D_QPU_A_REVF },\n+        { 187, 187, .raddr_mask = OP_MASK(12), V3D_QPU_A_IID },\n+        { 187, 187, .raddr_mask = OP_MASK(13), V3D_QPU_A_SAMPID },\n+        { 187, 187, .raddr_mask = OP_MASK(14), V3D_QPU_A_BARRIERID },\n+        { 187, 187, .raddr_mask = OP_MASK(15), V3D_QPU_A_TMUWT },\n+        { 187, 187, .raddr_mask = OP_MASK(16), V3D_QPU_A_VPMWT },\n+        { 187, 187, .raddr_mask = OP_MASK(17), V3D_QPU_A_FLAFIRST },\n+        { 187, 187, .raddr_mask = OP_MASK(18), V3D_QPU_A_FLNAFIRST },\n+\n+        { 187, 187, .raddr_mask = OP_RANGE(32, 34), V3D_QPU_A_FXCD },\n+        { 187, 187, .raddr_mask = OP_RANGE(36, 38), V3D_QPU_A_FYCD },\n+\n+        { 188, 188, .raddr_mask = OP_MASK(0), V3D_QPU_A_LDVPMV_IN, 71 },\n+        { 188, 188, .raddr_mask = OP_MASK(1), V3D_QPU_A_LDVPMD_IN, 71 },\n+        { 188, 188, .raddr_mask = OP_MASK(2), V3D_QPU_A_LDVPMP, 71 },\n+\n+        { 188, 188, .raddr_mask = OP_MASK(32), V3D_QPU_A_RECIP, 71 },\n+        { 188, 188, .raddr_mask = OP_MASK(33), V3D_QPU_A_RSQRT, 71 },\n+        { 188, 188, .raddr_mask = OP_MASK(34), V3D_QPU_A_EXP, 71 },\n+        { 188, 188, .raddr_mask = OP_MASK(35), V3D_QPU_A_LOG, 71 },\n+        { 188, 188, .raddr_mask = OP_MASK(36), V3D_QPU_A_SIN, 71 },\n+        { 188, 188, .raddr_mask = OP_MASK(37), V3D_QPU_A_RSQRT2, 71 },\n+\n+        { 189, 189, .raddr_mask = ANYOPMASK, V3D_QPU_A_LDVPMG_IN, 71 },\n \n-        { 252, 252, MUX_MASK(0, 2), ANYMUX, V3D_QPU_A_ITOF },\n-        { 252, 252, 1 << 3, ANYMUX, V3D_QPU_A_CLZ },\n-        { 252, 252, MUX_MASK(4, 6), ANYMUX, V3D_QPU_A_UTOF },\n+        /* The stvpms are distinguished by the waddr field. */\n+        { 190, 190, .raddr_mask = ANYOPMASK, V3D_QPU_A_STVPMV, 71},\n+        { 190, 190, .raddr_mask = ANYOPMASK, V3D_QPU_A_STVPMD, 71},\n+        { 190, 190, .raddr_mask = ANYOPMASK, V3D_QPU_A_STVPMP, 71},\n+\n+        { 192, 207, .raddr_mask = ANYOPMASK, V3D_QPU_A_FCMP, 71 },\n+\n+        { 245, 245, .raddr_mask = OP_RANGE(0, 2),   V3D_QPU_A_FROUND, 71 },\n+        { 245, 245, .raddr_mask = OP_RANGE(4, 6),   V3D_QPU_A_FROUND, 71 },\n+        { 245, 245, .raddr_mask = OP_RANGE(8, 10),  V3D_QPU_A_FROUND, 71 },\n+        { 245, 245, .raddr_mask = OP_RANGE(12, 14), V3D_QPU_A_FROUND, 71 },\n+\n+        { 245, 245, .raddr_mask = OP_MASK(3),  V3D_QPU_A_FTOIN, 71 },\n+        { 245, 245, .raddr_mask = OP_MASK(7),  V3D_QPU_A_FTOIN, 71 },\n+        { 245, 245, .raddr_mask = OP_MASK(11), V3D_QPU_A_FTOIN, 71 },\n+        { 245, 245, .raddr_mask = OP_MASK(15), V3D_QPU_A_FTOIN, 71 },\n+\n+        { 245, 245, .raddr_mask = OP_RANGE(16, 18), V3D_QPU_A_FTRUNC, 71 },\n+        { 245, 245, .raddr_mask = OP_RANGE(20, 22), V3D_QPU_A_FTRUNC, 71 },\n+        { 245, 245, .raddr_mask = OP_RANGE(24, 26), V3D_QPU_A_FTRUNC, 71 },\n+        { 245, 245, .raddr_mask = OP_RANGE(28, 30), V3D_QPU_A_FTRUNC, 71 },\n+\n+        { 245, 245, .raddr_mask = OP_MASK(19), V3D_QPU_A_FTOIZ, 71 },\n+        { 245, 245, .raddr_mask = OP_MASK(23), V3D_QPU_A_FTOIZ, 71 },\n+        { 245, 245, .raddr_mask = OP_MASK(27), V3D_QPU_A_FTOIZ, 71 },\n+        { 245, 245, .raddr_mask = OP_MASK(31), V3D_QPU_A_FTOIZ, 71 },\n+\n+        { 245, 245, .raddr_mask = OP_RANGE(32, 34), V3D_QPU_A_FFLOOR, 71 },\n+        { 245, 245, .raddr_mask = OP_RANGE(36, 38), V3D_QPU_A_FFLOOR, 71 },\n+        { 245, 245, .raddr_mask = OP_RANGE(40, 42), V3D_QPU_A_FFLOOR, 71 },\n+        { 245, 245, .raddr_mask = OP_RANGE(44, 46), V3D_QPU_A_FFLOOR, 71 },\n+\n+        { 245, 245, .raddr_mask = OP_MASK(35), V3D_QPU_A_FTOUZ, 71 },\n+        { 245, 245, .raddr_mask = OP_MASK(39), V3D_QPU_A_FTOUZ, 71 },\n+        { 245, 245, .raddr_mask = OP_MASK(43), V3D_QPU_A_FTOUZ, 71 },\n+        { 245, 245, .raddr_mask = OP_MASK(47), V3D_QPU_A_FTOUZ, 71 },\n+\n+        { 245, 245, .raddr_mask = OP_RANGE(48, 50), V3D_QPU_A_FCEIL, 71 },\n+        { 245, 245, .raddr_mask = OP_RANGE(52, 54), V3D_QPU_A_FCEIL, 71 },\n+        { 245, 245, .raddr_mask = OP_RANGE(56, 58), V3D_QPU_A_FCEIL, 71 },\n+        { 245, 245, .raddr_mask = OP_RANGE(60, 62), V3D_QPU_A_FCEIL, 71 },\n+\n+        { 245, 245, .raddr_mask = OP_MASK(51), V3D_QPU_A_FTOC },\n+        { 245, 245, .raddr_mask = OP_MASK(55), V3D_QPU_A_FTOC },\n+        { 245, 245, .raddr_mask = OP_MASK(59), V3D_QPU_A_FTOC },\n+        { 245, 245, .raddr_mask = OP_MASK(63), V3D_QPU_A_FTOC },\n+\n+        { 246, 246, .raddr_mask = OP_RANGE(0, 2),   V3D_QPU_A_FDX, 71 },\n+        { 246, 246, .raddr_mask = OP_RANGE(4, 6),   V3D_QPU_A_FDX, 71 },\n+        { 246, 246, .raddr_mask = OP_RANGE(8, 10),  V3D_QPU_A_FDX, 71 },\n+        { 246, 246, .raddr_mask = OP_RANGE(12, 14), V3D_QPU_A_FDX, 71 },\n+        { 246, 246, .raddr_mask = OP_RANGE(16, 18), V3D_QPU_A_FDY, 71 },\n+        { 246, 246, .raddr_mask = OP_RANGE(20, 22), V3D_QPU_A_FDY, 71 },\n+        { 246, 246, .raddr_mask = OP_RANGE(24, 26), V3D_QPU_A_FDY, 71 },\n+        { 246, 246, .raddr_mask = OP_RANGE(28, 30), V3D_QPU_A_FDY, 71 },\n+\n+        { 246, 246, .raddr_mask = OP_RANGE(32, 34), V3D_QPU_A_ITOF, 71 },\n+        { 246, 246, .raddr_mask = OP_RANGE(36, 38), V3D_QPU_A_UTOF, 71 },\n };\n \n-static const struct opcode_desc mul_ops[] = {\n-        { 1, 1, ANYMUX, ANYMUX, V3D_QPU_M_ADD },\n-        { 2, 2, ANYMUX, ANYMUX, V3D_QPU_M_SUB },\n-        { 3, 3, ANYMUX, ANYMUX, V3D_QPU_M_UMUL24 },\n-        { 4, 8, ANYMUX, ANYMUX, V3D_QPU_M_VFMUL },\n-        { 9, 9, ANYMUX, ANYMUX, V3D_QPU_M_SMUL24 },\n-        { 10, 10, ANYMUX, ANYMUX, V3D_QPU_M_MULTOP },\n-        { 14, 14, ANYMUX, ANYMUX, V3D_QPU_M_FMOV },\n-        { 15, 15, MUX_MASK(0, 3), ANYMUX, V3D_QPU_M_FMOV },\n-        { 15, 15, 1 << 4, 1 << 0, V3D_QPU_M_NOP, 0 },\n-        { 15, 15, 1 << 7, ANYMUX, V3D_QPU_M_MOV },\n-        { 16, 63, ANYMUX, ANYMUX, V3D_QPU_M_FMUL },\n+static const struct opcode_desc mul_ops_v71[] = {\n+        /* For V3D 7.1, second mask field would be ignored */\n+        { 1, 1, .raddr_mask = ANYOPMASK, V3D_QPU_M_ADD, 71 },\n+        { 2, 2, .raddr_mask = ANYOPMASK, V3D_QPU_M_SUB, 71 },\n+        { 3, 3, .raddr_mask = ANYOPMASK, V3D_QPU_M_UMUL24, 71 },\n+        { 3, 3, .raddr_mask = ANYOPMASK, V3D_QPU_M_UMUL24, 71 },\n+        { 4, 8, .raddr_mask = ANYOPMASK, V3D_QPU_M_VFMUL, 71 },\n+        { 9, 9, .raddr_mask = ANYOPMASK, V3D_QPU_M_SMUL24, 71 },\n+        { 10, 10, .raddr_mask = ANYOPMASK, V3D_QPU_M_MULTOP, 71 },\n+\n+        { 14, 14, .raddr_mask = OP_RANGE(0, 2),   V3D_QPU_M_FMOV, 71 },\n+        { 14, 14, .raddr_mask = OP_RANGE(4, 6),   V3D_QPU_M_FMOV, 71 },\n+        { 14, 14, .raddr_mask = OP_RANGE(8, 10),  V3D_QPU_M_FMOV, 71 },\n+        { 14, 14, .raddr_mask = OP_RANGE(12, 14), V3D_QPU_M_FMOV, 71 },\n+        { 14, 14, .raddr_mask = OP_RANGE(16, 18), V3D_QPU_M_FMOV, 71 },\n+        { 14, 14, .raddr_mask = OP_RANGE(20, 22), V3D_QPU_M_FMOV, 71 },\n+\n+        { 14, 14, .raddr_mask = OP_MASK(3),  V3D_QPU_M_MOV, 71 },\n+        { 14, 14, .raddr_mask = OP_MASK(7),  V3D_QPU_M_MOV, 71 },\n+        { 14, 14, .raddr_mask = OP_MASK(11), V3D_QPU_M_MOV, 71 },\n+        { 14, 14, .raddr_mask = OP_MASK(15), V3D_QPU_M_MOV, 71 },\n+        { 14, 14, .raddr_mask = OP_MASK(19), V3D_QPU_M_MOV, 71 },\n+\n+        { 14, 14, .raddr_mask = OP_MASK(63), V3D_QPU_M_NOP, 71 },\n+\n+        { 16, 63, .raddr_mask = ANYOPMASK, V3D_QPU_M_FMUL },\n };\n \n /* Returns true if op_desc should be filtered out based on devinfo->ver\n@@ -636,17 +812,23 @@ static const struct opcode_desc mul_ops[] = {\n  */\n static bool\n opcode_invalid_in_version(const struct v3d_device_info *devinfo,\n-                          const struct opcode_desc *op_desc)\n+                          const uint8_t first_ver,\n+                          const uint8_t last_ver)\n {\n-        return (op_desc->first_ver != 0 && devinfo->ver < op_desc->first_ver) ||\n-                (op_desc->last_ver != 0  && devinfo->ver > op_desc->last_ver);\n+        return (first_ver != 0 && devinfo->ver < first_ver) ||\n+                (last_ver != 0  && devinfo->ver > last_ver);\n }\n \n+/* Note that we pass as parameters mux_a, mux_b and raddr, even if depending\n+ * on the devinfo->ver some would be ignored. We do this way just to avoid\n+ * having two really similar lookup_opcode methods\n+ */\n static const struct opcode_desc *\n lookup_opcode_from_packed(const struct v3d_device_info *devinfo,\n                           const struct opcode_desc *opcodes,\n                           size_t num_opcodes, uint32_t opcode,\n-                          uint32_t mux_a, uint32_t mux_b)\n+                          uint32_t mux_a, uint32_t mux_b,\n+                          uint32_t raddr)\n {\n         for (int i = 0; i < num_opcodes; i++) {\n                 const struct opcode_desc *op_desc = &opcodes[i];\n@@ -655,14 +837,19 @@ lookup_opcode_from_packed(const struct v3d_device_info *devinfo,\n                     opcode > op_desc->opcode_last)\n                         continue;\n \n-                if (opcode_invalid_in_version(devinfo, op_desc))\n+                if (opcode_invalid_in_version(devinfo, op_desc->first_ver, op_desc->last_ver))\n                         continue;\n \n-                if (!(op_desc->mux_b_mask & (1 << mux_b)))\n-                        continue;\n+                if (devinfo->ver < 71) {\n+                        if (!(op_desc->mux.b_mask & (1 << mux_b)))\n+                                continue;\n \n-                if (!(op_desc->mux_a_mask & (1 << mux_a)))\n-                        continue;\n+                        if (!(op_desc->mux.a_mask & (1 << mux_a)))\n+                                continue;\n+                } else {\n+                        if (!(op_desc->raddr_mask & ((uint64_t) 1 << raddr)))\n+                                continue;\n+                }\n \n                 return op_desc;\n         }\n@@ -784,8 +971,8 @@ v3d_qpu_float32_pack_pack(enum v3d_qpu_output_pack pack,\n }\n \n static bool\n-v3d_qpu_add_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n-                   struct v3d_qpu_instr *instr)\n+v3d33_qpu_add_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n+                     struct v3d_qpu_instr *instr)\n {\n         uint32_t op = QPU_GET_FIELD(packed_inst, V3D_QPU_OP_ADD);\n         uint32_t mux_a = QPU_GET_FIELD(packed_inst, V3D_QPU_ADD_A);\n@@ -802,8 +989,9 @@ v3d_qpu_add_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n                 map_op = (map_op - 253 + 245);\n \n         const struct opcode_desc *desc =\n-                lookup_opcode_from_packed(devinfo, add_ops, ARRAY_SIZE(add_ops),\n-                                          map_op, mux_a, mux_b);\n+                lookup_opcode_from_packed(devinfo, add_ops_v33,\n+                                          ARRAY_SIZE(add_ops_v33),\n+                                          map_op, mux_a, mux_b, 0);\n \n         if (!desc)\n                 return false;\n@@ -939,8 +1127,160 @@ v3d_qpu_add_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n }\n \n static bool\n-v3d_qpu_mul_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n+v3d71_qpu_add_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n+                     struct v3d_qpu_instr *instr)\n+{\n+        uint32_t op = QPU_GET_FIELD(packed_inst, V3D_QPU_OP_ADD);\n+        uint32_t raddr_a = QPU_GET_FIELD(packed_inst, V3D_QPU_RADDR_A);\n+        uint32_t raddr_b = QPU_GET_FIELD(packed_inst, V3D_QPU_RADDR_B);\n+        uint32_t waddr = QPU_GET_FIELD(packed_inst, V3D_QPU_WADDR_A);\n+        uint32_t map_op = op;\n+\n+        const struct opcode_desc *desc =\n+                lookup_opcode_from_packed(devinfo,\n+                                          add_ops_v71,\n+                                          ARRAY_SIZE(add_ops_v71),\n+                                          map_op, 0, 0,\n+                                          raddr_b);\n+        if (!desc)\n+                return false;\n+\n+        instr->alu.add.op = desc->op;\n+\n+        /* Some QPU ops require a bit more than just basic opcode and mux a/b\n+         * comparisons to distinguish them.\n+         */\n+        switch (instr->alu.add.op) {\n+        case V3D_QPU_A_STVPMV:\n+        case V3D_QPU_A_STVPMD:\n+        case V3D_QPU_A_STVPMP:\n+                switch (waddr) {\n+                case 0:\n+                        instr->alu.add.op = V3D_QPU_A_STVPMV;\n+                        break;\n+                case 1:\n+                        instr->alu.add.op = V3D_QPU_A_STVPMD;\n+                        break;\n+                case 2:\n+                        instr->alu.add.op = V3D_QPU_A_STVPMP;\n+                        break;\n+                default:\n+                        return false;\n+                }\n+                break;\n+        default:\n+                break;\n+        }\n+\n+        switch (instr->alu.add.op) {\n+        case V3D_QPU_A_FADD:\n+        case V3D_QPU_A_FADDNF:\n+        case V3D_QPU_A_FSUB:\n+        case V3D_QPU_A_FMIN:\n+        case V3D_QPU_A_FMAX:\n+        case V3D_QPU_A_FCMP:\n+        case V3D_QPU_A_VFPACK:\n+                if (instr->alu.add.op != V3D_QPU_A_VFPACK &&\n+                    instr->alu.add.op != V3D_QPU_A_FCMP) {\n+                        instr->alu.add.output_pack = (op >> 4) & 0x3;\n+                } else {\n+                        instr->alu.add.output_pack = V3D_QPU_PACK_NONE;\n+                }\n+\n+                if (!v3d_qpu_float32_unpack_unpack((op >> 2) & 0x3,\n+                                                   &instr->alu.add.a.unpack)) {\n+                        return false;\n+                }\n+\n+                if (!v3d_qpu_float32_unpack_unpack((op >> 0) & 0x3,\n+                                                   &instr->alu.add.b.unpack)) {\n+                        return false;\n+                }\n+                break;\n+\n+        case V3D_QPU_A_FFLOOR:\n+        case V3D_QPU_A_FROUND:\n+        case V3D_QPU_A_FTRUNC:\n+        case V3D_QPU_A_FCEIL:\n+        case V3D_QPU_A_FDX:\n+        case V3D_QPU_A_FDY:\n+                instr->alu.add.output_pack = raddr_b & 0x3;\n+\n+                if (!v3d_qpu_float32_unpack_unpack((op >> 2) & 0x3,\n+                                                   &instr->alu.add.a.unpack)) {\n+                        return false;\n+                }\n+                break;\n+\n+        case V3D_QPU_A_FTOIN:\n+        case V3D_QPU_A_FTOIZ:\n+        case V3D_QPU_A_FTOUZ:\n+        case V3D_QPU_A_FTOC:\n+                instr->alu.add.output_pack = V3D_QPU_PACK_NONE;\n+\n+                if (!v3d_qpu_float32_unpack_unpack((raddr_b >> 2) & 0x3,\n+                                                   &instr->alu.add.a.unpack)) {\n+                        return false;\n+                }\n+                break;\n+\n+        case V3D_QPU_A_VFMIN:\n+        case V3D_QPU_A_VFMAX:\n+                unreachable(\"pending v71 update\");\n+                if (!v3d_qpu_float16_unpack_unpack(op & 0x7,\n+                                                   &instr->alu.add.a.unpack)) {\n+                        return false;\n+                }\n+\n+                instr->alu.add.output_pack = V3D_QPU_PACK_NONE;\n+                instr->alu.add.b.unpack = V3D_QPU_UNPACK_NONE;\n+                break;\n+\n+        default:\n+                instr->alu.add.output_pack = V3D_QPU_PACK_NONE;\n+                instr->alu.add.a.unpack = V3D_QPU_UNPACK_NONE;\n+                instr->alu.add.b.unpack = V3D_QPU_UNPACK_NONE;\n+                break;\n+        }\n+\n+        instr->alu.add.a.raddr = raddr_a;\n+        instr->alu.add.b.raddr = raddr_b;\n+        instr->alu.add.waddr = QPU_GET_FIELD(packed_inst, V3D_QPU_WADDR_A);\n+\n+        instr->alu.add.magic_write = false;\n+        if (packed_inst & V3D_QPU_MA) {\n+                switch (instr->alu.add.op) {\n+                case V3D_QPU_A_LDVPMV_IN:\n+                        instr->alu.add.op = V3D_QPU_A_LDVPMV_OUT;\n+                        break;\n+                case V3D_QPU_A_LDVPMD_IN:\n+                        instr->alu.add.op = V3D_QPU_A_LDVPMD_OUT;\n+                        break;\n+                case V3D_QPU_A_LDVPMG_IN:\n+                        instr->alu.add.op = V3D_QPU_A_LDVPMG_OUT;\n+                        break;\n+                default:\n+                        instr->alu.add.magic_write = true;\n+                        break;\n+                }\n+        }\n+\n+        return true;\n+}\n+\n+static bool\n+v3d_qpu_add_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n                    struct v3d_qpu_instr *instr)\n+{\n+        if (devinfo->ver < 71)\n+                return v3d33_qpu_add_unpack(devinfo, packed_inst, instr);\n+        else\n+                return v3d71_qpu_add_unpack(devinfo, packed_inst, instr);\n+}\n+\n+static bool\n+v3d33_qpu_mul_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n+                     struct v3d_qpu_instr *instr)\n {\n         uint32_t op = QPU_GET_FIELD(packed_inst, V3D_QPU_OP_MUL);\n         uint32_t mux_a = QPU_GET_FIELD(packed_inst, V3D_QPU_MUL_A);\n@@ -948,9 +1288,10 @@ v3d_qpu_mul_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n \n         {\n                 const struct opcode_desc *desc =\n-                        lookup_opcode_from_packed(devinfo, mul_ops,\n-                                                  ARRAY_SIZE(mul_ops),\n-                                                  op, mux_a, mux_b);\n+                        lookup_opcode_from_packed(devinfo,\n+                                                  mul_ops_v33,\n+                                                  ARRAY_SIZE(mul_ops_v33),\n+                                                  op, mux_a, mux_b, 0);\n                 if (!desc)\n                         return false;\n \n@@ -1011,6 +1352,91 @@ v3d_qpu_mul_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n         return true;\n }\n \n+static bool\n+v3d71_qpu_mul_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n+                     struct v3d_qpu_instr *instr)\n+{\n+        uint32_t op = QPU_GET_FIELD(packed_inst, V3D_QPU_OP_MUL);\n+        uint32_t raddr_c = QPU_GET_FIELD(packed_inst, V3D_QPU_RADDR_C);\n+        uint32_t raddr_d = QPU_GET_FIELD(packed_inst, V3D_QPU_RADDR_D);\n+\n+        {\n+                const struct opcode_desc *desc =\n+                        lookup_opcode_from_packed(devinfo,\n+                                                  mul_ops_v71,\n+                                                  ARRAY_SIZE(mul_ops_v71),\n+                                                  op, 0, 0,\n+                                                  raddr_d);\n+                if (!desc)\n+                        return false;\n+\n+                instr->alu.mul.op = desc->op;\n+        }\n+\n+        switch (instr->alu.mul.op) {\n+        case V3D_QPU_M_FMUL:\n+                instr->alu.mul.output_pack = ((op >> 4) & 0x3) - 1;\n+\n+                if (!v3d_qpu_float32_unpack_unpack((op >> 2) & 0x3,\n+                                                   &instr->alu.mul.a.unpack)) {\n+                        return false;\n+                }\n+\n+                if (!v3d_qpu_float32_unpack_unpack((op >> 0) & 0x3,\n+                                                   &instr->alu.mul.b.unpack)) {\n+                        return false;\n+                }\n+\n+                break;\n+\n+        case V3D_QPU_M_FMOV:\n+                instr->alu.mul.output_pack = (raddr_d >> 2) & 1;\n+\n+                if (!v3d_qpu_float32_unpack_unpack(raddr_d & 0x3,\n+                                                   &instr->alu.mul.a.unpack)) {\n+                        return false;\n+                }\n+\n+                break;\n+\n+        case V3D_QPU_M_VFMUL:\n+                unreachable(\"pending v71 update\");\n+                instr->alu.mul.output_pack = V3D_QPU_PACK_NONE;\n+\n+                if (!v3d_qpu_float16_unpack_unpack(((op & 0x7) - 4) & 7,\n+                                                   &instr->alu.mul.a.unpack)) {\n+                        return false;\n+                }\n+\n+                instr->alu.mul.b.unpack = V3D_QPU_UNPACK_NONE;\n+\n+                break;\n+\n+        default:\n+                instr->alu.mul.output_pack = V3D_QPU_PACK_NONE;\n+                instr->alu.mul.a.unpack = V3D_QPU_UNPACK_NONE;\n+                instr->alu.mul.b.unpack = V3D_QPU_UNPACK_NONE;\n+                break;\n+        }\n+\n+        instr->alu.mul.a.raddr = raddr_c;\n+        instr->alu.mul.b.raddr = raddr_d;\n+        instr->alu.mul.waddr = QPU_GET_FIELD(packed_inst, V3D_QPU_WADDR_M);\n+        instr->alu.mul.magic_write = packed_inst & V3D_QPU_MM;\n+\n+        return true;\n+}\n+\n+static bool\n+v3d_qpu_mul_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst,\n+                   struct v3d_qpu_instr *instr)\n+{\n+        if (devinfo->ver < 71)\n+                return v3d33_qpu_mul_unpack(devinfo, packed_inst, instr);\n+        else\n+                return v3d71_qpu_mul_unpack(devinfo, packed_inst, instr);\n+}\n+\n static const struct opcode_desc *\n lookup_opcode_from_instr(const struct v3d_device_info *devinfo,\n                          const struct opcode_desc *opcodes, size_t num_opcodes,\n@@ -1022,7 +1448,7 @@ lookup_opcode_from_instr(const struct v3d_device_info *devinfo,\n                 if (op_desc->op != op)\n                         continue;\n \n-                if (opcode_invalid_in_version(devinfo, op_desc))\n+                if (opcode_invalid_in_version(devinfo, op_desc->first_ver, op_desc->last_ver))\n                         continue;\n \n                 return op_desc;\n@@ -1032,30 +1458,31 @@ lookup_opcode_from_instr(const struct v3d_device_info *devinfo,\n }\n \n static bool\n-v3d_qpu_add_pack(const struct v3d_device_info *devinfo,\n-                 const struct v3d_qpu_instr *instr, uint64_t *packed_instr)\n+v3d33_qpu_add_pack(const struct v3d_device_info *devinfo,\n+                   const struct v3d_qpu_instr *instr, uint64_t *packed_instr)\n {\n         uint32_t waddr = instr->alu.add.waddr;\n         uint32_t mux_a = instr->alu.add.a.mux;\n         uint32_t mux_b = instr->alu.add.b.mux;\n         int nsrc = v3d_qpu_add_op_num_src(instr->alu.add.op);\n         const struct opcode_desc *desc =\n-                lookup_opcode_from_instr(devinfo, add_ops, ARRAY_SIZE(add_ops),\n+                lookup_opcode_from_instr(devinfo, add_ops_v33,\n+                                         ARRAY_SIZE(add_ops_v33),\n                                          instr->alu.add.op);\n \n         if (!desc)\n                 return false;\n \n-        uint32_t opcode = desc->opcode_first;\n+        uint32_t opcode = opcode = desc->opcode_first;\n \n         /* If an operation doesn't use an arg, its mux values may be used to\n          * identify the operation type.\n          */\n         if (nsrc < 2)\n-                mux_b = ffs(desc->mux_b_mask) - 1;\n+                mux_b = ffs(desc->mux.b_mask) - 1;\n \n         if (nsrc < 1)\n-                mux_a = ffs(desc->mux_a_mask) - 1;\n+                mux_a = ffs(desc->mux.a_mask) - 1;\n \n         bool no_magic_write = false;\n \n@@ -1162,8 +1589,8 @@ v3d_qpu_add_pack(const struct v3d_device_info *devinfo,\n                         return false;\n                 }\n \n-                opcode = (opcode & ~(1 << 2)) | (a_unpack << 2);\n-                opcode = (opcode & ~(1 << 0)) | (b_unpack << 0);\n+                opcode = (opcode & ~(0x3 << 2)) | (a_unpack << 2);\n+                opcode = (opcode & ~(0x3 << 0)) | (b_unpack << 0);\n \n                 break;\n         }\n@@ -1188,7 +1615,7 @@ v3d_qpu_add_pack(const struct v3d_device_info *devinfo,\n                 }\n                 if (packed == 0)\n                         return false;\n-                opcode = (opcode & ~(1 << 2)) | packed << 2;\n+                opcode = (opcode & ~(0x3 << 2)) | packed << 2;\n                 break;\n         }\n \n@@ -1245,15 +1672,211 @@ v3d_qpu_add_pack(const struct v3d_device_info *devinfo,\n }\n \n static bool\n-v3d_qpu_mul_pack(const struct v3d_device_info *devinfo,\n-                 const struct v3d_qpu_instr *instr, uint64_t *packed_instr)\n+v3d71_qpu_add_pack(const struct v3d_device_info *devinfo,\n+                   const struct v3d_qpu_instr *instr, uint64_t *packed_instr)\n+{\n+        uint32_t waddr = instr->alu.add.waddr;\n+        uint32_t raddr_a = instr->alu.add.a.raddr;\n+        uint32_t raddr_b = instr->alu.add.b.raddr;\n+\n+        int nsrc = v3d_qpu_add_op_num_src(instr->alu.add.op);\n+        const struct opcode_desc *desc =\n+                lookup_opcode_from_instr(devinfo, add_ops_v71,\n+                                         ARRAY_SIZE(add_ops_v71),\n+                                         instr->alu.add.op);\n+        if (!desc)\n+                return false;\n+\n+        uint32_t opcode = opcode = desc->opcode_first;\n+\n+        /* If an operation doesn't use an arg, its raddr values may be used to\n+         * identify the operation type.\n+         */\n+        if (nsrc < 2)\n+                raddr_b = ffsll(desc->raddr_mask) - 1;\n+\n+        bool no_magic_write = false;\n+\n+        switch (instr->alu.add.op) {\n+        case V3D_QPU_A_STVPMV:\n+                waddr = 0;\n+                no_magic_write = true;\n+                break;\n+        case V3D_QPU_A_STVPMD:\n+                waddr = 1;\n+                no_magic_write = true;\n+                break;\n+        case V3D_QPU_A_STVPMP:\n+                waddr = 2;\n+                no_magic_write = true;\n+                break;\n+\n+        case V3D_QPU_A_LDVPMV_IN:\n+        case V3D_QPU_A_LDVPMD_IN:\n+        case V3D_QPU_A_LDVPMP:\n+        case V3D_QPU_A_LDVPMG_IN:\n+                assert(!instr->alu.add.magic_write);\n+                break;\n+\n+        case V3D_QPU_A_LDVPMV_OUT:\n+        case V3D_QPU_A_LDVPMD_OUT:\n+        case V3D_QPU_A_LDVPMG_OUT:\n+                assert(!instr->alu.add.magic_write);\n+                *packed_instr |= V3D_QPU_MA;\n+                break;\n+\n+        default:\n+                break;\n+        }\n+\n+        switch (instr->alu.add.op) {\n+        case V3D_QPU_A_FADD:\n+        case V3D_QPU_A_FADDNF:\n+        case V3D_QPU_A_FSUB:\n+        case V3D_QPU_A_FMIN:\n+        case V3D_QPU_A_FMAX:\n+        case V3D_QPU_A_FCMP: {\n+                uint32_t output_pack;\n+                uint32_t a_unpack;\n+                uint32_t b_unpack;\n+\n+                if (instr->alu.add.op != V3D_QPU_A_FCMP) {\n+                        if (!v3d_qpu_float32_pack_pack(instr->alu.add.output_pack,\n+                                                       &output_pack)) {\n+                                return false;\n+                        }\n+                        opcode |= output_pack << 4;\n+                }\n+\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.a.unpack,\n+                                                 &a_unpack)) {\n+                        return false;\n+                }\n+\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.b.unpack,\n+                                                 &b_unpack)) {\n+                        return false;\n+                }\n+\n+                opcode |= a_unpack << 2;\n+                opcode |= b_unpack << 0;\n+\n+                break;\n+        }\n+\n+        case V3D_QPU_A_VFPACK: {\n+                uint32_t a_unpack;\n+                uint32_t b_unpack;\n+\n+                if (instr->alu.add.a.unpack == V3D_QPU_UNPACK_ABS ||\n+                    instr->alu.add.b.unpack == V3D_QPU_UNPACK_ABS) {\n+                        return false;\n+                }\n+\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.a.unpack,\n+                                                 &a_unpack)) {\n+                        return false;\n+                }\n+\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.b.unpack,\n+                                                 &b_unpack)) {\n+                        return false;\n+                }\n+\n+                opcode = (opcode & ~(0x3 << 2)) | (a_unpack << 2);\n+                opcode = (opcode & ~(0x3 << 0)) | (b_unpack << 0);\n+\n+                break;\n+        }\n+\n+        case V3D_QPU_A_FFLOOR:\n+        case V3D_QPU_A_FROUND:\n+        case V3D_QPU_A_FTRUNC:\n+        case V3D_QPU_A_FCEIL:\n+        case V3D_QPU_A_FDX:\n+        case V3D_QPU_A_FDY: {\n+                uint32_t packed;\n+\n+                if (!v3d_qpu_float32_pack_pack(instr->alu.add.output_pack,\n+                                               &packed)) {\n+                        return false;\n+                }\n+                raddr_b |= packed;\n+\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.a.unpack,\n+                                                 &packed)) {\n+                        return false;\n+                }\n+                if (packed == 0)\n+                        return false;\n+                raddr_b = (raddr_b & ~(0x3 << 2)) | packed << 2;\n+                break;\n+        }\n+\n+        case V3D_QPU_A_FTOIN:\n+        case V3D_QPU_A_FTOIZ:\n+        case V3D_QPU_A_FTOUZ:\n+        case V3D_QPU_A_FTOC:\n+                if (instr->alu.add.output_pack != V3D_QPU_PACK_NONE)\n+                        return false;\n+\n+                uint32_t packed;\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.a.unpack,\n+                                                 &packed)) {\n+                        return false;\n+                }\n+                if (packed == 0)\n+                        return false;\n+\n+                raddr_b |= (raddr_b & ~(0x3 << 2)) | packed << 2;\n+\n+                break;\n+\n+        case V3D_QPU_A_VFMIN:\n+        case V3D_QPU_A_VFMAX:\n+                if (instr->alu.add.output_pack != V3D_QPU_PACK_NONE ||\n+                    instr->alu.add.b.unpack != V3D_QPU_UNPACK_NONE) {\n+                        return false;\n+                }\n+\n+                if (!v3d_qpu_float16_unpack_pack(instr->alu.add.a.unpack,\n+                                                 &packed)) {\n+                        return false;\n+                }\n+                opcode |= packed;\n+                break;\n+\n+        default:\n+                if (instr->alu.add.op != V3D_QPU_A_NOP &&\n+                    (instr->alu.add.output_pack != V3D_QPU_PACK_NONE ||\n+                     instr->alu.add.a.unpack != V3D_QPU_UNPACK_NONE ||\n+                     instr->alu.add.b.unpack != V3D_QPU_UNPACK_NONE)) {\n+                        return false;\n+                }\n+                break;\n+        }\n+\n+        *packed_instr |= QPU_SET_FIELD(raddr_a, V3D_QPU_RADDR_A);\n+        *packed_instr |= QPU_SET_FIELD(raddr_b, V3D_QPU_RADDR_B);\n+        *packed_instr |= QPU_SET_FIELD(opcode, V3D_QPU_OP_ADD);\n+        *packed_instr |= QPU_SET_FIELD(waddr, V3D_QPU_WADDR_A);\n+        if (instr->alu.add.magic_write && !no_magic_write)\n+                *packed_instr |= V3D_QPU_MA;\n+\n+        return true;\n+}\n+\n+static bool\n+v3d33_qpu_mul_pack(const struct v3d_device_info *devinfo,\n+                   const struct v3d_qpu_instr *instr, uint64_t *packed_instr)\n {\n         uint32_t mux_a = instr->alu.mul.a.mux;\n         uint32_t mux_b = instr->alu.mul.b.mux;\n         int nsrc = v3d_qpu_mul_op_num_src(instr->alu.mul.op);\n \n         const struct opcode_desc *desc =\n-                lookup_opcode_from_instr(devinfo, mul_ops, ARRAY_SIZE(mul_ops),\n+                lookup_opcode_from_instr(devinfo, mul_ops_v33,\n+                                         ARRAY_SIZE(mul_ops_v33),\n                                          instr->alu.mul.op);\n \n         if (!desc)\n@@ -1265,10 +1888,10 @@ v3d_qpu_mul_pack(const struct v3d_device_info *devinfo,\n          * that here.  If mux a/b determine packing, it will be set below.\n          */\n         if (nsrc < 2)\n-                mux_b = ffs(desc->mux_b_mask) - 1;\n+                mux_b = ffs(desc->mux.b_mask) - 1;\n \n         if (nsrc < 1)\n-                mux_a = ffs(desc->mux_a_mask) - 1;\n+                mux_a = ffs(desc->mux.a_mask) - 1;\n \n         switch (instr->alu.mul.op) {\n         case V3D_QPU_M_FMUL: {\n@@ -1351,6 +1974,130 @@ v3d_qpu_mul_pack(const struct v3d_device_info *devinfo,\n         return true;\n }\n \n+static bool\n+v3d71_qpu_mul_pack(const struct v3d_device_info *devinfo,\n+                   const struct v3d_qpu_instr *instr, uint64_t *packed_instr)\n+{\n+        uint32_t raddr_c = instr->alu.mul.a.raddr;\n+        uint32_t raddr_d = instr->alu.mul.b.raddr;\n+        int nsrc = v3d_qpu_mul_op_num_src(instr->alu.mul.op);\n+\n+        const struct opcode_desc *desc =\n+                lookup_opcode_from_instr(devinfo, mul_ops_v71,\n+                                         ARRAY_SIZE(mul_ops_v71),\n+                                         instr->alu.mul.op);\n+        if (!desc)\n+                return false;\n+\n+        uint32_t opcode = desc->opcode_first;\n+\n+        /* Some opcodes have a single valid value for their raddr_d, so set\n+         * that here.  If raddr_b determine packing, it will be set below.\n+         */\n+        if (nsrc < 2)\n+                raddr_d = ffsll(desc->raddr_mask) - 1;\n+\n+        switch (instr->alu.mul.op) {\n+        case V3D_QPU_M_FMUL: {\n+                uint32_t packed;\n+\n+                if (!v3d_qpu_float32_pack_pack(instr->alu.mul.output_pack,\n+                                               &packed)) {\n+                        return false;\n+                }\n+                /* No need for a +1 because desc->opcode_first has a 1 in this\n+                 * field.\n+                 */\n+                opcode += packed << 4;\n+\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.mul.a.unpack,\n+                                                 &packed)) {\n+                        return false;\n+                }\n+                opcode |= packed << 2;\n+\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.mul.b.unpack,\n+                                                 &packed)) {\n+                        return false;\n+                }\n+                opcode |= packed << 0;\n+                break;\n+        }\n+\n+        case V3D_QPU_M_FMOV: {\n+                uint32_t packed;\n+\n+                if (!v3d_qpu_float32_pack_pack(instr->alu.mul.output_pack,\n+                                               &packed)) {\n+                        return false;\n+                }\n+                opcode |= (packed >> 1) & 1;\n+                raddr_d = (packed & 1) << 2;\n+\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.mul.a.unpack,\n+                                                 &packed)) {\n+                        return false;\n+                }\n+                raddr_d |= packed;\n+                break;\n+        }\n+\n+        case V3D_QPU_M_VFMUL: {\n+                unreachable(\"pending v71 update\");\n+                uint32_t packed;\n+\n+                if (instr->alu.mul.output_pack != V3D_QPU_PACK_NONE)\n+                        return false;\n+\n+                if (!v3d_qpu_float16_unpack_pack(instr->alu.mul.a.unpack,\n+                                                 &packed)) {\n+                        return false;\n+                }\n+                if (instr->alu.mul.a.unpack == V3D_QPU_UNPACK_SWAP_16)\n+                        opcode = 8;\n+                else\n+                        opcode |= (packed + 4) & 7;\n+\n+                if (instr->alu.mul.b.unpack != V3D_QPU_UNPACK_NONE)\n+                        return false;\n+\n+                break;\n+        }\n+\n+        default:\n+                break;\n+        }\n+\n+        *packed_instr |= QPU_SET_FIELD(raddr_c, V3D_QPU_RADDR_C);\n+        *packed_instr |= QPU_SET_FIELD(raddr_d, V3D_QPU_RADDR_D);\n+        *packed_instr |= QPU_SET_FIELD(opcode, V3D_QPU_OP_MUL);\n+        *packed_instr |= QPU_SET_FIELD(instr->alu.mul.waddr, V3D_QPU_WADDR_M);\n+        if (instr->alu.mul.magic_write)\n+                *packed_instr |= V3D_QPU_MM;\n+\n+        return true;\n+}\n+\n+static bool\n+v3d_qpu_add_pack(const struct v3d_device_info *devinfo,\n+                 const struct v3d_qpu_instr *instr, uint64_t *packed_instr)\n+{\n+        if (devinfo->ver < 71)\n+                return v3d33_qpu_add_pack(devinfo, instr, packed_instr);\n+        else\n+                return v3d71_qpu_add_pack(devinfo, instr, packed_instr);\n+}\n+\n+static bool\n+v3d_qpu_mul_pack(const struct v3d_device_info *devinfo,\n+                 const struct v3d_qpu_instr *instr, uint64_t *packed_instr)\n+{\n+        if (devinfo->ver < 71)\n+                return v3d33_qpu_mul_pack(devinfo, instr, packed_instr);\n+        else\n+                return v3d71_qpu_mul_pack(devinfo, instr, packed_instr);\n+}\n+\n static bool\n v3d_qpu_instr_unpack_alu(const struct v3d_device_info *devinfo,\n                          uint64_t packed_instr,\n@@ -1379,8 +2126,14 @@ v3d_qpu_instr_unpack_alu(const struct v3d_device_info *devinfo,\n                         return false;\n         }\n \n-        instr->raddr_a = QPU_GET_FIELD(packed_instr, V3D_QPU_RADDR_A);\n-        instr->raddr_b = QPU_GET_FIELD(packed_instr, V3D_QPU_RADDR_B);\n+        if (devinfo->ver <= 71) {\n+                /*\n+                 * For v71 this will be set on add/mul unpack, as raddr are now\n+                 * part of v3d_qpu_input\n+                 */\n+                instr->raddr_a = QPU_GET_FIELD(packed_instr, V3D_QPU_RADDR_A);\n+                instr->raddr_b = QPU_GET_FIELD(packed_instr, V3D_QPU_RADDR_B);\n+        }\n \n         if (!v3d_qpu_add_unpack(devinfo, packed_instr, instr))\n                 return false;\n@@ -1466,8 +2219,14 @@ v3d_qpu_instr_pack_alu(const struct v3d_device_info *devinfo,\n         *packed_instr |= QPU_SET_FIELD(sig, V3D_QPU_SIG);\n \n         if (instr->type == V3D_QPU_INSTR_TYPE_ALU) {\n-                *packed_instr |= QPU_SET_FIELD(instr->raddr_a, V3D_QPU_RADDR_A);\n-                *packed_instr |= QPU_SET_FIELD(instr->raddr_b, V3D_QPU_RADDR_B);\n+                if (devinfo->ver < 71) {\n+                        /*\n+                         * For v71 this will be set on add/mul unpack, as raddr are now\n+                         * part of v3d_qpu_input\n+                         */\n+                        *packed_instr |= QPU_SET_FIELD(instr->raddr_a, V3D_QPU_RADDR_A);\n+                        *packed_instr |= QPU_SET_FIELD(instr->raddr_b, V3D_QPU_RADDR_B);\n+                }\n \n                 if (!v3d_qpu_add_pack(devinfo, instr, packed_instr))\n                         return false;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0017-broadcom-compiler-update-node-temp-translation-for-v.patch",
    "content": "From ebba9019461083687f6afd23ff0d4646c1a667cb Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Sun, 29 Jan 2023 00:27:11 +0100\nSubject: [PATCH 017/142] broadcom/compiler: update node/temp translation for\n v71\n\nAs the offset applied needs to take into account if we have\naccumulators or not.\n---\n src/broadcom/compiler/vir_register_allocate.c | 68 +++++++++----------\n 1 file changed, 34 insertions(+), 34 deletions(-)\n\ndiff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c\nindex b22f915d1df..aa9473d124b 100644\n--- a/src/broadcom/compiler/vir_register_allocate.c\n+++ b/src/broadcom/compiler/vir_register_allocate.c\n@@ -39,30 +39,31 @@\n                            CLASS_BITS_R5)\n \n static inline uint32_t\n-temp_to_node(uint32_t temp)\n+temp_to_node(struct v3d_compile *c, uint32_t temp)\n {\n-        return temp + ACC_COUNT;\n+        return temp + (c->devinfo->has_accumulators ? ACC_COUNT : 0);\n }\n \n static inline uint32_t\n-node_to_temp(uint32_t node)\n+node_to_temp(struct v3d_compile *c, uint32_t node)\n {\n-        assert(node >= ACC_COUNT);\n-        return node - ACC_COUNT;\n+        assert((c->devinfo->has_accumulators && node >= ACC_COUNT) ||\n+               (!c->devinfo->has_accumulators && node >= 0));\n+        return node - (c->devinfo->has_accumulators ? ACC_COUNT : 0);\n }\n \n static inline uint8_t\n-get_temp_class_bits(struct v3d_ra_node_info *nodes,\n+get_temp_class_bits(struct v3d_compile *c,\n                     uint32_t temp)\n {\n-        return nodes->info[temp_to_node(temp)].class_bits;\n+        return c->nodes.info[temp_to_node(c, temp)].class_bits;\n }\n \n static inline void\n-set_temp_class_bits(struct v3d_ra_node_info *nodes,\n+set_temp_class_bits(struct v3d_compile *c,\n                     uint32_t temp, uint8_t class_bits)\n {\n-        nodes->info[temp_to_node(temp)].class_bits = class_bits;\n+        c->nodes.info[temp_to_node(c, temp)].class_bits = class_bits;\n }\n \n static struct ra_class *\n@@ -84,7 +85,7 @@ static inline struct ra_class *\n choose_reg_class_for_temp(struct v3d_compile *c, uint32_t temp)\n {\n         assert(temp < c->num_temps && temp < c->nodes.alloc_count);\n-        return choose_reg_class(c, get_temp_class_bits(&c->nodes, temp));\n+        return choose_reg_class(c, get_temp_class_bits(c, temp));\n }\n \n static inline bool\n@@ -313,7 +314,7 @@ v3d_choose_spill_node(struct v3d_compile *c)\n \n         for (unsigned i = 0; i < c->num_temps; i++) {\n                 if (BITSET_TEST(c->spillable, i)) {\n-                        ra_set_node_spill_cost(c->g, temp_to_node(i),\n+                        ra_set_node_spill_cost(c->g, temp_to_node(c, i),\n                                                spill_costs[i]);\n                 }\n         }\n@@ -482,7 +483,7 @@ v3d_emit_spill_tmua(struct v3d_compile *c,\n                         c->temp_start[i] < ip && c->temp_end[i] >= ip :\n                         c->temp_start[i] <= ip && c->temp_end[i] > ip;\n                 if (thrsw_cross) {\n-                        ra_set_node_class(c->g, temp_to_node(i),\n+                        ra_set_node_class(c->g, temp_to_node(c, i),\n                                           choose_reg_class(c, CLASS_BITS_PHYS));\n                 }\n         }\n@@ -509,8 +510,7 @@ v3d_emit_tmu_spill(struct v3d_compile *c,\n          * same register class bits as the original.\n          */\n         if (inst == position) {\n-                uint8_t class_bits = get_temp_class_bits(&c->nodes,\n-                                                         inst->dst.index);\n+                uint8_t class_bits = get_temp_class_bits(c, inst->dst.index);\n                 inst->dst = vir_get_temp(c);\n                 add_node(c, inst->dst.index, class_bits);\n         } else {\n@@ -574,7 +574,7 @@ v3d_spill_reg(struct v3d_compile *c, int *acc_nodes, int spill_temp)\n                 reconstruct_op = orig_def->qpu.alu.add.op;\n         }\n \n-        uint32_t spill_node = temp_to_node(spill_temp);\n+        uint32_t spill_node = temp_to_node(c, spill_temp);\n \n         /* We must disable the ldunif optimization if we are spilling uniforms */\n         bool had_disable_ldunif_opt = c->disable_ldunif_opt;\n@@ -739,12 +739,12 @@ v3d_spill_reg(struct v3d_compile *c, int *acc_nodes, int spill_temp)\n          * update node priorities based one new liveness data.\n          */\n         uint32_t sb_temp =c->spill_base.index;\n-        uint32_t sb_node = temp_to_node(sb_temp);\n+        uint32_t sb_node = temp_to_node(c, sb_temp);\n         for (uint32_t i = 0; i < c->num_temps; i++) {\n                 if (c->temp_end[i] == -1)\n                         continue;\n \n-                uint32_t node_i = temp_to_node(i);\n+                uint32_t node_i = temp_to_node(c, i);\n                 c->nodes.info[node_i].priority =\n                         c->temp_end[i] - c->temp_start[i];\n \n@@ -752,7 +752,7 @@ v3d_spill_reg(struct v3d_compile *c, int *acc_nodes, int spill_temp)\n                      j < c->num_temps; j++) {\n                         if (interferes(c->temp_start[i], c->temp_end[i],\n                                        c->temp_start[j], c->temp_end[j])) {\n-                                uint32_t node_j = temp_to_node(j);\n+                                uint32_t node_j = temp_to_node(c, j);\n                                 ra_add_node_interference(c->g, node_i, node_j);\n                         }\n                 }\n@@ -958,7 +958,7 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n                 for (int i = 0; i < c->num_temps; i++) {\n                         if (c->temp_start[i] < ip && c->temp_end[i] > ip) {\n                                 ra_add_node_interference(c->g,\n-                                                         temp_to_node(i),\n+                                                         temp_to_node(c, i),\n                                                          acc_nodes[3]);\n                         }\n                 }\n@@ -968,7 +968,7 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n                 for (int i = 0; i < c->num_temps; i++) {\n                         if (c->temp_start[i] < ip && c->temp_end[i] > ip) {\n                                 ra_add_node_interference(c->g,\n-                                                         temp_to_node(i),\n+                                                         temp_to_node(c, i),\n                                                          acc_nodes[4]);\n                         }\n                 }\n@@ -987,7 +987,7 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n                          * decides whether the LDVPM is in or out)\n                          */\n                         assert(inst->dst.file == QFILE_TEMP);\n-                        set_temp_class_bits(&c->nodes, inst->dst.index,\n+                        set_temp_class_bits(c, inst->dst.index,\n                                             CLASS_BITS_PHYS);\n                         break;\n                 }\n@@ -1002,7 +1002,7 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n                          * phys regfile.\n                          */\n                         assert(inst->dst.file == QFILE_TEMP);\n-                        set_temp_class_bits(&c->nodes, inst->dst.index,\n+                        set_temp_class_bits(c, inst->dst.index,\n                                             CLASS_BITS_PHYS);\n                         break;\n                 }\n@@ -1024,7 +1024,7 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n                          */\n                         assert(inst->qpu.alu.mul.op == V3D_QPU_M_MOV);\n                         assert(inst->dst.file == QFILE_TEMP);\n-                        uint32_t node = temp_to_node(inst->dst.index);\n+                        uint32_t node = temp_to_node(c, inst->dst.index);\n                         ra_set_node_reg(c->g, node,\n                                         PHYS_INDEX + inst->src[0].index);\n                         break;\n@@ -1043,9 +1043,9 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n                  */\n                 if (!inst->qpu.sig.ldunif) {\n                         uint8_t class_bits =\n-                                get_temp_class_bits(&c->nodes, inst->dst.index) &\n+                                get_temp_class_bits(c, inst->dst.index) &\n                                 ~CLASS_BITS_R5;\n-                        set_temp_class_bits(&c->nodes, inst->dst.index,\n+                        set_temp_class_bits(c, inst->dst.index,\n                                             class_bits);\n \n                 } else {\n@@ -1054,7 +1054,7 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n                          * loads interfere with each other.\n                          */\n                         if (c->devinfo->ver < 40) {\n-                                set_temp_class_bits(&c->nodes, inst->dst.index,\n+                                set_temp_class_bits(c, inst->dst.index,\n                                                     CLASS_BITS_R5);\n                         }\n                 }\n@@ -1064,7 +1064,7 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n         if (inst->qpu.sig.thrsw) {\n                 for (int i = 0; i < c->num_temps; i++) {\n                         if (c->temp_start[i] < ip && c->temp_end[i] > ip) {\n-                                set_temp_class_bits(&c->nodes, i,\n+                                set_temp_class_bits(c, i,\n                                                     CLASS_BITS_PHYS);\n                         }\n                 }\n@@ -1125,7 +1125,7 @@ v3d_register_allocate(struct v3d_compile *c)\n                         c->nodes.info[i].priority = 0;\n                         c->nodes.info[i].class_bits = 0;\n                 } else {\n-                        uint32_t t = node_to_temp(i);\n+                        uint32_t t = node_to_temp(c, i);\n                         c->nodes.info[i].priority =\n                                 c->temp_end[t] - c->temp_start[t];\n                         c->nodes.info[i].class_bits = CLASS_BITS_ANY;\n@@ -1143,7 +1143,7 @@ v3d_register_allocate(struct v3d_compile *c)\n \n         /* Set the register classes for all our temporaries in the graph */\n         for (uint32_t i = 0; i < c->num_temps; i++) {\n-                ra_set_node_class(c->g, temp_to_node(i),\n+                ra_set_node_class(c->g, temp_to_node(c, i),\n                                   choose_reg_class_for_temp(c, i));\n         }\n \n@@ -1153,8 +1153,8 @@ v3d_register_allocate(struct v3d_compile *c)\n                         if (interferes(c->temp_start[i], c->temp_end[i],\n                                        c->temp_start[j], c->temp_end[j])) {\n                                 ra_add_node_interference(c->g,\n-                                                         temp_to_node(i),\n-                                                         temp_to_node(j));\n+                                                         temp_to_node(c, i),\n+                                                         temp_to_node(c, j));\n                         }\n                 }\n         }\n@@ -1171,7 +1171,7 @@ v3d_register_allocate(struct v3d_compile *c)\n                 if (c->spill_size <\n                     V3D_CHANNELS * sizeof(uint32_t) * force_register_spills) {\n                         int node = v3d_choose_spill_node(c);\n-                        uint32_t temp = node_to_temp(node);\n+                        uint32_t temp = node_to_temp(c, node);\n                         if (node != -1) {\n                                 v3d_spill_reg(c, acc_nodes, temp);\n                                 continue;\n@@ -1186,7 +1186,7 @@ v3d_register_allocate(struct v3d_compile *c)\n                 if (node == -1)\n                         goto spill_fail;\n \n-                uint32_t temp = node_to_temp(node);\n+                uint32_t temp = node_to_temp(c, node);\n                 enum temp_spill_type spill_type =\n                         get_spill_type_for_temp(c, temp);\n                 if (spill_type != SPILL_TYPE_TMU || tmu_spilling_allowed(c)) {\n@@ -1201,7 +1201,7 @@ v3d_register_allocate(struct v3d_compile *c)\n         /* Allocation was successful, build the 'temp -> reg' map */\n         temp_registers = calloc(c->num_temps, sizeof(*temp_registers));\n         for (uint32_t i = 0; i < c->num_temps; i++) {\n-                int ra_reg = ra_get_node_reg(c->g, temp_to_node(i));\n+                int ra_reg = ra_get_node_reg(c->g, temp_to_node(c, i));\n                 if (ra_reg < PHYS_INDEX) {\n                         temp_registers[i].magic = true;\n                         temp_registers[i].index = (V3D_QPU_WADDR_R0 +\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0018-broadcom-compiler-phys-index-depends-on-hw-version.patch",
    "content": "From 9b2dfe0286212aba3687a06023cc5b4ce9944ee0 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Mon, 23 Aug 2021 02:18:43 +0200\nSubject: [PATCH 018/142] broadcom/compiler: phys index depends on hw version\n\nFor 7.1 there are not accumulators. So we replace the macro with a\nfunction call.\n---\n src/broadcom/compiler/vir_register_allocate.c | 39 ++++++++++++++-----\n 1 file changed, 29 insertions(+), 10 deletions(-)\n\ndiff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c\nindex aa9473d124b..a358b616e13 100644\n--- a/src/broadcom/compiler/vir_register_allocate.c\n+++ b/src/broadcom/compiler/vir_register_allocate.c\n@@ -28,9 +28,19 @@\n \n #define ACC_INDEX     0\n #define ACC_COUNT     6\n-#define PHYS_INDEX    (ACC_INDEX + ACC_COUNT)\n-#define PHYS_COUNT    64\n \n+#define PHYS_COUNT 64\n+\n+static uint8_t\n+get_phys_index(const struct v3d_device_info *devinfo)\n+{\n+        if (devinfo->has_accumulators)\n+                return ACC_INDEX + ACC_COUNT;\n+        else\n+                return 0;\n+}\n+\n+/* ACC as accumulator */\n #define CLASS_BITS_PHYS   (1 << 0)\n #define CLASS_BITS_ACC    (1 << 1)\n #define CLASS_BITS_R5     (1 << 4)\n@@ -771,9 +781,11 @@ v3d_spill_reg(struct v3d_compile *c, int *acc_nodes, int spill_temp)\n }\n \n struct v3d_ra_select_callback_data {\n+        uint32_t phys_index;\n         uint32_t next_acc;\n         uint32_t next_phys;\n         struct v3d_ra_node_info *nodes;\n+        const struct v3d_device_info *devinfo;\n };\n \n /* Choosing accumulators improves chances of merging QPU instructions\n@@ -794,7 +806,7 @@ v3d_ra_favor_accum(struct v3d_ra_select_callback_data *v3d_ra,\n         static const int available_rf_threshold = 5;\n         int available_rf = 0 ;\n         for (int i = 0; i < PHYS_COUNT; i++) {\n-                if (BITSET_TEST(regs, PHYS_INDEX + i))\n+                if (BITSET_TEST(regs, v3d_ra->phys_index + i))\n                         available_rf++;\n                 if (available_rf >= available_rf_threshold)\n                         break;\n@@ -854,7 +866,7 @@ v3d_ra_select_rf(struct v3d_ra_select_callback_data *v3d_ra,\n {\n         for (int i = 0; i < PHYS_COUNT; i++) {\n                 int phys_off = (v3d_ra->next_phys + i) % PHYS_COUNT;\n-                int phys = PHYS_INDEX + phys_off;\n+                int phys = v3d_ra->phys_index + phys_off;\n \n                 if (BITSET_TEST(regs, phys)) {\n                         v3d_ra->next_phys = phys_off + 1;\n@@ -896,8 +908,9 @@ vir_init_reg_sets(struct v3d_compiler *compiler)\n          * register file can be divided up for fragment shader threading.\n          */\n         int max_thread_index = (compiler->devinfo->ver >= 40 ? 2 : 3);\n+        uint8_t phys_index = get_phys_index(compiler->devinfo);\n \n-        compiler->regs = ra_alloc_reg_set(compiler, PHYS_INDEX + PHYS_COUNT,\n+        compiler->regs = ra_alloc_reg_set(compiler, phys_index + PHYS_COUNT,\n                                           false);\n         if (!compiler->regs)\n                 return false;\n@@ -912,8 +925,8 @@ vir_init_reg_sets(struct v3d_compiler *compiler)\n                 compiler->reg_class_phys[threads] =\n                         ra_alloc_contig_reg_class(compiler->regs, 1);\n \n-                for (int i = PHYS_INDEX;\n-                     i < PHYS_INDEX + (PHYS_COUNT >> threads); i++) {\n+                for (int i = phys_index;\n+                     i < phys_index + (PHYS_COUNT >> threads); i++) {\n                         ra_class_add_reg(compiler->reg_class_phys_or_acc[threads], i);\n                         ra_class_add_reg(compiler->reg_class_phys[threads], i);\n                         ra_class_add_reg(compiler->reg_class_any[threads], i);\n@@ -1026,7 +1039,8 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n                         assert(inst->dst.file == QFILE_TEMP);\n                         uint32_t node = temp_to_node(c, inst->dst.index);\n                         ra_set_node_reg(c->g, node,\n-                                        PHYS_INDEX + inst->src[0].index);\n+                                        get_phys_index(c->devinfo) +\n+                                        inst->src[0].index);\n                         break;\n                 }\n                 }\n@@ -1086,13 +1100,17 @@ v3d_register_allocate(struct v3d_compile *c)\n                                           c->num_temps + ACC_COUNT),\n         };\n \n+        uint32_t phys_index = get_phys_index(c->devinfo);\n+\n         struct v3d_ra_select_callback_data callback_data = {\n+                .phys_index = phys_index,\n                 .next_acc = 0,\n                 /* Start at RF3, to try to keep the TLB writes from using\n                  * RF0-2.\n                  */\n                 .next_phys = 3,\n                 .nodes = &c->nodes,\n+                .devinfo = c->devinfo,\n         };\n \n         vir_calculate_live_intervals(c);\n@@ -1139,6 +1157,7 @@ v3d_register_allocate(struct v3d_compile *c)\n         vir_for_each_inst_inorder(inst, c) {\n                 inst->ip = ip++;\n                 update_graph_and_reg_classes_for_inst(c, acc_nodes, inst);\n+\n         }\n \n         /* Set the register classes for all our temporaries in the graph */\n@@ -1202,13 +1221,13 @@ v3d_register_allocate(struct v3d_compile *c)\n         temp_registers = calloc(c->num_temps, sizeof(*temp_registers));\n         for (uint32_t i = 0; i < c->num_temps; i++) {\n                 int ra_reg = ra_get_node_reg(c->g, temp_to_node(c, i));\n-                if (ra_reg < PHYS_INDEX) {\n+                if (ra_reg < phys_index) {\n                         temp_registers[i].magic = true;\n                         temp_registers[i].index = (V3D_QPU_WADDR_R0 +\n                                                    ra_reg - ACC_INDEX);\n                 } else {\n                         temp_registers[i].magic = false;\n-                        temp_registers[i].index = ra_reg - PHYS_INDEX;\n+                        temp_registers[i].index = ra_reg - phys_index;\n                 }\n         }\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0019-broadcom-compiler-don-t-favor-select-accum-registers.patch",
    "content": "From da0a3deadf86a46c8323267d3f6a49e442835608 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Fri, 17 Sep 2021 01:07:06 +0200\nSubject: [PATCH 019/142] broadcom/compiler: don't favor/select accum registers\n for hw not supporting it\n\nNote that what we do is to just return false on the favor/select accum\nmethods. We could just avoid to call them, but as the select is called\nmore than once, it is just easier this way.\n---\n src/broadcom/compiler/vir_register_allocate.c | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c\nindex a358b616e13..1f495180784 100644\n--- a/src/broadcom/compiler/vir_register_allocate.c\n+++ b/src/broadcom/compiler/vir_register_allocate.c\n@@ -797,6 +797,9 @@ v3d_ra_favor_accum(struct v3d_ra_select_callback_data *v3d_ra,\n                    BITSET_WORD *regs,\n                    int priority)\n {\n+        if (!v3d_ra->devinfo->has_accumulators)\n+                return false;\n+\n         /* Favor accumulators if we have less that this number of physical\n          * registers. Accumulators have more restrictions (like being\n          * invalidated through thrsw), so running out of physical registers\n@@ -832,6 +835,9 @@ v3d_ra_select_accum(struct v3d_ra_select_callback_data *v3d_ra,\n                     BITSET_WORD *regs,\n                     unsigned int *out)\n {\n+        if (!v3d_ra->devinfo->has_accumulators)\n+                return false;\n+\n         /* Choose r5 for our ldunifs if possible (nobody else can load to that\n          * reg, and it keeps the QPU cond field free from being occupied by\n          * ldunifrf).\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0020-broadcom-vir-implement-is_no_op_mov-for-v71.patch",
    "content": "From 6c04d7c917da6b38f8b2b4306ab03ed2ab7e6ce0 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 9 Sep 2021 00:28:53 +0200\nSubject: [PATCH 020/142] broadcom/vir: implement is_no_op_mov for v71\n\nDid some refactoring/splitting.\n---\n src/broadcom/compiler/vir_to_qpu.c | 66 ++++++++++++++++++++++++------\n 1 file changed, 53 insertions(+), 13 deletions(-)\n\ndiff --git a/src/broadcom/compiler/vir_to_qpu.c b/src/broadcom/compiler/vir_to_qpu.c\nindex c8b6e0a91a0..08970d52954 100644\n--- a/src/broadcom/compiler/vir_to_qpu.c\n+++ b/src/broadcom/compiler/vir_to_qpu.c\n@@ -129,19 +129,8 @@ set_src(struct v3d_qpu_instr *instr, enum v3d_qpu_mux *mux, struct qpu_reg src)\n }\n \n static bool\n-is_no_op_mov(struct qinst *qinst)\n+v3d33_mov_src_and_dst_equal(struct qinst *qinst)\n {\n-        static const struct v3d_qpu_sig no_sig = {0};\n-\n-        /* Make sure it's just a lone MOV. */\n-        if (qinst->qpu.type != V3D_QPU_INSTR_TYPE_ALU ||\n-            qinst->qpu.alu.mul.op != V3D_QPU_M_MOV ||\n-            qinst->qpu.alu.add.op != V3D_QPU_A_NOP ||\n-            memcmp(&qinst->qpu.sig, &no_sig, sizeof(no_sig)) != 0) {\n-                return false;\n-        }\n-\n-        /* Check if it's a MOV from a register to itself. */\n         enum v3d_qpu_waddr waddr = qinst->qpu.alu.mul.waddr;\n         if (qinst->qpu.alu.mul.magic_write) {\n                 if (waddr < V3D_QPU_WADDR_R0 || waddr > V3D_QPU_WADDR_R4)\n@@ -168,6 +157,57 @@ is_no_op_mov(struct qinst *qinst)\n                         return false;\n         }\n \n+        return true;\n+}\n+\n+static bool\n+v3d71_mov_src_and_dst_equal(struct qinst *qinst)\n+{\n+        if (qinst->qpu.alu.mul.magic_write)\n+                return false;\n+\n+        enum v3d_qpu_waddr waddr = qinst->qpu.alu.mul.waddr;\n+        int raddr;\n+\n+        raddr = qinst->qpu.alu.mul.a.raddr;\n+        if (raddr != waddr)\n+                return false;\n+\n+        return true;\n+}\n+\n+static bool\n+mov_src_and_dst_equal(struct qinst *qinst,\n+                      const struct v3d_device_info *devinfo)\n+{\n+        if (devinfo->ver < 71)\n+                return v3d33_mov_src_and_dst_equal(qinst);\n+        else\n+                return v3d71_mov_src_and_dst_equal(qinst);\n+}\n+\n+\n+static bool\n+is_no_op_mov(struct qinst *qinst,\n+             const struct v3d_device_info *devinfo)\n+{\n+        static const struct v3d_qpu_sig no_sig = {0};\n+\n+        /* Make sure it's just a lone MOV. We only check for M_MOV. Although\n+         * for V3D 7.x there is also A_MOV, we don't need to check for it as\n+         * we always emit using M_MOV. We could use A_MOV later on the\n+         * squedule to improve performance\n+         */\n+        if (qinst->qpu.type != V3D_QPU_INSTR_TYPE_ALU ||\n+            qinst->qpu.alu.mul.op != V3D_QPU_M_MOV ||\n+            qinst->qpu.alu.add.op != V3D_QPU_A_NOP ||\n+            memcmp(&qinst->qpu.sig, &no_sig, sizeof(no_sig)) != 0) {\n+                return false;\n+        }\n+\n+        if (!mov_src_and_dst_equal(qinst, devinfo))\n+                return false;\n+\n         /* No packing or flags updates, or we need to execute the\n          * instruction.\n          */\n@@ -324,7 +364,7 @@ v3d_generate_code_block(struct v3d_compile *c,\n                                 qinst->qpu.alu.mul.waddr = dst.index;\n                                 qinst->qpu.alu.mul.magic_write = dst.magic;\n \n-                                if (is_no_op_mov(qinst)) {\n+                                if (is_no_op_mov(qinst, c->devinfo)) {\n                                         vir_remove_instruction(c, qinst);\n                                         continue;\n                                 }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0021-broadcom-compiler-update-vir_to_qpu-set_src-for-v71.patch",
    "content": "From 7b5be2d9b178a45c34c22db2744639a6a8a216d1 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 9 Sep 2021 01:18:54 +0200\nSubject: [PATCH 021/142] broadcom/compiler: update vir_to_qpu::set_src for v71\n\n---\n src/broadcom/compiler/vir_to_qpu.c | 47 ++++++++++++++++++++++++++----\n 1 file changed, 42 insertions(+), 5 deletions(-)\n\ndiff --git a/src/broadcom/compiler/vir_to_qpu.c b/src/broadcom/compiler/vir_to_qpu.c\nindex 08970d52954..afc4941fdb1 100644\n--- a/src/broadcom/compiler/vir_to_qpu.c\n+++ b/src/broadcom/compiler/vir_to_qpu.c\n@@ -86,12 +86,22 @@ new_qpu_nop_before(struct qinst *inst)\n         return q;\n }\n \n+static void\n+v3d71_set_src(struct v3d_qpu_instr *instr, uint8_t *raddr, struct qpu_reg src)\n+{\n+        if (src.smimm)\n+                unreachable(\"v3d71_set_src: pending handling small immediates\");\n+\n+        assert(!src.magic);\n+        *raddr = src.index;\n+}\n+\n /**\n  * Allocates the src register (accumulator or register file) into the RADDR\n  * fields of the instruction.\n  */\n static void\n-set_src(struct v3d_qpu_instr *instr, enum v3d_qpu_mux *mux, struct qpu_reg src)\n+v3d33_set_src(struct v3d_qpu_instr *instr, enum v3d_qpu_mux *mux, struct qpu_reg src)\n {\n         if (src.smimm) {\n                 assert(instr->sig.small_imm_b);\n@@ -128,6 +138,24 @@ set_src(struct v3d_qpu_instr *instr, enum v3d_qpu_mux *mux, struct qpu_reg src)\n         }\n }\n \n+/*\n+ * The main purpose of the following wrapper is to make calling set_src\n+ * cleaner. This is the reason it receives both mux and raddr pointers. Those\n+ * will be filled or not based on the device version.\n+ */\n+static void\n+set_src(struct v3d_qpu_instr *instr,\n+        enum v3d_qpu_mux *mux,\n+        uint8_t *raddr,\n+        struct qpu_reg src,\n+        const struct v3d_device_info *devinfo)\n+{\n+        if (devinfo->ver < 71)\n+                return v3d33_set_src(instr, mux, src);\n+        else\n+                return v3d71_set_src(instr, raddr, src);\n+}\n+\n static bool\n v3d33_mov_src_and_dst_equal(struct qinst *qinst)\n {\n@@ -340,13 +368,18 @@ v3d_generate_code_block(struct v3d_compile *c,\n                                 qinst->qpu.sig_magic = dst.magic;\n                         } else if (qinst->qpu.alu.add.op != V3D_QPU_A_NOP) {\n                                 assert(qinst->qpu.alu.mul.op == V3D_QPU_M_NOP);\n+\n                                 if (nsrc >= 1) {\n                                         set_src(&qinst->qpu,\n-                                                &qinst->qpu.alu.add.a.mux, src[0]);\n+                                                &qinst->qpu.alu.add.a.mux,\n+                                                &qinst->qpu.alu.add.a.raddr,\n+                                                src[0], c->devinfo);\n                                 }\n                                 if (nsrc >= 2) {\n                                         set_src(&qinst->qpu,\n-                                                &qinst->qpu.alu.add.b.mux, src[1]);\n+                                                &qinst->qpu.alu.add.b.mux,\n+                                                &qinst->qpu.alu.add.b.raddr,\n+                                                src[1], c->devinfo);\n                                 }\n \n                                 qinst->qpu.alu.add.waddr = dst.index;\n@@ -354,11 +387,15 @@ v3d_generate_code_block(struct v3d_compile *c,\n                         } else {\n                                 if (nsrc >= 1) {\n                                         set_src(&qinst->qpu,\n-                                                &qinst->qpu.alu.mul.a.mux, src[0]);\n+                                                &qinst->qpu.alu.mul.a.mux,\n+                                                &qinst->qpu.alu.mul.a.raddr,\n+                                                src[0], c->devinfo);\n                                 }\n                                 if (nsrc >= 2) {\n                                         set_src(&qinst->qpu,\n-                                                &qinst->qpu.alu.mul.b.mux, src[1]);\n+                                                &qinst->qpu.alu.mul.b.mux,\n+                                                &qinst->qpu.alu.mul.b.raddr,\n+                                                src[1], c->devinfo);\n                                 }\n \n                                 qinst->qpu.alu.mul.waddr = dst.index;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0022-broadcom-qpu_schedule-add-process_raddr_deps.patch",
    "content": "From fe89703008f2a3d6bfe6e260791f712013be5e48 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 9 Sep 2021 23:59:28 +0200\nSubject: [PATCH 022/142] broadcom/qpu_schedule: add process_raddr_deps\n\nOn v71 we don't have muxes, but more raddr. Adding a equivalent add\ndeps function.\n---\n src/broadcom/compiler/qpu_schedule.c | 52 +++++++++++++++++++++++-----\n 1 file changed, 44 insertions(+), 8 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex 455fa3867be..89254643c90 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -155,6 +155,7 @@ static void\n process_mux_deps(struct schedule_state *state, struct schedule_node *n,\n                  enum v3d_qpu_mux mux)\n {\n+        assert(state->devinfo->ver < 71);\n         switch (mux) {\n         case V3D_QPU_MUX_A:\n                 add_read_dep(state, state->last_rf[n->inst->qpu.raddr_a], n);\n@@ -171,6 +172,17 @@ process_mux_deps(struct schedule_state *state, struct schedule_node *n,\n         }\n }\n \n+\n+static void\n+process_raddr_deps(struct schedule_state *state, struct schedule_node *n,\n+                   uint8_t raddr, bool is_small_imm)\n+{\n+        assert(state->devinfo->ver >= 71);\n+\n+        if (!is_small_imm)\n+                add_read_dep(state, state->last_rf[raddr], n);\n+}\n+\n static bool\n tmu_write_is_sequence_terminator(uint32_t waddr)\n {\n@@ -305,15 +317,39 @@ calculate_deps(struct schedule_state *state, struct schedule_node *n)\n \n         /* XXX: LOAD_IMM */\n \n-        if (v3d_qpu_add_op_num_src(inst->alu.add.op) > 0)\n-                process_mux_deps(state, n, inst->alu.add.a.mux);\n-        if (v3d_qpu_add_op_num_src(inst->alu.add.op) > 1)\n-                process_mux_deps(state, n, inst->alu.add.b.mux);\n+        if (v3d_qpu_add_op_num_src(inst->alu.add.op) > 0) {\n+                if (devinfo->ver < 71) {\n+                        process_mux_deps(state, n, inst->alu.add.a.mux);\n+                } else {\n+                        process_raddr_deps(state, n, inst->alu.add.a.raddr,\n+                                           inst->sig.small_imm_a);\n+                }\n+        }\n+        if (v3d_qpu_add_op_num_src(inst->alu.add.op) > 1) {\n+                if (devinfo->ver < 71) {\n+                        process_mux_deps(state, n, inst->alu.add.b.mux);\n+                } else {\n+                        process_raddr_deps(state, n, inst->alu.add.b.raddr,\n+                                           inst->sig.small_imm_b);\n+                }\n+        }\n \n-        if (v3d_qpu_mul_op_num_src(inst->alu.mul.op) > 0)\n-                process_mux_deps(state, n, inst->alu.mul.a.mux);\n-        if (v3d_qpu_mul_op_num_src(inst->alu.mul.op) > 1)\n-                process_mux_deps(state, n, inst->alu.mul.b.mux);\n+        if (v3d_qpu_mul_op_num_src(inst->alu.mul.op) > 0) {\n+                if (devinfo->ver < 71) {\n+                        process_mux_deps(state, n, inst->alu.mul.a.mux);\n+                } else {\n+                        process_raddr_deps(state, n, inst->alu.mul.a.raddr,\n+                                           inst->sig.small_imm_c);\n+                }\n+        }\n+        if (v3d_qpu_mul_op_num_src(inst->alu.mul.op) > 1) {\n+                if (devinfo->ver < 71) {\n+                        process_mux_deps(state, n, inst->alu.mul.b.mux);\n+                } else {\n+                        process_raddr_deps(state, n, inst->alu.mul.b.raddr,\n+                                           inst->sig.small_imm_d);\n+                }\n+        }\n \n         switch (inst->alu.add.op) {\n         case V3D_QPU_A_VPMSETUP:\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0023-broadcom-qpu-update-disasm_raddr-for-v71.patch",
    "content": "From 20ce426df1ab2546332141f4bc4531ada754cdea Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Fri, 10 Sep 2021 01:20:44 +0200\nSubject: [PATCH 023/142] broadcom/qpu: update disasm_raddr for v71\n\n---\n src/broadcom/qpu/qpu_disasm.c | 72 ++++++++++++++++++++++++++++++++---\n 1 file changed, 66 insertions(+), 6 deletions(-)\n\ndiff --git a/src/broadcom/qpu/qpu_disasm.c b/src/broadcom/qpu/qpu_disasm.c\nindex 588a665f770..b613de781dc 100644\n--- a/src/broadcom/qpu/qpu_disasm.c\n+++ b/src/broadcom/qpu/qpu_disasm.c\n@@ -56,8 +56,9 @@ pad_to(struct disasm_state *disasm, int n)\n \n \n static void\n-v3d_qpu_disasm_raddr(struct disasm_state *disasm,\n-                     const struct v3d_qpu_instr *instr, uint8_t mux)\n+v3d33_qpu_disasm_raddr(struct disasm_state *disasm,\n+                       const struct v3d_qpu_instr *instr,\n+                       enum v3d_qpu_mux mux)\n {\n         if (mux == V3D_QPU_MUX_A) {\n                 append(disasm, \"rf%d\", instr->raddr_a);\n@@ -82,6 +83,65 @@ v3d_qpu_disasm_raddr(struct disasm_state *disasm,\n         }\n }\n \n+enum v3d_qpu_input_class {\n+        V3D_QPU_ADD_A,\n+        V3D_QPU_ADD_B,\n+        V3D_QPU_MUL_A,\n+        V3D_QPU_MUL_B\n+};\n+\n+static void\n+v3d71_qpu_disasm_raddr(struct disasm_state *disasm,\n+                       const struct v3d_qpu_instr *instr,\n+                       uint8_t raddr,\n+                       enum v3d_qpu_input_class input_class)\n+{\n+        bool is_small_imm = false;\n+        switch(input_class) {\n+        case V3D_QPU_ADD_A:\n+                is_small_imm = instr->sig.small_imm_a;\n+                break;\n+        case V3D_QPU_ADD_B:\n+                is_small_imm = instr->sig.small_imm_b;\n+                break;\n+        case V3D_QPU_MUL_A:\n+                is_small_imm = instr->sig.small_imm_c;\n+                break;\n+        case V3D_QPU_MUL_B:\n+                is_small_imm = instr->sig.small_imm_d;\n+                break;\n+        }\n+\n+        if (is_small_imm) {\n+                unreachable(\"Pending handling small immediates\");\n+                uint32_t val;\n+                ASSERTED bool ok =\n+                        v3d_qpu_small_imm_unpack(disasm->devinfo,\n+                                                 raddr,\n+                                                 &val);\n+\n+                if ((int)val >= -16 && (int)val <= 15)\n+                        append(disasm, \"%d\", val);\n+                else\n+                        append(disasm, \"0x%08x\", val);\n+                assert(ok);\n+        } else {\n+                append(disasm, \"rf%d\", raddr);\n+        }\n+}\n+\n+static void\n+v3d_qpu_disasm_raddr(struct disasm_state *disasm,\n+                     const struct v3d_qpu_instr *instr,\n+                     const struct v3d_qpu_input *input,\n+                     enum v3d_qpu_input_class input_class)\n+{\n+        if (disasm->devinfo->ver < 71)\n+                v3d33_qpu_disasm_raddr(disasm, instr, input->mux);\n+        else\n+                v3d71_qpu_disasm_raddr(disasm, instr, input->raddr, input_class);\n+}\n+\n static void\n v3d_qpu_disasm_waddr(struct disasm_state *disasm, uint32_t waddr, bool magic)\n {\n@@ -121,14 +181,14 @@ v3d_qpu_disasm_add(struct disasm_state *disasm,\n         if (num_src >= 1) {\n                 if (has_dst)\n                         append(disasm, \", \");\n-                v3d_qpu_disasm_raddr(disasm, instr, instr->alu.add.a.mux);\n+                v3d_qpu_disasm_raddr(disasm, instr, &instr->alu.add.a, V3D_QPU_ADD_A);\n                 append(disasm, \"%s\",\n                        v3d_qpu_unpack_name(instr->alu.add.a.unpack));\n         }\n \n         if (num_src >= 2) {\n                 append(disasm, \", \");\n-                v3d_qpu_disasm_raddr(disasm, instr, instr->alu.add.b.mux);\n+                v3d_qpu_disasm_raddr(disasm, instr, &instr->alu.add.b, V3D_QPU_ADD_B);\n                 append(disasm, \"%s\",\n                        v3d_qpu_unpack_name(instr->alu.add.b.unpack));\n         }\n@@ -164,14 +224,14 @@ v3d_qpu_disasm_mul(struct disasm_state *disasm,\n         if (num_src >= 1) {\n                 if (has_dst)\n                         append(disasm, \", \");\n-                v3d_qpu_disasm_raddr(disasm, instr, instr->alu.mul.a.mux);\n+                v3d_qpu_disasm_raddr(disasm, instr, &instr->alu.mul.a, V3D_QPU_MUL_A);\n                 append(disasm, \"%s\",\n                        v3d_qpu_unpack_name(instr->alu.mul.a.unpack));\n         }\n \n         if (num_src >= 2) {\n                 append(disasm, \", \");\n-                v3d_qpu_disasm_raddr(disasm, instr, instr->alu.mul.b.mux);\n+                v3d_qpu_disasm_raddr(disasm, instr, &instr->alu.mul.b, V3D_QPU_MUL_B);\n                 append(disasm, \"%s\",\n                        v3d_qpu_unpack_name(instr->alu.mul.b.unpack));\n         }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0024-broadcom-qpu-return-false-on-qpu_writes_accumulatorX.patch",
    "content": "From 7263fa24a3c57b1dcd4d870670cda86ae89aa28c Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Wed, 15 Sep 2021 10:55:49 +0200\nSubject: [PATCH 024/142] broadcom/qpu: return false on\n qpu_writes_accumulatorXX helpers for v71\n\nAs for v71 doesn't have accumulators (devinfo->has_accumulators set to\nfalse), those methods would always return false.\n---\n src/broadcom/qpu/qpu_instr.c | 12 ++++++++++++\n 1 file changed, 12 insertions(+)\n\ndiff --git a/src/broadcom/qpu/qpu_instr.c b/src/broadcom/qpu/qpu_instr.c\nindex 8de99c611d5..7ec3c867260 100644\n--- a/src/broadcom/qpu/qpu_instr.c\n+++ b/src/broadcom/qpu/qpu_instr.c\n@@ -854,6 +854,9 @@ bool\n v3d_qpu_writes_r3(const struct v3d_device_info *devinfo,\n                   const struct v3d_qpu_instr *inst)\n {\n+        if(!devinfo->has_accumulators)\n+                return false;\n+\n         if (qpu_writes_magic_waddr_explicitly(devinfo, inst, V3D_QPU_WADDR_R3))\n                 return true;\n \n@@ -864,6 +867,9 @@ bool\n v3d_qpu_writes_r4(const struct v3d_device_info *devinfo,\n                   const struct v3d_qpu_instr *inst)\n {\n+        if (!devinfo->has_accumulators)\n+                return false;\n+\n         if (inst->type == V3D_QPU_INSTR_TYPE_ALU) {\n                 if (inst->alu.add.op != V3D_QPU_A_NOP &&\n                     inst->alu.add.magic_write &&\n@@ -894,6 +900,9 @@ bool\n v3d_qpu_writes_r5(const struct v3d_device_info *devinfo,\n                   const struct v3d_qpu_instr *inst)\n {\n+        if (!devinfo->has_accumulators)\n+                return false;\n+\n         if (qpu_writes_magic_waddr_explicitly(devinfo, inst, V3D_QPU_WADDR_R5))\n                 return true;\n \n@@ -904,6 +913,9 @@ bool\n v3d_qpu_writes_accum(const struct v3d_device_info *devinfo,\n                      const struct v3d_qpu_instr *inst)\n {\n+        if (!devinfo->has_accumulators)\n+                return false;\n+\n         if (v3d_qpu_writes_r5(devinfo, inst))\n                 return true;\n         if (v3d_qpu_writes_r4(devinfo, inst))\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0025-broadcom-compiler-add-support-for-varyings-on-nir-to.patch",
    "content": "From 6a9611c5a22218388bba419174d3343e0cdf773b Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Tue, 14 Sep 2021 10:42:55 +0200\nSubject: [PATCH 025/142] broadcom/compiler: add support for varyings on nir to\n vir generation for v71\n\nNeeds update as v71 doesn't have accumulators anymore, and ldvary uses\nnow rf0 to return the value.\n---\n src/broadcom/compiler/nir_to_vir.c | 34 +++++++++++++++++-------------\n 1 file changed, 19 insertions(+), 15 deletions(-)\n\ndiff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c\nindex ca072971f01..79a22c3bd08 100644\n--- a/src/broadcom/compiler/nir_to_vir.c\n+++ b/src/broadcom/compiler/nir_to_vir.c\n@@ -1005,32 +1005,36 @@ emit_fragcoord_input(struct v3d_compile *c, int attr)\n \n static struct qreg\n emit_smooth_varying(struct v3d_compile *c,\n-                    struct qreg vary, struct qreg w, struct qreg r5)\n+                    struct qreg vary, struct qreg w, struct qreg c_reg)\n {\n-        return vir_FADD(c, vir_FMUL(c, vary, w), r5);\n+        return vir_FADD(c, vir_FMUL(c, vary, w), c_reg);\n }\n \n static struct qreg\n emit_noperspective_varying(struct v3d_compile *c,\n-                           struct qreg vary, struct qreg r5)\n+                           struct qreg vary, struct qreg c_reg)\n {\n-        return vir_FADD(c, vir_MOV(c, vary), r5);\n+        return vir_FADD(c, vir_MOV(c, vary), c_reg);\n }\n \n static struct qreg\n emit_flat_varying(struct v3d_compile *c,\n-                  struct qreg vary, struct qreg r5)\n+                  struct qreg vary, struct qreg c_reg)\n {\n         vir_MOV_dest(c, c->undef, vary);\n-        return vir_MOV(c, r5);\n+        return vir_MOV(c, c_reg);\n }\n \n static struct qreg\n emit_fragment_varying(struct v3d_compile *c, nir_variable *var,\n                       int8_t input_idx, uint8_t swizzle, int array_index)\n {\n-        struct qreg r3 = vir_reg(QFILE_MAGIC, V3D_QPU_WADDR_R3);\n-        struct qreg r5 = vir_reg(QFILE_MAGIC, V3D_QPU_WADDR_R5);\n+        struct qreg c_reg; /* C coefficient */\n+\n+        if (c->devinfo->has_accumulators)\n+                c_reg = vir_reg(QFILE_MAGIC, V3D_QPU_WADDR_R5);\n+        else\n+                c_reg = vir_reg(QFILE_REG, 0);\n \n         struct qinst *ldvary = NULL;\n         struct qreg vary;\n@@ -1041,7 +1045,7 @@ emit_fragment_varying(struct v3d_compile *c, nir_variable *var,\n                 vary = vir_emit_def(c, ldvary);\n         } else {\n                 vir_NOP(c)->qpu.sig.ldvary = true;\n-                vary = r3;\n+                vary = vir_reg(QFILE_MAGIC, V3D_QPU_WADDR_R3);\n         }\n \n         /* Store the input value before interpolation so we can implement\n@@ -1050,7 +1054,7 @@ emit_fragment_varying(struct v3d_compile *c, nir_variable *var,\n         if (input_idx >= 0) {\n                 assert(var);\n                 c->interp[input_idx].vp = vary;\n-                c->interp[input_idx].C = vir_MOV(c, r5);\n+                c->interp[input_idx].C = vir_MOV(c, c_reg);\n                 c->interp[input_idx].mode = var->data.interpolation;\n         }\n \n@@ -1060,7 +1064,7 @@ emit_fragment_varying(struct v3d_compile *c, nir_variable *var,\n          */\n         if (!var) {\n                 assert(input_idx < 0);\n-                return emit_smooth_varying(c, vary, c->payload_w, r5);\n+                return emit_smooth_varying(c, vary, c->payload_w, c_reg);\n         }\n \n         int i = c->num_inputs++;\n@@ -1075,20 +1079,20 @@ emit_fragment_varying(struct v3d_compile *c, nir_variable *var,\n                 if (var->data.centroid) {\n                         BITSET_SET(c->centroid_flags, i);\n                         result = emit_smooth_varying(c, vary,\n-                                                     c->payload_w_centroid, r5);\n+                                                     c->payload_w_centroid, c_reg);\n                 } else {\n-                        result = emit_smooth_varying(c, vary, c->payload_w, r5);\n+                        result = emit_smooth_varying(c, vary, c->payload_w, c_reg);\n                 }\n                 break;\n \n         case INTERP_MODE_NOPERSPECTIVE:\n                 BITSET_SET(c->noperspective_flags, i);\n-                result = emit_noperspective_varying(c, vary, r5);\n+                result = emit_noperspective_varying(c, vary, c_reg);\n                 break;\n \n         case INTERP_MODE_FLAT:\n                 BITSET_SET(c->flat_shade_flags, i);\n-                result = emit_flat_varying(c, vary, r5);\n+                result = emit_flat_varying(c, vary, c_reg);\n                 break;\n \n         default:\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0026-broadcom-compiler-payload_w-is-loaded-on-rf3-for-v71.patch",
    "content": "From 06af15a60f7a9c135893e5f8934b8030c1da95f9 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Wed, 15 Sep 2021 01:14:15 +0200\nSubject: [PATCH 026/142] broadcom/compiler: payload_w is loaded on rf3 for v71\n\nAnd in general rf0 is now used for other needs.\n---\n src/broadcom/compiler/nir_to_vir.c            | 6 +++++-\n src/broadcom/compiler/vir_register_allocate.c | 6 +++++-\n 2 files changed, 10 insertions(+), 2 deletions(-)\n\ndiff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c\nindex 79a22c3bd08..1a05b279a2d 100644\n--- a/src/broadcom/compiler/nir_to_vir.c\n+++ b/src/broadcom/compiler/nir_to_vir.c\n@@ -4325,7 +4325,11 @@ nir_to_vir(struct v3d_compile *c)\n {\n         switch (c->s->info.stage) {\n         case MESA_SHADER_FRAGMENT:\n-                c->payload_w = vir_MOV(c, vir_reg(QFILE_REG, 0));\n+                if (c->devinfo->ver < 71)\n+                        c->payload_w = vir_MOV(c, vir_reg(QFILE_REG, 0));\n+                else\n+                        c->payload_w = vir_MOV(c, vir_reg(QFILE_REG, 3));\n+\n                 c->payload_w_centroid = vir_MOV(c, vir_reg(QFILE_REG, 1));\n                 c->payload_z = vir_MOV(c, vir_reg(QFILE_REG, 2));\n \ndiff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c\nindex 1f495180784..eca9a6751a6 100644\n--- a/src/broadcom/compiler/vir_register_allocate.c\n+++ b/src/broadcom/compiler/vir_register_allocate.c\n@@ -1034,6 +1034,11 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n         if (inst->src[0].file == QFILE_REG) {\n                 switch (inst->src[0].index) {\n                 case 0:\n+                        /* V3D 7.x doesn't use rf0 for thread payload */\n+                        if (c->devinfo->ver >= 71)\n+                                break;\n+                        else\n+                                FALLTHROUGH;\n                 case 1:\n                 case 2:\n                 case 3: {\n@@ -1163,7 +1168,6 @@ v3d_register_allocate(struct v3d_compile *c)\n         vir_for_each_inst_inorder(inst, c) {\n                 inst->ip = ip++;\n                 update_graph_and_reg_classes_for_inst(c, acc_nodes, inst);\n-\n         }\n \n         /* Set the register classes for all our temporaries in the graph */\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0027-broadcom-qpu_schedule-update-write-deps-for-v71.patch",
    "content": "From d38d8056903b9a4f96ab56261ac3b3c3be0af4fb Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Wed, 15 Sep 2021 11:12:59 +0200\nSubject: [PATCH 027/142] broadcom/qpu_schedule: update write deps for v71\n\nWe just need to add a write dep if rf0 is written implicitly.\n\nNote that we don't need to check if we have accumulators when checking\nfor r3/r4/r5, as v3d_qpu_writes_rX would return false for hw version\nthat doesn't have accumulators.\n---\n src/broadcom/compiler/qpu_schedule.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex 89254643c90..2fa9031d7b6 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -422,6 +422,8 @@ calculate_deps(struct schedule_state *state, struct schedule_node *n)\n                 add_write_dep(state, &state->last_r[4], n);\n         if (v3d_qpu_writes_r5(devinfo, inst))\n                 add_write_dep(state, &state->last_r[5], n);\n+        if (v3d_qpu_writes_rf0_implicitly(devinfo, inst))\n+                add_write_dep(state, &state->last_rf[0], n);\n \n         /* If we add any more dependencies here we should consider whether we\n          * also need to update qpu_inst_after_thrsw_valid_in_delay_slot.\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0028-broadcom-compiler-update-register-classes-to-not-inc.patch",
    "content": "From 7e2a2be830b1672ab846389a46b5d09bad0f7a98 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 16 Sep 2021 00:49:25 +0200\nSubject: [PATCH 028/142] broadcom/compiler: update register classes to not\n include accumulators on v71\n\n---\n src/broadcom/compiler/vir_register_allocate.c | 56 ++++++++++++-------\n 1 file changed, 36 insertions(+), 20 deletions(-)\n\ndiff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c\nindex eca9a6751a6..7b3f6c41934 100644\n--- a/src/broadcom/compiler/vir_register_allocate.c\n+++ b/src/broadcom/compiler/vir_register_allocate.c\n@@ -44,10 +44,15 @@ get_phys_index(const struct v3d_device_info *devinfo)\n #define CLASS_BITS_PHYS   (1 << 0)\n #define CLASS_BITS_ACC    (1 << 1)\n #define CLASS_BITS_R5     (1 << 4)\n-#define CLASS_BITS_ANY    (CLASS_BITS_PHYS | \\\n-                           CLASS_BITS_ACC | \\\n-                           CLASS_BITS_R5)\n \n+static uint8_t\n+get_class_bit_any(const struct v3d_device_info *devinfo)\n+{\n+        if (devinfo->has_accumulators)\n+                return (CLASS_BITS_PHYS | CLASS_BITS_ACC | CLASS_BITS_R5);\n+        else\n+                return CLASS_BITS_PHYS;\n+}\n static inline uint32_t\n temp_to_node(struct v3d_compile *c, uint32_t temp)\n {\n@@ -82,11 +87,13 @@ choose_reg_class(struct v3d_compile *c, uint8_t class_bits)\n         if (class_bits == CLASS_BITS_PHYS) {\n                 return c->compiler->reg_class_phys[c->thread_index];\n         } else if (class_bits == (CLASS_BITS_R5)) {\n+                assert(c->devinfo->has_accumulators);\n                 return c->compiler->reg_class_r5[c->thread_index];\n         } else if (class_bits == (CLASS_BITS_PHYS | CLASS_BITS_ACC)) {\n+                assert(c->devinfo->has_accumulators);\n                 return c->compiler->reg_class_phys_or_acc[c->thread_index];\n         } else {\n-                assert(class_bits == CLASS_BITS_ANY);\n+                assert(class_bits == get_class_bit_any(c->devinfo));\n                 return c->compiler->reg_class_any[c->thread_index];\n         }\n }\n@@ -447,7 +454,7 @@ v3d_emit_spill_tmua(struct v3d_compile *c,\n          */\n         assert(c->disable_ldunif_opt);\n         struct qreg offset = vir_uniform_ui(c, spill_offset);\n-        add_node(c, offset.index, CLASS_BITS_ANY);\n+        add_node(c, offset.index, get_class_bit_any(c->devinfo));\n \n         /* We always enable per-quad on spills/fills to ensure we spill\n          * any channels involved with helper invocations.\n@@ -645,7 +652,8 @@ v3d_spill_reg(struct v3d_compile *c, int *acc_nodes, int spill_temp)\n                                          * instruction immediately after, so\n                                          * we can use any register class for it.\n                                          */\n-                                        add_node(c, unif.index, CLASS_BITS_ANY);\n+                                        add_node(c, unif.index,\n+                                                 get_class_bit_any(c->devinfo));\n                                 } else if (spill_type == SPILL_TYPE_RECONSTRUCT) {\n                                         struct qreg temp =\n                                                 reconstruct_temp(c, reconstruct_op);\n@@ -924,31 +932,38 @@ vir_init_reg_sets(struct v3d_compiler *compiler)\n         for (int threads = 0; threads < max_thread_index; threads++) {\n                 compiler->reg_class_any[threads] =\n                         ra_alloc_contig_reg_class(compiler->regs, 1);\n-                compiler->reg_class_r5[threads] =\n-                        ra_alloc_contig_reg_class(compiler->regs, 1);\n-                compiler->reg_class_phys_or_acc[threads] =\n-                        ra_alloc_contig_reg_class(compiler->regs, 1);\n+                if (compiler->devinfo->has_accumulators) {\n+                        compiler->reg_class_r5[threads] =\n+                                ra_alloc_contig_reg_class(compiler->regs, 1);\n+                        compiler->reg_class_phys_or_acc[threads] =\n+                                ra_alloc_contig_reg_class(compiler->regs, 1);\n+                }\n                 compiler->reg_class_phys[threads] =\n                         ra_alloc_contig_reg_class(compiler->regs, 1);\n \n                 for (int i = phys_index;\n                      i < phys_index + (PHYS_COUNT >> threads); i++) {\n-                        ra_class_add_reg(compiler->reg_class_phys_or_acc[threads], i);\n+                        if (compiler->devinfo->has_accumulators)\n+                                ra_class_add_reg(compiler->reg_class_phys_or_acc[threads], i);\n                         ra_class_add_reg(compiler->reg_class_phys[threads], i);\n                         ra_class_add_reg(compiler->reg_class_any[threads], i);\n                 }\n \n-                for (int i = ACC_INDEX + 0; i < ACC_INDEX + ACC_COUNT - 1; i++) {\n-                        ra_class_add_reg(compiler->reg_class_phys_or_acc[threads], i);\n-                        ra_class_add_reg(compiler->reg_class_any[threads], i);\n+                if (compiler->devinfo->has_accumulators) {\n+                        for (int i = ACC_INDEX + 0; i < ACC_INDEX + ACC_COUNT - 1; i++) {\n+                                ra_class_add_reg(compiler->reg_class_phys_or_acc[threads], i);\n+                                ra_class_add_reg(compiler->reg_class_any[threads], i);\n+                        }\n                 }\n                 /* r5 can only store a single 32-bit value, so not much can\n                  * use it.\n                  */\n-                ra_class_add_reg(compiler->reg_class_r5[threads],\n-                                 ACC_INDEX + 5);\n-                ra_class_add_reg(compiler->reg_class_any[threads],\n-                                 ACC_INDEX + 5);\n+                if (compiler->devinfo->has_accumulators) {\n+                        ra_class_add_reg(compiler->reg_class_r5[threads],\n+                                         ACC_INDEX + 5);\n+                        ra_class_add_reg(compiler->reg_class_any[threads],\n+                                         ACC_INDEX + 5);\n+                }\n         }\n \n         ra_set_finalize(compiler->regs, NULL);\n@@ -1086,7 +1101,7 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n         }\n \n         /* All accumulators are invalidated across a thread switch. */\n-        if (inst->qpu.sig.thrsw) {\n+        if (inst->qpu.sig.thrsw && c->devinfo->has_accumulators) {\n                 for (int i = 0; i < c->num_temps; i++) {\n                         if (c->temp_start[i] < ip && c->temp_end[i] > ip) {\n                                 set_temp_class_bits(c, i,\n@@ -1157,7 +1172,8 @@ v3d_register_allocate(struct v3d_compile *c)\n                         uint32_t t = node_to_temp(c, i);\n                         c->nodes.info[i].priority =\n                                 c->temp_end[t] - c->temp_start[t];\n-                        c->nodes.info[i].class_bits = CLASS_BITS_ANY;\n+                        c->nodes.info[i].class_bits =\n+                                get_class_bit_any(c->devinfo);\n                 }\n         }\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0029-broadcom-compiler-implement-reads-writes-too-soon-ch.patch",
    "content": "From 0157228c729b8812dc4900fa24db63b7d27aa342 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Thu, 23 Sep 2021 11:19:58 +0200\nSubject: [PATCH 029/142] broadcom/compiler: implement \"reads/writes too soon\"\n checks for v71\n\n---\n src/broadcom/compiler/qpu_schedule.c | 65 ++++++++++++++++++++++------\n 1 file changed, 51 insertions(+), 14 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex 2fa9031d7b6..4db0c2e72da 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -562,7 +562,24 @@ mux_reads_too_soon(struct choose_scoreboard *scoreboard,\n }\n \n static bool\n-reads_too_soon_after_write(struct choose_scoreboard *scoreboard,\n+reads_too_soon(struct choose_scoreboard *scoreboard,\n+               const struct v3d_qpu_instr *inst, uint8_t raddr)\n+{\n+        switch (raddr) {\n+        case 0: /* ldvary delayed write of C coefficient to rf0 */\n+                if (scoreboard->tick - scoreboard->last_ldvary_tick <= 1)\n+                        return true;\n+                break;\n+        default:\n+                break;\n+        }\n+\n+        return false;\n+}\n+\n+static bool\n+reads_too_soon_after_write(const struct v3d_device_info *devinfo,\n+                           struct choose_scoreboard *scoreboard,\n                            struct qinst *qinst)\n {\n         const struct v3d_qpu_instr *inst = &qinst->qpu;\n@@ -574,24 +591,44 @@ reads_too_soon_after_write(struct choose_scoreboard *scoreboard,\n         assert(inst->type == V3D_QPU_INSTR_TYPE_ALU);\n \n         if (inst->alu.add.op != V3D_QPU_A_NOP) {\n-                if (v3d_qpu_add_op_num_src(inst->alu.add.op) > 0 &&\n-                    mux_reads_too_soon(scoreboard, inst, inst->alu.add.a.mux)) {\n-                        return true;\n+                if (v3d_qpu_add_op_num_src(inst->alu.add.op) > 0) {\n+                        if (devinfo->ver < 71) {\n+                                if (mux_reads_too_soon(scoreboard, inst, inst->alu.add.a.mux))\n+                                        return true;\n+                        } else {\n+                                if (reads_too_soon(scoreboard, inst, inst->alu.add.a.raddr))\n+                                        return true;\n+                        }\n                 }\n-                if (v3d_qpu_add_op_num_src(inst->alu.add.op) > 1 &&\n-                    mux_reads_too_soon(scoreboard, inst, inst->alu.add.b.mux)) {\n-                        return true;\n+                if (v3d_qpu_add_op_num_src(inst->alu.add.op) > 1) {\n+                        if (devinfo->ver < 71) {\n+                                if (mux_reads_too_soon(scoreboard, inst, inst->alu.add.b.mux))\n+                                        return true;\n+                        } else {\n+                                if (reads_too_soon(scoreboard, inst, inst->alu.add.b.raddr))\n+                                        return true;\n+                        }\n                 }\n         }\n \n         if (inst->alu.mul.op != V3D_QPU_M_NOP) {\n-                if (v3d_qpu_mul_op_num_src(inst->alu.mul.op) > 0 &&\n-                    mux_reads_too_soon(scoreboard, inst, inst->alu.mul.a.mux)) {\n-                        return true;\n+                if (v3d_qpu_mul_op_num_src(inst->alu.mul.op) > 0) {\n+                        if (devinfo->ver < 71) {\n+                                if (mux_reads_too_soon(scoreboard, inst, inst->alu.mul.a.mux))\n+                                        return true;\n+                        } else {\n+                                if (reads_too_soon(scoreboard, inst, inst->alu.mul.b.raddr))\n+                                        return true;\n+                        }\n                 }\n-                if (v3d_qpu_mul_op_num_src(inst->alu.mul.op) > 1 &&\n-                    mux_reads_too_soon(scoreboard, inst, inst->alu.mul.b.mux)) {\n-                        return true;\n+                if (v3d_qpu_mul_op_num_src(inst->alu.mul.op) > 1) {\n+                        if (devinfo->ver < 71) {\n+                                if (mux_reads_too_soon(scoreboard, inst, inst->alu.mul.b.mux))\n+                                        return true;\n+                        } else {\n+                                if (reads_too_soon(scoreboard, inst, inst->alu.mul.b.raddr))\n+                                        return true;\n+                        }\n                 }\n         }\n \n@@ -1147,7 +1184,7 @@ retry:\n                  *  regfile A or B that was written to by the previous\n                  *  instruction.\"\n                  */\n-                if (reads_too_soon_after_write(scoreboard, n->inst))\n+                if (reads_too_soon_after_write(c->devinfo, scoreboard, n->inst))\n                         continue;\n \n                 if (writes_too_soon_after_write(c->devinfo, scoreboard, n->inst))\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0030-broadcom-compiler-implement-read-stall-check-for-v71.patch",
    "content": "From 3fb3333bdf9699157cf0a2bd46ba4c25058bc5c1 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Thu, 23 Sep 2021 11:44:59 +0200\nSubject: [PATCH 030/142] broadcom/compiler: implement read stall check for v71\n\n---\n src/broadcom/compiler/qpu_schedule.c | 32 +++++++++++++++++-----------\n src/broadcom/qpu/qpu_instr.c         | 12 +++++++++++\n src/broadcom/qpu/qpu_instr.h         |  2 ++\n 3 files changed, 34 insertions(+), 12 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex 4db0c2e72da..b78abe003e9 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -679,29 +679,37 @@ pixel_scoreboard_too_soon(struct v3d_compile *c,\n }\n \n static bool\n-qpu_instruction_uses_rf(const struct v3d_qpu_instr *inst,\n+qpu_instruction_uses_rf(const struct v3d_device_info *devinfo,\n+                        const struct v3d_qpu_instr *inst,\n                         uint32_t waddr) {\n \n         if (inst->type != V3D_QPU_INSTR_TYPE_ALU)\n            return false;\n \n-        if (v3d_qpu_uses_mux(inst, V3D_QPU_MUX_A) &&\n-            inst->raddr_a == waddr)\n-              return true;\n+        if (devinfo->ver < 71) {\n+                if (v3d_qpu_uses_mux(inst, V3D_QPU_MUX_A) &&\n+                    inst->raddr_a == waddr)\n+                        return true;\n \n-        if (v3d_qpu_uses_mux(inst, V3D_QPU_MUX_B) &&\n-            !inst->sig.small_imm_b && (inst->raddr_b == waddr))\n-              return true;\n+                if (v3d_qpu_uses_mux(inst, V3D_QPU_MUX_B) &&\n+                    !inst->sig.small_imm_b && (inst->raddr_b == waddr))\n+                        return true;\n+        } else {\n+                /* FIXME: skip if small immediate */\n+                if (v3d71_qpu_reads_raddr(inst, waddr))\n+                        return true;\n+        }\n \n         return false;\n }\n \n static bool\n-mux_read_stalls(struct choose_scoreboard *scoreboard,\n-                const struct v3d_qpu_instr *inst)\n+read_stalls(const struct v3d_device_info *devinfo,\n+            struct choose_scoreboard *scoreboard,\n+            const struct v3d_qpu_instr *inst)\n {\n         return scoreboard->tick == scoreboard->last_stallable_sfu_tick + 1 &&\n-                qpu_instruction_uses_rf(inst,\n+                qpu_instruction_uses_rf(devinfo, inst,\n                                         scoreboard->last_stallable_sfu_reg);\n }\n \n@@ -1319,7 +1327,7 @@ retry:\n \n                 int prio = get_instruction_priority(c->devinfo, inst);\n \n-                if (mux_read_stalls(scoreboard, inst)) {\n+                if (read_stalls(c->devinfo, scoreboard, inst)) {\n                         /* Don't merge an instruction that stalls */\n                         if (prev_inst)\n                                 continue;\n@@ -2389,7 +2397,7 @@ schedule_instructions(struct v3d_compile *c,\n                                         }\n                                 }\n                         }\n-                        if (mux_read_stalls(scoreboard, inst))\n+                        if (read_stalls(c->devinfo, scoreboard, inst))\n                                 c->qpu_inst_stalled_count++;\n                 }\n \ndiff --git a/src/broadcom/qpu/qpu_instr.c b/src/broadcom/qpu/qpu_instr.c\nindex 7ec3c867260..e8bbb2141b0 100644\n--- a/src/broadcom/qpu/qpu_instr.c\n+++ b/src/broadcom/qpu/qpu_instr.c\n@@ -956,6 +956,18 @@ v3d_qpu_uses_mux(const struct v3d_qpu_instr *inst, enum v3d_qpu_mux mux)\n                 (mul_nsrc > 1 && inst->alu.mul.b.mux == mux));\n }\n \n+bool\n+v3d71_qpu_reads_raddr(const struct v3d_qpu_instr *inst, uint8_t raddr)\n+{\n+        int add_nsrc = v3d_qpu_add_op_num_src(inst->alu.add.op);\n+        int mul_nsrc = v3d_qpu_mul_op_num_src(inst->alu.mul.op);\n+\n+        return (add_nsrc > 0 && inst->alu.add.a.raddr == raddr) ||\n+               (add_nsrc > 1 && inst->alu.add.b.raddr == raddr) ||\n+               (mul_nsrc > 0 && inst->alu.mul.a.raddr == raddr) ||\n+               (mul_nsrc > 1 && inst->alu.mul.b.raddr == raddr);\n+}\n+\n bool\n v3d_qpu_sig_writes_address(const struct v3d_device_info *devinfo,\n                            const struct v3d_qpu_sig *sig)\ndiff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h\nindex a25be8e0ee6..9f7582ab06d 100644\n--- a/src/broadcom/qpu/qpu_instr.h\n+++ b/src/broadcom/qpu/qpu_instr.h\n@@ -494,4 +494,6 @@ bool v3d_qpu_unpacks_f32(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;\n bool v3d_qpu_unpacks_f16(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;\n \n bool v3d_qpu_is_nop(struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;\n+\n+bool v3d71_qpu_reads_raddr(const struct v3d_qpu_instr *inst, uint8_t raddr);\n #endif\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0031-broadcom-compiler-add-a-v3d71_qpu_writes_waddr_expli.patch",
    "content": "From cbe0a7a06a5fb9b3f28acba8c9cac362a6bc5324 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 6 Oct 2021 13:58:00 +0200\nSubject: [PATCH 031/142] broadcom/compiler: add a\n v3d71_qpu_writes_waddr_explicitly helper\n\n---\n src/broadcom/qpu/qpu_instr.c | 28 ++++++++++++++++++++++++++++\n src/broadcom/qpu/qpu_instr.h |  3 +++\n 2 files changed, 31 insertions(+)\n\ndiff --git a/src/broadcom/qpu/qpu_instr.c b/src/broadcom/qpu/qpu_instr.c\nindex e8bbb2141b0..feb6b343c1c 100644\n--- a/src/broadcom/qpu/qpu_instr.c\n+++ b/src/broadcom/qpu/qpu_instr.c\n@@ -968,6 +968,34 @@ v3d71_qpu_reads_raddr(const struct v3d_qpu_instr *inst, uint8_t raddr)\n                (mul_nsrc > 1 && inst->alu.mul.b.raddr == raddr);\n }\n \n+bool\n+v3d71_qpu_writes_waddr_explicitly(const struct v3d_device_info *devinfo,\n+                                  const struct v3d_qpu_instr *inst,\n+                                  uint8_t waddr)\n+{\n+        if (inst->type != V3D_QPU_INSTR_TYPE_ALU)\n+                return false;\n+\n+        if (v3d_qpu_add_op_has_dst(inst->alu.add.op) &&\n+            !inst->alu.add.magic_write &&\n+            inst->alu.add.waddr == waddr) {\n+                return true;\n+        }\n+\n+        if (v3d_qpu_mul_op_has_dst(inst->alu.mul.op) &&\n+            !inst->alu.mul.magic_write &&\n+            inst->alu.mul.waddr == waddr) {\n+                return true;\n+        }\n+\n+        if (v3d_qpu_sig_writes_address(devinfo, &inst->sig) &&\n+            !inst->sig_magic && inst->sig_addr == waddr) {\n+                return true;\n+        }\n+\n+        return false;\n+}\n+\n bool\n v3d_qpu_sig_writes_address(const struct v3d_device_info *devinfo,\n                            const struct v3d_qpu_sig *sig)\ndiff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h\nindex 9f7582ab06d..50a69ce8c3a 100644\n--- a/src/broadcom/qpu/qpu_instr.h\n+++ b/src/broadcom/qpu/qpu_instr.h\n@@ -496,4 +496,7 @@ bool v3d_qpu_unpacks_f16(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;\n bool v3d_qpu_is_nop(struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;\n \n bool v3d71_qpu_reads_raddr(const struct v3d_qpu_instr *inst, uint8_t raddr);\n+bool v3d71_qpu_writes_waddr_explicitly(const struct v3d_device_info *devinfo,\n+                                       const struct v3d_qpu_instr *inst,\n+                                       uint8_t waddr);\n #endif\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0032-broadcom-compiler-prevent-rf2-3-usage-in-thread-end-.patch",
    "content": "From 92e91a9b22ae61dc9f39880e8fdaa7714789efdb Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Mon, 27 Sep 2021 11:49:24 +0200\nSubject: [PATCH 032/142] broadcom/compiler: prevent rf2-3 usage in thread end\n delay slots for v71\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nSigned-off-by: Iago Toral Quiroga <itoral@igalia.com>\nSigned-off-by: Alejandro Piñeiro <apinheiro@igalia.com>\n---\n src/broadcom/compiler/qpu_schedule.c | 37 +++++++++++++++++++++-------\n 1 file changed, 28 insertions(+), 9 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex b78abe003e9..839c0c62315 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -1691,16 +1691,35 @@ qpu_inst_valid_in_thrend_slot(struct v3d_compile *c,\n                 if (c->devinfo->ver < 40 && inst->alu.add.op == V3D_QPU_A_SETMSF)\n                         return false;\n \n-                /* RF0-2 might be overwritten during the delay slots by\n-                 * fragment shader setup.\n-                 */\n-                if (inst->raddr_a < 3 && v3d_qpu_uses_mux(inst, V3D_QPU_MUX_A))\n-                        return false;\n+                if (c->devinfo->ver <= 42) {\n+                        /* RF0-2 might be overwritten during the delay slots by\n+                         * fragment shader setup.\n+                         */\n+                        if (inst->raddr_a < 3 && v3d_qpu_uses_mux(inst, V3D_QPU_MUX_A))\n+                                return false;\n \n-                if (inst->raddr_b < 3 &&\n-                    !inst->sig.small_imm_b &&\n-                    v3d_qpu_uses_mux(inst, V3D_QPU_MUX_B)) {\n-                        return false;\n+                        if (inst->raddr_b < 3 &&\n+                            !inst->sig.small_imm_b &&\n+                            v3d_qpu_uses_mux(inst, V3D_QPU_MUX_B)) {\n+                                return false;\n+                        }\n+                }\n+\n+                if (c->devinfo->ver >= 71) {\n+                        /* RF2-3 might be overwritten during the delay slots by\n+                         * fragment shader setup.\n+                         *\n+                         * FIXME: handle small immediate cases\n+                         */\n+                        if (v3d71_qpu_reads_raddr(inst, 2) ||\n+                            v3d71_qpu_reads_raddr(inst, 3)) {\n+                                return false;\n+                        }\n+\n+                        if (v3d71_qpu_writes_waddr_explicitly(c->devinfo, inst, 2) ||\n+                            v3d71_qpu_writes_waddr_explicitly(c->devinfo, inst, 3)) {\n+                                return false;\n+                        }\n                 }\n         }\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0033-broadcom-qpu-add-new-ADD-opcodes-for-FMOV-MOV-in-v71.patch",
    "content": "From 68a1545eb973e41608534ff05a9e84a86c046453 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Mon, 27 Sep 2021 13:26:04 +0200\nSubject: [PATCH 033/142] broadcom/qpu: add new ADD opcodes for FMOV/MOV in v71\n\n---\n src/broadcom/qpu/qpu_instr.c |  5 +++++\n src/broadcom/qpu/qpu_instr.h |  4 ++++\n src/broadcom/qpu/qpu_pack.c  | 15 +++++++++++++++\n 3 files changed, 24 insertions(+)\n\ndiff --git a/src/broadcom/qpu/qpu_instr.c b/src/broadcom/qpu/qpu_instr.c\nindex feb6b343c1c..195a0dcd232 100644\n--- a/src/broadcom/qpu/qpu_instr.c\n+++ b/src/broadcom/qpu/qpu_instr.c\n@@ -177,6 +177,8 @@ v3d_qpu_add_op_name(enum v3d_qpu_add_op op)\n                 [V3D_QPU_A_ITOF] = \"itof\",\n                 [V3D_QPU_A_CLZ] = \"clz\",\n                 [V3D_QPU_A_UTOF] = \"utof\",\n+                [V3D_QPU_A_MOV] = \"mov\",\n+                [V3D_QPU_A_FMOV] = \"fmov\",\n         };\n \n         if (op >= ARRAY_SIZE(op_names))\n@@ -458,6 +460,9 @@ static const uint8_t add_op_args[] = {\n         [V3D_QPU_A_ITOF] = D | A,\n         [V3D_QPU_A_CLZ] = D | A,\n         [V3D_QPU_A_UTOF] = D | A,\n+\n+        [V3D_QPU_A_MOV] = D | A,\n+        [V3D_QPU_A_FMOV] = D | A,\n };\n \n static const uint8_t mul_op_args[] = {\ndiff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h\nindex 50a69ce8c3a..c86a4119c54 100644\n--- a/src/broadcom/qpu/qpu_instr.h\n+++ b/src/broadcom/qpu/qpu_instr.h\n@@ -227,6 +227,10 @@ enum v3d_qpu_add_op {\n         V3D_QPU_A_ITOF,\n         V3D_QPU_A_CLZ,\n         V3D_QPU_A_UTOF,\n+\n+        /* V3D 7.x */\n+        V3D_QPU_A_FMOV,\n+        V3D_QPU_A_MOV,\n };\n \n enum v3d_qpu_mul_op {\ndiff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c\nindex 4045275cb9a..0e504e65fbf 100644\n--- a/src/broadcom/qpu/qpu_pack.c\n+++ b/src/broadcom/qpu/qpu_pack.c\n@@ -776,6 +776,21 @@ static const struct opcode_desc add_ops_v71[] = {\n \n         { 246, 246, .raddr_mask = OP_RANGE(32, 34), V3D_QPU_A_ITOF, 71 },\n         { 246, 246, .raddr_mask = OP_RANGE(36, 38), V3D_QPU_A_UTOF, 71 },\n+\n+        { 249, 249, .raddr_mask = OP_RANGE(0, 2),   V3D_QPU_A_FMOV, 71 },\n+        { 249, 249, .raddr_mask = OP_RANGE(4, 6),   V3D_QPU_A_FMOV, 71 },\n+        { 249, 249, .raddr_mask = OP_RANGE(8, 10),  V3D_QPU_A_FMOV, 71 },\n+        { 249, 249, .raddr_mask = OP_RANGE(12, 14), V3D_QPU_A_FMOV, 71 },\n+        { 249, 249, .raddr_mask = OP_RANGE(16, 18), V3D_QPU_A_FMOV, 71 },\n+        { 249, 249, .raddr_mask = OP_RANGE(20, 22), V3D_QPU_A_FMOV, 71 },\n+        { 249, 249, .raddr_mask = OP_RANGE(24, 26), V3D_QPU_A_FMOV, 71 },\n+\n+        { 249, 249, .raddr_mask = OP_MASK(3),  V3D_QPU_A_MOV, 71 },\n+        { 249, 249, .raddr_mask = OP_MASK(7),  V3D_QPU_A_MOV, 71 },\n+        { 249, 249, .raddr_mask = OP_MASK(11), V3D_QPU_A_MOV, 71 },\n+        { 249, 249, .raddr_mask = OP_MASK(15), V3D_QPU_A_MOV, 71 },\n+        { 249, 249, .raddr_mask = OP_MASK(19), V3D_QPU_A_MOV, 71 },\n+\n };\n \n static const struct opcode_desc mul_ops_v71[] = {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0034-broadcom-qpu-fix-packing-unpacking-of-fmov-variants-.patch",
    "content": "From 8dbbb7e22b694fdc62376d112b3dc6105d556c63 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Mon, 4 Oct 2021 13:07:35 +0200\nSubject: [PATCH 034/142] broadcom/qpu: fix packing/unpacking of fmov variants\n for v71\n\n---\n src/broadcom/qpu/qpu_pack.c | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)\n\ndiff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c\nindex 0e504e65fbf..0eb820b3f10 100644\n--- a/src/broadcom/qpu/qpu_pack.c\n+++ b/src/broadcom/qpu/qpu_pack.c\n@@ -1405,9 +1405,9 @@ v3d71_qpu_mul_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst\n                 break;\n \n         case V3D_QPU_M_FMOV:\n-                instr->alu.mul.output_pack = (raddr_d >> 2) & 1;\n+                instr->alu.mul.output_pack = raddr_d & 0x3;\n \n-                if (!v3d_qpu_float32_unpack_unpack(raddr_d & 0x3,\n+                if (!v3d_qpu_float32_unpack_unpack((raddr_d >> 2) & 0x7,\n                                                    &instr->alu.mul.a.unpack)) {\n                         return false;\n                 }\n@@ -2046,14 +2046,13 @@ v3d71_qpu_mul_pack(const struct v3d_device_info *devinfo,\n                                                &packed)) {\n                         return false;\n                 }\n-                opcode |= (packed >> 1) & 1;\n-                raddr_d = (packed & 1) << 2;\n+                raddr_d |= packed;\n \n                 if (!v3d_qpu_float32_unpack_pack(instr->alu.mul.a.unpack,\n                                                  &packed)) {\n                         return false;\n                 }\n-                raddr_d |= packed;\n+                raddr_d |= packed << 2;\n                 break;\n         }\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0035-broadcom-qpu-implement-switch-rules-for-fmin-fmax-fa.patch",
    "content": "From 63d0059ebef288afb0e2e746dadda8c2238bdfcb Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Tue, 28 Sep 2021 01:17:08 +0200\nSubject: [PATCH 035/142] broadcom/qpu: implement switch rules for fmin/fmax\n fadd/faddnf for v71\n\nThey use the same opcodes, and switch between one and the other based\non raddr.\n\nNote that the rule rule includes also if small_imm_a/b are used. That\nis still not in place so that part is hardcode. Would be updated later\nwhen small immediates support for v71 gets implemented.\n---\n src/broadcom/qpu/qpu_pack.c | 48 +++++++++++++++++++++++++++++++++++++\n 1 file changed, 48 insertions(+)\n\ndiff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c\nindex 0eb820b3f10..7a262f18ac3 100644\n--- a/src/broadcom/qpu/qpu_pack.c\n+++ b/src/broadcom/qpu/qpu_pack.c\n@@ -651,7 +651,9 @@ static const struct opcode_desc mul_ops_v33[] = {\n  * opcodes that changed on v71\n  */\n static const struct opcode_desc add_ops_v71[] = {\n+        /* FADD is FADDNF depending on the order of the raddr_a/raddr_b. */\n         { 0,   47,  .raddr_mask = ANYOPMASK, V3D_QPU_A_FADD },\n+        { 0,   47,  .raddr_mask = ANYOPMASK, V3D_QPU_A_FADDNF },\n         { 53,  55,  .raddr_mask = ANYOPMASK, V3D_QPU_A_VFPACK },\n         { 56,  56,  .raddr_mask = ANYOPMASK, V3D_QPU_A_ADD },\n         { 57,  59,  .raddr_mask = ANYOPMASK, V3D_QPU_A_VFPACK },\n@@ -666,6 +668,10 @@ static const struct opcode_desc add_ops_v71[] = {\n         { 125, 125, .raddr_mask = ANYOPMASK, V3D_QPU_A_SHR },\n         { 126, 126, .raddr_mask = ANYOPMASK, V3D_QPU_A_ASR },\n         { 127, 127, .raddr_mask = ANYOPMASK, V3D_QPU_A_ROR },\n+        /* FMIN is instead FMAX depending on the raddr_a/b order. */\n+        { 128, 175, .raddr_mask = ANYOPMASK, V3D_QPU_A_FMIN },\n+        { 128, 175, .raddr_mask = ANYOPMASK, V3D_QPU_A_FMAX },\n+        { 176, 180, .raddr_mask = ANYOPMASK, V3D_QPU_A_VFMIN },\n \n         { 181, 181, .raddr_mask = ANYOPMASK, V3D_QPU_A_AND },\n         { 182, 182, .raddr_mask = ANYOPMASK, V3D_QPU_A_OR },\n@@ -1162,6 +1168,22 @@ v3d71_qpu_add_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst\n \n         instr->alu.add.op = desc->op;\n \n+        /* FADD/FADDNF and FMIN/FMAX are determined by the orders of the\n+         * operands.\n+         */\n+        /* FIXME: for now hardcoded values, until we got the small_imm support\n+         * in place\n+         */\n+        uint32_t small_imm_a = 0;\n+        uint32_t small_imm_b = 0;\n+        if (small_imm_a * 256 + ((op >> 2) & 3) * 64 + raddr_a >\n+            small_imm_b *256 + (op & 3) * 64 + raddr_b) {\n+                if (instr->alu.add.op == V3D_QPU_A_FMIN)\n+                        instr->alu.add.op = V3D_QPU_A_FMAX;\n+                if (instr->alu.add.op == V3D_QPU_A_FADD)\n+                        instr->alu.add.op = V3D_QPU_A_FADDNF;\n+        }\n+\n         /* Some QPU ops require a bit more than just basic opcode and mux a/b\n          * comparisons to distinguish them.\n          */\n@@ -1754,6 +1776,11 @@ v3d71_qpu_add_pack(const struct v3d_device_info *devinfo,\n                 uint32_t output_pack;\n                 uint32_t a_unpack;\n                 uint32_t b_unpack;\n+                /* FIXME: for now hardcoded values, until we got the small_imm\n+                 * support in place\n+                 */\n+                uint32_t small_imm_a = 0;\n+                uint32_t small_imm_b = 0;\n \n                 if (instr->alu.add.op != V3D_QPU_A_FCMP) {\n                         if (!v3d_qpu_float32_pack_pack(instr->alu.add.output_pack,\n@@ -1773,6 +1800,27 @@ v3d71_qpu_add_pack(const struct v3d_device_info *devinfo,\n                         return false;\n                 }\n \n+                /* These operations with commutative operands are\n+                 * distinguished by which order their operands come in.\n+                 */\n+                bool ordering =\n+                        small_imm_a * 256 + a_unpack * 64 + raddr_a >\n+                        small_imm_b * 256 + b_unpack * 64 + raddr_b;\n+                if (((instr->alu.add.op == V3D_QPU_A_FMIN ||\n+                      instr->alu.add.op == V3D_QPU_A_FADD) && ordering) ||\n+                    ((instr->alu.add.op == V3D_QPU_A_FMAX ||\n+                      instr->alu.add.op == V3D_QPU_A_FADDNF) && !ordering)) {\n+                        uint32_t temp;\n+\n+                        temp = a_unpack;\n+                        a_unpack = b_unpack;\n+                        b_unpack = temp;\n+\n+                        temp = raddr_a;\n+                        raddr_a = raddr_b;\n+                        raddr_b = temp;\n+                }\n+\n                 opcode |= a_unpack << 2;\n                 opcode |= b_unpack << 0;\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0036-broadcom-compiler-make-vir_write_rX-return-false-on-.patch",
    "content": "From c9f6faa3ddc91024b3d9dc67ce2221187daac128 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 29 Sep 2021 11:54:18 +0200\nSubject: [PATCH 036/142] broadcom/compiler: make vir_write_rX return false on\n platforms without accums\n\n---\n src/broadcom/compiler/vir.c | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c\nindex 007cb0a941b..d75cd777b6d 100644\n--- a/src/broadcom/compiler/vir.c\n+++ b/src/broadcom/compiler/vir.c\n@@ -158,6 +158,9 @@ vir_is_tex(const struct v3d_device_info *devinfo, struct qinst *inst)\n bool\n vir_writes_r3(const struct v3d_device_info *devinfo, struct qinst *inst)\n {\n+        if (!devinfo->has_accumulators)\n+                return false;\n+\n         for (int i = 0; i < vir_get_nsrc(inst); i++) {\n                 switch (inst->src[i].file) {\n                 case QFILE_VPM:\n@@ -180,6 +183,9 @@ vir_writes_r3(const struct v3d_device_info *devinfo, struct qinst *inst)\n bool\n vir_writes_r4(const struct v3d_device_info *devinfo, struct qinst *inst)\n {\n+        if (!devinfo->has_accumulators)\n+                return false;\n+\n         switch (inst->dst.file) {\n         case QFILE_MAGIC:\n                 switch (inst->dst.index) {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0037-broadcom-compiler-rename-vir_writes_rX-to-vir_writes.patch",
    "content": "From 3d16229743e26b58735ed049ee982073f6034342 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 29 Sep 2021 12:03:50 +0200\nSubject: [PATCH 037/142] broadcom/compiler: rename vir_writes_rX to\n vir_writes_rX_implicitly\n\nSince that represents more accurately what they check..\n---\n src/broadcom/compiler/v3d_compiler.h          | 4 ++--\n src/broadcom/compiler/vir.c                   | 6 ++++--\n src/broadcom/compiler/vir_register_allocate.c | 4 ++--\n 3 files changed, 8 insertions(+), 6 deletions(-)\n\ndiff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h\nindex eb4e692464b..7e8f3bfc1a7 100644\n--- a/src/broadcom/compiler/v3d_compiler.h\n+++ b/src/broadcom/compiler/v3d_compiler.h\n@@ -1149,8 +1149,8 @@ bool vir_is_raw_mov(struct qinst *inst);\n bool vir_is_tex(const struct v3d_device_info *devinfo, struct qinst *inst);\n bool vir_is_add(struct qinst *inst);\n bool vir_is_mul(struct qinst *inst);\n-bool vir_writes_r3(const struct v3d_device_info *devinfo, struct qinst *inst);\n-bool vir_writes_r4(const struct v3d_device_info *devinfo, struct qinst *inst);\n+bool vir_writes_r3_implicitly(const struct v3d_device_info *devinfo, struct qinst *inst);\n+bool vir_writes_r4_implicitly(const struct v3d_device_info *devinfo, struct qinst *inst);\n struct qreg vir_follow_movs(struct v3d_compile *c, struct qreg reg);\n uint8_t vir_channels_written(struct qinst *inst);\n struct qreg ntq_get_src(struct v3d_compile *c, nir_src src, int i);\ndiff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c\nindex d75cd777b6d..aea113f050e 100644\n--- a/src/broadcom/compiler/vir.c\n+++ b/src/broadcom/compiler/vir.c\n@@ -156,7 +156,8 @@ vir_is_tex(const struct v3d_device_info *devinfo, struct qinst *inst)\n }\n \n bool\n-vir_writes_r3(const struct v3d_device_info *devinfo, struct qinst *inst)\n+vir_writes_r3_implicitly(const struct v3d_device_info *devinfo,\n+                         struct qinst *inst)\n {\n         if (!devinfo->has_accumulators)\n                 return false;\n@@ -181,7 +182,8 @@ vir_writes_r3(const struct v3d_device_info *devinfo, struct qinst *inst)\n }\n \n bool\n-vir_writes_r4(const struct v3d_device_info *devinfo, struct qinst *inst)\n+vir_writes_r4_implicitly(const struct v3d_device_info *devinfo,\n+                         struct qinst *inst)\n {\n         if (!devinfo->has_accumulators)\n                 return false;\ndiff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c\nindex 7b3f6c41934..f2df35cd458 100644\n--- a/src/broadcom/compiler/vir_register_allocate.c\n+++ b/src/broadcom/compiler/vir_register_allocate.c\n@@ -988,7 +988,7 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n          * result to a temp), nothing else can be stored in r3/r4 across\n          * it.\n          */\n-        if (vir_writes_r3(c->devinfo, inst)) {\n+        if (vir_writes_r3_implicitly(c->devinfo, inst)) {\n                 for (int i = 0; i < c->num_temps; i++) {\n                         if (c->temp_start[i] < ip && c->temp_end[i] > ip) {\n                                 ra_add_node_interference(c->g,\n@@ -998,7 +998,7 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n                 }\n         }\n \n-        if (vir_writes_r4(c->devinfo, inst)) {\n+        if (vir_writes_r4_implicitly(c->devinfo, inst)) {\n                 for (int i = 0; i < c->num_temps; i++) {\n                         if (c->temp_start[i] < ip && c->temp_end[i] > ip) {\n                                 ra_add_node_interference(c->g,\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0038-broadcom-compiler-only-handle-accumulator-classes-if.patch",
    "content": "From 83fae160491737e8568b8fb5eaa5be4d2c8bf3c8 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 29 Sep 2021 12:10:31 +0200\nSubject: [PATCH 038/142] broadcom/compiler: only handle accumulator classes if\n present\n\n---\n src/broadcom/compiler/vir_register_allocate.c | 77 ++++++++++++-------\n 1 file changed, 49 insertions(+), 28 deletions(-)\n\ndiff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c\nindex f2df35cd458..e78ccb7c6aa 100644\n--- a/src/broadcom/compiler/vir_register_allocate.c\n+++ b/src/broadcom/compiler/vir_register_allocate.c\n@@ -53,6 +53,17 @@ get_class_bit_any(const struct v3d_device_info *devinfo)\n         else\n                 return CLASS_BITS_PHYS;\n }\n+\n+static uint8_t\n+filter_class_bits(const struct v3d_device_info *devinfo, uint8_t class_bits)\n+{\n+   if (!devinfo->has_accumulators) {\n+      assert(class_bits & CLASS_BITS_PHYS);\n+      class_bits = CLASS_BITS_PHYS;\n+   }\n+   return class_bits;\n+}\n+\n static inline uint32_t\n temp_to_node(struct v3d_compile *c, uint32_t temp)\n {\n@@ -413,8 +424,10 @@ v3d_setup_spill_base(struct v3d_compile *c)\n                  */\n                 if (c->spilling) {\n                         int temp_class = CLASS_BITS_PHYS;\n-                        if (i != c->spill_base.index)\n+                        if (c->devinfo->has_accumulators &&\n+                            i != c->spill_base.index) {\n                                 temp_class |= CLASS_BITS_ACC;\n+                        }\n                         add_node(c, i, temp_class);\n                 }\n         }\n@@ -473,14 +486,16 @@ v3d_emit_spill_tmua(struct v3d_compile *c,\n          * temp will be used immediately so just like the uniform above we\n          * can allow accumulators.\n          */\n+        int temp_class =\n+                filter_class_bits(c->devinfo, CLASS_BITS_PHYS | CLASS_BITS_ACC);\n         if (!fill_dst) {\n                 struct qreg dst = vir_TMUWT(c);\n                 assert(dst.file == QFILE_TEMP);\n-                add_node(c, dst.index, CLASS_BITS_PHYS | CLASS_BITS_ACC);\n+                add_node(c, dst.index, temp_class);\n         } else {\n                 *fill_dst = vir_LDTMU(c);\n                 assert(fill_dst->file == QFILE_TEMP);\n-                add_node(c, fill_dst->index, CLASS_BITS_PHYS | CLASS_BITS_ACC);\n+                add_node(c, fill_dst->index, temp_class);\n         }\n \n         /* Temps across the thread switch we injected can't be assigned to\n@@ -662,8 +677,10 @@ v3d_spill_reg(struct v3d_compile *c, int *acc_nodes, int spill_temp)\n                                          * instruction immediately after so we\n                                          * can use ACC.\n                                          */\n-                                        add_node(c, temp.index, CLASS_BITS_PHYS |\n-                                                                CLASS_BITS_ACC);\n+                                        int temp_class =\n+                                                filter_class_bits(c->devinfo, CLASS_BITS_PHYS |\n+                                                                              CLASS_BITS_ACC);\n+                                        add_node(c, temp.index, temp_class);\n                                 } else {\n                                         /* If we have a postponed spill, we\n                                          * don't need a fill as the temp would\n@@ -941,6 +958,7 @@ vir_init_reg_sets(struct v3d_compiler *compiler)\n                 compiler->reg_class_phys[threads] =\n                         ra_alloc_contig_reg_class(compiler->regs, 1);\n \n+                /* Init physical regs */\n                 for (int i = phys_index;\n                      i < phys_index + (PHYS_COUNT >> threads); i++) {\n                         if (compiler->devinfo->has_accumulators)\n@@ -949,16 +967,15 @@ vir_init_reg_sets(struct v3d_compiler *compiler)\n                         ra_class_add_reg(compiler->reg_class_any[threads], i);\n                 }\n \n+                /* Init accumulator regs */\n                 if (compiler->devinfo->has_accumulators) {\n                         for (int i = ACC_INDEX + 0; i < ACC_INDEX + ACC_COUNT - 1; i++) {\n                                 ra_class_add_reg(compiler->reg_class_phys_or_acc[threads], i);\n                                 ra_class_add_reg(compiler->reg_class_any[threads], i);\n                         }\n-                }\n-                /* r5 can only store a single 32-bit value, so not much can\n-                 * use it.\n-                 */\n-                if (compiler->devinfo->has_accumulators) {\n+                        /* r5 can only store a single 32-bit value, so not much can\n+                         * use it.\n+                         */\n                         ra_class_add_reg(compiler->reg_class_r5[threads],\n                                          ACC_INDEX + 5);\n                         ra_class_add_reg(compiler->reg_class_any[threads],\n@@ -1081,21 +1098,23 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n                  * because ldunif has usually a shorter lifespan, allowing for\n                  * more accumulator reuse and QPU merges.\n                  */\n-                if (!inst->qpu.sig.ldunif) {\n-                        uint8_t class_bits =\n-                                get_temp_class_bits(c, inst->dst.index) &\n-                                ~CLASS_BITS_R5;\n-                        set_temp_class_bits(c, inst->dst.index,\n-                                            class_bits);\n-\n-                } else {\n-                        /* Until V3D 4.x, we could only load a uniform\n-                         * to r5, so we'll need to spill if uniform\n-                         * loads interfere with each other.\n-                         */\n-                        if (c->devinfo->ver < 40) {\n+                if (c->devinfo->has_accumulators) {\n+                        if (!inst->qpu.sig.ldunif) {\n+                                uint8_t class_bits =\n+                                        get_temp_class_bits(c, inst->dst.index) &\n+                                        ~CLASS_BITS_R5;\n                                 set_temp_class_bits(c, inst->dst.index,\n-                                                    CLASS_BITS_R5);\n+                                                    class_bits);\n+\n+                        } else {\n+                                /* Until V3D 4.x, we could only load a uniform\n+                                 * to r5, so we'll need to spill if uniform\n+                                 * loads interfere with each other.\n+                                 */\n+                                if (c->devinfo->ver < 40) {\n+                                        set_temp_class_bits(c, inst->dst.index,\n+                                                            CLASS_BITS_R5);\n+                                }\n                         }\n                 }\n         }\n@@ -1152,8 +1171,10 @@ v3d_register_allocate(struct v3d_compile *c)\n                         c->thread_index--;\n         }\n \n-        c->g = ra_alloc_interference_graph(c->compiler->regs,\n-                                           c->num_temps + ARRAY_SIZE(acc_nodes));\n+        unsigned num_ra_nodes = c->num_temps;\n+        if (c->devinfo->has_accumulators)\n+                num_ra_nodes += ARRAY_SIZE(acc_nodes);\n+        c->g = ra_alloc_interference_graph(c->compiler->regs, num_ra_nodes);\n         ra_set_select_reg_callback(c->g, v3d_ra_select_callback, &callback_data);\n \n         /* Make some fixed nodes for the accumulators, which we will need to\n@@ -1162,8 +1183,8 @@ v3d_register_allocate(struct v3d_compile *c)\n          * live in, but the classes take up a lot of memory to set up, so we\n          * don't want to make too many.\n          */\n-        for (uint32_t i = 0; i < ACC_COUNT + c->num_temps; i++) {\n-                if (i < ACC_COUNT) {\n+        for (uint32_t i = 0; i < num_ra_nodes; i++) {\n+                if (c->devinfo->has_accumulators && i < ACC_COUNT) {\n                         acc_nodes[i] = i;\n                         ra_set_node_reg(c->g, acc_nodes[i], ACC_INDEX + i);\n                         c->nodes.info[i].priority = 0;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0039-broadcom-compiler-don-t-assign-rf0-to-temps-across-i.patch",
    "content": "From fd77cc3204e7c69927f97ce2a1d55d2a47d77a27 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 29 Sep 2021 12:14:04 +0200\nSubject: [PATCH 039/142] broadcom/compiler: don't assign rf0 to temps across\n implicit rf0 writes\n\nIn platforms that don't have accumulators and have implicit writes to\nthe register file we need to be careful and avoid assigning a physical\nregister to a temp that lives across an implicit write to that same\nphysical register.\n\nFor now, we have the case of implicit writes to rf0 from various\nsignals, but it should be easy to extend this to include additional\nregisters if needed.\n---\n src/broadcom/compiler/vir_register_allocate.c | 69 +++++++++++++++----\n 1 file changed, 57 insertions(+), 12 deletions(-)\n\ndiff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c\nindex e78ccb7c6aa..e0adc1de7a4 100644\n--- a/src/broadcom/compiler/vir_register_allocate.c\n+++ b/src/broadcom/compiler/vir_register_allocate.c\n@@ -29,6 +29,9 @@\n #define ACC_INDEX     0\n #define ACC_COUNT     6\n \n+/* RA nodes used to track RF registers with implicit writes */\n+#define IMPLICIT_RF_COUNT 1\n+\n #define PHYS_COUNT 64\n \n static uint8_t\n@@ -67,15 +70,17 @@ filter_class_bits(const struct v3d_device_info *devinfo, uint8_t class_bits)\n static inline uint32_t\n temp_to_node(struct v3d_compile *c, uint32_t temp)\n {\n-        return temp + (c->devinfo->has_accumulators ? ACC_COUNT : 0);\n+        return temp + (c->devinfo->has_accumulators ? ACC_COUNT :\n+                                                      IMPLICIT_RF_COUNT);\n }\n \n static inline uint32_t\n node_to_temp(struct v3d_compile *c, uint32_t node)\n {\n         assert((c->devinfo->has_accumulators && node >= ACC_COUNT) ||\n-               (!c->devinfo->has_accumulators && node >= 0));\n-        return node - (c->devinfo->has_accumulators ? ACC_COUNT : 0);\n+               (!c->devinfo->has_accumulators && node >= IMPLICIT_RF_COUNT));\n+        return node - (c->devinfo->has_accumulators ? ACC_COUNT :\n+                                                      IMPLICIT_RF_COUNT);\n }\n \n static inline uint8_t\n@@ -360,7 +365,8 @@ ensure_nodes(struct v3d_compile *c)\n         c->nodes.info = reralloc_array_size(c,\n                                             c->nodes.info,\n                                             sizeof(c->nodes.info[0]),\n-                                            c->nodes.alloc_count + ACC_COUNT);\n+                                            c->nodes.alloc_count +\n+                                            MAX2(ACC_COUNT, IMPLICIT_RF_COUNT));\n }\n \n /* Creates the interference node for a new temp. We use this to keep the node\n@@ -372,7 +378,8 @@ add_node(struct v3d_compile *c, uint32_t temp, uint8_t class_bits)\n         ensure_nodes(c);\n \n         int node = ra_add_node(c->g, choose_reg_class(c, class_bits));\n-        assert(node == temp + ACC_COUNT);\n+        assert(c->devinfo->has_accumulators ? node == temp + ACC_COUNT :\n+                                              node == temp + IMPLICIT_RF_COUNT);\n \n         /* We fill the node priority after we are done inserting spills */\n         c->nodes.info[node].class_bits = class_bits;\n@@ -995,7 +1002,9 @@ tmu_spilling_allowed(struct v3d_compile *c)\n }\n \n static void\n-update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n+update_graph_and_reg_classes_for_inst(struct v3d_compile *c,\n+                                      int *acc_nodes,\n+                                      int *implicit_rf_nodes,\n                                       struct qinst *inst)\n {\n         int32_t ip = inst->ip;\n@@ -1025,6 +1034,19 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n                 }\n         }\n \n+        /* If any instruction writes to a physical register implicitly\n+         * nothing else can write the same register across it.\n+         */\n+        if (v3d_qpu_writes_rf0_implicitly(c->devinfo, &inst->qpu)) {\n+                for (int i = 0; i < c->num_temps; i++) {\n+                        if (c->temp_start[i] < ip && c->temp_end[i] > ip) {\n+                                ra_add_node_interference(c->g,\n+                                                         temp_to_node(c, i),\n+                                                         implicit_rf_nodes[0]);\n+                        }\n+                }\n+        }\n+\n         if (inst->qpu.type == V3D_QPU_INSTR_TYPE_ALU) {\n                 switch (inst->qpu.alu.add.op) {\n                 case V3D_QPU_A_LDVPMV_IN:\n@@ -1116,6 +1138,16 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes,\n                                                             CLASS_BITS_R5);\n                                 }\n                         }\n+                } else {\n+                        /* If the instruction has an implicit write\n+                         * we can't allocate its dest to the same\n+                         * register.\n+                         */\n+                        if (v3d_qpu_writes_rf0_implicitly(c->devinfo, &inst->qpu)) {\n+                                ra_add_node_interference(c->g,\n+                                                         temp_to_node(c, inst->dst.index),\n+                                                         implicit_rf_nodes[0]);\n+                        }\n                 }\n         }\n \n@@ -1139,10 +1171,18 @@ struct qpu_reg *\n v3d_register_allocate(struct v3d_compile *c)\n {\n         int acc_nodes[ACC_COUNT];\n+        int implicit_rf_nodes[IMPLICIT_RF_COUNT];\n+\n+        unsigned num_ra_nodes = c->num_temps;\n+        if (c->devinfo->has_accumulators)\n+                num_ra_nodes += ARRAY_SIZE(acc_nodes);\n+        else\n+                num_ra_nodes += ARRAY_SIZE(implicit_rf_nodes);\n+\n         c->nodes = (struct v3d_ra_node_info) {\n                 .alloc_count = c->num_temps,\n                 .info = ralloc_array_size(c, sizeof(c->nodes.info[0]),\n-                                          c->num_temps + ACC_COUNT),\n+                                          num_ra_nodes),\n         };\n \n         uint32_t phys_index = get_phys_index(c->devinfo);\n@@ -1171,9 +1211,6 @@ v3d_register_allocate(struct v3d_compile *c)\n                         c->thread_index--;\n         }\n \n-        unsigned num_ra_nodes = c->num_temps;\n-        if (c->devinfo->has_accumulators)\n-                num_ra_nodes += ARRAY_SIZE(acc_nodes);\n         c->g = ra_alloc_interference_graph(c->compiler->regs, num_ra_nodes);\n         ra_set_select_reg_callback(c->g, v3d_ra_select_callback, &callback_data);\n \n@@ -1181,7 +1218,8 @@ v3d_register_allocate(struct v3d_compile *c)\n          * interfere with when ops have implied r3/r4 writes or for the thread\n          * switches.  We could represent these as classes for the nodes to\n          * live in, but the classes take up a lot of memory to set up, so we\n-         * don't want to make too many.\n+         * don't want to make too many. We use the same mechanism on platforms\n+         * without accumulators that can have implicit writes to phys regs.\n          */\n         for (uint32_t i = 0; i < num_ra_nodes; i++) {\n                 if (c->devinfo->has_accumulators && i < ACC_COUNT) {\n@@ -1189,6 +1227,12 @@ v3d_register_allocate(struct v3d_compile *c)\n                         ra_set_node_reg(c->g, acc_nodes[i], ACC_INDEX + i);\n                         c->nodes.info[i].priority = 0;\n                         c->nodes.info[i].class_bits = 0;\n+                } else if (!c->devinfo->has_accumulators &&\n+                           i < ARRAY_SIZE(implicit_rf_nodes)) {\n+                        implicit_rf_nodes[i] = i;\n+                        ra_set_node_reg(c->g, implicit_rf_nodes[i], phys_index + i);\n+                        c->nodes.info[i].priority = 0;\n+                        c->nodes.info[i].class_bits = 0;\n                 } else {\n                         uint32_t t = node_to_temp(c, i);\n                         c->nodes.info[i].priority =\n@@ -1204,7 +1248,8 @@ v3d_register_allocate(struct v3d_compile *c)\n         int ip = 0;\n         vir_for_each_inst_inorder(inst, c) {\n                 inst->ip = ip++;\n-                update_graph_and_reg_classes_for_inst(c, acc_nodes, inst);\n+                update_graph_and_reg_classes_for_inst(c, acc_nodes,\n+                                                      implicit_rf_nodes, inst);\n         }\n \n         /* Set the register classes for all our temporaries in the graph */\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0040-broadcom-compiler-CS-payload-registers-have-changed-.patch",
    "content": "From 9a08ae9f354a6da6d9d71b87800aca8b3df49e29 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 28 Sep 2021 13:37:28 +0200\nSubject: [PATCH 040/142] broadcom/compiler: CS payload registers have changed\n in v71\n\n---\n src/broadcom/compiler/nir_to_vir.c | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c\nindex 1a05b279a2d..220ff6bcd49 100644\n--- a/src/broadcom/compiler/nir_to_vir.c\n+++ b/src/broadcom/compiler/nir_to_vir.c\n@@ -4362,8 +4362,13 @@ nir_to_vir(struct v3d_compile *c)\n                                                       V3D_QPU_WADDR_SYNC));\n                 }\n \n-                c->cs_payload[0] = vir_MOV(c, vir_reg(QFILE_REG, 0));\n-                c->cs_payload[1] = vir_MOV(c, vir_reg(QFILE_REG, 2));\n+                if (c->devinfo->ver <= 42) {\n+                        c->cs_payload[0] = vir_MOV(c, vir_reg(QFILE_REG, 0));\n+                        c->cs_payload[1] = vir_MOV(c, vir_reg(QFILE_REG, 2));\n+                } else if (c->devinfo->ver >= 71) {\n+                        c->cs_payload[0] = vir_MOV(c, vir_reg(QFILE_REG, 3));\n+                        c->cs_payload[1] = vir_MOV(c, vir_reg(QFILE_REG, 2));\n+                }\n \n                 /* Set up the division between gl_LocalInvocationIndex and\n                  * wg_in_mem in the payload reg.\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0041-broadcom-compiler-don-t-schedule-rf0-writes-right-af.patch",
    "content": "From 5477884196cb54a71f54fa6cad42c6d3326bde88 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Fri, 22 Oct 2021 13:39:48 +0200\nSubject: [PATCH 041/142] broadcom/compiler: don't schedule rf0 writes right\n after ldvary\n\nldvary writes rf0 implicitly on the next cycle so they would clash.\nThis case is not handled correctly by our normal dependency tracking,\nwhich doesn't know anything about delayed writes from instructions\nand thinks the rf0 write happens on the same cycle ldvary is emitted.\n\nFixes (v71):\ndEQP-VK.glsl.conversions.matrix_to_matrix.mat2x3_to_mat4x2_fragment\n---\n src/broadcom/compiler/qpu_schedule.c | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex 839c0c62315..870823fd2b1 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -652,6 +652,21 @@ writes_too_soon_after_write(const struct v3d_device_info *devinfo,\n             v3d_qpu_writes_r4(devinfo, inst))\n                 return true;\n \n+        if (devinfo->ver <= 42)\n+           return false;\n+\n+        /* Don't schedule anything that writes rf0 right after ldvary, since\n+         * that would clash with the ldvary's delayed rf0 write (the exception\n+         * is another ldvary, since its implicit rf0 write would also have\n+         * one cycle of delay and would not clash).\n+         */\n+        if (scoreboard->last_ldvary_tick + 1 == scoreboard->tick &&\n+            (v3d71_qpu_writes_waddr_explicitly(devinfo, inst, 0) ||\n+             (v3d_qpu_writes_rf0_implicitly(devinfo, inst) &&\n+              !inst->sig.ldvary))) {\n+            return true;\n+       }\n+\n         return false;\n }\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0042-broadcom-compiler-allow-instruction-merges-in-v71.patch",
    "content": "From 31623712c2f741d393767641f32d56c35150eda5 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Thu, 30 Sep 2021 13:22:48 +0200\nSubject: [PATCH 042/142] broadcom/compiler: allow instruction merges in v71\n\nIn v3d 4.x there were restrictions based on the number of raddrs used\nby the combined instructions, but we don't have these restrictions in\nv3d 7.x.\n\nIt should be noted that while there are no restrictions on the number\nof raddrs addressed, a QPU instruction can only address a single small\nimmediate, so we should be careful about that when we add support for\nsmall immediates.\n---\n src/broadcom/compiler/qpu_schedule.c | 21 +++++++++++++++++----\n 1 file changed, 17 insertions(+), 4 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex 870823fd2b1..ff544fb3c1c 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -906,8 +906,11 @@ qpu_raddrs_used(const struct v3d_qpu_instr *a,\n static bool\n qpu_merge_raddrs(struct v3d_qpu_instr *result,\n                  const struct v3d_qpu_instr *add_instr,\n-                 const struct v3d_qpu_instr *mul_instr)\n+                 const struct v3d_qpu_instr *mul_instr,\n+                 const struct v3d_device_info *devinfo)\n {\n+        assert(devinfo->ver <= 42);\n+\n         uint64_t raddrs_used = qpu_raddrs_used(add_instr, mul_instr);\n         int naddrs = util_bitcount64(raddrs_used);\n \n@@ -1111,9 +1114,19 @@ qpu_merge_inst(const struct v3d_device_info *devinfo,\n                 add_instr = a;\n         }\n \n-        if (add_instr && mul_instr &&\n-            !qpu_merge_raddrs(&merge, add_instr, mul_instr)) {\n-                        return false;\n+        /* V3D 4.x and earlier use muxes to select the inputs for the ALUs and\n+         * they have restrictions on the number of raddrs that can be adressed\n+         * in a single instruction.\n+         *\n+         * FIXME: for V3D 7.x we can't merge instructions if they address more\n+         * than one small immediate. For now, we don't support small immediates,\n+         * so it is not a problem.\n+         */\n+        if (devinfo->ver <= 42) {\n+                if (add_instr && mul_instr &&\n+                    !qpu_merge_raddrs(&merge, add_instr, mul_instr, devinfo)) {\n+                                return false;\n+                }\n         }\n \n         merge.sig.thrsw |= b->sig.thrsw;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0043-broadcom-qpu-add-MOV-integer-packing-unpacking-varia.patch",
    "content": "From 959a0128654c94d84fda53ffc108971d3b3a817a Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 6 Oct 2021 09:27:43 +0200\nSubject: [PATCH 043/142] broadcom/qpu: add MOV integer packing/unpacking\n variants\n\nThese are new in v71 and cover MOV on both the ADD and the MUL alus.\n---\n src/broadcom/qpu/qpu_instr.h |  9 ++++\n src/broadcom/qpu/qpu_pack.c  | 98 ++++++++++++++++++++++++++++++++++++\n 2 files changed, 107 insertions(+)\n\ndiff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h\nindex c86a4119c54..4b34d17bd4c 100644\n--- a/src/broadcom/qpu/qpu_instr.h\n+++ b/src/broadcom/qpu/qpu_instr.h\n@@ -285,6 +285,15 @@ enum v3d_qpu_input_unpack {\n \n         /** Swap high and low 16 bits */\n         V3D_QPU_UNPACK_SWAP_16,\n+\n+        /** Convert low 16 bits from 16-bit integer to unsigned 32-bit int */\n+        V3D_QPU_UNPACK_UL,\n+        /** Convert high 16 bits from 16-bit integer to unsigned 32-bit int */\n+        V3D_QPU_UNPACK_UH,\n+        /** Convert low 16 bits from 16-bit integer to signed 32-bit int */\n+        V3D_QPU_UNPACK_IL,\n+        /** Convert high 16 bits from 16-bit integer to signed 32-bit int */\n+        V3D_QPU_UNPACK_IH,\n };\n \n enum v3d_qpu_mux {\ndiff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c\nindex 7a262f18ac3..4d677894755 100644\n--- a/src/broadcom/qpu/qpu_pack.c\n+++ b/src/broadcom/qpu/qpu_pack.c\n@@ -922,6 +922,56 @@ v3d_qpu_float32_unpack_pack(enum v3d_qpu_input_unpack unpacked,\n         }\n }\n \n+static bool\n+v3d_qpu_int32_unpack_unpack(uint32_t packed,\n+                            enum v3d_qpu_input_unpack *unpacked)\n+{\n+        switch (packed) {\n+        case 0:\n+                *unpacked = V3D_QPU_UNPACK_NONE;\n+                return true;\n+        case 1:\n+                *unpacked = V3D_QPU_UNPACK_UL;\n+                return true;\n+        case 2:\n+                *unpacked = V3D_QPU_UNPACK_UH;\n+                return true;\n+        case 3:\n+                *unpacked = V3D_QPU_UNPACK_IL;\n+                return true;\n+        case 4:\n+                *unpacked = V3D_QPU_UNPACK_IH;\n+                return true;\n+        default:\n+                return false;\n+        }\n+}\n+\n+static bool\n+v3d_qpu_int32_unpack_pack(enum v3d_qpu_input_unpack unpacked,\n+                          uint32_t *packed)\n+{\n+        switch (unpacked) {\n+        case V3D_QPU_UNPACK_NONE:\n+                *packed = 0;\n+                return true;\n+        case V3D_QPU_UNPACK_UL:\n+                *packed = 1;\n+                return true;\n+        case V3D_QPU_UNPACK_UH:\n+                *packed = 2;\n+                return true;\n+        case V3D_QPU_UNPACK_IL:\n+                *packed = 3;\n+                return true;\n+        case V3D_QPU_UNPACK_IH:\n+                *packed = 4;\n+                return true;\n+        default:\n+                return false;\n+        }\n+}\n+\n static bool\n v3d_qpu_float16_unpack_unpack(uint32_t packed,\n                               enum v3d_qpu_input_unpack *unpacked)\n@@ -1273,6 +1323,15 @@ v3d71_qpu_add_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst\n                 instr->alu.add.b.unpack = V3D_QPU_UNPACK_NONE;\n                 break;\n \n+        case V3D_QPU_A_MOV:\n+                instr->alu.add.output_pack = V3D_QPU_PACK_NONE;\n+\n+                if (!v3d_qpu_int32_unpack_unpack((raddr_b >> 2) & 0x7,\n+                                                 &instr->alu.add.a.unpack)) {\n+                        return false;\n+                }\n+                break;\n+\n         default:\n                 instr->alu.add.output_pack = V3D_QPU_PACK_NONE;\n                 instr->alu.add.a.unpack = V3D_QPU_UNPACK_NONE;\n@@ -1449,6 +1508,15 @@ v3d71_qpu_mul_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst\n \n                 break;\n \n+        case V3D_QPU_M_MOV:\n+                instr->alu.mul.output_pack = V3D_QPU_PACK_NONE;\n+\n+                if (!v3d_qpu_int32_unpack_unpack((raddr_d >> 2) & 0x7,\n+                                                 &instr->alu.mul.a.unpack)) {\n+                        return false;\n+                }\n+                break;\n+\n         default:\n                 instr->alu.mul.output_pack = V3D_QPU_PACK_NONE;\n                 instr->alu.mul.a.unpack = V3D_QPU_UNPACK_NONE;\n@@ -1909,6 +1977,21 @@ v3d71_qpu_add_pack(const struct v3d_device_info *devinfo,\n                 opcode |= packed;\n                 break;\n \n+        case V3D_QPU_A_MOV: {\n+                uint32_t packed;\n+\n+                if (instr->alu.add.output_pack != V3D_QPU_PACK_NONE)\n+                        return false;\n+\n+                if (!v3d_qpu_int32_unpack_pack(instr->alu.add.a.unpack,\n+                                               &packed)) {\n+                        return false;\n+                }\n+\n+                raddr_b |= packed << 2;\n+                break;\n+        }\n+\n         default:\n                 if (instr->alu.add.op != V3D_QPU_A_NOP &&\n                     (instr->alu.add.output_pack != V3D_QPU_PACK_NONE ||\n@@ -2126,6 +2209,21 @@ v3d71_qpu_mul_pack(const struct v3d_device_info *devinfo,\n                 break;\n         }\n \n+        case V3D_QPU_M_MOV: {\n+                uint32_t packed;\n+\n+                if (instr->alu.mul.output_pack != V3D_QPU_PACK_NONE)\n+                        return false;\n+\n+                if (!v3d_qpu_int32_unpack_pack(instr->alu.mul.a.unpack,\n+                                               &packed)) {\n+                        return false;\n+                }\n+\n+                raddr_d |= packed << 2;\n+                break;\n+        }\n+\n         default:\n                 break;\n         }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0044-broadcom-qpu-fail-packing-on-unhandled-mul-pack-unpa.patch",
    "content": "From 2e86dd0c357d7b432ce6794ae22fbfae89ad186b Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 6 Oct 2021 12:01:10 +0200\nSubject: [PATCH 044/142] broadcom/qpu: fail packing on unhandled mul\n pack/unpack\n\nWe are doing this for the ADD alu already and it may be helpful to\nidentify cases where we have QPU code with pack/unpack modifiers on\nMUL opcodes that we then are not packing into the actual QPU\ninstructions.\n---\n src/broadcom/qpu/qpu_pack.c | 12 ++++++++++++\n 1 file changed, 12 insertions(+)\n\ndiff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c\nindex 4d677894755..180d7ab08a3 100644\n--- a/src/broadcom/qpu/qpu_pack.c\n+++ b/src/broadcom/qpu/qpu_pack.c\n@@ -2106,6 +2106,12 @@ v3d33_qpu_mul_pack(const struct v3d_device_info *devinfo,\n         }\n \n         default:\n+                if (instr->alu.mul.op != V3D_QPU_M_NOP &&\n+                    (instr->alu.mul.output_pack != V3D_QPU_PACK_NONE ||\n+                     instr->alu.mul.a.unpack != V3D_QPU_UNPACK_NONE ||\n+                     instr->alu.mul.b.unpack != V3D_QPU_UNPACK_NONE)) {\n+                        return false;\n+                }\n                 break;\n         }\n \n@@ -2225,6 +2231,12 @@ v3d71_qpu_mul_pack(const struct v3d_device_info *devinfo,\n         }\n \n         default:\n+                if (instr->alu.mul.op != V3D_QPU_M_NOP &&\n+                    (instr->alu.mul.output_pack != V3D_QPU_PACK_NONE ||\n+                     instr->alu.mul.a.unpack != V3D_QPU_UNPACK_NONE ||\n+                     instr->alu.mul.b.unpack != V3D_QPU_UNPACK_NONE)) {\n+                        return false;\n+                }\n                 break;\n         }\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0045-broadcom-compiler-generalize-check-for-shaders-using.patch",
    "content": "From ed6bfa29d43b5a89ff070961454f1e82e23b4f45 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Fri, 8 Oct 2021 15:10:24 +0200\nSubject: [PATCH 045/142] broadcom/compiler: generalize check for shaders using\n pixel center W\n\nV3D 4.x has pixel center W in rf0 and V3D 7.x has it in rf3. We already\naccount for this when we setup the c->payload_w, so use that.\n---\n src/broadcom/compiler/nir_to_vir.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c\nindex 220ff6bcd49..90fe1d1e7f0 100644\n--- a/src/broadcom/compiler/nir_to_vir.c\n+++ b/src/broadcom/compiler/nir_to_vir.c\n@@ -4547,8 +4547,8 @@ vir_check_payload_w(struct v3d_compile *c)\n \n         vir_for_each_inst_inorder(inst, c) {\n                 for (int i = 0; i < vir_get_nsrc(inst); i++) {\n-                        if (inst->src[i].file == QFILE_REG &&\n-                            inst->src[i].index == 0) {\n+                        if (inst->src[i].file == c->payload_w.file &&\n+                            inst->src[i].index == c->payload_w.index) {\n                                 c->uses_center_w = true;\n                                 return;\n                         }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0046-broadcom-compiler-v71-isn-t-affected-by-double-round.patch",
    "content": "From e1a0fa2c2010ef29b8cec798cd0fc99cf44f3a2d Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Thu, 14 Oct 2021 14:16:40 +0200\nSubject: [PATCH 046/142] broadcom/compiler: v71 isn't affected by\n double-rounding of viewport X,Y coords\n\n---\n src/broadcom/compiler/v3d_nir_lower_io.c | 10 +++++++---\n 1 file changed, 7 insertions(+), 3 deletions(-)\n\ndiff --git a/src/broadcom/compiler/v3d_nir_lower_io.c b/src/broadcom/compiler/v3d_nir_lower_io.c\nindex 3ef0e398228..4cdba3748a1 100644\n--- a/src/broadcom/compiler/v3d_nir_lower_io.c\n+++ b/src/broadcom/compiler/v3d_nir_lower_io.c\n@@ -600,9 +600,13 @@ v3d_nir_emit_ff_vpm_outputs(struct v3d_compile *c, nir_builder *b,\n                          * The correct fix for this as recommended by Broadcom\n                          * is to convert to .8 fixed-point with ffloor().\n                          */\n-                        pos = nir_f2i32(b, nir_ffloor(b, pos));\n-                        v3d_nir_store_output(b, state->vp_vpm_offset + i,\n-                                             offset_reg, pos);\n+                        if (c->devinfo->ver <= 42)\n+                                 pos = nir_f2i32(b, nir_ffloor(b, pos));\n+                        else\n+                                 pos = nir_f2i32(b, nir_fround_even(b, pos));\n+\n+                       v3d_nir_store_output(b, state->vp_vpm_offset + i,\n+                                            offset_reg, pos);\n                 }\n         }\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0047-broadcom-compiler-update-one-TMUWT-restriction-for-v.patch",
    "content": "From 697e6cf01b781b244404872f331a778b6d4e67da Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Tue, 19 Oct 2021 11:16:43 +0200\nSubject: [PATCH 047/142] broadcom/compiler: update one TMUWT restriction for\n v71\n\nTMUWT not allowed in the final instruction restriction doesn't apply\nfor v71.\n---\n src/broadcom/compiler/qpu_schedule.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex ff544fb3c1c..25f79aa6f46 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -1700,8 +1700,10 @@ qpu_inst_valid_in_thrend_slot(struct v3d_compile *c,\n \n         if (inst->type == V3D_QPU_INSTR_TYPE_ALU) {\n                 /* GFXH-1625: TMUWT not allowed in the final instruction. */\n-                if (slot == 2 && inst->alu.add.op == V3D_QPU_A_TMUWT)\n+                if (c->devinfo->ver <= 42 && slot == 2 &&\n+                    inst->alu.add.op == V3D_QPU_A_TMUWT) {\n                         return false;\n+                }\n \n                 /* No writing physical registers at the end. */\n                 bool add_is_nop = inst->alu.add.op == V3D_QPU_A_NOP;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0048-broadcom-compiler-update-ldunif-ldvary-comment-for-v.patch",
    "content": "From 26fea727a9f34b75a3fe3f6a806accaddcc317f6 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Tue, 19 Oct 2021 11:51:32 +0200\nSubject: [PATCH 048/142] broadcom/compiler: update ldunif/ldvary comment for\n v71\n\nFor v42 and below ldunif/ldvary write both on r5, but with a different\ndelay, so we need to take that into account when scheduling both.\n\nFor v71 the register used is rf0, but the behaviour is the same. So\nthe scheduling code can be the same, but the comment needs update.\n---\n src/broadcom/compiler/qpu_schedule.c | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex 25f79aa6f46..e8197661f89 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -1234,10 +1234,11 @@ retry:\n                 if (pixel_scoreboard_too_soon(c, scoreboard, inst))\n                         continue;\n \n-                /* ldunif and ldvary both write r5, but ldunif does so a tick\n-                 * sooner.  If the ldvary's r5 wasn't used, then ldunif might\n+                /* ldunif and ldvary both write the same register (r5 for v42\n+                 * and below, rf0 for v71), but ldunif does so a tick sooner.\n+                 * If the ldvary's register wasn't used, then ldunif might\n                  * otherwise get scheduled so ldunif and ldvary try to update\n-                 * r5 in the same tick.\n+                 * the register in the same tick.\n                  */\n                 if ((inst->sig.ldunif || inst->sig.ldunifa) &&\n                     scoreboard->tick == scoreboard->last_ldvary_tick + 1) {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0049-broadcom-compiler-update-payload-registers-handling-.patch",
    "content": "From 70456e27b039174f767010f96d9b649e5e42d84f Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Tue, 19 Oct 2021 23:52:30 +0200\nSubject: [PATCH 049/142] broadcom/compiler: update payload registers handling\n when computing live intervals\n\nAs for v71 the payload registers are not the same. Specifically now\nrf3 is used as payload register, so this is needed to avoid rf3 being\nselected as a instruction dst by the register allocator, overwriting\nthe payload value that could be still used.\n---\n src/broadcom/compiler/vir_live_variables.c | 21 +++++++++++++--------\n 1 file changed, 13 insertions(+), 8 deletions(-)\n\ndiff --git a/src/broadcom/compiler/vir_live_variables.c b/src/broadcom/compiler/vir_live_variables.c\nindex 575b0481dc8..87a7e2b5b81 100644\n--- a/src/broadcom/compiler/vir_live_variables.c\n+++ b/src/broadcom/compiler/vir_live_variables.c\n@@ -179,17 +179,22 @@ vir_setup_def_use(struct v3d_compile *c)\n                                 flags_inst = NULL;\n                         }\n \n-                        /* Payload registers: r0/1/2 contain W, centroid W,\n-                         * and Z at program start.  Register allocation will\n-                         * force their nodes to R0/1/2.\n+                        /* Payload registers: for fragment shaders, W,\n+                         * centroid W, and Z will be initialized at r0/1/2\n+                         * until v42, or r1/r2/r3 from v71.\n+                         *\n+                         * For compute shaders, payload would be r0/r2 until\n+                         * v42, r3/r2 from v71\n+                         *\n+                         * Register allocation will force their nodes to those\n+                         * registers.\n                          */\n                         if (inst->src[0].file == QFILE_REG) {\n-                                switch (inst->src[0].index) {\n-                                case 0:\n-                                case 1:\n-                                case 2:\n+                                uint32_t min_payload_r = c->devinfo->ver >= 71 ? 1 : 0;\n+                                uint32_t max_payload_r = c->devinfo->ver >= 71 ? 3 : 2;\n+                                if (inst->src[0].index >= min_payload_r ||\n+                                    inst->src[0].index <= max_payload_r) {\n                                         c->temp_start[inst->dst.index] = 0;\n-                                        break;\n                                 }\n                         }\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0050-broadcom-compiler-update-peripheral-access-restricti.patch",
    "content": "From f9a76b3a1e316e5ed6387819b87eaaf60f989a2b Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 26 Oct 2021 11:43:02 +0200\nSubject: [PATCH 050/142] broadcom/compiler: update peripheral access\n restrictions for v71\n\nIn V3D 4.x only a couple of simultaneous accesses where allowed, but\nV3D 7.x is a bit more flexible, so rather than trying to check for all\nthe allowed combinations it is easier to check if we are one of the\ndisallows.\n\nShader-db (pi5):\n\ntotal instructions in shared programs: 11338883 -> 11307386 (-0.28%)\ninstructions in affected programs: 2727201 -> 2695704 (-1.15%)\nhelped: 12555\nHURT: 289\nInstructions are helped.\n\ntotal max-temps in shared programs: 2230199 -> 2229260 (-0.04%)\nmax-temps in affected programs: 20508 -> 19569 (-4.58%)\nhelped: 608\nHURT: 4\nMax-temps are helped.\n\ntotal sfu-stalls in shared programs: 15236 -> 15293 (0.37%)\nsfu-stalls in affected programs: 148 -> 205 (38.51%)\nhelped: 38\nHURT: 64\nInconclusive result (%-change mean confidence interval includes 0).\n\ntotal inst-and-stalls in shared programs: 11354119 -> 11322679 (-0.28%)\ninst-and-stalls in affected programs: 2732262 -> 2700822 (-1.15%)\nhelped: 12550\nHURT: 304\nInst-and-stalls are helped.\n\ntotal nops in shared programs: 273711 -> 274095 (0.14%)\nnops in affected programs: 9626 -> 10010 (3.99%)\nhelped: 186\nHURT: 397\nNops are HURT.\n---\n src/broadcom/compiler/qpu_schedule.c | 88 +++++++++++++++++++++-------\n src/broadcom/compiler/qpu_validate.c |  2 +-\n src/broadcom/qpu/qpu_instr.c         | 16 +++--\n src/broadcom/qpu/qpu_instr.h         |  2 +\n 4 files changed, 82 insertions(+), 26 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex e8197661f89..adb501e85ce 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -790,7 +790,8 @@ enum {\n         V3D_PERIPHERAL_TMU_WAIT           = (1 << 6),\n         V3D_PERIPHERAL_TMU_WRTMUC_SIG     = (1 << 7),\n         V3D_PERIPHERAL_TSY                = (1 << 8),\n-        V3D_PERIPHERAL_TLB                = (1 << 9),\n+        V3D_PERIPHERAL_TLB_READ           = (1 << 9),\n+        V3D_PERIPHERAL_TLB_WRITE          = (1 << 10),\n };\n \n static uint32_t\n@@ -815,8 +816,10 @@ qpu_peripherals(const struct v3d_device_info *devinfo,\n         if (v3d_qpu_uses_sfu(inst))\n                 result |= V3D_PERIPHERAL_SFU;\n \n-        if (v3d_qpu_uses_tlb(inst))\n-                result |= V3D_PERIPHERAL_TLB;\n+        if (v3d_qpu_reads_tlb(inst))\n+                result |= V3D_PERIPHERAL_TLB_READ;\n+        if (v3d_qpu_writes_tlb(inst))\n+                result |= V3D_PERIPHERAL_TLB_WRITE;\n \n         if (inst->type == V3D_QPU_INSTR_TYPE_ALU) {\n                 if (inst->alu.add.op != V3D_QPU_A_NOP &&\n@@ -847,32 +850,75 @@ qpu_compatible_peripheral_access(const struct v3d_device_info *devinfo,\n         if (devinfo->ver < 41)\n                 return false;\n \n-        /* V3D 4.1+ allow WRTMUC signal with TMU register write (other than\n-         * tmuc).\n+        /* V3D 4.x can't do more than one peripheral access except in a\n+         * few cases:\n          */\n-        if (a_peripherals == V3D_PERIPHERAL_TMU_WRTMUC_SIG &&\n-            b_peripherals == V3D_PERIPHERAL_TMU_WRITE) {\n-                return v3d_qpu_writes_tmu_not_tmuc(devinfo, b);\n+        if (devinfo->ver <= 42) {\n+                /* WRTMUC signal with TMU register write (other than tmuc). */\n+                if (a_peripherals == V3D_PERIPHERAL_TMU_WRTMUC_SIG &&\n+                    b_peripherals == V3D_PERIPHERAL_TMU_WRITE) {\n+                        return v3d_qpu_writes_tmu_not_tmuc(devinfo, b);\n+                }\n+                if (b_peripherals == V3D_PERIPHERAL_TMU_WRTMUC_SIG &&\n+                    a_peripherals == V3D_PERIPHERAL_TMU_WRITE) {\n+                        return v3d_qpu_writes_tmu_not_tmuc(devinfo, a);\n+                }\n+\n+                /* TMU read with VPM read/write. */\n+                if (a_peripherals == V3D_PERIPHERAL_TMU_READ &&\n+                    (b_peripherals == V3D_PERIPHERAL_VPM_READ ||\n+                     b_peripherals == V3D_PERIPHERAL_VPM_WRITE)) {\n+                        return true;\n+                }\n+                if (b_peripherals == V3D_PERIPHERAL_TMU_READ &&\n+                    (a_peripherals == V3D_PERIPHERAL_VPM_READ ||\n+                     a_peripherals == V3D_PERIPHERAL_VPM_WRITE)) {\n+                        return true;\n+                }\n+\n+                return false;\n         }\n \n-        if (a_peripherals == V3D_PERIPHERAL_TMU_WRITE &&\n-            b_peripherals == V3D_PERIPHERAL_TMU_WRTMUC_SIG) {\n-                return v3d_qpu_writes_tmu_not_tmuc(devinfo, a);\n+        /* V3D 7.x can't have more than one of these restricted peripherals */\n+        const uint32_t restricted = V3D_PERIPHERAL_TMU_WRITE |\n+                                    V3D_PERIPHERAL_TMU_WRTMUC_SIG |\n+                                    V3D_PERIPHERAL_TSY |\n+                                    V3D_PERIPHERAL_TLB_READ |\n+                                    V3D_PERIPHERAL_SFU |\n+                                    V3D_PERIPHERAL_VPM_READ |\n+                                    V3D_PERIPHERAL_VPM_WRITE;\n+\n+        const uint32_t a_restricted = a_peripherals & restricted;\n+        const uint32_t b_restricted = b_peripherals & restricted;\n+        if (a_restricted && b_restricted) {\n+                /* WRTMUC signal with TMU register write (other than tmuc) is\n+                 * allowed though.\n+                 */\n+                if (!((a_restricted == V3D_PERIPHERAL_TMU_WRTMUC_SIG &&\n+                       b_restricted == V3D_PERIPHERAL_TMU_WRITE &&\n+                       v3d_qpu_writes_tmu_not_tmuc(devinfo, b)) ||\n+                      (b_restricted == V3D_PERIPHERAL_TMU_WRTMUC_SIG &&\n+                       a_restricted == V3D_PERIPHERAL_TMU_WRITE &&\n+                       v3d_qpu_writes_tmu_not_tmuc(devinfo, a)))) {\n+                        return false;\n+                }\n         }\n \n-        /* V3D 4.1+ allows TMU read with VPM read/write. */\n-        if (a_peripherals == V3D_PERIPHERAL_TMU_READ &&\n-            (b_peripherals == V3D_PERIPHERAL_VPM_READ ||\n-             b_peripherals == V3D_PERIPHERAL_VPM_WRITE)) {\n-                return true;\n+        /* Only one TMU read per instruction */\n+        if ((a_peripherals & V3D_PERIPHERAL_TMU_READ) &&\n+            (b_peripherals & V3D_PERIPHERAL_TMU_READ)) {\n+                return false;\n         }\n-        if (b_peripherals == V3D_PERIPHERAL_TMU_READ &&\n-            (a_peripherals == V3D_PERIPHERAL_VPM_READ ||\n-             a_peripherals == V3D_PERIPHERAL_VPM_WRITE)) {\n-                return true;\n+\n+        /* Only one TLB access per instruction */\n+        if ((a_peripherals & (V3D_PERIPHERAL_TLB_WRITE |\n+                              V3D_PERIPHERAL_TLB_READ)) &&\n+            (b_peripherals & (V3D_PERIPHERAL_TLB_WRITE |\n+                              V3D_PERIPHERAL_TLB_READ))) {\n+                return false;\n         }\n \n-        return false;\n+        return true;\n }\n \n /* Compute a bitmask of which rf registers are used between\ndiff --git a/src/broadcom/compiler/qpu_validate.c b/src/broadcom/compiler/qpu_validate.c\nindex 12788692432..fde6695d59b 100644\n--- a/src/broadcom/compiler/qpu_validate.c\n+++ b/src/broadcom/compiler/qpu_validate.c\n@@ -227,7 +227,7 @@ qpu_validate_inst(struct v3d_qpu_validate_state *state, struct qinst *qinst)\n             vpm_writes +\n             tlb_writes +\n             tsy_writes +\n-            inst->sig.ldtmu +\n+            (devinfo->ver <= 42 ? inst->sig.ldtmu : 0) +\n             inst->sig.ldtlb +\n             inst->sig.ldvpm +\n             inst->sig.ldtlbu > 1) {\ndiff --git a/src/broadcom/qpu/qpu_instr.c b/src/broadcom/qpu/qpu_instr.c\nindex 195a0dcd232..f54ce7210fb 100644\n--- a/src/broadcom/qpu/qpu_instr.c\n+++ b/src/broadcom/qpu/qpu_instr.c\n@@ -649,12 +649,14 @@ v3d_qpu_add_op_writes_vpm(enum  v3d_qpu_add_op op)\n }\n \n bool\n-v3d_qpu_uses_tlb(const struct v3d_qpu_instr *inst)\n+v3d_qpu_reads_tlb(const struct v3d_qpu_instr *inst)\n {\n-        if (inst->sig.ldtlb ||\n-            inst->sig.ldtlbu)\n-                return true;\n+        return inst->sig.ldtlb || inst->sig.ldtlbu;\n+}\n \n+bool\n+v3d_qpu_writes_tlb(const struct v3d_qpu_instr *inst)\n+{\n         if (inst->type == V3D_QPU_INSTR_TYPE_ALU) {\n                 if (inst->alu.add.op != V3D_QPU_A_NOP &&\n                     inst->alu.add.magic_write &&\n@@ -672,6 +674,12 @@ v3d_qpu_uses_tlb(const struct v3d_qpu_instr *inst)\n         return false;\n }\n \n+bool\n+v3d_qpu_uses_tlb(const struct v3d_qpu_instr *inst)\n+{\n+        return  v3d_qpu_writes_tlb(inst) || v3d_qpu_reads_tlb(inst);\n+}\n+\n bool\n v3d_qpu_uses_sfu(const struct v3d_qpu_instr *inst)\n {\ndiff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h\nindex 4b34d17bd4c..dece45c5c54 100644\n--- a/src/broadcom/qpu/qpu_instr.h\n+++ b/src/broadcom/qpu/qpu_instr.h\n@@ -472,6 +472,8 @@ bool v3d_qpu_magic_waddr_is_tlb(enum v3d_qpu_waddr waddr) ATTRIBUTE_CONST;\n bool v3d_qpu_magic_waddr_is_vpm(enum v3d_qpu_waddr waddr) ATTRIBUTE_CONST;\n bool v3d_qpu_magic_waddr_is_tsy(enum v3d_qpu_waddr waddr) ATTRIBUTE_CONST;\n bool v3d_qpu_magic_waddr_loads_unif(enum v3d_qpu_waddr waddr) ATTRIBUTE_CONST;\n+bool v3d_qpu_reads_tlb(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;\n+bool v3d_qpu_writes_tlb(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;\n bool v3d_qpu_uses_tlb(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;\n bool v3d_qpu_instr_is_sfu(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;\n bool v3d_qpu_instr_is_legacy_sfu(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0051-broadcom-qpu-add-packing-for-fmov-on-ADD-alu.patch",
    "content": "From 3520cceb87fb2f9765ba7dbe2771fbd0cadca78d Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 26 Oct 2021 08:37:54 +0200\nSubject: [PATCH 051/142] broadcom/qpu: add packing for fmov on ADD alu\n\n---\n src/broadcom/qpu/qpu_pack.c | 31 +++++++++++++++++++++++++++++++\n 1 file changed, 31 insertions(+)\n\ndiff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c\nindex 180d7ab08a3..ed5a8bc667d 100644\n--- a/src/broadcom/qpu/qpu_pack.c\n+++ b/src/broadcom/qpu/qpu_pack.c\n@@ -1332,6 +1332,20 @@ v3d71_qpu_add_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst\n                 }\n                 break;\n \n+        case V3D_QPU_A_FMOV:\n+                instr->alu.add.output_pack = raddr_b & 0x3;\n+\n+                /* Mul alu FMOV has one additional variant */\n+                int32_t unpack = (raddr_b >> 2) & 0x7;\n+                if (unpack == 7)\n+                        return false;\n+\n+                if (!v3d_qpu_float32_unpack_unpack(unpack,\n+                                                   &instr->alu.add.a.unpack)) {\n+                        return false;\n+                }\n+                break;\n+\n         default:\n                 instr->alu.add.output_pack = V3D_QPU_PACK_NONE;\n                 instr->alu.add.a.unpack = V3D_QPU_UNPACK_NONE;\n@@ -1992,6 +2006,23 @@ v3d71_qpu_add_pack(const struct v3d_device_info *devinfo,\n                 break;\n         }\n \n+        case V3D_QPU_A_FMOV: {\n+                uint32_t packed;\n+\n+                if (!v3d_qpu_float32_pack_pack(instr->alu.add.output_pack,\n+                                               &packed)) {\n+                        return false;\n+                }\n+                raddr_b = packed;\n+\n+                if (!v3d_qpu_float32_unpack_pack(instr->alu.add.a.unpack,\n+                                                 &packed)) {\n+                        return false;\n+                }\n+                raddr_b |= packed << 2;\n+                break;\n+        }\n+\n         default:\n                 if (instr->alu.add.op != V3D_QPU_A_NOP &&\n                     (instr->alu.add.output_pack != V3D_QPU_PACK_NONE ||\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0052-broadcom-compiler-handle-rf0-flops-storage-restricti.patch",
    "content": "From 7c7ab15b3c9def4bc3bb5be492228a933c325f8a Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 6 Oct 2021 13:58:27 +0200\nSubject: [PATCH 052/142] broadcom/compiler: handle rf0 flops storage\n restriction in v71\n\n---\n src/broadcom/compiler/qpu_schedule.c | 81 +++++++++++++++++++++++++++-\n 1 file changed, 79 insertions(+), 2 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex adb501e85ce..7048d9257b6 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -538,6 +538,10 @@ struct choose_scoreboard {\n         int ldvary_count;\n         int pending_ldtmu_count;\n         bool first_ldtmu_after_thrsw;\n+\n+        /* V3D 7.x */\n+        int last_implicit_rf0_write_tick;\n+        bool has_rf0_flops_conflict;\n };\n \n static bool\n@@ -1499,6 +1503,62 @@ update_scoreboard_tmu_tracking(struct choose_scoreboard *scoreboard,\n         }\n }\n \n+static void\n+set_has_rf0_flops_conflict(struct choose_scoreboard *scoreboard,\n+                           const struct v3d_qpu_instr *inst,\n+                           const struct v3d_device_info *devinfo)\n+{\n+        if (scoreboard->last_implicit_rf0_write_tick == scoreboard->tick &&\n+            v3d_qpu_sig_writes_address(devinfo, &inst->sig) &&\n+            !inst->sig_magic) {\n+                scoreboard->has_rf0_flops_conflict = true;\n+        }\n+}\n+\n+static void\n+update_scoreboard_for_rf0_flops(struct choose_scoreboard *scoreboard,\n+                                const struct v3d_qpu_instr *inst,\n+                                const struct v3d_device_info *devinfo)\n+{\n+        if (devinfo->ver < 71)\n+                return;\n+\n+        /* Thread switch restrictions:\n+         *\n+         * At the point of a thread switch or thread end (when the actual\n+         * thread switch or thread end happens, not when the signalling\n+         * instruction is processed):\n+         *\n+         *    - If the most recent write to rf0 was from a ldunif, ldunifa, or\n+         *      ldvary instruction in which another signal also wrote to the\n+         *      register file, and the final instruction of the thread section\n+         *      contained a signal which wrote to the register file, then the\n+         *      value of rf0 is undefined at the start of the new section\n+         *\n+         * Here we use the scoreboard to track if our last rf0 implicit write\n+         * happens at the same time that another signal writes the register\n+         * file (has_rf0_flops_conflict). We will use that information when\n+         * scheduling thrsw instructions to avoid putting anything in their\n+         * last delay slot which has a signal that writes to the register file.\n+         */\n+\n+        /* Reset tracking if we have an explicit rf0 write or we are starting\n+         * a new thread section.\n+         */\n+        if (v3d71_qpu_writes_waddr_explicitly(devinfo, inst, 0) ||\n+            scoreboard->tick - scoreboard->last_thrsw_tick == 3) {\n+                scoreboard->last_implicit_rf0_write_tick = -10;\n+                scoreboard->has_rf0_flops_conflict = false;\n+        }\n+\n+        if (v3d_qpu_writes_rf0_implicitly(devinfo, inst)) {\n+                scoreboard->last_implicit_rf0_write_tick = inst->sig.ldvary ?\n+                        scoreboard->tick + 1 : scoreboard->tick;\n+        }\n+\n+        set_has_rf0_flops_conflict(scoreboard, inst, devinfo);\n+}\n+\n static void\n update_scoreboard_for_chosen(struct choose_scoreboard *scoreboard,\n                              const struct qinst *qinst,\n@@ -1542,6 +1602,8 @@ update_scoreboard_for_chosen(struct choose_scoreboard *scoreboard,\n         if (inst->sig.ldvary)\n                 scoreboard->last_ldvary_tick = scoreboard->tick;\n \n+        update_scoreboard_for_rf0_flops(scoreboard, inst, devinfo);\n+\n         update_scoreboard_tmu_tracking(scoreboard, qinst);\n }\n \n@@ -1812,6 +1874,7 @@ qpu_inst_valid_in_thrend_slot(struct v3d_compile *c,\n  */\n static bool\n qpu_inst_before_thrsw_valid_in_delay_slot(struct v3d_compile *c,\n+                                          struct choose_scoreboard *scoreboard,\n                                           const struct qinst *qinst,\n                                           uint32_t slot)\n {\n@@ -1842,6 +1905,17 @@ qpu_inst_before_thrsw_valid_in_delay_slot(struct v3d_compile *c,\n         if (v3d_qpu_writes_unifa(c->devinfo, &qinst->qpu))\n                 return false;\n \n+        /* See comment when we set has_rf0_flops_conflict for details */\n+        if (c->devinfo->ver >= 71 &&\n+            slot == 2 &&\n+            v3d_qpu_sig_writes_address(c->devinfo, &qinst->qpu.sig) &&\n+            !qinst->qpu.sig_magic) {\n+                if (scoreboard->has_rf0_flops_conflict)\n+                        return false;\n+                if (scoreboard->last_implicit_rf0_write_tick == scoreboard->tick)\n+                        return false;\n+        }\n+\n         return true;\n }\n \n@@ -1874,7 +1948,7 @@ qpu_inst_after_thrsw_valid_in_delay_slot(struct v3d_compile *c,\n          * also apply to instructions scheduled after the thrsw that we want\n          * to place in its delay slots.\n          */\n-        if (!qpu_inst_before_thrsw_valid_in_delay_slot(c, qinst, slot))\n+        if (!qpu_inst_before_thrsw_valid_in_delay_slot(c, scoreboard, qinst, slot))\n                 return false;\n \n         /* TLB access is disallowed until scoreboard wait is executed, which\n@@ -1947,8 +2021,10 @@ valid_thrsw_sequence(struct v3d_compile *c, struct choose_scoreboard *scoreboard\n                      bool is_thrend)\n {\n         for (int slot = 0; slot < instructions_in_sequence; slot++) {\n-                if (!qpu_inst_before_thrsw_valid_in_delay_slot(c, qinst, slot))\n+                if (!qpu_inst_before_thrsw_valid_in_delay_slot(c, scoreboard,\n+                                                               qinst, slot)) {\n                         return false;\n+                }\n \n                 if (is_thrend &&\n                     !qpu_inst_valid_in_thrend_slot(c, qinst, slot)) {\n@@ -2718,6 +2794,7 @@ v3d_qpu_schedule_instructions(struct v3d_compile *c)\n         scoreboard.last_setmsf_tick = -10;\n         scoreboard.last_stallable_sfu_tick = -10;\n         scoreboard.first_ldtmu_after_thrsw = true;\n+        scoreboard.last_implicit_rf0_write_tick = - 10;\n \n         if (debug) {\n                 fprintf(stderr, \"Pre-schedule instructions\\n\");\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0053-broadcom-compiler-enable-ldvary-pipelining-on-v71.patch",
    "content": "From 0c6910721eb50b38b3388c2d2344b6ecfe0fee58 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 27 Oct 2021 11:35:12 +0200\nSubject: [PATCH 053/142] broadcom/compiler: enable ldvary pipelining on v71\n\n---\n src/broadcom/compiler/qpu_schedule.c | 121 ++++++++++++++++++---------\n 1 file changed, 80 insertions(+), 41 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex 7048d9257b6..334ffdc6d58 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -2312,46 +2312,72 @@ emit_branch(struct v3d_compile *c,\n }\n \n static bool\n-alu_reads_register(struct v3d_qpu_instr *inst,\n+alu_reads_register(const struct v3d_device_info *devinfo,\n+                   struct v3d_qpu_instr *inst,\n                    bool add, bool magic, uint32_t index)\n {\n         uint32_t num_src;\n-        enum v3d_qpu_mux mux_a, mux_b;\n-\n-        if (add) {\n+        if (add)\n                 num_src = v3d_qpu_add_op_num_src(inst->alu.add.op);\n-                mux_a = inst->alu.add.a.mux;\n-                mux_b = inst->alu.add.b.mux;\n-        } else {\n+        else\n                 num_src = v3d_qpu_mul_op_num_src(inst->alu.mul.op);\n-                mux_a = inst->alu.mul.a.mux;\n-                mux_b = inst->alu.mul.b.mux;\n-        }\n \n-        for (int i = 0; i < num_src; i++) {\n-                if (magic) {\n-                        if (i == 0 && mux_a == index)\n-                                return true;\n-                        if (i == 1 && mux_b == index)\n-                                return true;\n+        if (devinfo->ver <= 42) {\n+                enum v3d_qpu_mux mux_a, mux_b;\n+                if (add) {\n+                        mux_a = inst->alu.add.a.mux;\n+                        mux_b = inst->alu.add.b.mux;\n                 } else {\n-                        if (i == 0 && mux_a == V3D_QPU_MUX_A &&\n-                            inst->raddr_a == index) {\n-                                return true;\n-                        }\n-                        if (i == 0 && mux_a == V3D_QPU_MUX_B &&\n-                            inst->raddr_b == index) {\n-                                return true;\n-                        }\n-                        if (i == 1 && mux_b == V3D_QPU_MUX_A &&\n-                            inst->raddr_a == index) {\n-                                return true;\n-                        }\n-                        if (i == 1 && mux_b == V3D_QPU_MUX_B &&\n-                            inst->raddr_b == index) {\n-                                return true;\n+                        mux_a = inst->alu.mul.a.mux;\n+                        mux_b = inst->alu.mul.b.mux;\n+                }\n+\n+                for (int i = 0; i < num_src; i++) {\n+                        if (magic) {\n+                                if (i == 0 && mux_a == index)\n+                                        return true;\n+                                if (i == 1 && mux_b == index)\n+                                        return true;\n+                        } else {\n+                                if (i == 0 && mux_a == V3D_QPU_MUX_A &&\n+                                    inst->raddr_a == index) {\n+                                        return true;\n+                                }\n+                                if (i == 0 && mux_a == V3D_QPU_MUX_B &&\n+                                    inst->raddr_b == index) {\n+                                        return true;\n+                                }\n+                                if (i == 1 && mux_b == V3D_QPU_MUX_A &&\n+                                    inst->raddr_a == index) {\n+                                        return true;\n+                                }\n+                                if (i == 1 && mux_b == V3D_QPU_MUX_B &&\n+                                    inst->raddr_b == index) {\n+                                        return true;\n+                                }\n                         }\n                 }\n+\n+                return false;\n+        }\n+\n+        assert(devinfo->ver >= 71);\n+        assert(!magic);\n+\n+        uint32_t raddr_a, raddr_b;\n+        if (add) {\n+                raddr_a = inst->alu.add.a.raddr;\n+                raddr_b = inst->alu.add.b.raddr;\n+        } else {\n+                raddr_a = inst->alu.mul.a.raddr;\n+                raddr_b = inst->alu.mul.b.raddr;\n+        }\n+\n+        for (int i = 0; i < num_src; i++) {\n+                if (i == 0 && raddr_a == index)\n+                        return true;\n+                if (i == 1 && raddr_b == index)\n+                        return true;\n         }\n \n         return false;\n@@ -2386,6 +2412,8 @@ fixup_pipelined_ldvary(struct v3d_compile *c,\n                        struct qblock *block,\n                        struct v3d_qpu_instr *inst)\n {\n+        const struct v3d_device_info *devinfo = c->devinfo;\n+\n         /* We only call this if we have successfully merged an ldvary into a\n          * previous instruction.\n          */\n@@ -2398,9 +2426,9 @@ fixup_pipelined_ldvary(struct v3d_compile *c,\n          * the ldvary destination, if it does, then moving the ldvary before\n          * it would overwrite it.\n          */\n-        if (alu_reads_register(inst, true, ldvary_magic, ldvary_index))\n+        if (alu_reads_register(devinfo, inst, true, ldvary_magic, ldvary_index))\n                 return false;\n-        if (alu_reads_register(inst, false, ldvary_magic, ldvary_index))\n+        if (alu_reads_register(devinfo, inst, false, ldvary_magic, ldvary_index))\n                 return false;\n \n         /* The implicit ldvary destination may not be written to by a signal\n@@ -2436,13 +2464,13 @@ fixup_pipelined_ldvary(struct v3d_compile *c,\n         }\n \n         /* The previous instruction cannot have a conflicting signal */\n-        if (v3d_qpu_sig_writes_address(c->devinfo, &prev->qpu.sig))\n+        if (v3d_qpu_sig_writes_address(devinfo, &prev->qpu.sig))\n                 return false;\n \n         uint32_t sig;\n         struct v3d_qpu_sig new_sig = prev->qpu.sig;\n         new_sig.ldvary = true;\n-        if (!v3d_qpu_sig_pack(c->devinfo, &new_sig, &sig))\n+        if (!v3d_qpu_sig_pack(devinfo, &new_sig, &sig))\n                 return false;\n \n         /* The previous instruction cannot use flags since ldvary uses the\n@@ -2471,14 +2499,25 @@ fixup_pipelined_ldvary(struct v3d_compile *c,\n         inst->sig_magic = false;\n         inst->sig_addr = 0;\n \n-        /* By moving ldvary to the previous instruction we make it update\n-         * r5 in the current one, so nothing else in it should write r5.\n-         * This should've been prevented by our dependency tracking, which\n+        /* Update rf0 flops tracking for new ldvary delayed rf0 write tick */\n+        if (devinfo->ver >= 71) {\n+                scoreboard->last_implicit_rf0_write_tick = scoreboard->tick;\n+                set_has_rf0_flops_conflict(scoreboard, inst, devinfo);\n+        }\n+\n+        /* By moving ldvary to the previous instruction we make it update r5\n+         * (rf0 for ver >= 71) in the current one, so nothing else in it\n+         * should write this register.\n+         *\n+         * This should've been prevented by our depedency tracking, which\n          * would not allow ldvary to be paired up with an instruction that\n-         * writes r5 (since our dependency tracking doesn't know that the\n-         * ldvary write r5 happens in the next instruction).\n+         * writes r5/rf0 (since our dependency tracking doesn't know that the\n+         * ldvary write to r5/rf0 happens in the next instruction).\n          */\n-        assert(!v3d_qpu_writes_r5(c->devinfo, inst));\n+        assert(!v3d_qpu_writes_r5(devinfo, inst));\n+        assert(devinfo->ver <= 42 ||\n+               (!v3d_qpu_writes_rf0_implicitly(devinfo, inst) &&\n+                !v3d71_qpu_writes_waddr_explicitly(devinfo, inst, 0)));\n \n         return true;\n }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0054-broadcom-compiler-try-to-use-ldunif-a-instead-of-ldu.patch",
    "content": "From 0670d642bb91fc68ce73f2d9fb88c482295a446d Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Thu, 28 Oct 2021 14:13:29 +0200\nSubject: [PATCH 054/142] broadcom/compiler: try to use ldunif(a) instead of\n ldunif(a)rf in v71\n\nThe rf variants need to encode the destination in the cond bits, which\nprevents these to be merged with any other instruction that need them.\n\nIn 4.x, ldunif(a) write to r5 which is a special register that only\nldunif(a) and ldvary can write so we have a special register class for\nit and only allow it for them. Then when we need to choose a register\nfor a node, if this register is available we always use it.\n\nIn 7.x these instructions write to rf0, which can be used by any\ninstruction, so instead of restricting rf0, we track the temps that\nare used as ldunif(a) destinations and use that information to favor\nrf0 for them.\n---\n src/broadcom/compiler/v3d_compiler.h          |  3 ++\n src/broadcom/compiler/vir_register_allocate.c | 34 ++++++++++++++++---\n src/broadcom/compiler/vir_to_qpu.c            | 11 ++++--\n 3 files changed, 41 insertions(+), 7 deletions(-)\n\ndiff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h\nindex 7e8f3bfc1a7..36adf8830b5 100644\n--- a/src/broadcom/compiler/v3d_compiler.h\n+++ b/src/broadcom/compiler/v3d_compiler.h\n@@ -613,6 +613,9 @@ struct v3d_ra_node_info {\n         struct {\n                 uint32_t priority;\n                 uint8_t class_bits;\n+\n+                /* V3D 7.x */\n+                bool is_ldunif_dst;\n         } *info;\n         uint32_t alloc_count;\n };\ndiff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c\nindex e0adc1de7a4..1be091f8518 100644\n--- a/src/broadcom/compiler/vir_register_allocate.c\n+++ b/src/broadcom/compiler/vir_register_allocate.c\n@@ -384,6 +384,7 @@ add_node(struct v3d_compile *c, uint32_t temp, uint8_t class_bits)\n         /* We fill the node priority after we are done inserting spills */\n         c->nodes.info[node].class_bits = class_bits;\n         c->nodes.info[node].priority = 0;\n+        c->nodes.info[node].is_ldunif_dst = false;\n }\n \n /* The spill offset for this thread takes a bit of setup, so do it once at\n@@ -899,9 +900,22 @@ v3d_ra_select_accum(struct v3d_ra_select_callback_data *v3d_ra,\n \n static bool\n v3d_ra_select_rf(struct v3d_ra_select_callback_data *v3d_ra,\n+                 unsigned int node,\n                  BITSET_WORD *regs,\n                  unsigned int *out)\n {\n+        /* In V3D 7.x, try to assign rf0 to temps used as ldunif's dst\n+         * so we can avoid turning them into ldunifrf (which uses the\n+         * cond field to encode the dst and would prevent merge with\n+         * instructions that use cond flags).\n+         */\n+        if (v3d_ra->nodes->info[node].is_ldunif_dst &&\n+            BITSET_TEST(regs, v3d_ra->phys_index)) {\n+                assert(v3d_ra->devinfo->ver >= 71);\n+                *out = v3d_ra->phys_index;\n+                return true;\n+        }\n+\n         for (int i = 0; i < PHYS_COUNT; i++) {\n                 int phys_off = (v3d_ra->next_phys + i) % PHYS_COUNT;\n                 int phys = v3d_ra->phys_index + phys_off;\n@@ -927,7 +941,7 @@ v3d_ra_select_callback(unsigned int n, BITSET_WORD *regs, void *data)\n                 return reg;\n         }\n \n-        if (v3d_ra_select_rf(v3d_ra, regs, &reg))\n+        if (v3d_ra_select_rf(v3d_ra, n, regs, &reg))\n                 return reg;\n \n         /* If we ran out of physical registers try to assign an accumulator\n@@ -1139,15 +1153,24 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c,\n                                 }\n                         }\n                 } else {\n-                        /* If the instruction has an implicit write\n-                         * we can't allocate its dest to the same\n-                         * register.\n+                        /* Make sure we don't allocate the ldvary's\n+                         * destination to rf0, since it would clash\n+                         * with its implicit write to that register.\n                          */\n-                        if (v3d_qpu_writes_rf0_implicitly(c->devinfo, &inst->qpu)) {\n+                        if (inst->qpu.sig.ldvary) {\n                                 ra_add_node_interference(c->g,\n                                                          temp_to_node(c, inst->dst.index),\n                                                          implicit_rf_nodes[0]);\n                         }\n+                        /* Flag dst temps from ldunif(a) instructions\n+                         * so we can try to assign rf0 to them and avoid\n+                         * converting these to ldunif(a)rf.\n+                         */\n+                        if (inst->qpu.sig.ldunif || inst->qpu.sig.ldunifa) {\n+                                const uint32_t dst_n =\n+                                        temp_to_node(c, inst->dst.index);\n+                                c->nodes.info[dst_n].is_ldunif_dst = true;\n+                        }\n                 }\n         }\n \n@@ -1222,6 +1245,7 @@ v3d_register_allocate(struct v3d_compile *c)\n          * without accumulators that can have implicit writes to phys regs.\n          */\n         for (uint32_t i = 0; i < num_ra_nodes; i++) {\n+                c->nodes.info[i].is_ldunif_dst = false;\n                 if (c->devinfo->has_accumulators && i < ACC_COUNT) {\n                         acc_nodes[i] = i;\n                         ra_set_node_reg(c->g, acc_nodes[i], ACC_INDEX + i);\ndiff --git a/src/broadcom/compiler/vir_to_qpu.c b/src/broadcom/compiler/vir_to_qpu.c\nindex afc4941fdb1..cbbb495592b 100644\n--- a/src/broadcom/compiler/vir_to_qpu.c\n+++ b/src/broadcom/compiler/vir_to_qpu.c\n@@ -345,8 +345,15 @@ v3d_generate_code_block(struct v3d_compile *c,\n                                 assert(qinst->qpu.alu.add.op == V3D_QPU_A_NOP);\n                                 assert(qinst->qpu.alu.mul.op == V3D_QPU_M_NOP);\n \n-                                if (!dst.magic ||\n-                                    dst.index != V3D_QPU_WADDR_R5) {\n+                                bool use_rf;\n+                                if (c->devinfo->has_accumulators) {\n+                                        use_rf = !dst.magic ||\n+                                                 dst.index != V3D_QPU_WADDR_R5;\n+                                } else {\n+                                        use_rf = dst.magic || dst.index != 0;\n+                                }\n+\n+                                if (use_rf) {\n                                         assert(c->devinfo->ver >= 40);\n \n                                         if (qinst->qpu.sig.ldunif) {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0055-broadcom-compiler-don-t-assign-rf0-to-temps-that-con.patch",
    "content": "From cbed3b97394da09c9ae644c79e098e3ba8b5c3e8 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Fri, 29 Oct 2021 13:00:56 +0200\nSubject: [PATCH 055/142] broadcom/compiler: don't assign rf0 to temps that\n conflict with ldvary\n\nldvary writes to rf0 implicitly, so we don't want to allocate rf0 to\nany temps that are live across ldvary's rf0 live ranges.\n---\n src/broadcom/compiler/vir_register_allocate.c | 39 ++++++++++++++++++-\n 1 file changed, 38 insertions(+), 1 deletion(-)\n\ndiff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c\nindex 1be091f8518..6f7b1ca0589 100644\n--- a/src/broadcom/compiler/vir_register_allocate.c\n+++ b/src/broadcom/compiler/vir_register_allocate.c\n@@ -1019,6 +1019,7 @@ static void\n update_graph_and_reg_classes_for_inst(struct v3d_compile *c,\n                                       int *acc_nodes,\n                                       int *implicit_rf_nodes,\n+                                      int last_ldvary_ip,\n                                       struct qinst *inst)\n {\n         int32_t ip = inst->ip;\n@@ -1125,6 +1126,25 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c,\n                 }\n         }\n \n+        /* Don't allocate rf0 to temps that cross ranges where we have\n+         * live implicit rf0 writes from ldvary. We can identify these\n+         * by tracking the last ldvary instruction and explicit reads\n+         * of rf0.\n+         */\n+        if (c->devinfo->ver >= 71 &&\n+            ((inst->src[0].file == QFILE_REG && inst->src[0].index == 0) ||\n+              (vir_get_nsrc(inst) > 1 &&\n+               inst->src[1].file == QFILE_REG && inst->src[1].index == 0))) {\n+                for (int i = 0; i < c->num_temps; i++) {\n+                        if (c->temp_start[i] < ip &&\n+                            c->temp_end[i] > last_ldvary_ip) {\n+                                        ra_add_node_interference(c->g,\n+                                                                 temp_to_node(c, i),\n+                                                                 implicit_rf_nodes[0]);\n+                        }\n+                }\n+        }\n+\n         if (inst->dst.file == QFILE_TEMP) {\n                 /* Only a ldunif gets to write to R5, which only has a\n                  * single 32-bit channel of storage.\n@@ -1270,10 +1290,27 @@ v3d_register_allocate(struct v3d_compile *c)\n          * interferences.\n          */\n         int ip = 0;\n+        int last_ldvary_ip = -1;\n         vir_for_each_inst_inorder(inst, c) {\n                 inst->ip = ip++;\n+\n+                /* ldunif(a) always write to a temporary, so we have\n+                 * liveness info available to decide if rf0 is\n+                 * available for them, however, ldvary is different:\n+                 * it always writes to rf0 directly so we don't have\n+                 * liveness information for its implicit rf0 write.\n+                 *\n+                 * That means the allocator may assign rf0 to a temp\n+                 * that is defined while an implicit rf0 write from\n+                 * ldvary is still live. We fix that by manually\n+                 * tracking rf0 live ranges from ldvary instructions.\n+                 */\n+                if (inst->qpu.sig.ldvary)\n+                        last_ldvary_ip = ip;\n+\n                 update_graph_and_reg_classes_for_inst(c, acc_nodes,\n-                                                      implicit_rf_nodes, inst);\n+                                                      implicit_rf_nodes,\n+                                                      last_ldvary_ip, inst);\n         }\n \n         /* Set the register classes for all our temporaries in the graph */\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0056-broadcom-compiler-convert-mul-to-add-when-needed-to-.patch",
    "content": "From cbaa469c09974c1574b16f559173694904fe1bb0 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Mon, 25 Oct 2021 09:38:57 +0200\nSubject: [PATCH 056/142] broadcom/compiler: convert mul to add when needed to\n allow merge\n\nV3D 7.x added 'mov' opcodes to the ADD alu, so now it is possible to\nmove these to the ADD alu to facilitate merging them with other MUL\ninstructions.\n---\n src/broadcom/compiler/qpu_schedule.c | 102 ++++++++++++++++++++++++---\n 1 file changed, 94 insertions(+), 8 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex 334ffdc6d58..caa84254998 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -1086,6 +1086,57 @@ qpu_convert_add_to_mul(struct v3d_qpu_instr *inst)\n         inst->alu.add.b.unpack = V3D_QPU_UNPACK_NONE;\n }\n \n+static bool\n+can_do_mul_as_add(const struct v3d_device_info *devinfo, enum v3d_qpu_mul_op op)\n+{\n+        switch (op) {\n+        case V3D_QPU_M_MOV:\n+        case V3D_QPU_M_FMOV:\n+                return devinfo->ver >= 71;\n+        default:\n+                return false;\n+        }\n+}\n+\n+static enum v3d_qpu_mul_op\n+mul_op_as_add_op(enum v3d_qpu_mul_op op)\n+{\n+        switch (op) {\n+        case V3D_QPU_M_MOV:\n+                return V3D_QPU_A_MOV;\n+        case V3D_QPU_M_FMOV:\n+                return V3D_QPU_A_FMOV;\n+        default:\n+                unreachable(\"unexpected mov opcode\");\n+        }\n+}\n+\n+static void\n+qpu_convert_mul_to_add(struct v3d_qpu_instr *inst)\n+{\n+        STATIC_ASSERT(sizeof(inst->alu.add) == sizeof(inst->alu.mul));\n+        assert(inst->alu.mul.op != V3D_QPU_M_NOP);\n+        assert(inst->alu.add.op == V3D_QPU_A_NOP);\n+\n+        memcpy(&inst->alu.add, &inst->alu.mul, sizeof(inst->alu.add));\n+        inst->alu.add.op = mul_op_as_add_op(inst->alu.mul.op);\n+        inst->alu.mul.op = V3D_QPU_M_NOP;\n+\n+        inst->flags.ac = inst->flags.mc;\n+        inst->flags.apf = inst->flags.mpf;\n+        inst->flags.auf = inst->flags.muf;\n+        inst->flags.mc = V3D_QPU_COND_NONE;\n+        inst->flags.mpf = V3D_QPU_PF_NONE;\n+        inst->flags.muf = V3D_QPU_UF_NONE;\n+\n+        inst->alu.add.output_pack = inst->alu.mul.output_pack;\n+        inst->alu.add.a.unpack = inst->alu.mul.a.unpack;\n+        inst->alu.add.b.unpack = inst->alu.mul.b.unpack;\n+        inst->alu.mul.output_pack = V3D_QPU_PACK_NONE;\n+        inst->alu.mul.a.unpack = V3D_QPU_UNPACK_NONE;\n+        inst->alu.mul.b.unpack = V3D_QPU_UNPACK_NONE;\n+}\n+\n static bool\n qpu_merge_inst(const struct v3d_device_info *devinfo,\n                struct v3d_qpu_instr *result,\n@@ -1151,17 +1202,52 @@ qpu_merge_inst(const struct v3d_device_info *devinfo,\n                 }\n         }\n \n+        struct v3d_qpu_instr add_inst;\n         if (b->alu.mul.op != V3D_QPU_M_NOP) {\n-                if (a->alu.mul.op != V3D_QPU_M_NOP)\n-                        return false;\n-                merge.alu.mul = b->alu.mul;\n+                if (a->alu.mul.op == V3D_QPU_M_NOP) {\n+                        merge.alu.mul = b->alu.mul;\n+\n+                        merge.flags.mc = b->flags.mc;\n+                        merge.flags.mpf = b->flags.mpf;\n+                        merge.flags.muf = b->flags.muf;\n+\n+                        mul_instr = b;\n+                        add_instr = a;\n+                }\n+                /* If a's mul op is used but its add op is not, then see if we\n+                 * can convert either a's mul op or b's mul op to an add op\n+                 * so we can merge.\n+                 */\n+                else if (a->alu.add.op == V3D_QPU_A_NOP &&\n+                         can_do_mul_as_add(devinfo, b->alu.mul.op)) {\n+                        add_inst = *b;\n+                        qpu_convert_mul_to_add(&add_inst);\n \n-                merge.flags.mc = b->flags.mc;\n-                merge.flags.mpf = b->flags.mpf;\n-                merge.flags.muf = b->flags.muf;\n+                        merge.alu.add = add_inst.alu.add;\n \n-                mul_instr = b;\n-                add_instr = a;\n+                        merge.flags.ac = b->flags.mc;\n+                        merge.flags.apf = b->flags.mpf;\n+                        merge.flags.auf = b->flags.muf;\n+\n+                        mul_instr = a;\n+                        add_instr = &add_inst;\n+                } else if (a->alu.add.op == V3D_QPU_A_NOP &&\n+                           can_do_mul_as_add(devinfo, a->alu.mul.op)) {\n+                        add_inst = *a;\n+                        qpu_convert_mul_to_add(&add_inst);\n+\n+                        merge = add_inst;\n+                        merge.alu.mul = b->alu.mul;\n+\n+                        merge.flags.mc = b->flags.mc;\n+                        merge.flags.mpf = b->flags.mpf;\n+                        merge.flags.muf = b->flags.muf;\n+\n+                        mul_instr = b;\n+                        add_instr = &add_inst;\n+                } else {\n+                        return false;\n+                }\n         }\n \n         /* V3D 4.x and earlier use muxes to select the inputs for the ALUs and\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0057-broadcom-compiler-implement-small-immediates-for-v71.patch",
    "content": "From b59b3725fb16f4ab1ac0db86a5452a4ed6176074 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 3 Nov 2021 10:34:19 +0100\nSubject: [PATCH 057/142] broadcom/compiler: implement small immediates for v71\n\n---\n src/broadcom/compiler/qpu_schedule.c          | 90 +++++++++++++------\n src/broadcom/compiler/qpu_validate.c          | 20 ++++-\n .../compiler/vir_opt_small_immediates.c       | 26 +++++-\n src/broadcom/compiler/vir_to_qpu.c            | 11 ++-\n src/broadcom/qpu/qpu_disasm.c                 |  1 -\n src/broadcom/qpu/qpu_instr.c                  |  8 +-\n src/broadcom/qpu/qpu_instr.h                  |  2 +-\n src/broadcom/qpu/qpu_pack.c                   | 36 ++++----\n 8 files changed, 139 insertions(+), 55 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex caa84254998..bd1c920848a 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -714,7 +714,6 @@ qpu_instruction_uses_rf(const struct v3d_device_info *devinfo,\n                     !inst->sig.small_imm_b && (inst->raddr_b == waddr))\n                         return true;\n         } else {\n-                /* FIXME: skip if small immediate */\n                 if (v3d71_qpu_reads_raddr(inst, waddr))\n                         return true;\n         }\n@@ -948,10 +947,11 @@ qpu_raddrs_used(const struct v3d_qpu_instr *a,\n         return raddrs_used;\n }\n \n-/* Take two instructions and attempt to merge their raddr fields\n- * into one merged instruction. Returns false if the two instructions\n- * access more than two different rf registers between them, or more\n- * than one rf register and one small immediate.\n+/* Takes two instructions and attempts to merge their raddr fields (including\n+ * small immediates) into one merged instruction. For V3D 4.x, returns false\n+ * if the two instructions access more than two different rf registers between\n+ * them, or more than one rf register and one small immediate. For 7.x returns\n+ * false if both instructions use small immediates.\n  */\n static bool\n qpu_merge_raddrs(struct v3d_qpu_instr *result,\n@@ -959,6 +959,27 @@ qpu_merge_raddrs(struct v3d_qpu_instr *result,\n                  const struct v3d_qpu_instr *mul_instr,\n                  const struct v3d_device_info *devinfo)\n {\n+        if (devinfo->ver >= 71) {\n+                assert(add_instr->sig.small_imm_a +\n+                       add_instr->sig.small_imm_b <= 1);\n+                assert(add_instr->sig.small_imm_c +\n+                       add_instr->sig.small_imm_d == 0);\n+                assert(mul_instr->sig.small_imm_a +\n+                       mul_instr->sig.small_imm_b == 0);\n+                assert(mul_instr->sig.small_imm_c +\n+                       mul_instr->sig.small_imm_d <= 1);\n+\n+                result->sig.small_imm_a = add_instr->sig.small_imm_a;\n+                result->sig.small_imm_b = add_instr->sig.small_imm_b;\n+                result->sig.small_imm_c = mul_instr->sig.small_imm_c;\n+                result->sig.small_imm_d = mul_instr->sig.small_imm_d;\n+\n+                return (result->sig.small_imm_a +\n+                        result->sig.small_imm_b +\n+                        result->sig.small_imm_c +\n+                        result->sig.small_imm_d) <= 1;\n+        }\n+\n         assert(devinfo->ver <= 42);\n \n         uint64_t raddrs_used = qpu_raddrs_used(add_instr, mul_instr);\n@@ -1060,7 +1081,8 @@ add_op_as_mul_op(enum v3d_qpu_add_op op)\n }\n \n static void\n-qpu_convert_add_to_mul(struct v3d_qpu_instr *inst)\n+qpu_convert_add_to_mul(const struct v3d_device_info *devinfo,\n+                       struct v3d_qpu_instr *inst)\n {\n         STATIC_ASSERT(sizeof(inst->alu.mul) == sizeof(inst->alu.add));\n         assert(inst->alu.add.op != V3D_QPU_A_NOP);\n@@ -1084,6 +1106,18 @@ qpu_convert_add_to_mul(struct v3d_qpu_instr *inst)\n         inst->alu.add.output_pack = V3D_QPU_PACK_NONE;\n         inst->alu.add.a.unpack = V3D_QPU_UNPACK_NONE;\n         inst->alu.add.b.unpack = V3D_QPU_UNPACK_NONE;\n+\n+        if (devinfo->ver >= 71) {\n+                assert(!inst->sig.small_imm_c && !inst->sig.small_imm_d);\n+                assert(inst->sig.small_imm_a + inst->sig.small_imm_b <= 1);\n+                if (inst->sig.small_imm_a) {\n+                        inst->sig.small_imm_c = true;\n+                        inst->sig.small_imm_a = false;\n+                } else if (inst->sig.small_imm_b) {\n+                        inst->sig.small_imm_d = true;\n+                        inst->sig.small_imm_b = false;\n+                }\n+        }\n }\n \n static bool\n@@ -1135,6 +1169,16 @@ qpu_convert_mul_to_add(struct v3d_qpu_instr *inst)\n         inst->alu.mul.output_pack = V3D_QPU_PACK_NONE;\n         inst->alu.mul.a.unpack = V3D_QPU_UNPACK_NONE;\n         inst->alu.mul.b.unpack = V3D_QPU_UNPACK_NONE;\n+\n+        assert(!inst->sig.small_imm_a && !inst->sig.small_imm_b);\n+        assert(inst->sig.small_imm_c + inst->sig.small_imm_d <= 1);\n+        if (inst->sig.small_imm_c) {\n+                inst->sig.small_imm_a = true;\n+                inst->sig.small_imm_c = false;\n+        } else if (inst->sig.small_imm_d) {\n+                inst->sig.small_imm_b = true;\n+                inst->sig.small_imm_d = false;\n+        }\n }\n \n static bool\n@@ -1173,20 +1217,20 @@ qpu_merge_inst(const struct v3d_device_info *devinfo,\n                 else if (a->alu.mul.op == V3D_QPU_M_NOP &&\n                          can_do_add_as_mul(b->alu.add.op)) {\n                         mul_inst = *b;\n-                        qpu_convert_add_to_mul(&mul_inst);\n+                        qpu_convert_add_to_mul(devinfo, &mul_inst);\n \n                         merge.alu.mul = mul_inst.alu.mul;\n \n-                        merge.flags.mc = b->flags.ac;\n-                        merge.flags.mpf = b->flags.apf;\n-                        merge.flags.muf = b->flags.auf;\n+                        merge.flags.mc = mul_inst.flags.mc;\n+                        merge.flags.mpf = mul_inst.flags.mpf;\n+                        merge.flags.muf = mul_inst.flags.muf;\n \n                         add_instr = a;\n                         mul_instr = &mul_inst;\n                 } else if (a->alu.mul.op == V3D_QPU_M_NOP &&\n                            can_do_add_as_mul(a->alu.add.op)) {\n                         mul_inst = *a;\n-                        qpu_convert_add_to_mul(&mul_inst);\n+                        qpu_convert_add_to_mul(devinfo, &mul_inst);\n \n                         merge = mul_inst;\n                         merge.alu.add = b->alu.add;\n@@ -1225,9 +1269,9 @@ qpu_merge_inst(const struct v3d_device_info *devinfo,\n \n                         merge.alu.add = add_inst.alu.add;\n \n-                        merge.flags.ac = b->flags.mc;\n-                        merge.flags.apf = b->flags.mpf;\n-                        merge.flags.auf = b->flags.muf;\n+                        merge.flags.ac = add_inst.flags.ac;\n+                        merge.flags.apf = add_inst.flags.apf;\n+                        merge.flags.auf = add_inst.flags.auf;\n \n                         mul_instr = a;\n                         add_instr = &add_inst;\n@@ -1252,17 +1296,12 @@ qpu_merge_inst(const struct v3d_device_info *devinfo,\n \n         /* V3D 4.x and earlier use muxes to select the inputs for the ALUs and\n          * they have restrictions on the number of raddrs that can be adressed\n-         * in a single instruction.\n-         *\n-         * FIXME: for V3D 7.x we can't merge instructions if they address more\n-         * than one small immediate. For now, we don't support small immediates,\n-         * so it is not a problem.\n+         * in a single instruction. In V3D 7.x, we don't have that restriction,\n+         * but we are still limited to a single small immediate per instruction.\n          */\n-        if (devinfo->ver <= 42) {\n-                if (add_instr && mul_instr &&\n-                    !qpu_merge_raddrs(&merge, add_instr, mul_instr, devinfo)) {\n-                                return false;\n-                }\n+        if (add_instr && mul_instr &&\n+            !qpu_merge_raddrs(&merge, add_instr, mul_instr, devinfo)) {\n+                return false;\n         }\n \n         merge.sig.thrsw |= b->sig.thrsw;\n@@ -1273,7 +1312,6 @@ qpu_merge_inst(const struct v3d_device_info *devinfo,\n         merge.sig.ldtmu |= b->sig.ldtmu;\n         merge.sig.ldvary |= b->sig.ldvary;\n         merge.sig.ldvpm |= b->sig.ldvpm;\n-        merge.sig.small_imm_b |= b->sig.small_imm_b;\n         merge.sig.ldtlb |= b->sig.ldtlb;\n         merge.sig.ldtlbu |= b->sig.ldtlbu;\n         merge.sig.ucb |= b->sig.ucb;\n@@ -1933,8 +1971,6 @@ qpu_inst_valid_in_thrend_slot(struct v3d_compile *c,\n                 if (c->devinfo->ver >= 71) {\n                         /* RF2-3 might be overwritten during the delay slots by\n                          * fragment shader setup.\n-                         *\n-                         * FIXME: handle small immediate cases\n                          */\n                         if (v3d71_qpu_reads_raddr(inst, 2) ||\n                             v3d71_qpu_reads_raddr(inst, 3)) {\ndiff --git a/src/broadcom/compiler/qpu_validate.c b/src/broadcom/compiler/qpu_validate.c\nindex fde6695d59b..41070484286 100644\n--- a/src/broadcom/compiler/qpu_validate.c\n+++ b/src/broadcom/compiler/qpu_validate.c\n@@ -116,8 +116,24 @@ qpu_validate_inst(struct v3d_qpu_validate_state *state, struct qinst *qinst)\n                 return;\n \n         if (devinfo->ver < 71) {\n-           if (inst->sig.small_imm_a || inst->sig.small_imm_c || inst->sig.small_imm_d)\n-              fail_instr(state, \"small imm a/c/d added after V3D 7.1\");\n+                if (inst->sig.small_imm_a || inst->sig.small_imm_c ||\n+                    inst->sig.small_imm_d) {\n+                        fail_instr(state, \"small imm a/c/d added after V3D 7.1\");\n+                }\n+        } else {\n+                if ((inst->sig.small_imm_a || inst->sig.small_imm_b) &&\n+                    !vir_is_add(qinst)) {\n+                        fail_instr(state, \"small imm a/b used but no ADD inst\");\n+                }\n+                if ((inst->sig.small_imm_c || inst->sig.small_imm_d) &&\n+                    !vir_is_mul(qinst)) {\n+                        fail_instr(state, \"small imm c/d used but no MUL inst\");\n+                }\n+                if (inst->sig.small_imm_a + inst->sig.small_imm_b +\n+                    inst->sig.small_imm_c + inst->sig.small_imm_d > 1) {\n+                        fail_instr(state, \"only one small immediate can be \"\n+                                   \"enabled per instruction\");\n+                }\n         }\n \n         /* LDVARY writes r5 two instructions later and LDUNIF writes\ndiff --git a/src/broadcom/compiler/vir_opt_small_immediates.c b/src/broadcom/compiler/vir_opt_small_immediates.c\nindex df0d6c36c9b..ed5bc011964 100644\n--- a/src/broadcom/compiler/vir_opt_small_immediates.c\n+++ b/src/broadcom/compiler/vir_opt_small_immediates.c\n@@ -44,7 +44,9 @@ vir_opt_small_immediates(struct v3d_compile *c)\n                 /* The small immediate value sits in the raddr B field, so we\n                  * can't have 2 small immediates in one instruction (unless\n                  * they're the same value, but that should be optimized away\n-                 * elsewhere).\n+                 * elsewhere). Since 7.x we can encode small immediates in\n+                 * any raddr field, but each instruction can still only use\n+                 * one.\n                  */\n                 bool uses_small_imm = false;\n                 for (int i = 0; i < vir_get_nsrc(inst); i++) {\n@@ -80,7 +82,22 @@ vir_opt_small_immediates(struct v3d_compile *c)\n                          */\n                         struct v3d_qpu_sig new_sig = inst->qpu.sig;\n                         uint32_t sig_packed;\n-                        new_sig.small_imm_b = true;\n+                        if (c->devinfo->ver <= 42) {\n+                                new_sig.small_imm_b = true;\n+                        } else {\n+                               if (vir_is_add(inst)) {\n+                                       if (i == 0)\n+                                               new_sig.small_imm_a = true;\n+                                       else\n+                                               new_sig.small_imm_b = true;\n+                               } else {\n+                                       if (i == 0)\n+                                               new_sig.small_imm_c = true;\n+                                       else\n+                                               new_sig.small_imm_d = true;\n+                               }\n+                        }\n+\n                         if (!v3d_qpu_sig_pack(c->devinfo, &new_sig, &sig_packed))\n                                 continue;\n \n@@ -89,7 +106,10 @@ vir_opt_small_immediates(struct v3d_compile *c)\n                                 vir_dump_inst(c, inst);\n                                 fprintf(stderr, \"\\n\");\n                         }\n-                        inst->qpu.sig.small_imm_b = true;\n+                        inst->qpu.sig.small_imm_a = new_sig.small_imm_a;\n+                        inst->qpu.sig.small_imm_b = new_sig.small_imm_b;\n+                        inst->qpu.sig.small_imm_c = new_sig.small_imm_c;\n+                        inst->qpu.sig.small_imm_d = new_sig.small_imm_d;\n                         inst->qpu.raddr_b = packed;\n \n                         inst->src[i].file = QFILE_SMALL_IMM;\ndiff --git a/src/broadcom/compiler/vir_to_qpu.c b/src/broadcom/compiler/vir_to_qpu.c\nindex cbbb495592b..4ed184cbbcb 100644\n--- a/src/broadcom/compiler/vir_to_qpu.c\n+++ b/src/broadcom/compiler/vir_to_qpu.c\n@@ -89,8 +89,15 @@ new_qpu_nop_before(struct qinst *inst)\n static void\n v3d71_set_src(struct v3d_qpu_instr *instr, uint8_t *raddr, struct qpu_reg src)\n {\n-        if (src.smimm)\n-                unreachable(\"v3d71_set_src: pending handling small immediates\");\n+        /* If we have a small immediate move it from inst->raddr_b to the\n+         * corresponding raddr.\n+         */\n+        if (src.smimm) {\n+                assert(instr->sig.small_imm_a || instr->sig.small_imm_b ||\n+                       instr->sig.small_imm_c || instr->sig.small_imm_d);\n+                *raddr = instr->raddr_b;\n+                return;\n+        }\n \n         assert(!src.magic);\n         *raddr = src.index;\ndiff --git a/src/broadcom/qpu/qpu_disasm.c b/src/broadcom/qpu/qpu_disasm.c\nindex b613de781dc..c1590a760de 100644\n--- a/src/broadcom/qpu/qpu_disasm.c\n+++ b/src/broadcom/qpu/qpu_disasm.c\n@@ -113,7 +113,6 @@ v3d71_qpu_disasm_raddr(struct disasm_state *disasm,\n         }\n \n         if (is_small_imm) {\n-                unreachable(\"Pending handling small immediates\");\n                 uint32_t val;\n                 ASSERTED bool ok =\n                         v3d_qpu_small_imm_unpack(disasm->devinfo,\ndiff --git a/src/broadcom/qpu/qpu_instr.c b/src/broadcom/qpu/qpu_instr.c\nindex f54ce7210fb..c30f4bbbccf 100644\n--- a/src/broadcom/qpu/qpu_instr.c\n+++ b/src/broadcom/qpu/qpu_instr.c\n@@ -975,10 +975,10 @@ v3d71_qpu_reads_raddr(const struct v3d_qpu_instr *inst, uint8_t raddr)\n         int add_nsrc = v3d_qpu_add_op_num_src(inst->alu.add.op);\n         int mul_nsrc = v3d_qpu_mul_op_num_src(inst->alu.mul.op);\n \n-        return (add_nsrc > 0 && inst->alu.add.a.raddr == raddr) ||\n-               (add_nsrc > 1 && inst->alu.add.b.raddr == raddr) ||\n-               (mul_nsrc > 0 && inst->alu.mul.a.raddr == raddr) ||\n-               (mul_nsrc > 1 && inst->alu.mul.b.raddr == raddr);\n+        return (add_nsrc > 0 && !inst->sig.small_imm_a && inst->alu.add.a.raddr == raddr) ||\n+               (add_nsrc > 1 && !inst->sig.small_imm_b && inst->alu.add.b.raddr == raddr) ||\n+               (mul_nsrc > 0 && !inst->sig.small_imm_c && inst->alu.mul.a.raddr == raddr) ||\n+               (mul_nsrc > 1 && !inst->sig.small_imm_d && inst->alu.mul.b.raddr == raddr);\n }\n \n bool\ndiff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h\nindex dece45c5c54..d408fb426fa 100644\n--- a/src/broadcom/qpu/qpu_instr.h\n+++ b/src/broadcom/qpu/qpu_instr.h\n@@ -402,7 +402,7 @@ struct v3d_qpu_instr {\n         uint8_t sig_addr;\n         bool sig_magic; /* If the signal writes to a magic address */\n         uint8_t raddr_a; /* V3D 4.x */\n-        uint8_t raddr_b; /* V3D 4.x*/\n+        uint8_t raddr_b; /* V3D 4.x (holds packed small immediate in 7.x too) */\n         struct v3d_qpu_flags flags;\n \n         union {\ndiff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c\nindex ed5a8bc667d..7984712d527 100644\n--- a/src/broadcom/qpu/qpu_pack.c\n+++ b/src/broadcom/qpu/qpu_pack.c\n@@ -1218,16 +1218,11 @@ v3d71_qpu_add_unpack(const struct v3d_device_info *devinfo, uint64_t packed_inst\n \n         instr->alu.add.op = desc->op;\n \n-        /* FADD/FADDNF and FMIN/FMAX are determined by the orders of the\n+        /* FADD/FADDNF and FMIN/FMAX are determined by the order of the\n          * operands.\n          */\n-        /* FIXME: for now hardcoded values, until we got the small_imm support\n-         * in place\n-         */\n-        uint32_t small_imm_a = 0;\n-        uint32_t small_imm_b = 0;\n-        if (small_imm_a * 256 + ((op >> 2) & 3) * 64 + raddr_a >\n-            small_imm_b *256 + (op & 3) * 64 + raddr_b) {\n+        if (instr->sig.small_imm_a * 256 + ((op >> 2) & 3) * 64 + raddr_a >\n+            instr->sig.small_imm_b * 256 + (op & 3) * 64 + raddr_b) {\n                 if (instr->alu.add.op == V3D_QPU_A_FMIN)\n                         instr->alu.add.op = V3D_QPU_A_FMAX;\n                 if (instr->alu.add.op == V3D_QPU_A_FADD)\n@@ -1858,11 +1853,6 @@ v3d71_qpu_add_pack(const struct v3d_device_info *devinfo,\n                 uint32_t output_pack;\n                 uint32_t a_unpack;\n                 uint32_t b_unpack;\n-                /* FIXME: for now hardcoded values, until we got the small_imm\n-                 * support in place\n-                 */\n-                uint32_t small_imm_a = 0;\n-                uint32_t small_imm_b = 0;\n \n                 if (instr->alu.add.op != V3D_QPU_A_FCMP) {\n                         if (!v3d_qpu_float32_pack_pack(instr->alu.add.output_pack,\n@@ -1886,8 +1876,8 @@ v3d71_qpu_add_pack(const struct v3d_device_info *devinfo,\n                  * distinguished by which order their operands come in.\n                  */\n                 bool ordering =\n-                        small_imm_a * 256 + a_unpack * 64 + raddr_a >\n-                        small_imm_b * 256 + b_unpack * 64 + raddr_b;\n+                        instr->sig.small_imm_a * 256 + a_unpack * 64 + raddr_a >\n+                        instr->sig.small_imm_b * 256 + b_unpack * 64 + raddr_b;\n                 if (((instr->alu.add.op == V3D_QPU_A_FMIN ||\n                       instr->alu.add.op == V3D_QPU_A_FADD) && ordering) ||\n                     ((instr->alu.add.op == V3D_QPU_A_FMAX ||\n@@ -1901,6 +1891,22 @@ v3d71_qpu_add_pack(const struct v3d_device_info *devinfo,\n                         temp = raddr_a;\n                         raddr_a = raddr_b;\n                         raddr_b = temp;\n+\n+                        /* If we are swapping raddr_a/b we also need to swap\n+                         * small_imm_a/b.\n+                         */\n+                        if (instr->sig.small_imm_a || instr->sig.small_imm_b) {\n+                                assert(instr->sig.small_imm_a !=\n+                                       instr->sig.small_imm_b);\n+                                struct v3d_qpu_sig new_sig = instr->sig;\n+                                new_sig.small_imm_a = !instr->sig.small_imm_a;\n+                                new_sig.small_imm_b = !instr->sig.small_imm_b;\n+                                uint32_t sig;\n+                                if (!v3d_qpu_sig_pack(devinfo, &new_sig, &sig))\n+                                    return false;\n+                            *packed_instr &= ~V3D_QPU_SIG_MASK;\n+                            *packed_instr |= QPU_SET_FIELD(sig, V3D_QPU_SIG);\n+                        }\n                 }\n \n                 opcode |= a_unpack << 2;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0058-broadcom-compiler-update-thread-end-restrictions-for.patch",
    "content": "From 3af87d2672da7c928ecf8a0a1cd1bef8a6729364 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Mon, 22 Nov 2021 12:56:03 +0100\nSubject: [PATCH 058/142] broadcom/compiler: update thread end restrictions for\n v7.x\n\nIn 4.x it is not allowed to write to the register file in the last\n3 instructions, but in 7.x we only have this restriction in the\nthread end instruction itself, and only if the write comes from\nthe ALU ports.\n---\n src/broadcom/compiler/qpu_schedule.c | 31 ++++++++++++++++++++--------\n 1 file changed, 22 insertions(+), 9 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex bd1c920848a..cba16c77d67 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -1938,17 +1938,30 @@ qpu_inst_valid_in_thrend_slot(struct v3d_compile *c,\n                         return false;\n                 }\n \n-                /* No writing physical registers at the end. */\n-                bool add_is_nop = inst->alu.add.op == V3D_QPU_A_NOP;\n-                bool mul_is_nop = inst->alu.mul.op == V3D_QPU_M_NOP;\n-                if ((!add_is_nop && !inst->alu.add.magic_write) ||\n-                    (!mul_is_nop && !inst->alu.mul.magic_write)) {\n-                        return false;\n+                if (c->devinfo->ver <= 42) {\n+                        /* No writing physical registers at the end. */\n+                        bool add_is_nop = inst->alu.add.op == V3D_QPU_A_NOP;\n+                        bool mul_is_nop = inst->alu.mul.op == V3D_QPU_M_NOP;\n+                        if ((!add_is_nop && !inst->alu.add.magic_write) ||\n+                            (!mul_is_nop && !inst->alu.mul.magic_write)) {\n+                                return false;\n+                        }\n+\n+                        if (v3d_qpu_sig_writes_address(c->devinfo, &inst->sig) &&\n+                            !inst->sig_magic) {\n+                                return false;\n+                        }\n                 }\n \n-                if (v3d_qpu_sig_writes_address(c->devinfo, &inst->sig) &&\n-                    !inst->sig_magic) {\n-                        return false;\n+                if (c->devinfo->ver >= 71) {\n+                        /* The thread end instruction must not write to the\n+                         * register file via the add/mul ALUs.\n+                         */\n+                        if (slot == 0 &&\n+                            (!inst->alu.add.magic_write ||\n+                             !inst->alu.mul.magic_write)) {\n+                                return false;\n+                        }\n                 }\n \n                 if (c->devinfo->ver < 40 && inst->alu.add.op == V3D_QPU_A_SETMSF)\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0059-broadcom-compiler-update-ldvary-thread-switch-delay-.patch",
    "content": "From 7cfd5b808bb2f1cb17f57435cb5d411c4ac3aa6c Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 23 Nov 2021 10:04:49 +0100\nSubject: [PATCH 059/142] broadcom/compiler: update ldvary thread switch delay\n slot restriction for v7.x\n\nIn V3D 7.x we don't have accumulators which would not survive a thread\nswitch, so the only restriction is that ldvary can't be placed in the second\ndelay slot of a thread switch.\n\nshader-db results for UnrealEngine4 shaders:\n\ntotal instructions in shared programs: 446458 -> 446401 (-0.01%)\ninstructions in affected programs: 13492 -> 13435 (-0.42%)\nhelped: 58\nHURT: 3\nInstructions are helped.\n\ntotal nops in shared programs: 19571 -> 19541 (-0.15%)\nnops in affected programs: 161 -> 131 (-18.63%)\nhelped: 30\nHURT: 0\nNops are helped.\n---\n src/broadcom/compiler/qpu_schedule.c | 33 +++++++++++++++++++++-------\n src/broadcom/compiler/qpu_validate.c | 10 +++++++--\n 2 files changed, 33 insertions(+), 10 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex cba16c77d67..32f651851cf 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -1491,11 +1491,20 @@ retry:\n                          * ldvary now if the follow-up fixup would place\n                          * it in the delay slots of a thrsw, which is not\n                          * allowed and would prevent the fixup from being\n-                         * successful.\n+                         * successful. In V3D 7.x we can allow this to happen\n+                         * as long as it is not the last delay slot.\n                          */\n-                        if (inst->sig.ldvary &&\n-                            scoreboard->last_thrsw_tick + 2 >= scoreboard->tick - 1) {\n-                                continue;\n+                        if (inst->sig.ldvary) {\n+                                if (c->devinfo->ver <= 42 &&\n+                                    scoreboard->last_thrsw_tick + 2 >=\n+                                    scoreboard->tick - 1) {\n+                                        continue;\n+                                }\n+                                if (c->devinfo->ver >= 71 &&\n+                                    scoreboard->last_thrsw_tick + 2 ==\n+                                    scoreboard->tick - 1) {\n+                                        continue;\n+                                }\n                         }\n \n                         /* We can emit a new tmu lookup with a previous ldtmu\n@@ -2020,8 +2029,12 @@ qpu_inst_before_thrsw_valid_in_delay_slot(struct v3d_compile *c,\n         if (slot > 0 && v3d_qpu_instr_is_legacy_sfu(&qinst->qpu))\n                 return false;\n \n-        if (slot > 0 && qinst->qpu.sig.ldvary)\n-                return false;\n+        if (qinst->qpu.sig.ldvary) {\n+                if (c->devinfo->ver <= 42 && slot > 0)\n+                        return false;\n+                if (c->devinfo->ver >= 71 && slot == 2)\n+                        return false;\n+        }\n \n         /* unifa and the following 3 instructions can't overlap a\n          * thread switch/end. The docs further clarify that this means\n@@ -2618,9 +2631,13 @@ fixup_pipelined_ldvary(struct v3d_compile *c,\n \n         /* We can't put an ldvary in the delay slots of a thrsw. We should've\n          * prevented this when pairing up the ldvary with another instruction\n-         * and flagging it for a fixup.\n+         * and flagging it for a fixup. In V3D 7.x this is limited only to the\n+         * second delay slot.\n          */\n-        assert(scoreboard->last_thrsw_tick + 2 < scoreboard->tick - 1);\n+        assert((devinfo->ver <= 42 &&\n+                scoreboard->last_thrsw_tick + 2 < scoreboard->tick - 1) ||\n+               (devinfo->ver >= 71 &&\n+                scoreboard->last_thrsw_tick + 2 != scoreboard->tick - 1));\n \n         /* Move the ldvary to the previous instruction and remove it from the\n          * current one.\ndiff --git a/src/broadcom/compiler/qpu_validate.c b/src/broadcom/compiler/qpu_validate.c\nindex 41070484286..4f09aa8aef4 100644\n--- a/src/broadcom/compiler/qpu_validate.c\n+++ b/src/broadcom/compiler/qpu_validate.c\n@@ -215,8 +215,14 @@ qpu_validate_inst(struct v3d_qpu_validate_state *state, struct qinst *qinst)\n                                    \"SFU write started during THRSW delay slots \");\n                 }\n \n-                if (inst->sig.ldvary)\n-                        fail_instr(state, \"LDVARY during THRSW delay slots\");\n+                if (inst->sig.ldvary) {\n+                        if (devinfo->ver <= 42)\n+                                fail_instr(state, \"LDVARY during THRSW delay slots\");\n+                        if (devinfo->ver >= 71 &&\n+                            state->ip - state->last_thrsw_ip == 2) {\n+                                fail_instr(state, \"LDVARY in 2nd THRSW delay slot\");\n+                        }\n+                }\n         }\n \n         (void)qpu_magic_waddr_matches; /* XXX */\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0060-broadcom-compiler-lift-restriction-for-branch-msfign.patch",
    "content": "From ca4063d627cd31c589a8e8688f2876dd8211d1bc Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Thu, 25 Nov 2021 08:31:02 +0100\nSubject: [PATCH 060/142] broadcom/compiler: lift restriction for branch +\n msfign after setmsf for v7.x\n\n---\n src/broadcom/compiler/qpu_schedule.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex 32f651851cf..476eae691ab 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -2373,10 +2373,11 @@ emit_branch(struct v3d_compile *c,\n         assert(scoreboard->last_branch_tick + 3 < branch_tick);\n         assert(scoreboard->last_unifa_write_tick + 3 < branch_tick);\n \n-        /* Can't place a branch with msfign != 0 and cond != 0,2,3 after\n+        /* V3D 4.x can't place a branch with msfign != 0 and cond != 0,2,3 after\n          * setmsf.\n          */\n         bool is_safe_msf_branch =\n+                c->devinfo->ver >= 71 ||\n                 inst->qpu.branch.msfign == V3D_QPU_MSFIGN_NONE ||\n                 inst->qpu.branch.cond == V3D_QPU_BRANCH_COND_ALWAYS ||\n                 inst->qpu.branch.cond == V3D_QPU_BRANCH_COND_A0 ||\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0061-broadcom-compiler-start-allocating-from-RF-4-in-V7.x.patch",
    "content": "From 167510aa43bbcf06e57a64495cee40e8cdaf5f8b Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Fri, 26 Nov 2021 10:37:05 +0100\nSubject: [PATCH 061/142] broadcom/compiler: start allocating from RF 4 in V7.x\n\nIn V3D 4.x we start at RF3 so that we allocate RF0-2 only if there\naren't any other RFs available. This is useful with small shaders\nto ensure that our TLB writes don't use these registers because\nthese are the last instructions we emit in fragment shaders and\nthe last instructions in a program can't write to these registers,\nso if we do, we need to emit NOPs.\n\nIn V3D 7.x the registers affected by this restriction are RF2-3,\nso we choose to start at RF4.\n---\n src/broadcom/compiler/vir_register_allocate.c | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c\nindex 6f7b1ca0589..440b093a636 100644\n--- a/src/broadcom/compiler/vir_register_allocate.c\n+++ b/src/broadcom/compiler/vir_register_allocate.c\n@@ -1234,9 +1234,10 @@ v3d_register_allocate(struct v3d_compile *c)\n                 .phys_index = phys_index,\n                 .next_acc = 0,\n                 /* Start at RF3, to try to keep the TLB writes from using\n-                 * RF0-2.\n+                 * RF0-2. Start at RF4 in 7.x to prevent TLB writes from\n+                 * using RF2-3.\n                  */\n-                .next_phys = 3,\n+                .next_phys = c->devinfo->ver <= 42 ? 3 : 4,\n                 .nodes = &c->nodes,\n                 .devinfo = c->devinfo,\n         };\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0062-broadcom-compiler-validate-restrictions-after-TLB-Z-.patch",
    "content": "From d47ea903b96e43b07bdef21f8026da818e30fcd1 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Thu, 25 Nov 2021 13:00:34 +0100\nSubject: [PATCH 062/142] broadcom/compiler: validate restrictions after TLB Z\n write\n\n---\n src/broadcom/compiler/qpu_validate.c | 28 ++++++++++++++++++++++++++++\n 1 file changed, 28 insertions(+)\n\ndiff --git a/src/broadcom/compiler/qpu_validate.c b/src/broadcom/compiler/qpu_validate.c\nindex 4f09aa8aef4..1082fb7d50a 100644\n--- a/src/broadcom/compiler/qpu_validate.c\n+++ b/src/broadcom/compiler/qpu_validate.c\n@@ -41,6 +41,7 @@ struct v3d_qpu_validate_state {\n         int last_sfu_write;\n         int last_branch_ip;\n         int last_thrsw_ip;\n+        int first_tlb_z_write;\n \n         /* Set when we've found the last-THRSW signal, or if we were started\n          * in single-segment mode.\n@@ -110,11 +111,37 @@ static void\n qpu_validate_inst(struct v3d_qpu_validate_state *state, struct qinst *qinst)\n {\n         const struct v3d_device_info *devinfo = state->c->devinfo;\n+\n+        if (qinst->is_tlb_z_write && state->ip < state->first_tlb_z_write)\n+                state->first_tlb_z_write = state->ip;\n+\n         const struct v3d_qpu_instr *inst = &qinst->qpu;\n \n+        if (inst->type == V3D_QPU_INSTR_TYPE_BRANCH &&\n+            state->first_tlb_z_write >= 0 &&\n+            state->ip > state->first_tlb_z_write &&\n+            inst->branch.msfign != V3D_QPU_MSFIGN_NONE &&\n+            inst->branch.cond != V3D_QPU_BRANCH_COND_ALWAYS &&\n+            inst->branch.cond != V3D_QPU_BRANCH_COND_A0 &&\n+            inst->branch.cond != V3D_QPU_BRANCH_COND_NA0) {\n+                fail_instr(state, \"Implicit branch MSF read after TLB Z write\");\n+        }\n+\n         if (inst->type != V3D_QPU_INSTR_TYPE_ALU)\n                 return;\n \n+        if (inst->alu.add.op == V3D_QPU_A_SETMSF &&\n+            state->first_tlb_z_write >= 0 &&\n+            state->ip > state->first_tlb_z_write) {\n+                fail_instr(state, \"SETMSF after TLB Z write\");\n+        }\n+\n+        if (state->first_tlb_z_write >= 0 &&\n+            state->ip > state->first_tlb_z_write &&\n+            inst->alu.add.op == V3D_QPU_A_MSF) {\n+                fail_instr(state, \"MSF read after TLB Z write\");\n+        }\n+\n         if (devinfo->ver < 71) {\n                 if (inst->sig.small_imm_a || inst->sig.small_imm_c ||\n                     inst->sig.small_imm_d) {\n@@ -348,6 +375,7 @@ qpu_validate(struct v3d_compile *c)\n                 .last_sfu_write = -10,\n                 .last_thrsw_ip = -10,\n                 .last_branch_ip = -10,\n+                .first_tlb_z_write = INT_MAX,\n                 .ip = 0,\n \n                 .last_thrsw_found = !c->last_thrsw,\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0063-broadcom-compiler-lift-restriction-on-vpmwt-in-last-.patch",
    "content": "From 6cdf01fad49489b5fc66d231b527de5245d5de32 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Mon, 29 Nov 2021 13:23:11 +0100\nSubject: [PATCH 063/142] broadcom/compiler: lift restriction on vpmwt in last\n instruction for V3D 7.x\n\n---\n src/broadcom/compiler/qpu_schedule.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex 476eae691ab..77fb6a794e6 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -1934,7 +1934,7 @@ qpu_inst_valid_in_thrend_slot(struct v3d_compile *c,\n         if (slot > 0 && qinst->uniform != ~0)\n                 return false;\n \n-        if (v3d_qpu_waits_vpm(inst))\n+        if (c->devinfo->ver <= 42 && v3d_qpu_waits_vpm(inst))\n                 return false;\n \n         if (inst->sig.ldvary)\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0064-broadcom-compiler-fix-up-copy-propagation-for-v71.patch",
    "content": "From acc54637f0787ba4dc887130c25c628ccdaf4e38 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 9 Nov 2021 11:34:59 +0100\nSubject: [PATCH 064/142] broadcom/compiler: fix up copy propagation for v71\n\nUpdate rules for unsafe copy propagations to match v7.x.\n---\n .../compiler/vir_opt_copy_propagate.c         | 83 +++++++++++++------\n 1 file changed, 56 insertions(+), 27 deletions(-)\n\ndiff --git a/src/broadcom/compiler/vir_opt_copy_propagate.c b/src/broadcom/compiler/vir_opt_copy_propagate.c\nindex c4aa7255a17..1260838ca05 100644\n--- a/src/broadcom/compiler/vir_opt_copy_propagate.c\n+++ b/src/broadcom/compiler/vir_opt_copy_propagate.c\n@@ -35,7 +35,7 @@\n #include \"v3d_compiler.h\"\n \n static bool\n-is_copy_mov(struct qinst *inst)\n+is_copy_mov(const struct v3d_device_info *devinfo, struct qinst *inst)\n {\n         if (!inst)\n                 return false;\n@@ -62,36 +62,65 @@ is_copy_mov(struct qinst *inst)\n                 return false;\n         }\n \n-        switch (inst->src[0].file) {\n-        case QFILE_MAGIC:\n-                /* No copy propagating from R3/R4/R5 -- the MOVs from those\n-                 * are there to register allocate values produced into R3/4/5\n-                 * to other regs (though hopefully r3/4/5).\n-                 */\n-                switch (inst->src[0].index) {\n-                case V3D_QPU_WADDR_R3:\n-                case V3D_QPU_WADDR_R4:\n-                case V3D_QPU_WADDR_R5:\n-                        return false;\n+        if (devinfo->ver <= 42) {\n+                switch (inst->src[0].file) {\n+                case QFILE_MAGIC:\n+                        /* No copy propagating from R3/R4/R5 -- the MOVs from\n+                         * those are there to register allocate values produced\n+                         * into R3/4/5 to other regs (though hopefully r3/4/5).\n+                         */\n+                        switch (inst->src[0].index) {\n+                        case V3D_QPU_WADDR_R3:\n+                        case V3D_QPU_WADDR_R4:\n+                        case V3D_QPU_WADDR_R5:\n+                                return false;\n+                        default:\n+                                break;\n+                        }\n+                        break;\n+\n+                case QFILE_REG:\n+                        switch (inst->src[0].index) {\n+                        case 0:\n+                        case 1:\n+                        case 2:\n+                                /* MOVs from rf0/1/2 are only to track the live\n+                                 * intervals for W/centroid W/Z.\n+                                 */\n+                                return false;\n+                        }\n+                        break;\n+\n                 default:\n                         break;\n                 }\n-                break;\n-\n-        case QFILE_REG:\n-                switch (inst->src[0].index) {\n-                case 0:\n-                case 1:\n-                case 2:\n-                        /* MOVs from rf0/1/2 are only to track the live\n+        } else {\n+                assert(devinfo->ver >= 71);\n+                switch (inst->src[0].file) {\n+                case QFILE_REG:\n+                        switch (inst->src[0].index) {\n+                        /* MOVs from rf1/2/3 are only to track the live\n                          * intervals for W/centroid W/Z.\n+                         *\n+                         * Note: rf0 can be implicitly written by ldvary\n+                         * (no temp involved), so it is not an SSA value and\n+                         * could clash with writes to other temps that are\n+                         * also allocated to rf0. In theory, that would mean\n+                         * that we can't copy propagate from it, but we handle\n+                         * this at register allocation time, preventing temps\n+                         * from being allocated to rf0 while the rf0 value from\n+                         * ldvary is still live.\n                          */\n-                        return false;\n-                }\n-                break;\n+                        case 1:\n+                        case 2:\n+                        case 3:\n+                                return false;\n+                        }\n+                        break;\n \n-        default:\n-                break;\n+                default:\n+                        break;\n+                }\n         }\n \n         return true;\n@@ -135,7 +164,7 @@ try_copy_prop(struct v3d_compile *c, struct qinst *inst, struct qinst **movs)\n                  */\n                 struct qinst *mov = movs[inst->src[i].index];\n                 if (!mov) {\n-                        if (!is_copy_mov(c->defs[inst->src[i].index]))\n+                        if (!is_copy_mov(c->devinfo, c->defs[inst->src[i].index]))\n                                 continue;\n                         mov = c->defs[inst->src[i].index];\n \n@@ -245,7 +274,7 @@ vir_opt_copy_propagate(struct v3d_compile *c)\n \n                         apply_kills(c, movs, inst);\n \n-                        if (is_copy_mov(inst))\n+                        if (is_copy_mov(c->devinfo, inst))\n                                 movs[inst->dst.index] = inst;\n                 }\n         }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0065-broadcom-qpu-new-packing-conversion-v71-instructions.patch",
    "content": "From c340f7f1eb4a1e5c0fafe1ea2f801f2ebaf82d8d Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Fri, 26 Nov 2021 01:24:12 +0100\nSubject: [PATCH 065/142] broadcom/qpu: new packing/conversion v71 instructions\n\nThis commits adds the qpu definitions for several new v71\ninstructions.\n\nPacking:\n  * vpack does a 2x32 to 2x16 bit integer pack\n  * v8pack: Pack 2 x 2x16 bit integers into 4x8 bits\n  * v10pack packs parts of 2 2x16 bit integer into r10g10b10a2.\n  * v11fpack packs parts of 2 2x16 bit float into r11g11b10 rounding\n    to nearest\n\nConversion to unorm/snorm:\n  * vftounorm8/vftosnorm8: converts from 2x16-bit floating point\n    to 2x8 bit unorm/snorm.\n  * ftounorm16/ftosnorm16: converts floating point to 16-bit\n    unorm/snorm\n  * vftounorm10lo: Convert 2x16-bit floating point to 2x10-bit unorm\n  * vftounorm10hi: Convert 2x16-bit floating point to one 2-bit and one 10-bit unorm\n---\n src/broadcom/qpu/qpu_instr.c | 20 ++++++++++++++++++++\n src/broadcom/qpu/qpu_instr.h | 12 ++++++++++++\n src/broadcom/qpu/qpu_pack.c  | 12 ++++++++++++\n 3 files changed, 44 insertions(+)\n\ndiff --git a/src/broadcom/qpu/qpu_instr.c b/src/broadcom/qpu/qpu_instr.c\nindex c30f4bbbccf..44f20618a5a 100644\n--- a/src/broadcom/qpu/qpu_instr.c\n+++ b/src/broadcom/qpu/qpu_instr.c\n@@ -179,6 +179,10 @@ v3d_qpu_add_op_name(enum v3d_qpu_add_op op)\n                 [V3D_QPU_A_UTOF] = \"utof\",\n                 [V3D_QPU_A_MOV] = \"mov\",\n                 [V3D_QPU_A_FMOV] = \"fmov\",\n+                [V3D_QPU_A_VPACK] = \"vpack\",\n+                [V3D_QPU_A_V8PACK] = \"v8pack\",\n+                [V3D_QPU_A_V10PACK] = \"v10pack\",\n+                [V3D_QPU_A_V11FPACK] = \"v11fpack\",\n         };\n \n         if (op >= ARRAY_SIZE(op_names))\n@@ -201,6 +205,12 @@ v3d_qpu_mul_op_name(enum v3d_qpu_mul_op op)\n                 [V3D_QPU_M_MOV] = \"mov\",\n                 [V3D_QPU_M_NOP] = \"nop\",\n                 [V3D_QPU_M_FMUL] = \"fmul\",\n+                [V3D_QPU_M_FTOUNORM16] = \"ftounorm16\",\n+                [V3D_QPU_M_FTOSNORM16] = \"ftosnorm16\",\n+                [V3D_QPU_M_VFTOUNORM8] = \"vftounorm8\",\n+                [V3D_QPU_M_VFTOSNORM8] = \"vftosnorm8\",\n+                [V3D_QPU_M_VFTOUNORM10LO] = \"vftounorm10lo\",\n+                [V3D_QPU_M_VFTOUNORM10HI] = \"vftounorm10hi\",\n         };\n \n         if (op >= ARRAY_SIZE(op_names))\n@@ -463,6 +473,10 @@ static const uint8_t add_op_args[] = {\n \n         [V3D_QPU_A_MOV] = D | A,\n         [V3D_QPU_A_FMOV] = D | A,\n+        [V3D_QPU_A_VPACK] = D | A | B,\n+        [V3D_QPU_A_V8PACK] = D | A | B,\n+        [V3D_QPU_A_V10PACK] = D | A | B,\n+        [V3D_QPU_A_V11FPACK] = D | A | B,\n };\n \n static const uint8_t mul_op_args[] = {\n@@ -476,6 +490,12 @@ static const uint8_t mul_op_args[] = {\n         [V3D_QPU_M_NOP] = 0,\n         [V3D_QPU_M_MOV] = D | A,\n         [V3D_QPU_M_FMUL] = D | A | B,\n+        [V3D_QPU_M_FTOUNORM16] = D | A,\n+        [V3D_QPU_M_FTOSNORM16] = D | A,\n+        [V3D_QPU_M_VFTOUNORM8] = D | A,\n+        [V3D_QPU_M_VFTOSNORM8] = D | A,\n+        [V3D_QPU_M_VFTOUNORM10LO] = D | A,\n+        [V3D_QPU_M_VFTOUNORM10HI] = D | A,\n };\n \n bool\ndiff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h\nindex d408fb426fa..56eee9f9cac 100644\n--- a/src/broadcom/qpu/qpu_instr.h\n+++ b/src/broadcom/qpu/qpu_instr.h\n@@ -231,6 +231,10 @@ enum v3d_qpu_add_op {\n         /* V3D 7.x */\n         V3D_QPU_A_FMOV,\n         V3D_QPU_A_MOV,\n+        V3D_QPU_A_VPACK,\n+        V3D_QPU_A_V8PACK,\n+        V3D_QPU_A_V10PACK,\n+        V3D_QPU_A_V11FPACK,\n };\n \n enum v3d_qpu_mul_op {\n@@ -244,6 +248,14 @@ enum v3d_qpu_mul_op {\n         V3D_QPU_M_MOV,\n         V3D_QPU_M_NOP,\n         V3D_QPU_M_FMUL,\n+\n+        /* V3D 7.x */\n+        V3D_QPU_M_FTOUNORM16,\n+        V3D_QPU_M_FTOSNORM16,\n+        V3D_QPU_M_VFTOUNORM8,\n+        V3D_QPU_M_VFTOSNORM8,\n+        V3D_QPU_M_VFTOUNORM10LO,\n+        V3D_QPU_M_VFTOUNORM10HI,\n };\n \n enum v3d_qpu_output_pack {\ndiff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c\nindex 7984712d527..6cd75adac6d 100644\n--- a/src/broadcom/qpu/qpu_pack.c\n+++ b/src/broadcom/qpu/qpu_pack.c\n@@ -783,6 +783,9 @@ static const struct opcode_desc add_ops_v71[] = {\n         { 246, 246, .raddr_mask = OP_RANGE(32, 34), V3D_QPU_A_ITOF, 71 },\n         { 246, 246, .raddr_mask = OP_RANGE(36, 38), V3D_QPU_A_UTOF, 71 },\n \n+        { 247, 247, .raddr_mask = ANYOPMASK, V3D_QPU_A_VPACK, 71 },\n+        { 248, 248, .raddr_mask = ANYOPMASK, V3D_QPU_A_V8PACK, 71 },\n+\n         { 249, 249, .raddr_mask = OP_RANGE(0, 2),   V3D_QPU_A_FMOV, 71 },\n         { 249, 249, .raddr_mask = OP_RANGE(4, 6),   V3D_QPU_A_FMOV, 71 },\n         { 249, 249, .raddr_mask = OP_RANGE(8, 10),  V3D_QPU_A_FMOV, 71 },\n@@ -797,6 +800,8 @@ static const struct opcode_desc add_ops_v71[] = {\n         { 249, 249, .raddr_mask = OP_MASK(15), V3D_QPU_A_MOV, 71 },\n         { 249, 249, .raddr_mask = OP_MASK(19), V3D_QPU_A_MOV, 71 },\n \n+        { 250, 250, .raddr_mask = ANYOPMASK, V3D_QPU_A_V10PACK, 71 },\n+        { 251, 251, .raddr_mask = ANYOPMASK, V3D_QPU_A_V11FPACK, 71 },\n };\n \n static const struct opcode_desc mul_ops_v71[] = {\n@@ -822,6 +827,13 @@ static const struct opcode_desc mul_ops_v71[] = {\n         { 14, 14, .raddr_mask = OP_MASK(15), V3D_QPU_M_MOV, 71 },\n         { 14, 14, .raddr_mask = OP_MASK(19), V3D_QPU_M_MOV, 71 },\n \n+        { 14, 14, .raddr_mask = OP_MASK(32), V3D_QPU_M_FTOUNORM16, 71 },\n+        { 14, 14, .raddr_mask = OP_MASK(33), V3D_QPU_M_FTOSNORM16, 71 },\n+        { 14, 14, .raddr_mask = OP_MASK(34), V3D_QPU_M_VFTOUNORM8, 71 },\n+        { 14, 14, .raddr_mask = OP_MASK(35), V3D_QPU_M_VFTOSNORM8, 71 },\n+        { 14, 14, .raddr_mask = OP_MASK(48), V3D_QPU_M_VFTOUNORM10LO, 71 },\n+        { 14, 14, .raddr_mask = OP_MASK(49), V3D_QPU_M_VFTOUNORM10HI, 71 },\n+\n         { 14, 14, .raddr_mask = OP_MASK(63), V3D_QPU_M_NOP, 71 },\n \n         { 16, 63, .raddr_mask = ANYOPMASK, V3D_QPU_M_FMUL },\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0066-nir-add-new-opcodes-to-map-new-v71-packing-conversio.patch",
    "content": "From 4f33de7771621e15aae3e3c60c09fd5a2f29bdac Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Tue, 30 Nov 2021 02:39:20 +0100\nSubject: [PATCH 066/142] nir: add new opcodes to map new v71\n packing/conversion instructions\n\nSince v71, broadcom hw include specific packing/conversion\ninstructions, so this commit adds opcodes to be able to make use of\nthem, specially for image stores:\n\n   * vftounorm8/vftosnorm8: 2x16-bit floating point to 2x8-bit\n     unorm/snorm\n   * ftounorm16/ftosnorm16: floating point to 16-bit unorm/snorm\n   * vftounorm10lo/vftounorm10hi: used to convert a floating point to\n     a r10g10b10a2 unorm\n\n   * v11fpack: packs 2 2x16 FP into R11G11B10.\n   * v10pack: pack 2 2x16 integer into R10G10B10A2\n   * v8pack: packs 2 2x16 bit integer into 4x8 bits.\n   * vpack: 2x32 bit to 2x16 integer pack\n\nFor the latter, it can be easly confused with the existing and general\npack_32_2x16_split. But note that this one receives two 16bit integer,\nand packs them on a 32bit integer. But broadcom opcode takes two 32bit\ninteger, takes the lower halfword, and packs them as 2x16 on a 32bit\ninteger.\n\nInterestingly broadcom also defines a similar one that packs the\nhigher halfword. Not used yet.\n\nFIXME: vftounorm10lo/hi constant expression implementation is somewhat\nconvoluted. It is likely that it could be implemented in a more easy\nway. But it works (passing the tests added with CTS issue #3372,\ncreated with this change in mind).\n---\n src/compiler/nir/nir_constant_expressions.py | 106 +++++++++++++++++++\n src/compiler/nir/nir_opcodes.py              |  44 ++++++++\n 2 files changed, 150 insertions(+)\n\ndiff --git a/src/compiler/nir/nir_constant_expressions.py b/src/compiler/nir/nir_constant_expressions.py\nindex e6383b67737..46395d79a89 100644\n--- a/src/compiler/nir/nir_constant_expressions.py\n+++ b/src/compiler/nir/nir_constant_expressions.py\n@@ -62,6 +62,8 @@ template = \"\"\"\\\n #include \"util/softfloat.h\"\n #include \"util/bigmath.h\"\n #include \"util/format/format_utils.h\"\n+#include \"util/format_r11g11b10f.h\"\n+#include \"util/u_math.h\"\n #include \"nir_constant_expressions.h\"\n \n /**\n@@ -277,6 +279,110 @@ unpack_half_1x16(uint16_t u)\n    return _mesa_half_to_float(u);\n }\n \n+/* Broadcom v3d specific instructions */\n+/**\n+ * Packs 2 2x16 floating split into a r11g11b10f\n+ */\n+static uint32_t v11fpack_v3d(const uint32_t src0,\n+                             const uint32_t src1)\n+{\n+   float rgb[3];\n+\n+   rgb[0] = unpack_half_1x16((src0 & 0xffff));\n+   rgb[1] = unpack_half_1x16((src0 >> 16));\n+   rgb[2] = unpack_half_1x16((src1 & 0xffff));\n+\n+   return float3_to_r11g11b10f(rgb);\n+}\n+\n+/**\n+  * The three methods below are basically wrappers over pack_s/unorm_1x8/1x16,\n+  * as it receives a uint16_t val instead of a float\n+  */\n+static uint8_t _mesa_half_to_snorm8(uint16_t val)\n+{\n+   float x = _mesa_half_to_float(val);\n+\n+   return pack_snorm_1x8(x);\n+}\n+\n+static uint16_t _mesa_float_to_snorm16(uint32_t val)\n+{\n+   union fi aux;\n+   aux.ui = val;\n+   return pack_snorm_1x16(aux.f);\n+}\n+\n+static uint16_t _mesa_float_to_unorm16(uint32_t val)\n+{\n+   union fi aux;\n+   aux.ui = val;\n+   return pack_unorm_1x16(aux.f);\n+}\n+\n+/* FIXME: the implementation below of vftounorm10hi/lo is somewhat too\n+ * verbose. It is likely that there would be a simpler way to implement\n+ * it.\n+ */\n+static uint32_t float_pack16_v3d(uint32_t f32)\n+{\n+   float f = uif(f32);\n+   return _mesa_float_to_half(f);\n+}\n+\n+static uint32_t float_unpack16_v3d(uint32_t f16)\n+{\n+   float f = _mesa_half_to_float(f16);\n+   return fui(f);\n+}\n+\n+static uint32_t vfpack_v3d(uint32_t a, uint32_t b)\n+{\n+   return float_pack16_v3d(b) << 16 | float_pack16_v3d(a);\n+}\n+\n+static  uint32_t vfsat_v3d(uint32_t a)\n+{\n+   return vfpack_v3d(\n+      fui(SATURATE(_mesa_half_to_float(a & 0xffff))),\n+      fui(SATURATE(_mesa_half_to_float(a >> 16))));\n+}\n+\n+static uint32_t fmul_v3d(uint32_t a, uint32_t b)\n+{\n+   float f = uif(a);\n+   float g = uif(b);\n+\n+   float x = f * g;\n+\n+   return fui(x);\n+}\n+\n+#define L(x) float_unpack16_v3d((x) & 0xffff)\n+#define H(x) float_unpack16_v3d((x) >> 16)\n+#define V(f,a,b) vfpack_v3d(f(L(a), L(b)), f(H(a), H(b)))\n+\n+static uint32_t vfmul_v3d(uint32_t a, uint32_t b)\n+{\n+   return V(fmul_v3d, a, b);\n+}\n+\n+/* Convert 2x16-bit floating point to 2x10-bit unorm */\n+static uint32_t vftounorm10lo(uint32_t src0)\n+{\n+   return vfmul_v3d(vfsat_v3d(src0), 0x03ff03ff);\n+}\n+\n+/*\n+ * Convert 2x16-bit floating point to one 2-bit and one\n+ * 10-bit unorm\n+ */\n+static uint32_t vftounorm10hi(uint32_t src0)\n+{\n+   return vfmul_v3d(vfsat_v3d(src0), 0x000303ff);\n+}\n+\n+\n /* Some typed vector structures to make things like src0.y work */\n typedef int8_t int1_t;\n typedef uint8_t uint1_t;\ndiff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py\nindex e4d87aa6126..63aa7cfa315 100644\n--- a/src/compiler/nir/nir_opcodes.py\n+++ b/src/compiler/nir/nir_opcodes.py\n@@ -1393,6 +1393,50 @@ for (int i = 0; i < 32; i += 8) {\n }\n \"\"\")\n \n+# v3d-specific opcodes\n+\n+# v3d-specific (v71) instruction that packs parts of 2 2x16 floating point into\n+# r11g11b10 bits, rounding to nearest even\n+binop_convert(\"v11fpack_v3d\", tuint32, tuint32, \"\",\n+              \"v11fpack_v3d(src0, src1)\")\n+\n+# v3d-specific (v71) instruction that packs 2x32 bit to 2x16 bit integer. The\n+# difference with pack_32_2x16_split is that the sources are 32bit too. So it\n+# receives 2 32-bit integer, and pack the lower halfword as 2x16 on a 32-bit\n+# pack.\n+binop_horiz(\"vpack_v3d\", 1, tuint32, 1, tuint32, 1, tuint32,\n+            \"(src0.x & 0xffff) | (src1.x << 16)\")\n+\n+# v3d-specific (v71) instruction that packs parts of 2 2x16 integers into r10g10b10a2\n+binop_convert(\"v10pack_v3d\", tuint32, tuint32, \"\",\n+              \"(src0 & 0x3ff) | ((src0 >> 16) & 0x3ff) << 10 | (src1 & 0x3ff) << 20 | ((src1 >> 16) & 0x3ff) << 30\")\n+\n+# v3d-specific (v71) instruction that packs 2 2x16 bit integers into 4x8 bits:\n+#   dst[7:0]   = src0[7:0]\n+#   dst[15:8]  = src0[23:16]\n+#   dst[23:16] = src1[7:0]\n+#   dst[31:24] = src1[23:16]\n+opcode(\"v8pack_v3d\", 0, tuint32, [0, 0], [tuint32, tuint32],\n+       False, \"\",\n+       \"(src0 & 0x000000ff) | (src0 & 0x00ff0000) >> 8 | (src1 & 0x000000ff) << 16 | (src1 & 0x00ff0000) << 8\")\n+\n+# v3d-specific (v71) instructions to convert 2x16 floating point to 2x8 bit unorm/snorm\n+unop(\"vftounorm8_v3d\", tuint32,\n+     \"_mesa_half_to_unorm(src0 & 0xffff, 8) | (_mesa_half_to_unorm(src0 >> 16, 8) << 16)\")\n+unop(\"vftosnorm8_v3d\", tuint32,\n+     \"_mesa_half_to_snorm(src0 & 0xffff, 8) | (_mesa_half_to_snorm(src0 >> 16, 8) << 16)\")\n+\n+# v3d-specific (v71) instructions to convert 32-bit floating point to 16 bit unorm/snorm\n+unop(\"ftounorm16_v3d\", tuint32, \"_mesa_float_to_unorm16(src0)\")\n+unop(\"ftosnorm16_v3d\", tuint32, \"_mesa_float_to_snorm16(src0)\")\n+\n+# v3d-specific (v71) instructions to convert 2x16 bit floating points to 2x10 bit unorm\n+unop(\"vftounorm10lo_v3d\", tuint32, \"vftounorm10lo(src0)\")\n+\n+# v3d-specific (v71) instructions to convert 2x16 bit floating points to one 2-bit\n+# and one 10 bit unorm\n+unop(\"vftounorm10hi_v3d\", tuint32, \"vftounorm10hi(src0)\")\n+\n # Mali-specific opcodes\n unop(\"fsat_signed_mali\", tfloat, (\"fmin(fmax(src0, -1.0), 1.0)\"))\n unop(\"fclamp_pos_mali\", tfloat, (\"fmax(src0, 0.0)\"))\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0067-broadcom-compiler-update-image-store-lowering-to-use.patch",
    "content": "From 381c29e3ff5237c89380cc53eb2271d1985f4e34 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 2 Dec 2021 13:26:43 +0100\nSubject: [PATCH 067/142] broadcom/compiler: update image store lowering to use\n v71 new packing/conversion instructions\n\nVulkan shaderdb stats with pattern dEQP-VK.image.*.with_format.*.*:\n   total instructions in shared programs: 35993 -> 33245 (-7.63%)\n   instructions in affected programs: 21153 -> 18405 (-12.99%)\n   helped: 394\n   HURT: 1\n   Instructions are helped.\n\n   total uniforms in shared programs: 8550 -> 7418 (-13.24%)\n   uniforms in affected programs: 5136 -> 4004 (-22.04%)\n   helped: 399\n   HURT: 0\n   Uniforms are helped.\n\n   total max-temps in shared programs: 6014 -> 5905 (-1.81%)\n   max-temps in affected programs: 473 -> 364 (-23.04%)\n   helped: 58\n   HURT: 0\n   Max-temps are helped.\n\n   total nops in shared programs: 1515 -> 1504 (-0.73%)\n   nops in affected programs: 46 -> 35 (-23.91%)\n   helped: 14\n   HURT: 2\n   Inconclusive result (%-change mean confidence interval includes 0).\n\nFWIW, that one HURT on the instructions count is for just one\ninstruction.\n---\n src/broadcom/compiler/nir_to_vir.c            |  39 +++\n src/broadcom/compiler/v3d_compiler.h          |  16 +-\n .../compiler/v3d_nir_lower_image_load_store.c | 246 +++++++++++++++++-\n src/broadcom/compiler/vir.c                   |   2 +-\n 4 files changed, 294 insertions(+), 9 deletions(-)\n\ndiff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c\nindex 90fe1d1e7f0..a8cf02dd386 100644\n--- a/src/broadcom/compiler/nir_to_vir.c\n+++ b/src/broadcom/compiler/nir_to_vir.c\n@@ -1689,6 +1689,22 @@ ntq_emit_alu(struct v3d_compile *c, nir_alu_instr *instr)\n                 result = vir_VFPACK(c, src[0], src[1]);\n                 break;\n \n+        case nir_op_vpack_v3d:\n+                result = vir_VPACK(c, src[0], src[1]);\n+                break;\n+\n+        case nir_op_v11fpack_v3d:\n+                result = vir_V11FPACK(c, src[0], src[1]);\n+                break;\n+\n+        case nir_op_v10pack_v3d:\n+                result = vir_V10PACK(c, src[0], src[1]);\n+                break;\n+\n+        case nir_op_v8pack_v3d:\n+                result = vir_V8PACK(c, src[0], src[1]);\n+                break;\n+\n         case nir_op_unpack_half_2x16_split_x:\n                 result = vir_FMOV(c, src[0]);\n                 vir_set_unpack(c->defs[result.index], 0, V3D_QPU_UNPACK_L);\n@@ -1719,6 +1735,29 @@ ntq_emit_alu(struct v3d_compile *c, nir_alu_instr *instr)\n                 result = vir_FMOV(c, vir_SEL(c, V3D_QPU_COND_IFNA, tmp, zero));\n                 break;\n         }\n+        case nir_op_vftounorm8_v3d:\n+                result = vir_VFTOUNORM8(c, src[0]);\n+                break;\n+\n+        case nir_op_vftosnorm8_v3d:\n+                result = vir_VFTOSNORM8(c, src[0]);\n+                break;\n+\n+        case nir_op_vftounorm10lo_v3d:\n+                result = vir_VFTOUNORM10LO(c, src[0]);\n+                break;\n+\n+        case nir_op_vftounorm10hi_v3d:\n+                result = vir_VFTOUNORM10HI(c, src[0]);\n+                break;\n+\n+        case nir_op_ftounorm16_v3d:\n+                result = vir_FTOUNORM16(c, src[0]);\n+                break;\n+\n+        case nir_op_ftosnorm16_v3d:\n+                result = vir_FTOSNORM16(c, src[0]);\n+                break;\n \n         default:\n                 fprintf(stderr, \"unknown NIR ALU inst: \");\ndiff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h\nindex 36adf8830b5..425ab0cdf9d 100644\n--- a/src/broadcom/compiler/v3d_compiler.h\n+++ b/src/broadcom/compiler/v3d_compiler.h\n@@ -1186,7 +1186,7 @@ bool v3d_nir_lower_line_smooth(nir_shader *shader);\n bool v3d_nir_lower_logic_ops(nir_shader *s, struct v3d_compile *c);\n bool v3d_nir_lower_scratch(nir_shader *s);\n bool v3d_nir_lower_txf_ms(nir_shader *s);\n-bool v3d_nir_lower_image_load_store(nir_shader *s);\n+bool v3d_nir_lower_image_load_store(nir_shader *s, struct v3d_compile *c);\n bool v3d_nir_lower_load_store_bitsize(nir_shader *s);\n \n void v3d33_vir_vpm_read_setup(struct v3d_compile *c, int num_components);\n@@ -1427,6 +1427,20 @@ VIR_SFU(LOG)\n VIR_SFU(SIN)\n VIR_SFU(RSQRT2)\n \n+VIR_A_ALU2(VPACK)\n+VIR_A_ALU2(V8PACK)\n+VIR_A_ALU2(V10PACK)\n+VIR_A_ALU2(V11FPACK)\n+\n+VIR_M_ALU1(FTOUNORM16)\n+VIR_M_ALU1(FTOSNORM16)\n+\n+VIR_M_ALU1(VFTOUNORM8)\n+VIR_M_ALU1(VFTOSNORM8)\n+\n+VIR_M_ALU1(VFTOUNORM10LO)\n+VIR_M_ALU1(VFTOUNORM10HI)\n+\n static inline struct qinst *\n vir_MOV_cond(struct v3d_compile *c, enum v3d_qpu_cond cond,\n              struct qreg dest, struct qreg src)\ndiff --git a/src/broadcom/compiler/v3d_nir_lower_image_load_store.c b/src/broadcom/compiler/v3d_nir_lower_image_load_store.c\nindex 2900a29817f..bbb55be4a14 100644\n--- a/src/broadcom/compiler/v3d_nir_lower_image_load_store.c\n+++ b/src/broadcom/compiler/v3d_nir_lower_image_load_store.c\n@@ -40,6 +40,10 @@\n  * calculations and load/store using the TMU general memory access path.\n  */\n \n+static const unsigned bits_8[4] = {8, 8, 8, 8};\n+static const unsigned bits_16[4] = {16, 16, 16, 16};\n+static const unsigned bits_1010102[4] = {10, 10, 10, 2};\n+\n bool\n v3d_gl_format_is_return_32(enum pipe_format format)\n {\n@@ -59,6 +63,8 @@ v3d_gl_format_is_return_32(enum pipe_format format)\n \n /* Packs a 32-bit vector of colors in the range [0, (1 << bits[i]) - 1] to a\n  * 32-bit SSA value, with as many channels as necessary to store all the bits\n+ *\n+ * This is the generic helper, using all common nir operations.\n  */\n static nir_ssa_def *\n pack_bits(nir_builder *b, nir_ssa_def *color, const unsigned *bits,\n@@ -91,8 +97,185 @@ pack_bits(nir_builder *b, nir_ssa_def *color, const unsigned *bits,\n         return nir_vec(b, results, DIV_ROUND_UP(offset, 32));\n }\n \n+/* Utility wrapper as half_2x16_split is mapped to vfpack, and sometimes it is\n+ * just easier to read vfpack on the code, specially while using the PRM as\n+ * reference\n+ */\n+static nir_ssa_def *\n+nir_vfpack(nir_builder *b, nir_ssa_def *p1, nir_ssa_def *p2)\n+{\n+        return nir_pack_half_2x16_split(b, p1, p2);\n+}\n+\n+static inline nir_ssa_def *\n+pack_11f11f10f(nir_builder *b, nir_ssa_def *color)\n+{\n+        nir_ssa_def *p1 = nir_vfpack(b, nir_channel(b, color, 0),\n+                                     nir_channel(b, color, 1));\n+        /* FIXME: we noted that we could just use p2 again as the second\n+         * element to pack, and CTS tests still works. Just using undef as is\n+         * slightly more correct\n+         */\n+        nir_ssa_def *undef = nir_ssa_undef(b, 1, color->bit_size);\n+        nir_ssa_def *p2 = nir_vfpack(b, nir_channel(b, color, 2), undef);\n+\n+        return nir_v11fpack_v3d(b, p1, p2);\n+}\n+\n+static inline nir_ssa_def *\n+pack_r10g10b10a2_uint(nir_builder *b, nir_ssa_def *color)\n+{\n+        nir_ssa_def *p1 = nir_vpack_v3d(b, nir_channel(b, color, 0),\n+                                        nir_channel(b, color, 1));\n+        nir_ssa_def *p2 = nir_vpack_v3d(b, nir_channel(b, color, 2),\n+                                        nir_channel(b, color, 3));\n+\n+        return nir_v10pack_v3d(b, p1, p2);\n+}\n+\n+static inline nir_ssa_def *\n+pack_r10g10b10a2_unorm(nir_builder *b, nir_ssa_def *color)\n+{\n+        nir_ssa_def *p1 = nir_vfpack(b, nir_channel(b, color, 0),\n+                                     nir_channel(b, color, 1));\n+        p1 = nir_vftounorm10lo_v3d(b, p1);\n+\n+        nir_ssa_def *p2 = nir_vfpack(b, nir_channel(b, color, 2),\n+                                     nir_channel(b, color, 3));\n+        p2 = nir_vftounorm10hi_v3d(b, p2);\n+\n+        return nir_v10pack_v3d(b, p1, p2);\n+}\n+\n+enum hw_conversion {\n+        NONE,\n+        TO_SNORM,\n+        TO_UNORM\n+};\n+\n+static inline nir_ssa_def *\n+pack_8bit(nir_builder *b, nir_ssa_def *color,\n+                        unsigned num_components,\n+                        enum hw_conversion conversion)\n+{\n+        /* Note that usually you should not use this method (that relies on\n+         * custom packing) for 1 component if we are not doing any\n+         * conversion. But we support also that case, and let the caller\n+         * decide which method to use.\n+         */\n+        nir_ssa_def *p1;\n+        nir_ssa_def *p2;\n+\n+        if (conversion == NONE) {\n+                p1 = nir_vpack_v3d(b, nir_channel(b, color, 0),\n+                                   nir_channel(b, color, num_components == 1 ? 0 : 1));\n+        } else {\n+                p1 = nir_vfpack(b, nir_channel(b, color, 0),\n+                                nir_channel(b, color, num_components == 1 ? 0 : 1));\n+                p1 = (conversion == TO_UNORM) ?\n+                   nir_vftounorm8_v3d(b, p1) : nir_vftosnorm8_v3d(b, p1);\n+        }\n+        if (num_components == 4) {\n+                if (conversion == NONE) {\n+                        p2 = nir_vpack_v3d(b, nir_channel(b, color, 2),\n+                                           nir_channel(b, color, 3));\n+                } else {\n+                        p2 = nir_vfpack(b, nir_channel(b, color, 2),\n+                                        nir_channel(b, color, 3));\n+                        p2 = (conversion == TO_UNORM) ?\n+                           nir_vftounorm8_v3d(b, p2) : nir_vftosnorm8_v3d(b, p2);\n+                }\n+        } else {\n+                /* As mentioned on the comment before, using an undef here\n+                 * would be more correct. But for this case we are getting\n+                 * worse values, and in fact even some worse instruction count\n+                 * with some CTS tests, so we just reuse the first packing\n+                 */\n+                p2 = p1;\n+        }\n+\n+        return nir_v8pack_v3d(b, p1, p2);\n+}\n+\n+static inline nir_ssa_def *\n+pack_16bit(nir_builder *b, nir_ssa_def *color,\n+                         unsigned num_components,\n+                         enum hw_conversion conversion)\n+{\n+        nir_ssa_def *results[2];\n+        nir_ssa_def *channels[4];\n+\n+        /* Note that usually you should not use this method (that relies on\n+         * custom packing) if we are not doing any conversion. But we support\n+         * also that case, and let the caller decide which method to use.\n+         */\n+\n+        for (unsigned i = 0; i < num_components; i++) {\n+                channels[i] = nir_channel(b, color, i);\n+                switch (conversion) {\n+                case TO_SNORM:\n+                        channels[i] = nir_ftosnorm16_v3d(b, channels[i]);\n+                        break;\n+                case TO_UNORM:\n+                        channels[i] = nir_ftounorm16_v3d(b, channels[i]);\n+                        break;\n+                default:\n+                        break;\n+                }\n+        }\n+\n+        switch (num_components) {\n+        case 1:\n+                results[0] = channels[0];\n+                break;\n+        case 4:\n+                results[1] = nir_vpack_v3d(b, channels[2], channels[3]);\n+                FALLTHROUGH;\n+        case 2:\n+                results[0] = nir_vpack_v3d(b, channels[0], channels[1]);\n+                break;\n+        }\n+\n+        return nir_vec(b, results, DIV_ROUND_UP(num_components, 2));\n+}\n+\n+static inline nir_ssa_def *\n+pack_xbit(nir_builder *b, nir_ssa_def *color,\n+          unsigned num_components,\n+          const struct util_format_channel_description *r_chan)\n+{\n+        bool pack_mask = (r_chan->type == UTIL_FORMAT_TYPE_SIGNED);\n+        enum hw_conversion conversion = NONE;\n+        if (r_chan->normalized) {\n+                conversion =\n+                        (r_chan->type == UTIL_FORMAT_TYPE_UNSIGNED) ? TO_UNORM : TO_SNORM;\n+        }\n+\n+        switch (r_chan->size) {\n+        case 8:\n+                if (conversion == NONE && num_components < 2)\n+                        return pack_bits(b, color, bits_8, num_components, pack_mask);\n+                else\n+                        return pack_8bit(b, color, num_components, conversion);\n+                break;\n+        case 16:\n+                /* pack_mask implies that the generic packing method would\n+                 * need to include extra operations to handle negative values,\n+                 * so in that case, even without a conversion, it is better to\n+                 * use the packing using custom hw operations.\n+                 */\n+                if (conversion == NONE && !pack_mask)\n+                        return pack_bits(b, color, bits_16, num_components, pack_mask);\n+                else\n+                        return pack_16bit(b, color, num_components, conversion);\n+                break;\n+        default:\n+                unreachable(\"unrecognized bits\");\n+        }\n+}\n+\n static bool\n-v3d_nir_lower_image_store(nir_builder *b, nir_intrinsic_instr *instr)\n+v3d_nir_lower_image_store_v42(nir_builder *b, nir_intrinsic_instr *instr)\n {\n         enum pipe_format format = nir_intrinsic_format(instr);\n         assert(format != PIPE_FORMAT_NONE);\n@@ -118,9 +301,6 @@ v3d_nir_lower_image_store(nir_builder *b, nir_intrinsic_instr *instr)\n                  */\n                 formatted = color;\n         } else {\n-                static const unsigned bits_8[4] = {8, 8, 8, 8};\n-                static const unsigned bits_16[4] = {16, 16, 16, 16};\n-                static const unsigned bits_1010102[4] = {10, 10, 10, 2};\n                 const unsigned *bits;\n \n                 switch (r_chan->size) {\n@@ -171,6 +351,52 @@ v3d_nir_lower_image_store(nir_builder *b, nir_intrinsic_instr *instr)\n         return true;\n }\n \n+\n+static bool\n+v3d_nir_lower_image_store_v71(nir_builder *b, nir_intrinsic_instr *instr)\n+{\n+        enum pipe_format format = nir_intrinsic_format(instr);\n+        assert(format != PIPE_FORMAT_NONE);\n+        const struct util_format_description *desc =\n+                util_format_description(format);\n+        const struct util_format_channel_description *r_chan = &desc->channel[0];\n+        unsigned num_components = util_format_get_nr_components(format);\n+        b->cursor = nir_before_instr(&instr->instr);\n+\n+        nir_ssa_def *color = nir_channels(b,\n+                                          nir_ssa_for_src(b, instr->src[3], 4),\n+                                          (1 << num_components) - 1);\n+        nir_ssa_def *formatted = NULL;\n+        if (format == PIPE_FORMAT_R9G9B9E5_FLOAT) {\n+                formatted = nir_format_pack_r9g9b9e5(b, color);\n+        } else if (format == PIPE_FORMAT_R11G11B10_FLOAT) {\n+                formatted = pack_11f11f10f(b, color);\n+        } else if (format == PIPE_FORMAT_R10G10B10A2_UINT) {\n+                formatted = pack_r10g10b10a2_uint(b, color);\n+        } else if (format == PIPE_FORMAT_R10G10B10A2_UNORM) {\n+                formatted = pack_r10g10b10a2_unorm(b, color);\n+        } else if (r_chan->size == 32) {\n+                /* For 32-bit formats, we just have to move the vector\n+                 * across (possibly reducing the number of channels).\n+                 */\n+                formatted = color;\n+        } else if (r_chan->type == UTIL_FORMAT_TYPE_FLOAT) {\n+                assert(r_chan->size == 16);\n+                formatted = nir_format_float_to_half(b, color);\n+                formatted = pack_bits(b, formatted, bits_16, num_components,\n+                                      false);\n+        } else {\n+                assert(r_chan->size == 8 || r_chan->size == 16);\n+                formatted = pack_xbit(b, color, num_components, r_chan);\n+        }\n+\n+        nir_instr_rewrite_src(&instr->instr, &instr->src[3],\n+                              nir_src_for_ssa(formatted));\n+        instr->num_components = formatted->num_components;\n+\n+        return true;\n+}\n+\n static bool\n v3d_nir_lower_image_load(nir_builder *b, nir_intrinsic_instr *instr)\n {\n@@ -215,11 +441,17 @@ v3d_nir_lower_image_load_store_cb(nir_builder *b,\n         nir_intrinsic_instr *intr =\n                 nir_instr_as_intrinsic(instr);\n \n+        struct v3d_compile *c = (struct v3d_compile *) _state;\n+\n         switch (intr->intrinsic) {\n         case nir_intrinsic_image_load:\n                 return v3d_nir_lower_image_load(b, intr);\n         case nir_intrinsic_image_store:\n-                return v3d_nir_lower_image_store(b, intr);\n+                if (c->devinfo->ver >= 71)\n+                        return v3d_nir_lower_image_store_v71(b, intr);\n+                else\n+                        return v3d_nir_lower_image_store_v42(b, intr);\n+                break;\n         default:\n                 return false;\n         }\n@@ -228,9 +460,9 @@ v3d_nir_lower_image_load_store_cb(nir_builder *b,\n }\n \n bool\n-v3d_nir_lower_image_load_store(nir_shader *s)\n+v3d_nir_lower_image_load_store(nir_shader *s, struct v3d_compile *c)\n {\n         return nir_shader_instructions_pass(s, v3d_nir_lower_image_load_store_cb,\n                                             nir_metadata_block_index |\n-                                            nir_metadata_dominance, NULL);\n+                                            nir_metadata_dominance, c);\n }\ndiff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c\nindex aea113f050e..7612eed7130 100644\n--- a/src/broadcom/compiler/vir.c\n+++ b/src/broadcom/compiler/vir.c\n@@ -1576,7 +1576,7 @@ v3d_attempt_compile(struct v3d_compile *c)\n \n         NIR_PASS(_, c->s, v3d_nir_lower_io, c);\n         NIR_PASS(_, c->s, v3d_nir_lower_txf_ms);\n-        NIR_PASS(_, c->s, v3d_nir_lower_image_load_store);\n+        NIR_PASS(_, c->s, v3d_nir_lower_image_load_store, c);\n \n         NIR_PASS(_, c->s, nir_opt_idiv_const, 8);\n         nir_lower_idiv_options idiv_options = {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0068-broadcom-compiler-don-t-allocate-spill-base-to-rf0-i.patch",
    "content": "From f6082e941a3454c8735df2ff2713ae49b3daa74f Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 18 Apr 2023 08:50:13 +0200\nSubject: [PATCH 068/142] broadcom/compiler: don't allocate spill base to rf0\n in V3D 7.x\n\nOtherwise it can be stomped by instructions doing implicit rf0 writes.\n---\n src/broadcom/compiler/vir_register_allocate.c | 21 +++++++++++++++----\n 1 file changed, 17 insertions(+), 4 deletions(-)\n\ndiff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c\nindex 440b093a636..121c9b2794f 100644\n--- a/src/broadcom/compiler/vir_register_allocate.c\n+++ b/src/broadcom/compiler/vir_register_allocate.c\n@@ -582,7 +582,8 @@ interferes(int32_t t0_start, int32_t t0_end, int32_t t1_start, int32_t t1_end)\n }\n \n static void\n-v3d_spill_reg(struct v3d_compile *c, int *acc_nodes, int spill_temp)\n+v3d_spill_reg(struct v3d_compile *c, int *acc_nodes, int *implicit_rf_nodes,\n+              int spill_temp)\n {\n         c->spill_start_num_temps = c->num_temps;\n         c->spilling = true;\n@@ -594,8 +595,20 @@ v3d_spill_reg(struct v3d_compile *c, int *acc_nodes, int spill_temp)\n                 spill_offset = c->spill_size;\n                 c->spill_size += V3D_CHANNELS * sizeof(uint32_t);\n \n-                if (spill_offset == 0)\n+                if (spill_offset == 0) {\n                         v3d_setup_spill_base(c);\n+\n+                        /* Don't allocate our spill base to rf0 to avoid\n+                         * conflicts with instructions doing implicit writes\n+                         * to that register.\n+                         */\n+                        if (!c->devinfo->has_accumulators) {\n+                                ra_add_node_interference(\n+                                        c->g,\n+                                        temp_to_node(c, c->spill_base.index),\n+                                        implicit_rf_nodes[0]);\n+                        }\n+                }\n         }\n \n         struct qinst *last_thrsw = c->last_thrsw;\n@@ -1346,7 +1359,7 @@ v3d_register_allocate(struct v3d_compile *c)\n                         int node = v3d_choose_spill_node(c);\n                         uint32_t temp = node_to_temp(c, node);\n                         if (node != -1) {\n-                                v3d_spill_reg(c, acc_nodes, temp);\n+                                v3d_spill_reg(c, acc_nodes, implicit_rf_nodes, temp);\n                                 continue;\n                         }\n                 }\n@@ -1363,7 +1376,7 @@ v3d_register_allocate(struct v3d_compile *c)\n                 enum temp_spill_type spill_type =\n                         get_spill_type_for_temp(c, temp);\n                 if (spill_type != SPILL_TYPE_TMU || tmu_spilling_allowed(c)) {\n-                        v3d_spill_reg(c, acc_nodes, temp);\n+                        v3d_spill_reg(c, acc_nodes, implicit_rf_nodes, temp);\n                         if (c->spills + c->fills > c->max_tmu_spills)\n                                 goto spill_fail;\n                 } else {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0069-broadcom-compiler-improve-allocation-for-final-progr.patch",
    "content": "From 0e9577fbb18a026390f653ca22f5a98a69a5fe59 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 2 May 2023 10:12:37 +0200\nSubject: [PATCH 069/142] broadcom/compiler: improve allocation for final\n program instructions\n\nThe last 3 instructions can't use specific registers so flag all the\nnodes for temps used in the last program instructions and try to\navoid assigning any of these. This may help us avoid injecting nops\nfor the last thread switch instruction.\n\nBecause regisster allocation needs to happen before QPU scheduling\nand instruction merging we can't tell exactly what the last 3\ninstructions will be, so we do this for a few more instructions than\njust 3.\n\nWe only do this for fragment shaders because other shader stages\nalways end with VPM store instructions that take an small immediate\nand therefore will never allow us to merge the final thread switch\nearlier, so limiting allocation for these shaders will never improve\nanything and might instead be detrimental.\n\ntotal instructions in shared programs: 11471389 -> 11464335 (-0.06%)\ninstructions in affected programs: 582908 -> 575854 (-1.21%)\nhelped: 4669\nHURT: 578\nInstructions are helped.\n\ntotal max-temps in shared programs: 2230497 -> 2230150 (-0.02%)\nmax-temps in affected programs: 5662 -> 5315 (-6.13%)\nhelped: 344\nHURT: 44\nMax-temps are helped.\n\ntotal sfu-stalls in shared programs: 18068 -> 18077 (0.05%)\nsfu-stalls in affected programs: 264 -> 273 (3.41%)\nhelped: 37\nHURT: 48\nInconclusive result (value mean confidence interval includes 0).\n\ntotal inst-and-stalls in shared programs: 11489457 -> 11482412 (-0.06%)\ninst-and-stalls in affected programs: 585180 -> 578135 (-1.20%)\nhelped: 4659\nHURT: 588\nInst-and-stalls are helped.\n\ntotal nops in shared programs: 301738 -> 298140 (-1.19%)\nnops in affected programs: 14680 -> 11082 (-24.51%)\nhelped: 3252\nHURT: 108\nNops are helped.\n---\n src/broadcom/compiler/v3d_compiler.h          |  1 +\n src/broadcom/compiler/vir_register_allocate.c | 69 +++++++++++++++++--\n 2 files changed, 66 insertions(+), 4 deletions(-)\n\ndiff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h\nindex 425ab0cdf9d..2642d23b629 100644\n--- a/src/broadcom/compiler/v3d_compiler.h\n+++ b/src/broadcom/compiler/v3d_compiler.h\n@@ -613,6 +613,7 @@ struct v3d_ra_node_info {\n         struct {\n                 uint32_t priority;\n                 uint8_t class_bits;\n+                bool is_program_end;\n \n                 /* V3D 7.x */\n                 bool is_ldunif_dst;\ndiff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c\nindex 121c9b2794f..495644bb557 100644\n--- a/src/broadcom/compiler/vir_register_allocate.c\n+++ b/src/broadcom/compiler/vir_register_allocate.c\n@@ -385,6 +385,7 @@ add_node(struct v3d_compile *c, uint32_t temp, uint8_t class_bits)\n         c->nodes.info[node].class_bits = class_bits;\n         c->nodes.info[node].priority = 0;\n         c->nodes.info[node].is_ldunif_dst = false;\n+        c->nodes.info[node].is_program_end = false;\n }\n \n /* The spill offset for this thread takes a bit of setup, so do it once at\n@@ -929,6 +930,17 @@ v3d_ra_select_rf(struct v3d_ra_select_callback_data *v3d_ra,\n                 return true;\n         }\n \n+        /* The last 3 instructions in a shader can't use some specific registers\n+         * (usually early rf registers, depends on v3d version) so try to\n+         * avoid allocating these to registers used by the last instructions\n+         * in the shader.\n+         */\n+        const uint32_t safe_rf_start = v3d_ra->devinfo->ver <= 42 ? 3 : 4;\n+        if (v3d_ra->nodes->info[node].is_program_end &&\n+            v3d_ra->next_phys < safe_rf_start) {\n+                v3d_ra->next_phys = safe_rf_start;\n+        }\n+\n         for (int i = 0; i < PHYS_COUNT; i++) {\n                 int phys_off = (v3d_ra->next_phys + i) % PHYS_COUNT;\n                 int phys = v3d_ra->phys_index + phys_off;\n@@ -1218,6 +1230,44 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c,\n         }\n }\n \n+static void\n+flag_program_end_nodes(struct v3d_compile *c)\n+{\n+        /* Only look for registers used in this many instructions */\n+        uint32_t last_set_count = 6;\n+\n+        struct qblock *last_block = vir_exit_block(c);\n+        list_for_each_entry_rev(struct qinst, inst, &last_block->instructions, link) {\n+                if (!inst->qpu.type == V3D_QPU_INSTR_TYPE_ALU)\n+                        continue;\n+\n+                int num_src = v3d_qpu_add_op_num_src(inst->qpu.alu.add.op);\n+                for (int i = 0; i < num_src; i++) {\n+                        if (inst->src[i].file == QFILE_TEMP) {\n+                                int node = temp_to_node(c, inst->src[i].index);\n+                                c->nodes.info[node].is_program_end = true;\n+                        }\n+                }\n+\n+                num_src = v3d_qpu_mul_op_num_src(inst->qpu.alu.mul.op);\n+                for (int i = 0; i < num_src; i++) {\n+                       if (inst->src[i].file == QFILE_TEMP) {\n+                                int node = temp_to_node(c, inst->src[i].index);\n+                                c->nodes.info[node].is_program_end = true;\n+\n+                        }\n+                }\n+\n+                if (inst->dst.file == QFILE_TEMP) {\n+                        int node = temp_to_node(c, inst->dst.index);\n+                        c->nodes.info[node].is_program_end = true;\n+                }\n+\n+                if (--last_set_count == 0)\n+                        break;\n+        }\n+}\n+\n /**\n  * Returns a mapping from QFILE_TEMP indices to struct qpu_regs.\n  *\n@@ -1280,17 +1330,16 @@ v3d_register_allocate(struct v3d_compile *c)\n          */\n         for (uint32_t i = 0; i < num_ra_nodes; i++) {\n                 c->nodes.info[i].is_ldunif_dst = false;\n+                c->nodes.info[i].is_program_end = false;\n+                c->nodes.info[i].priority = 0;\n+                c->nodes.info[i].class_bits = 0;\n                 if (c->devinfo->has_accumulators && i < ACC_COUNT) {\n                         acc_nodes[i] = i;\n                         ra_set_node_reg(c->g, acc_nodes[i], ACC_INDEX + i);\n-                        c->nodes.info[i].priority = 0;\n-                        c->nodes.info[i].class_bits = 0;\n                 } else if (!c->devinfo->has_accumulators &&\n                            i < ARRAY_SIZE(implicit_rf_nodes)) {\n                         implicit_rf_nodes[i] = i;\n                         ra_set_node_reg(c->g, implicit_rf_nodes[i], phys_index + i);\n-                        c->nodes.info[i].priority = 0;\n-                        c->nodes.info[i].class_bits = 0;\n                 } else {\n                         uint32_t t = node_to_temp(c, i);\n                         c->nodes.info[i].priority =\n@@ -1327,6 +1376,18 @@ v3d_register_allocate(struct v3d_compile *c)\n                                                       last_ldvary_ip, inst);\n         }\n \n+        /* Flag the nodes that are used in the last instructions of the program\n+         * (there are some registers that cannot be used in the last 3\n+         * instructions). We only do this for fragment shaders, because the idea\n+         * is that by avoiding this conflict we may be able to emit the last\n+         * thread switch earlier in some cases, however, in non-fragment shaders\n+         * this won't happen because the last instructions are always VPM stores\n+         * with a small immediate, which conflicts with other signals,\n+         * preventing us from ever moving the thrsw earlier.\n+         */\n+        if (c->s->info.stage == MESA_SHADER_FRAGMENT)\n+                flag_program_end_nodes(c);\n+\n         /* Set the register classes for all our temporaries in the graph */\n         for (uint32_t i = 0; i < c->num_temps; i++) {\n                 ra_set_node_class(c->g, temp_to_node(c, i),\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0070-broadcom-compiler-don-t-assign-registers-to-unused-n.patch",
    "content": "From 645fe451bcecbe3345a144222306d06fb39f6b9f Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 2 May 2023 10:17:47 +0200\nSubject: [PATCH 070/142] broadcom/compiler: don't assign registers to unused\n nodes/temps\n\nIn programs with a lot of unused temps, if we don't do this, we may\nend up recycling previously used rfs more often, which can be\ndetrimental to instruction pairing.\n\ntotal instructions in shared programs: 11464335 -> 11444136 (-0.18%)\ninstructions in affected programs: 8976743 -> 8956544 (-0.23%)\nhelped: 33196\nHURT: 33778\nInconclusive result\n\ntotal max-temps in shared programs: 2230150 -> 2229445 (-0.03%)\nmax-temps in affected programs: 86413 -> 85708 (-0.82%)\nhelped: 2217\nHURT: 1523\nMax-temps are helped.\n\ntotal sfu-stalls in shared programs: 18077 -> 17104 (-5.38%)\nsfu-stalls in affected programs: 8669 -> 7696 (-11.22%)\nhelped: 2657\nHURT: 2182\nSfu-stalls are helped.\n\ntotal inst-and-stalls in shared programs: 11482412 -> 11461240 (-0.18%)\ninst-and-stalls in affected programs: 8995697 -> 8974525 (-0.24%)\nhelped: 33319\nHURT: 33708\nInconclusive result\n\ntotal nops in shared programs: 298140 -> 296185 (-0.66%)\nnops in affected programs: 52805 -> 50850 (-3.70%)\nhelped: 3797\nHURT: 2662\nInconclusive result\n---\n src/broadcom/compiler/v3d_compiler.h          |  1 +\n src/broadcom/compiler/vir_register_allocate.c | 14 ++++++++++++++\n 2 files changed, 15 insertions(+)\n\ndiff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h\nindex 2642d23b629..f1a807e38fd 100644\n--- a/src/broadcom/compiler/v3d_compiler.h\n+++ b/src/broadcom/compiler/v3d_compiler.h\n@@ -614,6 +614,7 @@ struct v3d_ra_node_info {\n                 uint32_t priority;\n                 uint8_t class_bits;\n                 bool is_program_end;\n+                bool unused;\n \n                 /* V3D 7.x */\n                 bool is_ldunif_dst;\ndiff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c\nindex 495644bb557..0ab0474424f 100644\n--- a/src/broadcom/compiler/vir_register_allocate.c\n+++ b/src/broadcom/compiler/vir_register_allocate.c\n@@ -386,6 +386,7 @@ add_node(struct v3d_compile *c, uint32_t temp, uint8_t class_bits)\n         c->nodes.info[node].priority = 0;\n         c->nodes.info[node].is_ldunif_dst = false;\n         c->nodes.info[node].is_program_end = false;\n+        c->nodes.info[node].unused = false;\n }\n \n /* The spill offset for this thread takes a bit of setup, so do it once at\n@@ -918,6 +919,12 @@ v3d_ra_select_rf(struct v3d_ra_select_callback_data *v3d_ra,\n                  BITSET_WORD *regs,\n                  unsigned int *out)\n {\n+        /* If this node is for an unused temp, ignore. */\n+        if (v3d_ra->nodes->info[node].unused) {\n+                *out = 0;\n+                return true;\n+        }\n+\n         /* In V3D 7.x, try to assign rf0 to temps used as ldunif's dst\n          * so we can avoid turning them into ldunifrf (which uses the\n          * cond field to encode the dst and would prevent merge with\n@@ -1331,6 +1338,7 @@ v3d_register_allocate(struct v3d_compile *c)\n         for (uint32_t i = 0; i < num_ra_nodes; i++) {\n                 c->nodes.info[i].is_ldunif_dst = false;\n                 c->nodes.info[i].is_program_end = false;\n+                c->nodes.info[i].unused = false;\n                 c->nodes.info[i].priority = 0;\n                 c->nodes.info[i].class_bits = 0;\n                 if (c->devinfo->has_accumulators && i < ACC_COUNT) {\n@@ -1396,6 +1404,12 @@ v3d_register_allocate(struct v3d_compile *c)\n \n         /* Add register interferences based on liveness data */\n         for (uint32_t i = 0; i < c->num_temps; i++) {\n+                /* And while we are here, let's also flag nodes for\n+                 * unused temps.\n+                 */\n+                if (c->temp_start[i] > c->temp_end[i])\n+                        c->nodes.info[temp_to_node(c, i)].unused = true;\n+\n                 for (uint32_t j = i + 1; j < c->num_temps; j++) {\n                         if (interferes(c->temp_start[i], c->temp_end[i],\n                                        c->temp_start[j], c->temp_end[j])) {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0071-broadcom-compiler-only-assign-rf0-as-last-resort-in-.patch",
    "content": "From 851704169d59e28c5429b06d05e5ef952be893a2 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Mon, 15 May 2023 10:02:10 +0200\nSubject: [PATCH 071/142] broadcom/compiler: only assign rf0 as last resort in\n V3D 7.x\n\nSo we can use it for ldunif(a) and avoid generating ldunif(a)rf which\ncan't be paired with conditional instructions.\n\nshader-db (pi5):\n\ntotal instructions in shared programs: 11357802 -> 11338883 (-0.17%)\ninstructions in affected programs: 7117889 -> 7098970 (-0.27%)\nhelped: 24264\nHURT: 17574\nInstructions are helped.\n\ntotal uniforms in shared programs: 3857808 -> 3857815 (<.01%)\nuniforms in affected programs: 92 -> 99 (7.61%)\nhelped: 0\nHURT: 1\n\ntotal max-temps in shared programs: 2230904 -> 2230199 (-0.03%)\nmax-temps in affected programs: 52309 -> 51604 (-1.35%)\nhelped: 1219\nHURT: 725\nMax-temps are helped.\n\ntotal sfu-stalls in shared programs: 15021 -> 15236 (1.43%)\nsfu-stalls in affected programs: 6848 -> 7063 (3.14%)\nhelped: 1866\nHURT: 1704\nInconclusive result\n\ntotal inst-and-stalls in shared programs: 11372823 -> 11354119 (-0.16%)\ninst-and-stalls in affected programs: 7149177 -> 7130473 (-0.26%)\nhelped: 24315\nHURT: 17561\nInst-and-stalls are helped.\n\ntotal nops in shared programs: 273624 -> 273711 (0.03%)\nnops in affected programs: 31562 -> 31649 (0.28%)\nhelped: 1619\nHURT: 1854\nInconclusive result (value mean confidence interval includes 0).\n---\n src/broadcom/compiler/vir_register_allocate.c | 13 +++++++++++++\n 1 file changed, 13 insertions(+)\n\ndiff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c\nindex 0ab0474424f..8eac2b75bd7 100644\n--- a/src/broadcom/compiler/vir_register_allocate.c\n+++ b/src/broadcom/compiler/vir_register_allocate.c\n@@ -950,6 +950,11 @@ v3d_ra_select_rf(struct v3d_ra_select_callback_data *v3d_ra,\n \n         for (int i = 0; i < PHYS_COUNT; i++) {\n                 int phys_off = (v3d_ra->next_phys + i) % PHYS_COUNT;\n+\n+                /* Try to keep rf0 available for ldunif in 7.x (see above). */\n+                if (v3d_ra->devinfo->ver >= 71 && phys_off == 0)\n+                        continue;\n+\n                 int phys = v3d_ra->phys_index + phys_off;\n \n                 if (BITSET_TEST(regs, phys)) {\n@@ -959,6 +964,14 @@ v3d_ra_select_rf(struct v3d_ra_select_callback_data *v3d_ra,\n                 }\n         }\n \n+        /* If we couldn't allocate, do try to assign rf0 if it is available. */\n+        if (v3d_ra->devinfo->ver >= 71 &&\n+            BITSET_TEST(regs, v3d_ra->phys_index)) {\n+                v3d_ra->next_phys = 1;\n+                *out = v3d_ra->phys_index;\n+                return true;\n+        }\n+\n         return false;\n }\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0072-v3dv-recover-non-conformant-warning-for-not-fully-su.patch",
    "content": "From 0d3fd30d67ffc0195b0783e30ab6afbbe403310a Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Wed, 28 Apr 2021 14:31:38 +0200\nSubject: [PATCH 072/142] v3dv: recover non-conformant warning for not fully\n supported hw\n\n---\n src/broadcom/vulkan/v3dv_device.c | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c\nindex d5de3517670..d29ffad3531 100644\n--- a/src/broadcom/vulkan/v3dv_device.c\n+++ b/src/broadcom/vulkan/v3dv_device.c\n@@ -1212,6 +1212,12 @@ create_physical_device(struct v3dv_instance *instance,\n \n    list_addtail(&device->vk.link, &instance->vk.physical_devices.list);\n \n+   if (device->devinfo.ver != 42) {\n+      fprintf(stderr, \"WARNING: v3dv support for hw version %i is neither \"\n+              \"a complete nor a conformant Vulkan implementation. Testing \"\n+              \"use only.\\n\", device->devinfo.ver);\n+   }\n+\n    return VK_SUCCESS;\n \n fail:\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0073-v3dv-meson-add-v71-hw-generation.patch",
    "content": "From 52b5ac62b367ae89574c8031fdcf7c1dae05c942 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Tue, 29 Jun 2021 11:59:53 +0200\nSubject: [PATCH 073/142] v3dv/meson: add v71 hw generation\n\nStarting point for v71 version inclusion.\n\nThis just adds it as one of the versions to be compiled (on meson),\nupdates the v3dX/v3dv_X macros, and update the code enough to get it\ncompiling when building using the two versions. For any packet not\navailable on v71 we just provide a generic asserted placeholder of\ngeneration not supported.\n\nAny real v71 support will be implemented on following commits.\n---\n src/broadcom/vulkan/meson.build         |  6 +-\n src/broadcom/vulkan/v3dv_private.h      |  7 +++\n src/broadcom/vulkan/v3dvx_cmd_buffer.c  | 75 +++++++++++++++++++++++--\n src/broadcom/vulkan/v3dvx_image.c       | 16 +++++-\n src/broadcom/vulkan/v3dvx_meta_common.c | 32 +++++++++++\n src/broadcom/vulkan/v3dvx_pipeline.c    |  5 ++\n src/broadcom/vulkan/v3dvx_queue.c       | 11 ++++\n 7 files changed, 142 insertions(+), 10 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/meson.build b/src/broadcom/vulkan/meson.build\nindex ad032d832ad..3da7364686f 100644\n--- a/src/broadcom/vulkan/meson.build\n+++ b/src/broadcom/vulkan/meson.build\n@@ -27,6 +27,7 @@ v3dv_entrypoints = custom_target(\n     '--out-h', '@OUTPUT0@', '--out-c', '@OUTPUT1@', '--prefix', 'v3dv',\n     '--beta', with_vulkan_beta.to_string(),\n     '--device-prefix', 'ver42',\n+    '--device-prefix', 'ver71',\n   ],\n   depend_files : vk_entrypoints_gen_depend_files,\n )\n@@ -67,10 +68,7 @@ files_per_version = files(\n   'v3dvx_queue.c',\n )\n \n-# The vulkan driver only supports version >= 42, which is the version present in\n-# Rpi4. We need to explicitly set it as we are reusing pieces from the GL v3d\n-# driver.\n-v3d_versions = ['42']\n+v3d_versions = ['42', '71']\n \n v3dv_flags = []\n \ndiff --git a/src/broadcom/vulkan/v3dv_private.h b/src/broadcom/vulkan/v3dv_private.h\nindex c6707211529..6bdf338c67b 100644\n--- a/src/broadcom/vulkan/v3dv_private.h\n+++ b/src/broadcom/vulkan/v3dv_private.h\n@@ -2608,6 +2608,9 @@ u64_compare(const void *key1, const void *key2)\n    case 42:                                           \\\n       v3d_X_thing = &v3d42_##thing;                   \\\n       break;                                          \\\n+   case 71:                                           \\\n+      v3d_X_thing = &v3d71_##thing;                   \\\n+      break;                                          \\\n    default:                                           \\\n       unreachable(\"Unsupported hardware generation\"); \\\n    }                                                  \\\n@@ -2626,6 +2629,10 @@ u64_compare(const void *key1, const void *key2)\n #  define v3dX(x) v3d42_##x\n #  include \"v3dvx_private.h\"\n #  undef v3dX\n+\n+#  define v3dX(x) v3d71_##x\n+#  include \"v3dvx_private.h\"\n+#  undef v3dX\n #endif\n \n #ifdef ANDROID\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex f182b790d36..b958e634c82 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -56,10 +56,15 @@ v3dX(job_emit_enable_double_buffer)(struct v3dv_job *job)\n    };\n    config.width_in_pixels = tiling->width;\n    config.height_in_pixels = tiling->height;\n+#if V3D_VERSION == 42\n    config.number_of_render_targets = MAX2(tiling->render_target_count, 1);\n    config.multisample_mode_4x = tiling->msaa;\n    config.double_buffer_in_non_ms_mode = tiling->double_buffer;\n    config.maximum_bpp_of_all_render_targets = tiling->internal_bpp;\n+#endif\n+#if V3D_VERSION >= 71\n+      unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n \n    uint8_t *rewrite_addr = (uint8_t *)job->bcl_tile_binning_mode_ptr;\n    cl_packet_pack(TILE_BINNING_MODE_CFG)(NULL, rewrite_addr, &config);\n@@ -82,10 +87,15 @@ v3dX(job_emit_binning_prolog)(struct v3dv_job *job,\n    cl_emit(&job->bcl, TILE_BINNING_MODE_CFG, config) {\n       config.width_in_pixels = tiling->width;\n       config.height_in_pixels = tiling->height;\n+#if V3D_VERSION == 42\n       config.number_of_render_targets = MAX2(tiling->render_target_count, 1);\n       config.multisample_mode_4x = tiling->msaa;\n       config.double_buffer_in_non_ms_mode = tiling->double_buffer;\n       config.maximum_bpp_of_all_render_targets = tiling->internal_bpp;\n+#endif\n+#if V3D_VERSION >= 71\n+      unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n    }\n \n    /* There's definitely nothing in the VCD cache we want. */\n@@ -649,10 +659,15 @@ cmd_buffer_render_pass_emit_stores(struct v3dv_cmd_buffer *cmd_buffer,\n     * bit and instead we have to emit a single clear of all tile buffers.\n     */\n    if (use_global_zs_clear || use_global_rt_clear) {\n+#if V3D_VERSION == 42\n       cl_emit(cl, CLEAR_TILE_BUFFERS, clear) {\n          clear.clear_z_stencil_buffer = use_global_zs_clear;\n          clear.clear_all_render_targets = use_global_rt_clear;\n       }\n+#endif\n+#if V3D_VERSION >= 71\n+      unreachable(\"Hardware generation 71 not supported yet.\");\n+#endif\n    }\n }\n \n@@ -824,7 +839,12 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n       config.number_of_render_targets = MAX2(subpass->color_count, 1);\n       config.multisample_mode_4x = tiling->msaa;\n       config.double_buffer_in_non_ms_mode = tiling->double_buffer;\n+#if V3D_VERSION == 42\n       config.maximum_bpp_of_all_render_targets = tiling->internal_bpp;\n+#endif\n+#if V3D_VERSION >= 71\n+      unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n \n       if (ds_attachment_idx != VK_ATTACHMENT_UNUSED) {\n          const struct v3dv_image_view *iview =\n@@ -920,7 +940,7 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n       const struct v3d_resource_slice *slice =\n          &image->planes[plane].slices[iview->vk.base_mip_level];\n \n-      const uint32_t *clear_color =\n+      UNUSED const uint32_t *clear_color =\n          &state->attachments[attachment_idx].clear_value.color[0];\n \n       uint32_t clear_pad = 0;\n@@ -937,13 +957,19 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n          }\n       }\n \n+#if V3D_VERSION == 42\n       cl_emit(rcl, TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1, clear) {\n          clear.clear_color_low_32_bits = clear_color[0];\n          clear.clear_color_next_24_bits = clear_color[1] & 0xffffff;\n          clear.render_target_number = i;\n       };\n+#endif\n+#if V3D_VERSION >= 71\n+         unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n \n       if (iview->planes[0].internal_bpp >= V3D_INTERNAL_BPP_64) {\n+#if V3D_VERSION == 42\n          cl_emit(rcl, TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2, clear) {\n             clear.clear_color_mid_low_32_bits =\n                ((clear_color[1] >> 24) | (clear_color[2] << 8));\n@@ -951,17 +977,28 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n                ((clear_color[2] >> 24) | ((clear_color[3] & 0xffff) << 8));\n             clear.render_target_number = i;\n          };\n+#endif\n+#if V3D_VERSION >= 71\n+         unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n+\n       }\n \n       if (iview->planes[0].internal_bpp >= V3D_INTERNAL_BPP_128 || clear_pad) {\n+#if V3D_VERSION == 42\n          cl_emit(rcl, TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3, clear) {\n             clear.uif_padded_height_in_uif_blocks = clear_pad;\n             clear.clear_color_high_16_bits = clear_color[3] >> 16;\n             clear.render_target_number = i;\n          };\n+#endif\n+#if V3D_VERSION >= 71\n+         unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n       }\n    }\n \n+#if V3D_VERSION == 42\n    cl_emit(rcl, TILE_RENDERING_MODE_CFG_COLOR, rt) {\n       v3dX(cmd_buffer_render_pass_setup_render_target)\n          (cmd_buffer, 0, &rt.render_target_0_internal_bpp,\n@@ -976,6 +1013,10 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n          (cmd_buffer, 3, &rt.render_target_3_internal_bpp,\n           &rt.render_target_3_internal_type, &rt.render_target_3_clamp);\n    }\n+#endif\n+#if V3D_VERSION >= 71\n+   unreachable(\"Hardware generation 71 not supported yet.\");\n+#endif\n \n    /* Ends rendering mode config. */\n    if (ds_attachment_idx != VK_ATTACHMENT_UNUSED) {\n@@ -1036,10 +1077,15 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n       }\n       if (cmd_buffer->state.tile_aligned_render_area &&\n           (i == 0 || v3dv_do_double_initial_tile_clear(tiling))) {\n+#if V3D_VERSION == 42\n          cl_emit(rcl, CLEAR_TILE_BUFFERS, clear) {\n             clear.clear_z_stencil_buffer = !job->early_zs_clear;\n             clear.clear_all_render_targets = true;\n          }\n+#endif\n+#if V3D_VERSION >= 71\n+         unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n       }\n       cl_emit(rcl, END_OF_TILE_MARKER, end);\n    }\n@@ -1065,7 +1111,9 @@ v3dX(cmd_buffer_emit_viewport)(struct v3dv_cmd_buffer *cmd_buffer)\n     * now, would need to change if we allow multiple viewports\n     */\n    float *vptranslate = dynamic->viewport.translate[0];\n+#if V3D_VERSION == 42\n    float *vpscale = dynamic->viewport.scale[0];\n+#endif\n \n    struct v3dv_job *job = cmd_buffer->state.job;\n    assert(job);\n@@ -1078,10 +1126,15 @@ v3dX(cmd_buffer_emit_viewport)(struct v3dv_cmd_buffer *cmd_buffer)\n    v3dv_cl_ensure_space_with_branch(&job->bcl, required_cl_size);\n    v3dv_return_if_oom(cmd_buffer, NULL);\n \n+#if V3D_VERSION == 42\n    cl_emit(&job->bcl, CLIPPER_XY_SCALING, clip) {\n       clip.viewport_half_width_in_1_256th_of_pixel = vpscale[0] * 256.0f;\n       clip.viewport_half_height_in_1_256th_of_pixel = vpscale[1] * 256.0f;\n    }\n+#endif\n+#if V3D_VERSION >= 71\n+   unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n \n    float translate_z, scale_z;\n    v3dv_cmd_buffer_state_get_viewport_z_xform(&cmd_buffer->state, 0,\n@@ -1591,16 +1644,20 @@ v3dX(cmd_buffer_emit_configuration_bits)(struct v3dv_cmd_buffer *cmd_buffer)\n    struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;\n    assert(pipeline);\n \n-   bool enable_ez = job_update_ez_state(job, pipeline, cmd_buffer);\n-\n    v3dv_cl_ensure_space_with_branch(&job->bcl, cl_packet_length(CFG_BITS));\n    v3dv_return_if_oom(cmd_buffer, NULL);\n \n+#if V3D_VERSION == 42\n+   bool enable_ez = job_update_ez_state(job, pipeline, cmd_buffer);\n    cl_emit_with_prepacked(&job->bcl, CFG_BITS, pipeline->cfg_bits, config) {\n       config.early_z_enable = enable_ez;\n       config.early_z_updates_enable = config.early_z_enable &&\n          pipeline->z_updates_enable;\n    }\n+#endif\n+#if V3D_VERSION >= 71\n+   unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n }\n \n void\n@@ -2031,10 +2088,12 @@ v3dX(cmd_buffer_emit_gl_shader_state)(struct v3dv_cmd_buffer *cmd_buffer)\n                                 pipeline->vpm_cfg.Gv);\n    }\n \n+#if V3D_VERSION == 42\n    struct v3dv_bo *default_attribute_values =\n       pipeline->default_attribute_values != NULL ?\n       pipeline->default_attribute_values :\n       pipeline->device->default_attribute_float;\n+#endif\n \n    cl_emit_with_prepacked(&job->indirect, GL_SHADER_STATE_RECORD,\n                           pipeline->shader_state_record, shader) {\n@@ -2060,8 +2119,10 @@ v3dX(cmd_buffer_emit_gl_shader_state)(struct v3dv_cmd_buffer *cmd_buffer)\n       shader.vertex_shader_uniforms_address = cmd_buffer->state.uniforms.vs;\n       shader.fragment_shader_uniforms_address = cmd_buffer->state.uniforms.fs;\n \n+#if V3D_VERSION == 42\n       shader.address_of_default_attribute_values =\n          v3dv_cl_address(default_attribute_values, 0);\n+#endif\n \n       shader.any_shader_reads_hardware_written_primitive_id =\n          (pipeline->has_gs && prog_data_gs->uses_pid) || prog_data_fs->uses_pid;\n@@ -2399,11 +2460,17 @@ v3dX(cmd_buffer_render_pass_setup_render_target)(struct v3dv_cmd_buffer *cmd_buf\n \n    assert(iview->plane_count == 1);\n    *rt_bpp = iview->planes[0].internal_bpp;\n-   *rt_type = iview->planes[0].internal_type;\n    if (vk_format_is_int(iview->vk.view_format))\n+#if V3D_VERSION == 42\n+   *rt_type = iview->planes[0].internal_type;\n+   if (vk_format_is_int(iview->vk.format))\n       *rt_clamp = V3D_RENDER_TARGET_CLAMP_INT;\n    else if (vk_format_is_srgb(iview->vk.view_format))\n       *rt_clamp = V3D_RENDER_TARGET_CLAMP_NORM;\n    else\n       *rt_clamp = V3D_RENDER_TARGET_CLAMP_NONE;\n+#endif\n+#if V3D_VERSION >= 71\n+   unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n }\ndiff --git a/src/broadcom/vulkan/v3dvx_image.c b/src/broadcom/vulkan/v3dvx_image.c\nindex 80a3e5bfde8..dac6ff2741f 100644\n--- a/src/broadcom/vulkan/v3dvx_image.c\n+++ b/src/broadcom/vulkan/v3dvx_image.c\n@@ -76,8 +76,6 @@ pack_texture_shader_state_helper(struct v3dv_device *device,\n          tex.swizzle_b = v3d_translate_pipe_swizzle(image_view->planes[plane].swizzle[2]);\n          tex.swizzle_a = v3d_translate_pipe_swizzle(image_view->planes[plane].swizzle[3]);\n \n-         tex.reverse_standard_border_color = image_view->planes[plane].channel_reverse;\n-\n          tex.texture_type = image_view->format->planes[plane].tex_type;\n \n          if (image->vk.image_type == VK_IMAGE_TYPE_3D) {\n@@ -110,7 +108,16 @@ pack_texture_shader_state_helper(struct v3dv_device *device,\n \n          tex.array_stride_64_byte_aligned = image->planes[iplane].cube_map_stride / 64;\n \n+#if V3D_VERSION == 42\n+         tex.reverse_standard_border_color = image_view->planes[plane].channel_reverse;\n+#endif\n+\n+#if V3D_VERSION == 42\n          tex.srgb = vk_format_is_srgb(image_view->vk.view_format);\n+#endif\n+#if V3D_VERSION >= 71\n+      unreachable(\"Hardware generation 71 not supported yet.\");\n+#endif\n \n          /* At this point we don't have the job. That's the reason the first\n           * parameter is NULL, to avoid a crash when cl_pack_emit_reloc tries to\n@@ -166,7 +173,12 @@ v3dX(pack_texture_shader_state_from_buffer_view)(struct v3dv_device *device,\n \n       assert(buffer_view->format->plane_count == 1);\n       tex.texture_type = buffer_view->format->planes[0].tex_type;\n+#if V3D_VERSION == 42\n       tex.srgb = vk_format_is_srgb(buffer_view->vk_format);\n+#endif\n+#if V3D_VERSION >= 71\n+      unreachable(\"Hardware generation 71 not supported yet.\");\n+#endif\n \n       /* At this point we don't have the job. That's the reason the first\n        * parameter is NULL, to avoid a crash when cl_pack_emit_reloc tries to\ndiff --git a/src/broadcom/vulkan/v3dvx_meta_common.c b/src/broadcom/vulkan/v3dvx_meta_common.c\nindex 04147b82cbd..2db07ea7427 100644\n--- a/src/broadcom/vulkan/v3dvx_meta_common.c\n+++ b/src/broadcom/vulkan/v3dvx_meta_common.c\n@@ -58,7 +58,12 @@ emit_rcl_prologue(struct v3dv_job *job,\n       config.number_of_render_targets = 1;\n       config.multisample_mode_4x = tiling->msaa;\n       config.double_buffer_in_non_ms_mode = tiling->double_buffer;\n+#if V3D_VERSION == 42\n       config.maximum_bpp_of_all_render_targets = tiling->internal_bpp;\n+#endif\n+#if V3D_VERSION >= 71\n+      unreachable(\"Hardware generation 71 not supported yet.\");\n+#endif\n       config.internal_depth_type = fb->internal_depth_type;\n    }\n \n@@ -88,14 +93,20 @@ emit_rcl_prologue(struct v3dv_job *job,\n          }\n       }\n \n+#if V3D_VERSION == 42\n       const uint32_t *color = &clear_info->clear_value->color[0];\n       cl_emit(rcl, TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1, clear) {\n          clear.clear_color_low_32_bits = color[0];\n          clear.clear_color_next_24_bits = color[1] & 0x00ffffff;\n          clear.render_target_number = 0;\n       };\n+#endif\n+#if V3D_VERSION >= 71\n+   unreachable(\"Hardware generation 71 not supported yet.\");\n+#endif\n \n       if (tiling->internal_bpp >= V3D_INTERNAL_BPP_64) {\n+#if V3D_VERSION == 42\n          cl_emit(rcl, TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2, clear) {\n             clear.clear_color_mid_low_32_bits =\n               ((color[1] >> 24) | (color[2] << 8));\n@@ -103,22 +114,37 @@ emit_rcl_prologue(struct v3dv_job *job,\n               ((color[2] >> 24) | ((color[3] & 0xffff) << 8));\n             clear.render_target_number = 0;\n          };\n+#endif\n+#if V3D_VERSION >= 71\n+   unreachable(\"Hardware generation 71 not supported yet.\");\n+#endif\n+\n       }\n \n       if (tiling->internal_bpp >= V3D_INTERNAL_BPP_128 || clear_pad) {\n+#if V3D_VERSION == 42\n          cl_emit(rcl, TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3, clear) {\n             clear.uif_padded_height_in_uif_blocks = clear_pad;\n             clear.clear_color_high_16_bits = color[3] >> 16;\n             clear.render_target_number = 0;\n          };\n+#endif\n+#if V3D_VERSION >= 71\n+   unreachable(\"Hardware generation 71 not supported yet.\");\n+#endif\n       }\n    }\n \n+#if V3D_VERSION == 42\n    cl_emit(rcl, TILE_RENDERING_MODE_CFG_COLOR, rt) {\n       rt.render_target_0_internal_bpp = tiling->internal_bpp;\n       rt.render_target_0_internal_type = fb->internal_type;\n       rt.render_target_0_clamp = V3D_RENDER_TARGET_CLAMP_NONE;\n    }\n+#endif\n+#if V3D_VERSION >= 71\n+   unreachable(\"Hardware generation 71 not supported yet.\");\n+#endif\n \n    cl_emit(rcl, TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES, clear) {\n       clear.z_clear_value = clear_info ? clear_info->clear_value->z : 1.0f;\n@@ -179,10 +205,16 @@ emit_frame_setup(struct v3dv_job *job,\n        */\n       if (clear_value &&\n           (i == 0 || v3dv_do_double_initial_tile_clear(tiling))) {\n+#if V3D_VERSION == 42\n          cl_emit(rcl, CLEAR_TILE_BUFFERS, clear) {\n             clear.clear_z_stencil_buffer = true;\n             clear.clear_all_render_targets = true;\n          }\n+#endif\n+#if V3D_VERSION >= 71\n+      unreachable(\"Hardware generation 71 not supported yet.\");\n+#endif\n+\n       }\n       cl_emit(rcl, END_OF_TILE_MARKER, end);\n    }\ndiff --git a/src/broadcom/vulkan/v3dvx_pipeline.c b/src/broadcom/vulkan/v3dvx_pipeline.c\nindex 5d32d414ed8..922698b08a2 100644\n--- a/src/broadcom/vulkan/v3dvx_pipeline.c\n+++ b/src/broadcom/vulkan/v3dvx_pipeline.c\n@@ -447,10 +447,15 @@ pack_shader_state_record(struct v3dv_pipeline *pipeline)\n       /* FIXME: Use combined input/output size flag in the common case (also\n        * on v3d, see v3dx_draw).\n        */\n+#if V3D_VERSION == 42\n       shader.coordinate_shader_has_separate_input_and_output_vpm_blocks =\n          prog_data_vs_bin->separate_segments;\n       shader.vertex_shader_has_separate_input_and_output_vpm_blocks =\n          prog_data_vs->separate_segments;\n+#endif\n+#if V3D_VERSION >= 71\n+      unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n \n       shader.coordinate_shader_input_vpm_segment_size =\n          prog_data_vs_bin->separate_segments ?\ndiff --git a/src/broadcom/vulkan/v3dvx_queue.c b/src/broadcom/vulkan/v3dvx_queue.c\nindex efe63de425c..1a26d04aef7 100644\n--- a/src/broadcom/vulkan/v3dvx_queue.c\n+++ b/src/broadcom/vulkan/v3dvx_queue.c\n@@ -42,14 +42,25 @@ v3dX(job_emit_noop)(struct v3dv_job *job)\n       config.image_height_pixels = 1;\n       config.number_of_render_targets = 1;\n       config.multisample_mode_4x = false;\n+#if V3D_VERSION == 42\n       config.maximum_bpp_of_all_render_targets = V3D_INTERNAL_BPP_32;\n+#endif\n+#if V3D_VERSION >= 71\n+      unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n    }\n \n+#if V3D_VERSION == 42\n    cl_emit(rcl, TILE_RENDERING_MODE_CFG_COLOR, rt) {\n       rt.render_target_0_internal_bpp = V3D_INTERNAL_BPP_32;\n       rt.render_target_0_internal_type = V3D_INTERNAL_TYPE_8;\n       rt.render_target_0_clamp = V3D_RENDER_TARGET_CLAMP_NONE;\n    }\n+#endif\n+#if V3D_VERSION >= 71\n+   unreachable(\"Hardware generation 71 not supported yet.\");\n+#endif\n+\n \n    cl_emit(rcl, TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES, clear) {\n       clear.z_clear_value = 1.0f;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0074-v3dv-expose-V3D-revision-number-in-device-name.patch",
    "content": "From 7aa016bca8bb1bf449ea79505692353c0bd174b8 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 10 Nov 2021 10:06:50 +0100\nSubject: [PATCH 074/142] v3dv: expose V3D revision number in device name\n\n---\n src/broadcom/vulkan/v3dv_device.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c\nindex d29ffad3531..3034b561480 100644\n--- a/src/broadcom/vulkan/v3dv_device.c\n+++ b/src/broadcom/vulkan/v3dv_device.c\n@@ -1123,8 +1123,10 @@ create_physical_device(struct v3dv_instance *instance,\n    device->next_program_id = 0;\n \n    ASSERTED int len =\n-      asprintf(&device->name, \"V3D %d.%d\",\n-               device->devinfo.ver / 10, device->devinfo.ver % 10);\n+      asprintf(&device->name, \"V3D %d.%d.%d\",\n+               device->devinfo.ver / 10,\n+               device->devinfo.ver % 10,\n+               device->devinfo.rev);\n    assert(len != -1);\n \n    v3dv_physical_device_init_disk_cache(device);\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0075-v3dv-device-handle-new-rpi5-device-bcm2712.patch",
    "content": "From fb9e95b7e1d5987fd25e914635c4e09d81ea9561 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 10 Nov 2021 07:54:35 +0100\nSubject: [PATCH 075/142] v3dv/device: handle new rpi5 device (bcm2712)\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nThis includes both master and primary devices.\n\nSigned-off-by: Iago Toral Quiroga <itoral@igalia.com>\nSigned-off-by: Alejandro Piñeiro <apinheiro@igalia.com>\n---\n src/broadcom/vulkan/v3dv_device.c | 10 +++++++---\n 1 file changed, 7 insertions(+), 3 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c\nindex 3034b561480..c8719d33f15 100644\n--- a/src/broadcom/vulkan/v3dv_device.c\n+++ b/src/broadcom/vulkan/v3dv_device.c\n@@ -1287,7 +1287,8 @@ enumerate_devices(struct vk_instance *vk_instance)\n       if (devices[i]->available_nodes & 1 << DRM_NODE_RENDER) {\n          char **compat = devices[i]->deviceinfo.platform->compatible;\n          while (*compat) {\n-            if (strncmp(*compat, \"brcm,2711-v3d\", 13) == 0) {\n+            if (strncmp(*compat, \"brcm,2711-v3d\", 13) == 0 ||\n+                strncmp(*compat, \"brcm,2712-v3d\", 13) == 0) {\n                v3d_idx = i;\n                break;\n             }\n@@ -1296,8 +1297,9 @@ enumerate_devices(struct vk_instance *vk_instance)\n       } else if (devices[i]->available_nodes & 1 << DRM_NODE_PRIMARY) {\n          char **compat = devices[i]->deviceinfo.platform->compatible;\n          while (*compat) {\n-            if (strncmp(*compat, \"brcm,bcm2711-vc5\", 16) == 0 ||\n-                strncmp(*compat, \"brcm,bcm2835-vc4\", 16) == 0 ) {\n+            if (strncmp(*compat, \"brcm,bcm2712-vc6\", 16) == 0 ||\n+                strncmp(*compat, \"brcm,bcm2711-vc5\", 16) == 0 ||\n+                strncmp(*compat, \"brcm,bcm2835-vc4\", 16) == 0) {\n                vc4_idx = i;\n                break;\n             }\n@@ -1334,6 +1336,8 @@ v3dv_physical_device_device_id(struct v3dv_physical_device *dev)\n    switch (dev->devinfo.ver) {\n    case 42:\n       return 0xBE485FD3; /* Broadcom deviceID for 2711 */\n+   case 71:\n+      return 0x55701C33; /* Broadcom deviceID for 2712 */\n    default:\n       unreachable(\"Unsupported V3D version\");\n    }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0076-v3dv-cmd_buffer-emit-TILE_BINNING_MODE_CFG-for-v71.patch",
    "content": "From c4f957af4fb0e10abf0a7ffad4f7a468633b7d99 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Tue, 20 Jul 2021 14:00:44 +0200\nSubject: [PATCH 076/142] v3dv/cmd_buffer: emit TILE_BINNING_MODE_CFG for v71\n\n---\n src/broadcom/vulkan/v3dvx_cmd_buffer.c | 9 ++++++++-\n 1 file changed, 8 insertions(+), 1 deletion(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex b958e634c82..17b2f46850d 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -94,7 +94,14 @@ v3dX(job_emit_binning_prolog)(struct v3dv_job *job,\n       config.maximum_bpp_of_all_render_targets = tiling->internal_bpp;\n #endif\n #if V3D_VERSION >= 71\n-      unreachable(\"HW generation 71 not supported yet.\");\n+      config.log2_tile_width = log2_tile_size(tiling->tile_width);\n+      config.log2_tile_height = log2_tile_size(tiling->tile_height);\n+      /* FIXME: ideally we would like next assert on the packet header (as is\n+       * general, so also applies to GL). We would need to expand\n+       * gen_pack_header for that.\n+       */\n+      assert(config.log2_tile_width == config.log2_tile_height ||\n+             config.log2_tile_width == config.log2_tile_height + 1);\n #endif\n    }\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0077-v3dv-emit-TILE_RENDERING_MODE_CFG_COMMON-for-v71.patch",
    "content": "From 1934ac07df73cb685f6550b8b0f5b4f2ead11396 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Tue, 20 Jul 2021 14:33:00 +0200\nSubject: [PATCH 077/142] v3dv: emit TILE_RENDERING_MODE_CFG_COMMON for v71\n\n---\n src/broadcom/vulkan/v3dvx_cmd_buffer.c  | 9 ++++++++-\n src/broadcom/vulkan/v3dvx_meta_common.c | 9 ++++++++-\n 2 files changed, 16 insertions(+), 2 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex 17b2f46850d..7837b460051 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -850,7 +850,14 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n       config.maximum_bpp_of_all_render_targets = tiling->internal_bpp;\n #endif\n #if V3D_VERSION >= 71\n-      unreachable(\"HW generation 71 not supported yet.\");\n+      config.log2_tile_width = log2_tile_size(tiling->tile_width);\n+      config.log2_tile_height = log2_tile_size(tiling->tile_height);\n+      /* FIXME: ideallly we would like next assert on the packet header (as is\n+       * general, so also applies to GL). We would need to expand\n+       * gen_pack_header for that.\n+       */\n+      assert(config.log2_tile_width == config.log2_tile_height ||\n+             config.log2_tile_width == config.log2_tile_height + 1);\n #endif\n \n       if (ds_attachment_idx != VK_ATTACHMENT_UNUSED) {\ndiff --git a/src/broadcom/vulkan/v3dvx_meta_common.c b/src/broadcom/vulkan/v3dvx_meta_common.c\nindex 2db07ea7427..e4084d851fc 100644\n--- a/src/broadcom/vulkan/v3dvx_meta_common.c\n+++ b/src/broadcom/vulkan/v3dvx_meta_common.c\n@@ -62,7 +62,14 @@ emit_rcl_prologue(struct v3dv_job *job,\n       config.maximum_bpp_of_all_render_targets = tiling->internal_bpp;\n #endif\n #if V3D_VERSION >= 71\n-      unreachable(\"Hardware generation 71 not supported yet.\");\n+      config.log2_tile_width = log2_tile_size(tiling->tile_width);\n+      config.log2_tile_height = log2_tile_size(tiling->tile_height);\n+      /* FIXME: ideallly we would like next assert on the packet header (as is\n+       * general, so also applies to GL). We would need to expand\n+       * gen_pack_header for that.\n+       */\n+      assert(config.log2_tile_width == config.log2_tile_height ||\n+             config.log2_tile_width == config.log2_tile_height + 1);\n #endif\n       config.internal_depth_type = fb->internal_depth_type;\n    }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0078-v3dv-cmd_buffer-emit-TILE_RENDERING_MODE_CFG_RENDER_.patch",
    "content": "From f0f9eea3cad83ed8824c6a7686150327407a5286 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 22 Jul 2021 14:26:13 +0200\nSubject: [PATCH 078/142] v3dv/cmd_buffer: emit\n TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART1 for v71\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nSigned-off-by: Alejandro Piñeiro <apinheiro@igalia.com>\nSigned-off-by: Iago Toral Quiroga <itoral@igalia.com>\n---\n src/broadcom/vulkan/v3dvx_cmd_buffer.c  | 186 +++++++++++++++++-------\n src/broadcom/vulkan/v3dvx_meta_common.c |  12 +-\n src/broadcom/vulkan/v3dvx_private.h     |  11 +-\n 3 files changed, 147 insertions(+), 62 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex 7837b460051..c6307890da5 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -800,6 +800,103 @@ set_rcl_early_z_config(struct v3dv_job *job,\n    }\n }\n \n+/* Note that for v71, render target cfg packets has just one field that\n+ * combined the internal type and clamp mode. For simplicity we keep just one\n+ * helper.\n+ *\n+ * Note: rt_type is in fact a \"enum V3DX(Internal_Type)\".\n+ *\n+ * FIXME: for v71 we are not returning all the possible combinations for\n+ * render target internal type and clamp. For example for int types we are\n+ * always using clamp int, and for 16f we are using clamp none or pos (that\n+ * seem the equivalent for no-clamp on 4.2), but not pq or hlg. In summary\n+ * right now we are just porting what we were doing on 4.2\n+ */\n+uint32_t\n+v3dX(clamp_for_format_and_type)(uint32_t rt_type,\n+                                VkFormat vk_format)\n+{\n+#if V3D_VERSION == 42\n+   if (vk_format_is_int(vk_format))\n+      return V3D_RENDER_TARGET_CLAMP_INT;\n+   else if (vk_format_is_srgb(vk_format))\n+      return V3D_RENDER_TARGET_CLAMP_NORM;\n+   else\n+      return V3D_RENDER_TARGET_CLAMP_NONE;\n+#endif\n+#if V3D_VERSION >= 71\n+   switch (rt_type) {\n+   case V3D_INTERNAL_TYPE_8I:\n+      return V3D_RENDER_TARGET_TYPE_CLAMP_8I_CLAMPED;\n+   case V3D_INTERNAL_TYPE_8UI:\n+      return V3D_RENDER_TARGET_TYPE_CLAMP_8UI_CLAMPED;\n+   case V3D_INTERNAL_TYPE_8:\n+      return V3D_RENDER_TARGET_TYPE_CLAMP_8;\n+   case V3D_INTERNAL_TYPE_16I:\n+      return V3D_RENDER_TARGET_TYPE_CLAMP_16I_CLAMPED;\n+   case V3D_INTERNAL_TYPE_16UI:\n+      return V3D_RENDER_TARGET_TYPE_CLAMP_16UI_CLAMPED;\n+   case V3D_INTERNAL_TYPE_16F:\n+      return vk_format_is_srgb(vk_format) ?\n+         V3D_RENDER_TARGET_TYPE_CLAMP_16F_CLAMP_NORM :\n+         V3D_RENDER_TARGET_TYPE_CLAMP_16F;\n+   case V3D_INTERNAL_TYPE_32I:\n+      return V3D_RENDER_TARGET_TYPE_CLAMP_32I_CLAMPED;\n+   case V3D_INTERNAL_TYPE_32UI:\n+      return V3D_RENDER_TARGET_TYPE_CLAMP_32UI_CLAMPED;\n+   case V3D_INTERNAL_TYPE_32F:\n+      return V3D_RENDER_TARGET_TYPE_CLAMP_32F;\n+   default:\n+      unreachable(\"Unknown internal render target type\");\n+   }\n+\n+   return V3D_RENDER_TARGET_TYPE_CLAMP_INVALID;\n+#endif\n+}\n+\n+static void\n+cmd_buffer_render_pass_setup_render_target(struct v3dv_cmd_buffer *cmd_buffer,\n+                                           int rt,\n+                                           uint32_t *rt_bpp,\n+#if V3D_VERSION == 42\n+                                           uint32_t *rt_type,\n+                                           uint32_t *rt_clamp)\n+#else\n+                                           uint32_t *rt_type_clamp)\n+#endif\n+{\n+   const struct v3dv_cmd_buffer_state *state = &cmd_buffer->state;\n+\n+   assert(state->subpass_idx < state->pass->subpass_count);\n+   const struct v3dv_subpass *subpass =\n+      &state->pass->subpasses[state->subpass_idx];\n+\n+   if (rt >= subpass->color_count)\n+      return;\n+\n+   struct v3dv_subpass_attachment *attachment = &subpass->color_attachments[rt];\n+   const uint32_t attachment_idx = attachment->attachment;\n+   if (attachment_idx == VK_ATTACHMENT_UNUSED)\n+      return;\n+\n+   assert(attachment_idx < state->framebuffer->attachment_count &&\n+          attachment_idx < state->attachment_alloc_count);\n+   struct v3dv_image_view *iview = state->attachments[attachment_idx].image_view;\n+   assert(vk_format_is_color(iview->vk.format));\n+\n+   assert(iview->plane_count == 1);\n+   *rt_bpp = iview->planes[0].internal_bpp;\n+#if V3D_VERSION == 42\n+   *rt_type = iview->planes[0].internal_type;\n+   *rt_clamp = v3dX(clamp_for_format_and_type)(iview->planes[0].internal_type,\n+                                               iview->vk.format);\n+#endif\n+#if V3D_VERSION >= 71\n+   *rt_type_clamp = v3dX(clamp_for_format_and_type)(iview->planes[0].internal_type,\n+                                                    iview->vk.format);\n+#endif\n+}\n+\n void\n v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n {\n@@ -939,10 +1036,20 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n     */\n    job->early_zs_clear = do_early_zs_clear;\n \n+#if V3D_VERSION >= 71\n+   uint32_t base_addr = 0;\n+#endif\n    for (uint32_t i = 0; i < subpass->color_count; i++) {\n       uint32_t attachment_idx = subpass->color_attachments[i].attachment;\n-      if (attachment_idx == VK_ATTACHMENT_UNUSED)\n+      if (attachment_idx == VK_ATTACHMENT_UNUSED) {\n+#if V3D_VERSION >= 71\n+         cl_emit(rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART1, rt) {\n+            rt.render_target_number = i;\n+            rt.stride = 1; /* Unused */\n+         }\n+#endif\n          continue;\n+      }\n \n       struct v3dv_image_view *iview =\n          state->attachments[attachment_idx].image_view;\n@@ -978,9 +1085,6 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n          clear.render_target_number = i;\n       };\n #endif\n-#if V3D_VERSION >= 71\n-         unreachable(\"HW generation 71 not supported yet.\");\n-#endif\n \n       if (iview->planes[0].internal_bpp >= V3D_INTERNAL_BPP_64) {\n #if V3D_VERSION == 42\n@@ -1010,27 +1114,44 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n          unreachable(\"HW generation 71 not supported yet.\");\n #endif\n       }\n+\n+#if V3D_VERSION >= 71\n+      cl_emit(rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART1, rt) {\n+         rt.clear_color_low_bits = clear_color[0];\n+         cmd_buffer_render_pass_setup_render_target(cmd_buffer, i, &rt.internal_bpp,\n+                                                    &rt.internal_type_and_clamping);\n+         rt.stride =\n+            v3d_compute_rt_row_row_stride_128_bits(tiling->tile_width,\n+                                                   v3d_internal_bpp_words(rt.internal_bpp));\n+         rt.base_address = base_addr;\n+         rt.render_target_number = i;\n+\n+         /* base_addr in multiples of 512 bits. We divide by 8 because stride\n+          * is in 128-bit units, but it is packing 2 rows worth of data, so we\n+          * need to divide it by 2 so it is only 1 row, and then again by 4 so\n+          * it is in 512-bit units.\n+          */\n+         base_addr += (tiling->tile_height * rt.stride) / 8;\n+      }\n+#endif\n    }\n \n #if V3D_VERSION == 42\n    cl_emit(rcl, TILE_RENDERING_MODE_CFG_COLOR, rt) {\n-      v3dX(cmd_buffer_render_pass_setup_render_target)\n+      cmd_buffer_render_pass_setup_render_target\n          (cmd_buffer, 0, &rt.render_target_0_internal_bpp,\n           &rt.render_target_0_internal_type, &rt.render_target_0_clamp);\n-      v3dX(cmd_buffer_render_pass_setup_render_target)\n+      cmd_buffer_render_pass_setup_render_target\n          (cmd_buffer, 1, &rt.render_target_1_internal_bpp,\n           &rt.render_target_1_internal_type, &rt.render_target_1_clamp);\n-      v3dX(cmd_buffer_render_pass_setup_render_target)\n+      cmd_buffer_render_pass_setup_render_target\n          (cmd_buffer, 2, &rt.render_target_2_internal_bpp,\n           &rt.render_target_2_internal_type, &rt.render_target_2_clamp);\n-      v3dX(cmd_buffer_render_pass_setup_render_target)\n+      cmd_buffer_render_pass_setup_render_target\n          (cmd_buffer, 3, &rt.render_target_3_internal_bpp,\n           &rt.render_target_3_internal_type, &rt.render_target_3_clamp);\n    }\n #endif\n-#if V3D_VERSION >= 71\n-   unreachable(\"Hardware generation 71 not supported yet.\");\n-#endif\n \n    /* Ends rendering mode config. */\n    if (ds_attachment_idx != VK_ATTACHMENT_UNUSED) {\n@@ -2445,46 +2566,3 @@ v3dX(cmd_buffer_emit_indexed_indirect)(struct v3dv_cmd_buffer *cmd_buffer,\n                                      buffer->mem_offset + offset);\n    }\n }\n-\n-void\n-v3dX(cmd_buffer_render_pass_setup_render_target)(struct v3dv_cmd_buffer *cmd_buffer,\n-                                                 int rt,\n-                                                 uint32_t *rt_bpp,\n-                                                 uint32_t *rt_type,\n-                                                 uint32_t *rt_clamp)\n-{\n-   const struct v3dv_cmd_buffer_state *state = &cmd_buffer->state;\n-\n-   assert(state->subpass_idx < state->pass->subpass_count);\n-   const struct v3dv_subpass *subpass =\n-      &state->pass->subpasses[state->subpass_idx];\n-\n-   if (rt >= subpass->color_count)\n-      return;\n-\n-   struct v3dv_subpass_attachment *attachment = &subpass->color_attachments[rt];\n-   const uint32_t attachment_idx = attachment->attachment;\n-   if (attachment_idx == VK_ATTACHMENT_UNUSED)\n-      return;\n-\n-   assert(attachment_idx < state->framebuffer->attachment_count &&\n-          attachment_idx < state->attachment_alloc_count);\n-   struct v3dv_image_view *iview = state->attachments[attachment_idx].image_view;\n-   assert(vk_format_is_color(iview->vk.format));\n-\n-   assert(iview->plane_count == 1);\n-   *rt_bpp = iview->planes[0].internal_bpp;\n-   if (vk_format_is_int(iview->vk.view_format))\n-#if V3D_VERSION == 42\n-   *rt_type = iview->planes[0].internal_type;\n-   if (vk_format_is_int(iview->vk.format))\n-      *rt_clamp = V3D_RENDER_TARGET_CLAMP_INT;\n-   else if (vk_format_is_srgb(iview->vk.view_format))\n-      *rt_clamp = V3D_RENDER_TARGET_CLAMP_NORM;\n-   else\n-      *rt_clamp = V3D_RENDER_TARGET_CLAMP_NONE;\n-#endif\n-#if V3D_VERSION >= 71\n-   unreachable(\"HW generation 71 not supported yet.\");\n-#endif\n-}\ndiff --git a/src/broadcom/vulkan/v3dvx_meta_common.c b/src/broadcom/vulkan/v3dvx_meta_common.c\nindex e4084d851fc..c6391bc6d83 100644\n--- a/src/broadcom/vulkan/v3dvx_meta_common.c\n+++ b/src/broadcom/vulkan/v3dvx_meta_common.c\n@@ -26,6 +26,7 @@\n \n #include \"broadcom/common/v3d_macros.h\"\n #include \"broadcom/common/v3d_tfu.h\"\n+#include \"broadcom/common/v3d_util.h\"\n #include \"broadcom/cle/v3dx_pack.h\"\n #include \"broadcom/compiler/v3d_compiler.h\"\n \n@@ -150,7 +151,16 @@ emit_rcl_prologue(struct v3dv_job *job,\n    }\n #endif\n #if V3D_VERSION >= 71\n-   unreachable(\"Hardware generation 71 not supported yet.\");\n+   cl_emit(rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART1, rt) {\n+      rt.internal_bpp = tiling->internal_bpp;\n+      rt.internal_type_and_clamping = v3dX(clamp_for_format_and_type)(fb->internal_type,\n+                                                                      fb->vk_format);\n+      rt.stride =\n+         v3d_compute_rt_row_row_stride_128_bits(tiling->tile_width,\n+                                                v3d_internal_bpp_words(rt.internal_bpp));\n+      rt.base_address = 0;\n+      rt.render_target_number = 0;\n+   }\n #endif\n \n    cl_emit(rcl, TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES, clear) {\ndiff --git a/src/broadcom/vulkan/v3dvx_private.h b/src/broadcom/vulkan/v3dvx_private.h\nindex ad8ddfa5731..a4157d11c7c 100644\n--- a/src/broadcom/vulkan/v3dvx_private.h\n+++ b/src/broadcom/vulkan/v3dvx_private.h\n@@ -125,13 +125,6 @@ v3dX(get_hw_clear_color)(const VkClearColorValue *color,\n                          uint32_t internal_size,\n                          uint32_t *hw_color);\n \n-void\n-v3dX(cmd_buffer_render_pass_setup_render_target)(struct v3dv_cmd_buffer *cmd_buffer,\n-                                                 int rt,\n-                                                 uint32_t *rt_bpp,\n-                                                 uint32_t *rt_type,\n-                                                 uint32_t *rt_clamp);\n-\n /* Used at v3dv_device */\n \n void\n@@ -325,3 +318,7 @@ uint32_t v3dX(max_descriptor_bo_size)(void);\n uint32_t v3dX(combined_image_sampler_texture_state_offset)(uint8_t plane);\n \n uint32_t v3dX(combined_image_sampler_sampler_state_offset)(uint8_t plane);\n+\n+uint32_t\n+v3dX(clamp_for_format_and_type)(uint32_t rt_type,\n+                                VkFormat vk_format);\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0079-v3dvx-cmd_buffer-emit-CLEAR_RENDER_TARGETS-for-v71.patch",
    "content": "From 7c89d8026fd550282d54933f37ffc2773869326f Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Mon, 26 Jul 2021 15:08:11 +0200\nSubject: [PATCH 079/142] v3dvx/cmd_buffer: emit CLEAR_RENDER_TARGETS for v71\n\n---\n src/broadcom/vulkan/v3dvx_cmd_buffer.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex c6307890da5..ae1c21ae00b 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -1219,7 +1219,7 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n          }\n #endif\n #if V3D_VERSION >= 71\n-         unreachable(\"HW generation 71 not supported yet.\");\n+         cl_emit(rcl, CLEAR_RENDER_TARGETS, clear_rt);\n #endif\n       }\n       cl_emit(rcl, END_OF_TILE_MARKER, end);\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0080-v3dv-cmd_buffer-emit-CLIPPER_XY_SCALING-for-v71.patch",
    "content": "From 2eb29b57fde2acda76e12953b3a1050f3056b39d Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Sun, 19 Sep 2021 23:37:32 +0200\nSubject: [PATCH 080/142] v3dv/cmd_buffer: emit CLIPPER_XY_SCALING for v71\n\n---\n src/broadcom/vulkan/v3dvx_cmd_buffer.c | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex ae1c21ae00b..2e525a11619 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -1246,9 +1246,7 @@ v3dX(cmd_buffer_emit_viewport)(struct v3dv_cmd_buffer *cmd_buffer)\n     * now, would need to change if we allow multiple viewports\n     */\n    float *vptranslate = dynamic->viewport.translate[0];\n-#if V3D_VERSION == 42\n    float *vpscale = dynamic->viewport.scale[0];\n-#endif\n \n    struct v3dv_job *job = cmd_buffer->state.job;\n    assert(job);\n@@ -1268,7 +1266,10 @@ v3dX(cmd_buffer_emit_viewport)(struct v3dv_cmd_buffer *cmd_buffer)\n    }\n #endif\n #if V3D_VERSION >= 71\n-   unreachable(\"HW generation 71 not supported yet.\");\n+   cl_emit(&job->bcl, CLIPPER_XY_SCALING, clip) {\n+      clip.viewport_half_width_in_1_64th_of_pixel = vpscale[0] * 64.0f;\n+      clip.viewport_half_height_in_1_64th_of_pixel = vpscale[1] * 64.0f;\n+   }\n #endif\n \n    float translate_z, scale_z;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0081-v3dv-uniforms-update-VIEWPORT_X-Y_SCALE-uniforms-for.patch",
    "content": "From 611bf6a7445837c7e20416ff9f11a6dad9c543d7 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Tue, 14 Sep 2021 10:08:19 +0200\nSubject: [PATCH 081/142] v3dv/uniforms: update VIEWPORT_X/Y_SCALE uniforms for\n v71\n\nAs the packet CLIPPER_XY scaling, this needs to be computed on 1/64ths\nof pixel, instead of 1/256ths of pixels.\n\nAs this is the usual values that we get from macros, we add manually a\nv42 and v71 macro, and define a new helper (V3DV_X) to get the value\nfor the current hw version.\n---\n src/broadcom/vulkan/v3dv_private.h  | 17 +++++++++++++++++\n src/broadcom/vulkan/v3dv_uniforms.c |  7 ++++---\n src/broadcom/vulkan/v3dvx_private.h |  9 +++++++++\n 3 files changed, 30 insertions(+), 3 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dv_private.h b/src/broadcom/vulkan/v3dv_private.h\nindex 6bdf338c67b..cd6811b19c2 100644\n--- a/src/broadcom/vulkan/v3dv_private.h\n+++ b/src/broadcom/vulkan/v3dv_private.h\n@@ -2617,6 +2617,23 @@ u64_compare(const void *key1, const void *key2)\n    v3d_X_thing;                                       \\\n })\n \n+/* Helper to get hw-specific macro values */\n+#define V3DV_X(device, thing) ({                                \\\n+   __typeof(V3D42_##thing) V3D_X_THING;                         \\\n+   switch (device->devinfo.ver) {                               \\\n+   case 42:                                                     \\\n+      V3D_X_THING = V3D42_##thing;                              \\\n+      break;                                                    \\\n+   case 71:                                                     \\\n+      V3D_X_THING = V3D71_##thing;                              \\\n+      break;                                                    \\\n+   default:                                                     \\\n+      unreachable(\"Unsupported hardware generation\");           \\\n+   }                                                            \\\n+   V3D_X_THING;                                                 \\\n+})\n+\n+\n \n /* v3d_macros from common requires v3dX and V3DX definitions. Below we need to\n  * define v3dX for each version supported, because when we compile code that\ndiff --git a/src/broadcom/vulkan/v3dv_uniforms.c b/src/broadcom/vulkan/v3dv_uniforms.c\nindex 72fa9a1b39c..0e681cc4ee2 100644\n--- a/src/broadcom/vulkan/v3dv_uniforms.c\n+++ b/src/broadcom/vulkan/v3dv_uniforms.c\n@@ -497,7 +497,8 @@ v3dv_write_uniforms_wg_offsets(struct v3dv_cmd_buffer *cmd_buffer,\n    struct v3dv_cl_reloc uniform_stream = v3dv_cl_get_address(&job->indirect);\n \n    struct v3dv_cl_out *uniforms = cl_start(&job->indirect);\n-\n+   float clipper_xy_granularity =\n+      V3DV_X(cmd_buffer->device, CLIPPER_XY_GRANULARITY);\n    for (int i = 0; i < uinfo->count; i++) {\n       uint32_t data = uinfo->data[i];\n \n@@ -520,11 +521,11 @@ v3dv_write_uniforms_wg_offsets(struct v3dv_cmd_buffer *cmd_buffer,\n          break;\n \n       case QUNIFORM_VIEWPORT_X_SCALE:\n-         cl_aligned_f(&uniforms, dynamic->viewport.scale[0][0] * 256.0f);\n+         cl_aligned_f(&uniforms, dynamic->viewport.scale[0][0] * clipper_xy_granularity);\n          break;\n \n       case QUNIFORM_VIEWPORT_Y_SCALE:\n-         cl_aligned_f(&uniforms, dynamic->viewport.scale[0][1] * 256.0f);\n+         cl_aligned_f(&uniforms, dynamic->viewport.scale[0][1] * clipper_xy_granularity);\n          break;\n \n       case QUNIFORM_VIEWPORT_Z_OFFSET: {\ndiff --git a/src/broadcom/vulkan/v3dvx_private.h b/src/broadcom/vulkan/v3dvx_private.h\nindex a4157d11c7c..ff9ba75cf93 100644\n--- a/src/broadcom/vulkan/v3dvx_private.h\n+++ b/src/broadcom/vulkan/v3dvx_private.h\n@@ -319,6 +319,15 @@ uint32_t v3dX(combined_image_sampler_texture_state_offset)(uint8_t plane);\n \n uint32_t v3dX(combined_image_sampler_sampler_state_offset)(uint8_t plane);\n \n+/* General utils */\n+\n+uint32_t\n+v3dX(clamp_for_format_and_type)(uint32_t rt_type,\n+                                VkFormat vk_format);\n+\n+#define V3D42_CLIPPER_XY_GRANULARITY 256.0f\n+#define V3D71_CLIPPER_XY_GRANULARITY 64.0f\n+\n uint32_t\n v3dX(clamp_for_format_and_type)(uint32_t rt_type,\n                                 VkFormat vk_format);\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0082-v3dv-cmd_buffer-just-don-t-fill-up-early-z-fields-fo.patch",
    "content": "From 3819efaf2bb6fd8bd9cd45d54fb7254377b2296a Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Tue, 27 Jul 2021 14:02:30 +0200\nSubject: [PATCH 082/142] v3dv/cmd_buffer: just don't fill up early-z fields\n for CFG_BITS for v71\n\nFor v71 early_z_enable/early_z_updates_enable is configured with\npacket 121.\n---\n src/broadcom/vulkan/v3dvx_cmd_buffer.c | 9 +++------\n 1 file changed, 3 insertions(+), 6 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex 2e525a11619..fe9f7e43596 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -1783,17 +1783,14 @@ v3dX(cmd_buffer_emit_configuration_bits)(struct v3dv_cmd_buffer *cmd_buffer)\n    v3dv_cl_ensure_space_with_branch(&job->bcl, cl_packet_length(CFG_BITS));\n    v3dv_return_if_oom(cmd_buffer, NULL);\n \n-#if V3D_VERSION == 42\n-   bool enable_ez = job_update_ez_state(job, pipeline, cmd_buffer);\n    cl_emit_with_prepacked(&job->bcl, CFG_BITS, pipeline->cfg_bits, config) {\n+#if V3D_VERSION == 42\n+      bool enable_ez = job_update_ez_state(job, pipeline, cmd_buffer);\n       config.early_z_enable = enable_ez;\n       config.early_z_updates_enable = config.early_z_enable &&\n          pipeline->z_updates_enable;\n-   }\n-#endif\n-#if V3D_VERSION >= 71\n-   unreachable(\"HW generation 71 not supported yet.\");\n #endif\n+   }\n }\n \n void\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0083-v3dv-default-vertex-attribute-values-are-gen-dependa.patch",
    "content": "From e3b1a578f45ea830d790970115b6de978d56edb8 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Wed, 28 Jul 2021 12:01:38 +0200\nSubject: [PATCH 083/142] v3dv: default vertex attribute values are gen\n dependant\n\nContent, structure and size would depend on the generation. Even if it\nis needed at all.\n\nSo let's move it to the v3dvx files.\n---\n src/broadcom/vulkan/v3dv_device.c    |  2 +-\n src/broadcom/vulkan/v3dv_pipeline.c  | 61 ++-------------------------\n src/broadcom/vulkan/v3dv_private.h   |  4 --\n src/broadcom/vulkan/v3dvx_pipeline.c | 63 ++++++++++++++++++++++++++++\n src/broadcom/vulkan/v3dvx_private.h  |  8 ++++\n 5 files changed, 75 insertions(+), 63 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c\nindex c8719d33f15..01e2dd7ac2d 100644\n--- a/src/broadcom/vulkan/v3dv_device.c\n+++ b/src/broadcom/vulkan/v3dv_device.c\n@@ -2043,7 +2043,7 @@ v3dv_CreateDevice(VkPhysicalDevice physicalDevice,\n    v3dv_pipeline_cache_init(&device->default_pipeline_cache, device, 0,\n                             device->instance->default_pipeline_cache_enabled);\n    device->default_attribute_float =\n-      v3dv_pipeline_create_default_attribute_values(device, NULL);\n+      v3dv_X(device, create_default_attribute_values)(device, NULL);\n \n    device->device_address_mem_ctx = ralloc_context(NULL);\n    util_dynarray_init(&device->device_address_bo_list,\ndiff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c\nindex 22f01bdf64b..d012ff8f948 100644\n--- a/src/broadcom/vulkan/v3dv_pipeline.c\n+++ b/src/broadcom/vulkan/v3dv_pipeline.c\n@@ -2802,62 +2802,6 @@ pipeline_set_ez_state(struct v3dv_pipeline *pipeline,\n    }\n }\n \n-static bool\n-pipeline_has_integer_vertex_attrib(struct v3dv_pipeline *pipeline)\n-{\n-   for (uint8_t i = 0; i < pipeline->va_count; i++) {\n-      if (vk_format_is_int(pipeline->va[i].vk_format))\n-         return true;\n-   }\n-   return false;\n-}\n-\n-/* @pipeline can be NULL. We assume in that case that all the attributes have\n- * a float format (we only create an all-float BO once and we reuse it with\n- * all float pipelines), otherwise we look at the actual type of each\n- * attribute used with the specific pipeline passed in.\n- */\n-struct v3dv_bo *\n-v3dv_pipeline_create_default_attribute_values(struct v3dv_device *device,\n-                                              struct v3dv_pipeline *pipeline)\n-{\n-   uint32_t size = MAX_VERTEX_ATTRIBS * sizeof(float) * 4;\n-   struct v3dv_bo *bo;\n-\n-   bo = v3dv_bo_alloc(device, size, \"default_vi_attributes\", true);\n-\n-   if (!bo) {\n-      fprintf(stderr, \"failed to allocate memory for the default \"\n-              \"attribute values\\n\");\n-      return NULL;\n-   }\n-\n-   bool ok = v3dv_bo_map(device, bo, size);\n-   if (!ok) {\n-      fprintf(stderr, \"failed to map default attribute values buffer\\n\");\n-      return false;\n-   }\n-\n-   uint32_t *attrs = bo->map;\n-   uint8_t va_count = pipeline != NULL ? pipeline->va_count : 0;\n-   for (int i = 0; i < MAX_VERTEX_ATTRIBS; i++) {\n-      attrs[i * 4 + 0] = 0;\n-      attrs[i * 4 + 1] = 0;\n-      attrs[i * 4 + 2] = 0;\n-      VkFormat attr_format =\n-         pipeline != NULL ? pipeline->va[i].vk_format : VK_FORMAT_UNDEFINED;\n-      if (i < va_count && vk_format_is_int(attr_format)) {\n-         attrs[i * 4 + 3] = 1;\n-      } else {\n-         attrs[i * 4 + 3] = fui(1.0);\n-      }\n-   }\n-\n-   v3dv_bo_unmap(device, bo);\n-\n-   return bo;\n-}\n-\n static void\n pipeline_set_sample_mask(struct v3dv_pipeline *pipeline,\n                          const VkPipelineMultisampleStateCreateInfo *ms_info)\n@@ -2992,9 +2936,10 @@ pipeline_init(struct v3dv_pipeline *pipeline,\n \n    v3dv_X(device, pipeline_pack_compile_state)(pipeline, vi_info, vd_info);\n \n-   if (pipeline_has_integer_vertex_attrib(pipeline)) {\n+   if (v3dv_X(device, pipeline_needs_default_attribute_values)(pipeline)) {\n       pipeline->default_attribute_values =\n-         v3dv_pipeline_create_default_attribute_values(pipeline->device, pipeline);\n+         v3dv_X(pipeline->device, create_default_attribute_values)(pipeline->device, pipeline);\n+\n       if (!pipeline->default_attribute_values)\n          return VK_ERROR_OUT_OF_DEVICE_MEMORY;\n    } else {\ndiff --git a/src/broadcom/vulkan/v3dv_private.h b/src/broadcom/vulkan/v3dv_private.h\nindex cd6811b19c2..a9fab24d19e 100644\n--- a/src/broadcom/vulkan/v3dv_private.h\n+++ b/src/broadcom/vulkan/v3dv_private.h\n@@ -2500,10 +2500,6 @@ void\n v3dv_pipeline_cache_upload_pipeline(struct v3dv_pipeline *pipeline,\n                                     struct v3dv_pipeline_cache *cache);\n \n-struct v3dv_bo *\n-v3dv_pipeline_create_default_attribute_values(struct v3dv_device *device,\n-                                              struct v3dv_pipeline *pipeline);\n-\n VkResult\n v3dv_create_compute_pipeline_from_nir(struct v3dv_device *device,\n                                       nir_shader *nir,\ndiff --git a/src/broadcom/vulkan/v3dvx_pipeline.c b/src/broadcom/vulkan/v3dvx_pipeline.c\nindex 922698b08a2..e235220cb14 100644\n--- a/src/broadcom/vulkan/v3dvx_pipeline.c\n+++ b/src/broadcom/vulkan/v3dvx_pipeline.c\n@@ -664,3 +664,66 @@ v3dX(pipeline_pack_compile_state)(struct v3dv_pipeline *pipeline,\n       }\n    }\n }\n+\n+static bool\n+pipeline_has_integer_vertex_attrib(struct v3dv_pipeline *pipeline)\n+{\n+   for (uint8_t i = 0; i < pipeline->va_count; i++) {\n+      if (vk_format_is_int(pipeline->va[i].vk_format))\n+         return true;\n+   }\n+   return false;\n+}\n+\n+bool\n+v3dX(pipeline_needs_default_attribute_values)(struct v3dv_pipeline *pipeline)\n+{\n+   return pipeline_has_integer_vertex_attrib(pipeline);\n+}\n+\n+/* @pipeline can be NULL. In that case we assume the most common case. For\n+ * example, for v42 we assume in that case that all the attributes have a\n+ * float format (we only create an all-float BO once and we reuse it with all\n+ * float pipelines), otherwise we look at the actual type of each attribute\n+ * used with the specific pipeline passed in.\n+ */\n+struct v3dv_bo *\n+v3dX(create_default_attribute_values)(struct v3dv_device *device,\n+                                      struct v3dv_pipeline *pipeline)\n+{\n+   uint32_t size = MAX_VERTEX_ATTRIBS * sizeof(float) * 4;\n+   struct v3dv_bo *bo;\n+\n+   bo = v3dv_bo_alloc(device, size, \"default_vi_attributes\", true);\n+\n+   if (!bo) {\n+      fprintf(stderr, \"failed to allocate memory for the default \"\n+              \"attribute values\\n\");\n+      return NULL;\n+   }\n+\n+   bool ok = v3dv_bo_map(device, bo, size);\n+   if (!ok) {\n+      fprintf(stderr, \"failed to map default attribute values buffer\\n\");\n+      return NULL;\n+   }\n+\n+   uint32_t *attrs = bo->map;\n+   uint8_t va_count = pipeline != NULL ? pipeline->va_count : 0;\n+   for (int i = 0; i < MAX_VERTEX_ATTRIBS; i++) {\n+      attrs[i * 4 + 0] = 0;\n+      attrs[i * 4 + 1] = 0;\n+      attrs[i * 4 + 2] = 0;\n+      VkFormat attr_format =\n+         pipeline != NULL ? pipeline->va[i].vk_format : VK_FORMAT_UNDEFINED;\n+      if (i < va_count && vk_format_is_int(attr_format)) {\n+         attrs[i * 4 + 3] = 1;\n+      } else {\n+         attrs[i * 4 + 3] = fui(1.0);\n+      }\n+   }\n+\n+   v3dv_bo_unmap(device, bo);\n+\n+   return bo;\n+}\ndiff --git a/src/broadcom/vulkan/v3dvx_private.h b/src/broadcom/vulkan/v3dvx_private.h\nindex ff9ba75cf93..036ce11b455 100644\n--- a/src/broadcom/vulkan/v3dvx_private.h\n+++ b/src/broadcom/vulkan/v3dvx_private.h\n@@ -306,6 +306,14 @@ void\n v3dX(pipeline_pack_compile_state)(struct v3dv_pipeline *pipeline,\n                                   const VkPipelineVertexInputStateCreateInfo *vi_info,\n                                   const VkPipelineVertexInputDivisorStateCreateInfoEXT *vd_info);\n+\n+bool\n+v3dX(pipeline_needs_default_attribute_values)(struct v3dv_pipeline *pipeline);\n+\n+struct v3dv_bo *\n+v3dX(create_default_attribute_values)(struct v3dv_device *device,\n+                                      struct v3dv_pipeline *pipeline);\n+\n /* Used at v3dv_queue */\n void\n v3dX(job_emit_noop)(struct v3dv_job *job);\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0084-v3dv-pipeline-default-vertex-attributes-values-are-n.patch",
    "content": "From 8464dc8869f3d2eccfecac7b4358cc0ffe05f081 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Wed, 28 Jul 2021 12:05:26 +0200\nSubject: [PATCH 084/142] v3dv/pipeline: default vertex attributes values are\n not needed for v71\n\nThere are not part of the shader state record.\n---\n src/broadcom/vulkan/v3dv_private.h   | 10 +++++++++-\n src/broadcom/vulkan/v3dvx_pipeline.c | 10 ++++++++++\n 2 files changed, 19 insertions(+), 1 deletion(-)\n\ndiff --git a/src/broadcom/vulkan/v3dv_private.h b/src/broadcom/vulkan/v3dv_private.h\nindex a9fab24d19e..300a1ec8ae1 100644\n--- a/src/broadcom/vulkan/v3dv_private.h\n+++ b/src/broadcom/vulkan/v3dv_private.h\n@@ -581,6 +581,10 @@ struct v3dv_device {\n     * being float being float, allowing us to reuse the same BO for all\n     * pipelines matching this requirement. Pipelines that need integer\n     * attributes will create their own BO.\n+    *\n+    * Note that since v71 the default attribute values are not needed, so this\n+    * can be NULL.\n+    *\n     */\n    struct v3dv_bo *default_attribute_float;\n \n@@ -2289,11 +2293,15 @@ struct v3dv_pipeline {\n    unsigned char sha1[20];\n \n    /* In general we can reuse v3dv_device->default_attribute_float, so note\n-    * that the following can be NULL.\n+    * that the following can be NULL. In 7.x this is not used, so it will be\n+    * NULL.\n     *\n     * FIXME: the content of this BO will be small, so it could be improved to\n     * be uploaded to a common BO. But as in most cases it will be NULL, it is\n     * not a priority.\n+    *\n+    * Note that since v71 the default attribute values are not needed, so this\n+    * can be NULL.\n     */\n    struct v3dv_bo *default_attribute_values;\n \ndiff --git a/src/broadcom/vulkan/v3dvx_pipeline.c b/src/broadcom/vulkan/v3dvx_pipeline.c\nindex e235220cb14..4dc6d70efe1 100644\n--- a/src/broadcom/vulkan/v3dvx_pipeline.c\n+++ b/src/broadcom/vulkan/v3dvx_pipeline.c\n@@ -665,6 +665,7 @@ v3dX(pipeline_pack_compile_state)(struct v3dv_pipeline *pipeline,\n    }\n }\n \n+#if V3D_VERSION == 42\n static bool\n pipeline_has_integer_vertex_attrib(struct v3dv_pipeline *pipeline)\n {\n@@ -674,11 +675,16 @@ pipeline_has_integer_vertex_attrib(struct v3dv_pipeline *pipeline)\n    }\n    return false;\n }\n+#endif\n \n bool\n v3dX(pipeline_needs_default_attribute_values)(struct v3dv_pipeline *pipeline)\n {\n+#if V3D_VERSION == 42\n    return pipeline_has_integer_vertex_attrib(pipeline);\n+#endif\n+\n+   return false;\n }\n \n /* @pipeline can be NULL. In that case we assume the most common case. For\n@@ -691,6 +697,10 @@ struct v3dv_bo *\n v3dX(create_default_attribute_values)(struct v3dv_device *device,\n                                       struct v3dv_pipeline *pipeline)\n {\n+#if V3D_VERSION >= 71\n+   return NULL;\n+#endif\n+\n    uint32_t size = MAX_VERTEX_ATTRIBS * sizeof(float) * 4;\n    struct v3dv_bo *bo;\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0085-v3dv-pipeline-handle-GL_SHADER_STATE_RECORD-changed-.patch",
    "content": "From 339096598660ec34be8087007dd4d66581de1c4e Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Wed, 28 Jul 2021 13:45:52 +0200\nSubject: [PATCH 085/142] v3dv/pipeline: handle GL_SHADER_STATE_RECORD changed\n size on v71\n\nIt is likely that we would need more changes, as this packet changed,\nbut this is enough to get basic tests running. Any additional support\nwill be handled with new commits.\n---\n src/broadcom/vulkan/v3dvx_pipeline.c | 5 +----\n 1 file changed, 1 insertion(+), 4 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_pipeline.c b/src/broadcom/vulkan/v3dvx_pipeline.c\nindex 4dc6d70efe1..a640c1d084a 100644\n--- a/src/broadcom/vulkan/v3dvx_pipeline.c\n+++ b/src/broadcom/vulkan/v3dvx_pipeline.c\n@@ -360,7 +360,7 @@ v3dX(pipeline_pack_state)(struct v3dv_pipeline *pipeline,\n static void\n pack_shader_state_record(struct v3dv_pipeline *pipeline)\n {\n-   assert(sizeof(pipeline->shader_state_record) ==\n+   assert(sizeof(pipeline->shader_state_record) >=\n           cl_packet_length(GL_SHADER_STATE_RECORD));\n \n    struct v3d_fs_prog_data *prog_data_fs =\n@@ -453,9 +453,6 @@ pack_shader_state_record(struct v3dv_pipeline *pipeline)\n       shader.vertex_shader_has_separate_input_and_output_vpm_blocks =\n          prog_data_vs->separate_segments;\n #endif\n-#if V3D_VERSION >= 71\n-      unreachable(\"HW generation 71 not supported yet.\");\n-#endif\n \n       shader.coordinate_shader_input_vpm_segment_size =\n          prog_data_vs_bin->separate_segments ?\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0086-v3dv-setup-render-pass-color-clears-for-any-format-b.patch",
    "content": "From 5b1342eb1e255d17619b1a7b33eaf7b31f5e50a5 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 22 Sep 2021 12:03:58 +0200\nSubject: [PATCH 086/142] v3dv: setup render pass color clears for any format\n bpp in v71\n\n---\n src/broadcom/vulkan/v3dvx_cmd_buffer.c | 33 ++++++++++++++++----------\n 1 file changed, 20 insertions(+), 13 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex fe9f7e43596..1b39e230580 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -1064,7 +1064,7 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n       UNUSED const uint32_t *clear_color =\n          &state->attachments[attachment_idx].clear_value.color[0];\n \n-      uint32_t clear_pad = 0;\n+      UNUSED uint32_t clear_pad = 0;\n       if (slice->tiling == V3D_TILING_UIF_NO_XOR ||\n           slice->tiling == V3D_TILING_UIF_XOR) {\n          int uif_block_height = v3d_utile_height(image->planes[plane].cpp) * 2;\n@@ -1084,10 +1084,8 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n          clear.clear_color_next_24_bits = clear_color[1] & 0xffffff;\n          clear.render_target_number = i;\n       };\n-#endif\n \n       if (iview->planes[0].internal_bpp >= V3D_INTERNAL_BPP_64) {\n-#if V3D_VERSION == 42\n          cl_emit(rcl, TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2, clear) {\n             clear.clear_color_mid_low_32_bits =\n                ((clear_color[1] >> 24) | (clear_color[2] << 8));\n@@ -1095,25 +1093,16 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n                ((clear_color[2] >> 24) | ((clear_color[3] & 0xffff) << 8));\n             clear.render_target_number = i;\n          };\n-#endif\n-#if V3D_VERSION >= 71\n-         unreachable(\"HW generation 71 not supported yet.\");\n-#endif\n-\n       }\n \n       if (iview->planes[0].internal_bpp >= V3D_INTERNAL_BPP_128 || clear_pad) {\n-#if V3D_VERSION == 42\n          cl_emit(rcl, TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3, clear) {\n             clear.uif_padded_height_in_uif_blocks = clear_pad;\n             clear.clear_color_high_16_bits = clear_color[3] >> 16;\n             clear.render_target_number = i;\n          };\n-#endif\n-#if V3D_VERSION >= 71\n-         unreachable(\"HW generation 71 not supported yet.\");\n-#endif\n       }\n+#endif\n \n #if V3D_VERSION >= 71\n       cl_emit(rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART1, rt) {\n@@ -1133,6 +1122,24 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n           */\n          base_addr += (tiling->tile_height * rt.stride) / 8;\n       }\n+\n+      if (iview->planes[0].internal_bpp >= V3D_INTERNAL_BPP_64) {\n+         cl_emit(rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART2, rt) {\n+            rt.clear_color_mid_bits = /* 40 bits (32 + 8)  */\n+               ((uint64_t) clear_color[1]) |\n+               (((uint64_t) (clear_color[2] & 0xff)) << 32);\n+            rt.render_target_number = i;\n+         }\n+      }\n+\n+      if (iview->planes[0].internal_bpp >= V3D_INTERNAL_BPP_128) {\n+         cl_emit(rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART3, rt) {\n+            rt.clear_color_top_bits = /* 56 bits (24 + 32) */\n+               (((uint64_t) (clear_color[2] & 0xffffff00)) >> 8) |\n+               (((uint64_t) (clear_color[3])) << 24);\n+            rt.render_target_number = i;\n+         }\n+      }\n #endif\n    }\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0087-v3dv-setup-TLB-clear-color-for-meta-operations-in-v7.patch",
    "content": "From ff5b5d4405b1d5600d7f1c4355202fd303f56700 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 22 Sep 2021 12:04:21 +0200\nSubject: [PATCH 087/142] v3dv: setup TLB clear color for meta operations in\n v71\n\n---\n src/broadcom/vulkan/v3dvx_meta_common.c | 46 +++++++++++++++----------\n 1 file changed, 27 insertions(+), 19 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_meta_common.c b/src/broadcom/vulkan/v3dvx_meta_common.c\nindex c6391bc6d83..09ebcfa97c1 100644\n--- a/src/broadcom/vulkan/v3dvx_meta_common.c\n+++ b/src/broadcom/vulkan/v3dvx_meta_common.c\n@@ -75,8 +75,9 @@ emit_rcl_prologue(struct v3dv_job *job,\n       config.internal_depth_type = fb->internal_depth_type;\n    }\n \n+   const uint32_t *color = NULL;\n    if (clear_info && (clear_info->aspects & VK_IMAGE_ASPECT_COLOR_BIT)) {\n-      uint32_t clear_pad = 0;\n+      UNUSED uint32_t clear_pad = 0;\n       if (clear_info->image) {\n          const struct v3dv_image *image = clear_info->image;\n \n@@ -101,20 +102,16 @@ emit_rcl_prologue(struct v3dv_job *job,\n          }\n       }\n \n+      color = &clear_info->clear_value->color[0];\n+\n #if V3D_VERSION == 42\n-      const uint32_t *color = &clear_info->clear_value->color[0];\n       cl_emit(rcl, TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1, clear) {\n          clear.clear_color_low_32_bits = color[0];\n          clear.clear_color_next_24_bits = color[1] & 0x00ffffff;\n          clear.render_target_number = 0;\n       };\n-#endif\n-#if V3D_VERSION >= 71\n-   unreachable(\"Hardware generation 71 not supported yet.\");\n-#endif\n \n       if (tiling->internal_bpp >= V3D_INTERNAL_BPP_64) {\n-#if V3D_VERSION == 42\n          cl_emit(rcl, TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART2, clear) {\n             clear.clear_color_mid_low_32_bits =\n               ((color[1] >> 24) | (color[2] << 8));\n@@ -122,25 +119,16 @@ emit_rcl_prologue(struct v3dv_job *job,\n               ((color[2] >> 24) | ((color[3] & 0xffff) << 8));\n             clear.render_target_number = 0;\n          };\n-#endif\n-#if V3D_VERSION >= 71\n-   unreachable(\"Hardware generation 71 not supported yet.\");\n-#endif\n-\n       }\n \n       if (tiling->internal_bpp >= V3D_INTERNAL_BPP_128 || clear_pad) {\n-#if V3D_VERSION == 42\n          cl_emit(rcl, TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART3, clear) {\n             clear.uif_padded_height_in_uif_blocks = clear_pad;\n             clear.clear_color_high_16_bits = color[3] >> 16;\n             clear.render_target_number = 0;\n          };\n-#endif\n-#if V3D_VERSION >= 71\n-   unreachable(\"Hardware generation 71 not supported yet.\");\n-#endif\n       }\n+#endif\n    }\n \n #if V3D_VERSION == 42\n@@ -150,8 +138,11 @@ emit_rcl_prologue(struct v3dv_job *job,\n       rt.render_target_0_clamp = V3D_RENDER_TARGET_CLAMP_NONE;\n    }\n #endif\n+\n #if V3D_VERSION >= 71\n    cl_emit(rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART1, rt) {\n+      if (color)\n+         rt.clear_color_low_bits = color[0];\n       rt.internal_bpp = tiling->internal_bpp;\n       rt.internal_type_and_clamping = v3dX(clamp_for_format_and_type)(fb->internal_type,\n                                                                       fb->vk_format);\n@@ -161,6 +152,24 @@ emit_rcl_prologue(struct v3dv_job *job,\n       rt.base_address = 0;\n       rt.render_target_number = 0;\n    }\n+\n+   if (color && tiling->internal_bpp >= V3D_INTERNAL_BPP_64) {\n+      cl_emit(rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART2, rt) {\n+         rt.clear_color_mid_bits = /* 40 bits (32 + 8)  */\n+            ((uint64_t) color[1]) |\n+            (((uint64_t) (color[2] & 0xff)) << 32);\n+         rt.render_target_number = 0;\n+      }\n+   }\n+\n+   if (color && tiling->internal_bpp >= V3D_INTERNAL_BPP_128) {\n+      cl_emit(rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART3, rt) {\n+         rt.clear_color_top_bits = /* 56 bits (24 + 32) */\n+            (((uint64_t) (color[2] & 0xffffff00)) >> 8) |\n+            (((uint64_t) (color[3])) << 24);\n+         rt.render_target_number = 0;\n+      }\n+   }\n #endif\n \n    cl_emit(rcl, TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES, clear) {\n@@ -229,9 +238,8 @@ emit_frame_setup(struct v3dv_job *job,\n          }\n #endif\n #if V3D_VERSION >= 71\n-      unreachable(\"Hardware generation 71 not supported yet.\");\n+         cl_emit(rcl, CLEAR_RENDER_TARGETS, clear);\n #endif\n-\n       }\n       cl_emit(rcl, END_OF_TILE_MARKER, end);\n    }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0088-v3dv-fix-up-texture-shader-state-for-v71.patch",
    "content": "From 1e9d7d69849fa646b331f7661c74ee138badc4bb Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Mon, 25 Oct 2021 01:37:12 +0200\nSubject: [PATCH 088/142] v3dv: fix up texture shader state for v71\n\nThere are some new fields for YCbCr with pointers for the various\nplanes in multi-planar formats. These need to match the base address\npointer in the texture state, or the hardware will assume this is a\nmulti-planar texture.\n---\n src/broadcom/vulkan/v3dvx_image.c | 16 ++++++++++++++++\n 1 file changed, 16 insertions(+)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_image.c b/src/broadcom/vulkan/v3dvx_image.c\nindex dac6ff2741f..848290c2a47 100644\n--- a/src/broadcom/vulkan/v3dvx_image.c\n+++ b/src/broadcom/vulkan/v3dvx_image.c\n@@ -129,6 +129,14 @@ pack_texture_shader_state_helper(struct v3dv_device *device,\n             v3dv_layer_offset(image, 0, image_view->vk.base_array_layer,\n                               iplane);\n          tex.texture_base_pointer = v3dv_cl_address(NULL, base_offset);\n+\n+#if V3D_VERSION >= 71\n+         tex.chroma_offset_x = 1;\n+         tex.chroma_offset_y = 1;\n+         /* See comment in XML field definition for rationale of the shifts */\n+         tex.texture_base_pointer_cb = base_offset >> 6;\n+         tex.texture_base_pointer_cr = base_offset >> 6;\n+#endif\n       }\n    }\n }\n@@ -191,5 +199,13 @@ v3dX(pack_texture_shader_state_from_buffer_view)(struct v3dv_device *device,\n          buffer_view->offset;\n \n       tex.texture_base_pointer = v3dv_cl_address(NULL, base_offset);\n+\n+#if V3D_VERSION >= 71\n+      tex.chroma_offset_x = 1;\n+      tex.chroma_offset_y = 1;\n+      /* See comment in XML field definition for rationale of the shifts */\n+      tex.texture_base_pointer_cb = base_offset >> 6;\n+      tex.texture_base_pointer_cr = base_offset >> 6;\n+#endif\n    }\n }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0089-v3dv-handle-new-texture-state-transfer-functions-in-.patch",
    "content": "From 1f150a3a92741f7654a13626bd5b27b5575f2b76 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Mon, 25 Oct 2021 01:38:31 +0200\nSubject: [PATCH 089/142] v3dv: handle new texture state transfer functions in\n v71\n\n---\n src/broadcom/vulkan/v3dvx_image.c | 11 +++++++----\n 1 file changed, 7 insertions(+), 4 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_image.c b/src/broadcom/vulkan/v3dvx_image.c\nindex 848290c2a47..437d4588c7e 100644\n--- a/src/broadcom/vulkan/v3dvx_image.c\n+++ b/src/broadcom/vulkan/v3dvx_image.c\n@@ -108,15 +108,16 @@ pack_texture_shader_state_helper(struct v3dv_device *device,\n \n          tex.array_stride_64_byte_aligned = image->planes[iplane].cube_map_stride / 64;\n \n+         bool is_srgb = vk_format_is_srgb(image_view->vk.format);\n #if V3D_VERSION == 42\n          tex.reverse_standard_border_color = image_view->planes[plane].channel_reverse;\n #endif\n \n #if V3D_VERSION == 42\n-         tex.srgb = vk_format_is_srgb(image_view->vk.view_format);\n+         tex.srgb = is_srgb;\n #endif\n #if V3D_VERSION >= 71\n-      unreachable(\"Hardware generation 71 not supported yet.\");\n+         tex.transfer_func = is_srgb ? TRANSFER_FUNC_SRGB : TRANSFER_FUNC_NONE;\n #endif\n \n          /* At this point we don't have the job. That's the reason the first\n@@ -181,11 +182,13 @@ v3dX(pack_texture_shader_state_from_buffer_view)(struct v3dv_device *device,\n \n       assert(buffer_view->format->plane_count == 1);\n       tex.texture_type = buffer_view->format->planes[0].tex_type;\n+\n+      bool is_srgb = vk_format_is_srgb(buffer_view->vk_format);\n #if V3D_VERSION == 42\n-      tex.srgb = vk_format_is_srgb(buffer_view->vk_format);\n+      tex.srgb = is_srgb;\n #endif\n #if V3D_VERSION >= 71\n-      unreachable(\"Hardware generation 71 not supported yet.\");\n+      tex.transfer_func = is_srgb ? TRANSFER_FUNC_SRGB : TRANSFER_FUNC_NONE;\n #endif\n \n       /* At this point we don't have the job. That's the reason the first\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0090-v3dv-implement-noop-job-for-v71.patch",
    "content": "From 45de9f019ee92635de9a505db58439f0f4561281 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 28 Sep 2021 08:14:11 +0200\nSubject: [PATCH 090/142] v3dv: implement noop job for v71\n\n---\n src/broadcom/vulkan/v3dvx_queue.c | 10 +++++++---\n 1 file changed, 7 insertions(+), 3 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_queue.c b/src/broadcom/vulkan/v3dvx_queue.c\nindex 1a26d04aef7..f8cee36e3bf 100644\n--- a/src/broadcom/vulkan/v3dvx_queue.c\n+++ b/src/broadcom/vulkan/v3dvx_queue.c\n@@ -46,7 +46,8 @@ v3dX(job_emit_noop)(struct v3dv_job *job)\n       config.maximum_bpp_of_all_render_targets = V3D_INTERNAL_BPP_32;\n #endif\n #if V3D_VERSION >= 71\n-      unreachable(\"HW generation 71 not supported yet.\");\n+      config.log2_tile_width = 3; /* Tile size 64 */\n+      config.log2_tile_height = 3; /* Tile size 64 */\n #endif\n    }\n \n@@ -58,10 +59,13 @@ v3dX(job_emit_noop)(struct v3dv_job *job)\n    }\n #endif\n #if V3D_VERSION >= 71\n-   unreachable(\"Hardware generation 71 not supported yet.\");\n+   cl_emit(rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART1, rt) {\n+      rt.internal_bpp = V3D_INTERNAL_BPP_32;\n+      rt.internal_type_and_clamping = V3D_RENDER_TARGET_TYPE_CLAMP_8;\n+      rt.stride = 1; /* Unused RT */\n+   }\n #endif\n \n-\n    cl_emit(rcl, TILE_RENDERING_MODE_CFG_ZS_CLEAR_VALUES, clear) {\n       clear.z_clear_value = 1.0f;\n       clear.stencil_clear_value = 0;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0091-v3dv-handle-render-pass-global-clear-for-v71.patch",
    "content": "From 3e607bb28056bb52242be6878281efae84026813 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 28 Sep 2021 08:23:48 +0200\nSubject: [PATCH 091/142] v3dv: handle render pass global clear for v71\n\n---\n src/broadcom/vulkan/v3dvx_cmd_buffer.c | 66 ++++++++++++++++----------\n 1 file changed, 41 insertions(+), 25 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex 1b39e230580..48b2e319e51 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -362,6 +362,11 @@ cmd_buffer_render_pass_emit_store(struct v3dv_cmd_buffer *cmd_buffer,\n                                              iview->vk.base_array_layer + layer,\n                                              image_plane);\n \n+   /* The Clear Buffer bit is not supported for Z/Stencil stores in 7.x and it\n+    * is broken in earlier V3D versions.\n+    */\n+   assert((buffer != Z && buffer != STENCIL && buffer != ZSTENCIL) || !clear);\n+\n    cl_emit(cl, STORE_TILE_BUFFER_GENERAL, store) {\n       store.buffer_to_store = buffer;\n       store.address = v3dv_cl_address(image->planes[image_plane].mem->bo, layer_offset);\n@@ -484,6 +489,30 @@ cmd_buffer_render_pass_emit_stores(struct v3dv_cmd_buffer *cmd_buffer,\n       const VkImageAspectFlags aspects =\n          vk_format_aspects(ds_attachment->desc.format);\n \n+#if V3D_VERSION <= 42\n+      /* GFXH-1689: The per-buffer store command's clear buffer bit is broken\n+       * for depth/stencil.\n+       *\n+       * There used to be some confusion regarding the Clear Tile Buffers\n+       * Z/S bit also being broken, but we confirmed with Broadcom that this\n+       * is not the case, it was just that some other hardware bugs (that we\n+       * need to work around, such as GFXH-1461) could cause this bit to behave\n+       * incorrectly.\n+       *\n+       * There used to be another issue where the RTs bit in the Clear Tile\n+       * Buffers packet also cleared Z/S, but Broadcom confirmed this is\n+       * fixed since V3D 4.1.\n+       *\n+       * So if we have to emit a clear of depth or stencil we don't use\n+       * the per-buffer store clear bit, even if we need to store the buffers,\n+       * instead we always have to use the Clear Tile Buffers Z/S bit.\n+       * If we have configured the job to do early Z/S clearing, then we\n+       * don't want to emit any Clear Tile Buffers command at all here.\n+       *\n+       * Note that GFXH-1689 is not reproduced in the simulator, where\n+       * using the clear buffer bit in depth/stencil stores works fine.\n+       */\n+\n       /* Only clear once on the first subpass that uses the attachment */\n       uint32_t ds_first_subpass = !state->pass->multiview_enabled ?\n          ds_attachment->first_subpass :\n@@ -503,6 +532,17 @@ cmd_buffer_render_pass_emit_stores(struct v3dv_cmd_buffer *cmd_buffer,\n                            ds_attachment->desc.stencilLoadOp,\n                            subpass->do_stencil_clear_with_draw);\n \n+      use_global_zs_clear = !state->job->early_zs_clear &&\n+         (needs_depth_clear || needs_stencil_clear);\n+#endif\n+#if V3D_VERSION >= 71\n+      /* The store command's clear buffer bit cannot be used for Z/S stencil:\n+       * since V3D 4.5.6 Z/S buffers are automatically cleared between tiles,\n+       * so we don't want to emit redundant clears here.\n+       */\n+      use_global_zs_clear = false;\n+#endif\n+\n       /* Skip the last store if it is not required */\n       uint32_t ds_last_subpass = !pass->multiview_enabled ?\n          ds_attachment->last_subpass :\n@@ -545,30 +585,6 @@ cmd_buffer_render_pass_emit_stores(struct v3dv_cmd_buffer *cmd_buffer,\n          needs_stencil_store = subpass->resolve_stencil;\n       }\n \n-      /* GFXH-1689: The per-buffer store command's clear buffer bit is broken\n-       * for depth/stencil.\n-       *\n-       * There used to be some confusion regarding the Clear Tile Buffers\n-       * Z/S bit also being broken, but we confirmed with Broadcom that this\n-       * is not the case, it was just that some other hardware bugs (that we\n-       * need to work around, such as GFXH-1461) could cause this bit to behave\n-       * incorrectly.\n-       *\n-       * There used to be another issue where the RTs bit in the Clear Tile\n-       * Buffers packet also cleared Z/S, but Broadcom confirmed this is\n-       * fixed since V3D 4.1.\n-       *\n-       * So if we have to emit a clear of depth or stencil we don't use\n-       * the per-buffer store clear bit, even if we need to store the buffers,\n-       * instead we always have to use the Clear Tile Buffers Z/S bit.\n-       * If we have configured the job to do early Z/S clearing, then we\n-       * don't want to emit any Clear Tile Buffers command at all here.\n-       *\n-       * Note that GFXH-1689 is not reproduced in the simulator, where\n-       * using the clear buffer bit in depth/stencil stores works fine.\n-       */\n-      use_global_zs_clear = !state->job->early_zs_clear &&\n-         (needs_depth_clear || needs_stencil_clear);\n       if (needs_depth_store || needs_stencil_store) {\n          const uint32_t zs_buffer =\n             v3dv_zs_buffer(needs_depth_store, needs_stencil_store);\n@@ -673,7 +689,7 @@ cmd_buffer_render_pass_emit_stores(struct v3dv_cmd_buffer *cmd_buffer,\n       }\n #endif\n #if V3D_VERSION >= 71\n-      unreachable(\"Hardware generation 71 not supported yet.\");\n+      cl_emit(cl, CLEAR_RENDER_TARGETS, clear);\n #endif\n    }\n }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0092-v3dv-GFX-1461-does-not-affect-V3D-7.x.patch",
    "content": "From 3794f6f08c559c4e442b57e992d501fb7d515b9b Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 28 Sep 2021 08:31:04 +0200\nSubject: [PATCH 092/142] v3dv: GFX-1461 does not affect V3D 7.x\n\n---\n src/broadcom/vulkan/v3dv_pass.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dv_pass.c b/src/broadcom/vulkan/v3dv_pass.c\nindex 20f5014268d..3e82c15df88 100644\n--- a/src/broadcom/vulkan/v3dv_pass.c\n+++ b/src/broadcom/vulkan/v3dv_pass.c\n@@ -236,11 +236,13 @@ v3dv_CreateRenderPass2(VkDevice _device,\n \n          /* GFXH-1461: if depth is cleared but stencil is loaded (or vice versa),\n           * the clear might get lost. If a subpass has this then we can't emit\n-          * the clear using the TLB and we have to do it as a draw call.\n+          * the clear using the TLB and we have to do it as a draw call. This\n+          * issue is fixed since V3D 4.3.18.\n           *\n           * FIXME: separate stencil.\n           */\n-         if (subpass->ds_attachment.attachment != VK_ATTACHMENT_UNUSED) {\n+         if (device->devinfo.ver == 42 &&\n+             subpass->ds_attachment.attachment != VK_ATTACHMENT_UNUSED) {\n             struct v3dv_render_pass_attachment *att =\n                &pass->attachments[subpass->ds_attachment.attachment];\n             if (att->desc.format == VK_FORMAT_D24_UNORM_S8_UINT) {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0093-v3dv-update-thread-end-restrictions-validation-for-v.patch",
    "content": "From 5be7f484210103e40b77fa3135042da4a8406659 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 28 Sep 2021 08:59:08 +0200\nSubject: [PATCH 093/142] v3dv: update thread end restrictions validation for\n v71\n\n---\n src/broadcom/compiler/qpu_validate.c | 37 +++++++++++++++++++++++++---\n 1 file changed, 34 insertions(+), 3 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_validate.c b/src/broadcom/compiler/qpu_validate.c\nindex 1082fb7d50a..0466ee5d0b6 100644\n--- a/src/broadcom/compiler/qpu_validate.c\n+++ b/src/broadcom/compiler/qpu_validate.c\n@@ -316,17 +316,48 @@ qpu_validate_inst(struct v3d_qpu_validate_state *state, struct qinst *qinst)\n             inst->type == V3D_QPU_INSTR_TYPE_ALU) {\n                 if ((inst->alu.add.op != V3D_QPU_A_NOP &&\n                      !inst->alu.add.magic_write)) {\n-                        fail_instr(state, \"RF write after THREND\");\n+                        if (devinfo->ver <= 42) {\n+                                fail_instr(state, \"RF write after THREND\");\n+                        } else if (devinfo->ver >= 71) {\n+                                if (state->last_thrsw_ip - state->ip == 0) {\n+                                        fail_instr(state,\n+                                                   \"ADD RF write at THREND\");\n+                                }\n+                                if (inst->alu.add.waddr == 2 ||\n+                                    inst->alu.add.waddr == 3) {\n+                                        fail_instr(state,\n+                                                   \"RF2-3 write after THREND\");\n+                                }\n+                        }\n                 }\n \n                 if ((inst->alu.mul.op != V3D_QPU_M_NOP &&\n                      !inst->alu.mul.magic_write)) {\n-                        fail_instr(state, \"RF write after THREND\");\n+                        if (devinfo->ver <= 42) {\n+                                fail_instr(state, \"RF write after THREND\");\n+                        } else if (devinfo->ver >= 71) {\n+                                if (state->last_thrsw_ip - state->ip == 0) {\n+                                        fail_instr(state,\n+                                                   \"MUL RF write at THREND\");\n+                                }\n+\n+                                if (inst->alu.mul.waddr == 2 ||\n+                                    inst->alu.mul.waddr == 3) {\n+                                        fail_instr(state,\n+                                                   \"RF2-3 write after THREND\");\n+                                }\n+                        }\n                 }\n \n                 if (v3d_qpu_sig_writes_address(devinfo, &inst->sig) &&\n                     !inst->sig_magic) {\n-                        fail_instr(state, \"RF write after THREND\");\n+                        if (devinfo->ver <= 42) {\n+                                fail_instr(state, \"RF write after THREND\");\n+                        } else if (devinfo->ver >= 71 &&\n+                                   (inst->sig_addr == 2 ||\n+                                    inst->sig_addr == 3)) {\n+                                fail_instr(state, \"RF2-3 write after THREND\");\n+                        }\n                 }\n \n                 /* GFXH-1625: No TMUWT in the last instruction */\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0094-v3dv-handle-early-Z-S-clears-for-v71.patch",
    "content": "From a751dff57b6d769f5b031054cc65415cc3b44c08 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 29 Sep 2021 08:22:59 +0200\nSubject: [PATCH 094/142] v3dv: handle early Z/S clears for v71\n\n---\n src/broadcom/vulkan/v3dvx_cmd_buffer.c | 30 ++++++++++++++++++++------\n 1 file changed, 23 insertions(+), 7 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex 48b2e319e51..4580e2a4650 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -998,6 +998,10 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n           * Early-Z/S clearing is independent of Early Z/S testing, so it is\n           * possible to enable one but not the other so long as their\n           * respective requirements are met.\n+          *\n+          * From V3D 4.5.6, Z/S buffers are always cleared automatically\n+          * between tiles, but we still want to enable early ZS clears\n+          * when Z/S are not loaded or stored.\n           */\n          struct v3dv_render_pass_attachment *ds_attachment =\n             &pass->attachments[ds_attachment_idx];\n@@ -1005,21 +1009,33 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n          const VkImageAspectFlags ds_aspects =\n             vk_format_aspects(ds_attachment->desc.format);\n \n-         bool needs_depth_clear =\n-            check_needs_clear(state,\n-                              ds_aspects & VK_IMAGE_ASPECT_DEPTH_BIT,\n-                              ds_attachment->first_subpass,\n-                              ds_attachment->desc.loadOp,\n-                              subpass->do_depth_clear_with_draw);\n-\n          bool needs_depth_store =\n             v3dv_cmd_buffer_check_needs_store(state,\n                                               ds_aspects & VK_IMAGE_ASPECT_DEPTH_BIT,\n                                               ds_attachment->last_subpass,\n                                               ds_attachment->desc.storeOp) ||\n                                               subpass->resolve_depth;\n+#if V3D_VERSION <= 42\n+         bool needs_depth_clear =\n+            check_needs_clear(state,\n+                              ds_aspects & VK_IMAGE_ASPECT_DEPTH_BIT,\n+                              ds_attachment->first_subpass,\n+                              ds_attachment->desc.loadOp,\n+                              subpass->do_depth_clear_with_draw);\n \n          do_early_zs_clear = needs_depth_clear && !needs_depth_store;\n+#endif\n+#if V3D_VERSION >= 71\n+         bool needs_depth_load =\n+            v3dv_cmd_buffer_check_needs_load(state,\n+                                             ds_aspects & VK_IMAGE_ASPECT_DEPTH_BIT,\n+                                             ds_attachment->first_subpass,\n+                                             ds_attachment->desc.loadOp,\n+                                             ds_attachment->last_subpass,\n+                                             ds_attachment->desc.storeOp);\n+         do_early_zs_clear = !needs_depth_load && !needs_depth_store;\n+#endif\n+\n          if (do_early_zs_clear &&\n              vk_format_has_stencil(ds_attachment->desc.format)) {\n             bool needs_stencil_load =\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0095-v3dv-handle-RTs-with-no-color-targets-in-v71.patch",
    "content": "From 2add46ebce4760bf8349606201324ee0e6b1f9da Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 29 Sep 2021 09:07:28 +0200\nSubject: [PATCH 095/142] v3dv: handle RTs with no color targets in v71\n\n---\n src/broadcom/vulkan/v3dvx_cmd_buffer.c | 11 +++++++++++\n 1 file changed, 11 insertions(+)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex 4580e2a4650..750486a6ccf 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -1175,6 +1175,17 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n #endif\n    }\n \n+#if V3D_VERSION >= 71\n+   /* If we don't have any color RTs, we still need to emit one and flag\n+    * it as not used using stride = 1.\n+    */\n+   if (subpass->color_count == 0) {\n+      cl_emit(rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART1, rt) {\n+         rt.stride = 1;\n+      }\n+   }\n+#endif\n+\n #if V3D_VERSION == 42\n    cl_emit(rcl, TILE_RENDERING_MODE_CFG_COLOR, rt) {\n       cmd_buffer_render_pass_setup_render_target\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0096-v3dv-no-specific-separate_segments-flag-for-V3D-7.1.patch",
    "content": "From 019abbd34d2d904d6bb33f9fa4433cb53ca7899c Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Fri, 1 Oct 2021 15:18:38 +0200\nSubject: [PATCH 096/142] v3dv: no specific separate_segments flag for V3D 7.1\n\nOn V3D 7.1 there is not a flag on the Shader State Record to specify\nif we are using shared or separate segments. This is done by setting\nthe vpm input size to 0 (so we need to ensure that the output would be\nthe max needed for input/output).\n\nWe were already doing the latter on the prog_data_vs, so we just need\nto use those values, instead of assigning default values.\n\nAs we are here, we also add some comments on the compiler part.\n---\n src/broadcom/compiler/qpu_schedule.c |  4 ++++\n src/broadcom/compiler/vir.c          |  4 ++++\n src/broadcom/vulkan/v3dvx_pipeline.c | 15 +++++++++++++--\n 3 files changed, 21 insertions(+), 2 deletions(-)\n\ndiff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c\nindex 77fb6a794e6..4f767296860 100644\n--- a/src/broadcom/compiler/qpu_schedule.c\n+++ b/src/broadcom/compiler/qpu_schedule.c\n@@ -297,6 +297,10 @@ calculate_deps(struct schedule_state *state, struct schedule_node *n)\n         /* If the input and output segments are shared, then all VPM reads to\n          * a location need to happen before all writes.  We handle this by\n          * serializing all VPM operations for now.\n+         *\n+         * FIXME: we are assuming that the segments are shared. That is\n+         * correct right now as we are only using shared, but technically you\n+         * can choose.\n          */\n         bool separate_vpm_segment = false;\n \ndiff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c\nindex 7612eed7130..dd0aa761c43 100644\n--- a/src/broadcom/compiler/vir.c\n+++ b/src/broadcom/compiler/vir.c\n@@ -745,6 +745,10 @@ v3d_vs_set_prog_data(struct v3d_compile *c,\n \n         /* Set us up for shared input/output segments.  This is apparently\n          * necessary for our VCM setup to avoid varying corruption.\n+         *\n+         * FIXME: initially testing on V3D 7.1 seems to work fine when using\n+         * separate segments. So we could try to reevaluate in the future, if\n+         * there is any advantage of using separate segments.\n          */\n         prog_data->separate_segments = false;\n         prog_data->vpm_output_size = MAX2(prog_data->vpm_output_size,\ndiff --git a/src/broadcom/vulkan/v3dvx_pipeline.c b/src/broadcom/vulkan/v3dvx_pipeline.c\nindex a640c1d084a..a72ca3c241b 100644\n--- a/src/broadcom/vulkan/v3dvx_pipeline.c\n+++ b/src/broadcom/vulkan/v3dvx_pipeline.c\n@@ -452,14 +452,25 @@ pack_shader_state_record(struct v3dv_pipeline *pipeline)\n          prog_data_vs_bin->separate_segments;\n       shader.vertex_shader_has_separate_input_and_output_vpm_blocks =\n          prog_data_vs->separate_segments;\n-#endif\n-\n       shader.coordinate_shader_input_vpm_segment_size =\n          prog_data_vs_bin->separate_segments ?\n          prog_data_vs_bin->vpm_input_size : 1;\n       shader.vertex_shader_input_vpm_segment_size =\n          prog_data_vs->separate_segments ?\n          prog_data_vs->vpm_input_size : 1;\n+#endif\n+\n+      /* On V3D 7.1 there isn't a specific flag to set if we are using\n+       * shared/separate segments or not. We just set the value of\n+       * vpm_input_size to 0, and set output to the max needed. That should be\n+       * already properly set on prog_data_vs_bin\n+       */\n+#if V3D_VERSION == 71\n+      shader.coordinate_shader_input_vpm_segment_size =\n+         prog_data_vs_bin->vpm_input_size;\n+      shader.vertex_shader_input_vpm_segment_size =\n+         prog_data_vs->vpm_input_size;\n+#endif\n \n       shader.coordinate_shader_output_vpm_segment_size =\n          prog_data_vs_bin->vpm_output_size;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0097-v3dv-don-t-convert-floating-point-border-colors-in-v.patch",
    "content": "From 4f6b4f91577ec04aab907d59d836d0c17731a9d0 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Thu, 7 Oct 2021 12:43:49 +0200\nSubject: [PATCH 097/142] v3dv: don't convert floating point border colors in\n v71\n\nThe TMU does this for us now.\n---\n src/broadcom/vulkan/v3dvx_device.c | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_device.c b/src/broadcom/vulkan/v3dvx_device.c\nindex e235983864c..72daefadb08 100644\n--- a/src/broadcom/vulkan/v3dvx_device.c\n+++ b/src/broadcom/vulkan/v3dvx_device.c\n@@ -118,7 +118,11 @@ static union pipe_color_union encode_border_color(\n                              (1 << (desc->channel[i].size - 1)) - 1);\n    }\n \n-   /* convert from float to expected format */\n+#if V3D_VERSION <= 42\n+   /* The TMU in V3D 7.x always takes 32-bit floats and handles conversions\n+    * for us. In V3D 4.x we need to manually convert floating point color\n+    * values to the expected format.\n+    */\n    if (vk_format_is_srgb(bc_info->format) ||\n        vk_format_is_compressed(bc_info->format)) {\n       for (int i = 0; i < 4; i++)\n@@ -170,6 +174,7 @@ static union pipe_color_union encode_border_color(\n          }\n       }\n    }\n+#endif\n \n    return border;\n }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0098-v3dv-handle-Z-clipping-in-v71.patch",
    "content": "From d8083cb8f104e0f035f5b812e000a500fa52d66f Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Fri, 15 Oct 2021 13:06:31 +0200\nSubject: [PATCH 098/142] v3dv: handle Z clipping in v71\n\nFixes the following tests:\n\ndEQP-VK.clipping.clip_volume.*\ndEQP-VK.draw.inverted_depth_ranges.nodepthclamp_* (except deltazero)\n---\n src/broadcom/vulkan/v3dvx_pipeline.c | 33 ++++++++++++++++++++++++++++\n 1 file changed, 33 insertions(+)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_pipeline.c b/src/broadcom/vulkan/v3dvx_pipeline.c\nindex a72ca3c241b..7b1133f8173 100644\n--- a/src/broadcom/vulkan/v3dvx_pipeline.c\n+++ b/src/broadcom/vulkan/v3dvx_pipeline.c\n@@ -227,6 +227,39 @@ pack_cfg_bits(struct v3dv_pipeline *pipeline,\n          ds_info ? ds_info->stencilTestEnable && has_ds_attachment: false;\n \n       pipeline->z_updates_enable = config.z_updates_enable;\n+\n+#if V3D_VERSION >= 71\n+      /* From the Vulkan spec:\n+       *\n+       *    \"depthClampEnable controls whether to clamp the fragment’s depth\n+       *     values as described in Depth Test. If the pipeline is not created\n+       *     with VkPipelineRasterizationDepthClipStateCreateInfoEXT present\n+       *     then enabling depth clamp will also disable clipping primitives to\n+       *     the z planes of the frustrum as described in Primitive Clipping.\n+       *     Otherwise depth clipping is controlled by the state set in\n+       *     VkPipelineRasterizationDepthClipStateCreateInfoEXT.\"\n+       *\n+       * Note: neither depth clamping nor VK_EXT_depth_clip_enable are actually\n+       * supported in the driver yet, so in practice we are always enabling Z\n+       * clipping for now.\n+       */\n+      bool z_clip_enable = false;\n+      const VkPipelineRasterizationDepthClipStateCreateInfoEXT *clip_info =\n+         ds_info ? vk_find_struct_const(ds_info->pNext,\n+                                        PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT) :\n+                   NULL;\n+      if (clip_info)\n+         z_clip_enable = clip_info->depthClipEnable;\n+      else if (!(rs_info && rs_info->depthClampEnable))\n+         z_clip_enable = true;\n+\n+      if (z_clip_enable) {\n+         config.z_clipping_mode = pipeline->negative_one_to_one ?\n+\t    V3D_Z_CLIP_MODE_MIN_ONE_TO_ONE : V3D_Z_CLIP_MODE_ZERO_TO_ONE;\n+      } else {\n+         config.z_clipping_mode = V3D_Z_CLIP_MODE_NONE;\n+      }\n+#endif\n    };\n }\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0099-broadcom-common-add-TFU-register-definitions-for-v71.patch",
    "content": "From 2925fa6dc936d9268a59d8d7d4a775e89fd3fbdb Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Wed, 17 Nov 2021 11:33:59 +0100\nSubject: [PATCH 099/142] broadcom/common: add TFU register definitions for v71\n\n---\n src/broadcom/common/v3d_tfu.h | 23 +++++++++++++++++++++++\n 1 file changed, 23 insertions(+)\n\ndiff --git a/src/broadcom/common/v3d_tfu.h b/src/broadcom/common/v3d_tfu.h\nindex 80da224ca2d..572d0074794 100644\n--- a/src/broadcom/common/v3d_tfu.h\n+++ b/src/broadcom/common/v3d_tfu.h\n@@ -48,4 +48,27 @@\n #define V3D33_TFU_ICFG_FORMAT_UIF_NO_XOR 14\n #define V3D33_TFU_ICFG_FORMAT_UIF_XOR 15\n \n+/* Disable level 0 write, just write following mipmaps */\n+#define V3D71_TFU_IOC_DIMTW (1 << 0)\n+#define V3D71_TFU_IOC_FORMAT_SHIFT              12\n+#define V3D71_TFU_IOC_FORMAT_LINEARTILE          3\n+#define V3D71_TFU_IOA_FORMAT_UBLINEAR_1_COLUMN   4\n+#define V3D71_TFU_IOA_FORMAT_UBLINEAR_2_COLUMN   5\n+#define V3D71_TFU_IOA_FORMAT_UIF_NO_XOR          6\n+#define V3D71_TFU_IOA_FORMAT_UIF_XOR             7\n+\n+#define V3D71_TFU_IOC_STRIDE_SHIFT              16\n+#define V3D71_TFU_IOC_NUMMM_SHIFT                4\n+\n+#define V3D71_TFU_ICFG_OTYPE_SHIFT              16\n+#define V3D71_TFU_ICFG_IFORMAT_SHIFT            23\n+#define V3D71_TFU_ICFG_FORMAT_RASTER             0\n+#define V3D71_TFU_ICFG_FORMAT_SAND_128           1\n+#define V3D71_TFU_ICFG_FORMAT_SAND_256           2\n+#define V3D71_TFU_ICFG_FORMAT_LINEARTILE        11\n+#define V3D71_TFU_ICFG_FORMAT_UBLINEAR_1_COLUMN 12\n+#define V3D71_TFU_ICFG_FORMAT_UBLINEAR_2_COLUMN 13\n+#define V3D71_TFU_ICFG_FORMAT_UIF_NO_XOR        14\n+#define V3D71_TFU_ICFG_FORMAT_UIF_XOR           15\n+\n #endif\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0100-broadcom-simulator-TFU-register-names-changed-for-v7.patch",
    "content": "From 6d10aa8a64e009d4d1f4f05885621bd2d9a72465 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Thu, 23 Sep 2021 13:09:41 +0200\nSubject: [PATCH 100/142] broadcom/simulator: TFU register names changed for\n v71\n\n---\n src/broadcom/simulator/v3dx_simulator.c | 39 +++++++++++++++----------\n 1 file changed, 23 insertions(+), 16 deletions(-)\n\ndiff --git a/src/broadcom/simulator/v3dx_simulator.c b/src/broadcom/simulator/v3dx_simulator.c\nindex f23b0538de3..494f44a6b5d 100644\n--- a/src/broadcom/simulator/v3dx_simulator.c\n+++ b/src/broadcom/simulator/v3dx_simulator.c\n@@ -182,26 +182,33 @@ v3d_flush_caches(struct v3d_hw *v3d)\n         v3d_flush_l2t(v3d);\n }\n \n+#if V3D_VERSION < 71\n+#define TFU_REG(NAME) V3D_TFU_ ## NAME\n+#else\n+#define TFU_REG(NAME) V3D_IFC_ ## NAME\n+#endif\n+\n+\n int\n v3dX(simulator_submit_tfu_ioctl)(struct v3d_hw *v3d,\n                                  struct drm_v3d_submit_tfu *args)\n {\n-        int last_vtct = V3D_READ(V3D_TFU_CS) & V3D_TFU_CS_CVTCT_SET;\n-\n-        V3D_WRITE(V3D_TFU_IIA, args->iia);\n-        V3D_WRITE(V3D_TFU_IIS, args->iis);\n-        V3D_WRITE(V3D_TFU_ICA, args->ica);\n-        V3D_WRITE(V3D_TFU_IUA, args->iua);\n-        V3D_WRITE(V3D_TFU_IOA, args->ioa);\n-        V3D_WRITE(V3D_TFU_IOS, args->ios);\n-        V3D_WRITE(V3D_TFU_COEF0, args->coef[0]);\n-        V3D_WRITE(V3D_TFU_COEF1, args->coef[1]);\n-        V3D_WRITE(V3D_TFU_COEF2, args->coef[2]);\n-        V3D_WRITE(V3D_TFU_COEF3, args->coef[3]);\n-\n-        V3D_WRITE(V3D_TFU_ICFG, args->icfg);\n-\n-        while ((V3D_READ(V3D_TFU_CS) & V3D_TFU_CS_CVTCT_SET) == last_vtct) {\n+        int last_vtct = V3D_READ(TFU_REG(CS)) & V3D_TFU_CS_CVTCT_SET;\n+\n+        V3D_WRITE(TFU_REG(IIA), args->iia);\n+        V3D_WRITE(TFU_REG(IIS), args->iis);\n+        V3D_WRITE(TFU_REG(ICA), args->ica);\n+        V3D_WRITE(TFU_REG(IUA), args->iua);\n+        V3D_WRITE(TFU_REG(IOA), args->ioa);\n+        V3D_WRITE(TFU_REG(IOS), args->ios);\n+        V3D_WRITE(TFU_REG(COEF0), args->coef[0]);\n+        V3D_WRITE(TFU_REG(COEF1), args->coef[1]);\n+        V3D_WRITE(TFU_REG(COEF2), args->coef[2]);\n+        V3D_WRITE(TFU_REG(COEF3), args->coef[3]);\n+\n+        V3D_WRITE(TFU_REG(ICFG), args->icfg);\n+\n+        while ((V3D_READ(TFU_REG(CS)) & V3D_TFU_CS_CVTCT_SET) == last_vtct) {\n                 v3d_hw_tick(v3d);\n         }\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0101-v3dv-add-support-for-TFU-jobs-in-v71.patch",
    "content": "From 780f012747f2cc6e816b1955081dbeca9a0abe5c Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Thu, 23 Sep 2021 12:12:18 +0200\nSubject: [PATCH 101/142] v3dv: add support for TFU jobs in v71\n\n---\n include/drm-uapi/v3d_drm.h              |  5 ++++\n src/broadcom/simulator/v3dx_simulator.c |  3 ++\n src/broadcom/vulkan/v3dvx_meta_common.c | 37 +++++++++++++++++++++++++\n 3 files changed, 45 insertions(+)\n\ndiff --git a/include/drm-uapi/v3d_drm.h b/include/drm-uapi/v3d_drm.h\nindex 3dfc0af8756..1a7d7a689de 100644\n--- a/include/drm-uapi/v3d_drm.h\n+++ b/include/drm-uapi/v3d_drm.h\n@@ -319,6 +319,11 @@ struct drm_v3d_submit_tfu {\n \n \t/* Pointer to an array of ioctl extensions*/\n \t__u64 extensions;\n+\n+\tstruct {\n+\t\t__u32 ioc;\n+\t\t__u32 pad;\n+\t} v71;\n };\n \n /* Submits a compute shader for dispatch.  This job will block on any\ndiff --git a/src/broadcom/simulator/v3dx_simulator.c b/src/broadcom/simulator/v3dx_simulator.c\nindex 494f44a6b5d..4ea177c9bb7 100644\n--- a/src/broadcom/simulator/v3dx_simulator.c\n+++ b/src/broadcom/simulator/v3dx_simulator.c\n@@ -200,6 +200,9 @@ v3dX(simulator_submit_tfu_ioctl)(struct v3d_hw *v3d,\n         V3D_WRITE(TFU_REG(ICA), args->ica);\n         V3D_WRITE(TFU_REG(IUA), args->iua);\n         V3D_WRITE(TFU_REG(IOA), args->ioa);\n+#if V3D_VERSION >= 71\n+        V3D_WRITE(TFU_REG(IOC), args->v71.ioc);\n+#endif\n         V3D_WRITE(TFU_REG(IOS), args->ios);\n         V3D_WRITE(TFU_REG(COEF0), args->coef[0]);\n         V3D_WRITE(TFU_REG(COEF1), args->coef[1]);\ndiff --git a/src/broadcom/vulkan/v3dvx_meta_common.c b/src/broadcom/vulkan/v3dvx_meta_common.c\nindex 09ebcfa97c1..b8f3297bc94 100644\n--- a/src/broadcom/vulkan/v3dvx_meta_common.c\n+++ b/src/broadcom/vulkan/v3dvx_meta_common.c\n@@ -950,6 +950,7 @@ v3dX(meta_emit_tfu_job)(struct v3dv_cmd_buffer *cmd_buffer,\n \n    tfu.iia |= src_offset;\n \n+#if V3D_VERSION <= 42\n    if (src_tiling == V3D_TILING_RASTER) {\n       tfu.icfg = V3D33_TFU_ICFG_FORMAT_RASTER << V3D33_TFU_ICFG_FORMAT_SHIFT;\n    } else {\n@@ -958,12 +959,46 @@ v3dX(meta_emit_tfu_job)(struct v3dv_cmd_buffer *cmd_buffer,\n                    V3D33_TFU_ICFG_FORMAT_SHIFT;\n    }\n    tfu.icfg |= format_plane->tex_type << V3D33_TFU_ICFG_TTYPE_SHIFT;\n+#endif\n+#if V3D_VERSION >= 71\n+   if (src_tiling == V3D_TILING_RASTER) {\n+      tfu.icfg = V3D71_TFU_ICFG_FORMAT_RASTER << V3D71_TFU_ICFG_IFORMAT_SHIFT;\n+   } else {\n+      tfu.icfg = (V3D71_TFU_ICFG_FORMAT_LINEARTILE +\n+                  (src_tiling - V3D_TILING_LINEARTILE)) <<\n+                   V3D71_TFU_ICFG_IFORMAT_SHIFT;\n+   }\n+   tfu.icfg |= format_plane->tex_type << V3D71_TFU_ICFG_OTYPE_SHIFT;\n+#endif\n \n    tfu.ioa = dst_offset;\n \n+#if V3D_VERSION <= 42\n    tfu.ioa |= (V3D33_TFU_IOA_FORMAT_LINEARTILE +\n                (dst_tiling - V3D_TILING_LINEARTILE)) <<\n                 V3D33_TFU_IOA_FORMAT_SHIFT;\n+#endif\n+\n+#if V3D_VERSION >= 71\n+   tfu.v71.ioc = (V3D71_TFU_IOC_FORMAT_LINEARTILE +\n+                  (dst_tiling - V3D_TILING_LINEARTILE)) <<\n+                   V3D71_TFU_IOC_FORMAT_SHIFT;\n+\n+   switch (dst_tiling) {\n+   case V3D_TILING_UIF_NO_XOR:\n+   case V3D_TILING_UIF_XOR:\n+      tfu.v71.ioc |=\n+         (dst_padded_height_or_stride / (2 * v3d_utile_height(dst_cpp))) <<\n+         V3D71_TFU_IOC_STRIDE_SHIFT;\n+      break;\n+   case V3D_TILING_RASTER:\n+      tfu.v71.ioc |= (dst_padded_height_or_stride / dst_cpp) <<\n+                      V3D71_TFU_IOC_STRIDE_SHIFT;\n+      break;\n+   default:\n+      break;\n+   }\n+#endif\n \n    switch (src_tiling) {\n    case V3D_TILING_UIF_NO_XOR:\n@@ -980,6 +1015,7 @@ v3dX(meta_emit_tfu_job)(struct v3dv_cmd_buffer *cmd_buffer,\n    /* The TFU can handle raster sources but always produces UIF results */\n    assert(dst_tiling != V3D_TILING_RASTER);\n \n+#if V3D_VERSION <= 42\n    /* If we're writing level 0 (!IOA_DIMTW), then we need to supply the\n     * OPAD field for the destination (how many extra UIF blocks beyond\n     * those necessary to cover the height).\n@@ -991,6 +1027,7 @@ v3dX(meta_emit_tfu_job)(struct v3dv_cmd_buffer *cmd_buffer,\n                       uif_block_h;\n       tfu.icfg |= icfg << V3D33_TFU_ICFG_OPAD_SHIFT;\n    }\n+#endif\n \n    v3dv_cmd_buffer_add_tfu_job(cmd_buffer, &tfu);\n }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0102-v3dv-make-v3dv_viewport_compute_xform-depend-on-the-.patch",
    "content": "From 07cba940af2fe0c40641816bee280b57a40973fb Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 20 Oct 2021 11:22:11 +0200\nSubject: [PATCH 102/142] v3dv: make v3dv_viewport_compute_xform depend on the\n V3D version\n\nFor 4.x we have a workaround for too small Z scale values that is\nnot required for V3D 7.x.\n---\n src/broadcom/vulkan/v3dv_cmd_buffer.c  | 40 +++-----------------------\n src/broadcom/vulkan/v3dv_pipeline.c    |  7 +++--\n src/broadcom/vulkan/v3dvx_cmd_buffer.c | 37 ++++++++++++++++++++++++\n src/broadcom/vulkan/v3dvx_private.h    |  5 ++++\n 4 files changed, 50 insertions(+), 39 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c\nindex 96360a96b44..bda0a614523 100644\n--- a/src/broadcom/vulkan/v3dv_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c\n@@ -2131,39 +2131,6 @@ v3dv_CmdBindPipeline(VkCommandBuffer commandBuffer,\n    }\n }\n \n-/* FIXME: C&P from radv. tu has similar code. Perhaps common place? */\n-void\n-v3dv_viewport_compute_xform(const VkViewport *viewport,\n-                            float scale[3],\n-                            float translate[3])\n-{\n-   float x = viewport->x;\n-   float y = viewport->y;\n-   float half_width = 0.5f * viewport->width;\n-   float half_height = 0.5f * viewport->height;\n-   double n = viewport->minDepth;\n-   double f = viewport->maxDepth;\n-\n-   scale[0] = half_width;\n-   translate[0] = half_width + x;\n-   scale[1] = half_height;\n-   translate[1] = half_height + y;\n-\n-   scale[2] = (f - n);\n-   translate[2] = n;\n-\n-   /* It seems that if the scale is small enough the hardware won't clip\n-    * correctly so we work around this my choosing the smallest scale that\n-    * seems to work.\n-    *\n-    * This case is exercised by CTS:\n-    * dEQP-VK.draw.inverted_depth_ranges.nodepthclamp_deltazero\n-    */\n-   const float min_abs_scale = 0.000009f;\n-   if (fabs(scale[2]) < min_abs_scale)\n-      scale[2] = scale[2] < 0 ? -min_abs_scale : min_abs_scale;\n-}\n-\n /* Considers the pipeline's negative_one_to_one state and applies it to the\n  * current viewport transform if needed to produce the resulting Z translate\n  * and scale parameters.\n@@ -2216,9 +2183,10 @@ v3dv_CmdSetViewport(VkCommandBuffer commandBuffer,\n           viewportCount * sizeof(*pViewports));\n \n    for (uint32_t i = firstViewport; i < total_count; i++) {\n-      v3dv_viewport_compute_xform(&state->dynamic.viewport.viewports[i],\n-                                  state->dynamic.viewport.scale[i],\n-                                  state->dynamic.viewport.translate[i]);\n+      v3dv_X(cmd_buffer->device, viewport_compute_xform)\n+         (&state->dynamic.viewport.viewports[i],\n+          state->dynamic.viewport.scale[i],\n+          state->dynamic.viewport.translate[i]);\n    }\n \n    cmd_buffer->state.dirty |= V3DV_CMD_DIRTY_VIEWPORT;\ndiff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c\nindex d012ff8f948..2156176d4cc 100644\n--- a/src/broadcom/vulkan/v3dv_pipeline.c\n+++ b/src/broadcom/vulkan/v3dv_pipeline.c\n@@ -2661,9 +2661,10 @@ pipeline_init_dynamic_state(\n                       pViewportState->viewportCount);\n \n          for (uint32_t i = 0; i < dynamic->viewport.count; i++) {\n-            v3dv_viewport_compute_xform(&dynamic->viewport.viewports[i],\n-                                        dynamic->viewport.scale[i],\n-                                        dynamic->viewport.translate[i]);\n+            v3dv_X(pipeline->device, viewport_compute_xform)\n+               (&dynamic->viewport.viewports[i],\n+                dynamic->viewport.scale[i],\n+                dynamic->viewport.translate[i]);\n          }\n       }\n \ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex 750486a6ccf..f7c13a22423 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -1285,6 +1285,43 @@ v3dX(cmd_buffer_emit_render_pass_rcl)(struct v3dv_cmd_buffer *cmd_buffer)\n    cl_emit(rcl, END_OF_RENDERING, end);\n }\n \n+void\n+v3dX(viewport_compute_xform)(const VkViewport *viewport,\n+                            float scale[3],\n+                            float translate[3])\n+{\n+   float x = viewport->x;\n+   float y = viewport->y;\n+   float half_width = 0.5f * viewport->width;\n+   float half_height = 0.5f * viewport->height;\n+   double n = viewport->minDepth;\n+   double f = viewport->maxDepth;\n+\n+   scale[0] = half_width;\n+   translate[0] = half_width + x;\n+   scale[1] = half_height;\n+   translate[1] = half_height + y;\n+\n+   scale[2] = (f - n);\n+   translate[2] = n;\n+\n+   /* It seems that if the scale is small enough the hardware won't clip\n+    * correctly so we work around this my choosing the smallest scale that\n+    * seems to work.\n+    *\n+    * This case is exercised by CTS:\n+    * dEQP-VK.draw.renderpass.inverted_depth_ranges.nodepthclamp_deltazero\n+    *\n+    * V3D 7.x fixes this by using the new\n+    * CLIPPER_Z_SCALE_AND_OFFSET_NO_GUARDBAND.\n+    */\n+#if V3D_VERSION <= 42\n+   const float min_abs_scale = 0.0005f;\n+   if (fabs(scale[2]) < min_abs_scale)\n+      scale[2] = scale[2] < 0 ? -min_abs_scale : min_abs_scale;\n+#endif\n+}\n+\n void\n v3dX(cmd_buffer_emit_viewport)(struct v3dv_cmd_buffer *cmd_buffer)\n {\ndiff --git a/src/broadcom/vulkan/v3dvx_private.h b/src/broadcom/vulkan/v3dvx_private.h\nindex 036ce11b455..81715520913 100644\n--- a/src/broadcom/vulkan/v3dvx_private.h\n+++ b/src/broadcom/vulkan/v3dvx_private.h\n@@ -339,3 +339,8 @@ v3dX(clamp_for_format_and_type)(uint32_t rt_type,\n uint32_t\n v3dX(clamp_for_format_and_type)(uint32_t rt_type,\n                                 VkFormat vk_format);\n+\n+void\n+v3dX(viewport_compute_xform)(const VkViewport *viewport,\n+                             float scale[3],\n+                             float translate[3]);\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0103-v3dv-fix-depth-clipping-then-Z-scale-is-too-small-in.patch",
    "content": "From c6b60ee47c50474030f8a0a92bd4c6a071f926dc Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 14 Feb 2023 10:09:53 +0100\nSubject: [PATCH 103/142] v3dv: fix depth clipping then Z scale is too small in\n V3D 7.x\n\nWhen the Z scale is too small guardband clipping may not clip\ncorrectly, so disable it, which is a new option in V3D 7.x.\n\nThis fixes this test in V3D 7.x without needing any workarounds:\ndEQP-VK.draw.renderpass.inverted_depth_ranges.nodepthclamp_deltazero\n---\n src/broadcom/vulkan/v3dvx_cmd_buffer.c | 18 ++++++++++++++++++\n 1 file changed, 18 insertions(+)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex f7c13a22423..3566649aafd 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -1363,10 +1363,28 @@ v3dX(cmd_buffer_emit_viewport)(struct v3dv_cmd_buffer *cmd_buffer)\n    v3dv_cmd_buffer_state_get_viewport_z_xform(&cmd_buffer->state, 0,\n                                               &translate_z, &scale_z);\n \n+#if V3D_VERSION == 42\n    cl_emit(&job->bcl, CLIPPER_Z_SCALE_AND_OFFSET, clip) {\n       clip.viewport_z_offset_zc_to_zs = translate_z;\n       clip.viewport_z_scale_zc_to_zs = scale_z;\n    }\n+#endif\n+\n+#if V3D_VERSION >= 71\n+   /* If the Z scale is too small guardband clipping may not clip correctly */\n+   if (fabsf(scale_z) < 0.01f) {\n+      cl_emit(&job->bcl, CLIPPER_Z_SCALE_AND_OFFSET_NO_GUARDBAND, clip) {\n+         clip.viewport_z_offset_zc_to_zs = translate_z;\n+         clip.viewport_z_scale_zc_to_zs = scale_z;\n+      }\n+   } else {\n+      cl_emit(&job->bcl, CLIPPER_Z_SCALE_AND_OFFSET, clip) {\n+         clip.viewport_z_offset_zc_to_zs = translate_z;\n+         clip.viewport_z_scale_zc_to_zs = scale_z;\n+      }\n+   }\n+#endif\n+\n    cl_emit(&job->bcl, CLIPPER_Z_MIN_MAX_CLIPPING_PLANES, clip) {\n       /* Vulkan's default Z NDC is [0..1]. If 'negative_one_to_one' is enabled,\n        * we are using OpenGL's [-1, 1] instead.\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0104-v3d-add-a-non-conformant-warning-for-not-fully-suppo.patch",
    "content": "From 46e2b22f43290e6fe92f5435af174c4b18bb6ef5 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 21 Oct 2021 22:52:47 +0200\nSubject: [PATCH 104/142] v3d: add a non-conformant warning for not fully\n supported hw\n\n---\n src/gallium/drivers/v3d/v3d_screen.c | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c\nindex 98ca9bb69e6..efdb7d615ae 100644\n--- a/src/gallium/drivers/v3d/v3d_screen.c\n+++ b/src/gallium/drivers/v3d/v3d_screen.c\n@@ -922,6 +922,12 @@ v3d_screen_create(int fd, const struct pipe_screen_config *config,\n         if (!v3d_get_device_info(screen->fd, &screen->devinfo, &v3d_ioctl))\n                 goto fail;\n \n+        if (screen->devinfo.ver >= 71) {\n+                fprintf(stderr, \"WARNING: v3d support for hw version %i is neither \"\n+                        \"a complete nor a conformant OpenGL implementation. Testing \"\n+                        \"use only.\\n\", screen->devinfo.ver);\n+        }\n+\n         driParseConfigFiles(config->options, config->options_info, 0, \"v3d\",\n                             NULL, NULL, NULL, 0, NULL, 0);\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0105-v3d-add-v71-hw-generation.patch",
    "content": "From 46ffdc57ac7fbe71e92b22e1fe93185f3d33a3ac Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Tue, 23 May 2023 23:32:37 +0200\nSubject: [PATCH 105/142] v3d: add v71 hw generation\n\nStarting point for v71 version inclusion:\n * Adds as one of the versions to be compiled on meson\n * Updated the v3d_X and v3dX macros to include version 71\n * Update the code enough to get it building when using v71.\n\nAny real v71 support will be implemented on following commits.\n---\n src/gallium/drivers/v3d/meson.build   |  2 +-\n src/gallium/drivers/v3d/v3d_context.h | 22 +++++++++++++----\n src/gallium/drivers/v3d/v3dx_draw.c   | 21 +++++++++++++---\n src/gallium/drivers/v3d/v3dx_emit.c   | 11 +++++++++\n src/gallium/drivers/v3d/v3dx_rcl.c    | 35 ++++++++++++++++++++++-----\n src/gallium/drivers/v3d/v3dx_state.c  | 12 +++++++++\n 6 files changed, 88 insertions(+), 15 deletions(-)\n\ndiff --git a/src/gallium/drivers/v3d/meson.build b/src/gallium/drivers/v3d/meson.build\nindex dfa1e88097b..526a131ae9b 100644\n--- a/src/gallium/drivers/v3d/meson.build\n+++ b/src/gallium/drivers/v3d/meson.build\n@@ -58,7 +58,7 @@ if dep_v3dv3.found()\n   v3d_args += '-DUSE_V3D_SIMULATOR'\n endif\n \n-v3d_versions = ['33', '42']\n+v3d_versions = ['33', '42', '71']\n \n per_version_libs = []\n foreach ver : v3d_versions\ndiff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h\nindex 97850b0363e..ad267d5033c 100644\n--- a/src/gallium/drivers/v3d/v3d_context.h\n+++ b/src/gallium/drivers/v3d/v3d_context.h\n@@ -818,13 +818,21 @@ void v3d_disk_cache_store(struct v3d_context *v3d,\n \n /* Helper to call hw ver specific functions */\n #define v3d_X(devinfo, thing) ({                                \\\n-        __typeof(&v3d42_##thing) v3d_X_thing;                   \\\n-        if ((devinfo)->ver >= 42)                               \\\n-                v3d_X_thing = &v3d42_##thing;                   \\\n-        else if ((devinfo)->ver >= 33)                          \\\n+        __typeof(&v3d33_##thing) v3d_X_thing;                   \\\n+        switch (devinfo->ver) {                                 \\\n+        case 33:                                                \\\n+        case 40:                                                \\\n                 v3d_X_thing = &v3d33_##thing;                   \\\n-        else                                                    \\\n+                break;                                          \\\n+        case 42:                                                \\\n+                v3d_X_thing = &v3d42_##thing;                   \\\n+                break;                                          \\\n+        case 71:                                                \\\n+                v3d_X_thing = &v3d71_##thing;                   \\\n+                break;                                          \\\n+        default:                                                \\\n                 unreachable(\"Unsupported hardware generation\"); \\\n+        }                                                       \\\n         v3d_X_thing;                                            \\\n })\n \n@@ -838,6 +846,10 @@ void v3d_disk_cache_store(struct v3d_context *v3d,\n #  define v3dX(x) v3d42_##x\n #  include \"v3dx_context.h\"\n #  undef v3dX\n+\n+#  define v3dX(x) v3d71_##x\n+#  include \"v3dx_context.h\"\n+#  undef v3dX\n #endif\n \n #endif /* V3D_CONTEXT_H */\ndiff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c\nindex 17442500ea9..2c74c5973c9 100644\n--- a/src/gallium/drivers/v3d/v3dx_draw.c\n+++ b/src/gallium/drivers/v3d/v3dx_draw.c\n@@ -95,7 +95,11 @@ v3dX(start_binning)(struct v3d_context *v3d, struct v3d_job *job)\n #endif\n \n         assert(!job->msaa || !job->double_buffer);\n-#if V3D_VERSION >= 40\n+#if V3D_VERSION >= 71\n+        unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n+\n+#if V3D_VERSION >= 40 && V3D_VERSION <= 42\n         cl_emit(&job->bcl, TILE_BINNING_MODE_CFG, config) {\n                 config.width_in_pixels = job->draw_width;\n                 config.height_in_pixels = job->draw_height;\n@@ -107,7 +111,8 @@ v3dX(start_binning)(struct v3d_context *v3d, struct v3d_job *job)\n \n                 config.maximum_bpp_of_all_render_targets = job->internal_bpp;\n         }\n-#else /* V3D_VERSION < 40 */\n+#endif\n+#if V3D_VERSION < 40\n         /* \"Binning mode lists start with a Tile Binning Mode Configuration\n          * item (120)\"\n          *\n@@ -134,7 +139,7 @@ v3dX(start_binning)(struct v3d_context *v3d, struct v3d_job *job)\n \n                 config.maximum_bpp_of_all_render_targets = job->internal_bpp;\n         }\n-#endif /* V3D_VERSION < 40 */\n+#endif\n \n         /* There's definitely nothing in the VCD cache we want. */\n         cl_emit(&job->bcl, FLUSH_VCD_CACHE, bin);\n@@ -655,10 +660,15 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,\n                 /* XXX: Use combined input/output size flag in the common\n                  * case.\n                  */\n+#if V3D_VERSION <= 42\n                 shader.coordinate_shader_has_separate_input_and_output_vpm_blocks =\n                         v3d->prog.cs->prog_data.vs->separate_segments;\n                 shader.vertex_shader_has_separate_input_and_output_vpm_blocks =\n                         v3d->prog.vs->prog_data.vs->separate_segments;\n+#endif\n+#if V3D_VERSION >= 71\n+                unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n \n                 shader.coordinate_shader_input_vpm_segment_size =\n                         v3d->prog.cs->prog_data.vs->separate_segments ?\n@@ -724,9 +734,14 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,\n                 shader.instance_id_read_by_vertex_shader =\n                         v3d->prog.vs->prog_data.vs->uses_iid;\n \n+#if V3D_VERSION <= 42\n                 shader.address_of_default_attribute_values =\n                         cl_address(v3d_resource(vtx->defaults)->bo,\n                                    vtx->defaults_offset);\n+#endif\n+#if V3D_VERSION >= 71\n+                unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n         }\n \n         bool cs_loaded_any = false;\ndiff --git a/src/gallium/drivers/v3d/v3dx_emit.c b/src/gallium/drivers/v3d/v3dx_emit.c\nindex 0ad3fb68b1e..5af3d03b337 100644\n--- a/src/gallium/drivers/v3d/v3dx_emit.c\n+++ b/src/gallium/drivers/v3d/v3dx_emit.c\n@@ -512,6 +512,7 @@ v3dX(emit_state)(struct pipe_context *pctx)\n                         /* Note: EZ state may update based on the compiled FS,\n                          * along with ZSA\n                          */\n+#if V3D_VERSION <= 42\n                         config.early_z_updates_enable =\n                                 (job->ez_state != V3D_EZ_DISABLED);\n                         if (v3d->zsa->base.depth_enabled) {\n@@ -524,6 +525,10 @@ v3dX(emit_state)(struct pipe_context *pctx)\n                         } else {\n                                 config.depth_test_function = PIPE_FUNC_ALWAYS;\n                         }\n+#endif\n+#if V3D_VERSION >= 71\n+                        unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n \n                         config.stencil_enable =\n                                 v3d->zsa->base.stencil[0].enabled;\n@@ -564,12 +569,18 @@ v3dX(emit_state)(struct pipe_context *pctx)\n         }\n \n         if (v3d->dirty & V3D_DIRTY_VIEWPORT) {\n+#if V3D_VERSION <= 42\n                 cl_emit(&job->bcl, CLIPPER_XY_SCALING, clip) {\n                         clip.viewport_half_width_in_1_256th_of_pixel =\n                                 v3d->viewport.scale[0] * 256.0f;\n                         clip.viewport_half_height_in_1_256th_of_pixel =\n                                 v3d->viewport.scale[1] * 256.0f;\n                 }\n+#endif\n+#if V3D_VERSION >= 71\n+                unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n+\n \n                 cl_emit(&job->bcl, CLIPPER_Z_SCALE_AND_OFFSET, clip) {\n                         clip.viewport_z_offset_zc_to_zs =\ndiff --git a/src/gallium/drivers/v3d/v3dx_rcl.c b/src/gallium/drivers/v3d/v3dx_rcl.c\nindex 82547437c25..166cc34e4ee 100644\n--- a/src/gallium/drivers/v3d/v3dx_rcl.c\n+++ b/src/gallium/drivers/v3d/v3dx_rcl.c\n@@ -419,10 +419,16 @@ v3d_rcl_emit_stores(struct v3d_job *job, struct v3d_cl *cl, int layer)\n          * clearing Z/S.\n          */\n         if (job->clear) {\n+#if V3D_VERSION <= 42\n                 cl_emit(cl, CLEAR_TILE_BUFFERS, clear) {\n                         clear.clear_z_stencil_buffer = !job->early_zs_clear;\n                         clear.clear_all_render_targets = true;\n                 }\n+#endif\n+#if V3D_VERSION >= 71\n+                unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n+\n         }\n #endif /* V3D_VERSION >= 40 */\n }\n@@ -483,7 +489,7 @@ v3d_rcl_emit_generic_per_tile_list(struct v3d_job *job, int layer)\n         }\n }\n \n-#if V3D_VERSION >= 40\n+#if V3D_VERSION >= 40 && V3D_VERSION <= 42\n static void\n v3d_setup_render_target(struct v3d_job *job, int cbuf,\n                         uint32_t *rt_bpp, uint32_t *rt_type, uint32_t *rt_clamp)\n@@ -507,9 +513,9 @@ v3d_setup_render_target(struct v3d_job *job, int cbuf,\n         else\n                 *rt_clamp = V3D_RENDER_TARGET_CLAMP_NONE;\n }\n+#endif\n \n-#else /* V3D_VERSION < 40 */\n-\n+#if V3D_VERSION < 40\n static void\n v3d_emit_z_stencil_config(struct v3d_job *job, struct v3d_surface *surf,\n                           struct v3d_resource *rsc, bool is_separate_stencil)\n@@ -656,7 +662,8 @@ emit_render_layer(struct v3d_job *job, uint32_t layer)\n         cl_emit(&job->rcl, STORE_TILE_BUFFER_GENERAL, store) {\n                 store.buffer_to_store = NONE;\n         }\n-#else\n+#endif\n+#if V3D_VERSION >= 40 && V3D_VERSION <= 42\n         for (int i = 0; i < 2; i++) {\n                 if (i > 0)\n                         cl_emit(&job->rcl, TILE_COORDINATES, coords);\n@@ -673,6 +680,10 @@ emit_render_layer(struct v3d_job *job, uint32_t layer)\n                 cl_emit(&job->rcl, END_OF_TILE_MARKER, end);\n         }\n #endif\n+#if V3D_VERSION >= 71\n+        unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n+\n \n         cl_emit(&job->rcl, FLUSH_VCD_CACHE, flush);\n \n@@ -775,7 +786,13 @@ v3dX(emit_rcl)(struct v3d_job *job)\n                 config.multisample_mode_4x = job->msaa;\n                 config.double_buffer_in_non_ms_mode = job->double_buffer;\n \n+#if V3D_VERSION <= 42\n                 config.maximum_bpp_of_all_render_targets = job->internal_bpp;\n+#endif\n+#if V3D_VERSION >= 71\n+                unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n+\n         }\n \n         for (int i = 0; i < job->nr_cbufs; i++) {\n@@ -786,7 +803,7 @@ v3dX(emit_rcl)(struct v3d_job *job)\n                 struct v3d_resource *rsc = v3d_resource(psurf->texture);\n \n                 UNUSED uint32_t config_pad = 0;\n-                uint32_t clear_pad = 0;\n+                UNUSED uint32_t clear_pad = 0;\n \n                 /* XXX: Set the pad for raster. */\n                 if (surf->tiling == V3D_TILING_UIF_NO_XOR ||\n@@ -819,6 +836,7 @@ v3dX(emit_rcl)(struct v3d_job *job)\n                 }\n #endif /* V3D_VERSION < 40 */\n \n+#if V3D_VERSION <= 42\n                 cl_emit(&job->rcl, TILE_RENDERING_MODE_CFG_CLEAR_COLORS_PART1,\n                         clear) {\n                         clear.clear_color_low_32_bits = job->clear_color[i][0];\n@@ -847,9 +865,10 @@ v3dX(emit_rcl)(struct v3d_job *job)\n                                 clear.render_target_number = i;\n                         };\n                 }\n+#endif\n         }\n \n-#if V3D_VERSION >= 40\n+#if V3D_VERSION >= 40 && V3D_VERSION <= 42\n         cl_emit(&job->rcl, TILE_RENDERING_MODE_CFG_COLOR, rt) {\n                 v3d_setup_render_target(job, 0,\n                                         &rt.render_target_0_internal_bpp,\n@@ -870,6 +889,10 @@ v3dX(emit_rcl)(struct v3d_job *job)\n         }\n #endif\n \n+#if V3D_VERSION >= 71\n+        unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n+\n #if V3D_VERSION < 40\n         /* FIXME: Don't bother emitting if we don't load/clear Z/S. */\n         if (job->zsbuf) {\ndiff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c\nindex 0f1735fee66..a93d5be091e 100644\n--- a/src/gallium/drivers/v3d/v3dx_state.c\n+++ b/src/gallium/drivers/v3d/v3dx_state.c\n@@ -990,7 +990,13 @@ v3dX(create_texture_shader_state_bo)(struct v3d_context *v3d,\n                                                                    cso->u.buf.size);\n                 }\n \n+#if V3D_VERSION <= 42\n                 tex.srgb = util_format_is_srgb(cso->format);\n+#endif\n+\n+#if V3D_VERSION >= 71\n+                unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n \n #if V3D_VERSION >= 40\n                 tex.swizzle_r = v3d_translate_pipe_swizzle(so->swizzle[0]);\n@@ -1040,7 +1046,13 @@ v3dX(create_texture_shader_state_bo)(struct v3d_context *v3d,\n                          * shader code if we wanted to read an MSAA sRGB\n                          * texture without sRGB decode.\n                          */\n+#if V3D_VERSION <= 42\n                         tex.srgb = false;\n+#endif\n+#if V3D_VERSION >= 71\n+                        unreachable(\"HW generation 71 not supported yet.\");\n+#endif\n+\n                 } else {\n                         tex.texture_type = v3d_get_tex_format(&screen->devinfo,\n                                                               cso->format);\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0106-v3d-emit-TILE_BINNING_MODE_CFG-for-v71.patch",
    "content": "From 1ef6241854666a00d43401039809f2470d3a2cc0 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Wed, 20 Oct 2021 14:31:10 +0200\nSubject: [PATCH 106/142] v3d: emit TILE_BINNING_MODE_CFG for v71\n\n---\n src/gallium/drivers/v3d/v3dx_draw.c | 16 +++++++++++++++-\n 1 file changed, 15 insertions(+), 1 deletion(-)\n\ndiff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c\nindex 2c74c5973c9..9f38baa0bbf 100644\n--- a/src/gallium/drivers/v3d/v3dx_draw.c\n+++ b/src/gallium/drivers/v3d/v3dx_draw.c\n@@ -96,7 +96,21 @@ v3dX(start_binning)(struct v3d_context *v3d, struct v3d_job *job)\n \n         assert(!job->msaa || !job->double_buffer);\n #if V3D_VERSION >= 71\n-        unreachable(\"HW generation 71 not supported yet.\");\n+        cl_emit(&job->bcl, TILE_BINNING_MODE_CFG, config) {\n+                config.width_in_pixels = job->draw_width;\n+                config.height_in_pixels = job->draw_height;\n+\n+                config.log2_tile_width = log2_tile_size(job->tile_width);\n+                config.log2_tile_height = log2_tile_size(job->tile_height);\n+\n+                /* FIXME: ideallly we would like next assert on the packet header (as is\n+                 * general, so also applies to GL). We would need to expand\n+                 * gen_pack_header for that.\n+                 */\n+                assert(config.log2_tile_width == config.log2_tile_height ||\n+                       config.log2_tile_width == config.log2_tile_height + 1);\n+        }\n+\n #endif\n \n #if V3D_VERSION >= 40 && V3D_VERSION <= 42\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0107-v3d-emit-TILE_RENDERING_MODE_CFG_COMMON-for-v71.patch",
    "content": "From dfdfcf3853d7178acff288a368dfc169018c186a Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Wed, 20 Oct 2021 14:42:43 +0200\nSubject: [PATCH 107/142] v3d: emit TILE_RENDERING_MODE_CFG_COMMON for v71\n\n---\n src/gallium/drivers/v3d/v3dx_rcl.c | 13 +++++++++++--\n 1 file changed, 11 insertions(+), 2 deletions(-)\n\ndiff --git a/src/gallium/drivers/v3d/v3dx_rcl.c b/src/gallium/drivers/v3d/v3dx_rcl.c\nindex 166cc34e4ee..3f5eb293c4e 100644\n--- a/src/gallium/drivers/v3d/v3dx_rcl.c\n+++ b/src/gallium/drivers/v3d/v3dx_rcl.c\n@@ -23,8 +23,9 @@\n \n #include \"util/format/u_format.h\"\n #include \"v3d_context.h\"\n-#include \"broadcom/common/v3d_tiling.h\"\n #include \"broadcom/common/v3d_macros.h\"\n+#include \"broadcom/common/v3d_tiling.h\"\n+#include \"broadcom/common/v3d_util.h\"\n #include \"broadcom/cle/v3dx_pack.h\"\n \n #define PIPE_CLEAR_COLOR_BUFFERS (PIPE_CLEAR_COLOR0 |                   \\\n@@ -790,7 +791,15 @@ v3dX(emit_rcl)(struct v3d_job *job)\n                 config.maximum_bpp_of_all_render_targets = job->internal_bpp;\n #endif\n #if V3D_VERSION >= 71\n-                unreachable(\"HW generation 71 not supported yet.\");\n+                config.log2_tile_width = log2_tile_size(job->tile_width);\n+                config.log2_tile_height = log2_tile_size(job->tile_height);\n+\n+                /* FIXME: ideallly we would like next assert on the packet header (as is\n+                 * general, so also applies to GL). We would need to expand\n+                 * gen_pack_header for that.\n+                 */\n+                assert(config.log2_tile_width == config.log2_tile_height ||\n+                       config.log2_tile_width == config.log2_tile_height + 1);\n #endif\n \n         }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0108-v3d-TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART1.patch",
    "content": "From 34b32f1ee504449e39529110631c389fa9e9e409 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Wed, 20 Oct 2021 15:12:15 +0200\nSubject: [PATCH 108/142] v3d: TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART1\n\n---\n src/gallium/drivers/v3d/v3dx_rcl.c | 130 +++++++++++++++++++++++++----\n 1 file changed, 115 insertions(+), 15 deletions(-)\n\ndiff --git a/src/gallium/drivers/v3d/v3dx_rcl.c b/src/gallium/drivers/v3d/v3dx_rcl.c\nindex 3f5eb293c4e..815e1098c22 100644\n--- a/src/gallium/drivers/v3d/v3dx_rcl.c\n+++ b/src/gallium/drivers/v3d/v3dx_rcl.c\n@@ -490,10 +490,86 @@ v3d_rcl_emit_generic_per_tile_list(struct v3d_job *job, int layer)\n         }\n }\n \n+#if V3D_VERSION > 33\n+/* Note that for v71, render target cfg packets has just one field that\n+ * combined the internal type and clamp mode. For simplicity we keep just one\n+ * helper.\n+ *\n+ * Note: rt_type is in fact a \"enum V3DX(Internal_Type)\".\n+ *\n+ */\n+static uint32_t\n+v3dX(clamp_for_format_and_type)(uint32_t rt_type,\n+                                enum pipe_format format)\n+{\n+#if V3D_VERSION == 42\n+        if (util_format_is_pure_integer(format)) {\n+                return V3D_RENDER_TARGET_CLAMP_INT;\n+        } else if (util_format_is_srgb(format)) {\n+                return V3D_RENDER_TARGET_CLAMP_NORM;\n+        } else {\n+                return V3D_RENDER_TARGET_CLAMP_NONE;\n+        }\n+#endif\n+#if V3D_VERSION >= 71\n+        switch (rt_type) {\n+        case V3D_INTERNAL_TYPE_8I:\n+                return V3D_RENDER_TARGET_TYPE_CLAMP_8I_CLAMPED;\n+        case V3D_INTERNAL_TYPE_8UI:\n+                return V3D_RENDER_TARGET_TYPE_CLAMP_8UI_CLAMPED;\n+        case V3D_INTERNAL_TYPE_8:\n+                return V3D_RENDER_TARGET_TYPE_CLAMP_8;\n+        case V3D_INTERNAL_TYPE_16I:\n+                return V3D_RENDER_TARGET_TYPE_CLAMP_16I_CLAMPED;\n+        case V3D_INTERNAL_TYPE_16UI:\n+                return V3D_RENDER_TARGET_TYPE_CLAMP_16UI_CLAMPED;\n+        case V3D_INTERNAL_TYPE_16F:\n+                return util_format_is_srgb(format) ?\n+                        V3D_RENDER_TARGET_TYPE_CLAMP_16F_CLAMP_NORM :\n+                        V3D_RENDER_TARGET_TYPE_CLAMP_16F;\n+        case V3D_INTERNAL_TYPE_32I:\n+                return V3D_RENDER_TARGET_TYPE_CLAMP_32I_CLAMPED;\n+        case V3D_INTERNAL_TYPE_32UI:\n+                return V3D_RENDER_TARGET_TYPE_CLAMP_32UI_CLAMPED;\n+        case V3D_INTERNAL_TYPE_32F:\n+                return V3D_RENDER_TARGET_TYPE_CLAMP_32F;\n+        default:\n+                unreachable(\"Unknown internal render target type\");\n+        }\n+        return V3D_RENDER_TARGET_TYPE_CLAMP_INVALID;\n+#endif\n+        return 0;\n+}\n+#endif\n+\n+#if V3D_VERSION >= 71\n+static void\n+v3d_setup_render_target(struct v3d_job *job,\n+                        int cbuf,\n+                        uint32_t *rt_bpp,\n+                        uint32_t *rt_type_clamp)\n+{\n+        if (!job->cbufs[cbuf])\n+                return;\n+\n+        struct v3d_surface *surf = v3d_surface(job->cbufs[cbuf]);\n+        *rt_bpp = surf->internal_bpp;\n+        if (job->bbuf) {\n+           struct v3d_surface *bsurf = v3d_surface(job->bbuf);\n+           *rt_bpp = MAX2(*rt_bpp, bsurf->internal_bpp);\n+        }\n+        *rt_type_clamp = v3dX(clamp_for_format_and_type)(surf->internal_type,\n+                                                         surf->base.format);\n+}\n+#endif\n+\n #if V3D_VERSION >= 40 && V3D_VERSION <= 42\n static void\n-v3d_setup_render_target(struct v3d_job *job, int cbuf,\n-                        uint32_t *rt_bpp, uint32_t *rt_type, uint32_t *rt_clamp)\n+v3d_setup_render_target(struct v3d_job *job,\n+                        int cbuf,\n+                        uint32_t *rt_bpp,\n+                        uint32_t *rt_type,\n+                        uint32_t *rt_clamp)\n {\n         if (!job->cbufs[cbuf])\n                 return;\n@@ -505,14 +581,8 @@ v3d_setup_render_target(struct v3d_job *job, int cbuf,\n            *rt_bpp = MAX2(*rt_bpp, bsurf->internal_bpp);\n         }\n         *rt_type = surf->internal_type;\n-        if (util_format_is_srgb(surf->base.format))\n-                *rt_clamp = V3D_RENDER_TARGET_CLAMP_NORM;\n-#if V3D_VERSION >= 42\n-        else if (util_format_is_pure_integer(surf->base.format))\n-                *rt_clamp = V3D_RENDER_TARGET_CLAMP_INT;\n-#endif\n-        else\n-                *rt_clamp = V3D_RENDER_TARGET_CLAMP_NONE;\n+        *rt_clamp = v3dX(clamp_for_format_and_type)(surf->internal_type,\n+                                                    surf->base.format);\n }\n #endif\n \n@@ -804,10 +874,30 @@ v3dX(emit_rcl)(struct v3d_job *job)\n \n         }\n \n+#if V3D_VERSION >= 71\n+        uint32_t base_addr = 0;\n+\n+        /* If we don't have any color RTs, we sill need to emit one and flat\n+         * it as not used using stride = 1\n+         */\n+        if (job->nr_cbufs == 0) {\n+           cl_emit(&job->rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART1, rt) {\n+              rt.stride = 1; /* Unused */\n+           }\n+        }\n+#endif\n         for (int i = 0; i < job->nr_cbufs; i++) {\n                 struct pipe_surface *psurf = job->cbufs[i];\n-                if (!psurf)\n+                if (!psurf) {\n+#if V3D_VERSION >= 71\n+                        cl_emit(&job->rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART1, rt) {\n+                                rt.render_target_number = i;\n+                                rt.stride = 1; /* Unused */\n+                        }\n+#endif\n                         continue;\n+                }\n+\n                 struct v3d_surface *surf = v3d_surface(psurf);\n                 struct v3d_resource *rsc = v3d_resource(psurf->texture);\n \n@@ -874,6 +964,20 @@ v3dX(emit_rcl)(struct v3d_job *job)\n                                 clear.render_target_number = i;\n                         };\n                 }\n+#endif\n+#if V3D_VERSION >= 71\n+                cl_emit(&job->rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART1, rt) {\n+                        rt.clear_color_low_bits = job->clear_color[i][0];\n+                        v3d_setup_render_target(job, i, &rt.internal_bpp,\n+                                                &rt.internal_type_and_clamping);\n+                        rt.stride =\n+                                v3d_compute_rt_row_row_stride_128_bits(job->tile_width,\n+                                                                       v3d_internal_bpp_words(rt.internal_bpp));\n+                        rt.base_address = base_addr;\n+                        rt.render_target_number = i;\n+\n+                        base_addr += (job->tile_height * rt.stride) / 8;\n+                }\n #endif\n         }\n \n@@ -898,10 +1002,6 @@ v3dX(emit_rcl)(struct v3d_job *job)\n         }\n #endif\n \n-#if V3D_VERSION >= 71\n-        unreachable(\"HW generation 71 not supported yet.\");\n-#endif\n-\n #if V3D_VERSION < 40\n         /* FIXME: Don't bother emitting if we don't load/clear Z/S. */\n         if (job->zsbuf) {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0109-v3d-emit-CLEAR_RENDER_TARGETS-for-v71.patch",
    "content": "From 8496282476420e7e5d9d31f6cfd87f3f3b136446 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 21 Oct 2021 01:47:29 +0200\nSubject: [PATCH 109/142] v3d: emit CLEAR_RENDER_TARGETS for v71\n\n---\n src/gallium/drivers/v3d/v3dx_rcl.c | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/src/gallium/drivers/v3d/v3dx_rcl.c b/src/gallium/drivers/v3d/v3dx_rcl.c\nindex 815e1098c22..4274be042bd 100644\n--- a/src/gallium/drivers/v3d/v3dx_rcl.c\n+++ b/src/gallium/drivers/v3d/v3dx_rcl.c\n@@ -427,7 +427,7 @@ v3d_rcl_emit_stores(struct v3d_job *job, struct v3d_cl *cl, int layer)\n                 }\n #endif\n #if V3D_VERSION >= 71\n-                unreachable(\"HW generation 71 not supported yet.\");\n+                cl_emit(cl, CLEAR_RENDER_TARGETS, clear);\n #endif\n \n         }\n@@ -734,7 +734,7 @@ emit_render_layer(struct v3d_job *job, uint32_t layer)\n                 store.buffer_to_store = NONE;\n         }\n #endif\n-#if V3D_VERSION >= 40 && V3D_VERSION <= 42\n+#if V3D_VERSION >= 40\n         for (int i = 0; i < 2; i++) {\n                 if (i > 0)\n                         cl_emit(&job->rcl, TILE_COORDINATES, coords);\n@@ -742,20 +742,20 @@ emit_render_layer(struct v3d_job *job, uint32_t layer)\n                 cl_emit(&job->rcl, STORE_TILE_BUFFER_GENERAL, store) {\n                         store.buffer_to_store = NONE;\n                 }\n+\n                 if (i == 0 || do_double_initial_tile_clear(job)) {\n+#if V3D_VERSION < 71\n                         cl_emit(&job->rcl, CLEAR_TILE_BUFFERS, clear) {\n                                 clear.clear_z_stencil_buffer = !job->early_zs_clear;\n                                 clear.clear_all_render_targets = true;\n                         }\n+#else\n+                        cl_emit(&job->rcl, CLEAR_RENDER_TARGETS, clear);\n+#endif\n                 }\n                 cl_emit(&job->rcl, END_OF_TILE_MARKER, end);\n         }\n #endif\n-#if V3D_VERSION >= 71\n-        unreachable(\"HW generation 71 not supported yet.\");\n-#endif\n-\n-\n         cl_emit(&job->rcl, FLUSH_VCD_CACHE, flush);\n \n         v3d_rcl_emit_generic_per_tile_list(job, layer);\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0110-v3d-just-don-t-fill-up-early-z-fields-for-CFG_BITS-f.patch",
    "content": "From 4de1ace1c7b3b6436a5de8e4c6a2f52d6308ff5c Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 21 Oct 2021 13:09:03 +0200\nSubject: [PATCH 110/142] v3d: just don't fill up early-z fields for CFG_BITS\n for v71\n\nv71 doesn't include early_z_enable/early_z_updates_enable. They are\nconfigured with packet 121.\n---\n src/gallium/drivers/v3d/v3dx_emit.c | 7 +++----\n 1 file changed, 3 insertions(+), 4 deletions(-)\n\ndiff --git a/src/gallium/drivers/v3d/v3dx_emit.c b/src/gallium/drivers/v3d/v3dx_emit.c\nindex 5af3d03b337..de05ae29d04 100644\n--- a/src/gallium/drivers/v3d/v3dx_emit.c\n+++ b/src/gallium/drivers/v3d/v3dx_emit.c\n@@ -515,20 +515,19 @@ v3dX(emit_state)(struct pipe_context *pctx)\n #if V3D_VERSION <= 42\n                         config.early_z_updates_enable =\n                                 (job->ez_state != V3D_EZ_DISABLED);\n+#endif\n                         if (v3d->zsa->base.depth_enabled) {\n                                 config.z_updates_enable =\n                                         v3d->zsa->base.depth_writemask;\n+#if V3D_VERSION <= 42\n                                 config.early_z_enable =\n                                         config.early_z_updates_enable;\n+#endif\n                                 config.depth_test_function =\n                                         v3d->zsa->base.depth_func;\n                         } else {\n                                 config.depth_test_function = PIPE_FUNC_ALWAYS;\n                         }\n-#endif\n-#if V3D_VERSION >= 71\n-                        unreachable(\"HW generation 71 not supported yet.\");\n-#endif\n \n                         config.stencil_enable =\n                                 v3d->zsa->base.stencil[0].enabled;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0111-v3d-emit-CLIPPER_XY_SCALING-for-v71.patch",
    "content": "From 0683f6db1cd50659829fe53f49427bfdacb707b6 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 21 Oct 2021 13:14:32 +0200\nSubject: [PATCH 111/142] v3d: emit CLIPPER_XY_SCALING for v71\n\n---\n src/gallium/drivers/v3d/v3dx_emit.c | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\ndiff --git a/src/gallium/drivers/v3d/v3dx_emit.c b/src/gallium/drivers/v3d/v3dx_emit.c\nindex de05ae29d04..58c886bb29e 100644\n--- a/src/gallium/drivers/v3d/v3dx_emit.c\n+++ b/src/gallium/drivers/v3d/v3dx_emit.c\n@@ -577,7 +577,12 @@ v3dX(emit_state)(struct pipe_context *pctx)\n                 }\n #endif\n #if V3D_VERSION >= 71\n-                unreachable(\"HW generation 71 not supported yet.\");\n+                cl_emit(&job->bcl, CLIPPER_XY_SCALING, clip) {\n+                        clip.viewport_half_width_in_1_64th_of_pixel =\n+                                v3d->viewport.scale[0] * 64.0f;\n+                        clip.viewport_half_height_in_1_64th_of_pixel =\n+                                v3d->viewport.scale[1] * 64.0f;\n+                }\n #endif\n \n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0112-v3d-no-specific-separate_segments-flag-for-V3D-7.1.patch",
    "content": "From 1d1aa5ce739644c72b44ffe547b7233ad19e26b5 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 21 Oct 2021 13:19:49 +0200\nSubject: [PATCH 112/142] v3d: no specific separate_segments flag for V3D 7.1\n\nOn V3D 7.1 there is not a flag on the Shader State Record to specify\nif we are using shared or separate segments. This is done by setting\nthe vpm input size to 0 (so we need to ensure that the output would be\nthe max needed for input/output).\n\nWe were already doing the latter on the prog_data_vs, so we just need\nto use those values, instead of assigning default values.\n---\n src/gallium/drivers/v3d/v3dx_draw.c | 17 ++++++++++++-----\n 1 file changed, 12 insertions(+), 5 deletions(-)\n\ndiff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c\nindex 9f38baa0bbf..dd13e5177fe 100644\n--- a/src/gallium/drivers/v3d/v3dx_draw.c\n+++ b/src/gallium/drivers/v3d/v3dx_draw.c\n@@ -679,17 +679,24 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,\n                         v3d->prog.cs->prog_data.vs->separate_segments;\n                 shader.vertex_shader_has_separate_input_and_output_vpm_blocks =\n                         v3d->prog.vs->prog_data.vs->separate_segments;\n-#endif\n-#if V3D_VERSION >= 71\n-                unreachable(\"HW generation 71 not supported yet.\");\n-#endif\n-\n                 shader.coordinate_shader_input_vpm_segment_size =\n                         v3d->prog.cs->prog_data.vs->separate_segments ?\n                         v3d->prog.cs->prog_data.vs->vpm_input_size : 1;\n                 shader.vertex_shader_input_vpm_segment_size =\n                         v3d->prog.vs->prog_data.vs->separate_segments ?\n                         v3d->prog.vs->prog_data.vs->vpm_input_size : 1;\n+#endif\n+                /* On V3D 7.1 there isn't a specific flag to set if we are using\n+                 * shared/separate segments or not. We just set the value of\n+                 * vpm_input_size to 0, and set output to the max needed. That should be\n+                 * already properly set on prog_data_vs_bin\n+                 */\n+#if V3D_VERSION == 71\n+                shader.coordinate_shader_input_vpm_segment_size =\n+                        v3d->prog.cs->prog_data.vs->vpm_input_size;\n+                shader.vertex_shader_input_vpm_segment_size =\n+                        v3d->prog.vs->prog_data.vs->vpm_input_size;\n+#endif\n \n                 shader.coordinate_shader_output_vpm_segment_size =\n                         v3d->prog.cs->prog_data.vs->vpm_output_size;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0113-v3d-default-vertex-attributes-values-are-not-needed-.patch",
    "content": "From 3a790ddd27c8406c59426599fb9cadb5de5c024d Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 21 Oct 2021 13:37:46 +0200\nSubject: [PATCH 113/142] v3d: default vertex attributes values are not needed\n for v71\n\n---\n src/gallium/drivers/v3d/v3d_context.h |  1 +\n src/gallium/drivers/v3d/v3dx_draw.c   |  3 --\n src/gallium/drivers/v3d/v3dx_state.c  | 53 ++++++++++++++++++---------\n 3 files changed, 37 insertions(+), 20 deletions(-)\n\ndiff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h\nindex ad267d5033c..c0aac741fdc 100644\n--- a/src/gallium/drivers/v3d/v3d_context.h\n+++ b/src/gallium/drivers/v3d/v3d_context.h\n@@ -265,6 +265,7 @@ struct v3d_vertex_stateobj {\n         unsigned num_elements;\n \n         uint8_t attrs[16 * (V3D_MAX_VS_INPUTS / 4)];\n+        /* defaults can be NULL for some hw generation */\n         struct pipe_resource *defaults;\n         uint32_t defaults_offset;\n };\ndiff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c\nindex dd13e5177fe..4bff2ea6478 100644\n--- a/src/gallium/drivers/v3d/v3dx_draw.c\n+++ b/src/gallium/drivers/v3d/v3dx_draw.c\n@@ -759,9 +759,6 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,\n                 shader.address_of_default_attribute_values =\n                         cl_address(v3d_resource(vtx->defaults)->bo,\n                                    vtx->defaults_offset);\n-#endif\n-#if V3D_VERSION >= 71\n-                unreachable(\"HW generation 71 not supported yet.\");\n #endif\n         }\n \ndiff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c\nindex a93d5be091e..3d3c4fb0f47 100644\n--- a/src/gallium/drivers/v3d/v3dx_state.c\n+++ b/src/gallium/drivers/v3d/v3dx_state.c\n@@ -337,6 +337,20 @@ v3d_zsa_state_bind(struct pipe_context *pctx, void *hwcso)\n         v3d->dirty |= V3D_DIRTY_ZSA;\n }\n \n+\n+static bool\n+needs_default_attribute_values(void)\n+{\n+#if V3D_VERSION <= 42\n+        /* FIXME: on vulkan we are able to refine even further, as we know in\n+         * advance when we create the pipeline if we have a integer vertex\n+         * attrib. Pending to check if we could do something similar here.\n+         */\n+        return true;\n+#endif\n+        return false;\n+}\n+\n static void *\n v3d_vertex_state_create(struct pipe_context *pctx, unsigned num_elements,\n                         const struct pipe_vertex_element *elements)\n@@ -414,24 +428,29 @@ v3d_vertex_state_create(struct pipe_context *pctx, unsigned num_elements,\n                 }\n         }\n \n-        /* Set up the default attribute values in case any of the vertex\n-         * elements use them.\n-         */\n-        uint32_t *attrs;\n-        u_upload_alloc(v3d->state_uploader, 0,\n-                       V3D_MAX_VS_INPUTS * sizeof(float), 16,\n-                       &so->defaults_offset, &so->defaults, (void **)&attrs);\n-\n-        for (int i = 0; i < V3D_MAX_VS_INPUTS / 4; i++) {\n-                attrs[i * 4 + 0] = 0;\n-                attrs[i * 4 + 1] = 0;\n-                attrs[i * 4 + 2] = 0;\n-                if (i < so->num_elements &&\n-                    util_format_is_pure_integer(so->pipe[i].src_format)) {\n-                        attrs[i * 4 + 3] = 1;\n-                } else {\n-                        attrs[i * 4 + 3] = fui(1.0);\n+        if (needs_default_attribute_values()) {\n+                /* Set up the default attribute values in case any of the vertex\n+                 * elements use them.\n+                 */\n+                uint32_t *attrs;\n+                u_upload_alloc(v3d->state_uploader, 0,\n+                               V3D_MAX_VS_INPUTS * sizeof(float), 16,\n+                               &so->defaults_offset, &so->defaults, (void **)&attrs);\n+\n+                for (int i = 0; i < V3D_MAX_VS_INPUTS / 4; i++) {\n+                        attrs[i * 4 + 0] = 0;\n+                        attrs[i * 4 + 1] = 0;\n+                        attrs[i * 4 + 2] = 0;\n+                        if (i < so->num_elements &&\n+                            util_format_is_pure_integer(so->pipe[i].src_format)) {\n+                                attrs[i * 4 + 3] = 1;\n+                        } else {\n+                                attrs[i * 4 + 3] = fui(1.0);\n+                        }\n                 }\n+        } else {\n+                so->defaults = NULL;\n+                so->defaults_offset = 0;\n         }\n \n         u_upload_unmap(v3d->state_uploader);\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0114-v3d-uniforms-update-VIEWPORT_X-Y_SCALE-uniforms-for-.patch",
    "content": "From 8e3a2a35df5789687993d05436602821186e1cf2 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 21 Oct 2021 13:46:11 +0200\nSubject: [PATCH 114/142] v3d/uniforms: update VIEWPORT_X/Y_SCALE uniforms for\n v71\n\nAs the packet CLIPPER_XY scaling, this needs to be computed on 1/64ths\nof pixel, instead of 1/256ths of pixels.\n\nAs this is the usual values that we get from macros, we add manually a\nv42 and v71 macro, and define a new helper to get those.\n\nThose granularity values are the same for Vulkan and OpenGL, so\nperhaps we should move them to a common place.\n\nAs with v3dv, V3D_X macro name is somewhat confusing. It is\nspecifically created to ask for define values that depends on the\nversion. But I also felt that V3D_DEFINE_X was too long.\n---\n src/gallium/drivers/v3d/v3d_context.h  | 28 ++++++++++++++++++++++++++\n src/gallium/drivers/v3d/v3d_uniforms.c |  8 ++++++--\n 2 files changed, 34 insertions(+), 2 deletions(-)\n\ndiff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h\nindex c0aac741fdc..21ee10a90cc 100644\n--- a/src/gallium/drivers/v3d/v3d_context.h\n+++ b/src/gallium/drivers/v3d/v3d_context.h\n@@ -837,6 +837,34 @@ void v3d_disk_cache_store(struct v3d_context *v3d,\n         v3d_X_thing;                                            \\\n })\n \n+/* FIXME: The same for vulkan/opengl. Common place? define it at the\n+ * v3d_packet files?\n+ */\n+#define V3D33_CLIPPER_XY_GRANULARITY 256.0f\n+#define V3D42_CLIPPER_XY_GRANULARITY 256.0f\n+#define V3D71_CLIPPER_XY_GRANULARITY 64.0f\n+\n+/* Helper to get hw-specific macro values */\n+#define V3DV_X(devinfo, thing) ({                               \\\n+   __typeof(V3D33_##thing) V3D_X_THING;                         \\\n+   switch (devinfo->ver) {                                      \\\n+   case 33:                                                     \\\n+   case 40:                                                     \\\n+      V3D_X_THING = V3D33_##thing;                              \\\n+      break;                                                    \\\n+      case 41:                                                  \\\n+   case 42:                                                     \\\n+      V3D_X_THING = V3D42_##thing;                              \\\n+      break;                                                    \\\n+   case 71:                                                     \\\n+      V3D_X_THING = V3D71_##thing;                              \\\n+      break;                                                    \\\n+   default:                                                     \\\n+      unreachable(\"Unsupported hardware generation\");           \\\n+   }                                                            \\\n+   V3D_X_THING;                                                 \\\n+})\n+\n #ifdef v3dX\n #  include \"v3dx_context.h\"\n #else\ndiff --git a/src/gallium/drivers/v3d/v3d_uniforms.c b/src/gallium/drivers/v3d/v3d_uniforms.c\nindex 95eb838954f..1b8758bae7d 100644\n--- a/src/gallium/drivers/v3d/v3d_uniforms.c\n+++ b/src/gallium/drivers/v3d/v3d_uniforms.c\n@@ -261,6 +261,7 @@ v3d_write_uniforms(struct v3d_context *v3d, struct v3d_job *job,\n                    struct v3d_compiled_shader *shader,\n                    enum pipe_shader_type stage)\n {\n+        struct v3d_device_info *devinfo = &v3d->screen->devinfo;\n         struct v3d_constbuf_stateobj *cb = &v3d->constbuf[stage];\n         struct v3d_texture_stateobj *texstate = &v3d->tex[stage];\n         struct v3d_uniform_list *uinfo = &shader->prog_data.base->uniforms;\n@@ -282,6 +283,9 @@ v3d_write_uniforms(struct v3d_context *v3d, struct v3d_job *job,\n         struct v3d_cl_out *uniforms =\n                 cl_start(&job->indirect);\n \n+        float clipper_xy_granularity =\n+                V3DV_X(devinfo, CLIPPER_XY_GRANULARITY);\n+\n         for (int i = 0; i < uinfo->count; i++) {\n                 uint32_t data = uinfo->data[i];\n \n@@ -293,10 +297,10 @@ v3d_write_uniforms(struct v3d_context *v3d, struct v3d_job *job,\n                         cl_aligned_u32(&uniforms, gallium_uniforms[data]);\n                         break;\n                 case QUNIFORM_VIEWPORT_X_SCALE:\n-                        cl_aligned_f(&uniforms, v3d->viewport.scale[0] * 256.0f);\n+                        cl_aligned_f(&uniforms, v3d->viewport.scale[0] * clipper_xy_granularity);\n                         break;\n                 case QUNIFORM_VIEWPORT_Y_SCALE:\n-                        cl_aligned_f(&uniforms, v3d->viewport.scale[1] * 256.0f);\n+                        cl_aligned_f(&uniforms, v3d->viewport.scale[1] * clipper_xy_granularity);\n                         break;\n \n                 case QUNIFORM_VIEWPORT_Z_OFFSET:\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0115-v3d-handle-new-texture-state-transfer-functions-in-v.patch",
    "content": "From aa6f70116d9e7be56cdb52b55d75419bf7209185 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Thu, 21 Oct 2021 23:21:02 +0200\nSubject: [PATCH 115/142] v3d: handle new texture state transfer functions in\n v71\n\n---\n src/gallium/drivers/v3d/v3dx_state.c | 9 +++------\n 1 file changed, 3 insertions(+), 6 deletions(-)\n\ndiff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c\nindex 3d3c4fb0f47..b5e572b13c5 100644\n--- a/src/gallium/drivers/v3d/v3dx_state.c\n+++ b/src/gallium/drivers/v3d/v3dx_state.c\n@@ -1009,12 +1009,12 @@ v3dX(create_texture_shader_state_bo)(struct v3d_context *v3d,\n                                                                    cso->u.buf.size);\n                 }\n \n+                bool is_srgb = util_format_is_srgb(cso->format);\n #if V3D_VERSION <= 42\n-                tex.srgb = util_format_is_srgb(cso->format);\n+                tex.srgb = is_srgb;\n #endif\n-\n #if V3D_VERSION >= 71\n-                unreachable(\"HW generation 71 not supported yet.\");\n+                tex.transfer_func = is_srgb ? TRANSFER_FUNC_SRGB : TRANSFER_FUNC_NONE;\n #endif\n \n #if V3D_VERSION >= 40\n@@ -1068,9 +1068,6 @@ v3dX(create_texture_shader_state_bo)(struct v3d_context *v3d,\n #if V3D_VERSION <= 42\n                         tex.srgb = false;\n #endif\n-#if V3D_VERSION >= 71\n-                        unreachable(\"HW generation 71 not supported yet.\");\n-#endif\n \n                 } else {\n                         tex.texture_type = v3d_get_tex_format(&screen->devinfo,\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0116-v3d-handle-new-TEXTURE_SHADER_STATE-v71-YCbCr-fields.patch",
    "content": "From aefc98b6aefc38caa6f6efd421db6d02c42596a7 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Fri, 22 Oct 2021 10:54:24 +0200\nSubject: [PATCH 116/142] v3d: handle new TEXTURE_SHADER_STATE v71 YCbCr fields\n\nThere are some new fields for YCbCr with pointers for the various\nplanes in multi-planar formats. These need to match the base address\npointer in the texture state, or the hardware will assume this is a\nmulti-planar texture.\n\nNotice we don't use an address type for these fields in the XML\ndescription. This is because the addresses are 64-bit aligned (even\nthough the PRM doesn't say it) which means the 6 LSB bits are\nimplicitly 0, but the fields are encoded before the 6th bit of their\nstarting byte, so we can't use the usual trick we do with address\ntypes where the first 6 bits in the byte are implicitly overwritten by\nother fields and we have to encode this manually as a uint field. This\nwould mean that if we had an actual BO we would also need to add it\nmanually to the job's list, but since we don't have one, we don't have\nto do anything about it.\n---\n src/gallium/drivers/v3d/v3dx_state.c | 17 +++++++++++++----\n 1 file changed, 13 insertions(+), 4 deletions(-)\n\ndiff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c\nindex b5e572b13c5..c08a072157b 100644\n--- a/src/gallium/drivers/v3d/v3dx_state.c\n+++ b/src/gallium/drivers/v3d/v3dx_state.c\n@@ -936,17 +936,26 @@ v3d_setup_texture_shader_state(struct V3DX(TEXTURE_SHADER_STATE) *tex,\n         }\n \n         tex->base_level = base_level;\n+\n #if V3D_VERSION >= 40\n         tex->max_level = last_level;\n         /* Note that we don't have a job to reference the texture's sBO\n          * at state create time, so any time this sampler view is used\n          * we need to add the texture to the job.\n          */\n-        tex->texture_base_pointer =\n-                cl_address(NULL,\n-                           rsc->bo->offset +\n-                           v3d_layer_offset(prsc, 0, first_layer));\n+        const uint32_t base_offset = rsc->bo->offset +\n+                v3d_layer_offset(prsc, 0, first_layer);\n+\n+        tex->texture_base_pointer = cl_address(NULL, base_offset);\n #endif\n+#if V3D_VERSION >= 71\n+        tex->chroma_offset_x = 1;\n+        tex->chroma_offset_y = 1;\n+        /* See comment in XML field definition for rationale of the shifts */\n+        tex->texture_base_pointer_cb = base_offset >> 6;\n+        tex->texture_base_pointer_cr = base_offset >> 6;\n+#endif\n+\n         tex->array_stride_64_byte_aligned = rsc->cube_map_stride / 64;\n \n         /* Since other platform devices may produce UIF images even\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0117-v3d-setup-render-pass-color-clears-for-any-format-bp.patch",
    "content": "From fcb3fc1ead4344da59c4b26a81878d53f8f4a291 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Fri, 22 Oct 2021 11:40:49 +0200\nSubject: [PATCH 117/142] v3d: setup render pass color clears for any format\n bpp in v71\n\n---\n src/gallium/drivers/v3d/v3dx_rcl.c | 18 ++++++++++++++++++\n 1 file changed, 18 insertions(+)\n\ndiff --git a/src/gallium/drivers/v3d/v3dx_rcl.c b/src/gallium/drivers/v3d/v3dx_rcl.c\nindex 4274be042bd..d3fbc9aff5d 100644\n--- a/src/gallium/drivers/v3d/v3dx_rcl.c\n+++ b/src/gallium/drivers/v3d/v3dx_rcl.c\n@@ -978,6 +978,24 @@ v3dX(emit_rcl)(struct v3d_job *job)\n \n                         base_addr += (job->tile_height * rt.stride) / 8;\n                 }\n+\n+                if (surf->internal_bpp >= V3D_INTERNAL_BPP_64) {\n+                        cl_emit(&job->rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART2, rt) {\n+                                rt.clear_color_mid_bits = /* 40 bits (32 + 8)  */\n+                                        ((uint64_t) job->clear_color[i][1]) |\n+                                        (((uint64_t) (job->clear_color[i][2] & 0xff)) << 32);\n+                                rt.render_target_number = i;\n+                        }\n+                }\n+\n+                if (surf->internal_bpp >= V3D_INTERNAL_BPP_128) {\n+                        cl_emit(&job->rcl, TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART3, rt) {\n+                                rt.clear_color_top_bits = /* 56 bits (24 + 32) */\n+                                        (((uint64_t) (job->clear_color[i][2] & 0xffffff00)) >> 8) |\n+                                        (((uint64_t) (job->clear_color[i][3])) << 24);\n+                                rt.render_target_number = i;\n+                        }\n+                }\n #endif\n         }\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0118-v3d-GFX-1461-does-not-affect-V3D-7.x.patch",
    "content": "From ceb088c05f351b40df14069bd6e0de777288ece4 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Fri, 22 Oct 2021 12:17:45 +0200\nSubject: [PATCH 118/142] v3d: GFX-1461 does not affect V3D 7.x\n\n---\n src/gallium/drivers/v3d/v3dx_draw.c | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c\nindex 4bff2ea6478..04cc3bc3ae1 100644\n--- a/src/gallium/drivers/v3d/v3dx_draw.c\n+++ b/src/gallium/drivers/v3d/v3dx_draw.c\n@@ -1593,9 +1593,10 @@ v3d_tlb_clear(struct v3d_job *job, unsigned buffers,\n         /* GFXH-1461: If we were to emit a load of just depth or just stencil,\n          * then the clear for the other may get lost.  We need to decide now\n          * if it would be possible to need to emit a load of just one after\n-         * we've set up our TLB clears.\n+         * we've set up our TLB clears. This issue is fixed since V3D 4.3.18.\n          */\n-        if (buffers & PIPE_CLEAR_DEPTHSTENCIL &&\n+        if (v3d->screen->devinfo.ver <= 42 &&\n+            buffers & PIPE_CLEAR_DEPTHSTENCIL &&\n             (buffers & PIPE_CLEAR_DEPTHSTENCIL) != PIPE_CLEAR_DEPTHSTENCIL &&\n             job->zsbuf &&\n             util_format_is_depth_and_stencil(job->zsbuf->texture->format)) {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0119-v3d-don-t-convert-floating-point-border-colors-in-v7.patch",
    "content": "From b44a8785c5436fb28b6734d3bac806d3a82c828d Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Fri, 22 Oct 2021 13:41:09 +0200\nSubject: [PATCH 119/142] v3d: don't convert floating point border colors in\n v71\n\nThe TMU does this for us now.\n---\n src/gallium/drivers/v3d/v3dx_state.c | 29 ++++++++++++++--------------\n 1 file changed, 15 insertions(+), 14 deletions(-)\n\ndiff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c\nindex c08a072157b..348a7bcf3da 100644\n--- a/src/gallium/drivers/v3d/v3dx_state.c\n+++ b/src/gallium/drivers/v3d/v3dx_state.c\n@@ -718,21 +718,22 @@ v3d_upload_sampler_state_variant(void *map,\n                                 break;\n                         }\n \n-                        if (variant >= V3D_SAMPLER_STATE_32) {\n-                                sampler.border_color_word_0 = border.ui[0];\n-                                sampler.border_color_word_1 = border.ui[1];\n-                                sampler.border_color_word_2 = border.ui[2];\n-                                sampler.border_color_word_3 = border.ui[3];\n-                        } else {\n-                                sampler.border_color_word_0 =\n-                                        _mesa_float_to_half(border.f[0]);\n-                                sampler.border_color_word_1 =\n-                                        _mesa_float_to_half(border.f[1]);\n-                                sampler.border_color_word_2 =\n-                                        _mesa_float_to_half(border.f[2]);\n-                                sampler.border_color_word_3 =\n-                                        _mesa_float_to_half(border.f[3]);\n+#if V3D_VERSION <= 42\n+                        /* The TMU in V3D 7.x always takes 32-bit floats and handles conversions\n+                         * for us. In V3D 4.x we need to manually convert floating point color\n+                         * values to the expected format.\n+                         */\n+                        if (variant < V3D_SAMPLER_STATE_32) {\n+                                border.ui[0] = _mesa_float_to_half(border.f[0]);\n+                                border.ui[1] = _mesa_float_to_half(border.f[1]);\n+                                border.ui[2] = _mesa_float_to_half(border.f[2]);\n+                                border.ui[3] = _mesa_float_to_half(border.f[3]);\n                         }\n+#endif\n+                        sampler.border_color_word_0 = border.ui[0];\n+                        sampler.border_color_word_1 = border.ui[1];\n+                        sampler.border_color_word_2 = border.ui[2];\n+                        sampler.border_color_word_3 = border.ui[3];\n                 }\n         }\n }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0120-v3d-handle-Z-clipping-in-v71.patch",
    "content": "From ecc1a5fa6b09a684a1e831c342121ec417f1a101 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Fri, 22 Oct 2021 14:26:29 +0200\nSubject: [PATCH 120/142] v3d: handle Z clipping in v71\n\n---\n src/gallium/drivers/v3d/v3dx_emit.c | 15 ++++++++++++++-\n 1 file changed, 14 insertions(+), 1 deletion(-)\n\ndiff --git a/src/gallium/drivers/v3d/v3dx_emit.c b/src/gallium/drivers/v3d/v3dx_emit.c\nindex 58c886bb29e..75751dc9ab6 100644\n--- a/src/gallium/drivers/v3d/v3dx_emit.c\n+++ b/src/gallium/drivers/v3d/v3dx_emit.c\n@@ -539,8 +539,21 @@ v3dX(emit_state)(struct pipe_context *pctx)\n                                 v3d_line_smoothing_enabled(v3d) ?\n                                 V3D_LINE_RASTERIZATION_PERP_END_CAPS :\n                                 V3D_LINE_RASTERIZATION_DIAMOND_EXIT;\n-                }\n \n+#if V3D_VERSION >= 71\n+                        /* The following follows the logic implemented at v3dv\n+                         * plus the definition of depth_clip_near/far and\n+                         * depth_clamp.\n+                         *\n+                         * Note: some extensions are not supported by v3d\n+                         * (like ARB_depth_clamp) that would affect this, but\n+                         * the values on rasterizer are taking that into\n+                         * account.\n+                         */\n+                        config.z_clipping_mode = v3d->rasterizer->base.depth_clip_near ||\n+                           v3d->rasterizer->base.depth_clip_far;\n+#endif\n+                }\n         }\n \n         if (v3d->dirty & V3D_DIRTY_RASTERIZER &&\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0121-v3d-add-support-for-TFU-blit-in-v71.patch",
    "content": "From ecac3d8441b75011446b566320194df17beba352 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Wed, 27 Oct 2021 02:03:10 +0200\nSubject: [PATCH 121/142] v3d: add support for TFU blit in v71\n\nTFU has changed on v71, specially on which registers to use, so that\nmeans that support code change across versions. So as part of this\ncommit TFU copying is moved to a v3dx file.\n---\n src/gallium/drivers/v3d/meson.build    |   1 +\n src/gallium/drivers/v3d/v3d_blit.c     | 164 +++-----------------\n src/gallium/drivers/v3d/v3dx_context.h |  10 ++\n src/gallium/drivers/v3d/v3dx_tfu.c     | 202 +++++++++++++++++++++++++\n 4 files changed, 232 insertions(+), 145 deletions(-)\n create mode 100644 src/gallium/drivers/v3d/v3dx_tfu.c\n\ndiff --git a/src/gallium/drivers/v3d/meson.build b/src/gallium/drivers/v3d/meson.build\nindex 526a131ae9b..b2e748573b7 100644\n--- a/src/gallium/drivers/v3d/meson.build\n+++ b/src/gallium/drivers/v3d/meson.build\n@@ -49,6 +49,7 @@ files_per_version = files(\n   'v3dx_job.c',\n   'v3dx_rcl.c',\n   'v3dx_state.c',\n+  'v3dx_tfu.c',\n )\n \n v3d_args = ['-DV3D_BUILD_NEON']\ndiff --git a/src/gallium/drivers/v3d/v3d_blit.c b/src/gallium/drivers/v3d/v3d_blit.c\nindex 0260bdde6d1..96179f654a4 100644\n--- a/src/gallium/drivers/v3d/v3d_blit.c\n+++ b/src/gallium/drivers/v3d/v3d_blit.c\n@@ -210,140 +210,6 @@ v3d_stencil_blit(struct pipe_context *ctx, struct pipe_blit_info *info)\n         info->mask &= ~PIPE_MASK_S;\n }\n \n-static bool\n-v3d_tfu(struct pipe_context *pctx,\n-        struct pipe_resource *pdst,\n-        struct pipe_resource *psrc,\n-        unsigned int src_level,\n-        unsigned int base_level,\n-        unsigned int last_level,\n-        unsigned int src_layer,\n-        unsigned int dst_layer,\n-        bool for_mipmap)\n-{\n-        struct v3d_context *v3d = v3d_context(pctx);\n-        struct v3d_screen *screen = v3d->screen;\n-        struct v3d_resource *src = v3d_resource(psrc);\n-        struct v3d_resource *dst = v3d_resource(pdst);\n-        struct v3d_resource_slice *src_base_slice = &src->slices[src_level];\n-        struct v3d_resource_slice *dst_base_slice = &dst->slices[base_level];\n-        int msaa_scale = pdst->nr_samples > 1 ? 2 : 1;\n-        int width = u_minify(pdst->width0, base_level) * msaa_scale;\n-        int height = u_minify(pdst->height0, base_level) * msaa_scale;\n-        enum pipe_format pformat;\n-\n-        if (psrc->format != pdst->format)\n-                return false;\n-        if (psrc->nr_samples != pdst->nr_samples)\n-                return false;\n-\n-        /* Can't write to raster. */\n-        if (dst_base_slice->tiling == V3D_TILING_RASTER)\n-                return false;\n-\n-        /* When using TFU for blit, we are doing exact copies (both input and\n-         * output format must be the same, no scaling, etc), so there is no\n-         * pixel format conversions. Thus we can rewrite the format to use one\n-         * that is TFU compatible based on its texel size.\n-         */\n-        if (for_mipmap) {\n-                pformat = pdst->format;\n-        } else {\n-                switch (dst->cpp) {\n-                case 16: pformat = PIPE_FORMAT_R32G32B32A32_FLOAT;   break;\n-                case 8:  pformat = PIPE_FORMAT_R16G16B16A16_FLOAT;   break;\n-                case 4:  pformat = PIPE_FORMAT_R32_FLOAT;            break;\n-                case 2:  pformat = PIPE_FORMAT_R16_FLOAT;            break;\n-                case 1:  pformat = PIPE_FORMAT_R8_UNORM;             break;\n-                default: unreachable(\"unsupported format bit-size\"); break;\n-                };\n-        }\n-\n-        uint32_t tex_format = v3d_get_tex_format(&screen->devinfo, pformat);\n-        struct v3d_device_info *devinfo = &screen->devinfo;\n-\n-        if (!v3d_X(devinfo, tfu_supports_tex_format)(tex_format, for_mipmap)) {\n-                assert(for_mipmap);\n-                return false;\n-        }\n-\n-        v3d_flush_jobs_writing_resource(v3d, psrc, V3D_FLUSH_DEFAULT, false);\n-        v3d_flush_jobs_reading_resource(v3d, pdst, V3D_FLUSH_DEFAULT, false);\n-\n-        struct drm_v3d_submit_tfu tfu = {\n-                .ios = (height << 16) | width,\n-                .bo_handles = {\n-                        dst->bo->handle,\n-                        src != dst ? src->bo->handle : 0\n-                },\n-                .in_sync = v3d->out_sync,\n-                .out_sync = v3d->out_sync,\n-        };\n-        uint32_t src_offset = (src->bo->offset +\n-                               v3d_layer_offset(psrc, src_level, src_layer));\n-        tfu.iia |= src_offset;\n-        if (src_base_slice->tiling == V3D_TILING_RASTER) {\n-                tfu.icfg |= (V3D33_TFU_ICFG_FORMAT_RASTER <<\n-                             V3D33_TFU_ICFG_FORMAT_SHIFT);\n-        } else {\n-                tfu.icfg |= ((V3D33_TFU_ICFG_FORMAT_LINEARTILE +\n-                              (src_base_slice->tiling - V3D_TILING_LINEARTILE)) <<\n-                             V3D33_TFU_ICFG_FORMAT_SHIFT);\n-        }\n-\n-        uint32_t dst_offset = (dst->bo->offset +\n-                               v3d_layer_offset(pdst, base_level, dst_layer));\n-        tfu.ioa |= dst_offset;\n-        if (last_level != base_level)\n-                tfu.ioa |= V3D33_TFU_IOA_DIMTW;\n-        tfu.ioa |= ((V3D33_TFU_IOA_FORMAT_LINEARTILE +\n-                     (dst_base_slice->tiling - V3D_TILING_LINEARTILE)) <<\n-                    V3D33_TFU_IOA_FORMAT_SHIFT);\n-\n-        tfu.icfg |= tex_format << V3D33_TFU_ICFG_TTYPE_SHIFT;\n-        tfu.icfg |= (last_level - base_level) << V3D33_TFU_ICFG_NUMMM_SHIFT;\n-\n-        switch (src_base_slice->tiling) {\n-        case V3D_TILING_UIF_NO_XOR:\n-        case V3D_TILING_UIF_XOR:\n-                tfu.iis |= (src_base_slice->padded_height /\n-                            (2 * v3d_utile_height(src->cpp)));\n-                break;\n-        case V3D_TILING_RASTER:\n-                tfu.iis |= src_base_slice->stride / src->cpp;\n-                break;\n-        case V3D_TILING_LINEARTILE:\n-        case V3D_TILING_UBLINEAR_1_COLUMN:\n-        case V3D_TILING_UBLINEAR_2_COLUMN:\n-                break;\n-       }\n-\n-        /* If we're writing level 0 (!IOA_DIMTW), then we need to supply the\n-         * OPAD field for the destination (how many extra UIF blocks beyond\n-         * those necessary to cover the height).  When filling mipmaps, the\n-         * miplevel 1+ tiling state is inferred.\n-         */\n-        if (dst_base_slice->tiling == V3D_TILING_UIF_NO_XOR ||\n-            dst_base_slice->tiling == V3D_TILING_UIF_XOR) {\n-                int uif_block_h = 2 * v3d_utile_height(dst->cpp);\n-                int implicit_padded_height = align(height, uif_block_h);\n-\n-                tfu.icfg |= (((dst_base_slice->padded_height -\n-                               implicit_padded_height) / uif_block_h) <<\n-                             V3D33_TFU_ICFG_OPAD_SHIFT);\n-        }\n-\n-        int ret = v3d_ioctl(screen->fd, DRM_IOCTL_V3D_SUBMIT_TFU, &tfu);\n-        if (ret != 0) {\n-                fprintf(stderr, \"Failed to submit TFU job: %d\\n\", ret);\n-                return false;\n-        }\n-\n-        dst->writes++;\n-\n-        return true;\n-}\n-\n bool\n v3d_generate_mipmap(struct pipe_context *pctx,\n                     struct pipe_resource *prsc,\n@@ -362,12 +228,16 @@ v3d_generate_mipmap(struct pipe_context *pctx,\n         if (first_layer != last_layer)\n                 return false;\n \n-        return v3d_tfu(pctx,\n-                       prsc, prsc,\n-                       base_level,\n-                       base_level, last_level,\n-                       first_layer, first_layer,\n-                       true);\n+        struct v3d_context *v3d = v3d_context(pctx);\n+        struct v3d_screen *screen = v3d->screen;\n+        struct v3d_device_info *devinfo = &screen->devinfo;\n+\n+        return v3d_X(devinfo, tfu)(pctx,\n+                                   prsc, prsc,\n+                                   base_level,\n+                                   base_level, last_level,\n+                                   first_layer, first_layer,\n+                                   true);\n }\n \n static void\n@@ -396,11 +266,15 @@ v3d_tfu_blit(struct pipe_context *pctx, struct pipe_blit_info *info)\n         if (info->dst.format != info->src.format)\n                 return;\n \n-        if (v3d_tfu(pctx, info->dst.resource, info->src.resource,\n-                    info->src.level,\n-                    info->dst.level, info->dst.level,\n-                    info->src.box.z, info->dst.box.z,\n-                    false)) {\n+        struct v3d_context *v3d = v3d_context(pctx);\n+        struct v3d_screen *screen = v3d->screen;\n+        struct v3d_device_info *devinfo = &screen->devinfo;\n+\n+        if (v3d_X(devinfo, tfu)(pctx, info->dst.resource, info->src.resource,\n+                                info->src.level,\n+                                info->dst.level, info->dst.level,\n+                                info->src.box.z, info->dst.box.z,\n+                                false)) {\n                 info->mask &= ~PIPE_MASK_RGBA;\n         }\n }\ndiff --git a/src/gallium/drivers/v3d/v3dx_context.h b/src/gallium/drivers/v3d/v3dx_context.h\nindex 03d7c244ea2..e0a5cbfb2f3 100644\n--- a/src/gallium/drivers/v3d/v3dx_context.h\n+++ b/src/gallium/drivers/v3d/v3dx_context.h\n@@ -51,3 +51,13 @@ void v3dX(get_internal_type_bpp_for_output_format)(uint32_t format,\n  */\n bool v3dX(tfu_supports_tex_format)(uint32_t tex_format,\n                                    bool for_mipmap);\n+\n+bool v3dX(tfu)(struct pipe_context *pctx,\n+               struct pipe_resource *pdst,\n+               struct pipe_resource *psrc,\n+               unsigned int src_level,\n+               unsigned int base_level,\n+               unsigned int last_level,\n+               unsigned int src_layer,\n+               unsigned int dst_layer,\n+               bool for_mipmap);\ndiff --git a/src/gallium/drivers/v3d/v3dx_tfu.c b/src/gallium/drivers/v3d/v3dx_tfu.c\nnew file mode 100644\nindex 00000000000..d6b51390a11\n--- /dev/null\n+++ b/src/gallium/drivers/v3d/v3dx_tfu.c\n@@ -0,0 +1,202 @@\n+/*\n+ * Copyright © 2021 Broadcom\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a\n+ * copy of this software and associated documentation files (the \"Software\"),\n+ * to deal in the Software without restriction, including without limitation\n+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n+ * and/or sell copies of the Software, and to permit persons to whom the\n+ * Software is furnished to do so, subject to the following conditions:\n+ *\n+ * The above copyright notice and this permission notice (including the next\n+ * paragraph) shall be included in all copies or substantial portions of the\n+ * Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL\n+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n+ * IN THE SOFTWARE.\n+ */\n+\n+#include \"v3d_context.h\"\n+#include \"broadcom/common/v3d_tfu.h\"\n+\n+bool\n+v3dX(tfu)(struct pipe_context *pctx,\n+          struct pipe_resource *pdst,\n+          struct pipe_resource *psrc,\n+          unsigned int src_level,\n+          unsigned int base_level,\n+          unsigned int last_level,\n+          unsigned int src_layer,\n+          unsigned int dst_layer,\n+          bool for_mipmap)\n+{\n+        struct v3d_context *v3d = v3d_context(pctx);\n+        struct v3d_screen *screen = v3d->screen;\n+        struct v3d_resource *src = v3d_resource(psrc);\n+        struct v3d_resource *dst = v3d_resource(pdst);\n+        struct v3d_resource_slice *src_base_slice = &src->slices[src_level];\n+        struct v3d_resource_slice *dst_base_slice = &dst->slices[base_level];\n+        int msaa_scale = pdst->nr_samples > 1 ? 2 : 1;\n+        int width = u_minify(pdst->width0, base_level) * msaa_scale;\n+        int height = u_minify(pdst->height0, base_level) * msaa_scale;\n+        enum pipe_format pformat;\n+\n+        if (psrc->format != pdst->format)\n+                return false;\n+        if (psrc->nr_samples != pdst->nr_samples)\n+                return false;\n+\n+        if (pdst->target != PIPE_TEXTURE_2D || psrc->target != PIPE_TEXTURE_2D)\n+                return false;\n+\n+        /* Can't write to raster. */\n+        if (dst_base_slice->tiling == V3D_TILING_RASTER)\n+                return false;\n+\n+        /* When using TFU for blit, we are doing exact copies (both input and\n+         * output format must be the same, no scaling, etc), so there is no\n+         * pixel format conversions. Thus we can rewrite the format to use one\n+         * that is TFU compatible based on its texel size.\n+         */\n+        if (for_mipmap) {\n+                pformat = pdst->format;\n+        } else {\n+                switch (dst->cpp) {\n+                case 16: pformat = PIPE_FORMAT_R32G32B32A32_FLOAT;   break;\n+                case 8:  pformat = PIPE_FORMAT_R16G16B16A16_FLOAT;   break;\n+                case 4:  pformat = PIPE_FORMAT_R32_FLOAT;            break;\n+                case 2:  pformat = PIPE_FORMAT_R16_FLOAT;            break;\n+                case 1:  pformat = PIPE_FORMAT_R8_UNORM;             break;\n+                default: unreachable(\"unsupported format bit-size\"); break;\n+                };\n+        }\n+\n+        uint32_t tex_format = v3d_get_tex_format(&screen->devinfo, pformat);\n+\n+        if (!v3dX(tfu_supports_tex_format)(tex_format, for_mipmap)) {\n+                assert(for_mipmap);\n+                return false;\n+        }\n+\n+        v3d_flush_jobs_writing_resource(v3d, psrc, V3D_FLUSH_DEFAULT, false);\n+        v3d_flush_jobs_reading_resource(v3d, pdst, V3D_FLUSH_DEFAULT, false);\n+\n+        struct drm_v3d_submit_tfu tfu = {\n+                .ios = (height << 16) | width,\n+                .bo_handles = {\n+                        dst->bo->handle,\n+                        src != dst ? src->bo->handle : 0\n+                },\n+                .in_sync = v3d->out_sync,\n+                .out_sync = v3d->out_sync,\n+        };\n+        uint32_t src_offset = (src->bo->offset +\n+                               v3d_layer_offset(psrc, src_level, src_layer));\n+        tfu.iia |= src_offset;\n+\n+        uint32_t dst_offset = (dst->bo->offset +\n+                               v3d_layer_offset(pdst, base_level, dst_layer));\n+        tfu.ioa |= dst_offset;\n+\n+        switch (src_base_slice->tiling) {\n+        case V3D_TILING_UIF_NO_XOR:\n+        case V3D_TILING_UIF_XOR:\n+                tfu.iis |= (src_base_slice->padded_height /\n+                            (2 * v3d_utile_height(src->cpp)));\n+                break;\n+        case V3D_TILING_RASTER:\n+                tfu.iis |= src_base_slice->stride / src->cpp;\n+                break;\n+        case V3D_TILING_LINEARTILE:\n+        case V3D_TILING_UBLINEAR_1_COLUMN:\n+        case V3D_TILING_UBLINEAR_2_COLUMN:\n+                break;\n+       }\n+\n+#if V3D_VERSION <= 42\n+        if (src_base_slice->tiling == V3D_TILING_RASTER) {\n+                tfu.icfg |= (V3D33_TFU_ICFG_FORMAT_RASTER <<\n+                             V3D33_TFU_ICFG_FORMAT_SHIFT);\n+        } else {\n+                tfu.icfg |= ((V3D33_TFU_ICFG_FORMAT_LINEARTILE +\n+                              (src_base_slice->tiling - V3D_TILING_LINEARTILE)) <<\n+                             V3D33_TFU_ICFG_FORMAT_SHIFT);\n+        }\n+        tfu.icfg |= tex_format << V3D33_TFU_ICFG_TTYPE_SHIFT;\n+\n+        if (last_level != base_level)\n+                tfu.ioa |= V3D33_TFU_IOA_DIMTW;\n+\n+        tfu.ioa |= ((V3D33_TFU_IOA_FORMAT_LINEARTILE +\n+                     (dst_base_slice->tiling - V3D_TILING_LINEARTILE)) <<\n+                    V3D33_TFU_IOA_FORMAT_SHIFT);\n+\n+        tfu.icfg |= (last_level - base_level) << V3D33_TFU_ICFG_NUMMM_SHIFT;\n+\n+        /* If we're writing level 0 (!IOA_DIMTW), then we need to supply the\n+         * OPAD field for the destination (how many extra UIF blocks beyond\n+         * those necessary to cover the height).  When filling mipmaps, the\n+         * miplevel 1+ tiling state is inferred.\n+         */\n+        if (dst_base_slice->tiling == V3D_TILING_UIF_NO_XOR ||\n+            dst_base_slice->tiling == V3D_TILING_UIF_XOR) {\n+                int uif_block_h = 2 * v3d_utile_height(dst->cpp);\n+                int implicit_padded_height = align(height, uif_block_h);\n+\n+                tfu.icfg |= (((dst_base_slice->padded_height -\n+                               implicit_padded_height) / uif_block_h) <<\n+                             V3D33_TFU_ICFG_OPAD_SHIFT);\n+        }\n+#endif /* V3D_VERSION <= 42 */\n+\n+#if V3D_VERSION >= 71\n+        if (src_base_slice->tiling == V3D_TILING_RASTER) {\n+                tfu.icfg = V3D71_TFU_ICFG_FORMAT_RASTER << V3D71_TFU_ICFG_IFORMAT_SHIFT;\n+        } else {\n+                tfu.icfg = (V3D71_TFU_ICFG_FORMAT_LINEARTILE +\n+                            (src_base_slice->tiling - V3D_TILING_LINEARTILE)) <<\n+                        V3D71_TFU_ICFG_IFORMAT_SHIFT;\n+        }\n+        tfu.icfg |= tex_format << V3D71_TFU_ICFG_OTYPE_SHIFT;\n+\n+        if (last_level != base_level)\n+                tfu.v71.ioc |= V3D71_TFU_IOC_DIMTW;\n+\n+        tfu.v71.ioc |= ((V3D71_TFU_IOC_FORMAT_LINEARTILE +\n+                         (dst_base_slice->tiling - V3D_TILING_LINEARTILE)) <<\n+                        V3D71_TFU_IOC_FORMAT_SHIFT);\n+\n+        switch (dst_base_slice->tiling) {\n+        case V3D_TILING_UIF_NO_XOR:\n+        case V3D_TILING_UIF_XOR:\n+                tfu.v71.ioc |=\n+                        (dst_base_slice->padded_height / (2 * v3d_utile_height(dst->cpp))) <<\n+                        V3D71_TFU_IOC_STRIDE_SHIFT;\n+                break;\n+        case V3D_TILING_RASTER:\n+                tfu.v71.ioc |= (dst_base_slice->padded_height / dst->cpp) <<\n+                        V3D71_TFU_IOC_STRIDE_SHIFT;\n+                break;\n+        default:\n+                break;\n+        }\n+\n+        tfu.v71.ioc |= (last_level - base_level) << V3D71_TFU_IOC_NUMMM_SHIFT;\n+#endif /* V3D_VERSION >= 71*/\n+\n+        int ret = v3d_ioctl(screen->fd, DRM_IOCTL_V3D_SUBMIT_TFU, &tfu);\n+        if (ret != 0) {\n+                fprintf(stderr, \"Failed to submit TFU job: %d\\n\", ret);\n+                return false;\n+        }\n+\n+        dst->writes++;\n+\n+        return true;\n+}\n+\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0122-v3d-v3dv-fix-texture-state-array-stride-packing-for-.patch",
    "content": "From ed7e118a6cc0c9bba9f02929e98bc51252331950 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 16 May 2023 00:28:27 +0200\nSubject: [PATCH 122/142] v3d/v3dv: fix texture state array stride packing for\n V3D 7.1.5\n\n---\n src/broadcom/vulkan/v3dvx_image.c    |  7 +++++++\n src/gallium/drivers/v3d/v3dx_state.c | 20 +++++++++++++++-----\n 2 files changed, 22 insertions(+), 5 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_image.c b/src/broadcom/vulkan/v3dvx_image.c\nindex 437d4588c7e..ae6eaa88d0c 100644\n--- a/src/broadcom/vulkan/v3dvx_image.c\n+++ b/src/broadcom/vulkan/v3dvx_image.c\n@@ -118,6 +118,13 @@ pack_texture_shader_state_helper(struct v3dv_device *device,\n #endif\n #if V3D_VERSION >= 71\n          tex.transfer_func = is_srgb ? TRANSFER_FUNC_SRGB : TRANSFER_FUNC_NONE;\n+\n+         /* V3D 7.1.5 has array stride starting one bit later than previous\n+          * V3D versions to make room for the new RB swap bit, but we don't\n+          * handle that in the CLE parser.\n+          */\n+         if (device->devinfo.rev >= 5)\n+            tex.array_stride_64_byte_aligned <<= 1;\n #endif\n \n          /* At this point we don't have the job. That's the reason the first\ndiff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c\nindex 348a7bcf3da..88e57cd072b 100644\n--- a/src/gallium/drivers/v3d/v3dx_state.c\n+++ b/src/gallium/drivers/v3d/v3dx_state.c\n@@ -889,7 +889,8 @@ v3d_setup_texture_shader_state_from_buffer(struct V3DX(TEXTURE_SHADER_STATE) *te\n }\n \n static void\n-v3d_setup_texture_shader_state(struct V3DX(TEXTURE_SHADER_STATE) *tex,\n+v3d_setup_texture_shader_state(const struct v3d_device_info *devinfo,\n+                               struct V3DX(TEXTURE_SHADER_STATE) *tex,\n                                struct pipe_resource *prsc,\n                                int base_level, int last_level,\n                                int first_layer, int last_layer,\n@@ -949,15 +950,22 @@ v3d_setup_texture_shader_state(struct V3DX(TEXTURE_SHADER_STATE) *tex,\n \n         tex->texture_base_pointer = cl_address(NULL, base_offset);\n #endif\n+\n+        tex->array_stride_64_byte_aligned = rsc->cube_map_stride / 64;\n+\n #if V3D_VERSION >= 71\n         tex->chroma_offset_x = 1;\n         tex->chroma_offset_y = 1;\n         /* See comment in XML field definition for rationale of the shifts */\n         tex->texture_base_pointer_cb = base_offset >> 6;\n         tex->texture_base_pointer_cr = base_offset >> 6;\n-#endif\n \n-        tex->array_stride_64_byte_aligned = rsc->cube_map_stride / 64;\n+        /* V3D 7.1.5 has array stride start at bit 33 instead of bit 32 to\n+         * make room for the RB swap bit.\n+         */\n+        if (devinfo->rev >= 5)\n+                tex->array_stride_64_byte_aligned <<= 1;\n+#endif\n \n         /* Since other platform devices may produce UIF images even\n          * when they're not big enough for V3D to assume they're UIF,\n@@ -1006,7 +1014,8 @@ v3dX(create_texture_shader_state_bo)(struct v3d_context *v3d,\n \n         v3dx_pack(map, TEXTURE_SHADER_STATE, tex) {\n                 if (prsc->target != PIPE_BUFFER) {\n-                        v3d_setup_texture_shader_state(&tex, prsc,\n+                        v3d_setup_texture_shader_state(&v3d->screen->devinfo,\n+                                                       &tex, prsc,\n                                                        cso->u.tex.first_level,\n                                                        cso->u.tex.last_level,\n                                                        cso->u.tex.first_layer,\n@@ -1442,7 +1451,8 @@ v3d_create_image_view_texture_shader_state(struct v3d_context *v3d,\n \n         v3dx_pack(map, TEXTURE_SHADER_STATE, tex) {\n                 if (prsc->target != PIPE_BUFFER) {\n-                        v3d_setup_texture_shader_state(&tex, prsc,\n+                        v3d_setup_texture_shader_state(&v3d->screen->devinfo,\n+                                                       &tex, prsc,\n                                                        iview->base.u.tex.level,\n                                                        iview->base.u.tex.level,\n                                                        iview->base.u.tex.first_layer,\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0123-v3d-v3dv-support-up-to-8-render-targets-in-v7.1.patch",
    "content": "From 48893b056a07b7eda4fe3dea7f068c403981b621 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Fri, 12 Nov 2021 10:35:59 +0100\nSubject: [PATCH 123/142] v3d,v3dv: support up to 8 render targets in v7.1+\n\n---\n src/broadcom/common/v3d_limits.h       |  3 +-\n src/broadcom/common/v3d_util.c         | 49 ++++++++++++++++++++++++--\n src/broadcom/common/v3d_util.h         |  6 ++--\n src/broadcom/compiler/nir_to_vir.c     | 10 +++---\n src/broadcom/vulkan/v3dv_cmd_buffer.c  |  5 +--\n src/broadcom/vulkan/v3dv_device.c      |  6 ++--\n src/broadcom/vulkan/v3dv_limits.h      |  2 --\n src/broadcom/vulkan/v3dv_meta_clear.c  |  8 +++--\n src/broadcom/vulkan/v3dv_pass.c        |  6 ++--\n src/broadcom/vulkan/v3dv_pipeline.c    |  4 ++-\n src/broadcom/vulkan/v3dvx_cmd_buffer.c |  7 ++--\n src/broadcom/vulkan/v3dvx_device.c     |  1 -\n src/gallium/drivers/v3d/v3d_blit.c     |  2 +-\n src/gallium/drivers/v3d/v3d_context.c  |  5 +--\n src/gallium/drivers/v3d/v3d_context.h  |  3 +-\n src/gallium/drivers/v3d/v3d_job.c      |  6 ++--\n src/gallium/drivers/v3d/v3d_screen.c   |  3 +-\n src/gallium/drivers/v3d/v3dx_emit.c    | 14 +++++---\n src/gallium/drivers/v3d/v3dx_state.c   |  5 +--\n 19 files changed, 104 insertions(+), 41 deletions(-)\n\ndiff --git a/src/broadcom/common/v3d_limits.h b/src/broadcom/common/v3d_limits.h\nindex 46f38bd7484..354c8784914 100644\n--- a/src/broadcom/common/v3d_limits.h\n+++ b/src/broadcom/common/v3d_limits.h\n@@ -42,7 +42,8 @@\n \n #define V3D_MAX_SAMPLES 4\n \n-#define V3D_MAX_DRAW_BUFFERS 4\n+#define V3D_MAX_DRAW_BUFFERS 8\n+#define V3D_MAX_RENDER_TARGETS(ver) (ver < 71 ? 4 : 8)\n \n #define V3D_MAX_POINT_SIZE 512.0f\n #define V3D_MAX_LINE_WIDTH 32\ndiff --git a/src/broadcom/common/v3d_util.c b/src/broadcom/common/v3d_util.c\nindex 26f5c6b336f..209a5eceaa1 100644\n--- a/src/broadcom/common/v3d_util.c\n+++ b/src/broadcom/common/v3d_util.c\n@@ -88,8 +88,10 @@ v3d_csd_choose_workgroups_per_supergroup(struct v3d_device_info *devinfo,\n }\n \n void\n-v3d_choose_tile_size(uint32_t color_attachment_count, uint32_t max_color_bpp,\n-                     bool msaa, bool double_buffer,\n+v3d_choose_tile_size(const struct v3d_device_info *devinfo,\n+                     uint32_t color_attachment_count,\n+                     uint32_t max_color_bpp, bool msaa,\n+                     bool double_buffer,\n                      uint32_t *width, uint32_t *height)\n {\n    static const uint8_t tile_sizes[] = {\n@@ -103,7 +105,9 @@ v3d_choose_tile_size(uint32_t color_attachment_count, uint32_t max_color_bpp,\n    };\n \n    uint32_t idx = 0;\n-   if (color_attachment_count > 2)\n+   if (color_attachment_count > 4)\n+      idx += 3;\n+   else if (color_attachment_count > 2)\n       idx += 2;\n    else if (color_attachment_count > 1)\n       idx += 1;\n@@ -117,6 +121,45 @@ v3d_choose_tile_size(uint32_t color_attachment_count, uint32_t max_color_bpp,\n \n    idx += max_color_bpp;\n \n+   if (devinfo->ver >= 71) {\n+      /* In V3D 7.x the TLB has an auxiliary buffer of 8KB that will be\n+       * automatically used for depth instead of the main 16KB depth TLB buffer\n+       * when the depth tile fits in the auxiliary buffer, allowing the hardware\n+       * to allocate the 16KB from the main depth TLB to the color TLB. If\n+       * we can do that, then we are effectively doubling the memory we have\n+       * for color and we can increase our tile dimensions by a factor of 2\n+       * (reduce idx by 1).\n+       *\n+       * If we have computed a tile size that would be smaller than the minimum\n+       * of 8x8, then it is certain that depth will fit in the aux depth TLB\n+       * (even in MSAA mode).\n+       *\n+       * Otherwise, we need check if we can fit depth in the aux TLB buffer\n+       * using a larger tile size.\n+       *\n+       * FIXME: the docs state that depth TLB memory can be used for color\n+       * if depth testing is not used by setting the 'depth disable' bit in the\n+       * rendering configuration. However, this comes with a requirement that\n+       * occlussion queries must not be active. We need to clarify if this means\n+       * active at the point at which we emit a tile rendering configuration\n+       * item, meaning that the we have a query spanning a full render pass\n+       * (this is something we can tell before we emit the rendering\n+       * configuration item) or active in the subpass for which we are enabling\n+       * the bit (which we can't tell until later, when we record commands for\n+       * the subpass). If it is the latter, then we cannot use this feature.\n+       */\n+      if (idx >= ARRAY_SIZE(tile_sizes) / 2) {\n+         idx--;\n+      } else if (idx > 0) {\n+         /* Depth is always 32bpp (4x32bpp for 4x MSAA) */\n+         uint32_t depth_bpp = !msaa ? 4 : 16;\n+         uint32_t tile_w = tile_sizes[(idx - 1) * 2];\n+         uint32_t tile_h = tile_sizes[(idx - 1) * 2 + 1];\n+         if (tile_w * tile_h * depth_bpp <= 8192)\n+            idx--;\n+      }\n+   }\n+\n    assert(idx < ARRAY_SIZE(tile_sizes) / 2);\n \n    *width = tile_sizes[idx * 2];\ndiff --git a/src/broadcom/common/v3d_util.h b/src/broadcom/common/v3d_util.h\nindex 864fc949ffa..5a7e244a0a5 100644\n--- a/src/broadcom/common/v3d_util.h\n+++ b/src/broadcom/common/v3d_util.h\n@@ -37,8 +37,10 @@ v3d_csd_choose_workgroups_per_supergroup(struct v3d_device_info *devinfo,\n                                          uint32_t wg_size);\n \n void\n-v3d_choose_tile_size(uint32_t color_attachment_count, uint32_t max_color_bpp,\n-                     bool msaa, bool double_buffer,\n+v3d_choose_tile_size(const struct v3d_device_info *devinfo,\n+                     uint32_t color_attachment_count,\n+                     uint32_t max_color_bpp, bool msaa,\n+                     bool double_buffer,\n                      uint32_t *width, uint32_t *height);\n \n uint32_t\ndiff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c\nindex a8cf02dd386..531e85a1212 100644\n--- a/src/broadcom/compiler/nir_to_vir.c\n+++ b/src/broadcom/compiler/nir_to_vir.c\n@@ -2483,15 +2483,17 @@ ntq_setup_outputs(struct v3d_compile *c)\n \n                 switch (var->data.location) {\n                 case FRAG_RESULT_COLOR:\n-                        c->output_color_var[0] = var;\n-                        c->output_color_var[1] = var;\n-                        c->output_color_var[2] = var;\n-                        c->output_color_var[3] = var;\n+                        for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++)\n+                                c->output_color_var[i] = var;\n                         break;\n                 case FRAG_RESULT_DATA0:\n                 case FRAG_RESULT_DATA1:\n                 case FRAG_RESULT_DATA2:\n                 case FRAG_RESULT_DATA3:\n+                case FRAG_RESULT_DATA4:\n+                case FRAG_RESULT_DATA5:\n+                case FRAG_RESULT_DATA6:\n+                case FRAG_RESULT_DATA7:\n                         c->output_color_var[var->data.location -\n                                             FRAG_RESULT_DATA0] = var;\n                         break;\ndiff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c\nindex bda0a614523..11d161b19b7 100644\n--- a/src/broadcom/vulkan/v3dv_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c\n@@ -365,7 +365,8 @@ job_compute_frame_tiling(struct v3dv_job *job,\n    /* Double-buffer is incompatible with MSAA */\n    assert(!tiling->msaa || !tiling->double_buffer);\n \n-   v3d_choose_tile_size(render_target_count, max_internal_bpp,\n+   v3d_choose_tile_size(&job->device->devinfo,\n+                        render_target_count, max_internal_bpp,\n                         tiling->msaa, tiling->double_buffer,\n                         &tiling->tile_width, &tiling->tile_height);\n \n@@ -1374,7 +1375,7 @@ cmd_buffer_emit_subpass_clears(struct v3dv_cmd_buffer *cmd_buffer)\n    }\n \n    uint32_t att_count = 0;\n-   VkClearAttachment atts[V3D_MAX_DRAW_BUFFERS + 1]; /* 4 color + D/S */\n+   VkClearAttachment atts[V3D_MAX_DRAW_BUFFERS + 1]; /* +1 for D/S */\n \n    /* We only need to emit subpass clears as draw calls for color attachments\n     * if the render area is not aligned to tile boundaries.\ndiff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c\nindex 01e2dd7ac2d..19e58542414 100644\n--- a/src/broadcom/vulkan/v3dv_device.c\n+++ b/src/broadcom/vulkan/v3dv_device.c\n@@ -1366,6 +1366,8 @@ v3dv_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,\n    const VkSampleCountFlags supported_sample_counts =\n       VK_SAMPLE_COUNT_1_BIT | VK_SAMPLE_COUNT_4_BIT;\n \n+   const uint8_t max_rts = V3D_MAX_RENDER_TARGETS(pdevice->devinfo.ver);\n+\n    struct timespec clock_res;\n    clock_getres(CLOCK_MONOTONIC, &clock_res);\n    const float timestamp_period =\n@@ -1436,7 +1438,7 @@ v3dv_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,\n       .maxFragmentInputComponents               = max_varying_components,\n       .maxFragmentOutputAttachments             = 4,\n       .maxFragmentDualSrcAttachments            = 0,\n-      .maxFragmentCombinedOutputResources       = MAX_RENDER_TARGETS +\n+      .maxFragmentCombinedOutputResources       = max_rts +\n                                                   MAX_STORAGE_BUFFERS +\n                                                   MAX_STORAGE_IMAGES,\n \n@@ -1476,7 +1478,7 @@ v3dv_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,\n       .framebufferDepthSampleCounts             = supported_sample_counts,\n       .framebufferStencilSampleCounts           = supported_sample_counts,\n       .framebufferNoAttachmentsSampleCounts     = supported_sample_counts,\n-      .maxColorAttachments                      = MAX_RENDER_TARGETS,\n+      .maxColorAttachments                      = max_rts,\n       .sampledImageColorSampleCounts            = supported_sample_counts,\n       .sampledImageIntegerSampleCounts          = supported_sample_counts,\n       .sampledImageDepthSampleCounts            = supported_sample_counts,\ndiff --git a/src/broadcom/vulkan/v3dv_limits.h b/src/broadcom/vulkan/v3dv_limits.h\nindex 9cda9f0d6d2..8ac99724105 100644\n--- a/src/broadcom/vulkan/v3dv_limits.h\n+++ b/src/broadcom/vulkan/v3dv_limits.h\n@@ -50,8 +50,6 @@\n #define MAX_DYNAMIC_BUFFERS (MAX_DYNAMIC_UNIFORM_BUFFERS + \\\n                              MAX_DYNAMIC_STORAGE_BUFFERS)\n \n-#define MAX_RENDER_TARGETS 4\n-\n #define MAX_MULTIVIEW_VIEW_COUNT 16\n \n /* These are tunable parameters in the HW design, but all the V3D\ndiff --git a/src/broadcom/vulkan/v3dv_meta_clear.c b/src/broadcom/vulkan/v3dv_meta_clear.c\nindex d376c179e1c..0a7905b49d5 100644\n--- a/src/broadcom/vulkan/v3dv_meta_clear.c\n+++ b/src/broadcom/vulkan/v3dv_meta_clear.c\n@@ -747,7 +747,7 @@ get_color_clear_pipeline_cache_key(uint32_t rt_idx,\n    uint32_t bit_offset = 0;\n \n    key |= rt_idx;\n-   bit_offset += 2;\n+   bit_offset += 3;\n \n    key |= ((uint64_t) format) << bit_offset;\n    bit_offset += 32;\n@@ -1189,9 +1189,11 @@ v3dv_CmdClearAttachments(VkCommandBuffer commandBuffer,\n {\n    V3DV_FROM_HANDLE(v3dv_cmd_buffer, cmd_buffer, commandBuffer);\n \n-   /* We can only clear attachments in the current subpass */\n-   assert(attachmentCount <= 5); /* 4 color + D/S */\n+   /* We can have at most max_color_RTs + 1 D/S attachments */\n+   assert(attachmentCount <=\n+          V3D_MAX_RENDER_TARGETS(cmd_buffer->device->devinfo.ver) + 1);\n \n+   /* We can only clear attachments in the current subpass */\n    struct v3dv_render_pass *pass = cmd_buffer->state.pass;\n \n    assert(cmd_buffer->state.subpass_idx < pass->subpass_count);\ndiff --git a/src/broadcom/vulkan/v3dv_pass.c b/src/broadcom/vulkan/v3dv_pass.c\nindex 3e82c15df88..7f2e2bbc710 100644\n--- a/src/broadcom/vulkan/v3dv_pass.c\n+++ b/src/broadcom/vulkan/v3dv_pass.c\n@@ -322,11 +322,11 @@ subpass_get_granularity(struct v3dv_device *device,\n    /* Granularity is defined by the tile size */\n    assert(subpass_idx < pass->subpass_count);\n    struct v3dv_subpass *subpass = &pass->subpasses[subpass_idx];\n-   const uint32_t color_attachment_count = subpass->color_count;\n+   const uint32_t color_count = subpass->color_count;\n \n    bool msaa = false;\n    uint32_t max_bpp = 0;\n-   for (uint32_t i = 0; i < color_attachment_count; i++) {\n+   for (uint32_t i = 0; i < color_count; i++) {\n       uint32_t attachment_idx = subpass->color_attachments[i].attachment;\n       if (attachment_idx == VK_ATTACHMENT_UNUSED)\n          continue;\n@@ -349,7 +349,7 @@ subpass_get_granularity(struct v3dv_device *device,\n     * heuristics so we choose a conservative granularity here, with it disabled.\n     */\n    uint32_t width, height;\n-   v3d_choose_tile_size(color_attachment_count, max_bpp, msaa,\n+   v3d_choose_tile_size(&device->devinfo, color_count, max_bpp, msaa,\n                         false /* double-buffer */, &width, &height);\n    *granularity = (VkExtent2D) {\n       .width = width,\ndiff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c\nindex 2156176d4cc..3bcdcc9a853 100644\n--- a/src/broadcom/vulkan/v3dv_pipeline.c\n+++ b/src/broadcom/vulkan/v3dv_pipeline.c\n@@ -2632,6 +2632,7 @@ pipeline_init_dynamic_state(\n    const VkPipelineColorWriteCreateInfoEXT *pColorWriteState)\n {\n    /* Initialize to default values */\n+   const struct v3d_device_info *devinfo = &pipeline->device->devinfo;\n    struct v3dv_dynamic_state *dynamic = &pipeline->dynamic_state;\n    memset(dynamic, 0, sizeof(*dynamic));\n    dynamic->stencil_compare_mask.front = ~0;\n@@ -2639,7 +2640,8 @@ pipeline_init_dynamic_state(\n    dynamic->stencil_write_mask.front = ~0;\n    dynamic->stencil_write_mask.back = ~0;\n    dynamic->line_width = 1.0f;\n-   dynamic->color_write_enable = (1ull << (4 * V3D_MAX_DRAW_BUFFERS)) - 1;\n+   dynamic->color_write_enable =\n+      (1ull << (4 * V3D_MAX_RENDER_TARGETS(devinfo->ver))) - 1;\n \n    /* Create a mask of enabled dynamic states */\n    uint32_t dynamic_states = 0;\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex 3566649aafd..bf5e47018e8 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -1550,10 +1550,13 @@ v3dX(cmd_buffer_emit_blend)(struct v3dv_cmd_buffer *cmd_buffer)\n    struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;\n    assert(pipeline);\n \n+   const struct v3d_device_info *devinfo = &cmd_buffer->device->devinfo;\n+   const uint32_t max_color_rts = V3D_MAX_RENDER_TARGETS(devinfo->ver);\n+\n    const uint32_t blend_packets_size =\n       cl_packet_length(BLEND_ENABLES) +\n       cl_packet_length(BLEND_CONSTANT_COLOR) +\n-      cl_packet_length(BLEND_CFG) * V3D_MAX_DRAW_BUFFERS;\n+      cl_packet_length(BLEND_CFG) * max_color_rts;\n \n    v3dv_cl_ensure_space_with_branch(&job->bcl, blend_packets_size);\n    v3dv_return_if_oom(cmd_buffer, NULL);\n@@ -1565,7 +1568,7 @@ v3dX(cmd_buffer_emit_blend)(struct v3dv_cmd_buffer *cmd_buffer)\n          }\n       }\n \n-      for (uint32_t i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) {\n+      for (uint32_t i = 0; i < max_color_rts; i++) {\n          if (pipeline->blend.enables & (1 << i))\n             cl_emit_prepacked(&job->bcl, &pipeline->blend.cfg[i]);\n       }\ndiff --git a/src/broadcom/vulkan/v3dvx_device.c b/src/broadcom/vulkan/v3dvx_device.c\nindex 72daefadb08..4d17a2691a5 100644\n--- a/src/broadcom/vulkan/v3dvx_device.c\n+++ b/src/broadcom/vulkan/v3dvx_device.c\n@@ -49,7 +49,6 @@ vk_to_v3d_compare_func[] = {\n    [VK_COMPARE_OP_ALWAYS]                       = V3D_COMPARE_FUNC_ALWAYS,\n };\n \n-\n static union pipe_color_union encode_border_color(\n    const VkSamplerCustomBorderColorCreateInfoEXT *bc_info)\n {\ndiff --git a/src/gallium/drivers/v3d/v3d_blit.c b/src/gallium/drivers/v3d/v3d_blit.c\nindex 96179f654a4..51ddc292ff7 100644\n--- a/src/gallium/drivers/v3d/v3d_blit.c\n+++ b/src/gallium/drivers/v3d/v3d_blit.c\n@@ -369,7 +369,7 @@ v3d_tlb_blit(struct pipe_context *pctx, struct pipe_blit_info *info)\n         bool double_buffer = V3D_DBG(DOUBLE_BUFFER) && !msaa;\n \n         uint32_t tile_width, tile_height, max_bpp;\n-        v3d_get_tile_buffer_size(msaa, double_buffer,\n+        v3d_get_tile_buffer_size(devinfo, msaa, double_buffer,\n                                  is_color_blit ? 1 : 0, surfaces, src_surf,\n                                  &tile_width, &tile_height, &max_bpp);\n \ndiff --git a/src/gallium/drivers/v3d/v3d_context.c b/src/gallium/drivers/v3d/v3d_context.c\nindex f12e8c92139..def546e9ef5 100644\n--- a/src/gallium/drivers/v3d/v3d_context.c\n+++ b/src/gallium/drivers/v3d/v3d_context.c\n@@ -220,7 +220,8 @@ v3d_flag_dirty_sampler_state(struct v3d_context *v3d,\n }\n \n void\n-v3d_get_tile_buffer_size(bool is_msaa,\n+v3d_get_tile_buffer_size(const struct v3d_device_info *devinfo,\n+                         bool is_msaa,\n                          bool double_buffer,\n                          uint32_t nr_cbufs,\n                          struct pipe_surface **cbufs,\n@@ -247,7 +248,7 @@ v3d_get_tile_buffer_size(bool is_msaa,\n                 *max_bpp = MAX2(*max_bpp, bsurf->internal_bpp);\n         }\n \n-        v3d_choose_tile_size(max_cbuf_idx + 1, *max_bpp,\n+        v3d_choose_tile_size(devinfo, max_cbuf_idx + 1, *max_bpp,\n                              is_msaa, double_buffer,\n                              tile_width, tile_height);\n }\ndiff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h\nindex 21ee10a90cc..eb184b4b203 100644\n--- a/src/gallium/drivers/v3d/v3d_context.h\n+++ b/src/gallium/drivers/v3d/v3d_context.h\n@@ -795,7 +795,8 @@ void v3d_ensure_prim_counts_allocated(struct v3d_context *ctx);\n void v3d_flag_dirty_sampler_state(struct v3d_context *v3d,\n                                   enum pipe_shader_type shader);\n \n-void v3d_get_tile_buffer_size(bool is_msaa,\n+void v3d_get_tile_buffer_size(const struct v3d_device_info *devinfo,\n+                              bool is_msaa,\n                               bool double_buffer,\n                               uint32_t nr_cbufs,\n                               struct pipe_surface **cbufs,\ndiff --git a/src/gallium/drivers/v3d/v3d_job.c b/src/gallium/drivers/v3d/v3d_job.c\nindex b022ed45073..577890a06c3 100644\n--- a/src/gallium/drivers/v3d/v3d_job.c\n+++ b/src/gallium/drivers/v3d/v3d_job.c\n@@ -383,9 +383,11 @@ v3d_get_job_for_fbo(struct v3d_context *v3d)\n                 job->double_buffer = false;\n         }\n \n-        v3d_get_tile_buffer_size(job->msaa, job->double_buffer,\n+        v3d_get_tile_buffer_size(&v3d->screen->devinfo,\n+                                 job->msaa, job->double_buffer,\n                                  job->nr_cbufs, job->cbufs, job->bbuf,\n-                                 &job->tile_width, &job->tile_height,\n+                                 &job->tile_width,\n+                                 &job->tile_height,\n                                  &job->internal_bpp);\n \n         /* The dirty flags are tracking what's been updated while v3d->job has\ndiff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c\nindex efdb7d615ae..2225edf85bd 100644\n--- a/src/gallium/drivers/v3d/v3d_screen.c\n+++ b/src/gallium/drivers/v3d/v3d_screen.c\n@@ -255,9 +255,8 @@ v3d_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)\n         case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:\n                 return V3D_MAX_ARRAY_LAYERS;\n \n-                /* Render targets. */\n         case PIPE_CAP_MAX_RENDER_TARGETS:\n-                return 4;\n+                return V3D_MAX_RENDER_TARGETS(screen->devinfo.ver);\n \n         case PIPE_CAP_VENDOR_ID:\n                 return 0x14E4;\ndiff --git a/src/gallium/drivers/v3d/v3dx_emit.c b/src/gallium/drivers/v3d/v3dx_emit.c\nindex 75751dc9ab6..87e75281dc9 100644\n--- a/src/gallium/drivers/v3d/v3dx_emit.c\n+++ b/src/gallium/drivers/v3d/v3dx_emit.c\n@@ -661,8 +661,10 @@ v3dX(emit_state)(struct pipe_context *pctx)\n                         }\n #endif\n \n+                        const uint32_t max_rts =\n+                                V3D_MAX_RENDER_TARGETS(v3d->screen->devinfo.ver);\n                         if (blend->base.independent_blend_enable) {\n-                                for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++)\n+                                for (int i = 0; i < max_rts; i++)\n                                         emit_rt_blend(v3d, job, &blend->base, i,\n                                                       (1 << i),\n                                                       v3d->blend_dst_alpha_one & (1 << i));\n@@ -678,16 +680,16 @@ v3dX(emit_state)(struct pipe_context *pctx)\n                                  * RTs without.\n                                  */\n                                 emit_rt_blend(v3d, job, &blend->base, 0,\n-                                              ((1 << V3D_MAX_DRAW_BUFFERS) - 1) &\n+                                              ((1 << max_rts) - 1) &\n                                                    v3d->blend_dst_alpha_one,\n                                               true);\n                                 emit_rt_blend(v3d, job, &blend->base, 0,\n-                                              ((1 << V3D_MAX_DRAW_BUFFERS) - 1) &\n+                                              ((1 << max_rts) - 1) &\n                                                    ~v3d->blend_dst_alpha_one,\n                                               false);\n                         } else {\n                                 emit_rt_blend(v3d, job, &blend->base, 0,\n-                                              (1 << V3D_MAX_DRAW_BUFFERS) - 1,\n+                                              (1 << max_rts) - 1,\n                                               v3d->blend_dst_alpha_one);\n                         }\n                 }\n@@ -696,8 +698,10 @@ v3dX(emit_state)(struct pipe_context *pctx)\n         if (v3d->dirty & V3D_DIRTY_BLEND) {\n                 struct pipe_blend_state *blend = &v3d->blend->base;\n \n+                const uint32_t max_rts =\n+                        V3D_MAX_RENDER_TARGETS(v3d->screen->devinfo.ver);\n                 cl_emit(&job->bcl, COLOR_WRITE_MASKS, mask) {\n-                        for (int i = 0; i < 4; i++) {\n+                        for (int i = 0; i < max_rts; i++) {\n                                 int rt = blend->independent_blend_enable ? i : 0;\n                                 int rt_mask = blend->rt[rt].colormask;\n \ndiff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c\nindex 88e57cd072b..970a082aa85 100644\n--- a/src/gallium/drivers/v3d/v3dx_state.c\n+++ b/src/gallium/drivers/v3d/v3dx_state.c\n@@ -138,8 +138,9 @@ v3d_create_blend_state(struct pipe_context *pctx,\n \n         so->base = *cso;\n \n+        uint32_t max_rts = V3D_MAX_RENDER_TARGETS(V3D_VERSION);\n         if (cso->independent_blend_enable) {\n-                for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) {\n+                for (int i = 0; i < max_rts; i++) {\n                         so->blend_enables |= cso->rt[i].blend_enable << i;\n \n                         /* V3D 4.x is when we got independent blend enables. */\n@@ -148,7 +149,7 @@ v3d_create_blend_state(struct pipe_context *pctx,\n                 }\n         } else {\n                 if (cso->rt[0].blend_enable)\n-                        so->blend_enables = (1 << V3D_MAX_DRAW_BUFFERS) - 1;\n+                        so->blend_enables = (1 << max_rts) - 1;\n         }\n \n         return so;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0124-v3d-v3dv-don-t-use-max-internal-bpp-for-tile-sizing-.patch",
    "content": "From cc5afd808039f3e0b81fe0615745b74cbb31d0bf Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 16 Nov 2021 11:26:17 +0100\nSubject: [PATCH 124/142] v3d,v3dv: don't use max internal bpp for tile sizing\n in V3D 7.x\n\nWe can use the actual bpp of each color attachment to compute real\ntile memory requirements, which may allow us to choose a larger tile\nsize configuration than in V3D 4.2 in certain scenarios.\n---\n src/broadcom/common/v3d_util.c          | 112 +++++++++++++++---------\n src/broadcom/common/v3d_util.h          |   7 +-\n src/broadcom/vulkan/v3dv_cmd_buffer.c   |  20 +++--\n src/broadcom/vulkan/v3dv_meta_clear.c   |   1 +\n src/broadcom/vulkan/v3dv_meta_copy.c    |  19 ++--\n src/broadcom/vulkan/v3dv_pass.c         |   9 +-\n src/broadcom/vulkan/v3dv_private.h      |   2 +\n src/broadcom/vulkan/v3dvx_device.c      |  21 +++--\n src/broadcom/vulkan/v3dvx_meta_common.c |  10 ++-\n src/broadcom/vulkan/v3dvx_private.h     |   4 +-\n src/broadcom/vulkan/v3dvx_queue.c       |   3 +-\n src/gallium/drivers/v3d/v3d_context.c   |   6 +-\n 12 files changed, 140 insertions(+), 74 deletions(-)\n\ndiff --git a/src/broadcom/common/v3d_util.c b/src/broadcom/common/v3d_util.c\nindex 209a5eceaa1..8a50d279985 100644\n--- a/src/broadcom/common/v3d_util.c\n+++ b/src/broadcom/common/v3d_util.c\n@@ -87,12 +87,37 @@ v3d_csd_choose_workgroups_per_supergroup(struct v3d_device_info *devinfo,\n    return best_wgs_per_sg;\n }\n \n+#define V3D71_TLB_COLOR_SIZE     (16 * 1024)\n+#define V3D71_TLB_DETPH_SIZE     (16 * 1024)\n+#define V3D71_TLB_AUX_DETPH_SIZE  (8 * 1024)\n+\n+static bool\n+tile_size_valid(uint32_t pixel_count, uint32_t color_bpp, uint32_t depth_bpp)\n+{\n+   /* First, we check if we can fit this tile size allocating the depth\n+    * TLB memory to color.\n+    */\n+   if (pixel_count * depth_bpp <= V3D71_TLB_AUX_DETPH_SIZE &&\n+       pixel_count * color_bpp <= V3D71_TLB_COLOR_SIZE + V3D71_TLB_DETPH_SIZE) {\n+      return true;\n+   }\n+\n+   /* Otherwise the tile must fit in the main TLB buffers */\n+   return pixel_count * depth_bpp <= V3D71_TLB_DETPH_SIZE &&\n+          pixel_count * color_bpp <= V3D71_TLB_COLOR_SIZE;\n+}\n+\n void\n v3d_choose_tile_size(const struct v3d_device_info *devinfo,\n                      uint32_t color_attachment_count,\n-                     uint32_t max_color_bpp, bool msaa,\n+                     /* V3D 4.x max internal bpp of all RTs */\n+                     uint32_t max_internal_bpp,\n+                     /* V3D 7.x accumulated bpp for all RTs (in bytes) */\n+                     uint32_t total_color_bpp,\n+                     bool msaa,\n                      bool double_buffer,\n-                     uint32_t *width, uint32_t *height)\n+                     uint32_t *width,\n+                     uint32_t *height)\n {\n    static const uint8_t tile_sizes[] = {\n       64, 64,\n@@ -105,37 +130,19 @@ v3d_choose_tile_size(const struct v3d_device_info *devinfo,\n    };\n \n    uint32_t idx = 0;\n-   if (color_attachment_count > 4)\n-      idx += 3;\n-   else if (color_attachment_count > 2)\n-      idx += 2;\n-   else if (color_attachment_count > 1)\n-      idx += 1;\n-\n-   /* MSAA and double-buffer are mutually exclusive */\n-   assert(!msaa || !double_buffer);\n-   if (msaa)\n-      idx += 2;\n-   else if (double_buffer)\n-      idx += 1;\n-\n-   idx += max_color_bpp;\n-\n    if (devinfo->ver >= 71) {\n-      /* In V3D 7.x the TLB has an auxiliary buffer of 8KB that will be\n-       * automatically used for depth instead of the main 16KB depth TLB buffer\n-       * when the depth tile fits in the auxiliary buffer, allowing the hardware\n-       * to allocate the 16KB from the main depth TLB to the color TLB. If\n-       * we can do that, then we are effectively doubling the memory we have\n-       * for color and we can increase our tile dimensions by a factor of 2\n-       * (reduce idx by 1).\n+      /* In V3D 7.x, we use the actual bpp used by color attachments to compute\n+       * the tile size instead of the maximum bpp. This may allow us to choose a\n+       * larger tile size than we would in 4.x in scenarios with multiple RTs\n+       * with different bpps.\n        *\n-       * If we have computed a tile size that would be smaller than the minimum\n-       * of 8x8, then it is certain that depth will fit in the aux depth TLB\n-       * (even in MSAA mode).\n-       *\n-       * Otherwise, we need check if we can fit depth in the aux TLB buffer\n-       * using a larger tile size.\n+       * Also, the TLB has an auxiliary buffer of 8KB that will be automatically\n+       * used for depth instead of the main 16KB depth TLB buffer when the depth\n+       * tile fits in the auxiliary buffer, allowing the hardware to allocate\n+       * the 16KB from the main depth TLB to the color TLB. If we can do that,\n+       * then we are effectively doubling the memory we have for color and we\n+       * can also select a larger tile size. This is necessary to support\n+       * the most expensive configuration: 8x128bpp RTs + MSAA.\n        *\n        * FIXME: the docs state that depth TLB memory can be used for color\n        * if depth testing is not used by setting the 'depth disable' bit in the\n@@ -147,17 +154,40 @@ v3d_choose_tile_size(const struct v3d_device_info *devinfo,\n        * configuration item) or active in the subpass for which we are enabling\n        * the bit (which we can't tell until later, when we record commands for\n        * the subpass). If it is the latter, then we cannot use this feature.\n+       *\n+       * FIXME: pending handling double_buffer.\n        */\n-      if (idx >= ARRAY_SIZE(tile_sizes) / 2) {\n-         idx--;\n-      } else if (idx > 0) {\n-         /* Depth is always 32bpp (4x32bpp for 4x MSAA) */\n-         uint32_t depth_bpp = !msaa ? 4 : 16;\n-         uint32_t tile_w = tile_sizes[(idx - 1) * 2];\n-         uint32_t tile_h = tile_sizes[(idx - 1) * 2 + 1];\n-         if (tile_w * tile_h * depth_bpp <= 8192)\n-            idx--;\n-      }\n+      const uint32_t color_bpp = total_color_bpp * (msaa ? 4 : 1);\n+      const uint32_t depth_bpp = 4 * (msaa ? 4 : 1);\n+      do {\n+         const uint32_t tile_w = tile_sizes[idx * 2];\n+         const uint32_t tile_h = tile_sizes[idx * 2 + 1];\n+         if (tile_size_valid(tile_w * tile_h, color_bpp, depth_bpp))\n+            break;\n+         idx++;\n+      } while (idx < ARRAY_SIZE(tile_sizes) / 2);\n+\n+      /* FIXME: pending handling double_buffer */\n+      assert(!double_buffer);\n+   } else {\n+      /* On V3D 4.x tile size is selected based on the number of RTs, the\n+       * maximum bpp across all of them and whether 4x MSAA is used.\n+       */\n+      if (color_attachment_count > 4)\n+         idx += 3;\n+      else if (color_attachment_count > 2)\n+         idx += 2;\n+      else if (color_attachment_count > 1)\n+         idx += 1;\n+\n+      /* MSAA and double-buffer are mutually exclusive */\n+      assert(!msaa || !double_buffer);\n+      if (msaa)\n+         idx += 2;\n+      else if (double_buffer)\n+         idx += 1;\n+\n+      idx += max_internal_bpp;\n    }\n \n    assert(idx < ARRAY_SIZE(tile_sizes) / 2);\ndiff --git a/src/broadcom/common/v3d_util.h b/src/broadcom/common/v3d_util.h\nindex 5a7e244a0a5..d02d41dd089 100644\n--- a/src/broadcom/common/v3d_util.h\n+++ b/src/broadcom/common/v3d_util.h\n@@ -39,9 +39,12 @@ v3d_csd_choose_workgroups_per_supergroup(struct v3d_device_info *devinfo,\n void\n v3d_choose_tile_size(const struct v3d_device_info *devinfo,\n                      uint32_t color_attachment_count,\n-                     uint32_t max_color_bpp, bool msaa,\n+                     uint32_t max_internal_bpp,\n+                     uint32_t total_color_bpp,\n+                     bool msaa,\n                      bool double_buffer,\n-                     uint32_t *width, uint32_t *height);\n+                     uint32_t *width,\n+                     uint32_t *height);\n \n uint32_t\n v3d_translate_pipe_swizzle(enum pipe_swizzle swizzle);\ndiff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c\nindex 11d161b19b7..f65388c10ec 100644\n--- a/src/broadcom/vulkan/v3dv_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c\n@@ -348,6 +348,7 @@ job_compute_frame_tiling(struct v3dv_job *job,\n                          uint32_t layers,\n                          uint32_t render_target_count,\n                          uint8_t max_internal_bpp,\n+                         uint8_t total_color_bpp,\n                          bool msaa,\n                          bool double_buffer)\n {\n@@ -360,14 +361,16 @@ job_compute_frame_tiling(struct v3dv_job *job,\n    tiling->render_target_count = render_target_count;\n    tiling->msaa = msaa;\n    tiling->internal_bpp = max_internal_bpp;\n+   tiling->total_color_bpp = total_color_bpp;\n    tiling->double_buffer = double_buffer;\n \n    /* Double-buffer is incompatible with MSAA */\n    assert(!tiling->msaa || !tiling->double_buffer);\n \n    v3d_choose_tile_size(&job->device->devinfo,\n-                        render_target_count, max_internal_bpp,\n-                        tiling->msaa, tiling->double_buffer,\n+                        render_target_count,\n+                        max_internal_bpp, total_color_bpp, msaa,\n+                        tiling->double_buffer,\n                         &tiling->tile_width, &tiling->tile_height);\n \n    tiling->draw_tiles_x = DIV_ROUND_UP(width, tiling->tile_width);\n@@ -458,6 +461,7 @@ v3dv_job_start_frame(struct v3dv_job *job,\n                      bool allocate_tile_state_now,\n                      uint32_t render_target_count,\n                      uint8_t max_internal_bpp,\n+                     uint8_t total_color_bpp,\n                      bool msaa)\n {\n    assert(job);\n@@ -468,7 +472,7 @@ v3dv_job_start_frame(struct v3dv_job *job,\n    const struct v3dv_frame_tiling *tiling =\n       job_compute_frame_tiling(job, width, height, layers,\n                                render_target_count, max_internal_bpp,\n-                               msaa, false);\n+                               total_color_bpp, msaa, false);\n \n    v3dv_cl_ensure_space_with_branch(&job->bcl, 256);\n    v3dv_return_if_oom(NULL, job);\n@@ -529,6 +533,7 @@ cmd_buffer_end_render_pass_frame(struct v3dv_cmd_buffer *cmd_buffer)\n                                job->frame_tiling.layers,\n                                job->frame_tiling.render_target_count,\n                                job->frame_tiling.internal_bpp,\n+                               job->frame_tiling.total_color_bpp,\n                                job->frame_tiling.msaa,\n                                true);\n \n@@ -1673,10 +1678,11 @@ cmd_buffer_subpass_create_job(struct v3dv_cmd_buffer *cmd_buffer,\n \n       const struct v3dv_framebuffer *framebuffer = state->framebuffer;\n \n-      uint8_t internal_bpp;\n+      uint8_t max_internal_bpp, total_color_bpp;\n       bool msaa;\n       v3dv_X(job->device, framebuffer_compute_internal_bpp_msaa)\n-         (framebuffer, state->attachments, subpass, &internal_bpp, &msaa);\n+         (framebuffer, state->attachments, subpass,\n+          &max_internal_bpp, &total_color_bpp, &msaa);\n \n       /* From the Vulkan spec:\n        *\n@@ -1700,7 +1706,8 @@ cmd_buffer_subpass_create_job(struct v3dv_cmd_buffer *cmd_buffer,\n                            layers,\n                            true, false,\n                            subpass->color_count,\n-                           internal_bpp,\n+                           max_internal_bpp,\n+                           total_color_bpp,\n                            msaa);\n    }\n \n@@ -2668,6 +2675,7 @@ cmd_buffer_restart_job_for_msaa_if_needed(struct v3dv_cmd_buffer *cmd_buffer)\n                         true, false,\n                         old_job->frame_tiling.render_target_count,\n                         old_job->frame_tiling.internal_bpp,\n+                        old_job->frame_tiling.total_color_bpp,\n                         true /* msaa */);\n \n    v3dv_job_destroy(old_job);\ndiff --git a/src/broadcom/vulkan/v3dv_meta_clear.c b/src/broadcom/vulkan/v3dv_meta_clear.c\nindex 0a7905b49d5..1c0d66c977c 100644\n--- a/src/broadcom/vulkan/v3dv_meta_clear.c\n+++ b/src/broadcom/vulkan/v3dv_meta_clear.c\n@@ -127,6 +127,7 @@ clear_image_tlb(struct v3dv_cmd_buffer *cmd_buffer,\n \n       v3dv_job_start_frame(job, width, height, max_layer,\n                            false, true, 1, internal_bpp,\n+                           4 * v3d_internal_bpp_words(internal_bpp),\n                            image->vk.samples > VK_SAMPLE_COUNT_1_BIT);\n \n       struct v3dv_meta_framebuffer framebuffer;\ndiff --git a/src/broadcom/vulkan/v3dv_meta_copy.c b/src/broadcom/vulkan/v3dv_meta_copy.c\nindex c0ec888b8c7..2d30c611e17 100644\n--- a/src/broadcom/vulkan/v3dv_meta_copy.c\n+++ b/src/broadcom/vulkan/v3dv_meta_copy.c\n@@ -453,8 +453,9 @@ copy_image_to_buffer_tlb(struct v3dv_cmd_buffer *cmd_buffer,\n    const uint32_t width = DIV_ROUND_UP(region->imageExtent.width, block_w);\n    const uint32_t height = DIV_ROUND_UP(region->imageExtent.height, block_h);\n \n-   v3dv_job_start_frame(job, width, height, num_layers, false, true,\n-                        1, internal_bpp, false);\n+   v3dv_job_start_frame(job, width, height, num_layers, false, true, 1,\n+                        internal_bpp, 4 * v3d_internal_bpp_words(internal_bpp),\n+                        false);\n \n    struct v3dv_meta_framebuffer framebuffer;\n    v3dv_X(job->device, meta_framebuffer_init)(&framebuffer, fb_format,\n@@ -1323,8 +1324,8 @@ copy_image_tlb(struct v3dv_cmd_buffer *cmd_buffer,\n    const uint32_t width = DIV_ROUND_UP(region->extent.width, block_w);\n    const uint32_t height = DIV_ROUND_UP(region->extent.height, block_h);\n \n-   v3dv_job_start_frame(job, width, height, num_layers,\n-                        false, true, 1, internal_bpp,\n+   v3dv_job_start_frame(job, width, height, num_layers, false, true, 1,\n+                        internal_bpp, 4 * v3d_internal_bpp_words(internal_bpp),\n                         src->vk.samples > VK_SAMPLE_COUNT_1_BIT);\n \n    struct v3dv_meta_framebuffer framebuffer;\n@@ -1978,8 +1979,9 @@ copy_buffer_to_image_tlb(struct v3dv_cmd_buffer *cmd_buffer,\n    const uint32_t width = DIV_ROUND_UP(region->imageExtent.width, block_w);\n    const uint32_t height = DIV_ROUND_UP(region->imageExtent.height, block_h);\n \n-   v3dv_job_start_frame(job, width, height, num_layers, false, true,\n-                        1, internal_bpp, false);\n+   v3dv_job_start_frame(job, width, height, num_layers, false, true, 1,\n+                        internal_bpp, 4 * v3d_internal_bpp_words(internal_bpp),\n+                        false);\n \n    struct v3dv_meta_framebuffer framebuffer;\n    v3dv_X(job->device, meta_framebuffer_init)(&framebuffer, fb_format,\n@@ -4884,8 +4886,9 @@ resolve_image_tlb(struct v3dv_cmd_buffer *cmd_buffer,\n       (fb_format, region->srcSubresource.aspectMask,\n        &internal_type, &internal_bpp);\n \n-   v3dv_job_start_frame(job, width, height, num_layers, false, true,\n-                        1, internal_bpp, true);\n+   v3dv_job_start_frame(job, width, height, num_layers, false, true, 1,\n+                        internal_bpp, 4 * v3d_internal_bpp_words(internal_bpp),\n+                        true);\n \n    struct v3dv_meta_framebuffer framebuffer;\n    v3dv_X(job->device, meta_framebuffer_init)(&framebuffer, fb_format,\ndiff --git a/src/broadcom/vulkan/v3dv_pass.c b/src/broadcom/vulkan/v3dv_pass.c\nindex 7f2e2bbc710..0583faf6f9a 100644\n--- a/src/broadcom/vulkan/v3dv_pass.c\n+++ b/src/broadcom/vulkan/v3dv_pass.c\n@@ -325,7 +325,8 @@ subpass_get_granularity(struct v3dv_device *device,\n    const uint32_t color_count = subpass->color_count;\n \n    bool msaa = false;\n-   uint32_t max_bpp = 0;\n+   uint32_t max_internal_bpp = 0;\n+   uint32_t total_color_bpp = 0;\n    for (uint32_t i = 0; i < color_count; i++) {\n       uint32_t attachment_idx = subpass->color_attachments[i].attachment;\n       if (attachment_idx == VK_ATTACHMENT_UNUSED)\n@@ -339,7 +340,8 @@ subpass_get_granularity(struct v3dv_device *device,\n       v3dv_X(device, get_internal_type_bpp_for_output_format)\n          (format->planes[0].rt_type, &internal_type, &internal_bpp);\n \n-      max_bpp = MAX2(max_bpp, internal_bpp);\n+      max_internal_bpp = MAX2(max_internal_bpp, internal_bpp);\n+      total_color_bpp += 4 * v3d_internal_bpp_words(internal_bpp);\n \n       if (desc->samples > VK_SAMPLE_COUNT_1_BIT)\n          msaa = true;\n@@ -349,7 +351,8 @@ subpass_get_granularity(struct v3dv_device *device,\n     * heuristics so we choose a conservative granularity here, with it disabled.\n     */\n    uint32_t width, height;\n-   v3d_choose_tile_size(&device->devinfo, color_count, max_bpp, msaa,\n+   v3d_choose_tile_size(&device->devinfo, color_count,\n+                        max_internal_bpp, total_color_bpp, msaa,\n                         false /* double-buffer */, &width, &height);\n    *granularity = (VkExtent2D) {\n       .width = width,\ndiff --git a/src/broadcom/vulkan/v3dv_private.h b/src/broadcom/vulkan/v3dv_private.h\nindex 300a1ec8ae1..9375cdd58c0 100644\n--- a/src/broadcom/vulkan/v3dv_private.h\n+++ b/src/broadcom/vulkan/v3dv_private.h\n@@ -950,6 +950,7 @@ struct v3dv_frame_tiling {\n    uint32_t layers;\n    uint32_t render_target_count;\n    uint32_t internal_bpp;\n+   uint32_t total_color_bpp;\n    bool     msaa;\n    bool     double_buffer;\n    uint32_t tile_width;\n@@ -1373,6 +1374,7 @@ void v3dv_job_start_frame(struct v3dv_job *job,\n                           bool allocate_tile_state_now,\n                           uint32_t render_target_count,\n                           uint8_t max_internal_bpp,\n+                          uint8_t total_color_bpp,\n                           bool msaa);\n \n bool v3dv_job_type_is_gpu(struct v3dv_job *job);\ndiff --git a/src/broadcom/vulkan/v3dvx_device.c b/src/broadcom/vulkan/v3dvx_device.c\nindex 4d17a2691a5..61ad98c1217 100644\n--- a/src/broadcom/vulkan/v3dvx_device.c\n+++ b/src/broadcom/vulkan/v3dvx_device.c\n@@ -257,11 +257,13 @@ v3dX(framebuffer_compute_internal_bpp_msaa)(\n    const struct v3dv_framebuffer *framebuffer,\n    const struct v3dv_cmd_buffer_attachment_state *attachments,\n    const struct v3dv_subpass *subpass,\n-   uint8_t *max_bpp,\n+   uint8_t *max_internal_bpp,\n+   uint8_t *total_color_bpp,\n    bool *msaa)\n {\n    STATIC_ASSERT(V3D_INTERNAL_BPP_32 == 0);\n-   *max_bpp = V3D_INTERNAL_BPP_32;\n+   *max_internal_bpp = V3D_INTERNAL_BPP_32;\n+   *total_color_bpp = 0;\n    *msaa = false;\n \n    if (subpass) {\n@@ -274,8 +276,11 @@ v3dX(framebuffer_compute_internal_bpp_msaa)(\n          assert(att);\n          assert(att->plane_count == 1);\n \n-         if (att->vk.aspects & VK_IMAGE_ASPECT_COLOR_BIT)\n-            *max_bpp = MAX2(*max_bpp, att->planes[0].internal_bpp);\n+         if (att->vk.aspects & VK_IMAGE_ASPECT_COLOR_BIT) {\n+            const uint32_t internal_bpp = att->planes[0].internal_bpp;\n+            *max_internal_bpp = MAX2(*max_internal_bpp, internal_bpp);\n+            *total_color_bpp += 4 * v3d_internal_bpp_words(internal_bpp);\n+         }\n \n          if (att->vk.image->samples > VK_SAMPLE_COUNT_1_BIT)\n             *msaa = true;\n@@ -289,7 +294,6 @@ v3dX(framebuffer_compute_internal_bpp_msaa)(\n          if (att->vk.image->samples > VK_SAMPLE_COUNT_1_BIT)\n             *msaa = true;\n       }\n-\n       return;\n    }\n \n@@ -299,8 +303,11 @@ v3dX(framebuffer_compute_internal_bpp_msaa)(\n       assert(att);\n       assert(att->plane_count == 1);\n \n-      if (att->vk.aspects & VK_IMAGE_ASPECT_COLOR_BIT)\n-         *max_bpp = MAX2(*max_bpp, att->planes[0].internal_bpp);\n+      if (att->vk.aspects & VK_IMAGE_ASPECT_COLOR_BIT) {\n+         const uint32_t internal_bpp = att->planes[0].internal_bpp;\n+         *max_internal_bpp = MAX2(*max_internal_bpp, internal_bpp);\n+         *total_color_bpp += 4 * v3d_internal_bpp_words(internal_bpp);\n+      }\n \n       if (att->vk.image->samples > VK_SAMPLE_COUNT_1_BIT)\n          *msaa = true;\ndiff --git a/src/broadcom/vulkan/v3dvx_meta_common.c b/src/broadcom/vulkan/v3dvx_meta_common.c\nindex b8f3297bc94..858096f9e4b 100644\n--- a/src/broadcom/vulkan/v3dvx_meta_common.c\n+++ b/src/broadcom/vulkan/v3dvx_meta_common.c\n@@ -1408,8 +1408,9 @@ v3dX(meta_copy_buffer)(struct v3dv_cmd_buffer *cmd_buffer,\n       uint32_t width, height;\n       framebuffer_size_for_pixel_count(num_items, &width, &height);\n \n-      v3dv_job_start_frame(job, width, height, 1, true, true,\n-                           1, internal_bpp, false);\n+      v3dv_job_start_frame(job, width, height, 1, true, true, 1,\n+                           internal_bpp, 4 * v3d_internal_bpp_words(internal_bpp),\n+                           false);\n \n       struct v3dv_meta_framebuffer framebuffer;\n       v3dX(meta_framebuffer_init)(&framebuffer, vk_format, internal_type,\n@@ -1455,8 +1456,9 @@ v3dX(meta_fill_buffer)(struct v3dv_cmd_buffer *cmd_buffer,\n       uint32_t width, height;\n       framebuffer_size_for_pixel_count(num_items, &width, &height);\n \n-      v3dv_job_start_frame(job, width, height, 1, true, true,\n-                           1, internal_bpp, false);\n+      v3dv_job_start_frame(job, width, height, 1, true, true, 1,\n+                           internal_bpp, 4 * v3d_internal_bpp_words(internal_bpp),\n+                           false);\n \n       struct v3dv_meta_framebuffer framebuffer;\n       v3dX(meta_framebuffer_init)(&framebuffer, VK_FORMAT_R8G8B8A8_UINT,\ndiff --git a/src/broadcom/vulkan/v3dvx_private.h b/src/broadcom/vulkan/v3dvx_private.h\nindex 81715520913..709b129926f 100644\n--- a/src/broadcom/vulkan/v3dvx_private.h\n+++ b/src/broadcom/vulkan/v3dvx_private.h\n@@ -136,7 +136,9 @@ void\n v3dX(framebuffer_compute_internal_bpp_msaa)(const struct v3dv_framebuffer *framebuffer,\n                                             const struct v3dv_cmd_buffer_attachment_state *attachments,\n                                             const struct v3dv_subpass *subpass,\n-                                            uint8_t *max_bpp, bool *msaa);\n+                                            uint8_t *max_internal_bpp,\n+                                            uint8_t *total_color_bpp,\n+                                            bool *msaa);\n \n #ifdef DEBUG\n void\ndiff --git a/src/broadcom/vulkan/v3dvx_queue.c b/src/broadcom/vulkan/v3dvx_queue.c\nindex f8cee36e3bf..6eed2de9d54 100644\n--- a/src/broadcom/vulkan/v3dvx_queue.c\n+++ b/src/broadcom/vulkan/v3dvx_queue.c\n@@ -29,7 +29,8 @@\n void\n v3dX(job_emit_noop)(struct v3dv_job *job)\n {\n-   v3dv_job_start_frame(job, 1, 1, 1, true, true, 1, V3D_INTERNAL_BPP_32, false);\n+   v3dv_job_start_frame(job, 1, 1, 1, true, true, 1,\n+                        V3D_INTERNAL_BPP_32, 4, false);\n    v3dX(job_emit_binning_flush)(job);\n \n    struct v3dv_cl *rcl = &job->rcl;\ndiff --git a/src/gallium/drivers/v3d/v3d_context.c b/src/gallium/drivers/v3d/v3d_context.c\nindex def546e9ef5..1dc4bd017fe 100644\n--- a/src/gallium/drivers/v3d/v3d_context.c\n+++ b/src/gallium/drivers/v3d/v3d_context.c\n@@ -233,11 +233,13 @@ v3d_get_tile_buffer_size(const struct v3d_device_info *devinfo,\n         assert(!is_msaa || !double_buffer);\n \n         uint32_t max_cbuf_idx = 0;\n+        uint32_t total_bpp = 0;\n         *max_bpp = 0;\n         for (int i = 0; i < nr_cbufs; i++) {\n                 if (cbufs[i]) {\n                         struct v3d_surface *surf = v3d_surface(cbufs[i]);\n                         *max_bpp = MAX2(*max_bpp, surf->internal_bpp);\n+                        total_bpp += 4 * v3d_internal_bpp_words(surf->internal_bpp);\n                         max_cbuf_idx = MAX2(i, max_cbuf_idx);\n                 }\n         }\n@@ -246,9 +248,11 @@ v3d_get_tile_buffer_size(const struct v3d_device_info *devinfo,\n                 struct v3d_surface *bsurf = v3d_surface(bbuf);\n                 assert(bbuf->texture->nr_samples <= 1 || is_msaa);\n                 *max_bpp = MAX2(*max_bpp, bsurf->internal_bpp);\n+                total_bpp += 4 * v3d_internal_bpp_words(bsurf->internal_bpp);\n         }\n \n-        v3d_choose_tile_size(devinfo, max_cbuf_idx + 1, *max_bpp,\n+        v3d_choose_tile_size(devinfo, max_cbuf_idx + 1,\n+                             *max_bpp, total_bpp,\n                              is_msaa, double_buffer,\n                              tile_width, tile_height);\n }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0125-v3dv-implement-depthBounds-support-for-v71.patch",
    "content": "From 210338b6b1b030d36acaebad504ed2bec4a2cd74 Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Fri, 19 Nov 2021 10:51:37 +0100\nSubject: [PATCH 125/142] v3dv: implement depthBounds support for v71\n\nJust for for v71, as that feature is not supported by older hw.\n---\n src/broadcom/vulkan/v3dv_cmd_buffer.c  | 19 ++++++++++++---\n src/broadcom/vulkan/v3dv_device.c      |  2 +-\n src/broadcom/vulkan/v3dv_pipeline.c    | 17 ++++++++------\n src/broadcom/vulkan/v3dv_private.h     | 12 +++++++++-\n src/broadcom/vulkan/v3dvx_cmd_buffer.c | 32 ++++++++++++++++++++++++++\n src/broadcom/vulkan/v3dvx_pipeline.c   |  3 +++\n src/broadcom/vulkan/v3dvx_private.h    |  3 +++\n 7 files changed, 76 insertions(+), 12 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c\nindex f65388c10ec..36bd7960985 100644\n--- a/src/broadcom/vulkan/v3dv_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c\n@@ -2070,6 +2070,14 @@ cmd_buffer_bind_pipeline_static_state(struct v3dv_cmd_buffer *cmd_buffer,\n       }\n    }\n \n+   if (!(dynamic_mask & V3DV_DYNAMIC_DEPTH_BOUNDS)) {\n+      if (memcmp(&dest->depth_bounds, &src->depth_bounds,\n+                 sizeof(src->depth_bounds))) {\n+         memcpy(&dest->depth_bounds, &src->depth_bounds, sizeof(src->depth_bounds));\n+         dirty |= V3DV_CMD_DIRTY_DEPTH_BOUNDS;\n+      }\n+   }\n+\n    if (!(dynamic_mask & V3DV_DYNAMIC_LINE_WIDTH)) {\n       if (dest->line_width != src->line_width) {\n          dest->line_width = src->line_width;\n@@ -2940,6 +2948,9 @@ v3dv_cmd_buffer_emit_pre_draw(struct v3dv_cmd_buffer *cmd_buffer,\n    if (*dirty & (V3DV_CMD_DIRTY_PIPELINE | V3DV_CMD_DIRTY_DEPTH_BIAS))\n       v3dv_X(device, cmd_buffer_emit_depth_bias)(cmd_buffer);\n \n+   if (*dirty & V3DV_CMD_DIRTY_DEPTH_BOUNDS)\n+      v3dv_X(device, cmd_buffer_emit_depth_bounds)(cmd_buffer);\n+\n    if (*dirty & (V3DV_CMD_DIRTY_PIPELINE | V3DV_CMD_DIRTY_BLEND_CONSTANTS))\n       v3dv_X(device, cmd_buffer_emit_blend)(cmd_buffer);\n \n@@ -3369,9 +3380,11 @@ v3dv_CmdSetDepthBounds(VkCommandBuffer commandBuffer,\n                        float minDepthBounds,\n                        float maxDepthBounds)\n {\n-   /* We do not support depth bounds testing so we just ignore this. We are\n-    * already asserting that pipelines don't enable the feature anyway.\n-    */\n+   V3DV_FROM_HANDLE(v3dv_cmd_buffer, cmd_buffer, commandBuffer);\n+\n+   cmd_buffer->state.dynamic.depth_bounds.min = minDepthBounds;\n+   cmd_buffer->state.dynamic.depth_bounds.max = maxDepthBounds;\n+   cmd_buffer->state.dirty |= V3DV_CMD_DIRTY_DEPTH_BOUNDS;\n }\n \n VKAPI_ATTR void VKAPI_CALL\ndiff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c\nindex 19e58542414..1de9b5ce683 100644\n--- a/src/broadcom/vulkan/v3dv_device.c\n+++ b/src/broadcom/vulkan/v3dv_device.c\n@@ -227,7 +227,7 @@ get_features(const struct v3dv_physical_device *physical_device,\n       .depthClamp = false, /* Only available since V3D 4.5.1.1 */\n       .depthBiasClamp = true,\n       .fillModeNonSolid = true,\n-      .depthBounds = false, /* Only available since V3D 4.3.16.2 */\n+      .depthBounds = physical_device->devinfo.ver >= 71,\n       .wideLines = true,\n       .largePoints = true,\n       .alphaToOne = true,\ndiff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c\nindex 3bcdcc9a853..ba782b8268a 100644\n--- a/src/broadcom/vulkan/v3dv_pipeline.c\n+++ b/src/broadcom/vulkan/v3dv_pipeline.c\n@@ -2608,13 +2608,8 @@ v3dv_dynamic_state_mask(VkDynamicState state)\n       return V3DV_DYNAMIC_LINE_WIDTH;\n    case VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT:\n       return V3DV_DYNAMIC_COLOR_WRITE_ENABLE;\n-\n-   /* Depth bounds testing is not available in in V3D 4.2 so here we are just\n-    * ignoring this dynamic state. We are already asserting at pipeline creation\n-    * time that depth bounds testing is not enabled.\n-    */\n    case VK_DYNAMIC_STATE_DEPTH_BOUNDS:\n-      return 0;\n+      return V3DV_DYNAMIC_DEPTH_BOUNDS;\n \n    default:\n       unreachable(\"Unhandled dynamic state\");\n@@ -2642,6 +2637,7 @@ pipeline_init_dynamic_state(\n    dynamic->line_width = 1.0f;\n    dynamic->color_write_enable =\n       (1ull << (4 * V3D_MAX_RENDER_TARGETS(devinfo->ver))) - 1;\n+   dynamic->depth_bounds.max = 1.0f;\n \n    /* Create a mask of enabled dynamic states */\n    uint32_t dynamic_states = 0;\n@@ -2694,6 +2690,11 @@ pipeline_init_dynamic_state(\n          dynamic->stencil_reference.front = pDepthStencilState->front.reference;\n          dynamic->stencil_reference.back = pDepthStencilState->back.reference;\n       }\n+\n+      if (!(dynamic_states & V3DV_DYNAMIC_DEPTH_BOUNDS)) {\n+         dynamic->depth_bounds.min = pDepthStencilState->minDepthBounds;\n+         dynamic->depth_bounds.max = pDepthStencilState->maxDepthBounds;\n+      }\n    }\n \n    if (pColorBlendState && !(dynamic_states & V3DV_DYNAMIC_BLEND_CONSTANTS)) {\n@@ -2907,7 +2908,9 @@ pipeline_init(struct v3dv_pipeline *pipeline,\n    /* V3D 4.2 doesn't support depth bounds testing so we don't advertise that\n     * feature and it shouldn't be used by any pipeline.\n     */\n-   assert(!ds_info || !ds_info->depthBoundsTestEnable);\n+   assert(device->devinfo.ver >= 71 ||\n+          !ds_info || !ds_info->depthBoundsTestEnable);\n+   pipeline->depth_bounds_test_enabled = ds_info && ds_info->depthBoundsTestEnable;\n \n    enable_depth_bias(pipeline, rs_info);\n \ndiff --git a/src/broadcom/vulkan/v3dv_private.h b/src/broadcom/vulkan/v3dv_private.h\nindex 9375cdd58c0..a074e0a981c 100644\n--- a/src/broadcom/vulkan/v3dv_private.h\n+++ b/src/broadcom/vulkan/v3dv_private.h\n@@ -1045,7 +1045,8 @@ enum v3dv_dynamic_state_bits {\n    V3DV_DYNAMIC_DEPTH_BIAS                = 1 << 6,\n    V3DV_DYNAMIC_LINE_WIDTH                = 1 << 7,\n    V3DV_DYNAMIC_COLOR_WRITE_ENABLE        = 1 << 8,\n-   V3DV_DYNAMIC_ALL                       = (1 << 9) - 1,\n+   V3DV_DYNAMIC_DEPTH_BOUNDS              = 1 << 9,\n+   V3DV_DYNAMIC_ALL                       = (1 << 10) - 1,\n };\n \n /* Flags for dirty pipeline state.\n@@ -1070,6 +1071,7 @@ enum v3dv_cmd_dirty_bits {\n    V3DV_CMD_DIRTY_LINE_WIDTH                = 1 << 16,\n    V3DV_CMD_DIRTY_VIEW_INDEX                = 1 << 17,\n    V3DV_CMD_DIRTY_COLOR_WRITE_ENABLE        = 1 << 18,\n+   V3DV_CMD_DIRTY_DEPTH_BOUNDS              = 1 << 19,\n };\n \n struct v3dv_dynamic_state {\n@@ -1106,6 +1108,11 @@ struct v3dv_dynamic_state {\n       float slope_factor;\n    } depth_bias;\n \n+   struct {\n+      float                                     min;\n+      float                                     max;\n+   } depth_bounds;\n+\n    float line_width;\n \n    uint32_t color_write_enable;\n@@ -2333,6 +2340,9 @@ struct v3dv_pipeline {\n       bool is_z16;\n    } depth_bias;\n \n+   /* Depth bounds */\n+   bool depth_bounds_test_enabled;\n+\n    struct {\n       void *mem_ctx;\n       struct util_dynarray data; /* Array of v3dv_pipeline_executable_data */\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex bf5e47018e8..9307a6e9d93 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -1507,6 +1507,38 @@ v3dX(cmd_buffer_emit_depth_bias)(struct v3dv_cmd_buffer *cmd_buffer)\n    cmd_buffer->state.dirty &= ~V3DV_CMD_DIRTY_DEPTH_BIAS;\n }\n \n+void\n+v3dX(cmd_buffer_emit_depth_bounds)(struct v3dv_cmd_buffer *cmd_buffer)\n+{\n+   /* No depthBounds support for v42, so this method is empty on that case.\n+    *\n+    * Note that this method is being called as v3dv_job_init flag all state as\n+    * dirty. See FIXME note at v3dv_job_init.\n+    */\n+\n+#if V3D_VERSION >= 71\n+   struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;\n+   assert(pipeline);\n+\n+   if (!pipeline->depth_bounds_test_enabled)\n+      return;\n+\n+   struct v3dv_job *job = cmd_buffer->state.job;\n+   assert(job);\n+\n+   v3dv_cl_ensure_space_with_branch(&job->bcl, cl_packet_length(DEPTH_BOUNDS_TEST_LIMITS));\n+   v3dv_return_if_oom(cmd_buffer, NULL);\n+\n+   struct v3dv_dynamic_state *dynamic = &cmd_buffer->state.dynamic;\n+   cl_emit(&job->bcl, DEPTH_BOUNDS_TEST_LIMITS, bounds) {\n+      bounds.lower_test_limit = dynamic->depth_bounds.min;\n+      bounds.upper_test_limit = dynamic->depth_bounds.max;\n+   }\n+\n+   cmd_buffer->state.dirty &= ~V3DV_CMD_DIRTY_DEPTH_BOUNDS;\n+#endif\n+}\n+\n void\n v3dX(cmd_buffer_emit_line_width)(struct v3dv_cmd_buffer *cmd_buffer)\n {\ndiff --git a/src/broadcom/vulkan/v3dvx_pipeline.c b/src/broadcom/vulkan/v3dvx_pipeline.c\nindex 7b1133f8173..83ab2f19e4f 100644\n--- a/src/broadcom/vulkan/v3dvx_pipeline.c\n+++ b/src/broadcom/vulkan/v3dvx_pipeline.c\n@@ -259,6 +259,9 @@ pack_cfg_bits(struct v3dv_pipeline *pipeline,\n       } else {\n          config.z_clipping_mode = V3D_Z_CLIP_MODE_NONE;\n       }\n+\n+      config.depth_bounds_test_enable =\n+              ds_info && ds_info->depthBoundsTestEnable && has_ds_attachment;\n #endif\n    };\n }\ndiff --git a/src/broadcom/vulkan/v3dvx_private.h b/src/broadcom/vulkan/v3dvx_private.h\nindex 709b129926f..1ce4789c5ac 100644\n--- a/src/broadcom/vulkan/v3dvx_private.h\n+++ b/src/broadcom/vulkan/v3dvx_private.h\n@@ -54,6 +54,9 @@ v3dX(cmd_buffer_emit_stencil)(struct v3dv_cmd_buffer *cmd_buffer);\n void\n v3dX(cmd_buffer_emit_depth_bias)(struct v3dv_cmd_buffer *cmd_buffer);\n \n+void\n+v3dX(cmd_buffer_emit_depth_bounds)(struct v3dv_cmd_buffer *cmd_buffer);\n+\n void\n v3dX(cmd_buffer_emit_line_width)(struct v3dv_cmd_buffer *cmd_buffer);\n \n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0126-v3d-v3dv-propagate-NaNs-bits-in-shader-state-records.patch",
    "content": "From be6508ffef8c0e9fbc47175739db80a3eeff2cdb Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Fri, 3 Dec 2021 13:20:22 +0100\nSubject: [PATCH 126/142] v3d,v3dv: propagate NaNs bits in shader state records\n are reserved in v7.x\n\n---\n src/broadcom/vulkan/v3dvx_cmd_buffer.c |  4 ++++\n src/broadcom/vulkan/v3dvx_pipeline.c   | 10 +++++-----\n src/gallium/drivers/v3d/v3dx_draw.c    | 14 +++++++++-----\n 3 files changed, 18 insertions(+), 10 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex 9307a6e9d93..580aeb8ba2b 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -2175,7 +2175,9 @@ emit_gs_shader_state_record(struct v3dv_job *job,\n          gs_bin->prog_data.gs->base.threads == 4;\n       shader.geometry_bin_mode_shader_start_in_final_thread_section =\n          gs_bin->prog_data.gs->base.single_seg;\n+#if V3D_VERSION <= 42\n       shader.geometry_bin_mode_shader_propagate_nans = true;\n+#endif\n       shader.geometry_bin_mode_shader_uniforms_address =\n          gs_bin_uniforms;\n \n@@ -2185,7 +2187,9 @@ emit_gs_shader_state_record(struct v3dv_job *job,\n          gs->prog_data.gs->base.threads == 4;\n       shader.geometry_render_mode_shader_start_in_final_thread_section =\n          gs->prog_data.gs->base.single_seg;\n+#if V3D_VERSION <= 42\n       shader.geometry_render_mode_shader_propagate_nans = true;\n+#endif\n       shader.geometry_render_mode_shader_uniforms_address =\n          gs_render_uniforms;\n    }\ndiff --git a/src/broadcom/vulkan/v3dvx_pipeline.c b/src/broadcom/vulkan/v3dvx_pipeline.c\nindex 83ab2f19e4f..c9b537f4b32 100644\n--- a/src/broadcom/vulkan/v3dvx_pipeline.c\n+++ b/src/broadcom/vulkan/v3dvx_pipeline.c\n@@ -471,19 +471,19 @@ pack_shader_state_record(struct v3dv_pipeline *pipeline)\n       shader.number_of_varyings_in_fragment_shader =\n          prog_data_fs->num_inputs;\n \n-      shader.coordinate_shader_propagate_nans = true;\n-      shader.vertex_shader_propagate_nans = true;\n-      shader.fragment_shader_propagate_nans = true;\n-\n       /* Note: see previous note about addresses */\n       /* shader.coordinate_shader_code_address */\n       /* shader.vertex_shader_code_address */\n       /* shader.fragment_shader_code_address */\n \n+#if V3D_VERSION == 42\n+      shader.coordinate_shader_propagate_nans = true;\n+      shader.vertex_shader_propagate_nans = true;\n+      shader.fragment_shader_propagate_nans = true;\n+\n       /* FIXME: Use combined input/output size flag in the common case (also\n        * on v3d, see v3dx_draw).\n        */\n-#if V3D_VERSION == 42\n       shader.coordinate_shader_has_separate_input_and_output_vpm_blocks =\n          prog_data_vs_bin->separate_segments;\n       shader.vertex_shader_has_separate_input_and_output_vpm_blocks =\ndiff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c\nindex 04cc3bc3ae1..e4b414b0676 100644\n--- a/src/gallium/drivers/v3d/v3dx_draw.c\n+++ b/src/gallium/drivers/v3d/v3dx_draw.c\n@@ -396,7 +396,9 @@ v3d_emit_gs_state_record(struct v3d_job *job,\n                         gs_bin->prog_data.gs->base.threads == 4;\n                 shader.geometry_bin_mode_shader_start_in_final_thread_section =\n                         gs_bin->prog_data.gs->base.single_seg;\n+#if V3D_VERSION <= 42\n                 shader.geometry_bin_mode_shader_propagate_nans = true;\n+#endif\n                 shader.geometry_bin_mode_shader_uniforms_address =\n                         gs_bin_uniforms;\n \n@@ -406,7 +408,9 @@ v3d_emit_gs_state_record(struct v3d_job *job,\n                         gs->prog_data.gs->base.threads == 4;\n                 shader.geometry_render_mode_shader_start_in_final_thread_section =\n                         gs->prog_data.gs->base.single_seg;\n+#if V3D_VERSION <= 42\n                 shader.geometry_render_mode_shader_propagate_nans = true;\n+#endif\n                 shader.geometry_render_mode_shader_uniforms_address =\n                         gs_render_uniforms;\n         }\n@@ -657,10 +661,6 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,\n                 shader.number_of_varyings_in_fragment_shader =\n                         v3d->prog.fs->prog_data.fs->num_inputs;\n \n-                shader.coordinate_shader_propagate_nans = true;\n-                shader.vertex_shader_propagate_nans = true;\n-                shader.fragment_shader_propagate_nans = true;\n-\n                 shader.coordinate_shader_code_address =\n                         cl_address(v3d_resource(v3d->prog.cs->resource)->bo,\n                                    v3d->prog.cs->offset);\n@@ -671,10 +671,14 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,\n                         cl_address(v3d_resource(v3d->prog.fs->resource)->bo,\n                                    v3d->prog.fs->offset);\n \n+#if V3D_VERSION <= 42\n+                shader.coordinate_shader_propagate_nans = true;\n+                shader.vertex_shader_propagate_nans = true;\n+                shader.fragment_shader_propagate_nans = true;\n+\n                 /* XXX: Use combined input/output size flag in the common\n                  * case.\n                  */\n-#if V3D_VERSION <= 42\n                 shader.coordinate_shader_has_separate_input_and_output_vpm_blocks =\n                         v3d->prog.cs->prog_data.vs->separate_segments;\n                 shader.vertex_shader_has_separate_input_and_output_vpm_blocks =\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0127-v3dv-use-new-texture-shader-state-rb_swap-and-revers.patch",
    "content": "From c74ba2b39e7b9fe6c5415c20c98cd231d2674df6 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Tue, 16 May 2023 00:38:40 +0200\nSubject: [PATCH 127/142] v3dv: use new texture shader state rb_swap and\n reverse fields in v3d 7.x\n\nIn v3d 4.x we handle formats that are reversed or R/B swapped by\napplying a format swizzle. This doesn't work on border colors though,\nand for that there is a specific bit to reverse the border color in\nthe texture shader state.\n\nIn v3d 7.x we have new reverse and swap R/B bits and we no longer have\na bit to reverse the border color because the new reverse bit applies\nto border texels too. Because of this, we absolutely need to use these\nnew bits in order to get correct border colors in all cases with these\nformats.\n\nWhen we enable the reverse and/or swap R/B bits, we are effectively\napplying the format swizzle through them, so in these cases we need to\nmake sure the swizzle we program in the texture shader state is the\nview swizzle provided by the API and not the composition of the format\nswizzle with the view swizzle like we do in 4.x for all formats. The\nsame applies to custom border colors: we must not apply the format\nswizzle to them for formats that are reversed or R/B swapped, because\nagain, this format swizzle is already applied through these new bits.\n\nWhile we are doing this, we also fully adopt the texture shader state\nspec from v3d 7.1.5 for v3d 7.x instead of using a description from\n7.1.2 which is incompatible and required the driver to manually pack\nsome of the bits.\n---\n src/broadcom/vulkan/v3dv_device.c    |  2 +-\n src/broadcom/vulkan/v3dv_image.c     |  7 ++--\n src/broadcom/vulkan/v3dv_private.h   | 13 ++++++-\n src/broadcom/vulkan/v3dvx_device.c   | 24 ++++++++++--\n src/broadcom/vulkan/v3dvx_image.c    | 56 ++++++++++++++++++----------\n src/broadcom/vulkan/v3dvx_private.h  |  3 +-\n src/gallium/drivers/v3d/v3dx_state.c |  6 ---\n 7 files changed, 75 insertions(+), 36 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c\nindex 1de9b5ce683..b520bfa0002 100644\n--- a/src/broadcom/vulkan/v3dv_device.c\n+++ b/src/broadcom/vulkan/v3dv_device.c\n@@ -2989,7 +2989,7 @@ v3dv_CreateSampler(VkDevice _device,\n       }\n    }\n \n-   v3dv_X(device, pack_sampler_state)(sampler, pCreateInfo, bc_info);\n+   v3dv_X(device, pack_sampler_state)(device, sampler, pCreateInfo, bc_info);\n \n    *pSampler = v3dv_sampler_to_handle(sampler);\n \ndiff --git a/src/broadcom/vulkan/v3dv_image.c b/src/broadcom/vulkan/v3dv_image.c\nindex ebbd60e4c03..e01e2e1bd19 100644\n--- a/src/broadcom/vulkan/v3dv_image.c\n+++ b/src/broadcom/vulkan/v3dv_image.c\n@@ -671,7 +671,6 @@ create_image_view(struct v3dv_device *device,\n     * makes sense to implement swizzle composition using VkSwizzle directly.\n     */\n    VkFormat format;\n-   uint8_t image_view_swizzle[4];\n    if (pCreateInfo->format == VK_FORMAT_D24_UNORM_S8_UINT &&\n        range->aspectMask == VK_IMAGE_ASPECT_STENCIL_BIT) {\n       format = VK_FORMAT_R8G8B8A8_UINT;\n@@ -682,11 +681,11 @@ create_image_view(struct v3dv_device *device,\n       vk_component_mapping_to_pipe_swizzle(iview->vk.swizzle, view_swizzle);\n \n       util_format_compose_swizzles(stencil_aspect_swizzle, view_swizzle,\n-                                   image_view_swizzle);\n+                                   iview->view_swizzle);\n    } else {\n       format = pCreateInfo->format;\n       vk_component_mapping_to_pipe_swizzle(iview->vk.swizzle,\n-                                           image_view_swizzle);\n+                                           iview->view_swizzle);\n    }\n \n    iview->vk.view_format = format;\n@@ -711,7 +710,7 @@ create_image_view(struct v3dv_device *device,\n \n       const uint8_t *format_swizzle =\n          v3dv_get_format_swizzle(device, format, plane);\n-      util_format_compose_swizzles(format_swizzle, image_view_swizzle,\n+      util_format_compose_swizzles(format_swizzle, iview->view_swizzle,\n                                    iview->planes[plane].swizzle);\n \n       iview->planes[plane].swap_rb = v3dv_format_swizzle_needs_rb_swap(format_swizzle);\ndiff --git a/src/broadcom/vulkan/v3dv_private.h b/src/broadcom/vulkan/v3dv_private.h\nindex a074e0a981c..8adb8873efd 100644\n--- a/src/broadcom/vulkan/v3dv_private.h\n+++ b/src/broadcom/vulkan/v3dv_private.h\n@@ -776,6 +776,8 @@ struct v3dv_image_view {\n \n    const struct v3dv_format *format;\n \n+   uint8_t view_swizzle[4];\n+\n    uint8_t plane_count;\n    struct {\n       uint8_t image_plane;\n@@ -786,8 +788,8 @@ struct v3dv_image_view {\n       uint32_t internal_type;\n       uint32_t offset;\n \n-      /* Precomputed (composed from createinfo->components and formar swizzle)\n-       * swizzles to pass in to the shader key.\n+      /* Precomputed swizzle (composed from the view swizzle and the format\n+       * swizzle).\n        *\n        * This could be also included on the descriptor bo, but the shader state\n        * packet doesn't need it on a bo, so we can just avoid a memory copy\n@@ -2358,6 +2360,13 @@ struct v3dv_pipeline {\n    uint8_t stencil_cfg[2][V3DV_STENCIL_CFG_LENGTH];\n };\n \n+static inline bool\n+v3dv_texture_shader_state_has_rb_swap_reverse_bits(const struct v3dv_device *device)\n+{\n+   return device->devinfo.ver > 71 ||\n+          (device->devinfo.ver == 71 && device->devinfo.rev >= 5);\n+}\n+\n static inline VkPipelineBindPoint\n v3dv_pipeline_get_binding_point(struct v3dv_pipeline *pipeline)\n {\ndiff --git a/src/broadcom/vulkan/v3dvx_device.c b/src/broadcom/vulkan/v3dvx_device.c\nindex 61ad98c1217..1b50d51e19f 100644\n--- a/src/broadcom/vulkan/v3dvx_device.c\n+++ b/src/broadcom/vulkan/v3dvx_device.c\n@@ -50,6 +50,7 @@ vk_to_v3d_compare_func[] = {\n };\n \n static union pipe_color_union encode_border_color(\n+   const struct v3dv_device *device,\n    const VkSamplerCustomBorderColorCreateInfoEXT *bc_info)\n {\n    const struct util_format_description *desc =\n@@ -76,12 +77,28 @@ static union pipe_color_union encode_border_color(\n     * colors so we need to fix up the swizzle manually for this case.\n     */\n    uint8_t swizzle[4];\n-   if (v3dv_format_swizzle_needs_reverse(format->planes[0].swizzle) &&\n+   const bool v3d_has_reverse_swap_rb_bits =\n+      v3dv_texture_shader_state_has_rb_swap_reverse_bits(device);\n+   if (!v3d_has_reverse_swap_rb_bits &&\n+       v3dv_format_swizzle_needs_reverse(format->planes[0].swizzle) &&\n        v3dv_format_swizzle_needs_rb_swap(format->planes[0].swizzle)) {\n       swizzle[0] = PIPE_SWIZZLE_W;\n       swizzle[1] = PIPE_SWIZZLE_X;\n       swizzle[2] = PIPE_SWIZZLE_Y;\n       swizzle[3] = PIPE_SWIZZLE_Z;\n+   }\n+   /* In v3d 7.x we no longer have a reverse flag for the border color. Instead\n+    * we have to use the new reverse and swap_r/b flags in the texture shader\n+    * state which will apply the format swizzle automatically when sampling\n+    * the border color too and we should not apply it manually here.\n+    */\n+   else if (v3d_has_reverse_swap_rb_bits &&\n+            (v3dv_format_swizzle_needs_rb_swap(format->planes[0].swizzle) ||\n+             v3dv_format_swizzle_needs_reverse(format->planes[0].swizzle))) {\n+      swizzle[0] = PIPE_SWIZZLE_X;\n+      swizzle[1] = PIPE_SWIZZLE_Y;\n+      swizzle[2] = PIPE_SWIZZLE_Z;\n+      swizzle[3] = PIPE_SWIZZLE_W;\n    } else {\n       memcpy(swizzle, format->planes[0].swizzle, sizeof (swizzle));\n    }\n@@ -179,7 +196,8 @@ static union pipe_color_union encode_border_color(\n }\n \n void\n-v3dX(pack_sampler_state)(struct v3dv_sampler *sampler,\n+v3dX(pack_sampler_state)(const struct v3dv_device *device,\n+                         struct v3dv_sampler *sampler,\n                          const VkSamplerCreateInfo *pCreateInfo,\n                          const VkSamplerCustomBorderColorCreateInfoEXT *bc_info)\n {\n@@ -221,7 +239,7 @@ v3dX(pack_sampler_state)(struct v3dv_sampler *sampler,\n       s.border_color_mode = border_color_mode;\n \n       if (s.border_color_mode == V3D_BORDER_COLOR_FOLLOWS) {\n-         union pipe_color_union border = encode_border_color(bc_info);\n+         union pipe_color_union border = encode_border_color(device, bc_info);\n \n          s.border_color_word_0 = border.ui[0];\n          s.border_color_word_1 = border.ui[1];\ndiff --git a/src/broadcom/vulkan/v3dvx_image.c b/src/broadcom/vulkan/v3dvx_image.c\nindex ae6eaa88d0c..de984e81220 100644\n--- a/src/broadcom/vulkan/v3dvx_image.c\n+++ b/src/broadcom/vulkan/v3dvx_image.c\n@@ -108,25 +108,6 @@ pack_texture_shader_state_helper(struct v3dv_device *device,\n \n          tex.array_stride_64_byte_aligned = image->planes[iplane].cube_map_stride / 64;\n \n-         bool is_srgb = vk_format_is_srgb(image_view->vk.format);\n-#if V3D_VERSION == 42\n-         tex.reverse_standard_border_color = image_view->planes[plane].channel_reverse;\n-#endif\n-\n-#if V3D_VERSION == 42\n-         tex.srgb = is_srgb;\n-#endif\n-#if V3D_VERSION >= 71\n-         tex.transfer_func = is_srgb ? TRANSFER_FUNC_SRGB : TRANSFER_FUNC_NONE;\n-\n-         /* V3D 7.1.5 has array stride starting one bit later than previous\n-          * V3D versions to make room for the new RB swap bit, but we don't\n-          * handle that in the CLE parser.\n-          */\n-         if (device->devinfo.rev >= 5)\n-            tex.array_stride_64_byte_aligned <<= 1;\n-#endif\n-\n          /* At this point we don't have the job. That's the reason the first\n           * parameter is NULL, to avoid a crash when cl_pack_emit_reloc tries to\n           * add the bo to the job. This also means that we need to add manually\n@@ -138,7 +119,44 @@ pack_texture_shader_state_helper(struct v3dv_device *device,\n                               iplane);\n          tex.texture_base_pointer = v3dv_cl_address(NULL, base_offset);\n \n+         bool is_srgb = vk_format_is_srgb(image_view->vk.format);\n+\n+         /* V3D 4.x doesn't have the reverse and swap_r/b bits, so we compose\n+          * the reverse and/or swap_r/b swizzle from the format table with the\n+          * image view swizzle. This, however, doesn't work for border colors,\n+          * for that there is the reverse_standard_border_color.\n+          *\n+          * In v3d 7.x, however, there is no reverse_standard_border_color bit,\n+          * since the reverse and swap_r/b bits also affect border colors. It is\n+          * because of this that we absolutely need to use these bits with\n+          * reversed and swpaped formats, since that's the only way to ensure\n+          * correct border colors. In that case we don't want to program the\n+          * swizzle to the composition of the format swizzle and the view\n+          * swizzle like we do in v3d 4.x, since the format swizzle is applied\n+          * via the reverse and swap_r/b bits.\n+          */\n+#if V3D_VERSION == 42\n+         tex.srgb = is_srgb;\n+         tex.reverse_standard_border_color =\n+            image_view->planes[plane].channel_reverse;\n+#endif\n #if V3D_VERSION >= 71\n+         tex.transfer_func = is_srgb ? TRANSFER_FUNC_SRGB : TRANSFER_FUNC_NONE;\n+\n+         tex.reverse = image_view->planes[plane].channel_reverse;\n+         tex.r_b_swap = image_view->planes[plane].swap_rb;\n+\n+         if (tex.reverse || tex.r_b_swap) {\n+            tex.swizzle_r =\n+               v3d_translate_pipe_swizzle(image_view->view_swizzle[0]);\n+            tex.swizzle_g =\n+               v3d_translate_pipe_swizzle(image_view->view_swizzle[1]);\n+            tex.swizzle_b =\n+               v3d_translate_pipe_swizzle(image_view->view_swizzle[2]);\n+            tex.swizzle_a =\n+               v3d_translate_pipe_swizzle(image_view->view_swizzle[3]);\n+         }\n+\n          tex.chroma_offset_x = 1;\n          tex.chroma_offset_y = 1;\n          /* See comment in XML field definition for rationale of the shifts */\ndiff --git a/src/broadcom/vulkan/v3dvx_private.h b/src/broadcom/vulkan/v3dvx_private.h\nindex 1ce4789c5ac..27d6736c0e3 100644\n--- a/src/broadcom/vulkan/v3dvx_private.h\n+++ b/src/broadcom/vulkan/v3dvx_private.h\n@@ -131,7 +131,8 @@ v3dX(get_hw_clear_color)(const VkClearColorValue *color,\n /* Used at v3dv_device */\n \n void\n-v3dX(pack_sampler_state)(struct v3dv_sampler *sampler,\n+v3dX(pack_sampler_state)(const struct v3dv_device *device,\n+                         struct v3dv_sampler *sampler,\n                          const VkSamplerCreateInfo *pCreateInfo,\n                          const VkSamplerCustomBorderColorCreateInfoEXT *bc_info);\n \ndiff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c\nindex 970a082aa85..8cca1a5030b 100644\n--- a/src/gallium/drivers/v3d/v3dx_state.c\n+++ b/src/gallium/drivers/v3d/v3dx_state.c\n@@ -960,12 +960,6 @@ v3d_setup_texture_shader_state(const struct v3d_device_info *devinfo,\n         /* See comment in XML field definition for rationale of the shifts */\n         tex->texture_base_pointer_cb = base_offset >> 6;\n         tex->texture_base_pointer_cr = base_offset >> 6;\n-\n-        /* V3D 7.1.5 has array stride start at bit 33 instead of bit 32 to\n-         * make room for the RB swap bit.\n-         */\n-        if (devinfo->rev >= 5)\n-                tex->array_stride_64_byte_aligned <<= 1;\n #endif\n \n         /* Since other platform devices may produce UIF images even\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0128-v3dv-fix-color-write-mask-for-v3d-7.x.patch",
    "content": "From ef1159ad68e4969992a61b1fcdf9103409f689ca Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 8 Feb 2023 08:41:12 +0100\nSubject: [PATCH 128/142] v3dv: fix color write mask for v3d 7.x\n\n---\n src/broadcom/vulkan/v3dvx_cmd_buffer.c | 10 ++++++++--\n 1 file changed, 8 insertions(+), 2 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex 580aeb8ba2b..6827c829934 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -1627,9 +1627,15 @@ v3dX(cmd_buffer_emit_color_write_mask)(struct v3dv_cmd_buffer *cmd_buffer)\n \n    struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline;\n    struct v3dv_dynamic_state *dynamic = &cmd_buffer->state.dynamic;\n+   uint32_t color_write_mask = ~dynamic->color_write_enable |\n+                               pipeline->blend.color_write_masks;\n+#if V3D_VERSION <= 42\n+   /* Only 4 RTs */\n+   color_write_mask &= 0xffff;\n+#endif\n+\n    cl_emit(&job->bcl, COLOR_WRITE_MASKS, mask) {\n-      mask.mask = (~dynamic->color_write_enable |\n-                   pipeline->blend.color_write_masks) & 0xffff;\n+      mask.mask = color_write_mask;\n    }\n \n    cmd_buffer->state.dirty &= ~V3DV_CMD_DIRTY_COLOR_WRITE_ENABLE;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0129-v3d-v3dv-fix-depth-bias-for-v3d-7.x.patch",
    "content": "From aee0180b79a6a546d1e7263d89ef868016082687 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 8 Feb 2023 09:04:02 +0100\nSubject: [PATCH 129/142] v3d,v3dv: fix depth bias for v3d 7.x\n\nIn v3d 7.x we don't need to scale up depth bias for D16 buffers.\n---\n src/broadcom/vulkan/v3dvx_cmd_buffer.c | 2 ++\n src/gallium/drivers/v3d/v3dx_emit.c    | 3 ++-\n src/gallium/drivers/v3d/v3dx_state.c   | 4 +++-\n 3 files changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\nindex 6827c829934..1bd634f5027 100644\n--- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c\n@@ -1499,8 +1499,10 @@ v3dX(cmd_buffer_emit_depth_bias)(struct v3dv_cmd_buffer *cmd_buffer)\n    cl_emit(&job->bcl, DEPTH_OFFSET, bias) {\n       bias.depth_offset_factor = dynamic->depth_bias.slope_factor;\n       bias.depth_offset_units = dynamic->depth_bias.constant_factor;\n+#if V3D_VERSION <= 42\n       if (pipeline->depth_bias.is_z16)\n          bias.depth_offset_units *= 256.0f;\n+#endif\n       bias.limit = dynamic->depth_bias.depth_bias_clamp;\n    }\n \ndiff --git a/src/gallium/drivers/v3d/v3dx_emit.c b/src/gallium/drivers/v3d/v3dx_emit.c\nindex 87e75281dc9..82a45e44f82 100644\n--- a/src/gallium/drivers/v3d/v3dx_emit.c\n+++ b/src/gallium/drivers/v3d/v3dx_emit.c\n@@ -558,7 +558,8 @@ v3dX(emit_state)(struct pipe_context *pctx)\n \n         if (v3d->dirty & V3D_DIRTY_RASTERIZER &&\n             v3d->rasterizer->base.offset_tri) {\n-                if (job->zsbuf &&\n+                if (v3d->screen->devinfo.ver <= 42 &&\n+                    job->zsbuf &&\n                     job->zsbuf->format == PIPE_FORMAT_Z16_UNORM) {\n                         cl_emit_prepacked_sized(&job->bcl,\n                                                 v3d->rasterizer->depth_offset_z16,\ndiff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c\nindex 8cca1a5030b..a7fad572a2d 100644\n--- a/src/gallium/drivers/v3d/v3dx_state.c\n+++ b/src/gallium/drivers/v3d/v3dx_state.c\n@@ -111,9 +111,10 @@ v3d_create_rasterizer_state(struct pipe_context *pctx,\n #endif\n         }\n \n-        /* The HW treats polygon offset units based on a Z24 buffer, so we\n+        /* V3d 4.x treats polygon offset units based on a Z24 buffer, so we\n          * need to scale up offset_units if we're only Z16.\n          */\n+#if V3D_VERSION <= 42\n         v3dx_pack(&so->depth_offset_z16, DEPTH_OFFSET, depth) {\n                 depth.depth_offset_factor = cso->offset_scale;\n                 depth.depth_offset_units = cso->offset_units * 256.0;\n@@ -121,6 +122,7 @@ v3d_create_rasterizer_state(struct pipe_context *pctx,\n                 depth.limit = cso->offset_clamp;\n #endif\n         }\n+#endif\n \n         return so;\n }\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0130-v3d-v3dv-fix-compute-for-V3D-7.1.6.patch",
    "content": "From 221d4079c616752b249cefb352268fce5758b578 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Thu, 9 Mar 2023 19:05:19 +0100\nSubject: [PATCH 130/142] v3d,v3dv: fix compute for V3D 7.1.6+\n\n---\n src/broadcom/vulkan/v3dv_cmd_buffer.c | 25 +++++++++++++++++++++----\n src/broadcom/vulkan/v3dv_private.h    |  3 ++-\n src/broadcom/vulkan/v3dv_queue.c      |  2 +-\n src/gallium/drivers/v3d/v3dx_draw.c   | 14 +++++++++++---\n 4 files changed, 35 insertions(+), 9 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c\nindex 36bd7960985..609c7acfa8f 100644\n--- a/src/broadcom/vulkan/v3dv_cmd_buffer.c\n+++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c\n@@ -3816,6 +3816,7 @@ cmd_buffer_emit_pre_dispatch(struct v3dv_cmd_buffer *cmd_buffer)\n \n void\n v3dv_cmd_buffer_rewrite_indirect_csd_job(\n+   struct v3dv_device *device,\n    struct v3dv_csd_indirect_cpu_job_info *info,\n    const uint32_t *wg_counts)\n {\n@@ -3835,8 +3836,15 @@ v3dv_cmd_buffer_rewrite_indirect_csd_job(\n    submit->cfg[1] = wg_counts[1] << V3D_CSD_CFG012_WG_COUNT_SHIFT;\n    submit->cfg[2] = wg_counts[2] << V3D_CSD_CFG012_WG_COUNT_SHIFT;\n \n-   submit->cfg[4] = DIV_ROUND_UP(info->wg_size, 16) *\n-                    (wg_counts[0] * wg_counts[1] * wg_counts[2]) - 1;\n+   uint32_t num_batches = DIV_ROUND_UP(info->wg_size, 16) *\n+                          (wg_counts[0] * wg_counts[1] * wg_counts[2]);\n+   /* V3D 7.1.6 and later don't subtract 1 from the number of batches */\n+   if (device->devinfo.ver < 71 ||\n+       (device->devinfo.ver == 71 && device->devinfo.rev < 6)) {\n+      submit->cfg[4] = num_batches - 1;\n+   } else {\n+      submit->cfg[4] = num_batches;\n+   }\n    assert(submit->cfg[4] != ~0);\n \n    if (info->needs_wg_uniform_rewrite) {\n@@ -3869,6 +3877,7 @@ cmd_buffer_create_csd_job(struct v3dv_cmd_buffer *cmd_buffer,\n                           uint32_t **wg_uniform_offsets_out,\n                           uint32_t *wg_size_out)\n {\n+   struct v3dv_device *device = cmd_buffer->device;\n    struct v3dv_pipeline *pipeline = cmd_buffer->state.compute.pipeline;\n    assert(pipeline && pipeline->shared_data->variants[BROADCOM_SHADER_COMPUTE]);\n    struct v3dv_shader_variant *cs_variant =\n@@ -3927,18 +3936,26 @@ cmd_buffer_create_csd_job(struct v3dv_cmd_buffer *cmd_buffer,\n    if (wg_size_out)\n       *wg_size_out = wg_size;\n \n-   submit->cfg[4] = num_batches - 1;\n+   /* V3D 7.1.6 and later don't subtract 1 from the number of batches */\n+   if (device->devinfo.ver < 71 ||\n+       (device->devinfo.ver == 71 && device->devinfo.rev < 6)) {\n+      submit->cfg[4] = num_batches - 1;\n+   } else {\n+      submit->cfg[4] = num_batches;\n+   }\n    assert(submit->cfg[4] != ~0);\n \n    assert(pipeline->shared_data->assembly_bo);\n    struct v3dv_bo *cs_assembly_bo = pipeline->shared_data->assembly_bo;\n \n    submit->cfg[5] = cs_assembly_bo->offset + cs_variant->assembly_offset;\n-   submit->cfg[5] |= V3D_CSD_CFG5_PROPAGATE_NANS;\n    if (cs_variant->prog_data.base->single_seg)\n       submit->cfg[5] |= V3D_CSD_CFG5_SINGLE_SEG;\n    if (cs_variant->prog_data.base->threads == 4)\n       submit->cfg[5] |= V3D_CSD_CFG5_THREADING;\n+   /* V3D 7.x has made the PROPAGATE_NANS bit in CFG5 reserved  */\n+   if (device->devinfo.ver < 71)\n+      submit->cfg[5] |= V3D_CSD_CFG5_PROPAGATE_NANS;\n \n    if (cs_variant->prog_data.cs->shared_size > 0) {\n       job->csd.shared_memory =\ndiff --git a/src/broadcom/vulkan/v3dv_private.h b/src/broadcom/vulkan/v3dv_private.h\nindex 8adb8873efd..2f3ef185126 100644\n--- a/src/broadcom/vulkan/v3dv_private.h\n+++ b/src/broadcom/vulkan/v3dv_private.h\n@@ -1818,7 +1818,8 @@ void v3dv_cmd_buffer_copy_query_results(struct v3dv_cmd_buffer *cmd_buffer,\n void v3dv_cmd_buffer_add_tfu_job(struct v3dv_cmd_buffer *cmd_buffer,\n                                  struct drm_v3d_submit_tfu *tfu);\n \n-void v3dv_cmd_buffer_rewrite_indirect_csd_job(struct v3dv_csd_indirect_cpu_job_info *info,\n+void v3dv_cmd_buffer_rewrite_indirect_csd_job(struct v3dv_device *device,\n+                                              struct v3dv_csd_indirect_cpu_job_info *info,\n                                               const uint32_t *wg_counts);\n \n void v3dv_cmd_buffer_add_private_obj(struct v3dv_cmd_buffer *cmd_buffer,\ndiff --git a/src/broadcom/vulkan/v3dv_queue.c b/src/broadcom/vulkan/v3dv_queue.c\nindex b4aae195180..429d14a9196 100644\n--- a/src/broadcom/vulkan/v3dv_queue.c\n+++ b/src/broadcom/vulkan/v3dv_queue.c\n@@ -408,7 +408,7 @@ handle_csd_indirect_cpu_job(struct v3dv_queue *queue,\n \n    if (memcmp(group_counts, info->csd_job->csd.wg_count,\n               sizeof(info->csd_job->csd.wg_count)) != 0) {\n-      v3dv_cmd_buffer_rewrite_indirect_csd_job(info, group_counts);\n+      v3dv_cmd_buffer_rewrite_indirect_csd_job(queue->device, info, group_counts);\n    }\n \n    return VK_SUCCESS;\ndiff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c\nindex e4b414b0676..4e1af41d50e 100644\n--- a/src/gallium/drivers/v3d/v3dx_draw.c\n+++ b/src/gallium/drivers/v3d/v3dx_draw.c\n@@ -1473,8 +1473,15 @@ v3d_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)\n         submit.cfg[3] |= (wg_size & 0xff) << V3D_CSD_CFG3_WG_SIZE_SHIFT;\n \n \n-        /* Number of batches the dispatch will invoke (minus 1). */\n-        submit.cfg[4] = num_batches - 1;\n+        /* Number of batches the dispatch will invoke.\n+         * V3D 7.1.6 and later don't subtract 1 from the number of batches\n+         */\n+        if (v3d->screen->devinfo.ver < 71 ||\n+            (v3d->screen->devinfo.ver == 71 && v3d->screen->devinfo.rev < 6)) {\n+                submit.cfg[4] = num_batches - 1;\n+        } else {\n+                submit.cfg[4] = num_batches;\n+        }\n \n         /* Make sure we didn't accidentally underflow. */\n         assert(submit.cfg[4] != ~0);\n@@ -1482,7 +1489,8 @@ v3d_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)\n         v3d_job_add_bo(job, v3d_resource(v3d->prog.compute->resource)->bo);\n         submit.cfg[5] = (v3d_resource(v3d->prog.compute->resource)->bo->offset +\n                          v3d->prog.compute->offset);\n-        submit.cfg[5] |= V3D_CSD_CFG5_PROPAGATE_NANS;\n+        if (v3d->screen->devinfo.ver < 71)\n+                submit.cfg[5] |= V3D_CSD_CFG5_PROPAGATE_NANS;\n         if (v3d->prog.compute->prog_data.base->single_seg)\n                 submit.cfg[5] |= V3D_CSD_CFG5_SINGLE_SEG;\n         if (v3d->prog.compute->prog_data.base->threads == 4)\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0131-broadcom-add-performance-counters-for-V3D-7.x.patch",
    "content": "From be6c7ba62dbdb9c5babd33a518a042dd554679d7 Mon Sep 17 00:00:00 2001\nFrom: \"Juan A. Suarez Romero\" <jasuarez@igalia.com>\nDate: Wed, 22 Feb 2023 09:43:40 +0100\nSubject: [PATCH 131/142] broadcom: add performance counters for V3D 7.x\n\nSome of the counters need to be defined correctly.\n\nv2: Remove references to extended performance counters. The hw does\n    not support them.\n\nSigned-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>\n---\n .../common/v3d_performance_counters.h         | 108 ++++++++++++++++++\n src/broadcom/simulator/v3d_simulator.c        |   8 +-\n src/broadcom/simulator/v3dx_simulator.c       |   2 +-\n src/broadcom/vulkan/meson.build               |   1 +\n src/broadcom/vulkan/v3dv_private.h            |   7 +-\n src/broadcom/vulkan/v3dv_query.c              |  43 +------\n src/broadcom/vulkan/v3dvx_private.h           |   6 +\n src/broadcom/vulkan/v3dvx_query.c             |  67 +++++++++++\n src/gallium/drivers/v3d/meson.build           |   2 +-\n src/gallium/drivers/v3d/v3d_query.c           |  20 +++-\n src/gallium/drivers/v3d/v3d_query.h           |   6 -\n src/gallium/drivers/v3d/v3dx_context.h        |  10 ++\n ...d_query_perfcnt.c => v3dx_query_perfcnt.c} |  12 +-\n 13 files changed, 233 insertions(+), 59 deletions(-)\n create mode 100644 src/broadcom/vulkan/v3dvx_query.c\n rename src/gallium/drivers/v3d/{v3d_query_perfcnt.c => v3dx_query_perfcnt.c} (94%)\n\ndiff --git a/src/broadcom/common/v3d_performance_counters.h b/src/broadcom/common/v3d_performance_counters.h\nindex 08d750c2cbe..a8f0cff8784 100644\n--- a/src/broadcom/common/v3d_performance_counters.h\n+++ b/src/broadcom/common/v3d_performance_counters.h\n@@ -28,6 +28,110 @@\n #define V3D_PERFCNT_NAME 1\n #define V3D_PERFCNT_DESCRIPTION 2\n \n+#ifndef V3D_VERSION\n+#  error \"The V3D_VERSION macro must be defined\"\n+#endif\n+\n+#if (V3D_VERSION >= 71)\n+\n+static const char *v3d_performance_counters[][3] = {\n+   {\"CORE\", \"cycle-count\", \"[CORE] Cycle counter\"},\n+   {\"CORE\", \"core-active\", \"[CORE] Bin/Render/Compute active cycles\"},\n+   {\"CLE\", \"CLE-bin-thread-active-cycles\", \"[CLE] Bin thread active cycles\"},\n+   {\"CLE\", \"CLE-render-thread-active-cycles\", \"[CLE] Render thread active cycles\"},\n+   {\"CORE\", \"compute-active-cycles\", \"[CORE] Compute active cycles\"},\n+   {\"FEP\", \"FEP-valid-primitives-no-rendered-pixels\", \"[FEP] Valid primitives that result in no rendered pixels, for all rendered tiles\"},\n+   {\"FEP\", \"FEP-valid-primitives-rendered-pixels\", \"[FEP] Valid primitives for all rendered tiles (primitives may be counted in more than one tile)\"},\n+   {\"FEP\", \"FEP-clipped-quads\", \"[FEP] Early-Z/Near/Far clipped quads\"},\n+   {\"FEP\", \"FEP-valid-quads\", \"[FEP] Valid quads\"},\n+   {\"TLB\", \"TLB-quads-not-passing-stencil-test\", \"[TLB] Quads with no pixels passing the stencil test\"},\n+   {\"TLB\", \"TLB-quads-not-passing-z-and-stencil-test\", \"[TLB] Quads with no pixels passing the Z and stencil tests\"},\n+   {\"TLB\", \"TLB-quads-passing-z-and-stencil-test\", \"[TLB] Quads with any pixels passing the Z and stencil tests\"},\n+   {\"TLB\", \"TLB-quads-written-to-color-buffer\", \"[TLB] Quads with valid pixels written to colour buffer\"},\n+   {\"TLB\", \"TLB-partial-quads-written-to-color-buffer\", \"[TLB] Partial quads written to the colour buffer\"},\n+   {\"PTB\", \"PTB-primitives-need-clipping\", \"[PTB] Primitives that need clipping\"},\n+   {\"PTB\", \"PTB-primitives-discarded-outside-viewport\", \"[PTB] Primitives discarded by being outside the viewport\"},\n+   {\"PTB\", \"PTB-primitives-binned\", \"[PTB] Total primitives binned\"},\n+   {\"PTB\", \"PTB-primitives-discarded-reversed\", \"[PTB] Primitives that are discarded because they are reversed\"},\n+   {\"QPU\", \"QPU-total-instr-cache-hit\", \"[QPU] Total instruction cache hits for all slices\"},\n+   {\"QPU\", \"QPU-total-instr-cache-miss\", \"[QPU] Total instruction cache misses for all slices\"},\n+   {\"QPU\", \"QPU-total-uniform-cache-hit\", \"[QPU] Total uniforms cache hits for all slices\"},\n+   {\"QPU\", \"QPU-total-uniform-cache-miss\", \"[QPU] Total uniforms cache misses for all slices\"},\n+   {\"TMU\", \"TMU-active-cycles\", \"[TMU] Active cycles\"},\n+   {\"TMU\", \"TMU-stalled-cycles\", \"[TMU] Stalled cycles\"},\n+   {\"TMU\", \"TMU-total-text-quads-access\", \"[TMU] Total texture cache accesses\"},\n+   {\"TMU\", \"TMU-cache-x4-active-cycles\", \"[TMU] Cache active cycles for x4 access\"},\n+   {\"TMU\", \"TMU-cache-x4-stalled-cycles\", \"[TMU] Cache stalled cycles for x4 access\"},\n+   {\"TMU\", \"TMU-total-text-quads-x4-access\", \"[TMU] Total texture cache x4 access\"},\n+   {\"L2T\", \"L2T-total-cache-hit\", \"[L2T] Total Level 2 cache hits\"},\n+   {\"L2T\", \"L2T-total-cache-miss\", \"[L2T] Total Level 2 cache misses\"},\n+   {\"L2T\", \"L2T-local\", \"[L2T] Local mode access\"},\n+   {\"L2T\", \"L2T-writeback\", \"[L2T] Writeback\"},\n+   {\"L2T\", \"L2T-zero\", \"[L2T] Zero\"},\n+   {\"L2T\", \"L2T-merge\", \"[L2T] Merge\"},\n+   {\"L2T\", \"L2T-fill\", \"[L2T] Fill\"},\n+   {\"L2T\", \"L2T-stalls-no-wid\", \"[L2T] Stalls because no WID available\"},\n+   {\"L2T\", \"L2T-stalls-no-rid\", \"[L2T] Stalls because no RID available\"},\n+   {\"L2T\", \"L2T-stalls-queue-full\", \"[L2T] Stalls because internal queue full\"},\n+   {\"L2T\", \"L2T-stalls-wrightback\", \"[L2T] Stalls because writeback in flight\"},\n+   {\"L2T\", \"L2T-stalls-mem\", \"[L2T] Stalls because AXI blocks read\"},\n+   {\"L2T\", \"L2T-stalls-fill\", \"[L2T] Stalls because fill pending for victim cache-line\"},\n+   {\"L2T\", \"L2T-hitq\", \"[L2T] Sent request via hit queue\"},\n+   {\"L2T\", \"L2T-hitq-full\", \"[L2T] Sent request via main queue because hit queue is full\"},\n+   {\"L2T\", \"L2T-stalls-read-data\", \"[L2T] Stalls because waiting for data from SDRAM\"},\n+   {\"L2T\", \"L2T-TMU-read-hits\", \"[L2T] TMU read hits\"},\n+   {\"L2T\", \"L2T-TMU-read-miss\", \"[L2T] TMU read misses\"},\n+   {\"L2T\", \"L2T-VCD-read-hits\", \"[L2T] VCD read hits\"},\n+   {\"L2T\", \"L2T-VCD-read-miss\", \"[L2T] VCD read misses\"},\n+   {\"L2T\", \"L2T-SLC-read-hits\", \"[L2T] SLC read hits (all slices)\"},\n+   {\"L2T\", \"L2T-SLC-read-miss\", \"[L2T] SLC read misses (all slices)\"},\n+   {\"AXI\", \"AXI-writes-seen-watch-0\", \"[AXI] Writes seen by watch 0\"},\n+   {\"AXI\", \"AXI-reads-seen-watch-0\", \"[AXI] Reads seen by watch 0\"},\n+   {\"AXI\", \"AXI-writes-stalled-seen-watch-0\", \"[AXI] Write stalls seen by watch 0\"},\n+   {\"AXI\", \"AXI-reads-stalled-seen-watch-0\", \"[AXI] Read stalls seen by watch 0\"},\n+   {\"AXI\", \"AXI-write-bytes-seen-watch-0\", \"[AXI] Total bytes written seen by watch 0\"},\n+   {\"AXI\", \"AXI-read-bytes-seen-watch-0\", \"[AXI] Total bytes read seen by watch 0\"},\n+   {\"AXI\", \"AXI-writes-seen-watch-1\", \"[AXI] Writes seen by watch 1\"},\n+   {\"AXI\", \"AXI-reads-seen-watch-1\", \"[AXI] Reads seen by watch 1\"},\n+   {\"AXI\", \"AXI-writes-stalled-seen-watch-1\", \"[AXI] Write stalls seen by watch 1\"},\n+   {\"AXI\", \"AXI-reads-stalled-seen-watch-1\", \"[AXI] Read stalls seen by watch 1\"},\n+   {\"AXI\", \"AXI-write-bytes-seen-watch-1\", \"[AXI] Total bytes written seen by watch 1\"},\n+   {\"AXI\", \"AXI-read-bytes-seen-watch-1\", \"[AXI] Total bytes read seen by watch 1\"},\n+   {\"CORE\", \"core-memory-writes\", \"[CORE] Total memory writes\"},\n+   {\"L2T\", \"L2T-memory-writes\", \"[L2T] Total memory writes\"},\n+   {\"PTB\", \"PTB-memory-writes\", \"[PTB] Total memory writes\"},\n+   {\"TLB\", \"TLB-memory-writes\", \"[TLB] Total memory writes\"},\n+   {\"CORE\", \"core-memory-reads\", \"[CORE] Total memory reads\"},\n+   {\"L2T\", \"L2T-memory-reads\", \"[L2T] Total memory reads\"},\n+   {\"PTB\", \"PTB-memory-reads\", \"[PTB] Total memory reads\"},\n+   {\"PSE\", \"PSE-memory-reads\", \"[PSE] Total memory reads\"},\n+   {\"TLB\", \"TLB-memory-reads\", \"[TLB] Total memory reads\"},\n+   {\"PTB\", \"PTB-memory-words-writes\", \"[PTB] Total memory words written\"},\n+   {\"TLB\", \"TLB-memory-words-writes\", \"[TLB] Total memory words written\"},\n+   {\"PSE\", \"PSE-memory-words-reads\", \"[PSE] Total memory words read\"},\n+   {\"TLB\", \"TLB-memory-words-reads\", \"[TLB] Total memory words read\"},\n+   {\"AXI\", \"AXI-read-trans\", \"[AXI] Read transaction count\"},\n+   {\"AXI\", \"AXI-write-trans\", \"[AXI] Write transaction count\"},\n+   {\"AXI\", \"AXI-read-wait-cycles\", \"[AXI] Read total wait cycles\"},\n+   {\"AXI\", \"AXI-write-wait-cycles\", \"[AXI] Write total wait cycles\"},\n+   {\"AXI\", \"AXI-max-outstanding-reads\", \"[AXI] Maximium outstanding read transactions\"},\n+   {\"AXI\", \"AXI-max-outstanding-writes\", \"[AXI] Maximum outstanding write transactions\"},\n+   {\"QPU\", \"QPU-wait-bubble\", \"[QPU] Pipeline bubble in qcycles due all threads waiting\"},\n+   {\"QPU\", \"QPU-ic-miss-bubble\", \"[QPU] Pipeline bubble in qcycles due instruction-cache miss\"},\n+   {\"QPU\", \"QPU-active\", \"[QPU] Executed shader instruction\"},\n+   {\"QPU\", \"QPU-total-active-clk-cycles-fragment-shading\", \"[QPU] Total active clock cycles for all QPUs doing fragment shading (counts only when QPU is not stalled)\"},\n+   {\"QPU\", \"QPU-stalls\", \"[QPU] Stalled qcycles executing shader instruction\"},\n+   {\"QPU\", \"QPU-total-clk-cycles-waiting-fragment-shading\", \"[QPU] Total stalled clock cycles for all QPUs doing fragment shading\"},\n+   {\"QPU\", \"QPU-stalls-TMU\", \"[QPU] Stalled qcycles waiting for TMU\"},\n+   {\"QPU\", \"QPU-stalls-TLB\", \"[QPU] Stalled qcycles waiting for TLB\"},\n+   {\"QPU\", \"QPU-stalls-VPM\", \"[QPU] Stalled qcycles waiting for VPM\"},\n+   {\"QPU\", \"QPU-stalls-uniforms\", \"[QPU] Stalled qcycles waiting for uniforms\"},\n+   {\"QPU\", \"QPU-stalls-SFU\", \"[QPU] Stalled qcycles waiting for SFU\"},\n+   {\"QPU\", \"QPU-stalls-other\", \"[QPU] Stalled qcycles waiting for any other reason (vary/W/Z)\"},\n+};\n+\n+#elif (V3D_VERSION >= 41)\n+\n static const char *v3d_performance_counters[][3] = {\n    {\"FEP\", \"FEP-valid-primitives-no-rendered-pixels\", \"[FEP] Valid primitives that result in no rendered pixels, for all rendered tiles\"},\n    {\"FEP\", \"FEP-valid-primitives-rendered-pixels\", \"[FEP] Valid primitives for all rendered tiles (primitives may be counted in more than one tile)\"},\n@@ -118,4 +222,8 @@ static const char *v3d_performance_counters[][3] = {\n    {\"CORE\", \"compute-active-cycles\", \"[CORE] Compute active cycles\"},\n };\n \n+#else\n+static const char *v3d_performance_counters[][3] = { };\n+#endif\n+\n #endif\ndiff --git a/src/broadcom/simulator/v3d_simulator.c b/src/broadcom/simulator/v3d_simulator.c\nindex 5cceb1a82cc..36e719296f4 100644\n--- a/src/broadcom/simulator/v3d_simulator.c\n+++ b/src/broadcom/simulator/v3d_simulator.c\n@@ -92,6 +92,9 @@ static struct v3d_simulator_state {\n         /** Last performance monitor ID. */\n         uint32_t last_perfid;\n \n+        /** Total performance counters */\n+        uint32_t perfcnt_total;\n+\n         struct util_dynarray bin_oom;\n         int refcount;\n } sim_state = {\n@@ -751,7 +754,7 @@ v3d_simulator_perfmon_create_ioctl(int fd, struct drm_v3d_perfmon_create *args)\n \n         perfmon->ncounters = args->ncounters;\n         for (int i = 0; i < args->ncounters; i++) {\n-                if (args->counters[i] >= V3D_PERFCNT_NUM) {\n+                if (args->counters[i] >= sim_state.perfcnt_total) {\n                         ralloc_free(perfmon);\n                         return -EINVAL;\n                 } else {\n@@ -918,13 +921,16 @@ v3d_simulator_init_global()\n         switch(sim_state.ver) {\n         case 33:\n                 v3d33_simulator_init_regs(sim_state.v3d);\n+                sim_state.perfcnt_total = 0;\n                 break;\n         case 41:\n         case 42:\n                 v3d41_simulator_init_regs(sim_state.v3d);\n+                sim_state.perfcnt_total = 87;\n                 break;\n         case 71:\n                 v3d71_simulator_init_regs(sim_state.v3d);\n+                sim_state.perfcnt_total = 93;\n                 break;\n         default:\n                 unreachable(\"Not supported V3D version\\n\");\ndiff --git a/src/broadcom/simulator/v3dx_simulator.c b/src/broadcom/simulator/v3dx_simulator.c\nindex 4ea177c9bb7..4520fe75719 100644\n--- a/src/broadcom/simulator/v3dx_simulator.c\n+++ b/src/broadcom/simulator/v3dx_simulator.c\n@@ -50,7 +50,7 @@\n #include \"libs/core/v3d/registers/7.1.5.1/v3d.h\"\n #else\n #if V3D_VERSION == 41 || V3D_VERSION == 42\n-#include \"libs/core/v3d/registers/4.1.35.0/v3d.h\"\n+#include \"libs/core/v3d/registers/4.2.14.0/v3d.h\"\n #else\n #include \"libs/core/v3d/registers/3.3.0.0/v3d.h\"\n #endif\ndiff --git a/src/broadcom/vulkan/meson.build b/src/broadcom/vulkan/meson.build\nindex 3da7364686f..182388a35b4 100644\n--- a/src/broadcom/vulkan/meson.build\n+++ b/src/broadcom/vulkan/meson.build\n@@ -65,6 +65,7 @@ files_per_version = files(\n   'v3dvx_pipeline.c',\n   'v3dvx_meta_common.c',\n   'v3dvx_pipeline.c',\n+  'v3dvx_query.c',\n   'v3dvx_queue.c',\n )\n \ndiff --git a/src/broadcom/vulkan/v3dv_private.h b/src/broadcom/vulkan/v3dv_private.h\nindex 2f3ef185126..89e2f1c7e5c 100644\n--- a/src/broadcom/vulkan/v3dv_private.h\n+++ b/src/broadcom/vulkan/v3dv_private.h\n@@ -123,6 +123,9 @@ struct v3d_simulator_file;\n /* Minimum required by the Vulkan 1.1 spec */\n #define MAX_MEMORY_ALLOCATION_SIZE (1ull << 30)\n \n+/* Maximum performance counters number */\n+#define V3D_MAX_PERFCNT 93\n+\n struct v3dv_physical_device {\n    struct vk_physical_device vk;\n \n@@ -1210,7 +1213,7 @@ struct v3dv_timestamp_query_cpu_job_info {\n };\n \n /* Number of perfmons required to handle all supported performance counters */\n-#define V3DV_MAX_PERFMONS DIV_ROUND_UP(V3D_PERFCNT_NUM, \\\n+#define V3DV_MAX_PERFMONS DIV_ROUND_UP(V3D_MAX_PERFCNT, \\\n                                        DRM_V3D_MAX_PERF_COUNTERS)\n \n struct v3dv_perf_query {\n@@ -1682,7 +1685,7 @@ struct v3dv_query_pool {\n    /* Only used with performance queries */\n    struct {\n       uint32_t ncounters;\n-      uint8_t counters[V3D_PERFCNT_NUM];\n+      uint8_t counters[V3D_MAX_PERFCNT];\n \n       /* V3D has a limit on the number of counters we can track in a\n        * single performance monitor, so if too many counters are requested\ndiff --git a/src/broadcom/vulkan/v3dv_query.c b/src/broadcom/vulkan/v3dv_query.c\nindex 3284c467d74..deb7821f02b 100644\n--- a/src/broadcom/vulkan/v3dv_query.c\n+++ b/src/broadcom/vulkan/v3dv_query.c\n@@ -23,7 +23,6 @@\n \n #include \"v3dv_private.h\"\n \n-#include \"common/v3d_performance_counters.h\"\n #include \"util/timespec.h\"\n #include \"compiler/nir/nir_builder.h\"\n \n@@ -48,7 +47,7 @@ kperfmon_create(struct v3dv_device *device,\n                            DRM_IOCTL_V3D_PERFMON_CREATE,\n                            &req);\n       if (ret)\n-         fprintf(stderr, \"Failed to create perfmon: %s\\n\", strerror(ret));\n+         fprintf(stderr, \"Failed to create perfmon for query %d: %s\\n\", query, strerror(ret));\n \n       pool->queries[query].perf.kperfmon_ids[i] = req.id;\n    }\n@@ -303,7 +302,6 @@ v3dv_CreateQueryPool(VkDevice _device,\n                               QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR);\n \n       assert(pq_info);\n-      assert(pq_info->counterIndexCount <= V3D_PERFCNT_NUM);\n \n       pool->perfmon.ncounters = pq_info->counterIndexCount;\n       for (uint32_t i = 0; i < pq_info->counterIndexCount; i++)\n@@ -592,7 +590,7 @@ write_performance_query_result(struct v3dv_device *device,\n    assert(pool && pool->query_type == VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR);\n \n    struct v3dv_query *q = &pool->queries[query];\n-   uint64_t counter_values[V3D_PERFCNT_NUM];\n+   uint64_t counter_values[V3D_MAX_PERFCNT];\n \n    for (uint32_t i = 0; i < pool->perfmon.nperfmons; i++) {\n       struct drm_v3d_perfmon_get_values req = {\n@@ -1284,40 +1282,11 @@ v3dv_EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(\n    VkPerformanceCounterKHR *pCounters,\n    VkPerformanceCounterDescriptionKHR *pCounterDescriptions)\n {\n-   uint32_t desc_count = *pCounterCount;\n+   V3DV_FROM_HANDLE(v3dv_physical_device, pDevice, physicalDevice);\n \n-   VK_OUTARRAY_MAKE_TYPED(VkPerformanceCounterKHR,\n-                          out, pCounters, pCounterCount);\n-   VK_OUTARRAY_MAKE_TYPED(VkPerformanceCounterDescriptionKHR,\n-                          out_desc, pCounterDescriptions, &desc_count);\n-\n-   for (int i = 0; i < ARRAY_SIZE(v3d_performance_counters); i++) {\n-      vk_outarray_append_typed(VkPerformanceCounterKHR, &out, counter) {\n-         counter->unit = VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR;\n-         counter->scope = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR;\n-         counter->storage = VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR;\n-\n-         unsigned char sha1_result[20];\n-         _mesa_sha1_compute(v3d_performance_counters[i][V3D_PERFCNT_NAME],\n-                            strlen(v3d_performance_counters[i][V3D_PERFCNT_NAME]),\n-                            sha1_result);\n-\n-         memcpy(counter->uuid, sha1_result, sizeof(counter->uuid));\n-      }\n-\n-      vk_outarray_append_typed(VkPerformanceCounterDescriptionKHR,\n-                               &out_desc, desc) {\n-         desc->flags = 0;\n-         snprintf(desc->name, sizeof(desc->name), \"%s\",\n-            v3d_performance_counters[i][V3D_PERFCNT_NAME]);\n-         snprintf(desc->category, sizeof(desc->category), \"%s\",\n-            v3d_performance_counters[i][V3D_PERFCNT_CATEGORY]);\n-         snprintf(desc->description, sizeof(desc->description), \"%s\",\n-            v3d_performance_counters[i][V3D_PERFCNT_DESCRIPTION]);\n-      }\n-   }\n-\n-   return vk_outarray_status(&out);\n+   return v3dv_X(pDevice, enumerate_performance_query_counters)(pCounterCount,\n+                                                                pCounters,\n+                                                                pCounterDescriptions);\n }\n \n VKAPI_ATTR void VKAPI_CALL\ndiff --git a/src/broadcom/vulkan/v3dvx_private.h b/src/broadcom/vulkan/v3dvx_private.h\nindex 27d6736c0e3..0f5887eab93 100644\n--- a/src/broadcom/vulkan/v3dvx_private.h\n+++ b/src/broadcom/vulkan/v3dvx_private.h\n@@ -324,6 +324,12 @@ v3dX(create_default_attribute_values)(struct v3dv_device *device,\n void\n v3dX(job_emit_noop)(struct v3dv_job *job);\n \n+/* Used at v3dv_query */\n+VkResult\n+v3dX(enumerate_performance_query_counters)(uint32_t *pCounterCount,\n+                                           VkPerformanceCounterKHR *pCounters,\n+                                           VkPerformanceCounterDescriptionKHR *pCounterDescriptions);\n+\n /* Used at v3dv_descriptor_set, and other descriptor set utils */\n uint32_t v3dX(descriptor_bo_size)(VkDescriptorType type);\n \ndiff --git a/src/broadcom/vulkan/v3dvx_query.c b/src/broadcom/vulkan/v3dvx_query.c\nnew file mode 100644\nindex 00000000000..e59a1e84ff6\n--- /dev/null\n+++ b/src/broadcom/vulkan/v3dvx_query.c\n@@ -0,0 +1,67 @@\n+/*\n+ * Copyright © 2023 Raspberry Pi Ltd\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a\n+ * copy of this software and associated documentation files (the \"Software\"),\n+ * to deal in the Software without restriction, including without limitation\n+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n+ * and/or sell copies of the Software, and to permit persons to whom the\n+ * Software is furnished to do so, subject to the following conditions:\n+ *\n+ * The above copyright notice and this permission notice (including the next\n+ * paragraph) shall be included in all copies or substantial portions of the\n+ * Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL\n+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n+ * IN THE SOFTWARE.\n+ */\n+\n+#include \"v3dv_private.h\"\n+\n+#include \"common/v3d_performance_counters.h\"\n+\n+VkResult\n+v3dX(enumerate_performance_query_counters)(uint32_t *pCounterCount,\n+                                           VkPerformanceCounterKHR *pCounters,\n+                                           VkPerformanceCounterDescriptionKHR *pCounterDescriptions)\n+{\n+   uint32_t desc_count = *pCounterCount;\n+\n+   VK_OUTARRAY_MAKE_TYPED(VkPerformanceCounterKHR,\n+                          out, pCounters, pCounterCount);\n+   VK_OUTARRAY_MAKE_TYPED(VkPerformanceCounterDescriptionKHR,\n+                          out_desc, pCounterDescriptions, &desc_count);\n+\n+   for (int i = 0; i < ARRAY_SIZE(v3d_performance_counters); i++) {\n+      vk_outarray_append_typed(VkPerformanceCounterKHR, &out, counter) {\n+         counter->unit = VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR;\n+         counter->scope = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR;\n+         counter->storage = VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR;\n+\n+         unsigned char sha1_result[20];\n+         _mesa_sha1_compute(v3d_performance_counters[i][V3D_PERFCNT_NAME],\n+                            strlen(v3d_performance_counters[i][V3D_PERFCNT_NAME]),\n+                            sha1_result);\n+\n+         memcpy(counter->uuid, sha1_result, sizeof(counter->uuid));\n+      }\n+\n+      vk_outarray_append_typed(VkPerformanceCounterDescriptionKHR,\n+                               &out_desc, desc) {\n+         desc->flags = 0;\n+         snprintf(desc->name, sizeof(desc->name), \"%s\",\n+            v3d_performance_counters[i][V3D_PERFCNT_NAME]);\n+         snprintf(desc->category, sizeof(desc->category), \"%s\",\n+            v3d_performance_counters[i][V3D_PERFCNT_CATEGORY]);\n+         snprintf(desc->description, sizeof(desc->description), \"%s\",\n+            v3d_performance_counters[i][V3D_PERFCNT_DESCRIPTION]);\n+      }\n+   }\n+\n+   return vk_outarray_status(&out);\n+}\ndiff --git a/src/gallium/drivers/v3d/meson.build b/src/gallium/drivers/v3d/meson.build\nindex b2e748573b7..289473d2ca1 100644\n--- a/src/gallium/drivers/v3d/meson.build\n+++ b/src/gallium/drivers/v3d/meson.build\n@@ -34,7 +34,6 @@ files_libv3d = files(\n   'v3d_query.c',\n   'v3d_query.h',\n   'v3d_query_pipe.c',\n-  'v3d_query_perfcnt.c',\n   'v3d_resource.c',\n   'v3d_resource.h',\n   'v3d_screen.c',\n@@ -47,6 +46,7 @@ files_per_version = files(\n   'v3dx_emit.c',\n   'v3dx_format_table.c',\n   'v3dx_job.c',\n+  'v3dx_query_perfcnt.c',\n   'v3dx_rcl.c',\n   'v3dx_state.c',\n   'v3dx_tfu.c',\ndiff --git a/src/gallium/drivers/v3d/v3d_query.c b/src/gallium/drivers/v3d/v3d_query.c\nindex db98c89625f..83f82e44a3d 100644\n--- a/src/gallium/drivers/v3d/v3d_query.c\n+++ b/src/gallium/drivers/v3d/v3d_query.c\n@@ -28,8 +28,11 @@ v3d_get_driver_query_group_info(struct pipe_screen *pscreen, unsigned index,\n                                 struct pipe_driver_query_group_info *info)\n {\n         struct v3d_screen *screen = v3d_screen(pscreen);\n+        struct v3d_device_info *devinfo = &screen->devinfo;\n \n-        return v3d_get_driver_query_group_info_perfcnt(screen, index, info);\n+        return v3d_X(devinfo, get_driver_query_group_info_perfcnt)(screen,\n+                                                                   index,\n+                                                                   info);\n }\n \n int\n@@ -37,8 +40,11 @@ v3d_get_driver_query_info(struct pipe_screen *pscreen, unsigned index,\n                           struct pipe_driver_query_info *info)\n {\n         struct v3d_screen *screen = v3d_screen(pscreen);\n+        struct v3d_device_info *devinfo = &screen->devinfo;\n \n-        return v3d_get_driver_query_info_perfcnt(screen, index, info);\n+        return v3d_X(devinfo, get_driver_query_info_perfcnt)(screen,\n+                                                             index,\n+                                                             info);\n }\n \n static struct pipe_query *\n@@ -53,9 +59,13 @@ static struct pipe_query *\n v3d_create_batch_query(struct pipe_context *pctx, unsigned num_queries,\n                        unsigned *query_types)\n {\n-        return v3d_create_batch_query_perfcnt(v3d_context(pctx),\n-                                              num_queries,\n-                                              query_types);\n+        struct v3d_context *v3d = v3d_context(pctx);\n+        struct v3d_screen *screen = v3d->screen;\n+        struct v3d_device_info *devinfo = &screen->devinfo;\n+\n+        return v3d_X(devinfo, create_batch_query_perfcnt)(v3d_context(pctx),\n+                                                          num_queries,\n+                                                          query_types);\n }\n \n static void\ndiff --git a/src/gallium/drivers/v3d/v3d_query.h b/src/gallium/drivers/v3d/v3d_query.h\nindex 3e1426b8d86..605ed1a12f9 100644\n--- a/src/gallium/drivers/v3d/v3d_query.h\n+++ b/src/gallium/drivers/v3d/v3d_query.h\n@@ -42,11 +42,5 @@ struct v3d_query\n };\n \n struct pipe_query *v3d_create_query_pipe(struct v3d_context *v3d, unsigned query_type, unsigned index);\n-struct pipe_query *v3d_create_batch_query_perfcnt(struct v3d_context *v3d, unsigned num_queries,\n-                                                  unsigned *query_types);\n-int v3d_get_driver_query_group_info_perfcnt(struct v3d_screen *screen, unsigned index,\n-                                            struct pipe_driver_query_group_info *info);\n-int v3d_get_driver_query_info_perfcnt(struct v3d_screen *screen, unsigned index,\n-                                      struct pipe_driver_query_info *info);\n \n #endif /* V3D_QUERY_H */\ndiff --git a/src/gallium/drivers/v3d/v3dx_context.h b/src/gallium/drivers/v3d/v3dx_context.h\nindex e0a5cbfb2f3..c487ac3b996 100644\n--- a/src/gallium/drivers/v3d/v3dx_context.h\n+++ b/src/gallium/drivers/v3d/v3dx_context.h\n@@ -61,3 +61,13 @@ bool v3dX(tfu)(struct pipe_context *pctx,\n                unsigned int src_layer,\n                unsigned int dst_layer,\n                bool for_mipmap);\n+\n+int v3dX(get_driver_query_group_info_perfcnt)(struct v3d_screen *screen,\n+                                              unsigned index,\n+                                              struct pipe_driver_query_group_info *info);\n+int v3dX(get_driver_query_info_perfcnt)(struct v3d_screen *screen,\n+                                        unsigned index,\n+                                        struct pipe_driver_query_info *info);\n+struct pipe_query *v3dX(create_batch_query_perfcnt)(struct v3d_context *v3d,\n+                                                    unsigned num_queries,\n+                                                    unsigned *query_types);\ndiff --git a/src/gallium/drivers/v3d/v3d_query_perfcnt.c b/src/gallium/drivers/v3d/v3dx_query_perfcnt.c\nsimilarity index 94%\nrename from src/gallium/drivers/v3d/v3d_query_perfcnt.c\nrename to src/gallium/drivers/v3d/v3dx_query_perfcnt.c\nindex e00d84e375f..431aad14b4f 100644\n--- a/src/gallium/drivers/v3d/v3d_query_perfcnt.c\n+++ b/src/gallium/drivers/v3d/v3dx_query_perfcnt.c\n@@ -52,8 +52,8 @@ kperfmon_destroy(struct v3d_context *v3d, struct v3d_perfmon_state *perfmon)\n }\n \n int\n-v3d_get_driver_query_group_info_perfcnt(struct v3d_screen *screen, unsigned index,\n-                                        struct pipe_driver_query_group_info *info)\n+v3dX(get_driver_query_group_info_perfcnt)(struct v3d_screen *screen, unsigned index,\n+                                          struct pipe_driver_query_group_info *info)\n {\n         if (!screen->has_perfmon)\n                 return 0;\n@@ -72,8 +72,8 @@ v3d_get_driver_query_group_info_perfcnt(struct v3d_screen *screen, unsigned inde\n }\n \n int\n-v3d_get_driver_query_info_perfcnt(struct v3d_screen *screen, unsigned index,\n-                                  struct pipe_driver_query_info *info)\n+v3dX(get_driver_query_info_perfcnt)(struct v3d_screen *screen, unsigned index,\n+                                    struct pipe_driver_query_info *info)\n {\n         if (!screen->has_perfmon)\n                 return 0;\n@@ -222,8 +222,8 @@ static const struct v3d_query_funcs perfcnt_query_funcs = {\n };\n \n struct pipe_query *\n-v3d_create_batch_query_perfcnt(struct v3d_context *v3d, unsigned num_queries,\n-                               unsigned *query_types)\n+v3dX(create_batch_query_perfcnt)(struct v3d_context *v3d, unsigned num_queries,\n+                                 unsigned *query_types)\n {\n         struct v3d_query_perfcnt *pquery = NULL;\n         struct v3d_query *query;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0132-broadcom-simulator-add-per-hw-version-calls.patch",
    "content": "From f7d5b57bca07eb9ba6fb292852e3b5057c0a8b8f Mon Sep 17 00:00:00 2001\nFrom: \"Juan A. Suarez Romero\" <jasuarez@igalia.com>\nDate: Mon, 20 Mar 2023 16:48:51 +0100\nSubject: [PATCH 132/142] broadcom/simulator: add per-hw version calls\n\nAdd a wrapper to allow calling the right simulator function based on the\nhardware under simulation.\n\nSigned-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>\n---\n src/broadcom/simulator/v3d_simulator.c  | 86 ++++---------------------\n src/broadcom/simulator/v3d_simulator.h  | 21 ++++++\n src/broadcom/simulator/v3dx_simulator.c |  9 ++-\n 3 files changed, 41 insertions(+), 75 deletions(-)\n\ndiff --git a/src/broadcom/simulator/v3d_simulator.c b/src/broadcom/simulator/v3d_simulator.c\nindex 36e719296f4..c4bbd61abc2 100644\n--- a/src/broadcom/simulator/v3d_simulator.c\n+++ b/src/broadcom/simulator/v3d_simulator.c\n@@ -439,15 +439,15 @@ v3d_simulator_perfmon_switch(int fd, uint32_t perfid)\n \n         perfmon = v3d_get_simulator_perfmon(fd, file->active_perfid);\n         if (perfmon)\n-                v3d41_simulator_perfmon_stop(sim_state.v3d,\n-                                             perfmon->ncounters,\n-                                             perfmon->values);\n+                v3d_X_simulator(perfmon_stop)(sim_state.v3d,\n+                                              perfmon->ncounters,\n+                                              perfmon->values);\n \n         perfmon = v3d_get_simulator_perfmon(fd, perfid);\n         if (perfmon)\n-                v3d41_simulator_perfmon_start(sim_state.v3d,\n-                                              perfmon->ncounters,\n-                                              perfmon->counters);\n+                v3d_X_simulator(perfmon_start)(sim_state.v3d,\n+                                               perfmon->ncounters,\n+                                               perfmon->counters);\n \n         file->active_perfid = perfid;\n }\n@@ -492,21 +492,7 @@ v3d_simulator_submit_cl_ioctl(int fd, struct drm_v3d_submit_cl *submit)\n         bin_fd = fd;\n \n         v3d_simulator_perfmon_switch(fd, submit->perfmon_id);\n-\n-        switch(sim_state.ver) {\n-        case 33:\n-           v3d33_simulator_submit_cl_ioctl(sim_state.v3d, submit, file->gmp->ofs);\n-           break;\n-        case 41:\n-        case 42:\n-           v3d41_simulator_submit_cl_ioctl(sim_state.v3d, submit, file->gmp->ofs);\n-           break;\n-        case 71:\n-           v3d71_simulator_submit_cl_ioctl(sim_state.v3d, submit, file->gmp->ofs);\n-           break;\n-        default:\n-           unreachable(\"Unsupported V3D version\\n\");\n-        }\n+        v3d_X_simulator(submit_cl_ioctl)(sim_state.v3d, submit, file->gmp->ofs);\n \n         util_dynarray_foreach(&sim_state.bin_oom, struct v3d_simulator_bo *,\n                               sim_bo) {\n@@ -645,22 +631,6 @@ v3d_simulator_gem_close_ioctl(int fd, struct drm_gem_close *args)\n         return drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, args);\n }\n \n-static int\n-v3d_simulator_get_param_ioctl(int fd, struct drm_v3d_get_param *args)\n-{\n-        switch(sim_state.ver) {\n-        case 33:\n-                return v3d33_simulator_get_param_ioctl(sim_state.v3d, args);\n-        case 41:\n-        case 42:\n-                return v3d41_simulator_get_param_ioctl(sim_state.v3d, args);\n-        case 71:\n-                return v3d71_simulator_get_param_ioctl(sim_state.v3d, args);\n-        default:\n-                unreachable(\"Unsupported V3D version\\n\");\n-        }\n-}\n-\n static int\n v3d_simulator_submit_tfu_ioctl(int fd, struct drm_v3d_submit_tfu *args)\n {\n@@ -672,20 +642,7 @@ v3d_simulator_submit_tfu_ioctl(int fd, struct drm_v3d_submit_tfu *args)\n         v3d_simulator_copy_in_handle(file, args->bo_handles[2]);\n         v3d_simulator_copy_in_handle(file, args->bo_handles[3]);\n \n-        switch(sim_state.ver) {\n-        case 33:\n-                ret = v3d33_simulator_submit_tfu_ioctl(sim_state.v3d, args);\n-                break;\n-        case 41:\n-        case 42:\n-                ret = v3d41_simulator_submit_tfu_ioctl(sim_state.v3d, args);\n-                break;\n-        case 71:\n-                ret = v3d71_simulator_submit_tfu_ioctl(sim_state.v3d, args);\n-                break;\n-        default:\n-                unreachable(\"Unsupported V3D version\\n\");\n-        }\n+        ret = v3d_X_simulator(submit_tfu_ioctl)(sim_state.v3d, args);\n \n         v3d_simulator_copy_out_handle(file, args->bo_handles[0]);\n \n@@ -712,19 +669,8 @@ v3d_simulator_submit_csd_ioctl(int fd, struct drm_v3d_submit_csd *args)\n \n         v3d_simulator_perfmon_switch(fd, args->perfmon_id);\n \n-        switch(sim_state.ver) {\n-        case 41:\n-        case 42:\n-           ret = v3d41_simulator_submit_csd_ioctl(sim_state.v3d, args,\n-                                                  file->gmp->ofs);\n-           break;\n-        case 71:\n-           ret = v3d71_simulator_submit_csd_ioctl(sim_state.v3d, args,\n-                                                  file->gmp->ofs);\n-           break;\n-        default:\n-           ret = -1;\n-        }\n+        ret = v3d_X_simulator(submit_csd_ioctl)(sim_state.v3d, args,\n+                                                file->gmp->ofs);\n \n         for (int i = 0; i < args->bo_handle_count; i++)\n                 v3d_simulator_copy_out_handle(file, bo_handles[i]);\n@@ -835,7 +781,7 @@ v3d_simulator_ioctl(int fd, unsigned long request, void *args)\n                 return 0;\n \n         case DRM_IOCTL_V3D_GET_PARAM:\n-                return v3d_simulator_get_param_ioctl(fd, args);\n+                return v3d_X_simulator(get_param_ioctl)(sim_state.v3d, args);\n \n         case DRM_IOCTL_GEM_CLOSE:\n                 return v3d_simulator_gem_close_ioctl(fd, args);\n@@ -918,22 +864,18 @@ v3d_simulator_init_global()\n \n         util_dynarray_init(&sim_state.bin_oom, NULL);\n \n+        v3d_X_simulator(init_regs)(sim_state.v3d);\n+\n         switch(sim_state.ver) {\n-        case 33:\n-                v3d33_simulator_init_regs(sim_state.v3d);\n-                sim_state.perfcnt_total = 0;\n-                break;\n         case 41:\n         case 42:\n-                v3d41_simulator_init_regs(sim_state.v3d);\n                 sim_state.perfcnt_total = 87;\n                 break;\n         case 71:\n-                v3d71_simulator_init_regs(sim_state.v3d);\n                 sim_state.perfcnt_total = 93;\n                 break;\n         default:\n-                unreachable(\"Not supported V3D version\\n\");\n+                sim_state.perfcnt_total = 0;\n         }\n }\n \ndiff --git a/src/broadcom/simulator/v3d_simulator.h b/src/broadcom/simulator/v3d_simulator.h\nindex 1472c313a03..92305634468 100644\n--- a/src/broadcom/simulator/v3d_simulator.h\n+++ b/src/broadcom/simulator/v3d_simulator.h\n@@ -59,4 +59,25 @@ uint32_t v3d_simulator_get_mem_free(void);\n \n #endif\n \n+/* Helper to call simulator ver specific functions */\n+#define v3d_X_simulator(thing) ({                     \\\n+   __typeof(&v3d33_simulator_##thing) v3d_X_sim_thing;\\\n+   switch (sim_state.ver) {                           \\\n+   case 33:                                           \\\n+   case 40:                                           \\\n+      v3d_X_sim_thing = &v3d33_simulator_##thing;     \\\n+      break;                                          \\\n+   case 41:                                           \\\n+   case 42:                                           \\\n+      v3d_X_sim_thing = &v3d41_simulator_##thing;     \\\n+      break;                                          \\\n+   case 71:                                           \\\n+      v3d_X_sim_thing = &v3d71_simulator_##thing;     \\\n+      break;                                          \\\n+   default:                                           \\\n+      unreachable(\"Unsupported hardware generation\"); \\\n+   }                                                  \\\n+   v3d_X_sim_thing;                                   \\\n+})\n+\n #endif\ndiff --git a/src/broadcom/simulator/v3dx_simulator.c b/src/broadcom/simulator/v3dx_simulator.c\nindex 4520fe75719..01cf6b22663 100644\n--- a/src/broadcom/simulator/v3dx_simulator.c\n+++ b/src/broadcom/simulator/v3dx_simulator.c\n@@ -218,12 +218,12 @@ v3dX(simulator_submit_tfu_ioctl)(struct v3d_hw *v3d,\n         return 0;\n }\n \n-#if V3D_VERSION >= 41\n int\n v3dX(simulator_submit_csd_ioctl)(struct v3d_hw *v3d,\n                                  struct drm_v3d_submit_csd *args,\n                                  uint32_t gmp_ofs)\n {\n+#if V3D_VERSION >= 41\n         int last_completed_jobs = (V3D_READ(V3D_CSD_0_STATUS) &\n                                    V3D_CSD_0_STATUS_NUM_COMPLETED_JOBS_SET);\n         g_gmp_ofs = gmp_ofs;\n@@ -256,8 +256,10 @@ v3dX(simulator_submit_csd_ioctl)(struct v3d_hw *v3d,\n         v3d_flush_caches(v3d);\n \n         return 0;\n-}\n+#else\n+        return -1;\n #endif\n+}\n \n int\n v3dX(simulator_get_param_ioctl)(struct v3d_hw *v3d,\n@@ -545,7 +547,8 @@ v3dX(simulator_submit_cl_ioctl)(struct v3d_hw *v3d,\n #define V3D_PCTR_0_SRC_N(x) (V3D_PCTR_0_SRC_0_3 + 4 * (x))\n #define V3D_PCTR_0_SRC_N_SHIFT(x) ((x) * 8)\n #define V3D_PCTR_0_SRC_N_MASK(x) (BITFIELD_RANGE(V3D_PCTR_0_SRC_N_SHIFT(x), \\\n-                                                 V3D_PCTR_0_SRC_N_SHIFT(x) + 6))\n+                                                 V3D_PCTR_0_SRC_N_SHIFT(x) + \\\n+                                                 V3D_PCTR_0_SRC_0_3_PCTRS0_MSB))\n #endif\n \n void\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0133-v3dv-expose-fullDrawIndexUint32-in-V3D-7.x.patch",
    "content": "From 151c13365703631f88ad77ba07afbd2ba9fa172c Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 31 May 2023 09:23:51 +0200\nSubject: [PATCH 133/142] v3dv: expose fullDrawIndexUint32 in V3D 7.x\n\n---\n src/broadcom/vulkan/v3dv_device.c | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c\nindex b520bfa0002..ca5f676b6f7 100644\n--- a/src/broadcom/vulkan/v3dv_device.c\n+++ b/src/broadcom/vulkan/v3dv_device.c\n@@ -214,7 +214,7 @@ get_features(const struct v3dv_physical_device *physical_device,\n    *features = (struct vk_features) {\n       /* Vulkan 1.0 */\n       .robustBufferAccess = true, /* This feature is mandatory */\n-      .fullDrawIndexUint32 = false, /* Only available since V3D 4.4.9.1 */\n+      .fullDrawIndexUint32 = physical_device->devinfo.ver >= 71,\n       .imageCubeArray = true,\n       .independentBlend = true,\n       .geometryShader = true,\n@@ -1451,7 +1451,8 @@ v3dv_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,\n       .subPixelPrecisionBits                    = V3D_COORD_SHIFT,\n       .subTexelPrecisionBits                    = 8,\n       .mipmapPrecisionBits                      = 8,\n-      .maxDrawIndexedIndexValue                 = 0x00ffffff,\n+      .maxDrawIndexedIndexValue                 = pdevice->devinfo.ver >= 71 ?\n+                                                  0xffffffff : 0x00ffffff,\n       .maxDrawIndirectCount                     = 0x7fffffff,\n       .maxSamplerLodBias                        = 14.0f,\n       .maxSamplerAnisotropy                     = 16.0f,\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0134-v3dv-expose-depthClamp-in-V3D-7.x.patch",
    "content": "From aec0c613e651984e577f580aedceb3561d6a3b19 Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 31 May 2023 10:38:59 +0200\nSubject: [PATCH 134/142] v3dv: expose depthClamp in V3D 7.x\n\n---\n src/broadcom/vulkan/v3dv_device.c    | 2 +-\n src/broadcom/vulkan/v3dvx_pipeline.c | 5 ++++-\n 2 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c\nindex ca5f676b6f7..30a9894789b 100644\n--- a/src/broadcom/vulkan/v3dv_device.c\n+++ b/src/broadcom/vulkan/v3dv_device.c\n@@ -224,7 +224,7 @@ get_features(const struct v3dv_physical_device *physical_device,\n       .logicOp = true,\n       .multiDrawIndirect = false,\n       .drawIndirectFirstInstance = true,\n-      .depthClamp = false, /* Only available since V3D 4.5.1.1 */\n+      .depthClamp = physical_device->devinfo.ver >= 71,\n       .depthBiasClamp = true,\n       .fillModeNonSolid = true,\n       .depthBounds = physical_device->devinfo.ver >= 71,\ndiff --git a/src/broadcom/vulkan/v3dvx_pipeline.c b/src/broadcom/vulkan/v3dvx_pipeline.c\nindex c9b537f4b32..ad22add155d 100644\n--- a/src/broadcom/vulkan/v3dvx_pipeline.c\n+++ b/src/broadcom/vulkan/v3dvx_pipeline.c\n@@ -243,6 +243,7 @@ pack_cfg_bits(struct v3dv_pipeline *pipeline,\n        * supported in the driver yet, so in practice we are always enabling Z\n        * clipping for now.\n        */\n+      bool z_clamp_enable = rs_info && rs_info->depthClampEnable;\n       bool z_clip_enable = false;\n       const VkPipelineRasterizationDepthClipStateCreateInfoEXT *clip_info =\n          ds_info ? vk_find_struct_const(ds_info->pNext,\n@@ -250,7 +251,7 @@ pack_cfg_bits(struct v3dv_pipeline *pipeline,\n                    NULL;\n       if (clip_info)\n          z_clip_enable = clip_info->depthClipEnable;\n-      else if (!(rs_info && rs_info->depthClampEnable))\n+      else if (!z_clamp_enable)\n          z_clip_enable = true;\n \n       if (z_clip_enable) {\n@@ -260,6 +261,8 @@ pack_cfg_bits(struct v3dv_pipeline *pipeline,\n          config.z_clipping_mode = V3D_Z_CLIP_MODE_NONE;\n       }\n \n+      config.z_clamp_mode = z_clamp_enable;\n+\n       config.depth_bounds_test_enable =\n               ds_info && ds_info->depthBoundsTestEnable && has_ds_attachment;\n #endif\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0135-v3dv-temporary-disable-EXT_acquire_drm_display.patch",
    "content": "From 6bd92fecf57b5b1ae3f1f665726c4a0c43d3d90e Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= <apinheiro@igalia.com>\nDate: Tue, 11 Apr 2023 13:11:39 +0200\nSubject: [PATCH 135/142] v3dv/temporary: disable EXT_acquire_drm_display\n\nSo we could made a conformance run, without the need to include the\nCTS patch for this issue:\n\nhttps://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/4377\n---\n src/broadcom/vulkan/v3dv_device.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c\nindex 30a9894789b..c0ffc05750f 100644\n--- a/src/broadcom/vulkan/v3dv_device.c\n+++ b/src/broadcom/vulkan/v3dv_device.c\n@@ -91,7 +91,7 @@ static const struct vk_instance_extension_table instance_extensions = {\n    .KHR_display                         = true,\n    .KHR_get_display_properties2         = true,\n    .EXT_direct_mode_display             = true,\n-   .EXT_acquire_drm_display             = true,\n+   .EXT_acquire_drm_display             = false,\n #endif\n    .KHR_external_fence_capabilities     = true,\n    .KHR_external_memory_capabilities    = true,\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0136-v3dv-expose-scalarBlockLayout-on-V3D-7.x.patch",
    "content": "From 7960516490008ab42ab31e921369b1ffb8f67bde Mon Sep 17 00:00:00 2001\nFrom: Iago Toral Quiroga <itoral@igalia.com>\nDate: Wed, 21 Jun 2023 10:29:07 +0200\nSubject: [PATCH 136/142] v3dv: expose scalarBlockLayout on V3D 7.x\n\nThis version of V3D doesn't have the restriction that vector accesses\nmust not cross 16-byte boundaries.\n---\n src/broadcom/vulkan/v3dv_device.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c\nindex c0ffc05750f..8f8102ae46e 100644\n--- a/src/broadcom/vulkan/v3dv_device.c\n+++ b/src/broadcom/vulkan/v3dv_device.c\n@@ -304,7 +304,7 @@ get_features(const struct v3dv_physical_device *physical_device,\n        * problematic, we would always have to scalarize. Overall, this would\n        * not lead to best performance so let's just not support it.\n        */\n-      .scalarBlockLayout = false,\n+      .scalarBlockLayout = physical_device->devinfo.ver >= 71,\n       /* This tells applications 2 things:\n        *\n        * 1. If they can select just one aspect for barriers. For us barriers\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0137-dri-Limit-the-max_num_back-to-2-on-COMPLETE_MODE_FLI.patch",
    "content": "From b58e1d7fd1c315e6ada0ad9ec4961b65c88f0c2a Mon Sep 17 00:00:00 2001\nFrom: Jose Maria Casanova Crespo <jmcasanova@igalia.com>\nDate: Mon, 4 Oct 2021 14:30:30 +0200\nSubject: [PATCH 137/142] dri: Limit the max_num_back to 2 on\n COMPLETE_MODE_FLIP present mode\n\nThis is limiting the number of back buffers that mesa can allocate, so\nthis avoids triple buffering, although that is desirable in some cases.\n\nTo get this to upstream, we could convert it to a DRI option\nand enable it only in the case of using mutter.\nIt seems to be feasible to limit this to some kind of configuration, as\nwe have access to the size of the back-buffer allocated. For example,\nonly limit for 4k-dual screen setup.\n\nWith this Raspberry OS start-up CMA usage is 210Mb with 4k-dual screen\nsetup instead of 276Mb.\n\nThe correct approach would be to check if we can make Mutter to wait\nfor buffer swaps before starting a new frame.\n\nhttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7033\n---\n src/loader/loader_dri3_helper.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c\nindex 32135770e9d..2534c817dcc 100644\n--- a/src/loader/loader_dri3_helper.c\n+++ b/src/loader/loader_dri3_helper.c\n@@ -275,7 +275,7 @@ dri3_update_max_num_back(struct loader_dri3_drawable *draw)\n       if (draw->swap_interval == 0)\n          draw->max_num_back = 4;\n       else\n-         draw->max_num_back = 3;\n+         draw->max_num_back = 2;\n \n       assert(draw->max_num_back <= LOADER_DRI3_MAX_BACK);\n       break;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0138-v3d-Ignore-SCANOUT-usage-flags-when-not-needed-under.patch",
    "content": "From d0f2a99045fa9835fea822ada58a344e2fdc1b13 Mon Sep 17 00:00:00 2001\nFrom: Jose Maria Casanova Crespo <jmcasanova@igalia.com>\nDate: Thu, 21 Oct 2021 22:04:57 +0200\nSubject: [PATCH 138/142] v3d: Ignore SCANOUT usage flags when not needed under\n X\n\nThese downstream patches force the usage of tiled formats\nwhen possible, they have been tested for the Rasbperry Pi OS\ndesktop enviroment using Mutter+Xserver.\n\nIt includes the following 3 patches:\n - v3d: Add driconf options to rewrite SCANOUT usages\n - v3d: Check if are under X session\n - v3d: enable options to ignore SCANOUT flag on resource creation\n\nv3d: Add driconf options to rewrite SCANOUT usages\n\nWe create a new eviroment variable V3D_IGNORE_SCANOUT_USAGES\nthat will affect v3d_resource_create_with_modifiers so\nSCANOUT usages can be ignored. It can be enabled under X11\nwith a compositor so applications are forces to use tiled render\nbuffers instead of the default behaviour that uses SCANOUT and\nconsume the limited CMA memory in the RPi4.\n\nThe two new driconf options modulate the effect on two applications\nXorg and mutter.\n\n\"v3d_maintain_ignorable_scanout\": is enabled in mutter, could be used\nin other compositors, the objective is that the enviroment has enable\nthe V3D_IGNORE_SCANOUT_USAGES, they aren't ignored in the compositor.\n\n\"v3d_is_xserver_process\": is used to handle a particular case\nto avoid checking if an Xserver connection is available using XCB\nas in some cases the call stalls the Xserver on boot.\n\nFollowing patches will use this configuration options to ignore or not\nthe SCANOUT usage on v3d_resource_allocation with modifiers.\n\nUpstreaming this patch need to review the effects of:\n ad50b47a14e9 (\"gbm: assume USE_SCANOUT in create_with_modifiers\")\n\nv2: driconf for v3d_is_xserver_process is needed under XWayland\n    to avoid XCB connections in the XWayland process.\n\nv3d: Check if are under X session\n\nIf we are using Wayland + XWayland, this is considered *not* being under\nX session.\n\nv3d: enable options to ignore SCANOUT flag on resource creation\n\nThis is a downstream patch for enabling the usage of more tiled\nbuffers in Raspberry OS under an enviroment using mutter and Xorg.\n\nThis patch enables the following behaviour in order to reduce the\nnumber of CMA usage and use tiled layouts because we ignore\nthe possible SCANOUT usage of the resource.\n\nThis patch makes mutter to not ignore SCANOUT flags because as\ncompositor it should allocate linear render buffers suitable for display.\n\nThen if the Xserver has enabled the dmabuf_capable option, the\nbuffers backing the windows pixmaps will allocate using modifiers,\nin the patched Xserver downstream making pixmaps exportable will use\ngbm_gbm_bo_create_with_modifiers2 that does not add the SCANOUT flag\nfor exporting pixmaps. With the Mutter compositor we didn't find a\nsituation were this pixmaps needed to be SCANOUT. But this is not sure,\nbut it allows us to not use CMA for every window opened, and having them\nin tiled format saves all linear->tiled conversion for sampling.\n\nFinally to take advantage of using Tiled render buffers for applications\nwe can enable in the enviroment V3D_IGNORE_SCANOUT_USAGES so all render\ntarges use the tiled UIF format without CMA memory instead of a linear one.\nAs the compositor mutter will composite the final surface for display we\naren't going to use the SCANOUT flag. This only applies if we are under\nan X11 session.\n\nv2: v3d: ignore V3D_IGNORE_SCANOUT if only LINEAR modifier available\n    This is a fixup for the behaviour of ignoring SCANOUT flags\n    so we don't allocate CMA memory on V3D for render targets under\n    X11 as UIF isn't included and only LINEAR is a valid modifier\n    when Xserver is using msdri3. So we cannot ignore the SCANOUT flag.\n    As the Xserver in this situation is limiting the available modifiers\n    to linear, we can identify this case just not ignoring the SCANOUT\n    flag when we can only allocate linear resources.\n---\n src/gallium/drivers/v3d/driinfo_v3d.h  |  2 +\n src/gallium/drivers/v3d/meson.build    | 17 +++++---\n src/gallium/drivers/v3d/v3d_resource.c | 31 ++++++++++++--\n src/gallium/drivers/v3d/v3d_screen.c   | 59 ++++++++++++++++++++++++++\n src/gallium/drivers/v3d/v3d_screen.h   |  6 +++\n src/util/00-mesa-defaults.conf         |  3 ++\n src/util/driconf.h                     |  8 ++++\n 7 files changed, 117 insertions(+), 9 deletions(-)\n\ndiff --git a/src/gallium/drivers/v3d/driinfo_v3d.h b/src/gallium/drivers/v3d/driinfo_v3d.h\nindex 147ad0b49bd..8f989e8aa57 100644\n--- a/src/gallium/drivers/v3d/driinfo_v3d.h\n+++ b/src/gallium/drivers/v3d/driinfo_v3d.h\n@@ -2,4 +2,6 @@\n \n DRI_CONF_SECTION_MISCELLANEOUS\n    DRI_CONF_V3D_NONMSAA_TEXTURE_SIZE_LIMIT(false)\n+   DRI_CONF_V3D_MAINTAIN_IGNORABLE_SCANOUT(false)\n+   DRI_CONF_V3D_IS_XSERVER_PROCESS(false)\n DRI_CONF_SECTION_END\ndiff --git a/src/gallium/drivers/v3d/meson.build b/src/gallium/drivers/v3d/meson.build\nindex 289473d2ca1..e47682db1aa 100644\n--- a/src/gallium/drivers/v3d/meson.build\n+++ b/src/gallium/drivers/v3d/meson.build\n@@ -61,6 +61,16 @@ endif\n \n v3d_versions = ['33', '42', '71']\n \n+v3d_deps = [dep_v3dv3, dep_libdrm, dep_valgrind, idep_nir_headers]\n+\n+if with_platform_x11\n+  v3d_deps += dep_xcb\n+endif\n+\n+if with_platform_wayland\n+  v3d_deps += dep_wayland_client\n+endif\n+\n per_version_libs = []\n foreach ver : v3d_versions\n   per_version_libs += static_library(\n@@ -72,7 +82,7 @@ foreach ver : v3d_versions\n     ],\n     c_args : [v3d_args, '-DV3D_VERSION=' + ver],\n     gnu_symbol_visibility : 'hidden',\n-    dependencies : [dep_v3dv3, dep_libdrm, dep_valgrind, idep_nir_headers],\n+    dependencies : v3d_deps,\n )\n \n endforeach\n@@ -95,10 +105,7 @@ libv3d = static_library(\n   c_args : [v3d_args],\n   cpp_args : [v3d_args],\n   gnu_symbol_visibility : 'hidden',\n-  dependencies : [\n-    dep_v3dv3, dep_libdrm, dep_valgrind,\n-    idep_nir_headers, idep_mesautil,\n-  ],\n+  dependencies : v3d_deps + idep_mesautil,\n   link_with: [per_version_libs],\n )\n \ndiff --git a/src/gallium/drivers/v3d/v3d_resource.c b/src/gallium/drivers/v3d/v3d_resource.c\nindex a0a210ccad5..46de1b16ae0 100644\n--- a/src/gallium/drivers/v3d/v3d_resource.c\n+++ b/src/gallium/drivers/v3d/v3d_resource.c\n@@ -439,7 +439,7 @@ v3d_resource_get_handle(struct pipe_screen *pscreen,\n         case WINSYS_HANDLE_TYPE_SHARED:\n                 return v3d_bo_flink(bo, &whandle->handle);\n         case WINSYS_HANDLE_TYPE_KMS:\n-                if (screen->ro) {\n+                if (screen->ro && rsc->scanout) {\n                         if (renderonly_get_handle(rsc->scanout, whandle)) {\n                                 whandle->stride = rsc->slices[0].stride;\n                                 return true;\n@@ -785,6 +785,27 @@ v3d_resource_setup(struct pipe_screen *pscreen,\n         return rsc;\n }\n \n+static bool\n+v3d_resource_should_scanout(struct pipe_screen *pscreen,\n+                            const struct pipe_resource *tmpl,\n+                            const uint64_t *modifiers,\n+                            int count)\n+{\n+        struct v3d_screen *screen = v3d_screen(pscreen);\n+\n+        if (tmpl->bind & PIPE_BIND_SCANOUT) {\n+                if (screen->maintain_ignorable_scanout)\n+                        return true;\n+                if (screen->has_x_session && screen->ignore_scanout_usages) {\n+                        if (drm_find_modifier(DRM_FORMAT_MOD_BROADCOM_UIF,\n+                                              modifiers, count))\n+                                return false;\n+                }\n+                return true;\n+        }\n+        return false;\n+}\n+\n static struct pipe_resource *\n v3d_resource_create_with_modifiers(struct pipe_screen *pscreen,\n                                    const struct pipe_resource *tmpl,\n@@ -798,6 +819,8 @@ v3d_resource_create_with_modifiers(struct pipe_screen *pscreen,\n         struct pipe_resource *prsc = &rsc->base;\n         /* Use a tiled layout if we can, for better 3D performance. */\n         bool should_tile = true;\n+        bool should_scanout = v3d_resource_should_scanout(pscreen, tmpl,\n+                                                          modifiers, count);\n \n         assert(tmpl->target != PIPE_BUFFER ||\n                (tmpl->format == PIPE_FORMAT_NONE ||\n@@ -827,7 +850,7 @@ v3d_resource_create_with_modifiers(struct pipe_screen *pscreen,\n         /* If using the old-school SCANOUT flag, we don't know what the screen\n          * might support other than linear. Just force linear.\n          */\n-        if (tmpl->bind & PIPE_BIND_SCANOUT)\n+        if ((tmpl->bind & PIPE_BIND_SCANOUT) && should_scanout)\n                 should_tile = false;\n \n         /* No user-specified modifier; determine our own. */\n@@ -849,7 +872,7 @@ v3d_resource_create_with_modifiers(struct pipe_screen *pscreen,\n \n         v3d_setup_slices(rsc, 0, tmpl->bind & PIPE_BIND_SHARED);\n \n-        if (screen->ro && (tmpl->bind & PIPE_BIND_SCANOUT)) {\n+        if (screen->ro && should_scanout) {\n                 struct winsys_handle handle;\n                 struct pipe_resource scanout_tmpl = {\n                         .target = prsc->target,\n@@ -979,7 +1002,7 @@ v3d_resource_from_handle(struct pipe_screen *pscreen,\n                  }\n         }\n \n-        if (screen->ro) {\n+        if (screen->ro && !rsc->tiled) {\n                 /* Make sure that renderonly has a handle to our buffer in the\n                  * display's fd, so that a later renderonly_get_handle()\n                  * returns correct handles or GEM names.\ndiff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c\nindex 2225edf85bd..1d4f619d710 100644\n--- a/src/gallium/drivers/v3d/v3d_screen.c\n+++ b/src/gallium/drivers/v3d/v3d_screen.c\n@@ -47,6 +47,42 @@\n #include \"compiler/v3d_compiler.h\"\n #include \"drm-uapi/drm_fourcc.h\"\n \n+#ifdef HAVE_WAYLAND_PLATFORM\n+#include <wayland-client.h>\n+#endif\n+\n+#ifdef HAVE_X11_PLATFORM\n+#include <xcb/xcb.h>\n+#endif\n+\n+static bool\n+check_x_session()\n+{\n+        bool xcb_connection = false;\n+\n+#ifdef HAVE_WAYLAND_PLATFORM\n+        struct wl_display *display;\n+\n+        display = wl_display_connect(NULL);\n+\n+        if (display) {\n+                wl_display_disconnect(display);\n+                return xcb_connection;\n+        }\n+#endif\n+\n+#ifdef HAVE_X11_PLATFORM\n+        xcb_connection_t *conn;\n+\n+        conn = xcb_connect(NULL, NULL);\n+\n+        if (!xcb_connection_has_error(conn))\n+                xcb_connection = true;\n+        xcb_disconnect(conn);\n+#endif\n+        return xcb_connection;\n+}\n+\n static const char *\n v3d_screen_get_name(struct pipe_screen *pscreen)\n {\n@@ -945,6 +981,29 @@ v3d_screen_create(int fd, const struct pipe_screen_config *config,\n                 v3d_has_feature(screen, DRM_V3D_PARAM_SUPPORTS_CACHE_FLUSH);\n         screen->has_perfmon = v3d_has_feature(screen, DRM_V3D_PARAM_SUPPORTS_PERFMON);\n \n+        screen->ignore_scanout_usages = getenv(\"V3D_IGNORE_SCANOUT_USAGES\");\n+\n+        const char *is_xserver_process =\n+                \"v3d_is_xserver_process\";\n+        screen->is_xserver_process =\n+                driCheckOption(config->options,\n+                               is_xserver_process,\n+                               DRI_BOOL) &&\n+                driQueryOptionb(config->options,\n+                                is_xserver_process);\n+\n+        const char *maintain_ignorable_scanout_name =\n+                \"v3d_maintain_ignorable_scanout\";\n+        screen->maintain_ignorable_scanout =\n+                driCheckOption(config->options,\n+                               maintain_ignorable_scanout_name,\n+                               DRI_BOOL) &&\n+                driQueryOptionb(config->options,\n+                                maintain_ignorable_scanout_name);\n+\n+        screen->has_x_session = !screen->is_xserver_process &&\n+                                check_x_session();\n+\n         v3d_fence_init(screen);\n \n         v3d_process_debug_variable();\ndiff --git a/src/gallium/drivers/v3d/v3d_screen.h b/src/gallium/drivers/v3d/v3d_screen.h\nindex 1da9b83c965..c0f22707075 100644\n--- a/src/gallium/drivers/v3d/v3d_screen.h\n+++ b/src/gallium/drivers/v3d/v3d_screen.h\n@@ -83,6 +83,12 @@ struct v3d_screen {\n         bool has_cache_flush;\n         bool has_perfmon;\n         bool nonmsaa_texture_size_limit;\n+        bool ignore_scanout_usages;\n+        bool is_xserver_process;\n+        bool maintain_ignorable_scanout;\n+\n+        /* Are we running in an X session? */\n+        bool has_x_session;\n \n         struct v3d_simulator_file *sim_file;\n \ndiff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf\nindex 948c1ef78ba..2de7505521c 100644\n--- a/src/util/00-mesa-defaults.conf\n+++ b/src/util/00-mesa-defaults.conf\n@@ -77,6 +77,7 @@ TODO: document the other workarounds.\n         <!-- using vulkan wsi for xservers causes deadlocks -->\n         <application name=\"Xwayland\" executable=\"Xwayland\">\n             <option name=\"disable_xcb_surface\" value=\"true\" />\n+            <option name=\"v3d_is_xserver_process\" value=\"true\" />\n         </application>\n \n         <application name=\"Unigine Heaven (32-bit)\" executable=\"heaven_x86\">\n@@ -767,6 +768,7 @@ TODO: document the other workarounds.\n         <application name=\"mutter\" executable=\"mutter\">\n             <option name=\"adaptive_sync\" value=\"false\" />\n             <option name=\"v3d_nonmsaa_texture_size_limit\" value=\"true\" />\n+            <option name=\"v3d_maintain_ignorable_scanout\" value=\"true\" />\n         </application>\n         <application name=\"muffin\" executable=\"muffin\">\n             <option name=\"adaptive_sync\" value=\"false\" />\n@@ -818,6 +820,7 @@ TODO: document the other workarounds.\n         </application>\n         <application name=\"Xorg\" executable=\"Xorg\">\n             <option name=\"v3d_nonmsaa_texture_size_limit\" value=\"true\" />\n+            <option name=\"v3d_is_xserver_process\" value=\"true\" />\n         </application>\n \n         <application name=\"gfxbench\" executable=\"testfw_app\">\ndiff --git a/src/util/driconf.h b/src/util/driconf.h\nindex 042ee27d9a3..56511f6615e 100644\n--- a/src/util/driconf.h\n+++ b/src/util/driconf.h\n@@ -521,6 +521,14 @@\n    DRI_CONF_OPT_B(v3d_nonmsaa_texture_size_limit, def, \\\n                   \"Report the non-MSAA-only texture size limit\")\n \n+#define DRI_CONF_V3D_IS_XSERVER_PROCESS(def) \\\n+   DRI_CONF_OPT_B(v3d_is_xserver_process, def, \\\n+                  \"Identifies if the application is the Xserver.\")\n+\n+#define DRI_CONF_V3D_MAINTAIN_IGNORABLE_SCANOUT(def)   \\\n+   DRI_CONF_OPT_B(v3d_maintain_ignorable_scanout, def, \\\n+                  \"Maintain SCANOUT usage on resource allocations when the environment allows ignoring SCANOUT usage.\")\n+\n /**\n  * \\brief virgl specific configuration options\n  */\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0139-Add-a-hack-to-avoid-the-shadow-tex-update-for-import.patch",
    "content": "From fc1fe85f01a67ef6e5758f1022950ad79b1b305a Mon Sep 17 00:00:00 2001\nFrom: Neil Roberts <nroberts@igalia.com>\nDate: Mon, 5 Jul 2021 20:19:06 +0200\nSubject: [PATCH 139/142] Add a hack to avoid the shadow tex update for\n imported linear texs\n\nThis adds a hacky interface so that an application can override the\nmechanism used to detect when to update the shadow texture which is used\nwhen importing a linear texture. The application can enable this by\ncalling:\n\nglTexParameteri(GL_TEXTURE_2D, GL_SYNC_CONDITION, 1);\n\nAnd then whenever it determines that the shadow texture should be\nupdated it can call:\n\nglTexParameteri(GL_TEXTURE_2D, GL_SYNC_STATUS, 1);\n\n(cherry picked from commit 1269e2cfbfa876fdc85037b9435085174d76ad57)\n---\n src/gallium/drivers/v3d/v3d_resource.c |  5 ++++-\n src/gallium/include/pipe/p_state.h     |  4 ++++\n src/mesa/main/mtypes.h                 |  3 +++\n src/mesa/main/texparam.c               | 18 ++++++++++++++++++\n 4 files changed, 29 insertions(+), 1 deletion(-)\n\ndiff --git a/src/gallium/drivers/v3d/v3d_resource.c b/src/gallium/drivers/v3d/v3d_resource.c\nindex 46de1b16ae0..8e31acb0ff0 100644\n--- a/src/gallium/drivers/v3d/v3d_resource.c\n+++ b/src/gallium/drivers/v3d/v3d_resource.c\n@@ -1048,7 +1048,9 @@ v3d_update_shadow_texture(struct pipe_context *pctx,\n \n         assert(view->texture != pview->texture);\n \n-        if (shadow->writes == orig->writes && orig->bo->private)\n+        if (shadow->writes == orig->writes &&\n+            orig->base.sync_status == 0 &&\n+            (orig->bo->private || orig->base.sync_condition))\n                 return;\n \n         perf_debug(\"Updating %dx%d@%d shadow for linear texture\\n\",\n@@ -1091,6 +1093,7 @@ v3d_update_shadow_texture(struct pipe_context *pctx,\n         }\n \n         shadow->writes = orig->writes;\n+        orig->base.sync_status = 0;\n }\n \n static struct pipe_surface *\ndiff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h\nindex 549e4d21c05..abc58552544 100644\n--- a/src/gallium/include/pipe/p_state.h\n+++ b/src/gallium/include/pipe/p_state.h\n@@ -610,6 +610,10 @@ struct pipe_resource\n    unsigned bind;            /**< bitmask of PIPE_BIND_x */\n    unsigned flags;           /**< bitmask of PIPE_RESOURCE_FLAG_x */\n \n+   /* Hack for avoiding sync on v3d */\n+   unsigned sync_condition;\n+   unsigned sync_status;\n+\n    /**\n     * For planar images, ie. YUV EGLImage external, etc, pointer to the\n     * next plane.\ndiff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h\nindex 77c38bf48d5..1eb2dac8018 100644\n--- a/src/mesa/main/mtypes.h\n+++ b/src/mesa/main/mtypes.h\n@@ -1058,6 +1058,9 @@ struct gl_texture_object\n      * the pipe_resource *pt above.\n      */\n     bool needs_validation;\n+\n+    /* Hack for avoiding sync on v3d */\n+    GLboolean SyncCondition;\n };\n \n \ndiff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c\nindex 001cc185722..139db3ce3e2 100644\n--- a/src/mesa/main/texparam.c\n+++ b/src/mesa/main/texparam.c\n@@ -274,6 +274,13 @@ set_tex_parameteri(struct gl_context *ctx,\n    }\n \n    switch (pname) {\n+   case GL_SYNC_CONDITION:\n+      if (!!texObj->SyncCondition == !!params[0])\n+         return GL_FALSE;\n+      texObj->SyncCondition = !!params[0];\n+      return GL_TRUE;\n+   case GL_SYNC_STATUS:\n+      return GL_TRUE;\n    case GL_TEXTURE_MIN_FILTER:\n       if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))\n          goto invalid_dsa;\n@@ -931,6 +938,17 @@ _mesa_texture_parameter_invalidate(struct gl_context *ctx,\n {\n    if (texparam_invalidates_sampler_views(pname))\n       st_texture_release_all_sampler_views(st_context(ctx), texObj);\n+\n+   switch (pname) {\n+   case GL_SYNC_CONDITION:\n+      texObj->pt->sync_condition = texObj->SyncCondition;\n+      break;\n+   case GL_SYNC_STATUS:\n+      texObj->pt->sync_status = 1;\n+      break;\n+   default:\n+      ; /* nothing */\n+   }\n }\n \n void\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0140-vc4-Fix-mask-RGBA-validation-at-YUV-blit.patch",
    "content": "From 270deb428f1de371492a5e6185fe410c4329eab4 Mon Sep 17 00:00:00 2001\nFrom: Jose Maria Casanova Crespo <jmcasanova@igalia.com>\nDate: Mon, 25 Sep 2023 21:16:59 +0200\nSubject: [PATCH 140/142] vc4: Fix mask RGBA validation at YUV blit\n\nSolves regression on video players using GPU for\nvideo decoding that just displays the video in green.\n\nFixes: d13da7782cd80 (\"vc4: call blit paths in chain\")\n---\n src/gallium/drivers/vc4/vc4_blit.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/src/gallium/drivers/vc4/vc4_blit.c b/src/gallium/drivers/vc4/vc4_blit.c\nindex 2cf65b5f585..87b2369b7ad 100644\n--- a/src/gallium/drivers/vc4/vc4_blit.c\n+++ b/src/gallium/drivers/vc4/vc4_blit.c\n@@ -347,7 +347,7 @@ vc4_yuv_blit(struct pipe_context *pctx, struct pipe_blit_info *info)\n         struct vc4_resource *dst = vc4_resource(info->dst.resource);\n         bool ok;\n \n-        if (info->mask & PIPE_MASK_RGBA)\n+        if (!(info->mask & PIPE_MASK_RGBA))\n                 return;\n \n         if (src->tiled)\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0141-vc4-mark-buffers-as-initialized-at-vc4_texture_subda.patch",
    "content": "From f843fbceb381f8c82074e8b68583fbfe57c48a6e Mon Sep 17 00:00:00 2001\nFrom: Jose Maria Casanova Crespo <jmcasanova@igalia.com>\nDate: Thu, 8 Jun 2023 00:57:15 +0200\nSubject: [PATCH 141/142] vc4: mark buffers as initialized at\n vc4_texture_subdata\n\nThis fixes several tests when the initially uploaded buffer\nfrom CPU was being ignored because vc4_texture_subdata was not\nmarking the resource as written/initialized.\n\nThe usage flags management available at vc4_resource_transfer_map\nis generalized into vc4_map_usage_prep and reused at\nvc4_resource_transfer_map. This makes vc4 implementation more similar\nto v3d.\n\nThis fixes 7 text in the following subgroups:\n  -dEQP-GLES2.functional.fbo.render.texsubimage.*\n  -dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.*\n  -spec@arb_clear_texture@arb_clear_texture-*\n\nCc: mesa-stable\nReviewed-by: Juan A. Suarez <jasuarez@igalia.com>\nReviewed-by: Emma Anholt <emma@anholt.net>\nPart-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25297>\n---\n src/broadcom/ci/broadcom-rpi3-fails.txt | 11 ----\n src/gallium/drivers/vc4/vc4_resource.c  | 71 +++++++++++++++----------\n 2 files changed, 44 insertions(+), 38 deletions(-)\n\ndiff --git a/src/broadcom/ci/broadcom-rpi3-fails.txt b/src/broadcom/ci/broadcom-rpi3-fails.txt\nindex 5522310d91a..e49e77b1436 100644\n--- a/src/broadcom/ci/broadcom-rpi3-fails.txt\n+++ b/src/broadcom/ci/broadcom-rpi3-fails.txt\n@@ -18,11 +18,6 @@ dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_corner,Fail\n \n dEQP-GLES2.functional.depth_stencil_clear.depth_stencil_masked,Fail\n \n-# A glTexImage, glDraw, glTexSubImage sequence into a texture is missing what looks like the drawing.\n-dEQP-GLES2.functional.fbo.render.texsubimage.after_render_tex2d_rgba,Fail\n-# A glTexImage, glDraw, glTexSubImage, glDraw sequence into a texture is missing what looks like the first drawing.\n-dEQP-GLES2.functional.fbo.render.texsubimage.between_render_tex2d_rgba,Fail\n-\n # Sampling grid slightly off in test 2?\n dEQP-GLES2.functional.texture.filtering.2d.nearest_mipmap_linear_linear_mirror_rgba8888,Fail\n dEQP-GLES2.functional.texture.filtering.2d.nearest_mipmap_linear_linear_repeat_rgba8888,Fail\n@@ -38,12 +33,6 @@ dEQP-GLES2.functional.texture.mipmap.2d.basic.nearest_linear_clamp_non_square,Fa\n dEQP-GLES2.functional.texture.mipmap.2d.basic.nearest_linear_mirror_non_square,Fail\n dEQP-GLES2.functional.texture.mipmap.2d.basic.nearest_linear_repeat_non_square,Fail\n \n-# Sequence of glTexImage, glDraw, glCopyTexSubImage.\n-# background red/green checkerboard on the left side is incorrectly white.\n-dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.2d_rgba,Fail\n-# Maybe it was copied as RGB instead of RGBA?\n-dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.cube_rgba,Fail\n-\n # One of the pixels on the left edge near the bottom is wrong for both min and\n # mag.  Also a line of pixels through the image in minification.\n dEQP-GLES2.functional.texture.wrap.clamp_clamp_nearest_npot_etc1,Fail\ndiff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c\nindex ad2791aa972..0a3a435a46c 100644\n--- a/src/gallium/drivers/vc4/vc4_resource.c\n+++ b/src/gallium/drivers/vc4/vc4_resource.c\n@@ -95,34 +95,13 @@ vc4_resource_transfer_unmap(struct pipe_context *pctx,\n         slab_free(&vc4->transfer_pool, ptrans);\n }\n \n-static void *\n-vc4_resource_transfer_map(struct pipe_context *pctx,\n-                          struct pipe_resource *prsc,\n-                          unsigned level, unsigned usage,\n-                          const struct pipe_box *box,\n-                          struct pipe_transfer **pptrans)\n+static void\n+vc4_map_usage_prep(struct pipe_context *pctx,\n+                   struct pipe_resource *prsc,\n+                   unsigned usage)\n {\n         struct vc4_context *vc4 = vc4_context(pctx);\n         struct vc4_resource *rsc = vc4_resource(prsc);\n-        struct vc4_transfer *trans;\n-        struct pipe_transfer *ptrans;\n-        enum pipe_format format = prsc->format;\n-        char *buf;\n-\n-        /* Upgrade DISCARD_RANGE to WHOLE_RESOURCE if the whole resource is\n-         * being mapped.\n-         */\n-        if ((usage & PIPE_MAP_DISCARD_RANGE) &&\n-            !(usage & PIPE_MAP_UNSYNCHRONIZED) &&\n-            !(prsc->flags & PIPE_RESOURCE_FLAG_MAP_PERSISTENT) &&\n-            prsc->last_level == 0 &&\n-            prsc->width0 == box->width &&\n-            prsc->height0 == box->height &&\n-            prsc->depth0 == box->depth &&\n-            prsc->array_size == 1 &&\n-            rsc->bo->private) {\n-                usage |= PIPE_MAP_DISCARD_WHOLE_RESOURCE;\n-        }\n \n         if (usage & PIPE_MAP_DISCARD_WHOLE_RESOURCE) {\n                 if (vc4_resource_bo_alloc(rsc)) {\n@@ -131,6 +110,8 @@ vc4_resource_transfer_map(struct pipe_context *pctx,\n                          */\n                         if (prsc->bind & PIPE_BIND_VERTEX_BUFFER)\n                                 vc4->dirty |= VC4_DIRTY_VTXBUF;\n+                        if (prsc->bind & PIPE_BIND_CONSTANT_BUFFER)\n+                                vc4->dirty |= VC4_DIRTY_CONSTBUF;\n                 } else {\n                         /* If we failed to reallocate, flush users so that we\n                          * don't violate any syncing requirements.\n@@ -139,7 +120,7 @@ vc4_resource_transfer_map(struct pipe_context *pctx,\n                 }\n         } else if (!(usage & PIPE_MAP_UNSYNCHRONIZED)) {\n                 /* If we're writing and the buffer is being used by the CL, we\n-                 * have to flush the CL first.  If we're only reading, we need\n+                 * have to flush the CL first. If we're only reading, we need\n                  * to flush if the CL has written our buffer.\n                  */\n                 if (usage & PIPE_MAP_WRITE)\n@@ -152,6 +133,38 @@ vc4_resource_transfer_map(struct pipe_context *pctx,\n                 rsc->writes++;\n                 rsc->initialized_buffers = ~0;\n         }\n+}\n+\n+static void *\n+vc4_resource_transfer_map(struct pipe_context *pctx,\n+                          struct pipe_resource *prsc,\n+                          unsigned level, unsigned usage,\n+                          const struct pipe_box *box,\n+                          struct pipe_transfer **pptrans)\n+{\n+        struct vc4_context *vc4 = vc4_context(pctx);\n+        struct vc4_resource *rsc = vc4_resource(prsc);\n+        struct vc4_transfer *trans;\n+        struct pipe_transfer *ptrans;\n+        enum pipe_format format = prsc->format;\n+        char *buf;\n+\n+        /* Upgrade DISCARD_RANGE to WHOLE_RESOURCE if the whole resource is\n+         * being mapped.\n+         */\n+        if ((usage & PIPE_MAP_DISCARD_RANGE) &&\n+            !(usage & PIPE_MAP_UNSYNCHRONIZED) &&\n+            !(prsc->flags & PIPE_RESOURCE_FLAG_MAP_PERSISTENT) &&\n+            prsc->last_level == 0 &&\n+            prsc->width0 == box->width &&\n+            prsc->height0 == box->height &&\n+            prsc->depth0 == box->depth &&\n+            prsc->array_size == 1 &&\n+            rsc->bo->private) {\n+                usage |= PIPE_MAP_DISCARD_WHOLE_RESOURCE;\n+        }\n+\n+        vc4_map_usage_prep(pctx, prsc, usage);\n \n         trans = slab_zalloc(&vc4->transfer_pool);\n         if (!trans)\n@@ -240,8 +253,12 @@ vc4_texture_subdata(struct pipe_context *pctx,\n         }\n \n         /* Otherwise, map and store the texture data directly into the tiled\n-         * texture.\n+         * texture.  Note that gallium's texture_subdata may be called with\n+         * obvious usage flags missing!\n          */\n+        vc4_map_usage_prep(pctx, prsc, usage | (PIPE_MAP_WRITE |\n+                                                PIPE_MAP_DISCARD_RANGE));\n+\n         void *buf;\n         if (usage & PIPE_MAP_UNSYNCHRONIZED)\n                 buf = vc4_bo_map_unsynchronized(rsc->bo);\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/devices/RPi5/patches/mesa/0142-gallium-Add-kmsro-drivers-for-RP1-DSI-DPI-and-VEC-de.patch",
    "content": "From 3322c102282cf726ae575b122358060abd5b24db Mon Sep 17 00:00:00 2001\nFrom: Dave Stevenson <dave.stevenson@raspberrypi.com>\nDate: Thu, 5 Oct 2023 19:32:10 +0100\nSubject: [PATCH 142/142] gallium: Add kmsro drivers for RP1 DSI, DPI, and VEC\n devices\n\nSigned-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>\n---\n src/gallium/targets/dri/meson.build | 3 +++\n src/gallium/targets/dri/target.c    | 3 +++\n 2 files changed, 6 insertions(+)\n\ndiff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build\nindex fbec1da957b..59daf3b6fb6 100644\n--- a/src/gallium/targets/dri/meson.build\n+++ b/src/gallium/targets/dri/meson.build\n@@ -68,6 +68,9 @@ libgallium_dri = shared_library(\n \n foreach d : [[with_gallium_kmsro, [\n                'armada-drm_dri.so',\n+               'drm-rp1-dpi_dri.so',\n+               'drm-rp1-dsi_dri.so',\n+               'drm-rp1-vec_dri.so',\n                'exynos_dri.so',\n                'hx8357d_dri.so',\n                'ili9225_dri.so',\ndiff --git a/src/gallium/targets/dri/target.c b/src/gallium/targets/dri/target.c\nindex d506869cbb4..ecb25edd03b 100644\n--- a/src/gallium/targets/dri/target.c\n+++ b/src/gallium/targets/dri/target.c\n@@ -98,6 +98,9 @@ DEFINE_LOADER_DRM_ENTRYPOINT(tegra);\n \n #if defined(GALLIUM_KMSRO)\n DEFINE_LOADER_DRM_ENTRYPOINT(armada_drm)\n+DEFINE_LOADER_DRM_ENTRYPOINT(drm_rp1_dpi)\n+DEFINE_LOADER_DRM_ENTRYPOINT(drm_rp1_dsi)\n+DEFINE_LOADER_DRM_ENTRYPOINT(drm_rp1_vec)\n DEFINE_LOADER_DRM_ENTRYPOINT(exynos)\n DEFINE_LOADER_DRM_ENTRYPOINT(hx8357d)\n DEFINE_LOADER_DRM_ENTRYPOINT(ili9225)\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/filesystem/usr/bin/cputemp",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nTEMP=\"$(cat /sys/class/thermal/thermal_zone0/temp)\"\necho \"$(( $TEMP / 1000 )) C\"\n"
  },
  {
    "path": "projects/RPi/filesystem/usr/lib/udev/rules.d/80-alsa-preallocsize.rules",
    "content": "ACTION==\"add\", SUBSYSTEM==\"sound\", KERNEL==\"pcmC*\", ATTRS{id}==\"vc4hdmi*\", \\\n  ENV{.snd_card}=\"$id\", \\\n  RUN+=\"/bin/sh -c 'echo 1280 > /proc/asound/$env{.snd_card}/pcm0p/sub0/prealloc'\"\n"
  },
  {
    "path": "projects/RPi/filesystem/usr/share/alsa/cards/RPi-WM8804.conf",
    "content": "<confdir:pcm/iec958.conf>\nRPi-WM8804.pcm.iec958.0 {\n    @args [ CARD AES0 AES1 AES2 AES3 ]\n    @args.CARD {\n        type string\n    }\n    @args.AES0 {\n        type integer\n    }\n    @args.AES1 {\n        type integer\n    }\n    @args.AES2 {\n        type integer\n    }\n    @args.AES3 {\n        type integer\n    }\n    type hooks\n    slave.pcm {\n        type hw\n        card $CARD\n    }\n}\n"
  },
  {
    "path": "projects/RPi/filesystem/usr/share/alsa/cards/bcm2835_alsa.conf",
    "content": "<confdir:pcm/iec958.conf>\nbcm2835_alsa.pcm.iec958.0 {\n    @args [ CARD AES0 AES1 AES2 AES3 ]\n    @args.CARD {\n        type string\n    }\n    @args.AES0 {\n        type integer\n    }\n    @args.AES1 {\n        type integer\n    }\n    @args.AES2 {\n        type integer\n    }\n    @args.AES3 {\n        type integer\n    }\n    type hooks\n    slave.pcm {\n        type hw\n        card $CARD\n        device 1\n    }\n    hooks.0 {\n        type ctl_elems\n        hook_args [\n            {\n                interface PCM\n                name \"IEC958 Playback Default\"\n                lock true\n                preserve true\n                value [ $AES0 $AES1 $AES2 $AES3 ]\n            }\n        ]\n    }\n}\n"
  },
  {
    "path": "projects/RPi/kodi/advancedsettings.xml",
    "content": "<advancedsettings>\n  <fanartres>720</fanartres>\n  <imageres>540</imageres>\n</advancedsettings>\n"
  },
  {
    "path": "projects/RPi/kodi/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<settings version=\"1\">\n\n  <section id=\"system\">\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.audiodevice\">\n          <default>ALSA:hdmi:CARD=vc4hdmi,DEV=0</default>\n        </setting>\n      </group>\n    </category>\n    <category id=\"display\">\n      <group id=\"1\">\n        <setting id=\"videoscreen.limitguisize\">\n          <visible>true</visible>\n          <default>3</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n\n</settings>\n"
  },
  {
    "path": "projects/RPi/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      arm)\n        # Valid TARGET_CPU for Raspberry Pi based devices are:\n        # arm1176jzf-s cortex-a7 cortex-a53\n        if [ \"$DEVICE\" = \"RPi\" ]; then\n          TARGET_CPU=\"arm1176jzf-s\"\n        elif [ \"$DEVICE\" = \"RPi2\" ]; then\n          TARGET_CPU=\"cortex-a7\"\n        elif [ \"$DEVICE\" = \"RPi4\" ]; then\n          TARGET_CPU=\"cortex-a53\"\n          TARGET_CPU_FLAGS=\"+crc\"\n        fi\n\n        # TARGET_FLOAT:\n        # Specifies which floating-point ABI to use. Permissible values are:\n        # soft hard\n        TARGET_FLOAT=\"hard\"\n\n        # Valid TARGET_FPU for Raspberry Pi based devices:\n        # This specifies what floating point hardware (or hardware emulation) is\n        # available on the target. Permissible names are:\n        # vfp neon-vfpv4 neon-fp-armv8\n        if [ \"$DEVICE\" = \"RPi\" ]; then\n          TARGET_FPU=\"vfp\"\n        elif [ \"$DEVICE\" = \"RPi2\" ]; then\n          TARGET_FPU=\"neon-vfpv4\"\n        elif [ \"$DEVICE\" = \"RPi4\" ]; then\n          TARGET_FPU=\"neon-fp-armv8\"\n        fi\n        ;;\n    esac\n\n  # Bootloader to use (bcm2835-bootloader)\n    BOOTLOADER=\"bcm2835-bootloader\"\n\n  # Kernel target\n    KERNEL_TARGET=\"zImage\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"dtbs\"\n\n  # Additional kernel dependencies\n    KERNEL_EXTRA_DEPENDS_TARGET=\"\"\n\n  # Kernel to use. values can be:\n  # default:  default mainline kernel\n    LINUX=\"raspberrypi\"\n\n  # use framebuffer console\n    EXTRA_CMDLINE=\"console=tty0\"\n\n################################################################################\n# setup build defaults\n################################################################################\n\n  # Project CFLAGS\n    PROJECT_CFLAGS=\"\"\n\n  # SquashFS compression method (gzip / lzo / xz / zstd)\n    SQUASHFS_COMPRESSION=\"zstd\"\n\n################################################################################\n# setup project defaults\n################################################################################\n\n  # OpenGL(X) implementation to use (no / mesa)\n    OPENGL=\"no\"\n\n  # OpenGL-ES implementation to use (no / bcm2835-driver / mesa)\n    OPENGLES=\"mesa\"\n\n  # Vulkan implementation to use (vulkan-loader / no)\n    VULKAN=\"no\"\n\n  # Displayserver to use (wl / no)\n    DISPLAYSERVER=\"no\"\n\n  # Windowmanager to use (weston / no)\n    WINDOWMANAGER=\"no\"\n\n  # Xorg Graphic drivers to use (all / vc4 / none)\n  # Space separated list is supported,\n  # e.g. GRAPHIC_DRIVERS=\"vc4\"\n    GRAPHIC_DRIVERS=\"vc4\"\n\n  # KODI Player implementation to use (default / bcm2835-driver / mesa)\n    KODIPLAYER_DRIVER=\"mesa\"\n\n  # use the kernel CEC framework for libcec (yes / no)\n    CEC_FRAMEWORK_SUPPORT=\"yes\"\n\n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware-rpi\"\n\n  # build with installer (yes / no)\n    INSTALLER_SUPPORT=\"no\"\n\n  # kernel image name\n    KERNEL_NAME=\"kernel.img\"\n\n  # additional drivers to install:\n  # for a list of additional drivers see packages/linux-drivers\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_DRIVERS+=\" DRIVER1 DRIVER2\"\n    ADDITIONAL_DRIVERS+=\" bcm2835-driver\"\n\n    if [ \"${ALSA_SUPPORT}\" = \"yes\" ]; then\n      ADDITIONAL_DRIVERS+=\" rpi-cirrus-config\"\n    fi\n\n  # build and install driver addons (yes / no)\n    DRIVER_ADDONS_SUPPORT=\"no\"\n\n  # driver addons to install:\n  # for a list of additional drivers see packages/linux-driver-addons\n  # Space separated list is supported,\n    DRIVER_ADDONS=\"crazycat dvb-latest\"\n\n  # debug tty path\n    DEBUG_TTY=\"/dev/console\"\n"
  },
  {
    "path": "projects/RPi/packages/linux/modprobe.d/ath9k.conf",
    "content": "# ath9k.conf: setup modload options for module ath9k.\n#\n# enable \"Channel Context support\" to avoid buffering in live TV\n\noptions ath9k use_chanctx=1\n"
  },
  {
    "path": "projects/RPi/packages/systemd/scripts/cpufreq",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nSYS_CPUFREQ_GOV=$( cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor )\nSYS_ONDEMAND_DIR=\"/sys/devices/system/cpu/cpufreq/ondemand/\"\n\n# Configure frequency scaling properties\nif [ \"${SYS_CPUFREQ_GOV}\" = \"ondemand\" ]; then\n  echo 1 > \"${SYS_ONDEMAND_DIR}/io_is_busy\"\n  echo 50 > \"${SYS_ONDEMAND_DIR}/up_threshold\"\n  echo 100000 > \"${SYS_ONDEMAND_DIR}/sampling_rate\"\n  echo 50 > \"${SYS_ONDEMAND_DIR}/sampling_down_factor\"\nelse\n  echo \"cpufreq: settings not found for current cpu governor.\" | systemd-cat -p info\nfi\n"
  },
  {
    "path": "projects/RPi/patches/kodi/0001-CDVDVideoCodecDRMPRIME-Also-support-YUV420-buffers.patch",
    "content": "From 97d39a46091b65e4355ce7e545bdec46ff2f87de Mon Sep 17 00:00:00 2001\nFrom: popcornmix <popcornmix@gmail.com>\nDate: Sat, 11 Sep 2021 14:03:05 +0100\nSubject: [PATCH 1/7] CDVDVideoCodecDRMPRIME: Also support YUV420 buffers\n\nCDVDVideoCodecDRMPRIME: Add support for deinterlace of sw decoded buffers\n\nNeed to call SetDimensions earlier and store the drm descriptor in expected place\n---\n .../DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp      | 14 ++++++++++++--\n 1 file changed, 12 insertions(+), 2 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\nindex 20a5c24f53..a36107c515 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n@@ -582,7 +582,7 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)\n     pVideoPicture->videoBuffer = nullptr;\n   }\n \n-  if (IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format)))\n+  if (m_pFrame->format == AV_PIX_FMT_DRM_PRIME)\n   {\n     CVideoBufferDRMPRIMEFFmpeg* buffer =\n         dynamic_cast<CVideoBufferDRMPRIMEFFmpeg*>(m_videoBufferPool->Get());\n@@ -660,7 +660,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n \n   const AVFilter* srcFilter = avfilter_get_by_name(\"buffer\");\n   const AVFilter* outFilter = avfilter_get_by_name(\"buffersink\");\n-  enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_DRM_PRIME, AV_PIX_FMT_NONE };\n+  enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_DRM_PRIME, AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE };\n \n   std::string args = StringUtils::Format(\"video_size={}x{}:pix_fmt={}:time_base={}/{}:\"\n                                          \"pixel_aspect={}/{}\",\n@@ -808,6 +808,16 @@ void CDVDVideoCodecDRMPRIME::FilterClose()\n \n CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()\n {\n+  // sw decoded buffers need cache flush and for descripter to be set\n+  if (!IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format)) && m_pFrame->opaque != nullptr)\n+  {\n+    CVideoBufferDMA* buffer = static_cast<CVideoBufferDMA*>(m_pFrame->opaque);\n+    buffer->SetDimensions(m_pFrame->width, m_pFrame->height);\n+    buffer->SyncEnd();\n+    auto descriptor = buffer->GetDescriptor();\n+    m_pFrame->data[0] = reinterpret_cast<uint8_t*>(descriptor);\n+  }\n+\n   int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame);\n   if (ret < 0)\n   {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/patches/kodi/0002-gbm-Set-max-bpc-for-high-bit-depth-videos.patch",
    "content": "From 42b30508bfe5451d4dc2884acfde9e0ec2d58c92 Mon Sep 17 00:00:00 2001\nFrom: Dom Cobley <popcornmix@gmail.com>\nDate: Fri, 3 Dec 2021 16:00:50 +0000\nSubject: [PATCH 2/7] gbm: Set max bpc for high bit depth videos\n\n---\n .../HwDecRender/VideoLayerBridgeDRMPRIME.cpp     | 16 ++++++++++++++++\n 1 file changed, 16 insertions(+)\n\ndiff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp\nindex 4b8ee5afbb..bd6623e8d1 100644\n--- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp\n+++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp\n@@ -34,6 +34,14 @@ void CVideoLayerBridgeDRMPRIME::Disable()\n {\n   // disable video plane\n   auto plane = m_DRM->GetVideoPlane();\n+  auto connector = m_DRM->GetConnector();\n+\n+  // reset max bpc back to default of 8\n+  int bpc = 8;\n+  bool result = m_DRM->AddProperty(connector, \"max bpc\", bpc);\n+  CLog::Log(LOGDEBUG, \"CVideoLayerBridgeDRMPRIME::{} - setting max bpc to {} ({})\",\n+            __FUNCTION__, bpc, result);\n+\n   m_DRM->AddProperty(plane, \"FB_ID\", 0);\n   m_DRM->AddProperty(plane, \"CRTC_ID\", 0);\n \n@@ -175,6 +183,14 @@ void CVideoLayerBridgeDRMPRIME::Configure(CVideoBufferDRMPRIME* buffer)\n   std::tie(result, value) = plane->GetPropertyValue(\"COLOR_RANGE\", GetColorRange(picture));\n   if (result)\n     m_DRM->AddProperty(plane, \"COLOR_RANGE\", value);\n+\n+  // set max bpc to allow the drm driver to choose a deep colour mode\n+  int bpc = buffer->GetPicture().colorBits > 8 ? 12 : 8;\n+  auto connector = m_DRM->GetConnector();\n+  result = m_DRM->AddProperty(connector, \"max bpc\", bpc);\n+  CLog::Log(LOGDEBUG, \"CVideoLayerBridgeDRMPRIME::{} - setting max bpc to {} ({})\", __FUNCTION__,\n+            bpc, result);\n+\n }\n \n void CVideoLayerBridgeDRMPRIME::SetVideoPlane(CVideoBufferDRMPRIME* buffer, const CRect& destRect)\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/patches/kodi/0003-CVideoLayerBridgeDRMPRIME-add-colourspace-connector-.patch",
    "content": "From 0b9b204c6560f3aff39697f92616b48102840dfe Mon Sep 17 00:00:00 2001\nFrom: Lukas Rusak <lorusak@gmail.com>\nDate: Mon, 29 Apr 2019 18:48:45 -0700\nSubject: [PATCH 3/7] CVideoLayerBridgeDRMPRIME add colourspace connector\n property\n\n---\n .../Buffers/VideoBufferDRMPRIME.cpp           | 12 ++++++++++++\n .../VideoPlayer/Buffers/VideoBufferDRMPRIME.h |  1 +\n .../HwDecRender/VideoLayerBridgeDRMPRIME.cpp  | 19 +++++++++++++++++++\n 3 files changed, 32 insertions(+)\n\ndiff --git a/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.cpp b/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.cpp\nindex b1c23ffc3d..a5fb7ddf44 100644\n--- a/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.cpp\n+++ b/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.cpp\n@@ -20,6 +20,18 @@ extern \"C\"\n namespace DRMPRIME\n {\n \n+std::string GetColorimetry(const VideoPicture& picture)\n+{\n+  switch (picture.color_space)\n+  {\n+    case AVCOL_SPC_BT2020_CL:\n+    case AVCOL_SPC_BT2020_NCL:\n+      return \"BT2020_RGB\";\n+  }\n+\n+  return \"Default\";\n+}\n+\n std::string GetColorEncoding(const VideoPicture& picture)\n {\n   switch (picture.color_space)\ndiff --git a/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.h b/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.h\nindex e77f75b58b..4de9732308 100644\n--- a/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.h\n+++ b/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.h\n@@ -34,6 +34,7 @@ enum hdmi_eotf\n   HDMI_EOTF_BT_2100_HLG,\n };\n \n+std::string GetColorimetry(const VideoPicture& picture);\n std::string GetColorEncoding(const VideoPicture& picture);\n std::string GetColorRange(const VideoPicture& picture);\n uint8_t GetEOTF(const VideoPicture& picture);\ndiff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp\nindex bd6623e8d1..a1342595c6 100644\n--- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp\n+++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp\n@@ -42,6 +42,16 @@ void CVideoLayerBridgeDRMPRIME::Disable()\n   CLog::Log(LOGDEBUG, \"CVideoLayerBridgeDRMPRIME::{} - setting max bpc to {} ({})\",\n             __FUNCTION__, bpc, result);\n \n+  uint64_t value;\n+  std::tie(result, value) = connector->GetPropertyValue(\"Colorspace\", \"Default\");\n+  if (result)\n+  {\n+    CLog::Log(LOGDEBUG, \"CVideoLayerBridgeDRMPRIME::{} - setting connector colorspace to Default\",\n+              __FUNCTION__);\n+    m_DRM->AddProperty(connector, \"Colorspace\", value);\n+    m_DRM->SetActive(true);\n+  }\n+\n   m_DRM->AddProperty(plane, \"FB_ID\", 0);\n   m_DRM->AddProperty(plane, \"CRTC_ID\", 0);\n \n@@ -191,6 +201,15 @@ void CVideoLayerBridgeDRMPRIME::Configure(CVideoBufferDRMPRIME* buffer)\n   CLog::Log(LOGDEBUG, \"CVideoLayerBridgeDRMPRIME::{} - setting max bpc to {} ({})\", __FUNCTION__,\n             bpc, result);\n \n+  std::tie(result, value) = connector->GetPropertyValue(\"Colorspace\", GetColorimetry(picture));\n+  if (result)\n+  {\n+    CLog::Log(LOGDEBUG, \"CVideoLayerBridgeDRMPRIME::{} - setting connector colorspace to {}\",\n+              __FUNCTION__, GetColorimetry(picture));\n+    m_DRM->AddProperty(connector, \"Colorspace\", value);\n+    m_DRM->SetActive(true);\n+  }\n+\n }\n \n void CVideoLayerBridgeDRMPRIME::SetVideoPlane(CVideoBufferDRMPRIME* buffer, const CRect& destRect)\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/patches/kodi/0004-CDVDVideoCodecDRMPRIME-Adjust-av-formats-to-match-re.patch",
    "content": "From 518d8487d090af854fb72a7d0e5efc075d97228c Mon Sep 17 00:00:00 2001\nFrom: Dom Cobley <popcornmix@gmail.com>\nDate: Wed, 18 Jan 2023 16:41:00 +0000\nSubject: [PATCH 4/7] CDVDVideoCodecDRMPRIME: Adjust av formats to match recent\n ffmpeg changes\n\n---\n .../VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp   | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\nindex a36107c515..d5b3289680 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n@@ -319,6 +319,7 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio\n   m_pCodecContext->bits_per_coded_sample = hints.bitsperpixel;\n   m_pCodecContext->time_base.num = 1;\n   m_pCodecContext->time_base.den = DVD_TIME_BASE;\n+  m_pCodecContext->thread_safe_callbacks = 1;\n   m_pCodecContext->thread_count = CServiceBroker::GetCPUInfo()->GetCPUCount();\n \n   if (hints.extradata && hints.extrasize > 0)\n@@ -660,13 +661,13 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n \n   const AVFilter* srcFilter = avfilter_get_by_name(\"buffer\");\n   const AVFilter* outFilter = avfilter_get_by_name(\"buffersink\");\n-  enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_DRM_PRIME, AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE };\n+  enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_DRM_PRIME, AV_PIX_FMT_NONE };\n \n   std::string args = StringUtils::Format(\"video_size={}x{}:pix_fmt={}:time_base={}/{}:\"\n                                          \"pixel_aspect={}/{}\",\n                                          m_pCodecContext->width,\n                                          m_pCodecContext->height,\n-                                         m_pCodecContext->pix_fmt,\n+                                         AV_PIX_FMT_DRM_PRIME,\n                                          m_pCodecContext->time_base.num ?\n                                            m_pCodecContext->time_base.num : 1,\n                                          m_pCodecContext->time_base.num ?\n@@ -818,6 +819,7 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()\n     m_pFrame->data[0] = reinterpret_cast<uint8_t*>(descriptor);\n   }\n \n+  m_pFrame->format = AV_PIX_FMT_DRM_PRIME;\n   int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame);\n   if (ret < 0)\n   {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/patches/kodi/0005-DVDVideoCodecDRMPRIME-Support-YUV422-and-YUV444-form.patch",
    "content": "From a11461db2d442e0648ebb9255a2399a647d8f5be Mon Sep 17 00:00:00 2001\nFrom: Dom Cobley <popcornmix@gmail.com>\nDate: Wed, 25 Jan 2023 18:42:24 +0000\nSubject: [PATCH 5/7] DVDVideoCodecDRMPRIME: Support YUV422 and YUV444 formats\n\nSee: https://github.com/xbmc/xbmc/issues/20017\n\nWe currently can't play YUV422 and YUV444 videos with drm\nbut they can be made to work with straightforward plumbing\n---\n .../Buffers/VideoBufferPoolDMA.cpp            |  6 +++++\n .../DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 27 +++++++++++++++----\n 2 files changed, 28 insertions(+), 5 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/Buffers/VideoBufferPoolDMA.cpp b/xbmc/cores/VideoPlayer/Buffers/VideoBufferPoolDMA.cpp\nindex fb2dfc6c78..e6b071117e 100644\n--- a/xbmc/cores/VideoPlayer/Buffers/VideoBufferPoolDMA.cpp\n+++ b/xbmc/cores/VideoPlayer/Buffers/VideoBufferPoolDMA.cpp\n@@ -123,6 +123,12 @@ uint32_t CVideoBufferPoolDMA::TranslateFormat(AVPixelFormat format)\n     case AV_PIX_FMT_YUV420P:\n     case AV_PIX_FMT_YUVJ420P:\n       return DRM_FORMAT_YUV420;\n+    case AV_PIX_FMT_YUV422P:\n+    case AV_PIX_FMT_YUVJ422P:\n+      return DRM_FORMAT_YUV422;\n+    case AV_PIX_FMT_YUV444P:\n+    case AV_PIX_FMT_YUVJ444P:\n+      return DRM_FORMAT_YUV444;\n     default:\n       return 0;\n   }\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\nindex d5b3289680..4af903ecf5 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n@@ -142,7 +142,8 @@ static bool IsSupportedHwFormat(const enum AVPixelFormat fmt)\n \n static bool IsSupportedSwFormat(const enum AVPixelFormat fmt)\n {\n-  return fmt == AV_PIX_FMT_YUV420P || fmt == AV_PIX_FMT_YUVJ420P;\n+  return fmt == AV_PIX_FMT_YUV420P || fmt == AV_PIX_FMT_YUVJ420P || fmt == AV_PIX_FMT_YUV422P ||\n+         fmt == AV_PIX_FMT_YUVJ422P || fmt == AV_PIX_FMT_YUV444P || fmt == AV_PIX_FMT_YUVJ444P;\n }\n \n static const AVCodecHWConfig* FindHWConfig(const AVCodec* codec)\n@@ -206,7 +207,14 @@ enum AVPixelFormat CDVDVideoCodecDRMPRIME::GetFormat(struct AVCodecContext* avct\n     }\n   }\n \n-  CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::{} - unsupported pixel format\", __FUNCTION__);\n+  std::vector<std::string> formats;\n+  for (int n = 0; fmt[n] != AV_PIX_FMT_NONE; n++)\n+  {\n+    formats.emplace_back(av_get_pix_fmt_name(fmt[n]));\n+  }\n+  CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::{} - no supported pixel formats: {}\", __FUNCTION__,\n+            StringUtils::Join(formats, \", \"));\n+\n   return AV_PIX_FMT_NONE;\n }\n \n@@ -226,6 +234,14 @@ int CDVDVideoCodecDRMPRIME::GetBuffer(struct AVCodecContext* avctx, AVFrame* fra\n       case AV_PIX_FMT_YUVJ420P:\n         size = width * height * 3 / 2;\n         break;\n+      case AV_PIX_FMT_YUV422P:\n+      case AV_PIX_FMT_YUVJ422P:\n+        size = width * height * 2;\n+        break;\n+      case AV_PIX_FMT_YUV444P:\n+      case AV_PIX_FMT_YUVJ444P:\n+        size = width * height * 3;\n+        break;\n       default:\n         return -1;\n     }\n@@ -512,9 +528,10 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)\n         (static_cast<int>(lrint(pVideoPicture->iWidth / aspect_ratio))) & -3;\n   }\n \n-  pVideoPicture->color_range = m_pFrame->color_range == AVCOL_RANGE_JPEG ||\n-                               m_pFrame->format == AV_PIX_FMT_YUVJ420P ||\n-                               m_hints.colorRange == AVCOL_RANGE_JPEG;\n+  pVideoPicture->color_range =\n+      m_pFrame->color_range == AVCOL_RANGE_JPEG || m_pFrame->format == AV_PIX_FMT_YUVJ420P ||\n+      m_pFrame->format == AV_PIX_FMT_YUVJ422P || m_pFrame->format == AV_PIX_FMT_YUVJ444P ||\n+      m_hints.colorRange == AVCOL_RANGE_JPEG;\n   pVideoPicture->color_primaries = m_pFrame->color_primaries == AVCOL_PRI_UNSPECIFIED\n                                        ? m_hints.colorPrimaries\n                                        : m_pFrame->color_primaries;\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/patches/kodi/0006-VideoBufferDMA-Support-exporting-YCbCr444-buffers.patch",
    "content": "From 7b820fa6812e8389613238c6ab3a12fc1dee0276 Mon Sep 17 00:00:00 2001\nFrom: Dom Cobley <popcornmix@gmail.com>\nDate: Tue, 31 Jan 2023 14:13:00 +0000\nSubject: [PATCH 6/7] VideoBufferDMA: Support exporting YCbCr444 buffers\n\nThe current code assumes chroma is decimated by two, but that is not necessarily the case.\nDRMPRIME decode with EGL rendering of YCbCr444 video will have corrupted colours.\n\nAsk ffmpeg what the chroma decimation is.\n---\n .../VideoPlayer/Buffers/VideoBufferDMA.cpp    | 21 ++++++++++++-------\n 1 file changed, 14 insertions(+), 7 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/Buffers/VideoBufferDMA.cpp b/xbmc/cores/VideoPlayer/Buffers/VideoBufferDMA.cpp\nindex 2dd7c1341d..3e6bf0dc7a 100644\n--- a/xbmc/cores/VideoPlayer/Buffers/VideoBufferDMA.cpp\n+++ b/xbmc/cores/VideoPlayer/Buffers/VideoBufferDMA.cpp\n@@ -119,20 +119,27 @@ bool CVideoBufferDMA::Alloc()\n \n void CVideoBufferDMA::Export(AVFrame* frame, uint32_t width, uint32_t height)\n {\n-  m_planes = av_pix_fmt_count_planes(static_cast<AVPixelFormat>(frame->format));\n+  AVPixelFormat pix_fmt = static_cast<AVPixelFormat>(frame->format);\n+  m_planes = av_pix_fmt_count_planes(pix_fmt);\n+  int h_shift;\n+  int v_shift;\n \n-  if (m_planes < 2)\n-    throw std::runtime_error(\n-        \"non-planar formats not supported: \" +\n-        std::string(av_get_pix_fmt_name(static_cast<AVPixelFormat>(frame->format))));\n+  if (av_pix_fmt_get_chroma_sub_sample(pix_fmt, &h_shift, &v_shift))\n+    throw std::runtime_error(\"unable to determine chroma_sub_sample: \" +\n+                             std::string(av_get_pix_fmt_name(pix_fmt)));\n+\n+  if (m_planes < 2 || m_planes > 3)\n+    throw std::runtime_error(\"only 2 or 3 plane formats supported: \" +\n+                             std::string(av_get_pix_fmt_name(pix_fmt)));\n \n   for (uint32_t plane = 0; plane < m_planes; plane++)\n   {\n     m_strides[plane] =\n         av_image_get_linesize(static_cast<AVPixelFormat>(frame->format), width, plane);\n-    m_offsets[plane] =\n-        plane == 0 ? 0 : (m_offsets[plane - 1] + m_strides[plane - 1] * (height >> (plane - 1)));\n   }\n+  m_offsets[0] = 0;\n+  m_offsets[1] = m_strides[0] * height;\n+  m_offsets[2] = m_offsets[1] + (m_strides[1] * height >> v_shift);\n \n   if (CServiceBroker::GetLogging().CanLogComponent(LOGVIDEO))\n   {\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/RPi/patches/kodi/0007-DVDVideoCodecDRMPRIME-Add-support-for-arbitrary-outp.patch",
    "content": "From ae91030c1a84693fd0d34b919f9f8434b08e00c9 Mon Sep 17 00:00:00 2001\nFrom: Dom Cobley <popcornmix@gmail.com>\nDate: Mon, 6 Feb 2023 15:19:51 +0000\nSubject: [PATCH 7/7] DVDVideoCodecDRMPRIME: Add support for arbitrary output\n pixel formats\n\nThis enables any ffmpeg pixel formats to be supported by DRMPRIME decoder\nby creating a scale ffmpeg filter to convert it to a supported format.\n\nThis allows formats like h264 Hi10P and hevc 12-bit 444 to be software decoded,\nconverted and displayed through DRM.\n\nThis will be a cheaper path than disabling DRMPRIME, which is also\nsoftware decode, convert, but then needs convert to texture and display through GL.\n\nAnd it happens automatically without requiring user video settings\n---\n .../DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 124 +++++++++++-------\n .../DVDCodecs/Video/DVDVideoCodecDRMPRIME.h   |   3 +-\n 2 files changed, 77 insertions(+), 50 deletions(-)\n\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\nindex 4af903ecf5..92a182608d 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp\n@@ -199,7 +199,7 @@ enum AVPixelFormat CDVDVideoCodecDRMPRIME::GetFormat(struct AVCodecContext* avct\n {\n   for (int n = 0; fmt[n] != AV_PIX_FMT_NONE; n++)\n   {\n-    if (IsSupportedHwFormat(fmt[n]) || IsSupportedSwFormat(fmt[n]))\n+    //if (IsSupportedHwFormat(fmt[n]) || IsSupportedSwFormat(fmt[n]))\n     {\n       CDVDVideoCodecDRMPRIME* ctx = static_cast<CDVDVideoCodecDRMPRIME*>(avctx->opaque);\n       ctx->UpdateProcessInfo(avctx, fmt[n]);\n@@ -220,7 +220,8 @@ enum AVPixelFormat CDVDVideoCodecDRMPRIME::GetFormat(struct AVCodecContext* avct\n \n int CDVDVideoCodecDRMPRIME::GetBuffer(struct AVCodecContext* avctx, AVFrame* frame, int flags)\n {\n-  if (IsSupportedSwFormat(static_cast<AVPixelFormat>(frame->format)))\n+  AVPixelFormat pix_fmt = static_cast<AVPixelFormat>(frame->format);\n+  if (IsSupportedSwFormat(pix_fmt))\n   {\n     int width = frame->width;\n     int height = frame->height;\n@@ -228,7 +229,7 @@ int CDVDVideoCodecDRMPRIME::GetBuffer(struct AVCodecContext* avctx, AVFrame* fra\n     AlignedSize(avctx, width, height);\n \n     int size;\n-    switch (avctx->pix_fmt)\n+    switch (pix_fmt)\n     {\n       case AV_PIX_FMT_YUV420P:\n       case AV_PIX_FMT_YUVJ420P:\n@@ -248,13 +249,12 @@ int CDVDVideoCodecDRMPRIME::GetBuffer(struct AVCodecContext* avctx, AVFrame* fra\n \n     CDVDVideoCodecDRMPRIME* ctx = static_cast<CDVDVideoCodecDRMPRIME*>(avctx->opaque);\n     auto buffer = dynamic_cast<CVideoBufferDMA*>(\n-        ctx->m_processInfo.GetVideoBufferManager().Get(avctx->pix_fmt, size, nullptr));\n+        ctx->m_processInfo.GetVideoBufferManager().Get(pix_fmt, size, nullptr));\n     if (!buffer)\n       return -1;\n \n-    frame->opaque = static_cast<void*>(buffer);\n     frame->opaque_ref =\n-        av_buffer_create(nullptr, 0, ReleaseBuffer, frame->opaque, AV_BUFFER_FLAG_READONLY);\n+        av_buffer_create(nullptr, 0, ReleaseBuffer, static_cast<void*>(buffer), AV_BUFFER_FLAG_READONLY);\n \n     buffer->Export(frame, width, height);\n     buffer->SyncStart();\n@@ -608,9 +608,9 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)\n     buffer->SetRef(m_pFrame);\n     pVideoPicture->videoBuffer = buffer;\n   }\n-  else if (m_pFrame->opaque)\n+  else if (IsSupportedSwFormat(static_cast<AVPixelFormat>(m_pFrame->format)))\n   {\n-    CVideoBufferDMA* buffer = static_cast<CVideoBufferDMA*>(m_pFrame->opaque);\n+    CVideoBufferDMA* buffer = static_cast<CVideoBufferDMA*>(av_buffer_get_opaque(m_pFrame->buf[0]));\n     buffer->SetPictureParams(*pVideoPicture);\n     buffer->Acquire();\n     buffer->SyncEnd();\n@@ -644,13 +644,13 @@ void CDVDVideoCodecDRMPRIME::FilterTest()\n \n     if (name.find(\"deinterlace\") != std::string::npos)\n     {\n-      if (FilterOpen(name, true))\n+      bool ret = FilterOpen(name, false, true);\n+      FilterClose();\n+      if (ret)\n       {\n         m_deintFilterName = name;\n-\n         CLog::Log(LOGDEBUG, \"CDVDVideoCodecDRMPRIME::{} - found deinterlacing filter {}\",\n                   __FUNCTION__, name);\n-\n         return;\n       }\n     }\n@@ -660,14 +660,31 @@ void CDVDVideoCodecDRMPRIME::FilterTest()\n             __FUNCTION__);\n }\n \n-bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n+AVFrame *CDVDVideoCodecDRMPRIME::alloc_filter_frame(AVFilterContext * ctx, void * v, int w, int h)\n+{\n+  int result;\n+  CDVDVideoCodecDRMPRIME* me = static_cast<CDVDVideoCodecDRMPRIME*>(v);\n+  AVFrame *frame = av_frame_alloc();\n+  frame->width = w;\n+  frame->height = h;\n+  frame->format = AV_PIX_FMT_YUV420P;\n+\n+  if ((result = CDVDVideoCodecDRMPRIME::GetBuffer(me->m_pCodecContext, frame, 0)) < 0)\n+  {\n+    CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::alloc_filter_frame - failed to GetBuffer ({})\", result);\n+    return nullptr;\n+  }\n+  return frame;\n+}\n+\n+bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool scale, bool test)\n {\n   int result;\n \n   if (m_pFilterGraph)\n     FilterClose();\n \n-  if (filters.empty())\n+  if (filters.empty() && !scale)\n     return true;\n \n   if (!(m_pFilterGraph = avfilter_graph_alloc()))\n@@ -678,13 +695,13 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n \n   const AVFilter* srcFilter = avfilter_get_by_name(\"buffer\");\n   const AVFilter* outFilter = avfilter_get_by_name(\"buffersink\");\n-  enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_DRM_PRIME, AV_PIX_FMT_NONE };\n+  enum AVPixelFormat pix_fmts[] = { scale ? AV_PIX_FMT_YUV420P : AV_PIX_FMT_DRM_PRIME, AV_PIX_FMT_NONE };\n \n   std::string args = StringUtils::Format(\"video_size={}x{}:pix_fmt={}:time_base={}/{}:\"\n                                          \"pixel_aspect={}/{}\",\n                                          m_pCodecContext->width,\n                                          m_pCodecContext->height,\n-                                         AV_PIX_FMT_DRM_PRIME,\n+                                         scale ? m_pCodecContext->pix_fmt : AV_PIX_FMT_DRM_PRIME,\n                                          m_pCodecContext->time_base.num ?\n                                            m_pCodecContext->time_base.num : 1,\n                                          m_pCodecContext->time_base.num ?\n@@ -703,7 +720,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n     CLog::Log(LOGERROR,\n               \"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: src: {} ({})\",\n               err, result);\n-    FilterClose();\n     return false;\n   }\n \n@@ -711,7 +727,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n   if (!par)\n   {\n     CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - unable to alloc buffersrc\");\n-    FilterClose();\n     return false;\n   }\n \n@@ -727,7 +742,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n     CLog::Log(LOGERROR,\n               \"CDVDVideoCodecDRMPRIME::FilterOpen - av_buffersrc_parameters_set:  {} ({})\",\n               err, result);\n-    FilterClose();\n     return false;\n   }\n   av_freep(&par);\n@@ -741,7 +755,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n     CLog::Log(LOGERROR,\n               \"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: out: {} ({})\",\n               err, result);\n-    FilterClose();\n     return false;\n   }\n \n@@ -750,32 +763,46 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n   if (result < 0)\n   {\n     CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - failed settings pix formats\");\n-    FilterClose();\n     return false;\n   }\n \n-  AVFilterInOut* outputs = avfilter_inout_alloc();\n-  AVFilterInOut* inputs  = avfilter_inout_alloc();\n+  if (!filters.empty())\n+  {\n+    AVFilterInOut* outputs = avfilter_inout_alloc();\n+    AVFilterInOut* inputs  = avfilter_inout_alloc();\n \n-  outputs->name = av_strdup(\"in\");\n-  outputs->filter_ctx = m_pFilterIn;\n-  outputs->pad_idx = 0;\n-  outputs->next = nullptr;\n+    outputs->name = av_strdup(\"in\");\n+    outputs->filter_ctx = m_pFilterIn;\n+    outputs->pad_idx = 0;\n+    outputs->next = nullptr;\n \n-  inputs->name = av_strdup(\"out\");\n-  inputs->filter_ctx = m_pFilterOut;\n-  inputs->pad_idx = 0;\n-  inputs->next = nullptr;\n+    inputs->name = av_strdup(\"out\");\n+    inputs->filter_ctx = m_pFilterOut;\n+    inputs->pad_idx = 0;\n+    inputs->next = nullptr;\n \n-  result = avfilter_graph_parse_ptr(m_pFilterGraph, filters.c_str(), &inputs, &outputs, NULL);\n-  avfilter_inout_free(&outputs);\n-  avfilter_inout_free(&inputs);\n+    result = avfilter_graph_parse_ptr(m_pFilterGraph, filters.c_str(), &inputs, &outputs, NULL);\n+    avfilter_inout_free(&outputs);\n+    avfilter_inout_free(&inputs);\n \n-  if (result < 0)\n+    if (result < 0)\n+    {\n+      CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_parse\");\n+      return false;\n+    }\n+  }\n+  else\n   {\n-    CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_parse\");\n-    FilterClose();\n-    return false;\n+    if ((result = av_buffersink_set_alloc_video_frame(m_pFilterOut, alloc_filter_frame, static_cast<void*>(this))) < 0)\n+    {\n+      CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - av_buffersink_set_alloc_video_frame = {}\", result);\n+      return result;\n+    }\n+    if ((result = avfilter_link(m_pFilterIn, 0, m_pFilterOut, 0)) < 0)\n+    {\n+      CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_link\");\n+      return false;\n+    }\n   }\n \n   if ((result = avfilter_graph_config(m_pFilterGraph,  nullptr)) < 0)\n@@ -784,15 +811,11 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)\n     av_strerror(result, err, AV_ERROR_MAX_STRING_SIZE);\n     CLog::Log(LOGERROR, \"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_config:  {} ({})\",\n               err, result);\n-    FilterClose();\n     return false;\n   }\n \n   if (test)\n-  {\n-    FilterClose();\n     return true;\n-  }\n \n   m_processInfo.SetVideoDeintMethod(filters);\n \n@@ -827,16 +850,16 @@ void CDVDVideoCodecDRMPRIME::FilterClose()\n CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()\n {\n   // sw decoded buffers need cache flush and for descripter to be set\n-  if (!IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format)) && m_pFrame->opaque != nullptr)\n+  if (!IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format)) && IsSupportedSwFormat(static_cast<AVPixelFormat>(m_pFrame->format)))\n   {\n-    CVideoBufferDMA* buffer = static_cast<CVideoBufferDMA*>(m_pFrame->opaque);\n+    CVideoBufferDMA* buffer = static_cast<CVideoBufferDMA*>(av_buffer_get_opaque(m_pFrame->buf[0]));\n     buffer->SetDimensions(m_pFrame->width, m_pFrame->height);\n     buffer->SyncEnd();\n     auto descriptor = buffer->GetDescriptor();\n     m_pFrame->data[0] = reinterpret_cast<uint8_t*>(descriptor);\n+    m_pFrame->format = AV_PIX_FMT_DRM_PRIME;\n   }\n \n-  m_pFrame->format = AV_PIX_FMT_DRM_PRIME;\n   int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame);\n   if (ret < 0)\n   {\n@@ -929,25 +952,28 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo\n     return VC_ERROR;\n   }\n \n+  // we need to scale if the buffer isn't in DRM_PRIME format\n+  bool need_scale = !IsSupportedSwFormat(static_cast<AVPixelFormat>(m_pFrame->format)) && !IsSupportedHwFormat(static_cast<AVPixelFormat>(m_pFrame->format));\n+\n   if (!m_processInfo.GetVideoInterlaced() && m_pFrame->interlaced_frame)\n     m_processInfo.SetVideoInterlaced(true);\n \n   std::string filterChain = GetFilterChain(m_pFrame->interlaced_frame);\n-  if (!filterChain.empty())\n+  if (!filterChain.empty() || need_scale)\n   {\n     bool reopenFilter = false;\n     if (m_filters != filterChain)\n       reopenFilter = true;\n \n     if (m_pFilterGraph &&\n-        (m_pFilterIn->outputs[0]->w != m_pCodecContext->width ||\n-         m_pFilterIn->outputs[0]->h != m_pCodecContext->height))\n+        (m_pFilterIn->outputs[0]->w != m_pFrame->width ||\n+         m_pFilterIn->outputs[0]->h != m_pFrame->height))\n       reopenFilter = true;\n \n-    if (reopenFilter)\n+    if (reopenFilter || (need_scale && m_pFilterGraph == nullptr))\n     {\n       m_filters = filterChain;\n-      if (!FilterOpen(filterChain, false))\n+      if (!FilterOpen(filterChain, need_scale, false))\n         FilterClose();\n     }\n \ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h\nindex fab3431d40..bb88fde1f9 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h\n@@ -44,7 +44,8 @@ protected:\n   CDVDVideoCodec::VCReturn ProcessFilterOut();\n   static enum AVPixelFormat GetFormat(struct AVCodecContext* avctx, const enum AVPixelFormat* fmt);\n   static int GetBuffer(struct AVCodecContext* avctx, AVFrame* frame, int flags);\n-  bool FilterOpen(const std::string& filters, bool test);\n+  static AVFrame *alloc_filter_frame(AVFilterContext * ctx, void * v, int w, int h);\n+  bool FilterOpen(const std::string& filters, bool scale, bool test);\n   void FilterClose();\n   void FilterTest();\n   std::string GetFilterChain(bool interlaced);\n-- \n2.39.2\n\n"
  },
  {
    "path": "projects/Rockchip/README.md",
    "content": "# Rockchip\n\nThis project is for Rockchip SoC devices\n\n## Devices\n\n**RK3288**\n* [ASUS Tinker Board](devices/RK3288)\n* [mqmaker MiQi](devices/RK3288)\n\n**RK3328**\n* [Beelink A1 TV BOX](devices/RK3328)\n* [PINE64 ROCK64](devices/RK3328)\n* [Popcorn Hour Transformer](devices/RK3328)\n* [Firefly ROC-RK3328-CC](devices/RK3328)\n\n**RK3399**\n* [96rocks ROCK960](devices/RK3399)\n* [Hugsun X99 TV BOX](devices/RK3399)\n* [Khadas Edge](devices/RK3399)\n* [FriendlyARM NanoPC-T4](devices/RK3399)\n* [FriendlyARM NanoPi M4](devices/RK3399)\n* [Orange Pi RK3399](devices/RK3399)\n* [PINE64 RockPro64](devices/RK3399)\n* [Radxa ROCK Pi 4](devices/RK3399)\n* [Radxa ROCK Pi 4+](devices/RK3399)\n* [Radxa ROCK Pi N10](devices/RK3399)\n* [ROC-RK3399-PC](devices/RK3399)\n* [ROC-RK3399-PC-PLUS](devices/RK3399)\n* [Rockchip Sapphire Board](devices/RK3399)\n\n**My single-board computer is not listed, will it be added in the future?**<br>\nIf your single-board computer uses a current generation SoC listed on http://opensource.rock-chips.com/wiki_Main_Page the odds are in your favor.\n\n**My Android device is not listed, will it be added in the future?**<br>\nYou may have luck if your device vendor is open source friendly, otherwise keep using Android for best support.\n\n**My device does not boot and I don't understand why.**<br>\nIf your device has Android or any sort of vendor u-boot preinstalled in EMMC or SPI, make sure to add `ROCKCHIP_LEGACY_BOOT=1` when building an image.\nThis is done automatically for supported devices, which are known to come with Android preinstalled.\n\n## Links\n\n* http://opensource.rock-chips.com\n\n## Useful debug commands\n\n* `cat /sys/kernel/debug/dri/0/state`\n* `cat /sys/kernel/debug/dri/0/framebuffer`\n* `cat /sys/kernel/debug/dma_buf/bufinfo`\n* `cat /sys/kernel/debug/cec/cec0/status`\n* `hexdump -C /sys/class/drm/card0-HDMI-A-1/edid`\n* `edid-decode /sys/class/drm/card0-HDMI-A-1/edid`\n* `cat /sys/kernel/debug/clk/clk_summary`\n* `cat /sys/kernel/debug/regulator/regulator_summary`\n"
  },
  {
    "path": "projects/Rockchip/bootloader/canupdate.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n# devices have been renamed after LE9.2\nif [ \"${1}\" = \"TinkerBoard.arm\" -o \"${1}\" = \"MiQi.arm\" ]; then\n  if [ \"${2}\" = \"RK3288.arm\" ]; then\n    exit 0\n  fi\nfi\n\n# Allow upgrades between arm and aarch64\nif [ \"${1}\" = \"@PROJECT@.arm\" -o \"${1}\" = \"@PROJECT@.aarch64\" ]; then\n  exit 0\nelse\n  exit 1\nfi\n"
  },
  {
    "path": "projects/Rockchip/bootloader/config",
    "content": "CONFIG_BOOTDELAY=1\n# CONFIG_DM_VIDEO is not set\n# CONFIG_DISPLAY is not set\n# CONFIG_ENV_IS_IN_MMC is not set\n# CONFIG_NET_RANDOM_ETHADDR is not set\n# CONFIG_USB_KEYBOARD is not set\n# CONFIG_TPL_DRIVERS_MISC is not set\nCONFIG_MISC=y\nCONFIG_MISC_INIT_R=y\nCONFIG_ROCKCHIP_EFUSE=y\nCONFIG_SHA256=y\n"
  },
  {
    "path": "projects/Rockchip/bootloader/firmware",
    "content": "\n[ -z \"${ROCKCHIP_LEGACY_BOOT}\" ] && export ROCKCHIP_LEGACY_BOOT=$(\"${ROOT}/${SCRIPTS}/uboot_helper\" \"${PROJECT}\" \"${DEVICE}\" \"${UBOOT_SYSTEM}\" rockchip_legacy_boot)\n\nif [ \"${ROCKCHIP_LEGACY_BOOT}\" = \"1\" ]; then\n  export UBOOT_TARGET=\"u-boot-dtb.bin\"\nelse\n  export UBOOT_TARGET=\"\"\nfi\n\nif [ -n \"${ATF_PLATFORM}\" ]; then\n  if [ -f \"$(get_install_dir atf)/usr/share/bootloader/bl31.elf\" ]; then\n    export BL31=\"$(get_install_dir atf)/usr/share/bootloader/bl31.elf\"\n  fi\nfi\n"
  },
  {
    "path": "projects/Rockchip/bootloader/install",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_RKBIN=\"$(get_build_dir rkbin)\"\nPKG_SOC=\"${DEVICE/RK/rk}\"\n\nif [ \"${ROCKCHIP_LEGACY_BOOT}\" = \"1\" ]; then\n  echo \"install: building Rockchip legacy boot chain ...\"\n\n  if [ ! -f u-boot-dtb.bin ]; then\n    echo \"install: u-boot-dtb.bin does not exist UBOOT_TARGET: ${UBOOT_TARGET}\"\n    exit 1\n  fi\n\n  PKG_BOOT_INI=\"${PKG_RKBIN}\"/RKBOOT/\"${DEVICE}\"MINIALL.ini\n  if [ ! -f \"${PKG_BOOT_INI}\" ]; then\n    echo \"install: ${PKG_BOOT_INI} does not exist\"\n    exit 1\n  fi\n\n  PKG_DDR_BIN=\"${PKG_RKBIN}\"/$(sed -n \"/FlashData/s/FlashData=//p\" \"${PKG_BOOT_INI}\")\n  PKG_MINILOADER=\"${PKG_RKBIN}\"/$(sed -n \"/FlashBoot/s/FlashBoot=//p\" \"${PKG_BOOT_INI}\")\n  PKG_LOAD_ADDR=$(sed -n \"/SYS_TEXT_BASE/s/#define CONFIG_SYS_TEXT_BASE //p\" u-boot.cfg)\n\n  # Override sdram frequency\n  if [ \"${DEVICE}\" = \"RK3328\" ]; then\n    sed -s 's/\\x4d\\x1\\x4d\\x1\\x4d\\x1\\x4d\\x1\\x4d\\x1\\x4d\\x1/\\x20\\x3\\x20\\x3\\x20\\x3\\x20\\x3\\x20\\x3\\x20\\x3/g' -i \"${PKG_DDR_BIN}\"\n    sed -s 's/\\x90\\x1\\x90\\x1\\x90\\x1\\x90\\x1\\x90\\x1\\x90\\x1/\\x20\\x3\\x20\\x3\\x20\\x3\\x20\\x3\\x20\\x3\\x20\\x3/g' -i \"${PKG_DDR_BIN}\"\n  fi\n\n  ${PKG_RKBIN}/tools/mkimage -n \"${PKG_SOC}\" -T rksd -d \"${PKG_DDR_BIN}\":\"${PKG_MINILOADER}\" idbloader.img.rk || exit 1\n  ${PKG_RKBIN}/tools/loaderimage --pack --uboot u-boot-dtb.bin uboot.img.rk \"${PKG_LOAD_ADDR}\" || exit 1\n\n  dd if=idbloader.img.rk of=\"${UBOOT_FIT_IMAGE}\" seek=0 conv=fsync,notrunc > /dev/null 2>&1 || exit 1\n  dd if=uboot.img.rk of=\"${UBOOT_FIT_IMAGE}\" seek=16320 conv=fsync,notrunc > /dev/null 2>&1 || exit 1\n\n  if [ \"${TARGET_ARCH}\" = \"aarch64\" -o \"${TARGET_KERNEL_ARCH}\" = \"arm64\" ]; then\n    PKG_ATF_INI=\"${PKG_RKBIN}\"/RKTRUST/\"${DEVICE}\"TRUST.ini\n    if [ ! -f \"${PKG_ATF_INI}\" ]; then\n      echo \"install: ${PKG_ATF_INI} does not exist\"\n      exit 1\n    fi\n\n    \"${PKG_RKBIN}\"/tools/trust_merger --ignore-bl32 --prepath \"${PKG_RKBIN}\"/ \"${PKG_ATF_INI}\" || exit 1\n    dd if=trust.img of=\"${UBOOT_FIT_IMAGE}\" seek=24512 conv=fsync,notrunc > /dev/null 2>&1 || exit 1\n  fi\nfi\n\nif [ -f \"${UBOOT_FIT_IMAGE}\" ]; then\n  cp -av \"${UBOOT_FIT_IMAGE}\" \"${INSTALL}\"/usr/share/bootloader\nelse\n  echo \"install: bootloader ${UBOOT_FIT_IMAGE} was not built.\"\n  exit 1\nfi\n"
  },
  {
    "path": "projects/Rockchip/bootloader/mkimage",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nif [ -n \"${UBOOT_SYSTEM}\" ]; then\n  BOOTLOADER_PATH=\"${RELEASE_DIR}/3rdparty/bootloader/u-boot-rockchip.bin\"\n  if [ -f \"${BOOTLOADER_PATH}\" ]; then\n    echo \"image: burn bootloader to image...\"\n    dd if=\"${BOOTLOADER_PATH}\" of=\"${DISK}\" bs=32k seek=1 conv=fsync,notrunc >\"${SAVE_ERROR}\" 2>&1 || show_error\n  else\n    echo \"image: bootloader ${BOOTLOADER_PATH} does not exist.\";\n    exit 1\n  fi\nfi\n"
  },
  {
    "path": "projects/Rockchip/bootloader/release",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nSRCDIR=\"${BUILD}\"/image/system/usr/share/bootloader\nDSTDIR=\"${RELEASE_DIR}\"/3rdparty/bootloader\n\nmkdir -p \"${DSTDIR}\"\nif [ -n \"${UBOOT_SYSTEM}\" ]; then\n  if [ -f \"${SRCDIR}\"/\"${UBOOT_FIT_IMAGE}\" ]; then\n    cp -av \"${SRCDIR}\"/\"${UBOOT_FIT_IMAGE}\" \"${DSTDIR}\" && \\\n    ln -sfv \"${UBOOT_FIT_IMAGE}\" \"${DSTDIR}\"/idbloader.img || exit 1\n    if [ \"${ROCKCHIP_LEGACY_BOOT}\" = \"1\" ]; then\n      touch \"${DSTDIR}\"/.rockchip_boot_chain_old\n    else\n      touch \"${DSTDIR}\"/.rockchip_boot_chain_new\n    fi\n  else\n    echo \"release: bootloader image ${SRCDIR}/${UBOOT_FIT_IMAGE} does not exist.\"\n    exit 1\n  fi\nfi\n\ncp -av \"${SRCDIR}\"/\"${DEVICE,,}\"*.dtb \"${DSTDIR}\"\n"
  },
  {
    "path": "projects/Rockchip/bootloader/update.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n[ -z \"${SYSTEM_ROOT}\" ] && SYSTEM_ROOT=\"\"\n[ -z \"${BOOT_ROOT}\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"${BOOT_PART}\" ] && BOOT_PART=$(df \"${BOOT_ROOT}\" | tail -1 | awk {' print $1 '})\nif [ -z \"${BOOT_DISK}\" ]; then\n  case ${BOOT_PART} in\n    /dev/sd[a-z][0-9]*)\n      BOOT_DISK=$(echo ${BOOT_PART} | sed -e \"s,[0-9]*,,g\")\n      ;;\n    /dev/mmcblk*)\n      BOOT_DISK=$(echo ${BOOT_PART} | sed -e \"s,p[0-9]*,,g\")\n      ;;\n  esac\nfi\n\n# mount ${BOOT_ROOT} r/w\n  mount -o remount,rw ${BOOT_ROOT}\n\n# update device tree\n  for all_dtb in ${BOOT_ROOT}/*.dtb; do\n    dtb=$(basename ${all_dtb})\n\n    # device tree mappings for update from vendor to mainline kernel\n    case \"${dtb}\" in\n      rk3288-miniarm.dtb)\n        new_dtb=rk3288-tinker-s.dtb\n        ;;\n      rk3328-box.dtb|rk3328-box-trn9.dtb|rk3328-box-z28.dtb|rk3328-rockbox.dtb)\n        new_dtb=rk3328-a1.dtb\n        ;;\n      rk3399-rock-pi-4.dtb)\n        new_dtb=rk3399-rock-pi-4b.dtb\n        ;;\n      *)\n        new_dtb=\"${dtb}\"\n        ;;\n    esac\n\n    if [ \"${dtb}\" != \"${new_dtb}\" -a -f ${SYSTEM_ROOT}/usr/share/bootloader/${new_dtb} ]; then\n      echo -n \"Replacing ${dtb} with ${new_dtb} ... \"\n      cp -p ${SYSTEM_ROOT}/usr/share/bootloader/${new_dtb} ${BOOT_ROOT} && \\\n      sed -e \"s/FDT \\/${dtb}/FDT \\/${new_dtb}/g\" \\\n          -i ${BOOT_ROOT}/extlinux/extlinux.conf && \\\n      rm -f ${BOOT_ROOT}/${dtb}\n      echo \"done\"\n    else\n      if [ -f ${SYSTEM_ROOT}/usr/share/bootloader/${dtb} ]; then\n        echo -n \"Updating ${dtb}... \"\n        cp -p ${SYSTEM_ROOT}/usr/share/bootloader/${dtb} ${BOOT_ROOT}\n        echo \"done\"\n      elif [ \"$(grep -c \"FDT /${dtb}\" ${BOOT_ROOT}/extlinux/extlinux.conf)\" -ne 0 ]; then\n\t non_existend_dtb=\"${dtb}\"\n      fi\n    fi\n  done\n\n# update bootloader\n if [ -f ${SYSTEM_ROOT}/usr/share/bootloader/u-boot-rockchip.bin ]; then\n    echo -n \"Updating fit image u-boot-rockchip.bin ... \"\n    dd if=${SYSTEM_ROOT}/usr/share/bootloader/u-boot-rockchip.bin of=${BOOT_DISK} bs=32k seek=1 conv=fsync,notrunc &>/dev/null\n    echo \"done\"\n  fi\n\n# mount ${BOOT_ROOT} r/o\n  sync\n  mount -o remount,ro ${BOOT_ROOT}\n\n# warning if device tree was not updated\n  if [ -n \"${non_existend_dtb}\" ]; then\n    echo \"The device tree ${non_existend_dtb} your installation uses does not exist in this update package.\"\n    echo \"The updated system will continue to use the device tree from the previous system and your installation might be broken.\"\n    echo \"Please check documentation to find out which boards are supported by this package.\"\n    sleep 10\n  fi\n\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/README.md",
    "content": "# GameForce CHI\n\nThis is for GameForce CHI device using RK3326 SOC\n\n**Build**\n\n* `PROJECT=Rockchip DEVICE=GameForce ARCH=aarch64 make image`\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/bootloader/canupdate.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n# Allow upgrades between arm and aarch64\nif [ \"$1\" = \"@PROJECT@.arm\" -o \"$1\" = \"@PROJECT@.aarch64\" ]; then\n  exit 0\nelse\n  exit 1\nfi\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/bootloader/config",
    "content": "CONFIG_BOOTDELAY=1\n# CONFIG_EFI_LOADER is not set\nCONFIG_FIT=y\nCONFIG_FIT_SIGNATURE=n\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/bootloader/install",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_RKBIN=\"$(get_build_dir rkbin)\"\nPKG_SOC=$UBOOT_SYSTEM\n\nif [ \"$DEVICE\" = \"RK3328\" -o \"$DEVICE\" = \"RK3399\" ]; then\n  PKG_SOC=\"${DEVICE/RK/rk}\"\nfi\n\nif [ \"$DEVICE\" == \"OdroidGoAdvance\" ] || [ \"$DEVICE\" == \"GameForce\" ]; then\n  PKG_SOC=\"px30\"\nfi\n\ncase \"$PKG_SOC\" in\n  rk3036)\n    PKG_DATAFILE=\"spl/u-boot-spl-nodtb.bin\"\n    PKG_LOADER=\"u-boot-dtb.bin\"\n    ;;\n  rk3288)\n    PKG_DATAFILE=\"$PKG_RKBIN/rk32/rk3288_ddr_400MHz_v1.06.bin\"\n    PKG_LOADER=\"$PKG_RKBIN/rk32/rk3288_miniloader_v2.36.bin\"\n    PKG_LOAD_ADDR=\"0x0\"\n    ;;\n  px30)\n    PKG_DATAFILE=\"$PKG_RKBIN/bin/rk33/rk3326_ddr_333MHz_v1.14.bin\"\n    PKG_LOADER=\"$PKG_RKBIN/bin/rk33/rk3326_miniloader_v1.20.bin\"\n    PKG_BL31=\"$PKG_RKBIN/bin/rk33/rk3326_bl31_v1.18.elf\"\n    PKG_BL32=\"$PKG_RKBIN/bin/rk33/rk3326_bl32_v1.13.bin\"\n    PKG_LOAD_ADDR=\"0x00200000\"\n    ;;\n  rk3328)\n    PKG_DATAFILE=\"$PKG_RKBIN/rk33/rk3328_ddr_786MHz_v1.13.bin\"\n    PKG_LOADER=\"$PKG_RKBIN/rk33/rk3328_miniloader_v2.49.bin\"\n    PKG_BL31=\"$PKG_RKBIN/rk33/rk3328_bl31_v1.40.elf\"\n    PKG_LOAD_ADDR=\"0x200000\"\n    ;;\n  rk3399)\n    PKG_DATAFILE=\"$PKG_RKBIN/rk33/rk3399_ddr_800MHz_v1.17.bin\"\n    PKG_LOADER=\"$PKG_RKBIN/rk33/rk3399_miniloader_v1.15.bin\"\n    PKG_BL31=\"$PKG_RKBIN/rk33/rk3399_bl31_v1.24.elf\"\n    PKG_LOAD_ADDR=\"0x200000\"\n    ;;\n  *)\n    PKG_DATAFILE=\"spl/u-boot-spl-dtb.bin\"\n    PKG_LOADER=\"u-boot-dtb.bin\"\n    ;;\nesac\n\nif [ -n \"$PKG_DATAFILE\" -a -n \"$PKG_LOADER\" ]; then\n  tools/mkimage -n $PKG_SOC -T rksd -d \"$PKG_DATAFILE\" idbloader.img\n  cat \"$PKG_LOADER\" >> idbloader.img\n  cp -av idbloader.img $INSTALL/usr/share/bootloader\nfi\n\nif [ -n \"$PKG_LOAD_ADDR\" ]; then\n  $PKG_RKBIN/tools/loaderimage --pack --uboot u-boot-dtb.bin uboot.img $PKG_LOAD_ADDR\n  cp -av uboot.img $INSTALL/usr/share/bootloader\nfi\n\n\nif [ $DEVICE = \"AndroidGoAdvance\" ]; then\nif [ -n \"$PKG_BL31\" ]; then\n  cat >trust.ini <<EOF\n[VERSION]\nMAJOR=1\nMINOR=0\n[BL30_OPTION]\nSEC=0\n[BL31_OPTION]\nSEC=1\nPATH=$PKG_BL31\nADDR=0x00010000\n[BL32_OPTION]\nSEC=1\nPATH=$PKG_BL32\nADDR=0x08400000\n[BL33_OPTION]\nSEC=0\n[OUTPUT]\nPATH=trust.img\nEOF\n  $PKG_RKBIN/tools/trust_merger --rsa 3 --verbose trust.ini\n  cp -av trust.img $INSTALL/usr/share/bootloader\nfi\n\nelse\n\nif [ -n \"$PKG_BL31\" ]; then\n  cat >trust.ini <<EOF\n[BL30_OPTION]\nSEC=0\n[BL31_OPTION]\nSEC=1\nPATH=$PKG_BL31\nADDR=0x00010000\n[BL32_OPTION]\nSEC=0\n[BL33_OPTION]\nSEC=0\n[OUTPUT]\nPATH=trust.img\nEOF\n  $PKG_RKBIN/tools/trust_merger --verbose trust.ini\n  cp -av trust.img $INSTALL/usr/share/bootloader\nfi\n\nfi\n\nLE_TMP=$(mktemp -d)\nmkdir -p \"${LE_TMP}/extlinux\" \nmkdir -p $INSTALL/usr/share/bootloader/extlinux\n\nLINUX_DTS_DIR=$(get_build_dir linux)/.install_pkg/usr/share/bootloader\n  for dtb in $LINUX_DTS_DIR/*.dtb; do\n  \nif [ ! -f $dtb ]; then\n continue\nfi\n  \ncat << EOF > \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDT /$(basename ${dtb})\n  APPEND boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@ quiet ${EXTRA_CMDLINE}\nEOF\n\ncp -a \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\" $INSTALL/usr/share/bootloader/extlinux\ndone\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/bootloader/mkimage",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/idbloader.img\" ]; then\n  echo \"image: burn idbloader.img to image...\"\n  dd if=\"$RELEASE_DIR/3rdparty/bootloader/idbloader.img\" of=\"$DISK\" bs=32k seek=1 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\nfi\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/uboot.img\" ]; then\n  echo \"image: burn uboot.img to image...\"\n  dd if=\"$RELEASE_DIR/3rdparty/bootloader/uboot.img\" of=\"$DISK\" bs=64k seek=128 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\nfi\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/trust.img\" ]; then\n  echo \"image: burn trust.img to image...\"\n  dd if=\"$RELEASE_DIR/3rdparty/bootloader/trust.img\" of=\"$DISK\" bs=64k seek=192 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\nfi\n\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/boot.ini\" ]; then\necho \"image: copying boot.ini to root\"\nmcopy \"$RELEASE_DIR/3rdparty/bootloader/boot.ini\" ::\nfi\n\nmkdir -p \"${LE_TMP}/extlinux\"\n\n# copy device trees to part1\nfor dtb in $RELEASE_DIR/3rdparty/bootloader/*.dtb; do\n\nif [ ! -f $dtb ]; then\n continue\nfi\n\ncat << EOF > \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDT /$(basename ${dtb})\n  APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}\nEOF\n\n  [ -e \"$dtb\" ] && mcopy -o \"$dtb\" ::\ndone\n\n mcopy -so \"${LE_TMP}/extlinux\" ::\n\n\n\n\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/bootloader/release",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nmkdir -p $RELEASE_DIR/3rdparty/bootloader\n  if [ -n \"$UBOOT_SYSTEM\" ]; then\n    BOOTLOADER_DIR=$(get_build_dir $BOOTLOADER)\n    if [ -f $BOOTLOADER_DIR/idbloader.img ]; then\n      cp -a $BOOTLOADER_DIR/idbloader.img $RELEASE_DIR/3rdparty/bootloader\n    fi\n    if [ -f $BOOTLOADER_DIR/uboot.img ]; then\n      cp -a $BOOTLOADER_DIR/uboot.img $RELEASE_DIR/3rdparty/bootloader\n    fi\n    if [ -f $BOOTLOADER_DIR/trust.img ]; then\n      cp -a $BOOTLOADER_DIR/trust.img $RELEASE_DIR/3rdparty/bootloader\n    fi\n  fi\n  \n  if [ -f $INSTALL/usr/share/bootloader/boot.ini ]; then\n  cp -a $INSTALL/usr/share/bootloader/boot.ini $RELEASE_DIR/3rdparty/bootloader\n  fi\n \n  LINUX_DTS_DIR=$(get_build_dir linux)/arch/$TARGET_KERNEL_ARCH/boot/dts\n  for dtb in $LINUX_DTS_DIR/*.dtb $LINUX_DTS_DIR/*/*.dtb; do\n    if [ -f $dtb ]; then\n      cp -a $dtb $RELEASE_DIR/3rdparty/bootloader\n    fi\n  done\n  \nLE_TMP=$(mktemp -d)\nmkdir -p \"${LE_TMP}/extlinux\" \nmkdir -p $RELEASE_DIR/3rdparty/bootloader\n\nLINUX_DTS_DIR=$(get_build_dir linux)/.install_pkg/usr/share/bootloader\n  for dtb in $RELEASE_DIR/3rdparty/bootloader/*.dtb; do\n\nif [ ! -f $dtb ]; then\n continue\nfi\n\ncat << EOF > \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDT /$(basename ${dtb})\n  APPEND boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@ quiet ${EXTRA_CMDLINE}\nEOF\n\ncp -a \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\" $RELEASE_DIR/3rdparty/bootloader\ndone\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/bootloader/update.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n[ -z \"$SYSTEM_ROOT\" ] && SYSTEM_ROOT=\"\"\n[ -z \"$BOOT_ROOT\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"$BOOT_PART\" ] && BOOT_PART=$(df \"$BOOT_ROOT\" | tail -1 | awk {' print $1 '})\nif [ -z \"$BOOT_DISK\" ]; then\n  case $BOOT_PART in\n    /dev/sd[a-z][0-9]*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,[0-9]*,,g\")\n      ;;\n    /dev/mmcblk*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,p[0-9]*,,g\")\n      ;;\n  esac\nfi\n\n# mount $BOOT_ROOT r/w\n  mount -o remount,rw $BOOT_ROOT\n\n\nfor arg in $(cat /proc/cmdline); do\n  case $arg in\n    boot=*)\n      boot=\"${arg#*=}\"\n      case $boot in\n        /dev/mmc*)\n          BOOT_UUID=\"$(blkid $boot | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          BOOT_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" $boot \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n        FOLDER=*)\n          BOOT_UUID=\"$(blkid ${boot#*=} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n      esac\n    ;;\n    disk=*)\n      disk=\"${arg#*=}\"\n      case $disk in\n        /dev/mmc*)\n          DISK_UUID=\"$(blkid $disk | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          DISK_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" $disk \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n        FOLDER=*)\n          DISK_UUID=\"$(blkid ${disk#*=} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n      esac\n    ;;\n  esac\ndone\n\nCONFS=$SYSTEM_ROOT/usr/share/bootloader/extlinux/*.conf\n\nfor all_conf in $CONFS; do\n  conf=\"$(basename ${all_conf})\"\n  echo \"Updating ${conf}...\"\n  cp -p $SYSTEM_ROOT/usr/share/bootloader/extlinux/${conf} $BOOT_ROOT/extlinux/${conf}\n  sed -e \"s/@BOOT_UUID@/$BOOT_UUID/\" \\\n      -e \"s/@DISK_UUID@/$DISK_UUID/\" \\\n      -i $BOOT_ROOT/extlinux/${conf}\ndone\n\nif [ -f $SYSTEM_ROOT/usr/share/bootloader/boot.ini ]; then\n  echo \"Updating boot.ini...\"\n  cp -p $SYSTEM_ROOT/usr/share/bootloader/boot.ini $BOOT_ROOT/boot.ini\nfi\n\n# update device tree\n  for all_dtb in $SYSTEM_ROOT/usr/share/bootloader/*.dtb; do\n    dtb=$(basename $all_dtb)\n      echo -n \"Updating $dtb... \"\n      cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT\n      echo \"done\"\n  done\n\n# update bootloader\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/idbloader.img ]; then\n    echo -n \"Updating idbloader.img... \"\n    dd if=$SYSTEM_ROOT/usr/share/bootloader/idbloader.img of=$BOOT_DISK bs=32k seek=1 conv=fsync &>/dev/null\n    echo \"done\"\n  fi\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/uboot.img ]; then\n    echo -n \"Updating uboot.img... \"\n    dd if=$SYSTEM_ROOT/usr/share/bootloader/uboot.img of=$BOOT_DISK bs=64k seek=128 conv=fsync &>/dev/null\n    echo \"done\"\n  fi\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/trust.img ]; then\n    echo -n \"Updating trust.img... \"\n    dd if=$SYSTEM_ROOT/usr/share/bootloader/trust.img of=$BOOT_DISK bs=64k seek=192 conv=fsync &>/dev/null\n    echo \"done\"\n  fi\n\n# mount $BOOT_ROOT r/o\n  sync\n  mount -o remount,ro $BOOT_ROOT\n  \n# Leave a hint that we just did an update\necho \"UPDATE\" > /storage/.config/boot.hint\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/linux/gameforce-4.4/linux.aarch64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm64 4.4.189 Kernel Configuration\n#\nCONFIG_ARM64=y\nCONFIG_64BIT=y\nCONFIG_ARCH_PHYS_ADDR_T_64BIT=y\nCONFIG_MMU=y\nCONFIG_ARCH_MMAP_RND_BITS_MIN=18\nCONFIG_ARCH_MMAP_RND_BITS_MAX=24\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_ARM64_PAGE_SHIFT=12\nCONFIG_ARM64_CONT_SHIFT=4\nCONFIG_NO_IOPORT_MAP=y\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_RWSEM_XCHGADD_ALGORITHM=y\nCONFIG_GENERIC_BUG=y\nCONFIG_GENERIC_BUG_RELATIVE_POINTERS=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CSUM=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ZONE_DMA=y\nCONFIG_HAVE_GENERIC_RCU_GUP=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_SMP=y\nCONFIG_SWIOTLB=y\nCONFIG_IOMMU_HELPER=y\nCONFIG_KERNEL_MODE_NEON=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_PGTABLE_LEVELS=3\nCONFIG_DEFCONFIG_LIST=\"/lib/modules/$UNAME_RELEASE/.config\"\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_EXTABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\nCONFIG_CROSS_COMPILE=\"\"\n# CONFIG_COMPILE_TEST is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SWAP=y\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\n# CONFIG_POSIX_MQUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\nCONFIG_FHANDLE=y\nCONFIG_USELIB=y\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_HANDLE_DOMAIN_IRQ=y\n# CONFIG_IRQ_DOMAIN_DEBUG is not set\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\n# CONFIG_SCHED_WALT is not set\n# CONFIG_BSD_PROCESS_ACCT is not set\n# CONFIG_TASKSTATS is not set\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\n# CONFIG_TASKS_RCU is not set\nCONFIG_RCU_STALL_COMMON=y\n# CONFIG_TREE_RCU_TRACE is not set\n# CONFIG_RCU_EXPEDITE_BOOT is not set\n# CONFIG_BUILD_BIN2C is not set\n# CONFIG_IKCONFIG is not set\nCONFIG_LOG_BUF_SHIFT=18\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_GENERIC_SCHED_CLOCK=y\nCONFIG_CGROUPS=y\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_CGROUP_FREEZER=y\n# CONFIG_CGROUP_PIDS is not set\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_CPUACCT=y\n# CONFIG_MEMCG is not set\n# CONFIG_CGROUP_PERF is not set\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\n# CONFIG_BLK_CGROUP is not set\n# CONFIG_CHECKPOINT_RESTORE is not set\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_SCHED_AUTOGROUP is not set\n# CONFIG_SCHED_TUNE is not set\nCONFIG_DEFAULT_USE_ENERGY_AWARE=y\n# CONFIG_SYSFS_DEPRECATED is not set\nCONFIG_RELAY=y\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\" \"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\nCONFIG_RD_GZIP=y\nCONFIG_RD_BZIP2=y\nCONFIG_RD_LZMA=y\nCONFIG_RD_XZ=y\nCONFIG_RD_LZO=y\nCONFIG_RD_LZ4=y\n# CONFIG_INITRD_ASYNC is not set\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_SYSCTL=y\nCONFIG_ANON_INODES=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\nCONFIG_BPF=y\nCONFIG_EXPERT=y\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\n# CONFIG_SGETMASK_SYSCALL is not set\nCONFIG_SYSFS_SYSCALL=y\n# CONFIG_SYSCTL_SYSCALL is not set\n# CONFIG_KALLSYMS is not set\n# CONFIG_KALLSYMS_ALL is not set\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\n# CONFIG_BPF_SYSCALL is not set\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_ADVISE_SYSCALLS=y\n# CONFIG_USERFAULTFD is not set\nCONFIG_MEMBARRIER=y\nCONFIG_EMBEDDED=y\nCONFIG_HAVE_PERF_EVENTS=y\nCONFIG_PERF_USE_VMALLOC=y\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\nCONFIG_VM_EVENT_COUNTERS=y\nCONFIG_SLUB_DEBUG=y\n# CONFIG_COMPAT_BRK is not set\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# CONFIG_SYSTEM_DATA_VERIFICATION is not set\nCONFIG_PROFILING=y\n\n# CONFIG_KPROBES is not set\n# CONFIG_JUMP_LABEL is not set\n# CONFIG_UPROBES is not set\n# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_ATTRS=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_DMA_API_DEBUG=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_HAVE_RCU_TABLE_FREE=y\nCONFIG_HAVE_ALIGNED_STRUCT_PAGE=y\nCONFIG_HAVE_CMPXCHG_LOCAL=y\nCONFIG_HAVE_CMPXCHG_DOUBLE=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP_FILTER=y\nCONFIG_HAVE_CC_STACKPROTECTOR=y\n# CONFIG_CC_STACKPROTECTOR is not set\nCONFIG_CC_STACKPROTECTOR_NONE=y\n# CONFIG_CC_STACKPROTECTOR_REGULAR is not set\n# CONFIG_CC_STACKPROTECTOR_STRONG is not set\nCONFIG_HAVE_CONTEXT_TRACKING=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_HAVE_ARCH_HUGE_VMAP=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_ARCH_MMAP_RND_BITS=18\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=11\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\nCONFIG_HAVE_GENERIC_DMA_COHERENT=y\nCONFIG_SLABINFO=y\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\nCONFIG_MODULE_FORCE_LOAD=y\nCONFIG_MODULE_UNLOAD=y\nCONFIG_MODULE_FORCE_UNLOAD=y\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\n# CONFIG_MODULE_COMPRESS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_BLK_DEV_BSGLIB is not set\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_CMDLINE_PARSER is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\n# CONFIG_MAC_PARTITION is not set\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\n# CONFIG_LDM_PARTITION is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\nCONFIG_RK_PARTITION=y\n# CONFIG_CMDLINE_PARTITION is not set\nCONFIG_BLOCK_COMPAT=y\n\n#\n# IO Schedulers\n#\nCONFIG_IOSCHED_NOOP=y\nCONFIG_IOSCHED_DEADLINE=y\nCONFIG_IOSCHED_CFQ=y\n# CONFIG_DEFAULT_DEADLINE is not set\nCONFIG_DEFAULT_CFQ=y\n# CONFIG_DEFAULT_NOOP is not set\nCONFIG_DEFAULT_IOSCHED=\"cfq\"\nCONFIG_PREEMPT_NOTIFIERS=y\nCONFIG_ASN1=y\nCONFIG_UNINLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_FREEZER=y\n\n#\n# Platform selection\n#\n# CONFIG_ARCH_BCM_IPROC is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_EXYNOS7 is not set\n# CONFIG_ARCH_LAYERSCAPE is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_QCOM is not set\nCONFIG_ARCH_ROCKCHIP=y\nCONFIG_ARCH_ROCKCHIP_ODROIDGOA=y\n# CONFIG_ARCH_SEATTLE is not set\n# CONFIG_ARCH_STRATIX10 is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_SPRD is not set\n# CONFIG_ARCH_THUNDER is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_XGENE is not set\n# CONFIG_ARCH_ZYNQMP is not set\n\n#\n# Bus support\n#\n# CONFIG_PCI is not set\n# CONFIG_PCI_DOMAINS is not set\n# CONFIG_PCI_DOMAINS_GENERIC is not set\n# CONFIG_PCI_SYSCALL is not set\n\n#\n# Kernel Features\n#\n\n#\n# ARM errata workarounds via the alternatives framework\n#\n# CONFIG_ARM64_ERRATUM_826319 is not set\n# CONFIG_ARM64_ERRATUM_827319 is not set\n# CONFIG_ARM64_ERRATUM_824069 is not set\n# CONFIG_ARM64_ERRATUM_819472 is not set\n# CONFIG_ARM64_ERRATUM_832075 is not set\nCONFIG_ARM64_ERRATUM_834220=y\nCONFIG_ARM64_ERRATUM_845719=y\nCONFIG_ARM64_ERRATUM_843419=y\n# CONFIG_ARM64_ERRATUM_1024718 is not set\n# CONFIG_CAVIUM_ERRATUM_22375 is not set\n# CONFIG_CAVIUM_ERRATUM_23154 is not set\nCONFIG_CAVIUM_ERRATUM_27456=y\nCONFIG_ARM64_4K_PAGES=y\n# CONFIG_ARM64_16K_PAGES is not set\n# CONFIG_ARM64_64K_PAGES is not set\nCONFIG_ARM64_VA_BITS_39=y\n# CONFIG_ARM64_VA_BITS_48 is not set\nCONFIG_ARM64_VA_BITS=39\n# CONFIG_CPU_BIG_ENDIAN is not set\nCONFIG_SCHED_MC=y\n# CONFIG_SCHED_SMT is not set\nCONFIG_NR_CPUS=4\nCONFIG_HOTPLUG_CPU=y\n# CONFIG_PREEMPT_NONE is not set\nCONFIG_PREEMPT_VOLUNTARY=y\n# CONFIG_PREEMPT is not set\n# CONFIG_HZ_100 is not set\nCONFIG_HZ_250=y\n# CONFIG_HZ_300 is not set\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=250\nCONFIG_SCHED_HRTICK=y\nCONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_ARCH_SPARSEMEM_DEFAULT=y\nCONFIG_ARCH_SELECT_MEMORY_MODEL=y\nCONFIG_HAVE_ARCH_PFN_VALID=y\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_SYS_SUPPORTS_HUGETLBFS=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_ARCH_HAS_CACHE_LINE_SIZE=y\nCONFIG_SELECT_MEMORY_MODEL=y\nCONFIG_SPARSEMEM_MANUAL=y\nCONFIG_SPARSEMEM=y\nCONFIG_HAVE_MEMORY_PRESENT=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_MEMBLOCK=y\nCONFIG_NO_BOOTMEM=y\n# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set\nCONFIG_SPLIT_PTLOCK_CPUS=4\n# CONFIG_COMPACTION is not set\nCONFIG_PHYS_ADDR_T_64BIT=y\nCONFIG_ZONE_DMA_FLAG=1\nCONFIG_BOUNCE=y\nCONFIG_MMU_NOTIFIER=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=32768\n# CONFIG_TRANSPARENT_HUGEPAGE is not set\n# CONFIG_CLEANCACHE is not set\n# CONFIG_FRONTSWAP is not set\n# CONFIG_CMA is not set\n# CONFIG_ZPOOL is not set\n# CONFIG_ZBUD is not set\nCONFIG_ZSMALLOC=y\n# CONFIG_PGTABLE_MAPPING is not set\n# CONFIG_ZSMALLOC_STAT is not set\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_IDLE_PAGE_TRACKING is not set\n\nCONFIG_SECCOMP=y\n# CONFIG_KEXEC is not set\n# CONFIG_CRASH_DUMP is not set\n# CONFIG_XEN is not set\nCONFIG_FORCE_MAX_ZONEORDER=11\nCONFIG_UNMAP_KERNEL_AT_EL0=y\nCONFIG_ARMV8_DEPRECATED=y\nCONFIG_SWP_EMULATION=y\nCONFIG_CP15_BARRIER_EMULATION=y\nCONFIG_SETEND_EMULATION=y\n# CONFIG_ARM64_SW_TTBR0_PAN is not set\n\n#\n# ARMv8.1 architectural features\n#\nCONFIG_ARM64_HW_AFDBM=y\nCONFIG_ARM64_PAN=y\n# CONFIG_ARM64_LSE_ATOMICS is not set\nCONFIG_ARM64_UAO=y\nCONFIG_ARM64_MODULE_CMODEL_LARGE=y\n# CONFIG_RANDOMIZE_BASE is not set\n\n#\n# Boot options\n#\nCONFIG_CMDLINE=\"\"\n# CONFIG_EFI is not set\n# CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE is not set\n\n#\n# Userspace binary formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\n# CONFIG_HAVE_AOUT is not set\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\nCONFIG_COMPAT=y\nCONFIG_SYSVIPC_COMPAT=y\nCONFIG_KEYS_COMPAT=y\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_SUSPEND_SKIP_SYNC is not set\nCONFIG_HAS_WAKELOCK=y\nCONFIG_WAKELOCK=y\nCONFIG_HIBERNATE_CALLBACKS=y\nCONFIG_HIBERNATION=y\nCONFIG_PM_STD_PARTITION=\"\"\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\nCONFIG_PM=y\nCONFIG_PM_DEBUG=y\nCONFIG_PM_ADVANCED_DEBUG=y\n# CONFIG_PM_TEST_SUSPEND is not set\nCONFIG_PM_SLEEP_DEBUG=y\n# CONFIG_DPM_WATCHDOG is not set\nCONFIG_PM_OPP=y\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\nCONFIG_WQ_POWER_EFFICIENT_DEFAULT=y\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARCH_HIBERNATION_HEADER=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\nCONFIG_CPU_IDLE_GOV_LADDER=y\nCONFIG_CPU_IDLE_GOV_MENU=y\nCONFIG_DT_IDLE_STATES=y\n\n#\n# ARM CPU Idle Drivers\n#\nCONFIG_ARM_CPUIDLE=y\n# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_STAT_DETAILS is not set\nCONFIG_CPU_FREQ_TIMES=y\nCONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=y\nCONFIG_CPU_FREQ_GOV_USERSPACE=y\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\nCONFIG_CPU_FREQ_GOV_INTERACTIVE=y\n# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\nCONFIG_CPU_FREQ_GOV_SCHEDUTIL=y\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\n# CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set\n# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set\nCONFIG_ARM_ROCKCHIP_CPUFREQ=y\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\nCONFIG_NET_INGRESS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\nCONFIG_PACKET_DIAG=y\nCONFIG_UNIX=y\nCONFIG_UNIX_DIAG=y\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_SUB_POLICY is not set\nCONFIG_XFRM_MIGRATE=y\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_XFRM_IPCOMP=m\nCONFIG_NET_KEY=m\nCONFIG_NET_KEY_MIGRATE=y\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\nCONFIG_IP_FIB_TRIE_STATS=y\nCONFIG_IP_MULTIPLE_TABLES=y\nCONFIG_IP_ROUTE_MULTIPATH=y\nCONFIG_IP_ROUTE_VERBOSE=y\nCONFIG_IP_ROUTE_CLASSID=y\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\nCONFIG_IP_PNP_RARP=y\nCONFIG_NET_IPIP=m\nCONFIG_NET_IPGRE_DEMUX=m\nCONFIG_NET_IP_TUNNEL=m\nCONFIG_NET_IPGRE=m\nCONFIG_NET_IPGRE_BROADCAST=y\nCONFIG_IP_MROUTE=y\nCONFIG_IP_MROUTE_MULTIPLE_TABLES=y\nCONFIG_IP_PIMSM_V1=y\nCONFIG_IP_PIMSM_V2=y\nCONFIG_SYN_COOKIES=y\nCONFIG_NET_IPVTI=m\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\nCONFIG_INET_AH=m\nCONFIG_INET_ESP=m\nCONFIG_INET_IPCOMP=m\nCONFIG_INET_XFRM_TUNNEL=m\nCONFIG_INET_TUNNEL=m\nCONFIG_INET_XFRM_MODE_TRANSPORT=m\nCONFIG_INET_XFRM_MODE_TUNNEL=m\nCONFIG_INET_XFRM_MODE_BEET=m\nCONFIG_INET_LRO=m\nCONFIG_INET_DIAG=m\nCONFIG_INET_TCP_DIAG=m\nCONFIG_INET_UDP_DIAG=m\nCONFIG_INET_DIAG_DESTROY=y\nCONFIG_TCP_CONG_ADVANCED=y\nCONFIG_TCP_CONG_BIC=m\nCONFIG_TCP_CONG_CUBIC=m\nCONFIG_TCP_CONG_WESTWOOD=m\nCONFIG_TCP_CONG_HTCP=m\nCONFIG_TCP_CONG_HSTCP=m\nCONFIG_TCP_CONG_HYBLA=m\nCONFIG_TCP_CONG_VEGAS=m\nCONFIG_TCP_CONG_SCALABLE=m\nCONFIG_TCP_CONG_LP=m\nCONFIG_TCP_CONG_VENO=m\nCONFIG_TCP_CONG_YEAH=m\nCONFIG_TCP_CONG_ILLINOIS=m\nCONFIG_TCP_CONG_DCTCP=m\nCONFIG_TCP_CONG_CDG=m\nCONFIG_DEFAULT_RENO=y\nCONFIG_DEFAULT_TCP_CONG=\"reno\"\nCONFIG_TCP_MD5SIG=y\nCONFIG_IPV6=m\nCONFIG_IPV6_ROUTER_PREF=y\nCONFIG_IPV6_ROUTE_INFO=y\nCONFIG_IPV6_OPTIMISTIC_DAD=y\nCONFIG_INET6_AH=m\nCONFIG_INET6_ESP=m\nCONFIG_INET6_IPCOMP=m\nCONFIG_IPV6_MIP6=m\nCONFIG_IPV6_ILA=m\nCONFIG_INET6_XFRM_TUNNEL=m\nCONFIG_INET6_TUNNEL=m\nCONFIG_INET6_XFRM_MODE_TRANSPORT=m\nCONFIG_INET6_XFRM_MODE_TUNNEL=m\nCONFIG_INET6_XFRM_MODE_BEET=m\nCONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m\nCONFIG_IPV6_VTI=m\nCONFIG_IPV6_SIT=m\nCONFIG_IPV6_SIT_6RD=y\nCONFIG_IPV6_NDISC_NODETYPE=y\nCONFIG_IPV6_TUNNEL=m\nCONFIG_IPV6_GRE=m\nCONFIG_IPV6_MULTIPLE_TABLES=y\nCONFIG_IPV6_SUBTREES=y\nCONFIG_IPV6_MROUTE=y\nCONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y\nCONFIG_IPV6_PIMSM_V2=y\n# CONFIG_ANDROID_PARANOID_NETWORK is not set\nCONFIG_NETWORK_SECMARK=y\nCONFIG_NET_PTP_CLASSIFY=y\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\n# CONFIG_NETFILTER_DEBUG is not set\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\nCONFIG_NETFILTER_NETLINK=m\nCONFIG_NETFILTER_NETLINK_ACCT=m\nCONFIG_NETFILTER_NETLINK_QUEUE=m\nCONFIG_NETFILTER_NETLINK_LOG=m\nCONFIG_NF_CONNTRACK=m\nCONFIG_NF_LOG_COMMON=m\nCONFIG_NF_CONNTRACK_MARK=y\nCONFIG_NF_CONNTRACK_SECMARK=y\n# CONFIG_NF_CONNTRACK_ZONES is not set\nCONFIG_NF_CONNTRACK_PROCFS=y\nCONFIG_NF_CONNTRACK_EVENTS=y\nCONFIG_NF_CONNTRACK_TIMEOUT=y\nCONFIG_NF_CONNTRACK_TIMESTAMP=y\nCONFIG_NF_CONNTRACK_LABELS=y\nCONFIG_NF_CT_PROTO_DCCP=m\nCONFIG_NF_CT_PROTO_GRE=m\nCONFIG_NF_CT_PROTO_SCTP=m\nCONFIG_NF_CT_PROTO_UDPLITE=m\nCONFIG_NF_CONNTRACK_AMANDA=m\nCONFIG_NF_CONNTRACK_FTP=m\nCONFIG_NF_CONNTRACK_H323=m\nCONFIG_NF_CONNTRACK_IRC=m\nCONFIG_NF_CONNTRACK_BROADCAST=m\nCONFIG_NF_CONNTRACK_NETBIOS_NS=m\nCONFIG_NF_CONNTRACK_SNMP=m\nCONFIG_NF_CONNTRACK_PPTP=m\nCONFIG_NF_CONNTRACK_SANE=m\nCONFIG_NF_CONNTRACK_SIP=m\nCONFIG_NF_CONNTRACK_TFTP=m\nCONFIG_NF_CT_NETLINK=m\nCONFIG_NF_CT_NETLINK_TIMEOUT=m\nCONFIG_NF_CT_NETLINK_HELPER=m\nCONFIG_NETFILTER_NETLINK_GLUE_CT=y\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_NEEDED=y\nCONFIG_NF_NAT_PROTO_DCCP=m\nCONFIG_NF_NAT_PROTO_UDPLITE=m\nCONFIG_NF_NAT_PROTO_SCTP=m\nCONFIG_NF_NAT_AMANDA=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_IRC=m\nCONFIG_NF_NAT_SIP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=m\nCONFIG_NETFILTER_SYNPROXY=m\nCONFIG_NF_TABLES=m\nCONFIG_NF_TABLES_INET=m\nCONFIG_NF_TABLES_NETDEV=m\nCONFIG_NFT_EXTHDR=m\nCONFIG_NFT_META=m\nCONFIG_NFT_CT=m\nCONFIG_NFT_RBTREE=m\nCONFIG_NFT_HASH=m\nCONFIG_NFT_COUNTER=m\nCONFIG_NFT_LOG=m\nCONFIG_NFT_LIMIT=m\nCONFIG_NFT_MASQ=m\nCONFIG_NFT_REDIR=m\nCONFIG_NFT_NAT=m\nCONFIG_NFT_QUEUE=m\nCONFIG_NFT_REJECT=m\nCONFIG_NFT_REJECT_INET=m\nCONFIG_NFT_COMPAT=m\nCONFIG_NETFILTER_XTABLES=m\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\nCONFIG_NETFILTER_XT_CONNMARK=m\nCONFIG_NETFILTER_XT_SET=m\n\n#\n# Xtables targets\n#\nCONFIG_NETFILTER_XT_TARGET_CHECKSUM=m\nCONFIG_NETFILTER_XT_TARGET_CLASSIFY=m\nCONFIG_NETFILTER_XT_TARGET_CONNMARK=m\nCONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m\nCONFIG_NETFILTER_XT_TARGET_CT=m\nCONFIG_NETFILTER_XT_TARGET_DSCP=m\nCONFIG_NETFILTER_XT_TARGET_HL=m\nCONFIG_NETFILTER_XT_TARGET_HMARK=m\nCONFIG_NETFILTER_XT_TARGET_IDLETIMER=m\nCONFIG_NETFILTER_XT_TARGET_LED=m\nCONFIG_NETFILTER_XT_TARGET_LOG=m\nCONFIG_NETFILTER_XT_TARGET_MARK=m\nCONFIG_NETFILTER_XT_NAT=m\nCONFIG_NETFILTER_XT_TARGET_NETMAP=m\nCONFIG_NETFILTER_XT_TARGET_NFLOG=m\nCONFIG_NETFILTER_XT_TARGET_NFQUEUE=m\nCONFIG_NETFILTER_XT_TARGET_NOTRACK=m\nCONFIG_NETFILTER_XT_TARGET_RATEEST=m\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_TEE=m\nCONFIG_NETFILTER_XT_TARGET_TPROXY=m\nCONFIG_NETFILTER_XT_TARGET_TRACE=m\nCONFIG_NETFILTER_XT_TARGET_SECMARK=m\nCONFIG_NETFILTER_XT_TARGET_TCPMSS=m\nCONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\nCONFIG_NETFILTER_XT_MATCH_BPF=m\nCONFIG_NETFILTER_XT_MATCH_CGROUP=m\nCONFIG_NETFILTER_XT_MATCH_CLUSTER=m\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\nCONFIG_NETFILTER_XT_MATCH_CONNBYTES=m\nCONFIG_NETFILTER_XT_MATCH_CONNLABEL=m\nCONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m\nCONFIG_NETFILTER_XT_MATCH_CONNMARK=m\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\nCONFIG_NETFILTER_XT_MATCH_CPU=m\nCONFIG_NETFILTER_XT_MATCH_DCCP=m\nCONFIG_NETFILTER_XT_MATCH_DEVGROUP=m\nCONFIG_NETFILTER_XT_MATCH_DSCP=m\nCONFIG_NETFILTER_XT_MATCH_ECN=m\nCONFIG_NETFILTER_XT_MATCH_ESP=m\nCONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m\nCONFIG_NETFILTER_XT_MATCH_HELPER=m\nCONFIG_NETFILTER_XT_MATCH_HL=m\nCONFIG_NETFILTER_XT_MATCH_IPCOMP=m\nCONFIG_NETFILTER_XT_MATCH_IPRANGE=m\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\nCONFIG_NETFILTER_XT_MATCH_L2TP=m\nCONFIG_NETFILTER_XT_MATCH_LENGTH=m\nCONFIG_NETFILTER_XT_MATCH_LIMIT=m\nCONFIG_NETFILTER_XT_MATCH_MAC=m\nCONFIG_NETFILTER_XT_MATCH_MARK=m\nCONFIG_NETFILTER_XT_MATCH_MULTIPORT=m\nCONFIG_NETFILTER_XT_MATCH_NFACCT=m\nCONFIG_NETFILTER_XT_MATCH_OSF=m\nCONFIG_NETFILTER_XT_MATCH_OWNER=m\nCONFIG_NETFILTER_XT_MATCH_POLICY=m\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\nCONFIG_NETFILTER_XT_MATCH_PKTTYPE=m\nCONFIG_NETFILTER_XT_MATCH_QUOTA=m\nCONFIG_NETFILTER_XT_MATCH_QUOTA2=m\nCONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y\nCONFIG_NETFILTER_XT_MATCH_RATEEST=m\nCONFIG_NETFILTER_XT_MATCH_REALM=m\nCONFIG_NETFILTER_XT_MATCH_RECENT=m\nCONFIG_NETFILTER_XT_MATCH_SCTP=m\nCONFIG_NETFILTER_XT_MATCH_SOCKET=m\nCONFIG_NETFILTER_XT_MATCH_STATE=m\nCONFIG_NETFILTER_XT_MATCH_STATISTIC=m\nCONFIG_NETFILTER_XT_MATCH_STRING=m\nCONFIG_NETFILTER_XT_MATCH_TCPMSS=m\nCONFIG_NETFILTER_XT_MATCH_TIME=m\nCONFIG_NETFILTER_XT_MATCH_U32=m\nCONFIG_IP_SET=m\nCONFIG_IP_SET_MAX=256\nCONFIG_IP_SET_BITMAP_IP=m\nCONFIG_IP_SET_BITMAP_IPMAC=m\nCONFIG_IP_SET_BITMAP_PORT=m\nCONFIG_IP_SET_HASH_IP=m\nCONFIG_IP_SET_HASH_IPMARK=m\nCONFIG_IP_SET_HASH_IPPORT=m\nCONFIG_IP_SET_HASH_IPPORTIP=m\nCONFIG_IP_SET_HASH_IPPORTNET=m\nCONFIG_IP_SET_HASH_MAC=m\nCONFIG_IP_SET_HASH_NETPORTNET=m\nCONFIG_IP_SET_HASH_NET=m\nCONFIG_IP_SET_HASH_NETNET=m\nCONFIG_IP_SET_HASH_NETPORT=m\nCONFIG_IP_SET_HASH_NETIFACE=m\nCONFIG_IP_SET_LIST_SET=m\nCONFIG_IP_VS=m\nCONFIG_IP_VS_IPV6=y\nCONFIG_IP_VS_DEBUG=y\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\nCONFIG_IP_VS_PROTO_AH_ESP=y\nCONFIG_IP_VS_PROTO_ESP=y\nCONFIG_IP_VS_PROTO_AH=y\nCONFIG_IP_VS_PROTO_SCTP=y\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\nCONFIG_IP_VS_WRR=m\nCONFIG_IP_VS_LC=m\nCONFIG_IP_VS_WLC=m\nCONFIG_IP_VS_FO=m\nCONFIG_IP_VS_OVF=m\nCONFIG_IP_VS_LBLC=m\nCONFIG_IP_VS_LBLCR=m\nCONFIG_IP_VS_DH=m\nCONFIG_IP_VS_SH=m\nCONFIG_IP_VS_SED=m\nCONFIG_IP_VS_NQ=m\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS application helper\n#\nCONFIG_IP_VS_FTP=m\nCONFIG_IP_VS_NFCT=y\nCONFIG_IP_VS_PE_SIP=m\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\nCONFIG_NF_CONNTRACK_IPV4=m\nCONFIG_NF_CONNTRACK_PROC_COMPAT=y\nCONFIG_NF_TABLES_IPV4=m\nCONFIG_NFT_CHAIN_ROUTE_IPV4=m\nCONFIG_NFT_REJECT_IPV4=m\nCONFIG_NFT_DUP_IPV4=m\nCONFIG_NF_TABLES_ARP=m\nCONFIG_NF_DUP_IPV4=m\nCONFIG_NF_LOG_ARP=m\nCONFIG_NF_LOG_IPV4=m\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_NF_NAT_IPV4=m\nCONFIG_NFT_CHAIN_NAT_IPV4=m\nCONFIG_NF_NAT_MASQUERADE_IPV4=m\nCONFIG_NFT_MASQ_IPV4=m\nCONFIG_NFT_REDIR_IPV4=m\nCONFIG_NF_NAT_SNMP_BASIC=m\nCONFIG_NF_NAT_PROTO_GRE=m\nCONFIG_NF_NAT_PPTP=m\nCONFIG_NF_NAT_H323=m\nCONFIG_IP_NF_IPTABLES=m\nCONFIG_IP_NF_MATCH_AH=m\nCONFIG_IP_NF_MATCH_ECN=m\nCONFIG_IP_NF_MATCH_RPFILTER=m\nCONFIG_IP_NF_MATCH_TTL=m\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\nCONFIG_IP_NF_TARGET_SYNPROXY=m\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\nCONFIG_IP_NF_TARGET_NETMAP=m\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\nCONFIG_IP_NF_TARGET_CLUSTERIP=m\nCONFIG_IP_NF_TARGET_ECN=m\nCONFIG_IP_NF_TARGET_TTL=m\nCONFIG_IP_NF_RAW=m\nCONFIG_IP_NF_ARPTABLES=m\nCONFIG_IP_NF_ARPFILTER=m\nCONFIG_IP_NF_ARP_MANGLE=m\n\n#\n# IPv6: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV6=m\nCONFIG_NF_CONNTRACK_IPV6=m\nCONFIG_NF_TABLES_IPV6=m\nCONFIG_NFT_CHAIN_ROUTE_IPV6=m\nCONFIG_NFT_REJECT_IPV6=m\nCONFIG_NFT_DUP_IPV6=m\nCONFIG_NF_DUP_IPV6=m\nCONFIG_NF_REJECT_IPV6=m\nCONFIG_NF_LOG_IPV6=m\nCONFIG_NF_NAT_IPV6=m\nCONFIG_NFT_CHAIN_NAT_IPV6=m\nCONFIG_NF_NAT_MASQUERADE_IPV6=m\nCONFIG_NFT_MASQ_IPV6=m\nCONFIG_NFT_REDIR_IPV6=m\nCONFIG_IP6_NF_IPTABLES=m\nCONFIG_IP6_NF_MATCH_AH=m\nCONFIG_IP6_NF_MATCH_EUI64=m\nCONFIG_IP6_NF_MATCH_FRAG=m\nCONFIG_IP6_NF_MATCH_OPTS=m\nCONFIG_IP6_NF_MATCH_HL=m\nCONFIG_IP6_NF_MATCH_IPV6HEADER=m\nCONFIG_IP6_NF_MATCH_MH=m\nCONFIG_IP6_NF_MATCH_RPFILTER=m\nCONFIG_IP6_NF_MATCH_RT=m\nCONFIG_IP6_NF_TARGET_HL=m\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\nCONFIG_IP6_NF_TARGET_SYNPROXY=m\nCONFIG_IP6_NF_MANGLE=m\nCONFIG_IP6_NF_RAW=m\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\nCONFIG_IP6_NF_TARGET_NPT=m\n# CONFIG_NF_TABLES_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\nCONFIG_RDS=m\nCONFIG_RDS_TCP=m\n# CONFIG_RDS_DEBUG is not set\n# CONFIG_TIPC is not set\nCONFIG_ATM=m\nCONFIG_ATM_CLIP=m\nCONFIG_ATM_CLIP_NO_ICMP=y\nCONFIG_ATM_LANE=m\nCONFIG_ATM_MPOA=m\nCONFIG_ATM_BR2684=m\nCONFIG_ATM_BR2684_IPFILTER=y\nCONFIG_L2TP=m\n# CONFIG_L2TP_DEBUGFS is not set\nCONFIG_L2TP_V3=y\nCONFIG_L2TP_IP=m\nCONFIG_L2TP_ETH=m\nCONFIG_STP=m\nCONFIG_GARP=m\nCONFIG_MRP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\nCONFIG_HAVE_NET_DSA=y\nCONFIG_NET_DSA=m\nCONFIG_NET_DSA_HWMON=y\nCONFIG_VLAN_8021Q=m\nCONFIG_VLAN_8021Q_GVRP=y\nCONFIG_VLAN_8021Q_MVRP=y\n# CONFIG_DECNET is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\nCONFIG_IPX=m\nCONFIG_IPX_INTERN=y\nCONFIG_ATALK=m\nCONFIG_DEV_APPLETALK=m\nCONFIG_IPDDP=m\nCONFIG_IPDDP_ENCAP=y\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\nCONFIG_PHONET=m\nCONFIG_6LOWPAN=m\nCONFIG_6LOWPAN_NHC=m\nCONFIG_6LOWPAN_NHC_DEST=m\nCONFIG_6LOWPAN_NHC_FRAGMENT=m\nCONFIG_6LOWPAN_NHC_HOP=m\nCONFIG_6LOWPAN_NHC_IPV6=m\nCONFIG_6LOWPAN_NHC_MOBILITY=m\nCONFIG_6LOWPAN_NHC_ROUTING=m\nCONFIG_6LOWPAN_NHC_UDP=m\nCONFIG_IEEE802154=m\nCONFIG_IEEE802154_NL802154_EXPERIMENTAL=y\nCONFIG_IEEE802154_SOCKET=m\nCONFIG_IEEE802154_6LOWPAN=m\nCONFIG_MAC802154=m\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\nCONFIG_NET_SCH_CBQ=m\nCONFIG_NET_SCH_HTB=m\nCONFIG_NET_SCH_HFSC=m\nCONFIG_NET_SCH_ATM=m\nCONFIG_NET_SCH_PRIO=m\nCONFIG_NET_SCH_MULTIQ=m\nCONFIG_NET_SCH_RED=m\nCONFIG_NET_SCH_SFB=m\nCONFIG_NET_SCH_SFQ=m\nCONFIG_NET_SCH_TEQL=m\nCONFIG_NET_SCH_TBF=m\nCONFIG_NET_SCH_GRED=m\nCONFIG_NET_SCH_DSMARK=m\nCONFIG_NET_SCH_NETEM=m\nCONFIG_NET_SCH_DRR=m\nCONFIG_NET_SCH_MQPRIO=m\nCONFIG_NET_SCH_CHOKE=m\nCONFIG_NET_SCH_QFQ=m\nCONFIG_NET_SCH_CODEL=m\nCONFIG_NET_SCH_FQ_CODEL=m\nCONFIG_NET_SCH_FQ=m\nCONFIG_NET_SCH_HHF=m\nCONFIG_NET_SCH_PIE=m\nCONFIG_NET_SCH_INGRESS=m\nCONFIG_NET_SCH_PLUG=m\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\nCONFIG_NET_CLS_BASIC=m\nCONFIG_NET_CLS_TCINDEX=m\nCONFIG_NET_CLS_ROUTE4=m\nCONFIG_NET_CLS_FW=m\nCONFIG_NET_CLS_U32=m\nCONFIG_CLS_U32_PERF=y\nCONFIG_CLS_U32_MARK=y\nCONFIG_NET_CLS_RSVP=m\nCONFIG_NET_CLS_RSVP6=m\nCONFIG_NET_CLS_FLOW=m\nCONFIG_NET_CLS_CGROUP=m\nCONFIG_NET_CLS_BPF=m\nCONFIG_NET_CLS_FLOWER=m\nCONFIG_NET_EMATCH=y\nCONFIG_NET_EMATCH_STACK=32\nCONFIG_NET_EMATCH_CMP=m\nCONFIG_NET_EMATCH_NBYTE=m\nCONFIG_NET_EMATCH_U32=m\nCONFIG_NET_EMATCH_META=m\nCONFIG_NET_EMATCH_TEXT=m\nCONFIG_NET_EMATCH_IPSET=m\nCONFIG_NET_CLS_ACT=y\nCONFIG_NET_ACT_POLICE=m\nCONFIG_NET_ACT_GACT=m\nCONFIG_GACT_PROB=y\nCONFIG_NET_ACT_MIRRED=m\nCONFIG_NET_ACT_IPT=m\nCONFIG_NET_ACT_NAT=m\nCONFIG_NET_ACT_PEDIT=m\nCONFIG_NET_ACT_SIMP=m\nCONFIG_NET_ACT_SKBEDIT=m\nCONFIG_NET_ACT_CSUM=m\nCONFIG_NET_ACT_VLAN=m\nCONFIG_NET_ACT_BPF=m\nCONFIG_NET_ACT_CONNMARK=m\nCONFIG_NET_CLS_IND=y\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\nCONFIG_BATMAN_ADV=m\nCONFIG_BATMAN_ADV_BLA=y\nCONFIG_BATMAN_ADV_DAT=y\nCONFIG_BATMAN_ADV_NC=y\nCONFIG_BATMAN_ADV_MCAST=y\n# CONFIG_BATMAN_ADV_DEBUG is not set\nCONFIG_OPENVSWITCH=m\nCONFIG_OPENVSWITCH_GRE=m\nCONFIG_VSOCKETS=m\nCONFIG_NETLINK_DIAG=m\nCONFIG_MPLS=y\nCONFIG_NET_MPLS_GSO=m\n# CONFIG_MPLS_ROUTING is not set\n# CONFIG_HSR is not set\nCONFIG_NET_SWITCHDEV=y\n# CONFIG_NET_L3_MASTER_DEV is not set\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_XPS=y\n# CONFIG_CGROUP_NET_PRIO is not set\nCONFIG_CGROUP_NET_CLASSID=y\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_JIT is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\n# CONFIG_IRDA is not set\nCONFIG_BT=y\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\n# CONFIG_BT_RFCOMM_TTY is not set\n# CONFIG_BT_BNEP is not set\nCONFIG_BT_HIDP=m\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_6LOWPAN is not set\n# CONFIG_BT_SELFTEST is not set\nCONFIG_BT_DEBUGFS=y\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\n# CONFIG_BT_RTKBTUSB is not set\nCONFIG_BT_HCIBTUSB=m\nCONFIG_BT_HCIBTUSB_BCM=y\nCONFIG_BT_HCIBTUSB_RTL=y\n# CONFIG_BT_HCIBTSDIO is not set\n# CONFIG_BT_HCIUART is not set\n# CONFIG_BT_HCIBCM203X is not set\nCONFIG_BT_HCIBFUSB=m\nCONFIG_BT_HCIVHCI=m\nCONFIG_BT_MRVL=m\nCONFIG_BT_MRVL_SDIO=m\n# CONFIG_BT_ATH3K is not set\n# CONFIG_AF_RXRPC is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=y\nCONFIG_NL80211_TESTMODE=y\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_REG_DEBUG is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\n# CONFIG_CFG80211_INTERNAL_REGDB is not set\nCONFIG_CFG80211_CRDA_SUPPORT=y\nCONFIG_CFG80211_WEXT=y\n# CONFIG_LIB80211 is not set\nCONFIG_MAC80211=y\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_MINSTREL_HT=y\nCONFIG_MAC80211_RC_MINSTREL_VHT=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\n# CONFIG_WIMAX is not set\nCONFIG_RFKILL=y\nCONFIG_RFKILL_PM=y\nCONFIG_RFKILL_LEDS=y\n# CONFIG_RFKILL_INPUT is not set\n# CONFIG_RFKILL_REGULATOR is not set\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\nCONFIG_LWTUNNEL=y\nCONFIG_DST_CACHE=y\nCONFIG_HAVE_BPF_JIT=y\nCONFIG_HAVE_EBPF_JIT=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\n# CONFIG_TEGRA_AHB is not set\n\n#\n# Generic Driver Options\n#\nCONFIG_UEVENT_HELPER=y\nCONFIG_UEVENT_HELPER_PATH=\"\"\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\nCONFIG_FW_LOADER=y\nCONFIG_FIRMWARE_IN_KERNEL=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set\nCONFIG_WANT_DEV_COREDUMP=y\nCONFIG_ALLOW_DEV_COREDUMP=y\nCONFIG_DEV_COREDUMP=y\n# CONFIG_DEBUG_DRIVER is not set\nCONFIG_DEBUG_DEVRES=y\n# CONFIG_SYS_HYPERVISOR is not set\n# CONFIG_GENERIC_CPU_DEVICES is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_FENCE_TRACE is not set\n\n#\n# Bus devices\n#\n# CONFIG_ARM_CCI400_PMU is not set\n# CONFIG_ARM_CCI500_PMU is not set\n# CONFIG_ARM_CCN is not set\n# CONFIG_VEXPRESS_CONFIG is not set\nCONFIG_CONNECTOR=y\nCONFIG_PROC_EVENTS=y\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\n# CONFIG_MTD_CMDLINE_PARTS is not set\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AR7_PARTS is not set\n\n#\n# User Modules And Translation Layers\n#\n# CONFIG_MTD_BLOCK is not set\n# CONFIG_MTD_BLOCK_RO is not set\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\n# CONFIG_MTD_OOPS is not set\n# CONFIG_MTD_SWAP is not set\n# CONFIG_MTD_PARTITIONED_MASTER is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\n# CONFIG_MTD_CFI is not set\n# CONFIG_MTD_JEDECPROBE is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\n# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set\n# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set\n# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\n# CONFIG_MTD_CFI_I4 is not set\n# CONFIG_MTD_CFI_I8 is not set\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_PLATRAM is not set\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_DATAFLASH is not set\nCONFIG_MTD_M25P80=y\n# CONFIG_MTD_SST25L is not set\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\n# CONFIG_MTD_NAND_IDS is not set\n# CONFIG_MTD_NAND is not set\n# CONFIG_MTD_ONENAND is not set\n\n#\n# LPDDR & LPDDR2 PCM memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\nCONFIG_MTD_SPI_NOR=y\nCONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y\n# CONFIG_MTD_UBI is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_NET=y\nCONFIG_OF_MDIO=y\nCONFIG_OF_MTD=y\nCONFIG_OF_RESERVED_MEM=y\n# CONFIG_OF_OVERLAY is not set\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_ZRAM=y\n# CONFIG_ZRAM_WRITEBACK is not set\n# CONFIG_ZRAM_MEMORY_TRACKING is not set\n# CONFIG_BLK_DEV_COW_COMMON is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=8\n# CONFIG_BLK_DEV_CRYPTOLOOP is not set\n# CONFIG_BLK_DEV_DRBD is not set\n# CONFIG_BLK_DEV_NBD is not set\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=1\nCONFIG_BLK_DEV_RAM_SIZE=4096\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\n# CONFIG_BLK_DEV_RBD is not set\n\n#\n# Misc devices\n#\n# CONFIG_ROCKCHIP_SCR is not set\n# CONFIG_SENSORS_LIS3LV02D is not set\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1780 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_TI_DAC7512 is not set\n# CONFIG_BMP085_I2C is not set\n# CONFIG_BMP085_SPI is not set\n# CONFIG_USB_SWITCH_FSA9480 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\n# CONFIG_SRAM is not set\n# CONFIG_MEMORY_STATE_TIME is not set\n# CONFIG_USB_CAM_GPIO is not set\n# CONFIG_GPIO_DET is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\n# CONFIG_EEPROM_AT25 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n\n#\n# Altera FPGA firmware download module\n#\n# CONFIG_ALTERA_STAPL is not set\n\n#\n# Intel MIC Bus Driver\n#\n\n#\n# SCIF Bus Driver\n#\n\n#\n# Intel MIC Host Driver\n#\n\n#\n# Intel MIC Card Driver\n#\n\n#\n# SCIF Driver\n#\n\n#\n# Intel MIC Coprocessor State Management (COSM) Drivers\n#\n# CONFIG_ECHO is not set\n# CONFIG_CXL_BASE is not set\n# CONFIG_CXL_KERNEL_API is not set\n# CONFIG_CXL_EEH is not set\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_NETLINK is not set\n# CONFIG_SCSI_MQ_DEFAULT is not set\nCONFIG_SCSI_PROC_FS=y\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\n# CONFIG_CHR_DEV_OSST is not set\nCONFIG_BLK_DEV_SR=y\n# CONFIG_BLK_DEV_SR_VENDOR is not set\n# CONFIG_CHR_DEV_SG is not set\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\nCONFIG_SCSI_SCAN_ASYNC=y\n\n#\n# SCSI Transports\n#\nCONFIG_SCSI_SPI_ATTRS=y\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set\n# CONFIG_SCSI_DH is not set\n# CONFIG_SCSI_OSD_INITIATOR is not set\nCONFIG_HAVE_PATA_PLATFORM=y\n# CONFIG_ATA is not set\n# CONFIG_MD is not set\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\n# CONFIG_BLK_DEV_DM is not set\n# CONFIG_TARGET_CORE is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=m\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\n# CONFIG_DUMMY is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_IFB is not set\n# CONFIG_NET_TEAM is not set\n# CONFIG_MACVLAN is not set\n# CONFIG_IPVLAN is not set\n# CONFIG_VXLAN is not set\n# CONFIG_GENEVE is not set\nCONFIG_NETCONSOLE=m\n# CONFIG_NETCONSOLE_DYNAMIC is not set\nCONFIG_NETPOLL=y\nCONFIG_NET_POLL_CONTROLLER=y\nCONFIG_TUN=m\nCONFIG_TUN_VNET_CROSS_LE=y\nCONFIG_VETH=m\nCONFIG_NLMON=m\nCONFIG_ATM_DRIVERS=y\n# CONFIG_ATM_DUMMY is not set\nCONFIG_ATM_TCP=m\n\n#\n# CAIF transport drivers\n#\n\n#\n# Distributed Switch Architecture drivers\n#\n# CONFIG_NET_DSA_MV88E6XXX is not set\n# CONFIG_NET_DSA_MV88E6060 is not set\n# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set\n# CONFIG_NET_DSA_MV88E6131 is not set\n# CONFIG_NET_DSA_MV88E6123_61_65 is not set\n# CONFIG_NET_DSA_MV88E6171 is not set\n# CONFIG_NET_DSA_MV88E6352 is not set\n# CONFIG_NET_DSA_BCM_SF2 is not set\n# CONFIG_ETHERNET is not set\nCONFIG_PHYLIB=y\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AQUANTIA_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_AMD_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_QSEMI_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_TERANETICS_PHY is not set\nCONFIG_ROCKCHIP_PHY=y\n# CONFIG_SMSC_PHY is not set\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_REALTEK_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_STE10XP is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_MICREL_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_MICROCHIP_PHY is not set\n# CONFIG_FIXED_PHY is not set\n# CONFIG_MDIO_BITBANG is not set\n# CONFIG_MDIO_OCTEON is not set\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n# CONFIG_MDIO_BCM_UNIMAC is not set\n# CONFIG_MICREL_KS8995MA is not set\nCONFIG_PPP=m\nCONFIG_PPP_BSDCOMP=m\nCONFIG_PPP_DEFLATE=m\nCONFIG_PPP_FILTER=y\nCONFIG_PPP_MPPE=m\nCONFIG_PPP_MULTILINK=y\nCONFIG_PPPOATM=m\nCONFIG_PPPOE=m\nCONFIG_PPTP=m\nCONFIG_PPPOL2TP=m\nCONFIG_PPPOLAC=m\nCONFIG_PPPOPNS=m\nCONFIG_PPP_ASYNC=m\nCONFIG_PPP_SYNC_TTY=m\nCONFIG_SLIP=m\nCONFIG_SLHC=m\nCONFIG_SLIP_COMPRESSED=y\nCONFIG_SLIP_SMART=y\nCONFIG_SLIP_MODE_SLIP6=y\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\n# CONFIG_USB_PEGASUS is not set\nCONFIG_USB_RTL8150=m\nCONFIG_USB_RTL8152=m\n# CONFIG_USB_LAN78XX is not set\nCONFIG_USB_USBNET=m\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\n# CONFIG_USB_NET_CDC_EEM is not set\nCONFIG_USB_NET_CDC_NCM=m\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\nCONFIG_USB_NET_CDC_MBIM=m\n# CONFIG_USB_NET_DM9601 is not set\n# CONFIG_USB_NET_SR9700 is not set\n# CONFIG_USB_NET_SR9800 is not set\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=m\n# CONFIG_USB_NET_GL620A is not set\n# CONFIG_USB_NET_NET1080 is not set\n# CONFIG_USB_NET_PLUSB is not set\n# CONFIG_USB_NET_MCS7830 is not set\nCONFIG_USB_NET_RNDIS_HOST=m\n# CONFIG_USB_NET_CDC_SUBSET is not set\n# CONFIG_USB_NET_ZAURUS is not set\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\n# CONFIG_USB_HSO is not set\n# CONFIG_USB_NET_INT51X1 is not set\n# CONFIG_USB_CDC_PHONET is not set\n# CONFIG_USB_IPHETH is not set\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\nCONFIG_WLAN=y\n# CONFIG_LIBERTAS_THINFIRM is not set\n# CONFIG_AT76C50X_USB is not set\n# CONFIG_USB_ZD1201 is not set\n# CONFIG_USB_NET_RNDIS_WLAN is not set\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\n# CONFIG_MAC80211_HWSIM is not set\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_ATH_CARDS is not set\n# CONFIG_B43 is not set\n# CONFIG_B43LEGACY is not set\n# CONFIG_BRCMSMAC is not set\n# CONFIG_BRCMFMAC is not set\n# CONFIG_HOSTAP is not set\n# CONFIG_LIBERTAS is not set\n# CONFIG_P54_COMMON is not set\nCONFIG_RT2X00=m\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\n# CONFIG_RT2800USB_UNKNOWN is not set\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WL_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_MT76_CORE=m\nCONFIG_MT76_LEDS=y\nCONFIG_MT76_USB=m\nCONFIG_MT76x02_LIB=m\nCONFIG_MT76x02_USB=m\nCONFIG_MT76x0_COMMON=m\nCONFIG_MT76x0U=m\nCONFIG_MT76x2_COMMON=m\nCONFIG_MT76x2U=m\nCONFIG_WLAN_VENDOR_MEDIATEK=y\n# CONFIG_RTL_CARDS is not set\nCONFIG_RTL8192CU=m\n# CONFIG_RTL8XXXU is not set\nCONFIG_WL_ROCKCHIP=y\nCONFIG_WIFI_BUILD_MODULE=y\n# CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP is not set\n# CONFIG_WIFI_GENERATE_RANDOM_MAC_ADDR is not set\n# CONFIG_AP6XXX is not set\n# CONFIG_CYW_BCMDHD is not set\nCONFIG_RTL_WIRELESS_SOLUTION=y\n# CONFIG_RTL8188EU is not set\n# CONFIG_RTL8188FU is not set\n# CONFIG_RTL8189ES is not set\n# CONFIG_RTL8189FS is not set\n# CONFIG_RTL8723BS is not set\n# CONFIG_RTL8723BU is not set\n# CONFIG_RTL8723CS is not set\nCONFIG_RTL8723DS=m\n# CONFIG_MVL88W8977 is not set\n\n#\n# SouthSV 6XXX WLAN support\n#\n# CONFIG_SSV6051 is not set\n# CONFIG_WL_TI is not set\n# CONFIG_ZD1211RW is not set\n# CONFIG_MWIFIEX is not set\n# CONFIG_CW1200 is not set\n# CONFIG_RSI_91X is not set\nCONFIG_RTL8812AU=m\nCONFIG_RTL8822BU=m\nCONFIG_RTL8821CU=m\nCONFIG_ESP8089=m\nCONFIG_ESP8089_DEBUG_FS=y\n\n#\n# Enable WiMAX (Networking options) to see the WiMAX drivers\n#\n# CONFIG_WAN is not set\nCONFIG_IEEE802154_DRIVERS=m\n# CONFIG_IEEE802154_FAKELB is not set\n# CONFIG_IEEE802154_AT86RF230 is not set\n# CONFIG_IEEE802154_MRF24J40 is not set\n# CONFIG_IEEE802154_CC2520 is not set\n# CONFIG_IEEE802154_ATUSB is not set\n# CONFIG_ISDN is not set\n# CONFIG_NVM is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\nCONFIG_INPUT_POLLDEV=y\n# CONFIG_INPUT_SPARSEKMAP is not set\nCONFIG_INPUT_MATRIXKMAP=y\n\n#\n# Userland interfaces\n#\n# CONFIG_INPUT_MOUSEDEV is not set\nCONFIG_INPUT_JOYDEV=y\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n# CONFIG_INPUT_KEYRESET is not set\n# CONFIG_INPUT_KEYCOMBO is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\nCONFIG_KEYBOARD_ADC=y\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\nCONFIG_KEYBOARD_ATKBD=m\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=m\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\nCONFIG_KEYBOARD_ROCKCHIP=y\nCONFIG_KEYBOARD_XTKBD=m\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\nCONFIG_INPUT_MOUSE=y\n# CONFIG_MOUSE_PS2 is not set\n# CONFIG_MOUSE_SERIAL is not set\n# CONFIG_MOUSE_APPLETOUCH is not set\n# CONFIG_MOUSE_BCM5974 is not set\n# CONFIG_MOUSE_CYAPA is not set\n# CONFIG_MOUSE_ELAN_I2C is not set\n# CONFIG_MOUSE_VSXXXAA is not set\n# CONFIG_MOUSE_GPIO is not set\n# CONFIG_MOUSE_SYNAPTICS_I2C is not set\n# CONFIG_MOUSE_SYNAPTICS_USB is not set\nCONFIG_INPUT_JOYSTICK=y\nCONFIG_JOYSTICK_ANALOG=m\nCONFIG_JOYSTICK_A3D=m\nCONFIG_JOYSTICK_ADI=m\nCONFIG_JOYSTICK_COBRA=m\nCONFIG_JOYSTICK_GF2K=m\nCONFIG_JOYSTICK_GRIP=m\nCONFIG_JOYSTICK_GRIP_MP=m\nCONFIG_JOYSTICK_GUILLEMOT=m\nCONFIG_JOYSTICK_INTERACT=m\nCONFIG_JOYSTICK_SIDEWINDER=m\nCONFIG_JOYSTICK_TMDC=m\nCONFIG_JOYSTICK_IFORCE=m\nCONFIG_JOYSTICK_IFORCE_USB=y\n# CONFIG_JOYSTICK_IFORCE_232 is not set\nCONFIG_JOYSTICK_WARRIOR=m\nCONFIG_JOYSTICK_MAGELLAN=m\nCONFIG_JOYSTICK_SPACEORB=m\nCONFIG_JOYSTICK_SPACEBALL=m\nCONFIG_JOYSTICK_STINGER=m\nCONFIG_JOYSTICK_TWIDJOY=m\nCONFIG_JOYSTICK_ZHENHUA=m\nCONFIG_JOYSTICK_AS5011=m\nCONFIG_JOYSTICK_JOYDUMP=m\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\n# CONFIG_JOYSTICK_ADC is not set\n# CONFIG_JOYSTICK_ODROIDGO2 is not set\n# CONFIG_JOYSTICK_ODROIDGO3 is not set\nCONFIG_DRM_PANEL_ODROID_ST7701S=y\n# CONFIG_QCA_CLD_WLAN is not set\nCONFIG_JOYSTICK_GAMEFORCE=y\n# CONFIG_INPUT_TABLET is not set\n# CONFIG_INPUT_TOUCHSCREEN is not set\n# CONFIG_ROCKCHIP_REMOTECTL is not set\n\n#\n# handle all sensors\n#\n# CONFIG_SENSOR_DEVICE is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_MPU3050 is not set\n# CONFIG_INPUT_GP2A is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_TILT_POLLED is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYCHORD is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_RK8XX_PWRKEY=y\nCONFIG_INPUT_UINPUT=y\nCONFIG_INPUT_GPIO=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_SOC_BUTTON_ARRAY is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=m\nCONFIG_SERIO_SERPORT=m\n# CONFIG_SERIO_AMBAKMI is not set\nCONFIG_SERIO_LIBPS2=m\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_USERIO is not set\nCONFIG_GAMEPORT=m\n# CONFIG_GAMEPORT_NS558 is not set\n# CONFIG_GAMEPORT_L4 is not set\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\nCONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n# CONFIG_LEGACY_PTYS is not set\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_TRACE_SINK is not set\nCONFIG_LDISC_AUTOLOAD=y\nCONFIG_DEVMEM=y\n# CONFIG_DEVKMEM is not set\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\nCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y\nCONFIG_SERIAL_8250_CONSOLE=y\nCONFIG_SERIAL_8250_DMA=y\nCONFIG_SERIAL_8250_NR_UARTS=5\nCONFIG_SERIAL_8250_RUNTIME_UARTS=5\n# CONFIG_SERIAL_8250_EXTENDED is not set\nCONFIG_SERIAL_8250_FSL=y\nCONFIG_SERIAL_8250_DW=y\n# CONFIG_SERIAL_8250_RT288X is not set\n# CONFIG_SERIAL_8250_INGENIC is not set\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\n# CONFIG_SERIAL_AMBA_PL011 is not set\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\nCONFIG_SERIAL_OF_PLATFORM=y\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_IFX6X60 is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_TTY_PRINTK is not set\n# CONFIG_HVC_DCC is not set\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\nCONFIG_HW_RANDOM_TPM=y\n# CONFIG_HW_RANDOM_ROCKCHIP is not set\n\n#\n# PCMCIA character devices\n#\n# CONFIG_RAW_DRIVER is not set\nCONFIG_TCG_TPM=y\n# CONFIG_TCG_TIS_I2C_ATMEL is not set\nCONFIG_TCG_TIS_I2C_INFINEON=y\n# CONFIG_TCG_TIS_I2C_NUVOTON is not set\n# CONFIG_TCG_TIS_ST33ZP24 is not set\n# CONFIG_XILLYBUS is not set\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\nCONFIG_I2C_ARB_GPIO_CHALLENGE=m\nCONFIG_I2C_MUX_GPIO=m\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\n# CONFIG_I2C_MUX_PINCTRL is not set\n# CONFIG_I2C_MUX_REG is not set\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CADENCE is not set\n# CONFIG_I2C_CBUS_GPIO is not set\n# CONFIG_I2C_DESIGNWARE_PLATFORM is not set\n# CONFIG_I2C_EMEV2 is not set\n# CONFIG_I2C_GPIO is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_PXA_PCI is not set\nCONFIG_I2C_RK3X=y\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_PARPORT_LIGHT is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\nCONFIG_SPI_BITBANG=m\n# CONFIG_SPI_CADENCE is not set\nCONFIG_SPI_GPIO=m\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_OC_TINY is not set\n# CONFIG_SPI_PL022 is not set\n# CONFIG_SPI_PXA2XX_PCI is not set\nCONFIG_SPI_ROCKCHIP=m\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=m\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\n\n#\n# PPS support\n#\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\nCONFIG_PINCTRL=y\n\n#\n# Pin controllers\n#\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_AMD is not set\nCONFIG_PINCTRL_ROCKCHIP=y\n# CONFIG_PINCTRL_SINGLE is not set\nCONFIG_PINCTRL_RK805=y\nCONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y\nCONFIG_ARCH_REQUIRE_GPIOLIB=y\nCONFIG_GPIOLIB=y\nCONFIG_GPIO_DEVRES=y\nCONFIG_OF_GPIO=y\nCONFIG_DEBUG_GPIO=y\nCONFIG_GPIO_SYSFS=y\nCONFIG_GPIO_GENERIC=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_DWAPB is not set\nCONFIG_GPIO_GENERIC_PLATFORM=y\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_PL061 is not set\n# CONFIG_GPIO_SYSCON is not set\n# CONFIG_GPIO_XGENE is not set\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_ZX is not set\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADP5588 is not set\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\n# CONFIG_GPIO_PCA953X is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_SX150X is not set\n\n#\n# MFD GPIO expanders\n#\nCONFIG_GPIO_RK8XX=y\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n\n#\n# SPI or I2C GPIO expanders\n#\n# CONFIG_GPIO_MCP23S08 is not set\n\n#\n# USB GPIO expanders\n#\n# CONFIG_W1 is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\nCONFIG_CHARGER_GPIO=y\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ25700 is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_CHARGER_SY6982C is not set\n# CONFIG_CHARGER_UNIVERSAL is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_EC is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_RK816 is not set\nCONFIG_BATTERY_RK817=y\nCONFIG_CHARGER_RK817=y\n# CONFIG_BATTERY_RK818 is not set\n# CONFIG_CHARGER_RK818 is not set\n# CONFIG_CHARGER_RT9455 is not set\nCONFIG_POWER_RESET=y\nCONFIG_POWER_RESET_GPIO=y\nCONFIG_POWER_RESET_GPIO_RESTART=y\n# CONFIG_POWER_RESET_LTC2952 is not set\n# CONFIG_POWER_RESET_RESTART is not set\n# CONFIG_POWER_RESET_XGENE is not set\n# CONFIG_POWER_RESET_SYSCON is not set\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\nCONFIG_REBOOT_MODE=y\nCONFIG_SYSCON_REBOOT_MODE=y\nCONFIG_POWER_AVS=y\nCONFIG_ROCKCHIP_IODOMAIN=y\nCONFIG_HWMON=y\n# CONFIG_HWMON_VID is not set\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\n# CONFIG_SENSORS_GPIO_FAN is not set\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IIO_HWMON is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_HTU21 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\n# CONFIG_SENSORS_PWM_FAN is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH56XX_COMMON is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS1015 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\nCONFIG_THERMAL_WRITABLE_TRIPS=y\n# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\nCONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y\nCONFIG_THERMAL_GOV_FAIR_SHARE=y\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\nCONFIG_THERMAL_GOV_POWER_ALLOCATOR=y\nCONFIG_CPU_THERMAL=y\n# CONFIG_CLOCK_THERMAL is not set\nCONFIG_DEVFREQ_THERMAL=y\n# CONFIG_THERMAL_EMULATION is not set\n# CONFIG_IMX_THERMAL is not set\nCONFIG_ROCKCHIP_THERMAL=y\n# CONFIG_RK_VIRTUAL_THERMAL is not set\n# CONFIG_RK3368_THERMAL is not set\nCONFIG_WATCHDOG=y\n# CONFIG_WATCHDOG_CORE is not set\n# CONFIG_WATCHDOG_NOWAYOUT is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\nCONFIG_DW_WATCHDOG=y\n# CONFIG_MAX63XX_WATCHDOG is not set\n# CONFIG_BCM7038_WDT is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\n\n#\n# Sonics Silicon Backplane\n#\n# CONFIG_SSB is not set\nCONFIG_BCMA_POSSIBLE=y\n\n#\n# Broadcom specific AMBA\n#\n# CONFIG_BCMA is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_AXP20X is not set\n# CONFIG_MFD_CROS_EC is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_INTEL_SOC_PMIC is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RTSX_USB is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_RK618 is not set\nCONFIG_MFD_RK808=y\n# CONFIG_MFD_RN5T618 is not set\n# CONFIG_MFD_SEC_CORE is not set\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_SMSC is not set\n# CONFIG_ABX500_CORE is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_MFD_TPS80031 is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_TMIO is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_RK1000 is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_FUSB_30X is not set\nCONFIG_REGULATOR=y\nCONFIG_REGULATOR_DEBUG=y\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\nCONFIG_REGULATOR_VIRTUAL_CONSUMER=y\nCONFIG_REGULATOR_USERSPACE_CONSUMER=y\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\n# CONFIG_REGULATOR_ANATOP is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8752 is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MP8865 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\nCONFIG_REGULATOR_PWM=y\nCONFIG_REGULATOR_RK808=y\nCONFIG_REGULATOR_RK818=y\n# CONFIG_REGULATOR_SYR82X is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS549B22 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\n# CONFIG_REGULATOR_XZ3216 is not set\nCONFIG_MEDIA_SUPPORT=y\n\n#\n# Multimedia core support\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\n# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set\n# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set\n# CONFIG_MEDIA_RADIO_SUPPORT is not set\n# CONFIG_MEDIA_SDR_SUPPORT is not set\nCONFIG_MEDIA_RC_SUPPORT=y\n# CONFIG_MEDIA_CEC_SUPPORT is not set\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_VIDEO_DEV=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\nCONFIG_VIDEO_V4L2=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_V4L2_MEM2MEM_DEV=y\nCONFIG_V4L2_FWNODE=y\nCONFIG_VIDEOBUF_GEN=y\nCONFIG_VIDEOBUF2_CORE=y\nCONFIG_VIDEOBUF2_MEMOPS=y\nCONFIG_VIDEOBUF2_DMA_CONTIG=y\nCONFIG_VIDEOBUF2_VMALLOC=y\nCONFIG_VIDEOBUF2_DMA_SG=y\n# CONFIG_TTPCI_EEPROM is not set\n\n#\n# Media drivers\n#\nCONFIG_RC_CORE=y\nCONFIG_RC_MAP=y\n# CONFIG_LIRC is not set\nCONFIG_RC_DECODERS=y\nCONFIG_IR_NEC_DECODER=y\n# CONFIG_IR_RC5_DECODER is not set\n# CONFIG_IR_RC6_DECODER is not set\n# CONFIG_IR_JVC_DECODER is not set\n# CONFIG_IR_SONY_DECODER is not set\n# CONFIG_IR_SANYO_DECODER is not set\n# CONFIG_IR_SHARP_DECODER is not set\n# CONFIG_IR_MCE_KBD_DECODER is not set\n# CONFIG_IR_XMP_DECODER is not set\n# CONFIG_IR_IMON_DECODER is not set\n# CONFIG_RC_DEVICES is not set\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\nCONFIG_USB_VIDEO_CLASS=y\n# CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV is not set\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_VIDEO_CPIA2 is not set\n# CONFIG_USB_ZR364XX is not set\n# CONFIG_USB_STKWEBCAM is not set\n# CONFIG_USB_S2255 is not set\n# CONFIG_VIDEO_USBTV is not set\n# CONFIG_NPU_USB_ACM is not set\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\n# CONFIG_VIDEO_EM28XX is not set\nCONFIG_V4L_PLATFORM_DRIVERS=y\nCONFIG_SOC_CAMERA=y\n# CONFIG_SOC_CAMERA_PLATFORM is not set\n# CONFIG_VIDEO_XILINX is not set\n# CONFIG_VIDEO_RK_CIF_ISP10 is not set\nCONFIG_VIDEO_ROCKCHIP_CIF=y\nCONFIG_ROCKCHIP_CIF_WORKMODE_PINGPONG=y\n# CONFIG_ROCKCHIP_CIF_WORKMODE_ONEFRAME is not set\nCONFIG_VIDEO_ROCKCHIP_ISP1=y\nCONFIG_V4L_MEM2MEM_DRIVERS=y\n# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set\n# CONFIG_VIDEO_SH_VEU is not set\nCONFIG_VIDEO_ROCKCHIP_RGA=y\n# CONFIG_VIDEO_ROCKCHIP_VPU is not set\n# CONFIG_V4L_TEST_DRIVERS is not set\n# CONFIG_ROCKCHIP_TSP is not set\n\n#\n# Supported MMC/SDIO adapters\n#\n# CONFIG_CYPRESS_FIRMWARE is not set\n\n#\n# Media ancillary drivers (tuners, sensors, i2c, spi, frontends)\n#\n# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set\n# CONFIG_VIDEO_IR_I2C is not set\n\n#\n# I2C Encoders, decoders, sensors and other helper chips\n#\n\n#\n# Audio decoders, processors and mixers\n#\n# CONFIG_VIDEO_TVAUDIO is not set\n# CONFIG_VIDEO_TDA7432 is not set\n# CONFIG_VIDEO_TDA9840 is not set\n# CONFIG_VIDEO_TEA6415C is not set\n# CONFIG_VIDEO_TEA6420 is not set\n# CONFIG_VIDEO_MSP3400 is not set\n# CONFIG_VIDEO_CS5345 is not set\n# CONFIG_VIDEO_CS53L32A is not set\n# CONFIG_VIDEO_TLV320AIC23B is not set\n# CONFIG_VIDEO_UDA1342 is not set\n# CONFIG_VIDEO_WM8775 is not set\n# CONFIG_VIDEO_WM8739 is not set\n# CONFIG_VIDEO_VP27SMPX is not set\n# CONFIG_VIDEO_SONY_BTF_MPX is not set\n\n#\n# RDS decoders\n#\n# CONFIG_VIDEO_SAA6588 is not set\n\n#\n# Video decoders\n#\n# CONFIG_VIDEO_ADV7180 is not set\n# CONFIG_VIDEO_ADV7181D is not set\n# CONFIG_VIDEO_ADV7183 is not set\n# CONFIG_VIDEO_ADV7604 is not set\n# CONFIG_VIDEO_ADV7842 is not set\n# CONFIG_VIDEO_BT819 is not set\n# CONFIG_VIDEO_BT856 is not set\n# CONFIG_VIDEO_BT866 is not set\n# CONFIG_VIDEO_KS0127 is not set\n# CONFIG_VIDEO_ML86V7667 is not set\n# CONFIG_VIDEO_SAA7110 is not set\n# CONFIG_VIDEO_SAA711X is not set\n# CONFIG_VIDEO_TC35874X is not set\n# CONFIG_VIDEO_TVP514X is not set\n# CONFIG_VIDEO_TVP5150 is not set\n# CONFIG_VIDEO_TVP7002 is not set\n# CONFIG_VIDEO_TW2804 is not set\n# CONFIG_VIDEO_TW9903 is not set\n# CONFIG_VIDEO_TW9906 is not set\n# CONFIG_VIDEO_VPX3220 is not set\n\n#\n# Video and audio decoders\n#\n# CONFIG_VIDEO_SAA717X is not set\n# CONFIG_VIDEO_CX25840 is not set\n\n#\n# Video encoders\n#\n# CONFIG_VIDEO_SAA7127 is not set\n# CONFIG_VIDEO_SAA7185 is not set\n# CONFIG_VIDEO_ADV7170 is not set\n# CONFIG_VIDEO_ADV7175 is not set\n# CONFIG_VIDEO_ADV7343 is not set\n# CONFIG_VIDEO_ADV7393 is not set\n# CONFIG_VIDEO_ADV7511 is not set\n# CONFIG_VIDEO_AD9389B is not set\n# CONFIG_VIDEO_AK881X is not set\n# CONFIG_VIDEO_THS8200 is not set\n\n#\n# Camera sensor devices\n#\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX317 is not set\n# CONFIG_VIDEO_IMX323 is not set\n# CONFIG_VIDEO_IMX327 is not set\n# CONFIG_VIDEO_VIRT_CAMERA is not set\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV2718 is not set\n# CONFIG_VIDEO_OV2735 is not set\n# CONFIG_VIDEO_OV4689 is not set\nCONFIG_VIDEO_OV5647=y\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV7251 is not set\n# CONFIG_VIDEO_OV7640 is not set\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV7725 is not set\n# CONFIG_VIDEO_OV7750 is not set\n# CONFIG_VIDEO_OV8858 is not set\n# CONFIG_VIDEO_OV9281 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_OV9750 is not set\n# CONFIG_VIDEO_OV13850 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9V011 is not set\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_AR0230 is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_SMIAPP is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_GC2155 is not set\n# CONFIG_VIDEO_GC0312 is not set\n# CONFIG_VIDEO_GC2145 is not set\n# CONFIG_VIDEO_GC2355 is not set\n# CONFIG_VIDEO_GC2385 is not set\n# CONFIG_VIDEO_GC5025 is not set\n# CONFIG_VIDEO_GC5035 is not set\n# CONFIG_VIDEO_GC8034 is not set\n# CONFIG_VIDEO_SC031GS is not set\n# CONFIG_VIDEO_SC132GS is not set\n# CONFIG_VIDEO_GC0329 is not set\n# CONFIG_VIDEO_GC2035 is not set\n# CONFIG_VIDEO_BF3925 is not set\n# CONFIG_VIDEO_JX_H65 is not set\n# CONFIG_VIDEO_PREISP_DUMMY_SENSOR is not set\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_AS3645A is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# CONFIG_VIDEO_SGM3784 is not set\n\n#\n# Video improvement chips\n#\n# CONFIG_VIDEO_UPD64031A is not set\n# CONFIG_VIDEO_UPD64083 is not set\n\n#\n# Camera lens devices\n#\n# CONFIG_VIDEO_VM149C is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_FP5510 is not set\n\n#\n# Audio/Video compression chips\n#\n# CONFIG_VIDEO_SAA6752HS is not set\n\n#\n# Miscellaneous helper chips\n#\n# CONFIG_VIDEO_THS7303 is not set\n# CONFIG_VIDEO_M52790 is not set\n# CONFIG_VIDEO_NVP6324 is not set\n\n#\n# Sensors used on soc_camera driver\n#\n\n#\n# soc_camera sensor drivers\n#\n# CONFIG_SOC_CAMERA_IMX074 is not set\n# CONFIG_SOC_CAMERA_MT9M001 is not set\n# CONFIG_SOC_CAMERA_MT9M111 is not set\n# CONFIG_SOC_CAMERA_MT9T031 is not set\n# CONFIG_SOC_CAMERA_MT9T112 is not set\n# CONFIG_SOC_CAMERA_MT9V022 is not set\n# CONFIG_SOC_CAMERA_OV2640 is not set\n# CONFIG_SOC_CAMERA_OV5642 is not set\n# CONFIG_SOC_CAMERA_OV6650 is not set\n# CONFIG_SOC_CAMERA_OV772X is not set\n# CONFIG_SOC_CAMERA_OV9640 is not set\n# CONFIG_SOC_CAMERA_OV9740 is not set\n# CONFIG_SOC_CAMERA_RJ54N1 is not set\n# CONFIG_SOC_CAMERA_TW9910 is not set\n\n#\n# SPI helper chips\n#\n# CONFIG_VIDEO_GS1662 is not set\n# CONFIG_VIDEO_IMX327_SPI is not set\nCONFIG_VIDEO_ROCKCHIP_PREISP=y\n\n#\n# Customise DVB Frontends\n#\n# CONFIG_DVB_AU8522_V4L is not set\n# CONFIG_DVB_TUNER_DIB0070 is not set\n# CONFIG_DVB_TUNER_DIB0090 is not set\n\n#\n# Tools to develop new frontends\n#\n# CONFIG_DVB_DUMMY_FE is not set\n# CONFIG_CAMSYS_DRV is not set\n# CONFIG_ROCK_CHIP_SOC_CAMERA is not set\n\n#\n# Graphics support\n#\nCONFIG_DRM=y\nCONFIG_DRM_IGNORE_IOTCL_PERMIT=y\nCONFIG_DRM_MIPI_DSI=y\nCONFIG_DRM_KMS_HELPER=y\nCONFIG_DRM_KMS_FB_HELPER=y\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\n# CONFIG_DRM_DP_CEC is not set\n# CONFIG_DRM_SCDC_HELPER is not set\nCONFIG_DRM_DMA_SYNC=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_VGEM is not set\nCONFIG_DRM_ROCKCHIP=y\n# CONFIG_ROCKCHIP_DRM_DEBUG is not set\n# CONFIG_ROCKCHIP_DW_HDMI is not set\nCONFIG_ROCKCHIP_DW_MIPI_DSI=y\n# CONFIG_ROCKCHIP_MIPI_CSI_TX is not set\n# CONFIG_ROCKCHIP_ANALOGIX_DP is not set\n# CONFIG_ROCKCHIP_INNO_HDMI is not set\n# CONFIG_ROCKCHIP_LVDS is not set\n# CONFIG_ROCKCHIP_DRM_TVE is not set\n# CONFIG_ROCKCHIP_RGB is not set\n# CONFIG_ROCKCHIP_DRM_BACKLIGHT is not set\n# CONFIG_ROCKCHIP_RK3066_HDMI is not set\n# CONFIG_DRM_UDL is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\nCONFIG_DRM_PANEL_SIMPLE=y\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set\nCONFIG_DRM_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_RK1000 is not set\n# CONFIG_DRM_DUMB_VGA_DAC is not set\n# CONFIG_DRM_LONTIUM_LT8912 is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_POWERVR_ROGUE_M is not set\n# CONFIG_MALI400 is not set\nCONFIG_MALI_MIDGARD_FOR_ANDROID=y\n# CONFIG_MALI_MIDGARD_FOR_LINUX is not set\n# CONFIG_MALI_MIDGARD is not set\n# CONFIG_MALI_CORESTACK is not set\nCONFIG_MALI_PWRSOFT_765=y\n# CONFIG_MALI_KUTF is not set\n# CONFIG_MALI_BIFROST_FOR_ANDROID is not set\nCONFIG_MALI_BIFROST_FOR_LINUX=y\nCONFIG_MALI_BIFROST=y\nCONFIG_MALI_BIFROST_GATOR_SUPPORT=y\n# CONFIG_MALI_BIFROST_ENABLE_TRACE is not set\nCONFIG_MALI_BIFROST_DEVFREQ=y\n# CONFIG_MALI_BIFROST_DMA_FENCE is not set\nCONFIG_MALI_PLATFORM_NAME=\"rk\"\nCONFIG_MALI_BIFROST_EXPERT=y\n# CONFIG_MALI_BIFROST_PRFCNT_SET_SECONDARY is not set\n# CONFIG_MALI_BIFROST_DEBUG is not set\n# CONFIG_MALI_BIFROST_NO_MALI is not set\n# CONFIG_MALI_BIFROST_TRACE_TIMELINE is not set\n# CONFIG_MALI_BIFROST_SYSTEM_TRACE is not set\n# CONFIG_MALI_JOB_DUMP is not set\n# CONFIG_MALI_2MB_ALLOC is not set\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CMDLINE=y\n# CONFIG_FB_DDC is not set\n# CONFIG_FB_BOOT_VESA_SUPPORT is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\n# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\n# CONFIG_FB_SVGALIB is not set\n# CONFIG_FB_MACMODES is not set\n# CONFIG_FB_BACKLIGHT is not set\n# CONFIG_FB_MODE_HELPERS is not set\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_UVESA is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_BROADSHEET is not set\n# CONFIG_FB_AUO_K190X is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\nCONFIG_BACKLIGHT_LCD_SUPPORT=y\n# CONFIG_LCD_CLASS_DEVICE is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\nCONFIG_BACKLIGHT_GENERIC=y\nCONFIG_BACKLIGHT_PWM=y\n# CONFIG_BACKLIGHT_PM8941_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\n# CONFIG_BACKLIGHT_GPIO is not set\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n\n#\n# Rockchip Misc Video driver\n#\n# CONFIG_FB_ROCKCHIP is not set\n# CONFIG_LCDC_RK3368 is not set\nCONFIG_LCD_GENERAL=y\n# CONFIG_LCD_MIPI is not set\n# CONFIG_RK_TRSM is not set\n# CONFIG_RK_HDMI is not set\n\n#\n# RGA\n#\n# CONFIG_ROCKCHIP_RGA is not set\n\n#\n# RGA2\n#\nCONFIG_ROCKCHIP_RGA2=y\n\n#\n# VCODEC\n#\nCONFIG_RK_VCODEC=y\n\n#\n# IEP\n#\n# CONFIG_IEP is not set\n# CONFIG_IEP_MMU is not set\n\n#\n# DP\n#\n\n#\n# ROCKCHIP_MPP\n#\nCONFIG_ROCKCHIP_MPP_SERVICE=y\nCONFIG_ROCKCHIP_MPP_DEVICE=y\n# CONFIG_VGASTATE is not set\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_DUMMY_CONSOLE_COLUMNS=80\nCONFIG_DUMMY_CONSOLE_ROWS=25\nCONFIG_FRAMEBUFFER_CONSOLE=y\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\nCONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y\n# CONFIG_LOGO is not set\nCONFIG_SOUND=y\n# CONFIG_SOUND_OSS_CORE is not set\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_HWDEP=y\nCONFIG_SND_RAWMIDI=y\nCONFIG_SND_JACK=y\nCONFIG_SND_SEQUENCER=y\nCONFIG_SND_SEQ_DUMMY=y\n# CONFIG_SND_MIXER_OSS is not set\n# CONFIG_SND_PCM_OSS is not set\nCONFIG_SND_PCM_TIMER=y\n# CONFIG_SND_SEQUENCER_OSS is not set\nCONFIG_SND_HRTIMER=y\nCONFIG_SND_SEQ_HRTIMER_DEFAULT=y\nCONFIG_SND_DYNAMIC_MINORS=y\nCONFIG_SND_MAX_CARDS=32\n# CONFIG_SND_SUPPORT_OLD_API is not set\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\n# CONFIG_SND_DEBUG is not set\nCONFIG_SND_RAWMIDI_SEQ=y\n# CONFIG_SND_OPL3_LIB_SEQ is not set\n# CONFIG_SND_OPL4_LIB_SEQ is not set\n# CONFIG_SND_SBAWE_SEQ is not set\n# CONFIG_SND_EMU10K1_SEQ is not set\nCONFIG_SND_DRIVERS=y\n# CONFIG_SND_DUMMY is not set\n# CONFIG_SND_ALOOP is not set\n# CONFIG_SND_VIRMIDI is not set\n# CONFIG_SND_MTPAV is not set\n# CONFIG_SND_SERIAL_U16550 is not set\n# CONFIG_SND_MPU401 is not set\n\n#\n# HD-Audio\n#\nCONFIG_SND_HDA_PREALLOC_SIZE=64\n# CONFIG_SND_SPI is not set\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=y\n# CONFIG_SND_USB_UA101 is not set\n# CONFIG_SND_USB_CAIAQ is not set\n# CONFIG_SND_USB_6FIRE is not set\n# CONFIG_SND_USB_HIFACE is not set\n# CONFIG_SND_BCD2000 is not set\n# CONFIG_SND_USB_POD is not set\n# CONFIG_SND_USB_PODHD is not set\n# CONFIG_SND_USB_TONEPORT is not set\n# CONFIG_SND_USB_VARIAX is not set\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\nCONFIG_SND_SOC_ROCKCHIP=y\n# CONFIG_SND_SOC_ROCKCHIP_FORCE_SRAM is not set\nCONFIG_SND_SOC_ROCKCHIP_I2S=y\n# CONFIG_SND_SOC_ROCKCHIP_I2S_TDM is not set\nCONFIG_SND_SOC_ROCKCHIP_MULTI_DAIS=y\nCONFIG_SND_SOC_ROCKCHIP_PDM=y\n# CONFIG_SND_SOC_ROCKCHIP_SPDIF is not set\n# CONFIG_SND_SOC_ROCKCHIP_SPDIFRX is not set\n# CONFIG_SND_SOC_ROCKCHIP_VAD is not set\n# CONFIG_SND_SOC_ROCKCHIP_DA7219 is not set\n# CONFIG_SND_SOC_ROCKCHIP_HDMI_ANALOG is not set\n# CONFIG_SND_SOC_ROCKCHIP_MAX98090 is not set\nCONFIG_SND_SOC_ROCKCHIP_MULTICODECS=y\n# CONFIG_SND_SOC_ROCKCHIP_RT5645 is not set\n# CONFIG_SND_SOC_ROCKCHIP_RT5651_TC358749 is not set\n# CONFIG_SND_SOC_ROCKCHIP_CDNDP is not set\n\n#\n# Allwinner SoC Audio support\n#\n# CONFIG_SND_SUN4I_CODEC is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4554 is not set\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CX2072X is not set\n# CONFIG_SND_SOC_CX20810 is not set\n# CONFIG_SND_SOC_DUMMY_CODEC is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_ES8316 is not set\n# CONFIG_SND_SOC_ES8323 is not set\n# CONFIG_SND_SOC_ES8328 is not set\n# CONFIG_SND_SOC_ES8328_I2C is not set\n# CONFIG_SND_SOC_ES8396 is not set\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_GVA_CODEC is not set\n# CONFIG_SND_SOC_FM1288 is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1792A is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK312X is not set\n# CONFIG_SND_SOC_RK3228 is not set\n# CONFIG_SND_SOC_RK3308 is not set\n# CONFIG_SND_SOC_RK3328 is not set\nCONFIG_SND_SOC_RK817=y\n# CONFIG_SND_SOC_RT5616 is not set\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\n# CONFIG_SND_SOC_RT5651 is not set\n# CONFIG_SND_SOC_RT5677_SPI is not set\n# CONFIG_SND_SOC_SGTL5000 is not set\n# CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set\n# CONFIG_SND_SOC_SPDIF is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TC358749X is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC3X is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731 is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\nCONFIG_SND_SIMPLE_CARD=y\n# CONFIG_SOUND_PRIME is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\nCONFIG_HID_BATTERY_STRENGTH=y\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\n# CONFIG_HID_A4TECH is not set\n# CONFIG_HID_ACRUX is not set\n# CONFIG_HID_APPLE is not set\n# CONFIG_HID_APPLEIR is not set\n# CONFIG_HID_AUREAL is not set\n# CONFIG_HID_BELKIN is not set\n# CONFIG_HID_BETOP_FF is not set\n# CONFIG_HID_CHERRY is not set\n# CONFIG_HID_CHICONY is not set\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CYPRESS is not set\n# CONFIG_HID_DRAGONRISE is not set\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\n# CONFIG_HID_EZKEY is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\n# CONFIG_HID_KYE is not set\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_GYRATION is not set\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_TWINHAN is not set\nCONFIG_HID_KENSINGTON=y\n# CONFIG_HID_LCPOWER is not set\n# CONFIG_HID_LENOVO is not set\n# CONFIG_HID_LOGITECH is not set\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MICROSOFT is not set\n# CONFIG_HID_MONTEREY is not set\nCONFIG_HID_MULTITOUCH=y\n# CONFIG_HID_NTRIG is not set\n# CONFIG_HID_ORTEK is not set\n# CONFIG_HID_PANTHERLORD is not set\n# CONFIG_HID_PENMOUNT is not set\n# CONFIG_HID_PETALYNX is not set\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\n# CONFIG_HID_SAMSUNG is not set\n# CONFIG_HID_SONY is not set\n# CONFIG_HID_SPEEDLINK is not set\n# CONFIG_HID_STEELSERIES is not set\n# CONFIG_HID_SUNPLUS is not set\n# CONFIG_HID_RMI is not set\n# CONFIG_HID_GREENASIA is not set\n# CONFIG_HID_SMARTJOYPLUS is not set\n# CONFIG_HID_TIVO is not set\n# CONFIG_HID_TOPSEED is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_WACOM is not set\n# CONFIG_HID_WIIMOTE is not set\n# CONFIG_HID_XINMO is not set\n# CONFIG_HID_ZEROPLUS is not set\n# CONFIG_HID_ZYDACRON is not set\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_RKVR is not set\n# CONFIG_HID_ALPS is not set\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n\n#\n# I2C HID support\n#\nCONFIG_I2C_HID=y\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\n# CONFIG_USB_DEFAULT_PERSIST is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\nCONFIG_USB_OTG=y\n# CONFIG_USB_OTG_WHITELIST is not set\n# CONFIG_USB_OTG_BLACKLIST_HUB is not set\n# CONFIG_USB_OTG_FSM is not set\n# CONFIG_USB_ULPI_BUS is not set\nCONFIG_USB_MON=m\n# CONFIG_USB_WUSB_CBAF is not set\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\n# CONFIG_USB_XHCI_HCD is not set\nCONFIG_USB_EHCI_HCD=y\nCONFIG_USB_EHCI_ROOT_HUB_TT=y\nCONFIG_USB_EHCI_TT_NEWSCHED=y\nCONFIG_USB_EHCI_HCD_PLATFORM=y\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_ISP1362_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\nCONFIG_USB_OHCI_HCD=y\nCONFIG_USB_OHCI_HCD_PLATFORM=y\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=y\n# CONFIG_USB_PRINTER is not set\nCONFIG_USB_WDM=y\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=m\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\nCONFIG_USB_UAS=m\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_MUSB_HDRC is not set\n# CONFIG_USB_DWC3 is not set\nCONFIG_USB_DWC2=m\nCONFIG_USB_DWC2_HOST=y\n\n#\n# Gadget/Dual-role mode requires USB Gadget support to be enabled\n#\n# CONFIG_USB_DWC2_DEBUG is not set\nCONFIG_USB_DWC2_DUAL_ROLE=y\n# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set\n# CONFIG_USB_CHIPIDEA is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=y\n# CONFIG_USB_SERIAL_CONSOLE is not set\nCONFIG_USB_SERIAL_GENERIC=y\n# CONFIG_USB_SERIAL_SIMPLE is not set\n# CONFIG_USB_SERIAL_AIRCABLE is not set\n# CONFIG_USB_SERIAL_ARK3116 is not set\n# CONFIG_USB_SERIAL_BELKIN is not set\n# CONFIG_USB_SERIAL_CH341 is not set\n# CONFIG_USB_SERIAL_WHITEHEAT is not set\n# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set\nCONFIG_USB_SERIAL_CP210X=m\n# CONFIG_USB_SERIAL_CYPRESS_M8 is not set\n# CONFIG_USB_SERIAL_EMPEG is not set\nCONFIG_USB_SERIAL_FTDI_SIO=m\n# CONFIG_USB_SERIAL_VISOR is not set\n# CONFIG_USB_SERIAL_IPAQ is not set\n# CONFIG_USB_SERIAL_IR is not set\n# CONFIG_USB_SERIAL_EDGEPORT is not set\n# CONFIG_USB_SERIAL_EDGEPORT_TI is not set\n# CONFIG_USB_SERIAL_F81232 is not set\n# CONFIG_USB_SERIAL_GARMIN is not set\n# CONFIG_USB_SERIAL_IPW is not set\n# CONFIG_USB_SERIAL_IUU is not set\n# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set\nCONFIG_USB_SERIAL_KEYSPAN=m\n# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set\n# CONFIG_USB_SERIAL_KLSI is not set\n# CONFIG_USB_SERIAL_KOBIL_SCT is not set\n# CONFIG_USB_SERIAL_MCT_U232 is not set\n# CONFIG_USB_SERIAL_METRO is not set\n# CONFIG_USB_SERIAL_MOS7720 is not set\n# CONFIG_USB_SERIAL_MOS7840 is not set\n# CONFIG_USB_SERIAL_MXUPORT is not set\n# CONFIG_USB_SERIAL_NAVMAN is not set\nCONFIG_USB_SERIAL_PL2303=m\nCONFIG_USB_SERIAL_OTI6858=m\n# CONFIG_USB_SERIAL_QCAUX is not set\nCONFIG_USB_SERIAL_QUALCOMM=m\n# CONFIG_USB_SERIAL_SPCP8X5 is not set\n# CONFIG_USB_SERIAL_SAFE is not set\nCONFIG_USB_SERIAL_SIERRAWIRELESS=m\n# CONFIG_USB_SERIAL_SYMBOL is not set\n# CONFIG_USB_SERIAL_TI is not set\n# CONFIG_USB_SERIAL_CYBERJACK is not set\n# CONFIG_USB_SERIAL_XIRCOM is not set\nCONFIG_USB_SERIAL_WWAN=m\nCONFIG_USB_SERIAL_OPTION=m\n# CONFIG_USB_SERIAL_OMNINET is not set\n# CONFIG_USB_SERIAL_OPTICON is not set\n# CONFIG_USB_SERIAL_XSENS_MT is not set\n# CONFIG_USB_SERIAL_WISHBONE is not set\n# CONFIG_USB_SERIAL_SSU100 is not set\n# CONFIG_USB_SERIAL_QT2 is not set\n# CONFIG_USB_SERIAL_DEBUG is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_RIO500 is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_LED is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\nCONFIG_USB_EZUSB_FX2=y\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n# CONFIG_USB_ATM is not set\n\n#\n# USB Physical Layer drivers\n#\n# CONFIG_USB_PHY is not set\n# CONFIG_USB_OTG_WAKELOCK is not set\n# CONFIG_NOP_USB_XCEIV is not set\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\n# CONFIG_USB_ULPI is not set\n# CONFIG_USB_GADGET is not set\n\n#\n# ROCKCHIP USB Support\n#\n# CONFIG_USB20_HOST is not set\n# CONFIG_USB20_OTG is not set\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_UWB is not set\nCONFIG_MMC=y\n# CONFIG_MMC_DEBUG is not set\n# CONFIG_MMC_EMBEDDED_SDIO is not set\n# CONFIG_MMC_PARANOID_SD_INIT is not set\n\n#\n# MMC/SD/SDIO Card Drivers\n#\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\nCONFIG_MMC_BLOCK_BOUNCE=y\n# CONFIG_SDIO_UART is not set\nCONFIG_MMC_TEST=y\n# CONFIG_MMC_SIMULATE_MAX_SPEED is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_ARMMMCI is not set\n# CONFIG_MMC_SDHCI is not set\n# CONFIG_MMC_SPI is not set\nCONFIG_MMC_DW=y\nCONFIG_MMC_DW_PLTFM=y\n# CONFIG_MMC_DW_EXYNOS is not set\n# CONFIG_MMC_DW_K3 is not set\nCONFIG_MMC_DW_ROCKCHIP=y\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\n# CONFIG_LEDS_CLASS_FLASH is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP5521 is not set\n# CONFIG_LEDS_LP5523 is not set\n# CONFIG_LEDS_LP5562 is not set\n# CONFIG_LEDS_LP8501 is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\n# CONFIG_LEDS_PWM is not set\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_SYSCON is not set\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\n# CONFIG_LEDS_TRIGGER_TIMER is not set\n# CONFIG_LEDS_TRIGGER_ONESHOT is not set\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\n# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set\nCONFIG_LEDS_TRIGGER_CPU=y\nCONFIG_LEDS_TRIGGER_GPIO=y\n# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\n# CONFIG_LEDS_TRIGGER_TRANSIENT is not set\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\n# CONFIG_SWITCH is not set\n# CONFIG_ACCESSIBILITY is not set\nCONFIG_EDAC_SUPPORT=y\n# CONFIG_EDAC is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_DS3232 is not set\n# CONFIG_RTC_DRV_FAKE is not set\n# CONFIG_RTC_DRV_HYM8563 is not set\n# CONFIG_RTC_DRV_MAX6900 is not set\nCONFIG_RTC_DRV_RK808=y\n# CONFIG_RTC_DRV_RK_TIMER is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12057 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF8563 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_DS3234 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\n# CONFIG_RTC_DRV_PL031 is not set\n# CONFIG_RTC_DRV_SNVS is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_OF=y\n# CONFIG_AMBA_PL08X is not set\n# CONFIG_FSL_EDMA is not set\n# CONFIG_INTEL_IDMA64 is not set\nCONFIG_PL330_DMA=y\n# CONFIG_DW_DMAC is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\n\n#\n# Virtio drivers\n#\n# CONFIG_VIRTIO_MMIO is not set\n\n#\n# Microsoft Hyper-V guest support\n#\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_COMEDI is not set\n# CONFIG_RTLLIB is not set\nCONFIG_R8712U=m\nCONFIG_R8188EU=m\nCONFIG_88EU_AP_MODE=y\nCONFIG_R8723AU=m\nCONFIG_8723AU_AP_MODE=y\nCONFIG_8723AU_BT_COEXIST=y\n# CONFIG_VT6656 is not set\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16204 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADIS16220 is not set\n# CONFIG_ADIS16240 is not set\n# CONFIG_LIS3L02DQ is not set\n# CONFIG_SCA3000 is not set\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7606 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7816 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7280 is not set\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7152 is not set\n# CONFIG_AD7746 is not set\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16060 is not set\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n# CONFIG_INV_MPU_IIO is not set\n\n#\n# Light sensors\n#\nCONFIG_SENSORS_ISL29018=y\n# CONFIG_SENSORS_ISL29028 is not set\nCONFIG_TSL2583=y\n# CONFIG_TSL2x7x is not set\n\n#\n# Magnetometer sensors\n#\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7753 is not set\n# CONFIG_ADE7754 is not set\n# CONFIG_ADE7758 is not set\n# CONFIG_ADE7759 is not set\n# CONFIG_ADE7854 is not set\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1200 is not set\n# CONFIG_AD2S1210 is not set\n\n#\n# Triggers - standalone\n#\n# CONFIG_IIO_PERIODIC_RTC_TRIGGER is not set\n# CONFIG_IIO_SIMPLE_DUMMY is not set\n\n#\n# Speakup console speech\n#\n# CONFIG_SPEAKUP is not set\n# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set\n# CONFIG_STAGING_MEDIA is not set\n\n#\n# Android\n#\n# CONFIG_ASHMEM is not set\n# CONFIG_ANDROID_TIMED_OUTPUT is not set\n# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set\n# CONFIG_SYNC is not set\n# CONFIG_ION is not set\nCONFIG_FIQ_DEBUGGER=y\nCONFIG_FIQ_DEBUGGER_NO_SLEEP=y\n# CONFIG_FIQ_DEBUGGER_WAKEUP_IRQ_ALWAYS_ON is not set\nCONFIG_FIQ_DEBUGGER_CONSOLE=y\nCONFIG_FIQ_DEBUGGER_CONSOLE_DEFAULT_ENABLE=y\n# CONFIG_FIQ_DEBUGGER_TRUST_ZONE is not set\n# CONFIG_FIQ_DEBUGGER_UART_OVERLAY is not set\n# CONFIG_FIQ_WATCHDOG is not set\n# CONFIG_RK_CONSOLE_THREAD is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_WIMAX_GDM72XX is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_LUSTRE_FS is not set\n# CONFIG_DGAP is not set\n# CONFIG_GS_FPGABOOT is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_FSL_MC_BUS is not set\n# CONFIG_WILC1000_DRIVER is not set\n# CONFIG_MOST is not set\n# CONFIG_POWERVR_ROGUE_N is not set\n# CONFIG_GOLDFISH is not set\n# CONFIG_CHROME_PLATFORMS is not set\nCONFIG_CLKDEV_LOOKUP=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Common Clock Framework\n#\n# CONFIG_COMMON_CLK_VERSATILE is not set\nCONFIG_COMMON_CLK_RK808=y\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_CLK_QORIQ is not set\n# CONFIG_COMMON_CLK_XGENE is not set\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_PXA is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n\n#\n# Hardware Spinlock drivers\n#\n# CONFIG_HWSPINLOCK_ROCKCHIP is not set\n\n#\n# Clock Source drivers\n#\nCONFIG_CLKSRC_OF=y\nCONFIG_CLKSRC_PROBE=y\nCONFIG_ROCKCHIP_TIMER=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\n# CONFIG_ARM_ARCH_TIMER_VCT_ACCESS is not set\n# CONFIG_ARM_TIMER_SP804 is not set\n# CONFIG_ATMEL_PIT is not set\n# CONFIG_SH_TIMER_CMT is not set\n# CONFIG_SH_TIMER_MTU2 is not set\n# CONFIG_SH_TIMER_TMU is not set\n# CONFIG_EM_TIMER_STI is not set\n# CONFIG_MAILBOX is not set\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\n# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set\nCONFIG_IOMMU_IOVA=y\nCONFIG_OF_IOMMU=y\nCONFIG_IOMMU_DMA=y\nCONFIG_ROCKCHIP_IOMMU=y\n# CONFIG_RK_IOMMU is not set\n# CONFIG_ARM_SMMU is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_STE_MODEM_RPROC is not set\n\n#\n# Rpmsg drivers\n#\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Rockchip CPU selection\n#\nCONFIG_CPU_PX30=y\n# CONFIG_CPU_RK1808 is not set\n# CONFIG_CPU_RK3308 is not set\nCONFIG_CPU_RK3328=y\n# CONFIG_CPU_RK3366 is not set\nCONFIG_CPU_RK3368=y\nCONFIG_CPU_RK3399=y\nCONFIG_ANDROID_VERSION=0x07010000\nCONFIG_ROCKCHIP_CPUINFO=y\n# CONFIG_ROCKCHIP_DEVICEINFO is not set\nCONFIG_ROCKCHIP_IPA=y\nCONFIG_ROCKCHIP_OPP=y\n# CONFIG_ROCKCHIP_PM_TEST is not set\nCONFIG_ROCKCHIP_GRF=y\nCONFIG_ROCKCHIP_PM_DOMAINS=y\nCONFIG_ROCKCHIP_PVTM=y\nCONFIG_ROCKCHIP_SUSPEND_MODE=y\nCONFIG_ROCKCHIP_SYSTEM_MONITOR=y\n# CONFIG_ROCKCHIP_VENDOR_STORAGE_UPDATE_LOADER is not set\n# CONFIG_SUNXI_SRAM is not set\n# CONFIG_SOC_TI is not set\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y\nCONFIG_DEVFREQ_GOV_PERFORMANCE=y\nCONFIG_DEVFREQ_GOV_POWERSAVE=y\nCONFIG_DEVFREQ_GOV_USERSPACE=y\n\n#\n# DEVFREQ Drivers\n#\n# CONFIG_ARM_ROCKCHIP_BUS_DEVFREQ is not set\nCONFIG_ARM_ROCKCHIP_DMC_DEVFREQ=y\nCONFIG_PM_DEVFREQ_EVENT=y\nCONFIG_DEVFREQ_EVENT_ROCKCHIP_DFI=y\n# CONFIG_DEVFREQ_EVENT_ROCKCHIP_NOCP is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\n# CONFIG_EXTCON_USB_GPIO is not set\nCONFIG_MEMORY=y\n# CONFIG_ARM_PL172_MPMC is not set\nCONFIG_IIO=y\nCONFIG_IIO_BUFFER=y\n# CONFIG_IIO_BUFFER_CB is not set\nCONFIG_IIO_KFIFO_BUF=y\nCONFIG_IIO_TRIGGER=y\nCONFIG_IIO_CONSUMERS_PER_TRIGGER=2\n\n#\n# Accelerometers\n#\n# CONFIG_BMA180 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7266 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD799X is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_GPIO_MUXADC is not set\n# CONFIG_HI8435 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_NAU7802 is not set\nCONFIG_ROCKCHIP_SARADC=y\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_VF610_ADC is not set\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n\n#\n# Chemical Sensors\n#\n# CONFIG_VZ89X is not set\n\n#\n# Hid Sensor IIO Common\n#\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_AD5686 is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n\n#\n# Humidity sensors\n#\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_MPU6050_IIO is not set\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM36651 is not set\n# CONFIG_GP2AP020A00F is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\nCONFIG_SENSORS_TSL2563=y\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VL6180 is not set\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8975 is not set\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n\n#\n# Inclinometer sensors\n#\n\n#\n# Triggers - standalone\n#\n# CONFIG_IIO_INTERRUPT_TRIGGER is not set\nCONFIG_IIO_SYSFS_TRIGGER=y\n\n#\n# Digital potentiometers\n#\n# CONFIG_MCP4531 is not set\n\n#\n# Pressure sensors\n#\n# CONFIG_BMP280 is not set\n# CONFIG_MPL115 is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n\n#\n# Proximity sensors\n#\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_SRF04 is not set\n# CONFIG_SX9500 is not set\n\n#\n# Temperature sensors\n#\n# CONFIG_MLX90614 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_FSL_FTM is not set\n# CONFIG_PWM_GPIO is not set\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_PWM_ROCKCHIP=y\n# CONFIG_PWM_ROCKCHIP_I2S is not set\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_V3=y\nCONFIG_PARTITION_PERCPU=y\n# CONFIG_IPACK_BUS is not set\nCONFIG_ARCH_HAS_RESET_CONTROLLER=y\nCONFIG_RESET_CONTROLLER=y\n# CONFIG_FMC is not set\n\n#\n# PHY Subsystem\n#\nCONFIG_GENERIC_PHY=y\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# CONFIG_PHY_SAMSUNG_USB2 is not set\n# CONFIG_PHY_XGENE is not set\n# CONFIG_PHY_ROCKCHIP_USB is not set\n# CONFIG_PHY_ROCKCHIP_INNO_COMBPHY is not set\nCONFIG_PHY_ROCKCHIP_INNO_USB2=y\n# CONFIG_PHY_ROCKCHIP_INNO_USB3 is not set\n# CONFIG_PHY_ROCKCHIP_EMMC is not set\n# CONFIG_PHY_ROCKCHIP_DP is not set\nCONFIG_PHY_ROCKCHIP_MIPI_RX=y\n# CONFIG_PHY_ROCKCHIP_INNO_MIPI_DPHY is not set\n# CONFIG_PHY_ROCKCHIP_INNO_HDMI_PHY is not set\n# CONFIG_PHY_ROCKCHIP_INNO_VIDEO_PHY is not set\nCONFIG_PHY_ROCKCHIP_INNO_VIDEO_COMBO_PHY=y\n# CONFIG_PHY_ROCKCHIP_TYPEC is not set\n# CONFIG_PHY_ROCKCHIP_PCIE is not set\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\nCONFIG_ARM_PMU=y\nCONFIG_RAS=y\n\n#\n# Android\n#\nCONFIG_ANDROID=y\n# CONFIG_ANDROID_BINDER_IPC is not set\n# CONFIG_LIBNVDIMM is not set\nCONFIG_NVMEM=y\n# CONFIG_ROCKCHIP_EFUSE is not set\nCONFIG_ROCKCHIP_OTP=y\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n\n#\n# FPGA Configuration Support\n#\n# CONFIG_FPGA is not set\n# CONFIG_TEE is not set\nCONFIG_RK_FLASH=y\n\n#\n# Rockchip Flash Devices\n#\n# CONFIG_RK_NANDC_NAND is not set\nCONFIG_RK_SFC_NAND=y\nCONFIG_RK_SFC_NOR=y\nCONFIG_RK_SFC_NOR_MTD=y\n# CONFIG_RK_NAND is not set\n\n#\n# Headset device support\n#\n# CONFIG_RK_HEADSET is not set\n\n#\n# Gator module for ARM streamline\n#\nCONFIG_GATOR=m\nCONFIG_GATOR_DO_NOT_ONLINE_CORES_AT_STARTUP=y\nCONFIG_GATOR_WITH_MALI_SUPPORT=y\n# CONFIG_GATOR_MALI_4XXMP is not set\nCONFIG_GATOR_MALI_MIDGARD=y\nCONFIG_GATOR_MALI_MIDGARD_PATH=\"drivers/gpu/arm/bifrost_for_linux\"\n\n#\n# Firmware Drivers\n#\nCONFIG_ARM_PSCI_FW=y\n# CONFIG_FIRMWARE_MEMMAP is not set\nCONFIG_HAVE_ARM_SMCCC=y\nCONFIG_ROCKCHIP_SIP=y\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\n# CONFIG_EXT2_FS is not set\nCONFIG_EXT3_FS=y\nCONFIG_EXT3_FS_POSIX_ACL=y\n# CONFIG_EXT3_FS_SECURITY is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_ENCRYPTION is not set\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\n# CONFIG_REISERFS_FS is not set\n# CONFIG_JFS_FS is not set\n# CONFIG_XFS_FS is not set\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\n# CONFIG_BTRFS_FS is not set\n# CONFIG_NILFS2_FS is not set\n# CONFIG_F2FS_FS is not set\n# CONFIG_FS_DAX is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\nCONFIG_FSNOTIFY=y\n# CONFIG_DNOTIFY is not set\nCONFIG_INOTIFY_USER=y\n# CONFIG_FANOTIFY is not set\n# CONFIG_QUOTA is not set\n# CONFIG_QUOTACTL is not set\nCONFIG_AUTOFS4_FS=y\nCONFIG_FUSE_FS=y\n# CONFIG_CUSE is not set\nCONFIG_OVERLAY_FS=y\n\n#\n# Caches\n#\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_HISTOGRAM is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_FSCACHE_OBJECT_LIST is not set\n# CONFIG_CACHEFILES is not set\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\n# CONFIG_UDF_FS is not set\n\n#\n# DOS/FAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\nCONFIG_MSDOS_FS=y\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=936\nCONFIG_FAT_DEFAULT_IOCHARSET=\"utf8\"\nCONFIG_FAT_DEFAULT_UTF8=y\nCONFIG_EXFAT_FS=y\nCONFIG_EXFAT_DEFAULT_CODEPAGE=936\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\nCONFIG_EXFAT_VIRTUAL_XATTR=y\nCONFIG_EXFAT_VIRTUAL_XATTR_SELINUX_LABEL=\"u:object_r:exfat:s0\"\nCONFIG_EXFAT_DEBUG=n\nCONFIG_EXFAT_UEVENT=n\n# CONFIG_NTFS_FS is not set\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\n# CONFIG_PROC_KCORE is not set\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_PROC_UID=y\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_HUGETLBFS is not set\n# CONFIG_HUGETLB_PAGE is not set\nCONFIG_CONFIGFS_FS=y\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\n# CONFIG_SDCARD_FS is not set\n# CONFIG_HFS_FS is not set\n# CONFIG_HFSPLUS_FS is not set\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_JFFS2_FS is not set\n# CONFIG_LOGFS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\nCONFIG_SQUASHFS_DECOMP_SINGLE=y\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\n# CONFIG_SQUASHFS_LZ4 is not set\nCONFIG_SQUASHFS_LZO=y\n# CONFIG_SQUASHFS_XZ is not set\n# CONFIG_SQUASHFS_ZSTD is not set\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\nCONFIG_PSTORE=y\nCONFIG_PSTORE_CONSOLE=y\n# CONFIG_PSTORE_PMSG is not set\n# CONFIG_PSTORE_FTRACE is not set\nCONFIG_PSTORE_RAM=y\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\nCONFIG_NFS_V3_ACL=y\nCONFIG_NFS_V4=y\nCONFIG_NFS_SWAP=y\n# CONFIG_NFS_V4_1 is not set\n# CONFIG_ROOT_NFS is not set\n# CONFIG_NFS_FSCACHE is not set\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_ACL_SUPPORT=y\nCONFIG_NFS_COMMON=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_SWAP=y\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\n# CONFIG_CIFS_STATS is not set\n# CONFIG_CIFS_WEAK_PW_HASH is not set\n# CONFIG_CIFS_UPCALL is not set\nCONFIG_CIFS_XATTR=y\nCONFIG_CIFS_POSIX=y\nCONFIG_CIFS_ACL=y\nCONFIG_CIFS_DEBUG=y\n# CONFIG_CIFS_DEBUG2 is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\nCONFIG_CIFS_SMB2=y\n# CONFIG_CIFS_SMB311 is not set\nCONFIG_CIFS_FSCACHE=y\n# CONFIG_NCP_FS is not set\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\nCONFIG_NLS_CODEPAGE_936=y\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\nCONFIG_HAVE_KVM_IRQFD=y\nCONFIG_HAVE_KVM_EVENTFD=y\nCONFIG_KVM_MMIO=y\nCONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y\nCONFIG_KVM_VFIO=y\nCONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL=y\nCONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y\nCONFIG_KVM_COMPAT=y\nCONFIG_VIRTUALIZATION=y\nCONFIG_KVM_ARM_VGIC_V3=y\nCONFIG_KVM=y\nCONFIG_KVM_ARM_HOST=y\nCONFIG_VHOST_NET=m\n# CONFIG_VHOST_VSOCK is not set\nCONFIG_VHOST=m\n# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_PROCESS is not set\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\n# CONFIG_DYNAMIC_DEBUG is not set\n\n#\n# Compile-time checks and compiler options\n#\n# CONFIG_DEBUG_INFO is not set\n# CONFIG_DEBUG_INFO_REDUCED is not set\n# CONFIG_DEBUG_INFO_SPLIT is not set\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_GDB_SCRIPTS is not set\nCONFIG_ENABLE_WARN_DEPRECATED=y\nCONFIG_ENABLE_MUST_CHECK=y\nCONFIG_FRAME_WARN=2048\n# CONFIG_STRIP_ASM_SYMS is not set\n# CONFIG_READABLE_ASM is not set\n# CONFIG_UNUSED_SYMBOLS is not set\n# CONFIG_PAGE_OWNER is not set\nCONFIG_DEBUG_FS=y\n# CONFIG_HEADERS_CHECK is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0\nCONFIG_DEBUG_KERNEL=y\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_DEBUG_VM is not set\n# CONFIG_DEBUG_MEMORY_INIT is not set\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_HAVE_ARCH_KASAN=y\n# CONFIG_KASAN is not set\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Lockups and Hangs\n#\nCONFIG_LOCKUP_DETECTOR=y\nCONFIG_HARDLOCKUP_DETECTOR_OTHER_CPU=y\nCONFIG_HARDLOCKUP_DETECTOR=y\n# CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set\nCONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0\nCONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y\nCONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1\nCONFIG_DETECT_HUNG_TASK=y\nCONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120\nCONFIG_BOOTPARAM_HUNG_TASK_PANIC=y\nCONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\n# CONFIG_SCHED_DEBUG is not set\n# CONFIG_SCHED_INFO is not set\n# CONFIG_PANIC_ON_RT_THROTTLING is not set\n# CONFIG_SCHEDSTATS is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\n# CONFIG_DEBUG_TIMEKEEPING is not set\n# CONFIG_TIMER_STATS is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\n# CONFIG_DEBUG_RT_MUTEXES is not set\nCONFIG_DEBUG_SPINLOCK=y\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\nCONFIG_STACKTRACE=y\n# CONFIG_DEBUG_KOBJECT is not set\nCONFIG_HAVE_DEBUG_BUGVERBOSE=y\n# CONFIG_DEBUG_BUGVERBOSE is not set\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PI_LIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\nCONFIG_DEBUG_CREDENTIALS=y\n\n#\n# RCU Debugging\n#\n# CONFIG_PROVE_RCU is not set\n# CONFIG_SPARSE_RCU_POINTER is not set\n# CONFIG_TORTURE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=60\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_GPU_TRACEPOINTS=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_TRACING=y\nCONFIG_GENERIC_TRACER=y\nCONFIG_TRACING_SUPPORT=y\nCONFIG_FTRACE=y\nCONFIG_FUNCTION_TRACER=y\nCONFIG_FUNCTION_GRAPH_TRACER=y\n# CONFIG_PREEMPTIRQ_EVENTS is not set\n# CONFIG_IRQSOFF_TRACER is not set\n# CONFIG_SCHED_TRACER is not set\n# CONFIG_FTRACE_SYSCALLS is not set\n# CONFIG_TRACER_SNAPSHOT is not set\nCONFIG_BRANCH_PROFILE_NONE=y\n# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set\n# CONFIG_PROFILE_ALL_BRANCHES is not set\n# CONFIG_STACK_TRACER is not set\nCONFIG_BLK_DEV_IO_TRACE=y\n# CONFIG_PROBE_EVENTS is not set\n# CONFIG_FTRACE is not set\n# CONFIG_FUNCTION_PROFILER is not set\nCONFIG_FTRACE_MCOUNT_RECORD=y\n# CONFIG_FTRACE_STARTUP_TEST is not set\n# CONFIG_TRACEPOINT_BENCHMARK is not set\n# CONFIG_RING_BUFFER_BENCHMARK is not set\n# CONFIG_RING_BUFFER_STARTUP_TEST is not set\n# CONFIG_TRACE_ENUM_MAP_FILE is not set\nCONFIG_TRACING_EVENTS_GPIO=y\n\n#\n# Runtime Testing\n#\n# CONFIG_LKDTM is not set\n# CONFIG_TEST_LIST_SORT is not set\n# CONFIG_BACKTRACE_SELF_TEST is not set\n# CONFIG_RBTREE_TEST is not set\n# CONFIG_INTERVAL_TREE_TEST is not set\n# CONFIG_PERCPU_TEST is not set\n# CONFIG_ATOMIC64_SELFTEST is not set\n# CONFIG_TEST_HEXDUMP is not set\n# CONFIG_TEST_STRING_HELPERS is not set\n# CONFIG_TEST_KSTRTOX is not set\n# CONFIG_TEST_PRINTF is not set\n# CONFIG_TEST_RHASHTABLE is not set\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_TEST_LKM is not set\n# CONFIG_TEST_USER_COPY is not set\n# CONFIG_TEST_BPF is not set\n# CONFIG_TEST_FIRMWARE is not set\n# CONFIG_TEST_UDELAY is not set\n# CONFIG_MEMTEST is not set\n# CONFIG_TEST_STATIC_KEYS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_SAMPLES is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\n# CONFIG_ARM64_PTDUMP is not set\nCONFIG_STRICT_DEVMEM=y\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set\nCONFIG_DEBUG_SET_MODULE_RONX=y\nCONFIG_DEBUG_RODATA=y\n# CONFIG_DEBUG_ALIGN_RODATA is not set\n# CONFIG_CORESIGHT is not set\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_BIG_KEYS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY_PERF_EVENTS_RESTRICT is not set\n# CONFIG_SECURITY is not set\nCONFIG_SECURITYFS=y\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\nCONFIG_HAVE_ARCH_HARDENED_USERCOPY=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_TEE_SUPPORT is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_DEFAULT_SECURITY=\"\"\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_BLKCIPHER=y\nCONFIG_CRYPTO_BLKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_PCOMP2=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\n# CONFIG_CRYPTO_RSA is not set\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_WORKQUEUE=y\nCONFIG_CRYPTO_CRYPTD=y\n# CONFIG_CRYPTO_MCRYPTD is not set\nCONFIG_CRYPTO_AUTHENC=m\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_ABLK_HELPER=y\n\n#\n# Authenticated Encryption with Associated Data\n#\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=m\n\n#\n# Block modes\n#\nCONFIG_CRYPTO_CBC=m\n# CONFIG_CRYPTO_HEH is not set\nCONFIG_CRYPTO_CTR=y\n# CONFIG_CRYPTO_CTS is not set\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_PCBC is not set\n# CONFIG_CRYPTO_XTS is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\n\n#\n# Hash modes\n#\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_HMAC=y\n# CONFIG_CRYPTO_XCBC is not set\n# CONFIG_CRYPTO_VMAC is not set\n\n#\n# Digest\n#\nCONFIG_CRYPTO_CRC32C=y\n# CONFIG_CRYPTO_CRC32 is not set\nCONFIG_CRYPTO_CRCT10DIF=y\nCONFIG_CRYPTO_GHASH=y\n# CONFIG_CRYPTO_POLY1305 is not set\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\n# CONFIG_CRYPTO_RMD128 is not set\n# CONFIG_CRYPTO_RMD160 is not set\n# CONFIG_CRYPTO_RMD256 is not set\n# CONFIG_CRYPTO_RMD320 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_TGR192 is not set\n# CONFIG_CRYPTO_WP512 is not set\n\n#\n# Ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_ANUBIS is not set\nCONFIG_CRYPTO_ARC4=y\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SALSA20 is not set\n# CONFIG_CRYPTO_CHACHA20 is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\n# CONFIG_CRYPTO_TEA is not set\nCONFIG_CRYPTO_TWOFISH=y\nCONFIG_CRYPTO_TWOFISH_COMMON=y\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=m\n# CONFIG_CRYPTO_ZLIB is not set\nCONFIG_CRYPTO_LZO=y\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n\n#\n# Random Number Generation\n#\nCONFIG_CRYPTO_ANSI_CPRNG=y\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\n# CONFIG_CRYPTO_USER_API_AEAD is not set\nCONFIG_CRYPTO_HASH_INFO=y\nCONFIG_CRYPTO_HW=y\n# CONFIG_CRYPTO_DEV_CCP is not set\n# CONFIG_CRYPTO_DEV_ROCKCHIP_V1 is not set\n# CONFIG_CRYPTO_DEV_ROCKCHIP_V2 is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_PUBLIC_KEY_ALGO_RSA=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\nCONFIG_ARM64_CRYPTO=y\nCONFIG_CRYPTO_SHA1_ARM64_CE=y\nCONFIG_CRYPTO_SHA2_ARM64_CE=y\nCONFIG_CRYPTO_GHASH_ARM64_CE=y\n# CONFIG_CRYPTO_POLY_HASH_ARM64_CE is not set\nCONFIG_CRYPTO_AES_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64_CE_CCM=y\nCONFIG_CRYPTO_AES_ARM64_CE_BLK=y\n# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set\n# CONFIG_CRYPTO_CRC32_ARM64 is not set\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_GENERIC_IO=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_CRC_CCITT=y\nCONFIG_CRC16=y\nCONFIG_CRC_T10DIF=y\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\nCONFIG_CRC7=y\nCONFIG_LIBCRC32C=y\n# CONFIG_CRC8 is not set\nCONFIG_AUDIT_ARCH_COMPAT_GENERIC=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=y\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_XZ_DEC=y\n# CONFIG_XZ_DEC_X86 is not set\n# CONFIG_XZ_DEC_POWERPC is not set\n# CONFIG_XZ_DEC_IA64 is not set\nCONFIG_XZ_DEC_ARM=y\nCONFIG_XZ_DEC_ARMTHUMB=y\n# CONFIG_XZ_DEC_SPARC is not set\nCONFIG_XZ_DEC_BCJ=y\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_GZIP=y\nCONFIG_DECOMPRESS_BZIP2=y\nCONFIG_DECOMPRESS_LZMA=y\nCONFIG_DECOMPRESS_XZ=y\nCONFIG_DECOMPRESS_LZO=y\nCONFIG_DECOMPRESS_LZ4=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_REED_SOLOMON=y\nCONFIG_REED_SOLOMON_ENC8=y\nCONFIG_REED_SOLOMON_DEC8=y\nCONFIG_TEXTSEARCH=y\nCONFIG_TEXTSEARCH_KMP=m\nCONFIG_TEXTSEARCH_BM=m\nCONFIG_TEXTSEARCH_FSM=m\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_DMA=y\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_NLATTR=y\nCONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y\nCONFIG_CLZ_TAB=y\n# CONFIG_CORDIC is not set\n# CONFIG_DDR is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\n# CONFIG_SG_SPLIT is not set\nCONFIG_ARCH_HAS_SG_CHAIN=y\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/options",
    "content": "################################################################################\n# setup device defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        TARGET_CPU=\"cortex-a35\"\n        TARGET_CPU_FLAGS=\"+crc+crypto\"\n        TARGET_FEATURES=\"64bit\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_PATCH_ARCH=\"aarch64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a35\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"crypto-neon-fp-armv8\"\n        TARGET_FEATURES=\"32bit\"\n        ;;\n    esac\n\n  # Kernel target\n    KERNEL_TARGET=\"Image\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"\"\n    KERNEL_MAKE_EXTRACMD+=\" rockchip/rk3326-gameforce-linux.dtb\"\n    \n  # Mali GPU family\n    MALI_FAMILY=\"g31\"\n    OPENGLES=\"mali-bifrost\"\n\n  # kernel serial console\n    EXTRA_CMDLINE=\"console=ttyFIQ0 console=tty0 net.iframes=0 ssh consoleblank=0\"\n    \n    LINUX=\"gameforce-4.4\"\n\tUBOOT_SYSTEM=\"chi\"\n    \n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"wlan-firmware misc-firmware\" #rockchip-firmware dvb-firmware\n    \n  # additional drivers to install:\n  # for a list of additional drivers see packages/linux-drivers\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_DRIVERS=\"DRIVER1 DRIVER2\"\n    ADDITIONAL_DRIVERS=\"\" #RTL8192CU RTL8192DU RTL8192EU RTL8188EU RTL8812AU RTL8821CU\"\n  \n  # driver addons to install:\n  # for a list of additinoal drivers see packages/linux-driver-addons\n  # Space separated list is supported,\n    DRIVER_ADDONS=\"\" #dvb-latest\"\n\n  # additional packages to install\n    ADDITIONAL_PACKAGES=\"dtc uinput_joystick rkwifibt bootini\"\n\n  # debug tty path\n    DEBUG_TTY=\"/dev/ttyFIQ0\"\n  \n  # SquashFS compression method (gzip / lzo / xz / zstd)\n    SQUASHFS_COMPRESSION=\"lzo\"    \n\n  # Skins to install (Estuary)\n  # Space separated list is supported,\n  # e.g. SKINS=\"Estuary\"\n  SKINS=\"Estuary\"\n\n  # Default Skin (Estuary)\n  SKIN_DEFAULT=\"Estuary\"\n  \n  # Select whether to use default (upstream xbmc/xbmc) repo, or specific vendor repo\n  KODI_VENDOR=\"default\"\n\n  # install extra subtitle Fonts for KODI (yes / no)\n  KODI_EXTRA_FONTS=\"yes\"\n\n  # build and install PulseAudio support (yes / no)\n  PULSEAUDIO_SUPPORT=\"yes\"\n\n  # build and install espeak support (yes / no)\n  ESPEAK_SUPPORT=\"no\"\n\n  # build and install with BluRay support (yes / no)\n  KODI_BLURAY_SUPPORT=\"no\"\n\n  # build and install with BD+ support\n  # (BD+ decryption support in KODI) (yes / no)\n  BLURAY_BDPLUS_SUPPORT=\"no\"\n\n  # build and install with AACS support\n  # (BD decryption support in KODI) (yes / no)\n  BLURAY_AACS_SUPPORT=\"no\"\n\n  # build and install with DVDCSS support\n  # (DVD decryption support in KODI) (yes / no)\n  KODI_DVDCSS_SUPPORT=\"no\"\n\n  # build and install bluetooth support (yes / no)\n  BLUETOOTH_SUPPORT=\"yes\"\n\n  # build and install with KODI webfrontend (yes / no)\n  KODI_WEBSERVER_SUPPORT=\"no\"\n\n  # build and install Avahi (Zeroconf) daemon (yes / no)\n  AVAHI_DAEMON=\"no\"\n\n  # build with UPnP support (yes / no)\n  KODI_UPNP_SUPPORT=\"no\"\n\n  # build with MySQL support (mysql / mariadb / none)\n  KODI_MYSQL_SUPPORT=\"none\"\n\n  # build xbmc with optical drive support (yes / no)\n  KODI_OPTICAL_SUPPORT=\"no\"\n\n  # build with AirPlay support (stream videos from iDevices to KODI) (yes / no)\n  KODI_AIRPLAY_SUPPORT=\"no\"\n\n  # build with AirTunes support (stream music from iDevices to KODI) (yes / no)\n  KODI_AIRTUNES_SUPPORT=\"no\"\n\n  # build with libnfs support (mounting nfs shares with KODI) (yes / no)\n  KODI_NFS_SUPPORT=\"no\"\n\n  # build with Samba Client support (mounting SAMBA shares with KODI) (yes / no)\n  KODI_SAMBA_SUPPORT=\"no\"\n\n  # build with NFS support (mounting nfs shares via the OS) (yes / no)\n  NFS_SUPPORT=\"no\"\n\n  # build with Samba Client support (mounting samba shares via the OS) (yes / no)\n  SAMBA_SUPPORT=\"yes\"\n\n  # build and install Samba Server (yes / no)\n  SAMBA_SERVER=\"yes\"\n\n  # build and install SFTP Server (yes / no)\n  SFTP_SERVER=\"yes\"\n\n  # build and install OpenVPN support (yes / no)\n  OPENVPN_SUPPORT=\"no\"\n\n  # build and install diskmounter support (udevil)\n  # this service provide auto mounting support for external drives in the\n  # mediacenter also automount internally drives at boottime via udev (yes / no)\n  UDEVIL=\"yes\"\n\n  # build and install exFAT fuse support (yes / no)\n  EXFAT=\"yes\"\n\n  # build and install NTFS-3G fuse support (yes / no)\n  NTFS3G=\"yes\"\n\n  # build and install hfs filesystem utilities (yes / no)\n  HFSTOOLS=\"yes\"\n\n  # build and install remote support (yes / no)\n  REMOTE_SUPPORT=\"no\"\n\n  # build and install CEC adapter support (yes / no)\n  CEC_SUPPORT=\"no\"\n\n  # build and install CEC framework support (yes / no)\n  CEC_FRAMEWORK_SUPPORT=\"no\"\n\n  # build and install iSCSI support - iscsistart (yes / no)\n  ISCSI_SUPPORT=\"no\"\n\n  # Support for partitioning and formating disks in initramfs (yes / no)\n  # This adds support for parted and mkfs.ext3/4 to initramfs for OEM usage\n  INITRAMFS_PARTED_SUPPORT=\"no\"\n\n  # build with swap support (yes / no)\n  SWAP_SUPPORT=\"yes\"\n\n  # swap support enabled per default (yes / no)\n  SWAP_ENABLED_DEFAULT=\"yes\"\n\n  # swapfile size if SWAP_SUPPORT=yes in MB\n  SWAPFILESIZE=\"128\"\n\n  # cron support (yes / no)\n  CRON_SUPPORT=\"no\"\n\n  # Distribution Specific source location\n  DISTRO_MIRROR=\"http://sources.libreelec.tv/mirror\"\n  DISTRO_SRC=\"http://sources.libreelec.tv/$LIBREELEC_VERSION\"\n\n  # Addon Server Url\n  ADDON_SERVER_URL=\"\"\n\n  # Addon ID of the default addon repository\n  ADDON_REPO_ID=\"\"\n\n  # Name of the default addon repository\n  ADDON_REPO_NAME=\"\"\n\n  # Version of the default addon repository\n  ADDON_REPO_VERSION=\"\"\n\n  # set the addon dirs\n  ADDON_PATH=\"\"\n  ADDON_URL=\"\"\n\n  # Settings package name - blank if not required\n  DISTRO_PKG_SETTINGS=\"\"\n\n  # IR remote protocols supported in default config\n  IR_REMOTE_PROTOCOLS=\"\"\n\n  # IR remote keymaps supported in default config\n  IR_REMOTE_KEYMAPS=\"\"\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/packages/enable-oga-sleep/package.mk",
    "content": "PKG_NAME=\"enable-oga-sleep\"\nPKG_VERSION=\"\"\nPKG_SHA256=\"\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"OSS\"\nPKG_DEPENDS_TARGET=\"systemd\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_LONGDESC=\"Sleep configuration\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n\tmkdir -p $INSTALL/usr/config/sleep.conf.d\n\tcp sleep.conf $INSTALL/usr/config/sleep.conf.d/sleep.conf\n\n\tmkdir -p $INSTALL/usr/lib/systemd/system-sleep/\n\tcp sleep.sh $INSTALL/usr/lib/systemd/system-sleep/sleep\n}"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/packages/enable-oga-sleep/sources/sleep.conf",
    "content": "#  This file is part of systemd.\n#\n#  systemd is free software; you can redistribute it and/or modify it\n#  under the terms of the GNU Lesser General Public License as published by\n#  the Free Software Foundation; either version 2.1 of the License, or\n#  (at your option) any later version.\n#\n# Entries in this file show the compile time defaults.\n# You can change settings by editing this file.\n# Defaults can be restored by simply deleting this file.\n#\n# See systemd-sleep.conf(5) for details\n\n[Sleep]\nAllowSuspend=yes\n#AllowHibernation=yes\n#AllowSuspendThenHibernate=yes\n#AllowHybridSleep=yes\n#SuspendMode=suspend\nSuspendState=mem standby freeze\n#HibernateMode=platform shutdown\n#HibernateState=disk\n#HybridSleepMode=suspend platform shutdown\n#HybridSleepState=disk\n#HibernateDelaySec=180min"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/packages/enable-oga-sleep/sources/sleep.sh",
    "content": "#!/bin/bash\n\nOGA=$(cat /proc/device-tree/compatible)\n\ncase $1 in\n   pre)\n    # unload esp8090 WiFi module\n[[ \"${OGA}\" == *\"gameforce\"* ]] && modprobe -r rtl8723ds \n    # Store sound state. Try to avoid having max volume after resume\n    alsactl store -f /tmp/asound.state\n\t# workaround until dwc2 is fixed\n\tmodprobe -r dwc2\n    # stop hotkey service\n    systemctl stop odroidgoa-headphones.service\n    ;;\n   post)\n    # Restore pre-sleep sound state\n    alsactl restore -f /tmp/asound.state\n    # workaround until dwc2 is fixed\n\tmodprobe -r dwc2\n\tmodprobe -i dwc2\n\t# re-load WiFi module\n[[ \"${OGA}\" == *\"gameforce\"* ]] && modprobe rtl8723ds \n    # re-detect and reapply sound, brightness and hp state\n    systemctl start odroidgoa-headphones.service\n\t;;\nesac\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/packages/odroidgoa-utils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"odroidgoa-utils\"\nPKG_VERSION=\"\"\nPKG_SHA256=\"\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"OSS\"\nPKG_DEPENDS_TARGET=\"toolchain python-evdev enable-oga-sleep usb-modeswitch light retrorun\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_LONGDESC=\"Support scripts for the ODROID-GO Advance\"\nPKG_TOOLCHAIN=\"manual\"\n\nif [ \"${ARCH}\" = \"aarch64\" ]; then\n  PKG_DEPENDS_TARGET+=\" lib32-retrorun\"\nfi\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/bin\n  cp * $INSTALL/usr/bin\n}\n\npost_install() {  \n  enable_service odroidgoa-hotkeys.service\n  enable_service odroidgoa-headphones.service\n}\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/packages/odroidgoa-utils/sources/headphone_sense.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# Switch to headphones if we have them already connected at boot\nGPIO=$(cat /sys/class/gpio/gpio86/value)\n[[ \"$GPIO\" == \"1\" ]] && set_ee_setting \"audio.device\" \"headphone\" || set_ee_setting \"audio.device\" \"speakers\"\n\nif [ -e \"/emuelec/configs/emuelec.conf\" ]; then\n/usr/bin/odroidgoa_utils.sh setaudio $(get_ee_setting \"audio.device\")\n/usr/bin/odroidgoa_utils.sh vol $(get_ee_setting \"audio.volume\")\n/usr/bin/odroidgoa_utils.sh bright $(get_ee_setting \"brightness.level\")\nfi\n\n# Headphone sensing \nDEVICE='/dev/input/event1'\n\nHP_ON='*(SW_HEADPHONE_INSERT), value 1*'\nHP_OFF='*(SW_HEADPHONE_INSERT), value 0*'\n\nevtest \"${DEVICE}\" | while read line; do\n    case $line in\n\t(${HP_ON})\n\tamixer cset name='Playback Path' HP\n\tset_ee_setting \"audio.device\" \"headphone\"\n\t;;\n\t(${HP_OFF})\n\tamixer cset name='Playback Path' SPK\n\tset_ee_setting \"audio.device\" \"speakers\"\n\t;;\n    esac\ndone\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/packages/odroidgoa-utils/sources/odroidgoa_utils.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# THESE NEEDS TO BE CLEANED UP, MAYBE WITH CASE OR FUNCTIONS\n\n# Source predefined functions and variables\n. /etc/profile\n\nif [ \"${1}\" == \"toggleaudio\" ];then\n# Toggle audio output\nCURRENTAUDIO=$(get_ee_setting \"audio.device\")\n\tcase \"${CURRENTAUDIO}\" in\n\t    \"headphone\")\n\t    echo \"setting speakers\"\n\t\tamixer cset name='Playback Path' SPK\n\t\tset_ee_setting \"audio.device\" \"speakers\"\n\t\t;;\n\t    \"auto\"|\"speakers\"|*)\n\t    echo \"setting headphones\"\n\t\tamixer cset name='Playback Path' HP\n\t\tset_ee_setting \"audio.device\" \"headphone\"\n\t\t;;\n\tesac\nfi\n\nif [ \"${1}\" == \"setaudio\" ];then\n# Set audio output second parameter is either headphones or speakers\n\tcase \"${2}\" in\n\t    \"headphone\")\n\t    echo \"setting headphones\"\n\t\tamixer cset name='Playback Path' HP\n\t\tset_ee_setting \"audio.device\" \"headphone\"\n\t\t;;\n\t  \t\"auto\"|\"speakers\"|*)\n\t  \techo \"setting speakers\"\n\t\tamixer cset name='Playback Path' SPK\n\t\tset_ee_setting \"audio.device\" \"speakers\"\n\t\t;;\n\tesac\nfi\n\nif [ \"${1}\" == \"vol\" ];then\nVOLSTEP=5\nCURRENTVOL=$(get_ee_setting \"audio.volume\")\nMAXVOL=100\nMINVOL=0\n\tif [ \"${2}\" == \"+\" ]; then\n\t\tSTEPVOL=$(($CURRENTVOL+$VOLSTEP))\n\telif [ \"${2}\" == \"-\" ]; then\n\t\tSTEPVOL=$(($CURRENTVOL-$VOLSTEP))\n\telse\n\t\tSTEPVOL=${2}\n\tfi\n\t[ \"$STEPVOL\" -ge \"$MAXVOL\" ] && STEPVOL=\"$MAXVOL\"\n\t[ \"$STEPVOL\" -le \"$MINVOL\" ] && STEPVOL=\"$MINVOL\"\n\tamixer set 'Playback' ${STEPVOL}%\n\tset_ee_setting \"audio.volume\" ${STEPVOL}\n  fi    \n\n\nif [ \"${1}\" == \"bright\" ]; then\nSTEPS=\"5\"\nCURBRIGHT=$(cat /sys/class/backlight/backlight/brightness)\nMAXSYSBRIGHT=$(cat /sys/class/backlight/backlight/max_brightness)\nCURRENTBRIGHT=$(awk -v a=\"$CURBRIGHT\" -v b=\"$MAXSYSBRIGHT\" 'BEGIN{print int((a*100/b)+0.5)}')\nMAXBRIGHT=\"100\"\nMINBRIGHT=\"5\"\n\n    if [ \"${2}\" == \"+\" ]; then\n        STEPBRIGHT=$(($CURRENTBRIGHT+$STEPS))\n    elif [ \"${2}\" == \"-\" ]; then\n        STEPBRIGHT=$(($CURRENTBRIGHT-$STEPS))\n    else\n        STEPBRIGHT=${2}\n    fi\n\n    [ \"$STEPBRIGHT\" -ge \"$MAXBRIGHT\" ] && STEPBRIGHT=\"$MAXBRIGHT\"\n    [ \"$STEPBRIGHT\" -le \"$MINBRIGHT\" ] && STEPBRIGHT=\"$MINBRIGHT\"\n    #echo \"Setting bright to $STEPBRIGHT\"\n\n    NEWVAL=$(awk -v a=\"$STEPBRIGHT\" -v b=\"$MAXSYSBRIGHT\" 'BEGIN{print int((a*b/100)+0.5)}')\necho \"${NEWVAL}\" > /sys/class/backlight/backlight/brightness\nset_ee_setting \"brightness.level\" $STEPBRIGHT\nfi\n\nif [ \"${1}\" == \"oga_oc\" ]; then\n\n    case ${2} in \n        \"1.4ghz\")\n        gov=\"userspace\"\n        freq=\"1416000\"\n        ;;\n        \"1.5ghz\")\n        gov=\"userspace\"\n        freq=\"1512000\"\n        ;;\n        *)\n        gov=\"performance\"\n        freq=\"1296000\"\n        ;;\n    esac\n\n    echo ${gov} > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor\n    echo ${freq} > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed\n    echo ${freq} > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq\nfi\n\nif [ \"${1}\" == \"bl\" ]; then\n\ncase \"${2}\" in\n    \"red\")\n    echo 1 > /sys/class/leds/red/brightness\n    echo 0 > /sys/class/leds/green/brightness\n    echo 0 > /sys/class/leds/blue/brightness\n    ;;\n    \"green\")\n    echo 0 > /sys/class/leds/red/brightness\n    echo 1 > /sys/class/leds/green/brightness\n    echo 0 > /sys/class/leds/blue/brightness\n    ;;\n    \"blue\")\n    echo 0 > /sys/class/leds/red/brightness\n    echo 0 > /sys/class/leds/green/brightness\n    echo 1 > /sys/class/leds/blue/brightness\n    ;;\n    \"white\")\n    echo 1 > /sys/class/leds/red/brightness\n    echo 1 > /sys/class/leds/green/brightness\n    echo 1 > /sys/class/leds/blue/brightness\n    ;;\n    \"purple\")\n    echo 1 > /sys/class/leds/red/brightness\n    echo 0 > /sys/class/leds/green/brightness\n    echo 1 > /sys/class/leds/blue/brightness\n    ;;\n    \"yellow\")\n    echo 1 > /sys/class/leds/red/brightness\n    echo 1 > /sys/class/leds/green/brightness\n    echo 0 > /sys/class/leds/blue/brightness\n    ;;\n    \"cyan\")\n    echo 0 > /sys/class/leds/red/brightness\n    echo 1 > /sys/class/leds/green/brightness\n    echo 1 > /sys/class/leds/blue/brightness\n    ;;\n    \"off\")\n    echo 0 > /sys/class/leds/red/brightness\n    echo 0 > /sys/class/leds/green/brightness\n    echo 0 > /sys/class/leds/blue/brightness\n    ;;\n    esac\nfi\n\nif [ \"${1}\" == \"pl\" ]; then\n\ncase \"${2}\" in\n    \"off\")\n    echo 0 > /sys/class/leds/heartbeat/brightness\n    ;;\n    \"heartbeat\")\n    echo \"heartbeat\"  > /sys/class/leds/heartbeat/trigger\n    ;;\n    \"on\")\n    echo 0 > /sys/class/leds/heartbeat/brightness\n    echo 1 > /sys/class/leds/heartbeat/brightness\n    ;;\n    esac\nfi\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/packages/odroidgoa-utils/sources/oga_events.py",
    "content": "#!/usr/bin/env python3\n\nimport evdev\nimport asyncio\nimport time\nfrom subprocess import check_output\n\npwrkey = evdev.InputDevice(\"/dev/input/event0\")\ngameforce_joypad = evdev.InputDevice(\"/dev/input/by-path/platform-gameforce-gamepad-event-joystick\")\n#adc_joypad = evdev.InputDevice(\"/dev/input/by-path/platform-adc-keys-event\")\n\nneed_to_swallow_pwr_key = False # After a resume, we swallow the pwr input that triggered the resume\n\nclass Power:\n    pwr = 116\n\nclass Joypad:\n    l1 = 310\n    r1 = 311\n\n    up = 544\n    down = 545\n    left = 546\n    right = 547\n\n    #hotkey = 706\n    hotkey = 704\n    \n #   volup = 704\n #   voldown = 705\n\ndef runcmd(cmd, *args, **kw):\n    print(f\">>> {cmd}\")\n    check_output(cmd, *args, **kw)\n\nasync def handle_event(device):\n    async for event in device.async_read_loop():\n        global need_to_swallow_pwr_key\n        if device.name == \"rk8xx_pwrkey\":\n            keys = gameforce_joypad.active_keys()\n            if event.value == 1 and event.code == Power.pwr: # pwr on release\n                if need_to_swallow_pwr_key == False:\n                    need_to_swallow_pwr_key = True\n                    if Joypad.hotkey in keys:\n                        runcmd(\"/bin/systemctl poweroff || true\", shell=True)\n                    else:\n                        runcmd(\"/bin/systemctl suspend || true\", shell=True)\n                else:\n                    need_to_swallow_pwr_key = False\n\n\n        elif device.name.find('gameforce') != -1:\n            keys = gameforce_joypad.active_keys()\n            print(keys)\n            if event.value == 1 and Joypad.hotkey in keys:\n                if event.code == Joypad.up:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh vol +\", shell=True)\n                elif event.code == Joypad.down:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh vol -\", shell=True)\n                elif event.code == Joypad.right:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh bright +\", shell=True)\n                elif event.code == Joypad.left:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh bright -\", shell=True)\n                elif event.code == Joypad.r1:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh toggleaudio\", shell=True)\n\n        if event.code != 0:\n            print(device.name, event)\n\n        time.sleep(0.001)\n\ndef run():\n    asyncio.ensure_future(handle_event(pwrkey))\n    asyncio.ensure_future(handle_event(gameforce_joypad))\n\n    loop = asyncio.get_event_loop()\n    loop.run_forever()\n\nif __name__ == \"__main__\": # admire\n    run()\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/packages/odroidgoa-utils/system.d/odroidgoa-headphones.service",
    "content": "[Unit]\nDescription=Odroid Go Advance Headphone Sense\nConditionPathExists=/dev/input/event1\nBefore=emuelec.target\n\n[Service]\nEnvironment=HOME=/storage\nEnvironmentFile=/storage/.config/emulationstation/scripts/es_env.sh\nExecStart=/usr/bin/headphone_sense.sh\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/packages/odroidgoa-utils/system.d/odroidgoa-hotkeys.service",
    "content": "[Unit]\nDescription=Odroid Go Advance Hotkeys\nConditionPathExists=/dev/input/event0\nConditionPathExists=/dev/input/event2\nBefore=emuelec.target\n\n[Service]\nEnvironment=HOME=/storage\nEnvironmentFile=/storage/.config/emulationstation/scripts/es_env.sh\nExecStart=/usr/bin/oga_events.py\nType=simple\n\n[Install]\nWantedBy=multi-user.target"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/packages/rkwifibt/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"rkwifibt\"\nPKG_VERSION=\"a389710ca130405a0e6e4f22bc0335c976a5c4b0\"\nPKG_SITE=\"https://github.com/shantigilbert/rkwifibt\"\nPKG_URL=\"$PKG_SITE.git\"\nPKG_LICENSE=\"Unspecified\"\nPKG_DEPENDS_TARGET=\"toolchain linux\"\nPKG_LONGDESC=\"rkwifibt\"\nPKG_NEED_UNPACK=\"$LINUX_DEPENDS\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_TOOLCHAIN=\"manual\"\n\nBT_TTY_DEV=\"ttyS1\"\nRKWIFIBT_TOOLCHAIN=${TOOLCHAIN}\nRKARCH=\"arm64\"\n\npre_make_target() {\n  unset LDFLAGS\n}\n\nmake_target() {\n    ${CC} -o ${PKG_BUILD}/brcm_tools/brcm_patchram_plus1 ${PKG_BUILD}/brcm_tools/brcm_patchram_plus1.c\n    ${CC} -o ${PKG_BUILD}/brcm_tools/dhd_priv ${PKG_BUILD}/brcm_tools/dhd_priv.c\n    ${CC} -o ${PKG_BUILD}/src/rk_wifi_init ${PKG_BUILD}/src/rk_wifi_init.c\n    make -C ${PKG_BUILD}/realtek/rtk_hciattach/ CC=${CC}\n\tmake -C $(kernel_path) M=${PKG_BUILD}/realtek/bluetooth_uart_driver ARCH=$TARGET_KERNEL_ARCH CROSS_COMPILE=$TARGET_KERNEL_PREFIX\n}\n\nmakeinstall_target() {\n\tmkdir -p $INSTALL/etc\n    cp -rf ${PKG_BUILD}/wpa_supplicant.conf ${INSTALL}/etc/\n    cp -rf ${PKG_BUILD}/dnsmasq.conf ${INSTALL}/etc/\n\n\tmkdir -p $INSTALL/usr/bin\n    cp -rf ${PKG_BUILD}/wifi_start.sh ${INSTALL}/usr/bin/\n    cp -rf ${PKG_BUILD}/src/rk_wifi_init ${INSTALL}/usr/bin/\n    cp -rf ${PKG_BUILD}/realtek/rtk_hciattach/rtk_hciattach ${INSTALL}/usr/bin/\n\n\tmkdir -p $INSTALL/$(get_full_firmware_dir)/RTL8723DS\n\tcp ${PKG_BUILD}/realtek/RTL8723DS/* $INSTALL/$(get_full_firmware_dir)/RTL8723DS/\n\n\tmkdir -p $INSTALL/$(get_full_module_dir)/RTL8723DS\n\tcp ${PKG_BUILD}/realtek/bluetooth_uart_driver/hci_uart.ko $INSTALL/$(get_full_module_dir)/RTL8723DS/\n#   $(kernel_path)/build.sh modules\n\t\n\t#kernel_make -C $(kernel_path) M=${PKG_BUILD}/realtek/bluetooth_uart_driver ARCH=$TARGET_KERNEL_ARCH CROSS_COMPILE=$TARGET_KERNEL_PREFIX \\\n    #INSTALL_MOD_PATH=$INSTALL/$(get_kernel_overlay_dir) INSTALL_MOD_STRIP=1 DEPMOD=: \\\n    #modules_install\n    \n    #find $(kernel_path)/drivers/net/wireless/rockchip_wlan/* -name *8723ds*.ko | xargs -n1 -i cp {} $INSTALL/$(get_full_module_dir)/$PKG_NAME\n    #usr/lib/kernel-overlays/base/lib/modules/4.4.189/kernel/drivers/net/wireless/rockchip_wlan/rtl8723ds\n    #cp *.ko $INSTALL/$(get_full_module_dir)/$PKG_NAME\n}\n\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/packages/uinput_joystick/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"uinput_joystick\"\nPKG_VERSION=\"bea7d56f4947b547db2b827640bc9966fe770f84\"\nPKG_SITE=\"https://github.com/shantigilbert/uinput_joystick\"\nPKG_URL=\"$PKG_SITE.git\"\nPKG_LICENSE=\"Apachev2+\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Rockchip uinput joystick for r602\"\nPKG_TOOLCHAIN=\"make\"\n\nmakeinstall_target() {\n\tmkdir -p $INSTALL/usr/bin/\n\tcp $PKG_BUILD/uinput_joystick $INSTALL/usr/bin/uinput_joystick\n\tcp $PKG_BUILD/fftest $INSTALL/usr/bin/fftest\n}\n\npost_install() {  \n\tenable_service uinput_joystick.service\n}\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/packages/uinput_joystick/system.d/uinput_joystick.service",
    "content": "[Unit]\nDescription=uinput_joystick\nBefore=emustation.service\nWants=emustation.service\n\n[Service]\nEnvironment=HOME=/storage\nExecStart=/usr/bin/uinput_joystick\nKillMode=process\nTimeoutStopSec=3\nRestart=always\nRestartSec=2\nStartLimitInterval=0\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/patches/lib32-retrorun/flycast_gameforce_chi_rotation_fix.patch",
    "content": "diff --git a/src/video.cpp b/src/video.cpp\nindex d168eda..66238ee 100755\n--- a/src/video.cpp\n+++ b/src/video.cpp\n@@ -763,7 +764,7 @@ void core_video_refresh(const void *data, unsigned width, unsigned height, size_\n\n         real_aspect_ratio = aspect_ratio;\n         _351BlitRotation = isTate ? GO2_ROTATION_DEGREES_270 : GO2_ROTATION_DEGREES_0;\n-        _351Rotation = isTate ? GO2_ROTATION_DEGREES_180 : GO2_ROTATION_DEGREES_270;\n+        _351Rotation = isTate ? GO2_ROTATION_DEGREES_270 : GO2_ROTATION_DEGREES_0; // test\n         first_video_refresh = false;\n     }\n     if (height != currentHeight || width != currentWidth)\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/patches/libgo2/libgo2-gameforce-gamepad.patch",
    "content": "--- a/src/input.c\n+++ b/src/input.c\n@@ -41,6 +41,7 @@\n \n static const char* EVDEV_NAME = \"/dev/input/by-path/platform-odroidgo2-joypad-event-joystick\";\n static const char* EVDEV_NAME_2 = \"/dev/input/by-path/platform-odroidgo3-joypad-event-joystick\";\n+static const char* EVDEV_NAME_3 = \"/dev/input/by-path/platform-gameforce-gamepad-event-joystick\";\n static const char* BATTERY_STATUS_NAME = \"/sys/class/power_supply/battery/status\";\n static const char* BATTERY_CAPACITY_NAME = \"/sys/class/power_supply/battery/capacity\";\n \n@@ -178,6 +179,9 @@\n     input->current_state.buttons[Go2InputButton_TopLeft] = libevdev_get_event_value(input->dev, EV_KEY, BTN_TL) ? ButtonState_Pressed : ButtonState_Released;\n     input->current_state.buttons[Go2InputButton_TopRight] = libevdev_get_event_value(input->dev, EV_KEY, BTN_TR) ? ButtonState_Pressed : ButtonState_Released;\n \n+    input->current_state.buttons[Go2InputButton_SELECT] = libevdev_get_event_value(input->dev, EV_KEY, BTN_SELECT) ? ButtonState_Pressed : ButtonState_Released;\n+    input->current_state.buttons[Go2InputButton_START] = libevdev_get_event_value(input->dev, EV_KEY, BTN_START) ? ButtonState_Pressed : ButtonState_Released;\n+\n     input->current_state.buttons[Go2InputButton_F1] = libevdev_get_event_value(input->dev, EV_KEY, BTN_TRIGGER_HAPPY1) ? ButtonState_Pressed : ButtonState_Released;\n     input->current_state.buttons[Go2InputButton_F2] = libevdev_get_event_value(input->dev, EV_KEY, BTN_TRIGGER_HAPPY2) ? ButtonState_Pressed : ButtonState_Released;\n     input->current_state.buttons[Go2InputButton_F3] = libevdev_get_event_value(input->dev, EV_KEY, BTN_TRIGGER_HAPPY3) ? ButtonState_Pressed : ButtonState_Released;\n@@ -188,11 +192,11 @@\n     input->current_state.buttons[Go2InputButton_TriggerLeft] = libevdev_get_event_value(input->dev, EV_KEY, BTN_TL2) ? ButtonState_Pressed : ButtonState_Released;\n     input->current_state.buttons[Go2InputButton_TriggerRight] = libevdev_get_event_value(input->dev, EV_KEY, BTN_TR2) ? ButtonState_Pressed : ButtonState_Released;\n \n-    input->current_state.thumbs[Go2InputThumbstick_Left].x = libevdev_get_event_value(input->dev, EV_ABS, ABS_X) / (float)abs_x_max;\n-    input->current_state.thumbs[Go2InputThumbstick_Left].y = libevdev_get_event_value(input->dev, EV_ABS, ABS_Y) / (float)abs_y_max;\n-\n-    input->current_state.thumbs[Go2InputThumbstick_Right].x = libevdev_get_event_value(input->dev, EV_ABS, ABS_RX) / (float)abs_rx_max;\n-    input->current_state.thumbs[Go2InputThumbstick_Right].y = libevdev_get_event_value(input->dev, EV_ABS, ABS_RY) / (float)abs_ry_max;\n+    input->current_state.thumbs[Go2InputThumbstick_Left].y = libevdev_get_event_value(input->dev, EV_ABS, ABS_X) / (float)abs_y_max;\n+    input->current_state.thumbs[Go2InputThumbstick_Left].x = libevdev_get_event_value(input->dev, EV_ABS, ABS_Y) / (float)abs_x_max;\n+\n+    input->current_state.thumbs[Go2InputThumbstick_Right].y = libevdev_get_event_value(input->dev, EV_ABS, ABS_RX) / (float)abs_ry_max;\n+    input->current_state.thumbs[Go2InputThumbstick_Right].x = libevdev_get_event_value(input->dev, EV_ABS, ABS_RY) / (float)abs_rx_max;\n \n \n     // Events\n@@ -249,6 +253,13 @@\n                         input->pending_state.buttons[Go2InputButton_TopRight] = state;\n                         break;\n \n+                    case BTN_SELECT:\n+                        input->pending_state.buttons[Go2InputButton_SELECT] = state;\n+                        break;                    \n+                    case BTN_START:          \n+                        input->pending_state.buttons[Go2InputButton_START] = state;\n+                        break;\n+\n                     case BTN_TRIGGER_HAPPY1:\n                         input->pending_state.buttons[Go2InputButton_F1] = state;\n                         break;\n@@ -282,17 +293,17 @@\n                 switch (ev.code)\n                 {\n                     case ABS_X:\n+                        input->pending_state.thumbs[Go2InputThumbstick_Left].y = ev.value / (float)abs_y_max;\n+                        break;\n+                    case ABS_Y:\n                         input->pending_state.thumbs[Go2InputThumbstick_Left].x = ev.value / (float)abs_x_max;\n                         break;\n-                    case ABS_Y:\n-                        input->pending_state.thumbs[Go2InputThumbstick_Left].y = ev.value / (float)abs_y_max;\n-                        break;\n \n                     case ABS_RX:\n+                        input->pending_state.thumbs[Go2InputThumbstick_Right].y = ev.value / (float)abs_ry_max;\n+                        break;\n+                    case ABS_RY:\n                         input->pending_state.thumbs[Go2InputThumbstick_Right].x = ev.value / (float)abs_rx_max;\n-                        break;\n-                    case ABS_RY:\n-                        input->pending_state.thumbs[Go2InputThumbstick_Right].y = ev.value / (float)abs_ry_max;\n                         break;\n                 }\n             }\n@@ -334,7 +345,11 @@\n         result->fd = open(EVDEV_NAME_2, O_RDONLY);\n         if (result->fd < 0)\n         {\n-            printf(\"Joystick: No gamepad found.\\n\");\n+            result->fd = open(EVDEV_NAME_3, O_RDONLY);\n+                if (result->fd < 0)\n+                {\n+                    printf(\"Joystick: No gamepad found.\\n\");\n+                }\n         }\n     }\n     \n@@ -401,8 +416,8 @@\n {\n     pthread_mutex_lock(&input->gamepadMutex);\n     \n-    outGamepadState->thumb.x = input->current_state.thumbs[Go2InputThumbstick_Left].x;\n-    outGamepadState->thumb.y = input->current_state.thumbs[Go2InputThumbstick_Left].y;\n+    outGamepadState->thumb.x = input->current_state.thumbs[Go2InputThumbstick_Left].y;\n+    outGamepadState->thumb.y = input->current_state.thumbs[Go2InputThumbstick_Left].x;\n \n     outGamepadState->dpad.up = input->current_state.buttons[Go2InputButton_DPadUp];\n     outGamepadState->dpad.down = input->current_state.buttons[Go2InputButton_DPadDown];\n@@ -416,6 +431,9 @@\n \n     outGamepadState->buttons.top_left = input->current_state.buttons[Go2InputButton_TopLeft];\n     outGamepadState->buttons.top_right = input->current_state.buttons[Go2InputButton_TopRight];\n+\n+    outGamepadState->buttons.select = input->current_state.buttons[Go2InputButton_SELECT];\n+    outGamepadState->buttons.start = input->current_state.buttons[Go2InputButton_START];\n \n     outGamepadState->buttons.f1 = input->current_state.buttons[Go2InputButton_F1];\n     outGamepadState->buttons.f2 = input->current_state.buttons[Go2InputButton_F2];\n--- a/src/input.h\n+++ b/src/input.h\n@@ -44,6 +44,9 @@\n \n     go2_button_state_t top_left;\n     go2_button_state_t top_right;\n+\n+    go2_button_state_t select;\n+    go2_button_state_t start;\n \n     go2_button_state_t f1;\n     go2_button_state_t f2;\n@@ -122,6 +125,8 @@\n     Go2InputButton_F4,\n     Go2InputButton_F5,\n     Go2InputButton_F6,\n+    Go2InputButton_SELECT,\n+    Go2InputButton_START,\n \n     Go2InputButton_TopLeft,\n     Go2InputButton_TopRight,\n"
  },
  {
    "path": "projects/Rockchip/devices/GameForce/patches/retrorun/flycast_gameforce_chi_rotation_fix.patch",
    "content": "diff --git a/src/video.cpp b/src/video.cpp\nindex d168eda..66238ee 100755\n--- a/src/video.cpp\n+++ b/src/video.cpp\n@@ -763,7 +764,7 @@ void core_video_refresh(const void *data, unsigned width, unsigned height, size_\n\n         real_aspect_ratio = aspect_ratio;\n         _351BlitRotation = isTate ? GO2_ROTATION_DEGREES_270 : GO2_ROTATION_DEGREES_0;\n-        _351Rotation = isTate ? GO2_ROTATION_DEGREES_180 : GO2_ROTATION_DEGREES_270;\n+        _351Rotation = isTate ? GO2_ROTATION_DEGREES_270 : GO2_ROTATION_DEGREES_0; // test\n         first_video_refresh = false;\n     }\n     if (height != currentHeight || width != currentWidth)\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/README.md",
    "content": "# OdroidGoAdvance\n\nThis is for Odroid Go Advance device using RK3326 SOC\n\n**Build**\n\n* `PROJECT=Rockchip DEVICE=OdroidGoAdvance ARCH=aarch64 make image`\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/bootloader/canupdate.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n# Allow upgrades between arm and aarch64\nif [ \"$1\" = \"@PROJECT@.arm\" -o \"$1\" = \"@PROJECT@.aarch64\" ]; then\n  exit 0\nelse\n  exit 1\nfi\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/bootloader/config",
    "content": "CONFIG_BOOTDELAY=1\n# CONFIG_EFI_LOADER is not set\nCONFIG_FIT=y\nCONFIG_FIT_SIGNATURE=n\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/bootloader/install",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_RKBIN=\"$(get_build_dir rkbin)\"\nPKG_SOC=$UBOOT_SYSTEM\n\nif [ \"$DEVICE\" = \"RK3328\" -o \"$DEVICE\" = \"RK3399\" ]; then\n  PKG_SOC=\"${DEVICE/RK/rk}\"\nfi\n\nif [ \"$DEVICE\" == \"OdroidGoAdvance\" ]; then\n  PKG_SOC=\"px30\"\nfi\n\ncase \"$PKG_SOC\" in\n  rk3036)\n    PKG_DATAFILE=\"spl/u-boot-spl-nodtb.bin\"\n    PKG_LOADER=\"u-boot-dtb.bin\"\n    ;;\n  rk3288)\n    PKG_DATAFILE=\"$PKG_RKBIN/rk32/rk3288_ddr_400MHz_v1.06.bin\"\n    PKG_LOADER=\"$PKG_RKBIN/rk32/rk3288_miniloader_v2.36.bin\"\n    PKG_LOAD_ADDR=\"0x0\"\n    ;;\n  px30)\n    PKG_DATAFILE=\"$PKG_RKBIN/bin/rk33/rk3326_ddr_333MHz_v1.14.bin\"\n    PKG_LOADER=\"$PKG_RKBIN/bin/rk33/rk3326_miniloader_v1.20.bin\"\n    PKG_BL31=\"$PKG_RKBIN/bin/rk33/rk3326_bl31_v1.18.elf\"\n    PKG_BL32=\"$PKG_RKBIN/bin/rk33/rk3326_bl32_v1.13.bin\"\n    PKG_LOAD_ADDR=\"0x00200000\"\n    ;;\n  rk3328)\n    PKG_DATAFILE=\"$PKG_RKBIN/rk33/rk3328_ddr_786MHz_v1.13.bin\"\n    PKG_LOADER=\"$PKG_RKBIN/rk33/rk3328_miniloader_v2.49.bin\"\n    PKG_BL31=\"$PKG_RKBIN/rk33/rk3328_bl31_v1.40.elf\"\n    PKG_LOAD_ADDR=\"0x200000\"\n    ;;\n  rk3399)\n    PKG_DATAFILE=\"$PKG_RKBIN/rk33/rk3399_ddr_800MHz_v1.17.bin\"\n    PKG_LOADER=\"$PKG_RKBIN/rk33/rk3399_miniloader_v1.15.bin\"\n    PKG_BL31=\"$PKG_RKBIN/rk33/rk3399_bl31_v1.24.elf\"\n    PKG_LOAD_ADDR=\"0x200000\"\n    ;;\n  *)\n    PKG_DATAFILE=\"spl/u-boot-spl-dtb.bin\"\n    PKG_LOADER=\"u-boot-dtb.bin\"\n    ;;\nesac\n\nif [ -n \"$PKG_DATAFILE\" -a -n \"$PKG_LOADER\" ]; then\n  tools/mkimage -n $PKG_SOC -T rksd -d \"$PKG_DATAFILE\" idbloader.img\n  cat \"$PKG_LOADER\" >> idbloader.img\n  cp -av idbloader.img $INSTALL/usr/share/bootloader\nfi\n\nif [ -n \"$PKG_LOAD_ADDR\" ]; then\n  $PKG_RKBIN/tools/loaderimage --pack --uboot u-boot-dtb.bin uboot.img $PKG_LOAD_ADDR\n  cp -av uboot.img $INSTALL/usr/share/bootloader\nfi\n\n\nif [ $DEVICE = \"OdroidGoAdvance\" ]; then\nif [ -n \"$PKG_BL31\" ]; then\n  cat >trust.ini <<EOF\n[VERSION]\nMAJOR=1\nMINOR=0\n[BL30_OPTION]\nSEC=0\n[BL31_OPTION]\nSEC=1\nPATH=$PKG_BL31\nADDR=0x00010000\n[BL32_OPTION]\nSEC=1\nPATH=$PKG_BL32\nADDR=0x08400000\n[BL33_OPTION]\nSEC=0\n[OUTPUT]\nPATH=trust.img\nEOF\n  $PKG_RKBIN/tools/trust_merger --rsa 3 --verbose trust.ini\n  cp -av trust.img $INSTALL/usr/share/bootloader\nfi\n\nelse\n\nif [ -n \"$PKG_BL31\" ]; then\n  cat >trust.ini <<EOF\n[BL30_OPTION]\nSEC=0\n[BL31_OPTION]\nSEC=1\nPATH=$PKG_BL31\nADDR=0x00010000\n[BL32_OPTION]\nSEC=0\n[BL33_OPTION]\nSEC=0\n[OUTPUT]\nPATH=trust.img\nEOF\n  $PKG_RKBIN/tools/trust_merger --verbose trust.ini\n  cp -av trust.img $INSTALL/usr/share/bootloader\nfi\n\nfi\n\nLE_TMP=$(mktemp -d)\nmkdir -p \"${LE_TMP}/extlinux\" \nmkdir -p $INSTALL/usr/share/bootloader/extlinux\n\nLINUX_DTS_DIR=$(get_build_dir linux)/.install_pkg/usr/share/bootloader\n  for dtb in $LINUX_DTS_DIR/*.dtb; do\n  \nif [ ! -f $dtb ]; then\n continue\nfi\n  \ncat << EOF > \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDT /$(basename ${dtb})\n  APPEND boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@ quiet ${EXTRA_CMDLINE}\nEOF\n\ncp -a \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\" $INSTALL/usr/share/bootloader/extlinux\ndone\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/bootloader/mkimage",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/idbloader.img\" ]; then\n  echo \"image: burn idbloader.img to image...\"\n  dd if=\"$RELEASE_DIR/3rdparty/bootloader/idbloader.img\" of=\"$DISK\" bs=32k seek=1 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\nfi\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/uboot.img\" ]; then\n  echo \"image: burn uboot.img to image...\"\n  dd if=\"$RELEASE_DIR/3rdparty/bootloader/uboot.img\" of=\"$DISK\" bs=64k seek=128 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\nfi\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/trust.img\" ]; then\n  echo \"image: burn trust.img to image...\"\n  dd if=\"$RELEASE_DIR/3rdparty/bootloader/trust.img\" of=\"$DISK\" bs=64k seek=192 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\nfi\n\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/boot.ini\" ]; then\necho \"image: copying boot.ini to root\"\nmcopy \"$RELEASE_DIR/3rdparty/bootloader/boot.ini\" ::\nfi\n\nmkdir -p \"${LE_TMP}/extlinux\"\n\n# copy device trees to part1\nfor dtb in $RELEASE_DIR/3rdparty/bootloader/*.dtb; do\n\nif [ ! -f $dtb ]; then\n continue\nfi\n\ncat << EOF > \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDT /$(basename ${dtb})\n  APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}\nEOF\n\n  [ -e \"$dtb\" ] && mcopy -o \"$dtb\" ::\ndone\n\n mcopy -so \"${LE_TMP}/extlinux\" ::\n\n\n\n\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/bootloader/release",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nmkdir -p $RELEASE_DIR/3rdparty/bootloader\n  if [ -n \"$UBOOT_SYSTEM\" ]; then\n    BOOTLOADER_DIR=$(get_build_dir $BOOTLOADER)\n    if [ -f $BOOTLOADER_DIR/idbloader.img ]; then\n      cp -a $BOOTLOADER_DIR/idbloader.img $RELEASE_DIR/3rdparty/bootloader\n    fi\n    if [ -f $BOOTLOADER_DIR/uboot.img ]; then\n      cp -a $BOOTLOADER_DIR/uboot.img $RELEASE_DIR/3rdparty/bootloader\n    fi\n    if [ -f $BOOTLOADER_DIR/trust.img ]; then\n      cp -a $BOOTLOADER_DIR/trust.img $RELEASE_DIR/3rdparty/bootloader\n    fi\n  fi\n  \n  if [ -f $INSTALL/usr/share/bootloader/boot.ini ]; then\n  cp -a $INSTALL/usr/share/bootloader/boot.ini $RELEASE_DIR/3rdparty/bootloader\n  fi\n \n  LINUX_DTS_DIR=$(get_build_dir linux)/arch/$TARGET_KERNEL_ARCH/boot/dts\n  for dtb in $LINUX_DTS_DIR/*.dtb $LINUX_DTS_DIR/*/*.dtb; do\n    if [ -f $dtb ]; then\n      cp -a $dtb $RELEASE_DIR/3rdparty/bootloader\n    fi\n  done\n  \nLE_TMP=$(mktemp -d)\nmkdir -p \"${LE_TMP}/extlinux\" \nmkdir -p $RELEASE_DIR/3rdparty/bootloader\n\nLINUX_DTS_DIR=$(get_build_dir linux)/.install_pkg/usr/share/bootloader\n  for dtb in $RELEASE_DIR/3rdparty/bootloader/*.dtb; do\n\nif [ ! -f $dtb ]; then\n continue\nfi\n\ncat << EOF > \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDT /$(basename ${dtb})\n  APPEND boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@ quiet ${EXTRA_CMDLINE}\nEOF\n\ncp -a \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\" $RELEASE_DIR/3rdparty/bootloader\ndone\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/bootloader/update.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n[ -z \"$SYSTEM_ROOT\" ] && SYSTEM_ROOT=\"\"\n[ -z \"$BOOT_ROOT\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"$BOOT_PART\" ] && BOOT_PART=$(df \"$BOOT_ROOT\" | tail -1 | awk {' print $1 '})\nif [ -z \"$BOOT_DISK\" ]; then\n  case $BOOT_PART in\n    /dev/sd[a-z][0-9]*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,[0-9]*,,g\")\n      ;;\n    /dev/mmcblk*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,p[0-9]*,,g\")\n      ;;\n  esac\nfi\n\n# mount $BOOT_ROOT r/w\n  mount -o remount,rw $BOOT_ROOT\n\n\nfor arg in $(cat /proc/cmdline); do\n  case $arg in\n    boot=*)\n      boot=\"${arg#*=}\"\n      case $boot in\n        /dev/mmc*)\n          BOOT_UUID=\"$(blkid $boot | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          BOOT_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" $boot \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n        FOLDER=*)\n          BOOT_UUID=\"$(blkid ${boot#*=} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n      esac\n    ;;\n    disk=*)\n      disk=\"${arg#*=}\"\n      case $disk in\n        /dev/mmc*)\n          DISK_UUID=\"$(blkid $disk | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          DISK_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" $disk \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n        FOLDER=*)\n          DISK_UUID=\"$(blkid ${disk#*=} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n      esac\n    ;;\n  esac\ndone\n\nCONFS=$SYSTEM_ROOT/usr/share/bootloader/extlinux/*.conf\n\nfor all_conf in $CONFS; do\n  conf=\"$(basename ${all_conf})\"\n  echo \"Updating ${conf}...\"\n  cp -p $SYSTEM_ROOT/usr/share/bootloader/extlinux/${conf} $BOOT_ROOT/extlinux/${conf}\n  sed -e \"s/@BOOT_UUID@/$BOOT_UUID/\" \\\n      -e \"s/@DISK_UUID@/$DISK_UUID/\" \\\n      -i $BOOT_ROOT/extlinux/${conf}\ndone\n\nif [ -f $SYSTEM_ROOT/usr/share/bootloader/boot.ini ]; then\n  echo \"Updating boot.ini...\"\n  cp -p $SYSTEM_ROOT/usr/share/bootloader/boot.ini $BOOT_ROOT/boot.ini\nfi\n\n# update device tree\n  for all_dtb in $SYSTEM_ROOT/usr/share/bootloader/*.dtb; do\n    dtb=$(basename $all_dtb)\n      echo -n \"Updating $dtb... \"\n      cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT\n      echo \"done\"\n  done\n\n# update bootloader\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/idbloader.img ]; then\n    echo -n \"Updating idbloader.img... \"\n    dd if=$SYSTEM_ROOT/usr/share/bootloader/idbloader.img of=$BOOT_DISK bs=32k seek=1 conv=fsync &>/dev/null\n    echo \"done\"\n  fi\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/uboot.img ]; then\n    echo -n \"Updating uboot.img... \"\n    dd if=$SYSTEM_ROOT/usr/share/bootloader/uboot.img of=$BOOT_DISK bs=64k seek=128 conv=fsync &>/dev/null\n    echo \"done\"\n  fi\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/trust.img ]; then\n    echo -n \"Updating trust.img... \"\n    dd if=$SYSTEM_ROOT/usr/share/bootloader/trust.img of=$BOOT_DISK bs=64k seek=192 conv=fsync &>/dev/null\n    echo \"done\"\n  fi\n\n# mount $BOOT_ROOT r/o\n  sync\n  mount -o remount,ro $BOOT_ROOT\n  \n# Leave a hint that we just did an update\necho \"UPDATE\" > /storage/.config/boot.hint\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/linux/odroid-go-a-4.4/linux.aarch64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm64 4.4.189 Kernel Configuration\n#\nCONFIG_ARM64=y\nCONFIG_64BIT=y\nCONFIG_ARCH_PHYS_ADDR_T_64BIT=y\nCONFIG_MMU=y\nCONFIG_ARCH_MMAP_RND_BITS_MIN=18\nCONFIG_ARCH_MMAP_RND_BITS_MAX=24\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_ARM64_PAGE_SHIFT=12\nCONFIG_ARM64_CONT_SHIFT=4\nCONFIG_NO_IOPORT_MAP=y\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_RWSEM_XCHGADD_ALGORITHM=y\nCONFIG_GENERIC_BUG=y\nCONFIG_GENERIC_BUG_RELATIVE_POINTERS=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CSUM=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ZONE_DMA=y\nCONFIG_HAVE_GENERIC_RCU_GUP=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_SMP=y\nCONFIG_SWIOTLB=y\nCONFIG_IOMMU_HELPER=y\nCONFIG_KERNEL_MODE_NEON=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_PGTABLE_LEVELS=3\nCONFIG_DEFCONFIG_LIST=\"/lib/modules/$UNAME_RELEASE/.config\"\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_EXTABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\nCONFIG_CROSS_COMPILE=\"\"\n# CONFIG_COMPILE_TEST is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SWAP=y\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\n# CONFIG_POSIX_MQUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\nCONFIG_FHANDLE=y\nCONFIG_USELIB=y\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_HANDLE_DOMAIN_IRQ=y\n# CONFIG_IRQ_DOMAIN_DEBUG is not set\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\n# CONFIG_SCHED_WALT is not set\n# CONFIG_BSD_PROCESS_ACCT is not set\n# CONFIG_TASKSTATS is not set\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\n# CONFIG_TASKS_RCU is not set\nCONFIG_RCU_STALL_COMMON=y\n# CONFIG_TREE_RCU_TRACE is not set\n# CONFIG_RCU_EXPEDITE_BOOT is not set\n# CONFIG_BUILD_BIN2C is not set\n# CONFIG_IKCONFIG is not set\nCONFIG_LOG_BUF_SHIFT=18\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_GENERIC_SCHED_CLOCK=y\nCONFIG_CGROUPS=y\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_CGROUP_FREEZER=y\n# CONFIG_CGROUP_PIDS is not set\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_CPUACCT=y\n# CONFIG_MEMCG is not set\n# CONFIG_CGROUP_PERF is not set\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\n# CONFIG_BLK_CGROUP is not set\n# CONFIG_CHECKPOINT_RESTORE is not set\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_SCHED_AUTOGROUP is not set\n# CONFIG_SCHED_TUNE is not set\nCONFIG_DEFAULT_USE_ENERGY_AWARE=y\n# CONFIG_SYSFS_DEPRECATED is not set\nCONFIG_RELAY=y\nCONFIG_BLK_DEV_INITRD=y\n# CONFIG_INITRD_ASYNC is not set\nCONFIG_INITRAMFS_SOURCE=\" \"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\nCONFIG_RD_GZIP=y\nCONFIG_RD_BZIP2=y\nCONFIG_RD_LZMA=y\nCONFIG_RD_XZ=y\nCONFIG_RD_LZO=y\nCONFIG_RD_LZ4=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_SYSCTL=y\nCONFIG_ANON_INODES=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\nCONFIG_BPF=y\nCONFIG_EXPERT=y\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\n# CONFIG_SGETMASK_SYSCALL is not set\nCONFIG_SYSFS_SYSCALL=y\n# CONFIG_SYSCTL_SYSCALL is not set\nCONFIG_KALLSYMS=y\n# CONFIG_KALLSYMS_ALL is not set\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\n# CONFIG_BPF_SYSCALL is not set\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_ADVISE_SYSCALLS=y\n# CONFIG_USERFAULTFD is not set\nCONFIG_MEMBARRIER=y\nCONFIG_EMBEDDED=y\nCONFIG_HAVE_PERF_EVENTS=y\nCONFIG_PERF_USE_VMALLOC=y\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\nCONFIG_VM_EVENT_COUNTERS=y\nCONFIG_SLUB_DEBUG=y\nCONFIG_COMPAT_BRK=y\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# CONFIG_SYSTEM_DATA_VERIFICATION is not set\nCONFIG_PROFILING=y\nCONFIG_TRACEPOINTS=y\n# CONFIG_KPROBES is not set\nCONFIG_JUMP_LABEL=y\n# CONFIG_STATIC_KEYS_SELFTEST is not set\n# CONFIG_UPROBES is not set\n# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_ATTRS=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_DMA_API_DEBUG=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_HAVE_RCU_TABLE_FREE=y\nCONFIG_HAVE_ALIGNED_STRUCT_PAGE=y\nCONFIG_HAVE_CMPXCHG_LOCAL=y\nCONFIG_HAVE_CMPXCHG_DOUBLE=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP_FILTER=y\nCONFIG_HAVE_CC_STACKPROTECTOR=y\n# CONFIG_CC_STACKPROTECTOR is not set\nCONFIG_CC_STACKPROTECTOR_NONE=y\n# CONFIG_CC_STACKPROTECTOR_REGULAR is not set\n# CONFIG_CC_STACKPROTECTOR_STRONG is not set\nCONFIG_HAVE_CONTEXT_TRACKING=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_HAVE_ARCH_HUGE_VMAP=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_ARCH_MMAP_RND_BITS=18\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=11\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\nCONFIG_HAVE_GENERIC_DMA_COHERENT=y\nCONFIG_SLABINFO=y\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\nCONFIG_MODULE_FORCE_LOAD=y\nCONFIG_MODULE_UNLOAD=y\nCONFIG_MODULE_FORCE_UNLOAD=y\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\n# CONFIG_MODULE_COMPRESS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_BLK_DEV_BSGLIB is not set\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_CMDLINE_PARSER is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\n# CONFIG_MAC_PARTITION is not set\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\n# CONFIG_LDM_PARTITION is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\nCONFIG_RK_PARTITION=y\n# CONFIG_CMDLINE_PARTITION is not set\nCONFIG_BLOCK_COMPAT=y\n\n#\n# IO Schedulers\n#\nCONFIG_IOSCHED_NOOP=y\nCONFIG_IOSCHED_DEADLINE=y\nCONFIG_IOSCHED_CFQ=y\n# CONFIG_DEFAULT_DEADLINE is not set\nCONFIG_DEFAULT_CFQ=y\n# CONFIG_DEFAULT_NOOP is not set\nCONFIG_DEFAULT_IOSCHED=\"cfq\"\nCONFIG_PREEMPT_NOTIFIERS=y\nCONFIG_ASN1=y\nCONFIG_UNINLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_FREEZER=y\n\n#\n# Platform selection\n#\n# CONFIG_ARCH_BCM_IPROC is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_EXYNOS7 is not set\n# CONFIG_ARCH_LAYERSCAPE is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_QCOM is not set\nCONFIG_ARCH_ROCKCHIP=y\nCONFIG_ARCH_ROCKCHIP_ODROIDGOA=y\n# CONFIG_ARCH_SEATTLE is not set\n# CONFIG_ARCH_STRATIX10 is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_SPRD is not set\n# CONFIG_ARCH_THUNDER is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_XGENE is not set\n# CONFIG_ARCH_ZYNQMP is not set\n\n#\n# Bus support\n#\n# CONFIG_PCI is not set\n# CONFIG_PCI_DOMAINS is not set\n# CONFIG_PCI_DOMAINS_GENERIC is not set\n# CONFIG_PCI_SYSCALL is not set\n\n#\n# Kernel Features\n#\n\n#\n# ARM errata workarounds via the alternatives framework\n#\n# CONFIG_ARM64_ERRATUM_826319 is not set\n# CONFIG_ARM64_ERRATUM_827319 is not set\n# CONFIG_ARM64_ERRATUM_824069 is not set\n# CONFIG_ARM64_ERRATUM_819472 is not set\n# CONFIG_ARM64_ERRATUM_832075 is not set\nCONFIG_ARM64_ERRATUM_834220=y\nCONFIG_ARM64_ERRATUM_845719=y\nCONFIG_ARM64_ERRATUM_843419=y\n# CONFIG_ARM64_ERRATUM_1024718 is not set\n# CONFIG_CAVIUM_ERRATUM_22375 is not set\n# CONFIG_CAVIUM_ERRATUM_23154 is not set\nCONFIG_CAVIUM_ERRATUM_27456=y\nCONFIG_ARM64_4K_PAGES=y\n# CONFIG_ARM64_16K_PAGES is not set\n# CONFIG_ARM64_64K_PAGES is not set\nCONFIG_ARM64_VA_BITS_39=y\n# CONFIG_ARM64_VA_BITS_48 is not set\nCONFIG_ARM64_VA_BITS=39\n# CONFIG_CPU_BIG_ENDIAN is not set\nCONFIG_SCHED_MC=y\n# CONFIG_SCHED_SMT is not set\nCONFIG_NR_CPUS=4\nCONFIG_HOTPLUG_CPU=y\n# CONFIG_PREEMPT_NONE is not set\nCONFIG_PREEMPT_VOLUNTARY=y\n# CONFIG_PREEMPT is not set\n# CONFIG_HZ_100 is not set\n# CONFIG_HZ_250 is not set\nCONFIG_HZ_300=y\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=300\nCONFIG_SCHED_HRTICK=y\nCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y\nCONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_ARCH_SPARSEMEM_DEFAULT=y\nCONFIG_ARCH_SELECT_MEMORY_MODEL=y\nCONFIG_HAVE_ARCH_PFN_VALID=y\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_SYS_SUPPORTS_HUGETLBFS=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_ARCH_HAS_CACHE_LINE_SIZE=y\nCONFIG_SELECT_MEMORY_MODEL=y\nCONFIG_SPARSEMEM_MANUAL=y\nCONFIG_SPARSEMEM=y\nCONFIG_HAVE_MEMORY_PRESENT=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_MEMBLOCK=y\nCONFIG_NO_BOOTMEM=y\n# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_COMPACTION=y\nCONFIG_MIGRATION=y\nCONFIG_PHYS_ADDR_T_64BIT=y\nCONFIG_ZONE_DMA_FLAG=1\nCONFIG_BOUNCE=y\nCONFIG_MMU_NOTIFIER=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=32768\n# CONFIG_TRANSPARENT_HUGEPAGE is not set\n# CONFIG_CLEANCACHE is not set\n# CONFIG_FRONTSWAP is not set\n# CONFIG_CMA is not set\n# CONFIG_ZPOOL is not set\n# CONFIG_ZBUD is not set\nCONFIG_ZSMALLOC=y\n# CONFIG_PGTABLE_MAPPING is not set\n# CONFIG_ZSMALLOC_STAT is not set\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_FRAME_VECTOR=y\nCONFIG_SECCOMP=y\n# CONFIG_KEXEC is not set\n# CONFIG_CRASH_DUMP is not set\n# CONFIG_XEN is not set\nCONFIG_FORCE_MAX_ZONEORDER=11\nCONFIG_UNMAP_KERNEL_AT_EL0=y\nCONFIG_ARMV8_DEPRECATED=y\nCONFIG_SWP_EMULATION=y\nCONFIG_CP15_BARRIER_EMULATION=y\nCONFIG_SETEND_EMULATION=y\n# CONFIG_ARM64_SW_TTBR0_PAN is not set\n\n#\n# ARMv8.1 architectural features\n#\nCONFIG_ARM64_HW_AFDBM=y\nCONFIG_ARM64_PAN=y\nCONFIG_ARM64_LSE_ATOMICS=y\nCONFIG_ARM64_UAO=y\nCONFIG_ARM64_MODULE_CMODEL_LARGE=y\n# CONFIG_RANDOMIZE_BASE is not set\n\n#\n# Boot options\n#\nCONFIG_CMDLINE=\"\"\n# CONFIG_EFI is not set\n# CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE is not set\n\n#\n# Userspace binary formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\n# CONFIG_HAVE_AOUT is not set\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\nCONFIG_COMPAT=y\nCONFIG_SYSVIPC_COMPAT=y\nCONFIG_KEYS_COMPAT=y\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_SUSPEND_SKIP_SYNC is not set\nCONFIG_HAS_WAKELOCK=y\nCONFIG_WAKELOCK=y\nCONFIG_HIBERNATE_CALLBACKS=y\nCONFIG_HIBERNATION=y\nCONFIG_PM_STD_PARTITION=\"\"\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\nCONFIG_PM=y\nCONFIG_PM_DEBUG=y\nCONFIG_PM_ADVANCED_DEBUG=y\n# CONFIG_PM_TEST_SUSPEND is not set\nCONFIG_PM_SLEEP_DEBUG=y\n# CONFIG_DPM_WATCHDOG is not set\nCONFIG_PM_OPP=y\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\nCONFIG_WQ_POWER_EFFICIENT_DEFAULT=y\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARCH_HIBERNATION_HEADER=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\nCONFIG_CPU_IDLE_GOV_LADDER=y\nCONFIG_CPU_IDLE_GOV_MENU=y\nCONFIG_DT_IDLE_STATES=y\n\n#\n# ARM CPU Idle Drivers\n#\nCONFIG_ARM_CPUIDLE=y\n# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_STAT_DETAILS is not set\n# CONFIG_CPU_FREQ_TIMES is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=y\nCONFIG_CPU_FREQ_GOV_USERSPACE=y\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\nCONFIG_CPU_FREQ_GOV_INTERACTIVE=y\n# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\nCONFIG_CPU_FREQ_GOV_SCHEDUTIL=y\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\n# CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set\n# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set\nCONFIG_ARM_ROCKCHIP_CPUFREQ=y\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\nCONFIG_NET_INGRESS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\nCONFIG_PACKET_DIAG=y\nCONFIG_UNIX=y\nCONFIG_UNIX_DIAG=y\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_SUB_POLICY is not set\nCONFIG_XFRM_MIGRATE=y\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_XFRM_IPCOMP=m\nCONFIG_NET_KEY=m\nCONFIG_NET_KEY_MIGRATE=y\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\nCONFIG_IP_FIB_TRIE_STATS=y\nCONFIG_IP_MULTIPLE_TABLES=y\nCONFIG_IP_ROUTE_MULTIPATH=y\nCONFIG_IP_ROUTE_VERBOSE=y\nCONFIG_IP_ROUTE_CLASSID=y\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\nCONFIG_IP_PNP_RARP=y\nCONFIG_NET_IPIP=m\nCONFIG_NET_IPGRE_DEMUX=m\nCONFIG_NET_IP_TUNNEL=m\nCONFIG_NET_IPGRE=m\nCONFIG_NET_IPGRE_BROADCAST=y\nCONFIG_IP_MROUTE=y\nCONFIG_IP_MROUTE_MULTIPLE_TABLES=y\nCONFIG_IP_PIMSM_V1=y\nCONFIG_IP_PIMSM_V2=y\nCONFIG_SYN_COOKIES=y\nCONFIG_NET_IPVTI=m\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\nCONFIG_INET_AH=m\nCONFIG_INET_ESP=m\nCONFIG_INET_IPCOMP=m\nCONFIG_INET_XFRM_TUNNEL=m\nCONFIG_INET_TUNNEL=m\nCONFIG_INET_XFRM_MODE_TRANSPORT=m\nCONFIG_INET_XFRM_MODE_TUNNEL=m\nCONFIG_INET_XFRM_MODE_BEET=m\nCONFIG_INET_LRO=m\nCONFIG_INET_DIAG=m\nCONFIG_INET_TCP_DIAG=m\nCONFIG_INET_UDP_DIAG=m\nCONFIG_INET_DIAG_DESTROY=y\nCONFIG_TCP_CONG_ADVANCED=y\nCONFIG_TCP_CONG_BIC=m\nCONFIG_TCP_CONG_CUBIC=m\nCONFIG_TCP_CONG_WESTWOOD=m\nCONFIG_TCP_CONG_HTCP=m\nCONFIG_TCP_CONG_HSTCP=m\nCONFIG_TCP_CONG_HYBLA=m\nCONFIG_TCP_CONG_VEGAS=m\nCONFIG_TCP_CONG_SCALABLE=m\nCONFIG_TCP_CONG_LP=m\nCONFIG_TCP_CONG_VENO=m\nCONFIG_TCP_CONG_YEAH=m\nCONFIG_TCP_CONG_ILLINOIS=m\nCONFIG_TCP_CONG_DCTCP=m\nCONFIG_TCP_CONG_CDG=m\nCONFIG_DEFAULT_RENO=y\nCONFIG_DEFAULT_TCP_CONG=\"reno\"\nCONFIG_TCP_MD5SIG=y\nCONFIG_IPV6=m\nCONFIG_IPV6_ROUTER_PREF=y\nCONFIG_IPV6_ROUTE_INFO=y\nCONFIG_IPV6_OPTIMISTIC_DAD=y\nCONFIG_INET6_AH=m\nCONFIG_INET6_ESP=m\nCONFIG_INET6_IPCOMP=m\nCONFIG_IPV6_MIP6=m\nCONFIG_IPV6_ILA=m\nCONFIG_INET6_XFRM_TUNNEL=m\nCONFIG_INET6_TUNNEL=m\nCONFIG_INET6_XFRM_MODE_TRANSPORT=m\nCONFIG_INET6_XFRM_MODE_TUNNEL=m\nCONFIG_INET6_XFRM_MODE_BEET=m\nCONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m\nCONFIG_IPV6_VTI=m\nCONFIG_IPV6_SIT=m\nCONFIG_IPV6_SIT_6RD=y\nCONFIG_IPV6_NDISC_NODETYPE=y\nCONFIG_IPV6_TUNNEL=m\nCONFIG_IPV6_GRE=m\nCONFIG_IPV6_MULTIPLE_TABLES=y\nCONFIG_IPV6_SUBTREES=y\nCONFIG_IPV6_MROUTE=y\nCONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y\nCONFIG_IPV6_PIMSM_V2=y\n# CONFIG_ANDROID_PARANOID_NETWORK is not set\nCONFIG_NETWORK_SECMARK=y\nCONFIG_NET_PTP_CLASSIFY=y\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_DEBUG=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\nCONFIG_NETFILTER_NETLINK=m\nCONFIG_NETFILTER_NETLINK_ACCT=m\nCONFIG_NETFILTER_NETLINK_QUEUE=m\nCONFIG_NETFILTER_NETLINK_LOG=m\nCONFIG_NF_CONNTRACK=m\nCONFIG_NF_LOG_COMMON=m\nCONFIG_NF_CONNTRACK_MARK=y\nCONFIG_NF_CONNTRACK_SECMARK=y\n# CONFIG_NF_CONNTRACK_ZONES is not set\nCONFIG_NF_CONNTRACK_PROCFS=y\nCONFIG_NF_CONNTRACK_EVENTS=y\nCONFIG_NF_CONNTRACK_TIMEOUT=y\nCONFIG_NF_CONNTRACK_TIMESTAMP=y\nCONFIG_NF_CONNTRACK_LABELS=y\nCONFIG_NF_CT_PROTO_DCCP=m\nCONFIG_NF_CT_PROTO_GRE=m\nCONFIG_NF_CT_PROTO_SCTP=m\nCONFIG_NF_CT_PROTO_UDPLITE=m\nCONFIG_NF_CONNTRACK_AMANDA=m\nCONFIG_NF_CONNTRACK_FTP=m\nCONFIG_NF_CONNTRACK_H323=m\nCONFIG_NF_CONNTRACK_IRC=m\nCONFIG_NF_CONNTRACK_BROADCAST=m\nCONFIG_NF_CONNTRACK_NETBIOS_NS=m\nCONFIG_NF_CONNTRACK_SNMP=m\nCONFIG_NF_CONNTRACK_PPTP=m\nCONFIG_NF_CONNTRACK_SANE=m\nCONFIG_NF_CONNTRACK_SIP=m\nCONFIG_NF_CONNTRACK_TFTP=m\nCONFIG_NF_CT_NETLINK=m\nCONFIG_NF_CT_NETLINK_TIMEOUT=m\nCONFIG_NF_CT_NETLINK_HELPER=m\nCONFIG_NETFILTER_NETLINK_GLUE_CT=y\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_NEEDED=y\nCONFIG_NF_NAT_PROTO_DCCP=m\nCONFIG_NF_NAT_PROTO_UDPLITE=m\nCONFIG_NF_NAT_PROTO_SCTP=m\nCONFIG_NF_NAT_AMANDA=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_IRC=m\nCONFIG_NF_NAT_SIP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=m\nCONFIG_NETFILTER_SYNPROXY=m\nCONFIG_NF_TABLES=m\nCONFIG_NF_TABLES_INET=m\nCONFIG_NF_TABLES_NETDEV=m\nCONFIG_NFT_EXTHDR=m\nCONFIG_NFT_META=m\nCONFIG_NFT_CT=m\nCONFIG_NFT_RBTREE=m\nCONFIG_NFT_HASH=m\nCONFIG_NFT_COUNTER=m\nCONFIG_NFT_LOG=m\nCONFIG_NFT_LIMIT=m\nCONFIG_NFT_MASQ=m\nCONFIG_NFT_REDIR=m\nCONFIG_NFT_NAT=m\nCONFIG_NFT_QUEUE=m\nCONFIG_NFT_REJECT=m\nCONFIG_NFT_REJECT_INET=m\nCONFIG_NFT_COMPAT=m\nCONFIG_NETFILTER_XTABLES=m\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\nCONFIG_NETFILTER_XT_CONNMARK=m\nCONFIG_NETFILTER_XT_SET=m\n\n#\n# Xtables targets\n#\nCONFIG_NETFILTER_XT_TARGET_CHECKSUM=m\nCONFIG_NETFILTER_XT_TARGET_CLASSIFY=m\nCONFIG_NETFILTER_XT_TARGET_CONNMARK=m\nCONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m\nCONFIG_NETFILTER_XT_TARGET_CT=m\nCONFIG_NETFILTER_XT_TARGET_DSCP=m\nCONFIG_NETFILTER_XT_TARGET_HL=m\nCONFIG_NETFILTER_XT_TARGET_HMARK=m\nCONFIG_NETFILTER_XT_TARGET_IDLETIMER=m\nCONFIG_NETFILTER_XT_TARGET_LED=m\nCONFIG_NETFILTER_XT_TARGET_LOG=m\nCONFIG_NETFILTER_XT_TARGET_MARK=m\nCONFIG_NETFILTER_XT_NAT=m\nCONFIG_NETFILTER_XT_TARGET_NETMAP=m\nCONFIG_NETFILTER_XT_TARGET_NFLOG=m\nCONFIG_NETFILTER_XT_TARGET_NFQUEUE=m\nCONFIG_NETFILTER_XT_TARGET_NOTRACK=m\nCONFIG_NETFILTER_XT_TARGET_RATEEST=m\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_TEE=m\nCONFIG_NETFILTER_XT_TARGET_TPROXY=m\nCONFIG_NETFILTER_XT_TARGET_TRACE=m\nCONFIG_NETFILTER_XT_TARGET_SECMARK=m\nCONFIG_NETFILTER_XT_TARGET_TCPMSS=m\nCONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\nCONFIG_NETFILTER_XT_MATCH_BPF=m\nCONFIG_NETFILTER_XT_MATCH_CGROUP=m\nCONFIG_NETFILTER_XT_MATCH_CLUSTER=m\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\nCONFIG_NETFILTER_XT_MATCH_CONNBYTES=m\nCONFIG_NETFILTER_XT_MATCH_CONNLABEL=m\nCONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m\nCONFIG_NETFILTER_XT_MATCH_CONNMARK=m\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\nCONFIG_NETFILTER_XT_MATCH_CPU=m\nCONFIG_NETFILTER_XT_MATCH_DCCP=m\nCONFIG_NETFILTER_XT_MATCH_DEVGROUP=m\nCONFIG_NETFILTER_XT_MATCH_DSCP=m\nCONFIG_NETFILTER_XT_MATCH_ECN=m\nCONFIG_NETFILTER_XT_MATCH_ESP=m\nCONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m\nCONFIG_NETFILTER_XT_MATCH_HELPER=m\nCONFIG_NETFILTER_XT_MATCH_HL=m\nCONFIG_NETFILTER_XT_MATCH_IPCOMP=m\nCONFIG_NETFILTER_XT_MATCH_IPRANGE=m\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\nCONFIG_NETFILTER_XT_MATCH_L2TP=m\nCONFIG_NETFILTER_XT_MATCH_LENGTH=m\nCONFIG_NETFILTER_XT_MATCH_LIMIT=m\nCONFIG_NETFILTER_XT_MATCH_MAC=m\nCONFIG_NETFILTER_XT_MATCH_MARK=m\nCONFIG_NETFILTER_XT_MATCH_MULTIPORT=m\nCONFIG_NETFILTER_XT_MATCH_NFACCT=m\nCONFIG_NETFILTER_XT_MATCH_OSF=m\nCONFIG_NETFILTER_XT_MATCH_OWNER=m\nCONFIG_NETFILTER_XT_MATCH_POLICY=m\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\nCONFIG_NETFILTER_XT_MATCH_PKTTYPE=m\nCONFIG_NETFILTER_XT_MATCH_QUOTA=m\nCONFIG_NETFILTER_XT_MATCH_QUOTA2=m\nCONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG=y\nCONFIG_NETFILTER_XT_MATCH_RATEEST=m\nCONFIG_NETFILTER_XT_MATCH_REALM=m\nCONFIG_NETFILTER_XT_MATCH_RECENT=m\nCONFIG_NETFILTER_XT_MATCH_SCTP=m\nCONFIG_NETFILTER_XT_MATCH_SOCKET=m\nCONFIG_NETFILTER_XT_MATCH_STATE=m\nCONFIG_NETFILTER_XT_MATCH_STATISTIC=m\nCONFIG_NETFILTER_XT_MATCH_STRING=m\nCONFIG_NETFILTER_XT_MATCH_TCPMSS=m\nCONFIG_NETFILTER_XT_MATCH_TIME=m\nCONFIG_NETFILTER_XT_MATCH_U32=m\nCONFIG_IP_SET=m\nCONFIG_IP_SET_MAX=256\nCONFIG_IP_SET_BITMAP_IP=m\nCONFIG_IP_SET_BITMAP_IPMAC=m\nCONFIG_IP_SET_BITMAP_PORT=m\nCONFIG_IP_SET_HASH_IP=m\nCONFIG_IP_SET_HASH_IPMARK=m\nCONFIG_IP_SET_HASH_IPPORT=m\nCONFIG_IP_SET_HASH_IPPORTIP=m\nCONFIG_IP_SET_HASH_IPPORTNET=m\nCONFIG_IP_SET_HASH_MAC=m\nCONFIG_IP_SET_HASH_NETPORTNET=m\nCONFIG_IP_SET_HASH_NET=m\nCONFIG_IP_SET_HASH_NETNET=m\nCONFIG_IP_SET_HASH_NETPORT=m\nCONFIG_IP_SET_HASH_NETIFACE=m\nCONFIG_IP_SET_LIST_SET=m\nCONFIG_IP_VS=m\nCONFIG_IP_VS_IPV6=y\nCONFIG_IP_VS_DEBUG=y\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\nCONFIG_IP_VS_PROTO_AH_ESP=y\nCONFIG_IP_VS_PROTO_ESP=y\nCONFIG_IP_VS_PROTO_AH=y\nCONFIG_IP_VS_PROTO_SCTP=y\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\nCONFIG_IP_VS_WRR=m\nCONFIG_IP_VS_LC=m\nCONFIG_IP_VS_WLC=m\nCONFIG_IP_VS_FO=m\nCONFIG_IP_VS_OVF=m\nCONFIG_IP_VS_LBLC=m\nCONFIG_IP_VS_LBLCR=m\nCONFIG_IP_VS_DH=m\nCONFIG_IP_VS_SH=m\nCONFIG_IP_VS_SED=m\nCONFIG_IP_VS_NQ=m\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS application helper\n#\nCONFIG_IP_VS_FTP=m\nCONFIG_IP_VS_NFCT=y\nCONFIG_IP_VS_PE_SIP=m\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\nCONFIG_NF_CONNTRACK_IPV4=m\nCONFIG_NF_CONNTRACK_PROC_COMPAT=y\nCONFIG_NF_TABLES_IPV4=m\nCONFIG_NFT_CHAIN_ROUTE_IPV4=m\nCONFIG_NFT_REJECT_IPV4=m\nCONFIG_NFT_DUP_IPV4=m\nCONFIG_NF_TABLES_ARP=m\nCONFIG_NF_DUP_IPV4=m\nCONFIG_NF_LOG_ARP=m\nCONFIG_NF_LOG_IPV4=m\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_NF_NAT_IPV4=m\nCONFIG_NFT_CHAIN_NAT_IPV4=m\nCONFIG_NF_NAT_MASQUERADE_IPV4=m\nCONFIG_NFT_MASQ_IPV4=m\nCONFIG_NFT_REDIR_IPV4=m\nCONFIG_NF_NAT_SNMP_BASIC=m\nCONFIG_NF_NAT_PROTO_GRE=m\nCONFIG_NF_NAT_PPTP=m\nCONFIG_NF_NAT_H323=m\nCONFIG_IP_NF_IPTABLES=m\nCONFIG_IP_NF_MATCH_AH=m\nCONFIG_IP_NF_MATCH_ECN=m\nCONFIG_IP_NF_MATCH_RPFILTER=m\nCONFIG_IP_NF_MATCH_TTL=m\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\nCONFIG_IP_NF_TARGET_SYNPROXY=m\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\nCONFIG_IP_NF_TARGET_NETMAP=m\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\nCONFIG_IP_NF_TARGET_CLUSTERIP=m\nCONFIG_IP_NF_TARGET_ECN=m\nCONFIG_IP_NF_TARGET_TTL=m\nCONFIG_IP_NF_RAW=m\nCONFIG_IP_NF_ARPTABLES=m\nCONFIG_IP_NF_ARPFILTER=m\nCONFIG_IP_NF_ARP_MANGLE=m\n\n#\n# IPv6: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV6=m\nCONFIG_NF_CONNTRACK_IPV6=m\nCONFIG_NF_TABLES_IPV6=m\nCONFIG_NFT_CHAIN_ROUTE_IPV6=m\nCONFIG_NFT_REJECT_IPV6=m\nCONFIG_NFT_DUP_IPV6=m\nCONFIG_NF_DUP_IPV6=m\nCONFIG_NF_REJECT_IPV6=m\nCONFIG_NF_LOG_IPV6=m\nCONFIG_NF_NAT_IPV6=m\nCONFIG_NFT_CHAIN_NAT_IPV6=m\nCONFIG_NF_NAT_MASQUERADE_IPV6=m\nCONFIG_NFT_MASQ_IPV6=m\nCONFIG_NFT_REDIR_IPV6=m\nCONFIG_IP6_NF_IPTABLES=m\nCONFIG_IP6_NF_MATCH_AH=m\nCONFIG_IP6_NF_MATCH_EUI64=m\nCONFIG_IP6_NF_MATCH_FRAG=m\nCONFIG_IP6_NF_MATCH_OPTS=m\nCONFIG_IP6_NF_MATCH_HL=m\nCONFIG_IP6_NF_MATCH_IPV6HEADER=m\nCONFIG_IP6_NF_MATCH_MH=m\nCONFIG_IP6_NF_MATCH_RPFILTER=m\nCONFIG_IP6_NF_MATCH_RT=m\nCONFIG_IP6_NF_TARGET_HL=m\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\nCONFIG_IP6_NF_TARGET_SYNPROXY=m\nCONFIG_IP6_NF_MANGLE=m\nCONFIG_IP6_NF_RAW=m\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\nCONFIG_IP6_NF_TARGET_NPT=m\n# CONFIG_NF_TABLES_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\nCONFIG_RDS=m\nCONFIG_RDS_TCP=m\n# CONFIG_RDS_DEBUG is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\nCONFIG_L2TP=m\nCONFIG_L2TP_DEBUGFS=m\nCONFIG_L2TP_V3=y\nCONFIG_L2TP_IP=m\nCONFIG_L2TP_ETH=m\nCONFIG_STP=m\nCONFIG_GARP=m\nCONFIG_MRP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\nCONFIG_HAVE_NET_DSA=y\nCONFIG_NET_DSA=m\nCONFIG_NET_DSA_HWMON=y\nCONFIG_VLAN_8021Q=m\nCONFIG_VLAN_8021Q_GVRP=y\nCONFIG_VLAN_8021Q_MVRP=y\n# CONFIG_DECNET is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_IPX is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\nCONFIG_6LOWPAN=m\nCONFIG_6LOWPAN_NHC=m\nCONFIG_6LOWPAN_NHC_DEST=m\nCONFIG_6LOWPAN_NHC_FRAGMENT=m\nCONFIG_6LOWPAN_NHC_HOP=m\nCONFIG_6LOWPAN_NHC_IPV6=m\nCONFIG_6LOWPAN_NHC_MOBILITY=m\nCONFIG_6LOWPAN_NHC_ROUTING=m\nCONFIG_6LOWPAN_NHC_UDP=m\nCONFIG_IEEE802154=m\nCONFIG_IEEE802154_NL802154_EXPERIMENTAL=y\nCONFIG_IEEE802154_SOCKET=m\nCONFIG_IEEE802154_6LOWPAN=m\nCONFIG_MAC802154=m\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\nCONFIG_NET_SCH_CBQ=m\nCONFIG_NET_SCH_HTB=m\nCONFIG_NET_SCH_HFSC=m\nCONFIG_NET_SCH_PRIO=m\nCONFIG_NET_SCH_MULTIQ=m\nCONFIG_NET_SCH_RED=m\nCONFIG_NET_SCH_SFB=m\nCONFIG_NET_SCH_SFQ=m\nCONFIG_NET_SCH_TEQL=m\nCONFIG_NET_SCH_TBF=m\nCONFIG_NET_SCH_GRED=m\nCONFIG_NET_SCH_DSMARK=m\nCONFIG_NET_SCH_NETEM=m\nCONFIG_NET_SCH_DRR=m\nCONFIG_NET_SCH_MQPRIO=m\nCONFIG_NET_SCH_CHOKE=m\nCONFIG_NET_SCH_QFQ=m\nCONFIG_NET_SCH_CODEL=m\nCONFIG_NET_SCH_FQ_CODEL=m\nCONFIG_NET_SCH_FQ=m\nCONFIG_NET_SCH_HHF=m\nCONFIG_NET_SCH_PIE=m\nCONFIG_NET_SCH_INGRESS=m\nCONFIG_NET_SCH_PLUG=m\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\nCONFIG_NET_CLS_BASIC=m\nCONFIG_NET_CLS_TCINDEX=m\nCONFIG_NET_CLS_ROUTE4=m\nCONFIG_NET_CLS_FW=m\nCONFIG_NET_CLS_U32=m\nCONFIG_CLS_U32_PERF=y\nCONFIG_CLS_U32_MARK=y\nCONFIG_NET_CLS_RSVP=m\nCONFIG_NET_CLS_RSVP6=m\nCONFIG_NET_CLS_FLOW=m\nCONFIG_NET_CLS_CGROUP=m\nCONFIG_NET_CLS_BPF=m\nCONFIG_NET_CLS_FLOWER=m\nCONFIG_NET_EMATCH=y\nCONFIG_NET_EMATCH_STACK=32\nCONFIG_NET_EMATCH_CMP=m\nCONFIG_NET_EMATCH_NBYTE=m\nCONFIG_NET_EMATCH_U32=m\nCONFIG_NET_EMATCH_META=m\nCONFIG_NET_EMATCH_TEXT=m\nCONFIG_NET_EMATCH_IPSET=m\nCONFIG_NET_CLS_ACT=y\nCONFIG_NET_ACT_POLICE=m\nCONFIG_NET_ACT_GACT=m\nCONFIG_GACT_PROB=y\nCONFIG_NET_ACT_MIRRED=m\nCONFIG_NET_ACT_IPT=m\nCONFIG_NET_ACT_NAT=m\nCONFIG_NET_ACT_PEDIT=m\nCONFIG_NET_ACT_SIMP=m\nCONFIG_NET_ACT_SKBEDIT=m\nCONFIG_NET_ACT_CSUM=m\nCONFIG_NET_ACT_VLAN=m\nCONFIG_NET_ACT_BPF=m\nCONFIG_NET_ACT_CONNMARK=m\nCONFIG_NET_CLS_IND=y\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\nCONFIG_NETLINK_DIAG=y\n# CONFIG_MPLS is not set\n# CONFIG_HSR is not set\nCONFIG_NET_SWITCHDEV=y\n# CONFIG_NET_L3_MASTER_DEV is not set\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_XPS=y\n# CONFIG_CGROUP_NET_PRIO is not set\nCONFIG_CGROUP_NET_CLASSID=y\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_JIT is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\n# CONFIG_IRDA is not set\nCONFIG_BT=y\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\n# CONFIG_BT_RFCOMM_TTY is not set\nCONFIG_BT_BNEP=y\nCONFIG_BT_BNEP_MC_FILTER=y\nCONFIG_BT_BNEP_PROTO_FILTER=y\nCONFIG_BT_HIDP=m\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_6LOWPAN is not set\n# CONFIG_BT_SELFTEST is not set\nCONFIG_BT_DEBUGFS=y\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\n# CONFIG_BT_RTKBTUSB is not set\nCONFIG_BT_HCIBTUSB=m\nCONFIG_BT_HCIBTUSB_BCM=y\nCONFIG_BT_HCIBTUSB_RTL=y\n# CONFIG_BT_HCIBTSDIO is not set\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_H4=y\nCONFIG_BT_HCIUART_BCSP=y\nCONFIG_BT_HCIUART_ATH3K=y\nCONFIG_BT_HCIUART_LL=y\n# CONFIG_BT_HCIUART_3WIRE is not set\n# CONFIG_BT_HCIUART_INTEL is not set\n# CONFIG_BT_HCIUART_BCM is not set\n# CONFIG_BT_HCIUART_QCA is not set\n# CONFIG_BT_HCIBCM203X is not set\n# CONFIG_BT_HCIBPA10X is not set\nCONFIG_BT_HCIBFUSB=m\nCONFIG_BT_HCIVHCI=m\nCONFIG_BT_MRVL=m\nCONFIG_BT_MRVL_SDIO=m\n# CONFIG_BT_ATH3K is not set\n# CONFIG_AF_RXRPC is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=y\nCONFIG_NL80211_TESTMODE=y\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_REG_DEBUG is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\n# CONFIG_CFG80211_INTERNAL_REGDB is not set\nCONFIG_CFG80211_CRDA_SUPPORT=y\nCONFIG_CFG80211_WEXT=y\n# CONFIG_LIB80211 is not set\nCONFIG_MAC80211=y\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_MINSTREL_HT=y\nCONFIG_MAC80211_RC_MINSTREL_VHT=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\n# CONFIG_WIMAX is not set\nCONFIG_RFKILL=y\nCONFIG_RFKILL_PM=y\nCONFIG_RFKILL_LEDS=y\n# CONFIG_RFKILL_INPUT is not set\n# CONFIG_RFKILL_REGULATOR is not set\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\nCONFIG_LWTUNNEL=y\nCONFIG_DST_CACHE=y\nCONFIG_HAVE_BPF_JIT=y\nCONFIG_HAVE_EBPF_JIT=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\n# CONFIG_TEGRA_AHB is not set\n\n#\n# Generic Driver Options\n#\nCONFIG_UEVENT_HELPER=y\nCONFIG_UEVENT_HELPER_PATH=\"\"\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\nCONFIG_FW_LOADER=y\nCONFIG_FIRMWARE_IN_KERNEL=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set\nCONFIG_WANT_DEV_COREDUMP=y\nCONFIG_ALLOW_DEV_COREDUMP=y\nCONFIG_DEV_COREDUMP=y\n# CONFIG_DEBUG_DRIVER is not set\nCONFIG_DEBUG_DEVRES=y\n# CONFIG_SYS_HYPERVISOR is not set\n# CONFIG_GENERIC_CPU_DEVICES is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_FENCE_TRACE is not set\n\n#\n# Bus devices\n#\n# CONFIG_ARM_CCI400_PMU is not set\n# CONFIG_ARM_CCI500_PMU is not set\n# CONFIG_ARM_CCN is not set\n# CONFIG_VEXPRESS_CONFIG is not set\nCONFIG_CONNECTOR=y\nCONFIG_PROC_EVENTS=y\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\n# CONFIG_MTD_CMDLINE_PARTS is not set\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AR7_PARTS is not set\n\n#\n# User Modules And Translation Layers\n#\n# CONFIG_MTD_BLOCK is not set\n# CONFIG_MTD_BLOCK_RO is not set\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\n# CONFIG_MTD_OOPS is not set\n# CONFIG_MTD_SWAP is not set\n# CONFIG_MTD_PARTITIONED_MASTER is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\n# CONFIG_MTD_CFI is not set\n# CONFIG_MTD_JEDECPROBE is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\n# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set\n# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set\n# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\n# CONFIG_MTD_CFI_I4 is not set\n# CONFIG_MTD_CFI_I8 is not set\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_PLATRAM is not set\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_DATAFLASH is not set\nCONFIG_MTD_M25P80=y\n# CONFIG_MTD_SST25L is not set\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\n# CONFIG_MTD_NAND_IDS is not set\n# CONFIG_MTD_NAND is not set\n# CONFIG_MTD_ONENAND is not set\n\n#\n# LPDDR & LPDDR2 PCM memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\nCONFIG_MTD_SPI_NOR=y\nCONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y\n# CONFIG_MTD_UBI is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_NET=y\nCONFIG_OF_MDIO=y\nCONFIG_OF_MTD=y\nCONFIG_OF_RESERVED_MEM=y\n# CONFIG_OF_OVERLAY is not set\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_ZRAM=y\n# CONFIG_ZRAM_WRITEBACK is not set\n# CONFIG_ZRAM_MEMORY_TRACKING is not set\n# CONFIG_BLK_DEV_COW_COMMON is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=8\n# CONFIG_BLK_DEV_CRYPTOLOOP is not set\n# CONFIG_BLK_DEV_DRBD is not set\n# CONFIG_BLK_DEV_NBD is not set\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=1\nCONFIG_BLK_DEV_RAM_SIZE=4096\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\n# CONFIG_BLK_DEV_RBD is not set\n\n#\n# Misc devices\n#\n# CONFIG_ROCKCHIP_SCR is not set\n# CONFIG_SENSORS_LIS3LV02D is not set\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1780 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_TI_DAC7512 is not set\n# CONFIG_BMP085_I2C is not set\n# CONFIG_BMP085_SPI is not set\n# CONFIG_USB_SWITCH_FSA9480 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\n# CONFIG_SRAM is not set\n# CONFIG_MEMORY_STATE_TIME is not set\n# CONFIG_USB_CAM_GPIO is not set\n# CONFIG_GPIO_DET is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\n# CONFIG_EEPROM_AT25 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n\n#\n# Altera FPGA firmware download module\n#\n# CONFIG_ALTERA_STAPL is not set\n\n#\n# Intel MIC Bus Driver\n#\n\n#\n# SCIF Bus Driver\n#\n\n#\n# Intel MIC Host Driver\n#\n\n#\n# Intel MIC Card Driver\n#\n\n#\n# SCIF Driver\n#\n\n#\n# Intel MIC Coprocessor State Management (COSM) Drivers\n#\n# CONFIG_ECHO is not set\n# CONFIG_CXL_BASE is not set\n# CONFIG_CXL_KERNEL_API is not set\n# CONFIG_CXL_EEH is not set\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_NETLINK is not set\n# CONFIG_SCSI_MQ_DEFAULT is not set\nCONFIG_SCSI_PROC_FS=y\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\n# CONFIG_CHR_DEV_OSST is not set\nCONFIG_BLK_DEV_SR=y\n# CONFIG_BLK_DEV_SR_VENDOR is not set\n# CONFIG_CHR_DEV_SG is not set\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\nCONFIG_SCSI_SCAN_ASYNC=y\n\n#\n# SCSI Transports\n#\nCONFIG_SCSI_SPI_ATTRS=y\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set\n# CONFIG_SCSI_DH is not set\n# CONFIG_SCSI_OSD_INITIATOR is not set\nCONFIG_HAVE_PATA_PLATFORM=y\n# CONFIG_ATA is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\n# CONFIG_BLK_DEV_DM is not set\n# CONFIG_TARGET_CORE is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=m\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\n# CONFIG_DUMMY is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_IFB is not set\n# CONFIG_NET_TEAM is not set\n# CONFIG_MACVLAN is not set\n# CONFIG_IPVLAN is not set\n# CONFIG_VXLAN is not set\n# CONFIG_GENEVE is not set\nCONFIG_NETCONSOLE=m\n# CONFIG_NETCONSOLE_DYNAMIC is not set\nCONFIG_NETPOLL=y\nCONFIG_NET_POLL_CONTROLLER=y\nCONFIG_TUN=m\nCONFIG_TUN_VNET_CROSS_LE=y\nCONFIG_VETH=m\nCONFIG_NLMON=m\n\n#\n# CAIF transport drivers\n#\n\n#\n# Distributed Switch Architecture drivers\n#\n# CONFIG_NET_DSA_MV88E6XXX is not set\n# CONFIG_NET_DSA_MV88E6060 is not set\n# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set\n# CONFIG_NET_DSA_MV88E6131 is not set\n# CONFIG_NET_DSA_MV88E6123_61_65 is not set\n# CONFIG_NET_DSA_MV88E6171 is not set\n# CONFIG_NET_DSA_MV88E6352 is not set\n# CONFIG_NET_DSA_BCM_SF2 is not set\n# CONFIG_ETHERNET is not set\nCONFIG_PHYLIB=y\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AQUANTIA_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_AMD_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_QSEMI_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_TERANETICS_PHY is not set\nCONFIG_ROCKCHIP_PHY=y\n# CONFIG_SMSC_PHY is not set\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_REALTEK_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_STE10XP is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_MICREL_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\nCONFIG_MICROCHIP_PHY=m\n# CONFIG_FIXED_PHY is not set\n# CONFIG_MDIO_BITBANG is not set\n# CONFIG_MDIO_OCTEON is not set\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n# CONFIG_MDIO_BCM_UNIMAC is not set\n# CONFIG_MICREL_KS8995MA is not set\nCONFIG_PPP=m\nCONFIG_PPP_BSDCOMP=m\nCONFIG_PPP_DEFLATE=m\nCONFIG_PPP_FILTER=y\nCONFIG_PPP_MPPE=m\nCONFIG_PPP_MULTILINK=y\nCONFIG_PPPOE=m\nCONFIG_PPTP=m\nCONFIG_PPPOL2TP=m\nCONFIG_PPPOLAC=m\nCONFIG_PPPOPNS=m\nCONFIG_PPP_ASYNC=m\nCONFIG_PPP_SYNC_TTY=m\n# CONFIG_SLIP is not set\nCONFIG_SLHC=m\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\n# CONFIG_USB_PEGASUS is not set\nCONFIG_USB_RTL8150=m\nCONFIG_USB_RTL8152=m\n# CONFIG_USB_LAN78XX is not set\nCONFIG_USB_USBNET=m\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\n# CONFIG_USB_NET_CDC_EEM is not set\nCONFIG_USB_NET_CDC_NCM=m\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\nCONFIG_USB_NET_CDC_MBIM=m\n# CONFIG_USB_NET_DM9601 is not set\n# CONFIG_USB_NET_SR9700 is not set\n# CONFIG_USB_NET_SR9800 is not set\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=m\n# CONFIG_USB_NET_GL620A is not set\n# CONFIG_USB_NET_NET1080 is not set\n# CONFIG_USB_NET_PLUSB is not set\n# CONFIG_USB_NET_MCS7830 is not set\nCONFIG_USB_NET_RNDIS_HOST=m\n# CONFIG_USB_NET_CDC_SUBSET is not set\n# CONFIG_USB_NET_ZAURUS is not set\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\n# CONFIG_USB_HSO is not set\n# CONFIG_USB_NET_INT51X1 is not set\n# CONFIG_USB_IPHETH is not set\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\nCONFIG_WLAN=y\n# CONFIG_LIBERTAS_THINFIRM is not set\n# CONFIG_AT76C50X_USB is not set\n# CONFIG_USB_ZD1201 is not set\n# CONFIG_USB_NET_RNDIS_WLAN is not set\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\n# CONFIG_MAC80211_HWSIM is not set\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_ATH_CARDS is not set\n# CONFIG_B43 is not set\n# CONFIG_B43LEGACY is not set\n# CONFIG_BRCMSMAC is not set\n# CONFIG_BRCMFMAC is not set\n# CONFIG_HOSTAP is not set\n# CONFIG_LIBERTAS is not set\n# CONFIG_P54_COMMON is not set\nCONFIG_RT2X00=m\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\n# CONFIG_RT2800USB_UNKNOWN is not set\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WL_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_MT76_CORE=m\nCONFIG_MT76_LEDS=y\nCONFIG_MT76_USB=m\nCONFIG_MT76x02_LIB=m\nCONFIG_MT76x02_USB=m\nCONFIG_MT76x0_COMMON=m\nCONFIG_MT76x0U=m\nCONFIG_MT76x2_COMMON=m\nCONFIG_MT76x2U=m\nCONFIG_WLAN_VENDOR_MEDIATEK=y\n# CONFIG_RTL_CARDS is not set\nCONFIG_RTL8192CU=m\n# CONFIG_RTL8XXXU is not set\n# CONFIG_WL_ROCKCHIP is not set\nCONFIG_RTL8723BU=m\n# CONFIG_WL_TI is not set\n# CONFIG_ZD1211RW is not set\n# CONFIG_MWIFIEX is not set\n# CONFIG_CW1200 is not set\n# CONFIG_RSI_91X is not set\nCONFIG_RTL8812AU=m\nCONFIG_RTL8822BU=m\nCONFIG_RTL8821CU=m\nCONFIG_ESP8089=m\nCONFIG_ESP8089_DEBUG_FS=y\n\n#\n# Enable WiMAX (Networking options) to see the WiMAX drivers\n#\n# CONFIG_WAN is not set\nCONFIG_IEEE802154_DRIVERS=m\n# CONFIG_IEEE802154_FAKELB is not set\n# CONFIG_IEEE802154_AT86RF230 is not set\n# CONFIG_IEEE802154_MRF24J40 is not set\n# CONFIG_IEEE802154_CC2520 is not set\n# CONFIG_IEEE802154_ATUSB is not set\n# CONFIG_ISDN is not set\n# CONFIG_NVM is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\nCONFIG_INPUT_POLLDEV=y\n# CONFIG_INPUT_SPARSEKMAP is not set\nCONFIG_INPUT_MATRIXKMAP=y\n\n#\n# Userland interfaces\n#\n# CONFIG_INPUT_MOUSEDEV is not set\nCONFIG_INPUT_JOYDEV=y\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\nCONFIG_INPUT_KEYRESET=y\nCONFIG_INPUT_KEYCOMBO=y\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADC is not set\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\nCONFIG_KEYBOARD_ATKBD=m\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=m\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\nCONFIG_KEYBOARD_ROCKCHIP=y\nCONFIG_KEYBOARD_XTKBD=m\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\nCONFIG_INPUT_MOUSE=y\n# CONFIG_MOUSE_PS2 is not set\n# CONFIG_MOUSE_SERIAL is not set\n# CONFIG_MOUSE_APPLETOUCH is not set\n# CONFIG_MOUSE_BCM5974 is not set\n# CONFIG_MOUSE_CYAPA is not set\n# CONFIG_MOUSE_ELAN_I2C is not set\n# CONFIG_MOUSE_VSXXXAA is not set\n# CONFIG_MOUSE_GPIO is not set\n# CONFIG_MOUSE_SYNAPTICS_I2C is not set\n# CONFIG_MOUSE_SYNAPTICS_USB is not set\nCONFIG_INPUT_JOYSTICK=y\nCONFIG_JOYSTICK_ANALOG=m\nCONFIG_JOYSTICK_A3D=m\nCONFIG_JOYSTICK_ADI=m\nCONFIG_JOYSTICK_COBRA=m\nCONFIG_JOYSTICK_GF2K=m\nCONFIG_JOYSTICK_GRIP=m\nCONFIG_JOYSTICK_GRIP_MP=m\nCONFIG_JOYSTICK_GUILLEMOT=m\nCONFIG_JOYSTICK_INTERACT=m\nCONFIG_JOYSTICK_SIDEWINDER=m\nCONFIG_JOYSTICK_TMDC=m\nCONFIG_JOYSTICK_IFORCE=m\nCONFIG_JOYSTICK_IFORCE_USB=y\n# CONFIG_JOYSTICK_IFORCE_232 is not set\nCONFIG_JOYSTICK_WARRIOR=m\nCONFIG_JOYSTICK_MAGELLAN=m\nCONFIG_JOYSTICK_SPACEORB=m\nCONFIG_JOYSTICK_SPACEBALL=m\nCONFIG_JOYSTICK_STINGER=m\nCONFIG_JOYSTICK_TWIDJOY=m\nCONFIG_JOYSTICK_ZHENHUA=m\nCONFIG_JOYSTICK_AS5011=m\nCONFIG_JOYSTICK_JOYDUMP=m\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\n# CONFIG_JOYSTICK_ADC is not set\nCONFIG_JOYSTICK_ODROIDGO2=y\nCONFIG_JOYSTICK_ODROIDGO3=y\nCONFIG_DRM_PANEL_ODROID_ST7701S=y\n# CONFIG_QCA_CLD_WLAN is not set\n# CONFIG_INPUT_TABLET is not set\n# CONFIG_INPUT_TOUCHSCREEN is not set\n# CONFIG_ROCKCHIP_REMOTECTL is not set\n\n#\n# handle all sensors\n#\n# CONFIG_SENSOR_DEVICE is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_MPU3050 is not set\n# CONFIG_INPUT_GP2A is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_TILT_POLLED is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYCHORD is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_RK8XX_PWRKEY=y\nCONFIG_INPUT_UINPUT=y\nCONFIG_INPUT_GPIO=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_SOC_BUTTON_ARRAY is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=m\nCONFIG_SERIO_SERPORT=m\n# CONFIG_SERIO_AMBAKMI is not set\nCONFIG_SERIO_LIBPS2=m\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_USERIO is not set\nCONFIG_GAMEPORT=m\n# CONFIG_GAMEPORT_NS558 is not set\n# CONFIG_GAMEPORT_L4 is not set\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\nCONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n# CONFIG_LEGACY_PTYS is not set\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_TRACE_SINK is not set\nCONFIG_LDISC_AUTOLOAD=y\nCONFIG_DEVMEM=y\n# CONFIG_DEVKMEM is not set\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\nCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y\nCONFIG_SERIAL_8250_CONSOLE=y\nCONFIG_SERIAL_8250_DMA=y\nCONFIG_SERIAL_8250_NR_UARTS=5\nCONFIG_SERIAL_8250_RUNTIME_UARTS=5\n# CONFIG_SERIAL_8250_EXTENDED is not set\nCONFIG_SERIAL_8250_FSL=y\nCONFIG_SERIAL_8250_DW=y\n# CONFIG_SERIAL_8250_RT288X is not set\n# CONFIG_SERIAL_8250_INGENIC is not set\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\n# CONFIG_SERIAL_AMBA_PL011 is not set\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\nCONFIG_SERIAL_OF_PLATFORM=y\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_IFX6X60 is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_TTY_PRINTK is not set\n# CONFIG_HVC_DCC is not set\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\nCONFIG_HW_RANDOM_TPM=y\n# CONFIG_HW_RANDOM_ROCKCHIP is not set\n\n#\n# PCMCIA character devices\n#\n# CONFIG_RAW_DRIVER is not set\nCONFIG_TCG_TPM=y\n# CONFIG_TCG_TIS_I2C_ATMEL is not set\nCONFIG_TCG_TIS_I2C_INFINEON=y\n# CONFIG_TCG_TIS_I2C_NUVOTON is not set\n# CONFIG_TCG_TIS_ST33ZP24 is not set\n# CONFIG_XILLYBUS is not set\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\nCONFIG_I2C_ARB_GPIO_CHALLENGE=m\nCONFIG_I2C_MUX_GPIO=m\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\n# CONFIG_I2C_MUX_PINCTRL is not set\n# CONFIG_I2C_MUX_REG is not set\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CADENCE is not set\n# CONFIG_I2C_CBUS_GPIO is not set\n# CONFIG_I2C_DESIGNWARE_PLATFORM is not set\n# CONFIG_I2C_EMEV2 is not set\n# CONFIG_I2C_GPIO is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_PXA_PCI is not set\nCONFIG_I2C_RK3X=y\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_PARPORT_LIGHT is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\nCONFIG_SPI_BITBANG=m\n# CONFIG_SPI_CADENCE is not set\nCONFIG_SPI_GPIO=m\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_OC_TINY is not set\n# CONFIG_SPI_PL022 is not set\n# CONFIG_SPI_PXA2XX_PCI is not set\nCONFIG_SPI_ROCKCHIP=m\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=m\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\n\n#\n# PPS support\n#\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\nCONFIG_PINCTRL=y\n\n#\n# Pin controllers\n#\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_AMD is not set\nCONFIG_PINCTRL_ROCKCHIP=y\n# CONFIG_PINCTRL_SINGLE is not set\nCONFIG_PINCTRL_RK805=y\nCONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y\nCONFIG_ARCH_REQUIRE_GPIOLIB=y\nCONFIG_GPIOLIB=y\nCONFIG_GPIO_DEVRES=y\nCONFIG_OF_GPIO=y\nCONFIG_DEBUG_GPIO=y\nCONFIG_GPIO_SYSFS=y\nCONFIG_GPIO_GENERIC=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_DWAPB is not set\nCONFIG_GPIO_GENERIC_PLATFORM=y\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_PL061 is not set\n# CONFIG_GPIO_SYSCON is not set\n# CONFIG_GPIO_XGENE is not set\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_ZX is not set\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADP5588 is not set\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\n# CONFIG_GPIO_PCA953X is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_SX150X is not set\n\n#\n# MFD GPIO expanders\n#\nCONFIG_GPIO_RK8XX=y\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n\n#\n# SPI or I2C GPIO expanders\n#\n# CONFIG_GPIO_MCP23S08 is not set\n\n#\n# USB GPIO expanders\n#\n# CONFIG_W1 is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\nCONFIG_CHARGER_GPIO=y\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ25700 is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_CHARGER_SY6982C is not set\n# CONFIG_CHARGER_UNIVERSAL is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_EC is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_RK816 is not set\nCONFIG_BATTERY_RK817=y\nCONFIG_CHARGER_RK817=y\n# CONFIG_BATTERY_RK818 is not set\n# CONFIG_CHARGER_RK818 is not set\n# CONFIG_CHARGER_RT9455 is not set\nCONFIG_POWER_RESET=y\nCONFIG_POWER_RESET_GPIO=y\nCONFIG_POWER_RESET_GPIO_RESTART=y\n# CONFIG_POWER_RESET_LTC2952 is not set\n# CONFIG_POWER_RESET_RESTART is not set\n# CONFIG_POWER_RESET_XGENE is not set\n# CONFIG_POWER_RESET_SYSCON is not set\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\nCONFIG_REBOOT_MODE=y\nCONFIG_SYSCON_REBOOT_MODE=y\nCONFIG_POWER_AVS=y\nCONFIG_ROCKCHIP_IODOMAIN=y\nCONFIG_HWMON=y\n# CONFIG_HWMON_VID is not set\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\n# CONFIG_SENSORS_GPIO_FAN is not set\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IIO_HWMON is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_HTU21 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\n# CONFIG_SENSORS_PWM_FAN is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH56XX_COMMON is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS1015 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\nCONFIG_THERMAL_WRITABLE_TRIPS=y\n# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\nCONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y\nCONFIG_THERMAL_GOV_FAIR_SHARE=y\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\nCONFIG_THERMAL_GOV_POWER_ALLOCATOR=y\nCONFIG_CPU_THERMAL=y\n# CONFIG_CLOCK_THERMAL is not set\nCONFIG_DEVFREQ_THERMAL=y\n# CONFIG_THERMAL_EMULATION is not set\n# CONFIG_IMX_THERMAL is not set\nCONFIG_ROCKCHIP_THERMAL=y\n# CONFIG_RK_VIRTUAL_THERMAL is not set\n# CONFIG_RK3368_THERMAL is not set\n# CONFIG_WATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\n\n#\n# Sonics Silicon Backplane\n#\n# CONFIG_SSB is not set\nCONFIG_BCMA_POSSIBLE=y\n\n#\n# Broadcom specific AMBA\n#\n# CONFIG_BCMA is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_AXP20X is not set\n# CONFIG_MFD_CROS_EC is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_INTEL_SOC_PMIC is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RTSX_USB is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_RK618 is not set\nCONFIG_MFD_RK808=y\n# CONFIG_MFD_RN5T618 is not set\n# CONFIG_MFD_SEC_CORE is not set\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_SMSC is not set\n# CONFIG_ABX500_CORE is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_MFD_TPS80031 is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_TMIO is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_RK1000 is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_FUSB_30X is not set\nCONFIG_REGULATOR=y\nCONFIG_REGULATOR_DEBUG=y\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\nCONFIG_REGULATOR_VIRTUAL_CONSUMER=y\nCONFIG_REGULATOR_USERSPACE_CONSUMER=y\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\n# CONFIG_REGULATOR_ANATOP is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8752 is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MP8865 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\nCONFIG_REGULATOR_PWM=y\nCONFIG_REGULATOR_RK808=y\nCONFIG_REGULATOR_RK818=y\n# CONFIG_REGULATOR_SYR82X is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS549B22 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\n# CONFIG_REGULATOR_XZ3216 is not set\nCONFIG_MEDIA_SUPPORT=y\n\n#\n# Multimedia core support\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\n# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set\n# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set\n# CONFIG_MEDIA_RADIO_SUPPORT is not set\n# CONFIG_MEDIA_SDR_SUPPORT is not set\nCONFIG_MEDIA_RC_SUPPORT=y\n# CONFIG_MEDIA_CEC_SUPPORT is not set\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_VIDEO_DEV=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\nCONFIG_VIDEO_V4L2=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_V4L2_MEM2MEM_DEV=y\nCONFIG_V4L2_FWNODE=y\nCONFIG_VIDEOBUF_GEN=y\nCONFIG_VIDEOBUF2_CORE=y\nCONFIG_VIDEOBUF2_MEMOPS=y\nCONFIG_VIDEOBUF2_DMA_CONTIG=y\nCONFIG_VIDEOBUF2_VMALLOC=y\nCONFIG_VIDEOBUF2_DMA_SG=y\n# CONFIG_TTPCI_EEPROM is not set\n\n#\n# Media drivers\n#\nCONFIG_RC_CORE=y\nCONFIG_RC_MAP=y\n# CONFIG_LIRC is not set\nCONFIG_RC_DECODERS=y\nCONFIG_IR_NEC_DECODER=y\n# CONFIG_IR_RC5_DECODER is not set\n# CONFIG_IR_RC6_DECODER is not set\n# CONFIG_IR_JVC_DECODER is not set\n# CONFIG_IR_SONY_DECODER is not set\n# CONFIG_IR_SANYO_DECODER is not set\n# CONFIG_IR_SHARP_DECODER is not set\n# CONFIG_IR_MCE_KBD_DECODER is not set\n# CONFIG_IR_XMP_DECODER is not set\n# CONFIG_IR_IMON_DECODER is not set\n# CONFIG_RC_DEVICES is not set\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\nCONFIG_USB_VIDEO_CLASS=y\n# CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV is not set\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_VIDEO_CPIA2 is not set\n# CONFIG_USB_ZR364XX is not set\n# CONFIG_USB_STKWEBCAM is not set\n# CONFIG_USB_S2255 is not set\n# CONFIG_VIDEO_USBTV is not set\n# CONFIG_NPU_USB_ACM is not set\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\n# CONFIG_VIDEO_EM28XX is not set\nCONFIG_V4L_PLATFORM_DRIVERS=y\nCONFIG_SOC_CAMERA=y\n# CONFIG_SOC_CAMERA_PLATFORM is not set\n# CONFIG_VIDEO_XILINX is not set\n# CONFIG_VIDEO_RK_CIF_ISP10 is not set\nCONFIG_VIDEO_ROCKCHIP_CIF=y\nCONFIG_ROCKCHIP_CIF_WORKMODE_PINGPONG=y\n# CONFIG_ROCKCHIP_CIF_WORKMODE_ONEFRAME is not set\nCONFIG_VIDEO_ROCKCHIP_ISP1=y\nCONFIG_V4L_MEM2MEM_DRIVERS=y\n# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set\n# CONFIG_VIDEO_SH_VEU is not set\nCONFIG_VIDEO_ROCKCHIP_RGA=y\n# CONFIG_VIDEO_ROCKCHIP_VPU is not set\n# CONFIG_V4L_TEST_DRIVERS is not set\n# CONFIG_ROCKCHIP_TSP is not set\n\n#\n# Supported MMC/SDIO adapters\n#\n# CONFIG_CYPRESS_FIRMWARE is not set\n\n#\n# Media ancillary drivers (tuners, sensors, i2c, spi, frontends)\n#\n# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set\n# CONFIG_VIDEO_IR_I2C is not set\n\n#\n# I2C Encoders, decoders, sensors and other helper chips\n#\n\n#\n# Audio decoders, processors and mixers\n#\n# CONFIG_VIDEO_TVAUDIO is not set\n# CONFIG_VIDEO_TDA7432 is not set\n# CONFIG_VIDEO_TDA9840 is not set\n# CONFIG_VIDEO_TEA6415C is not set\n# CONFIG_VIDEO_TEA6420 is not set\n# CONFIG_VIDEO_MSP3400 is not set\n# CONFIG_VIDEO_CS5345 is not set\n# CONFIG_VIDEO_CS53L32A is not set\n# CONFIG_VIDEO_TLV320AIC23B is not set\n# CONFIG_VIDEO_UDA1342 is not set\n# CONFIG_VIDEO_WM8775 is not set\n# CONFIG_VIDEO_WM8739 is not set\n# CONFIG_VIDEO_VP27SMPX is not set\n# CONFIG_VIDEO_SONY_BTF_MPX is not set\n\n#\n# RDS decoders\n#\n# CONFIG_VIDEO_SAA6588 is not set\n\n#\n# Video decoders\n#\n# CONFIG_VIDEO_ADV7180 is not set\n# CONFIG_VIDEO_ADV7181D is not set\n# CONFIG_VIDEO_ADV7183 is not set\n# CONFIG_VIDEO_ADV7604 is not set\n# CONFIG_VIDEO_ADV7842 is not set\n# CONFIG_VIDEO_BT819 is not set\n# CONFIG_VIDEO_BT856 is not set\n# CONFIG_VIDEO_BT866 is not set\n# CONFIG_VIDEO_KS0127 is not set\n# CONFIG_VIDEO_ML86V7667 is not set\n# CONFIG_VIDEO_SAA7110 is not set\n# CONFIG_VIDEO_SAA711X is not set\n# CONFIG_VIDEO_TC35874X is not set\n# CONFIG_VIDEO_TVP514X is not set\n# CONFIG_VIDEO_TVP5150 is not set\n# CONFIG_VIDEO_TVP7002 is not set\n# CONFIG_VIDEO_TW2804 is not set\n# CONFIG_VIDEO_TW9903 is not set\n# CONFIG_VIDEO_TW9906 is not set\n# CONFIG_VIDEO_VPX3220 is not set\n\n#\n# Video and audio decoders\n#\n# CONFIG_VIDEO_SAA717X is not set\n# CONFIG_VIDEO_CX25840 is not set\n\n#\n# Video encoders\n#\n# CONFIG_VIDEO_SAA7127 is not set\n# CONFIG_VIDEO_SAA7185 is not set\n# CONFIG_VIDEO_ADV7170 is not set\n# CONFIG_VIDEO_ADV7175 is not set\n# CONFIG_VIDEO_ADV7343 is not set\n# CONFIG_VIDEO_ADV7393 is not set\n# CONFIG_VIDEO_ADV7511 is not set\n# CONFIG_VIDEO_AD9389B is not set\n# CONFIG_VIDEO_AK881X is not set\n# CONFIG_VIDEO_THS8200 is not set\n\n#\n# Camera sensor devices\n#\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX317 is not set\n# CONFIG_VIDEO_IMX323 is not set\n# CONFIG_VIDEO_IMX327 is not set\n# CONFIG_VIDEO_VIRT_CAMERA is not set\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV2718 is not set\n# CONFIG_VIDEO_OV2735 is not set\n# CONFIG_VIDEO_OV4689 is not set\nCONFIG_VIDEO_OV5647=y\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV7251 is not set\n# CONFIG_VIDEO_OV7640 is not set\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV7725 is not set\n# CONFIG_VIDEO_OV7750 is not set\n# CONFIG_VIDEO_OV8858 is not set\n# CONFIG_VIDEO_OV9281 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_OV9750 is not set\n# CONFIG_VIDEO_OV13850 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9V011 is not set\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_AR0230 is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_SMIAPP is not set\n# CONFIG_VIDEO_S5C73M3 is not set\nCONFIG_VIDEO_GC2155=y\n# CONFIG_VIDEO_GC0312 is not set\n# CONFIG_VIDEO_GC2145 is not set\nCONFIG_VIDEO_GC2355=y\n# CONFIG_VIDEO_GC2385 is not set\n# CONFIG_VIDEO_GC5025 is not set\n# CONFIG_VIDEO_GC5035 is not set\n# CONFIG_VIDEO_GC8034 is not set\nCONFIG_VIDEO_SC031GS=y\n# CONFIG_VIDEO_SC132GS is not set\n# CONFIG_VIDEO_GC0329 is not set\n# CONFIG_VIDEO_GC2035 is not set\n# CONFIG_VIDEO_BF3925 is not set\n# CONFIG_VIDEO_JX_H65 is not set\nCONFIG_VIDEO_PREISP_DUMMY_SENSOR=y\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_AS3645A is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# CONFIG_VIDEO_SGM3784 is not set\n\n#\n# Video improvement chips\n#\n# CONFIG_VIDEO_UPD64031A is not set\n# CONFIG_VIDEO_UPD64083 is not set\n\n#\n# Camera lens devices\n#\n# CONFIG_VIDEO_VM149C is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_FP5510 is not set\n\n#\n# Audio/Video compression chips\n#\n# CONFIG_VIDEO_SAA6752HS is not set\n\n#\n# Miscellaneous helper chips\n#\n# CONFIG_VIDEO_THS7303 is not set\n# CONFIG_VIDEO_M52790 is not set\n# CONFIG_VIDEO_NVP6324 is not set\n\n#\n# Sensors used on soc_camera driver\n#\n\n#\n# soc_camera sensor drivers\n#\n# CONFIG_SOC_CAMERA_IMX074 is not set\n# CONFIG_SOC_CAMERA_MT9M001 is not set\n# CONFIG_SOC_CAMERA_MT9M111 is not set\n# CONFIG_SOC_CAMERA_MT9T031 is not set\n# CONFIG_SOC_CAMERA_MT9T112 is not set\n# CONFIG_SOC_CAMERA_MT9V022 is not set\n# CONFIG_SOC_CAMERA_OV2640 is not set\n# CONFIG_SOC_CAMERA_OV5642 is not set\n# CONFIG_SOC_CAMERA_OV6650 is not set\n# CONFIG_SOC_CAMERA_OV772X is not set\n# CONFIG_SOC_CAMERA_OV9640 is not set\n# CONFIG_SOC_CAMERA_OV9740 is not set\n# CONFIG_SOC_CAMERA_RJ54N1 is not set\n# CONFIG_SOC_CAMERA_TW9910 is not set\n\n#\n# SPI helper chips\n#\n# CONFIG_VIDEO_GS1662 is not set\n# CONFIG_VIDEO_IMX327_SPI is not set\nCONFIG_VIDEO_ROCKCHIP_PREISP=y\n\n#\n# Customise DVB Frontends\n#\n# CONFIG_DVB_AU8522_V4L is not set\n# CONFIG_DVB_TUNER_DIB0070 is not set\n# CONFIG_DVB_TUNER_DIB0090 is not set\n\n#\n# Tools to develop new frontends\n#\n# CONFIG_DVB_DUMMY_FE is not set\n# CONFIG_CAMSYS_DRV is not set\n# CONFIG_ROCK_CHIP_SOC_CAMERA is not set\n\n#\n# Graphics support\n#\nCONFIG_DRM=y\nCONFIG_DRM_IGNORE_IOTCL_PERMIT=y\nCONFIG_DRM_MIPI_DSI=y\nCONFIG_DRM_KMS_HELPER=y\nCONFIG_DRM_KMS_FB_HELPER=y\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\n# CONFIG_DRM_DP_CEC is not set\n# CONFIG_DRM_SCDC_HELPER is not set\nCONFIG_DRM_DMA_SYNC=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_VGEM is not set\nCONFIG_DRM_ROCKCHIP=y\n# CONFIG_ROCKCHIP_DRM_DEBUG is not set\n# CONFIG_ROCKCHIP_DW_HDMI is not set\nCONFIG_ROCKCHIP_DW_MIPI_DSI=y\n# CONFIG_ROCKCHIP_MIPI_CSI_TX is not set\n# CONFIG_ROCKCHIP_ANALOGIX_DP is not set\n# CONFIG_ROCKCHIP_INNO_HDMI is not set\n# CONFIG_ROCKCHIP_LVDS is not set\n# CONFIG_ROCKCHIP_DRM_TVE is not set\n# CONFIG_ROCKCHIP_RGB is not set\n# CONFIG_ROCKCHIP_DRM_BACKLIGHT is not set\n# CONFIG_ROCKCHIP_RK3066_HDMI is not set\n# CONFIG_DRM_UDL is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\nCONFIG_DRM_PANEL_SIMPLE=y\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set\nCONFIG_DRM_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_RK1000 is not set\n# CONFIG_DRM_DUMB_VGA_DAC is not set\n# CONFIG_DRM_LONTIUM_LT8912 is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_POWERVR_ROGUE_M is not set\n# CONFIG_MALI400 is not set\nCONFIG_MALI_MIDGARD_FOR_ANDROID=y\n# CONFIG_MALI_MIDGARD_FOR_LINUX is not set\n# CONFIG_MALI_MIDGARD is not set\n# CONFIG_MALI_CORESTACK is not set\nCONFIG_MALI_PWRSOFT_765=y\n# CONFIG_MALI_KUTF is not set\n# CONFIG_MALI_BIFROST_FOR_ANDROID is not set\nCONFIG_MALI_BIFROST_FOR_LINUX=y\nCONFIG_MALI_BIFROST=y\nCONFIG_MALI_BIFROST_GATOR_SUPPORT=y\n# CONFIG_MALI_BIFROST_ENABLE_TRACE is not set\nCONFIG_MALI_BIFROST_DEVFREQ=y\n# CONFIG_MALI_BIFROST_DMA_FENCE is not set\nCONFIG_MALI_PLATFORM_NAME=\"rk\"\nCONFIG_MALI_BIFROST_EXPERT=y\n# CONFIG_MALI_BIFROST_PRFCNT_SET_SECONDARY is not set\n# CONFIG_MALI_BIFROST_DEBUG is not set\n# CONFIG_MALI_BIFROST_NO_MALI is not set\n# CONFIG_MALI_BIFROST_TRACE_TIMELINE is not set\n# CONFIG_MALI_BIFROST_SYSTEM_TRACE is not set\n# CONFIG_MALI_JOB_DUMP is not set\n# CONFIG_MALI_2MB_ALLOC is not set\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CMDLINE=y\n# CONFIG_FB_DDC is not set\n# CONFIG_FB_BOOT_VESA_SUPPORT is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\n# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\n# CONFIG_FB_SVGALIB is not set\n# CONFIG_FB_MACMODES is not set\n# CONFIG_FB_BACKLIGHT is not set\n# CONFIG_FB_MODE_HELPERS is not set\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_UVESA is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_BROADSHEET is not set\n# CONFIG_FB_AUO_K190X is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\nCONFIG_BACKLIGHT_LCD_SUPPORT=y\n# CONFIG_LCD_CLASS_DEVICE is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\nCONFIG_BACKLIGHT_GENERIC=y\nCONFIG_BACKLIGHT_PWM=y\n# CONFIG_BACKLIGHT_PM8941_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\n# CONFIG_BACKLIGHT_GPIO is not set\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n\n#\n# Rockchip Misc Video driver\n#\n# CONFIG_FB_ROCKCHIP is not set\n# CONFIG_LCDC_RK3368 is not set\nCONFIG_LCD_GENERAL=y\n# CONFIG_LCD_MIPI is not set\n# CONFIG_RK_TRSM is not set\n# CONFIG_RK_HDMI is not set\n\n#\n# RGA\n#\n# CONFIG_ROCKCHIP_RGA is not set\n\n#\n# RGA2\n#\nCONFIG_ROCKCHIP_RGA2=y\n\n#\n# VCODEC\n#\nCONFIG_RK_VCODEC=y\n\n#\n# IEP\n#\n# CONFIG_IEP is not set\n# CONFIG_IEP_MMU is not set\n\n#\n# DP\n#\n\n#\n# ROCKCHIP_MPP\n#\nCONFIG_ROCKCHIP_MPP_SERVICE=y\nCONFIG_ROCKCHIP_MPP_DEVICE=y\n# CONFIG_VGASTATE is not set\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_DUMMY_CONSOLE_COLUMNS=80\nCONFIG_DUMMY_CONSOLE_ROWS=25\nCONFIG_FRAMEBUFFER_CONSOLE=y\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\nCONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y\n# CONFIG_LOGO is not set\nCONFIG_SOUND=y\n# CONFIG_SOUND_OSS_CORE is not set\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_HWDEP=y\nCONFIG_SND_RAWMIDI=y\nCONFIG_SND_JACK=y\nCONFIG_SND_SEQUENCER=y\nCONFIG_SND_SEQ_DUMMY=y\n# CONFIG_SND_MIXER_OSS is not set\n# CONFIG_SND_PCM_OSS is not set\nCONFIG_SND_PCM_TIMER=y\n# CONFIG_SND_SEQUENCER_OSS is not set\nCONFIG_SND_HRTIMER=y\nCONFIG_SND_SEQ_HRTIMER_DEFAULT=y\nCONFIG_SND_DYNAMIC_MINORS=y\nCONFIG_SND_MAX_CARDS=32\n# CONFIG_SND_SUPPORT_OLD_API is not set\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\n# CONFIG_SND_DEBUG is not set\nCONFIG_SND_RAWMIDI_SEQ=y\n# CONFIG_SND_OPL3_LIB_SEQ is not set\n# CONFIG_SND_OPL4_LIB_SEQ is not set\n# CONFIG_SND_SBAWE_SEQ is not set\n# CONFIG_SND_EMU10K1_SEQ is not set\nCONFIG_SND_DRIVERS=y\n# CONFIG_SND_DUMMY is not set\n# CONFIG_SND_ALOOP is not set\n# CONFIG_SND_VIRMIDI is not set\n# CONFIG_SND_MTPAV is not set\n# CONFIG_SND_SERIAL_U16550 is not set\n# CONFIG_SND_MPU401 is not set\n\n#\n# HD-Audio\n#\nCONFIG_SND_HDA_PREALLOC_SIZE=128\n# CONFIG_SND_SPI is not set\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=y\n# CONFIG_SND_USB_UA101 is not set\n# CONFIG_SND_USB_CAIAQ is not set\n# CONFIG_SND_USB_6FIRE is not set\n# CONFIG_SND_USB_HIFACE is not set\n# CONFIG_SND_BCD2000 is not set\n# CONFIG_SND_USB_POD is not set\n# CONFIG_SND_USB_PODHD is not set\n# CONFIG_SND_USB_TONEPORT is not set\n# CONFIG_SND_USB_VARIAX is not set\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\nCONFIG_SND_SOC_ROCKCHIP=y\n# CONFIG_SND_SOC_ROCKCHIP_FORCE_SRAM is not set\nCONFIG_SND_SOC_ROCKCHIP_I2S=y\n# CONFIG_SND_SOC_ROCKCHIP_I2S_TDM is not set\nCONFIG_SND_SOC_ROCKCHIP_MULTI_DAIS=y\nCONFIG_SND_SOC_ROCKCHIP_PDM=y\n# CONFIG_SND_SOC_ROCKCHIP_SPDIF is not set\n# CONFIG_SND_SOC_ROCKCHIP_SPDIFRX is not set\n# CONFIG_SND_SOC_ROCKCHIP_VAD is not set\n# CONFIG_SND_SOC_ROCKCHIP_DA7219 is not set\n# CONFIG_SND_SOC_ROCKCHIP_HDMI_ANALOG is not set\n# CONFIG_SND_SOC_ROCKCHIP_MAX98090 is not set\nCONFIG_SND_SOC_ROCKCHIP_MULTICODECS=y\n# CONFIG_SND_SOC_ROCKCHIP_RT5645 is not set\n# CONFIG_SND_SOC_ROCKCHIP_RT5651_TC358749 is not set\n# CONFIG_SND_SOC_ROCKCHIP_CDNDP is not set\n\n#\n# Allwinner SoC Audio support\n#\n# CONFIG_SND_SUN4I_CODEC is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4554 is not set\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CX2072X is not set\n# CONFIG_SND_SOC_CX20810 is not set\n# CONFIG_SND_SOC_DUMMY_CODEC is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_ES8316 is not set\n# CONFIG_SND_SOC_ES8323 is not set\n# CONFIG_SND_SOC_ES8328 is not set\n# CONFIG_SND_SOC_ES8328_I2C is not set\n# CONFIG_SND_SOC_ES8396 is not set\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_GVA_CODEC is not set\n# CONFIG_SND_SOC_FM1288 is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1792A is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK312X is not set\n# CONFIG_SND_SOC_RK3228 is not set\n# CONFIG_SND_SOC_RK3308 is not set\n# CONFIG_SND_SOC_RK3328 is not set\nCONFIG_SND_SOC_RK817=y\n# CONFIG_SND_SOC_RT5616 is not set\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\n# CONFIG_SND_SOC_RT5651 is not set\n# CONFIG_SND_SOC_RT5677_SPI is not set\n# CONFIG_SND_SOC_SGTL5000 is not set\n# CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set\n# CONFIG_SND_SOC_SPDIF is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TC358749X is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC3X is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731 is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\nCONFIG_SND_SIMPLE_CARD=y\n# CONFIG_SOUND_PRIME is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\nCONFIG_HID_BATTERY_STRENGTH=y\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\n# CONFIG_HID_A4TECH is not set\n# CONFIG_HID_ACRUX is not set\n# CONFIG_HID_APPLE is not set\n# CONFIG_HID_APPLEIR is not set\n# CONFIG_HID_AUREAL is not set\n# CONFIG_HID_BELKIN is not set\n# CONFIG_HID_BETOP_FF is not set\n# CONFIG_HID_CHERRY is not set\n# CONFIG_HID_CHICONY is not set\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CYPRESS is not set\n# CONFIG_HID_DRAGONRISE is not set\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\n# CONFIG_HID_EZKEY is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\n# CONFIG_HID_KYE is not set\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_GYRATION is not set\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_TWINHAN is not set\n# CONFIG_HID_KENSINGTON is not set\n# CONFIG_HID_LCPOWER is not set\n# CONFIG_HID_LENOVO is not set\n# CONFIG_HID_LOGITECH is not set\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MICROSOFT is not set\n# CONFIG_HID_MONTEREY is not set\n# CONFIG_HID_MULTITOUCH is not set\n# CONFIG_HID_NTRIG is not set\n# CONFIG_HID_ORTEK is not set\n# CONFIG_HID_PANTHERLORD is not set\n# CONFIG_HID_PENMOUNT is not set\n# CONFIG_HID_PETALYNX is not set\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\n# CONFIG_HID_SAMSUNG is not set\n# CONFIG_HID_SONY is not set\n# CONFIG_HID_SPEEDLINK is not set\n# CONFIG_HID_STEELSERIES is not set\n# CONFIG_HID_SUNPLUS is not set\n# CONFIG_HID_RMI is not set\n# CONFIG_HID_GREENASIA is not set\n# CONFIG_HID_SMARTJOYPLUS is not set\n# CONFIG_HID_TIVO is not set\n# CONFIG_HID_TOPSEED is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_WACOM is not set\n# CONFIG_HID_WIIMOTE is not set\n# CONFIG_HID_XINMO is not set\n# CONFIG_HID_ZEROPLUS is not set\n# CONFIG_HID_ZYDACRON is not set\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_RKVR is not set\n# CONFIG_HID_ALPS is not set\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n\n#\n# I2C HID support\n#\nCONFIG_I2C_HID=y\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_DYNAMIC_MINORS is not set\nCONFIG_USB_OTG=y\n# CONFIG_USB_OTG_WHITELIST is not set\n# CONFIG_USB_OTG_BLACKLIST_HUB is not set\n# CONFIG_USB_OTG_FSM is not set\n# CONFIG_USB_ULPI_BUS is not set\nCONFIG_USB_MON=m\n# CONFIG_USB_WUSB_CBAF is not set\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\n# CONFIG_USB_XHCI_HCD is not set\nCONFIG_USB_EHCI_HCD=y\nCONFIG_USB_EHCI_ROOT_HUB_TT=y\nCONFIG_USB_EHCI_TT_NEWSCHED=y\nCONFIG_USB_EHCI_HCD_PLATFORM=y\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_ISP1362_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\nCONFIG_USB_OHCI_HCD=y\nCONFIG_USB_OHCI_HCD_PLATFORM=y\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=y\n# CONFIG_USB_PRINTER is not set\nCONFIG_USB_WDM=y\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=m\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\nCONFIG_USB_UAS=m\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_MUSB_HDRC is not set\n# CONFIG_USB_DWC3 is not set\nCONFIG_USB_DWC2=m\nCONFIG_USB_DWC2_HOST=y\n\n#\n# Gadget/Dual-role mode requires USB Gadget support to be enabled\n#\n# CONFIG_USB_DWC2_DEBUG is not set\n# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set\n# CONFIG_USB_CHIPIDEA is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=y\n# CONFIG_USB_SERIAL_CONSOLE is not set\nCONFIG_USB_SERIAL_GENERIC=y\n# CONFIG_USB_SERIAL_SIMPLE is not set\n# CONFIG_USB_SERIAL_AIRCABLE is not set\n# CONFIG_USB_SERIAL_ARK3116 is not set\n# CONFIG_USB_SERIAL_BELKIN is not set\n# CONFIG_USB_SERIAL_CH341 is not set\n# CONFIG_USB_SERIAL_WHITEHEAT is not set\n# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set\nCONFIG_USB_SERIAL_CP210X=m\n# CONFIG_USB_SERIAL_CYPRESS_M8 is not set\n# CONFIG_USB_SERIAL_EMPEG is not set\nCONFIG_USB_SERIAL_FTDI_SIO=m\n# CONFIG_USB_SERIAL_VISOR is not set\n# CONFIG_USB_SERIAL_IPAQ is not set\n# CONFIG_USB_SERIAL_IR is not set\n# CONFIG_USB_SERIAL_EDGEPORT is not set\n# CONFIG_USB_SERIAL_EDGEPORT_TI is not set\n# CONFIG_USB_SERIAL_F81232 is not set\n# CONFIG_USB_SERIAL_GARMIN is not set\n# CONFIG_USB_SERIAL_IPW is not set\n# CONFIG_USB_SERIAL_IUU is not set\n# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set\nCONFIG_USB_SERIAL_KEYSPAN=m\n# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set\n# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set\n# CONFIG_USB_SERIAL_KLSI is not set\n# CONFIG_USB_SERIAL_KOBIL_SCT is not set\n# CONFIG_USB_SERIAL_MCT_U232 is not set\n# CONFIG_USB_SERIAL_METRO is not set\n# CONFIG_USB_SERIAL_MOS7720 is not set\n# CONFIG_USB_SERIAL_MOS7840 is not set\n# CONFIG_USB_SERIAL_MXUPORT is not set\n# CONFIG_USB_SERIAL_NAVMAN is not set\nCONFIG_USB_SERIAL_PL2303=m\nCONFIG_USB_SERIAL_OTI6858=m\n# CONFIG_USB_SERIAL_QCAUX is not set\nCONFIG_USB_SERIAL_QUALCOMM=m\n# CONFIG_USB_SERIAL_SPCP8X5 is not set\n# CONFIG_USB_SERIAL_SAFE is not set\nCONFIG_USB_SERIAL_SIERRAWIRELESS=m\n# CONFIG_USB_SERIAL_SYMBOL is not set\n# CONFIG_USB_SERIAL_TI is not set\n# CONFIG_USB_SERIAL_CYBERJACK is not set\n# CONFIG_USB_SERIAL_XIRCOM is not set\nCONFIG_USB_SERIAL_WWAN=m\nCONFIG_USB_SERIAL_OPTION=m\n# CONFIG_USB_SERIAL_OMNINET is not set\n# CONFIG_USB_SERIAL_OPTICON is not set\n# CONFIG_USB_SERIAL_XSENS_MT is not set\n# CONFIG_USB_SERIAL_WISHBONE is not set\n# CONFIG_USB_SERIAL_SSU100 is not set\n# CONFIG_USB_SERIAL_QT2 is not set\n# CONFIG_USB_SERIAL_DEBUG is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_RIO500 is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_LED is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\nCONFIG_USB_EZUSB_FX2=y\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n\n#\n# USB Physical Layer drivers\n#\n# CONFIG_USB_PHY is not set\n# CONFIG_USB_OTG_WAKELOCK is not set\n# CONFIG_NOP_USB_XCEIV is not set\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\n# CONFIG_USB_ULPI is not set\n# CONFIG_USB_GADGET is not set\n\n#\n# ROCKCHIP USB Support\n#\n# CONFIG_USB20_HOST is not set\n# CONFIG_USB20_OTG is not set\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_UWB is not set\nCONFIG_MMC=y\n# CONFIG_MMC_DEBUG is not set\n# CONFIG_MMC_EMBEDDED_SDIO is not set\n# CONFIG_MMC_PARANOID_SD_INIT is not set\n\n#\n# MMC/SD/SDIO Card Drivers\n#\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\nCONFIG_MMC_BLOCK_BOUNCE=y\n# CONFIG_SDIO_UART is not set\nCONFIG_MMC_TEST=y\n# CONFIG_MMC_SIMULATE_MAX_SPEED is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_ARMMMCI is not set\n# CONFIG_MMC_SDHCI is not set\n# CONFIG_MMC_SPI is not set\nCONFIG_MMC_DW=y\nCONFIG_MMC_DW_PLTFM=y\n# CONFIG_MMC_DW_EXYNOS is not set\n# CONFIG_MMC_DW_K3 is not set\nCONFIG_MMC_DW_ROCKCHIP=y\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\n# CONFIG_LEDS_CLASS_FLASH is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP5521 is not set\n# CONFIG_LEDS_LP5523 is not set\n# CONFIG_LEDS_LP5562 is not set\n# CONFIG_LEDS_LP8501 is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\n# CONFIG_LEDS_PWM is not set\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_SYSCON is not set\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\n# CONFIG_LEDS_TRIGGER_TIMER is not set\n# CONFIG_LEDS_TRIGGER_ONESHOT is not set\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\n# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set\nCONFIG_LEDS_TRIGGER_CPU=y\nCONFIG_LEDS_TRIGGER_GPIO=y\n# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\n# CONFIG_LEDS_TRIGGER_TRANSIENT is not set\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\n# CONFIG_SWITCH is not set\n# CONFIG_ACCESSIBILITY is not set\nCONFIG_EDAC_SUPPORT=y\n# CONFIG_EDAC is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_DS3232 is not set\n# CONFIG_RTC_DRV_FAKE is not set\n# CONFIG_RTC_DRV_HYM8563 is not set\n# CONFIG_RTC_DRV_MAX6900 is not set\nCONFIG_RTC_DRV_RK808=y\n# CONFIG_RTC_DRV_RK_TIMER is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12057 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF8563 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_DS3234 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\n# CONFIG_RTC_DRV_PL031 is not set\n# CONFIG_RTC_DRV_SNVS is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_OF=y\n# CONFIG_AMBA_PL08X is not set\n# CONFIG_FSL_EDMA is not set\n# CONFIG_INTEL_IDMA64 is not set\nCONFIG_PL330_DMA=y\n# CONFIG_DW_DMAC is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\n\n#\n# Virtio drivers\n#\n# CONFIG_VIRTIO_MMIO is not set\n\n#\n# Microsoft Hyper-V guest support\n#\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_COMEDI is not set\n# CONFIG_RTLLIB is not set\nCONFIG_R8712U=m\nCONFIG_R8188EU=m\n# CONFIG_88EU_AP_MODE is not set\nCONFIG_R8723AU=m\n# CONFIG_8723AU_AP_MODE is not set\nCONFIG_8723AU_BT_COEXIST=y\n# CONFIG_VT6656 is not set\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16204 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADIS16220 is not set\n# CONFIG_ADIS16240 is not set\n# CONFIG_LIS3L02DQ is not set\n# CONFIG_SCA3000 is not set\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7606 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7816 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7280 is not set\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7152 is not set\n# CONFIG_AD7746 is not set\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16060 is not set\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n# CONFIG_INV_MPU_IIO is not set\n\n#\n# Light sensors\n#\nCONFIG_SENSORS_ISL29018=y\n# CONFIG_SENSORS_ISL29028 is not set\nCONFIG_TSL2583=y\n# CONFIG_TSL2x7x is not set\n\n#\n# Magnetometer sensors\n#\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7753 is not set\n# CONFIG_ADE7754 is not set\n# CONFIG_ADE7758 is not set\n# CONFIG_ADE7759 is not set\n# CONFIG_ADE7854 is not set\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1200 is not set\n# CONFIG_AD2S1210 is not set\n\n#\n# Triggers - standalone\n#\n# CONFIG_IIO_PERIODIC_RTC_TRIGGER is not set\n# CONFIG_IIO_SIMPLE_DUMMY is not set\n\n#\n# Speakup console speech\n#\n# CONFIG_SPEAKUP is not set\n# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set\n# CONFIG_STAGING_MEDIA is not set\n\n#\n# Android\n#\n# CONFIG_ASHMEM is not set\n# CONFIG_ANDROID_TIMED_OUTPUT is not set\n# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set\n# CONFIG_SYNC is not set\n# CONFIG_ION is not set\nCONFIG_FIQ_DEBUGGER=y\nCONFIG_FIQ_DEBUGGER_NO_SLEEP=y\n# CONFIG_FIQ_DEBUGGER_WAKEUP_IRQ_ALWAYS_ON is not set\nCONFIG_FIQ_DEBUGGER_CONSOLE=y\nCONFIG_FIQ_DEBUGGER_CONSOLE_DEFAULT_ENABLE=y\n# CONFIG_FIQ_DEBUGGER_TRUST_ZONE is not set\n# CONFIG_FIQ_DEBUGGER_UART_OVERLAY is not set\n# CONFIG_FIQ_WATCHDOG is not set\n# CONFIG_RK_CONSOLE_THREAD is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_WIMAX_GDM72XX is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_LUSTRE_FS is not set\n# CONFIG_DGAP is not set\n# CONFIG_GS_FPGABOOT is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_FSL_MC_BUS is not set\n# CONFIG_WILC1000_DRIVER is not set\n# CONFIG_MOST is not set\n# CONFIG_POWERVR_ROGUE_N is not set\n# CONFIG_GOLDFISH is not set\n# CONFIG_CHROME_PLATFORMS is not set\nCONFIG_CLKDEV_LOOKUP=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Common Clock Framework\n#\n# CONFIG_COMMON_CLK_VERSATILE is not set\nCONFIG_COMMON_CLK_RK808=y\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_CLK_QORIQ is not set\n# CONFIG_COMMON_CLK_XGENE is not set\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_PXA is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n\n#\n# Hardware Spinlock drivers\n#\n# CONFIG_HWSPINLOCK_ROCKCHIP is not set\n\n#\n# Clock Source drivers\n#\nCONFIG_CLKSRC_OF=y\nCONFIG_CLKSRC_PROBE=y\nCONFIG_ROCKCHIP_TIMER=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\n# CONFIG_ARM_ARCH_TIMER_VCT_ACCESS is not set\n# CONFIG_ARM_TIMER_SP804 is not set\n# CONFIG_ATMEL_PIT is not set\n# CONFIG_SH_TIMER_CMT is not set\n# CONFIG_SH_TIMER_MTU2 is not set\n# CONFIG_SH_TIMER_TMU is not set\n# CONFIG_EM_TIMER_STI is not set\n# CONFIG_MAILBOX is not set\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\n# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set\nCONFIG_IOMMU_IOVA=y\nCONFIG_OF_IOMMU=y\nCONFIG_IOMMU_DMA=y\nCONFIG_ROCKCHIP_IOMMU=y\n# CONFIG_RK_IOMMU is not set\n# CONFIG_ARM_SMMU is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_STE_MODEM_RPROC is not set\n\n#\n# Rpmsg drivers\n#\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Rockchip CPU selection\n#\nCONFIG_CPU_PX30=y\n# CONFIG_CPU_RK1808 is not set\n# CONFIG_CPU_RK3308 is not set\nCONFIG_CPU_RK3328=y\n# CONFIG_CPU_RK3366 is not set\nCONFIG_CPU_RK3368=y\nCONFIG_CPU_RK3399=y\nCONFIG_ANDROID_VERSION=0x07010000\nCONFIG_ROCKCHIP_CPUINFO=y\n# CONFIG_ROCKCHIP_DEVICEINFO is not set\nCONFIG_ROCKCHIP_IPA=y\nCONFIG_ROCKCHIP_OPP=y\n# CONFIG_ROCKCHIP_PM_TEST is not set\nCONFIG_ROCKCHIP_GRF=y\nCONFIG_ROCKCHIP_PM_DOMAINS=y\nCONFIG_ROCKCHIP_PVTM=y\nCONFIG_ROCKCHIP_SUSPEND_MODE=y\nCONFIG_ROCKCHIP_SYSTEM_MONITOR=y\n# CONFIG_ROCKCHIP_VENDOR_STORAGE_UPDATE_LOADER is not set\n# CONFIG_SUNXI_SRAM is not set\n# CONFIG_SOC_TI is not set\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y\nCONFIG_DEVFREQ_GOV_PERFORMANCE=y\nCONFIG_DEVFREQ_GOV_POWERSAVE=y\nCONFIG_DEVFREQ_GOV_USERSPACE=y\n\n#\n# DEVFREQ Drivers\n#\n# CONFIG_ARM_ROCKCHIP_BUS_DEVFREQ is not set\nCONFIG_ARM_ROCKCHIP_DMC_DEVFREQ=y\nCONFIG_PM_DEVFREQ_EVENT=y\nCONFIG_DEVFREQ_EVENT_ROCKCHIP_DFI=y\n# CONFIG_DEVFREQ_EVENT_ROCKCHIP_NOCP is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\n# CONFIG_EXTCON_USB_GPIO is not set\nCONFIG_MEMORY=y\n# CONFIG_ARM_PL172_MPMC is not set\nCONFIG_IIO=y\nCONFIG_IIO_BUFFER=y\n# CONFIG_IIO_BUFFER_CB is not set\nCONFIG_IIO_KFIFO_BUF=y\nCONFIG_IIO_TRIGGER=y\nCONFIG_IIO_CONSUMERS_PER_TRIGGER=2\n\n#\n# Accelerometers\n#\n# CONFIG_BMA180 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7266 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD799X is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_GPIO_MUXADC is not set\n# CONFIG_HI8435 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_NAU7802 is not set\nCONFIG_ROCKCHIP_SARADC=y\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_VF610_ADC is not set\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n\n#\n# Chemical Sensors\n#\n# CONFIG_VZ89X is not set\n\n#\n# Hid Sensor IIO Common\n#\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_AD5686 is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n\n#\n# Humidity sensors\n#\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_MPU6050_IIO is not set\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM36651 is not set\n# CONFIG_GP2AP020A00F is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\nCONFIG_SENSORS_TSL2563=y\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VL6180 is not set\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8975 is not set\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n\n#\n# Inclinometer sensors\n#\n\n#\n# Triggers - standalone\n#\n# CONFIG_IIO_INTERRUPT_TRIGGER is not set\nCONFIG_IIO_SYSFS_TRIGGER=y\n\n#\n# Digital potentiometers\n#\n# CONFIG_MCP4531 is not set\n\n#\n# Pressure sensors\n#\n# CONFIG_BMP280 is not set\n# CONFIG_MPL115 is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n\n#\n# Proximity sensors\n#\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_SRF04 is not set\n# CONFIG_SX9500 is not set\n\n#\n# Temperature sensors\n#\n# CONFIG_MLX90614 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_FSL_FTM is not set\n# CONFIG_PWM_GPIO is not set\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_PWM_ROCKCHIP=y\n# CONFIG_PWM_ROCKCHIP_I2S is not set\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_V3=y\nCONFIG_PARTITION_PERCPU=y\n# CONFIG_IPACK_BUS is not set\nCONFIG_ARCH_HAS_RESET_CONTROLLER=y\nCONFIG_RESET_CONTROLLER=y\n# CONFIG_FMC is not set\n\n#\n# PHY Subsystem\n#\nCONFIG_GENERIC_PHY=y\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# CONFIG_PHY_SAMSUNG_USB2 is not set\n# CONFIG_PHY_XGENE is not set\n# CONFIG_PHY_ROCKCHIP_USB is not set\n# CONFIG_PHY_ROCKCHIP_INNO_COMBPHY is not set\nCONFIG_PHY_ROCKCHIP_INNO_USB2=y\n# CONFIG_PHY_ROCKCHIP_INNO_USB3 is not set\n# CONFIG_PHY_ROCKCHIP_EMMC is not set\n# CONFIG_PHY_ROCKCHIP_DP is not set\nCONFIG_PHY_ROCKCHIP_MIPI_RX=y\n# CONFIG_PHY_ROCKCHIP_INNO_MIPI_DPHY is not set\n# CONFIG_PHY_ROCKCHIP_INNO_HDMI_PHY is not set\n# CONFIG_PHY_ROCKCHIP_INNO_VIDEO_PHY is not set\nCONFIG_PHY_ROCKCHIP_INNO_VIDEO_COMBO_PHY=y\n# CONFIG_PHY_ROCKCHIP_TYPEC is not set\n# CONFIG_PHY_ROCKCHIP_PCIE is not set\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\nCONFIG_ARM_PMU=y\nCONFIG_RAS=y\n\n#\n# Android\n#\nCONFIG_ANDROID=y\n# CONFIG_ANDROID_BINDER_IPC is not set\n# CONFIG_LIBNVDIMM is not set\nCONFIG_NVMEM=y\n# CONFIG_ROCKCHIP_EFUSE is not set\nCONFIG_ROCKCHIP_OTP=y\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n\n#\n# FPGA Configuration Support\n#\n# CONFIG_FPGA is not set\n# CONFIG_TEE is not set\nCONFIG_RK_FLASH=y\n\n#\n# Rockchip Flash Devices\n#\n# CONFIG_RK_NANDC_NAND is not set\nCONFIG_RK_SFC_NAND=y\nCONFIG_RK_SFC_NOR=y\nCONFIG_RK_SFC_NOR_MTD=y\n# CONFIG_RK_NAND is not set\n\n#\n# Headset device support\n#\n# CONFIG_RK_HEADSET is not set\n\n#\n# Gator module for ARM streamline\n#\nCONFIG_GATOR=m\nCONFIG_GATOR_DO_NOT_ONLINE_CORES_AT_STARTUP=y\nCONFIG_GATOR_WITH_MALI_SUPPORT=y\n# CONFIG_GATOR_MALI_4XXMP is not set\nCONFIG_GATOR_MALI_MIDGARD=y\nCONFIG_GATOR_MALI_MIDGARD_PATH=\"drivers/gpu/arm/bifrost_for_linux\"\n\n#\n# Firmware Drivers\n#\nCONFIG_ARM_PSCI_FW=y\n# CONFIG_FIRMWARE_MEMMAP is not set\nCONFIG_HAVE_ARM_SMCCC=y\nCONFIG_ROCKCHIP_SIP=y\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\n# CONFIG_EXT2_FS is not set\nCONFIG_EXT3_FS=y\nCONFIG_EXT3_FS_POSIX_ACL=y\n# CONFIG_EXT3_FS_SECURITY is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_ENCRYPTION is not set\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\n# CONFIG_REISERFS_FS is not set\n# CONFIG_JFS_FS is not set\n# CONFIG_XFS_FS is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\n# CONFIG_BTRFS_FS is not set\n# CONFIG_NILFS2_FS is not set\n# CONFIG_F2FS_FS is not set\n# CONFIG_FS_DAX is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\nCONFIG_FSNOTIFY=y\n# CONFIG_DNOTIFY is not set\nCONFIG_INOTIFY_USER=y\n# CONFIG_FANOTIFY is not set\n# CONFIG_QUOTA is not set\n# CONFIG_QUOTACTL is not set\nCONFIG_AUTOFS4_FS=y\nCONFIG_FUSE_FS=y\n# CONFIG_CUSE is not set\nCONFIG_OVERLAY_FS=y\n\n#\n# Caches\n#\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_HISTOGRAM is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_FSCACHE_OBJECT_LIST is not set\n# CONFIG_CACHEFILES is not set\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\n# CONFIG_UDF_FS is not set\n\n#\n# DOS/FAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\nCONFIG_MSDOS_FS=y\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=936\nCONFIG_FAT_DEFAULT_IOCHARSET=\"utf8\"\nCONFIG_FAT_DEFAULT_UTF8=y\nCONFIG_EXFAT_FS=y\nCONFIG_EXFAT_DEFAULT_CODEPAGE=936\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\nCONFIG_EXFAT_VIRTUAL_XATTR=y\nCONFIG_EXFAT_VIRTUAL_XATTR_SELINUX_LABEL=\"u:object_r:exfat:s0\"\nCONFIG_EXFAT_DEBUG=n\nCONFIG_EXFAT_UEVENT=n\n# CONFIG_NTFS_FS is not set\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\n# CONFIG_PROC_KCORE is not set\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_PROC_UID=y\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_HUGETLBFS is not set\n# CONFIG_HUGETLB_PAGE is not set\nCONFIG_CONFIGFS_FS=y\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\n# CONFIG_SDCARD_FS is not set\n# CONFIG_HFS_FS is not set\n# CONFIG_HFSPLUS_FS is not set\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_JFFS2_FS is not set\n# CONFIG_LOGFS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\nCONFIG_SQUASHFS_DECOMP_SINGLE=y\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\n# CONFIG_SQUASHFS_LZ4 is not set\nCONFIG_SQUASHFS_LZO=y\n# CONFIG_SQUASHFS_XZ is not set\n# CONFIG_SQUASHFS_ZSTD is not set\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\nCONFIG_PSTORE=y\nCONFIG_PSTORE_CONSOLE=y\n# CONFIG_PSTORE_PMSG is not set\n# CONFIG_PSTORE_FTRACE is not set\nCONFIG_PSTORE_RAM=y\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\nCONFIG_NFS_V3_ACL=y\nCONFIG_NFS_V4=y\nCONFIG_NFS_SWAP=y\n# CONFIG_NFS_V4_1 is not set\n# CONFIG_ROOT_NFS is not set\n# CONFIG_NFS_FSCACHE is not set\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_ACL_SUPPORT=y\nCONFIG_NFS_COMMON=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_SWAP=y\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\n# CONFIG_CIFS_STATS is not set\n# CONFIG_CIFS_WEAK_PW_HASH is not set\n# CONFIG_CIFS_UPCALL is not set\nCONFIG_CIFS_XATTR=y\nCONFIG_CIFS_POSIX=y\nCONFIG_CIFS_ACL=y\nCONFIG_CIFS_DEBUG=y\n# CONFIG_CIFS_DEBUG2 is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\nCONFIG_CIFS_SMB2=y\n# CONFIG_CIFS_SMB311 is not set\nCONFIG_CIFS_FSCACHE=y\n# CONFIG_NCP_FS is not set\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\nCONFIG_NLS_CODEPAGE_936=y\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\nCONFIG_HAVE_KVM_IRQFD=y\nCONFIG_HAVE_KVM_EVENTFD=y\nCONFIG_KVM_MMIO=y\nCONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y\nCONFIG_KVM_VFIO=y\nCONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL=y\nCONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y\nCONFIG_KVM_COMPAT=y\nCONFIG_VIRTUALIZATION=y\nCONFIG_KVM_ARM_VGIC_V3=y\nCONFIG_KVM=y\nCONFIG_KVM_ARM_HOST=y\nCONFIG_VHOST_NET=m\nCONFIG_VHOST=m\n# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_PROCESS is not set\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_DEBUG_INFO=y\n# CONFIG_DEBUG_INFO_REDUCED is not set\n# CONFIG_DEBUG_INFO_SPLIT is not set\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_GDB_SCRIPTS is not set\nCONFIG_ENABLE_WARN_DEPRECATED=y\nCONFIG_ENABLE_MUST_CHECK=y\nCONFIG_FRAME_WARN=2048\n# CONFIG_STRIP_ASM_SYMS is not set\n# CONFIG_READABLE_ASM is not set\n# CONFIG_UNUSED_SYMBOLS is not set\n# CONFIG_PAGE_OWNER is not set\nCONFIG_DEBUG_FS=y\n# CONFIG_HEADERS_CHECK is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0\nCONFIG_DEBUG_KERNEL=y\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_DEBUG_VM is not set\n# CONFIG_DEBUG_MEMORY_INIT is not set\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_HAVE_ARCH_KASAN=y\n# CONFIG_KASAN is not set\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Lockups and Hangs\n#\nCONFIG_LOCKUP_DETECTOR=y\nCONFIG_HARDLOCKUP_DETECTOR_OTHER_CPU=y\nCONFIG_HARDLOCKUP_DETECTOR=y\n# CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set\nCONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0\nCONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y\nCONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1\nCONFIG_DETECT_HUNG_TASK=y\nCONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120\nCONFIG_BOOTPARAM_HUNG_TASK_PANIC=y\nCONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\nCONFIG_SCHED_DEBUG=y\nCONFIG_SCHED_INFO=y\n# CONFIG_PANIC_ON_RT_THROTTLING is not set\nCONFIG_SCHEDSTATS=y\n# CONFIG_SCHED_STACK_END_CHECK is not set\n# CONFIG_DEBUG_TIMEKEEPING is not set\nCONFIG_TIMER_STATS=y\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\n# CONFIG_DEBUG_RT_MUTEXES is not set\nCONFIG_DEBUG_SPINLOCK=y\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\nCONFIG_STACKTRACE=y\n# CONFIG_DEBUG_KOBJECT is not set\nCONFIG_HAVE_DEBUG_BUGVERBOSE=y\nCONFIG_DEBUG_BUGVERBOSE=y\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PI_LIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\nCONFIG_DEBUG_CREDENTIALS=y\n\n#\n# RCU Debugging\n#\n# CONFIG_PROVE_RCU is not set\n# CONFIG_SPARSE_RCU_POINTER is not set\n# CONFIG_TORTURE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=60\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_GPU_TRACEPOINTS=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_TRACING=y\nCONFIG_GENERIC_TRACER=y\nCONFIG_TRACING_SUPPORT=y\nCONFIG_FTRACE=y\nCONFIG_FUNCTION_TRACER=y\nCONFIG_FUNCTION_GRAPH_TRACER=y\n# CONFIG_PREEMPTIRQ_EVENTS is not set\n# CONFIG_IRQSOFF_TRACER is not set\n# CONFIG_SCHED_TRACER is not set\n# CONFIG_FTRACE_SYSCALLS is not set\n# CONFIG_TRACER_SNAPSHOT is not set\nCONFIG_BRANCH_PROFILE_NONE=y\n# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set\n# CONFIG_PROFILE_ALL_BRANCHES is not set\n# CONFIG_STACK_TRACER is not set\nCONFIG_BLK_DEV_IO_TRACE=y\n# CONFIG_PROBE_EVENTS is not set\nCONFIG_DYNAMIC_FTRACE=y\n# CONFIG_FUNCTION_PROFILER is not set\nCONFIG_FTRACE_MCOUNT_RECORD=y\n# CONFIG_FTRACE_STARTUP_TEST is not set\n# CONFIG_TRACEPOINT_BENCHMARK is not set\n# CONFIG_RING_BUFFER_BENCHMARK is not set\n# CONFIG_RING_BUFFER_STARTUP_TEST is not set\n# CONFIG_TRACE_ENUM_MAP_FILE is not set\nCONFIG_TRACING_EVENTS_GPIO=y\n\n#\n# Runtime Testing\n#\nCONFIG_LKDTM=y\n# CONFIG_TEST_LIST_SORT is not set\n# CONFIG_BACKTRACE_SELF_TEST is not set\n# CONFIG_RBTREE_TEST is not set\n# CONFIG_INTERVAL_TREE_TEST is not set\n# CONFIG_PERCPU_TEST is not set\n# CONFIG_ATOMIC64_SELFTEST is not set\n# CONFIG_TEST_HEXDUMP is not set\n# CONFIG_TEST_STRING_HELPERS is not set\n# CONFIG_TEST_KSTRTOX is not set\n# CONFIG_TEST_PRINTF is not set\n# CONFIG_TEST_RHASHTABLE is not set\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_TEST_LKM is not set\n# CONFIG_TEST_USER_COPY is not set\n# CONFIG_TEST_BPF is not set\n# CONFIG_TEST_FIRMWARE is not set\n# CONFIG_TEST_UDELAY is not set\n# CONFIG_MEMTEST is not set\n# CONFIG_TEST_STATIC_KEYS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_SAMPLES is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\n# CONFIG_ARM64_PTDUMP is not set\nCONFIG_STRICT_DEVMEM=y\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set\nCONFIG_DEBUG_SET_MODULE_RONX=y\nCONFIG_DEBUG_RODATA=y\n# CONFIG_DEBUG_ALIGN_RODATA is not set\n# CONFIG_CORESIGHT is not set\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_BIG_KEYS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY_PERF_EVENTS_RESTRICT is not set\n# CONFIG_SECURITY is not set\nCONFIG_SECURITYFS=y\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\nCONFIG_HAVE_ARCH_HARDENED_USERCOPY=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_TEE_SUPPORT is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_DEFAULT_SECURITY=\"\"\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_BLKCIPHER=y\nCONFIG_CRYPTO_BLKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_PCOMP2=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\nCONFIG_CRYPTO_USER=y\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_WORKQUEUE=y\nCONFIG_CRYPTO_CRYPTD=y\n# CONFIG_CRYPTO_MCRYPTD is not set\nCONFIG_CRYPTO_AUTHENC=m\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_ABLK_HELPER=y\n\n#\n# Authenticated Encryption with Associated Data\n#\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=m\n\n#\n# Block modes\n#\nCONFIG_CRYPTO_CBC=m\n# CONFIG_CRYPTO_HEH is not set\nCONFIG_CRYPTO_CTR=y\n# CONFIG_CRYPTO_CTS is not set\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_PCBC is not set\nCONFIG_CRYPTO_XTS=y\n# CONFIG_CRYPTO_KEYWRAP is not set\n\n#\n# Hash modes\n#\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_HMAC=y\n# CONFIG_CRYPTO_XCBC is not set\n# CONFIG_CRYPTO_VMAC is not set\n\n#\n# Digest\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=y\nCONFIG_CRYPTO_CRCT10DIF=y\nCONFIG_CRYPTO_GHASH=y\n# CONFIG_CRYPTO_POLY1305 is not set\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\n# CONFIG_CRYPTO_RMD128 is not set\n# CONFIG_CRYPTO_RMD160 is not set\n# CONFIG_CRYPTO_RMD256 is not set\n# CONFIG_CRYPTO_RMD320 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_TGR192 is not set\n# CONFIG_CRYPTO_WP512 is not set\n\n#\n# Ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_ANUBIS is not set\nCONFIG_CRYPTO_ARC4=y\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SALSA20 is not set\n# CONFIG_CRYPTO_CHACHA20 is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\n# CONFIG_CRYPTO_TEA is not set\nCONFIG_CRYPTO_TWOFISH=y\nCONFIG_CRYPTO_TWOFISH_COMMON=y\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=m\n# CONFIG_CRYPTO_ZLIB is not set\nCONFIG_CRYPTO_LZO=y\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n\n#\n# Random Number Generation\n#\nCONFIG_CRYPTO_ANSI_CPRNG=y\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\n# CONFIG_CRYPTO_USER_API_AEAD is not set\nCONFIG_CRYPTO_HASH_INFO=y\nCONFIG_CRYPTO_HW=y\n# CONFIG_CRYPTO_DEV_CCP is not set\n# CONFIG_CRYPTO_DEV_ROCKCHIP_V1 is not set\n# CONFIG_CRYPTO_DEV_ROCKCHIP_V2 is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_PUBLIC_KEY_ALGO_RSA=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\nCONFIG_ARM64_CRYPTO=y\nCONFIG_CRYPTO_SHA1_ARM64_CE=y\nCONFIG_CRYPTO_SHA2_ARM64_CE=y\nCONFIG_CRYPTO_GHASH_ARM64_CE=y\n# CONFIG_CRYPTO_POLY_HASH_ARM64_CE is not set\nCONFIG_CRYPTO_AES_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64_CE_CCM=y\nCONFIG_CRYPTO_AES_ARM64_CE_BLK=y\nCONFIG_CRYPTO_AES_ARM64_NEON_BLK=y\nCONFIG_CRYPTO_CRC32_ARM64=y\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_GENERIC_IO=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_CRC_CCITT=y\nCONFIG_CRC16=y\nCONFIG_CRC_T10DIF=y\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\nCONFIG_CRC7=y\nCONFIG_LIBCRC32C=y\n# CONFIG_CRC8 is not set\nCONFIG_AUDIT_ARCH_COMPAT_GENERIC=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=y\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_XZ_DEC=y\n# CONFIG_XZ_DEC_X86 is not set\n# CONFIG_XZ_DEC_POWERPC is not set\n# CONFIG_XZ_DEC_IA64 is not set\nCONFIG_XZ_DEC_ARM=y\nCONFIG_XZ_DEC_ARMTHUMB=y\n# CONFIG_XZ_DEC_SPARC is not set\nCONFIG_XZ_DEC_BCJ=y\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_GZIP=y\nCONFIG_DECOMPRESS_BZIP2=y\nCONFIG_DECOMPRESS_LZMA=y\nCONFIG_DECOMPRESS_XZ=y\nCONFIG_DECOMPRESS_LZO=y\nCONFIG_DECOMPRESS_LZ4=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_REED_SOLOMON=y\nCONFIG_REED_SOLOMON_ENC8=y\nCONFIG_REED_SOLOMON_DEC8=y\nCONFIG_TEXTSEARCH=y\nCONFIG_TEXTSEARCH_KMP=m\nCONFIG_TEXTSEARCH_BM=m\nCONFIG_TEXTSEARCH_FSM=m\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_DMA=y\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_NLATTR=y\nCONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y\nCONFIG_CLZ_TAB=y\n# CONFIG_CORDIC is not set\n# CONFIG_DDR is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\n# CONFIG_SG_SPLIT is not set\nCONFIG_ARCH_HAS_SG_CHAIN=y\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/options",
    "content": "################################################################################\n# setup device defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_PATCH_ARCH=\"aarch64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a35\"\n\t\tTARGET_CPU_FLAGS=\"+crc+crypto+fp+simd\"\n        TARGET_FPU=\"fp-armv8\"\n        TARGET_FEATURES=\"64bit\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_PATCH_ARCH=\"aarch64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a35\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"crypto-neon-fp-armv8\"\n        TARGET_FEATURES=\"32bit\"\n        ;;\n    esac\n\n  # Kernel target\n    KERNEL_TARGET=\"Image\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"\"\n    KERNEL_MAKE_EXTRACMD+=\" rockchip/rk3326-odroidgo2-linux.dtb\"\n    KERNEL_MAKE_EXTRACMD+=\" rockchip/rk3326-odroidgo2-linux-v11.dtb\"\n    KERNEL_MAKE_EXTRACMD+=\" rockchip/rk3326-odroidgo3-linux.dtb\"\n    \n  # Mali GPU family\n    MALI_FAMILY=\"g31\"\n    OPENGLES=\"mali-bifrost\"\n\n  # kernel serial console\n    EXTRA_CMDLINE=\"console=ttyFIQ0 console=tty0 net.iframes=0 fbcon=rotate:3 ssh consoleblank=0\"\n    \n    LINUX=\"odroid-go-a-4.4\"\n\tUBOOT_SYSTEM=\"odroidgo2\"\n    \n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"wlan-firmware misc-firmware\" #rockchip-firmware dvb-firmware\n    \n  # additional drivers to install:\n  # for a list of additional drivers see packages/linux-drivers\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_DRIVERS=\"DRIVER1 DRIVER2\"\n  ADDITIONAL_DRIVERS=\"RTL8812AU\" #RTL8192CU RTL8192DU RTL8192EU RTL8188EU RTL8812AU RTL8821CU\"\n  \n  # driver addons to install:\n  # for a list of additinoal drivers see packages/linux-driver-addons\n  # Space separated list is supported,\n    DRIVER_ADDONS=\"\" #dvb-latest\"\n    \n  # additional packages to install\n    ADDITIONAL_PACKAGES=\"dtc bootini\"\n\n  # debug tty path\n    DEBUG_TTY=\"/dev/ttyFIQ0\"\n\n  # SquashFS compression method (gzip / lzo / xz / zstd)\n    SQUASHFS_COMPRESSION=\"lzo\" \n    \n  # build and install PulseAudio support (yes / no)\n  PULSEAUDIO_SUPPORT=\"yes\"\n\n  # build and install espeak support (yes / no)\n  ESPEAK_SUPPORT=\"no\"\n\n  # build and install bluetooth support (yes / no)\n  BLUETOOTH_SUPPORT=\"yes\"\n\n  # build and install Avahi (Zeroconf) daemon (yes / no)\n  AVAHI_DAEMON=\"no\"\n\n  # build with UPnP support (yes / no)\n  KODI_UPNP_SUPPORT=\"no\"\n\n  # build with NFS support (mounting nfs shares via the OS) (yes / no)\n  NFS_SUPPORT=\"no\"\n\n  # build with Samba Client support (mounting samba shares via the OS) (yes / no)\n  SAMBA_SUPPORT=\"yes\"\n\n  # build and install Samba Server (yes / no)\n  SAMBA_SERVER=\"yes\"\n\n  # build and install SFTP Server (yes / no)\n  SFTP_SERVER=\"yes\"\n\n  # build and install OpenVPN support (yes / no)\n  OPENVPN_SUPPORT=\"no\"\n\n  # build and install diskmounter support (udevil)\n  # this service provide auto mounting support for external drives in the\n  # mediacenter also automount internally drives at boottime via udev (yes / no)\n  UDEVIL=\"yes\"\n\n  # build and install exFAT fuse support (yes / no)\n  EXFAT=\"yes\"\n\n  # build and install NTFS-3G fuse support (yes / no)\n  NTFS3G=\"yes\"\n\n  # build and install hfs filesystem utilities (yes / no)\n  HFSTOOLS=\"yes\"\n\n  # build and install remote support (yes / no)\n  REMOTE_SUPPORT=\"no\"\n\n  # build and install CEC adapter support (yes / no)\n  CEC_SUPPORT=\"no\"\n\n  # build and install CEC framework support (yes / no)\n  CEC_FRAMEWORK_SUPPORT=\"no\"\n\n  # build and install iSCSI support - iscsistart (yes / no)\n  ISCSI_SUPPORT=\"no\"\n\n  # build with swap support (yes / no)\n  SWAP_SUPPORT=\"yes\"\n\n  # swap support enabled per default (yes / no)\n  SWAP_ENABLED_DEFAULT=\"no\"\n\n  # swapfile size if SWAP_SUPPORT=yes in MB\n  SWAPFILESIZE=\"300\"\n\n  # cron support (yes / no)\n  CRON_SUPPORT=\"no\"\n\n  # Distribution Specific source location\n  DISTRO_MIRROR=\"http://sources.libreelec.tv/mirror\"\n  DISTRO_SRC=\"http://sources.libreelec.tv/$LIBREELEC_VERSION\"\n\n  # Settings package name - blank if not required\n  DISTRO_PKG_SETTINGS=\"\"\n\n  # IR remote protocols supported in default config\n  IR_REMOTE_PROTOCOLS=\"\"\n\n  # IR remote keymaps supported in default config\n  IR_REMOTE_KEYMAPS=\"\"\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/packages/enable-oga-sleep/package.mk",
    "content": "PKG_NAME=\"enable-oga-sleep\"\nPKG_VERSION=\"\"\nPKG_SHA256=\"\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"OSS\"\nPKG_DEPENDS_TARGET=\"systemd\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_LONGDESC=\"Sleep configuration\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n\tmkdir -p $INSTALL/usr/config/sleep.conf.d\n\tcp sleep.conf $INSTALL/usr/config/sleep.conf.d/sleep.conf\n\n\tmkdir -p $INSTALL/usr/lib/systemd/system-sleep/\n\tcp sleep.sh $INSTALL/usr/lib/systemd/system-sleep/sleep\n}"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/packages/enable-oga-sleep/sources/sleep.conf",
    "content": "#  This file is part of systemd.\n#\n#  systemd is free software; you can redistribute it and/or modify it\n#  under the terms of the GNU Lesser General Public License as published by\n#  the Free Software Foundation; either version 2.1 of the License, or\n#  (at your option) any later version.\n#\n# Entries in this file show the compile time defaults.\n# You can change settings by editing this file.\n# Defaults can be restored by simply deleting this file.\n#\n# See systemd-sleep.conf(5) for details\n\n[Sleep]\nAllowSuspend=yes\n#AllowHibernation=yes\n#AllowSuspendThenHibernate=yes\n#AllowHybridSleep=yes\n#SuspendMode=suspend\nSuspendState=mem standby freeze\n#HibernateMode=platform shutdown\n#HibernateState=disk\n#HybridSleepMode=suspend platform shutdown\n#HybridSleepState=disk\n#HibernateDelaySec=180min"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/packages/enable-oga-sleep/sources/sleep.sh",
    "content": "#!/bin/bash\n\nOGA=$(cat /proc/device-tree/compatible)\n\ncase $1 in\n   pre)\n    # unload esp8090 WiFi module\n[[ \"${OGA}\" == *\"v11\"* ]] && modprobe -r esp8089\n    # Store sound state. Try to avoid having max volume after resume\n    alsactl store -f /tmp/asound.state\n\t# workaround until dwc2 is fixed\n\tmodprobe -r dwc2\n    # stop hotkey service\n    systemctl stop odroidgoa-headphones.service\n    ;;\n   post)\n    # Restore pre-sleep sound state\n    alsactl restore -f /tmp/asound.state\n    # workaround until dwc2 is fixed\n\tmodprobe -r dwc2\n\tmodprobe -i dwc2\n\t# re-load WiFi module\n[[ \"${OGA}\" == *\"v11\"* ]] &&  modprobe esp8089\n    # re-detect and reapply sound, brightness and hp state\n    systemctl start odroidgoa-headphones.service\n\t;;\nesac\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/packages/odroidgoa-utils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"odroidgoa-utils\"\nPKG_VERSION=\"\"\nPKG_SHA256=\"\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"OSS\"\nPKG_DEPENDS_TARGET=\"toolchain python-evdev enable-oga-sleep usb-modeswitch light retrorun\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_LONGDESC=\"Support scripts for the ODROID-GO Advance\"\nPKG_TOOLCHAIN=\"manual\"\n\nif [ \"${ARCH}\" = \"aarch64\" ]; then\n  PKG_DEPENDS_TARGET+=\" lib32-retrorun\"\nfi\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/bin\n  cp * $INSTALL/usr/bin\n}\n\npost_install() {  \n  enable_service odroidgoa-hotkeys.service\n  enable_service odroidgoa-headphones.service\n}\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/packages/odroidgoa-utils/sources/headphone_sense.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# Switch to headphones if we have them already connected at boot\nGPIO=$(cat /sys/class/gpio/gpio86/value)\n[[ \"$GPIO\" == \"1\" ]] && set_ee_setting \"audio.device\" \"headphone\" || set_ee_setting \"audio.device\" \"speakers\"\n\nif [ -e \"/emuelec/configs/emuelec.conf\" ]; then\n/usr/bin/odroidgoa_utils.sh setaudio $(get_ee_setting \"audio.device\")\n/usr/bin/odroidgoa_utils.sh vol $(get_ee_setting \"audio.volume\")\n/usr/bin/odroidgoa_utils.sh bright $(get_ee_setting \"brightness.level\")\nfi\n\n# Headphone sensing \nDEVICE='/dev/input/event1'\n\nHP_ON='*(SW_HEADPHONE_INSERT), value 0*'\nHP_OFF='*(SW_HEADPHONE_INSERT), value 1*'\n\nevtest \"${DEVICE}\" | while read line; do\n    case $line in\n\t(${HP_ON})\n\tamixer cset name='Playback Path' HP\n\tset_ee_setting \"audio.device\" \"headphone\"\n\t;;\n\t(${HP_OFF})\n\tamixer cset name='Playback Path' SPK\n\tset_ee_setting \"audio.device\" \"speakers\"\n\t;;\n    esac\ndone\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/packages/odroidgoa-utils/sources/odroidgoa_utils.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# THESE NEEDS TO BE CLEANED UP, MAYBE WITH CASE OR FUNCTIONS\n\n# Source predefined functions and variables\n. /etc/profile\n\nif [ \"${1}\" == \"toggleaudio\" ];then\n# Toggle audio output\nCURRENTAUDIO=$(get_ee_setting \"audio.device\")\n\tcase \"${CURRENTAUDIO}\" in\n\t    \"headphone\")\n\t    echo \"setting speakers\"\n\t\tamixer cset name='Playback Path' SPK\n\t\tset_ee_setting \"audio.device\" \"speakers\"\n\t\t;;\n\t    \"auto\"|\"speakers\"|*)\n\t    echo \"setting headphones\"\n\t\tamixer cset name='Playback Path' HP\n\t\tset_ee_setting \"audio.device\" \"headphone\"\n\t\t;;\n\tesac\nfi\n\nif [ \"${1}\" == \"setaudio\" ];then\n# Set audio output second parameter is either headphones or speakers\n\tcase \"${2}\" in\n\t    \"headphone\")\n\t    echo \"setting headphones\"\n\t\tamixer cset name='Playback Path' HP\n\t\tset_ee_setting \"audio.device\" \"headphone\"\n\t\t;;\n\t  \t\"auto\"|\"speakers\"|*)\n\t  \techo \"setting speakers\"\n\t\tamixer cset name='Playback Path' SPK\n\t\tset_ee_setting \"audio.device\" \"speakers\"\n\t\t;;\n\tesac\nfi\n\nif [ \"${1}\" == \"vol\" ];then\nVOLSTEP=5\nCURRENTVOL=$(get_ee_setting \"audio.volume\")\nMAXVOL=100\nMINVOL=0\n\tif [ \"${2}\" == \"+\" ]; then\n\t\tSTEPVOL=$(($CURRENTVOL+$VOLSTEP))\n\telif [ \"${2}\" == \"-\" ]; then\n\t\tSTEPVOL=$(($CURRENTVOL-$VOLSTEP))\n\telse\n\t\tSTEPVOL=${2}\n\tfi\n\t[ \"$STEPVOL\" -ge \"$MAXVOL\" ] && STEPVOL=\"$MAXVOL\"\n\t[ \"$STEPVOL\" -le \"$MINVOL\" ] && STEPVOL=\"$MINVOL\"\n\tamixer set 'Playback' ${STEPVOL}%\n\tset_ee_setting \"audio.volume\" ${STEPVOL}\n  fi    \n\n\nif [ \"${1}\" == \"bright\" ]; then\nSTEPS=\"5\"\nCURBRIGHT=$(cat /sys/class/backlight/backlight/brightness)\nMAXSYSBRIGHT=$(cat /sys/class/backlight/backlight/max_brightness)\nCURRENTBRIGHT=$(awk -v a=\"$CURBRIGHT\" -v b=\"$MAXSYSBRIGHT\" 'BEGIN{print int((a*100/b)+0.5)}')\nMAXBRIGHT=\"100\"\nMINBRIGHT=\"5\"\n\n    if [ \"${2}\" == \"+\" ]; then\n        STEPBRIGHT=$(($CURRENTBRIGHT+$STEPS))\n    elif [ \"${2}\" == \"-\" ]; then\n        STEPBRIGHT=$(($CURRENTBRIGHT-$STEPS))\n    else\n        STEPBRIGHT=${2}\n    fi\n\n    [ \"$STEPBRIGHT\" -ge \"$MAXBRIGHT\" ] && STEPBRIGHT=\"$MAXBRIGHT\"\n    [ \"$STEPBRIGHT\" -le \"$MINBRIGHT\" ] && STEPBRIGHT=\"$MINBRIGHT\"\n    #echo \"Setting bright to $STEPBRIGHT\"\n\n    NEWVAL=$(awk -v a=\"$STEPBRIGHT\" -v b=\"$MAXSYSBRIGHT\" 'BEGIN{print int((a*b/100)+0.5)}')\necho \"${NEWVAL}\" > /sys/class/backlight/backlight/brightness\nset_ee_setting \"brightness.level\" $STEPBRIGHT\nfi\n\nif [ \"${1}\" == \"oga_oc\" ]; then\n\n    case ${2} in \n        \"1.4ghz\")\n        gov=\"userspace\"\n        freq=\"1416000\"\n        ;;\n        \"1.5ghz\")\n        gov=\"userspace\"\n        freq=\"1512000\"\n        ;;\n        *)\n        gov=\"performance\"\n        freq=\"1296000\"\n        ;;\n    esac\n\n    echo ${gov} > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor\n    echo ${freq} > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed\n    echo ${freq} > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq\nfi\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/packages/odroidgoa-utils/sources/oga_events.py",
    "content": "#!/usr/bin/env python3\n\nimport evdev\nimport asyncio\nimport time\nimport os.path\nfrom subprocess import check_output\n\npwrkey = evdev.InputDevice(\"/dev/input/event0\")\n\nif os.path.exists(\"/dev/input/by-path/platform-odroidgo3-joypad-event-joystick\"):\n    odroidgo_joypad = evdev.InputDevice(\"/dev/input/by-path/platform-odroidgo3-joypad-event-joystick\")\n    devicename = \"GO-Super Gamepad\"\n    odroidgo_volume = evdev.InputDevice(\"/dev/input/by-path/platform-odroidgo3-keys-event\")\nelse:\n    odroidgo_joypad = evdev.InputDevice(\"/dev/input/by-path/platform-odroidgo2-joypad-event-joystick\")\n    devicename = \"GO-Advance Gamepad\"\n    \nneed_to_swallow_pwr_key = False # After a resume, we swallow the pwr input that triggered the resume\n\nclass Power:\n    pwr = 116\n\nclass Joypad:\n    l1 = 310\n    r1 = 311\n\n    up = 544\n    down = 545\n    left = 546\n    right = 547\n\n    f1 = 704\n    f2 = 705\n    f5 = 708\n    volu = 115\n    vold = 114\n\ndef runcmd(cmd, *args, **kw):\n    print(f\">>> {cmd}\")\n    check_output(cmd, *args, **kw)\n\nasync def handle_event(device):\n    async for event in device.async_read_loop():\n        global need_to_swallow_pwr_key\n        if device.name == \"rk8xx_pwrkey\":\n            keys = odroidgo_joypad.active_keys()\n            if event.value == 1 and event.code == Power.pwr: # pwr on release\n                if need_to_swallow_pwr_key == False:\n                    need_to_swallow_pwr_key = True\n                    if Joypad.f5 in keys:\n                        runcmd(\"/bin/systemctl poweroff || true\", shell=True)\n                    else:\n                        runcmd(\"/bin/systemctl suspend || true\", shell=True)\n                else:\n                    need_to_swallow_pwr_key = False\n\n        elif device.name == \"odroidgo3-keys\":\n            keys = odroidgo_volume.active_keys()\n            if event.value == 1:\n                if Joypad.volu in keys:\n                        runcmd(\"/usr/bin/odroidgoa_utils.sh vol +\", shell=True)\n                elif Joypad.vold in keys:\n                        runcmd(\"/usr/bin/odroidgoa_utils.sh vol -\", shell=True)\n\n        elif device.name.find(devicename) != -1:\n            keys = odroidgo_joypad.active_keys()\n            print(keys)\n            if event.value == 1 and Joypad.f5 in keys:\n                if event.code == Joypad.up:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh vol +\", shell=True)\n                elif event.code == Joypad.down:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh vol -\", shell=True)\n                elif event.code == Joypad.right:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh bright +\", shell=True)\n                elif event.code == Joypad.left:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh bright -\", shell=True)\n                elif event.code == Joypad.r1:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh toggleaudio\", shell=True)\n\n        if event.code != 0:\n            print(device.name, event)\n\n        time.sleep(0.001)\n\ndef run():\n    asyncio.ensure_future(handle_event(pwrkey))\n    asyncio.ensure_future(handle_event(odroidgo_joypad))\n    if os.path.exists(\"/dev/input/by-path/platform-odroidgo3-joypad-event-joystick\"):\n        asyncio.ensure_future(handle_event(odroidgo_volume))\n\n    loop = asyncio.get_event_loop()\n    loop.run_forever()\n\nif __name__ == \"__main__\": # admire\n    run()\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/packages/odroidgoa-utils/system.d/odroidgoa-headphones.service",
    "content": "[Unit]\nDescription=Odroid Go Advance Headphone Sense\nConditionPathExists=/dev/input/event1\nBefore=emuelec.target\n\n[Service]\nEnvironment=HOME=/storage\nEnvironmentFile=/storage/.config/emulationstation/scripts/es_env.sh\nExecStart=/usr/bin/headphone_sense.sh\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidGoAdvance/packages/odroidgoa-utils/system.d/odroidgoa-hotkeys.service",
    "content": "[Unit]\nDescription=Odroid Go Advance Hotkeys\nConditionPathExists=/dev/input/event0\nConditionPathExists=/dev/input/event2\nBefore=emuelec.target\n\n[Service]\nEnvironment=HOME=/storage\nEnvironmentFile=/storage/.config/emulationstation/scripts/es_env.sh\nExecStart=/usr/bin/oga_events.py\nType=simple\n\n[Install]\nWantedBy=multi-user.target"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/README.md",
    "content": "# OdroidM1\n\nThis is for OdroidM1 devices using RK3568 SOC\n\n**Build**\n\n* `PROJECT=Rockchip DEVICE=OdroidM1 ARCH=aarch64 make image`\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/bootloader/canupdate.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n# Allow upgrades between arm and aarch64\nif [ \"$1\" = \"@PROJECT@.arm\" -o \"$1\" = \"@PROJECT@.aarch64\" ]; then\n  exit 0\nelse\n  exit 1\nfi\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/bootloader/config",
    "content": "CONFIG_BOOTDELAY=1\n# CONFIG_EFI_LOADER is not set\nCONFIG_FIT=y\nCONFIG_FIT_SIGNATURE=n\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/bootloader/install",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n#cp -av idblock.bin $INSTALL/usr/share/bootloader/idbloader.img\n#mv idblock.bin idbloader.img\ncp -av uboot.img $INSTALL/usr/share/bootloader\n#cp -av trust.img $INSTALL/usr/share/bootloader\n\nLE_TMP=$(mktemp -d)\nmkdir -p \"${LE_TMP}/extlinux\" \nmkdir -p $INSTALL/usr/share/bootloader/extlinux\n\nLINUX_DTS_DIR=$(get_build_dir linux)/.install_pkg/usr/share/bootloader\n  for dtb in $LINUX_DTS_DIR/*.dtb; do\n  \nif [ ! -f $dtb ]; then\n continue\nfi\n  \ncat << EOF > \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDT /$(basename ${dtb})\n  APPEND boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@ quiet ${EXTRA_CMDLINE}\nEOF\n\ncp -a \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\" $INSTALL/usr/share/bootloader/extlinux\ndone\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/bootloader/mkimage",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n#if [ -f \"$RELEASE_DIR/3rdparty/bootloader/idbloader.img\" ]; then\n#  echo \"image: burn Odroid M1 idblock.bin to image...\"\n#  dd if=\"$RELEASE_DIR/3rdparty/bootloader/idbloader.img\" of=\"$DISK\" bs=32k seek=1 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\n#fi\n\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/uboot.img\" ]; then\n  echo \"image: burn Odroid M1 uboot.img to image...\"\n  dd if=\"$RELEASE_DIR/3rdparty/bootloader/uboot.img\" of=\"$DISK\" bs=64k seek=128 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\nfi\n\n#if [ -f \"$RELEASE_DIR/3rdparty/bootloader/trust.img\" ]; then\n#  echo \"image: burn Odroid M1 trust.img to image...\"\n#  dd if=\"$RELEASE_DIR/3rdparty/bootloader/trust.img\" of=\"$DISK\" bs=64k seek=192 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\n#fi\n\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/boot.ini\" ]; then\necho \"image: copying boot.ini to root\"\nmcopy \"$RELEASE_DIR/3rdparty/bootloader/boot.ini\" ::\nfi\n\nmkdir -p \"${LE_TMP}/extlinux\"\n\n# copy device trees to part1\nfor dtb in $RELEASE_DIR/3rdparty/bootloader/*.dtb; do\n\nif [ ! -f $dtb ]; then\n continue\nfi\n\ncat << EOF > \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDT /$(basename ${dtb})\n  APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}\nEOF\n\n  [ -e \"$dtb\" ] && mcopy -o \"$dtb\" ::\ndone\n\ncat << EOF > \"${LE_TMP}/boot.cmd\"\nsetenv bootlabel \"${DISTRO}\"\n\nload \\${devtype} \\${devnum}:\\${partition} \\${loadaddr} \\${prefix}config.ini && ini generic \\${loadaddr}\n\nsetenv bootargs \"boot=UUID=\\${boot_uuid} disk=UUID=\\${disk_uuid} \\${extra_cmds}\"\n\nload \\${devtype} \\${devnum}:\\${partition} \\${kernel_addr_r} \\${prefix}KERNEL\nload \\${devtype} \\${devnum}:\\${partition} \\${fdt_addr_r} \\${prefix}\\${dtb_file}\nbooti \\${kernel_addr_r} - \\${fdt_addr_r}\nEOF\n\n${TOOLCHAIN}/bin/mkimage -C none -T script -A arm64 -d ${LE_TMP}/boot.cmd ${LE_TMP}/boot.scr\n\ncat << EOF > \"${LE_TMP}/config.ini\"\n[generic]\nboot_uuid=\"${UUID_SYSTEM}\"\ndisk_uuid=\"${UUID_STORAGE}\"\nextra_cmds=\"${EXTRA_CMDLINE}\"\ndtb_file=\"rk3568-odroid-m1.dtb\"\nEOF\n\nmcopy -so \"${LE_TMP}/extlinux\" ::\nmcopy -so \"${LE_TMP}/boot.scr\" ::\nmcopy -so \"${LE_TMP}/config.ini\" ::\n\n\n\n\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/bootloader/release",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nmkdir -p $RELEASE_DIR/3rdparty/bootloader\n  if [ -n \"$UBOOT_SYSTEM\" ]; then\n    BOOTLOADER_DIR=$(get_build_dir $BOOTLOADER)\n    if [ -f $BOOTLOADER_DIR/idbloader.img ]; then\n      cp -a $BOOTLOADER_DIR/idbloader.img $RELEASE_DIR/3rdparty/bootloader\n    fi\n    if [ -f $BOOTLOADER_DIR/uboot.img ]; then\n      cp -a $BOOTLOADER_DIR/uboot.img $RELEASE_DIR/3rdparty/bootloader\n    fi\n    if [ -f $BOOTLOADER_DIR/trust.img ]; then\n      cp -a $BOOTLOADER_DIR/trust.img $RELEASE_DIR/3rdparty/bootloader\n    fi\n  fi\n  \n  if [ -f $INSTALL/usr/share/bootloader/boot.ini ]; then\n  cp -a $INSTALL/usr/share/bootloader/boot.ini $RELEASE_DIR/3rdparty/bootloader\n  fi\n \n  LINUX_DTS_DIR=$(get_build_dir linux)/arch/$TARGET_KERNEL_ARCH/boot/dts\n  for dtb in $LINUX_DTS_DIR/*.dtb $LINUX_DTS_DIR/*/*.dtb; do\n    if [ -f $dtb ]; then\n      cp -a $dtb $RELEASE_DIR/3rdparty/bootloader\n    fi\n  done\n  \nLE_TMP=$(mktemp -d)\nmkdir -p \"${LE_TMP}/extlinux\" \nmkdir -p $RELEASE_DIR/3rdparty/bootloader\n\nLINUX_DTS_DIR=$(get_build_dir linux)/.install_pkg/usr/share/bootloader\n  for dtb in $RELEASE_DIR/3rdparty/bootloader/*.dtb; do\n\nif [ ! -f $dtb ]; then\n continue\nfi\n\ncat << EOF > \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDT /$(basename ${dtb})\n  APPEND boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@ quiet ${EXTRA_CMDLINE}\nEOF\n\ncp -a \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\" $RELEASE_DIR/3rdparty/bootloader\ndone\n\ncat << EOF > \"${LE_TMP}/config.ini\"\n[generic]\nboot_uuid=\"@BOOT_UUID@\"\ndisk_uuid=\"@DISK_UUID@\"\nextra_cmds=\"${EXTRA_CMDLINE}\"\ndtb_file=\"rk3568-odroid-m1.dtb\"\nEOF\n\ncp -a \"${LE_TMP}/config.ini\" $RELEASE_DIR/3rdparty/bootloader\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/bootloader/update.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n[ -z \"$SYSTEM_ROOT\" ] && SYSTEM_ROOT=\"\"\n[ -z \"$BOOT_ROOT\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"$BOOT_PART\" ] && BOOT_PART=$(df \"$BOOT_ROOT\" | tail -1 | awk {' print $1 '})\nif [ -z \"$BOOT_DISK\" ]; then\n  case $BOOT_PART in\n    /dev/sd[a-z][0-9]*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,[0-9]*,,g\")\n      ;;\n    /dev/mmcblk*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,p[0-9]*,,g\")\n      ;;\n  esac\nfi\n\n# mount $BOOT_ROOT r/w\n  mount -o remount,rw $BOOT_ROOT\n\n\nfor arg in $(cat /proc/cmdline); do\n  case $arg in\n    boot=*)\n      boot=\"${arg#*=}\"\n      case $boot in\n        /dev/mmc*)\n          BOOT_UUID=\"$(blkid $boot | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          BOOT_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" $boot \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n        FOLDER=*)\n          BOOT_UUID=\"$(blkid ${boot#*=} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n      esac\n    ;;\n    disk=*)\n      disk=\"${arg#*=}\"\n      case $disk in\n        /dev/mmc*)\n          DISK_UUID=\"$(blkid $disk | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          DISK_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" $disk \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n        FOLDER=*)\n          DISK_UUID=\"$(blkid ${disk#*=} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n      esac\n    ;;\n  esac\ndone\n\nCONFS=$SYSTEM_ROOT/usr/share/bootloader/extlinux/*.conf\n\nfor all_conf in $CONFS; do\n  conf=\"$(basename ${all_conf})\"\n  echo \"Updating ${conf}...\"\n  cp -p $SYSTEM_ROOT/usr/share/bootloader/extlinux/${conf} $BOOT_ROOT/extlinux/${conf}\n  sed -e \"s/@BOOT_UUID@/${BOOT_UUID}/\" \\\n      -e \"s/@DISK_UUID@/${DISK_UUID}/\" \\\n      -i $BOOT_ROOT/extlinux/${conf}\ndone\n\nif [ -f $SYSTEM_ROOT/usr/share/bootloader/boot.scr ]; then\n  echo \"Updating boot.scr...\"\n  cp -p $SYSTEM_ROOT/usr/share/bootloader/boot.scr $BOOT_ROOT/boot.scr\nfi\n\nif [ -f $SYSTEM_ROOT/usr/share/bootloader/config.ini ]; then\n  echo \"Updating config.ini...\"\n\ncp -p $SYSTEM_ROOT/usr/share/bootloader/config.ini $BOOT_ROOT/config.ini\n\n  sed -e \"s/@BOOT_UUID@/${BOOT_UUID}/\" \\\n      -e \"s/@DISK_UUID@/${DISK_UUID}/\" \\\n      -i $BOOT_ROOT/config.ini\nfi\n\n# update device tree\n  for all_dtb in $SYSTEM_ROOT/usr/share/bootloader/*.dtb; do\n    dtb=$(basename $all_dtb)\n      echo -n \"Updating $dtb... \"\n      cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT\n      echo \"done\"\n  done\n\n# update bootloader\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/idbloader.img ]; then\n    echo -n \"Updating idbloader.img... \"\n    dd if=$SYSTEM_ROOT/usr/share/bootloader/idbloader.img of=$BOOT_DISK bs=32k seek=1 conv=fsync &>/dev/null\n    echo \"done\"\n  fi\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/uboot.img ]; then\n    echo -n \"Updating uboot.img... \"\n    dd if=$SYSTEM_ROOT/usr/share/bootloader/uboot.img of=$BOOT_DISK bs=64k seek=128 conv=fsync &>/dev/null\n    echo \"done\"\n  fi\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/trust.img ]; then\n    echo -n \"Updating trust.img... \"\n    dd if=$SYSTEM_ROOT/usr/share/bootloader/trust.img of=$BOOT_DISK bs=64k seek=192 conv=fsync &>/dev/null\n    echo \"done\"\n  fi\n\n# mount $BOOT_ROOT r/o\n  sync\n  mount -o remount,ro $BOOT_ROOT\n  \n# Leave a hint that we just did an update\necho \"UPDATE\" > /storage/.config/boot.hint\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/linux/OdroidM1-4.19/linux.aarch64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm64 4.19.193 Kernel Configuration\n#\n\n#\n# Compiler: aarch64-linux-gnu-gcc (Linaro GCC 7.5-2019.12) 7.5.0\n#\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=70500\nCONFIG_CLANG_VERSION=0\nCONFIG_CC_HAS_ASM_GOTO=y\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_EXTABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\nCONFIG_LOCALVERSION=\"\"\nCONFIG_LOCALVERSION_AUTO=y\nCONFIG_BUILD_SALT=\"\"\nCONFIG_HAVE_KERNEL_GZIP=y\nCONFIG_HAVE_KERNEL_LZ4=y\nCONFIG_KERNEL_GZIP=y\n# CONFIG_KERNEL_LZ4 is not set\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SWAP=y\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\n# CONFIG_POSIX_MQUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_MSI_IRQ=y\nCONFIG_GENERIC_MSI_IRQ_DOMAIN=y\nCONFIG_HANDLE_DOMAIN_IRQ=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\nCONFIG_GENERIC_IRQ_MULTI_HANDLER=y\nCONFIG_ARCH_CLOCKSOURCE_DATA=y\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n# CONFIG_PREEMPT_NONE is not set\nCONFIG_PREEMPT_VOLUNTARY=y\n# CONFIG_PREEMPT is not set\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\n# CONFIG_BSD_PROCESS_ACCT is not set\n# CONFIG_TASKSTATS is not set\n# CONFIG_PSI is not set\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\nCONFIG_BUILD_BIN2C=y\nCONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=18\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\nCONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y\nCONFIG_ARCH_SUPPORTS_INT128=y\nCONFIG_CGROUPS=y\n# CONFIG_MEMCG is not set\n# CONFIG_BLK_CGROUP is not set\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\n# CONFIG_CGROUP_PIDS is not set\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\n# CONFIG_CGROUP_PERF is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_CHECKPOINT_RESTORE is not set\n# CONFIG_SCHED_AUTOGROUP is not set\n# CONFIG_SCHED_TUNE is not set\n# CONFIG_SYSFS_DEPRECATED is not set\nCONFIG_RELAY=y\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\" \"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\nCONFIG_RD_GZIP=y\nCONFIG_RD_BZIP2=y\nCONFIG_RD_LZMA=y\nCONFIG_RD_XZ=y\nCONFIG_RD_LZO=y\nCONFIG_RD_LZ4=y\nCONFIG_INITRAMFS_COMPRESSION=\".gz\"\n# CONFIG_INITRD_ASYNC is not set\n# CONFIG_ROCKCHIP_ONE_INITRD is not set\n# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set\nCONFIG_CC_OPTIMIZE_FOR_SIZE=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\nCONFIG_BPF=y\nCONFIG_EXPERT=y\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\n# CONFIG_SGETMASK_SYSCALL is not set\nCONFIG_SYSFS_SYSCALL=y\n# CONFIG_SYSCTL_SYSCALL is not set\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_PRINTK_NMI=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\n# CONFIG_KALLSYMS_ALL is not set\nCONFIG_KALLSYMS_BASE_RELATIVE=y\n# CONFIG_BPF_SYSCALL is not set\n# CONFIG_USERFAULTFD is not set\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_RSEQ=y\n# CONFIG_DEBUG_RSEQ is not set\nCONFIG_EMBEDDED=y\nCONFIG_HAVE_PERF_EVENTS=y\n# CONFIG_PC104 is not set\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\nCONFIG_VM_EVENT_COUNTERS=y\nCONFIG_SLUB_SYSFS=y\nCONFIG_SLUB_DEBUG=y\n# CONFIG_COMPAT_BRK is not set\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\nCONFIG_SLUB_CPU_PARTIAL=y\nCONFIG_SYSTEM_DATA_VERIFICATION=y\nCONFIG_PROFILING=y\nCONFIG_TRACEPOINTS=y\nCONFIG_ARM64=y\nCONFIG_64BIT=y\nCONFIG_MMU=y\nCONFIG_ARM64_PAGE_SHIFT=12\nCONFIG_ARM64_CONT_SHIFT=4\nCONFIG_ARCH_MMAP_RND_BITS_MIN=18\nCONFIG_ARCH_MMAP_RND_BITS_MAX=24\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_RWSEM_XCHGADD_ALGORITHM=y\nCONFIG_GENERIC_BUG=y\nCONFIG_GENERIC_BUG_RELATIVE_POINTERS=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CSUM=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ZONE_DMA32=y\nCONFIG_HAVE_GENERIC_GUP=y\nCONFIG_SMP=y\nCONFIG_KERNEL_MODE_NEON=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_PGTABLE_LEVELS=3\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_ARCH_PROC_KCORE_TEXT=y\n\n#\n# Platform selection\n#\n# CONFIG_ARCH_ACTIONS is not set\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_BCM2835 is not set\n# CONFIG_ARCH_BCM_IPROC is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_BRCMSTB is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_K3 is not set\n# CONFIG_ARCH_LAYERSCAPE is not set\n# CONFIG_ARCH_LG1K is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_MESON is not set\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_REALTEK is not set\nCONFIG_ARCH_ROCKCHIP=y\n# CONFIG_ARCH_SEATTLE is not set\n# CONFIG_ARCH_SYNQUACER is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_STRATIX10 is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_SPRD is not set\n# CONFIG_ARCH_THUNDER is not set\n# CONFIG_ARCH_THUNDER2 is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_XGENE is not set\n# CONFIG_ARCH_ZX is not set\n# CONFIG_ARCH_ZYNQMP is not set\nCONFIG_ARCH_ROCKCHIP_ODROID_COMMON=y\nCONFIG_ARCH_ROCKCHIP_ODROIDM1=y\n\n#\n# Bus support\n#\nCONFIG_PCI=y\nCONFIG_PCI_DOMAINS=y\nCONFIG_PCI_DOMAINS_GENERIC=y\nCONFIG_PCI_SYSCALL=y\nCONFIG_PCIEPORTBUS=y\nCONFIG_PCIEAER=y\n# CONFIG_PCIEAER_INJECT is not set\n# CONFIG_PCIE_ECRC is not set\nCONFIG_PCIEASPM=y\n# CONFIG_PCIEASPM_DEBUG is not set\n# CONFIG_PCIEASPM_DEFAULT is not set\n# CONFIG_PCIEASPM_POWERSAVE is not set\n# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set\nCONFIG_PCIEASPM_PERFORMANCE=y\nCONFIG_PCIE_PME=y\n# CONFIG_PCIE_DPC is not set\n# CONFIG_PCIE_PTM is not set\nCONFIG_PCI_MSI=y\nCONFIG_PCI_MSI_IRQ_DOMAIN=y\nCONFIG_PCI_QUIRKS=y\nCONFIG_PCI_DEBUG=y\n# CONFIG_PCI_STUB is not set\n# CONFIG_PCI_IOV is not set\n# CONFIG_PCI_PRI is not set\n# CONFIG_PCI_PASID is not set\n# CONFIG_HOTPLUG_PCI is not set\n\n#\n# PCI controller drivers\n#\n\n#\n# Cadence PCIe controllers support\n#\n# CONFIG_PCIE_CADENCE_HOST is not set\n# CONFIG_PCI_FTPCI100 is not set\n# CONFIG_PCI_HOST_GENERIC is not set\n# CONFIG_PCIE_XILINX is not set\n# CONFIG_PCI_XGENE is not set\n# CONFIG_PCI_HOST_THUNDER_PEM is not set\n# CONFIG_PCI_HOST_THUNDER_ECAM is not set\n# CONFIG_PCIE_ROCKCHIP_HOST is not set\n# CONFIG_ROCKCHIP_PCIE_DMA_OBJ is not set\n\n#\n# DesignWare PCI Core Support\n#\nCONFIG_PCIE_DW=y\nCONFIG_PCIE_DW_HOST=y\n# CONFIG_PCIE_DW_PLAT_HOST is not set\nCONFIG_PCIE_DW_ROCKCHIP=y\n# CONFIG_PCI_HISI is not set\n# CONFIG_PCIE_KIRIN is not set\n\n#\n# PCI Endpoint\n#\n# CONFIG_PCI_ENDPOINT is not set\n\n#\n# PCI switch controller drivers\n#\n# CONFIG_PCI_SW_SWITCHTEC is not set\n\n#\n# Kernel Features\n#\n\n#\n# ARM errata workarounds via the alternatives framework\n#\n# CONFIG_ARM64_ERRATUM_826319 is not set\n# CONFIG_ARM64_ERRATUM_827319 is not set\n# CONFIG_ARM64_ERRATUM_824069 is not set\n# CONFIG_ARM64_ERRATUM_819472 is not set\n# CONFIG_ARM64_ERRATUM_832075 is not set\nCONFIG_ARM64_ERRATUM_845719=y\nCONFIG_ARM64_ERRATUM_843419=y\nCONFIG_ARM64_ERRATUM_1024718=y\nCONFIG_ARM64_ERRATUM_1463225=y\nCONFIG_ARM64_ERRATUM_1542419=y\n# CONFIG_CAVIUM_ERRATUM_22375 is not set\n# CONFIG_CAVIUM_ERRATUM_23154 is not set\nCONFIG_CAVIUM_ERRATUM_27456=y\nCONFIG_CAVIUM_ERRATUM_30115=y\nCONFIG_QCOM_FALKOR_ERRATUM_1003=y\nCONFIG_QCOM_FALKOR_ERRATUM_1009=y\nCONFIG_QCOM_QDF2400_ERRATUM_0065=y\nCONFIG_SOCIONEXT_SYNQUACER_PREITS=y\nCONFIG_HISILICON_ERRATUM_161600802=y\nCONFIG_QCOM_FALKOR_ERRATUM_E1041=y\nCONFIG_ARM64_4K_PAGES=y\n# CONFIG_ARM64_16K_PAGES is not set\n# CONFIG_ARM64_64K_PAGES is not set\nCONFIG_ARM64_VA_BITS_39=y\n# CONFIG_ARM64_VA_BITS_48 is not set\nCONFIG_ARM64_VA_BITS=39\nCONFIG_ARM64_PA_BITS_48=y\nCONFIG_ARM64_PA_BITS=48\n# CONFIG_CPU_BIG_ENDIAN is not set\nCONFIG_SCHED_MC=y\n# CONFIG_SCHED_SMT is not set\nCONFIG_NR_CPUS=8\nCONFIG_HOTPLUG_CPU=y\n# CONFIG_NUMA is not set\nCONFIG_HOLES_IN_ZONE=y\n# CONFIG_HZ_100 is not set\n# CONFIG_HZ_250 is not set\nCONFIG_HZ_300=y\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=300\nCONFIG_SCHED_HRTICK=y\nCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y\nCONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_ARCH_SPARSEMEM_DEFAULT=y\nCONFIG_ARCH_SELECT_MEMORY_MODEL=y\nCONFIG_ARCH_FLATMEM_ENABLE=y\nCONFIG_HAVE_ARCH_PFN_VALID=y\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_SYS_SUPPORTS_HUGETLBFS=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_ARCH_HAS_CACHE_LINE_SIZE=y\n# CONFIG_ARM64_DMA_USE_IOMMU is not set\nCONFIG_SECCOMP=y\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\n# CONFIG_KEXEC is not set\n# CONFIG_CRASH_DUMP is not set\n# CONFIG_XEN is not set\nCONFIG_FORCE_MAX_ZONEORDER=11\nCONFIG_UNMAP_KERNEL_AT_EL0=y\nCONFIG_HARDEN_BRANCH_PREDICTOR=y\nCONFIG_HARDEN_EL2_VECTORS=y\nCONFIG_ARM64_SSBD=y\nCONFIG_ARM64_TAGGED_ADDR_ABI=y\nCONFIG_ARMV8_DEPRECATED=y\nCONFIG_SWP_EMULATION=y\nCONFIG_CP15_BARRIER_EMULATION=y\nCONFIG_SETEND_EMULATION=y\n# CONFIG_ARM64_SW_TTBR0_PAN is not set\n\n#\n# ARMv8.1 architectural features\n#\nCONFIG_ARM64_HW_AFDBM=y\nCONFIG_ARM64_PAN=y\nCONFIG_ARM64_LSE_ATOMICS=y\nCONFIG_ARM64_VHE=y\n\n#\n# ARMv8.2 architectural features\n#\nCONFIG_ARM64_UAO=y\n# CONFIG_ARM64_PMEM is not set\nCONFIG_ARM64_RAS_EXTN=y\nCONFIG_ARM64_SVE=y\nCONFIG_ARM64_MODULE_PLTS=y\n# CONFIG_RANDOMIZE_BASE is not set\n\n#\n# Boot options\n#\nCONFIG_CMDLINE=\"\"\n# CONFIG_EFI is not set\nCONFIG_COMPAT=y\nCONFIG_KUSER_HELPERS=y\nCONFIG_SYSVIPC_COMPAT=y\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_SUSPEND_SKIP_SYNC is not set\nCONFIG_HAS_WAKELOCK=y\nCONFIG_WAKELOCK=y\n# CONFIG_HIBERNATION is not set\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\nCONFIG_PM=y\nCONFIG_PM_DEBUG=y\nCONFIG_PM_ADVANCED_DEBUG=y\n# CONFIG_PM_TEST_SUSPEND is not set\nCONFIG_PM_SLEEP_DEBUG=y\n# CONFIG_DPM_WATCHDOG is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\nCONFIG_WQ_POWER_EFFICIENT_DEFAULT=y\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\n# CONFIG_ENERGY_MODEL is not set\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\nCONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\nCONFIG_DT_IDLE_STATES=y\n\n#\n# ARM CPU Idle Drivers\n#\nCONFIG_ARM_CPUIDLE=y\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\n# CONFIG_CPU_FREQ_STAT is not set\n# CONFIG_CPU_FREQ_TIMES is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=y\nCONFIG_CPU_FREQ_GOV_USERSPACE=y\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\nCONFIG_CPU_FREQ_GOV_CONSERVATIVE=y\n# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_INTERACTIVE=y\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\n# CONFIG_CPUFREQ_DUMMY is not set\n# CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set\nCONFIG_ARM_ROCKCHIP_CPUFREQ=y\n# CONFIG_ARM_SCMI_CPUFREQ is not set\n# CONFIG_QORIQ_CPUFREQ is not set\n\n#\n# Firmware Drivers\n#\nCONFIG_ARM_PSCI_FW=y\n# CONFIG_ARM_PSCI_CHECKER is not set\nCONFIG_ARM_SCMI_PROTOCOL=y\nCONFIG_ARM_SCMI_POWER_DOMAIN=y\n# CONFIG_ARM_SCPI_PROTOCOL is not set\n# CONFIG_ARM_SDE_INTERFACE is not set\n# CONFIG_FIRMWARE_MEMMAP is not set\n# CONFIG_FW_CFG_SYSFS is not set\nCONFIG_ROCKCHIP_SIP=y\nCONFIG_HAVE_ARM_SMCCC=y\n# CONFIG_GOOGLE_FIRMWARE is not set\n\n#\n# Tegra firmware driver\n#\n# CONFIG_VIRTUALIZATION is not set\nCONFIG_ARM64_CRYPTO=y\nCONFIG_CRYPTO_SHA256_ARM64=y\n# CONFIG_CRYPTO_SHA512_ARM64 is not set\nCONFIG_CRYPTO_SHA1_ARM64_CE=y\nCONFIG_CRYPTO_SHA2_ARM64_CE=y\n# CONFIG_CRYPTO_SHA512_ARM64_CE is not set\n# CONFIG_CRYPTO_SHA3_ARM64 is not set\n# CONFIG_CRYPTO_SM3_ARM64_CE is not set\n# CONFIG_CRYPTO_SM4_ARM64_CE is not set\nCONFIG_CRYPTO_GHASH_ARM64_CE=y\n# CONFIG_CRYPTO_CRCT10DIF_ARM64_CE is not set\n# CONFIG_CRYPTO_CRC32_ARM64_CE is not set\nCONFIG_CRYPTO_AES_ARM64=y\nCONFIG_CRYPTO_AES_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64_CE_CCM=y\nCONFIG_CRYPTO_AES_ARM64_CE_BLK=y\n# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set\n# CONFIG_CRYPTO_CHACHA20_NEON is not set\n# CONFIG_CRYPTO_POLY1305_NEON is not set\n# CONFIG_CRYPTO_AES_ARM64_BS is not set\n\n#\n# General architecture-dependent options\n#\n# CONFIG_KPROBES is not set\n# CONFIG_JUMP_LABEL is not set\nCONFIG_UPROBES=y\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_HAVE_NMI=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_HAVE_RCU_TABLE_FREE=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_HAVE_ALIGNED_STRUCT_PAGE=y\nCONFIG_HAVE_CMPXCHG_LOCAL=y\nCONFIG_HAVE_CMPXCHG_DOUBLE=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP_FILTER=y\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_CC_HAS_STACKPROTECTOR_NONE=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_ARCH_SUPPORTS_LTO_CLANG=y\nCONFIG_ARCH_SUPPORTS_THINLTO=y\nCONFIG_LTO_NONE=y\nCONFIG_HAVE_CONTEXT_TRACKING=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_HAVE_ARCH_HUGE_VMAP=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_ARCH_MMAP_RND_BITS=18\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=11\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\nCONFIG_REFCOUNT_FULL=y\nCONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\nCONFIG_PLUGIN_HOSTCC=\"\"\nCONFIG_HAVE_GCC_PLUGINS=y\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\nCONFIG_MODULE_FORCE_LOAD=y\nCONFIG_MODULE_UNLOAD=y\nCONFIG_MODULE_FORCE_UNLOAD=y\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\n# CONFIG_MODULE_COMPRESS is not set\n# CONFIG_TRIM_UNUSED_KSYMS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\nCONFIG_BLK_SCSI_REQUEST=y\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_BLK_DEV_BSGLIB is not set\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_DEV_ZONED is not set\n# CONFIG_BLK_CMDLINE_PARSER is not set\n# CONFIG_BLK_WBT is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\n# CONFIG_MAC_PARTITION is not set\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\n# CONFIG_LDM_PARTITION is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\n# CONFIG_CMDLINE_PARTITION is not set\nCONFIG_BLOCK_COMPAT=y\nCONFIG_BLK_MQ_PCI=y\n\n#\n# IO Schedulers\n#\nCONFIG_IOSCHED_NOOP=y\nCONFIG_IOSCHED_DEADLINE=y\nCONFIG_IOSCHED_CFQ=y\n# CONFIG_DEFAULT_DEADLINE is not set\nCONFIG_DEFAULT_CFQ=y\n# CONFIG_DEFAULT_NOOP is not set\nCONFIG_DEFAULT_IOSCHED=\"cfq\"\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\n# CONFIG_IOSCHED_BFQ is not set\nCONFIG_ASN1=y\nCONFIG_ARCH_INLINE_SPIN_TRYLOCK=y\nCONFIG_ARCH_INLINE_SPIN_TRYLOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_LOCK=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_INLINE_READ_LOCK=y\nCONFIG_ARCH_INLINE_READ_LOCK_BH=y\nCONFIG_ARCH_INLINE_READ_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_READ_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_READ_UNLOCK=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_INLINE_WRITE_LOCK=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_BH=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE=y\nCONFIG_UNINLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_USE_QUEUED_SPINLOCKS=y\nCONFIG_QUEUED_SPINLOCKS=y\nCONFIG_ARCH_USE_QUEUED_RWLOCKS=y\nCONFIG_QUEUED_RWLOCKS=y\nCONFIG_ARCH_HAS_SYSCALL_WRAPPER=y\n# CONFIG_GKI_HIDDEN_DRM_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_REGMAP_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_CRYPTO_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_SND_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_SND_SOC_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_GPIO_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_VIRTUAL_CONFIGS is not set\n# CONFIG_GKI_LEGACY_WEXT_ALLCONFIG is not set\n# CONFIG_GKI_HIDDEN_SOC_PM_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_VIDEOBUF2_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_USB_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_SOC_BUS_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_GPU_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_IRQ_CONFIGS is not set\n# CONFIG_GKI_HACKS_TO_FIX is not set\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_ELFCORE=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\n\n#\n# Memory Management options\n#\nCONFIG_SELECT_MEMORY_MODEL=y\n# CONFIG_FLATMEM_MANUAL is not set\nCONFIG_SPARSEMEM_MANUAL=y\nCONFIG_SPARSEMEM=y\nCONFIG_HAVE_MEMORY_PRESENT=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_MEMBLOCK=y\nCONFIG_NO_BOOTMEM=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_SPLIT_PTLOCK_CPUS=4\n# CONFIG_COMPACTION is not set\nCONFIG_MIGRATION=y\nCONFIG_PHYS_ADDR_T_64BIT=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=32768\nCONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y\n# CONFIG_MEMORY_FAILURE is not set\n# CONFIG_TRANSPARENT_HUGEPAGE is not set\n# CONFIG_CLEANCACHE is not set\n# CONFIG_FRONTSWAP is not set\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\n# CONFIG_CMA_DEBUGFS is not set\nCONFIG_CMA_AREAS=7\n# CONFIG_ZPOOL is not set\n# CONFIG_ZBUD is not set\nCONFIG_ZSMALLOC=y\n# CONFIG_PGTABLE_MAPPING is not set\n# CONFIG_ZSMALLOC_STAT is not set\n# CONFIG_MM_EVENT_STAT is not set\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_FRAME_VECTOR=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_BENCHMARK is not set\nCONFIG_ARCH_HAS_PTE_SPECIAL=y\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\nCONFIG_NET_INGRESS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_INTERFACE is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_NET_KEY=y\n# CONFIG_NET_KEY_MIGRATE is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\n# CONFIG_IP_MULTIPLE_TABLES is not set\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\n# CONFIG_IP_PNP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_IP_MROUTE_COMMON=y\nCONFIG_IP_MROUTE=y\n# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set\n# CONFIG_IP_PIMSM_V1 is not set\n# CONFIG_IP_PIMSM_V2 is not set\nCONFIG_SYN_COOKIES=y\n# CONFIG_NET_FOU is not set\n# CONFIG_INET_AH is not set\n# CONFIG_INET_ESP is not set\n# CONFIG_INET_IPCOMP is not set\n# CONFIG_INET_XFRM_MODE_TRANSPORT is not set\n# CONFIG_INET_XFRM_MODE_TUNNEL is not set\n# CONFIG_INET_XFRM_MODE_BEET is not set\n# CONFIG_INET_DIAG is not set\n# CONFIG_TCP_CONG_ADVANCED is not set\nCONFIG_TCP_CONG_CUBIC=y\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set\n# CONFIG_INET6_XFRM_MODE_TUNNEL is not set\n# CONFIG_INET6_XFRM_MODE_BEET is not set\n# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set\n# CONFIG_IPV6_SIT is not set\n# CONFIG_IPV6_TUNNEL is not set\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_NETWORK_SECMARK is not set\nCONFIG_NET_PTP_CLASSIFY=y\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\n# CONFIG_NETFILTER_NETLINK_LOG is not set\n# CONFIG_NETFILTER_NETLINK_OSF is not set\n# CONFIG_NF_CONNTRACK is not set\n# CONFIG_NF_LOG_NETDEV is not set\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=y\n\n#\n# Xtables combined modules\n#\n# CONFIG_NETFILTER_XT_MARK is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\n# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\n# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\n# CONFIG_NETFILTER_XT_MATCH_OWNER is not set\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA2 is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# CONFIG_IP_SET is not set\n# CONFIG_IP_VS is not set\n\n#\n# IP: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\n# CONFIG_NF_REJECT_IPV4 is not set\nCONFIG_IP_NF_IPTABLES=y\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\n# CONFIG_IP_NF_FILTER is not set\nCONFIG_IP_NF_MANGLE=y\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\n# CONFIG_NF_REJECT_IPV6 is not set\n# CONFIG_NF_LOG_IPV6 is not set\n# CONFIG_IP6_NF_IPTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\n# CONFIG_BRIDGE is not set\nCONFIG_HAVE_NET_DSA=y\n# CONFIG_NET_DSA is not set\n# CONFIG_VLAN_8021Q is not set\n# CONFIG_DECNET is not set\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\n# CONFIG_NET_SCHED is not set\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\n# CONFIG_NET_L3_MASTER_DEV is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_XPS=y\n# CONFIG_CGROUP_NET_PRIO is not set\n# CONFIG_CGROUP_NET_CLASSID is not set\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_JIT is not set\nCONFIG_ETHTOOL=y\nCONFIG_FILTER=y\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# CONFIG_HAMRADIO is not set\nCONFIG_CAN=y\nCONFIG_CAN_ROCKCHIP=y\nCONFIG_CANFD_ROCKCHIP=y\nCONFIG_BT=y\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=y\n# CONFIG_BT_RFCOMM_TTY is not set\n# CONFIG_BT_BNEP is not set\nCONFIG_BT_HIDP=y\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_LEDS is not set\n# CONFIG_BT_SELFTEST is not set\nCONFIG_BT_DEBUGFS=y\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=y\nCONFIG_BT_BCM=y\nCONFIG_BT_RTL=y\nCONFIG_BT_HCIBTUSB=y\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\nCONFIG_BT_HCIBTUSB_RTL=y\n# CONFIG_BT_HCIBTSDIO is not set\nCONFIG_BT_HCIUART=y\nCONFIG_BT_HCIUART_H4=y\n# CONFIG_BT_HCIUART_BCSP is not set\nCONFIG_BT_HCIUART_ATH3K=y\n# CONFIG_BT_HCIUART_INTEL is not set\n# CONFIG_BT_HCIUART_AG6XX is not set\n# CONFIG_BT_HCIUART_MRVL is not set\n# CONFIG_BT_HCIBCM203X is not set\n# CONFIG_BT_HCIBPA10X is not set\nCONFIG_BT_HCIBFUSB=y\nCONFIG_BT_HCIVHCI=y\nCONFIG_BT_MRVL=y\nCONFIG_BT_MRVL_SDIO=y\n# CONFIG_BT_ATH3K is not set\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=y\nCONFIG_NL80211_TESTMODE=y\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\nCONFIG_CFG80211_DEFAULT_PS=y\nCONFIG_CFG80211_DEBUGFS=y\nCONFIG_CFG80211_CRDA_SUPPORT=y\nCONFIG_CFG80211_WEXT=y\nCONFIG_MAC80211=y\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_MINSTREL_HT=y\n# CONFIG_MAC80211_RC_MINSTREL_VHT is not set\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\nCONFIG_MAC80211_DEBUGFS=y\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\nCONFIG_MAC80211_DEBUG_MENU=y\n# CONFIG_MAC80211_NOINLINE is not set\nCONFIG_MAC80211_VERBOSE_DEBUG=y\n# CONFIG_MAC80211_MLME_DEBUG is not set\n# CONFIG_MAC80211_STA_DEBUG is not set\n# CONFIG_MAC80211_HT_DEBUG is not set\n# CONFIG_MAC80211_OCB_DEBUG is not set\n# CONFIG_MAC80211_IBSS_DEBUG is not set\n# CONFIG_MAC80211_PS_DEBUG is not set\n# CONFIG_MAC80211_TDLS_DEBUG is not set\n# CONFIG_MAC80211_DEBUG_COUNTERS is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\n# CONFIG_WIMAX is not set\nCONFIG_RFKILL=y\nCONFIG_RFKILL_LEDS=y\n# CONFIG_RFKILL_INPUT is not set\n# CONFIG_RFKILL_GPIO is not set\nCONFIG_RFKILL_RK=y\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_GRO_CELLS=y\n# CONFIG_NET_DEVLINK is not set\nCONFIG_MAY_USE_DEVLINK=y\n# CONFIG_FAILOVER is not set\nCONFIG_HAVE_EBPF_JIT=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\n\n#\n# Generic Driver Options\n#\nCONFIG_UEVENT_HELPER=y\nCONFIG_UEVENT_HELPER_PATH=\"\"\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\nCONFIG_FW_CACHE=y\nCONFIG_WANT_DEV_COREDUMP=y\nCONFIG_ALLOW_DEV_COREDUMP=y\nCONFIG_DEV_COREDUMP=y\n# CONFIG_DEBUG_DRIVER is not set\nCONFIG_DEBUG_DEVRES=y\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\n# CONFIG_MALI_MEMORY_GROUP_MANAGER is not set\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_DMA_CMA=y\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=16\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n\n#\n# Bus devices\n#\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_SIMPLE_PM_BUS is not set\n# CONFIG_VEXPRESS_CONFIG is not set\nCONFIG_CONNECTOR=y\nCONFIG_PROC_EVENTS=y\n# CONFIG_GNSS is not set\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\nCONFIG_MTD_CMDLINE_PARTS=y\n# CONFIG_MTD_AFS_PARTS is not set\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AR7_PARTS is not set\n\n#\n# Partition parsers\n#\n\n#\n# User Modules And Translation Layers\n#\nCONFIG_MTD_BLKDEVS=y\nCONFIG_MTD_BLOCK=y\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\n# CONFIG_MTD_OOPS is not set\n# CONFIG_MTD_SWAP is not set\n# CONFIG_MTD_PARTITIONED_MASTER is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\n# CONFIG_MTD_CFI is not set\n# CONFIG_MTD_JEDECPROBE is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_INTEL_VR_NOR is not set\n# CONFIG_MTD_PLATRAM is not set\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_PMC551 is not set\n# CONFIG_MTD_DATAFLASH is not set\n# CONFIG_MTD_MCHP23K256 is not set\n# CONFIG_MTD_SST25L is not set\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\n# CONFIG_MTD_ONENAND is not set\n# CONFIG_MTD_NAND is not set\n# CONFIG_MTD_SPI_NAND is not set\n\n#\n# LPDDR & LPDDR2 PCM memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\n# CONFIG_MTD_SPI_NOR is not set\nCONFIG_MTD_UBI=y\nCONFIG_MTD_UBI_WL_THRESHOLD=4096\nCONFIG_MTD_UBI_BEB_LIMIT=20\n# CONFIG_MTD_UBI_FASTMAP is not set\n# CONFIG_MTD_UBI_GLUEBI is not set\n# CONFIG_MTD_UBI_BLOCK is not set\nCONFIG_DTC=y\nCONFIG_OF=y\nCONFIG_DTC_SYMBOLS=y\n# CONFIG_DTC_OMIT_DISABLED is not set\n# CONFIG_DTC_OMIT_EMPTY is not set\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_NET=y\nCONFIG_OF_MDIO=y\nCONFIG_OF_RESERVED_MEM=y\n# CONFIG_OF_OVERLAY is not set\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_CDROM=y\n# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set\nCONFIG_ZRAM=y\n# CONFIG_ZRAM_WRITEBACK is not set\n# CONFIG_ZRAM_MEMORY_TRACKING is not set\n# CONFIG_BLK_DEV_DAC960 is not set\n# CONFIG_BLK_DEV_UMEM is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=8\n# CONFIG_BLK_DEV_CRYPTOLOOP is not set\n# CONFIG_BLK_DEV_DRBD is not set\n# CONFIG_BLK_DEV_NBD is not set\n# CONFIG_BLK_DEV_SKD is not set\n# CONFIG_BLK_DEV_SX8 is not set\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=1\nCONFIG_BLK_DEV_RAM_SIZE=4096\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_RSXX is not set\n\n#\n# NVME Support\n#\nCONFIG_NVME_CORE=y\nCONFIG_BLK_DEV_NVME=y\n# CONFIG_NVME_MULTIPATH is not set\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TARGET is not set\n\n#\n# Misc devices\n#\n# CONFIG_ROCKCHIP_SCR is not set\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_PHANTOM is not set\n# CONFIG_SGI_IOC4 is not set\n# CONFIG_TIFM_CORE is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_HP_ILO is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_USB_SWITCH_FSA9480 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\nCONFIG_SRAM=y\n# CONFIG_PCI_ENDPOINT_TEST is not set\n# CONFIG_PIR_ASCHIP is not set\n# CONFIG_RK803 is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\n# CONFIG_EEPROM_AT25 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\n# CONFIG_EEPROM_93CX6 is not set\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_CB710_CORE is not set\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n\n#\n# Intel MIC & related support\n#\n\n#\n# Intel MIC Bus Driver\n#\n\n#\n# SCIF Bus Driver\n#\n\n#\n# VOP Bus Driver\n#\n\n#\n# Intel MIC Host Driver\n#\n\n#\n# Intel MIC Card Driver\n#\n\n#\n# SCIF Driver\n#\n\n#\n# Intel MIC Coprocessor State Management (COSM) Drivers\n#\n\n#\n# VOP Driver\n#\n# CONFIG_GENWQE is not set\n# CONFIG_ECHO is not set\n# CONFIG_MISC_RTSX_PCI is not set\n# CONFIG_MISC_RTSX_USB is not set\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\nCONFIG_SCSI_MQ_DEFAULT=y\nCONFIG_SCSI_PROC_FS=y\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\n# CONFIG_CHR_DEV_OSST is not set\nCONFIG_BLK_DEV_SR=y\n# CONFIG_CHR_DEV_SG is not set\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\nCONFIG_SCSI_SCAN_ASYNC=y\n\n#\n# SCSI Transports\n#\nCONFIG_SCSI_SPI_ATTRS=y\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_CXGB3_ISCSI is not set\n# CONFIG_SCSI_CXGB4_ISCSI is not set\n# CONFIG_SCSI_BNX2_ISCSI is not set\n# CONFIG_BE2ISCSI is not set\n# CONFIG_BLK_DEV_3W_XXXX_RAID is not set\n# CONFIG_SCSI_HPSA is not set\n# CONFIG_SCSI_3W_9XXX is not set\n# CONFIG_SCSI_3W_SAS is not set\n# CONFIG_SCSI_ACARD is not set\n# CONFIG_SCSI_AACRAID is not set\n# CONFIG_SCSI_AIC7XXX is not set\n# CONFIG_SCSI_AIC79XX is not set\n# CONFIG_SCSI_AIC94XX is not set\n# CONFIG_SCSI_HISI_SAS is not set\n# CONFIG_SCSI_MVSAS is not set\n# CONFIG_SCSI_MVUMI is not set\n# CONFIG_SCSI_ADVANSYS is not set\n# CONFIG_SCSI_ARCMSR is not set\n# CONFIG_SCSI_ESAS2R is not set\n# CONFIG_MEGARAID_NEWGEN is not set\n# CONFIG_MEGARAID_LEGACY is not set\n# CONFIG_MEGARAID_SAS is not set\n# CONFIG_SCSI_MPT3SAS is not set\n# CONFIG_SCSI_MPT2SAS is not set\n# CONFIG_SCSI_SMARTPQI is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_SCSI_HPTIOP is not set\n# CONFIG_SCSI_SNIC is not set\n# CONFIG_SCSI_DMX3191D is not set\n# CONFIG_SCSI_IPS is not set\n# CONFIG_SCSI_INITIO is not set\n# CONFIG_SCSI_INIA100 is not set\n# CONFIG_SCSI_STEX is not set\n# CONFIG_SCSI_SYM53C8XX_2 is not set\n# CONFIG_SCSI_IPR is not set\n# CONFIG_SCSI_QLOGIC_1280 is not set\n# CONFIG_SCSI_QLA_ISCSI is not set\n# CONFIG_SCSI_DC395x is not set\n# CONFIG_SCSI_AM53C974 is not set\n# CONFIG_SCSI_WD719X is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_PMCRAID is not set\n# CONFIG_SCSI_PM8001 is not set\n# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set\n# CONFIG_SCSI_DH is not set\n# CONFIG_SCSI_OSD_INITIATOR is not set\nCONFIG_HAVE_PATA_PLATFORM=y\nCONFIG_ATA=y\nCONFIG_ATA_VERBOSE_ERROR=y\nCONFIG_SATA_PMP=y\n\n#\n# Controllers with non-SFF native interface\n#\nCONFIG_SATA_AHCI=y\nCONFIG_SATA_MOBILE_LPM_POLICY=0\nCONFIG_SATA_AHCI_PLATFORM=y\n# CONFIG_AHCI_CEVA is not set\n# CONFIG_AHCI_QORIQ is not set\n# CONFIG_SATA_INIC162X is not set\n# CONFIG_SATA_ACARD_AHCI is not set\n# CONFIG_SATA_SIL24 is not set\n# CONFIG_ATA_SFF is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\n# CONFIG_BLK_DEV_DM is not set\n# CONFIG_TARGET_CORE is not set\n# CONFIG_FUSION is not set\n\n#\n# IEEE 1394 (FireWire) support\n#\n# CONFIG_FIREWIRE is not set\n# CONFIG_FIREWIRE_NOSY is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\n# CONFIG_DUMMY is not set\n# CONFIG_WIREGUARD is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_FC is not set\n# CONFIG_NET_TEAM is not set\n# CONFIG_MACVLAN is not set\n# CONFIG_IPVLAN is not set\n# CONFIG_VXLAN is not set\n# CONFIG_GENEVE is not set\n# CONFIG_GTP is not set\n# CONFIG_MACSEC is not set\n# CONFIG_NETCONSOLE is not set\n# CONFIG_TUN is not set\n# CONFIG_TUN_VNET_CROSS_LE is not set\n# CONFIG_VETH is not set\n# CONFIG_NLMON is not set\n# CONFIG_ARCNET is not set\n\n#\n# CAIF transport drivers\n#\n\n#\n# Distributed Switch Architecture drivers\n#\nCONFIG_ETHERNET=y\n# CONFIG_NET_VENDOR_3COM is not set\n# CONFIG_NET_VENDOR_ADAPTEC is not set\n# CONFIG_NET_VENDOR_AGERE is not set\nCONFIG_NET_VENDOR_ALACRITECH=y\n# CONFIG_SLICOSS is not set\n# CONFIG_NET_VENDOR_ALTEON is not set\n# CONFIG_ALTERA_TSE is not set\nCONFIG_NET_VENDOR_AMAZON=y\n# CONFIG_ENA_ETHERNET is not set\n# CONFIG_NET_VENDOR_AMD is not set\nCONFIG_NET_VENDOR_AQUANTIA=y\n# CONFIG_NET_VENDOR_ARC is not set\n# CONFIG_NET_VENDOR_ATHEROS is not set\nCONFIG_NET_VENDOR_AURORA=y\n# CONFIG_AURORA_NB8800 is not set\n# CONFIG_NET_VENDOR_BROADCOM is not set\n# CONFIG_NET_VENDOR_BROCADE is not set\nCONFIG_NET_VENDOR_CADENCE=y\n# CONFIG_MACB is not set\n# CONFIG_NET_VENDOR_CAVIUM is not set\n# CONFIG_NET_VENDOR_CHELSIO is not set\n# CONFIG_NET_VENDOR_CISCO is not set\nCONFIG_NET_VENDOR_CORTINA=y\n# CONFIG_GEMINI_ETHERNET is not set\n# CONFIG_DNET is not set\n# CONFIG_NET_VENDOR_DEC is not set\n# CONFIG_NET_VENDOR_DLINK is not set\n# CONFIG_NET_VENDOR_EMULEX is not set\n# CONFIG_NET_VENDOR_EZCHIP is not set\n# CONFIG_NET_VENDOR_HISILICON is not set\n# CONFIG_NET_VENDOR_HP is not set\nCONFIG_NET_VENDOR_HUAWEI=y\n# CONFIG_HINIC is not set\n# CONFIG_NET_VENDOR_INTEL is not set\n# CONFIG_JME is not set\n# CONFIG_NET_VENDOR_MARVELL is not set\n# CONFIG_NET_VENDOR_MELLANOX is not set\n# CONFIG_NET_VENDOR_MICREL is not set\n# CONFIG_NET_VENDOR_MICROCHIP is not set\nCONFIG_NET_VENDOR_MICROSEMI=y\n# CONFIG_NET_VENDOR_MYRI is not set\n# CONFIG_FEALNX is not set\n# CONFIG_NET_VENDOR_NATSEMI is not set\nCONFIG_NET_VENDOR_NETERION=y\n# CONFIG_S2IO is not set\n# CONFIG_VXGE is not set\nCONFIG_NET_VENDOR_NETRONOME=y\n# CONFIG_NFP is not set\nCONFIG_NET_VENDOR_NI=y\n# CONFIG_NET_VENDOR_NVIDIA is not set\n# CONFIG_NET_VENDOR_OKI is not set\n# CONFIG_ETHOC is not set\nCONFIG_NET_VENDOR_PACKET_ENGINES=y\n# CONFIG_HAMACHI is not set\n# CONFIG_YELLOWFIN is not set\n# CONFIG_NET_VENDOR_QLOGIC is not set\n# CONFIG_NET_VENDOR_QUALCOMM is not set\n# CONFIG_NET_VENDOR_RDC is not set\n# CONFIG_NET_VENDOR_REALTEK is not set\n# CONFIG_NET_VENDOR_RENESAS is not set\n# CONFIG_NET_VENDOR_ROCKER is not set\n# CONFIG_NET_VENDOR_SAMSUNG is not set\n# CONFIG_NET_VENDOR_SEEQ is not set\nCONFIG_NET_VENDOR_SOLARFLARE=y\n# CONFIG_SFC is not set\n# CONFIG_SFC_FALCON is not set\n# CONFIG_NET_VENDOR_SILAN is not set\n# CONFIG_NET_VENDOR_SIS is not set\n# CONFIG_NET_VENDOR_SMSC is not set\nCONFIG_NET_VENDOR_SOCIONEXT=y\nCONFIG_NET_VENDOR_STMICRO=y\nCONFIG_STMMAC_ETH=y\nCONFIG_STMMAC_ETHTOOL=y\nCONFIG_STMMAC_FULL=y\nCONFIG_STMMAC_PTP=y\nCONFIG_STMMAC_PLATFORM=y\n# CONFIG_DWMAC_DWC_QOS_ETH is not set\nCONFIG_DWMAC_GENERIC=y\nCONFIG_DWMAC_ROCKCHIP=y\nCONFIG_DWMAC_ROCKCHIP_TOOL=y\n# CONFIG_STMMAC_PCI is not set\n# CONFIG_NET_VENDOR_SUN is not set\n# CONFIG_NET_VENDOR_SYNOPSYS is not set\n# CONFIG_NET_VENDOR_TEHUTI is not set\n# CONFIG_NET_VENDOR_TI is not set\n# CONFIG_NET_VENDOR_VIA is not set\n# CONFIG_NET_VENDOR_WIZNET is not set\n# CONFIG_FDDI is not set\n# CONFIG_HIPPI is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\n# CONFIG_MDIO_BCM_UNIMAC is not set\n# CONFIG_MDIO_BITBANG is not set\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_OCTEON is not set\n# CONFIG_MDIO_THUNDER is not set\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\n# CONFIG_AX88796B_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MICREL_PHY is not set\n# CONFIG_MICROCHIP_PHY is not set\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_QSEMI_PHY is not set\nCONFIG_REALTEK_PHY=y\n# CONFIG_RENESAS_PHY is not set\n# CONFIG_ROCKCHIP_PHY is not set\n# CONFIG_SMSC_PHY is not set\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\n# CONFIG_PPP is not set\n# CONFIG_SLIP is not set\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\n# CONFIG_USB_PEGASUS is not set\nCONFIG_USB_RTL8150=m\nCONFIG_USB_RTL8152=m\n# CONFIG_USB_LAN78XX is not set\nCONFIG_USB_USBNET=y\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=y\n# CONFIG_USB_NET_CDC_EEM is not set\nCONFIG_USB_NET_CDC_NCM=y\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\nCONFIG_USB_NET_CDC_MBIM=m\n# CONFIG_USB_NET_DM9601 is not set\n# CONFIG_USB_NET_SR9700 is not set\n# CONFIG_USB_NET_SR9800 is not set\n# CONFIG_USB_NET_SMSC75XX is not set\n# CONFIG_USB_NET_SMSC95XX is not set\n# CONFIG_USB_NET_GL620A is not set\n# CONFIG_USB_NET_NET1080 is not set\n# CONFIG_USB_NET_PLUSB is not set\n# CONFIG_USB_NET_MCS7830 is not set\nCONFIG_USB_NET_RNDIS_HOST=y\n# CONFIG_USB_NET_CDC_SUBSET is not set\n# CONFIG_USB_NET_ZAURUS is not set\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\n# CONFIG_USB_HSO is not set\n# CONFIG_USB_NET_INT51X1 is not set\n# CONFIG_USB_IPHETH is not set\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\nCONFIG_WLAN=y\n# CONFIG_WIRELESS_WDS is not set\n# CONFIG_WLAN_VENDOR_ADMTEK is not set\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\n# CONFIG_ATH5K is not set\n# CONFIG_ATH5K_PCI is not set\n# CONFIG_ATH9K is not set\n# CONFIG_ATH9K_HTC is not set\n# CONFIG_CARL9170 is not set\n# CONFIG_ATH6KL is not set\n# CONFIG_AR5523 is not set\n# CONFIG_WIL6210 is not set\n# CONFIG_ATH10K is not set\n# CONFIG_WCN36XX is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\n# CONFIG_ATMEL is not set\n# CONFIG_AT76C50X_USB is not set\nCONFIG_WLAN_VENDOR_BROADCOM=y\n# CONFIG_B43 is not set\n# CONFIG_B43LEGACY is not set\n# CONFIG_BRCMSMAC is not set\n# CONFIG_BRCMFMAC is not set\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\n# CONFIG_IPW2100 is not set\n# CONFIG_IPW2200 is not set\n# CONFIG_IWL4965 is not set\n# CONFIG_IWL3945 is not set\n# CONFIG_IWLWIFI is not set\nCONFIG_WLAN_VENDOR_INTERSIL=y\n# CONFIG_HOSTAP is not set\n# CONFIG_HERMES is not set\n# CONFIG_P54_COMMON is not set\n# CONFIG_PRISM54 is not set\nCONFIG_WLAN_VENDOR_MARVELL=y\n# CONFIG_LIBERTAS is not set\nCONFIG_LIBERTAS_THINFIRM=m\n# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set\n# CONFIG_LIBERTAS_THINFIRM_USB is not set\nCONFIG_MWIFIEX=m\nCONFIG_MWIFIEX_SDIO=m\n# CONFIG_MWIFIEX_PCIE is not set\n# CONFIG_MWIFIEX_USB is not set\n# CONFIG_MWL8K is not set\nCONFIG_WLAN_VENDOR_MEDIATEK=y\n# CONFIG_MT7601U is not set\n# CONFIG_MT76x0U is not set\n# CONFIG_MT76x2E is not set\n# CONFIG_MT76x2U is not set\nCONFIG_WLAN_VENDOR_RALINK=y\n# CONFIG_RT2X00 is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\n# CONFIG_RTL8180 is not set\n# CONFIG_RTL8187 is not set\nCONFIG_RTL_CARDS=m\n# CONFIG_RTL8192CE is not set\n# CONFIG_RTL8192SE is not set\n# CONFIG_RTL8192DE is not set\n# CONFIG_RTL8723AE is not set\n# CONFIG_RTL8723BE is not set\n# CONFIG_RTL8188EE is not set\n# CONFIG_RTL8192EE is not set\n# CONFIG_RTL8821AE is not set\n# CONFIG_RTL8192CU is not set\n# CONFIG_RTL8XXXU is not set\nCONFIG_WLAN_VENDOR_RSI=y\n# CONFIG_RSI_91X is not set\nCONFIG_WLAN_VENDOR_ST=y\n# CONFIG_CW1200 is not set\nCONFIG_WLAN_VENDOR_TI=y\n# CONFIG_WL1251 is not set\n# CONFIG_WL12XX is not set\n# CONFIG_WL18XX is not set\n# CONFIG_WLCORE is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\n# CONFIG_USB_ZD1201 is not set\n# CONFIG_ZD1211RW is not set\nCONFIG_WLAN_VENDOR_QUANTENNA=y\n# CONFIG_QTNFMAC_PEARL_PCIE is not set\nCONFIG_WL_ROCKCHIP=m\nCONFIG_WIFI_BUILD_MODULE=y\nCONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP=y\n# CONFIG_WIFI_GENERATE_RANDOM_MAC_ADDR is not set\nCONFIG_BCMDHD=y\nCONFIG_AP6XXX=m\n# CONFIG_AP6XXX_WIFI6 is not set\n# CONFIG_AP6XXX_INDEP_POWER is not set\nCONFIG_BCMDHD_FW_PATH=\"/vendor/etc/firmware/fw_bcmdhd.bin\"\nCONFIG_BCMDHD_NVRAM_PATH=\"/vendor/etc/firmware/nvram.txt\"\n# CONFIG_BCMDHD_STATIC_IF is not set\nCONFIG_RTL_WIRELESS_SOLUTION=y\n# CONFIG_RTL8188EU is not set\n# CONFIG_RTL8188FU is not set\n# CONFIG_RTL8189FS is not set\n# CONFIG_RTL8723CS is not set\n# CONFIG_RTL8723DS is not set\n# CONFIG_RTL8821CS is not set\n# CONFIG_RTL8822BS is not set\n# CONFIG_MVL88W8977 is not set\n# CONFIG_CYW_BCMDHD is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n\n#\n# Enable WiMAX (Networking options) to see the WiMAX drivers\n#\n# CONFIG_WAN is not set\n# CONFIG_VMXNET3 is not set\n# CONFIG_LTE is not set\n# CONFIG_NETDEVSIM is not set\n# CONFIG_NET_FAILOVER is not set\n# CONFIG_ISDN is not set\n# CONFIG_NVM is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\nCONFIG_INPUT_POLLDEV=y\n# CONFIG_INPUT_SPARSEKMAP is not set\nCONFIG_INPUT_MATRIXKMAP=y\n\n#\n# Userland interfaces\n#\n# CONFIG_INPUT_MOUSEDEV is not set\n# CONFIG_INPUT_JOYDEV is not set\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\nCONFIG_KEYBOARD_ADC=y\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\n# CONFIG_KEYBOARD_ATKBD is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=y\nCONFIG_KEYBOARD_GPIO_POLLED=y\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\nCONFIG_KEYBOARD_CROS_EC=y\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\nCONFIG_INPUT_MOUSE=y\n# CONFIG_MOUSE_PS2 is not set\n# CONFIG_MOUSE_SERIAL is not set\n# CONFIG_MOUSE_APPLETOUCH is not set\n# CONFIG_MOUSE_BCM5974 is not set\nCONFIG_MOUSE_CYAPA=y\nCONFIG_MOUSE_ELAN_I2C=y\nCONFIG_MOUSE_ELAN_I2C_I2C=y\n# CONFIG_MOUSE_ELAN_I2C_SMBUS is not set\n# CONFIG_MOUSE_VSXXXAA is not set\n# CONFIG_MOUSE_GPIO is not set\n# CONFIG_MOUSE_SYNAPTICS_I2C is not set\n# CONFIG_MOUSE_SYNAPTICS_USB is not set\nCONFIG_INPUT_JOYSTICK=y\nCONFIG_JOYSTICK_ANALOG=m\nCONFIG_JOYSTICK_A3D=m\nCONFIG_JOYSTICK_ADI=m\nCONFIG_JOYSTICK_COBRA=m\nCONFIG_JOYSTICK_GF2K=m\nCONFIG_JOYSTICK_GRIP=m\nCONFIG_JOYSTICK_GRIP_MP=m\nCONFIG_JOYSTICK_GUILLEMOT=m\nCONFIG_JOYSTICK_INTERACT=m\nCONFIG_JOYSTICK_SIDEWINDER=m\nCONFIG_JOYSTICK_TMDC=m\nCONFIG_JOYSTICK_IFORCE=m\nCONFIG_JOYSTICK_IFORCE_USB=y\n# CONFIG_JOYSTICK_IFORCE_232 is not set\nCONFIG_JOYSTICK_WARRIOR=m\nCONFIG_JOYSTICK_MAGELLAN=m\nCONFIG_JOYSTICK_SPACEORB=m\nCONFIG_JOYSTICK_SPACEBALL=m\nCONFIG_JOYSTICK_STINGER=m\nCONFIG_JOYSTICK_TWIDJOY=m\nCONFIG_JOYSTICK_ZHENHUA=m\nCONFIG_JOYSTICK_AS5011=m\nCONFIG_JOYSTICK_JOYDUMP=m\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\n# CONFIG_JOYSTICK_ADC is not set\n# CONFIG_INPUT_TABLET is not set\nCONFIG_INPUT_TOUCHSCREEN=y\nCONFIG_TOUCHSCREEN_PROPERTIES=y\nCONFIG_TOUCHSCREEN_ADS7846=m\n# CONFIG_TOUCHSCREEN_AD7877 is not set\n# CONFIG_TOUCHSCREEN_AD7879 is not set\n# CONFIG_TOUCHSCREEN_ADC is not set\n# CONFIG_TOUCHSCREEN_AR1021_I2C is not set\nCONFIG_TOUCHSCREEN_ATMEL_MXT=y\n# CONFIG_TOUCHSCREEN_ATMEL_MXT_T37 is not set\n# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_BU21013 is not set\n# CONFIG_TOUCHSCREEN_BU21029 is not set\n# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set\n# CONFIG_TOUCHSCREEN_CY8C40XX is not set\n# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set\n# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set\n# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set\n# CONFIG_TOUCHSCREEN_DYNAPRO is not set\n# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set\n# CONFIG_TOUCHSCREEN_EETI is not set\n# CONFIG_TOUCHSCREEN_EGALAX is not set\n# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set\n# CONFIG_TOUCHSCREEN_EXC3000 is not set\n# CONFIG_TOUCHSCREEN_FUJITSU is not set\nCONFIG_TOUCHSCREEN_GOODIX=y\n# CONFIG_TOUCHSCREEN_GSLX6801 is not set\n# CONFIG_TOUCHSCREEN_GSLX680A is not set\n# CONFIG_TOUCHSCREEN_GSLX680_D708 is not set\n# CONFIG_TOUCHSCREEN_GSLX680_PAD is not set\nCONFIG_TOUCHSCREEN_GSLX680_VR=y\n# CONFIG_TOUCHSCREEN_GSLX680_FIREFLY is not set\nCONFIG_TOUCHSCREEN_GSL3673=y\n# CONFIG_TOUCHSCREEN_GSL3673_800X1280 is not set\n# CONFIG_TOUCHSCREEN_GSL3676 is not set\nCONFIG_TOUCHSCREEN_GT9XX=y\n# CONFIG_TOUCHSCREEN_HIDEEP is not set\n# CONFIG_TOUCHSCREEN_HYN_CST2XX is not set\n# CONFIG_TOUCHSCREEN_ILI210X is not set\n# CONFIG_TOUCHSCREEN_S6SY761 is not set\n# CONFIG_TOUCHSCREEN_GUNZE is not set\n# CONFIG_TOUCHSCREEN_EKTF2127 is not set\nCONFIG_TOUCHSCREEN_ELAN=y\n# CONFIG_TOUCHSCREEN_ELO is not set\n# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set\n# CONFIG_TOUCHSCREEN_WACOM_I2C is not set\nCONFIG_TOUCHSCREEN_WACOM_W9013=y\n# CONFIG_TOUCHSCREEN_MAX11801 is not set\n# CONFIG_TOUCHSCREEN_MCS5000 is not set\n# CONFIG_TOUCHSCREEN_MMS114 is not set\n# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set\n# CONFIG_TOUCHSCREEN_MTOUCH is not set\n# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set\n# CONFIG_TOUCHSCREEN_INEXIO is not set\n# CONFIG_TOUCHSCREEN_MK712 is not set\n# CONFIG_TOUCHSCREEN_PENMOUNT is not set\n# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set\n# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set\n# CONFIG_TOUCHSCREEN_TOUCHWIN is not set\n# CONFIG_TOUCHSCREEN_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set\nCONFIG_TOUCHSCREEN_USB_COMPOSITE=y\nCONFIG_TOUCHSCREEN_USB_EGALAX=y\nCONFIG_TOUCHSCREEN_USB_PANJIT=y\nCONFIG_TOUCHSCREEN_USB_3M=y\nCONFIG_TOUCHSCREEN_USB_ITM=y\nCONFIG_TOUCHSCREEN_USB_ETURBO=y\nCONFIG_TOUCHSCREEN_USB_GUNZE=y\nCONFIG_TOUCHSCREEN_USB_DMC_TSC10=y\nCONFIG_TOUCHSCREEN_USB_IRTOUCH=y\nCONFIG_TOUCHSCREEN_USB_IDEALTEK=y\nCONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y\nCONFIG_TOUCHSCREEN_USB_GOTOP=y\nCONFIG_TOUCHSCREEN_USB_JASTEC=y\nCONFIG_TOUCHSCREEN_USB_ELO=y\nCONFIG_TOUCHSCREEN_USB_E2I=y\nCONFIG_TOUCHSCREEN_USB_ZYTRONIC=y\nCONFIG_TOUCHSCREEN_USB_ETT_TC45USB=y\nCONFIG_TOUCHSCREEN_USB_NEXIO=y\nCONFIG_TOUCHSCREEN_USB_EASYTOUCH=y\n# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set\n# CONFIG_TOUCHSCREEN_TSC_SERIO is not set\n# CONFIG_TOUCHSCREEN_TSC2004 is not set\n# CONFIG_TOUCHSCREEN_TSC2005 is not set\n# CONFIG_TOUCHSCREEN_TSC2007 is not set\n# CONFIG_TOUCHSCREEN_RM_TS is not set\n# CONFIG_TOUCHSCREEN_SILEAD is not set\n# CONFIG_TOUCHSCREEN_SIS_I2C is not set\n# CONFIG_TOUCHSCREEN_ST1232 is not set\n# CONFIG_TOUCHSCREEN_STMFTS is not set\n# CONFIG_TOUCHSCREEN_SUR40 is not set\n# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set\n# CONFIG_TOUCHSCREEN_SX8654 is not set\n# CONFIG_TOUCHSCREEN_TPS6507X is not set\n# CONFIG_TOUCHSCREEN_ZET6223 is not set\n# CONFIG_TOUCHSCREEN_ZFORCE is not set\n# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set\n# CONFIG_TOUCHSCREEN_VTL_CT36X is not set\nCONFIG_TOUCHSCREEN_GT1X=y\n# CONFIG_TOUCHSCREEN_FTS is not set\n# CONFIG_TOUCHSCREEN_FT5436 is not set\nCONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5=y\nCONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICETREE_SUPPORT=y\nCONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_I2C=y\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_SPI is not set\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_MT_A is not set\nCONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_MT_B=y\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_BUTTON is not set\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_PROXIMITY is not set\nCONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICE_ACCESS=y\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICE_ACCESS_API is not set\nCONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_LOADER=y\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_PLATFORM_FW_UPGRADE is not set\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_BINARY_FW_UPGRADE is not set\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_PLATFORM_TTCONFIG_UPGRADE is not set\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_MANUAL_TTCONFIG_UPGRADE is not set\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEBUG_MDL is not set\nCONFIG_TOUCHSCREEN_DWAV_USB_MT=m\nCONFIG_ROCKCHIP_REMOTECTL=y\nCONFIG_ROCKCHIP_REMOTECTL_PWM=y\n\n#\n# handle all sensors\n#\n# CONFIG_SENSOR_DEVICE is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GP2A is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\nCONFIG_INPUT_RK805_PWRKEY=y\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_SOC_BUTTON_ARRAY is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\n# CONFIG_RMI4_CORE is not set\n\n#\n# Hardware I/O ports\n#\n# CONFIG_SERIO is not set\n# CONFIG_GAMEPORT is not set\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_NOZOMI is not set\n# CONFIG_N_GSM is not set\n# CONFIG_TRACE_SINK is not set\nCONFIG_LDISC_AUTOLOAD=y\nCONFIG_DEVMEM=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\nCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y\n# CONFIG_SERIAL_8250_FINTEK is not set\nCONFIG_SERIAL_8250_CONSOLE=y\nCONFIG_SERIAL_8250_DMA=y\n# CONFIG_SERIAL_8250_PCI is not set\nCONFIG_SERIAL_8250_NR_UARTS=10\nCONFIG_SERIAL_8250_RUNTIME_UARTS=10\n# CONFIG_SERIAL_8250_EXTENDED is not set\n# CONFIG_SERIAL_8250_ASPEED_VUART is not set\nCONFIG_SERIAL_8250_FSL=y\nCONFIG_SERIAL_8250_DW=y\n# CONFIG_SERIAL_8250_RT288X is not set\n# CONFIG_SERIAL_8250_MOXA is not set\nCONFIG_SERIAL_OF_PLATFORM=y\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\n# CONFIG_SERIAL_AMBA_PL011 is not set\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_JSM is not set\n# CONFIG_SERIAL_MSM_GENI_HALF_SAMPLING is not set\n# CONFIG_SERIAL_MSM_GENI_EARLY_CONSOLE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_IFX6X60 is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_RP2 is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_DEV_BUS is not set\n# CONFIG_TTY_PRINTK is not set\n# CONFIG_HVC_DCC is not set\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\nCONFIG_HW_RANDOM_CAVIUM=y\nCONFIG_HW_RANDOM_ROCKCHIP=y\n# CONFIG_APPLICOM is not set\n\n#\n# PCMCIA character devices\n#\n# CONFIG_RAW_DRIVER is not set\nCONFIG_TCG_TPM=y\nCONFIG_HW_RANDOM_TPM=y\n# CONFIG_TCG_TIS is not set\n# CONFIG_TCG_TIS_SPI is not set\n# CONFIG_TCG_TIS_I2C_ATMEL is not set\nCONFIG_TCG_TIS_I2C_INFINEON=y\n# CONFIG_TCG_TIS_I2C_NUVOTON is not set\n# CONFIG_TCG_ATMEL is not set\n# CONFIG_TCG_VTPM_PROXY is not set\n# CONFIG_TCG_TIS_ST33ZP24_I2C is not set\n# CONFIG_TCG_TIS_ST33ZP24_SPI is not set\nCONFIG_DEVPORT=y\n# CONFIG_XILLYBUS is not set\n# CONFIG_RANDOM_TRUST_BOOTLOADER is not set\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\n# CONFIG_I2C_MUX_PINCTRL is not set\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_DEMUX_PINCTRL is not set\n# CONFIG_I2C_MUX_MLXCPLD is not set\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# PC SMBus host controller drivers\n#\n# CONFIG_I2C_ALI1535 is not set\n# CONFIG_I2C_ALI1563 is not set\n# CONFIG_I2C_ALI15X3 is not set\n# CONFIG_I2C_AMD756 is not set\n# CONFIG_I2C_AMD8111 is not set\n# CONFIG_I2C_I801 is not set\n# CONFIG_I2C_ISCH is not set\n# CONFIG_I2C_PIIX4 is not set\n# CONFIG_I2C_NFORCE2 is not set\n# CONFIG_I2C_SIS5595 is not set\n# CONFIG_I2C_SIS630 is not set\n# CONFIG_I2C_SIS96X is not set\n# CONFIG_I2C_VIA is not set\n# CONFIG_I2C_VIAPRO is not set\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CADENCE is not set\n# CONFIG_I2C_CBUS_GPIO is not set\n# CONFIG_I2C_DESIGNWARE_PLATFORM is not set\n# CONFIG_I2C_DESIGNWARE_PCI is not set\n# CONFIG_I2C_EMEV2 is not set\n# CONFIG_I2C_GPIO is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\nCONFIG_I2C_RK3X=y\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_THUNDERX is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_PARPORT_LIGHT is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\nCONFIG_I2C_CROS_EC_TUNNEL=y\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\n# CONFIG_SPI_MEM is not set\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\nCONFIG_SPI_BITBANG=y\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_GPIO is not set\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_OC_TINY is not set\n# CONFIG_SPI_PL022 is not set\n# CONFIG_SPI_PXA2XX is not set\nCONFIG_SPI_ROCKCHIP=y\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_THUNDERX is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=y\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\nCONFIG_PINCTRL=y\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_AMD is not set\n# CONFIG_PINCTRL_MCP23S08 is not set\nCONFIG_PINCTRL_ROCKCHIP=y\n# CONFIG_PINCTRL_SINGLE is not set\n# CONFIG_PINCTRL_SX150X is not set\nCONFIG_PINCTRL_RK805=y\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_SYSFS=y\nCONFIG_GPIO_GENERIC=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_DWAPB is not set\n# CONFIG_GPIO_FTGPIO010 is not set\nCONFIG_GPIO_GENERIC_PLATFORM=y\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_MB86S7X is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_PL061 is not set\nCONFIG_GPIO_ROCKCHIP=y\n# CONFIG_GPIO_SYSCON is not set\n# CONFIG_GPIO_XGENE is not set\n# CONFIG_GPIO_XILINX is not set\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADP5588 is not set\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\n# CONFIG_GPIO_PCA953X is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n\n#\n# MFD GPIO expanders\n#\n# CONFIG_GPIO_TPS6586X is not set\n\n#\n# PCI GPIO expanders\n#\n# CONFIG_GPIO_BT8XX is not set\n# CONFIG_GPIO_PCI_IDIO_16 is not set\n# CONFIG_GPIO_PCIE_IDIO_24 is not set\n# CONFIG_GPIO_RDC321X is not set\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n\n#\n# USB GPIO expanders\n#\n# CONFIG_W1 is not set\nCONFIG_POWER_AVS=y\nCONFIG_ROCKCHIP_IODOMAIN=y\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_BRCMSTB is not set\nCONFIG_POWER_RESET_GPIO=y\nCONFIG_POWER_RESET_GPIO_RESTART=y\n# CONFIG_POWER_RESET_LTC2952 is not set\n# CONFIG_POWER_RESET_RESTART is not set\n# CONFIG_POWER_RESET_XGENE is not set\n# CONFIG_POWER_RESET_SYSCON is not set\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\nCONFIG_REBOOT_MODE=y\nCONFIG_SYSCON_REBOOT_MODE=y\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_LEGO_EV3 is not set\nCONFIG_BATTERY_SBS=y\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\nCONFIG_CHARGER_GPIO=y\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LTC3651 is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\nCONFIG_CHARGER_BQ24735=y\n# CONFIG_CHARGER_BQ25700 is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_CROS_USBPD is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_RK816 is not set\nCONFIG_BATTERY_RK817=y\nCONFIG_CHARGER_RK817=y\n# CONFIG_BATTERY_RK818 is not set\n# CONFIG_CHARGER_RK818 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_ARM_SCMI is not set\n# CONFIG_SENSORS_ASPEED is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_I5K_AMB is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\n# CONFIG_SENSORS_GPIO_FAN is not set\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IIO_HWMON is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\nCONFIG_SENSORS_PWM_FAN=m\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_SIS5595 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS1015 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_VIA686A is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_VT8231 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\nCONFIG_THERMAL_WRITABLE_TRIPS=y\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set\nCONFIG_THERMAL_GOV_FAIR_SHARE=y\nCONFIG_THERMAL_GOV_STEP_WISE=y\nCONFIG_THERMAL_GOV_BANG_BANG=y\nCONFIG_THERMAL_GOV_USER_SPACE=y\nCONFIG_THERMAL_GOV_POWER_ALLOCATOR=y\nCONFIG_CPU_THERMAL=y\nCONFIG_CLOCK_THERMAL=y\nCONFIG_DEVFREQ_THERMAL=y\n# CONFIG_THERMAL_EMULATION is not set\n# CONFIG_QORIQ_THERMAL is not set\nCONFIG_ROCKCHIP_THERMAL=y\n# CONFIG_RK_VIRTUAL_THERMAL is not set\n# CONFIG_RK3368_THERMAL is not set\n\n#\n# ACPI INT340X thermal drivers\n#\n# CONFIG_GENERIC_ADC_THERMAL is not set\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\n# CONFIG_WATCHDOG_SYSFS is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_ARM_SBSA_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\nCONFIG_DW_WATCHDOG=y\n# CONFIG_MAX63XX_WATCHDOG is not set\n# CONFIG_ALIM7101_WDT is not set\n# CONFIG_I6300ESB_WDT is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# PCI-based Watchdog Cards\n#\n# CONFIG_PCIPCWATCHDOG is not set\n# CONFIG_WDTPCI is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\nCONFIG_SSB_POSSIBLE=y\n# CONFIG_SSB is not set\nCONFIG_BCMA_POSSIBLE=y\n# CONFIG_BCMA is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AXP20X_I2C is not set\nCONFIG_MFD_CROS_EC=y\n# CONFIG_MFD_CROS_EC_CHARDEV is not set\n# CONFIG_MFD_MADERA is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_LPC_ICH is not set\n# CONFIG_LPC_SCH is not set\n# CONFIG_MFD_JANZ_CMODIO is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77620 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_RDC321X is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RC5T583 is not set\nCONFIG_MFD_RK618=y\n# CONFIG_MFD_RK628 is not set\n# CONFIG_MFD_RK630 is not set\n# CONFIG_MFD_RK630_I2C is not set\n# CONFIG_MFD_RK630_SPI is not set\nCONFIG_MFD_RK808=y\n# CONFIG_MFD_RK1000 is not set\n# CONFIG_MFD_RN5T618 is not set\n# CONFIG_MFD_SEC_CORE is not set\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_SMSC is not set\n# CONFIG_ABX500_CORE is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\nCONFIG_MFD_TPS6586X=y\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_MFD_TPS80031 is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_VX855 is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_MFD_ROHM_BD718XX is not set\nCONFIG_FUSB_30X=y\nCONFIG_REGULATOR=y\nCONFIG_REGULATOR_DEBUG=y\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_PROXY_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\nCONFIG_REGULATOR_ACT8865=y\n# CONFIG_REGULATOR_AD5398 is not set\n# CONFIG_REGULATOR_ANATOP is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\nCONFIG_REGULATOR_FAN53555=y\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\nCONFIG_REGULATOR_LP8752=y\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\nCONFIG_REGULATOR_MP8865=y\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\nCONFIG_REGULATOR_PWM=y\nCONFIG_REGULATOR_RK808=y\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS549B22 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\nCONFIG_REGULATOR_TPS65132=y\n# CONFIG_REGULATOR_TPS6524X is not set\nCONFIG_REGULATOR_TPS6586X=y\n# CONFIG_REGULATOR_VCTRL is not set\nCONFIG_REGULATOR_XZ3216=y\n# CONFIG_REGULATOR_DIO5632 is not set\nCONFIG_CEC_CORE=y\nCONFIG_CEC_NOTIFIER=y\n# CONFIG_RC_CORE is not set\nCONFIG_MEDIA_SUPPORT=y\n\n#\n# Multimedia core support\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\n# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set\n# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set\n# CONFIG_MEDIA_RADIO_SUPPORT is not set\n# CONFIG_MEDIA_SDR_SUPPORT is not set\nCONFIG_MEDIA_CEC_SUPPORT=y\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_VIDEO_DEV=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\nCONFIG_VIDEO_V4L2=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\n# CONFIG_VIDEO_PCI_SKELETON is not set\nCONFIG_V4L2_MEM2MEM_DEV=y\nCONFIG_V4L2_FWNODE=y\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\nCONFIG_USB_VIDEO_CLASS=y\n# CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV is not set\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_VIDEO_CPIA2 is not set\n# CONFIG_USB_ZR364XX is not set\n# CONFIG_USB_STKWEBCAM is not set\n# CONFIG_USB_S2255 is not set\n# CONFIG_VIDEO_USBTV is not set\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\n# CONFIG_VIDEO_EM28XX is not set\n\n#\n# USB HDMI CEC adapters\n#\n# CONFIG_USB_PULSE8_CEC is not set\n# CONFIG_USB_RAINSHADOW_CEC is not set\n# CONFIG_MEDIA_PCI_SUPPORT is not set\nCONFIG_V4L_PLATFORM_DRIVERS=y\n# CONFIG_VIDEO_CAFE_CCIC is not set\n# CONFIG_VIDEO_CADENCE is not set\n# CONFIG_VIDEO_MUX is not set\nCONFIG_SOC_CAMERA=y\n# CONFIG_SOC_CAMERA_PLATFORM is not set\n# CONFIG_VIDEO_XILINX is not set\n# CONFIG_VIDEO_ROCKCHIP_CIF is not set\nCONFIG_VIDEO_ROCKCHIP_ISP1=y\nCONFIG_VIDEO_ROCKCHIP_ISP=m\n# CONFIG_VIDEO_ROCKCHIP_ISP_VERSION_V1X is not set\n# CONFIG_VIDEO_ROCKCHIP_ISP_VERSION_V20 is not set\nCONFIG_VIDEO_ROCKCHIP_ISP_VERSION_V21=y\n# CONFIG_VIDEO_ROCKCHIP_ISPP is not set\nCONFIG_V4L_MEM2MEM_DRIVERS=y\n# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set\n# CONFIG_VIDEO_SH_VEU is not set\nCONFIG_VIDEO_ROCKCHIP_RGA=y\n# CONFIG_V4L_TEST_DRIVERS is not set\n# CONFIG_CEC_PLATFORM_DRIVERS is not set\n\n#\n# Supported MMC/SDIO adapters\n#\n# CONFIG_CYPRESS_FIRMWARE is not set\nCONFIG_VIDEOBUF2_CORE=y\nCONFIG_VIDEOBUF2_V4L2=y\nCONFIG_VIDEOBUF2_MEMOPS=y\nCONFIG_VIDEOBUF2_DMA_CONTIG=y\nCONFIG_VIDEOBUF2_VMALLOC=y\nCONFIG_VIDEOBUF2_DMA_SG=y\n\n#\n# Media ancillary drivers (tuners, sensors, i2c, spi, frontends)\n#\n# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set\n\n#\n# I2C Encoders, decoders, sensors and other helper chips\n#\n\n#\n# Audio decoders, processors and mixers\n#\n# CONFIG_VIDEO_TVAUDIO is not set\n# CONFIG_VIDEO_TDA7432 is not set\n# CONFIG_VIDEO_TDA9840 is not set\n# CONFIG_VIDEO_TDA1997X is not set\n# CONFIG_VIDEO_TEA6415C is not set\n# CONFIG_VIDEO_TEA6420 is not set\n# CONFIG_VIDEO_MSP3400 is not set\n# CONFIG_VIDEO_CS3308 is not set\n# CONFIG_VIDEO_CS5345 is not set\n# CONFIG_VIDEO_CS53L32A is not set\n# CONFIG_VIDEO_TLV320AIC23B is not set\n# CONFIG_VIDEO_UDA1342 is not set\n# CONFIG_VIDEO_WM8775 is not set\n# CONFIG_VIDEO_WM8739 is not set\n# CONFIG_VIDEO_VP27SMPX is not set\n# CONFIG_VIDEO_SONY_BTF_MPX is not set\n\n#\n# RDS decoders\n#\n# CONFIG_VIDEO_SAA6588 is not set\n\n#\n# Video decoders\n#\n# CONFIG_VIDEO_ADV7180 is not set\n# CONFIG_VIDEO_ADV7183 is not set\n# CONFIG_VIDEO_ADV748X is not set\n# CONFIG_VIDEO_ADV7604 is not set\n# CONFIG_VIDEO_ADV7842 is not set\n# CONFIG_VIDEO_BT819 is not set\n# CONFIG_VIDEO_BT856 is not set\n# CONFIG_VIDEO_BT866 is not set\n# CONFIG_VIDEO_KS0127 is not set\n# CONFIG_VIDEO_ML86V7667 is not set\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9718 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# CONFIG_VIDEO_FP5501 is not set\n# CONFIG_VIDEO_FP5510 is not set\n# CONFIG_VIDEO_GT9760S is not set\n# CONFIG_VIDEO_VM149C is not set\n# CONFIG_VIDEO_SAA7110 is not set\n# CONFIG_VIDEO_SAA711X is not set\n# CONFIG_VIDEO_TC358743 is not set\nCONFIG_VIDEO_TC35874X=y\nCONFIG_VIDEO_RK628_CSI=y\n# CONFIG_VIDEO_LT6911UXC is not set\n# CONFIG_VIDEO_LT8619C is not set\n# CONFIG_VIDEO_TECHPOINT is not set\n# CONFIG_VIDEO_TVP514X is not set\n# CONFIG_VIDEO_TVP5150 is not set\n# CONFIG_VIDEO_TVP7002 is not set\n# CONFIG_VIDEO_TW2804 is not set\n# CONFIG_VIDEO_TW9903 is not set\n# CONFIG_VIDEO_TW9906 is not set\n# CONFIG_VIDEO_TW9910 is not set\n# CONFIG_VIDEO_VPX3220 is not set\n\n#\n# Video and audio decoders\n#\n# CONFIG_VIDEO_SAA717X is not set\n# CONFIG_VIDEO_CX25840 is not set\n\n#\n# Video encoders\n#\n# CONFIG_VIDEO_SAA7127 is not set\n# CONFIG_VIDEO_SAA7185 is not set\n# CONFIG_VIDEO_ADV7170 is not set\n# CONFIG_VIDEO_ADV7175 is not set\n# CONFIG_VIDEO_ADV7343 is not set\n# CONFIG_VIDEO_ADV7393 is not set\n# CONFIG_VIDEO_ADV7511 is not set\n# CONFIG_VIDEO_AD9389B is not set\n# CONFIG_VIDEO_AK881X is not set\n# CONFIG_VIDEO_THS8200 is not set\n\n#\n# Camera sensor devices\n#\n# CONFIG_VIDEO_IMX178 is not set\nCONFIG_VIDEO_IMX219=m\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX307 is not set\n# CONFIG_VIDEO_IMX317 is not set\n# CONFIG_VIDEO_IMX323 is not set\n# CONFIG_VIDEO_IMX327 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX347 is not set\n# CONFIG_VIDEO_IMX378 is not set\n# CONFIG_VIDEO_IMX415 is not set\n# CONFIG_VIDEO_IMX462 is not set\n# CONFIG_VIDEO_IMX464 is not set\nCONFIG_VIDEO_IMX477=m\n# CONFIG_VIDEO_OS02G10 is not set\nCONFIG_VIDEO_OS04A10=y\n# CONFIG_VIDEO_OS04C10 is not set\n# CONFIG_VIDEO_OS05A20 is not set\n# CONFIG_VIDEO_OS08A10 is not set\n# CONFIG_VIDEO_OS08A20 is not set\n# CONFIG_VIDEO_OV02B10 is not set\n# CONFIG_VIDEO_OV02K10 is not set\n# CONFIG_VIDEO_OV2640 is not set\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV2718 is not set\n# CONFIG_VIDEO_OV2735 is not set\n# CONFIG_VIDEO_OV2775 is not set\n# CONFIG_VIDEO_OV4686 is not set\n# CONFIG_VIDEO_OV4688 is not set\nCONFIG_VIDEO_OV4689=y\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\nCONFIG_VIDEO_OV5647=m\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\nCONFIG_VIDEO_OV5695=y\n# CONFIG_VIDEO_OV6650 is not set\nCONFIG_VIDEO_OV7251=y\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7640 is not set\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV7750 is not set\n# CONFIG_VIDEO_OV8858 is not set\n# CONFIG_VIDEO_OV9281 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_OV9750 is not set\n# CONFIG_VIDEO_OV12D2Q is not set\nCONFIG_VIDEO_OV13850=y\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_PREISP_DUMMY_SENSOR is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\n# CONFIG_VIDEO_MT9V011 is not set\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_AR0230 is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5KGM1SP is not set\n# CONFIG_VIDEO_S5K4H7YX is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_SMIAPP is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_GC02M2 is not set\n# CONFIG_VIDEO_GC0312 is not set\n# CONFIG_VIDEO_GC0329 is not set\n# CONFIG_VIDEO_GC032A is not set\n# CONFIG_VIDEO_GC0403 is not set\n# CONFIG_VIDEO_GC2035 is not set\n# CONFIG_VIDEO_GC2053 is not set\n# CONFIG_VIDEO_GC2093 is not set\n# CONFIG_VIDEO_GC2145 is not set\n# CONFIG_VIDEO_GC2155 is not set\n# CONFIG_VIDEO_GC2355 is not set\n# CONFIG_VIDEO_GC2375H is not set\n# CONFIG_VIDEO_GC2385 is not set\n# CONFIG_VIDEO_GC4663 is not set\n# CONFIG_VIDEO_GC4C33 is not set\n# CONFIG_VIDEO_GC5024 is not set\n# CONFIG_VIDEO_GC5025 is not set\n# CONFIG_VIDEO_GC5035 is not set\nCONFIG_VIDEO_GC8034=y\n# CONFIG_VIDEO_BF3925 is not set\n# CONFIG_VIDEO_JX_F37 is not set\n# CONFIG_VIDEO_JX_H62 is not set\n# CONFIG_VIDEO_JX_H65 is not set\n# CONFIG_VIDEO_JX_K04 is not set\n# CONFIG_VIDEO_SC031GS is not set\n# CONFIG_VIDEO_SC035HGS is not set\n# CONFIG_VIDEO_SC132GS is not set\n# CONFIG_VIDEO_SC200AI is not set\n# CONFIG_VIDEO_SC210IOT is not set\n# CONFIG_VIDEO_SC2232 is not set\n# CONFIG_VIDEO_SC2239 is not set\n# CONFIG_VIDEO_SC2310 is not set\n# CONFIG_VIDEO_SC2335 is not set\n# CONFIG_VIDEO_SC401AI is not set\n# CONFIG_VIDEO_SC4238 is not set\n# CONFIG_VIDEO_SC430CS is not set\n# CONFIG_VIDEO_SC500AI is not set\n# CONFIG_VIDEO_SC5239 is not set\n# CONFIG_VIDEO_SC8220 is not set\n# CONFIG_VIDEO_SP250A is not set\n# CONFIG_VIDEO_HYNIX_HI556 is not set\n# CONFIG_VIDEO_HYNIX_HI846 is not set\n# CONFIG_VIDEO_HM5040 is not set\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# CONFIG_VIDEO_SGM3784 is not set\n\n#\n# Video improvement chips\n#\n# CONFIG_VIDEO_UPD64031A is not set\n# CONFIG_VIDEO_UPD64083 is not set\n\n#\n# Audio/Video compression chips\n#\n# CONFIG_VIDEO_SAA6752HS is not set\n\n#\n# SDR tuner chips\n#\n\n#\n# Miscellaneous helper chips\n#\n# CONFIG_VIDEO_THS7303 is not set\n# CONFIG_VIDEO_M52790 is not set\n# CONFIG_VIDEO_I2C is not set\n# CONFIG_VIDEO_NVP6158 is not set\n# CONFIG_VIDEO_NVP6188 is not set\n# CONFIG_VIDEO_NVP6324 is not set\n# CONFIG_VIDEO_HALL_DC_MOTOR is not set\n# CONFIG_VIDEO_RK_IRCUT is not set\n# CONFIG_VIDEO_MP6507 is not set\n\n#\n# Sensors used on soc_camera driver\n#\n\n#\n# soc_camera sensor drivers\n#\n# CONFIG_SOC_CAMERA_MT9M001 is not set\n# CONFIG_SOC_CAMERA_MT9M111 is not set\n# CONFIG_SOC_CAMERA_MT9T112 is not set\n# CONFIG_SOC_CAMERA_MT9V022 is not set\n# CONFIG_SOC_CAMERA_OV5642 is not set\n# CONFIG_SOC_CAMERA_OV772X is not set\n# CONFIG_SOC_CAMERA_OV9640 is not set\n# CONFIG_SOC_CAMERA_OV9740 is not set\n# CONFIG_SOC_CAMERA_RJ54N1 is not set\n# CONFIG_SOC_CAMERA_TW9910 is not set\n\n#\n# SPI helper chips\n#\n# CONFIG_VIDEO_GS1662 is not set\n# CONFIG_VIDEO_MS41908 is not set\n# CONFIG_VIDEO_ROCKCHIP_PREISP is not set\n\n#\n# Media SPI Adapters\n#\n\n#\n# Customise DVB Frontends\n#\n\n#\n# Tools to develop new frontends\n#\n\n#\n# Graphics support\n#\n# CONFIG_VGA_ARB is not set\nCONFIG_DRM=y\nCONFIG_DRM_DP=y\nCONFIG_DRM_EDID=y\nCONFIG_DRM_IGNORE_IOTCL_PERMIT=y\nCONFIG_DRM_MIPI_DSI=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DEBUG_MM is not set\n# CONFIG_DRM_DEBUG_SELFTEST is not set\nCONFIG_DRM_KMS_HELPER=y\nCONFIG_DRM_KMS_FB_HELPER=y\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\n# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_GEM_CMA_HELPER=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_RADEON is not set\n# CONFIG_DRM_AMDGPU is not set\n\n#\n# ACP (Audio CoProcessor) Configuration\n#\n\n#\n# AMD Library routines\n#\n# CONFIG_DRM_NOUVEAU is not set\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\nCONFIG_DRM_ROCKCHIP=y\n# CONFIG_ROCKCHIP_DRM_DEBUG is not set\nCONFIG_ROCKCHIP_VOP=y\nCONFIG_ROCKCHIP_VOP2=y\nCONFIG_ROCKCHIP_PSR=y\nCONFIG_ROCKCHIP_ANALOGIX_DP=y\nCONFIG_ROCKCHIP_CDN_DP=y\nCONFIG_ROCKCHIP_DW_HDMI=y\nCONFIG_ROCKCHIP_DW_MIPI_DSI=y\nCONFIG_ROCKCHIP_INNO_HDMI=y\nCONFIG_ROCKCHIP_LVDS=y\nCONFIG_ROCKCHIP_DRM_TVE=y\nCONFIG_ROCKCHIP_RGB=y\n# CONFIG_DRM_ROCKCHIP_VVOP is not set\n# CONFIG_ROCKCHIP_EBC_DEV is not set\nCONFIG_DRM_ROCKCHIP_RK618=y\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_AST is not set\n# CONFIG_DRM_MGAG200 is not set\n# CONFIG_DRM_CIRRUS_QEMU is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_LVDS is not set\n# CONFIG_DRM_QXL is not set\n# CONFIG_DRM_BOCHS is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ARM_VERSATILE is not set\n# CONFIG_DRM_PANEL_LVDS is not set\nCONFIG_DRM_PANEL_SIMPLE=y\n# CONFIG_DRM_PANEL_SIMPLE_OF_ONLY is not set\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\nCONFIG_DRM_PANEL_ILITEK_ILI9881C=y\n# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set\n# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set\n# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set\n# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set\n# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_DUMB_VGA_DAC is not set\n# CONFIG_DRM_LVDS_ENCODER is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_RK1000_TVE is not set\n# CONFIG_DRM_SIL_SII8620 is not set\nCONFIG_DRM_SII902X=y\n# CONFIG_DRM_SII9234 is not set\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TI_TFP410 is not set\nCONFIG_DRM_ANALOGIX_DP=y\n# CONFIG_DRM_I2C_ADV7511 is not set\nCONFIG_DRM_DW_HDMI=y\n# CONFIG_DRM_DW_HDMI_AHB_AUDIO is not set\nCONFIG_DRM_DW_HDMI_I2S_AUDIO=y\nCONFIG_DRM_DW_HDMI_CEC=y\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_HISI_HIBMC is not set\n# CONFIG_DRM_HISI_KIRIN is not set\n# CONFIG_DRM_MXSFB is not set\n# CONFIG_DRM_TINYDRM is not set\n# CONFIG_DRM_PL111 is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_MALI400=y\nCONFIG_MALI450=y\n# CONFIG_MALI470 is not set\n# CONFIG_MALI400_DEBUG is not set\n# CONFIG_MALI400_PROFILING is not set\n# CONFIG_MALI400_UMP is not set\nCONFIG_MALI_DMA_BUF_MAP_ON_ATTACH=y\nCONFIG_MALI_SHARED_INTERRUPTS=y\n# CONFIG_MALI_PMU_PARALLEL_POWER_UP is not set\nCONFIG_MALI_DT=y\nCONFIG_MALI_DEVFREQ=y\n# CONFIG_MALI_QUIET is not set\nCONFIG_MALI_MIDGARD=y\n# CONFIG_MALI_GATOR_SUPPORT is not set\n# CONFIG_MALI_MIDGARD_ENABLE_TRACE is not set\n# CONFIG_MALI_DMA_FENCE is not set\nCONFIG_MALI_EXPERT=y\n# CONFIG_MALI_CORESTACK is not set\n# CONFIG_MALI_PRFCNT_SET_SECONDARY is not set\n# CONFIG_MALI_PLATFORM_FAKE is not set\n# CONFIG_MALI_PLATFORM_DEVICETREE is not set\nCONFIG_MALI_PLATFORM_THIRDPARTY=y\nCONFIG_MALI_PLATFORM_THIRDPARTY_NAME=\"rk\"\nCONFIG_MALI_DEBUG=y\nCONFIG_MALI_FENCE_DEBUG=y\n# CONFIG_MALI_NO_MALI is not set\n# CONFIG_MALI_TRACE_TIMELINE is not set\n# CONFIG_MALI_SYSTEM_TRACE is not set\n# CONFIG_MALI_GPU_MMU_AARCH64 is not set\nCONFIG_MALI_PWRSOFT_765=y\n# CONFIG_MALI_KUTF is not set\nCONFIG_MALI_BIFROST=y\n# CONFIG_MALI_BIFROST_GATOR_SUPPORT is not set\n# CONFIG_MALI_BIFROST_ENABLE_TRACE is not set\nCONFIG_MALI_BIFROST_DEVFREQ=y\n# CONFIG_MALI_BIFROST_DMA_FENCE is not set\nCONFIG_MALI_PLATFORM_NAME=\"rk\"\n# CONFIG_MALI_ARBITER_SUPPORT is not set\n# CONFIG_MALI_BIFROST_EXPERT is not set\nCONFIG_MALI_REAL_HW=y\n# CONFIG_MALI_DMA_BUF_MAP_ON_DEMAND is not set\n# CONFIG_MALI_DMA_BUF_LEGACY_COMPAT is not set\n# CONFIG_MALI_GEM5_BUILD is not set\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\n# CONFIG_FB_MODE_HELPERS is not set\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_CIRRUS is not set\n# CONFIG_FB_PM2 is not set\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_CYBER2000 is not set\n# CONFIG_FB_ASILIANT is not set\n# CONFIG_FB_IMSTT is not set\n# CONFIG_FB_UVESA is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_NVIDIA is not set\n# CONFIG_FB_RIVA is not set\n# CONFIG_FB_I740 is not set\n# CONFIG_FB_MATROX is not set\n# CONFIG_FB_RADEON is not set\n# CONFIG_FB_ATY128 is not set\n# CONFIG_FB_ATY is not set\n# CONFIG_FB_S3 is not set\n# CONFIG_FB_SAVAGE is not set\n# CONFIG_FB_SIS is not set\n# CONFIG_FB_NEOMAGIC is not set\n# CONFIG_FB_KYRO is not set\n# CONFIG_FB_3DFX is not set\n# CONFIG_FB_VOODOO1 is not set\n# CONFIG_FB_VT8623 is not set\n# CONFIG_FB_TRIDENT is not set\n# CONFIG_FB_ARK is not set\n# CONFIG_FB_PM3 is not set\n# CONFIG_FB_CARMINE is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_MB862XX is not set\n# CONFIG_FB_BROADSHEET is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# CONFIG_FB_SM712 is not set\nCONFIG_BACKLIGHT_LCD_SUPPORT=y\n# CONFIG_LCD_CLASS_DEVICE is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\nCONFIG_BACKLIGHT_GENERIC=y\nCONFIG_BACKLIGHT_PWM=y\n# CONFIG_BACKLIGHT_PM8941_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\n# CONFIG_BACKLIGHT_GPIO is not set\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n\n#\n# Rockchip Misc Video driver\n#\n\n#\n# RGA\n#\n# CONFIG_ROCKCHIP_RGA is not set\nCONFIG_ROCKCHIP_RGA2=y\n# CONFIG_ROCKCHIP_RGA2_PROC_FS is not set\nCONFIG_ROCKCHIP_RGA2_DEBUG_FS=y\nCONFIG_ROCKCHIP_RGA2_DEBUGGER=y\n\n#\n# IEP\n#\n# CONFIG_IEP is not set\n# CONFIG_IEP_MMU is not set\nCONFIG_ROCKCHIP_MPP_SERVICE=y\nCONFIG_ROCKCHIP_MPP_PROC_FS=y\nCONFIG_ROCKCHIP_MPP_RKVDEC=y\nCONFIG_ROCKCHIP_MPP_RKVDEC2=y\nCONFIG_ROCKCHIP_MPP_RKVENC=y\nCONFIG_ROCKCHIP_MPP_VDPU1=y\nCONFIG_ROCKCHIP_MPP_VEPU1=y\nCONFIG_ROCKCHIP_MPP_VDPU2=y\nCONFIG_ROCKCHIP_MPP_VEPU2=y\nCONFIG_ROCKCHIP_MPP_IEP2=y\nCONFIG_ROCKCHIP_MPP_JPGDEC=y\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_DUMMY_CONSOLE_COLUMNS=80\nCONFIG_DUMMY_CONSOLE_ROWS=25\nCONFIG_FRAMEBUFFER_CONSOLE=y\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\nCONFIG_LOGO=y\nCONFIG_LOGO_LINUX_MONO=y\nCONFIG_LOGO_LINUX_VGA16=y\nCONFIG_LOGO_LINUX_CLUT224=y\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_HWDEP=y\nCONFIG_SND_SEQ_DEVICE=y\nCONFIG_SND_RAWMIDI=y\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\nCONFIG_SND_HRTIMER=y\nCONFIG_SND_DYNAMIC_MINORS=y\nCONFIG_SND_MAX_CARDS=32\n# CONFIG_SND_SUPPORT_OLD_API is not set\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\n# CONFIG_SND_DEBUG is not set\nCONFIG_SND_SEQUENCER=y\nCONFIG_SND_SEQ_DUMMY=y\nCONFIG_SND_SEQ_HRTIMER_DEFAULT=y\nCONFIG_SND_SEQ_MIDI_EVENT=y\nCONFIG_SND_SEQ_MIDI=y\nCONFIG_SND_DRIVERS=y\n# CONFIG_SND_DUMMY is not set\n# CONFIG_SND_ALOOP is not set\n# CONFIG_SND_VIRMIDI is not set\n# CONFIG_SND_MTPAV is not set\n# CONFIG_SND_SERIAL_U16550 is not set\n# CONFIG_SND_MPU401 is not set\n# CONFIG_SND_PCI is not set\n\n#\n# HD-Audio\n#\nCONFIG_SND_HDA_PREALLOC_SIZE=64\n# CONFIG_SND_SPI is not set\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=y\n# CONFIG_SND_USB_UA101 is not set\n# CONFIG_SND_USB_CAIAQ is not set\n# CONFIG_SND_USB_6FIRE is not set\n# CONFIG_SND_USB_HIFACE is not set\n# CONFIG_SND_BCD2000 is not set\n# CONFIG_SND_USB_POD is not set\n# CONFIG_SND_USB_PODHD is not set\n# CONFIG_SND_USB_TONEPORT is not set\n# CONFIG_SND_USB_VARIAX is not set\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\nCONFIG_SND_SOC_ROCKCHIP=y\nCONFIG_SND_SOC_ROCKCHIP_PREALLOC_BUFFER_SIZE=512\n# CONFIG_SND_SOC_ROCKCHIP_AUDIO_PWM is not set\nCONFIG_SND_SOC_ROCKCHIP_I2S=y\nCONFIG_SND_SOC_ROCKCHIP_I2S_TDM=y\nCONFIG_SND_SOC_ROCKCHIP_PDM=y\nCONFIG_SND_SOC_ROCKCHIP_SPDIF=y\n# CONFIG_SND_SOC_ROCKCHIP_VAD is not set\nCONFIG_SND_SOC_ROCKCHIP_MAX98090=y\nCONFIG_SND_SOC_ROCKCHIP_MULTICODECS=y\nCONFIG_SND_SOC_ROCKCHIP_RT5645=y\n# CONFIG_SND_SOC_ROCKCHIP_RT5651 is not set\n# CONFIG_SND_SOC_ROCKCHIP_RT5651_RK628 is not set\n# CONFIG_SND_SOC_ROCKCHIP_HDMI is not set\n# CONFIG_SND_SOC_RK3288_HDMI_ANALOG is not set\n# CONFIG_SND_SOC_RK3399_GRU_SOUND is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\n# CONFIG_ZX_TDM is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\n# CONFIG_SND_SOC_ADAU7002 is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4458 is not set\n# CONFIG_SND_SOC_AK4554 is not set\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\nCONFIG_SND_SOC_DUMMY_CODEC=y\nCONFIG_SND_SOC_HDMI_CODEC=y\n# CONFIG_SND_SOC_ES7134 is not set\nCONFIG_SND_SOC_ES7202=y\nCONFIG_SND_SOC_ES7202_MIC_MAX_CHANNELS=4\nCONFIG_SND_SOC_ES7202_I2C_BUS=1\n# CONFIG_SND_SOC_ES7210 is not set\n# CONFIG_SND_SOC_ES7241 is not set\nCONFIG_SND_SOC_ES7243E=y\nCONFIG_SND_SOC_ES8311=y\nCONFIG_SND_SOC_ES8316=y\n# CONFIG_SND_SOC_ES8323 is not set\n# CONFIG_SND_SOC_ES8328_I2C is not set\n# CONFIG_SND_SOC_ES8328_SPI is not set\n# CONFIG_SND_SOC_ES8396 is not set\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\nCONFIG_SND_SOC_MAX98090=y\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98373 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM179X_SPI is not set\n# CONFIG_SND_SOC_PCM186X_I2C is not set\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK312X is not set\n# CONFIG_SND_SOC_RK3228 is not set\nCONFIG_SND_SOC_RK3308=y\nCONFIG_SND_SOC_RK3328=y\nCONFIG_SND_SOC_RK817=y\nCONFIG_SND_SOC_RK_CODEC_DIGITAL=y\nCONFIG_SND_SOC_RL6231=y\nCONFIG_SND_SOC_RT5616=y\n# CONFIG_SND_SOC_RT5631 is not set\nCONFIG_SND_SOC_RT5640=y\nCONFIG_SND_SOC_RT5645=y\nCONFIG_SND_SOC_RT5651=y\n# CONFIG_SND_SOC_SGTL5000 is not set\n# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set\n# CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set\nCONFIG_SND_SOC_SPDIF=y\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC3X is not set\nCONFIG_SND_SOC_TS3A227E=y\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731 is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8960 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_ZX_AUD96P22 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\nCONFIG_SND_SIMPLE_CARD_UTILS=y\nCONFIG_SND_SIMPLE_CARD=y\n# CONFIG_SND_SIMPLE_SCU_CARD is not set\n# CONFIG_SND_AUDIO_GRAPH_CARD is not set\n# CONFIG_SND_AUDIO_GRAPH_SCU_CARD is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\nCONFIG_HID_BATTERY_STRENGTH=y\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\n# CONFIG_HID_A4TECH is not set\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\n# CONFIG_HID_APPLE is not set\n# CONFIG_HID_APPLEIR is not set\n# CONFIG_HID_ASUS is not set\n# CONFIG_HID_AUREAL is not set\n# CONFIG_HID_BELKIN is not set\n# CONFIG_HID_BETOP_FF is not set\n# CONFIG_HID_CHERRY is not set\n# CONFIG_HID_CHICONY is not set\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CYPRESS is not set\n# CONFIG_HID_DRAGONRISE is not set\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\n# CONFIG_HID_EZKEY is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_GOOGLE_HAMMER is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\n# CONFIG_HID_KYE is not set\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_GYRATION is not set\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_ITE is not set\n# CONFIG_HID_JABRA is not set\n# CONFIG_HID_TWINHAN is not set\nCONFIG_HID_KENSINGTON=y\n# CONFIG_HID_LCPOWER is not set\n# CONFIG_HID_LED is not set\n# CONFIG_HID_LENOVO is not set\n# CONFIG_HID_LOGITECH is not set\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_REDRAGON is not set\n# CONFIG_HID_MICROSOFT is not set\n# CONFIG_HID_MONTEREY is not set\nCONFIG_HID_MULTITOUCH=y\n# CONFIG_HID_NINTENDO is not set\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\n# CONFIG_HID_ORTEK is not set\n# CONFIG_HID_PANTHERLORD is not set\n# CONFIG_HID_PENMOUNT is not set\n# CONFIG_HID_PETALYNX is not set\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\n# CONFIG_HID_SAMSUNG is not set\n# CONFIG_HID_SONY is not set\n# CONFIG_HID_SPEEDLINK is not set\n# CONFIG_HID_STEAM is not set\n# CONFIG_HID_STEELSERIES is not set\n# CONFIG_HID_SUNPLUS is not set\n# CONFIG_HID_RMI is not set\n# CONFIG_HID_GREENASIA is not set\n# CONFIG_HID_SMARTJOYPLUS is not set\n# CONFIG_HID_TIVO is not set\n# CONFIG_HID_TOPSEED is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_WACOM is not set\n# CONFIG_HID_WIIMOTE is not set\n# CONFIG_HID_XINMO is not set\n# CONFIG_HID_ZEROPLUS is not set\n# CONFIG_HID_ZYDACRON is not set\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n\n#\n# I2C HID support\n#\nCONFIG_I2C_HID=y\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_PCI=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\n# CONFIG_USB_DEFAULT_PERSIST is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\nCONFIG_USB_OTG=y\n# CONFIG_USB_OTG_WHITELIST is not set\n# CONFIG_USB_OTG_BLACKLIST_HUB is not set\n# CONFIG_USB_OTG_FSM is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_MON=y\n# CONFIG_USB_WUSB_CBAF is not set\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\n# CONFIG_USB_XHCI_DBGCAP is not set\nCONFIG_USB_XHCI_PCI=y\nCONFIG_USB_XHCI_PLATFORM=y\nCONFIG_USB_EHCI_HCD=y\nCONFIG_USB_EHCI_ROOT_HUB_TT=y\nCONFIG_USB_EHCI_TT_NEWSCHED=y\nCONFIG_USB_EHCI_PCI=y\nCONFIG_USB_EHCI_HCD_PLATFORM=y\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\nCONFIG_USB_OHCI_HCD=y\n# CONFIG_USB_OHCI_HCD_PCI is not set\nCONFIG_USB_OHCI_HCD_PLATFORM=y\n# CONFIG_USB_UHCI_HCD is not set\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=y\n# CONFIG_USB_PRINTER is not set\nCONFIG_USB_WDM=y\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\nCONFIG_USB_UAS=y\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_MUSB_HDRC is not set\nCONFIG_USB_DWC3=y\n# CONFIG_USB_DWC3_HOST is not set\n# CONFIG_USB_DWC3_GADGET is not set\nCONFIG_USB_DWC3_DUAL_ROLE=y\n\n#\n# Platform Glue Driver Support\n#\nCONFIG_USB_DWC3_HAPS=y\nCONFIG_USB_DWC3_OF_SIMPLE=y\nCONFIG_USB_DWC3_ROCKCHIP_INNO=y\nCONFIG_USB_DWC2=y\n# CONFIG_USB_DWC2_HOST is not set\n\n#\n# Gadget/Dual-role mode requires USB Gadget support to be enabled\n#\n# CONFIG_USB_DWC2_PERIPHERAL is not set\nCONFIG_USB_DWC2_DUAL_ROLE=y\n# CONFIG_USB_DWC2_PCI is not set\n# CONFIG_USB_DWC2_DEBUG is not set\n# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set\n# CONFIG_USB_CHIPIDEA is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=y\n# CONFIG_USB_SERIAL_CONSOLE is not set\nCONFIG_USB_SERIAL_GENERIC=y\n# CONFIG_USB_SERIAL_SIMPLE is not set\n# CONFIG_USB_SERIAL_AIRCABLE is not set\n# CONFIG_USB_SERIAL_ARK3116 is not set\n# CONFIG_USB_SERIAL_BELKIN is not set\n# CONFIG_USB_SERIAL_CH341 is not set\n# CONFIG_USB_SERIAL_WHITEHEAT is not set\n# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set\nCONFIG_USB_SERIAL_CP210X=y\n# CONFIG_USB_SERIAL_CYPRESS_M8 is not set\n# CONFIG_USB_SERIAL_EMPEG is not set\nCONFIG_USB_SERIAL_FTDI_SIO=y\n# CONFIG_USB_SERIAL_VISOR is not set\n# CONFIG_USB_SERIAL_IPAQ is not set\n# CONFIG_USB_SERIAL_IR is not set\n# CONFIG_USB_SERIAL_EDGEPORT is not set\n# CONFIG_USB_SERIAL_EDGEPORT_TI is not set\n# CONFIG_USB_SERIAL_F81232 is not set\n# CONFIG_USB_SERIAL_F8153X is not set\n# CONFIG_USB_SERIAL_GARMIN is not set\n# CONFIG_USB_SERIAL_IPW is not set\n# CONFIG_USB_SERIAL_IUU is not set\n# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set\nCONFIG_USB_SERIAL_KEYSPAN=y\n# CONFIG_USB_SERIAL_KLSI is not set\n# CONFIG_USB_SERIAL_KOBIL_SCT is not set\n# CONFIG_USB_SERIAL_MCT_U232 is not set\n# CONFIG_USB_SERIAL_METRO is not set\n# CONFIG_USB_SERIAL_MOS7720 is not set\n# CONFIG_USB_SERIAL_MOS7840 is not set\n# CONFIG_USB_SERIAL_MXUPORT is not set\n# CONFIG_USB_SERIAL_NAVMAN is not set\nCONFIG_USB_SERIAL_PL2303=y\nCONFIG_USB_SERIAL_OTI6858=y\n# CONFIG_USB_SERIAL_QCAUX is not set\nCONFIG_USB_SERIAL_QUALCOMM=y\n# CONFIG_USB_SERIAL_SPCP8X5 is not set\n# CONFIG_USB_SERIAL_SAFE is not set\nCONFIG_USB_SERIAL_SIERRAWIRELESS=y\n# CONFIG_USB_SERIAL_SYMBOL is not set\n# CONFIG_USB_SERIAL_TI is not set\n# CONFIG_USB_SERIAL_CYBERJACK is not set\n# CONFIG_USB_SERIAL_XIRCOM is not set\nCONFIG_USB_SERIAL_WWAN=y\nCONFIG_USB_SERIAL_OPTION=y\n# CONFIG_USB_SERIAL_OMNINET is not set\n# CONFIG_USB_SERIAL_OPTICON is not set\n# CONFIG_USB_SERIAL_XSENS_MT is not set\n# CONFIG_USB_SERIAL_WISHBONE is not set\n# CONFIG_USB_SERIAL_SSU100 is not set\n# CONFIG_USB_SERIAL_QT2 is not set\n# CONFIG_USB_SERIAL_UPD78F0730 is not set\n# CONFIG_USB_SERIAL_DEBUG is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\nCONFIG_USB_EZUSB_FX2=y\n# CONFIG_USB_HUB_USB251XB is not set\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\n# CONFIG_NOP_USB_XCEIV is not set\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\n# CONFIG_USB_ULPI is not set\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\nCONFIG_USB_GADGET_DEBUG_FILES=y\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=500\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n# CONFIG_U_SERIAL_CONSOLE is not set\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\n# CONFIG_USB_SNP_UDC_PLAT is not set\n# CONFIG_USB_M66592 is not set\n# CONFIG_USB_BDC_UDC is not set\n# CONFIG_USB_AMD5536UDC is not set\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_NET2280 is not set\n# CONFIG_USB_GOKU is not set\n# CONFIG_USB_EG20T is not set\n# CONFIG_USB_GADGET_XILINX is not set\n# CONFIG_USB_DUMMY_HCD is not set\nCONFIG_USB_LIBCOMPOSITE=y\nCONFIG_USB_F_ACM=y\nCONFIG_USB_U_SERIAL=y\nCONFIG_USB_F_MASS_STORAGE=y\nCONFIG_USB_F_FS=y\nCONFIG_USB_F_UVC=y\nCONFIG_USB_CONFIGFS=y\nCONFIG_USB_CONFIGFS_UEVENT=y\n# CONFIG_USB_CONFIGFS_SERIAL is not set\nCONFIG_USB_CONFIGFS_ACM=y\n# CONFIG_USB_CONFIGFS_OBEX is not set\n# CONFIG_USB_CONFIGFS_NCM is not set\n# CONFIG_USB_CONFIGFS_ECM is not set\n# CONFIG_USB_CONFIGFS_ECM_SUBSET is not set\n# CONFIG_USB_CONFIGFS_RNDIS is not set\n# CONFIG_USB_CONFIGFS_EEM is not set\nCONFIG_USB_CONFIGFS_MASS_STORAGE=y\n# CONFIG_USB_CONFIGFS_F_LB_SS is not set\nCONFIG_USB_CONFIGFS_F_FS=y\n# CONFIG_USB_CONFIGFS_F_ACC is not set\n# CONFIG_USB_CONFIGFS_F_AUDIO_SRC is not set\n# CONFIG_USB_CONFIGFS_F_UAC1 is not set\n# CONFIG_USB_CONFIGFS_F_UAC1_LEGACY is not set\n# CONFIG_USB_CONFIGFS_F_UAC2 is not set\n# CONFIG_USB_CONFIGFS_F_MIDI is not set\n# CONFIG_USB_CONFIGFS_F_HID is not set\nCONFIG_USB_CONFIGFS_F_UVC=y\n# CONFIG_USB_CONFIGFS_F_PRINTER is not set\n# CONFIG_TYPEC is not set\n# CONFIG_USB_ROLE_SWITCH is not set\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_USB_ULPI_BUS is not set\n# CONFIG_UWB is not set\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\n# CONFIG_PWRSEQ_SD8787 is not set\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\n# CONFIG_SDIO_UART is not set\nCONFIG_MMC_TEST=y\nCONFIG_SDIO_KEEPALIVE=y\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_DEBUG is not set\n# CONFIG_MMC_ARMMMCI is not set\nCONFIG_MMC_SDHCI=y\n# CONFIG_MMC_SDHCI_PCI is not set\nCONFIG_MMC_SDHCI_PLTFM=y\nCONFIG_MMC_SDHCI_OF_ARASAN=y\n# CONFIG_MMC_SDHCI_OF_AT91 is not set\nCONFIG_MMC_SDHCI_OF_DWCMSHC=y\n# CONFIG_MMC_SDHCI_CADENCE is not set\n# CONFIG_MMC_SDHCI_F_SDH30 is not set\n# CONFIG_MMC_TIFM_SD is not set\n# CONFIG_MMC_SPI is not set\n# CONFIG_MMC_CB710 is not set\n# CONFIG_MMC_VIA_SDMMC is not set\nCONFIG_MMC_DW=y\nCONFIG_MMC_DW_PLTFM=y\n# CONFIG_MMC_DW_BLUEFIELD is not set\n# CONFIG_MMC_DW_EXYNOS is not set\n# CONFIG_MMC_DW_HI3798CV200 is not set\n# CONFIG_MMC_DW_K3 is not set\n# CONFIG_MMC_DW_PCI is not set\nCONFIG_MMC_DW_ROCKCHIP=y\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_CQHCI=y\n# CONFIG_MMC_TOSHIBA_PCI is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MMC_SDHCI_XENON is not set\n# CONFIG_MMC_SDHCI_OMAP is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\n# CONFIG_LEDS_CLASS_FLASH is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP5521 is not set\n# CONFIG_LEDS_LP5523 is not set\n# CONFIG_LEDS_LP5562 is not set\n# CONFIG_LEDS_LP8501 is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\n# CONFIG_LEDS_PWM is not set\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_SYSCON is not set\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\nCONFIG_LEDS_TRIGGER_TIMER=y\n# CONFIG_LEDS_TRIGGER_ONESHOT is not set\n# CONFIG_LEDS_TRIGGER_DISK is not set\n# CONFIG_LEDS_TRIGGER_MTD is not set\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\nCONFIG_LEDS_TRIGGER_BACKLIGHT=m\n# CONFIG_LEDS_TRIGGER_CPU is not set\n# CONFIG_LEDS_TRIGGER_ACTIVITY is not set\nCONFIG_LEDS_TRIGGER_GPIO=y\n# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\n# CONFIG_LEDS_TRIGGER_TRANSIENT is not set\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\n# CONFIG_LEDS_TRIGGER_PANIC is not set\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_SUPPORT=y\n# CONFIG_EDAC is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_FAKE is not set\nCONFIG_RTC_DRV_HYM8563=y\n# CONFIG_RTC_DRV_MAX6900 is not set\nCONFIG_RTC_DRV_RK808=y\n# CONFIG_RTC_DRV_RK_TIMER is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\n# CONFIG_RTC_DRV_PCF8563 is not set\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_TPS6586X is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\n# CONFIG_RTC_DRV_DS3232 is not set\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n# CONFIG_RTC_DRV_CROS_EC is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\n# CONFIG_RTC_DRV_PL031 is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\n# CONFIG_RTC_DRV_SNVS is not set\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_OF=y\n# CONFIG_ALTERA_MSGDMA is not set\n# CONFIG_AMBA_PL08X is not set\n# CONFIG_DW_AXI_DMAC is not set\n# CONFIG_FSL_EDMA is not set\n# CONFIG_INTEL_IDMA64 is not set\n# CONFIG_MV_XOR_V2 is not set\nCONFIG_PL330_DMA=y\n# CONFIG_XILINX_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DMA is not set\n# CONFIG_QCOM_HIDMA_MGMT is not set\n# CONFIG_QCOM_HIDMA is not set\n# CONFIG_DW_DMAC is not set\n# CONFIG_DW_DMAC_PCI is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\nCONFIG_VIRTIO_MENU=y\n# CONFIG_VIRTIO_PCI is not set\n# CONFIG_VIRTIO_MMIO is not set\n\n#\n# Microsoft Hyper-V guest support\n#\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_COMEDI is not set\n# CONFIG_RTL8192U is not set\n# CONFIG_RTLLIB is not set\n# CONFIG_RTL8723BS is not set\n# CONFIG_R8712U is not set\n# CONFIG_R8188EU is not set\n# CONFIG_R8822BE is not set\n# CONFIG_RTS5208 is not set\n# CONFIG_VT6655 is not set\n# CONFIG_VT6656 is not set\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16240 is not set\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7606 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7816 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7280 is not set\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7152 is not set\n# CONFIG_AD7746 is not set\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7854 is not set\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1210 is not set\n# CONFIG_FB_SM750 is not set\n# CONFIG_FB_XGI is not set\n\n#\n# Speakup console speech\n#\n# CONFIG_SPEAKUP is not set\n# CONFIG_STAGING_MEDIA is not set\n\n#\n# Android\n#\n# CONFIG_ASHMEM is not set\n# CONFIG_ANDROID_VSOC is not set\n# CONFIG_ION is not set\nCONFIG_FIQ_DEBUGGER=y\nCONFIG_FIQ_DEBUGGER_NO_SLEEP=y\n# CONFIG_FIQ_DEBUGGER_WAKEUP_IRQ_ALWAYS_ON is not set\nCONFIG_FIQ_DEBUGGER_CONSOLE=y\nCONFIG_FIQ_DEBUGGER_CONSOLE_DEFAULT_ENABLE=y\nCONFIG_FIQ_DEBUGGER_TRUST_ZONE=y\n# CONFIG_FIQ_DEBUGGER_UART_OVERLAY is not set\nCONFIG_RK_CONSOLE_THREAD=y\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_DGNC is not set\n# CONFIG_GS_FPGABOOT is not set\n# CONFIG_UNISYSSPAR is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\nCONFIG_FB_TFT=m\nCONFIG_FB_TFT_HKTFT32=m\nCONFIG_FB_TFT_FBTFT_DEVICE=m\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\n# CONFIG_MOST is not set\n# CONFIG_KS7010 is not set\n# CONFIG_GREYBUS is not set\n# CONFIG_PI433 is not set\n\n#\n# Gasket devices\n#\n# CONFIG_STAGING_GASKET_FRAMEWORK is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_EROFS_FS is not set\n# CONFIG_POWERVR_ROGUE_N is not set\n# CONFIG_GOLDFISH is not set\nCONFIG_CHROME_PLATFORMS=y\n# CONFIG_CROS_EC_I2C is not set\n# CONFIG_CROS_EC_SPI is not set\nCONFIG_CROS_EC_PROTO=y\nCONFIG_CLKDEV_LOOKUP=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Common Clock Framework\n#\nCONFIG_COMMON_CLK_DEBUGFS=y\n# CONFIG_COMMON_CLK_PROCFS is not set\n# CONFIG_COMMON_CLK_VERSATILE is not set\n# CONFIG_CLK_HSDK is not set\n# CONFIG_COMMON_CLK_MAX9485 is not set\nCONFIG_COMMON_CLK_RK808=y\nCONFIG_COMMON_CLK_SCMI=y\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\n# CONFIG_CLK_QORIQ is not set\nCONFIG_COMMON_CLK_XGENE=y\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_VC5 is not set\nCONFIG_COMMON_CLK_ROCKCHIP=y\n# CONFIG_ROCKCHIP_CLK_COMPENSATION is not set\nCONFIG_ROCKCHIP_CLK_BOOST=y\nCONFIG_ROCKCHIP_CLK_INV=y\nCONFIG_ROCKCHIP_CLK_PVTM=y\nCONFIG_ROCKCHIP_DCLK_DIV=y\n# CONFIG_ROCKCHIP_DDRCLK_SCPI is not set\nCONFIG_ROCKCHIP_DDRCLK_SIP=y\n# CONFIG_ROCKCHIP_PLL_RK3066 is not set\nCONFIG_ROCKCHIP_PLL_RK3399=y\nCONFIG_COMMON_CLK_ROCKCHIP_REGMAP=y\nCONFIG_CLK_RK618=y\n# CONFIG_HWSPINLOCK is not set\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\nCONFIG_CLKSRC_MMIO=y\nCONFIG_ROCKCHIP_TIMER=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y\nCONFIG_FSL_ERRATUM_A008585=y\nCONFIG_HISILICON_ERRATUM_161010101=y\nCONFIG_ARM64_ERRATUM_858921=y\n# CONFIG_ARM_TIMER_SP804 is not set\nCONFIG_MAILBOX=y\n# CONFIG_ARM_MHU is not set\n# CONFIG_PLATFORM_MHU is not set\n# CONFIG_PL320_MBOX is not set\n# CONFIG_ROCKCHIP_MBOX is not set\n# CONFIG_ALTERA_MBOX is not set\n# CONFIG_MAILBOX_TEST is not set\n# CONFIG_RK3368_MBOX is not set\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\n# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set\n# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set\n# CONFIG_IOMMU_DEBUGFS is not set\n# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set\nCONFIG_IOMMU_IOVA=y\nCONFIG_OF_IOMMU=y\nCONFIG_IOMMU_DMA=y\nCONFIG_ROCKCHIP_IOMMU=y\n# CONFIG_ARM_SMMU is not set\n# CONFIG_ARM_SMMU_V3 is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n\n#\n# Rpmsg drivers\n#\n# CONFIG_RPMSG_QCOM_GLINK_RPM is not set\n# CONFIG_RPMSG_VIRTIO is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n\n#\n# Broadcom SoC drivers\n#\n# CONFIG_SOC_BRCMSTB is not set\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n\n#\n# i.MX SoC drivers\n#\n\n#\n# Qualcomm SoC drivers\n#\n\n#\n# Rockchip CPU selection\n#\nCONFIG_CPU_PX30=y\nCONFIG_CPU_RK1808=y\n# CONFIG_CPU_RK3308 is not set\nCONFIG_CPU_RK3328=y\n# CONFIG_CPU_RK3368 is not set\nCONFIG_CPU_RK3399=y\nCONFIG_CPU_RK3568=y\nCONFIG_ANDROID_VERSION=0x08010000\nCONFIG_ROCKCHIP_CPUINFO=y\nCONFIG_ROCKCHIP_GRF=y\n# CONFIG_ROCKCHIP_HW_DECOMPRESS is not set\nCONFIG_ROCKCHIP_IPA=y\nCONFIG_ROCKCHIP_OPP=y\nCONFIG_ROCKCHIP_PM_DOMAINS=y\nCONFIG_ROCKCHIP_PVTM=y\n# CONFIG_ROCKCHIP_RAMDISK is not set\nCONFIG_ROCKCHIP_SUSPEND_MODE=y\nCONFIG_ROCKCHIP_SYSTEM_MONITOR=y\n# CONFIG_ROCKCHIP_MTD_VENDOR_STORAGE is not set\n# CONFIG_ROCKCHIP_VENDOR_STORAGE_UPDATE_LOADER is not set\nCONFIG_ROCKCHIP_DEBUG=y\n# CONFIG_ROCKCHIP_LOW_PERFORMANCE is not set\n# CONFIG_ROCKCHIP_THUNDER_BOOT is not set\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# CONFIG_XILINX_VCU is not set\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y\nCONFIG_DEVFREQ_GOV_PERFORMANCE=y\nCONFIG_DEVFREQ_GOV_POWERSAVE=y\nCONFIG_DEVFREQ_GOV_USERSPACE=y\n# CONFIG_DEVFREQ_GOV_PASSIVE is not set\n\n#\n# DEVFREQ Drivers\n#\nCONFIG_ARM_ROCKCHIP_BUS_DEVFREQ=y\nCONFIG_ARM_ROCKCHIP_DMC_DEVFREQ=y\n# CONFIG_ARM_ROCKCHIP_DMC_DEBUG is not set\nCONFIG_PM_DEVFREQ_EVENT=y\nCONFIG_DEVFREQ_EVENT_ROCKCHIP_DFI=y\n# CONFIG_DEVFREQ_EVENT_ROCKCHIP_NOCP is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\n# CONFIG_EXTCON_USB_GPIO is not set\n# CONFIG_EXTCON_USBC_CROS_EC is not set\nCONFIG_MEMORY=y\n# CONFIG_ARM_PL172_MPMC is not set\nCONFIG_IIO=y\nCONFIG_IIO_BUFFER=y\n# CONFIG_IIO_BUFFER_CB is not set\n# CONFIG_IIO_BUFFER_HW_CONSUMER is not set\nCONFIG_IIO_KFIFO_BUF=y\n# CONFIG_IIO_CONFIGFS is not set\nCONFIG_IIO_TRIGGER=y\nCONFIG_IIO_CONSUMERS_PER_TRIGGER=2\n# CONFIG_IIO_SW_DEVICE is not set\n# CONFIG_IIO_SW_TRIGGER is not set\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADXL345_I2C is not set\n# CONFIG_ADXL345_SPI is not set\n# CONFIG_BMA180 is not set\n# CONFIG_BMA220 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_DA280 is not set\n# CONFIG_DA311 is not set\n# CONFIG_DMARD06 is not set\n# CONFIG_DMARD09 is not set\n# CONFIG_DMARD10 is not set\n# CONFIG_IIO_CROS_EC_ACCEL_LEGACY is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MC3230 is not set\n# CONFIG_MMA7455_I2C is not set\n# CONFIG_MMA7455_SPI is not set\n# CONFIG_MMA7660 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_MXC6255 is not set\n# CONFIG_SCA3000 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7266 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7766 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD799X is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_ENVELOPE_DETECTOR is not set\n# CONFIG_HI8435 is not set\n# CONFIG_HX711 is not set\n# CONFIG_INA2XX_ADC is not set\n# CONFIG_LTC2471 is not set\n# CONFIG_LTC2485 is not set\n# CONFIG_LTC2497 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX11100 is not set\n# CONFIG_MAX1118 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MAX9611 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_NAU7802 is not set\nCONFIG_ROCKCHIP_SARADC=y\n# CONFIG_ROCKCHIP_SARADC_TEST_CHN is not set\n# CONFIG_SD_ADC_MODULATOR is not set\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC0832 is not set\n# CONFIG_TI_ADC084S021 is not set\n# CONFIG_TI_ADC12138 is not set\n# CONFIG_TI_ADC108S102 is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_TI_ADC161S626 is not set\n# CONFIG_TI_ADS1015 is not set\n# CONFIG_TI_ADS7950 is not set\n# CONFIG_TI_ADS8688 is not set\n# CONFIG_TI_TLC4541 is not set\n# CONFIG_VF610_ADC is not set\n\n#\n# Analog Front Ends\n#\n# CONFIG_IIO_RESCALE is not set\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n\n#\n# Chemical Sensors\n#\n# CONFIG_ATLAS_PH_SENSOR is not set\n# CONFIG_BME680 is not set\n# CONFIG_CCS811 is not set\n# CONFIG_IAQCORE is not set\n# CONFIG_VZ89X is not set\n# CONFIG_IIO_CROS_EC_SENSORS_CORE is not set\n\n#\n# Hid Sensor IIO Common\n#\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n\n#\n# Counters\n#\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5592R is not set\n# CONFIG_AD5593R is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_LTC2632 is not set\n# CONFIG_AD5686_SPI is not set\n# CONFIG_AD5696_I2C is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5758 is not set\n# CONFIG_AD5761 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_AD8801 is not set\n# CONFIG_DPOT_DAC is not set\n# CONFIG_DS4424 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n# CONFIG_TI_DAC082S085 is not set\n# CONFIG_TI_DAC5571 is not set\n# CONFIG_VF610_DAC is not set\n\n#\n# IIO dummy driver\n#\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_MPU3050_I2C is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n\n#\n# Health Sensors\n#\n\n#\n# Heart Rate Monitors\n#\n# CONFIG_AFE4403 is not set\n# CONFIG_AFE4404 is not set\n# CONFIG_MAX30100 is not set\n# CONFIG_MAX30102 is not set\n\n#\n# Humidity sensors\n#\n# CONFIG_AM2315 is not set\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HTS221 is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_BMI160_I2C is not set\n# CONFIG_BMI160_SPI is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_MPU6050_I2C is not set\n# CONFIG_INV_MPU6050_SPI is not set\n# CONFIG_IIO_ST_LSM6DSX is not set\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_BH1780 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM3605 is not set\n# CONFIG_CM36651 is not set\n# CONFIG_GP2AP020A00F is not set\nCONFIG_SENSORS_ISL29018=y\n# CONFIG_SENSORS_ISL29028 is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_LV0104CS is not set\n# CONFIG_MAX44000 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_SI1133 is not set\n# CONFIG_SI1145 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_ST_UVIS25 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\nCONFIG_SENSORS_TSL2563=y\nCONFIG_TSL2583=y\n# CONFIG_TSL2772 is not set\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VEML6070 is not set\n# CONFIG_VL6180 is not set\n# CONFIG_ZOPT2201 is not set\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8974 is not set\n# CONFIG_AK8975 is not set\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN_I2C is not set\n# CONFIG_BMC150_MAGN_SPI is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n\n#\n# Multiplexers\n#\n# CONFIG_IIO_MUX is not set\n\n#\n# Inclinometer sensors\n#\n\n#\n# Triggers - standalone\n#\n# CONFIG_IIO_INTERRUPT_TRIGGER is not set\nCONFIG_IIO_SYSFS_TRIGGER=y\n\n#\n# Digital potentiometers\n#\n# CONFIG_AD5272 is not set\n# CONFIG_DS1803 is not set\n# CONFIG_MAX5481 is not set\n# CONFIG_MAX5487 is not set\n# CONFIG_MCP4018 is not set\n# CONFIG_MCP4131 is not set\n# CONFIG_MCP4531 is not set\n# CONFIG_TPL0102 is not set\n\n#\n# Digital potentiostats\n#\n# CONFIG_LMP91000 is not set\n\n#\n# Pressure sensors\n#\n# CONFIG_ABP060MG is not set\n# CONFIG_BMP280 is not set\n# CONFIG_HP03 is not set\n# CONFIG_MPL115_I2C is not set\n# CONFIG_MPL115_SPI is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n# CONFIG_HP206C is not set\n# CONFIG_ZPA2326 is not set\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n\n#\n# Proximity and distance sensors\n#\n# CONFIG_ISL29501 is not set\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_RFD77402 is not set\n# CONFIG_SRF04 is not set\n# CONFIG_SX9500 is not set\n# CONFIG_SRF08 is not set\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S1200 is not set\n\n#\n# Temperature sensors\n#\n# CONFIG_MAXIM_THERMOCOUPLE is not set\n# CONFIG_MLX90614 is not set\n# CONFIG_MLX90632 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TMP007 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\n# CONFIG_NTB is not set\n# CONFIG_VME_BUS is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_CROS_EC is not set\n# CONFIG_PWM_FSL_FTM is not set\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_PWM_ROCKCHIP=y\n# CONFIG_PWM_ROCKCHIP_ONESHOT is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\nCONFIG_ARM_GIC_V2M=y\nCONFIG_ARM_GIC_V3=y\nCONFIG_ARM_GIC_V3_ITS=y\nCONFIG_ARM_GIC_V3_ITS_PCI=y\nCONFIG_PARTITION_PERCPU=y\n# CONFIG_IPACK_BUS is not set\nCONFIG_ARCH_HAS_RESET_CONTROLLER=y\nCONFIG_RESET_CONTROLLER=y\nCONFIG_RESET_SCMI=y\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_FMC is not set\n\n#\n# PHY Subsystem\n#\nCONFIG_GENERIC_PHY=y\n# CONFIG_PHY_XGENE is not set\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_CPCAP_USB is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\nCONFIG_PHY_ROCKCHIP_CSI2_DPHY=y\nCONFIG_PHY_ROCKCHIP_DP=y\nCONFIG_PHY_ROCKCHIP_EMMC=y\n# CONFIG_PHY_ROCKCHIP_INNO_COMBPHY is not set\nCONFIG_PHY_ROCKCHIP_INNO_HDMI_PHY=y\nCONFIG_PHY_ROCKCHIP_INNO_MIPI_DPHY=y\nCONFIG_PHY_ROCKCHIP_INNO_USB2=y\nCONFIG_PHY_ROCKCHIP_INNO_USB3=y\nCONFIG_PHY_ROCKCHIP_INNO_VIDEO_COMBO_PHY=y\n# CONFIG_PHY_ROCKCHIP_INNO_VIDEO_PHY is not set\nCONFIG_PHY_ROCKCHIP_MIPI_RX=y\nCONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY=y\nCONFIG_PHY_ROCKCHIP_NANENG_EDP=y\n# CONFIG_PHY_ROCKCHIP_NANENG_USB2 is not set\nCONFIG_PHY_ROCKCHIP_PCIE=y\nCONFIG_PHY_ROCKCHIP_SNPS_PCIE3=y\nCONFIG_PHY_ROCKCHIP_TYPEC=y\nCONFIG_PHY_ROCKCHIP_USB=y\n# CONFIG_PHY_SAMSUNG_USB2 is not set\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\nCONFIG_ARM_PMU=y\n# CONFIG_ARM_DSU_PMU is not set\n# CONFIG_ARM_SPE_PMU is not set\nCONFIG_RAS=y\n\n#\n# Android\n#\nCONFIG_ANDROID=y\n# CONFIG_ANDROID_BINDER_IPC is not set\n# CONFIG_LIBNVDIMM is not set\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\nCONFIG_ROCKCHIP_EFUSE=y\nCONFIG_ROCKCHIP_OTP=y\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\n# CONFIG_TEE is not set\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_LEGACY_ENERGY_MODEL_DT is not set\nCONFIG_RK_FLASH=y\n\n#\n# Rockchip Flash Devices\n#\n# CONFIG_RK_NANDC_NAND is not set\n# CONFIG_RK_SFC_NAND is not set\nCONFIG_RK_SFC_NOR=y\nCONFIG_RK_SFC_NOR_MTD=y\n# CONFIG_RK_NAND is not set\n\n#\n# Headset device support\n#\n# CONFIG_RK_HEADSET is not set\n\n#\n# RKNPU\n#\nCONFIG_ROCKCHIP_RKNPU=m\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_ENCRYPTION is not set\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\n# CONFIG_REISERFS_FS is not set\n# CONFIG_JFS_FS is not set\nCONFIG_XFS_FS=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\n# CONFIG_BTRFS_FS is not set\n# CONFIG_NILFS2_FS is not set\n# CONFIG_F2FS_FS is not set\n# CONFIG_FS_DAX is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\nCONFIG_MANDATORY_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\n# CONFIG_DNOTIFY is not set\nCONFIG_INOTIFY_USER=y\n# CONFIG_FANOTIFY is not set\n# CONFIG_QUOTA is not set\n# CONFIG_AUTOFS4_FS is not set\n# CONFIG_AUTOFS_FS is not set\nCONFIG_FUSE_FS=y\n# CONFIG_CUSE is not set\nCONFIG_OVERLAY_FS=y\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_XINO_AUTO is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n# CONFIG_INCREMENTAL_FS is not set\n\n#\n# Caches\n#\n# CONFIG_FSCACHE is not set\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\n# CONFIG_UDF_FS is not set\n\n#\n# DOS/FAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=936\nCONFIG_FAT_DEFAULT_IOCHARSET=\"utf8\"\nCONFIG_FAT_DEFAULT_UTF8=y\nCONFIG_EXFAT_FS=y\nCONFIG_EXFAT_DEFAULT_CODEPAGE=936\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\nCONFIG_EXFAT_VIRTUAL_XATTR=y\nCONFIG_EXFAT_VIRTUAL_XATTR_SELINUX_LABEL=\"u:object_r:exfat:s0\"\n# CONFIG_EXFAT_DEBUG is not set\n# CONFIG_EXFAT_UEVENT is not set\n# CONFIG_NTFS_FS is not set\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\n# CONFIG_PROC_KCORE is not set\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\n# CONFIG_PROC_UID is not set\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_HUGETLBFS is not set\nCONFIG_MEMFD_CREATE=y\nCONFIG_ARCH_HAS_GIGANTIC_PAGE=y\nCONFIG_CONFIGFS_FS=y\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\n# CONFIG_SDCARD_FS is not set\n# CONFIG_HFS_FS is not set\n# CONFIG_HFSPLUS_FS is not set\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\nCONFIG_JFFS2_FS=y\nCONFIG_JFFS2_FS_DEBUG=0\nCONFIG_JFFS2_FS_WRITEBUFFER=y\n# CONFIG_JFFS2_FS_WBUF_VERIFY is not set\n# CONFIG_JFFS2_SUMMARY is not set\n# CONFIG_JFFS2_FS_XATTR is not set\n# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set\nCONFIG_JFFS2_ZLIB=y\nCONFIG_JFFS2_RTIME=y\nCONFIG_UBIFS_FS=y\nCONFIG_UBIFS_FS_ADVANCED_COMPR=y\nCONFIG_UBIFS_FS_LZO=y\nCONFIG_UBIFS_FS_ZLIB=y\n# CONFIG_UBIFS_ATIME_SUPPORT is not set\nCONFIG_UBIFS_FS_XATTR=y\nCONFIG_UBIFS_FS_SECURITY=y\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\nCONFIG_SQUASHFS_FILE_CACHE=y\n# CONFIG_SQUASHFS_FILE_DIRECT is not set\nCONFIG_SQUASHFS_DECOMP_SINGLE=y\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\n# CONFIG_SQUASHFS_LZ4 is not set\nCONFIG_SQUASHFS_LZO=y\n# CONFIG_SQUASHFS_XZ is not set\n# CONFIG_SQUASHFS_ZSTD is not set\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\nCONFIG_PSTORE=y\nCONFIG_PSTORE_DEFLATE_COMPRESS=y\n# CONFIG_PSTORE_LZO_COMPRESS is not set\n# CONFIG_PSTORE_LZ4_COMPRESS is not set\n# CONFIG_PSTORE_LZ4HC_COMPRESS is not set\n# CONFIG_PSTORE_842_COMPRESS is not set\n# CONFIG_PSTORE_ZSTD_COMPRESS is not set\nCONFIG_PSTORE_COMPRESS=y\nCONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y\nCONFIG_PSTORE_COMPRESS_DEFAULT=\"deflate\"\nCONFIG_PSTORE_CONSOLE=y\n# CONFIG_PSTORE_CONSOLE_FORCE is not set\n# CONFIG_PSTORE_PMSG is not set\n# CONFIG_PSTORE_FTRACE is not set\nCONFIG_PSTORE_RAM=y\n# CONFIG_PSTORE_MCU_LOG is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\nCONFIG_NFS_V3_ACL=y\nCONFIG_NFS_V4=y\nCONFIG_NFS_SWAP=y\n# CONFIG_NFS_V4_1 is not set\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_ACL_SUPPORT=y\nCONFIG_NFS_COMMON=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_SWAP=y\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS2=y\nCONFIG_CIFS_ALLOW_INSECURE_LEGACY=y\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\nCONFIG_CIFS_DEBUG=y\n# CONFIG_CIFS_DEBUG2 is not set\n# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\n# CONFIG_CIFS_SWN_UPCALL is not set\n# CONFIG_CIFS_ROOT is not set\n# CONFIG_SMB_SERVER is not set\nCONFIG_SMBFS_COMMON=y\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\nCONFIG_NLS_CODEPAGE_936=y\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\nCONFIG_UNICODE=y\n# CONFIG_UNICODE_NORMALIZATION_SELFTEST is not set\n\n#\n# Security options\n#\nCONFIG_KEYS=y\nCONFIG_KEYS_COMPAT=y\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_BIG_KEYS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\n# CONFIG_KEY_DH_OPERATIONS is not set\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY_PERF_EVENTS_RESTRICT is not set\n# CONFIG_SECURITY is not set\nCONFIG_SECURITYFS=y\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\n# CONFIG_TEE_SUPPORT is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_DEFAULT_SECURITY=\"\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_BLKCIPHER=y\nCONFIG_CRYPTO_BLKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_RSA=y\n# CONFIG_CRYPTO_DH is not set\nCONFIG_CRYPTO_ECDH=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_WORKQUEUE=y\nCONFIG_CRYPTO_CRYPTD=y\n# CONFIG_CRYPTO_MCRYPTD is not set\n# CONFIG_CRYPTO_AUTHENC is not set\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_SIMD=y\n# CONFIG_CRYPTO_CURVE25519 is not set\n\n#\n# Authenticated Encryption with Associated Data\n#\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_AEGIS128L is not set\n# CONFIG_CRYPTO_AEGIS256 is not set\n# CONFIG_CRYPTO_MORUS640 is not set\n# CONFIG_CRYPTO_MORUS1280 is not set\nCONFIG_CRYPTO_SEQIV=y\n# CONFIG_CRYPTO_ECHAINIV is not set\n\n#\n# Block modes\n#\nCONFIG_CRYPTO_CBC=y\nCONFIG_CRYPTO_CFB=y\nCONFIG_CRYPTO_CTR=y\n# CONFIG_CRYPTO_CTS is not set\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_PCBC is not set\nCONFIG_CRYPTO_XTS=y\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_ADIANTUM is not set\n\n#\n# Hash modes\n#\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_HMAC=y\n# CONFIG_CRYPTO_XCBC is not set\n# CONFIG_CRYPTO_VMAC is not set\n\n#\n# Digest\n#\nCONFIG_CRYPTO_CRC32C=y\n# CONFIG_CRYPTO_CRC32 is not set\n# CONFIG_CRYPTO_BLAKE2S is not set\nCONFIG_CRYPTO_CRCT10DIF=y\nCONFIG_CRYPTO_GHASH=y\n# CONFIG_CRYPTO_POLY1305 is not set\n# CONFIG_CRYPTO_MD4 is not set\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\n# CONFIG_CRYPTO_RMD128 is not set\n# CONFIG_CRYPTO_RMD160 is not set\n# CONFIG_CRYPTO_RMD256 is not set\n# CONFIG_CRYPTO_RMD320 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\nCONFIG_CRYPTO_SM3=y\n# CONFIG_CRYPTO_TGR192 is not set\n# CONFIG_CRYPTO_WP512 is not set\n\n#\n# Ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\nCONFIG_CRYPTO_ARC4=y\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SALSA20 is not set\n# CONFIG_CRYPTO_CHACHA20 is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\n# CONFIG_CRYPTO_SM4 is not set\n# CONFIG_CRYPTO_TEA is not set\nCONFIG_CRYPTO_TWOFISH=y\nCONFIG_CRYPTO_TWOFISH_COMMON=y\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=y\nCONFIG_CRYPTO_LZO=y\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n\n#\n# Random Number Generation\n#\nCONFIG_CRYPTO_ANSI_CPRNG=y\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\n# CONFIG_CRYPTO_USER_API_AEAD is not set\nCONFIG_CRYPTO_HASH_INFO=y\n\n#\n# Crypto library routines\n#\n# CONFIG_CRYPTO_LIB_BLAKE2S is not set\n# CONFIG_CRYPTO_LIB_CHACHA is not set\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\n# CONFIG_CRYPTO_LIB_POLY1305 is not set\n# CONFIG_CRYPTO_LIB_CURVE25519 is not set\n# CONFIG_CRYPTO_LIB_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_HW=y\n# CONFIG_CRYPTO_DEV_CCP is not set\n# CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set\n# CONFIG_CRYPTO_DEV_CAVIUM_ZIP is not set\nCONFIG_CRYPTO_DEV_ROCKCHIP=y\n# CONFIG_CRYPTO_DEV_CCREE is not set\n# CONFIG_CRYPTO_DEV_HISI_SEC is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_ARCH_HAS_FAST_MULTIPLIER=y\n# CONFIG_INDIRECT_PIO is not set\nCONFIG_CRC_CCITT=y\nCONFIG_CRC16=y\nCONFIG_CRC_T10DIF=y\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC64 is not set\n# CONFIG_CRC4 is not set\nCONFIG_CRC7=y\nCONFIG_LIBCRC32C=y\n# CONFIG_CRC8 is not set\nCONFIG_AUDIT_ARCH_COMPAT_GENERIC=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=y\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_XZ_DEC=y\n# CONFIG_XZ_DEC_X86 is not set\n# CONFIG_XZ_DEC_POWERPC is not set\n# CONFIG_XZ_DEC_IA64 is not set\nCONFIG_XZ_DEC_ARM=y\nCONFIG_XZ_DEC_ARMTHUMB=y\n# CONFIG_XZ_DEC_SPARC is not set\nCONFIG_XZ_DEC_BCJ=y\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_GZIP=y\nCONFIG_DECOMPRESS_BZIP2=y\nCONFIG_DECOMPRESS_LZMA=y\nCONFIG_DECOMPRESS_XZ=y\nCONFIG_DECOMPRESS_LZO=y\nCONFIG_DECOMPRESS_LZ4=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_REED_SOLOMON=y\nCONFIG_REED_SOLOMON_ENC8=y\nCONFIG_REED_SOLOMON_DEC8=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_HAVE_GENERIC_DMA_COHERENT=y\nCONFIG_DMA_DIRECT_OPS=y\nCONFIG_SWIOTLB=y\nCONFIG_SGL_ALLOC=y\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_CORDIC is not set\n# CONFIG_DDR is not set\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\nCONFIG_SG_POOL=y\nCONFIG_ARCH_HAS_SG_CHAIN=y\nCONFIG_SBITMAP=y\n# CONFIG_STRING_SELFTEST is not set\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_TIME_FROM_ARM_ARCH_TIMER is not set\n# CONFIG_PRINTK_PROCESS is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_DEBUG_INFO=y\n# CONFIG_DEBUG_INFO_REDUCED is not set\n# CONFIG_DEBUG_INFO_SPLIT is not set\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_GDB_SCRIPTS is not set\nCONFIG_ENABLE_MUST_CHECK=y\nCONFIG_FRAME_WARN=2048\n# CONFIG_STRIP_ASM_SYMS is not set\n# CONFIG_READABLE_ASM is not set\n# CONFIG_UNUSED_SYMBOLS is not set\n# CONFIG_PAGE_OWNER is not set\nCONFIG_DEBUG_FS=y\n# CONFIG_HEADERS_CHECK is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_DEBUG_KERNEL=y\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_PAGE_REF is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_DEBUG_VM is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\n# CONFIG_DEBUG_MEMORY_INIT is not set\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_SW_TAGS=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\n# CONFIG_KASAN is not set\nCONFIG_KASAN_STACK=1\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Lockups and Hangs\n#\n# CONFIG_SOFTLOCKUP_DETECTOR is not set\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\nCONFIG_SCHED_DEBUG=y\nCONFIG_SCHED_INFO=y\nCONFIG_SCHEDSTATS=y\n# CONFIG_SCHED_STACK_END_CHECK is not set\n# CONFIG_DEBUG_TIMEKEEPING is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_RT_MUTEXES is not set\nCONFIG_DEBUG_SPINLOCK=y\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_RWSEMS is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\nCONFIG_HAVE_DEBUG_BUGVERBOSE=y\nCONFIG_DEBUG_BUGVERBOSE=y\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PI_LIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\nCONFIG_DEBUG_CREDENTIALS=y\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_PERF_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=60\nCONFIG_RCU_TRACE=y\n# CONFIG_RCU_EQS_DEBUG is not set\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_TRACING=y\nCONFIG_GENERIC_TRACER=y\nCONFIG_TRACING_SUPPORT=y\nCONFIG_FTRACE=y\nCONFIG_FUNCTION_TRACER=y\nCONFIG_FUNCTION_GRAPH_TRACER=y\n# CONFIG_PREEMPTIRQ_EVENTS is not set\n# CONFIG_IRQSOFF_TRACER is not set\n# CONFIG_SCHED_TRACER is not set\n# CONFIG_HWLAT_TRACER is not set\n# CONFIG_FTRACE_SYSCALLS is not set\n# CONFIG_TRACER_SNAPSHOT is not set\nCONFIG_BRANCH_PROFILE_NONE=y\n# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set\n# CONFIG_PROFILE_ALL_BRANCHES is not set\n# CONFIG_STACK_TRACER is not set\nCONFIG_BLK_DEV_IO_TRACE=y\nCONFIG_UPROBE_EVENTS=y\nCONFIG_PROBE_EVENTS=y\nCONFIG_DYNAMIC_FTRACE=y\n# CONFIG_FUNCTION_PROFILER is not set\nCONFIG_FTRACE_MCOUNT_RECORD=y\n# CONFIG_FTRACE_STARTUP_TEST is not set\n# CONFIG_HIST_TRIGGERS is not set\n# CONFIG_TRACEPOINT_BENCHMARK is not set\n# CONFIG_RING_BUFFER_BENCHMARK is not set\n# CONFIG_RING_BUFFER_STARTUP_TEST is not set\n# CONFIG_PREEMPTIRQ_DELAY_TEST is not set\n# CONFIG_TRACE_EVAL_MAP_FILE is not set\nCONFIG_TRACING_EVENTS_GPIO=y\n# CONFIG_DMA_API_DEBUG is not set\nCONFIG_RUNTIME_TESTING_MENU=y\nCONFIG_LKDTM=y\n# CONFIG_TEST_LIST_SORT is not set\n# CONFIG_TEST_SORT is not set\n# CONFIG_BACKTRACE_SELF_TEST is not set\n# CONFIG_RBTREE_TEST is not set\n# CONFIG_INTERVAL_TREE_TEST is not set\n# CONFIG_PERCPU_TEST is not set\n# CONFIG_ATOMIC64_SELFTEST is not set\n# CONFIG_TEST_HEXDUMP is not set\n# CONFIG_TEST_STRING_HELPERS is not set\n# CONFIG_TEST_KSTRTOX is not set\n# CONFIG_TEST_PRINTF is not set\n# CONFIG_TEST_BITMAP is not set\n# CONFIG_TEST_BITFIELD is not set\n# CONFIG_TEST_UUID is not set\n# CONFIG_TEST_OVERFLOW is not set\n# CONFIG_TEST_RHASHTABLE is not set\n# CONFIG_TEST_HASH is not set\n# CONFIG_TEST_IDA is not set\n# CONFIG_TEST_LKM is not set\n# CONFIG_TEST_USER_COPY is not set\n# CONFIG_TEST_BPF is not set\n# CONFIG_FIND_BIT_BENCHMARK is not set\n# CONFIG_TEST_FIRMWARE is not set\n# CONFIG_TEST_SYSCTL is not set\n# CONFIG_TEST_UDELAY is not set\n# CONFIG_TEST_STATIC_KEYS is not set\n# CONFIG_TEST_KMOD is not set\n# CONFIG_TEST_MEMINIT is not set\n# CONFIG_TEST_STACKINIT is not set\n# CONFIG_MEMTEST is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_SAMPLES is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\nCONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y\n# CONFIG_UBSAN is not set\nCONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y\nCONFIG_STRICT_DEVMEM=y\n# CONFIG_IO_STRICT_DEVMEM is not set\n# CONFIG_ARM64_PTDUMP_DEBUGFS is not set\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set\n# CONFIG_DEBUG_WX is not set\n# CONFIG_DEBUG_ALIGN_RODATA is not set\n# CONFIG_ARM64_RELOC_TEST is not set\n# CONFIG_CORESIGHT is not set\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/options",
    "content": "################################################################################\n# setup device defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_PATCH_ARCH=\"aarch64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a55\"\n\t\tTARGET_CPU_FLAGS=\"+crc+crypto+fp+simd\"\n        TARGET_FPU=\"fp-armv8\"\n        TARGET_FEATURES=\"64bit\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_PATCH_ARCH=\"aarch64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"crypto-neon-fp-armv8\"\n        TARGET_FEATURES=\"32bit\"\n        ;;\n    esac\n\n  # Kernel target\n    KERNEL_TARGET=\"Image\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"\"\n    KERNEL_MAKE_EXTRACMD+=\" rockchip/rk3568-odroid-m1.dtb\"\n\n    \n  # Mali GPU family\n    MALI_FAMILY=\"g52\"\n    OPENGLES=\"mali-bifrost\"\n\n  # kernel serial console\n    EXTRA_CMDLINE=\"quiet console=ttyFIQ0,1500000 console=tty0 ssh pci=nomsi\"\n    \n    LINUX=\"OdroidM1-4.19\"\n\tUBOOT_SYSTEM=\"OdroidM1\"\n    \n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"wlan-firmware misc-firmware\" #rockchip-firmware dvb-firmware\n    \n  # additional drivers to install:\n  # for a list of additional drivers see packages/linux-drivers\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_DRIVERS=\"DRIVER1 DRIVER2\"\n  ADDITIONAL_DRIVERS=\"RTL8812AU\" #RTL8192CU RTL8192DU RTL8192EU RTL8188EU RTL8812AU RTL8821CU\"\n  \n  # driver addons to install:\n  # for a list of additinoal drivers see packages/linux-driver-addons\n  # Space separated list is supported,\n    DRIVER_ADDONS=\"\" #dvb-latest\"\n\n  # additional packages to install\n    ADDITIONAL_PACKAGES=\"dtc u-boot-tools:host\"\n\n  # debug tty path\n    DEBUG_TTY=\"/dev/ttyFIQ0\"\n\n  # SquashFS compression method (gzip / lzo / xz / zstd)\n    SQUASHFS_COMPRESSION=\"lzo\" \n    \n  # build and install PulseAudio support (yes / no)\n  PULSEAUDIO_SUPPORT=\"yes\"\n\n  # build and install espeak support (yes / no)\n  ESPEAK_SUPPORT=\"no\"\n\n  # build and install bluetooth support (yes / no)\n  BLUETOOTH_SUPPORT=\"yes\"\n\n  # build and install Avahi (Zeroconf) daemon (yes / no)\n  AVAHI_DAEMON=\"no\"\n\n  # build with UPnP support (yes / no)\n  KODI_UPNP_SUPPORT=\"no\"\n\n  # build with NFS support (mounting nfs shares via the OS) (yes / no)\n  NFS_SUPPORT=\"no\"\n\n  # build with Samba Client support (mounting samba shares via the OS) (yes / no)\n  SAMBA_SUPPORT=\"yes\"\n\n  # build and install Samba Server (yes / no)\n  SAMBA_SERVER=\"yes\"\n\n  # build and install SFTP Server (yes / no)\n  SFTP_SERVER=\"yes\"\n\n  # build and install OpenVPN support (yes / no)\n  OPENVPN_SUPPORT=\"no\"\n\n  # build and install diskmounter support (udevil)\n  # this service provide auto mounting support for external drives in the\n  # mediacenter also automount internally drives at boottime via udev (yes / no)\n  UDEVIL=\"yes\"\n\n  # build and install exFAT fuse support (yes / no)\n  EXFAT=\"yes\"\n\n  # build and install NTFS-3G fuse support (yes / no)\n  NTFS3G=\"yes\"\n\n  # build and install hfs filesystem utilities (yes / no)\n  HFSTOOLS=\"yes\"\n\n  # build and install remote support (yes / no)\n  REMOTE_SUPPORT=\"no\"\n\n  # build and install CEC adapter support (yes / no)\n  CEC_SUPPORT=\"no\"\n\n  # build and install CEC framework support (yes / no)\n  CEC_FRAMEWORK_SUPPORT=\"no\"\n\n  # build and install iSCSI support - iscsistart (yes / no)\n  ISCSI_SUPPORT=\"no\"\n\n  # build with swap support (yes / no)\n  SWAP_SUPPORT=\"yes\"\n\n  # swap support enabled per default (yes / no)\n  SWAP_ENABLED_DEFAULT=\"no\"\n\n  # swapfile size if SWAP_SUPPORT=yes in MB\n  SWAPFILESIZE=\"300\"\n\n  # cron support (yes / no)\n  CRON_SUPPORT=\"no\"\n\n  # Distribution Specific source location\n  DISTRO_MIRROR=\"http://sources.libreelec.tv/mirror\"\n  DISTRO_SRC=\"http://sources.libreelec.tv/$LIBREELEC_VERSION\"\n\n  # Settings package name - blank if not required\n  DISTRO_PKG_SETTINGS=\"\"\n\n  # IR remote protocols supported in default config\n  IR_REMOTE_PROTOCOLS=\"\"\n\n  # IR remote keymaps supported in default config\n  IR_REMOTE_KEYMAPS=\"\"\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/packages/dtc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dtc\"\nPKG_VERSION=\"1.6.1\"\nPKG_SHA256=\"264d355e2e547a4964d55b83b113f89be1aea5e61dbe0547ab798d0fde2be180\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://git.kernel.org/pub/scm/utils/dtc/dtc.git/\"\nPKG_URL=\"https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"The Device Tree Compiler\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_MAKE_OPTS_TARGET=\"dtc fdtput fdtget libfdt\"\nPKG_MAKE_OPTS_HOST=\"dtc fdtput fdtget libfdt\"\n\npre_make_host() {\n  mkdir -p ${PKG_BUILD}/.${HOST_NAME}\n    cp -a ${PKG_BUILD}/* ${PKG_BUILD}/.${HOST_NAME}\n\n  cd ${PKG_BUILD}/.${HOST_NAME}\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/dtc ${TOOLCHAIN}/bin\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/fdtput ${TOOLCHAIN}/bin\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/fdtget ${TOOLCHAIN}/bin\n  mkdir -p ${TOOLCHAIN}/lib\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/libfdt/{libfdt.so,libfdt.so.1} ${TOOLCHAIN}/lib\n}\n\npre_make_target() {\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n    cp -a ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}\n\n  cd ${PKG_BUILD}/.${TARGET_NAME}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/dtc ${INSTALL}/usr/bin\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/fdtput ${INSTALL}/usr/bin/\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/fdtget ${INSTALL}/usr/bin/\n  mkdir -p ${INSTALL}/usr/lib\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/libfdt/{libfdt.so,libfdt.so.1} ${INSTALL}/usr/lib/\n}\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/packages/dtc/patches/dtc-0001-libfdt-soname-version.patch",
    "content": "diff --git a/libfdt/Makefile.libfdt b/libfdt/Makefile.libfdt\nindex e546397..dd71746 100644\n--- a/libfdt/Makefile.libfdt\n+++ b/libfdt/Makefile.libfdt\n@@ -10,7 +10,7 @@ LIBFDT_VERSION = version.lds\n LIBFDT_SRCS = fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c fdt_empty_tree.c \\\n \tfdt_addresses.c fdt_overlay.c fdt_check.c\n LIBFDT_OBJS = $(LIBFDT_SRCS:%.c=%.o)\n-LIBFDT_LIB = libfdt-$(DTC_VERSION).$(SHAREDLIB_EXT)\n+LIBFDT_LIB = libfdt.$(SHAREDLIB_EXT)\n \n libfdt_clean:\n \t@$(VECHO) CLEAN \"(libfdt)\"\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/packages/enable-oga-sleep/package.mk",
    "content": "PKG_NAME=\"enable-oga-sleep\"\nPKG_VERSION=\"\"\nPKG_SHA256=\"\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"OSS\"\nPKG_DEPENDS_TARGET=\"systemd\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_LONGDESC=\"Sleep configuration\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n\tmkdir -p $INSTALL/usr/config/sleep.conf.d\n\tcp sleep.conf $INSTALL/usr/config/sleep.conf.d/sleep.conf\n\n\tmkdir -p $INSTALL/usr/lib/systemd/system-sleep/\n\tcp sleep.sh $INSTALL/usr/lib/systemd/system-sleep/sleep\n}"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/packages/enable-oga-sleep/sources/sleep.conf",
    "content": "#  This file is part of systemd.\n#\n#  systemd is free software; you can redistribute it and/or modify it\n#  under the terms of the GNU Lesser General Public License as published by\n#  the Free Software Foundation; either version 2.1 of the License, or\n#  (at your option) any later version.\n#\n# Entries in this file show the compile time defaults.\n# You can change settings by editing this file.\n# Defaults can be restored by simply deleting this file.\n#\n# See systemd-sleep.conf(5) for details\n\n[Sleep]\nAllowSuspend=yes\n#AllowHibernation=yes\n#AllowSuspendThenHibernate=yes\n#AllowHybridSleep=yes\n#SuspendMode=suspend\nSuspendState=mem standby freeze\n#HibernateMode=platform shutdown\n#HibernateState=disk\n#HybridSleepMode=suspend platform shutdown\n#HybridSleepState=disk\n#HibernateDelaySec=180min"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/packages/enable-oga-sleep/sources/sleep.sh",
    "content": "#!/bin/bash\n\nOGA=$(cat /proc/device-tree/compatible)\n\ncase $1 in\n   pre)\n    # unload esp8090 WiFi module\n[[ \"${OGA}\" == *\"v11\"* ]] && modprobe -r esp8089\n    # Store sound state. Try to avoid having max volume after resume\n    alsactl store -f /tmp/asound.state\n\t# workaround until dwc2 is fixed\n\tmodprobe -r dwc2\n    # stop hotkey service\n    systemctl stop odroidgoa-headphones.service\n    ;;\n   post)\n    # Restore pre-sleep sound state\n    alsactl restore -f /tmp/asound.state\n    # workaround until dwc2 is fixed\n\tmodprobe -r dwc2\n\tmodprobe -i dwc2\n\t# re-load WiFi module\n[[ \"${OGA}\" == *\"v11\"* ]] &&  modprobe esp8089\n    # re-detect and reapply sound, brightness and hp state\n    systemctl start odroidgoa-headphones.service\n\t;;\nesac\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/packages/odroidgoa-utils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"odroidgoa-utils\"\nPKG_VERSION=\"\"\nPKG_SHA256=\"\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"OSS\"\nPKG_DEPENDS_TARGET=\"toolchain python-evdev enable-oga-sleep usb-modeswitch light retrorun\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_LONGDESC=\"Support scripts for the ODROID-GO Advance\"\nPKG_TOOLCHAIN=\"manual\"\n\nif [ \"${ARCH}\" = \"aarch64\" ]; then\n  PKG_DEPENDS_TARGET+=\" lib32-retrorun\"\nfi\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/bin\n  cp * $INSTALL/usr/bin\n}\n\npost_install() {  \n  enable_service odroidgoa-hotkeys.service\n  enable_service odroidgoa-headphones.service\n}\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/packages/odroidgoa-utils/sources/headphone_sense.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# Switch to headphones if we have them already connected at boot\nGPIO=$(cat /sys/class/gpio/gpio86/value)\n[[ \"$GPIO\" == \"1\" ]] && set_ee_setting \"audio.device\" \"headphone\" || set_ee_setting \"audio.device\" \"speakers\"\n\nif [ -e \"/emuelec/configs/emuelec.conf\" ]; then\n/usr/bin/odroidgoa_utils.sh setaudio $(get_ee_setting \"audio.device\")\n/usr/bin/odroidgoa_utils.sh vol $(get_ee_setting \"audio.volume\")\n/usr/bin/odroidgoa_utils.sh bright $(get_ee_setting \"brightness.level\")\nfi\n\n# Headphone sensing \nDEVICE='/dev/input/event1'\n\nHP_ON='*(SW_HEADPHONE_INSERT), value 0*'\nHP_OFF='*(SW_HEADPHONE_INSERT), value 1*'\n\nevtest \"${DEVICE}\" | while read line; do\n    case $line in\n\t(${HP_ON})\n\tamixer cset name='Playback Path' HP\n\tset_ee_setting \"audio.device\" \"headphone\"\n\t;;\n\t(${HP_OFF})\n\tamixer cset name='Playback Path' SPK\n\tset_ee_setting \"audio.device\" \"speakers\"\n\t;;\n    esac\ndone\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/packages/odroidgoa-utils/sources/odroidgoa_utils.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# THESE NEEDS TO BE CLEANED UP, MAYBE WITH CASE OR FUNCTIONS\n\n# Source predefined functions and variables\n. /etc/profile\n\nif [ \"${1}\" == \"toggleaudio\" ];then\n# Toggle audio output\nCURRENTAUDIO=$(get_ee_setting \"audio.device\")\n\tcase \"${CURRENTAUDIO}\" in\n\t    \"headphone\")\n\t    echo \"setting speakers\"\n\t\tamixer cset name='Playback Path' SPK\n\t\tset_ee_setting \"audio.device\" \"speakers\"\n\t\t;;\n\t    \"auto\"|\"speakers\"|*)\n\t    echo \"setting headphones\"\n\t\tamixer cset name='Playback Path' HP\n\t\tset_ee_setting \"audio.device\" \"headphone\"\n\t\t;;\n\tesac\nfi\n\nif [ \"${1}\" == \"setaudio\" ];then\n# Set audio output second parameter is either headphones or speakers\n\tcase \"${2}\" in\n\t    \"headphone\")\n\t    echo \"setting headphones\"\n\t\tamixer cset name='Playback Path' HP\n\t\tset_ee_setting \"audio.device\" \"headphone\"\n\t\t;;\n\t  \t\"auto\"|\"speakers\"|*)\n\t  \techo \"setting speakers\"\n\t\tamixer cset name='Playback Path' SPK\n\t\tset_ee_setting \"audio.device\" \"speakers\"\n\t\t;;\n\tesac\nfi\n\nif [ \"${1}\" == \"vol\" ];then\nVOLSTEP=5\nCURRENTVOL=$(get_ee_setting \"audio.volume\")\nMAXVOL=100\nMINVOL=0\n\tif [ \"${2}\" == \"+\" ]; then\n\t\tSTEPVOL=$(($CURRENTVOL+$VOLSTEP))\n\telif [ \"${2}\" == \"-\" ]; then\n\t\tSTEPVOL=$(($CURRENTVOL-$VOLSTEP))\n\telse\n\t\tSTEPVOL=${2}\n\tfi\n\t[ \"$STEPVOL\" -ge \"$MAXVOL\" ] && STEPVOL=\"$MAXVOL\"\n\t[ \"$STEPVOL\" -le \"$MINVOL\" ] && STEPVOL=\"$MINVOL\"\n\tamixer set 'Playback' ${STEPVOL}%\n\tset_ee_setting \"audio.volume\" ${STEPVOL}\n  fi    \n\n\nif [ \"${1}\" == \"bright\" ]; then\nSTEPS=\"5\"\nCURBRIGHT=$(cat /sys/class/backlight/backlight/brightness)\nMAXSYSBRIGHT=$(cat /sys/class/backlight/backlight/max_brightness)\nCURRENTBRIGHT=$(awk -v a=\"$CURBRIGHT\" -v b=\"$MAXSYSBRIGHT\" 'BEGIN{print int((a*100/b)+0.5)}')\nMAXBRIGHT=\"100\"\nMINBRIGHT=\"5\"\n\n    if [ \"${2}\" == \"+\" ]; then\n        STEPBRIGHT=$(($CURRENTBRIGHT+$STEPS))\n    elif [ \"${2}\" == \"-\" ]; then\n        STEPBRIGHT=$(($CURRENTBRIGHT-$STEPS))\n    else\n        STEPBRIGHT=${2}\n    fi\n\n    [ \"$STEPBRIGHT\" -ge \"$MAXBRIGHT\" ] && STEPBRIGHT=\"$MAXBRIGHT\"\n    [ \"$STEPBRIGHT\" -le \"$MINBRIGHT\" ] && STEPBRIGHT=\"$MINBRIGHT\"\n    #echo \"Setting bright to $STEPBRIGHT\"\n\n    NEWVAL=$(awk -v a=\"$STEPBRIGHT\" -v b=\"$MAXSYSBRIGHT\" 'BEGIN{print int((a*b/100)+0.5)}')\necho \"${NEWVAL}\" > /sys/class/backlight/backlight/brightness\nset_ee_setting \"brightness.level\" $STEPBRIGHT\nfi\n\nif [ \"${1}\" == \"oga_oc\" ]; then\n\n    case ${2} in \n        \"1.4ghz\")\n        gov=\"userspace\"\n        freq=\"1416000\"\n        ;;\n        \"1.5ghz\")\n        gov=\"userspace\"\n        freq=\"1512000\"\n        ;;\n        *)\n        gov=\"performance\"\n        freq=\"1296000\"\n        ;;\n    esac\n\n    echo ${gov} > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor\n    echo ${freq} > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed\n    echo ${freq} > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq\nfi\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/packages/odroidgoa-utils/sources/oga_events.py",
    "content": "#!/usr/bin/env python3\n\nimport evdev\nimport asyncio\nimport time\nimport os.path\nfrom subprocess import check_output\n\npwrkey = evdev.InputDevice(\"/dev/input/event0\")\n\nif os.path.exists(\"/dev/input/by-path/platform-odroidgo3-joypad-event-joystick\"):\n    odroidgo_joypad = evdev.InputDevice(\"/dev/input/by-path/platform-odroidgo3-joypad-event-joystick\")\n    devicename = \"GO-Super Gamepad\"\n    odroidgo_volume = evdev.InputDevice(\"/dev/input/by-path/platform-odroidgo3-keys-event\")\nelse:\n    odroidgo_joypad = evdev.InputDevice(\"/dev/input/by-path/platform-odroidgo2-joypad-event-joystick\")\n    devicename = \"GO-Advance Gamepad\"\n    \nneed_to_swallow_pwr_key = False # After a resume, we swallow the pwr input that triggered the resume\n\nclass Power:\n    pwr = 116\n\nclass Joypad:\n    l1 = 310\n    r1 = 311\n\n    up = 544\n    down = 545\n    left = 546\n    right = 547\n\n    f1 = 704\n    f2 = 705\n    f5 = 708\n    volu = 115\n    vold = 114\n\ndef runcmd(cmd, *args, **kw):\n    print(f\">>> {cmd}\")\n    check_output(cmd, *args, **kw)\n\nasync def handle_event(device):\n    async for event in device.async_read_loop():\n        global need_to_swallow_pwr_key\n        if device.name == \"rk8xx_pwrkey\":\n            keys = odroidgo_joypad.active_keys()\n            if event.value == 1 and event.code == Power.pwr: # pwr on release\n                if need_to_swallow_pwr_key == False:\n                    need_to_swallow_pwr_key = True\n                    if Joypad.f5 in keys:\n                        runcmd(\"/bin/systemctl poweroff || true\", shell=True)\n                    else:\n                        runcmd(\"/bin/systemctl suspend || true\", shell=True)\n                else:\n                    need_to_swallow_pwr_key = False\n\n        elif device.name == \"odroidgo3-keys\":\n            keys = odroidgo_volume.active_keys()\n            if event.value == 1:\n                if Joypad.volu in keys:\n                        runcmd(\"/usr/bin/odroidgoa_utils.sh vol +\", shell=True)\n                elif Joypad.vold in keys:\n                        runcmd(\"/usr/bin/odroidgoa_utils.sh vol -\", shell=True)\n\n        elif device.name.find(devicename) != -1:\n            keys = odroidgo_joypad.active_keys()\n            print(keys)\n            if event.value == 1 and Joypad.f5 in keys:\n                if event.code == Joypad.up:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh vol +\", shell=True)\n                elif event.code == Joypad.down:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh vol -\", shell=True)\n                elif event.code == Joypad.right:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh bright +\", shell=True)\n                elif event.code == Joypad.left:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh bright -\", shell=True)\n                elif event.code == Joypad.r1:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh toggleaudio\", shell=True)\n\n        if event.code != 0:\n            print(device.name, event)\n\n        time.sleep(0.001)\n\ndef run():\n    asyncio.ensure_future(handle_event(pwrkey))\n    asyncio.ensure_future(handle_event(odroidgo_joypad))\n    if os.path.exists(\"/dev/input/by-path/platform-odroidgo3-joypad-event-joystick\"):\n        asyncio.ensure_future(handle_event(odroidgo_volume))\n\n    loop = asyncio.get_event_loop()\n    loop.run_forever()\n\nif __name__ == \"__main__\": # admire\n    run()\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/packages/odroidgoa-utils/system.d/odroidgoa-headphones.service",
    "content": "[Unit]\nDescription=Odroid Go Advance Headphone Sense\nConditionPathExists=/dev/input/event1\nBefore=emuelec.target\n\n[Service]\nEnvironment=HOME=/storage\nEnvironmentFile=/storage/.config/emulationstation/scripts/es_env.sh\nExecStart=/usr/bin/headphone_sense.sh\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/packages/odroidgoa-utils/system.d/odroidgoa-hotkeys.service",
    "content": "[Unit]\nDescription=Odroid Go Advance Hotkeys\nConditionPathExists=/dev/input/event0\nConditionPathExists=/dev/input/event2\nBefore=emuelec.target\n\n[Service]\nEnvironment=HOME=/storage\nEnvironmentFile=/storage/.config/emulationstation/scripts/es_env.sh\nExecStart=/usr/bin/oga_events.py\nType=simple\n\n[Install]\nWantedBy=multi-user.target"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/packages/rkbin/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rkbin\"\nPKG_VERSION=\"bcab36925d63303514de496dc46767760e8b4511\"\nPKG_SHA256=\"11749b4957a8544172066b6234c35eeee084f1bb2c31c59fa0aeda6805982662\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"https://github.com/hardkernel/rk3568_rkbin\"\nPKG_URL=\"https://github.com/hardkernel/rk3568_rkbin/archive/$PKG_VERSION.tar.gz\"\nPKG_LONGDESC=\"rkbin: Rockchip Firmware and Tool Binaries\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "projects/Rockchip/devices/OdroidM1/packages/u-boot-tools/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"u-boot-tools\"\nPKG_VERSION=\"2022.07\"\nPKG_SHA256=\"92b08eb49c24da14c1adbf70a71ae8f37cc53eeb4230e859ad8b6733d13dcf5e\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_URL=\"https://ftp.denx.de/pub/u-boot/u-boot-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_HOST=\"ccache:host bison:host flex:host openssl:host pkg-config:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\n\nmake_host() {\n  make qemu-x86_64_defconfig HOSTCC=\"${HOST_CC}\" HOSTCFLAGS=\"-I${TOOLCHAIN}/include\" HOSTLDFLAGS=\"${HOST_LDFLAGS}\"\n  make tools-only HOSTCC=\"${HOST_CC}\" HOSTCFLAGS=\"-I${TOOLCHAIN}/include\" HOSTLDFLAGS=\"${HOST_LDFLAGS}\"\n}\n\nmake_target() {\n  : # host-only package\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp tools/mkimage ${TOOLCHAIN}/bin\n}\n"
  },
  {
    "path": "projects/Rockchip/devices/RK3288/README.md",
    "content": "# RK3288\n\nThis is a SoC device for RK3288\n\n**Build**\n\n* `PROJECT=Rockchip DEVICE=RK3288 ARCH=arm UBOOT_SYSTEM=miqi make image`\n* `PROJECT=Rockchip DEVICE=RK3288 ARCH=arm UBOOT_SYSTEM=tinker make image`\n"
  },
  {
    "path": "projects/Rockchip/devices/RK3288/bootloader/config",
    "content": "CONFIG_BOOTDELAY=1\n# CONFIG_DM_VIDEO is not set\n# CONFIG_DISPLAY is not set\n# CONFIG_ENV_IS_IN_MMC is not set\n# CONFIG_NET_RANDOM_ETHADDR is not set\n# CONFIG_USB_KEYBOARD is not set\n# CONFIG_FIT is not set\n# CONFIG_FIT_VERBOSE is not set\n# CONFIG_SPL_LOAD_FIT is not set\n# CONFIG_SPL_OPTEE_IMAGE\n# CONFIG_TPL_DRIVERS_MISC is not set\n# CONFIG_SPL_TEXT_BASE is not set\n# CONFIG_SPL_ROCKCHIP_BACK_TO_BROM is not set\nCONFIG_SPL_TEXT_BASE=0x0\nCONFIG_MISC=y\nCONFIG_MISC_INIT_R=y\nCONFIG_ROCKCHIP_EFUSE=y\nCONFIG_SHA256=y\nCONFIG_TPL=y\nCONFIG_SPL_SIZE_LIMIT=0x4b000\nCONFIG_SYS_TEXT_BASE=0x01000000\n"
  },
  {
    "path": "projects/Rockchip/devices/RK3288/filesystem/usr/bin/cputemp",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nTEMP=\"$(cat /sys/class/thermal/thermal_zone0/temp)\"\necho \"$(( $TEMP / 1000 )) C\"\n"
  },
  {
    "path": "projects/Rockchip/devices/RK3288/filesystem/usr/bin/gputemp",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nTEMP=\"$(cat /sys/class/thermal/thermal_zone1/temp)\"\necho \"$(( $TEMP / 1000 )) C\"\n"
  },
  {
    "path": "projects/Rockchip/devices/RK3288/linux/default/linux.arm.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm 6.1.63 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"armv7ve-libreelec-linux-gnueabihf-gcc-12.2.0 (GCC) 12.2.0\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=120200\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23900\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23900\nCONFIG_LLD_VERSION=0\nCONFIG_CC_CAN_LINK=y\nCONFIG_CC_CAN_LINK_STATIC=y\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_BUILD_SALT=\"\"\nCONFIG_HAVE_KERNEL_GZIP=y\nCONFIG_HAVE_KERNEL_LZMA=y\nCONFIG_HAVE_KERNEL_XZ=y\nCONFIG_HAVE_KERNEL_LZO=y\nCONFIG_HAVE_KERNEL_LZ4=y\n# CONFIG_KERNEL_GZIP is not set\n# CONFIG_KERNEL_LZMA is not set\n# CONFIG_KERNEL_XZ is not set\n# CONFIG_KERNEL_LZO is not set\nCONFIG_KERNEL_LZ4=y\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\n# CONFIG_WATCH_QUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_IRQ_IPI=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_GENERIC_IRQ_MULTI_HANDLER=y\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\nCONFIG_CONTEXT_TRACKING=y\nCONFIG_CONTEXT_TRACKING_IDLE=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\n# CONFIG_BPF_JIT is not set\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# end of BPF subsystem\n\nCONFIG_PREEMPT_VOLUNTARY_BUILD=y\n# CONFIG_PREEMPT_NONE is not set\nCONFIG_PREEMPT_VOLUNTARY=y\n# CONFIG_PREEMPT is not set\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\nCONFIG_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_SCHED_AVG_IRQ=y\nCONFIG_SCHED_THERMAL_PRESSURE=y\nCONFIG_BSD_PROCESS_ACCT=y\nCONFIG_BSD_PROCESS_ACCT_V3=y\nCONFIG_TASKSTATS=y\nCONFIG_TASK_DELAY_ACCT=y\nCONFIG_TASK_XACCT=y\nCONFIG_TASK_IO_ACCOUNTING=y\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\n# end of RCU Subsystem\n\nCONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=17\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# CONFIG_UCLAMP_TASK is not set\n# end of Scheduler features\n\nCONFIG_CC_IMPLICIT_FALLTHROUGH=\"-Wimplicit-fallthrough=5\"\nCONFIG_GCC11_NO_ARRAY_BOUNDS=y\nCONFIG_CC_NO_ARRAY_BOUNDS=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\n# CONFIG_CGROUP_FAVOR_DYNMODS is not set\nCONFIG_MEMCG=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_BLK_CGROUP=y\nCONFIG_CGROUP_WRITEBACK=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\nCONFIG_CGROUP_PIDS=y\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_CGROUP_PERF=y\nCONFIG_CGROUP_BPF=y\n# CONFIG_CGROUP_MISC is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\nCONFIG_CHECKPOINT_RESTORE=y\nCONFIG_SCHED_AUTOGROUP=y\n# CONFIG_SYSFS_DEPRECATED is not set\n# CONFIG_RELAY is not set\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"@INITRAMFS_SOURCE@\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\n# CONFIG_RD_GZIP is not set\n# CONFIG_RD_BZIP2 is not set\n# CONFIG_RD_LZMA is not set\n# CONFIG_RD_XZ is not set\n# CONFIG_RD_LZO is not set\n# CONFIG_RD_LZ4 is not set\nCONFIG_RD_ZSTD=y\n# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set\nCONFIG_INITRAMFS_COMPRESSION_NONE=y\n# CONFIG_BOOT_CONFIG is not set\nCONFIG_INITRAMFS_PRESERVE_MTIME=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\n# CONFIG_EXPERT is not set\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\nCONFIG_SYSFS_SYSCALL=y\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\nCONFIG_KALLSYMS_ALL=y\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_EMBEDDED is not set\nCONFIG_HAVE_PERF_EVENTS=y\nCONFIG_PERF_USE_VMALLOC=y\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_SYSTEM_DATA_VERIFICATION=y\n# CONFIG_PROFILING is not set\nCONFIG_TRACEPOINTS=y\n# end of General setup\n\nCONFIG_ARM=y\nCONFIG_ARM_HAS_GROUP_RELOCS=y\nCONFIG_ARM_DMA_USE_IOMMU=y\nCONFIG_ARM_DMA_IOMMU_ALIGNMENT=8\nCONFIG_SYS_SUPPORTS_APM_EMULATION=y\nCONFIG_HAVE_PROC_CPU=y\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_ARM_PATCH_PHYS_VIRT=y\nCONFIG_GENERIC_BUG=y\nCONFIG_PGTABLE_LEVELS=2\n\n#\n# System Type\n#\nCONFIG_MMU=y\nCONFIG_ARCH_MMAP_RND_BITS_MIN=8\nCONFIG_ARCH_MMAP_RND_BITS_MAX=16\nCONFIG_ARCH_MULTIPLATFORM=y\n\n#\n# Platform selection\n#\n\n#\n# CPU Core family selection\n#\n# CONFIG_ARCH_MULTI_V6 is not set\nCONFIG_ARCH_MULTI_V7=y\nCONFIG_ARCH_MULTI_V6_V7=y\n# end of Platform selection\n\n# CONFIG_ARCH_VIRT is not set\n# CONFIG_ARCH_AIROHA is not set\n# CONFIG_ARCH_ACTIONS is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_ARTPEC is not set\n# CONFIG_ARCH_ASPEED is not set\n# CONFIG_ARCH_AT91 is not set\n# CONFIG_ARCH_BCM is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_DIGICOLOR is not set\n# CONFIG_ARCH_DOVE is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_HIGHBANK is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_HPE is not set\n# CONFIG_ARCH_MXC is not set\n# CONFIG_ARCH_KEYSTONE is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_MESON is not set\n# CONFIG_ARCH_MILBEAUT is not set\n# CONFIG_ARCH_MMP is not set\n# CONFIG_ARCH_MSTARV7 is not set\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_NPCM is not set\n\n#\n# TI OMAP/AM/DM/DRA Family\n#\n# CONFIG_ARCH_OMAP3 is not set\n# CONFIG_ARCH_OMAP4 is not set\n# CONFIG_SOC_OMAP5 is not set\n# CONFIG_SOC_AM33XX is not set\n# CONFIG_SOC_AM43XX is not set\n# CONFIG_SOC_DRA7XX is not set\n# end of TI OMAP/AM/DM/DRA Family\n\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_RDA is not set\n# CONFIG_ARCH_REALTEK is not set\nCONFIG_ARCH_ROCKCHIP=y\n# CONFIG_ARCH_S5PV210 is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_INTEL_SOCFPGA is not set\n# CONFIG_PLAT_SPEAR is not set\n# CONFIG_ARCH_STI is not set\n# CONFIG_ARCH_STM32 is not set\n# CONFIG_ARCH_SUNPLUS is not set\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_U8500 is not set\n# CONFIG_ARCH_REALVIEW is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_WM8850 is not set\n# CONFIG_ARCH_ZYNQ is not set\n\n#\n# Processor Type\n#\nCONFIG_CPU_V7=y\nCONFIG_CPU_THUMB_CAPABLE=y\nCONFIG_CPU_32v6K=y\nCONFIG_CPU_32v7=y\nCONFIG_CPU_ABRT_EV7=y\nCONFIG_CPU_PABRT_V7=y\nCONFIG_CPU_CACHE_V7=y\nCONFIG_CPU_CACHE_VIPT=y\nCONFIG_CPU_COPY_V6=y\nCONFIG_CPU_TLB_V7=y\nCONFIG_CPU_HAS_ASID=y\nCONFIG_CPU_CP15=y\nCONFIG_CPU_CP15_MMU=y\n\n#\n# Processor Features\n#\n# CONFIG_ARM_LPAE is not set\nCONFIG_ARM_THUMB=y\nCONFIG_ARM_THUMBEE=y\nCONFIG_ARM_VIRT_EXT=y\nCONFIG_SWP_EMULATE=y\nCONFIG_CPU_LITTLE_ENDIAN=y\n# CONFIG_CPU_BIG_ENDIAN is not set\n# CONFIG_CPU_ICACHE_DISABLE is not set\n# CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND is not set\n# CONFIG_CPU_BPREDICT_DISABLE is not set\nCONFIG_CPU_SPECTRE=y\nCONFIG_HARDEN_BRANCH_PREDICTOR=y\nCONFIG_HARDEN_BRANCH_HISTORY=y\nCONFIG_KUSER_HELPERS=y\nCONFIG_VDSO=y\nCONFIG_OUTER_CACHE=y\nCONFIG_OUTER_CACHE_SYNC=y\nCONFIG_MIGHT_HAVE_CACHE_L2X0=y\nCONFIG_CACHE_L2X0=y\n# CONFIG_CACHE_L2X0_PMU is not set\n# CONFIG_PL310_ERRATA_588369 is not set\n# CONFIG_PL310_ERRATA_727915 is not set\n# CONFIG_PL310_ERRATA_753970 is not set\n# CONFIG_PL310_ERRATA_769419 is not set\nCONFIG_ARM_L1_CACHE_SHIFT_6=y\nCONFIG_ARM_L1_CACHE_SHIFT=6\nCONFIG_ARM_DMA_MEM_BUFFERABLE=y\nCONFIG_ARM_HEAVY_MB=y\nCONFIG_DEBUG_ALIGN_RODATA=y\n# CONFIG_ARM_ERRATA_430973 is not set\nCONFIG_ARM_ERRATA_643719=y\n# CONFIG_ARM_ERRATA_720789 is not set\n# CONFIG_ARM_ERRATA_754322 is not set\n# CONFIG_ARM_ERRATA_754327 is not set\n# CONFIG_ARM_ERRATA_764369 is not set\n# CONFIG_ARM_ERRATA_764319 is not set\n# CONFIG_ARM_ERRATA_775420 is not set\n# CONFIG_ARM_ERRATA_798181 is not set\n# CONFIG_ARM_ERRATA_773022 is not set\n# CONFIG_ARM_ERRATA_818325_852422 is not set\n# CONFIG_ARM_ERRATA_821420 is not set\n# CONFIG_ARM_ERRATA_825619 is not set\n# CONFIG_ARM_ERRATA_857271 is not set\n# CONFIG_ARM_ERRATA_852421 is not set\n# CONFIG_ARM_ERRATA_852423 is not set\n# CONFIG_ARM_ERRATA_857272 is not set\n# end of System Type\n\n#\n# Bus support\n#\n# CONFIG_ARM_ERRATA_814220 is not set\n# end of Bus support\n\n#\n# Kernel Features\n#\nCONFIG_HAVE_SMP=y\nCONFIG_SMP=y\nCONFIG_SMP_ON_UP=y\nCONFIG_CURRENT_POINTER_IN_TPIDRURO=y\nCONFIG_IRQSTACKS=y\nCONFIG_ARM_CPU_TOPOLOGY=y\n# CONFIG_SCHED_MC is not set\n# CONFIG_SCHED_SMT is not set\nCONFIG_HAVE_ARM_SCU=y\nCONFIG_HAVE_ARM_ARCH_TIMER=y\nCONFIG_HAVE_ARM_TWD=y\n# CONFIG_MCPM is not set\n# CONFIG_BIG_LITTLE is not set\nCONFIG_VMSPLIT_3G=y\n# CONFIG_VMSPLIT_3G_OPT is not set\n# CONFIG_VMSPLIT_2G is not set\n# CONFIG_VMSPLIT_1G is not set\nCONFIG_PAGE_OFFSET=0xC0000000\nCONFIG_NR_CPUS=4\nCONFIG_HOTPLUG_CPU=y\n# CONFIG_ARM_PSCI is not set\nCONFIG_ARCH_NR_GPIO=288\nCONFIG_HZ_FIXED=0\n# CONFIG_HZ_100 is not set\n# CONFIG_HZ_200 is not set\n# CONFIG_HZ_250 is not set\nCONFIG_HZ_300=y\n# CONFIG_HZ_500 is not set\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=300\nCONFIG_SCHED_HRTICK=y\n# CONFIG_THUMB2_KERNEL is not set\nCONFIG_ARM_PATCH_IDIV=y\nCONFIG_AEABI=y\n# CONFIG_OABI_COMPAT is not set\nCONFIG_ARCH_SELECT_MEMORY_MODEL=y\nCONFIG_ARCH_FLATMEM_ENABLE=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_HIGHMEM=y\nCONFIG_HIGHPTE=y\nCONFIG_CPU_SW_DOMAIN_PAN=y\nCONFIG_HW_PERF_EVENTS=y\n# CONFIG_ARM_MODULE_PLTS is not set\nCONFIG_ARCH_FORCE_MAX_ORDER=11\nCONFIG_ALIGNMENT_TRAP=y\n# CONFIG_UACCESS_WITH_MEMCPY is not set\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\n# CONFIG_XEN is not set\nCONFIG_CC_HAVE_STACKPROTECTOR_TLS=y\nCONFIG_STACKPROTECTOR_PER_TASK=y\n# end of Kernel Features\n\n#\n# Boot options\n#\nCONFIG_USE_OF=y\nCONFIG_ATAGS=y\n# CONFIG_UNUSED_BOARD_FILES is not set\n# CONFIG_DEPRECATED_PARAM_STRUCT is not set\nCONFIG_ZBOOT_ROM_TEXT=0\nCONFIG_ZBOOT_ROM_BSS=0\nCONFIG_ARM_APPENDED_DTB=y\nCONFIG_ARM_ATAG_DTB_COMPAT=y\nCONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y\n# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set\nCONFIG_CMDLINE=\"\"\n# CONFIG_KEXEC is not set\n# CONFIG_CRASH_DUMP is not set\nCONFIG_AUTO_ZRELADDR=y\n# CONFIG_EFI is not set\n# end of Boot options\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=m\nCONFIG_CPU_FREQ_GOV_USERSPACE=m\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\nCONFIG_CPU_FREQ_GOV_CONSERVATIVE=m\nCONFIG_CPU_FREQ_GOV_SCHEDUTIL=y\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\nCONFIG_CPUFREQ_DT_PLATDEV=y\n# CONFIG_ARM_SCPI_CPUFREQ is not set\n# CONFIG_ARM_SCMI_CPUFREQ is not set\n# end of CPU Frequency scaling\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\nCONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\nCONFIG_DT_IDLE_STATES=y\n\n#\n# ARM CPU Idle Drivers\n#\nCONFIG_ARM_CPUIDLE=y\n# end of ARM CPU Idle Drivers\n# end of CPU Idle\n# end of CPU Power Management\n\n#\n# Floating point emulation\n#\n\n#\n# At least one emulation must be selected\n#\nCONFIG_VFP=y\nCONFIG_VFPv3=y\nCONFIG_NEON=y\nCONFIG_KERNEL_MODE_NEON=y\n# end of Floating point emulation\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_HIBERNATION is not set\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_USERSPACE_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\nCONFIG_PM=y\n# CONFIG_PM_DEBUG is not set\n# CONFIG_APM_EMULATION is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\n# CONFIG_ENERGY_MODEL is not set\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\nCONFIG_ARM_CPU_SUSPEND=y\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\n# end of Power management options\n\nCONFIG_AS_VFP_VMRS_FPINST=y\n\n#\n# General architecture-dependent options\n#\n# CONFIG_KPROBES is not set\n# CONFIG_JUMP_LABEL is not set\nCONFIG_UPROBES=y\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_ARCH_USE_BUILTIN_BSWAP=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_HAVE_OPTPROBES=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_KEEPINITRD=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_ARCH_HAS_CPU_FINALIZE_INIT=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_32BIT_OFF_T=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_ARCH_WANT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_LTO_NONE=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_REL=y\nCONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y\nCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_HAVE_EXIT_THREAD=y\nCONFIG_ARCH_MMAP_RND_BITS=8\nCONFIG_PAGE_SIZE_LESS_THAN_64KB=y\nCONFIG_PAGE_SIZE_LESS_THAN_256KB=y\nCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_ARCH_OPTIONAL_KERNEL_RWX=y\nCONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_HAVE_ARCH_PFN_VALID=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\nCONFIG_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/sbin/modprobe\"\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\n# CONFIG_BLOCK_LEGACY_AUTOLOAD is not set\nCONFIG_BLK_CGROUP_RWSTAT=y\nCONFIG_BLK_DEV_BSG_COMMON=y\n# CONFIG_BLK_DEV_BSGLIB is not set\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_DEV_ZONED is not set\nCONFIG_BLK_DEV_THROTTLING=y\n# CONFIG_BLK_DEV_THROTTLING_LOW is not set\n# CONFIG_BLK_WBT is not set\n# CONFIG_BLK_CGROUP_IOLATENCY is not set\n# CONFIG_BLK_CGROUP_IOCOST is not set\n# CONFIG_BLK_CGROUP_IOPRIO is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\nCONFIG_MAC_PARTITION=y\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\nCONFIG_LDM_PARTITION=y\n# CONFIG_LDM_DEBUG is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\n# CONFIG_CMDLINE_PARTITION is not set\n# end of Partition Types\n\nCONFIG_BLK_MQ_VIRTIO=y\nCONFIG_BLK_PM=y\nCONFIG_BLOCK_HOLDER_DEPRECATED=y\nCONFIG_BLK_MQ_STACKING=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\n# CONFIG_IOSCHED_BFQ is not set\n# end of IO Schedulers\n\nCONFIG_ASN1=y\nCONFIG_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_INLINE_READ_UNLOCK=y\nCONFIG_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_INLINE_WRITE_UNLOCK=y\nCONFIG_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\n# CONFIG_BINFMT_ELF_FDPIC is not set\nCONFIG_ELFCORE=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\nCONFIG_ARCH_HAS_BINFMT_FLAT=y\n# CONFIG_BINFMT_FLAT is not set\nCONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\nCONFIG_SWAP=y\n# CONFIG_ZSWAP is not set\n\n#\n# SLAB allocator options\n#\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# end of SLAB allocator options\n\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\nCONFIG_COMPAT_BRK=y\nCONFIG_SELECT_MEMORY_MODEL=y\nCONFIG_FLATMEM_MANUAL=y\n# CONFIG_SPARSEMEM_MANUAL is not set\nCONFIG_FLATMEM=y\nCONFIG_ARCH_KEEP_MEMBLOCK=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_COMPACTION=y\nCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1\n# CONFIG_PAGE_REPORTING is not set\nCONFIG_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\nCONFIG_BOUNCE=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_WANT_GENERAL_HUGETLB=y\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\n# CONFIG_CMA_DEBUGFS is not set\n# CONFIG_CMA_SYSFS is not set\nCONFIG_CMA_AREAS=7\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y\nCONFIG_VM_EVENT_COUNTERS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\nCONFIG_KMAP_LOCAL=y\nCONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_USERFAULTFD is not set\n# CONFIG_LRU_GEN is not set\nCONFIG_LOCK_MM_AND_FIND_VMA=y\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_NET_INGRESS=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_INTERFACE is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_XFRM_AH=m\nCONFIG_XFRM_ESP=y\nCONFIG_XFRM_IPCOMP=m\n# CONFIG_NET_KEY is not set\n# CONFIG_XDP_SOCKETS is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\nCONFIG_IP_PNP_RARP=y\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=y\n# CONFIG_IP_MROUTE is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=y\n# CONFIG_INET_ESP_OFFLOAD is not set\n# CONFIG_INET_ESPINTCP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=y\nCONFIG_INET_DIAG=y\nCONFIG_INET_TCP_DIAG=y\n# CONFIG_INET_UDP_DIAG is not set\n# CONFIG_INET_RAW_DIAG is not set\n# CONFIG_INET_DIAG_DESTROY is not set\n# CONFIG_TCP_CONG_ADVANCED is not set\nCONFIG_TCP_CONG_CUBIC=y\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\nCONFIG_IPV6_ROUTER_PREF=y\n# CONFIG_IPV6_ROUTE_INFO is not set\nCONFIG_IPV6_OPTIMISTIC_DAD=y\nCONFIG_INET6_AH=m\nCONFIG_INET6_ESP=m\n# CONFIG_INET6_ESP_OFFLOAD is not set\n# CONFIG_INET6_ESPINTCP is not set\nCONFIG_INET6_IPCOMP=m\nCONFIG_IPV6_MIP6=m\n# CONFIG_IPV6_ILA is not set\nCONFIG_INET6_XFRM_TUNNEL=m\nCONFIG_INET6_TUNNEL=m\n# CONFIG_IPV6_VTI is not set\nCONFIG_IPV6_SIT=y\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\nCONFIG_IPV6_TUNNEL=m\nCONFIG_IPV6_FOU=m\nCONFIG_IPV6_MULTIPLE_TABLES=y\n# CONFIG_IPV6_SUBTREES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_MPTCP is not set\n# CONFIG_NETWORK_SECMARK is not set\nCONFIG_NET_PTP_CLASSIFY=y\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\nCONFIG_NETFILTER_EGRESS=y\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\n# CONFIG_NETFILTER_NETLINK_LOG is not set\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\n# CONFIG_NF_LOG_SYSLOG is not set\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_ZONES is not set\n# CONFIG_NF_CONNTRACK_PROCFS is not set\n# CONFIG_NF_CONNTRACK_EVENTS is not set\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\nCONFIG_NF_CT_PROTO_DCCP=y\nCONFIG_NF_CT_PROTO_SCTP=y\nCONFIG_NF_CT_PROTO_UDPLITE=y\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\n# CONFIG_NF_CONNTRACK_IRC is not set\n# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\n# CONFIG_NF_CONNTRACK_SIP is not set\nCONFIG_NF_CONNTRACK_TFTP=m\n# CONFIG_NF_CT_NETLINK is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=y\nCONFIG_NF_NAT_MASQUERADE=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\n# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\n# CONFIG_NETFILTER_XT_MATCH_OWNER is not set\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\n# CONFIG_NETFILTER_XT_MATCH_STATE is not set\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\nCONFIG_IP_VS=m\n# CONFIG_IP_VS_IPV6 is not set\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_MH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n# CONFIG_IP_VS_TWOS is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS MH scheduler\n#\nCONFIG_IP_VS_MH_TAB_INDEX=12\n\n#\n# IPVS application helper\n#\n# CONFIG_IP_VS_FTP is not set\nCONFIG_IP_VS_NFCT=y\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\n# CONFIG_NF_LOG_IPV6 is not set\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_MATCH_SRH is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\nCONFIG_NET_DSA=m\n# CONFIG_NET_DSA_TAG_AR9331 is not set\nCONFIG_NET_DSA_TAG_BRCM_COMMON=m\nCONFIG_NET_DSA_TAG_BRCM=m\nCONFIG_NET_DSA_TAG_BRCM_LEGACY=m\nCONFIG_NET_DSA_TAG_BRCM_PREPEND=m\n# CONFIG_NET_DSA_TAG_HELLCREEK is not set\n# CONFIG_NET_DSA_TAG_GSWIP is not set\n# CONFIG_NET_DSA_TAG_DSA is not set\n# CONFIG_NET_DSA_TAG_EDSA is not set\n# CONFIG_NET_DSA_TAG_MTK is not set\n# CONFIG_NET_DSA_TAG_KSZ is not set\n# CONFIG_NET_DSA_TAG_OCELOT is not set\n# CONFIG_NET_DSA_TAG_OCELOT_8021Q is not set\n# CONFIG_NET_DSA_TAG_QCA is not set\n# CONFIG_NET_DSA_TAG_RTL4_A is not set\n# CONFIG_NET_DSA_TAG_RTL8_4 is not set\n# CONFIG_NET_DSA_TAG_RZN1_A5PSW is not set\n# CONFIG_NET_DSA_TAG_LAN9303 is not set\n# CONFIG_NET_DSA_TAG_SJA1105 is not set\n# CONFIG_NET_DSA_TAG_TRAILER is not set\n# CONFIG_NET_DSA_TAG_XRS700X is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\n# CONFIG_NET_SCH_FQ_CODEL is not set\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_FLOW is not set\nCONFIG_NET_CLS_CGROUP=m\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\nCONFIG_NET_SWITCHDEV=y\nCONFIG_NET_L3_MASTER_DEV=y\n# CONFIG_QRTR is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_PCPU_DEV_REFCNT=y\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_SOCK_RX_QUEUE_MAPPING=y\nCONFIG_XPS=y\nCONFIG_CGROUP_NET_PRIO=y\nCONFIG_CGROUP_NET_CLASSID=y\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\n# CONFIG_BT_RFCOMM is not set\n# CONFIG_BT_BNEP is not set\n# CONFIG_BT_HIDP is not set\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_LEDS is not set\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\nCONFIG_BT_DEBUGFS=y\n# CONFIG_BT_SELFTEST is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_QCA=m\nCONFIG_BT_MTK=m\nCONFIG_BT_HCIBTUSB=m\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\n# CONFIG_BT_HCIBTUSB_MTK is not set\nCONFIG_BT_HCIBTUSB_RTL=y\nCONFIG_BT_HCIBTSDIO=m\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_SERDEV=y\nCONFIG_BT_HCIUART_H4=y\n# CONFIG_BT_HCIUART_NOKIA is not set\n# CONFIG_BT_HCIUART_BCSP is not set\n# CONFIG_BT_HCIUART_ATH3K is not set\n# CONFIG_BT_HCIUART_LL is not set\nCONFIG_BT_HCIUART_3WIRE=y\n# CONFIG_BT_HCIUART_INTEL is not set\nCONFIG_BT_HCIUART_BCM=y\nCONFIG_BT_HCIUART_RTL=y\nCONFIG_BT_HCIUART_QCA=y\nCONFIG_BT_HCIUART_AG6XX=y\nCONFIG_BT_HCIUART_MRVL=y\nCONFIG_BT_HCIBCM203X=m\nCONFIG_BT_HCIBPA10X=m\nCONFIG_BT_HCIBFUSB=m\nCONFIG_BT_HCIVHCI=m\nCONFIG_BT_MRVL=m\nCONFIG_BT_MRVL_SDIO=m\nCONFIG_BT_ATH3K=m\n# CONFIG_BT_MTKSDIO is not set\nCONFIG_BT_MTKUART=m\nCONFIG_BT_HCIRSI=m\n# CONFIG_BT_VIRTIO is not set\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_SPY=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=m\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\nCONFIG_CFG80211_CRDA_SUPPORT=y\nCONFIG_CFG80211_WEXT=y\nCONFIG_LIB80211=m\nCONFIG_LIB80211_CRYPT_WEP=m\nCONFIG_LIB80211_CRYPT_CCMP=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=m\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=m\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\nCONFIG_RFKILL_GPIO=m\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_NET_DEVLINK=y\nCONFIG_PAGE_POOL=y\n# CONFIG_PAGE_POOL_STATS is not set\nCONFIG_FAILOVER=y\nCONFIG_ETHTOOL_NETLINK=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\nCONFIG_HAVE_PCI=y\n# CONFIG_PCI is not set\n# CONFIG_PCCARD is not set\n\n#\n# Generic Driver Options\n#\n# CONFIG_UEVENT_HELPER is not set\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\n# CONFIG_DEVTMPFS_SAFE is not set\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\nCONFIG_FW_CACHE=y\n# CONFIG_FW_UPLOAD is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\nCONFIG_ALLOW_DEV_COREDUMP=y\nCONFIG_DEV_COREDUMP=y\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_MOXTET is not set\n# CONFIG_VEXPRESS_CONFIG is not set\n# CONFIG_MHI_BUS is not set\n# CONFIG_MHI_BUS_EP is not set\n# end of Bus devices\n\n# CONFIG_CONNECTOR is not set\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\nCONFIG_ARM_SCMI_PROTOCOL=y\nCONFIG_ARM_SCMI_HAVE_TRANSPORT=y\nCONFIG_ARM_SCMI_HAVE_SHMEM=y\nCONFIG_ARM_SCMI_TRANSPORT_MAILBOX=y\n# CONFIG_ARM_SCMI_TRANSPORT_VIRTIO is not set\nCONFIG_ARM_SCMI_POWER_DOMAIN=m\n# CONFIG_ARM_SCMI_POWER_CONTROL is not set\n# end of ARM System Control and Management Interface Protocol\n\nCONFIG_ARM_SCPI_PROTOCOL=m\nCONFIG_ARM_SCPI_POWER_DOMAIN=m\n# CONFIG_FW_CFG_SYSFS is not set\n# CONFIG_TRUSTED_FOUNDATIONS is not set\n# CONFIG_GOOGLE_FIRMWARE is not set\nCONFIG_HAVE_ARM_SMCCC=y\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n\n#\n# Partition parsers\n#\n# CONFIG_MTD_AR7_PARTS is not set\nCONFIG_MTD_CMDLINE_PARTS=y\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AFS_PARTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\n# end of Partition parsers\n\n#\n# User Modules And Translation Layers\n#\nCONFIG_MTD_BLKDEVS=y\nCONFIG_MTD_BLOCK=y\n\n#\n# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK.\n#\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\n# CONFIG_MTD_OOPS is not set\n# CONFIG_MTD_SWAP is not set\n# CONFIG_MTD_PARTITIONED_MASTER is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\n# CONFIG_MTD_CFI is not set\n# CONFIG_MTD_JEDECPROBE is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n# end of RAM/ROM/Flash chip drivers\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_PLATRAM is not set\n# end of Mapping drivers for chip access\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_DATAFLASH is not set\n# CONFIG_MTD_MCHP23K256 is not set\n# CONFIG_MTD_MCHP48L640 is not set\n# CONFIG_MTD_SST25L is not set\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\n# end of Self-contained MTD device drivers\n\n#\n# NAND\n#\n# CONFIG_MTD_ONENAND is not set\n# CONFIG_MTD_RAW_NAND is not set\n# CONFIG_MTD_SPI_NAND is not set\n\n#\n# ECC engine support\n#\n# CONFIG_MTD_NAND_ECC_SW_HAMMING is not set\n# CONFIG_MTD_NAND_ECC_SW_BCH is not set\n# CONFIG_MTD_NAND_ECC_MXIC is not set\n# end of ECC engine support\n# end of NAND\n\n#\n# LPDDR & LPDDR2 PCM memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\n# CONFIG_MTD_LPDDR2_NVM is not set\n# end of LPDDR & LPDDR2 PCM memory drivers\n\nCONFIG_MTD_SPI_NOR=y\nCONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y\n# CONFIG_MTD_SPI_NOR_SWP_DISABLE is not set\nCONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y\n# CONFIG_MTD_SPI_NOR_SWP_KEEP is not set\nCONFIG_MTD_UBI=y\nCONFIG_MTD_UBI_WL_THRESHOLD=4096\nCONFIG_MTD_UBI_BEB_LIMIT=20\n# CONFIG_MTD_UBI_FASTMAP is not set\n# CONFIG_MTD_UBI_GLUEBI is not set\n# CONFIG_MTD_UBI_BLOCK is not set\n# CONFIG_MTD_HYPERBUS is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_DYNAMIC=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\nCONFIG_OF_RESOLVE=y\nCONFIG_OF_OVERLAY=y\nCONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_CDROM=y\n# CONFIG_ZRAM is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=8\n# CONFIG_BLK_DEV_DRBD is not set\n# CONFIG_BLK_DEV_NBD is not set\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=16\nCONFIG_BLK_DEV_RAM_SIZE=65536\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\nCONFIG_VIRTIO_BLK=y\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_UBLK is not set\n\n#\n# NVME Support\n#\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TCP is not set\n# CONFIG_NVME_TARGET is not set\n# end of NVME Support\n\n#\n# Misc devices\n#\nCONFIG_AD525X_DPOT=y\nCONFIG_AD525X_DPOT_I2C=y\n# CONFIG_AD525X_DPOT_SPI is not set\n# CONFIG_DUMMY_IRQ is not set\nCONFIG_ICS932S401=y\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_HI6421V600_IRQ is not set\nCONFIG_APDS9802ALS=y\nCONFIG_ISL29003=y\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\n# CONFIG_SRAM is not set\n# CONFIG_XILINX_SDFEC is not set\n# CONFIG_HISI_HIKEY_USB is not set\n# CONFIG_OPEN_DICE is not set\n# CONFIG_VCPU_STALL_DETECTOR is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\nCONFIG_EEPROM_AT24=y\n# CONFIG_EEPROM_AT25 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=y\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_EEPROM_EE1004 is not set\n# end of EEPROM support\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n# CONFIG_ECHO is not set\n# CONFIG_MISC_RTSX_USB is not set\n# CONFIG_UACCE is not set\n# CONFIG_PVPANIC is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\nCONFIG_SCSI_PROC_FS=y\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_CHR_DEV_SG=m\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\n# CONFIG_SCSI_SCAN_ASYNC is not set\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_VIRTIO is not set\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\n# CONFIG_ATA is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\n# CONFIG_DM_DEBUG is not set\nCONFIG_DM_BUFIO=m\n# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\n# CONFIG_DM_UNSTRIPED is not set\n# CONFIG_DM_CRYPT is not set\n# CONFIG_DM_SNAPSHOT is not set\nCONFIG_DM_THIN_PROVISIONING=m\n# CONFIG_DM_CACHE is not set\n# CONFIG_DM_WRITECACHE is not set\n# CONFIG_DM_ERA is not set\n# CONFIG_DM_CLONE is not set\n# CONFIG_DM_MIRROR is not set\n# CONFIG_DM_RAID is not set\n# CONFIG_DM_ZERO is not set\n# CONFIG_DM_MULTIPATH is not set\n# CONFIG_DM_DELAY is not set\n# CONFIG_DM_DUST is not set\n# CONFIG_DM_UEVENT is not set\n# CONFIG_DM_FLAKEY is not set\n# CONFIG_DM_VERITY is not set\n# CONFIG_DM_SWITCH is not set\n# CONFIG_DM_LOG_WRITES is not set\n# CONFIG_DM_INTEGRITY is not set\n# CONFIG_TARGET_CORE is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\nCONFIG_DUMMY=m\nCONFIG_WIREGUARD=m\n# CONFIG_WIREGUARD_DEBUG is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\nCONFIG_MACVTAP=m\nCONFIG_IPVLAN_L3S=y\nCONFIG_IPVLAN=m\n# CONFIG_IPVTAP is not set\nCONFIG_VXLAN=m\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_AMT is not set\n# CONFIG_MACSEC is not set\n# CONFIG_NETCONSOLE is not set\nCONFIG_TUN=m\nCONFIG_TAP=m\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\nCONFIG_VIRTIO_NET=y\nCONFIG_NLMON=m\n# CONFIG_NET_VRF is not set\n\n#\n# Distributed Switch Architecture drivers\n#\nCONFIG_B53=m\nCONFIG_B53_SPI_DRIVER=m\nCONFIG_B53_MDIO_DRIVER=m\nCONFIG_B53_MMAP_DRIVER=m\nCONFIG_B53_SRAB_DRIVER=m\n# CONFIG_B53_SERDES is not set\nCONFIG_NET_DSA_BCM_SF2=m\n# CONFIG_NET_DSA_LOOP is not set\n# CONFIG_NET_DSA_LANTIQ_GSWIP is not set\n# CONFIG_NET_DSA_MT7530 is not set\n# CONFIG_NET_DSA_MV88E6060 is not set\n# CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON is not set\n# CONFIG_NET_DSA_MV88E6XXX is not set\n# CONFIG_NET_DSA_AR9331 is not set\n# CONFIG_NET_DSA_QCA8K is not set\n# CONFIG_NET_DSA_SJA1105 is not set\n# CONFIG_NET_DSA_XRS700X_I2C is not set\n# CONFIG_NET_DSA_XRS700X_MDIO is not set\n# CONFIG_NET_DSA_REALTEK is not set\n# CONFIG_NET_DSA_SMSC_LAN9303_I2C is not set\n# CONFIG_NET_DSA_SMSC_LAN9303_MDIO is not set\n# CONFIG_NET_DSA_VITESSE_VSC73XX_SPI is not set\n# CONFIG_NET_DSA_VITESSE_VSC73XX_PLATFORM is not set\n# end of Distributed Switch Architecture drivers\n\nCONFIG_ETHERNET=y\n# CONFIG_NET_VENDOR_ALACRITECH is not set\n# CONFIG_ALTERA_TSE is not set\n# CONFIG_NET_VENDOR_AMAZON is not set\n# CONFIG_NET_VENDOR_AQUANTIA is not set\n# CONFIG_NET_VENDOR_ARC is not set\n# CONFIG_NET_VENDOR_ASIX is not set\n# CONFIG_NET_VENDOR_BROADCOM is not set\n# CONFIG_NET_VENDOR_CADENCE is not set\n# CONFIG_NET_VENDOR_CAVIUM is not set\n# CONFIG_NET_VENDOR_CIRRUS is not set\n# CONFIG_NET_VENDOR_CORTINA is not set\n# CONFIG_NET_VENDOR_DAVICOM is not set\n# CONFIG_DNET is not set\n# CONFIG_NET_VENDOR_ENGLEDER is not set\n# CONFIG_NET_VENDOR_EZCHIP is not set\n# CONFIG_NET_VENDOR_FARADAY is not set\n# CONFIG_NET_VENDOR_FUNGIBLE is not set\nCONFIG_NET_VENDOR_GOOGLE=y\n# CONFIG_NET_VENDOR_HISILICON is not set\n# CONFIG_NET_VENDOR_HUAWEI is not set\n# CONFIG_NET_VENDOR_INTEL is not set\n# CONFIG_NET_VENDOR_WANGXUN is not set\n# CONFIG_NET_VENDOR_ADI is not set\n# CONFIG_NET_VENDOR_LITEX is not set\n# CONFIG_NET_VENDOR_MARVELL is not set\n# CONFIG_NET_VENDOR_MELLANOX is not set\n# CONFIG_NET_VENDOR_MICREL is not set\n# CONFIG_NET_VENDOR_MICROCHIP is not set\n# CONFIG_NET_VENDOR_MICROSEMI is not set\n# CONFIG_NET_VENDOR_MICROSOFT is not set\n# CONFIG_NET_VENDOR_NI is not set\n# CONFIG_NET_VENDOR_NATSEMI is not set\n# CONFIG_NET_VENDOR_NETRONOME is not set\n# CONFIG_ETHOC is not set\n# CONFIG_NET_VENDOR_PENSANDO is not set\n# CONFIG_NET_VENDOR_QUALCOMM is not set\n# CONFIG_NET_VENDOR_RENESAS is not set\n# CONFIG_NET_VENDOR_ROCKER is not set\n# CONFIG_NET_VENDOR_SAMSUNG is not set\n# CONFIG_NET_VENDOR_SEEQ is not set\n# CONFIG_NET_VENDOR_SOLARFLARE is not set\n# CONFIG_NET_VENDOR_SMSC is not set\n# CONFIG_NET_VENDOR_SOCIONEXT is not set\nCONFIG_NET_VENDOR_STMICRO=y\nCONFIG_STMMAC_ETH=y\n# CONFIG_STMMAC_SELFTESTS is not set\nCONFIG_STMMAC_PLATFORM=y\nCONFIG_DWMAC_DWC_QOS_ETH=y\nCONFIG_DWMAC_GENERIC=y\nCONFIG_DWMAC_ROCKCHIP=y\n# CONFIG_DWMAC_INTEL_PLAT is not set\n# CONFIG_NET_VENDOR_SYNOPSYS is not set\n# CONFIG_NET_VENDOR_VERTEXCOM is not set\n# CONFIG_NET_VENDOR_VIA is not set\n# CONFIG_NET_VENDOR_WIZNET is not set\n# CONFIG_NET_VENDOR_XILINX is not set\nCONFIG_PHYLINK=y\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_ADIN_PHY is not set\n# CONFIG_ADIN1100_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=m\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM54140_PHY is not set\nCONFIG_BCM7XXX_PHY=m\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\nCONFIG_BCM_NET_PHYLIB=m\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MARVELL_88X2222_PHY is not set\n# CONFIG_MAXLINEAR_GPHY is not set\n# CONFIG_MEDIATEK_GE_PHY is not set\n# CONFIG_MICREL_PHY is not set\nCONFIG_MICROCHIP_PHY=m\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_MOTORCOMM_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_NXP_TJA11XX_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_QSEMI_PHY is not set\nCONFIG_REALTEK_PHY=y\n# CONFIG_RENESAS_PHY is not set\nCONFIG_ROCKCHIP_PHY=y\nCONFIG_SMSC_PHY=m\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_DP83TD510_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\n# CONFIG_PSE_CONTROLLER is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_OF_MDIO=y\nCONFIG_MDIO_DEVRES=y\n# CONFIG_MDIO_BITBANG is not set\nCONFIG_MDIO_BCM_UNIMAC=m\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_IPQ4019 is not set\n# CONFIG_MDIO_IPQ8064 is not set\n\n#\n# MDIO Multiplexers\n#\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n\n#\n# PCS device drivers\n#\nCONFIG_PCS_XPCS=y\n# end of PCS device drivers\n\n# CONFIG_PPP is not set\n# CONFIG_SLIP is not set\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\nCONFIG_USB_PEGASUS=m\nCONFIG_USB_RTL8150=m\nCONFIG_USB_RTL8152=m\nCONFIG_USB_LAN78XX=m\nCONFIG_USB_USBNET=m\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\n# CONFIG_USB_NET_CDC_EEM is not set\nCONFIG_USB_NET_CDC_NCM=m\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\nCONFIG_USB_NET_DM9601=m\n# CONFIG_USB_NET_SR9700 is not set\nCONFIG_USB_NET_SR9800=m\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=m\n# CONFIG_USB_NET_GL620A is not set\nCONFIG_USB_NET_NET1080=m\nCONFIG_USB_NET_PLUSB=m\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\nCONFIG_USB_NET_CDC_SUBSET_ENABLE=m\nCONFIG_USB_NET_CDC_SUBSET=m\n# CONFIG_USB_ALI_M5632 is not set\n# CONFIG_USB_AN2720 is not set\nCONFIG_USB_BELKIN=y\nCONFIG_USB_ARMLINUX=y\n# CONFIG_USB_EPSON2888 is not set\n# CONFIG_USB_KC2190 is not set\nCONFIG_USB_NET_ZAURUS=m\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\n# CONFIG_USB_HSO is not set\n# CONFIG_USB_NET_INT51X1 is not set\n# CONFIG_USB_IPHETH is not set\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\n# CONFIG_USB_NET_AQC111 is not set\nCONFIG_USB_RTL8153_ECM=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\nCONFIG_ATH9K=m\n# CONFIG_ATH9K_AHB is not set\n# CONFIG_ATH9K_DEBUGFS is not set\n# CONFIG_ATH9K_DYNACK is not set\n# CONFIG_ATH9K_WOW is not set\nCONFIG_ATH9K_RFKILL=y\nCONFIG_ATH9K_CHANNEL_CONTEXT=y\nCONFIG_ATH9K_PCOEM=y\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\nCONFIG_ATH9K_HWRNG=y\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\nCONFIG_CARL9170_HWRNG=y\nCONFIG_ATH6KL=m\n# CONFIG_ATH6KL_SDIO is not set\nCONFIG_ATH6KL_USB=m\n# CONFIG_ATH6KL_DEBUG is not set\n# CONFIG_ATH6KL_TRACING is not set\nCONFIG_AR5523=m\nCONFIG_ATH10K=m\nCONFIG_ATH10K_CE=y\n# CONFIG_ATH10K_SDIO is not set\nCONFIG_ATH10K_USB=m\n# CONFIG_ATH10K_DEBUG is not set\n# CONFIG_ATH10K_DEBUGFS is not set\n# CONFIG_ATH10K_TRACING is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\nCONFIG_AT76C50X_USB=m\nCONFIG_WLAN_VENDOR_BROADCOM=y\nCONFIG_B43=m\nCONFIG_B43_BCMA=y\nCONFIG_B43_SSB=y\nCONFIG_B43_BUSES_BCMA_AND_SSB=y\n# CONFIG_B43_BUSES_BCMA is not set\n# CONFIG_B43_BUSES_SSB is not set\n# CONFIG_B43_SDIO is not set\nCONFIG_B43_BCMA_PIO=y\nCONFIG_B43_PIO=y\nCONFIG_B43_PHY_G=y\nCONFIG_B43_PHY_N=y\nCONFIG_B43_PHY_LP=y\nCONFIG_B43_PHY_HT=y\nCONFIG_B43_LEDS=y\nCONFIG_B43_HWRNG=y\n# CONFIG_B43_DEBUG is not set\n# CONFIG_B43LEGACY is not set\nCONFIG_BRCMUTIL=m\n# CONFIG_BRCMSMAC is not set\nCONFIG_BRCMFMAC=m\nCONFIG_BRCMFMAC_PROTO_BCDC=y\nCONFIG_BRCMFMAC_SDIO=y\nCONFIG_BRCMFMAC_USB=y\n# CONFIG_BRCM_TRACING is not set\n# CONFIG_BRCMDBG is not set\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\nCONFIG_WLAN_VENDOR_INTERSIL=y\n# CONFIG_HOSTAP is not set\nCONFIG_P54_COMMON=m\nCONFIG_P54_USB=m\n# CONFIG_P54_SPI is not set\nCONFIG_P54_LEDS=y\nCONFIG_WLAN_VENDOR_MARVELL=y\nCONFIG_LIBERTAS=m\nCONFIG_LIBERTAS_USB=m\n# CONFIG_LIBERTAS_SDIO is not set\n# CONFIG_LIBERTAS_SPI is not set\n# CONFIG_LIBERTAS_DEBUG is not set\n# CONFIG_LIBERTAS_MESH is not set\nCONFIG_LIBERTAS_THINFIRM=m\n# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set\nCONFIG_LIBERTAS_THINFIRM_USB=m\nCONFIG_MWIFIEX=m\n# CONFIG_MWIFIEX_SDIO is not set\nCONFIG_MWIFIEX_USB=m\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_MT76_CORE=m\nCONFIG_MT76_LEDS=y\nCONFIG_MT76_USB=m\nCONFIG_MT76_SDIO=m\nCONFIG_MT76x02_LIB=m\nCONFIG_MT76x02_USB=m\nCONFIG_MT76_CONNAC_LIB=m\nCONFIG_MT76x0_COMMON=m\nCONFIG_MT76x0U=m\nCONFIG_MT76x2_COMMON=m\nCONFIG_MT76x2U=m\nCONFIG_MT7615_COMMON=m\nCONFIG_MT7663_USB_SDIO_COMMON=m\nCONFIG_MT7663U=m\nCONFIG_MT7663S=m\n# CONFIG_MT7921S is not set\n# CONFIG_MT7921U is not set\nCONFIG_WLAN_VENDOR_MICROCHIP=y\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\n# CONFIG_WLAN_VENDOR_PURELIFI is not set\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=m\n# CONFIG_RTL8192CU is not set\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\nCONFIG_RTW88=m\nCONFIG_RTW88_CORE=m\nCONFIG_RTW88_USB=m\nCONFIG_RTW88_8822B=m\nCONFIG_RTW88_8822C=m\nCONFIG_RTW88_8723D=m\nCONFIG_RTW88_8821C=m\n# CONFIG_RTW88_8822BS is not set\nCONFIG_RTW88_8822BU=m\n# CONFIG_RTW88_8822CS is not set\nCONFIG_RTW88_8822CU=m\nCONFIG_RTW88_8723DU=m\n# CONFIG_RTW88_8821CS is not set\nCONFIG_RTW88_8821CU=m\n# CONFIG_RTW88_DEBUG is not set\n# CONFIG_RTW88_DEBUGFS is not set\n# CONFIG_RTW89 is not set\nCONFIG_WLAN_VENDOR_RSI=y\nCONFIG_RSI_91X=m\n# CONFIG_RSI_DEBUGFS is not set\n# CONFIG_RSI_SDIO is not set\nCONFIG_RSI_USB=m\nCONFIG_RSI_COEX=y\n# CONFIG_WLAN_VENDOR_SILABS is not set\nCONFIG_WLAN_VENDOR_ST=y\n# CONFIG_CW1200 is not set\nCONFIG_WLAN_VENDOR_TI=y\n# CONFIG_WL1251 is not set\nCONFIG_WL12XX=m\nCONFIG_WL18XX=m\nCONFIG_WLCORE=m\n# CONFIG_WLCORE_SPI is not set\n# CONFIG_WLCORE_SDIO is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\nCONFIG_USB_ZD1201=m\nCONFIG_ZD1211RW=m\n# CONFIG_ZD1211RW_DEBUG is not set\nCONFIG_WLAN_VENDOR_QUANTENNA=y\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\n# CONFIG_NETDEVSIM is not set\nCONFIG_NET_FAILOVER=y\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\nCONFIG_INPUT_MATRIXKMAP=m\n\n#\n# Userland interfaces\n#\n# CONFIG_INPUT_MOUSEDEV is not set\nCONFIG_INPUT_JOYDEV=y\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADC is not set\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\n# CONFIG_KEYBOARD_ATKBD is not set\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=y\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_PINEPHONE is not set\n# CONFIG_KEYBOARD_PMIC8XXX is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_STMPE is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CROS_EC is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\n# CONFIG_KEYBOARD_CYPRESS_SF is not set\n# CONFIG_INPUT_MOUSE is not set\nCONFIG_INPUT_JOYSTICK=y\n# CONFIG_JOYSTICK_ANALOG is not set\n# CONFIG_JOYSTICK_A3D is not set\n# CONFIG_JOYSTICK_ADC is not set\n# CONFIG_JOYSTICK_ADI is not set\n# CONFIG_JOYSTICK_COBRA is not set\nCONFIG_JOYSTICK_GF2K=m\n# CONFIG_JOYSTICK_GRIP is not set\n# CONFIG_JOYSTICK_GRIP_MP is not set\n# CONFIG_JOYSTICK_GUILLEMOT is not set\n# CONFIG_JOYSTICK_INTERACT is not set\n# CONFIG_JOYSTICK_SIDEWINDER is not set\n# CONFIG_JOYSTICK_TMDC is not set\nCONFIG_JOYSTICK_IFORCE=m\nCONFIG_JOYSTICK_IFORCE_USB=m\n# CONFIG_JOYSTICK_IFORCE_232 is not set\n# CONFIG_JOYSTICK_WARRIOR is not set\n# CONFIG_JOYSTICK_MAGELLAN is not set\n# CONFIG_JOYSTICK_SPACEORB is not set\n# CONFIG_JOYSTICK_SPACEBALL is not set\n# CONFIG_JOYSTICK_STINGER is not set\n# CONFIG_JOYSTICK_TWIDJOY is not set\n# CONFIG_JOYSTICK_ZHENHUA is not set\n# CONFIG_JOYSTICK_AS5011 is not set\n# CONFIG_JOYSTICK_JOYDUMP is not set\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\n# CONFIG_JOYSTICK_PSXPAD_SPI is not set\n# CONFIG_JOYSTICK_PXRC is not set\n# CONFIG_JOYSTICK_QWIIC is not set\n# CONFIG_JOYSTICK_FSIA6B is not set\n# CONFIG_JOYSTICK_SENSEHAT is not set\n# CONFIG_INPUT_TABLET is not set\n# CONFIG_INPUT_TOUCHSCREEN is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_PM8XXX_VIBRATOR is not set\n# CONFIG_INPUT_PMIC8XXX_PWRKEY is not set\nCONFIG_INPUT_MAX77693_HAPTIC=m\nCONFIG_INPUT_MAX8997_HAPTIC=m\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\nCONFIG_INPUT_CPCAP_PWRBUTTON=m\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\n# CONFIG_INPUT_TPS65218_PWRBUTTON is not set\nCONFIG_INPUT_AXP20X_PEK=m\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PALMAS_PWRBUTTON is not set\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\nCONFIG_INPUT_RK805_PWRKEY=y\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_DA9063_ONKEY is not set\nCONFIG_INPUT_ADXL34X=m\nCONFIG_INPUT_ADXL34X_I2C=m\nCONFIG_INPUT_ADXL34X_SPI=m\n# CONFIG_INPUT_IBM_PANEL is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_IQS7222 is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\n# CONFIG_RMI4_CORE is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_SERIO_SERPORT=y\nCONFIG_SERIO_AMBAKMI=y\nCONFIG_SERIO_LIBPS2=y\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_SERIO_GPIO_PS2 is not set\n# CONFIG_USERIO is not set\nCONFIG_GAMEPORT=m\n# CONFIG_GAMEPORT_NS558 is not set\n# CONFIG_GAMEPORT_L4 is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\nCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y\n# CONFIG_SERIAL_8250_16550A_VARIANTS is not set\n# CONFIG_SERIAL_8250_FINTEK is not set\nCONFIG_SERIAL_8250_CONSOLE=y\nCONFIG_SERIAL_8250_DMA=y\nCONFIG_SERIAL_8250_NR_UARTS=5\nCONFIG_SERIAL_8250_RUNTIME_UARTS=5\nCONFIG_SERIAL_8250_EXTENDED=y\nCONFIG_SERIAL_8250_MANY_PORTS=y\nCONFIG_SERIAL_8250_SHARE_IRQ=y\n# CONFIG_SERIAL_8250_DETECT_IRQ is not set\n# CONFIG_SERIAL_8250_RSA is not set\nCONFIG_SERIAL_8250_DWLIB=y\nCONFIG_SERIAL_8250_FSL=y\nCONFIG_SERIAL_8250_DW=y\n# CONFIG_SERIAL_8250_RT288X is not set\nCONFIG_SERIAL_OF_PLATFORM=y\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\n# CONFIG_SERIAL_AMBA_PL011 is not set\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_SIFIVE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\nCONFIG_SERIAL_XILINX_PS_UART=y\nCONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\nCONFIG_SERIAL_ST_ASC=m\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\nCONFIG_SERIAL_MCTRL_GPIO=y\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NULL_TTY is not set\nCONFIG_HVC_DRIVER=y\n# CONFIG_HVC_DCC is not set\n# CONFIG_RPMSG_TTY is not set\nCONFIG_SERIAL_DEV_BUS=y\nCONFIG_SERIAL_DEV_CTRL_TTYPORT=y\nCONFIG_VIRTIO_CONSOLE=y\n# CONFIG_IPMI_HANDLER is not set\n# CONFIG_IPMB_DEVICE_INTERFACE is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_BA431 is not set\n# CONFIG_HW_RANDOM_VIRTIO is not set\nCONFIG_HW_RANDOM_OPTEE=m\n# CONFIG_HW_RANDOM_CCTRNG is not set\n# CONFIG_HW_RANDOM_XIPHERA is not set\nCONFIG_DEVMEM=y\n# CONFIG_TCG_TPM is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\nCONFIG_RANDOM_TRUST_CPU=y\n# CONFIG_RANDOM_TRUST_BOOTLOADER is not set\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\nCONFIG_I2C_ARB_GPIO_CHALLENGE=m\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\nCONFIG_I2C_MUX_PCA954x=y\nCONFIG_I2C_MUX_PINCTRL=y\n# CONFIG_I2C_MUX_REG is not set\nCONFIG_I2C_DEMUX_PINCTRL=y\n# CONFIG_I2C_MUX_MLXCPLD is not set\n# end of Multiplexer I2C Chip support\n\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CBUS_GPIO is not set\nCONFIG_I2C_DESIGNWARE_CORE=y\n# CONFIG_I2C_DESIGNWARE_SLAVE is not set\nCONFIG_I2C_DESIGNWARE_PLATFORM=y\nCONFIG_I2C_EMEV2=m\nCONFIG_I2C_GPIO=m\n# CONFIG_I2C_GPIO_FAULT_INJECTOR is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\nCONFIG_I2C_RK3X=y\n# CONFIG_I2C_SIMTEC is not set\nCONFIG_I2C_XILINX=y\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\nCONFIG_I2C_CROS_EC_TUNNEL=m\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\nCONFIG_I2C_SLAVE=y\nCONFIG_I2C_SLAVE_EEPROM=y\n# CONFIG_I2C_SLAVE_TESTUNIT is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\nCONFIG_SPI_MEM=y\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\nCONFIG_SPI_BITBANG=y\nCONFIG_SPI_CADENCE=y\n# CONFIG_SPI_CADENCE_QUADSPI is not set\n# CONFIG_SPI_CADENCE_XSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_NXP_FLEXSPI is not set\nCONFIG_SPI_GPIO=m\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_MICROCHIP_CORE is not set\n# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set\n# CONFIG_SPI_OC_TINY is not set\nCONFIG_SPI_PL022=y\nCONFIG_SPI_ROCKCHIP=m\n# CONFIG_SPI_ROCKCHIP_SFC is not set\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_SIFIVE is not set\n# CONFIG_SPI_MXIC is not set\n# CONFIG_SPI_XCOMM is not set\nCONFIG_SPI_XILINX=y\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_AMD is not set\n\n#\n# SPI Multiplexer support\n#\n# CONFIG_SPI_MUX is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=y\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\nCONFIG_SPI_DYNAMIC=y\nCONFIG_SPMI=y\n# CONFIG_SPMI_HISI3670 is not set\n# CONFIG_HSI is not set\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\n# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set\n# CONFIG_PTP_1588_CLOCK_IDTCM is not set\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\nCONFIG_PINCTRL_AS3722=y\n# CONFIG_PINCTRL_AXP209 is not set\n# CONFIG_PINCTRL_CY8C95X0 is not set\n# CONFIG_PINCTRL_MCP23S08 is not set\n# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set\n# CONFIG_PINCTRL_OCELOT is not set\nCONFIG_PINCTRL_PALMAS=y\n# CONFIG_PINCTRL_RK805 is not set\nCONFIG_PINCTRL_ROCKCHIP=y\n# CONFIG_PINCTRL_SINGLE is not set\n# CONFIG_PINCTRL_STMFX is not set\n# CONFIG_PINCTRL_SX150X is not set\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\nCONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_CDEV=y\nCONFIG_GPIO_CDEV_V1=y\nCONFIG_GPIO_GENERIC=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_CADENCE is not set\nCONFIG_GPIO_DWAPB=y\n# CONFIG_GPIO_FTGPIO010 is not set\n# CONFIG_GPIO_GENERIC_PLATFORM is not set\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_LOGICVC is not set\n# CONFIG_GPIO_MB86S7X is not set\n# CONFIG_GPIO_MPC8XXX is not set\n# CONFIG_GPIO_PL061 is not set\nCONFIG_GPIO_ROCKCHIP=y\n# CONFIG_GPIO_SIFIVE is not set\nCONFIG_GPIO_SYSCON=y\nCONFIG_GPIO_XILINX=y\n# CONFIG_GPIO_ZEVIO is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_GW_PLD is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\nCONFIG_GPIO_PCA953X=y\nCONFIG_GPIO_PCA953X_IRQ=y\n# CONFIG_GPIO_PCA9570 is not set\nCONFIG_GPIO_PCF857X=y\n# CONFIG_GPIO_TPIC2810 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\n# CONFIG_HTC_EGPIO is not set\nCONFIG_GPIO_PALMAS=y\n# CONFIG_GPIO_STMPE is not set\n# CONFIG_GPIO_TPS65218 is not set\nCONFIG_GPIO_TPS6586X=y\nCONFIG_GPIO_TPS65910=y\n# end of MFD GPIO expanders\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n# end of SPI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_VIRTIO is not set\n# CONFIG_GPIO_SIM is not set\n# end of Virtual GPIO drivers\n\n# CONFIG_W1 is not set\n# CONFIG_POWER_RESET is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\nCONFIG_POWER_SUPPLY_HWMON=y\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_IP5XXX_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_ACT8945A is not set\nCONFIG_BATTERY_CPCAP=y\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SAMSUNG_SDI is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_AXP20X_POWER is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\n# CONFIG_CHARGER_MAX14577 is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_MAX77693 is not set\n# CONFIG_CHARGER_MAX77976 is not set\n# CONFIG_CHARGER_MAX8997 is not set\n# CONFIG_CHARGER_MAX8998 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_RK817 is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_CHARGER_TPS65090 is not set\n# CONFIG_CHARGER_TPS65217 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_CROS_USBPD is not set\n# CONFIG_CHARGER_CROS_PCHG is not set\n# CONFIG_CHARGER_UCS1002 is not set\n# CONFIG_CHARGER_BD99954 is not set\n# CONFIG_BATTERY_UG3105 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM1177 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_AHT10 is not set\n# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set\n# CONFIG_SENSORS_AS370 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_AXI_FAN_CONTROL is not set\nCONFIG_SENSORS_ARM_SCMI=m\nCONFIG_SENSORS_ARM_SCPI=m\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_CORSAIR_CPRO is not set\n# CONFIG_SENSORS_CORSAIR_PSU is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\n# CONFIG_SENSORS_GPIO_FAN is not set\n# CONFIG_SENSORS_HIH6130 is not set\nCONFIG_SENSORS_IIO_HWMON=y\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2947_I2C is not set\n# CONFIG_SENSORS_LTC2947_SPI is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC2992 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX127 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX31730 is not set\n# CONFIG_SENSORS_MAX31760 is not set\n# CONFIG_SENSORS_MAX6620 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_TPS23861 is not set\n# CONFIG_SENSORS_MR75203 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\nCONFIG_SENSORS_LM90=y\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775_I2C is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_NZXT_KRAKEN2 is not set\n# CONFIG_SENSORS_NZXT_SMART2 is not set\n# CONFIG_SENSORS_OCC_P8_I2C is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\nCONFIG_SENSORS_PWM_FAN=m\n# CONFIG_SENSORS_SBTSI is not set\n# CONFIG_SENSORS_SBRMI is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHT4x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC2305 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\nCONFIG_SENSORS_INA2XX=m\n# CONFIG_SENSORS_INA238 is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_TMP464 is not set\n# CONFIG_SENSORS_TMP513 is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_NETLINK is not set\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\n# CONFIG_THERMAL_WRITABLE_TRIPS is not set\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\nCONFIG_CPU_THERMAL=y\nCONFIG_CPU_FREQ_THERMAL=y\nCONFIG_DEVFREQ_THERMAL=y\nCONFIG_THERMAL_EMULATION=y\n# CONFIG_THERMAL_MMIO is not set\nCONFIG_ROCKCHIP_THERMAL=y\n# CONFIG_TI_SOC_THERMAL is not set\n# CONFIG_GENERIC_ADC_THERMAL is not set\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\nCONFIG_WATCHDOG_OPEN_TIMEOUT=0\n# CONFIG_WATCHDOG_SYSFS is not set\n# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\nCONFIG_DA9063_WATCHDOG=m\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\n# CONFIG_FTWDT010_WATCHDOG is not set\nCONFIG_DW_WATCHDOG=y\nCONFIG_RN5T618_WATCHDOG=y\n# CONFIG_MAX63XX_WATCHDOG is not set\n# CONFIG_ARM_SMC_WATCHDOG is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\nCONFIG_SSB=m\nCONFIG_SSB_BLOCKIO=y\nCONFIG_SSB_SDIOHOST_POSSIBLE=y\n# CONFIG_SSB_SDIOHOST is not set\n# CONFIG_SSB_DRIVER_GPIO is not set\nCONFIG_BCMA_POSSIBLE=y\nCONFIG_BCMA=m\nCONFIG_BCMA_BLOCKIO=y\n# CONFIG_BCMA_HOST_SOC is not set\n# CONFIG_BCMA_DRIVER_GMAC_CMN is not set\n# CONFIG_BCMA_DRIVER_GPIO is not set\n# CONFIG_BCMA_DEBUG is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\nCONFIG_MFD_ACT8945A=y\nCONFIG_MFD_AS3711=y\nCONFIG_MFD_AS3722=y\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\nCONFIG_MFD_ATMEL_FLEXCOM=y\nCONFIG_MFD_ATMEL_HLCDC=m\nCONFIG_MFD_BCM590XX=y\n# CONFIG_MFD_BD9571MWV is not set\nCONFIG_MFD_AXP20X=y\nCONFIG_MFD_AXP20X_I2C=y\nCONFIG_MFD_CROS_EC_DEV=m\n# CONFIG_MFD_MADERA is not set\n# CONFIG_MFD_ASIC3 is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\nCONFIG_MFD_DA9063=m\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_GATEWORKS_GSC is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_MP2629 is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_MFD_HI6421_SPMI is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\nCONFIG_MFD_MAX14577=y\n# CONFIG_MFD_MAX77620 is not set\n# CONFIG_MFD_MAX77650 is not set\nCONFIG_MFD_MAX77686=y\nCONFIG_MFD_MAX77693=m\n# CONFIG_MFD_MAX77714 is not set\n# CONFIG_MFD_MAX77843 is not set\nCONFIG_MFD_MAX8907=y\n# CONFIG_MFD_MAX8925 is not set\nCONFIG_MFD_MAX8997=y\nCONFIG_MFD_MAX8998=y\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6370 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_MFD_OCELOT is not set\n# CONFIG_EZX_PCAP is not set\nCONFIG_MFD_CPCAP=y\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_NTXEC is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\nCONFIG_MFD_PM8XXX=y\n# CONFIG_MFD_SY7636A is not set\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RT5120 is not set\n# CONFIG_MFD_RC5T583 is not set\nCONFIG_MFD_RK808=y\nCONFIG_MFD_RN5T618=y\nCONFIG_MFD_SEC_CORE=y\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\nCONFIG_MFD_STMPE=y\n\n#\n# STMicroelectronics STMPE Interface Drivers\n#\nCONFIG_STMPE_I2C=y\n# CONFIG_STMPE_SPI is not set\n# end of STMicroelectronics STMPE Interface Drivers\n\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\nCONFIG_MFD_PALMAS=y\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\nCONFIG_MFD_TPS65090=y\nCONFIG_MFD_TPS65217=y\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\nCONFIG_MFD_TPS65218=y\nCONFIG_MFD_TPS6586X=y\nCONFIG_MFD_TPS65910=y\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\nCONFIG_MFD_WL1273_CORE=m\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_T7L66XB is not set\n# CONFIG_MFD_TC6387XB is not set\n# CONFIG_MFD_TC6393XB is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_LOCHNAGAR is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_MFD_ROHM_BD718XX is not set\n# CONFIG_MFD_ROHM_BD71828 is not set\n# CONFIG_MFD_ROHM_BD957XMUF is not set\n# CONFIG_MFD_STPMIC1 is not set\n# CONFIG_MFD_STMFX is not set\n# CONFIG_MFD_ATC260X_I2C is not set\n# CONFIG_MFD_KHADAS_MCU is not set\n# CONFIG_MFD_QCOM_PM8008 is not set\n# CONFIG_RAVE_SP_CORE is not set\n# CONFIG_MFD_INTEL_M10_BMC is not set\n# CONFIG_MFD_RSMU_I2C is not set\n# CONFIG_MFD_RSMU_SPI is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\nCONFIG_REGULATOR_ACT8865=y\nCONFIG_REGULATOR_ACT8945A=y\n# CONFIG_REGULATOR_AD5398 is not set\n# CONFIG_REGULATOR_ARM_SCMI is not set\nCONFIG_REGULATOR_AS3711=y\nCONFIG_REGULATOR_AS3722=y\nCONFIG_REGULATOR_AXP20X=y\nCONFIG_REGULATOR_BCM590XX=y\nCONFIG_REGULATOR_CPCAP=y\n# CONFIG_REGULATOR_CROS_EC is not set\n# CONFIG_REGULATOR_DA9063 is not set\n# CONFIG_REGULATOR_DA9121 is not set\nCONFIG_REGULATOR_DA9210=y\n# CONFIG_REGULATOR_DA9211 is not set\nCONFIG_REGULATOR_FAN53555=y\n# CONFIG_REGULATOR_FAN53880 is not set\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\nCONFIG_REGULATOR_LP872X=y\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\nCONFIG_REGULATOR_MAX14577=m\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\nCONFIG_REGULATOR_MAX8907=y\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\nCONFIG_REGULATOR_MAX8997=m\nCONFIG_REGULATOR_MAX8998=m\n# CONFIG_REGULATOR_MAX20086 is not set\nCONFIG_REGULATOR_MAX77686=y\nCONFIG_REGULATOR_MAX77693=m\nCONFIG_REGULATOR_MAX77802=m\n# CONFIG_REGULATOR_MAX77826 is not set\n# CONFIG_REGULATOR_MCP16502 is not set\n# CONFIG_REGULATOR_MP5416 is not set\n# CONFIG_REGULATOR_MP8859 is not set\n# CONFIG_REGULATOR_MP886X is not set\n# CONFIG_REGULATOR_MPQ7920 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_MT6315 is not set\nCONFIG_REGULATOR_PALMAS=y\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PF8X00 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\nCONFIG_REGULATOR_PWM=y\n# CONFIG_REGULATOR_QCOM_SPMI is not set\n# CONFIG_REGULATOR_QCOM_USB_VBUS is not set\n# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set\nCONFIG_REGULATOR_RK808=y\nCONFIG_REGULATOR_RN5T618=y\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT5190A is not set\n# CONFIG_REGULATOR_RT5759 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\n# CONFIG_REGULATOR_S2MPA01 is not set\nCONFIG_REGULATOR_S2MPS11=y\nCONFIG_REGULATOR_S5M8767=y\n# CONFIG_REGULATOR_SLG51000 is not set\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_SY8824X is not set\n# CONFIG_REGULATOR_SY8827N is not set\nCONFIG_REGULATOR_TPS51632=y\nCONFIG_REGULATOR_TPS62360=y\n# CONFIG_REGULATOR_TPS6286X is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\nCONFIG_REGULATOR_TPS65090=y\n# CONFIG_REGULATOR_TPS65132 is not set\nCONFIG_REGULATOR_TPS65217=y\nCONFIG_REGULATOR_TPS65218=y\n# CONFIG_REGULATOR_TPS6524X is not set\nCONFIG_REGULATOR_TPS6586X=y\nCONFIG_REGULATOR_TPS65910=y\n# CONFIG_REGULATOR_VCTRL is not set\n# CONFIG_REGULATOR_QCOM_LABIBB is not set\nCONFIG_RC_CORE=y\nCONFIG_BPF_LIRC_MODE2=y\nCONFIG_LIRC=y\nCONFIG_RC_MAP=m\nCONFIG_RC_DECODERS=y\nCONFIG_IR_IMON_DECODER=m\nCONFIG_IR_JVC_DECODER=m\nCONFIG_IR_MCE_KBD_DECODER=m\nCONFIG_IR_NEC_DECODER=m\nCONFIG_IR_RC5_DECODER=m\nCONFIG_IR_RC6_DECODER=m\nCONFIG_IR_RCMM_DECODER=m\nCONFIG_IR_SANYO_DECODER=m\nCONFIG_IR_SHARP_DECODER=m\nCONFIG_IR_SONY_DECODER=m\nCONFIG_IR_XMP_DECODER=m\nCONFIG_RC_DEVICES=y\nCONFIG_IR_GPIO_CIR=m\nCONFIG_IR_GPIO_TX=m\nCONFIG_IR_HIX5HD2=m\nCONFIG_IR_IGORPLUGUSB=m\nCONFIG_IR_IGUANA=m\nCONFIG_IR_IMON=m\nCONFIG_IR_IMON_RAW=m\nCONFIG_IR_MCEUSB=m\nCONFIG_IR_PWM_TX=m\nCONFIG_IR_REDRAT3=m\nCONFIG_IR_SERIAL=m\n# CONFIG_IR_SERIAL_TRANSMITTER is not set\nCONFIG_IR_SPI=m\nCONFIG_IR_STREAMZAP=m\nCONFIG_IR_TOY=m\nCONFIG_IR_TTUSBIR=m\nCONFIG_RC_ATI_REMOTE=m\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_RC_XBOX_DVD=m\nCONFIG_CEC_CORE=y\nCONFIG_CEC_NOTIFIER=y\n\n#\n# CEC support\n#\n# CONFIG_MEDIA_CEC_RC is not set\nCONFIG_MEDIA_CEC_SUPPORT=y\n# CONFIG_CEC_CH7322 is not set\n# CONFIG_CEC_CROS_EC is not set\nCONFIG_USB_PULSE8_CEC=m\nCONFIG_USB_RAINSHADOW_CEC=m\n# end of CEC support\n\nCONFIG_MEDIA_SUPPORT=y\nCONFIG_MEDIA_SUPPORT_FILTER=y\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\nCONFIG_MEDIA_RADIO_SUPPORT=y\n# CONFIG_MEDIA_SDR_SUPPORT is not set\nCONFIG_MEDIA_PLATFORM_SUPPORT=y\n# CONFIG_MEDIA_TEST_SUPPORT is not set\n# end of Media device types\n\nCONFIG_VIDEO_DEV=y\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_DVB_CORE=y\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2_I2C=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_VIDEO_TUNER=m\nCONFIG_V4L2_H264=m\nCONFIG_V4L2_VP9=m\nCONFIG_V4L2_MEM2MEM_DEV=m\n# CONFIG_V4L2_FLASH_LED_CLASS is not set\nCONFIG_V4L2_FWNODE=y\nCONFIG_V4L2_ASYNC=y\nCONFIG_VIDEOBUF_GEN=m\nCONFIG_VIDEOBUF_VMALLOC=m\n# end of Video4Linux options\n\n#\n# Media controller options\n#\nCONFIG_MEDIA_CONTROLLER_DVB=y\nCONFIG_MEDIA_CONTROLLER_REQUEST_API=y\n# end of Media controller options\n\n#\n# Digital TV options\n#\n# CONFIG_DVB_MMAP is not set\nCONFIG_DVB_NET=y\nCONFIG_DVB_MAX_ADAPTERS=16\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set\n# CONFIG_DVB_ULE_DEBUG is not set\n# end of Digital TV options\n\n#\n# Media drivers\n#\n\n#\n# Drivers filtered as selected at 'Filter media drivers'\n#\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\nCONFIG_USB_GSPCA=m\n# CONFIG_USB_GSPCA_BENQ is not set\n# CONFIG_USB_GSPCA_CONEX is not set\n# CONFIG_USB_GSPCA_CPIA1 is not set\n# CONFIG_USB_GSPCA_DTCS033 is not set\n# CONFIG_USB_GSPCA_ETOMS is not set\n# CONFIG_USB_GSPCA_FINEPIX is not set\n# CONFIG_USB_GSPCA_JEILINJ is not set\n# CONFIG_USB_GSPCA_JL2005BCD is not set\n# CONFIG_USB_GSPCA_KINECT is not set\n# CONFIG_USB_GSPCA_KONICA is not set\n# CONFIG_USB_GSPCA_MARS is not set\n# CONFIG_USB_GSPCA_MR97310A is not set\n# CONFIG_USB_GSPCA_NW80X is not set\n# CONFIG_USB_GSPCA_OV519 is not set\n# CONFIG_USB_GSPCA_OV534 is not set\n# CONFIG_USB_GSPCA_OV534_9 is not set\n# CONFIG_USB_GSPCA_PAC207 is not set\n# CONFIG_USB_GSPCA_PAC7302 is not set\n# CONFIG_USB_GSPCA_PAC7311 is not set\n# CONFIG_USB_GSPCA_SE401 is not set\n# CONFIG_USB_GSPCA_SN9C2028 is not set\n# CONFIG_USB_GSPCA_SN9C20X is not set\n# CONFIG_USB_GSPCA_SONIXB is not set\n# CONFIG_USB_GSPCA_SONIXJ is not set\n# CONFIG_USB_GSPCA_SPCA1528 is not set\n# CONFIG_USB_GSPCA_SPCA500 is not set\n# CONFIG_USB_GSPCA_SPCA501 is not set\n# CONFIG_USB_GSPCA_SPCA505 is not set\n# CONFIG_USB_GSPCA_SPCA506 is not set\n# CONFIG_USB_GSPCA_SPCA508 is not set\n# CONFIG_USB_GSPCA_SPCA561 is not set\n# CONFIG_USB_GSPCA_SQ905 is not set\n# CONFIG_USB_GSPCA_SQ905C is not set\n# CONFIG_USB_GSPCA_SQ930X is not set\n# CONFIG_USB_GSPCA_STK014 is not set\n# CONFIG_USB_GSPCA_STK1135 is not set\n# CONFIG_USB_GSPCA_STV0680 is not set\n# CONFIG_USB_GSPCA_SUNPLUS is not set\n# CONFIG_USB_GSPCA_T613 is not set\n# CONFIG_USB_GSPCA_TOPRO is not set\n# CONFIG_USB_GSPCA_TOUPTEK is not set\n# CONFIG_USB_GSPCA_TV8532 is not set\n# CONFIG_USB_GSPCA_VC032X is not set\n# CONFIG_USB_GSPCA_VICAM is not set\n# CONFIG_USB_GSPCA_XIRLINK_CIT is not set\n# CONFIG_USB_GSPCA_ZC3XX is not set\n# CONFIG_USB_GL860 is not set\n# CONFIG_USB_M5602 is not set\n# CONFIG_USB_STV06XX is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_USB_S2255 is not set\n# CONFIG_VIDEO_USBTV is not set\nCONFIG_USB_VIDEO_CLASS=m\nCONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y\n\n#\n# Analog TV USB devices\n#\nCONFIG_VIDEO_GO7007=m\nCONFIG_VIDEO_GO7007_USB=m\nCONFIG_VIDEO_GO7007_LOADER=m\nCONFIG_VIDEO_GO7007_USB_S2250_BOARD=m\nCONFIG_VIDEO_HDPVR=m\nCONFIG_VIDEO_PVRUSB2=m\nCONFIG_VIDEO_PVRUSB2_SYSFS=y\nCONFIG_VIDEO_PVRUSB2_DVB=y\n# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set\nCONFIG_VIDEO_STK1160_COMMON=m\nCONFIG_VIDEO_STK1160=m\n\n#\n# Analog/digital TV USB devices\n#\nCONFIG_VIDEO_AU0828=m\nCONFIG_VIDEO_AU0828_V4L2=y\nCONFIG_VIDEO_AU0828_RC=y\nCONFIG_VIDEO_CX231XX=m\nCONFIG_VIDEO_CX231XX_RC=y\nCONFIG_VIDEO_CX231XX_ALSA=m\nCONFIG_VIDEO_CX231XX_DVB=m\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_AS102=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\n# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_DVBSKY=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_DVB_USB_ZD1301=m\nCONFIG_DVB_USB=m\n# CONFIG_DVB_USB_DEBUG is not set\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_CXUSB=m\nCONFIG_DVB_USB_CXUSB_ANALOG=y\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_DIB3000MC=m\nCONFIG_DVB_USB_DIBUSB_MB=m\nCONFIG_DVB_USB_DIBUSB_MB_FAULTY=y\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_DTT200U=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_OPERA1=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_SMS_USB_DRV=m\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\nCONFIG_VIDEO_EM28XX=m\nCONFIG_VIDEO_EM28XX_V4L2=m\nCONFIG_VIDEO_EM28XX_ALSA=m\nCONFIG_VIDEO_EM28XX_DVB=m\nCONFIG_VIDEO_EM28XX_RC=m\nCONFIG_RADIO_ADAPTERS=y\nCONFIG_RADIO_SAA7706H=m\nCONFIG_RADIO_SHARK=m\nCONFIG_RADIO_SHARK2=m\nCONFIG_RADIO_SI4713=m\nCONFIG_RADIO_TEA575X=m\nCONFIG_RADIO_TEA5764=m\nCONFIG_RADIO_TEF6862=m\nCONFIG_RADIO_WL1273=m\nCONFIG_USB_DSBR=m\nCONFIG_USB_KEENE=m\nCONFIG_USB_MA901=m\nCONFIG_USB_MR800=m\nCONFIG_USB_RAREMONO=m\nCONFIG_RADIO_SI470X=m\nCONFIG_USB_SI470X=m\nCONFIG_I2C_SI470X=m\nCONFIG_USB_SI4713=m\nCONFIG_PLATFORM_SI4713=m\nCONFIG_I2C_SI4713=m\nCONFIG_MEDIA_PLATFORM_DRIVERS=y\n# CONFIG_V4L_PLATFORM_DRIVERS is not set\n# CONFIG_DVB_PLATFORM_DRIVERS is not set\nCONFIG_V4L_MEM2MEM_DRIVERS=y\n# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set\n\n#\n# Allegro DVT media platform drivers\n#\n\n#\n# Amlogic media platform drivers\n#\n\n#\n# Amphion drivers\n#\n\n#\n# Aspeed media platform drivers\n#\n\n#\n# Atmel media platform drivers\n#\n\n#\n# Cadence media platform drivers\n#\n# CONFIG_VIDEO_CADENCE_CSI2RX is not set\n# CONFIG_VIDEO_CADENCE_CSI2TX is not set\n\n#\n# Chips&Media media platform drivers\n#\n\n#\n# Intel media platform drivers\n#\n\n#\n# Marvell media platform drivers\n#\n\n#\n# Mediatek media platform drivers\n#\n\n#\n# NVidia media platform drivers\n#\n\n#\n# NXP media platform drivers\n#\n\n#\n# Qualcomm media platform drivers\n#\n\n#\n# Renesas media platform drivers\n#\n\n#\n# Rockchip media platform drivers\n#\nCONFIG_VIDEO_ROCKCHIP_IEP=m\nCONFIG_VIDEO_ROCKCHIP_RGA=m\n\n#\n# Samsung media platform drivers\n#\n\n#\n# STMicroelectronics media platform drivers\n#\n\n#\n# Sunxi media platform drivers\n#\n\n#\n# Texas Instruments drivers\n#\n\n#\n# Verisilicon media platform drivers\n#\nCONFIG_VIDEO_HANTRO=m\nCONFIG_VIDEO_HANTRO_ROCKCHIP=y\n\n#\n# VIA media platform drivers\n#\n\n#\n# Xilinx media platform drivers\n#\n\n#\n# MMC/SDIO DVB adapters\n#\n# CONFIG_SMS_SDIO_DRV is not set\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_TTPCI_EEPROM=m\nCONFIG_VIDEO_CX2341X=m\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\nCONFIG_VIDEOBUF2_CORE=m\nCONFIG_VIDEOBUF2_V4L2=m\nCONFIG_VIDEOBUF2_MEMOPS=m\nCONFIG_VIDEOBUF2_DMA_CONTIG=m\nCONFIG_VIDEOBUF2_VMALLOC=m\nCONFIG_VIDEOBUF2_DMA_SG=m\n# end of Media drivers\n\nCONFIG_MEDIA_HIDE_ANCILLARY_SUBDRV=y\n\n#\n# Media ancillary drivers\n#\nCONFIG_MEDIA_ATTACH=y\n\n#\n# IR I2C driver auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_IR_I2C=y\nCONFIG_VIDEO_CAMERA_SENSOR=y\n# CONFIG_VIDEO_AR0521 is not set\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_HI846 is not set\n# CONFIG_VIDEO_HI847 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_IMX412 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\nCONFIG_VIDEO_MT9V011=m\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_OG01A1B is not set\n# CONFIG_VIDEO_OV02A10 is not set\n# CONFIG_VIDEO_OV08D10 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\nCONFIG_VIDEO_OV2640=m\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5693 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV7251 is not set\nCONFIG_VIDEO_OV7640=m\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9282 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# audio, video and radio I2C drivers auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_CS53L32A=m\nCONFIG_VIDEO_MSP3400=m\nCONFIG_VIDEO_SONY_BTF_MPX=m\nCONFIG_VIDEO_UDA1342=m\nCONFIG_VIDEO_WM8775=m\nCONFIG_VIDEO_SAA711X=m\nCONFIG_VIDEO_TVP5150=m\nCONFIG_VIDEO_TW2804=m\nCONFIG_VIDEO_TW9903=m\nCONFIG_VIDEO_TW9906=m\n\n#\n# Video and audio decoders\n#\nCONFIG_VIDEO_CX25840=m\n\n#\n# SPI I2C drivers auto-selected by 'Autoselect ancillary drivers'\n#\n\n#\n# Media SPI Adapters\n#\n# CONFIG_CXD2880_SPI_DRV is not set\n# CONFIG_VIDEO_GS1662 is not set\n# end of Media SPI Adapters\n\nCONFIG_MEDIA_TUNER=y\n\n#\n# Tuner drivers auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_IT913X=m\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_MC44S803=y\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT20XX=y\nCONFIG_MEDIA_TUNER_MT2266=m\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\nCONFIG_MEDIA_TUNER_QM1D1C0042=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_R820T=m\nCONFIG_MEDIA_TUNER_SI2157=m\nCONFIG_MEDIA_TUNER_SIMPLE=y\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_TDA18250=m\nCONFIG_MEDIA_TUNER_TDA18271=y\nCONFIG_MEDIA_TUNER_TDA827X=y\nCONFIG_MEDIA_TUNER_TDA8290=y\nCONFIG_MEDIA_TUNER_TDA9887=y\nCONFIG_MEDIA_TUNER_TEA5761=y\nCONFIG_MEDIA_TUNER_TEA5767=y\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_XC2028=y\nCONFIG_MEDIA_TUNER_XC4000=y\nCONFIG_MEDIA_TUNER_XC5000=y\n\n#\n# DVB Frontend drivers auto-selected by 'Autoselect ancillary drivers'\n#\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_M88DS3103=m\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\nCONFIG_DVB_STV6110x=m\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_MN88472=m\nCONFIG_DVB_MN88473=m\nCONFIG_DVB_SI2165=m\nCONFIG_DVB_TDA18271C2DD=m\n\n#\n# DVB-S (satellite) frontends\n#\nCONFIG_DVB_CX24116=m\nCONFIG_DVB_CX24120=m\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_DS3000=m\nCONFIG_DVB_MT312=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_TDA10071=m\nCONFIG_DVB_TDA10086=m\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_TS2020=m\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TUNER_ITD1000=m\nCONFIG_DVB_ZL10039=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_AS102_FE=m\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_CXD2841ER=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_GP8PSK_FE=m\nCONFIG_DVB_MT352=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\nCONFIG_DVB_SI2168=m\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_ZD1301_DEMOD=m\nCONFIG_DVB_ZL10353=m\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_STV0297=m\nCONFIG_DVB_TDA10023=m\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_AU8522=m\nCONFIG_DVB_AU8522_DTV=m\nCONFIG_DVB_AU8522_V4L=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LGDT3306A=m\nCONFIG_DVB_LGDT330X=m\nCONFIG_DVB_MXL692=m\nCONFIG_DVB_NXT200X=m\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_S5H1411=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\nCONFIG_DVB_S921=m\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_TC90522=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_A8293=m\nCONFIG_DVB_AF9033=m\nCONFIG_DVB_ATBM8830=m\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_IX2505V=m\nCONFIG_DVB_LGS8GXX=m\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_M88RS2000=m\nCONFIG_DVB_DRX39XYJ=m\n\n#\n# Common Interface (EN50221) controller drivers\n#\nCONFIG_DVB_SP2=m\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\n# CONFIG_IMX_IPUV3_CORE is not set\nCONFIG_DRM=y\n# CONFIG_DRM_DEBUG_MM is not set\nCONFIG_DRM_KMS_HELPER=y\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\nCONFIG_DRM_DP_AUX_BUS=y\nCONFIG_DRM_DISPLAY_HELPER=y\nCONFIG_DRM_DISPLAY_DP_HELPER=y\nCONFIG_DRM_DISPLAY_HDMI_HELPER=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_GEM_DMA_HELPER=y\nCONFIG_DRM_GEM_SHMEM_HELPER=y\nCONFIG_DRM_SCHED=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_KOMEDA is not set\n# end of ARM devices\n\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\n# CONFIG_DRM_EXYNOS is not set\nCONFIG_DRM_ROCKCHIP=y\nCONFIG_ROCKCHIP_VOP=y\n# CONFIG_ROCKCHIP_VOP2 is not set\n# CONFIG_ROCKCHIP_ANALOGIX_DP is not set\n# CONFIG_ROCKCHIP_CDN_DP is not set\nCONFIG_ROCKCHIP_DW_HDMI=y\n# CONFIG_ROCKCHIP_DW_MIPI_DSI is not set\n# CONFIG_ROCKCHIP_INNO_HDMI is not set\n# CONFIG_ROCKCHIP_LVDS is not set\n# CONFIG_ROCKCHIP_RGB is not set\n# CONFIG_ROCKCHIP_RK3066_HDMI is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_ARMADA is not set\n# CONFIG_DRM_ATMEL_HLCDC is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_USE_LVDS is not set\n# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set\n# CONFIG_DRM_OMAP is not set\n# CONFIG_DRM_TILCDC is not set\n# CONFIG_DRM_VIRTIO_GPU is not set\n# CONFIG_DRM_FSL_DCU is not set\n# CONFIG_DRM_STM is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set\n# CONFIG_DRM_PANEL_ARM_VERSATILE is not set\n# CONFIG_DRM_PANEL_LVDS is not set\nCONFIG_DRM_PANEL_SIMPLE=y\nCONFIG_DRM_PANEL_EDP=y\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set\n# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LB035Q02 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set\n# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set\n# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set\n# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set\n# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set\n# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set\n# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set\n# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set\n# CONFIG_DRM_PANEL_TPO_TPG110 is not set\n# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_CHRONTEL_CH7033 is not set\n# CONFIG_DRM_CROS_EC_ANX7688 is not set\n# CONFIG_DRM_DISPLAY_CONNECTOR is not set\n# CONFIG_DRM_ITE_IT6505 is not set\n# CONFIG_DRM_LONTIUM_LT8912B is not set\n# CONFIG_DRM_LONTIUM_LT9211 is not set\n# CONFIG_DRM_LONTIUM_LT9611 is not set\n# CONFIG_DRM_LONTIUM_LT9611UXC is not set\n# CONFIG_DRM_ITE_IT66121 is not set\n# CONFIG_DRM_LVDS_CODEC is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NWL_MIPI_DSI is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_PARADE_PS8640 is not set\n# CONFIG_DRM_SIL_SII8620 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_SII9234 is not set\n# CONFIG_DRM_SIMPLE_BRIDGE is not set\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\n# CONFIG_DRM_TOSHIBA_TC358762 is not set\n# CONFIG_DRM_TOSHIBA_TC358764 is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TOSHIBA_TC358768 is not set\n# CONFIG_DRM_TOSHIBA_TC358775 is not set\n# CONFIG_DRM_TI_DLPC3433 is not set\n# CONFIG_DRM_TI_TFP410 is not set\n# CONFIG_DRM_TI_SN65DSI83 is not set\n# CONFIG_DRM_TI_SN65DSI86 is not set\n# CONFIG_DRM_TI_TPD12S015 is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_ANALOGIX_ANX7625 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_CDNS_MHDP8546 is not set\nCONFIG_DRM_DW_HDMI=y\n# CONFIG_DRM_DW_HDMI_AHB_AUDIO is not set\nCONFIG_DRM_DW_HDMI_I2S_AUDIO=y\n# CONFIG_DRM_DW_HDMI_GP_AUDIO is not set\nCONFIG_DRM_DW_HDMI_CEC=y\n# end of Display Interface Bridges\n\n# CONFIG_DRM_STI is not set\n# CONFIG_DRM_ETNAVIV is not set\n# CONFIG_DRM_LOGICVC is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_PANEL_MIPI_DBI is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_TINYDRM_HX8357D is not set\n# CONFIG_TINYDRM_ILI9163 is not set\n# CONFIG_TINYDRM_ILI9225 is not set\n# CONFIG_TINYDRM_ILI9341 is not set\n# CONFIG_TINYDRM_ILI9486 is not set\n# CONFIG_TINYDRM_MI0283QT is not set\n# CONFIG_TINYDRM_REPAPER is not set\n# CONFIG_TINYDRM_ST7586 is not set\n# CONFIG_TINYDRM_ST7735R is not set\n# CONFIG_DRM_PL111 is not set\n# CONFIG_DRM_TVE200 is not set\n# CONFIG_DRM_LIMA is not set\nCONFIG_DRM_PANFROST=y\n# CONFIG_DRM_MCDE is not set\n# CONFIG_DRM_TIDSS is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_SSD130X is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_DRM_NOMODESET=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\nCONFIG_FB_MODE_HELPERS=y\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\n# CONFIG_LCD_CLASS_DEVICE is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\n# CONFIG_BACKLIGHT_KTD253 is not set\nCONFIG_BACKLIGHT_PWM=y\n# CONFIG_BACKLIGHT_QCOM_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\n# CONFIG_BACKLIGHT_TPS65217 is not set\nCONFIG_BACKLIGHT_AS3711=y\nCONFIG_BACKLIGHT_GPIO=y\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n# CONFIG_BACKLIGHT_LED is not set\n# end of Backlight & LCD device support\n\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_FRAMEBUFFER_CONSOLE=y\n# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\nCONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\n# end of Console display driver support\n\n# CONFIG_LOGO is not set\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_HWDEP=m\nCONFIG_SND_RAWMIDI=m\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\n# CONFIG_SND_HRTIMER is not set\n# CONFIG_SND_DYNAMIC_MINORS is not set\nCONFIG_SND_SUPPORT_OLD_API=y\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_CTL_INPUT_VALIDATION is not set\n# CONFIG_SND_SEQUENCER is not set\nCONFIG_SND_DRIVERS=y\n# CONFIG_SND_DUMMY is not set\n# CONFIG_SND_ALOOP is not set\n# CONFIG_SND_MTPAV is not set\n# CONFIG_SND_SERIAL_U16550 is not set\n# CONFIG_SND_SERIAL_GENERIC is not set\n# CONFIG_SND_MPU401 is not set\n\n#\n# HD-Audio\n#\n# end of HD-Audio\n\nCONFIG_SND_HDA_PREALLOC_SIZE=64\nCONFIG_SND_ARM=y\n# CONFIG_SND_ARMAACI is not set\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=m\nCONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y\n# CONFIG_SND_USB_UA101 is not set\n# CONFIG_SND_USB_CAIAQ is not set\n# CONFIG_SND_USB_6FIRE is not set\n# CONFIG_SND_USB_HIFACE is not set\n# CONFIG_SND_BCD2000 is not set\n# CONFIG_SND_USB_POD is not set\n# CONFIG_SND_USB_PODHD is not set\n# CONFIG_SND_USB_TONEPORT is not set\n# CONFIG_SND_USB_VARIAX is not set\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\n# CONFIG_SND_SOC_ADI is not set\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_AMD_ACP_CONFIG is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_AUDMIX is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_FSL_MICFIL is not set\n# CONFIG_SND_SOC_FSL_XCVR is not set\n# CONFIG_SND_SOC_FSL_RPMSG is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\nCONFIG_SND_SOC_ROCKCHIP=y\nCONFIG_SND_SOC_ROCKCHIP_I2S=y\nCONFIG_SND_SOC_ROCKCHIP_I2S_TDM=y\nCONFIG_SND_SOC_ROCKCHIP_PDM=m\nCONFIG_SND_SOC_ROCKCHIP_SPDIF=y\nCONFIG_SND_SOC_ROCKCHIP_MAX98090=m\nCONFIG_SND_SOC_ROCKCHIP_RT5645=m\nCONFIG_SND_SOC_RK3288_HDMI_ANALOG=m\n# CONFIG_SND_SOC_RK3399_GRU_SOUND is not set\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_SPI is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\n# CONFIG_SND_SOC_ADAU7002 is not set\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4375 is not set\n# CONFIG_SND_SOC_AK4458 is not set\n# CONFIG_SND_SOC_AK4554 is not set\n# CONFIG_SND_SOC_AK4613 is not set\nCONFIG_SND_SOC_AK4642=m\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_AW8738 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\nCONFIG_SND_SOC_CPCAP=m\n# CONFIG_SND_SOC_CROS_EC_CODEC is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS35L41_SPI is not set\n# CONFIG_SND_SOC_CS35L41_I2C is not set\n# CONFIG_SND_SOC_CS35L45_SPI is not set\n# CONFIG_SND_SOC_CS35L45_I2C is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS42L83 is not set\n# CONFIG_SND_SOC_CS4234 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\n# CONFIG_SND_SOC_DA7213 is not set\n# CONFIG_SND_SOC_DMIC is not set\nCONFIG_SND_SOC_HDMI_CODEC=y\n# CONFIG_SND_SOC_ES7134 is not set\n# CONFIG_SND_SOC_ES7241 is not set\n# CONFIG_SND_SOC_ES8316 is not set\n# CONFIG_SND_SOC_ES8326 is not set\nCONFIG_SND_SOC_ES8328=m\nCONFIG_SND_SOC_ES8328_I2C=m\nCONFIG_SND_SOC_ES8328_SPI=m\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_HDA is not set\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\n# CONFIG_SND_SOC_MAX98088 is not set\nCONFIG_SND_SOC_MAX98090=m\n# CONFIG_SND_SOC_MAX98357A is not set\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98520 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX98396 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_ANALOG is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM179X_SPI is not set\n# CONFIG_SND_SOC_PCM186X_I2C is not set\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3060_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\n# CONFIG_SND_SOC_PCM5102A is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK3328 is not set\n# CONFIG_SND_SOC_RK817 is not set\nCONFIG_SND_SOC_RL6231=m\n# CONFIG_SND_SOC_RT5616 is not set\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\nCONFIG_SND_SOC_RT5645=m\n# CONFIG_SND_SOC_RT5659 is not set\n# CONFIG_SND_SOC_RT9120 is not set\nCONFIG_SND_SOC_SGTL5000=m\n# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\nCONFIG_SND_SOC_SPDIF=m\n# CONFIG_SND_SOC_SRC4XXX_I2C is not set\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\nCONFIG_SND_SOC_STI_SAS=m\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS2780 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805M is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320ADC3XXX is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\nCONFIG_SND_SOC_TS3A227E=m\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731_I2C is not set\n# CONFIG_SND_SOC_WM8731_SPI is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8940 is not set\n# CONFIG_SND_SOC_WM8960 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\nCONFIG_SND_SOC_WM8978=m\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_ZL38060 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8821 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\n# end of CODEC drivers\n\nCONFIG_SND_SIMPLE_CARD_UTILS=y\nCONFIG_SND_SIMPLE_CARD=y\nCONFIG_SND_AUDIO_GRAPH_CARD=y\n# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set\n# CONFIG_SND_TEST_COMPONENT is not set\n# CONFIG_SND_VIRTIO is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\n# CONFIG_HID_APPLEIR is not set\nCONFIG_HID_ASUS=y\nCONFIG_HID_AUREAL=y\nCONFIG_HID_BELKIN=y\n# CONFIG_HID_BETOP_FF is not set\nCONFIG_HID_BIGBEN_FF=m\nCONFIG_HID_CHERRY=y\nCONFIG_HID_CHICONY=y\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\nCONFIG_HID_CYPRESS=y\nCONFIG_HID_DRAGONRISE=m\nCONFIG_DRAGONRISE_FF=y\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\nCONFIG_HID_EZKEY=y\n# CONFIG_HID_FT260 is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_GLORIOUS is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_GOOGLE_HAMMER is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\nCONFIG_HID_KYE=y\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_VRC2 is not set\n# CONFIG_HID_XIAOMI is not set\nCONFIG_HID_GYRATION=y\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_ITE is not set\n# CONFIG_HID_JABRA is not set\nCONFIG_HID_TWINHAN=y\nCONFIG_HID_KENSINGTON=y\nCONFIG_HID_LCPOWER=y\n# CONFIG_HID_LED is not set\nCONFIG_HID_LENOVO=y\n# CONFIG_HID_LETSKETCH is not set\nCONFIG_HID_LOGITECH=y\nCONFIG_HID_LOGITECH_DJ=y\nCONFIG_HID_LOGITECH_HIDPP=y\nCONFIG_LOGITECH_FF=y\nCONFIG_LOGIRUMBLEPAD2_FF=y\nCONFIG_LOGIG940_FF=y\nCONFIG_LOGIWHEELS_FF=y\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_MEGAWORLD_FF is not set\n# CONFIG_HID_REDRAGON is not set\nCONFIG_HID_MICROSOFT=y\nCONFIG_HID_MONTEREY=y\nCONFIG_HID_MULTITOUCH=m\nCONFIG_HID_NINTENDO=m\nCONFIG_NINTENDO_FF=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\nCONFIG_HID_ORTEK=y\nCONFIG_HID_OUYA=y\nCONFIG_HID_PANTHERLORD=y\nCONFIG_PANTHERLORD_FF=y\nCONFIG_HID_PENMOUNT=y\nCONFIG_HID_PETALYNX=y\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PXRC is not set\n# CONFIG_HID_RAZER is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\nCONFIG_HID_SAMSUNG=y\n# CONFIG_HID_SEMITEK is not set\n# CONFIG_HID_SIGMAMICRO is not set\nCONFIG_HID_SONY=y\nCONFIG_SONY_FF=y\n# CONFIG_HID_SPEEDLINK is not set\nCONFIG_HID_STEAM=m\n# CONFIG_HID_STEELSERIES is not set\nCONFIG_HID_SUNPLUS=y\n# CONFIG_HID_RMI is not set\n# CONFIG_HID_GREENASIA is not set\nCONFIG_HID_SMARTJOYPLUS=m\nCONFIG_SMARTJOYPLUS_FF=y\nCONFIG_HID_TIVO=y\nCONFIG_HID_TOPSEED=y\n# CONFIG_HID_TOPRE is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\nCONFIG_HID_WIIMOTE=m\nCONFIG_HID_XINMO=y\n# CONFIG_HID_ZEROPLUS is not set\nCONFIG_HID_ZYDACRON=y\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n# end of USB HID support\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID_OF is not set\n# CONFIG_I2C_HID_OF_ELAN is not set\n# CONFIG_I2C_HID_OF_GOODIX is not set\n# end of I2C HID support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\nCONFIG_USB_ULPI_BUS=y\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\nCONFIG_USB_OTG=y\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set\n# CONFIG_USB_OTG_FSM is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\n# CONFIG_USB_MON is not set\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\n# CONFIG_USB_XHCI_DBGCAP is not set\n# CONFIG_USB_XHCI_PCI_RENESAS is not set\nCONFIG_USB_XHCI_PLATFORM=y\nCONFIG_USB_EHCI_HCD=y\nCONFIG_USB_EHCI_ROOT_HUB_TT=y\nCONFIG_USB_EHCI_TT_NEWSCHED=y\n# CONFIG_USB_EHCI_FSL is not set\nCONFIG_USB_EHCI_HCD_PLATFORM=y\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\nCONFIG_USB_OHCI_HCD=y\nCONFIG_USB_OHCI_HCD_PLATFORM=y\n# CONFIG_USB_SL811_HCD is not set\nCONFIG_USB_R8A66597_HCD=m\n# CONFIG_USB_HCD_BCMA is not set\n# CONFIG_USB_HCD_SSB is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=y\n# CONFIG_USB_PRINTER is not set\n# CONFIG_USB_WDM is not set\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\nCONFIG_USB_UAS=m\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\nCONFIG_USB_MUSB_HDRC=m\n# CONFIG_USB_MUSB_HOST is not set\n# CONFIG_USB_MUSB_GADGET is not set\nCONFIG_USB_MUSB_DUAL_ROLE=y\n\n#\n# Platform Glue Layer\n#\n\n#\n# MUSB DMA mode\n#\n# CONFIG_MUSB_PIO_ONLY is not set\nCONFIG_USB_DWC3=y\n# CONFIG_USB_DWC3_ULPI is not set\n# CONFIG_USB_DWC3_HOST is not set\n# CONFIG_USB_DWC3_GADGET is not set\nCONFIG_USB_DWC3_DUAL_ROLE=y\n\n#\n# Platform Glue Driver Support\n#\nCONFIG_USB_DWC3_OF_SIMPLE=y\nCONFIG_USB_DWC2=y\n# CONFIG_USB_DWC2_HOST is not set\n\n#\n# Gadget/Dual-role mode requires USB Gadget support to be enabled\n#\n# CONFIG_USB_DWC2_PERIPHERAL is not set\nCONFIG_USB_DWC2_DUAL_ROLE=y\n# CONFIG_USB_DWC2_DEBUG is not set\n# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set\nCONFIG_USB_CHIPIDEA=y\nCONFIG_USB_CHIPIDEA_UDC=y\nCONFIG_USB_CHIPIDEA_HOST=y\nCONFIG_USB_CHIPIDEA_MSM=y\nCONFIG_USB_CHIPIDEA_IMX=y\nCONFIG_USB_CHIPIDEA_GENERIC=y\nCONFIG_USB_CHIPIDEA_TEGRA=y\nCONFIG_USB_ISP1760=y\nCONFIG_USB_ISP1760_HCD=y\nCONFIG_USB_ISP1761_UDC=y\n# CONFIG_USB_ISP1760_HOST_ROLE is not set\n# CONFIG_USB_ISP1760_GADGET_ROLE is not set\nCONFIG_USB_ISP1760_DUAL_ROLE=y\n\n#\n# USB port drivers\n#\n# CONFIG_USB_SERIAL is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\n# CONFIG_USB_EZUSB_FX2 is not set\n# CONFIG_USB_HUB_USB251XB is not set\nCONFIG_USB_HSIC_USB3503=y\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n# CONFIG_USB_ONBOARD_HUB is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\nCONFIG_NOP_USB_XCEIV=m\nCONFIG_AM335X_CONTROL_USB=m\nCONFIG_AM335X_PHY_USB=m\nCONFIG_USB_GPIO_VBUS=y\nCONFIG_USB_ISP1301=y\n# CONFIG_USB_ULPI is not set\n# end of USB Physical Layer drivers\n\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\n# CONFIG_USB_GADGET_DEBUG_FILES is not set\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=2\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n# CONFIG_U_SERIAL_CONSOLE is not set\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FUSB300 is not set\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\n# CONFIG_USB_SNP_UDC_PLAT is not set\n# CONFIG_USB_M66592 is not set\n# CONFIG_USB_BDC_UDC is not set\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_GADGET_XILINX is not set\n# CONFIG_USB_MAX3420_UDC is not set\n# CONFIG_USB_DUMMY_HCD is not set\n# end of USB Peripheral Controller\n\nCONFIG_USB_LIBCOMPOSITE=m\nCONFIG_USB_F_ACM=m\nCONFIG_USB_F_SS_LB=m\nCONFIG_USB_U_SERIAL=m\nCONFIG_USB_U_ETHER=m\nCONFIG_USB_U_AUDIO=m\nCONFIG_USB_F_SERIAL=m\nCONFIG_USB_F_OBEX=m\nCONFIG_USB_F_NCM=m\nCONFIG_USB_F_ECM=m\nCONFIG_USB_F_EEM=m\nCONFIG_USB_F_SUBSET=m\nCONFIG_USB_F_RNDIS=m\nCONFIG_USB_F_MASS_STORAGE=m\nCONFIG_USB_F_FS=m\nCONFIG_USB_F_UAC1=m\nCONFIG_USB_F_UAC1_LEGACY=m\nCONFIG_USB_F_UAC2=m\nCONFIG_USB_F_UVC=m\nCONFIG_USB_F_MIDI=m\nCONFIG_USB_F_HID=m\nCONFIG_USB_F_PRINTER=m\nCONFIG_USB_CONFIGFS=m\nCONFIG_USB_CONFIGFS_SERIAL=y\nCONFIG_USB_CONFIGFS_ACM=y\nCONFIG_USB_CONFIGFS_OBEX=y\nCONFIG_USB_CONFIGFS_NCM=y\nCONFIG_USB_CONFIGFS_ECM=y\nCONFIG_USB_CONFIGFS_ECM_SUBSET=y\nCONFIG_USB_CONFIGFS_RNDIS=y\nCONFIG_USB_CONFIGFS_EEM=y\nCONFIG_USB_CONFIGFS_MASS_STORAGE=y\nCONFIG_USB_CONFIGFS_F_LB_SS=y\nCONFIG_USB_CONFIGFS_F_FS=y\nCONFIG_USB_CONFIGFS_F_UAC1=y\nCONFIG_USB_CONFIGFS_F_UAC1_LEGACY=y\nCONFIG_USB_CONFIGFS_F_UAC2=y\nCONFIG_USB_CONFIGFS_F_MIDI=y\nCONFIG_USB_CONFIGFS_F_HID=y\nCONFIG_USB_CONFIGFS_F_UVC=y\nCONFIG_USB_CONFIGFS_F_PRINTER=y\n\n#\n# USB Gadget precomposed configurations\n#\n# CONFIG_USB_ZERO is not set\n# CONFIG_USB_AUDIO is not set\nCONFIG_USB_ETH=m\nCONFIG_USB_ETH_RNDIS=y\n# CONFIG_USB_ETH_EEM is not set\n# CONFIG_USB_G_NCM is not set\n# CONFIG_USB_GADGETFS is not set\n# CONFIG_USB_FUNCTIONFS is not set\n# CONFIG_USB_MASS_STORAGE is not set\n# CONFIG_USB_G_SERIAL is not set\n# CONFIG_USB_MIDI_GADGET is not set\n# CONFIG_USB_G_PRINTER is not set\n# CONFIG_USB_CDC_COMPOSITE is not set\n# CONFIG_USB_G_ACM_MS is not set\n# CONFIG_USB_G_MULTI is not set\n# CONFIG_USB_G_HID is not set\n# CONFIG_USB_G_DBGP is not set\n# CONFIG_USB_G_WEBCAM is not set\n# CONFIG_USB_RAW_GADGET is not set\n# end of USB Gadget precomposed configurations\n\n# CONFIG_TYPEC is not set\nCONFIG_USB_ROLE_SWITCH=y\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\n# CONFIG_PWRSEQ_SD8787 is not set\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=16\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_DEBUG is not set\nCONFIG_MMC_ARMMMCI=y\nCONFIG_MMC_STM32_SDMMC=y\nCONFIG_MMC_SDHCI=y\nCONFIG_MMC_SDHCI_PLTFM=y\nCONFIG_MMC_SDHCI_OF_ARASAN=y\nCONFIG_MMC_SDHCI_OF_AT91=y\n# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set\n# CONFIG_MMC_SDHCI_CADENCE is not set\n# CONFIG_MMC_SDHCI_F_SDH30 is not set\n# CONFIG_MMC_SDHCI_MILBEAUT is not set\n# CONFIG_MMC_SPI is not set\nCONFIG_MMC_DW=y\nCONFIG_MMC_DW_PLTFM=y\n# CONFIG_MMC_DW_BLUEFIELD is not set\n# CONFIG_MMC_DW_EXYNOS is not set\n# CONFIG_MMC_DW_HI3798CV200 is not set\n# CONFIG_MMC_DW_K3 is not set\nCONFIG_MMC_DW_ROCKCHIP=y\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_CQHCI=y\n# CONFIG_MMC_HSQ is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MMC_SDHCI_XENON is not set\nCONFIG_MMC_SDHCI_OMAP=y\n# CONFIG_MMC_SDHCI_AM654 is not set\nCONFIG_MMC_SDHCI_EXTERNAL_DMA=y\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\nCONFIG_LEDS_CLASS_FLASH=m\n# CONFIG_LEDS_CLASS_MULTICOLOR is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AN30259A is not set\n# CONFIG_LEDS_AW2013 is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\nCONFIG_LEDS_CPCAP=m\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_EL15203000 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_LP55XX_COMMON is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\nCONFIG_LEDS_PWM=y\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\nCONFIG_LEDS_MAX8997=m\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_SYSCON is not set\n# CONFIG_LEDS_PM8058 is not set\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_SPI_BYTE is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\n# CONFIG_LEDS_AAT1290 is not set\n# CONFIG_LEDS_AS3645A is not set\n# CONFIG_LEDS_KTD2692 is not set\n# CONFIG_LEDS_LM3601X is not set\n# CONFIG_LEDS_MAX77693 is not set\n# CONFIG_LEDS_RT4505 is not set\n# CONFIG_LEDS_RT8515 is not set\n# CONFIG_LEDS_SGM3140 is not set\n\n#\n# RGB LED drivers\n#\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\nCONFIG_LEDS_TRIGGER_TIMER=y\nCONFIG_LEDS_TRIGGER_ONESHOT=y\n# CONFIG_LEDS_TRIGGER_MTD is not set\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\nCONFIG_LEDS_TRIGGER_BACKLIGHT=y\nCONFIG_LEDS_TRIGGER_CPU=y\nCONFIG_LEDS_TRIGGER_ACTIVITY=y\nCONFIG_LEDS_TRIGGER_GPIO=y\nCONFIG_LEDS_TRIGGER_DEFAULT_ON=y\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\nCONFIG_LEDS_TRIGGER_TRANSIENT=y\nCONFIG_LEDS_TRIGGER_CAMERA=y\n# CONFIG_LEDS_TRIGGER_PANIC is not set\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\n# CONFIG_LEDS_TRIGGER_AUDIO is not set\n# CONFIG_LEDS_TRIGGER_TTY is not set\n\n#\n# Simple LED drivers\n#\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_ATOMIC_SCRUB=y\nCONFIG_EDAC_SUPPORT=y\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\nCONFIG_RTC_DRV_AS3722=y\nCONFIG_RTC_DRV_DS1307=y\n# CONFIG_RTC_DRV_DS1307_CENTURY is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\nCONFIG_RTC_DRV_HYM8563=m\n# CONFIG_RTC_DRV_MAX6900 is not set\nCONFIG_RTC_DRV_MAX8907=y\nCONFIG_RTC_DRV_MAX8998=m\nCONFIG_RTC_DRV_MAX8997=m\nCONFIG_RTC_DRV_MAX77686=y\n# CONFIG_RTC_DRV_NCT3018Y is not set\nCONFIG_RTC_DRV_RK808=y\nCONFIG_RTC_DRV_RS5C372=m\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\n# CONFIG_RTC_DRV_PCF8563 is not set\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\nCONFIG_RTC_DRV_BQ32K=m\nCONFIG_RTC_DRV_PALMAS=y\nCONFIG_RTC_DRV_TPS6586X=y\nCONFIG_RTC_DRV_TPS65910=y\n# CONFIG_RTC_DRV_RC5T619 is not set\nCONFIG_RTC_DRV_S35390A=m\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\nCONFIG_RTC_DRV_RX8581=m\n# CONFIG_RTC_DRV_RX8025 is not set\nCONFIG_RTC_DRV_EM3027=y\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\nCONFIG_RTC_DRV_S5M=m\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\n# CONFIG_RTC_DRV_DS3232 is not set\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_CMOS is not set\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\nCONFIG_RTC_DRV_DA9063=m\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_OPTEE is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n# CONFIG_RTC_DRV_CROS_EC is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\nCONFIG_RTC_DRV_PL031=y\n# CONFIG_RTC_DRV_CADENCE is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\n# CONFIG_RTC_DRV_PM8XXX is not set\n# CONFIG_RTC_DRV_R7301 is not set\nCONFIG_RTC_DRV_CPCAP=m\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_VIRTUAL_CHANNELS=y\nCONFIG_DMA_OF=y\n# CONFIG_ALTERA_MSGDMA is not set\n# CONFIG_AMBA_PL08X is not set\n# CONFIG_DW_AXI_DMAC is not set\nCONFIG_FSL_EDMA=y\n# CONFIG_FSL_QDMA is not set\n# CONFIG_INTEL_IDMA64 is not set\n# CONFIG_NBPFAXI_DMA is not set\nCONFIG_PL330_DMA=y\n# CONFIG_XILINX_ZYNQMP_DPDMA is not set\n# CONFIG_QCOM_HIDMA_MGMT is not set\n# CONFIG_QCOM_HIDMA is not set\nCONFIG_DW_DMAC_CORE=y\nCONFIG_DW_DMAC=y\n# CONFIG_SF_PDMA is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\n# CONFIG_UDMABUF is not set\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\nCONFIG_DMABUF_HEAPS=y\n# CONFIG_DMABUF_SYSFS_STATS is not set\nCONFIG_DMABUF_HEAPS_SYSTEM=y\nCONFIG_DMABUF_HEAPS_CMA=y\n# end of DMABUF options\n\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\nCONFIG_VIRTIO_ANCHOR=y\nCONFIG_VIRTIO=y\nCONFIG_VIRTIO_MENU=y\n# CONFIG_VIRTIO_BALLOON is not set\n# CONFIG_VIRTIO_INPUT is not set\nCONFIG_VIRTIO_MMIO=y\n# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set\n# CONFIG_VDPA is not set\nCONFIG_VHOST_MENU=y\n# CONFIG_VHOST_NET is not set\n# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# end of Microsoft Hyper-V guest support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_RTLLIB is not set\nCONFIG_RTL8723BS=m\n# CONFIG_R8712U is not set\nCONFIG_R8188EU=m\n# CONFIG_VT6656 is not set\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16240 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7816 is not set\n# end of Analog to digital converters\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n# end of Analog digital bi-direction converters\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n# end of Direct Digital Synthesis\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n# end of Network Analyzer, Impedance Converters\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7854 is not set\n# end of Active energy metering IC\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S1210 is not set\n# end of Resolver to digital converters\n# end of IIO staging drivers\n\nCONFIG_STAGING_MEDIA=y\n# CONFIG_VIDEO_MAX96712 is not set\nCONFIG_VIDEO_ROCKCHIP_VDEC=m\nCONFIG_STAGING_MEDIA_DEPRECATED=y\n# CONFIG_VIDEO_CPIA2 is not set\n# CONFIG_VIDEO_STKWEBCAM is not set\nCONFIG_VIDEO_TM6000=m\nCONFIG_VIDEO_TM6000_ALSA=m\nCONFIG_VIDEO_TM6000_DVB=m\n# CONFIG_USB_ZR364XX is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_KS7010 is not set\n# CONFIG_PI433 is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_FIELDBUS_DEV is not set\n# CONFIG_GOLDFISH is not set\nCONFIG_CHROME_PLATFORMS=y\nCONFIG_CROS_EC=m\n# CONFIG_CROS_EC_I2C is not set\n# CONFIG_CROS_EC_RPMSG is not set\n# CONFIG_CROS_EC_SPI is not set\nCONFIG_CROS_EC_PROTO=y\n# CONFIG_CROS_KBD_LED_BACKLIGHT is not set\nCONFIG_CROS_EC_CHARDEV=m\nCONFIG_CROS_EC_LIGHTBAR=m\nCONFIG_CROS_EC_VBC=m\nCONFIG_CROS_EC_DEBUGFS=m\nCONFIG_CROS_EC_SENSORHUB=m\nCONFIG_CROS_EC_SYSFS=m\nCONFIG_CROS_USBPD_NOTIFY=m\n# CONFIG_MELLANOX_PLATFORM is not set\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Clock driver for ARM Reference designs\n#\n# CONFIG_CLK_ICST is not set\n# CONFIG_CLK_SP810 is not set\n# end of Clock driver for ARM Reference designs\n\n# CONFIG_LMK04832 is not set\nCONFIG_COMMON_CLK_MAX77686=y\n# CONFIG_COMMON_CLK_MAX9485 is not set\nCONFIG_COMMON_CLK_RK808=y\nCONFIG_COMMON_CLK_SCMI=m\nCONFIG_COMMON_CLK_SCPI=m\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\nCONFIG_COMMON_CLK_S2MPS11=m\n# CONFIG_COMMON_CLK_AXI_CLKGEN is not set\n# CONFIG_COMMON_CLK_PALMAS is not set\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_RS9_PCIE is not set\n# CONFIG_COMMON_CLK_VC5 is not set\n# CONFIG_COMMON_CLK_VC7 is not set\n# CONFIG_COMMON_CLK_FIXED_MMIO is not set\nCONFIG_COMMON_CLK_ROCKCHIP=y\n# CONFIG_CLK_RV110X is not set\n# CONFIG_CLK_RV1126 is not set\n# CONFIG_CLK_RK3036 is not set\n# CONFIG_CLK_RK312X is not set\n# CONFIG_CLK_RK3188 is not set\n# CONFIG_CLK_RK322X is not set\nCONFIG_CLK_RK3288=y\n# CONFIG_XILINX_VCU is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\n# CONFIG_HWSPINLOCK is not set\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\nCONFIG_CLKSRC_MMIO=y\nCONFIG_DW_APB_TIMER=y\nCONFIG_DW_APB_TIMER_OF=y\nCONFIG_ROCKCHIP_TIMER=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_ARM_GLOBAL_TIMER=y\nCONFIG_ARM_GT_INITIAL_PRESCALER_VAL=1\nCONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK=y\n# CONFIG_MICROCHIP_PIT64B is not set\n# end of Clock Source drivers\n\nCONFIG_MAILBOX=y\nCONFIG_ARM_MHU=m\n# CONFIG_ARM_MHU_V2 is not set\nCONFIG_PLATFORM_MHU=m\n# CONFIG_PL320_MBOX is not set\nCONFIG_ROCKCHIP_MBOX=y\n# CONFIG_ALTERA_MBOX is not set\n# CONFIG_MAILBOX_TEST is not set\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\nCONFIG_IOMMU_IO_PGTABLE=y\nCONFIG_IOMMU_IO_PGTABLE_LPAE=y\n# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set\n# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set\n# end of Generic IOMMU Pagetable Support\n\n# CONFIG_IOMMU_DEBUGFS is not set\nCONFIG_IOMMU_DEFAULT_DMA_STRICT=y\n# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set\n# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set\nCONFIG_OF_IOMMU=y\nCONFIG_ROCKCHIP_IOMMU=y\n# CONFIG_ARM_SMMU is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\nCONFIG_RPMSG=m\n# CONFIG_RPMSG_CHAR is not set\n# CONFIG_RPMSG_CTRL is not set\nCONFIG_RPMSG_NS=m\n# CONFIG_RPMSG_QCOM_GLINK_RPM is not set\nCONFIG_RPMSG_VIRTIO=m\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\n# CONFIG_SOC_BRCMSTB is not set\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# CONFIG_QUICC_ENGINE is not set\n# CONFIG_FSL_RCPM is not set\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# fujitsu SoC drivers\n#\n# end of fujitsu SoC drivers\n\n#\n# i.MX SoC drivers\n#\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# CONFIG_LITEX_SOC_CONTROLLER is not set\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# end of Qualcomm SoC drivers\n\nCONFIG_ROCKCHIP_GRF=y\nCONFIG_ROCKCHIP_IODOMAIN=y\nCONFIG_ROCKCHIP_PM_DOMAINS=y\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y\nCONFIG_DEVFREQ_GOV_PERFORMANCE=y\nCONFIG_DEVFREQ_GOV_POWERSAVE=y\nCONFIG_DEVFREQ_GOV_USERSPACE=y\nCONFIG_DEVFREQ_GOV_PASSIVE=y\n\n#\n# DEVFREQ Drivers\n#\n# CONFIG_ARM_RK3399_DMC_DEVFREQ is not set\nCONFIG_PM_DEVFREQ_EVENT=y\n# CONFIG_DEVFREQ_EVENT_ROCKCHIP_DFI is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_FSA9480 is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX14577 is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_MAX77693 is not set\n# CONFIG_EXTCON_MAX8997 is not set\n# CONFIG_EXTCON_PALMAS is not set\n# CONFIG_EXTCON_PTN5150 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\n# CONFIG_EXTCON_USB_GPIO is not set\n# CONFIG_EXTCON_USBC_CROS_EC is not set\n# CONFIG_MEMORY is not set\nCONFIG_IIO=y\nCONFIG_IIO_BUFFER=y\nCONFIG_IIO_BUFFER_CB=m\n# CONFIG_IIO_BUFFER_DMA is not set\n# CONFIG_IIO_BUFFER_DMAENGINE is not set\n# CONFIG_IIO_BUFFER_HW_CONSUMER is not set\nCONFIG_IIO_KFIFO_BUF=y\nCONFIG_IIO_TRIGGERED_BUFFER=y\nCONFIG_IIO_CONFIGFS=y\nCONFIG_IIO_TRIGGER=y\nCONFIG_IIO_CONSUMERS_PER_TRIGGER=2\n# CONFIG_IIO_SW_DEVICE is not set\nCONFIG_IIO_SW_TRIGGER=y\n# CONFIG_IIO_TRIGGERED_EVENT is not set\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADXL313_I2C is not set\n# CONFIG_ADXL313_SPI is not set\n# CONFIG_ADXL355_I2C is not set\n# CONFIG_ADXL355_SPI is not set\n# CONFIG_ADXL367_SPI is not set\n# CONFIG_ADXL367_I2C is not set\n# CONFIG_ADXL372_SPI is not set\n# CONFIG_ADXL372_I2C is not set\n# CONFIG_BMA180 is not set\n# CONFIG_BMA220 is not set\n# CONFIG_BMA400 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_BMI088_ACCEL is not set\n# CONFIG_DA280 is not set\n# CONFIG_DA311 is not set\n# CONFIG_DMARD06 is not set\n# CONFIG_DMARD09 is not set\n# CONFIG_DMARD10 is not set\n# CONFIG_FXLS8962AF_I2C is not set\n# CONFIG_FXLS8962AF_SPI is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MC3230 is not set\n# CONFIG_MMA7455_I2C is not set\n# CONFIG_MMA7455_SPI is not set\n# CONFIG_MMA7660 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MSA311 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_MXC6255 is not set\n# CONFIG_SCA3000 is not set\n# CONFIG_SCA3300 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7091R5 is not set\n# CONFIG_AD7124 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7266 is not set\n# CONFIG_AD7280 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7292 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7606_IFACE_PARALLEL is not set\n# CONFIG_AD7606_IFACE_SPI is not set\n# CONFIG_AD7766 is not set\n# CONFIG_AD7768_1 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD7949 is not set\n# CONFIG_AD799X is not set\n# CONFIG_ADI_AXI_ADC is not set\n# CONFIG_AXP20X_ADC is not set\n# CONFIG_AXP288_ADC is not set\n# CONFIG_CC10001_ADC is not set\nCONFIG_CPCAP_ADC=m\n# CONFIG_ENVELOPE_DETECTOR is not set\n# CONFIG_HI8435 is not set\n# CONFIG_HX711 is not set\n# CONFIG_INA2XX_ADC is not set\n# CONFIG_LTC2471 is not set\n# CONFIG_LTC2485 is not set\n# CONFIG_LTC2496 is not set\n# CONFIG_LTC2497 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX11100 is not set\n# CONFIG_MAX1118 is not set\n# CONFIG_MAX11205 is not set\n# CONFIG_MAX1241 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MAX9611 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_MCP3911 is not set\n# CONFIG_NAU7802 is not set\n# CONFIG_PALMAS_GPADC is not set\n# CONFIG_QCOM_PM8XXX_XOADC is not set\n# CONFIG_QCOM_SPMI_IADC is not set\n# CONFIG_QCOM_SPMI_VADC is not set\n# CONFIG_QCOM_SPMI_ADC5 is not set\n# CONFIG_RN5T618_ADC is not set\nCONFIG_ROCKCHIP_SARADC=y\n# CONFIG_RICHTEK_RTQ6056 is not set\n# CONFIG_SD_ADC_MODULATOR is not set\n# CONFIG_STMPE_ADC is not set\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC0832 is not set\n# CONFIG_TI_ADC084S021 is not set\n# CONFIG_TI_ADC12138 is not set\n# CONFIG_TI_ADC108S102 is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_TI_ADC161S626 is not set\n# CONFIG_TI_ADS1015 is not set\n# CONFIG_TI_ADS7950 is not set\n# CONFIG_TI_ADS8344 is not set\n# CONFIG_TI_ADS8688 is not set\n# CONFIG_TI_ADS124S08 is not set\n# CONFIG_TI_ADS131E08 is not set\n# CONFIG_TI_TLC4541 is not set\n# CONFIG_TI_TSC2046 is not set\nCONFIG_VF610_ADC=m\n# CONFIG_XILINX_XADC is not set\n# end of Analog to digital converters\n\n#\n# Analog to digital and digital to analog converters\n#\n# CONFIG_AD74413R is not set\n# end of Analog to digital and digital to analog converters\n\n#\n# Analog Front Ends\n#\n# CONFIG_IIO_RESCALE is not set\n# end of Analog Front Ends\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n# CONFIG_ADA4250 is not set\n# CONFIG_HMC425 is not set\n# end of Amplifiers\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7746 is not set\n# end of Capacitance to digital converters\n\n#\n# Chemical Sensors\n#\n# CONFIG_ATLAS_PH_SENSOR is not set\n# CONFIG_ATLAS_EZO_SENSOR is not set\n# CONFIG_BME680 is not set\n# CONFIG_CCS811 is not set\n# CONFIG_IAQCORE is not set\n# CONFIG_PMS7003 is not set\n# CONFIG_SCD30_CORE is not set\n# CONFIG_SCD4X is not set\n# CONFIG_SENSIRION_SGP30 is not set\n# CONFIG_SENSIRION_SGP40 is not set\n# CONFIG_SPS30_I2C is not set\n# CONFIG_SPS30_SERIAL is not set\n# CONFIG_SENSEAIR_SUNRISE_CO2 is not set\n# CONFIG_VZ89X is not set\n# end of Chemical Sensors\n\n# CONFIG_IIO_CROS_EC_SENSORS_CORE is not set\n\n#\n# Hid Sensor IIO Common\n#\n# end of Hid Sensor IIO Common\n\n#\n# IIO SCMI Sensors\n#\n# CONFIG_IIO_SCMI is not set\n# end of IIO SCMI Sensors\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n# end of SSP Sensor Common\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD3552R is not set\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5592R is not set\n# CONFIG_AD5593R is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_LTC2688 is not set\n# CONFIG_AD5686_SPI is not set\n# CONFIG_AD5696_I2C is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5758 is not set\n# CONFIG_AD5761 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5766 is not set\n# CONFIG_AD5770R is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7293 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_AD8801 is not set\n# CONFIG_DPOT_DAC is not set\n# CONFIG_DS4424 is not set\n# CONFIG_LTC1660 is not set\n# CONFIG_LTC2632 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n# CONFIG_TI_DAC082S085 is not set\n# CONFIG_TI_DAC5571 is not set\n# CONFIG_TI_DAC7311 is not set\n# CONFIG_TI_DAC7612 is not set\n# CONFIG_VF610_DAC is not set\n# end of Digital to analog converters\n\n#\n# IIO dummy driver\n#\n# end of IIO dummy driver\n\n#\n# Filters\n#\n# end of Filters\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n# end of Clock Generator/Distribution\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n# CONFIG_ADF4371 is not set\n# CONFIG_ADMV1013 is not set\n# CONFIG_ADMV4420 is not set\n# CONFIG_ADRF6780 is not set\n# end of Phase-Locked Loop (PLL) frequency synthesizers\n# end of Frequency Synthesizers DDS/PLL\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS290 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_FXAS21002C is not set\nCONFIG_MPU3050=y\nCONFIG_MPU3050_I2C=y\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n# end of Digital gyroscope sensors\n\n#\n# Health Sensors\n#\n\n#\n# Heart Rate Monitors\n#\n# CONFIG_AFE4403 is not set\n# CONFIG_AFE4404 is not set\n# CONFIG_MAX30100 is not set\n# CONFIG_MAX30102 is not set\n# end of Heart Rate Monitors\n# end of Health Sensors\n\n#\n# Humidity sensors\n#\n# CONFIG_AM2315 is not set\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HDC2010 is not set\n# CONFIG_HTS221 is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n# end of Humidity sensors\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16460 is not set\n# CONFIG_ADIS16475 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_BMI160_I2C is not set\n# CONFIG_BMI160_SPI is not set\n# CONFIG_BOSCH_BNO055_SERIAL is not set\n# CONFIG_BOSCH_BNO055_I2C is not set\n# CONFIG_FXOS8700_I2C is not set\n# CONFIG_FXOS8700_SPI is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_ICM42600_I2C is not set\n# CONFIG_INV_ICM42600_SPI is not set\n# CONFIG_INV_MPU6050_I2C is not set\n# CONFIG_INV_MPU6050_SPI is not set\n# CONFIG_IIO_ST_LSM6DSX is not set\n# CONFIG_IIO_ST_LSM9DS0 is not set\n# end of Inertial measurement units\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_ADUX1020 is not set\n# CONFIG_AL3010 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_AS73211 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_BH1780 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM3605 is not set\nCONFIG_CM36651=m\n# CONFIG_GP2AP002 is not set\n# CONFIG_GP2AP020A00F is not set\nCONFIG_SENSORS_ISL29018=y\nCONFIG_SENSORS_ISL29028=y\n# CONFIG_ISL29125 is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_LTRF216A is not set\n# CONFIG_LV0104CS is not set\n# CONFIG_MAX44000 is not set\n# CONFIG_MAX44009 is not set\n# CONFIG_NOA1305 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_SI1133 is not set\n# CONFIG_SI1145 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_ST_UVIS25 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\n# CONFIG_SENSORS_TSL2563 is not set\n# CONFIG_TSL2583 is not set\n# CONFIG_TSL2591 is not set\n# CONFIG_TSL2772 is not set\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VCNL4035 is not set\n# CONFIG_VEML6030 is not set\n# CONFIG_VEML6070 is not set\n# CONFIG_VL6180 is not set\n# CONFIG_ZOPT2201 is not set\n# end of Light sensors\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8974 is not set\nCONFIG_AK8975=y\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN_I2C is not set\n# CONFIG_BMC150_MAGN_SPI is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n# CONFIG_SENSORS_RM3100_I2C is not set\n# CONFIG_SENSORS_RM3100_SPI is not set\n# CONFIG_YAMAHA_YAS530 is not set\n# end of Magnetometer sensors\n\n#\n# Multiplexers\n#\n# CONFIG_IIO_MUX is not set\n# end of Multiplexers\n\n#\n# Inclinometer sensors\n#\n# end of Inclinometer sensors\n\n#\n# Triggers - standalone\n#\nCONFIG_IIO_HRTIMER_TRIGGER=y\n# CONFIG_IIO_INTERRUPT_TRIGGER is not set\n# CONFIG_IIO_TIGHTLOOP_TRIGGER is not set\n# CONFIG_IIO_SYSFS_TRIGGER is not set\n# end of Triggers - standalone\n\n#\n# Linear and angular position sensors\n#\n# end of Linear and angular position sensors\n\n#\n# Digital potentiometers\n#\n# CONFIG_AD5110 is not set\n# CONFIG_AD5272 is not set\n# CONFIG_DS1803 is not set\n# CONFIG_MAX5432 is not set\n# CONFIG_MAX5481 is not set\n# CONFIG_MAX5487 is not set\n# CONFIG_MCP4018 is not set\n# CONFIG_MCP4131 is not set\n# CONFIG_MCP4531 is not set\n# CONFIG_MCP41010 is not set\n# CONFIG_TPL0102 is not set\n# end of Digital potentiometers\n\n#\n# Digital potentiostats\n#\n# CONFIG_LMP91000 is not set\n# end of Digital potentiostats\n\n#\n# Pressure sensors\n#\n# CONFIG_ABP060MG is not set\n# CONFIG_BMP280 is not set\n# CONFIG_DLHL60D is not set\n# CONFIG_DPS310 is not set\n# CONFIG_HP03 is not set\n# CONFIG_ICP10100 is not set\n# CONFIG_MPL115_I2C is not set\n# CONFIG_MPL115_SPI is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n# CONFIG_HP206C is not set\n# CONFIG_ZPA2326 is not set\n# end of Pressure sensors\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n# end of Lightning sensors\n\n#\n# Proximity and distance sensors\n#\n# CONFIG_CROS_EC_MKBP_PROXIMITY is not set\n# CONFIG_ISL29501 is not set\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_MB1232 is not set\n# CONFIG_PING is not set\n# CONFIG_RFD77402 is not set\n# CONFIG_SRF04 is not set\n# CONFIG_SX9310 is not set\n# CONFIG_SX9324 is not set\n# CONFIG_SX9360 is not set\n# CONFIG_SX9500 is not set\n# CONFIG_SRF08 is not set\n# CONFIG_VCNL3020 is not set\n# CONFIG_VL53L0X_I2C is not set\n# end of Proximity and distance sensors\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1200 is not set\n# end of Resolver to digital converters\n\n#\n# Temperature sensors\n#\n# CONFIG_LTC2983 is not set\n# CONFIG_MAXIM_THERMOCOUPLE is not set\n# CONFIG_MLX90614 is not set\n# CONFIG_MLX90632 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TMP007 is not set\n# CONFIG_TMP117 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\n# CONFIG_MAX31856 is not set\n# CONFIG_MAX31865 is not set\n# end of Temperature sensors\n\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_DEBUG is not set\nCONFIG_PWM_ATMEL_HLCDC_PWM=m\n# CONFIG_PWM_ATMEL_TCB is not set\n# CONFIG_PWM_CLK is not set\n# CONFIG_PWM_CROS_EC is not set\nCONFIG_PWM_FSL_FTM=m\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_PWM_ROCKCHIP=y\n# CONFIG_PWM_STMPE is not set\n# CONFIG_PWM_XILINX is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\n# CONFIG_AL_FIC is not set\n# CONFIG_XILINX_INTC is not set\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\nCONFIG_ARCH_HAS_RESET_CONTROLLER=y\nCONFIG_RESET_CONTROLLER=y\nCONFIG_RESET_SCMI=y\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_RESET_TI_TPS380X is not set\n\n#\n# PHY Subsystem\n#\nCONFIG_GENERIC_PHY=y\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\n\n#\n# PHY drivers for Broadcom platforms\n#\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# end of PHY drivers for Broadcom platforms\n\n# CONFIG_PHY_CADENCE_TORRENT is not set\n# CONFIG_PHY_CADENCE_DPHY is not set\n# CONFIG_PHY_CADENCE_DPHY_RX is not set\n# CONFIG_PHY_CADENCE_SIERRA is not set\n# CONFIG_PHY_CADENCE_SALVO is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_LAN966X_SERDES is not set\n# CONFIG_PHY_CPCAP_USB is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\n# CONFIG_PHY_OCELOT_SERDES is not set\n# CONFIG_PHY_QCOM_USB_HS is not set\n# CONFIG_PHY_QCOM_USB_HSIC is not set\nCONFIG_PHY_ROCKCHIP_DP=m\n# CONFIG_PHY_ROCKCHIP_DPHY_RX0 is not set\nCONFIG_PHY_ROCKCHIP_EMMC=m\n# CONFIG_PHY_ROCKCHIP_INNO_HDMI is not set\nCONFIG_PHY_ROCKCHIP_INNO_USB2=m\n# CONFIG_PHY_ROCKCHIP_INNO_CSIDPHY is not set\n# CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY is not set\n# CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY is not set\n# CONFIG_PHY_ROCKCHIP_PCIE is not set\n# CONFIG_PHY_ROCKCHIP_SNPS_PCIE3 is not set\n# CONFIG_PHY_ROCKCHIP_TYPEC is not set\nCONFIG_PHY_ROCKCHIP_USB=y\n# CONFIG_PHY_SAMSUNG_USB2 is not set\n# CONFIG_PHY_TUSB1210 is not set\n# end of PHY Subsystem\n\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\nCONFIG_ARM_PMU=y\n# end of Performance monitor support\n\n# CONFIG_RAS is not set\n\n#\n# Android\n#\n# CONFIG_ANDROID_BINDER_IPC is not set\n# end of Android\n\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\n# CONFIG_NVMEM_RMEM is not set\nCONFIG_NVMEM_ROCKCHIP_EFUSE=y\nCONFIG_NVMEM_ROCKCHIP_OTP=m\n# CONFIG_NVMEM_SPMI_SDAM is not set\nCONFIG_NVMEM_U_BOOT_ENV=m\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\nCONFIG_TEE=y\nCONFIG_OPTEE=m\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\n# CONFIG_PECI is not set\n# CONFIG_HTE is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_VALIDATE_FS_PARSER=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\nCONFIG_XFS_SUPPORT_V4=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\nCONFIG_F2FS_FS=y\nCONFIG_F2FS_STAT_FS=y\n# CONFIG_F2FS_FS_XATTR is not set\nCONFIG_F2FS_CHECK_FS=y\n# CONFIG_F2FS_FAULT_INJECTION is not set\n# CONFIG_F2FS_FS_COMPRESSION is not set\nCONFIG_F2FS_IOSTAT=y\n# CONFIG_F2FS_UNFAIR_RWSEM is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\nCONFIG_QUOTA=y\n# CONFIG_QUOTA_NETLINK_INTERFACE is not set\nCONFIG_PRINT_QUOTA_WARNING=y\n# CONFIG_QUOTA_DEBUG is not set\n# CONFIG_QFMT_V1 is not set\n# CONFIG_QFMT_V2 is not set\nCONFIG_QUOTACTL=y\nCONFIG_AUTOFS4_FS=y\nCONFIG_AUTOFS_FS=y\nCONFIG_FUSE_FS=m\nCONFIG_CUSE=m\n# CONFIG_VIRTIO_FS is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n\n#\n# Caches\n#\nCONFIG_NETFS_SUPPORT=y\n# CONFIG_NETFS_STATS is not set\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_CACHEFILES is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=y\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=m\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=m\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\nCONFIG_PROC_CHILDREN=y\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\nCONFIG_MEMFD_CREATE=y\nCONFIG_CONFIGFS_FS=y\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\nCONFIG_HFS_FS=y\nCONFIG_HFSPLUS_FS=y\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_JFFS2_FS is not set\n# CONFIG_UBIFS_FS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\nCONFIG_SQUASHFS_FILE_CACHE=y\n# CONFIG_SQUASHFS_FILE_DIRECT is not set\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\nCONFIG_PSTORE=y\nCONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240\nCONFIG_PSTORE_DEFLATE_COMPRESS=y\n# CONFIG_PSTORE_LZO_COMPRESS is not set\n# CONFIG_PSTORE_LZ4_COMPRESS is not set\n# CONFIG_PSTORE_LZ4HC_COMPRESS is not set\n# CONFIG_PSTORE_842_COMPRESS is not set\n# CONFIG_PSTORE_ZSTD_COMPRESS is not set\nCONFIG_PSTORE_COMPRESS=y\nCONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y\nCONFIG_PSTORE_COMPRESS_DEFAULT=\"deflate\"\nCONFIG_PSTORE_CONSOLE=y\nCONFIG_PSTORE_PMSG=y\nCONFIG_PSTORE_RAM=y\n# CONFIG_PSTORE_BLK is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EROFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\n# CONFIG_NFS_SWAP is not set\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\nCONFIG_NFS_V4_1_MIGRATION=y\nCONFIG_ROOT_NFS=y\nCONFIG_NFS_FSCACHE=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFS_DISABLE_UDP_SUPPORT=y\n# CONFIG_NFS_V4_2_READ_PLUS is not set\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_COMMON=y\nCONFIG_NFS_V4_2_SSC_HELPER=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS2=y\nCONFIG_CIFS_ALLOW_INSECURE_LEGACY=y\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\nCONFIG_CIFS_DEBUG=y\n# CONFIG_CIFS_DEBUG2 is not set\n# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\n# CONFIG_CIFS_SWN_UPCALL is not set\nCONFIG_CIFS_FSCACHE=y\n# CONFIG_CIFS_ROOT is not set\n# CONFIG_SMB_SERVER is not set\nCONFIG_SMBFS=y\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_KEYS_REQUEST_CACHE is not set\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\nCONFIG_KEY_DH_OPERATIONS=y\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY is not set\n# CONFIG_SECURITYFS is not set\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_LSM=\"yama,loadpin,safesetid,integrity\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n\nCONFIG_RANDSTRUCT_NONE=y\n# CONFIG_RANDSTRUCT_FULL is not set\n# CONFIG_RANDSTRUCT_PERFORMANCE is not set\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\nCONFIG_CRYPTO_USER=m\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_CRYPTD=y\nCONFIG_CRYPTO_AUTHENC=y\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_SIMD=y\nCONFIG_CRYPTO_ENGINE=m\n# end of Crypto core or helper\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_DH=y\n# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set\nCONFIG_CRYPTO_ECC=m\nCONFIG_CRYPTO_ECDH=m\n# CONFIG_CRYPTO_ECDSA is not set\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\nCONFIG_CRYPTO_CURVE25519=m\n# end of Public-key cryptography\n\n#\n# Block ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\n# CONFIG_CRYPTO_ARIA is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\n# CONFIG_CRYPTO_SM4_GENERIC is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n# end of Block ciphers\n\n#\n# Length-preserving ciphers and modes\n#\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_ARC4 is not set\n# CONFIG_CRYPTO_CHACHA20 is not set\nCONFIG_CRYPTO_CBC=y\n# CONFIG_CRYPTO_CFB is not set\nCONFIG_CRYPTO_CTR=y\n# CONFIG_CRYPTO_CTS is not set\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_HCTR2 is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_OFB is not set\n# CONFIG_CRYPTO_PCBC is not set\n# CONFIG_CRYPTO_XTS is not set\nCONFIG_CRYPTO_NHPOLY1305=y\n# end of Length-preserving ciphers and modes\n\n#\n# AEAD (authenticated encryption with associated data) ciphers\n#\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\n# CONFIG_CRYPTO_ESSIV is not set\n# end of AEAD (authenticated encryption with associated data) ciphers\n\n#\n# Hashes, digests, and MACs\n#\nCONFIG_CRYPTO_BLAKE2B=y\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\n# CONFIG_CRYPTO_POLY1305 is not set\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\n# CONFIG_CRYPTO_SM3_GENERIC is not set\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_VMAC is not set\n# CONFIG_CRYPTO_WP512 is not set\n# CONFIG_CRYPTO_XCBC is not set\nCONFIG_CRYPTO_XXHASH=m\n# end of Hashes, digests, and MACs\n\n#\n# CRCs (cyclic redundancy checks)\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=y\n# CONFIG_CRYPTO_CRCT10DIF is not set\n# end of CRCs (cyclic redundancy checks)\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=y\nCONFIG_CRYPTO_LZO=y\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\nCONFIG_CRYPTO_ZSTD=y\n# end of Compression\n\n#\n# Random number generation\n#\n# CONFIG_CRYPTO_ANSI_CPRNG is not set\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_KDF800108_CTR=y\n# end of Random number generation\n\n#\n# Userspace interface\n#\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\nCONFIG_CRYPTO_USER_API_RNG=m\n# CONFIG_CRYPTO_USER_API_RNG_CAVP is not set\nCONFIG_CRYPTO_USER_API_AEAD=m\nCONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y\n# CONFIG_CRYPTO_STATS is not set\n# end of Userspace interface\n\nCONFIG_CRYPTO_HASH_INFO=y\n\n#\n# Accelerated Cryptographic Algorithms for CPU (arm)\n#\nCONFIG_CRYPTO_CURVE25519_NEON=y\n# CONFIG_CRYPTO_GHASH_ARM_CE is not set\nCONFIG_CRYPTO_NHPOLY1305_NEON=y\nCONFIG_CRYPTO_POLY1305_ARM=y\nCONFIG_CRYPTO_BLAKE2S_ARM=y\nCONFIG_CRYPTO_BLAKE2B_NEON=y\nCONFIG_CRYPTO_SHA1_ARM=y\nCONFIG_CRYPTO_SHA1_ARM_NEON=y\n# CONFIG_CRYPTO_SHA1_ARM_CE is not set\n# CONFIG_CRYPTO_SHA2_ARM_CE is not set\nCONFIG_CRYPTO_SHA256_ARM=y\nCONFIG_CRYPTO_SHA512_ARM=y\nCONFIG_CRYPTO_AES_ARM=y\nCONFIG_CRYPTO_AES_ARM_BS=y\n# CONFIG_CRYPTO_AES_ARM_CE is not set\nCONFIG_CRYPTO_CHACHA20_NEON=y\nCONFIG_CRYPTO_CRC32_ARM_CE=y\n# end of Accelerated Cryptographic Algorithms for CPU (arm)\n\nCONFIG_CRYPTO_HW=y\n# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set\n# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set\n# CONFIG_CRYPTO_DEV_ROCKCHIP is not set\nCONFIG_CRYPTO_DEV_VIRTIO=m\n# CONFIG_CRYPTO_DEV_SAFEXCEL is not set\n# CONFIG_CRYPTO_DEV_CCREE is not set\n# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n# CONFIG_FIPS_SIGNATURE_SELFTEST is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\nCONFIG_RAID6_PQ_BENCHMARK=y\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_CORDIC=m\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_UTILS=y\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=m\nCONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CHACHA=m\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CURVE25519=y\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=y\nCONFIG_CRYPTO_LIB_CURVE25519=m\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_POLY1305_GENERIC=y\nCONFIG_CRYPTO_LIB_POLY1305=m\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=m\nCONFIG_CRYPTO_LIB_SHA1=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_CRC_CCITT=m\nCONFIG_CRC16=y\n# CONFIG_CRC_T10DIF is not set\n# CONFIG_CRC64_ROCKSOFT is not set\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC64 is not set\n# CONFIG_CRC4 is not set\n# CONFIG_CRC7 is not set\nCONFIG_LIBCRC32C=m\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=y\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMMON=y\nCONFIG_ZSTD_COMPRESS=y\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\nCONFIG_XZ_DEC_X86=y\nCONFIG_XZ_DEC_POWERPC=y\nCONFIG_XZ_DEC_IA64=y\nCONFIG_XZ_DEC_ARM=y\nCONFIG_XZ_DEC_ARMTHUMB=y\nCONFIG_XZ_DEC_SPARC=y\n# CONFIG_XZ_DEC_MICROLZMA is not set\nCONFIG_XZ_DEC_BCJ=y\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_ZSTD=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_REED_SOLOMON=y\nCONFIG_REED_SOLOMON_ENC8=y\nCONFIG_REED_SOLOMON_DEC8=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_DMA_OPS=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_DMA_DECLARE_COHERENT=y\nCONFIG_ARCH_HAS_SETUP_DMA_OPS=y\nCONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y\nCONFIG_DMA_NONCOHERENT_MMAP=y\nCONFIG_DMA_CMA=y\n# CONFIG_DMA_PERNUMA_CMA is not set\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=64\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\n# CONFIG_FORCE_NR_CPUS is not set\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_GENERIC_VDSO_32=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\nCONFIG_SG_POOL=y\nCONFIG_STACKDEPOT=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\n# CONFIG_STACKTRACE_BUILD_ID is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\nCONFIG_DYNAMIC_DEBUG_CORE=y\nCONFIG_SYMBOLIC_ERRNAME=y\nCONFIG_DEBUG_BUGVERBOSE=y\n# end of printk and dmesg options\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_DEBUG_INFO=y\nCONFIG_AS_HAS_NON_CONST_LEB128=y\n# CONFIG_DEBUG_INFO_NONE is not set\nCONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\n# CONFIG_DEBUG_INFO_REDUCED is not set\n# CONFIG_DEBUG_INFO_COMPRESSED is not set\n# CONFIG_DEBUG_INFO_SPLIT is not set\n# CONFIG_DEBUG_INFO_BTF is not set\n# CONFIG_GDB_SCRIPTS is not set\nCONFIG_FRAME_WARN=1024\n# CONFIG_STRIP_ASM_SYMS is not set\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\n# CONFIG_MAGIC_SYSRQ is not set\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_KCSAN_COMPILER=y\n# end of Generic Kernel Debugging Instruments\n\n#\n# Networking Debugging\n#\n# CONFIG_NET_DEV_REFCNT_TRACKER is not set\n# CONFIG_NET_NS_REFCNT_TRACKER is not set\n# CONFIG_DEBUG_NET is not set\n# end of Networking Debugging\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_PAGE_REF is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\n# CONFIG_DEBUG_WX is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SHRINKER_DEBUG is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\n# CONFIG_DEBUG_VM is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\nCONFIG_DEBUG_MEMORY_INIT=y\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\n# CONFIG_DEBUG_KMAP_LOCAL is not set\n# CONFIG_DEBUG_HIGHMEM is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\n# CONFIG_SOFTLOCKUP_DETECTOR is not set\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\nCONFIG_SCHED_DEBUG=y\nCONFIG_SCHED_INFO=y\n# CONFIG_SCHEDSTATS is not set\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_RWSEMS is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_DEBUG_MAPLE_TREE is not set\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\nCONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0\nCONFIG_RCU_TRACE=y\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_HAVE_BUILDTIME_MCOUNT_SORT=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_TRACING=y\nCONFIG_TRACING_SUPPORT=y\nCONFIG_FTRACE=y\n# CONFIG_BOOTTIME_TRACING is not set\n# CONFIG_FUNCTION_TRACER is not set\n# CONFIG_STACK_TRACER is not set\n# CONFIG_IRQSOFF_TRACER is not set\n# CONFIG_SCHED_TRACER is not set\n# CONFIG_HWLAT_TRACER is not set\n# CONFIG_OSNOISE_TRACER is not set\n# CONFIG_TIMERLAT_TRACER is not set\n# CONFIG_ENABLE_DEFAULT_TRACERS is not set\n# CONFIG_FTRACE_SYSCALLS is not set\n# CONFIG_TRACER_SNAPSHOT is not set\nCONFIG_BRANCH_PROFILE_NONE=y\n# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set\n# CONFIG_PROFILE_ALL_BRANCHES is not set\n# CONFIG_BLK_DEV_IO_TRACE is not set\nCONFIG_UPROBE_EVENTS=y\nCONFIG_BPF_EVENTS=y\nCONFIG_DYNAMIC_EVENTS=y\nCONFIG_PROBE_EVENTS=y\n# CONFIG_SYNTH_EVENTS is not set\n# CONFIG_HIST_TRIGGERS is not set\n# CONFIG_TRACE_EVENT_INJECT is not set\n# CONFIG_TRACEPOINT_BENCHMARK is not set\n# CONFIG_RING_BUFFER_BENCHMARK is not set\n# CONFIG_TRACE_EVAL_MAP_FILE is not set\n# CONFIG_RING_BUFFER_STARTUP_TEST is not set\n# CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is not set\n# CONFIG_PREEMPTIRQ_DELAY_TEST is not set\n# CONFIG_RV is not set\n# CONFIG_SAMPLES is not set\n# CONFIG_STRICT_DEVMEM is not set\n\n#\n# arm Debugging\n#\n# CONFIG_ARM_PTDUMP_DEBUGFS is not set\n# CONFIG_UNWINDER_FRAME_POINTER is not set\nCONFIG_UNWINDER_ARM=y\nCONFIG_ARM_UNWIND=y\n# CONFIG_DEBUG_USER is not set\n# CONFIG_DEBUG_LL is not set\nCONFIG_DEBUG_LL_INCLUDE=\"mach/debug-macro.S\"\nCONFIG_UNCOMPRESS_INCLUDE=\"debug/uncompress.h\"\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_CORESIGHT is not set\n# end of arm Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\nCONFIG_RUNTIME_TESTING_MENU=y\n# CONFIG_LKDTM is not set\n# CONFIG_TEST_MIN_HEAP is not set\n# CONFIG_TEST_DIV64 is not set\n# CONFIG_BACKTRACE_SELF_TEST is not set\n# CONFIG_TEST_REF_TRACKER is not set\n# CONFIG_RBTREE_TEST is not set\n# CONFIG_REED_SOLOMON_TEST is not set\n# CONFIG_INTERVAL_TREE_TEST is not set\n# CONFIG_PERCPU_TEST is not set\n# CONFIG_ATOMIC64_SELFTEST is not set\n# CONFIG_TEST_HEXDUMP is not set\n# CONFIG_STRING_SELFTEST is not set\n# CONFIG_TEST_STRING_HELPERS is not set\n# CONFIG_TEST_STRSCPY is not set\n# CONFIG_TEST_KSTRTOX is not set\n# CONFIG_TEST_PRINTF is not set\n# CONFIG_TEST_SCANF is not set\n# CONFIG_TEST_BITMAP is not set\n# CONFIG_TEST_UUID is not set\n# CONFIG_TEST_XARRAY is not set\n# CONFIG_TEST_MAPLE_TREE is not set\n# CONFIG_TEST_RHASHTABLE is not set\n# CONFIG_TEST_SIPHASH is not set\n# CONFIG_TEST_IDA is not set\n# CONFIG_TEST_LKM is not set\n# CONFIG_TEST_BITOPS is not set\n# CONFIG_TEST_VMALLOC is not set\n# CONFIG_TEST_USER_COPY is not set\n# CONFIG_TEST_BPF is not set\n# CONFIG_TEST_BLACKHOLE_DEV is not set\n# CONFIG_FIND_BIT_BENCHMARK is not set\n# CONFIG_TEST_FIRMWARE is not set\n# CONFIG_TEST_SYSCTL is not set\n# CONFIG_TEST_UDELAY is not set\n# CONFIG_TEST_STATIC_KEYS is not set\n# CONFIG_TEST_DYNAMIC_DEBUG is not set\n# CONFIG_TEST_KMOD is not set\n# CONFIG_TEST_MEMCAT_P is not set\n# CONFIG_TEST_MEMINIT is not set\n# CONFIG_TEST_FREE_PAGES is not set\nCONFIG_ARCH_USE_MEMTEST=y\n# CONFIG_MEMTEST is not set\n# end of Kernel Testing and Coverage\n\n#\n# Rust hacking\n#\n# end of Rust hacking\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/Rockchip/devices/RK3288/options",
    "content": "################################################################################\n# setup device defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      arm)\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a17\"\n        TARGET_FPU=\"neon-vfpv4\"\n        ;;\n    esac\n\n  # Kernel target\n    KERNEL_TARGET=\"zImage\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"\"\n    KERNEL_MAKE_EXTRACMD+=\" rk3288-miqi.dtb\"\n    KERNEL_MAKE_EXTRACMD+=\" rk3288-tinker.dtb\"\n    KERNEL_MAKE_EXTRACMD+=\" rk3288-tinker-s.dtb\"\n\n  # Mali GPU family\n    MALI_FAMILY=\"t760\"\n    GRAPHIC_DRIVERS=\"panfrost\"\n\n  # kernel serial console\n    EXTRA_CMDLINE=\"console=uart8250,mmio32,0xff690000 console=tty0 coherent_pool=2M cec.debounce_ms=5000\"\n\n  # set the addon project\n    ADDON_PROJECT=\"ARMv7\"\n"
  },
  {
    "path": "projects/Rockchip/devices/RK3328/README.md",
    "content": "# RK3328\n\nThis is a SoC device for RK3328\n\n**Build**\n\n* `PROJECT=Rockchip DEVICE=RK3328 ARCH=arm UBOOT_SYSTEM=a1 make image`\n* `PROJECT=Rockchip DEVICE=RK3328 ARCH=arm UBOOT_SYSTEM=roc-cc make image`\n* `PROJECT=Rockchip DEVICE=RK3328 ARCH=arm UBOOT_SYSTEM=rock64 make image`\n\n**How to use on an Android device**\n- Flash image to a sd-card\n- Insert sd-card into the device\n- Plug in power and LibreELEC should boot instead of Android\n- Remove sd-card from device to boot into Android\n"
  },
  {
    "path": "projects/Rockchip/devices/RK3328/linux/default/linux.aarch64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm64 6.1.63 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"aarch64-none-elf-gcc-12.2.0 (GCC) 12.2.0\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=120200\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23900\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23900\nCONFIG_LLD_VERSION=0\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_BUILD_SALT=\"\"\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_SYSVIPC_COMPAT=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\n# CONFIG_WATCH_QUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_IRQ_IPI=y\nCONFIG_GENERIC_MSI_IRQ=y\nCONFIG_GENERIC_MSI_IRQ_DOMAIN=y\nCONFIG_IRQ_MSI_IOMMU=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\nCONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_CONTEXT_TRACKING=y\nCONFIG_CONTEXT_TRACKING_IDLE=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\nCONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\nCONFIG_BPF_JIT=y\n# CONFIG_BPF_JIT_ALWAYS_ON is not set\nCONFIG_BPF_JIT_DEFAULT_ON=y\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# end of BPF subsystem\n\nCONFIG_PREEMPT_VOLUNTARY_BUILD=y\n# CONFIG_PREEMPT_NONE is not set\nCONFIG_PREEMPT_VOLUNTARY=y\n# CONFIG_PREEMPT is not set\n# CONFIG_PREEMPT_DYNAMIC is not set\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\nCONFIG_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_SCHED_AVG_IRQ=y\nCONFIG_SCHED_THERMAL_PRESSURE=y\nCONFIG_BSD_PROCESS_ACCT=y\nCONFIG_BSD_PROCESS_ACCT_V3=y\nCONFIG_TASKSTATS=y\nCONFIG_TASK_DELAY_ACCT=y\nCONFIG_TASK_XACCT=y\nCONFIG_TASK_IO_ACCOUNTING=y\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\n# end of RCU Subsystem\n\nCONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=17\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# CONFIG_UCLAMP_TASK is not set\n# end of Scheduler features\n\nCONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y\nCONFIG_CC_HAS_INT128=y\nCONFIG_CC_IMPLICIT_FALLTHROUGH=\"-Wimplicit-fallthrough=5\"\nCONFIG_GCC11_NO_ARRAY_BOUNDS=y\nCONFIG_CC_NO_ARRAY_BOUNDS=y\nCONFIG_ARCH_SUPPORTS_INT128=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\n# CONFIG_CGROUP_FAVOR_DYNMODS is not set\nCONFIG_MEMCG=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_BLK_CGROUP=y\nCONFIG_CGROUP_WRITEBACK=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\nCONFIG_CGROUP_PIDS=y\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_CGROUP_PERF=y\nCONFIG_CGROUP_BPF=y\n# CONFIG_CGROUP_MISC is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_TIME_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\nCONFIG_CHECKPOINT_RESTORE=y\nCONFIG_SCHED_AUTOGROUP=y\n# CONFIG_SYSFS_DEPRECATED is not set\n# CONFIG_RELAY is not set\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"@INITRAMFS_SOURCE@\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\n# CONFIG_RD_GZIP is not set\n# CONFIG_RD_BZIP2 is not set\n# CONFIG_RD_LZMA is not set\n# CONFIG_RD_XZ is not set\n# CONFIG_RD_LZO is not set\nCONFIG_RD_LZ4=y\nCONFIG_RD_ZSTD=y\nCONFIG_INITRAMFS_COMPRESSION_LZ4=y\n# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set\n# CONFIG_INITRAMFS_COMPRESSION_NONE is not set\n# CONFIG_BOOT_CONFIG is not set\nCONFIG_INITRAMFS_PRESERVE_MTIME=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\n# CONFIG_EXPERT is not set\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\nCONFIG_SYSFS_SYSCALL=y\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\nCONFIG_KALLSYMS_ALL=y\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_EMBEDDED is not set\nCONFIG_HAVE_PERF_EVENTS=y\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_SYSTEM_DATA_VERIFICATION=y\nCONFIG_PROFILING=y\n# end of General setup\n\nCONFIG_ARM64=y\nCONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_64BIT=y\nCONFIG_MMU=y\nCONFIG_ARM64_PAGE_SHIFT=12\nCONFIG_ARM64_CONT_PTE_SHIFT=4\nCONFIG_ARM64_CONT_PMD_SHIFT=4\nCONFIG_ARCH_MMAP_RND_BITS_MIN=18\nCONFIG_ARCH_MMAP_RND_BITS_MAX=33\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_NO_IOPORT_MAP=y\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_GENERIC_BUG=y\nCONFIG_GENERIC_BUG_RELATIVE_POINTERS=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CSUM=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y\nCONFIG_SMP=y\nCONFIG_KERNEL_MODE_NEON=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_PGTABLE_LEVELS=4\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_ARCH_PROC_KCORE_TEXT=y\n\n#\n# Platform selection\n#\n# CONFIG_ARCH_ACTIONS is not set\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_APPLE is not set\n# CONFIG_ARCH_BCM is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_BITMAIN is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_SPARX5 is not set\n# CONFIG_ARCH_K3 is not set\n# CONFIG_ARCH_LG1K is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_KEEMBAY is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_MESON is not set\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_NXP is not set\n# CONFIG_ARCH_NPCM is not set\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_REALTEK is not set\n# CONFIG_ARCH_RENESAS is not set\nCONFIG_ARCH_ROCKCHIP=y\n# CONFIG_ARCH_SEATTLE is not set\n# CONFIG_ARCH_INTEL_SOCFPGA is not set\n# CONFIG_ARCH_SYNQUACER is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_SPRD is not set\n# CONFIG_ARCH_THUNDER is not set\n# CONFIG_ARCH_THUNDER2 is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_VISCONTI is not set\n# CONFIG_ARCH_XGENE is not set\n# CONFIG_ARCH_ZYNQMP is not set\n# end of Platform selection\n\n#\n# Kernel Features\n#\n\n#\n# ARM errata workarounds via the alternatives framework\n#\n# CONFIG_AMPERE_ERRATUM_AC03_CPU_38 is not set\nCONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y\nCONFIG_ARM64_ERRATUM_826319=y\nCONFIG_ARM64_ERRATUM_827319=y\nCONFIG_ARM64_ERRATUM_824069=y\nCONFIG_ARM64_ERRATUM_819472=y\n# CONFIG_ARM64_ERRATUM_832075 is not set\n# CONFIG_ARM64_ERRATUM_1742098 is not set\nCONFIG_ARM64_ERRATUM_845719=y\nCONFIG_ARM64_ERRATUM_843419=y\nCONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y\n# CONFIG_ARM64_ERRATUM_1024718 is not set\n# CONFIG_ARM64_ERRATUM_1418040 is not set\n# CONFIG_ARM64_ERRATUM_1165522 is not set\n# CONFIG_ARM64_ERRATUM_1319367 is not set\n# CONFIG_ARM64_ERRATUM_1530923 is not set\n# CONFIG_ARM64_ERRATUM_2441007 is not set\n# CONFIG_ARM64_ERRATUM_1286807 is not set\n# CONFIG_ARM64_ERRATUM_1463225 is not set\n# CONFIG_ARM64_ERRATUM_1542419 is not set\n# CONFIG_ARM64_ERRATUM_1508412 is not set\n# CONFIG_ARM64_ERRATUM_2051678 is not set\n# CONFIG_ARM64_ERRATUM_2077057 is not set\n# CONFIG_ARM64_ERRATUM_2658417 is not set\n# CONFIG_ARM64_ERRATUM_2054223 is not set\n# CONFIG_ARM64_ERRATUM_2067961 is not set\n# CONFIG_ARM64_ERRATUM_2441009 is not set\n# CONFIG_ARM64_ERRATUM_2966298 is not set\n# CONFIG_CAVIUM_ERRATUM_22375 is not set\n# CONFIG_CAVIUM_ERRATUM_23154 is not set\n# CONFIG_CAVIUM_ERRATUM_27456 is not set\n# CONFIG_CAVIUM_ERRATUM_30115 is not set\n# CONFIG_CAVIUM_TX2_ERRATUM_219 is not set\n# CONFIG_FUJITSU_ERRATUM_010001 is not set\n# CONFIG_HISILICON_ERRATUM_161600802 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_1003 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_1009 is not set\n# CONFIG_QCOM_QDF2400_ERRATUM_0065 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_E1041 is not set\n# CONFIG_NVIDIA_CARMEL_CNP_ERRATUM is not set\n# CONFIG_SOCIONEXT_SYNQUACER_PREITS is not set\n# end of ARM errata workarounds via the alternatives framework\n\nCONFIG_ARM64_4K_PAGES=y\n# CONFIG_ARM64_16K_PAGES is not set\n# CONFIG_ARM64_64K_PAGES is not set\n# CONFIG_ARM64_VA_BITS_39 is not set\nCONFIG_ARM64_VA_BITS_48=y\nCONFIG_ARM64_VA_BITS=48\nCONFIG_ARM64_PA_BITS_48=y\nCONFIG_ARM64_PA_BITS=48\n# CONFIG_CPU_BIG_ENDIAN is not set\nCONFIG_CPU_LITTLE_ENDIAN=y\nCONFIG_SCHED_MC=y\n# CONFIG_SCHED_CLUSTER is not set\n# CONFIG_SCHED_SMT is not set\nCONFIG_NR_CPUS=4\nCONFIG_HOTPLUG_CPU=y\n# CONFIG_NUMA is not set\n# CONFIG_HZ_100 is not set\n# CONFIG_HZ_250 is not set\nCONFIG_HZ_300=y\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=300\nCONFIG_SCHED_HRTICK=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_CC_HAVE_SHADOW_CALL_STACK=y\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\n# CONFIG_KEXEC is not set\n# CONFIG_KEXEC_FILE is not set\n# CONFIG_CRASH_DUMP is not set\n# CONFIG_XEN is not set\nCONFIG_ARCH_FORCE_MAX_ORDER=11\nCONFIG_UNMAP_KERNEL_AT_EL0=y\nCONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y\nCONFIG_RODATA_FULL_DEFAULT_ENABLED=y\n# CONFIG_ARM64_SW_TTBR0_PAN is not set\nCONFIG_ARM64_TAGGED_ADDR_ABI=y\nCONFIG_COMPAT=y\nCONFIG_KUSER_HELPERS=y\n# CONFIG_COMPAT_ALIGNMENT_FIXUPS is not set\n# CONFIG_ARMV8_DEPRECATED is not set\n\n#\n# ARMv8.1 architectural features\n#\n# CONFIG_ARM64_HW_AFDBM is not set\n# CONFIG_ARM64_PAN is not set\nCONFIG_AS_HAS_LDAPR=y\nCONFIG_AS_HAS_LSE_ATOMICS=y\n# CONFIG_ARM64_USE_LSE_ATOMICS is not set\n# end of ARMv8.1 architectural features\n\n#\n# ARMv8.2 architectural features\n#\nCONFIG_AS_HAS_ARMV8_2=y\nCONFIG_AS_HAS_SHA3=y\n# CONFIG_ARM64_PMEM is not set\n# CONFIG_ARM64_RAS_EXTN is not set\n# CONFIG_ARM64_CNP is not set\n# end of ARMv8.2 architectural features\n\n#\n# ARMv8.3 architectural features\n#\n# CONFIG_ARM64_PTR_AUTH is not set\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET=y\nCONFIG_CC_HAS_SIGN_RETURN_ADDRESS=y\nCONFIG_AS_HAS_PAC=y\nCONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y\n# end of ARMv8.3 architectural features\n\n#\n# ARMv8.4 architectural features\n#\n# CONFIG_ARM64_AMU_EXTN is not set\nCONFIG_AS_HAS_ARMV8_4=y\n# CONFIG_ARM64_TLB_RANGE is not set\n# end of ARMv8.4 architectural features\n\n#\n# ARMv8.5 architectural features\n#\nCONFIG_AS_HAS_ARMV8_5=y\n# CONFIG_ARM64_BTI is not set\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI=y\n# CONFIG_ARM64_E0PD is not set\nCONFIG_ARM64_AS_HAS_MTE=y\n# end of ARMv8.5 architectural features\n\n#\n# ARMv8.7 architectural features\n#\n# end of ARMv8.7 architectural features\n\nCONFIG_ARM64_SVE=y\nCONFIG_ARM64_SME=y\nCONFIG_ARM64_MODULE_PLTS=y\n# CONFIG_ARM64_PSEUDO_NMI is not set\nCONFIG_RELOCATABLE=y\n# CONFIG_RANDOMIZE_BASE is not set\nCONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y\nCONFIG_STACKPROTECTOR_PER_TASK=y\nCONFIG_ARCH_NR_GPIO=0\n# end of Kernel Features\n\n#\n# Boot options\n#\nCONFIG_CMDLINE=\"\"\n# CONFIG_EFI is not set\n# end of Boot options\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_HIBERNATION is not set\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_USERSPACE_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\nCONFIG_PM=y\n# CONFIG_PM_DEBUG is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\nCONFIG_WQ_POWER_EFFICIENT_DEFAULT=y\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\n# CONFIG_ENERGY_MODEL is not set\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\n# end of Power management options\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\nCONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\nCONFIG_DT_IDLE_STATES=y\nCONFIG_DT_IDLE_GENPD=y\n\n#\n# ARM CPU Idle Drivers\n#\nCONFIG_ARM_PSCI_CPUIDLE=y\nCONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y\n# end of ARM CPU Idle Drivers\n# end of CPU Idle\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=m\nCONFIG_CPU_FREQ_GOV_USERSPACE=m\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\nCONFIG_CPU_FREQ_GOV_CONSERVATIVE=m\nCONFIG_CPU_FREQ_GOV_SCHEDUTIL=y\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\nCONFIG_CPUFREQ_DT_PLATDEV=y\nCONFIG_ARM_SCPI_CPUFREQ=y\n# end of CPU Frequency scaling\n# end of CPU Power Management\n\nCONFIG_HAVE_KVM=y\n# CONFIG_VIRTUALIZATION is not set\n\n#\n# General architecture-dependent options\n#\n# CONFIG_KPROBES is not set\nCONFIG_JUMP_LABEL=y\n# CONFIG_STATIC_KEYS_SELFTEST is not set\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_HAVE_IOREMAP_PROT=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y\nCONFIG_HAVE_FUNCTION_ERROR_INJECTION=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_KEEPINITRD=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_ARCH_HAS_SET_DIRECT_MAP=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_WANTS_NO_INSTR=y\nCONFIG_HAVE_ASM_MODVERSIONS=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y\nCONFIG_MMU_GATHER_TABLE_FREE=y\nCONFIG_MMU_GATHER_RCU_TABLE_FREE=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_HAVE_ALIGNED_STRUCT_PAGE=y\nCONFIG_HAVE_CMPXCHG_LOCAL=y\nCONFIG_HAVE_CMPXCHG_DOUBLE=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_ARCH_STACKLEAK=y\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_ARCH_SUPPORTS_SHADOW_CALL_STACK=y\n# CONFIG_SHADOW_CALL_STACK is not set\nCONFIG_ARCH_SUPPORTS_LTO_CLANG=y\nCONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y\nCONFIG_LTO_NONE=y\nCONFIG_ARCH_SUPPORTS_CFI_CLANG=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOVE_PUD=y\nCONFIG_HAVE_MOVE_PMD=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_HAVE_ARCH_HUGE_VMAP=y\nCONFIG_HAVE_ARCH_HUGE_VMALLOC=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_ARCH_MMAP_RND_BITS=18\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=11\nCONFIG_PAGE_SIZE_LESS_THAN_64KB=y\nCONFIG_PAGE_SIZE_LESS_THAN_256KB=y\nCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y\nCONFIG_RANDOMIZE_KSTACK_OFFSET=y\n# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\nCONFIG_HAVE_ARCH_COMPILER_H=y\nCONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_HAS_RELR=y\nCONFIG_HAVE_PREEMPT_DYNAMIC=y\nCONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y\nCONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y\nCONFIG_ARCH_HAVE_TRACE_MMIO_ACCESS=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\nCONFIG_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set\nCONFIG_MODVERSIONS=y\nCONFIG_ASM_MODVERSIONS=y\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/sbin/modprobe\"\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\n# CONFIG_BLOCK_LEGACY_AUTOLOAD is not set\nCONFIG_BLK_CGROUP_RWSTAT=y\nCONFIG_BLK_DEV_BSG_COMMON=y\n# CONFIG_BLK_DEV_BSGLIB is not set\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_DEV_ZONED is not set\nCONFIG_BLK_DEV_THROTTLING=y\n# CONFIG_BLK_DEV_THROTTLING_LOW is not set\n# CONFIG_BLK_WBT is not set\n# CONFIG_BLK_CGROUP_IOLATENCY is not set\n# CONFIG_BLK_CGROUP_IOCOST is not set\n# CONFIG_BLK_CGROUP_IOPRIO is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\nCONFIG_MAC_PARTITION=y\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\nCONFIG_LDM_PARTITION=y\n# CONFIG_LDM_DEBUG is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\n# CONFIG_CMDLINE_PARTITION is not set\n# end of Partition Types\n\nCONFIG_BLOCK_COMPAT=y\nCONFIG_BLK_MQ_VIRTIO=y\nCONFIG_BLK_PM=y\nCONFIG_BLOCK_HOLDER_DEPRECATED=y\nCONFIG_BLK_MQ_STACKING=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\n# CONFIG_IOSCHED_BFQ is not set\n# end of IO Schedulers\n\nCONFIG_ASN1=y\nCONFIG_ARCH_INLINE_SPIN_TRYLOCK=y\nCONFIG_ARCH_INLINE_SPIN_TRYLOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_LOCK=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_INLINE_READ_LOCK=y\nCONFIG_ARCH_INLINE_READ_LOCK_BH=y\nCONFIG_ARCH_INLINE_READ_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_READ_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_READ_UNLOCK=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_INLINE_WRITE_LOCK=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_BH=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE=y\nCONFIG_INLINE_SPIN_TRYLOCK=y\nCONFIG_INLINE_SPIN_TRYLOCK_BH=y\nCONFIG_INLINE_SPIN_LOCK=y\nCONFIG_INLINE_SPIN_LOCK_BH=y\nCONFIG_INLINE_SPIN_LOCK_IRQ=y\nCONFIG_INLINE_SPIN_LOCK_IRQSAVE=y\nCONFIG_INLINE_SPIN_UNLOCK_BH=y\nCONFIG_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE=y\nCONFIG_INLINE_READ_LOCK=y\nCONFIG_INLINE_READ_LOCK_BH=y\nCONFIG_INLINE_READ_LOCK_IRQ=y\nCONFIG_INLINE_READ_LOCK_IRQSAVE=y\nCONFIG_INLINE_READ_UNLOCK=y\nCONFIG_INLINE_READ_UNLOCK_BH=y\nCONFIG_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_INLINE_READ_UNLOCK_IRQRESTORE=y\nCONFIG_INLINE_WRITE_LOCK=y\nCONFIG_INLINE_WRITE_LOCK_BH=y\nCONFIG_INLINE_WRITE_LOCK_IRQ=y\nCONFIG_INLINE_WRITE_LOCK_IRQSAVE=y\nCONFIG_INLINE_WRITE_UNLOCK=y\nCONFIG_INLINE_WRITE_UNLOCK_BH=y\nCONFIG_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_USE_QUEUED_SPINLOCKS=y\nCONFIG_QUEUED_SPINLOCKS=y\nCONFIG_ARCH_USE_QUEUED_RWLOCKS=y\nCONFIG_QUEUED_RWLOCKS=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_ARCH_HAS_SYSCALL_WRAPPER=y\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_ARCH_BINFMT_ELF_STATE=y\nCONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y\nCONFIG_ARCH_HAVE_ELF_PROT=y\nCONFIG_ARCH_USE_GNU_PROPERTY=y\nCONFIG_ELFCORE=y\n# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set\nCONFIG_BINFMT_SCRIPT=y\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\nCONFIG_SWAP=y\n# CONFIG_ZSWAP is not set\n\n#\n# SLAB allocator options\n#\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# end of SLAB allocator options\n\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\n# CONFIG_COMPAT_BRK is not set\nCONFIG_SPARSEMEM=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_FAST_GUP=y\nCONFIG_ARCH_KEEP_MEMBLOCK=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_EXCLUSIVE_SYSTEM_RAM=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y\n# CONFIG_MEMORY_HOTPLUG is not set\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y\nCONFIG_MEMORY_BALLOON=y\nCONFIG_BALLOON_COMPACTION=y\nCONFIG_COMPACTION=y\nCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1\nCONFIG_PAGE_REPORTING=y\nCONFIG_MIGRATION=y\nCONFIG_ARCH_ENABLE_THP_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\nCONFIG_PHYS_ADDR_T_64BIT=y\nCONFIG_KSM=y\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y\nCONFIG_MEMORY_FAILURE=y\n# CONFIG_HWPOISON_INJECT is not set\nCONFIG_ARCH_WANTS_THP_SWAP=y\nCONFIG_TRANSPARENT_HUGEPAGE=y\nCONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y\n# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set\nCONFIG_THP_SWAP=y\n# CONFIG_READ_ONLY_THP_FOR_FS is not set\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\n# CONFIG_CMA_DEBUGFS is not set\n# CONFIG_CMA_SYSFS is not set\nCONFIG_CMA_AREAS=7\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CACHE_LINE_SIZE=y\nCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y\nCONFIG_ARCH_HAS_PTE_DEVMAP=y\nCONFIG_ZONE_DMA=y\nCONFIG_ZONE_DMA32=y\nCONFIG_VM_EVENT_COUNTERS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\nCONFIG_ARCH_HAS_PTE_SPECIAL=y\nCONFIG_SECRETMEM=y\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_USERFAULTFD is not set\n# CONFIG_LRU_GEN is not set\nCONFIG_LOCK_MM_AND_FIND_VMA=y\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\nCONFIG_NET_INGRESS=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_INTERFACE is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_XFRM_ESP=y\n# CONFIG_NET_KEY is not set\n# CONFIG_XDP_SOCKETS is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=m\n# CONFIG_IP_MROUTE is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=y\n# CONFIG_INET_ESP_OFFLOAD is not set\n# CONFIG_INET_ESPINTCP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=m\nCONFIG_INET_DIAG=y\nCONFIG_INET_TCP_DIAG=y\n# CONFIG_INET_UDP_DIAG is not set\n# CONFIG_INET_RAW_DIAG is not set\n# CONFIG_INET_DIAG_DESTROY is not set\n# CONFIG_TCP_CONG_ADVANCED is not set\nCONFIG_TCP_CONG_CUBIC=y\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_IPV6_VTI is not set\nCONFIG_IPV6_SIT=m\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\nCONFIG_IPV6_FOU=m\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_NETLABEL is not set\n# CONFIG_MPTCP is not set\n# CONFIG_NETWORK_SECMARK is not set\nCONFIG_NET_PTP_CLASSIFY=y\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\nCONFIG_NETFILTER_EGRESS=y\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\n# CONFIG_NETFILTER_NETLINK_LOG is not set\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\nCONFIG_NF_LOG_SYSLOG=m\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_ZONES is not set\nCONFIG_NF_CONNTRACK_PROCFS=y\nCONFIG_NF_CONNTRACK_EVENTS=y\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\nCONFIG_NF_CT_PROTO_DCCP=y\nCONFIG_NF_CT_PROTO_SCTP=y\nCONFIG_NF_CT_PROTO_UDPLITE=y\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\n# CONFIG_NF_CONNTRACK_IRC is not set\n# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\n# CONFIG_NF_CONNTRACK_SIP is not set\nCONFIG_NF_CONNTRACK_TFTP=m\n# CONFIG_NF_CT_NETLINK is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=y\nCONFIG_NF_NAT_MASQUERADE=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\nCONFIG_NETFILTER_XTABLES_COMPAT=y\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\nCONFIG_NETFILTER_XT_TARGET_CHECKSUM=m\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\nCONFIG_NETFILTER_XT_TARGET_LOG=m\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\n# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\n# CONFIG_NETFILTER_XT_MATCH_OWNER is not set\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\n# CONFIG_NETFILTER_XT_MATCH_STATE is not set\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\nCONFIG_IP_VS=m\n# CONFIG_IP_VS_IPV6 is not set\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_MH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n# CONFIG_IP_VS_TWOS is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS MH scheduler\n#\nCONFIG_IP_VS_MH_TAB_INDEX=12\n\n#\n# IPVS application helper\n#\n# CONFIG_IP_VS_FTP is not set\nCONFIG_IP_VS_NFCT=y\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\nCONFIG_NF_LOG_IPV4=m\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_SECURITY is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\nCONFIG_NF_LOG_IPV6=m\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_MATCH_SRH is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\n# CONFIG_IP6_NF_SECURITY is not set\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\n# CONFIG_NET_SCH_FQ_CODEL is not set\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_FLOW is not set\nCONFIG_NET_CLS_CGROUP=m\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\nCONFIG_NET_L3_MASTER_DEV=y\n# CONFIG_QRTR is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_PCPU_DEV_REFCNT=y\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_SOCK_RX_QUEUE_MAPPING=y\nCONFIG_XPS=y\nCONFIG_CGROUP_NET_PRIO=y\nCONFIG_CGROUP_NET_CLASSID=y\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\n# CONFIG_BT_RFCOMM is not set\n# CONFIG_BT_BNEP is not set\nCONFIG_BT_HIDP=m\n# CONFIG_BT_HS is not set\n# CONFIG_BT_LE is not set\nCONFIG_BT_LEDS=y\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\n# CONFIG_BT_DEBUGFS is not set\n# CONFIG_BT_SELFTEST is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_QCA=m\nCONFIG_BT_MTK=m\nCONFIG_BT_HCIBTUSB=m\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\n# CONFIG_BT_HCIBTUSB_MTK is not set\nCONFIG_BT_HCIBTUSB_RTL=y\nCONFIG_BT_HCIBTSDIO=m\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_SERDEV=y\nCONFIG_BT_HCIUART_H4=y\n# CONFIG_BT_HCIUART_NOKIA is not set\n# CONFIG_BT_HCIUART_BCSP is not set\n# CONFIG_BT_HCIUART_ATH3K is not set\n# CONFIG_BT_HCIUART_LL is not set\nCONFIG_BT_HCIUART_3WIRE=y\n# CONFIG_BT_HCIUART_INTEL is not set\nCONFIG_BT_HCIUART_BCM=y\nCONFIG_BT_HCIUART_RTL=y\nCONFIG_BT_HCIUART_QCA=y\nCONFIG_BT_HCIUART_AG6XX=y\nCONFIG_BT_HCIUART_MRVL=y\nCONFIG_BT_HCIBCM203X=m\nCONFIG_BT_HCIBPA10X=m\nCONFIG_BT_HCIBFUSB=m\nCONFIG_BT_HCIVHCI=m\nCONFIG_BT_MRVL=m\nCONFIG_BT_MRVL_SDIO=m\nCONFIG_BT_ATH3K=m\n# CONFIG_BT_MTKSDIO is not set\nCONFIG_BT_MTKUART=m\nCONFIG_BT_HCIRSI=m\n# CONFIG_BT_VIRTIO is not set\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_SPY=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=m\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\nCONFIG_CFG80211_CRDA_SUPPORT=y\nCONFIG_CFG80211_WEXT=y\nCONFIG_LIB80211=m\nCONFIG_LIB80211_CRYPT_WEP=m\nCONFIG_LIB80211_CRYPT_CCMP=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=m\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=m\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\nCONFIG_RFKILL_GPIO=m\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_PAGE_POOL=y\n# CONFIG_PAGE_POOL_STATS is not set\nCONFIG_FAILOVER=y\nCONFIG_ETHTOOL_NETLINK=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\nCONFIG_HAVE_PCI=y\n# CONFIG_PCI is not set\n# CONFIG_PCCARD is not set\n\n#\n# Generic Driver Options\n#\n# CONFIG_UEVENT_HELPER is not set\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\n# CONFIG_DEVTMPFS_SAFE is not set\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\nCONFIG_FW_CACHE=y\n# CONFIG_FW_UPLOAD is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\nCONFIG_ALLOW_DEV_COREDUMP=y\nCONFIG_DEV_COREDUMP=y\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_SOC_BUS=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_MOXTET is not set\n# CONFIG_VEXPRESS_CONFIG is not set\n# CONFIG_MHI_BUS is not set\n# CONFIG_MHI_BUS_EP is not set\n# end of Bus devices\n\n# CONFIG_CONNECTOR is not set\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\n# CONFIG_ARM_SCMI_PROTOCOL is not set\n# end of ARM System Control and Management Interface Protocol\n\nCONFIG_ARM_SCPI_PROTOCOL=y\nCONFIG_ARM_SCPI_POWER_DOMAIN=y\n# CONFIG_ARM_FFA_TRANSPORT is not set\n# CONFIG_GOOGLE_FIRMWARE is not set\nCONFIG_ARM_PSCI_FW=y\n# CONFIG_ARM_PSCI_CHECKER is not set\nCONFIG_HAVE_ARM_SMCCC=y\nCONFIG_HAVE_ARM_SMCCC_DISCOVERY=y\nCONFIG_ARM_SMCCC_SOC_ID=y\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n\n#\n# Partition parsers\n#\n# CONFIG_MTD_AR7_PARTS is not set\n# CONFIG_MTD_CMDLINE_PARTS is not set\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AFS_PARTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\n# end of Partition parsers\n\n#\n# User Modules And Translation Layers\n#\nCONFIG_MTD_BLKDEVS=y\nCONFIG_MTD_BLOCK=y\n\n#\n# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK.\n#\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\n# CONFIG_MTD_OOPS is not set\n# CONFIG_MTD_SWAP is not set\n# CONFIG_MTD_PARTITIONED_MASTER is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\n# CONFIG_MTD_CFI is not set\n# CONFIG_MTD_JEDECPROBE is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n# end of RAM/ROM/Flash chip drivers\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_PLATRAM is not set\n# end of Mapping drivers for chip access\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_DATAFLASH is not set\n# CONFIG_MTD_MCHP23K256 is not set\n# CONFIG_MTD_MCHP48L640 is not set\n# CONFIG_MTD_SST25L is not set\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\n# end of Self-contained MTD device drivers\n\n#\n# NAND\n#\n# CONFIG_MTD_ONENAND is not set\n# CONFIG_MTD_RAW_NAND is not set\n# CONFIG_MTD_SPI_NAND is not set\n\n#\n# ECC engine support\n#\n# CONFIG_MTD_NAND_ECC_SW_HAMMING is not set\n# CONFIG_MTD_NAND_ECC_SW_BCH is not set\n# CONFIG_MTD_NAND_ECC_MXIC is not set\n# end of ECC engine support\n# end of NAND\n\n#\n# LPDDR & LPDDR2 PCM memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\n# end of LPDDR & LPDDR2 PCM memory drivers\n\nCONFIG_MTD_SPI_NOR=y\nCONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y\n# CONFIG_MTD_SPI_NOR_SWP_DISABLE is not set\nCONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y\n# CONFIG_MTD_SPI_NOR_SWP_KEEP is not set\n# CONFIG_MTD_UBI is not set\n# CONFIG_MTD_HYPERBUS is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_DYNAMIC=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\nCONFIG_OF_RESOLVE=y\nCONFIG_OF_OVERLAY=y\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_CDROM=y\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=8\n# CONFIG_BLK_DEV_DRBD is not set\nCONFIG_BLK_DEV_NBD=m\n# CONFIG_BLK_DEV_RAM is not set\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\nCONFIG_VIRTIO_BLK=y\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_UBLK is not set\n\n#\n# NVME Support\n#\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TCP is not set\n# CONFIG_NVME_TARGET is not set\n# end of NVME Support\n\n#\n# Misc devices\n#\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_HI6421V600_IRQ is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\nCONFIG_SRAM=y\n# CONFIG_XILINX_SDFEC is not set\n# CONFIG_HISI_HIKEY_USB is not set\n# CONFIG_OPEN_DICE is not set\n# CONFIG_VCPU_STALL_DETECTOR is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\nCONFIG_EEPROM_AT25=m\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_EEPROM_EE1004 is not set\n# end of EEPROM support\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n# CONFIG_ECHO is not set\n# CONFIG_MISC_RTSX_USB is not set\n# CONFIG_UACCE is not set\n# CONFIG_PVPANIC is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_PROC_FS is not set\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_CHR_DEV_SG=m\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\n# CONFIG_SCSI_SCAN_ASYNC is not set\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_VIRTIO is not set\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\n# CONFIG_ATA is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\n# CONFIG_DM_DEBUG is not set\nCONFIG_DM_BUFIO=m\n# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\n# CONFIG_DM_UNSTRIPED is not set\n# CONFIG_DM_CRYPT is not set\n# CONFIG_DM_SNAPSHOT is not set\nCONFIG_DM_THIN_PROVISIONING=m\n# CONFIG_DM_CACHE is not set\n# CONFIG_DM_WRITECACHE is not set\n# CONFIG_DM_EBS is not set\n# CONFIG_DM_ERA is not set\n# CONFIG_DM_CLONE is not set\n# CONFIG_DM_MIRROR is not set\n# CONFIG_DM_RAID is not set\n# CONFIG_DM_ZERO is not set\n# CONFIG_DM_MULTIPATH is not set\n# CONFIG_DM_DELAY is not set\n# CONFIG_DM_DUST is not set\n# CONFIG_DM_UEVENT is not set\n# CONFIG_DM_FLAKEY is not set\n# CONFIG_DM_VERITY is not set\n# CONFIG_DM_SWITCH is not set\n# CONFIG_DM_LOG_WRITES is not set\n# CONFIG_DM_INTEGRITY is not set\n# CONFIG_TARGET_CORE is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\nCONFIG_DUMMY=m\nCONFIG_WIREGUARD=m\n# CONFIG_WIREGUARD_DEBUG is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\nCONFIG_MACVTAP=m\nCONFIG_IPVLAN_L3S=y\nCONFIG_IPVLAN=m\n# CONFIG_IPVTAP is not set\nCONFIG_VXLAN=m\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_AMT is not set\n# CONFIG_MACSEC is not set\n# CONFIG_NETCONSOLE is not set\nCONFIG_TUN=m\nCONFIG_TAP=m\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\nCONFIG_VIRTIO_NET=y\nCONFIG_NLMON=m\nCONFIG_ETHERNET=y\n# CONFIG_NET_VENDOR_ALACRITECH is not set\n# CONFIG_ALTERA_TSE is not set\n# CONFIG_NET_VENDOR_AMAZON is not set\n# CONFIG_NET_VENDOR_AMD is not set\n# CONFIG_NET_VENDOR_AQUANTIA is not set\n# CONFIG_NET_VENDOR_ARC is not set\n# CONFIG_NET_VENDOR_ASIX is not set\n# CONFIG_NET_VENDOR_BROADCOM is not set\n# CONFIG_NET_VENDOR_CADENCE is not set\n# CONFIG_NET_VENDOR_CAVIUM is not set\n# CONFIG_NET_VENDOR_CORTINA is not set\n# CONFIG_NET_VENDOR_DAVICOM is not set\n# CONFIG_DNET is not set\n# CONFIG_NET_VENDOR_ENGLEDER is not set\n# CONFIG_NET_VENDOR_EZCHIP is not set\n# CONFIG_NET_VENDOR_FUNGIBLE is not set\nCONFIG_NET_VENDOR_GOOGLE=y\n# CONFIG_NET_VENDOR_HISILICON is not set\n# CONFIG_NET_VENDOR_HUAWEI is not set\n# CONFIG_NET_VENDOR_INTEL is not set\n# CONFIG_NET_VENDOR_WANGXUN is not set\n# CONFIG_NET_VENDOR_ADI is not set\n# CONFIG_NET_VENDOR_LITEX is not set\n# CONFIG_NET_VENDOR_MARVELL is not set\n# CONFIG_NET_VENDOR_MELLANOX is not set\n# CONFIG_NET_VENDOR_MICREL is not set\n# CONFIG_NET_VENDOR_MICROCHIP is not set\n# CONFIG_NET_VENDOR_MICROSEMI is not set\n# CONFIG_NET_VENDOR_MICROSOFT is not set\n# CONFIG_NET_VENDOR_NI is not set\n# CONFIG_NET_VENDOR_NATSEMI is not set\n# CONFIG_NET_VENDOR_NETRONOME is not set\n# CONFIG_ETHOC is not set\n# CONFIG_NET_VENDOR_PENSANDO is not set\n# CONFIG_NET_VENDOR_QUALCOMM is not set\n# CONFIG_NET_VENDOR_RENESAS is not set\n# CONFIG_NET_VENDOR_ROCKER is not set\n# CONFIG_NET_VENDOR_SAMSUNG is not set\n# CONFIG_NET_VENDOR_SEEQ is not set\n# CONFIG_NET_VENDOR_SOLARFLARE is not set\n# CONFIG_NET_VENDOR_SMSC is not set\n# CONFIG_NET_VENDOR_SOCIONEXT is not set\nCONFIG_NET_VENDOR_STMICRO=y\nCONFIG_STMMAC_ETH=y\n# CONFIG_STMMAC_SELFTESTS is not set\nCONFIG_STMMAC_PLATFORM=y\nCONFIG_DWMAC_DWC_QOS_ETH=y\nCONFIG_DWMAC_GENERIC=y\nCONFIG_DWMAC_ROCKCHIP=y\n# CONFIG_DWMAC_INTEL_PLAT is not set\n# CONFIG_NET_VENDOR_SYNOPSYS is not set\n# CONFIG_NET_VENDOR_VERTEXCOM is not set\n# CONFIG_NET_VENDOR_VIA is not set\n# CONFIG_NET_VENDOR_WIZNET is not set\n# CONFIG_NET_VENDOR_XILINX is not set\nCONFIG_PHYLINK=y\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_ADIN_PHY is not set\n# CONFIG_ADIN1100_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=m\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM54140_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MARVELL_88X2222_PHY is not set\n# CONFIG_MAXLINEAR_GPHY is not set\n# CONFIG_MEDIATEK_GE_PHY is not set\n# CONFIG_MICREL_PHY is not set\nCONFIG_MICROCHIP_PHY=m\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_MOTORCOMM_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_NXP_TJA11XX_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_QSEMI_PHY is not set\nCONFIG_REALTEK_PHY=y\n# CONFIG_RENESAS_PHY is not set\nCONFIG_ROCKCHIP_PHY=y\nCONFIG_SMSC_PHY=m\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_DP83TD510_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\n# CONFIG_PSE_CONTROLLER is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_OF_MDIO=y\nCONFIG_MDIO_DEVRES=y\nCONFIG_MDIO_BITBANG=y\n# CONFIG_MDIO_BCM_UNIMAC is not set\nCONFIG_MDIO_GPIO=y\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_OCTEON is not set\n# CONFIG_MDIO_IPQ4019 is not set\n# CONFIG_MDIO_IPQ8064 is not set\n\n#\n# MDIO Multiplexers\n#\nCONFIG_MDIO_BUS_MUX=y\nCONFIG_MDIO_BUS_MUX_GPIO=y\nCONFIG_MDIO_BUS_MUX_MULTIPLEXER=y\nCONFIG_MDIO_BUS_MUX_MMIOREG=y\n\n#\n# PCS device drivers\n#\nCONFIG_PCS_XPCS=y\n# end of PCS device drivers\n\n# CONFIG_PPP is not set\n# CONFIG_SLIP is not set\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\nCONFIG_USB_PEGASUS=m\nCONFIG_USB_RTL8150=m\nCONFIG_USB_RTL8152=m\nCONFIG_USB_LAN78XX=m\nCONFIG_USB_USBNET=m\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\n# CONFIG_USB_NET_CDC_EEM is not set\nCONFIG_USB_NET_CDC_NCM=m\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\nCONFIG_USB_NET_DM9601=m\n# CONFIG_USB_NET_SR9700 is not set\nCONFIG_USB_NET_SR9800=m\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=m\n# CONFIG_USB_NET_GL620A is not set\nCONFIG_USB_NET_NET1080=m\nCONFIG_USB_NET_PLUSB=m\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\nCONFIG_USB_NET_CDC_SUBSET_ENABLE=m\nCONFIG_USB_NET_CDC_SUBSET=m\n# CONFIG_USB_ALI_M5632 is not set\n# CONFIG_USB_AN2720 is not set\nCONFIG_USB_BELKIN=y\nCONFIG_USB_ARMLINUX=y\n# CONFIG_USB_EPSON2888 is not set\n# CONFIG_USB_KC2190 is not set\nCONFIG_USB_NET_ZAURUS=m\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\n# CONFIG_USB_HSO is not set\n# CONFIG_USB_NET_INT51X1 is not set\n# CONFIG_USB_IPHETH is not set\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\n# CONFIG_USB_NET_AQC111 is not set\nCONFIG_USB_RTL8153_ECM=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\nCONFIG_ATH9K=m\n# CONFIG_ATH9K_AHB is not set\n# CONFIG_ATH9K_DEBUGFS is not set\n# CONFIG_ATH9K_DYNACK is not set\n# CONFIG_ATH9K_WOW is not set\nCONFIG_ATH9K_RFKILL=y\nCONFIG_ATH9K_CHANNEL_CONTEXT=y\nCONFIG_ATH9K_PCOEM=y\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\nCONFIG_ATH9K_HWRNG=y\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\nCONFIG_CARL9170_HWRNG=y\nCONFIG_ATH6KL=m\n# CONFIG_ATH6KL_SDIO is not set\nCONFIG_ATH6KL_USB=m\n# CONFIG_ATH6KL_DEBUG is not set\nCONFIG_AR5523=m\nCONFIG_ATH10K=m\nCONFIG_ATH10K_CE=y\n# CONFIG_ATH10K_SDIO is not set\nCONFIG_ATH10K_USB=m\n# CONFIG_ATH10K_DEBUG is not set\n# CONFIG_ATH10K_DEBUGFS is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\nCONFIG_AT76C50X_USB=m\nCONFIG_WLAN_VENDOR_BROADCOM=y\nCONFIG_B43=m\nCONFIG_B43_BCMA=y\nCONFIG_B43_SSB=y\nCONFIG_B43_BUSES_BCMA_AND_SSB=y\n# CONFIG_B43_BUSES_BCMA is not set\n# CONFIG_B43_BUSES_SSB is not set\n# CONFIG_B43_SDIO is not set\nCONFIG_B43_BCMA_PIO=y\nCONFIG_B43_PIO=y\nCONFIG_B43_PHY_G=y\nCONFIG_B43_PHY_N=y\nCONFIG_B43_PHY_LP=y\nCONFIG_B43_PHY_HT=y\nCONFIG_B43_LEDS=y\nCONFIG_B43_HWRNG=y\n# CONFIG_B43_DEBUG is not set\n# CONFIG_B43LEGACY is not set\nCONFIG_BRCMUTIL=m\n# CONFIG_BRCMSMAC is not set\nCONFIG_BRCMFMAC=m\nCONFIG_BRCMFMAC_PROTO_BCDC=y\nCONFIG_BRCMFMAC_SDIO=y\nCONFIG_BRCMFMAC_USB=y\n# CONFIG_BRCM_TRACING is not set\n# CONFIG_BRCMDBG is not set\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\nCONFIG_WLAN_VENDOR_INTERSIL=y\n# CONFIG_HOSTAP is not set\nCONFIG_P54_COMMON=m\nCONFIG_P54_USB=m\n# CONFIG_P54_SPI is not set\nCONFIG_P54_LEDS=y\nCONFIG_WLAN_VENDOR_MARVELL=y\nCONFIG_LIBERTAS=m\nCONFIG_LIBERTAS_USB=m\n# CONFIG_LIBERTAS_SDIO is not set\n# CONFIG_LIBERTAS_SPI is not set\n# CONFIG_LIBERTAS_DEBUG is not set\n# CONFIG_LIBERTAS_MESH is not set\nCONFIG_LIBERTAS_THINFIRM=m\n# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set\nCONFIG_LIBERTAS_THINFIRM_USB=m\nCONFIG_MWIFIEX=m\n# CONFIG_MWIFIEX_SDIO is not set\nCONFIG_MWIFIEX_USB=m\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_MT76_CORE=m\nCONFIG_MT76_LEDS=y\nCONFIG_MT76_USB=m\nCONFIG_MT76_SDIO=m\nCONFIG_MT76x02_LIB=m\nCONFIG_MT76x02_USB=m\nCONFIG_MT76_CONNAC_LIB=m\nCONFIG_MT76x0_COMMON=m\nCONFIG_MT76x0U=m\nCONFIG_MT76x2_COMMON=m\nCONFIG_MT76x2U=m\nCONFIG_MT7615_COMMON=m\nCONFIG_MT7663_USB_SDIO_COMMON=m\nCONFIG_MT7663U=m\nCONFIG_MT7663S=m\n# CONFIG_MT7921S is not set\n# CONFIG_MT7921U is not set\nCONFIG_WLAN_VENDOR_MICROCHIP=y\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\n# CONFIG_WLAN_VENDOR_PURELIFI is not set\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=m\n# CONFIG_RTL8192CU is not set\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\nCONFIG_RTW88=m\nCONFIG_RTW88_CORE=m\nCONFIG_RTW88_USB=m\nCONFIG_RTW88_8822B=m\nCONFIG_RTW88_8822C=m\nCONFIG_RTW88_8723D=m\nCONFIG_RTW88_8821C=m\n# CONFIG_RTW88_8822BS is not set\nCONFIG_RTW88_8822BU=m\n# CONFIG_RTW88_8822CS is not set\nCONFIG_RTW88_8822CU=m\nCONFIG_RTW88_8723DU=m\n# CONFIG_RTW88_8821CS is not set\nCONFIG_RTW88_8821CU=m\n# CONFIG_RTW88_DEBUG is not set\n# CONFIG_RTW88_DEBUGFS is not set\n# CONFIG_RTW89 is not set\nCONFIG_WLAN_VENDOR_RSI=y\nCONFIG_RSI_91X=m\n# CONFIG_RSI_DEBUGFS is not set\n# CONFIG_RSI_SDIO is not set\nCONFIG_RSI_USB=m\nCONFIG_RSI_COEX=y\n# CONFIG_WLAN_VENDOR_SILABS is not set\nCONFIG_WLAN_VENDOR_ST=y\n# CONFIG_CW1200 is not set\nCONFIG_WLAN_VENDOR_TI=y\n# CONFIG_WL1251 is not set\nCONFIG_WL12XX=m\nCONFIG_WL18XX=m\nCONFIG_WLCORE=m\n# CONFIG_WLCORE_SPI is not set\n# CONFIG_WLCORE_SDIO is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\nCONFIG_USB_ZD1201=m\nCONFIG_ZD1211RW=m\n# CONFIG_ZD1211RW_DEBUG is not set\nCONFIG_WLAN_VENDOR_QUANTENNA=y\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\n# CONFIG_NETDEVSIM is not set\nCONFIG_NET_FAILOVER=y\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\nCONFIG_INPUT_MATRIXKMAP=y\n\n#\n# Userland interfaces\n#\n# CONFIG_INPUT_MOUSEDEV is not set\nCONFIG_INPUT_JOYDEV=y\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADC is not set\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\n# CONFIG_KEYBOARD_ATKBD is not set\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=y\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_PINEPHONE is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\n# CONFIG_KEYBOARD_CYPRESS_SF is not set\n# CONFIG_INPUT_MOUSE is not set\nCONFIG_INPUT_JOYSTICK=y\n# CONFIG_JOYSTICK_ANALOG is not set\n# CONFIG_JOYSTICK_A3D is not set\n# CONFIG_JOYSTICK_ADC is not set\n# CONFIG_JOYSTICK_ADI is not set\n# CONFIG_JOYSTICK_COBRA is not set\nCONFIG_JOYSTICK_GF2K=m\n# CONFIG_JOYSTICK_GRIP is not set\n# CONFIG_JOYSTICK_GRIP_MP is not set\n# CONFIG_JOYSTICK_GUILLEMOT is not set\n# CONFIG_JOYSTICK_INTERACT is not set\n# CONFIG_JOYSTICK_SIDEWINDER is not set\n# CONFIG_JOYSTICK_TMDC is not set\nCONFIG_JOYSTICK_IFORCE=m\nCONFIG_JOYSTICK_IFORCE_USB=m\n# CONFIG_JOYSTICK_IFORCE_232 is not set\n# CONFIG_JOYSTICK_WARRIOR is not set\n# CONFIG_JOYSTICK_MAGELLAN is not set\n# CONFIG_JOYSTICK_SPACEORB is not set\n# CONFIG_JOYSTICK_SPACEBALL is not set\n# CONFIG_JOYSTICK_STINGER is not set\n# CONFIG_JOYSTICK_TWIDJOY is not set\n# CONFIG_JOYSTICK_ZHENHUA is not set\n# CONFIG_JOYSTICK_AS5011 is not set\n# CONFIG_JOYSTICK_JOYDUMP is not set\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\n# CONFIG_JOYSTICK_PSXPAD_SPI is not set\n# CONFIG_JOYSTICK_PXRC is not set\n# CONFIG_JOYSTICK_QWIIC is not set\n# CONFIG_JOYSTICK_FSIA6B is not set\n# CONFIG_JOYSTICK_SENSEHAT is not set\n# CONFIG_INPUT_TABLET is not set\n# CONFIG_INPUT_TOUCHSCREEN is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\nCONFIG_INPUT_RK805_PWRKEY=y\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_IQS7222 is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\n# CONFIG_RMI4_CORE is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_SERIO_SERPORT=m\nCONFIG_SERIO_AMBAKMI=y\nCONFIG_SERIO_LIBPS2=y\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_SERIO_GPIO_PS2 is not set\n# CONFIG_USERIO is not set\nCONFIG_GAMEPORT=m\n# CONFIG_GAMEPORT_NS558 is not set\n# CONFIG_GAMEPORT_L4 is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\nCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y\n# CONFIG_SERIAL_8250_16550A_VARIANTS is not set\n# CONFIG_SERIAL_8250_FINTEK is not set\nCONFIG_SERIAL_8250_CONSOLE=y\nCONFIG_SERIAL_8250_DMA=y\nCONFIG_SERIAL_8250_NR_UARTS=5\nCONFIG_SERIAL_8250_RUNTIME_UARTS=5\nCONFIG_SERIAL_8250_EXTENDED=y\nCONFIG_SERIAL_8250_MANY_PORTS=y\nCONFIG_SERIAL_8250_SHARE_IRQ=y\n# CONFIG_SERIAL_8250_DETECT_IRQ is not set\n# CONFIG_SERIAL_8250_RSA is not set\nCONFIG_SERIAL_8250_DWLIB=y\nCONFIG_SERIAL_8250_FSL=y\nCONFIG_SERIAL_8250_DW=y\n# CONFIG_SERIAL_8250_RT288X is not set\nCONFIG_SERIAL_OF_PLATFORM=y\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\n# CONFIG_SERIAL_AMBA_PL011 is not set\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_SIFIVE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\nCONFIG_SERIAL_XILINX_PS_UART=y\nCONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\nCONFIG_SERIAL_MCTRL_GPIO=y\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NULL_TTY is not set\nCONFIG_HVC_DRIVER=y\n# CONFIG_HVC_DCC is not set\nCONFIG_SERIAL_DEV_BUS=y\nCONFIG_SERIAL_DEV_CTRL_TTYPORT=y\nCONFIG_VIRTIO_CONSOLE=y\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=m\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_BA431 is not set\n# CONFIG_HW_RANDOM_VIRTIO is not set\nCONFIG_HW_RANDOM_OPTEE=m\n# CONFIG_HW_RANDOM_CCTRNG is not set\n# CONFIG_HW_RANDOM_XIPHERA is not set\nCONFIG_HW_RANDOM_ARM_SMCCC_TRNG=m\nCONFIG_DEVMEM=y\n# CONFIG_TCG_TPM is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\nCONFIG_RANDOM_TRUST_CPU=y\n# CONFIG_RANDOM_TRUST_BOOTLOADER is not set\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\nCONFIG_I2C_MUX_PCA954x=y\nCONFIG_I2C_MUX_PINCTRL=y\n# CONFIG_I2C_MUX_REG is not set\nCONFIG_I2C_DEMUX_PINCTRL=y\n# CONFIG_I2C_MUX_MLXCPLD is not set\n# end of Multiplexer I2C Chip support\n\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CADENCE is not set\n# CONFIG_I2C_CBUS_GPIO is not set\nCONFIG_I2C_DESIGNWARE_CORE=y\n# CONFIG_I2C_DESIGNWARE_SLAVE is not set\nCONFIG_I2C_DESIGNWARE_PLATFORM=y\n# CONFIG_I2C_EMEV2 is not set\nCONFIG_I2C_GPIO=m\n# CONFIG_I2C_GPIO_FAULT_INJECTOR is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\nCONFIG_I2C_RK3X=y\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\nCONFIG_SPI_MEM=y\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\nCONFIG_SPI_BITBANG=m\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_CADENCE_QUADSPI is not set\n# CONFIG_SPI_CADENCE_XSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_NXP_FLEXSPI is not set\nCONFIG_SPI_GPIO=m\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_MICROCHIP_CORE is not set\n# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set\n# CONFIG_SPI_OC_TINY is not set\nCONFIG_SPI_PL022=y\nCONFIG_SPI_ROCKCHIP=m\n# CONFIG_SPI_ROCKCHIP_SFC is not set\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_SIFIVE is not set\n# CONFIG_SPI_MXIC is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_AMD is not set\n\n#\n# SPI Multiplexer support\n#\n# CONFIG_SPI_MUX is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=m\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\nCONFIG_SPI_DYNAMIC=y\nCONFIG_SPMI=y\n# CONFIG_SPMI_HISI3670 is not set\n# CONFIG_HSI is not set\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\n# CONFIG_PTP_1588_CLOCK_KVM is not set\n# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set\n# CONFIG_PTP_1588_CLOCK_IDTCM is not set\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_CY8C95X0 is not set\nCONFIG_PINCTRL_MAX77620=y\n# CONFIG_PINCTRL_MCP23S08 is not set\n# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set\n# CONFIG_PINCTRL_OCELOT is not set\nCONFIG_PINCTRL_RK805=y\nCONFIG_PINCTRL_ROCKCHIP=y\n# CONFIG_PINCTRL_SINGLE is not set\n# CONFIG_PINCTRL_STMFX is not set\n# CONFIG_PINCTRL_SX150X is not set\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_CDEV=y\nCONFIG_GPIO_CDEV_V1=y\nCONFIG_GPIO_GENERIC=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_CADENCE is not set\nCONFIG_GPIO_DWAPB=y\n# CONFIG_GPIO_FTGPIO010 is not set\n# CONFIG_GPIO_GENERIC_PLATFORM is not set\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_LOGICVC is not set\n# CONFIG_GPIO_MB86S7X is not set\nCONFIG_GPIO_PL061=y\nCONFIG_GPIO_ROCKCHIP=y\n# CONFIG_GPIO_SIFIVE is not set\nCONFIG_GPIO_SYSCON=y\n# CONFIG_GPIO_XGENE is not set\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_GW_PLD is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\nCONFIG_GPIO_PCA953X=y\nCONFIG_GPIO_PCA953X_IRQ=y\n# CONFIG_GPIO_PCA9570 is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\nCONFIG_GPIO_MAX77620=y\n# end of MFD GPIO expanders\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n# end of SPI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_VIRTIO is not set\n# CONFIG_GPIO_SIM is not set\n# end of Virtual GPIO drivers\n\n# CONFIG_W1 is not set\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_BRCMSTB is not set\n# CONFIG_POWER_RESET_GPIO is not set\n# CONFIG_POWER_RESET_GPIO_RESTART is not set\n# CONFIG_POWER_RESET_LTC2952 is not set\nCONFIG_POWER_RESET_REGULATOR=y\n# CONFIG_POWER_RESET_RESTART is not set\n# CONFIG_POWER_RESET_XGENE is not set\nCONFIG_POWER_RESET_SYSCON=y\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\nCONFIG_REBOOT_MODE=y\nCONFIG_SYSCON_REBOOT_MODE=y\n# CONFIG_NVMEM_REBOOT_MODE is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\nCONFIG_POWER_SUPPLY_HWMON=y\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_IP5XXX_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SAMSUNG_SDI is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_MAX77976 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_RK817 is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_UCS1002 is not set\n# CONFIG_CHARGER_BD99954 is not set\n# CONFIG_BATTERY_UG3105 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM1177 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_AHT10 is not set\n# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set\n# CONFIG_SENSORS_AS370 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_AXI_FAN_CONTROL is not set\nCONFIG_SENSORS_ARM_SCPI=y\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_CORSAIR_CPRO is not set\n# CONFIG_SENSORS_CORSAIR_PSU is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\n# CONFIG_SENSORS_GPIO_FAN is not set\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IIO_HWMON is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2947_I2C is not set\n# CONFIG_SENSORS_LTC2947_SPI is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC2992 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX127 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX31730 is not set\n# CONFIG_SENSORS_MAX31760 is not set\n# CONFIG_SENSORS_MAX6620 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_TPS23861 is not set\n# CONFIG_SENSORS_MR75203 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\nCONFIG_SENSORS_LM90=m\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT6775_I2C is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_NZXT_KRAKEN2 is not set\n# CONFIG_SENSORS_NZXT_SMART2 is not set\n# CONFIG_SENSORS_OCC_P8_I2C is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\nCONFIG_SENSORS_PWM_FAN=m\n# CONFIG_SENSORS_SBTSI is not set\n# CONFIG_SENSORS_SBRMI is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHT4x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC2305 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\nCONFIG_SENSORS_INA2XX=m\n# CONFIG_SENSORS_INA238 is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_TMP464 is not set\n# CONFIG_SENSORS_TMP513 is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_NETLINK is not set\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\n# CONFIG_THERMAL_WRITABLE_TRIPS is not set\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\nCONFIG_CPU_THERMAL=y\nCONFIG_CPU_FREQ_THERMAL=y\nCONFIG_DEVFREQ_THERMAL=y\nCONFIG_THERMAL_EMULATION=y\n# CONFIG_THERMAL_MMIO is not set\n# CONFIG_MAX77620_THERMAL is not set\nCONFIG_ROCKCHIP_THERMAL=y\n# CONFIG_GENERIC_ADC_THERMAL is not set\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\nCONFIG_WATCHDOG_OPEN_TIMEOUT=0\n# CONFIG_WATCHDOG_SYSFS is not set\n# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_ARM_SBSA_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\nCONFIG_DW_WATCHDOG=y\n# CONFIG_MAX63XX_WATCHDOG is not set\n# CONFIG_MAX77620_WATCHDOG is not set\n# CONFIG_ARM_SMC_WATCHDOG is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\nCONFIG_SSB=m\nCONFIG_SSB_BLOCKIO=y\nCONFIG_SSB_SDIOHOST_POSSIBLE=y\n# CONFIG_SSB_SDIOHOST is not set\n# CONFIG_SSB_DRIVER_GPIO is not set\nCONFIG_BCMA_POSSIBLE=y\nCONFIG_BCMA=m\nCONFIG_BCMA_BLOCKIO=y\n# CONFIG_BCMA_HOST_SOC is not set\n# CONFIG_BCMA_DRIVER_GMAC_CMN is not set\n# CONFIG_BCMA_DRIVER_GPIO is not set\n# CONFIG_BCMA_DEBUG is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AXP20X_I2C is not set\n# CONFIG_MFD_MADERA is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_GATEWORKS_GSC is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_MP2629 is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_MFD_HI6421_SPMI is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\nCONFIG_MFD_MAX77620=y\n# CONFIG_MFD_MAX77650 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77714 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6370 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_MFD_OCELOT is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_NTXEC is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_SY7636A is not set\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RT5120 is not set\n# CONFIG_MFD_RC5T583 is not set\nCONFIG_MFD_RK808=y\n# CONFIG_MFD_RN5T618 is not set\nCONFIG_MFD_SEC_CORE=y\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\nCONFIG_MFD_WL1273_CORE=m\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_LOCHNAGAR is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_MFD_ROHM_BD718XX is not set\n# CONFIG_MFD_ROHM_BD71828 is not set\n# CONFIG_MFD_ROHM_BD957XMUF is not set\n# CONFIG_MFD_STPMIC1 is not set\n# CONFIG_MFD_STMFX is not set\n# CONFIG_MFD_ATC260X_I2C is not set\n# CONFIG_MFD_KHADAS_MCU is not set\n# CONFIG_MFD_QCOM_PM8008 is not set\n# CONFIG_RAVE_SP_CORE is not set\n# CONFIG_MFD_INTEL_M10_BMC is not set\n# CONFIG_MFD_RSMU_I2C is not set\n# CONFIG_MFD_RSMU_SPI is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\n# CONFIG_REGULATOR_DA9121 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\nCONFIG_REGULATOR_FAN53555=y\n# CONFIG_REGULATOR_FAN53880 is not set\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX77620 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MAX20086 is not set\n# CONFIG_REGULATOR_MAX77826 is not set\n# CONFIG_REGULATOR_MCP16502 is not set\n# CONFIG_REGULATOR_MP5416 is not set\n# CONFIG_REGULATOR_MP8859 is not set\n# CONFIG_REGULATOR_MP886X is not set\n# CONFIG_REGULATOR_MPQ7920 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_MT6315 is not set\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PF8X00 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\nCONFIG_REGULATOR_PWM=y\n# CONFIG_REGULATOR_QCOM_SPMI is not set\n# CONFIG_REGULATOR_QCOM_USB_VBUS is not set\n# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set\nCONFIG_REGULATOR_RK808=y\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT5190A is not set\n# CONFIG_REGULATOR_RT5759 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\n# CONFIG_REGULATOR_S2MPA01 is not set\n# CONFIG_REGULATOR_S2MPS11 is not set\n# CONFIG_REGULATOR_S5M8767 is not set\n# CONFIG_REGULATOR_SLG51000 is not set\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_SY8824X is not set\n# CONFIG_REGULATOR_SY8827N is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS6286X is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\n# CONFIG_REGULATOR_VCTRL is not set\n# CONFIG_REGULATOR_QCOM_LABIBB is not set\nCONFIG_RC_CORE=y\nCONFIG_BPF_LIRC_MODE2=y\nCONFIG_LIRC=y\nCONFIG_RC_MAP=m\nCONFIG_RC_DECODERS=y\nCONFIG_IR_IMON_DECODER=m\nCONFIG_IR_JVC_DECODER=m\nCONFIG_IR_MCE_KBD_DECODER=m\nCONFIG_IR_NEC_DECODER=m\nCONFIG_IR_RC5_DECODER=m\nCONFIG_IR_RC6_DECODER=m\nCONFIG_IR_RCMM_DECODER=m\nCONFIG_IR_SANYO_DECODER=m\nCONFIG_IR_SHARP_DECODER=m\nCONFIG_IR_SONY_DECODER=m\nCONFIG_IR_XMP_DECODER=m\nCONFIG_RC_DEVICES=y\nCONFIG_IR_GPIO_CIR=m\nCONFIG_IR_GPIO_TX=m\nCONFIG_IR_HIX5HD2=m\nCONFIG_IR_IGORPLUGUSB=m\nCONFIG_IR_IGUANA=m\nCONFIG_IR_IMON=m\nCONFIG_IR_IMON_RAW=m\nCONFIG_IR_MCEUSB=m\nCONFIG_IR_PWM_TX=m\nCONFIG_IR_REDRAT3=m\nCONFIG_IR_SERIAL=m\n# CONFIG_IR_SERIAL_TRANSMITTER is not set\nCONFIG_IR_SPI=m\nCONFIG_IR_STREAMZAP=m\nCONFIG_IR_TOY=m\nCONFIG_IR_TTUSBIR=m\nCONFIG_RC_ATI_REMOTE=m\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_RC_XBOX_DVD=m\nCONFIG_CEC_CORE=y\nCONFIG_CEC_NOTIFIER=y\n\n#\n# CEC support\n#\n# CONFIG_MEDIA_CEC_RC is not set\nCONFIG_MEDIA_CEC_SUPPORT=y\n# CONFIG_CEC_CH7322 is not set\nCONFIG_USB_PULSE8_CEC=m\nCONFIG_USB_RAINSHADOW_CEC=m\n# end of CEC support\n\nCONFIG_MEDIA_SUPPORT=y\nCONFIG_MEDIA_SUPPORT_FILTER=y\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\nCONFIG_MEDIA_RADIO_SUPPORT=y\n# CONFIG_MEDIA_SDR_SUPPORT is not set\nCONFIG_MEDIA_PLATFORM_SUPPORT=y\n# CONFIG_MEDIA_TEST_SUPPORT is not set\n# end of Media device types\n\nCONFIG_VIDEO_DEV=y\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_DVB_CORE=y\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2_I2C=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_VIDEO_TUNER=m\nCONFIG_V4L2_H264=m\nCONFIG_V4L2_VP9=m\nCONFIG_V4L2_MEM2MEM_DEV=m\nCONFIG_V4L2_FLASH_LED_CLASS=m\nCONFIG_V4L2_FWNODE=y\nCONFIG_V4L2_ASYNC=y\nCONFIG_VIDEOBUF_GEN=m\nCONFIG_VIDEOBUF_VMALLOC=m\n# end of Video4Linux options\n\n#\n# Media controller options\n#\nCONFIG_MEDIA_CONTROLLER_DVB=y\nCONFIG_MEDIA_CONTROLLER_REQUEST_API=y\n# end of Media controller options\n\n#\n# Digital TV options\n#\n# CONFIG_DVB_MMAP is not set\nCONFIG_DVB_NET=y\nCONFIG_DVB_MAX_ADAPTERS=16\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set\n# CONFIG_DVB_ULE_DEBUG is not set\n# end of Digital TV options\n\n#\n# Media drivers\n#\n\n#\n# Drivers filtered as selected at 'Filter media drivers'\n#\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_USB_S2255 is not set\n# CONFIG_VIDEO_USBTV is not set\n# CONFIG_USB_VIDEO_CLASS is not set\n\n#\n# Analog TV USB devices\n#\nCONFIG_VIDEO_GO7007=m\nCONFIG_VIDEO_GO7007_USB=m\nCONFIG_VIDEO_GO7007_LOADER=m\nCONFIG_VIDEO_GO7007_USB_S2250_BOARD=m\nCONFIG_VIDEO_HDPVR=m\nCONFIG_VIDEO_PVRUSB2=m\nCONFIG_VIDEO_PVRUSB2_SYSFS=y\nCONFIG_VIDEO_PVRUSB2_DVB=y\n# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set\nCONFIG_VIDEO_STK1160_COMMON=m\nCONFIG_VIDEO_STK1160=m\n\n#\n# Analog/digital TV USB devices\n#\nCONFIG_VIDEO_AU0828=m\nCONFIG_VIDEO_AU0828_V4L2=y\nCONFIG_VIDEO_AU0828_RC=y\nCONFIG_VIDEO_CX231XX=m\nCONFIG_VIDEO_CX231XX_RC=y\nCONFIG_VIDEO_CX231XX_ALSA=m\nCONFIG_VIDEO_CX231XX_DVB=m\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_AS102=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\n# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_DVBSKY=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_DVB_USB_ZD1301=m\nCONFIG_DVB_USB=m\n# CONFIG_DVB_USB_DEBUG is not set\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_CXUSB=m\nCONFIG_DVB_USB_CXUSB_ANALOG=y\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_DIB3000MC=m\nCONFIG_DVB_USB_DIBUSB_MB=m\nCONFIG_DVB_USB_DIBUSB_MB_FAULTY=y\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_DTT200U=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_OPERA1=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_SMS_USB_DRV=m\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\nCONFIG_VIDEO_EM28XX=m\nCONFIG_VIDEO_EM28XX_V4L2=m\nCONFIG_VIDEO_EM28XX_ALSA=m\nCONFIG_VIDEO_EM28XX_DVB=m\nCONFIG_VIDEO_EM28XX_RC=m\nCONFIG_RADIO_ADAPTERS=y\nCONFIG_RADIO_SAA7706H=m\nCONFIG_RADIO_SHARK=m\nCONFIG_RADIO_SHARK2=m\nCONFIG_RADIO_SI4713=m\nCONFIG_RADIO_TEA575X=m\nCONFIG_RADIO_TEA5764=m\nCONFIG_RADIO_TEF6862=m\nCONFIG_RADIO_WL1273=m\nCONFIG_USB_DSBR=m\nCONFIG_USB_KEENE=m\nCONFIG_USB_MA901=m\nCONFIG_USB_MR800=m\nCONFIG_USB_RAREMONO=m\nCONFIG_RADIO_SI470X=m\nCONFIG_USB_SI470X=m\nCONFIG_I2C_SI470X=m\nCONFIG_USB_SI4713=m\nCONFIG_PLATFORM_SI4713=m\nCONFIG_I2C_SI4713=m\nCONFIG_MEDIA_PLATFORM_DRIVERS=y\n# CONFIG_V4L_PLATFORM_DRIVERS is not set\n# CONFIG_DVB_PLATFORM_DRIVERS is not set\nCONFIG_V4L_MEM2MEM_DRIVERS=y\n# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set\n\n#\n# Allegro DVT media platform drivers\n#\n\n#\n# Amlogic media platform drivers\n#\n\n#\n# Amphion drivers\n#\n\n#\n# Aspeed media platform drivers\n#\n\n#\n# Atmel media platform drivers\n#\n\n#\n# Cadence media platform drivers\n#\n# CONFIG_VIDEO_CADENCE_CSI2RX is not set\n# CONFIG_VIDEO_CADENCE_CSI2TX is not set\n\n#\n# Chips&Media media platform drivers\n#\n\n#\n# Intel media platform drivers\n#\n\n#\n# Marvell media platform drivers\n#\n\n#\n# Mediatek media platform drivers\n#\n\n#\n# NVidia media platform drivers\n#\n\n#\n# NXP media platform drivers\n#\n\n#\n# Qualcomm media platform drivers\n#\n\n#\n# Renesas media platform drivers\n#\n\n#\n# Rockchip media platform drivers\n#\nCONFIG_VIDEO_ROCKCHIP_IEP=m\nCONFIG_VIDEO_ROCKCHIP_RGA=m\n\n#\n# Samsung media platform drivers\n#\n\n#\n# STMicroelectronics media platform drivers\n#\n\n#\n# Sunxi media platform drivers\n#\n\n#\n# Texas Instruments drivers\n#\n\n#\n# Verisilicon media platform drivers\n#\nCONFIG_VIDEO_HANTRO=m\nCONFIG_VIDEO_HANTRO_ROCKCHIP=y\n\n#\n# VIA media platform drivers\n#\n\n#\n# Xilinx media platform drivers\n#\n\n#\n# MMC/SDIO DVB adapters\n#\n# CONFIG_SMS_SDIO_DRV is not set\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_TTPCI_EEPROM=m\nCONFIG_VIDEO_CX2341X=m\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\nCONFIG_VIDEOBUF2_CORE=m\nCONFIG_VIDEOBUF2_V4L2=m\nCONFIG_VIDEOBUF2_MEMOPS=m\nCONFIG_VIDEOBUF2_DMA_CONTIG=m\nCONFIG_VIDEOBUF2_VMALLOC=m\nCONFIG_VIDEOBUF2_DMA_SG=m\n# end of Media drivers\n\nCONFIG_MEDIA_HIDE_ANCILLARY_SUBDRV=y\n\n#\n# Media ancillary drivers\n#\nCONFIG_MEDIA_ATTACH=y\n\n#\n# IR I2C driver auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_IR_I2C=y\nCONFIG_VIDEO_CAMERA_SENSOR=y\n# CONFIG_VIDEO_AR0521 is not set\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_HI846 is not set\n# CONFIG_VIDEO_HI847 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_IMX412 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\nCONFIG_VIDEO_MT9V011=m\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_OG01A1B is not set\n# CONFIG_VIDEO_OV02A10 is not set\n# CONFIG_VIDEO_OV08D10 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\nCONFIG_VIDEO_OV2640=m\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5693 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV7251 is not set\nCONFIG_VIDEO_OV7640=m\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9282 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# audio, video and radio I2C drivers auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_CS53L32A=m\nCONFIG_VIDEO_MSP3400=m\nCONFIG_VIDEO_SONY_BTF_MPX=m\nCONFIG_VIDEO_UDA1342=m\nCONFIG_VIDEO_WM8775=m\nCONFIG_VIDEO_SAA711X=m\nCONFIG_VIDEO_TVP5150=m\nCONFIG_VIDEO_TW2804=m\nCONFIG_VIDEO_TW9903=m\nCONFIG_VIDEO_TW9906=m\n\n#\n# Video and audio decoders\n#\nCONFIG_VIDEO_CX25840=m\n\n#\n# SPI I2C drivers auto-selected by 'Autoselect ancillary drivers'\n#\n\n#\n# Media SPI Adapters\n#\n# CONFIG_CXD2880_SPI_DRV is not set\n# CONFIG_VIDEO_GS1662 is not set\n# end of Media SPI Adapters\n\nCONFIG_MEDIA_TUNER=y\n\n#\n# Tuner drivers auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_IT913X=m\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_MC44S803=y\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT20XX=y\nCONFIG_MEDIA_TUNER_MT2266=m\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\nCONFIG_MEDIA_TUNER_QM1D1C0042=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_R820T=m\nCONFIG_MEDIA_TUNER_SI2157=m\nCONFIG_MEDIA_TUNER_SIMPLE=y\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_TDA18250=m\nCONFIG_MEDIA_TUNER_TDA18271=y\nCONFIG_MEDIA_TUNER_TDA827X=y\nCONFIG_MEDIA_TUNER_TDA8290=y\nCONFIG_MEDIA_TUNER_TDA9887=y\nCONFIG_MEDIA_TUNER_TEA5761=y\nCONFIG_MEDIA_TUNER_TEA5767=y\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_XC2028=y\nCONFIG_MEDIA_TUNER_XC4000=y\nCONFIG_MEDIA_TUNER_XC5000=y\n\n#\n# DVB Frontend drivers auto-selected by 'Autoselect ancillary drivers'\n#\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_M88DS3103=m\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\nCONFIG_DVB_STV6110x=m\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_MN88472=m\nCONFIG_DVB_MN88473=m\nCONFIG_DVB_SI2165=m\nCONFIG_DVB_TDA18271C2DD=m\n\n#\n# DVB-S (satellite) frontends\n#\nCONFIG_DVB_CX24116=m\nCONFIG_DVB_CX24120=m\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_DS3000=m\nCONFIG_DVB_MT312=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_TDA10071=m\nCONFIG_DVB_TDA10086=m\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_TS2020=m\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TUNER_ITD1000=m\nCONFIG_DVB_ZL10039=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_AS102_FE=m\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_CXD2841ER=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_GP8PSK_FE=m\nCONFIG_DVB_MT352=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\nCONFIG_DVB_SI2168=m\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_ZD1301_DEMOD=m\nCONFIG_DVB_ZL10353=m\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_STV0297=m\nCONFIG_DVB_TDA10023=m\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_AU8522=m\nCONFIG_DVB_AU8522_DTV=m\nCONFIG_DVB_AU8522_V4L=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LGDT3306A=m\nCONFIG_DVB_LGDT330X=m\nCONFIG_DVB_MXL692=m\nCONFIG_DVB_NXT200X=m\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_S5H1411=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\nCONFIG_DVB_S921=m\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_TC90522=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_A8293=m\nCONFIG_DVB_AF9033=m\nCONFIG_DVB_ATBM8830=m\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_IX2505V=m\nCONFIG_DVB_LGS8GXX=m\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_M88RS2000=m\nCONFIG_DVB_DRX39XYJ=m\n\n#\n# Common Interface (EN50221) controller drivers\n#\nCONFIG_DVB_SP2=m\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\nCONFIG_DRM=y\n# CONFIG_DRM_DEBUG_MM is not set\nCONFIG_DRM_KMS_HELPER=y\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\nCONFIG_DRM_DP_AUX_BUS=y\nCONFIG_DRM_DISPLAY_HELPER=y\nCONFIG_DRM_DISPLAY_DP_HELPER=y\nCONFIG_DRM_DISPLAY_HDMI_HELPER=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_GEM_DMA_HELPER=y\nCONFIG_DRM_GEM_SHMEM_HELPER=y\nCONFIG_DRM_SCHED=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_KOMEDA is not set\n# end of ARM devices\n\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\nCONFIG_DRM_ROCKCHIP=y\nCONFIG_ROCKCHIP_VOP=y\n# CONFIG_ROCKCHIP_VOP2 is not set\n# CONFIG_ROCKCHIP_ANALOGIX_DP is not set\n# CONFIG_ROCKCHIP_CDN_DP is not set\nCONFIG_ROCKCHIP_DW_HDMI=y\n# CONFIG_ROCKCHIP_DW_MIPI_DSI is not set\n# CONFIG_ROCKCHIP_INNO_HDMI is not set\n# CONFIG_ROCKCHIP_LVDS is not set\n# CONFIG_ROCKCHIP_RGB is not set\n# CONFIG_ROCKCHIP_RK3066_HDMI is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_USE_LVDS is not set\n# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set\n# CONFIG_DRM_VIRTIO_GPU is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set\n# CONFIG_DRM_PANEL_ARM_VERSATILE is not set\n# CONFIG_DRM_PANEL_LVDS is not set\n# CONFIG_DRM_PANEL_SIMPLE is not set\nCONFIG_DRM_PANEL_EDP=y\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set\n# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LB035Q02 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set\n# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set\n# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set\n# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set\n# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set\n# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set\n# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set\n# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set\n# CONFIG_DRM_PANEL_TPO_TPG110 is not set\n# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_CHRONTEL_CH7033 is not set\n# CONFIG_DRM_DISPLAY_CONNECTOR is not set\n# CONFIG_DRM_ITE_IT6505 is not set\n# CONFIG_DRM_LONTIUM_LT8912B is not set\n# CONFIG_DRM_LONTIUM_LT9211 is not set\n# CONFIG_DRM_LONTIUM_LT9611 is not set\n# CONFIG_DRM_LONTIUM_LT9611UXC is not set\n# CONFIG_DRM_ITE_IT66121 is not set\n# CONFIG_DRM_LVDS_CODEC is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NWL_MIPI_DSI is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_PARADE_PS8640 is not set\n# CONFIG_DRM_SIL_SII8620 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_SII9234 is not set\n# CONFIG_DRM_SIMPLE_BRIDGE is not set\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\n# CONFIG_DRM_TOSHIBA_TC358762 is not set\n# CONFIG_DRM_TOSHIBA_TC358764 is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TOSHIBA_TC358768 is not set\n# CONFIG_DRM_TOSHIBA_TC358775 is not set\n# CONFIG_DRM_TI_DLPC3433 is not set\n# CONFIG_DRM_TI_TFP410 is not set\n# CONFIG_DRM_TI_SN65DSI83 is not set\n# CONFIG_DRM_TI_SN65DSI86 is not set\n# CONFIG_DRM_TI_TPD12S015 is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_ANALOGIX_ANX7625 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_CDNS_MHDP8546 is not set\nCONFIG_DRM_DW_HDMI=y\n# CONFIG_DRM_DW_HDMI_AHB_AUDIO is not set\nCONFIG_DRM_DW_HDMI_I2S_AUDIO=y\n# CONFIG_DRM_DW_HDMI_GP_AUDIO is not set\nCONFIG_DRM_DW_HDMI_CEC=y\n# end of Display Interface Bridges\n\n# CONFIG_DRM_ETNAVIV is not set\n# CONFIG_DRM_HISI_KIRIN is not set\n# CONFIG_DRM_LOGICVC is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_PANEL_MIPI_DBI is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_TINYDRM_HX8357D is not set\n# CONFIG_TINYDRM_ILI9163 is not set\n# CONFIG_TINYDRM_ILI9225 is not set\n# CONFIG_TINYDRM_ILI9341 is not set\n# CONFIG_TINYDRM_ILI9486 is not set\n# CONFIG_TINYDRM_MI0283QT is not set\n# CONFIG_TINYDRM_REPAPER is not set\n# CONFIG_TINYDRM_ST7586 is not set\n# CONFIG_TINYDRM_ST7735R is not set\n# CONFIG_DRM_PL111 is not set\nCONFIG_DRM_LIMA=y\n# CONFIG_DRM_PANFROST is not set\n# CONFIG_DRM_TIDSS is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_SSD130X is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_DRM_NOMODESET=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\nCONFIG_FB_MODE_HELPERS=y\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\n# CONFIG_LCD_CLASS_DEVICE is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\n# CONFIG_BACKLIGHT_KTD253 is not set\n# CONFIG_BACKLIGHT_PWM is not set\n# CONFIG_BACKLIGHT_QCOM_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\n# CONFIG_BACKLIGHT_GPIO is not set\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n# CONFIG_BACKLIGHT_LED is not set\n# end of Backlight & LCD device support\n\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_DUMMY_CONSOLE_COLUMNS=80\nCONFIG_DUMMY_CONSOLE_ROWS=25\nCONFIG_FRAMEBUFFER_CONSOLE=y\n# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\n# end of Console display driver support\n\n# CONFIG_LOGO is not set\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_HWDEP=m\nCONFIG_SND_RAWMIDI=m\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\n# CONFIG_SND_HRTIMER is not set\n# CONFIG_SND_DYNAMIC_MINORS is not set\nCONFIG_SND_SUPPORT_OLD_API=y\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_CTL_INPUT_VALIDATION is not set\n# CONFIG_SND_SEQUENCER is not set\nCONFIG_SND_DRIVERS=y\n# CONFIG_SND_DUMMY is not set\n# CONFIG_SND_ALOOP is not set\n# CONFIG_SND_MTPAV is not set\n# CONFIG_SND_SERIAL_U16550 is not set\n# CONFIG_SND_SERIAL_GENERIC is not set\n# CONFIG_SND_MPU401 is not set\n\n#\n# HD-Audio\n#\n# end of HD-Audio\n\nCONFIG_SND_HDA_PREALLOC_SIZE=64\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=m\nCONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y\n# CONFIG_SND_USB_UA101 is not set\n# CONFIG_SND_USB_CAIAQ is not set\n# CONFIG_SND_USB_6FIRE is not set\n# CONFIG_SND_USB_HIFACE is not set\n# CONFIG_SND_BCD2000 is not set\n# CONFIG_SND_USB_POD is not set\n# CONFIG_SND_USB_PODHD is not set\n# CONFIG_SND_USB_TONEPORT is not set\n# CONFIG_SND_USB_VARIAX is not set\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\n# CONFIG_SND_SOC_ADI is not set\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_AMD_ACP_CONFIG is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_AUDMIX is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_FSL_MICFIL is not set\n# CONFIG_SND_SOC_FSL_XCVR is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\nCONFIG_SND_SOC_ROCKCHIP=y\nCONFIG_SND_SOC_ROCKCHIP_I2S=y\nCONFIG_SND_SOC_ROCKCHIP_I2S_TDM=y\nCONFIG_SND_SOC_ROCKCHIP_PDM=m\nCONFIG_SND_SOC_ROCKCHIP_SPDIF=y\nCONFIG_SND_SOC_ROCKCHIP_MAX98090=m\nCONFIG_SND_SOC_ROCKCHIP_RT5645=m\nCONFIG_SND_SOC_RK3288_HDMI_ANALOG=m\nCONFIG_SND_SOC_RK3399_GRU_SOUND=m\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_SPI is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\n# CONFIG_SND_SOC_ADAU7002 is not set\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4375 is not set\n# CONFIG_SND_SOC_AK4458 is not set\n# CONFIG_SND_SOC_AK4554 is not set\nCONFIG_SND_SOC_AK4613=m\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_AW8738 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS35L41_SPI is not set\n# CONFIG_SND_SOC_CS35L41_I2C is not set\n# CONFIG_SND_SOC_CS35L45_SPI is not set\n# CONFIG_SND_SOC_CS35L45_I2C is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS42L83 is not set\n# CONFIG_SND_SOC_CS4234 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\n# CONFIG_SND_SOC_DA7213 is not set\nCONFIG_SND_SOC_DA7219=m\nCONFIG_SND_SOC_DMIC=m\nCONFIG_SND_SOC_HDMI_CODEC=y\n# CONFIG_SND_SOC_ES7134 is not set\n# CONFIG_SND_SOC_ES7241 is not set\nCONFIG_SND_SOC_ES8316=y\n# CONFIG_SND_SOC_ES8326 is not set\nCONFIG_SND_SOC_ES8328=m\nCONFIG_SND_SOC_ES8328_I2C=m\nCONFIG_SND_SOC_ES8328_SPI=m\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_HDA is not set\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\n# CONFIG_SND_SOC_MAX98088 is not set\nCONFIG_SND_SOC_MAX98090=m\nCONFIG_SND_SOC_MAX98357A=m\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98520 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX98396 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_ANALOG is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM179X_SPI is not set\n# CONFIG_SND_SOC_PCM186X_I2C is not set\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3060_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\n# CONFIG_SND_SOC_PCM5102A is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\nCONFIG_SND_SOC_RK3328=y\n# CONFIG_SND_SOC_RK817 is not set\nCONFIG_SND_SOC_RL6231=m\nCONFIG_SND_SOC_RT5514=m\nCONFIG_SND_SOC_RT5514_SPI=m\n# CONFIG_SND_SOC_RT5616 is not set\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\nCONFIG_SND_SOC_RT5645=m\n# CONFIG_SND_SOC_RT5659 is not set\n# CONFIG_SND_SOC_RT9120 is not set\n# CONFIG_SND_SOC_SGTL5000 is not set\n# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\nCONFIG_SND_SOC_SPDIF=y\n# CONFIG_SND_SOC_SRC4XXX_I2C is not set\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS2780 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805M is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320ADC3XXX is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\nCONFIG_SND_SOC_TS3A227E=m\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731_I2C is not set\n# CONFIG_SND_SOC_WM8731_SPI is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8940 is not set\n# CONFIG_SND_SOC_WM8960 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_ZL38060 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8821 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\n# end of CODEC drivers\n\nCONFIG_SND_SIMPLE_CARD_UTILS=y\nCONFIG_SND_SIMPLE_CARD=y\nCONFIG_SND_AUDIO_GRAPH_CARD=y\n# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set\n# CONFIG_SND_TEST_COMPONENT is not set\n# CONFIG_SND_VIRTIO is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\n# CONFIG_HID_APPLEIR is not set\nCONFIG_HID_ASUS=y\nCONFIG_HID_AUREAL=y\nCONFIG_HID_BELKIN=y\n# CONFIG_HID_BETOP_FF is not set\nCONFIG_HID_BIGBEN_FF=m\nCONFIG_HID_CHERRY=y\nCONFIG_HID_CHICONY=y\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\nCONFIG_HID_CYPRESS=y\nCONFIG_HID_DRAGONRISE=m\nCONFIG_DRAGONRISE_FF=y\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\nCONFIG_HID_EZKEY=y\n# CONFIG_HID_FT260 is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_GLORIOUS is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\nCONFIG_HID_KYE=y\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_VRC2 is not set\n# CONFIG_HID_XIAOMI is not set\nCONFIG_HID_GYRATION=y\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_ITE is not set\n# CONFIG_HID_JABRA is not set\nCONFIG_HID_TWINHAN=y\nCONFIG_HID_KENSINGTON=y\nCONFIG_HID_LCPOWER=y\n# CONFIG_HID_LED is not set\nCONFIG_HID_LENOVO=y\n# CONFIG_HID_LETSKETCH is not set\nCONFIG_HID_LOGITECH=y\nCONFIG_HID_LOGITECH_DJ=y\nCONFIG_HID_LOGITECH_HIDPP=y\nCONFIG_LOGITECH_FF=y\nCONFIG_LOGIRUMBLEPAD2_FF=y\nCONFIG_LOGIG940_FF=y\nCONFIG_LOGIWHEELS_FF=y\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_MEGAWORLD_FF is not set\n# CONFIG_HID_REDRAGON is not set\nCONFIG_HID_MICROSOFT=y\nCONFIG_HID_MONTEREY=y\nCONFIG_HID_MULTITOUCH=m\nCONFIG_HID_NINTENDO=m\nCONFIG_NINTENDO_FF=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\nCONFIG_HID_ORTEK=y\nCONFIG_HID_OUYA=y\nCONFIG_HID_PANTHERLORD=y\nCONFIG_PANTHERLORD_FF=y\nCONFIG_HID_PENMOUNT=y\nCONFIG_HID_PETALYNX=y\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PXRC is not set\n# CONFIG_HID_RAZER is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\nCONFIG_HID_SAMSUNG=y\n# CONFIG_HID_SEMITEK is not set\n# CONFIG_HID_SIGMAMICRO is not set\nCONFIG_HID_SONY=y\nCONFIG_SONY_FF=y\n# CONFIG_HID_SPEEDLINK is not set\nCONFIG_HID_STEAM=m\n# CONFIG_HID_STEELSERIES is not set\nCONFIG_HID_SUNPLUS=y\n# CONFIG_HID_RMI is not set\n# CONFIG_HID_GREENASIA is not set\nCONFIG_HID_SMARTJOYPLUS=m\nCONFIG_SMARTJOYPLUS_FF=y\nCONFIG_HID_TIVO=y\nCONFIG_HID_TOPSEED=y\n# CONFIG_HID_TOPRE is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\nCONFIG_HID_WIIMOTE=m\nCONFIG_HID_XINMO=y\n# CONFIG_HID_ZEROPLUS is not set\nCONFIG_HID_ZYDACRON=y\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n# end of USB HID support\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID_OF is not set\n# CONFIG_I2C_HID_OF_ELAN is not set\n# CONFIG_I2C_HID_OF_GOODIX is not set\n# end of I2C HID support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\nCONFIG_USB_ULPI_BUS=y\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\nCONFIG_USB_OTG=y\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set\n# CONFIG_USB_OTG_FSM is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\n# CONFIG_USB_MON is not set\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\n# CONFIG_USB_XHCI_DBGCAP is not set\n# CONFIG_USB_XHCI_PCI_RENESAS is not set\nCONFIG_USB_XHCI_PLATFORM=y\nCONFIG_USB_EHCI_HCD=y\nCONFIG_USB_EHCI_ROOT_HUB_TT=y\nCONFIG_USB_EHCI_TT_NEWSCHED=y\n# CONFIG_USB_EHCI_FSL is not set\nCONFIG_USB_EHCI_HCD_PLATFORM=y\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\nCONFIG_USB_OHCI_HCD=y\nCONFIG_USB_OHCI_HCD_PLATFORM=y\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_BCMA is not set\n# CONFIG_USB_HCD_SSB is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=y\n# CONFIG_USB_PRINTER is not set\n# CONFIG_USB_WDM is not set\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\nCONFIG_USB_UAS=y\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\nCONFIG_USB_MUSB_HDRC=y\n# CONFIG_USB_MUSB_HOST is not set\n# CONFIG_USB_MUSB_GADGET is not set\nCONFIG_USB_MUSB_DUAL_ROLE=y\n\n#\n# Platform Glue Layer\n#\n\n#\n# MUSB DMA mode\n#\n# CONFIG_MUSB_PIO_ONLY is not set\nCONFIG_USB_DWC3=y\n# CONFIG_USB_DWC3_ULPI is not set\n# CONFIG_USB_DWC3_HOST is not set\n# CONFIG_USB_DWC3_GADGET is not set\nCONFIG_USB_DWC3_DUAL_ROLE=y\n\n#\n# Platform Glue Driver Support\n#\nCONFIG_USB_DWC3_OF_SIMPLE=y\nCONFIG_USB_DWC2=y\n# CONFIG_USB_DWC2_HOST is not set\n\n#\n# Gadget/Dual-role mode requires USB Gadget support to be enabled\n#\n# CONFIG_USB_DWC2_PERIPHERAL is not set\nCONFIG_USB_DWC2_DUAL_ROLE=y\n# CONFIG_USB_DWC2_DEBUG is not set\n# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set\nCONFIG_USB_CHIPIDEA=y\nCONFIG_USB_CHIPIDEA_UDC=y\nCONFIG_USB_CHIPIDEA_HOST=y\nCONFIG_USB_CHIPIDEA_MSM=y\nCONFIG_USB_CHIPIDEA_IMX=y\nCONFIG_USB_CHIPIDEA_GENERIC=y\nCONFIG_USB_CHIPIDEA_TEGRA=y\nCONFIG_USB_ISP1760=y\nCONFIG_USB_ISP1760_HCD=y\nCONFIG_USB_ISP1761_UDC=y\n# CONFIG_USB_ISP1760_HOST_ROLE is not set\n# CONFIG_USB_ISP1760_GADGET_ROLE is not set\nCONFIG_USB_ISP1760_DUAL_ROLE=y\n\n#\n# USB port drivers\n#\n# CONFIG_USB_SERIAL is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\n# CONFIG_USB_EZUSB_FX2 is not set\n# CONFIG_USB_HUB_USB251XB is not set\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n# CONFIG_USB_ONBOARD_HUB is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\nCONFIG_NOP_USB_XCEIV=y\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\nCONFIG_USB_ULPI=y\nCONFIG_USB_ULPI_VIEWPORT=y\n# end of USB Physical Layer drivers\n\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\n# CONFIG_USB_GADGET_DEBUG_FILES is not set\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=2\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\n# CONFIG_USB_SNP_UDC_PLAT is not set\n# CONFIG_USB_M66592 is not set\n# CONFIG_USB_BDC_UDC is not set\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_GADGET_XILINX is not set\n# CONFIG_USB_MAX3420_UDC is not set\n# CONFIG_USB_DUMMY_HCD is not set\n# end of USB Peripheral Controller\n\n# CONFIG_USB_CONFIGFS is not set\n\n#\n# USB Gadget precomposed configurations\n#\n# CONFIG_USB_ZERO is not set\n# CONFIG_USB_AUDIO is not set\n# CONFIG_USB_ETH is not set\n# CONFIG_USB_G_NCM is not set\n# CONFIG_USB_GADGETFS is not set\n# CONFIG_USB_FUNCTIONFS is not set\n# CONFIG_USB_MASS_STORAGE is not set\n# CONFIG_USB_G_SERIAL is not set\n# CONFIG_USB_MIDI_GADGET is not set\n# CONFIG_USB_G_PRINTER is not set\n# CONFIG_USB_CDC_COMPOSITE is not set\n# CONFIG_USB_G_ACM_MS is not set\n# CONFIG_USB_G_MULTI is not set\n# CONFIG_USB_G_HID is not set\n# CONFIG_USB_G_DBGP is not set\n# CONFIG_USB_G_WEBCAM is not set\n# CONFIG_USB_RAW_GADGET is not set\n# end of USB Gadget precomposed configurations\n\n# CONFIG_TYPEC is not set\nCONFIG_USB_ROLE_SWITCH=y\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\n# CONFIG_PWRSEQ_SD8787 is not set\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_DEBUG is not set\nCONFIG_MMC_ARMMMCI=y\nCONFIG_MMC_STM32_SDMMC=y\nCONFIG_MMC_SDHCI=y\nCONFIG_MMC_SDHCI_PLTFM=y\nCONFIG_MMC_SDHCI_OF_ARASAN=y\n# CONFIG_MMC_SDHCI_OF_AT91 is not set\n# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set\n# CONFIG_MMC_SDHCI_CADENCE is not set\n# CONFIG_MMC_SDHCI_F_SDH30 is not set\n# CONFIG_MMC_SDHCI_MILBEAUT is not set\nCONFIG_MMC_SPI=y\nCONFIG_MMC_DW=y\nCONFIG_MMC_DW_PLTFM=y\n# CONFIG_MMC_DW_BLUEFIELD is not set\n# CONFIG_MMC_DW_EXYNOS is not set\n# CONFIG_MMC_DW_HI3798CV200 is not set\nCONFIG_MMC_DW_K3=y\nCONFIG_MMC_DW_ROCKCHIP=y\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_CQHCI=y\n# CONFIG_MMC_HSQ is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MMC_SDHCI_XENON is not set\n# CONFIG_MMC_SDHCI_OMAP is not set\n# CONFIG_MMC_SDHCI_AM654 is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\nCONFIG_LEDS_CLASS_FLASH=m\n# CONFIG_LEDS_CLASS_MULTICOLOR is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AN30259A is not set\n# CONFIG_LEDS_AW2013 is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_EL15203000 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_LP55XX_COMMON is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\nCONFIG_LEDS_PWM=y\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\nCONFIG_LEDS_SYSCON=y\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_SPI_BYTE is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\n# CONFIG_LEDS_AAT1290 is not set\n# CONFIG_LEDS_AS3645A is not set\n# CONFIG_LEDS_KTD2692 is not set\n# CONFIG_LEDS_LM3601X is not set\n# CONFIG_LEDS_RT4505 is not set\n# CONFIG_LEDS_RT8515 is not set\n# CONFIG_LEDS_SGM3140 is not set\n\n#\n# RGB LED drivers\n#\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\nCONFIG_LEDS_TRIGGER_TIMER=y\nCONFIG_LEDS_TRIGGER_ONESHOT=y\n# CONFIG_LEDS_TRIGGER_MTD is not set\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\n# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set\nCONFIG_LEDS_TRIGGER_CPU=y\nCONFIG_LEDS_TRIGGER_ACTIVITY=y\nCONFIG_LEDS_TRIGGER_GPIO=y\nCONFIG_LEDS_TRIGGER_DEFAULT_ON=y\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\n# CONFIG_LEDS_TRIGGER_TRANSIENT is not set\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\nCONFIG_LEDS_TRIGGER_PANIC=y\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\n# CONFIG_LEDS_TRIGGER_AUDIO is not set\n# CONFIG_LEDS_TRIGGER_TTY is not set\n\n#\n# Simple LED drivers\n#\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_SUPPORT=y\nCONFIG_EDAC=y\nCONFIG_EDAC_LEGACY_SYSFS=y\n# CONFIG_EDAC_DEBUG is not set\n# CONFIG_EDAC_XGENE is not set\n# CONFIG_EDAC_DMC520 is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_HYM8563 is not set\n# CONFIG_RTC_DRV_MAX6900 is not set\nCONFIG_RTC_DRV_MAX77686=y\n# CONFIG_RTC_DRV_NCT3018Y is not set\nCONFIG_RTC_DRV_RK808=y\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\n# CONFIG_RTC_DRV_PCF8563 is not set\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\nCONFIG_RTC_DRV_S5M=y\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\nCONFIG_RTC_DRV_DS3232=y\nCONFIG_RTC_DRV_DS3232_HWMON=y\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_OPTEE is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\nCONFIG_RTC_DRV_PL031=y\n# CONFIG_RTC_DRV_CADENCE is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_OF=y\n# CONFIG_ALTERA_MSGDMA is not set\n# CONFIG_AMBA_PL08X is not set\n# CONFIG_BCM_SBA_RAID is not set\n# CONFIG_DW_AXI_DMAC is not set\n# CONFIG_FSL_EDMA is not set\n# CONFIG_FSL_QDMA is not set\n# CONFIG_INTEL_IDMA64 is not set\n# CONFIG_MV_XOR_V2 is not set\nCONFIG_PL330_DMA=y\n# CONFIG_XILINX_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DPDMA is not set\n# CONFIG_QCOM_HIDMA_MGMT is not set\n# CONFIG_QCOM_HIDMA is not set\n# CONFIG_DW_DMAC is not set\n# CONFIG_SF_PDMA is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\n# CONFIG_UDMABUF is not set\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\nCONFIG_DMABUF_HEAPS=y\n# CONFIG_DMABUF_SYSFS_STATS is not set\nCONFIG_DMABUF_HEAPS_SYSTEM=y\nCONFIG_DMABUF_HEAPS_CMA=y\n# end of DMABUF options\n\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\nCONFIG_VFIO=y\nCONFIG_VFIO_IOMMU_TYPE1=y\n# CONFIG_VFIO_NOIOMMU is not set\n# CONFIG_VFIO_PLATFORM is not set\n# CONFIG_VFIO_MDEV is not set\n# CONFIG_VIRT_DRIVERS is not set\nCONFIG_VIRTIO_ANCHOR=y\nCONFIG_VIRTIO=y\nCONFIG_VIRTIO_MENU=y\nCONFIG_VIRTIO_BALLOON=y\n# CONFIG_VIRTIO_INPUT is not set\nCONFIG_VIRTIO_MMIO=y\n# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set\n# CONFIG_VDPA is not set\nCONFIG_VHOST_MENU=y\n# CONFIG_VHOST_NET is not set\n# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# end of Microsoft Hyper-V guest support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_RTLLIB is not set\nCONFIG_RTL8723BS=m\n# CONFIG_R8712U is not set\nCONFIG_R8188EU=m\n# CONFIG_VT6656 is not set\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16240 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7816 is not set\n# end of Analog to digital converters\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n# end of Analog digital bi-direction converters\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n# end of Direct Digital Synthesis\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n# end of Network Analyzer, Impedance Converters\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7854 is not set\n# end of Active energy metering IC\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S1210 is not set\n# end of Resolver to digital converters\n# end of IIO staging drivers\n\nCONFIG_STAGING_MEDIA=y\n# CONFIG_VIDEO_MAX96712 is not set\nCONFIG_VIDEO_ROCKCHIP_VDEC=m\nCONFIG_STAGING_MEDIA_DEPRECATED=y\n# CONFIG_VIDEO_CPIA2 is not set\n# CONFIG_VIDEO_STKWEBCAM is not set\nCONFIG_VIDEO_TM6000=m\nCONFIG_VIDEO_TM6000_ALSA=m\nCONFIG_VIDEO_TM6000_DVB=m\n# CONFIG_USB_ZR364XX is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_KS7010 is not set\n# CONFIG_PI433 is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_FIELDBUS_DEV is not set\n# CONFIG_GOLDFISH is not set\nCONFIG_CHROME_PLATFORMS=y\n# CONFIG_CROS_EC is not set\n# CONFIG_MELLANOX_PLATFORM is not set\n# CONFIG_SURFACE_PLATFORMS is not set\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Clock driver for ARM Reference designs\n#\n# CONFIG_CLK_ICST is not set\n# CONFIG_CLK_SP810 is not set\n# end of Clock driver for ARM Reference designs\n\n# CONFIG_LMK04832 is not set\n# CONFIG_COMMON_CLK_MAX77686 is not set\n# CONFIG_COMMON_CLK_MAX9485 is not set\nCONFIG_COMMON_CLK_RK808=y\nCONFIG_COMMON_CLK_SCPI=y\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\nCONFIG_COMMON_CLK_CS2000_CP=y\nCONFIG_COMMON_CLK_S2MPS11=y\n# CONFIG_COMMON_CLK_AXI_CLKGEN is not set\nCONFIG_COMMON_CLK_XGENE=y\nCONFIG_COMMON_CLK_PWM=y\n# CONFIG_COMMON_CLK_RS9_PCIE is not set\n# CONFIG_COMMON_CLK_VC5 is not set\n# CONFIG_COMMON_CLK_VC7 is not set\n# CONFIG_COMMON_CLK_FIXED_MMIO is not set\nCONFIG_COMMON_CLK_ROCKCHIP=y\n# CONFIG_CLK_PX30 is not set\n# CONFIG_CLK_RK3308 is not set\nCONFIG_CLK_RK3328=y\n# CONFIG_CLK_RK3368 is not set\n# CONFIG_CLK_RK3399 is not set\n# CONFIG_CLK_RK3568 is not set\n# CONFIG_XILINX_VCU is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\nCONFIG_HWSPINLOCK=y\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\nCONFIG_CLKSRC_MMIO=y\nCONFIG_ROCKCHIP_TIMER=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y\nCONFIG_FSL_ERRATUM_A008585=y\nCONFIG_HISILICON_ERRATUM_161010101=y\nCONFIG_ARM64_ERRATUM_858921=y\n# CONFIG_MICROCHIP_PIT64B is not set\n# end of Clock Source drivers\n\nCONFIG_MAILBOX=y\nCONFIG_ARM_MHU=y\nCONFIG_ARM_MHU_V2=m\nCONFIG_PLATFORM_MHU=y\n# CONFIG_PL320_MBOX is not set\nCONFIG_ROCKCHIP_MBOX=y\n# CONFIG_ALTERA_MBOX is not set\n# CONFIG_MAILBOX_TEST is not set\nCONFIG_IOMMU_IOVA=y\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\nCONFIG_IOMMU_IO_PGTABLE=y\nCONFIG_IOMMU_IO_PGTABLE_LPAE=y\n# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set\n# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set\n# CONFIG_IOMMU_IO_PGTABLE_DART is not set\n# end of Generic IOMMU Pagetable Support\n\n# CONFIG_IOMMU_DEBUGFS is not set\nCONFIG_IOMMU_DEFAULT_DMA_STRICT=y\n# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set\n# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set\nCONFIG_OF_IOMMU=y\nCONFIG_IOMMU_DMA=y\nCONFIG_ROCKCHIP_IOMMU=y\nCONFIG_ARM_SMMU=y\n# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set\nCONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y\nCONFIG_ARM_SMMU_V3=y\n# CONFIG_ARM_SMMU_V3_SVA is not set\n# CONFIG_VIRTIO_IOMMU is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\n# CONFIG_RPMSG_QCOM_GLINK_RPM is not set\n# CONFIG_RPMSG_VIRTIO is not set\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\n# CONFIG_SOC_BRCMSTB is not set\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# CONFIG_QUICC_ENGINE is not set\n# CONFIG_FSL_RCPM is not set\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# fujitsu SoC drivers\n#\n# end of fujitsu SoC drivers\n\n#\n# i.MX SoC drivers\n#\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# CONFIG_LITEX_SOC_CONTROLLER is not set\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# end of Qualcomm SoC drivers\n\nCONFIG_ROCKCHIP_GRF=y\nCONFIG_ROCKCHIP_IODOMAIN=y\nCONFIG_ROCKCHIP_PM_DOMAINS=y\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y\nCONFIG_DEVFREQ_GOV_PERFORMANCE=y\nCONFIG_DEVFREQ_GOV_POWERSAVE=y\nCONFIG_DEVFREQ_GOV_USERSPACE=y\nCONFIG_DEVFREQ_GOV_PASSIVE=y\n\n#\n# DEVFREQ Drivers\n#\n# CONFIG_ARM_RK3399_DMC_DEVFREQ is not set\nCONFIG_PM_DEVFREQ_EVENT=y\n# CONFIG_DEVFREQ_EVENT_ROCKCHIP_DFI is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_FSA9480 is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_PTN5150 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\nCONFIG_EXTCON_USB_GPIO=y\n# CONFIG_MEMORY is not set\nCONFIG_IIO=y\nCONFIG_IIO_BUFFER=y\n# CONFIG_IIO_BUFFER_CB is not set\n# CONFIG_IIO_BUFFER_DMA is not set\n# CONFIG_IIO_BUFFER_DMAENGINE is not set\n# CONFIG_IIO_BUFFER_HW_CONSUMER is not set\nCONFIG_IIO_KFIFO_BUF=y\nCONFIG_IIO_TRIGGERED_BUFFER=y\n# CONFIG_IIO_CONFIGFS is not set\nCONFIG_IIO_TRIGGER=y\nCONFIG_IIO_CONSUMERS_PER_TRIGGER=2\n# CONFIG_IIO_SW_DEVICE is not set\n# CONFIG_IIO_SW_TRIGGER is not set\n# CONFIG_IIO_TRIGGERED_EVENT is not set\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADXL313_I2C is not set\n# CONFIG_ADXL313_SPI is not set\n# CONFIG_ADXL345_I2C is not set\n# CONFIG_ADXL345_SPI is not set\n# CONFIG_ADXL355_I2C is not set\n# CONFIG_ADXL355_SPI is not set\n# CONFIG_ADXL367_SPI is not set\n# CONFIG_ADXL367_I2C is not set\n# CONFIG_ADXL372_SPI is not set\n# CONFIG_ADXL372_I2C is not set\n# CONFIG_BMA180 is not set\n# CONFIG_BMA220 is not set\n# CONFIG_BMA400 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_BMI088_ACCEL is not set\n# CONFIG_DA280 is not set\n# CONFIG_DA311 is not set\n# CONFIG_DMARD06 is not set\n# CONFIG_DMARD09 is not set\n# CONFIG_DMARD10 is not set\n# CONFIG_FXLS8962AF_I2C is not set\n# CONFIG_FXLS8962AF_SPI is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MC3230 is not set\n# CONFIG_MMA7455_I2C is not set\n# CONFIG_MMA7455_SPI is not set\n# CONFIG_MMA7660 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MSA311 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_MXC6255 is not set\n# CONFIG_SCA3000 is not set\n# CONFIG_SCA3300 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7091R5 is not set\n# CONFIG_AD7124 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7266 is not set\n# CONFIG_AD7280 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7292 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7606_IFACE_PARALLEL is not set\n# CONFIG_AD7606_IFACE_SPI is not set\n# CONFIG_AD7766 is not set\n# CONFIG_AD7768_1 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD7949 is not set\n# CONFIG_AD799X is not set\n# CONFIG_ADI_AXI_ADC is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_ENVELOPE_DETECTOR is not set\n# CONFIG_HI8435 is not set\n# CONFIG_HX711 is not set\n# CONFIG_INA2XX_ADC is not set\n# CONFIG_LTC2471 is not set\n# CONFIG_LTC2485 is not set\n# CONFIG_LTC2496 is not set\n# CONFIG_LTC2497 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX11100 is not set\n# CONFIG_MAX1118 is not set\n# CONFIG_MAX11205 is not set\n# CONFIG_MAX1241 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MAX9611 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_MCP3911 is not set\n# CONFIG_NAU7802 is not set\n# CONFIG_QCOM_SPMI_IADC is not set\n# CONFIG_QCOM_SPMI_VADC is not set\n# CONFIG_QCOM_SPMI_ADC5 is not set\nCONFIG_ROCKCHIP_SARADC=y\n# CONFIG_RICHTEK_RTQ6056 is not set\n# CONFIG_SD_ADC_MODULATOR is not set\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC0832 is not set\n# CONFIG_TI_ADC084S021 is not set\n# CONFIG_TI_ADC12138 is not set\n# CONFIG_TI_ADC108S102 is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_TI_ADC161S626 is not set\n# CONFIG_TI_ADS1015 is not set\n# CONFIG_TI_ADS7950 is not set\n# CONFIG_TI_ADS8344 is not set\n# CONFIG_TI_ADS8688 is not set\n# CONFIG_TI_ADS124S08 is not set\n# CONFIG_TI_ADS131E08 is not set\n# CONFIG_TI_TLC4541 is not set\n# CONFIG_TI_TSC2046 is not set\n# CONFIG_VF610_ADC is not set\n# CONFIG_XILINX_XADC is not set\n# end of Analog to digital converters\n\n#\n# Analog to digital and digital to analog converters\n#\n# CONFIG_AD74413R is not set\n# end of Analog to digital and digital to analog converters\n\n#\n# Analog Front Ends\n#\n# CONFIG_IIO_RESCALE is not set\n# end of Analog Front Ends\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n# CONFIG_ADA4250 is not set\n# CONFIG_HMC425 is not set\n# end of Amplifiers\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7746 is not set\n# end of Capacitance to digital converters\n\n#\n# Chemical Sensors\n#\n# CONFIG_ATLAS_PH_SENSOR is not set\n# CONFIG_ATLAS_EZO_SENSOR is not set\n# CONFIG_BME680 is not set\n# CONFIG_CCS811 is not set\n# CONFIG_IAQCORE is not set\n# CONFIG_PMS7003 is not set\n# CONFIG_SCD30_CORE is not set\n# CONFIG_SCD4X is not set\n# CONFIG_SENSIRION_SGP30 is not set\n# CONFIG_SENSIRION_SGP40 is not set\n# CONFIG_SPS30_I2C is not set\n# CONFIG_SPS30_SERIAL is not set\n# CONFIG_SENSEAIR_SUNRISE_CO2 is not set\n# CONFIG_VZ89X is not set\n# end of Chemical Sensors\n\n#\n# Hid Sensor IIO Common\n#\n# end of Hid Sensor IIO Common\n\n#\n# IIO SCMI Sensors\n#\n# end of IIO SCMI Sensors\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n# end of SSP Sensor Common\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD3552R is not set\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5592R is not set\n# CONFIG_AD5593R is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_LTC2688 is not set\n# CONFIG_AD5686_SPI is not set\n# CONFIG_AD5696_I2C is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5758 is not set\n# CONFIG_AD5761 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5766 is not set\n# CONFIG_AD5770R is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7293 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_AD8801 is not set\n# CONFIG_DPOT_DAC is not set\n# CONFIG_DS4424 is not set\n# CONFIG_LTC1660 is not set\n# CONFIG_LTC2632 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n# CONFIG_TI_DAC082S085 is not set\n# CONFIG_TI_DAC5571 is not set\n# CONFIG_TI_DAC7311 is not set\n# CONFIG_TI_DAC7612 is not set\n# CONFIG_VF610_DAC is not set\n# end of Digital to analog converters\n\n#\n# IIO dummy driver\n#\n# end of IIO dummy driver\n\n#\n# Filters\n#\n# CONFIG_ADMV8818 is not set\n# end of Filters\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n# end of Clock Generator/Distribution\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n# CONFIG_ADF4371 is not set\n# CONFIG_ADMV1013 is not set\n# CONFIG_ADMV1014 is not set\n# CONFIG_ADMV4420 is not set\n# CONFIG_ADRF6780 is not set\n# end of Phase-Locked Loop (PLL) frequency synthesizers\n# end of Frequency Synthesizers DDS/PLL\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS290 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_FXAS21002C is not set\n# CONFIG_MPU3050_I2C is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n# end of Digital gyroscope sensors\n\n#\n# Health Sensors\n#\n\n#\n# Heart Rate Monitors\n#\n# CONFIG_AFE4403 is not set\n# CONFIG_AFE4404 is not set\n# CONFIG_MAX30100 is not set\n# CONFIG_MAX30102 is not set\n# end of Heart Rate Monitors\n# end of Health Sensors\n\n#\n# Humidity sensors\n#\n# CONFIG_AM2315 is not set\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HDC2010 is not set\n# CONFIG_HTS221 is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n# end of Humidity sensors\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16460 is not set\n# CONFIG_ADIS16475 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_BMI160_I2C is not set\n# CONFIG_BMI160_SPI is not set\n# CONFIG_BOSCH_BNO055_SERIAL is not set\n# CONFIG_BOSCH_BNO055_I2C is not set\n# CONFIG_FXOS8700_I2C is not set\n# CONFIG_FXOS8700_SPI is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_ICM42600_I2C is not set\n# CONFIG_INV_ICM42600_SPI is not set\n# CONFIG_INV_MPU6050_I2C is not set\n# CONFIG_INV_MPU6050_SPI is not set\n# CONFIG_IIO_ST_LSM6DSX is not set\n# CONFIG_IIO_ST_LSM9DS0 is not set\n# end of Inertial measurement units\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_ADUX1020 is not set\n# CONFIG_AL3010 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_AS73211 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_BH1780 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM3605 is not set\n# CONFIG_CM36651 is not set\n# CONFIG_GP2AP002 is not set\n# CONFIG_GP2AP020A00F is not set\n# CONFIG_SENSORS_ISL29018 is not set\n# CONFIG_SENSORS_ISL29028 is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_LTRF216A is not set\n# CONFIG_LV0104CS is not set\n# CONFIG_MAX44000 is not set\n# CONFIG_MAX44009 is not set\n# CONFIG_NOA1305 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_SI1133 is not set\n# CONFIG_SI1145 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_ST_UVIS25 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\n# CONFIG_SENSORS_TSL2563 is not set\n# CONFIG_TSL2583 is not set\n# CONFIG_TSL2591 is not set\n# CONFIG_TSL2772 is not set\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VCNL4035 is not set\n# CONFIG_VEML6030 is not set\n# CONFIG_VEML6070 is not set\n# CONFIG_VL6180 is not set\n# CONFIG_ZOPT2201 is not set\n# end of Light sensors\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8974 is not set\n# CONFIG_AK8975 is not set\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN_I2C is not set\n# CONFIG_BMC150_MAGN_SPI is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n# CONFIG_SENSORS_RM3100_I2C is not set\n# CONFIG_SENSORS_RM3100_SPI is not set\n# CONFIG_YAMAHA_YAS530 is not set\n# end of Magnetometer sensors\n\n#\n# Multiplexers\n#\n# CONFIG_IIO_MUX is not set\n# end of Multiplexers\n\n#\n# Inclinometer sensors\n#\n# end of Inclinometer sensors\n\n#\n# Triggers - standalone\n#\n# CONFIG_IIO_INTERRUPT_TRIGGER is not set\n# CONFIG_IIO_SYSFS_TRIGGER is not set\n# end of Triggers - standalone\n\n#\n# Linear and angular position sensors\n#\n# end of Linear and angular position sensors\n\n#\n# Digital potentiometers\n#\n# CONFIG_AD5110 is not set\n# CONFIG_AD5272 is not set\n# CONFIG_DS1803 is not set\n# CONFIG_MAX5432 is not set\n# CONFIG_MAX5481 is not set\n# CONFIG_MAX5487 is not set\n# CONFIG_MCP4018 is not set\n# CONFIG_MCP4131 is not set\n# CONFIG_MCP4531 is not set\n# CONFIG_MCP41010 is not set\n# CONFIG_TPL0102 is not set\n# end of Digital potentiometers\n\n#\n# Digital potentiostats\n#\n# CONFIG_LMP91000 is not set\n# end of Digital potentiostats\n\n#\n# Pressure sensors\n#\n# CONFIG_ABP060MG is not set\n# CONFIG_BMP280 is not set\n# CONFIG_DLHL60D is not set\n# CONFIG_DPS310 is not set\n# CONFIG_HP03 is not set\n# CONFIG_ICP10100 is not set\n# CONFIG_MPL115_I2C is not set\n# CONFIG_MPL115_SPI is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n# CONFIG_HP206C is not set\n# CONFIG_ZPA2326 is not set\n# end of Pressure sensors\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n# end of Lightning sensors\n\n#\n# Proximity and distance sensors\n#\n# CONFIG_ISL29501 is not set\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_MB1232 is not set\n# CONFIG_PING is not set\n# CONFIG_RFD77402 is not set\n# CONFIG_SRF04 is not set\n# CONFIG_SX9310 is not set\n# CONFIG_SX9324 is not set\n# CONFIG_SX9360 is not set\n# CONFIG_SX9500 is not set\n# CONFIG_SRF08 is not set\n# CONFIG_VCNL3020 is not set\n# CONFIG_VL53L0X_I2C is not set\n# end of Proximity and distance sensors\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1200 is not set\n# end of Resolver to digital converters\n\n#\n# Temperature sensors\n#\n# CONFIG_LTC2983 is not set\n# CONFIG_MAXIM_THERMOCOUPLE is not set\n# CONFIG_MLX90614 is not set\n# CONFIG_MLX90632 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TMP007 is not set\n# CONFIG_TMP117 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\n# CONFIG_MAX31856 is not set\n# CONFIG_MAX31865 is not set\n# end of Temperature sensors\n\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_DEBUG is not set\n# CONFIG_PWM_ATMEL_TCB is not set\n# CONFIG_PWM_CLK is not set\n# CONFIG_PWM_FSL_FTM is not set\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_PWM_ROCKCHIP=y\n# CONFIG_PWM_XILINX is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\nCONFIG_ARM_GIC_V3=y\nCONFIG_ARM_GIC_V3_ITS=y\n# CONFIG_AL_FIC is not set\n# CONFIG_XILINX_INTC is not set\nCONFIG_PARTITION_PERCPU=y\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\nCONFIG_ARCH_HAS_RESET_CONTROLLER=y\nCONFIG_RESET_CONTROLLER=y\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_RESET_TI_TPS380X is not set\n\n#\n# PHY Subsystem\n#\nCONFIG_GENERIC_PHY=y\n# CONFIG_PHY_XGENE is not set\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\n\n#\n# PHY drivers for Broadcom platforms\n#\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# end of PHY drivers for Broadcom platforms\n\n# CONFIG_PHY_CADENCE_TORRENT is not set\n# CONFIG_PHY_CADENCE_DPHY is not set\n# CONFIG_PHY_CADENCE_DPHY_RX is not set\n# CONFIG_PHY_CADENCE_SIERRA is not set\n# CONFIG_PHY_CADENCE_SALVO is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_LAN966X_SERDES is not set\n# CONFIG_PHY_CPCAP_USB is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\n# CONFIG_PHY_OCELOT_SERDES is not set\n# CONFIG_PHY_QCOM_USB_HS is not set\n# CONFIG_PHY_QCOM_USB_HSIC is not set\nCONFIG_PHY_ROCKCHIP_DP=y\n# CONFIG_PHY_ROCKCHIP_DPHY_RX0 is not set\nCONFIG_PHY_ROCKCHIP_EMMC=y\nCONFIG_PHY_ROCKCHIP_INNO_HDMI=y\nCONFIG_PHY_ROCKCHIP_INNO_USB2=y\n# CONFIG_PHY_ROCKCHIP_INNO_CSIDPHY is not set\n# CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY is not set\n# CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY is not set\nCONFIG_PHY_ROCKCHIP_PCIE=m\n# CONFIG_PHY_ROCKCHIP_SNPS_PCIE3 is not set\nCONFIG_PHY_ROCKCHIP_TYPEC=y\nCONFIG_PHY_ROCKCHIP_USB=y\n# CONFIG_PHY_SAMSUNG_USB2 is not set\n# CONFIG_PHY_TUSB1210 is not set\n# end of PHY Subsystem\n\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\n# CONFIG_ARM_CMN is not set\nCONFIG_ARM_PMU=y\n# CONFIG_ARM_DSU_PMU is not set\n# CONFIG_ARM_SPE_PMU is not set\n# end of Performance monitor support\n\nCONFIG_RAS=y\n\n#\n# Android\n#\n# CONFIG_ANDROID_BINDER_IPC is not set\n# end of Android\n\n# CONFIG_LIBNVDIMM is not set\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\n# CONFIG_NVMEM_RMEM is not set\nCONFIG_NVMEM_ROCKCHIP_EFUSE=y\nCONFIG_NVMEM_ROCKCHIP_OTP=m\n# CONFIG_NVMEM_SPMI_SDAM is not set\nCONFIG_NVMEM_U_BOOT_ENV=m\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\nCONFIG_TEE=y\nCONFIG_OPTEE=m\nCONFIG_MULTIPLEXER=y\n\n#\n# Multiplexer drivers\n#\n# CONFIG_MUX_ADG792A is not set\n# CONFIG_MUX_ADGS1408 is not set\n# CONFIG_MUX_GPIO is not set\n# CONFIG_MUX_MMIO is not set\n# end of Multiplexer drivers\n\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\n# CONFIG_PECI is not set\n# CONFIG_HTE is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_VALIDATE_FS_PARSER=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\nCONFIG_XFS_SUPPORT_V4=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\nCONFIG_F2FS_FS=y\nCONFIG_F2FS_STAT_FS=y\n# CONFIG_F2FS_FS_XATTR is not set\nCONFIG_F2FS_CHECK_FS=y\n# CONFIG_F2FS_FAULT_INJECTION is not set\n# CONFIG_F2FS_FS_COMPRESSION is not set\nCONFIG_F2FS_IOSTAT=y\n# CONFIG_F2FS_UNFAIR_RWSEM is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\nCONFIG_FANOTIFY_ACCESS_PERMISSIONS=y\nCONFIG_QUOTA=y\n# CONFIG_QUOTA_NETLINK_INTERFACE is not set\nCONFIG_PRINT_QUOTA_WARNING=y\n# CONFIG_QUOTA_DEBUG is not set\n# CONFIG_QFMT_V1 is not set\n# CONFIG_QFMT_V2 is not set\nCONFIG_QUOTACTL=y\nCONFIG_AUTOFS4_FS=y\nCONFIG_AUTOFS_FS=y\nCONFIG_FUSE_FS=m\nCONFIG_CUSE=m\n# CONFIG_VIRTIO_FS is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_XINO_AUTO is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n\n#\n# Caches\n#\nCONFIG_NETFS_SUPPORT=y\n# CONFIG_NETFS_STATS is not set\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_CACHEFILES is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=y\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=m\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=m\n# CONFIG_NTFS3_64BIT_CLUSTER is not set\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\n# CONFIG_PROC_KCORE is not set\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\nCONFIG_PROC_CHILDREN=y\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_TMPFS_INODE64 is not set\nCONFIG_ARCH_SUPPORTS_HUGETLBFS=y\n# CONFIG_HUGETLBFS is not set\nCONFIG_MEMFD_CREATE=y\nCONFIG_ARCH_HAS_GIGANTIC_PAGE=y\nCONFIG_CONFIGFS_FS=y\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\nCONFIG_HFS_FS=y\nCONFIG_HFSPLUS_FS=y\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_JFFS2_FS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\nCONFIG_SQUASHFS_FILE_CACHE=y\n# CONFIG_SQUASHFS_FILE_DIRECT is not set\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\nCONFIG_PSTORE=y\nCONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240\nCONFIG_PSTORE_DEFLATE_COMPRESS=y\n# CONFIG_PSTORE_LZO_COMPRESS is not set\n# CONFIG_PSTORE_LZ4_COMPRESS is not set\n# CONFIG_PSTORE_LZ4HC_COMPRESS is not set\n# CONFIG_PSTORE_842_COMPRESS is not set\n# CONFIG_PSTORE_ZSTD_COMPRESS is not set\nCONFIG_PSTORE_COMPRESS=y\nCONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y\nCONFIG_PSTORE_COMPRESS_DEFAULT=\"deflate\"\nCONFIG_PSTORE_CONSOLE=y\nCONFIG_PSTORE_PMSG=y\nCONFIG_PSTORE_RAM=y\n# CONFIG_PSTORE_BLK is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EROFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\n# CONFIG_NFS_SWAP is not set\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\nCONFIG_NFS_V4_1_MIGRATION=y\nCONFIG_NFS_V4_SECURITY_LABEL=y\nCONFIG_ROOT_NFS=y\nCONFIG_NFS_FSCACHE=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFS_DISABLE_UDP_SUPPORT=y\n# CONFIG_NFS_V4_2_READ_PLUS is not set\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_COMMON=y\nCONFIG_NFS_V4_2_SSC_HELPER=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS2=y\nCONFIG_CIFS_ALLOW_INSECURE_LEGACY=y\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\nCONFIG_CIFS_DEBUG=y\n# CONFIG_CIFS_DEBUG2 is not set\n# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\n# CONFIG_CIFS_SWN_UPCALL is not set\nCONFIG_CIFS_FSCACHE=y\n# CONFIG_CIFS_ROOT is not set\n# CONFIG_SMB_SERVER is not set\nCONFIG_SMBFS=y\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_KEYS_REQUEST_CACHE is not set\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\nCONFIG_KEY_DH_OPERATIONS=y\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\nCONFIG_SECURITY=y\n# CONFIG_SECURITYFS is not set\n# CONFIG_SECURITY_NETWORK is not set\n# CONFIG_SECURITY_PATH is not set\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\n# CONFIG_SECURITY_SMACK is not set\n# CONFIG_SECURITY_TOMOYO is not set\n# CONFIG_SECURITY_APPARMOR is not set\n# CONFIG_SECURITY_LOADPIN is not set\n# CONFIG_SECURITY_YAMA is not set\n# CONFIG_SECURITY_SAFESETID is not set\n# CONFIG_SECURITY_LOCKDOWN_LSM is not set\n# CONFIG_SECURITY_LANDLOCK is not set\nCONFIG_INTEGRITY=y\n# CONFIG_INTEGRITY_SIGNATURE is not set\n# CONFIG_IMA is not set\n# CONFIG_EVM is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_LSM=\"yama,loadpin,safesetid,integrity\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_GCC_PLUGIN_STACKLEAK is not set\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n\nCONFIG_RANDSTRUCT_NONE=y\n# CONFIG_RANDSTRUCT_FULL is not set\n# CONFIG_RANDSTRUCT_PERFORMANCE is not set\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_CRYPTD=y\nCONFIG_CRYPTO_AUTHENC=y\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_ENGINE=m\n# end of Crypto core or helper\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_DH=y\n# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set\nCONFIG_CRYPTO_ECC=m\nCONFIG_CRYPTO_ECDH=m\n# CONFIG_CRYPTO_ECDSA is not set\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\nCONFIG_CRYPTO_CURVE25519=m\n# end of Public-key cryptography\n\n#\n# Block ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\n# CONFIG_CRYPTO_ARIA is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\nCONFIG_CRYPTO_SM4=y\n# CONFIG_CRYPTO_SM4_GENERIC is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n# end of Block ciphers\n\n#\n# Length-preserving ciphers and modes\n#\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_ARC4 is not set\nCONFIG_CRYPTO_CHACHA20=m\nCONFIG_CRYPTO_CBC=y\n# CONFIG_CRYPTO_CFB is not set\nCONFIG_CRYPTO_CTR=y\n# CONFIG_CRYPTO_CTS is not set\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_HCTR2 is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_OFB is not set\n# CONFIG_CRYPTO_PCBC is not set\n# CONFIG_CRYPTO_XTS is not set\nCONFIG_CRYPTO_NHPOLY1305=y\n# end of Length-preserving ciphers and modes\n\n#\n# AEAD (authenticated encryption with associated data) ciphers\n#\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\n# CONFIG_CRYPTO_ESSIV is not set\n# end of AEAD (authenticated encryption with associated data) ciphers\n\n#\n# Hashes, digests, and MACs\n#\nCONFIG_CRYPTO_BLAKE2B=m\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\nCONFIG_CRYPTO_POLYVAL=y\nCONFIG_CRYPTO_POLY1305=m\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\nCONFIG_CRYPTO_SM3=y\n# CONFIG_CRYPTO_SM3_GENERIC is not set\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_VMAC is not set\n# CONFIG_CRYPTO_WP512 is not set\n# CONFIG_CRYPTO_XCBC is not set\nCONFIG_CRYPTO_XXHASH=m\n# end of Hashes, digests, and MACs\n\n#\n# CRCs (cyclic redundancy checks)\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=y\n# CONFIG_CRYPTO_CRCT10DIF is not set\n# end of CRCs (cyclic redundancy checks)\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=y\n# CONFIG_CRYPTO_LZO is not set\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n# end of Compression\n\n#\n# Random number generation\n#\nCONFIG_CRYPTO_ANSI_CPRNG=y\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_KDF800108_CTR=y\n# end of Random number generation\n\n#\n# Userspace interface\n#\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\n# CONFIG_CRYPTO_USER_API_AEAD is not set\nCONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y\n# end of Userspace interface\n\nCONFIG_CRYPTO_HASH_INFO=y\nCONFIG_CRYPTO_NHPOLY1305_NEON=y\nCONFIG_CRYPTO_CHACHA20_NEON=y\n\n#\n# Accelerated Cryptographic Algorithms for CPU (arm64)\n#\nCONFIG_CRYPTO_GHASH_ARM64_CE=y\nCONFIG_CRYPTO_POLY1305_NEON=y\nCONFIG_CRYPTO_SHA1_ARM64_CE=y\nCONFIG_CRYPTO_SHA256_ARM64=y\nCONFIG_CRYPTO_SHA2_ARM64_CE=y\nCONFIG_CRYPTO_SHA512_ARM64=y\nCONFIG_CRYPTO_SHA512_ARM64_CE=y\n# CONFIG_CRYPTO_SHA3_ARM64 is not set\nCONFIG_CRYPTO_SM3_NEON=y\n# CONFIG_CRYPTO_SM3_ARM64_CE is not set\nCONFIG_CRYPTO_POLYVAL_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64=y\nCONFIG_CRYPTO_AES_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64_CE_BLK=y\nCONFIG_CRYPTO_AES_ARM64_NEON_BLK=y\nCONFIG_CRYPTO_AES_ARM64_BS=y\n# CONFIG_CRYPTO_SM4_ARM64_CE is not set\nCONFIG_CRYPTO_SM4_ARM64_CE_BLK=y\nCONFIG_CRYPTO_SM4_ARM64_NEON_BLK=y\nCONFIG_CRYPTO_AES_ARM64_CE_CCM=y\n# end of Accelerated Cryptographic Algorithms for CPU (arm64)\n\nCONFIG_CRYPTO_HW=y\n# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set\n# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set\n# CONFIG_CRYPTO_DEV_CCP is not set\n# CONFIG_CRYPTO_DEV_ROCKCHIP is not set\nCONFIG_CRYPTO_DEV_VIRTIO=m\n# CONFIG_CRYPTO_DEV_SAFEXCEL is not set\n# CONFIG_CRYPTO_DEV_CCREE is not set\n# CONFIG_CRYPTO_DEV_HISI_SEC is not set\n# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n# CONFIG_FIPS_SIGNATURE_SELFTEST is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\nCONFIG_RAID6_PQ_BENCHMARK=y\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_CORDIC=m\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_ARCH_HAS_FAST_MULTIPLIER=y\nCONFIG_ARCH_USE_SYM_ANNOTATIONS=y\n# CONFIG_INDIRECT_PIO is not set\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_UTILS=y\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=m\nCONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CHACHA_GENERIC=y\nCONFIG_CRYPTO_LIB_CHACHA=m\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=m\nCONFIG_CRYPTO_LIB_CURVE25519=m\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_POLY1305_GENERIC=y\nCONFIG_CRYPTO_LIB_POLY1305=m\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=m\nCONFIG_CRYPTO_LIB_SHA1=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_CRC_CCITT=m\nCONFIG_CRC16=y\n# CONFIG_CRC_T10DIF is not set\n# CONFIG_CRC64_ROCKSOFT is not set\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC64 is not set\n# CONFIG_CRC4 is not set\nCONFIG_CRC7=y\nCONFIG_LIBCRC32C=m\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=y\nCONFIG_AUDIT_ARCH_COMPAT_GENERIC=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=m\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMMON=y\nCONFIG_ZSTD_COMPRESS=m\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\nCONFIG_XZ_DEC_X86=y\nCONFIG_XZ_DEC_POWERPC=y\nCONFIG_XZ_DEC_IA64=y\nCONFIG_XZ_DEC_ARM=y\nCONFIG_XZ_DEC_ARMTHUMB=y\nCONFIG_XZ_DEC_SPARC=y\n# CONFIG_XZ_DEC_MICROLZMA is not set\nCONFIG_XZ_DEC_BCJ=y\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_LZ4=y\nCONFIG_DECOMPRESS_ZSTD=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_REED_SOLOMON=y\nCONFIG_REED_SOLOMON_ENC8=y\nCONFIG_REED_SOLOMON_DEC8=y\nCONFIG_INTERVAL_TREE=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_DMA=y\nCONFIG_DMA_OPS=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_DMA_DECLARE_COHERENT=y\nCONFIG_ARCH_HAS_SETUP_DMA_OPS=y\nCONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y\nCONFIG_ARCH_HAS_DMA_PREP_COHERENT=y\nCONFIG_SWIOTLB=y\n# CONFIG_DMA_RESTRICTED_POOL is not set\nCONFIG_DMA_NONCOHERENT_MMAP=y\nCONFIG_DMA_COHERENT_POOL=y\nCONFIG_DMA_DIRECT_REMAP=y\nCONFIG_DMA_CMA=y\n# CONFIG_DMA_PERNUMA_CMA is not set\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=64\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\n# CONFIG_FORCE_NR_CPUS is not set\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_GENERIC_VDSO_TIME_NS=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\nCONFIG_SG_POOL=y\nCONFIG_ARCH_STACKWALK=y\nCONFIG_STACKDEPOT=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_GENERIC_IOREMAP=y\nCONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\n# CONFIG_STACKTRACE_BUILD_ID is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\nCONFIG_DYNAMIC_DEBUG_CORE=y\nCONFIG_SYMBOLIC_ERRNAME=y\nCONFIG_DEBUG_BUGVERBOSE=y\n# end of printk and dmesg options\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_DEBUG_INFO=y\nCONFIG_AS_HAS_NON_CONST_LEB128=y\n# CONFIG_DEBUG_INFO_NONE is not set\nCONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\n# CONFIG_DEBUG_INFO_REDUCED is not set\n# CONFIG_DEBUG_INFO_COMPRESSED is not set\n# CONFIG_DEBUG_INFO_SPLIT is not set\n# CONFIG_DEBUG_INFO_BTF is not set\n# CONFIG_GDB_SCRIPTS is not set\nCONFIG_FRAME_WARN=2048\n# CONFIG_STRIP_ASM_SYMS is not set\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=\"\"\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\nCONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_KCSAN_COMPILER=y\n# end of Generic Kernel Debugging Instruments\n\n#\n# Networking Debugging\n#\n# CONFIG_NET_DEV_REFCNT_TRACKER is not set\n# CONFIG_NET_NS_REFCNT_TRACKER is not set\n# CONFIG_DEBUG_NET is not set\n# end of Networking Debugging\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_TABLE_CHECK is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\nCONFIG_ARCH_HAS_DEBUG_WX=y\n# CONFIG_DEBUG_WX is not set\nCONFIG_GENERIC_PTDUMP=y\n# CONFIG_PTDUMP_DEBUGFS is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SHRINKER_DEBUG is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\nCONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y\n# CONFIG_DEBUG_VM is not set\n# CONFIG_DEBUG_VM_PGTABLE is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\nCONFIG_DEBUG_MEMORY_INIT=y\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_SW_TAGS=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_KASAN_SW_TAGS=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\n# CONFIG_SOFTLOCKUP_DETECTOR is not set\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\n# CONFIG_SCHED_DEBUG is not set\nCONFIG_SCHED_INFO=y\n# CONFIG_SCHEDSTATS is not set\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_RWSEMS is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# CONFIG_CSD_LOCK_WAIT_DEBUG is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_DEBUG_MAPLE_TREE is not set\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\nCONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACING_SUPPORT=y\n# CONFIG_FTRACE is not set\n# CONFIG_SAMPLES is not set\nCONFIG_STRICT_DEVMEM=y\n# CONFIG_IO_STRICT_DEVMEM is not set\n\n#\n# arm64 Debugging\n#\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_ARM64_RELOC_TEST is not set\n# CONFIG_CORESIGHT is not set\n# end of arm64 Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\n# CONFIG_RUNTIME_TESTING_MENU is not set\nCONFIG_ARCH_USE_MEMTEST=y\nCONFIG_MEMTEST=y\n# end of Kernel Testing and Coverage\n\n#\n# Rust hacking\n#\n# end of Rust hacking\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/Rockchip/devices/RK3328/options",
    "content": "################################################################################\n# setup device defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc+crypto\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"crypto-neon-fp-armv8\"\n        ;;\n    esac\n\n  # Firmware\n    UBOOT_FIRMWARE+=\" atf\"\n    ATF_PLATFORM=\"rk3328\"\n    ATF_BL31_BINARY=\"bl31/bl31.elf\"\n\n  # Kernel target\n    KERNEL_TARGET=\"Image\"\n\n  # Mali GPU family\n    MALI_FAMILY=\"450\"\n    GRAPHIC_DRIVERS=\"lima\"\n\n  # kernel serial console\n    EXTRA_CMDLINE=\"console=uart8250,mmio32,0xff130000 console=tty0 coherent_pool=2M cec.debounce_ms=5000\"\n\n  # set the addon project\n    ADDON_PROJECT=\"ARMv8\"\n"
  },
  {
    "path": "projects/Rockchip/devices/RK3399/README.md",
    "content": "# RK3399\n\nThis is a SoC device for RK3399\n\n**Build**\n\n* `PROJECT=Rockchip DEVICE=RK3399 ARCH=arm UBOOT_SYSTEM=hugsun-x99 make image`\n* `PROJECT=Rockchip DEVICE=RK3399 ARCH=arm UBOOT_SYSTEM=khadas-edge make image`\n* `PROJECT=Rockchip DEVICE=RK3399 ARCH=arm UBOOT_SYSTEM=nanopc-t4 make image`\n* `PROJECT=Rockchip DEVICE=RK3399 ARCH=arm UBOOT_SYSTEM=nanopi-m4 make image`\n* `PROJECT=Rockchip DEVICE=RK3399 ARCH=arm UBOOT_SYSTEM=orangepi make image`\n* `PROJECT=Rockchip DEVICE=RK3399 ARCH=arm UBOOT_SYSTEM=rock960 make image`\n* `PROJECT=Rockchip DEVICE=RK3399 ARCH=arm UBOOT_SYSTEM=rock-pi-4 make image`\n* `PROJECT=Rockchip DEVICE=RK3399 ARCH=arm UBOOT_SYSTEM=rock-pi-4-plus make image`\n* `PROJECT=Rockchip DEVICE=RK3399 ARCH=arm UBOOT_SYSTEM=rock-pi-n10 make image`\n* `PROJECT=Rockchip DEVICE=RK3399 ARCH=arm UBOOT_SYSTEM=rockpro64 make image`\n* `PROJECT=Rockchip DEVICE=RK3399 ARCH=arm UBOOT_SYSTEM=roc-pc make image`\n* `PROJECT=Rockchip DEVICE=RK3399 ARCH=arm UBOOT_SYSTEM=roc-pc-plus make image`\n* `PROJECT=Rockchip DEVICE=RK3399 ARCH=arm UBOOT_SYSTEM=sapphire make image`\n"
  },
  {
    "path": "projects/Rockchip/devices/RK3399/linux/default/linux.aarch64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm64 6.1.63 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"aarch64-none-elf-gcc-12.2.0 (GCC) 12.2.0\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=120200\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23900\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23900\nCONFIG_LLD_VERSION=0\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_BUILD_SALT=\"\"\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_SYSVIPC_COMPAT=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\n# CONFIG_WATCH_QUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_IRQ_IPI=y\nCONFIG_GENERIC_MSI_IRQ=y\nCONFIG_GENERIC_MSI_IRQ_DOMAIN=y\nCONFIG_IRQ_MSI_IOMMU=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\nCONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_POSIX_CPU_TIMERS_TASK_WORK=y\nCONFIG_CONTEXT_TRACKING=y\nCONFIG_CONTEXT_TRACKING_IDLE=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\nCONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\nCONFIG_BPF_JIT=y\n# CONFIG_BPF_JIT_ALWAYS_ON is not set\nCONFIG_BPF_JIT_DEFAULT_ON=y\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# end of BPF subsystem\n\nCONFIG_PREEMPT_VOLUNTARY_BUILD=y\n# CONFIG_PREEMPT_NONE is not set\nCONFIG_PREEMPT_VOLUNTARY=y\n# CONFIG_PREEMPT is not set\n# CONFIG_PREEMPT_DYNAMIC is not set\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\nCONFIG_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_SCHED_AVG_IRQ=y\nCONFIG_SCHED_THERMAL_PRESSURE=y\nCONFIG_BSD_PROCESS_ACCT=y\nCONFIG_BSD_PROCESS_ACCT_V3=y\nCONFIG_TASKSTATS=y\nCONFIG_TASK_DELAY_ACCT=y\nCONFIG_TASK_XACCT=y\nCONFIG_TASK_IO_ACCOUNTING=y\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\n# end of RCU Subsystem\n\nCONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=17\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# CONFIG_UCLAMP_TASK is not set\n# end of Scheduler features\n\nCONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y\nCONFIG_CC_HAS_INT128=y\nCONFIG_CC_IMPLICIT_FALLTHROUGH=\"-Wimplicit-fallthrough=5\"\nCONFIG_GCC11_NO_ARRAY_BOUNDS=y\nCONFIG_CC_NO_ARRAY_BOUNDS=y\nCONFIG_ARCH_SUPPORTS_INT128=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\n# CONFIG_CGROUP_FAVOR_DYNMODS is not set\nCONFIG_MEMCG=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_BLK_CGROUP=y\nCONFIG_CGROUP_WRITEBACK=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\nCONFIG_CGROUP_PIDS=y\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_CGROUP_PERF=y\nCONFIG_CGROUP_BPF=y\n# CONFIG_CGROUP_MISC is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_TIME_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\nCONFIG_CHECKPOINT_RESTORE=y\nCONFIG_SCHED_AUTOGROUP=y\n# CONFIG_SYSFS_DEPRECATED is not set\nCONFIG_RELAY=y\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"@INITRAMFS_SOURCE@\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\n# CONFIG_RD_GZIP is not set\n# CONFIG_RD_BZIP2 is not set\n# CONFIG_RD_LZMA is not set\n# CONFIG_RD_XZ is not set\n# CONFIG_RD_LZO is not set\nCONFIG_RD_LZ4=y\nCONFIG_RD_ZSTD=y\nCONFIG_INITRAMFS_COMPRESSION_LZ4=y\n# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set\n# CONFIG_INITRAMFS_COMPRESSION_NONE is not set\n# CONFIG_BOOT_CONFIG is not set\nCONFIG_INITRAMFS_PRESERVE_MTIME=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\n# CONFIG_EXPERT is not set\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\nCONFIG_SYSFS_SYSCALL=y\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\nCONFIG_KALLSYMS_ALL=y\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_EMBEDDED is not set\nCONFIG_HAVE_PERF_EVENTS=y\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_SYSTEM_DATA_VERIFICATION=y\nCONFIG_PROFILING=y\n# end of General setup\n\nCONFIG_ARM64=y\nCONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_64BIT=y\nCONFIG_MMU=y\nCONFIG_ARM64_PAGE_SHIFT=12\nCONFIG_ARM64_CONT_PTE_SHIFT=4\nCONFIG_ARM64_CONT_PMD_SHIFT=4\nCONFIG_ARCH_MMAP_RND_BITS_MIN=18\nCONFIG_ARCH_MMAP_RND_BITS_MAX=33\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_GENERIC_BUG=y\nCONFIG_GENERIC_BUG_RELATIVE_POINTERS=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CSUM=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y\nCONFIG_SMP=y\nCONFIG_KERNEL_MODE_NEON=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_PGTABLE_LEVELS=4\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_ARCH_PROC_KCORE_TEXT=y\n\n#\n# Platform selection\n#\n# CONFIG_ARCH_ACTIONS is not set\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_APPLE is not set\n# CONFIG_ARCH_BCM is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_BITMAIN is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_SPARX5 is not set\n# CONFIG_ARCH_K3 is not set\n# CONFIG_ARCH_LG1K is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_KEEMBAY is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_MESON is not set\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_NXP is not set\n# CONFIG_ARCH_NPCM is not set\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_REALTEK is not set\n# CONFIG_ARCH_RENESAS is not set\nCONFIG_ARCH_ROCKCHIP=y\n# CONFIG_ARCH_SEATTLE is not set\n# CONFIG_ARCH_INTEL_SOCFPGA is not set\n# CONFIG_ARCH_SYNQUACER is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_SPRD is not set\n# CONFIG_ARCH_THUNDER is not set\n# CONFIG_ARCH_THUNDER2 is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_VISCONTI is not set\n# CONFIG_ARCH_XGENE is not set\n# CONFIG_ARCH_ZYNQMP is not set\n# end of Platform selection\n\n#\n# Kernel Features\n#\n\n#\n# ARM errata workarounds via the alternatives framework\n#\n# CONFIG_AMPERE_ERRATUM_AC03_CPU_38 is not set\nCONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y\nCONFIG_ARM64_ERRATUM_826319=y\nCONFIG_ARM64_ERRATUM_827319=y\nCONFIG_ARM64_ERRATUM_824069=y\nCONFIG_ARM64_ERRATUM_819472=y\n# CONFIG_ARM64_ERRATUM_832075 is not set\nCONFIG_ARM64_ERRATUM_1742098=y\nCONFIG_ARM64_ERRATUM_845719=y\nCONFIG_ARM64_ERRATUM_843419=y\nCONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y\n# CONFIG_ARM64_ERRATUM_1024718 is not set\n# CONFIG_ARM64_ERRATUM_1418040 is not set\nCONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y\n# CONFIG_ARM64_ERRATUM_1165522 is not set\nCONFIG_ARM64_ERRATUM_1319367=y\n# CONFIG_ARM64_ERRATUM_1530923 is not set\n# CONFIG_ARM64_ERRATUM_2441007 is not set\n# CONFIG_ARM64_ERRATUM_1286807 is not set\n# CONFIG_ARM64_ERRATUM_1463225 is not set\n# CONFIG_ARM64_ERRATUM_1542419 is not set\n# CONFIG_ARM64_ERRATUM_1508412 is not set\n# CONFIG_ARM64_ERRATUM_2051678 is not set\n# CONFIG_ARM64_ERRATUM_2077057 is not set\n# CONFIG_ARM64_ERRATUM_2658417 is not set\n# CONFIG_ARM64_ERRATUM_2054223 is not set\n# CONFIG_ARM64_ERRATUM_2067961 is not set\n# CONFIG_ARM64_ERRATUM_2441009 is not set\n# CONFIG_ARM64_ERRATUM_2966298 is not set\n# CONFIG_CAVIUM_ERRATUM_22375 is not set\n# CONFIG_CAVIUM_ERRATUM_23154 is not set\n# CONFIG_CAVIUM_ERRATUM_27456 is not set\n# CONFIG_CAVIUM_ERRATUM_30115 is not set\n# CONFIG_CAVIUM_TX2_ERRATUM_219 is not set\n# CONFIG_FUJITSU_ERRATUM_010001 is not set\n# CONFIG_HISILICON_ERRATUM_161600802 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_1003 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_1009 is not set\n# CONFIG_QCOM_QDF2400_ERRATUM_0065 is not set\n# CONFIG_QCOM_FALKOR_ERRATUM_E1041 is not set\n# CONFIG_NVIDIA_CARMEL_CNP_ERRATUM is not set\n# CONFIG_SOCIONEXT_SYNQUACER_PREITS is not set\n# end of ARM errata workarounds via the alternatives framework\n\nCONFIG_ARM64_4K_PAGES=y\n# CONFIG_ARM64_16K_PAGES is not set\n# CONFIG_ARM64_64K_PAGES is not set\n# CONFIG_ARM64_VA_BITS_39 is not set\nCONFIG_ARM64_VA_BITS_48=y\nCONFIG_ARM64_VA_BITS=48\nCONFIG_ARM64_PA_BITS_48=y\nCONFIG_ARM64_PA_BITS=48\n# CONFIG_CPU_BIG_ENDIAN is not set\nCONFIG_CPU_LITTLE_ENDIAN=y\nCONFIG_SCHED_MC=y\n# CONFIG_SCHED_CLUSTER is not set\n# CONFIG_SCHED_SMT is not set\nCONFIG_NR_CPUS=6\nCONFIG_HOTPLUG_CPU=y\n# CONFIG_NUMA is not set\n# CONFIG_HZ_100 is not set\n# CONFIG_HZ_250 is not set\nCONFIG_HZ_300=y\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=300\nCONFIG_SCHED_HRTICK=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_CC_HAVE_SHADOW_CALL_STACK=y\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\n# CONFIG_KEXEC is not set\n# CONFIG_KEXEC_FILE is not set\n# CONFIG_CRASH_DUMP is not set\n# CONFIG_XEN is not set\nCONFIG_ARCH_FORCE_MAX_ORDER=11\nCONFIG_UNMAP_KERNEL_AT_EL0=y\nCONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y\nCONFIG_RODATA_FULL_DEFAULT_ENABLED=y\n# CONFIG_ARM64_SW_TTBR0_PAN is not set\nCONFIG_ARM64_TAGGED_ADDR_ABI=y\nCONFIG_COMPAT=y\nCONFIG_KUSER_HELPERS=y\n# CONFIG_COMPAT_ALIGNMENT_FIXUPS is not set\n# CONFIG_ARMV8_DEPRECATED is not set\n\n#\n# ARMv8.1 architectural features\n#\n# CONFIG_ARM64_HW_AFDBM is not set\n# CONFIG_ARM64_PAN is not set\nCONFIG_AS_HAS_LDAPR=y\nCONFIG_AS_HAS_LSE_ATOMICS=y\n# CONFIG_ARM64_USE_LSE_ATOMICS is not set\n# end of ARMv8.1 architectural features\n\n#\n# ARMv8.2 architectural features\n#\nCONFIG_AS_HAS_ARMV8_2=y\nCONFIG_AS_HAS_SHA3=y\n# CONFIG_ARM64_PMEM is not set\n# CONFIG_ARM64_RAS_EXTN is not set\n# CONFIG_ARM64_CNP is not set\n# end of ARMv8.2 architectural features\n\n#\n# ARMv8.3 architectural features\n#\n# CONFIG_ARM64_PTR_AUTH is not set\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET=y\nCONFIG_CC_HAS_SIGN_RETURN_ADDRESS=y\nCONFIG_AS_HAS_PAC=y\nCONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y\n# end of ARMv8.3 architectural features\n\n#\n# ARMv8.4 architectural features\n#\n# CONFIG_ARM64_AMU_EXTN is not set\nCONFIG_AS_HAS_ARMV8_4=y\n# CONFIG_ARM64_TLB_RANGE is not set\n# end of ARMv8.4 architectural features\n\n#\n# ARMv8.5 architectural features\n#\nCONFIG_AS_HAS_ARMV8_5=y\n# CONFIG_ARM64_BTI is not set\nCONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI=y\n# CONFIG_ARM64_E0PD is not set\nCONFIG_ARM64_AS_HAS_MTE=y\n# end of ARMv8.5 architectural features\n\n#\n# ARMv8.7 architectural features\n#\n# end of ARMv8.7 architectural features\n\nCONFIG_ARM64_SVE=y\nCONFIG_ARM64_SME=y\nCONFIG_ARM64_MODULE_PLTS=y\n# CONFIG_ARM64_PSEUDO_NMI is not set\nCONFIG_RELOCATABLE=y\n# CONFIG_RANDOMIZE_BASE is not set\nCONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y\nCONFIG_STACKPROTECTOR_PER_TASK=y\nCONFIG_ARCH_NR_GPIO=0\n# end of Kernel Features\n\n#\n# Boot options\n#\nCONFIG_CMDLINE=\"\"\n# CONFIG_EFI is not set\n# end of Boot options\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_HIBERNATION is not set\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_USERSPACE_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\nCONFIG_PM=y\n# CONFIG_PM_DEBUG is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\nCONFIG_WQ_POWER_EFFICIENT_DEFAULT=y\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\n# CONFIG_ENERGY_MODEL is not set\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\n# end of Power management options\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\nCONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\nCONFIG_DT_IDLE_STATES=y\nCONFIG_DT_IDLE_GENPD=y\n\n#\n# ARM CPU Idle Drivers\n#\nCONFIG_ARM_PSCI_CPUIDLE=y\nCONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y\n# end of ARM CPU Idle Drivers\n# end of CPU Idle\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=m\nCONFIG_CPU_FREQ_GOV_USERSPACE=m\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\nCONFIG_CPU_FREQ_GOV_CONSERVATIVE=m\nCONFIG_CPU_FREQ_GOV_SCHEDUTIL=y\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\nCONFIG_CPUFREQ_DT_PLATDEV=y\nCONFIG_ARM_SCPI_CPUFREQ=y\n# end of CPU Frequency scaling\n# end of CPU Power Management\n\nCONFIG_HAVE_KVM=y\n# CONFIG_VIRTUALIZATION is not set\n\n#\n# General architecture-dependent options\n#\n# CONFIG_KPROBES is not set\nCONFIG_JUMP_LABEL=y\n# CONFIG_STATIC_KEYS_SELFTEST is not set\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_HAVE_IOREMAP_PROT=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y\nCONFIG_HAVE_FUNCTION_ERROR_INJECTION=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_KEEPINITRD=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_ARCH_HAS_SET_DIRECT_MAP=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_WANTS_NO_INSTR=y\nCONFIG_HAVE_ASM_MODVERSIONS=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y\nCONFIG_MMU_GATHER_TABLE_FREE=y\nCONFIG_MMU_GATHER_RCU_TABLE_FREE=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_HAVE_ALIGNED_STRUCT_PAGE=y\nCONFIG_HAVE_CMPXCHG_LOCAL=y\nCONFIG_HAVE_CMPXCHG_DOUBLE=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_ARCH_STACKLEAK=y\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_ARCH_SUPPORTS_SHADOW_CALL_STACK=y\n# CONFIG_SHADOW_CALL_STACK is not set\nCONFIG_ARCH_SUPPORTS_LTO_CLANG=y\nCONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y\nCONFIG_LTO_NONE=y\nCONFIG_ARCH_SUPPORTS_CFI_CLANG=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOVE_PUD=y\nCONFIG_HAVE_MOVE_PMD=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_HAVE_ARCH_HUGE_VMAP=y\nCONFIG_HAVE_ARCH_HUGE_VMALLOC=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_ARCH_MMAP_RND_BITS=18\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=11\nCONFIG_PAGE_SIZE_LESS_THAN_64KB=y\nCONFIG_PAGE_SIZE_LESS_THAN_256KB=y\nCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y\nCONFIG_RANDOMIZE_KSTACK_OFFSET=y\n# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\nCONFIG_HAVE_ARCH_COMPILER_H=y\nCONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_HAS_RELR=y\nCONFIG_HAVE_PREEMPT_DYNAMIC=y\nCONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y\nCONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y\nCONFIG_ARCH_HAVE_TRACE_MMIO_ACCESS=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\nCONFIG_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/sbin/modprobe\"\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\n# CONFIG_BLOCK_LEGACY_AUTOLOAD is not set\nCONFIG_BLK_CGROUP_RWSTAT=y\nCONFIG_BLK_DEV_BSG_COMMON=y\n# CONFIG_BLK_DEV_BSGLIB is not set\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_DEV_ZONED is not set\nCONFIG_BLK_DEV_THROTTLING=y\n# CONFIG_BLK_DEV_THROTTLING_LOW is not set\n# CONFIG_BLK_WBT is not set\n# CONFIG_BLK_CGROUP_IOLATENCY is not set\n# CONFIG_BLK_CGROUP_FC_APPID is not set\n# CONFIG_BLK_CGROUP_IOCOST is not set\n# CONFIG_BLK_CGROUP_IOPRIO is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\nCONFIG_MAC_PARTITION=y\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\nCONFIG_LDM_PARTITION=y\n# CONFIG_LDM_DEBUG is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\n# CONFIG_CMDLINE_PARTITION is not set\n# end of Partition Types\n\nCONFIG_BLOCK_COMPAT=y\nCONFIG_BLK_MQ_PCI=y\nCONFIG_BLK_MQ_VIRTIO=y\nCONFIG_BLK_PM=y\nCONFIG_BLOCK_HOLDER_DEPRECATED=y\nCONFIG_BLK_MQ_STACKING=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\n# CONFIG_IOSCHED_BFQ is not set\n# end of IO Schedulers\n\nCONFIG_ASN1=y\nCONFIG_ARCH_INLINE_SPIN_TRYLOCK=y\nCONFIG_ARCH_INLINE_SPIN_TRYLOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_LOCK=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_INLINE_READ_LOCK=y\nCONFIG_ARCH_INLINE_READ_LOCK_BH=y\nCONFIG_ARCH_INLINE_READ_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_READ_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_READ_UNLOCK=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_INLINE_WRITE_LOCK=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_BH=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE=y\nCONFIG_INLINE_SPIN_TRYLOCK=y\nCONFIG_INLINE_SPIN_TRYLOCK_BH=y\nCONFIG_INLINE_SPIN_LOCK=y\nCONFIG_INLINE_SPIN_LOCK_BH=y\nCONFIG_INLINE_SPIN_LOCK_IRQ=y\nCONFIG_INLINE_SPIN_LOCK_IRQSAVE=y\nCONFIG_INLINE_SPIN_UNLOCK_BH=y\nCONFIG_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE=y\nCONFIG_INLINE_READ_LOCK=y\nCONFIG_INLINE_READ_LOCK_BH=y\nCONFIG_INLINE_READ_LOCK_IRQ=y\nCONFIG_INLINE_READ_LOCK_IRQSAVE=y\nCONFIG_INLINE_READ_UNLOCK=y\nCONFIG_INLINE_READ_UNLOCK_BH=y\nCONFIG_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_INLINE_READ_UNLOCK_IRQRESTORE=y\nCONFIG_INLINE_WRITE_LOCK=y\nCONFIG_INLINE_WRITE_LOCK_BH=y\nCONFIG_INLINE_WRITE_LOCK_IRQ=y\nCONFIG_INLINE_WRITE_LOCK_IRQSAVE=y\nCONFIG_INLINE_WRITE_UNLOCK=y\nCONFIG_INLINE_WRITE_UNLOCK_BH=y\nCONFIG_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_USE_QUEUED_SPINLOCKS=y\nCONFIG_QUEUED_SPINLOCKS=y\nCONFIG_ARCH_USE_QUEUED_RWLOCKS=y\nCONFIG_QUEUED_RWLOCKS=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_ARCH_HAS_SYSCALL_WRAPPER=y\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_ARCH_BINFMT_ELF_STATE=y\nCONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y\nCONFIG_ARCH_HAVE_ELF_PROT=y\nCONFIG_ARCH_USE_GNU_PROPERTY=y\nCONFIG_ELFCORE=y\n# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set\nCONFIG_BINFMT_SCRIPT=y\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\nCONFIG_SWAP=y\n# CONFIG_ZSWAP is not set\n\n#\n# SLAB allocator options\n#\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# end of SLAB allocator options\n\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\n# CONFIG_COMPAT_BRK is not set\nCONFIG_SPARSEMEM=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_FAST_GUP=y\nCONFIG_ARCH_KEEP_MEMBLOCK=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_EXCLUSIVE_SYSTEM_RAM=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y\nCONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y\n# CONFIG_MEMORY_HOTPLUG is not set\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y\nCONFIG_MEMORY_BALLOON=y\nCONFIG_BALLOON_COMPACTION=y\nCONFIG_COMPACTION=y\nCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1\nCONFIG_PAGE_REPORTING=y\nCONFIG_MIGRATION=y\nCONFIG_ARCH_ENABLE_THP_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\nCONFIG_PHYS_ADDR_T_64BIT=y\nCONFIG_KSM=y\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y\nCONFIG_MEMORY_FAILURE=y\n# CONFIG_HWPOISON_INJECT is not set\nCONFIG_ARCH_WANTS_THP_SWAP=y\nCONFIG_TRANSPARENT_HUGEPAGE=y\nCONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y\n# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set\nCONFIG_THP_SWAP=y\n# CONFIG_READ_ONLY_THP_FOR_FS is not set\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\n# CONFIG_CMA_DEBUGFS is not set\n# CONFIG_CMA_SYSFS is not set\nCONFIG_CMA_AREAS=7\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CACHE_LINE_SIZE=y\nCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y\nCONFIG_ARCH_HAS_PTE_DEVMAP=y\nCONFIG_ZONE_DMA=y\nCONFIG_ZONE_DMA32=y\nCONFIG_VM_EVENT_COUNTERS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\nCONFIG_ARCH_HAS_PTE_SPECIAL=y\nCONFIG_SECRETMEM=y\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_USERFAULTFD is not set\n# CONFIG_LRU_GEN is not set\nCONFIG_LOCK_MM_AND_FIND_VMA=y\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\nCONFIG_NET_INGRESS=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_INTERFACE is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_XFRM_ESP=y\n# CONFIG_NET_KEY is not set\n# CONFIG_XDP_SOCKETS is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\n# CONFIG_IP_PNP_RARP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=m\n# CONFIG_IP_MROUTE is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=y\n# CONFIG_INET_ESP_OFFLOAD is not set\n# CONFIG_INET_ESPINTCP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=m\nCONFIG_INET_DIAG=y\nCONFIG_INET_TCP_DIAG=y\n# CONFIG_INET_UDP_DIAG is not set\n# CONFIG_INET_RAW_DIAG is not set\n# CONFIG_INET_DIAG_DESTROY is not set\n# CONFIG_TCP_CONG_ADVANCED is not set\nCONFIG_TCP_CONG_CUBIC=y\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_IPV6_VTI is not set\nCONFIG_IPV6_SIT=m\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\nCONFIG_IPV6_FOU=m\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_NETLABEL is not set\n# CONFIG_MPTCP is not set\n# CONFIG_NETWORK_SECMARK is not set\nCONFIG_NET_PTP_CLASSIFY=y\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\nCONFIG_NETFILTER_EGRESS=y\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\n# CONFIG_NETFILTER_NETLINK_LOG is not set\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\nCONFIG_NF_LOG_SYSLOG=m\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_ZONES is not set\nCONFIG_NF_CONNTRACK_PROCFS=y\nCONFIG_NF_CONNTRACK_EVENTS=y\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\nCONFIG_NF_CT_PROTO_DCCP=y\nCONFIG_NF_CT_PROTO_SCTP=y\nCONFIG_NF_CT_PROTO_UDPLITE=y\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\n# CONFIG_NF_CONNTRACK_IRC is not set\n# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\n# CONFIG_NF_CONNTRACK_SIP is not set\nCONFIG_NF_CONNTRACK_TFTP=m\n# CONFIG_NF_CT_NETLINK is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=y\nCONFIG_NF_NAT_MASQUERADE=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\nCONFIG_NETFILTER_XTABLES_COMPAT=y\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\nCONFIG_NETFILTER_XT_TARGET_CHECKSUM=m\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\nCONFIG_NETFILTER_XT_TARGET_LOG=m\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\n# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\n# CONFIG_NETFILTER_XT_MATCH_OWNER is not set\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\n# CONFIG_NETFILTER_XT_MATCH_STATE is not set\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\nCONFIG_IP_VS=m\n# CONFIG_IP_VS_IPV6 is not set\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_MH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n# CONFIG_IP_VS_TWOS is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS MH scheduler\n#\nCONFIG_IP_VS_MH_TAB_INDEX=12\n\n#\n# IPVS application helper\n#\n# CONFIG_IP_VS_FTP is not set\nCONFIG_IP_VS_NFCT=y\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\nCONFIG_NF_LOG_IPV4=m\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_SECURITY is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\nCONFIG_NF_LOG_IPV6=m\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_MATCH_SRH is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\n# CONFIG_IP6_NF_SECURITY is not set\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\n# CONFIG_NET_SCH_FQ_CODEL is not set\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_FLOW is not set\nCONFIG_NET_CLS_CGROUP=m\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\nCONFIG_NET_L3_MASTER_DEV=y\n# CONFIG_QRTR is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_PCPU_DEV_REFCNT=y\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_SOCK_RX_QUEUE_MAPPING=y\nCONFIG_XPS=y\nCONFIG_CGROUP_NET_PRIO=y\nCONFIG_CGROUP_NET_CLASSID=y\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\n# CONFIG_BT_RFCOMM is not set\n# CONFIG_BT_BNEP is not set\nCONFIG_BT_HIDP=m\n# CONFIG_BT_HS is not set\n# CONFIG_BT_LE is not set\nCONFIG_BT_LEDS=y\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\n# CONFIG_BT_DEBUGFS is not set\n# CONFIG_BT_SELFTEST is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_QCA=m\nCONFIG_BT_MTK=m\nCONFIG_BT_HCIBTUSB=m\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\n# CONFIG_BT_HCIBTUSB_MTK is not set\nCONFIG_BT_HCIBTUSB_RTL=y\nCONFIG_BT_HCIBTSDIO=m\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_SERDEV=y\nCONFIG_BT_HCIUART_H4=y\n# CONFIG_BT_HCIUART_NOKIA is not set\n# CONFIG_BT_HCIUART_BCSP is not set\n# CONFIG_BT_HCIUART_ATH3K is not set\n# CONFIG_BT_HCIUART_LL is not set\nCONFIG_BT_HCIUART_3WIRE=y\n# CONFIG_BT_HCIUART_INTEL is not set\nCONFIG_BT_HCIUART_BCM=y\nCONFIG_BT_HCIUART_RTL=y\nCONFIG_BT_HCIUART_QCA=y\nCONFIG_BT_HCIUART_AG6XX=y\nCONFIG_BT_HCIUART_MRVL=y\nCONFIG_BT_HCIBCM203X=m\nCONFIG_BT_HCIBPA10X=m\nCONFIG_BT_HCIBFUSB=m\nCONFIG_BT_HCIVHCI=m\nCONFIG_BT_MRVL=m\nCONFIG_BT_MRVL_SDIO=m\nCONFIG_BT_ATH3K=m\n# CONFIG_BT_MTKSDIO is not set\nCONFIG_BT_MTKUART=m\nCONFIG_BT_HCIRSI=m\n# CONFIG_BT_VIRTIO is not set\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_SPY=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=m\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\nCONFIG_CFG80211_CRDA_SUPPORT=y\nCONFIG_CFG80211_WEXT=y\nCONFIG_LIB80211=m\nCONFIG_LIB80211_CRYPT_WEP=m\nCONFIG_LIB80211_CRYPT_CCMP=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=m\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=m\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\nCONFIG_RFKILL_GPIO=m\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_PAGE_POOL=y\n# CONFIG_PAGE_POOL_STATS is not set\nCONFIG_FAILOVER=y\nCONFIG_ETHTOOL_NETLINK=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\nCONFIG_HAVE_PCI=y\nCONFIG_PCI=y\nCONFIG_PCI_DOMAINS=y\nCONFIG_PCI_DOMAINS_GENERIC=y\nCONFIG_PCI_SYSCALL=y\n# CONFIG_PCIEPORTBUS is not set\nCONFIG_PCIEASPM=y\nCONFIG_PCIEASPM_DEFAULT=y\n# CONFIG_PCIEASPM_POWERSAVE is not set\n# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set\n# CONFIG_PCIEASPM_PERFORMANCE is not set\n# CONFIG_PCIE_PTM is not set\nCONFIG_PCI_MSI=y\nCONFIG_PCI_MSI_IRQ_DOMAIN=y\nCONFIG_PCI_QUIRKS=y\n# CONFIG_PCI_DEBUG is not set\n# CONFIG_PCI_STUB is not set\n# CONFIG_PCI_IOV is not set\n# CONFIG_PCI_PRI is not set\n# CONFIG_PCI_PASID is not set\nCONFIG_VGA_ARB=y\nCONFIG_VGA_ARB_MAX_GPUS=16\n# CONFIG_HOTPLUG_PCI is not set\n\n#\n# PCI controller drivers\n#\n# CONFIG_PCI_FTPCI100 is not set\n# CONFIG_PCI_HOST_GENERIC is not set\n# CONFIG_PCIE_XILINX is not set\n# CONFIG_PCI_XGENE is not set\n# CONFIG_PCIE_ALTERA is not set\n# CONFIG_PCI_HOST_THUNDER_PEM is not set\n# CONFIG_PCI_HOST_THUNDER_ECAM is not set\nCONFIG_PCIE_ROCKCHIP=y\nCONFIG_PCIE_ROCKCHIP_HOST=y\n# CONFIG_PCIE_MICROCHIP_HOST is not set\n\n#\n# DesignWare PCI Core Support\n#\n# CONFIG_PCIE_DW_PLAT_HOST is not set\n# CONFIG_PCI_HISI is not set\n# CONFIG_PCIE_ROCKCHIP_DW_HOST is not set\n# CONFIG_PCIE_KIRIN is not set\n# CONFIG_PCI_MESON is not set\n# CONFIG_PCIE_AL is not set\n# end of DesignWare PCI Core Support\n\n#\n# Mobiveil PCIe Core Support\n#\n# end of Mobiveil PCIe Core Support\n\n#\n# Cadence PCIe controllers support\n#\n# CONFIG_PCIE_CADENCE_PLAT_HOST is not set\n# CONFIG_PCI_J721E_HOST is not set\n# end of Cadence PCIe controllers support\n# end of PCI controller drivers\n\n#\n# PCI Endpoint\n#\n# CONFIG_PCI_ENDPOINT is not set\n# end of PCI Endpoint\n\n#\n# PCI switch controller drivers\n#\n# CONFIG_PCI_SW_SWITCHTEC is not set\n# end of PCI switch controller drivers\n\n# CONFIG_CXL_BUS is not set\n# CONFIG_PCCARD is not set\n# CONFIG_RAPIDIO is not set\n\n#\n# Generic Driver Options\n#\n# CONFIG_UEVENT_HELPER is not set\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\n# CONFIG_DEVTMPFS_SAFE is not set\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\nCONFIG_FW_CACHE=y\n# CONFIG_FW_UPLOAD is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\nCONFIG_ALLOW_DEV_COREDUMP=y\nCONFIG_DEV_COREDUMP=y\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_SOC_BUS=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_MOXTET is not set\n# CONFIG_VEXPRESS_CONFIG is not set\n# CONFIG_MHI_BUS is not set\n# CONFIG_MHI_BUS_EP is not set\n# end of Bus devices\n\n# CONFIG_CONNECTOR is not set\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\n# CONFIG_ARM_SCMI_PROTOCOL is not set\n# end of ARM System Control and Management Interface Protocol\n\nCONFIG_ARM_SCPI_PROTOCOL=y\nCONFIG_ARM_SCPI_POWER_DOMAIN=y\n# CONFIG_FW_CFG_SYSFS is not set\n# CONFIG_ARM_FFA_TRANSPORT is not set\n# CONFIG_GOOGLE_FIRMWARE is not set\nCONFIG_ARM_PSCI_FW=y\n# CONFIG_ARM_PSCI_CHECKER is not set\nCONFIG_HAVE_ARM_SMCCC=y\nCONFIG_HAVE_ARM_SMCCC_DISCOVERY=y\nCONFIG_ARM_SMCCC_SOC_ID=y\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n\n#\n# Partition parsers\n#\n# CONFIG_MTD_AR7_PARTS is not set\n# CONFIG_MTD_CMDLINE_PARTS is not set\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AFS_PARTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\n# end of Partition parsers\n\n#\n# User Modules And Translation Layers\n#\nCONFIG_MTD_BLKDEVS=y\nCONFIG_MTD_BLOCK=y\n\n#\n# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK.\n#\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\n# CONFIG_MTD_OOPS is not set\n# CONFIG_MTD_SWAP is not set\n# CONFIG_MTD_PARTITIONED_MASTER is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\n# CONFIG_MTD_CFI is not set\n# CONFIG_MTD_JEDECPROBE is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n# end of RAM/ROM/Flash chip drivers\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_INTEL_VR_NOR is not set\n# CONFIG_MTD_PLATRAM is not set\n# end of Mapping drivers for chip access\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_PMC551 is not set\n# CONFIG_MTD_DATAFLASH is not set\n# CONFIG_MTD_MCHP23K256 is not set\n# CONFIG_MTD_MCHP48L640 is not set\n# CONFIG_MTD_SST25L is not set\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\n# end of Self-contained MTD device drivers\n\n#\n# NAND\n#\n# CONFIG_MTD_ONENAND is not set\n# CONFIG_MTD_RAW_NAND is not set\n# CONFIG_MTD_SPI_NAND is not set\n\n#\n# ECC engine support\n#\n# CONFIG_MTD_NAND_ECC_SW_HAMMING is not set\n# CONFIG_MTD_NAND_ECC_SW_BCH is not set\n# CONFIG_MTD_NAND_ECC_MXIC is not set\n# end of ECC engine support\n# end of NAND\n\n#\n# LPDDR & LPDDR2 PCM memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\n# end of LPDDR & LPDDR2 PCM memory drivers\n\nCONFIG_MTD_SPI_NOR=y\nCONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y\n# CONFIG_MTD_SPI_NOR_SWP_DISABLE is not set\nCONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y\n# CONFIG_MTD_SPI_NOR_SWP_KEEP is not set\n# CONFIG_MTD_UBI is not set\n# CONFIG_MTD_HYPERBUS is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_DYNAMIC=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\nCONFIG_OF_RESOLVE=y\nCONFIG_OF_OVERLAY=y\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_CDROM=y\n# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=8\n# CONFIG_BLK_DEV_DRBD is not set\nCONFIG_BLK_DEV_NBD=m\n# CONFIG_BLK_DEV_RAM is not set\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\nCONFIG_VIRTIO_BLK=y\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_UBLK is not set\n\n#\n# NVME Support\n#\nCONFIG_NVME_CORE=y\nCONFIG_BLK_DEV_NVME=y\nCONFIG_NVME_MULTIPATH=y\n# CONFIG_NVME_VERBOSE_ERRORS is not set\n# CONFIG_NVME_HWMON is not set\nCONFIG_NVME_FABRICS=m\nCONFIG_NVME_FC=m\n# CONFIG_NVME_TCP is not set\n# CONFIG_NVME_AUTH is not set\nCONFIG_NVME_TARGET=m\n# CONFIG_NVME_TARGET_PASSTHRU is not set\nCONFIG_NVME_TARGET_LOOP=m\nCONFIG_NVME_TARGET_FC=m\n# CONFIG_NVME_TARGET_FCLOOP is not set\n# CONFIG_NVME_TARGET_TCP is not set\n# CONFIG_NVME_TARGET_AUTH is not set\n# end of NVME Support\n\n#\n# Misc devices\n#\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_PHANTOM is not set\n# CONFIG_TIFM_CORE is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_HI6421V600_IRQ is not set\n# CONFIG_HP_ILO is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\nCONFIG_SRAM=y\n# CONFIG_DW_XDATA_PCIE is not set\n# CONFIG_PCI_ENDPOINT_TEST is not set\n# CONFIG_XILINX_SDFEC is not set\n# CONFIG_HISI_HIKEY_USB is not set\n# CONFIG_OPEN_DICE is not set\n# CONFIG_VCPU_STALL_DETECTOR is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\nCONFIG_EEPROM_AT25=m\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_EEPROM_EE1004 is not set\n# end of EEPROM support\n\n# CONFIG_CB710_CORE is not set\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\nCONFIG_ALTERA_STAPL=m\n# CONFIG_VMWARE_VMCI is not set\n# CONFIG_GENWQE is not set\n# CONFIG_ECHO is not set\n# CONFIG_BCM_VK is not set\n# CONFIG_MISC_ALCOR_PCI is not set\n# CONFIG_MISC_RTSX_PCI is not set\n# CONFIG_MISC_RTSX_USB is not set\n# CONFIG_HABANA_AI is not set\n# CONFIG_UACCE is not set\n# CONFIG_PVPANIC is not set\n# CONFIG_GP_PCI1XXXX is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_PROC_FS is not set\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_CHR_DEV_SG=m\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\n# CONFIG_SCSI_SCAN_ASYNC is not set\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_CXGB3_ISCSI is not set\n# CONFIG_SCSI_CXGB4_ISCSI is not set\n# CONFIG_SCSI_BNX2_ISCSI is not set\n# CONFIG_BE2ISCSI is not set\n# CONFIG_BLK_DEV_3W_XXXX_RAID is not set\n# CONFIG_SCSI_HPSA is not set\n# CONFIG_SCSI_3W_9XXX is not set\n# CONFIG_SCSI_3W_SAS is not set\n# CONFIG_SCSI_ACARD is not set\n# CONFIG_SCSI_AACRAID is not set\n# CONFIG_SCSI_AIC7XXX is not set\n# CONFIG_SCSI_AIC79XX is not set\n# CONFIG_SCSI_AIC94XX is not set\n# CONFIG_SCSI_HISI_SAS is not set\n# CONFIG_SCSI_MVSAS is not set\n# CONFIG_SCSI_MVUMI is not set\n# CONFIG_SCSI_ADVANSYS is not set\n# CONFIG_SCSI_ARCMSR is not set\n# CONFIG_SCSI_ESAS2R is not set\n# CONFIG_MEGARAID_NEWGEN is not set\n# CONFIG_MEGARAID_LEGACY is not set\n# CONFIG_MEGARAID_SAS is not set\n# CONFIG_SCSI_MPT3SAS is not set\n# CONFIG_SCSI_MPT2SAS is not set\n# CONFIG_SCSI_MPI3MR is not set\n# CONFIG_SCSI_SMARTPQI is not set\n# CONFIG_SCSI_HPTIOP is not set\n# CONFIG_SCSI_BUSLOGIC is not set\n# CONFIG_SCSI_MYRB is not set\n# CONFIG_SCSI_MYRS is not set\n# CONFIG_SCSI_SNIC is not set\n# CONFIG_SCSI_DMX3191D is not set\n# CONFIG_SCSI_FDOMAIN_PCI is not set\n# CONFIG_SCSI_IPS is not set\n# CONFIG_SCSI_INITIO is not set\n# CONFIG_SCSI_INIA100 is not set\n# CONFIG_SCSI_STEX is not set\n# CONFIG_SCSI_SYM53C8XX_2 is not set\n# CONFIG_SCSI_IPR is not set\n# CONFIG_SCSI_QLOGIC_1280 is not set\n# CONFIG_SCSI_QLA_ISCSI is not set\n# CONFIG_SCSI_DC395x is not set\n# CONFIG_SCSI_AM53C974 is not set\n# CONFIG_SCSI_WD719X is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_PMCRAID is not set\n# CONFIG_SCSI_PM8001 is not set\n# CONFIG_SCSI_VIRTIO is not set\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\nCONFIG_ATA=m\nCONFIG_SATA_HOST=y\nCONFIG_ATA_VERBOSE_ERROR=y\nCONFIG_ATA_FORCE=y\nCONFIG_SATA_PMP=y\n\n#\n# Controllers with non-SFF native interface\n#\nCONFIG_SATA_AHCI=m\nCONFIG_SATA_MOBILE_LPM_POLICY=0\n# CONFIG_SATA_AHCI_PLATFORM is not set\n# CONFIG_AHCI_DWC is not set\n# CONFIG_AHCI_CEVA is not set\n# CONFIG_AHCI_QORIQ is not set\n# CONFIG_SATA_INIC162X is not set\n# CONFIG_SATA_ACARD_AHCI is not set\n# CONFIG_SATA_SIL24 is not set\nCONFIG_ATA_SFF=y\n\n#\n# SFF controllers with custom DMA interface\n#\n# CONFIG_PDC_ADMA is not set\n# CONFIG_SATA_QSTOR is not set\n# CONFIG_SATA_SX4 is not set\nCONFIG_ATA_BMDMA=y\n\n#\n# SATA SFF controllers with BMDMA\n#\n# CONFIG_ATA_PIIX is not set\n# CONFIG_SATA_DWC is not set\n# CONFIG_SATA_MV is not set\n# CONFIG_SATA_NV is not set\n# CONFIG_SATA_PROMISE is not set\n# CONFIG_SATA_SIL is not set\n# CONFIG_SATA_SIS is not set\n# CONFIG_SATA_SVW is not set\n# CONFIG_SATA_ULI is not set\n# CONFIG_SATA_VIA is not set\n# CONFIG_SATA_VITESSE is not set\n\n#\n# PATA SFF controllers with BMDMA\n#\n# CONFIG_PATA_ALI is not set\n# CONFIG_PATA_AMD is not set\n# CONFIG_PATA_ARTOP is not set\n# CONFIG_PATA_ATIIXP is not set\n# CONFIG_PATA_ATP867X is not set\n# CONFIG_PATA_CMD64X is not set\n# CONFIG_PATA_CYPRESS is not set\n# CONFIG_PATA_EFAR is not set\n# CONFIG_PATA_HPT366 is not set\n# CONFIG_PATA_HPT37X is not set\n# CONFIG_PATA_HPT3X2N is not set\n# CONFIG_PATA_HPT3X3 is not set\n# CONFIG_PATA_IT8213 is not set\n# CONFIG_PATA_IT821X is not set\n# CONFIG_PATA_JMICRON is not set\n# CONFIG_PATA_MARVELL is not set\n# CONFIG_PATA_NETCELL is not set\n# CONFIG_PATA_NINJA32 is not set\n# CONFIG_PATA_NS87415 is not set\n# CONFIG_PATA_OLDPIIX is not set\n# CONFIG_PATA_OPTIDMA is not set\n# CONFIG_PATA_PDC2027X is not set\n# CONFIG_PATA_PDC_OLD is not set\n# CONFIG_PATA_RADISYS is not set\n# CONFIG_PATA_RDC is not set\n# CONFIG_PATA_SCH is not set\n# CONFIG_PATA_SERVERWORKS is not set\n# CONFIG_PATA_SIL680 is not set\n# CONFIG_PATA_SIS is not set\n# CONFIG_PATA_TOSHIBA is not set\n# CONFIG_PATA_TRIFLEX is not set\n# CONFIG_PATA_VIA is not set\n# CONFIG_PATA_WINBOND is not set\n\n#\n# PIO-only SFF controllers\n#\n# CONFIG_PATA_CMD640_PCI is not set\n# CONFIG_PATA_MPIIX is not set\n# CONFIG_PATA_NS87410 is not set\n# CONFIG_PATA_OPTI is not set\n# CONFIG_PATA_OF_PLATFORM is not set\n# CONFIG_PATA_RZ1000 is not set\n\n#\n# Generic fallback / legacy drivers\n#\n# CONFIG_ATA_GENERIC is not set\n# CONFIG_PATA_LEGACY is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\n# CONFIG_DM_DEBUG is not set\nCONFIG_DM_BUFIO=m\n# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\n# CONFIG_DM_UNSTRIPED is not set\n# CONFIG_DM_CRYPT is not set\n# CONFIG_DM_SNAPSHOT is not set\nCONFIG_DM_THIN_PROVISIONING=m\n# CONFIG_DM_CACHE is not set\n# CONFIG_DM_WRITECACHE is not set\n# CONFIG_DM_EBS is not set\n# CONFIG_DM_ERA is not set\n# CONFIG_DM_CLONE is not set\n# CONFIG_DM_MIRROR is not set\n# CONFIG_DM_RAID is not set\n# CONFIG_DM_ZERO is not set\n# CONFIG_DM_MULTIPATH is not set\n# CONFIG_DM_DELAY is not set\n# CONFIG_DM_DUST is not set\n# CONFIG_DM_UEVENT is not set\n# CONFIG_DM_FLAKEY is not set\n# CONFIG_DM_VERITY is not set\n# CONFIG_DM_SWITCH is not set\n# CONFIG_DM_LOG_WRITES is not set\n# CONFIG_DM_INTEGRITY is not set\n# CONFIG_TARGET_CORE is not set\n# CONFIG_FUSION is not set\n\n#\n# IEEE 1394 (FireWire) support\n#\n# CONFIG_FIREWIRE is not set\n# CONFIG_FIREWIRE_NOSY is not set\n# end of IEEE 1394 (FireWire) support\n\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\nCONFIG_DUMMY=m\nCONFIG_WIREGUARD=m\n# CONFIG_WIREGUARD_DEBUG is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_FC is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\nCONFIG_MACVTAP=m\nCONFIG_IPVLAN_L3S=y\nCONFIG_IPVLAN=m\n# CONFIG_IPVTAP is not set\nCONFIG_VXLAN=m\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_AMT is not set\n# CONFIG_MACSEC is not set\n# CONFIG_NETCONSOLE is not set\nCONFIG_TUN=m\nCONFIG_TAP=m\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\nCONFIG_VIRTIO_NET=y\nCONFIG_NLMON=m\n# CONFIG_ARCNET is not set\nCONFIG_ETHERNET=y\nCONFIG_NET_VENDOR_3COM=y\n# CONFIG_VORTEX is not set\n# CONFIG_TYPHOON is not set\nCONFIG_NET_VENDOR_ADAPTEC=y\n# CONFIG_ADAPTEC_STARFIRE is not set\nCONFIG_NET_VENDOR_AGERE=y\n# CONFIG_ET131X is not set\n# CONFIG_NET_VENDOR_ALACRITECH is not set\nCONFIG_NET_VENDOR_ALTEON=y\n# CONFIG_ACENIC is not set\n# CONFIG_ALTERA_TSE is not set\n# CONFIG_NET_VENDOR_AMAZON is not set\n# CONFIG_NET_VENDOR_AMD is not set\n# CONFIG_NET_VENDOR_AQUANTIA is not set\n# CONFIG_NET_VENDOR_ARC is not set\n# CONFIG_NET_VENDOR_ASIX is not set\nCONFIG_NET_VENDOR_ATHEROS=y\n# CONFIG_ATL2 is not set\n# CONFIG_ATL1 is not set\n# CONFIG_ATL1E is not set\n# CONFIG_ATL1C is not set\n# CONFIG_ALX is not set\n# CONFIG_NET_VENDOR_BROADCOM is not set\n# CONFIG_NET_VENDOR_CADENCE is not set\n# CONFIG_NET_VENDOR_CAVIUM is not set\nCONFIG_NET_VENDOR_CHELSIO=y\n# CONFIG_CHELSIO_T1 is not set\n# CONFIG_CHELSIO_T3 is not set\n# CONFIG_CHELSIO_T4 is not set\n# CONFIG_CHELSIO_T4VF is not set\nCONFIG_NET_VENDOR_CISCO=y\n# CONFIG_ENIC is not set\n# CONFIG_NET_VENDOR_CORTINA is not set\n# CONFIG_NET_VENDOR_DAVICOM is not set\n# CONFIG_DNET is not set\nCONFIG_NET_VENDOR_DEC=y\n# CONFIG_NET_TULIP is not set\nCONFIG_NET_VENDOR_DLINK=y\n# CONFIG_DL2K is not set\n# CONFIG_SUNDANCE is not set\nCONFIG_NET_VENDOR_EMULEX=y\n# CONFIG_BE2NET is not set\n# CONFIG_NET_VENDOR_ENGLEDER is not set\n# CONFIG_NET_VENDOR_EZCHIP is not set\n# CONFIG_NET_VENDOR_FUNGIBLE is not set\nCONFIG_NET_VENDOR_GOOGLE=y\n# CONFIG_GVE is not set\n# CONFIG_NET_VENDOR_HISILICON is not set\n# CONFIG_NET_VENDOR_HUAWEI is not set\n# CONFIG_NET_VENDOR_INTEL is not set\n# CONFIG_NET_VENDOR_WANGXUN is not set\n# CONFIG_JME is not set\n# CONFIG_NET_VENDOR_ADI is not set\n# CONFIG_NET_VENDOR_LITEX is not set\n# CONFIG_NET_VENDOR_MARVELL is not set\n# CONFIG_NET_VENDOR_MELLANOX is not set\n# CONFIG_NET_VENDOR_MICREL is not set\n# CONFIG_NET_VENDOR_MICROCHIP is not set\n# CONFIG_NET_VENDOR_MICROSEMI is not set\n# CONFIG_NET_VENDOR_MICROSOFT is not set\nCONFIG_NET_VENDOR_MYRI=y\n# CONFIG_MYRI10GE is not set\n# CONFIG_FEALNX is not set\n# CONFIG_NET_VENDOR_NI is not set\n# CONFIG_NET_VENDOR_NATSEMI is not set\nCONFIG_NET_VENDOR_NETERION=y\n# CONFIG_S2IO is not set\n# CONFIG_NET_VENDOR_NETRONOME is not set\nCONFIG_NET_VENDOR_NVIDIA=y\n# CONFIG_FORCEDETH is not set\nCONFIG_NET_VENDOR_OKI=y\n# CONFIG_ETHOC is not set\nCONFIG_NET_VENDOR_PACKET_ENGINES=y\n# CONFIG_HAMACHI is not set\n# CONFIG_YELLOWFIN is not set\n# CONFIG_NET_VENDOR_PENSANDO is not set\nCONFIG_NET_VENDOR_QLOGIC=y\n# CONFIG_QLA3XXX is not set\n# CONFIG_QLCNIC is not set\n# CONFIG_NETXEN_NIC is not set\n# CONFIG_QED is not set\nCONFIG_NET_VENDOR_BROCADE=y\n# CONFIG_BNA is not set\n# CONFIG_NET_VENDOR_QUALCOMM is not set\nCONFIG_NET_VENDOR_RDC=y\n# CONFIG_R6040 is not set\nCONFIG_NET_VENDOR_REALTEK=y\n# CONFIG_8139CP is not set\n# CONFIG_8139TOO is not set\n# CONFIG_R8169 is not set\n# CONFIG_NET_VENDOR_RENESAS is not set\n# CONFIG_NET_VENDOR_ROCKER is not set\n# CONFIG_NET_VENDOR_SAMSUNG is not set\n# CONFIG_NET_VENDOR_SEEQ is not set\nCONFIG_NET_VENDOR_SILAN=y\n# CONFIG_SC92031 is not set\nCONFIG_NET_VENDOR_SIS=y\n# CONFIG_SIS900 is not set\n# CONFIG_SIS190 is not set\n# CONFIG_NET_VENDOR_SOLARFLARE is not set\n# CONFIG_NET_VENDOR_SMSC is not set\n# CONFIG_NET_VENDOR_SOCIONEXT is not set\nCONFIG_NET_VENDOR_STMICRO=y\nCONFIG_STMMAC_ETH=y\n# CONFIG_STMMAC_SELFTESTS is not set\nCONFIG_STMMAC_PLATFORM=y\nCONFIG_DWMAC_DWC_QOS_ETH=y\nCONFIG_DWMAC_GENERIC=y\nCONFIG_DWMAC_ROCKCHIP=y\n# CONFIG_DWMAC_INTEL_PLAT is not set\n# CONFIG_DWMAC_LOONGSON is not set\n# CONFIG_STMMAC_PCI is not set\nCONFIG_NET_VENDOR_SUN=y\n# CONFIG_HAPPYMEAL is not set\n# CONFIG_SUNGEM is not set\n# CONFIG_CASSINI is not set\n# CONFIG_NIU is not set\n# CONFIG_NET_VENDOR_SYNOPSYS is not set\nCONFIG_NET_VENDOR_TEHUTI=y\n# CONFIG_TEHUTI is not set\nCONFIG_NET_VENDOR_TI=y\n# CONFIG_TI_CPSW_PHY_SEL is not set\n# CONFIG_TLAN is not set\n# CONFIG_NET_VENDOR_VERTEXCOM is not set\n# CONFIG_NET_VENDOR_VIA is not set\n# CONFIG_NET_VENDOR_WIZNET is not set\n# CONFIG_NET_VENDOR_XILINX is not set\n# CONFIG_FDDI is not set\n# CONFIG_HIPPI is not set\nCONFIG_PHYLINK=y\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_ADIN_PHY is not set\n# CONFIG_ADIN1100_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=m\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM54140_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MARVELL_88X2222_PHY is not set\n# CONFIG_MAXLINEAR_GPHY is not set\n# CONFIG_MEDIATEK_GE_PHY is not set\n# CONFIG_MICREL_PHY is not set\nCONFIG_MICROCHIP_PHY=m\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_MOTORCOMM_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_NXP_TJA11XX_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_QSEMI_PHY is not set\nCONFIG_REALTEK_PHY=y\n# CONFIG_RENESAS_PHY is not set\nCONFIG_ROCKCHIP_PHY=y\nCONFIG_SMSC_PHY=m\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_DP83TD510_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\n# CONFIG_PSE_CONTROLLER is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_OF_MDIO=y\nCONFIG_MDIO_DEVRES=y\nCONFIG_MDIO_BITBANG=y\n# CONFIG_MDIO_BCM_UNIMAC is not set\nCONFIG_MDIO_GPIO=y\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_OCTEON is not set\n# CONFIG_MDIO_IPQ4019 is not set\n# CONFIG_MDIO_IPQ8064 is not set\n# CONFIG_MDIO_THUNDER is not set\n\n#\n# MDIO Multiplexers\n#\nCONFIG_MDIO_BUS_MUX=y\nCONFIG_MDIO_BUS_MUX_GPIO=y\nCONFIG_MDIO_BUS_MUX_MULTIPLEXER=y\nCONFIG_MDIO_BUS_MUX_MMIOREG=y\n\n#\n# PCS device drivers\n#\nCONFIG_PCS_XPCS=y\n# end of PCS device drivers\n\n# CONFIG_PPP is not set\n# CONFIG_SLIP is not set\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\nCONFIG_USB_PEGASUS=m\nCONFIG_USB_RTL8150=m\nCONFIG_USB_RTL8152=m\nCONFIG_USB_LAN78XX=m\nCONFIG_USB_USBNET=m\nCONFIG_USB_NET_AX8817X=m\nCONFIG_USB_NET_AX88179_178A=m\nCONFIG_USB_NET_CDCETHER=m\n# CONFIG_USB_NET_CDC_EEM is not set\nCONFIG_USB_NET_CDC_NCM=m\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\nCONFIG_USB_NET_DM9601=m\n# CONFIG_USB_NET_SR9700 is not set\nCONFIG_USB_NET_SR9800=m\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=m\n# CONFIG_USB_NET_GL620A is not set\nCONFIG_USB_NET_NET1080=m\nCONFIG_USB_NET_PLUSB=m\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\nCONFIG_USB_NET_CDC_SUBSET_ENABLE=m\nCONFIG_USB_NET_CDC_SUBSET=m\n# CONFIG_USB_ALI_M5632 is not set\n# CONFIG_USB_AN2720 is not set\nCONFIG_USB_BELKIN=y\nCONFIG_USB_ARMLINUX=y\n# CONFIG_USB_EPSON2888 is not set\n# CONFIG_USB_KC2190 is not set\nCONFIG_USB_NET_ZAURUS=m\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\n# CONFIG_USB_HSO is not set\n# CONFIG_USB_NET_INT51X1 is not set\n# CONFIG_USB_IPHETH is not set\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\n# CONFIG_USB_NET_AQC111 is not set\nCONFIG_USB_RTL8153_ECM=m\nCONFIG_WLAN=y\nCONFIG_WLAN_VENDOR_ADMTEK=y\n# CONFIG_ADM8211 is not set\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\n# CONFIG_ATH5K is not set\n# CONFIG_ATH5K_PCI is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\nCONFIG_ATH9K=m\nCONFIG_ATH9K_PCI=y\n# CONFIG_ATH9K_AHB is not set\n# CONFIG_ATH9K_DEBUGFS is not set\n# CONFIG_ATH9K_DYNACK is not set\n# CONFIG_ATH9K_WOW is not set\nCONFIG_ATH9K_RFKILL=y\nCONFIG_ATH9K_CHANNEL_CONTEXT=y\nCONFIG_ATH9K_PCOEM=y\n# CONFIG_ATH9K_PCI_NO_EEPROM is not set\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\nCONFIG_ATH9K_HWRNG=y\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\nCONFIG_CARL9170_HWRNG=y\nCONFIG_ATH6KL=m\n# CONFIG_ATH6KL_SDIO is not set\nCONFIG_ATH6KL_USB=m\n# CONFIG_ATH6KL_DEBUG is not set\nCONFIG_AR5523=m\n# CONFIG_WIL6210 is not set\nCONFIG_ATH10K=m\nCONFIG_ATH10K_CE=y\nCONFIG_ATH10K_PCI=m\n# CONFIG_ATH10K_AHB is not set\n# CONFIG_ATH10K_SDIO is not set\nCONFIG_ATH10K_USB=m\n# CONFIG_ATH10K_DEBUG is not set\n# CONFIG_ATH10K_DEBUGFS is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\n# CONFIG_ATMEL is not set\nCONFIG_AT76C50X_USB=m\nCONFIG_WLAN_VENDOR_BROADCOM=y\nCONFIG_B43=m\nCONFIG_B43_BCMA=y\nCONFIG_B43_SSB=y\nCONFIG_B43_BUSES_BCMA_AND_SSB=y\n# CONFIG_B43_BUSES_BCMA is not set\n# CONFIG_B43_BUSES_SSB is not set\nCONFIG_B43_PCI_AUTOSELECT=y\nCONFIG_B43_PCICORE_AUTOSELECT=y\n# CONFIG_B43_SDIO is not set\nCONFIG_B43_BCMA_PIO=y\nCONFIG_B43_PIO=y\nCONFIG_B43_PHY_G=y\nCONFIG_B43_PHY_N=y\nCONFIG_B43_PHY_LP=y\nCONFIG_B43_PHY_HT=y\nCONFIG_B43_LEDS=y\nCONFIG_B43_HWRNG=y\n# CONFIG_B43_DEBUG is not set\n# CONFIG_B43LEGACY is not set\nCONFIG_BRCMUTIL=m\n# CONFIG_BRCMSMAC is not set\nCONFIG_BRCMFMAC=m\nCONFIG_BRCMFMAC_PROTO_BCDC=y\nCONFIG_BRCMFMAC_PROTO_MSGBUF=y\nCONFIG_BRCMFMAC_SDIO=y\nCONFIG_BRCMFMAC_USB=y\nCONFIG_BRCMFMAC_PCIE=y\n# CONFIG_BRCM_TRACING is not set\n# CONFIG_BRCMDBG is not set\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\n# CONFIG_IPW2100 is not set\n# CONFIG_IPW2200 is not set\nCONFIG_IWLEGACY=m\nCONFIG_IWL4965=m\n# CONFIG_IWL3945 is not set\n\n#\n# iwl3945 / iwl4965 Debugging Options\n#\n# CONFIG_IWLEGACY_DEBUG is not set\n# end of iwl3945 / iwl4965 Debugging Options\n\nCONFIG_IWLWIFI=m\nCONFIG_IWLWIFI_LEDS=y\nCONFIG_IWLDVM=m\nCONFIG_IWLMVM=m\nCONFIG_IWLWIFI_OPMODE_MODULAR=y\n\n#\n# Debugging Options\n#\n# CONFIG_IWLWIFI_DEBUG is not set\n# end of Debugging Options\n\nCONFIG_WLAN_VENDOR_INTERSIL=y\n# CONFIG_HOSTAP is not set\n# CONFIG_HERMES is not set\nCONFIG_P54_COMMON=m\nCONFIG_P54_USB=m\n# CONFIG_P54_PCI is not set\n# CONFIG_P54_SPI is not set\nCONFIG_P54_LEDS=y\nCONFIG_WLAN_VENDOR_MARVELL=y\nCONFIG_LIBERTAS=m\nCONFIG_LIBERTAS_USB=m\n# CONFIG_LIBERTAS_SDIO is not set\n# CONFIG_LIBERTAS_SPI is not set\n# CONFIG_LIBERTAS_DEBUG is not set\n# CONFIG_LIBERTAS_MESH is not set\nCONFIG_LIBERTAS_THINFIRM=m\n# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set\nCONFIG_LIBERTAS_THINFIRM_USB=m\nCONFIG_MWIFIEX=m\n# CONFIG_MWIFIEX_SDIO is not set\nCONFIG_MWIFIEX_PCIE=m\nCONFIG_MWIFIEX_USB=m\n# CONFIG_MWL8K is not set\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_MT76_CORE=m\nCONFIG_MT76_LEDS=y\nCONFIG_MT76_USB=m\nCONFIG_MT76_SDIO=m\nCONFIG_MT76x02_LIB=m\nCONFIG_MT76x02_USB=m\nCONFIG_MT76_CONNAC_LIB=m\nCONFIG_MT76x0_COMMON=m\nCONFIG_MT76x0U=m\nCONFIG_MT76x0E=m\nCONFIG_MT76x2_COMMON=m\nCONFIG_MT76x2E=m\nCONFIG_MT76x2U=m\nCONFIG_MT7603E=m\nCONFIG_MT7615_COMMON=m\nCONFIG_MT7615E=m\nCONFIG_MT7663_USB_SDIO_COMMON=m\nCONFIG_MT7663U=m\nCONFIG_MT7663S=m\nCONFIG_MT7915E=m\n# CONFIG_MT7921E is not set\n# CONFIG_MT7921S is not set\n# CONFIG_MT7921U is not set\nCONFIG_WLAN_VENDOR_MICROCHIP=y\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\n# CONFIG_WLAN_VENDOR_PURELIFI is not set\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\n# CONFIG_RT2400PCI is not set\n# CONFIG_RT2500PCI is not set\n# CONFIG_RT61PCI is not set\n# CONFIG_RT2800PCI is not set\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\n# CONFIG_RTL8180 is not set\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=m\n# CONFIG_RTL8192CE is not set\n# CONFIG_RTL8192SE is not set\n# CONFIG_RTL8192DE is not set\n# CONFIG_RTL8723AE is not set\n# CONFIG_RTL8723BE is not set\n# CONFIG_RTL8188EE is not set\n# CONFIG_RTL8192EE is not set\n# CONFIG_RTL8821AE is not set\n# CONFIG_RTL8192CU is not set\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\nCONFIG_RTW88=m\nCONFIG_RTW88_CORE=m\nCONFIG_RTW88_PCI=m\nCONFIG_RTW88_USB=m\nCONFIG_RTW88_8822B=m\nCONFIG_RTW88_8822C=m\nCONFIG_RTW88_8723D=m\nCONFIG_RTW88_8821C=m\nCONFIG_RTW88_8822BE=m\n# CONFIG_RTW88_8822BS is not set\nCONFIG_RTW88_8822BU=m\nCONFIG_RTW88_8822CE=m\n# CONFIG_RTW88_8822CS is not set\nCONFIG_RTW88_8822CU=m\nCONFIG_RTW88_8723DE=m\nCONFIG_RTW88_8723DU=m\nCONFIG_RTW88_8821CE=m\n# CONFIG_RTW88_8821CS is not set\nCONFIG_RTW88_8821CU=m\n# CONFIG_RTW88_DEBUG is not set\n# CONFIG_RTW88_DEBUGFS is not set\n# CONFIG_RTW89 is not set\nCONFIG_WLAN_VENDOR_RSI=y\nCONFIG_RSI_91X=m\n# CONFIG_RSI_DEBUGFS is not set\n# CONFIG_RSI_SDIO is not set\nCONFIG_RSI_USB=m\nCONFIG_RSI_COEX=y\n# CONFIG_WLAN_VENDOR_SILABS is not set\nCONFIG_WLAN_VENDOR_ST=y\n# CONFIG_CW1200 is not set\nCONFIG_WLAN_VENDOR_TI=y\n# CONFIG_WL1251 is not set\nCONFIG_WL12XX=m\nCONFIG_WL18XX=m\nCONFIG_WLCORE=m\n# CONFIG_WLCORE_SPI is not set\n# CONFIG_WLCORE_SDIO is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\nCONFIG_USB_ZD1201=m\nCONFIG_ZD1211RW=m\n# CONFIG_ZD1211RW_DEBUG is not set\nCONFIG_WLAN_VENDOR_QUANTENNA=y\n# CONFIG_QTNFMAC_PCIE is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\n# CONFIG_VMXNET3 is not set\n# CONFIG_NETDEVSIM is not set\nCONFIG_NET_FAILOVER=y\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\nCONFIG_INPUT_MATRIXKMAP=y\n\n#\n# Userland interfaces\n#\n# CONFIG_INPUT_MOUSEDEV is not set\nCONFIG_INPUT_JOYDEV=y\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADC is not set\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\n# CONFIG_KEYBOARD_ATKBD is not set\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=y\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_PINEPHONE is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\n# CONFIG_KEYBOARD_CYPRESS_SF is not set\n# CONFIG_INPUT_MOUSE is not set\nCONFIG_INPUT_JOYSTICK=y\n# CONFIG_JOYSTICK_ANALOG is not set\n# CONFIG_JOYSTICK_A3D is not set\n# CONFIG_JOYSTICK_ADC is not set\n# CONFIG_JOYSTICK_ADI is not set\n# CONFIG_JOYSTICK_COBRA is not set\nCONFIG_JOYSTICK_GF2K=m\n# CONFIG_JOYSTICK_GRIP is not set\n# CONFIG_JOYSTICK_GRIP_MP is not set\n# CONFIG_JOYSTICK_GUILLEMOT is not set\n# CONFIG_JOYSTICK_INTERACT is not set\n# CONFIG_JOYSTICK_SIDEWINDER is not set\n# CONFIG_JOYSTICK_TMDC is not set\nCONFIG_JOYSTICK_IFORCE=m\nCONFIG_JOYSTICK_IFORCE_USB=m\n# CONFIG_JOYSTICK_IFORCE_232 is not set\n# CONFIG_JOYSTICK_WARRIOR is not set\n# CONFIG_JOYSTICK_MAGELLAN is not set\n# CONFIG_JOYSTICK_SPACEORB is not set\n# CONFIG_JOYSTICK_SPACEBALL is not set\n# CONFIG_JOYSTICK_STINGER is not set\n# CONFIG_JOYSTICK_TWIDJOY is not set\n# CONFIG_JOYSTICK_ZHENHUA is not set\n# CONFIG_JOYSTICK_AS5011 is not set\n# CONFIG_JOYSTICK_JOYDUMP is not set\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\n# CONFIG_JOYSTICK_PSXPAD_SPI is not set\n# CONFIG_JOYSTICK_PXRC is not set\n# CONFIG_JOYSTICK_QWIIC is not set\n# CONFIG_JOYSTICK_FSIA6B is not set\n# CONFIG_JOYSTICK_SENSEHAT is not set\n# CONFIG_INPUT_TABLET is not set\n# CONFIG_INPUT_TOUCHSCREEN is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\nCONFIG_INPUT_RK805_PWRKEY=y\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_IQS7222 is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\n# CONFIG_RMI4_CORE is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_SERIO_SERPORT=m\nCONFIG_SERIO_AMBAKMI=y\n# CONFIG_SERIO_PCIPS2 is not set\nCONFIG_SERIO_LIBPS2=y\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_SERIO_GPIO_PS2 is not set\n# CONFIG_USERIO is not set\nCONFIG_GAMEPORT=m\n# CONFIG_GAMEPORT_NS558 is not set\n# CONFIG_GAMEPORT_L4 is not set\n# CONFIG_GAMEPORT_EMU10K1 is not set\n# CONFIG_GAMEPORT_FM801 is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\nCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y\n# CONFIG_SERIAL_8250_16550A_VARIANTS is not set\n# CONFIG_SERIAL_8250_FINTEK is not set\nCONFIG_SERIAL_8250_CONSOLE=y\nCONFIG_SERIAL_8250_DMA=y\nCONFIG_SERIAL_8250_PCI=y\nCONFIG_SERIAL_8250_EXAR=y\nCONFIG_SERIAL_8250_NR_UARTS=5\nCONFIG_SERIAL_8250_RUNTIME_UARTS=5\nCONFIG_SERIAL_8250_EXTENDED=y\nCONFIG_SERIAL_8250_MANY_PORTS=y\nCONFIG_SERIAL_8250_SHARE_IRQ=y\n# CONFIG_SERIAL_8250_DETECT_IRQ is not set\n# CONFIG_SERIAL_8250_RSA is not set\nCONFIG_SERIAL_8250_DWLIB=y\nCONFIG_SERIAL_8250_FSL=y\nCONFIG_SERIAL_8250_DW=y\n# CONFIG_SERIAL_8250_RT288X is not set\n# CONFIG_SERIAL_8250_PERICOM is not set\nCONFIG_SERIAL_OF_PLATFORM=y\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\n# CONFIG_SERIAL_AMBA_PL011 is not set\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_JSM is not set\n# CONFIG_SERIAL_SIFIVE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\nCONFIG_SERIAL_XILINX_PS_UART=y\nCONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_RP2 is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\nCONFIG_SERIAL_MCTRL_GPIO=y\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NOZOMI is not set\n# CONFIG_NULL_TTY is not set\nCONFIG_HVC_DRIVER=y\n# CONFIG_HVC_DCC is not set\nCONFIG_SERIAL_DEV_BUS=y\nCONFIG_SERIAL_DEV_CTRL_TTYPORT=y\nCONFIG_VIRTIO_CONSOLE=y\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=m\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_BA431 is not set\n# CONFIG_HW_RANDOM_VIRTIO is not set\nCONFIG_HW_RANDOM_OPTEE=m\n# CONFIG_HW_RANDOM_CCTRNG is not set\n# CONFIG_HW_RANDOM_XIPHERA is not set\nCONFIG_HW_RANDOM_ARM_SMCCC_TRNG=m\n# CONFIG_HW_RANDOM_CN10K is not set\n# CONFIG_APPLICOM is not set\nCONFIG_DEVMEM=y\nCONFIG_DEVPORT=y\n# CONFIG_TCG_TPM is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\nCONFIG_RANDOM_TRUST_CPU=y\n# CONFIG_RANDOM_TRUST_BOOTLOADER is not set\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\nCONFIG_I2C_MUX_PCA954x=y\nCONFIG_I2C_MUX_PINCTRL=y\n# CONFIG_I2C_MUX_REG is not set\nCONFIG_I2C_DEMUX_PINCTRL=y\n# CONFIG_I2C_MUX_MLXCPLD is not set\n# end of Multiplexer I2C Chip support\n\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# PC SMBus host controller drivers\n#\n# CONFIG_I2C_ALI1535 is not set\n# CONFIG_I2C_ALI1563 is not set\n# CONFIG_I2C_ALI15X3 is not set\n# CONFIG_I2C_AMD756 is not set\n# CONFIG_I2C_AMD8111 is not set\n# CONFIG_I2C_I801 is not set\n# CONFIG_I2C_ISCH is not set\n# CONFIG_I2C_PIIX4 is not set\n# CONFIG_I2C_NFORCE2 is not set\n# CONFIG_I2C_NVIDIA_GPU is not set\n# CONFIG_I2C_SIS5595 is not set\n# CONFIG_I2C_SIS630 is not set\n# CONFIG_I2C_SIS96X is not set\n# CONFIG_I2C_VIA is not set\n# CONFIG_I2C_VIAPRO is not set\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CADENCE is not set\n# CONFIG_I2C_CBUS_GPIO is not set\nCONFIG_I2C_DESIGNWARE_CORE=y\n# CONFIG_I2C_DESIGNWARE_SLAVE is not set\nCONFIG_I2C_DESIGNWARE_PLATFORM=y\n# CONFIG_I2C_DESIGNWARE_PCI is not set\n# CONFIG_I2C_EMEV2 is not set\nCONFIG_I2C_GPIO=m\n# CONFIG_I2C_GPIO_FAULT_INJECTOR is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\nCONFIG_I2C_RK3X=y\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_THUNDERX is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_PCI1XXXX is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\nCONFIG_SPI_MEM=y\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\nCONFIG_SPI_BITBANG=m\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_CADENCE_QUADSPI is not set\n# CONFIG_SPI_CADENCE_XSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_NXP_FLEXSPI is not set\nCONFIG_SPI_GPIO=m\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_MICROCHIP_CORE is not set\n# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set\n# CONFIG_SPI_OC_TINY is not set\nCONFIG_SPI_PL022=y\n# CONFIG_SPI_PXA2XX is not set\nCONFIG_SPI_ROCKCHIP=m\n# CONFIG_SPI_ROCKCHIP_SFC is not set\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_SIFIVE is not set\n# CONFIG_SPI_MXIC is not set\n# CONFIG_SPI_THUNDERX is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_AMD is not set\n\n#\n# SPI Multiplexer support\n#\n# CONFIG_SPI_MUX is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=m\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\nCONFIG_SPI_DYNAMIC=y\nCONFIG_SPMI=y\n# CONFIG_SPMI_HISI3670 is not set\n# CONFIG_HSI is not set\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\n# CONFIG_PTP_1588_CLOCK_KVM is not set\n# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set\n# CONFIG_PTP_1588_CLOCK_IDTCM is not set\n# CONFIG_PTP_1588_CLOCK_OCP is not set\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_CY8C95X0 is not set\nCONFIG_PINCTRL_MAX77620=y\n# CONFIG_PINCTRL_MCP23S08 is not set\n# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set\n# CONFIG_PINCTRL_OCELOT is not set\nCONFIG_PINCTRL_RK805=y\nCONFIG_PINCTRL_ROCKCHIP=y\n# CONFIG_PINCTRL_SINGLE is not set\n# CONFIG_PINCTRL_STMFX is not set\n# CONFIG_PINCTRL_SX150X is not set\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_CDEV=y\nCONFIG_GPIO_CDEV_V1=y\nCONFIG_GPIO_GENERIC=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_CADENCE is not set\nCONFIG_GPIO_DWAPB=y\n# CONFIG_GPIO_EXAR is not set\n# CONFIG_GPIO_FTGPIO010 is not set\n# CONFIG_GPIO_GENERIC_PLATFORM is not set\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_LOGICVC is not set\n# CONFIG_GPIO_MB86S7X is not set\nCONFIG_GPIO_PL061=y\nCONFIG_GPIO_ROCKCHIP=y\n# CONFIG_GPIO_SIFIVE is not set\nCONFIG_GPIO_SYSCON=y\n# CONFIG_GPIO_XGENE is not set\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_GW_PLD is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\nCONFIG_GPIO_PCA953X=y\nCONFIG_GPIO_PCA953X_IRQ=y\n# CONFIG_GPIO_PCA9570 is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\nCONFIG_GPIO_MAX77620=y\n# end of MFD GPIO expanders\n\n#\n# PCI GPIO expanders\n#\n# CONFIG_GPIO_BT8XX is not set\n# CONFIG_GPIO_PCI_IDIO_16 is not set\n# CONFIG_GPIO_PCIE_IDIO_24 is not set\n# CONFIG_GPIO_RDC321X is not set\n# end of PCI GPIO expanders\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n# end of SPI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_VIRTIO is not set\n# CONFIG_GPIO_SIM is not set\n# end of Virtual GPIO drivers\n\n# CONFIG_W1 is not set\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_BRCMSTB is not set\n# CONFIG_POWER_RESET_GPIO is not set\n# CONFIG_POWER_RESET_GPIO_RESTART is not set\n# CONFIG_POWER_RESET_LTC2952 is not set\nCONFIG_POWER_RESET_REGULATOR=y\n# CONFIG_POWER_RESET_RESTART is not set\n# CONFIG_POWER_RESET_XGENE is not set\nCONFIG_POWER_RESET_SYSCON=y\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\nCONFIG_REBOOT_MODE=y\nCONFIG_SYSCON_REBOOT_MODE=y\n# CONFIG_NVMEM_REBOOT_MODE is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\nCONFIG_POWER_SUPPLY_HWMON=y\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_IP5XXX_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SAMSUNG_SDI is not set\n# CONFIG_BATTERY_SBS is not set\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_MAX77976 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_RK817 is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_UCS1002 is not set\n# CONFIG_CHARGER_BD99954 is not set\n# CONFIG_BATTERY_UG3105 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM1177 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_AHT10 is not set\n# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set\n# CONFIG_SENSORS_AS370 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_AXI_FAN_CONTROL is not set\nCONFIG_SENSORS_ARM_SCPI=y\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_CORSAIR_CPRO is not set\n# CONFIG_SENSORS_CORSAIR_PSU is not set\n# CONFIG_SENSORS_DRIVETEMP is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_I5K_AMB is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\n# CONFIG_SENSORS_GPIO_FAN is not set\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IIO_HWMON is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2947_I2C is not set\n# CONFIG_SENSORS_LTC2947_SPI is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC2992 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX127 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX31730 is not set\n# CONFIG_SENSORS_MAX31760 is not set\n# CONFIG_SENSORS_MAX6620 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_TPS23861 is not set\n# CONFIG_SENSORS_MR75203 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\nCONFIG_SENSORS_LM90=m\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT6775_I2C is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_NZXT_KRAKEN2 is not set\n# CONFIG_SENSORS_NZXT_SMART2 is not set\n# CONFIG_SENSORS_OCC_P8_I2C is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\nCONFIG_SENSORS_PWM_FAN=m\n# CONFIG_SENSORS_SBTSI is not set\n# CONFIG_SENSORS_SBRMI is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHT4x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_SIS5595 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC2305 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\nCONFIG_SENSORS_INA2XX=m\n# CONFIG_SENSORS_INA238 is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_TMP464 is not set\n# CONFIG_SENSORS_TMP513 is not set\n# CONFIG_SENSORS_VIA686A is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_VT8231 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_NETLINK is not set\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\n# CONFIG_THERMAL_WRITABLE_TRIPS is not set\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\nCONFIG_CPU_THERMAL=y\nCONFIG_CPU_FREQ_THERMAL=y\nCONFIG_DEVFREQ_THERMAL=y\nCONFIG_THERMAL_EMULATION=y\n# CONFIG_THERMAL_MMIO is not set\n# CONFIG_MAX77620_THERMAL is not set\nCONFIG_ROCKCHIP_THERMAL=y\n# CONFIG_GENERIC_ADC_THERMAL is not set\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\nCONFIG_WATCHDOG_OPEN_TIMEOUT=0\n# CONFIG_WATCHDOG_SYSFS is not set\n# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_ARM_SBSA_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\nCONFIG_DW_WATCHDOG=y\n# CONFIG_MAX63XX_WATCHDOG is not set\n# CONFIG_MAX77620_WATCHDOG is not set\n# CONFIG_ARM_SMC_WATCHDOG is not set\n# CONFIG_ALIM7101_WDT is not set\n# CONFIG_I6300ESB_WDT is not set\n# CONFIG_HP_WATCHDOG is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# PCI-based Watchdog Cards\n#\n# CONFIG_PCIPCWATCHDOG is not set\n# CONFIG_WDTPCI is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\nCONFIG_SSB=m\nCONFIG_SSB_SPROM=y\nCONFIG_SSB_BLOCKIO=y\nCONFIG_SSB_PCIHOST_POSSIBLE=y\nCONFIG_SSB_PCIHOST=y\nCONFIG_SSB_B43_PCI_BRIDGE=y\nCONFIG_SSB_SDIOHOST_POSSIBLE=y\n# CONFIG_SSB_SDIOHOST is not set\nCONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y\nCONFIG_SSB_DRIVER_PCICORE=y\n# CONFIG_SSB_DRIVER_GPIO is not set\nCONFIG_BCMA_POSSIBLE=y\nCONFIG_BCMA=m\nCONFIG_BCMA_BLOCKIO=y\nCONFIG_BCMA_HOST_PCI_POSSIBLE=y\nCONFIG_BCMA_HOST_PCI=y\n# CONFIG_BCMA_HOST_SOC is not set\nCONFIG_BCMA_DRIVER_PCI=y\n# CONFIG_BCMA_DRIVER_GMAC_CMN is not set\n# CONFIG_BCMA_DRIVER_GPIO is not set\n# CONFIG_BCMA_DEBUG is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AXP20X_I2C is not set\n# CONFIG_MFD_MADERA is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_GATEWORKS_GSC is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_MP2629 is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_MFD_HI6421_SPMI is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_LPC_ICH is not set\n# CONFIG_LPC_SCH is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_JANZ_CMODIO is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\nCONFIG_MFD_MAX77620=y\n# CONFIG_MFD_MAX77650 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77714 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6370 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_MFD_OCELOT is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_NTXEC is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_SY7636A is not set\n# CONFIG_MFD_RDC321X is not set\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RT5120 is not set\n# CONFIG_MFD_RC5T583 is not set\nCONFIG_MFD_RK808=y\n# CONFIG_MFD_RN5T618 is not set\nCONFIG_MFD_SEC_CORE=y\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\nCONFIG_MFD_WL1273_CORE=m\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_VX855 is not set\n# CONFIG_MFD_LOCHNAGAR is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_MFD_ROHM_BD718XX is not set\n# CONFIG_MFD_ROHM_BD71828 is not set\n# CONFIG_MFD_ROHM_BD957XMUF is not set\n# CONFIG_MFD_STPMIC1 is not set\n# CONFIG_MFD_STMFX is not set\n# CONFIG_MFD_ATC260X_I2C is not set\n# CONFIG_MFD_KHADAS_MCU is not set\n# CONFIG_MFD_QCOM_PM8008 is not set\n# CONFIG_RAVE_SP_CORE is not set\n# CONFIG_MFD_INTEL_M10_BMC is not set\n# CONFIG_MFD_RSMU_I2C is not set\n# CONFIG_MFD_RSMU_SPI is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\n# CONFIG_REGULATOR_DA9121 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\nCONFIG_REGULATOR_FAN53555=y\n# CONFIG_REGULATOR_FAN53880 is not set\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX77620 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\n# CONFIG_REGULATOR_MAX20086 is not set\n# CONFIG_REGULATOR_MAX77826 is not set\n# CONFIG_REGULATOR_MCP16502 is not set\n# CONFIG_REGULATOR_MP5416 is not set\nCONFIG_REGULATOR_MP8859=y\n# CONFIG_REGULATOR_MP886X is not set\n# CONFIG_REGULATOR_MPQ7920 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_MT6315 is not set\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PF8X00 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\nCONFIG_REGULATOR_PWM=y\n# CONFIG_REGULATOR_QCOM_SPMI is not set\n# CONFIG_REGULATOR_QCOM_USB_VBUS is not set\n# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set\nCONFIG_REGULATOR_RK808=y\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT5190A is not set\n# CONFIG_REGULATOR_RT5759 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\n# CONFIG_REGULATOR_S2MPA01 is not set\n# CONFIG_REGULATOR_S2MPS11 is not set\n# CONFIG_REGULATOR_S5M8767 is not set\n# CONFIG_REGULATOR_SLG51000 is not set\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_SY8824X is not set\n# CONFIG_REGULATOR_SY8827N is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS6286X is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\n# CONFIG_REGULATOR_VCTRL is not set\n# CONFIG_REGULATOR_QCOM_LABIBB is not set\nCONFIG_RC_CORE=y\nCONFIG_BPF_LIRC_MODE2=y\nCONFIG_LIRC=y\nCONFIG_RC_MAP=m\nCONFIG_RC_DECODERS=y\nCONFIG_IR_IMON_DECODER=m\nCONFIG_IR_JVC_DECODER=m\nCONFIG_IR_MCE_KBD_DECODER=m\nCONFIG_IR_NEC_DECODER=m\nCONFIG_IR_RC5_DECODER=m\nCONFIG_IR_RC6_DECODER=m\nCONFIG_IR_RCMM_DECODER=m\nCONFIG_IR_SANYO_DECODER=m\nCONFIG_IR_SHARP_DECODER=m\nCONFIG_IR_SONY_DECODER=m\nCONFIG_IR_XMP_DECODER=m\nCONFIG_RC_DEVICES=y\nCONFIG_IR_GPIO_CIR=m\nCONFIG_IR_GPIO_TX=m\nCONFIG_IR_HIX5HD2=m\nCONFIG_IR_IGORPLUGUSB=m\nCONFIG_IR_IGUANA=m\nCONFIG_IR_IMON=m\nCONFIG_IR_IMON_RAW=m\nCONFIG_IR_MCEUSB=m\nCONFIG_IR_PWM_TX=m\nCONFIG_IR_REDRAT3=m\nCONFIG_IR_SERIAL=m\n# CONFIG_IR_SERIAL_TRANSMITTER is not set\nCONFIG_IR_SPI=m\nCONFIG_IR_STREAMZAP=m\nCONFIG_IR_TOY=m\nCONFIG_IR_TTUSBIR=m\nCONFIG_RC_ATI_REMOTE=m\n# CONFIG_RC_LOOPBACK is not set\nCONFIG_RC_XBOX_DVD=m\nCONFIG_CEC_CORE=y\nCONFIG_CEC_NOTIFIER=y\n\n#\n# CEC support\n#\n# CONFIG_MEDIA_CEC_RC is not set\nCONFIG_MEDIA_CEC_SUPPORT=y\n# CONFIG_CEC_CH7322 is not set\nCONFIG_USB_PULSE8_CEC=m\nCONFIG_USB_RAINSHADOW_CEC=m\n# end of CEC support\n\nCONFIG_MEDIA_SUPPORT=y\nCONFIG_MEDIA_SUPPORT_FILTER=y\nCONFIG_MEDIA_SUBDRV_AUTOSELECT=y\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\nCONFIG_MEDIA_ANALOG_TV_SUPPORT=y\nCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y\nCONFIG_MEDIA_RADIO_SUPPORT=y\n# CONFIG_MEDIA_SDR_SUPPORT is not set\nCONFIG_MEDIA_PLATFORM_SUPPORT=y\n# CONFIG_MEDIA_TEST_SUPPORT is not set\n# end of Media device types\n\nCONFIG_VIDEO_DEV=y\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_DVB_CORE=y\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2_I2C=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_VIDEO_TUNER=m\nCONFIG_V4L2_H264=m\nCONFIG_V4L2_VP9=m\nCONFIG_V4L2_MEM2MEM_DEV=m\nCONFIG_V4L2_FLASH_LED_CLASS=m\nCONFIG_V4L2_FWNODE=y\nCONFIG_V4L2_ASYNC=y\nCONFIG_VIDEOBUF_GEN=m\nCONFIG_VIDEOBUF_DMA_SG=m\nCONFIG_VIDEOBUF_VMALLOC=m\n# end of Video4Linux options\n\n#\n# Media controller options\n#\nCONFIG_MEDIA_CONTROLLER_DVB=y\nCONFIG_MEDIA_CONTROLLER_REQUEST_API=y\n# end of Media controller options\n\n#\n# Digital TV options\n#\n# CONFIG_DVB_MMAP is not set\nCONFIG_DVB_NET=y\nCONFIG_DVB_MAX_ADAPTERS=16\n# CONFIG_DVB_DYNAMIC_MINORS is not set\n# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set\n# CONFIG_DVB_ULE_DEBUG is not set\n# end of Digital TV options\n\n#\n# Media drivers\n#\n\n#\n# Drivers filtered as selected at 'Filter media drivers'\n#\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_USB_S2255 is not set\n# CONFIG_VIDEO_USBTV is not set\n# CONFIG_USB_VIDEO_CLASS is not set\n\n#\n# Analog TV USB devices\n#\nCONFIG_VIDEO_GO7007=m\nCONFIG_VIDEO_GO7007_USB=m\nCONFIG_VIDEO_GO7007_LOADER=m\nCONFIG_VIDEO_GO7007_USB_S2250_BOARD=m\nCONFIG_VIDEO_HDPVR=m\nCONFIG_VIDEO_PVRUSB2=m\nCONFIG_VIDEO_PVRUSB2_SYSFS=y\nCONFIG_VIDEO_PVRUSB2_DVB=y\n# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set\nCONFIG_VIDEO_STK1160_COMMON=m\nCONFIG_VIDEO_STK1160=m\n\n#\n# Analog/digital TV USB devices\n#\nCONFIG_VIDEO_AU0828=m\nCONFIG_VIDEO_AU0828_V4L2=y\nCONFIG_VIDEO_AU0828_RC=y\nCONFIG_VIDEO_CX231XX=m\nCONFIG_VIDEO_CX231XX_RC=y\nCONFIG_VIDEO_CX231XX_ALSA=m\nCONFIG_VIDEO_CX231XX_DVB=m\n\n#\n# Digital TV USB devices\n#\nCONFIG_DVB_AS102=m\nCONFIG_DVB_B2C2_FLEXCOP_USB=m\n# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set\nCONFIG_DVB_USB_V2=m\nCONFIG_DVB_USB_AF9015=m\nCONFIG_DVB_USB_AF9035=m\nCONFIG_DVB_USB_ANYSEE=m\nCONFIG_DVB_USB_AU6610=m\nCONFIG_DVB_USB_AZ6007=m\nCONFIG_DVB_USB_CE6230=m\nCONFIG_DVB_USB_DVBSKY=m\nCONFIG_DVB_USB_EC168=m\nCONFIG_DVB_USB_GL861=m\nCONFIG_DVB_USB_LME2510=m\nCONFIG_DVB_USB_MXL111SF=m\nCONFIG_DVB_USB_RTL28XXU=m\nCONFIG_DVB_USB_ZD1301=m\nCONFIG_DVB_USB=m\n# CONFIG_DVB_USB_DEBUG is not set\nCONFIG_DVB_USB_A800=m\nCONFIG_DVB_USB_AF9005=m\nCONFIG_DVB_USB_AF9005_REMOTE=m\nCONFIG_DVB_USB_AZ6027=m\nCONFIG_DVB_USB_CINERGY_T2=m\nCONFIG_DVB_USB_CXUSB=m\nCONFIG_DVB_USB_CXUSB_ANALOG=y\nCONFIG_DVB_USB_DIB0700=m\nCONFIG_DVB_USB_DIB3000MC=m\nCONFIG_DVB_USB_DIBUSB_MB=m\nCONFIG_DVB_USB_DIBUSB_MB_FAULTY=y\nCONFIG_DVB_USB_DIBUSB_MC=m\nCONFIG_DVB_USB_DIGITV=m\nCONFIG_DVB_USB_DTT200U=m\nCONFIG_DVB_USB_DTV5100=m\nCONFIG_DVB_USB_DW2102=m\nCONFIG_DVB_USB_GP8PSK=m\nCONFIG_DVB_USB_M920X=m\nCONFIG_DVB_USB_NOVA_T_USB2=m\nCONFIG_DVB_USB_OPERA1=m\nCONFIG_DVB_USB_PCTV452E=m\nCONFIG_DVB_USB_TECHNISAT_USB2=m\nCONFIG_DVB_USB_TTUSB2=m\nCONFIG_DVB_USB_UMT_010=m\nCONFIG_DVB_USB_VP702X=m\nCONFIG_DVB_USB_VP7045=m\nCONFIG_SMS_USB_DRV=m\n# CONFIG_DVB_TTUSB_BUDGET is not set\n# CONFIG_DVB_TTUSB_DEC is not set\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\nCONFIG_VIDEO_EM28XX=m\nCONFIG_VIDEO_EM28XX_V4L2=m\nCONFIG_VIDEO_EM28XX_ALSA=m\nCONFIG_VIDEO_EM28XX_DVB=m\nCONFIG_VIDEO_EM28XX_RC=m\nCONFIG_MEDIA_PCI_SUPPORT=y\n\n#\n# Media capture support\n#\n# CONFIG_VIDEO_SOLO6X10 is not set\n# CONFIG_VIDEO_TW5864 is not set\n# CONFIG_VIDEO_TW68 is not set\n# CONFIG_VIDEO_TW686X is not set\n# CONFIG_VIDEO_ZORAN is not set\n\n#\n# Media capture/analog TV support\n#\n# CONFIG_VIDEO_DT3155 is not set\n# CONFIG_VIDEO_IVTV is not set\n\n#\n# Media capture/analog/hybrid TV support\n#\n# CONFIG_VIDEO_BT848 is not set\n# CONFIG_VIDEO_CX18 is not set\nCONFIG_VIDEO_CX23885=m\nCONFIG_MEDIA_ALTERA_CI=m\nCONFIG_VIDEO_CX25821=m\nCONFIG_VIDEO_CX25821_ALSA=m\n# CONFIG_VIDEO_CX88 is not set\n# CONFIG_VIDEO_SAA7134 is not set\nCONFIG_VIDEO_SAA7164=m\n\n#\n# Media digital TV PCI Adapters\n#\n# CONFIG_DVB_B2C2_FLEXCOP_PCI is not set\nCONFIG_DVB_DDBRIDGE=m\n# CONFIG_DVB_DDBRIDGE_MSIENABLE is not set\n# CONFIG_DVB_DM1105 is not set\nCONFIG_MANTIS_CORE=m\n# CONFIG_DVB_MANTIS is not set\n# CONFIG_DVB_HOPPER is not set\nCONFIG_DVB_NETUP_UNIDVB=m\nCONFIG_DVB_NGENE=m\n# CONFIG_DVB_PLUTO2 is not set\n# CONFIG_DVB_PT1 is not set\nCONFIG_DVB_PT3=m\nCONFIG_DVB_SMIPCIE=m\nCONFIG_RADIO_ADAPTERS=y\n# CONFIG_RADIO_MAXIRADIO is not set\nCONFIG_RADIO_SAA7706H=m\nCONFIG_RADIO_SHARK=m\nCONFIG_RADIO_SHARK2=m\nCONFIG_RADIO_SI4713=m\nCONFIG_RADIO_TEA575X=m\nCONFIG_RADIO_TEA5764=m\nCONFIG_RADIO_TEF6862=m\nCONFIG_RADIO_WL1273=m\nCONFIG_USB_DSBR=m\nCONFIG_USB_KEENE=m\nCONFIG_USB_MA901=m\nCONFIG_USB_MR800=m\nCONFIG_USB_RAREMONO=m\nCONFIG_RADIO_SI470X=m\nCONFIG_USB_SI470X=m\nCONFIG_I2C_SI470X=m\nCONFIG_USB_SI4713=m\nCONFIG_PLATFORM_SI4713=m\nCONFIG_I2C_SI4713=m\nCONFIG_MEDIA_PLATFORM_DRIVERS=y\nCONFIG_V4L_PLATFORM_DRIVERS=y\n# CONFIG_DVB_PLATFORM_DRIVERS is not set\nCONFIG_V4L_MEM2MEM_DRIVERS=y\n# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set\n# CONFIG_VIDEO_MUX is not set\n\n#\n# Allegro DVT media platform drivers\n#\n\n#\n# Amlogic media platform drivers\n#\n\n#\n# Amphion drivers\n#\n\n#\n# Aspeed media platform drivers\n#\n# CONFIG_VIDEO_ASPEED is not set\n\n#\n# Atmel media platform drivers\n#\n\n#\n# Cadence media platform drivers\n#\n# CONFIG_VIDEO_CADENCE_CSI2RX is not set\n# CONFIG_VIDEO_CADENCE_CSI2TX is not set\n\n#\n# Chips&Media media platform drivers\n#\n\n#\n# Intel media platform drivers\n#\n\n#\n# Marvell media platform drivers\n#\n# CONFIG_VIDEO_CAFE_CCIC is not set\n\n#\n# Mediatek media platform drivers\n#\n\n#\n# NVidia media platform drivers\n#\n\n#\n# NXP media platform drivers\n#\n\n#\n# Qualcomm media platform drivers\n#\n\n#\n# Renesas media platform drivers\n#\n\n#\n# Rockchip media platform drivers\n#\nCONFIG_VIDEO_ROCKCHIP_IEP=m\nCONFIG_VIDEO_ROCKCHIP_RGA=m\nCONFIG_VIDEO_ROCKCHIP_ISP1=m\n\n#\n# Samsung media platform drivers\n#\n\n#\n# STMicroelectronics media platform drivers\n#\n\n#\n# Sunxi media platform drivers\n#\n\n#\n# Texas Instruments drivers\n#\n\n#\n# Verisilicon media platform drivers\n#\nCONFIG_VIDEO_HANTRO=m\nCONFIG_VIDEO_HANTRO_ROCKCHIP=y\n\n#\n# VIA media platform drivers\n#\n\n#\n# Xilinx media platform drivers\n#\n# CONFIG_VIDEO_XILINX is not set\n\n#\n# MMC/SDIO DVB adapters\n#\n# CONFIG_SMS_SDIO_DRV is not set\nCONFIG_MEDIA_COMMON_OPTIONS=y\n\n#\n# common driver options\n#\nCONFIG_CYPRESS_FIRMWARE=m\nCONFIG_TTPCI_EEPROM=m\nCONFIG_VIDEO_CX2341X=m\nCONFIG_VIDEO_TVEEPROM=m\nCONFIG_DVB_B2C2_FLEXCOP=m\nCONFIG_SMS_SIANO_MDTV=m\nCONFIG_SMS_SIANO_RC=y\nCONFIG_VIDEOBUF2_CORE=m\nCONFIG_VIDEOBUF2_V4L2=m\nCONFIG_VIDEOBUF2_MEMOPS=m\nCONFIG_VIDEOBUF2_DMA_CONTIG=m\nCONFIG_VIDEOBUF2_VMALLOC=m\nCONFIG_VIDEOBUF2_DMA_SG=m\nCONFIG_VIDEOBUF2_DVB=m\n# end of Media drivers\n\nCONFIG_MEDIA_HIDE_ANCILLARY_SUBDRV=y\n\n#\n# Media ancillary drivers\n#\nCONFIG_MEDIA_ATTACH=y\n\n#\n# IR I2C driver auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_IR_I2C=y\nCONFIG_VIDEO_CAMERA_SENSOR=y\n# CONFIG_VIDEO_AR0521 is not set\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_HI846 is not set\n# CONFIG_VIDEO_HI847 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_IMX412 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\nCONFIG_VIDEO_MT9V011=m\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_OG01A1B is not set\n# CONFIG_VIDEO_OV02A10 is not set\n# CONFIG_VIDEO_OV08D10 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\nCONFIG_VIDEO_OV2640=m\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5693 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV7251 is not set\nCONFIG_VIDEO_OV7640=m\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9282 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# audio, video and radio I2C drivers auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_VIDEO_CS3308=m\nCONFIG_VIDEO_CS53L32A=m\nCONFIG_VIDEO_MSP3400=m\nCONFIG_VIDEO_SONY_BTF_MPX=m\nCONFIG_VIDEO_UDA1342=m\nCONFIG_VIDEO_WM8775=m\nCONFIG_VIDEO_SAA711X=m\nCONFIG_VIDEO_TVP5150=m\nCONFIG_VIDEO_TW2804=m\nCONFIG_VIDEO_TW9903=m\nCONFIG_VIDEO_TW9906=m\n\n#\n# Video and audio decoders\n#\nCONFIG_VIDEO_CX25840=m\n\n#\n# SPI I2C drivers auto-selected by 'Autoselect ancillary drivers'\n#\n\n#\n# Media SPI Adapters\n#\n# CONFIG_CXD2880_SPI_DRV is not set\n# CONFIG_VIDEO_GS1662 is not set\n# end of Media SPI Adapters\n\nCONFIG_MEDIA_TUNER=y\n\n#\n# Tuner drivers auto-selected by 'Autoselect ancillary drivers'\n#\nCONFIG_MEDIA_TUNER_E4000=m\nCONFIG_MEDIA_TUNER_FC0011=m\nCONFIG_MEDIA_TUNER_FC0012=m\nCONFIG_MEDIA_TUNER_FC0013=m\nCONFIG_MEDIA_TUNER_FC2580=m\nCONFIG_MEDIA_TUNER_IT913X=m\nCONFIG_MEDIA_TUNER_M88RS6000T=m\nCONFIG_MEDIA_TUNER_MAX2165=m\nCONFIG_MEDIA_TUNER_MC44S803=y\nCONFIG_MEDIA_TUNER_MT2060=m\nCONFIG_MEDIA_TUNER_MT2063=m\nCONFIG_MEDIA_TUNER_MT20XX=y\nCONFIG_MEDIA_TUNER_MT2131=m\nCONFIG_MEDIA_TUNER_MT2266=m\nCONFIG_MEDIA_TUNER_MXL301RF=m\nCONFIG_MEDIA_TUNER_MXL5005S=m\nCONFIG_MEDIA_TUNER_MXL5007T=m\nCONFIG_MEDIA_TUNER_QM1D1C0042=m\nCONFIG_MEDIA_TUNER_QT1010=m\nCONFIG_MEDIA_TUNER_R820T=m\nCONFIG_MEDIA_TUNER_SI2157=m\nCONFIG_MEDIA_TUNER_SIMPLE=y\nCONFIG_MEDIA_TUNER_TDA18212=m\nCONFIG_MEDIA_TUNER_TDA18218=m\nCONFIG_MEDIA_TUNER_TDA18250=m\nCONFIG_MEDIA_TUNER_TDA18271=y\nCONFIG_MEDIA_TUNER_TDA827X=y\nCONFIG_MEDIA_TUNER_TDA8290=y\nCONFIG_MEDIA_TUNER_TDA9887=y\nCONFIG_MEDIA_TUNER_TEA5761=y\nCONFIG_MEDIA_TUNER_TEA5767=y\nCONFIG_MEDIA_TUNER_TUA9001=m\nCONFIG_MEDIA_TUNER_XC2028=y\nCONFIG_MEDIA_TUNER_XC4000=y\nCONFIG_MEDIA_TUNER_XC5000=y\n\n#\n# DVB Frontend drivers auto-selected by 'Autoselect ancillary drivers'\n#\n\n#\n# Multistandard (satellite) frontends\n#\nCONFIG_DVB_M88DS3103=m\nCONFIG_DVB_MXL5XX=m\nCONFIG_DVB_STB0899=m\nCONFIG_DVB_STB6100=m\nCONFIG_DVB_STV090x=m\nCONFIG_DVB_STV0910=m\nCONFIG_DVB_STV6110x=m\nCONFIG_DVB_STV6111=m\n\n#\n# Multistandard (cable + terrestrial) frontends\n#\nCONFIG_DVB_DRXK=m\nCONFIG_DVB_MN88472=m\nCONFIG_DVB_MN88473=m\nCONFIG_DVB_SI2165=m\nCONFIG_DVB_TDA18271C2DD=m\n\n#\n# DVB-S (satellite) frontends\n#\nCONFIG_DVB_CX24116=m\nCONFIG_DVB_CX24117=m\nCONFIG_DVB_CX24120=m\nCONFIG_DVB_CX24123=m\nCONFIG_DVB_DS3000=m\nCONFIG_DVB_MT312=m\nCONFIG_DVB_S5H1420=m\nCONFIG_DVB_SI21XX=m\nCONFIG_DVB_STB6000=m\nCONFIG_DVB_STV0288=m\nCONFIG_DVB_STV0299=m\nCONFIG_DVB_STV0900=m\nCONFIG_DVB_STV6110=m\nCONFIG_DVB_TDA10071=m\nCONFIG_DVB_TDA10086=m\nCONFIG_DVB_TDA8083=m\nCONFIG_DVB_TDA826X=m\nCONFIG_DVB_TS2020=m\nCONFIG_DVB_TUNER_CX24113=m\nCONFIG_DVB_TUNER_ITD1000=m\nCONFIG_DVB_VES1X93=m\nCONFIG_DVB_ZL10039=m\n\n#\n# DVB-T (terrestrial) frontends\n#\nCONFIG_DVB_AF9013=m\nCONFIG_DVB_AS102_FE=m\nCONFIG_DVB_CX22702=m\nCONFIG_DVB_CXD2820R=m\nCONFIG_DVB_CXD2841ER=m\nCONFIG_DVB_DIB3000MB=m\nCONFIG_DVB_DIB3000MC=m\nCONFIG_DVB_DIB7000M=m\nCONFIG_DVB_DIB7000P=m\nCONFIG_DVB_DRXD=m\nCONFIG_DVB_EC100=m\nCONFIG_DVB_GP8PSK_FE=m\nCONFIG_DVB_L64781=m\nCONFIG_DVB_MT352=m\nCONFIG_DVB_NXT6000=m\nCONFIG_DVB_RTL2830=m\nCONFIG_DVB_RTL2832=m\nCONFIG_DVB_SI2168=m\nCONFIG_DVB_STV0367=m\nCONFIG_DVB_TDA10048=m\nCONFIG_DVB_TDA1004X=m\nCONFIG_DVB_ZD1301_DEMOD=m\nCONFIG_DVB_ZL10353=m\n\n#\n# DVB-C (cable) frontends\n#\nCONFIG_DVB_STV0297=m\nCONFIG_DVB_TDA10023=m\nCONFIG_DVB_VES1820=m\n\n#\n# ATSC (North American/Korean Terrestrial/Cable DTV) frontends\n#\nCONFIG_DVB_AU8522=m\nCONFIG_DVB_AU8522_DTV=m\nCONFIG_DVB_AU8522_V4L=m\nCONFIG_DVB_BCM3510=m\nCONFIG_DVB_LG2160=m\nCONFIG_DVB_LGDT3305=m\nCONFIG_DVB_LGDT3306A=m\nCONFIG_DVB_LGDT330X=m\nCONFIG_DVB_MXL692=m\nCONFIG_DVB_NXT200X=m\nCONFIG_DVB_S5H1409=m\nCONFIG_DVB_S5H1411=m\n\n#\n# ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_DIB8000=m\nCONFIG_DVB_MB86A20S=m\nCONFIG_DVB_S921=m\n\n#\n# ISDB-S (satellite) & ISDB-T (terrestrial) frontends\n#\nCONFIG_DVB_TC90522=m\n\n#\n# Digital terrestrial only tuners/PLL\n#\nCONFIG_DVB_PLL=m\nCONFIG_DVB_TUNER_DIB0070=m\nCONFIG_DVB_TUNER_DIB0090=m\n\n#\n# SEC control devices for DVB-S\n#\nCONFIG_DVB_A8293=m\nCONFIG_DVB_AF9033=m\nCONFIG_DVB_ASCOT2E=m\nCONFIG_DVB_ATBM8830=m\nCONFIG_DVB_HELENE=m\nCONFIG_DVB_HORUS3A=m\nCONFIG_DVB_ISL6421=m\nCONFIG_DVB_ISL6423=m\nCONFIG_DVB_IX2505V=m\nCONFIG_DVB_LGS8GXX=m\nCONFIG_DVB_LNBH25=m\nCONFIG_DVB_LNBP21=m\nCONFIG_DVB_LNBP22=m\nCONFIG_DVB_M88RS2000=m\nCONFIG_DVB_DRX39XYJ=m\n\n#\n# Common Interface (EN50221) controller drivers\n#\nCONFIG_DVB_CXD2099=m\nCONFIG_DVB_SP2=m\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\nCONFIG_DRM=y\nCONFIG_DRM_MIPI_DBI=y\nCONFIG_DRM_MIPI_DSI=y\n# CONFIG_DRM_DEBUG_MM is not set\nCONFIG_DRM_KMS_HELPER=y\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\nCONFIG_DRM_DP_AUX_BUS=y\nCONFIG_DRM_DISPLAY_HELPER=y\nCONFIG_DRM_DISPLAY_DP_HELPER=y\nCONFIG_DRM_DISPLAY_HDMI_HELPER=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_GEM_DMA_HELPER=y\nCONFIG_DRM_GEM_SHMEM_HELPER=y\nCONFIG_DRM_SCHED=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_KOMEDA is not set\n# end of ARM devices\n\n# CONFIG_DRM_RADEON is not set\n# CONFIG_DRM_AMDGPU is not set\n# CONFIG_DRM_NOUVEAU is not set\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\nCONFIG_DRM_ROCKCHIP=y\nCONFIG_ROCKCHIP_VOP=y\n# CONFIG_ROCKCHIP_VOP2 is not set\n# CONFIG_ROCKCHIP_ANALOGIX_DP is not set\n# CONFIG_ROCKCHIP_CDN_DP is not set\nCONFIG_ROCKCHIP_DW_HDMI=y\nCONFIG_ROCKCHIP_DW_MIPI_DSI=y\n# CONFIG_ROCKCHIP_INNO_HDMI is not set\n# CONFIG_ROCKCHIP_LVDS is not set\n# CONFIG_ROCKCHIP_RGB is not set\n# CONFIG_ROCKCHIP_RK3066_HDMI is not set\n# CONFIG_DRM_VMWGFX is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_AST is not set\n# CONFIG_DRM_MGAG200 is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_USE_LVDS is not set\n# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set\n# CONFIG_DRM_QXL is not set\n# CONFIG_DRM_VIRTIO_GPU is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\nCONFIG_DRM_PANEL_ABT_Y030XX067A=y\nCONFIG_DRM_PANEL_ARM_VERSATILE=y\nCONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596=y\nCONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0=y\nCONFIG_DRM_PANEL_BOE_HIMAX8279D=y\nCONFIG_DRM_PANEL_BOE_TV101WUM_NL6=y\nCONFIG_DRM_PANEL_DSI_CM=y\n# CONFIG_DRM_PANEL_LVDS is not set\nCONFIG_DRM_PANEL_SIMPLE=y\n# CONFIG_DRM_PANEL_EDP is not set\nCONFIG_DRM_PANEL_EBBG_FT8719=y\nCONFIG_DRM_PANEL_ELIDA_KD35T133=y\nCONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02=y\nCONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D=y\nCONFIG_DRM_PANEL_ILITEK_IL9322=y\nCONFIG_DRM_PANEL_ILITEK_ILI9341=y\nCONFIG_DRM_PANEL_ILITEK_ILI9881C=y\nCONFIG_DRM_PANEL_INNOLUX_EJ030NA=y\nCONFIG_DRM_PANEL_INNOLUX_P079ZCA=y\nCONFIG_DRM_PANEL_JDI_LT070ME05000=y\nCONFIG_DRM_PANEL_JDI_R63452=y\nCONFIG_DRM_PANEL_KHADAS_TS050=y\nCONFIG_DRM_PANEL_KINGDISPLAY_KD097D04=y\nCONFIG_DRM_PANEL_LEADTEK_LTK050H3146W=y\nCONFIG_DRM_PANEL_LEADTEK_LTK500HD1829=y\nCONFIG_DRM_PANEL_SAMSUNG_LD9040=y\nCONFIG_DRM_PANEL_LG_LB035Q02=y\nCONFIG_DRM_PANEL_LG_LG4573=y\nCONFIG_DRM_PANEL_NEC_NL8048HL11=y\nCONFIG_DRM_PANEL_NEWVISION_NV3052C=y\nCONFIG_DRM_PANEL_NOVATEK_NT35510=y\nCONFIG_DRM_PANEL_NOVATEK_NT35560=y\nCONFIG_DRM_PANEL_NOVATEK_NT35950=y\nCONFIG_DRM_PANEL_NOVATEK_NT36672A=y\nCONFIG_DRM_PANEL_NOVATEK_NT39016=y\nCONFIG_DRM_PANEL_MANTIX_MLAF057WE51=y\nCONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO=y\nCONFIG_DRM_PANEL_ORISETECH_OTM8009A=y\nCONFIG_DRM_PANEL_OSD_OSD101T2587_53TS=y\nCONFIG_DRM_PANEL_PANASONIC_VVX10F034N00=y\nCONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=y\nCONFIG_DRM_PANEL_RAYDIUM_RM67191=y\nCONFIG_DRM_PANEL_RAYDIUM_RM68200=y\nCONFIG_DRM_PANEL_RONBO_RB070D30=y\nCONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=y\nCONFIG_DRM_PANEL_SAMSUNG_DB7430=y\nCONFIG_DRM_PANEL_SAMSUNG_S6D16D0=y\nCONFIG_DRM_PANEL_SAMSUNG_S6D27A1=y\nCONFIG_DRM_PANEL_SAMSUNG_S6E3HA2=y\nCONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03=y\nCONFIG_DRM_PANEL_SAMSUNG_S6E63M0=y\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0_SPI is not set\nCONFIG_DRM_PANEL_SAMSUNG_S6E63M0_DSI=y\n# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set\nCONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=y\nCONFIG_DRM_PANEL_SAMSUNG_SOFEF00=y\nCONFIG_DRM_PANEL_SEIKO_43WVF1G=y\nCONFIG_DRM_PANEL_SHARP_LQ101R1SX01=y\nCONFIG_DRM_PANEL_SHARP_LS037V7DW01=y\nCONFIG_DRM_PANEL_SHARP_LS043T1LE01=y\nCONFIG_DRM_PANEL_SHARP_LS060T1SX01=y\nCONFIG_DRM_PANEL_SITRONIX_ST7701=y\nCONFIG_DRM_PANEL_SITRONIX_ST7703=y\nCONFIG_DRM_PANEL_SITRONIX_ST7789V=y\nCONFIG_DRM_PANEL_SONY_ACX565AKM=y\nCONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521=y\nCONFIG_DRM_PANEL_TDO_TL070WSH30=y\nCONFIG_DRM_PANEL_TPO_TD028TTEC1=y\nCONFIG_DRM_PANEL_TPO_TD043MTEA1=y\nCONFIG_DRM_PANEL_TPO_TPG110=y\nCONFIG_DRM_PANEL_TRULY_NT35597_WQXGA=y\nCONFIG_DRM_PANEL_VISIONOX_RM69299=y\nCONFIG_DRM_PANEL_WIDECHIPS_WS2401=y\nCONFIG_DRM_PANEL_XINPENG_XPP055C272=y\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_CHRONTEL_CH7033 is not set\nCONFIG_DRM_DISPLAY_CONNECTOR=y\n# CONFIG_DRM_ITE_IT6505 is not set\n# CONFIG_DRM_LONTIUM_LT8912B is not set\n# CONFIG_DRM_LONTIUM_LT9211 is not set\n# CONFIG_DRM_LONTIUM_LT9611 is not set\n# CONFIG_DRM_LONTIUM_LT9611UXC is not set\n# CONFIG_DRM_ITE_IT66121 is not set\n# CONFIG_DRM_LVDS_CODEC is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NWL_MIPI_DSI is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_PARADE_PS8640 is not set\n# CONFIG_DRM_SIL_SII8620 is not set\n# CONFIG_DRM_SII902X is not set\n# CONFIG_DRM_SII9234 is not set\n# CONFIG_DRM_SIMPLE_BRIDGE is not set\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\n# CONFIG_DRM_TOSHIBA_TC358762 is not set\n# CONFIG_DRM_TOSHIBA_TC358764 is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TOSHIBA_TC358768 is not set\n# CONFIG_DRM_TOSHIBA_TC358775 is not set\n# CONFIG_DRM_TI_DLPC3433 is not set\n# CONFIG_DRM_TI_TFP410 is not set\n# CONFIG_DRM_TI_SN65DSI83 is not set\n# CONFIG_DRM_TI_SN65DSI86 is not set\n# CONFIG_DRM_TI_TPD12S015 is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_ANALOGIX_ANX7625 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_CDNS_MHDP8546 is not set\nCONFIG_DRM_DW_HDMI=y\n# CONFIG_DRM_DW_HDMI_AHB_AUDIO is not set\nCONFIG_DRM_DW_HDMI_I2S_AUDIO=y\n# CONFIG_DRM_DW_HDMI_GP_AUDIO is not set\nCONFIG_DRM_DW_HDMI_CEC=y\nCONFIG_DRM_DW_MIPI_DSI=y\n# end of Display Interface Bridges\n\n# CONFIG_DRM_ETNAVIV is not set\n# CONFIG_DRM_HISI_HIBMC is not set\n# CONFIG_DRM_HISI_KIRIN is not set\n# CONFIG_DRM_LOGICVC is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_BOCHS is not set\n# CONFIG_DRM_CIRRUS_QEMU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_PANEL_MIPI_DBI is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_TINYDRM_HX8357D is not set\n# CONFIG_TINYDRM_ILI9163 is not set\n# CONFIG_TINYDRM_ILI9225 is not set\n# CONFIG_TINYDRM_ILI9341 is not set\n# CONFIG_TINYDRM_ILI9486 is not set\n# CONFIG_TINYDRM_MI0283QT is not set\n# CONFIG_TINYDRM_REPAPER is not set\n# CONFIG_TINYDRM_ST7586 is not set\n# CONFIG_TINYDRM_ST7735R is not set\n# CONFIG_DRM_PL111 is not set\n# CONFIG_DRM_LIMA is not set\nCONFIG_DRM_PANFROST=y\n# CONFIG_DRM_TIDSS is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_SSD130X is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_DRM_NOMODESET=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\nCONFIG_FB_MODE_HELPERS=y\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_CIRRUS is not set\n# CONFIG_FB_PM2 is not set\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_CYBER2000 is not set\n# CONFIG_FB_ASILIANT is not set\n# CONFIG_FB_IMSTT is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_NVIDIA is not set\n# CONFIG_FB_RIVA is not set\n# CONFIG_FB_I740 is not set\n# CONFIG_FB_MATROX is not set\n# CONFIG_FB_RADEON is not set\n# CONFIG_FB_ATY128 is not set\n# CONFIG_FB_ATY is not set\n# CONFIG_FB_S3 is not set\n# CONFIG_FB_SAVAGE is not set\n# CONFIG_FB_SIS is not set\n# CONFIG_FB_NEOMAGIC is not set\n# CONFIG_FB_KYRO is not set\n# CONFIG_FB_3DFX is not set\n# CONFIG_FB_VOODOO1 is not set\n# CONFIG_FB_VT8623 is not set\n# CONFIG_FB_TRIDENT is not set\n# CONFIG_FB_ARK is not set\n# CONFIG_FB_PM3 is not set\n# CONFIG_FB_CARMINE is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_MB862XX is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# CONFIG_FB_SM712 is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\n# CONFIG_LCD_CLASS_DEVICE is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\n# CONFIG_BACKLIGHT_KTD253 is not set\nCONFIG_BACKLIGHT_PWM=y\n# CONFIG_BACKLIGHT_QCOM_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\n# CONFIG_BACKLIGHT_GPIO is not set\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n# CONFIG_BACKLIGHT_LED is not set\n# end of Backlight & LCD device support\n\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_DUMMY_CONSOLE_COLUMNS=80\nCONFIG_DUMMY_CONSOLE_ROWS=25\nCONFIG_FRAMEBUFFER_CONSOLE=y\n# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\nCONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\n# end of Console display driver support\n\n# CONFIG_LOGO is not set\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_HWDEP=m\nCONFIG_SND_RAWMIDI=m\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\n# CONFIG_SND_HRTIMER is not set\n# CONFIG_SND_DYNAMIC_MINORS is not set\nCONFIG_SND_SUPPORT_OLD_API=y\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_CTL_INPUT_VALIDATION is not set\n# CONFIG_SND_SEQUENCER is not set\nCONFIG_SND_DRIVERS=y\n# CONFIG_SND_DUMMY is not set\n# CONFIG_SND_ALOOP is not set\n# CONFIG_SND_MTPAV is not set\n# CONFIG_SND_SERIAL_U16550 is not set\n# CONFIG_SND_SERIAL_GENERIC is not set\n# CONFIG_SND_MPU401 is not set\nCONFIG_SND_PCI=y\n# CONFIG_SND_AD1889 is not set\n# CONFIG_SND_ALS300 is not set\n# CONFIG_SND_ALI5451 is not set\n# CONFIG_SND_ATIIXP is not set\n# CONFIG_SND_ATIIXP_MODEM is not set\n# CONFIG_SND_AU8810 is not set\n# CONFIG_SND_AU8820 is not set\n# CONFIG_SND_AU8830 is not set\n# CONFIG_SND_AW2 is not set\n# CONFIG_SND_AZT3328 is not set\n# CONFIG_SND_BT87X is not set\n# CONFIG_SND_CA0106 is not set\n# CONFIG_SND_CMIPCI is not set\n# CONFIG_SND_OXYGEN is not set\n# CONFIG_SND_CS4281 is not set\n# CONFIG_SND_CS46XX is not set\n# CONFIG_SND_CTXFI is not set\n# CONFIG_SND_DARLA20 is not set\n# CONFIG_SND_GINA20 is not set\n# CONFIG_SND_LAYLA20 is not set\n# CONFIG_SND_DARLA24 is not set\n# CONFIG_SND_GINA24 is not set\n# CONFIG_SND_LAYLA24 is not set\n# CONFIG_SND_MONA is not set\n# CONFIG_SND_MIA is not set\n# CONFIG_SND_ECHO3G is not set\n# CONFIG_SND_INDIGO is not set\n# CONFIG_SND_INDIGOIO is not set\n# CONFIG_SND_INDIGODJ is not set\n# CONFIG_SND_INDIGOIOX is not set\n# CONFIG_SND_INDIGODJX is not set\n# CONFIG_SND_EMU10K1 is not set\n# CONFIG_SND_EMU10K1X is not set\n# CONFIG_SND_ENS1370 is not set\n# CONFIG_SND_ENS1371 is not set\n# CONFIG_SND_ES1938 is not set\n# CONFIG_SND_ES1968 is not set\n# CONFIG_SND_FM801 is not set\n# CONFIG_SND_HDSP is not set\n# CONFIG_SND_HDSPM is not set\n# CONFIG_SND_ICE1712 is not set\n# CONFIG_SND_ICE1724 is not set\n# CONFIG_SND_INTEL8X0 is not set\n# CONFIG_SND_INTEL8X0M is not set\n# CONFIG_SND_KORG1212 is not set\n# CONFIG_SND_LOLA is not set\n# CONFIG_SND_LX6464ES is not set\n# CONFIG_SND_MAESTRO3 is not set\n# CONFIG_SND_MIXART is not set\n# CONFIG_SND_NM256 is not set\n# CONFIG_SND_PCXHR is not set\n# CONFIG_SND_RIPTIDE is not set\n# CONFIG_SND_RME32 is not set\n# CONFIG_SND_RME96 is not set\n# CONFIG_SND_RME9652 is not set\n# CONFIG_SND_SE6X is not set\n# CONFIG_SND_SONICVIBES is not set\n# CONFIG_SND_TRIDENT is not set\n# CONFIG_SND_VIA82XX is not set\n# CONFIG_SND_VIA82XX_MODEM is not set\n# CONFIG_SND_VIRTUOSO is not set\n# CONFIG_SND_VX222 is not set\n# CONFIG_SND_YMFPCI is not set\n\n#\n# HD-Audio\n#\n# CONFIG_SND_HDA_INTEL is not set\n# end of HD-Audio\n\nCONFIG_SND_HDA_PREALLOC_SIZE=64\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=m\nCONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y\n# CONFIG_SND_USB_UA101 is not set\n# CONFIG_SND_USB_CAIAQ is not set\n# CONFIG_SND_USB_6FIRE is not set\n# CONFIG_SND_USB_HIFACE is not set\n# CONFIG_SND_BCD2000 is not set\n# CONFIG_SND_USB_POD is not set\n# CONFIG_SND_USB_PODHD is not set\n# CONFIG_SND_USB_TONEPORT is not set\n# CONFIG_SND_USB_VARIAX is not set\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\n# CONFIG_SND_SOC_ADI is not set\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_AMD_ACP_CONFIG is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_AUDMIX is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_FSL_MICFIL is not set\n# CONFIG_SND_SOC_FSL_XCVR is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\nCONFIG_SND_SOC_ROCKCHIP=y\nCONFIG_SND_SOC_ROCKCHIP_I2S=y\nCONFIG_SND_SOC_ROCKCHIP_I2S_TDM=y\nCONFIG_SND_SOC_ROCKCHIP_PDM=m\nCONFIG_SND_SOC_ROCKCHIP_SPDIF=y\nCONFIG_SND_SOC_ROCKCHIP_MAX98090=m\nCONFIG_SND_SOC_ROCKCHIP_RT5645=m\nCONFIG_SND_SOC_RK3288_HDMI_ANALOG=m\nCONFIG_SND_SOC_RK3399_GRU_SOUND=m\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_SPI is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\n# CONFIG_SND_SOC_ADAU7002 is not set\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4375 is not set\n# CONFIG_SND_SOC_AK4458 is not set\n# CONFIG_SND_SOC_AK4554 is not set\nCONFIG_SND_SOC_AK4613=m\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_AW8738 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS35L41_SPI is not set\n# CONFIG_SND_SOC_CS35L41_I2C is not set\n# CONFIG_SND_SOC_CS35L45_SPI is not set\n# CONFIG_SND_SOC_CS35L45_I2C is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS42L83 is not set\n# CONFIG_SND_SOC_CS4234 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\n# CONFIG_SND_SOC_DA7213 is not set\nCONFIG_SND_SOC_DA7219=m\nCONFIG_SND_SOC_DMIC=m\nCONFIG_SND_SOC_HDMI_CODEC=y\n# CONFIG_SND_SOC_ES7134 is not set\n# CONFIG_SND_SOC_ES7241 is not set\nCONFIG_SND_SOC_ES8316=y\n# CONFIG_SND_SOC_ES8326 is not set\nCONFIG_SND_SOC_ES8328=m\nCONFIG_SND_SOC_ES8328_I2C=m\nCONFIG_SND_SOC_ES8328_SPI=m\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_HDA is not set\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\n# CONFIG_SND_SOC_MAX98088 is not set\nCONFIG_SND_SOC_MAX98090=m\nCONFIG_SND_SOC_MAX98357A=m\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98520 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX98396 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_ANALOG is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM179X_SPI is not set\n# CONFIG_SND_SOC_PCM186X_I2C is not set\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3060_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\n# CONFIG_SND_SOC_PCM5102A is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK3328 is not set\nCONFIG_SND_SOC_RK817=m\nCONFIG_SND_SOC_RL6231=m\nCONFIG_SND_SOC_RT5514=m\nCONFIG_SND_SOC_RT5514_SPI=m\n# CONFIG_SND_SOC_RT5616 is not set\n# CONFIG_SND_SOC_RT5631 is not set\n# CONFIG_SND_SOC_RT5640 is not set\nCONFIG_SND_SOC_RT5645=m\n# CONFIG_SND_SOC_RT5659 is not set\n# CONFIG_SND_SOC_RT9120 is not set\n# CONFIG_SND_SOC_SGTL5000 is not set\nCONFIG_SND_SOC_SIMPLE_AMPLIFIER=m\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\nCONFIG_SND_SOC_SPDIF=y\n# CONFIG_SND_SOC_SRC4XXX_I2C is not set\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS2780 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805M is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320ADC3XXX is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\nCONFIG_SND_SOC_TS3A227E=m\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731_I2C is not set\n# CONFIG_SND_SOC_WM8731_SPI is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8940 is not set\n# CONFIG_SND_SOC_WM8960 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_ZL38060 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8821 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\n# end of CODEC drivers\n\nCONFIG_SND_SIMPLE_CARD_UTILS=y\nCONFIG_SND_SIMPLE_CARD=y\nCONFIG_SND_AUDIO_GRAPH_CARD=y\n# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set\n# CONFIG_SND_TEST_COMPONENT is not set\n# CONFIG_SND_VIRTIO is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\n# CONFIG_HID_APPLEIR is not set\nCONFIG_HID_ASUS=y\nCONFIG_HID_AUREAL=y\nCONFIG_HID_BELKIN=y\n# CONFIG_HID_BETOP_FF is not set\nCONFIG_HID_BIGBEN_FF=m\nCONFIG_HID_CHERRY=y\nCONFIG_HID_CHICONY=y\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\nCONFIG_HID_CYPRESS=y\nCONFIG_HID_DRAGONRISE=m\nCONFIG_DRAGONRISE_FF=y\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\nCONFIG_HID_EZKEY=y\n# CONFIG_HID_FT260 is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_GLORIOUS is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\nCONFIG_HID_KYE=y\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_VRC2 is not set\n# CONFIG_HID_XIAOMI is not set\nCONFIG_HID_GYRATION=y\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_ITE is not set\n# CONFIG_HID_JABRA is not set\nCONFIG_HID_TWINHAN=y\nCONFIG_HID_KENSINGTON=y\nCONFIG_HID_LCPOWER=y\n# CONFIG_HID_LED is not set\nCONFIG_HID_LENOVO=y\n# CONFIG_HID_LETSKETCH is not set\nCONFIG_HID_LOGITECH=y\nCONFIG_HID_LOGITECH_DJ=y\nCONFIG_HID_LOGITECH_HIDPP=y\nCONFIG_LOGITECH_FF=y\nCONFIG_LOGIRUMBLEPAD2_FF=y\nCONFIG_LOGIG940_FF=y\nCONFIG_LOGIWHEELS_FF=y\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_MEGAWORLD_FF is not set\n# CONFIG_HID_REDRAGON is not set\nCONFIG_HID_MICROSOFT=y\nCONFIG_HID_MONTEREY=y\nCONFIG_HID_MULTITOUCH=m\nCONFIG_HID_NINTENDO=m\nCONFIG_NINTENDO_FF=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\nCONFIG_HID_ORTEK=y\nCONFIG_HID_OUYA=y\nCONFIG_HID_PANTHERLORD=y\nCONFIG_PANTHERLORD_FF=y\nCONFIG_HID_PENMOUNT=y\nCONFIG_HID_PETALYNX=y\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PXRC is not set\n# CONFIG_HID_RAZER is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\nCONFIG_HID_SAMSUNG=y\n# CONFIG_HID_SEMITEK is not set\n# CONFIG_HID_SIGMAMICRO is not set\nCONFIG_HID_SONY=y\nCONFIG_SONY_FF=y\n# CONFIG_HID_SPEEDLINK is not set\nCONFIG_HID_STEAM=m\n# CONFIG_HID_STEELSERIES is not set\nCONFIG_HID_SUNPLUS=y\n# CONFIG_HID_RMI is not set\n# CONFIG_HID_GREENASIA is not set\nCONFIG_HID_SMARTJOYPLUS=m\nCONFIG_SMARTJOYPLUS_FF=y\nCONFIG_HID_TIVO=y\nCONFIG_HID_TOPSEED=y\n# CONFIG_HID_TOPRE is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\nCONFIG_HID_WIIMOTE=m\nCONFIG_HID_XINMO=y\n# CONFIG_HID_ZEROPLUS is not set\nCONFIG_HID_ZYDACRON=y\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n# end of USB HID support\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID_OF is not set\n# CONFIG_I2C_HID_OF_ELAN is not set\n# CONFIG_I2C_HID_OF_GOODIX is not set\n# end of I2C HID support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\nCONFIG_USB_ULPI_BUS=y\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_PCI=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\nCONFIG_USB_OTG=y\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set\n# CONFIG_USB_OTG_FSM is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\n# CONFIG_USB_MON is not set\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\n# CONFIG_USB_XHCI_DBGCAP is not set\nCONFIG_USB_XHCI_PCI=y\n# CONFIG_USB_XHCI_PCI_RENESAS is not set\nCONFIG_USB_XHCI_PLATFORM=y\nCONFIG_USB_EHCI_HCD=y\nCONFIG_USB_EHCI_ROOT_HUB_TT=y\nCONFIG_USB_EHCI_TT_NEWSCHED=y\nCONFIG_USB_EHCI_PCI=y\n# CONFIG_USB_EHCI_FSL is not set\nCONFIG_USB_EHCI_HCD_PLATFORM=y\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\nCONFIG_USB_OHCI_HCD=y\nCONFIG_USB_OHCI_HCD_PCI=y\nCONFIG_USB_OHCI_HCD_PLATFORM=y\n# CONFIG_USB_UHCI_HCD is not set\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_BCMA is not set\n# CONFIG_USB_HCD_SSB is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=y\n# CONFIG_USB_PRINTER is not set\n# CONFIG_USB_WDM is not set\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\nCONFIG_USB_UAS=y\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\nCONFIG_USB_MUSB_HDRC=y\n# CONFIG_USB_MUSB_HOST is not set\n# CONFIG_USB_MUSB_GADGET is not set\nCONFIG_USB_MUSB_DUAL_ROLE=y\n\n#\n# Platform Glue Layer\n#\n\n#\n# MUSB DMA mode\n#\n# CONFIG_MUSB_PIO_ONLY is not set\nCONFIG_USB_DWC3=y\n# CONFIG_USB_DWC3_ULPI is not set\n# CONFIG_USB_DWC3_HOST is not set\n# CONFIG_USB_DWC3_GADGET is not set\nCONFIG_USB_DWC3_DUAL_ROLE=y\n\n#\n# Platform Glue Driver Support\n#\nCONFIG_USB_DWC3_HAPS=y\nCONFIG_USB_DWC3_OF_SIMPLE=y\nCONFIG_USB_DWC2=y\n# CONFIG_USB_DWC2_HOST is not set\n\n#\n# Gadget/Dual-role mode requires USB Gadget support to be enabled\n#\n# CONFIG_USB_DWC2_PERIPHERAL is not set\nCONFIG_USB_DWC2_DUAL_ROLE=y\n# CONFIG_USB_DWC2_PCI is not set\n# CONFIG_USB_DWC2_DEBUG is not set\n# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set\nCONFIG_USB_CHIPIDEA=y\nCONFIG_USB_CHIPIDEA_UDC=y\nCONFIG_USB_CHIPIDEA_HOST=y\nCONFIG_USB_CHIPIDEA_PCI=y\nCONFIG_USB_CHIPIDEA_MSM=y\nCONFIG_USB_CHIPIDEA_IMX=y\nCONFIG_USB_CHIPIDEA_GENERIC=y\nCONFIG_USB_CHIPIDEA_TEGRA=y\nCONFIG_USB_ISP1760=y\nCONFIG_USB_ISP1760_HCD=y\nCONFIG_USB_ISP1761_UDC=y\n# CONFIG_USB_ISP1760_HOST_ROLE is not set\n# CONFIG_USB_ISP1760_GADGET_ROLE is not set\nCONFIG_USB_ISP1760_DUAL_ROLE=y\n\n#\n# USB port drivers\n#\n# CONFIG_USB_SERIAL is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\n# CONFIG_USB_EZUSB_FX2 is not set\n# CONFIG_USB_HUB_USB251XB is not set\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n# CONFIG_USB_ONBOARD_HUB is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\nCONFIG_NOP_USB_XCEIV=y\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\nCONFIG_USB_ULPI=y\nCONFIG_USB_ULPI_VIEWPORT=y\n# end of USB Physical Layer drivers\n\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\n# CONFIG_USB_GADGET_DEBUG_FILES is not set\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=2\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\n# CONFIG_USB_SNP_UDC_PLAT is not set\n# CONFIG_USB_M66592 is not set\n# CONFIG_USB_BDC_UDC is not set\n# CONFIG_USB_AMD5536UDC is not set\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_NET2280 is not set\n# CONFIG_USB_GOKU is not set\n# CONFIG_USB_EG20T is not set\n# CONFIG_USB_GADGET_XILINX is not set\n# CONFIG_USB_MAX3420_UDC is not set\n# CONFIG_USB_DUMMY_HCD is not set\n# end of USB Peripheral Controller\n\n# CONFIG_USB_CONFIGFS is not set\n\n#\n# USB Gadget precomposed configurations\n#\n# CONFIG_USB_ZERO is not set\n# CONFIG_USB_AUDIO is not set\n# CONFIG_USB_ETH is not set\n# CONFIG_USB_G_NCM is not set\n# CONFIG_USB_GADGETFS is not set\n# CONFIG_USB_FUNCTIONFS is not set\n# CONFIG_USB_MASS_STORAGE is not set\n# CONFIG_USB_G_SERIAL is not set\n# CONFIG_USB_MIDI_GADGET is not set\n# CONFIG_USB_G_PRINTER is not set\n# CONFIG_USB_CDC_COMPOSITE is not set\n# CONFIG_USB_G_ACM_MS is not set\n# CONFIG_USB_G_MULTI is not set\n# CONFIG_USB_G_HID is not set\n# CONFIG_USB_G_DBGP is not set\n# CONFIG_USB_G_WEBCAM is not set\n# CONFIG_USB_RAW_GADGET is not set\n# end of USB Gadget precomposed configurations\n\nCONFIG_TYPEC=y\nCONFIG_TYPEC_TCPM=m\n# CONFIG_TYPEC_TCPCI is not set\nCONFIG_TYPEC_FUSB302=m\n# CONFIG_TYPEC_UCSI is not set\n# CONFIG_TYPEC_TPS6598X is not set\n# CONFIG_TYPEC_ANX7411 is not set\n# CONFIG_TYPEC_RT1719 is not set\n# CONFIG_TYPEC_HD3SS3220 is not set\n# CONFIG_TYPEC_STUSB160X is not set\n# CONFIG_TYPEC_WUSB3801 is not set\n\n#\n# USB Type-C Multiplexer/DeMultiplexer Switch support\n#\n# CONFIG_TYPEC_MUX_FSA4480 is not set\n# CONFIG_TYPEC_MUX_PI3USB30532 is not set\n# end of USB Type-C Multiplexer/DeMultiplexer Switch support\n\n#\n# USB Type-C Alternate Mode drivers\n#\nCONFIG_TYPEC_DP_ALTMODE=y\n# CONFIG_TYPEC_NVIDIA_ALTMODE is not set\n# end of USB Type-C Alternate Mode drivers\n\nCONFIG_USB_ROLE_SWITCH=y\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\n# CONFIG_PWRSEQ_SD8787 is not set\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_DEBUG is not set\nCONFIG_MMC_ARMMMCI=y\nCONFIG_MMC_STM32_SDMMC=y\nCONFIG_MMC_SDHCI=y\n# CONFIG_MMC_SDHCI_PCI is not set\nCONFIG_MMC_SDHCI_PLTFM=y\nCONFIG_MMC_SDHCI_OF_ARASAN=y\n# CONFIG_MMC_SDHCI_OF_AT91 is not set\n# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set\n# CONFIG_MMC_SDHCI_CADENCE is not set\n# CONFIG_MMC_SDHCI_F_SDH30 is not set\n# CONFIG_MMC_SDHCI_MILBEAUT is not set\n# CONFIG_MMC_TIFM_SD is not set\nCONFIG_MMC_SPI=y\n# CONFIG_MMC_CB710 is not set\n# CONFIG_MMC_VIA_SDMMC is not set\nCONFIG_MMC_DW=y\nCONFIG_MMC_DW_PLTFM=y\n# CONFIG_MMC_DW_BLUEFIELD is not set\n# CONFIG_MMC_DW_EXYNOS is not set\n# CONFIG_MMC_DW_HI3798CV200 is not set\nCONFIG_MMC_DW_K3=y\n# CONFIG_MMC_DW_PCI is not set\nCONFIG_MMC_DW_ROCKCHIP=y\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_CQHCI=y\n# CONFIG_MMC_HSQ is not set\n# CONFIG_MMC_TOSHIBA_PCI is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MMC_SDHCI_XENON is not set\n# CONFIG_MMC_SDHCI_OMAP is not set\n# CONFIG_MMC_SDHCI_AM654 is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\nCONFIG_LEDS_CLASS_FLASH=m\n# CONFIG_LEDS_CLASS_MULTICOLOR is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AN30259A is not set\n# CONFIG_LEDS_AW2013 is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_EL15203000 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_LP55XX_COMMON is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\nCONFIG_LEDS_PWM=y\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\nCONFIG_LEDS_SYSCON=y\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_SPI_BYTE is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\n# CONFIG_LEDS_AAT1290 is not set\n# CONFIG_LEDS_AS3645A is not set\n# CONFIG_LEDS_KTD2692 is not set\n# CONFIG_LEDS_LM3601X is not set\n# CONFIG_LEDS_RT4505 is not set\n# CONFIG_LEDS_RT8515 is not set\n# CONFIG_LEDS_SGM3140 is not set\n\n#\n# RGB LED drivers\n#\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\nCONFIG_LEDS_TRIGGER_TIMER=y\nCONFIG_LEDS_TRIGGER_ONESHOT=y\n# CONFIG_LEDS_TRIGGER_DISK is not set\n# CONFIG_LEDS_TRIGGER_MTD is not set\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\n# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set\nCONFIG_LEDS_TRIGGER_CPU=y\nCONFIG_LEDS_TRIGGER_ACTIVITY=y\nCONFIG_LEDS_TRIGGER_GPIO=y\nCONFIG_LEDS_TRIGGER_DEFAULT_ON=y\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\n# CONFIG_LEDS_TRIGGER_TRANSIENT is not set\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\nCONFIG_LEDS_TRIGGER_PANIC=y\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\n# CONFIG_LEDS_TRIGGER_AUDIO is not set\n# CONFIG_LEDS_TRIGGER_TTY is not set\n\n#\n# Simple LED drivers\n#\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_SUPPORT=y\nCONFIG_EDAC=y\nCONFIG_EDAC_LEGACY_SYSFS=y\n# CONFIG_EDAC_DEBUG is not set\n# CONFIG_EDAC_THUNDERX is not set\n# CONFIG_EDAC_XGENE is not set\n# CONFIG_EDAC_DMC520 is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_HYM8563 is not set\n# CONFIG_RTC_DRV_MAX6900 is not set\nCONFIG_RTC_DRV_MAX77686=y\n# CONFIG_RTC_DRV_NCT3018Y is not set\nCONFIG_RTC_DRV_RK808=y\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\n# CONFIG_RTC_DRV_PCF8563 is not set\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\nCONFIG_RTC_DRV_S5M=y\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\nCONFIG_RTC_DRV_DS3232=y\nCONFIG_RTC_DRV_DS3232_HWMON=y\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_OPTEE is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\nCONFIG_RTC_DRV_PL031=y\n# CONFIG_RTC_DRV_CADENCE is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_OF=y\n# CONFIG_ALTERA_MSGDMA is not set\n# CONFIG_AMBA_PL08X is not set\n# CONFIG_BCM_SBA_RAID is not set\n# CONFIG_DW_AXI_DMAC is not set\n# CONFIG_FSL_EDMA is not set\n# CONFIG_FSL_QDMA is not set\n# CONFIG_INTEL_IDMA64 is not set\n# CONFIG_MV_XOR_V2 is not set\nCONFIG_PL330_DMA=y\n# CONFIG_PLX_DMA is not set\n# CONFIG_XILINX_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DPDMA is not set\n# CONFIG_QCOM_HIDMA_MGMT is not set\n# CONFIG_QCOM_HIDMA is not set\n# CONFIG_DW_DMAC is not set\n# CONFIG_DW_DMAC_PCI is not set\n# CONFIG_DW_EDMA is not set\n# CONFIG_DW_EDMA_PCIE is not set\n# CONFIG_SF_PDMA is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\n# CONFIG_UDMABUF is not set\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\nCONFIG_DMABUF_HEAPS=y\n# CONFIG_DMABUF_SYSFS_STATS is not set\nCONFIG_DMABUF_HEAPS_SYSTEM=y\nCONFIG_DMABUF_HEAPS_CMA=y\n# end of DMABUF options\n\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\nCONFIG_VFIO=y\nCONFIG_VFIO_IOMMU_TYPE1=y\n# CONFIG_VFIO_NOIOMMU is not set\nCONFIG_VFIO_PCI_MMAP=y\nCONFIG_VFIO_PCI_INTX=y\n# CONFIG_VFIO_PCI is not set\n# CONFIG_VFIO_PLATFORM is not set\n# CONFIG_VFIO_MDEV is not set\n# CONFIG_VIRT_DRIVERS is not set\nCONFIG_VIRTIO_ANCHOR=y\nCONFIG_VIRTIO=y\nCONFIG_VIRTIO_MENU=y\n# CONFIG_VIRTIO_PCI is not set\nCONFIG_VIRTIO_BALLOON=y\n# CONFIG_VIRTIO_INPUT is not set\nCONFIG_VIRTIO_MMIO=y\n# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set\n# CONFIG_VDPA is not set\nCONFIG_VHOST_MENU=y\n# CONFIG_VHOST_NET is not set\n# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# end of Microsoft Hyper-V guest support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_RTL8192U is not set\n# CONFIG_RTLLIB is not set\nCONFIG_RTL8723BS=m\n# CONFIG_R8712U is not set\nCONFIG_R8188EU=m\n# CONFIG_RTS5208 is not set\n# CONFIG_VT6655 is not set\n# CONFIG_VT6656 is not set\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16240 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7816 is not set\n# end of Analog to digital converters\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n# end of Analog digital bi-direction converters\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n# end of Direct Digital Synthesis\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n# end of Network Analyzer, Impedance Converters\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7854 is not set\n# end of Active energy metering IC\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S1210 is not set\n# end of Resolver to digital converters\n# end of IIO staging drivers\n\n# CONFIG_FB_SM750 is not set\nCONFIG_STAGING_MEDIA=y\n# CONFIG_VIDEO_MAX96712 is not set\nCONFIG_VIDEO_ROCKCHIP_VDEC=m\nCONFIG_STAGING_MEDIA_DEPRECATED=y\n# CONFIG_VIDEO_CPIA2 is not set\nCONFIG_VIDEO_SAA7146=m\nCONFIG_VIDEO_SAA7146_VV=m\nCONFIG_DVB_AV7110_IR=y\nCONFIG_DVB_AV7110=m\n# CONFIG_DVB_AV7110_OSD is not set\nCONFIG_DVB_SP8870=m\n# CONFIG_VIDEO_HEXIUM_GEMINI is not set\n# CONFIG_VIDEO_HEXIUM_ORION is not set\n# CONFIG_VIDEO_MXB is not set\n# CONFIG_DVB_BUDGET_CORE is not set\n# CONFIG_VIDEO_STKWEBCAM is not set\nCONFIG_VIDEO_TM6000=m\nCONFIG_VIDEO_TM6000_ALSA=m\nCONFIG_VIDEO_TM6000_DVB=m\n# CONFIG_USB_ZR364XX is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_KS7010 is not set\n# CONFIG_PI433 is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_FIELDBUS_DEV is not set\n# CONFIG_QLGE is not set\n# CONFIG_VME_BUS is not set\n# CONFIG_GOLDFISH is not set\n# CONFIG_CHROME_PLATFORMS is not set\n# CONFIG_MELLANOX_PLATFORM is not set\n# CONFIG_SURFACE_PLATFORMS is not set\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Clock driver for ARM Reference designs\n#\n# CONFIG_CLK_ICST is not set\n# CONFIG_CLK_SP810 is not set\n# end of Clock driver for ARM Reference designs\n\n# CONFIG_LMK04832 is not set\n# CONFIG_COMMON_CLK_MAX77686 is not set\n# CONFIG_COMMON_CLK_MAX9485 is not set\nCONFIG_COMMON_CLK_RK808=y\nCONFIG_COMMON_CLK_SCPI=y\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\nCONFIG_COMMON_CLK_CS2000_CP=y\nCONFIG_COMMON_CLK_S2MPS11=y\n# CONFIG_COMMON_CLK_AXI_CLKGEN is not set\nCONFIG_COMMON_CLK_XGENE=y\nCONFIG_COMMON_CLK_PWM=y\n# CONFIG_COMMON_CLK_RS9_PCIE is not set\n# CONFIG_COMMON_CLK_VC5 is not set\n# CONFIG_COMMON_CLK_VC7 is not set\n# CONFIG_COMMON_CLK_FIXED_MMIO is not set\nCONFIG_COMMON_CLK_ROCKCHIP=y\n# CONFIG_CLK_PX30 is not set\n# CONFIG_CLK_RK3308 is not set\n# CONFIG_CLK_RK3328 is not set\n# CONFIG_CLK_RK3368 is not set\nCONFIG_CLK_RK3399=y\n# CONFIG_CLK_RK3568 is not set\n# CONFIG_XILINX_VCU is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\nCONFIG_HWSPINLOCK=y\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\nCONFIG_CLKSRC_MMIO=y\nCONFIG_ROCKCHIP_TIMER=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\n# CONFIG_FSL_ERRATUM_A008585 is not set\n# CONFIG_HISILICON_ERRATUM_161010101 is not set\n# CONFIG_ARM64_ERRATUM_858921 is not set\n# CONFIG_MICROCHIP_PIT64B is not set\n# end of Clock Source drivers\n\nCONFIG_MAILBOX=y\nCONFIG_ARM_MHU=y\nCONFIG_ARM_MHU_V2=m\nCONFIG_PLATFORM_MHU=y\n# CONFIG_PL320_MBOX is not set\n# CONFIG_ROCKCHIP_MBOX is not set\n# CONFIG_ALTERA_MBOX is not set\n# CONFIG_MAILBOX_TEST is not set\nCONFIG_IOMMU_IOVA=y\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\nCONFIG_IOMMU_IO_PGTABLE=y\nCONFIG_IOMMU_IO_PGTABLE_LPAE=y\n# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set\n# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set\n# CONFIG_IOMMU_IO_PGTABLE_DART is not set\n# end of Generic IOMMU Pagetable Support\n\n# CONFIG_IOMMU_DEBUGFS is not set\nCONFIG_IOMMU_DEFAULT_DMA_STRICT=y\n# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set\n# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set\nCONFIG_OF_IOMMU=y\nCONFIG_IOMMU_DMA=y\nCONFIG_ROCKCHIP_IOMMU=y\nCONFIG_ARM_SMMU=y\n# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set\nCONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y\nCONFIG_ARM_SMMU_V3=y\n# CONFIG_ARM_SMMU_V3_SVA is not set\n# CONFIG_VIRTIO_IOMMU is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\n# CONFIG_RPMSG_QCOM_GLINK_RPM is not set\n# CONFIG_RPMSG_VIRTIO is not set\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\n# CONFIG_SOC_BRCMSTB is not set\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# CONFIG_QUICC_ENGINE is not set\n# CONFIG_FSL_RCPM is not set\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# fujitsu SoC drivers\n#\n# end of fujitsu SoC drivers\n\n#\n# i.MX SoC drivers\n#\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# CONFIG_LITEX_SOC_CONTROLLER is not set\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# end of Qualcomm SoC drivers\n\nCONFIG_ROCKCHIP_GRF=y\nCONFIG_ROCKCHIP_IODOMAIN=y\nCONFIG_ROCKCHIP_PM_DOMAINS=y\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y\nCONFIG_DEVFREQ_GOV_PERFORMANCE=y\nCONFIG_DEVFREQ_GOV_POWERSAVE=y\nCONFIG_DEVFREQ_GOV_USERSPACE=y\nCONFIG_DEVFREQ_GOV_PASSIVE=y\n\n#\n# DEVFREQ Drivers\n#\nCONFIG_ARM_RK3399_DMC_DEVFREQ=m\nCONFIG_PM_DEVFREQ_EVENT=y\nCONFIG_DEVFREQ_EVENT_ROCKCHIP_DFI=y\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_FSA9480 is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_PTN5150 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\nCONFIG_EXTCON_USB_GPIO=y\n# CONFIG_EXTCON_USBC_TUSB320 is not set\n# CONFIG_MEMORY is not set\nCONFIG_IIO=y\nCONFIG_IIO_BUFFER=y\n# CONFIG_IIO_BUFFER_CB is not set\n# CONFIG_IIO_BUFFER_DMA is not set\n# CONFIG_IIO_BUFFER_DMAENGINE is not set\n# CONFIG_IIO_BUFFER_HW_CONSUMER is not set\nCONFIG_IIO_KFIFO_BUF=y\nCONFIG_IIO_TRIGGERED_BUFFER=y\n# CONFIG_IIO_CONFIGFS is not set\nCONFIG_IIO_TRIGGER=y\nCONFIG_IIO_CONSUMERS_PER_TRIGGER=2\n# CONFIG_IIO_SW_DEVICE is not set\n# CONFIG_IIO_SW_TRIGGER is not set\n# CONFIG_IIO_TRIGGERED_EVENT is not set\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADXL313_I2C is not set\n# CONFIG_ADXL313_SPI is not set\n# CONFIG_ADXL345_I2C is not set\n# CONFIG_ADXL345_SPI is not set\n# CONFIG_ADXL355_I2C is not set\n# CONFIG_ADXL355_SPI is not set\n# CONFIG_ADXL367_SPI is not set\n# CONFIG_ADXL367_I2C is not set\n# CONFIG_ADXL372_SPI is not set\n# CONFIG_ADXL372_I2C is not set\n# CONFIG_BMA180 is not set\n# CONFIG_BMA220 is not set\n# CONFIG_BMA400 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_BMI088_ACCEL is not set\n# CONFIG_DA280 is not set\n# CONFIG_DA311 is not set\n# CONFIG_DMARD06 is not set\n# CONFIG_DMARD09 is not set\n# CONFIG_DMARD10 is not set\n# CONFIG_FXLS8962AF_I2C is not set\n# CONFIG_FXLS8962AF_SPI is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MC3230 is not set\n# CONFIG_MMA7455_I2C is not set\n# CONFIG_MMA7455_SPI is not set\n# CONFIG_MMA7660 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MSA311 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_MXC6255 is not set\n# CONFIG_SCA3000 is not set\n# CONFIG_SCA3300 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7091R5 is not set\n# CONFIG_AD7124 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7266 is not set\n# CONFIG_AD7280 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7292 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7606_IFACE_PARALLEL is not set\n# CONFIG_AD7606_IFACE_SPI is not set\n# CONFIG_AD7766 is not set\n# CONFIG_AD7768_1 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD7949 is not set\n# CONFIG_AD799X is not set\n# CONFIG_ADI_AXI_ADC is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_ENVELOPE_DETECTOR is not set\n# CONFIG_HI8435 is not set\n# CONFIG_HX711 is not set\n# CONFIG_INA2XX_ADC is not set\n# CONFIG_LTC2471 is not set\n# CONFIG_LTC2485 is not set\n# CONFIG_LTC2496 is not set\n# CONFIG_LTC2497 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX11100 is not set\n# CONFIG_MAX1118 is not set\n# CONFIG_MAX11205 is not set\n# CONFIG_MAX1241 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MAX9611 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_MCP3911 is not set\n# CONFIG_NAU7802 is not set\n# CONFIG_QCOM_SPMI_IADC is not set\n# CONFIG_QCOM_SPMI_VADC is not set\n# CONFIG_QCOM_SPMI_ADC5 is not set\nCONFIG_ROCKCHIP_SARADC=y\n# CONFIG_RICHTEK_RTQ6056 is not set\n# CONFIG_SD_ADC_MODULATOR is not set\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC0832 is not set\n# CONFIG_TI_ADC084S021 is not set\n# CONFIG_TI_ADC12138 is not set\n# CONFIG_TI_ADC108S102 is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_TI_ADC161S626 is not set\n# CONFIG_TI_ADS1015 is not set\n# CONFIG_TI_ADS7950 is not set\n# CONFIG_TI_ADS8344 is not set\n# CONFIG_TI_ADS8688 is not set\n# CONFIG_TI_ADS124S08 is not set\n# CONFIG_TI_ADS131E08 is not set\n# CONFIG_TI_TLC4541 is not set\n# CONFIG_TI_TSC2046 is not set\n# CONFIG_VF610_ADC is not set\n# CONFIG_XILINX_XADC is not set\n# end of Analog to digital converters\n\n#\n# Analog to digital and digital to analog converters\n#\n# CONFIG_AD74413R is not set\n# end of Analog to digital and digital to analog converters\n\n#\n# Analog Front Ends\n#\n# CONFIG_IIO_RESCALE is not set\n# end of Analog Front Ends\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n# CONFIG_ADA4250 is not set\n# CONFIG_HMC425 is not set\n# end of Amplifiers\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7746 is not set\n# end of Capacitance to digital converters\n\n#\n# Chemical Sensors\n#\n# CONFIG_ATLAS_PH_SENSOR is not set\n# CONFIG_ATLAS_EZO_SENSOR is not set\n# CONFIG_BME680 is not set\n# CONFIG_CCS811 is not set\n# CONFIG_IAQCORE is not set\n# CONFIG_PMS7003 is not set\n# CONFIG_SCD30_CORE is not set\n# CONFIG_SCD4X is not set\n# CONFIG_SENSIRION_SGP30 is not set\n# CONFIG_SENSIRION_SGP40 is not set\n# CONFIG_SPS30_I2C is not set\n# CONFIG_SPS30_SERIAL is not set\n# CONFIG_SENSEAIR_SUNRISE_CO2 is not set\n# CONFIG_VZ89X is not set\n# end of Chemical Sensors\n\n#\n# Hid Sensor IIO Common\n#\n# end of Hid Sensor IIO Common\n\n#\n# IIO SCMI Sensors\n#\n# end of IIO SCMI Sensors\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n# end of SSP Sensor Common\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD3552R is not set\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5592R is not set\n# CONFIG_AD5593R is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_LTC2688 is not set\n# CONFIG_AD5686_SPI is not set\n# CONFIG_AD5696_I2C is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5758 is not set\n# CONFIG_AD5761 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5766 is not set\n# CONFIG_AD5770R is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7293 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_AD8801 is not set\n# CONFIG_DPOT_DAC is not set\n# CONFIG_DS4424 is not set\n# CONFIG_LTC1660 is not set\n# CONFIG_LTC2632 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n# CONFIG_TI_DAC082S085 is not set\n# CONFIG_TI_DAC5571 is not set\n# CONFIG_TI_DAC7311 is not set\n# CONFIG_TI_DAC7612 is not set\n# CONFIG_VF610_DAC is not set\n# end of Digital to analog converters\n\n#\n# IIO dummy driver\n#\n# end of IIO dummy driver\n\n#\n# Filters\n#\n# CONFIG_ADMV8818 is not set\n# end of Filters\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n# end of Clock Generator/Distribution\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n# CONFIG_ADF4371 is not set\n# CONFIG_ADMV1013 is not set\n# CONFIG_ADMV1014 is not set\n# CONFIG_ADMV4420 is not set\n# CONFIG_ADRF6780 is not set\n# end of Phase-Locked Loop (PLL) frequency synthesizers\n# end of Frequency Synthesizers DDS/PLL\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS290 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_FXAS21002C is not set\n# CONFIG_MPU3050_I2C is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n# end of Digital gyroscope sensors\n\n#\n# Health Sensors\n#\n\n#\n# Heart Rate Monitors\n#\n# CONFIG_AFE4403 is not set\n# CONFIG_AFE4404 is not set\n# CONFIG_MAX30100 is not set\n# CONFIG_MAX30102 is not set\n# end of Heart Rate Monitors\n# end of Health Sensors\n\n#\n# Humidity sensors\n#\n# CONFIG_AM2315 is not set\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HDC2010 is not set\n# CONFIG_HTS221 is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n# end of Humidity sensors\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16460 is not set\n# CONFIG_ADIS16475 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_BMI160_I2C is not set\n# CONFIG_BMI160_SPI is not set\n# CONFIG_BOSCH_BNO055_SERIAL is not set\n# CONFIG_BOSCH_BNO055_I2C is not set\n# CONFIG_FXOS8700_I2C is not set\n# CONFIG_FXOS8700_SPI is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_ICM42600_I2C is not set\n# CONFIG_INV_ICM42600_SPI is not set\n# CONFIG_INV_MPU6050_I2C is not set\n# CONFIG_INV_MPU6050_SPI is not set\n# CONFIG_IIO_ST_LSM6DSX is not set\n# CONFIG_IIO_ST_LSM9DS0 is not set\n# end of Inertial measurement units\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_ADUX1020 is not set\n# CONFIG_AL3010 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_AS73211 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_BH1780 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM3605 is not set\n# CONFIG_CM36651 is not set\n# CONFIG_GP2AP002 is not set\n# CONFIG_GP2AP020A00F is not set\n# CONFIG_SENSORS_ISL29018 is not set\n# CONFIG_SENSORS_ISL29028 is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_LTRF216A is not set\n# CONFIG_LV0104CS is not set\n# CONFIG_MAX44000 is not set\n# CONFIG_MAX44009 is not set\n# CONFIG_NOA1305 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_SI1133 is not set\n# CONFIG_SI1145 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_ST_UVIS25 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\n# CONFIG_SENSORS_TSL2563 is not set\n# CONFIG_TSL2583 is not set\n# CONFIG_TSL2591 is not set\n# CONFIG_TSL2772 is not set\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VCNL4035 is not set\n# CONFIG_VEML6030 is not set\n# CONFIG_VEML6070 is not set\n# CONFIG_VL6180 is not set\n# CONFIG_ZOPT2201 is not set\n# end of Light sensors\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8974 is not set\n# CONFIG_AK8975 is not set\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN_I2C is not set\n# CONFIG_BMC150_MAGN_SPI is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n# CONFIG_SENSORS_RM3100_I2C is not set\n# CONFIG_SENSORS_RM3100_SPI is not set\n# CONFIG_YAMAHA_YAS530 is not set\n# end of Magnetometer sensors\n\n#\n# Multiplexers\n#\n# CONFIG_IIO_MUX is not set\n# end of Multiplexers\n\n#\n# Inclinometer sensors\n#\n# end of Inclinometer sensors\n\n#\n# Triggers - standalone\n#\n# CONFIG_IIO_INTERRUPT_TRIGGER is not set\n# CONFIG_IIO_SYSFS_TRIGGER is not set\n# end of Triggers - standalone\n\n#\n# Linear and angular position sensors\n#\n# end of Linear and angular position sensors\n\n#\n# Digital potentiometers\n#\n# CONFIG_AD5110 is not set\n# CONFIG_AD5272 is not set\n# CONFIG_DS1803 is not set\n# CONFIG_MAX5432 is not set\n# CONFIG_MAX5481 is not set\n# CONFIG_MAX5487 is not set\n# CONFIG_MCP4018 is not set\n# CONFIG_MCP4131 is not set\n# CONFIG_MCP4531 is not set\n# CONFIG_MCP41010 is not set\n# CONFIG_TPL0102 is not set\n# end of Digital potentiometers\n\n#\n# Digital potentiostats\n#\n# CONFIG_LMP91000 is not set\n# end of Digital potentiostats\n\n#\n# Pressure sensors\n#\n# CONFIG_ABP060MG is not set\n# CONFIG_BMP280 is not set\n# CONFIG_DLHL60D is not set\n# CONFIG_DPS310 is not set\n# CONFIG_HP03 is not set\n# CONFIG_ICP10100 is not set\n# CONFIG_MPL115_I2C is not set\n# CONFIG_MPL115_SPI is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n# CONFIG_HP206C is not set\n# CONFIG_ZPA2326 is not set\n# end of Pressure sensors\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n# end of Lightning sensors\n\n#\n# Proximity and distance sensors\n#\n# CONFIG_ISL29501 is not set\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_MB1232 is not set\n# CONFIG_PING is not set\n# CONFIG_RFD77402 is not set\n# CONFIG_SRF04 is not set\n# CONFIG_SX9310 is not set\n# CONFIG_SX9324 is not set\n# CONFIG_SX9360 is not set\n# CONFIG_SX9500 is not set\n# CONFIG_SRF08 is not set\n# CONFIG_VCNL3020 is not set\n# CONFIG_VL53L0X_I2C is not set\n# end of Proximity and distance sensors\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1200 is not set\n# end of Resolver to digital converters\n\n#\n# Temperature sensors\n#\n# CONFIG_LTC2983 is not set\n# CONFIG_MAXIM_THERMOCOUPLE is not set\n# CONFIG_MLX90614 is not set\n# CONFIG_MLX90632 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TMP007 is not set\n# CONFIG_TMP117 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\n# CONFIG_MAX31856 is not set\n# CONFIG_MAX31865 is not set\n# end of Temperature sensors\n\n# CONFIG_NTB is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_DEBUG is not set\n# CONFIG_PWM_ATMEL_TCB is not set\n# CONFIG_PWM_CLK is not set\n# CONFIG_PWM_DWC is not set\n# CONFIG_PWM_FSL_FTM is not set\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_PWM_ROCKCHIP=y\n# CONFIG_PWM_XILINX is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\nCONFIG_ARM_GIC_V2M=y\nCONFIG_ARM_GIC_V3=y\nCONFIG_ARM_GIC_V3_ITS=y\nCONFIG_ARM_GIC_V3_ITS_PCI=y\n# CONFIG_AL_FIC is not set\n# CONFIG_XILINX_INTC is not set\nCONFIG_PARTITION_PERCPU=y\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\nCONFIG_ARCH_HAS_RESET_CONTROLLER=y\nCONFIG_RESET_CONTROLLER=y\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_RESET_TI_TPS380X is not set\n\n#\n# PHY Subsystem\n#\nCONFIG_GENERIC_PHY=y\nCONFIG_GENERIC_PHY_MIPI_DPHY=y\n# CONFIG_PHY_XGENE is not set\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\n\n#\n# PHY drivers for Broadcom platforms\n#\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# end of PHY drivers for Broadcom platforms\n\n# CONFIG_PHY_CADENCE_TORRENT is not set\n# CONFIG_PHY_CADENCE_DPHY is not set\n# CONFIG_PHY_CADENCE_DPHY_RX is not set\n# CONFIG_PHY_CADENCE_SIERRA is not set\n# CONFIG_PHY_CADENCE_SALVO is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_LAN966X_SERDES is not set\n# CONFIG_PHY_CPCAP_USB is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\n# CONFIG_PHY_OCELOT_SERDES is not set\n# CONFIG_PHY_QCOM_USB_HS is not set\n# CONFIG_PHY_QCOM_USB_HSIC is not set\nCONFIG_PHY_ROCKCHIP_DP=y\n# CONFIG_PHY_ROCKCHIP_DPHY_RX0 is not set\nCONFIG_PHY_ROCKCHIP_EMMC=y\n# CONFIG_PHY_ROCKCHIP_INNO_HDMI is not set\nCONFIG_PHY_ROCKCHIP_INNO_USB2=y\n# CONFIG_PHY_ROCKCHIP_INNO_CSIDPHY is not set\n# CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY is not set\n# CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY is not set\nCONFIG_PHY_ROCKCHIP_PCIE=y\n# CONFIG_PHY_ROCKCHIP_SNPS_PCIE3 is not set\nCONFIG_PHY_ROCKCHIP_TYPEC=y\nCONFIG_PHY_ROCKCHIP_USB=y\n# CONFIG_PHY_SAMSUNG_USB2 is not set\n# CONFIG_PHY_TUSB1210 is not set\n# end of PHY Subsystem\n\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\n# CONFIG_ARM_CMN is not set\nCONFIG_ARM_PMU=y\n# CONFIG_ARM_DSU_PMU is not set\n# CONFIG_ARM_SPE_PMU is not set\n# CONFIG_HISI_PCIE_PMU is not set\n# CONFIG_HNS3_PMU is not set\n# end of Performance monitor support\n\nCONFIG_RAS=y\n# CONFIG_USB4 is not set\n\n#\n# Android\n#\n# CONFIG_ANDROID_BINDER_IPC is not set\n# end of Android\n\n# CONFIG_LIBNVDIMM is not set\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\nCONFIG_NVMEM_RMEM=m\nCONFIG_NVMEM_ROCKCHIP_EFUSE=y\nCONFIG_NVMEM_ROCKCHIP_OTP=m\n# CONFIG_NVMEM_SPMI_SDAM is not set\nCONFIG_NVMEM_U_BOOT_ENV=m\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# CONFIG_HISI_PTT is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\nCONFIG_TEE=y\nCONFIG_OPTEE=m\nCONFIG_MULTIPLEXER=y\n\n#\n# Multiplexer drivers\n#\n# CONFIG_MUX_ADG792A is not set\n# CONFIG_MUX_ADGS1408 is not set\n# CONFIG_MUX_GPIO is not set\n# CONFIG_MUX_MMIO is not set\n# end of Multiplexer drivers\n\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\n# CONFIG_PECI is not set\n# CONFIG_HTE is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_VALIDATE_FS_PARSER=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\nCONFIG_XFS_SUPPORT_V4=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\nCONFIG_F2FS_FS=y\nCONFIG_F2FS_STAT_FS=y\n# CONFIG_F2FS_FS_XATTR is not set\nCONFIG_F2FS_CHECK_FS=y\n# CONFIG_F2FS_FAULT_INJECTION is not set\n# CONFIG_F2FS_FS_COMPRESSION is not set\nCONFIG_F2FS_IOSTAT=y\n# CONFIG_F2FS_UNFAIR_RWSEM is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\nCONFIG_FANOTIFY_ACCESS_PERMISSIONS=y\nCONFIG_QUOTA=y\n# CONFIG_QUOTA_NETLINK_INTERFACE is not set\nCONFIG_PRINT_QUOTA_WARNING=y\n# CONFIG_QUOTA_DEBUG is not set\n# CONFIG_QFMT_V1 is not set\n# CONFIG_QFMT_V2 is not set\nCONFIG_QUOTACTL=y\nCONFIG_AUTOFS4_FS=y\nCONFIG_AUTOFS_FS=y\nCONFIG_FUSE_FS=m\nCONFIG_CUSE=m\n# CONFIG_VIRTIO_FS is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_XINO_AUTO is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n\n#\n# Caches\n#\nCONFIG_NETFS_SUPPORT=y\n# CONFIG_NETFS_STATS is not set\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_CACHEFILES is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=y\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=m\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=m\n# CONFIG_NTFS3_64BIT_CLUSTER is not set\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\n# CONFIG_PROC_KCORE is not set\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\nCONFIG_PROC_CHILDREN=y\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_TMPFS_INODE64 is not set\nCONFIG_ARCH_SUPPORTS_HUGETLBFS=y\n# CONFIG_HUGETLBFS is not set\nCONFIG_MEMFD_CREATE=y\nCONFIG_ARCH_HAS_GIGANTIC_PAGE=y\nCONFIG_CONFIGFS_FS=y\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\nCONFIG_HFS_FS=y\nCONFIG_HFSPLUS_FS=y\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_JFFS2_FS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\nCONFIG_SQUASHFS_FILE_CACHE=y\n# CONFIG_SQUASHFS_FILE_DIRECT is not set\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\nCONFIG_PSTORE=y\nCONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240\nCONFIG_PSTORE_DEFLATE_COMPRESS=y\n# CONFIG_PSTORE_LZO_COMPRESS is not set\n# CONFIG_PSTORE_LZ4_COMPRESS is not set\n# CONFIG_PSTORE_LZ4HC_COMPRESS is not set\n# CONFIG_PSTORE_842_COMPRESS is not set\n# CONFIG_PSTORE_ZSTD_COMPRESS is not set\nCONFIG_PSTORE_COMPRESS=y\nCONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y\nCONFIG_PSTORE_COMPRESS_DEFAULT=\"deflate\"\nCONFIG_PSTORE_CONSOLE=y\nCONFIG_PSTORE_PMSG=y\nCONFIG_PSTORE_RAM=y\n# CONFIG_PSTORE_BLK is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EROFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\n# CONFIG_NFS_SWAP is not set\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\nCONFIG_NFS_V4_1_MIGRATION=y\nCONFIG_NFS_V4_SECURITY_LABEL=y\nCONFIG_ROOT_NFS=y\nCONFIG_NFS_FSCACHE=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFS_DISABLE_UDP_SUPPORT=y\nCONFIG_NFS_V4_2_READ_PLUS=y\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_COMMON=y\nCONFIG_NFS_V4_2_SSC_HELPER=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS2=y\nCONFIG_CIFS_ALLOW_INSECURE_LEGACY=y\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\nCONFIG_CIFS_DEBUG=y\n# CONFIG_CIFS_DEBUG2 is not set\n# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\n# CONFIG_CIFS_SWN_UPCALL is not set\nCONFIG_CIFS_FSCACHE=y\n# CONFIG_CIFS_ROOT is not set\n# CONFIG_SMB_SERVER is not set\nCONFIG_SMBFS=y\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_KEYS_REQUEST_CACHE is not set\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\nCONFIG_KEY_DH_OPERATIONS=y\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\nCONFIG_SECURITY=y\n# CONFIG_SECURITYFS is not set\n# CONFIG_SECURITY_NETWORK is not set\n# CONFIG_SECURITY_PATH is not set\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\n# CONFIG_SECURITY_SMACK is not set\n# CONFIG_SECURITY_TOMOYO is not set\n# CONFIG_SECURITY_APPARMOR is not set\n# CONFIG_SECURITY_LOADPIN is not set\n# CONFIG_SECURITY_YAMA is not set\n# CONFIG_SECURITY_SAFESETID is not set\n# CONFIG_SECURITY_LOCKDOWN_LSM is not set\n# CONFIG_SECURITY_LANDLOCK is not set\nCONFIG_INTEGRITY=y\n# CONFIG_INTEGRITY_SIGNATURE is not set\n# CONFIG_IMA is not set\n# CONFIG_EVM is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_LSM=\"yama,loadpin,safesetid,integrity\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_GCC_PLUGIN_STACKLEAK is not set\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n\nCONFIG_RANDSTRUCT_NONE=y\n# CONFIG_RANDSTRUCT_FULL is not set\n# CONFIG_RANDSTRUCT_PERFORMANCE is not set\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_CRYPTD=y\nCONFIG_CRYPTO_AUTHENC=y\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_ENGINE=m\n# end of Crypto core or helper\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_DH=y\n# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set\nCONFIG_CRYPTO_ECC=m\nCONFIG_CRYPTO_ECDH=m\n# CONFIG_CRYPTO_ECDSA is not set\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\nCONFIG_CRYPTO_CURVE25519=m\n# end of Public-key cryptography\n\n#\n# Block ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\n# CONFIG_CRYPTO_ARIA is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\nCONFIG_CRYPTO_SM4=y\n# CONFIG_CRYPTO_SM4_GENERIC is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n# end of Block ciphers\n\n#\n# Length-preserving ciphers and modes\n#\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_ARC4 is not set\nCONFIG_CRYPTO_CHACHA20=m\nCONFIG_CRYPTO_CBC=y\n# CONFIG_CRYPTO_CFB is not set\nCONFIG_CRYPTO_CTR=y\n# CONFIG_CRYPTO_CTS is not set\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_HCTR2 is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_OFB is not set\n# CONFIG_CRYPTO_PCBC is not set\n# CONFIG_CRYPTO_XTS is not set\nCONFIG_CRYPTO_NHPOLY1305=y\n# end of Length-preserving ciphers and modes\n\n#\n# AEAD (authenticated encryption with associated data) ciphers\n#\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\n# CONFIG_CRYPTO_ESSIV is not set\n# end of AEAD (authenticated encryption with associated data) ciphers\n\n#\n# Hashes, digests, and MACs\n#\nCONFIG_CRYPTO_BLAKE2B=m\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\nCONFIG_CRYPTO_POLYVAL=y\nCONFIG_CRYPTO_POLY1305=m\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\nCONFIG_CRYPTO_SM3=y\n# CONFIG_CRYPTO_SM3_GENERIC is not set\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_VMAC is not set\n# CONFIG_CRYPTO_WP512 is not set\n# CONFIG_CRYPTO_XCBC is not set\nCONFIG_CRYPTO_XXHASH=m\n# end of Hashes, digests, and MACs\n\n#\n# CRCs (cyclic redundancy checks)\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=y\n# CONFIG_CRYPTO_CRCT10DIF is not set\n# end of CRCs (cyclic redundancy checks)\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=y\n# CONFIG_CRYPTO_LZO is not set\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n# end of Compression\n\n#\n# Random number generation\n#\nCONFIG_CRYPTO_ANSI_CPRNG=y\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_KDF800108_CTR=y\n# end of Random number generation\n\n#\n# Userspace interface\n#\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\n# CONFIG_CRYPTO_USER_API_AEAD is not set\nCONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y\n# end of Userspace interface\n\nCONFIG_CRYPTO_HASH_INFO=y\nCONFIG_CRYPTO_NHPOLY1305_NEON=y\nCONFIG_CRYPTO_CHACHA20_NEON=y\n\n#\n# Accelerated Cryptographic Algorithms for CPU (arm64)\n#\nCONFIG_CRYPTO_GHASH_ARM64_CE=y\nCONFIG_CRYPTO_POLY1305_NEON=y\nCONFIG_CRYPTO_SHA1_ARM64_CE=y\nCONFIG_CRYPTO_SHA256_ARM64=y\nCONFIG_CRYPTO_SHA2_ARM64_CE=y\nCONFIG_CRYPTO_SHA512_ARM64=y\nCONFIG_CRYPTO_SHA512_ARM64_CE=y\n# CONFIG_CRYPTO_SHA3_ARM64 is not set\nCONFIG_CRYPTO_SM3_NEON=y\n# CONFIG_CRYPTO_SM3_ARM64_CE is not set\nCONFIG_CRYPTO_POLYVAL_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64=y\nCONFIG_CRYPTO_AES_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64_CE_BLK=y\nCONFIG_CRYPTO_AES_ARM64_NEON_BLK=y\nCONFIG_CRYPTO_AES_ARM64_BS=y\n# CONFIG_CRYPTO_SM4_ARM64_CE is not set\nCONFIG_CRYPTO_SM4_ARM64_CE_BLK=y\nCONFIG_CRYPTO_SM4_ARM64_NEON_BLK=y\nCONFIG_CRYPTO_AES_ARM64_CE_CCM=y\n# end of Accelerated Cryptographic Algorithms for CPU (arm64)\n\nCONFIG_CRYPTO_HW=y\n# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set\n# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set\n# CONFIG_CRYPTO_DEV_CCP is not set\n# CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set\n# CONFIG_CRYPTO_DEV_QAT_C3XXX is not set\n# CONFIG_CRYPTO_DEV_QAT_C62X is not set\n# CONFIG_CRYPTO_DEV_QAT_4XXX is not set\n# CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set\n# CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set\n# CONFIG_CRYPTO_DEV_QAT_C62XVF is not set\n# CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set\n# CONFIG_CRYPTO_DEV_CAVIUM_ZIP is not set\nCONFIG_CRYPTO_DEV_ROCKCHIP=m\nCONFIG_CRYPTO_DEV_VIRTIO=m\n# CONFIG_CRYPTO_DEV_SAFEXCEL is not set\n# CONFIG_CRYPTO_DEV_CCREE is not set\n# CONFIG_CRYPTO_DEV_HISI_SEC is not set\n# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n# CONFIG_FIPS_SIGNATURE_SELFTEST is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\nCONFIG_RAID6_PQ_BENCHMARK=y\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_CORDIC=m\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_ARCH_HAS_FAST_MULTIPLIER=y\nCONFIG_ARCH_USE_SYM_ANNOTATIONS=y\n# CONFIG_INDIRECT_PIO is not set\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_UTILS=y\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=m\nCONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CHACHA_GENERIC=y\nCONFIG_CRYPTO_LIB_CHACHA=m\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=m\nCONFIG_CRYPTO_LIB_CURVE25519=m\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_POLY1305_GENERIC=y\nCONFIG_CRYPTO_LIB_POLY1305=m\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=m\nCONFIG_CRYPTO_LIB_SHA1=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_CRC_CCITT=m\nCONFIG_CRC16=y\n# CONFIG_CRC_T10DIF is not set\n# CONFIG_CRC64_ROCKSOFT is not set\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC64 is not set\n# CONFIG_CRC4 is not set\nCONFIG_CRC7=y\nCONFIG_LIBCRC32C=m\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=y\nCONFIG_AUDIT_ARCH_COMPAT_GENERIC=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=m\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMMON=y\nCONFIG_ZSTD_COMPRESS=m\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\nCONFIG_XZ_DEC_X86=y\nCONFIG_XZ_DEC_POWERPC=y\nCONFIG_XZ_DEC_IA64=y\nCONFIG_XZ_DEC_ARM=y\nCONFIG_XZ_DEC_ARMTHUMB=y\nCONFIG_XZ_DEC_SPARC=y\n# CONFIG_XZ_DEC_MICROLZMA is not set\nCONFIG_XZ_DEC_BCJ=y\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_LZ4=y\nCONFIG_DECOMPRESS_ZSTD=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_REED_SOLOMON=y\nCONFIG_REED_SOLOMON_ENC8=y\nCONFIG_REED_SOLOMON_DEC8=y\nCONFIG_INTERVAL_TREE=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_DMA_OPS=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_DMA_DECLARE_COHERENT=y\nCONFIG_ARCH_HAS_SETUP_DMA_OPS=y\nCONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y\nCONFIG_ARCH_HAS_DMA_PREP_COHERENT=y\nCONFIG_SWIOTLB=y\n# CONFIG_DMA_RESTRICTED_POOL is not set\nCONFIG_DMA_NONCOHERENT_MMAP=y\nCONFIG_DMA_COHERENT_POOL=y\nCONFIG_DMA_DIRECT_REMAP=y\nCONFIG_DMA_CMA=y\n# CONFIG_DMA_PERNUMA_CMA is not set\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=64\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\n# CONFIG_FORCE_NR_CPUS is not set\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_GENERIC_VDSO_TIME_NS=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\nCONFIG_SG_POOL=y\nCONFIG_ARCH_STACKWALK=y\nCONFIG_STACKDEPOT=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_GENERIC_IOREMAP=y\nCONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\n# CONFIG_STACKTRACE_BUILD_ID is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\nCONFIG_DYNAMIC_DEBUG_CORE=y\nCONFIG_SYMBOLIC_ERRNAME=y\nCONFIG_DEBUG_BUGVERBOSE=y\n# end of printk and dmesg options\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_DEBUG_INFO=y\nCONFIG_AS_HAS_NON_CONST_LEB128=y\n# CONFIG_DEBUG_INFO_NONE is not set\nCONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\n# CONFIG_DEBUG_INFO_REDUCED is not set\n# CONFIG_DEBUG_INFO_COMPRESSED is not set\n# CONFIG_DEBUG_INFO_SPLIT is not set\n# CONFIG_DEBUG_INFO_BTF is not set\n# CONFIG_GDB_SCRIPTS is not set\nCONFIG_FRAME_WARN=2048\n# CONFIG_STRIP_ASM_SYMS is not set\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=\"\"\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\nCONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_KCSAN_COMPILER=y\n# end of Generic Kernel Debugging Instruments\n\n#\n# Networking Debugging\n#\n# CONFIG_NET_DEV_REFCNT_TRACKER is not set\n# CONFIG_NET_NS_REFCNT_TRACKER is not set\n# CONFIG_DEBUG_NET is not set\n# end of Networking Debugging\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_TABLE_CHECK is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\nCONFIG_ARCH_HAS_DEBUG_WX=y\n# CONFIG_DEBUG_WX is not set\nCONFIG_GENERIC_PTDUMP=y\n# CONFIG_PTDUMP_DEBUGFS is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SHRINKER_DEBUG is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\nCONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y\n# CONFIG_DEBUG_VM is not set\n# CONFIG_DEBUG_VM_PGTABLE is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\nCONFIG_DEBUG_MEMORY_INIT=y\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_SW_TAGS=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_KASAN_SW_TAGS=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\n# CONFIG_SOFTLOCKUP_DETECTOR is not set\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\n# CONFIG_SCHED_DEBUG is not set\nCONFIG_SCHED_INFO=y\n# CONFIG_SCHEDSTATS is not set\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_RT_MUTEXES is not set\n# CONFIG_DEBUG_SPINLOCK is not set\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_RWSEMS is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# CONFIG_CSD_LOCK_WAIT_DEBUG is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_DEBUG_MAPLE_TREE is not set\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\nCONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0\n# CONFIG_RCU_TRACE is not set\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACING_SUPPORT=y\n# CONFIG_FTRACE is not set\n# CONFIG_SAMPLES is not set\nCONFIG_STRICT_DEVMEM=y\n# CONFIG_IO_STRICT_DEVMEM is not set\n\n#\n# arm64 Debugging\n#\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_ARM64_RELOC_TEST is not set\n# CONFIG_CORESIGHT is not set\n# end of arm64 Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\n# CONFIG_RUNTIME_TESTING_MENU is not set\nCONFIG_ARCH_USE_MEMTEST=y\nCONFIG_MEMTEST=y\n# end of Kernel Testing and Coverage\n\n#\n# Rust hacking\n#\n# end of Rust hacking\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/Rockchip/devices/RK3399/options",
    "content": "################################################################################\n# setup device defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        TARGET_CPU=\"cortex-a72.cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc+crypto\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a72.cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"crypto-neon-fp-armv8\"\n        ;;\n    esac\n\n  # Firmware\n    UBOOT_FIRMWARE+=\" atf\"\n    ATF_PLATFORM=\"rk3399\"\n    ATF_BL31_BINARY=\"bl31/bl31.elf\"\n\n  # Kernel target\n    KERNEL_TARGET=\"Image\"\n\n  # Mali GPU family\n    MALI_FAMILY=\"t860\"\n    GRAPHIC_DRIVERS=\"panfrost\"\n\n  # kernel serial console\n    EXTRA_CMDLINE=\"console=uart8250,mmio32,0xff1a0000 console=tty0 coherent_pool=2M cec.debounce_ms=5000\"\n\n  # set the addon project\n    ADDON_PROJECT=\"ARMv8\"\n\n  # additional packages\n    ADDITIONAL_PACKAGES+=\" pciutils\"\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/README.md",
    "content": "# RK356x\n\nThis is for RK356x devices using RK3566 and RK3568 SOCs\n\n**Build**\n\n* `PROJECT=Rockchip DEVICE=RK356x ARCH=aarch64 make image`\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/bootloader/canupdate.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n# Allow upgrades between arm and aarch64\nif [ \"$1\" = \"@PROJECT@.arm\" -o \"$1\" = \"@PROJECT@.aarch64\" ]; then\n  exit 0\nelse\n  exit 1\nfi\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/bootloader/config",
    "content": "CONFIG_BOOTDELAY=1\n# CONFIG_EFI_LOADER is not set\nCONFIG_FIT=y\nCONFIG_FIT_SIGNATURE=n\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/bootloader/install",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_RKBIN=\"$(get_build_dir rkbin)\"\nPKG_SOC=$UBOOT_SYSTEM\n\nif [ \"$DEVICE\" = \"RK3328\" -o \"$DEVICE\" = \"RK3399\" ]; then\n  PKG_SOC=\"${DEVICE/RK/rk}\"\nfi\n\nif [ \"$DEVICE\" = \"RK3568\" ]; then\nPKG_SOC=\"rk3568\"\nfi\n\nif [ \"$DEVICE\" == \"OdroidGoAdvance\" ]; then\n  PKG_SOC=\"px30\"\nfi\n\ncase \"$PKG_SOC\" in\n  rk3036)\n    PKG_DATAFILE=\"spl/u-boot-spl-nodtb.bin\"\n    PKG_LOADER=\"u-boot-dtb.bin\"\n    ;;\n  rk3288)\n    PKG_DATAFILE=\"$PKG_RKBIN/rk32/rk3288_ddr_400MHz_v1.06.bin\"\n    PKG_LOADER=\"$PKG_RKBIN/rk32/rk3288_miniloader_v2.36.bin\"\n    PKG_LOAD_ADDR=\"0x0\"\n    ;;\n  px30)\n    PKG_DATAFILE=\"$PKG_RKBIN/bin/rk33/rk3326_ddr_333MHz_v1.14.bin\"\n    PKG_LOADER=\"$PKG_RKBIN/bin/rk33/rk3326_miniloader_v1.20.bin\"\n    PKG_BL31=\"$PKG_RKBIN/bin/rk33/rk3326_bl31_v1.18.elf\"\n    PKG_BL32=\"$PKG_RKBIN/bin/rk33/rk3326_bl32_v1.13.bin\"\n    PKG_LOAD_ADDR=\"0x00200000\"\n    ;;\n  rk3328)\n    PKG_DATAFILE=\"$PKG_RKBIN/rk33/rk3328_ddr_786MHz_v1.13.bin\"\n    PKG_LOADER=\"$PKG_RKBIN/rk33/rk3328_miniloader_v2.49.bin\"\n    PKG_BL31=\"$PKG_RKBIN/rk33/rk3328_bl31_v1.40.elf\"\n    PKG_LOAD_ADDR=\"0x200000\"\n    ;;\n  rk3399)\n    PKG_DATAFILE=\"$PKG_RKBIN/rk33/rk3399_ddr_800MHz_v1.17.bin\"\n    PKG_LOADER=\"$PKG_RKBIN/rk33/rk3399_miniloader_v1.15.bin\"\n    PKG_BL31=\"$PKG_RKBIN/rk33/rk3399_bl31_v1.24.elf\"\n    PKG_LOAD_ADDR=\"0x200000\"\n    ;;\n  rk3568)\n    PKG_DATAFILE=\"$PKG_RKBIN/bin/rk35/rk3568_ddr_1560MHz_v1.05-firefly.bin\"\n    PKG_LOADER=\"$PKG_RKBIN/bin/rk35/rk3568_miniloader_spinand_v1.09.bin\"\n    PKG_BL31=\"$PKG_RKBIN/bin/rk35/rk3568_bl31_v1.28.elf\"\n    PKG_BL32=\"$PKG_RKBIN/bin/rk35/rk3568_bl32_v1.05.bin\"\n    PKG_LOAD_ADDR=\"0x0a100000\"\n    ;;\n  *)\n    PKG_DATAFILE=\"spl/u-boot-spl-dtb.bin\"\n    PKG_LOADER=\"u-boot-dtb.bin\"\n    ;;\nesac\n\n#if [ -n \"$PKG_DATAFILE\" -a -n \"$PKG_LOADER\" ]; then\n#  tools/mkimage -n $PKG_SOC -T rksd -d \"$PKG_DATAFILE\" idbloader.img\n#  echo \"tools/mkimage -n $PKG_SOC -T rksd -d \\\"$PKG_DATAFILE\\\" idbloader.img\"\n#  cat \"$PKG_LOADER\" >> idbloader.img\n#  cp -av idbloader.img $INSTALL/usr/share/bootloader\n#fi\n\n#./scripts/fit.sh --ini-trust $(get_build_dir rkbin)/RKTRUST/RK3568TRUST.ini --ini-loader $(get_build_dir rkbin)/RKBOOT/RK3568MINIALL.ini --chip RK3568\n#cp -av rk356x_spl_loader_v1.09.111.bin $INSTALL/usr/share/bootloader/idbloader.img\n#cp -av rk356x_spl_loader_v1.09.111.bin $INSTALL/usr/share/bootloader\ncp -av idblock.bin $INSTALL/usr/share/bootloader/idbloader.img\nmv idblock.bin idbloader.img\ncp -av uboot.img $INSTALL/usr/share/bootloader\n\n#if [ -n \"$PKG_LOAD_ADDR\" ]; then\n#  echo \"$PKG_RKBIN/tools/loaderimage --pack --uboot u-boot-dtb.bin uboot.img $PKG_LOAD_ADDR\"\n#  $PKG_RKBIN/tools/loaderimage --pack --uboot u-boot-dtb.bin uboot.img $PKG_LOAD_ADDR\n#  cp -av uboot.img $INSTALL/usr/share/bootloader\n#fi\n\n\nLE_TMP=$(mktemp -d)\nmkdir -p \"${LE_TMP}/extlinux\" \nmkdir -p $INSTALL/usr/share/bootloader/extlinux\n\nLINUX_DTS_DIR=$(get_build_dir linux)/.install_pkg/usr/share/bootloader\n  for dtb in $LINUX_DTS_DIR/*.dtb; do\n  \nif [ ! -f $dtb ]; then\n continue\nfi\n  \ncat << EOF > \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDT /$(basename ${dtb})\n  APPEND boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@ quiet ${EXTRA_CMDLINE}\nEOF\n\ncp -a \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\" $INSTALL/usr/share/bootloader/extlinux\ndone\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/bootloader/mkimage",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/idbloader.img\" ]; then\n  echo \"image: burn RK356x idblock.img to image...\"\n  dd if=\"$RELEASE_DIR/3rdparty/bootloader/idbloader.img\" of=\"$DISK\" bs=32k seek=1 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\nfi\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/uboot.img\" ]; then\n  echo \"image: burn RK356x uboot.img to image...\"\n  dd if=\"$RELEASE_DIR/3rdparty/bootloader/uboot.img\" of=\"$DISK\" bs=64k seek=128 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\nfi\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/trust.img\" ]; then\n  echo \"image: burn RK356x trust.img to image...\"\n  dd if=\"$RELEASE_DIR/3rdparty/bootloader/trust.img\" of=\"$DISK\" bs=64k seek=192 conv=fsync,notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\nfi\n\nif [ -f \"$RELEASE_DIR/3rdparty/bootloader/boot.ini\" ]; then\necho \"image: copying boot.ini to root\"\nmcopy \"$RELEASE_DIR/3rdparty/bootloader/boot.ini\" ::\nfi\n\nmkdir -p \"${LE_TMP}/extlinux\"\n\n# copy device trees to part1\nfor dtb in $RELEASE_DIR/3rdparty/bootloader/*.dtb; do\n\nif [ ! -f $dtb ]; then\n continue\nfi\n\ncat << EOF > \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDT /$(basename ${dtb})\n  APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}\nEOF\n\n  [ -e \"$dtb\" ] && mcopy -o \"$dtb\" ::\ndone\n\n mcopy -so \"${LE_TMP}/extlinux\" ::\n\n\n\n\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/bootloader/release",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nmkdir -p $RELEASE_DIR/3rdparty/bootloader\n  if [ -n \"$UBOOT_SYSTEM\" ]; then\n    BOOTLOADER_DIR=$(get_build_dir $BOOTLOADER)\n    if [ -f $BOOTLOADER_DIR/idbloader.img ]; then\n      cp -a $BOOTLOADER_DIR/idbloader.img $RELEASE_DIR/3rdparty/bootloader\n    fi\n    if [ -f $BOOTLOADER_DIR/uboot.img ]; then\n      cp -a $BOOTLOADER_DIR/uboot.img $RELEASE_DIR/3rdparty/bootloader\n    fi\n    if [ -f $BOOTLOADER_DIR/trust.img ]; then\n      cp -a $BOOTLOADER_DIR/trust.img $RELEASE_DIR/3rdparty/bootloader\n    fi\n  fi\n  \n  if [ -f $INSTALL/usr/share/bootloader/boot.ini ]; then\n  cp -a $INSTALL/usr/share/bootloader/boot.ini $RELEASE_DIR/3rdparty/bootloader\n  fi\n \n  LINUX_DTS_DIR=$(get_build_dir linux)/arch/$TARGET_KERNEL_ARCH/boot/dts\n  for dtb in $LINUX_DTS_DIR/*.dtb $LINUX_DTS_DIR/*/*.dtb; do\n    if [ -f $dtb ]; then\n      cp -a $dtb $RELEASE_DIR/3rdparty/bootloader\n    fi\n  done\n  \nLE_TMP=$(mktemp -d)\nmkdir -p \"${LE_TMP}/extlinux\" \nmkdir -p $RELEASE_DIR/3rdparty/bootloader\n\nLINUX_DTS_DIR=$(get_build_dir linux)/.install_pkg/usr/share/bootloader\n  for dtb in $RELEASE_DIR/3rdparty/bootloader/*.dtb; do\n\nif [ ! -f $dtb ]; then\n continue\nfi\n\ncat << EOF > \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDT /$(basename ${dtb})\n  APPEND boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@ quiet ${EXTRA_CMDLINE}\nEOF\n\ncp -a \"${LE_TMP}/extlinux/$(basename ${dtb}).conf\" $RELEASE_DIR/3rdparty/bootloader\ndone\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/bootloader/update.sh",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n[ -z \"$SYSTEM_ROOT\" ] && SYSTEM_ROOT=\"\"\n[ -z \"$BOOT_ROOT\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"$BOOT_PART\" ] && BOOT_PART=$(df \"$BOOT_ROOT\" | tail -1 | awk {' print $1 '})\nif [ -z \"$BOOT_DISK\" ]; then\n  case $BOOT_PART in\n    /dev/sd[a-z][0-9]*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,[0-9]*,,g\")\n      ;;\n    /dev/mmcblk*)\n      BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,p[0-9]*,,g\")\n      ;;\n  esac\nfi\n\n# mount $BOOT_ROOT r/w\n  mount -o remount,rw $BOOT_ROOT\n\n\nfor arg in $(cat /proc/cmdline); do\n  case $arg in\n    boot=*)\n      boot=\"${arg#*=}\"\n      case $boot in\n        /dev/mmc*)\n          BOOT_UUID=\"$(blkid $boot | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          BOOT_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" $boot \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n        FOLDER=*)\n          BOOT_UUID=\"$(blkid ${boot#*=} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n      esac\n    ;;\n    disk=*)\n      disk=\"${arg#*=}\"\n      case $disk in\n        /dev/mmc*)\n          DISK_UUID=\"$(blkid $disk | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n        UUID=*|LABEL=*)\n          DISK_UUID=\"$(blkid | sed 's/\"//g' | grep -m 1 -i \" $disk \" | sed 's/.* UUID=//;s/ .*//g')\"\n          ;;\n        FOLDER=*)\n          DISK_UUID=\"$(blkid ${disk#*=} | sed 's/.* UUID=\"//;s/\".*//g')\"\n          ;;\n      esac\n    ;;\n  esac\ndone\n\nCONFS=$SYSTEM_ROOT/usr/share/bootloader/extlinux/*.conf\n\nfor all_conf in $CONFS; do\n  conf=\"$(basename ${all_conf})\"\n  echo \"Updating ${conf}...\"\n  cp -p $SYSTEM_ROOT/usr/share/bootloader/extlinux/${conf} $BOOT_ROOT/extlinux/${conf}\n  sed -e \"s/@BOOT_UUID@/$BOOT_UUID/\" \\\n      -e \"s/@DISK_UUID@/$DISK_UUID/\" \\\n      -i $BOOT_ROOT/extlinux/${conf}\ndone\n\nif [ -f $SYSTEM_ROOT/usr/share/bootloader/boot.ini ]; then\n  echo \"Updating boot.ini...\"\n  cp -p $SYSTEM_ROOT/usr/share/bootloader/boot.ini $BOOT_ROOT/boot.ini\nfi\n\n# update device tree\n  for all_dtb in $SYSTEM_ROOT/usr/share/bootloader/*.dtb; do\n    dtb=$(basename $all_dtb)\n      echo -n \"Updating $dtb... \"\n      cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT\n      echo \"done\"\n  done\n\n# update bootloader\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/idbloader.img ]; then\n    echo -n \"Updating idbloader.img... \"\n    dd if=$SYSTEM_ROOT/usr/share/bootloader/idbloader.img of=$BOOT_DISK bs=32k seek=1 conv=fsync &>/dev/null\n    echo \"done\"\n  fi\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/uboot.img ]; then\n    echo -n \"Updating uboot.img... \"\n    dd if=$SYSTEM_ROOT/usr/share/bootloader/uboot.img of=$BOOT_DISK bs=64k seek=128 conv=fsync &>/dev/null\n    echo \"done\"\n  fi\n  if [ -f $SYSTEM_ROOT/usr/share/bootloader/trust.img ]; then\n    echo -n \"Updating trust.img... \"\n    dd if=$SYSTEM_ROOT/usr/share/bootloader/trust.img of=$BOOT_DISK bs=64k seek=192 conv=fsync &>/dev/null\n    echo \"done\"\n  fi\n\n# mount $BOOT_ROOT r/o\n  sync\n  mount -o remount,ro $BOOT_ROOT\n  \n# Leave a hint that we just did an update\necho \"UPDATE\" > /storage/.config/boot.hint\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/linux/rk356x-4.19/linux.aarch64.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm64 4.19.206 Kernel Configuration\n#\n\n#\n# Compiler: aarch64-libreelec-linux-gnueabi-gcc-10.3.0 (GCC) 10.3.0\n#\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=100300\nCONFIG_CLANG_VERSION=0\nCONFIG_LLD_VERSION=0\nCONFIG_CC_HAS_ASM_GOTO=y\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_EXTABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\nCONFIG_LOCALVERSION=\"\"\n# CONFIG_LOCALVERSION_AUTO is not set\nCONFIG_BUILD_SALT=\"\"\nCONFIG_HAVE_KERNEL_GZIP=y\nCONFIG_HAVE_KERNEL_LZ4=y\nCONFIG_KERNEL_GZIP=y\n# CONFIG_KERNEL_LZ4 is not set\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SWAP=y\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\n# CONFIG_POSIX_MQUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_GENERIC_IRQ_CHIP=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_MSI_IRQ=y\nCONFIG_GENERIC_MSI_IRQ_DOMAIN=y\nCONFIG_HANDLE_DOMAIN_IRQ=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\nCONFIG_GENERIC_IRQ_MULTI_HANDLER=y\nCONFIG_ARCH_CLOCKSOURCE_DATA=y\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n# CONFIG_PREEMPT_NONE is not set\nCONFIG_PREEMPT_VOLUNTARY=y\n# CONFIG_PREEMPT is not set\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\n# CONFIG_BSD_PROCESS_ACCT is not set\n# CONFIG_TASKSTATS is not set\n# CONFIG_PSI is not set\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\nCONFIG_BUILD_BIN2C=y\nCONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=18\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\nCONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y\nCONFIG_ARCH_SUPPORTS_INT128=y\nCONFIG_CGROUPS=y\n# CONFIG_MEMCG is not set\nCONFIG_BLK_CGROUP=y\n# CONFIG_DEBUG_BLK_CGROUP is not set\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\n# CONFIG_CGROUP_PIDS is not set\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\n# CONFIG_CGROUP_PERF is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_CHECKPOINT_RESTORE is not set\n# CONFIG_SCHED_AUTOGROUP is not set\n# CONFIG_SCHED_TUNE is not set\n# CONFIG_SYSFS_DEPRECATED is not set\nCONFIG_RELAY=y\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\" \"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\nCONFIG_RD_GZIP=y\nCONFIG_RD_BZIP2=y\nCONFIG_RD_LZMA=y\nCONFIG_RD_XZ=y\nCONFIG_RD_LZO=y\nCONFIG_RD_LZ4=y\nCONFIG_INITRAMFS_COMPRESSION=\".gz\"\n# CONFIG_INITRD_ASYNC is not set\n# CONFIG_ROCKCHIP_ONE_INITRD is not set\n# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set\nCONFIG_CC_OPTIMIZE_FOR_SIZE=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\nCONFIG_SYSCTL_EXCEPTION_TRACE=y\nCONFIG_BPF=y\nCONFIG_EXPERT=y\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\n# CONFIG_SGETMASK_SYSCALL is not set\nCONFIG_SYSFS_SYSCALL=y\n# CONFIG_SYSCTL_SYSCALL is not set\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_PRINTK_NMI=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\n# CONFIG_KALLSYMS_ALL is not set\nCONFIG_KALLSYMS_BASE_RELATIVE=y\n# CONFIG_BPF_SYSCALL is not set\n# CONFIG_USERFAULTFD is not set\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_RSEQ=y\n# CONFIG_DEBUG_RSEQ is not set\nCONFIG_EMBEDDED=y\nCONFIG_HAVE_PERF_EVENTS=y\n# CONFIG_PC104 is not set\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\nCONFIG_VM_EVENT_COUNTERS=y\nCONFIG_SLUB_SYSFS=y\nCONFIG_SLUB_DEBUG=y\n# CONFIG_COMPAT_BRK is not set\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\n# CONFIG_SLOB is not set\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\nCONFIG_SLUB_CPU_PARTIAL=y\nCONFIG_SYSTEM_DATA_VERIFICATION=y\nCONFIG_PROFILING=y\nCONFIG_TRACEPOINTS=y\nCONFIG_ARM64=y\nCONFIG_64BIT=y\nCONFIG_MMU=y\nCONFIG_ARM64_PAGE_SHIFT=12\nCONFIG_ARM64_CONT_SHIFT=4\nCONFIG_ARCH_MMAP_RND_BITS_MIN=18\nCONFIG_ARCH_MMAP_RND_BITS_MAX=24\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_RWSEM_XCHGADD_ALGORITHM=y\nCONFIG_GENERIC_BUG=y\nCONFIG_GENERIC_BUG_RELATIVE_POINTERS=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CSUM=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ZONE_DMA32=y\nCONFIG_HAVE_GENERIC_GUP=y\nCONFIG_SMP=y\nCONFIG_KERNEL_MODE_NEON=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_PGTABLE_LEVELS=3\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_ARCH_PROC_KCORE_TEXT=y\n\n#\n# Platform selection\n#\n# CONFIG_ARCH_ACTIONS is not set\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_BCM2835 is not set\n# CONFIG_ARCH_BCM_IPROC is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_BRCMSTB is not set\n# CONFIG_ARCH_EXYNOS is not set\n# CONFIG_ARCH_K3 is not set\n# CONFIG_ARCH_LAYERSCAPE is not set\n# CONFIG_ARCH_LG1K is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_MESON is not set\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_REALTEK is not set\nCONFIG_ARCH_ROCKCHIP=y\n# CONFIG_ARCH_SEATTLE is not set\n# CONFIG_ARCH_SYNQUACER is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_STRATIX10 is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_SPRD is not set\n# CONFIG_ARCH_THUNDER is not set\n# CONFIG_ARCH_THUNDER2 is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_XGENE is not set\n# CONFIG_ARCH_ZX is not set\n# CONFIG_ARCH_ZYNQMP is not set\n\n#\n# Bus support\n#\nCONFIG_PCI=y\nCONFIG_PCI_DOMAINS=y\nCONFIG_PCI_DOMAINS_GENERIC=y\nCONFIG_PCI_SYSCALL=y\nCONFIG_PCIEPORTBUS=y\nCONFIG_PCIEAER=y\n# CONFIG_PCIEAER_INJECT is not set\n# CONFIG_PCIE_ECRC is not set\nCONFIG_PCIEASPM=y\n# CONFIG_PCIEASPM_DEBUG is not set\nCONFIG_PCIEASPM_DEFAULT=y\n# CONFIG_PCIEASPM_POWERSAVE is not set\n# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set\n# CONFIG_PCIEASPM_PERFORMANCE is not set\nCONFIG_PCIE_PME=y\n# CONFIG_PCIE_DPC is not set\n# CONFIG_PCIE_PTM is not set\nCONFIG_PCI_MSI=y\nCONFIG_PCI_MSI_IRQ_DOMAIN=y\nCONFIG_PCI_QUIRKS=y\n# CONFIG_PCI_DEBUG is not set\n# CONFIG_PCI_STUB is not set\n# CONFIG_PCI_IOV is not set\n# CONFIG_PCI_PRI is not set\n# CONFIG_PCI_PASID is not set\n# CONFIG_HOTPLUG_PCI is not set\n\n#\n# PCI controller drivers\n#\n\n#\n# Cadence PCIe controllers support\n#\n# CONFIG_PCIE_CADENCE_HOST is not set\n# CONFIG_PCI_FTPCI100 is not set\n# CONFIG_PCI_HOST_GENERIC is not set\n# CONFIG_PCIE_XILINX is not set\n# CONFIG_PCI_XGENE is not set\n# CONFIG_PCI_HOST_THUNDER_PEM is not set\n# CONFIG_PCI_HOST_THUNDER_ECAM is not set\n# CONFIG_PCIE_ROCKCHIP_HOST is not set\n# CONFIG_ROCKCHIP_PCIE_DMA_OBJ is not set\n\n#\n# DesignWare PCI Core Support\n#\nCONFIG_PCIE_DW=y\nCONFIG_PCIE_DW_HOST=y\n# CONFIG_PCIE_DW_PLAT_HOST is not set\nCONFIG_PCIE_DW_ROCKCHIP=y\n# CONFIG_PCI_HISI is not set\n# CONFIG_PCIE_KIRIN is not set\n\n#\n# PCI Endpoint\n#\n# CONFIG_PCI_ENDPOINT is not set\n\n#\n# PCI switch controller drivers\n#\n# CONFIG_PCI_SW_SWITCHTEC is not set\n\n#\n# Kernel Features\n#\n\n#\n# ARM errata workarounds via the alternatives framework\n#\n# CONFIG_ARM64_ERRATUM_826319 is not set\n# CONFIG_ARM64_ERRATUM_827319 is not set\n# CONFIG_ARM64_ERRATUM_824069 is not set\n# CONFIG_ARM64_ERRATUM_819472 is not set\n# CONFIG_ARM64_ERRATUM_832075 is not set\nCONFIG_ARM64_ERRATUM_845719=y\nCONFIG_ARM64_ERRATUM_843419=y\nCONFIG_ARM64_ERRATUM_1024718=y\nCONFIG_ARM64_ERRATUM_1463225=y\nCONFIG_ARM64_ERRATUM_1542419=y\n# CONFIG_CAVIUM_ERRATUM_22375 is not set\n# CONFIG_CAVIUM_ERRATUM_23154 is not set\nCONFIG_CAVIUM_ERRATUM_27456=y\nCONFIG_CAVIUM_ERRATUM_30115=y\nCONFIG_QCOM_FALKOR_ERRATUM_1003=y\nCONFIG_QCOM_FALKOR_ERRATUM_1009=y\nCONFIG_QCOM_QDF2400_ERRATUM_0065=y\nCONFIG_SOCIONEXT_SYNQUACER_PREITS=y\nCONFIG_HISILICON_ERRATUM_161600802=y\nCONFIG_QCOM_FALKOR_ERRATUM_E1041=y\nCONFIG_ARM64_4K_PAGES=y\n# CONFIG_ARM64_16K_PAGES is not set\n# CONFIG_ARM64_64K_PAGES is not set\nCONFIG_ARM64_VA_BITS_39=y\n# CONFIG_ARM64_VA_BITS_48 is not set\nCONFIG_ARM64_VA_BITS=39\nCONFIG_ARM64_PA_BITS_48=y\nCONFIG_ARM64_PA_BITS=48\n# CONFIG_CPU_BIG_ENDIAN is not set\nCONFIG_SCHED_MC=y\n# CONFIG_SCHED_SMT is not set\nCONFIG_NR_CPUS=8\nCONFIG_HOTPLUG_CPU=y\n# CONFIG_NUMA is not set\nCONFIG_HOLES_IN_ZONE=y\n# CONFIG_HZ_100 is not set\n# CONFIG_HZ_250 is not set\nCONFIG_HZ_300=y\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=300\nCONFIG_SCHED_HRTICK=y\nCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y\nCONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_ARCH_SPARSEMEM_DEFAULT=y\nCONFIG_ARCH_SELECT_MEMORY_MODEL=y\nCONFIG_ARCH_FLATMEM_ENABLE=y\nCONFIG_HAVE_ARCH_PFN_VALID=y\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_SYS_SUPPORTS_HUGETLBFS=y\nCONFIG_ARCH_WANT_HUGE_PMD_SHARE=y\nCONFIG_ARCH_HAS_CACHE_LINE_SIZE=y\n# CONFIG_ARM64_DMA_USE_IOMMU is not set\nCONFIG_SECCOMP=y\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\n# CONFIG_KEXEC is not set\n# CONFIG_CRASH_DUMP is not set\n# CONFIG_XEN is not set\nCONFIG_FORCE_MAX_ZONEORDER=11\nCONFIG_UNMAP_KERNEL_AT_EL0=y\nCONFIG_HARDEN_BRANCH_PREDICTOR=y\nCONFIG_HARDEN_EL2_VECTORS=y\nCONFIG_ARM64_SSBD=y\nCONFIG_ARM64_TAGGED_ADDR_ABI=y\nCONFIG_ARMV8_DEPRECATED=y\nCONFIG_SWP_EMULATION=y\nCONFIG_CP15_BARRIER_EMULATION=y\nCONFIG_SETEND_EMULATION=y\n# CONFIG_ARM64_SW_TTBR0_PAN is not set\n\n#\n# ARMv8.1 architectural features\n#\nCONFIG_ARM64_HW_AFDBM=y\nCONFIG_ARM64_PAN=y\nCONFIG_ARM64_LSE_ATOMICS=y\nCONFIG_ARM64_VHE=y\n\n#\n# ARMv8.2 architectural features\n#\nCONFIG_ARM64_UAO=y\n# CONFIG_ARM64_PMEM is not set\nCONFIG_ARM64_RAS_EXTN=y\nCONFIG_ARM64_SVE=y\nCONFIG_ARM64_MODULE_PLTS=y\n# CONFIG_RANDOMIZE_BASE is not set\n\n#\n# Boot options\n#\nCONFIG_CMDLINE=\"\"\n# CONFIG_EFI is not set\nCONFIG_COMPAT=y\nCONFIG_KUSER_HELPERS=y\nCONFIG_SYSVIPC_COMPAT=y\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_SUSPEND_SKIP_SYNC is not set\nCONFIG_HAS_WAKELOCK=y\nCONFIG_WAKELOCK=y\n# CONFIG_HIBERNATION is not set\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\nCONFIG_PM=y\nCONFIG_PM_DEBUG=y\nCONFIG_PM_ADVANCED_DEBUG=y\n# CONFIG_PM_TEST_SUSPEND is not set\nCONFIG_PM_SLEEP_DEBUG=y\n# CONFIG_DPM_WATCHDOG is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\nCONFIG_WQ_POWER_EFFICIENT_DEFAULT=y\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\nCONFIG_ENERGY_MODEL=y\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\nCONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\nCONFIG_DT_IDLE_STATES=y\n\n#\n# ARM CPU Idle Drivers\n#\nCONFIG_ARM_CPUIDLE=y\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\n# CONFIG_CPU_FREQ_STAT is not set\n# CONFIG_CPU_FREQ_TIMES is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\nCONFIG_CPU_FREQ_GOV_POWERSAVE=y\nCONFIG_CPU_FREQ_GOV_USERSPACE=y\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\nCONFIG_CPU_FREQ_GOV_CONSERVATIVE=y\n# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_INTERACTIVE=y\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\n# CONFIG_CPUFREQ_DUMMY is not set\n# CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set\nCONFIG_ARM_ROCKCHIP_CPUFREQ=y\n# CONFIG_ARM_SCMI_CPUFREQ is not set\n# CONFIG_QORIQ_CPUFREQ is not set\n\n#\n# Firmware Drivers\n#\nCONFIG_ARM_PSCI_FW=y\n# CONFIG_ARM_PSCI_CHECKER is not set\nCONFIG_ARM_SCMI_PROTOCOL=y\nCONFIG_ARM_SCMI_POWER_DOMAIN=y\n# CONFIG_ARM_SCPI_PROTOCOL is not set\n# CONFIG_ARM_SDE_INTERFACE is not set\n# CONFIG_FIRMWARE_MEMMAP is not set\n# CONFIG_FW_CFG_SYSFS is not set\nCONFIG_ROCKCHIP_SIP=y\nCONFIG_HAVE_ARM_SMCCC=y\n# CONFIG_GOOGLE_FIRMWARE is not set\n\n#\n# Tegra firmware driver\n#\n# CONFIG_VIRTUALIZATION is not set\nCONFIG_ARM64_CRYPTO=y\nCONFIG_CRYPTO_SHA256_ARM64=y\n# CONFIG_CRYPTO_SHA512_ARM64 is not set\nCONFIG_CRYPTO_SHA1_ARM64_CE=y\nCONFIG_CRYPTO_SHA2_ARM64_CE=y\n# CONFIG_CRYPTO_SHA512_ARM64_CE is not set\n# CONFIG_CRYPTO_SHA3_ARM64 is not set\n# CONFIG_CRYPTO_SM3_ARM64_CE is not set\n# CONFIG_CRYPTO_SM4_ARM64_CE is not set\nCONFIG_CRYPTO_GHASH_ARM64_CE=y\n# CONFIG_CRYPTO_CRCT10DIF_ARM64_CE is not set\n# CONFIG_CRYPTO_CRC32_ARM64_CE is not set\nCONFIG_CRYPTO_AES_ARM64=y\nCONFIG_CRYPTO_AES_ARM64_CE=y\nCONFIG_CRYPTO_AES_ARM64_CE_CCM=y\nCONFIG_CRYPTO_AES_ARM64_CE_BLK=y\n# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set\n# CONFIG_CRYPTO_CHACHA20_NEON is not set\n# CONFIG_CRYPTO_POLY1305_NEON is not set\n# CONFIG_CRYPTO_AES_ARM64_BS is not set\n\n#\n# General architecture-dependent options\n#\n# CONFIG_KPROBES is not set\n# CONFIG_JUMP_LABEL is not set\nCONFIG_UPROBES=y\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_HAVE_NMI=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_HAVE_RCU_TABLE_FREE=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_HAVE_ALIGNED_STRUCT_PAGE=y\nCONFIG_HAVE_CMPXCHG_LOCAL=y\nCONFIG_HAVE_CMPXCHG_DOUBLE=y\nCONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP_FILTER=y\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_CC_HAS_STACKPROTECTOR_NONE=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_ARCH_SUPPORTS_LTO_CLANG=y\nCONFIG_ARCH_SUPPORTS_THINLTO=y\nCONFIG_LTO_NONE=y\nCONFIG_HAVE_CONTEXT_TRACKING=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y\nCONFIG_HAVE_ARCH_HUGE_VMAP=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_RELA=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_ARCH_MMAP_RND_BITS=18\nCONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y\nCONFIG_ARCH_MMAP_RND_COMPAT_BITS=11\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_COMPAT_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\nCONFIG_REFCOUNT_FULL=y\nCONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\nCONFIG_PLUGIN_HOSTCC=\"\"\nCONFIG_HAVE_GCC_PLUGINS=y\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\nCONFIG_MODULE_FORCE_LOAD=y\nCONFIG_MODULE_UNLOAD=y\nCONFIG_MODULE_FORCE_UNLOAD=y\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\n# CONFIG_MODULE_COMPRESS is not set\n# CONFIG_TRIM_UNUSED_KSYMS is not set\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\nCONFIG_BLK_SCSI_REQUEST=y\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_BLK_DEV_BSGLIB is not set\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_DEV_ZONED is not set\n# CONFIG_BLK_DEV_THROTTLING is not set\n# CONFIG_BLK_CMDLINE_PARSER is not set\n# CONFIG_BLK_WBT is not set\n# CONFIG_BLK_CGROUP_IOLATENCY is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\n# CONFIG_MAC_PARTITION is not set\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\n# CONFIG_LDM_PARTITION is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\n# CONFIG_CMDLINE_PARTITION is not set\nCONFIG_BLOCK_COMPAT=y\nCONFIG_BLK_MQ_PCI=y\n\n#\n# IO Schedulers\n#\nCONFIG_IOSCHED_NOOP=y\nCONFIG_IOSCHED_DEADLINE=y\nCONFIG_IOSCHED_CFQ=y\n# CONFIG_CFQ_GROUP_IOSCHED is not set\n# CONFIG_DEFAULT_DEADLINE is not set\nCONFIG_DEFAULT_CFQ=y\n# CONFIG_DEFAULT_NOOP is not set\nCONFIG_DEFAULT_IOSCHED=\"cfq\"\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\n# CONFIG_IOSCHED_BFQ is not set\nCONFIG_ASN1=y\nCONFIG_ARCH_INLINE_SPIN_TRYLOCK=y\nCONFIG_ARCH_INLINE_SPIN_TRYLOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_LOCK=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_SPIN_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_INLINE_READ_LOCK=y\nCONFIG_ARCH_INLINE_READ_LOCK_BH=y\nCONFIG_ARCH_INLINE_READ_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_READ_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_READ_UNLOCK=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_READ_UNLOCK_IRQRESTORE=y\nCONFIG_ARCH_INLINE_WRITE_LOCK=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_BH=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_IRQ=y\nCONFIG_ARCH_INLINE_WRITE_LOCK_IRQSAVE=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_BH=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQ=y\nCONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE=y\nCONFIG_UNINLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_USE_QUEUED_SPINLOCKS=y\nCONFIG_QUEUED_SPINLOCKS=y\nCONFIG_ARCH_USE_QUEUED_RWLOCKS=y\nCONFIG_QUEUED_RWLOCKS=y\nCONFIG_ARCH_HAS_SYSCALL_WRAPPER=y\n# CONFIG_GKI_HIDDEN_DRM_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_REGMAP_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_CRYPTO_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_SND_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_SND_SOC_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_GPIO_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_VIRTUAL_CONFIGS is not set\n# CONFIG_GKI_LEGACY_WEXT_ALLCONFIG is not set\n# CONFIG_GKI_HIDDEN_SOC_PM_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_VIDEOBUF2_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_USB_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_SOC_BUS_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_GPU_CONFIGS is not set\n# CONFIG_GKI_HIDDEN_IRQ_CONFIGS is not set\n# CONFIG_GKI_HACKS_TO_FIX is not set\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\nCONFIG_COMPAT_BINFMT_ELF=y\nCONFIG_ELFCORE=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\n\n#\n# Memory Management options\n#\nCONFIG_SELECT_MEMORY_MODEL=y\n# CONFIG_FLATMEM_MANUAL is not set\nCONFIG_SPARSEMEM_MANUAL=y\nCONFIG_SPARSEMEM=y\nCONFIG_HAVE_MEMORY_PRESENT=y\nCONFIG_SPARSEMEM_EXTREME=y\nCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y\nCONFIG_SPARSEMEM_VMEMMAP=y\nCONFIG_HAVE_MEMBLOCK=y\nCONFIG_NO_BOOTMEM=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_SPLIT_PTLOCK_CPUS=4\n# CONFIG_COMPACTION is not set\nCONFIG_MIGRATION=y\nCONFIG_PHYS_ADDR_T_64BIT=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=32768\nCONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y\n# CONFIG_MEMORY_FAILURE is not set\n# CONFIG_TRANSPARENT_HUGEPAGE is not set\n# CONFIG_CLEANCACHE is not set\n# CONFIG_FRONTSWAP is not set\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\n# CONFIG_CMA_DEBUGFS is not set\nCONFIG_CMA_AREAS=7\n# CONFIG_ZPOOL is not set\n# CONFIG_ZBUD is not set\nCONFIG_ZSMALLOC=y\n# CONFIG_PGTABLE_MAPPING is not set\n# CONFIG_ZSMALLOC_STAT is not set\n# CONFIG_MM_EVENT_STAT is not set\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_FRAME_VECTOR=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_BENCHMARK is not set\nCONFIG_ARCH_HAS_PTE_SPECIAL=y\nCONFIG_NET=y\nCONFIG_COMPAT_NETLINK_MESSAGES=y\nCONFIG_NET_INGRESS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_INTERFACE is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_NET_KEY=y\n# CONFIG_NET_KEY_MIGRATE is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\n# CONFIG_IP_MULTIPLE_TABLES is not set\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\n# CONFIG_IP_PNP is not set\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_IP_MROUTE_COMMON=y\nCONFIG_IP_MROUTE=y\n# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set\n# CONFIG_IP_PIMSM_V1 is not set\n# CONFIG_IP_PIMSM_V2 is not set\nCONFIG_SYN_COOKIES=y\n# CONFIG_NET_FOU is not set\n# CONFIG_INET_AH is not set\n# CONFIG_INET_ESP is not set\n# CONFIG_INET_IPCOMP is not set\n# CONFIG_INET_XFRM_MODE_TRANSPORT is not set\n# CONFIG_INET_XFRM_MODE_TUNNEL is not set\n# CONFIG_INET_XFRM_MODE_BEET is not set\n# CONFIG_INET_DIAG is not set\n# CONFIG_TCP_CONG_ADVANCED is not set\nCONFIG_TCP_CONG_CUBIC=y\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set\n# CONFIG_INET6_XFRM_MODE_TUNNEL is not set\n# CONFIG_INET6_XFRM_MODE_BEET is not set\n# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set\n# CONFIG_IPV6_SIT is not set\n# CONFIG_IPV6_TUNNEL is not set\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_NETWORK_SECMARK is not set\nCONFIG_NET_PTP_CLASSIFY=y\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\n# CONFIG_BRIDGE_NETFILTER is not set\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\n# CONFIG_NETFILTER_NETLINK_LOG is not set\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=y\n# CONFIG_NF_LOG_NETDEV is not set\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_ZONES is not set\nCONFIG_NF_CONNTRACK_PROCFS=y\n# CONFIG_NF_CONNTRACK_EVENTS is not set\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\nCONFIG_NF_CT_PROTO_DCCP=y\nCONFIG_NF_CT_PROTO_SCTP=y\nCONFIG_NF_CT_PROTO_UDPLITE=y\n# CONFIG_NF_CONNTRACK_AMANDA is not set\n# CONFIG_NF_CONNTRACK_FTP is not set\n# CONFIG_NF_CONNTRACK_H323 is not set\n# CONFIG_NF_CONNTRACK_IRC is not set\n# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\n# CONFIG_NF_CONNTRACK_SIP is not set\n# CONFIG_NF_CONNTRACK_TFTP is not set\n# CONFIG_NF_CT_NETLINK is not set\nCONFIG_NF_NAT=y\nCONFIG_NF_NAT_NEEDED=y\nCONFIG_NF_NAT_PROTO_DCCP=y\nCONFIG_NF_NAT_PROTO_UDPLITE=y\nCONFIG_NF_NAT_PROTO_SCTP=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=y\n\n#\n# Xtables combined modules\n#\n# CONFIG_NETFILTER_XT_MARK is not set\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=y\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\n# CONFIG_NETFILTER_XT_TARGET_REDIRECT is not set\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\n# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\n# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\n# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\n# CONFIG_NETFILTER_XT_MATCH_OWNER is not set\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA2 is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\nCONFIG_NETFILTER_XT_MATCH_STATE=y\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# CONFIG_IP_SET is not set\n# CONFIG_IP_VS is not set\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=y\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\nCONFIG_NF_REJECT_IPV4=y\nCONFIG_NF_NAT_IPV4=y\nCONFIG_NF_NAT_MASQUERADE_IPV4=y\nCONFIG_IP_NF_IPTABLES=y\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=y\nCONFIG_IP_NF_TARGET_REJECT=y\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=y\nCONFIG_IP_NF_TARGET_MASQUERADE=y\n# CONFIG_IP_NF_TARGET_NETMAP is not set\n# CONFIG_IP_NF_TARGET_REDIRECT is not set\nCONFIG_IP_NF_MANGLE=y\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\n# CONFIG_NF_REJECT_IPV6 is not set\n# CONFIG_NF_LOG_IPV6 is not set\n# CONFIG_NF_NAT_IPV6 is not set\n# CONFIG_IP6_NF_IPTABLES is not set\nCONFIG_NF_DEFRAG_IPV6=y\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=y\nCONFIG_BRIDGE=y\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_HAVE_NET_DSA=y\n# CONFIG_NET_DSA is not set\n# CONFIG_VLAN_8021Q is not set\n# CONFIG_DECNET is not set\nCONFIG_LLC=y\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\n# CONFIG_NET_SCHED is not set\n# CONFIG_DCB is not set\n# CONFIG_DNS_RESOLVER is not set\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\n# CONFIG_NET_L3_MASTER_DEV is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_XPS=y\n# CONFIG_CGROUP_NET_PRIO is not set\n# CONFIG_CGROUP_NET_CLASSID is not set\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_JIT is not set\nCONFIG_ETHTOOL=y\nCONFIG_FILTER=y\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# CONFIG_HAMRADIO is not set\nCONFIG_CAN=y\nCONFIG_CAN_RAW=y\nCONFIG_CAN_BCM=y\nCONFIG_CAN_GW=y\n\n#\n# CAN Device Drivers\n#\n# CONFIG_CAN_VCAN is not set\n# CONFIG_CAN_VXCAN is not set\n# CONFIG_CAN_SLCAN is not set\nCONFIG_CAN_DEV=y\nCONFIG_CAN_CALC_BITTIMING=y\n# CONFIG_CAN_GRCAN is not set\n# CONFIG_CAN_XILINXCAN is not set\n# CONFIG_CAN_C_CAN is not set\n# CONFIG_CAN_CC770 is not set\n# CONFIG_CAN_IFI_CANFD is not set\n# CONFIG_CAN_M_CAN is not set\n# CONFIG_CAN_PEAK_PCIEFD is not set\nCONFIG_CAN_ROCKCHIP=y\nCONFIG_CANFD_ROCKCHIP=y\n# CONFIG_CAN_SJA1000 is not set\n# CONFIG_CAN_SOFTING is not set\n\n#\n# CAN SPI interfaces\n#\n# CONFIG_CAN_HI311X is not set\n# CONFIG_CAN_MCP251X is not set\n\n#\n# CAN USB interfaces\n#\n# CONFIG_CAN_8DEV_USB is not set\n# CONFIG_CAN_EMS_USB is not set\n# CONFIG_CAN_ESD_USB2 is not set\n# CONFIG_CAN_GS_USB is not set\n# CONFIG_CAN_KVASER_USB is not set\n# CONFIG_CAN_MCBA_USB is not set\n# CONFIG_CAN_PEAK_USB is not set\n# CONFIG_CAN_UCAN is not set\n# CONFIG_CAN_DEBUG_DEVICES is not set\nCONFIG_BT=y\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=y\n# CONFIG_BT_RFCOMM_TTY is not set\n# CONFIG_BT_BNEP is not set\nCONFIG_BT_HIDP=y\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\n# CONFIG_BT_LEDS is not set\n# CONFIG_BT_SELFTEST is not set\nCONFIG_BT_DEBUGFS=y\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=y\nCONFIG_BT_BCM=y\nCONFIG_BT_RTL=y\nCONFIG_BT_HCIBTUSB=y\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\nCONFIG_BT_HCIBTUSB_RTL=y\n# CONFIG_BT_HCIBTSDIO is not set\nCONFIG_BT_HCIUART=y\nCONFIG_BT_HCIUART_SERDEV=y\nCONFIG_BT_HCIUART_H4=y\n# CONFIG_BT_HCIUART_NOKIA is not set\n# CONFIG_BT_HCIUART_BCSP is not set\nCONFIG_BT_HCIUART_ATH3K=y\n# CONFIG_BT_HCIUART_LL is not set\n# CONFIG_BT_HCIUART_3WIRE is not set\n# CONFIG_BT_HCIUART_INTEL is not set\nCONFIG_BT_HCIUART_BCM=y\n# CONFIG_BT_HCIUART_QCA is not set\n# CONFIG_BT_HCIUART_AG6XX is not set\n# CONFIG_BT_HCIUART_MRVL is not set\n# CONFIG_BT_HCIBCM203X is not set\n# CONFIG_BT_HCIBPA10X is not set\nCONFIG_BT_HCIBFUSB=y\nCONFIG_BT_HCIVHCI=y\nCONFIG_BT_MRVL=y\nCONFIG_BT_MRVL_SDIO=y\n# CONFIG_BT_ATH3K is not set\n# CONFIG_BT_MTKUART is not set\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=y\nCONFIG_NL80211_TESTMODE=y\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\n# CONFIG_CFG80211_CERTIFICATION_ONUS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\nCONFIG_CFG80211_DEFAULT_PS=y\nCONFIG_CFG80211_DEBUGFS=y\nCONFIG_CFG80211_CRDA_SUPPORT=y\nCONFIG_CFG80211_WEXT=y\nCONFIG_MAC80211=y\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_MINSTREL_HT=y\n# CONFIG_MAC80211_RC_MINSTREL_VHT is not set\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\nCONFIG_MAC80211_DEBUGFS=y\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\nCONFIG_MAC80211_DEBUG_MENU=y\n# CONFIG_MAC80211_NOINLINE is not set\nCONFIG_MAC80211_VERBOSE_DEBUG=y\n# CONFIG_MAC80211_MLME_DEBUG is not set\n# CONFIG_MAC80211_STA_DEBUG is not set\n# CONFIG_MAC80211_HT_DEBUG is not set\n# CONFIG_MAC80211_OCB_DEBUG is not set\n# CONFIG_MAC80211_IBSS_DEBUG is not set\n# CONFIG_MAC80211_PS_DEBUG is not set\n# CONFIG_MAC80211_TDLS_DEBUG is not set\n# CONFIG_MAC80211_DEBUG_COUNTERS is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\n# CONFIG_WIMAX is not set\nCONFIG_RFKILL=y\nCONFIG_RFKILL_LEDS=y\n# CONFIG_RFKILL_INPUT is not set\n# CONFIG_RFKILL_GPIO is not set\nCONFIG_RFKILL_RK=y\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_GRO_CELLS=y\n# CONFIG_NET_DEVLINK is not set\nCONFIG_MAY_USE_DEVLINK=y\n# CONFIG_FAILOVER is not set\nCONFIG_HAVE_EBPF_JIT=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\n\n#\n# Generic Driver Options\n#\nCONFIG_UEVENT_HELPER=y\nCONFIG_UEVENT_HELPER_PATH=\"\"\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\nCONFIG_FW_CACHE=y\nCONFIG_WANT_DEV_COREDUMP=y\nCONFIG_ALLOW_DEV_COREDUMP=y\nCONFIG_DEV_COREDUMP=y\n# CONFIG_DEBUG_DRIVER is not set\nCONFIG_DEBUG_DEVRES=y\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\n# CONFIG_MALI_BASE_MODULES is not set\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_DMA_CMA=y\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=16\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n\n#\n# Bus devices\n#\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_SIMPLE_PM_BUS is not set\n# CONFIG_VEXPRESS_CONFIG is not set\nCONFIG_CONNECTOR=y\nCONFIG_PROC_EVENTS=y\n# CONFIG_GNSS is not set\nCONFIG_MTD=y\n# CONFIG_MTD_TESTS is not set\n# CONFIG_MTD_REDBOOT_PARTS is not set\nCONFIG_MTD_CMDLINE_PARTS=y\n# CONFIG_MTD_AFS_PARTS is not set\nCONFIG_MTD_OF_PARTS=y\n# CONFIG_MTD_AR7_PARTS is not set\n\n#\n# Partition parsers\n#\n\n#\n# User Modules And Translation Layers\n#\nCONFIG_MTD_BLKDEVS=y\nCONFIG_MTD_BLOCK=y\n# CONFIG_FTL is not set\n# CONFIG_NFTL is not set\n# CONFIG_INFTL is not set\n# CONFIG_RFD_FTL is not set\n# CONFIG_SSFDC is not set\n# CONFIG_SM_FTL is not set\n# CONFIG_MTD_OOPS is not set\n# CONFIG_MTD_SWAP is not set\n# CONFIG_MTD_PARTITIONED_MASTER is not set\n\n#\n# RAM/ROM/Flash chip drivers\n#\n# CONFIG_MTD_CFI is not set\n# CONFIG_MTD_JEDECPROBE is not set\nCONFIG_MTD_MAP_BANK_WIDTH_1=y\nCONFIG_MTD_MAP_BANK_WIDTH_2=y\nCONFIG_MTD_MAP_BANK_WIDTH_4=y\nCONFIG_MTD_CFI_I1=y\nCONFIG_MTD_CFI_I2=y\n# CONFIG_MTD_RAM is not set\n# CONFIG_MTD_ROM is not set\n# CONFIG_MTD_ABSENT is not set\n\n#\n# Mapping drivers for chip access\n#\n# CONFIG_MTD_COMPLEX_MAPPINGS is not set\n# CONFIG_MTD_INTEL_VR_NOR is not set\n# CONFIG_MTD_PLATRAM is not set\n\n#\n# Self-contained MTD device drivers\n#\n# CONFIG_MTD_PMC551 is not set\n# CONFIG_MTD_DATAFLASH is not set\n# CONFIG_MTD_MCHP23K256 is not set\n# CONFIG_MTD_SST25L is not set\n# CONFIG_MTD_SLRAM is not set\n# CONFIG_MTD_PHRAM is not set\n# CONFIG_MTD_MTDRAM is not set\n# CONFIG_MTD_BLOCK2MTD is not set\n\n#\n# Disk-On-Chip Device Drivers\n#\n# CONFIG_MTD_DOCG3 is not set\n# CONFIG_MTD_ONENAND is not set\n# CONFIG_MTD_NAND is not set\n# CONFIG_MTD_SPI_NAND is not set\n\n#\n# LPDDR & LPDDR2 PCM memory drivers\n#\n# CONFIG_MTD_LPDDR is not set\n# CONFIG_MTD_SPI_NOR is not set\nCONFIG_MTD_UBI=y\nCONFIG_MTD_UBI_WL_THRESHOLD=4096\nCONFIG_MTD_UBI_BEB_LIMIT=20\n# CONFIG_MTD_UBI_FASTMAP is not set\n# CONFIG_MTD_UBI_GLUEBI is not set\n# CONFIG_MTD_UBI_BLOCK is not set\nCONFIG_DTC=y\nCONFIG_OF=y\nCONFIG_DTC_SYMBOLS=y\n# CONFIG_DTC_OMIT_DISABLED is not set\n# CONFIG_DTC_OMIT_EMPTY is not set\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_NET=y\nCONFIG_OF_MDIO=y\nCONFIG_OF_RESERVED_MEM=y\n# CONFIG_OF_OVERLAY is not set\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_CDROM=y\n# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set\nCONFIG_ZRAM=y\n# CONFIG_ZRAM_WRITEBACK is not set\n# CONFIG_ZRAM_MEMORY_TRACKING is not set\n# CONFIG_BLK_DEV_DAC960 is not set\n# CONFIG_BLK_DEV_UMEM is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=8\n# CONFIG_BLK_DEV_CRYPTOLOOP is not set\n# CONFIG_BLK_DEV_DRBD is not set\n# CONFIG_BLK_DEV_NBD is not set\n# CONFIG_BLK_DEV_SKD is not set\n# CONFIG_BLK_DEV_SX8 is not set\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=1\nCONFIG_BLK_DEV_RAM_SIZE=4096\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_RSXX is not set\n\n#\n# NVME Support\n#\nCONFIG_NVME_CORE=y\nCONFIG_BLK_DEV_NVME=y\n# CONFIG_NVME_MULTIPATH is not set\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TARGET is not set\n\n#\n# Misc devices\n#\n# CONFIG_ROCKCHIP_SCR is not set\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_PHANTOM is not set\n# CONFIG_SGI_IOC4 is not set\n# CONFIG_TIFM_CORE is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_HP_ILO is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_USB_SWITCH_FSA9480 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\nCONFIG_SRAM=y\n# CONFIG_PCI_ENDPOINT_TEST is not set\n# CONFIG_PIR_ASCHIP is not set\n# CONFIG_RK803 is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\n# CONFIG_EEPROM_AT25 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\n# CONFIG_EEPROM_93CX6 is not set\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_CB710_CORE is not set\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n\n#\n# Intel MIC & related support\n#\n\n#\n# Intel MIC Bus Driver\n#\n\n#\n# SCIF Bus Driver\n#\n\n#\n# VOP Bus Driver\n#\n\n#\n# Intel MIC Host Driver\n#\n\n#\n# Intel MIC Card Driver\n#\n\n#\n# SCIF Driver\n#\n\n#\n# Intel MIC Coprocessor State Management (COSM) Drivers\n#\n\n#\n# VOP Driver\n#\n# CONFIG_GENWQE is not set\n# CONFIG_ECHO is not set\n# CONFIG_MISC_RTSX_PCI is not set\n# CONFIG_MISC_RTSX_USB is not set\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\nCONFIG_SCSI_MQ_DEFAULT=y\nCONFIG_SCSI_PROC_FS=y\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\n# CONFIG_CHR_DEV_OSST is not set\nCONFIG_BLK_DEV_SR=y\n# CONFIG_CHR_DEV_SG is not set\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\nCONFIG_SCSI_SCAN_ASYNC=y\n\n#\n# SCSI Transports\n#\nCONFIG_SCSI_SPI_ATTRS=y\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_CXGB3_ISCSI is not set\n# CONFIG_SCSI_CXGB4_ISCSI is not set\n# CONFIG_SCSI_BNX2_ISCSI is not set\n# CONFIG_BE2ISCSI is not set\n# CONFIG_BLK_DEV_3W_XXXX_RAID is not set\n# CONFIG_SCSI_HPSA is not set\n# CONFIG_SCSI_3W_9XXX is not set\n# CONFIG_SCSI_3W_SAS is not set\n# CONFIG_SCSI_ACARD is not set\n# CONFIG_SCSI_AACRAID is not set\n# CONFIG_SCSI_AIC7XXX is not set\n# CONFIG_SCSI_AIC79XX is not set\n# CONFIG_SCSI_AIC94XX is not set\n# CONFIG_SCSI_HISI_SAS is not set\n# CONFIG_SCSI_MVSAS is not set\n# CONFIG_SCSI_MVUMI is not set\n# CONFIG_SCSI_ADVANSYS is not set\n# CONFIG_SCSI_ARCMSR is not set\n# CONFIG_SCSI_ESAS2R is not set\n# CONFIG_MEGARAID_NEWGEN is not set\n# CONFIG_MEGARAID_LEGACY is not set\n# CONFIG_MEGARAID_SAS is not set\n# CONFIG_SCSI_MPT3SAS is not set\n# CONFIG_SCSI_MPT2SAS is not set\n# CONFIG_SCSI_SMARTPQI is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_SCSI_HPTIOP is not set\n# CONFIG_SCSI_SNIC is not set\n# CONFIG_SCSI_DMX3191D is not set\n# CONFIG_SCSI_IPS is not set\n# CONFIG_SCSI_INITIO is not set\n# CONFIG_SCSI_INIA100 is not set\n# CONFIG_SCSI_STEX is not set\n# CONFIG_SCSI_SYM53C8XX_2 is not set\n# CONFIG_SCSI_IPR is not set\n# CONFIG_SCSI_QLOGIC_1280 is not set\n# CONFIG_SCSI_QLA_ISCSI is not set\n# CONFIG_SCSI_DC395x is not set\n# CONFIG_SCSI_AM53C974 is not set\n# CONFIG_SCSI_WD719X is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_PMCRAID is not set\n# CONFIG_SCSI_PM8001 is not set\n# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set\n# CONFIG_SCSI_DH is not set\n# CONFIG_SCSI_OSD_INITIATOR is not set\nCONFIG_HAVE_PATA_PLATFORM=y\nCONFIG_ATA=y\nCONFIG_ATA_VERBOSE_ERROR=y\nCONFIG_SATA_PMP=y\n\n#\n# Controllers with non-SFF native interface\n#\nCONFIG_SATA_AHCI=y\nCONFIG_SATA_MOBILE_LPM_POLICY=0\nCONFIG_SATA_AHCI_PLATFORM=y\n# CONFIG_AHCI_CEVA is not set\n# CONFIG_AHCI_QORIQ is not set\n# CONFIG_SATA_INIC162X is not set\n# CONFIG_SATA_ACARD_AHCI is not set\n# CONFIG_SATA_SIL24 is not set\n# CONFIG_ATA_SFF is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\n# CONFIG_BLK_DEV_DM is not set\n# CONFIG_TARGET_CORE is not set\n# CONFIG_FUSION is not set\n\n#\n# IEEE 1394 (FireWire) support\n#\n# CONFIG_FIREWIRE is not set\n# CONFIG_FIREWIRE_NOSY is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\n# CONFIG_DUMMY is not set\n# CONFIG_WIREGUARD is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_FC is not set\n# CONFIG_NET_TEAM is not set\n# CONFIG_MACVLAN is not set\n# CONFIG_IPVLAN is not set\n# CONFIG_VXLAN is not set\n# CONFIG_GENEVE is not set\n# CONFIG_GTP is not set\n# CONFIG_MACSEC is not set\n# CONFIG_NETCONSOLE is not set\n# CONFIG_TUN is not set\n# CONFIG_TUN_VNET_CROSS_LE is not set\n# CONFIG_VETH is not set\n# CONFIG_NLMON is not set\n# CONFIG_ARCNET is not set\n\n#\n# CAIF transport drivers\n#\n\n#\n# Distributed Switch Architecture drivers\n#\nCONFIG_ETHERNET=y\n# CONFIG_NET_VENDOR_3COM is not set\n# CONFIG_NET_VENDOR_ADAPTEC is not set\n# CONFIG_NET_VENDOR_AGERE is not set\nCONFIG_NET_VENDOR_ALACRITECH=y\n# CONFIG_SLICOSS is not set\n# CONFIG_NET_VENDOR_ALTEON is not set\n# CONFIG_ALTERA_TSE is not set\nCONFIG_NET_VENDOR_AMAZON=y\n# CONFIG_ENA_ETHERNET is not set\n# CONFIG_NET_VENDOR_AMD is not set\nCONFIG_NET_VENDOR_AQUANTIA=y\n# CONFIG_NET_VENDOR_ARC is not set\n# CONFIG_NET_VENDOR_ATHEROS is not set\nCONFIG_NET_VENDOR_AURORA=y\n# CONFIG_AURORA_NB8800 is not set\n# CONFIG_NET_VENDOR_BROADCOM is not set\n# CONFIG_NET_VENDOR_BROCADE is not set\nCONFIG_NET_VENDOR_CADENCE=y\n# CONFIG_MACB is not set\n# CONFIG_NET_VENDOR_CAVIUM is not set\n# CONFIG_NET_VENDOR_CHELSIO is not set\n# CONFIG_NET_VENDOR_CISCO is not set\nCONFIG_NET_VENDOR_CORTINA=y\n# CONFIG_GEMINI_ETHERNET is not set\n# CONFIG_DNET is not set\n# CONFIG_NET_VENDOR_DEC is not set\n# CONFIG_NET_VENDOR_DLINK is not set\n# CONFIG_NET_VENDOR_EMULEX is not set\n# CONFIG_NET_VENDOR_EZCHIP is not set\n# CONFIG_NET_VENDOR_HISILICON is not set\n# CONFIG_NET_VENDOR_HP is not set\nCONFIG_NET_VENDOR_HUAWEI=y\n# CONFIG_HINIC is not set\n# CONFIG_NET_VENDOR_INTEL is not set\n# CONFIG_JME is not set\n# CONFIG_NET_VENDOR_MARVELL is not set\n# CONFIG_NET_VENDOR_MELLANOX is not set\n# CONFIG_NET_VENDOR_MICREL is not set\n# CONFIG_NET_VENDOR_MICROCHIP is not set\nCONFIG_NET_VENDOR_MICROSEMI=y\n# CONFIG_NET_VENDOR_MYRI is not set\n# CONFIG_FEALNX is not set\n# CONFIG_NET_VENDOR_NATSEMI is not set\nCONFIG_NET_VENDOR_NETERION=y\n# CONFIG_S2IO is not set\n# CONFIG_VXGE is not set\nCONFIG_NET_VENDOR_NETRONOME=y\n# CONFIG_NFP is not set\nCONFIG_NET_VENDOR_NI=y\n# CONFIG_NET_VENDOR_NVIDIA is not set\n# CONFIG_NET_VENDOR_OKI is not set\n# CONFIG_ETHOC is not set\nCONFIG_NET_VENDOR_PACKET_ENGINES=y\n# CONFIG_HAMACHI is not set\n# CONFIG_YELLOWFIN is not set\n# CONFIG_NET_VENDOR_QLOGIC is not set\n# CONFIG_NET_VENDOR_QUALCOMM is not set\n# CONFIG_NET_VENDOR_RDC is not set\n# CONFIG_NET_VENDOR_REALTEK is not set\n# CONFIG_NET_VENDOR_RENESAS is not set\n# CONFIG_NET_VENDOR_ROCKER is not set\n# CONFIG_NET_VENDOR_SAMSUNG is not set\n# CONFIG_NET_VENDOR_SEEQ is not set\nCONFIG_NET_VENDOR_SOLARFLARE=y\n# CONFIG_SFC is not set\n# CONFIG_SFC_FALCON is not set\n# CONFIG_NET_VENDOR_SILAN is not set\n# CONFIG_NET_VENDOR_SIS is not set\n# CONFIG_NET_VENDOR_SMSC is not set\nCONFIG_NET_VENDOR_SOCIONEXT=y\nCONFIG_NET_VENDOR_STMICRO=y\nCONFIG_STMMAC_ETH=y\nCONFIG_STMMAC_ETHTOOL=y\nCONFIG_STMMAC_FULL=y\nCONFIG_STMMAC_PTP=y\nCONFIG_STMMAC_PLATFORM=y\n# CONFIG_DWMAC_DWC_QOS_ETH is not set\nCONFIG_DWMAC_GENERIC=y\nCONFIG_DWMAC_ROCKCHIP=y\nCONFIG_DWMAC_ROCKCHIP_TOOL=y\n# CONFIG_STMMAC_PCI is not set\n# CONFIG_NET_VENDOR_SUN is not set\n# CONFIG_NET_VENDOR_SYNOPSYS is not set\n# CONFIG_NET_VENDOR_TEHUTI is not set\n# CONFIG_NET_VENDOR_TI is not set\n# CONFIG_NET_VENDOR_VIA is not set\n# CONFIG_NET_VENDOR_WIZNET is not set\n# CONFIG_FDDI is not set\n# CONFIG_HIPPI is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\n# CONFIG_MDIO_BCM_UNIMAC is not set\n# CONFIG_MDIO_BITBANG is not set\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_OCTEON is not set\n# CONFIG_MDIO_THUNDER is not set\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\n# CONFIG_AX88796B_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MICREL_PHY is not set\n# CONFIG_MICROCHIP_PHY is not set\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_QSEMI_PHY is not set\n# CONFIG_REALTEK_PHY is not set\n# CONFIG_RENESAS_PHY is not set\nCONFIG_ROCKCHIP_PHY=y\n# CONFIG_SMSC_PHY is not set\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\n# CONFIG_PPP is not set\n# CONFIG_SLIP is not set\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\n# CONFIG_USB_PEGASUS is not set\nCONFIG_USB_RTL8150=y\nCONFIG_USB_RTL8152=y\n# CONFIG_USB_LAN78XX is not set\nCONFIG_USB_USBNET=y\nCONFIG_USB_NET_AX8817X=y\nCONFIG_USB_NET_AX88179_178A=y\nCONFIG_USB_NET_CDCETHER=y\n# CONFIG_USB_NET_CDC_EEM is not set\nCONFIG_USB_NET_CDC_NCM=y\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\nCONFIG_USB_NET_CDC_MBIM=y\n# CONFIG_USB_NET_DM9601 is not set\n# CONFIG_USB_NET_SR9700 is not set\n# CONFIG_USB_NET_SR9800 is not set\n# CONFIG_USB_NET_SMSC75XX is not set\n# CONFIG_USB_NET_SMSC95XX is not set\n# CONFIG_USB_NET_GL620A is not set\n# CONFIG_USB_NET_NET1080 is not set\n# CONFIG_USB_NET_PLUSB is not set\n# CONFIG_USB_NET_MCS7830 is not set\nCONFIG_USB_NET_RNDIS_HOST=y\n# CONFIG_USB_NET_CDC_SUBSET is not set\n# CONFIG_USB_NET_ZAURUS is not set\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\nCONFIG_USB_NET_QMI_WWAN=y\n# CONFIG_USB_HSO is not set\n# CONFIG_USB_NET_INT51X1 is not set\n# CONFIG_USB_IPHETH is not set\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\nCONFIG_WLAN=y\n# CONFIG_WIRELESS_WDS is not set\nCONFIG_WLAN_VENDOR_ADMTEK=y\n# CONFIG_ADM8211 is not set\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\n# CONFIG_ATH5K is not set\n# CONFIG_ATH5K_PCI is not set\n# CONFIG_ATH9K is not set\n# CONFIG_ATH9K_HTC is not set\n# CONFIG_CARL9170 is not set\n# CONFIG_ATH6KL is not set\n# CONFIG_AR5523 is not set\n# CONFIG_WIL6210 is not set\n# CONFIG_ATH10K is not set\n# CONFIG_WCN36XX is not set\nCONFIG_WLAN_VENDOR_ATMEL=y\n# CONFIG_ATMEL is not set\n# CONFIG_AT76C50X_USB is not set\nCONFIG_WLAN_VENDOR_BROADCOM=y\n# CONFIG_B43 is not set\n# CONFIG_B43LEGACY is not set\n# CONFIG_BRCMSMAC is not set\n# CONFIG_BRCMFMAC is not set\nCONFIG_WLAN_VENDOR_CISCO=y\nCONFIG_WLAN_VENDOR_INTEL=y\n# CONFIG_IPW2100 is not set\n# CONFIG_IPW2200 is not set\n# CONFIG_IWL4965 is not set\n# CONFIG_IWL3945 is not set\n# CONFIG_IWLWIFI is not set\nCONFIG_WLAN_VENDOR_INTERSIL=y\n# CONFIG_HOSTAP is not set\n# CONFIG_HERMES is not set\n# CONFIG_P54_COMMON is not set\n# CONFIG_PRISM54 is not set\nCONFIG_WLAN_VENDOR_MARVELL=y\n# CONFIG_LIBERTAS is not set\nCONFIG_LIBERTAS_THINFIRM=y\n# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set\n# CONFIG_LIBERTAS_THINFIRM_USB is not set\nCONFIG_MWIFIEX=m\nCONFIG_MWIFIEX_SDIO=m\n# CONFIG_MWIFIEX_PCIE is not set\n# CONFIG_MWIFIEX_USB is not set\n# CONFIG_MWL8K is not set\nCONFIG_WLAN_VENDOR_MEDIATEK=y\n# CONFIG_MT7601U is not set\n# CONFIG_MT76x0U is not set\n# CONFIG_MT76x2E is not set\n# CONFIG_MT76x2U is not set\nCONFIG_WLAN_VENDOR_RALINK=y\n# CONFIG_RT2X00 is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\n# CONFIG_RTL8180 is not set\n# CONFIG_RTL8187 is not set\nCONFIG_RTL_CARDS=y\n# CONFIG_RTL8192CE is not set\n# CONFIG_RTL8192SE is not set\n# CONFIG_RTL8192DE is not set\n# CONFIG_RTL8723AE is not set\n# CONFIG_RTL8723BE is not set\n# CONFIG_RTL8188EE is not set\n# CONFIG_RTL8192EE is not set\n# CONFIG_RTL8821AE is not set\n# CONFIG_RTL8192CU is not set\n# CONFIG_RTL8XXXU is not set\nCONFIG_WLAN_VENDOR_RSI=y\n# CONFIG_RSI_91X is not set\nCONFIG_WLAN_VENDOR_ST=y\n# CONFIG_CW1200 is not set\nCONFIG_WLAN_VENDOR_TI=y\n# CONFIG_WL1251 is not set\n# CONFIG_WL12XX is not set\n# CONFIG_WL18XX is not set\n# CONFIG_WLCORE is not set\nCONFIG_WLAN_VENDOR_ZYDAS=y\n# CONFIG_USB_ZD1201 is not set\n# CONFIG_ZD1211RW is not set\nCONFIG_WLAN_VENDOR_QUANTENNA=y\n# CONFIG_QTNFMAC_PEARL_PCIE is not set\nCONFIG_WL_ROCKCHIP=y\n# CONFIG_WIFI_BUILD_MODULE is not set\nCONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP=y\n# CONFIG_WIFI_GENERATE_RANDOM_MAC_ADDR is not set\nCONFIG_BCMDHD=y\nCONFIG_AP6XXX=m\nCONFIG_AP6XXX_WIFI6=m\n# CONFIG_AP6XXX_INDEP_POWER is not set\nCONFIG_BCMDHD_FW_PATH=\"/etc/firmware/fw_bcmdhd.bin\"\nCONFIG_BCMDHD_NVRAM_PATH=\"/etc/firmware/nvram.txt\"\n# CONFIG_BCMDHD_STATIC_IF is not set\n# CONFIG_RTL_WIRELESS_SOLUTION is not set\n# CONFIG_MVL88W8977 is not set\n# CONFIG_CYW_BCMDHD is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=y\n# CONFIG_VIRT_WIFI is not set\n\n#\n# Enable WiMAX (Networking options) to see the WiMAX drivers\n#\n# CONFIG_WAN is not set\n# CONFIG_VMXNET3 is not set\n# CONFIG_LTE is not set\n# CONFIG_NETDEVSIM is not set\n# CONFIG_NET_FAILOVER is not set\n# CONFIG_ISDN is not set\n# CONFIG_NVM is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\nCONFIG_INPUT_POLLDEV=y\n# CONFIG_INPUT_SPARSEKMAP is not set\nCONFIG_INPUT_MATRIXKMAP=y\n\n#\n# Userland interfaces\n#\n# CONFIG_INPUT_MOUSEDEV is not set\n# CONFIG_INPUT_JOYDEV is not set\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\nCONFIG_KEYBOARD_ADC=y\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\n# CONFIG_KEYBOARD_ATKBD is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=y\nCONFIG_KEYBOARD_GPIO_POLLED=y\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\nCONFIG_KEYBOARD_CROS_EC=y\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\nCONFIG_INPUT_MOUSE=y\n# CONFIG_MOUSE_PS2 is not set\n# CONFIG_MOUSE_SERIAL is not set\n# CONFIG_MOUSE_APPLETOUCH is not set\n# CONFIG_MOUSE_BCM5974 is not set\nCONFIG_MOUSE_CYAPA=y\nCONFIG_MOUSE_ELAN_I2C=y\nCONFIG_MOUSE_ELAN_I2C_I2C=y\n# CONFIG_MOUSE_ELAN_I2C_SMBUS is not set\n# CONFIG_MOUSE_VSXXXAA is not set\n# CONFIG_MOUSE_GPIO is not set\n# CONFIG_MOUSE_SYNAPTICS_I2C is not set\n# CONFIG_MOUSE_SYNAPTICS_USB is not set\nCONFIG_INPUT_JOYSTICK=y\nCONFIG_JOYSTICK_ANALOG=m\nCONFIG_JOYSTICK_A3D=m\nCONFIG_JOYSTICK_ADI=m\nCONFIG_JOYSTICK_COBRA=m\nCONFIG_JOYSTICK_GF2K=m\nCONFIG_JOYSTICK_GRIP=m\nCONFIG_JOYSTICK_GRIP_MP=m\nCONFIG_JOYSTICK_GUILLEMOT=m\nCONFIG_JOYSTICK_INTERACT=m\nCONFIG_JOYSTICK_SIDEWINDER=m\nCONFIG_JOYSTICK_TMDC=m\nCONFIG_JOYSTICK_IFORCE=m\nCONFIG_JOYSTICK_IFORCE_USB=y\nCONFIG_JOYSTICK_IFORCE_232=y\nCONFIG_JOYSTICK_WARRIOR=m\nCONFIG_JOYSTICK_MAGELLAN=m\nCONFIG_JOYSTICK_SPACEORB=m\nCONFIG_JOYSTICK_SPACEBALL=m\nCONFIG_JOYSTICK_STINGER=m\nCONFIG_JOYSTICK_TWIDJOY=m\nCONFIG_JOYSTICK_ZHENHUA=m\n# CONFIG_JOYSTICK_DB9 is not set\nCONFIG_JOYSTICK_GAMECON=y\n# CONFIG_JOYSTICK_TURBOGRAFX is not set\nCONFIG_JOYSTICK_AS5011=m\nCONFIG_JOYSTICK_JOYDUMP=m\nCONFIG_JOYSTICK_XPAD=m\nCONFIG_JOYSTICK_XPAD_FF=y\nCONFIG_JOYSTICK_XPAD_LEDS=y\n# CONFIG_JOYSTICK_WALKERA0701 is not set\n# CONFIG_INPUT_TABLET is not set\nCONFIG_INPUT_TOUCHSCREEN=y\nCONFIG_TOUCHSCREEN_PROPERTIES=y\n# CONFIG_TOUCHSCREEN_ADS7846 is not set\n# CONFIG_TOUCHSCREEN_AD7877 is not set\n# CONFIG_TOUCHSCREEN_AD7879 is not set\n# CONFIG_TOUCHSCREEN_ADC is not set\n# CONFIG_TOUCHSCREEN_AR1021_I2C is not set\nCONFIG_TOUCHSCREEN_ATMEL_MXT=y\n# CONFIG_TOUCHSCREEN_ATMEL_MXT_T37 is not set\n# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_BU21013 is not set\n# CONFIG_TOUCHSCREEN_BU21029 is not set\n# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set\n# CONFIG_TOUCHSCREEN_CY8C40XX is not set\n# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set\n# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set\n# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set\n# CONFIG_TOUCHSCREEN_DYNAPRO is not set\n# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set\n# CONFIG_TOUCHSCREEN_EETI is not set\n# CONFIG_TOUCHSCREEN_EGALAX is not set\n# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set\n# CONFIG_TOUCHSCREEN_EXC3000 is not set\n# CONFIG_TOUCHSCREEN_FUJITSU is not set\n# CONFIG_TOUCHSCREEN_GOODIX is not set\n# CONFIG_TOUCHSCREEN_GSLX6801 is not set\n# CONFIG_TOUCHSCREEN_GSLX680A is not set\n# CONFIG_TOUCHSCREEN_GSLX680_D708 is not set\n# CONFIG_TOUCHSCREEN_GSLX680_PAD is not set\n# CONFIG_TOUCHSCREEN_GSLX680_VR is not set\nCONFIG_TOUCHSCREEN_GSLX680_FIREFLY=y\n# CONFIG_TOUCHSCREEN_GSL3673 is not set\n# CONFIG_TOUCHSCREEN_GSL3673_800X1280 is not set\n# CONFIG_TOUCHSCREEN_GSL3676 is not set\n# CONFIG_TOUCHSCREEN_GT9XX is not set\n# CONFIG_TOUCHSCREEN_HIDEEP is not set\n# CONFIG_TOUCHSCREEN_HYN_CST2XX is not set\n# CONFIG_TOUCHSCREEN_ILI210X is not set\n# CONFIG_TOUCHSCREEN_S6SY761 is not set\n# CONFIG_TOUCHSCREEN_GUNZE is not set\n# CONFIG_TOUCHSCREEN_EKTF2127 is not set\nCONFIG_TOUCHSCREEN_ELAN=y\n# CONFIG_TOUCHSCREEN_ELO is not set\n# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set\n# CONFIG_TOUCHSCREEN_WACOM_I2C is not set\nCONFIG_TOUCHSCREEN_WACOM_W9013=y\n# CONFIG_TOUCHSCREEN_MAX11801 is not set\n# CONFIG_TOUCHSCREEN_MCS5000 is not set\n# CONFIG_TOUCHSCREEN_MMS114 is not set\n# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set\n# CONFIG_TOUCHSCREEN_MTOUCH is not set\n# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set\n# CONFIG_TOUCHSCREEN_INEXIO is not set\n# CONFIG_TOUCHSCREEN_MK712 is not set\n# CONFIG_TOUCHSCREEN_PENMOUNT is not set\n# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set\n# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set\n# CONFIG_TOUCHSCREEN_TOUCHWIN is not set\n# CONFIG_TOUCHSCREEN_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set\nCONFIG_TOUCHSCREEN_USB_COMPOSITE=y\nCONFIG_TOUCHSCREEN_USB_EGALAX=y\nCONFIG_TOUCHSCREEN_USB_PANJIT=y\nCONFIG_TOUCHSCREEN_USB_3M=y\nCONFIG_TOUCHSCREEN_USB_ITM=y\nCONFIG_TOUCHSCREEN_USB_ETURBO=y\nCONFIG_TOUCHSCREEN_USB_GUNZE=y\nCONFIG_TOUCHSCREEN_USB_DMC_TSC10=y\nCONFIG_TOUCHSCREEN_USB_IRTOUCH=y\nCONFIG_TOUCHSCREEN_USB_IDEALTEK=y\nCONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y\nCONFIG_TOUCHSCREEN_USB_GOTOP=y\nCONFIG_TOUCHSCREEN_USB_JASTEC=y\nCONFIG_TOUCHSCREEN_USB_ELO=y\nCONFIG_TOUCHSCREEN_USB_E2I=y\nCONFIG_TOUCHSCREEN_USB_ZYTRONIC=y\nCONFIG_TOUCHSCREEN_USB_ETT_TC45USB=y\nCONFIG_TOUCHSCREEN_USB_NEXIO=y\nCONFIG_TOUCHSCREEN_USB_EASYTOUCH=y\n# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set\n# CONFIG_TOUCHSCREEN_TSC_SERIO is not set\n# CONFIG_TOUCHSCREEN_TSC2004 is not set\n# CONFIG_TOUCHSCREEN_TSC2005 is not set\n# CONFIG_TOUCHSCREEN_TSC2007 is not set\n# CONFIG_TOUCHSCREEN_RM_TS is not set\n# CONFIG_TOUCHSCREEN_SILEAD is not set\n# CONFIG_TOUCHSCREEN_SIS_I2C is not set\n# CONFIG_TOUCHSCREEN_ST1232 is not set\n# CONFIG_TOUCHSCREEN_STMFTS is not set\n# CONFIG_TOUCHSCREEN_SUR40 is not set\n# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set\n# CONFIG_TOUCHSCREEN_SX8654 is not set\n# CONFIG_TOUCHSCREEN_TPS6507X is not set\n# CONFIG_TOUCHSCREEN_ZET6223 is not set\n# CONFIG_TOUCHSCREEN_ZFORCE is not set\n# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set\n# CONFIG_TOUCHSCREEN_VTL_CT36X is not set\nCONFIG_TOUCHSCREEN_GT1X=y\n# CONFIG_TOUCHSCREEN_FTS is not set\n# CONFIG_TOUCHSCREEN_FT5436 is not set\nCONFIG_TOUCHSCREEN_HX83102=y\nCONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5=y\nCONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICETREE_SUPPORT=y\nCONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_I2C=y\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_SPI is not set\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_MT_A is not set\nCONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_MT_B=y\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_BUTTON is not set\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_PROXIMITY is not set\nCONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICE_ACCESS=y\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICE_ACCESS_API is not set\nCONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_LOADER=y\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_PLATFORM_FW_UPGRADE is not set\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_BINARY_FW_UPGRADE is not set\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_PLATFORM_TTCONFIG_UPGRADE is not set\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_MANUAL_TTCONFIG_UPGRADE is not set\n# CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEBUG_MDL is not set\nCONFIG_ROCKCHIP_REMOTECTL=y\nCONFIG_ROCKCHIP_REMOTECTL_PWM=y\n\n#\n# handle all sensors\n#\nCONFIG_SENSOR_DEVICE=y\n# CONFIG_ANGLE_DEVICE is not set\nCONFIG_GSENSOR_DEVICE=y\n# CONFIG_GS_MMA8452 is not set\n# CONFIG_STK8BAXX_ACC is not set\n# CONFIG_MPU6880_ACC is not set\n# CONFIG_MPU6500_ACC is not set\n# CONFIG_GS_KXTIK is not set\n# CONFIG_GS_KXTJ9 is not set\n# CONFIG_GS_LIS3DH is not set\n# CONFIG_GS_MMA7660 is not set\nCONFIG_GS_MC3230=y\n# CONFIG_GS_SC7660 is not set\n# CONFIG_GS_SC7A20 is not set\n# CONFIG_GS_SC7A30 is not set\n# CONFIG_GS_MXC6225 is not set\n# CONFIG_GS_MXC6655XA is not set\n# CONFIG_GS_DMT10 is not set\n# CONFIG_GS_LSM303D is not set\n# CONFIG_GS_BMA023 is not set\n# CONFIG_LSM330_ACC is not set\n# CONFIG_BMA2XX_ACC is not set\n# CONFIG_GS_DA215S is not set\n# CONFIG_GS_DA223 is not set\n# CONFIG_GS_DA228E is not set\n# CONFIG_ICM2060X_ACC is not set\n# CONFIG_COMPASS_DEVICE is not set\n# CONFIG_GYROSCOPE_DEVICE is not set\n# CONFIG_LIGHT_DEVICE is not set\n# CONFIG_PROXIMITY_DEVICE is not set\n# CONFIG_TEMPERATURE_DEVICE is not set\n# CONFIG_PRESSURE_DEVICE is not set\n# CONFIG_HALL_DEVICE is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GP2A is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\nCONFIG_INPUT_RK805_PWRKEY=y\n# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_SOC_BUTTON_ARRAY is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\n# CONFIG_RMI4_CORE is not set\n\n#\n# Hardware I/O ports\n#\n# CONFIG_SERIO is not set\n# CONFIG_GAMEPORT is not set\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\n# CONFIG_LEGACY_PTYS is not set\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_NOZOMI is not set\n# CONFIG_N_GSM is not set\n# CONFIG_TRACE_SINK is not set\nCONFIG_LDISC_AUTOLOAD=y\nCONFIG_DEVMEM=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\nCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y\n# CONFIG_SERIAL_8250_FINTEK is not set\nCONFIG_SERIAL_8250_CONSOLE=y\nCONFIG_SERIAL_8250_DMA=y\n# CONFIG_SERIAL_8250_PCI is not set\nCONFIG_SERIAL_8250_NR_UARTS=10\nCONFIG_SERIAL_8250_RUNTIME_UARTS=10\n# CONFIG_SERIAL_8250_EXTENDED is not set\n# CONFIG_SERIAL_8250_ASPEED_VUART is not set\nCONFIG_SERIAL_8250_FSL=y\nCONFIG_SERIAL_8250_DW=y\n# CONFIG_SERIAL_8250_RT288X is not set\n# CONFIG_SERIAL_8250_MOXA is not set\nCONFIG_SERIAL_OF_PLATFORM=y\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\n# CONFIG_SERIAL_AMBA_PL011 is not set\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_JSM is not set\n# CONFIG_SERIAL_MSM_GENI_HALF_SAMPLING is not set\n# CONFIG_SERIAL_MSM_GENI_EARLY_CONSOLE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_IFX6X60 is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_RP2 is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\nCONFIG_SERIAL_DEV_BUS=y\nCONFIG_SERIAL_DEV_CTRL_TTYPORT=y\n# CONFIG_TTY_PRINTK is not set\n# CONFIG_HVC_DCC is not set\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\nCONFIG_HW_RANDOM_CAVIUM=y\nCONFIG_HW_RANDOM_ROCKCHIP=y\n# CONFIG_APPLICOM is not set\n\n#\n# PCMCIA character devices\n#\n# CONFIG_RAW_DRIVER is not set\nCONFIG_TCG_TPM=y\nCONFIG_HW_RANDOM_TPM=y\n# CONFIG_TCG_TIS is not set\n# CONFIG_TCG_TIS_SPI is not set\n# CONFIG_TCG_TIS_I2C_ATMEL is not set\nCONFIG_TCG_TIS_I2C_INFINEON=y\n# CONFIG_TCG_TIS_I2C_NUVOTON is not set\n# CONFIG_TCG_ATMEL is not set\n# CONFIG_TCG_VTPM_PROXY is not set\n# CONFIG_TCG_TIS_ST33ZP24_I2C is not set\n# CONFIG_TCG_TIS_ST33ZP24_SPI is not set\nCONFIG_DEVPORT=y\n# CONFIG_XILLYBUS is not set\n# CONFIG_RANDOM_TRUST_BOOTLOADER is not set\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\n# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\n# CONFIG_I2C_MUX_PINCTRL is not set\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_DEMUX_PINCTRL is not set\n# CONFIG_I2C_MUX_MLXCPLD is not set\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# PC SMBus host controller drivers\n#\n# CONFIG_I2C_ALI1535 is not set\n# CONFIG_I2C_ALI1563 is not set\n# CONFIG_I2C_ALI15X3 is not set\n# CONFIG_I2C_AMD756 is not set\n# CONFIG_I2C_AMD8111 is not set\n# CONFIG_I2C_I801 is not set\n# CONFIG_I2C_ISCH is not set\n# CONFIG_I2C_PIIX4 is not set\n# CONFIG_I2C_NFORCE2 is not set\n# CONFIG_I2C_SIS5595 is not set\n# CONFIG_I2C_SIS630 is not set\n# CONFIG_I2C_SIS96X is not set\n# CONFIG_I2C_VIA is not set\n# CONFIG_I2C_VIAPRO is not set\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CADENCE is not set\n# CONFIG_I2C_CBUS_GPIO is not set\n# CONFIG_I2C_DESIGNWARE_PLATFORM is not set\n# CONFIG_I2C_DESIGNWARE_PCI is not set\n# CONFIG_I2C_EMEV2 is not set\n# CONFIG_I2C_GPIO is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\nCONFIG_I2C_RK3X=y\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_THUNDERX is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_PARPORT_LIGHT is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\nCONFIG_I2C_CROS_EC_TUNNEL=y\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\n# CONFIG_SPI_MEM is not set\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\nCONFIG_SPI_BITBANG=y\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_GPIO is not set\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_OC_TINY is not set\n# CONFIG_SPI_PL022 is not set\n# CONFIG_SPI_PXA2XX is not set\nCONFIG_SPI_ROCKCHIP=y\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_THUNDERX is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n\n#\n# SPI Protocol Masters\n#\nCONFIG_SPI_SPIDEV=y\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\nCONFIG_SPI_WK2XXX=y\n# CONFIG_SPI_SLAVE is not set\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\nCONFIG_PPS=y\n# CONFIG_PPS_DEBUG is not set\n\n#\n# PPS clients support\n#\n# CONFIG_PPS_CLIENT_KTIMER is not set\n# CONFIG_PPS_CLIENT_LDISC is not set\n# CONFIG_PPS_CLIENT_GPIO is not set\n\n#\n# PPS generators support\n#\n\n#\n# PTP clock support\n#\nCONFIG_PTP_1588_CLOCK=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\nCONFIG_PINCTRL=y\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\nCONFIG_GENERIC_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_AMD is not set\n# CONFIG_PINCTRL_MCP23S08 is not set\nCONFIG_PINCTRL_ROCKCHIP=y\n# CONFIG_PINCTRL_SINGLE is not set\n# CONFIG_PINCTRL_SX150X is not set\nCONFIG_PINCTRL_RK805=y\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_GPIOLIB_IRQCHIP=y\n# CONFIG_DEBUG_GPIO is not set\nCONFIG_GPIO_SYSFS=y\nCONFIG_GPIO_GENERIC=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_DWAPB is not set\n# CONFIG_GPIO_FTGPIO010 is not set\nCONFIG_GPIO_GENERIC_PLATFORM=y\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_MB86S7X is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_PL061 is not set\nCONFIG_GPIO_ROCKCHIP=y\n# CONFIG_GPIO_SYSCON is not set\n# CONFIG_GPIO_XGENE is not set\n# CONFIG_GPIO_XILINX is not set\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADP5588 is not set\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\nCONFIG_GPIO_PCA953X=y\n# CONFIG_GPIO_PCA953X_IRQ is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n\n#\n# MFD GPIO expanders\n#\n# CONFIG_GPIO_TPS6586X is not set\n\n#\n# PCI GPIO expanders\n#\n# CONFIG_GPIO_BT8XX is not set\n# CONFIG_GPIO_PCI_IDIO_16 is not set\n# CONFIG_GPIO_PCIE_IDIO_24 is not set\n# CONFIG_GPIO_RDC321X is not set\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n\n#\n# USB GPIO expanders\n#\n# CONFIG_W1 is not set\nCONFIG_POWER_AVS=y\nCONFIG_ROCKCHIP_IODOMAIN=y\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_BRCMSTB is not set\nCONFIG_POWER_RESET_GPIO=y\nCONFIG_POWER_RESET_GPIO_RESTART=y\n# CONFIG_POWER_RESET_LTC2952 is not set\n# CONFIG_POWER_RESET_RESTART is not set\n# CONFIG_POWER_RESET_XGENE is not set\n# CONFIG_POWER_RESET_SYSCON is not set\n# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set\nCONFIG_REBOOT_MODE=y\nCONFIG_SYSCON_REBOOT_MODE=y\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_LEGO_EV3 is not set\nCONFIG_BATTERY_SBS=y\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\n# CONFIG_BATTERY_MAX17040 is not set\n# CONFIG_BATTERY_MAX17042 is not set\n# CONFIG_CHARGER_ISP1704 is not set\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\nCONFIG_CHARGER_GPIO=y\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LTC3651 is not set\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\nCONFIG_CHARGER_BQ24735=y\n# CONFIG_CHARGER_BQ25700 is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_SMB347 is not set\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_CROS_USBPD is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_RK816 is not set\nCONFIG_BATTERY_RK817=y\nCONFIG_CHARGER_RK817=y\n# CONFIG_BATTERY_RK818 is not set\n# CONFIG_CHARGER_RK818 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1021 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_ARM_SCMI is not set\n# CONFIG_SENSORS_ASPEED is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_I5K_AMB is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\n# CONFIG_SENSORS_GPIO_FAN is not set\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IIO_HWMON is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6642 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\n# CONFIG_SENSORS_LM90 is not set\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\n# CONFIG_SENSORS_NTC_THERMISTOR is not set\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\n# CONFIG_SENSORS_PWM_FAN is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_SIS5595 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS1015 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\n# CONFIG_SENSORS_INA2XX is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_VIA686A is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_VT8231 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\nCONFIG_THERMAL_WRITABLE_TRIPS=y\n# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\nCONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y\nCONFIG_THERMAL_GOV_FAIR_SHARE=y\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\nCONFIG_THERMAL_GOV_POWER_ALLOCATOR=y\nCONFIG_CPU_THERMAL=y\n# CONFIG_CLOCK_THERMAL is not set\nCONFIG_DEVFREQ_THERMAL=y\n# CONFIG_THERMAL_EMULATION is not set\n# CONFIG_QORIQ_THERMAL is not set\nCONFIG_ROCKCHIP_THERMAL=y\n# CONFIG_RK_VIRTUAL_THERMAL is not set\n# CONFIG_RK3368_THERMAL is not set\n\n#\n# ACPI INT340X thermal drivers\n#\n# CONFIG_GENERIC_ADC_THERMAL is not set\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\n# CONFIG_WATCHDOG_SYSFS is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_ARM_SBSA_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\nCONFIG_DW_WATCHDOG=y\n# CONFIG_MAX63XX_WATCHDOG is not set\n# CONFIG_ALIM7101_WDT is not set\n# CONFIG_I6300ESB_WDT is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# PCI-based Watchdog Cards\n#\n# CONFIG_PCIPCWATCHDOG is not set\n# CONFIG_WDTPCI is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\nCONFIG_SSB_POSSIBLE=y\n# CONFIG_SSB is not set\nCONFIG_BCMA_POSSIBLE=y\n# CONFIG_BCMA is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AXP20X_I2C is not set\nCONFIG_MFD_CROS_EC=y\n# CONFIG_MFD_CROS_EC_CHARDEV is not set\n# CONFIG_MFD_MADERA is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_LPC_ICH is not set\n# CONFIG_LPC_SCH is not set\n# CONFIG_MFD_JANZ_CMODIO is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\n# CONFIG_MFD_MAX14577 is not set\n# CONFIG_MFD_MAX77620 is not set\n# CONFIG_MFD_MAX77686 is not set\n# CONFIG_MFD_MAX77693 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\n# CONFIG_MFD_MAX8997 is not set\n# CONFIG_MFD_MAX8998 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_RDC321X is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_RK618 is not set\n# CONFIG_MFD_RK628 is not set\n# CONFIG_MFD_RK630 is not set\n# CONFIG_MFD_RK630_I2C is not set\n# CONFIG_MFD_RK630_SPI is not set\nCONFIG_MFD_RK808=y\n# CONFIG_MFD_RK1000 is not set\n# CONFIG_MFD_RN5T618 is not set\n# CONFIG_MFD_SEC_CORE is not set\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_SMSC is not set\n# CONFIG_ABX500_CORE is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\n# CONFIG_MFD_TPS65090 is not set\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\nCONFIG_MFD_TPS6586X=y\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_MFD_TPS80031 is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_VX855 is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\n# CONFIG_MFD_WM8994 is not set\n# CONFIG_MFD_ROHM_BD718XX is not set\n# CONFIG_RAVE_SP_CORE is not set\nCONFIG_FUSB_30X=y\nCONFIG_REGULATOR=y\nCONFIG_REGULATOR_DEBUG=y\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_PROXY_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\nCONFIG_REGULATOR_ACT8865=y\n# CONFIG_REGULATOR_AD5398 is not set\n# CONFIG_REGULATOR_ANATOP is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\nCONFIG_REGULATOR_FAN53555=y\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\nCONFIG_REGULATOR_LP8752=y\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8952 is not set\n# CONFIG_REGULATOR_MAX8973 is not set\nCONFIG_REGULATOR_MP8865=y\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\nCONFIG_REGULATOR_PWM=y\nCONFIG_REGULATOR_RK808=y\n# CONFIG_REGULATOR_RK860X is not set\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS549B22 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\nCONFIG_REGULATOR_TPS65132=y\n# CONFIG_REGULATOR_TPS6524X is not set\nCONFIG_REGULATOR_TPS6586X=y\n# CONFIG_REGULATOR_VCTRL is not set\nCONFIG_REGULATOR_XZ3216=y\n# CONFIG_REGULATOR_DIO5632 is not set\nCONFIG_CEC_CORE=y\nCONFIG_CEC_NOTIFIER=y\n# CONFIG_RC_CORE is not set\nCONFIG_MEDIA_SUPPORT=y\n\n#\n# Multimedia core support\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\n# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set\n# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set\n# CONFIG_MEDIA_RADIO_SUPPORT is not set\n# CONFIG_MEDIA_SDR_SUPPORT is not set\nCONFIG_MEDIA_CEC_SUPPORT=y\nCONFIG_MEDIA_CONTROLLER=y\nCONFIG_VIDEO_DEV=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\nCONFIG_VIDEO_V4L2=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\n# CONFIG_VIDEO_PCI_SKELETON is not set\nCONFIG_V4L2_MEM2MEM_DEV=y\n# CONFIG_V4L2_FLASH_LED_CLASS is not set\nCONFIG_V4L2_FWNODE=y\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\nCONFIG_USB_VIDEO_CLASS=y\n# CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV is not set\n# CONFIG_USB_GSPCA is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_VIDEO_CPIA2 is not set\n# CONFIG_USB_ZR364XX is not set\n# CONFIG_USB_STKWEBCAM is not set\n# CONFIG_USB_S2255 is not set\n# CONFIG_VIDEO_USBTV is not set\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\n# CONFIG_VIDEO_EM28XX is not set\n\n#\n# USB HDMI CEC adapters\n#\n# CONFIG_USB_PULSE8_CEC is not set\n# CONFIG_USB_RAINSHADOW_CEC is not set\n# CONFIG_MEDIA_PCI_SUPPORT is not set\nCONFIG_V4L_PLATFORM_DRIVERS=y\n# CONFIG_VIDEO_CAFE_CCIC is not set\n# CONFIG_VIDEO_CADENCE is not set\n# CONFIG_VIDEO_MUX is not set\nCONFIG_SOC_CAMERA=y\n# CONFIG_SOC_CAMERA_PLATFORM is not set\n# CONFIG_VIDEO_XILINX is not set\nCONFIG_VIDEO_ROCKCHIP_CIF=y\nCONFIG_ROCKCHIP_CIF_WORKMODE_PINGPONG=y\n# CONFIG_ROCKCHIP_CIF_WORKMODE_ONEFRAME is not set\nCONFIG_ROCKCHIP_CIF_USE_DUMMY_BUF=y\n# CONFIG_ROCKCHIP_CIF_USE_NONE_DUMMY_BUF is not set\nCONFIG_VIDEO_ROCKCHIP_ISP1=y\nCONFIG_VIDEO_ROCKCHIP_ISP=y\nCONFIG_VIDEO_ROCKCHIP_ISP_VERSION_V1X=y\n# CONFIG_VIDEO_ROCKCHIP_ISP_VERSION_V20 is not set\nCONFIG_VIDEO_ROCKCHIP_ISP_VERSION_V21=y\n# CONFIG_VIDEO_ROCKCHIP_ISPP is not set\nCONFIG_V4L_MEM2MEM_DRIVERS=y\n# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set\n# CONFIG_VIDEO_SH_VEU is not set\nCONFIG_VIDEO_ROCKCHIP_RGA=y\n# CONFIG_V4L_TEST_DRIVERS is not set\n# CONFIG_CEC_PLATFORM_DRIVERS is not set\n\n#\n# Supported MMC/SDIO adapters\n#\n# CONFIG_CYPRESS_FIRMWARE is not set\nCONFIG_VIDEOBUF2_CORE=y\nCONFIG_VIDEOBUF2_V4L2=y\nCONFIG_VIDEOBUF2_MEMOPS=y\nCONFIG_VIDEOBUF2_DMA_CONTIG=y\nCONFIG_VIDEOBUF2_VMALLOC=y\nCONFIG_VIDEOBUF2_DMA_SG=y\n\n#\n# Media ancillary drivers (tuners, sensors, i2c, spi, frontends)\n#\n# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set\n\n#\n# I2C Encoders, decoders, sensors and other helper chips\n#\n\n#\n# Audio decoders, processors and mixers\n#\n# CONFIG_VIDEO_TVAUDIO is not set\n# CONFIG_VIDEO_TDA7432 is not set\n# CONFIG_VIDEO_TDA9840 is not set\n# CONFIG_VIDEO_TDA1997X is not set\n# CONFIG_VIDEO_TEA6415C is not set\n# CONFIG_VIDEO_TEA6420 is not set\n# CONFIG_VIDEO_MSP3400 is not set\n# CONFIG_VIDEO_CS3308 is not set\n# CONFIG_VIDEO_CS5345 is not set\n# CONFIG_VIDEO_CS53L32A is not set\n# CONFIG_VIDEO_TLV320AIC23B is not set\n# CONFIG_VIDEO_UDA1342 is not set\n# CONFIG_VIDEO_WM8775 is not set\n# CONFIG_VIDEO_WM8739 is not set\n# CONFIG_VIDEO_VP27SMPX is not set\n# CONFIG_VIDEO_SONY_BTF_MPX is not set\n\n#\n# RDS decoders\n#\n# CONFIG_VIDEO_SAA6588 is not set\n\n#\n# Video decoders\n#\n# CONFIG_VIDEO_ADV7180 is not set\n# CONFIG_VIDEO_ADV7183 is not set\n# CONFIG_VIDEO_ADV748X is not set\n# CONFIG_VIDEO_ADV7604 is not set\n# CONFIG_VIDEO_ADV7842 is not set\n# CONFIG_VIDEO_BT819 is not set\n# CONFIG_VIDEO_BT856 is not set\n# CONFIG_VIDEO_BT866 is not set\n# CONFIG_VIDEO_KS0127 is not set\n# CONFIG_VIDEO_ML86V7667 is not set\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9718 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# CONFIG_VIDEO_FP5501 is not set\n# CONFIG_VIDEO_FP5510 is not set\n# CONFIG_VIDEO_GT9760S is not set\n# CONFIG_VIDEO_VM149C is not set\n# CONFIG_VIDEO_OTP_EEPROM is not set\n# CONFIG_VIDEO_SAA7110 is not set\n# CONFIG_VIDEO_SAA711X is not set\n# CONFIG_VIDEO_TC358743 is not set\nCONFIG_VIDEO_TC35874X=y\n# CONFIG_VIDEO_RK628_CSI is not set\n# CONFIG_VIDEO_LT6911UXC is not set\n# CONFIG_VIDEO_LT8619C is not set\n# CONFIG_VIDEO_TECHPOINT is not set\n# CONFIG_VIDEO_TVP514X is not set\n# CONFIG_VIDEO_TVP5150 is not set\n# CONFIG_VIDEO_TVP7002 is not set\n# CONFIG_VIDEO_TW2804 is not set\n# CONFIG_VIDEO_TW9903 is not set\n# CONFIG_VIDEO_TW9906 is not set\n# CONFIG_VIDEO_TW9910 is not set\n# CONFIG_VIDEO_VPX3220 is not set\n\n#\n# Video and audio decoders\n#\n# CONFIG_VIDEO_SAA717X is not set\n# CONFIG_VIDEO_CX25840 is not set\n\n#\n# Video encoders\n#\n# CONFIG_VIDEO_SAA7127 is not set\n# CONFIG_VIDEO_SAA7185 is not set\n# CONFIG_VIDEO_ADV7170 is not set\n# CONFIG_VIDEO_ADV7175 is not set\n# CONFIG_VIDEO_ADV7343 is not set\n# CONFIG_VIDEO_ADV7393 is not set\n# CONFIG_VIDEO_ADV7511 is not set\n# CONFIG_VIDEO_AD9389B is not set\n# CONFIG_VIDEO_AK881X is not set\n# CONFIG_VIDEO_THS8200 is not set\n\n#\n# Camera sensor devices\n#\n# CONFIG_VIDEO_IMX178 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX307 is not set\n# CONFIG_VIDEO_IMX317 is not set\n# CONFIG_VIDEO_IMX323 is not set\n# CONFIG_VIDEO_IMX327 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX347 is not set\n# CONFIG_VIDEO_IMX378 is not set\n# CONFIG_VIDEO_IMX415 is not set\n# CONFIG_VIDEO_IMX462 is not set\n# CONFIG_VIDEO_IMX464 is not set\n# CONFIG_VIDEO_OS02G10 is not set\nCONFIG_VIDEO_OS04A10=y\n# CONFIG_VIDEO_OS04C10 is not set\n# CONFIG_VIDEO_OS05A20 is not set\n# CONFIG_VIDEO_OS08A10 is not set\n# CONFIG_VIDEO_OS08A20 is not set\n# CONFIG_VIDEO_OV02B10 is not set\n# CONFIG_VIDEO_OV02K10 is not set\n# CONFIG_VIDEO_OV2640 is not set\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV2718 is not set\n# CONFIG_VIDEO_OV2735 is not set\n# CONFIG_VIDEO_OV2775 is not set\n# CONFIG_VIDEO_OV4686 is not set\n# CONFIG_VIDEO_OV4688 is not set\nCONFIG_VIDEO_OV4689=y\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\nCONFIG_VIDEO_OV5695=y\n# CONFIG_VIDEO_OV6650 is not set\nCONFIG_VIDEO_OV7251=y\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7640 is not set\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV7750 is not set\n# CONFIG_VIDEO_OV8858 is not set\n# CONFIG_VIDEO_OV9281 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_OV9750 is not set\n# CONFIG_VIDEO_OV12D2Q is not set\nCONFIG_VIDEO_OV13850=y\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\n# CONFIG_VIDEO_PREISP_DUMMY_SENSOR is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\n# CONFIG_VIDEO_MT9V011 is not set\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_AR0230 is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n# CONFIG_VIDEO_RJ54N1 is not set\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_S5K6A3 is not set\n# CONFIG_VIDEO_S5KGM1SP is not set\n# CONFIG_VIDEO_S5K4H7YX is not set\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\n# CONFIG_VIDEO_SMIAPP is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_S5C73M3 is not set\n# CONFIG_VIDEO_GC02M2 is not set\n# CONFIG_VIDEO_GC0312 is not set\n# CONFIG_VIDEO_GC0329 is not set\n# CONFIG_VIDEO_GC032A is not set\n# CONFIG_VIDEO_GC0403 is not set\n# CONFIG_VIDEO_GC2035 is not set\nCONFIG_VIDEO_GC2053=y\nCONFIG_VIDEO_GC2093=y\n# CONFIG_VIDEO_GC2145 is not set\n# CONFIG_VIDEO_GC2155 is not set\n# CONFIG_VIDEO_GC2355 is not set\n# CONFIG_VIDEO_GC2375H is not set\n# CONFIG_VIDEO_GC2385 is not set\n# CONFIG_VIDEO_GC4663 is not set\n# CONFIG_VIDEO_GC4C33 is not set\n# CONFIG_VIDEO_GC5024 is not set\n# CONFIG_VIDEO_GC5025 is not set\n# CONFIG_VIDEO_GC5035 is not set\nCONFIG_VIDEO_GC8034=y\n# CONFIG_VIDEO_BF3925 is not set\n# CONFIG_VIDEO_JX_F37 is not set\n# CONFIG_VIDEO_JX_H62 is not set\n# CONFIG_VIDEO_JX_H65 is not set\n# CONFIG_VIDEO_JX_K04 is not set\n# CONFIG_VIDEO_SC031GS is not set\n# CONFIG_VIDEO_SC035HGS is not set\n# CONFIG_VIDEO_SC132GS is not set\n# CONFIG_VIDEO_SC200AI is not set\n# CONFIG_VIDEO_SC210IOT is not set\n# CONFIG_VIDEO_SC2232 is not set\n# CONFIG_VIDEO_SC2239 is not set\n# CONFIG_VIDEO_SC223A is not set\n# CONFIG_VIDEO_SC2310 is not set\n# CONFIG_VIDEO_SC2335 is not set\n# CONFIG_VIDEO_SC401AI is not set\n# CONFIG_VIDEO_SC4238 is not set\n# CONFIG_VIDEO_SC430CS is not set\n# CONFIG_VIDEO_SC500AI is not set\n# CONFIG_VIDEO_SC5239 is not set\n# CONFIG_VIDEO_SC8220 is not set\n# CONFIG_VIDEO_SP250A is not set\n# CONFIG_VIDEO_HYNIX_HI556 is not set\n# CONFIG_VIDEO_HYNIX_HI846 is not set\n# CONFIG_VIDEO_HM5040 is not set\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# CONFIG_VIDEO_SGM3784 is not set\n\n#\n# Video improvement chips\n#\n# CONFIG_VIDEO_UPD64031A is not set\n# CONFIG_VIDEO_UPD64083 is not set\n\n#\n# Audio/Video compression chips\n#\n# CONFIG_VIDEO_SAA6752HS is not set\n\n#\n# SDR tuner chips\n#\n\n#\n# Miscellaneous helper chips\n#\n# CONFIG_VIDEO_THS7303 is not set\n# CONFIG_VIDEO_M52790 is not set\n# CONFIG_VIDEO_I2C is not set\n# CONFIG_VIDEO_NVP6158 is not set\n# CONFIG_VIDEO_NVP6188 is not set\n# CONFIG_VIDEO_NVP6324 is not set\n# CONFIG_VIDEO_HALL_DC_MOTOR is not set\n# CONFIG_VIDEO_RK_IRCUT is not set\n# CONFIG_VIDEO_MP6507 is not set\nCONFIG_VIDEO_XC7022=y\nCONFIG_VIDEO_XC7160=y\n\n#\n# Sensors used on soc_camera driver\n#\n\n#\n# soc_camera sensor drivers\n#\n# CONFIG_SOC_CAMERA_MT9M001 is not set\n# CONFIG_SOC_CAMERA_MT9M111 is not set\n# CONFIG_SOC_CAMERA_MT9T112 is not set\n# CONFIG_SOC_CAMERA_MT9V022 is not set\n# CONFIG_SOC_CAMERA_OV5642 is not set\n# CONFIG_SOC_CAMERA_OV772X is not set\n# CONFIG_SOC_CAMERA_OV9640 is not set\n# CONFIG_SOC_CAMERA_OV9740 is not set\n# CONFIG_SOC_CAMERA_RJ54N1 is not set\n# CONFIG_SOC_CAMERA_TW9910 is not set\n\n#\n# SPI helper chips\n#\n# CONFIG_VIDEO_GS1662 is not set\n# CONFIG_VIDEO_MS41908 is not set\n# CONFIG_VIDEO_ROCKCHIP_PREISP is not set\n\n#\n# Media SPI Adapters\n#\n\n#\n# Customise DVB Frontends\n#\n\n#\n# Tools to develop new frontends\n#\n\n#\n# Graphics support\n#\n# CONFIG_VGA_ARB is not set\nCONFIG_DRM=y\nCONFIG_DRM_DP=y\nCONFIG_DRM_EDID=y\nCONFIG_DRM_IGNORE_IOTCL_PERMIT=y\nCONFIG_DRM_MIPI_DSI=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DEBUG_MM is not set\n# CONFIG_DRM_DEBUG_SELFTEST is not set\nCONFIG_DRM_KMS_HELPER=y\nCONFIG_DRM_KMS_FB_HELPER=y\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\n# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set\nCONFIG_DRM_LOAD_EDID_FIRMWARE=y\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_GEM_CMA_HELPER=y\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_RADEON is not set\n# CONFIG_DRM_AMDGPU is not set\n\n#\n# ACP (Audio CoProcessor) Configuration\n#\n\n#\n# AMD Library routines\n#\n# CONFIG_DRM_NOUVEAU is not set\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\nCONFIG_DRM_ROCKCHIP=y\n# CONFIG_ROCKCHIP_DRM_DEBUG is not set\nCONFIG_ROCKCHIP_VOP=y\nCONFIG_ROCKCHIP_VOP2=y\nCONFIG_ROCKCHIP_PSR=y\nCONFIG_ROCKCHIP_ANALOGIX_DP=y\nCONFIG_ROCKCHIP_CDN_DP=y\nCONFIG_ROCKCHIP_DW_HDMI=y\nCONFIG_ROCKCHIP_DW_MIPI_DSI=y\nCONFIG_ROCKCHIP_INNO_HDMI=y\nCONFIG_ROCKCHIP_LVDS=y\nCONFIG_ROCKCHIP_DRM_TVE=y\nCONFIG_ROCKCHIP_RGB=y\n# CONFIG_DRM_ROCKCHIP_VVOP is not set\n# CONFIG_ROCKCHIP_EBC_DEV is not set\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_AST is not set\n# CONFIG_DRM_MGAG200 is not set\n# CONFIG_DRM_CIRRUS_QEMU is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_LVDS is not set\n# CONFIG_DRM_QXL is not set\n# CONFIG_DRM_BOCHS is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ARM_VERSATILE is not set\n# CONFIG_DRM_PANEL_LVDS is not set\nCONFIG_DRM_PANEL_SIMPLE=y\n# CONFIG_DRM_PANEL_SIMPLE_OF_ONLY is not set\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set\n# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set\n# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set\n# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set\n# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set\n# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set\n# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_DUMB_VGA_DAC is not set\n# CONFIG_DRM_LVDS_ENCODER is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NXP_PTN3460 is not set\n# CONFIG_DRM_PARADE_PS8622 is not set\n# CONFIG_DRM_RK1000_TVE is not set\n# CONFIG_DRM_SIL_SII8620 is not set\nCONFIG_DRM_SII902X=y\n# CONFIG_DRM_SII9234 is not set\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TI_TFP410 is not set\nCONFIG_DRM_ANALOGIX_DP=y\n# CONFIG_DRM_I2C_ADV7511 is not set\nCONFIG_DRM_DW_HDMI=y\n# CONFIG_DRM_DW_HDMI_AHB_AUDIO is not set\nCONFIG_DRM_DW_HDMI_I2S_AUDIO=y\nCONFIG_DRM_DW_HDMI_CEC=y\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_HISI_HIBMC is not set\n# CONFIG_DRM_HISI_KIRIN is not set\n# CONFIG_DRM_MXSFB is not set\n# CONFIG_DRM_TINYDRM is not set\n# CONFIG_DRM_PL111 is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_MALI400=y\nCONFIG_MALI450=y\n# CONFIG_MALI470 is not set\n# CONFIG_MALI400_DEBUG is not set\n# CONFIG_MALI400_PROFILING is not set\n# CONFIG_MALI400_UMP is not set\nCONFIG_MALI_DMA_BUF_MAP_ON_ATTACH=y\nCONFIG_MALI_SHARED_INTERRUPTS=y\n# CONFIG_MALI_PMU_PARALLEL_POWER_UP is not set\nCONFIG_MALI_DT=y\nCONFIG_MALI_DEVFREQ=y\n# CONFIG_MALI_QUIET is not set\nCONFIG_MALI_MIDGARD=y\n# CONFIG_MALI_GATOR_SUPPORT is not set\n# CONFIG_MALI_MIDGARD_ENABLE_TRACE is not set\n# CONFIG_MALI_DMA_FENCE is not set\nCONFIG_MALI_EXPERT=y\n# CONFIG_MALI_CORESTACK is not set\n# CONFIG_MALI_PRFCNT_SET_SECONDARY is not set\n# CONFIG_MALI_PLATFORM_FAKE is not set\n# CONFIG_MALI_PLATFORM_DEVICETREE is not set\nCONFIG_MALI_PLATFORM_THIRDPARTY=y\nCONFIG_MALI_PLATFORM_THIRDPARTY_NAME=\"rk\"\nCONFIG_MALI_DEBUG=y\nCONFIG_MALI_FENCE_DEBUG=y\n# CONFIG_MALI_NO_MALI is not set\n# CONFIG_MALI_TRACE_TIMELINE is not set\n# CONFIG_MALI_SYSTEM_TRACE is not set\n# CONFIG_MALI_GPU_MMU_AARCH64 is not set\nCONFIG_MALI_PWRSOFT_765=y\n# CONFIG_MALI_KUTF is not set\nCONFIG_MALI_BIFROST=y\nCONFIG_MALI_PLATFORM_NAME=\"rk\"\nCONFIG_MALI_REAL_HW=y\n\n#\n# Platform specific options\n#\nCONFIG_MALI_BIFROST_DEVFREQ=y\nCONFIG_MALI_BIFROST_GATOR_SUPPORT=y\n# CONFIG_MALI_BIFROST_ENABLE_TRACE is not set\n# CONFIG_MALI_BIFROST_DMA_FENCE is not set\n# CONFIG_MALI_ARBITER_SUPPORT is not set\n# CONFIG_MALI_DMA_BUF_MAP_ON_DEMAND is not set\n# CONFIG_MALI_DMA_BUF_LEGACY_COMPAT is not set\n# CONFIG_MALI_BIFROST_EXPERT is not set\n# CONFIG_MALI_ARBITRATION is not set\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\n# CONFIG_FB_MODE_HELPERS is not set\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_CIRRUS is not set\n# CONFIG_FB_PM2 is not set\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_CYBER2000 is not set\n# CONFIG_FB_ASILIANT is not set\n# CONFIG_FB_IMSTT is not set\n# CONFIG_FB_UVESA is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_NVIDIA is not set\n# CONFIG_FB_RIVA is not set\n# CONFIG_FB_I740 is not set\n# CONFIG_FB_MATROX is not set\n# CONFIG_FB_RADEON is not set\n# CONFIG_FB_ATY128 is not set\n# CONFIG_FB_ATY is not set\n# CONFIG_FB_S3 is not set\n# CONFIG_FB_SAVAGE is not set\n# CONFIG_FB_SIS is not set\n# CONFIG_FB_NEOMAGIC is not set\n# CONFIG_FB_KYRO is not set\n# CONFIG_FB_3DFX is not set\n# CONFIG_FB_VOODOO1 is not set\n# CONFIG_FB_VT8623 is not set\n# CONFIG_FB_TRIDENT is not set\n# CONFIG_FB_ARK is not set\n# CONFIG_FB_PM3 is not set\n# CONFIG_FB_CARMINE is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_MB862XX is not set\n# CONFIG_FB_BROADSHEET is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# CONFIG_FB_SM712 is not set\nCONFIG_BACKLIGHT_LCD_SUPPORT=y\n# CONFIG_LCD_CLASS_DEVICE is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\nCONFIG_BACKLIGHT_GENERIC=y\nCONFIG_BACKLIGHT_PWM=y\n# CONFIG_BACKLIGHT_PM8941_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\n# CONFIG_BACKLIGHT_GPIO is not set\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n\n#\n# Rockchip Misc Video driver\n#\n\n#\n# RGA\n#\n# CONFIG_ROCKCHIP_RGA is not set\nCONFIG_ROCKCHIP_RGA2=y\n# CONFIG_ROCKCHIP_RGA2_PROC_FS is not set\nCONFIG_ROCKCHIP_RGA2_DEBUG_FS=y\nCONFIG_ROCKCHIP_RGA2_DEBUGGER=y\n\n#\n# IEP\n#\n# CONFIG_IEP is not set\n# CONFIG_IEP_MMU is not set\nCONFIG_ROCKCHIP_MPP_SERVICE=y\nCONFIG_ROCKCHIP_MPP_PROC_FS=y\nCONFIG_ROCKCHIP_MPP_RKVDEC=y\nCONFIG_ROCKCHIP_MPP_RKVDEC2=y\nCONFIG_ROCKCHIP_MPP_RKVENC=y\nCONFIG_ROCKCHIP_MPP_VDPU1=y\nCONFIG_ROCKCHIP_MPP_VEPU1=y\nCONFIG_ROCKCHIP_MPP_VDPU2=y\nCONFIG_ROCKCHIP_MPP_VEPU2=y\nCONFIG_ROCKCHIP_MPP_IEP2=y\nCONFIG_ROCKCHIP_MPP_JPGDEC=y\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_DUMMY_CONSOLE_COLUMNS=80\nCONFIG_DUMMY_CONSOLE_ROWS=25\nCONFIG_FRAMEBUFFER_CONSOLE=y\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y\n# CONFIG_LOGO is not set\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_HWDEP=y\nCONFIG_SND_SEQ_DEVICE=y\nCONFIG_SND_RAWMIDI=y\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\nCONFIG_SND_HRTIMER=y\nCONFIG_SND_DYNAMIC_MINORS=y\nCONFIG_SND_MAX_CARDS=32\n# CONFIG_SND_SUPPORT_OLD_API is not set\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\n# CONFIG_SND_DEBUG is not set\nCONFIG_SND_SEQUENCER=y\nCONFIG_SND_SEQ_DUMMY=y\nCONFIG_SND_SEQ_HRTIMER_DEFAULT=y\nCONFIG_SND_SEQ_MIDI_EVENT=y\nCONFIG_SND_SEQ_MIDI=y\nCONFIG_SND_DRIVERS=y\n# CONFIG_SND_DUMMY is not set\n# CONFIG_SND_ALOOP is not set\n# CONFIG_SND_VIRMIDI is not set\n# CONFIG_SND_MTPAV is not set\n# CONFIG_SND_SERIAL_U16550 is not set\n# CONFIG_SND_MPU401 is not set\n# CONFIG_SND_PCI is not set\n\n#\n# HD-Audio\n#\nCONFIG_SND_HDA_PREALLOC_SIZE=64\n# CONFIG_SND_SPI is not set\nCONFIG_SND_USB=y\nCONFIG_SND_USB_AUDIO=y\n# CONFIG_SND_USB_UA101 is not set\n# CONFIG_SND_USB_CAIAQ is not set\n# CONFIG_SND_USB_6FIRE is not set\n# CONFIG_SND_USB_HIFACE is not set\n# CONFIG_SND_BCD2000 is not set\n# CONFIG_SND_USB_POD is not set\n# CONFIG_SND_USB_PODHD is not set\n# CONFIG_SND_USB_TONEPORT is not set\n# CONFIG_SND_USB_VARIAX is not set\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\nCONFIG_SND_SOC_ROCKCHIP=y\n# CONFIG_SND_SOC_ROCKCHIP_AUDIO_PWM is not set\nCONFIG_SND_SOC_ROCKCHIP_I2S=y\nCONFIG_SND_SOC_ROCKCHIP_I2S_TDM=y\nCONFIG_SND_SOC_ROCKCHIP_PDM=y\nCONFIG_SND_SOC_ROCKCHIP_SPDIF=y\n# CONFIG_SND_SOC_ROCKCHIP_VAD is not set\nCONFIG_SND_SOC_ROCKCHIP_MAX98090=y\nCONFIG_SND_SOC_ROCKCHIP_MULTICODECS=y\nCONFIG_SND_SOC_ROCKCHIP_RT5645=y\n# CONFIG_SND_SOC_ROCKCHIP_RT5651 is not set\n# CONFIG_SND_SOC_ROCKCHIP_RT5651_RK628 is not set\n# CONFIG_SND_SOC_ROCKCHIP_HDMI is not set\n# CONFIG_SND_SOC_RK3288_HDMI_ANALOG is not set\n# CONFIG_SND_SOC_RK3399_GRU_SOUND is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\n# CONFIG_ZX_TDM is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\n# CONFIG_SND_SOC_ADAU7002 is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4458 is not set\n# CONFIG_SND_SOC_AK4554 is not set\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\nCONFIG_SND_SOC_DUMMY_CODEC=y\nCONFIG_SND_SOC_HDMI_CODEC=y\n# CONFIG_SND_SOC_ES7134 is not set\nCONFIG_SND_SOC_ES7202=y\nCONFIG_SND_SOC_ES7202_MIC_MAX_CHANNELS=4\nCONFIG_SND_SOC_ES7202_I2C_BUS=1\n# CONFIG_SND_SOC_ES7210 is not set\n# CONFIG_SND_SOC_ES7241 is not set\nCONFIG_SND_SOC_ES7243E=y\n# CONFIG_SND_SOC_ES8311 is not set\nCONFIG_SND_SOC_ES8316=y\n# CONFIG_SND_SOC_ES8323 is not set\n# CONFIG_SND_SOC_ES8328_I2C is not set\n# CONFIG_SND_SOC_ES8328_SPI is not set\n# CONFIG_SND_SOC_ES8396 is not set\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\nCONFIG_SND_SOC_MAX98090=y\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98373 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM179X_SPI is not set\n# CONFIG_SND_SOC_PCM186X_I2C is not set\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK312X is not set\n# CONFIG_SND_SOC_RK3228 is not set\nCONFIG_SND_SOC_RK3308=y\nCONFIG_SND_SOC_RK3328=y\nCONFIG_SND_SOC_RK817=y\nCONFIG_SND_SOC_RK_CODEC_DIGITAL=y\nCONFIG_SND_SOC_RL6231=y\nCONFIG_SND_SOC_RT5616=y\n# CONFIG_SND_SOC_RT5631 is not set\nCONFIG_SND_SOC_RT5640=y\nCONFIG_SND_SOC_RT5645=y\nCONFIG_SND_SOC_RT5651=y\n# CONFIG_SND_SOC_SGTL5000 is not set\n# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set\n# CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set\nCONFIG_SND_SOC_SPDIF=y\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC3X is not set\nCONFIG_SND_SOC_TS3A227E=y\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731 is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8960 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\n# CONFIG_SND_SOC_ZX_AUD96P22 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\nCONFIG_SND_SIMPLE_CARD_UTILS=y\nCONFIG_SND_SIMPLE_CARD=y\n# CONFIG_SND_SIMPLE_SCU_CARD is not set\n# CONFIG_SND_AUDIO_GRAPH_CARD is not set\n# CONFIG_SND_AUDIO_GRAPH_SCU_CARD is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\nCONFIG_HID_BATTERY_STRENGTH=y\nCONFIG_HIDRAW=y\nCONFIG_UHID=y\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\n# CONFIG_HID_A4TECH is not set\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\n# CONFIG_HID_APPLE is not set\n# CONFIG_HID_APPLEIR is not set\n# CONFIG_HID_ASUS is not set\n# CONFIG_HID_AUREAL is not set\n# CONFIG_HID_BELKIN is not set\n# CONFIG_HID_BETOP_FF is not set\n# CONFIG_HID_CHERRY is not set\n# CONFIG_HID_CHICONY is not set\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CP2112 is not set\n# CONFIG_HID_CYPRESS is not set\n# CONFIG_HID_DRAGONRISE is not set\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\n# CONFIG_HID_EZKEY is not set\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_GOOGLE_HAMMER is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\n# CONFIG_HID_KYE is not set\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_GYRATION is not set\n# CONFIG_HID_ICADE is not set\n# CONFIG_HID_ITE is not set\n# CONFIG_HID_JABRA is not set\n# CONFIG_HID_TWINHAN is not set\nCONFIG_HID_KENSINGTON=y\n# CONFIG_HID_LCPOWER is not set\n# CONFIG_HID_LED is not set\n# CONFIG_HID_LENOVO is not set\n# CONFIG_HID_LOGITECH is not set\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_REDRAGON is not set\n# CONFIG_HID_MICROSOFT is not set\n# CONFIG_HID_MONTEREY is not set\nCONFIG_HID_MULTITOUCH=y\n# CONFIG_HID_NINTENDO is not set\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\n# CONFIG_HID_ORTEK is not set\n# CONFIG_HID_PANTHERLORD is not set\n# CONFIG_HID_PENMOUNT is not set\n# CONFIG_HID_PETALYNX is not set\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\n# CONFIG_HID_SAMSUNG is not set\n# CONFIG_HID_SONY is not set\n# CONFIG_HID_SPEEDLINK is not set\n# CONFIG_HID_STEAM is not set\n# CONFIG_HID_STEELSERIES is not set\n# CONFIG_HID_SUNPLUS is not set\n# CONFIG_HID_RMI is not set\n# CONFIG_HID_GREENASIA is not set\n# CONFIG_HID_SMARTJOYPLUS is not set\n# CONFIG_HID_TIVO is not set\n# CONFIG_HID_TOPSEED is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_WACOM is not set\n# CONFIG_HID_WIIMOTE is not set\n# CONFIG_HID_XINMO is not set\n# CONFIG_HID_ZEROPLUS is not set\n# CONFIG_HID_ZYDACRON is not set\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\nCONFIG_USB_HIDDEV=y\n\n#\n# I2C HID support\n#\nCONFIG_I2C_HID=y\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_PCI=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\n# CONFIG_USB_DEFAULT_PERSIST is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\nCONFIG_USB_OTG=y\n# CONFIG_USB_OTG_WHITELIST is not set\n# CONFIG_USB_OTG_BLACKLIST_HUB is not set\n# CONFIG_USB_OTG_FSM is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_MON=y\n# CONFIG_USB_WUSB_CBAF is not set\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\n# CONFIG_USB_XHCI_DBGCAP is not set\nCONFIG_USB_XHCI_PCI=y\nCONFIG_USB_XHCI_PLATFORM=y\nCONFIG_USB_EHCI_HCD=y\nCONFIG_USB_EHCI_ROOT_HUB_TT=y\nCONFIG_USB_EHCI_TT_NEWSCHED=y\nCONFIG_USB_EHCI_PCI=y\nCONFIG_USB_EHCI_HCD_PLATFORM=y\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\nCONFIG_USB_OHCI_HCD=y\n# CONFIG_USB_OHCI_HCD_PCI is not set\nCONFIG_USB_OHCI_HCD_PLATFORM=y\n# CONFIG_USB_UHCI_HCD is not set\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=y\n# CONFIG_USB_PRINTER is not set\nCONFIG_USB_WDM=y\n# CONFIG_USB_TMC is not set\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\n# CONFIG_USB_STORAGE_REALTEK is not set\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\nCONFIG_USB_UAS=y\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_MUSB_HDRC is not set\nCONFIG_USB_DWC3=y\n# CONFIG_USB_DWC3_HOST is not set\n# CONFIG_USB_DWC3_GADGET is not set\nCONFIG_USB_DWC3_DUAL_ROLE=y\n\n#\n# Platform Glue Driver Support\n#\nCONFIG_USB_DWC3_HAPS=y\nCONFIG_USB_DWC3_OF_SIMPLE=y\nCONFIG_USB_DWC3_ROCKCHIP_INNO=y\nCONFIG_USB_DWC2=y\n# CONFIG_USB_DWC2_HOST is not set\n\n#\n# Gadget/Dual-role mode requires USB Gadget support to be enabled\n#\n# CONFIG_USB_DWC2_PERIPHERAL is not set\nCONFIG_USB_DWC2_DUAL_ROLE=y\n# CONFIG_USB_DWC2_PCI is not set\n# CONFIG_USB_DWC2_DEBUG is not set\n# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set\n# CONFIG_USB_CHIPIDEA is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\nCONFIG_USB_SERIAL=y\n# CONFIG_USB_SERIAL_CONSOLE is not set\nCONFIG_USB_SERIAL_GENERIC=y\n# CONFIG_USB_SERIAL_SIMPLE is not set\n# CONFIG_USB_SERIAL_AIRCABLE is not set\n# CONFIG_USB_SERIAL_ARK3116 is not set\n# CONFIG_USB_SERIAL_BELKIN is not set\n# CONFIG_USB_SERIAL_CH341 is not set\n# CONFIG_USB_SERIAL_WHITEHEAT is not set\n# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set\nCONFIG_USB_SERIAL_CP210X=y\n# CONFIG_USB_SERIAL_CYPRESS_M8 is not set\n# CONFIG_USB_SERIAL_EMPEG is not set\nCONFIG_USB_SERIAL_FTDI_SIO=y\n# CONFIG_USB_SERIAL_VISOR is not set\n# CONFIG_USB_SERIAL_IPAQ is not set\n# CONFIG_USB_SERIAL_IR is not set\n# CONFIG_USB_SERIAL_EDGEPORT is not set\n# CONFIG_USB_SERIAL_EDGEPORT_TI is not set\n# CONFIG_USB_SERIAL_F81232 is not set\n# CONFIG_USB_SERIAL_F8153X is not set\n# CONFIG_USB_SERIAL_GARMIN is not set\n# CONFIG_USB_SERIAL_IPW is not set\n# CONFIG_USB_SERIAL_IUU is not set\n# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set\nCONFIG_USB_SERIAL_KEYSPAN=y\n# CONFIG_USB_SERIAL_KLSI is not set\n# CONFIG_USB_SERIAL_KOBIL_SCT is not set\n# CONFIG_USB_SERIAL_MCT_U232 is not set\n# CONFIG_USB_SERIAL_METRO is not set\n# CONFIG_USB_SERIAL_MOS7720 is not set\n# CONFIG_USB_SERIAL_MOS7840 is not set\n# CONFIG_USB_SERIAL_MXUPORT is not set\n# CONFIG_USB_SERIAL_NAVMAN is not set\nCONFIG_USB_SERIAL_PL2303=y\nCONFIG_USB_SERIAL_OTI6858=y\n# CONFIG_USB_SERIAL_QCAUX is not set\nCONFIG_USB_SERIAL_QUALCOMM=y\n# CONFIG_USB_SERIAL_SPCP8X5 is not set\n# CONFIG_USB_SERIAL_SAFE is not set\nCONFIG_USB_SERIAL_SIERRAWIRELESS=y\n# CONFIG_USB_SERIAL_SYMBOL is not set\n# CONFIG_USB_SERIAL_TI is not set\n# CONFIG_USB_SERIAL_CYBERJACK is not set\n# CONFIG_USB_SERIAL_XIRCOM is not set\nCONFIG_USB_SERIAL_WWAN=y\nCONFIG_USB_SERIAL_OPTION=y\n# CONFIG_USB_SERIAL_OMNINET is not set\n# CONFIG_USB_SERIAL_OPTICON is not set\n# CONFIG_USB_SERIAL_XSENS_MT is not set\n# CONFIG_USB_SERIAL_WISHBONE is not set\n# CONFIG_USB_SERIAL_SSU100 is not set\n# CONFIG_USB_SERIAL_QT2 is not set\n# CONFIG_USB_SERIAL_UPD78F0730 is not set\n# CONFIG_USB_SERIAL_DEBUG is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\nCONFIG_USB_EZUSB_FX2=y\n# CONFIG_USB_HUB_USB251XB is not set\n# CONFIG_USB_HSIC_USB3503 is not set\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n\n#\n# USB Physical Layer drivers\n#\nCONFIG_USB_PHY=y\n# CONFIG_NOP_USB_XCEIV is not set\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\n# CONFIG_USB_ULPI is not set\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\nCONFIG_USB_GADGET_DEBUG_FILES=y\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=500\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n# CONFIG_U_SERIAL_CONSOLE is not set\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\n# CONFIG_USB_SNP_UDC_PLAT is not set\n# CONFIG_USB_M66592 is not set\n# CONFIG_USB_BDC_UDC is not set\n# CONFIG_USB_AMD5536UDC is not set\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_NET2280 is not set\n# CONFIG_USB_GOKU is not set\n# CONFIG_USB_EG20T is not set\n# CONFIG_USB_GADGET_XILINX is not set\n# CONFIG_USB_DUMMY_HCD is not set\nCONFIG_USB_LIBCOMPOSITE=y\nCONFIG_USB_F_ACM=y\nCONFIG_USB_U_SERIAL=y\nCONFIG_USB_F_MASS_STORAGE=y\nCONFIG_USB_F_FS=y\nCONFIG_USB_F_UVC=y\nCONFIG_USB_CONFIGFS=y\nCONFIG_USB_CONFIGFS_UEVENT=y\n# CONFIG_USB_CONFIGFS_SERIAL is not set\nCONFIG_USB_CONFIGFS_ACM=y\n# CONFIG_USB_CONFIGFS_OBEX is not set\n# CONFIG_USB_CONFIGFS_NCM is not set\n# CONFIG_USB_CONFIGFS_ECM is not set\n# CONFIG_USB_CONFIGFS_ECM_SUBSET is not set\n# CONFIG_USB_CONFIGFS_RNDIS is not set\n# CONFIG_USB_CONFIGFS_EEM is not set\nCONFIG_USB_CONFIGFS_MASS_STORAGE=y\n# CONFIG_USB_CONFIGFS_F_LB_SS is not set\nCONFIG_USB_CONFIGFS_F_FS=y\n# CONFIG_USB_CONFIGFS_F_ACC is not set\n# CONFIG_USB_CONFIGFS_F_AUDIO_SRC is not set\n# CONFIG_USB_CONFIGFS_F_UAC1 is not set\n# CONFIG_USB_CONFIGFS_F_UAC1_LEGACY is not set\n# CONFIG_USB_CONFIGFS_F_UAC2 is not set\n# CONFIG_USB_CONFIGFS_F_MIDI is not set\n# CONFIG_USB_CONFIGFS_F_HID is not set\nCONFIG_USB_CONFIGFS_F_UVC=y\n# CONFIG_USB_CONFIGFS_F_PRINTER is not set\n# CONFIG_TYPEC is not set\n# CONFIG_USB_ROLE_SWITCH is not set\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_USB_ULPI_BUS is not set\n# CONFIG_UWB is not set\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\n# CONFIG_PWRSEQ_SD8787 is not set\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=32\n# CONFIG_SDIO_UART is not set\nCONFIG_MMC_TEST=y\nCONFIG_SDIO_KEEPALIVE=y\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_DEBUG is not set\n# CONFIG_MMC_ARMMMCI is not set\nCONFIG_MMC_SDHCI=y\n# CONFIG_MMC_SDHCI_PCI is not set\nCONFIG_MMC_SDHCI_PLTFM=y\nCONFIG_MMC_SDHCI_OF_ARASAN=y\n# CONFIG_MMC_SDHCI_OF_AT91 is not set\nCONFIG_MMC_SDHCI_OF_DWCMSHC=y\n# CONFIG_MMC_SDHCI_CADENCE is not set\n# CONFIG_MMC_SDHCI_F_SDH30 is not set\n# CONFIG_MMC_TIFM_SD is not set\n# CONFIG_MMC_SPI is not set\n# CONFIG_MMC_CB710 is not set\n# CONFIG_MMC_VIA_SDMMC is not set\nCONFIG_MMC_DW=y\nCONFIG_MMC_DW_PLTFM=y\n# CONFIG_MMC_DW_BLUEFIELD is not set\n# CONFIG_MMC_DW_EXYNOS is not set\n# CONFIG_MMC_DW_HI3798CV200 is not set\n# CONFIG_MMC_DW_K3 is not set\n# CONFIG_MMC_DW_PCI is not set\nCONFIG_MMC_DW_ROCKCHIP=y\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\nCONFIG_MMC_CQHCI=y\n# CONFIG_MMC_TOSHIBA_PCI is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_MMC_SDHCI_XENON is not set\n# CONFIG_MMC_SDHCI_OMAP is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\nCONFIG_LEDS_CLASS_FLASH=y\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AAT1290 is not set\n# CONFIG_LEDS_AS3645A is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_LM3601X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP5521 is not set\n# CONFIG_LEDS_LP5523 is not set\n# CONFIG_LEDS_LP5562 is not set\n# CONFIG_LEDS_LP8501 is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\n# CONFIG_LEDS_PWM is not set\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_KTD2692 is not set\n# CONFIG_LEDS_IS31FL319X is not set\nCONFIG_LEDS_IS31FL32XX=y\nCONFIG_LEDS_RGB13H=y\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_SYSCON is not set\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\nCONFIG_LEDS_TRIGGER_TIMER=y\n# CONFIG_LEDS_TRIGGER_ONESHOT is not set\n# CONFIG_LEDS_TRIGGER_DISK is not set\n# CONFIG_LEDS_TRIGGER_MTD is not set\n# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set\n# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set\n# CONFIG_LEDS_TRIGGER_CPU is not set\n# CONFIG_LEDS_TRIGGER_ACTIVITY is not set\n# CONFIG_LEDS_TRIGGER_GPIO is not set\n# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\n# CONFIG_LEDS_TRIGGER_TRANSIENT is not set\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\n# CONFIG_LEDS_TRIGGER_PANIC is not set\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_SUPPORT=y\n# CONFIG_EDAC is not set\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_FAKE is not set\nCONFIG_RTC_DRV_HYM8563=y\n# CONFIG_RTC_DRV_MAX6900 is not set\nCONFIG_RTC_DRV_RK808=y\n# CONFIG_RTC_DRV_RK_TIMER is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\n# CONFIG_RTC_DRV_PCF8563 is not set\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_TPS6586X is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\n# CONFIG_RTC_DRV_DS3232 is not set\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n# CONFIG_RTC_DRV_CROS_EC is not set\n\n#\n# on-CPU RTC drivers\n#\n# CONFIG_RTC_DRV_PL030 is not set\n# CONFIG_RTC_DRV_PL031 is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\n# CONFIG_RTC_DRV_SNVS is not set\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_OF=y\n# CONFIG_ALTERA_MSGDMA is not set\n# CONFIG_AMBA_PL08X is not set\n# CONFIG_DW_AXI_DMAC is not set\n# CONFIG_FSL_EDMA is not set\n# CONFIG_INTEL_IDMA64 is not set\n# CONFIG_MV_XOR_V2 is not set\nCONFIG_PL330_DMA=y\n# CONFIG_XILINX_DMA is not set\n# CONFIG_XILINX_ZYNQMP_DMA is not set\n# CONFIG_QCOM_HIDMA_MGMT is not set\n# CONFIG_QCOM_HIDMA is not set\n# CONFIG_DW_DMAC is not set\n# CONFIG_DW_DMAC_PCI is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\n\n#\n# DMABUF options\n#\nCONFIG_DMABUF_CACHE=y\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\nCONFIG_VIRTIO_MENU=y\n# CONFIG_VIRTIO_PCI is not set\n# CONFIG_VIRTIO_MMIO is not set\n\n#\n# Microsoft Hyper-V guest support\n#\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_COMEDI is not set\n# CONFIG_RTL8192U is not set\n# CONFIG_RTLLIB is not set\n# CONFIG_RTL8723BS is not set\n# CONFIG_R8712U is not set\n# CONFIG_R8188EU is not set\n# CONFIG_R8822BE is not set\n# CONFIG_RTS5208 is not set\n# CONFIG_VT6655 is not set\n# CONFIG_VT6656 is not set\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16240 is not set\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7606 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7816 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7280 is not set\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7152 is not set\n# CONFIG_AD7746 is not set\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7854 is not set\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1210 is not set\n# CONFIG_FB_SM750 is not set\n# CONFIG_FB_XGI is not set\n\n#\n# Speakup console speech\n#\n# CONFIG_SPEAKUP is not set\n# CONFIG_STAGING_MEDIA is not set\n\n#\n# Android\n#\n# CONFIG_ASHMEM is not set\n# CONFIG_ANDROID_VSOC is not set\n# CONFIG_ION is not set\nCONFIG_FIQ_DEBUGGER=y\nCONFIG_FIQ_DEBUGGER_NO_SLEEP=y\n# CONFIG_FIQ_DEBUGGER_WAKEUP_IRQ_ALWAYS_ON is not set\nCONFIG_FIQ_DEBUGGER_CONSOLE=y\nCONFIG_FIQ_DEBUGGER_CONSOLE_DEFAULT_ENABLE=y\nCONFIG_FIQ_DEBUGGER_TRUST_ZONE=y\n# CONFIG_FIQ_DEBUGGER_UART_OVERLAY is not set\nCONFIG_RK_CONSOLE_THREAD=y\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_DGNC is not set\n# CONFIG_GS_FPGABOOT is not set\n# CONFIG_UNISYSSPAR is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\n# CONFIG_MOST is not set\n# CONFIG_KS7010 is not set\n# CONFIG_GREYBUS is not set\n# CONFIG_PI433 is not set\n\n#\n# Gasket devices\n#\n# CONFIG_STAGING_GASKET_FRAMEWORK is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_EROFS_FS is not set\n# CONFIG_POWERVR_ROGUE_N is not set\n# CONFIG_GOLDFISH is not set\nCONFIG_CHROME_PLATFORMS=y\n# CONFIG_CROS_EC_I2C is not set\n# CONFIG_CROS_EC_SPI is not set\nCONFIG_CROS_EC_PROTO=y\nCONFIG_CLKDEV_LOOKUP=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Common Clock Framework\n#\nCONFIG_COMMON_CLK_DEBUGFS=y\n# CONFIG_COMMON_CLK_PROCFS is not set\n# CONFIG_COMMON_CLK_VERSATILE is not set\n# CONFIG_CLK_HSDK is not set\n# CONFIG_COMMON_CLK_MAX9485 is not set\nCONFIG_COMMON_CLK_RK808=y\nCONFIG_COMMON_CLK_SCMI=y\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\n# CONFIG_CLK_QORIQ is not set\nCONFIG_COMMON_CLK_XGENE=y\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_VC5 is not set\nCONFIG_COMMON_CLK_ROCKCHIP=y\n# CONFIG_ROCKCHIP_CLK_COMPENSATION is not set\nCONFIG_ROCKCHIP_CLK_BOOST=y\nCONFIG_ROCKCHIP_CLK_INV=y\nCONFIG_ROCKCHIP_CLK_PVTM=y\nCONFIG_ROCKCHIP_DCLK_DIV=y\n# CONFIG_ROCKCHIP_DDRCLK_SCPI is not set\nCONFIG_ROCKCHIP_DDRCLK_SIP=y\n# CONFIG_ROCKCHIP_PLL_RK3066 is not set\nCONFIG_ROCKCHIP_PLL_RK3399=y\n# CONFIG_HWSPINLOCK is not set\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\nCONFIG_CLKSRC_MMIO=y\nCONFIG_ROCKCHIP_TIMER=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y\nCONFIG_FSL_ERRATUM_A008585=y\nCONFIG_HISILICON_ERRATUM_161010101=y\nCONFIG_ARM64_ERRATUM_858921=y\n# CONFIG_ARM_TIMER_SP804 is not set\nCONFIG_MAILBOX=y\n# CONFIG_ARM_MHU is not set\n# CONFIG_PLATFORM_MHU is not set\n# CONFIG_PL320_MBOX is not set\n# CONFIG_ROCKCHIP_MBOX is not set\n# CONFIG_ALTERA_MBOX is not set\n# CONFIG_MAILBOX_TEST is not set\n# CONFIG_RK3368_MBOX is not set\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\n# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set\n# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set\n# CONFIG_IOMMU_DEBUGFS is not set\n# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set\nCONFIG_IOMMU_IOVA=y\nCONFIG_OF_IOMMU=y\nCONFIG_IOMMU_DMA=y\nCONFIG_ROCKCHIP_IOMMU=y\n# CONFIG_ARM_SMMU is not set\n# CONFIG_ARM_SMMU_V3 is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n\n#\n# Rpmsg drivers\n#\n# CONFIG_RPMSG_QCOM_GLINK_RPM is not set\n# CONFIG_RPMSG_VIRTIO is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n\n#\n# Broadcom SoC drivers\n#\n# CONFIG_SOC_BRCMSTB is not set\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n\n#\n# i.MX SoC drivers\n#\n\n#\n# Qualcomm SoC drivers\n#\n\n#\n# Rockchip CPU selection\n#\nCONFIG_CPU_PX30=y\nCONFIG_CPU_RK1808=y\n# CONFIG_CPU_RK3308 is not set\nCONFIG_CPU_RK3328=y\n# CONFIG_CPU_RK3368 is not set\nCONFIG_CPU_RK3399=y\nCONFIG_CPU_RK3568=y\nCONFIG_ANDROID_VERSION=0x08010000\nCONFIG_ROCKCHIP_CPUINFO=y\nCONFIG_ROCKCHIP_GRF=y\n# CONFIG_ROCKCHIP_HW_DECOMPRESS is not set\nCONFIG_ROCKCHIP_IPA=y\nCONFIG_ROCKCHIP_OPP=y\nCONFIG_ROCKCHIP_PM_DOMAINS=y\nCONFIG_ROCKCHIP_PVTM=y\n# CONFIG_ROCKCHIP_RAMDISK is not set\nCONFIG_ROCKCHIP_SUSPEND_MODE=y\nCONFIG_ROCKCHIP_SYSTEM_MONITOR=y\nCONFIG_ROCKCHIP_MTD_VENDOR_STORAGE=y\nCONFIG_ROCKCHIP_VENDOR_STORAGE_UPDATE_LOADER=y\nCONFIG_ROCKCHIP_DEBUG=y\n# CONFIG_ROCKCHIP_LOW_PERFORMANCE is not set\n# CONFIG_ROCKCHIP_THUNDER_BOOT is not set\nCONFIG_ROCKCHIP_SCHED_PERFORMANCE_BIAS=y\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# CONFIG_XILINX_VCU is not set\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y\nCONFIG_DEVFREQ_GOV_PERFORMANCE=y\nCONFIG_DEVFREQ_GOV_POWERSAVE=y\nCONFIG_DEVFREQ_GOV_USERSPACE=y\n# CONFIG_DEVFREQ_GOV_PASSIVE is not set\n\n#\n# DEVFREQ Drivers\n#\nCONFIG_ARM_ROCKCHIP_BUS_DEVFREQ=y\nCONFIG_ARM_ROCKCHIP_DMC_DEVFREQ=y\n# CONFIG_ARM_ROCKCHIP_DMC_DEBUG is not set\nCONFIG_PM_DEVFREQ_EVENT=y\nCONFIG_DEVFREQ_EVENT_ROCKCHIP_DFI=y\n# CONFIG_DEVFREQ_EVENT_ROCKCHIP_NOCP is not set\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_GPIO is not set\n# CONFIG_EXTCON_MAX3355 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\n# CONFIG_EXTCON_USB_GPIO is not set\n# CONFIG_EXTCON_USBC_CROS_EC is not set\nCONFIG_MEMORY=y\n# CONFIG_ARM_PL172_MPMC is not set\nCONFIG_IIO=y\nCONFIG_IIO_BUFFER=y\n# CONFIG_IIO_BUFFER_CB is not set\n# CONFIG_IIO_BUFFER_HW_CONSUMER is not set\nCONFIG_IIO_KFIFO_BUF=y\n# CONFIG_IIO_CONFIGFS is not set\nCONFIG_IIO_TRIGGER=y\nCONFIG_IIO_CONSUMERS_PER_TRIGGER=2\n# CONFIG_IIO_SW_DEVICE is not set\n# CONFIG_IIO_SW_TRIGGER is not set\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADXL345_I2C is not set\n# CONFIG_ADXL345_SPI is not set\n# CONFIG_BMA180 is not set\n# CONFIG_BMA220 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_DA280 is not set\n# CONFIG_DA311 is not set\n# CONFIG_DMARD06 is not set\n# CONFIG_DMARD09 is not set\n# CONFIG_DMARD10 is not set\n# CONFIG_IIO_CROS_EC_ACCEL_LEGACY is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MC3230 is not set\n# CONFIG_MMA7455_I2C is not set\n# CONFIG_MMA7455_SPI is not set\n# CONFIG_MMA7660 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_MXC6255 is not set\n# CONFIG_SCA3000 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7266 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7766 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD799X is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_ENVELOPE_DETECTOR is not set\n# CONFIG_HI8435 is not set\n# CONFIG_HX711 is not set\n# CONFIG_INA2XX_ADC is not set\n# CONFIG_LTC2471 is not set\n# CONFIG_LTC2485 is not set\n# CONFIG_LTC2497 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX11100 is not set\n# CONFIG_MAX1118 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MAX9611 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_NAU7802 is not set\nCONFIG_ROCKCHIP_SARADC=y\n# CONFIG_ROCKCHIP_SARADC_TEST_CHN is not set\n# CONFIG_SD_ADC_MODULATOR is not set\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC0832 is not set\n# CONFIG_TI_ADC084S021 is not set\n# CONFIG_TI_ADC12138 is not set\n# CONFIG_TI_ADC108S102 is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_TI_ADC161S626 is not set\n# CONFIG_TI_ADS1015 is not set\n# CONFIG_TI_ADS7950 is not set\n# CONFIG_TI_ADS8688 is not set\n# CONFIG_TI_TLC4541 is not set\n# CONFIG_VF610_ADC is not set\n\n#\n# Analog Front Ends\n#\n# CONFIG_IIO_RESCALE is not set\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n\n#\n# Chemical Sensors\n#\n# CONFIG_ATLAS_PH_SENSOR is not set\n# CONFIG_BME680 is not set\n# CONFIG_CCS811 is not set\n# CONFIG_IAQCORE is not set\n# CONFIG_VZ89X is not set\n# CONFIG_IIO_CROS_EC_SENSORS_CORE is not set\n\n#\n# Hid Sensor IIO Common\n#\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n\n#\n# Counters\n#\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5592R is not set\n# CONFIG_AD5593R is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_LTC2632 is not set\n# CONFIG_AD5686_SPI is not set\n# CONFIG_AD5696_I2C is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5758 is not set\n# CONFIG_AD5761 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_AD8801 is not set\n# CONFIG_DPOT_DAC is not set\n# CONFIG_DS4424 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n# CONFIG_TI_DAC082S085 is not set\n# CONFIG_TI_DAC5571 is not set\n# CONFIG_VF610_DAC is not set\n\n#\n# IIO dummy driver\n#\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_MPU3050_I2C is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n\n#\n# Health Sensors\n#\n\n#\n# Heart Rate Monitors\n#\n# CONFIG_AFE4403 is not set\n# CONFIG_AFE4404 is not set\n# CONFIG_MAX30100 is not set\n# CONFIG_MAX30102 is not set\n\n#\n# Humidity sensors\n#\n# CONFIG_AM2315 is not set\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HTS221 is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_BMI160_I2C is not set\n# CONFIG_BMI160_SPI is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_ICM42600_I2C is not set\n# CONFIG_INV_ICM42600_SPI is not set\n# CONFIG_INV_MPU6050_I2C is not set\n# CONFIG_INV_MPU6050_SPI is not set\n# CONFIG_IIO_ST_LSM6DSX is not set\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_BH1780 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM3605 is not set\n# CONFIG_CM36651 is not set\n# CONFIG_GP2AP020A00F is not set\nCONFIG_SENSORS_ISL29018=y\n# CONFIG_SENSORS_ISL29028 is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_LV0104CS is not set\n# CONFIG_MAX44000 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_SI1133 is not set\n# CONFIG_SI1145 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_ST_UVIS25 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\nCONFIG_SENSORS_TSL2563=y\nCONFIG_TSL2583=y\n# CONFIG_TSL2772 is not set\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VEML6070 is not set\n# CONFIG_VL6180 is not set\n# CONFIG_ZOPT2201 is not set\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8974 is not set\n# CONFIG_AK8975 is not set\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN_I2C is not set\n# CONFIG_BMC150_MAGN_SPI is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n\n#\n# Multiplexers\n#\n# CONFIG_IIO_MUX is not set\n\n#\n# Inclinometer sensors\n#\n\n#\n# Triggers - standalone\n#\n# CONFIG_IIO_INTERRUPT_TRIGGER is not set\nCONFIG_IIO_SYSFS_TRIGGER=y\n\n#\n# Digital potentiometers\n#\n# CONFIG_AD5272 is not set\n# CONFIG_DS1803 is not set\n# CONFIG_MAX5481 is not set\n# CONFIG_MAX5487 is not set\n# CONFIG_MCP4018 is not set\n# CONFIG_MCP4131 is not set\n# CONFIG_MCP4531 is not set\n# CONFIG_TPL0102 is not set\n\n#\n# Digital potentiostats\n#\n# CONFIG_LMP91000 is not set\n\n#\n# Pressure sensors\n#\n# CONFIG_ABP060MG is not set\n# CONFIG_BMP280 is not set\n# CONFIG_HP03 is not set\n# CONFIG_MPL115_I2C is not set\n# CONFIG_MPL115_SPI is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n# CONFIG_HP206C is not set\n# CONFIG_ZPA2326 is not set\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n\n#\n# Proximity and distance sensors\n#\n# CONFIG_ISL29501 is not set\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_RFD77402 is not set\n# CONFIG_SRF04 is not set\n# CONFIG_SX9500 is not set\n# CONFIG_SRF08 is not set\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S1200 is not set\n\n#\n# Temperature sensors\n#\n# CONFIG_MAXIM_THERMOCOUPLE is not set\n# CONFIG_MLX90614 is not set\n# CONFIG_MLX90632 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TMP007 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\n# CONFIG_NTB is not set\n# CONFIG_VME_BUS is not set\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_CROS_EC is not set\n# CONFIG_PWM_FSL_FTM is not set\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_PWM_ROCKCHIP=y\n# CONFIG_PWM_ROCKCHIP_ONESHOT is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\nCONFIG_ARM_GIC_V2M=y\nCONFIG_ARM_GIC_V3=y\nCONFIG_ARM_GIC_V3_ITS=y\nCONFIG_ARM_GIC_V3_ITS_PCI=y\nCONFIG_PARTITION_PERCPU=y\n# CONFIG_IPACK_BUS is not set\nCONFIG_ARCH_HAS_RESET_CONTROLLER=y\nCONFIG_RESET_CONTROLLER=y\nCONFIG_RESET_SCMI=y\n# CONFIG_RESET_TI_SYSCON is not set\n# CONFIG_FMC is not set\n\n#\n# PHY Subsystem\n#\nCONFIG_GENERIC_PHY=y\n# CONFIG_PHY_XGENE is not set\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_CPCAP_USB is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\nCONFIG_PHY_ROCKCHIP_CSI2_DPHY=y\nCONFIG_PHY_ROCKCHIP_DP=y\nCONFIG_PHY_ROCKCHIP_EMMC=y\n# CONFIG_PHY_ROCKCHIP_INNO_COMBPHY is not set\nCONFIG_PHY_ROCKCHIP_INNO_HDMI_PHY=y\nCONFIG_PHY_ROCKCHIP_INNO_MIPI_DPHY=y\nCONFIG_PHY_ROCKCHIP_INNO_USB2=y\nCONFIG_PHY_ROCKCHIP_INNO_USB3=y\nCONFIG_PHY_ROCKCHIP_INNO_VIDEO_COMBO_PHY=y\n# CONFIG_PHY_ROCKCHIP_INNO_VIDEO_PHY is not set\nCONFIG_PHY_ROCKCHIP_MIPI_RX=y\nCONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY=y\nCONFIG_PHY_ROCKCHIP_NANENG_EDP=y\n# CONFIG_PHY_ROCKCHIP_NANENG_USB2 is not set\nCONFIG_PHY_ROCKCHIP_PCIE=y\nCONFIG_PHY_ROCKCHIP_SNPS_PCIE3=y\nCONFIG_PHY_ROCKCHIP_TYPEC=y\nCONFIG_PHY_ROCKCHIP_USB=y\n# CONFIG_PHY_SAMSUNG_USB2 is not set\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\nCONFIG_ARM_PMU=y\n# CONFIG_ARM_DSU_PMU is not set\n# CONFIG_ARM_SPE_PMU is not set\nCONFIG_RAS=y\n\n#\n# Android\n#\nCONFIG_ANDROID=y\n# CONFIG_ANDROID_BINDER_IPC is not set\n# CONFIG_LIBNVDIMM is not set\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\nCONFIG_ROCKCHIP_EFUSE=y\nCONFIG_ROCKCHIP_OTP=y\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\n# CONFIG_TEE is not set\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_LEGACY_ENERGY_MODEL_DT is not set\nCONFIG_RK_FLASH=y\n\n#\n# Rockchip Flash Devices\n#\n# CONFIG_RK_NANDC_NAND is not set\nCONFIG_RK_SFC_NAND=y\nCONFIG_RK_SFC_NAND_MTD=y\nCONFIG_RK_SFC_NOR=y\nCONFIG_RK_SFC_NOR_MTD=y\n# CONFIG_RK_NAND is not set\n\n#\n# Headset device support\n#\n# CONFIG_RK_HEADSET is not set\n\n#\n# RKNPU\n#\nCONFIG_ROCKCHIP_RKNPU=y\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_ENCRYPTION is not set\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\n# CONFIG_REISERFS_FS is not set\n# CONFIG_JFS_FS is not set\nCONFIG_XFS_FS=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\n# CONFIG_BTRFS_FS is not set\n# CONFIG_NILFS2_FS is not set\n# CONFIG_F2FS_FS is not set\n# CONFIG_FS_DAX is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\nCONFIG_MANDATORY_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\n# CONFIG_DNOTIFY is not set\nCONFIG_INOTIFY_USER=y\n# CONFIG_FANOTIFY is not set\n# CONFIG_QUOTA is not set\n# CONFIG_AUTOFS4_FS is not set\n# CONFIG_AUTOFS_FS is not set\nCONFIG_FUSE_FS=y\n# CONFIG_CUSE is not set\nCONFIG_OVERLAY_FS=y\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_XINO_AUTO is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n# CONFIG_INCREMENTAL_FS is not set\n\n#\n# Caches\n#\n# CONFIG_FSCACHE is not set\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\n# CONFIG_UDF_FS is not set\n\n#\n# DOS/FAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=936\nCONFIG_FAT_DEFAULT_IOCHARSET=\"utf8\"\nCONFIG_FAT_DEFAULT_UTF8=y\nCONFIG_EXFAT_FS=y\nCONFIG_EXFAT_DEFAULT_CODEPAGE=936\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\nCONFIG_EXFAT_VIRTUAL_XATTR=y\nCONFIG_EXFAT_VIRTUAL_XATTR_SELINUX_LABEL=\"u:object_r:exfat:s0\"\n# CONFIG_EXFAT_DEBUG is not set\n# CONFIG_EXFAT_UEVENT is not set\n# CONFIG_NTFS_FS is not set\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\n# CONFIG_PROC_KCORE is not set\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\n# CONFIG_PROC_UID is not set\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\n# CONFIG_HUGETLBFS is not set\nCONFIG_MEMFD_CREATE=y\nCONFIG_ARCH_HAS_GIGANTIC_PAGE=y\nCONFIG_CONFIGFS_FS=y\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\n# CONFIG_SDCARD_FS is not set\n# CONFIG_HFS_FS is not set\n# CONFIG_HFSPLUS_FS is not set\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\nCONFIG_JFFS2_FS=y\nCONFIG_JFFS2_FS_DEBUG=0\nCONFIG_JFFS2_FS_WRITEBUFFER=y\n# CONFIG_JFFS2_FS_WBUF_VERIFY is not set\n# CONFIG_JFFS2_SUMMARY is not set\n# CONFIG_JFFS2_FS_XATTR is not set\n# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set\nCONFIG_JFFS2_ZLIB=y\nCONFIG_JFFS2_RTIME=y\nCONFIG_UBIFS_FS=y\nCONFIG_UBIFS_FS_ADVANCED_COMPR=y\nCONFIG_UBIFS_FS_LZO=y\nCONFIG_UBIFS_FS_ZLIB=y\n# CONFIG_UBIFS_ATIME_SUPPORT is not set\nCONFIG_UBIFS_FS_XATTR=y\nCONFIG_UBIFS_FS_SECURITY=y\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\nCONFIG_SQUASHFS_FILE_CACHE=y\n# CONFIG_SQUASHFS_FILE_DIRECT is not set\nCONFIG_SQUASHFS_DECOMP_SINGLE=y\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\n# CONFIG_SQUASHFS_LZ4 is not set\nCONFIG_SQUASHFS_LZO=y\n# CONFIG_SQUASHFS_XZ is not set\n# CONFIG_SQUASHFS_ZSTD is not set\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\nCONFIG_PSTORE=y\nCONFIG_PSTORE_DEFLATE_COMPRESS=y\n# CONFIG_PSTORE_LZO_COMPRESS is not set\n# CONFIG_PSTORE_LZ4_COMPRESS is not set\n# CONFIG_PSTORE_LZ4HC_COMPRESS is not set\n# CONFIG_PSTORE_842_COMPRESS is not set\n# CONFIG_PSTORE_ZSTD_COMPRESS is not set\nCONFIG_PSTORE_COMPRESS=y\nCONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y\nCONFIG_PSTORE_COMPRESS_DEFAULT=\"deflate\"\nCONFIG_PSTORE_CONSOLE=y\n# CONFIG_PSTORE_CONSOLE_FORCE is not set\n# CONFIG_PSTORE_PMSG is not set\n# CONFIG_PSTORE_FTRACE is not set\nCONFIG_PSTORE_RAM=y\n# CONFIG_PSTORE_MCU_LOG is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\n# CONFIG_NFS_FS is not set\n# CONFIG_NFSD is not set\n# CONFIG_CEPH_FS is not set\n# CONFIG_CIFS is not set\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\nCONFIG_NLS_CODEPAGE_936=y\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\nCONFIG_UNICODE=y\n# CONFIG_UNICODE_NORMALIZATION_SELFTEST is not set\n\n#\n# Security options\n#\nCONFIG_KEYS=y\nCONFIG_KEYS_COMPAT=y\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_BIG_KEYS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\n# CONFIG_KEY_DH_OPERATIONS is not set\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY_PERF_EVENTS_RESTRICT is not set\n# CONFIG_SECURITY is not set\nCONFIG_SECURITYFS=y\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\n# CONFIG_TEE_SUPPORT is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_DEFAULT_SECURITY=\"\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_BLKCIPHER=y\nCONFIG_CRYPTO_BLKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_RSA=y\n# CONFIG_CRYPTO_DH is not set\nCONFIG_CRYPTO_ECDH=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\n# CONFIG_CRYPTO_USER is not set\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_WORKQUEUE=y\nCONFIG_CRYPTO_CRYPTD=y\n# CONFIG_CRYPTO_MCRYPTD is not set\n# CONFIG_CRYPTO_AUTHENC is not set\n# CONFIG_CRYPTO_TEST is not set\nCONFIG_CRYPTO_SIMD=y\n# CONFIG_CRYPTO_CURVE25519 is not set\n\n#\n# Authenticated Encryption with Associated Data\n#\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_AEGIS128L is not set\n# CONFIG_CRYPTO_AEGIS256 is not set\n# CONFIG_CRYPTO_MORUS640 is not set\n# CONFIG_CRYPTO_MORUS1280 is not set\nCONFIG_CRYPTO_SEQIV=y\n# CONFIG_CRYPTO_ECHAINIV is not set\n\n#\n# Block modes\n#\nCONFIG_CRYPTO_CBC=y\nCONFIG_CRYPTO_CFB=y\nCONFIG_CRYPTO_CTR=y\n# CONFIG_CRYPTO_CTS is not set\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_LRW is not set\n# CONFIG_CRYPTO_PCBC is not set\nCONFIG_CRYPTO_XTS=y\n# CONFIG_CRYPTO_KEYWRAP is not set\n# CONFIG_CRYPTO_ADIANTUM is not set\n\n#\n# Hash modes\n#\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_HMAC=y\n# CONFIG_CRYPTO_XCBC is not set\n# CONFIG_CRYPTO_VMAC is not set\n\n#\n# Digest\n#\nCONFIG_CRYPTO_CRC32C=y\n# CONFIG_CRYPTO_CRC32 is not set\n# CONFIG_CRYPTO_BLAKE2S is not set\nCONFIG_CRYPTO_CRCT10DIF=y\nCONFIG_CRYPTO_GHASH=y\n# CONFIG_CRYPTO_POLY1305 is not set\n# CONFIG_CRYPTO_MD4 is not set\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\n# CONFIG_CRYPTO_RMD128 is not set\n# CONFIG_CRYPTO_RMD160 is not set\n# CONFIG_CRYPTO_RMD256 is not set\n# CONFIG_CRYPTO_RMD320 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\n# CONFIG_CRYPTO_SHA3 is not set\nCONFIG_CRYPTO_SM3=y\n# CONFIG_CRYPTO_TGR192 is not set\n# CONFIG_CRYPTO_WP512 is not set\n\n#\n# Ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\nCONFIG_CRYPTO_ARC4=y\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SALSA20 is not set\n# CONFIG_CRYPTO_CHACHA20 is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\n# CONFIG_CRYPTO_SM4 is not set\n# CONFIG_CRYPTO_TEA is not set\nCONFIG_CRYPTO_TWOFISH=y\nCONFIG_CRYPTO_TWOFISH_COMMON=y\n\n#\n# Compression\n#\nCONFIG_CRYPTO_DEFLATE=y\nCONFIG_CRYPTO_LZO=y\n# CONFIG_CRYPTO_842 is not set\n# CONFIG_CRYPTO_LZ4 is not set\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n\n#\n# Random Number Generation\n#\nCONFIG_CRYPTO_ANSI_CPRNG=y\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\n# CONFIG_CRYPTO_USER_API_RNG is not set\n# CONFIG_CRYPTO_USER_API_AEAD is not set\nCONFIG_CRYPTO_HASH_INFO=y\n\n#\n# Crypto library routines\n#\n# CONFIG_CRYPTO_LIB_BLAKE2S is not set\n# CONFIG_CRYPTO_LIB_CHACHA is not set\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\n# CONFIG_CRYPTO_LIB_POLY1305 is not set\n# CONFIG_CRYPTO_LIB_CURVE25519 is not set\n# CONFIG_CRYPTO_LIB_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_HW=y\n# CONFIG_CRYPTO_DEV_CCP is not set\n# CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set\n# CONFIG_CRYPTO_DEV_CAVIUM_ZIP is not set\nCONFIG_CRYPTO_DEV_ROCKCHIP=y\n# CONFIG_CRYPTO_DEV_CCREE is not set\n# CONFIG_CRYPTO_DEV_HISI_SEC is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\nCONFIG_ARCH_HAS_FAST_MULTIPLIER=y\n# CONFIG_INDIRECT_PIO is not set\nCONFIG_CRC_CCITT=y\nCONFIG_CRC16=y\nCONFIG_CRC_T10DIF=y\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC64 is not set\n# CONFIG_CRC4 is not set\nCONFIG_CRC7=y\nCONFIG_LIBCRC32C=y\n# CONFIG_CRC8 is not set\nCONFIG_AUDIT_ARCH_COMPAT_GENERIC=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=y\nCONFIG_LZO_COMPRESS=y\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_XZ_DEC=y\n# CONFIG_XZ_DEC_X86 is not set\n# CONFIG_XZ_DEC_POWERPC is not set\n# CONFIG_XZ_DEC_IA64 is not set\nCONFIG_XZ_DEC_ARM=y\nCONFIG_XZ_DEC_ARMTHUMB=y\n# CONFIG_XZ_DEC_SPARC is not set\nCONFIG_XZ_DEC_BCJ=y\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_GZIP=y\nCONFIG_DECOMPRESS_BZIP2=y\nCONFIG_DECOMPRESS_LZMA=y\nCONFIG_DECOMPRESS_XZ=y\nCONFIG_DECOMPRESS_LZO=y\nCONFIG_DECOMPRESS_LZ4=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_REED_SOLOMON=y\nCONFIG_REED_SOLOMON_ENC8=y\nCONFIG_REED_SOLOMON_DEC8=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_ARCH_DMA_ADDR_T_64BIT=y\nCONFIG_HAVE_GENERIC_DMA_COHERENT=y\nCONFIG_DMA_DIRECT_OPS=y\nCONFIG_SWIOTLB=y\nCONFIG_SGL_ALLOC=y\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_CORDIC is not set\n# CONFIG_DDR is not set\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_FONT_SUPPORT=y\n# CONFIG_FONTS is not set\nCONFIG_FONT_8x8=y\nCONFIG_FONT_8x16=y\nCONFIG_SG_POOL=y\nCONFIG_ARCH_HAS_SG_CHAIN=y\nCONFIG_SBITMAP=y\n# CONFIG_STRING_SELFTEST is not set\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_TIME_FROM_ARM_ARCH_TIMER is not set\n# CONFIG_PRINTK_PROCESS is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_DEBUG_INFO=y\n# CONFIG_DEBUG_INFO_REDUCED is not set\n# CONFIG_DEBUG_INFO_SPLIT is not set\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_GDB_SCRIPTS is not set\nCONFIG_ENABLE_MUST_CHECK=y\nCONFIG_FRAME_WARN=2048\n# CONFIG_STRIP_ASM_SYMS is not set\n# CONFIG_READABLE_ASM is not set\n# CONFIG_UNUSED_SYMBOLS is not set\n# CONFIG_PAGE_OWNER is not set\nCONFIG_DEBUG_FS=y\n# CONFIG_HEADERS_CHECK is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\nCONFIG_ARCH_WANT_FRAME_POINTERS=y\nCONFIG_FRAME_POINTER=y\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_DEBUG_KERNEL=y\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_PAGE_REF is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_DEBUG_VM is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\n# CONFIG_DEBUG_MEMORY_INIT is not set\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_SW_TAGS=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\n# CONFIG_KASAN is not set\nCONFIG_KASAN_STACK=1\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Lockups and Hangs\n#\n# CONFIG_SOFTLOCKUP_DETECTOR is not set\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\nCONFIG_SCHED_DEBUG=y\nCONFIG_SCHED_INFO=y\nCONFIG_SCHEDSTATS=y\n# CONFIG_SCHED_STACK_END_CHECK is not set\n# CONFIG_DEBUG_TIMEKEEPING is not set\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\n# CONFIG_PROVE_LOCKING is not set\n# CONFIG_LOCK_STAT is not set\n# CONFIG_DEBUG_RT_MUTEXES is not set\nCONFIG_DEBUG_SPINLOCK=y\n# CONFIG_DEBUG_MUTEXES is not set\n# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set\n# CONFIG_DEBUG_RWSEMS is not set\n# CONFIG_DEBUG_LOCK_ALLOC is not set\n# CONFIG_DEBUG_ATOMIC_SLEEP is not set\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\nCONFIG_HAVE_DEBUG_BUGVERBOSE=y\nCONFIG_DEBUG_BUGVERBOSE=y\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PI_LIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\nCONFIG_DEBUG_CREDENTIALS=y\n\n#\n# RCU Debugging\n#\n# CONFIG_RCU_PERF_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=60\nCONFIG_RCU_TRACE=y\n# CONFIG_RCU_EQS_DEBUG is not set\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_TRACING=y\nCONFIG_GENERIC_TRACER=y\nCONFIG_TRACING_SUPPORT=y\nCONFIG_FTRACE=y\nCONFIG_FUNCTION_TRACER=y\nCONFIG_FUNCTION_GRAPH_TRACER=y\n# CONFIG_PREEMPTIRQ_EVENTS is not set\n# CONFIG_IRQSOFF_TRACER is not set\n# CONFIG_SCHED_TRACER is not set\n# CONFIG_HWLAT_TRACER is not set\n# CONFIG_FTRACE_SYSCALLS is not set\n# CONFIG_TRACER_SNAPSHOT is not set\nCONFIG_BRANCH_PROFILE_NONE=y\n# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set\n# CONFIG_PROFILE_ALL_BRANCHES is not set\n# CONFIG_STACK_TRACER is not set\nCONFIG_BLK_DEV_IO_TRACE=y\nCONFIG_UPROBE_EVENTS=y\nCONFIG_PROBE_EVENTS=y\nCONFIG_DYNAMIC_FTRACE=y\n# CONFIG_FUNCTION_PROFILER is not set\nCONFIG_FTRACE_MCOUNT_RECORD=y\n# CONFIG_FTRACE_STARTUP_TEST is not set\n# CONFIG_HIST_TRIGGERS is not set\n# CONFIG_TRACEPOINT_BENCHMARK is not set\n# CONFIG_RING_BUFFER_BENCHMARK is not set\n# CONFIG_RING_BUFFER_STARTUP_TEST is not set\n# CONFIG_PREEMPTIRQ_DELAY_TEST is not set\n# CONFIG_TRACE_EVAL_MAP_FILE is not set\nCONFIG_TRACING_EVENTS_GPIO=y\n# CONFIG_DMA_API_DEBUG is not set\nCONFIG_RUNTIME_TESTING_MENU=y\nCONFIG_LKDTM=y\n# CONFIG_TEST_LIST_SORT is not set\n# CONFIG_TEST_SORT is not set\n# CONFIG_BACKTRACE_SELF_TEST is not set\n# CONFIG_RBTREE_TEST is not set\n# CONFIG_INTERVAL_TREE_TEST is not set\n# CONFIG_PERCPU_TEST is not set\n# CONFIG_ATOMIC64_SELFTEST is not set\n# CONFIG_TEST_HEXDUMP is not set\n# CONFIG_TEST_STRING_HELPERS is not set\n# CONFIG_TEST_KSTRTOX is not set\n# CONFIG_TEST_PRINTF is not set\n# CONFIG_TEST_BITMAP is not set\n# CONFIG_TEST_BITFIELD is not set\n# CONFIG_TEST_UUID is not set\n# CONFIG_TEST_OVERFLOW is not set\n# CONFIG_TEST_RHASHTABLE is not set\n# CONFIG_TEST_HASH is not set\n# CONFIG_TEST_IDA is not set\n# CONFIG_TEST_LKM is not set\n# CONFIG_TEST_USER_COPY is not set\n# CONFIG_TEST_BPF is not set\n# CONFIG_FIND_BIT_BENCHMARK is not set\n# CONFIG_TEST_FIRMWARE is not set\n# CONFIG_TEST_SYSCTL is not set\n# CONFIG_TEST_UDELAY is not set\n# CONFIG_TEST_STATIC_KEYS is not set\n# CONFIG_TEST_KMOD is not set\n# CONFIG_TEST_MEMINIT is not set\n# CONFIG_TEST_STACKINIT is not set\n# CONFIG_MEMTEST is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_SAMPLES is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\nCONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y\n# CONFIG_UBSAN is not set\nCONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y\nCONFIG_STRICT_DEVMEM=y\n# CONFIG_IO_STRICT_DEVMEM is not set\n# CONFIG_ARM64_PTDUMP_DEBUGFS is not set\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set\n# CONFIG_DEBUG_WX is not set\n# CONFIG_DEBUG_ALIGN_RODATA is not set\n# CONFIG_ARM64_RELOC_TEST is not set\n# CONFIG_CORESIGHT is not set\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/options",
    "content": "################################################################################\n# setup device defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      aarch64)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_PATCH_ARCH=\"aarch64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a55\"\n\t\tTARGET_CPU_FLAGS=\"+crc+crypto+fp+simd\"\n        TARGET_FPU=\"fp-armv8\"\n        TARGET_FEATURES=\"64bit\"\n        ;;\n      arm)\n        TARGET_KERNEL_ARCH=\"arm64\"\n        TARGET_PATCH_ARCH=\"aarch64\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_CPU=\"cortex-a53\"\n        TARGET_CPU_FLAGS=\"+crc\"\n        TARGET_FPU=\"crypto-neon-fp-armv8\"\n        TARGET_FEATURES=\"32bit\"\n        ;;\n    esac\n\n  # Kernel target\n    KERNEL_TARGET=\"Image\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"\"\n    KERNEL_MAKE_EXTRACMD+=\" rockchip/rk3568-firefly-roc-pc.dtb\"\n    KERNEL_MAKE_EXTRACMD+=\" rockchip/rk3566-firefly-roc-pc.dtb\"\n\n    \n  # Mali GPU family\n    MALI_FAMILY=\"g52\"\n    OPENGLES=\"mali-bifrost\"\n\n  # kernel serial console\n    EXTRA_CMDLINE=\"console=ttyFIQ0,1500000 console=tty0 ssh\"\n    \n    LINUX=\"rk356x-4.19\"\n\tUBOOT_SYSTEM=\"rk356x\"\n    \n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"wlan-firmware misc-firmware\" #rockchip-firmware dvb-firmware\n    \n  # additional drivers to install:\n  # for a list of additional drivers see packages/linux-drivers\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_DRIVERS=\"DRIVER1 DRIVER2\"\n  ADDITIONAL_DRIVERS=\"RTL8812AU\" #RTL8192CU RTL8192DU RTL8192EU RTL8188EU RTL8812AU RTL8821CU\"\n  \n  # driver addons to install:\n  # for a list of additinoal drivers see packages/linux-driver-addons\n  # Space separated list is supported,\n    DRIVER_ADDONS=\"\" #dvb-latest\"\n\n  # additional packages to install\n    ADDITIONAL_PACKAGES=\"dtc:host dtc\"\n\n  # debug tty path\n    DEBUG_TTY=\"/dev/ttyFIQ0\"\n\n  # SquashFS compression method (gzip / lzo / xz / zstd)\n    SQUASHFS_COMPRESSION=\"lzo\" \n    \n  # build and install PulseAudio support (yes / no)\n  PULSEAUDIO_SUPPORT=\"yes\"\n\n  # build and install espeak support (yes / no)\n  ESPEAK_SUPPORT=\"no\"\n\n  # build and install bluetooth support (yes / no)\n  BLUETOOTH_SUPPORT=\"yes\"\n\n  # build and install Avahi (Zeroconf) daemon (yes / no)\n  AVAHI_DAEMON=\"no\"\n\n  # build with UPnP support (yes / no)\n  KODI_UPNP_SUPPORT=\"no\"\n\n  # build with NFS support (mounting nfs shares via the OS) (yes / no)\n  NFS_SUPPORT=\"no\"\n\n  # build with Samba Client support (mounting samba shares via the OS) (yes / no)\n  SAMBA_SUPPORT=\"yes\"\n\n  # build and install Samba Server (yes / no)\n  SAMBA_SERVER=\"yes\"\n\n  # build and install SFTP Server (yes / no)\n  SFTP_SERVER=\"yes\"\n\n  # build and install OpenVPN support (yes / no)\n  OPENVPN_SUPPORT=\"no\"\n\n  # build and install diskmounter support (udevil)\n  # this service provide auto mounting support for external drives in the\n  # mediacenter also automount internally drives at boottime via udev (yes / no)\n  UDEVIL=\"yes\"\n\n  # build and install exFAT fuse support (yes / no)\n  EXFAT=\"yes\"\n\n  # build and install NTFS-3G fuse support (yes / no)\n  NTFS3G=\"yes\"\n\n  # build and install hfs filesystem utilities (yes / no)\n  HFSTOOLS=\"yes\"\n\n  # build and install remote support (yes / no)\n  REMOTE_SUPPORT=\"no\"\n\n  # build and install CEC adapter support (yes / no)\n  CEC_SUPPORT=\"no\"\n\n  # build and install CEC framework support (yes / no)\n  CEC_FRAMEWORK_SUPPORT=\"no\"\n\n  # build and install iSCSI support - iscsistart (yes / no)\n  ISCSI_SUPPORT=\"no\"\n\n  # build with swap support (yes / no)\n  SWAP_SUPPORT=\"yes\"\n\n  # swap support enabled per default (yes / no)\n  SWAP_ENABLED_DEFAULT=\"no\"\n\n  # swapfile size if SWAP_SUPPORT=yes in MB\n  SWAPFILESIZE=\"300\"\n\n  # cron support (yes / no)\n  CRON_SUPPORT=\"no\"\n\n  # Distribution Specific source location\n  DISTRO_MIRROR=\"http://sources.libreelec.tv/mirror\"\n  DISTRO_SRC=\"http://sources.libreelec.tv/$LIBREELEC_VERSION\"\n\n  # Settings package name - blank if not required\n  DISTRO_PKG_SETTINGS=\"\"\n\n  # IR remote protocols supported in default config\n  IR_REMOTE_PROTOCOLS=\"\"\n\n  # IR remote keymaps supported in default config\n  IR_REMOTE_KEYMAPS=\"\"\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/packages/dtc/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"dtc\"\nPKG_VERSION=\"1.6.1\"\nPKG_SHA256=\"264d355e2e547a4964d55b83b113f89be1aea5e61dbe0547ab798d0fde2be180\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://git.kernel.org/pub/scm/utils/dtc/dtc.git/\"\nPKG_URL=\"https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_HOST=\"toolchain:host\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"The Device Tree Compiler\"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_MAKE_OPTS_TARGET=\"dtc fdtput fdtget libfdt\"\nPKG_MAKE_OPTS_HOST=\"dtc fdtput fdtget libfdt\"\n\npre_make_host() {\n  mkdir -p ${PKG_BUILD}/.${HOST_NAME}\n    cp -a ${PKG_BUILD}/* ${PKG_BUILD}/.${HOST_NAME}\n\n  cd ${PKG_BUILD}/.${HOST_NAME}\n}\n\nmakeinstall_host() {\n  mkdir -p ${TOOLCHAIN}/bin\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/dtc ${TOOLCHAIN}/bin\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/fdtput ${TOOLCHAIN}/bin\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/fdtget ${TOOLCHAIN}/bin\n  mkdir -p ${TOOLCHAIN}/lib\n    cp -P ${PKG_BUILD}/.${HOST_NAME}/libfdt/{libfdt.so,libfdt.so.1} ${TOOLCHAIN}/lib\n}\n\npre_make_target() {\n  mkdir -p ${PKG_BUILD}/.${TARGET_NAME}\n    cp -a ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}\n\n  cd ${PKG_BUILD}/.${TARGET_NAME}\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/usr/bin\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/dtc ${INSTALL}/usr/bin\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/fdtput ${INSTALL}/usr/bin/\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/fdtget ${INSTALL}/usr/bin/\n  mkdir -p ${INSTALL}/usr/lib\n    cp -P ${PKG_BUILD}/.${TARGET_NAME}/libfdt/{libfdt.so,libfdt.so.1} ${INSTALL}/usr/lib/\n}\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/packages/dtc/patches/dtc-0001-libfdt-soname-version.patch",
    "content": "diff --git a/libfdt/Makefile.libfdt b/libfdt/Makefile.libfdt\nindex e546397..dd71746 100644\n--- a/libfdt/Makefile.libfdt\n+++ b/libfdt/Makefile.libfdt\n@@ -10,7 +10,7 @@ LIBFDT_VERSION = version.lds\n LIBFDT_SRCS = fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c fdt_empty_tree.c \\\n \tfdt_addresses.c fdt_overlay.c fdt_check.c\n LIBFDT_OBJS = $(LIBFDT_SRCS:%.c=%.o)\n-LIBFDT_LIB = libfdt-$(DTC_VERSION).$(SHAREDLIB_EXT)\n+LIBFDT_LIB = libfdt.$(SHAREDLIB_EXT)\n \n libfdt_clean:\n \t@$(VECHO) CLEAN \"(libfdt)\"\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/packages/enable-oga-sleep/package.mk",
    "content": "PKG_NAME=\"enable-oga-sleep\"\nPKG_VERSION=\"\"\nPKG_SHA256=\"\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"OSS\"\nPKG_DEPENDS_TARGET=\"systemd\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_LONGDESC=\"Sleep configuration\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n\tmkdir -p $INSTALL/usr/config/sleep.conf.d\n\tcp sleep.conf $INSTALL/usr/config/sleep.conf.d/sleep.conf\n\n\tmkdir -p $INSTALL/usr/lib/systemd/system-sleep/\n\tcp sleep.sh $INSTALL/usr/lib/systemd/system-sleep/sleep\n}"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/packages/enable-oga-sleep/sources/sleep.conf",
    "content": "#  This file is part of systemd.\n#\n#  systemd is free software; you can redistribute it and/or modify it\n#  under the terms of the GNU Lesser General Public License as published by\n#  the Free Software Foundation; either version 2.1 of the License, or\n#  (at your option) any later version.\n#\n# Entries in this file show the compile time defaults.\n# You can change settings by editing this file.\n# Defaults can be restored by simply deleting this file.\n#\n# See systemd-sleep.conf(5) for details\n\n[Sleep]\nAllowSuspend=yes\n#AllowHibernation=yes\n#AllowSuspendThenHibernate=yes\n#AllowHybridSleep=yes\n#SuspendMode=suspend\nSuspendState=mem standby freeze\n#HibernateMode=platform shutdown\n#HibernateState=disk\n#HybridSleepMode=suspend platform shutdown\n#HybridSleepState=disk\n#HibernateDelaySec=180min"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/packages/enable-oga-sleep/sources/sleep.sh",
    "content": "#!/bin/bash\n\nOGA=$(cat /proc/device-tree/compatible)\n\ncase $1 in\n   pre)\n    # unload esp8090 WiFi module\n[[ \"${OGA}\" == *\"v11\"* ]] && modprobe -r esp8089\n    # Store sound state. Try to avoid having max volume after resume\n    alsactl store -f /tmp/asound.state\n\t# workaround until dwc2 is fixed\n\tmodprobe -r dwc2\n    # stop hotkey service\n    systemctl stop odroidgoa-headphones.service\n    ;;\n   post)\n    # Restore pre-sleep sound state\n    alsactl restore -f /tmp/asound.state\n    # workaround until dwc2 is fixed\n\tmodprobe -r dwc2\n\tmodprobe -i dwc2\n\t# re-load WiFi module\n[[ \"${OGA}\" == *\"v11\"* ]] &&  modprobe esp8089\n    # re-detect and reapply sound, brightness and hp state\n    systemctl start odroidgoa-headphones.service\n\t;;\nesac\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/packages/odroidgoa-utils/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"odroidgoa-utils\"\nPKG_VERSION=\"\"\nPKG_SHA256=\"\"\nPKG_ARCH=\"any\"\nPKG_LICENSE=\"OSS\"\nPKG_DEPENDS_TARGET=\"toolchain python-evdev enable-oga-sleep usb-modeswitch light retrorun\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_LONGDESC=\"Support scripts for the ODROID-GO Advance\"\nPKG_TOOLCHAIN=\"manual\"\n\nif [ \"${ARCH}\" = \"aarch64\" ]; then\n  PKG_DEPENDS_TARGET+=\" lib32-retrorun\"\nfi\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/bin\n  cp * $INSTALL/usr/bin\n}\n\npost_install() {  \n  enable_service odroidgoa-hotkeys.service\n  enable_service odroidgoa-headphones.service\n}\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/packages/odroidgoa-utils/sources/headphone_sense.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# Source predefined functions and variables\n. /etc/profile\n\n# Switch to headphones if we have them already connected at boot\nGPIO=$(cat /sys/class/gpio/gpio86/value)\n[[ \"$GPIO\" == \"1\" ]] && set_ee_setting \"audio.device\" \"headphone\" || set_ee_setting \"audio.device\" \"speakers\"\n\nif [ -e \"/emuelec/configs/emuelec.conf\" ]; then\n/usr/bin/odroidgoa_utils.sh setaudio $(get_ee_setting \"audio.device\")\n/usr/bin/odroidgoa_utils.sh vol $(get_ee_setting \"audio.volume\")\n/usr/bin/odroidgoa_utils.sh bright $(get_ee_setting \"brightness.level\")\nfi\n\n# Headphone sensing \nDEVICE='/dev/input/event1'\n\nHP_ON='*(SW_HEADPHONE_INSERT), value 0*'\nHP_OFF='*(SW_HEADPHONE_INSERT), value 1*'\n\nevtest \"${DEVICE}\" | while read line; do\n    case $line in\n\t(${HP_ON})\n\tamixer cset name='Playback Path' HP\n\tset_ee_setting \"audio.device\" \"headphone\"\n\t;;\n\t(${HP_OFF})\n\tamixer cset name='Playback Path' SPK\n\tset_ee_setting \"audio.device\" \"speakers\"\n\t;;\n    esac\ndone\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/packages/odroidgoa-utils/sources/odroidgoa_utils.sh",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\n# THESE NEEDS TO BE CLEANED UP, MAYBE WITH CASE OR FUNCTIONS\n\n# Source predefined functions and variables\n. /etc/profile\n\nif [ \"${1}\" == \"toggleaudio\" ];then\n# Toggle audio output\nCURRENTAUDIO=$(get_ee_setting \"audio.device\")\n\tcase \"${CURRENTAUDIO}\" in\n\t    \"headphone\")\n\t    echo \"setting speakers\"\n\t\tamixer cset name='Playback Path' SPK\n\t\tset_ee_setting \"audio.device\" \"speakers\"\n\t\t;;\n\t    \"auto\"|\"speakers\"|*)\n\t    echo \"setting headphones\"\n\t\tamixer cset name='Playback Path' HP\n\t\tset_ee_setting \"audio.device\" \"headphone\"\n\t\t;;\n\tesac\nfi\n\nif [ \"${1}\" == \"setaudio\" ];then\n# Set audio output second parameter is either headphones or speakers\n\tcase \"${2}\" in\n\t    \"headphone\")\n\t    echo \"setting headphones\"\n\t\tamixer cset name='Playback Path' HP\n\t\tset_ee_setting \"audio.device\" \"headphone\"\n\t\t;;\n\t  \t\"auto\"|\"speakers\"|*)\n\t  \techo \"setting speakers\"\n\t\tamixer cset name='Playback Path' SPK\n\t\tset_ee_setting \"audio.device\" \"speakers\"\n\t\t;;\n\tesac\nfi\n\nif [ \"${1}\" == \"vol\" ];then\nVOLSTEP=5\nCURRENTVOL=$(get_ee_setting \"audio.volume\")\nMAXVOL=100\nMINVOL=0\n\tif [ \"${2}\" == \"+\" ]; then\n\t\tSTEPVOL=$(($CURRENTVOL+$VOLSTEP))\n\telif [ \"${2}\" == \"-\" ]; then\n\t\tSTEPVOL=$(($CURRENTVOL-$VOLSTEP))\n\telse\n\t\tSTEPVOL=${2}\n\tfi\n\t[ \"$STEPVOL\" -ge \"$MAXVOL\" ] && STEPVOL=\"$MAXVOL\"\n\t[ \"$STEPVOL\" -le \"$MINVOL\" ] && STEPVOL=\"$MINVOL\"\n\tamixer set 'Playback' ${STEPVOL}%\n\tset_ee_setting \"audio.volume\" ${STEPVOL}\n  fi    \n\n\nif [ \"${1}\" == \"bright\" ]; then\nSTEPS=\"5\"\nCURBRIGHT=$(cat /sys/class/backlight/backlight/brightness)\nMAXSYSBRIGHT=$(cat /sys/class/backlight/backlight/max_brightness)\nCURRENTBRIGHT=$(awk -v a=\"$CURBRIGHT\" -v b=\"$MAXSYSBRIGHT\" 'BEGIN{print int((a*100/b)+0.5)}')\nMAXBRIGHT=\"100\"\nMINBRIGHT=\"5\"\n\n    if [ \"${2}\" == \"+\" ]; then\n        STEPBRIGHT=$(($CURRENTBRIGHT+$STEPS))\n    elif [ \"${2}\" == \"-\" ]; then\n        STEPBRIGHT=$(($CURRENTBRIGHT-$STEPS))\n    else\n        STEPBRIGHT=${2}\n    fi\n\n    [ \"$STEPBRIGHT\" -ge \"$MAXBRIGHT\" ] && STEPBRIGHT=\"$MAXBRIGHT\"\n    [ \"$STEPBRIGHT\" -le \"$MINBRIGHT\" ] && STEPBRIGHT=\"$MINBRIGHT\"\n    #echo \"Setting bright to $STEPBRIGHT\"\n\n    NEWVAL=$(awk -v a=\"$STEPBRIGHT\" -v b=\"$MAXSYSBRIGHT\" 'BEGIN{print int((a*b/100)+0.5)}')\necho \"${NEWVAL}\" > /sys/class/backlight/backlight/brightness\nset_ee_setting \"brightness.level\" $STEPBRIGHT\nfi\n\nif [ \"${1}\" == \"oga_oc\" ]; then\n\n    case ${2} in \n        \"1.4ghz\")\n        gov=\"userspace\"\n        freq=\"1416000\"\n        ;;\n        \"1.5ghz\")\n        gov=\"userspace\"\n        freq=\"1512000\"\n        ;;\n        *)\n        gov=\"performance\"\n        freq=\"1296000\"\n        ;;\n    esac\n\n    echo ${gov} > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor\n    echo ${freq} > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed\n    echo ${freq} > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq\nfi\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/packages/odroidgoa-utils/sources/oga_events.py",
    "content": "#!/usr/bin/env python3\n\nimport evdev\nimport asyncio\nimport time\nimport os.path\nfrom subprocess import check_output\n\npwrkey = evdev.InputDevice(\"/dev/input/event0\")\n\nif os.path.exists(\"/dev/input/by-path/platform-odroidgo3-joypad-event-joystick\"):\n    odroidgo_joypad = evdev.InputDevice(\"/dev/input/by-path/platform-odroidgo3-joypad-event-joystick\")\n    devicename = \"GO-Super Gamepad\"\n    odroidgo_volume = evdev.InputDevice(\"/dev/input/by-path/platform-odroidgo3-keys-event\")\nelse:\n    odroidgo_joypad = evdev.InputDevice(\"/dev/input/by-path/platform-odroidgo2-joypad-event-joystick\")\n    devicename = \"GO-Advance Gamepad\"\n    \nneed_to_swallow_pwr_key = False # After a resume, we swallow the pwr input that triggered the resume\n\nclass Power:\n    pwr = 116\n\nclass Joypad:\n    l1 = 310\n    r1 = 311\n\n    up = 544\n    down = 545\n    left = 546\n    right = 547\n\n    f1 = 704\n    f2 = 705\n    f5 = 708\n    volu = 115\n    vold = 114\n\ndef runcmd(cmd, *args, **kw):\n    print(f\">>> {cmd}\")\n    check_output(cmd, *args, **kw)\n\nasync def handle_event(device):\n    async for event in device.async_read_loop():\n        global need_to_swallow_pwr_key\n        if device.name == \"rk8xx_pwrkey\":\n            keys = odroidgo_joypad.active_keys()\n            if event.value == 1 and event.code == Power.pwr: # pwr on release\n                if need_to_swallow_pwr_key == False:\n                    need_to_swallow_pwr_key = True\n                    if Joypad.f5 in keys:\n                        runcmd(\"/bin/systemctl poweroff || true\", shell=True)\n                    else:\n                        runcmd(\"/bin/systemctl suspend || true\", shell=True)\n                else:\n                    need_to_swallow_pwr_key = False\n\n        elif device.name == \"odroidgo3-keys\":\n            keys = odroidgo_volume.active_keys()\n            if event.value == 1:\n                if Joypad.volu in keys:\n                        runcmd(\"/usr/bin/odroidgoa_utils.sh vol +\", shell=True)\n                elif Joypad.vold in keys:\n                        runcmd(\"/usr/bin/odroidgoa_utils.sh vol -\", shell=True)\n\n        elif device.name.find(devicename) != -1:\n            keys = odroidgo_joypad.active_keys()\n            print(keys)\n            if event.value == 1 and Joypad.f5 in keys:\n                if event.code == Joypad.up:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh vol +\", shell=True)\n                elif event.code == Joypad.down:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh vol -\", shell=True)\n                elif event.code == Joypad.right:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh bright +\", shell=True)\n                elif event.code == Joypad.left:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh bright -\", shell=True)\n                elif event.code == Joypad.r1:\n                    runcmd(\"/usr/bin/odroidgoa_utils.sh toggleaudio\", shell=True)\n\n        if event.code != 0:\n            print(device.name, event)\n\n        time.sleep(0.001)\n\ndef run():\n    asyncio.ensure_future(handle_event(pwrkey))\n    asyncio.ensure_future(handle_event(odroidgo_joypad))\n    if os.path.exists(\"/dev/input/by-path/platform-odroidgo3-joypad-event-joystick\"):\n        asyncio.ensure_future(handle_event(odroidgo_volume))\n\n    loop = asyncio.get_event_loop()\n    loop.run_forever()\n\nif __name__ == \"__main__\": # admire\n    run()\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/packages/odroidgoa-utils/system.d/odroidgoa-headphones.service",
    "content": "[Unit]\nDescription=Odroid Go Advance Headphone Sense\nConditionPathExists=/dev/input/event1\nBefore=emuelec.target\n\n[Service]\nEnvironment=HOME=/storage\nEnvironmentFile=/storage/.config/emulationstation/scripts/es_env.sh\nExecStart=/usr/bin/headphone_sense.sh\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/packages/odroidgoa-utils/system.d/odroidgoa-hotkeys.service",
    "content": "[Unit]\nDescription=Odroid Go Advance Hotkeys\nConditionPathExists=/dev/input/event0\nConditionPathExists=/dev/input/event2\nBefore=emuelec.target\n\n[Service]\nEnvironment=HOME=/storage\nEnvironmentFile=/storage/.config/emulationstation/scripts/es_env.sh\nExecStart=/usr/bin/oga_events.py\nType=simple\n\n[Install]\nWantedBy=multi-user.target"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/packages/rkbin/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"rkbin\"\nPKG_VERSION=\"18918b724e9961b2cec3dee2c21019b9092198a2\"\nPKG_SHA256=\"935cd438a19971d4d64817aa6c6c4f7448a29636b972c7f34031cfd09c14c5b9\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"https://github.com/rockchip-linux/rkbin\"\nPKG_URL=\"https://gitlab.com/firefly-linux/rkbin/-/archive/$PKG_VERSION/rkbin-$PKG_VERSION.tar.gz\"\nPKG_LONGDESC=\"rkbin: Rockchip Firmware and Tool Binaries\"\nPKG_TOOLCHAIN=\"manual\"\n"
  },
  {
    "path": "projects/Rockchip/devices/RK356x/patches/linux/linux-disablerk3568mmu.patch",
    "content": "diff --git a/arch/arm64/boot/dts/rockchip/rk3568-firefly-core.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-firefly-core.dtsi\nindex e00a9dd46266..18255b5dad08 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3568-firefly-core.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/rk3568-firefly-core.dtsi\n@@ -601,17 +601,17 @@\n \n &rknpu {\n \trknpu-supply = <&vdd_npu>;\n-\tstatus = \"okay\";\n+\tstatus = \"disabled\";\n };\n \n &rknpu_mmu {\n-\tstatus = \"okay\";\n+\tstatus = \"disabled\";\n };\n \n &bus_npu {\n \tbus-supply = <&vdd_logic>;\n \tpvtm-supply = <&vdd_cpu>;\n-\tstatus = \"okay\";\n+\tstatus = \"disabled\";\n };\n \n &saradc {\n--- a/arch/arm64/boot/dts/rockchip/rk3568-linux.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/rk3568-linux.dtsi\n@@ -6,7 +6,7 @@\n \n / {\n \tchosen: chosen {\n-\t\tbootargs = \"earlycon=uart8250,mmio32,0xfe660000 console=ttyFIQ0 root=PARTLABEL=rootfs rootfstype=ext4 ro rootwait overlayroot=device:dev=PARTLABEL=userdata,fstype=ext4,mkfs=1 coherent_pool=1m systemd.gpt_auto=0 cgroup_enable=memory swapaccount=1\";\n+\t\tbootargs = \"earlycon=uart8250,mmio32,0xfe660000 console=ttyFIQ0 console=tty0 root=PARTLABEL=EMUELEC rootfstype=ext4 ro rootwait overlayroot=device:dev=PARTLABEL=STORAGE,fstype=ext4,mkfs=1 coherent_pool=1m systemd.gpt_auto=0 cgroup_enable=memory swapaccount=1\";\n \t};\n \n \tfiq-debugger {\n\n"
  },
  {
    "path": "projects/Rockchip/filesystem/usr/bin/cputemp",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nTEMP=\"$(cat /sys/class/thermal/thermal_zone0/temp)\"\necho \"$(( $TEMP / 1000 )) C\"\n"
  },
  {
    "path": "projects/Rockchip/filesystem/usr/lib/systemd/sleep.conf.d/sleep.conf",
    "content": "[Sleep]\nSuspendMode=false\nHibernateMode=false\n"
  },
  {
    "path": "projects/Rockchip/filesystem/usr/share/alsa/cards/Analog.conf",
    "content": "#\n# Configuration for Analog\n#\n\n<confdir:pcm/front.conf>\n\nAnalog.pcm.front.0 {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\ttype hw\n\tcard $CARD\n}\n"
  },
  {
    "path": "projects/Rockchip/filesystem/usr/share/alsa/cards/SPDIF.conf",
    "content": "#\n# Configuration for SPDIF\n#\n\n<confdir:pcm/iec958.conf>\n\nSPDIF.pcm.iec958.0 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t\tdevice 0\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tinterface PCM\n\t\t\t\tname \"IEC958 Playback Default\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional true\n\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n\t\t\t}\n\t\t]\n\t}\n\thint.device 0\n}\n"
  },
  {
    "path": "projects/Rockchip/filesystem/usr/share/alsa/cards/simple-card.conf",
    "content": "#\n# Configuration for HDMI\n#\n\n<confdir:pcm/hdmi.conf>\n\nsimple-card.pcm.hdmi.\"hdmi-sound\" \"cards.simple-card.pcm.hdmi.HDMI\"\nsimple-card.pcm.hdmi.\"rockchip_tinker-codec\" \"cards.simple-card.pcm.hdmi.HDMI\"\n\nsimple-card.pcm.hdmi.\"HDMI\" {\n\t@args [ CARD DEVICE AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.DEVICE { type integer }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t\tdevice $DEVICE\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tinterface PCM\n\t\t\t\tname \"IEC958 Playback Default\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional true\n\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n\t\t\t}\n\t\t]\n\t}\n\thint.device $DEVICE\n}\n\nsimple-card.pcm.hdmi.0 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\t@func refer\n\tname {\n\t\t@func concat\n\t\tstrings [\n\t\t\t\"cards.simple-card.pcm.hdmi.\"\n\t\t\t{ @func card_name card $CARD }\n\t\t\t\":CARD=\" $CARD \",\"\n\t\t\t\"DEVICE=0,\"\n\t\t\t\"AES0=\" $AES0 \",\"\n\t\t\t\"AES1=\" $AES1 \",\"\n\t\t\t\"AES2=\" $AES2 \",\"\n\t\t\t\"AES3=\" $AES3\n\t\t]\n\t}\n\tdefault {\n\t\t# point to non-existent device\n\t\tcard $CARD\n\t\tdevice 999\n\t\thint.device 999\n\t}\n}\n\n#\n# Configuration for SPDIF\n#\n\n<confdir:pcm/iec958.conf>\n\nsimple-card.pcm.iec958.\"SPDIF\" {\n\t@args [ CARD DEVICE AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.DEVICE { type integer }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\ttype hooks\n\tslave.pcm {\n\t\ttype hw\n\t\tcard $CARD\n\t\tdevice $DEVICE\n\t}\n\thooks.0 {\n\t\ttype ctl_elems\n\t\thook_args [\n\t\t\t{\n\t\t\t\tinterface PCM\n\t\t\t\tname \"IEC958 Playback Default\"\n\t\t\t\tlock true\n\t\t\t\tpreserve true\n\t\t\t\toptional true\n\t\t\t\tvalue [ $AES0 $AES1 $AES2 $AES3 ]\n\t\t\t}\n\t\t]\n\t}\n\thint.device $DEVICE\n}\n\nsimple-card.pcm.iec958.0 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\t@func refer\n\tname {\n\t\t@func concat\n\t\tstrings [\n\t\t\t\"cards.simple-card.pcm.iec958.\"\n\t\t\t{ @func card_name card $CARD }\n\t\t\t\":CARD=\" $CARD \",\"\n\t\t\t\"DEVICE=0,\"\n\t\t\t\"AES0=\" $AES0 \",\"\n\t\t\t\"AES1=\" $AES1 \",\"\n\t\t\t\"AES2=\" $AES2 \",\"\n\t\t\t\"AES3=\" $AES3\n\t\t]\n\t}\n\tdefault {\n\t\t# point to non-existent device\n\t\tcard $CARD\n\t\tdevice 999\n\t\thint.device 999\n\t}\n}\n\nsimple-card.pcm.iec958.1 {\n\t@args [ CARD AES0 AES1 AES2 AES3 ]\n\t@args.CARD { type string }\n\t@args.AES0 { type integer }\n\t@args.AES1 { type integer }\n\t@args.AES2 { type integer }\n\t@args.AES3 { type integer }\n\t@func refer\n\tname {\n\t\t@func concat\n\t\tstrings [\n\t\t\t\"cards.simple-card.pcm.iec958.\"\n\t\t\t{ @func card_name card $CARD }\n\t\t\t\":CARD=\" $CARD \",\"\n\t\t\t\"DEVICE=0,\"\n\t\t\t\"AES0=\" $AES0 \",\"\n\t\t\t\"AES1=\" $AES1 \",\"\n\t\t\t\"AES2=\" $AES2 \",\"\n\t\t\t\"AES3=\" $AES3\n\t\t]\n\t}\n\tdefault {\n\t\t# point to non-existent device\n\t\tcard $CARD\n\t\tdevice 999\n\t\thint.device 999\n\t}\n}\n\n#\n# Configuration for Analog/I2S\n#\n\n<confdir:pcm/front.conf>\n\nsimple-card.pcm.front.\"I2S\" \"cards.simple-card.pcm.front.Analog\"\n\nsimple-card.pcm.front.\"Analog\" {\n\t@args [ CARD DEVICE ]\n\t@args.CARD { type string }\n\t@args.DEVICE { type integer }\n\ttype hw\n\tcard $CARD\n\thint.device $DEVICE\n}\n\nsimple-card.pcm.front.0 {\n\t@args [ CARD ]\n\t@args.CARD { type string }\n\t@func refer\n\tname {\n\t\t@func concat\n\t\tstrings [\n\t\t\t\"cards.simple-card.pcm.front.\"\n\t\t\t{ @func card_name card $CARD }\n\t\t\t\":CARD=\" $CARD \",\"\n\t\t\t\"DEVICE=0\"\n\t\t]\n\t}\n\tdefault {\n\t\t# point to non-existent device\n\t\tcard $CARD\n\t\tdevice 999\n\t\thint.device 999\n\t}\n}\n"
  },
  {
    "path": "projects/Rockchip/kodi/appliance.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<settings version=\"1\">\n  <section id=\"system\">\n    <category id=\"display\">\n      <group id=\"1\">\n        <setting id=\"videoscreen.blankdisplays\">\n          <visible>false</visible>\n        </setting>\n        <setting id=\"videoscreen.limitguisize\">\n          <default>3</default>\n          <visible>true</visible>\n        </setting>\n      </group>\n      <group id=\"4\">\n        <setting id=\"videoscreen.noofbuffers\">\n          <default>2</default>\n          <visible>false</visible>\n        </setting>\n      </group>\n    </category>\n    <category id=\"audio\">\n      <group id=\"1\">\n        <setting id=\"audiooutput.audiodevice\">\n          <default>ALSA:hdmi:CARD=HDMI,DEV=0</default>\n        </setting>\n      </group>\n      <group id=\"3\">\n        <visible>false</visible>\n        <setting id=\"audiooutput.passthrough\">\n          <default>false</default>\n        </setting>\n      </group>\n    </category>\n  </section>\n</settings>\n"
  },
  {
    "path": "projects/Rockchip/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # Bootloader to use (syslinux / u-boot / bcm2835-bootloader)\n    BOOTLOADER=\"u-boot\"\n\n  # U-Boot firmware package(s) to use\n    UBOOT_FIRMWARE=\"rkbin\"\n    UBOOT_FIT_IMAGE=\"u-boot-rockchip.bin\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"dtbs\"\n\n  # Additional kernel dependencies\n    KERNEL_EXTRA_DEPENDS_TARGET=\"lz4:host\"\n\n  # Kernel to use. values can be:\n  # default:  default mainline kernel\n    LINUX=\"${LINUX:-default}\"\n\n################################################################################\n# setup build defaults\n################################################################################\n\n  # Project CFLAGS\n    PROJECT_CFLAGS=\"\"\n\n  # SquashFS compression method (gzip / lzo / xz / zstd)\n    SQUASHFS_COMPRESSION=\"zstd\"\n\n################################################################################\n# setup project defaults\n################################################################################\n\n  # OpenGL(X) implementation to use (no / mesa)\n    OPENGL=\"no\"\n\n  # OpenGL-ES implementation to use (no / libmali / mesa)\n    OPENGLES=\"${OPENGLES:-mesa}\"\n\n  # Vulkan implementation to use (vulkan-loader / no)\n    VULKAN=\"no\"\n\n  # Displayserver to use (wl / no)\n    DISPLAYSERVER=\"no\"\n\n  # Windowmanager to use (weston / no)\n    WINDOWMANAGER=\"no\"\n\n  # Xorg Graphic drivers to use (all / lima,panfrost)\n  # Space separated list is supported,\n  # e.g. GRAPHIC_DRIVERS=\"lima panfrost\"\n    GRAPHIC_DRIVERS=\"\"\n\n  # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)\n    KODIPLAYER_DRIVER=\"$OPENGLES\"\n\n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware\"\n\n  # additional packages to install\n    ADDITIONAL_PACKAGES+=\" dtc\"\n\n  # build and install CEC framework support (yes / no)\n    CEC_FRAMEWORK_SUPPORT=\"yes\"\n\n  # build with installer (yes / no)\n    INSTALLER_SUPPORT=\"no\"\n\n  # Start boot partition at 16MiB, same as https://github.com/rockchip-linux/build images\n    SYSTEM_PART_START=32768\n\n  # build and install driver addons (yes / no)\n    DRIVER_ADDONS_SUPPORT=\"no\"\n\n  # driver addons to install:\n  # for a list of additinoal drivers see packages/linux-driver-addons\n  # Space separated list is supported,\n    DRIVER_ADDONS=\"dvb-latest\"\n\n  # debug tty path\n    DEBUG_TTY=\"/dev/ttyS2\"\n"
  },
  {
    "path": "projects/Rockchip/packages/bootini/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"bootini\"\nPKG_VERSION=\"\"\nPKG_LICENSE=\"various\"\nPKG_SITE=\"\"\nPKG_URL=\"\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_TOOLCHAIN=\"manual\"\n\nmakeinstall_target() {\n\n\tmkdir -p $INSTALL/usr/share/bootloader\n\t\nif [ \"$DEVICE\" == \"OdroidGoAdvance\" ]; then\n\tcp boot_oga.ini $INSTALL/usr/share/bootloader/boot.ini\nelif [ \"$DEVICE\" == \"GameForce\" ]; then\n\tcp boot_gameforce.ini $INSTALL/usr/share/bootloader/boot.ini\nfi\n\n}\n"
  },
  {
    "path": "projects/Rockchip/packages/bootini/sources/boot_gameforce.ini",
    "content": "ODROIDGOA-UBOOT-CONFIG\n\nsetenv fdt_addr_r \"0x01f00000\"\nsetenv dtb_name \"rk3326-gameforce-linux.dtb\"\nsetenv loadaddr \"0x100000\"\nsetenv scriptaddr \"0x00500000\"\nsetenv kernel_addr_r \"0x02008000\"\n\t\nsysboot mmc 1:1 any ${scriptaddr} /extlinux/rk3326-gameforce-linux.dtb.conf\n\n"
  },
  {
    "path": "projects/Rockchip/packages/bootini/sources/boot_oga.ini",
    "content": "ODROIDGOA-UBOOT-CONFIG\n\nsetenv fdt_addr_r \"0x01f00000\"\nsetenv dtb_name \"rk3326-odroidgo2-linux.dtb\"\nsetenv loadaddr \"0x100000\"\nsetenv scriptaddr \"0x00500000\"\nsetenv kernel_addr_r \"0x02008000\"\n\t\nif test ${hwrev} = 'v11'; then\nsysboot mmc 1:1 any ${scriptaddr} /extlinux/rk3326-odroidgo2-linux-v11.dtb.conf\nelif test ${hwrev} = 'v10-go3'; then\nsysboot mmc 1:1 any ${scriptaddr} /extlinux/rk3326-odroidgo3-linux.dtb.conf\nelse\nsysboot mmc 1:1 any ${scriptaddr} /extlinux/rk3326-odroidgo2-linux.dtb.conf\nfi\n"
  },
  {
    "path": "projects/Rockchip/packages/iptables/config/README",
    "content": "To create your own set of Netfilters you can save your rules in:\n\n/storage/.config/iptables/rules.v4 for ipv4\n/storage/.config/iptables/rules.v6 for ipv6\n\nTo modify tables, edit with nano then save with:\n\niptables-save >/storage/.config/iptables/rules.v4\nip6tables-save >/storage/.config/iptables/rules.v6\n\nTo disable iptables use the following command:\n\nsystemctl mask iptables\n\nTo enable iptables again:\n\nsystemctl unmask iptables\n"
  },
  {
    "path": "projects/Rockchip/packages/iptables/config/home.v4",
    "content": "*filter\n:INPUT DROP [0:0]\n:FORWARD DROP [0:0]\n:OUTPUT ACCEPT [0:0]\n:DOCKER-USER - [0:0]\n:private-subnets - [0:0]\n-A INPUT -i lo -j ACCEPT\n-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A INPUT -i tether -p udp -m conntrack --ctstate NEW -j ACCEPT\n-A INPUT -j private-subnets\n-A FORWARD -i tether -m conntrack --ctstate NEW,RELATED,ESTABLISHED -j ACCEPT\n-A FORWARD -o tether -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A DOCKER-USER -j private-subnets\n-A private-subnets -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A private-subnets -s 10.0.0.0/8 -i eth+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 172.16.0.0/12 -i eth+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 192.168.0.0/16 -i eth+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 10.0.0.0/8 -i en+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 172.16.0.0/12 -i en+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 192.168.0.0/16 -i en+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 10.0.0.0/8 -i wl+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 172.16.0.0/12 -i wl+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 192.168.0.0/16 -i wl+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 10.0.0.0/8 -i tether -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 172.16.0.0/12 -i tether -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 192.168.0.0/16 -i tether -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 10.0.0.0/8 -i docker+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 172.16.0.0/12 -i docker+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s 192.168.0.0/16 -i docker+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -j REJECT --reject-with icmp-port-unreachable\nCOMMIT\n*nat\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n*mangle\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n"
  },
  {
    "path": "projects/Rockchip/packages/iptables/config/home.v6",
    "content": "*filter\n:INPUT DROP [0:0]\n:FORWARD DROP [0:0]\n:OUTPUT ACCEPT [0:0]\n:DOCKER-USER - [0:0]\n:private-subnets - [0:0]\n-A INPUT -i lo -j ACCEPT\n-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A INPUT -i tether -p udp -m conntrack --ctstate NEW -j ACCEPT\n-A INPUT -j private-subnets\n-A FORWARD -i tether -m conntrack --ctstate NEW,RELATED,ESTABLISHED -j ACCEPT\n-A FORWARD -o tether -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A DOCKER-USER -j private-subnets\n-A private-subnets -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A private-subnets -s fc00::/7 -i eth+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s fc00::/7 -i en+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s fc00::/7 -i wl+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s fc00::/7 -i tether -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -s fc00::/7 -i docker+ -m conntrack --ctstate NEW -j ACCEPT\n-A private-subnets -j REJECT --reject-with icmp6-port-unreachable\nCOMMIT\n*nat\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n*mangle\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n"
  },
  {
    "path": "projects/Rockchip/packages/iptables/config/public.v4",
    "content": "# Netfilter rules for public \"untrusted\" networks\n*filter\n:INPUT DROP [0:0]\n:FORWARD DROP [0:0]\n:OUTPUT ACCEPT [0:0]\n:DOCKER-USER - [0:0]\n-A INPUT -i lo -j ACCEPT\n-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n# Allow tethered Wifi AP\n-A INPUT -i tether -p udp -m conntrack --ctstate NEW -j ACCEPT\n-A INPUT -i tether -s 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 -m conntrack --ctstate NEW -j ACCEPT\n-A FORWARD -i tether -s 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 -m conntrack --ctstate NEW -j ACCEPT\n-A FORWARD -i tether -s 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\n-A FORWARD -o tether -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\n# Block DOCKER\n-A DOCKER-USER -m conntrack --ctstate RELATED,ESTABLISHED -j RETURN\n-A DOCKER-USER -j REJECT --reject-with icmp-port-unreachable\nCOMMIT\n*nat\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n*mangle\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n"
  },
  {
    "path": "projects/Rockchip/packages/iptables/config/public.v6",
    "content": "# Netfilter Rules for trusted home networks.\n*filter\n:INPUT DROP [0:0]\n:FORWARD DROP [0:0]\n:OUTPUT ACCEPT [0:0]\n:DOCKER-USER - [0:0]\n-A INPUT -i lo -j ACCEPT\n-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n# Allow tethered Wifi AP\n-A INPUT -i tether -p udp -m conntrack --ctstate NEW -j ACCEPT\n-A INPUT -i tether -s fc00::/7 -m conntrack --ctstate NEW -j ACCEPT\n-A FORWARD -i tether -s fc00::/7 -m conntrack --ctstate NEW -j ACCEPT\n-A FORWARD -i tether -s fc00::/7 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\n-A FORWARD -o tether -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\n-A DOCKER-USER -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A DOCKER-USER -j REJECT --reject-with icmp6-port-unreachable\nCOMMIT\n*nat\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n*mangle\n:PREROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\nCOMMIT\n"
  },
  {
    "path": "projects/Rockchip/packages/iptables/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"iptables\"\nPKG_VERSION=\"1.8.7\"\nPKG_SHA256=\"c109c96bb04998cd44156622d36f8e04b140701ec60531a10668cfdff5e8d8f0\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.netfilter.org/\"\nPKG_URL=\"https://www.netfilter.org/projects/iptables/files/${PKG_NAME}-${PKG_VERSION}.tar.bz2\"\nPKG_DEPENDS_TARGET=\"toolchain linux:host libmnl libnftnl\"\nPKG_LONGDESC=\"IP packet filter administration.\"\nPKG_TOOLCHAIN=\"autotools\"\n\npost_configure_target() {\n  libtool_remove_rpath libtool\n}\n\npost_makeinstall_target() {\n  mkdir -p ${INSTALL}/usr/config/iptables/\n    cp -PR ${PKG_DIR}/config/README ${INSTALL}/usr/config/iptables/\n\n  mkdir -p ${INSTALL}/etc/iptables/\n    cp -PR ${PKG_DIR}/config/* ${INSTALL}/etc/iptables/\n\n  mkdir -p ${INSTALL}/usr/lib/libreelec\n    cp ${PKG_DIR}/scripts/iptables_helper ${INSTALL}/usr/lib/libreelec\n}\n\npost_install() {\n  enable_service iptables.service\n}\n\n"
  },
  {
    "path": "projects/Rockchip/packages/iptables/scripts/iptables_helper",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nIPTABLES4=\"/usr/sbin/iptables\"\nIPTABLES6=\"/usr/sbin/ip6tables\"\nIPTABLES_CMDS=\"$IPTABLES4 $IPTABLES6\"\nPUBLIC_RULES=\"/etc/iptables/public.v\"\nHOME_RULES=\"/etc/iptables/home.v\"\nCUSTOM_RULES=\"/storage/.config/iptables/rules.v\"\nDOCKER=\"service.system.docker.service\"\nSYSTEMCTL=\"/usr/bin/systemctl\"\nCONNMANCTL=\"/usr/bin/connmanctl\"\n\ncheck_docker() {\n  $SYSTEMCTL is-active --quiet $DOCKER && $SYSTEMCTL restart $DOCKER\n}\n\nget_technology_config() {\n  $CONNMANCTL technologies | awk -v pattern=\"^/.*/technology/$1$\" -e 'BEGIN {S=0}; /^\\/.*/ {S=0}; $0 ~ pattern {S=1}; S==1 {print $0}'\n}\n\ncheck_tether() {\n  for technology in wifi ethernet; do\n    if get_technology_config $technology | grep -q 'Tethering = True'; then\n      $CONNMANCTL tether $technology off\n      sleep 1\n      $CONNMANCTL tether $technology on\n      break\n    fi\n  done\n}\n\nflush() {\n  for cmd in $IPTABLES_CMDS; do\n    $cmd -F\n    $cmd -X\n    $cmd -t nat -F\n    $cmd -t nat -X\n    $cmd -t mangle -F\n    $cmd -t mangle -X\n    $cmd -P INPUT ACCEPT\n    $cmd -P FORWARD ACCEPT\n    $cmd -P OUTPUT ACCEPT\n  done\n  check_docker\n  check_tether\n}\n\nenable() {\n  for cmd in $IPTABLES_CMDS; do\n    case \"$cmd\" in\n      *6*) \n         rules=\"$RULES6\"\n\t ipv=\"6\"\n\t ;;\n        *) \n         rules=\"$RULES4\"\n\t ipv=\"4\"\n\t ;;\n    esac\n    if [ -e \"$rules\" ]; then\n      \"$cmd-restore\" \"$rules\" \n    fi\n  done\n  check_docker\n  check_tether\n}\n\nif [ \"$1\" = \"enable\" ]; then\n  case \"${RULES}\" in\n    \"none\") \n       flush\n       ;;\n    \"public\") \n       RULES4=\"${PUBLIC_RULES}4\"\n       RULES6=\"${PUBLIC_RULES}6\"\n       ;;\n    \"home\") \n       RULES4=\"${HOME_RULES}4\"\n       RULES6=\"${HOME_RULES}6\"\n       ;;\n    \"custom\") \n       RULES4=\"${CUSTOM_RULES}4\"\n       RULES6=\"${CUSTOM_RULES}6\"\n       ;;\n    *) \n       exit 1\n       ;;\n  esac\n  enable\nelif [ \"$1\" = \"disable\" ]; then\n  flush\nelse\n  exit 1\nfi\n\nexit 0\n"
  },
  {
    "path": "projects/Rockchip/packages/iptables/system.d/iptables.service",
    "content": "[Unit]\nDescription=IPTABLES Packet Filtering\nConditionPathExists=/usr/lib/libreelec/iptables_helper\nConditionPathExists=|/storage/.cache/services/iptables.conf\nBefore=network.target\nWants=network.target\n\n[Service]\nType=oneshot\nEnvironmentFile=-/storage/.cache/services/iptables.conf\nExecStart=/usr/lib/libreelec/iptables_helper enable\nExecReload=/usr/lib/libreelec/iptables_helper enable\nExecStop=/usr/lib/libreelec/iptables_helper disable\nRemainAfterExit=yes\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "projects/Rockchip/packages/kmscon/libtsm/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"libtsm\"\nPKG_VERSION=\"6d1cc890183fb6a433f4683aba98cdc8d6fe8549\"\nPKG_SHA256=\"25910f8c03cd305479b10f1ee04111b274ef7e0ff331fe8d35bee110535cfe15\"\nPKG_LICENSE=\"GPLv2+\"\nPKG_SITE=\"https://github.com/syuu1228/libtsm\"\nPKG_URL=\"$PKG_SITE/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain\"\nPKG_LONGDESC=\"Linux KMS/DRM based virtual Console Emulator\"\nPKG_TOOLCHAIN=\"autotools\"\n\n#pre_configure_target() {\n \n#}\n\n#makeinstall_target() { \n#}\n"
  },
  {
    "path": "projects/Rockchip/packages/kmscon/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"kmscon\"\nPKG_VERSION=\"0b3452719992f855b64fa21c9d7fbd6158a8d23a\"\nPKG_SHA256=\"6b7efdb4f9b6715208898ee4757364c04d1bb903182bba1667644dd68c11524d\"\nPKG_LICENSE=\"GPLv2+\"\nPKG_SITE=\"https://github.com/dvdhrm/kmscon\"\nPKG_URL=\"$PKG_SITE/archive/$PKG_VERSION.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libtsm libxkbcommon\"\nPKG_LONGDESC=\"Linux KMS/DRM based virtual Console Emulator\"\nPKG_TOOLCHAIN=\"autotools\"\n\n\nPKG_CONFIGURE_OPTS_TARGET=\" --disable-debug --with-video=fbdev,drm2d,drm3d --disable-multi-seat --with-sessions=dummy,terminal\"\n"
  },
  {
    "path": "projects/Rockchip/packages/kmscon/patches/kmscon-fixbuild.patch",
    "content": "--- a/src/pty.c\n+++ b/src/pty.c\n@@ -45,6 +45,7 @@\n #define LOG_SUBSYSTEM \"pty\"\n \n #define KMSCON_NREAD 16384\n+#define SIGUNUSED 31\n \n struct kmscon_pty {\n \tunsigned long ref;\n--- a/src/uterm_vt.c\n+++ b/src/uterm_vt.c\n@@ -40,6 +40,7 @@\n #include <sys/ioctl.h>\n #include <sys/signalfd.h>\n #include <sys/stat.h>\n+#include <sys/sysmacros.h>\n #include <termios.h>\n #include <time.h>\n #include <unistd.h>\n--- a/configure.ac\n+++ a/configure.ac\n@@ -761,7 +761,7 @@\n \n # check for offline man-pages stylesheet\n AC_MSG_CHECKING([for docbook manpages stylesheet])\n-BUILD_MANPAGES_STYLESHEET=\"http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl\"\n+BUILD_MANPAGES_STYLESHEET=\"https://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl\"\n AC_PATH_PROGS_FEATURE_CHECK([XSLTPROC_TMP], [xsltproc],\n                             AS_IF([`\"$ac_path_XSLTPROC_TMP\" --nonet \"$BUILD_MANPAGES_STYLESHEET\" > /dev/null 2>&1`],\n                                   [BUILD_HAVE_MANPAGES_STYLESHEET=yes]))\n\n"
  },
  {
    "path": "projects/Rockchip/packages/libgo2/librga/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"librga\"\nPKG_VERSION=\"1fc02d56d97041c86f01bc1284b7971c6098c5fb\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GNU\"\nPKG_DEPENDS_TARGET=\"toolchain libdrm\"\nPKG_SITE=\"https://github.com/shantigilbert/linux-rga\"\nPKG_URL=\"$PKG_SITE/archive/$PKG_VERSION.tar.gz\"\nPKG_LONGDESC=\"The RGA driver userspace \"\nPKG_TOOLCHAIN=\"auto\"\n"
  },
  {
    "path": "projects/Rockchip/packages/libgo2/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"libgo2\"\nPKG_VERSION=\"bc992566bb86f2fe0c8d981d4db46e2e2beb5b0e\"\nPKG_SHA256=\"89ad1cf229d581fa8e4498f4f4c526215176e79885e935bd7dc48c5872655f92\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"LGPL\"\nPKG_DEPENDS_TARGET=\"toolchain libevdev librga libpng openal-soft ${OPENGLES}\"\nPKG_SITE=\"https://github.com/OtherCrashOverride/libgo2\"\nPKG_URL=\"$PKG_SITE/archive/$PKG_VERSION.tar.gz\"\nPKG_LONGDESC=\"Support library for the ODROID-GO Advance \"\nPKG_TOOLCHAIN=\"make\"\n\nPKG_MAKE_OPTS_TARGET=\" config=release ARCH= INCLUDES=-I$SYSROOT_PREFIX/usr/include/libdrm -I$SYSROOT_PREFIX/usr/include \"\n\nmakeinstall_target() {\nmkdir -p $INSTALL/usr/lib\ncp libgo2.so $INSTALL/usr/lib\n\nmkdir -p $SYSROOT_PREFIX/usr/include/go2\ncp src/*.h $SYSROOT_PREFIX/usr/include/go2\n\nmkdir -p $SYSROOT_PREFIX/usr/lib\ncp libgo2.so $SYSROOT_PREFIX/usr/lib\n}\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"linux\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"http://www.kernel.org\"\nPKG_DEPENDS_HOST=\"ccache:host rsync:host openssl:host\"\nPKG_DEPENDS_TARGET=\"toolchain linux:host kmod:host xz:host keyutils ${KERNEL_EXTRA_DEPENDS_TARGET}\"\nPKG_NEED_UNPACK=\"${LINUX_DEPENDS} $(get_pkg_directory initramfs) $(get_pkg_variable initramfs PKG_NEED_UNPACK)\"\nPKG_LONGDESC=\"This package contains a precompiled kernel image and the modules.\"\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_STAMP=\"${KERNEL_TARGET} ${KERNEL_MAKE_EXTRACMD}\"\n\nPKG_PATCH_DIRS=\"${LINUX}\"\n\ncase \"$LINUX\" in\n  rockchip-4.4)\n    PKG_VERSION=\"aa8bacf821e5c8ae6dd8cae8d64011c741659945\"\n    PKG_SHA256=\"a2760fe89a15aa7be142fd25fb08ebd357c5d855c41f1612cf47c6e89de39bb3\"\n    PKG_URL=\"https://github.com/rockchip-linux/kernel/archive/$PKG_VERSION.tar.gz\"\n    PKG_SOURCE_NAME=\"linux-$LINUX-$PKG_VERSION.tar.gz\"\n    ;;\n  rk356x-4.19)\n    PKG_VERSION=\"c0c173e0214eeaa0d057599d2f1c6a83213483b1\"\n    PKG_SHA256=\"d748bc0f272373ed219a9bfd242566871dafd0437f88d0212780b8469ea89e5e\"\n    PKG_URL=\"https://gitlab.com/firefly-linux/kernel/-/archive/$PKG_VERSION/kernel-$PKG_VERSION.tar.gz\"\n    PKG_SOURCE_NAME=\"linux-$LINUX-$PKG_VERSION.tar.gz\"\n    PKG_PATCH_DIRS=\"RK356x\"\n    ;;\n  OdroidM1-4.19)\n    PKG_VERSION=\"e45b118834e1395eeacbed77e8b8f35e8105663e\"\n    PKG_SHA256=\"3c4f1bea0b8c26d9951c8b46c6c93127fc0929ff9947c5eb8e479fbaf05fa1f4\"\n    PKG_URL=\"https://github.com/hardkernel/linux/archive/$PKG_VERSION.tar.gz\"\n    PKG_SOURCE_NAME=\"linux-$LINUX-$PKG_VERSION.tar.gz\"\n    PKG_PATCH_DIRS=\"RK356x\"\n    ;;\n  odroid-go-a-4.4)\n    PKG_VERSION=\"faeb665a41b53ebb386e69fe737ccf0707aaf07b\"\n    PKG_SHA256=\"bef15386f296b282e1e75ed78f14c7c0762058806da37854d09af642a15594ae\"\n    PKG_URL=\"https://github.com/hardkernel/linux/archive/$PKG_VERSION.tar.gz\"\n    PKG_SOURCE_NAME=\"linux-$LINUX-$PKG_VERSION.tar.gz\"\n    PKG_PATCH_DIRS=\"OdroidGoAdvance base\"\n    ;;\n  gameforce-4.4)\n    PKG_VERSION=\"8eddb294dcb1a1b0cf63bdf04ea5cdc41a9bd601\"\n    PKG_SHA256=\"ad2f6fee44dfb19c8a43722ca02601f6742af39129f0c79c990ed582709f63cf\"\n    PKG_URL=\"https://github.com/shantigilbert/hardkernel-linux/archive/$PKG_VERSION.tar.gz\"\n    PKG_SOURCE_NAME=\"linux-$LINUX-$PKG_VERSION.tar.gz\"\n    PKG_PATCH_DIRS=\"GameForce base\"\n    ;;\n  raspberrypi)\n    PKG_VERSION=\"3c235dcfe80a7c7ba360219e4a3ecb256f294376\" # 4.19.83\n    PKG_SHA256=\"23a222d8864107b296b3bf580106421899964af879bb7f1c440e875e565fd6f3\"\n    PKG_URL=\"https://github.com/raspberrypi/linux/archive/$PKG_VERSION.tar.gz\"\n    PKG_SOURCE_NAME=\"linux-$LINUX-$PKG_VERSION.tar.gz\"\n    ;;\n  *)\n    PKG_VERSION=\"5.1.16\"\n    PKG_SHA256=\"8a3e55be3e788700836db6f75875b4d3b824a581d1eacfc2fcd29ed4e727ba3e\"\n    PKG_URL=\"https://www.kernel.org/pub/linux/kernel/v5.x/$PKG_NAME-$PKG_VERSION.tar.xz\"\n    PKG_PATCH_DIRS=\"default\"\n    ;;\nesac\n\nPKG_KERNEL_CFG_FILE=$(kernel_config_path) || die\n\nif [ -n \"${KERNEL_TOOLCHAIN}\" ]; then\n  PKG_DEPENDS_HOST+=\" gcc-${KERNEL_TOOLCHAIN}:host\"\n  PKG_DEPENDS_TARGET+=\" gcc-${KERNEL_TOOLCHAIN}:host\"\n  HEADERS_ARCH=${TARGET_ARCH}\nfi\n\nif [ \"${PKG_BUILD_PERF}\" != \"no\" ] && grep -q ^CONFIG_PERF_EVENTS= ${PKG_KERNEL_CFG_FILE}; then\n  PKG_BUILD_PERF=\"yes\"\n  PKG_DEPENDS_TARGET+=\" binutils elfutils libunwind zlib openssl\"\nfi\n\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  PKG_DEPENDS_TARGET+=\" elfutils:host pciutils\"\n  PKG_DEPENDS_UNPACK+=\" intel-ucode kernel-firmware\"\nelif [ \"${TARGET_ARCH}\" = \"arm\" -a \"${DEVICE}\" = \"iMX6\" ]; then\n  PKG_DEPENDS_UNPACK+=\" firmware-imx\"\nfi\n\nif [[ \"${KERNEL_TARGET}\" = uImage* ]]; then\n  PKG_DEPENDS_TARGET+=\" u-boot-tools:host\"\nfi\n\n# Ensure that the dependencies of initramfs:target are built correctly, but\n# we don't want to add initramfs:target as a direct dependency as we install\n# this \"manually\" from within linux:target\nfor pkg in $(get_pkg_variable initramfs PKG_DEPENDS_TARGET); do\n  ! listcontains \"${PKG_DEPENDS_TARGET}\" \"${pkg}\" && PKG_DEPENDS_TARGET+=\" ${pkg}\" || true\ndone\n\npost_patch() {\n  # linux was already built and its build dir autoremoved - prepare it again for kernel packages\n  if [ -d ${PKG_INSTALL}/.image ]; then\n    cp -p ${PKG_INSTALL}/.image/.config ${PKG_BUILD}\n    kernel_make -C ${PKG_BUILD} prepare\n\n    # restore the required Module.symvers from an earlier build\n    cp -p ${PKG_INSTALL}/.image/Module.symvers ${PKG_BUILD}\n  fi\n}\n\npost_unpack() {\n  # Add exFAT\n  ${SCRIPTS}/get exfat-linux\n  local PKG_BUILD_EXFAT=\"${PKG_BUILD}/fs/exfat\"\n  [ -e \"$PKG_BUILD_EXFAT\" ] && rm -rf \"$PKG_BUILD_EXFAT\"\n  mkdir -p \"$PKG_BUILD_EXFAT\"\n  tar --strip-components=1 -xf \"${SOURCES}/exfat-linux/exfat-linux-$(get_pkg_version exfat-linux).tar.gz\" -C \"$PKG_BUILD_EXFAT\"\n  sed -i '/source \"fs\\/fat\\/Kconfig\"/a source \"fs\\/exfat\\/Kconfig\"' \"${PKG_BUILD}/fs/Kconfig\"\n  sed -i '/obj-$(CONFIG_FAT_FS).*+= fat\\//a obj-$(CONFIG_EXFAT_FS)\\t\\t+= exfat\\/' \"${PKG_BUILD}/fs/Makefile\"\n}\n\nmake_host() {\n  :\n}\n\nmakeinstall_host() {\n  make \\\n    ARCH=${HEADERS_ARCH:-${TARGET_KERNEL_ARCH}} \\\n    HOSTCC=\"${TOOLCHAIN}/bin/host-gcc\" \\\n    HOSTCXX=\"${TOOLCHAIN}/bin/host-g++\" \\\n    HOSTCFLAGS=\"${HOST_CFLAGS}\" \\\n    HOSTCXXFLAGS=\"${HOST_CXXFLAGS}\" \\\n    HOSTLDFLAGS=\"${HOST_LDFLAGS}\" \\\n    INSTALL_HDR_PATH=dest \\\n    headers_install\n  mkdir -p ${SYSROOT_PREFIX}/usr/include\n    cp -R dest/include/* ${SYSROOT_PREFIX}/usr/include\n}\n\npre_make_target() {\n  ( cd ${ROOT}\n    rm -rf ${BUILD}/initramfs\n    rm -f ${STAMPS_INSTALL}/initramfs/install_target ${STAMPS_INSTALL}/*/install_init\n    ${SCRIPTS}/install initramfs\n  )\n  pkg_lock_status \"ACTIVE\" \"linux:target\" \"build\"\n\n  cp ${PKG_KERNEL_CFG_FILE} ${PKG_BUILD}/.config\n\n  # set initramfs source\n  ${PKG_BUILD}/scripts/config --set-str CONFIG_INITRAMFS_SOURCE \"$(kernel_initramfs_confs) ${BUILD}/initramfs\"\n\n  # set default hostname based on ${DISTRONAME}\n  ${PKG_BUILD}/scripts/config --set-str CONFIG_DEFAULT_HOSTNAME \"${DISTRONAME}\"\n\n  # disable swap support if not enabled\n  if [ ! \"${SWAP_SUPPORT}\" = yes ]; then\n    ${PKG_BUILD}/scripts/config --disable CONFIG_SWAP\n  fi\n\n  # disable nfs support if not enabled\n  if [ ! \"${NFS_SUPPORT}\" = yes ]; then\n    ${PKG_BUILD}/scripts/config --disable CONFIG_NFS_FS\n  fi\n\n  # disable cifs support if not enabled\n  if [ ! \"${SAMBA_SUPPORT}\" = yes ]; then\n    ${PKG_BUILD}/scripts/config --disable CONFIG_CIFS\n  fi\n\n  # disable iscsi support if not enabled\n  if [ ! \"${ISCSI_SUPPORT}\" = yes ]; then\n    ${PKG_BUILD}/scripts/config --disable CONFIG_SCSI_ISCSI_ATTRS\n    ${PKG_BUILD}/scripts/config --disable CONFIG_ISCSI_TCP\n    ${PKG_BUILD}/scripts/config --disable CONFIG_ISCSI_BOOT_SYSFS\n    ${PKG_BUILD}/scripts/config --disable CONFIG_ISCSI_IBFT_FIND\n    ${PKG_BUILD}/scripts/config --disable CONFIG_ISCSI_IBFT\n  fi\n\n  # disable lima/panfrost if libmali is configured\n  if [ \"${OPENGLES}\" = \"libmali\" ]; then\n    ${PKG_BUILD}/scripts/config --disable CONFIG_DRM_LIMA\n    ${PKG_BUILD}/scripts/config --disable CONFIG_DRM_PANFROST\n  fi\n\n  # disable wireguard support if not enabled\n  if [ ! \"${WIREGUARD_SUPPORT}\" = yes ]; then\n    ${PKG_BUILD}/scripts/config --disable CONFIG_WIREGUARD\n  fi\n\n  if [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n    # copy some extra firmware to linux tree\n    mkdir -p ${PKG_BUILD}/external-firmware\n      cp -a $(get_build_dir kernel-firmware)/.copied-firmware/{amdgpu,amd-ucode,i915,radeon,e100,rtl_nic} ${PKG_BUILD}/external-firmware\n\n    cp -a $(get_build_dir intel-ucode)/intel-ucode ${PKG_BUILD}/external-firmware\n\n    FW_LIST=\"$(find ${PKG_BUILD}/external-firmware \\( -type f -o -type l \\) \\( -iname '*.bin' -o -iname '*.fw' -o -path '*/intel-ucode/*' \\) | sed 's|.*external-firmware/||' | sort | xargs)\"\n\n    ${PKG_BUILD}/scripts/config --set-str CONFIG_EXTRA_FIRMWARE \"${FW_LIST}\"\n    ${PKG_BUILD}/scripts/config --set-str CONFIG_EXTRA_FIRMWARE_DIR \"external-firmware\"\n\n  elif [ \"${TARGET_ARCH}\" = \"arm\" -a \"${DEVICE}\" = \"iMX6\" ]; then\n    mkdir -p ${PKG_BUILD}/external-firmware/imx/sdma\n      cp -a $(get_build_dir firmware-imx)/firmware/sdma/*imx6*.bin ${PKG_BUILD}/external-firmware/imx/sdma\n      cp -a $(get_build_dir firmware-imx)/firmware/vpu/*imx6*.bin ${PKG_BUILD}/external-firmware\n\n    FW_LIST=\"$(find ${PKG_BUILD}/external-firmware -type f | sed 's|.*external-firmware/||' | sort | xargs)\"\n\n    ${PKG_BUILD}/scripts/config --set-str CONFIG_EXTRA_FIRMWARE \"${FW_LIST}\"\n    ${PKG_BUILD}/scripts/config --set-str CONFIG_EXTRA_FIRMWARE_DIR \"external-firmware\"\n  fi\n  \n  kernel_make oldconfig\n\n  if [ -f \"${DISTRO_DIR}/${DISTRO}/kernel_options\" ]; then\n    while read OPTION; do\n      [ -z \"${OPTION}\" -o -n \"$(echo \"${OPTION}\" | grep '^#')\" ] && continue\n\n      if [ \"${OPTION##*=}\" == \"n\" -a \"$(${PKG_BUILD}/scripts/config --state ${OPTION%%=*})\" == \"undef\" ]; then\n        continue\n      fi\n\n      if [ \"$(${PKG_BUILD}/scripts/config --state ${OPTION%%=*})\" != \"$(echo ${OPTION##*=} | tr -d '\"')\" ]; then\n        MISSING_KERNEL_OPTIONS+=\"\\t${OPTION}\\n\"\n      fi\n    done < ${DISTRO_DIR}/${DISTRO}/kernel_options\n\n    if [ -n \"${MISSING_KERNEL_OPTIONS}\" ]; then\n      print_color CLR_WARNING \"LINUX: kernel options not correct: \\n${MISSING_KERNEL_OPTIONS%%}\\nPlease run ./tools/check_kernel_config\\n\"\n    fi\n  fi\n}\n\nmake_target() {\n\nexport KCFLAGS=\"-Wno-deprecated-declarations -Wno-stringop-overflow -Wno-array-bounds -Wno-misleading-indentation -Wno-array-compare -Wno-address -Wno-dangling-pointer -Wno-stringop-overread\"\n\n  # arm64 target does not support creating uImage.\n  # Build Image first, then wrap it using u-boot's mkimage.\n  if [[ \"${TARGET_KERNEL_ARCH}\" = \"arm64\" && \"${KERNEL_TARGET}\" = uImage* ]]; then\n    if [ -z \"${KERNEL_UIMAGE_LOADADDR}\" -o -z \"${KERNEL_UIMAGE_ENTRYADDR}\" ]; then\n      die \"ERROR: KERNEL_UIMAGE_LOADADDR and KERNEL_UIMAGE_ENTRYADDR have to be set to build uImage - aborting\"\n    fi\n    KERNEL_UIMAGE_TARGET=\"${KERNEL_TARGET}\"\n    KERNEL_TARGET=\"${KERNEL_TARGET/uImage/Image}\"\n  fi\n\n  DTC_FLAGS=-@ kernel_make ${KERNEL_TARGET} ${KERNEL_MAKE_EXTRACMD} modules\n\n  if [ \"${PKG_BUILD_PERF}\" = \"yes\" ]; then\n    ( cd tools/perf\n\n      # arch specific perf build args\n      case \"${TARGET_ARCH}\" in\n        x86_64)\n          PERF_BUILD_ARGS=\"ARCH=x86\"\n          ;;\n        aarch64)\n          PERF_BUILD_ARGS=\"ARCH=arm64\"\n          ;;\n        *)\n          PERF_BUILD_ARGS=\"ARCH=${TARGET_ARCH}\"\n          ;;\n      esac\n\n      WERROR=0 \\\n      NO_LIBPERL=1 \\\n      NO_LIBPYTHON=1 \\\n      NO_SLANG=1 \\\n      NO_GTK2=1 \\\n      NO_LIBNUMA=1 \\\n      NO_LIBAUDIT=1 \\\n      NO_LZMA=1 \\\n      NO_SDT=1 \\\n      CROSS_COMPILE=\"${TARGET_PREFIX}\" \\\n      JOBS=\"${CONCURRENCY_MAKE_LEVEL}\" \\\n        make ${PERF_BUILD_ARGS}\n      mkdir -p ${INSTALL}/usr/bin\n        cp perf ${INSTALL}/usr/bin\n    )\n  fi\n\n  if [ -n \"${KERNEL_UIMAGE_TARGET}\" ]; then\n    # determine compression used for kernel image\n    KERNEL_UIMAGE_COMP=${KERNEL_UIMAGE_TARGET:7}\n    KERNEL_UIMAGE_COMP=$(echo ${KERNEL_UIMAGE_COMP:-none} | sed 's/gz/gzip/; s/bz2/bzip2/')\n\n    # calculate new load address to make kernel Image unpack to memory area after compressed image\n    if [ \"${KERNEL_UIMAGE_COMP}\" != \"none\" ]; then\n      COMPRESSED_SIZE=$(stat -t \"arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_TARGET}\" | awk '{print $2}')\n      # align to 1 MiB\n      COMPRESSED_SIZE=$(( ((${COMPRESSED_SIZE} - 1 >> 20) + 1) << 20 ))\n      PKG_KERNEL_UIMAGE_LOADADDR=$(printf '%X' \"$(( ${KERNEL_UIMAGE_LOADADDR} + ${COMPRESSED_SIZE} ))\")\n      PKG_KERNEL_UIMAGE_ENTRYADDR=$(printf '%X' \"$(( ${KERNEL_UIMAGE_ENTRYADDR} + ${COMPRESSED_SIZE} ))\")\n    else\n      PKG_KERNEL_UIMAGE_LOADADDR=${KERNEL_UIMAGE_LOADADDR}\n      PKG_KERNEL_UIMAGE_ENTRYADDR=${KERNEL_UIMAGE_ENTRYADDR}\n    fi\n\n    mkimage -A ${TARGET_KERNEL_ARCH} \\\n            -O linux \\\n            -T kernel \\\n            -C ${KERNEL_UIMAGE_COMP} \\\n            -a ${PKG_KERNEL_UIMAGE_LOADADDR} \\\n            -e ${PKG_KERNEL_UIMAGE_ENTRYADDR} \\\n            -d arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_TARGET} \\\n               arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_UIMAGE_TARGET}\n\n    KERNEL_TARGET=\"${KERNEL_UIMAGE_TARGET}\"\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p ${INSTALL}/.image\n  cp -p arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_TARGET} System.map .config Module.symvers ${INSTALL}/.image/\n\n  kernel_make INSTALL_MOD_PATH=${INSTALL}/$(get_kernel_overlay_dir) modules_install\n  rm -f ${INSTALL}/$(get_kernel_overlay_dir)/lib/modules/*/build\n  rm -f ${INSTALL}/$(get_kernel_overlay_dir)/lib/modules/*/source\n\n  if [ \"${BOOTLOADER}\" = \"u-boot\" ]; then\n    mkdir -p ${INSTALL}/usr/share/bootloader\n    for dtb in arch/${TARGET_KERNEL_ARCH}/boot/dts/*.dtb arch/${TARGET_KERNEL_ARCH}/boot/dts/*/*.dtb; do\n      if [ -f ${dtb} ]; then\n        cp -v ${dtb} ${INSTALL}/usr/share/bootloader\n      fi\n    done\n  elif [ \"${BOOTLOADER}\" = \"bcm2835-bootloader\" ]; then\n    mkdir -p ${INSTALL}/usr/share/bootloader/overlays\n\n    # install platform dtbs, but remove upstream kernel dtbs (i.e. without downstream\n    # drivers and decent USB support) as these are not required by LibreELEC\n    for dtb in arch/${TARGET_KERNEL_ARCH}/boot/dts/*.dtb arch/${TARGET_KERNEL_ARCH}/boot/dts/*/*.dtb; do\n      if [ -f ${dtb} ]; then\n        cp -v ${dtb} ${INSTALL}/usr/share/bootloader\n      fi\n    done\n    rm -f ${INSTALL}/usr/share/bootloader/bcm283*.dtb\n    # duplicated in overlays below\n    safe_remove ${INSTALL}/usr/share/bootloader/overlay_map.dtb\n\n    # install overlay dtbs\n    for dtb in arch/arm/boot/dts/overlays/*.dtb \\\n               arch/arm/boot/dts/overlays/*.dtbo; do\n      cp ${dtb} ${INSTALL}/usr/share/bootloader/overlays 2>/dev/null || :\n    done\n    cp -p arch/${TARGET_KERNEL_ARCH}/boot/dts/overlays/README ${INSTALL}/usr/share/bootloader/overlays\n  fi\n}\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/GameForce/linux-999-Valadaa-OC-1.5.patch",
    "content": "diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi\nindex 91dd42686b18f..65093245fc4a0 100644\n--- a/arch/arm64/boot/dts/rockchip/px30.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/px30.dtsi\n@@ -111,14 +111,14 @@\n \t\trockchip,temp-hysteresis = <5000>;\n \t\trockchip,low-temp = <0>;\n \t\trockchip,low-temp-min-volt = <1000000>;\n-\t\trockchip,low-temp-adjust-volt = <\n-\t\t\t/* MHz    MHz    uV */\n-\t\t\t0      1512   50000\n-\t\t>;\n+//\t\trockchip,low-temp-adjust-volt = <\n+//\t\t\t/* MHz    MHz    uV */\n+//\t\t\t0      1512   50000\n+//\t\t>;\n \n \t\tclocks = <&cru PLL_APLL>;\n \t\trockchip,avs-scale = <4>;\n-\t\trockchip,max-volt = <1350000>;\n+\t\trockchip,max-volt = <1400000>;\n \t\trockchip,evb-irdrop = <25000>;\n \t\tnvmem-cells = <&cpu_leakage>, <&performance>;\n \t\tnvmem-cell-names = \"cpu_leakage\", \"performance\";\n@@ -218,11 +218,7 @@\n \t\t};\n \t\topp-1512000000 {\n \t\t\topp-hz = /bits/ 64 <1512000000>;\n-\t\t\topp-microvolt = <1350000 1350000 1350000>;\n-\t\t\topp-microvolt-L0 = <1350000 1350000 1350000>;\n-\t\t\topp-microvolt-L1 = <1350000 1350000 1350000>;\n-\t\t\topp-microvolt-L2 = <1300000 1300000 1350000>;\n-\t\t\topp-microvolt-L3 = <1250000 1250000 1350000>;\n+\t\t\topp-microvolt = <1400000>;\n \t\t\tclock-latency-ns = <40000>;\n \t\t};\n \t};\n--- a/arch/arm64/boot/dts/rockchip/rk3326-gameforce-linux.dts\n+++ b/arch/arm64/boot/dts/rockchip/rk3326-gameforce-linux.dts\n@@ -416,11 +416,11 @@\n \t\t1               13\n \t>;\n \n-\t/delete-node/ opp-408000000;\n \t/delete-node/ opp-600000000;\n \t/delete-node/ opp-816000000;\n-\t/delete-node/ opp-1416000000;\n-\t/delete-node/ opp-1512000000;\n+\t/delete-node/ opp-1008000000;\n+\t/delete-node/ opp-1200000000;\n+\t/delete-node/ opp-1248000000;\n };\n \n &display_subsystem {\n@@ -716,7 +716,7 @@\n \t\t\t\tregulator-always-on;\n \t\t\t\tregulator-boot-on;\n \t\t\t\tregulator-min-microvolt = <950000>;\n-\t\t\t\tregulator-max-microvolt = <1350000>;\n+\t\t\t\tregulator-max-microvolt = <1400000>;\n \t\t\t\tregulator-ramp-delay = <6001>;\n \t\t\t\tregulator-initial-mode = <0x2>;\n \t\t\t\tregulator-name = \"vdd_arm\";\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/OdroidGoAdvance/linux-998-Revert_ODROID-GOA_Support_overclock.patch_",
    "content": "From 8eddb294dcb1a1b0cf63bdf04ea5cdc41a9bd601 Mon Sep 17 00:00:00 2001\nFrom: shantigilbert <shantic@gmail.com>\nDate: Thu, 3 Jun 2021 00:40:11 -0500\nSubject: [PATCH] Revert \"ODROID-GOA: Support overclock\"\n\nThis reverts commit 0cdc293751a9cc918ab178e4448cdf37eac2b462.\n---\n arch/arm64/boot/dts/rockchip/px30.dtsi        | 39 +--------\n .../rockchip/rk3326-odroidgo2-linux-v11.dts   | 11 ++-\n .../dts/rockchip/rk3326-odroidgo2-linux.dts   | 11 ++-\n .../dts/rockchip/rk3326-odroidgo3-linux.dts   | 11 ++-\n arch/arm64/configs/odroidgoa_defconfig        |  6 +-\n drivers/soc/rockchip/rockchip_opp_select.c    | 79 -------------------\n 6 files changed, 27 insertions(+), 130 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi\nindex fad37b2dd8cc4a..91dd42686b18fd 100644\n--- a/arch/arm64/boot/dts/rockchip/px30.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/px30.dtsi\n@@ -111,11 +111,10 @@\n \t\trockchip,temp-hysteresis = <5000>;\n \t\trockchip,low-temp = <0>;\n \t\trockchip,low-temp-min-volt = <1000000>;\n-\t\t/*\n \t\trockchip,low-temp-adjust-volt = <\n+\t\t\t/* MHz    MHz    uV */\n \t\t\t0      1512   50000\n \t\t>;\n-\t\t*/\n \n \t\tclocks = <&cru PLL_APLL>;\n \t\trockchip,avs-scale = <4>;\n@@ -208,15 +207,6 @@\n \t\t\topp-microvolt-L3 = <1250000 1250000 1350000>;\n \t\t\tclock-latency-ns = <40000>;\n \t\t};\n-\t\topp-1368000000 {\n-\t\t\topp-hz = /bits/ 64 <1368000000>;\n-\t\t\topp-microvolt = <1350000 1350000 1350000>;\n-\t\t\topp-microvolt-L0 = <1350000 1350000 1350000>;\n-\t\t\topp-microvolt-L1 = <1350000 1350000 1350000>;\n-\t\t\topp-microvolt-L2 = <1300000 1300000 1350000>;\n-\t\t\topp-microvolt-L3 = <1250000 1250000 1350000>;\n-\t\t\tclock-latency-ns = <40000>;\n-\t\t};\n \t\topp-1416000000 {\n \t\t\topp-hz = /bits/ 64 <1416000000>;\n \t\t\topp-microvolt = <1350000 1350000 1350000>;\n@@ -226,26 +216,8 @@\n \t\t\topp-microvolt-L3 = <1250000 1250000 1350000>;\n \t\t\tclock-latency-ns = <40000>;\n \t\t};\n-\t\topp-1440000000 {\n-\t\t\topp-hz = /bits/ 64 <1440000000>;\n-\t\t\topp-microvolt = <1350000 1350000 1350000>;\n-\t\t\topp-microvolt-L0 = <1350000 1350000 1350000>;\n-\t\t\topp-microvolt-L1 = <1350000 1350000 1350000>;\n-\t\t\topp-microvolt-L2 = <1300000 1300000 1350000>;\n-\t\t\topp-microvolt-L3 = <1250000 1250000 1350000>;\n-\t\t\tclock-latency-ns = <40000>;\n-\t\t};\n-\t\topp-1464000000 {\n-\t\t\topp-hz = /bits/ 64 <1464000000>;\n-\t\t\topp-microvolt = <1350000 1350000 1350000>;\n-\t\t\topp-microvolt-L0 = <1350000 1350000 1350000>;\n-\t\t\topp-microvolt-L1 = <1350000 1350000 1350000>;\n-\t\t\topp-microvolt-L2 = <1300000 1300000 1350000>;\n-\t\t\topp-microvolt-L3 = <1250000 1250000 1350000>;\n-\t\t\tclock-latency-ns = <40000>;\n-\t\t};\n-\t\topp-1488000000 {\n-\t\t\topp-hz = /bits/ 64 <1488000000>;\n+\t\topp-1512000000 {\n+\t\t\topp-hz = /bits/ 64 <1512000000>;\n \t\t\topp-microvolt = <1350000 1350000 1350000>;\n \t\t\topp-microvolt-L0 = <1350000 1350000 1350000>;\n \t\t\topp-microvolt-L1 = <1350000 1350000 1350000>;\n@@ -253,11 +225,6 @@\n \t\t\topp-microvolt-L3 = <1250000 1250000 1350000>;\n \t\t\tclock-latency-ns = <40000>;\n \t\t};\n-\t\topp-1512000000 {\n-\t\t\topp-hz = /bits/ 64 <1512000000>;\n-\t\t\topp-microvolt = <1350000 1350000 1350000>;\n-\t\t\tclock-latency-ns = <40000>;\n-\t\t};\n \t};\n \n \tarm-pmu {\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux-v11.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux-v11.dts\nindex ff1bc435106ddd..a9c18390d36761 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux-v11.dts\n+++ b/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux-v11.dts\n@@ -341,14 +341,17 @@\n &cpu0_opp_table {\n \trockchip,avs = <1>;\n \n-\t/* default 1.296GHz */\n+\t/* bin scaling clock 1.296MHz */\n \trockchip,bin-scaling-sel = <\n-\t\t0\t13\n-\t\t1\t13\n+\t\t0               13\n+\t\t1               13\n \t>;\n \n+\t/delete-node/ opp-408000000;\n+\t/delete-node/ opp-600000000;\n \t/delete-node/ opp-816000000;\n-\t/delete-node/ opp-1248000000;\n+\t/delete-node/ opp-1416000000;\n+\t/delete-node/ opp-1512000000;\n };\n \n &display_subsystem {\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux.dts\nindex 71c1ac36bbfe39..3e3600368ffe04 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux.dts\n+++ b/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux.dts\n@@ -324,14 +324,17 @@\n &cpu0_opp_table {\n \trockchip,avs = <1>;\n \n-\t/* default 1.296GHz */\n+\t/* bin scaling clock 1.296MHz */\n \trockchip,bin-scaling-sel = <\n-\t\t0\t13\n-\t\t1\t13\n+\t\t0               13\n+\t\t1               13\n \t>;\n \n+\t/delete-node/ opp-408000000;\n+\t/delete-node/ opp-600000000;\n \t/delete-node/ opp-816000000;\n-\t/delete-node/ opp-1248000000;\n+\t/delete-node/ opp-1416000000;\n+\t/delete-node/ opp-1512000000;\n };\n \n &display_subsystem {\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroidgo3-linux.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroidgo3-linux.dts\nindex 4b8872f36483a2..b14dc0627efe1c 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3326-odroidgo3-linux.dts\n+++ b/arch/arm64/boot/dts/rockchip/rk3326-odroidgo3-linux.dts\n@@ -344,14 +344,17 @@\n &cpu0_opp_table {\n \trockchip,avs = <1>;\n \n-\t/* default 1.296GHz */\n+\t/* bin scaling clock 1.296MHz */\n \trockchip,bin-scaling-sel = <\n-\t\t0\t13\n-\t\t1\t13\n+\t\t0               13\n+\t\t1               13\n \t>;\n \n+\t/delete-node/ opp-408000000;\n+\t/delete-node/ opp-600000000;\n \t/delete-node/ opp-816000000;\n-\t/delete-node/ opp-1248000000;\n+\t/delete-node/ opp-1416000000;\n+\t/delete-node/ opp-1512000000;\n };\n \n &display_subsystem {\ndiff --git a/arch/arm64/configs/odroidgoa_defconfig b/arch/arm64/configs/odroidgoa_defconfig\nindex 84eeeade0db416..a5ccbaea26a811 100644\n--- a/arch/arm64/configs/odroidgoa_defconfig\n+++ b/arch/arm64/configs/odroidgoa_defconfig\n@@ -522,9 +522,9 @@ CONFIG_CPU_FREQ_GOV_COMMON=y\n CONFIG_CPU_FREQ_STAT=y\n # CONFIG_CPU_FREQ_STAT_DETAILS is not set\n CONFIG_CPU_FREQ_TIMES=y\n-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y\n # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y\n+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\n # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set\n # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n # CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set\n@@ -534,7 +534,7 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y\n CONFIG_CPU_FREQ_GOV_USERSPACE=y\n CONFIG_CPU_FREQ_GOV_ONDEMAND=y\n CONFIG_CPU_FREQ_GOV_INTERACTIVE=y\n-# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\n+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y\n CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y\n \n #\ndiff --git a/drivers/soc/rockchip/rockchip_opp_select.c b/drivers/soc/rockchip/rockchip_opp_select.c\nindex bf1c4ee2ac7912..e712f3e6cef2a0 100644\n--- a/drivers/soc/rockchip/rockchip_opp_select.c\n+++ b/drivers/soc/rockchip/rockchip_opp_select.c\n@@ -50,70 +50,6 @@ struct pvtm_config {\n \tstruct thermal_zone_device *tz;\n };\n \n-#ifdef CONFIG_ARCH_ROCKCHIP_ODROIDGOA\n-static int opp_bin_sel = 13; /* default 13 */\n-static unsigned long max_cpufreq = 1296000;\n-static int __init opp_bin_sel_setup(char *__str)\n-{\n-\tint r;\n-\tunsigned long cpufreq;\n-\n-\tif (__str == NULL) {\n-\t\topp_bin_sel = 13; /* default 1.296GHz */\n-\t\treturn 0;\n-\t}\n-\n-\tr = kstrtoul(__str, 10, &cpufreq);\n-\tmax_cpufreq = cpufreq * 1000;\n-\n-\tswitch (cpufreq) {\n-\tcase 408:\n-\t\topp_bin_sel = 39;\n-\t\tbreak;\n-\tcase 600:\n-\t\topp_bin_sel = 35;\n-\t\tbreak;\n-\tcase 1008:\n-\t\topp_bin_sel = 20;\n-\t\tbreak;\n-\tcase 1200:\n-\t\topp_bin_sel = 16;\n-\t\tbreak;\n-\tcase 1296:\n-\t\topp_bin_sel = 13;\n-\t\tbreak;\n-\tcase 1368:\n-\t\topp_bin_sel = 10;\n-\t\tbreak;\n-\tcase 1416:\n-\t\topp_bin_sel = 8;\n-\t\tbreak;\n-\tcase 1440:\n-\t\topp_bin_sel = 7;\n-\t\tbreak;\n-\tcase 1464:\n-\t\topp_bin_sel = 6;\n-\t\tbreak;\n-\tcase 1488:\n-\t\topp_bin_sel = 5;\n-\t\tbreak;\n-\tcase 1512:\n-\t\topp_bin_sel = 4;\n-\t\tbreak;\n-\tdefault:\n-\t\tpr_info(\"[oga-avs]no available cpufreq, set 1.296\\n\");\n-\t\topp_bin_sel = 13;\n-\t\tbreak;\n-\t}\n-\n-\tpr_info(\"[oga-avs]cpufreq %lu, max_cpufreq %lu, opp_bin_sel %d\\n\",\n-\t\tcpufreq, max_cpufreq, opp_bin_sel);\n-\n-\treturn 0;\n-}\n-__setup(\"max_cpufreq=\", opp_bin_sel_setup);\n-#endif /* CONFIG_ARCH_ROCKCHIP_ODROIDGOA */\n-\n #define PVTM_CH_MAX\t8\n #define PVTM_SUB_CH_MAX\t8\n static int pvtm_value[PVTM_CH_MAX][PVTM_SUB_CH_MAX];\n@@ -572,14 +508,6 @@ void rockchip_of_get_bin_sel(struct device *dev, struct device_node *np,\n \t\t\t\t   bin, scale_sel);\n \tif (!ret)\n \t\tdev_info(dev, \"bin-scale=%d\\n\", *scale_sel);\n-\n-#ifdef CONFIG_ARCH_ROCKCHIP_ODROIDGOA\n-\tif (!strncmp(dev_name(dev), \"cpu0\", 4) && opp_bin_sel) {\n-\t\t*scale_sel = opp_bin_sel;\n-\t\tdev_info(dev, \"[oga-avs]bin-scale=%d, dev %s\\n\",\n-\t\t\t*scale_sel, dev_name(dev));\n-\t}\n-#endif\n }\n EXPORT_SYMBOL(rockchip_of_get_bin_sel);\n \n@@ -797,13 +725,6 @@ int rockchip_adjust_power_scale(struct device *dev, int scale)\n \tof_property_read_u32(np, \"rockchip,avs-enable\", &avs);\n \tof_property_read_u32(np, \"rockchip,avs\", &avs);\n \tof_property_read_u32(np, \"rockchip,avs-scale\", &avs_scale);\n-#ifdef CONFIG_ARCH_ROCKCHIP_ODROIDGOA\n-\tif (!strncmp(dev_name(dev), \"cpu0\", 4) && opp_bin_sel) {\n-\t\tdev_info(dev, \"[oga-avs]set avs_scale : dev %s, avs_scale=%d, maxfreq %ld\\n\",\n-\t\t\tdev_name(dev), avs_scale, max_cpufreq);\n-\t\tavs_scale = opp_bin_sel;\n-\t}\n-#endif\n \trockchip_adjust_opp_by_irdrop(dev, np, &safe_rate, &max_rate);\n \n \tdev_info(dev, \"avs=%d\\n\", avs);\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/OdroidGoAdvance/linux-999-Valadaa-OC-1.5.patch_",
    "content": "From 14155e36778b31e04f0e754db79c4d6eef835e14 Mon Sep 17 00:00:00 2001\nFrom: valadaa48 <valadaa48@gmx.com>\nDate: Thu, 31 Dec 2020 21:34:29 -0500\nSubject: [PATCH] OGS overclock\n\n---\n .../boot/dts/rockchip/rk3326-odroidgo3-linux.dts   | 14 ++++++++------\n 1 file changed, 8 insertions(+), 6 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroidgo3-linux.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroidgo3-linux.dts\nindex b9c47738512c8..7a79f1c894716 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3326-odroidgo3-linux.dts\n+++ b/arch/arm64/boot/dts/rockchip/rk3326-odroidgo3-linux.dts\n@@ -341,15 +341,17 @@\n \n \t/* bin scaling clock 1.296MHz */\n \trockchip,bin-scaling-sel = <\n-\t\t0               13\n-\t\t1               13\n+\t\t0               4\n+\t\t1               8\n+\t\t2               13\n+\t\t3               39\n \t>;\n \n-\t/delete-node/ opp-408000000;\n \t/delete-node/ opp-600000000;\n \t/delete-node/ opp-816000000;\n-\t/delete-node/ opp-1416000000;\n-\t/delete-node/ opp-1512000000;\n+    /delete-node/ opp-1008000000;\n+    /delete-node/ opp-1200000000;\n+    /delete-node/ opp-1248000000;\n };\n \n &display_subsystem {\n@@ -657,7 +659,7 @@\n \t\t\t\tregulator-always-on;\n \t\t\t\tregulator-boot-on;\n \t\t\t\tregulator-min-microvolt = <950000>;\n-\t\t\t\tregulator-max-microvolt = <1350000>;\n+\t\t\t\tregulator-max-microvolt = <1400000>;\n \t\t\t\tregulator-ramp-delay = <6001>;\n \t\t\t\tregulator-initial-mode = <0x2>;\n \t\t\t\tregulator-name = \"vdd_arm\";\nFrom 89d7bcefdeb04e9b906f224780b8dafcb1c9fffe Mon Sep 17 00:00:00 2001\nFrom: valadaa48 <valadaa48@gmx.com>\nDate: Sat, 12 Dec 2020 17:04:59 -0500\nSubject: [PATCH] initial overclock\n\n---\n arch/arm64/boot/dts/rockchip/px30.dtsi           | 16 ++++++----------\n .../dts/rockchip/rk3326-odroidgo2-linux-v11.dts  | 15 ++++++++-------\n 2 files changed, 14 insertions(+), 17 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi\nindex 91dd42686b18f..65093245fc4a0 100644\n--- a/arch/arm64/boot/dts/rockchip/px30.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/px30.dtsi\n@@ -111,14 +111,14 @@\n \t\trockchip,temp-hysteresis = <5000>;\n \t\trockchip,low-temp = <0>;\n \t\trockchip,low-temp-min-volt = <1000000>;\n-\t\trockchip,low-temp-adjust-volt = <\n-\t\t\t/* MHz    MHz    uV */\n-\t\t\t0      1512   50000\n-\t\t>;\n+//\t\trockchip,low-temp-adjust-volt = <\n+//\t\t\t/* MHz    MHz    uV */\n+//\t\t\t0      1512   50000\n+//\t\t>;\n \n \t\tclocks = <&cru PLL_APLL>;\n \t\trockchip,avs-scale = <4>;\n-\t\trockchip,max-volt = <1350000>;\n+\t\trockchip,max-volt = <1400000>;\n \t\trockchip,evb-irdrop = <25000>;\n \t\tnvmem-cells = <&cpu_leakage>, <&performance>;\n \t\tnvmem-cell-names = \"cpu_leakage\", \"performance\";\n@@ -218,11 +218,7 @@\n \t\t};\n \t\topp-1512000000 {\n \t\t\topp-hz = /bits/ 64 <1512000000>;\n-\t\t\topp-microvolt = <1350000 1350000 1350000>;\n-\t\t\topp-microvolt-L0 = <1350000 1350000 1350000>;\n-\t\t\topp-microvolt-L1 = <1350000 1350000 1350000>;\n-\t\t\topp-microvolt-L2 = <1300000 1300000 1350000>;\n-\t\t\topp-microvolt-L3 = <1250000 1250000 1350000>;\n+\t\t\topp-microvolt = <1400000>;\n \t\t\tclock-latency-ns = <40000>;\n \t\t};\n \t};\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux-v11.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux-v11.dts\nindex 219892adf9931..8089303e1982d 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux-v11.dts\n+++ b/arch/arm64/boot/dts/rockchip/rk3326-odroidgo2-linux-v11.dts\n@@ -336,17 +336,18 @@\n &cpu0_opp_table {\n \trockchip,avs = <1>;\n \n-\t/* bin scaling clock 1.296MHz */\n \trockchip,bin-scaling-sel = <\n-\t\t0               13\n-\t\t1               13\n+        0               4\n+        1               8\n+        2               13\n+        3               39\n \t>;\n \n-\t/delete-node/ opp-408000000;\n \t/delete-node/ opp-600000000;\n \t/delete-node/ opp-816000000;\n-\t/delete-node/ opp-1416000000;\n-\t/delete-node/ opp-1512000000;\n+\t/delete-node/ opp-1008000000;\n+\t/delete-node/ opp-1200000000;\n+\t/delete-node/ opp-1248000000;\n };\n \n &display_subsystem {\n@@ -620,7 +621,7 @@\n \t\t\t\tregulator-always-on;\n \t\t\t\tregulator-boot-on;\n \t\t\t\tregulator-min-microvolt = <950000>;\n-\t\t\t\tregulator-max-microvolt = <1350000>;\n+\t\t\t\tregulator-max-microvolt = <1400000>;\n \t\t\t\tregulator-ramp-delay = <6001>;\n \t\t\t\tregulator-initial-mode = <0x2>;\n \t\t\t\tregulator-name = \"vdd_arm\";\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/OdroidGoAdvance/r13p0_20200103.patch",
    "content": "From fbfe5c30bf5643f44cc8c87c9b53b1ba2a0bfa49 Mon Sep 17 00:00:00 2001\nFrom: Joy Cho <joy.cho@hardkernel.com>\nDate: Tue, 19 Jan 2021 14:42:03 +0900\nSubject: [PATCH] gpu: bifrost_for_linux: Apply patches for Vulkan\n\nrelease_r13p0_20200103_with_vulkan_cl_kernel\n\nChange-Id: I7dc414e7714242e4876b5db9ee1e4013020fd10a\n---\n drivers/gpu/arm/bifrost_for_linux/Kbuild      |   32 +-\n drivers/gpu/arm/bifrost_for_linux/Kconfig     |   47 +-\n drivers/gpu/arm/bifrost_for_linux/Makefile    |   22 +-\n .../gpu/arm/bifrost_for_linux/Makefile.kbase  |   14 +-\n drivers/gpu/arm/bifrost_for_linux/Mconfig     |  209 +++\n .../arm/bifrost_for_linux/backend/gpu/Kbuild  |   14 +-\n .../backend/gpu/mali_kbase_backend_config.h   |   15 +-\n .../gpu/mali_kbase_cache_policy_backend.c     |   15 +-\n .../gpu/mali_kbase_cache_policy_backend.h     |   15 +-\n .../gpu/mali_kbase_debug_job_fault_backend.c  |   15 +-\n .../backend/gpu/mali_kbase_devfreq.c          |   66 +-\n .../backend/gpu/mali_kbase_devfreq.h          |   15 +-\n .../backend/gpu/mali_kbase_device_hw.c        |   15 +-\n .../backend/gpu/mali_kbase_device_internal.h  |   15 +-\n .../backend/gpu/mali_kbase_gpu.c              |   22 +-\n .../backend/gpu/mali_kbase_gpuprops_backend.c |   23 +-\n .../backend/gpu/mali_kbase_instr_backend.c    |   37 +-\n .../backend/gpu/mali_kbase_instr_defs.h       |   15 +-\n .../backend/gpu/mali_kbase_instr_internal.h   |   15 +-\n .../backend/gpu/mali_kbase_irq_internal.h     |   15 +-\n .../backend/gpu/mali_kbase_irq_linux.c        |   15 +-\n .../backend/gpu/mali_kbase_jm_as.c            |   31 +-\n .../backend/gpu/mali_kbase_jm_defs.h          |   29 +-\n .../backend/gpu/mali_kbase_jm_hw.c            |  135 +-\n .../backend/gpu/mali_kbase_jm_internal.h      |   15 +-\n .../backend/gpu/mali_kbase_jm_rb.c            |   33 +-\n .../backend/gpu/mali_kbase_jm_rb.h            |   25 +-\n .../backend/gpu/mali_kbase_js_affinity.c      |   15 +-\n .../backend/gpu/mali_kbase_js_affinity.h      |   15 +-\n .../backend/gpu/mali_kbase_js_backend.c       |   44 +-\n .../backend/gpu/mali_kbase_js_internal.h      |   15 +-\n .../backend/gpu/mali_kbase_mmu_hw_direct.c    |   18 +-\n .../backend/gpu/mali_kbase_mmu_hw_direct.h    |   15 +-\n .../backend/gpu/mali_kbase_pm_always_on.c     |   15 +-\n .../backend/gpu/mali_kbase_pm_always_on.h     |   15 +-\n .../backend/gpu/mali_kbase_pm_backend.c       |  106 +-\n .../backend/gpu/mali_kbase_pm_ca.c            |   15 +-\n .../backend/gpu/mali_kbase_pm_ca.h            |   15 +-\n .../backend/gpu/mali_kbase_pm_ca_devfreq.c    |   15 +-\n .../backend/gpu/mali_kbase_pm_ca_devfreq.h    |   15 +-\n .../backend/gpu/mali_kbase_pm_ca_fixed.c      |   15 +-\n .../backend/gpu/mali_kbase_pm_ca_fixed.h      |   15 +-\n .../backend/gpu/mali_kbase_pm_coarse_demand.c |   15 +-\n .../backend/gpu/mali_kbase_pm_coarse_demand.h |   15 +-\n .../backend/gpu/mali_kbase_pm_defs.h          |   74 +-\n .../backend/gpu/mali_kbase_pm_demand.c        |   15 +-\n .../backend/gpu/mali_kbase_pm_demand.h        |   15 +-\n .../backend/gpu/mali_kbase_pm_driver.c        |   43 +-\n .../backend/gpu/mali_kbase_pm_internal.h      |   44 +-\n .../backend/gpu/mali_kbase_pm_metrics.c       |  206 +--\n .../backend/gpu/mali_kbase_pm_policy.c        |   37 +-\n .../backend/gpu/mali_kbase_pm_policy.h        |   15 +-\n .../backend/gpu/mali_kbase_time.c             |   15 +-\n .../backend/gpu/mali_kbase_time.h             |   15 +-\n drivers/gpu/arm/bifrost_for_linux/build.bp    |  101 ++\n .../gpu/arm/bifrost_for_linux/docs/Doxyfile   |   20 +-\n .../docs/policy_operation_diagram.dot         |   15 +-\n .../docs/policy_overview.dot                  |   15 +-\n drivers/gpu/arm/bifrost_for_linux/ipa/Kbuild  |   21 +-\n .../bifrost_for_linux/ipa/mali_kbase_ipa.c    |  138 +-\n .../bifrost_for_linux/ipa/mali_kbase_ipa.h    |  111 +-\n .../ipa/mali_kbase_ipa_debugfs.c              |   61 +-\n .../ipa/mali_kbase_ipa_debugfs.h              |   29 +-\n .../ipa/mali_kbase_ipa_simple.c               |   84 +-\n .../ipa/mali_kbase_ipa_simple.h               |   15 +-\n .../ipa/mali_kbase_ipa_vinstr_common.c        |  263 ++-\n .../ipa/mali_kbase_ipa_vinstr_common.h        |  100 +-\n .../ipa/mali_kbase_ipa_vinstr_g7x.c           |  311 ++++\n .../mali_base_hwconfig_features.h             |  203 ++-\n .../mali_base_hwconfig_issues.h               |  110 +-\n .../arm/bifrost_for_linux/mali_base_kernel.h  |  281 ++-\n .../bifrost_for_linux/mali_base_mem_priv.h    |   15 +-\n .../mali_base_vendor_specific_func.h          |   15 +-\n .../gpu/arm/bifrost_for_linux/mali_kbase.h    |   89 +-\n .../mali_kbase_10969_workaround.c             |   22 +-\n .../mali_kbase_10969_workaround.h             |   26 +-\n .../mali_kbase_as_fault_debugfs.c             |   39 +-\n .../mali_kbase_as_fault_debugfs.h             |   15 +-\n .../mali_kbase_cache_policy.c                 |   15 +-\n .../mali_kbase_cache_policy.h                 |   15 +-\n .../arm/bifrost_for_linux/mali_kbase_config.c |   25 +-\n .../arm/bifrost_for_linux/mali_kbase_config.h |   68 +-\n .../mali_kbase_config_defaults.h              |  104 +-\n .../bifrost_for_linux/mali_kbase_context.c    |   59 +-\n .../bifrost_for_linux/mali_kbase_context.h    |   45 +-\n .../bifrost_for_linux/mali_kbase_core_linux.c | 1556 +++++------------\n .../bifrost_for_linux/mali_kbase_ctx_sched.c  |   15 +-\n .../bifrost_for_linux/mali_kbase_ctx_sched.h  |   66 +-\n .../arm/bifrost_for_linux/mali_kbase_debug.c  |   15 +-\n .../arm/bifrost_for_linux/mali_kbase_debug.h  |   15 +-\n .../mali_kbase_debug_job_fault.c              |   15 +-\n .../mali_kbase_debug_job_fault.h              |   15 +-\n .../mali_kbase_debug_mem_view.c               |   21 +-\n .../mali_kbase_debug_mem_view.h               |   15 +-\n .../arm/bifrost_for_linux/mali_kbase_defs.h   | 1260 +++++++++----\n .../arm/bifrost_for_linux/mali_kbase_device.c |   22 +-\n .../mali_kbase_disjoint_events.c              |   15 +-\n .../bifrost_for_linux/mali_kbase_dma_fence.c  |   15 +-\n .../bifrost_for_linux/mali_kbase_dma_fence.h  |   15 +-\n .../arm/bifrost_for_linux/mali_kbase_event.c  |   15 +-\n .../arm/bifrost_for_linux/mali_kbase_fence.c  |   24 +-\n .../arm/bifrost_for_linux/mali_kbase_fence.h  |   24 +-\n .../bifrost_for_linux/mali_kbase_fence_defs.h |   29 +-\n .../arm/bifrost_for_linux/mali_kbase_gator.h  |   15 +-\n .../bifrost_for_linux/mali_kbase_gator_api.c  |   21 +-\n .../bifrost_for_linux/mali_kbase_gator_api.h  |   15 +-\n .../mali_kbase_gator_hwcnt_names.h            |   21 +-\n .../mali_kbase_gator_hwcnt_names_tgox.h       |  296 ++++\n .../mali_kbase_gator_hwcnt_names_thex.h       |   17 +-\n .../mali_kbase_gator_hwcnt_names_tkax.h       |  296 ++++\n .../mali_kbase_gator_hwcnt_names_tmix.h       |   17 +-\n .../mali_kbase_gator_hwcnt_names_tnox.h       |  296 ++++\n .../mali_kbase_gator_hwcnt_names_tsix.h       |   21 +-\n .../mali_kbase_gator_hwcnt_names_ttrx.h       |  296 ++++\n .../arm/bifrost_for_linux/mali_kbase_gpu_id.h |   96 +-\n .../mali_kbase_gpu_memory_debugfs.c           |   19 +-\n .../mali_kbase_gpu_memory_debugfs.h           |   15 +-\n .../bifrost_for_linux/mali_kbase_gpuprops.c   |  100 +-\n .../bifrost_for_linux/mali_kbase_gpuprops.h   |   27 +-\n .../mali_kbase_gpuprops_types.h               |   20 +-\n .../arm/bifrost_for_linux/mali_kbase_gwt.c    |  270 +++\n .../arm/bifrost_for_linux/mali_kbase_gwt.h    |   55 +\n .../gpu/arm/bifrost_for_linux/mali_kbase_hw.c |   62 +-\n .../gpu/arm/bifrost_for_linux/mali_kbase_hw.h |   15 +-\n .../mali_kbase_hwaccess_backend.h             |   15 +-\n .../mali_kbase_hwaccess_defs.h                |   31 +-\n .../mali_kbase_hwaccess_gpuprops.h            |   21 +-\n .../mali_kbase_hwaccess_instr.h               |   23 +-\n .../mali_kbase_hwaccess_jm.h                  |   23 +-\n .../mali_kbase_hwaccess_pm.h                  |   15 +-\n .../mali_kbase_hwaccess_time.h                |   15 +-\n .../mali_kbase_hwcnt_reader.h                 |   15 +-\n .../arm/bifrost_for_linux/mali_kbase_ioctl.h  |  214 ++-\n .../gpu/arm/bifrost_for_linux/mali_kbase_jd.c |  274 +--\n .../bifrost_for_linux/mali_kbase_jd_debugfs.c |   16 +-\n .../bifrost_for_linux/mali_kbase_jd_debugfs.h |   15 +-\n .../gpu/arm/bifrost_for_linux/mali_kbase_jm.c |   27 +-\n .../gpu/arm/bifrost_for_linux/mali_kbase_jm.h |   15 +-\n .../gpu/arm/bifrost_for_linux/mali_kbase_js.c |  298 ++--\n .../gpu/arm/bifrost_for_linux/mali_kbase_js.h |   77 +-\n .../mali_kbase_js_ctx_attr.c                  |   15 +-\n .../mali_kbase_js_ctx_attr.h                  |   15 +-\n .../bifrost_for_linux/mali_kbase_js_defs.h    |   79 +-\n .../arm/bifrost_for_linux/mali_kbase_linux.h  |   15 +-\n .../arm/bifrost_for_linux/mali_kbase_mem.c    | 1211 ++++++++++---\n .../arm/bifrost_for_linux/mali_kbase_mem.h    |  371 +++-\n .../bifrost_for_linux/mali_kbase_mem_linux.c  |  448 +----\n .../bifrost_for_linux/mali_kbase_mem_linux.h  |  131 +-\n .../mali_kbase_mem_lowlevel.h                 |   78 +-\n .../bifrost_for_linux/mali_kbase_mem_pool.c   |  265 ++-\n .../mali_kbase_mem_pool_debugfs.c             |   15 +-\n .../mali_kbase_mem_pool_debugfs.h             |   15 +-\n .../mali_kbase_mem_profile_debugfs.c          |   15 +-\n .../mali_kbase_mem_profile_debugfs.h          |   15 +-\n .../mali_kbase_mem_profile_debugfs_buf_size.h |   20 +-\n .../arm/bifrost_for_linux/mali_kbase_mmu.c    |  401 ++++-\n .../arm/bifrost_for_linux/mali_kbase_mmu_hw.h |   15 +-\n .../mali_kbase_mmu_mode_aarch64.c             |   46 +-\n .../mali_kbase_mmu_mode_lpae.c                |   47 +-\n .../mali_kbase_platform_fake.c                |   15 +-\n .../gpu/arm/bifrost_for_linux/mali_kbase_pm.c |   39 +-\n .../gpu/arm/bifrost_for_linux/mali_kbase_pm.h |   15 +-\n .../mali_kbase_profiling_gator_api.h          |   15 +-\n .../mali_kbase_regs_history_debugfs.c         |   15 +-\n .../mali_kbase_regs_history_debugfs.h         |   15 +-\n .../arm/bifrost_for_linux/mali_kbase_replay.c |   38 +-\n .../arm/bifrost_for_linux/mali_kbase_smc.c    |   15 +-\n .../arm/bifrost_for_linux/mali_kbase_smc.h    |   15 +-\n .../bifrost_for_linux/mali_kbase_softjobs.c   |  115 +-\n .../bifrost_for_linux/mali_kbase_strings.c    |   15 +-\n .../bifrost_for_linux/mali_kbase_strings.h    |   15 +-\n .../arm/bifrost_for_linux/mali_kbase_sync.h   |   15 +-\n .../mali_kbase_sync_android.c                 |   15 +-\n .../mali_kbase_sync_common.c                  |   15 +-\n .../bifrost_for_linux/mali_kbase_sync_file.c  |   25 +-\n .../bifrost_for_linux/mali_kbase_tlstream.c   |  100 +-\n .../bifrost_for_linux/mali_kbase_tlstream.h   |   45 +-\n .../bifrost_for_linux/mali_kbase_trace_defs.h |   15 +-\n .../mali_kbase_trace_timeline.c               |   15 +-\n .../mali_kbase_trace_timeline.h               |   15 +-\n .../mali_kbase_trace_timeline_defs.h          |   15 +-\n .../bifrost_for_linux/mali_kbase_utility.c    |   15 +-\n .../bifrost_for_linux/mali_kbase_utility.h    |   41 +-\n .../arm/bifrost_for_linux/mali_kbase_vinstr.c |  417 ++++-\n .../arm/bifrost_for_linux/mali_kbase_vinstr.h |   53 +-\n .../mali_linux_kbase_trace.h                  |   15 +-\n .../arm/bifrost_for_linux/mali_linux_trace.h  |   15 +-\n .../gpu/arm/bifrost_for_linux/mali_malisw.h   |   15 +-\n .../bifrost_for_linux/mali_midg_coherency.h   |   15 +-\n .../arm/bifrost_for_linux/mali_midg_regmap.h  |   31 +-\n .../gpu/arm/bifrost_for_linux/mali_timeline.h |   15 +-\n drivers/gpu/arm/bifrost_for_linux/mali_uk.h   |   15 +-\n .../arm/bifrost_for_linux/platform/Kconfig    |   14 +-\n .../platform/devicetree/Kbuild                |   14 +-\n .../devicetree/mali_kbase_config_devicetree.c |   23 +-\n .../devicetree/mali_kbase_config_platform.h   |   50 +-\n .../devicetree/mali_kbase_runtime_pm.c        |   21 +-\n .../platform/rk/mali_kbase_config_rk.c        |   53 +-\n .../platform/vexpress/Kbuild                  |   15 +-\n .../vexpress/mali_kbase_config_platform.h     |   52 +-\n .../vexpress/mali_kbase_config_vexpress.c     |   38 +-\n .../platform/vexpress_1xv7_a57/Kbuild         |   14 +-\n .../mali_kbase_config_platform.h              |   50 +-\n .../mali_kbase_config_vexpress.c              |   36 +-\n .../platform/vexpress_6xvirtex7_10mhz/Kbuild  |   14 +-\n .../mali_kbase_config_platform.h              |   52 +-\n .../mali_kbase_config_vexpress.c              |   38 +-\n .../platform_dummy/mali_ukk_os.h              |   15 +-\n .../protected_mode_switcher.h                 |   15 +-\n drivers/gpu/arm/bifrost_for_linux/sconscript  |   30 +-\n .../gpu/arm/bifrost_for_linux/tests/Kbuild    |   14 +-\n .../gpu/arm/bifrost_for_linux/tests/Kconfig   |   14 +-\n .../gpu/arm/bifrost_for_linux/tests/Mconfig   |   22 +\n .../gpu/arm/bifrost_for_linux/tests/build.bp  |   36 +\n .../tests/include/kutf/kutf_helpers.h         |  217 +--\n .../tests/include/kutf/kutf_helpers_user.h    |   64 +-\n .../tests/include/kutf/kutf_mem.h             |   15 +-\n .../tests/include/kutf/kutf_resultset.h       |   92 +-\n .../tests/include/kutf/kutf_suite.h           |  113 +-\n .../tests/include/kutf/kutf_utils.h           |   15 +-\n .../arm/bifrost_for_linux/tests/kutf/Kbuild   |   14 +-\n .../arm/bifrost_for_linux/tests/kutf/Kconfig  |   14 +-\n .../arm/bifrost_for_linux/tests/kutf/Makefile |   14 +-\n .../arm/bifrost_for_linux/tests/kutf/build.bp |   31 +\n .../tests/kutf/kutf_helpers.c                 |  777 +-------\n .../tests/kutf/kutf_helpers_user.c            |  132 +-\n .../bifrost_for_linux/tests/kutf/kutf_mem.c   |   16 +-\n .../tests/kutf/kutf_resultset.c               |  113 +-\n .../bifrost_for_linux/tests/kutf/kutf_suite.c |  631 +++----\n .../bifrost_for_linux/tests/kutf/kutf_utils.c |   15 +-\n .../bifrost_for_linux/tests/kutf/sconscript   |   14 +-\n .../tests/mali_kutf_irq_test/Kbuild           |   14 +-\n .../tests/mali_kutf_irq_test/Kconfig          |   14 +-\n .../tests/mali_kutf_irq_test/Makefile         |   21 +-\n .../tests/mali_kutf_irq_test/build.bp         |   27 +\n .../mali_kutf_irq_test_main.c                 |   15 +-\n .../tests/mali_kutf_irq_test/sconscript       |   18 +-\n .../arm/bifrost_for_linux/tests/sconscript    |   14 +-\n .../thirdparty/mali_kbase_mmap.c              |  322 ++++\n 239 files changed, 11476 insertions(+), 6794 deletions(-)\n create mode 100644 drivers/gpu/arm/bifrost_for_linux/Mconfig\n create mode 100644 drivers/gpu/arm/bifrost_for_linux/build.bp\n create mode 100644 drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_vinstr_g7x.c\n create mode 100644 drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tgox.h\n create mode 100644 drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tkax.h\n create mode 100644 drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tnox.h\n create mode 100644 drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_ttrx.h\n create mode 100644 drivers/gpu/arm/bifrost_for_linux/mali_kbase_gwt.c\n create mode 100644 drivers/gpu/arm/bifrost_for_linux/mali_kbase_gwt.h\n create mode 100644 drivers/gpu/arm/bifrost_for_linux/tests/Mconfig\n create mode 100644 drivers/gpu/arm/bifrost_for_linux/tests/build.bp\n create mode 100644 drivers/gpu/arm/bifrost_for_linux/tests/kutf/build.bp\n create mode 100644 drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/build.bp\n create mode 100644 drivers/gpu/arm/bifrost_for_linux/thirdparty/mali_kbase_mmap.c\n\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/Kbuild b/drivers/gpu/arm/bifrost_for_linux/Kbuild\nindex 531b92126b985a..65a3468736a819 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/Kbuild\n+++ b/drivers/gpu/arm/bifrost_for_linux/Kbuild\n@@ -1,37 +1,38 @@\n #\n-# (C) COPYRIGHT 2012-2016, 2017 ARM Limited. All rights reserved.\n+# (C) COPYRIGHT 2012-2018 ARM Limited. All rights reserved.\n #\n # This program is free software and is provided to you under the terms of the\n # GNU General Public License version 2 as published by the Free Software\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n \n # Driver version string which is returned to userspace via an ioctl\n-MALI_RELEASE_NAME ?= \"r8p0-01rel0\"\n+MALI_RELEASE_NAME ?= \"r12p0-01rel0\"\n \n # Paths required for build\n KBASE_PATH = $(src)\n KBASE_PLATFORM_PATH = $(KBASE_PATH)/platform_dummy\n UMP_PATH = $(src)/../../../base\n \n-ifeq ($(CONFIG_MALI_BIFROST_ERROR_INJECT),y)\n-MALI_ERROR_INJECT_ON = 1\n-endif\n-\n # Set up defaults if not defined by build system\n MALI_CUSTOMER_RELEASE ?= 1\n MALI_UNIT_TEST ?= 0\n MALI_KERNEL_TEST_API ?= 0\n-MALI_ERROR_INJECT_ON ?= 0\n MALI_MOCK_TEST ?= 0\n MALI_COVERAGE ?= 0\n-MALI_INSTRUMENTATION_LEVEL ?= 0\n CONFIG_MALI_PLATFORM_NAME ?= \"devicetree\"\n # This workaround is for what seems to be a compiler bug we observed in\n # GCC 4.7 on AOSP 4.3.  The bug caused an intermittent failure compiling\n@@ -50,10 +51,8 @@ DEFINES = \\\n \t-DMALI_CUSTOMER_RELEASE=$(MALI_CUSTOMER_RELEASE) \\\n \t-DMALI_KERNEL_TEST_API=$(MALI_KERNEL_TEST_API) \\\n \t-DMALI_UNIT_TEST=$(MALI_UNIT_TEST) \\\n-\t-DMALI_ERROR_INJECT_ON=$(MALI_ERROR_INJECT_ON) \\\n \t-DMALI_MOCK_TEST=$(MALI_MOCK_TEST) \\\n \t-DMALI_COVERAGE=$(MALI_COVERAGE) \\\n-\t-DMALI_INSTRUMENTATION_LEVEL=$(MALI_INSTRUMENTATION_LEVEL) \\\n \t-DMALI_RELEASE_NAME=\\\"$(MALI_RELEASE_NAME)\\\" \\\n \t-DMALI_GCC_WORKAROUND_MIDCOM_4598=$(MALI_GCC_WORKAROUND_MIDCOM_4598)\n \n@@ -111,10 +110,13 @@ SRC := \\\n \tmali_kbase_tlstream.c \\\n \tmali_kbase_strings.c \\\n \tmali_kbase_as_fault_debugfs.c \\\n-\tmali_kbase_regs_history_debugfs.c\n-\n+\tmali_kbase_regs_history_debugfs.c \\\n+\tthirdparty/mali_kbase_mmap.c\n \n \n+ifeq ($(CONFIG_MALI_JOB_DUMP),y)\n+\tSRC += mali_kbase_gwt.c\n+endif\n \n ifeq ($(MALI_UNIT_TEST),1)\n \tSRC += mali_kbase_tlstream_test.c\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/Kconfig b/drivers/gpu/arm/bifrost_for_linux/Kconfig\nindex e78b634031eeb4..f4fecdaca0e4b8 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/Kconfig\n+++ b/drivers/gpu/arm/bifrost_for_linux/Kconfig\n@@ -1,21 +1,28 @@\n #\n-# (C) COPYRIGHT 2012-2017 ARM Limited. All rights reserved.\n+# (C) COPYRIGHT 2012-2018 ARM Limited. All rights reserved.\n #\n # This program is free software and is provided to you under the terms of the\n # GNU General Public License version 2 as published by the Free Software\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n \n menuconfig MALI_BIFROST\n-\ttristate \"Mali Bifrost series support (Linux only)\"\n+\ttristate \"Mali Bifrost series support\"\n+\tselect GPU_TRACEPOINTS if ANDROID\n \tdefault n\n \thelp\n \t  Enable this option to build support for a ARM Mali Bifrost GPU.\n@@ -60,13 +67,13 @@ config MALI_BIFROST_DEVFREQ\n \n config MALI_BIFROST_DMA_FENCE\n \tbool \"DMA_BUF fence support for Mali\"\n-\tdepends on MALI_BIFROST && !KDS\n+\tdepends on MALI_BIFROST\n \tdefault n\n \thelp\n \t  Support DMA_BUF fences for Mali.\n \n-\t  This option should only be enabled if KDS is not present and\n-\t  the Linux Kernel has built in support for DMA_BUF fences.\n+\t  This option should only be enabled if the Linux Kernel has built in\n+\t  support for DMA_BUF fences.\n \n config MALI_PLATFORM_NAME\n \tdepends on MALI_BIFROST\n@@ -169,7 +176,17 @@ config MALI_BIFROST_SYSTEM_TRACE\n \tdefault n\n \thelp\n \t  Choose this option to enable system trace events for each\n-\t  kbase event.\tThis is typically used for debugging but has\n+\t  kbase event. This is typically used for debugging but has\n+\t  minimal overhead when not in use. Enable only if you know what\n+\t  you are doing.\n+\n+config MALI_JOB_DUMP\n+\tbool \"Enable system level support needed for job dumping\"\n+\tdepends on MALI_BIFROST && MALI_BIFROST_EXPERT\n+\tdefault n\n+\thelp\n+\t  Choose this option to enable system level support needed for\n+\t  job dumping. This is typically used for instrumentation but has\n \t  minimal overhead when not in use. Enable only if you know what\n \t  you are doing.\n \n@@ -186,11 +203,15 @@ config MALI_2MB_ALLOC\n \n config MALI_PWRSOFT_765\n \tbool \"PWRSOFT-765 ticket\"\n+\tdepends on MALI_BIFROST && MALI_BIFROST_EXPERT\n \tdefault n\n \thelp\n-\t  PWRSOFT-765 fixes devfreq cooling devices issues. However, they are\n-\t  not merged in mainline kernel yet. So this define helps to guard those\n-\t  parts of the code.\n+\t  PWRSOFT-765 fixes devfreq cooling devices issues. The fix was merged\n+\t  in kernel v4.10, however if backported into the kernel then this\n+\t  option must be manually selected.\n+\n+\t  If using kernel >= v4.10 then say N, otherwise if devfreq cooling\n+\t  changes have been backported say Y to avoid compilation errors.\n \n source \"drivers/gpu/arm/bifrost/platform/Kconfig\"\n # source \"drivers/gpu/arm/bifrost/tests/Kconfig\"\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/Makefile b/drivers/gpu/arm/bifrost_for_linux/Makefile\nindex 26522d566dd09c..13af9f473890c5 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/Makefile\n+++ b/drivers/gpu/arm/bifrost_for_linux/Makefile\n@@ -1,26 +1,29 @@\n #\n-# (C) COPYRIGHT 2010-2016, 2017 ARM Limited. All rights reserved.\n+# (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n #\n # This program is free software and is provided to you under the terms of the\n # GNU General Public License version 2 as published by the Free Software\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n \n KDIR ?= /lib/modules/$(shell uname -r)/build\n \n BUSLOG_PATH_RELATIVE = $(CURDIR)/../../../..\n-UMP_PATH_RELATIVE = $(CURDIR)/../../../base/ump\n KBASE_PATH_RELATIVE = $(CURDIR)\n-KDS_PATH_RELATIVE = $(CURDIR)/../../../..\n-EXTRA_SYMBOLS = $(UMP_PATH_RELATIVE)/src/Module.symvers\n \n ifeq ($(MALI_UNIT_TEST), 1)\n \tEXTRA_SYMBOLS += $(KBASE_PATH_RELATIVE)/tests/internal/src/kernel_assert_module/linux/Module.symvers\n@@ -31,9 +34,6 @@ ifeq ($(CONFIG_MALI_FPGA_BUS_LOGGER),y)\n EXTRA_SYMBOLS += $(BUSLOG_PATH_RELATIVE)/drivers/base/bus_logger/Module.symvers\n endif\n \n-# GPL driver supports KDS\n-EXTRA_SYMBOLS += $(KDS_PATH_RELATIVE)/drivers/base/kds/Module.symvers\n-\n # we get the symbols from modules using KBUILD_EXTRA_SYMBOLS to prevent warnings about unknown functions\n all:\n \t$(MAKE) -C $(KDIR) M=$(CURDIR) EXTRA_CFLAGS=\"-I$(CURDIR)/../../../../include -I$(CURDIR)/../../../../tests/include $(SCONS_CFLAGS)\" $(SCONS_CONFIGS) KBUILD_EXTRA_SYMBOLS=\"$(EXTRA_SYMBOLS)\" modules\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/Makefile.kbase b/drivers/gpu/arm/bifrost_for_linux/Makefile.kbase\nindex 2bef9c25eaeb89..d7898cb3d1a537 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/Makefile.kbase\n+++ b/drivers/gpu/arm/bifrost_for_linux/Makefile.kbase\n@@ -6,12 +6,18 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n EXTRA_CFLAGS += -I$(ROOT) -I$(KBASE_PATH) -I$(OSK_PATH)/src/linux/include -I$(KBASE_PATH)/platform_$(PLATFORM)\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/Mconfig b/drivers/gpu/arm/bifrost_for_linux/Mconfig\nnew file mode 100644\nindex 00000000000000..d9847e3dffa279\n--- /dev/null\n+++ b/drivers/gpu/arm/bifrost_for_linux/Mconfig\n@@ -0,0 +1,209 @@\n+#\n+# (C) COPYRIGHT 2012-2017 ARM Limited. All rights reserved.\n+#\n+# This program is free software and is provided to you under the terms of the\n+# GNU General Public License version 2 as published by the Free Software\n+# Foundation, and any use by you of this program is subject to the terms\n+# of such GNU licence.\n+#\n+# A copy of the licence is included with the program, and can also be obtained\n+# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n+# Boston, MA  02110-1301, USA.\n+#\n+#\n+\n+\n+menuconfig MALI_BIFROST\n+\tbool \"Mali Midgard series support\"\n+\tdefault y\n+\thelp\n+\t  Enable this option to build support for a ARM Mali Midgard GPU.\n+\n+\t  To compile this driver as a module, choose M here:\n+\t  this will generate a single module, called mali_kbase.\n+\n+config MALI_BIFROST_GATOR_SUPPORT\n+\tbool \"Streamline support via Gator\"\n+\tdepends on MALI_BIFROST\n+\tdefault y if INSTRUMENTATION_STREAMLINE_OLD\n+\tdefault n\n+\thelp\n+\t  Adds diagnostic support for use with the ARM Streamline Performance Analyzer.\n+\t  You will need the Gator device driver already loaded before loading this driver when enabling\n+\t  Streamline debug support.\n+\t  This is a legacy interface required by older versions of Streamline.\n+\n+config MALI_BIFROST_DVFS\n+\tbool \"Enable legacy DVFS\"\n+\tdepends on MALI_BIFROST && !MALI_BIFROST_DEVFREQ\n+\tdefault n\n+\thelp\n+\t  Choose this option to enable legacy DVFS in the Mali Midgard DDK.\n+\n+config MALI_BIFROST_ENABLE_TRACE\n+\tbool \"Enable kbase tracing\"\n+\tdepends on MALI_BIFROST\n+\tdefault n\n+\thelp\n+\t  Enables tracing in kbase.  Trace log available through\n+\t  the \"mali_trace\" debugfs file, when the CONFIG_DEBUG_FS is enabled\n+\n+config MALI_BIFROST_DEVFREQ\n+\tbool \"devfreq support for Mali\"\n+\tdepends on MALI_BIFROST\n+\tdefault y if PLATFORM_JUNO\n+\tdefault y if PLATFORM_CUSTOM\n+\thelp\n+\t  Support devfreq for Mali.\n+\n+\t  Using the devfreq framework and, by default, the simpleondemand\n+\t  governor, the frequency of Mali will be dynamically selected from the\n+\t  available OPPs.\n+\n+config MALI_BIFROST_DMA_FENCE\n+\tbool \"DMA_BUF fence support for Mali\"\n+\tdepends on MALI_BIFROST\n+\tdefault n\n+\thelp\n+\t  Support DMA_BUF fences for Mali.\n+\n+\t  This option should only be enabled if the Linux Kernel has built in\n+\t  support for DMA_BUF fences.\n+\n+config MALI_PLATFORM_NAME\n+\tdepends on MALI_BIFROST\n+\tstring \"Platform name\"\n+\tdefault \"arndale\" if PLATFORM_ARNDALE\n+\tdefault \"arndale_octa\" if PLATFORM_ARNDALE_OCTA\n+\tdefault \"rk\" if PLATFORM_FIREFLY\n+\tdefault \"hisilicon\" if PLATFORM_HIKEY960\n+\tdefault \"vexpress\" if PLATFORM_VEXPRESS\n+\tdefault \"devicetree\"\n+\thelp\n+\t  Enter the name of the desired platform configuration directory to\n+\t  include in the build. 'platform/$(MALI_PLATFORM_NAME)/Kbuild' must\n+\t  exist.\n+\n+config MALI_MOCK_TEST\n+\tbool\n+\tdepends on MALI_BIFROST && !RELEASE\n+\tdefault y\n+\n+# MALI_BIFROST_EXPERT configuration options\n+\n+menuconfig MALI_BIFROST_EXPERT\n+\tdepends on MALI_BIFROST\n+\tbool \"Enable Expert Settings\"\n+\tdefault y\n+\thelp\n+\t  Enabling this option and modifying the default settings may produce a driver with performance or\n+\t  other limitations.\n+\n+config MALI_CORESTACK\n+\tbool \"Support controlling power to the GPU core stack\"\n+\tdepends on MALI_BIFROST && MALI_BIFROST_EXPERT\n+\tdefault n\n+\thelp\n+\t  Enabling this feature on supported GPUs will let the driver powering\n+\t  on/off the GPU core stack independently without involving the Power\n+\t  Domain Controller. This should only be enabled on platforms which\n+\t  integration of the PDC to the Mali GPU is known to be problematic.\n+\t  This feature is currently only supported on t-Six and t-HEx GPUs.\n+\n+\t  If unsure, say N.\n+\n+config MALI_BIFROST_PRFCNT_SET_SECONDARY\n+\tbool \"Use secondary set of performance counters\"\n+\tdepends on MALI_BIFROST && MALI_BIFROST_EXPERT\n+\tdefault n\n+\thelp\n+\t  Select this option to use secondary set of performance counters. Kernel\n+\t  features that depend on an access to the primary set of counters may\n+\t  become unavailable. Enabling this option will prevent power management\n+\t  from working optimally and may cause instrumentation tools to return\n+\t  bogus results.\n+\n+\t  If unsure, say N.\n+\n+config MALI_BIFROST_DEBUG\n+\tbool \"Debug build\"\n+\tdepends on MALI_BIFROST && MALI_BIFROST_EXPERT\n+\tdefault y if DEBUG\n+\tdefault n\n+\thelp\n+\t  Select this option for increased checking and reporting of errors.\n+\n+config MALI_BIFROST_FENCE_DEBUG\n+\tbool \"Debug sync fence usage\"\n+\tdepends on MALI_BIFROST && MALI_BIFROST_EXPERT\n+\tdefault y if MALI_BIFROST_DEBUG\n+\thelp\n+\t  Select this option to enable additional checking and reporting on the\n+\t  use of sync fences in the Mali driver.\n+\n+\t  This will add a 3s timeout to all sync fence waits in the Mali\n+\t  driver, so that when work for Mali has been waiting on a sync fence\n+\t  for a long time a debug message will be printed, detailing what fence\n+\t  is causing the block, and which dependent Mali atoms are blocked as a\n+\t  result of this.\n+\n+\t  The timeout can be changed at runtime through the js_soft_timeout\n+\t  device attribute, where the timeout is specified in milliseconds.\n+\n+config MALI_BIFROST_ERROR_INJECT\n+\tbool \"Error injection\"\n+\tdepends on MALI_BIFROST && MALI_BIFROST_EXPERT && NO_MALI\n+\tdefault n\n+\thelp\n+\t  Enables insertion of errors to test module failure and recovery mechanisms.\n+\n+config MALI_ERROR_INJECT_RANDOM\n+\tbool \"Random error injection\"\n+\tdepends on MALI_BIFROST && MALI_BIFROST_EXPERT && NO_MALI && MALI_BIFROST_ERROR_INJECT\n+\tdefault n\n+\thelp\n+\t  Injected errors are random, rather than user-driven.\n+\n+config MALI_BIFROST_TRACE_TIMELINE\n+\tbool \"Timeline tracing\"\n+\tdepends on MALI_BIFROST && MALI_BIFROST_EXPERT\n+\tdefault n\n+\thelp\n+\t  Enables timeline tracing through the kernel tracepoint system.\n+\n+config MALI_BIFROST_SYSTEM_TRACE\n+\tbool \"Enable system event tracing support\"\n+\tdepends on MALI_BIFROST && MALI_BIFROST_EXPERT\n+\tdefault n\n+\thelp\n+\t  Choose this option to enable system trace events for each\n+\t  kbase event.\tThis is typically used for debugging but has\n+\t  minimal overhead when not in use. Enable only if you know what\n+\t  you are doing.\n+\n+config MALI_2MB_ALLOC\n+\tbool \"Attempt to allocate 2MB pages\"\n+\tdepends on MALI_BIFROST && MALI_BIFROST_EXPERT\n+\tdefault n\n+\thelp\n+\t  Rather than allocating all GPU memory page-by-page, attempt to\n+\t  allocate 2MB pages from the kernel. This reduces TLB pressure and\n+\t  helps to prevent memory fragmentation.\n+\n+\t  If in doubt, say N\n+\n+config MALI_FPGA_BUS_LOGGER\n+\tbool \"Enable bus log integration\"\n+\tdepends on MALI_BIFROST && MALI_BIFROST_EXPERT\n+\tdefault n\n+\n+config MALI_PWRSOFT_765\n+\tbool \"PWRSOFT-765 ticket\"\n+\tdepends on MALI_BIFROST && MALI_BIFROST_EXPERT\n+\tdefault n\n+\thelp\n+\t  PWRSOFT-765 fixes devfreq cooling devices issues. However, they are\n+\t  not merged in mainline kernel yet. So this define helps to guard those\n+\t  parts of the code.\n+\n+source \"kernel/drivers/gpu/arm/midgard/tests/Mconfig\"\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/Kbuild b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/Kbuild\nindex 5eeba1b14710c6..be255c65a5fc30 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/Kbuild\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/Kbuild\n@@ -6,12 +6,18 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n BACKEND += \\\n \tbackend/gpu/mali_kbase_cache_policy_backend.c \\\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_backend_config.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_backend_config.h\nindex c8ae87eb84a283..196a776f7f9dfe 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_backend_config.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_backend_config.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * Backend specific configuration\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_cache_policy_backend.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_cache_policy_backend.c\nindex fef9a2cb743ebd..49567f785d2c9e 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_cache_policy_backend.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_cache_policy_backend.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include \"backend/gpu/mali_kbase_cache_policy_backend.h\"\n #include <backend/gpu/mali_kbase_device_internal.h>\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_cache_policy_backend.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_cache_policy_backend.h\nindex fe9869109a8257..f78ada74f605e8 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_cache_policy_backend.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_cache_policy_backend.h\n@@ -7,15 +7,20 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n #ifndef _KBASE_CACHE_POLICY_BACKEND_H_\n #define _KBASE_CACHE_POLICY_BACKEND_H_\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_debug_job_fault_backend.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_debug_job_fault_backend.c\nindex 7851ea6466c78e..c9c463eb458d00 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_debug_job_fault_backend.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_debug_job_fault_backend.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <mali_kbase.h>\n #include <backend/gpu/mali_kbase_device_internal.h>\n #include \"mali_kbase_debug_job_fault.h\"\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_devfreq.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_devfreq.c\nindex 0a961885b76673..ddda6934003b10 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_devfreq.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_devfreq.c\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2014-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <mali_kbase.h>\n #include <mali_kbase_tlstream.h>\n #include <mali_kbase_config_defaults.h>\n@@ -42,7 +47,6 @@\n #define dev_pm_opp_find_freq_ceil opp_find_freq_ceil\n #define dev_pm_opp_find_freq_floor opp_find_freq_floor\n #endif /* Linux >= 3.13 */\n-\n #include <soc/rockchip/rockchip_opp_select.h>\n #include <soc/rockchip/rockchip_system_monitor.h>\n \n@@ -96,15 +100,21 @@ kbase_devfreq_target(struct device *dev, unsigned long *target_freq, u32 flags)\n \n \tfreq = *target_freq;\n \n+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)\n \trcu_read_lock();\n+#endif\n \topp = devfreq_recommended_opp(dev, &freq, flags);\n-\tif (IS_ERR(opp)) {\n-\t\trcu_read_unlock();\n+\tvoltage = dev_pm_opp_get_voltage(opp);\n+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)\n+\trcu_read_unlock();\n+#endif\n+\tif (IS_ERR_OR_NULL(opp)) {\n \t\tdev_err(dev, \"Failed to get opp (%ld)\\n\", PTR_ERR(opp));\n \t\treturn PTR_ERR(opp);\n \t}\n-\tvoltage = dev_pm_opp_get_voltage(opp);\n-\trcu_read_unlock();\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)\n+\tdev_pm_opp_put(opp);\n+#endif\n \n \tnominal_freq = freq;\n \t/*\n@@ -169,8 +179,6 @@ kbase_devfreq_target(struct device *dev, unsigned long *target_freq, u32 flags)\n \n \tKBASE_TLSTREAM_AUX_DEVFREQ_TARGET((u64)nominal_freq);\n \n-\tkbase_pm_reset_dvfs_utilisation(kbdev);\n-\n \treturn err;\n }\n \n@@ -188,10 +196,13 @@ static int\n kbase_devfreq_status(struct device *dev, struct devfreq_dev_status *stat)\n {\n \tstruct kbase_device *kbdev = dev_get_drvdata(dev);\n+\tstruct kbasep_pm_metrics diff;\n \n-\tkbase_pm_get_dvfs_utilisation(kbdev,\n-\t\t\t&stat->total_time, &stat->busy_time);\n+\tkbase_pm_get_dvfs_metrics(kbdev, &kbdev->last_devfreq_metrics, &diff);\n \n+\tstat->busy_time = diff.time_busy;\n+\tstat->total_time = diff.time_busy + diff.time_idle;\n+\tstat->current_frequency = kbdev->current_nominal_freq;\n \tstat->private_data = NULL;\n \n \treturn 0;\n@@ -205,28 +216,37 @@ static int kbase_devfreq_init_freq_table(struct kbase_device *kbdev,\n \tunsigned long freq;\n \tstruct dev_pm_opp *opp;\n \n+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)\n \trcu_read_lock();\n+#endif\n \tcount = dev_pm_opp_get_opp_count(kbdev->dev);\n-\tif (count < 0) {\n-\t\trcu_read_unlock();\n-\t\treturn count;\n-\t}\n+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)\n \trcu_read_unlock();\n+#endif\n+\tif (count < 0)\n+\t\treturn count;\n \n \tdp->freq_table = kmalloc_array(count, sizeof(dp->freq_table[0]),\n \t\t\t\tGFP_KERNEL);\n \tif (!dp->freq_table)\n \t\treturn -ENOMEM;\n \n+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)\n \trcu_read_lock();\n+#endif\n \tfor (i = 0, freq = ULONG_MAX; i < count; i++, freq--) {\n \t\topp = dev_pm_opp_find_freq_floor(kbdev->dev, &freq);\n \t\tif (IS_ERR(opp))\n \t\t\tbreak;\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)\n+\t\tdev_pm_opp_put(opp);\n+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) */\n \n \t\tdp->freq_table[i] = freq;\n \t}\n+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)\n \trcu_read_unlock();\n+#endif\n \n \tif (count != i)\n \t\tdev_warn(kbdev->dev, \"Unable to enumerate all OPPs (%d!=%d\\n\",\n@@ -351,6 +371,12 @@ int kbase_devfreq_init(struct kbase_device *kbdev)\n \tif (kbase_devfreq_init_freq_table(kbdev, dp))\n \t\treturn -EFAULT;\n \n+\tif (dp->max_state > 0) {\n+\t\t/* Record the maximum frequency possible */\n+\t\tkbdev->gpu_props.props.core_props.gpu_freq_khz_max =\n+\t\t\tdp->freq_table[0] / 1000;\n+\t};\n+\n \terr = kbase_devfreq_init_core_mask_table(kbdev);\n \tif (err)\n \t\treturn err;\n@@ -358,7 +384,7 @@ int kbase_devfreq_init(struct kbase_device *kbdev)\n \tkbdev->devfreq = devfreq_add_device(kbdev->dev, dp,\n \t\t\t\t\"simple_ondemand\", NULL);\n \tif (IS_ERR(kbdev->devfreq)) {\n-\t\tkbase_devfreq_term_freq_table(kbdev);\n+\t\tkfree(dp->freq_table);\n \t\treturn PTR_ERR(kbdev->devfreq);\n \t}\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_devfreq.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_devfreq.h\nindex 7bcc350f3006ce..ed484366db2413 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_devfreq.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_devfreq.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _BASE_DEVFREQ_H_\n #define _BASE_DEVFREQ_H_\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_device_hw.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_device_hw.c\nindex 17f253308ffce0..adc72b7805cb82 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_device_hw.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_device_hw.c\n@@ -7,15 +7,20 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /*\n  *\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_device_internal.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_device_internal.h\nindex 5b20445932fb62..729256ec6ce317 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_device_internal.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_device_internal.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Backend-specific HW access device APIs\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_gpu.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_gpu.c\nindex a7c3a77d8ac807..3897a9fd9baff2 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_gpu.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_gpu.c\n@@ -7,15 +7,20 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /*\n  * Register-based HW access backend APIs\n  */\n@@ -34,6 +39,10 @@ int kbase_backend_early_init(struct kbase_device *kbdev)\n \tif (err)\n \t\treturn err;\n \n+\terr = kbase_pm_runtime_init(kbdev);\n+\tif (err)\n+\t\tgoto fail_runtime_pm;\n+\n \t/* Ensure we can access the GPU registers */\n \tkbase_pm_register_access_enable(kbdev);\n \n@@ -56,6 +65,8 @@ int kbase_backend_early_init(struct kbase_device *kbdev)\n fail_pm:\n \tkbase_release_interrupts(kbdev);\n fail_interrupts:\n+\tkbase_pm_runtime_term(kbdev);\n+fail_runtime_pm:\n \tkbasep_platform_device_term(kbdev);\n \n \treturn err;\n@@ -65,6 +76,7 @@ void kbase_backend_early_term(struct kbase_device *kbdev)\n {\n \tkbase_hwaccess_pm_term(kbdev);\n \tkbase_release_interrupts(kbdev);\n+\tkbase_pm_runtime_term(kbdev);\n \tkbasep_platform_device_term(kbdev);\n }\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_gpuprops_backend.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_gpuprops_backend.c\nindex b395325b556bb2..8809ab0bed5b1b 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_gpuprops_backend.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_gpuprops_backend.c\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2014-2016 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Base kernel property query backend APIs\n  */\n@@ -36,8 +41,8 @@ void kbase_backend_gpuprops_get(struct kbase_device *kbdev,\n \n \tregdump->l2_features = kbase_reg_read(kbdev,\n \t\t\t\tGPU_CONTROL_REG(L2_FEATURES), NULL);\n-\tregdump->suspend_size = kbase_reg_read(kbdev,\n-\t\t\t\tGPU_CONTROL_REG(SUSPEND_SIZE), NULL);\n+\tregdump->core_features = kbase_reg_read(kbdev,\n+\t\t\t\tGPU_CONTROL_REG(CORE_FEATURES), NULL);\n \tregdump->tiler_features = kbase_reg_read(kbdev,\n \t\t\t\tGPU_CONTROL_REG(TILER_FEATURES), NULL);\n \tregdump->mem_features = kbase_reg_read(kbdev,\n@@ -66,6 +71,8 @@ void kbase_backend_gpuprops_get(struct kbase_device *kbdev,\n \t\t\t\tGPU_CONTROL_REG(THREAD_MAX_BARRIER_SIZE), NULL);\n \tregdump->thread_features = kbase_reg_read(kbdev,\n \t\t\t\tGPU_CONTROL_REG(THREAD_FEATURES), NULL);\n+\tregdump->thread_tls_alloc = kbase_reg_read(kbdev,\n+\t\t\t\tGPU_CONTROL_REG(THREAD_TLS_ALLOC), NULL);\n \n \tregdump->shader_present_lo = kbase_reg_read(kbdev,\n \t\t\t\tGPU_CONTROL_REG(SHADER_PRESENT_LO), NULL);\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_instr_backend.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_instr_backend.c\nindex 8084d054cc5ba5..3a6545db909294 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_instr_backend.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_instr_backend.c\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2014-2016 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014-2017 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * GPU backend instrumentation APIs.\n  */\n@@ -63,7 +68,7 @@ static void kbasep_instr_hwcnt_cacheclean(struct kbase_device *kbdev)\n \n int kbase_instr_hwcnt_enable_internal(struct kbase_device *kbdev,\n \t\t\t\t\tstruct kbase_context *kctx,\n-\t\t\t\t\tstruct kbase_uk_hwcnt_setup *setup)\n+\t\t\t\t\tstruct kbase_ioctl_hwcnt_enable *enable)\n {\n \tunsigned long flags, pm_flags;\n \tint err = -EINVAL;\n@@ -76,7 +81,7 @@ int kbase_instr_hwcnt_enable_internal(struct kbase_device *kbdev,\n \t\t\t\t\t\t\tKBASE_PM_CORE_SHADER);\n \n \t/* alignment failure */\n-\tif ((setup->dump_buffer == 0ULL) || (setup->dump_buffer & (2048 - 1)))\n+\tif ((enable->dump_buffer == 0ULL) || (enable->dump_buffer & (2048 - 1)))\n \t\tgoto out_err;\n \n \t/* Override core availability policy to ensure all cores are available\n@@ -105,7 +110,7 @@ int kbase_instr_hwcnt_enable_internal(struct kbase_device *kbdev,\n \t/* In use, this context is the owner */\n \tkbdev->hwcnt.kctx = kctx;\n \t/* Remember the dump address so we can reprogram it later */\n-\tkbdev->hwcnt.addr = setup->dump_buffer;\n+\tkbdev->hwcnt.addr = enable->dump_buffer;\n \n \t/* Request the clean */\n \tkbdev->hwcnt.backend.state = KBASE_INSTR_STATE_REQUEST_CLEAN;\n@@ -145,15 +150,15 @@ int kbase_instr_hwcnt_enable_internal(struct kbase_device *kbdev,\n \t\t\tprfcnt_config | PRFCNT_CONFIG_MODE_OFF, kctx);\n \n \tkbase_reg_write(kbdev, GPU_CONTROL_REG(PRFCNT_BASE_LO),\n-\t\t\t\t\tsetup->dump_buffer & 0xFFFFFFFF, kctx);\n+\t\t\t\t\tenable->dump_buffer & 0xFFFFFFFF, kctx);\n \tkbase_reg_write(kbdev, GPU_CONTROL_REG(PRFCNT_BASE_HI),\n-\t\t\t\t\tsetup->dump_buffer >> 32,        kctx);\n+\t\t\t\t\tenable->dump_buffer >> 32,        kctx);\n \tkbase_reg_write(kbdev, GPU_CONTROL_REG(PRFCNT_JM_EN),\n-\t\t\t\t\tsetup->jm_bm,                    kctx);\n+\t\t\t\t\tenable->jm_bm,                    kctx);\n \tkbase_reg_write(kbdev, GPU_CONTROL_REG(PRFCNT_SHADER_EN),\n-\t\t\t\t\tsetup->shader_bm,                kctx);\n+\t\t\t\t\tenable->shader_bm,                kctx);\n \tkbase_reg_write(kbdev, GPU_CONTROL_REG(PRFCNT_MMU_L2_EN),\n-\t\t\t\t\tsetup->mmu_l2_bm,                kctx);\n+\t\t\t\t\tenable->mmu_l2_bm,                kctx);\n \t/* Due to PRLAM-8186 we need to disable the Tiler before we enable the\n \t * HW counter dump. */\n \tif (kbase_hw_has_issue(kbdev, BASE_HW_ISSUE_8186))\n@@ -161,7 +166,7 @@ int kbase_instr_hwcnt_enable_internal(struct kbase_device *kbdev,\n \t\t\t\t\t\t\t\t\tkctx);\n \telse\n \t\tkbase_reg_write(kbdev, GPU_CONTROL_REG(PRFCNT_TILER_EN),\n-\t\t\t\t\t\t\tsetup->tiler_bm, kctx);\n+\t\t\t\t\t\t\tenable->tiler_bm, kctx);\n \n \tkbase_reg_write(kbdev, GPU_CONTROL_REG(PRFCNT_CONFIG),\n \t\t\tprfcnt_config | PRFCNT_CONFIG_MODE_MANUAL, kctx);\n@@ -170,7 +175,7 @@ int kbase_instr_hwcnt_enable_internal(struct kbase_device *kbdev,\n \t */\n \tif (kbase_hw_has_issue(kbdev, BASE_HW_ISSUE_8186))\n \t\tkbase_reg_write(kbdev, GPU_CONTROL_REG(PRFCNT_TILER_EN),\n-\t\t\t\t\t\t\tsetup->tiler_bm, kctx);\n+\t\t\t\t\t\t\tenable->tiler_bm, kctx);\n \n \tspin_lock_irqsave(&kbdev->hwcnt.lock, flags);\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_instr_defs.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_instr_defs.h\nindex 4794672da8f098..fb55d2d56f2c64 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_instr_defs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_instr_defs.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * Backend-specific instrumentation definitions\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_instr_internal.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_instr_internal.h\nindex e96aeae786e1e5..608379e4ca0f61 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_instr_internal.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_instr_internal.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Backend-specific HW access instrumentation APIs\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_irq_internal.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_irq_internal.h\nindex 8781561e73d001..ca3c048b637a01 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_irq_internal.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_irq_internal.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * Backend specific IRQ APIs\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_irq_linux.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_irq_linux.c\nindex d0666c86cf5913..e68deaf3f41ebc 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_irq_linux.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_irq_linux.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <mali_kbase.h>\n #include <backend/gpu/mali_kbase_device_internal.h>\n #include <backend/gpu/mali_kbase_irq_internal.h>\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_as.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_as.c\nindex c660c80341f476..c8153ba4c12162 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_as.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_as.c\n@@ -1,21 +1,26 @@\n /*\n  *\n- * (C) COPYRIGHT 2014-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /*\n  * Register backend context / address space management\n  */\n@@ -63,11 +68,12 @@ static void assign_and_activate_kctx_addr_space(struct kbase_device *kbdev,\n }\n \n bool kbase_backend_use_ctx_sched(struct kbase_device *kbdev,\n-\t\t\t\t\t\tstruct kbase_context *kctx)\n+\t\t\t\t\t\tstruct kbase_context *kctx,\n+\t\t\t\t\t\tint js)\n {\n \tint i;\n \n-\tif (kbdev->hwaccess.active_kctx == kctx) {\n+\tif (kbdev->hwaccess.active_kctx[js] == kctx) {\n \t\t/* Context is already active */\n \t\treturn true;\n \t}\n@@ -208,12 +214,15 @@ bool kbase_backend_use_ctx(struct kbase_device *kbdev,\n {\n \tstruct kbasep_js_device_data *js_devdata;\n \tstruct kbase_as *new_address_space = NULL;\n+\tint js;\n \n \tjs_devdata = &kbdev->js_data;\n \n-\tif (kbdev->hwaccess.active_kctx == kctx) {\n-\t\tWARN(1, \"Context is already scheduled in\\n\");\n-\t\treturn false;\n+\tfor (js = 0; js < BASE_JM_MAX_NR_SLOTS; js++) {\n+\t\tif (kbdev->hwaccess.active_kctx[js] == kctx) {\n+\t\t\tWARN(1, \"Context is already scheduled in\\n\");\n+\t\t\treturn false;\n+\t\t}\n \t}\n \n \tnew_address_space = &kbdev->as[as_nr];\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_defs.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_defs.h\nindex 08a7400e66d588..b4d2ae1cc4e824 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_defs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_defs.h\n@@ -1,21 +1,26 @@\n /*\n  *\n- * (C) COPYRIGHT 2014-2016 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014-2016, 2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /*\n  * Register-based HW access backend specific definitions\n  */\n@@ -108,16 +113,4 @@ struct kbase_backend_data {\n \tbool timeouts_updated;\n };\n \n-/**\n- * struct kbase_jd_atom_backend - GPU backend specific katom data\n- */\n-struct kbase_jd_atom_backend {\n-};\n-\n-/**\n- * struct kbase_context_backend - GPU backend specific context data\n- */\n-struct kbase_context_backend {\n-};\n-\n #endif /* _KBASE_HWACCESS_GPU_DEFS_H_ */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_hw.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_hw.c\nindex cbca5eac82f193..c6a8b7f34a0363 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_hw.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_hw.c\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * Base kernel job manager APIs\n  */\n@@ -235,16 +240,11 @@ void kbase_job_done(struct kbase_device *kbdev, u32 done)\n \tint i;\n \tu32 count = 0;\n \tktime_t end_timestamp = ktime_get();\n-\tstruct kbasep_js_device_data *js_devdata;\n \n \tKBASE_DEBUG_ASSERT(kbdev);\n-\tjs_devdata = &kbdev->js_data;\n \n \tKBASE_TRACE_ADD(kbdev, JM_IRQ, NULL, NULL, 0, done);\n \n-\tmemset(&kbdev->slot_submit_count_irq[0], 0,\n-\t\t\t\t\tsizeof(kbdev->slot_submit_count_irq));\n-\n \tspin_lock_irqsave(&kbdev->hwaccess_lock, flags);\n \n \twhile (done) {\n@@ -309,7 +309,7 @@ void kbase_job_done(struct kbase_device *kbdev, u32 done)\n \t\t\t\t\t\t\tcompletion_code));\n \t\t\t\t}\n \n-\t\t\t\tkbase_gpu_irq_evict(kbdev, i);\n+\t\t\t\tkbase_gpu_irq_evict(kbdev, i, completion_code);\n \t\t\t}\n \n \t\t\tkbase_reg_write(kbdev, JOB_CONTROL_REG(JOB_IRQ_CLEAR),\n@@ -742,12 +742,14 @@ void kbase_job_slot_ctx_priority_check_locked(struct kbase_context *kctx,\n \t\tif (!katom)\n \t\t\tcontinue;\n \n-\t\tif (katom->kctx != kctx)\n+\t\tif ((kbdev->js_ctx_scheduling_mode ==\n+\t\t\tKBASE_JS_PROCESS_LOCAL_PRIORITY_MODE) &&\n+\t\t\t\t(katom->kctx != kctx))\n \t\t\tcontinue;\n \n \t\tif (katom->sched_priority > priority) {\n \t\t\tif (!stop_sent)\n-\t\t\t\tKBASE_TLSTREAM_TL_ATTRIB_ATOM_PRIORITY_CHANGE(\n+\t\t\t\tKBASE_TLSTREAM_TL_ATTRIB_ATOM_PRIORITIZED(\n \t\t\t\t\t\ttarget_katom);\n \n \t\t\tkbase_job_slot_softstop(kbdev, js, katom);\n@@ -756,92 +758,43 @@ void kbase_job_slot_ctx_priority_check_locked(struct kbase_context *kctx,\n \t}\n }\n \n-struct zap_reset_data {\n-\t/* The stages are:\n-\t * 1. The timer has never been called\n-\t * 2. The zap has timed out, all slots are soft-stopped - the GPU reset\n-\t *    will happen. The GPU has been reset when\n-\t *    kbdev->hwaccess.backend.reset_waitq is signalled\n-\t *\n-\t * (-1 - The timer has been cancelled)\n-\t */\n-\tint stage;\n-\tstruct kbase_device *kbdev;\n-\tstruct hrtimer timer;\n-\tspinlock_t lock; /* protects updates to stage member */\n-};\n-\n-static enum hrtimer_restart zap_timeout_callback(struct hrtimer *timer)\n-{\n-\tstruct zap_reset_data *reset_data = container_of(timer,\n-\t\t\t\t\t\tstruct zap_reset_data, timer);\n-\tstruct kbase_device *kbdev = reset_data->kbdev;\n-\tunsigned long flags;\n-\n-\tspin_lock_irqsave(&reset_data->lock, flags);\n-\n-\tif (reset_data->stage == -1)\n-\t\tgoto out;\n-\n-#if KBASE_GPU_RESET_EN\n-\tif (kbase_prepare_to_reset_gpu(kbdev)) {\n-\t\tdev_err(kbdev->dev, \"Issueing GPU soft-reset because jobs failed to be killed (within %d ms) as part of context termination (e.g. process exit)\\n\",\n-\t\t\t\t\t\t\t\tZAP_TIMEOUT);\n-\t\tkbase_reset_gpu(kbdev);\n-\t}\n-#endif /* KBASE_GPU_RESET_EN */\n-\treset_data->stage = 2;\n-\n- out:\n-\tspin_unlock_irqrestore(&reset_data->lock, flags);\n-\n-\treturn HRTIMER_NORESTART;\n-}\n-\n void kbase_jm_wait_for_zero_jobs(struct kbase_context *kctx)\n {\n \tstruct kbase_device *kbdev = kctx->kbdev;\n-\tstruct zap_reset_data reset_data;\n-\tunsigned long flags;\n-\n-\thrtimer_init_on_stack(&reset_data.timer, CLOCK_MONOTONIC,\n-\t\t\t\t\t\t\tHRTIMER_MODE_REL);\n-\treset_data.timer.function = zap_timeout_callback;\n+\tunsigned long timeout = msecs_to_jiffies(ZAP_TIMEOUT);\n \n-\tspin_lock_init(&reset_data.lock);\n+\ttimeout = wait_event_timeout(kctx->jctx.zero_jobs_wait,\n+\t\t\tkctx->jctx.job_nr == 0, timeout);\n \n-\treset_data.kbdev = kbdev;\n-\treset_data.stage = 1;\n+\tif (timeout != 0)\n+\t\ttimeout = wait_event_timeout(\n+\t\t\tkctx->jctx.sched_info.ctx.is_scheduled_wait,\n+\t\t\t!kbase_ctx_flag(kctx, KCTX_SCHEDULED),\n+\t\t\ttimeout);\n \n-\thrtimer_start(&reset_data.timer, HR_TIMER_DELAY_MSEC(ZAP_TIMEOUT),\n-\t\t\t\t\t\t\tHRTIMER_MODE_REL);\n+\t/* Neither wait timed out; all done! */\n+\tif (timeout != 0)\n+\t\tgoto exit;\n \n-\t/* Wait for all jobs to finish, and for the context to be not-scheduled\n-\t * (due to kbase_job_zap_context(), we also guarentee it's not in the JS\n-\t * policy queue either */\n-\twait_event(kctx->jctx.zero_jobs_wait, kctx->jctx.job_nr == 0);\n-\twait_event(kctx->jctx.sched_info.ctx.is_scheduled_wait,\n-\t\t   !kbase_ctx_flag(kctx, KCTX_SCHEDULED));\n-\n-\tspin_lock_irqsave(&reset_data.lock, flags);\n-\tif (reset_data.stage == 1) {\n-\t\t/* The timer hasn't run yet - so cancel it */\n-\t\treset_data.stage = -1;\n+#if KBASE_GPU_RESET_EN\n+\tif (kbase_prepare_to_reset_gpu(kbdev)) {\n+\t\tdev_err(kbdev->dev,\n+\t\t\t\"Issueing GPU soft-reset because jobs failed to be killed (within %d ms) as part of context termination (e.g. process exit)\\n\",\n+\t\t\tZAP_TIMEOUT);\n+\t\tkbase_reset_gpu(kbdev);\n \t}\n-\tspin_unlock_irqrestore(&reset_data.lock, flags);\n \n-\thrtimer_cancel(&reset_data.timer);\n-\n-\tif (reset_data.stage == 2) {\n-\t\t/* The reset has already started.\n-\t\t * Wait for the reset to complete\n-\t\t */\n-\t\twait_event(kbdev->hwaccess.backend.reset_wait,\n-\t\t\t\tatomic_read(&kbdev->hwaccess.backend.reset_gpu)\n-\t\t\t\t\t\t== KBASE_RESET_GPU_NOT_PENDING);\n-\t}\n-\tdestroy_hrtimer_on_stack(&reset_data.timer);\n+\t/* Wait for the reset to complete */\n+\twait_event(kbdev->hwaccess.backend.reset_wait,\n+\t\t\tatomic_read(&kbdev->hwaccess.backend.reset_gpu)\n+\t\t\t== KBASE_RESET_GPU_NOT_PENDING);\n+#else\n+\tdev_warn(kbdev->dev,\n+\t\t\"Jobs failed to be killed (within %d ms) as part of context termination (e.g. process exit)\\n\",\n+\t\tZAP_TIMEOUT);\n \n+#endif\n+exit:\n \tdev_dbg(kbdev->dev, \"Zap: Finished Context %p\", kctx);\n \n \t/* Ensure that the signallers of the waitqs have finished */\n@@ -874,8 +827,6 @@ int kbase_job_slot_init(struct kbase_device *kbdev)\n \tif (NULL == kbdev->hwaccess.backend.reset_workq)\n \t\treturn -EINVAL;\n \n-\tKBASE_DEBUG_ASSERT(0 ==\n-\t\tobject_is_on_stack(&kbdev->hwaccess.backend.reset_work));\n \tINIT_WORK(&kbdev->hwaccess.backend.reset_work,\n \t\t\t\t\t\tkbasep_reset_timeout_worker);\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_internal.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_internal.h\nindex 1f382b3c1af41f..d71a9edab94fea 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_internal.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_internal.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Job Manager backend-specific low-level APIs.\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_rb.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_rb.c\nindex a41e7b5b7afbff..7f09fd229748eb 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_rb.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_rb.c\n@@ -1,21 +1,26 @@\n /*\n  *\n- * (C) COPYRIGHT 2014-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /*\n  * Register-based HW access backend specific APIs\n  */\n@@ -1242,7 +1247,8 @@ void kbase_backend_run_atom(struct kbase_device *kbdev,\n #define HAS_DEP(katom) (katom->pre_dep || katom->atom_flags & \\\n \t(KBASE_KATOM_FLAG_X_DEP_BLOCKED | KBASE_KATOM_FLAG_FAIL_BLOCKER))\n \n-bool kbase_gpu_irq_evict(struct kbase_device *kbdev, int js)\n+bool kbase_gpu_irq_evict(struct kbase_device *kbdev, int js,\n+\t\t\t\tu32 completion_code)\n {\n \tstruct kbase_jd_atom *katom;\n \tstruct kbase_jd_atom *next_katom;\n@@ -1263,14 +1269,16 @@ bool kbase_gpu_irq_evict(struct kbase_device *kbdev, int js)\n \t\t\t\tJS_COMMAND_NOP, NULL);\n \t\tnext_katom->gpu_rb_state = KBASE_ATOM_GPU_RB_READY;\n \n-\t\tKBASE_TLSTREAM_TL_NRET_ATOM_LPU(katom,\n+\t\tif (completion_code == BASE_JD_EVENT_STOPPED) {\n+\t\t\tKBASE_TLSTREAM_TL_NRET_ATOM_LPU(katom,\n \t\t\t\t&kbdev->gpu_props.props.raw_props.js_features\n \t\t\t\t\t[katom->slot_nr]);\n-\t\tKBASE_TLSTREAM_TL_NRET_ATOM_AS(katom, &kbdev->as\n+\t\t\tKBASE_TLSTREAM_TL_NRET_ATOM_AS(katom, &kbdev->as\n \t\t\t\t\t[katom->kctx->as_nr]);\n-\t\tKBASE_TLSTREAM_TL_NRET_CTX_LPU(katom->kctx,\n+\t\t\tKBASE_TLSTREAM_TL_NRET_CTX_LPU(katom->kctx,\n \t\t\t\t&kbdev->gpu_props.props.raw_props.js_features\n \t\t\t\t\t[katom->slot_nr]);\n+\t\t}\n \n \t\treturn true;\n \t}\n@@ -1510,8 +1518,7 @@ void kbase_backend_reset(struct kbase_device *kbdev, ktime_t *end_timestamp)\n \t\t\tif (!katom)\n \t\t\t\tbreak;\n \t\t\tif (katom->protected_state.exit ==\n-\t\t\t\t\tKBASE_ATOM_EXIT_PROTECTED_RESET_WAIT)\n-\t\t\t{\n+\t\t\t    KBASE_ATOM_EXIT_PROTECTED_RESET_WAIT) {\n \t\t\t\tKBASE_TLSTREAM_AUX_PROTECTED_LEAVE_END(kbdev);\n \n \t\t\t\tkbase_vinstr_resume(kbdev->vinstr_ctx);\n@@ -1678,7 +1685,7 @@ bool kbase_backend_soft_hard_stop_slot(struct kbase_device *kbdev,\n \t\t\tkatom_idx0->kctx->blocked_js[js][prio_idx0] = true;\n \t\t} else {\n \t\t\t/* katom_idx0 is on GPU */\n-\t\t\tif (katom_idx1 && katom_idx1->gpu_rb_state ==\n+\t\t\tif (katom_idx1_valid && katom_idx1->gpu_rb_state ==\n \t\t\t\t\t\tKBASE_ATOM_GPU_RB_SUBMITTED) {\n \t\t\t\t/* katom_idx0 and katom_idx1 are on GPU */\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_rb.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_rb.h\nindex 1e0e05ad3ea450..c3b9f2d855369a 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_rb.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_jm_rb.h\n@@ -1,21 +1,26 @@\n /*\n  *\n- * (C) COPYRIGHT 2014-2016 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /*\n  * Register-based HW access backend specific APIs\n  */\n@@ -28,15 +33,17 @@\n /**\n  * kbase_gpu_irq_evict - Evict an atom from a NEXT slot\n  *\n- * @kbdev:         Device pointer\n- * @js:            Job slot to evict from\n+ * @kbdev:           Device pointer\n+ * @js:              Job slot to evict from\n+ * @completion_code: Event code from job that was run.\n  *\n  * Evict the atom in the NEXT slot for the specified job slot. This function is\n  * called from the job complete IRQ handler when the previous job has failed.\n  *\n  * Return: true if job evicted from NEXT registers, false otherwise\n  */\n-bool kbase_gpu_irq_evict(struct kbase_device *kbdev, int js);\n+bool kbase_gpu_irq_evict(struct kbase_device *kbdev, int js,\n+\t\t\t\tu32 completion_code);\n \n /**\n  * kbase_gpu_complete_hw - Complete an atom on job slot js\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_affinity.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_affinity.c\nindex 54d8ddd8009760..c937eca8c166da 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_affinity.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_affinity.c\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Base kernel affinity manager APIs\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_affinity.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_affinity.h\nindex 35d9781ae092c6..dbabd94564c788 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_affinity.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_affinity.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Affinity Manager internal APIs.\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_backend.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_backend.c\nindex d392fa2a85d9b8..729b971ee0721b 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_backend.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_backend.c\n@@ -1,21 +1,26 @@\n /*\n  *\n- * (C) COPYRIGHT 2014-2016 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014-2017 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /*\n  * Register-based HW access backend specific job scheduler APIs\n  */\n@@ -25,14 +30,6 @@\n #include <backend/gpu/mali_kbase_jm_internal.h>\n #include <backend/gpu/mali_kbase_js_internal.h>\n \n-/*\n- * Define for when dumping is enabled.\n- * This should not be based on the instrumentation level as whether dumping is\n- * enabled for a particular level is down to the integrator. However this is\n- * being used for now as otherwise the cinstr headers would be needed.\n- */\n-#define CINSTR_DUMPING_ENABLED (2 == MALI_INSTRUMENTATION_LEVEL)\n-\n /*\n  * Hold the runpool_mutex for this\n  */\n@@ -119,7 +116,7 @@ static enum hrtimer_restart timer_callback(struct hrtimer *timer)\n \t\t\tif (!kbase_hw_has_issue(kbdev, BASE_HW_ISSUE_5736)) {\n \t\t\t\tu32 ticks = atom->ticks++;\n \n-#if !CINSTR_DUMPING_ENABLED\n+#ifndef CONFIG_MALI_JOB_DUMP\n \t\t\t\tu32 soft_stop_ticks, hard_stop_ticks,\n \t\t\t\t\t\t\t\tgpu_reset_ticks;\n \t\t\t\tif (atom->core_req & BASE_JD_REQ_ONLY_COMPUTE) {\n@@ -150,16 +147,17 @@ static enum hrtimer_restart timer_callback(struct hrtimer *timer)\n \n \t\t\t\t/* Job is Soft-Stoppable */\n \t\t\t\tif (ticks == soft_stop_ticks) {\n-\t\t\t\t\tint disjoint_threshold =\n-\t\tKBASE_DISJOINT_STATE_INTERLEAVED_CONTEXT_COUNT_THRESHOLD;\n-\t\t\t\t\tu32 softstop_flags = 0u;\n \t\t\t\t\t/* Job has been scheduled for at least\n \t\t\t\t\t * js_devdata->soft_stop_ticks ticks.\n \t\t\t\t\t * Soft stop the slot so we can run\n \t\t\t\t\t * other jobs.\n \t\t\t\t\t */\n-\t\t\t\t\tdev_dbg(kbdev->dev, \"Soft-stop\");\n #if !KBASE_DISABLE_SCHEDULING_SOFT_STOPS\n+\t\t\t\t\tint disjoint_threshold =\n+\t\tKBASE_DISJOINT_STATE_INTERLEAVED_CONTEXT_COUNT_THRESHOLD;\n+\t\t\t\t\tu32 softstop_flags = 0u;\n+\n+\t\t\t\t\tdev_dbg(kbdev->dev, \"Soft-stop\");\n \t\t\t\t\t/* nr_user_contexts_running is updated\n \t\t\t\t\t * with the runpool_mutex, but we can't\n \t\t\t\t\t * take that here.\n@@ -209,8 +207,8 @@ static enum hrtimer_restart timer_callback(struct hrtimer *timer)\n \t\t\t\t\t */\n \t\t\t\t\treset_needed = true;\n \t\t\t\t}\n-#else\t\t\t\t/* !CINSTR_DUMPING_ENABLED */\n-\t\t\t\t/* NOTE: During CINSTR_DUMPING_ENABLED, we use\n+#else\t\t\t\t/* !CONFIG_MALI_JOB_DUMP */\n+\t\t\t\t/* NOTE: During CONFIG_MALI_JOB_DUMP, we use\n \t\t\t\t * the alternate timeouts, which makes the hard-\n \t\t\t\t * stop and GPU reset timeout much longer. We\n \t\t\t\t * also ensure that we don't soft-stop at all.\n@@ -219,7 +217,7 @@ static enum hrtimer_restart timer_callback(struct hrtimer *timer)\n \t\t\t\t\t/* Job has been scheduled for at least\n \t\t\t\t\t * js_devdata->soft_stop_ticks. We do\n \t\t\t\t\t * not soft-stop during\n-\t\t\t\t\t * CINSTR_DUMPING_ENABLED, however.\n+\t\t\t\t\t * CONFIG_MALI_JOB_DUMP, however.\n \t\t\t\t\t */\n \t\t\t\t\tdev_dbg(kbdev->dev, \"Soft-stop\");\n \t\t\t\t} else if (ticks ==\n@@ -248,7 +246,7 @@ static enum hrtimer_restart timer_callback(struct hrtimer *timer)\n \t\t\t\t\t */\n \t\t\t\t\treset_needed = true;\n \t\t\t\t}\n-#endif\t\t\t\t/* !CINSTR_DUMPING_ENABLED */\n+#endif\t\t\t\t/* !CONFIG_MALI_JOB_DUMP */\n \t\t\t}\n \t\t}\n \t}\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_internal.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_internal.h\nindex 3f53779c67471f..6576e55d2e39de 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_internal.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_js_internal.h\n@@ -7,15 +7,20 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /*\n  * Register-based HW access backend specific job scheduler APIs\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_mmu_hw_direct.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_mmu_hw_direct.c\nindex aa1817c8bca92c..9cd29828016aa9 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_mmu_hw_direct.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_mmu_hw_direct.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <linux/bitops.h>\n \n #include <mali_kbase.h>\n@@ -180,8 +185,7 @@ void kbase_mmu_interrupt(struct kbase_device *kbdev, u32 irq_stat)\n \t\t/* Mark the fault protected or not */\n \t\tas->protected_mode = kbdev->protected_mode;\n \n-\t\tif (kbdev->protected_mode && as->fault_addr)\n-\t\t{\n+\t\tif (kbdev->protected_mode && as->fault_addr) {\n \t\t\t/* check if address reporting is allowed */\n \t\t\tvalidate_protected_page_fault(kbdev, kctx);\n \t\t}\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_mmu_hw_direct.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_mmu_hw_direct.h\nindex c02253c6acc301..1f76eeda2324a2 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_mmu_hw_direct.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_mmu_hw_direct.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * Interface file for the direct implementation for MMU hardware access\n  *\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_always_on.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_always_on.c\nindex 0614348e935ac6..2ed7dfdde6cc2e 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_always_on.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_always_on.c\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * \"Always on\" power management policy\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_always_on.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_always_on.h\nindex f9d244b01bc235..d61d0d0e3640f4 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_always_on.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_always_on.h\n@@ -8,16 +8,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * \"Always on\" power management policy\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_backend.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_backend.c\nindex cd8932650ed509..e57834350e8c62 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_backend.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_backend.c\n@@ -1,21 +1,26 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /*\n  * GPU backend implementation of base kernel power management APIs\n  */\n@@ -32,6 +37,57 @@\n \n static void kbase_pm_gpu_poweroff_wait_wq(struct work_struct *data);\n \n+int kbase_pm_runtime_init(struct kbase_device *kbdev)\n+{\n+\tstruct kbase_pm_callback_conf *callbacks;\n+\n+\tcallbacks = (struct kbase_pm_callback_conf *)POWER_MANAGEMENT_CALLBACKS;\n+\tif (callbacks) {\n+\t\tkbdev->pm.backend.callback_power_on =\n+\t\t\t\t\tcallbacks->power_on_callback;\n+\t\tkbdev->pm.backend.callback_power_off =\n+\t\t\t\t\tcallbacks->power_off_callback;\n+\t\tkbdev->pm.backend.callback_power_suspend =\n+\t\t\t\t\tcallbacks->power_suspend_callback;\n+\t\tkbdev->pm.backend.callback_power_resume =\n+\t\t\t\t\tcallbacks->power_resume_callback;\n+\t\tkbdev->pm.callback_power_runtime_init =\n+\t\t\t\t\tcallbacks->power_runtime_init_callback;\n+\t\tkbdev->pm.callback_power_runtime_term =\n+\t\t\t\t\tcallbacks->power_runtime_term_callback;\n+\t\tkbdev->pm.backend.callback_power_runtime_on =\n+\t\t\t\t\tcallbacks->power_runtime_on_callback;\n+\t\tkbdev->pm.backend.callback_power_runtime_off =\n+\t\t\t\t\tcallbacks->power_runtime_off_callback;\n+\t\tkbdev->pm.backend.callback_power_runtime_idle =\n+\t\t\t\t\tcallbacks->power_runtime_idle_callback;\n+\n+\t\tif (callbacks->power_runtime_init_callback)\n+\t\t\treturn callbacks->power_runtime_init_callback(kbdev);\n+\t\telse\n+\t\t\treturn 0;\n+\t}\n+\n+\tkbdev->pm.backend.callback_power_on = NULL;\n+\tkbdev->pm.backend.callback_power_off = NULL;\n+\tkbdev->pm.backend.callback_power_suspend = NULL;\n+\tkbdev->pm.backend.callback_power_resume = NULL;\n+\tkbdev->pm.callback_power_runtime_init = NULL;\n+\tkbdev->pm.callback_power_runtime_term = NULL;\n+\tkbdev->pm.backend.callback_power_runtime_on = NULL;\n+\tkbdev->pm.backend.callback_power_runtime_off = NULL;\n+\tkbdev->pm.backend.callback_power_runtime_idle = NULL;\n+\n+\treturn 0;\n+}\n+\n+void kbase_pm_runtime_term(struct kbase_device *kbdev)\n+{\n+\tif (kbdev->pm.callback_power_runtime_term) {\n+\t\tkbdev->pm.callback_power_runtime_term(kbdev);\n+\t}\n+}\n+\n void kbase_pm_register_access_enable(struct kbase_device *kbdev)\n {\n \tstruct kbase_pm_callback_conf *callbacks;\n@@ -59,7 +115,6 @@ void kbase_pm_register_access_disable(struct kbase_device *kbdev)\n int kbase_hwaccess_pm_init(struct kbase_device *kbdev)\n {\n \tint ret = 0;\n-\tstruct kbase_pm_callback_conf *callbacks;\n \n \tKBASE_DEBUG_ASSERT(kbdev != NULL);\n \n@@ -81,38 +136,6 @@ int kbase_hwaccess_pm_init(struct kbase_device *kbdev)\n \tkbdev->pm.backend.gpu_in_desired_state = true;\n \tinit_waitqueue_head(&kbdev->pm.backend.gpu_in_desired_state_wait);\n \n-\tcallbacks = (struct kbase_pm_callback_conf *)POWER_MANAGEMENT_CALLBACKS;\n-\tif (callbacks) {\n-\t\tkbdev->pm.backend.callback_power_on =\n-\t\t\t\t\tcallbacks->power_on_callback;\n-\t\tkbdev->pm.backend.callback_power_off =\n-\t\t\t\t\tcallbacks->power_off_callback;\n-\t\tkbdev->pm.backend.callback_power_suspend =\n-\t\t\t\t\tcallbacks->power_suspend_callback;\n-\t\tkbdev->pm.backend.callback_power_resume =\n-\t\t\t\t\tcallbacks->power_resume_callback;\n-\t\tkbdev->pm.callback_power_runtime_init =\n-\t\t\t\t\tcallbacks->power_runtime_init_callback;\n-\t\tkbdev->pm.callback_power_runtime_term =\n-\t\t\t\t\tcallbacks->power_runtime_term_callback;\n-\t\tkbdev->pm.backend.callback_power_runtime_on =\n-\t\t\t\t\tcallbacks->power_runtime_on_callback;\n-\t\tkbdev->pm.backend.callback_power_runtime_off =\n-\t\t\t\t\tcallbacks->power_runtime_off_callback;\n-\t\tkbdev->pm.backend.callback_power_runtime_idle =\n-\t\t\t\t\tcallbacks->power_runtime_idle_callback;\n-\t} else {\n-\t\tkbdev->pm.backend.callback_power_on = NULL;\n-\t\tkbdev->pm.backend.callback_power_off = NULL;\n-\t\tkbdev->pm.backend.callback_power_suspend = NULL;\n-\t\tkbdev->pm.backend.callback_power_resume = NULL;\n-\t\tkbdev->pm.callback_power_runtime_init = NULL;\n-\t\tkbdev->pm.callback_power_runtime_term = NULL;\n-\t\tkbdev->pm.backend.callback_power_runtime_on = NULL;\n-\t\tkbdev->pm.backend.callback_power_runtime_off = NULL;\n-\t\tkbdev->pm.backend.callback_power_runtime_idle = NULL;\n-\t}\n-\n \t/* Initialise the metrics subsystem */\n \tret = kbasep_pm_metrics_init(kbdev);\n \tif (ret)\n@@ -229,7 +252,10 @@ static void kbase_pm_gpu_poweroff_wait_wq(struct work_struct *data)\n \n \t\t\t/* Turn off clock now that fault have been handled. We\n \t\t\t * dropped locks so poweron_required may have changed -\n-\t\t\t * power back on if this is the case.*/\n+\t\t\t * power back on if this is the case (effectively only\n+\t\t\t * re-enabling of the interrupts would be done in this\n+\t\t\t * case, as the clocks to GPU were not withdrawn yet).\n+\t\t\t */\n \t\t\tif (backend->poweron_required)\n \t\t\t\tkbase_pm_clock_on(kbdev, false);\n \t\t\telse\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca.c\nindex c17db8be88774e..7be810004056fd 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * Base kernel core availability APIs\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca.h\nindex ee9e751f2d79b6..2b005c9fe4e3b7 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * Base kernel core availability APIs\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_devfreq.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_devfreq.c\nindex 66bf660cffb6ef..4bb4c400efe794 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_devfreq.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_devfreq.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * A core availability policy implementing core mask selection from devfreq OPPs\n  *\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_devfreq.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_devfreq.h\nindex 7ab3cd4d846012..f67ec650c98142 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_devfreq.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_devfreq.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * A core availability policy for use with devfreq, where core masks are\n  * associated with OPPs.\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_fixed.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_fixed.c\nindex 864612d31f9b36..1eea7e877f61c9 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_fixed.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_fixed.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * A power policy implementing fixed core availability\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_fixed.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_fixed.h\nindex a763155cb703d8..68a2eac4a12177 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_fixed.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_ca_fixed.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * A power policy implementing fixed core availability\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_coarse_demand.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_coarse_demand.c\nindex f891fa225a89f1..602e175dbbb9c5 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_coarse_demand.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_coarse_demand.c\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * \"Coarse Demand\" power management policy\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_coarse_demand.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_coarse_demand.h\nindex 749d305eee9a90..f2b49eb4bcacb2 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_coarse_demand.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_coarse_demand.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * \"Coarse Demand\" power management policy\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_defs.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_defs.h\nindex 564fbda1116a02..2b3b1f864cccdd 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_defs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_defs.h\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2014-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * Backend-specific Power Manager definitions\n  */\n@@ -66,58 +71,67 @@ enum kbase_pm_core_type {\n };\n \n /**\n- * struct kbasep_pm_metrics_data - Metrics data collected for use by the power\n- *                                 management framework.\n+ * struct kbasep_pm_metrics - Metrics data collected for use by the power\n+ *                            management framework.\n  *\n- *  @time_period_start: time at which busy/idle measurements started\n  *  @time_busy: number of ns the GPU was busy executing jobs since the\n  *          @time_period_start timestamp.\n  *  @time_idle: number of ns since time_period_start the GPU was not executing\n  *          jobs since the @time_period_start timestamp.\n- *  @prev_busy: busy time in ns of previous time period.\n- *           Updated when metrics are reset.\n- *  @prev_idle: idle time in ns of previous time period\n- *           Updated when metrics are reset.\n- *  @gpu_active: true when the GPU is executing jobs. false when\n- *           not. Updated when the job scheduler informs us a job in submitted\n- *           or removed from a GPU slot.\n  *  @busy_cl: number of ns the GPU was busy executing CL jobs. Note that\n  *           if two CL jobs were active for 400ns, this value would be updated\n  *           with 800.\n  *  @busy_gl: number of ns the GPU was busy executing GL jobs. Note that\n  *           if two GL jobs were active for 400ns, this value would be updated\n  *           with 800.\n+ */\n+struct kbasep_pm_metrics {\n+\tu32 time_busy;\n+\tu32 time_idle;\n+\tu32 busy_cl[2];\n+\tu32 busy_gl;\n+};\n+\n+/**\n+ * struct kbasep_pm_metrics_state - State required to collect the metrics in\n+ *                                  struct kbasep_pm_metrics\n+ *  @time_period_start: time at which busy/idle measurements started\n+ *  @gpu_active: true when the GPU is executing jobs. false when\n+ *           not. Updated when the job scheduler informs us a job in submitted\n+ *           or removed from a GPU slot.\n  *  @active_cl_ctx: number of CL jobs active on the GPU. Array is per-device.\n  *  @active_gl_ctx: number of GL jobs active on the GPU. Array is per-slot. As\n  *           GL jobs never run on slot 2 this slot is not recorded.\n  *  @lock: spinlock protecting the kbasep_pm_metrics_data structure\n+ *  @platform_data: pointer to data controlled by platform specific code\n+ *  @kbdev: pointer to kbase device for which metrics are collected\n+ *  @values: The current values of the power management metrics. The\n+ *           kbase_pm_get_dvfs_metrics() function is used to compare these\n+ *           current values with the saved values from a previous invocation.\n  *  @timer: timer to regularly make DVFS decisions based on the power\n  *           management metrics.\n  *  @timer_active: boolean indicating @timer is running\n- *  @platform_data: pointer to data controlled by platform specific code\n- *  @kbdev: pointer to kbase device for which metrics are collected\n- *\n+ *  @dvfs_last: values of the PM metrics from the last DVFS tick\n+ *  @dvfs_diff: different between the current and previous PM metrics.\n  */\n-struct kbasep_pm_metrics_data {\n+struct kbasep_pm_metrics_state {\n \tktime_t time_period_start;\n-\tu32 time_busy;\n-\tu32 time_idle;\n-\tu32 prev_busy;\n-\tu32 prev_idle;\n \tbool gpu_active;\n-\tu32 busy_cl[2];\n-\tu32 busy_gl;\n \tu32 active_cl_ctx[2];\n \tu32 active_gl_ctx[2]; /* GL jobs can only run on 2 of the 3 job slots */\n \tspinlock_t lock;\n \n+\tvoid *platform_data;\n+\tstruct kbase_device *kbdev;\n+\n+\tstruct kbasep_pm_metrics values;\n+\n #ifdef CONFIG_MALI_BIFROST_DVFS\n \tstruct hrtimer timer;\n \tbool timer_active;\n+\tstruct kbasep_pm_metrics dvfs_last;\n+\tstruct kbasep_pm_metrics dvfs_diff;\n #endif\n-\n-\tvoid *platform_data;\n-\tstruct kbase_device *kbdev;\n };\n \n union kbase_pm_policy_data {\n@@ -286,7 +300,7 @@ struct kbase_pm_backend_data {\n \tspinlock_t gpu_powered_lock;\n \n \n-\tstruct kbasep_pm_metrics_data metrics;\n+\tstruct kbasep_pm_metrics_state metrics;\n \n \tint gpu_poweroff_pending;\n \tint shader_poweroff_pending_time;\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_demand.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_demand.c\nindex 81322fd0dd1757..e0edddc2504d4a 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_demand.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_demand.c\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * A simple demand based power management policy\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_demand.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_demand.h\nindex c0c84b6e918914..5ee182463bd4af 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_demand.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_demand.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * A simple demand based power management policy\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_driver.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_driver.c\nindex 707f71a79a7754..e9089e35afd62c 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_driver.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_driver.c\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Base kernel Power Management hardware control\n  */\n@@ -304,10 +309,8 @@ u64 kbase_pm_get_present_cores(struct kbase_device *kbdev,\n \t\treturn kbdev->gpu_props.props.raw_props.shader_present;\n \tcase KBASE_PM_CORE_TILER:\n \t\treturn kbdev->gpu_props.props.raw_props.tiler_present;\n-#ifdef CONFIG_MALI_CORESTACK\n \tcase KBASE_PM_CORE_STACK:\n \t\treturn kbdev->gpu_props.props.raw_props.stack_present;\n-#endif /* CONFIG_MALI_CORESTACK */\n \tdefault:\n \t\tbreak;\n \t}\n@@ -585,7 +588,7 @@ u64 kbase_pm_core_stack_mask(u64 cores)\n \t\tif (test_bit(i, (unsigned long *)&cores)) {\n \t\t\t/* Every core which ID >= 16 is filled to stacks 4-7\n \t\t\t * instead of 0-3 */\n-\t\t\tsize_t const stack_num = (i > 16) ?\n+\t\t\tsize_t const stack_num = (i >= 16) ?\n \t\t\t\t(i % NUM_CORES_PER_STACK) + 4 :\n \t\t\t\t(i % NUM_CORES_PER_STACK);\n \t\t\tset_bit(stack_num, (unsigned long *)&stack_mask);\n@@ -1229,15 +1232,25 @@ static void kbase_pm_hw_issues_detect(struct kbase_device *kbdev)\n \tkbdev->hw_quirks_mmu = kbase_reg_read(kbdev,\n \t\t\tGPU_CONTROL_REG(L2_MMU_CONFIG), NULL);\n \n-\t/* Limit read ID width for AXI */\n-\tkbdev->hw_quirks_mmu &= ~(L2_MMU_CONFIG_LIMIT_EXTERNAL_READS);\n-\tkbdev->hw_quirks_mmu |= (DEFAULT_ARID_LIMIT & 0x3) <<\n+\n+\t/* Limit read & write ID width for AXI */\n+\tif (kbase_hw_has_feature(kbdev, BASE_HW_FEATURE_3BIT_EXT_RW_L2_MMU_CONFIG)) {\n+\t\tkbdev->hw_quirks_mmu &= ~(L2_MMU_CONFIG_3BIT_LIMIT_EXTERNAL_READS);\n+\t\tkbdev->hw_quirks_mmu |= (DEFAULT_3BIT_ARID_LIMIT & 0x7) <<\n+\t\t\t\tL2_MMU_CONFIG_3BIT_LIMIT_EXTERNAL_READS_SHIFT;\n+\n+\t\tkbdev->hw_quirks_mmu &= ~(L2_MMU_CONFIG_3BIT_LIMIT_EXTERNAL_WRITES);\n+\t\tkbdev->hw_quirks_mmu |= (DEFAULT_3BIT_AWID_LIMIT & 0x7) <<\n+\t\t\t\tL2_MMU_CONFIG_3BIT_LIMIT_EXTERNAL_WRITES_SHIFT;\n+\t} else {\n+\t\tkbdev->hw_quirks_mmu &= ~(L2_MMU_CONFIG_LIMIT_EXTERNAL_READS);\n+\t\tkbdev->hw_quirks_mmu |= (DEFAULT_ARID_LIMIT & 0x3) <<\n \t\t\t\tL2_MMU_CONFIG_LIMIT_EXTERNAL_READS_SHIFT;\n \n-\t/* Limit write ID width for AXI */\n-\tkbdev->hw_quirks_mmu &= ~(L2_MMU_CONFIG_LIMIT_EXTERNAL_WRITES);\n-\tkbdev->hw_quirks_mmu |= (DEFAULT_AWID_LIMIT & 0x3) <<\n+\t\tkbdev->hw_quirks_mmu &= ~(L2_MMU_CONFIG_LIMIT_EXTERNAL_WRITES);\n+\t\tkbdev->hw_quirks_mmu |= (DEFAULT_AWID_LIMIT & 0x3) <<\n \t\t\t\tL2_MMU_CONFIG_LIMIT_EXTERNAL_WRITES_SHIFT;\n+\t}\n \n \tif (kbdev->system_coherency == COHERENCY_ACE) {\n \t\t/* Allow memory configuration disparity to be ignored, we\n@@ -1297,6 +1310,8 @@ static void kbase_pm_hw_issues_detect(struct kbase_device *kbdev)\n \t\t}\n \t}\n \n+\tif (kbase_hw_has_feature(kbdev, BASE_HW_FEATURE_TLS_HASHING))\n+\t\tkbdev->hw_quirks_sc |= SC_TLS_HASH_ENABLE;\n \n \tif (!kbdev->hw_quirks_jm)\n \t\tkbdev->hw_quirks_jm = kbase_reg_read(kbdev,\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_internal.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_internal.h\nindex 9fbe094541c58f..624efc833f9874 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_internal.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_internal.h\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Power management API definitions used internally by GPU backend\n  */\n@@ -410,15 +415,30 @@ void kbase_pm_release_gpu_cycle_counter_nolock(struct kbase_device *kbdev);\n  */\n void kbase_pm_wait_for_poweroff_complete(struct kbase_device *kbdev);\n \n+/**\n+ * kbase_pm_runtime_init - Initialize runtime-pm for Mali GPU platform device\n+ *\n+ * Setup the power management callbacks and initialize/enable the runtime-pm\n+ * for the Mali GPU platform device, using the callback function. This must be\n+ * called before the kbase_pm_register_access_enable() function.\n+ *\n+ * @kbdev: The kbase device structure for the device (must be a valid pointer)\n+ */\n+int kbase_pm_runtime_init(struct kbase_device *kbdev);\n+\n+/**\n+ * kbase_pm_runtime_term - Disable runtime-pm for Mali GPU platform device\n+ *\n+ * @kbdev: The kbase device structure for the device (must be a valid pointer)\n+ */\n+void kbase_pm_runtime_term(struct kbase_device *kbdev);\n+\n /**\n  * kbase_pm_register_access_enable - Enable access to GPU registers\n  *\n  * Enables access to the GPU registers before power management has powered up\n  * the GPU with kbase_pm_powerup().\n  *\n- * Access to registers should be done using kbase_os_reg_read()/write() at this\n- * stage, not kbase_reg_read()/write().\n- *\n  * This results in the power management callbacks provided in the driver\n  * configuration to get called to turn on power and/or clocks to the GPU. See\n  * kbase_pm_callback_conf.\n@@ -487,9 +507,9 @@ void kbase_pm_do_poweron(struct kbase_device *kbdev, bool is_resume);\n void kbase_pm_do_poweroff(struct kbase_device *kbdev, bool is_suspend);\n \n #if defined(CONFIG_MALI_BIFROST_DEVFREQ) || defined(CONFIG_MALI_BIFROST_DVFS)\n-void kbase_pm_get_dvfs_utilisation(struct kbase_device *kbdev,\n-\t\tunsigned long *total, unsigned long *busy);\n-void kbase_pm_reset_dvfs_utilisation(struct kbase_device *kbdev);\n+void kbase_pm_get_dvfs_metrics(struct kbase_device *kbdev,\n+\t\t\t       struct kbasep_pm_metrics *last,\n+\t\t\t       struct kbasep_pm_metrics *diff);\n #endif /* defined(CONFIG_MALI_BIFROST_DEVFREQ) || defined(CONFIG_MALI_BIFROST_DVFS) */\n \n #ifdef CONFIG_MALI_BIFROST_DVFS\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_metrics.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_metrics.c\nindex ba13bcd8b29122..aabd6541402c9a 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_metrics.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_metrics.c\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2011-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2011-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Metrics for power management\n  */\n@@ -25,6 +30,7 @@\n #include <mali_kbase_pm.h>\n #include <backend/gpu/mali_kbase_pm_internal.h>\n #include <backend/gpu/mali_kbase_jm_rb.h>\n+#include <backend/gpu/mali_kbase_pm_defs.h>\n \n /* When VSync is being hit aim for utilisation between 70-90% */\n #define KBASE_PM_VSYNC_MIN_UTILISATION          70\n@@ -38,19 +44,15 @@\n  * under 11s. Exceeding this will cause overflow */\n #define KBASE_PM_TIME_SHIFT\t\t\t8\n \n-/* Maximum time between sampling of utilization data, without resetting the\n- * counters. */\n-#define MALI_UTILIZATION_MAX_PERIOD 100000 /* ns = 100ms */\n-\n #ifdef CONFIG_MALI_BIFROST_DVFS\n static enum hrtimer_restart dvfs_callback(struct hrtimer *timer)\n {\n \tunsigned long flags;\n-\tstruct kbasep_pm_metrics_data *metrics;\n+\tstruct kbasep_pm_metrics_state *metrics;\n \n \tKBASE_DEBUG_ASSERT(timer != NULL);\n \n-\tmetrics = container_of(timer, struct kbasep_pm_metrics_data, timer);\n+\tmetrics = container_of(timer, struct kbasep_pm_metrics_state, timer);\n \tkbase_pm_get_dvfs_action(metrics->kbdev);\n \n \tspin_lock_irqsave(&metrics->lock, flags);\n@@ -73,18 +75,17 @@ int kbasep_pm_metrics_init(struct kbase_device *kbdev)\n \tkbdev->pm.backend.metrics.kbdev = kbdev;\n \n \tkbdev->pm.backend.metrics.time_period_start = ktime_get();\n-\tkbdev->pm.backend.metrics.time_busy = 0;\n-\tkbdev->pm.backend.metrics.time_idle = 0;\n-\tkbdev->pm.backend.metrics.prev_busy = 0;\n-\tkbdev->pm.backend.metrics.prev_idle = 0;\n \tkbdev->pm.backend.metrics.gpu_active = false;\n \tkbdev->pm.backend.metrics.active_cl_ctx[0] = 0;\n \tkbdev->pm.backend.metrics.active_cl_ctx[1] = 0;\n \tkbdev->pm.backend.metrics.active_gl_ctx[0] = 0;\n \tkbdev->pm.backend.metrics.active_gl_ctx[1] = 0;\n-\tkbdev->pm.backend.metrics.busy_cl[0] = 0;\n-\tkbdev->pm.backend.metrics.busy_cl[1] = 0;\n-\tkbdev->pm.backend.metrics.busy_gl = 0;\n+\n+\tkbdev->pm.backend.metrics.values.time_busy = 0;\n+\tkbdev->pm.backend.metrics.values.time_idle = 0;\n+\tkbdev->pm.backend.metrics.values.busy_cl[0] = 0;\n+\tkbdev->pm.backend.metrics.values.busy_cl[1] = 0;\n+\tkbdev->pm.backend.metrics.values.busy_gl = 0;\n \n \tspin_lock_init(&kbdev->pm.backend.metrics.lock);\n \n@@ -138,17 +139,17 @@ static void kbase_pm_get_dvfs_utilisation_calc(struct kbase_device *kbdev,\n \tif (kbdev->pm.backend.metrics.gpu_active) {\n \t\tu32 ns_time = (u32) (ktime_to_ns(diff) >> KBASE_PM_TIME_SHIFT);\n \n-\t\tkbdev->pm.backend.metrics.time_busy += ns_time;\n+\t\tkbdev->pm.backend.metrics.values.time_busy += ns_time;\n \t\tif (kbdev->pm.backend.metrics.active_cl_ctx[0])\n-\t\t\tkbdev->pm.backend.metrics.busy_cl[0] += ns_time;\n+\t\t\tkbdev->pm.backend.metrics.values.busy_cl[0] += ns_time;\n \t\tif (kbdev->pm.backend.metrics.active_cl_ctx[1])\n-\t\t\tkbdev->pm.backend.metrics.busy_cl[1] += ns_time;\n+\t\t\tkbdev->pm.backend.metrics.values.busy_cl[1] += ns_time;\n \t\tif (kbdev->pm.backend.metrics.active_gl_ctx[0])\n-\t\t\tkbdev->pm.backend.metrics.busy_gl += ns_time;\n+\t\t\tkbdev->pm.backend.metrics.values.busy_gl += ns_time;\n \t\tif (kbdev->pm.backend.metrics.active_gl_ctx[1])\n-\t\t\tkbdev->pm.backend.metrics.busy_gl += ns_time;\n+\t\t\tkbdev->pm.backend.metrics.values.busy_gl += ns_time;\n \t} else {\n-\t\tkbdev->pm.backend.metrics.time_idle += (u32) (ktime_to_ns(diff)\n+\t\tkbdev->pm.backend.metrics.values.time_idle += (u32) (ktime_to_ns(diff)\n \t\t\t\t\t\t\t>> KBASE_PM_TIME_SHIFT);\n \t}\n \n@@ -156,160 +157,53 @@ static void kbase_pm_get_dvfs_utilisation_calc(struct kbase_device *kbdev,\n }\n \n #if defined(CONFIG_MALI_BIFROST_DEVFREQ) || defined(CONFIG_MALI_BIFROST_DVFS)\n-/* Caller needs to hold kbdev->pm.backend.metrics.lock before calling this\n- * function.\n- */\n-static void kbase_pm_reset_dvfs_utilisation_unlocked(struct kbase_device *kbdev,\n-\t\t\t\t\t\t\t\tktime_t now)\n-{\n-\t/* Store previous value */\n-\tkbdev->pm.backend.metrics.prev_idle =\n-\t\t\t\t\tkbdev->pm.backend.metrics.time_idle;\n-\tkbdev->pm.backend.metrics.prev_busy =\n-\t\t\t\t\tkbdev->pm.backend.metrics.time_busy;\n-\n-\t/* Reset current values */\n-\tkbdev->pm.backend.metrics.time_period_start = now;\n-\tkbdev->pm.backend.metrics.time_idle = 0;\n-\tkbdev->pm.backend.metrics.time_busy = 0;\n-\tkbdev->pm.backend.metrics.busy_cl[0] = 0;\n-\tkbdev->pm.backend.metrics.busy_cl[1] = 0;\n-\tkbdev->pm.backend.metrics.busy_gl = 0;\n-}\n-\n-void kbase_pm_reset_dvfs_utilisation(struct kbase_device *kbdev)\n+void kbase_pm_get_dvfs_metrics(struct kbase_device *kbdev,\n+\t\t\t       struct kbasep_pm_metrics *last,\n+\t\t\t       struct kbasep_pm_metrics *diff)\n {\n+\tstruct kbasep_pm_metrics *cur = &kbdev->pm.backend.metrics.values;\n \tunsigned long flags;\n \n \tspin_lock_irqsave(&kbdev->pm.backend.metrics.lock, flags);\n-\tkbase_pm_reset_dvfs_utilisation_unlocked(kbdev, ktime_get());\n-\tspin_unlock_irqrestore(&kbdev->pm.backend.metrics.lock, flags);\n-}\n+\tkbase_pm_get_dvfs_utilisation_calc(kbdev, ktime_get());\n \n-void kbase_pm_get_dvfs_utilisation(struct kbase_device *kbdev,\n-\t\tunsigned long *total_out, unsigned long *busy_out)\n-{\n-\tktime_t now = ktime_get();\n-\tunsigned long flags, busy, total;\n+\tmemset(diff, 0, sizeof(*diff));\n+\tdiff->time_busy = cur->time_busy - last->time_busy;\n+\tdiff->time_idle = cur->time_idle - last->time_idle;\n+\tdiff->busy_cl[0] = cur->busy_cl[0] - last->busy_cl[0];\n+\tdiff->busy_cl[1] = cur->busy_cl[1] - last->busy_cl[1];\n+\tdiff->busy_gl = cur->busy_gl - last->busy_gl;\n \n-\tspin_lock_irqsave(&kbdev->pm.backend.metrics.lock, flags);\n-\tkbase_pm_get_dvfs_utilisation_calc(kbdev, now);\n-\n-\tbusy = kbdev->pm.backend.metrics.time_busy;\n-\ttotal = busy + kbdev->pm.backend.metrics.time_idle;\n-\n-\t/* Reset stats if older than MALI_UTILIZATION_MAX_PERIOD (default\n-\t * 100ms) */\n-\tif (total >= MALI_UTILIZATION_MAX_PERIOD) {\n-\t\tkbase_pm_reset_dvfs_utilisation_unlocked(kbdev, now);\n-\t} else if (total < (MALI_UTILIZATION_MAX_PERIOD / 2)) {\n-\t\ttotal += kbdev->pm.backend.metrics.prev_idle +\n-\t\t\t\tkbdev->pm.backend.metrics.prev_busy;\n-\t\tbusy += kbdev->pm.backend.metrics.prev_busy;\n-\t}\n+\t*last = *cur;\n \n-\t*total_out = total;\n-\t*busy_out = busy;\n \tspin_unlock_irqrestore(&kbdev->pm.backend.metrics.lock, flags);\n }\n+KBASE_EXPORT_TEST_API(kbase_pm_get_dvfs_metrics);\n #endif\n \n #ifdef CONFIG_MALI_BIFROST_DVFS\n-\n-/* caller needs to hold kbdev->pm.backend.metrics.lock before calling this\n- * function\n- */\n-int kbase_pm_get_dvfs_utilisation_old(struct kbase_device *kbdev,\n-\t\t\t\t\tint *util_gl_share,\n-\t\t\t\t\tint util_cl_share[2],\n-\t\t\t\t\tktime_t now)\n-{\n-\tint utilisation;\n-\tint busy;\n-\n-\tkbase_pm_get_dvfs_utilisation_calc(kbdev, now);\n-\n-\tif (kbdev->pm.backend.metrics.time_idle +\n-\t\t\t\tkbdev->pm.backend.metrics.time_busy == 0) {\n-\t\t/* No data - so we return NOP */\n-\t\tutilisation = -1;\n-\t\tif (util_gl_share)\n-\t\t\t*util_gl_share = -1;\n-\t\tif (util_cl_share) {\n-\t\t\tutil_cl_share[0] = -1;\n-\t\t\tutil_cl_share[1] = -1;\n-\t\t}\n-\t\tgoto out;\n-\t}\n-\n-\tutilisation = (100 * kbdev->pm.backend.metrics.time_busy) /\n-\t\t\t(kbdev->pm.backend.metrics.time_idle +\n-\t\t\t kbdev->pm.backend.metrics.time_busy);\n-\n-\tbusy = kbdev->pm.backend.metrics.busy_gl +\n-\t\tkbdev->pm.backend.metrics.busy_cl[0] +\n-\t\tkbdev->pm.backend.metrics.busy_cl[1];\n-\n-\tif (busy != 0) {\n-\t\tif (util_gl_share)\n-\t\t\t*util_gl_share =\n-\t\t\t\t(100 * kbdev->pm.backend.metrics.busy_gl) /\n-\t\t\t\t\t\t\t\t\tbusy;\n-\t\tif (util_cl_share) {\n-\t\t\tutil_cl_share[0] =\n-\t\t\t\t(100 * kbdev->pm.backend.metrics.busy_cl[0]) /\n-\t\t\t\t\t\t\t\t\tbusy;\n-\t\t\tutil_cl_share[1] =\n-\t\t\t\t(100 * kbdev->pm.backend.metrics.busy_cl[1]) /\n-\t\t\t\t\t\t\t\t\tbusy;\n-\t\t}\n-\t} else {\n-\t\tif (util_gl_share)\n-\t\t\t*util_gl_share = -1;\n-\t\tif (util_cl_share) {\n-\t\t\tutil_cl_share[0] = -1;\n-\t\t\tutil_cl_share[1] = -1;\n-\t\t}\n-\t}\n-\n-out:\n-\treturn utilisation;\n-}\n-\n void kbase_pm_get_dvfs_action(struct kbase_device *kbdev)\n {\n-\tunsigned long flags;\n \tint utilisation, util_gl_share;\n \tint util_cl_share[2];\n-\tktime_t now;\n+\tint busy;\n+\tstruct kbasep_pm_metrics *diff;\n \n \tKBASE_DEBUG_ASSERT(kbdev != NULL);\n \n-\tspin_lock_irqsave(&kbdev->pm.backend.metrics.lock, flags);\n+\tdiff = &kbdev->pm.backend.metrics.dvfs_diff;\n \n-\tnow = ktime_get();\n+\tkbase_pm_get_dvfs_metrics(kbdev, &kbdev->pm.backend.metrics.dvfs_last, diff);\n \n-\tutilisation = kbase_pm_get_dvfs_utilisation_old(kbdev, &util_gl_share,\n-\t\t\tutil_cl_share, now);\n+\tutilisation = (100 * diff->time_busy) /\n+\t\t\tmax(diff->time_busy + diff->time_idle, 1u);\n \n-\tif (utilisation < 0 || util_gl_share < 0 || util_cl_share[0] < 0 ||\n-\t\t\t\t\t\t\tutil_cl_share[1] < 0) {\n-\t\tutilisation = 0;\n-\t\tutil_gl_share = 0;\n-\t\tutil_cl_share[0] = 0;\n-\t\tutil_cl_share[1] = 0;\n-\t\tgoto out;\n-\t}\n-\n-out:\n-#ifdef CONFIG_MALI_BIFROST_DVFS\n-\tkbase_platform_dvfs_event(kbdev, utilisation, util_gl_share,\n-\t\t\t\t\t\t\t\tutil_cl_share);\n-#endif\t\t\t\t/*CONFIG_MALI_BIFROST_DVFS */\n+\tbusy = max(diff->busy_gl + diff->busy_cl[0] + diff->busy_cl[1], 1u);\n+\tutil_gl_share = (100 * diff->busy_gl) / busy;\n+\tutil_cl_share[0] = (100 * diff->busy_cl[0]) / busy;\n+\tutil_cl_share[1] = (100 * diff->busy_cl[1]) / busy;\n \n-\tkbase_pm_reset_dvfs_utilisation_unlocked(kbdev, now);\n-\n-\tspin_unlock_irqrestore(&kbdev->pm.backend.metrics.lock, flags);\n+\tkbase_platform_dvfs_event(kbdev, utilisation, util_gl_share, util_cl_share);\n }\n \n bool kbase_pm_metrics_is_active(struct kbase_device *kbdev)\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_policy.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_policy.c\nindex b98c68d9a42a8e..0bf133494f03aa 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_policy.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_policy.c\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2016 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * Power policy API implementations\n  */\n@@ -378,6 +383,7 @@ void kbase_pm_update_active(struct kbase_device *kbdev)\n \n \t\t/* Power on the GPU and any cores requested by the policy */\n \t\tif (pm->backend.poweroff_wait_in_progress) {\n+\t\t\tKBASE_DEBUG_ASSERT(kbdev->pm.backend.gpu_powered);\n \t\t\tpm->backend.poweron_required = true;\n \t\t\tspin_unlock_irqrestore(&kbdev->hwaccess_lock, flags);\n \t\t} else {\n@@ -922,19 +928,24 @@ KBASE_EXPORT_TEST_API(kbase_pm_request_cores_sync);\n void kbase_pm_request_l2_caches(struct kbase_device *kbdev)\n {\n \tunsigned long flags;\n-\tu32 prior_l2_users_count;\n \n \tspin_lock_irqsave(&kbdev->hwaccess_lock, flags);\n \n-\tprior_l2_users_count = kbdev->l2_users_count++;\n+\tkbdev->l2_users_count++;\n \n \tKBASE_DEBUG_ASSERT(kbdev->l2_users_count != 0);\n \n-\t/* if the GPU is reset while the l2 is on, l2 will be off but\n-\t * prior_l2_users_count will be > 0. l2_available_bitmap will have been\n-\t * set to 0 though by kbase_pm_init_hw */\n-\tif (!prior_l2_users_count || !kbdev->l2_available_bitmap)\n-\t\tkbase_pm_check_transitions_nolock(kbdev);\n+\t/* Check for the required L2 transitions.\n+\t * Caller would block here for the L2 caches of all core groups to be\n+\t * powered on, so need to inform the Hw to power up all the L2 caches.\n+\t * Can't rely on the l2_users_count value being non-zero previously to\n+\t * avoid checking for the transition, as the count could be non-zero\n+\t * even if not all the instances of L2 cache are powered up since\n+\t * currently the power status of L2 is not tracked separately for each\n+\t * core group. Also if the GPU is reset while the L2 is on, L2 will be\n+\t * off but the count will be non-zero.\n+\t */\n+\tkbase_pm_check_transitions_nolock(kbdev);\n \n \tspin_unlock_irqrestore(&kbdev->hwaccess_lock, flags);\n \twait_event(kbdev->pm.backend.l2_powered_wait,\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_policy.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_policy.h\nindex 611a90e66e6593..852fedd346ba37 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_policy.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_pm_policy.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * Power policy API definitions\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_time.c b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_time.c\nindex 0068e1091f4c67..cd0c534ffc1f33 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_time.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_time.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <mali_kbase.h>\n #include <mali_kbase_hwaccess_time.h>\n #include <backend/gpu/mali_kbase_device_internal.h>\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_time.h b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_time.h\nindex 0559b2f7097d1c..c17a23f560a44f 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_time.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/backend/gpu/mali_kbase_time.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_BACKEND_TIME_H_\n #define _KBASE_BACKEND_TIME_H_\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/build.bp b/drivers/gpu/arm/bifrost_for_linux/build.bp\nnew file mode 100644\nindex 00000000000000..0676a2494875e1\n--- /dev/null\n+++ b/drivers/gpu/arm/bifrost_for_linux/build.bp\n@@ -0,0 +1,101 @@\n+/*\n+ * Copyright:\n+ * ----------------------------------------------------------------------------\n+ * This confidential and proprietary software may be used only as authorized\n+ * by a licensing agreement from ARM Limited.\n+ *      (C) COPYRIGHT 2017-2018 ARM Limited, ALL RIGHTS RESERVED\n+ * The entire notice above must be reproduced on all authorized copies and\n+ * copies may only be made to the extent permitted by a licensing agreement\n+ * from ARM Limited.\n+ * ----------------------------------------------------------------------------\n+ */\n+\n+/* Kernel-side tests may include mali_kbase's headers. Therefore any config\n+ * options which affect the sizes of any structs (e.g. adding extra members)\n+ * must be included in these defaults, so that the structs are consistent in\n+ * both mali_kbase and the test modules. */\n+bob_defaults {\n+    name: \"mali_kbase_shared_config_defaults\",\n+    no_mali: {\n+        kbuild_options: [\"CONFIG_MALI_BIFROST_NO_MALI=y\"],\n+    },\n+    mali_corestack: {\n+        kbuild_options: [\"CONFIG_MALI_CORESTACK=y\"],\n+    },\n+    mali_devfreq: {\n+        kbuild_options: [\"CONFIG_MALI_BIFROST_DEVFREQ=y\"],\n+    },\n+    mali_midgard_dvfs: {\n+        kbuild_options: [\"CONFIG_MALI_BIFROST_DVFS=y\"],\n+    },\n+    mali_trace_timeline: {\n+        kbuild_options: [\"CONFIG_MALI_BIFROST_TRACE_TIMELINE=y\"],\n+    },\n+    mali_debug: {\n+        kbuild_options: [\"CONFIG_MALI_BIFROST_DEBUG=y\"],\n+    },\n+    mali_fpga_bus_logger: {\n+        kbuild_options: [\"CONFIG_MALI_FPGA_BUS_LOGGER=y\"],\n+    },\n+    cinstr_job_dump: {\n+        kbuild_options: [\"CONFIG_MALI_JOB_DUMP=y\"],\n+    },\n+    mali_gator_support: {\n+        kbuild_options: [\"CONFIG_MALI_BIFROST_GATOR_SUPPORT=y\"],\n+    },\n+    mali_system_trace: {\n+        kbuild_options: [\"CONFIG_MALI_BIFROST_SYSTEM_TRACE=y\"],\n+    },\n+    kbuild_options: [\n+        \"MALI_UNIT_TEST={{.unit_test_code}}\",\n+        \"MALI_CUSTOMER_RELEASE={{.release}}\",\n+        \"MALI_KERNEL_TEST_API={{.debug}}\",\n+    ],\n+    defaults: [\"kernel_defaults\"],\n+}\n+\n+bob_kernel_module {\n+    name: \"mali_kbase\",\n+    srcs: [\n+        \"*.c\",\n+        \"*.h\",\n+        \"Kbuild\",\n+        \"backend/gpu/*.c\",\n+        \"backend/gpu/*.h\",\n+        \"backend/gpu/Kbuild\",\n+        \"ipa/*.c\",\n+        \"ipa/*.h\",\n+        \"ipa/Kbuild\",\n+        \"platform/*.h\",\n+        \"platform/*/*.c\",\n+        \"platform/*/*.h\",\n+        \"platform/*/Kbuild\",\n+        \"thirdparty/*.c\",\n+    ],\n+    kbuild_options: [\n+        \"CONFIG_MALI_KUTF=n\",\n+        \"CONFIG_MALI_MIDGARD=m\",\n+        \"CONFIG_MALI_NO_MALI_DEFAULT_GPU={{.gpu}}\",\n+        \"CONFIG_MALI_PLATFORM_NAME={{.mali_platform_name}}\",\n+        \"MALI_KERNEL_TEST_API={{.unit_test_code}}\",\n+        \"MALI_MOCK_TEST={{.mali_mock_test}}\",\n+    ],\n+    mali_error_inject: {\n+        kbuild_options: [\"CONFIG_MALI_BIFROST_ERROR_INJECT=y\"],\n+    },\n+    mali_error_inject_random: {\n+        kbuild_options: [\"CONFIG_MALI_ERROR_INJECT_RANDOM=y\"],\n+    },\n+    mali_prfcnt_set_secondary: {\n+        kbuild_options: [\"CONFIG_MALI_BIFROST_PRFCNT_SET_SECONDARY=y\"],\n+    },\n+    mali_2mb_alloc: {\n+        kbuild_options: [\"CONFIG_MALI_2MB_ALLOC=y\"],\n+    },\n+    mali_mock_test: {\n+        srcs: [\"tests/internal/src/mock/mali_kbase_pm_driver_mock.c\"],\n+    },\n+    defaults: [\"mali_kbase_shared_config_defaults\"],\n+}\n+\n+optional_subdirs = [\"tests\"]\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/docs/Doxyfile b/drivers/gpu/arm/bifrost_for_linux/docs/Doxyfile\nindex 35ff2f1ce4a068..6498dcbc1840d5 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/docs/Doxyfile\n+++ b/drivers/gpu/arm/bifrost_for_linux/docs/Doxyfile\n@@ -1,17 +1,23 @@\n #\n-# (C) COPYRIGHT 2011-2013, 2015 ARM Limited. All rights reserved.\n+# (C) COPYRIGHT 2011-2013, 2015, 2017 ARM Limited. All rights reserved.\n #\n # This program is free software and is provided to you under the terms of the\n # GNU General Public License version 2 as published by the Free Software\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n \n ##############################################################################\n@@ -32,7 +38,7 @@\n # directories like \"/usr/src/myproject\". Separate the files or directories\n # with spaces.\n \n-INPUT                  += ../../kernel/drivers/gpu/arm/midgard/ \n+INPUT                  += ../../kernel/drivers/gpu/arm/midgard/\n \n ##############################################################################\n # Everything below here is optional, and in most cases not required\n@@ -64,7 +70,7 @@ FILE_PATTERNS          +=\n # The EXCLUDE tag can be used to specify files and/or directories that should\n # excluded from the INPUT source files. This way you can easily exclude a\n # subdirectory from a directory tree whose root is specified with the INPUT tag.\n-EXCLUDE                += ../../kernel/drivers/gpu/arm/midgard/platform ../../kernel/drivers/gpu/arm/midgard/platform_dummy ../../kernel/drivers/gpu/arm/midgard/scripts ../../kernel/drivers/gpu/arm/midgard/tests ../../kernel/drivers/gpu/arm/midgard/Makefile ../../kernel/drivers/gpu/arm/midgard/Makefile.kbase ../../kernel/drivers/gpu/arm/midgard/Kbuild ../../kernel/drivers/gpu/arm/midgard/Kconfig ../../kernel/drivers/gpu/arm/midgard/sconscript ../../kernel/drivers/gpu/arm/midgard/docs ../../kernel/drivers/gpu/arm/midgard/pm_test_script.sh ../../kernel/drivers/gpu/arm/midgard/mali_uk.h ../../kernel/drivers/gpu/arm/midgard/Makefile\n+EXCLUDE                += ../../kernel/drivers/gpu/arm/midgard/platform ../../kernel/drivers/gpu/arm/midgard/platform_dummy ../../kernel/drivers/gpu/arm/midgard/scripts ../../kernel/drivers/gpu/arm/midgard/tests ../../kernel/drivers/gpu/arm/midgard/Makefile ../../kernel/drivers/gpu/arm/midgard/Makefile.kbase ../../kernel/drivers/gpu/arm/midgard/Kbuild ../../kernel/drivers/gpu/arm/midgard/Kconfig ../../kernel/drivers/gpu/arm/midgard/sconscript ../../kernel/drivers/gpu/arm/midgard/docs ../../kernel/drivers/gpu/arm/midgard/mali_uk.h ../../kernel/drivers/gpu/arm/midgard/Makefile\n \n \n # If the value of the INPUT tag contains directories, you can use the\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/docs/policy_operation_diagram.dot b/drivers/gpu/arm/bifrost_for_linux/docs/policy_operation_diagram.dot\nindex 7ae05c2f8ded45..a15b5581148285 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/docs/policy_operation_diagram.dot\n+++ b/drivers/gpu/arm/bifrost_for_linux/docs/policy_operation_diagram.dot\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n digraph policy_objects_diagram {\n \trankdir=LR;\n \tsize=\"12,8\";\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/docs/policy_overview.dot b/drivers/gpu/arm/bifrost_for_linux/docs/policy_overview.dot\nindex 159b993b7d61f6..6b873359319193 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/docs/policy_overview.dot\n+++ b/drivers/gpu/arm/bifrost_for_linux/docs/policy_overview.dot\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n digraph policy_objects_diagram {\n \trankdir=LR\n \tsize=\"6,6\"\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/ipa/Kbuild b/drivers/gpu/arm/bifrost_for_linux/ipa/Kbuild\nindex 0776428fce4fab..1df2e9de9d5a41 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/ipa/Kbuild\n+++ b/drivers/gpu/arm/bifrost_for_linux/ipa/Kbuild\n@@ -1,17 +1,23 @@\n #\n-# (C) COPYRIGHT 2016-2017 ARM Limited. All rights reserved.\n+# (C) COPYRIGHT 2016-2018 ARM Limited. All rights reserved.\n #\n # This program is free software and is provided to you under the terms of the\n # GNU General Public License version 2 as published by the Free Software\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n bifrost_kbase-y += \\\n \tipa/mali_kbase_ipa_simple.o \\\n@@ -19,9 +25,8 @@ bifrost_kbase-y += \\\n \n bifrost_kbase-$(CONFIG_DEBUG_FS) += ipa/mali_kbase_ipa_debugfs.o\n \n-ifneq ($(wildcard $(srctree)/$(src)/ipa/mali_kbase_ipa_vinstr_g71.c),)\n+ifneq ($(wildcard $(srctree)/$(src)/ipa/mali_kbase_ipa_vinstr_common.c),)\n   bifrost_kbase-y += \\\n-\tipa/mali_kbase_ipa_vinstr_g71.o \\\n+\tipa/mali_kbase_ipa_vinstr_g7x.o \\\n \tipa/mali_kbase_ipa_vinstr_common.o\n-\n endif\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa.c b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa.c\nindex d6332b55e9701b..23ac2ec16dfb78 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa.c\n@@ -1,19 +1,24 @@\n /*\n  *\n- * (C) COPYRIGHT 2016-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2016-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n-\n-\n #include <linux/thermal.h>\n #include <linux/devfreq_cooling.h>\n #include <linux/of.h>\n@@ -21,6 +26,7 @@\n #include \"mali_kbase_ipa.h\"\n #include \"mali_kbase_ipa_debugfs.h\"\n #include \"mali_kbase_ipa_simple.h\"\n+#include \"backend/gpu/mali_kbase_pm_internal.h\"\n \n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))\n #include <linux/pm_opp.h>\n@@ -33,10 +39,14 @@\n \n #define KBASE_IPA_FALLBACK_MODEL_NAME \"mali-simple-power-model\"\n #define KBASE_IPA_G71_MODEL_NAME      \"mali-g71-power-model\"\n+#define KBASE_IPA_G72_MODEL_NAME      \"mali-g72-power-model\"\n+#define KBASE_IPA_TNOX_MODEL_NAME     \"mali-tnox-power-model\"\n \n static struct kbase_ipa_model_ops *kbase_ipa_all_model_ops[] = {\n \t&kbase_simple_ipa_model_ops,\n-\t&kbase_g71_ipa_model_ops\n+\t&kbase_g71_ipa_model_ops,\n+\t&kbase_g72_ipa_model_ops,\n+\t&kbase_tnox_ipa_model_ops\n };\n \n int kbase_ipa_model_recalculate(struct kbase_ipa_model *model)\n@@ -93,6 +103,15 @@ const char *kbase_ipa_model_name_from_id(u32 gpu_id)\n \t\tswitch (GPU_ID2_MODEL_MATCH_VALUE(prod_id)) {\n \t\tcase GPU_ID2_PRODUCT_TMIX:\n \t\t\treturn KBASE_IPA_G71_MODEL_NAME;\n+\t\tcase GPU_ID2_PRODUCT_THEX:\n+\t\t\treturn KBASE_IPA_G72_MODEL_NAME;\n+\t\tcase GPU_ID2_PRODUCT_TNOX:\n+\t\t\treturn KBASE_IPA_TNOX_MODEL_NAME;\n+\t\tcase GPU_ID2_PRODUCT_TGOX:\n+\t\t\tif ((gpu_id & GPU_ID2_VERSION_MAJOR) ==\n+\t\t\t\t\t(0 << GPU_ID2_VERSION_MAJOR_SHIFT))\n+\t\t\t\t/* TGOX r0 shares a power model with TNOX */\n+\t\t\t\treturn KBASE_IPA_TNOX_MODEL_NAME;\n \t\tdefault:\n \t\t\treturn KBASE_IPA_FALLBACK_MODEL_NAME;\n \t\t}\n@@ -109,6 +128,10 @@ static struct device_node *get_model_dt_node(struct kbase_ipa_model *model)\n \tsnprintf(compat_string, sizeof(compat_string), \"arm,%s\",\n \t\t model->ops->name);\n \n+\t/* of_find_compatible_node() will call of_node_put() on the root node,\n+\t * so take a reference on it first.\n+\t */\n+\tof_node_get(model->kbdev->dev->of_node);\n \tmodel_dt_node = of_find_compatible_node(model->kbdev->dev->of_node,\n \t\t\t\t\t\tNULL, compat_string);\n \tif (!model_dt_node && !model->missing_dt_node_warning) {\n@@ -130,6 +153,10 @@ int kbase_ipa_model_add_param_s32(struct kbase_ipa_model *model,\n \tchar *origin;\n \n \terr = of_property_read_u32_array(model_dt_node, name, addr, num_elems);\n+\t/* We're done with model_dt_node now, so drop the reference taken in\n+\t * get_model_dt_node()/of_find_compatible_node().\n+\t */\n+\tof_node_put(model_dt_node);\n \n \tif (err && dt_required) {\n \t\tmemset(addr, 0, sizeof(s32) * num_elems);\n@@ -177,6 +204,12 @@ int kbase_ipa_model_add_param_string(struct kbase_ipa_model *model,\n \n \terr = of_property_read_string(model_dt_node, name,\n \t\t\t\t      &string_prop_value);\n+\n+\t/* We're done with model_dt_node now, so drop the reference taken in\n+\t * get_model_dt_node()/of_find_compatible_node().\n+\t */\n+\tof_node_put(model_dt_node);\n+\n \tif (err && dt_required) {\n \t\tstrncpy(addr, \"\", size - 1);\n \t\tdev_warn(model->kbdev->dev,\n@@ -198,7 +231,6 @@ int kbase_ipa_model_add_param_string(struct kbase_ipa_model *model,\n \n \terr = kbase_ipa_model_param_add(model, name, addr, size,\n \t\t\t\t\tPARAM_TYPE_STRING);\n-\n \treturn err;\n }\n \n@@ -287,14 +319,6 @@ int kbase_ipa_init(struct kbase_device *kbdev)\n \t/* The simple IPA model must *always* be present.*/\n \tops = kbase_ipa_model_ops_find(kbdev, KBASE_IPA_FALLBACK_MODEL_NAME);\n \n-\tif (!ops->do_utilization_scaling_in_framework) {\n-\t\tdev_err(kbdev->dev,\n-\t\t\t\"Fallback IPA model %s should not account for utilization\\n\",\n-\t\t\tops->name);\n-\t\terr = -EINVAL;\n-\t\tgoto end;\n-\t}\n-\n \tdefault_model = kbase_ipa_init_model(kbdev, ops);\n \tif (!default_model) {\n \t\terr = -EINVAL;\n@@ -325,8 +349,11 @@ int kbase_ipa_init(struct kbase_device *kbdev)\n \t\tops = kbase_ipa_model_ops_find(kbdev, model_name);\n \t\tkbdev->ipa.configured_model = kbase_ipa_init_model(kbdev, ops);\n \t\tif (!kbdev->ipa.configured_model) {\n-\t\t\terr = -EINVAL;\n-\t\t\tgoto end;\n+\t\t\tdev_warn(kbdev->dev,\n+\t\t\t\t\"Failed to initialize ipa-model: \\'%s\\'\\n\"\n+\t\t\t\t\"Falling back on default model\\n\",\n+\t\t\t\tmodel_name);\n+\t\t\tkbdev->ipa.configured_model = default_model;\n \t\t}\n \t} else {\n \t\tkbdev->ipa.configured_model = default_model;\n@@ -390,7 +417,7 @@ static u32 kbase_scale_dynamic_power(const u32 c, const u32 freq,\n \tconst u64 v2fc = (u64) c * (u64) v2f;\n \n \t/* Range: 0 < v2fc / 1000 < 2^13 mW */\n-\treturn v2fc / 1000;\n+\treturn div_u64(v2fc, 1000);\n }\n \n /**\n@@ -419,7 +446,7 @@ u32 kbase_scale_static_power(const u32 c, const u32 voltage)\n \tconst u64 v3c_big = (u64) c * (u64) v3;\n \n \t/* Range: 0 < v3c_big / 1000000 < 2^13 mW */\n-\treturn v3c_big / 1000000;\n+\treturn div_u64(v3c_big, 1000000);\n }\n \n static struct kbase_ipa_model *get_current_model(struct kbase_device *kbdev)\n@@ -455,7 +482,8 @@ static u32 get_static_power_locked(struct kbase_device *kbdev,\n \treturn power;\n }\n \n-#ifdef CONFIG_MALI_PWRSOFT_765\n+#if defined(CONFIG_MALI_PWRSOFT_765) || \\\n+\tLINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)\n static unsigned long kbase_get_static_power(struct devfreq *df,\n \t\t\t\t\t    unsigned long voltage)\n #else\n@@ -464,7 +492,8 @@ static unsigned long kbase_get_static_power(unsigned long voltage)\n {\n \tstruct kbase_ipa_model *model;\n \tu32 power = 0;\n-#ifdef CONFIG_MALI_PWRSOFT_765\n+#if defined(CONFIG_MALI_PWRSOFT_765) || \\\n+\tLINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)\n \tstruct kbase_device *kbdev = dev_get_drvdata(&df->dev);\n #else\n \tstruct kbase_device *kbdev = kbase_find_device(-1);\n@@ -477,14 +506,16 @@ static unsigned long kbase_get_static_power(unsigned long voltage)\n \n \tmutex_unlock(&kbdev->ipa.lock);\n \n-#ifndef CONFIG_MALI_PWRSOFT_765\n+#if !(defined(CONFIG_MALI_PWRSOFT_765) || \\\n+\tLINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))\n \tkbase_release_device(kbdev);\n #endif\n \n \treturn power;\n }\n \n-#ifdef CONFIG_MALI_PWRSOFT_765\n+#if defined(CONFIG_MALI_PWRSOFT_765) || \\\n+\tLINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)\n static unsigned long kbase_get_dynamic_power(struct devfreq *df,\n \t\t\t\t\t     unsigned long freq,\n \t\t\t\t\t     unsigned long voltage)\n@@ -496,7 +527,8 @@ static unsigned long kbase_get_dynamic_power(unsigned long freq,\n \tstruct kbase_ipa_model *model;\n \tu32 power_coeff = 0, power = 0;\n \tint err = 0;\n-#ifdef CONFIG_MALI_PWRSOFT_765\n+#if defined(CONFIG_MALI_PWRSOFT_765) || \\\n+\tLINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)\n \tstruct kbase_device *kbdev = dev_get_drvdata(&df->dev);\n #else\n \tstruct kbase_device *kbdev = kbase_find_device(-1);\n@@ -506,7 +538,7 @@ static unsigned long kbase_get_dynamic_power(unsigned long freq,\n \n \tmodel = kbdev->ipa.fallback_model;\n \n-\terr = model->ops->get_dynamic_coeff(model, &power_coeff, freq);\n+\terr = model->ops->get_dynamic_coeff(model, &power_coeff);\n \n \tif (!err)\n \t\tpower = kbase_scale_dynamic_power(power_coeff, freq, voltage);\n@@ -517,55 +549,71 @@ static unsigned long kbase_get_dynamic_power(unsigned long freq,\n \n \tmutex_unlock(&kbdev->ipa.lock);\n \n-#ifndef CONFIG_MALI_PWRSOFT_765\n+#if !(defined(CONFIG_MALI_PWRSOFT_765) || \\\n+\tLINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))\n \tkbase_release_device(kbdev);\n #endif\n \n \treturn power;\n }\n \n-int kbase_get_real_power(struct devfreq *df, u32 *power,\n+int kbase_get_real_power_locked(struct kbase_device *kbdev, u32 *power,\n \t\t\t\tunsigned long freq,\n \t\t\t\tunsigned long voltage)\n {\n \tstruct kbase_ipa_model *model;\n \tu32 power_coeff = 0;\n \tint err = 0;\n-\tstruct kbase_device *kbdev = dev_get_drvdata(&df->dev);\n+\tstruct kbasep_pm_metrics diff;\n+\tu64 total_time;\n \n-\tmutex_lock(&kbdev->ipa.lock);\n+\tlockdep_assert_held(&kbdev->ipa.lock);\n+\n+\tkbase_pm_get_dvfs_metrics(kbdev, &kbdev->ipa.last_metrics, &diff);\n \n \tmodel = get_current_model(kbdev);\n \n-\terr = model->ops->get_dynamic_coeff(model, &power_coeff, freq);\n+\terr = model->ops->get_dynamic_coeff(model, &power_coeff);\n \n-\t/* If we switch to protected model between get_current_model() and\n-\t * get_dynamic_coeff(), counter reading could fail. If that happens\n-\t * (unlikely, but possible), revert to the fallback model. */\n+\t/* If the counter model returns an error (e.g. switching back to\n+\t * protected mode and failing to read counters, or a counter sample\n+\t * with too few cycles), revert to the fallback model.\n+\t */\n \tif (err && model != kbdev->ipa.fallback_model) {\n \t\tmodel = kbdev->ipa.fallback_model;\n-\t\terr = model->ops->get_dynamic_coeff(model, &power_coeff, freq);\n+\t\terr = model->ops->get_dynamic_coeff(model, &power_coeff);\n \t}\n \n \tif (err)\n-\t\tgoto exit_unlock;\n+\t\treturn err;\n \n \t*power = kbase_scale_dynamic_power(power_coeff, freq, voltage);\n \n-\tif (model->ops->do_utilization_scaling_in_framework) {\n-\t\tstruct devfreq_dev_status *status = &df->last_status;\n-\t\tunsigned long total_time = max(status->total_time, 1ul);\n-\t\tu64 busy_time = min(status->busy_time, total_time);\n-\n-\t\t*power = ((u64) *power * (u64) busy_time) / total_time;\n-\t}\n+\t/* time_busy / total_time cannot be >1, so assigning the 64-bit\n+\t * result of div_u64 to *power cannot overflow.\n+\t */\n+\ttotal_time = diff.time_busy + (u64) diff.time_idle;\n+\t*power = div_u64(*power * (u64) diff.time_busy,\n+\t\t\t max(total_time, 1ull));\n \n \t*power += get_static_power_locked(kbdev, model, voltage);\n \n-exit_unlock:\n+\treturn err;\n+}\n+KBASE_EXPORT_TEST_API(kbase_get_real_power_locked);\n+\n+int kbase_get_real_power(struct devfreq *df, u32 *power,\n+\t\t\t\tunsigned long freq,\n+\t\t\t\tunsigned long voltage)\n+{\n+\tint ret;\n+\tstruct kbase_device *kbdev = dev_get_drvdata(&df->dev);\n+\n+\tmutex_lock(&kbdev->ipa.lock);\n+\tret = kbase_get_real_power_locked(kbdev, power, freq, voltage);\n \tmutex_unlock(&kbdev->ipa.lock);\n \n-\treturn err;\n+\treturn ret;\n }\n KBASE_EXPORT_TEST_API(kbase_get_real_power);\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa.h b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa.h\nindex 67478fe911ea48..844723a74bdaa8 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa.h\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2016-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2016-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_IPA_H_\n #define _KBASE_IPA_H_\n \n@@ -22,8 +27,17 @@\n \n struct devfreq;\n \n+/**\n+ * struct kbase_ipa_model - Object describing a particular IPA model.\n+ * @kbdev:                    pointer to kbase device\n+ * @model_data:               opaque pointer to model specific data, accessed\n+ *                            only by model specific methods.\n+ * @ops:                      pointer to object containing model specific methods.\n+ * @params:                   head of the list of debugfs params added for model\n+ * @missing_dt_node_warning:  flag to limit the matching power model DT not found\n+ *                            warning to once.\n+ */\n struct kbase_ipa_model {\n-\tstruct list_head link;\n \tstruct kbase_device *kbdev;\n \tvoid *model_data;\n \tstruct kbase_ipa_model_ops *ops;\n@@ -82,8 +96,6 @@ struct kbase_ipa_model_ops {\n \t * get_dynamic_coeff() - calculate dynamic power coefficient\n \t * @model:\t\tpointer to model\n \t * @coeffp:\t\tpointer to return value location\n-\t * @current_freq:\tfrequency the GPU has been running at for the\n-\t *\t\t\tprevious sampling period.\n \t *\n \t * Calculate a dynamic power coefficient, with units pW/(Hz V^2), which\n \t * is then scaled by the IPA framework according to the current OPP's\n@@ -91,8 +103,7 @@ struct kbase_ipa_model_ops {\n \t *\n \t * Return: 0 on success, or an error code.\n \t */\n-\tint (*get_dynamic_coeff)(struct kbase_ipa_model *model, u32 *coeffp,\n-\t\t\t\t u32 current_freq);\n+\tint (*get_dynamic_coeff)(struct kbase_ipa_model *model, u32 *coeffp);\n \t/*\n \t * get_static_coeff() - calculate static power coefficient\n \t * @model:\t\tpointer to model\n@@ -104,29 +115,74 @@ struct kbase_ipa_model_ops {\n \t * Return: 0 on success, or an error code.\n \t */\n \tint (*get_static_coeff)(struct kbase_ipa_model *model, u32 *coeffp);\n-\t/* If false, the model's get_dynamic_coeff() method accounts for how\n-\t * long the GPU was active over the sample period. If true, the\n-\t * framework will scale the calculated power according to the\n-\t * utilization stats recorded by devfreq in get_real_power(). */\n-\tbool do_utilization_scaling_in_framework;\n };\n \n-/* Models can be registered only in the platform's platform_init_func call */\n-int kbase_ipa_model_ops_register(struct kbase_device *kbdev,\n-\t\t\t     struct kbase_ipa_model_ops *new_model_ops);\n-struct kbase_ipa_model *kbase_ipa_get_model(struct kbase_device *kbdev,\n-\t\t\t\t\t    const char *name);\n-\n+/**\n+ * kbase_ipa_init - Initialize the IPA feature\n+ * @kbdev:      pointer to kbase device\n+ *\n+ * simple IPA power model is initialized as a fallback model and if that\n+ * initialization fails then IPA is not used.\n+ * The device tree is read for the name of ipa model to be used, by using the\n+ * property string \"ipa-model\". If that ipa model is supported then it is\n+ * initialized but if the initialization fails then simple power model is used.\n+ *\n+ * Return: 0 on success, negative -errno on error\n+ */\n int kbase_ipa_init(struct kbase_device *kbdev);\n+\n+/**\n+ * kbase_ipa_term - Terminate the IPA feature\n+ * @kbdev:      pointer to kbase device\n+ *\n+ * Both simple IPA power model and model retrieved from device tree are\n+ * terminated.\n+ */\n void kbase_ipa_term(struct kbase_device *kbdev);\n-void kbase_ipa_model_use_fallback_locked(struct kbase_device *kbdev);\n-void kbase_ipa_model_use_configured_locked(struct kbase_device *kbdev);\n+\n+/**\n+ * kbase_ipa_model_recalculate - Recalculate the model coefficients\n+ * @model:      pointer to the IPA model object, already initialized\n+ *\n+ * It shall be called immediately after the model has been initialized\n+ * or when the model parameter has changed, so that any coefficients\n+ * derived from parameters can be recalculated.\n+ * Its a wrapper for the module specific recalculate() method.\n+ *\n+ * Return: 0 on success, negative -errno on error\n+ */\n int kbase_ipa_model_recalculate(struct kbase_ipa_model *model);\n+\n+/**\n+ * kbase_ipa_init_model - Initilaize the particular IPA model\n+ * @kbdev:      pointer to the IPA model object, already initialized\n+ * @ops:        pointer to object containing model specific methods.\n+ *\n+ * Initialize the model corresponding to the @ops pointer passed.\n+ * The init() method specified in @ops would be called.\n+ *\n+ * Return: pointer to kbase_ipa_model on success, NULL on error\n+ */\n struct kbase_ipa_model *kbase_ipa_init_model(struct kbase_device *kbdev,\n \t\t\t\t\t     struct kbase_ipa_model_ops *ops);\n+/**\n+ * kbase_ipa_term_model - Terminate the particular IPA model\n+ * @model:      pointer to the IPA model object, already initialized\n+ *\n+ * Terminate the model, using the term() method.\n+ * Module specific parameters would be freed.\n+ */\n void kbase_ipa_term_model(struct kbase_ipa_model *model);\n \n+/* Switch to the fallback model */\n+void kbase_ipa_model_use_fallback_locked(struct kbase_device *kbdev);\n+\n+/* Switch to the model retrieved from device tree */\n+void kbase_ipa_model_use_configured_locked(struct kbase_device *kbdev);\n+\n extern struct kbase_ipa_model_ops kbase_g71_ipa_model_ops;\n+extern struct kbase_ipa_model_ops kbase_g72_ipa_model_ops;\n+extern struct kbase_ipa_model_ops kbase_tnox_ipa_model_ops;\n \n #if MALI_UNIT_TEST\n /**\n@@ -144,6 +200,13 @@ extern struct kbase_ipa_model_ops kbase_g71_ipa_model_ops;\n int kbase_get_real_power(struct devfreq *df, u32 *power,\n \t\t\t\tunsigned long freq,\n \t\t\t\tunsigned long voltage);\n+\n+/* Called by kbase_get_real_power() to invoke the power models.\n+ * Must be called with kbdev->ipa.lock held.\n+ */\n+int kbase_get_real_power_locked(struct kbase_device *kbdev, u32 *power,\n+\t\t\t\tunsigned long freq,\n+\t\t\t\tunsigned long voltage);\n #endif /* MALI_UNIT_TEST */\n \n #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_debugfs.c b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_debugfs.c\nindex eafc14009ddcc2..029023c6036b57 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_debugfs.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_debugfs.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <linux/debugfs.h>\n #include <linux/list.h>\n #include <linux/mutex.h>\n@@ -56,14 +61,18 @@ static int param_int_set(void *data, u64 val)\n \tstruct kbase_ipa_model_param *param = data;\n \tstruct kbase_ipa_model *model = param->model;\n \ts64 sval = (s64) val;\n+\ts32 old_val;\n \tint err = 0;\n \n \tif (sval < S32_MIN || sval > S32_MAX)\n \t\treturn -ERANGE;\n \n \tmutex_lock(&param->model->kbdev->ipa.lock);\n+\told_val = *param->addr.s32p;\n \t*param->addr.s32p = val;\n \terr = kbase_ipa_model_recalculate(model);\n+\tif (err < 0)\n+\t\t*param->addr.s32p = old_val;\n \tmutex_unlock(&param->model->kbdev->ipa.lock);\n \n \treturn err;\n@@ -92,6 +101,7 @@ static ssize_t param_string_set(struct file *file, const char __user *user_buf,\n {\n \tstruct kbase_ipa_model_param *param = file->private_data;\n \tstruct kbase_ipa_model *model = param->model;\n+\tchar *old_str = NULL;\n \tssize_t ret = count;\n \tsize_t buf_size;\n \tint err;\n@@ -103,6 +113,12 @@ static ssize_t param_string_set(struct file *file, const char __user *user_buf,\n \t\tgoto end;\n \t}\n \n+\told_str = kstrndup(param->addr.str, param->size, GFP_KERNEL);\n+\tif (!old_str) {\n+\t\tret = -ENOMEM;\n+\t\tgoto end;\n+\t}\n+\n \tbuf_size = min(param->size - 1, count);\n \tif (copy_from_user(param->addr.str, user_buf, buf_size)) {\n \t\tret = -EFAULT;\n@@ -112,10 +128,13 @@ static ssize_t param_string_set(struct file *file, const char __user *user_buf,\n \tparam->addr.str[buf_size] = '\\0';\n \n \terr = kbase_ipa_model_recalculate(model);\n-\tif (err < 0)\n+\tif (err < 0) {\n \t\tret = err;\n+\t\tstrlcpy(param->addr.str, old_str, param->size);\n+\t}\n \n end:\n+\tkfree(old_str);\n \tmutex_unlock(&model->kbdev->ipa.lock);\n \n \treturn ret;\n@@ -142,6 +161,12 @@ int kbase_ipa_model_param_add(struct kbase_ipa_model *model, const char *name,\n \t/* 'name' is stack-allocated for array elements, so copy it into\n \t * heap-allocated storage */\n \tparam->name = kstrdup(name, GFP_KERNEL);\n+\n+\tif (!param->name) {\n+\t\tkfree(param);\n+\t\treturn -ENOMEM;\n+\t}\n+\n \tparam->addr.voidp = addr;\n \tparam->size = size;\n \tparam->type = type;\n@@ -207,6 +232,30 @@ static void kbase_ipa_model_debugfs_init(struct kbase_ipa_model *model)\n \t}\n }\n \n+void kbase_ipa_model_param_set_s32(struct kbase_ipa_model *model,\n+\tconst char *name, s32 val)\n+{\n+\tstruct kbase_ipa_model_param *param;\n+\n+\tmutex_lock(&model->kbdev->ipa.lock);\n+\n+\tlist_for_each_entry(param, &model->params, link) {\n+\t\tif (!strcmp(param->name, name)) {\n+\t\t\tif (param->type == PARAM_TYPE_S32) {\n+\t\t\t\t*param->addr.s32p = val;\n+\t\t\t} else {\n+\t\t\t\tdev_err(model->kbdev->dev,\n+\t\t\t\t\t\"Wrong type for %s parameter %s\\n\",\n+\t\t\t\t\tmodel->ops->name, param->name);\n+\t\t\t}\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\tmutex_unlock(&model->kbdev->ipa.lock);\n+}\n+KBASE_EXPORT_TEST_API(kbase_ipa_model_param_set_s32);\n+\n void kbase_ipa_debugfs_init(struct kbase_device *kbdev)\n {\n \tmutex_lock(&kbdev->ipa.lock);\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_debugfs.h b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_debugfs.h\nindex ec06e2096f9427..a983d9c1421665 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_debugfs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_debugfs.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_IPA_DEBUGFS_H_\n #define _KBASE_IPA_DEBUGFS_H_\n \n@@ -31,6 +36,20 @@ int kbase_ipa_model_param_add(struct kbase_ipa_model *model, const char *name,\n \t\t\t      enum kbase_ipa_model_param_type type);\n void kbase_ipa_model_param_free_all(struct kbase_ipa_model *model);\n \n+/**\n+ * kbase_ipa_model_param_set_s32 - Set an integer model parameter\n+ *\n+ * @model:\tpointer to IPA model\n+ * @name:\tname of corresponding debugfs entry\n+ * @val:\tnew value of the parameter\n+ *\n+ * This function is only exposed for use by unit tests running in\n+ * kernel space. Normally it is expected that parameter values will\n+ * instead be set via debugfs.\n+ */\n+void kbase_ipa_model_param_set_s32(struct kbase_ipa_model *model,\n+\tconst char *name, s32 val);\n+\n #else /* CONFIG_DEBUG_FS */\n \n static inline int kbase_ipa_model_param_add(struct kbase_ipa_model *model,\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_simple.c b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_simple.c\nindex 1144eb6a6ef821..31eee62ccbd053 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_simple.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_simple.c\n@@ -1,21 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2016-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2016-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <linux/freezer.h>\n+#include <uapi/linux/thermal.h>\n #include <linux/thermal.h>\n #ifdef CONFIG_DEVFREQ_THERMAL\n #include <linux/devfreq_cooling.h>\n@@ -38,7 +44,7 @@ static int kbase_simple_power_model_get_dummy_temp(\n \tstruct thermal_zone_device *tz,\n \tunsigned long *temp)\n {\n-\t*temp = ACCESS_ONCE(dummy_temp);\n+\t*temp = READ_ONCE(dummy_temp);\n \treturn 0;\n }\n \n@@ -47,9 +53,9 @@ static int dummy_temp;\n \n static int kbase_simple_power_model_get_dummy_temp(\n \tstruct thermal_zone_device *tz,\n-\tint *dummy_temp)\n+\tint *temp)\n {\n-\t*temp = ACCESS_ONCE(dummy_temp);\n+\t*temp = READ_ONCE(dummy_temp);\n \treturn 0;\n }\n #endif\n@@ -63,7 +69,7 @@ static int kbase_simple_power_model_get_dummy_temp(\n \n void kbase_simple_power_model_set_dummy_temp(int temp)\n {\n-\tACCESS_ONCE(dummy_temp) = temp;\n+\tWRITE_ONCE(dummy_temp, temp);\n }\n KBASE_EXPORT_TEST_API(kbase_simple_power_model_set_dummy_temp);\n \n@@ -92,7 +98,7 @@ struct kbase_ipa_model_simple_data {\n \tu32 dynamic_coefficient;\n \tu32 static_coefficient;\n \ts32 ts[4];\n-\tchar tz_name[16];\n+\tchar tz_name[THERMAL_NAME_LENGTH];\n \tstruct thermal_zone_device *gpu_tz;\n \tstruct task_struct *poll_temperature_thread;\n \tint current_temperature;\n@@ -114,10 +120,10 @@ struct kbase_ipa_model_simple_data {\n static u32 calculate_temp_scaling_factor(s32 ts[4], s64 t)\n {\n \t/* Range: -2^24 < t2 < 2^24 m(Deg^2) */\n-\tconst s64 t2 = (t * t) / 1000;\n+\tconst s64 t2 = div_s64((t * t), 1000);\n \n \t/* Range: -2^31 < t3 < 2^31 m(Deg^3) */\n-\tconst s64 t3 = (t * t2) / 1000;\n+\tconst s64 t3 = div_s64((t * t2), 1000);\n \n \t/*\n \t * Sum the parts. t^[1-3] are in m(Deg^N), but the coefficients are in\n@@ -130,7 +136,7 @@ static u32 calculate_temp_scaling_factor(s32 ts[4], s64 t)\n \t\t\t  + ts[0] * 1000; /* +/- 2^41 */\n \n \t/* Range: -2^60 < res_unclamped < 2^60 */\n-\ts64 res_unclamped = res_big / 1000;\n+\ts64 res_unclamped = div_s64(res_big, 1000);\n \n \t/* Clamp to range of 0x to 10x the static power */\n \treturn clamp(res_unclamped, (s64) 0, (s64) 10000000);\n@@ -152,7 +158,7 @@ static int poll_temperature(void *data)\n \tset_freezable();\n \n \twhile (!kthread_should_stop()) {\n-\t\tstruct thermal_zone_device *tz = ACCESS_ONCE(model_data->gpu_tz);\n+\t\tstruct thermal_zone_device *tz = READ_ONCE(model_data->gpu_tz);\n \n \t\tif (tz) {\n \t\t\tint ret;\n@@ -167,9 +173,9 @@ static int poll_temperature(void *data)\n \t\t\ttemp = FALLBACK_STATIC_TEMPERATURE;\n \t\t}\n \n-\t\tACCESS_ONCE(model_data->current_temperature) = temp;\n+\t\tWRITE_ONCE(model_data->current_temperature, temp);\n \n-\t\tmsleep_interruptible(ACCESS_ONCE(model_data->temperature_poll_interval_ms));\n+\t\tmsleep_interruptible(READ_ONCE(model_data->temperature_poll_interval_ms));\n \n \t\ttry_to_freeze();\n \t}\n@@ -185,7 +191,7 @@ static int model_static_coeff(struct kbase_ipa_model *model, u32 *coeffp)\n \tu64 coeff_big;\n \tint temp;\n \n-\ttemp = ACCESS_ONCE(model_data->current_temperature);\n+\ttemp = READ_ONCE(model_data->current_temperature);\n \n \t/* Range: 0 <= temp_scaling_factor < 2^24 */\n \ttemp_scaling_factor = calculate_temp_scaling_factor(model_data->ts,\n@@ -197,13 +203,12 @@ static int model_static_coeff(struct kbase_ipa_model *model, u32 *coeffp)\n \t * 0 <= static_coefficient < 2^28.\n \t */\n \tcoeff_big = (u64) model_data->static_coefficient * (u64) temp_scaling_factor;\n-\t*coeffp = coeff_big / 1000000;\n+\t*coeffp = div_u64(coeff_big, 1000000);\n \n \treturn 0;\n }\n \n-static int model_dynamic_coeff(struct kbase_ipa_model *model, u32 *coeffp,\n-\t\t\t       u32 current_freq)\n+static int model_dynamic_coeff(struct kbase_ipa_model *model, u32 *coeffp)\n {\n \tstruct kbase_ipa_model_simple_data *model_data =\n \t\t(struct kbase_ipa_model_simple_data *) model->model_data;\n@@ -288,20 +293,43 @@ static int kbase_simple_power_model_recalculate(struct kbase_ipa_model *model)\n \t\t\t(struct kbase_ipa_model_simple_data *)model->model_data;\n \tstruct thermal_zone_device *tz;\n \n+\tlockdep_assert_held(&model->kbdev->ipa.lock);\n+\n \tif (!strnlen(model_data->tz_name, sizeof(model_data->tz_name))) {\n-\t\ttz = NULL;\n+\t\tmodel_data->gpu_tz = NULL;\n \t} else {\n-\t\ttz = thermal_zone_get_zone_by_name(model_data->tz_name);\n+\t\tchar tz_name[THERMAL_NAME_LENGTH];\n+\n+\t\tstrlcpy(tz_name, model_data->tz_name, sizeof(tz_name));\n+\n+\t\t/* Release ipa.lock so that thermal_list_lock is not acquired\n+\t\t * with ipa.lock held, thereby avoid lock ordering violation\n+\t\t * lockdep warning. The warning comes as a chain of locks\n+\t\t * ipa.lock --> thermal_list_lock --> tz->lock gets formed\n+\t\t * on registering devfreq cooling device when probe method\n+\t\t * of mali platform driver is invoked.\n+\t\t */\n+\t\tmutex_unlock(&model->kbdev->ipa.lock);\n+\t\ttz = thermal_zone_get_zone_by_name(tz_name);\n+\t\tmutex_lock(&model->kbdev->ipa.lock);\n \n \t\tif (IS_ERR_OR_NULL(tz)) {\n \t\t\tpr_warn_ratelimited(\"Error %ld getting thermal zone \\'%s\\', not yet ready?\\n\",\n-\t\t\t\t\t    PTR_ERR(tz), model_data->tz_name);\n-\t\t\ttz = NULL;\n+\t\t\t\t\t    PTR_ERR(tz), tz_name);\n \t\t\treturn -EPROBE_DEFER;\n \t\t}\n-\t}\n \n-\tACCESS_ONCE(model_data->gpu_tz) = tz;\n+\t\t/* Check if another thread raced against us & updated the\n+\t\t * thermal zone name string. Update the gpu_tz pointer only if\n+\t\t * the name string did not change whilst we retrieved the new\n+\t\t * thermal_zone_device pointer, otherwise model_data->tz_name &\n+\t\t * model_data->gpu_tz would become inconsistent with each other.\n+\t\t * The below check will succeed only for the thread which last\n+\t\t * updated the name string.\n+\t\t */\n+\t\tif (strncmp(tz_name, model_data->tz_name, sizeof(tz_name)) == 0)\n+\t\t\tmodel_data->gpu_tz = tz;\n+\t}\n \n \treturn 0;\n }\n@@ -323,5 +351,5 @@ struct kbase_ipa_model_ops kbase_simple_ipa_model_ops = {\n \t\t.term = &kbase_simple_power_model_term,\n \t\t.get_dynamic_coeff = &model_dynamic_coeff,\n \t\t.get_static_coeff = &model_static_coeff,\n-\t\t.do_utilization_scaling_in_framework = true,\n };\n+KBASE_EXPORT_TEST_API(kbase_simple_ipa_model_ops);\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_simple.h b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_simple.h\nindex 23cd55f5867dcf..84534e07ec55c8 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_simple.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_simple.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_IPA_SIMPLE_H_\n #define _KBASE_IPA_SIMPLE_H_\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_vinstr_common.c b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_vinstr_common.c\nindex d3964d0d3c731c..4019657f41a321 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_vinstr_common.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_vinstr_common.c\n@@ -1,38 +1,35 @@\n /*\n  *\n- * (C) COPYRIGHT 2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2017-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include \"mali_kbase_ipa_vinstr_common.h\"\n+#include \"mali_kbase_ipa_debugfs.h\"\n \n-#if MALI_UNIT_TEST\n-static ktime_t dummy_time;\n-\n-/* Intercept calls to the kernel function using a macro */\n-#ifdef ktime_get\n-#undef ktime_get\n-#endif\n-#define ktime_get() (ACCESS_ONCE(dummy_time))\n+#define DEFAULT_SCALING_FACTOR 5\n \n-void kbase_ipa_set_dummy_time(ktime_t t)\n-{\n-\tACCESS_ONCE(dummy_time) = t;\n-}\n-KBASE_EXPORT_TEST_API(kbase_ipa_set_dummy_time);\n-\n-#endif /* MALI_UNIT_TEST */\n+/* If the value of GPU_ACTIVE is below this, use the simple model\n+ * instead, to avoid extrapolating small amounts of counter data across\n+ * large sample periods.\n+ */\n+#define DEFAULT_MIN_SAMPLE_CYCLES 10000\n \n /**\n  * read_hwcnt() - read a counter value\n@@ -82,10 +79,8 @@ s64 kbase_ipa_sum_all_shader_cores(\n \t\tcore_mask >>= 1;\n \t}\n \n-\t/* Range: -2^54 < ret < 2^54 */\n-\tret *= coeff;\n-\n-\treturn ret / 1000000;\n+\t/* Range: -2^54 < ret * coeff < 2^54 */\n+\treturn ret * coeff;\n }\n \n s64 kbase_ipa_single_counter(\n@@ -96,16 +91,49 @@ s64 kbase_ipa_single_counter(\n \tconst u32 counter_value = kbase_ipa_read_hwcnt(model_data, counter);\n \n \t/* Range: -2^49 < ret < 2^49 */\n-\tconst s64 multiplied = (s64) counter_value * (s64) coeff;\n+\treturn counter_value * (s64) coeff;\n+}\n+\n+/**\n+ * kbase_ipa_gpu_active - Inform IPA that GPU is now active\n+ * @model_data: Pointer to model data\n+ *\n+ * This function may cause vinstr to become active.\n+ */\n+static void kbase_ipa_gpu_active(struct kbase_ipa_model_vinstr_data *model_data)\n+{\n+\tstruct kbase_device *kbdev = model_data->kbdev;\n \n-\t/* Range: -2^29 < return < 2^29 */\n-\treturn multiplied / 1000000;\n+\tlockdep_assert_held(&kbdev->pm.lock);\n+\n+\tif (!kbdev->ipa.vinstr_active) {\n+\t\tkbdev->ipa.vinstr_active = true;\n+\t\tkbase_vinstr_resume_client(model_data->vinstr_cli);\n+\t}\n+}\n+\n+/**\n+ * kbase_ipa_gpu_idle - Inform IPA that GPU is now idle\n+ * @model_data: Pointer to model data\n+ *\n+ * This function may cause vinstr to become idle.\n+ */\n+static void kbase_ipa_gpu_idle(struct kbase_ipa_model_vinstr_data *model_data)\n+{\n+\tstruct kbase_device *kbdev = model_data->kbdev;\n+\n+\tlockdep_assert_held(&kbdev->pm.lock);\n+\n+\tif (kbdev->ipa.vinstr_active) {\n+\t\tkbase_vinstr_suspend_client(model_data->vinstr_cli);\n+\t\tkbdev->ipa.vinstr_active = false;\n+\t}\n }\n \n int kbase_ipa_attach_vinstr(struct kbase_ipa_model_vinstr_data *model_data)\n {\n \tstruct kbase_device *kbdev = model_data->kbdev;\n-\tstruct kbase_uk_hwcnt_reader_setup setup;\n+\tstruct kbase_ioctl_hwcnt_reader_setup setup;\n \tsize_t dump_size;\n \n \tdump_size = kbase_vinstr_dump_size(kbdev);\n@@ -128,90 +156,183 @@ int kbase_ipa_attach_vinstr(struct kbase_ipa_model_vinstr_data *model_data)\n \t\treturn -1;\n \t}\n \n-\tmodel_data->last_sample_read_time = ktime_get();\n \tkbase_vinstr_hwc_clear(model_data->vinstr_cli);\n \n+\tkbdev->ipa.gpu_active_callback = kbase_ipa_gpu_active;\n+\tkbdev->ipa.gpu_idle_callback = kbase_ipa_gpu_idle;\n+\tkbdev->ipa.model_data = model_data;\n+\tkbdev->ipa.vinstr_active = false;\n+\t/* Suspend vinstr, to ensure that the GPU is powered off until there is\n+\t * something to execute.\n+\t */\n+\tkbase_vinstr_suspend_client(model_data->vinstr_cli);\n+\n \treturn 0;\n }\n \n void kbase_ipa_detach_vinstr(struct kbase_ipa_model_vinstr_data *model_data)\n {\n+\tstruct kbase_device *kbdev = model_data->kbdev;\n+\n+\tkbdev->ipa.gpu_active_callback = NULL;\n+\tkbdev->ipa.gpu_idle_callback = NULL;\n+\tkbdev->ipa.model_data = NULL;\n+\tkbdev->ipa.vinstr_active = false;\n+\n \tif (model_data->vinstr_cli)\n \t\tkbase_vinstr_detach_client(model_data->vinstr_cli);\n+\n \tmodel_data->vinstr_cli = NULL;\n \tkfree(model_data->vinstr_buffer);\n \tmodel_data->vinstr_buffer = NULL;\n }\n \n-int kbase_ipa_vinstr_dynamic_coeff(struct kbase_ipa_model *model, u32 *coeffp,\n-\tu32 current_freq)\n+int kbase_ipa_vinstr_dynamic_coeff(struct kbase_ipa_model *model, u32 *coeffp)\n {\n \tstruct kbase_ipa_model_vinstr_data *model_data =\n \t\t\t(struct kbase_ipa_model_vinstr_data *)model->model_data;\n+\tstruct kbase_device *kbdev = model_data->kbdev;\n \ts64 energy = 0;\n \tsize_t i;\n-\tktime_t now = ktime_get();\n-\tktime_t time_since_last_sample =\n-\t\t\tktime_sub(now, model_data->last_sample_read_time);\n-\t/* Range: 2^0 < time_since_last_sample_ms < 2^10 (1-1000ms) */\n-\ts64 time_since_last_sample_ms = ktime_to_ms(time_since_last_sample);\n-\tu64 coeff = 0;\n-\tu64 num_cycles;\n+\tu64 coeff = 0, coeff_mul = 0;\n+\tu32 active_cycles;\n \tint err = 0;\n \n+\tif (!kbdev->ipa.vinstr_active)\n+\t\tgoto err0; /* GPU powered off - no counters to collect */\n+\n \terr = kbase_vinstr_hwc_dump(model_data->vinstr_cli,\n \t\t\t\t    BASE_HWCNT_READER_EVENT_MANUAL);\n \tif (err)\n \t\tgoto err0;\n \n-\tmodel_data->last_sample_read_time = now;\n+\t/* Range: 0 (GPU not used at all), to the max sampling interval, say\n+\t * 1s, * max GPU frequency (GPU 100% utilized).\n+\t * 0 <= active_cycles <= 1 * ~2GHz\n+\t * 0 <= active_cycles < 2^31\n+\t */\n+\tactive_cycles = model_data->get_active_cycles(model_data);\n+\n+\tif (active_cycles < (u32) max(model_data->min_sample_cycles, 0)) {\n+\t\terr = -ENODATA;\n+\t\tgoto err0;\n+\t}\n \n-\t/* Range of 'energy' is +/- 2^34 * number of IPA groups, so around\n-\t * -2^38 < energy < 2^38 */\n+\t/* Range: 1 <= active_cycles < 2^31 */\n+\tactive_cycles = max(1u, active_cycles);\n+\n+\t/* Range of 'energy' is +/- 2^54 * number of IPA groups (~8), so around\n+\t * -2^57 < energy < 2^57\n+\t */\n \tfor (i = 0; i < model_data->groups_def_num; i++) {\n \t\tconst struct kbase_ipa_group *group = &model_data->groups_def[i];\n-\t\ts32 coeff, group_energy;\n-\n-\t\tcoeff = model_data->group_values[i];\n-\t\tgroup_energy = group->op(model_data, coeff, group->counter);\n+\t\ts32 coeff = model_data->group_values[i];\n+\t\ts64 group_energy = group->op(model_data, coeff,\n+\t\t\t\t\t     group->counter_block_offset);\n \n \t\tenergy = kbase_ipa_add_saturate(energy, group_energy);\n \t}\n \n-\t/* Range: 0 <= coeff < 2^38 */\n+\t/* Range: 0 <= coeff < 2^57 */\n \tif (energy > 0)\n \t\tcoeff = energy;\n \n-\t/* Scale by user-specified factor and divide by 1000. But actually\n-\t * cancel the division out, because we want the num_cycles in KHz and\n-\t * don't want to lose precision. */\n+\t/* Range: 0 <= coeff < 2^57 (because active_cycles >= 1). However, this\n+\t * can be constrained further: Counter values can only be increased by\n+\t * a theoretical maximum of about 64k per clock cycle. Beyond this,\n+\t * we'd have to sample every 1ms to avoid them overflowing at the\n+\t * lowest clock frequency (say 100MHz). Therefore, we can write the\n+\t * range of 'coeff' in terms of active_cycles:\n+\t *\n+\t * coeff = SUM(coeffN * counterN * num_cores_for_counterN)\n+\t * coeff <= SUM(coeffN * counterN) * max_num_cores\n+\t * coeff <= num_IPA_groups * max_coeff * max_counter * max_num_cores\n+\t *       (substitute max_counter = 2^16 * active_cycles)\n+\t * coeff <= num_IPA_groups * max_coeff * 2^16 * active_cycles * max_num_cores\n+\t * coeff <=    2^3         *    2^22   * 2^16 * active_cycles * 2^5\n+\t * coeff <= 2^46 * active_cycles\n+\t *\n+\t * So after the division: 0 <= coeff <= 2^46\n+\t */\n+\tcoeff = div_u64(coeff, active_cycles);\n+\n+\t/* Scale by user-specified factor (where unity is 1000).\n+\t * Range: 0 <= coeff_mul < 2^61\n+\t */\n+\tcoeff_mul = coeff * model_data->scaling_factor;\n+\n+\t/* Range: 0 <= coeff_mul < 2^51 */\n+\tcoeff_mul = div_u64(coeff_mul, 1000u);\n \n-\t/* Range: 0 < coeff < 2^53 */\n-\tcoeff = coeff * model_data->scaling_factor;\n+err0:\n+\t/* Clamp to a sensible range - 2^16 gives about 14W at 400MHz/750mV */\n+\t*coeffp = clamp(coeff_mul, (u64) 0, (u64) 1 << 16);\n+\treturn err;\n+}\n \n-\tif (time_since_last_sample_ms == 0) {\n-\t\ttime_since_last_sample_ms = 1;\n-\t} else if (time_since_last_sample_ms < 0) {\n-\t\terr = -ERANGE;\n-\t\tgoto err0;\n+int kbase_ipa_vinstr_common_model_init(struct kbase_ipa_model *model,\n+\t\t\t\t       const struct kbase_ipa_group *ipa_groups_def,\n+\t\t\t\t       size_t ipa_group_size,\n+\t\t\t\t       kbase_ipa_get_active_cycles_callback get_active_cycles)\n+{\n+\tint err = 0;\n+\tsize_t i;\n+\tstruct kbase_ipa_model_vinstr_data *model_data;\n+\n+\tif (!model || !ipa_groups_def || !ipa_group_size || !get_active_cycles)\n+\t\treturn -EINVAL;\n+\n+\tmodel_data = kzalloc(sizeof(*model_data), GFP_KERNEL);\n+\tif (!model_data)\n+\t\treturn -ENOMEM;\n+\n+\tmodel_data->kbdev = model->kbdev;\n+\tmodel_data->groups_def = ipa_groups_def;\n+\tmodel_data->groups_def_num = ipa_group_size;\n+\tmodel_data->get_active_cycles = get_active_cycles;\n+\n+\tmodel->model_data = (void *) model_data;\n+\n+\tfor (i = 0; i < model_data->groups_def_num; ++i) {\n+\t\tconst struct kbase_ipa_group *group = &model_data->groups_def[i];\n+\n+\t\tmodel_data->group_values[i] = group->default_value;\n+\t\terr = kbase_ipa_model_add_param_s32(model, group->name,\n+\t\t\t\t\t&model_data->group_values[i],\n+\t\t\t\t\t1, false);\n+\t\tif (err)\n+\t\t\tgoto exit;\n \t}\n \n-\t/* Range: 2^20 < num_cycles < 2^40 mCycles */\n-\tnum_cycles = (u64) current_freq * (u64) time_since_last_sample_ms;\n-\t/* Range: 2^10 < num_cycles < 2^30 Cycles */\n-\tnum_cycles /= 1000000;\n+\tmodel_data->scaling_factor = DEFAULT_SCALING_FACTOR;\n+\terr = kbase_ipa_model_add_param_s32(model, \"scale\",\n+\t\t\t\t\t    &model_data->scaling_factor,\n+\t\t\t\t\t    1, false);\n+\tif (err)\n+\t\tgoto exit;\n \n-\t/* num_cycles should never be 0 in _normal_ usage (because we expect\n-\t * frequencies on the order of MHz and >10ms polling intervals), but\n-\t * protect against divide-by-zero anyway. */\n-\tif (num_cycles == 0)\n-\t\tnum_cycles = 1;\n+\tmodel_data->min_sample_cycles = DEFAULT_MIN_SAMPLE_CYCLES;\n+\terr = kbase_ipa_model_add_param_s32(model, \"min_sample_cycles\",\n+\t\t\t\t\t    &model_data->min_sample_cycles,\n+\t\t\t\t\t    1, false);\n+\tif (err)\n+\t\tgoto exit;\n \n-\t/* Range: 0 < coeff < 2^43 */\n-\tcoeff = div_u64(coeff, num_cycles);\n+\terr = kbase_ipa_attach_vinstr(model_data);\n \n-err0:\n-\t/* Clamp to a sensible range - 2^16 gives about 14W at 400MHz/750mV */\n-\t*coeffp = clamp(coeff, (u64) 0, (u64) 1 << 16);\n+exit:\n+\tif (err) {\n+\t\tkbase_ipa_model_param_free_all(model);\n+\t\tkfree(model_data);\n+\t}\n \treturn err;\n }\n+\n+void kbase_ipa_vinstr_common_model_term(struct kbase_ipa_model *model)\n+{\n+\tstruct kbase_ipa_model_vinstr_data *model_data =\n+\t\t\t(struct kbase_ipa_model_vinstr_data *)model->model_data;\n+\n+\tkbase_ipa_detach_vinstr(model_data);\n+\tkfree(model_data);\n+}\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_vinstr_common.h b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_vinstr_common.h\nindex 25b36c8e308903..c9288e8c01f7cf 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_vinstr_common.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_vinstr_common.h\n@@ -1,28 +1,30 @@\n /*\n  *\n- * (C) COPYRIGHT 2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2017-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_IPA_VINSTR_COMMON_H_\n #define _KBASE_IPA_VINSTR_COMMON_H_\n \n #include \"mali_kbase.h\"\n \n-/* Maximum length for the name of an IPA group. */\n-#define KBASE_IPA_MAX_GROUP_NAME_LEN 15\n-\n /* Maximum number of IPA groups for an IPA model. */\n #define KBASE_IPA_MAX_GROUP_DEF_NUM  16\n \n@@ -36,30 +38,41 @@\n #define KBASE_IPA_NR_BYTES_PER_BLOCK \\\n \t(KBASE_IPA_NR_CNT_PER_BLOCK * KBASE_IPA_NR_BYTES_PER_CNT)\n \n+struct kbase_ipa_model_vinstr_data;\n \n+typedef u32 (*kbase_ipa_get_active_cycles_callback)(struct kbase_ipa_model_vinstr_data *);\n \n /**\n  * struct kbase_ipa_model_vinstr_data - IPA context per device\n  * @kbdev:               pointer to kbase device\n  * @groups_def:          Array of IPA groups.\n  * @groups_def_num:      Number of elements in the array of IPA groups.\n+ * @get_active_cycles:   Callback to return number of active cycles during\n+ *                       counter sample period\n  * @vinstr_cli:          vinstr client handle\n  * @vinstr_buffer:       buffer to dump hardware counters onto\n- * @last_sample_read_time: timestamp of last vinstr buffer read\n  * @scaling_factor:      user-specified power scaling factor. This is\n  *                       interpreted as a fraction where the denominator is\n  *                       1000. Range approx 0.0-32.0:\n  *                       0 < scaling_factor < 2^15\n+ * @min_sample_cycles:   If the value of the GPU_ACTIVE counter (the number of\n+ *                       cycles the GPU was working) is less than\n+ *                       min_sample_cycles, the counter model will return an\n+ *                       error, causing the IPA framework to approximate using\n+ *                       the cached simple model results instead. This may be\n+ *                       more accurate than extrapolating  using a very small\n+ *                       counter dump.\n  */\n struct kbase_ipa_model_vinstr_data {\n \tstruct kbase_device *kbdev;\n \ts32 group_values[KBASE_IPA_MAX_GROUP_DEF_NUM];\n \tconst struct kbase_ipa_group *groups_def;\n \tsize_t groups_def_num;\n+\tkbase_ipa_get_active_cycles_callback get_active_cycles;\n \tstruct kbase_vinstr_client *vinstr_cli;\n \tvoid *vinstr_buffer;\n-\tktime_t last_sample_read_time;\n \ts32 scaling_factor;\n+\ts32 min_sample_cycles;\n };\n \n /**\n@@ -69,45 +82,47 @@ struct kbase_ipa_model_vinstr_data {\n  *                      Coefficients are interpreted as fractions where the\n  *                      denominator is 1000000.\n  * @op:                 which operation to be performed on the counter values\n- * @counter:            counter used to calculate energy for IPA group\n+ * @counter_block_offset:  block offset in bytes of the counter used to calculate energy for IPA group\n  */\n struct kbase_ipa_group {\n-\tchar name[KBASE_IPA_MAX_GROUP_NAME_LEN + 1];\n+\tconst char *name;\n \ts32 default_value;\n \ts64 (*op)(struct kbase_ipa_model_vinstr_data *, s32, u32);\n-\tu32 counter;\n+\tu32 counter_block_offset;\n };\n \n-/*\n+/**\n  * sum_all_shader_cores() - sum a counter over all cores\n  * @model_data\t\tpointer to model data\n  * @coeff\t\tmodel coefficient. Unity is ~2^20, so range approx\n  * +/- 4.0: -2^22 < coeff < 2^22\n-\n+ * @counter     offset in bytes of the counter used to calculate energy for IPA group\n+ *\n  * Calculate energy estimation based on hardware counter `counter'\n  * across all shader cores.\n  *\n- * Return: Sum of counter values. Range: -2^34 < ret < 2^34\n+ * Return: Sum of counter values. Range: -2^54 < ret < 2^54\n  */\n s64 kbase_ipa_sum_all_shader_cores(\n \tstruct kbase_ipa_model_vinstr_data *model_data,\n \ts32 coeff, u32 counter);\n \n-/*\n+/**\n  * sum_single_counter() - sum a single counter\n  * @model_data\t\tpointer to model data\n  * @coeff\t\tmodel coefficient. Unity is ~2^20, so range approx\n  * +/- 4.0: -2^22 < coeff < 2^22\n-\n+ * @counter     offset in bytes of the counter used to calculate energy for IPA group\n+ *\n  * Calculate energy estimation based on hardware counter `counter'.\n  *\n- * Return: Counter value. Range: -2^34 < ret < 2^34\n+ * Return: Counter value. Range: -2^49 < ret < 2^49\n  */\n s64 kbase_ipa_single_counter(\n \tstruct kbase_ipa_model_vinstr_data *model_data,\n \ts32 coeff, u32 counter);\n \n-/*\n+/**\n  * attach_vinstr() - attach a vinstr_buffer to an IPA model.\n  * @model_data\t\tpointer to model data\n  *\n@@ -119,7 +134,7 @@ s64 kbase_ipa_single_counter(\n  */\n int kbase_ipa_attach_vinstr(struct kbase_ipa_model_vinstr_data *model_data);\n \n-/*\n+/**\n  * detach_vinstr() - detach a vinstr_buffer from an IPA model.\n  * @model_data\t\tpointer to model data\n  *\n@@ -132,9 +147,6 @@ void kbase_ipa_detach_vinstr(struct kbase_ipa_model_vinstr_data *model_data);\n  * @model:\t\tpointer to instantiated model\n  * @coeffp:\t\tpointer to location where calculated power, in\n  *\t\t\tpW/(Hz V^2), is stored.\n- * @current_freq:\tfrequency the GPU has been running at over the sample\n- *\t\t\tperiod. In Hz. Range: 10 MHz < 1GHz,\n- *\t\t\t2^20 < current_freq < 2^30\n  *\n  * This is a GPU-agnostic implementation of the get_dynamic_coeff()\n  * function of an IPA model. It relies on the model being populated\n@@ -142,20 +154,36 @@ void kbase_ipa_detach_vinstr(struct kbase_ipa_model_vinstr_data *model_data);\n  *\n  * Return: 0 on success, or an error code.\n  */\n-int kbase_ipa_vinstr_dynamic_coeff(struct kbase_ipa_model *model, u32 *coeffp,\n-\tu32 current_freq);\n+int kbase_ipa_vinstr_dynamic_coeff(struct kbase_ipa_model *model, u32 *coeffp);\n+\n+/**\n+ * kbase_ipa_vinstr_common_model_init() - initialize ipa power model\n+ * @model:\t\tipa power model to initialize\n+ * @ipa_groups_def:\tarray of ipa groups which sets coefficients for\n+ *\t\t\tthe corresponding counters used in the ipa model\n+ * @ipa_group_size:     number of elements in the array @ipa_groups_def\n+ * @get_active_cycles:  callback to return the number of cycles the GPU was\n+ *\t\t\tactive during the counter sample period.\n+ *\n+ * This initialization function performs initialization steps common\n+ * for ipa models based on counter values. In each call, the model\n+ * passes its specific coefficient values per ipa counter group via\n+ * @ipa_groups_def array.\n+ *\n+ * Return: 0 on success, error code otherwise\n+ */\n+int kbase_ipa_vinstr_common_model_init(struct kbase_ipa_model *model,\n+\t\t\t\t       const struct kbase_ipa_group *ipa_groups_def,\n+\t\t\t\t       size_t ipa_group_size,\n+\t\t\t\t       kbase_ipa_get_active_cycles_callback get_active_cycles);\n \n-#if MALI_UNIT_TEST\n /**\n- * kbase_ipa_set_dummy_time() - set a dummy monotonic time value\n- * @t: a monotonic time value\n+ * kbase_ipa_vinstr_common_model_term() - terminate ipa power model\n+ * @model: ipa power model to terminate\n  *\n- * This is only intended for use in unit tests, to ensure that the kernel time\n- * values used by a power model are predictable. Deterministic behavior is\n- * necessary to allow validation of the dynamic power values computed by the\n- * model.\n+ * This function performs all necessary steps to terminate ipa power model\n+ * including clean up of resources allocated to hold model data.\n  */\n-void kbase_ipa_set_dummy_time(ktime_t t);\n-#endif /* MALI_UNIT_TEST */\n+void kbase_ipa_vinstr_common_model_term(struct kbase_ipa_model *model);\n \n #endif /* _KBASE_IPA_VINSTR_COMMON_H_ */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_vinstr_g7x.c b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_vinstr_g7x.c\nnew file mode 100644\nindex 00000000000000..7951b7475a181f\n--- /dev/null\n+++ b/drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_vinstr_g7x.c\n@@ -0,0 +1,311 @@\n+/*\n+ *\n+ * (C) COPYRIGHT 2016-2018 ARM Limited. All rights reserved.\n+ *\n+ * This program is free software and is provided to you under the terms of the\n+ * GNU General Public License version 2 as published by the Free Software\n+ * Foundation, and any use by you of this program is subject to the terms\n+ * of such GNU licence.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n+ *\n+ */\n+#include <linux/thermal.h>\n+\n+#include \"mali_kbase_ipa_vinstr_common.h\"\n+#include \"mali_kbase.h\"\n+#include \"mali_kbase_ipa_debugfs.h\"\n+\n+\n+/* Performance counter blocks base offsets */\n+#define JM_BASE             (0 * KBASE_IPA_NR_BYTES_PER_BLOCK)\n+#define TILER_BASE          (1 * KBASE_IPA_NR_BYTES_PER_BLOCK)\n+#define MEMSYS_BASE         (2 * KBASE_IPA_NR_BYTES_PER_BLOCK)\n+#define SC0_BASE_ONE_MEMSYS (3 * KBASE_IPA_NR_BYTES_PER_BLOCK)\n+#define SC0_BASE_TWO_MEMSYS (4 * KBASE_IPA_NR_BYTES_PER_BLOCK)\n+\n+/* JM counter block offsets */\n+#define JM_GPU_ACTIVE (KBASE_IPA_NR_BYTES_PER_CNT *  6)\n+\n+/* Tiler counter block offsets */\n+#define TILER_ACTIVE (KBASE_IPA_NR_BYTES_PER_CNT * 45)\n+\n+/* MEMSYS counter block offsets */\n+#define MEMSYS_L2_ANY_LOOKUP (KBASE_IPA_NR_BYTES_PER_CNT * 25)\n+\n+/* SC counter block offsets */\n+#define SC_FRAG_ACTIVE             (KBASE_IPA_NR_BYTES_PER_CNT *  4)\n+#define SC_EXEC_CORE_ACTIVE        (KBASE_IPA_NR_BYTES_PER_CNT * 26)\n+#define SC_EXEC_INSTR_COUNT        (KBASE_IPA_NR_BYTES_PER_CNT * 28)\n+#define SC_TEX_COORD_ISSUE         (KBASE_IPA_NR_BYTES_PER_CNT * 40)\n+#define SC_TEX_TFCH_NUM_OPERATIONS (KBASE_IPA_NR_BYTES_PER_CNT * 42)\n+#define SC_VARY_INSTR              (KBASE_IPA_NR_BYTES_PER_CNT * 49)\n+#define SC_VARY_SLOT_32            (KBASE_IPA_NR_BYTES_PER_CNT * 50)\n+#define SC_VARY_SLOT_16            (KBASE_IPA_NR_BYTES_PER_CNT * 51)\n+#define SC_BEATS_RD_LSC            (KBASE_IPA_NR_BYTES_PER_CNT * 56)\n+#define SC_BEATS_WR_LSC            (KBASE_IPA_NR_BYTES_PER_CNT * 61)\n+#define SC_BEATS_WR_TIB            (KBASE_IPA_NR_BYTES_PER_CNT * 62)\n+\n+/** Maximum number of cores for which a single Memory System block of performance counters is present. */\n+#define KBASE_G7x_SINGLE_MEMSYS_MAX_NUM_CORES ((u8)4)\n+\n+\n+/**\n+ * get_jm_counter() - get performance counter offset inside the Job Manager block\n+ * @model_data:            pointer to GPU model data.\n+ * @counter_block_offset:  offset in bytes of the performance counter inside the Job Manager block.\n+ *\n+ * Return: Block offset in bytes of the required performance counter.\n+ */\n+static u32 kbase_g7x_power_model_get_jm_counter(struct kbase_ipa_model_vinstr_data *model_data,\n+\t\t\t\t\t\tu32 counter_block_offset)\n+{\n+\treturn JM_BASE + counter_block_offset;\n+}\n+\n+/**\n+ * get_memsys_counter() - get performance counter offset inside the Memory System block\n+ * @model_data:            pointer to GPU model data.\n+ * @counter_block_offset:  offset in bytes of the performance counter inside the (first) Memory System block.\n+ *\n+ * Return: Block offset in bytes of the required performance counter.\n+ */\n+static u32 kbase_g7x_power_model_get_memsys_counter(struct kbase_ipa_model_vinstr_data *model_data,\n+\t\t\t\t\t\t    u32 counter_block_offset)\n+{\n+\t/* The base address of Memory System performance counters is always the same, although their number\n+\t * may vary based on the number of cores. For the moment it's ok to return a constant.\n+\t */\n+\treturn MEMSYS_BASE + counter_block_offset;\n+}\n+\n+/**\n+ * get_sc_counter() - get performance counter offset inside the Shader Cores block\n+ * @model_data:            pointer to GPU model data.\n+ * @counter_block_offset:  offset in bytes of the performance counter inside the (first) Shader Cores block.\n+ *\n+ * Return: Block offset in bytes of the required performance counter.\n+ */\n+static u32 kbase_g7x_power_model_get_sc_counter(struct kbase_ipa_model_vinstr_data *model_data,\n+\t\t\t\t\t\tu32 counter_block_offset)\n+{\n+\tconst u32 sc_base = model_data->kbdev->gpu_props.num_cores <= KBASE_G7x_SINGLE_MEMSYS_MAX_NUM_CORES ?\n+\t\t\t    SC0_BASE_ONE_MEMSYS :\n+\t\t\t    SC0_BASE_TWO_MEMSYS;\n+\n+\treturn sc_base + counter_block_offset;\n+}\n+\n+/**\n+ * memsys_single_counter() - calculate energy for a single Memory System performance counter.\n+ * @model_data:   pointer to GPU model data.\n+ * @coeff:        default value of coefficient for IPA group.\n+ * @offset:       offset in bytes of the counter inside the block it belongs to.\n+ *\n+ * Return: Energy estimation for a single Memory System performance counter.\n+ */\n+static s64 kbase_g7x_memsys_single_counter(\n+\t\tstruct kbase_ipa_model_vinstr_data *model_data,\n+\t\ts32 coeff,\n+\t\tu32 offset)\n+{\n+\tu32 counter;\n+\n+\tcounter = kbase_g7x_power_model_get_memsys_counter(model_data, offset);\n+\treturn kbase_ipa_single_counter(model_data, coeff, counter);\n+}\n+\n+/**\n+ * sum_all_shader_cores() - calculate energy for a Shader Cores performance counter for all cores.\n+ * @model_data:            pointer to GPU model data.\n+ * @coeff:                 default value of coefficient for IPA group.\n+ * @counter_block_offset:  offset in bytes of the counter inside the block it belongs to.\n+ *\n+ * Return: Energy estimation for a Shader Cores performance counter for all cores.\n+ */\n+static s64 kbase_g7x_sum_all_shader_cores(\n+\tstruct kbase_ipa_model_vinstr_data *model_data,\n+\ts32 coeff,\n+\tu32 counter_block_offset)\n+{\n+\tu32 counter;\n+\n+\tcounter = kbase_g7x_power_model_get_sc_counter(model_data,\n+\t\t\t\t\t\t       counter_block_offset);\n+\treturn kbase_ipa_sum_all_shader_cores(model_data, coeff, counter);\n+}\n+\n+/**\n+ * jm_single_counter() - calculate energy for a single Job Manager performance counter.\n+ * @model_data:            pointer to GPU model data.\n+ * @coeff:                 default value of coefficient for IPA group.\n+ * @counter_block_offset:  offset in bytes of the counter inside the block it belongs to.\n+ *\n+ * Return: Energy estimation for a single Job Manager performance counter.\n+ */\n+static s64 kbase_g7x_jm_single_counter(\n+\tstruct kbase_ipa_model_vinstr_data *model_data,\n+\ts32 coeff,\n+\tu32 counter_block_offset)\n+{\n+\tu32 counter;\n+\n+\tcounter = kbase_g7x_power_model_get_jm_counter(model_data,\n+\t\t\t\t\t\t     counter_block_offset);\n+\treturn kbase_ipa_single_counter(model_data, coeff, counter);\n+}\n+\n+/**\n+ * get_active_cycles() - return the GPU_ACTIVE counter\n+ * @model_data:            pointer to GPU model data.\n+ *\n+ * Return: the number of cycles the GPU was active during the counter sampling\n+ * period.\n+ */\n+static u32 kbase_g7x_get_active_cycles(\n+\tstruct kbase_ipa_model_vinstr_data *model_data)\n+{\n+\tu32 counter = kbase_g7x_power_model_get_jm_counter(model_data, JM_GPU_ACTIVE);\n+\n+\t/* Counters are only 32-bit, so we can safely multiply by 1 then cast\n+\t * the 64-bit result back to a u32.\n+\t */\n+\treturn kbase_ipa_single_counter(model_data, 1, counter);\n+}\n+\n+/** Table of IPA group definitions.\n+ *\n+ * For each IPA group, this table defines a function to access the given performance block counter (or counters,\n+ * if the operation needs to be iterated on multiple blocks) and calculate energy estimation.\n+ */\n+\n+static const struct kbase_ipa_group ipa_groups_def_g71[] = {\n+\t{\n+\t\t.name = \"l2_access\",\n+\t\t.default_value = 526300,\n+\t\t.op = kbase_g7x_memsys_single_counter,\n+\t\t.counter_block_offset = MEMSYS_L2_ANY_LOOKUP,\n+\t},\n+\t{\n+\t\t.name = \"exec_instr_count\",\n+\t\t.default_value = 301100,\n+\t\t.op = kbase_g7x_sum_all_shader_cores,\n+\t\t.counter_block_offset = SC_EXEC_INSTR_COUNT,\n+\t},\n+\t{\n+\t\t.name = \"tex_issue\",\n+\t\t.default_value = 197400,\n+\t\t.op = kbase_g7x_sum_all_shader_cores,\n+\t\t.counter_block_offset = SC_TEX_COORD_ISSUE,\n+\t},\n+\t{\n+\t\t.name = \"tile_wb\",\n+\t\t.default_value = -156400,\n+\t\t.op = kbase_g7x_sum_all_shader_cores,\n+\t\t.counter_block_offset = SC_BEATS_WR_TIB,\n+\t},\n+\t{\n+\t\t.name = \"gpu_active\",\n+\t\t.default_value = 115800,\n+\t\t.op = kbase_g7x_jm_single_counter,\n+\t\t.counter_block_offset = JM_GPU_ACTIVE,\n+\t},\n+};\n+\n+static const struct kbase_ipa_group ipa_groups_def_g72[] = {\n+\t{\n+\t\t.name = \"l2_access\",\n+\t\t.default_value = 393000,\n+\t\t.op = kbase_g7x_memsys_single_counter,\n+\t\t.counter_block_offset = MEMSYS_L2_ANY_LOOKUP,\n+\t},\n+\t{\n+\t\t.name = \"exec_instr_count\",\n+\t\t.default_value = 227000,\n+\t\t.op = kbase_g7x_sum_all_shader_cores,\n+\t\t.counter_block_offset = SC_EXEC_INSTR_COUNT,\n+\t},\n+\t{\n+\t\t.name = \"tex_issue\",\n+\t\t.default_value = 181900,\n+\t\t.op = kbase_g7x_sum_all_shader_cores,\n+\t\t.counter_block_offset = SC_TEX_COORD_ISSUE,\n+\t},\n+\t{\n+\t\t.name = \"tile_wb\",\n+\t\t.default_value = -120200,\n+\t\t.op = kbase_g7x_sum_all_shader_cores,\n+\t\t.counter_block_offset = SC_BEATS_WR_TIB,\n+\t},\n+\t{\n+\t\t.name = \"gpu_active\",\n+\t\t.default_value = 133100,\n+\t\t.op = kbase_g7x_jm_single_counter,\n+\t\t.counter_block_offset = JM_GPU_ACTIVE,\n+\t},\n+};\n+\n+static const struct kbase_ipa_group ipa_groups_def_tnox[] = {\n+\t{\n+\t\t.name = \"gpu_active\",\n+\t\t.default_value = 122000,\n+\t\t.op = kbase_g7x_jm_single_counter,\n+\t\t.counter_block_offset = JM_GPU_ACTIVE,\n+\t},\n+\t{\n+\t\t.name = \"exec_instr_count\",\n+\t\t.default_value = 488900,\n+\t\t.op = kbase_g7x_sum_all_shader_cores,\n+\t\t.counter_block_offset = SC_EXEC_INSTR_COUNT,\n+\t},\n+\t{\n+\t\t.name = \"vary_instr\",\n+\t\t.default_value = 212100,\n+\t\t.op = kbase_g7x_sum_all_shader_cores,\n+\t\t.counter_block_offset = SC_VARY_INSTR,\n+\t},\n+\t{\n+\t\t.name = \"tex_tfch_num_operations\",\n+\t\t.default_value = 288000,\n+\t\t.op = kbase_g7x_sum_all_shader_cores,\n+\t\t.counter_block_offset = SC_TEX_TFCH_NUM_OPERATIONS,\n+\t},\n+\t{\n+\t\t.name = \"l2_access\",\n+\t\t.default_value = 378100,\n+\t\t.op = kbase_g7x_memsys_single_counter,\n+\t\t.counter_block_offset = MEMSYS_L2_ANY_LOOKUP,\n+\t},\n+};\n+\n+#define STANDARD_POWER_MODEL(gpu) \\\n+\tstatic int kbase_ ## gpu ## _power_model_init(\\\n+\t\t\tstruct kbase_ipa_model *model) \\\n+\t{ \\\n+\t\tBUILD_BUG_ON(ARRAY_SIZE(ipa_groups_def_ ## gpu) > \\\n+\t\t\t\tKBASE_IPA_MAX_GROUP_DEF_NUM); \\\n+\t\treturn kbase_ipa_vinstr_common_model_init(model, \\\n+\t\t\t\tipa_groups_def_ ## gpu, \\\n+\t\t\t\tARRAY_SIZE(ipa_groups_def_ ## gpu), \\\n+\t\t\t\tkbase_g7x_get_active_cycles); \\\n+\t} \\\n+\tstruct kbase_ipa_model_ops kbase_ ## gpu ## _ipa_model_ops = { \\\n+\t\t.name = \"mali-\" #gpu \"-power-model\", \\\n+\t\t.init = kbase_ ## gpu ## _power_model_init, \\\n+\t\t.term = kbase_ipa_vinstr_common_model_term, \\\n+\t\t.get_dynamic_coeff = kbase_ipa_vinstr_dynamic_coeff, \\\n+\t}; \\\n+\tKBASE_EXPORT_TEST_API(kbase_ ## gpu ## _ipa_model_ops)\n+\n+STANDARD_POWER_MODEL(g71);\n+STANDARD_POWER_MODEL(g72);\n+STANDARD_POWER_MODEL(tnox);\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_base_hwconfig_features.h b/drivers/gpu/arm/bifrost_for_linux/mali_base_hwconfig_features.h\nindex 219586d4d2da1a..10da0c58e9ebd3 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_base_hwconfig_features.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_base_hwconfig_features.h\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2015-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /* AUTOMATICALLY GENERATED FILE. If you want to amend the issues/features,\n  * please update base/tools/hwconfig_generator/hwc_{issues,features}.py\n  * For more information see base/tools/hwconfig_generator/README\n@@ -26,7 +31,6 @@\n enum base_hw_feature {\n \tBASE_HW_FEATURE_JOBCHAIN_DISAMBIGUATION,\n \tBASE_HW_FEATURE_PWRON_DURING_PWROFF_TRANS,\n-\tBASE_HW_FEATURE_33BIT_VA,\n \tBASE_HW_FEATURE_XAFFINITY,\n \tBASE_HW_FEATURE_OUT_OF_ORDER_EXEC,\n \tBASE_HW_FEATURE_MRT,\n@@ -53,6 +57,8 @@ enum base_hw_feature {\n \tBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,\n \tBASE_HW_FEATURE_AARCH64_MMU,\n \tBASE_HW_FEATURE_TLS_HASHING,\n+\tBASE_HW_FEATURE_THREAD_GROUP_SPLIT,\n+\tBASE_HW_FEATURE_3BIT_EXT_RW_L2_MMU_CONFIG,\n \tBASE_HW_FEATURE_END\n };\n \n@@ -63,6 +69,7 @@ static const enum base_hw_feature base_hw_features_generic[] = {\n static const enum base_hw_feature base_hw_features_t60x[] = {\n \tBASE_HW_FEATURE_LD_ST_LEA_TEX,\n \tBASE_HW_FEATURE_LINEAR_FILTER_FLOAT,\n+\tBASE_HW_FEATURE_THREAD_GROUP_SPLIT,\n \tBASE_HW_FEATURE_V4,\n \tBASE_HW_FEATURE_END\n };\n@@ -71,17 +78,18 @@ static const enum base_hw_feature base_hw_features_t62x[] = {\n \tBASE_HW_FEATURE_LD_ST_LEA_TEX,\n \tBASE_HW_FEATURE_LINEAR_FILTER_FLOAT,\n \tBASE_HW_FEATURE_ATTR_AUTO_TYPE_INFERRAL,\n+\tBASE_HW_FEATURE_THREAD_GROUP_SPLIT,\n \tBASE_HW_FEATURE_V4,\n \tBASE_HW_FEATURE_END\n };\n \n static const enum base_hw_feature base_hw_features_t72x[] = {\n-\tBASE_HW_FEATURE_33BIT_VA,\n \tBASE_HW_FEATURE_32_BIT_UNIFORM_ADDRESS,\n \tBASE_HW_FEATURE_ATTR_AUTO_TYPE_INFERRAL,\n \tBASE_HW_FEATURE_INTERPIPE_REG_ALIASING,\n \tBASE_HW_FEATURE_OPTIMIZED_COVERAGE_MASK,\n \tBASE_HW_FEATURE_T7XX_PAIRING_RULES,\n+\tBASE_HW_FEATURE_THREAD_GROUP_SPLIT,\n \tBASE_HW_FEATURE_WORKGROUP_ROUND_MULTIPLE_OF_4,\n \tBASE_HW_FEATURE_WARPING,\n \tBASE_HW_FEATURE_V4,\n@@ -103,6 +111,7 @@ static const enum base_hw_feature base_hw_features_t76x[] = {\n \tBASE_HW_FEATURE_OUT_OF_ORDER_EXEC,\n \tBASE_HW_FEATURE_T7XX_PAIRING_RULES,\n \tBASE_HW_FEATURE_TEST4_DATUM_MODE,\n+\tBASE_HW_FEATURE_THREAD_GROUP_SPLIT,\n \tBASE_HW_FEATURE_END\n };\n \n@@ -123,11 +132,11 @@ static const enum base_hw_feature base_hw_features_tFxx[] = {\n \tBASE_HW_FEATURE_OUT_OF_ORDER_EXEC,\n \tBASE_HW_FEATURE_T7XX_PAIRING_RULES,\n \tBASE_HW_FEATURE_TEST4_DATUM_MODE,\n+\tBASE_HW_FEATURE_THREAD_GROUP_SPLIT,\n \tBASE_HW_FEATURE_END\n };\n \n static const enum base_hw_feature base_hw_features_t83x[] = {\n-\tBASE_HW_FEATURE_33BIT_VA,\n \tBASE_HW_FEATURE_JOBCHAIN_DISAMBIGUATION,\n \tBASE_HW_FEATURE_PWRON_DURING_PWROFF_TRANS,\n \tBASE_HW_FEATURE_XAFFINITY,\n@@ -145,11 +154,11 @@ static const enum base_hw_feature base_hw_features_t83x[] = {\n \tBASE_HW_FEATURE_OUT_OF_ORDER_EXEC,\n \tBASE_HW_FEATURE_T7XX_PAIRING_RULES,\n \tBASE_HW_FEATURE_TEST4_DATUM_MODE,\n+\tBASE_HW_FEATURE_THREAD_GROUP_SPLIT,\n \tBASE_HW_FEATURE_END\n };\n \n static const enum base_hw_feature base_hw_features_t82x[] = {\n-\tBASE_HW_FEATURE_33BIT_VA,\n \tBASE_HW_FEATURE_JOBCHAIN_DISAMBIGUATION,\n \tBASE_HW_FEATURE_PWRON_DURING_PWROFF_TRANS,\n \tBASE_HW_FEATURE_XAFFINITY,\n@@ -167,6 +176,7 @@ static const enum base_hw_feature base_hw_features_t82x[] = {\n \tBASE_HW_FEATURE_OUT_OF_ORDER_EXEC,\n \tBASE_HW_FEATURE_T7XX_PAIRING_RULES,\n \tBASE_HW_FEATURE_TEST4_DATUM_MODE,\n+\tBASE_HW_FEATURE_THREAD_GROUP_SPLIT,\n \tBASE_HW_FEATURE_END\n };\n \n@@ -189,6 +199,7 @@ static const enum base_hw_feature base_hw_features_tMIx[] = {\n \tBASE_HW_FEATURE_OUT_OF_ORDER_EXEC,\n \tBASE_HW_FEATURE_T7XX_PAIRING_RULES,\n \tBASE_HW_FEATURE_TEST4_DATUM_MODE,\n+\tBASE_HW_FEATURE_THREAD_GROUP_SPLIT,\n \tBASE_HW_FEATURE_FLUSH_REDUCTION,\n \tBASE_HW_FEATURE_PROTECTED_MODE,\n \tBASE_HW_FEATURE_COHERENCY_REG,\n@@ -214,6 +225,7 @@ static const enum base_hw_feature base_hw_features_tHEx[] = {\n \tBASE_HW_FEATURE_OUT_OF_ORDER_EXEC,\n \tBASE_HW_FEATURE_T7XX_PAIRING_RULES,\n \tBASE_HW_FEATURE_TEST4_DATUM_MODE,\n+\tBASE_HW_FEATURE_THREAD_GROUP_SPLIT,\n \tBASE_HW_FEATURE_FLUSH_REDUCTION,\n \tBASE_HW_FEATURE_PROTECTED_MODE,\n \tBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,\n@@ -222,7 +234,6 @@ static const enum base_hw_feature base_hw_features_tHEx[] = {\n };\n \n static const enum base_hw_feature base_hw_features_tSIx[] = {\n-\tBASE_HW_FEATURE_33BIT_VA,\n \tBASE_HW_FEATURE_JOBCHAIN_DISAMBIGUATION,\n \tBASE_HW_FEATURE_PWRON_DURING_PWROFF_TRANS,\n \tBASE_HW_FEATURE_XAFFINITY,\n@@ -241,6 +252,7 @@ static const enum base_hw_feature base_hw_features_tSIx[] = {\n \tBASE_HW_FEATURE_OUT_OF_ORDER_EXEC,\n \tBASE_HW_FEATURE_T7XX_PAIRING_RULES,\n \tBASE_HW_FEATURE_TEST4_DATUM_MODE,\n+\tBASE_HW_FEATURE_THREAD_GROUP_SPLIT,\n \tBASE_HW_FEATURE_FLUSH_REDUCTION,\n \tBASE_HW_FEATURE_PROTECTED_MODE,\n \tBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,\n@@ -249,7 +261,6 @@ static const enum base_hw_feature base_hw_features_tSIx[] = {\n };\n \n static const enum base_hw_feature base_hw_features_tDVx[] = {\n-\tBASE_HW_FEATURE_33BIT_VA,\n \tBASE_HW_FEATURE_JOBCHAIN_DISAMBIGUATION,\n \tBASE_HW_FEATURE_PWRON_DURING_PWROFF_TRANS,\n \tBASE_HW_FEATURE_XAFFINITY,\n@@ -268,6 +279,7 @@ static const enum base_hw_feature base_hw_features_tDVx[] = {\n \tBASE_HW_FEATURE_OUT_OF_ORDER_EXEC,\n \tBASE_HW_FEATURE_T7XX_PAIRING_RULES,\n \tBASE_HW_FEATURE_TEST4_DATUM_MODE,\n+\tBASE_HW_FEATURE_THREAD_GROUP_SPLIT,\n \tBASE_HW_FEATURE_FLUSH_REDUCTION,\n \tBASE_HW_FEATURE_PROTECTED_MODE,\n \tBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,\n@@ -275,8 +287,175 @@ static const enum base_hw_feature base_hw_features_tDVx[] = {\n \tBASE_HW_FEATURE_END\n };\n \n+static const enum base_hw_feature base_hw_features_tNOx[] = {\n+\tBASE_HW_FEATURE_JOBCHAIN_DISAMBIGUATION,\n+\tBASE_HW_FEATURE_PWRON_DURING_PWROFF_TRANS,\n+\tBASE_HW_FEATURE_XAFFINITY,\n+\tBASE_HW_FEATURE_WARPING,\n+\tBASE_HW_FEATURE_INTERPIPE_REG_ALIASING,\n+\tBASE_HW_FEATURE_32_BIT_UNIFORM_ADDRESS,\n+\tBASE_HW_FEATURE_ATTR_AUTO_TYPE_INFERRAL,\n+\tBASE_HW_FEATURE_BRNDOUT_CC,\n+\tBASE_HW_FEATURE_BRNDOUT_KILL,\n+\tBASE_HW_FEATURE_LD_ST_LEA_TEX,\n+\tBASE_HW_FEATURE_LD_ST_TILEBUFFER,\n+\tBASE_HW_FEATURE_LINEAR_FILTER_FLOAT,\n+\tBASE_HW_FEATURE_MRT,\n+\tBASE_HW_FEATURE_MSAA_16X,\n+\tBASE_HW_FEATURE_NEXT_INSTRUCTION_TYPE,\n+\tBASE_HW_FEATURE_OUT_OF_ORDER_EXEC,\n+\tBASE_HW_FEATURE_T7XX_PAIRING_RULES,\n+\tBASE_HW_FEATURE_TEST4_DATUM_MODE,\n+\tBASE_HW_FEATURE_THREAD_GROUP_SPLIT,\n+\tBASE_HW_FEATURE_FLUSH_REDUCTION,\n+\tBASE_HW_FEATURE_PROTECTED_MODE,\n+\tBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,\n+\tBASE_HW_FEATURE_COHERENCY_REG,\n+\tBASE_HW_FEATURE_AARCH64_MMU,\n+\tBASE_HW_FEATURE_TLS_HASHING,\n+\tBASE_HW_FEATURE_3BIT_EXT_RW_L2_MMU_CONFIG,\n+\tBASE_HW_FEATURE_END\n+};\n \n+static const enum base_hw_feature base_hw_features_tGOx[] = {\n+\tBASE_HW_FEATURE_JOBCHAIN_DISAMBIGUATION,\n+\tBASE_HW_FEATURE_PWRON_DURING_PWROFF_TRANS,\n+\tBASE_HW_FEATURE_XAFFINITY,\n+\tBASE_HW_FEATURE_WARPING,\n+\tBASE_HW_FEATURE_INTERPIPE_REG_ALIASING,\n+\tBASE_HW_FEATURE_32_BIT_UNIFORM_ADDRESS,\n+\tBASE_HW_FEATURE_ATTR_AUTO_TYPE_INFERRAL,\n+\tBASE_HW_FEATURE_BRNDOUT_CC,\n+\tBASE_HW_FEATURE_BRNDOUT_KILL,\n+\tBASE_HW_FEATURE_LD_ST_LEA_TEX,\n+\tBASE_HW_FEATURE_LD_ST_TILEBUFFER,\n+\tBASE_HW_FEATURE_LINEAR_FILTER_FLOAT,\n+\tBASE_HW_FEATURE_MRT,\n+\tBASE_HW_FEATURE_MSAA_16X,\n+\tBASE_HW_FEATURE_NEXT_INSTRUCTION_TYPE,\n+\tBASE_HW_FEATURE_OUT_OF_ORDER_EXEC,\n+\tBASE_HW_FEATURE_T7XX_PAIRING_RULES,\n+\tBASE_HW_FEATURE_TEST4_DATUM_MODE,\n+\tBASE_HW_FEATURE_THREAD_GROUP_SPLIT,\n+\tBASE_HW_FEATURE_FLUSH_REDUCTION,\n+\tBASE_HW_FEATURE_PROTECTED_MODE,\n+\tBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,\n+\tBASE_HW_FEATURE_COHERENCY_REG,\n+\tBASE_HW_FEATURE_AARCH64_MMU,\n+\tBASE_HW_FEATURE_TLS_HASHING,\n+\tBASE_HW_FEATURE_3BIT_EXT_RW_L2_MMU_CONFIG,\n+\tBASE_HW_FEATURE_END\n+};\n \n+static const enum base_hw_feature base_hw_features_tKAx[] = {\n+\tBASE_HW_FEATURE_JOBCHAIN_DISAMBIGUATION,\n+\tBASE_HW_FEATURE_PWRON_DURING_PWROFF_TRANS,\n+\tBASE_HW_FEATURE_XAFFINITY,\n+\tBASE_HW_FEATURE_WARPING,\n+\tBASE_HW_FEATURE_INTERPIPE_REG_ALIASING,\n+\tBASE_HW_FEATURE_32_BIT_UNIFORM_ADDRESS,\n+\tBASE_HW_FEATURE_ATTR_AUTO_TYPE_INFERRAL,\n+\tBASE_HW_FEATURE_BRNDOUT_CC,\n+\tBASE_HW_FEATURE_BRNDOUT_KILL,\n+\tBASE_HW_FEATURE_LD_ST_LEA_TEX,\n+\tBASE_HW_FEATURE_LD_ST_TILEBUFFER,\n+\tBASE_HW_FEATURE_LINEAR_FILTER_FLOAT,\n+\tBASE_HW_FEATURE_MRT,\n+\tBASE_HW_FEATURE_MSAA_16X,\n+\tBASE_HW_FEATURE_NEXT_INSTRUCTION_TYPE,\n+\tBASE_HW_FEATURE_OUT_OF_ORDER_EXEC,\n+\tBASE_HW_FEATURE_T7XX_PAIRING_RULES,\n+\tBASE_HW_FEATURE_TEST4_DATUM_MODE,\n+\tBASE_HW_FEATURE_FLUSH_REDUCTION,\n+\tBASE_HW_FEATURE_PROTECTED_MODE,\n+\tBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,\n+\tBASE_HW_FEATURE_COHERENCY_REG,\n+\tBASE_HW_FEATURE_AARCH64_MMU,\n+\tBASE_HW_FEATURE_END\n+};\n+\n+static const enum base_hw_feature base_hw_features_tTRx[] = {\n+\tBASE_HW_FEATURE_JOBCHAIN_DISAMBIGUATION,\n+\tBASE_HW_FEATURE_PWRON_DURING_PWROFF_TRANS,\n+\tBASE_HW_FEATURE_XAFFINITY,\n+\tBASE_HW_FEATURE_WARPING,\n+\tBASE_HW_FEATURE_INTERPIPE_REG_ALIASING,\n+\tBASE_HW_FEATURE_32_BIT_UNIFORM_ADDRESS,\n+\tBASE_HW_FEATURE_ATTR_AUTO_TYPE_INFERRAL,\n+\tBASE_HW_FEATURE_BRNDOUT_CC,\n+\tBASE_HW_FEATURE_BRNDOUT_KILL,\n+\tBASE_HW_FEATURE_LD_ST_LEA_TEX,\n+\tBASE_HW_FEATURE_LD_ST_TILEBUFFER,\n+\tBASE_HW_FEATURE_LINEAR_FILTER_FLOAT,\n+\tBASE_HW_FEATURE_MRT,\n+\tBASE_HW_FEATURE_MSAA_16X,\n+\tBASE_HW_FEATURE_NEXT_INSTRUCTION_TYPE,\n+\tBASE_HW_FEATURE_OUT_OF_ORDER_EXEC,\n+\tBASE_HW_FEATURE_T7XX_PAIRING_RULES,\n+\tBASE_HW_FEATURE_TEST4_DATUM_MODE,\n+\tBASE_HW_FEATURE_FLUSH_REDUCTION,\n+\tBASE_HW_FEATURE_PROTECTED_MODE,\n+\tBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,\n+\tBASE_HW_FEATURE_COHERENCY_REG,\n+\tBASE_HW_FEATURE_AARCH64_MMU,\n+\tBASE_HW_FEATURE_END\n+};\n \n+static const enum base_hw_feature base_hw_features_tBOx[] = {\n+\tBASE_HW_FEATURE_JOBCHAIN_DISAMBIGUATION,\n+\tBASE_HW_FEATURE_PWRON_DURING_PWROFF_TRANS,\n+\tBASE_HW_FEATURE_XAFFINITY,\n+\tBASE_HW_FEATURE_WARPING,\n+\tBASE_HW_FEATURE_INTERPIPE_REG_ALIASING,\n+\tBASE_HW_FEATURE_32_BIT_UNIFORM_ADDRESS,\n+\tBASE_HW_FEATURE_ATTR_AUTO_TYPE_INFERRAL,\n+\tBASE_HW_FEATURE_BRNDOUT_CC,\n+\tBASE_HW_FEATURE_BRNDOUT_KILL,\n+\tBASE_HW_FEATURE_LD_ST_LEA_TEX,\n+\tBASE_HW_FEATURE_LD_ST_TILEBUFFER,\n+\tBASE_HW_FEATURE_LINEAR_FILTER_FLOAT,\n+\tBASE_HW_FEATURE_MRT,\n+\tBASE_HW_FEATURE_MSAA_16X,\n+\tBASE_HW_FEATURE_NEXT_INSTRUCTION_TYPE,\n+\tBASE_HW_FEATURE_OUT_OF_ORDER_EXEC,\n+\tBASE_HW_FEATURE_T7XX_PAIRING_RULES,\n+\tBASE_HW_FEATURE_TEST4_DATUM_MODE,\n+\tBASE_HW_FEATURE_FLUSH_REDUCTION,\n+\tBASE_HW_FEATURE_PROTECTED_MODE,\n+\tBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,\n+\tBASE_HW_FEATURE_COHERENCY_REG,\n+\tBASE_HW_FEATURE_AARCH64_MMU,\n+\tBASE_HW_FEATURE_END\n+};\n+\n+static const enum base_hw_feature base_hw_features_tEGx[] = {\n+\tBASE_HW_FEATURE_JOBCHAIN_DISAMBIGUATION,\n+\tBASE_HW_FEATURE_PWRON_DURING_PWROFF_TRANS,\n+\tBASE_HW_FEATURE_XAFFINITY,\n+\tBASE_HW_FEATURE_WARPING,\n+\tBASE_HW_FEATURE_INTERPIPE_REG_ALIASING,\n+\tBASE_HW_FEATURE_32_BIT_UNIFORM_ADDRESS,\n+\tBASE_HW_FEATURE_ATTR_AUTO_TYPE_INFERRAL,\n+\tBASE_HW_FEATURE_BRNDOUT_CC,\n+\tBASE_HW_FEATURE_BRNDOUT_KILL,\n+\tBASE_HW_FEATURE_LD_ST_LEA_TEX,\n+\tBASE_HW_FEATURE_LD_ST_TILEBUFFER,\n+\tBASE_HW_FEATURE_LINEAR_FILTER_FLOAT,\n+\tBASE_HW_FEATURE_MRT,\n+\tBASE_HW_FEATURE_MSAA_16X,\n+\tBASE_HW_FEATURE_NEXT_INSTRUCTION_TYPE,\n+\tBASE_HW_FEATURE_OUT_OF_ORDER_EXEC,\n+\tBASE_HW_FEATURE_T7XX_PAIRING_RULES,\n+\tBASE_HW_FEATURE_TEST4_DATUM_MODE,\n+\tBASE_HW_FEATURE_THREAD_GROUP_SPLIT,\n+\tBASE_HW_FEATURE_FLUSH_REDUCTION,\n+\tBASE_HW_FEATURE_PROTECTED_MODE,\n+\tBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,\n+\tBASE_HW_FEATURE_COHERENCY_REG,\n+\tBASE_HW_FEATURE_AARCH64_MMU,\n+\tBASE_HW_FEATURE_TLS_HASHING,\n+\tBASE_HW_FEATURE_3BIT_EXT_RW_L2_MMU_CONFIG,\n+\tBASE_HW_FEATURE_END\n+};\n \n #endif /* _BASE_HWCONFIG_FEATURES_H_ */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_base_hwconfig_issues.h b/drivers/gpu/arm/bifrost_for_linux/mali_base_hwconfig_issues.h\nindex 1c5ee496ac858b..bcd6c5ffbb25f1 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_base_hwconfig_issues.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_base_hwconfig_issues.h\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2015-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /* AUTOMATICALLY GENERATED FILE. If you want to amend the issues/features,\n  * please update base/tools/hwconfig_generator/hwc_{issues,features}.py\n  * For more information see base/tools/hwconfig_generator/README\n@@ -118,6 +123,7 @@ enum base_hw_issue {\n \tGPUCORE_1619,\n \tBASE_HW_ISSUE_TSIX_1116,\n \tBASE_HW_ISSUE_TMIX_8438,\n+\tBASE_HW_ISSUE_TNOX_1194,\n \tBASE_HW_ISSUE_END\n };\n \n@@ -1101,7 +1107,6 @@ static const enum base_hw_issue base_hw_issues_model_tSIx[] = {\n \n static const enum base_hw_issue base_hw_issues_tDVx_r0p0[] = {\n \tBASE_HW_ISSUE_9435,\n-\tBASE_HW_ISSUE_11054,\n \tBASE_HW_ISSUE_TMIX_8133,\n \tBASE_HW_ISSUE_TSIX_1116,\n \tBASE_HW_ISSUE_END\n@@ -1115,12 +1120,103 @@ static const enum base_hw_issue base_hw_issues_model_tDVx[] = {\n \tBASE_HW_ISSUE_END\n };\n \n+static const enum base_hw_issue base_hw_issues_tNOx_r0p0[] = {\n+\tBASE_HW_ISSUE_9435,\n+\tBASE_HW_ISSUE_TMIX_8133,\n+\tBASE_HW_ISSUE_TSIX_1116,\n+\tBASE_HW_ISSUE_TNOX_1194,\n+\tBASE_HW_ISSUE_END\n+};\n \n+static const enum base_hw_issue base_hw_issues_model_tNOx[] = {\n+\tBASE_HW_ISSUE_5736,\n+\tBASE_HW_ISSUE_9435,\n+\tBASE_HW_ISSUE_TMIX_8133,\n+\tBASE_HW_ISSUE_TSIX_1116,\n+\tBASE_HW_ISSUE_END\n+};\n \n+static const enum base_hw_issue base_hw_issues_tGOx_r0p0[] = {\n+\tBASE_HW_ISSUE_9435,\n+\tBASE_HW_ISSUE_TMIX_8133,\n+\tBASE_HW_ISSUE_TSIX_1116,\n+\tBASE_HW_ISSUE_TNOX_1194,\n+\tBASE_HW_ISSUE_END\n+};\n \n+static const enum base_hw_issue base_hw_issues_tGOx_r1p0[] = {\n+\tBASE_HW_ISSUE_9435,\n+\tBASE_HW_ISSUE_TMIX_8133,\n+\tBASE_HW_ISSUE_TSIX_1116,\n+\tBASE_HW_ISSUE_END\n+};\n \n+static const enum base_hw_issue base_hw_issues_model_tGOx[] = {\n+\tBASE_HW_ISSUE_5736,\n+\tBASE_HW_ISSUE_9435,\n+\tBASE_HW_ISSUE_TMIX_8133,\n+\tBASE_HW_ISSUE_TSIX_1116,\n+\tBASE_HW_ISSUE_END\n+};\n \n+static const enum base_hw_issue base_hw_issues_tKAx_r0p0[] = {\n+\tBASE_HW_ISSUE_9435,\n+\tBASE_HW_ISSUE_TMIX_8133,\n+\tBASE_HW_ISSUE_TSIX_1116,\n+\tBASE_HW_ISSUE_END\n+};\n \n+static const enum base_hw_issue base_hw_issues_model_tKAx[] = {\n+\tBASE_HW_ISSUE_5736,\n+\tBASE_HW_ISSUE_9435,\n+\tBASE_HW_ISSUE_TMIX_8133,\n+\tBASE_HW_ISSUE_TSIX_1116,\n+\tBASE_HW_ISSUE_END\n+};\n+\n+static const enum base_hw_issue base_hw_issues_tTRx_r0p0[] = {\n+\tBASE_HW_ISSUE_9435,\n+\tBASE_HW_ISSUE_TMIX_8133,\n+\tBASE_HW_ISSUE_TSIX_1116,\n+\tBASE_HW_ISSUE_END\n+};\n+\n+static const enum base_hw_issue base_hw_issues_model_tTRx[] = {\n+\tBASE_HW_ISSUE_5736,\n+\tBASE_HW_ISSUE_9435,\n+\tBASE_HW_ISSUE_TMIX_8133,\n+\tBASE_HW_ISSUE_TSIX_1116,\n+\tBASE_HW_ISSUE_END\n+};\n+\n+static const enum base_hw_issue base_hw_issues_tBOx_r0p0[] = {\n+\tBASE_HW_ISSUE_9435,\n+\tBASE_HW_ISSUE_TMIX_8133,\n+\tBASE_HW_ISSUE_TSIX_1116,\n+\tBASE_HW_ISSUE_END\n+};\n+\n+static const enum base_hw_issue base_hw_issues_model_tBOx[] = {\n+\tBASE_HW_ISSUE_5736,\n+\tBASE_HW_ISSUE_9435,\n+\tBASE_HW_ISSUE_TMIX_8133,\n+\tBASE_HW_ISSUE_TSIX_1116,\n+\tBASE_HW_ISSUE_END\n+};\n+\n+static const enum base_hw_issue base_hw_issues_tEGx_r0p0[] = {\n+\tBASE_HW_ISSUE_9435,\n+\tBASE_HW_ISSUE_TMIX_8133,\n+\tBASE_HW_ISSUE_TSIX_1116,\n+\tBASE_HW_ISSUE_END\n+};\n \n+static const enum base_hw_issue base_hw_issues_model_tEGx[] = {\n+\tBASE_HW_ISSUE_5736,\n+\tBASE_HW_ISSUE_9435,\n+\tBASE_HW_ISSUE_TMIX_8133,\n+\tBASE_HW_ISSUE_TSIX_1116,\n+\tBASE_HW_ISSUE_END\n+};\n \n #endif /* _BASE_HWCONFIG_ISSUES_H_ */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_base_kernel.h b/drivers/gpu/arm/bifrost_for_linux/mali_base_kernel.h\nindex 6f5c68e288cd32..e53528e29fe00b 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_base_kernel.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_base_kernel.h\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Base structures shared with the kernel.\n  */\n@@ -24,12 +29,6 @@\n #ifndef _BASE_KERNEL_H_\n #define _BASE_KERNEL_H_\n \n-/* Support UK10_2 IOCTLS */\n-#define BASE_LEGACY_UK10_2_SUPPORT 1\n-\n-/* Support UK10_4 IOCTLS */\n-#define BASE_LEGACY_UK10_4_SUPPORT 1\n-\n typedef struct base_mem_handle {\n \tstruct {\n \t\tu64 handle;\n@@ -52,7 +51,7 @@ typedef struct base_mem_handle {\n #define BASE_JD_SOFT_EVENT_SET             ((unsigned char)1)\n #define BASE_JD_SOFT_EVENT_RESET           ((unsigned char)0)\n \n-#define BASE_GPU_NUM_TEXTURE_FEATURES_REGISTERS 3\n+#define BASE_GPU_NUM_TEXTURE_FEATURES_REGISTERS 4\n \n #define BASE_MAX_COHERENT_GROUPS 16\n \n@@ -64,12 +63,14 @@ typedef struct base_mem_handle {\n #error assert macro not defined!\n #endif\n \n-#if defined PAGE_MASK\n+#if defined(PAGE_MASK) && defined(PAGE_SHIFT)\n+#define LOCAL_PAGE_SHIFT PAGE_SHIFT\n #define LOCAL_PAGE_LSB ~PAGE_MASK\n #else\n #include <osu/mali_osu.h>\n \n #if defined OSU_CONFIG_CPU_PAGE_SIZE_LOG2\n+#define LOCAL_PAGE_SHIFT OSU_CONFIG_CPU_PAGE_SIZE_LOG2\n #define LOCAL_PAGE_LSB ((1ul << OSU_CONFIG_CPU_PAGE_SIZE_LOG2) - 1)\n #else\n #error Failed to find page size\n@@ -136,6 +137,10 @@ typedef u32 base_mem_alloc_flags;\n \t * RESERVED: (1U << 7)\n \t * RESERVED: (1U << 8)\n \t */\n+#define BASE_MEM_RESERVED_BIT_5 ((base_mem_alloc_flags)1 << 5)\n+#define BASE_MEM_RESERVED_BIT_6 ((base_mem_alloc_flags)1 << 6)\n+#define BASE_MEM_RESERVED_BIT_7 ((base_mem_alloc_flags)1 << 7)\n+#define BASE_MEM_RESERVED_BIT_8 ((base_mem_alloc_flags)1 << 8)\n \n /* Grow backing store on GPU Page Fault\n  */\n@@ -185,14 +190,21 @@ typedef u32 base_mem_alloc_flags;\n  * Bit 19 is reserved.\n  *\n  * Do not remove, use the next unreserved bit for new flags\n- **/\n+ */\n #define BASE_MEM_RESERVED_BIT_19 ((base_mem_alloc_flags)1 << 19)\n \n+/**\n+ * Memory starting from the end of the initial commit is aligned to 'extent'\n+ * pages, where 'extent' must be a power of 2 and no more than\n+ * BASE_MEM_TILER_ALIGN_TOP_EXTENT_MAX_PAGES\n+ */\n+#define BASE_MEM_TILER_ALIGN_TOP ((base_mem_alloc_flags)1 << 20)\n+\n /* Number of bits used as flags for base memory management\n  *\n  * Must be kept in sync with the base_mem_alloc_flags flags\n  */\n-#define BASE_MEM_FLAGS_NR_BITS 20\n+#define BASE_MEM_FLAGS_NR_BITS 21\n \n /* A mask for all output bits, excluding IN/OUT bits.\n  */\n@@ -210,11 +222,26 @@ typedef u32 base_mem_alloc_flags;\n \t(BASE_MEM_DONT_NEED | BASE_MEM_COHERENT_SYSTEM | \\\n \t BASE_MEM_COHERENT_LOCAL)\n \n+\n+/* A mask of all currently reserved flags\n+ */\n+#define BASE_MEM_FLAGS_RESERVED \\\n+\t(BASE_MEM_RESERVED_BIT_5 | BASE_MEM_RESERVED_BIT_6 | \\\n+\t\tBASE_MEM_RESERVED_BIT_7 | BASE_MEM_RESERVED_BIT_8 | \\\n+\t\tBASE_MEM_RESERVED_BIT_19)\n+\n+/* A mask of all the flags that can be returned via the base_mem_get_flags()\n+ * interface.\n+ */\n+#define BASE_MEM_FLAGS_QUERYABLE \\\n+\t(BASE_MEM_FLAGS_INPUT_MASK & ~(BASE_MEM_SAME_VA | \\\n+\t\tBASE_MEM_COHERENT_SYSTEM_REQUIRED | BASE_MEM_DONT_NEED | \\\n+\t\tBASE_MEM_IMPORT_SHARED | BASE_MEM_FLAGS_RESERVED))\n+\n /**\n  * enum base_mem_import_type - Memory types supported by @a base_mem_import\n  *\n  * @BASE_MEM_IMPORT_TYPE_INVALID: Invalid type\n- * @BASE_MEM_IMPORT_TYPE_UMP: UMP import. Handle type is ump_secure_id.\n  * @BASE_MEM_IMPORT_TYPE_UMM: UMM import. Handle type is a file descriptor (int)\n  * @BASE_MEM_IMPORT_TYPE_USER_BUFFER: User buffer import. Handle is a\n  * base_mem_import_user_buffer\n@@ -229,7 +256,9 @@ typedef u32 base_mem_alloc_flags;\n  */\n typedef enum base_mem_import_type {\n \tBASE_MEM_IMPORT_TYPE_INVALID = 0,\n-\tBASE_MEM_IMPORT_TYPE_UMP = 1,\n+\t/**\n+\t * Import type with value 1 is deprecated.\n+\t */\n \tBASE_MEM_IMPORT_TYPE_UMM = 2,\n \tBASE_MEM_IMPORT_TYPE_USER_BUFFER = 3\n } base_mem_import_type;\n@@ -283,6 +312,16 @@ struct base_mem_import_user_buffer {\n /* Mask to detect 4GB boundary alignment */\n #define BASE_MEM_MASK_4GB  0xfffff000UL\n \n+/**\n+ * Limit on the 'extent' parameter for an allocation with the\n+ * BASE_MEM_TILER_ALIGN_TOP flag set\n+ *\n+ * This is the same as the maximum limit for a Buffer Descriptor's chunk size\n+ */\n+#define BASE_MEM_TILER_ALIGN_TOP_EXTENT_MAX_PAGES_LOG2 \\\n+\t\t(21u - (LOCAL_PAGE_SHIFT))\n+#define BASE_MEM_TILER_ALIGN_TOP_EXTENT_MAX_PAGES \\\n+\t\t(1ull << (BASE_MEM_TILER_ALIGN_TOP_EXTENT_MAX_PAGES_LOG2))\n \n /* Bit mask of cookies used for for memory allocation setup */\n #define KBASE_COOKIE_MASK  ~1UL /* bit 0 is reserved */\n@@ -397,6 +436,13 @@ struct base_mem_aliasing_info {\n \tu64 length;\n };\n \n+/**\n+ * Similar to BASE_MEM_TILER_ALIGN_TOP, memory starting from the end of the\n+ * initial commit is aligned to 'extent' pages, where 'extent' must be a power\n+ * of 2 and no more than BASE_MEM_TILER_ALIGN_TOP_EXTENT_MAX_PAGES\n+ */\n+#define BASE_JIT_ALLOC_MEM_TILER_ALIGN_TOP  (1 << 0)\n+\n /**\n  * struct base_jit_alloc_info - Structure which describes a JIT allocation\n  *                              request.\n@@ -410,6 +456,18 @@ struct base_mem_aliasing_info {\n  * @id:                         Unique ID provided by the caller, this is used\n  *                              to pair allocation and free requests.\n  *                              Zero is not a valid value.\n+ * @bin_id:                     The JIT allocation bin, used in conjunction with\n+ *                              @max_allocations to limit the number of each\n+ *                              type of JIT allocation.\n+ * @max_allocations:            The maximum number of allocations allowed within\n+ *                              the bin specified by @bin_id. Should be the same\n+ *                              for all JIT allocations within the same bin.\n+ * @flags:                      flags specifying the special requirements for\n+ *                              the JIT allocation.\n+ * @padding:                    Expansion space - should be initialised to zero\n+ * @usage_id:                   A hint about which allocation should be reused.\n+ *                              The kernel should attempt to use a previous\n+ *                              allocation with the same usage_id\n  */\n struct base_jit_alloc_info {\n \tu64 gpu_alloc_addr;\n@@ -417,6 +475,11 @@ struct base_jit_alloc_info {\n \tu64 commit_pages;\n \tu64 extent;\n \tu8 id;\n+\tu8 bin_id;\n+\tu8 max_allocations;\n+\tu8 flags;\n+\tu8 padding[2];\n+\tu16 usage_id;\n };\n \n /**\n@@ -510,7 +573,8 @@ typedef u32 base_jd_core_req;\n  * The first pre_dep object must be configured for the external resouces to use,\n  * the second pre_dep object can be used to create other dependencies.\n  *\n- * This bit may not be used in combination with BASE_JD_REQ_EVENT_COALESCE.\n+ * This bit may not be used in combination with BASE_JD_REQ_EVENT_COALESCE and\n+ * BASE_JD_REQ_SOFT_EVENT_WAIT.\n  */\n #define BASE_JD_REQ_EXTERNAL_RESOURCES   ((base_jd_core_req)1 << 8)\n \n@@ -1264,9 +1328,9 @@ typedef struct base_dump_cpu_gpu_counters {\n  * Architecture, but is <b>necessary for OpenCL's clGetDeviceInfo() function</b>.\n  *\n  * The GPU properties are obtained by a call to\n- * _mali_base_get_gpu_props(). This simply returns a pointer to a const\n+ * base_get_gpu_props(). This simply returns a pointer to a const\n  * base_gpu_props structure. It is constant for the life of a base\n- * context. Multiple calls to _mali_base_get_gpu_props() to a base context\n+ * context. Multiple calls to base_get_gpu_props() to a base context\n  * return the same pointer to a constant structure. This avoids cache pollution\n  * of the common data.\n  *\n@@ -1275,96 +1339,6 @@ typedef struct base_dump_cpu_gpu_counters {\n  * base_context.\n  *\n  *\n- * @section sec_base_user_api_gpuprops_config Platform Config Compile-time Properties\n- *\n- * The Platform Config File sets up gpu properties that are specific to a\n- * certain platform. Properties that are 'Implementation Defined' in the\n- * Midgard Architecture spec are placed here.\n- *\n- * @note Reference configurations are provided for Midgard Implementations, such as\n- * the Mali-T600 family. The customer need not repeat this information, and can select one of\n- * these reference configurations. For example, VA_BITS, PA_BITS and the\n- * maximum number of samples per pixel might vary between Midgard Implementations, but\n- * \\b not for platforms using the Mali-T604. This information is placed in\n- * the reference configuration files.\n- *\n- * The System Integrator creates the following structure:\n- * - platform_XYZ\n- * - platform_XYZ/plat\n- * - platform_XYZ/plat/plat_config.h\n- *\n- * They then edit plat_config.h, using the example plat_config.h files as a\n- * guide.\n- *\n- * At the very least, the customer must set @ref CONFIG_GPU_CORE_TYPE, and will\n- * receive a helpful \\#error message if they do not do this correctly. This\n- * selects the Reference Configuration for the Midgard Implementation. The rationale\n- * behind this decision (against asking the customer to write \\#include\n- * <gpus/mali_t600.h> in their plat_config.h) is as follows:\n- * - This mechanism 'looks' like a regular config file (such as Linux's\n- * .config)\n- * - It is difficult to get wrong in a way that will produce strange build\n- * errors:\n- *  - They need not know where the mali_t600.h, other_midg_gpu.h etc. files are stored - and\n- *  so they won't accidentally pick another file with 'mali_t600' in its name\n- *  - When the build doesn't work, the System Integrator may think the DDK is\n- *  doesn't work, and attempt to fix it themselves:\n- *   - For the @ref CONFIG_GPU_CORE_TYPE mechanism, the only way to get past the\n- *   error is to set @ref CONFIG_GPU_CORE_TYPE, and this is what the \\#error tells\n- *   you.\n- *   - For a \\#include mechanism, checks must still be made elsewhere, which the\n- *   System Integrator may try working around by setting \\#defines (such as\n- *   VA_BITS) themselves in their plat_config.h. In the  worst case, they may\n- *   set the prevention-mechanism \\#define of\n- *   \"A_CORRECT_MIDGARD_CORE_WAS_CHOSEN\".\n- *   - In this case, they would believe they are on the right track, because\n- *   the build progresses with their fix, but with errors elsewhere.\n- *\n- * However, there is nothing to prevent the customer using \\#include to organize\n- * their own configurations files hierarchically.\n- *\n- * The mechanism for the header file processing is as follows:\n- *\n- * @dot\n-   digraph plat_config_mechanism {\n-\t   rankdir=BT\n-\t   size=\"6,6\"\n-\n-       \"mali_base.h\";\n-\t   \"gpu/mali_gpu.h\";\n-\n-\t   node [ shape=box ];\n-\t   {\n-\t       rank = same; ordering = out;\n-\n-\t\t   \"gpu/mali_gpu_props.h\";\n-\t\t   \"base/midg_gpus/mali_t600.h\";\n-\t\t   \"base/midg_gpus/other_midg_gpu.h\";\n-\t   }\n-\t   { rank = same; \"plat/plat_config.h\"; }\n-\t   {\n-\t       rank = same;\n-\t\t   \"gpu/mali_gpu.h\" [ shape=box ];\n-\t\t   gpu_chooser [ label=\"\" style=\"invisible\" width=0 height=0 fixedsize=true ];\n-\t\t   select_gpu [ label=\"Mali-T600 | Other\\n(select_gpu.h)\" shape=polygon,sides=4,distortion=0.25 width=3.3 height=0.99 fixedsize=true ] ;\n-\t   }\n-\t   node [ shape=box ];\n-\t   { rank = same; \"plat/plat_config.h\"; }\n-\t   { rank = same; \"mali_base.h\"; }\n-\n-\t   \"mali_base.h\" -> \"gpu/mali_gpu.h\" -> \"gpu/mali_gpu_props.h\";\n-\t   \"mali_base.h\" -> \"plat/plat_config.h\" ;\n-\t   \"mali_base.h\" -> select_gpu ;\n-\n-\t   \"plat/plat_config.h\" -> gpu_chooser [style=\"dotted,bold\" dir=none weight=4] ;\n-\t   gpu_chooser -> select_gpu [style=\"dotted,bold\"] ;\n-\n-\t   select_gpu -> \"base/midg_gpus/mali_t600.h\" ;\n-\t   select_gpu -> \"base/midg_gpus/other_midg_gpu.h\" ;\n-   }\n-   @enddot\n- *\n- *\n  * @section sec_base_user_api_gpuprops_kernel Kernel Operation\n  *\n  * During Base Context Create time, user-side makes a single kernel call:\n@@ -1403,7 +1377,7 @@ typedef struct base_dump_cpu_gpu_counters {\n  * @{\n  */\n \n-#define BASE_GPU_NUM_TEXTURE_FEATURES_REGISTERS 3\n+#define BASE_GPU_NUM_TEXTURE_FEATURES_REGISTERS 4\n \n #define BASE_MAX_COHERENT_GROUPS 16\n \n@@ -1435,23 +1409,10 @@ struct mali_base_gpu_core_props {\n \n \tu16 padding;\n \n-\t/**\n-\t * This property is deprecated since it has not contained the real current\n-\t * value of GPU clock speed. It is kept here only for backwards compatibility.\n-\t * For the new ioctl interface, it is ignored and is treated as a padding\n-\t * to keep the structure of the same size and retain the placement of its\n-\t * members.\n-\t */\n-\tu32 gpu_speed_mhz;\n-\n-\t/**\n-\t * @usecase GPU clock max/min speed is required for computing best/worst case\n-\t * in tasks as job scheduling ant irq_throttling. (It is not specified in the\n-\t *  Midgard Architecture).\n-\t * Also, GPU clock max speed is used for OpenCL's clGetDeviceInfo() function.\n+\t/* The maximum GPU frequency. Reported to applications by\n+\t * clGetDeviceInfo()\n \t */\n \tu32 gpu_freq_khz_max;\n-\tu32 gpu_freq_khz_min;\n \n \t/**\n \t * Size of the shader program counter, in bits.\n@@ -1478,6 +1439,11 @@ struct mali_base_gpu_core_props {\n \t * client will not be expecting to allocate anywhere near this value.\n \t */\n \tu64 gpu_available_memory_size;\n+\n+\t/**\n+\t * The number of execution engines.\n+\t */\n+\tu8 num_exec_engines;\n };\n \n /**\n@@ -1508,7 +1474,10 @@ struct mali_base_gpu_thread_props {\n \tu8  max_task_queue;         /* Max. tasks [1..255] which may be sent to a core before it becomes blocked. */\n \tu8  max_thread_group_split; /* Max. allowed value [1..15] of the Thread Group Split field. */\n \tu8  impl_tech;              /* 0 = Not specified, 1 = Silicon, 2 = FPGA, 3 = SW Model/Emulation */\n-\tu8  padding[7];\n+\tu8  padding[3];\n+\tu32 tls_alloc;              /* Number of threads per core that TLS must\n+\t\t\t\t     * be allocated for\n+\t\t\t\t     */\n };\n \n /**\n@@ -1590,7 +1559,7 @@ struct gpu_raw_gpu_props {\n \tu64 stack_present;\n \n \tu32 l2_features;\n-\tu32 suspend_size; /* API 8.2+ */\n+\tu32 core_features;\n \tu32 mem_features;\n \tu32 mmu_features;\n \n@@ -1599,7 +1568,7 @@ struct gpu_raw_gpu_props {\n \tu32 js_present;\n \tu32 js_features[GPU_MAX_JOB_SLOTS];\n \tu32 tiler_features;\n-\tu32 texture_features[3];\n+\tu32 texture_features[BASE_GPU_NUM_TEXTURE_FEATURES_REGISTERS];\n \n \tu32 gpu_id;\n \n@@ -1613,10 +1582,12 @@ struct gpu_raw_gpu_props {\n \t * available modes as exposed in the coherency_features register.\n \t */\n \tu32 coherency_mode;\n+\n+\tu32 thread_tls_alloc;\n };\n \n /**\n- * Return structure for _mali_base_get_gpu_props().\n+ * Return structure for base_get_gpu_props().\n  *\n  * NOTE: the raw_props member in this data structure contains the register\n  * values from which the value of the other members are derived. The derived\n@@ -1624,7 +1595,7 @@ struct gpu_raw_gpu_props {\n  * of the layout of the registers.\n  *\n  */\n-typedef struct mali_base_gpu_props {\n+typedef struct base_gpu_props {\n \tstruct mali_base_gpu_core_props core_props;\n \tstruct mali_base_gpu_l2_cache_props l2_props;\n \tu64 unused_1; /* keep for backwards compatibility */\n@@ -1648,36 +1619,40 @@ typedef struct mali_base_gpu_props {\n  */\n \n /**\n- * \\enum base_context_create_flags\n- *\n  * Flags to pass to ::base_context_init.\n  * Flags can be ORed together to enable multiple things.\n  *\n  * These share the same space as BASEP_CONTEXT_FLAG_*, and so must\n  * not collide with them.\n  */\n-enum base_context_create_flags {\n-\t/** No flags set */\n-\tBASE_CONTEXT_CREATE_FLAG_NONE = 0,\n+typedef u32 base_context_create_flags;\n \n-\t/** Base context is embedded in a cctx object (flag used for CINSTR software counter macros) */\n-\tBASE_CONTEXT_CCTX_EMBEDDED = (1u << 0),\n+/** No flags set */\n+#define BASE_CONTEXT_CREATE_FLAG_NONE ((base_context_create_flags)0)\n \n-\t/** Base context is a 'System Monitor' context for Hardware counters.\n-\t *\n-\t * One important side effect of this is that job submission is disabled. */\n-\tBASE_CONTEXT_SYSTEM_MONITOR_SUBMIT_DISABLED = (1u << 1)\n-};\n+/** Base context is embedded in a cctx object (flag used for CINSTR\n+ * software counter macros)\n+ */\n+#define BASE_CONTEXT_CCTX_EMBEDDED ((base_context_create_flags)1 << 0)\n+\n+/** Base context is a 'System Monitor' context for Hardware counters.\n+ *\n+ * One important side effect of this is that job submission is disabled.\n+ */\n+#define BASE_CONTEXT_SYSTEM_MONITOR_SUBMIT_DISABLED \\\n+\t((base_context_create_flags)1 << 1)\n \n /**\n- * Bitpattern describing the ::base_context_create_flags that can be passed to base_context_init()\n+ * Bitpattern describing the ::base_context_create_flags that can be\n+ * passed to base_context_init()\n  */\n #define BASE_CONTEXT_CREATE_ALLOWED_FLAGS \\\n \t(((u32)BASE_CONTEXT_CCTX_EMBEDDED) | \\\n \t  ((u32)BASE_CONTEXT_SYSTEM_MONITOR_SUBMIT_DISABLED))\n \n /**\n- * Bitpattern describing the ::base_context_create_flags that can be passed to the kernel\n+ * Bitpattern describing the ::base_context_create_flags that can be\n+ * passed to the kernel\n  */\n #define BASE_CONTEXT_CREATE_KERNEL_FLAGS \\\n \t((u32)BASE_CONTEXT_SYSTEM_MONITOR_SUBMIT_DISABLED)\n@@ -1766,20 +1741,6 @@ typedef struct base_jd_replay_payload {\n \tbase_jd_core_req fragment_core_req;\n } base_jd_replay_payload;\n \n-#ifdef BASE_LEGACY_UK10_2_SUPPORT\n-typedef struct base_jd_replay_payload_uk10_2 {\n-\tu64 tiler_jc_list;\n-\tu64 fragment_jc;\n-\tu64 tiler_heap_free;\n-\tu16 fragment_hierarchy_mask;\n-\tu16 tiler_hierarchy_mask;\n-\tu32 hierarchy_default_weight;\n-\tu16 tiler_core_req;\n-\tu16 fragment_core_req;\n-\tu8 padding[4];\n-} base_jd_replay_payload_uk10_2;\n-#endif /* BASE_LEGACY_UK10_2_SUPPORT */\n-\n /**\n  * @brief An entry in the linked list of job chains to be replayed. This must\n  *        be in GPU memory.\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_base_mem_priv.h b/drivers/gpu/arm/bifrost_for_linux/mali_base_mem_priv.h\nindex 4a98a72cc37a73..52c8a4f7d2d809 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_base_mem_priv.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_base_mem_priv.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #ifndef _BASE_MEM_PRIV_H_\n #define _BASE_MEM_PRIV_H_\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_base_vendor_specific_func.h b/drivers/gpu/arm/bifrost_for_linux/mali_base_vendor_specific_func.h\nindex be454a216a3999..5e8add8838f24e 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_base_vendor_specific_func.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_base_vendor_specific_func.h\n@@ -7,15 +7,20 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n #ifndef _BASE_VENDOR_SPEC_FUNC_H_\n #define _BASE_VENDOR_SPEC_FUNC_H_\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase.h\nindex 369a2d4706fe68..35ce1b9e06a0fd 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase.h\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #ifndef _KBASE_H_\n #define _KBASE_H_\n \n@@ -24,14 +29,12 @@\n \n #include <mali_kbase_debug.h>\n \n-#include <asm/page.h>\n-\n #include <linux/atomic.h>\n #include <linux/highmem.h>\n #include <linux/hrtimer.h>\n #include <linux/ktime.h>\n #include <linux/list.h>\n-#include <linux/mm_types.h>\n+#include <linux/mm.h>\n #include <linux/mutex.h>\n #include <linux/rwsem.h>\n #include <linux/sched.h>\n@@ -45,7 +48,6 @@\n #include <linux/workqueue.h>\n \n #include \"mali_base_kernel.h\"\n-#include <mali_kbase_uku.h>\n #include <mali_kbase_linux.h>\n \n /*\n@@ -59,8 +61,8 @@\n #include \"mali_kbase_mem_lowlevel.h\"\n #include \"mali_kbase_trace_timeline.h\"\n #include \"mali_kbase_js.h\"\n-#include \"mali_kbase_mem.h\"\n #include \"mali_kbase_utility.h\"\n+#include \"mali_kbase_mem.h\"\n #include \"mali_kbase_gpu_memory_debugfs.h\"\n #include \"mali_kbase_mem_profile_debugfs.h\"\n #include \"mali_kbase_debug_job_fault.h\"\n@@ -109,9 +111,48 @@ void kbase_release_device(struct kbase_device *kbdev);\n \n void kbase_set_profiling_control(struct kbase_device *kbdev, u32 control, u32 value);\n \n-struct kbase_context *\n-kbase_create_context(struct kbase_device *kbdev, bool is_compat);\n-void kbase_destroy_context(struct kbase_context *kctx);\n+\n+/**\n+ * kbase_get_unmapped_area() - get an address range which is currently\n+ *                             unmapped.\n+ * @filp: File operations associated with kbase device.\n+ * @addr: CPU mapped address (set to 0 since MAP_FIXED mapping is not allowed\n+ *        as Mali GPU driver decides about the mapping).\n+ * @len: Length of the address range.\n+ * @pgoff: Page offset within the GPU address space of the kbase context.\n+ * @flags: Flags for the allocation.\n+ *\n+ * Finds the unmapped address range which satisfies requirements specific to\n+ * GPU and those provided by the call parameters.\n+ *\n+ * 1) Requirement for allocations greater than 2MB:\n+ * - alignment offset is set to 2MB and the alignment mask to 2MB decremented\n+ * by 1.\n+ *\n+ * 2) Requirements imposed for the shader memory alignment:\n+ * - alignment is decided by the number of GPU pc bits which can be read from\n+ * GPU properties of the device associated with this kbase context; alignment\n+ * offset is set to this value in bytes and the alignment mask to the offset\n+ * decremented by 1.\n+ * - allocations must not to be at 4GB boundaries. Such cases are indicated\n+ * by the flag KBASE_REG_GPU_NX not being set (check the flags of the kbase\n+ * region). 4GB boundaries can be checked against @ref BASE_MEM_MASK_4GB.\n+ *\n+ * 3) Requirements imposed for tiler memory alignment, cases indicated by\n+ * the flag @ref KBASE_REG_TILER_ALIGN_TOP (check the flags of the kbase\n+ * region):\n+ * - alignment offset is set to the difference between the kbase region\n+ * extent (converted from the original value in pages to bytes) and the kbase\n+ * region initial_commit (also converted from the original value in pages to\n+ * bytes); alignment mask is set to the kbase region extent in bytes and\n+ * decremented by 1.\n+ *\n+ * Return: if successful, address of the unmapped area aligned as required;\n+ *         error code (negative) in case of failure;\n+ */\n+unsigned long kbase_get_unmapped_area(struct file *filp,\n+\t\tconst unsigned long addr, const unsigned long len,\n+\t\tconst unsigned long pgoff, const unsigned long flags);\n \n int kbase_jd_init(struct kbase_context *kctx);\n void kbase_jd_exit(struct kbase_context *kctx);\n@@ -213,7 +254,7 @@ int kbase_soft_event_update(struct kbase_context *kctx,\n \n bool kbase_replay_process(struct kbase_jd_atom *katom);\n \n-void kbasep_soft_job_timeout_worker(unsigned long data);\n+void kbasep_soft_job_timeout_worker(struct timer_list *timer);\n void kbasep_complete_triggered_soft_events(struct kbase_context *kctx, u64 evt);\n \n /* api used internally for register access. Contains validation and tracing */\n@@ -222,10 +263,6 @@ int kbase_device_trace_buffer_install(\n \t\tstruct kbase_context *kctx, u32 *tb, size_t size);\n void kbase_device_trace_buffer_uninstall(struct kbase_context *kctx);\n \n-/* api to be ported per OS, only need to do the raw register access */\n-void kbase_os_reg_write(struct kbase_device *kbdev, u16 offset, u32 value);\n-u32 kbase_os_reg_read(struct kbase_device *kbdev, u16 offset);\n-\n void kbasep_as_do_poke(struct work_struct *work);\n \n /** Returns the name associated with a Mali exception code\n@@ -546,20 +583,6 @@ void kbasep_trace_clear(struct kbase_device *kbdev);\n /** PRIVATE - do not use directly. Use KBASE_TRACE_DUMP() instead */\n void kbasep_trace_dump(struct kbase_device *kbdev);\n \n-#ifdef CONFIG_MALI_BIFROST_DEBUG\n-/**\n- * kbase_set_driver_inactive - Force driver to go inactive\n- * @kbdev:    Device pointer\n- * @inactive: true if driver should go inactive, false otherwise\n- *\n- * Forcing the driver inactive will cause all future IOCTLs to wait until the\n- * driver is made active again. This is intended solely for the use of tests\n- * which require that no jobs are running while the test executes.\n- */\n-void kbase_set_driver_inactive(struct kbase_device *kbdev, bool inactive);\n-#endif /* CONFIG_MALI_BIFROST_DEBUG */\n-\n-\n #if defined(CONFIG_DEBUG_FS) && !defined(CONFIG_MALI_BIFROST_NO_MALI)\n \n /* kbase_io_history_init - initialize data struct for register access history\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_10969_workaround.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_10969_workaround.c\nindex 6b3559d933510b..f3e71d1a40d08f 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_10969_workaround.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_10969_workaround.c\n@@ -1,28 +1,28 @@\n /*\n  *\n- * (C) COPYRIGHT 2013-2015,2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2013-2015,2017-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n-\n-\n #include <linux/dma-mapping.h>\n #include <mali_kbase.h>\n #include <mali_kbase_10969_workaround.h>\n \n-/* This function is used to solve an HW issue with single iterator GPUs.\n- * If a fragment job is soft-stopped on the edge of its bounding box, can happen that the\n- * restart index is out of bounds and the rerun causes a tile range fault. If this happens\n- * we try to clamp the restart index to a correct value and rerun the job.\n- */\n /* Mask of X and Y coordinates for the coordinates words in the descriptors*/\n #define X_COORDINATE_MASK 0x00000FFF\n #define Y_COORDINATE_MASK 0x0FFF0000\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_10969_workaround.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_10969_workaround.h\nindex 099a29861672e6..379a05a1a12807 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_10969_workaround.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_10969_workaround.h\n@@ -1,23 +1,37 @@\n /*\n  *\n- * (C) COPYRIGHT 2013-2014 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2013-2014, 2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_10969_WORKAROUND_\n #define _KBASE_10969_WORKAROUND_\n \n+/**\n+ * kbasep_10969_workaround_clamp_coordinates - Apply the WA to clamp the restart indices\n+ * @katom: atom representing the fragment job for which the WA has to be applied\n+ *\n+ * This workaround is used to solve an HW issue with single iterator GPUs.\n+ * If a fragment job is soft-stopped on the edge of its bounding box, it can happen\n+ * that the restart index is out of bounds and the rerun causes a tile range\n+ * fault. If this happens we try to clamp the restart index to a correct value.\n+ */\n int kbasep_10969_workaround_clamp_coordinates(struct kbase_jd_atom *katom);\n \n #endif /* _KBASE_10969_WORKAROUND_ */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_as_fault_debugfs.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_as_fault_debugfs.c\nindex cc729d4168586c..44aa237a74971f 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_as_fault_debugfs.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_as_fault_debugfs.c\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2016 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2016-2017 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <linux/debugfs.h>\n \n #include <mali_kbase.h>\n@@ -36,13 +41,14 @@ static int kbase_as_fault_read(struct seq_file *sfile, void *data)\n \tlist_for_each(entry, kbdev_list) {\n \t\tkbdev = list_entry(entry, struct kbase_device, entry);\n \n-\t\tif(kbdev->debugfs_as_read_bitmap & (1ULL << as_no)) {\n+\t\tif (kbdev->debugfs_as_read_bitmap & (1ULL << as_no)) {\n \n \t\t\t/* don't show this one again until another fault occors */\n \t\t\tkbdev->debugfs_as_read_bitmap &= ~(1ULL << as_no);\n \n \t\t\t/* output the last page fault addr */\n-\t\t\tseq_printf(sfile, \"%llu\\n\", (u64) kbdev->as[as_no].fault_addr);\n+\t\t\tseq_printf(sfile, \"%llu\\n\",\n+\t\t\t\t   (u64) kbdev->as[as_no].fault_addr);\n \t\t}\n \n \t}\n@@ -54,7 +60,7 @@ static int kbase_as_fault_read(struct seq_file *sfile, void *data)\n \n static int kbase_as_fault_debugfs_open(struct inode *in, struct file *file)\n {\n-\treturn single_open(file, kbase_as_fault_read , in->i_private);\n+\treturn single_open(file, kbase_as_fault_read, in->i_private);\n }\n \n static const struct file_operations as_fault_fops = {\n@@ -84,17 +90,20 @@ void kbase_as_fault_debugfs_init(struct kbase_device *kbdev)\n \tKBASE_DEBUG_ASSERT(sizeof(kbdev->as[0].fault_addr) == sizeof(u64));\n \n \tdebugfs_directory = debugfs_create_dir(\"address_spaces\",\n-\t\tkbdev->mali_debugfs_directory);\n+\t\t\t\t\t       kbdev->mali_debugfs_directory);\n \n-\tif(debugfs_directory) {\n-\t\tfor(i = 0; i < kbdev->nr_hw_address_spaces; i++) {\n+\tif (debugfs_directory) {\n+\t\tfor (i = 0; i < kbdev->nr_hw_address_spaces; i++) {\n \t\t\tsnprintf(as_name, ARRAY_SIZE(as_name), \"as%u\", i);\n \t\t\tdebugfs_create_file(as_name, S_IRUGO,\n-\t\t\t\tdebugfs_directory, (void*) ((uintptr_t) i), &as_fault_fops);\n+\t\t\t\t\t    debugfs_directory,\n+\t\t\t\t\t    (void *)(uintptr_t)i,\n+\t\t\t\t\t    &as_fault_fops);\n \t\t}\n+\t} else {\n+\t\tdev_warn(kbdev->dev,\n+\t\t\t \"unable to create address_spaces debugfs directory\");\n \t}\n-\telse\n-\t\tdev_warn(kbdev->dev, \"unable to create address_spaces debugfs directory\");\n \n #endif /* CONFIG_MALI_BIFROST_DEBUG */\n #endif /* CONFIG_DEBUG_FS */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_as_fault_debugfs.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_as_fault_debugfs.h\nindex 66387e1c3f6aed..58d7fcf030a460 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_as_fault_debugfs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_as_fault_debugfs.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_AS_FAULT_DEBUG_FS_H\n #define _KBASE_AS_FAULT_DEBUG_FS_H\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_cache_policy.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_cache_policy.c\nindex 1d11de67aa8058..18444b8a9c6355 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_cache_policy.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_cache_policy.c\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Cache Policy API.\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_cache_policy.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_cache_policy.h\nindex 0c18bdb357b0a6..8a1e5291bf5f1c 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_cache_policy.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_cache_policy.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Cache Policy API.\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_config.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_config.c\nindex fb615ae02ead96..ce7070d1d634c3 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_config.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_config.c\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2011-2015 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2011-2015,2017 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #include <mali_kbase.h>\n #include <mali_kbase_defs.h>\n #include <mali_kbase_config_defaults.h>\n@@ -41,11 +46,3 @@ void kbasep_platform_device_term(struct kbase_device *kbdev)\n \t\tplatform_funcs_p->platform_term_func(kbdev);\n }\n \n-int kbase_cpuprops_get_default_clock_speed(u32 * const clock_speed)\n-{\n-\tKBASE_DEBUG_ASSERT(NULL != clock_speed);\n-\n-\t*clock_speed = 100;\n-\treturn 0;\n-}\n-\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_config.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_config.h\nindex 212e3b14d96c81..1637fcbc4d297f 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_config.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_config.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_config.h\n  * Configuration API and Attributes for KBase\n@@ -25,10 +30,10 @@\n #ifndef _KBASE_CONFIG_H_\n #define _KBASE_CONFIG_H_\n \n-#include <asm/page.h>\n-\n+#include <linux/mm.h>\n #include <mali_malisw.h>\n #include <mali_kbase_backend_config.h>\n+#include <linux/rbtree.h>\n \n /**\n  * @addtogroup base_api\n@@ -45,8 +50,6 @@\n  * @{\n  */\n \n-#include <linux/rbtree.h>\n-\n /* Forward declaration of struct kbase_device */\n struct kbase_device;\n \n@@ -208,41 +211,6 @@ struct kbase_pm_callback_conf {\n \tint (*power_runtime_idle_callback)(struct kbase_device *kbdev);\n };\n \n-/**\n- * kbase_cpuprops_get_default_clock_speed - default for CPU_SPEED_FUNC\n- * @clock_speed - see  kbase_cpu_clk_speed_func for details on the parameters\n- *\n- * Returns 0 on success, negative error code otherwise.\n- *\n- * Default implementation of CPU_SPEED_FUNC. This function sets clock_speed\n- * to 100, so will be an underestimate for any real system.\n- */\n-int kbase_cpuprops_get_default_clock_speed(u32 * const clock_speed);\n-\n-/**\n- * kbase_cpu_clk_speed_func - Type of the function pointer for CPU_SPEED_FUNC\n- * @param clock_speed - pointer to store the current CPU clock speed in MHz\n- *\n- * Returns 0 on success, otherwise negative error code.\n- *\n- * This is mainly used to implement OpenCL's clGetDeviceInfo().\n- */\n-typedef int (*kbase_cpu_clk_speed_func) (u32 *clock_speed);\n-\n-/**\n- * kbase_gpu_clk_speed_func - Type of the function pointer for GPU_SPEED_FUNC\n- * @param clock_speed - pointer to store the current GPU clock speed in MHz\n- *\n- * Returns 0 on success, otherwise negative error code.\n- * When an error is returned the caller assumes maximum GPU speed stored in\n- * gpu_freq_khz_max.\n- *\n- * If the system timer is not available then this function is required\n- * for the OpenCL queue profiling to return correct timing information.\n- *\n- */\n-typedef int (*kbase_gpu_clk_speed_func) (u32 *clock_speed);\n-\n #ifdef CONFIG_OF\n struct kbase_platform_config {\n };\n@@ -304,18 +272,6 @@ int kbasep_platform_device_init(struct kbase_device *kbdev);\n  */\n void kbasep_platform_device_term(struct kbase_device *kbdev);\n \n-\n-/**\n- * kbase_platform_early_init - Early initialisation of the platform code\n- *\n- * This function will be called when the module is loaded to perform any\n- * early initialisation required by the platform code. Such as reading\n- * platform specific device tree entries for the GPU.\n- *\n- * Return: 0 for success, any other fail causes module initialisation to fail\n- */\n-int kbase_platform_early_init(void);\n-\n #ifndef CONFIG_OF\n /**\n  * kbase_platform_register - Register a platform device for the GPU\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_config_defaults.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_config_defaults.h\nindex 69079e7d9680fc..9d918a804b2fba 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_config_defaults.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_config_defaults.h\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2013-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2013-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /**\n  * @file mali_kbase_config_defaults.h\n  *\n@@ -74,6 +79,35 @@ enum {\n \tKBASE_AID_4  = 0x1\n };\n \n+enum {\n+\t/**\n+\t * Use unrestricted Address ID width on the AXI bus.\n+\t * Restricting ID width will reduce performance & bus load due to GPU.\n+\t */\n+\tKBASE_3BIT_AID_32 = 0x0,\n+\n+\t/* Restrict GPU to 7/8 of maximum Address ID count. */\n+\tKBASE_3BIT_AID_28 = 0x1,\n+\n+\t/* Restrict GPU to 3/4 of maximum Address ID count. */\n+\tKBASE_3BIT_AID_24 = 0x2,\n+\n+\t/* Restrict GPU to 5/8 of maximum Address ID count. */\n+\tKBASE_3BIT_AID_20 = 0x3,\n+\n+\t/* Restrict GPU to 1/2 of maximum Address ID count.  */\n+\tKBASE_3BIT_AID_16 = 0x4,\n+\n+\t/* Restrict GPU to 3/8 of maximum Address ID count. */\n+\tKBASE_3BIT_AID_12 = 0x5,\n+\n+\t/* Restrict GPU to 1/4 of maximum Address ID count. */\n+\tKBASE_3BIT_AID_8  = 0x6,\n+\n+\t/* Restrict GPU to 1/8 of maximum Address ID count. */\n+\tKBASE_3BIT_AID_4  = 0x7\n+};\n+\n /**\n  * Default setting for read Address ID limiting on AXI bus.\n  *\n@@ -101,17 +135,27 @@ enum {\n #define DEFAULT_AWID_LIMIT KBASE_AID_32\n \n /**\n- * Default UMP device mapping. A UMP_DEVICE_<device>_SHIFT value which\n- * defines which UMP device this GPU should be mapped to.\n+ * Default setting for read Address ID limiting on AXI bus.\n+ *\n+ * Default value: KBASE_3BIT_AID_32 (no limit). Note hardware implementation\n+ * may limit to a lower value.\n  */\n-#define DEFAULT_UMP_GPU_DEVICE_SHIFT UMP_DEVICE_Z_SHIFT\n+#define DEFAULT_3BIT_ARID_LIMIT KBASE_3BIT_AID_32\n \n-/*\n+/**\n+ * Default setting for write Address ID limiting on AXI.\n+ *\n+ * Default value: KBASE_3BIT_AID_32 (no limit). Note hardware implementation\n+ * may limit to a lower value.\n+ */\n+#define DEFAULT_3BIT_AWID_LIMIT KBASE_3BIT_AID_32\n+\n+/**\n  * Default period for DVFS sampling\n  */\n #define DEFAULT_PM_DVFS_PERIOD 100 /* 100ms */\n \n-/*\n+/**\n  * Power Management poweroff tick granuality. This is in nanoseconds to\n  * allow HR timer support.\n  *\n@@ -121,22 +165,22 @@ enum {\n  */\n #define DEFAULT_PM_GPU_POWEROFF_TICK_NS (400000) /* 400us */\n \n-/*\n+/**\n  * Power Manager number of ticks before shader cores are powered off\n  */\n #define DEFAULT_PM_POWEROFF_TICK_SHADER (2) /* 400-800us */\n \n-/*\n+/**\n  * Power Manager number of ticks before GPU is powered off\n  */\n #define DEFAULT_PM_POWEROFF_TICK_GPU (2) /* 400-800us */\n \n-/*\n+/**\n  * Default scheduling tick granuality\n  */\n #define DEFAULT_JS_SCHEDULING_PERIOD_NS    (100000000u) /* 100ms */\n \n-/*\n+/**\n  * Default minimum number of scheduling ticks before jobs are soft-stopped.\n  *\n  * This defines the time-slice for a job (which may be different from that of a\n@@ -144,60 +188,60 @@ enum {\n  */\n #define DEFAULT_JS_SOFT_STOP_TICKS       (1) /* 100ms-200ms */\n \n-/*\n+/**\n  * Default minimum number of scheduling ticks before CL jobs are soft-stopped.\n  */\n #define DEFAULT_JS_SOFT_STOP_TICKS_CL    (1) /* 100ms-200ms */\n \n-/*\n+/**\n  * Default minimum number of scheduling ticks before jobs are hard-stopped\n  */\n #define DEFAULT_JS_HARD_STOP_TICKS_SS    (50) /* 5s */\n #define DEFAULT_JS_HARD_STOP_TICKS_SS_8408  (300) /* 30s */\n \n-/*\n+/**\n  * Default minimum number of scheduling ticks before CL jobs are hard-stopped.\n  */\n #define DEFAULT_JS_HARD_STOP_TICKS_CL    (50) /* 5s */\n \n-/*\n+/**\n  * Default minimum number of scheduling ticks before jobs are hard-stopped\n  * during dumping\n  */\n #define DEFAULT_JS_HARD_STOP_TICKS_DUMPING   (15000) /* 1500s */\n \n-/*\n+/**\n  * Default timeout for some software jobs, after which the software event wait\n  * jobs will be cancelled.\n  */\n #define DEFAULT_JS_SOFT_JOB_TIMEOUT (3000) /* 3s */\n \n-/*\n+/**\n  * Default minimum number of scheduling ticks before the GPU is reset to clear a\n  * \"stuck\" job\n  */\n #define DEFAULT_JS_RESET_TICKS_SS           (55) /* 5.5s */\n #define DEFAULT_JS_RESET_TICKS_SS_8408     (450) /* 45s */\n \n-/*\n+/**\n  * Default minimum number of scheduling ticks before the GPU is reset to clear a\n  * \"stuck\" CL job.\n  */\n #define DEFAULT_JS_RESET_TICKS_CL        (55) /* 5.5s */\n \n-/*\n+/**\n  * Default minimum number of scheduling ticks before the GPU is reset to clear a\n  * \"stuck\" job during dumping.\n  */\n #define DEFAULT_JS_RESET_TICKS_DUMPING   (15020) /* 1502s */\n \n-/*\n+/**\n  * Default number of milliseconds given for other jobs on the GPU to be\n  * soft-stopped when the GPU needs to be reset.\n  */\n #define DEFAULT_RESET_TIMEOUT_MS (3000) /* 3s */\n \n-/*\n+/**\n  * Default timeslice that a context is scheduled in for, in nanoseconds.\n  *\n  * When a context has used up this amount of time across its jobs, it is\n@@ -208,7 +252,7 @@ enum {\n  */\n #define DEFAULT_JS_CTX_TIMESLICE_NS (50000000) /* 50ms */\n \n-/*\n+/**\n  * Perform GPU power down using only platform specific code, skipping DDK power\n  * management.\n  *\n@@ -222,5 +266,13 @@ enum {\n  */\n #define PLATFORM_POWER_DOWN_ONLY (0)\n \n+/**\n+ * Maximum frequency (in kHz) that the GPU can be clocked. For some platforms\n+ * this isn't available, so we simply define a dummy value here. If devfreq\n+ * is enabled the value will be read from there, otherwise this should be\n+ * overridden by defining GPU_FREQ_KHZ_MAX in the platform file.\n+ */\n+#define DEFAULT_GPU_FREQ_KHZ_MAX (5000)\n+\n #endif /* _KBASE_CONFIG_DEFAULTS_H_ */\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_context.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_context.c\nindex 17821fee6cbaf1..e9de7239b1e110 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_context.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_context.c\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Base kernel context APIs\n  */\n@@ -27,15 +32,6 @@\n #include <mali_kbase_dma_fence.h>\n #include <mali_kbase_ctx_sched.h>\n \n-/**\n- * kbase_create_context() - Create a kernel base context.\n- * @kbdev: Kbase device\n- * @is_compat: Force creation of a 32-bit context\n- *\n- * Allocate and init a kernel base context.\n- *\n- * Return: new kbase context\n- */\n struct kbase_context *\n kbase_create_context(struct kbase_device *kbdev, bool is_compat)\n {\n@@ -59,6 +55,11 @@ kbase_create_context(struct kbase_device *kbdev, bool is_compat)\n \tatomic_set(&kctx->refcount, 0);\n \tif (is_compat)\n \t\tkbase_ctx_flag_set(kctx, KCTX_COMPAT);\n+#if defined(CONFIG_64BIT)\n+\telse\n+\t\tkbase_ctx_flag_set(kctx, KCTX_FORCE_SAME_VA);\n+#endif /* !defined(CONFIG_64BIT) */\n+\n #ifdef CONFIG_MALI_BIFROST_TRACE_TIMELINE\n \tkctx->timeline.owner_tgid = task_tgid_nr(current);\n #endif\n@@ -114,9 +115,6 @@ kbase_create_context(struct kbase_device *kbdev, bool is_compat)\n \n \tINIT_LIST_HEAD(&kctx->waiting_soft_jobs);\n \tspin_lock_init(&kctx->waiting_soft_jobs_lock);\n-#ifdef CONFIG_KDS\n-\tINIT_LIST_HEAD(&kctx->waiting_kds_resource);\n-#endif\n \terr = kbase_dma_fence_init(kctx);\n \tif (err)\n \t\tgoto free_event;\n@@ -168,9 +166,8 @@ kbase_create_context(struct kbase_device *kbdev, bool is_compat)\n \n \tmutex_init(&kctx->vinstr_cli_lock);\n \n-\tsetup_timer(&kctx->soft_job_timeout,\n-\t\t    kbasep_soft_job_timeout_worker,\n-\t\t    (uintptr_t)kctx);\n+\tkbase_timer_setup(&kctx->soft_job_timeout,\n+\t\t\t  kbasep_soft_job_timeout_worker);\n \n \treturn kctx;\n \n@@ -218,13 +215,6 @@ static void kbase_reg_pending_dtor(struct kbase_va_region *reg)\n \tkfree(reg);\n }\n \n-/**\n- * kbase_destroy_context - Destroy a kernel base context.\n- * @kctx: Context to destroy\n- *\n- * Calls kbase_destroy_os_context() to free OS specific structures.\n- * Will release all outstanding regions.\n- */\n void kbase_destroy_context(struct kbase_context *kctx)\n {\n \tstruct kbase_device *kbdev;\n@@ -245,6 +235,8 @@ void kbase_destroy_context(struct kbase_context *kctx)\n \t * thread. */\n \tkbase_pm_context_active(kbdev);\n \n+\tkbase_mem_pool_mark_dying(&kctx->mem_pool);\n+\n \tkbase_jd_zap_context(kctx);\n \n #ifdef CONFIG_DEBUG_FS\n@@ -296,8 +288,6 @@ void kbase_destroy_context(struct kbase_context *kctx)\n \n \tkbase_jd_exit(kctx);\n \n-\tkbase_pm_context_idle(kbdev);\n-\n \tkbase_dma_fence_term(kctx);\n \n \tmutex_lock(&kbdev->mmu_hw_mutex);\n@@ -318,16 +308,11 @@ void kbase_destroy_context(struct kbase_context *kctx)\n \tWARN_ON(atomic_read(&kctx->nonmapped_pages) != 0);\n \n \tvfree(kctx);\n+\n+\tkbase_pm_context_idle(kbdev);\n }\n KBASE_EXPORT_SYMBOL(kbase_destroy_context);\n \n-/**\n- * kbase_context_set_create_flags - Set creation flags on a context\n- * @kctx: Kbase context\n- * @flags: Flags to set\n- *\n- * Return: 0 on success\n- */\n int kbase_context_set_create_flags(struct kbase_context *kctx, u32 flags)\n {\n \tint err = 0;\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_context.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_context.h\nindex a3f5bb0ce0da38..30b0f649806bbe 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_context.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_context.h\n@@ -1,26 +1,59 @@\n /*\n  *\n- * (C) COPYRIGHT 2011-2016 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2011-2016, 2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_CONTEXT_H_\n #define _KBASE_CONTEXT_H_\n \n #include <linux/atomic.h>\n \n+/**\n+ * kbase_create_context() - Create a kernel base context.\n+ * @kbdev: Kbase device\n+ * @is_compat: Force creation of a 32-bit context\n+ *\n+ * Allocate and init a kernel base context.\n+ *\n+ * Return: new kbase context\n+ */\n+struct kbase_context *\n+kbase_create_context(struct kbase_device *kbdev, bool is_compat);\n \n+/**\n+ * kbase_destroy_context - Destroy a kernel base context.\n+ * @kctx: Context to destroy\n+ *\n+ * Calls kbase_destroy_os_context() to free OS specific structures.\n+ * Will release all outstanding regions.\n+ */\n+void kbase_destroy_context(struct kbase_context *kctx);\n+\n+/**\n+ * kbase_context_set_create_flags - Set creation flags on a context\n+ * @kctx: Kbase context\n+ * @flags: Flags to set, which shall be one of the flags of\n+ *         BASE_CONTEXT_CREATE_KERNEL_FLAGS.\n+ *\n+ * Return: 0 on success, -EINVAL otherwise when an invalid flag is specified.\n+ */\n int kbase_context_set_create_flags(struct kbase_context *kctx, u32 flags);\n \n /**\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_core_linux.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_core_linux.c\nindex b15fc1f2b8d198..0a744c35ae1df9 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_core_linux.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_core_linux.c\n@@ -1,23 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <mali_kbase.h>\n #include <mali_kbase_config_defaults.h>\n-#include <mali_kbase_uku.h>\n #include <mali_midg_regmap.h>\n #include <mali_kbase_gator.h>\n #include <mali_kbase_mem_linux.h>\n@@ -30,6 +34,7 @@\n #endif /* CONFIG_MALI_BIFROST_DEVFREQ */\n #ifdef CONFIG_MALI_BIFROST_NO_MALI\n #include \"mali_kbase_model_linux.h\"\n+#include <backend/gpu/mali_kbase_model_dummy.h>\n #endif /* CONFIG_MALI_BIFROST_NO_MALI */\n #include \"mali_kbase_mem_profile_debugfs_buf_size.h\"\n #include \"mali_kbase_debug_mem_view.h\"\n@@ -45,6 +50,10 @@\n #include <backend/gpu/mali_kbase_device_internal.h>\n #include \"mali_kbase_ioctl.h\"\n \n+#ifdef CONFIG_MALI_JOB_DUMP\n+#include \"mali_kbase_gwt.h\"\n+#endif\n+\n #include <linux/module.h>\n #include <linux/init.h>\n #include <linux/poll.h>\n@@ -60,22 +69,23 @@\n #include <linux/uaccess.h>\n #include <linux/interrupt.h>\n #include <linux/mm.h>\n-#include <linux/compat.h>\t/* is_compat_task */\n+#include <linux/compat.h>\t/* is_compat_task/in_compat_syscall */\n #include <linux/mman.h>\n #include <linux/version.h>\n #include <mali_kbase_hw.h>\n-#include <platform/mali_kbase_platform_common.h>\n #if defined(CONFIG_SYNC) || defined(CONFIG_SYNC_FILE)\n #include <mali_kbase_sync.h>\n #endif /* CONFIG_SYNC || CONFIG_SYNC_FILE */\n #include <linux/clk.h>\n #include <linux/delay.h>\n+#include <linux/log2.h>\n \n #include <mali_kbase_config.h>\n \n \n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))\n+#if (KERNEL_VERSION(3, 13, 0) <= LINUX_VERSION_CODE)\n #include <linux/pm_opp.h>\n+#include <soc/rockchip/rockchip_opp_select.h>\n #else\n #include <linux/opp.h>\n #endif\n@@ -89,36 +99,28 @@\n #define MMU_IRQ_TAG\t1\n #define GPU_IRQ_TAG\t2\n \n-#if MALI_UNIT_TEST\n-static struct kbase_exported_test_data shared_kernel_test_data;\n-EXPORT_SYMBOL(shared_kernel_test_data);\n-#endif /* MALI_UNIT_TEST */\n-\n static int kbase_dev_nr;\n \n static DEFINE_MUTEX(kbase_dev_list_lock);\n static LIST_HEAD(kbase_dev_list);\n \n #define KERNEL_SIDE_DDK_VERSION_STRING \"K:\" MALI_RELEASE_NAME \"(GPL)\"\n-static inline void __compile_time_asserts(void)\n-{\n-\tCSTD_COMPILE_TIME_ASSERT(sizeof(KERNEL_SIDE_DDK_VERSION_STRING) <= KBASE_GET_VERSION_BUFFER_SIZE);\n-}\n \n static int kbase_api_handshake(struct kbase_context *kctx,\n-\t\tstruct kbase_ioctl_version_check *version)\n+\t\t\t       struct kbase_ioctl_version_check *version)\n {\n \tswitch (version->major) {\n \tcase BASE_UK_VERSION_MAJOR:\n \t\t/* set minor to be the lowest common */\n \t\tversion->minor = min_t(int, BASE_UK_VERSION_MINOR,\n-\t\t\t\t(int)version->minor);\n+\t\t\t\t       (int)version->minor);\n \t\tbreak;\n \tdefault:\n \t\t/* We return our actual version regardless if it\n \t\t * matches the version returned by userspace -\n \t\t * userspace can bail if it can't handle this\n-\t\t * version */\n+\t\t * version\n+\t\t */\n \t\tversion->major = BASE_UK_VERSION_MAJOR;\n \t\tversion->minor = BASE_UK_VERSION_MINOR;\n \t\tbreak;\n@@ -152,7 +154,9 @@ enum mali_error {\n enum {\n \tinited_mem = (1u << 0),\n \tinited_js = (1u << 1),\n-\tinited_pm_runtime_init = (1u << 2),\n+\t/* Bit number 2 was earlier assigned to the runtime-pm initialization\n+\t * stage (which has been merged with the backend_early stage).\n+\t */\n #ifdef CONFIG_MALI_BIFROST_DEVFREQ\n \tinited_devfreq = (1u << 3),\n #endif /* CONFIG_MALI_BIFROST_DEVFREQ */\n@@ -177,742 +181,6 @@ enum {\n \tinited_ctx_sched = (1u << 22)\n };\n \n-\n-#ifdef CONFIG_MALI_BIFROST_DEBUG\n-#define INACTIVE_WAIT_MS (5000)\n-\n-void kbase_set_driver_inactive(struct kbase_device *kbdev, bool inactive)\n-{\n-\tkbdev->driver_inactive = inactive;\n-\twake_up(&kbdev->driver_inactive_wait);\n-\n-\t/* Wait for any running IOCTLs to complete */\n-\tif (inactive)\n-\t\tmsleep(INACTIVE_WAIT_MS);\n-}\n-KBASE_EXPORT_TEST_API(kbase_set_driver_inactive);\n-#endif /* CONFIG_MALI_BIFROST_DEBUG */\n-\n-/**\n- * kbase_legacy_dispatch - UKK dispatch function\n- *\n- * This is the dispatch function for the legacy UKK ioctl interface. No new\n- * ioctls should be added to this function, see kbase_ioctl instead.\n- *\n- * @kctx: The kernel context structure\n- * @args: Pointer to the data structure passed from/to user space\n- * @args_size: Size of the data structure\n- */\n-static int kbase_legacy_dispatch(struct kbase_context *kctx,\n-\t\tvoid * const args, u32 args_size)\n-{\n-\tstruct kbase_device *kbdev;\n-\tunion uk_header *ukh = args;\n-\tu32 id;\n-\tint ret = 0;\n-\n-\tKBASE_DEBUG_ASSERT(ukh != NULL);\n-\n-\tkbdev = kctx->kbdev;\n-\tid = ukh->id;\n-\tukh->ret = MALI_ERROR_NONE; /* Be optimistic */\n-\n-#ifdef CONFIG_MALI_BIFROST_DEBUG\n-\twait_event(kbdev->driver_inactive_wait,\n-\t\t\tkbdev->driver_inactive == false);\n-#endif /* CONFIG_MALI_BIFROST_DEBUG */\n-\n-\tif (UKP_FUNC_ID_CHECK_VERSION == id) {\n-\t\tstruct uku_version_check_args *version_check;\n-\t\tstruct kbase_ioctl_version_check version;\n-\n-\t\tif (args_size != sizeof(struct uku_version_check_args)) {\n-\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\treturn 0;\n-\t\t}\n-\t\tversion_check = (struct uku_version_check_args *)args;\n-\t\tversion.minor = version_check->minor;\n-\t\tversion.major = version_check->major;\n-\n-\t\tkbase_api_handshake(kctx, &version);\n-\n-\t\tversion_check->minor = version.minor;\n-\t\tversion_check->major = version.major;\n-\t\tukh->ret = MALI_ERROR_NONE;\n-\t\treturn 0;\n-\t}\n-\n-\t/* block calls until version handshake */\n-\tif (kctx->api_version == 0)\n-\t\treturn -EINVAL;\n-\n-\tif (!atomic_read(&kctx->setup_complete)) {\n-\t\tstruct kbase_uk_set_flags *kbase_set_flags;\n-\n-\t\t/* setup pending, try to signal that we'll do the setup,\n-\t\t * if setup was already in progress, err this call\n-\t\t */\n-\t\tif (atomic_cmpxchg(&kctx->setup_in_progress, 0, 1) != 0)\n-\t\t\treturn -EINVAL;\n-\n-\t\t/* if unexpected call, will stay stuck in setup mode\n-\t\t * (is it the only call we accept?)\n-\t\t */\n-\t\tif (id != KBASE_FUNC_SET_FLAGS)\n-\t\t\treturn -EINVAL;\n-\n-\t\tkbase_set_flags = (struct kbase_uk_set_flags *)args;\n-\n-\t\t/* if not matching the expected call, stay in setup mode */\n-\t\tif (sizeof(*kbase_set_flags) != args_size)\n-\t\t\tgoto bad_size;\n-\n-\t\t/* if bad flags, will stay stuck in setup mode */\n-\t\tif (kbase_context_set_create_flags(kctx,\n-\t\t\t\tkbase_set_flags->create_flags) != 0)\n-\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\n-\t\tatomic_set(&kctx->setup_complete, 1);\n-\t\treturn 0;\n-\t}\n-\n-\t/* setup complete, perform normal operation */\n-\tswitch (id) {\n-\tcase KBASE_FUNC_MEM_JIT_INIT:\n-\t\t{\n-\t\t\tstruct kbase_uk_mem_jit_init *jit_init = args;\n-\n-\t\t\tif (sizeof(*jit_init) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tif (kbase_region_tracker_init_jit(kctx,\n-\t\t\t\t\tjit_init->va_pages))\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\tbreak;\n-\t\t}\n-\tcase KBASE_FUNC_MEM_ALLOC:\n-\t\t{\n-\t\t\tstruct kbase_uk_mem_alloc *mem = args;\n-\t\t\tstruct kbase_va_region *reg;\n-\n-\t\t\tif (sizeof(*mem) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-#if defined(CONFIG_64BIT)\n-\t\t\tif (!kbase_ctx_flag(kctx, KCTX_COMPAT)) {\n-\t\t\t\t/* force SAME_VA if a 64-bit client */\n-\t\t\t\tmem->flags |= BASE_MEM_SAME_VA;\n-\t\t\t}\n-#endif\n-\n-\t\t\treg = kbase_mem_alloc(kctx, mem->va_pages,\n-\t\t\t\t\tmem->commit_pages, mem->extent,\n-\t\t\t\t\t&mem->flags, &mem->gpu_va);\n-\t\t\tmem->va_alignment = 0;\n-\n-\t\t\tif (!reg)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\tbreak;\n-\t\t}\n-\tcase KBASE_FUNC_MEM_IMPORT: {\n-\t\t\tstruct kbase_uk_mem_import *mem_import = args;\n-\t\t\tvoid __user *phandle;\n-\n-\t\t\tif (sizeof(*mem_import) != args_size)\n-\t\t\t\tgoto bad_size;\n-#ifdef CONFIG_COMPAT\n-\t\t\tif (kbase_ctx_flag(kctx, KCTX_COMPAT))\n-\t\t\t\tphandle = compat_ptr(mem_import->phandle);\n-\t\t\telse\n-#endif\n-\t\t\t\tphandle = u64_to_user_ptr(mem_import->phandle);\n-\n-\t\t\tif (mem_import->type == BASE_MEM_IMPORT_TYPE_INVALID) {\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\n-\t\t\tif (kbase_mem_import(kctx,\n-\t\t\t\t\t(enum base_mem_import_type)\n-\t\t\t\t\tmem_import->type,\n-\t\t\t\t\tphandle,\n-\t\t\t\t\t0,\n-\t\t\t\t\t&mem_import->gpu_va,\n-\t\t\t\t\t&mem_import->va_pages,\n-\t\t\t\t\t&mem_import->flags)) {\n-\t\t\t\tmem_import->type = BASE_MEM_IMPORT_TYPE_INVALID;\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\t}\n-\t\t\tbreak;\n-\t}\n-\tcase KBASE_FUNC_MEM_ALIAS: {\n-\t\t\tstruct kbase_uk_mem_alias *alias = args;\n-\t\t\tstruct base_mem_aliasing_info __user *user_ai;\n-\t\t\tstruct base_mem_aliasing_info *ai;\n-\n-\t\t\tif (sizeof(*alias) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tif (alias->nents > 2048) {\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\t\t\tif (!alias->nents) {\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\n-#ifdef CONFIG_COMPAT\n-\t\t\tif (kbase_ctx_flag(kctx, KCTX_COMPAT))\n-\t\t\t\tuser_ai = compat_ptr(alias->ai);\n-\t\t\telse\n-#endif\n-\t\t\t\tuser_ai = u64_to_user_ptr(alias->ai);\n-\n-\t\t\tai = vmalloc(sizeof(*ai) * alias->nents);\n-\n-\t\t\tif (!ai) {\n-\t\t\t\tukh->ret = MALI_ERROR_OUT_OF_MEMORY;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\n-\t\t\tif (copy_from_user(ai, user_ai,\n-\t\t\t\t\t   sizeof(*ai) * alias->nents)) {\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\t\tgoto copy_failed;\n-\t\t\t}\n-\n-\t\t\talias->gpu_va = kbase_mem_alias(kctx, &alias->flags,\n-\t\t\t\t\t\t\talias->stride,\n-\t\t\t\t\t\t\talias->nents, ai,\n-\t\t\t\t\t\t\t&alias->va_pages);\n-\t\t\tif (!alias->gpu_va) {\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\t\tgoto no_alias;\n-\t\t\t}\n-no_alias:\n-copy_failed:\n-\t\t\tvfree(ai);\n-\t\t\tbreak;\n-\t\t}\n-\tcase KBASE_FUNC_MEM_COMMIT:\n-\t\t{\n-\t\t\tstruct kbase_uk_mem_commit *commit = args;\n-\t\t\tint ret;\n-\n-\t\t\tif (sizeof(*commit) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tret = kbase_mem_commit(kctx, commit->gpu_addr,\n-\t\t\t\t\tcommit->pages);\n-\n-\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\tcommit->result_subcode =\n-\t\t\t\tBASE_BACKING_THRESHOLD_ERROR_INVALID_ARGUMENTS;\n-\n-\t\t\tif (ret == 0) {\n-\t\t\t\tukh->ret = MALI_ERROR_NONE;\n-\t\t\t\tcommit->result_subcode =\n-\t\t\t\t\tBASE_BACKING_THRESHOLD_OK;\n-\t\t\t} else if (ret == -ENOMEM) {\n-\t\t\t\tcommit->result_subcode =\n-\t\t\t\t\tBASE_BACKING_THRESHOLD_ERROR_OOM;\n-\t\t\t}\n-\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_MEM_QUERY:\n-\t\t{\n-\t\t\tstruct kbase_uk_mem_query *query = args;\n-\n-\t\t\tif (sizeof(*query) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tif (kbase_mem_query(kctx, query->gpu_addr,\n-\t\t\t\t\tquery->query, &query->value) != 0)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\telse\n-\t\t\t\tukh->ret = MALI_ERROR_NONE;\n-\t\t\tbreak;\n-\t\t}\n-\t\tbreak;\n-\n-\tcase KBASE_FUNC_MEM_FLAGS_CHANGE:\n-\t\t{\n-\t\t\tstruct kbase_uk_mem_flags_change *fc = args;\n-\n-\t\t\tif (sizeof(*fc) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tif (kbase_mem_flags_change(kctx, fc->gpu_va,\n-\t\t\t\t\tfc->flags, fc->mask) != 0)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\n-\t\t\tbreak;\n-\t\t}\n-\tcase KBASE_FUNC_MEM_FREE:\n-\t\t{\n-\t\t\tstruct kbase_uk_mem_free *mem = args;\n-\n-\t\t\tif (sizeof(*mem) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tif (kbase_mem_free(kctx, mem->gpu_addr) != 0)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_JOB_SUBMIT:\n-\t\t{\n-\t\t\tstruct kbase_uk_job_submit *job = args;\n-\t\t\tchar __user *user_buf;\n-\n-\t\t\tif (sizeof(*job) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-#ifdef CONFIG_COMPAT\n-\t\t\tif (kbase_ctx_flag(kctx, KCTX_COMPAT))\n-\t\t\t\tuser_buf = compat_ptr(job->addr);\n-\t\t\telse\n-#endif\n-\t\t\t\tuser_buf = u64_to_user_ptr(job->addr);\n-\n-\t\t\tif (kbase_jd_submit(kctx, user_buf,\n-\t\t\t\t\t\tjob->nr_atoms,\n-\t\t\t\t\t\tjob->stride,\n-\t\t\t\t\t\tfalse) != 0)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_SYNC:\n-\t\t{\n-\t\t\tstruct kbase_uk_sync_now *sn = args;\n-\n-\t\t\tif (sizeof(*sn) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tif (kbase_sync_now(kctx, &sn->sset.basep_sset) != 0)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_DISJOINT_QUERY:\n-\t\t{\n-\t\t\tstruct kbase_uk_disjoint_query *dquery = args;\n-\n-\t\t\tif (sizeof(*dquery) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\t/* Get the disjointness counter value. */\n-\t\t\tdquery->counter = kbase_disjoint_event_get(kctx->kbdev);\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_POST_TERM:\n-\t\t{\n-\t\t\tkbase_event_close(kctx);\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_HWCNT_SETUP:\n-\t\t{\n-\t\t\tstruct kbase_uk_hwcnt_setup *setup = args;\n-\n-\t\t\tif (sizeof(*setup) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tmutex_lock(&kctx->vinstr_cli_lock);\n-\t\t\tif (kbase_vinstr_legacy_hwc_setup(kbdev->vinstr_ctx,\n-\t\t\t\t\t&kctx->vinstr_cli, setup) != 0)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\tmutex_unlock(&kctx->vinstr_cli_lock);\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_HWCNT_DUMP:\n-\t\t{\n-\t\t\t/* args ignored */\n-\t\t\tmutex_lock(&kctx->vinstr_cli_lock);\n-\t\t\tif (kbase_vinstr_hwc_dump(kctx->vinstr_cli,\n-\t\t\t\t\tBASE_HWCNT_READER_EVENT_MANUAL) != 0)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\tmutex_unlock(&kctx->vinstr_cli_lock);\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_HWCNT_CLEAR:\n-\t\t{\n-\t\t\t/* args ignored */\n-\t\t\tmutex_lock(&kctx->vinstr_cli_lock);\n-\t\t\tif (kbase_vinstr_hwc_clear(kctx->vinstr_cli) != 0)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\tmutex_unlock(&kctx->vinstr_cli_lock);\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_HWCNT_READER_SETUP:\n-\t\t{\n-\t\t\tstruct kbase_uk_hwcnt_reader_setup *setup = args;\n-\n-\t\t\tif (sizeof(*setup) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tmutex_lock(&kctx->vinstr_cli_lock);\n-\t\t\tif (kbase_vinstr_hwcnt_reader_setup(kbdev->vinstr_ctx,\n-\t\t\t\t\tsetup) != 0)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\tmutex_unlock(&kctx->vinstr_cli_lock);\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_GPU_PROPS_REG_DUMP:\n-\t\t{\n-\t\t\tstruct kbase_uk_gpuprops *setup = args;\n-\n-\t\t\tif (sizeof(*setup) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tif (kbase_gpuprops_uk_get_props(kctx, setup) != 0)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\tbreak;\n-\t\t}\n-\tcase KBASE_FUNC_FIND_CPU_OFFSET:\n-\t\t{\n-\t\t\tstruct kbase_uk_find_cpu_offset *find = args;\n-\n-\t\t\tif (sizeof(*find) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tif (find->gpu_addr & ~PAGE_MASK) {\n-\t\t\t\tdev_warn(kbdev->dev, \"kbase_legacy_dispatch case KBASE_FUNC_FIND_CPU_OFFSET: find->gpu_addr: passed parameter is invalid\");\n-\t\t\t\tgoto out_bad;\n-\t\t\t}\n-\n-\t\t\tif (find->size > SIZE_MAX || find->cpu_addr > ULONG_MAX) {\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\t} else {\n-\t\t\t\tint err;\n-\n-\t\t\t\terr = kbasep_find_enclosing_cpu_mapping_offset(\n-\t\t\t\t\t\tkctx,\n-\t\t\t\t\t\tfind->cpu_addr,\n-\t\t\t\t\t\tfind->size,\n-\t\t\t\t\t\t&find->offset);\n-\n-\t\t\t\tif (err)\n-\t\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\t}\n-\t\t\tbreak;\n-\t\t}\n-\tcase KBASE_FUNC_GET_VERSION:\n-\t\t{\n-\t\t\tstruct kbase_uk_get_ddk_version *get_version = (struct kbase_uk_get_ddk_version *)args;\n-\n-\t\t\tif (sizeof(*get_version) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\t/* version buffer size check is made in compile time assert */\n-\t\t\tmemcpy(get_version->version_buffer, KERNEL_SIDE_DDK_VERSION_STRING, sizeof(KERNEL_SIDE_DDK_VERSION_STRING));\n-\t\t\tget_version->version_string_size = sizeof(KERNEL_SIDE_DDK_VERSION_STRING);\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_STREAM_CREATE:\n-\t\t{\n-#if defined(CONFIG_SYNC) || defined(CONFIG_SYNC_FILE)\n-\t\t\tstruct kbase_uk_stream_create *screate = (struct kbase_uk_stream_create *)args;\n-\n-\t\t\tif (sizeof(*screate) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tif (strnlen(screate->name, sizeof(screate->name)) >= sizeof(screate->name)) {\n-\t\t\t\t/* not NULL terminated */\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\n-\t\t\tif (kbase_sync_fence_stream_create(screate->name,\n-\t\t\t\t\t\t\t   &screate->fd) != 0)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\telse\n-\t\t\t\tukh->ret = MALI_ERROR_NONE;\n-#else /* CONFIG_SYNC || CONFIG_SYNC_FILE */\n-\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-#endif /* CONFIG_SYNC || CONFIG_SYNC_FILE */\n-\t\t\tbreak;\n-\t\t}\n-\tcase KBASE_FUNC_FENCE_VALIDATE:\n-\t\t{\n-#if defined(CONFIG_SYNC) || defined(CONFIG_SYNC_FILE)\n-\t\t\tstruct kbase_uk_fence_validate *fence_validate = (struct kbase_uk_fence_validate *)args;\n-\n-\t\t\tif (sizeof(*fence_validate) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tif (kbase_sync_fence_validate(fence_validate->fd) != 0)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\telse\n-\t\t\t\tukh->ret = MALI_ERROR_NONE;\n-#endif /* CONFIG_SYNC || CONFIG_SYNC_FILE */\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_SET_TEST_DATA:\n-\t\t{\n-#if MALI_UNIT_TEST\n-\t\t\tstruct kbase_uk_set_test_data *set_data = args;\n-\n-\t\t\tshared_kernel_test_data = set_data->test_data;\n-\t\t\tshared_kernel_test_data.kctx = (uintptr_t)kctx;\n-\t\t\tshared_kernel_test_data.mm = (uintptr_t)current->mm;\n-\t\t\tukh->ret = MALI_ERROR_NONE;\n-#endif /* MALI_UNIT_TEST */\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_INJECT_ERROR:\n-\t\t{\n-#ifdef CONFIG_MALI_BIFROST_ERROR_INJECT\n-\t\t\tunsigned long flags;\n-\t\t\tstruct kbase_error_params params = ((struct kbase_uk_error_params *)args)->params;\n-\n-\t\t\t/*mutex lock */\n-\t\t\tspin_lock_irqsave(&kbdev->reg_op_lock, flags);\n-\t\t\tif (job_atom_inject_error(&params) != 0)\n-\t\t\t\tukh->ret = MALI_ERROR_OUT_OF_MEMORY;\n-\t\t\telse\n-\t\t\t\tukh->ret = MALI_ERROR_NONE;\n-\t\t\tspin_unlock_irqrestore(&kbdev->reg_op_lock, flags);\n-\t\t\t/*mutex unlock */\n-#endif /* CONFIG_MALI_BIFROST_ERROR_INJECT */\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_MODEL_CONTROL:\n-\t\t{\n-#ifdef CONFIG_MALI_BIFROST_NO_MALI\n-\t\t\tunsigned long flags;\n-\t\t\tstruct kbase_model_control_params params =\n-\t\t\t\t\t((struct kbase_uk_model_control_params *)args)->params;\n-\n-\t\t\t/*mutex lock */\n-\t\t\tspin_lock_irqsave(&kbdev->reg_op_lock, flags);\n-\t\t\tif (gpu_model_control(kbdev->model, &params) != 0)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\telse\n-\t\t\t\tukh->ret = MALI_ERROR_NONE;\n-\t\t\tspin_unlock_irqrestore(&kbdev->reg_op_lock, flags);\n-\t\t\t/*mutex unlock */\n-#endif /* CONFIG_MALI_BIFROST_NO_MALI */\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_GET_PROFILING_CONTROLS:\n-\t\t{\n-\t\t\tstruct kbase_uk_profiling_controls *controls =\n-\t\t\t\t\t(struct kbase_uk_profiling_controls *)args;\n-\t\t\tu32 i;\n-\n-\t\t\tif (sizeof(*controls) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tfor (i = FBDUMP_CONTROL_MIN; i < FBDUMP_CONTROL_MAX; i++)\n-\t\t\t\tcontrols->profiling_controls[i] =\n-\t\t\t\t\tkbdev->kbase_profiling_controls[i];\n-\n-\t\t\tbreak;\n-\t\t}\n-\n-\t/* used only for testing purposes; these controls are to be set by gator through gator API */\n-\tcase KBASE_FUNC_SET_PROFILING_CONTROLS:\n-\t\t{\n-\t\t\tstruct kbase_uk_profiling_controls *controls =\n-\t\t\t\t\t(struct kbase_uk_profiling_controls *)args;\n-\t\t\tu32 i;\n-\n-\t\t\tif (sizeof(*controls) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tfor (i = FBDUMP_CONTROL_MIN; i < FBDUMP_CONTROL_MAX; i++)\n-\t\t\t\t_mali_profiling_control(i, controls->profiling_controls[i]);\n-\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_DEBUGFS_MEM_PROFILE_ADD:\n-\t\t{\n-\t\t\tstruct kbase_uk_debugfs_mem_profile_add *add_data =\n-\t\t\t\t\t(struct kbase_uk_debugfs_mem_profile_add *)args;\n-\t\t\tchar *buf;\n-\t\t\tchar __user *user_buf;\n-\n-\t\t\tif (sizeof(*add_data) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tif (add_data->len > KBASE_MEM_PROFILE_MAX_BUF_SIZE) {\n-\t\t\t\tdev_err(kbdev->dev, \"buffer too big\\n\");\n-\t\t\t\tgoto out_bad;\n-\t\t\t}\n-\n-#ifdef CONFIG_COMPAT\n-\t\t\tif (kbase_ctx_flag(kctx, KCTX_COMPAT))\n-\t\t\t\tuser_buf = compat_ptr(add_data->buf);\n-\t\t\telse\n-#endif\n-\t\t\t\tuser_buf = u64_to_user_ptr(add_data->buf);\n-\n-\t\t\tbuf = kmalloc(add_data->len, GFP_KERNEL);\n-\t\t\tif (ZERO_OR_NULL_PTR(buf))\n-\t\t\t\tgoto out_bad;\n-\n-\t\t\tif (0 != copy_from_user(buf, user_buf, add_data->len)) {\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\t\tkfree(buf);\n-\t\t\t\tgoto out_bad;\n-\t\t\t}\n-\n-\t\t\tif (kbasep_mem_profile_debugfs_insert(kctx, buf,\n-\t\t\t\t\t\t\tadd_data->len)) {\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\t\tgoto out_bad;\n-\t\t\t}\n-\n-\t\t\tbreak;\n-\t\t}\n-\n-#ifdef CONFIG_MALI_BIFROST_NO_MALI\n-\tcase KBASE_FUNC_SET_PRFCNT_VALUES:\n-\t\t{\n-\n-\t\t\tstruct kbase_uk_prfcnt_values *params =\n-\t\t\t  ((struct kbase_uk_prfcnt_values *)args);\n-\t\t\tgpu_model_set_dummy_prfcnt_sample(params->data,\n-\t\t\t\t\tparams->size);\n-\n-\t\t\tbreak;\n-\t\t}\n-#endif /* CONFIG_MALI_BIFROST_NO_MALI */\n-#ifdef BASE_LEGACY_UK10_4_SUPPORT\n-\tcase KBASE_FUNC_TLSTREAM_ACQUIRE_V10_4:\n-\t\t{\n-\t\t\tstruct kbase_uk_tlstream_acquire_v10_4 *tlstream_acquire\n-\t\t\t\t\t= args;\n-\t\t\tint ret;\n-\n-\t\t\tif (sizeof(*tlstream_acquire) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tret = kbase_tlstream_acquire(\n-\t\t\t\t\t\tkctx, 0);\n-\t\t\tif (ret < 0)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\telse\n-\t\t\t\ttlstream_acquire->fd = ret;\n-\t\t\tbreak;\n-\t\t}\n-#endif /* BASE_LEGACY_UK10_4_SUPPORT */\n-\tcase KBASE_FUNC_TLSTREAM_ACQUIRE:\n-\t\t{\n-\t\t\tstruct kbase_uk_tlstream_acquire *tlstream_acquire =\n-\t\t\t\targs;\n-\t\t\tint ret;\n-\n-\t\t\tif (sizeof(*tlstream_acquire) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tif (tlstream_acquire->flags & ~BASE_TLSTREAM_FLAGS_MASK)\n-\t\t\t\tgoto out_bad;\n-\n-\t\t\tret = kbase_tlstream_acquire(\n-\t\t\t\t\tkctx, tlstream_acquire->flags);\n-\t\t\tif (ret < 0)\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\t\t\telse\n-\t\t\t\ttlstream_acquire->fd = ret;\n-\t\t\tbreak;\n-\t\t}\n-\tcase KBASE_FUNC_TLSTREAM_FLUSH:\n-\t\t{\n-\t\t\tstruct kbase_uk_tlstream_flush *tlstream_flush =\n-\t\t\t\targs;\n-\n-\t\t\tif (sizeof(*tlstream_flush) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tkbase_tlstream_flush_streams();\n-\t\t\tbreak;\n-\t\t}\n-#if MALI_UNIT_TEST\n-\tcase KBASE_FUNC_TLSTREAM_TEST:\n-\t\t{\n-\t\t\tstruct kbase_uk_tlstream_test *tlstream_test = args;\n-\n-\t\t\tif (sizeof(*tlstream_test) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tkbase_tlstream_test(\n-\t\t\t\t\ttlstream_test->tpw_count,\n-\t\t\t\t\ttlstream_test->msg_delay,\n-\t\t\t\t\ttlstream_test->msg_count,\n-\t\t\t\t\ttlstream_test->aux_msg);\n-\t\t\tbreak;\n-\t\t}\n-\tcase KBASE_FUNC_TLSTREAM_STATS:\n-\t\t{\n-\t\t\tstruct kbase_uk_tlstream_stats *tlstream_stats = args;\n-\n-\t\t\tif (sizeof(*tlstream_stats) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tkbase_tlstream_stats(\n-\t\t\t\t\t&tlstream_stats->bytes_collected,\n-\t\t\t\t\t&tlstream_stats->bytes_generated);\n-\t\t\tbreak;\n-\t\t}\n-#endif /* MALI_UNIT_TEST */\n-\n-\tcase KBASE_FUNC_GET_CONTEXT_ID:\n-\t\t{\n-\t\t\tstruct kbase_uk_context_id *info = args;\n-\n-\t\t\tinfo->id = kctx->id;\n-\t\t\tbreak;\n-\t\t}\n-\n-\tcase KBASE_FUNC_SOFT_EVENT_UPDATE:\n-\t\t{\n-\t\t\tstruct kbase_uk_soft_event_update *update = args;\n-\n-\t\t\tif (sizeof(*update) != args_size)\n-\t\t\t\tgoto bad_size;\n-\n-\t\t\tif (((update->new_status != BASE_JD_SOFT_EVENT_SET) &&\n-\t\t\t    (update->new_status != BASE_JD_SOFT_EVENT_RESET)) ||\n-\t\t\t    (update->flags != 0))\n-\t\t\t\tgoto out_bad;\n-\n-\t\t\tif (kbase_soft_event_update(kctx, update->evt,\n-\t\t\t\t\t\tupdate->new_status))\n-\t\t\t\tukh->ret = MALI_ERROR_FUNCTION_FAILED;\n-\n-\t\t\tbreak;\n-\t\t}\n-\n-\tdefault:\n-\t\tdev_err(kbdev->dev, \"unknown ioctl %u\\n\", id);\n-\t\tgoto out_bad;\n-\t}\n-\n-\treturn ret;\n-\n- bad_size:\n-\tdev_err(kbdev->dev, \"Wrong syscall size (%d) for %08x\\n\", args_size, id);\n- out_bad:\n-\treturn -EINVAL;\n-}\n-\n static struct kbase_device *to_kbase_device(struct device *dev)\n {\n \treturn dev_get_drvdata(dev);\n@@ -1065,6 +333,55 @@ static const struct file_operations kbase_infinite_cache_fops = {\n \t.read = read_ctx_infinite_cache,\n };\n \n+static ssize_t write_ctx_force_same_va(struct file *f, const char __user *ubuf,\n+\t\tsize_t size, loff_t *off)\n+{\n+\tstruct kbase_context *kctx = f->private_data;\n+\tint err;\n+\tbool value;\n+\n+\terr = kstrtobool_from_user(ubuf, size, &value);\n+\tif (err)\n+\t\treturn err;\n+\n+\tif (value) {\n+#if defined(CONFIG_64BIT)\n+\t\t/* 32-bit clients cannot force SAME_VA */\n+\t\tif (kbase_ctx_flag(kctx, KCTX_COMPAT))\n+\t\t\treturn -EINVAL;\n+\t\tkbase_ctx_flag_set(kctx, KCTX_FORCE_SAME_VA);\n+#else /* defined(CONFIG_64BIT) */\n+\t\t/* 32-bit clients cannot force SAME_VA */\n+\t\treturn -EINVAL;\n+#endif /* defined(CONFIG_64BIT) */\n+\t} else {\n+\t\tkbase_ctx_flag_clear(kctx, KCTX_FORCE_SAME_VA);\n+\t}\n+\n+\treturn size;\n+}\n+\n+static ssize_t read_ctx_force_same_va(struct file *f, char __user *ubuf,\n+\t\tsize_t size, loff_t *off)\n+{\n+\tstruct kbase_context *kctx = f->private_data;\n+\tchar buf[32];\n+\tint count;\n+\tbool value;\n+\n+\tvalue = kbase_ctx_flag(kctx, KCTX_FORCE_SAME_VA);\n+\n+\tcount = scnprintf(buf, sizeof(buf), \"%s\\n\", value ? \"Y\" : \"N\");\n+\n+\treturn simple_read_from_buffer(ubuf, size, off, buf, count);\n+}\n+\n+static const struct file_operations kbase_force_same_va_fops = {\n+\t.open = simple_open,\n+\t.write = write_ctx_force_same_va,\n+\t.read = read_ctx_force_same_va,\n+};\n+\n static int kbase_open(struct inode *inode, struct file *filp)\n {\n \tstruct kbase_device *kbdev = NULL;\n@@ -1079,7 +396,11 @@ static int kbase_open(struct inode *inode, struct file *filp)\n \tif (!kbdev)\n \t\treturn -ENODEV;\n \n+#if (KERNEL_VERSION(4, 6, 0) <= LINUX_VERSION_CODE)\n+\tkctx = kbase_create_context(kbdev, in_compat_syscall());\n+#else\n \tkctx = kbase_create_context(kbdev, is_compat_task());\n+#endif /* (KERNEL_VERSION(4, 6, 0) <= LINUX_VERSION_CODE) */\n \tif (!kctx) {\n \t\tret = -ENOMEM;\n \t\tgoto out;\n@@ -1104,7 +425,9 @@ static int kbase_open(struct inode *inode, struct file *filp)\n \t}\n \n \tdebugfs_create_file(\"infinite_cache\", 0644, kctx->kctx_dentry,\n-\t\t\t    kctx, &kbase_infinite_cache_fops);\n+\t\t\tkctx, &kbase_infinite_cache_fops);\n+\tdebugfs_create_file(\"force_same_va\", S_IRUSR | S_IWUSR,\n+\t\t\tkctx->kctx_dentry, kctx, &kbase_force_same_va_fops);\n \n \tmutex_init(&kctx->mem_profile_lock);\n \n@@ -1177,11 +500,11 @@ static int kbase_release(struct inode *inode, struct file *filp)\n \t/* If this client was performing hwcnt dumping and did not explicitly\n \t * detach itself, remove it from the vinstr core now */\n \tif (kctx->vinstr_cli) {\n-\t\tstruct kbase_uk_hwcnt_setup setup;\n+\t\tstruct kbase_ioctl_hwcnt_enable enable;\n \n-\t\tsetup.dump_buffer = 0llu;\n+\t\tenable.dump_buffer = 0llu;\n \t\tkbase_vinstr_legacy_hwc_setup(\n-\t\t\t\tkbdev->vinstr_ctx, &kctx->vinstr_cli, &setup);\n+\t\t\t\tkbdev->vinstr_ctx, &kctx->vinstr_cli, &enable);\n \t}\n \tmutex_unlock(&kctx->vinstr_cli_lock);\n \n@@ -1192,33 +515,6 @@ static int kbase_release(struct inode *inode, struct file *filp)\n \treturn 0;\n }\n \n-#define CALL_MAX_SIZE 536\n-\n-static long kbase_legacy_ioctl(struct file *filp, unsigned int cmd,\n-\t\tunsigned long arg)\n-{\n-\tu64 msg[(CALL_MAX_SIZE + 7) >> 3] = { 0xdeadbeefdeadbeefull };\t/* alignment fixup */\n-\tu32 size = _IOC_SIZE(cmd);\n-\tstruct kbase_context *kctx = filp->private_data;\n-\n-\tif (size > CALL_MAX_SIZE)\n-\t\treturn -ENOTTY;\n-\n-\tif (0 != copy_from_user(&msg, (void __user *)arg, size)) {\n-\t\tdev_err(kctx->kbdev->dev, \"failed to copy ioctl argument into kernel space\\n\");\n-\t\treturn -EFAULT;\n-\t}\n-\n-\tif (kbase_legacy_dispatch(kctx, &msg, size) != 0)\n-\t\treturn -EFAULT;\n-\n-\tif (0 != copy_to_user((void __user *)arg, &msg, size)) {\n-\t\tdev_err(kctx->kbdev->dev, \"failed to copy results of UK call back to user space\\n\");\n-\t\treturn -EFAULT;\n-\t}\n-\treturn 0;\n-}\n-\n static int kbase_api_set_flags(struct kbase_context *kctx,\n \t\tstruct kbase_ioctl_set_flags *flags)\n {\n@@ -1284,12 +580,11 @@ static int kbase_api_mem_alloc(struct kbase_context *kctx,\n \tu64 flags = alloc->in.flags;\n \tu64 gpu_va;\n \n-#if defined(CONFIG_64BIT)\n-\tif (!kbase_ctx_flag(kctx, KCTX_COMPAT)) {\n+\tif ((!kbase_ctx_flag(kctx, KCTX_COMPAT)) &&\n+\t\t\tkbase_ctx_flag(kctx, KCTX_FORCE_SAME_VA)) {\n \t\t/* force SAME_VA if a 64-bit client */\n \t\tflags |= BASE_MEM_SAME_VA;\n \t}\n-#endif\n \n \treg = kbase_mem_alloc(kctx, alloc->in.va_pages,\n \t\t\talloc->in.commit_pages,\n@@ -1322,38 +617,22 @@ static int kbase_api_hwcnt_reader_setup(struct kbase_context *kctx,\n \t\tstruct kbase_ioctl_hwcnt_reader_setup *setup)\n {\n \tint ret;\n-\tstruct kbase_uk_hwcnt_reader_setup args = {\n-\t\t.buffer_count = setup->buffer_count,\n-\t\t.jm_bm = setup->jm_bm,\n-\t\t.shader_bm = setup->shader_bm,\n-\t\t.tiler_bm = setup->tiler_bm,\n-\t\t.mmu_l2_bm = setup->mmu_l2_bm\n-\t};\n \n \tmutex_lock(&kctx->vinstr_cli_lock);\n-\tret = kbase_vinstr_hwcnt_reader_setup(kctx->kbdev->vinstr_ctx, &args);\n+\tret = kbase_vinstr_hwcnt_reader_setup(kctx->kbdev->vinstr_ctx, setup);\n \tmutex_unlock(&kctx->vinstr_cli_lock);\n \n-\tif (ret)\n-\t\treturn ret;\n-\treturn args.fd;\n+\treturn ret;\n }\n \n static int kbase_api_hwcnt_enable(struct kbase_context *kctx,\n \t\tstruct kbase_ioctl_hwcnt_enable *enable)\n {\n \tint ret;\n-\tstruct kbase_uk_hwcnt_setup args = {\n-\t\t.dump_buffer = enable->dump_buffer,\n-\t\t.jm_bm = enable->jm_bm,\n-\t\t.shader_bm = enable->shader_bm,\n-\t\t.tiler_bm = enable->tiler_bm,\n-\t\t.mmu_l2_bm = enable->mmu_l2_bm\n-\t};\n \n \tmutex_lock(&kctx->vinstr_cli_lock);\n \tret = kbase_vinstr_legacy_hwc_setup(kctx->kbdev->vinstr_ctx,\n-\t\t\t&kctx->vinstr_cli, &args);\n+\t\t\t&kctx->vinstr_cli, enable);\n \tmutex_unlock(&kctx->vinstr_cli_lock);\n \n \treturn ret;\n@@ -1382,6 +661,18 @@ static int kbase_api_hwcnt_clear(struct kbase_context *kctx)\n \treturn ret;\n }\n \n+#ifdef CONFIG_MALI_BIFROST_NO_MALI\n+static int kbase_api_hwcnt_set(struct kbase_context *kctx,\n+\t\tstruct kbase_ioctl_hwcnt_values *values)\n+{\n+\tgpu_model_set_dummy_prfcnt_sample(\n+\t\t\t(u32 __user *)(uintptr_t)values->data,\n+\t\t\tvalues->size);\n+\n+\treturn 0;\n+}\n+#endif\n+\n static int kbase_api_disjoint_query(struct kbase_context *kctx,\n \t\tstruct kbase_ioctl_disjoint_query *query)\n {\n@@ -1412,10 +703,37 @@ static int kbase_api_get_ddk_version(struct kbase_context *kctx,\n \treturn len;\n }\n \n+/* Defaults for legacy JIT init ioctl */\n+#define DEFAULT_MAX_JIT_ALLOCATIONS 255\n+#define JIT_LEGACY_TRIM_LEVEL (0) /* No trimming */\n+\n+static int kbase_api_mem_jit_init_old(struct kbase_context *kctx,\n+\t\tstruct kbase_ioctl_mem_jit_init_old *jit_init)\n+{\n+\tkctx->jit_version = 1;\n+\n+\treturn kbase_region_tracker_init_jit(kctx, jit_init->va_pages,\n+\t\t\tDEFAULT_MAX_JIT_ALLOCATIONS,\n+\t\t\tJIT_LEGACY_TRIM_LEVEL);\n+}\n+\n static int kbase_api_mem_jit_init(struct kbase_context *kctx,\n \t\tstruct kbase_ioctl_mem_jit_init *jit_init)\n {\n-\treturn kbase_region_tracker_init_jit(kctx, jit_init->va_pages);\n+\tint i;\n+\n+\tkctx->jit_version = 2;\n+\n+\tfor (i = 0; i < sizeof(jit_init->padding); i++) {\n+\t\t/* Ensure all padding bytes are 0 for potential future\n+\t\t * extension\n+\t\t */\n+\t\tif (jit_init->padding[i])\n+\t\t\treturn -EINVAL;\n+\t}\n+\n+\treturn kbase_region_tracker_init_jit(kctx, jit_init->va_pages,\n+\t\t\tjit_init->max_allocations, jit_init->trim_level);\n }\n \n static int kbase_api_mem_sync(struct kbase_context *kctx,\n@@ -1441,6 +759,17 @@ static int kbase_api_mem_find_cpu_offset(struct kbase_context *kctx,\n \t\t\t&find->out.offset);\n }\n \n+static int kbase_api_mem_find_gpu_start_and_offset(struct kbase_context *kctx,\n+\t\tunion kbase_ioctl_mem_find_gpu_start_and_offset *find)\n+{\n+\treturn kbasep_find_enclosing_gpu_mapping_start_and_offset(\n+\t\t\tkctx,\n+\t\t\tfind->in.gpu_addr,\n+\t\t\tfind->in.size,\n+\t\t\t&find->out.start,\n+\t\t\t&find->out.offset);\n+}\n+\n static int kbase_api_get_context_id(struct kbase_context *kctx,\n \t\tstruct kbase_ioctl_get_context_id *info)\n {\n@@ -1478,6 +807,9 @@ static int kbase_api_mem_alias(struct kbase_context *kctx,\n \tif (alias->in.nents == 0 || alias->in.nents > 2048)\n \t\treturn -EINVAL;\n \n+\tif (alias->in.stride > (U64_MAX / 2048))\n+\t\treturn -EINVAL;\n+\n \tai = vmalloc(sizeof(*ai) * alias->in.nents);\n \tif (!ai)\n \t\treturn -ENOMEM;\n@@ -1616,6 +948,74 @@ static int kbase_api_soft_event_update(struct kbase_context *kctx,\n \treturn kbase_soft_event_update(kctx, update->event, update->new_status);\n }\n \n+static int kbase_api_sticky_resource_map(struct kbase_context *kctx,\n+\t\tstruct kbase_ioctl_sticky_resource_map *map)\n+{\n+\tint ret;\n+\tu64 i;\n+\tu64 gpu_addr[BASE_EXT_RES_COUNT_MAX];\n+\n+\tif (!map->count || map->count > BASE_EXT_RES_COUNT_MAX)\n+\t\treturn -EOVERFLOW;\n+\n+\tret = copy_from_user(gpu_addr, u64_to_user_ptr(map->address),\n+\t\t\tsizeof(u64) * map->count);\n+\n+\tif (ret != 0)\n+\t\treturn -EFAULT;\n+\n+\tkbase_gpu_vm_lock(kctx);\n+\n+\tfor (i = 0; i < map->count; i++) {\n+\t\tif (!kbase_sticky_resource_acquire(kctx, gpu_addr[i])) {\n+\t\t\t/* Invalid resource */\n+\t\t\tret = -EINVAL;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\tif (ret != 0) {\n+\t\twhile (i > 0) {\n+\t\t\ti--;\n+\t\t\tkbase_sticky_resource_release(kctx, NULL, gpu_addr[i]);\n+\t\t}\n+\t}\n+\n+\tkbase_gpu_vm_unlock(kctx);\n+\n+\treturn ret;\n+}\n+\n+static int kbase_api_sticky_resource_unmap(struct kbase_context *kctx,\n+\t\tstruct kbase_ioctl_sticky_resource_unmap *unmap)\n+{\n+\tint ret;\n+\tu64 i;\n+\tu64 gpu_addr[BASE_EXT_RES_COUNT_MAX];\n+\n+\tif (!unmap->count || unmap->count > BASE_EXT_RES_COUNT_MAX)\n+\t\treturn -EOVERFLOW;\n+\n+\tret = copy_from_user(gpu_addr, u64_to_user_ptr(unmap->address),\n+\t\t\tsizeof(u64) * unmap->count);\n+\n+\tif (ret != 0)\n+\t\treturn -EFAULT;\n+\n+\tkbase_gpu_vm_lock(kctx);\n+\n+\tfor (i = 0; i < unmap->count; i++) {\n+\t\tif (!kbase_sticky_resource_release(kctx, NULL, gpu_addr[i])) {\n+\t\t\t/* Invalid resource, but we keep going anyway */\n+\t\t\tret = -EINVAL;\n+\t\t}\n+\t}\n+\n+\tkbase_gpu_vm_unlock(kctx);\n+\n+\treturn ret;\n+}\n+\n #if MALI_UNIT_TEST\n static int kbase_api_tlstream_test(struct kbase_context *kctx,\n \t\tstruct kbase_ioctl_tlstream_test *test)\n@@ -1641,14 +1041,12 @@ static int kbase_api_tlstream_stats(struct kbase_context *kctx,\n #endif /* MALI_UNIT_TEST */\n \n #define KBASE_HANDLE_IOCTL(cmd, function)                          \\\n-\tcase cmd:                                                  \\\n \tdo {                                                       \\\n \t\tBUILD_BUG_ON(_IOC_DIR(cmd) != _IOC_NONE);          \\\n \t\treturn function(kctx);                             \\\n \t} while (0)\n \n #define KBASE_HANDLE_IOCTL_IN(cmd, function, type)                 \\\n-\tcase cmd:                                                  \\\n \tdo {                                                       \\\n \t\ttype param;                                        \\\n \t\tint err;                                           \\\n@@ -1661,7 +1059,6 @@ static int kbase_api_tlstream_stats(struct kbase_context *kctx,\n \t} while (0)\n \n #define KBASE_HANDLE_IOCTL_OUT(cmd, function, type)                \\\n-\tcase cmd:                                                  \\\n \tdo {                                                       \\\n \t\ttype param;                                        \\\n \t\tint ret, err;                                      \\\n@@ -1675,7 +1072,6 @@ static int kbase_api_tlstream_stats(struct kbase_context *kctx,\n \t} while (0)\n \n #define KBASE_HANDLE_IOCTL_INOUT(cmd, function, type)                  \\\n-\tcase cmd:                                                      \\\n \tdo {                                                           \\\n \t\ttype param;                                            \\\n \t\tint ret, err;                                          \\\n@@ -1697,28 +1093,19 @@ static long kbase_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)\n \tstruct kbase_device *kbdev = kctx->kbdev;\n \tvoid __user *uarg = (void __user *)arg;\n \n-\t/* The UK ioctl values overflow the cmd field causing the type to be\n-\t * incremented\n-\t */\n-\tif (_IOC_TYPE(cmd) == LINUX_UK_BASE_MAGIC+2)\n-\t\treturn kbase_legacy_ioctl(filp, cmd, arg);\n-\n-\t/* The UK version check IOCTL doesn't overflow the cmd field, so is\n-\t * handled separately here\n-\t */\n-\tif (cmd == _IOC(_IOC_READ|_IOC_WRITE, LINUX_UK_BASE_MAGIC,\n-\t\t\t\tUKP_FUNC_ID_CHECK_VERSION,\n-\t\t\t\tsizeof(struct uku_version_check_args)))\n-\t\treturn kbase_legacy_ioctl(filp, cmd, arg);\n-\n \t/* Only these ioctls are available until setup is complete */\n \tswitch (cmd) {\n+\tcase KBASE_IOCTL_VERSION_CHECK:\n \t\tKBASE_HANDLE_IOCTL_INOUT(KBASE_IOCTL_VERSION_CHECK,\n \t\t\t\tkbase_api_handshake,\n \t\t\t\tstruct kbase_ioctl_version_check);\n+\t\tbreak;\n+\n+\tcase KBASE_IOCTL_SET_FLAGS:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_SET_FLAGS,\n \t\t\t\tkbase_api_set_flags,\n \t\t\t\tstruct kbase_ioctl_set_flags);\n+\t\tbreak;\n \t}\n \n \t/* Block call until version handshake and setup is complete */\n@@ -1727,91 +1114,192 @@ static long kbase_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)\n \n \t/* Normal ioctls */\n \tswitch (cmd) {\n+\tcase KBASE_IOCTL_JOB_SUBMIT:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_JOB_SUBMIT,\n \t\t\t\tkbase_api_job_submit,\n \t\t\t\tstruct kbase_ioctl_job_submit);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_GET_GPUPROPS:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_GET_GPUPROPS,\n \t\t\t\tkbase_api_get_gpuprops,\n \t\t\t\tstruct kbase_ioctl_get_gpuprops);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_POST_TERM:\n \t\tKBASE_HANDLE_IOCTL(KBASE_IOCTL_POST_TERM,\n \t\t\t\tkbase_api_post_term);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_MEM_ALLOC:\n \t\tKBASE_HANDLE_IOCTL_INOUT(KBASE_IOCTL_MEM_ALLOC,\n \t\t\t\tkbase_api_mem_alloc,\n \t\t\t\tunion kbase_ioctl_mem_alloc);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_MEM_QUERY:\n \t\tKBASE_HANDLE_IOCTL_INOUT(KBASE_IOCTL_MEM_QUERY,\n \t\t\t\tkbase_api_mem_query,\n \t\t\t\tunion kbase_ioctl_mem_query);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_MEM_FREE:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_MEM_FREE,\n \t\t\t\tkbase_api_mem_free,\n \t\t\t\tstruct kbase_ioctl_mem_free);\n-\t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_HWCNT_READER_SETUP,\n-\t\t\t\tkbase_api_hwcnt_reader_setup,\n-\t\t\t\tstruct kbase_ioctl_hwcnt_reader_setup);\n-\t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_HWCNT_ENABLE,\n-\t\t\t\tkbase_api_hwcnt_enable,\n-\t\t\t\tstruct kbase_ioctl_hwcnt_enable);\n-\t\tKBASE_HANDLE_IOCTL(KBASE_IOCTL_HWCNT_DUMP,\n-\t\t\t\tkbase_api_hwcnt_dump);\n-\t\tKBASE_HANDLE_IOCTL(KBASE_IOCTL_HWCNT_CLEAR,\n-\t\t\t\tkbase_api_hwcnt_clear);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_DISJOINT_QUERY:\n \t\tKBASE_HANDLE_IOCTL_OUT(KBASE_IOCTL_DISJOINT_QUERY,\n \t\t\t\tkbase_api_disjoint_query,\n \t\t\t\tstruct kbase_ioctl_disjoint_query);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_GET_DDK_VERSION:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_GET_DDK_VERSION,\n \t\t\t\tkbase_api_get_ddk_version,\n \t\t\t\tstruct kbase_ioctl_get_ddk_version);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_MEM_JIT_INIT_OLD:\n+\t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_MEM_JIT_INIT_OLD,\n+\t\t\t\tkbase_api_mem_jit_init_old,\n+\t\t\t\tstruct kbase_ioctl_mem_jit_init_old);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_MEM_JIT_INIT:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_MEM_JIT_INIT,\n \t\t\t\tkbase_api_mem_jit_init,\n \t\t\t\tstruct kbase_ioctl_mem_jit_init);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_MEM_SYNC:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_MEM_SYNC,\n \t\t\t\tkbase_api_mem_sync,\n \t\t\t\tstruct kbase_ioctl_mem_sync);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_MEM_FIND_CPU_OFFSET:\n \t\tKBASE_HANDLE_IOCTL_INOUT(KBASE_IOCTL_MEM_FIND_CPU_OFFSET,\n \t\t\t\tkbase_api_mem_find_cpu_offset,\n \t\t\t\tunion kbase_ioctl_mem_find_cpu_offset);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_MEM_FIND_GPU_START_AND_OFFSET:\n+\t\tKBASE_HANDLE_IOCTL_INOUT(KBASE_IOCTL_MEM_FIND_GPU_START_AND_OFFSET,\n+\t\t\t\tkbase_api_mem_find_gpu_start_and_offset,\n+\t\t\t\tunion kbase_ioctl_mem_find_gpu_start_and_offset);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_GET_CONTEXT_ID:\n \t\tKBASE_HANDLE_IOCTL_OUT(KBASE_IOCTL_GET_CONTEXT_ID,\n \t\t\t\tkbase_api_get_context_id,\n \t\t\t\tstruct kbase_ioctl_get_context_id);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_TLSTREAM_ACQUIRE:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_TLSTREAM_ACQUIRE,\n \t\t\t\tkbase_api_tlstream_acquire,\n \t\t\t\tstruct kbase_ioctl_tlstream_acquire);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_TLSTREAM_FLUSH:\n \t\tKBASE_HANDLE_IOCTL(KBASE_IOCTL_TLSTREAM_FLUSH,\n \t\t\t\tkbase_api_tlstream_flush);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_MEM_COMMIT:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_MEM_COMMIT,\n \t\t\t\tkbase_api_mem_commit,\n \t\t\t\tstruct kbase_ioctl_mem_commit);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_MEM_ALIAS:\n \t\tKBASE_HANDLE_IOCTL_INOUT(KBASE_IOCTL_MEM_ALIAS,\n \t\t\t\tkbase_api_mem_alias,\n \t\t\t\tunion kbase_ioctl_mem_alias);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_MEM_IMPORT:\n \t\tKBASE_HANDLE_IOCTL_INOUT(KBASE_IOCTL_MEM_IMPORT,\n \t\t\t\tkbase_api_mem_import,\n \t\t\t\tunion kbase_ioctl_mem_import);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_MEM_FLAGS_CHANGE:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_MEM_FLAGS_CHANGE,\n \t\t\t\tkbase_api_mem_flags_change,\n \t\t\t\tstruct kbase_ioctl_mem_flags_change);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_STREAM_CREATE:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_STREAM_CREATE,\n \t\t\t\tkbase_api_stream_create,\n \t\t\t\tstruct kbase_ioctl_stream_create);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_FENCE_VALIDATE:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_FENCE_VALIDATE,\n \t\t\t\tkbase_api_fence_validate,\n \t\t\t\tstruct kbase_ioctl_fence_validate);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_GET_PROFILING_CONTROLS:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_GET_PROFILING_CONTROLS,\n \t\t\t\tkbase_api_get_profiling_controls,\n \t\t\t\tstruct kbase_ioctl_get_profiling_controls);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_MEM_PROFILE_ADD:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_MEM_PROFILE_ADD,\n \t\t\t\tkbase_api_mem_profile_add,\n \t\t\t\tstruct kbase_ioctl_mem_profile_add);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_SOFT_EVENT_UPDATE:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_SOFT_EVENT_UPDATE,\n \t\t\t\tkbase_api_soft_event_update,\n \t\t\t\tstruct kbase_ioctl_soft_event_update);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_STICKY_RESOURCE_MAP:\n+\t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_STICKY_RESOURCE_MAP,\n+\t\t\t\tkbase_api_sticky_resource_map,\n+\t\t\t\tstruct kbase_ioctl_sticky_resource_map);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_STICKY_RESOURCE_UNMAP:\n+\t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_STICKY_RESOURCE_UNMAP,\n+\t\t\t\tkbase_api_sticky_resource_unmap,\n+\t\t\t\tstruct kbase_ioctl_sticky_resource_unmap);\n+\t\tbreak;\n \n+\t/* Instrumentation. */\n+\tcase KBASE_IOCTL_HWCNT_READER_SETUP:\n+\t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_HWCNT_READER_SETUP,\n+\t\t\t\tkbase_api_hwcnt_reader_setup,\n+\t\t\t\tstruct kbase_ioctl_hwcnt_reader_setup);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_HWCNT_ENABLE:\n+\t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_HWCNT_ENABLE,\n+\t\t\t\tkbase_api_hwcnt_enable,\n+\t\t\t\tstruct kbase_ioctl_hwcnt_enable);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_HWCNT_DUMP:\n+\t\tKBASE_HANDLE_IOCTL(KBASE_IOCTL_HWCNT_DUMP,\n+\t\t\t\tkbase_api_hwcnt_dump);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_HWCNT_CLEAR:\n+\t\tKBASE_HANDLE_IOCTL(KBASE_IOCTL_HWCNT_CLEAR,\n+\t\t\t\tkbase_api_hwcnt_clear);\n+\t\tbreak;\n+#ifdef CONFIG_MALI_BIFROST_NO_MALI\n+\tcase KBASE_IOCTL_HWCNT_SET:\n+\t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_HWCNT_SET,\n+\t\t\t\tkbase_api_hwcnt_set,\n+\t\t\t\tstruct kbase_ioctl_hwcnt_values);\n+\t\tbreak;\n+#endif\n+#ifdef CONFIG_MALI_JOB_DUMP\n+\tcase KBASE_IOCTL_CINSTR_GWT_START:\n+\t\tKBASE_HANDLE_IOCTL(KBASE_IOCTL_CINSTR_GWT_START,\n+\t\t\t\tkbase_gpu_gwt_start);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_CINSTR_GWT_STOP:\n+\t\tKBASE_HANDLE_IOCTL(KBASE_IOCTL_CINSTR_GWT_STOP,\n+\t\t\t\tkbase_gpu_gwt_stop);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_CINSTR_GWT_DUMP:\n+\t\tKBASE_HANDLE_IOCTL_INOUT(KBASE_IOCTL_CINSTR_GWT_DUMP,\n+\t\t\t\tkbase_gpu_gwt_dump,\n+\t\t\t\tunion kbase_ioctl_cinstr_gwt_dump);\n+\t\tbreak;\n+#endif\n #if MALI_UNIT_TEST\n+\tcase KBASE_IOCTL_TLSTREAM_TEST:\n \t\tKBASE_HANDLE_IOCTL_IN(KBASE_IOCTL_TLSTREAM_TEST,\n \t\t\t\tkbase_api_tlstream_test,\n \t\t\t\tstruct kbase_ioctl_tlstream_test);\n+\t\tbreak;\n+\tcase KBASE_IOCTL_TLSTREAM_STATS:\n \t\tKBASE_HANDLE_IOCTL_OUT(KBASE_IOCTL_TLSTREAM_STATS,\n \t\t\t\tkbase_api_tlstream_stats,\n \t\t\t\tstruct kbase_ioctl_tlstream_stats);\n+\t\tbreak;\n #endif\n \t}\n \n@@ -1890,242 +1378,6 @@ static int kbase_check_flags(int flags)\n \treturn 0;\n }\n \n-\n-/**\n- * align_and_check - Align the specified pointer to the provided alignment and\n- *                   check that it is still in range.\n- * @gap_end:        Highest possible start address for allocation (end of gap in\n- *                  address space)\n- * @gap_start:      Start address of current memory area / gap in address space\n- * @info:           vm_unmapped_area_info structure passed to caller, containing\n- *                  alignment, length and limits for the allocation\n- * @is_shader_code: True if the allocation is for shader code (which has\n- *                  additional alignment requirements)\n- *\n- * Return: true if gap_end is now aligned correctly and is still in range,\n- *         false otherwise\n- */\n-static bool align_and_check(unsigned long *gap_end, unsigned long gap_start,\n-\t\tstruct vm_unmapped_area_info *info, bool is_shader_code)\n-{\n-\t/* Compute highest gap address at the desired alignment */\n-\t(*gap_end) -= info->length;\n-\t(*gap_end) -= (*gap_end - info->align_offset) & info->align_mask;\n-\n-\tif (is_shader_code) {\n-\t\t/* Check for 4GB boundary */\n-\t\tif (0 == (*gap_end & BASE_MEM_MASK_4GB))\n-\t\t\t(*gap_end) -= (info->align_offset ? info->align_offset :\n-\t\t\t\t\tinfo->length);\n-\t\tif (0 == ((*gap_end + info->length) & BASE_MEM_MASK_4GB))\n-\t\t\t(*gap_end) -= (info->align_offset ? info->align_offset :\n-\t\t\t\t\tinfo->length);\n-\n-\t\tif (!(*gap_end & BASE_MEM_MASK_4GB) || !((*gap_end +\n-\t\t\t\tinfo->length) & BASE_MEM_MASK_4GB))\n-\t\t\treturn false;\n-\t}\n-\n-\n-\tif ((*gap_end < info->low_limit) || (*gap_end < gap_start))\n-\t\treturn false;\n-\n-\n-\treturn true;\n-}\n-\n-/* The following function is taken from the kernel and just\n- * renamed. As it's not exported to modules we must copy-paste it here.\n- */\n-\n-static unsigned long kbase_unmapped_area_topdown(struct vm_unmapped_area_info\n-\t\t*info, bool is_shader_code)\n-{\n-\tstruct mm_struct *mm = current->mm;\n-\tstruct vm_area_struct *vma;\n-\tunsigned long length, low_limit, high_limit, gap_start, gap_end;\n-\n-\t/* Adjust search length to account for worst case alignment overhead */\n-\tlength = info->length + info->align_mask;\n-\tif (length < info->length)\n-\t\treturn -ENOMEM;\n-\n-\t/*\n-\t * Adjust search limits by the desired length.\n-\t * See implementation comment at top of unmapped_area().\n-\t */\n-\tgap_end = info->high_limit;\n-\tif (gap_end < length)\n-\t\treturn -ENOMEM;\n-\thigh_limit = gap_end - length;\n-\n-\tif (info->low_limit > high_limit)\n-\t\treturn -ENOMEM;\n-\tlow_limit = info->low_limit + length;\n-\n-\t/* Check highest gap, which does not precede any rbtree node */\n-\tgap_start = mm->highest_vm_end;\n-\tif (gap_start <= high_limit) {\n-\t\tif (align_and_check(&gap_end, gap_start, info, is_shader_code))\n-\t\t\treturn gap_end;\n-\t}\n-\n-\t/* Check if rbtree root looks promising */\n-\tif (RB_EMPTY_ROOT(&mm->mm_rb))\n-\t\treturn -ENOMEM;\n-\tvma = rb_entry(mm->mm_rb.rb_node, struct vm_area_struct, vm_rb);\n-\tif (vma->rb_subtree_gap < length)\n-\t\treturn -ENOMEM;\n-\n-\twhile (true) {\n-\t\t/* Visit right subtree if it looks promising */\n-\t\tgap_start = vma->vm_prev ? vma->vm_prev->vm_end : 0;\n-\t\tif (gap_start <= high_limit && vma->vm_rb.rb_right) {\n-\t\t\tstruct vm_area_struct *right =\n-\t\t\t\trb_entry(vma->vm_rb.rb_right,\n-\t\t\t\t\t struct vm_area_struct, vm_rb);\n-\t\t\tif (right->rb_subtree_gap >= length) {\n-\t\t\t\tvma = right;\n-\t\t\t\tcontinue;\n-\t\t\t}\n-\t\t}\n-\n-check_current:\n-\t\t/* Check if current node has a suitable gap */\n-\t\tgap_end = vma->vm_start;\n-\t\tif (gap_end < low_limit)\n-\t\t\treturn -ENOMEM;\n-\t\tif (gap_start <= high_limit && gap_end - gap_start >= length) {\n-\t\t\t/* We found a suitable gap. Clip it with the original\n-\t\t\t * high_limit. */\n-\t\t\tif (gap_end > info->high_limit)\n-\t\t\t\tgap_end = info->high_limit;\n-\n-\t\t\tif (align_and_check(&gap_end, gap_start, info,\n-\t\t\t\t\tis_shader_code))\n-\t\t\t\treturn gap_end;\n-\t\t}\n-\n-\t\t/* Visit left subtree if it looks promising */\n-\t\tif (vma->vm_rb.rb_left) {\n-\t\t\tstruct vm_area_struct *left =\n-\t\t\t\trb_entry(vma->vm_rb.rb_left,\n-\t\t\t\t\t struct vm_area_struct, vm_rb);\n-\t\t\tif (left->rb_subtree_gap >= length) {\n-\t\t\t\tvma = left;\n-\t\t\t\tcontinue;\n-\t\t\t}\n-\t\t}\n-\n-\t\t/* Go back up the rbtree to find next candidate node */\n-\t\twhile (true) {\n-\t\t\tstruct rb_node *prev = &vma->vm_rb;\n-\t\t\tif (!rb_parent(prev))\n-\t\t\t\treturn -ENOMEM;\n-\t\t\tvma = rb_entry(rb_parent(prev),\n-\t\t\t\t       struct vm_area_struct, vm_rb);\n-\t\t\tif (prev == vma->vm_rb.rb_right) {\n-\t\t\t\tgap_start = vma->vm_prev ?\n-\t\t\t\t\tvma->vm_prev->vm_end : 0;\n-\t\t\t\tgoto check_current;\n-\t\t\t}\n-\t\t}\n-\t}\n-\n-\treturn -ENOMEM;\n-}\n-\n-static unsigned long kbase_get_unmapped_area(struct file *filp,\n-\t\tconst unsigned long addr, const unsigned long len,\n-\t\tconst unsigned long pgoff, const unsigned long flags)\n-{\n-\t/* based on get_unmapped_area, but simplified slightly due to that some\n-\t * values are known in advance */\n-\tstruct kbase_context *kctx = filp->private_data;\n-\tstruct mm_struct *mm = current->mm;\n-\tstruct vm_unmapped_area_info info;\n-\tunsigned long align_offset = 0;\n-\tunsigned long align_mask = 0;\n-\tunsigned long high_limit = mm->mmap_base;\n-\tunsigned long low_limit = PAGE_SIZE;\n-\tint cpu_va_bits = BITS_PER_LONG;\n-\tint gpu_pc_bits =\n-\t      kctx->kbdev->gpu_props.props.core_props.log2_program_counter_size;\n-\tbool is_shader_code = false;\n-\tunsigned long ret;\n-\n-\t/* err on fixed address */\n-\tif ((flags & MAP_FIXED) || addr)\n-\t\treturn -EINVAL;\n-\n-#ifdef CONFIG_64BIT\n-\t/* too big? */\n-\tif (len > TASK_SIZE - SZ_2M)\n-\t\treturn -ENOMEM;\n-\n-\tif (!kbase_ctx_flag(kctx, KCTX_COMPAT)) {\n-\n-\t\tif (kbase_hw_has_feature(kctx->kbdev,\n-\t\t\t\t\t\tBASE_HW_FEATURE_33BIT_VA)) {\n-\t\t\thigh_limit = kctx->same_va_end << PAGE_SHIFT;\n-\t\t} else {\n-\t\t\thigh_limit = min_t(unsigned long, mm->mmap_base,\n-\t\t\t\t\t(kctx->same_va_end << PAGE_SHIFT));\n-\t\t\tif (len >= SZ_2M) {\n-\t\t\t\talign_offset = SZ_2M;\n-\t\t\t\talign_mask = SZ_2M - 1;\n-\t\t\t}\n-\t\t}\n-\n-\t\tlow_limit = SZ_2M;\n-\t} else {\n-\t\tcpu_va_bits = 32;\n-\t}\n-#endif /* CONFIG_64BIT */\n-\tif ((PFN_DOWN(BASE_MEM_COOKIE_BASE) <= pgoff) &&\n-\t\t(PFN_DOWN(BASE_MEM_FIRST_FREE_ADDRESS) > pgoff)) {\n-\t\t\tint cookie = pgoff - PFN_DOWN(BASE_MEM_COOKIE_BASE);\n-\n-\t\t\tif (!kctx->pending_regions[cookie])\n-\t\t\t\treturn -EINVAL;\n-\n-\t\t\tif (!(kctx->pending_regions[cookie]->flags &\n-\t\t\t\t\t\t\tKBASE_REG_GPU_NX)) {\n-\t\t\t\tif (cpu_va_bits > gpu_pc_bits) {\n-\t\t\t\t\talign_offset = 1ULL << gpu_pc_bits;\n-\t\t\t\t\talign_mask = align_offset - 1;\n-\t\t\t\t\tis_shader_code = true;\n-\t\t\t\t}\n-\t\t\t}\n-#ifndef CONFIG_64BIT\n-\t} else {\n-\t\treturn current->mm->get_unmapped_area(filp, addr, len, pgoff,\n-\t\t\t\t\t\t      flags);\n-#endif\n-\t}\n-\n-\tinfo.flags = 0;\n-\tinfo.length = len;\n-\tinfo.low_limit = low_limit;\n-\tinfo.high_limit = high_limit;\n-\tinfo.align_offset = align_offset;\n-\tinfo.align_mask = align_mask;\n-\n-\tret = kbase_unmapped_area_topdown(&info, is_shader_code);\n-\n-\tif (IS_ERR_VALUE(ret) && high_limit == mm->mmap_base &&\n-\t\t\thigh_limit < (kctx->same_va_end << PAGE_SHIFT)) {\n-\t\t/* Retry above mmap_base */\n-\t\tinfo.low_limit = mm->mmap_base;\n-\t\tinfo.high_limit = min_t(u64, TASK_SIZE,\n-\t\t\t\t\t(kctx->same_va_end << PAGE_SHIFT));\n-\n-\t\tret = kbase_unmapped_area_topdown(&info, is_shader_code);\n-\t}\n-\n-\treturn ret;\n-}\n-\n static const struct file_operations kbase_fops = {\n \t.owner = THIS_MODULE,\n \t.open = kbase_open,\n@@ -2139,18 +1391,6 @@ static const struct file_operations kbase_fops = {\n \t.get_unmapped_area = kbase_get_unmapped_area,\n };\n \n-#ifndef CONFIG_MALI_BIFROST_NO_MALI\n-void kbase_os_reg_write(struct kbase_device *kbdev, u16 offset, u32 value)\n-{\n-\twritel(value, kbdev->reg + offset);\n-}\n-\n-u32 kbase_os_reg_read(struct kbase_device *kbdev, u16 offset)\n-{\n-\treturn readl(kbdev->reg + offset);\n-}\n-#endif /* !CONFIG_MALI_BIFROST_NO_MALI */\n-\n /**\n  * show_policy - Show callback for the power_policy sysfs file.\n  *\n@@ -3170,8 +2410,12 @@ static ssize_t kbase_show_gpuinfo(struct device *dev,\n \t\t  .name = \"Mali-G72\" },\n \t\t{ .id = GPU_ID2_PRODUCT_TSIX >> GPU_ID_VERSION_PRODUCT_ID_SHIFT,\n \t\t  .name = \"Mali-G51\" },\n+\t\t{ .id = GPU_ID2_PRODUCT_TNOX >> GPU_ID_VERSION_PRODUCT_ID_SHIFT,\n+\t\t  .name = \"Mali-TNOx\" },\n \t\t{ .id = GPU_ID2_PRODUCT_TDVX >> GPU_ID_VERSION_PRODUCT_ID_SHIFT,\n \t\t  .name = \"Mali-G31\" },\n+\t\t{ .id = GPU_ID2_PRODUCT_TGOX >> GPU_ID_VERSION_PRODUCT_ID_SHIFT,\n+\t\t  .name = \"Mali-G52\" },\n \t};\n \tconst char *product_name = \"(Unknown Mali GPU)\";\n \tstruct kbase_device *kbdev;\n@@ -3204,7 +2448,7 @@ static ssize_t kbase_show_gpuinfo(struct device *dev,\n \t\t}\n \t}\n \n-\treturn scnprintf(buf, PAGE_SIZE, \"%s %d cores 2EE r%dp%d 0x%04X\\n\",\n+\treturn scnprintf(buf, PAGE_SIZE, \"%s %d cores r%dp%d 0x%04X\\n\",\n \t\tproduct_name, kbdev->gpu_props.num_cores,\n \t\t(gpu_id & GPU_ID_VERSION_MAJOR) >> GPU_ID_VERSION_MAJOR_SHIFT,\n \t\t(gpu_id & GPU_ID_VERSION_MINOR) >> GPU_ID_VERSION_MINOR_SHIFT,\n@@ -3611,6 +2855,88 @@ static ssize_t set_lp_mem_pool_max_size(struct device *dev,\n static DEVICE_ATTR(lp_mem_pool_max_size, S_IRUGO | S_IWUSR, show_lp_mem_pool_max_size,\n \t\tset_lp_mem_pool_max_size);\n \n+/**\n+ * show_js_ctx_scheduling_mode - Show callback for js_ctx_scheduling_mode sysfs\n+ *                               entry.\n+ * @dev:  The device this sysfs file is for.\n+ * @attr: The attributes of the sysfs file.\n+ * @buf:  The output buffer to receive the context scheduling mode information.\n+ *\n+ * This function is called to get the context scheduling mode being used by JS.\n+ *\n+ * Return: The number of bytes output to @buf.\n+ */\n+static ssize_t show_js_ctx_scheduling_mode(struct device *dev,\n+\t\tstruct device_attribute *attr, char * const buf)\n+{\n+\tstruct kbase_device *kbdev;\n+\n+\tkbdev = to_kbase_device(dev);\n+\tif (!kbdev)\n+\t\treturn -ENODEV;\n+\n+\treturn scnprintf(buf, PAGE_SIZE, \"%u\\n\", kbdev->js_ctx_scheduling_mode);\n+}\n+\n+/**\n+ * set_js_ctx_scheduling_mode - Set callback for js_ctx_scheduling_mode sysfs\n+ *                              entry.\n+ * @dev:   The device this sysfs file is for.\n+ * @attr:  The attributes of the sysfs file.\n+ * @buf:   The value written to the sysfs file.\n+ * @count: The number of bytes written to the sysfs file.\n+ *\n+ * This function is called when the js_ctx_scheduling_mode sysfs file is written\n+ * to. It checks the data written, and if valid updates the ctx scheduling mode\n+ * being by JS.\n+ *\n+ * Return: @count if the function succeeded. An error code on failure.\n+ */\n+static ssize_t set_js_ctx_scheduling_mode(struct device *dev,\n+\t\tstruct device_attribute *attr, const char *buf, size_t count)\n+{\n+\tstruct kbasep_kctx_list_element *element;\n+\tu32 new_js_ctx_scheduling_mode;\n+\tstruct kbase_device *kbdev;\n+\tunsigned long flags;\n+\tint ret;\n+\n+\tkbdev = to_kbase_device(dev);\n+\tif (!kbdev)\n+\t\treturn -ENODEV;\n+\n+\tret = kstrtouint(buf, 0, &new_js_ctx_scheduling_mode);\n+\tif (ret || new_js_ctx_scheduling_mode >= KBASE_JS_PRIORITY_MODE_COUNT) {\n+\t\tdev_err(kbdev->dev, \"Couldn't process js_ctx_scheduling_mode\"\n+\t\t\t\t\" write operation.\\n\"\n+\t\t\t\t\"Use format <js_ctx_scheduling_mode>\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (new_js_ctx_scheduling_mode == kbdev->js_ctx_scheduling_mode)\n+\t\treturn count;\n+\n+\tmutex_lock(&kbdev->kctx_list_lock);\n+\tspin_lock_irqsave(&kbdev->hwaccess_lock, flags);\n+\n+\t/* Update the context priority mode */\n+\tkbdev->js_ctx_scheduling_mode = new_js_ctx_scheduling_mode;\n+\n+\t/* Adjust priority of all the contexts as per the new mode */\n+\tlist_for_each_entry(element, &kbdev->kctx_list, link)\n+\t\tkbase_js_update_ctx_priority(element->kctx);\n+\n+\tspin_unlock_irqrestore(&kbdev->hwaccess_lock, flags);\n+\tmutex_unlock(&kbdev->kctx_list_lock);\n+\n+\tdev_dbg(kbdev->dev, \"JS ctx scheduling mode: %u\\n\", new_js_ctx_scheduling_mode);\n+\n+\treturn count;\n+}\n+\n+static DEVICE_ATTR(js_ctx_scheduling_mode, S_IRUGO | S_IWUSR,\n+\t\tshow_js_ctx_scheduling_mode,\n+\t\tset_js_ctx_scheduling_mode);\n #ifdef CONFIG_DEBUG_FS\n \n /* Number of entries in serialize_jobs_settings[] */\n@@ -3908,7 +3234,7 @@ static int power_control_init(struct platform_device *pdev)\n \t}\n #endif /* LINUX_VERSION_CODE >= 3, 12, 0 */\n \n-\tkbdev->clock = clk_get(kbdev->dev, \"clk_mali\");\n+\tkbdev->clock = of_clk_get(kbdev->dev->of_node, 0);\n \tif (IS_ERR_OR_NULL(kbdev->clock)) {\n \t\terr = PTR_ERR(kbdev->clock);\n \t\tkbdev->clock = NULL;\n@@ -4260,6 +3586,7 @@ static struct attribute *kbase_attrs[] = {\n \t&dev_attr_mem_pool_max_size.attr,\n \t&dev_attr_lp_mem_pool_size.attr,\n \t&dev_attr_lp_mem_pool_max_size.attr,\n+\t&dev_attr_js_ctx_scheduling_mode.attr,\n \tNULL\n };\n \n@@ -4316,10 +3643,6 @@ static int kbase_platform_device_remove(struct platform_device *pdev)\n \t\tkbase_debug_job_fault_dev_term(kbdev);\n \t\tkbdev->inited_subsys &= ~inited_job_fault;\n \t}\n-\tif (kbdev->inited_subsys & inited_vinstr) {\n-\t\tkbase_vinstr_term(kbdev->vinstr_ctx);\n-\t\tkbdev->inited_subsys &= ~inited_vinstr;\n-\t}\n \n #ifdef CONFIG_MALI_BIFROST_DEVFREQ\n \tif (kbdev->inited_subsys & inited_devfreq) {\n@@ -4328,6 +3651,11 @@ static int kbase_platform_device_remove(struct platform_device *pdev)\n \t}\n #endif\n \n+\tif (kbdev->inited_subsys & inited_vinstr) {\n+\t\tkbase_vinstr_term(kbdev->vinstr_ctx);\n+\t\tkbdev->inited_subsys &= ~inited_vinstr;\n+\t}\n+\n \tif (kbdev->inited_subsys & inited_backend_late) {\n \t\tkbase_backend_late_term(kbdev);\n \t\tkbdev->inited_subsys &= ~inited_backend_late;\n@@ -4361,11 +3689,6 @@ static int kbase_platform_device_remove(struct platform_device *pdev)\n \t\tkbdev->inited_subsys &= ~inited_mem;\n \t}\n \n-\tif (kbdev->inited_subsys & inited_pm_runtime_init) {\n-\t\tkbdev->pm.callback_power_runtime_term(kbdev);\n-\t\tkbdev->inited_subsys &= ~inited_pm_runtime_init;\n-\t}\n-\n \tif (kbdev->inited_subsys & inited_ctx_sched) {\n \t\tkbase_ctx_sched_term(kbdev);\n \t\tkbdev->inited_subsys &= ~inited_ctx_sched;\n@@ -4425,14 +3748,6 @@ static int kbase_platform_device_probe(struct platform_device *pdev)\n \tconst struct list_head *dev_list;\n \tint err = 0;\n \n-#ifdef CONFIG_OF\n-\terr = kbase_platform_early_init();\n-\tif (err) {\n-\t\tdev_err(&pdev->dev, \"Early platform initialization failed\\n\");\n-\t\tkbase_platform_device_remove(pdev);\n-\t\treturn err;\n-\t}\n-#endif\n \tkbdev = kbase_device_alloc();\n \tif (!kbdev) {\n \t\tdev_err(&pdev->dev, \"Allocate device failed\\n\");\n@@ -4498,10 +3813,15 @@ static int kbase_platform_device_probe(struct platform_device *pdev)\n \n \tkbase_disjoint_init(kbdev);\n \n-\t/* obtain min/max configured gpu frequencies */\n+\t/* obtain max configured gpu frequency, if devfreq is enabled then\n+\t * this will be overridden by the highest operating point found\n+\t */\n \tcore_props = &(kbdev->gpu_props.props.core_props);\n-\tcore_props->gpu_freq_khz_min = GPU_FREQ_KHZ_MIN;\n+#ifdef GPU_FREQ_KHZ_MAX\n \tcore_props->gpu_freq_khz_max = GPU_FREQ_KHZ_MAX;\n+#else\n+\tcore_props->gpu_freq_khz_max = DEFAULT_GPU_FREQ_KHZ_MAX;\n+#endif\n \n \terr = kbase_device_init(kbdev);\n \tif (err) {\n@@ -4520,17 +3840,6 @@ static int kbase_platform_device_probe(struct platform_device *pdev)\n \t}\n \tkbdev->inited_subsys |= inited_ctx_sched;\n \n-\tif (kbdev->pm.callback_power_runtime_init) {\n-\t\terr = kbdev->pm.callback_power_runtime_init(kbdev);\n-\t\tif (err) {\n-\t\t\tdev_err(kbdev->dev,\n-\t\t\t\t\"Runtime PM initialization failed\\n\");\n-\t\t\tkbase_platform_device_remove(pdev);\n-\t\t\treturn err;\n-\t\t}\n-\t\tkbdev->inited_subsys |= inited_pm_runtime_init;\n-\t}\n-\n \terr = kbase_mem_init(kbdev);\n \tif (err) {\n \t\tdev_err(kbdev->dev, \"Memory subsystem initialization failed\\n\");\n@@ -4624,6 +3933,7 @@ static int kbase_platform_device_probe(struct platform_device *pdev)\n \tkbdev->mdev.name = kbdev->devname;\n \tkbdev->mdev.fops = &kbase_fops;\n \tkbdev->mdev.parent = get_device(kbdev->dev);\n+\tkbdev->mdev.mode = 0666;\n \tkbdev->inited_subsys |= inited_get_device;\n \n \t/* This needs to happen before registering the device with misc_register(),\n@@ -4877,10 +4187,6 @@ static int __init kbase_driver_init(void)\n {\n \tint ret;\n \n-\tret = kbase_platform_early_init();\n-\tif (ret)\n-\t\treturn ret;\n-\n \tret = kbase_platform_register();\n \tif (ret)\n \t\treturn ret;\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_ctx_sched.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_ctx_sched.c\nindex e2f7baabad43fd..85a6afdb4ef345 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_ctx_sched.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_ctx_sched.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <mali_kbase.h>\n #include <mali_kbase_config_defaults.h>\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_ctx_sched.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_ctx_sched.h\nindex 2330d48c8e519f..ab57a0dc1ca8b0 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_ctx_sched.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_ctx_sched.h\n@@ -1,26 +1,32 @@\n /*\n  *\n- * (C) COPYRIGHT 2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2017-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_CTX_SCHED_H_\n #define _KBASE_CTX_SCHED_H_\n \n #include <mali_kbase.h>\n \n-/* The Context Scheduler manages address space assignment and reference\n+/**\n+ * The Context Scheduler manages address space assignment and reference\n  * counting to kbase_context. The interface has been designed to minimise\n  * interactions between the Job Scheduler and Power Management/MMU to support\n  * the existing Job Scheduler interface.\n@@ -28,41 +34,36 @@\n  * The initial implementation of the Context Scheduler does not schedule\n  * contexts. Instead it relies on the Job Scheduler to make decisions of\n  * when to schedule/evict contexts if address spaces are starved. In the\n- * future, once an interface between the CS and JS have been devised to\n+ * future, once an interface between the CS and JS has been devised to\n  * provide enough information about how each context is consuming GPU resources,\n  * those decisions can be made in the CS itself, thereby reducing duplicated\n  * code.\n  */\n \n-/* base_ctx_sched_init - Initialise the context scheduler\n+/**\n+ * kbase_ctx_sched_init - Initialise the context scheduler\n+ * @kbdev: The device for which the context scheduler needs to be initialised\n  *\n- * @kbdev: The device for which the context scheduler needs to be\n- *         initialised\n+ * This must be called during device initialisation. The number of hardware\n+ * address spaces must already be established before calling this function.\n  *\n  * Return: 0 for success, otherwise failure\n- *\n- * This must be called during device initilisation. The number of hardware\n- * address spaces must already be established before calling this function.\n  */\n int kbase_ctx_sched_init(struct kbase_device *kbdev);\n \n-/* base_ctx_sched_term - Terminate the context scheduler\n- *\n- * @kbdev: The device for which the context scheduler needs to be\n- *         terminated\n+/**\n+ * kbase_ctx_sched_term - Terminate the context scheduler\n+ * @kbdev: The device for which the context scheduler needs to be terminated\n  *\n  * This must be called during device termination after all contexts have been\n  * destroyed.\n  */\n void kbase_ctx_sched_term(struct kbase_device *kbdev);\n \n-/* kbase_ctx_sched_retain_ctx - Retain a reference to the @ref kbase_context\n- *\n+/**\n+ * kbase_ctx_sched_retain_ctx - Retain a reference to the @ref kbase_context\n  * @kctx: The context to which to retain a reference\n  *\n- * Return: The address space that the context has been assigned to or\n- *         KBASEP_AS_NR_INVALID if no address space was available.\n- *\n  * This function should be called whenever an address space should be assigned\n  * to a context and programmed onto the MMU. It should typically be called\n  * when jobs are ready to be submitted to the GPU.\n@@ -72,11 +73,14 @@ void kbase_ctx_sched_term(struct kbase_device *kbdev);\n  *\n  * The kbase_device::mmu_hw_mutex and kbase_device::hwaccess_lock locks must be\n  * held whilst calling this function.\n+ *\n+ * Return: The address space that the context has been assigned to or\n+ *         KBASEP_AS_NR_INVALID if no address space was available.\n  */\n int kbase_ctx_sched_retain_ctx(struct kbase_context *kctx);\n \n-/* kbase_ctx_sched_retain_ctx_refcount\n- *\n+/**\n+ * kbase_ctx_sched_retain_ctx_refcount\n  * @kctx: The context to which to retain a reference\n  *\n  * This function only retains a reference to the context. It must be called\n@@ -90,8 +94,8 @@ int kbase_ctx_sched_retain_ctx(struct kbase_context *kctx);\n  */\n void kbase_ctx_sched_retain_ctx_refcount(struct kbase_context *kctx);\n \n-/* kbase_ctx_sched_release_ctx - Release a reference to the @ref kbase_context\n- *\n+/**\n+ * kbase_ctx_sched_release_ctx - Release a reference to the @ref kbase_context\n  * @kctx: The context from which to release a reference\n  *\n  * This function should be called whenever an address space could be unassigned\n@@ -103,8 +107,8 @@ void kbase_ctx_sched_retain_ctx_refcount(struct kbase_context *kctx);\n  */\n void kbase_ctx_sched_release_ctx(struct kbase_context *kctx);\n \n-/* kbase_ctx_sched_remove_ctx - Unassign previously assigned address space\n- *\n+/**\n+ * kbase_ctx_sched_remove_ctx - Unassign previously assigned address space\n  * @kctx: The context to be removed\n  *\n  * This function should be called when a context is being destroyed. The\n@@ -116,8 +120,8 @@ void kbase_ctx_sched_release_ctx(struct kbase_context *kctx);\n  */\n void kbase_ctx_sched_remove_ctx(struct kbase_context *kctx);\n \n-/* kbase_ctx_sched_restore_all_as - Reprogram all address spaces\n- *\n+/**\n+ * kbase_ctx_sched_restore_all_as - Reprogram all address spaces\n  * @kbdev: The device for which address spaces to be reprogrammed\n  *\n  * This function shall reprogram all address spaces previously assigned to\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug.c\nindex fb57ac2e31adb8..118f787fb74ccd 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug.c\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #include <mali_kbase.h>\n \n static struct kbasep_debug_assert_cb kbasep_debug_assert_registered_cb = {\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug.h\nindex 31b754c5507b1a..f33413908405f0 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #ifndef _KBASE_DEBUG_H\n #define _KBASE_DEBUG_H\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_job_fault.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_job_fault.c\nindex f29430ddf8f9bd..d2c09d6658f214 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_job_fault.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_job_fault.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <mali_kbase.h>\n #include <linux/spinlock.h>\n #include <mali_kbase_hwaccess_jm.h>\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_job_fault.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_job_fault.h\nindex a2bf8983c37c8e..f5ab0a44c1d417 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_job_fault.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_job_fault.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_DEBUG_JOB_FAULT_H\n #define _KBASE_DEBUG_JOB_FAULT_H\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_mem_view.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_mem_view.c\nindex aa271566e91755..857fe9712ef968 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_mem_view.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_mem_view.c\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2013-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2013-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * Debugfs interface to dump the memory visible to the GPU\n  */\n@@ -219,7 +224,7 @@ static int debug_mem_open(struct inode *i, struct file *file)\n \t}\n \n \tret = debug_mem_zone_open(&kctx->reg_rbtree_exec, mem_data);\n-\tif (0 != ret) {\n+\tif (ret != 0) {\n \t\tkbase_gpu_vm_unlock(kctx);\n \t\tgoto out;\n \t}\n@@ -299,7 +304,7 @@ void kbase_debug_mem_view_init(struct file *kctx_file)\n {\n \tstruct kbase_context *kctx = kctx_file->private_data;\n \n-\tdebugfs_create_file(\"mem_view\", S_IRUGO, kctx->kctx_dentry, kctx_file,\n+\tdebugfs_create_file(\"mem_view\", S_IRUSR, kctx->kctx_dentry, kctx_file,\n \t\t\t&kbase_debug_mem_view_fops);\n }\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_mem_view.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_mem_view.h\nindex 20ab51a776c6c9..886ca9448cf572 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_mem_view.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_debug_mem_view.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_DEBUG_MEM_VIEW_H\n #define _KBASE_DEBUG_MEM_VIEW_H\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_defs.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_defs.h\nindex 727c263aa586a3..a49070e129cc24 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_defs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_defs.h\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2011-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2011-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_defs.h\n  *\n@@ -34,6 +39,7 @@\n #include <mali_kbase_mmu_hw.h>\n #include <mali_kbase_instr_defs.h>\n #include <mali_kbase_pm.h>\n+#include <mali_kbase_gpuprops_types.h>\n #include <protected_mode_switcher.h>\n \n #include <linux/atomic.h>\n@@ -47,10 +53,6 @@\n #endif\n \n \n-#ifdef CONFIG_KDS\n-#include <linux/kds.h>\n-#endif\t\t\t\t/* CONFIG_KDS */\n-\n #if defined(CONFIG_SYNC)\n #include <sync.h>\n #else\n@@ -145,11 +147,7 @@\n \n #define MIDGARD_MMU_LEVEL(x) (x)\n \n-#if MIDGARD_MMU_VA_BITS > 39\n #define MIDGARD_MMU_TOPLEVEL    MIDGARD_MMU_LEVEL(0)\n-#else\n-#define MIDGARD_MMU_TOPLEVEL    MIDGARD_MMU_LEVEL(1)\n-#endif\n \n #define MIDGARD_MMU_BOTTOMLEVEL MIDGARD_MMU_LEVEL(3)\n \n@@ -177,6 +175,9 @@\n #define KBASE_KATOM_FLAG_BEEN_SOFT_STOPPPED (1<<1)\n /** Atom has been previously retried to execute */\n #define KBASE_KATOM_FLAGS_RERUN (1<<2)\n+/* Atom submitted with JOB_CHAIN_FLAG bit set in JS_CONFIG_NEXT register, helps to\n+ * disambiguate short-running job chains during soft/hard stopping of jobs\n+ */\n #define KBASE_KATOM_FLAGS_JOBCHAIN (1<<3)\n /** Atom has been previously hard-stopped. */\n #define KBASE_KATOM_FLAG_BEEN_HARD_STOPPED (1<<4)\n@@ -227,8 +228,27 @@ struct kbase_context;\n struct kbase_device;\n struct kbase_as;\n struct kbase_mmu_setup;\n+struct kbase_ipa_model_vinstr_data;\n \n #ifdef CONFIG_DEBUG_FS\n+/**\n+ * struct base_job_fault_event - keeps track of the atom which faulted or which\n+ *                               completed after the faulty atom but before the\n+ *                               debug data for faulty atom was dumped.\n+ *\n+ * @event_code:     event code for the atom, should != BASE_JD_EVENT_DONE for the\n+ *                  atom which faulted.\n+ * @katom:          pointer to the atom for which job fault occurred or which completed\n+ *                  after the faulty atom.\n+ * @job_fault_work: work item, queued only for the faulty atom, which waits for\n+ *                  the dumping to get completed and then does the bottom half\n+ *                  of job done for the atoms which followed the faulty atom.\n+ * @head:           List head used to store the atom in the global list of faulty\n+ *                  atoms or context specific list of atoms which got completed\n+ *                  during the dump.\n+ * @reg_offset:     offset of the register to be dumped next, only applicable for\n+ *                  the faulty atom.\n+ */\n struct base_job_fault_event {\n \n \tu32 event_code;\n@@ -240,6 +260,12 @@ struct base_job_fault_event {\n \n #endif\n \n+/**\n+ * struct kbase_jd_atom_dependency - Contains the dependency info for an atom.\n+ * @atom:          pointer to the dependee atom.\n+ * @dep_type:      type of dependency on the dependee @atom, i.e. order or data\n+ *                 dependency. BASE_JD_DEP_TYPE_INVALID indicates no dependency.\n+ */\n struct kbase_jd_atom_dependency {\n \tstruct kbase_jd_atom *atom;\n \tu8 dep_type;\n@@ -279,14 +305,14 @@ struct kbase_io_history {\n };\n \n /**\n- * @brief The function retrieves a read-only reference to the atom field from\n- * the  kbase_jd_atom_dependency structure\n- *\n- * @param[in] dep kbase jd atom dependency.\n+ * kbase_jd_katom_dep_atom - Retrieves a read-only reference to the\n+ *                           dependee atom.\n+ * @dep:   pointer to the dependency info structure.\n  *\n- * @return readonly reference to dependent ATOM.\n+ * Return: readonly reference to dependee atom.\n  */\n-static inline const struct kbase_jd_atom * kbase_jd_katom_dep_atom(const struct kbase_jd_atom_dependency *dep)\n+static inline const struct kbase_jd_atom *\n+kbase_jd_katom_dep_atom(const struct kbase_jd_atom_dependency *dep)\n {\n \tLOCAL_ASSERT(dep != NULL);\n \n@@ -294,12 +320,11 @@ static inline const struct kbase_jd_atom * kbase_jd_katom_dep_atom(const struct\n }\n \n /**\n- * @brief The function retrieves a read-only reference to the dependency type field from\n- * the  kbase_jd_atom_dependency structure\n+ * kbase_jd_katom_dep_type -  Retrieves the dependency type info\n  *\n- * @param[in] dep kbase jd atom dependency.\n+ * @dep:   pointer to the dependency info structure.\n  *\n- * @return A dependency type value.\n+ * Return: the type of dependency there is on the dependee atom.\n  */\n static inline u8 kbase_jd_katom_dep_type(const struct kbase_jd_atom_dependency *dep)\n {\n@@ -309,12 +334,11 @@ static inline u8 kbase_jd_katom_dep_type(const struct kbase_jd_atom_dependency *\n }\n \n /**\n- * @brief Setter macro for dep_atom array entry in kbase_jd_atom\n- *\n- * @param[in] dep    The kbase jd atom dependency.\n- * @param[in] a      The ATOM to be set as a dependency.\n- * @param     type   The ATOM dependency type to be set.\n- *\n+ * kbase_jd_katom_dep_set - sets up the dependency info structure\n+ *                          as per the values passed.\n+ * @const_dep:    pointer to the dependency info structure to be setup.\n+ * @a:            pointer to the dependee atom.\n+ * @type:         type of dependency there is on the dependee atom.\n  */\n static inline void kbase_jd_katom_dep_set(const struct kbase_jd_atom_dependency *const_dep,\n \t\tstruct kbase_jd_atom *a, u8 type)\n@@ -330,10 +354,9 @@ static inline void kbase_jd_katom_dep_set(const struct kbase_jd_atom_dependency\n }\n \n /**\n- * @brief Setter macro for dep_atom array entry in kbase_jd_atom\n- *\n- * @param[in] dep    The kbase jd atom dependency to be cleared.\n+ * kbase_jd_katom_dep_clear - resets the dependency info structure\n  *\n+ * @const_dep:    pointer to the dependency info structure to be setup.\n  */\n static inline void kbase_jd_katom_dep_clear(const struct kbase_jd_atom_dependency *const_dep)\n {\n@@ -347,74 +370,212 @@ static inline void kbase_jd_katom_dep_clear(const struct kbase_jd_atom_dependenc\n \tdep->dep_type = BASE_JD_DEP_TYPE_INVALID;\n }\n \n+/**\n+ * enum kbase_atom_gpu_rb_state - The state of an atom, pertinent after it becomes\n+ *                                runnable, with respect to job slot ringbuffer/fifo.\n+ * @KBASE_ATOM_GPU_RB_NOT_IN_SLOT_RB: Atom not currently present in slot fifo, which\n+ *                                implies that either atom has not become runnable\n+ *                                due to dependency or has completed the execution\n+ *                                on GPU.\n+ * @KBASE_ATOM_GPU_RB_WAITING_BLOCKED: Atom has been added to slot fifo but is blocked\n+ *                                due to cross slot dependency, can't be submitted to GPU.\n+ * @KBASE_ATOM_GPU_RB_WAITING_PROTECTED_MODE_PREV: Atom has been added to slot fifo but\n+ *                                is waiting for the completion of previously added atoms\n+ *                                in current & other slots, as their protected mode\n+ *                                requirements do not match with the current atom.\n+ * @KBASE_ATOM_GPU_RB_WAITING_PROTECTED_MODE_TRANSITION: Atom is in slot fifo and is\n+ *                                waiting for completion of protected mode transition,\n+ *                                needed before the atom is submitted to GPU.\n+ * @KBASE_ATOM_GPU_RB_WAITING_FOR_CORE_AVAILABLE: Atom is in slot fifo but is waiting\n+ *                                for the cores, which are needed to execute the job\n+ *                                chain represented by the atom, to become available\n+ * @KBASE_ATOM_GPU_RB_WAITING_AFFINITY: Atom is in slot fifo but is blocked on\n+ *                                affinity due to rmu workaround for Hw issue 8987.\n+ * @KBASE_ATOM_GPU_RB_READY:      Atom is in slot fifo and can be submitted to GPU.\n+ * @KBASE_ATOM_GPU_RB_SUBMITTED:  Atom is in slot fifo and has been submitted to GPU.\n+ * @KBASE_ATOM_GPU_RB_RETURN_TO_JS: Atom must be returned to JS due to some failure,\n+ *                                but only after the previously added atoms in fifo\n+ *                                have completed or have also been returned to JS.\n+ */\n enum kbase_atom_gpu_rb_state {\n-\t/* Atom is not currently present in slot ringbuffer */\n \tKBASE_ATOM_GPU_RB_NOT_IN_SLOT_RB,\n-\t/* Atom is in slot ringbuffer but is blocked on a previous atom */\n \tKBASE_ATOM_GPU_RB_WAITING_BLOCKED,\n-\t/* Atom is in slot ringbuffer but is waiting for a previous protected\n-\t * mode transition to complete */\n \tKBASE_ATOM_GPU_RB_WAITING_PROTECTED_MODE_PREV,\n-\t/* Atom is in slot ringbuffer but is waiting for proected mode\n-\t * transition */\n \tKBASE_ATOM_GPU_RB_WAITING_PROTECTED_MODE_TRANSITION,\n-\t/* Atom is in slot ringbuffer but is waiting for cores to become\n-\t * available */\n \tKBASE_ATOM_GPU_RB_WAITING_FOR_CORE_AVAILABLE,\n-\t/* Atom is in slot ringbuffer but is blocked on affinity */\n \tKBASE_ATOM_GPU_RB_WAITING_AFFINITY,\n-\t/* Atom is in slot ringbuffer and ready to run */\n \tKBASE_ATOM_GPU_RB_READY,\n-\t/* Atom is in slot ringbuffer and has been submitted to the GPU */\n \tKBASE_ATOM_GPU_RB_SUBMITTED,\n-\t/* Atom must be returned to JS as soon as it reaches the head of the\n-\t * ringbuffer due to a previous failure */\n \tKBASE_ATOM_GPU_RB_RETURN_TO_JS = -1\n };\n \n+/**\n+ * enum kbase_atom_enter_protected_state - The state of an atom with respect to the\n+ *                      preparation for GPU's entry into protected mode, becomes\n+ *                      pertinent only after atom's state with respect to slot\n+ *                      ringbuffer is KBASE_ATOM_GPU_RB_WAITING_PROTECTED_MODE_TRANSITION\n+ * @KBASE_ATOM_ENTER_PROTECTED_CHECK:  Starting state. Check if there are any atoms\n+ *                      currently submitted to GPU and protected mode transition is\n+ *                      not already in progress.\n+ * @KBASE_ATOM_ENTER_PROTECTED_VINSTR: Wait for vinstr to suspend before entry into\n+ *                      protected mode.\n+ * @KBASE_ATOM_ENTER_PROTECTED_IDLE_L2: Wait for the L2 to become idle in preparation\n+ *                      for the coherency change. L2 shall be powered down and GPU shall\n+ *                      come out of fully coherent mode before entering protected mode.\n+ * @KBASE_ATOM_ENTER_PROTECTED_FINISHED: End state; Prepare coherency change and switch\n+ *                      GPU to protected mode.\n+ */\n enum kbase_atom_enter_protected_state {\n-\t/*\n-\t * Starting state:\n-\t * Check if a transition into protected mode is required.\n-\t *\n-\t * NOTE: The integer value of this must\n-\t *       match KBASE_ATOM_EXIT_PROTECTED_CHECK.\n+\t/**\n+\t * NOTE: The integer value of this must match KBASE_ATOM_EXIT_PROTECTED_CHECK.\n \t */\n \tKBASE_ATOM_ENTER_PROTECTED_CHECK = 0,\n-\t/* Wait for vinstr to suspend. */\n \tKBASE_ATOM_ENTER_PROTECTED_VINSTR,\n-\t/* Wait for the L2 to become idle in preparation for\n-\t * the coherency change. */\n \tKBASE_ATOM_ENTER_PROTECTED_IDLE_L2,\n-\t/* End state;\n-\t * Prepare coherency change. */\n \tKBASE_ATOM_ENTER_PROTECTED_FINISHED,\n };\n \n+/**\n+ * enum kbase_atom_exit_protected_state - The state of an atom with respect to the\n+ *                      preparation for GPU's exit from protected mode, becomes\n+ *                      pertinent only after atom's state with respect to slot\n+ *                      ringbuffer is KBASE_ATOM_GPU_RB_WAITING_PROTECTED_MODE_TRANSITION\n+ * @KBASE_ATOM_EXIT_PROTECTED_CHECK: Starting state. Check if there are any atoms\n+ *                      currently submitted to GPU and protected mode transition is\n+ *                      not already in progress.\n+ * @KBASE_ATOM_EXIT_PROTECTED_IDLE_L2: Wait for the L2 to become idle in preparation\n+ *                      for the reset, as exiting protected mode requires a reset.\n+ * @KBASE_ATOM_EXIT_PROTECTED_RESET: Issue the reset to trigger exit from protected mode\n+ * @KBASE_ATOM_EXIT_PROTECTED_RESET_WAIT: End state, Wait for the reset to complete\n+ */\n enum kbase_atom_exit_protected_state {\n-\t/*\n-\t * Starting state:\n-\t * Check if a transition out of protected mode is required.\n-\t *\n-\t * NOTE: The integer value of this must\n-\t *       match KBASE_ATOM_ENTER_PROTECTED_CHECK.\n+\t/**\n+\t * NOTE: The integer value of this must match KBASE_ATOM_ENTER_PROTECTED_CHECK.\n \t */\n \tKBASE_ATOM_EXIT_PROTECTED_CHECK = 0,\n-\t/* Wait for the L2 to become idle in preparation\n-\t * for the reset. */\n \tKBASE_ATOM_EXIT_PROTECTED_IDLE_L2,\n-\t/* Issue the protected reset. */\n \tKBASE_ATOM_EXIT_PROTECTED_RESET,\n-\t/* End state;\n-\t * Wait for the reset to complete. */\n \tKBASE_ATOM_EXIT_PROTECTED_RESET_WAIT,\n };\n \n+/**\n+ * struct kbase_ext_res - Contains the info for external resources referred\n+ *                        by an atom, which have been mapped on GPU side.\n+ * @gpu_address:          Start address of the memory region allocated for\n+ *                        the resource from GPU virtual address space.\n+ * @alloc:                pointer to physical pages tracking object, set on\n+ *                        mapping the external resource on GPU side.\n+ */\n struct kbase_ext_res {\n \tu64 gpu_address;\n \tstruct kbase_mem_phy_alloc *alloc;\n };\n \n+/**\n+ * struct kbase_jd_atom  - object representing the atom, containing the complete\n+ *                         state and attributes of an atom.\n+ * @work:                  work item for the bottom half processing of the atom,\n+ *                         by JD or JS, after it got executed on GPU or the input\n+ *                         fence got signaled\n+ * @start_timestamp:       time at which the atom was submitted to the GPU, by\n+ *                         updating the JS_HEAD_NEXTn register.\n+ * @udata:                 copy of the user data sent for the atom in base_jd_submit.\n+ * @kctx:                  Pointer to the base context with which the atom is associated.\n+ * @dep_head:              Array of 2 list heads, pointing to the two list of atoms\n+ *                         which are blocked due to dependency on this atom.\n+ * @dep_item:              Array of 2 list heads, used to store the atom in the list of\n+ *                         other atoms depending on the same dependee atom.\n+ * @dep:                   Array containing the dependency info for the 2 atoms on which\n+ *                         the atom depends upon.\n+ * @jd_item:               List head used during job dispatch job_done processing - as\n+ *                         dependencies may not be entirely resolved at this point,\n+ *                         we need to use a separate list head.\n+ * @in_jd_list:            flag set to true if atom's @jd_item is currently on a list,\n+ *                         prevents atom being processed twice.\n+ * @nr_extres:             number of external resources referenced by the atom.\n+ * @extres:                pointer to the location containing info about @nr_extres\n+ *                         external resources referenced by the atom.\n+ * @device_nr:             indicates the coregroup with which the atom is associated,\n+ *                         when BASE_JD_REQ_SPECIFIC_COHERENT_GROUP specified.\n+ * @affinity:              bitmask of the shader cores on which the atom can execute.\n+ * @jc:                    GPU address of the job-chain.\n+ * @softjob_data:          Copy of data read from the user space buffer that @jc\n+ *                         points to.\n+ * @coreref_state:         state of the atom with respect to retention of shader\n+ *                         cores for affinity & power management.\n+ * @fence:                 Stores either an input or output sync fence, depending\n+ *                         on soft-job type\n+ * @sync_waiter:           Pointer to the sync fence waiter structure passed to the\n+ *                         callback function on signaling of the input fence.\n+ * @dma_fence:             object containing pointers to both input & output fences\n+ *                         and other related members used for explicit sync through\n+ *                         soft jobs and for the implicit synchronization required\n+ *                         on access to external resources.\n+ * @event_code:            Event code for the job chain represented by the atom, both\n+ *                         HW and low-level SW events are represented by event codes.\n+ * @core_req:              bitmask of BASE_JD_REQ_* flags specifying either Hw or Sw\n+ *                         requirements for the job chain represented by the atom.\n+ * @ticks:                 Number of scheduling ticks for which atom has been running\n+ *                         on the GPU.\n+ * @sched_priority:        Priority of the atom for Job scheduling, as per the\n+ *                         KBASE_JS_ATOM_SCHED_PRIO_*.\n+ * @poking:                Indicates whether poking of MMU is ongoing for the atom,\n+ *                         as a WA for the issue HW_ISSUE_8316.\n+ * @completed:             Wait queue to wait upon for the completion of atom.\n+ * @status:                Indicates at high level at what stage the atom is in,\n+ *                         as per KBASE_JD_ATOM_STATE_*, that whether it is not in\n+ *                         use or its queued in JD or given to JS or submitted to Hw\n+ *                         or it completed the execution on Hw.\n+ * @work_id:               used for GPU tracepoints, its a snapshot of the 'work_id'\n+ *                         counter in kbase_jd_context which is incremented on\n+ *                         every call to base_jd_submit.\n+ * @slot_nr:               Job slot chosen for the atom.\n+ * @atom_flags:            bitmask of KBASE_KATOM_FLAG* flags capturing the exact\n+ *                         low level state of the atom.\n+ * @retry_count:           Number of times this atom has been retried. Used by replay\n+ *                         soft job.\n+ * @gpu_rb_state:          bitmnask of KBASE_ATOM_GPU_RB_* flags, precisely tracking\n+ *                         atom's state after it has entered Job scheduler on becoming\n+ *                         runnable. Atom could be blocked due to cross slot dependency\n+ *                         or waiting for the shader cores to become available or\n+ *                         waiting for protected mode transitions to complete.\n+ * @need_cache_flush_cores_retained: flag indicating that manual flush of GPU\n+ *                         cache is needed for the atom and the shader cores used\n+ *                         for atom have been kept on.\n+ * @blocked:               flag indicating that atom's resubmission to GPU is\n+ *                         blocked till the work item is scheduled to return the\n+ *                         atom to JS.\n+ * @pre_dep:               Pointer to atom that this atom has same-slot dependency on\n+ * @post_dep:              Pointer to atom that has same-slot dependency on this atom\n+ * @x_pre_dep:             Pointer to atom that this atom has cross-slot dependency on\n+ * @x_post_dep:            Pointer to atom that has cross-slot dependency on this atom\n+ * @flush_id:              The GPU's flush count recorded at the time of submission,\n+ *                         used for the cache flush optimisation\n+ * @fault_event:           Info for dumping the debug data on Job fault.\n+ * @queue:                 List head used for 4 different purposes :\n+ *                         Adds atom to the list of dma-buf fence waiting atoms.\n+ *                         Adds atom to the list of atoms blocked due to cross\n+ *                         slot dependency.\n+ *                         Adds atom to the list of softjob atoms for which JIT\n+ *                         allocation has been deferred\n+ *                         Adds atom to the list of softjob atoms waiting for the\n+ *                         signaling of fence.\n+ * @jit_node:              Used to keep track of all JIT free/alloc jobs in submission order\n+ * @jit_blocked:           Flag indicating that JIT allocation requested through\n+ *                         softjob atom will be reattempted after the impending\n+ *                         free of other active JIT allocations.\n+ * @will_fail_event_code:  If non-zero, this indicates that the atom will fail\n+ *                         with the set event_code when the atom is processed.\n+ *                         Used for special handling of atoms, which have a data\n+ *                         dependency on the failed atoms.\n+ * @protected_state:       State of the atom, as per KBASE_ATOM_(ENTER|EXIT)_PROTECTED_*,\n+ *                         when transitioning into or out of protected mode. Atom will\n+ *                         be either entering or exiting the protected mode.\n+ * @runnable_tree_node:    The node added to context's job slot specific rb tree\n+ *                         when the atom becomes runnable.\n+ * @age:                   Age of atom relative to other atoms in the context, is\n+ *                         snapshot of the age_count counter in kbase context.\n+ */\n struct kbase_jd_atom {\n \tstruct work_struct work;\n \tktime_t start_timestamp;\n@@ -425,12 +586,7 @@ struct kbase_jd_atom {\n \tstruct list_head dep_head[2];\n \tstruct list_head dep_item[2];\n \tconst struct kbase_jd_atom_dependency dep[2];\n-\t/* List head used during job dispatch job_done processing - as\n-\t * dependencies may not be entirely resolved at this point, we need to\n-\t * use a separate list head. */\n \tstruct list_head jd_item;\n-\t/* true if atom's jd_item is currently on a list. Prevents atom being\n-\t * processed twice. */\n \tbool in_jd_list;\n \n \tu16 nr_extres;\n@@ -439,14 +595,9 @@ struct kbase_jd_atom {\n \tu32 device_nr;\n \tu64 affinity;\n \tu64 jc;\n+\tvoid *softjob_data;\n \tenum kbase_atom_coreref_state coreref_state;\n-#ifdef CONFIG_KDS\n-\tstruct list_head node;\n-\tstruct kds_resource_set *kds_rset;\n-\tbool kds_dep_satisfied;\n-#endif\t\t\t\t/* CONFIG_KDS */\n #if defined(CONFIG_SYNC)\n-\t/* Stores either an input or output fence, depending on soft-job type */\n \tstruct sync_fence *fence;\n \tstruct sync_fence_waiter sync_waiter;\n #endif\t\t\t\t/* CONFIG_SYNC */\n@@ -520,30 +671,22 @@ struct kbase_jd_atom {\n \n \t/* Note: refer to kbasep_js_atom_retained_state, which will take a copy of some of the following members */\n \tenum base_jd_event_code event_code;\n-\tbase_jd_core_req core_req;\t    /**< core requirements */\n-\t/** Job Slot to retry submitting to if submission from IRQ handler failed\n-\t *\n-\t * NOTE: see if this can be unified into the another member e.g. the event */\n-\tint retry_submit_on_slot;\n+\tbase_jd_core_req core_req;\n \n \tu32 ticks;\n-\t/* JS atom priority with respect to other atoms on its kctx. */\n \tint sched_priority;\n \n-\tint poking;\t\t/* BASE_HW_ISSUE_8316 */\n+\tint poking;\n \n \twait_queue_head_t completed;\n \tenum kbase_jd_atom_state status;\n #ifdef CONFIG_GPU_TRACEPOINTS\n \tint work_id;\n #endif\n-\t/* Assigned after atom is completed. Used to check whether PRLAM-10676 workaround should be applied */\n \tint slot_nr;\n \n \tu32 atom_flags;\n \n-\t/* Number of times this atom has been retried. Used by replay soft job.\n-\t */\n \tint retry_count;\n \n \tenum kbase_atom_gpu_rb_state gpu_rb_state;\n@@ -552,45 +695,25 @@ struct kbase_jd_atom {\n \n \tatomic_t blocked;\n \n-\t/* Pointer to atom that this atom has same-slot dependency on */\n \tstruct kbase_jd_atom *pre_dep;\n-\t/* Pointer to atom that has same-slot dependency on this atom */\n \tstruct kbase_jd_atom *post_dep;\n \n-\t/* Pointer to atom that this atom has cross-slot dependency on */\n \tstruct kbase_jd_atom *x_pre_dep;\n-\t/* Pointer to atom that has cross-slot dependency on this atom */\n \tstruct kbase_jd_atom *x_post_dep;\n \n-\t/* The GPU's flush count recorded at the time of submission, used for\n-\t * the cache flush optimisation */\n \tu32 flush_id;\n \n-\tstruct kbase_jd_atom_backend backend;\n #ifdef CONFIG_DEBUG_FS\n \tstruct base_job_fault_event fault_event;\n #endif\n \n-\t/* List head used for three different purposes:\n-\t *  1. Overflow list for JS ring buffers. If an atom is ready to run,\n-\t *     but there is no room in the JS ring buffer, then the atom is put\n-\t *     on the ring buffer's overflow list using this list node.\n-\t *  2. List of waiting soft jobs.\n-\t */\n \tstruct list_head queue;\n \n-\t/* Used to keep track of all JIT free/alloc jobs in submission order\n-\t */\n \tstruct list_head jit_node;\n \tbool jit_blocked;\n \n-\t/* If non-zero, this indicates that the atom will fail with the set\n-\t * event_code when the atom is processed. */\n \tenum base_jd_event_code will_fail_event_code;\n \n-\t/* Atoms will only ever be transitioning into, or out of\n-\t * protected mode so we do not need two separate fields.\n-\t */\n \tunion {\n \t\tenum kbase_atom_enter_protected_state enter;\n \t\tenum kbase_atom_exit_protected_state exit;\n@@ -598,7 +721,6 @@ struct kbase_jd_atom {\n \n \tstruct rb_node runnable_tree_node;\n \n-\t/* 'Age' of atom relative to other atoms in the context. */\n \tu32 age;\n };\n \n@@ -617,47 +739,63 @@ static inline bool kbase_jd_katom_is_protected(const struct kbase_jd_atom *katom\n \n #define KBASE_JD_DEP_QUEUE_SIZE 256\n \n+/**\n+ * struct kbase_jd_context  - per context object encapsulating all the Job dispatcher\n+ *                            related state.\n+ * @lock:                     lock to serialize the updates made to the Job dispatcher\n+ *                            state and kbase_jd_atom objects.\n+ * @sched_info:               Structure encapsulating all the Job scheduling info.\n+ * @atoms:                    Array of the objects representing atoms, containing\n+ *                            the complete state and attributes of an atom.\n+ * @job_nr:                   Tracks the number of atoms being processed by the\n+ *                            kbase. This includes atoms that are not tracked by\n+ *                            scheduler: 'not ready to run' & 'dependency-only' jobs.\n+ * @zero_jobs_wait:           Waitq that reflects whether there are no jobs\n+ *                            (including SW-only dependency jobs). This is set\n+ *                            when no jobs are present on the ctx, and clear when\n+ *                            there are jobs.\n+ *                            This must be updated atomically with @job_nr.\n+ *                            note: Job Dispatcher knows about more jobs than the\n+ *                            Job Scheduler as it is unaware of jobs that are\n+ *                            blocked on dependencies and SW-only dependency jobs.\n+ *                            This waitq can be waited upon to find out when the\n+ *                            context jobs are all done/cancelled (including those\n+ *                            that might've been blocked on dependencies) - and so,\n+ *                            whether it can be terminated. However, it should only\n+ *                            be terminated once it is not present in the run-pool.\n+ *                            Since the waitq is only set under @lock, the waiter\n+ *                            should also briefly obtain and drop @lock to guarantee\n+ *                            that the setter has completed its work on the kbase_context\n+ * @job_done_wq:              Workqueue to which the per atom work item is queued\n+ *                            for bottom half processing when the atom completes\n+ *                            execution on GPU or the input fence get signaled.\n+ * @tb_lock:                  Lock to serialize the write access made to @tb to\n+ *                            to store the register access trace messages.\n+ * @tb:                       Pointer to the Userspace accessible buffer storing\n+ *                            the trace messages for register read/write accesses\n+ *                            made by the Kbase. The buffer is filled in circular\n+ *                            fashion.\n+ * @tb_wrap_offset:           Offset to the end location in the trace buffer, the\n+ *                            write pointer is moved to the beginning on reaching\n+ *                            this offset.\n+ * @work_id:                  atomic variable used for GPU tracepoints, incremented\n+ *                            on every call to base_jd_submit.\n+ */\n struct kbase_jd_context {\n \tstruct mutex lock;\n \tstruct kbasep_js_kctx_info sched_info;\n \tstruct kbase_jd_atom atoms[BASE_JD_ATOM_COUNT];\n \n-\t/** Tracks all job-dispatch jobs.  This includes those not tracked by\n-\t * the scheduler: 'not ready to run' and 'dependency-only' jobs. */\n \tu32 job_nr;\n \n-\t/** Waitq that reflects whether there are no jobs (including SW-only\n-\t * dependency jobs). This is set when no jobs are present on the ctx,\n-\t * and clear when there are jobs.\n-\t *\n-\t * @note: Job Dispatcher knows about more jobs than the Job Scheduler:\n-\t * the Job Scheduler is unaware of jobs that are blocked on dependencies,\n-\t * and SW-only dependency jobs.\n-\t *\n-\t * This waitq can be waited upon to find out when the context jobs are all\n-\t * done/cancelled (including those that might've been blocked on\n-\t * dependencies) - and so, whether it can be terminated. However, it should\n-\t * only be terminated once it is not present in the run-pool (see\n-\t * kbasep_js_kctx_info::ctx::is_scheduled).\n-\t *\n-\t * Since the waitq is only set under kbase_jd_context::lock,\n-\t * the waiter should also briefly obtain and drop kbase_jd_context::lock to\n-\t * guarentee that the setter has completed its work on the kbase_context\n-\t *\n-\t * This must be updated atomically with:\n-\t * - kbase_jd_context::job_nr */\n \twait_queue_head_t zero_jobs_wait;\n \n-\t/** Job Done workqueue. */\n \tstruct workqueue_struct *job_done_wq;\n \n \tspinlock_t tb_lock;\n \tu32 *tb;\n \tsize_t tb_wrap_offset;\n \n-#ifdef CONFIG_KDS\n-\tstruct kds_callback kds_cb;\n-#endif\t\t\t\t/* CONFIG_KDS */\n #ifdef CONFIG_GPU_TRACEPOINTS\n \tatomic_t work_id;\n #endif\n@@ -683,15 +821,34 @@ struct kbase_mmu_setup {\n };\n \n /**\n- * Important: Our code makes assumptions that a struct kbase_as structure is always at\n- * kbase_device->as[number]. This is used to recover the containing\n- * struct kbase_device from a struct kbase_as structure.\n- *\n- * Therefore, struct kbase_as structures must not be allocated anywhere else.\n+ * struct kbase_as   - object representing an address space of GPU.\n+ * @number:            Index at which this address space structure is present\n+ *                     in an array of address space structures embedded inside the\n+ *                     struct kbase_device.\n+ * @pf_wq:             Workqueue for processing work items related to Bus fault\n+ *                     and Page fault handling.\n+ * @work_pagefault:    Work item for the Page fault handling.\n+ * @work_busfault:     Work item for the Bus fault handling.\n+ * @fault_type:        Type of fault which occured for this address space,\n+ *                     regular/unexpected Bus or Page fault.\n+ * @protected_mode:    Flag indicating whether the fault occurred in protected\n+ *                     mode or not.\n+ * @fault_status:      Records the fault status as reported by Hw.\n+ * @fault_addr:        Records the faulting address.\n+ * @fault_extra_addr:  Records the secondary fault address.\n+ * @current_setup:     Stores the MMU configuration for this address space.\n+ * @poke_wq:           Workqueue to process the work items queue for poking the\n+ *                     MMU as a WA for BASE_HW_ISSUE_8316.\n+ * @poke_work:         Work item to do the poking of MMU for this address space.\n+ * @poke_refcount:     Refcount for the need of poking MMU. While the refcount is\n+ *                     non zero the poking of MMU will continue.\n+ *                     Protected by hwaccess_lock.\n+ * @poke_state:        State indicating whether poking is in progress or it has\n+ *                     been stopped. Protected by hwaccess_lock.\n+ * @poke_timer:        Timer used to schedule the poking at regular intervals.\n  */\n struct kbase_as {\n \tint number;\n-\n \tstruct workqueue_struct *pf_wq;\n \tstruct work_struct work_pagefault;\n \tstruct work_struct work_busfault;\n@@ -700,15 +857,10 @@ struct kbase_as {\n \tu32 fault_status;\n \tu64 fault_addr;\n \tu64 fault_extra_addr;\n-\n \tstruct kbase_mmu_setup current_setup;\n-\n-\t/* BASE_HW_ISSUE_8316  */\n \tstruct workqueue_struct *poke_wq;\n \tstruct work_struct poke_work;\n-\t/** Protected by hwaccess_lock */\n \tint poke_refcount;\n-\t/** Protected by hwaccess_lock */\n \tkbase_as_poke_state poke_state;\n \tstruct hrtimer poke_timer;\n };\n@@ -746,6 +898,37 @@ enum kbase_trace_code {\n #define KBASE_TRACE_FLAG_REFCOUNT (((u8)1) << 0)\n #define KBASE_TRACE_FLAG_JOBSLOT  (((u8)1) << 1)\n \n+/**\n+ * struct kbase_trace - object representing a trace message added to trace buffer\n+ *                      kbase_device::trace_rbuf\n+ * @timestamp:          CPU timestamp at which the trace message was added.\n+ * @thread_id:          id of the thread in the context of which trace message\n+ *                      was added.\n+ * @cpu:                indicates which CPU the @thread_id was scheduled on when\n+ *                      the trace message was added.\n+ * @ctx:                Pointer to the kbase context for which the trace message\n+ *                      was added. Will be NULL for certain trace messages like\n+ *                      for traces added corresponding to power management events.\n+ *                      Will point to the appropriate context corresponding to\n+ *                      job-slot & context's reference count related events.\n+ * @katom:              indicates if the trace message has atom related info.\n+ * @atom_number:        id of the atom for which trace message was added.\n+ *                      Only valid if @katom is true.\n+ * @atom_udata:         Copy of the user data sent for the atom in base_jd_submit.\n+ *                      Only valid if @katom is true.\n+ * @gpu_addr:           GPU address of the job-chain represented by atom. Could\n+ *                      be valid even if @katom is false.\n+ * @info_val:           value specific to the type of event being traced. For the\n+ *                      case where @katom is true, will be set to atom's affinity,\n+ *                      i.e. bitmask of shader cores chosen for atom's execution.\n+ * @code:               Identifies the event, refer enum kbase_trace_code.\n+ * @jobslot:            job-slot for which trace message was added, valid only for\n+ *                      job-slot management events.\n+ * @refcount:           reference count for the context, valid for certain events\n+ *                      related to scheduler core and policy.\n+ * @flags:              indicates if info related to @jobslot & @refcount is present\n+ *                      in the trace message, used during dumping of the message.\n+ */\n struct kbase_trace {\n \tstruct timespec timestamp;\n \tu32 thread_id;\n@@ -912,19 +1095,23 @@ struct kbase_pm_device_data {\n \n /**\n  * struct kbase_mem_pool - Page based memory pool for kctx/kbdev\n- * @kbdev:     Kbase device where memory is used\n- * @cur_size:  Number of free pages currently in the pool (may exceed @max_size\n- *             in some corner cases)\n- * @max_size:  Maximum number of free pages in the pool\n- * @order:     order = 0 refers to a pool of 4 KB pages\n- *             order = 9 refers to a pool of 2 MB pages (2^9 * 4KB = 2 MB)\n- * @pool_lock: Lock protecting the pool - must be held when modifying @cur_size\n- *             and @page_list\n- * @page_list: List of free pages in the pool\n- * @reclaim:   Shrinker for kernel reclaim of free pages\n- * @next_pool: Pointer to next pool where pages can be allocated when this pool\n- *             is empty. Pages will spill over to the next pool when this pool\n- *             is full. Can be NULL if there is no next pool.\n+ * @kbdev:        Kbase device where memory is used\n+ * @cur_size:     Number of free pages currently in the pool (may exceed\n+ *                @max_size in some corner cases)\n+ * @max_size:     Maximum number of free pages in the pool\n+ * @order:        order = 0 refers to a pool of 4 KB pages\n+ *                order = 9 refers to a pool of 2 MB pages (2^9 * 4KB = 2 MB)\n+ * @pool_lock:    Lock protecting the pool - must be held when modifying\n+ *                @cur_size and @page_list\n+ * @page_list:    List of free pages in the pool\n+ * @reclaim:      Shrinker for kernel reclaim of free pages\n+ * @next_pool:    Pointer to next pool where pages can be allocated when this\n+ *                pool is empty. Pages will spill over to the next pool when\n+ *                this pool is full. Can be NULL if there is no next pool.\n+ * @dying:        true if the pool is being terminated, and any ongoing\n+ *                operations should be abandoned\n+ * @dont_reclaim: true if the shrinker is forbidden from reclaiming memory from\n+ *                this pool, eg during a grow operation\n  */\n struct kbase_mem_pool {\n \tstruct kbase_device *kbdev;\n@@ -936,6 +1123,9 @@ struct kbase_mem_pool {\n \tstruct shrinker     reclaim;\n \n \tstruct kbase_mem_pool *next_pool;\n+\n+\tbool dying;\n+\tbool dont_reclaim;\n };\n \n /**\n@@ -971,9 +1161,261 @@ struct kbase_mmu_mode const *kbase_mmu_mode_get_aarch64(void);\n \n #define DEVNAME_SIZE\t16\n \n+/**\n+ * struct kbase_device   - Object representing an instance of GPU platform device,\n+ *                         allocated from the probe method of mali driver.\n+ * @hw_quirks_sc:          Configuration to be used for the shader cores as per\n+ *                         the HW issues present in the GPU.\n+ * @hw_quirks_tiler:       Configuration to be used for the Tiler as per the HW\n+ *                         issues present in the GPU.\n+ * @hw_quirks_mmu:         Configuration to be used for the MMU as per the HW\n+ *                         issues present in the GPU.\n+ * @hw_quirks_jm:          Configuration to be used for the Job Manager as per\n+ *                         the HW issues present in the GPU.\n+ * @entry:                 Links the device instance to the global list of GPU\n+ *                         devices. The list would have as many entries as there\n+ *                         are GPU device instances.\n+ * @dev:                   Pointer to the kernel's generic/base representation\n+ *                         of the GPU platform device.\n+ * @mdev:                  Pointer to the miscellaneous device registered to\n+ *                         provide Userspace access to kernel driver through the\n+ *                         device file /dev/malixx.\n+ * @reg_start:             Base address of the region in physical address space\n+ *                         where GPU registers have been mapped.\n+ * @reg_size:              Size of the region containing GPU registers\n+ * @reg:                   Kernel virtual address of the region containing GPU\n+ *                         registers, using which Driver will access the registers.\n+ * @irqs:                  Array containing IRQ resource info for 3 types of\n+ *                         interrupts : Job scheduling, MMU & GPU events (like\n+ *                         power management, cache etc.)\n+ * @clock:                 Pointer to the input clock resource (having an id of 0),\n+ *                         referenced by the GPU device node.\n+ * @regulator:             Pointer to the struct corresponding to the regulator\n+ *                         for GPU device\n+ * @devname:               string containing the name used for GPU device instance,\n+ *                         miscellaneous device is registered using the same name.\n+ * @model:                 Pointer, valid only when Driver is compiled to not access\n+ *                         the real GPU Hw, to the dummy model which tries to mimic\n+ *                         to some extent the state & behavior of GPU Hw in response\n+ *                         to the register accesses made by the Driver.\n+ * @irq_slab:              slab cache for allocating the work items queued when\n+ *                         model mimics raising of IRQ to cause an interrupt on CPU.\n+ * @irq_workq:             workqueue for processing the irq work items.\n+ * @serving_job_irq:       function to execute work items queued when model mimics\n+ *                         the raising of JS irq, mimics the interrupt handler\n+ *                         processing JS interrupts.\n+ * @serving_gpu_irq:       function to execute work items queued when model mimics\n+ *                         the raising of GPU irq, mimics the interrupt handler\n+ *                         processing GPU interrupts.\n+ * @serving_mmu_irq:       function to execute work items queued when model mimics\n+ *                         the raising of MMU irq, mimics the interrupt handler\n+ *                         processing MMU interrupts.\n+ * @reg_op_lock:           lock used by model to serialize the handling of register\n+ *                         accesses made by the driver.\n+ * @pm:                    Per device object for storing data for power management\n+ *                         framework.\n+ * @js_data:               Per device object encapsulating the current context of\n+ *                         Job Scheduler, which is global to the device and is not\n+ *                         tied to any particular struct kbase_context running on\n+ *                         the device\n+ * @mem_pool:              Object containing the state for global pool of 4KB size\n+ *                         physical pages which can be used by all the contexts.\n+ * @lp_mem_pool:           Object containing the state for global pool of 2MB size\n+ *                         physical pages which can be used by all the contexts.\n+ * @memdev:                keeps track of the in use physical pages allocated by\n+ *                         the Driver.\n+ * @mmu_mode:              Pointer to the object containing methods for programming\n+ *                         the MMU, depending on the type of MMU supported by Hw.\n+ * @as:                    Array of objects representing address spaces of GPU.\n+ * @as_free:               Bitpattern of free/available address space lots\n+ * @as_to_kctx:            Array of pointers to struct kbase_context, having\n+ *                         GPU adrress spaces assigned to them.\n+ * @mmu_mask_change:       Lock to serialize the access to MMU interrupt mask\n+ *                         register used in the handling of Bus & Page faults.\n+ * @gpu_props:             Object containing complete information about the\n+ *                         configuration/properties of GPU HW device in use.\n+ * @hw_issues_mask:        List of SW workarounds for HW issues\n+ * @hw_features_mask:      List of available HW features.\n+ * shader_inuse_bitmap:    Bitmaps of shader cores that are currently in use.\n+ *                         These should be kept up to date by the job scheduler.\n+ *                         The bit to be set in this bitmap should already be set\n+ *                         in the @shader_needed_bitmap.\n+ *                         @pm.power_change_lock should be held when accessing\n+ *                         these members.\n+ * @shader_inuse_cnt:      Usage count for each of the 64 shader cores\n+ * @shader_needed_bitmap:  Bitmaps of cores the JS needs for jobs ready to run\n+ *                         kbase_pm_check_transitions_nolock() should be called\n+ *                         when the bitmap is modified to update the power\n+ *                         management system and allow transitions to occur.\n+ * @shader_needed_cnt:     Count for each of the 64 shader cores, incremented\n+ *                         when the core is requested for use and decremented\n+ *                         later when the core is known to be powered up for use.\n+ * @tiler_inuse_cnt:       Usage count for the Tiler block. @tiler_needed_cnt\n+ *                         should be non zero at the time of incrementing the\n+ *                         usage count.\n+ * @tiler_needed_cnt:      Count for the Tiler block shader cores, incremented\n+ *                         when Tiler is requested for use and decremented\n+ *                         later when Tiler is known to be powered up for use.\n+ * @disjoint_event:        struct for keeping track of the disjoint information,\n+ *                         that whether the GPU is in a disjoint state and the\n+ *                         number of disjoint events that have occurred on GPU.\n+ * @l2_users_count:        Refcount for tracking users of the l2 cache, e.g.\n+ *                         when using hardware counter instrumentation.\n+ * @shader_available_bitmap: Bitmap of shader cores that are currently available,\n+ *                         powered up and the power policy is happy for jobs\n+ *                         to be submitted to these cores. These are updated\n+ *                         by the power management code. The job scheduler\n+ *                         should avoid submitting new jobs to any cores\n+ *                         that are not marked as available.\n+ * @tiler_available_bitmap: Bitmap of tiler units that are currently available.\n+ * @l2_available_bitmap:    Bitmap of the currently available Level 2 caches.\n+ * @stack_available_bitmap: Bitmap of the currently available Core stacks.\n+ * @shader_ready_bitmap:    Bitmap of shader cores that are ready (powered on)\n+ * @shader_transitioning_bitmap: Bitmap of shader cores that are currently changing\n+ *                         power state.\n+ * @nr_hw_address_spaces:  Number of address spaces actually available in the\n+ *                         GPU, remains constant after driver initialisation.\n+ * @nr_user_address_spaces: Number of address spaces available to user contexts\n+ * @hwcnt:                  Structure used for instrumentation and HW counters\n+ *                         dumping\n+ * @vinstr_ctx:            vinstr context created per device\n+ * @trace_lock:            Lock to serialize the access to trace buffer.\n+ * @trace_first_out:       Index/offset in the trace buffer at which the first\n+ *                         unread message is present.\n+ * @trace_next_in:         Index/offset in the trace buffer at which the new\n+ *                         message will be written.\n+ * @trace_rbuf:            Pointer to the buffer storing debug messages/prints\n+ *                         tracing the various events in Driver.\n+ *                         The buffer is filled in circular fashion.\n+ * @reset_timeout_ms:      Number of milliseconds to wait for the soft stop to\n+ *                         complete for the GPU jobs before proceeding with the\n+ *                         GPU reset.\n+ * @cacheclean_lock:       Lock to serialize the clean & invalidation of GPU caches,\n+ *                         between Job Manager backend & Instrumentation code.\n+ * @platform_context:      Platform specific private data to be accessed by\n+ *                         platform specific config files only.\n+ * @kctx_list:             List of kbase_contexts created for the device, including\n+ *                         the kbase_context created for vinstr_ctx.\n+ * @kctx_list_lock:        Lock protecting concurrent accesses to @kctx_list.\n+ * @devfreq_profile:       Describes devfreq profile for the Mali GPU device, passed\n+ *                         to devfreq_add_device() to add devfreq feature to Mali\n+ *                         GPU device.\n+ * @devfreq:               Pointer to devfreq structure for Mali GPU device,\n+ *                         returned on the call to devfreq_add_device().\n+ * @current_freq:          The real frequency, corresponding to @current_nominal_freq,\n+ *                         at which the Mali GPU device is currently operating, as\n+ *                         retrieved from @opp_table in the target callback of\n+ *                         @devfreq_profile.\n+ * @current_nominal_freq:  The nominal frequency currently used for the Mali GPU\n+ *                         device as retrieved through devfreq_recommended_opp()\n+ *                         using the freq value passed as an argument to target\n+ *                         callback of @devfreq_profile\n+ * @current_voltage:       The voltage corresponding to @current_nominal_freq, as\n+ *                         retrieved through dev_pm_opp_get_voltage().\n+ * @current_core_mask:     bitmask of shader cores that are currently desired &\n+ *                         enabled, corresponding to @current_nominal_freq as\n+ *                         retrieved from @opp_table in the target callback of\n+ *                         @devfreq_profile.\n+ * @opp_table:             Pointer to the lookup table for converting between nominal\n+ *                         OPP (operating performance point) frequency, and real\n+ *                         frequency and core mask. This table is constructed according\n+ *                         to operating-points-v2-mali table in devicetree.\n+ * @num_opps:              Number of operating performance points available for the Mali\n+ *                         GPU device.\n+ * @devfreq_cooling:       Pointer returned on registering devfreq cooling device\n+ *                         corresponding to @devfreq.\n+ * @ipa_use_configured_model: set to TRUE when configured model is used for IPA and\n+ *                         FALSE when fallback model is used.\n+ * @ipa:                   Top level structure for IPA, containing pointers to both\n+ *                         configured & fallback models.\n+ * @timeline:              Stores the global timeline tracking information.\n+ * @job_fault_debug:       Flag to control the dumping of debug data for job faults,\n+ *                         set when the 'job_fault' debugfs file is opened.\n+ * @mali_debugfs_directory: Root directory for the debugfs files created by the driver\n+ * @debugfs_ctx_directory: Directory inside the @mali_debugfs_directory containing\n+ *                         a sub-directory for every context.\n+ * @debugfs_as_read_bitmap: bitmap of address spaces for which the bus or page fault\n+ *                         has occurred.\n+ * @job_fault_wq:          Waitqueue to block the job fault dumping daemon till the\n+ *                         occurrence of a job fault.\n+ * @job_fault_resume_wq:   Waitqueue on which every context with a faulty job wait\n+ *                         for the job fault dumping to complete before they can\n+ *                         do bottom half of job done for the atoms which followed\n+ *                         the faulty atom.\n+ * @job_fault_resume_workq: workqueue to process the work items queued for the faulty\n+ *                         atoms, whereby the work item function waits for the dumping\n+ *                         to get completed.\n+ * @job_fault_event_list:  List of atoms, each belonging to a different context, which\n+ *                         generated a job fault.\n+ * @job_fault_event_lock:  Lock to protect concurrent accesses to @job_fault_event_list\n+ * @regs_dump_debugfs_data: Contains the offset of register to be read through debugfs\n+ *                         file \"read_register\".\n+ * @kbase_profiling_controls: Profiling controls set by gator to control frame buffer\n+ *                         dumping and s/w counter reporting.\n+ * @force_replay_limit:    Number of gpu jobs, having replay atoms associated with them,\n+ *                         that are run before a job is forced to fail and replay.\n+ *                         Set to 0 to disable forced failures.\n+ * @force_replay_count:    Count of gpu jobs, having replay atoms associated with them,\n+ *                         between forced failures. Incremented on each gpu job which\n+ *                         has replay atoms dependent on it. A gpu job is forced to\n+ *                         fail once this is greater than or equal to @force_replay_limit\n+ * @force_replay_core_req: Core requirements, set through the sysfs file, for the replay\n+ *                         job atoms to consider the associated gpu job for forceful\n+ *                         failure and replay. May be zero\n+ * @force_replay_random:   Set to 1 to randomize the @force_replay_limit, in the\n+ *                         range of 1 - KBASEP_FORCE_REPLAY_RANDOM_LIMIT.\n+ * @ctx_num:               Total number of contexts created for the device.\n+ * @io_history:            Pointer to an object keeping a track of all recent\n+ *                         register accesses. The history of register accesses\n+ *                         can be read through \"regs_history\" debugfs file.\n+ * @hwaccess:              Contains a pointer to active kbase context and GPU\n+ *                         backend specific data for HW access layer.\n+ * @faults_pending:        Count of page/bus faults waiting for bottom half processing\n+ *                         via workqueues.\n+ * @poweroff_pending:      Set when power off operation for GPU is started, reset when\n+ *                         power on for GPU is started.\n+ * @infinite_cache_active_default: Set to enable using infinite cache for all the\n+ *                         allocations of a new context.\n+ * @mem_pool_max_size_default: Initial/default value for the maximum size of both\n+ *                         types of pool created for a new context.\n+ * @current_gpu_coherency_mode: coherency mode in use, which can be different\n+ *                         from @system_coherency, when using protected mode.\n+ * @system_coherency:      coherency mode as retrieved from the device tree.\n+ * @cci_snoop_enabled:     Flag to track when CCI snoops have been enabled.\n+ * @snoop_enable_smc:      SMC function ID to call into Trusted firmware to\n+ *                         enable cache snooping. Value of 0 indicates that it\n+ *                         is not used.\n+ * @snoop_disable_smc:     SMC function ID to call disable cache snooping.\n+ * @protected_ops:         Pointer to the methods for switching in or out of the\n+ *                         protected mode, as per the @protected_dev being used.\n+ * @protected_dev:         Pointer to the protected mode switcher device attached\n+ *                         to the GPU device retrieved through device tree if\n+ *                         GPU do not support protected mode switching natively.\n+ * @protected_mode:        set to TRUE when GPU is put into protected mode\n+ * @protected_mode_transition: set to TRUE when GPU is transitioning into or\n+ *                         out of protected mode.\n+ * @protected_mode_support: set to true if protected mode is supported.\n+ * @buslogger:              Pointer to the structure required for interfacing\n+ *                          with the bus logger module to set the size of buffer\n+ *                          used by the module for capturing bus logs.\n+ * @irq_reset_flush:        Flag to indicate that GPU reset is in-flight and flush of\n+ *                          IRQ + bottom half is being done, to prevent the writes\n+ *                          to MMU_IRQ_CLEAR & MMU_IRQ_MASK registers.\n+ * @inited_subsys:          Bitmap of inited sub systems at the time of device probe.\n+ *                          Used during device remove or for handling error in probe.\n+ * @hwaccess_lock:          Lock, which can be taken from IRQ context, to serialize\n+ *                          the updates made to Job dispatcher + scheduler states.\n+ * @mmu_hw_mutex:           Protects access to MMU operations and address space\n+ *                          related state.\n+ * @serialize_jobs:         Currently used mode for serialization of jobs, both\n+ *                          intra & inter slots serialization is supported.\n+ * @backup_serialize_jobs:  Copy of the original value of @serialize_jobs taken\n+ *                          when GWT is enabled. Used to restore the original value\n+ *                          on disabling of GWT.\n+ * @js_ctx_scheduling_mode: Context scheduling mode currently being used by\n+ *                          Job Scheduler\n+ */\n struct kbase_device {\n-\ts8 slot_submit_count_irq[BASE_JM_MAX_NR_SLOTS];\n-\n \tu32 hw_quirks_sc;\n \tu32 hw_quirks_tiler;\n \tu32 hw_quirks_mmu;\n@@ -1015,12 +1457,7 @@ struct kbase_device {\n \tstruct kbase_mmu_mode const *mmu_mode;\n \n \tstruct kbase_as as[BASE_MAX_NR_AS];\n-\t/* The below variables (as_free and as_to_kctx) are managed by the\n-\t * Context Scheduler. The kbasep_js_device_data::runpool_irq::lock must\n-\t * be held whilst accessing these.\n-\t */\n \tu16 as_free; /* Bitpattern of free Address Spaces */\n-\t/* Mapping from active Address Spaces to kbase_context */\n \tstruct kbase_context *as_to_kctx[BASE_MAX_NR_AS];\n \n \n@@ -1028,53 +1465,28 @@ struct kbase_device {\n \n \tstruct kbase_gpu_props gpu_props;\n \n-\t/** List of SW workarounds for HW issues */\n \tunsigned long hw_issues_mask[(BASE_HW_ISSUE_END + BITS_PER_LONG - 1) / BITS_PER_LONG];\n-\t/** List of features available */\n \tunsigned long hw_features_mask[(BASE_HW_FEATURE_END + BITS_PER_LONG - 1) / BITS_PER_LONG];\n \n-\t/* Bitmaps of cores that are currently in use (running jobs).\n-\t * These should be kept up to date by the job scheduler.\n-\t *\n-\t * pm.power_change_lock should be held when accessing these members.\n-\t *\n-\t * kbase_pm_check_transitions_nolock() should be called when bits are\n-\t * cleared to update the power management system and allow transitions to\n-\t * occur. */\n \tu64 shader_inuse_bitmap;\n \n-\t/* Refcount for cores in use */\n \tu32 shader_inuse_cnt[64];\n \n-\t/* Bitmaps of cores the JS needs for jobs ready to run */\n \tu64 shader_needed_bitmap;\n \n-\t/* Refcount for cores needed */\n \tu32 shader_needed_cnt[64];\n \n \tu32 tiler_inuse_cnt;\n \n \tu32 tiler_needed_cnt;\n \n-\t/* struct for keeping track of the disjoint information\n-\t *\n-\t * The state  is > 0 if the GPU is in a disjoint state. Otherwise 0\n-\t * The count is the number of disjoint events that have occurred on the GPU\n-\t */\n \tstruct {\n \t\tatomic_t count;\n \t\tatomic_t state;\n \t} disjoint_event;\n \n-\t/* Refcount for tracking users of the l2 cache, e.g. when using hardware counter instrumentation. */\n \tu32 l2_users_count;\n \n-\t/* Bitmaps of cores that are currently available (powered up and the power policy is happy for jobs to be\n-\t * submitted to these cores. These are updated by the power management code. The job scheduler should avoid\n-\t * submitting new jobs to any cores that are not marked as available.\n-\t *\n-\t * pm.power_change_lock should be held when accessing these members.\n-\t */\n \tu64 shader_available_bitmap;\n \tu64 tiler_available_bitmap;\n \tu64 l2_available_bitmap;\n@@ -1083,10 +1495,9 @@ struct kbase_device {\n \tu64 shader_ready_bitmap;\n \tu64 shader_transitioning_bitmap;\n \n-\ts8 nr_hw_address_spaces;\t\t\t  /**< Number of address spaces in the GPU (constant after driver initialisation) */\n-\ts8 nr_user_address_spaces;\t\t\t  /**< Number of address spaces available to user contexts */\n+\ts8 nr_hw_address_spaces;\n+\ts8 nr_user_address_spaces;\n \n-\t/* Structure used for instrumentation and HW counters dumping */\n \tstruct kbase_hwcnt {\n \t\t/* The lock should be used when accessing any of the following members */\n \t\tspinlock_t lock;\n@@ -1110,10 +1521,8 @@ struct kbase_device {\n \n \tstruct mutex cacheclean_lock;\n \n-\t/* Platform specific private data to be accessed by mali_kbase_config_xxx.c only */\n \tvoid *platform_context;\n \n-\t/* List of kbase_contexts created */\n \tstruct list_head        kctx_list;\n \tstruct mutex            kctx_list_lock;\n \n@@ -1126,6 +1535,7 @@ struct kbase_device {\n \tu64 current_core_mask;\n \tstruct kbase_devfreq_opp *opp_table;\n \tint num_opps;\n+\tstruct kbasep_pm_metrics last_devfreq_metrics;\n \tstruct monitor_dev_info *mdev_info;\n #ifdef CONFIG_DEVFREQ_THERMAL\n #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)\n@@ -1133,13 +1543,38 @@ struct kbase_device {\n #else\n \tstruct thermal_cooling_device *devfreq_cooling;\n #endif\n-\t/* Current IPA model - true for configured model, false for fallback */\n \tatomic_t ipa_use_configured_model;\n \tstruct {\n \t\t/* Access to this struct must be with ipa.lock held */\n \t\tstruct mutex lock;\n \t\tstruct kbase_ipa_model *configured_model;\n \t\tstruct kbase_ipa_model *fallback_model;\n+\n+\t\t/* Values of the PM utilization metrics from last time the\n+\t\t * power model was invoked. The utilization is calculated as\n+\t\t * the difference between last_metrics and the current values.\n+\t\t */\n+\t\tstruct kbasep_pm_metrics last_metrics;\n+\n+\t\t/*\n+\t\t * gpu_active_callback - Inform IPA that GPU is now active\n+\t\t * @model_data: Pointer to model data\n+\t\t */\n+\t\tvoid (*gpu_active_callback)(\n+\t\t\t\tstruct kbase_ipa_model_vinstr_data *model_data);\n+\n+\t\t/*\n+\t\t * gpu_idle_callback - Inform IPA that GPU is now idle\n+\t\t * @model_data: Pointer to model data\n+\t\t */\n+\t\tvoid (*gpu_idle_callback)(\n+\t\t\t\tstruct kbase_ipa_model_vinstr_data *model_data);\n+\n+\t\t/* Model data to pass to ipa_gpu_active/idle() */\n+\t\tstruct kbase_ipa_model_vinstr_data *model_data;\n+\n+\t\t/* true if IPA is currently using vinstr */\n+\t\tbool vinstr_active;\n \t} ipa;\n #endif /* CONFIG_DEVFREQ_THERMAL */\n #endif /* CONFIG_MALI_BIFROST_DEVFREQ */\n@@ -1149,79 +1584,52 @@ struct kbase_device {\n \tstruct kbase_trace_kbdev_timeline timeline;\n #endif\n \n-\t/*\n-\t * Control for enabling job dump on failure, set when control debugfs\n-\t * is opened.\n-\t */\n \tbool job_fault_debug;\n \n #ifdef CONFIG_DEBUG_FS\n-\t/* directory for debugfs entries */\n \tstruct dentry *mali_debugfs_directory;\n-\t/* Root directory for per context entry */\n \tstruct dentry *debugfs_ctx_directory;\n \n #ifdef CONFIG_MALI_BIFROST_DEBUG\n-\t/* bit for each as, set if there is new data to report */\n \tu64 debugfs_as_read_bitmap;\n #endif /* CONFIG_MALI_BIFROST_DEBUG */\n \n-\t/* failed job dump, used for separate debug process */\n \twait_queue_head_t job_fault_wq;\n \twait_queue_head_t job_fault_resume_wq;\n \tstruct workqueue_struct *job_fault_resume_workq;\n \tstruct list_head job_fault_event_list;\n \tspinlock_t job_fault_event_lock;\n-\tstruct kbase_context *kctx_fault;\n \n #if !MALI_CUSTOMER_RELEASE\n-\t/* Per-device data for register dumping interface */\n \tstruct {\n-\t\tu16 reg_offset; /* Offset of a GPU_CONTROL register to be\n-\t\t\t\t   dumped upon request */\n+\t\tu16 reg_offset;\n \t} regs_dump_debugfs_data;\n #endif /* !MALI_CUSTOMER_RELEASE */\n #endif /* CONFIG_DEBUG_FS */\n \n-\t/* fbdump profiling controls set by gator */\n \tu32 kbase_profiling_controls[FBDUMP_CONTROL_MAX];\n \n \n #if MALI_CUSTOMER_RELEASE == 0\n-\t/* Number of jobs that are run before a job is forced to fail and\n-\t * replay. May be KBASEP_FORCE_REPLAY_DISABLED, to disable forced\n-\t * failures. */\n \tint force_replay_limit;\n-\t/* Count of jobs between forced failures. Incremented on each job. A\n-\t * job is forced to fail once this is greater than or equal to\n-\t * force_replay_limit. */\n \tint force_replay_count;\n-\t/* Core requirement for jobs to be failed and replayed. May be zero. */\n \tbase_jd_core_req force_replay_core_req;\n-\t/* true if force_replay_limit should be randomized. The random\n-\t * value will be in the range of 1 - KBASEP_FORCE_REPLAY_RANDOM_LIMIT.\n-\t */\n \tbool force_replay_random;\n #endif\n \n-\t/* Total number of created contexts */\n \tatomic_t ctx_num;\n \n #ifdef CONFIG_DEBUG_FS\n-\t/* Holds the most recent register accesses */\n \tstruct kbase_io_history io_history;\n #endif /* CONFIG_DEBUG_FS */\n \n \tstruct kbase_hwaccess_data hwaccess;\n \n-\t/* Count of page/bus faults waiting for workqueues to process */\n \tatomic_t faults_pending;\n \n-\t/* true if GPU is powered off or power off operation is in progress */\n \tbool poweroff_pending;\n \n \n-\t/* defaults for new context created for this device */\n #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0))\n \tbool infinite_cache_active_default;\n #else\n@@ -1229,65 +1637,45 @@ struct kbase_device {\n #endif\n \tsize_t mem_pool_max_size_default;\n \n-\t/* current gpu coherency mode */\n \tu32 current_gpu_coherency_mode;\n-\t/* system coherency mode  */\n \tu32 system_coherency;\n-\t/* Flag to track when cci snoops have been enabled on the interface */\n+\n \tbool cci_snoop_enabled;\n \n-\t/* SMC function IDs to call into Trusted firmware to enable/disable\n-\t * cache snooping. Value of 0 indicates that they are not used\n-\t */\n \tu32 snoop_enable_smc;\n \tu32 snoop_disable_smc;\n \n-\t/* Protected mode operations */\n \tstruct protected_mode_ops *protected_ops;\n \n-\t/* Protected device attached to this kbase device */\n \tstruct protected_mode_device *protected_dev;\n \n-\t/*\n-\t * true when GPU is put into protected mode\n-\t */\n \tbool protected_mode;\n \n-\t/*\n-\t * true when GPU is transitioning into or out of protected mode\n-\t */\n \tbool protected_mode_transition;\n \n-\t/*\n-\t * true if protected mode is supported\n-\t */\n \tbool protected_mode_support;\n \n-\n-#ifdef CONFIG_MALI_BIFROST_DEBUG\n-\twait_queue_head_t driver_inactive_wait;\n-\tbool driver_inactive;\n-#endif /* CONFIG_MALI_BIFROST_DEBUG */\n-\n #ifdef CONFIG_MALI_FPGA_BUS_LOGGER\n-\t/*\n-\t * Bus logger integration.\n-\t */\n \tstruct bus_logger_client *buslogger;\n #endif\n-\t/* Boolean indicating if an IRQ flush during reset is in progress. */\n+\n \tbool irq_reset_flush;\n \n-\t/* list of inited sub systems. Used during terminate/error recovery */\n \tu32 inited_subsys;\n \n \tspinlock_t hwaccess_lock;\n \n-\t/* Protects access to MMU operations */\n \tstruct mutex mmu_hw_mutex;\n \n-\t/* Current serialization mode. See KBASE_SERIALIZE_* for details */\n+\t/* See KBASE_SERIALIZE_* for details */\n \tu8 serialize_jobs;\n+\n+#ifdef CONFIG_MALI_JOB_DUMP\n+\tu8 backup_serialize_jobs;\n+#endif\n+\n+\t/* See KBASE_JS_*_PRIORITY_MODE for details. */\n+\tu32 js_ctx_scheduling_mode;\n };\n \n /**\n@@ -1344,6 +1732,26 @@ struct jsctx_queue {\n  * context, to disable use of implicit dma-buf fences. This is used to avoid\n  * potential synchronization deadlocks.\n  *\n+ * @KCTX_FORCE_SAME_VA: Set when BASE_MEM_SAME_VA should be forced on memory\n+ * allocations. For 64-bit clients it is enabled by default, and disabled by\n+ * default on 32-bit clients. Being able to clear this flag is only used for\n+ * testing purposes of the custom zone allocation on 64-bit user-space builds,\n+ * where we also require more control than is available through e.g. the JIT\n+ * allocation mechanism. However, the 64-bit user-space client must still\n+ * reserve a JIT region using KBASE_IOCTL_MEM_JIT_INIT\n+ *\n+ * @KCTX_PULLED_SINCE_ACTIVE_JS0: Set when the context has had an atom pulled\n+ * from it for job slot 0. This is reset when the context first goes active or\n+ * is re-activated on that slot.\n+ *\n+ * @KCTX_PULLED_SINCE_ACTIVE_JS1: Set when the context has had an atom pulled\n+ * from it for job slot 1. This is reset when the context first goes active or\n+ * is re-activated on that slot.\n+ *\n+ * @KCTX_PULLED_SINCE_ACTIVE_JS2: Set when the context has had an atom pulled\n+ * from it for job slot 2. This is reset when the context first goes active or\n+ * is re-activated on that slot.\n+ *\n  * All members need to be separate bits. This enum is intended for use in a\n  * bitmask where multiple values get OR-ed together.\n  */\n@@ -1359,6 +1767,10 @@ enum kbase_context_flags {\n \tKCTX_SCHEDULED = 1U << 8,\n \tKCTX_DYING = 1U << 9,\n \tKCTX_NO_IMPLICIT_SYNC = 1U << 10,\n+\tKCTX_FORCE_SAME_VA = 1U << 11,\n+\tKCTX_PULLED_SINCE_ACTIVE_JS0 = 1U << 12,\n+\tKCTX_PULLED_SINCE_ACTIVE_JS1 = 1U << 13,\n+\tKCTX_PULLED_SINCE_ACTIVE_JS2 = 1U << 14,\n };\n \n struct kbase_sub_alloc {\n@@ -1367,10 +1779,239 @@ struct kbase_sub_alloc {\n \tDECLARE_BITMAP(sub_pages, SZ_2M / SZ_4K);\n };\n \n+/**\n+ * struct kbase_context - Object representing an entity, among which GPU is\n+ *                        scheduled and gets its own GPU address space.\n+ *                        Created when the device file /dev/malixx is opened.\n+ * @filp:                 Pointer to the struct file corresponding to device file\n+ *                        /dev/malixx instance, passed to the file's open method.\n+ * @kbdev:                Pointer to the Kbase device for which the context is created.\n+ * @id:                   Unique indentifier for the context, indicates the number of\n+ *                        contexts which have been created for the device so far.\n+ * @api_version:          contains the version number for User/kernel interface,\n+ *                        used for compatibility check.\n+ * @pgd:                  Physical address of the page allocated for the top level\n+ *                        page table of the context, this will be used for MMU Hw\n+ *                        programming as the address translation will start from\n+ *                        the top level page table.\n+ * @event_list:           list of posted events about completed atoms, to be sent to\n+ *                        event handling thread of Userpsace.\n+ * @event_coalesce_list:  list containing events corresponding to successive atoms\n+ *                        which have requested deferred delivery of the completion\n+ *                        events to Userspace.\n+ * @event_mutex:          Lock to protect the concurrent access to @event_list &\n+ *                        @event_mutex.\n+ * @event_closed:         Flag set through POST_TERM ioctl, indicates that Driver\n+ *                        should stop posting events and also inform event handling\n+ *                        thread that context termination is in progress.\n+ * @event_workq:          Workqueue for processing work items corresponding to atoms\n+ *                        that do not return an event to Userspace or have to perform\n+ *                        a replay job\n+ * @event_count:          Count of the posted events to be consumed by Userspace.\n+ * @event_coalesce_count: Count of the events present in @event_coalesce_list.\n+ * @flags:                bitmap of enums from kbase_context_flags, indicating the\n+ *                        state & attributes for the context.\n+ * @setup_complete:       Indicates if the setup for context has completed, i.e.\n+ *                        flags have been set for the context. Driver allows only\n+ *                        2 ioctls until the setup is done. Valid only for\n+ *                        @api_version value 0.\n+ * @setup_in_progress:    Indicates if the context's setup is in progress and other\n+ *                        setup calls during that shall be rejected.\n+ * @mmu_teardown_pages:   Buffer of 4 Pages in size, used to cache the entries of\n+ *                        top & intermediate level page tables to avoid repeated\n+ *                        calls to kmap_atomic during the MMU teardown.\n+ * @aliasing_sink_page:   Special page used for KBASE_MEM_TYPE_ALIAS allocations,\n+ *                        which can alias number of memory regions. The page is\n+ *                        represent a region where it is mapped with a write-alloc\n+ *                        cache setup, typically used when the write result of the\n+ *                        GPU isn't needed, but the GPU must write anyway.\n+ * @mem_partials_lock:    Lock for protecting the operations done on the elements\n+ *                        added to @mem_partials list.\n+ * @mem_partials:         List head for the list of large pages, 2MB in size, which\n+ *                        which have been split into 4 KB pages and are used\n+ *                        partially for the allocations >= 2 MB in size.\n+ * @mmu_lock:             Lock to serialize the accesses made to multi level GPU\n+ *                        page tables, maintained for every context.\n+ * @reg_lock:             Lock used for GPU virtual address space management operations,\n+ *                        like adding/freeing a memory region in the address space.\n+ *                        Can be converted to a rwlock ?.\n+ * @reg_rbtree_same:      RB tree of the memory regions allocated from the SAME_VA\n+ *                        zone of the GPU virtual address space. Used for allocations\n+ *                        having the same value for GPU & CPU virtual address.\n+ * @reg_rbtree_exec:      RB tree of the memory regions allocated from the EXEC\n+ *                        zone of the GPU virtual address space. Used for\n+ *                        allocations containing executable code for\n+ *                        shader programs.\n+ * @reg_rbtree_custom:    RB tree of the memory regions allocated from the CUSTOM_VA\n+ *                        zone of the GPU virtual address space.\n+ * @cookies:              Bitmask containing of BITS_PER_LONG bits, used mainly for\n+ *                        SAME_VA allocations to defer the reservation of memory region\n+ *                        (from the GPU virtual address space) from base_mem_alloc\n+ *                        ioctl to mmap system call. This helps returning unique\n+ *                        handles, disguised as GPU VA, to Userspace from base_mem_alloc\n+ *                        and later retrieving the pointer to memory region structure\n+ *                        in the mmap handler.\n+ * @pending_regions:      Array containing pointers to memory region structures,\n+ *                        used in conjunction with @cookies bitmask mainly for\n+ *                        providing a mechansim to have the same value for CPU &\n+ *                        GPU virtual address.\n+ * @event_queue:          Wait queue used for blocking the thread, which consumes\n+ *                        the base_jd_event corresponding to an atom, when there\n+ *                        are no more posted events.\n+ * @tgid:                 thread group id of the process, whose thread opened the\n+ *                        device file /dev/malixx instance to create a context.\n+ * @pid:                  id of the thread, corresponding to process @tgid, which\n+ *                        actually which opened the device file.\n+ * @jctx:                 object encapsulating all the Job dispatcher related state,\n+ *                        including the array of atoms.\n+ * @used_pages:           Keeps a track of the number of 4KB physical pages in use\n+ *                        for the context.\n+ * @nonmapped_pages:      Updated in the same way as @used_pages, except for the case\n+ *                        when special tracking page is freed by userspace where it\n+ *                        is reset to 0.\n+ * @mem_pool:             Object containing the state for the context specific pool of\n+ *                        4KB size physical pages.\n+ * @lp_mem_pool:          Object containing the state for the context specific pool of\n+ *                        2MB size physical pages.\n+ * @reclaim:              Shrinker object registered with the kernel containing\n+ *                        the pointer to callback function which is invoked under\n+ *                        low memory conditions. In the callback function Driver\n+ *                        frees up the memory for allocations marked as\n+ *                        evictable/reclaimable.\n+ * @evict_list:           List head for the list containing the allocations which\n+ *                        can be evicted or freed up in the shrinker callback.\n+ * @waiting_soft_jobs:    List head for the list containing softjob atoms, which\n+ *                        are either waiting for the event set operation, or waiting\n+ *                        for the signaling of input fence or waiting for the GPU\n+ *                        device to powered on so as to dump the CPU/GPU timestamps.\n+ * @waiting_soft_jobs_lock: Lock to protect @waiting_soft_jobs list from concurrent\n+ *                        accesses.\n+ * @dma_fence:            Object containing list head for the list of dma-buf fence\n+ *                        waiting atoms and the waitqueue to process the work item\n+ *                        queued for the atoms blocked on the signaling of dma-buf\n+ *                        fences.\n+ * @as_nr:                id of the address space being used for the scheduled in\n+ *                        context. This is effectively part of the Run Pool, because\n+ *                        it only has a valid setting (!=KBASEP_AS_NR_INVALID) whilst\n+ *                        the context is scheduled in. The hwaccess_lock must be held\n+ *                        whilst accessing this.\n+ *                        If the context relating to this value of as_nr is required,\n+ *                        then the context must be retained to ensure that it doesn't\n+ *                        disappear whilst it is being used. Alternatively, hwaccess_lock\n+ *                        can be held to ensure the context doesn't disappear (but this\n+ *                        has restrictions on what other locks can be taken simutaneously).\n+ * @refcount:             Keeps track of the number of users of this context. A user\n+ *                        can be a job that is available for execution, instrumentation\n+ *                        needing to 'pin' a context for counter collection, etc.\n+ *                        If the refcount reaches 0 then this context is considered\n+ *                        inactive and the previously programmed AS might be cleared\n+ *                        at any point.\n+ *                        Generally the reference count is incremented when the context\n+ *                        is scheduled in and an atom is pulled from the context's per\n+ *                        slot runnable tree.\n+ * @mm_update_lock:       lock used for handling of special tracking page.\n+ * @process_mm:           Pointer to the memory descriptor of the process which\n+ *                        created the context. Used for accounting the physical\n+ *                        pages used for GPU allocations, done for the context,\n+ *                        to the memory consumed by the process.\n+ * @same_va_end:          End address of the SAME_VA zone (in 4KB page units)\n+ * @timeline:             Object tracking the number of atoms currently in flight for\n+ *                        the context and thread group id of the process, i.e. @tgid.\n+ * @mem_profile_data:     Buffer containing the profiling information provided by\n+ *                        Userspace, can be read through the mem_profile debugfs file.\n+ * @mem_profile_size:     Size of the @mem_profile_data.\n+ * @mem_profile_lock:     Lock to serialize the operations related to mem_profile\n+ *                        debugfs file.\n+ * @kctx_dentry:          Pointer to the debugfs directory created for every context,\n+ *                        inside kbase_device::debugfs_ctx_directory, containing\n+ *                        context specific files.\n+ * @reg_dump:             Buffer containing a register offset & value pair, used\n+ *                        for dumping job fault debug info.\n+ * @job_fault_count:      Indicates that a job fault occurred for the context and\n+ *                        dumping of its debug info is in progress.\n+ * @job_fault_resume_event_list: List containing atoms completed after the faulty\n+ *                        atom but before the debug data for faulty atom was dumped.\n+ * @jsctx_queue:          Per slot & priority arrays of object containing the root\n+ *                        of RB-tree holding currently runnable atoms on the job slot\n+ *                        and the head item of the linked list of atoms blocked on\n+ *                        cross-slot dependencies.\n+ * @atoms_pulled:         Total number of atoms currently pulled from the context.\n+ * @atoms_pulled_slot:    Per slot count of the number of atoms currently pulled\n+ *                        from the context.\n+ * @atoms_pulled_slot_pri: Per slot & priority count of the number of atoms currently\n+ *                        pulled from the context. hwaccess_lock shall be held when\n+ *                        accessing it.\n+ * @blocked_js:           Indicates if the context is blocked from submitting atoms\n+ *                        on a slot at a given priority. This is set to true, when\n+ *                        the atom corresponding to context is soft/hard stopped or\n+ *                        removed from the HEAD_NEXT register in response to\n+ *                        soft/hard stop.\n+ * @slots_pullable:       Bitmask of slots, indicating the slots for which the\n+ *                        context has pullable atoms in the runnable tree.\n+ * @work:                 Work structure used for deferred ASID assignment.\n+ * @vinstr_cli:           Pointer to the legacy userspace vinstr client, there can\n+ *                        be only such client per kbase context.\n+ * @vinstr_cli_lock:      Lock used for the vinstr ioctl calls made for @vinstr_cli.\n+ * @completed_jobs:       List containing completed atoms for which base_jd_event is\n+ *                        to be posted.\n+ * @work_count:           Number of work items, corresponding to atoms, currently\n+ *                        pending on job_done workqueue of @jctx.\n+ * @soft_job_timeout:     Timer object used for failing/cancelling the waiting\n+ *                        soft-jobs which have been blocked for more than the\n+ *                        timeout value used for the soft-jobs\n+ * @jit_alloc:            Array of 256 pointers to GPU memory regions, used for\n+ *                        for JIT allocations.\n+ * @jit_max_allocations:  Maximum number of JIT allocations allowed at once.\n+ * @jit_current_allocations: Current number of in-flight JIT allocations.\n+ * @jit_current_allocations_per_bin: Current number of in-flight JIT allocations per bin\n+ * @jit_version:          version number indicating whether userspace is using\n+ *                        old or new version of interface for JIT allocations\n+ *\t                  1 -> client used KBASE_IOCTL_MEM_JIT_INIT_OLD\n+ *\t                  2 -> client used KBASE_IOCTL_MEM_JIT_INIT\n+ * @jit_active_head:      List containing the JIT allocations which are in use.\n+ * @jit_pool_head:        List containing the JIT allocations which have been\n+ *                        freed up by userpsace and so not being used by them.\n+ *                        Driver caches them to quickly fulfill requests for new\n+ *                        JIT allocations. They are released in case of memory\n+ *                        pressure as they are put on the @evict_list when they\n+ *                        are freed up by userspace.\n+ * @jit_destroy_head:     List containing the JIT allocations which were moved to it\n+ *                        from @jit_pool_head, in the shrinker callback, after freeing\n+ *                        their backing physical pages.\n+ * @jit_evict_lock:       Lock used for operations done on JIT allocations and also\n+ *                        for accessing @evict_list.\n+ * @jit_work:             Work item queued to defer the freeing of memory region when\n+ *                        JIT allocation is moved to @jit_destroy_head.\n+ * @jit_atoms_head:       A list of the JIT soft-jobs, both alloc & free, in submission\n+ *                        order, protected by kbase_jd_context.lock.\n+ * @jit_pending_alloc:    A list of JIT alloc soft-jobs for which allocation will be\n+ *                        reattempted after the impending free of other active JIT\n+ *                        allocations.\n+ * @ext_res_meta_head:    A list of sticky external resources which were requested to\n+ *                        be mapped on GPU side, through a softjob atom of type\n+ *                        EXT_RES_MAP or STICKY_RESOURCE_MAP ioctl.\n+ * @drain_pending:        Used to record that a flush/invalidate of the GPU caches was\n+ *                        requested from atomic context, so that the next flush request\n+ *                        can wait for the flush of GPU writes.\n+ * @age_count:            Counter incremented on every call to jd_submit_atom,\n+ *                        atom is assigned the snapshot of this counter, which\n+ *                        is used to determine the atom's age when it is added to\n+ *                        the runnable RB-tree.\n+ * @trim_level:           Level of JIT allocation trimming to perform on free (0-100%)\n+ * @gwt_enabled:          Indicates if tracking of GPU writes is enabled, protected by\n+ *                        kbase_context.reg_lock.\n+ * @gwt_was_enabled:      Simple sticky bit flag to know if GWT was ever enabled.\n+ * @gwt_current_list:     A list of addresses for which GPU has generated write faults,\n+ *                        after the last snapshot of it was sent to userspace.\n+ * @gwt_snapshot_list:    Snapshot of the @gwt_current_list for sending to user space.\n+ * @priority:             Indicates the context priority. Used along with @atoms_count\n+ *                        for context scheduling, protected by hwaccess_lock.\n+ * @atoms_count:          Number of gpu atoms currently in use, per priority\n+ */\n struct kbase_context {\n \tstruct file *filp;\n \tstruct kbase_device *kbdev;\n-\tu32 id; /* System wide unique id */\n+\tu32 id;\n \tunsigned long api_version;\n \tphys_addr_t pgd;\n \tstruct list_head event_list;\n@@ -1394,13 +2035,10 @@ struct kbase_context {\n \tstruct list_head        mem_partials;\n \n \tstruct mutex            mmu_lock;\n-\tstruct mutex            reg_lock; /* To be converted to a rwlock? */\n-\tstruct rb_root reg_rbtree_same; /* RB tree of GPU (live) regions,\n-\t\t\t\t\t * SAME_VA zone */\n-\tstruct rb_root reg_rbtree_exec; /* RB tree of GPU (live) regions,\n-\t\t\t\t\t * EXEC zone */\n-\tstruct rb_root reg_rbtree_custom; /* RB tree of GPU (live) regions,\n-\t\t\t\t\t * CUSTOM_VA zone */\n+\tstruct mutex            reg_lock;\n+\tstruct rb_root reg_rbtree_same;\n+\tstruct rb_root reg_rbtree_exec;\n+\tstruct rb_root reg_rbtree_custom;\n \n \tunsigned long    cookies;\n \tstruct kbase_va_region *pending_regions[BITS_PER_LONG];\n@@ -1421,33 +2059,15 @@ struct kbase_context {\n \n \tstruct list_head waiting_soft_jobs;\n \tspinlock_t waiting_soft_jobs_lock;\n-#ifdef CONFIG_KDS\n-\tstruct list_head waiting_kds_resource;\n-#endif\n #ifdef CONFIG_MALI_BIFROST_DMA_FENCE\n \tstruct {\n \t\tstruct list_head waiting_resource;\n \t\tstruct workqueue_struct *wq;\n \t} dma_fence;\n #endif /* CONFIG_MALI_BIFROST_DMA_FENCE */\n-\t/** This is effectively part of the Run Pool, because it only has a valid\n-\t * setting (!=KBASEP_AS_NR_INVALID) whilst the context is scheduled in\n-\t *\n-\t * The hwaccess_lock must be held whilst accessing this.\n-\t *\n-\t * If the context relating to this as_nr is required, you must use\n-\t * kbasep_js_runpool_retain_ctx() to ensure that the context doesn't disappear\n-\t * whilst you're using it. Alternatively, just hold the hwaccess_lock\n-\t * to ensure the context doesn't disappear (but this has restrictions on what other locks\n-\t * you can take whilst doing this) */\n+\n \tint as_nr;\n \n-\t/* Keeps track of the number of users of this context. A user can be a\n-\t * job that is available for execution, instrumentation needing to 'pin'\n-\t * a context for counter collection, etc. If the refcount reaches 0 then\n-\t * this context is considered inactive and the previously programmed\n-\t * AS might be cleared at any point.\n-\t */\n \tatomic_t refcount;\n \n \t/* NOTE:\n@@ -1458,28 +2078,19 @@ struct kbase_context {\n \t * All other flags must be added there */\n \tspinlock_t         mm_update_lock;\n \tstruct mm_struct *process_mm;\n-\t/* End of the SAME_VA zone */\n \tu64 same_va_end;\n \n #ifdef CONFIG_MALI_BIFROST_TRACE_TIMELINE\n \tstruct kbase_trace_kctx_timeline timeline;\n #endif\n #ifdef CONFIG_DEBUG_FS\n-\t/* Content of mem_profile file */\n \tchar *mem_profile_data;\n-\t/* Size of @c mem_profile_data */\n \tsize_t mem_profile_size;\n-\t/* Mutex guarding memory profile state */\n \tstruct mutex mem_profile_lock;\n-\t/* Memory profile directory under debugfs */\n \tstruct dentry *kctx_dentry;\n \n-\t/* for job fault debug */\n \tunsigned int *reg_dump;\n \tatomic_t job_fault_count;\n-\t/* This list will keep the following atoms during the dump\n-\t * in the same context\n-\t */\n \tstruct list_head job_fault_resume_event_list;\n \n #endif /* CONFIG_DEBUG_FS */\n@@ -1487,67 +2098,82 @@ struct kbase_context {\n \tstruct jsctx_queue jsctx_queue\n \t\t[KBASE_JS_ATOM_SCHED_PRIO_COUNT][BASE_JM_MAX_NR_SLOTS];\n \n-\t/* Number of atoms currently pulled from this context */\n \tatomic_t atoms_pulled;\n-\t/* Number of atoms currently pulled from this context, per slot */\n \tatomic_t atoms_pulled_slot[BASE_JM_MAX_NR_SLOTS];\n-\t/* Number of atoms currently pulled from this context, per slot and\n-\t * priority. Hold hwaccess_lock when accessing */\n \tint atoms_pulled_slot_pri[BASE_JM_MAX_NR_SLOTS][\n \t\t\tKBASE_JS_ATOM_SCHED_PRIO_COUNT];\n \n-\t/* true if slot is blocked on the given priority. This will be set on a\n-\t * soft-stop */\n \tbool blocked_js[BASE_JM_MAX_NR_SLOTS][KBASE_JS_ATOM_SCHED_PRIO_COUNT];\n \n-\t/* Bitmask of slots that can be pulled from */\n \tu32 slots_pullable;\n \n-\t/* Backend specific data */\n-\tstruct kbase_context_backend backend;\n-\n-\t/* Work structure used for deferred ASID assignment */\n \tstruct work_struct work;\n \n-\t/* Only one userspace vinstr client per kbase context */\n \tstruct kbase_vinstr_client *vinstr_cli;\n \tstruct mutex vinstr_cli_lock;\n \n-\t/* List of completed jobs waiting for events to be posted */\n \tstruct list_head completed_jobs;\n-\t/* Number of work items currently pending on job_done_wq */\n \tatomic_t work_count;\n \n-\t/* Waiting soft-jobs will fail when this timer expires */\n \tstruct timer_list soft_job_timeout;\n \n-\t/* JIT allocation management */\n \tstruct kbase_va_region *jit_alloc[256];\n+\tu8 jit_max_allocations;\n+\tu8 jit_current_allocations;\n+\tu8 jit_current_allocations_per_bin[256];\n+\tu8 jit_version;\n \tstruct list_head jit_active_head;\n \tstruct list_head jit_pool_head;\n \tstruct list_head jit_destroy_head;\n \tstruct mutex jit_evict_lock;\n \tstruct work_struct jit_work;\n \n-\t/* A list of the JIT soft-jobs in submission order\n-\t * (protected by kbase_jd_context.lock)\n-\t */\n \tstruct list_head jit_atoms_head;\n-\t/* A list of pending JIT alloc soft-jobs (using the 'queue' list_head)\n-\t * (protected by kbase_jd_context.lock)\n-\t */\n \tstruct list_head jit_pending_alloc;\n \n-\t/* External sticky resource management */\n \tstruct list_head ext_res_meta_head;\n \n-\t/* Used to record that a drain was requested from atomic context */\n \tatomic_t drain_pending;\n \n-\t/* Current age count, used to determine age for newly submitted atoms */\n \tu32 age_count;\n+\n+\tu8 trim_level;\n+\n+#ifdef CONFIG_MALI_JOB_DUMP\n+\tbool gwt_enabled;\n+\n+\tbool gwt_was_enabled;\n+\n+\tstruct list_head gwt_current_list;\n+\n+\tstruct list_head gwt_snapshot_list;\n+#endif\n+\n+\tint priority;\n+\ts16 atoms_count[KBASE_JS_ATOM_SCHED_PRIO_COUNT];\n };\n \n+#ifdef CONFIG_MALI_JOB_DUMP\n+/**\n+ * struct kbasep_gwt_list_element - Structure used to collect GPU\n+ *                                  write faults.\n+ * @link:                           List head for adding write faults.\n+ * @region:                         Details of the region where we have the\n+ *                                  faulting page address.\n+ * @page_addr:                      Page address where GPU write fault occurred.\n+ * @num_pages:                      The number of pages modified.\n+ *\n+ * Using this structure all GPU write faults are stored in a list.\n+ */\n+struct kbasep_gwt_list_element {\n+\tstruct list_head link;\n+\tstruct kbase_va_region *region;\n+\tu64 page_addr;\n+\tu64 num_pages;\n+};\n+\n+#endif\n+\n /**\n  * struct kbase_ctx_ext_res_meta - Structure which binds an external resource\n  *                                 to a @kbase_context.\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_device.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_device.c\nindex 2d11f11f3be0f9..005ae088686bdb 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_device.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_device.c\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Base kernel device APIs\n  */\n@@ -94,7 +99,6 @@ static int kbase_device_as_init(struct kbase_device *kbdev, int i)\n \t\t\tdestroy_workqueue(kbdev->as[i].pf_wq);\n \t\t\treturn -EINVAL;\n \t\t}\n-\t\tKBASE_DEBUG_ASSERT(!object_is_on_stack(poke_work));\n \t\tINIT_WORK(poke_work, kbasep_as_do_poke);\n \n \t\thrtimer_init(poke_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);\n@@ -250,10 +254,6 @@ int kbase_device_init(struct kbase_device * const kbdev)\n \telse\n \t\tkbdev->mmu_mode = kbase_mmu_mode_get_lpae();\n \n-#ifdef CONFIG_MALI_BIFROST_DEBUG\n-\tinit_waitqueue_head(&kbdev->driver_inactive_wait);\n-#endif /* CONFIG_MALI_BIFROST_DEBUG */\n-\n \treturn 0;\n term_trace:\n \tkbasep_trace_term(kbdev);\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_disjoint_events.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_disjoint_events.c\nindex f70bcccf4050f5..68eb4ed0715dd5 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_disjoint_events.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_disjoint_events.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * Base kernel disjoint events helper functions\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_dma_fence.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_dma_fence.c\nindex 8a571266534b1f..9af59bb56d1cbd 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_dma_fence.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_dma_fence.c\n@@ -7,15 +7,20 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /* Include mali_kbase_dma_fence.h before checking for CONFIG_MALI_BIFROST_DMA_FENCE as\n  * it will be set there.\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_dma_fence.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_dma_fence.h\nindex b02ea9774c4f93..1adb4fa00469b4 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_dma_fence.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_dma_fence.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_DMA_FENCE_H_\n #define _KBASE_DMA_FENCE_H_\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_event.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_event.c\nindex 188148645f374b..e290fceea6cd17 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_event.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_event.c\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #include <mali_kbase.h>\n #include <mali_kbase_debug.h>\n #include <mali_kbase_tlstream.h>\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_fence.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_fence.c\nindex fcb373372596a1..ac8272c900bba3 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_fence.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_fence.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <linux/atomic.h>\n #include <linux/list.h>\n #include <linux/spinlock.h>\n@@ -176,8 +181,13 @@ kbase_fence_add_callback(struct kbase_jd_atom *katom,\n \terr = dma_fence_add_callback(fence, &kbase_fence_cb->fence_cb,\n \t\t\t\t     callback);\n \tif (err == -ENOENT) {\n-\t\t/* Fence signaled, clear the error and return */\n-\t\terr = 0;\n+\t\t/* Fence signaled, get the completion result */\n+\t\terr = dma_fence_get_status(fence);\n+\n+\t\t/* remap success completion to err code */\n+\t\tif (err == 1)\n+\t\t\terr = 0;\n+\n \t\tkfree(kbase_fence_cb);\n \t} else if (err) {\n \t\tkfree(kbase_fence_cb);\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_fence.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_fence.h\nindex 9f59d30a1e2e8f..414f3f4d743675 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_fence.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_fence.h\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_FENCE_H_\n #define _KBASE_FENCE_H_\n \n@@ -134,8 +139,11 @@ static inline bool kbase_fence_out_is_ours(struct kbase_jd_atom *katom)\n static inline int kbase_fence_out_signal(struct kbase_jd_atom *katom,\n \t\t\t\t\t int status)\n {\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0))\n-\tkatom->dma_fence.fence->error = status;\n+#if (KERNEL_VERSION(4, 10, 0) > LINUX_VERSION_CODE && \\\n+\t  KERNEL_VERSION(4, 9, 68) <= LINUX_VERSION_CODE)\n+\tfence_set_error(katom->dma_fence.fence, status);\n+#elif (KERNEL_VERSION(4, 11, 0) <= LINUX_VERSION_CODE)\n+\tdma_fence_set_error(katom->dma_fence.fence, status);\n #else\n \tkatom->dma_fence.fence->status = status;\n #endif\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_fence_defs.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_fence_defs.h\nindex d2d7c436918c60..475136430649c9 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_fence_defs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_fence_defs.h\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_FENCE_DEFS_H_\n #define _KBASE_FENCE_DEFS_H_\n \n@@ -40,10 +45,22 @@\n #define dma_fence_add_callback(a, b, c) fence_add_callback(a, b, c)\n #define dma_fence_remove_callback(a, b) fence_remove_callback(a, b)\n \n+#if (KERNEL_VERSION(4, 9, 68) <= LINUX_VERSION_CODE)\n+#define dma_fence_get_status(a) (fence_is_signaled(a) ? (a)->error ?: 1 : 0)\n+#else\n+#define dma_fence_get_status(a) (fence_is_signaled(a) ? (a)->status ?: 1 : 0)\n+#endif\n+\n #else\n \n #include <linux/dma-fence.h>\n \n+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))\n+#define dma_fence_get_status(a) (dma_fence_is_signaled(a) ? \\\n+\t(a)->status ?: 1 \\\n+\t: 0)\n+#endif\n+\n #endif /* < 4.10.0 */\n \n #endif /* CONFIG_MALI_BIFROST_DMA_FENCE || CONFIG_SYNC_FILE */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator.h\nindex 87697b15d9869d..aeaf439d30976d 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /* NB taken from gator  */\n /*\n  * List of possible actions to be controlled by DS-5 Streamline.\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_api.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_api.c\nindex 860e10159fb35d..040b2096bec6f6 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_api.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_api.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include \"mali_kbase.h\"\n #include \"mali_kbase_hw.h\"\n #include \"mali_kbase_mem_linux.h\"\n@@ -68,6 +73,10 @@ const char * const *kbase_gator_hwcnt_init_names(uint32_t *total_counters)\n \t\t\thardware_counters = hardware_counters_mali_tSIx;\n \t\t\tcount = ARRAY_SIZE(hardware_counters_mali_tSIx);\n \t\t\tbreak;\n+\t\tcase GPU_ID2_PRODUCT_TNOX:\n+\t\t\thardware_counters = hardware_counters_mali_tNOx;\n+\t\t\tcount = ARRAY_SIZE(hardware_counters_mali_tNOx);\n+\t\t\tbreak;\n \t\tdefault:\n \t\t\thardware_counters = NULL;\n \t\t\tcount = 0;\n@@ -149,7 +158,7 @@ KBASE_EXPORT_SYMBOL(kbase_gator_hwcnt_term_names);\n struct kbase_gator_hwcnt_handles *kbase_gator_hwcnt_init(struct kbase_gator_hwcnt_info *in_out_info)\n {\n \tstruct kbase_gator_hwcnt_handles *hand;\n-\tstruct kbase_uk_hwcnt_reader_setup setup;\n+\tstruct kbase_ioctl_hwcnt_reader_setup setup;\n \tuint32_t dump_size = 0, i = 0;\n \n \tif (!in_out_info)\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_api.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_api.h\nindex ef9ac0f7b633d9..bd0589ed6c1a0e 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_api.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_api.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_GATOR_API_H_\n #define _KBASE_GATOR_API_H_\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names.h\nindex 24103e292453d5..5d38c7b735531b 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_GATOR_HWCNT_NAMES_H_\n #define _KBASE_GATOR_HWCNT_NAMES_H_\n \n@@ -2162,6 +2167,12 @@ static const char * const hardware_counters_mali_t88x[] = {\n \n #include \"mali_kbase_gator_hwcnt_names_tsix.h\"\n \n+#include \"mali_kbase_gator_hwcnt_names_tnox.h\"\n+\n+#include \"mali_kbase_gator_hwcnt_names_tgox.h\"\n+\n+#include \"mali_kbase_gator_hwcnt_names_tkax.h\"\n \n+#include \"mali_kbase_gator_hwcnt_names_ttrx.h\"\n \n #endif\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tgox.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tgox.h\nnew file mode 100644\nindex 00000000000000..72b5266622a9d2\n--- /dev/null\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tgox.h\n@@ -0,0 +1,296 @@\n+/*\n+ *\n+ * (C) COPYRIGHT 2016-2018 ARM Limited. All rights reserved.\n+ *\n+ * This program is free software and is provided to you under the terms of the\n+ * GNU General Public License version 2 as published by the Free Software\n+ * Foundation, and any use by you of this program is subject to the terms\n+ * of such GNU licence.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n+ *\n+ */\n+\n+/*\n+ * This header was autogenerated, it should not be edited.\n+ */\n+\n+#ifndef _KBASE_GATOR_HWCNT_NAMES_TGOX_H_\n+#define _KBASE_GATOR_HWCNT_NAMES_TGOX_H_\n+\n+static const char * const hardware_counters_mali_tGOx[] = {\n+\t/* Performance counters for the Job Manager */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TGOx_MESSAGES_SENT\",\n+\t\"TGOx_MESSAGES_RECEIVED\",\n+\t\"TGOx_GPU_ACTIVE\",\n+\t\"TGOx_IRQ_ACTIVE\",\n+\t\"TGOx_JS0_JOBS\",\n+\t\"TGOx_JS0_TASKS\",\n+\t\"TGOx_JS0_ACTIVE\",\n+\t\"\",\n+\t\"TGOx_JS0_WAIT_READ\",\n+\t\"TGOx_JS0_WAIT_ISSUE\",\n+\t\"TGOx_JS0_WAIT_DEPEND\",\n+\t\"TGOx_JS0_WAIT_FINISH\",\n+\t\"TGOx_JS1_JOBS\",\n+\t\"TGOx_JS1_TASKS\",\n+\t\"TGOx_JS1_ACTIVE\",\n+\t\"\",\n+\t\"TGOx_JS1_WAIT_READ\",\n+\t\"TGOx_JS1_WAIT_ISSUE\",\n+\t\"TGOx_JS1_WAIT_DEPEND\",\n+\t\"TGOx_JS1_WAIT_FINISH\",\n+\t\"TGOx_JS2_JOBS\",\n+\t\"TGOx_JS2_TASKS\",\n+\t\"TGOx_JS2_ACTIVE\",\n+\t\"\",\n+\t\"TGOx_JS2_WAIT_READ\",\n+\t\"TGOx_JS2_WAIT_ISSUE\",\n+\t\"TGOx_JS2_WAIT_DEPEND\",\n+\t\"TGOx_JS2_WAIT_FINISH\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\n+\t/* Performance counters for the Tiler */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TGOx_TILER_ACTIVE\",\n+\t\"TGOx_JOBS_PROCESSED\",\n+\t\"TGOx_TRIANGLES\",\n+\t\"TGOx_LINES\",\n+\t\"TGOx_POINTS\",\n+\t\"TGOx_FRONT_FACING\",\n+\t\"TGOx_BACK_FACING\",\n+\t\"TGOx_PRIM_VISIBLE\",\n+\t\"TGOx_PRIM_CULLED\",\n+\t\"TGOx_PRIM_CLIPPED\",\n+\t\"TGOx_PRIM_SAT_CULLED\",\n+\t\"TGOx_BIN_ALLOC_INIT\",\n+\t\"TGOx_BIN_ALLOC_OVERFLOW\",\n+\t\"TGOx_BUS_READ\",\n+\t\"\",\n+\t\"TGOx_BUS_WRITE\",\n+\t\"TGOx_LOADING_DESC\",\n+\t\"TGOx_IDVS_POS_SHAD_REQ\",\n+\t\"TGOx_IDVS_POS_SHAD_WAIT\",\n+\t\"TGOx_IDVS_POS_SHAD_STALL\",\n+\t\"TGOx_IDVS_POS_FIFO_FULL\",\n+\t\"TGOx_PREFETCH_STALL\",\n+\t\"TGOx_VCACHE_HIT\",\n+\t\"TGOx_VCACHE_MISS\",\n+\t\"TGOx_VCACHE_LINE_WAIT\",\n+\t\"TGOx_VFETCH_POS_READ_WAIT\",\n+\t\"TGOx_VFETCH_VERTEX_WAIT\",\n+\t\"TGOx_VFETCH_STALL\",\n+\t\"TGOx_PRIMASSY_STALL\",\n+\t\"TGOx_BBOX_GEN_STALL\",\n+\t\"TGOx_IDVS_VBU_HIT\",\n+\t\"TGOx_IDVS_VBU_MISS\",\n+\t\"TGOx_IDVS_VBU_LINE_DEALLOCATE\",\n+\t\"TGOx_IDVS_VAR_SHAD_REQ\",\n+\t\"TGOx_IDVS_VAR_SHAD_STALL\",\n+\t\"TGOx_BINNER_STALL\",\n+\t\"TGOx_ITER_STALL\",\n+\t\"TGOx_COMPRESS_MISS\",\n+\t\"TGOx_COMPRESS_STALL\",\n+\t\"TGOx_PCACHE_HIT\",\n+\t\"TGOx_PCACHE_MISS\",\n+\t\"TGOx_PCACHE_MISS_STALL\",\n+\t\"TGOx_PCACHE_EVICT_STALL\",\n+\t\"TGOx_PMGR_PTR_WR_STALL\",\n+\t\"TGOx_PMGR_PTR_RD_STALL\",\n+\t\"TGOx_PMGR_CMD_WR_STALL\",\n+\t\"TGOx_WRBUF_ACTIVE\",\n+\t\"TGOx_WRBUF_HIT\",\n+\t\"TGOx_WRBUF_MISS\",\n+\t\"TGOx_WRBUF_NO_FREE_LINE_STALL\",\n+\t\"TGOx_WRBUF_NO_AXI_ID_STALL\",\n+\t\"TGOx_WRBUF_AXI_STALL\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TGOx_UTLB_TRANS\",\n+\t\"TGOx_UTLB_TRANS_HIT\",\n+\t\"TGOx_UTLB_TRANS_STALL\",\n+\t\"TGOx_UTLB_TRANS_MISS_DELAY\",\n+\t\"TGOx_UTLB_MMU_REQ\",\n+\n+\t/* Performance counters for the Shader Core */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TGOx_FRAG_ACTIVE\",\n+\t\"TGOx_FRAG_PRIMITIVES\",\n+\t\"TGOx_FRAG_PRIM_RAST\",\n+\t\"TGOx_FRAG_FPK_ACTIVE\",\n+\t\"TGOx_FRAG_STARVING\",\n+\t\"TGOx_FRAG_WARPS\",\n+\t\"TGOx_FRAG_PARTIAL_WARPS\",\n+\t\"TGOx_FRAG_QUADS_RAST\",\n+\t\"TGOx_FRAG_QUADS_EZS_TEST\",\n+\t\"TGOx_FRAG_QUADS_EZS_UPDATE\",\n+\t\"TGOx_FRAG_QUADS_EZS_KILL\",\n+\t\"TGOx_FRAG_LZS_TEST\",\n+\t\"TGOx_FRAG_LZS_KILL\",\n+\t\"TGOx_WARP_REG_SIZE_64\",\n+\t\"TGOx_FRAG_PTILES\",\n+\t\"TGOx_FRAG_TRANS_ELIM\",\n+\t\"TGOx_QUAD_FPK_KILLER\",\n+\t\"TGOx_FULL_QUAD_WARPS\",\n+\t\"TGOx_COMPUTE_ACTIVE\",\n+\t\"TGOx_COMPUTE_TASKS\",\n+\t\"TGOx_COMPUTE_WARPS\",\n+\t\"TGOx_COMPUTE_STARVING\",\n+\t\"TGOx_EXEC_CORE_ACTIVE\",\n+\t\"TGOx_EXEC_ACTIVE\",\n+\t\"TGOx_EXEC_INSTR_COUNT\",\n+\t\"TGOx_EXEC_INSTR_DIVERGED\",\n+\t\"TGOx_EXEC_INSTR_STARVING\",\n+\t\"TGOx_ARITH_INSTR_SINGLE_FMA\",\n+\t\"TGOx_ARITH_INSTR_DOUBLE\",\n+\t\"TGOx_ARITH_INSTR_MSG\",\n+\t\"TGOx_ARITH_INSTR_MSG_ONLY\",\n+\t\"TGOx_TEX_MSGI_NUM_QUADS\",\n+\t\"TGOx_TEX_DFCH_NUM_PASSES\",\n+\t\"TGOx_TEX_DFCH_NUM_PASSES_MISS\",\n+\t\"TGOx_TEX_DFCH_NUM_PASSES_MIP_MAP\",\n+\t\"TGOx_TEX_TIDX_NUM_SPLIT_MIP_MAP\",\n+\t\"TGOx_TEX_TFCH_NUM_LINES_FETCHED\",\n+\t\"TGOx_TEX_TFCH_NUM_LINES_FETCHED_BLOCK\",\n+\t\"TGOx_TEX_TFCH_NUM_OPERATIONS\",\n+\t\"TGOx_TEX_FILT_NUM_OPERATIONS\",\n+\t\"TGOx_LS_MEM_READ_FULL\",\n+\t\"TGOx_LS_MEM_READ_SHORT\",\n+\t\"TGOx_LS_MEM_WRITE_FULL\",\n+\t\"TGOx_LS_MEM_WRITE_SHORT\",\n+\t\"TGOx_LS_MEM_ATOMIC\",\n+\t\"TGOx_VARY_INSTR\",\n+\t\"TGOx_VARY_SLOT_32\",\n+\t\"TGOx_VARY_SLOT_16\",\n+\t\"TGOx_ATTR_INSTR\",\n+\t\"TGOx_ARITH_INSTR_FP_MUL\",\n+\t\"TGOx_BEATS_RD_FTC\",\n+\t\"TGOx_BEATS_RD_FTC_EXT\",\n+\t\"TGOx_BEATS_RD_LSC\",\n+\t\"TGOx_BEATS_RD_LSC_EXT\",\n+\t\"TGOx_BEATS_RD_TEX\",\n+\t\"TGOx_BEATS_RD_TEX_EXT\",\n+\t\"TGOx_BEATS_RD_OTHER\",\n+\t\"TGOx_BEATS_WR_LSC_WB\",\n+\t\"TGOx_BEATS_WR_TIB\",\n+\t\"TGOx_BEATS_WR_LSC_OTHER\",\n+\n+\t/* Performance counters for the Memory System */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TGOx_MMU_REQUESTS\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TGOx_L2_RD_MSG_IN\",\n+\t\"TGOx_L2_RD_MSG_IN_STALL\",\n+\t\"TGOx_L2_WR_MSG_IN\",\n+\t\"TGOx_L2_WR_MSG_IN_STALL\",\n+\t\"TGOx_L2_SNP_MSG_IN\",\n+\t\"TGOx_L2_SNP_MSG_IN_STALL\",\n+\t\"TGOx_L2_RD_MSG_OUT\",\n+\t\"TGOx_L2_RD_MSG_OUT_STALL\",\n+\t\"TGOx_L2_WR_MSG_OUT\",\n+\t\"TGOx_L2_ANY_LOOKUP\",\n+\t\"TGOx_L2_READ_LOOKUP\",\n+\t\"TGOx_L2_WRITE_LOOKUP\",\n+\t\"TGOx_L2_EXT_SNOOP_LOOKUP\",\n+\t\"TGOx_L2_EXT_READ\",\n+\t\"TGOx_L2_EXT_READ_NOSNP\",\n+\t\"TGOx_L2_EXT_READ_UNIQUE\",\n+\t\"TGOx_L2_EXT_READ_BEATS\",\n+\t\"TGOx_L2_EXT_AR_STALL\",\n+\t\"TGOx_L2_EXT_AR_CNT_Q1\",\n+\t\"TGOx_L2_EXT_AR_CNT_Q2\",\n+\t\"TGOx_L2_EXT_AR_CNT_Q3\",\n+\t\"TGOx_L2_EXT_RRESP_0_127\",\n+\t\"TGOx_L2_EXT_RRESP_128_191\",\n+\t\"TGOx_L2_EXT_RRESP_192_255\",\n+\t\"TGOx_L2_EXT_RRESP_256_319\",\n+\t\"TGOx_L2_EXT_RRESP_320_383\",\n+\t\"TGOx_L2_EXT_WRITE\",\n+\t\"TGOx_L2_EXT_WRITE_NOSNP_FULL\",\n+\t\"TGOx_L2_EXT_WRITE_NOSNP_PTL\",\n+\t\"TGOx_L2_EXT_WRITE_SNP_FULL\",\n+\t\"TGOx_L2_EXT_WRITE_SNP_PTL\",\n+\t\"TGOx_L2_EXT_WRITE_BEATS\",\n+\t\"TGOx_L2_EXT_W_STALL\",\n+\t\"TGOx_L2_EXT_AW_CNT_Q1\",\n+\t\"TGOx_L2_EXT_AW_CNT_Q2\",\n+\t\"TGOx_L2_EXT_AW_CNT_Q3\",\n+\t\"TGOx_L2_EXT_SNOOP\",\n+\t\"TGOx_L2_EXT_SNOOP_STALL\",\n+\t\"TGOx_L2_EXT_SNOOP_RESP_CLEAN\",\n+\t\"TGOx_L2_EXT_SNOOP_RESP_DATA\",\n+\t\"TGOx_L2_EXT_SNOOP_INTERNAL\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+};\n+\n+#endif /* _KBASE_GATOR_HWCNT_NAMES_TGOX_H_ */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_thex.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_thex.h\nindex 15fd4efdc6ca24..e24e91ab1ca4cb 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_thex.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_thex.h\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2016-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2016-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * This header was autogenerated, it should not be edited.\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tkax.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tkax.h\nnew file mode 100644\nindex 00000000000000..73db45c232f17e\n--- /dev/null\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tkax.h\n@@ -0,0 +1,296 @@\n+/*\n+ *\n+ * (C) COPYRIGHT 2016-2018 ARM Limited. All rights reserved.\n+ *\n+ * This program is free software and is provided to you under the terms of the\n+ * GNU General Public License version 2 as published by the Free Software\n+ * Foundation, and any use by you of this program is subject to the terms\n+ * of such GNU licence.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n+ *\n+ */\n+\n+/*\n+ * This header was autogenerated, it should not be edited.\n+ */\n+\n+#ifndef _KBASE_GATOR_HWCNT_NAMES_TKAX_H_\n+#define _KBASE_GATOR_HWCNT_NAMES_TKAX_H_\n+\n+static const char * const hardware_counters_mali_tKAx[] = {\n+\t/* Performance counters for the Job Manager */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TKAx_MESSAGES_SENT\",\n+\t\"TKAx_MESSAGES_RECEIVED\",\n+\t\"TKAx_GPU_ACTIVE\",\n+\t\"TKAx_IRQ_ACTIVE\",\n+\t\"TKAx_JS0_JOBS\",\n+\t\"TKAx_JS0_TASKS\",\n+\t\"TKAx_JS0_ACTIVE\",\n+\t\"\",\n+\t\"TKAx_JS0_WAIT_READ\",\n+\t\"TKAx_JS0_WAIT_ISSUE\",\n+\t\"TKAx_JS0_WAIT_DEPEND\",\n+\t\"TKAx_JS0_WAIT_FINISH\",\n+\t\"TKAx_JS1_JOBS\",\n+\t\"TKAx_JS1_TASKS\",\n+\t\"TKAx_JS1_ACTIVE\",\n+\t\"\",\n+\t\"TKAx_JS1_WAIT_READ\",\n+\t\"TKAx_JS1_WAIT_ISSUE\",\n+\t\"TKAx_JS1_WAIT_DEPEND\",\n+\t\"TKAx_JS1_WAIT_FINISH\",\n+\t\"TKAx_JS2_JOBS\",\n+\t\"TKAx_JS2_TASKS\",\n+\t\"TKAx_JS2_ACTIVE\",\n+\t\"\",\n+\t\"TKAx_JS2_WAIT_READ\",\n+\t\"TKAx_JS2_WAIT_ISSUE\",\n+\t\"TKAx_JS2_WAIT_DEPEND\",\n+\t\"TKAx_JS2_WAIT_FINISH\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\n+\t/* Performance counters for the Tiler */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TKAx_TILER_ACTIVE\",\n+\t\"TKAx_JOBS_PROCESSED\",\n+\t\"TKAx_TRIANGLES\",\n+\t\"TKAx_LINES\",\n+\t\"TKAx_POINTS\",\n+\t\"TKAx_FRONT_FACING\",\n+\t\"TKAx_BACK_FACING\",\n+\t\"TKAx_PRIM_VISIBLE\",\n+\t\"TKAx_PRIM_CULLED\",\n+\t\"TKAx_PRIM_CLIPPED\",\n+\t\"TKAx_PRIM_SAT_CULLED\",\n+\t\"TKAx_BIN_ALLOC_INIT\",\n+\t\"TKAx_BIN_ALLOC_OVERFLOW\",\n+\t\"TKAx_BUS_READ\",\n+\t\"\",\n+\t\"TKAx_BUS_WRITE\",\n+\t\"TKAx_LOADING_DESC\",\n+\t\"TKAx_IDVS_POS_SHAD_REQ\",\n+\t\"TKAx_IDVS_POS_SHAD_WAIT\",\n+\t\"TKAx_IDVS_POS_SHAD_STALL\",\n+\t\"TKAx_IDVS_POS_FIFO_FULL\",\n+\t\"TKAx_PREFETCH_STALL\",\n+\t\"TKAx_VCACHE_HIT\",\n+\t\"TKAx_VCACHE_MISS\",\n+\t\"TKAx_VCACHE_LINE_WAIT\",\n+\t\"TKAx_VFETCH_POS_READ_WAIT\",\n+\t\"TKAx_VFETCH_VERTEX_WAIT\",\n+\t\"TKAx_VFETCH_STALL\",\n+\t\"TKAx_PRIMASSY_STALL\",\n+\t\"TKAx_BBOX_GEN_STALL\",\n+\t\"TKAx_IDVS_VBU_HIT\",\n+\t\"TKAx_IDVS_VBU_MISS\",\n+\t\"TKAx_IDVS_VBU_LINE_DEALLOCATE\",\n+\t\"TKAx_IDVS_VAR_SHAD_REQ\",\n+\t\"TKAx_IDVS_VAR_SHAD_STALL\",\n+\t\"TKAx_BINNER_STALL\",\n+\t\"TKAx_ITER_STALL\",\n+\t\"TKAx_COMPRESS_MISS\",\n+\t\"TKAx_COMPRESS_STALL\",\n+\t\"TKAx_PCACHE_HIT\",\n+\t\"TKAx_PCACHE_MISS\",\n+\t\"TKAx_PCACHE_MISS_STALL\",\n+\t\"TKAx_PCACHE_EVICT_STALL\",\n+\t\"TKAx_PMGR_PTR_WR_STALL\",\n+\t\"TKAx_PMGR_PTR_RD_STALL\",\n+\t\"TKAx_PMGR_CMD_WR_STALL\",\n+\t\"TKAx_WRBUF_ACTIVE\",\n+\t\"TKAx_WRBUF_HIT\",\n+\t\"TKAx_WRBUF_MISS\",\n+\t\"TKAx_WRBUF_NO_FREE_LINE_STALL\",\n+\t\"TKAx_WRBUF_NO_AXI_ID_STALL\",\n+\t\"TKAx_WRBUF_AXI_STALL\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TKAx_UTLB_TRANS\",\n+\t\"TKAx_UTLB_TRANS_HIT\",\n+\t\"TKAx_UTLB_TRANS_STALL\",\n+\t\"TKAx_UTLB_TRANS_MISS_DELAY\",\n+\t\"TKAx_UTLB_MMU_REQ\",\n+\n+\t/* Performance counters for the Shader Core */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TKAx_FRAG_ACTIVE\",\n+\t\"TKAx_FRAG_PRIMITIVES\",\n+\t\"TKAx_FRAG_PRIM_RAST\",\n+\t\"TKAx_FRAG_FPK_ACTIVE\",\n+\t\"TKAx_FRAG_STARVING\",\n+\t\"TKAx_FRAG_WARPS\",\n+\t\"TKAx_FRAG_PARTIAL_WARPS\",\n+\t\"TKAx_FRAG_QUADS_RAST\",\n+\t\"TKAx_FRAG_QUADS_EZS_TEST\",\n+\t\"TKAx_FRAG_QUADS_EZS_UPDATE\",\n+\t\"TKAx_FRAG_QUADS_EZS_KILL\",\n+\t\"TKAx_FRAG_LZS_TEST\",\n+\t\"TKAx_FRAG_LZS_KILL\",\n+\t\"TKAx_WARP_REG_SIZE_64\",\n+\t\"TKAx_FRAG_PTILES\",\n+\t\"TKAx_FRAG_TRANS_ELIM\",\n+\t\"TKAx_QUAD_FPK_KILLER\",\n+\t\"TKAx_FULL_QUAD_WARPS\",\n+\t\"TKAx_COMPUTE_ACTIVE\",\n+\t\"TKAx_COMPUTE_TASKS\",\n+\t\"TKAx_COMPUTE_WARPS\",\n+\t\"TKAx_COMPUTE_STARVING\",\n+\t\"TKAx_EXEC_CORE_ACTIVE\",\n+\t\"TKAx_EXEC_ACTIVE\",\n+\t\"TKAx_EXEC_INSTR_COUNT\",\n+\t\"TKAx_EXEC_INSTR_DIVERGED\",\n+\t\"TKAx_EXEC_INSTR_STARVING\",\n+\t\"TKAx_ARITH_INSTR_SINGLE_FMA\",\n+\t\"TKAx_ARITH_INSTR_DOUBLE\",\n+\t\"TKAx_ARITH_INSTR_MSG\",\n+\t\"TKAx_ARITH_INSTR_MSG_ONLY\",\n+\t\"TKAx_TEX_MSGI_NUM_QUADS\",\n+\t\"TKAx_TEX_DFCH_NUM_PASSES\",\n+\t\"TKAx_TEX_DFCH_NUM_PASSES_MISS\",\n+\t\"TKAx_TEX_DFCH_NUM_PASSES_MIP_MAP\",\n+\t\"TKAx_TEX_TIDX_NUM_SPLIT_MIP_MAP\",\n+\t\"TKAx_TEX_TFCH_NUM_LINES_FETCHED\",\n+\t\"TKAx_TEX_TFCH_NUM_LINES_FETCHED_BLOCK\",\n+\t\"TKAx_TEX_TFCH_NUM_OPERATIONS\",\n+\t\"TKAx_TEX_FILT_NUM_OPERATIONS\",\n+\t\"TKAx_LS_MEM_READ_FULL\",\n+\t\"TKAx_LS_MEM_READ_SHORT\",\n+\t\"TKAx_LS_MEM_WRITE_FULL\",\n+\t\"TKAx_LS_MEM_WRITE_SHORT\",\n+\t\"TKAx_LS_MEM_ATOMIC\",\n+\t\"TKAx_VARY_INSTR\",\n+\t\"TKAx_VARY_SLOT_32\",\n+\t\"TKAx_VARY_SLOT_16\",\n+\t\"TKAx_ATTR_INSTR\",\n+\t\"TKAx_ARITH_INSTR_FP_MUL\",\n+\t\"TKAx_BEATS_RD_FTC\",\n+\t\"TKAx_BEATS_RD_FTC_EXT\",\n+\t\"TKAx_BEATS_RD_LSC\",\n+\t\"TKAx_BEATS_RD_LSC_EXT\",\n+\t\"TKAx_BEATS_RD_TEX\",\n+\t\"TKAx_BEATS_RD_TEX_EXT\",\n+\t\"TKAx_BEATS_RD_OTHER\",\n+\t\"TKAx_BEATS_WR_LSC_OTHER\",\n+\t\"TKAx_BEATS_WR_TIB\",\n+\t\"TKAx_BEATS_WR_LSC_WB\",\n+\n+\t/* Performance counters for the Memory System */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TKAx_MMU_REQUESTS\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TKAx_L2_RD_MSG_IN\",\n+\t\"TKAx_L2_RD_MSG_IN_STALL\",\n+\t\"TKAx_L2_WR_MSG_IN\",\n+\t\"TKAx_L2_WR_MSG_IN_STALL\",\n+\t\"TKAx_L2_SNP_MSG_IN\",\n+\t\"TKAx_L2_SNP_MSG_IN_STALL\",\n+\t\"TKAx_L2_RD_MSG_OUT\",\n+\t\"TKAx_L2_RD_MSG_OUT_STALL\",\n+\t\"TKAx_L2_WR_MSG_OUT\",\n+\t\"TKAx_L2_ANY_LOOKUP\",\n+\t\"TKAx_L2_READ_LOOKUP\",\n+\t\"TKAx_L2_WRITE_LOOKUP\",\n+\t\"TKAx_L2_EXT_SNOOP_LOOKUP\",\n+\t\"TKAx_L2_EXT_READ\",\n+\t\"TKAx_L2_EXT_READ_NOSNP\",\n+\t\"TKAx_L2_EXT_READ_UNIQUE\",\n+\t\"TKAx_L2_EXT_READ_BEATS\",\n+\t\"TKAx_L2_EXT_AR_STALL\",\n+\t\"TKAx_L2_EXT_AR_CNT_Q1\",\n+\t\"TKAx_L2_EXT_AR_CNT_Q2\",\n+\t\"TKAx_L2_EXT_AR_CNT_Q3\",\n+\t\"TKAx_L2_EXT_RRESP_0_127\",\n+\t\"TKAx_L2_EXT_RRESP_128_191\",\n+\t\"TKAx_L2_EXT_RRESP_192_255\",\n+\t\"TKAx_L2_EXT_RRESP_256_319\",\n+\t\"TKAx_L2_EXT_RRESP_320_383\",\n+\t\"TKAx_L2_EXT_WRITE\",\n+\t\"TKAx_L2_EXT_WRITE_NOSNP_FULL\",\n+\t\"TKAx_L2_EXT_WRITE_NOSNP_PTL\",\n+\t\"TKAx_L2_EXT_WRITE_SNP_FULL\",\n+\t\"TKAx_L2_EXT_WRITE_SNP_PTL\",\n+\t\"TKAx_L2_EXT_WRITE_BEATS\",\n+\t\"TKAx_L2_EXT_W_STALL\",\n+\t\"TKAx_L2_EXT_AW_CNT_Q1\",\n+\t\"TKAx_L2_EXT_AW_CNT_Q2\",\n+\t\"TKAx_L2_EXT_AW_CNT_Q3\",\n+\t\"TKAx_L2_EXT_SNOOP\",\n+\t\"TKAx_L2_EXT_SNOOP_STALL\",\n+\t\"TKAx_L2_EXT_SNOOP_RESP_CLEAN\",\n+\t\"TKAx_L2_EXT_SNOOP_RESP_DATA\",\n+\t\"TKAx_L2_EXT_SNOOP_INTERNAL\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+};\n+\n+#endif /* _KBASE_GATOR_HWCNT_NAMES_TKAX_H_ */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tmix.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tmix.h\nindex 8a215f723570cc..63eac50e0cc723 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tmix.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tmix.h\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2016-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2016-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * This header was autogenerated, it should not be edited.\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tnox.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tnox.h\nnew file mode 100644\nindex 00000000000000..932663cfb6a958\n--- /dev/null\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tnox.h\n@@ -0,0 +1,296 @@\n+/*\n+ *\n+ * (C) COPYRIGHT 2016-2018 ARM Limited. All rights reserved.\n+ *\n+ * This program is free software and is provided to you under the terms of the\n+ * GNU General Public License version 2 as published by the Free Software\n+ * Foundation, and any use by you of this program is subject to the terms\n+ * of such GNU licence.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n+ *\n+ */\n+\n+/*\n+ * This header was autogenerated, it should not be edited.\n+ */\n+\n+#ifndef _KBASE_GATOR_HWCNT_NAMES_TNOX_H_\n+#define _KBASE_GATOR_HWCNT_NAMES_TNOX_H_\n+\n+static const char * const hardware_counters_mali_tNOx[] = {\n+\t/* Performance counters for the Job Manager */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TNOx_MESSAGES_SENT\",\n+\t\"TNOx_MESSAGES_RECEIVED\",\n+\t\"TNOx_GPU_ACTIVE\",\n+\t\"TNOx_IRQ_ACTIVE\",\n+\t\"TNOx_JS0_JOBS\",\n+\t\"TNOx_JS0_TASKS\",\n+\t\"TNOx_JS0_ACTIVE\",\n+\t\"\",\n+\t\"TNOx_JS0_WAIT_READ\",\n+\t\"TNOx_JS0_WAIT_ISSUE\",\n+\t\"TNOx_JS0_WAIT_DEPEND\",\n+\t\"TNOx_JS0_WAIT_FINISH\",\n+\t\"TNOx_JS1_JOBS\",\n+\t\"TNOx_JS1_TASKS\",\n+\t\"TNOx_JS1_ACTIVE\",\n+\t\"\",\n+\t\"TNOx_JS1_WAIT_READ\",\n+\t\"TNOx_JS1_WAIT_ISSUE\",\n+\t\"TNOx_JS1_WAIT_DEPEND\",\n+\t\"TNOx_JS1_WAIT_FINISH\",\n+\t\"TNOx_JS2_JOBS\",\n+\t\"TNOx_JS2_TASKS\",\n+\t\"TNOx_JS2_ACTIVE\",\n+\t\"\",\n+\t\"TNOx_JS2_WAIT_READ\",\n+\t\"TNOx_JS2_WAIT_ISSUE\",\n+\t\"TNOx_JS2_WAIT_DEPEND\",\n+\t\"TNOx_JS2_WAIT_FINISH\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\n+\t/* Performance counters for the Tiler */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TNOx_TILER_ACTIVE\",\n+\t\"TNOx_JOBS_PROCESSED\",\n+\t\"TNOx_TRIANGLES\",\n+\t\"TNOx_LINES\",\n+\t\"TNOx_POINTS\",\n+\t\"TNOx_FRONT_FACING\",\n+\t\"TNOx_BACK_FACING\",\n+\t\"TNOx_PRIM_VISIBLE\",\n+\t\"TNOx_PRIM_CULLED\",\n+\t\"TNOx_PRIM_CLIPPED\",\n+\t\"TNOx_PRIM_SAT_CULLED\",\n+\t\"TNOx_BIN_ALLOC_INIT\",\n+\t\"TNOx_BIN_ALLOC_OVERFLOW\",\n+\t\"TNOx_BUS_READ\",\n+\t\"\",\n+\t\"TNOx_BUS_WRITE\",\n+\t\"TNOx_LOADING_DESC\",\n+\t\"TNOx_IDVS_POS_SHAD_REQ\",\n+\t\"TNOx_IDVS_POS_SHAD_WAIT\",\n+\t\"TNOx_IDVS_POS_SHAD_STALL\",\n+\t\"TNOx_IDVS_POS_FIFO_FULL\",\n+\t\"TNOx_PREFETCH_STALL\",\n+\t\"TNOx_VCACHE_HIT\",\n+\t\"TNOx_VCACHE_MISS\",\n+\t\"TNOx_VCACHE_LINE_WAIT\",\n+\t\"TNOx_VFETCH_POS_READ_WAIT\",\n+\t\"TNOx_VFETCH_VERTEX_WAIT\",\n+\t\"TNOx_VFETCH_STALL\",\n+\t\"TNOx_PRIMASSY_STALL\",\n+\t\"TNOx_BBOX_GEN_STALL\",\n+\t\"TNOx_IDVS_VBU_HIT\",\n+\t\"TNOx_IDVS_VBU_MISS\",\n+\t\"TNOx_IDVS_VBU_LINE_DEALLOCATE\",\n+\t\"TNOx_IDVS_VAR_SHAD_REQ\",\n+\t\"TNOx_IDVS_VAR_SHAD_STALL\",\n+\t\"TNOx_BINNER_STALL\",\n+\t\"TNOx_ITER_STALL\",\n+\t\"TNOx_COMPRESS_MISS\",\n+\t\"TNOx_COMPRESS_STALL\",\n+\t\"TNOx_PCACHE_HIT\",\n+\t\"TNOx_PCACHE_MISS\",\n+\t\"TNOx_PCACHE_MISS_STALL\",\n+\t\"TNOx_PCACHE_EVICT_STALL\",\n+\t\"TNOx_PMGR_PTR_WR_STALL\",\n+\t\"TNOx_PMGR_PTR_RD_STALL\",\n+\t\"TNOx_PMGR_CMD_WR_STALL\",\n+\t\"TNOx_WRBUF_ACTIVE\",\n+\t\"TNOx_WRBUF_HIT\",\n+\t\"TNOx_WRBUF_MISS\",\n+\t\"TNOx_WRBUF_NO_FREE_LINE_STALL\",\n+\t\"TNOx_WRBUF_NO_AXI_ID_STALL\",\n+\t\"TNOx_WRBUF_AXI_STALL\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TNOx_UTLB_TRANS\",\n+\t\"TNOx_UTLB_TRANS_HIT\",\n+\t\"TNOx_UTLB_TRANS_STALL\",\n+\t\"TNOx_UTLB_TRANS_MISS_DELAY\",\n+\t\"TNOx_UTLB_MMU_REQ\",\n+\n+\t/* Performance counters for the Shader Core */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TNOx_FRAG_ACTIVE\",\n+\t\"TNOx_FRAG_PRIMITIVES\",\n+\t\"TNOx_FRAG_PRIM_RAST\",\n+\t\"TNOx_FRAG_FPK_ACTIVE\",\n+\t\"TNOx_FRAG_STARVING\",\n+\t\"TNOx_FRAG_WARPS\",\n+\t\"TNOx_FRAG_PARTIAL_WARPS\",\n+\t\"TNOx_FRAG_QUADS_RAST\",\n+\t\"TNOx_FRAG_QUADS_EZS_TEST\",\n+\t\"TNOx_FRAG_QUADS_EZS_UPDATE\",\n+\t\"TNOx_FRAG_QUADS_EZS_KILL\",\n+\t\"TNOx_FRAG_LZS_TEST\",\n+\t\"TNOx_FRAG_LZS_KILL\",\n+\t\"TNOx_WARP_REG_SIZE_64\",\n+\t\"TNOx_FRAG_PTILES\",\n+\t\"TNOx_FRAG_TRANS_ELIM\",\n+\t\"TNOx_QUAD_FPK_KILLER\",\n+\t\"TNOx_FULL_QUAD_WARPS\",\n+\t\"TNOx_COMPUTE_ACTIVE\",\n+\t\"TNOx_COMPUTE_TASKS\",\n+\t\"TNOx_COMPUTE_WARPS\",\n+\t\"TNOx_COMPUTE_STARVING\",\n+\t\"TNOx_EXEC_CORE_ACTIVE\",\n+\t\"TNOx_EXEC_ACTIVE\",\n+\t\"TNOx_EXEC_INSTR_COUNT\",\n+\t\"TNOx_EXEC_INSTR_DIVERGED\",\n+\t\"TNOx_EXEC_INSTR_STARVING\",\n+\t\"TNOx_ARITH_INSTR_SINGLE_FMA\",\n+\t\"TNOx_ARITH_INSTR_DOUBLE\",\n+\t\"TNOx_ARITH_INSTR_MSG\",\n+\t\"TNOx_ARITH_INSTR_MSG_ONLY\",\n+\t\"TNOx_TEX_MSGI_NUM_QUADS\",\n+\t\"TNOx_TEX_DFCH_NUM_PASSES\",\n+\t\"TNOx_TEX_DFCH_NUM_PASSES_MISS\",\n+\t\"TNOx_TEX_DFCH_NUM_PASSES_MIP_MAP\",\n+\t\"TNOx_TEX_TIDX_NUM_SPLIT_MIP_MAP\",\n+\t\"TNOx_TEX_TFCH_NUM_LINES_FETCHED\",\n+\t\"TNOx_TEX_TFCH_NUM_LINES_FETCHED_BLOCK\",\n+\t\"TNOx_TEX_TFCH_NUM_OPERATIONS\",\n+\t\"TNOx_TEX_FILT_NUM_OPERATIONS\",\n+\t\"TNOx_LS_MEM_READ_FULL\",\n+\t\"TNOx_LS_MEM_READ_SHORT\",\n+\t\"TNOx_LS_MEM_WRITE_FULL\",\n+\t\"TNOx_LS_MEM_WRITE_SHORT\",\n+\t\"TNOx_LS_MEM_ATOMIC\",\n+\t\"TNOx_VARY_INSTR\",\n+\t\"TNOx_VARY_SLOT_32\",\n+\t\"TNOx_VARY_SLOT_16\",\n+\t\"TNOx_ATTR_INSTR\",\n+\t\"TNOx_ARITH_INSTR_FP_MUL\",\n+\t\"TNOx_BEATS_RD_FTC\",\n+\t\"TNOx_BEATS_RD_FTC_EXT\",\n+\t\"TNOx_BEATS_RD_LSC\",\n+\t\"TNOx_BEATS_RD_LSC_EXT\",\n+\t\"TNOx_BEATS_RD_TEX\",\n+\t\"TNOx_BEATS_RD_TEX_EXT\",\n+\t\"TNOx_BEATS_RD_OTHER\",\n+\t\"TNOx_BEATS_WR_LSC_OTHER\",\n+\t\"TNOx_BEATS_WR_TIB\",\n+\t\"TNOx_BEATS_WR_LSC_WB\",\n+\n+\t/* Performance counters for the Memory System */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TNOx_MMU_REQUESTS\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TNOx_L2_RD_MSG_IN\",\n+\t\"TNOx_L2_RD_MSG_IN_STALL\",\n+\t\"TNOx_L2_WR_MSG_IN\",\n+\t\"TNOx_L2_WR_MSG_IN_STALL\",\n+\t\"TNOx_L2_SNP_MSG_IN\",\n+\t\"TNOx_L2_SNP_MSG_IN_STALL\",\n+\t\"TNOx_L2_RD_MSG_OUT\",\n+\t\"TNOx_L2_RD_MSG_OUT_STALL\",\n+\t\"TNOx_L2_WR_MSG_OUT\",\n+\t\"TNOx_L2_ANY_LOOKUP\",\n+\t\"TNOx_L2_READ_LOOKUP\",\n+\t\"TNOx_L2_WRITE_LOOKUP\",\n+\t\"TNOx_L2_EXT_SNOOP_LOOKUP\",\n+\t\"TNOx_L2_EXT_READ\",\n+\t\"TNOx_L2_EXT_READ_NOSNP\",\n+\t\"TNOx_L2_EXT_READ_UNIQUE\",\n+\t\"TNOx_L2_EXT_READ_BEATS\",\n+\t\"TNOx_L2_EXT_AR_STALL\",\n+\t\"TNOx_L2_EXT_AR_CNT_Q1\",\n+\t\"TNOx_L2_EXT_AR_CNT_Q2\",\n+\t\"TNOx_L2_EXT_AR_CNT_Q3\",\n+\t\"TNOx_L2_EXT_RRESP_0_127\",\n+\t\"TNOx_L2_EXT_RRESP_128_191\",\n+\t\"TNOx_L2_EXT_RRESP_192_255\",\n+\t\"TNOx_L2_EXT_RRESP_256_319\",\n+\t\"TNOx_L2_EXT_RRESP_320_383\",\n+\t\"TNOx_L2_EXT_WRITE\",\n+\t\"TNOx_L2_EXT_WRITE_NOSNP_FULL\",\n+\t\"TNOx_L2_EXT_WRITE_NOSNP_PTL\",\n+\t\"TNOx_L2_EXT_WRITE_SNP_FULL\",\n+\t\"TNOx_L2_EXT_WRITE_SNP_PTL\",\n+\t\"TNOx_L2_EXT_WRITE_BEATS\",\n+\t\"TNOx_L2_EXT_W_STALL\",\n+\t\"TNOx_L2_EXT_AW_CNT_Q1\",\n+\t\"TNOx_L2_EXT_AW_CNT_Q2\",\n+\t\"TNOx_L2_EXT_AW_CNT_Q3\",\n+\t\"TNOx_L2_EXT_SNOOP\",\n+\t\"TNOx_L2_EXT_SNOOP_STALL\",\n+\t\"TNOx_L2_EXT_SNOOP_RESP_CLEAN\",\n+\t\"TNOx_L2_EXT_SNOOP_RESP_DATA\",\n+\t\"TNOx_L2_EXT_SNOOP_INTERNAL\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+};\n+\n+#endif /* _KBASE_GATOR_HWCNT_NAMES_TNOX_H_ */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tsix.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tsix.h\nindex fb6a1437a1f671..b8dde32bc529eb 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tsix.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_tsix.h\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2016-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2016-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * This header was autogenerated, it should not be edited.\n  */\n@@ -217,9 +222,9 @@ static const char * const hardware_counters_mali_tSIx[] = {\n \t\"TSIx_BEATS_RD_TEX\",\n \t\"TSIx_BEATS_RD_TEX_EXT\",\n \t\"TSIx_BEATS_RD_OTHER\",\n-\t\"TSIx_BEATS_WR_LSC\",\n+\t\"TSIx_BEATS_WR_LSC_OTHER\",\n \t\"TSIx_BEATS_WR_TIB\",\n-\t\"\",\n+\t\"TSIx_BEATS_WR_LSC_WB\",\n \n \t/* Performance counters for the Memory System */\n \t\"\",\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_ttrx.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_ttrx.h\nnew file mode 100644\nindex 00000000000000..a17870d03b2172\n--- /dev/null\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gator_hwcnt_names_ttrx.h\n@@ -0,0 +1,296 @@\n+/*\n+ *\n+ * (C) COPYRIGHT 2016-2018 ARM Limited. All rights reserved.\n+ *\n+ * This program is free software and is provided to you under the terms of the\n+ * GNU General Public License version 2 as published by the Free Software\n+ * Foundation, and any use by you of this program is subject to the terms\n+ * of such GNU licence.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n+ *\n+ */\n+\n+/*\n+ * This header was autogenerated, it should not be edited.\n+ */\n+\n+#ifndef _KBASE_GATOR_HWCNT_NAMES_TTRX_H_\n+#define _KBASE_GATOR_HWCNT_NAMES_TTRX_H_\n+\n+static const char * const hardware_counters_mali_tTRx[] = {\n+\t/* Performance counters for the Job Manager */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TTRx_MESSAGES_SENT\",\n+\t\"TTRx_MESSAGES_RECEIVED\",\n+\t\"TTRx_GPU_ACTIVE\",\n+\t\"TTRx_IRQ_ACTIVE\",\n+\t\"TTRx_JS0_JOBS\",\n+\t\"TTRx_JS0_TASKS\",\n+\t\"TTRx_JS0_ACTIVE\",\n+\t\"\",\n+\t\"TTRx_JS0_WAIT_READ\",\n+\t\"TTRx_JS0_WAIT_ISSUE\",\n+\t\"TTRx_JS0_WAIT_DEPEND\",\n+\t\"TTRx_JS0_WAIT_FINISH\",\n+\t\"TTRx_JS1_JOBS\",\n+\t\"TTRx_JS1_TASKS\",\n+\t\"TTRx_JS1_ACTIVE\",\n+\t\"\",\n+\t\"TTRx_JS1_WAIT_READ\",\n+\t\"TTRx_JS1_WAIT_ISSUE\",\n+\t\"TTRx_JS1_WAIT_DEPEND\",\n+\t\"TTRx_JS1_WAIT_FINISH\",\n+\t\"TTRx_JS2_JOBS\",\n+\t\"TTRx_JS2_TASKS\",\n+\t\"TTRx_JS2_ACTIVE\",\n+\t\"\",\n+\t\"TTRx_JS2_WAIT_READ\",\n+\t\"TTRx_JS2_WAIT_ISSUE\",\n+\t\"TTRx_JS2_WAIT_DEPEND\",\n+\t\"TTRx_JS2_WAIT_FINISH\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\n+\t/* Performance counters for the Tiler */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TTRx_TILER_ACTIVE\",\n+\t\"TTRx_JOBS_PROCESSED\",\n+\t\"TTRx_TRIANGLES\",\n+\t\"TTRx_LINES\",\n+\t\"TTRx_POINTS\",\n+\t\"TTRx_FRONT_FACING\",\n+\t\"TTRx_BACK_FACING\",\n+\t\"TTRx_PRIM_VISIBLE\",\n+\t\"TTRx_PRIM_CULLED\",\n+\t\"TTRx_PRIM_CLIPPED\",\n+\t\"TTRx_PRIM_SAT_CULLED\",\n+\t\"TTRx_BIN_ALLOC_INIT\",\n+\t\"TTRx_BIN_ALLOC_OVERFLOW\",\n+\t\"TTRx_BUS_READ\",\n+\t\"\",\n+\t\"TTRx_BUS_WRITE\",\n+\t\"TTRx_LOADING_DESC\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TTRx_PREFETCH_STALL\",\n+\t\"TTRx_VCACHE_HIT\",\n+\t\"TTRx_VCACHE_MISS\",\n+\t\"TTRx_VCACHE_LINE_WAIT\",\n+\t\"TTRx_VFETCH_POS_READ_WAIT\",\n+\t\"TTRx_VFETCH_VERTEX_WAIT\",\n+\t\"TTRx_VFETCH_STALL\",\n+\t\"TTRx_PRIMASSY_STALL\",\n+\t\"TTRx_BBOX_GEN_STALL\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TTRx_BINNER_STALL\",\n+\t\"TTRx_ITER_STALL\",\n+\t\"TTRx_COMPRESS_MISS\",\n+\t\"TTRx_COMPRESS_STALL\",\n+\t\"TTRx_PCACHE_HIT\",\n+\t\"TTRx_PCACHE_MISS\",\n+\t\"TTRx_PCACHE_MISS_STALL\",\n+\t\"TTRx_PCACHE_EVICT_STALL\",\n+\t\"TTRx_PMGR_PTR_WR_STALL\",\n+\t\"TTRx_PMGR_PTR_RD_STALL\",\n+\t\"TTRx_PMGR_CMD_WR_STALL\",\n+\t\"TTRx_WRBUF_ACTIVE\",\n+\t\"TTRx_WRBUF_HIT\",\n+\t\"TTRx_WRBUF_MISS\",\n+\t\"TTRx_WRBUF_NO_FREE_LINE_STALL\",\n+\t\"TTRx_WRBUF_NO_AXI_ID_STALL\",\n+\t\"TTRx_WRBUF_AXI_STALL\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TTRx_UTLB_TRANS\",\n+\t\"TTRx_UTLB_TRANS_HIT\",\n+\t\"TTRx_UTLB_TRANS_STALL\",\n+\t\"TTRx_UTLB_TRANS_MISS_DELAY\",\n+\t\"TTRx_UTLB_MMU_REQ\",\n+\n+\t/* Performance counters for the Shader Core */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TTRx_FRAG_ACTIVE\",\n+\t\"TTRx_FRAG_PRIMITIVES\",\n+\t\"TTRx_FRAG_PRIM_RAST\",\n+\t\"TTRx_FRAG_FPK_ACTIVE\",\n+\t\"TTRx_FRAG_STARVING\",\n+\t\"TTRx_FRAG_WARPS\",\n+\t\"TTRx_FRAG_PARTIAL_WARPS\",\n+\t\"TTRx_FRAG_QUADS_RAST\",\n+\t\"TTRx_FRAG_QUADS_EZS_TEST\",\n+\t\"TTRx_FRAG_QUADS_EZS_UPDATE\",\n+\t\"TTRx_FRAG_QUADS_EZS_KILL\",\n+\t\"TTRx_FRAG_LZS_TEST\",\n+\t\"TTRx_FRAG_LZS_KILL\",\n+\t\"TTRx_WARP_REG_SIZE_64\",\n+\t\"TTRx_FRAG_PTILES\",\n+\t\"TTRx_FRAG_TRANS_ELIM\",\n+\t\"TTRx_QUAD_FPK_KILLER\",\n+\t\"TTRx_FULL_QUAD_WARPS\",\n+\t\"TTRx_COMPUTE_ACTIVE\",\n+\t\"TTRx_COMPUTE_TASKS\",\n+\t\"TTRx_COMPUTE_WARPS\",\n+\t\"TTRx_COMPUTE_STARVING\",\n+\t\"TTRx_EXEC_CORE_ACTIVE\",\n+\t\"TTRx_EXEC_INSTR_FMA\",\n+\t\"TTRx_EXEC_INSTR_CVT\",\n+\t\"TTRx_EXEC_INSTR_SFU\",\n+\t\"TTRx_EXEC_INSTR_MSG\",\n+\t\"TTRx_EXEC_INSTR_DIVERGED\",\n+\t\"TTRx_EXEC_ICACHE_MISS\",\n+\t\"TTRx_EXEC_STARVE_ARITH\",\n+\t\"TTRx_CALL_BLEND_SHADER\",\n+\t\"TTRx_TEX_INSTR\",\n+\t\"TTRx_TEX_INSTR_MIPMAP\",\n+\t\"TTRx_TEX_INSTR_COMPRESSED\",\n+\t\"TTRx_TEX_INSTR_3D\",\n+\t\"TTRx_TEX_INSTR_TRILINEAR\",\n+\t\"TTRx_TEX_COORD_ISSUE\",\n+\t\"TTRx_TEX_COORD_STALL\",\n+\t\"TTRx_TEX_STARVE_CACHE\",\n+\t\"TTRx_TEX_STARVE_FILTER\",\n+\t\"TTRx_LS_MEM_READ_FULL\",\n+\t\"TTRx_LS_MEM_READ_SHORT\",\n+\t\"TTRx_LS_MEM_WRITE_FULL\",\n+\t\"TTRx_LS_MEM_WRITE_SHORT\",\n+\t\"TTRx_LS_MEM_ATOMIC\",\n+\t\"TTRx_VARY_INSTR\",\n+\t\"TTRx_VARY_SLOT_32\",\n+\t\"TTRx_VARY_SLOT_16\",\n+\t\"TTRx_ATTR_INSTR\",\n+\t\"TTRx_ARITH_INSTR_FP_MUL\",\n+\t\"TTRx_BEATS_RD_FTC\",\n+\t\"TTRx_BEATS_RD_FTC_EXT\",\n+\t\"TTRx_BEATS_RD_LSC\",\n+\t\"TTRx_BEATS_RD_LSC_EXT\",\n+\t\"TTRx_BEATS_RD_TEX\",\n+\t\"TTRx_BEATS_RD_TEX_EXT\",\n+\t\"TTRx_BEATS_RD_OTHER\",\n+\t\"\",\n+\t\"TTRx_BEATS_WR_TIB\",\n+\t\"TTRx_BEATS_WR_LSC\",\n+\n+\t/* Performance counters for the Memory System */\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TTRx_MMU_REQUESTS\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"TTRx_L2_RD_MSG_IN\",\n+\t\"TTRx_L2_RD_MSG_IN_STALL\",\n+\t\"TTRx_L2_WR_MSG_IN\",\n+\t\"TTRx_L2_WR_MSG_IN_STALL\",\n+\t\"TTRx_L2_SNP_MSG_IN\",\n+\t\"TTRx_L2_SNP_MSG_IN_STALL\",\n+\t\"TTRx_L2_RD_MSG_OUT\",\n+\t\"TTRx_L2_RD_MSG_OUT_STALL\",\n+\t\"TTRx_L2_WR_MSG_OUT\",\n+\t\"TTRx_L2_ANY_LOOKUP\",\n+\t\"TTRx_L2_READ_LOOKUP\",\n+\t\"TTRx_L2_WRITE_LOOKUP\",\n+\t\"TTRx_L2_EXT_SNOOP_LOOKUP\",\n+\t\"TTRx_L2_EXT_READ\",\n+\t\"TTRx_L2_EXT_READ_NOSNP\",\n+\t\"TTRx_L2_EXT_READ_UNIQUE\",\n+\t\"TTRx_L2_EXT_READ_BEATS\",\n+\t\"TTRx_L2_EXT_AR_STALL\",\n+\t\"TTRx_L2_EXT_AR_CNT_Q1\",\n+\t\"TTRx_L2_EXT_AR_CNT_Q2\",\n+\t\"TTRx_L2_EXT_AR_CNT_Q3\",\n+\t\"TTRx_L2_EXT_RRESP_0_127\",\n+\t\"TTRx_L2_EXT_RRESP_128_191\",\n+\t\"TTRx_L2_EXT_RRESP_192_255\",\n+\t\"TTRx_L2_EXT_RRESP_256_319\",\n+\t\"TTRx_L2_EXT_RRESP_320_383\",\n+\t\"TTRx_L2_EXT_WRITE\",\n+\t\"TTRx_L2_EXT_WRITE_NOSNP_FULL\",\n+\t\"TTRx_L2_EXT_WRITE_NOSNP_PTL\",\n+\t\"TTRx_L2_EXT_WRITE_SNP_FULL\",\n+\t\"TTRx_L2_EXT_WRITE_SNP_PTL\",\n+\t\"TTRx_L2_EXT_WRITE_BEATS\",\n+\t\"TTRx_L2_EXT_W_STALL\",\n+\t\"TTRx_L2_EXT_AW_CNT_Q1\",\n+\t\"TTRx_L2_EXT_AW_CNT_Q2\",\n+\t\"TTRx_L2_EXT_AW_CNT_Q3\",\n+\t\"TTRx_L2_EXT_SNOOP\",\n+\t\"TTRx_L2_EXT_SNOOP_STALL\",\n+\t\"TTRx_L2_EXT_SNOOP_RESP_CLEAN\",\n+\t\"TTRx_L2_EXT_SNOOP_RESP_DATA\",\n+\t\"TTRx_L2_EXT_SNOOP_INTERNAL\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+\t\"\",\n+};\n+\n+#endif /* _KBASE_GATOR_HWCNT_NAMES_TTRX_H_ */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpu_id.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpu_id.h\nindex 2d368dfaf64417..218e63a61c6caf 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpu_id.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpu_id.h\n@@ -1,19 +1,24 @@\n /*\n  *\n- * (C) COPYRIGHT 2015-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2015-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n-\n-\n #ifndef _KBASE_GPU_ID_H_\n #define _KBASE_GPU_ID_H_\n \n@@ -22,20 +27,20 @@\n #define GPU_ID_VERSION_MINOR_SHIFT        4\n #define GPU_ID_VERSION_MAJOR_SHIFT        12\n #define GPU_ID_VERSION_PRODUCT_ID_SHIFT   16\n-#define GPU_ID_VERSION_STATUS             (0xF  << GPU_ID_VERSION_STATUS_SHIFT)\n-#define GPU_ID_VERSION_MINOR              (0xFF << GPU_ID_VERSION_MINOR_SHIFT)\n-#define GPU_ID_VERSION_MAJOR              (0xF  << GPU_ID_VERSION_MAJOR_SHIFT)\n-#define GPU_ID_VERSION_PRODUCT_ID  (0xFFFF << GPU_ID_VERSION_PRODUCT_ID_SHIFT)\n+#define GPU_ID_VERSION_STATUS             (0xFu  << GPU_ID_VERSION_STATUS_SHIFT)\n+#define GPU_ID_VERSION_MINOR              (0xFFu << GPU_ID_VERSION_MINOR_SHIFT)\n+#define GPU_ID_VERSION_MAJOR              (0xFu  << GPU_ID_VERSION_MAJOR_SHIFT)\n+#define GPU_ID_VERSION_PRODUCT_ID  (0xFFFFu << GPU_ID_VERSION_PRODUCT_ID_SHIFT)\n \n /* Values for GPU_ID_VERSION_PRODUCT_ID bitfield */\n-#define GPU_ID_PI_T60X                    0x6956\n-#define GPU_ID_PI_T62X                    0x0620\n-#define GPU_ID_PI_T76X                    0x0750\n-#define GPU_ID_PI_T72X                    0x0720\n-#define GPU_ID_PI_TFRX                    0x0880\n-#define GPU_ID_PI_T86X                    0x0860\n-#define GPU_ID_PI_T82X                    0x0820\n-#define GPU_ID_PI_T83X                    0x0830\n+#define GPU_ID_PI_T60X                    0x6956u\n+#define GPU_ID_PI_T62X                    0x0620u\n+#define GPU_ID_PI_T76X                    0x0750u\n+#define GPU_ID_PI_T72X                    0x0720u\n+#define GPU_ID_PI_TFRX                    0x0880u\n+#define GPU_ID_PI_T86X                    0x0860u\n+#define GPU_ID_PI_T82X                    0x0820u\n+#define GPU_ID_PI_T83X                    0x0830u\n \n /* New GPU ID format when PRODUCT_ID is >= 0x1000 (and not 0x6956) */\n #define GPU_ID_PI_NEW_FORMAT_START        0x1000\n@@ -50,13 +55,13 @@\n #define GPU_ID2_ARCH_REV_SHIFT            20\n #define GPU_ID2_ARCH_MINOR_SHIFT          24\n #define GPU_ID2_ARCH_MAJOR_SHIFT          28\n-#define GPU_ID2_VERSION_STATUS            (0xF << GPU_ID2_VERSION_STATUS_SHIFT)\n-#define GPU_ID2_VERSION_MINOR             (0xFF << GPU_ID2_VERSION_MINOR_SHIFT)\n-#define GPU_ID2_VERSION_MAJOR             (0xF << GPU_ID2_VERSION_MAJOR_SHIFT)\n-#define GPU_ID2_PRODUCT_MAJOR             (0xF << GPU_ID2_PRODUCT_MAJOR_SHIFT)\n-#define GPU_ID2_ARCH_REV                  (0xF << GPU_ID2_ARCH_REV_SHIFT)\n-#define GPU_ID2_ARCH_MINOR                (0xF << GPU_ID2_ARCH_MINOR_SHIFT)\n-#define GPU_ID2_ARCH_MAJOR                (0xF << GPU_ID2_ARCH_MAJOR_SHIFT)\n+#define GPU_ID2_VERSION_STATUS            (0xFu << GPU_ID2_VERSION_STATUS_SHIFT)\n+#define GPU_ID2_VERSION_MINOR             (0xFFu << GPU_ID2_VERSION_MINOR_SHIFT)\n+#define GPU_ID2_VERSION_MAJOR             (0xFu << GPU_ID2_VERSION_MAJOR_SHIFT)\n+#define GPU_ID2_PRODUCT_MAJOR             (0xFu << GPU_ID2_PRODUCT_MAJOR_SHIFT)\n+#define GPU_ID2_ARCH_REV                  (0xFu << GPU_ID2_ARCH_REV_SHIFT)\n+#define GPU_ID2_ARCH_MINOR                (0xFu << GPU_ID2_ARCH_MINOR_SHIFT)\n+#define GPU_ID2_ARCH_MAJOR                (0xFu << GPU_ID2_ARCH_MAJOR_SHIFT)\n #define GPU_ID2_PRODUCT_MODEL  (GPU_ID2_ARCH_MAJOR | GPU_ID2_PRODUCT_MAJOR)\n #define GPU_ID2_VERSION        (GPU_ID2_VERSION_MAJOR | \\\n \t\t\t\t\t\t\t\tGPU_ID2_VERSION_MINOR | \\\n@@ -65,17 +70,17 @@\n /* Helper macro to create a partial GPU_ID (new format) that defines\n    a product ignoring its version. */\n #define GPU_ID2_PRODUCT_MAKE(arch_major, arch_minor, arch_rev, product_major) \\\n-\t\t(((arch_major) << GPU_ID2_ARCH_MAJOR_SHIFT)  | \\\n-\t\t ((arch_minor) << GPU_ID2_ARCH_MINOR_SHIFT)  | \\\n-\t\t ((arch_rev) << GPU_ID2_ARCH_REV_SHIFT)      | \\\n-\t\t ((product_major) << GPU_ID2_PRODUCT_MAJOR_SHIFT))\n+\t\t((((u32)arch_major) << GPU_ID2_ARCH_MAJOR_SHIFT)  | \\\n+\t\t (((u32)arch_minor) << GPU_ID2_ARCH_MINOR_SHIFT)  | \\\n+\t\t (((u32)arch_rev) << GPU_ID2_ARCH_REV_SHIFT)      | \\\n+\t\t (((u32)product_major) << GPU_ID2_PRODUCT_MAJOR_SHIFT))\n \n /* Helper macro to create a partial GPU_ID (new format) that specifies the\n    revision (major, minor, status) of a product */\n #define GPU_ID2_VERSION_MAKE(version_major, version_minor, version_status) \\\n-\t\t(((version_major) << GPU_ID2_VERSION_MAJOR_SHIFT)  | \\\n-\t\t ((version_minor) << GPU_ID2_VERSION_MINOR_SHIFT)  | \\\n-\t\t ((version_status) << GPU_ID2_VERSION_STATUS_SHIFT))\n+\t\t((((u32)version_major) << GPU_ID2_VERSION_MAJOR_SHIFT)  | \\\n+\t\t (((u32)version_minor) << GPU_ID2_VERSION_MINOR_SHIFT)  | \\\n+\t\t (((u32)version_status) << GPU_ID2_VERSION_STATUS_SHIFT))\n \n /* Helper macro to create a complete GPU_ID (new format) */\n #define GPU_ID2_MAKE(arch_major, arch_minor, arch_rev, product_major, \\\n@@ -88,20 +93,25 @@\n /* Helper macro to create a partial GPU_ID (new format) that identifies\n    a particular GPU model by its arch_major and product_major. */\n #define GPU_ID2_MODEL_MAKE(arch_major, product_major) \\\n-\t\t(((arch_major) << GPU_ID2_ARCH_MAJOR_SHIFT)  | \\\n-\t\t((product_major) << GPU_ID2_PRODUCT_MAJOR_SHIFT))\n+\t\t((((u32)arch_major) << GPU_ID2_ARCH_MAJOR_SHIFT)  | \\\n+\t\t(((u32)product_major) << GPU_ID2_PRODUCT_MAJOR_SHIFT))\n \n /* Strip off the non-relevant bits from a product_id value and make it suitable\n    for comparison against the GPU_ID2_PRODUCT_xxx values which identify a GPU\n    model. */\n #define GPU_ID2_MODEL_MATCH_VALUE(product_id) \\\n-\t\t(((product_id) << GPU_ID2_PRODUCT_MAJOR_SHIFT) & \\\n+\t\t((((u32)product_id) << GPU_ID2_PRODUCT_MAJOR_SHIFT) & \\\n \t\t    GPU_ID2_PRODUCT_MODEL)\n \n-#define GPU_ID2_PRODUCT_TMIX              GPU_ID2_MODEL_MAKE(6u, 0)\n-#define GPU_ID2_PRODUCT_THEX              GPU_ID2_MODEL_MAKE(6u, 1)\n-#define GPU_ID2_PRODUCT_TSIX              GPU_ID2_MODEL_MAKE(7u, 0)\n-#define GPU_ID2_PRODUCT_TDVX              GPU_ID2_MODEL_MAKE(7u, 3)\n+#define GPU_ID2_PRODUCT_TMIX              GPU_ID2_MODEL_MAKE(6, 0)\n+#define GPU_ID2_PRODUCT_THEX              GPU_ID2_MODEL_MAKE(6, 1)\n+#define GPU_ID2_PRODUCT_TSIX              GPU_ID2_MODEL_MAKE(7, 0)\n+#define GPU_ID2_PRODUCT_TDVX              GPU_ID2_MODEL_MAKE(7, 3)\n+#define GPU_ID2_PRODUCT_TNOX              GPU_ID2_MODEL_MAKE(7, 1)\n+#define GPU_ID2_PRODUCT_TGOX              GPU_ID2_MODEL_MAKE(7, 2)\n+#define GPU_ID2_PRODUCT_TKAX              GPU_ID2_MODEL_MAKE(8, 0)\n+#define GPU_ID2_PRODUCT_TTRX              GPU_ID2_MODEL_MAKE(9, 0)\n+#define GPU_ID2_PRODUCT_TBOX              GPU_ID2_MODEL_MAKE(8, 2)\n \n /* Values for GPU_ID_VERSION_STATUS field for PRODUCT_ID GPU_ID_PI_T60X */\n #define GPU_ID_S_15DEV0                   0x1\n@@ -110,9 +120,9 @@\n /* Helper macro to create a GPU_ID assuming valid values for id, major,\n    minor, status */\n #define GPU_ID_MAKE(id, major, minor, status) \\\n-\t\t(((id) << GPU_ID_VERSION_PRODUCT_ID_SHIFT) | \\\n-\t\t((major) << GPU_ID_VERSION_MAJOR_SHIFT) |   \\\n-\t\t((minor) << GPU_ID_VERSION_MINOR_SHIFT) |   \\\n-\t\t((status) << GPU_ID_VERSION_STATUS_SHIFT))\n+\t\t((((u32)id) << GPU_ID_VERSION_PRODUCT_ID_SHIFT) | \\\n+\t\t(((u32)major) << GPU_ID_VERSION_MAJOR_SHIFT) |   \\\n+\t\t(((u32)minor) << GPU_ID_VERSION_MINOR_SHIFT) |   \\\n+\t\t(((u32)status) << GPU_ID_VERSION_STATUS_SHIFT))\n \n #endif /* _KBASE_GPU_ID_H_ */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpu_memory_debugfs.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpu_memory_debugfs.c\nindex 6df0a1cb1264a2..514b065d48674e 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpu_memory_debugfs.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpu_memory_debugfs.c\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2012-2016 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2012-2017 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <mali_kbase.h>\n \n #ifdef CONFIG_DEBUG_FS\n@@ -65,7 +70,7 @@ static int kbasep_gpu_memory_seq_show(struct seq_file *sfile, void *data)\n  */\n static int kbasep_gpu_memory_debugfs_open(struct inode *in, struct file *file)\n {\n-\treturn single_open(file, kbasep_gpu_memory_seq_show , NULL);\n+\treturn single_open(file, kbasep_gpu_memory_seq_show, NULL);\n }\n \n static const struct file_operations kbasep_gpu_memory_debugfs_fops = {\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpu_memory_debugfs.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpu_memory_debugfs.h\nindex 7045693eb91096..28a871a0da4fd7 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpu_memory_debugfs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpu_memory_debugfs.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_gpu_memory_debugfs.h\n  * Header file for gpu_memory entry in debugfs\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpuprops.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpuprops.c\nindex 4130810f103834..62ba105ca4173e 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpuprops.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpuprops.c\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2011-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2011-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Base kernel property query APIs\n  */\n@@ -24,7 +29,6 @@\n #include <mali_kbase.h>\n #include <mali_midg_regmap.h>\n #include <mali_kbase_gpuprops.h>\n-#include <mali_kbase_config_defaults.h>\n #include <mali_kbase_hwaccess_gpuprops.h>\n #include \"mali_kbase_ioctl.h\"\n #include <linux/clk.h>\n@@ -43,54 +47,6 @@\n #define KBASE_UBFX32(value, offset, size) \\\n \t(((u32)(value) >> (u32)(offset)) & (u32)((1ULL << (u32)(size)) - 1))\n \n-int kbase_gpuprops_uk_get_props(struct kbase_context *kctx, struct kbase_uk_gpuprops * const kbase_props)\n-{\n-\tkbase_gpu_clk_speed_func get_gpu_speed_mhz;\n-\tu32 gpu_speed_mhz;\n-\tint rc = 1;\n-\n-\tKBASE_DEBUG_ASSERT(NULL != kctx);\n-\tKBASE_DEBUG_ASSERT(NULL != kbase_props);\n-\n-\t/* Current GPU speed is requested from the system integrator via the GPU_SPEED_FUNC function.\n-\t * If that function fails, or the function is not provided by the system integrator, we report the maximum\n-\t * GPU speed as specified by GPU_FREQ_KHZ_MAX.\n-\t */\n-\tget_gpu_speed_mhz = (kbase_gpu_clk_speed_func) GPU_SPEED_FUNC;\n-\tif (get_gpu_speed_mhz != NULL) {\n-\t\trc = get_gpu_speed_mhz(&gpu_speed_mhz);\n-#ifdef CONFIG_MALI_BIFROST_DEBUG\n-\t\t/* Issue a warning message when the reported GPU speed falls outside the min/max range */\n-\t\tif (rc == 0) {\n-\t\t\tu32 gpu_speed_khz = gpu_speed_mhz * 1000;\n-\n-\t\t\tif (gpu_speed_khz < kctx->kbdev->gpu_props.props.core_props.gpu_freq_khz_min ||\n-\t\t\t\t\tgpu_speed_khz > kctx->kbdev->gpu_props.props.core_props.gpu_freq_khz_max)\n-\t\t\t\tdev_warn(kctx->kbdev->dev, \"GPU Speed is outside of min/max range (got %lu Khz, min %lu Khz, max %lu Khz)\\n\",\n-\t\t\t\t\t\t(unsigned long)gpu_speed_khz,\n-\t\t\t\t\t\t(unsigned long)kctx->kbdev->gpu_props.props.core_props.gpu_freq_khz_min,\n-\t\t\t\t\t\t(unsigned long)kctx->kbdev->gpu_props.props.core_props.gpu_freq_khz_max);\n-\t\t}\n-#endif\t\t\t\t/* CONFIG_MALI_BIFROST_DEBUG */\n-\t}\n-\tif (kctx->kbdev->clock) {\n-\t\tgpu_speed_mhz = clk_get_rate(kctx->kbdev->clock) / 1000000;\n-\t\trc = 0;\n-\t}\n-\tif (rc != 0)\n-\t\tgpu_speed_mhz = kctx->kbdev->gpu_props.props.core_props.gpu_freq_khz_max / 1000;\n-\n-\tkctx->kbdev->gpu_props.props.core_props.gpu_speed_mhz = gpu_speed_mhz;\n-\n-\tmemcpy(&kbase_props->props, &kctx->kbdev->gpu_props.props, sizeof(kbase_props->props));\n-\n-\t/* Before API 8.2 they expect L3 cache info here, which was always 0 */\n-\tif (kctx->api_version < KBASE_API_VERSION(8, 2))\n-\t\tkbase_props->props.raw_props.suspend_size = 0;\n-\n-\treturn 0;\n-}\n-\n static void kbase_gpuprops_construct_coherent_groups(base_gpu_props * const props)\n {\n \tstruct mali_base_gpu_coherent_group *current_group;\n@@ -182,7 +138,7 @@ static void kbase_gpuprops_get_props(base_gpu_props * const gpu_props, struct kb\n \tgpu_props->raw_props.mem_features = regdump.mem_features;\n \tgpu_props->raw_props.mmu_features = regdump.mmu_features;\n \tgpu_props->raw_props.l2_features = regdump.l2_features;\n-\tgpu_props->raw_props.suspend_size = regdump.suspend_size;\n+\tgpu_props->raw_props.core_features = regdump.core_features;\n \n \tgpu_props->raw_props.as_present = regdump.as_present;\n \tgpu_props->raw_props.js_present = regdump.js_present;\n@@ -195,13 +151,9 @@ static void kbase_gpuprops_get_props(base_gpu_props * const gpu_props, struct kb\n \tgpu_props->raw_props.l2_present =\n \t\t((u64) regdump.l2_present_hi << 32) +\n \t\tregdump.l2_present_lo;\n-#ifdef CONFIG_MALI_CORESTACK\n \tgpu_props->raw_props.stack_present =\n \t\t((u64) regdump.stack_present_hi << 32) +\n \t\tregdump.stack_present_lo;\n-#else /* CONFIG_MALI_CORESTACK */\n-\tgpu_props->raw_props.stack_present = 0;\n-#endif /* CONFIG_MALI_CORESTACK */\n \n \tfor (i = 0; i < GPU_MAX_JOB_SLOTS; i++)\n \t\tgpu_props->raw_props.js_features[i] = regdump.js_features[i];\n@@ -213,6 +165,7 @@ static void kbase_gpuprops_get_props(base_gpu_props * const gpu_props, struct kb\n \tgpu_props->raw_props.thread_max_threads = regdump.thread_max_threads;\n \tgpu_props->raw_props.thread_max_workgroup_size = regdump.thread_max_workgroup_size;\n \tgpu_props->raw_props.thread_features = regdump.thread_features;\n+\tgpu_props->raw_props.thread_tls_alloc = regdump.thread_tls_alloc;\n }\n \n void kbase_gpuprops_update_core_props_gpu_id(base_gpu_props * const gpu_props)\n@@ -243,6 +196,8 @@ static void kbase_gpuprops_calculate_props(base_gpu_props * const gpu_props, str\n \tkbase_gpuprops_update_core_props_gpu_id(gpu_props);\n \tgpu_props->core_props.log2_program_counter_size = KBASE_GPU_PC_SIZE_LOG2;\n \tgpu_props->core_props.gpu_available_memory_size = totalram_pages << PAGE_SHIFT;\n+\tgpu_props->core_props.num_exec_engines =\n+\t\tKBASE_UBFX32(gpu_props->raw_props.core_features, 0, 4);\n \n \tfor (i = 0; i < BASE_GPU_NUM_TEXTURE_FEATURES_REGISTERS; i++)\n \t\tgpu_props->core_props.texture_features[i] = gpu_props->raw_props.texture_features[i];\n@@ -274,6 +229,13 @@ static void kbase_gpuprops_calculate_props(base_gpu_props * const gpu_props, str\n \telse\n \t\tgpu_props->thread_props.max_barrier_size = gpu_props->raw_props.thread_max_barrier_size;\n \n+\tif (gpu_props->raw_props.thread_tls_alloc == 0)\n+\t\tgpu_props->thread_props.tls_alloc =\n+\t\t\t\tgpu_props->thread_props.max_threads;\n+\telse\n+\t\tgpu_props->thread_props.tls_alloc =\n+\t\t\t\tgpu_props->raw_props.thread_tls_alloc;\n+\n \tgpu_props->thread_props.max_registers = KBASE_UBFX32(gpu_props->raw_props.thread_features, 0U, 16);\n \tgpu_props->thread_props.max_task_queue = KBASE_UBFX32(gpu_props->raw_props.thread_features, 16U, 8);\n \tgpu_props->thread_props.max_thread_group_split = KBASE_UBFX32(gpu_props->raw_props.thread_features, 24U, 6);\n@@ -336,6 +298,9 @@ void kbase_gpuprops_set_features(struct kbase_device *kbdev)\n \t */\n \tgpu_props->raw_props.coherency_mode = regdump.coherency_features |\n \t\tCOHERENCY_FEATURE_BIT(COHERENCY_NONE);\n+\n+\tif (!kbase_hw_has_feature(kbdev, BASE_HW_FEATURE_THREAD_GROUP_SPLIT))\n+\t\tgpu_props->thread_props.max_thread_group_split = 0;\n }\n \n static struct {\n@@ -344,20 +309,20 @@ static struct {\n \tint size;\n } gpu_property_mapping[] = {\n #define PROP(name, member) \\\n-\t{KBASE_GPUPROP_ ## name, offsetof(struct mali_base_gpu_props, member), \\\n-\t\tsizeof(((struct mali_base_gpu_props *)0)->member)}\n+\t{KBASE_GPUPROP_ ## name, offsetof(struct base_gpu_props, member), \\\n+\t\tsizeof(((struct base_gpu_props *)0)->member)}\n \tPROP(PRODUCT_ID,                  core_props.product_id),\n \tPROP(VERSION_STATUS,              core_props.version_status),\n \tPROP(MINOR_REVISION,              core_props.minor_revision),\n \tPROP(MAJOR_REVISION,              core_props.major_revision),\n-\tPROP(GPU_SPEED_MHZ,               core_props.gpu_speed_mhz),\n \tPROP(GPU_FREQ_KHZ_MAX,            core_props.gpu_freq_khz_max),\n-\tPROP(GPU_FREQ_KHZ_MIN,            core_props.gpu_freq_khz_min),\n \tPROP(LOG2_PROGRAM_COUNTER_SIZE,   core_props.log2_program_counter_size),\n \tPROP(TEXTURE_FEATURES_0,          core_props.texture_features[0]),\n \tPROP(TEXTURE_FEATURES_1,          core_props.texture_features[1]),\n \tPROP(TEXTURE_FEATURES_2,          core_props.texture_features[2]),\n+\tPROP(TEXTURE_FEATURES_3,          core_props.texture_features[3]),\n \tPROP(GPU_AVAILABLE_MEMORY_SIZE,   core_props.gpu_available_memory_size),\n+\tPROP(NUM_EXEC_ENGINES,            core_props.num_exec_engines),\n \n \tPROP(L2_LOG2_LINE_SIZE,           l2_props.log2_line_size),\n \tPROP(L2_LOG2_CACHE_SIZE,          l2_props.log2_cache_size),\n@@ -373,13 +338,14 @@ static struct {\n \tPROP(MAX_TASK_QUEUE,              thread_props.max_task_queue),\n \tPROP(MAX_THREAD_GROUP_SPLIT,      thread_props.max_thread_group_split),\n \tPROP(IMPL_TECH,                   thread_props.impl_tech),\n+\tPROP(TLS_ALLOC,                   thread_props.tls_alloc),\n \n \tPROP(RAW_SHADER_PRESENT,          raw_props.shader_present),\n \tPROP(RAW_TILER_PRESENT,           raw_props.tiler_present),\n \tPROP(RAW_L2_PRESENT,              raw_props.l2_present),\n \tPROP(RAW_STACK_PRESENT,           raw_props.stack_present),\n \tPROP(RAW_L2_FEATURES,             raw_props.l2_features),\n-\tPROP(RAW_SUSPEND_SIZE,            raw_props.suspend_size),\n+\tPROP(RAW_CORE_FEATURES,           raw_props.core_features),\n \tPROP(RAW_MEM_FEATURES,            raw_props.mem_features),\n \tPROP(RAW_MMU_FEATURES,            raw_props.mmu_features),\n \tPROP(RAW_AS_PRESENT,              raw_props.as_present),\n@@ -404,12 +370,14 @@ static struct {\n \tPROP(RAW_TEXTURE_FEATURES_0,      raw_props.texture_features[0]),\n \tPROP(RAW_TEXTURE_FEATURES_1,      raw_props.texture_features[1]),\n \tPROP(RAW_TEXTURE_FEATURES_2,      raw_props.texture_features[2]),\n+\tPROP(RAW_TEXTURE_FEATURES_3,      raw_props.texture_features[3]),\n \tPROP(RAW_GPU_ID,                  raw_props.gpu_id),\n \tPROP(RAW_THREAD_MAX_THREADS,      raw_props.thread_max_threads),\n \tPROP(RAW_THREAD_MAX_WORKGROUP_SIZE,\n \t\t\traw_props.thread_max_workgroup_size),\n \tPROP(RAW_THREAD_MAX_BARRIER_SIZE, raw_props.thread_max_barrier_size),\n \tPROP(RAW_THREAD_FEATURES,         raw_props.thread_features),\n+\tPROP(RAW_THREAD_TLS_ALLOC,        raw_props.thread_tls_alloc),\n \tPROP(RAW_COHERENCY_MODE,          raw_props.coherency_mode),\n \n \tPROP(COHERENCY_NUM_GROUPS,        coherency_info.num_groups),\n@@ -438,7 +406,7 @@ static struct {\n int kbase_gpuprops_populate_user_buffer(struct kbase_device *kbdev)\n {\n \tstruct kbase_gpu_props *kprops = &kbdev->gpu_props;\n-\tstruct mali_base_gpu_props *props = &kprops->props;\n+\tstruct base_gpu_props *props = &kprops->props;\n \tu32 count = ARRAY_SIZE(gpu_property_mapping);\n \tu32 i;\n \tu32 size = 0;\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpuprops.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpuprops.h\nindex 57b3eaf9cd5326..37d9c08770bf80 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpuprops.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpuprops.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_gpuprops.h\n  * Base kernel property query APIs\n@@ -49,18 +54,6 @@ void kbase_gpuprops_set(struct kbase_device *kbdev);\n  */\n void kbase_gpuprops_set_features(struct kbase_device *kbdev);\n \n-/**\n- * @brief Provide GPU properties to userside through UKU call.\n- *\n- * Fill the struct kbase_uk_gpuprops with values from GPU configuration registers.\n- *\n- * @param kctx\t\tThe struct kbase_context structure\n- * @param kbase_props\tA copy of the struct kbase_uk_gpuprops structure from userspace\n- *\n- * @return 0 on success. Any other value indicates failure.\n- */\n-int kbase_gpuprops_uk_get_props(struct kbase_context *kctx, struct kbase_uk_gpuprops * const kbase_props);\n-\n /**\n  * kbase_gpuprops_populate_user_buffer - Populate the GPU properties buffer\n  * @kbdev: The kbase device\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpuprops_types.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpuprops_types.h\nindex 10794fc273186b..d7877d1d4a5763 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpuprops_types.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gpuprops_types.h\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2011-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2011-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_gpuprops_types.h\n  * Base kernel property query APIs\n@@ -33,7 +38,7 @@\n struct kbase_gpuprops_regdump {\n \tu32 gpu_id;\n \tu32 l2_features;\n-\tu32 suspend_size; /* API 8.2+ */\n+\tu32 core_features;\n \tu32 tiler_features;\n \tu32 mem_features;\n \tu32 mmu_features;\n@@ -43,6 +48,7 @@ struct kbase_gpuprops_regdump {\n \tu32 thread_max_workgroup_size;\n \tu32 thread_max_barrier_size;\n \tu32 thread_features;\n+\tu32 thread_tls_alloc;\n \tu32 texture_features[BASE_GPU_NUM_TEXTURE_FEATURES_REGISTERS];\n \tu32 js_features[GPU_MAX_JOB_SLOTS];\n \tu32 shader_present_lo;\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gwt.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gwt.c\nnew file mode 100644\nindex 00000000000000..b36254641327ce\n--- /dev/null\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gwt.c\n@@ -0,0 +1,270 @@\n+/*\n+ *\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n+ *\n+ * This program is free software and is provided to you under the terms of the\n+ * GNU General Public License version 2 as published by the Free Software\n+ * Foundation, and any use by you of this program is subject to the terms\n+ * of such GNU licence.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n+ *\n+ */\n+\n+#include \"mali_kbase_gwt.h\"\n+#include <linux/list_sort.h>\n+\n+static inline void kbase_gpu_gwt_setup_page_permission(\n+\t\t\t\tstruct kbase_context *kctx,\n+\t\t\t\tunsigned long flag,\n+\t\t\t\tstruct rb_node *node)\n+{\n+\tstruct rb_node *rbnode = node;\n+\n+\twhile (rbnode) {\n+\t\tstruct kbase_va_region *reg;\n+\t\tint err = 0;\n+\n+\t\treg = rb_entry(rbnode, struct kbase_va_region, rblink);\n+\t\tif (reg->nr_pages && !(reg->flags & KBASE_REG_FREE) &&\n+\t\t\t\t\t(reg->flags & KBASE_REG_GPU_WR)) {\n+\t\t\terr = kbase_mmu_update_pages(kctx, reg->start_pfn,\n+\t\t\t\t\tkbase_get_gpu_phy_pages(reg),\n+\t\t\t\t\treg->gpu_alloc->nents,\n+\t\t\t\t\treg->flags & flag);\n+\t\t\tif (err)\n+\t\t\t\tdev_warn(kctx->kbdev->dev, \"kbase_mmu_update_pages failure\\n\");\n+\t\t}\n+\n+\t\trbnode = rb_next(rbnode);\n+\t}\n+}\n+\n+static void kbase_gpu_gwt_setup_pages(struct kbase_context *kctx,\n+\t\t\t\t\tunsigned long flag)\n+{\n+\tkbase_gpu_gwt_setup_page_permission(kctx, flag,\n+\t\t\t\trb_first(&(kctx->reg_rbtree_same)));\n+\tkbase_gpu_gwt_setup_page_permission(kctx, flag,\n+\t\t\t\trb_first(&(kctx->reg_rbtree_exec)));\n+\tkbase_gpu_gwt_setup_page_permission(kctx, flag,\n+\t\t\t\trb_first(&(kctx->reg_rbtree_custom)));\n+}\n+\n+\n+int kbase_gpu_gwt_start(struct kbase_context *kctx)\n+{\n+\tkbase_gpu_vm_lock(kctx);\n+\tif (kctx->gwt_enabled) {\n+\t\tkbase_gpu_vm_unlock(kctx);\n+\t\treturn -EBUSY;\n+\t}\n+\n+\tINIT_LIST_HEAD(&kctx->gwt_current_list);\n+\tINIT_LIST_HEAD(&kctx->gwt_snapshot_list);\n+\n+\t/* If GWT is enabled using new vector dumping format\n+\t * from user space, back up status of the job serialization flag and\n+\t * use full serialisation of jobs for dumping.\n+\t * Status will be restored on end of dumping in gwt_stop.\n+\t */\n+\tkctx->kbdev->backup_serialize_jobs = kctx->kbdev->serialize_jobs;\n+\tkctx->kbdev->serialize_jobs = KBASE_SERIALIZE_INTRA_SLOT |\n+\t\t\t\t\t\tKBASE_SERIALIZE_INTER_SLOT;\n+\n+\t/* Mark gwt enabled before making pages read only in case a\n+\t   write page fault is triggered while we're still in this loop.\n+\t   (kbase_gpu_vm_lock() doesn't prevent this!)\n+\t*/\n+\tkctx->gwt_enabled = true;\n+\tkctx->gwt_was_enabled = true;\n+\n+\tkbase_gpu_gwt_setup_pages(kctx, ~KBASE_REG_GPU_WR);\n+\n+\tkbase_gpu_vm_unlock(kctx);\n+\treturn 0;\n+}\n+\n+int kbase_gpu_gwt_stop(struct kbase_context *kctx)\n+{\n+\tstruct kbasep_gwt_list_element *pos, *n;\n+\n+\tkbase_gpu_vm_lock(kctx);\n+\tif (!kctx->gwt_enabled) {\n+\t\tkbase_gpu_vm_unlock(kctx);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tlist_for_each_entry_safe(pos, n, &kctx->gwt_current_list, link) {\n+\t\tlist_del(&pos->link);\n+\t\tkfree(pos);\n+\t}\n+\n+\tlist_for_each_entry_safe(pos, n, &kctx->gwt_snapshot_list, link) {\n+\t\tlist_del(&pos->link);\n+\t\tkfree(pos);\n+\t}\n+\n+\tkctx->kbdev->serialize_jobs = kctx->kbdev->backup_serialize_jobs;\n+\n+\tkbase_gpu_gwt_setup_pages(kctx, ~0UL);\n+\n+\tkctx->gwt_enabled = false;\n+\tkbase_gpu_vm_unlock(kctx);\n+\treturn 0;\n+}\n+\n+\n+static int list_cmp_function(void *priv, struct list_head *a,\n+\t\t\t\tstruct list_head *b)\n+{\n+\tstruct kbasep_gwt_list_element *elementA = container_of(a,\n+\t\t\t\tstruct kbasep_gwt_list_element, link);\n+\tstruct kbasep_gwt_list_element *elementB = container_of(b,\n+\t\t\t\tstruct kbasep_gwt_list_element, link);\n+\n+\tCSTD_UNUSED(priv);\n+\n+\tif (elementA->page_addr > elementB->page_addr)\n+\t\treturn 1;\n+\treturn -1;\n+}\n+\n+static void kbase_gpu_gwt_collate(struct kbase_context *kctx,\n+\t\tstruct list_head *snapshot_list)\n+{\n+\tstruct kbasep_gwt_list_element *pos, *n;\n+\tstruct kbasep_gwt_list_element *collated = NULL;\n+\n+\t/* Sort the list */\n+\tlist_sort(NULL, snapshot_list, list_cmp_function);\n+\n+\t/* Combine contiguous areas. */\n+\tlist_for_each_entry_safe(pos, n, snapshot_list, link) {\n+\t\tif (collated == NULL ||\tcollated->region !=\n+\t\t\t\t\tpos->region ||\n+\t\t\t\t\t(collated->page_addr +\n+\t\t\t\t\t(collated->num_pages * PAGE_SIZE)) !=\n+\t\t\t\t\tpos->page_addr) {\n+\t\t\t/* This is the first time through, a new region or\n+\t\t\t * is not contiguous - start collating to this element\n+\t\t\t */\n+\t\t\tcollated = pos;\n+\t\t} else {\n+\t\t\t/* contiguous so merge */\n+\t\t\tcollated->num_pages += pos->num_pages;\n+\t\t\t/* remove element from list */\n+\t\t\tlist_del(&pos->link);\n+\t\t\tkfree(pos);\n+\t\t}\n+\t}\n+}\n+\n+int kbase_gpu_gwt_dump(struct kbase_context *kctx,\n+\t\t\tunion kbase_ioctl_cinstr_gwt_dump *gwt_dump)\n+{\n+\tconst u32 ubuf_size = gwt_dump->in.len;\n+\tu32 ubuf_count = 0;\n+\t__user void *user_addr = (__user void *)\n+\t\t\t(uintptr_t)gwt_dump->in.addr_buffer;\n+\t__user void *user_sizes = (__user void *)\n+\t\t\t(uintptr_t)gwt_dump->in.size_buffer;\n+\n+\tkbase_gpu_vm_lock(kctx);\n+\n+\tif (!kctx->gwt_enabled) {\n+\t\tkbase_gpu_vm_unlock(kctx);\n+\t\t/* gwt_dump shouldn't be called when gwt is disabled */\n+\t\treturn -EPERM;\n+\t}\n+\n+\tif (!gwt_dump->in.len || !gwt_dump->in.addr_buffer\n+\t\t\t|| !gwt_dump->in.size_buffer) {\n+\t\tkbase_gpu_vm_unlock(kctx);\n+\t\t/* We don't have any valid user space buffer to copy the\n+\t\t * write modified addresses.\n+\t\t */\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (list_empty(&kctx->gwt_snapshot_list) &&\n+\t\t\t!list_empty(&kctx->gwt_current_list)) {\n+\n+\t\tlist_replace_init(&kctx->gwt_current_list,\n+\t\t\t\t\t&kctx->gwt_snapshot_list);\n+\n+\t\t/* We have collected all write faults so far\n+\t\t * and they will be passed on to user space.\n+\t\t * Reset the page flags state to allow collection of\n+\t\t * further write faults.\n+\t\t */\n+\t\tkbase_gpu_gwt_setup_pages(kctx, ~KBASE_REG_GPU_WR);\n+\n+\t\t/* Sort and combine consecutive pages in the dump list*/\n+\t\tkbase_gpu_gwt_collate(kctx, &kctx->gwt_snapshot_list);\n+\t}\n+\n+\twhile ((!list_empty(&kctx->gwt_snapshot_list))) {\n+\t\tu64 addr_buffer[32];\n+\t\tu64 num_page_buffer[32];\n+\t\tu32 count = 0;\n+\t\tint err;\n+\t\tstruct kbasep_gwt_list_element *dump_info, *n;\n+\n+\t\tlist_for_each_entry_safe(dump_info, n,\n+\t\t\t\t&kctx->gwt_snapshot_list, link) {\n+\t\t\taddr_buffer[count] = dump_info->page_addr;\n+\t\t\tnum_page_buffer[count] = dump_info->num_pages;\n+\t\t\tcount++;\n+\t\t\tlist_del(&dump_info->link);\n+\t\t\tkfree(dump_info);\n+\t\t\tif (ARRAY_SIZE(addr_buffer) == count ||\n+\t\t\t\t\tubuf_size == (ubuf_count + count))\n+\t\t\t\tbreak;\n+\t\t}\n+\n+\t\tif (count) {\n+\t\t\terr = copy_to_user((user_addr +\n+\t\t\t\t\t(ubuf_count * sizeof(u64))),\n+\t\t\t\t\t(void *)addr_buffer,\n+\t\t\t\t\tcount * sizeof(u64));\n+\t\t\tif (err) {\n+\t\t\t\tdev_err(kctx->kbdev->dev, \"Copy to user failure\\n\");\n+\t\t\t\tkbase_gpu_vm_unlock(kctx);\n+\t\t\t\treturn err;\n+\t\t\t}\n+\t\t\terr = copy_to_user((user_sizes +\n+\t\t\t\t\t(ubuf_count * sizeof(u64))),\n+\t\t\t\t\t(void *)num_page_buffer,\n+\t\t\t\t\tcount * sizeof(u64));\n+\t\t\tif (err) {\n+\t\t\t\tdev_err(kctx->kbdev->dev, \"Copy to user failure\\n\");\n+\t\t\t\tkbase_gpu_vm_unlock(kctx);\n+\t\t\t\treturn err;\n+\t\t\t}\n+\n+\t\t\tubuf_count += count;\n+\t\t}\n+\n+\t\tif (ubuf_count == ubuf_size)\n+\t\t\tbreak;\n+\t}\n+\n+\tif (!list_empty(&kctx->gwt_snapshot_list))\n+\t\tgwt_dump->out.more_data_available = 1;\n+\telse\n+\t\tgwt_dump->out.more_data_available = 0;\n+\n+\tgwt_dump->out.no_of_addr_collected = ubuf_count;\n+\tkbase_gpu_vm_unlock(kctx);\n+\treturn 0;\n+}\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gwt.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gwt.h\nnew file mode 100644\nindex 00000000000000..7e7746e6491542\n--- /dev/null\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_gwt.h\n@@ -0,0 +1,55 @@\n+/*\n+ *\n+ * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ *\n+ * This program is free software and is provided to you under the terms of the\n+ * GNU General Public License version 2 as published by the Free Software\n+ * Foundation, and any use by you of this program is subject to the terms\n+ * of such GNU licence.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n+ *\n+ */\n+\n+#if !defined(_KBASE_GWT_H)\n+#define _KBASE_GWT_H\n+\n+#include <mali_kbase.h>\n+#include <mali_kbase_ioctl.h>\n+\n+/**\n+ * kbase_gpu_gwt_start - Start the GPU write tracking\n+ * @kctx: Pointer to kernel context\n+ *\n+ * @return 0 on success, error on failure.\n+ */\n+int kbase_gpu_gwt_start(struct kbase_context *kctx);\n+\n+/**\n+ * kbase_gpu_gwt_stop - Stop the GPU write tracking\n+ * @kctx: Pointer to kernel context\n+ *\n+ * @return 0 on success, error on failure.\n+ */\n+int kbase_gpu_gwt_stop(struct kbase_context *kctx);\n+\n+/**\n+ * kbase_gpu_gwt_dump - Pass page address of faulting addresses to user space.\n+ * @kctx:\tPointer to kernel context\n+ * @gwt_dump:\tUser space data to be passed.\n+ *\n+ * @return 0 on success, error on failure.\n+ */\n+int kbase_gpu_gwt_dump(struct kbase_context *kctx,\n+\t\t\tunion kbase_ioctl_cinstr_gwt_dump *gwt_dump);\n+\n+#endif /* _KBASE_GWT_H */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hw.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hw.c\nindex eb8368ccee5e5f..f34f53a919b8d6 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hw.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hw.c\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Run-time work-arounds helpers\n  */\n@@ -51,6 +56,21 @@ void kbase_hw_set_features_mask(struct kbase_device *kbdev)\n \t\tcase GPU_ID2_PRODUCT_TDVX:\n \t\t\tfeatures = base_hw_features_tDVx;\n \t\t\tbreak;\n+\t\tcase GPU_ID2_PRODUCT_TNOX:\n+\t\t\tfeatures = base_hw_features_tNOx;\n+\t\t\tbreak;\n+\t\tcase GPU_ID2_PRODUCT_TGOX:\n+\t\t\tfeatures = base_hw_features_tGOx;\n+\t\t\tbreak;\n+\t\tcase GPU_ID2_PRODUCT_TKAX:\n+\t\t\tfeatures = base_hw_features_tKAx;\n+\t\t\tbreak;\n+\t\tcase GPU_ID2_PRODUCT_TTRX:\n+\t\t\tfeatures = base_hw_features_tTRx;\n+\t\t\tbreak;\n+\t\tcase GPU_ID2_PRODUCT_TBOX:\n+\t\t\tfeatures = base_hw_features_tBOx;\n+\t\t\tbreak;\n \t\tdefault:\n \t\t\tfeatures = base_hw_features_generic;\n \t\t\tbreak;\n@@ -150,9 +170,26 @@ static const enum base_hw_issue *kbase_hw_get_issues_for_new_id(\n \t\t {{GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tDVx_r0p0},\n \t\t  {U32_MAX, NULL} } },\n \n+\t\t{GPU_ID2_PRODUCT_TNOX,\n+\t\t {{GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tNOx_r0p0},\n+\t\t  {U32_MAX, NULL} } },\n+\n+\t\t{GPU_ID2_PRODUCT_TGOX,\n+\t\t {{GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tGOx_r0p0},\n+\t\t  {GPU_ID2_VERSION_MAKE(1, 0, 0), base_hw_issues_tGOx_r1p0},\n+\t\t  {U32_MAX, NULL} } },\n \n+\t\t{GPU_ID2_PRODUCT_TKAX,\n+\t\t {{GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tKAx_r0p0},\n+\t\t  {U32_MAX, NULL} } },\n \n+\t\t{GPU_ID2_PRODUCT_TTRX,\n+\t\t {{GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tTRx_r0p0},\n+\t\t  {U32_MAX, NULL} } },\n \n+\t\t{GPU_ID2_PRODUCT_TBOX,\n+\t\t {{GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tBOx_r0p0},\n+\t\t  {U32_MAX, NULL} } },\n \t};\n \n \tu32 gpu_id = kbdev->gpu_props.props.raw_props.gpu_id;\n@@ -370,6 +407,21 @@ int kbase_hw_set_issues_mask(struct kbase_device *kbdev)\n \t\t\tcase GPU_ID2_PRODUCT_TDVX:\n \t\t\t\tissues = base_hw_issues_model_tDVx;\n \t\t\t\tbreak;\n+\t\t\tcase GPU_ID2_PRODUCT_TNOX:\n+\t\t\t\tissues = base_hw_issues_model_tNOx;\n+\t\t\t\tbreak;\n+\t\t\tcase GPU_ID2_PRODUCT_TGOX:\n+\t\t\t\tissues = base_hw_issues_model_tGOx;\n+\t\t\t\tbreak;\n+\t\t\tcase GPU_ID2_PRODUCT_TKAX:\n+\t\t\t\tissues = base_hw_issues_model_tKAx;\n+\t\t\t\tbreak;\n+\t\t\tcase GPU_ID2_PRODUCT_TTRX:\n+\t\t\t\tissues = base_hw_issues_model_tTRx;\n+\t\t\t\tbreak;\n+\t\t\tcase GPU_ID2_PRODUCT_TBOX:\n+\t\t\t\tissues = base_hw_issues_model_tBOx;\n+\t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\tdev_err(kbdev->dev,\n \t\t\t\t\t\"Unknown GPU ID %x\", gpu_id);\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hw.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hw.h\nindex 754250ce968d94..f386b1624317e7 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hw.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hw.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file\n  * Run-time work-arounds helpers\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_backend.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_backend.h\nindex b09be99e6b4e10..dde4965c426a5a 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_backend.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_backend.h\n@@ -7,15 +7,20 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /*\n  * HW access backend common APIs\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_defs.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_defs.h\nindex 0acf297192fdcf..124a2d9cf0c314 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_defs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_defs.h\n@@ -1,21 +1,26 @@\n /*\n  *\n- * (C) COPYRIGHT 2014, 2016 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014, 2016, 2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /**\n  * @file mali_kbase_hwaccess_gpu_defs.h\n  * HW access common definitions\n@@ -26,9 +31,19 @@\n \n #include <mali_kbase_jm_defs.h>\n \n-/* The hwaccess_lock (a spinlock) must be held when accessing this structure */\n+/**\n+ * struct kbase_hwaccess_data - object encapsulating the GPU backend specific\n+ *                              data for the HW access layer.\n+ *                              hwaccess_lock (a spinlock) must be held when\n+ *                              accessing this structure.\n+ * @active_kctx:     pointer to active kbase context which last submitted an\n+ *                   atom to GPU and while the context is active it can\n+ *                   submit new atoms to GPU from the irq context also, without\n+ *                   going through the bottom half of job completion path.\n+ * @backend:         GPU backend specific data for HW access layer\n+ */\n struct kbase_hwaccess_data {\n-\tstruct kbase_context *active_kctx;\n+\tstruct kbase_context *active_kctx[BASE_JM_MAX_NR_SLOTS];\n \n \tstruct kbase_backend_data backend;\n };\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_gpuprops.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_gpuprops.h\nindex cf8a8131c22ed2..63844d97ce0218 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_gpuprops.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_gpuprops.h\n@@ -1,21 +1,26 @@\n /*\n  *\n- * (C) COPYRIGHT 2014-2015 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014-2015, 2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /**\n  * Base kernel property query backend APIs\n  */\n@@ -28,6 +33,8 @@\n  *\t\t\t\t  GPU\n  * @kbdev:\tDevice pointer\n  * @regdump:\tPointer to struct kbase_gpuprops_regdump structure\n+ *\n+ * The caller should ensure that GPU remains powered-on during this function.\n  */\n void kbase_backend_gpuprops_get(struct kbase_device *kbdev,\n \t\t\t\t\tstruct kbase_gpuprops_regdump *regdump);\n@@ -38,7 +45,7 @@ void kbase_backend_gpuprops_get(struct kbase_device *kbdev,\n  * @regdump: Pointer to struct kbase_gpuprops_regdump structure\n  *\n  * This function reads GPU properties that are dependent on the hardware\n- * features bitmask\n+ * features bitmask. It will power-on the GPU if required.\n  */\n void kbase_backend_gpuprops_get_features(struct kbase_device *kbdev,\n \t\t\t\t\tstruct kbase_gpuprops_regdump *regdump);\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_instr.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_instr.h\nindex 5de2b7535bb47c..0c5ceffb0e47ae 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_instr.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_instr.h\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2014-2015 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014-2015, 2017 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * HW Access instrumentation common APIs\n  */\n@@ -30,15 +35,15 @@\n  * kbase_instr_hwcnt_enable_internal - Enable HW counters collection\n  * @kbdev:\tKbase device\n  * @kctx:\tKbase context\n- * @setup:\tHW counter setup parameters\n+ * @enable:\tHW counter setup parameters\n  *\n  * Context: might sleep, waiting for reset to complete\n  *\n  * Return: 0 on success\n  */\n int kbase_instr_hwcnt_enable_internal(struct kbase_device *kbdev,\n-\t\t\t\t\tstruct kbase_context *kctx,\n-\t\t\t\t\tstruct kbase_uk_hwcnt_setup *setup);\n+\t\t\t\tstruct kbase_context *kctx,\n+\t\t\t\tstruct kbase_ioctl_hwcnt_enable *enable);\n \n /**\n  * kbase_instr_hwcnt_disable_internal - Disable HW counters collection\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_jm.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_jm.h\nindex 750fda2cd81dec..ea87913a7a39d5 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_jm.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_jm.h\n@@ -1,21 +1,26 @@\n /*\n  *\n- * (C) COPYRIGHT 2014-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /*\n  * HW access job manager common APIs\n  */\n@@ -81,6 +86,7 @@ bool kbase_backend_use_ctx(struct kbase_device *kbdev,\n  * kbase_backend_use_ctx_sched() - Activate a context.\n  * @kbdev:\tDevice pointer\n  * @kctx:\tContext pointer\n+ * @js:         Job slot to activate context on\n  *\n  * kbase_gpu_next_job() will pull atoms from the active context.\n  *\n@@ -94,7 +100,7 @@ bool kbase_backend_use_ctx(struct kbase_device *kbdev,\n  *\t   not have an address space assigned)\n  */\n bool kbase_backend_use_ctx_sched(struct kbase_device *kbdev,\n-\t\t\t\t\tstruct kbase_context *kctx);\n+\t\t\t\t\tstruct kbase_context *kctx, int js);\n \n /**\n  * kbase_backend_release_ctx_irq - Release a context from the GPU. This will\n@@ -376,6 +382,9 @@ bool kbase_reset_gpu_active(struct kbase_device *kbdev);\n void kbase_job_slot_hardstop(struct kbase_context *kctx, int js,\n \t\t\t\tstruct kbase_jd_atom *target_katom);\n \n+/* Object containing callbacks for enabling/disabling protected mode, used\n+ * on GPU which supports protected mode switching natively.\n+ */\n extern struct protected_mode_ops kbase_native_protected_ops;\n \n #endif /* _KBASE_HWACCESS_JM_H_ */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_pm.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_pm.h\nindex 71c7d495c40ab9..4598d8099765b0 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_pm.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_pm.h\n@@ -7,15 +7,20 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /**\n  * @file mali_kbase_hwaccess_pm.h\n  * HW access power manager common APIs\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_time.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_time.h\nindex b9fe8e669c63b6..72a476a447a1a9 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_time.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwaccess_time.h\n@@ -7,15 +7,20 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /**\n  *\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwcnt_reader.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwcnt_reader.h\nindex cf7bf1b35dc59e..10706b8d25486d 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwcnt_reader.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_hwcnt_reader.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_HWCNT_READER_H_\n #define _KBASE_HWCNT_READER_H_\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_ioctl.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_ioctl.h\nindex e7c1daee470bf1..fcb9ad31e93743 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_ioctl.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_ioctl.h\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2017-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_IOCTL_H_\n #define _KBASE_IOCTL_H_\n \n@@ -22,20 +27,33 @@\n extern \"C\" {\n #endif\n \n+#include <asm-generic/ioctl.h>\n #include <linux/types.h>\n \n #define KBASE_IOCTL_TYPE 0x80\n \n-#ifdef ANDROID\n-/* Android's definition of ioctl is incorrect, specifying the type argument as\n- * 'int'. This creates a warning when using _IOWR (as the top bit is set). Work\n- * round this by redefining _IOC to include a case to 'int'.\n+/*\n+ * 11.1:\n+ * - Add BASE_MEM_TILER_ALIGN_TOP under base_mem_alloc_flags\n+ * 11.2:\n+ * - KBASE_MEM_QUERY_FLAGS can return KBASE_REG_PF_GROW and KBASE_REG_SECURE,\n+ *   which some user-side clients prior to 11.2 might fault if they received\n+ *   them\n+ * 11.3:\n+ * - New ioctls KBASE_IOCTL_STICKY_RESOURCE_MAP and\n+ *   KBASE_IOCTL_STICKY_RESOURCE_UNMAP\n+ * 11.4:\n+ * - New ioctl KBASE_IOCTL_MEM_FIND_GPU_START_AND_OFFSET\n+ * 11.5:\n+ * - New ioctl: KBASE_IOCTL_MEM_JIT_INIT (old ioctl renamed to _OLD)\n+ * 11.6:\n+ * - Added flags field to base_jit_alloc_info structure, which can be used to\n+ *   specify pseudo chunked tiler alignment for JIT allocations.\n+ * 11.7:\n+ * - Removed UMP support\n  */\n-#undef _IOC\n-#define _IOC(dir, type, nr, size) \\\n-\t((int)(((dir) << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | \\\n-\t((nr) << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT)))\n-#endif\n+#define BASE_UK_VERSION_MAJOR 11\n+#define BASE_UK_VERSION_MINOR 7\n \n /**\n  * struct kbase_ioctl_version_check - Check version compatibility with kernel\n@@ -170,9 +188,9 @@ union kbase_ioctl_mem_query {\n #define KBASE_IOCTL_MEM_QUERY \\\n \t_IOWR(KBASE_IOCTL_TYPE, 6, union kbase_ioctl_mem_query)\n \n-#define KBASE_MEM_QUERY_COMMIT_SIZE\t1\n-#define KBASE_MEM_QUERY_VA_SIZE\t\t2\n-#define KBASE_MEM_QUERY_FLAGS\t\t3\n+#define KBASE_MEM_QUERY_COMMIT_SIZE\t((u64)1)\n+#define KBASE_MEM_QUERY_VA_SIZE\t\t((u64)2)\n+#define KBASE_MEM_QUERY_FLAGS\t\t((u64)3)\n \n /**\n  * struct kbase_ioctl_mem_free - Free a memory region\n@@ -231,6 +249,21 @@ struct kbase_ioctl_hwcnt_enable {\n #define KBASE_IOCTL_HWCNT_CLEAR \\\n \t_IO(KBASE_IOCTL_TYPE, 11)\n \n+/**\n+ * struct kbase_ioctl_hwcnt_values - Values to set dummy the dummy counters to.\n+ * @data:    Counter samples for the dummy model.\n+ * @size:    Size of the counter sample data.\n+ * @padding: Padding.\n+ */\n+struct kbase_ioctl_hwcnt_values {\n+\t__u64 data;\n+\t__u32 size;\n+\t__u32 padding;\n+};\n+\n+#define KBASE_IOCTL_HWCNT_SET \\\n+\t_IOW(KBASE_IOCTL_TYPE, 32, struct kbase_ioctl_hwcnt_values)\n+\n /**\n  * struct kbase_ioctl_disjoint_query - Query the disjoint counter\n  * @counter:   A counter of disjoint events in the kernel\n@@ -246,28 +279,58 @@ struct kbase_ioctl_disjoint_query {\n  * struct kbase_ioctl_get_ddk_version - Query the kernel version\n  * @version_buffer: Buffer to receive the kernel version string\n  * @size: Size of the buffer\n+ * @padding: Padding\n  *\n  * The ioctl will return the number of bytes written into version_buffer\n  * (which includes a NULL byte) or a negative error code\n+ *\n+ * The ioctl request code has to be _IOW because the data in ioctl struct is\n+ * being copied to the kernel, even though the kernel then writes out the\n+ * version info to the buffer specified in the ioctl.\n  */\n struct kbase_ioctl_get_ddk_version {\n \t__u64 version_buffer;\n \t__u32 size;\n+\t__u32 padding;\n };\n \n #define KBASE_IOCTL_GET_DDK_VERSION \\\n \t_IOW(KBASE_IOCTL_TYPE, 13, struct kbase_ioctl_get_ddk_version)\n \n+/**\n+ * struct kbase_ioctl_mem_jit_init_old - Initialise the JIT memory allocator\n+ *\n+ * @va_pages: Number of VA pages to reserve for JIT\n+ *\n+ * Note that depending on the VA size of the application and GPU, the value\n+ * specified in @va_pages may be ignored.\n+ *\n+ * New code should use KBASE_IOCTL_MEM_JIT_INIT instead, this is kept for\n+ * backwards compatibility.\n+ */\n+struct kbase_ioctl_mem_jit_init_old {\n+\t__u64 va_pages;\n+};\n+\n+#define KBASE_IOCTL_MEM_JIT_INIT_OLD \\\n+\t_IOW(KBASE_IOCTL_TYPE, 14, struct kbase_ioctl_mem_jit_init_old)\n+\n /**\n  * struct kbase_ioctl_mem_jit_init - Initialise the JIT memory allocator\n  *\n  * @va_pages: Number of VA pages to reserve for JIT\n+ * @max_allocations: Maximum number of concurrent allocations\n+ * @trim_level: Level of JIT allocation trimming to perform on free (0 - 100%)\n+ * @padding: Currently unused, must be zero\n  *\n  * Note that depending on the VA size of the application and GPU, the value\n  * specified in @va_pages may be ignored.\n  */\n struct kbase_ioctl_mem_jit_init {\n \t__u64 va_pages;\n+\t__u8 max_allocations;\n+\t__u8 trim_level;\n+\t__u8 padding[6];\n };\n \n #define KBASE_IOCTL_MEM_JIT_INIT \\\n@@ -472,10 +535,12 @@ struct kbase_ioctl_fence_validate {\n  * struct kbase_ioctl_get_profiling_controls - Get the profiling controls\n  * @count: The size of @buffer in u32 words\n  * @buffer: The buffer to receive the profiling controls\n+ * @padding: Padding\n  */\n struct kbase_ioctl_get_profiling_controls {\n \t__u64 buffer;\n \t__u32 count;\n+\t__u32 padding;\n };\n \n #define KBASE_IOCTL_GET_PROFILING_CONTROLS \\\n@@ -513,7 +578,104 @@ struct kbase_ioctl_soft_event_update {\n #define KBASE_IOCTL_SOFT_EVENT_UPDATE \\\n \t_IOW(KBASE_IOCTL_TYPE, 28, struct kbase_ioctl_soft_event_update)\n \n-/* IOCTLs 29-32 are reserved */\n+/**\n+ * struct kbase_ioctl_sticky_resource_map - Permanently map an external resource\n+ * @count: Number of resources\n+ * @address: Array of u64 GPU addresses of the external resources to map\n+ */\n+struct kbase_ioctl_sticky_resource_map {\n+\t__u64 count;\n+\t__u64 address;\n+};\n+\n+#define KBASE_IOCTL_STICKY_RESOURCE_MAP \\\n+\t_IOW(KBASE_IOCTL_TYPE, 29, struct kbase_ioctl_sticky_resource_map)\n+\n+/**\n+ * struct kbase_ioctl_sticky_resource_map - Unmap a resource mapped which was\n+ *                                          previously permanently mapped\n+ * @count: Number of resources\n+ * @address: Array of u64 GPU addresses of the external resources to unmap\n+ */\n+struct kbase_ioctl_sticky_resource_unmap {\n+\t__u64 count;\n+\t__u64 address;\n+};\n+\n+#define KBASE_IOCTL_STICKY_RESOURCE_UNMAP \\\n+\t_IOW(KBASE_IOCTL_TYPE, 30, struct kbase_ioctl_sticky_resource_unmap)\n+\n+/**\n+ * union kbase_ioctl_mem_find_gpu_start_and_offset - Find the start address of\n+ *                                                   the GPU memory region for\n+ *                                                   the given gpu address and\n+ *                                                   the offset of that address\n+ *                                                   into the region\n+ *\n+ * @gpu_addr: GPU virtual address\n+ * @size: Size in bytes within the region\n+ * @start: Address of the beginning of the memory region enclosing @gpu_addr\n+ *         for the length of @offset bytes\n+ * @offset: The offset from the start of the memory region to @gpu_addr\n+ *\n+ * @in: Input parameters\n+ * @out: Output parameters\n+ */\n+union kbase_ioctl_mem_find_gpu_start_and_offset {\n+\tstruct {\n+\t\t__u64 gpu_addr;\n+\t\t__u64 size;\n+\t} in;\n+\tstruct {\n+\t\t__u64 start;\n+\t\t__u64 offset;\n+\t} out;\n+};\n+\n+#define KBASE_IOCTL_MEM_FIND_GPU_START_AND_OFFSET \\\n+\t_IOWR(KBASE_IOCTL_TYPE, 31, union kbase_ioctl_mem_find_gpu_start_and_offset)\n+\n+\n+#define KBASE_IOCTL_CINSTR_GWT_START \\\n+\t_IO(KBASE_IOCTL_TYPE, 33)\n+\n+#define KBASE_IOCTL_CINSTR_GWT_STOP \\\n+\t_IO(KBASE_IOCTL_TYPE, 34)\n+\n+/**\n+ * union kbase_ioctl_gwt_dump - Used to collect all GPU write fault addresses.\n+ * @addr_buffer: Address of buffer to hold addresses of gpu modified areas.\n+ * @size_buffer: Address of buffer to hold size of modified areas (in pages)\n+ * @len: Number of addresses the buffers can hold.\n+ * @more_data_available: Status indicating if more addresses are available.\n+ * @no_of_addr_collected: Number of addresses collected into addr_buffer.\n+ *\n+ * @in: Input parameters\n+ * @out: Output parameters\n+ * This structure is used when performing a call to dump GPU write fault\n+ * addresses.\n+ */\n+union kbase_ioctl_cinstr_gwt_dump {\n+\tstruct {\n+\t\t__u64 addr_buffer;\n+\t\t__u64 size_buffer;\n+\t\t__u32 len;\n+\t\t__u32 padding;\n+\n+\t} in;\n+\tstruct {\n+\t\t__u32 no_of_addr_collected;\n+\t\t__u8 more_data_available;\n+\t\t__u8 padding[27];\n+\t} out;\n+};\n+\n+#define KBASE_IOCTL_CINSTR_GWT_DUMP \\\n+\t_IOWR(KBASE_IOCTL_TYPE, 35, union kbase_ioctl_cinstr_gwt_dump)\n+\n+/* IOCTLs 36-41 are reserved */\n+\n+/* IOCTL 42 is free for use */\n \n /***************\n  * test ioctls *\n@@ -570,9 +732,9 @@ struct kbase_ioctl_tlstream_stats {\n #define KBASE_GPUPROP_VERSION_STATUS\t\t\t2\n #define KBASE_GPUPROP_MINOR_REVISION\t\t\t3\n #define KBASE_GPUPROP_MAJOR_REVISION\t\t\t4\n-#define KBASE_GPUPROP_GPU_SPEED_MHZ\t\t\t5\n+/* 5 previously used for GPU speed */\n #define KBASE_GPUPROP_GPU_FREQ_KHZ_MAX\t\t\t6\n-#define KBASE_GPUPROP_GPU_FREQ_KHZ_MIN\t\t\t7\n+/* 7 previously used for minimum GPU speed */\n #define KBASE_GPUPROP_LOG2_PROGRAM_COUNTER_SIZE\t\t8\n #define KBASE_GPUPROP_TEXTURE_FEATURES_0\t\t9\n #define KBASE_GPUPROP_TEXTURE_FEATURES_1\t\t10\n@@ -599,7 +761,7 @@ struct kbase_ioctl_tlstream_stats {\n #define KBASE_GPUPROP_RAW_L2_PRESENT\t\t\t27\n #define KBASE_GPUPROP_RAW_STACK_PRESENT\t\t\t28\n #define KBASE_GPUPROP_RAW_L2_FEATURES\t\t\t29\n-#define KBASE_GPUPROP_RAW_SUSPEND_SIZE\t\t\t30\n+#define KBASE_GPUPROP_RAW_CORE_FEATURES\t\t\t30\n #define KBASE_GPUPROP_RAW_MEM_FEATURES\t\t\t31\n #define KBASE_GPUPROP_RAW_MMU_FEATURES\t\t\t32\n #define KBASE_GPUPROP_RAW_AS_PRESENT\t\t\t33\n@@ -651,6 +813,14 @@ struct kbase_ioctl_tlstream_stats {\n #define KBASE_GPUPROP_COHERENCY_GROUP_14\t\t78\n #define KBASE_GPUPROP_COHERENCY_GROUP_15\t\t79\n \n+#define KBASE_GPUPROP_TEXTURE_FEATURES_3\t\t80\n+#define KBASE_GPUPROP_RAW_TEXTURE_FEATURES_3\t\t81\n+\n+#define KBASE_GPUPROP_NUM_EXEC_ENGINES                  82\n+\n+#define KBASE_GPUPROP_RAW_THREAD_TLS_ALLOC\t\t83\n+#define KBASE_GPUPROP_TLS_ALLOC\t\t\t\t84\n+\n #ifdef __cpluscplus\n }\n #endif\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jd.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jd.c\nindex 144ebfcdfc5930..be3592674fb304 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jd.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jd.c\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #if defined(CONFIG_DMA_SHARED_BUFFER)\n #include <linux/dma-buf.h>\n #endif\t\t\t\t/* defined(CONFIG_DMA_SHARED_BUFFER) */\n@@ -24,7 +29,6 @@\n #include <linux/compat.h>\n #endif\n #include <mali_kbase.h>\n-#include <mali_kbase_uku.h>\n #include <linux/random.h>\n #include <linux/version.h>\n #include <linux/ratelimit.h>\n@@ -106,7 +110,7 @@ static int jd_run_atom(struct kbase_jd_atom *katom)\n \treturn kbasep_js_add_job(kctx, katom);\n }\n \n-#if defined(CONFIG_KDS) || defined(CONFIG_MALI_BIFROST_DMA_FENCE)\n+#if defined(CONFIG_MALI_BIFROST_DMA_FENCE)\n void kbase_jd_dep_clear_locked(struct kbase_jd_atom *katom)\n {\n \tstruct kbase_device *kbdev;\n@@ -139,91 +143,8 @@ void kbase_jd_dep_clear_locked(struct kbase_jd_atom *katom)\n }\n #endif\n \n-#ifdef CONFIG_KDS\n-\n-/* Add the katom to the kds waiting list.\n- * Atoms must be added to the waiting list after a successful call to kds_async_waitall.\n- * The caller must hold the kbase_jd_context.lock */\n-\n-static void kbase_jd_kds_waiters_add(struct kbase_jd_atom *katom)\n-{\n-\tstruct kbase_context *kctx;\n-\n-\tKBASE_DEBUG_ASSERT(katom);\n-\n-\tkctx = katom->kctx;\n-\n-\tlist_add_tail(&katom->node, &kctx->waiting_kds_resource);\n-}\n-\n-/* Remove the katom from the kds waiting list.\n- * Atoms must be removed from the waiting list before a call to kds_resource_set_release_sync.\n- * The supplied katom must first have been added to the list with a call to kbase_jd_kds_waiters_add.\n- * The caller must hold the kbase_jd_context.lock */\n-\n-static void kbase_jd_kds_waiters_remove(struct kbase_jd_atom *katom)\n-{\n-\tKBASE_DEBUG_ASSERT(katom);\n-\tlist_del(&katom->node);\n-}\n-\n-static void kds_dep_clear(void *callback_parameter, void *callback_extra_parameter)\n-{\n-\tstruct kbase_jd_atom *katom;\n-\tstruct kbase_jd_context *ctx;\n-\n-\tkatom = (struct kbase_jd_atom *)callback_parameter;\n-\tKBASE_DEBUG_ASSERT(katom);\n-\n-\tctx = &katom->kctx->jctx;\n-\n-\t/* If KDS resource has already been satisfied (e.g. due to zapping)\n-\t * do nothing.\n-\t */\n-\tmutex_lock(&ctx->lock);\n-\tif (!katom->kds_dep_satisfied) {\n-\t\tkatom->kds_dep_satisfied = true;\n-\t\tkbase_jd_dep_clear_locked(katom);\n-\t}\n-\tmutex_unlock(&ctx->lock);\n-}\n-\n-static void kbase_cancel_kds_wait_job(struct kbase_jd_atom *katom)\n-{\n-\tKBASE_DEBUG_ASSERT(katom);\n-\n-\t/* Prevent job_done_nolock from being called twice on an atom when\n-\t *  there is a race between job completion and cancellation */\n-\n-\tif (katom->status == KBASE_JD_ATOM_STATE_QUEUED) {\n-\t\t/* Wait was cancelled - zap the atom */\n-\t\tkatom->event_code = BASE_JD_EVENT_JOB_CANCELLED;\n-\t\tif (jd_done_nolock(katom, NULL))\n-\t\t\tkbase_js_sched_all(katom->kctx->kbdev);\n-\t}\n-}\n-#endif\t\t\t\t/* CONFIG_KDS */\n-\n void kbase_jd_free_external_resources(struct kbase_jd_atom *katom)\n {\n-#ifdef CONFIG_KDS\n-\tif (katom->kds_rset) {\n-\t\tstruct kbase_jd_context *jctx = &katom->kctx->jctx;\n-\n-\t\t/*\n-\t\t * As the atom is no longer waiting, remove it from\n-\t\t * the waiting list.\n-\t\t */\n-\n-\t\tmutex_lock(&jctx->lock);\n-\t\tkbase_jd_kds_waiters_remove(katom);\n-\t\tmutex_unlock(&jctx->lock);\n-\n-\t\t/* Release the kds resource or cancel if zapping */\n-\t\tkds_resource_set_release_sync(&katom->kds_rset);\n-\t}\n-#endif\t\t\t\t/* CONFIG_KDS */\n-\n #ifdef CONFIG_MALI_BIFROST_DMA_FENCE\n \t/* Flush dma-fence workqueue to ensure that any callbacks that may have\n \t * been queued are done before continuing.\n@@ -240,12 +161,6 @@ static void kbase_jd_post_external_resources(struct kbase_jd_atom *katom)\n \tKBASE_DEBUG_ASSERT(katom);\n \tKBASE_DEBUG_ASSERT(katom->core_req & BASE_JD_REQ_EXTERNAL_RESOURCES);\n \n-#ifdef CONFIG_KDS\n-\t/* Prevent the KDS resource from triggering the atom in case of zapping */\n-\tif (katom->kds_rset)\n-\t\tkatom->kds_dep_satisfied = true;\n-#endif\t\t\t\t/* CONFIG_KDS */\n-\n #ifdef CONFIG_MALI_BIFROST_DMA_FENCE\n \tkbase_dma_fence_signal(katom);\n #endif /* CONFIG_MALI_BIFROST_DMA_FENCE */\n@@ -281,11 +196,6 @@ static int kbase_jd_pre_external_resources(struct kbase_jd_atom *katom, const st\n {\n \tint err_ret_val = -EINVAL;\n \tu32 res_no;\n-#ifdef CONFIG_KDS\n-\tu32 kds_res_count = 0;\n-\tstruct kds_resource **kds_resources = NULL;\n-\tunsigned long *kds_access_bitmap = NULL;\n-#endif\t\t\t\t/* CONFIG_KDS */\n #ifdef CONFIG_MALI_BIFROST_DMA_FENCE\n \tstruct kbase_dma_fence_resv_info info = {\n \t\t.dma_fence_resv_count = 0,\n@@ -332,25 +242,6 @@ static int kbase_jd_pre_external_resources(struct kbase_jd_atom *katom, const st\n \t\terr_ret_val = -EINVAL;\n \t\tgoto early_err_out;\n \t}\n-#ifdef CONFIG_KDS\n-\t/* assume we have to wait for all */\n-\tKBASE_DEBUG_ASSERT(0 != katom->nr_extres);\n-\tkds_resources = kmalloc_array(katom->nr_extres, sizeof(struct kds_resource *), GFP_KERNEL);\n-\n-\tif (!kds_resources) {\n-\t\terr_ret_val = -ENOMEM;\n-\t\tgoto early_err_out;\n-\t}\n-\n-\tKBASE_DEBUG_ASSERT(0 != katom->nr_extres);\n-\tkds_access_bitmap = kcalloc(BITS_TO_LONGS(katom->nr_extres),\n-\t\t\t\t    sizeof(unsigned long),\n-\t\t\t\t    GFP_KERNEL);\n-\tif (!kds_access_bitmap) {\n-\t\terr_ret_val = -ENOMEM;\n-\t\tgoto early_err_out;\n-\t}\n-#endif\t\t\t\t/* CONFIG_KDS */\n \n #ifdef CONFIG_MALI_BIFROST_DMA_FENCE\n \tif (implicit_sync) {\n@@ -401,12 +292,7 @@ static int kbase_jd_pre_external_resources(struct kbase_jd_atom *katom, const st\n \t\t}\n \n \t\talloc = kbase_map_external_resource(katom->kctx, reg,\n-\t\t\t\tcurrent->mm\n-#ifdef CONFIG_KDS\n-\t\t\t\t, &kds_res_count, kds_resources,\n-\t\t\t\tkds_access_bitmap, exclusive\n-#endif\n-\t\t\t\t);\n+\t\t\t\tcurrent->mm);\n \t\tif (!alloc) {\n \t\t\terr_ret_val = -EINVAL;\n \t\t\tgoto failed_loop;\n@@ -434,36 +320,12 @@ static int kbase_jd_pre_external_resources(struct kbase_jd_atom *katom, const st\n \t\tkatom->extres[res_no].alloc = alloc;\n \t}\n \t/* successfully parsed the extres array */\n-\t/* drop the vm lock before we call into kds */\n+\t/* drop the vm lock now */\n \tkbase_gpu_vm_unlock(katom->kctx);\n \n \t/* Release the processes mmap lock */\n \tup_read(&current->mm->mmap_sem);\n \n-#ifdef CONFIG_KDS\n-\tif (kds_res_count) {\n-\t\tint wait_failed;\n-\n-\t\t/* We have resources to wait for with kds */\n-\t\tkatom->kds_dep_satisfied = false;\n-\n-\t\twait_failed = kds_async_waitall(&katom->kds_rset,\n-\t\t\t\t&katom->kctx->jctx.kds_cb, katom, NULL,\n-\t\t\t\tkds_res_count, kds_access_bitmap,\n-\t\t\t\tkds_resources);\n-\n-\t\tif (wait_failed)\n-\t\t\tgoto failed_kds_setup;\n-\t\telse\n-\t\t\tkbase_jd_kds_waiters_add(katom);\n-\t} else {\n-\t\t/* Nothing to wait for, so kds dep met */\n-\t\tkatom->kds_dep_satisfied = true;\n-\t}\n-\tkfree(kds_resources);\n-\tkfree(kds_access_bitmap);\n-#endif\t\t\t\t/* CONFIG_KDS */\n-\n #ifdef CONFIG_MALI_BIFROST_DMA_FENCE\n \tif (implicit_sync) {\n \t\tif (info.dma_fence_resv_count) {\n@@ -486,24 +348,6 @@ static int kbase_jd_pre_external_resources(struct kbase_jd_atom *katom, const st\n \n #ifdef CONFIG_MALI_BIFROST_DMA_FENCE\n failed_dma_fence_setup:\n-#ifdef CONFIG_KDS\n-\t/* If we are here, dma_fence setup failed but KDS didn't.\n-\t * Revert KDS setup if any.\n-\t */\n-\tif (kds_res_count) {\n-\t\tmutex_unlock(&katom->kctx->jctx.lock);\n-\t\tkds_resource_set_release_sync(&katom->kds_rset);\n-\t\tmutex_lock(&katom->kctx->jctx.lock);\n-\n-\t\tkbase_jd_kds_waiters_remove(katom);\n-\t\tkatom->kds_dep_satisfied = true;\n-\t}\n-#endif /* CONFIG_KDS */\n-#endif /* CONFIG_MALI_BIFROST_DMA_FENCE */\n-#ifdef CONFIG_KDS\n-failed_kds_setup:\n-#endif\n-#if defined(CONFIG_KDS) || defined(CONFIG_MALI_BIFROST_DMA_FENCE)\n \t/* Lock the processes mmap lock */\n \tdown_read(&current->mm->mmap_sem);\n \n@@ -526,10 +370,6 @@ static int kbase_jd_pre_external_resources(struct kbase_jd_atom *katom, const st\n  early_err_out:\n \tkfree(katom->extres);\n \tkatom->extres = NULL;\n-#ifdef CONFIG_KDS\n-\tkfree(kds_resources);\n-\tkfree(kds_access_bitmap);\n-#endif\t\t\t\t/* CONFIG_KDS */\n #ifdef CONFIG_MALI_BIFROST_DMA_FENCE\n \tif (implicit_sync) {\n \t\tkfree(info.resv_objs);\n@@ -559,15 +399,6 @@ static inline void jd_resolve_dep(struct list_head *out_list,\n \n \t\tif (katom->event_code != BASE_JD_EVENT_DONE &&\n \t\t\t(dep_type != BASE_JD_DEP_TYPE_ORDER)) {\n-#ifdef CONFIG_KDS\n-\t\t\tif (!dep_atom->kds_dep_satisfied) {\n-\t\t\t\t/* Just set kds_dep_satisfied to true. If the callback happens after this then it will early out and\n-\t\t\t\t * do nothing. If the callback doesn't happen then kbase_jd_post_external_resources will clean up\n-\t\t\t\t */\n-\t\t\t\tdep_atom->kds_dep_satisfied = true;\n-\t\t\t}\n-#endif\n-\n #ifdef CONFIG_MALI_BIFROST_DMA_FENCE\n \t\t\tkbase_dma_fence_cancel_callbacks(dep_atom);\n #endif\n@@ -576,7 +407,7 @@ static inline void jd_resolve_dep(struct list_head *out_list,\n \t\t\tKBASE_DEBUG_ASSERT(dep_atom->status !=\n \t\t\t\t\t\tKBASE_JD_ATOM_STATE_UNUSED);\n \n-\t\t\tif ((dep_atom->core_req & BASE_JD_REQ_SOFT_REPLAY)\n+\t\t\tif ((dep_atom->core_req & BASE_JD_REQ_SOFT_JOB_TYPE)\n \t\t\t\t\t!= BASE_JD_REQ_SOFT_REPLAY) {\n \t\t\t\tdep_atom->will_fail_event_code =\n \t\t\t\t\tdep_atom->event_code;\n@@ -617,10 +448,6 @@ static inline void jd_resolve_dep(struct list_head *out_list,\n \t\t\t}\n #endif /* CONFIG_MALI_BIFROST_DMA_FENCE */\n \n-#ifdef CONFIG_KDS\n-\t\t\tdep_satisfied = dep_satisfied && dep_atom->kds_dep_satisfied;\n-#endif\n-\n \t\t\tif (dep_satisfied) {\n \t\t\t\tdep_atom->in_jd_list = true;\n \t\t\t\tlist_add_tail(&dep_atom->jd_item, out_list);\n@@ -756,10 +583,6 @@ static void jd_try_submitting_deps(struct list_head *out_list,\n \t\t\t\t\tdep_satisfied = false;\n \t\t\t\t}\n #endif /* CONFIG_MALI_BIFROST_DMA_FENCE */\n-#ifdef CONFIG_KDS\n-\t\t\t\tdep_satisfied = dep_satisfied &&\n-\t\t\t\t\t\tdep_atom->kds_dep_satisfied;\n-#endif\n \n \t\t\t\tif (dep0_valid && dep1_valid && dep_satisfied) {\n \t\t\t\t\tdep_atom->in_jd_list = true;\n@@ -997,6 +820,7 @@ bool jd_submit_atom(struct kbase_context *kctx, const struct base_jd_atom_v2 *us\n \tkatom->x_pre_dep = NULL;\n \tkatom->x_post_dep = NULL;\n \tkatom->will_fail_event_code = BASE_JD_EVENT_NOT_STARTED;\n+\tkatom->softjob_data = NULL;\n \n \t/* Implicitly sets katom->protected_state.enter as well. */\n \tkatom->protected_state.exit = KBASE_ATOM_EXIT_PROTECTED_CHECK;\n@@ -1004,12 +828,6 @@ bool jd_submit_atom(struct kbase_context *kctx, const struct base_jd_atom_v2 *us\n \tkatom->age = kctx->age_count++;\n \n \tINIT_LIST_HEAD(&katom->jd_item);\n-#ifdef CONFIG_KDS\n-\t/* Start by assuming that the KDS dependencies are satisfied,\n-\t * kbase_jd_pre_external_resources will correct this if there are dependencies */\n-\tkatom->kds_dep_satisfied = true;\n-\tkatom->kds_rset = NULL;\n-#endif\t\t\t\t/* CONFIG_KDS */\n #ifdef CONFIG_MALI_BIFROST_DMA_FENCE\n \tkbase_fence_dep_count_set(katom, -1);\n #endif\n@@ -1185,6 +1003,16 @@ bool jd_submit_atom(struct kbase_context *kctx, const struct base_jd_atom_v2 *us\n \t\tgoto out;\n \t}\n \n+\t/* Reject fence wait soft-job atoms accessing external resources */\n+\tif ((katom->core_req & BASE_JD_REQ_EXTERNAL_RESOURCES) &&\n+\t\t\t ((katom->core_req & BASE_JD_REQ_SOFT_JOB_TYPE) == BASE_JD_REQ_SOFT_FENCE_WAIT)) {\n+\t\tdev_warn(kctx->kbdev->dev,\n+\t\t\t\t\"Rejecting fence wait soft-job atom accessing external resources\");\n+\t\tkatom->event_code = BASE_JD_EVENT_JOB_INVALID;\n+\t\tret = jd_done_nolock(katom, NULL);\n+\t\tgoto out;\n+\t}\n+\n \tif (katom->core_req & BASE_JD_REQ_EXTERNAL_RESOURCES) {\n \t\t/* handle what we need to do to access the external resources */\n \t\tif (kbase_jd_pre_external_resources(katom, user_atom) != 0) {\n@@ -1227,14 +1055,6 @@ bool jd_submit_atom(struct kbase_context *kctx, const struct base_jd_atom_v2 *us\n \t\tret = false;\n \t\tgoto out;\n \t}\n-#ifdef CONFIG_KDS\n-\tif (!katom->kds_dep_satisfied) {\n-\t\t/* Queue atom due to KDS dependency */\n-\t\tret = false;\n-\t\tgoto out;\n-\t}\n-#endif\t\t\t\t/* CONFIG_KDS */\n-\n \n #ifdef CONFIG_MALI_BIFROST_DMA_FENCE\n \tif (kbase_fence_dep_count_read(katom) != -1) {\n@@ -1322,12 +1142,6 @@ int kbase_jd_submit(struct kbase_context *kctx,\n \t\t\tbreak;\n \t\t}\n \n-#ifdef BASE_LEGACY_UK10_2_SUPPORT\n-\t\tif (KBASE_API_VERSION(10, 3) > kctx->api_version)\n-\t\t\tuser_atom.core_req = (u32)(user_atom.compat_core_req\n-\t\t\t\t\t      & 0x7fff);\n-#endif /* BASE_LEGACY_UK10_2_SUPPORT */\n-\n \t\tuser_addr = (void __user *)((uintptr_t) user_addr + stride);\n \n \t\tmutex_lock(&jctx->lock);\n@@ -1673,7 +1487,6 @@ void kbase_jd_done(struct kbase_jd_atom *katom, int slot_nr,\n #endif\n \n \tWARN_ON(work_pending(&katom->work));\n-\tKBASE_DEBUG_ASSERT(0 == object_is_on_stack(&katom->work));\n \tINIT_WORK(&katom->work, kbase_jd_done_worker);\n \tqueue_work(kctx->jctx.job_done_wq, &katom->work);\n }\n@@ -1698,7 +1511,6 @@ void kbase_jd_cancel(struct kbase_device *kbdev, struct kbase_jd_atom *katom)\n \n \tkatom->event_code = BASE_JD_EVENT_JOB_CANCELLED;\n \n-\tKBASE_DEBUG_ASSERT(0 == object_is_on_stack(&katom->work));\n \tINIT_WORK(&katom->work, jd_cancel_worker);\n \tqueue_work(kctx->jctx.job_done_wq, &katom->work);\n }\n@@ -1732,24 +1544,6 @@ void kbase_jd_zap_context(struct kbase_context *kctx)\n \t}\n \n \n-#ifdef CONFIG_KDS\n-\n-\t/* For each job waiting on a kds resource, cancel the wait and force the job to\n-\t * complete early, this is done so that we don't leave jobs outstanding waiting\n-\t * on kds resources which may never be released when contexts are zapped, resulting\n-\t * in a hang.\n-\t *\n-\t * Note that we can safely iterate over the list as the struct kbase_jd_context lock is held,\n-\t * this prevents items being removed when calling job_done_nolock in kbase_cancel_kds_wait_job.\n-\t */\n-\n-\tlist_for_each(entry, &kctx->waiting_kds_resource) {\n-\t\tkatom = list_entry(entry, struct kbase_jd_atom, node);\n-\n-\t\tkbase_cancel_kds_wait_job(katom);\n-\t}\n-#endif\n-\n #ifdef CONFIG_MALI_BIFROST_DMA_FENCE\n \tkbase_dma_fence_cancel_all_atoms(kctx);\n #endif\n@@ -1772,9 +1566,6 @@ int kbase_jd_init(struct kbase_context *kctx)\n {\n \tint i;\n \tint mali_err = 0;\n-#ifdef CONFIG_KDS\n-\tint err;\n-#endif\t\t\t\t/* CONFIG_KDS */\n \n \tKBASE_DEBUG_ASSERT(kctx);\n \n@@ -1809,24 +1600,12 @@ int kbase_jd_init(struct kbase_context *kctx)\n \n \tspin_lock_init(&kctx->jctx.tb_lock);\n \n-#ifdef CONFIG_KDS\n-\terr = kds_callback_init(&kctx->jctx.kds_cb, 0, kds_dep_clear);\n-\tif (0 != err) {\n-\t\tmali_err = -EINVAL;\n-\t\tgoto out2;\n-\t}\n-#endif\t\t\t\t/* CONFIG_KDS */\n-\n \tkctx->jctx.job_nr = 0;\n \tINIT_LIST_HEAD(&kctx->completed_jobs);\n \tatomic_set(&kctx->work_count, 0);\n \n \treturn 0;\n \n-#ifdef CONFIG_KDS\n- out2:\n-\tdestroy_workqueue(kctx->jctx.job_done_wq);\n-#endif\t\t\t\t/* CONFIG_KDS */\n  out1:\n \treturn mali_err;\n }\n@@ -1837,9 +1616,6 @@ void kbase_jd_exit(struct kbase_context *kctx)\n {\n \tKBASE_DEBUG_ASSERT(kctx);\n \n-#ifdef CONFIG_KDS\n-\tkds_callback_term(&kctx->jctx.kds_cb);\n-#endif\t\t\t\t/* CONFIG_KDS */\n \t/* Work queue is emptied by this */\n \tdestroy_workqueue(kctx->jctx.job_done_wq);\n }\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jd_debugfs.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jd_debugfs.c\nindex fed4ad5816aba7..2dda5fbf286ff9 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jd_debugfs.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jd_debugfs.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifdef CONFIG_DEBUG_FS\n \n #include <linux/seq_file.h>\n@@ -24,6 +29,7 @@\n #if defined(CONFIG_SYNC) || defined(CONFIG_SYNC_FILE)\n #include <mali_kbase_sync.h>\n #endif\n+#include <mali_kbase_ioctl.h>\n \n struct kbase_jd_debugfs_depinfo {\n \tu8 id;\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jd_debugfs.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jd_debugfs.h\nindex fae32919b22f19..ce0cb61f8c2797 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jd_debugfs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jd_debugfs.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /**\n  * @file mali_kbase_jd_debugfs.h\n  * Header file for job dispatcher-related entries in debugfs\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jm.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jm.c\nindex 0c5c6a6f78cb39..da78a1670d9b8c 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jm.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jm.c\n@@ -1,21 +1,26 @@\n /*\n  *\n- * (C) COPYRIGHT 2014-2016 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /*\n  * HW access job manager common APIs\n  */\n@@ -39,7 +44,7 @@ static bool kbase_jm_next_job(struct kbase_device *kbdev, int js,\n \tstruct kbase_context *kctx;\n \tint i;\n \n-\tkctx = kbdev->hwaccess.active_kctx;\n+\tkctx = kbdev->hwaccess.active_kctx[js];\n \n \tif (!kctx)\n \t\treturn true;\n@@ -101,10 +106,14 @@ void kbase_jm_try_kick_all(struct kbase_device *kbdev)\n \n void kbase_jm_idle_ctx(struct kbase_device *kbdev, struct kbase_context *kctx)\n {\n+\tint js;\n+\n \tlockdep_assert_held(&kbdev->hwaccess_lock);\n \n-\tif (kbdev->hwaccess.active_kctx == kctx)\n-\t\tkbdev->hwaccess.active_kctx = NULL;\n+\tfor (js = 0; js < BASE_JM_MAX_NR_SLOTS; js++) {\n+\t\tif (kbdev->hwaccess.active_kctx[js] == kctx)\n+\t\t\tkbdev->hwaccess.active_kctx[js] = NULL;\n+\t}\n }\n \n struct kbase_jd_atom *kbase_jm_return_atom_to_js(struct kbase_device *kbdev,\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jm.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jm.h\nindex a74ee24c8058fa..c468ea4d20a54e 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jm.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_jm.h\n@@ -7,15 +7,20 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n /*\n  * Job manager common APIs\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js.c\nindex 677e438aedfacd..0ef7cf67cd3872 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js.c\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2011-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2011-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /*\n  * Job Scheduler Implementation\n  */\n@@ -140,13 +145,11 @@ static void kbase_js_sync_timers(struct kbase_device *kbdev)\n bool kbasep_js_runpool_retain_ctx_nolock(struct kbase_device *kbdev,\n \t\tstruct kbase_context *kctx)\n {\n-\tstruct kbasep_js_device_data *js_devdata;\n \tbool result = false;\n \tint as_nr;\n \n \tKBASE_DEBUG_ASSERT(kbdev != NULL);\n \tKBASE_DEBUG_ASSERT(kctx != NULL);\n-\tjs_devdata = &kbdev->js_data;\n \n \tlockdep_assert_held(&kbdev->hwaccess_lock);\n \n@@ -419,7 +422,7 @@ static bool kbase_js_ctx_list_add_unpullable_nolock(struct kbase_device *kbdev,\n int kbasep_js_devdata_init(struct kbase_device * const kbdev)\n {\n \tstruct kbasep_js_device_data *jsdd;\n-\tint i;\n+\tint i, j;\n \n \tKBASE_DEBUG_ASSERT(kbdev != NULL);\n \n@@ -524,8 +527,10 @@ int kbasep_js_devdata_init(struct kbase_device * const kbdev)\n \tsema_init(&jsdd->schedule_sem, 1);\n \n \tfor (i = 0; i < kbdev->gpu_props.num_job_slots; ++i) {\n-\t\tINIT_LIST_HEAD(&jsdd->ctx_list_pullable[i]);\n-\t\tINIT_LIST_HEAD(&jsdd->ctx_list_unpullable[i]);\n+\t\tfor (j = 0; j < KBASE_JS_ATOM_SCHED_PRIO_COUNT; ++j) {\n+\t\t\tINIT_LIST_HEAD(&jsdd->ctx_list_pullable[i][j]);\n+\t\t\tINIT_LIST_HEAD(&jsdd->ctx_list_unpullable[i][j]);\n+\t\t}\n \t}\n \n \treturn 0;\n@@ -549,13 +554,13 @@ void kbasep_js_devdata_term(struct kbase_device *kbdev)\n \t */\n \tKBASE_DEBUG_ASSERT(js_devdata->nr_all_contexts_running == 0);\n \tKBASE_DEBUG_ASSERT(memcmp(\n-\t        js_devdata->runpool_irq.ctx_attr_ref_count,\n-\t        zero_ctx_attr_ref_count,\n-\t        sizeof(zero_ctx_attr_ref_count)) == 0);\n+\t\t\t\t  js_devdata->runpool_irq.ctx_attr_ref_count,\n+\t\t\t\t  zero_ctx_attr_ref_count,\n+\t\t\t\t  sizeof(zero_ctx_attr_ref_count)) == 0);\n \tCSTD_UNUSED(zero_ctx_attr_ref_count);\n }\n \n-int kbasep_js_kctx_init(struct kbase_context * const kctx)\n+int kbasep_js_kctx_init(struct kbase_context *const kctx)\n {\n \tstruct kbase_device *kbdev;\n \tstruct kbasep_js_kctx_info *js_kctx_info;\n@@ -663,7 +668,7 @@ static bool kbase_js_ctx_list_add_pullable_nolock(struct kbase_device *kbdev,\n \t\tlist_del_init(&kctx->jctx.sched_info.ctx.ctx_list_entry[js]);\n \n \tlist_add_tail(&kctx->jctx.sched_info.ctx.ctx_list_entry[js],\n-\t\t\t\t\t&kbdev->js_data.ctx_list_pullable[js]);\n+\t\t\t&kbdev->js_data.ctx_list_pullable[js][kctx->priority]);\n \n \tif (!kctx->slots_pullable) {\n \t\tkbdev->js_data.nr_contexts_pullable++;\n@@ -703,7 +708,7 @@ static bool kbase_js_ctx_list_add_pullable_head_nolock(\n \t\tlist_del_init(&kctx->jctx.sched_info.ctx.ctx_list_entry[js]);\n \n \tlist_add(&kctx->jctx.sched_info.ctx.ctx_list_entry[js],\n-\t\t\t\t\t&kbdev->js_data.ctx_list_pullable[js]);\n+\t\t\t&kbdev->js_data.ctx_list_pullable[js][kctx->priority]);\n \n \tif (!kctx->slots_pullable) {\n \t\tkbdev->js_data.nr_contexts_pullable++;\n@@ -774,7 +779,7 @@ static bool kbase_js_ctx_list_add_unpullable_nolock(struct kbase_device *kbdev,\n \tlockdep_assert_held(&kbdev->hwaccess_lock);\n \n \tlist_move_tail(&kctx->jctx.sched_info.ctx.ctx_list_entry[js],\n-\t\t\t\t&kbdev->js_data.ctx_list_unpullable[js]);\n+\t\t&kbdev->js_data.ctx_list_unpullable[js][kctx->priority]);\n \n \tif (kctx->slots_pullable == (1 << js)) {\n \t\tkbdev->js_data.nr_contexts_pullable--;\n@@ -849,19 +854,23 @@ static struct kbase_context *kbase_js_ctx_list_pop_head_nolock(\n \t\t\t\t\t\tint js)\n {\n \tstruct kbase_context *kctx;\n+\tint i;\n \n \tlockdep_assert_held(&kbdev->hwaccess_lock);\n \n-\tif (list_empty(&kbdev->js_data.ctx_list_pullable[js]))\n-\t\treturn NULL;\n+\tfor (i = 0; i < KBASE_JS_ATOM_SCHED_PRIO_COUNT; i++) {\n+\t\tif (list_empty(&kbdev->js_data.ctx_list_pullable[js][i]))\n+\t\t\tcontinue;\n \n-\tkctx = list_entry(kbdev->js_data.ctx_list_pullable[js].next,\n-\t\t\t\t\tstruct kbase_context,\n-\t\t\t\t\tjctx.sched_info.ctx.ctx_list_entry[js]);\n+\t\tkctx = list_entry(kbdev->js_data.ctx_list_pullable[js][i].next,\n+\t\t\t\tstruct kbase_context,\n+\t\t\t\tjctx.sched_info.ctx.ctx_list_entry[js]);\n \n-\tlist_del_init(&kctx->jctx.sched_info.ctx.ctx_list_entry[js]);\n+\t\tlist_del_init(&kctx->jctx.sched_info.ctx.ctx_list_entry[js]);\n \n-\treturn kctx;\n+\t\treturn kctx;\n+\t}\n+\treturn NULL;\n }\n \n /**\n@@ -1062,6 +1071,51 @@ static bool kbase_js_dep_validate(struct kbase_context *kctx,\n \treturn ret;\n }\n \n+void kbase_js_set_ctx_priority(struct kbase_context *kctx, int new_priority)\n+{\n+\tstruct kbase_device *kbdev = kctx->kbdev;\n+\tint js;\n+\n+\tlockdep_assert_held(&kbdev->hwaccess_lock);\n+\n+\t/* Move kctx to the pullable/upullable list as per the new priority */\n+\tif (new_priority != kctx->priority) {\n+\t\tfor (js = 0; js < kbdev->gpu_props.num_job_slots; js++) {\n+\t\t\tif (kctx->slots_pullable & (1 << js))\n+\t\t\t\tlist_move_tail(&kctx->jctx.sched_info.ctx.ctx_list_entry[js],\n+\t\t\t\t\t&kbdev->js_data.ctx_list_pullable[js][new_priority]);\n+\t\t\telse\n+\t\t\t\tlist_move_tail(&kctx->jctx.sched_info.ctx.ctx_list_entry[js],\n+\t\t\t\t\t&kbdev->js_data.ctx_list_unpullable[js][new_priority]);\n+\t\t}\n+\n+\t\tkctx->priority = new_priority;\n+\t}\n+}\n+\n+void kbase_js_update_ctx_priority(struct kbase_context *kctx)\n+{\n+\tstruct kbase_device *kbdev = kctx->kbdev;\n+\tint new_priority = KBASE_JS_ATOM_SCHED_PRIO_LOW;\n+\tint prio;\n+\n+\tlockdep_assert_held(&kbdev->hwaccess_lock);\n+\n+\tif (kbdev->js_ctx_scheduling_mode == KBASE_JS_SYSTEM_PRIORITY_MODE) {\n+\t\t/* Determine the new priority for context, as per the priority\n+\t\t * of currently in-use atoms.\n+\t\t */\n+\t\tfor (prio = 0; prio < KBASE_JS_ATOM_SCHED_PRIO_COUNT; prio++) {\n+\t\t\tif (kctx->atoms_count[prio]) {\n+\t\t\t\tnew_priority = prio;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\tkbase_js_set_ctx_priority(kctx, new_priority);\n+}\n+\n bool kbasep_js_add_job(struct kbase_context *kctx,\n \t\tstruct kbase_jd_atom *atom)\n {\n@@ -1093,12 +1147,12 @@ bool kbasep_js_add_job(struct kbase_context *kctx,\n \tKBASE_DEBUG_ASSERT(js_kctx_info->ctx.nr_jobs < U32_MAX);\n \t++(js_kctx_info->ctx.nr_jobs);\n \n-\t/* Setup any scheduling information */\n-\tkbasep_js_clear_job_retry_submit(atom);\n-\n \t/* Lock for state available during IRQ */\n \tspin_lock_irqsave(&kbdev->hwaccess_lock, flags);\n \n+\tif (++kctx->atoms_count[atom->sched_priority] == 1)\n+\t\tkbase_js_update_ctx_priority(kctx);\n+\n \tif (!kbase_js_dep_validate(kctx, atom)) {\n \t\t/* Dependencies could not be represented */\n \t\t--(js_kctx_info->ctx.nr_jobs);\n@@ -1107,6 +1161,19 @@ bool kbasep_js_add_job(struct kbase_context *kctx,\n \t\t * dependencies */\n \t\tatom->status = KBASE_JD_ATOM_STATE_QUEUED;\n \n+\t\t/* Undo the count, as the atom will get added again later but\n+\t\t * leave the context priority adjusted or boosted, in case if\n+\t\t * this was the first higher priority atom received for this\n+\t\t * context.\n+\t\t * This will prevent the scenario of priority inversion, where\n+\t\t * another context having medium priority atoms keeps getting\n+\t\t * scheduled over this context, which is having both lower and\n+\t\t * higher priority atoms, but higher priority atoms are blocked\n+\t\t * due to dependency on lower priority atoms. With priority\n+\t\t * boost the high priority atom will get to run at earliest.\n+\t\t */\n+\t\tkctx->atoms_count[atom->sched_priority]--;\n+\n \t\tspin_unlock_irqrestore(&kbdev->hwaccess_lock, flags);\n \t\tmutex_unlock(&js_devdata->runpool_mutex);\n \n@@ -1134,7 +1201,8 @@ bool kbasep_js_add_job(struct kbase_context *kctx,\n \t}\n \t/* If this context is active and the atom is the first on its slot,\n \t * kick the job manager to attempt to fast-start the atom */\n-\tif (enqueue_required && kctx == kbdev->hwaccess.active_kctx)\n+\tif (enqueue_required && kctx ==\n+\t\t\tkbdev->hwaccess.active_kctx[atom->slot_nr])\n \t\tkbase_jm_try_kick(kbdev, 1 << atom->slot_nr);\n \n \tspin_unlock_irqrestore(&kbdev->hwaccess_lock, flags);\n@@ -1146,9 +1214,8 @@ bool kbasep_js_add_job(struct kbase_context *kctx,\n \tif (!kbase_ctx_flag(kctx, KCTX_SCHEDULED)) {\n \t\tif (kbase_ctx_flag(kctx, KCTX_DYING)) {\n \t\t\t/* A job got added while/after kbase_job_zap_context()\n-\t\t\t * was called on a non-scheduled context (e.g. KDS\n-\t\t\t * dependency resolved). Kill that job by killing the\n-\t\t\t * context. */\n+\t\t\t * was called on a non-scheduled context. Kill that job\n+\t\t\t * by killing the context. */\n \t\t\tkbasep_js_runpool_requeue_or_kill_ctx(kbdev, kctx,\n \t\t\t\t\tfalse);\n \t\t} else if (js_kctx_info->ctx.nr_jobs == 1) {\n@@ -1174,13 +1241,12 @@ void kbasep_js_remove_job(struct kbase_device *kbdev,\n \t\tstruct kbase_context *kctx, struct kbase_jd_atom *atom)\n {\n \tstruct kbasep_js_kctx_info *js_kctx_info;\n-\tstruct kbasep_js_device_data *js_devdata;\n+\tunsigned long flags;\n \n \tKBASE_DEBUG_ASSERT(kbdev != NULL);\n \tKBASE_DEBUG_ASSERT(kctx != NULL);\n \tKBASE_DEBUG_ASSERT(atom != NULL);\n \n-\tjs_devdata = &kbdev->js_data;\n \tjs_kctx_info = &kctx->jctx.sched_info;\n \n \tKBASE_TRACE_ADD_REFCOUNT(kbdev, JS_REMOVE_JOB, kctx, atom, atom->jc,\n@@ -1189,6 +1255,11 @@ void kbasep_js_remove_job(struct kbase_device *kbdev,\n \t/* De-refcount ctx.nr_jobs */\n \tKBASE_DEBUG_ASSERT(js_kctx_info->ctx.nr_jobs > 0);\n \t--(js_kctx_info->ctx.nr_jobs);\n+\n+\tspin_lock_irqsave(&kbdev->hwaccess_lock, flags);\n+\tif (--kctx->atoms_count[atom->sched_priority] == 0)\n+\t\tkbase_js_update_ctx_priority(kctx);\n+\tspin_unlock_irqrestore(&kbdev->hwaccess_lock, flags);\n }\n \n bool kbasep_js_remove_cancelled_job(struct kbase_device *kbdev,\n@@ -1196,15 +1267,12 @@ bool kbasep_js_remove_cancelled_job(struct kbase_device *kbdev,\n {\n \tunsigned long flags;\n \tstruct kbasep_js_atom_retained_state katom_retained_state;\n-\tstruct kbasep_js_device_data *js_devdata;\n \tbool attr_state_changed;\n \n \tKBASE_DEBUG_ASSERT(kbdev != NULL);\n \tKBASE_DEBUG_ASSERT(kctx != NULL);\n \tKBASE_DEBUG_ASSERT(katom != NULL);\n \n-\tjs_devdata = &kbdev->js_data;\n-\n \tkbasep_js_atom_retained_state_copy(&katom_retained_state, katom);\n \tkbasep_js_remove_job(kbdev, kctx, katom);\n \n@@ -1227,11 +1295,9 @@ bool kbasep_js_runpool_retain_ctx(struct kbase_device *kbdev,\n \t\tstruct kbase_context *kctx)\n {\n \tunsigned long flags;\n-\tstruct kbasep_js_device_data *js_devdata;\n \tbool result;\n \n \tKBASE_DEBUG_ASSERT(kbdev != NULL);\n-\tjs_devdata = &kbdev->js_data;\n \n \tmutex_lock(&kbdev->mmu_hw_mutex);\n \tspin_lock_irqsave(&kbdev->hwaccess_lock, flags);\n@@ -1264,9 +1330,8 @@ struct kbase_context *kbasep_js_runpool_lookup_ctx(struct kbase_device *kbdev,\n }\n \n /**\n- * kbasep_js_release_result - Try running more jobs after releasing a context\n- *                            and/or atom\n- *\n+ * kbasep_js_run_jobs_after_ctx_and_atom_release - Try running more jobs after\n+ *                           releasing a context and/or atom\n  * @kbdev:                   The kbase_device to operate on\n  * @kctx:                    The kbase_context to operate on\n  * @katom_retained_state:    Retained state from the atom\n@@ -1301,32 +1366,26 @@ static kbasep_js_release_result kbasep_js_run_jobs_after_ctx_and_atom_release(\n \tlockdep_assert_held(&js_devdata->runpool_mutex);\n \tlockdep_assert_held(&kbdev->hwaccess_lock);\n \n-\tif (js_devdata->nr_user_contexts_running != 0) {\n-\t\tbool retry_submit = false;\n-\t\tint retry_jobslot = 0;\n+\tif (js_devdata->nr_user_contexts_running != 0 && runpool_ctx_attr_change) {\n+\t\t/* A change in runpool ctx attributes might mean we can\n+\t\t * run more jobs than before  */\n+\t\tresult = KBASEP_JS_RELEASE_RESULT_SCHED_ALL;\n \n-\t\tif (katom_retained_state)\n-\t\t\tretry_submit = kbasep_js_get_atom_retry_submit_slot(\n-\t\t\t\t\tkatom_retained_state, &retry_jobslot);\n-\n-\t\tif (runpool_ctx_attr_change || retry_submit) {\n-\t\t\t/* A change in runpool ctx attributes might mean we can\n-\t\t\t * run more jobs than before  */\n-\t\t\tresult = KBASEP_JS_RELEASE_RESULT_SCHED_ALL;\n-\n-\t\t\tKBASE_TRACE_ADD_SLOT(kbdev, JD_DONE_TRY_RUN_NEXT_JOB,\n-\t\t\t\t\t\tkctx, NULL, 0u, retry_jobslot);\n-\t\t}\n+\t\tKBASE_TRACE_ADD_SLOT(kbdev, JD_DONE_TRY_RUN_NEXT_JOB,\n+\t\t\t\t\tkctx, NULL, 0u, 0);\n \t}\n \treturn result;\n }\n \n-/*\n- * Internal function to release the reference on a ctx and an atom's \"retained\n- * state\", only taking the runpool and as transaction mutexes\n+/**\n+ * kbasep_js_runpool_release_ctx_internal - Internal function to release the reference\n+ *                                          on a ctx and an atom's \"retained state\", only\n+ *                                          taking the runpool and as transaction mutexes\n+ * @kbdev:                   The kbase_device to operate on\n+ * @kctx:                    The kbase_context to operate on\n+ * @katom_retained_state:    Retained state from the atom\n  *\n- * This also starts more jobs running in the case of an ctx-attribute state\n- * change\n+ * This also starts more jobs running in the case of an ctx-attribute state change\n  *\n  * This does none of the followup actions for scheduling:\n  * - It does not schedule in a new context\n@@ -1334,11 +1393,15 @@ static kbasep_js_release_result kbasep_js_run_jobs_after_ctx_and_atom_release(\n  *\n  * For those tasks, just call kbasep_js_runpool_release_ctx() instead\n  *\n- * Requires:\n+ * Has following requirements\n  * - Context is scheduled in, and kctx->as_nr matches kctx_as_nr\n  * - Context has a non-zero refcount\n  * - Caller holds js_kctx_info->ctx.jsctx_mutex\n  * - Caller holds js_devdata->runpool_mutex\n+ *\n+ * Return: A bitpattern, containing KBASEP_JS_RELEASE_RESULT_* flags, indicating\n+ *         the result of releasing a context that whether the caller should try\n+ *         scheduling a new context or should try scheduling all contexts.\n  */\n static kbasep_js_release_result kbasep_js_runpool_release_ctx_internal(\n \t\tstruct kbase_device *kbdev,\n@@ -1424,8 +1487,10 @@ static kbasep_js_release_result kbasep_js_runpool_release_ctx_internal(\n \n \t\tkbase_backend_release_ctx_irq(kbdev, kctx);\n \n-\t\tif (kbdev->hwaccess.active_kctx == kctx)\n-\t\t\tkbdev->hwaccess.active_kctx = NULL;\n+\t\tfor (slot = 0; slot < num_slots; slot++) {\n+\t\t\tif (kbdev->hwaccess.active_kctx[slot] == kctx)\n+\t\t\t\tkbdev->hwaccess.active_kctx[slot] = NULL;\n+\t\t}\n \n \t\t/* Ctx Attribute handling\n \t\t *\n@@ -1617,7 +1682,8 @@ void kbase_js_set_timeouts(struct kbase_device *kbdev)\n }\n \n static bool kbasep_js_schedule_ctx(struct kbase_device *kbdev,\n-\t\t\t\t\tstruct kbase_context *kctx)\n+\t\t\t\t\tstruct kbase_context *kctx,\n+\t\t\t\t\tint js)\n {\n \tstruct kbasep_js_device_data *js_devdata;\n \tstruct kbasep_js_kctx_info *js_kctx_info;\n@@ -1693,7 +1759,7 @@ static bool kbasep_js_schedule_ctx(struct kbase_device *kbdev,\n \t\treturn false;\n \t}\n \n-\tkbdev->hwaccess.active_kctx = kctx;\n+\tkbdev->hwaccess.active_kctx[js] = kctx;\n \n #if defined(CONFIG_MALI_BIFROST_GATOR_SUPPORT)\n \tkbase_trace_mali_mmu_as_in_use(kctx->as_nr);\n@@ -1726,6 +1792,8 @@ static bool kbasep_js_schedule_ctx(struct kbase_device *kbdev,\n \t\tkctx_suspended = true;\n \t}\n \n+\tkbase_ctx_flag_clear(kctx, KCTX_PULLED_SINCE_ACTIVE_JS0 << js);\n+\n \t/* Transaction complete */\n \tspin_unlock_irqrestore(&kbdev->hwaccess_lock, flags);\n \tmutex_unlock(&kbdev->mmu_hw_mutex);\n@@ -1750,23 +1818,27 @@ static bool kbasep_js_schedule_ctx(struct kbase_device *kbdev,\n }\n \n static bool kbase_js_use_ctx(struct kbase_device *kbdev,\n-\t\t\t\tstruct kbase_context *kctx)\n+\t\t\t\tstruct kbase_context *kctx,\n+\t\t\t\tint js)\n {\n \tunsigned long flags;\n \n \tspin_lock_irqsave(&kbdev->hwaccess_lock, flags);\n \n \tif (kbase_ctx_flag(kctx, KCTX_SCHEDULED) &&\n-\t\t\tkbase_backend_use_ctx_sched(kbdev, kctx)) {\n+\t\t\tkbase_backend_use_ctx_sched(kbdev, kctx, js)) {\n \t\t/* Context already has ASID - mark as active */\n-\t\tkbdev->hwaccess.active_kctx = kctx;\n+\t\tif (kbdev->hwaccess.active_kctx[js] != kctx) {\n+\t\t\tkbdev->hwaccess.active_kctx[js] = kctx;\n+\t\t\tkbase_ctx_flag_clear(kctx,\n+\t\t\t\t\tKCTX_PULLED_SINCE_ACTIVE_JS0 << js);\n+\t\t}\n \t\tspin_unlock_irqrestore(&kbdev->hwaccess_lock, flags);\n \t\treturn true; /* Context already scheduled */\n \t}\n \n \tspin_unlock_irqrestore(&kbdev->hwaccess_lock, flags);\n-\n-\treturn kbasep_js_schedule_ctx(kbdev, kctx);\n+\treturn kbasep_js_schedule_ctx(kbdev, kctx, js);\n }\n \n void kbasep_js_schedule_privileged_ctx(struct kbase_device *kbdev,\n@@ -1897,7 +1969,7 @@ void kbasep_js_suspend(struct kbase_device *kbdev)\n void kbasep_js_resume(struct kbase_device *kbdev)\n {\n \tstruct kbasep_js_device_data *js_devdata;\n-\tint js;\n+\tint js, prio;\n \n \tKBASE_DEBUG_ASSERT(kbdev);\n \tjs_devdata = &kbdev->js_data;\n@@ -1905,31 +1977,33 @@ void kbasep_js_resume(struct kbase_device *kbdev)\n \n \tmutex_lock(&js_devdata->queue_mutex);\n \tfor (js = 0; js < kbdev->gpu_props.num_job_slots; js++) {\n-\t\tstruct kbase_context *kctx, *n;\n+\t\tfor (prio = 0; prio < KBASE_JS_ATOM_SCHED_PRIO_COUNT; prio++) {\n+\t\t\tstruct kbase_context *kctx, *n;\n \n-\t\tlist_for_each_entry_safe(kctx, n,\n-\t\t\t\t&kbdev->js_data.ctx_list_unpullable[js],\n-\t\t\t\tjctx.sched_info.ctx.ctx_list_entry[js]) {\n-\t\t\tstruct kbasep_js_kctx_info *js_kctx_info;\n-\t\t\tunsigned long flags;\n-\t\t\tbool timer_sync = false;\n+\t\t\tlist_for_each_entry_safe(kctx, n,\n+\t\t\t\t &kbdev->js_data.ctx_list_unpullable[js][prio],\n+\t\t\t\t jctx.sched_info.ctx.ctx_list_entry[js]) {\n+\t\t\t\tstruct kbasep_js_kctx_info *js_kctx_info;\n+\t\t\t\tunsigned long flags;\n+\t\t\t\tbool timer_sync = false;\n \n-\t\t\tjs_kctx_info = &kctx->jctx.sched_info;\n+\t\t\t\tjs_kctx_info = &kctx->jctx.sched_info;\n \n-\t\t\tmutex_lock(&js_kctx_info->ctx.jsctx_mutex);\n-\t\t\tmutex_lock(&js_devdata->runpool_mutex);\n-\t\t\tspin_lock_irqsave(&kbdev->hwaccess_lock, flags);\n+\t\t\t\tmutex_lock(&js_kctx_info->ctx.jsctx_mutex);\n+\t\t\t\tmutex_lock(&js_devdata->runpool_mutex);\n+\t\t\t\tspin_lock_irqsave(&kbdev->hwaccess_lock, flags);\n \n-\t\t\tif (!kbase_ctx_flag(kctx, KCTX_SCHEDULED) &&\n-\t\t\t\tkbase_js_ctx_pullable(kctx, js, false))\n-\t\t\t\ttimer_sync =\n-\t\t\t\t\tkbase_js_ctx_list_add_pullable_nolock(\n-\t\t\t\t\t\t\tkbdev, kctx, js);\n-\t\t\tspin_unlock_irqrestore(&kbdev->hwaccess_lock, flags);\n-\t\t\tif (timer_sync)\n-\t\t\t\tkbase_backend_ctx_count_changed(kbdev);\n-\t\t\tmutex_unlock(&js_devdata->runpool_mutex);\n-\t\t\tmutex_unlock(&js_kctx_info->ctx.jsctx_mutex);\n+\t\t\t\tif (!kbase_ctx_flag(kctx, KCTX_SCHEDULED) &&\n+\t\t\t\t\tkbase_js_ctx_pullable(kctx, js, false))\n+\t\t\t\t\ttimer_sync =\n+\t\t\t\t\t\tkbase_js_ctx_list_add_pullable_nolock(\n+\t\t\t\t\t\t\t\tkbdev, kctx, js);\n+\t\t\t\tspin_unlock_irqrestore(&kbdev->hwaccess_lock, flags);\n+\t\t\t\tif (timer_sync)\n+\t\t\t\t\tkbase_backend_ctx_count_changed(kbdev);\n+\t\t\t\tmutex_unlock(&js_devdata->runpool_mutex);\n+\t\t\t\tmutex_unlock(&js_kctx_info->ctx.jsctx_mutex);\n+\t\t\t}\n \t\t}\n \t}\n \tmutex_unlock(&js_devdata->queue_mutex);\n@@ -2136,6 +2210,7 @@ struct kbase_jd_atom *kbase_js_pull(struct kbase_context *kctx, int js)\n \t}\n \n \tkbase_ctx_flag_set(kctx, KCTX_PULLED);\n+\tkbase_ctx_flag_set(kctx, (KCTX_PULLED_SINCE_ACTIVE_JS0 << js));\n \n \tpulled = atomic_inc_return(&kctx->atoms_pulled);\n \tif (pulled == 1 && !kctx->slots_pullable) {\n@@ -2280,7 +2355,6 @@ void kbase_js_unpull(struct kbase_context *kctx, struct kbase_jd_atom *katom)\n \n \tkbase_job_check_leave_disjoint(kctx->kbdev, katom);\n \n-\tKBASE_DEBUG_ASSERT(0 == object_is_on_stack(&katom->work));\n \tINIT_WORK(&katom->work, js_return_worker);\n \tqueue_work(kctx->jctx.job_done_wq, &katom->work);\n }\n@@ -2438,20 +2512,22 @@ struct kbase_jd_atom *kbase_js_complete_atom(struct kbase_jd_atom *katom,\n void kbase_js_sched(struct kbase_device *kbdev, int js_mask)\n {\n \tstruct kbasep_js_device_data *js_devdata;\n-\tstruct kbase_context *last_active;\n+\tstruct kbase_context *last_active[BASE_JM_MAX_NR_SLOTS];\n \tbool timer_sync = false;\n-\tbool ctx_waiting = false;\n+\tbool ctx_waiting[BASE_JM_MAX_NR_SLOTS];\n+\tint js;\n \n \tjs_devdata = &kbdev->js_data;\n \n \tdown(&js_devdata->schedule_sem);\n \tmutex_lock(&js_devdata->queue_mutex);\n \n-\tlast_active = kbdev->hwaccess.active_kctx;\n+\tfor (js = 0; js < BASE_JM_MAX_NR_SLOTS; js++) {\n+\t\tlast_active[js] = kbdev->hwaccess.active_kctx[js];\n+\t\tctx_waiting[js] = false;\n+\t}\n \n \twhile (js_mask) {\n-\t\tint js;\n-\n \t\tjs = ffs(js_mask) - 1;\n \n \t\twhile (1) {\n@@ -2488,7 +2564,7 @@ void kbase_js_sched(struct kbase_device *kbdev, int js_mask)\n \t\t\t\tkbase_ctx_flag_set(kctx, KCTX_ACTIVE);\n \t\t\t}\n \n-\t\t\tif (!kbase_js_use_ctx(kbdev, kctx)) {\n+\t\t\tif (!kbase_js_use_ctx(kbdev, kctx, js)) {\n \t\t\t\tmutex_lock(\n \t\t\t\t\t&kctx->jctx.sched_info.ctx.jsctx_mutex);\n \t\t\t\t/* Context can not be used at this time */\n@@ -2533,7 +2609,10 @@ void kbase_js_sched(struct kbase_device *kbdev, int js_mask)\n \t\t\t\t * Unless this context is already 'active', in\n \t\t\t\t * which case it's effectively already scheduled\n \t\t\t\t * so push it to the back of the list. */\n-\t\t\t\tif (pullable && kctx == last_active)\n+\t\t\t\tif (pullable && kctx == last_active[js] &&\n+\t\t\t\t\t\tkbase_ctx_flag(kctx,\n+\t\t\t\t\t\t(KCTX_PULLED_SINCE_ACTIVE_JS0 <<\n+\t\t\t\t\t\tjs)))\n \t\t\t\t\ttimer_sync |=\n \t\t\t\t\tkbase_js_ctx_list_add_pullable_nolock(\n \t\t\t\t\t\t\tkctx->kbdev,\n@@ -2555,10 +2634,10 @@ void kbase_js_sched(struct kbase_device *kbdev, int js_mask)\n \t\t\t\t * marker to prevent it from submitting atoms in\n \t\t\t\t * the IRQ handler, which would prevent this\n \t\t\t\t * context from making progress. */\n-\t\t\t\tif (last_active && kctx != last_active &&\n-\t\t\t\t\t\tkbase_js_ctx_pullable(\n-\t\t\t\t\t\tlast_active, js, true))\n-\t\t\t\t\tctx_waiting = true;\n+\t\t\t\tif (last_active[js] && kctx != last_active[js]\n+\t\t\t\t\t\t&& kbase_js_ctx_pullable(\n+\t\t\t\t\t\tlast_active[js], js, true))\n+\t\t\t\t\tctx_waiting[js] = true;\n \n \t\t\t\tif (context_idle) {\n \t\t\t\t\tkbase_jm_idle_ctx(kbdev, kctx);\n@@ -2598,8 +2677,11 @@ void kbase_js_sched(struct kbase_device *kbdev, int js_mask)\n \tif (timer_sync)\n \t\tkbase_js_sync_timers(kbdev);\n \n-\tif (kbdev->hwaccess.active_kctx == last_active && ctx_waiting)\n-\t\tkbdev->hwaccess.active_kctx = NULL;\n+\tfor (js = 0; js < BASE_JM_MAX_NR_SLOTS; js++) {\n+\t\tif (kbdev->hwaccess.active_kctx[js] == last_active[js] &&\n+\t\t\t\tctx_waiting[js])\n+\t\t\tkbdev->hwaccess.active_kctx[js] = NULL;\n+\t}\n \n \tmutex_unlock(&js_devdata->queue_mutex);\n \tup(&js_devdata->schedule_sem);\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js.h\nindex ddada8e468a19b..963cef903209f7 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_js.h\n  * Job Scheduler APIs.\n@@ -591,6 +596,27 @@ bool kbase_js_is_atom_valid(struct kbase_device *kbdev,\n  */\n void kbase_js_set_timeouts(struct kbase_device *kbdev);\n \n+/**\n+ * kbase_js_set_ctx_priority - set the context priority\n+ * @kctx: Context pointer\n+ * @new_priority: New priority value for the Context\n+ *\n+ * The context priority is set to a new value and it is moved to the\n+ * pullable/unpullable list as per the new priority.\n+ */\n+void kbase_js_set_ctx_priority(struct kbase_context *kctx, int new_priority);\n+\n+\n+/**\n+ * kbase_js_update_ctx_priority - update the context priority\n+ * @kctx: Context pointer\n+ *\n+ * The context priority gets updated as per the priority of atoms currently in\n+ * use for that context, but only if system priority mode for context scheduling\n+ * is being used.\n+ */\n+void kbase_js_update_ctx_priority(struct kbase_context *kctx);\n+\n /*\n  * Helpers follow\n  */\n@@ -666,37 +692,6 @@ static inline void kbasep_js_clear_submit_allowed(struct kbasep_js_device_data *\n \tjs_devdata->runpool_irq.submit_allowed &= clear_mask;\n }\n \n-/**\n- * @brief Manage the 'retry_submit_on_slot' part of a kbase_jd_atom\n- */\n-static inline void kbasep_js_clear_job_retry_submit(struct kbase_jd_atom *atom)\n-{\n-\tatom->retry_submit_on_slot = KBASEP_JS_RETRY_SUBMIT_SLOT_INVALID;\n-}\n-\n-/**\n- * Mark a slot as requiring resubmission by carrying that information on a\n- * completing atom.\n- *\n- * @note This can ASSERT in debug builds if the submit slot has been set to\n- * something other than the current value for @a js. This is because you might\n- * be unintentionally stopping more jobs being submitted on the old submit\n- * slot, and that might cause a scheduling-hang.\n- *\n- * @note If you can guarantee that the atoms for the original slot will be\n- * submitted on some other slot, then call kbasep_js_clear_job_retry_submit()\n- * first to silence the ASSERT.\n- */\n-static inline void kbasep_js_set_job_retry_submit_slot(struct kbase_jd_atom *atom, int js)\n-{\n-\tKBASE_DEBUG_ASSERT(0 <= js && js <= BASE_JM_MAX_NR_SLOTS);\n-\tKBASE_DEBUG_ASSERT((atom->retry_submit_on_slot ==\n-\t\t\t\t\tKBASEP_JS_RETRY_SUBMIT_SLOT_INVALID)\n-\t\t\t\t|| (atom->retry_submit_on_slot == js));\n-\n-\tatom->retry_submit_on_slot = js;\n-}\n-\n /**\n  * Create an initial 'invalid' atom retained state, that requires no\n  * atom-related work to be done on releasing with\n@@ -706,7 +701,6 @@ static inline void kbasep_js_atom_retained_state_init_invalid(struct kbasep_js_a\n {\n \tretained_state->event_code = BASE_JD_EVENT_NOT_STARTED;\n \tretained_state->core_req = KBASEP_JS_ATOM_RETAINED_STATE_CORE_REQ_INVALID;\n-\tretained_state->retry_submit_on_slot = KBASEP_JS_RETRY_SUBMIT_SLOT_INVALID;\n }\n \n /**\n@@ -717,7 +711,6 @@ static inline void kbasep_js_atom_retained_state_copy(struct kbasep_js_atom_reta\n {\n \tretained_state->event_code = katom->event_code;\n \tretained_state->core_req = katom->core_req;\n-\tretained_state->retry_submit_on_slot = katom->retry_submit_on_slot;\n \tretained_state->sched_priority = katom->sched_priority;\n \tretained_state->device_nr = katom->device_nr;\n }\n@@ -753,14 +746,6 @@ static inline bool kbasep_js_atom_retained_state_is_valid(const struct kbasep_js\n \treturn (bool) (katom_retained_state->core_req != KBASEP_JS_ATOM_RETAINED_STATE_CORE_REQ_INVALID);\n }\n \n-static inline bool kbasep_js_get_atom_retry_submit_slot(const struct kbasep_js_atom_retained_state *katom_retained_state, int *res)\n-{\n-\tint js = katom_retained_state->retry_submit_on_slot;\n-\n-\t*res = js;\n-\treturn (bool) (js >= 0);\n-}\n-\n /**\n  * @brief Variant of kbasep_js_runpool_lookup_ctx() that can be used when the\n  * context is guaranteed to be already previously retained.\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js_ctx_attr.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js_ctx_attr.c\nindex 321506ada83597..6fd908aceb6653 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js_ctx_attr.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js_ctx_attr.c\n@@ -7,15 +7,20 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n #include <mali_kbase.h>\n #include <mali_kbase_config.h>\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js_ctx_attr.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js_ctx_attr.h\nindex ce9183326a576f..be781e60c822a9 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js_ctx_attr.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js_ctx_attr.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_js_ctx_attr.h\n  * Job Scheduler Context Attribute APIs\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js_defs.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js_defs.h\nindex 0b4890d6b50e68..b53f4adf00d3f4 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js_defs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_js_defs.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_js.h\n  * Job Scheduler Type Definitions\n@@ -141,6 +146,48 @@ enum {\n /** Combination of KBASE_JS_ATOM_DONE_<...> bits */\n typedef u32 kbasep_js_atom_done_code;\n \n+/*\n+ * Context scheduling mode defines for kbase_device::js_ctx_scheduling_mode\n+ */\n+enum {\n+\t/*\n+\t * In this mode, the context containing higher priority atoms will be\n+\t * scheduled first and also the new runnable higher priority atoms can\n+\t * preempt lower priority atoms currently running on the GPU, even if\n+\t * they belong to a different context.\n+\t */\n+\tKBASE_JS_SYSTEM_PRIORITY_MODE = 0,\n+\n+\t/*\n+\t * In this mode, the contexts are scheduled in round-robin fashion and\n+\t * the new runnable higher priority atoms can preempt the lower priority\n+\t * atoms currently running on the GPU, only if they belong to the same\n+\t * context.\n+\t */\n+\tKBASE_JS_PROCESS_LOCAL_PRIORITY_MODE,\n+\n+\t/* Must be the last in the enum */\n+\tKBASE_JS_PRIORITY_MODE_COUNT,\n+};\n+\n+/*\n+ * Internal atom priority defines for kbase_jd_atom::sched_prio\n+ */\n+enum {\n+\tKBASE_JS_ATOM_SCHED_PRIO_HIGH = 0,\n+\tKBASE_JS_ATOM_SCHED_PRIO_MED,\n+\tKBASE_JS_ATOM_SCHED_PRIO_LOW,\n+\tKBASE_JS_ATOM_SCHED_PRIO_COUNT,\n+};\n+\n+/* Invalid priority for kbase_jd_atom::sched_prio */\n+#define KBASE_JS_ATOM_SCHED_PRIO_INVALID -1\n+\n+/* Default priority in the case of contexts with no atoms, or being lenient\n+ * about invalid priorities from userspace.\n+ */\n+#define KBASE_JS_ATOM_SCHED_PRIO_DEFAULT KBASE_JS_ATOM_SCHED_PRIO_MED\n+\n /**\n  * @brief KBase Device Data Job Scheduler sub-structure\n  *\n@@ -224,12 +271,12 @@ struct kbasep_js_device_data {\n \t/**\n \t * List of contexts that can currently be pulled from\n \t */\n-\tstruct list_head ctx_list_pullable[BASE_JM_MAX_NR_SLOTS];\n+\tstruct list_head ctx_list_pullable[BASE_JM_MAX_NR_SLOTS][KBASE_JS_ATOM_SCHED_PRIO_COUNT];\n \t/**\n \t * List of contexts that can not currently be pulled from, but have\n \t * jobs currently running.\n \t */\n-\tstruct list_head ctx_list_unpullable[BASE_JM_MAX_NR_SLOTS];\n+\tstruct list_head ctx_list_unpullable[BASE_JM_MAX_NR_SLOTS][KBASE_JS_ATOM_SCHED_PRIO_COUNT];\n \n \t/** Number of currently scheduled user contexts (excluding ones that are not submitting jobs) */\n \ts8 nr_user_contexts_running;\n@@ -334,8 +381,6 @@ struct kbasep_js_atom_retained_state {\n \tbase_jd_core_req core_req;\n \t/* priority */\n \tint sched_priority;\n-\t/** Job Slot to retry submitting to if submission from IRQ handler failed */\n-\tint retry_submit_on_slot;\n \t/* Core group atom was executed on */\n \tu32 device_nr;\n \n@@ -362,22 +407,6 @@ struct kbasep_js_atom_retained_state {\n  */\n #define KBASEP_JS_TICK_RESOLUTION_US 1\n \n-/*\n- * Internal atom priority defines for kbase_jd_atom::sched_prio\n- */\n-enum {\n-\tKBASE_JS_ATOM_SCHED_PRIO_HIGH = 0,\n-\tKBASE_JS_ATOM_SCHED_PRIO_MED,\n-\tKBASE_JS_ATOM_SCHED_PRIO_LOW,\n-\tKBASE_JS_ATOM_SCHED_PRIO_COUNT,\n-};\n-\n-/* Invalid priority for kbase_jd_atom::sched_prio */\n-#define KBASE_JS_ATOM_SCHED_PRIO_INVALID -1\n-\n-/* Default priority in the case of contexts with no atoms, or being lenient\n- * about invalid priorities from userspace */\n-#define KBASE_JS_ATOM_SCHED_PRIO_DEFAULT KBASE_JS_ATOM_SCHED_PRIO_MED\n \n \t  /** @} *//* end group kbase_js */\n \t  /** @} *//* end group base_kbase_api */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_linux.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_linux.h\nindex 6d1e61fd41e038..003ac9e68a76c0 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_linux.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_linux.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_linux.h\n  * Base kernel APIs, Linux implementation.\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem.c\nindex fffe1fc43bffb6..bec4439fc06638 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem.c\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_mem.c\n  * Base kernel memory APIs\n@@ -24,13 +29,11 @@\n #ifdef CONFIG_DMA_SHARED_BUFFER\n #include <linux/dma-buf.h>\n #endif\t\t\t\t/* CONFIG_DMA_SHARED_BUFFER */\n-#ifdef CONFIG_UMP\n-#include <linux/ump.h>\n-#endif\t\t\t\t/* CONFIG_UMP */\n #include <linux/kernel.h>\n #include <linux/bug.h>\n #include <linux/compat.h>\n #include <linux/version.h>\n+#include <linux/log2.h>\n \n #include <mali_kbase_config.h>\n #include <mali_kbase.h>\n@@ -231,7 +234,10 @@ struct kbase_va_region *kbase_region_tracker_find_region_base_address(struct kba\n KBASE_EXPORT_TEST_API(kbase_region_tracker_find_region_base_address);\n \n /* Find region meeting given requirements */\n-static struct kbase_va_region *kbase_region_tracker_find_region_meeting_reqs(struct kbase_context *kctx, struct kbase_va_region *reg_reqs, size_t nr_pages, size_t align)\n+static struct kbase_va_region *kbase_region_tracker_find_region_meeting_reqs(\n+\t\tstruct kbase_context *kctx, struct kbase_va_region *reg_reqs,\n+\t\tsize_t nr_pages, size_t align_offset, size_t align_mask,\n+\t\tu64 *out_start_pfn)\n {\n \tstruct rb_node *rbnode = NULL;\n \tstruct kbase_va_region *reg = NULL;\n@@ -239,7 +245,6 @@ static struct kbase_va_region *kbase_region_tracker_find_region_meeting_reqs(str\n \n \t/* Note that this search is a linear search, as we do not have a target\n \t   address in mind, so does not benefit from the rbtree search */\n-\n \trbtree = kbase_reg_flags_to_rbtree(kctx, reg_reqs);\n \n \trbnode = rb_first(rbtree);\n@@ -249,12 +254,23 @@ static struct kbase_va_region *kbase_region_tracker_find_region_meeting_reqs(str\n \t\tif ((reg->nr_pages >= nr_pages) &&\n \t\t\t\t(reg->flags & KBASE_REG_FREE)) {\n \t\t\t/* Check alignment */\n-\t\t\tu64 start_pfn = (reg->start_pfn + align - 1) & ~(align - 1);\n+\t\t\tu64 start_pfn = reg->start_pfn;\n+\n+\t\t\t/* When align_offset == align, this sequence is\n+\t\t\t * equivalent to:\n+\t\t\t *   (start_pfn + align_mask) & ~(align_mask)\n+\t\t\t *\n+\t\t\t * Otherwise, it aligns to n*align + offset, for the\n+\t\t\t * lowest value n that makes this still >start_pfn */\n+\t\t\tstart_pfn += align_mask;\n+\t\t\tstart_pfn -= (start_pfn - align_offset) & (align_mask);\n \n \t\t\tif ((start_pfn >= reg->start_pfn) &&\n \t\t\t\t\t(start_pfn <= (reg->start_pfn + reg->nr_pages - 1)) &&\n-\t\t\t\t\t((start_pfn + nr_pages - 1) <= (reg->start_pfn + reg->nr_pages - 1)))\n+\t\t\t\t\t((start_pfn + nr_pages - 1) <= (reg->start_pfn + reg->nr_pages - 1))) {\n+\t\t\t\t*out_start_pfn = start_pfn;\n \t\t\t\treturn reg;\n+\t\t\t}\n \t\t}\n \t\trbnode = rb_next(rbnode);\n \t}\n@@ -425,7 +441,7 @@ int kbase_add_va_region(struct kbase_context *kctx,\n \t\talign = 1;\n \n \t/* must be a power of 2 */\n-\tKBASE_DEBUG_ASSERT((align & (align - 1)) == 0);\n+\tKBASE_DEBUG_ASSERT(is_power_of_2(align));\n \tKBASE_DEBUG_ASSERT(nr_pages > 0);\n \n \t/* Path 1: Map a specific address. Find the enclosing region, which *must* be free. */\n@@ -458,38 +474,44 @@ int kbase_add_va_region(struct kbase_context *kctx,\n \t\tgoto exit;\n \t}\n \n-\t/* Path 2: Map any free address which meets the requirements.  */\n-\t{\n+\t/* Path 2: Map any free address which meets the requirements.\n+\t *\n+\t * Depending on the zone the allocation request is for\n+\t * we might need to retry it. */\n+\tdo {\n \t\tu64 start_pfn;\n+\t\tsize_t align_offset = align;\n+\t\tsize_t align_mask = align - 1;\n+\n+\t\tif ((reg->flags & KBASE_REG_TILER_ALIGN_TOP)) {\n+\t\t\tWARN(align > 1,\n+\t\t\t\t\t\"kbase_add_va_region with align %lx might not be honored for KBASE_REG_TILER_ALIGN_TOP memory\",\n+\t\t\t\t\t(unsigned long)align);\n+\t\t\talign_mask  = reg->extent - 1;\n+\t\t\talign_offset = reg->extent - reg->initial_commit;\n+\t\t}\n+\n+\t\ttmp = kbase_region_tracker_find_region_meeting_reqs(kctx, reg,\n+\t\t\t\tnr_pages, align_offset, align_mask,\n+\t\t\t\t&start_pfn);\n+\t\tif (tmp) {\n+\t\t\terr = kbase_insert_va_region_nolock(kctx, reg, tmp,\n+\t\t\t\t\tstart_pfn, nr_pages);\n+\t\t\tbreak;\n+\t\t}\n \n \t\t/*\n-\t\t * Depending on the zone the allocation request is for\n-\t\t * we might need to retry it.\n+\t\t * If the allocation is not from the same zone as JIT\n+\t\t * then don't retry, we're out of VA and there is\n+\t\t * nothing which can be done about it.\n \t\t */\n-\t\tdo {\n-\t\t\ttmp = kbase_region_tracker_find_region_meeting_reqs(\n-\t\t\t\t\tkctx, reg, nr_pages, align);\n-\t\t\tif (tmp) {\n-\t\t\t\tstart_pfn = (tmp->start_pfn + align - 1) &\n-\t\t\t\t\t\t~(align - 1);\n-\t\t\t\terr = kbase_insert_va_region_nolock(kctx, reg,\n-\t\t\t\t\t\ttmp, start_pfn, nr_pages);\n-\t\t\t\tbreak;\n-\t\t\t}\n-\n-\t\t\t/*\n-\t\t\t * If the allocation is not from the same zone as JIT\n-\t\t\t * then don't retry, we're out of VA and there is\n-\t\t\t * nothing which can be done about it.\n-\t\t\t */\n-\t\t\tif ((reg->flags & KBASE_REG_ZONE_MASK) !=\n-\t\t\t\t\tKBASE_REG_ZONE_CUSTOM_VA)\n-\t\t\t\tbreak;\n-\t\t} while (kbase_jit_evict(kctx));\n+\t\tif ((reg->flags & KBASE_REG_ZONE_MASK) !=\n+\t\t\t\tKBASE_REG_ZONE_CUSTOM_VA)\n+\t\t\tbreak;\n+\t} while (kbase_jit_evict(kctx));\n \n-\t\tif (!tmp)\n-\t\t\terr = -ENOMEM;\n-\t}\n+\tif (!tmp)\n+\t\terr = -ENOMEM;\n \n  exit:\n \treturn err;\n@@ -510,7 +532,8 @@ static void kbase_region_tracker_ds_init(struct kbase_context *kctx,\n \n \t/* Although exec and custom_va_reg don't always exist,\n \t * initialize unconditionally because of the mem_view debugfs\n-\t * implementation which relies on these being empty */\n+\t * implementation which relies on these being empty\n+\t */\n \tkctx->reg_rbtree_exec = RB_ROOT;\n \tkctx->reg_rbtree_custom = RB_ROOT;\n \n@@ -542,6 +565,32 @@ void kbase_region_tracker_term(struct kbase_context *kctx)\n \tkbase_region_tracker_erase_rbtree(&kctx->reg_rbtree_custom);\n }\n \n+static size_t kbase_get_same_va_bits(struct kbase_context *kctx)\n+{\n+#if defined(CONFIG_ARM64)\n+\t/* VA_BITS can be as high as 48 bits, but all bits are available for\n+\t * both user and kernel.\n+\t */\n+\tsize_t cpu_va_bits = VA_BITS;\n+#elif defined(CONFIG_X86_64)\n+\t/* x86_64 can access 48 bits of VA, but the 48th is used to denote\n+\t * kernel (1) vs userspace (0), so the max here is 47.\n+\t */\n+\tsize_t cpu_va_bits = 47;\n+#elif defined(CONFIG_ARM) || defined(CONFIG_X86_32)\n+\tsize_t cpu_va_bits = sizeof(void *) * BITS_PER_BYTE;\n+#else\n+#error \"Unknown CPU VA width for this architecture\"\n+#endif\n+\n+#ifdef CONFIG_64BIT\n+\tif (kbase_ctx_flag(kctx, KCTX_COMPAT))\n+\t\tcpu_va_bits = 32;\n+#endif\n+\n+\treturn min(cpu_va_bits, (size_t) kctx->kbdev->gpu_props.mmu.va_bits);\n+}\n+\n /**\n  * Initialize the region tracker data structure.\n  */\n@@ -550,7 +599,7 @@ int kbase_region_tracker_init(struct kbase_context *kctx)\n \tstruct kbase_va_region *same_va_reg;\n \tstruct kbase_va_region *exec_reg = NULL;\n \tstruct kbase_va_region *custom_va_reg = NULL;\n-\tsize_t same_va_bits = sizeof(void *) * BITS_PER_BYTE;\n+\tsize_t same_va_bits = kbase_get_same_va_bits(kctx);\n \tu64 custom_va_size = KBASE_REG_ZONE_CUSTOM_VA_SIZE;\n \tu64 gpu_va_limit = (1ULL << kctx->kbdev->gpu_props.mmu.va_bits) >> PAGE_SHIFT;\n \tu64 same_va_pages;\n@@ -559,26 +608,6 @@ int kbase_region_tracker_init(struct kbase_context *kctx)\n \t/* Take the lock as kbase_free_alloced_region requires it */\n \tkbase_gpu_vm_lock(kctx);\n \n-#if defined(CONFIG_ARM64)\n-\tsame_va_bits = VA_BITS;\n-#elif defined(CONFIG_X86_64)\n-\tsame_va_bits = 47;\n-#elif defined(CONFIG_64BIT)\n-#error Unsupported 64-bit architecture\n-#endif\n-\n-#ifdef CONFIG_64BIT\n-\tif (kbase_ctx_flag(kctx, KCTX_COMPAT))\n-\t\tsame_va_bits = 32;\n-\telse if (kbase_hw_has_feature(kctx->kbdev, BASE_HW_FEATURE_33BIT_VA))\n-\t\tsame_va_bits = 33;\n-#endif\n-\n-\tif (kctx->kbdev->gpu_props.mmu.va_bits < same_va_bits) {\n-\t\terr = -EINVAL;\n-\t\tgoto fail_unlock;\n-\t}\n-\n \tsame_va_pages = (1ULL << (same_va_bits - PAGE_SHIFT)) - 1;\n \t/* all have SAME_VA */\n \tsame_va_reg = kbase_alloc_free_region(kctx, 1,\n@@ -627,7 +656,8 @@ int kbase_region_tracker_init(struct kbase_context *kctx)\n \t}\n #endif\n \n-\tkbase_region_tracker_ds_init(kctx, same_va_reg, exec_reg, custom_va_reg);\n+\tkbase_region_tracker_ds_init(kctx, same_va_reg, exec_reg,\n+\t\t\t\t\tcustom_va_reg);\n \n \tkctx->same_va_end = same_va_pages + 1;\n \n@@ -643,33 +673,16 @@ int kbase_region_tracker_init(struct kbase_context *kctx)\n \treturn err;\n }\n \n-int kbase_region_tracker_init_jit(struct kbase_context *kctx, u64 jit_va_pages)\n-{\n #ifdef CONFIG_64BIT\n+static int kbase_region_tracker_init_jit_64(struct kbase_context *kctx,\n+\t\tu64 jit_va_pages)\n+{\n \tstruct kbase_va_region *same_va;\n \tstruct kbase_va_region *custom_va_reg;\n-\tu64 same_va_bits;\n+\tu64 same_va_bits = kbase_get_same_va_bits(kctx);\n \tu64 total_va_size;\n \tint err;\n \n-\t/*\n-\t * Nothing to do for 32-bit clients, JIT uses the existing\n-\t * custom VA zone.\n-\t */\n-\tif (kbase_ctx_flag(kctx, KCTX_COMPAT))\n-\t\treturn 0;\n-\n-#if defined(CONFIG_ARM64)\n-\tsame_va_bits = VA_BITS;\n-#elif defined(CONFIG_X86_64)\n-\tsame_va_bits = 47;\n-#elif defined(CONFIG_64BIT)\n-#error Unsupported 64-bit architecture\n-#endif\n-\n-\tif (kbase_hw_has_feature(kctx->kbdev, BASE_HW_FEATURE_33BIT_VA))\n-\t\tsame_va_bits = 33;\n-\n \ttotal_va_size = (1ULL << (same_va_bits - PAGE_SHIFT)) - 1;\n \n \tkbase_gpu_vm_lock(kctx);\n@@ -729,9 +742,27 @@ int kbase_region_tracker_init_jit(struct kbase_context *kctx, u64 jit_va_pages)\n fail_unlock:\n \tkbase_gpu_vm_unlock(kctx);\n \treturn err;\n-#else\n-\treturn 0;\n+}\n+#endif\n+\n+int kbase_region_tracker_init_jit(struct kbase_context *kctx, u64 jit_va_pages,\n+\t\tu8 max_allocations, u8 trim_level)\n+{\n+\tif (trim_level > 100)\n+\t\treturn -EINVAL;\n+\n+\tkctx->jit_max_allocations = max_allocations;\n+\tkctx->trim_level = trim_level;\n+\n+#ifdef CONFIG_64BIT\n+\tif (!kbase_ctx_flag(kctx, KCTX_COMPAT))\n+\t\treturn kbase_region_tracker_init_jit_64(kctx, jit_va_pages);\n #endif\n+\t/*\n+\t * Nothing to do for 32-bit clients, JIT uses the existing\n+\t * custom VA zone.\n+\t */\n+\treturn 0;\n }\n \n int kbase_mem_init(struct kbase_device *kbdev)\n@@ -799,7 +830,8 @@ KBASE_EXPORT_TEST_API(kbase_mem_term);\n  * The allocated object is not part of any list yet, and is flagged as\n  * KBASE_REG_FREE. No mapping is allocated yet.\n  *\n- * zone is KBASE_REG_ZONE_CUSTOM_VA, KBASE_REG_ZONE_SAME_VA, or KBASE_REG_ZONE_EXEC\n+ * zone is KBASE_REG_ZONE_CUSTOM_VA, KBASE_REG_ZONE_SAME_VA,\n+ * or KBASE_REG_ZONE_EXEC\n  *\n  */\n struct kbase_va_region *kbase_alloc_free_region(struct kbase_context *kctx, u64 start_pfn, size_t nr_pages, int zone)\n@@ -829,6 +861,8 @@ struct kbase_va_region *kbase_alloc_free_region(struct kbase_context *kctx, u64\n \tnew_reg->start_pfn = start_pfn;\n \tnew_reg->nr_pages = nr_pages;\n \n+\tINIT_LIST_HEAD(&new_reg->jit_node);\n+\n \treturn new_reg;\n }\n \n@@ -847,6 +881,8 @@ KBASE_EXPORT_TEST_API(kbase_alloc_free_region);\n void kbase_free_alloced_region(struct kbase_va_region *reg)\n {\n \tif (!(reg->flags & KBASE_REG_FREE)) {\n+\t\tmutex_lock(&reg->kctx->jit_evict_lock);\n+\n \t\t/*\n \t\t * The physical allocation should have been removed from the\n \t\t * eviction list before this function is called. However, in the\n@@ -855,6 +891,8 @@ void kbase_free_alloced_region(struct kbase_va_region *reg)\n \t\t * on the list at termination time of the region tracker.\n \t\t */\n \t\tif (!list_empty(&reg->gpu_alloc->evict_node)) {\n+\t\t\tmutex_unlock(&reg->kctx->jit_evict_lock);\n+\n \t\t\t/*\n \t\t\t * Unlink the physical allocation before unmaking it\n \t\t\t * evictable so that the allocation isn't grown back to\n@@ -877,6 +915,8 @@ void kbase_free_alloced_region(struct kbase_va_region *reg)\n \t\t\t\t\t\t   KBASE_MEM_TYPE_NATIVE);\n \t\t\t\tkbase_mem_evictable_unmake(reg->gpu_alloc);\n \t\t\t}\n+\t\t} else {\n+\t\t\tmutex_unlock(&reg->kctx->jit_evict_lock);\n \t\t}\n \n \t\t/*\n@@ -902,6 +942,12 @@ int kbase_gpu_mmap(struct kbase_context *kctx, struct kbase_va_region *reg, u64\n \tsize_t i = 0;\n \tunsigned long attr;\n \tunsigned long mask = ~KBASE_REG_MEMATTR_MASK;\n+\tunsigned long gwt_mask = ~0;\n+\n+#ifdef CONFIG_MALI_JOB_DUMP\n+\tif (kctx->gwt_enabled)\n+\t\tgwt_mask = ~KBASE_REG_GPU_WR;\n+#endif\n \n \tif ((kctx->kbdev->system_coherency == COHERENCY_ACE) &&\n \t\t(reg->flags & KBASE_REG_SHARE_BOTH))\n@@ -929,7 +975,7 @@ int kbase_gpu_mmap(struct kbase_context *kctx, struct kbase_va_region *reg, u64\n \t\t\t\t\t\treg->start_pfn + (i * stride),\n \t\t\t\t\t\talloc->imported.alias.aliased[i].alloc->pages + alloc->imported.alias.aliased[i].offset,\n \t\t\t\t\t\talloc->imported.alias.aliased[i].length,\n-\t\t\t\t\t\treg->flags);\n+\t\t\t\t\t\treg->flags & gwt_mask);\n \t\t\t\tif (err)\n \t\t\t\t\tgoto bad_insert;\n \n@@ -939,7 +985,7 @@ int kbase_gpu_mmap(struct kbase_context *kctx, struct kbase_va_region *reg, u64\n \t\t\t\t\treg->start_pfn + i * stride,\n \t\t\t\t\tkctx->aliasing_sink_page,\n \t\t\t\t\talloc->imported.alias.aliased[i].length,\n-\t\t\t\t\t(reg->flags & mask) | attr);\n+\t\t\t\t\t(reg->flags & mask & gwt_mask) | attr);\n \n \t\t\t\tif (err)\n \t\t\t\t\tgoto bad_insert;\n@@ -949,7 +995,7 @@ int kbase_gpu_mmap(struct kbase_context *kctx, struct kbase_va_region *reg, u64\n \t\terr = kbase_mmu_insert_pages(kctx, reg->start_pfn,\n \t\t\t\tkbase_get_gpu_phy_pages(reg),\n \t\t\t\tkbase_reg_current_backed_size(reg),\n-\t\t\t\treg->flags);\n+\t\t\t\treg->flags & gwt_mask);\n \t\tif (err)\n \t\t\tgoto bad_insert;\n \t\tkbase_mem_phy_alloc_gpu_mapped(reg->gpu_alloc);\n@@ -1085,6 +1131,36 @@ int kbasep_find_enclosing_cpu_mapping_offset(\n \n KBASE_EXPORT_TEST_API(kbasep_find_enclosing_cpu_mapping_offset);\n \n+int kbasep_find_enclosing_gpu_mapping_start_and_offset(struct kbase_context *kctx,\n+\t\tu64 gpu_addr, size_t size, u64 *start, u64 *offset)\n+{\n+\tstruct kbase_va_region *region;\n+\n+\tkbase_gpu_vm_lock(kctx);\n+\n+\tregion = kbase_region_tracker_find_region_enclosing_address(kctx, gpu_addr);\n+\n+\tif (!region) {\n+\t\tkbase_gpu_vm_unlock(kctx);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t*start = region->start_pfn << PAGE_SHIFT;\n+\n+\t*offset = gpu_addr - *start;\n+\n+\tif (((region->start_pfn + region->nr_pages) << PAGE_SHIFT) < (gpu_addr + size)) {\n+\t\tkbase_gpu_vm_unlock(kctx);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tkbase_gpu_vm_unlock(kctx);\n+\n+\treturn 0;\n+}\n+\n+KBASE_EXPORT_TEST_API(kbasep_find_enclosing_gpu_mapping_start_and_offset);\n+\n void kbase_sync_single(struct kbase_context *kctx,\n \t\tstruct tagged_addr t_cpu_pa, struct tagged_addr t_gpu_pa,\n \t\toff_t offset, size_t size, enum kbase_sync_type sync_fn)\n@@ -1268,6 +1344,11 @@ int kbase_mem_free_region(struct kbase_context *kctx, struct kbase_va_region *re\n \tKBASE_DEBUG_ASSERT(NULL != reg);\n \tlockdep_assert_held(&kctx->reg_lock);\n \n+\tif (reg->flags & KBASE_REG_JIT) {\n+\t\tdev_warn(reg->kctx->kbdev->dev, \"Attempt to free JIT memory!\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n \t/*\n \t * Unlink the physical allocation before unmaking it evictable so\n \t * that the allocation isn't grown back to its last backed size\n@@ -1413,6 +1494,9 @@ int kbase_update_region_flags(struct kbase_context *kctx,\n \t\treg->flags |= KBASE_REG_SHARE_IN;\n \t}\n \n+\tif (flags & BASE_MEM_TILER_ALIGN_TOP)\n+\t\treg->flags |= KBASE_REG_TILER_ALIGN_TOP;\n+\n \t/* Set up default MEMATTR usage */\n \tif (kctx->kbdev->system_coherency == COHERENCY_ACE &&\n \t\t(reg->flags & KBASE_REG_SHARE_BOTH)) {\n@@ -1426,12 +1510,10 @@ int kbase_update_region_flags(struct kbase_context *kctx,\n \treturn 0;\n }\n \n-int kbase_alloc_phy_pages_helper(\n-\tstruct kbase_mem_phy_alloc *alloc,\n-\tsize_t nr_pages_requested)\n+int kbase_alloc_phy_pages_helper(struct kbase_mem_phy_alloc *alloc,\n+\t\tsize_t nr_pages_requested)\n {\n \tint new_page_count __maybe_unused;\n-\tsize_t old_page_count = alloc->nents;\n \tsize_t nr_left = nr_pages_requested;\n \tint res;\n \tstruct kbase_context *kctx;\n@@ -1440,6 +1522,11 @@ int kbase_alloc_phy_pages_helper(\n \tKBASE_DEBUG_ASSERT(alloc->type == KBASE_MEM_TYPE_NATIVE);\n \tKBASE_DEBUG_ASSERT(alloc->imported.kctx);\n \n+\tif (alloc->reg) {\n+\t\tif (nr_pages_requested > alloc->reg->nr_pages - alloc->nents)\n+\t\t\tgoto invalid_request;\n+\t}\n+\n \tkctx = alloc->imported.kctx;\n \n \tif (nr_pages_requested == 0)\n@@ -1454,7 +1541,7 @@ int kbase_alloc_phy_pages_helper(\n \t * allocation is visible to the OOM killer */\n \tkbase_process_page_usage_inc(kctx, nr_pages_requested);\n \n-\ttp = alloc->pages + old_page_count;\n+\ttp = alloc->pages + alloc->nents;\n \n #ifdef CONFIG_MALI_2MB_ALLOC\n \t/* Check if we have enough pages requested so we can allocate a large\n@@ -1564,15 +1651,6 @@ int kbase_alloc_phy_pages_helper(\n \t\t\tgoto alloc_failed;\n \t}\n \n-\t/*\n-\t * Request a zone cache update, this scans only the new pages an\n-\t * appends their information to the zone cache. if the update\n-\t * fails then clear the cache so we fall-back to doing things\n-\t * page by page.\n-\t */\n-\tif (kbase_zone_cache_update(alloc, old_page_count) != 0)\n-\t\tkbase_zone_cache_clear(alloc);\n-\n \tKBASE_TLSTREAM_AUX_PAGESALLOC(\n \t\t\tkctx->id,\n \t\t\t(u64)new_page_count);\n@@ -1583,21 +1661,201 @@ int kbase_alloc_phy_pages_helper(\n \n alloc_failed:\n \t/* rollback needed if got one or more 2MB but failed later */\n-\tif (nr_left != nr_pages_requested)\n-\t\tkbase_mem_pool_free_pages(&kctx->lp_mem_pool,\n-\t\t\t\t  nr_pages_requested - nr_left,\n-\t\t\t\t  alloc->pages + old_page_count,\n-\t\t\t\t  false,\n-\t\t\t\t  false);\n+\tif (nr_left != nr_pages_requested) {\n+\t\tsize_t nr_pages_to_free = nr_pages_requested - nr_left;\n+\n+\t\talloc->nents += nr_pages_to_free;\n+\n+\t\tkbase_process_page_usage_inc(kctx, nr_pages_to_free);\n+\t\tkbase_atomic_add_pages(nr_pages_to_free, &kctx->used_pages);\n+\t\tkbase_atomic_add_pages(nr_pages_to_free,\n+\t\t\t       &kctx->kbdev->memdev.used_pages);\n+\n+\t\tkbase_free_phy_pages_helper(alloc, nr_pages_to_free);\n+\t}\n \n \tkbase_process_page_usage_dec(kctx, nr_pages_requested);\n \tkbase_atomic_sub_pages(nr_pages_requested, &kctx->used_pages);\n \tkbase_atomic_sub_pages(nr_pages_requested,\n \t\t\t       &kctx->kbdev->memdev.used_pages);\n \n+invalid_request:\n \treturn -ENOMEM;\n }\n \n+struct tagged_addr *kbase_alloc_phy_pages_helper_locked(\n+\t\tstruct kbase_mem_phy_alloc *alloc, struct kbase_mem_pool *pool,\n+\t\tsize_t nr_pages_requested,\n+\t\tstruct kbase_sub_alloc **prealloc_sa)\n+{\n+\tint new_page_count __maybe_unused;\n+\tsize_t nr_left = nr_pages_requested;\n+\tint res;\n+\tstruct kbase_context *kctx;\n+\tstruct tagged_addr *tp;\n+\tstruct tagged_addr *new_pages = NULL;\n+\n+\tKBASE_DEBUG_ASSERT(alloc->type == KBASE_MEM_TYPE_NATIVE);\n+\tKBASE_DEBUG_ASSERT(alloc->imported.kctx);\n+\n+\tlockdep_assert_held(&pool->pool_lock);\n+\n+#if !defined(CONFIG_MALI_2MB_ALLOC)\n+\tWARN_ON(pool->order);\n+#endif\n+\n+\tif (alloc->reg) {\n+\t\tif (nr_pages_requested > alloc->reg->nr_pages - alloc->nents)\n+\t\t\tgoto invalid_request;\n+\t}\n+\n+\tkctx = alloc->imported.kctx;\n+\n+\tlockdep_assert_held(&kctx->mem_partials_lock);\n+\n+\tif (nr_pages_requested == 0)\n+\t\tgoto done; /*nothing to do*/\n+\n+\tnew_page_count = kbase_atomic_add_pages(\n+\t\t\tnr_pages_requested, &kctx->used_pages);\n+\tkbase_atomic_add_pages(nr_pages_requested,\n+\t\t\t       &kctx->kbdev->memdev.used_pages);\n+\n+\t/* Increase mm counters before we allocate pages so that this\n+\t * allocation is visible to the OOM killer\n+\t */\n+\tkbase_process_page_usage_inc(kctx, nr_pages_requested);\n+\n+\ttp = alloc->pages + alloc->nents;\n+\tnew_pages = tp;\n+\n+#ifdef CONFIG_MALI_2MB_ALLOC\n+\tif (pool->order) {\n+\t\tint nr_lp = nr_left / (SZ_2M / SZ_4K);\n+\n+\t\tres = kbase_mem_pool_alloc_pages_locked(pool,\n+\t\t\t\t\t\t nr_lp * (SZ_2M / SZ_4K),\n+\t\t\t\t\t\t tp);\n+\n+\t\tif (res > 0) {\n+\t\t\tnr_left -= res;\n+\t\t\ttp += res;\n+\t\t}\n+\n+\t\tif (nr_left) {\n+\t\t\tstruct kbase_sub_alloc *sa, *temp_sa;\n+\n+\t\t\tlist_for_each_entry_safe(sa, temp_sa,\n+\t\t\t\t\t\t &kctx->mem_partials, link) {\n+\t\t\t\tint pidx = 0;\n+\n+\t\t\t\twhile (nr_left) {\n+\t\t\t\t\tpidx = find_next_zero_bit(sa->sub_pages,\n+\t\t\t\t\t\t\t\t  SZ_2M / SZ_4K,\n+\t\t\t\t\t\t\t\t  pidx);\n+\t\t\t\t\tbitmap_set(sa->sub_pages, pidx, 1);\n+\t\t\t\t\t*tp++ = as_tagged_tag(page_to_phys(\n+\t\t\t\t\t\t\tsa->page + pidx),\n+\t\t\t\t\t\t\tFROM_PARTIAL);\n+\t\t\t\t\tnr_left--;\n+\n+\t\t\t\t\tif (bitmap_full(sa->sub_pages,\n+\t\t\t\t\t\t\tSZ_2M / SZ_4K)) {\n+\t\t\t\t\t\t/* unlink from partial list when\n+\t\t\t\t\t\t * full\n+\t\t\t\t\t\t */\n+\t\t\t\t\t\tlist_del_init(&sa->link);\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\n+\t\t/* only if we actually have a chunk left <512. If more it\n+\t\t * indicates that we couldn't allocate a 2MB above, so no point\n+\t\t * to retry here.\n+\t\t */\n+\t\tif (nr_left > 0 && nr_left < (SZ_2M / SZ_4K)) {\n+\t\t\t/* create a new partial and suballocate the rest from it\n+\t\t\t */\n+\t\t\tstruct page *np = NULL;\n+\n+\t\t\tnp = kbase_mem_pool_alloc_locked(pool);\n+\n+\t\t\tif (np) {\n+\t\t\t\tint i;\n+\t\t\t\tstruct kbase_sub_alloc *const sa = *prealloc_sa;\n+\t\t\t\tstruct page *p;\n+\n+\t\t\t\t/* store pointers back to the control struct */\n+\t\t\t\tnp->lru.next = (void *)sa;\n+\t\t\t\tfor (p = np; p < np + SZ_2M / SZ_4K; p++)\n+\t\t\t\t\tp->lru.prev = (void *)np;\n+\t\t\t\tINIT_LIST_HEAD(&sa->link);\n+\t\t\t\tbitmap_zero(sa->sub_pages, SZ_2M / SZ_4K);\n+\t\t\t\tsa->page = np;\n+\n+\t\t\t\tfor (i = 0; i < nr_left; i++)\n+\t\t\t\t\t*tp++ = as_tagged_tag(\n+\t\t\t\t\t\t\tpage_to_phys(np + i),\n+\t\t\t\t\t\t\tFROM_PARTIAL);\n+\n+\t\t\t\tbitmap_set(sa->sub_pages, 0, nr_left);\n+\t\t\t\tnr_left = 0;\n+\t\t\t\t/* Indicate to user that we'll free this memory\n+\t\t\t\t * later.\n+\t\t\t\t */\n+\t\t\t\t*prealloc_sa = NULL;\n+\n+\t\t\t\t/* expose for later use */\n+\t\t\t\tlist_add(&sa->link, &kctx->mem_partials);\n+\t\t\t}\n+\t\t}\n+\t\tif (nr_left)\n+\t\t\tgoto alloc_failed;\n+\t} else {\n+#endif\n+\t\tres = kbase_mem_pool_alloc_pages_locked(pool,\n+\t\t\t\t\t\t nr_left,\n+\t\t\t\t\t\t tp);\n+\t\tif (res <= 0)\n+\t\t\tgoto alloc_failed;\n+#ifdef CONFIG_MALI_2MB_ALLOC\n+\t}\n+#endif\n+\n+\tKBASE_TLSTREAM_AUX_PAGESALLOC(\n+\t\t\tkctx->id,\n+\t\t\t(u64)new_page_count);\n+\n+\talloc->nents += nr_pages_requested;\n+done:\n+\treturn new_pages;\n+\n+alloc_failed:\n+\t/* rollback needed if got one or more 2MB but failed later */\n+\tif (nr_left != nr_pages_requested) {\n+\t\tsize_t nr_pages_to_free = nr_pages_requested - nr_left;\n+\n+\t\talloc->nents += nr_pages_to_free;\n+\n+\t\tkbase_process_page_usage_inc(kctx, nr_pages_to_free);\n+\t\tkbase_atomic_add_pages(nr_pages_to_free, &kctx->used_pages);\n+\t\tkbase_atomic_add_pages(nr_pages_to_free,\n+\t\t\t       &kctx->kbdev->memdev.used_pages);\n+\n+\t\tkbase_free_phy_pages_helper(alloc, nr_pages_to_free);\n+\t}\n+\n+\tkbase_process_page_usage_dec(kctx, nr_pages_requested);\n+\tkbase_atomic_sub_pages(nr_pages_requested, &kctx->used_pages);\n+\tkbase_atomic_sub_pages(nr_pages_requested,\n+\t\t\t       &kctx->kbdev->memdev.used_pages);\n+\n+invalid_request:\n+\treturn NULL;\n+}\n+\n static void free_partial(struct kbase_context *kctx, struct tagged_addr tp)\n {\n \tstruct page *p, *head_page;\n@@ -1650,15 +1908,6 @@ int kbase_free_phy_pages_helper(\n \t\tstart_free++;\n \t}\n \n-\t/*\n-\t * Clear the zone cache, we don't expect JIT allocations to be\n-\t * shrunk in parts so there is no point trying to optimize for that\n-\t * by scanning for the changes caused by freeing this memory and\n-\t * updating the existing cache entries.\n-\t */\n-\tkbase_zone_cache_clear(alloc);\n-\n-\n \twhile (nr_pages_to_free) {\n \t\tif (is_huge_head(*start_free)) {\n \t\t\t/* This is a 2MB entry, so free all the 512 pages that\n@@ -1718,20 +1967,141 @@ int kbase_free_phy_pages_helper(\n \treturn 0;\n }\n \n-void kbase_mem_kref_free(struct kref *kref)\n+static void free_partial_locked(struct kbase_context *kctx,\n+\t\tstruct kbase_mem_pool *pool, struct tagged_addr tp)\n {\n-\tstruct kbase_mem_phy_alloc *alloc;\n+\tstruct page *p, *head_page;\n+\tstruct kbase_sub_alloc *sa;\n \n-\talloc = container_of(kref, struct kbase_mem_phy_alloc, kref);\n+\tlockdep_assert_held(&pool->pool_lock);\n+\tlockdep_assert_held(&kctx->mem_partials_lock);\n \n-\tswitch (alloc->type) {\n-\tcase KBASE_MEM_TYPE_NATIVE: {\n-\t\tWARN_ON(!alloc->imported.kctx);\n-\t\t/*\n-\t\t * The physical allocation must have been removed from the\n-\t\t * eviction list before trying to free it.\n-\t\t */\n-\t\tWARN_ON(!list_empty(&alloc->evict_node));\n+\tp = phys_to_page(as_phys_addr_t(tp));\n+\thead_page = (struct page *)p->lru.prev;\n+\tsa = (struct kbase_sub_alloc *)head_page->lru.next;\n+\tclear_bit(p - head_page, sa->sub_pages);\n+\tif (bitmap_empty(sa->sub_pages, SZ_2M / SZ_4K)) {\n+\t\tlist_del(&sa->link);\n+\t\tkbase_mem_pool_free(pool, head_page, true);\n+\t\tkfree(sa);\n+\t} else if (bitmap_weight(sa->sub_pages, SZ_2M / SZ_4K) ==\n+\t\t   SZ_2M / SZ_4K - 1) {\n+\t\t/* expose the partial again */\n+\t\tlist_add(&sa->link, &kctx->mem_partials);\n+\t}\n+}\n+\n+void kbase_free_phy_pages_helper_locked(struct kbase_mem_phy_alloc *alloc,\n+\t\tstruct kbase_mem_pool *pool, struct tagged_addr *pages,\n+\t\tsize_t nr_pages_to_free)\n+{\n+\tstruct kbase_context *kctx = alloc->imported.kctx;\n+\tbool syncback;\n+\tbool reclaimed = (alloc->evicted != 0);\n+\tstruct tagged_addr *start_free;\n+\tsize_t freed = 0;\n+\n+\tKBASE_DEBUG_ASSERT(alloc->type == KBASE_MEM_TYPE_NATIVE);\n+\tKBASE_DEBUG_ASSERT(alloc->imported.kctx);\n+\tKBASE_DEBUG_ASSERT(alloc->nents >= nr_pages_to_free);\n+\n+\tlockdep_assert_held(&pool->pool_lock);\n+\tlockdep_assert_held(&kctx->mem_partials_lock);\n+\n+\t/* early out if nothing to do */\n+\tif (!nr_pages_to_free)\n+\t\treturn;\n+\n+\tstart_free = pages;\n+\n+\tsyncback = alloc->properties & KBASE_MEM_PHY_ALLOC_ACCESSED_CACHED;\n+\n+\t/* pad start_free to a valid start location */\n+\twhile (nr_pages_to_free && is_huge(*start_free) &&\n+\t       !is_huge_head(*start_free)) {\n+\t\tnr_pages_to_free--;\n+\t\tstart_free++;\n+\t}\n+\n+\twhile (nr_pages_to_free) {\n+\t\tif (is_huge_head(*start_free)) {\n+\t\t\t/* This is a 2MB entry, so free all the 512 pages that\n+\t\t\t * it points to\n+\t\t\t */\n+\t\t\tWARN_ON(!pool->order);\n+\t\t\tkbase_mem_pool_free_pages_locked(pool,\n+\t\t\t\t\t512,\n+\t\t\t\t\tstart_free,\n+\t\t\t\t\tsyncback,\n+\t\t\t\t\treclaimed);\n+\t\t\tnr_pages_to_free -= 512;\n+\t\t\tstart_free += 512;\n+\t\t\tfreed += 512;\n+\t\t} else if (is_partial(*start_free)) {\n+\t\t\tWARN_ON(!pool->order);\n+\t\t\tfree_partial_locked(kctx, pool, *start_free);\n+\t\t\tnr_pages_to_free--;\n+\t\t\tstart_free++;\n+\t\t\tfreed++;\n+\t\t} else {\n+\t\t\tstruct tagged_addr *local_end_free;\n+\n+\t\t\tWARN_ON(pool->order);\n+\t\t\tlocal_end_free = start_free;\n+\t\t\twhile (nr_pages_to_free &&\n+\t\t\t       !is_huge(*local_end_free) &&\n+\t\t\t       !is_partial(*local_end_free)) {\n+\t\t\t\tlocal_end_free++;\n+\t\t\t\tnr_pages_to_free--;\n+\t\t\t}\n+\t\t\tkbase_mem_pool_free_pages_locked(pool,\n+\t\t\t\t\tlocal_end_free - start_free,\n+\t\t\t\t\tstart_free,\n+\t\t\t\t\tsyncback,\n+\t\t\t\t\treclaimed);\n+\t\t\tfreed += local_end_free - start_free;\n+\t\t\tstart_free += local_end_free - start_free;\n+\t\t}\n+\t}\n+\n+\talloc->nents -= freed;\n+\n+\t/*\n+\t * If the allocation was not evicted (i.e. evicted == 0) then\n+\t * the page accounting needs to be done.\n+\t */\n+\tif (!reclaimed) {\n+\t\tint new_page_count;\n+\n+\t\tkbase_process_page_usage_dec(kctx, freed);\n+\t\tnew_page_count = kbase_atomic_sub_pages(freed,\n+\t\t\t\t\t\t\t&kctx->used_pages);\n+\t\tkbase_atomic_sub_pages(freed,\n+\t\t\t\t       &kctx->kbdev->memdev.used_pages);\n+\n+\t\tKBASE_TLSTREAM_AUX_PAGESALLOC(\n+\t\t\t\tkctx->id,\n+\t\t\t\t(u64)new_page_count);\n+\t}\n+}\n+\n+void kbase_mem_kref_free(struct kref *kref)\n+{\n+\tstruct kbase_mem_phy_alloc *alloc;\n+\n+\talloc = container_of(kref, struct kbase_mem_phy_alloc, kref);\n+\n+\tswitch (alloc->type) {\n+\tcase KBASE_MEM_TYPE_NATIVE: {\n+\t\tif (!WARN_ON(!alloc->imported.kctx)) {\n+\t\t\t/*\n+\t\t\t * The physical allocation must have been removed from\n+\t\t\t * the eviction list before trying to free it.\n+\t\t\t */\n+\t\t\tmutex_lock(&alloc->imported.kctx->jit_evict_lock);\n+\t\t\tWARN_ON(!list_empty(&alloc->evict_node));\n+\t\t\tmutex_unlock(&alloc->imported.kctx->jit_evict_lock);\n+\t\t}\n \t\tkbase_free_phy_pages_helper(alloc, alloc->nents);\n \t\tbreak;\n \t}\n@@ -1752,11 +2122,6 @@ void kbase_mem_kref_free(struct kref *kref)\n \tcase KBASE_MEM_TYPE_RAW:\n \t\t/* raw pages, external cleanup */\n \t\tbreak;\n- #ifdef CONFIG_UMP\n-\tcase KBASE_MEM_TYPE_IMPORTED_UMP:\n-\t\tump_dd_release(alloc->imported.ump_handle);\n-\t\tbreak;\n-#endif\n #ifdef CONFIG_DMA_SHARED_BUFFER\n \tcase KBASE_MEM_TYPE_IMPORTED_UMM:\n \t\tdma_buf_detach(alloc->imported.umm.dma_buf,\n@@ -1846,8 +2211,13 @@ bool kbase_check_alloc_flags(unsigned long flags)\n \tif ((flags & (BASE_MEM_PROT_CPU_WR | BASE_MEM_PROT_GPU_WR)) == 0)\n \t\treturn false;\n \n-\t/* GPU cannot be writing to GPU executable memory and cannot grow the memory on page fault. */\n-\tif ((flags & BASE_MEM_PROT_GPU_EX) && (flags & (BASE_MEM_PROT_GPU_WR | BASE_MEM_GROW_ON_GPF)))\n+\t/* GPU executable memory cannot:\n+\t * - Be written by the GPU\n+\t * - Be grown on GPU page fault\n+\t * - Have the top of its initial commit aligned to 'extent' */\n+\tif ((flags & BASE_MEM_PROT_GPU_EX) && (flags &\n+\t\t\t(BASE_MEM_PROT_GPU_WR | BASE_MEM_GROW_ON_GPF |\n+\t\t\tBASE_MEM_TILER_ALIGN_TOP)))\n \t\treturn false;\n \n \t/* GPU should have at least read or write access otherwise there is no\n@@ -1859,6 +2229,12 @@ bool kbase_check_alloc_flags(unsigned long flags)\n \tif ((flags & BASE_MEM_IMPORT_SHARED) == BASE_MEM_IMPORT_SHARED)\n \t\treturn false;\n \n+\t/* Should not combine BASE_MEM_COHERENT_LOCAL with\n+\t * BASE_MEM_COHERENT_SYSTEM */\n+\tif ((flags & (BASE_MEM_COHERENT_LOCAL | BASE_MEM_COHERENT_SYSTEM)) ==\n+\t\t\t(BASE_MEM_COHERENT_LOCAL | BASE_MEM_COHERENT_SYSTEM))\n+\t\treturn false;\n+\n \treturn true;\n }\n \n@@ -1880,6 +2256,10 @@ bool kbase_check_import_flags(unsigned long flags)\n \tif (flags & BASE_MEM_GROW_ON_GPF)\n \t\treturn false;\n \n+\t/* Imported memory cannot be aligned to the end of its initial commit */\n+\tif (flags & BASE_MEM_TILER_ALIGN_TOP)\n+\t\treturn false;\n+\n \t/* GPU should have at least read or write access otherwise there is no\n \t   reason for importing. */\n \tif ((flags & (BASE_MEM_PROT_GPU_RD | BASE_MEM_PROT_GPU_WR)) == 0)\n@@ -1892,6 +2272,89 @@ bool kbase_check_import_flags(unsigned long flags)\n \treturn true;\n }\n \n+int kbase_check_alloc_sizes(struct kbase_context *kctx, unsigned long flags,\n+\t\tu64 va_pages, u64 commit_pages, u64 large_extent)\n+{\n+\tstruct device *dev = kctx->kbdev->dev;\n+\tint gpu_pc_bits = kctx->kbdev->gpu_props.props.core_props.log2_program_counter_size;\n+\tu64 gpu_pc_pages_max = 1ULL << gpu_pc_bits >> PAGE_SHIFT;\n+\tstruct kbase_va_region test_reg;\n+\n+\t/* kbase_va_region's extent member can be of variable size, so check against that type */\n+\ttest_reg.extent = large_extent;\n+\n+#define KBASE_MSG_PRE \"GPU allocation attempted with \"\n+\n+\tif (0 == va_pages) {\n+\t\tdev_warn(dev, KBASE_MSG_PRE \"0 va_pages!\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (va_pages > (U64_MAX / PAGE_SIZE)) {\n+\t\t/* 64-bit address range is the max */\n+\t\tdev_warn(dev, KBASE_MSG_PRE \"va_pages==%lld larger than 64-bit address range!\",\n+\t\t\t\t(unsigned long long)va_pages);\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\t/* Note: commit_pages is checked against va_pages during\n+\t * kbase_alloc_phy_pages() */\n+\n+\t/* Limit GPU executable allocs to GPU PC size */\n+\tif ((flags & BASE_MEM_PROT_GPU_EX) && (va_pages > gpu_pc_pages_max)) {\n+\t\tdev_warn(dev, KBASE_MSG_PRE \"BASE_MEM_PROT_GPU_EX and va_pages==%lld larger than GPU PC range %lld\",\n+\t\t\t\t(unsigned long long)va_pages,\n+\t\t\t\t(unsigned long long)gpu_pc_pages_max);\n+\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif ((flags & (BASE_MEM_GROW_ON_GPF | BASE_MEM_TILER_ALIGN_TOP)) &&\n+\t\t\ttest_reg.extent == 0) {\n+\t\tdev_warn(dev, KBASE_MSG_PRE \"BASE_MEM_GROW_ON_GPF or BASE_MEM_TILER_ALIGN_TOP but extent == 0\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (!(flags & (BASE_MEM_GROW_ON_GPF | BASE_MEM_TILER_ALIGN_TOP)) &&\n+\t\t\ttest_reg.extent != 0) {\n+\t\tdev_warn(dev, KBASE_MSG_PRE \"neither BASE_MEM_GROW_ON_GPF nor BASE_MEM_TILER_ALIGN_TOP set but extent != 0\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/* BASE_MEM_TILER_ALIGN_TOP memory has a number of restrictions */\n+\tif (flags & BASE_MEM_TILER_ALIGN_TOP) {\n+#define KBASE_MSG_PRE_FLAG KBASE_MSG_PRE \"BASE_MEM_TILER_ALIGN_TOP and \"\n+\t\tunsigned long small_extent;\n+\n+\t\tif (large_extent > BASE_MEM_TILER_ALIGN_TOP_EXTENT_MAX_PAGES) {\n+\t\t\tdev_warn(dev, KBASE_MSG_PRE_FLAG \"extent==%lld pages exceeds limit %lld\",\n+\t\t\t\t\t(unsigned long long)large_extent,\n+\t\t\t\t\tBASE_MEM_TILER_ALIGN_TOP_EXTENT_MAX_PAGES);\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t\t/* For use with is_power_of_2, which takes unsigned long, so\n+\t\t * must ensure e.g. on 32-bit kernel it'll fit in that type */\n+\t\tsmall_extent = (unsigned long)large_extent;\n+\n+\t\tif (!is_power_of_2(small_extent)) {\n+\t\t\tdev_warn(dev, KBASE_MSG_PRE_FLAG \"extent==%ld not a non-zero power of 2\",\n+\t\t\t\t\tsmall_extent);\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n+\t\tif (commit_pages > large_extent) {\n+\t\t\tdev_warn(dev, KBASE_MSG_PRE_FLAG \"commit_pages==%ld exceeds extent==%ld\",\n+\t\t\t\t\t(unsigned long)commit_pages,\n+\t\t\t\t\t(unsigned long)large_extent);\n+\t\t\treturn -EINVAL;\n+\t\t}\n+#undef KBASE_MSG_PRE_FLAG\n+\t}\n+\n+\treturn 0;\n+#undef KBASE_MSG_PRE\n+}\n+\n /**\n  * @brief Acquire the per-context region list lock\n  */\n@@ -2120,6 +2583,7 @@ static void kbase_jit_destroy_worker(struct work_struct *work)\n \t\tmutex_unlock(&kctx->jit_evict_lock);\n \n \t\tkbase_gpu_vm_lock(kctx);\n+\t\treg->flags &= ~KBASE_REG_JIT;\n \t\tkbase_mem_free_region(kctx, reg);\n \t\tkbase_gpu_vm_unlock(kctx);\n \t} while (1);\n@@ -2127,6 +2591,7 @@ static void kbase_jit_destroy_worker(struct work_struct *work)\n \n int kbase_jit_init(struct kbase_context *kctx)\n {\n+\tmutex_lock(&kctx->jit_evict_lock);\n \tINIT_LIST_HEAD(&kctx->jit_active_head);\n \tINIT_LIST_HEAD(&kctx->jit_pool_head);\n \tINIT_LIST_HEAD(&kctx->jit_destroy_head);\n@@ -2134,49 +2599,268 @@ int kbase_jit_init(struct kbase_context *kctx)\n \n \tINIT_LIST_HEAD(&kctx->jit_pending_alloc);\n \tINIT_LIST_HEAD(&kctx->jit_atoms_head);\n+\tmutex_unlock(&kctx->jit_evict_lock);\n+\n+\tkctx->jit_max_allocations = 0;\n+\tkctx->jit_current_allocations = 0;\n+\tkctx->trim_level = 0;\n \n \treturn 0;\n }\n \n+/* Check if the allocation from JIT pool is of the same size as the new JIT\n+ * allocation and also, if BASE_JIT_ALLOC_MEM_TILER_ALIGN_TOP is set, meets\n+ * the alignment requirements.\n+ */\n+static bool meet_size_and_tiler_align_top_requirements(struct kbase_context *kctx,\n+\tstruct kbase_va_region *walker, struct base_jit_alloc_info *info)\n+{\n+\tbool meet_reqs = true;\n+\n+\tif (walker->nr_pages != info->va_pages)\n+\t\tmeet_reqs = false;\n+\telse if (info->flags & BASE_JIT_ALLOC_MEM_TILER_ALIGN_TOP) {\n+\t\tsize_t align = info->extent;\n+\t\tsize_t align_mask = align - 1;\n+\n+\t\tif ((walker->start_pfn + info->commit_pages) & align_mask)\n+\t\t\tmeet_reqs = false;\n+\t}\n+\n+\treturn meet_reqs;\n+}\n+\n+static int kbase_jit_grow(struct kbase_context *kctx,\n+\t\tstruct base_jit_alloc_info *info, struct kbase_va_region *reg)\n+{\n+\tsize_t delta;\n+\tsize_t pages_required;\n+\tsize_t old_size;\n+\tstruct kbase_mem_pool *pool;\n+\tint ret = -ENOMEM;\n+\tstruct tagged_addr *gpu_pages;\n+\tstruct kbase_sub_alloc *prealloc_sas[2] = { NULL, NULL };\n+\tint i;\n+\n+\tif (info->commit_pages > reg->nr_pages) {\n+\t\t/* Attempted to grow larger than maximum size */\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tkbase_gpu_vm_lock(kctx);\n+\n+\t/* Make the physical backing no longer reclaimable */\n+\tif (!kbase_mem_evictable_unmake(reg->gpu_alloc))\n+\t\tgoto update_failed;\n+\n+\tif (reg->gpu_alloc->nents >= info->commit_pages)\n+\t\tgoto done;\n+\n+\t/* Grow the backing */\n+\told_size = reg->gpu_alloc->nents;\n+\n+\t/* Allocate some more pages */\n+\tdelta = info->commit_pages - reg->gpu_alloc->nents;\n+\tpages_required = delta;\n+\n+#ifdef CONFIG_MALI_2MB_ALLOC\n+\t/* Preallocate memory for the sub-allocation structs */\n+\tfor (i = 0; i != ARRAY_SIZE(prealloc_sas); ++i) {\n+\t\tprealloc_sas[i] = kmalloc(sizeof(*prealloc_sas[i]),\n+\t\t\t\tGFP_KERNEL);\n+\t\tif (!prealloc_sas[i])\n+\t\t\tgoto update_failed;\n+\t}\n+\n+\tif (pages_required >= (SZ_2M / SZ_4K)) {\n+\t\tpool = &kctx->lp_mem_pool;\n+\t\t/* Round up to number of 2 MB pages required */\n+\t\tpages_required += ((SZ_2M / SZ_4K) - 1);\n+\t\tpages_required /= (SZ_2M / SZ_4K);\n+\t} else {\n+#endif\n+\t\tpool = &kctx->mem_pool;\n+#ifdef CONFIG_MALI_2MB_ALLOC\n+\t}\n+#endif\n+\n+\tif (reg->cpu_alloc != reg->gpu_alloc)\n+\t\tpages_required *= 2;\n+\n+\tmutex_lock(&kctx->mem_partials_lock);\n+\tkbase_mem_pool_lock(pool);\n+\n+\t/* As we can not allocate memory from the kernel with the vm_lock held,\n+\t * grow the pool to the required size with the lock dropped. We hold the\n+\t * pool lock to prevent another thread from allocating from the pool\n+\t * between the grow and allocation.\n+\t */\n+\twhile (kbase_mem_pool_size(pool) < pages_required) {\n+\t\tint pool_delta = pages_required - kbase_mem_pool_size(pool);\n+\n+\t\tkbase_mem_pool_unlock(pool);\n+\t\tmutex_unlock(&kctx->mem_partials_lock);\n+\t\tkbase_gpu_vm_unlock(kctx);\n+\n+\t\tif (kbase_mem_pool_grow(pool, pool_delta))\n+\t\t\tgoto update_failed_unlocked;\n+\n+\t\tkbase_gpu_vm_lock(kctx);\n+\t\tmutex_lock(&kctx->mem_partials_lock);\n+\t\tkbase_mem_pool_lock(pool);\n+\t}\n+\n+\tgpu_pages = kbase_alloc_phy_pages_helper_locked(reg->gpu_alloc, pool,\n+\t\t\tdelta, &prealloc_sas[0]);\n+\tif (!gpu_pages) {\n+\t\tkbase_mem_pool_unlock(pool);\n+\t\tmutex_unlock(&kctx->mem_partials_lock);\n+\t\tgoto update_failed;\n+\t}\n+\n+\tif (reg->cpu_alloc != reg->gpu_alloc) {\n+\t\tstruct tagged_addr *cpu_pages;\n+\n+\t\tcpu_pages = kbase_alloc_phy_pages_helper_locked(reg->cpu_alloc,\n+\t\t\t\tpool, delta, &prealloc_sas[1]);\n+\t\tif (!cpu_pages) {\n+\t\t\tkbase_free_phy_pages_helper_locked(reg->gpu_alloc,\n+\t\t\t\t\tpool, gpu_pages, delta);\n+\t\t\tkbase_mem_pool_unlock(pool);\n+\t\t\tmutex_unlock(&kctx->mem_partials_lock);\n+\t\t\tgoto update_failed;\n+\t\t}\n+\t}\n+\tkbase_mem_pool_unlock(pool);\n+\tmutex_unlock(&kctx->mem_partials_lock);\n+\n+\tret = kbase_mem_grow_gpu_mapping(kctx, reg, info->commit_pages,\n+\t\t\told_size);\n+\t/*\n+\t * The grow failed so put the allocation back in the\n+\t * pool and return failure.\n+\t */\n+\tif (ret)\n+\t\tgoto update_failed;\n+\n+done:\n+\tret = 0;\n+\n+\t/* Update attributes of JIT allocation taken from the pool */\n+\treg->initial_commit = info->commit_pages;\n+\treg->extent = info->extent;\n+\n+update_failed:\n+\tkbase_gpu_vm_unlock(kctx);\n+update_failed_unlocked:\n+\tfor (i = 0; i != ARRAY_SIZE(prealloc_sas); ++i)\n+\t\tkfree(prealloc_sas[i]);\n+\n+\treturn ret;\n+}\n+\n struct kbase_va_region *kbase_jit_allocate(struct kbase_context *kctx,\n \t\tstruct base_jit_alloc_info *info)\n {\n \tstruct kbase_va_region *reg = NULL;\n-\tstruct kbase_va_region *walker;\n-\tstruct kbase_va_region *temp;\n-\tsize_t current_diff = SIZE_MAX;\n \n-\tint ret;\n+\tif (kctx->jit_current_allocations >= kctx->jit_max_allocations) {\n+\t\t/* Too many current allocations */\n+\t\treturn NULL;\n+\t}\n+\tif (info->max_allocations > 0 &&\n+\t\t\tkctx->jit_current_allocations_per_bin[info->bin_id] >=\n+\t\t\tinfo->max_allocations) {\n+\t\t/* Too many current allocations in this bin */\n+\t\treturn NULL;\n+\t}\n \n \tmutex_lock(&kctx->jit_evict_lock);\n+\n \t/*\n \t * Scan the pool for an existing allocation which meets our\n \t * requirements and remove it.\n \t */\n-\tlist_for_each_entry_safe(walker, temp, &kctx->jit_pool_head, jit_node) {\n-\n-\t\tif (walker->nr_pages >= info->va_pages) {\n-\t\t\tsize_t min_size, max_size, diff;\n+\tif (info->usage_id != 0) {\n+\t\t/* First scan for an allocation with the same usage ID */\n+\t\tstruct kbase_va_region *walker;\n+\t\tstruct kbase_va_region *temp;\n+\t\tsize_t current_diff = SIZE_MAX;\n+\n+\t\tlist_for_each_entry_safe(walker, temp, &kctx->jit_pool_head,\n+\t\t\t\tjit_node) {\n+\n+\t\t\tif (walker->jit_usage_id == info->usage_id &&\n+\t\t\t\t\twalker->jit_bin_id == info->bin_id &&\n+\t\t\t\t\tmeet_size_and_tiler_align_top_requirements(\n+\t\t\t\t\t\t\tkctx, walker, info)) {\n+\t\t\t\tsize_t min_size, max_size, diff;\n+\n+\t\t\t\t/*\n+\t\t\t\t * The JIT allocations VA requirements have been\n+\t\t\t\t * met, it's suitable but other allocations\n+\t\t\t\t * might be a better fit.\n+\t\t\t\t */\n+\t\t\t\tmin_size = min_t(size_t,\n+\t\t\t\t\t\twalker->gpu_alloc->nents,\n+\t\t\t\t\t\tinfo->commit_pages);\n+\t\t\t\tmax_size = max_t(size_t,\n+\t\t\t\t\t\twalker->gpu_alloc->nents,\n+\t\t\t\t\t\tinfo->commit_pages);\n+\t\t\t\tdiff = max_size - min_size;\n+\n+\t\t\t\tif (current_diff > diff) {\n+\t\t\t\t\tcurrent_diff = diff;\n+\t\t\t\t\treg = walker;\n+\t\t\t\t}\n \n-\t\t\t/*\n-\t\t\t * The JIT allocations VA requirements have been\n-\t\t\t * meet, it's suitable but other allocations\n-\t\t\t * might be a better fit.\n-\t\t\t */\n-\t\t\tmin_size = min_t(size_t, walker->gpu_alloc->nents,\n-\t\t\t\t\tinfo->commit_pages);\n-\t\t\tmax_size = max_t(size_t, walker->gpu_alloc->nents,\n-\t\t\t\t\tinfo->commit_pages);\n-\t\t\tdiff = max_size - min_size;\n-\n-\t\t\tif (current_diff > diff) {\n-\t\t\t\tcurrent_diff = diff;\n-\t\t\t\treg = walker;\n+\t\t\t\t/* The allocation is an exact match */\n+\t\t\t\tif (current_diff == 0)\n+\t\t\t\t\tbreak;\n \t\t\t}\n+\t\t}\n+\t}\n \n-\t\t\t/* The allocation is an exact match, stop looking */\n-\t\t\tif (current_diff == 0)\n-\t\t\t\tbreak;\n+\tif (!reg) {\n+\t\t/* No allocation with the same usage ID, or usage IDs not in\n+\t\t * use. Search for an allocation we can reuse.\n+\t\t */\n+\t\tstruct kbase_va_region *walker;\n+\t\tstruct kbase_va_region *temp;\n+\t\tsize_t current_diff = SIZE_MAX;\n+\n+\t\tlist_for_each_entry_safe(walker, temp, &kctx->jit_pool_head,\n+\t\t\t\tjit_node) {\n+\n+\t\t\tif (walker->jit_bin_id == info->bin_id &&\n+\t\t\t\t\tmeet_size_and_tiler_align_top_requirements(\n+\t\t\t\t\t\t\tkctx, walker, info)) {\n+\t\t\t\tsize_t min_size, max_size, diff;\n+\n+\t\t\t\t/*\n+\t\t\t\t * The JIT allocations VA requirements have been\n+\t\t\t\t * met, it's suitable but other allocations\n+\t\t\t\t * might be a better fit.\n+\t\t\t\t */\n+\t\t\t\tmin_size = min_t(size_t,\n+\t\t\t\t\t\twalker->gpu_alloc->nents,\n+\t\t\t\t\t\tinfo->commit_pages);\n+\t\t\t\tmax_size = max_t(size_t,\n+\t\t\t\t\t\twalker->gpu_alloc->nents,\n+\t\t\t\t\t\tinfo->commit_pages);\n+\t\t\t\tdiff = max_size - min_size;\n+\n+\t\t\t\tif (current_diff > diff) {\n+\t\t\t\t\tcurrent_diff = diff;\n+\t\t\t\t\treg = walker;\n+\t\t\t\t}\n+\n+\t\t\t\t/* The allocation is an exact match, so stop\n+\t\t\t\t * looking.\n+\t\t\t\t */\n+\t\t\t\tif (current_diff == 0)\n+\t\t\t\t\tbreak;\n+\t\t\t}\n \t\t}\n \t}\n \n@@ -2195,42 +2879,15 @@ struct kbase_va_region *kbase_jit_allocate(struct kbase_context *kctx,\n \t\tlist_del_init(&reg->gpu_alloc->evict_node);\n \t\tmutex_unlock(&kctx->jit_evict_lock);\n \n-\t\tkbase_gpu_vm_lock(kctx);\n-\n-\t\t/* Make the physical backing no longer reclaimable */\n-\t\tif (!kbase_mem_evictable_unmake(reg->gpu_alloc))\n-\t\t\tgoto update_failed;\n-\n-\t\t/* Grow the backing if required */\n-\t\tif (reg->gpu_alloc->nents < info->commit_pages) {\n-\t\t\tsize_t delta;\n-\t\t\tsize_t old_size = reg->gpu_alloc->nents;\n-\n-\t\t\t/* Allocate some more pages */\n-\t\t\tdelta = info->commit_pages - reg->gpu_alloc->nents;\n-\t\t\tif (kbase_alloc_phy_pages_helper(reg->gpu_alloc, delta)\n-\t\t\t\t\t!= 0)\n-\t\t\t\tgoto update_failed;\n-\n-\t\t\tif (reg->cpu_alloc != reg->gpu_alloc) {\n-\t\t\t\tif (kbase_alloc_phy_pages_helper(\n-\t\t\t\t\t\treg->cpu_alloc, delta) != 0) {\n-\t\t\t\t\tkbase_free_phy_pages_helper(\n-\t\t\t\t\t\t\treg->gpu_alloc, delta);\n-\t\t\t\t\tgoto update_failed;\n-\t\t\t\t}\n-\t\t\t}\n-\n-\t\t\tret = kbase_mem_grow_gpu_mapping(kctx, reg,\n-\t\t\t\t\tinfo->commit_pages, old_size);\n+\t\tif (kbase_jit_grow(kctx, info, reg) < 0) {\n \t\t\t/*\n-\t\t\t * The grow failed so put the allocation back in the\n-\t\t\t * pool and return failure.\n+\t\t\t * An update to an allocation from the pool failed,\n+\t\t\t * chances are slim a new allocation would fair any\n+\t\t\t * better so return the allocation to the pool and\n+\t\t\t * return the function with failure.\n \t\t\t */\n-\t\t\tif (ret)\n-\t\t\t\tgoto update_failed;\n+\t\t\tgoto update_failed_unlocked;\n \t\t}\n-\t\tkbase_gpu_vm_unlock(kctx);\n \t} else {\n \t\t/* No suitable JIT allocation was found so create a new one */\n \t\tu64 flags = BASE_MEM_PROT_CPU_RD | BASE_MEM_PROT_GPU_RD |\n@@ -2240,25 +2897,30 @@ struct kbase_va_region *kbase_jit_allocate(struct kbase_context *kctx,\n \n \t\tmutex_unlock(&kctx->jit_evict_lock);\n \n+\t\tif (info->flags & BASE_JIT_ALLOC_MEM_TILER_ALIGN_TOP)\n+\t\t\tflags |= BASE_MEM_TILER_ALIGN_TOP;\n+\n \t\treg = kbase_mem_alloc(kctx, info->va_pages, info->commit_pages,\n \t\t\t\tinfo->extent, &flags, &gpu_addr);\n \t\tif (!reg)\n \t\t\tgoto out_unlocked;\n \n+\t\treg->flags |= KBASE_REG_JIT;\n+\n \t\tmutex_lock(&kctx->jit_evict_lock);\n \t\tlist_add(&reg->jit_node, &kctx->jit_active_head);\n \t\tmutex_unlock(&kctx->jit_evict_lock);\n \t}\n \n+\tkctx->jit_current_allocations++;\n+\tkctx->jit_current_allocations_per_bin[info->bin_id]++;\n+\n+\treg->jit_usage_id = info->usage_id;\n+\treg->jit_bin_id = info->bin_id;\n+\n \treturn reg;\n \n-update_failed:\n-\t/*\n-\t * An update to an allocation from the pool failed, chances\n-\t * are slim a new allocation would fair any better so return\n-\t * the allocation to the pool and return the function with failure.\n-\t */\n-\tkbase_gpu_vm_unlock(kctx);\n+update_failed_unlocked:\n \tmutex_lock(&kctx->jit_evict_lock);\n \tlist_move(&reg->jit_node, &kctx->jit_pool_head);\n \tmutex_unlock(&kctx->jit_evict_lock);\n@@ -2268,13 +2930,53 @@ struct kbase_va_region *kbase_jit_allocate(struct kbase_context *kctx,\n \n void kbase_jit_free(struct kbase_context *kctx, struct kbase_va_region *reg)\n {\n-\t/* The physical backing of memory in the pool is always reclaimable */\n+\tu64 old_pages;\n+\n+\t/* Get current size of JIT region */\n+\told_pages = kbase_reg_current_backed_size(reg);\n+\tif (reg->initial_commit < old_pages) {\n+\t\t/* Free trim_level % of region, but don't go below initial\n+\t\t * commit size\n+\t\t */\n+\t\tu64 new_size = MAX(reg->initial_commit,\n+\t\t\tdiv_u64(old_pages * (100 - kctx->trim_level), 100));\n+\t\tu64 delta = old_pages - new_size;\n+\n+\t\tif (delta) {\n+\t\t\tkbase_mem_shrink_cpu_mapping(kctx, reg, old_pages-delta,\n+\t\t\t\t\told_pages);\n+\t\t\tkbase_mem_shrink_gpu_mapping(kctx, reg, old_pages-delta,\n+\t\t\t\t\told_pages);\n+\n+\t\t\tkbase_free_phy_pages_helper(reg->cpu_alloc, delta);\n+\t\t\tif (reg->cpu_alloc != reg->gpu_alloc)\n+\t\t\t\tkbase_free_phy_pages_helper(reg->gpu_alloc,\n+\t\t\t\t\t\tdelta);\n+\t\t}\n+\t}\n+\n+\tkctx->jit_current_allocations--;\n+\tkctx->jit_current_allocations_per_bin[reg->jit_bin_id]--;\n+\n+\tkbase_mem_evictable_mark_reclaim(reg->gpu_alloc);\n+\n \tkbase_gpu_vm_lock(kctx);\n-\tkbase_mem_evictable_make(reg->gpu_alloc);\n+\treg->flags |= KBASE_REG_DONT_NEED;\n+\tkbase_mem_shrink_cpu_mapping(kctx, reg, 0, reg->gpu_alloc->nents);\n \tkbase_gpu_vm_unlock(kctx);\n \n+\t/*\n+\t * Add the allocation to the eviction list and the jit pool, after this\n+\t * point the shrink can reclaim it, or it may be reused.\n+\t */\n \tmutex_lock(&kctx->jit_evict_lock);\n+\n+\t/* This allocation can't already be on a list. */\n+\tWARN_ON(!list_empty(&reg->gpu_alloc->evict_node));\n+\tlist_add(&reg->gpu_alloc->evict_node, &kctx->evict_list);\n+\n \tlist_move(&reg->jit_node, &kctx->jit_pool_head);\n+\n \tmutex_unlock(&kctx->jit_evict_lock);\n }\n \n@@ -2313,11 +3015,14 @@ bool kbase_jit_evict(struct kbase_context *kctx)\n \t\treg = list_entry(kctx->jit_pool_head.prev,\n \t\t\t\tstruct kbase_va_region, jit_node);\n \t\tlist_del(&reg->jit_node);\n+\t\tlist_del_init(&reg->gpu_alloc->evict_node);\n \t}\n \tmutex_unlock(&kctx->jit_evict_lock);\n \n-\tif (reg)\n+\tif (reg) {\n+\t\treg->flags &= ~KBASE_REG_JIT;\n \t\tkbase_mem_free_region(kctx, reg);\n+\t}\n \n \treturn (reg != NULL);\n }\n@@ -2328,12 +3033,6 @@ void kbase_jit_term(struct kbase_context *kctx)\n \n \t/* Free all allocations for this context */\n \n-\t/*\n-\t * Flush the freeing of allocations whose backing has been freed\n-\t * (i.e. everything in jit_destroy_head).\n-\t */\n-\tcancel_work_sync(&kctx->jit_work);\n-\n \tkbase_gpu_vm_lock(kctx);\n \tmutex_lock(&kctx->jit_evict_lock);\n \t/* Free all allocations from the pool */\n@@ -2341,7 +3040,9 @@ void kbase_jit_term(struct kbase_context *kctx)\n \t\twalker = list_first_entry(&kctx->jit_pool_head,\n \t\t\t\tstruct kbase_va_region, jit_node);\n \t\tlist_del(&walker->jit_node);\n+\t\tlist_del_init(&walker->gpu_alloc->evict_node);\n \t\tmutex_unlock(&kctx->jit_evict_lock);\n+\t\twalker->flags &= ~KBASE_REG_JIT;\n \t\tkbase_mem_free_region(kctx, walker);\n \t\tmutex_lock(&kctx->jit_evict_lock);\n \t}\n@@ -2351,12 +3052,20 @@ void kbase_jit_term(struct kbase_context *kctx)\n \t\twalker = list_first_entry(&kctx->jit_active_head,\n \t\t\t\tstruct kbase_va_region, jit_node);\n \t\tlist_del(&walker->jit_node);\n+\t\tlist_del_init(&walker->gpu_alloc->evict_node);\n \t\tmutex_unlock(&kctx->jit_evict_lock);\n+\t\twalker->flags &= ~KBASE_REG_JIT;\n \t\tkbase_mem_free_region(kctx, walker);\n \t\tmutex_lock(&kctx->jit_evict_lock);\n \t}\n \tmutex_unlock(&kctx->jit_evict_lock);\n \tkbase_gpu_vm_unlock(kctx);\n+\n+\t/*\n+\t * Flush the freeing of allocations whose backing has been freed\n+\t * (i.e. everything in jit_destroy_head).\n+\t */\n+\tcancel_work_sync(&kctx->jit_work);\n }\n \n static int kbase_jd_user_buf_map(struct kbase_context *kctx,\n@@ -2373,6 +3082,7 @@ static int kbase_jd_user_buf_map(struct kbase_context *kctx,\n \tstruct device *dev;\n \tunsigned long offset;\n \tunsigned long local_size;\n+\tunsigned long gwt_mask = ~0;\n \n \talloc = reg->gpu_alloc;\n \tpa = kbase_get_gpu_phy_pages(reg);\n@@ -2447,10 +3157,14 @@ static int kbase_jd_user_buf_map(struct kbase_context *kctx,\n \t}\n \n \talloc->nents = pinned_pages;\n+#ifdef CONFIG_MALI_JOB_DUMP\n+\tif (kctx->gwt_enabled)\n+\t\tgwt_mask = ~KBASE_REG_GPU_WR;\n+#endif\n \n \terr = kbase_mmu_insert_pages(kctx, reg->start_pfn, pa,\n \t\t\tkbase_reg_current_backed_size(reg),\n-\t\t\treg->flags);\n+\t\t\treg->flags & gwt_mask);\n \tif (err == 0)\n \t\treturn 0;\n \n@@ -2511,6 +3225,7 @@ static int kbase_jd_umm_map(struct kbase_context *kctx,\n \tint err;\n \tsize_t count = 0;\n \tstruct kbase_mem_phy_alloc *alloc;\n+\tunsigned long gwt_mask = ~0;\n \n \talloc = reg->gpu_alloc;\n \n@@ -2560,10 +3275,16 @@ static int kbase_jd_umm_map(struct kbase_context *kctx,\n \t/* Update nents as we now have pages to map */\n \talloc->nents = reg->nr_pages;\n \n+#ifdef CONFIG_MALI_JOB_DUMP\n+\tif (kctx->gwt_enabled)\n+\t\tgwt_mask = ~KBASE_REG_GPU_WR;\n+#endif\n+\n \terr = kbase_mmu_insert_pages(kctx, reg->start_pfn,\n \t\t\tkbase_get_gpu_phy_pages(reg),\n \t\t\tcount,\n-\t\t\treg->flags | KBASE_REG_GPU_WR | KBASE_REG_GPU_RD);\n+\t\t\t(reg->flags | KBASE_REG_GPU_WR | KBASE_REG_GPU_RD) &\n+\t\t\t gwt_mask);\n \tif (err)\n \t\tgoto err_unmap_attachment;\n \n@@ -2604,35 +3325,9 @@ static void kbase_jd_umm_unmap(struct kbase_context *kctx,\n }\n #endif\t\t\t\t/* CONFIG_DMA_SHARED_BUFFER */\n \n-#if (defined(CONFIG_KDS) && defined(CONFIG_UMP)) \\\n-\t\t|| defined(CONFIG_DMA_SHARED_BUFFER_USES_KDS)\n-static void add_kds_resource(struct kds_resource *kds_res,\n-\t\tstruct kds_resource **kds_resources, u32 *kds_res_count,\n-\t\tunsigned long *kds_access_bitmap, bool exclusive)\n-{\n-\tu32 i;\n-\n-\tfor (i = 0; i < *kds_res_count; i++) {\n-\t\t/* Duplicate resource, ignore */\n-\t\tif (kds_resources[i] == kds_res)\n-\t\t\treturn;\n-\t}\n-\n-\tkds_resources[*kds_res_count] = kds_res;\n-\tif (exclusive)\n-\t\tset_bit(*kds_res_count, kds_access_bitmap);\n-\t(*kds_res_count)++;\n-}\n-#endif\n-\n struct kbase_mem_phy_alloc *kbase_map_external_resource(\n \t\tstruct kbase_context *kctx, struct kbase_va_region *reg,\n-\t\tstruct mm_struct *locked_mm\n-#ifdef CONFIG_KDS\n-\t\t, u32 *kds_res_count, struct kds_resource **kds_resources,\n-\t\tunsigned long *kds_access_bitmap, bool exclusive\n-#endif\n-\t\t)\n+\t\tstruct mm_struct *locked_mm)\n {\n \tint err;\n \n@@ -2652,35 +3347,8 @@ struct kbase_mem_phy_alloc *kbase_map_external_resource(\n \t\t}\n \t}\n \tbreak;\n-\tcase KBASE_MEM_TYPE_IMPORTED_UMP: {\n-#if defined(CONFIG_KDS) && defined(CONFIG_UMP)\n-\t\tif (kds_res_count) {\n-\t\t\tstruct kds_resource *kds_res;\n-\n-\t\t\tkds_res = ump_dd_kds_resource_get(\n-\t\t\t\t\treg->gpu_alloc->imported.ump_handle);\n-\t\t\tif (kds_res)\n-\t\t\t\tadd_kds_resource(kds_res, kds_resources,\n-\t\t\t\t\t\tkds_res_count,\n-\t\t\t\t\t\tkds_access_bitmap, exclusive);\n-\t\t}\n-#endif\t\t\t\t/*defined(CONFIG_KDS) && defined(CONFIG_UMP) */\n-\t\tbreak;\n-\t}\n #ifdef CONFIG_DMA_SHARED_BUFFER\n \tcase KBASE_MEM_TYPE_IMPORTED_UMM: {\n-#ifdef CONFIG_DMA_SHARED_BUFFER_USES_KDS\n-\t\tif (kds_res_count) {\n-\t\t\tstruct kds_resource *kds_res;\n-\n-\t\t\tkds_res = get_dma_buf_kds_resource(\n-\t\t\t\t\treg->gpu_alloc->imported.umm.dma_buf);\n-\t\t\tif (kds_res)\n-\t\t\t\tadd_kds_resource(kds_res, kds_resources,\n-\t\t\t\t\t\tkds_res_count,\n-\t\t\t\t\t\tkds_access_bitmap, exclusive);\n-\t\t}\n-#endif\n \t\treg->gpu_alloc->imported.umm.current_mapping_usage_count++;\n \t\tif (1 == reg->gpu_alloc->imported.umm.current_mapping_usage_count) {\n \t\t\terr = kbase_jd_umm_map(kctx, reg);\n@@ -2788,12 +3456,7 @@ struct kbase_ctx_ext_res_meta *kbase_sticky_resource_acquire(\n \t\t * Fill in the metadata object and acquire a reference\n \t\t * for the physical resource.\n \t\t */\n-\t\tmeta->alloc = kbase_map_external_resource(kctx, reg, NULL\n-#ifdef CONFIG_KDS\n-\t\t\t\t, NULL, NULL,\n-\t\t\t\tNULL, false\n-#endif\n-\t\t\t\t);\n+\t\tmeta->alloc = kbase_map_external_resource(kctx, reg, NULL);\n \n \t\tif (!meta->alloc)\n \t\t\tgoto fail_map;\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem.h\nindex 9d98947390f68b..36ed41c543e41f 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem.h\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_mem.h\n  * Base kernel memory APIs\n@@ -30,12 +35,6 @@\n #endif\n \n #include <linux/kref.h>\n-#ifdef CONFIG_KDS\n-#include <linux/kds.h>\n-#endif\t\t\t\t/* CONFIG_KDS */\n-#ifdef CONFIG_UMP\n-#include <linux/ump.h>\n-#endif\t\t\t\t/* CONFIG_UMP */\n #include \"mali_base_kernel.h\"\n #include <mali_kbase_hw.h>\n #include \"mali_kbase_pm.h\"\n@@ -75,7 +74,6 @@ struct kbase_cpu_mapping {\n \n enum kbase_memory_type {\n \tKBASE_MEM_TYPE_NATIVE,\n-\tKBASE_MEM_TYPE_IMPORTED_UMP,\n \tKBASE_MEM_TYPE_IMPORTED_UMM,\n \tKBASE_MEM_TYPE_IMPORTED_USER_BUF,\n \tKBASE_MEM_TYPE_ALIAS,\n@@ -129,13 +127,8 @@ struct kbase_mem_phy_alloc {\n \n \tunsigned long properties;\n \n-\tstruct list_head       zone_cache;\n-\n \t/* member in union valid based on @a type */\n \tunion {\n-#ifdef CONFIG_UMP\n-\t\tump_dd_handle ump_handle;\n-#endif /* CONFIG_UMP */\n #if defined(CONFIG_DMA_SHARED_BUFFER)\n \t\tstruct {\n \t\t\tstruct dma_buf *dma_buf;\n@@ -204,8 +197,7 @@ static inline void kbase_mem_phy_alloc_gpu_unmapped(struct kbase_mem_phy_alloc *\n  */\n static inline bool kbase_mem_is_imported(enum kbase_memory_type type)\n {\n-\treturn (type == KBASE_MEM_TYPE_IMPORTED_UMP) ||\n-\t\t(type == KBASE_MEM_TYPE_IMPORTED_UMM) ||\n+\treturn (type == KBASE_MEM_TYPE_IMPORTED_UMM) ||\n \t\t(type == KBASE_MEM_TYPE_IMPORTED_USER_BUF);\n }\n \n@@ -238,6 +230,9 @@ struct kbase_va_region {\n \n \tu64 start_pfn;\t\t/* The PFN in GPU space */\n \tsize_t nr_pages;\n+\t/* Initial commit, for aligning the start address and correctly growing\n+\t * KBASE_REG_TILER_ALIGN_TOP regions */\n+\tsize_t initial_commit;\n \n /* Free region */\n #define KBASE_REG_FREE              (1ul << 0)\n@@ -289,6 +284,13 @@ struct kbase_va_region {\n  * Do not remove, use the next unreserved bit for new flags */\n #define KBASE_REG_RESERVED_BIT_22   (1ul << 22)\n \n+/* The top of the initial commit is aligned to extent pages.\n+ * Extent must be a power of 2 */\n+#define KBASE_REG_TILER_ALIGN_TOP   (1ul << 23)\n+\n+/* Memory is handled by JIT - user space should not be able to free it */\n+#define KBASE_REG_JIT               (1ul << 24)\n+\n #define KBASE_REG_ZONE_SAME_VA      KBASE_REG_ZONE(0)\n \n /* only used with 32-bit clients */\n@@ -309,7 +311,9 @@ struct kbase_va_region {\n #define KBASE_REG_ZONE_EXEC_SIZE    ((16ULL * 1024 * 1024) >> PAGE_SHIFT)\n \n #define KBASE_REG_ZONE_CUSTOM_VA         KBASE_REG_ZONE(2)\n-#define KBASE_REG_ZONE_CUSTOM_VA_BASE    (KBASE_REG_ZONE_EXEC_BASE + KBASE_REG_ZONE_EXEC_SIZE) /* Starting after KBASE_REG_ZONE_EXEC */\n+/* Starting after KBASE_REG_ZONE_EXEC */\n+#define KBASE_REG_ZONE_CUSTOM_VA_BASE    \\\n+\t(KBASE_REG_ZONE_EXEC_BASE + KBASE_REG_ZONE_EXEC_SIZE)\n #define KBASE_REG_ZONE_CUSTOM_VA_SIZE    (((1ULL << 44) >> PAGE_SHIFT) - KBASE_REG_ZONE_CUSTOM_VA_BASE)\n /* end 32-bit clients only */\n \n@@ -320,11 +324,12 @@ struct kbase_va_region {\n \tstruct kbase_mem_phy_alloc *cpu_alloc; /* the one alloc object we mmap to the CPU when mapping this region */\n \tstruct kbase_mem_phy_alloc *gpu_alloc; /* the one alloc object we mmap to the GPU when mapping this region */\n \n-\t/* non-NULL if this memory object is a kds_resource */\n-\tstruct kds_resource *kds_res;\n-\n \t/* List head used to store the region in the JIT allocation pool */\n \tstruct list_head jit_node;\n+\t/* The last JIT usage ID for this region */\n+\tu16 jit_usage_id;\n+\t/* The JIT bin this allocation came from */\n+\tu8 jit_bin_id;\n };\n \n /* Common functions */\n@@ -406,7 +411,6 @@ static inline struct kbase_mem_phy_alloc *kbase_alloc_create(size_t nr_pages, en\n \talloc->pages = (void *)(alloc + 1);\n \tINIT_LIST_HEAD(&alloc->mappings);\n \talloc->type = type;\n-\tINIT_LIST_HEAD(&alloc->zone_cache);\n \n \tif (type == KBASE_MEM_TYPE_IMPORTED_USER_BUF)\n \t\talloc->imported.user_buf.dma_addrs =\n@@ -429,24 +433,32 @@ static inline int kbase_reg_prepare_native(struct kbase_va_region *reg,\n \t\treturn PTR_ERR(reg->cpu_alloc);\n \telse if (!reg->cpu_alloc)\n \t\treturn -ENOMEM;\n+\n \treg->cpu_alloc->imported.kctx = kctx;\n-\tINIT_LIST_HEAD(&reg->cpu_alloc->evict_node);\n \tif (kbase_ctx_flag(kctx, KCTX_INFINITE_CACHE)\n \t    && (reg->flags & KBASE_REG_CPU_CACHED)) {\n \t\treg->gpu_alloc = kbase_alloc_create(reg->nr_pages,\n \t\t\t\tKBASE_MEM_TYPE_NATIVE);\n+\t\tif (IS_ERR_OR_NULL(reg->gpu_alloc)) {\n+\t\t\tkbase_mem_phy_alloc_put(reg->cpu_alloc);\n+\t\t\treturn -ENOMEM;\n+\t\t}\n \t\treg->gpu_alloc->imported.kctx = kctx;\n-\t\tINIT_LIST_HEAD(&reg->gpu_alloc->evict_node);\n \t} else {\n \t\treg->gpu_alloc = kbase_mem_phy_alloc_get(reg->cpu_alloc);\n \t}\n \n-\tINIT_LIST_HEAD(&reg->jit_node);\n+\tmutex_lock(&kctx->jit_evict_lock);\n+\tINIT_LIST_HEAD(&reg->cpu_alloc->evict_node);\n+\tINIT_LIST_HEAD(&reg->gpu_alloc->evict_node);\n+\tmutex_unlock(&kctx->jit_evict_lock);\n+\n \treg->flags &= ~KBASE_REG_FREE;\n+\n \treturn 0;\n }\n \n-static inline int kbase_atomic_add_pages(int num_pages, atomic_t *used_pages)\n+static inline u32 kbase_atomic_add_pages(u32 num_pages, atomic_t *used_pages)\n {\n \tint new_val = atomic_add_return(num_pages, used_pages);\n #if defined(CONFIG_MALI_BIFROST_GATOR_SUPPORT)\n@@ -455,7 +467,7 @@ static inline int kbase_atomic_add_pages(int num_pages, atomic_t *used_pages)\n \treturn new_val;\n }\n \n-static inline int kbase_atomic_sub_pages(int num_pages, atomic_t *used_pages)\n+static inline u32 kbase_atomic_sub_pages(u32 num_pages, atomic_t *used_pages)\n {\n \tint new_val = atomic_sub_return(num_pages, used_pages);\n #if defined(CONFIG_MALI_BIFROST_GATOR_SUPPORT)\n@@ -534,9 +546,25 @@ void kbase_mem_pool_term(struct kbase_mem_pool *pool);\n  * 3. Return NULL if no memory in the pool\n  *\n  * Return: Pointer to allocated page, or NULL if allocation failed.\n+ *\n+ * Note : This function should not be used if the pool lock is held. Use\n+ * kbase_mem_pool_alloc_locked() instead.\n  */\n struct page *kbase_mem_pool_alloc(struct kbase_mem_pool *pool);\n \n+/**\n+ * kbase_mem_pool_alloc_locked - Allocate a page from memory pool\n+ * @pool:  Memory pool to allocate from\n+ *\n+ * If there are free pages in the pool, this function allocates a page from\n+ * @pool. This function does not use @next_pool.\n+ *\n+ * Return: Pointer to allocated page, or NULL if allocation failed.\n+ *\n+ * Note : Caller must hold the pool lock.\n+ */\n+struct page *kbase_mem_pool_alloc_locked(struct kbase_mem_pool *pool);\n+\n /**\n  * kbase_mem_pool_free - Free a page to memory pool\n  * @pool:  Memory pool where page should be freed\n@@ -548,10 +576,27 @@ struct page *kbase_mem_pool_alloc(struct kbase_mem_pool *pool);\n  * 2. Otherwise, if @next_pool is not NULL and not full, add @page to\n  *    @next_pool.\n  * 3. Finally, free @page to the kernel.\n+ *\n+ * Note : This function should not be used if the pool lock is held. Use\n+ * kbase_mem_pool_free_locked() instead.\n  */\n void kbase_mem_pool_free(struct kbase_mem_pool *pool, struct page *page,\n \t\tbool dirty);\n \n+/**\n+ * kbase_mem_pool_free_locked - Free a page to memory pool\n+ * @pool:  Memory pool where page should be freed\n+ * @p:     Page to free to the pool\n+ * @dirty: Whether some of the page may be dirty in the cache.\n+ *\n+ * If @pool is not full, this function adds @page to @pool. Otherwise, @page is\n+ * freed to the kernel. This function does not use @next_pool.\n+ *\n+ * Note : Caller must hold the pool lock.\n+ */\n+void kbase_mem_pool_free_locked(struct kbase_mem_pool *pool, struct page *p,\n+\t\tbool dirty);\n+\n /**\n  * kbase_mem_pool_alloc_pages - Allocate pages from memory pool\n  * @pool:     Memory pool to allocate from\n@@ -566,10 +611,57 @@ void kbase_mem_pool_free(struct kbase_mem_pool *pool, struct page *page,\n  * On success number of pages allocated (could be less than nr_pages if\n  * partial_allowed).\n  * On error an error code.\n+ *\n+ * Note : This function should not be used if the pool lock is held. Use\n+ * kbase_mem_pool_alloc_pages_locked() instead.\n+ *\n+ * The caller must not hold vm_lock, as this could cause a deadlock if\n+ * the kernel OoM killer runs. If the caller must allocate pages while holding\n+ * this lock, it should use kbase_mem_pool_alloc_pages_locked() instead.\n  */\n int kbase_mem_pool_alloc_pages(struct kbase_mem_pool *pool, size_t nr_pages,\n \t\tstruct tagged_addr *pages, bool partial_allowed);\n \n+/**\n+ * kbase_mem_pool_alloc_pages_locked - Allocate pages from memory pool\n+ * @pool:        Memory pool to allocate from\n+ * @nr_4k_pages: Number of pages to allocate\n+ * @pages:       Pointer to array where the physical address of the allocated\n+ *               pages will be stored.\n+ *\n+ * Like kbase_mem_pool_alloc() but optimized for allocating many pages. This\n+ * version does not allocate new pages from the kernel, and therefore will never\n+ * trigger the OoM killer. Therefore, it can be run while the vm_lock is held.\n+ *\n+ * As new pages can not be allocated, the caller must ensure there are\n+ * sufficient pages in the pool. Usage of this function should look like :\n+ *\n+ *   kbase_gpu_vm_lock(kctx);\n+ *   kbase_mem_pool_lock(pool)\n+ *   while (kbase_mem_pool_size(pool) < pages_required) {\n+ *     kbase_mem_pool_unlock(pool)\n+ *     kbase_gpu_vm_unlock(kctx);\n+ *     kbase_mem_pool_grow(pool)\n+ *     kbase_gpu_vm_lock(kctx);\n+ *     kbase_mem_pool_lock(pool)\n+ *   }\n+ *   kbase_mem_pool_alloc_pages_locked(pool)\n+ *   kbase_mem_pool_unlock(pool)\n+ *   Perform other processing that requires vm_lock...\n+ *   kbase_gpu_vm_unlock(kctx);\n+ *\n+ * This ensures that the pool can be grown to the required size and that the\n+ * allocation can complete without another thread using the newly grown pages.\n+ *\n+ * Return:\n+ * On success number of pages allocated.\n+ * On error an error code.\n+ *\n+ * Note : Caller must hold the pool lock.\n+ */\n+int kbase_mem_pool_alloc_pages_locked(struct kbase_mem_pool *pool,\n+\t\tsize_t nr_4k_pages, struct tagged_addr *pages);\n+\n /**\n  * kbase_mem_pool_free_pages - Free pages to memory pool\n  * @pool:     Memory pool where pages should be freed\n@@ -585,6 +677,22 @@ int kbase_mem_pool_alloc_pages(struct kbase_mem_pool *pool, size_t nr_pages,\n void kbase_mem_pool_free_pages(struct kbase_mem_pool *pool, size_t nr_pages,\n \t\tstruct tagged_addr *pages, bool dirty, bool reclaimed);\n \n+/**\n+ * kbase_mem_pool_free_pages_locked - Free pages to memory pool\n+ * @pool:     Memory pool where pages should be freed\n+ * @nr_pages: Number of pages to free\n+ * @pages:    Pointer to array holding the physical addresses of the pages to\n+ *            free.\n+ * @dirty:    Whether any pages may be dirty in the cache.\n+ * @reclaimed: Whether the pages where reclaimable and thus should bypass\n+ *             the pool and go straight to the kernel.\n+ *\n+ * Like kbase_mem_pool_free() but optimized for freeing many pages.\n+ */\n+void kbase_mem_pool_free_pages_locked(struct kbase_mem_pool *pool,\n+\t\tsize_t nr_pages, struct tagged_addr *pages, bool dirty,\n+\t\tbool reclaimed);\n+\n /**\n  * kbase_mem_pool_size - Get number of free pages in memory pool\n  * @pool:  Memory pool to inspect\n@@ -595,7 +703,7 @@ void kbase_mem_pool_free_pages(struct kbase_mem_pool *pool, size_t nr_pages,\n  */\n static inline size_t kbase_mem_pool_size(struct kbase_mem_pool *pool)\n {\n-\treturn ACCESS_ONCE(pool->cur_size);\n+\treturn READ_ONCE(pool->cur_size);\n }\n \n /**\n@@ -643,6 +751,15 @@ int kbase_mem_pool_grow(struct kbase_mem_pool *pool, size_t nr_to_grow);\n  */\n void kbase_mem_pool_trim(struct kbase_mem_pool *pool, size_t new_size);\n \n+/**\n+ * kbase_mem_pool_mark_dying - Mark that this pool is dying\n+ * @pool:     Memory pool\n+ *\n+ * This will cause any ongoing allocation operations (eg growing on page fault)\n+ * to be terminated.\n+ */\n+void kbase_mem_pool_mark_dying(struct kbase_mem_pool *pool);\n+\n /**\n  * kbase_mem_alloc_page - Allocate a new page for a device\n  * @pool:  Memory pool to allocate a page from\n@@ -655,7 +772,8 @@ void kbase_mem_pool_trim(struct kbase_mem_pool *pool, size_t new_size);\n struct page *kbase_mem_alloc_page(struct kbase_mem_pool *pool);\n \n int kbase_region_tracker_init(struct kbase_context *kctx);\n-int kbase_region_tracker_init_jit(struct kbase_context *kctx, u64 jit_va_pages);\n+int kbase_region_tracker_init_jit(struct kbase_context *kctx, u64 jit_va_pages,\n+\t\tu8 max_allocations, u8 trim_level);\n void kbase_region_tracker_term(struct kbase_context *kctx);\n \n struct kbase_va_region *kbase_region_tracker_find_region_enclosing_address(struct kbase_context *kctx, u64 gpu_addr);\n@@ -674,6 +792,25 @@ int kbase_add_va_region(struct kbase_context *kctx, struct kbase_va_region *reg,\n bool kbase_check_alloc_flags(unsigned long flags);\n bool kbase_check_import_flags(unsigned long flags);\n \n+/**\n+ * kbase_check_alloc_sizes - check user space sizes parameters for an\n+ *                           allocation\n+ *\n+ * @kctx:         kbase context\n+ * @flags:        The flags passed from user space\n+ * @va_pages:     The size of the requested region, in pages.\n+ * @commit_pages: Number of pages to commit initially.\n+ * @extent:       Number of pages to grow by on GPU page fault and/or alignment\n+ *                (depending on flags)\n+ *\n+ * Makes checks on the size parameters passed in from user space for a memory\n+ * allocation call, with respect to the flags requested.\n+ *\n+ * Return: 0 if sizes are valid for these flags, negative error code otherwise\n+ */\n+int kbase_check_alloc_sizes(struct kbase_context *kctx, unsigned long flags,\n+\t\tu64 va_pages, u64 commit_pages, u64 extent);\n+\n /**\n  * kbase_update_region_flags - Convert user space flags to kernel region flags\n  *\n@@ -710,6 +847,9 @@ int kbase_mmu_insert_single_page(struct kbase_context *kctx, u64 vpfn,\n \t\t\t\t\tunsigned long flags);\n \n int kbase_mmu_teardown_pages(struct kbase_context *kctx, u64 vpfn, size_t nr);\n+int kbase_mmu_update_pages_no_flush(struct kbase_context *kctx, u64 vpfn,\n+\t\t\t\t\tstruct tagged_addr *phys, size_t nr,\n+\t\t\t\t\tunsigned long flags);\n int kbase_mmu_update_pages(struct kbase_context *kctx, u64 vpfn,\n \t\t\t   struct tagged_addr *phys, size_t nr,\n \t\t\t   unsigned long flags);\n@@ -864,21 +1004,98 @@ int kbasep_find_enclosing_cpu_mapping_offset(\n \t\tstruct kbase_context *kctx,\n \t\tunsigned long uaddr, size_t size, u64 *offset);\n \n+/**\n+ * kbasep_find_enclosing_gpu_mapping_start_and_offset() - Find the address of\n+ * the start of GPU virtual memory region which encloses @gpu_addr for the\n+ * @size length in bytes\n+ *\n+ * Searches for the memory region in GPU virtual memory space which contains\n+ * the region defined by the @gpu_addr and @size, where @gpu_addr is the\n+ * beginning and @size the length in bytes of the provided region. If found,\n+ * the location of the start address of the GPU virtual memory region is\n+ * passed in @start pointer and the location of the offset of the region into\n+ * the GPU virtual memory region is passed in @offset pointer.\n+ *\n+ * @kctx:\tThe kernel base context within which the memory is searched.\n+ * @gpu_addr:\tGPU virtual address for which the region is sought; defines\n+ *              the beginning of the provided region.\n+ * @size:       The length (in bytes) of the provided region for which the\n+ *              GPU virtual memory region is sought.\n+ * @start:      Pointer to the location where the address of the start of\n+ *              the found GPU virtual memory region is.\n+ * @offset:     Pointer to the location where the offset of @gpu_addr into\n+ *              the found GPU virtual memory region is.\n+ */\n+int kbasep_find_enclosing_gpu_mapping_start_and_offset(\n+\t\tstruct kbase_context *kctx,\n+\t\tu64 gpu_addr, size_t size, u64 *start, u64 *offset);\n+\n enum hrtimer_restart kbasep_as_poke_timer_callback(struct hrtimer *timer);\n void kbase_as_poking_timer_retain_atom(struct kbase_device *kbdev, struct kbase_context *kctx, struct kbase_jd_atom *katom);\n void kbase_as_poking_timer_release_atom(struct kbase_device *kbdev, struct kbase_context *kctx, struct kbase_jd_atom *katom);\n \n /**\n-* @brief Allocates physical pages.\n-*\n-* Allocates \\a nr_pages_requested and updates the alloc object.\n-*\n-* @param[in] alloc allocation object to add pages to\n-* @param[in] nr_pages_requested number of physical pages to allocate\n-*\n-* @return 0 if all pages have been successfully allocated. Error code otherwise\n-*/\n-int kbase_alloc_phy_pages_helper(struct kbase_mem_phy_alloc *alloc, size_t nr_pages_requested);\n+ * kbase_alloc_phy_pages_helper - Allocates physical pages.\n+ * @alloc:              allocation object to add pages to\n+ * @nr_pages_requested: number of physical pages to allocate\n+ *\n+ * Allocates \\a nr_pages_requested and updates the alloc object.\n+ *\n+ * Return: 0 if all pages have been successfully allocated. Error code otherwise\n+ *\n+ * Note : The caller must not hold vm_lock, as this could cause a deadlock if\n+ * the kernel OoM killer runs. If the caller must allocate pages while holding\n+ * this lock, it should use kbase_mem_pool_alloc_pages_locked() instead.\n+ */\n+int kbase_alloc_phy_pages_helper(struct kbase_mem_phy_alloc *alloc,\n+\t\tsize_t nr_pages_requested);\n+\n+/**\n+ * kbase_alloc_phy_pages_helper_locked - Allocates physical pages.\n+ * @alloc:              allocation object to add pages to\n+ * @pool:               Memory pool to allocate from\n+ * @nr_pages_requested: number of physical pages to allocate\n+ * @prealloc_sa:        Information about the partial allocation if the amount\n+ *                      of memory requested is not a multiple of 2MB.\n+ *\n+ * Allocates \\a nr_pages_requested and updates the alloc object. This function\n+ * does not allocate new pages from the kernel, and therefore will never trigger\n+ * the OoM killer. Therefore, it can be run while the vm_lock is held.\n+ *\n+ * As new pages can not be allocated, the caller must ensure there are\n+ * sufficient pages in the pool. Usage of this function should look like :\n+ *\n+ *   kbase_gpu_vm_lock(kctx);\n+ *   kbase_mem_pool_lock(pool)\n+ *   while (kbase_mem_pool_size(pool) < pages_required) {\n+ *     kbase_mem_pool_unlock(pool)\n+ *     kbase_gpu_vm_unlock(kctx);\n+ *     kbase_mem_pool_grow(pool)\n+ *     kbase_gpu_vm_lock(kctx);\n+ *     kbase_mem_pool_lock(pool)\n+ *   }\n+ *   kbase_alloc_phy_pages_helper_locked(pool)\n+ *   kbase_mem_pool_unlock(pool)\n+ *   Perform other processing that requires vm_lock...\n+ *   kbase_gpu_vm_unlock(kctx);\n+ *\n+ * This ensures that the pool can be grown to the required size and that the\n+ * allocation can complete without another thread using the newly grown pages.\n+ *\n+ * If CONFIG_MALI_2MB_ALLOC is defined and the allocation is >= 2MB, then\n+ * @pool must be alloc->imported.kctx->lp_mem_pool. Otherwise it must be\n+ * alloc->imported.kctx->mem_pool.\n+ *\n+ * @prealloc_sa shall be set to NULL if it has been consumed by this function.\n+ *\n+ * Return: Pointer to array of allocated pages. NULL on failure.\n+ *\n+ * Note : Caller must hold pool->pool_lock\n+ */\n+struct tagged_addr *kbase_alloc_phy_pages_helper_locked(\n+\t\tstruct kbase_mem_phy_alloc *alloc, struct kbase_mem_pool *pool,\n+\t\tsize_t nr_pages_requested,\n+\t\tstruct kbase_sub_alloc **prealloc_sa);\n \n /**\n * @brief Free physical pages.\n@@ -890,6 +1107,26 @@ int kbase_alloc_phy_pages_helper(struct kbase_mem_phy_alloc *alloc, size_t nr_pa\n */\n int kbase_free_phy_pages_helper(struct kbase_mem_phy_alloc *alloc, size_t nr_pages_to_free);\n \n+/**\n+ * kbase_free_phy_pages_helper_locked - Free pages allocated with\n+ *                                      kbase_alloc_phy_pages_helper_locked()\n+ * @alloc:            Allocation object to free pages from\n+ * @pool:             Memory pool to return freed pages to\n+ * @pages:            Pages allocated by kbase_alloc_phy_pages_helper_locked()\n+ * @nr_pages_to_free: Number of physical pages to free\n+ *\n+ * This function atomically frees pages allocated with\n+ * kbase_alloc_phy_pages_helper_locked(). @pages is the pointer to the page\n+ * array that is returned by that function. @pool must be the pool that the\n+ * pages were originally allocated from.\n+ *\n+ * If the mem_pool has been unlocked since the allocation then\n+ * kbase_free_phy_pages_helper() should be used instead.\n+ */\n+void kbase_free_phy_pages_helper_locked(struct kbase_mem_phy_alloc *alloc,\n+\t\tstruct kbase_mem_pool *pool, struct tagged_addr *pages,\n+\t\tsize_t nr_pages_to_free);\n+\n static inline void kbase_set_dma_addr(struct page *p, dma_addr_t dma_addr)\n {\n \tSetPagePrivate(p);\n@@ -1040,22 +1277,13 @@ void kbase_jit_term(struct kbase_context *kctx);\n  * @kctx:              kbase context.\n  * @reg:               The region to map.\n  * @locked_mm:         The mm_struct which has been locked for this operation.\n- * @kds_res_count:     The number of KDS resources.\n- * @kds_resources:     Array of KDS resources.\n- * @kds_access_bitmap: Access bitmap for KDS.\n- * @exclusive:         If the KDS resource requires exclusive access.\n  *\n  * Return: The physical allocation which backs the region on success or NULL\n  * on failure.\n  */\n struct kbase_mem_phy_alloc *kbase_map_external_resource(\n \t\tstruct kbase_context *kctx, struct kbase_va_region *reg,\n-\t\tstruct mm_struct *locked_mm\n-#ifdef CONFIG_KDS\n-\t\t, u32 *kds_res_count, struct kds_resource **kds_resources,\n-\t\tunsigned long *kds_access_bitmap, bool exclusive\n-#endif\n-\t\t);\n+\t\tstruct mm_struct *locked_mm);\n \n /**\n  * kbase_unmap_external_resource - Unmap an external resource from the GPU.\n@@ -1107,36 +1335,27 @@ bool kbase_sticky_resource_release(struct kbase_context *kctx,\n void kbase_sticky_resource_term(struct kbase_context *kctx);\n \n /**\n- * kbase_zone_cache_update - Update the memory zone cache after new pages have\n- * been added.\n- * @alloc:        The physical memory allocation to build the cache for.\n- * @start_offset: Offset to where the new pages start.\n- *\n- * Updates an existing memory zone cache, updating the counters for the\n- * various zones.\n- * If the memory allocation doesn't already have a zone cache assume that\n- * one isn't created and thus don't do anything.\n- *\n- * Return: Zero cache was updated, negative error code on error.\n+ * kbase_mem_pool_lock - Lock a memory pool\n+ * @pool: Memory pool to lock\n  */\n-int kbase_zone_cache_update(struct kbase_mem_phy_alloc *alloc,\n-\t\tsize_t start_offset);\n+static inline void kbase_mem_pool_lock(struct kbase_mem_pool *pool)\n+{\n+\tspin_lock(&pool->pool_lock);\n+}\n \n /**\n- * kbase_zone_cache_build - Build the memory zone cache.\n- * @alloc:        The physical memory allocation to build the cache for.\n- *\n- * Create a new zone cache for the provided physical memory allocation if\n- * one doesn't already exist, if one does exist then just return.\n- *\n- * Return: Zero if the zone cache was created, negative error code on error.\n+ * kbase_mem_pool_lock - Release a memory pool\n+ * @pool: Memory pool to lock\n  */\n-int kbase_zone_cache_build(struct kbase_mem_phy_alloc *alloc);\n+static inline void kbase_mem_pool_unlock(struct kbase_mem_pool *pool)\n+{\n+\tspin_unlock(&pool->pool_lock);\n+}\n \n /**\n- * kbase_zone_cache_clear - Clear the memory zone cache.\n- * @alloc:        The physical memory allocation to clear the cache on.\n+ * kbase_mem_evictable_mark_reclaim - Mark the pages as reclaimable.\n+ * @alloc: The physical allocation\n  */\n-void kbase_zone_cache_clear(struct kbase_mem_phy_alloc *alloc);\n+void kbase_mem_evictable_mark_reclaim(struct kbase_mem_phy_alloc *alloc);\n \n #endif\t\t\t\t/* _KBASE_MEM_H_ */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_linux.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_linux.c\nindex c88ac64e1681d5..701def88352b0d 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_linux.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_linux.c\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_mem_linux.c\n  * Base kernel memory APIs, Linux implementation.\n@@ -44,48 +49,15 @@\n #include <mali_kbase_mem_linux.h>\n #include <mali_kbase_config_defaults.h>\n #include <mali_kbase_tlstream.h>\n+#include <mali_kbase_ioctl.h>\n \n static int kbase_tracking_page_setup(struct kbase_context *kctx, struct vm_area_struct *vma);\n \n-/**\n- * kbase_mem_shrink_cpu_mapping - Shrink the CPU mapping(s) of an allocation\n- * @kctx:      Context the region belongs to\n- * @reg:       The GPU region\n- * @new_pages: The number of pages after the shrink\n- * @old_pages: The number of pages before the shrink\n- *\n- * Shrink (or completely remove) all CPU mappings which reference the shrunk\n- * part of the allocation.\n- *\n- * Note: Caller must be holding the processes mmap_sem lock.\n- */\n-static void kbase_mem_shrink_cpu_mapping(struct kbase_context *kctx,\n-\t\tstruct kbase_va_region *reg,\n-\t\tu64 new_pages, u64 old_pages);\n-\n-/**\n- * kbase_mem_shrink_gpu_mapping - Shrink the GPU mapping of an allocation\n- * @kctx:      Context the region belongs to\n- * @reg:       The GPU region or NULL if there isn't one\n- * @new_pages: The number of pages after the shrink\n- * @old_pages: The number of pages before the shrink\n- *\n- * Return: 0 on success, negative -errno on error\n- *\n- * Unmap the shrunk pages from the GPU mapping. Note that the size of the region\n- * itself is unmodified as we still need to reserve the VA, only the page tables\n- * will be modified by this function.\n- */\n-static int kbase_mem_shrink_gpu_mapping(struct kbase_context *kctx,\n-\t\tstruct kbase_va_region *reg,\n-\t\tu64 new_pages, u64 old_pages);\n-\n struct kbase_va_region *kbase_mem_alloc(struct kbase_context *kctx,\n \t\tu64 va_pages, u64 commit_pages, u64 extent, u64 *flags,\n \t\tu64 *gpu_va)\n {\n \tint zone;\n-\tint gpu_pc_bits;\n \tstruct kbase_va_region *reg;\n \tstruct device *dev;\n \n@@ -96,17 +68,6 @@ struct kbase_va_region *kbase_mem_alloc(struct kbase_context *kctx,\n \tdev = kctx->kbdev->dev;\n \t*gpu_va = 0; /* return 0 on failure */\n \n-\tgpu_pc_bits = kctx->kbdev->gpu_props.props.core_props.log2_program_counter_size;\n-\n-\tif (0 == va_pages) {\n-\t\tdev_warn(dev, \"kbase_mem_alloc called with 0 va_pages!\");\n-\t\tgoto bad_size;\n-\t}\n-\n-\tif (va_pages > (U64_MAX / PAGE_SIZE))\n-\t\t/* 64-bit address range is the max */\n-\t\tgoto bad_size;\n-\n \tif (!kbase_check_alloc_flags(*flags)) {\n \t\tdev_warn(dev,\n \t\t\t\t\"kbase_mem_alloc called with bad flags (%llx)\",\n@@ -125,10 +86,8 @@ struct kbase_va_region *kbase_mem_alloc(struct kbase_context *kctx,\n \t\t*flags &= ~BASE_MEM_COHERENT_SYSTEM;\n \t}\n \n-\t/* Limit GPU executable allocs to GPU PC size */\n-\tif ((*flags & BASE_MEM_PROT_GPU_EX) &&\n-\t    (va_pages > (1ULL << gpu_pc_bits >> PAGE_SHIFT)))\n-\t\tgoto bad_ex_size;\n+\tif (kbase_check_alloc_sizes(kctx, *flags, va_pages, commit_pages, extent))\n+\t\tgoto bad_sizes;\n \n \t/* find out which VA zone to use */\n \tif (*flags & BASE_MEM_SAME_VA)\n@@ -152,10 +111,13 @@ struct kbase_va_region *kbase_mem_alloc(struct kbase_context *kctx,\n \t\tgoto prepare_failed;\n \t}\n \n-\tif (*flags & BASE_MEM_GROW_ON_GPF)\n+\tif (*flags & (BASE_MEM_GROW_ON_GPF|BASE_MEM_TILER_ALIGN_TOP)) {\n+\t\t/* kbase_check_alloc_sizes() already checks extent is valid for\n+\t\t * assigning to reg->extent */\n \t\treg->extent = extent;\n-\telse\n+\t} else {\n \t\treg->extent = 0;\n+\t}\n \n \tif (kbase_alloc_phy_pages(reg, va_pages, commit_pages) != 0) {\n \t\tdev_warn(dev, \"Failed to allocate %lld pages (va_pages=%lld)\",\n@@ -163,6 +125,7 @@ struct kbase_va_region *kbase_mem_alloc(struct kbase_context *kctx,\n \t\t\t\t(unsigned long long)va_pages);\n \t\tgoto no_mem;\n \t}\n+\treg->initial_commit = commit_pages;\n \n \tkbase_gpu_vm_lock(kctx);\n \n@@ -241,14 +204,14 @@ struct kbase_va_region *kbase_mem_alloc(struct kbase_context *kctx,\n prepare_failed:\n \tkfree(reg);\n no_region:\n-bad_ex_size:\n+bad_sizes:\n bad_flags:\n-bad_size:\n \treturn NULL;\n }\n KBASE_EXPORT_TEST_API(kbase_mem_alloc);\n \n-int kbase_mem_query(struct kbase_context *kctx, u64 gpu_addr, int query, u64 * const out)\n+int kbase_mem_query(struct kbase_context *kctx,\n+\t\tu64 gpu_addr, u64 query, u64 * const out)\n {\n \tstruct kbase_va_region *reg;\n \tint ret = -EINVAL;\n@@ -303,6 +266,23 @@ int kbase_mem_query(struct kbase_context *kctx, u64 gpu_addr, int query, u64 * c\n \t\t\t*out |= BASE_MEM_COHERENT_SYSTEM;\n \t\tif (KBASE_REG_SHARE_IN & reg->flags)\n \t\t\t*out |= BASE_MEM_COHERENT_LOCAL;\n+\t\tif (kctx->api_version >= KBASE_API_VERSION(11, 2)) {\n+\t\t\t/* Prior to 11.2, these were known about by user-side\n+\t\t\t * but we did not return them. Returning some of these\n+\t\t\t * caused certain clients that were not expecting them\n+\t\t\t * to fail, so we omit all of them as a special-case\n+\t\t\t * for compatibility reasons */\n+\t\t\tif (KBASE_REG_PF_GROW & reg->flags)\n+\t\t\t\t*out |= BASE_MEM_GROW_ON_GPF;\n+\t\t\tif (KBASE_REG_SECURE & reg->flags)\n+\t\t\t\t*out |= BASE_MEM_SECURE;\n+\t\t}\n+\t\tif (KBASE_REG_TILER_ALIGN_TOP & reg->flags)\n+\t\t\t*out |= BASE_MEM_TILER_ALIGN_TOP;\n+\n+\t\tWARN(*out & ~BASE_MEM_FLAGS_QUERYABLE,\n+\t\t\t\t\"BASE_MEM_FLAGS_QUERYABLE needs updating\\n\");\n+\t\t*out &= BASE_MEM_FLAGS_QUERYABLE;\n \t\tbreak;\n \t}\n \tdefault:\n@@ -455,133 +435,14 @@ void kbase_mem_evictable_deinit(struct kbase_context *kctx)\n \tunregister_shrinker(&kctx->reclaim);\n }\n \n-struct kbase_mem_zone_cache_entry {\n-\t/* List head used to link the cache entry to the memory allocation. */\n-\tstruct list_head zone_node;\n-\t/* The zone the cacheline is for. */\n-\tstruct zone *zone;\n-\t/* The number of pages in the allocation which belong to this zone. */\n-\tu64 count;\n-};\n-\n-static bool kbase_zone_cache_builder(struct kbase_mem_phy_alloc *alloc,\n-\t\tsize_t start_offset)\n-{\n-\tstruct kbase_mem_zone_cache_entry *cache = NULL;\n-\tsize_t i;\n-\tint ret = 0;\n-\n-\tfor (i = start_offset; i < alloc->nents; i++) {\n-\t\tstruct page *p = phys_to_page(as_phys_addr_t(alloc->pages[i]));\n-\t\tstruct zone *zone = page_zone(p);\n-\t\tbool create = true;\n-\n-\t\tif (cache && (cache->zone == zone)) {\n-\t\t\t/*\n-\t\t\t * Fast path check as most of the time adjacent\n-\t\t\t * pages come from the same zone.\n-\t\t\t */\n-\t\t\tcreate = false;\n-\t\t} else {\n-\t\t\t/*\n-\t\t\t * Slow path check, walk all the cache entries to see\n-\t\t\t * if we already know about this zone.\n-\t\t\t */\n-\t\t\tlist_for_each_entry(cache, &alloc->zone_cache, zone_node) {\n-\t\t\t\tif (cache->zone == zone) {\n-\t\t\t\t\tcreate = false;\n-\t\t\t\t\tbreak;\n-\t\t\t\t}\n-\t\t\t}\n-\t\t}\n-\n-\t\t/* This zone wasn't found in the cache, create an entry for it */\n-\t\tif (create) {\n-\t\t\tcache = kmalloc(sizeof(*cache), GFP_KERNEL);\n-\t\t\tif (!cache) {\n-\t\t\t\tret = -ENOMEM;\n-\t\t\t\tgoto bail;\n-\t\t\t}\n-\t\t\tcache->zone = zone;\n-\t\t\tcache->count = 0;\n-\t\t\tlist_add(&cache->zone_node, &alloc->zone_cache);\n-\t\t}\n-\n-\t\tcache->count++;\n-\t}\n-\treturn 0;\n-\n-bail:\n-\treturn ret;\n-}\n-\n-int kbase_zone_cache_update(struct kbase_mem_phy_alloc *alloc,\n-\t\tsize_t start_offset)\n-{\n-\t/*\n-\t * Bail if the zone cache is empty, only update the cache if it\n-\t * existed in the first place.\n-\t */\n-\tif (list_empty(&alloc->zone_cache))\n-\t\treturn 0;\n-\n-\treturn kbase_zone_cache_builder(alloc, start_offset);\n-}\n-\n-int kbase_zone_cache_build(struct kbase_mem_phy_alloc *alloc)\n-{\n-\t/* Bail if the zone cache already exists */\n-\tif (!list_empty(&alloc->zone_cache))\n-\t\treturn 0;\n-\n-\treturn kbase_zone_cache_builder(alloc, 0);\n-}\n-\n-void kbase_zone_cache_clear(struct kbase_mem_phy_alloc *alloc)\n-{\n-\tstruct kbase_mem_zone_cache_entry *walker;\n-\n-\twhile(!list_empty(&alloc->zone_cache)){\n-\t\twalker = list_first_entry(&alloc->zone_cache,\n-\t\t\t\tstruct kbase_mem_zone_cache_entry, zone_node);\n-\t\tlist_del(&walker->zone_node);\n-\t\tkfree(walker);\n-\t}\n-}\n-\n /**\n  * kbase_mem_evictable_mark_reclaim - Mark the pages as reclaimable.\n  * @alloc: The physical allocation\n  */\n-static void kbase_mem_evictable_mark_reclaim(struct kbase_mem_phy_alloc *alloc)\n+void kbase_mem_evictable_mark_reclaim(struct kbase_mem_phy_alloc *alloc)\n {\n \tstruct kbase_context *kctx = alloc->imported.kctx;\n-\tstruct kbase_mem_zone_cache_entry *zone_cache;\n \tint __maybe_unused new_page_count;\n-\tint err;\n-\n-\t/* Attempt to build a zone cache of tracking */\n-\terr = kbase_zone_cache_build(alloc);\n-\tif (err == 0) {\n-\t\t/* Bulk update all the zones */\n-\t\tlist_for_each_entry(zone_cache, &alloc->zone_cache, zone_node) {\n-\t\t\tzone_page_state_add(zone_cache->count,\n-\t\t\t\t\tzone_cache->zone, NR_SLAB_RECLAIMABLE);\n-\t\t}\n-\t} else {\n-\t\t/* Fall-back to page by page updates */\n-\t\tint i;\n-\n-\t\tfor (i = 0; i < alloc->nents; i++) {\n-\t\t\tstruct page *p;\n-\t\t\tstruct zone *zone;\n-\n-\t\t\tp = phys_to_page(as_phys_addr_t(alloc->pages[i]));\n-\t\t\tzone = page_zone(p);\n-\n-\t\t\tzone_page_state_add(1, zone, NR_SLAB_RECLAIMABLE);\n-\t\t}\n-\t}\n \n \tkbase_process_page_usage_dec(kctx, alloc->nents);\n \tnew_page_count = kbase_atomic_sub_pages(alloc->nents,\n@@ -601,9 +462,7 @@ static\n void kbase_mem_evictable_unmark_reclaim(struct kbase_mem_phy_alloc *alloc)\n {\n \tstruct kbase_context *kctx = alloc->imported.kctx;\n-\tstruct kbase_mem_zone_cache_entry *zone_cache;\n \tint __maybe_unused new_page_count;\n-\tint err;\n \n \tnew_page_count = kbase_atomic_add_pages(alloc->nents,\n \t\t\t\t\t\t&kctx->used_pages);\n@@ -611,31 +470,9 @@ void kbase_mem_evictable_unmark_reclaim(struct kbase_mem_phy_alloc *alloc)\n \n \t/* Increase mm counters so that the allocation is accounted for\n \t * against the process and thus is visible to the OOM killer,\n-\t * then remove it from the reclaimable accounting. */\n+\t */\n \tkbase_process_page_usage_inc(kctx, alloc->nents);\n \n-\t/* Attempt to build a zone cache of tracking */\n-\terr = kbase_zone_cache_build(alloc);\n-\tif (err == 0) {\n-\t\t/* Bulk update all the zones */\n-\t\tlist_for_each_entry(zone_cache, &alloc->zone_cache, zone_node) {\n-\t\t\tzone_page_state_add(-zone_cache->count,\n-\t\t\t\t\tzone_cache->zone, NR_SLAB_RECLAIMABLE);\n-\t\t}\n-\t} else {\n-\t\t/* Fall-back to page by page updates */\n-\t\tint i;\n-\n-\t\tfor (i = 0; i < alloc->nents; i++) {\n-\t\t\tstruct page *p;\n-\t\t\tstruct zone *zone;\n-\n-\t\t\tp = phys_to_page(as_phys_addr_t(alloc->pages[i]));\n-\t\t\tzone = page_zone(p);\n-\t\t\tzone_page_state_add(-1, zone, NR_SLAB_RECLAIMABLE);\n-\t\t}\n-\t}\n-\n \tKBASE_TLSTREAM_AUX_PAGESALLOC(\n \t\t\tkctx->id,\n \t\t\t(u64)new_page_count);\n@@ -647,17 +484,17 @@ int kbase_mem_evictable_make(struct kbase_mem_phy_alloc *gpu_alloc)\n \n \tlockdep_assert_held(&kctx->reg_lock);\n \n-\t/* This alloction can't already be on a list. */\n-\tWARN_ON(!list_empty(&gpu_alloc->evict_node));\n-\n \tkbase_mem_shrink_cpu_mapping(kctx, gpu_alloc->reg,\n \t\t\t0, gpu_alloc->nents);\n \n+\tmutex_lock(&kctx->jit_evict_lock);\n+\t/* This allocation can't already be on a list. */\n+\tWARN_ON(!list_empty(&gpu_alloc->evict_node));\n+\n \t/*\n \t * Add the allocation to the eviction list, after this point the shrink\n \t * can reclaim it.\n \t */\n-\tmutex_lock(&kctx->jit_evict_lock);\n \tlist_add(&gpu_alloc->evict_node, &kctx->evict_list);\n \tmutex_unlock(&kctx->jit_evict_lock);\n \tkbase_mem_evictable_mark_reclaim(gpu_alloc);\n@@ -673,11 +510,13 @@ bool kbase_mem_evictable_unmake(struct kbase_mem_phy_alloc *gpu_alloc)\n \n \tlockdep_assert_held(&kctx->reg_lock);\n \n+\tmutex_lock(&kctx->jit_evict_lock);\n \t/*\n \t * First remove the allocation from the eviction list as it's no\n \t * longer eligible for eviction.\n \t */\n \tlist_del_init(&gpu_alloc->evict_node);\n+\tmutex_unlock(&kctx->jit_evict_lock);\n \n \tif (gpu_alloc->evicted == 0) {\n \t\t/*\n@@ -777,8 +616,7 @@ int kbase_mem_flags_change(struct kbase_context *kctx, u64 gpu_addr, unsigned in\n \t}\n \n \t/* limit to imported memory */\n-\tif ((reg->gpu_alloc->type != KBASE_MEM_TYPE_IMPORTED_UMP) &&\n-\t     (reg->gpu_alloc->type != KBASE_MEM_TYPE_IMPORTED_UMM))\n+\tif (reg->gpu_alloc->type != KBASE_MEM_TYPE_IMPORTED_UMM)\n \t\tgoto out_unlock;\n \n \t/* no change? */\n@@ -793,28 +631,17 @@ int kbase_mem_flags_change(struct kbase_context *kctx, u64 gpu_addr, unsigned in\n \treg->flags |= real_flags;\n \n \t/* Currently supporting only imported memory */\n-\tswitch (reg->gpu_alloc->type) {\n-#ifdef CONFIG_UMP\n-\tcase KBASE_MEM_TYPE_IMPORTED_UMP:\n-\t\tret = kbase_mmu_update_pages(kctx, reg->start_pfn,\n-\t\t\t\t\t     kbase_get_gpu_phy_pages(reg),\n-\t\t\t\t             reg->gpu_alloc->nents, reg->flags);\n-\t\tbreak;\n-#endif\n #ifdef CONFIG_DMA_SHARED_BUFFER\n-\tcase KBASE_MEM_TYPE_IMPORTED_UMM:\n+\tif (reg->gpu_alloc->type == KBASE_MEM_TYPE_IMPORTED_UMM) {\n \t\t/* Future use will use the new flags, existing mapping will NOT be updated\n \t\t * as memory should not be in use by the GPU when updating the flags.\n \t\t */\n \t\tret = 0;\n \t\tWARN_ON(reg->gpu_alloc->imported.umm.current_mapping_usage_count);\n-\t\tbreak;\n-#endif\n-\tdefault:\n-\t\tbreak;\n \t}\n+#endif /* CONFIG_DMA_SHARED_BUFFER */\n \n-\t/* roll back on error, i.e. not UMP */\n+\t/* roll back on error */\n \tif (ret)\n \t\treg->flags = prev_flags;\n \n@@ -827,128 +654,6 @@ int kbase_mem_flags_change(struct kbase_context *kctx, u64 gpu_addr, unsigned in\n \n #define KBASE_MEM_IMPORT_HAVE_PAGES (1UL << BASE_MEM_FLAGS_NR_BITS)\n \n-#ifdef CONFIG_UMP\n-static struct kbase_va_region *kbase_mem_from_ump(struct kbase_context *kctx, ump_secure_id id, u64 *va_pages, u64 *flags)\n-{\n-\tstruct kbase_va_region *reg;\n-\tump_dd_handle umph;\n-\tu64 block_count;\n-\tconst ump_dd_physical_block_64 *block_array;\n-\tu64 i, j;\n-\tint page = 0;\n-\tump_alloc_flags ump_flags;\n-\tump_alloc_flags cpu_flags;\n-\tump_alloc_flags gpu_flags;\n-\n-\tif (*flags & BASE_MEM_SECURE)\n-\t\tgoto bad_flags;\n-\n-\tumph = ump_dd_from_secure_id(id);\n-\tif (UMP_DD_INVALID_MEMORY_HANDLE == umph)\n-\t\tgoto bad_id;\n-\n-\tump_flags = ump_dd_allocation_flags_get(umph);\n-\tcpu_flags = (ump_flags >> UMP_DEVICE_CPU_SHIFT) & UMP_DEVICE_MASK;\n-\tgpu_flags = (ump_flags >> DEFAULT_UMP_GPU_DEVICE_SHIFT) &\n-\t\t\tUMP_DEVICE_MASK;\n-\n-\t*va_pages = ump_dd_size_get_64(umph);\n-\t*va_pages >>= PAGE_SHIFT;\n-\n-\tif (!*va_pages)\n-\t\tgoto bad_size;\n-\n-\tif (*va_pages > (U64_MAX / PAGE_SIZE))\n-\t\t/* 64-bit address range is the max */\n-\t\tgoto bad_size;\n-\n-\tif (*flags & BASE_MEM_SAME_VA)\n-\t\treg = kbase_alloc_free_region(kctx, 0, *va_pages, KBASE_REG_ZONE_SAME_VA);\n-\telse\n-\t\treg = kbase_alloc_free_region(kctx, 0, *va_pages, KBASE_REG_ZONE_CUSTOM_VA);\n-\n-\tif (!reg)\n-\t\tgoto no_region;\n-\n-\t/* we've got pages to map now, and support SAME_VA */\n-\t*flags |= KBASE_MEM_IMPORT_HAVE_PAGES;\n-\n-\treg->gpu_alloc = kbase_alloc_create(*va_pages, KBASE_MEM_TYPE_IMPORTED_UMP);\n-\tif (IS_ERR_OR_NULL(reg->gpu_alloc))\n-\t\tgoto no_alloc_obj;\n-\n-\treg->cpu_alloc = kbase_mem_phy_alloc_get(reg->gpu_alloc);\n-\n-\treg->gpu_alloc->imported.ump_handle = umph;\n-\n-\treg->flags &= ~KBASE_REG_FREE;\n-\treg->flags |= KBASE_REG_GPU_NX;\t/* UMP is always No eXecute */\n-\treg->flags &= ~KBASE_REG_GROWABLE;\t/* UMP cannot be grown */\n-\n-\t/* Override import flags based on UMP flags */\n-\t*flags &= ~(BASE_MEM_CACHED_CPU);\n-\t*flags &= ~(BASE_MEM_PROT_CPU_RD | BASE_MEM_PROT_CPU_WR);\n-\t*flags &= ~(BASE_MEM_PROT_GPU_RD | BASE_MEM_PROT_GPU_WR);\n-\n-\tif ((cpu_flags & (UMP_HINT_DEVICE_RD | UMP_HINT_DEVICE_WR)) ==\n-\t    (UMP_HINT_DEVICE_RD | UMP_HINT_DEVICE_WR)) {\n-\t\treg->flags |= KBASE_REG_CPU_CACHED;\n-\t\t*flags |= BASE_MEM_CACHED_CPU;\n-\t}\n-\n-\tif (cpu_flags & UMP_PROT_CPU_WR) {\n-\t\treg->flags |= KBASE_REG_CPU_WR;\n-\t\t*flags |= BASE_MEM_PROT_CPU_WR;\n-\t}\n-\n-\tif (cpu_flags & UMP_PROT_CPU_RD) {\n-\t\treg->flags |= KBASE_REG_CPU_RD;\n-\t\t*flags |= BASE_MEM_PROT_CPU_RD;\n-\t}\n-\n-\tif ((gpu_flags & (UMP_HINT_DEVICE_RD | UMP_HINT_DEVICE_WR)) ==\n-\t    (UMP_HINT_DEVICE_RD | UMP_HINT_DEVICE_WR))\n-\t\treg->flags |= KBASE_REG_GPU_CACHED;\n-\n-\tif (gpu_flags & UMP_PROT_DEVICE_WR) {\n-\t\treg->flags |= KBASE_REG_GPU_WR;\n-\t\t*flags |= BASE_MEM_PROT_GPU_WR;\n-\t}\n-\n-\tif (gpu_flags & UMP_PROT_DEVICE_RD) {\n-\t\treg->flags |= KBASE_REG_GPU_RD;\n-\t\t*flags |= BASE_MEM_PROT_GPU_RD;\n-\t}\n-\n-\t/* ump phys block query */\n-\tump_dd_phys_blocks_get_64(umph, &block_count, &block_array);\n-\n-\tfor (i = 0; i < block_count; i++) {\n-\t\tfor (j = 0; j < (block_array[i].size >> PAGE_SHIFT); j++) {\n-\t\t\tstruct tagged_addr tagged;\n-\n-\t\t\ttagged = as_tagged(block_array[i].addr +\n-\t\t\t\t\t   (j << PAGE_SHIFT));\n-\t\t\treg->gpu_alloc->pages[page] = tagged;\n-\t\t\tpage++;\n-\t\t}\n-\t}\n-\treg->gpu_alloc->nents = *va_pages;\n-\treg->extent = 0;\n-\n-\treturn reg;\n-\n-no_alloc_obj:\n-\tkfree(reg);\n-no_region:\n-bad_size:\n-\tump_dd_release(umph);\n-bad_id:\n-bad_flags:\n-\treturn NULL;\n-}\n-#endif\t\t\t\t/* CONFIG_UMP */\n-\n #ifdef CONFIG_DMA_SHARED_BUFFER\n static struct kbase_va_region *kbase_mem_from_umm(struct kbase_context *kctx,\n \t\tint fd, u64 *va_pages, u64 *flags, u32 padding)\n@@ -1034,6 +739,7 @@ static struct kbase_va_region *kbase_mem_from_umm(struct kbase_context *kctx,\n \n invalid_flags:\n \tkbase_mem_phy_alloc_put(reg->gpu_alloc);\n+\tkbase_mem_phy_alloc_put(reg->cpu_alloc);\n no_alloc_obj:\n \tkfree(reg);\n no_region:\n@@ -1141,6 +847,11 @@ static struct kbase_va_region *kbase_mem_from_user_buffer(\n \tuser_buf->address = address;\n \tuser_buf->nr_pages = *va_pages;\n \tuser_buf->mm = current->mm;\n+#if KERNEL_VERSION(4, 11, 0) > LINUX_VERSION_CODE\n+\tatomic_inc(&current->mm->mm_count);\n+#else\n+\tmmgrab(current->mm);\n+#endif\n \tuser_buf->pages = kmalloc_array(*va_pages, sizeof(struct page *),\n \t\t\tGFP_KERNEL);\n \n@@ -1182,8 +893,6 @@ static struct kbase_va_region *kbase_mem_from_user_buffer(\n \tif (faulted_pages != *va_pages)\n \t\tgoto fault_mismatch;\n \n-\tatomic_inc(&current->mm->mm_count);\n-\n \treg->gpu_alloc->nents = 0;\n \treg->extent = 0;\n \n@@ -1230,7 +939,6 @@ static struct kbase_va_region *kbase_mem_from_user_buffer(\n \t\tfor (i = 0; i < faulted_pages; i++)\n \t\t\tput_page(pages[i]);\n \t}\n-\tkfree(user_buf->pages);\n no_page_array:\n invalid_flags:\n \tkbase_mem_phy_alloc_put(reg->cpu_alloc);\n@@ -1444,10 +1152,9 @@ int kbase_mem_import(struct kbase_context *kctx, enum base_mem_import_type type,\n \tKBASE_DEBUG_ASSERT(va_pages);\n \tKBASE_DEBUG_ASSERT(flags);\n \n-#ifdef CONFIG_64BIT\n-\tif (!kbase_ctx_flag(kctx, KCTX_COMPAT))\n+\tif ((!kbase_ctx_flag(kctx, KCTX_COMPAT)) &&\n+\t\t\tkbase_ctx_flag(kctx, KCTX_FORCE_SAME_VA))\n \t\t*flags |= BASE_MEM_SAME_VA;\n-#endif\n \n \tif (!kbase_check_import_flags(*flags)) {\n \t\tdev_warn(kctx->kbdev->dev,\n@@ -1475,17 +1182,6 @@ int kbase_mem_import(struct kbase_context *kctx, enum base_mem_import_type type,\n \t}\n \n \tswitch (type) {\n-#ifdef CONFIG_UMP\n-\tcase BASE_MEM_IMPORT_TYPE_UMP: {\n-\t\tump_secure_id id;\n-\n-\t\tif (get_user(id, (ump_secure_id __user *)phandle))\n-\t\t\treg = NULL;\n-\t\telse\n-\t\t\treg = kbase_mem_from_ump(kctx, id, va_pages, flags);\n-\t}\n-\tbreak;\n-#endif /* CONFIG_UMP */\n #ifdef CONFIG_DMA_SHARED_BUFFER\n \tcase BASE_MEM_IMPORT_TYPE_UMM: {\n \t\tint fd;\n@@ -1598,7 +1294,7 @@ int kbase_mem_grow_gpu_mapping(struct kbase_context *kctx,\n \treturn ret;\n }\n \n-static void kbase_mem_shrink_cpu_mapping(struct kbase_context *kctx,\n+void kbase_mem_shrink_cpu_mapping(struct kbase_context *kctx,\n \t\tstruct kbase_va_region *reg,\n \t\tu64 new_pages, u64 old_pages)\n {\n@@ -1613,7 +1309,7 @@ static void kbase_mem_shrink_cpu_mapping(struct kbase_context *kctx,\n \t\t\t(old_pages - new_pages)<<PAGE_SHIFT, 1);\n }\n \n-static int kbase_mem_shrink_gpu_mapping(struct kbase_context *kctx,\n+int kbase_mem_shrink_gpu_mapping(struct kbase_context *kctx,\n \t\tstruct kbase_va_region *reg,\n \t\tu64 new_pages, u64 old_pages)\n {\n@@ -2186,8 +1882,10 @@ int kbase_mmap(struct file *file, struct vm_area_struct *vma)\n \n \tdev_dbg(dev, \"kbase_mmap\\n\");\n \n-\t/* strip away corresponding VM_MAY% flags to the VM_% flags requested */\n-\tvma->vm_flags &= ~((vma->vm_flags & (VM_READ | VM_WRITE)) << 4);\n+\tif (!(vma->vm_flags & VM_READ))\n+\t\tvma->vm_flags &= ~VM_MAYREAD;\n+\tif (!(vma->vm_flags & VM_WRITE))\n+\t\tvma->vm_flags &= ~VM_MAYWRITE;\n \n \tif (0 == nr_pages) {\n \t\terr = -EINVAL;\n@@ -2263,9 +1961,9 @@ int kbase_mmap(struct file *file, struct vm_area_struct *vma)\n \t\t\t}\n \n \t\t\tif ((vma->vm_flags & VM_READ &&\n-\t\t\t     !(reg->flags & KBASE_REG_CPU_RD)) ||\n-\t\t\t    (vma->vm_flags & VM_WRITE &&\n-\t\t\t     !(reg->flags & KBASE_REG_CPU_WR))) {\n+\t\t\t\t\t!(reg->flags & KBASE_REG_CPU_RD)) ||\n+\t\t\t\t\t(vma->vm_flags & VM_WRITE &&\n+\t\t\t\t\t!(reg->flags & KBASE_REG_CPU_WR))) {\n \t\t\t\t/* VM flags inconsistent with region flags */\n \t\t\t\terr = -EPERM;\n \t\t\t\tdev_err(dev, \"%s:%d inconsistent VM flags\\n\",\n@@ -2276,6 +1974,12 @@ int kbase_mmap(struct file *file, struct vm_area_struct *vma)\n #ifdef CONFIG_DMA_SHARED_BUFFER\n \t\t\tif (KBASE_MEM_TYPE_IMPORTED_UMM ==\n \t\t\t\t\t\t\treg->cpu_alloc->type) {\n+\t\t\t\tif (0 != (vma->vm_pgoff - reg->start_pfn)) {\n+\t\t\t\t\terr = -EINVAL;\n+\t\t\t\t\tdev_warn(dev, \"%s:%d attempt to do a partial map in a dma_buf: non-zero offset to dma_buf mapping!\\n\",\n+\t\t\t\t\t\t__FILE__, __LINE__);\n+\t\t\t\t\tgoto out_unlock;\n+\t\t\t\t}\n \t\t\t\terr = dma_buf_mmap(\n \t\t\t\t\treg->cpu_alloc->imported.umm.dma_buf,\n \t\t\t\t\tvma, vma->vm_pgoff - reg->start_pfn);\n@@ -2612,7 +2316,7 @@ void *kbase_va_alloc(struct kbase_context *kctx, u32 size, struct kbase_hwc_dma_\n \tpage_array = kbase_get_cpu_phy_pages(reg);\n \n \tfor (i = 0; i < pages; i++)\n-\t\tpage_array[i] = as_tagged(dma_pa + (i << PAGE_SHIFT));\n+\t\tpage_array[i] = as_tagged(dma_pa + ((dma_addr_t)i << PAGE_SHIFT));\n \n \treg->cpu_alloc->nents = pages;\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_linux.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_linux.h\nindex db35f62a7431fc..a14826ebc772e0 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_linux.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_linux.h\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2010, 2012-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010, 2012-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_mem_linux.h\n  * Base kernel memory APIs, Linux implementation.\n@@ -32,14 +37,84 @@ struct kbase_hwc_dma_mapping {\n \tsize_t      size;\n };\n \n+/**\n+ * kbase_mem_alloc - Create a new allocation for GPU\n+ *\n+ * @kctx:         The kernel context\n+ * @va_pages:     The number of pages of virtual address space to reserve\n+ * @commit_pages: The number of physical pages to allocate upfront\n+ * @extent:       The number of extra pages to allocate on each GPU fault which\n+ *                grows the region.\n+ * @flags:        bitmask of BASE_MEM_* flags to convey special requirements &\n+ *                properties for the new allocation.\n+ * @gpu_va:       Start address of the memory region which was allocated from GPU\n+ *                virtual address space.\n+ *\n+ * Return: 0 on success or error code\n+ */\n struct kbase_va_region *kbase_mem_alloc(struct kbase_context *kctx,\n \t\tu64 va_pages, u64 commit_pages, u64 extent, u64 *flags,\n \t\tu64 *gpu_va);\n-int kbase_mem_query(struct kbase_context *kctx, u64 gpu_addr, int query, u64 *const pages);\n+\n+/**\n+ * kbase_mem_query - Query properties of a GPU memory region\n+ *\n+ * @kctx:     The kernel context\n+ * @gpu_addr: A GPU address contained within the memory region\n+ * @query:    The type of query, from KBASE_MEM_QUERY_* flags, which could be\n+ *            regarding the amount of backing physical memory allocated so far\n+ *            for the region or the size of the region or the flags associated\n+ *            with the region.\n+ * @out:      Pointer to the location to store the result of query.\n+ *\n+ * Return: 0 on success or error code\n+ */\n+int kbase_mem_query(struct kbase_context *kctx, u64 gpu_addr, u64 query,\n+\t\tu64 *const out);\n+\n+/**\n+ * kbase_mem_import - Import the external memory for use by the GPU\n+ *\n+ * @kctx:     The kernel context\n+ * @type:     Type of external memory\n+ * @phandle:  Handle to the external memory interpreted as per the type.\n+ * @padding:  Amount of extra VA pages to append to the imported buffer\n+ * @gpu_va:   GPU address assigned to the imported external memory\n+ * @va_pages: Size of the memory region reserved from the GPU address space\n+ * @flags:    bitmask of BASE_MEM_* flags to convey special requirements &\n+ *            properties for the new allocation representing the external\n+ *            memory.\n+ * Return: 0 on success or error code\n+ */\n int kbase_mem_import(struct kbase_context *kctx, enum base_mem_import_type type,\n \t\tvoid __user *phandle, u32 padding, u64 *gpu_va, u64 *va_pages,\n \t\tu64 *flags);\n+\n+/**\n+ * kbase_mem_alias - Create a new allocation for GPU, aliasing one or more\n+ *                   memory regions\n+ *\n+ * @kctx:      The kernel context\n+ * @flags:     bitmask of BASE_MEM_* flags.\n+ * @stride:    Bytes between start of each memory region\n+ * @nents:     The number of regions to pack together into the alias\n+ * @ai:        Pointer to the struct containing the memory aliasing info\n+ * @num_pages: Number of pages the alias will cover\n+ *\n+ * Return: 0 on failure or otherwise the GPU VA for the alias\n+ */\n u64 kbase_mem_alias(struct kbase_context *kctx, u64 *flags, u64 stride, u64 nents, struct base_mem_aliasing_info *ai, u64 *num_pages);\n+\n+/**\n+ * kbase_mem_flags_change - Change the flags for a memory region\n+ *\n+ * @kctx:     The kernel context\n+ * @gpu_addr: A GPU address contained within the memory region to modify.\n+ * @flags:    The new flags to set\n+ * @mask:     Mask of the flags, from BASE_MEM_*, to modify.\n+ *\n+ * Return: 0 on success or error code\n+ */\n int kbase_mem_flags_change(struct kbase_context *kctx, u64 gpu_addr, unsigned int flags, unsigned int mask);\n \n /**\n@@ -53,10 +128,19 @@ int kbase_mem_flags_change(struct kbase_context *kctx, u64 gpu_addr, unsigned in\n  */\n int kbase_mem_commit(struct kbase_context *kctx, u64 gpu_addr, u64 new_pages);\n \n+/**\n+ * kbase_mmap - Mmap method, gets invoked when mmap system call is issued on\n+ *              device file /dev/malixx.\n+ * @file: Pointer to the device file /dev/malixx instance.\n+ * @vma:  Pointer to the struct containing the info where the GPU allocation\n+ *        will be mapped in virtual address space of CPU.\n+ *\n+ * Return: 0 on success or error code\n+ */\n int kbase_mmap(struct file *file, struct vm_area_struct *vma);\n \n /**\n- * kbase_mem_evictable_init - Initialize the Ephemeral memory the eviction\n+ * kbase_mem_evictable_init - Initialize the Ephemeral memory eviction\n  * mechanism.\n  * @kctx: The kbase context to initialize.\n  *\n@@ -237,4 +321,35 @@ void kbase_va_free(struct kbase_context *kctx, struct kbase_hwc_dma_mapping *han\n \n extern const struct vm_operations_struct kbase_vm_ops;\n \n+/**\n+ * kbase_mem_shrink_cpu_mapping - Shrink the CPU mapping(s) of an allocation\n+ * @kctx:      Context the region belongs to\n+ * @reg:       The GPU region\n+ * @new_pages: The number of pages after the shrink\n+ * @old_pages: The number of pages before the shrink\n+ *\n+ * Shrink (or completely remove) all CPU mappings which reference the shrunk\n+ * part of the allocation.\n+ */\n+void kbase_mem_shrink_cpu_mapping(struct kbase_context *kctx,\n+\t\tstruct kbase_va_region *reg,\n+\t\tu64 new_pages, u64 old_pages);\n+\n+/**\n+ * kbase_mem_shrink_gpu_mapping - Shrink the GPU mapping of an allocation\n+ * @kctx:      Context the region belongs to\n+ * @reg:       The GPU region or NULL if there isn't one\n+ * @new_pages: The number of pages after the shrink\n+ * @old_pages: The number of pages before the shrink\n+ *\n+ * Return: 0 on success, negative -errno on error\n+ *\n+ * Unmap the shrunk pages from the GPU mapping. Note that the size of the region\n+ * itself is unmodified as we still need to reserve the VA, only the page tables\n+ * will be modified by this function.\n+ */\n+int kbase_mem_shrink_gpu_mapping(struct kbase_context *kctx,\n+\t\tstruct kbase_va_region *reg,\n+\t\tu64 new_pages, u64 old_pages);\n+\n #endif\t\t\t\t/* _KBASE_MEM_LINUX_H_ */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_lowlevel.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_lowlevel.h\nindex f4e88491327e71..6581ecfc95a0e9 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_lowlevel.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_lowlevel.h\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2012-2014,2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2012-2014,2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #ifndef _KBASE_MEM_LOWLEVEL_H\n #define _KBASE_MEM_LOWLEVEL_H\n \n@@ -48,11 +53,39 @@ struct tagged_addr { phys_addr_t tagged_addr; };\n #define HUGE_HEAD    (1u << 1)\n #define FROM_PARTIAL (1u << 2)\n \n+/*\n+ * Note: if macro for converting physical address to page is not defined\n+ * in the kernel itself, it is defined hereby. This is to avoid build errors\n+ * which are reported during builds for some architectures.\n+ */\n+#ifndef phys_to_page\n+#define phys_to_page(phys)\t(pfn_to_page((phys) >> PAGE_SHIFT))\n+#endif\n+\n+/**\n+ * as_phys_addr_t - Retrieve the physical address from tagged address by\n+ *                  masking the lower order 12 bits.\n+ * @t: tagged address to be translated.\n+ *\n+ * Return: physical address corresponding to tagged address.\n+ */\n static inline phys_addr_t as_phys_addr_t(struct tagged_addr t)\n {\n \treturn t.tagged_addr & PAGE_MASK;\n }\n \n+/**\n+ * as_tagged - Convert the physical address to tagged address type though\n+ *             there is no tag info present, the lower order 12 bits will be 0\n+ * @phys: physical address to be converted to tagged type\n+ *\n+ * This is used for 4KB physical pages allocated by the Driver or imported pages\n+ * and is needed as physical pages tracking object stores the reference for\n+ * physical pages using tagged address type in lieu of the type generally used\n+ * for physical addresses.\n+ *\n+ * Return: address of tagged address type.\n+ */\n static inline struct tagged_addr as_tagged(phys_addr_t phys)\n {\n \tstruct tagged_addr t;\n@@ -61,6 +94,16 @@ static inline struct tagged_addr as_tagged(phys_addr_t phys)\n \treturn t;\n }\n \n+/**\n+ * as_tagged_tag - Form the tagged address by storing the tag or metadata in the\n+ *                 lower order 12 bits of physial address\n+ * @phys: physical address to be converted to tagged address\n+ * @tag:  tag to be stored along with the physical address.\n+ *\n+ * The tag info is used while freeing up the pages\n+ *\n+ * Return: tagged address storing physical address & tag.\n+ */\n static inline struct tagged_addr as_tagged_tag(phys_addr_t phys, int tag)\n {\n \tstruct tagged_addr t;\n@@ -69,11 +112,26 @@ static inline struct tagged_addr as_tagged_tag(phys_addr_t phys, int tag)\n \treturn t;\n }\n \n+/**\n+ * is_huge - Check if the physical page is one of the 512 4KB pages of the\n+ *           large page which was not split to be used partially\n+ * @t: tagged address storing the tag in the lower order bits.\n+ *\n+ * Return: true if page belongs to large page, or false\n+ */\n static inline bool is_huge(struct tagged_addr t)\n {\n \treturn t.tagged_addr & HUGE_PAGE;\n }\n \n+/**\n+ * is_huge_head - Check if the physical page is the first 4KB page of the\n+ *                512 4KB pages within a large page which was not split\n+ *                to be used partially\n+ * @t: tagged address storing the tag in the lower order bits.\n+ *\n+ * Return: true if page is the first page of a large page, or false\n+ */\n static inline bool is_huge_head(struct tagged_addr t)\n {\n \tint mask = HUGE_HEAD | HUGE_PAGE;\n@@ -81,6 +139,14 @@ static inline bool is_huge_head(struct tagged_addr t)\n \treturn mask == (t.tagged_addr & mask);\n }\n \n+/**\n+ * is_partial - Check if the physical page is one of the 512 pages of the\n+ *              large page which was split in 4KB pages to be used\n+ *              partially for allocations >= 2 MB in size.\n+ * @t: tagged address storing the tag in the lower order bits.\n+ *\n+ * Return: true if page was taken from large page used partially, or false\n+ */\n static inline bool is_partial(struct tagged_addr t)\n {\n \treturn t.tagged_addr & FROM_PARTIAL;\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_pool.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_pool.c\nindex 696730ac5b2bee..1255df0fc1ae20 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_pool.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_pool.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <mali_kbase.h>\n #include <linux/mm.h>\n #include <linux/dma-mapping.h>\n@@ -34,16 +39,6 @@\n #define NOT_DIRTY false\n #define NOT_RECLAIMED false\n \n-static inline void kbase_mem_pool_lock(struct kbase_mem_pool *pool)\n-{\n-\tspin_lock(&pool->pool_lock);\n-}\n-\n-static inline void kbase_mem_pool_unlock(struct kbase_mem_pool *pool)\n-{\n-\tspin_unlock(&pool->pool_lock);\n-}\n-\n static size_t kbase_mem_pool_capacity(struct kbase_mem_pool *pool)\n {\n \tssize_t max_size = kbase_mem_pool_max_size(pool);\n@@ -70,8 +65,6 @@ static void kbase_mem_pool_add_locked(struct kbase_mem_pool *pool,\n \tlist_add(&p->lru, &pool->page_list);\n \tpool->cur_size++;\n \n-\tzone_page_state_add(1, page_zone(p), NR_SLAB_RECLAIMABLE);\n-\n \tpool_dbg(pool, \"added page\\n\");\n }\n \n@@ -85,14 +78,8 @@ static void kbase_mem_pool_add(struct kbase_mem_pool *pool, struct page *p)\n static void kbase_mem_pool_add_list_locked(struct kbase_mem_pool *pool,\n \t\tstruct list_head *page_list, size_t nr_pages)\n {\n-\tstruct page *p;\n-\n \tlockdep_assert_held(&pool->pool_lock);\n \n-\tlist_for_each_entry(p, page_list, lru) {\n-\t\tzone_page_state_add(1, page_zone(p), NR_SLAB_RECLAIMABLE);\n-\t}\n-\n \tlist_splice(page_list, &pool->page_list);\n \tpool->cur_size += nr_pages;\n \n@@ -120,8 +107,6 @@ static struct page *kbase_mem_pool_remove_locked(struct kbase_mem_pool *pool)\n \tlist_del_init(&p->lru);\n \tpool->cur_size--;\n \n-\tzone_page_state_add(-1, page_zone(p), NR_SLAB_RECLAIMABLE);\n-\n \tpool_dbg(pool, \"removed page\\n\");\n \n \treturn p;\n@@ -182,12 +167,6 @@ struct page *kbase_mem_alloc_page(struct kbase_mem_pool *pool)\n \tgfp = GFP_HIGHUSER | __GFP_ZERO;\n #endif\n \n-\tif (current->flags & PF_KTHREAD) {\n-\t\t/* Don't trigger OOM killer from kernel threads, e.g. when\n-\t\t * growing memory on GPU page fault */\n-\t\tgfp |= __GFP_NORETRY;\n-\t}\n-\n \t/* don't warn on higer order failures */\n \tif (pool->order)\n \t\tgfp |= __GFP_NOWARN;\n@@ -260,12 +239,33 @@ int kbase_mem_pool_grow(struct kbase_mem_pool *pool,\n \tstruct page *p;\n \tsize_t i;\n \n+\tkbase_mem_pool_lock(pool);\n+\n+\tpool->dont_reclaim = true;\n \tfor (i = 0; i < nr_to_grow; i++) {\n+\t\tif (pool->dying) {\n+\t\t\tpool->dont_reclaim = false;\n+\t\t\tkbase_mem_pool_shrink_locked(pool, nr_to_grow);\n+\t\t\tkbase_mem_pool_unlock(pool);\n+\n+\t\t\treturn -ENOMEM;\n+\t\t}\n+\t\tkbase_mem_pool_unlock(pool);\n+\n \t\tp = kbase_mem_alloc_page(pool);\n-\t\tif (!p)\n+\t\tif (!p) {\n+\t\t\tkbase_mem_pool_lock(pool);\n+\t\t\tpool->dont_reclaim = false;\n+\t\t\tkbase_mem_pool_unlock(pool);\n+\n \t\t\treturn -ENOMEM;\n-\t\tkbase_mem_pool_add(pool, p);\n+\t\t}\n+\n+\t\tkbase_mem_pool_lock(pool);\n+\t\tkbase_mem_pool_add_locked(pool, p);\n \t}\n+\tpool->dont_reclaim = false;\n+\tkbase_mem_pool_unlock(pool);\n \n \treturn 0;\n }\n@@ -317,10 +317,19 @@ static unsigned long kbase_mem_pool_reclaim_count_objects(struct shrinker *s,\n \t\tstruct shrink_control *sc)\n {\n \tstruct kbase_mem_pool *pool;\n+\tsize_t pool_size;\n \n \tpool = container_of(s, struct kbase_mem_pool, reclaim);\n-\tpool_dbg(pool, \"reclaim count: %zu\\n\", kbase_mem_pool_size(pool));\n-\treturn kbase_mem_pool_size(pool);\n+\n+\tkbase_mem_pool_lock(pool);\n+\tif (pool->dont_reclaim && !pool->dying) {\n+\t\tkbase_mem_pool_unlock(pool);\n+\t\treturn 0;\n+\t}\n+\tpool_size = kbase_mem_pool_size(pool);\n+\tkbase_mem_pool_unlock(pool);\n+\n+\treturn pool_size;\n }\n \n static unsigned long kbase_mem_pool_reclaim_scan_objects(struct shrinker *s,\n@@ -331,9 +340,17 @@ static unsigned long kbase_mem_pool_reclaim_scan_objects(struct shrinker *s,\n \n \tpool = container_of(s, struct kbase_mem_pool, reclaim);\n \n+\tkbase_mem_pool_lock(pool);\n+\tif (pool->dont_reclaim && !pool->dying) {\n+\t\tkbase_mem_pool_unlock(pool);\n+\t\treturn 0;\n+\t}\n+\n \tpool_dbg(pool, \"reclaim scan %ld:\\n\", sc->nr_to_scan);\n \n-\tfreed = kbase_mem_pool_shrink(pool, sc->nr_to_scan);\n+\tfreed = kbase_mem_pool_shrink_locked(pool, sc->nr_to_scan);\n+\n+\tkbase_mem_pool_unlock(pool);\n \n \tpool_dbg(pool, \"reclaim freed %ld pages\\n\", freed);\n \n@@ -362,6 +379,7 @@ int kbase_mem_pool_init(struct kbase_mem_pool *pool,\n \tpool->order = order;\n \tpool->kbdev = kbdev;\n \tpool->next_pool = next_pool;\n+\tpool->dying = false;\n \n \tspin_lock_init(&pool->pool_lock);\n \tINIT_LIST_HEAD(&pool->page_list);\n@@ -386,6 +404,13 @@ int kbase_mem_pool_init(struct kbase_mem_pool *pool,\n \treturn 0;\n }\n \n+void kbase_mem_pool_mark_dying(struct kbase_mem_pool *pool)\n+{\n+\tkbase_mem_pool_lock(pool);\n+\tpool->dying = true;\n+\tkbase_mem_pool_unlock(pool);\n+}\n+\n void kbase_mem_pool_term(struct kbase_mem_pool *pool)\n {\n \tstruct kbase_mem_pool *next_pool = pool->next_pool;\n@@ -449,6 +474,21 @@ struct page *kbase_mem_pool_alloc(struct kbase_mem_pool *pool)\n \treturn NULL;\n }\n \n+struct page *kbase_mem_pool_alloc_locked(struct kbase_mem_pool *pool)\n+{\n+\tstruct page *p;\n+\n+\tlockdep_assert_held(&pool->pool_lock);\n+\n+\tpool_dbg(pool, \"alloc_locked()\\n\");\n+\tp = kbase_mem_pool_remove_locked(pool);\n+\n+\tif (p)\n+\t\treturn p;\n+\n+\treturn NULL;\n+}\n+\n void kbase_mem_pool_free(struct kbase_mem_pool *pool, struct page *p,\n \t\tbool dirty)\n {\n@@ -471,6 +511,25 @@ void kbase_mem_pool_free(struct kbase_mem_pool *pool, struct page *p,\n \t}\n }\n \n+void kbase_mem_pool_free_locked(struct kbase_mem_pool *pool, struct page *p,\n+\t\tbool dirty)\n+{\n+\tpool_dbg(pool, \"free_locked()\\n\");\n+\n+\tlockdep_assert_held(&pool->pool_lock);\n+\n+\tif (!kbase_mem_pool_is_full(pool)) {\n+\t\t/* Add to our own pool */\n+\t\tif (dirty)\n+\t\t\tkbase_mem_pool_sync_page(pool, p);\n+\n+\t\tkbase_mem_pool_add_locked(pool, p);\n+\t} else {\n+\t\t/* Free page */\n+\t\tkbase_mem_pool_free_page(pool, p);\n+\t}\n+}\n+\n int kbase_mem_pool_alloc_pages(struct kbase_mem_pool *pool, size_t nr_4k_pages,\n \t\tstruct tagged_addr *pages, bool partial_allowed)\n {\n@@ -548,7 +607,6 @@ int kbase_mem_pool_alloc_pages(struct kbase_mem_pool *pool, size_t nr_4k_pages,\n \n done:\n \tpool_dbg(pool, \"alloc_pages(%zu) done\\n\", i);\n-\n \treturn i;\n \n err_rollback:\n@@ -556,6 +614,49 @@ int kbase_mem_pool_alloc_pages(struct kbase_mem_pool *pool, size_t nr_4k_pages,\n \treturn err;\n }\n \n+int kbase_mem_pool_alloc_pages_locked(struct kbase_mem_pool *pool,\n+\t\tsize_t nr_4k_pages, struct tagged_addr *pages)\n+{\n+\tstruct page *p;\n+\tsize_t i;\n+\tsize_t nr_pages_internal;\n+\n+\tlockdep_assert_held(&pool->pool_lock);\n+\n+\tnr_pages_internal = nr_4k_pages / (1u << (pool->order));\n+\n+\tif (nr_pages_internal * (1u << pool->order) != nr_4k_pages)\n+\t\treturn -EINVAL;\n+\n+\tpool_dbg(pool, \"alloc_pages_locked(4k=%zu):\\n\", nr_4k_pages);\n+\tpool_dbg(pool, \"alloc_pages_locked(internal=%zu):\\n\",\n+\t\t\tnr_pages_internal);\n+\n+\tif (kbase_mem_pool_size(pool) < nr_pages_internal) {\n+\t\tpool_dbg(pool, \"Failed alloc\\n\");\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\tfor (i = 0; i < nr_pages_internal; i++) {\n+\t\tint j;\n+\n+\t\tp = kbase_mem_pool_remove_locked(pool);\n+\t\tif (pool->order) {\n+\t\t\t*pages++ = as_tagged_tag(page_to_phys(p),\n+\t\t\t\t\t\t   HUGE_HEAD | HUGE_PAGE);\n+\t\t\tfor (j = 1; j < (1u << pool->order); j++) {\n+\t\t\t\t*pages++ = as_tagged_tag(page_to_phys(p) +\n+\t\t\t\t\t\t\t   PAGE_SIZE * j,\n+\t\t\t\t\t\t\t   HUGE_PAGE);\n+\t\t\t}\n+\t\t} else {\n+\t\t\t*pages++ = as_tagged(page_to_phys(p));\n+\t\t}\n+\t}\n+\n+\treturn nr_4k_pages;\n+}\n+\n static void kbase_mem_pool_add_array(struct kbase_mem_pool *pool,\n \t\t\t\t     size_t nr_pages, struct tagged_addr *pages,\n \t\t\t\t     bool zero, bool sync)\n@@ -596,6 +697,48 @@ static void kbase_mem_pool_add_array(struct kbase_mem_pool *pool,\n \t\t\tnr_pages, nr_to_pool);\n }\n \n+static void kbase_mem_pool_add_array_locked(struct kbase_mem_pool *pool,\n+\t\tsize_t nr_pages, struct tagged_addr *pages,\n+\t\tbool zero, bool sync)\n+{\n+\tstruct page *p;\n+\tsize_t nr_to_pool = 0;\n+\tLIST_HEAD(new_page_list);\n+\tsize_t i;\n+\n+\tlockdep_assert_held(&pool->pool_lock);\n+\n+\tif (!nr_pages)\n+\t\treturn;\n+\n+\tpool_dbg(pool, \"add_array_locked(%zu, zero=%d, sync=%d):\\n\",\n+\t\t\tnr_pages, zero, sync);\n+\n+\t/* Zero/sync pages first */\n+\tfor (i = 0; i < nr_pages; i++) {\n+\t\tif (unlikely(!as_phys_addr_t(pages[i])))\n+\t\t\tcontinue;\n+\n+\t\tif (is_huge_head(pages[i]) || !is_huge(pages[i])) {\n+\t\t\tp = phys_to_page(as_phys_addr_t(pages[i]));\n+\t\t\tif (zero)\n+\t\t\t\tkbase_mem_pool_zero_page(pool, p);\n+\t\t\telse if (sync)\n+\t\t\t\tkbase_mem_pool_sync_page(pool, p);\n+\n+\t\t\tlist_add(&p->lru, &new_page_list);\n+\t\t\tnr_to_pool++;\n+\t\t}\n+\t\tpages[i] = as_tagged(0);\n+\t}\n+\n+\t/* Add new page list to pool */\n+\tkbase_mem_pool_add_list_locked(pool, &new_page_list, nr_to_pool);\n+\n+\tpool_dbg(pool, \"add_array_locked(%zu) added %zu pages\\n\",\n+\t\t\tnr_pages, nr_to_pool);\n+}\n+\n void kbase_mem_pool_free_pages(struct kbase_mem_pool *pool, size_t nr_pages,\n \t\tstruct tagged_addr *pages, bool dirty, bool reclaimed)\n {\n@@ -639,13 +782,53 @@ void kbase_mem_pool_free_pages(struct kbase_mem_pool *pool, size_t nr_pages,\n \n \t\tp = phys_to_page(as_phys_addr_t(pages[i]));\n \n-\t\tif (reclaimed)\n-\t\t\tzone_page_state_add(-1, page_zone(p),\n-\t\t\t\t\tNR_SLAB_RECLAIMABLE);\n-\n \t\tkbase_mem_pool_free_page(pool, p);\n \t\tpages[i] = as_tagged(0);\n \t}\n \n \tpool_dbg(pool, \"free_pages(%zu) done\\n\", nr_pages);\n }\n+\n+\n+void kbase_mem_pool_free_pages_locked(struct kbase_mem_pool *pool,\n+\t\tsize_t nr_pages, struct tagged_addr *pages, bool dirty,\n+\t\tbool reclaimed)\n+{\n+\tstruct page *p;\n+\tsize_t nr_to_pool;\n+\tLIST_HEAD(to_pool_list);\n+\tsize_t i = 0;\n+\n+\tlockdep_assert_held(&pool->pool_lock);\n+\n+\tpool_dbg(pool, \"free_pages_locked(%zu):\\n\", nr_pages);\n+\n+\tif (!reclaimed) {\n+\t\t/* Add to this pool */\n+\t\tnr_to_pool = kbase_mem_pool_capacity(pool);\n+\t\tnr_to_pool = min(nr_pages, nr_to_pool);\n+\n+\t\tkbase_mem_pool_add_array_locked(pool, nr_pages, pages, false,\n+\t\t\t\tdirty);\n+\n+\t\ti += nr_to_pool;\n+\t}\n+\n+\t/* Free any remaining pages to kernel */\n+\tfor (; i < nr_pages; i++) {\n+\t\tif (unlikely(!as_phys_addr_t(pages[i])))\n+\t\t\tcontinue;\n+\n+\t\tif (is_huge(pages[i]) && !is_huge_head(pages[i])) {\n+\t\t\tpages[i] = as_tagged(0);\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\tp = phys_to_page(as_phys_addr_t(pages[i]));\n+\n+\t\tkbase_mem_pool_free_page(pool, p);\n+\t\tpages[i] = as_tagged(0);\n+\t}\n+\n+\tpool_dbg(pool, \"free_pages_locked(%zu) done\\n\", nr_pages);\n+}\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_pool_debugfs.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_pool_debugfs.c\nindex 319cf2568aba45..4b4eeb32d2c1fa 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_pool_debugfs.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_pool_debugfs.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <linux/debugfs.h>\n #include <linux/seq_file.h>\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_pool_debugfs.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_pool_debugfs.h\nindex 496eaf3f1e1aeb..990d91c8fbe7ee 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_pool_debugfs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_pool_debugfs.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_MEM_POOL_DEBUGFS_H\n #define _KBASE_MEM_POOL_DEBUGFS_H\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_profile_debugfs.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_profile_debugfs.c\nindex d58fd8d62fdec9..d4f8433f408795 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_profile_debugfs.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_profile_debugfs.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <mali_kbase.h>\n \n #ifdef CONFIG_DEBUG_FS\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_profile_debugfs.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_profile_debugfs.h\nindex a1dc2e0b165b9b..1462247c3bcaef 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_profile_debugfs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_profile_debugfs.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_mem_profile_debugfs.h\n  * Header file for mem profiles entries in debugfs\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_profile_debugfs_buf_size.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_profile_debugfs_buf_size.h\nindex 82f0702974c202..7f44d81e34e268 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_profile_debugfs_buf_size.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mem_profile_debugfs_buf_size.h\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2014 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2014, 2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /**\n  * @file mali_kbase_mem_profile_debugfs_buf_size.h\n  * Header file for the size of the buffer to accumulate the histogram report text in\n@@ -27,7 +32,8 @@\n  * The size of the buffer to accumulate the histogram report text in\n  * @see @ref CCTXP_HIST_BUF_SIZE_MAX_LENGTH_REPORT\n  */\n-#define KBASE_MEM_PROFILE_MAX_BUF_SIZE ((size_t) (64 + ((80 + (56 * 64)) * 15) + 56))\n+#define KBASE_MEM_PROFILE_MAX_BUF_SIZE \\\n+\t((size_t) (64 + ((80 + (56 * 64)) * 31) + 56))\n \n #endif  /*_KBASE_MEM_PROFILE_DEBUGFS_BUF_SIZE_H_*/\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu.c\nindex c63269aed53c91..7ec579d6dc6c30 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu.c\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_mmu.c\n  * Base kernel MMU management.\n@@ -99,16 +104,199 @@ static void kbase_mmu_report_fault_and_kill(struct kbase_context *kctx,\n \t\tstruct kbase_as *as, const char *reason_str);\n \n \n-static size_t make_multiple(size_t minimum, size_t multiple)\n+/**\n+ * reg_grow_calc_extra_pages() - Calculate the number of backed pages to add to\n+ *                               a region on a GPU page fault\n+ *\n+ * @reg:           The region that will be backed with more pages\n+ * @fault_rel_pfn: PFN of the fault relative to the start of the region\n+ *\n+ * This calculates how much to increase the backing of a region by, based on\n+ * where a GPU page fault occurred and the flags in the region.\n+ *\n+ * This can be more than the minimum number of pages that would reach\n+ * @fault_rel_pfn, for example to reduce the overall rate of page fault\n+ * interrupts on a region, or to ensure that the end address is aligned.\n+ *\n+ * Return: the number of backed pages to increase by\n+ */\n+static size_t reg_grow_calc_extra_pages(struct kbase_va_region *reg, size_t fault_rel_pfn)\n {\n-\tsize_t remainder = minimum % multiple;\n+\tsize_t multiple = reg->extent;\n+\tsize_t reg_current_size = kbase_reg_current_backed_size(reg);\n+\tsize_t minimum_extra = fault_rel_pfn - reg_current_size + 1;\n+\tsize_t remainder;\n+\n+\tif (!multiple) {\n+\t\tdev_warn(reg->kctx->kbdev->dev,\n+\t\t\t\t\"VA Region 0x%llx extent was 0, allocator needs to set this properly for KBASE_REG_PF_GROW\\n\",\n+\t\t\t\t((unsigned long long)reg->start_pfn) << PAGE_SHIFT);\n+\t\treturn minimum_extra;\n+\t}\n+\n+\t/* Calculate the remainder to subtract from minimum_extra to make it\n+\t * the desired (rounded down) multiple of the extent.\n+\t * Depending on reg's flags, the base used for calculating multiples is\n+\t * different */\n+\tif (reg->flags & KBASE_REG_TILER_ALIGN_TOP) {\n+\t\t/* multiple is based from the top of the initial commit, which\n+\t\t * has been allocated in such a way that (start_pfn +\n+\t\t * initial_commit) is already aligned to multiple. Hence the\n+\t\t * pfn for the end of committed memory will also be aligned to\n+\t\t * multiple */\n+\t\tsize_t initial_commit = reg->initial_commit;\n+\n+\t\tif (fault_rel_pfn < initial_commit) {\n+\t\t\t/* this case is just to catch in case it's been\n+\t\t\t * recommitted by userspace to be smaller than the\n+\t\t\t * initial commit */\n+\t\t\tminimum_extra = initial_commit - reg_current_size;\n+\t\t\tremainder = 0;\n+\t\t} else {\n+\t\t\t/* same as calculating (fault_rel_pfn - initial_commit + 1) */\n+\t\t\tsize_t pages_after_initial = minimum_extra + reg_current_size - initial_commit;\n+\n+\t\t\tremainder = pages_after_initial % multiple;\n+\t\t}\n+\t} else {\n+\t\t/* multiple is based from the current backed size, even if the\n+\t\t * current backed size/pfn for end of committed memory are not\n+\t\t * themselves aligned to multiple */\n+\t\tremainder = minimum_extra % multiple;\n+\t}\n \n \tif (remainder == 0)\n-\t\treturn minimum;\n+\t\treturn minimum_extra;\n+\n+\treturn minimum_extra + multiple - remainder;\n+}\n \n-\treturn minimum + multiple - remainder;\n+#ifdef CONFIG_MALI_JOB_DUMP\n+static void kbase_gpu_mmu_handle_write_faulting_as(struct kbase_context *kctx,\n+\t\t\t\tstruct kbase_device *kbdev,\n+\t\t\t\tstruct kbase_as *faulting_as,\n+\t\t\t\tu64 start_pfn, size_t nr, u32 op)\n+{\n+\tmutex_lock(&kbdev->mmu_hw_mutex);\n+\n+\tkbase_mmu_hw_clear_fault(kbdev, faulting_as, kctx,\n+\t\t\tKBASE_MMU_FAULT_TYPE_PAGE);\n+\tkbase_mmu_hw_do_operation(kbdev, faulting_as, kctx, start_pfn,\n+\t\t\tnr, op, 1);\n+\n+\tmutex_unlock(&kbdev->mmu_hw_mutex);\n+\n+\tkbase_mmu_hw_enable_fault(kbdev, faulting_as, kctx,\n+\t\t\tKBASE_MMU_FAULT_TYPE_PAGE);\n }\n \n+static void kbase_gpu_mmu_handle_write_fault(struct kbase_context *kctx,\n+\t\t\tstruct kbase_as *faulting_as)\n+{\n+\tstruct kbasep_gwt_list_element *pos;\n+\tstruct kbase_va_region *region;\n+\tstruct kbase_device *kbdev;\n+\tu64 fault_pfn, pfn_offset;\n+\tu32 op;\n+\tint ret;\n+\tint as_no;\n+\n+\tas_no = faulting_as->number;\n+\tkbdev = container_of(faulting_as, struct kbase_device, as[as_no]);\n+\tfault_pfn = faulting_as->fault_addr >> PAGE_SHIFT;\n+\n+\tkbase_gpu_vm_lock(kctx);\n+\n+\t/* Find region and check if it should be writable. */\n+\tregion = kbase_region_tracker_find_region_enclosing_address(kctx,\n+\t\t\tfaulting_as->fault_addr);\n+\tif (!region || region->flags & KBASE_REG_FREE) {\n+\t\tkbase_gpu_vm_unlock(kctx);\n+\t\tkbase_mmu_report_fault_and_kill(kctx, faulting_as,\n+\t\t\t\t\"Memory is not mapped on the GPU\");\n+\t\treturn;\n+\t}\n+\n+\tif (!(region->flags & KBASE_REG_GPU_WR)) {\n+\t\tkbase_gpu_vm_unlock(kctx);\n+\t\tkbase_mmu_report_fault_and_kill(kctx, faulting_as,\n+\t\t\t\t\"Region does not have write permissions\");\n+\t\treturn;\n+\t}\n+\n+\t/* Capture addresses of faulting write location\n+\t * for job dumping if write tracking is enabled.\n+\t */\n+\tif (kctx->gwt_enabled) {\n+\t\tu64 page_addr = faulting_as->fault_addr & PAGE_MASK;\n+\t\tbool found = false;\n+\t\t/* Check if this write was already handled. */\n+\t\tlist_for_each_entry(pos, &kctx->gwt_current_list, link) {\n+\t\t\tif (page_addr == pos->page_addr) {\n+\t\t\t\tfound = true;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\n+\t\tif (!found) {\n+\t\t\tpos = kmalloc(sizeof(*pos), GFP_KERNEL);\n+\t\t\tif (pos) {\n+\t\t\t\tpos->region = region;\n+\t\t\t\tpos->page_addr = page_addr;\n+\t\t\t\tpos->num_pages = 1;\n+\t\t\t\tlist_add(&pos->link, &kctx->gwt_current_list);\n+\t\t\t} else {\n+\t\t\t\tdev_warn(kbdev->dev, \"kmalloc failure\");\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\tpfn_offset = fault_pfn - region->start_pfn;\n+\t/* Now make this faulting page writable to GPU. */\n+\tret = kbase_mmu_update_pages_no_flush(kctx, fault_pfn,\n+\t\t\t\t&kbase_get_gpu_phy_pages(region)[pfn_offset],\n+\t\t\t\t1, region->flags);\n+\n+\t/* flush L2 and unlock the VA (resumes the MMU) */\n+\tif (kbase_hw_has_issue(kbdev, BASE_HW_ISSUE_6367))\n+\t\top = AS_COMMAND_FLUSH;\n+\telse\n+\t\top = AS_COMMAND_FLUSH_PT;\n+\n+\tkbase_gpu_mmu_handle_write_faulting_as(kctx, kbdev, faulting_as,\n+\t\t\tfault_pfn, 1, op);\n+\n+\tkbase_gpu_vm_unlock(kctx);\n+}\n+\n+static void kbase_gpu_mmu_handle_permission_fault(struct kbase_context *kctx,\n+\t\t\tstruct kbase_as\t*faulting_as)\n+{\n+\tu32 fault_status;\n+\n+\tfault_status = faulting_as->fault_status;\n+\n+\tswitch (fault_status & AS_FAULTSTATUS_ACCESS_TYPE_MASK) {\n+\tcase AS_FAULTSTATUS_ACCESS_TYPE_ATOMIC:\n+\tcase AS_FAULTSTATUS_ACCESS_TYPE_WRITE:\n+\t\tkbase_gpu_mmu_handle_write_fault(kctx, faulting_as);\n+\t\tbreak;\n+\tcase AS_FAULTSTATUS_ACCESS_TYPE_EX:\n+\t\tkbase_mmu_report_fault_and_kill(kctx, faulting_as,\n+\t\t\t\t\"Execute Permission fault\");\n+\t\tbreak;\n+\tcase AS_FAULTSTATUS_ACCESS_TYPE_READ:\n+\t\tkbase_mmu_report_fault_and_kill(kctx, faulting_as,\n+\t\t\t\t\"Read Permission fault\");\n+\t\tbreak;\n+\tdefault:\n+\t\tkbase_mmu_report_fault_and_kill(kctx, faulting_as,\n+\t\t\t\t\"Unknown Permission fault\");\n+\t\tbreak;\n+\t}\n+}\n+#endif\n+\n void page_fault_worker(struct work_struct *data)\n {\n \tu64 fault_pfn;\n@@ -122,6 +310,12 @@ void page_fault_worker(struct work_struct *data)\n \tstruct kbase_va_region *region;\n \tint err;\n \tbool grown = false;\n+\tsize_t min_pool_size;\n+\tstruct kbase_mem_pool *pool;\n+\tint pages_to_grow;\n+\tstruct tagged_addr *gpu_pages, *cpu_pages;\n+\tstruct kbase_sub_alloc *prealloc_sas[2] = { NULL, NULL };\n+\tint i;\n \n \tfaulting_as = container_of(data, struct kbase_as, work_pagefault);\n \tfault_pfn = faulting_as->fault_addr >> PAGE_SHIFT;\n@@ -140,8 +334,7 @@ void page_fault_worker(struct work_struct *data)\n \n \tKBASE_DEBUG_ASSERT(kctx->kbdev == kbdev);\n \n-\tif (unlikely(faulting_as->protected_mode))\n-\t{\n+\tif (unlikely(faulting_as->protected_mode)) {\n \t\tkbase_mmu_report_fault_and_kill(kctx, faulting_as,\n \t\t\t\t\"Protected mode fault\");\n \t\tkbase_mmu_hw_clear_fault(kbdev, faulting_as, kctx,\n@@ -158,6 +351,17 @@ void page_fault_worker(struct work_struct *data)\n \t\tbreak;\n \n \tcase AS_FAULTSTATUS_EXCEPTION_CODE_PERMISSION_FAULT:\n+#ifdef CONFIG_MALI_JOB_DUMP\n+\t\t/* If GWT was ever enabled then we need to handle\n+\t\t * write fault pages even if the feature was disabled later.\n+\t\t */\n+\t\tif (kctx->gwt_was_enabled) {\n+\t\t\tkbase_gpu_mmu_handle_permission_fault(kctx,\n+\t\t\t\t\t\t\tfaulting_as);\n+\t\t\tgoto fault_done;\n+\t\t}\n+#endif\n+\n \t\tkbase_mmu_report_fault_and_kill(kctx, faulting_as,\n \t\t\t\t\"Permission failure\");\n \t\tgoto fault_done;\n@@ -196,6 +400,23 @@ void page_fault_worker(struct work_struct *data)\n \t\tgoto fault_done;\n \t}\n \n+page_fault_retry:\n+#ifdef CONFIG_MALI_2MB_ALLOC\n+\t/* Preallocate memory for the sub-allocation structs if necessary */\n+\tfor (i = 0; i != ARRAY_SIZE(prealloc_sas); ++i) {\n+\t\tif (!prealloc_sas[i]) {\n+\t\t\tprealloc_sas[i] = kmalloc(sizeof(*prealloc_sas[i]),\n+\t\t\t\t\tGFP_KERNEL);\n+\t\t\tif (!prealloc_sas[i]) {\n+\t\t\t\tkbase_mmu_report_fault_and_kill(\n+\t\t\t\t\t\tkctx, faulting_as,\n+\t\t\t\t\t\t\"Failed pre-allocating memory for sub-allocations' metadata\");\n+\t\t\t\tgoto fault_done;\n+\t\t\t}\n+\t\t}\n+\t}\n+#endif /* CONFIG_MALI_2MB_ALLOC */\n+\n \t/* so we have a translation fault, let's see if it is for growable\n \t * memory */\n \tkbase_gpu_vm_lock(kctx);\n@@ -266,15 +487,10 @@ void page_fault_worker(struct work_struct *data)\n \t\tgoto fault_done;\n \t}\n \n-\tnew_pages = make_multiple(fault_rel_pfn -\n-\t\t\tkbase_reg_current_backed_size(region) + 1,\n-\t\t\tregion->extent);\n+\tnew_pages = reg_grow_calc_extra_pages(region, fault_rel_pfn);\n \n \t/* cap to max vsize */\n-\tif (new_pages + kbase_reg_current_backed_size(region) >\n-\t\t\tregion->nr_pages)\n-\t\tnew_pages = region->nr_pages -\n-\t\t\t\tkbase_reg_current_backed_size(region);\n+\tnew_pages = min(new_pages, region->nr_pages - kbase_reg_current_backed_size(region));\n \n \tif (0 == new_pages) {\n \t\tmutex_lock(&kbdev->mmu_hw_mutex);\n@@ -294,20 +510,60 @@ void page_fault_worker(struct work_struct *data)\n \t\tgoto fault_done;\n \t}\n \n-\tif (kbase_alloc_phy_pages_helper(region->gpu_alloc, new_pages) == 0) {\n-\t\tif (region->gpu_alloc != region->cpu_alloc) {\n-\t\t\tif (kbase_alloc_phy_pages_helper(\n-\t\t\t\t\tregion->cpu_alloc, new_pages) == 0) {\n-\t\t\t\tgrown = true;\n+#ifdef CONFIG_MALI_2MB_ALLOC\n+\tif (new_pages >= (SZ_2M / SZ_4K)) {\n+\t\tpool = &kctx->lp_mem_pool;\n+\t\t/* Round up to number of 2 MB pages required */\n+\t\tmin_pool_size = new_pages + ((SZ_2M / SZ_4K) - 1);\n+\t\tmin_pool_size /= (SZ_2M / SZ_4K);\n+\t} else {\n+#endif\n+\t\tpool = &kctx->mem_pool;\n+\t\tmin_pool_size = new_pages;\n+#ifdef CONFIG_MALI_2MB_ALLOC\n+\t}\n+#endif\n+\n+\tif (region->gpu_alloc != region->cpu_alloc)\n+\t\tmin_pool_size *= 2;\n+\n+\tpages_to_grow = 0;\n+\n+\tmutex_lock(&kctx->mem_partials_lock);\n+\tkbase_mem_pool_lock(pool);\n+\t/* We can not allocate memory from the kernel with the vm_lock held, so\n+\t * check that there is enough memory in the pool. If not then calculate\n+\t * how much it has to grow by, grow the pool when the vm_lock is\n+\t * dropped, and retry the allocation.\n+\t */\n+\tif (kbase_mem_pool_size(pool) >= min_pool_size) {\n+\t\tgpu_pages = kbase_alloc_phy_pages_helper_locked(\n+\t\t\t\tregion->gpu_alloc, pool, new_pages,\n+\t\t\t\t&prealloc_sas[0]);\n+\n+\t\tif (gpu_pages) {\n+\t\t\tif (region->gpu_alloc != region->cpu_alloc) {\n+\t\t\t\tcpu_pages = kbase_alloc_phy_pages_helper_locked(\n+\t\t\t\t\t\tregion->cpu_alloc, pool,\n+\t\t\t\t\t\tnew_pages, &prealloc_sas[1]);\n+\n+\t\t\t\tif (cpu_pages) {\n+\t\t\t\t\tgrown = true;\n+\t\t\t\t} else {\n+\t\t\t\t\tkbase_free_phy_pages_helper_locked(\n+\t\t\t\t\t\t\tregion->gpu_alloc,\n+\t\t\t\t\t\t\tpool, gpu_pages,\n+\t\t\t\t\t\t\tnew_pages);\n+\t\t\t\t}\n \t\t\t} else {\n-\t\t\t\tkbase_free_phy_pages_helper(region->gpu_alloc,\n-\t\t\t\t\t\tnew_pages);\n+\t\t\t\tgrown = true;\n \t\t\t}\n-\t\t} else {\n-\t\t\tgrown = true;\n \t\t}\n+\t} else {\n+\t\tpages_to_grow = min_pool_size - kbase_mem_pool_size(pool);\n \t}\n-\n+\tkbase_mem_pool_unlock(pool);\n+\tmutex_unlock(&kctx->mem_partials_lock);\n \n \tif (grown) {\n \t\tu64 pfn_offset;\n@@ -377,15 +633,51 @@ void page_fault_worker(struct work_struct *data)\n \t\t/* reenable this in the mask */\n \t\tkbase_mmu_hw_enable_fault(kbdev, faulting_as, kctx,\n \t\t\t\t\t KBASE_MMU_FAULT_TYPE_PAGE);\n+\n+#ifdef CONFIG_MALI_JOB_DUMP\n+\t\tif (kctx->gwt_enabled) {\n+\t\t\t/* GWT also tracks growable regions. */\n+\t\t\tstruct kbasep_gwt_list_element *pos;\n+\n+\t\t\tpos = kmalloc(sizeof(*pos), GFP_KERNEL);\n+\t\t\tif (pos) {\n+\t\t\t\tpos->region = region;\n+\t\t\t\tpos->page_addr = (region->start_pfn +\n+\t\t\t\t\t\t\tpfn_offset) <<\n+\t\t\t\t\t\t\t PAGE_SHIFT;\n+\t\t\t\tpos->num_pages = new_pages;\n+\t\t\t\tlist_add(&pos->link,\n+\t\t\t\t\t&kctx->gwt_current_list);\n+\t\t\t} else {\n+\t\t\t\tdev_warn(kbdev->dev, \"kmalloc failure\");\n+\t\t\t}\n+\t\t}\n+#endif\n \t\tkbase_gpu_vm_unlock(kctx);\n \t} else {\n-\t\t/* failed to extend, handle as a normal PF */\n+\t\tint ret = -ENOMEM;\n+\n \t\tkbase_gpu_vm_unlock(kctx);\n-\t\tkbase_mmu_report_fault_and_kill(kctx, faulting_as,\n-\t\t\t\t\"Page allocation failure\");\n+\n+\t\t/* If the memory pool was insufficient then grow it and retry.\n+\t\t * Otherwise fail the allocation.\n+\t\t */\n+\t\tif (pages_to_grow > 0)\n+\t\t\tret = kbase_mem_pool_grow(pool, pages_to_grow);\n+\n+\t\tif (ret < 0) {\n+\t\t\t/* failed to extend, handle as a normal PF */\n+\t\t\tkbase_mmu_report_fault_and_kill(kctx, faulting_as,\n+\t\t\t\t\t\"Page allocation failure\");\n+\t\t} else {\n+\t\t\tgoto page_fault_retry;\n+\t\t}\n \t}\n \n fault_done:\n+\tfor (i = 0; i != ARRAY_SIZE(prealloc_sas); ++i)\n+\t\tkfree(prealloc_sas[i]);\n+\n \t/*\n \t * By this point, the fault was handled in some way,\n \t * so release the ctx refcount\n@@ -838,9 +1130,16 @@ int kbase_mmu_insert_pages_no_flush(struct kbase_context *kctx,\n \t\t\t\tu64 *target = &pgd_page[ofs];\n \n \t\t\t\t/* Fail if the current page is a valid ATE entry\n+\t\t\t\t * unless gwt_was_enabled as in that case all\n+\t\t\t\t * pages will be valid from when\n+\t\t\t\t * kbase_gpu_gwt_start() cleared the gpu\n+\t\t\t\t * write flag.\n \t\t\t\t */\n-\t\t\t\tKBASE_DEBUG_ASSERT(0 == (*target & 1UL));\n-\n+#ifdef CONFIG_MALI_JOB_DUMP\n+\t\t\t\tif (!kctx->gwt_was_enabled)\n+#endif\n+\t\t\t\t\tKBASE_DEBUG_ASSERT\n+\t\t\t\t\t\t(0 == (*target & 1UL));\n \t\t\t\tkctx->kbdev->mmu_mode->entry_set_ate(target,\n \t\t\t\t\t\tphys[i], flags, cur_level);\n \t\t\t}\n@@ -1202,13 +1501,12 @@ KBASE_EXPORT_TEST_API(kbase_mmu_teardown_pages);\n  * already held by the caller. Refer to kbasep_js_runpool_release_ctx() for more\n  * information.\n  */\n-int kbase_mmu_update_pages(struct kbase_context *kctx, u64 vpfn,\n-\t\t\t   struct tagged_addr *phys, size_t nr,\n-\t\t\t   unsigned long flags)\n+int kbase_mmu_update_pages_no_flush(struct kbase_context *kctx, u64 vpfn,\n+\t\t\t\t\tstruct tagged_addr *phys, size_t nr,\n+\t\t\t\t\tunsigned long flags)\n {\n \tphys_addr_t pgd;\n \tu64 *pgd_page;\n-\tsize_t requested_nr = nr;\n \tstruct kbase_mmu_mode const *mmu_mode;\n \tint err;\n \n@@ -1224,9 +1522,6 @@ int kbase_mmu_update_pages(struct kbase_context *kctx, u64 vpfn,\n \n \tmmu_mode = kctx->kbdev->mmu_mode;\n \n-\tdev_warn(kctx->kbdev->dev, \"kbase_mmu_update_pages(): updating page share flags on GPU PFN 0x%llx from phys %p, %zu pages\",\n-\t\t\tvpfn, phys, nr);\n-\n \twhile (nr) {\n \t\tunsigned int i;\n \t\tunsigned int index = vpfn & 0x1FF;\n@@ -1278,12 +1573,21 @@ int kbase_mmu_update_pages(struct kbase_context *kctx, u64 vpfn,\n \t}\n \n \tmutex_unlock(&kctx->mmu_lock);\n-\tkbase_mmu_flush_invalidate(kctx, vpfn, requested_nr, true);\n \treturn 0;\n \n fail_unlock:\n \tmutex_unlock(&kctx->mmu_lock);\n-\tkbase_mmu_flush_invalidate(kctx, vpfn, requested_nr, true);\n+\treturn err;\n+}\n+\n+int kbase_mmu_update_pages(struct kbase_context *kctx, u64 vpfn,\n+\t\t\t   struct tagged_addr *phys, size_t nr,\n+\t\t\t   unsigned long flags)\n+{\n+\tint err;\n+\n+\terr = kbase_mmu_update_pages_no_flush(kctx, vpfn, phys, nr, flags);\n+\tkbase_mmu_flush_invalidate(kctx, vpfn, nr, true);\n \treturn err;\n }\n \n@@ -1534,8 +1838,7 @@ void bus_fault_worker(struct work_struct *data)\n \t\treturn;\n \t}\n \n-\tif (unlikely(faulting_as->protected_mode))\n-\t{\n+\tif (unlikely(faulting_as->protected_mode)) {\n \t\tkbase_mmu_report_fault_and_kill(kctx, faulting_as,\n \t\t\t\t\"Permission failure\");\n \t\tkbase_mmu_hw_clear_fault(kbdev, faulting_as, kctx,\n@@ -2114,14 +2417,10 @@ void kbase_mmu_interrupt_process(struct kbase_device *kbdev, struct kbase_contex\n \t\t * We need to switch to UNMAPPED mode - but we do this in a\n \t\t * worker so that we can sleep\n \t\t */\n-\t\tKBASE_DEBUG_ASSERT(0 == object_is_on_stack(&as->work_busfault));\n-\t\tWARN_ON(work_pending(&as->work_busfault));\n-\t\tqueue_work(as->pf_wq, &as->work_busfault);\n+\t\tWARN_ON(!queue_work(as->pf_wq, &as->work_busfault));\n \t\tatomic_inc(&kbdev->faults_pending);\n \t} else {\n-\t\tKBASE_DEBUG_ASSERT(0 == object_is_on_stack(&as->work_pagefault));\n-\t\tWARN_ON(work_pending(&as->work_pagefault));\n-\t\tqueue_work(as->pf_wq, &as->work_pagefault);\n+\t\tWARN_ON(!queue_work(as->pf_wq, &as->work_pagefault));\n \t\tatomic_inc(&kbdev->faults_pending);\n \t}\n }\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu_hw.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu_hw.h\nindex 986e959e9a0c77..92aa55dc2b35e9 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu_hw.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu_hw.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /**\n  * @file\n  * Interface file for accessing MMU hardware functionality\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu_mode_aarch64.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu_mode_aarch64.c\nindex 0fb717b67af92c..aa0c4038b563e9 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu_mode_aarch64.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu_mode_aarch64.c\n@@ -7,16 +7,20 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n-\n #include \"mali_kbase.h\"\n #include \"mali_midg_regmap.h\"\n #include \"mali_kbase_defs.h\"\n@@ -43,29 +47,25 @@\n  */\n static inline void page_table_entry_set(u64 *pte, u64 phy)\n {\n+#if KERNEL_VERSION(3, 18, 13) <= LINUX_VERSION_CODE\n+\tWRITE_ONCE(*pte, phy);\n+#else\n #ifdef CONFIG_64BIT\n+\tbarrier();\n \t*pte = phy;\n+\tbarrier();\n #elif defined(CONFIG_ARM)\n-\t/*\n-\t * In order to prevent the compiler keeping cached copies of\n-\t * memory, we have to explicitly say that we have updated memory.\n-\t *\n-\t * Note: We could manually move the data ourselves into R0 and\n-\t * R1 by specifying register variables that are explicitly\n-\t * given registers assignments, the down side of this is that\n-\t * we have to assume cpu endianness.  To avoid this we can use\n-\t * the ldrd to read the data from memory into R0 and R1 which\n-\t * will respect the cpu endianness, we then use strd to make\n-\t * the 64 bit assignment to the page table entry.\n-\t */\n-\tasm volatile(\"ldrd r0, r1, [%[ptemp]]\\n\\t\"\n-\t\t\t\"strd r0, r1, [%[pte]]\\n\\t\"\n-\t\t\t: \"=m\" (*pte)\n-\t\t\t: [ptemp] \"r\" (&phy), [pte] \"r\" (pte), \"m\" (phy)\n-\t\t\t: \"r0\", \"r1\");\n+\tbarrier();\n+\tasm volatile(\"ldrd r0, [%1]\\n\\t\"\n+\t\t     \"strd r0, %0\\n\\t\"\n+\t\t     : \"=m\" (*pte)\n+\t\t     : \"r\" (&phy)\n+\t\t     : \"r0\", \"r1\");\n+\tbarrier();\n #else\n #error \"64-bit atomic write must be implemented for your architecture\"\n #endif\n+#endif\n }\n \n static void mmu_get_as_setup(struct kbase_context *kctx,\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu_mode_lpae.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu_mode_lpae.c\nindex f080fdc0be8865..7dc38fcb792b7a 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu_mode_lpae.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_mmu_mode_lpae.c\n@@ -7,16 +7,20 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n-\n #include \"mali_kbase.h\"\n #include \"mali_midg_regmap.h\"\n #include \"mali_kbase_defs.h\"\n@@ -41,30 +45,25 @@\n  */\n static inline void page_table_entry_set(u64 *pte, u64 phy)\n {\n+#if KERNEL_VERSION(3, 18, 13) <= LINUX_VERSION_CODE\n+\tWRITE_ONCE(*pte, phy);\n+#else\n #ifdef CONFIG_64BIT\n+\tbarrier();\n \t*pte = phy;\n+\tbarrier();\n #elif defined(CONFIG_ARM)\n-\t/*\n-\t * In order to prevent the compiler keeping cached copies of\n-\t * memory, we have to explicitly say that we have updated\n-\t * memory.\n-\t *\n-\t * Note: We could manually move the data ourselves into R0 and\n-\t * R1 by specifying register variables that are explicitly\n-\t * given registers assignments, the down side of this is that\n-\t * we have to assume cpu endianness.  To avoid this we can use\n-\t * the ldrd to read the data from memory into R0 and R1 which\n-\t * will respect the cpu endianness, we then use strd to make\n-\t * the 64 bit assignment to the page table entry.\n-\t */\n-\tasm volatile(\"ldrd r0, r1, [%[ptemp]]\\n\\t\"\n-\t\t\t\"strd r0, r1, [%[pte]]\\n\\t\"\n-\t\t\t: \"=m\" (*pte)\n-\t\t\t: [ptemp] \"r\" (&phy), [pte] \"r\" (pte), \"m\" (phy)\n-\t\t\t: \"r0\", \"r1\");\n+\tbarrier();\n+\tasm volatile(\"ldrd r0, [%1]\\n\\t\"\n+\t\t     \"strd r0, %0\\n\\t\"\n+\t\t     : \"=m\" (*pte)\n+\t\t     : \"r\" (&phy)\n+\t\t     : \"r0\", \"r1\");\n+\tbarrier();\n #else\n #error \"64-bit atomic write must be implemented for your architecture\"\n #endif\n+#endif\n }\n \n static void mmu_get_as_setup(struct kbase_context *kctx,\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_platform_fake.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_platform_fake.c\nindex 0152b35f711b4b..fbb090e6c21f30 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_platform_fake.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_platform_fake.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <linux/errno.h>\n #include <linux/export.h>\n #include <linux/ioport.h>\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_pm.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_pm.c\nindex 97d543464c28bb..c226350ff88c12 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_pm.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_pm.c\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2016 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_pm.c\n  * Base kernel power management APIs\n@@ -89,10 +94,15 @@ int kbase_pm_context_active_handle_suspend(struct kbase_device *kbdev, enum kbas\n \tif (old_count == 0)\n \t\tkbase_timeline_pm_handle_event(kbdev, KBASE_TIMELINE_PM_EVENT_GPU_ACTIVE);\n \n-\tif (c == 1)\n+\tif (c == 1) {\n \t\t/* First context active: Power on the GPU and any cores requested by\n \t\t * the policy */\n \t\tkbase_hwaccess_pm_gpu_active(kbdev);\n+\t}\n+#if defined(CONFIG_DEVFREQ_THERMAL) && defined(CONFIG_MALI_BIFROST_DEVFREQ)\n+\tif (kbdev->ipa.gpu_active_callback)\n+\t\tkbdev->ipa.gpu_active_callback(kbdev->ipa.model_data);\n+#endif\n \n \tmutex_unlock(&kbdev->pm.lock);\n \tmutex_unlock(&js_devdata->runpool_mutex);\n@@ -141,6 +151,21 @@ void kbase_pm_context_idle(struct kbase_device *kbdev)\n \t\twake_up(&kbdev->pm.zero_active_count_wait);\n \t}\n \n+#if defined(CONFIG_DEVFREQ_THERMAL) && defined(CONFIG_MALI_BIFROST_DEVFREQ)\n+\t/* IPA may be using vinstr, in which case there may be one PM reference\n+\t * still held when all other contexts have left the GPU. Inform IPA that\n+\t * the GPU is now idle so that vinstr can drop it's reference.\n+\t *\n+\t * If the GPU was only briefly active then it might have gone idle\n+\t * before vinstr has taken a PM reference, meaning that active_count is\n+\t * zero. We still need to inform IPA in this case, so that vinstr can\n+\t * drop the PM reference and avoid keeping the GPU powered\n+\t * unnecessarily.\n+\t */\n+\tif (c <= 1 && kbdev->ipa.gpu_idle_callback)\n+\t\tkbdev->ipa.gpu_idle_callback(kbdev->ipa.model_data);\n+#endif\n+\n \tmutex_unlock(&kbdev->pm.lock);\n \tmutex_unlock(&js_devdata->runpool_mutex);\n }\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_pm.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_pm.h\nindex 37fa2479df74ba..8de17e1aca59eb 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_pm.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_pm.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_kbase_pm.h\n  * Power management API definitions\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_profiling_gator_api.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_profiling_gator_api.h\nindex 7fb674eded3734..15bca79fd64d65 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_profiling_gator_api.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_profiling_gator_api.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /**\n  * @file mali_kbase_profiling_gator_api.h\n  * Model interface\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_regs_history_debugfs.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_regs_history_debugfs.c\nindex 9e73f9f4999e9f..4bcb7bdb3da250 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_regs_history_debugfs.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_regs_history_debugfs.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include \"mali_kbase.h\"\n \n #include \"mali_kbase_regs_history_debugfs.h\"\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_regs_history_debugfs.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_regs_history_debugfs.h\nindex fbb36b3f22e494..8cc11010a92b36 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_regs_history_debugfs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_regs_history_debugfs.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /**\n  * Header file for register access history support via debugfs\n  *\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_replay.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_replay.c\nindex 9f4dc372770d5e..6929af9c5c9439 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_replay.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_replay.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /**\n  * @file mali_kbase_replay.c\n  * Replay soft job handlers\n@@ -659,8 +664,8 @@ static void kbasep_replay_create_atom(struct kbase_context *kctx,\n \tatom->prio = prio;\n \tatom->atom_number = atom_nr;\n \n-\tbase_jd_atom_dep_set(&atom->pre_dep[0], 0 , BASE_JD_DEP_TYPE_INVALID);\n-\tbase_jd_atom_dep_set(&atom->pre_dep[1], 0 , BASE_JD_DEP_TYPE_INVALID);\n+\tbase_jd_atom_dep_set(&atom->pre_dep[0], 0, BASE_JD_DEP_TYPE_INVALID);\n+\tbase_jd_atom_dep_set(&atom->pre_dep[1], 0, BASE_JD_DEP_TYPE_INVALID);\n \n \tatom->udata.blob[0] = 0;\n \tatom->udata.blob[1] = 0;\n@@ -708,7 +713,8 @@ static int kbasep_replay_create_atoms(struct kbase_context *kctx,\n \tkbasep_replay_create_atom(kctx, t_atom, t_atom_nr, prio);\n \tkbasep_replay_create_atom(kctx, f_atom, f_atom_nr, prio);\n \n-\tbase_jd_atom_dep_set(&f_atom->pre_dep[0], t_atom_nr , BASE_JD_DEP_TYPE_DATA);\n+\tbase_jd_atom_dep_set(&f_atom->pre_dep[0], t_atom_nr,\n+\t\t\t     BASE_JD_DEP_TYPE_DATA);\n \n \treturn 0;\n }\n@@ -772,22 +778,6 @@ static int kbasep_replay_parse_payload(struct kbase_context *kctx,\n \t\treturn -EINVAL;\n \t}\n \n-#ifdef BASE_LEGACY_UK10_2_SUPPORT\n-\tif (KBASE_API_VERSION(10, 3) > replay_atom->kctx->api_version) {\n-\t\tbase_jd_replay_payload_uk10_2 *payload_uk10_2;\n-\t\tu16 tiler_core_req;\n-\t\tu16 fragment_core_req;\n-\n-\t\tpayload_uk10_2 = (base_jd_replay_payload_uk10_2 *) payload;\n-\t\tmemcpy(&tiler_core_req, &payload_uk10_2->tiler_core_req,\n-\t\t\t\tsizeof(tiler_core_req));\n-\t\tmemcpy(&fragment_core_req, &payload_uk10_2->fragment_core_req,\n-\t\t\t\tsizeof(fragment_core_req));\n-\t\tpayload->tiler_core_req = (u32)(tiler_core_req & 0x7fff);\n-\t\tpayload->fragment_core_req = (u32)(fragment_core_req & 0x7fff);\n-\t}\n-#endif /* BASE_LEGACY_UK10_2_SUPPORT */\n-\n #ifdef CONFIG_MALI_BIFROST_DEBUG\n \tdev_dbg(kctx->kbdev->dev, \"kbasep_replay_parse_payload: payload=%p\\n\", payload);\n \tdev_dbg(kctx->kbdev->dev, \"Payload structure:\\n\"\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_smc.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_smc.c\nindex 43175c85988fd0..2176479959a5ee 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_smc.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_smc.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifdef CONFIG_ARM64\n \n #include <mali_kbase.h>\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_smc.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_smc.h\nindex 9bff3d2e8b4d87..221eb21a8c7f3f 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_smc.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_smc.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #ifndef _KBASE_SMC_H_\n #define _KBASE_SMC_H_\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_softjobs.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_softjobs.c\nindex cafc789ea253e7..3f87ac08eec696 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_softjobs.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_softjobs.c\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2011-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2011-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #include <mali_kbase.h>\n \n #if defined(CONFIG_DMA_SHARED_BUFFER)\n@@ -370,12 +375,12 @@ static void kbase_fence_debug_timeout(struct kbase_jd_atom *katom)\n }\n #endif /* CONFIG_MALI_BIFROST_FENCE_DEBUG */\n \n-void kbasep_soft_job_timeout_worker(unsigned long data)\n+void kbasep_soft_job_timeout_worker(struct timer_list *timer)\n {\n-\tstruct kbase_context *kctx = (struct kbase_context *)data;\n+\tstruct kbase_context *kctx = container_of(timer, struct kbase_context,\n+\t\t\tsoft_job_timeout);\n \tu32 timeout_ms = (u32)atomic_read(\n \t\t\t&kctx->kbdev->js_data.soft_job_timeout_ms);\n-\tstruct timer_list *timer = &kctx->soft_job_timeout;\n \tktime_t cur_time = ktime_get();\n \tbool restarting = false;\n \tunsigned long lflags;\n@@ -521,8 +526,7 @@ static inline void free_user_buffer(struct kbase_debug_copy_buffer *buffer)\n \n static void kbase_debug_copy_finish(struct kbase_jd_atom *katom)\n {\n-\tstruct kbase_debug_copy_buffer *buffers =\n-\t\t\t(struct kbase_debug_copy_buffer *)(uintptr_t)katom->jc;\n+\tstruct kbase_debug_copy_buffer *buffers = katom->softjob_data;\n \tunsigned int i;\n \tunsigned int nr = katom->nr_extres;\n \n@@ -560,7 +564,7 @@ static void kbase_debug_copy_finish(struct kbase_jd_atom *katom)\n \tkbase_gpu_vm_unlock(katom->kctx);\n \tkfree(buffers);\n \n-\tkatom->jc = 0;\n+\tkatom->softjob_data = NULL;\n }\n \n static int kbase_debug_copy_prepare(struct kbase_jd_atom *katom)\n@@ -578,10 +582,9 @@ static int kbase_debug_copy_prepare(struct kbase_jd_atom *katom)\n \tbuffers = kcalloc(nr, sizeof(*buffers), GFP_KERNEL);\n \tif (!buffers) {\n \t\tret = -ENOMEM;\n-\t\tkatom->jc = 0;\n \t\tgoto out_cleanup;\n \t}\n-\tkatom->jc = (u64)(uintptr_t)buffers;\n+\tkatom->softjob_data = buffers;\n \n \tuser_buffers = kmalloc_array(nr, sizeof(*user_buffers), GFP_KERNEL);\n \n@@ -688,13 +691,6 @@ static int kbase_debug_copy_prepare(struct kbase_jd_atom *katom)\n \t\t\tret = 0;\n \t\t\tbreak;\n \t\t}\n-\t\tcase KBASE_MEM_TYPE_IMPORTED_UMP:\n-\t\t{\n-\t\t\tdev_warn(katom->kctx->kbdev->dev,\n-\t\t\t\t\t\"UMP is not supported for debug_copy jobs\\n\");\n-\t\t\tret = -EINVAL;\n-\t\t\tgoto out_unlock;\n-\t\t}\n \t\tdefault:\n \t\t\t/* Nothing to be done. */\n \t\t\tbreak;\n@@ -768,9 +764,11 @@ static int kbase_mem_copy_from_extres(struct kbase_context *kctx,\n \tu64 offset = buf_data->offset;\n \tsize_t extres_size = buf_data->nr_extres_pages*PAGE_SIZE;\n \tsize_t to_copy = min(extres_size, buf_data->size);\n-\tsize_t dma_to_copy;\n \tstruct kbase_mem_phy_alloc *gpu_alloc = buf_data->gpu_alloc;\n \tint ret = 0;\n+#ifdef CONFIG_DMA_SHARED_BUFFER\n+\tsize_t dma_to_copy;\n+#endif\n \n \tKBASE_DEBUG_ASSERT(pages != NULL);\n \n@@ -853,10 +851,12 @@ static int kbase_mem_copy_from_extres(struct kbase_context *kctx,\n \n static int kbase_debug_copy(struct kbase_jd_atom *katom)\n {\n-\tstruct kbase_debug_copy_buffer *buffers =\n-\t\t\t(struct kbase_debug_copy_buffer *)(uintptr_t)katom->jc;\n+\tstruct kbase_debug_copy_buffer *buffers = katom->softjob_data;\n \tunsigned int i;\n \n+\tif (WARN_ON(!buffers))\n+\t\treturn -EINVAL;\n+\n \tfor (i = 0; i < katom->nr_extres; i++) {\n \t\tint res = kbase_mem_copy_from_extres(katom->kctx, &buffers[i]);\n \n@@ -910,8 +910,34 @@ static int kbase_jit_allocate_prepare(struct kbase_jd_atom *katom)\n \t\tgoto free_info;\n \t}\n \n-\t/* Replace the user pointer with our kernel allocated info structure */\n-\tkatom->jc = (u64)(uintptr_t) info;\n+\tif (kctx->jit_version == 1) {\n+\t\t/* Old JIT didn't have usage_id, max_allocations, bin_id\n+\t\t * or padding, so force them to zero\n+\t\t */\n+\t\tinfo->usage_id = 0;\n+\t\tinfo->max_allocations = 0;\n+\t\tinfo->bin_id = 0;\n+\t\tinfo->flags = 0;\n+\t\tmemset(info->padding, 0, sizeof(info->padding));\n+\t} else {\n+\t\tint i;\n+\n+\t\t/* Check padding is all zeroed */\n+\t\tfor (i = 0; i < sizeof(info->padding); i++) {\n+\t\t\tif (info->padding[i] != 0) {\n+\t\t\t\tret = -EINVAL;\n+\t\t\t\tgoto free_info;\n+\t\t\t}\n+\t\t}\n+\n+\t\t/* No bit other than TILER_ALIGN_TOP shall be set */\n+\t\tif (info->flags & ~BASE_JIT_ALLOC_MEM_TILER_ALIGN_TOP) {\n+\t\t\tret = -EINVAL;\n+\t\t\tgoto free_info;\n+\t\t}\n+\t}\n+\n+\tkatom->softjob_data = info;\n \tkatom->jit_blocked = false;\n \n \tlockdep_assert_held(&kctx->jctx.lock);\n@@ -933,13 +959,13 @@ static int kbase_jit_allocate_prepare(struct kbase_jd_atom *katom)\n free_info:\n \tkfree(info);\n fail:\n-\tkatom->jc = 0;\n \treturn ret;\n }\n \n static u8 kbase_jit_free_get_id(struct kbase_jd_atom *katom)\n {\n-\tif (WARN_ON(katom->core_req != BASE_JD_REQ_SOFT_JIT_FREE))\n+\tif (WARN_ON((katom->core_req & BASE_JD_REQ_SOFT_JOB_TYPE) !=\n+\t\t\t\tBASE_JD_REQ_SOFT_JIT_FREE))\n \t\treturn 0;\n \n \treturn (u8) katom->jc;\n@@ -958,7 +984,12 @@ static int kbase_jit_allocate_process(struct kbase_jd_atom *katom)\n \t\tkatom->jit_blocked = false;\n \t}\n \n-\tinfo = (struct base_jit_alloc_info *) (uintptr_t) katom->jc;\n+\tinfo = katom->softjob_data;\n+\n+\tif (WARN_ON(!info)) {\n+\t\tkatom->event_code = BASE_JD_EVENT_JOB_INVALID;\n+\t\treturn 0;\n+\t}\n \n \t/* The JIT ID is still in use so fail the allocation */\n \tif (kctx->jit_alloc[info->id]) {\n@@ -980,7 +1011,8 @@ static int kbase_jit_allocate_process(struct kbase_jd_atom *katom)\n \t\tlist_for_each_entry(jit_atom, &kctx->jit_atoms_head, jit_node) {\n \t\t\tif (jit_atom == katom)\n \t\t\t\tbreak;\n-\t\t\tif (jit_atom->core_req == BASE_JD_REQ_SOFT_JIT_FREE) {\n+\t\t\tif ((jit_atom->core_req & BASE_JD_REQ_SOFT_JOB_TYPE) ==\n+\t\t\t\t\tBASE_JD_REQ_SOFT_JIT_FREE) {\n \t\t\t\tu8 free_id = kbase_jit_free_get_id(jit_atom);\n \n \t\t\t\tif (free_id && kctx->jit_alloc[free_id]) {\n@@ -1061,7 +1093,7 @@ static void kbase_jit_allocate_finish(struct kbase_jd_atom *katom)\n \t\tkatom->jit_blocked = false;\n \t}\n \n-\tinfo = (struct base_jit_alloc_info *) (uintptr_t) katom->jc;\n+\tinfo = katom->softjob_data;\n \t/* Free the info structure */\n \tkfree(info);\n }\n@@ -1184,11 +1216,7 @@ static int kbase_ext_res_prepare(struct kbase_jd_atom *katom)\n \t */\n \text_res->count = count;\n \n-\t/*\n-\t * Replace the user pointer with our kernel allocated\n-\t * ext_res structure.\n-\t */\n-\tkatom->jc = (u64)(uintptr_t) ext_res;\n+\tkatom->softjob_data = ext_res;\n \n \treturn 0;\n \n@@ -1204,7 +1232,7 @@ static void kbase_ext_res_process(struct kbase_jd_atom *katom, bool map)\n \tint i;\n \tbool failed = false;\n \n-\text_res = (struct base_external_resource_list *) (uintptr_t) katom->jc;\n+\text_res = katom->softjob_data;\n \tif (!ext_res)\n \t\tgoto failed_jc;\n \n@@ -1240,13 +1268,13 @@ static void kbase_ext_res_process(struct kbase_jd_atom *katom, bool map)\n \treturn;\n \n failed_loop:\n-\twhile (--i > 0) {\n-\t\tu64 gpu_addr;\n-\n-\t\tgpu_addr = ext_res->ext_res[i].ext_resource &\n+\twhile (i > 0) {\n+\t\tu64 const gpu_addr = ext_res->ext_res[i - 1].ext_resource &\n \t\t\t\t~BASE_EXT_RES_ACCESS_EXCLUSIVE;\n \n \t\tkbase_sticky_resource_release(katom->kctx, NULL, gpu_addr);\n+\n+\t\t--i;\n \t}\n \n \tkatom->event_code = BASE_JD_EVENT_JOB_INVALID;\n@@ -1260,13 +1288,15 @@ static void kbase_ext_res_finish(struct kbase_jd_atom *katom)\n {\n \tstruct base_external_resource_list *ext_res;\n \n-\text_res = (struct base_external_resource_list *) (uintptr_t) katom->jc;\n+\text_res = katom->softjob_data;\n \t/* Free the info structure */\n \tkfree(ext_res);\n }\n \n int kbase_process_soft_job(struct kbase_jd_atom *katom)\n {\n+\tKBASE_TLSTREAM_TL_EVENT_ATOM_SOFTJOB_START(katom);\n+\n \tswitch (katom->core_req & BASE_JD_REQ_SOFT_JOB_TYPE) {\n \tcase BASE_JD_REQ_SOFT_DUMP_CPU_GPU_TIME:\n \t\treturn kbase_dump_cpu_gpu_time(katom);\n@@ -1430,6 +1460,7 @@ int kbase_prepare_soft_job(struct kbase_jd_atom *katom)\n \n void kbase_finish_soft_job(struct kbase_jd_atom *katom)\n {\n+\tKBASE_TLSTREAM_TL_EVENT_ATOM_SOFTJOB_END(katom);\n \tswitch (katom->core_req & BASE_JD_REQ_SOFT_JOB_TYPE) {\n \tcase BASE_JD_REQ_SOFT_DUMP_CPU_GPU_TIME:\n \t\t/* Nothing to do */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_strings.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_strings.c\nindex c98762cec24412..22caa4a6d81477 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_strings.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_strings.c\n@@ -7,13 +7,18 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n-\n-\n #include \"mali_kbase_strings.h\"\n \n #define KBASE_DRV_NAME \"mali\"\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_strings.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_strings.h\nindex 41b8fdbec6a436..d2f1825314fe7e 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_strings.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_strings.h\n@@ -7,13 +7,18 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n extern const char kbase_drv_name[];\n extern const char kbase_timeline_name[];\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync.h\nindex ca855b8d1b533a..550e0232856ad7 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /**\n  * @file mali_kbase_sync.h\n  *\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync_android.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync_android.c\nindex e4528e2b9f252b..41f740a7bc8c10 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync_android.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync_android.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * Code for supporting explicit Android fences (CONFIG_SYNC)\n  * Known to be good for kernels 4.5 and earlier.\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync_common.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync_common.c\nindex 457def29668478..9520f5ac3b5ebe 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync_common.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync_common.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * @file mali_kbase_sync_common.c\n  *\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync_file.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync_file.c\nindex 509c0666f10f50..349a33ebafe27a 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync_file.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_sync_file.c\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2012-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2012-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /*\n  * Code for supporting explicit Linux fences (CONFIG_SYNC_FILE)\n  * Introduced in kernel 4.9.\n@@ -161,7 +166,9 @@ static void kbase_fence_wait_callback(struct dma_fence *fence,\n \tstruct kbase_context *kctx = katom->kctx;\n \n \t/* Cancel atom if fence is erroneous */\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0))\n+#if (KERNEL_VERSION(4, 11, 0) <= LINUX_VERSION_CODE || \\\n+\t (KERNEL_VERSION(4, 10, 0) > LINUX_VERSION_CODE && \\\n+\t  KERNEL_VERSION(4, 9, 68) <= LINUX_VERSION_CODE))\n \tif (dma_fence_is_signaled(kcb->fence) && kcb->fence->error)\n #else\n \tif (dma_fence_is_signaled(kcb->fence) && kcb->fence->status < 0)\n@@ -277,7 +284,9 @@ static void kbase_sync_fence_info_get(struct dma_fence *fence,\n \t * 1 : signaled\n \t */\n \tif (dma_fence_is_signaled(fence)) {\n-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0))\n+#if (KERNEL_VERSION(4, 11, 0) <= LINUX_VERSION_CODE || \\\n+\t (KERNEL_VERSION(4, 10, 0) > LINUX_VERSION_CODE && \\\n+\t  KERNEL_VERSION(4, 9, 68) <= LINUX_VERSION_CODE))\n \t\tint status = fence->error;\n #else\n \t\tint status = fence->status;\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_tlstream.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_tlstream.c\nindex d01aa23b206ebc..2ff45f50bf16d6 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_tlstream.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_tlstream.c\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2015-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2015-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <linux/anon_inodes.h>\n #include <linux/atomic.h>\n #include <linux/file.h>\n@@ -144,12 +149,14 @@ enum tl_msg_id_obj {\n \tKBASE_TL_ATTRIB_ATOM_CONFIG,\n \tKBASE_TL_ATTRIB_ATOM_PRIORITY,\n \tKBASE_TL_ATTRIB_ATOM_STATE,\n-\tKBASE_TL_ATTRIB_ATOM_PRIORITY_CHANGE,\n+\tKBASE_TL_ATTRIB_ATOM_PRIORITIZED,\n \tKBASE_TL_ATTRIB_ATOM_JIT,\n \tKBASE_TL_ATTRIB_AS_CONFIG,\n \tKBASE_TL_EVENT_LPU_SOFTSTOP,\n \tKBASE_TL_EVENT_ATOM_SOFTSTOP_EX,\n \tKBASE_TL_EVENT_ATOM_SOFTSTOP_ISSUE,\n+\tKBASE_TL_EVENT_ATOM_SOFTJOB_START,\n+\tKBASE_TL_EVENT_ATOM_SOFTJOB_END,\n \n \t/* Job dump specific events. */\n \tKBASE_JD_GPU_SOFT_RESET\n@@ -453,8 +460,8 @@ static const struct tp_desc tp_desc_obj[] = {\n \t\t\"atom,state\"\n \t},\n \t{\n-\t\tKBASE_TL_ATTRIB_ATOM_PRIORITY_CHANGE,\n-\t\t__stringify(KBASE_TL_ATTRIB_ATOM_PRIORITY_CHANGE),\n+\t\tKBASE_TL_ATTRIB_ATOM_PRIORITIZED,\n+\t\t__stringify(KBASE_TL_ATTRIB_ATOM_PRIORITIZED),\n \t\t\"atom caused priority change\",\n \t\t\"@p\",\n \t\t\"atom\"\n@@ -494,6 +501,20 @@ static const struct tp_desc tp_desc_obj[] = {\n \t\t\"@p\",\n \t\t\"atom\"\n \t},\n+\t{\n+\t\tKBASE_TL_EVENT_ATOM_SOFTJOB_START,\n+\t\t__stringify(KBASE_TL_EVENT_ATOM_SOFTJOB_START),\n+\t\t\"atom soft job has started\",\n+\t\t\"@p\",\n+\t\t\"atom\"\n+\t},\n+\t{\n+\t\tKBASE_TL_EVENT_ATOM_SOFTJOB_END,\n+\t\t__stringify(KBASE_TL_EVENT_ATOM_SOFTJOB_END),\n+\t\t\"atom soft job has completed\",\n+\t\t\"@p\",\n+\t\t\"atom\"\n+\t},\n \t{\n \t\tKBASE_JD_GPU_SOFT_RESET,\n \t\t__stringify(KBASE_JD_GPU_SOFT_RESET),\n@@ -1037,17 +1058,17 @@ static void kbasep_tlstream_flush_stream(enum tl_stream_type stype)\n \n /**\n  * kbasep_tlstream_autoflush_timer_callback - autoflush timer callback\n- * @data:  unused\n+ * @timer: unused\n  *\n  * Timer is executed periodically to check if any of the stream contains\n  * buffer ready to be submitted to user space.\n  */\n-static void kbasep_tlstream_autoflush_timer_callback(unsigned long data)\n+static void kbasep_tlstream_autoflush_timer_callback(struct timer_list *timer)\n {\n \tenum tl_stream_type stype;\n \tint                 rcode;\n \n-\tCSTD_UNUSED(data);\n+\tCSTD_UNUSED(timer);\n \n \tfor (stype = 0; stype < TL_STREAM_TYPE_COUNT; stype++) {\n \t\tstruct tl_stream *stream = tl_stream[stype];\n@@ -1371,9 +1392,8 @@ int kbase_tlstream_init(void)\n \n \t/* Initialize autoflush timer. */\n \tatomic_set(&autoflush_timer_active, 0);\n-\tsetup_timer(&autoflush_timer,\n-\t\t\tkbasep_tlstream_autoflush_timer_callback,\n-\t\t\t0);\n+\tkbase_timer_setup(&autoflush_timer,\n+\t\t\t  kbasep_tlstream_autoflush_timer_callback);\n \n \treturn 0;\n }\n@@ -2208,9 +2228,9 @@ void __kbase_tlstream_tl_attrib_atom_state(void *atom, u32 state)\n \tkbasep_tlstream_msgbuf_release(TL_STREAM_TYPE_OBJ, flags);\n }\n \n-void __kbase_tlstream_tl_attrib_atom_priority_change(void *atom)\n+void __kbase_tlstream_tl_attrib_atom_prioritized(void *atom)\n {\n-\tconst u32     msg_id = KBASE_TL_ATTRIB_ATOM_PRIORITY_CHANGE;\n+\tconst u32     msg_id = KBASE_TL_ATTRIB_ATOM_PRIORITIZED;\n \tconst size_t  msg_size =\n \t\tsizeof(msg_id) + sizeof(u64) + sizeof(atom);\n \tunsigned long flags;\n@@ -2360,6 +2380,52 @@ void __kbase_tlstream_tl_event_atom_softstop_issue(void *atom)\n \tkbasep_tlstream_msgbuf_release(TL_STREAM_TYPE_OBJ, flags);\n }\n \n+void __kbase_tlstream_tl_event_atom_softjob_start(void *atom)\n+{\n+\tconst u32     msg_id = KBASE_TL_EVENT_ATOM_SOFTJOB_START;\n+\tconst size_t  msg_size =\n+\t\tsizeof(msg_id) + sizeof(u64) + sizeof(atom);\n+\tunsigned long flags;\n+\tchar          *buffer;\n+\tsize_t        pos = 0;\n+\n+\tbuffer = kbasep_tlstream_msgbuf_acquire(\n+\t\t\tTL_STREAM_TYPE_OBJ,\n+\t\t\tmsg_size, &flags);\n+\tKBASE_DEBUG_ASSERT(buffer);\n+\n+\tpos = kbasep_tlstream_write_bytes(buffer, pos, &msg_id, sizeof(msg_id));\n+\tpos = kbasep_tlstream_write_timestamp(buffer, pos);\n+\tpos = kbasep_tlstream_write_bytes(\n+\t\t\tbuffer, pos, &atom, sizeof(atom));\n+\tKBASE_DEBUG_ASSERT(msg_size == pos);\n+\n+\tkbasep_tlstream_msgbuf_release(TL_STREAM_TYPE_OBJ, flags);\n+}\n+\n+void __kbase_tlstream_tl_event_atom_softjob_end(void *atom)\n+{\n+\tconst u32     msg_id = KBASE_TL_EVENT_ATOM_SOFTJOB_END;\n+\tconst size_t  msg_size =\n+\t\tsizeof(msg_id) + sizeof(u64) + sizeof(atom);\n+\tunsigned long flags;\n+\tchar          *buffer;\n+\tsize_t        pos = 0;\n+\n+\tbuffer = kbasep_tlstream_msgbuf_acquire(\n+\t\t\tTL_STREAM_TYPE_OBJ,\n+\t\t\tmsg_size, &flags);\n+\tKBASE_DEBUG_ASSERT(buffer);\n+\n+\tpos = kbasep_tlstream_write_bytes(buffer, pos, &msg_id, sizeof(msg_id));\n+\tpos = kbasep_tlstream_write_timestamp(buffer, pos);\n+\tpos = kbasep_tlstream_write_bytes(\n+\t\t\tbuffer, pos, &atom, sizeof(atom));\n+\tKBASE_DEBUG_ASSERT(msg_size == pos);\n+\n+\tkbasep_tlstream_msgbuf_release(TL_STREAM_TYPE_OBJ, flags);\n+}\n+\n void __kbase_tlstream_jd_gpu_soft_reset(void *gpu)\n {\n \tconst u32     msg_id = KBASE_JD_GPU_SOFT_RESET;\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_tlstream.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_tlstream.h\nindex c0a1117d5f25c1..bfa25d98264add 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_tlstream.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_tlstream.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #if !defined(_KBASE_TLSTREAM_H)\n #define _KBASE_TLSTREAM_H\n \n@@ -134,7 +139,7 @@ void __kbase_tlstream_tl_attrib_atom_config(\n \t\tvoid *atom, u64 jd, u64 affinity, u32 config);\n void __kbase_tlstream_tl_attrib_atom_priority(void *atom, u32 prio);\n void __kbase_tlstream_tl_attrib_atom_state(void *atom, u32 state);\n-void __kbase_tlstream_tl_attrib_atom_priority_change(void *atom);\n+void __kbase_tlstream_tl_attrib_atom_prioritized(void *atom);\n void __kbase_tlstream_tl_attrib_atom_jit(\n \t\tvoid *atom, u64 edit_addr, u64 new_addr);\n void __kbase_tlstream_tl_attrib_as_config(\n@@ -142,6 +147,8 @@ void __kbase_tlstream_tl_attrib_as_config(\n void __kbase_tlstream_tl_event_atom_softstop_ex(void *atom);\n void __kbase_tlstream_tl_event_lpu_softstop(void *lpu);\n void __kbase_tlstream_tl_event_atom_softstop_issue(void *atom);\n+void __kbase_tlstream_tl_event_atom_softjob_start(void *atom);\n+void __kbase_tlstream_tl_event_atom_softjob_end(void *atom);\n void __kbase_tlstream_jd_gpu_soft_reset(void *gpu);\n void __kbase_tlstream_aux_pm_state(u32 core_type, u64 state);\n void __kbase_tlstream_aux_pagefault(u32 ctx_nr, u64 page_count_change);\n@@ -480,13 +487,13 @@ extern atomic_t kbase_tlstream_enabled;\n \t__TRACE_IF_ENABLED_LATENCY(tl_attrib_atom_state, atom, state)\n \n /**\n- * KBASE_TLSTREAM_TL_ATTRIB_ATOM_PRIORITY_CHANGE - atom caused priority change\n+ * KBASE_TLSTREAM_TL_ATTRIB_ATOM_PRIORITIZED - atom was prioritized\n  * @atom:  name of the atom object\n  *\n  * Function emits a timeline message signalling priority change\n  */\n-#define KBASE_TLSTREAM_TL_ATTRIB_ATOM_PRIORITY_CHANGE(atom) \\\n-\t__TRACE_IF_ENABLED_LATENCY(tl_attrib_atom_priority_change, atom)\n+#define KBASE_TLSTREAM_TL_ATTRIB_ATOM_PRIORITIZED(atom) \\\n+\t__TRACE_IF_ENABLED_LATENCY(tl_attrib_atom_prioritized, atom)\n \n /**\n  * KBASE_TLSTREAM_TL_ATTRIB_ATOM_JIT - jit happened on atom\n@@ -510,26 +517,40 @@ extern atomic_t kbase_tlstream_enabled;\n \t__TRACE_IF_ENABLED(tl_attrib_as_config, as, transtab, memattr, transcfg)\n \n /**\n- * KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTSTOP_ex\n+ * KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTSTOP_EX\n  * @atom:       atom identifier\n  */\n #define KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTSTOP_EX(atom) \\\n \t__TRACE_IF_ENABLED(tl_event_atom_softstop_ex, atom)\n \n /**\n- * KBASE_TLSTREAM_TL_EVENT_LPU_softstop\n+ * KBASE_TLSTREAM_TL_EVENT_LPU_SOFTSTOP\n  * @lpu:        name of the LPU object\n  */\n #define KBASE_TLSTREAM_TL_EVENT_LPU_SOFTSTOP(lpu) \\\n \t__TRACE_IF_ENABLED(tl_event_lpu_softstop, lpu)\n \n /**\n- * KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTSTOP_issue\n+ * KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTSTOP_ISSUE\n  * @atom:       atom identifier\n  */\n #define KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTSTOP_ISSUE(atom) \\\n \t__TRACE_IF_ENABLED(tl_event_atom_softstop_issue, atom)\n \n+/**\n+ * KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTJOB_START\n+ * @atom:       atom identifier\n+ */\n+#define KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTJOB_START(atom) \\\n+\t__TRACE_IF_ENABLED(tl_event_atom_softjob_start, atom)\n+\n+/**\n+ * KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTJOB_END\n+ * @atom:       atom identifier\n+ */\n+#define KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTJOB_END(atom) \\\n+\t__TRACE_IF_ENABLED(tl_event_atom_softjob_end, atom)\n+\n /**\n  * KBASE_TLSTREAM_JD_GPU_SOFT_RESET - The GPU is being soft reset\n  * @gpu:        name of the GPU object\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_defs.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_defs.h\nindex e2e0544208cea1..32fffe0d80a93c 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_defs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_defs.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /* ***** IMPORTANT: THIS IS NOT A NORMAL HEADER FILE         *****\n  * *****            DO NOT INCLUDE DIRECTLY                  *****\n  * *****            THE LACK OF HEADER GUARDS IS INTENTIONAL ***** */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_timeline.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_timeline.c\nindex d9854749f45bf3..d6b6f5c31d5c0c 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_timeline.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_timeline.c\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #include <mali_kbase.h>\n #include <mali_kbase_jm.h>\n #include <mali_kbase_hwaccess_jm.h>\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_timeline.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_timeline.h\nindex 4b517f396f8c19..306da6d3cb8016 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_timeline.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_timeline.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #if !defined(_KBASE_TRACE_TIMELINE_H)\n #define _KBASE_TRACE_TIMELINE_H\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_timeline_defs.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_timeline_defs.h\nindex 156a95a67f4aef..114bcac541e923 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_timeline_defs.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_trace_timeline_defs.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /* ***** IMPORTANT: THIS IS NOT A NORMAL HEADER FILE         *****\n  * *****            DO NOT INCLUDE DIRECTLY                  *****\n  * *****            THE LACK OF HEADER GUARDS IS INTENTIONAL ***** */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_utility.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_utility.c\nindex be474ff8740124..3ea234aabeecde 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_utility.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_utility.c\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #include <mali_kbase.h>\n \n bool kbasep_list_member_of(const struct list_head *base, struct list_head *entry)\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_utility.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_utility.h\nindex fd7252dab0de25..f2e5a3381e13c3 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_utility.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_utility.h\n@@ -1,22 +1,27 @@\n /*\n  *\n- * (C) COPYRIGHT 2012-2013, 2015 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2012-2013, 2015, 2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #ifndef _KBASE_UTILITY_H\n #define _KBASE_UTILITY_H\n \n@@ -34,4 +39,28 @@\n  */\n bool kbasep_list_member_of(const struct list_head *base, struct list_head *entry);\n \n+\n+static inline void kbase_timer_setup(struct timer_list *timer,\n+\t\t\t\t     void (*callback)(struct timer_list *timer))\n+{\n+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)\n+\tsetup_timer(timer, (void (*)(unsigned long)) callback,\n+\t\t\t(unsigned long) timer);\n+#else\n+\ttimer_setup(timer, callback, 0);\n+#endif\n+}\n+\n+#ifndef WRITE_ONCE\n+\t#ifdef ASSIGN_ONCE\n+\t\t#define WRITE_ONCE(x, val) ASSIGN_ONCE(val, x)\n+\t#else\n+\t\t#define WRITE_ONCE(x, val) (ACCESS_ONCE(x) = (val))\n+\t#endif\n+#endif\n+\n+#ifndef READ_ONCE\n+\t#define READ_ONCE(x) ACCESS_ONCE(x)\n+#endif\n+\n #endif\t\t\t\t/* _KBASE_UTILITY_H */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_vinstr.c b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_vinstr.c\nindex 9c5b2e46c0e550..e25338b3544af3 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_vinstr.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_vinstr.c\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2011-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2011-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <linux/anon_inodes.h>\n #include <linux/atomic.h>\n #include <linux/hrtimer.h>\n@@ -33,6 +38,9 @@\n #include <mali_kbase_hwcnt_reader.h>\n #include <mali_kbase_mem_linux.h>\n #include <mali_kbase_tlstream.h>\n+#ifdef CONFIG_MALI_BIFROST_NO_MALI\n+#include <backend/gpu/mali_kbase_model_dummy.h>\n+#endif\n \n /*****************************************************************************/\n \n@@ -74,7 +82,9 @@ enum vinstr_state {\n \n /**\n  * struct kbase_vinstr_context - vinstr context per device\n- * @lock:              protects the entire vinstr context\n+ * @lock:              protects the entire vinstr context, but the list of\n+ *                     vinstr clients can be updated outside the lock using\n+ *                     @state_lock.\n  * @kbdev:             pointer to kbase device\n  * @kctx:              pointer to kbase context\n  * @vmap:              vinstr vmap for mapping hwcnt dump buffer\n@@ -86,12 +96,14 @@ enum vinstr_state {\n  * @reprogram:         when true, reprogram hwcnt block with the new set of\n  *                     counters\n  * @state:             vinstr state\n- * @state_lock:        protects information about vinstr state\n+ * @state_lock:        protects information about vinstr state and list of\n+ *                     clients.\n  * @suspend_waitq:     notification queue to trigger state re-validation\n  * @suspend_cnt:       reference counter of vinstr's suspend state\n  * @suspend_work:      worker to execute on entering suspended state\n  * @resume_work:       worker to execute on leaving suspended state\n- * @nclients:          number of attached clients, pending or otherwise\n+ * @nclients:          number of attached clients, pending or idle\n+ * @nclients_suspended: number of attached but suspended clients\n  * @waiting_clients:   head of list of clients being periodically sampled\n  * @idle_clients:      head of list of clients being idle\n  * @suspended_clients: head of list of clients being suspended\n@@ -101,6 +113,10 @@ enum vinstr_state {\n  * @clients_present:   when true, we have at least one client\n  *                     Note: this variable is in sync. with nclients and is\n  *                     present to preserve simplicity. Protected by state_lock.\n+ * @need_suspend:      when true, a suspend has been requested while a resume is\n+ *                     in progress. Resume worker should queue a suspend.\n+ * @need_resume:       when true, a resume has been requested while a suspend is\n+ *                     in progress. Suspend worker should queue a resume.\n  */\n struct kbase_vinstr_context {\n \tstruct mutex             lock;\n@@ -122,6 +138,7 @@ struct kbase_vinstr_context {\n \tstruct work_struct       resume_work;\n \n \tu32                      nclients;\n+\tu32                      nclients_suspended;\n \tstruct list_head         waiting_clients;\n \tstruct list_head         idle_clients;\n \tstruct list_head         suspended_clients;\n@@ -131,6 +148,9 @@ struct kbase_vinstr_context {\n \tatomic_t                 request_pending;\n \n \tbool                     clients_present;\n+\n+\tbool                     need_suspend;\n+\tbool                     need_resume;\n };\n \n /**\n@@ -153,6 +173,7 @@ struct kbase_vinstr_context {\n  * @write_idx:     index of buffer being written by dumping service\n  * @waitq:         client's notification queue\n  * @pending:       when true, client has attached but hwcnt not yet updated\n+ * @suspended:     when true, client is suspended\n  */\n struct kbase_vinstr_client {\n \tstruct kbase_vinstr_context        *vinstr_ctx;\n@@ -173,6 +194,7 @@ struct kbase_vinstr_client {\n \tatomic_t                           write_idx;\n \twait_queue_head_t                  waitq;\n \tbool                               pending;\n+\tbool                               suspended;\n };\n \n /**\n@@ -187,6 +209,9 @@ struct kbasep_vinstr_wake_up_timer {\n \n /*****************************************************************************/\n \n+static void kbase_vinstr_update_suspend(\n+\t\tstruct kbase_vinstr_context *vinstr_ctx);\n+\n static int kbasep_vinstr_service_task(void *data);\n \n static unsigned int kbasep_vinstr_hwcnt_reader_poll(\n@@ -218,14 +243,14 @@ static int enable_hwcnt(struct kbase_vinstr_context *vinstr_ctx)\n {\n \tstruct kbase_context *kctx = vinstr_ctx->kctx;\n \tstruct kbase_device *kbdev = kctx->kbdev;\n-\tstruct kbase_uk_hwcnt_setup setup;\n+\tstruct kbase_ioctl_hwcnt_enable enable;\n \tint err;\n \n-\tsetup.dump_buffer = vinstr_ctx->gpu_va;\n-\tsetup.jm_bm       = vinstr_ctx->bitmap[JM_HWCNT_BM];\n-\tsetup.tiler_bm    = vinstr_ctx->bitmap[TILER_HWCNT_BM];\n-\tsetup.shader_bm   = vinstr_ctx->bitmap[SHADER_HWCNT_BM];\n-\tsetup.mmu_l2_bm   = vinstr_ctx->bitmap[MMU_L2_HWCNT_BM];\n+\tenable.dump_buffer = vinstr_ctx->gpu_va;\n+\tenable.jm_bm       = vinstr_ctx->bitmap[JM_HWCNT_BM];\n+\tenable.tiler_bm    = vinstr_ctx->bitmap[TILER_HWCNT_BM];\n+\tenable.shader_bm   = vinstr_ctx->bitmap[SHADER_HWCNT_BM];\n+\tenable.mmu_l2_bm   = vinstr_ctx->bitmap[MMU_L2_HWCNT_BM];\n \n \t/* Mark the context as active so the GPU is kept turned on */\n \t/* A suspend won't happen here, because we're in a syscall from a\n@@ -234,7 +259,7 @@ static int enable_hwcnt(struct kbase_vinstr_context *vinstr_ctx)\n \n \t/* Schedule the context in */\n \tkbasep_js_schedule_privileged_ctx(kbdev, kctx);\n-\terr = kbase_instr_hwcnt_enable_internal(kbdev, kctx, &setup);\n+\terr = kbase_instr_hwcnt_enable_internal(kbdev, kctx, &enable);\n \tif (err) {\n \t\t/* Release the context. This had its own Power Manager Active\n \t\t * reference */\n@@ -464,18 +489,24 @@ static void kbasep_vinstr_destroy_kctx(struct kbase_vinstr_context *vinstr_ctx)\n \tstruct kbasep_kctx_list_element *element;\n \tstruct kbasep_kctx_list_element *tmp;\n \tbool                            found = false;\n+\tbool                            hwcnt_disabled = false;\n \tunsigned long                   flags;\n \n \t/* Release hw counters dumping resources. */\n \tvinstr_ctx->thread = NULL;\n-\tdisable_hwcnt(vinstr_ctx);\n-\tkbasep_vinstr_unmap_kernel_dump_buffer(vinstr_ctx);\n \n \t/* Simplify state transitions by specifying that we have no clients. */\n \tspin_lock_irqsave(&vinstr_ctx->state_lock, flags);\n \tvinstr_ctx->clients_present = false;\n+\tif ((VINSTR_SUSPENDED == vinstr_ctx->state) || (VINSTR_RESUMING == vinstr_ctx->state))\n+\t\thwcnt_disabled = true;\n \tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n \n+\tif (!hwcnt_disabled)\n+\t\tdisable_hwcnt(vinstr_ctx);\n+\n+\tkbasep_vinstr_unmap_kernel_dump_buffer(vinstr_ctx);\n+\n \t/* Remove kernel context from the device's contexts list. */\n \tmutex_lock(&kbdev->kctx_list_lock);\n \tlist_for_each_entry_safe(element, tmp, &kbdev->kctx_list, link) {\n@@ -515,6 +546,8 @@ static struct kbase_vinstr_client *kbasep_vinstr_attach_client(\n {\n \tstruct task_struct         *thread = NULL;\n \tstruct kbase_vinstr_client *cli;\n+\tunsigned long flags;\n+\tbool clients_present = false;\n \n \tKBASE_DEBUG_ASSERT(vinstr_ctx);\n \n@@ -540,10 +573,14 @@ static struct kbase_vinstr_client *kbasep_vinstr_attach_client(\n \thwcnt_bitmap_union(vinstr_ctx->bitmap, cli->bitmap);\n \tvinstr_ctx->reprogram = true;\n \n+\tspin_lock_irqsave(&vinstr_ctx->state_lock, flags);\n+\tclients_present = (vinstr_ctx->nclients || vinstr_ctx->nclients_suspended);\n+\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n+\n \t/* If this is the first client, create the vinstr kbase\n \t * context. This context is permanently resident until the\n \t * last client exits. */\n-\tif (!vinstr_ctx->nclients) {\n+\tif (!clients_present) {\n \t\thwcnt_bitmap_set(vinstr_ctx->bitmap, cli->bitmap);\n \t\tif (kbasep_vinstr_create_kctx(vinstr_ctx) < 0)\n \t\t\tgoto error;\n@@ -598,8 +635,11 @@ static struct kbase_vinstr_client *kbasep_vinstr_attach_client(\n \tatomic_set(&cli->write_idx, 0);\n \tinit_waitqueue_head(&cli->waitq);\n \n+\tspin_lock_irqsave(&vinstr_ctx->state_lock, flags);\n \tvinstr_ctx->nclients++;\n \tlist_add(&cli->list, &vinstr_ctx->idle_clients);\n+\tkbase_vinstr_update_suspend(vinstr_ctx);\n+\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n \n \tmutex_unlock(&vinstr_ctx->lock);\n \n@@ -612,7 +652,7 @@ static struct kbase_vinstr_client *kbasep_vinstr_attach_client(\n \t\t\t\t(unsigned long)cli->dump_buffers,\n \t\t\t\tget_order(cli->dump_size * cli->buffer_count));\n \tkfree(cli->accum_buffer);\n-\tif (!vinstr_ctx->nclients && vinstr_ctx->kctx) {\n+\tif (!clients_present && vinstr_ctx->kctx) {\n \t\tthread = vinstr_ctx->thread;\n \t\tkbasep_vinstr_destroy_kctx(vinstr_ctx);\n \t}\n@@ -634,18 +674,19 @@ void kbase_vinstr_detach_client(struct kbase_vinstr_client *cli)\n \tstruct task_struct          *thread = NULL;\n \tu32 zerobitmap[4] = { 0 };\n \tint cli_found = 0;\n+\tunsigned long flags;\n+\tbool clients_present;\n \n \tKBASE_DEBUG_ASSERT(cli);\n \tvinstr_ctx = cli->vinstr_ctx;\n \tKBASE_DEBUG_ASSERT(vinstr_ctx);\n \n \tmutex_lock(&vinstr_ctx->lock);\n+\tspin_lock_irqsave(&vinstr_ctx->state_lock, flags);\n \n \tlist_for_each_entry_safe(iter, tmp, &vinstr_ctx->idle_clients, list) {\n \t\tif (iter == cli) {\n-\t\t\tvinstr_ctx->reprogram = true;\n \t\t\tcli_found = 1;\n-\t\t\tlist_del(&iter->list);\n \t\t\tbreak;\n \t\t}\n \t}\n@@ -653,15 +694,47 @@ void kbase_vinstr_detach_client(struct kbase_vinstr_client *cli)\n \t\tlist_for_each_entry_safe(\n \t\t\t\titer, tmp, &vinstr_ctx->waiting_clients, list) {\n \t\t\tif (iter == cli) {\n-\t\t\t\tvinstr_ctx->reprogram = true;\n \t\t\t\tcli_found = 1;\n-\t\t\t\tlist_del(&iter->list);\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\t}\n+\tif (!cli_found) {\n+\t\tlist_for_each_entry_safe(\n+\t\t\t\titer, tmp, &vinstr_ctx->suspended_clients, list) {\n+\t\t\tif (iter == cli) {\n+\t\t\t\tcli_found = 1;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \tKBASE_DEBUG_ASSERT(cli_found);\n \n+\tif (cli_found) {\n+\t\tvinstr_ctx->reprogram = true;\n+\t\tlist_del(&iter->list);\n+\t}\n+\n+\tif (!cli->suspended)\n+\t\tvinstr_ctx->nclients--;\n+\telse\n+\t\tvinstr_ctx->nclients_suspended--;\n+\n+\tkbase_vinstr_update_suspend(vinstr_ctx);\n+\n+\tclients_present = (vinstr_ctx->nclients || vinstr_ctx->nclients_suspended);\n+\n+\t/* Rebuild context bitmap now that the client has detached */\n+\thwcnt_bitmap_set(vinstr_ctx->bitmap, zerobitmap);\n+\tlist_for_each_entry(iter, &vinstr_ctx->idle_clients, list)\n+\t\thwcnt_bitmap_union(vinstr_ctx->bitmap, iter->bitmap);\n+\tlist_for_each_entry(iter, &vinstr_ctx->waiting_clients, list)\n+\t\thwcnt_bitmap_union(vinstr_ctx->bitmap, iter->bitmap);\n+\tlist_for_each_entry(iter, &vinstr_ctx->suspended_clients, list)\n+\t\thwcnt_bitmap_union(vinstr_ctx->bitmap, iter->bitmap);\n+\n+\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n+\n \tkfree(cli->dump_buffers_meta);\n \tfree_pages(\n \t\t\t(unsigned long)cli->dump_buffers,\n@@ -669,19 +742,11 @@ void kbase_vinstr_detach_client(struct kbase_vinstr_client *cli)\n \tkfree(cli->accum_buffer);\n \tkfree(cli);\n \n-\tvinstr_ctx->nclients--;\n-\tif (!vinstr_ctx->nclients) {\n+\tif (!clients_present) {\n \t\tthread = vinstr_ctx->thread;\n \t\tkbasep_vinstr_destroy_kctx(vinstr_ctx);\n \t}\n \n-\t/* Rebuild context bitmap now that the client has detached */\n-\thwcnt_bitmap_set(vinstr_ctx->bitmap, zerobitmap);\n-\tlist_for_each_entry(iter, &vinstr_ctx->idle_clients, list)\n-\t\thwcnt_bitmap_union(vinstr_ctx->bitmap, iter->bitmap);\n-\tlist_for_each_entry(iter, &vinstr_ctx->waiting_clients, list)\n-\t\thwcnt_bitmap_union(vinstr_ctx->bitmap, iter->bitmap);\n-\n \tmutex_unlock(&vinstr_ctx->lock);\n \n \t/* Thread must be stopped after lock is released. */\n@@ -970,8 +1035,7 @@ static int kbasep_vinstr_collect_and_accumulate(\n \tWARN_ON(rcode);\n \n \tspin_lock_irqsave(&vinstr_ctx->state_lock, flags);\n-\tswitch (vinstr_ctx->state)\n-\t{\n+\tswitch (vinstr_ctx->state) {\n \tcase VINSTR_SUSPENDING:\n \t\tschedule_work(&vinstr_ctx->suspend_work);\n \t\tbreak;\n@@ -982,12 +1046,13 @@ static int kbasep_vinstr_collect_and_accumulate(\n \tdefault:\n \t\tbreak;\n \t}\n-\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n \n \t/* Accumulate values of collected counters. */\n \tif (!rcode)\n \t\taccum_clients(vinstr_ctx);\n \n+\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n+\n \treturn rcode;\n }\n \n@@ -1092,6 +1157,7 @@ static void kbasep_vinstr_reprogram(\n \n \t\tif (!reprogram_hwcnt(vinstr_ctx)) {\n \t\t\tvinstr_ctx->reprogram = false;\n+\t\t\tspin_lock_irqsave(&vinstr_ctx->state_lock, flags);\n \t\t\tlist_for_each_entry(\n \t\t\t\t\titer,\n \t\t\t\t\t&vinstr_ctx->idle_clients,\n@@ -1102,6 +1168,7 @@ static void kbasep_vinstr_reprogram(\n \t\t\t\t\t&vinstr_ctx->waiting_clients,\n \t\t\t\t\tlist)\n \t\t\t\titer->pending = false;\n+\t\t\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n \t\t}\n \t}\n }\n@@ -1120,6 +1187,7 @@ static int kbasep_vinstr_update_client(\n \t\tenum base_hwcnt_reader_event event_id)\n {\n \tint rcode = 0;\n+\tunsigned long flags;\n \n \t/* Copy collected counters to user readable buffer. */\n \tif (cli->buffer_count)\n@@ -1130,18 +1198,23 @@ static int kbasep_vinstr_update_client(\n \telse\n \t\trcode = kbasep_vinstr_fill_dump_buffer_legacy(cli);\n \n+\t/* Prepare for next request. */\n+\tmemset(cli->accum_buffer, 0, cli->dump_size);\n+\n+\tspin_lock_irqsave(&cli->vinstr_ctx->state_lock, flags);\n+\t/* Check if client was put to suspend state while it was being updated */\n+\tif (cli->suspended)\n+\t\trcode = -EINVAL;\n+\tspin_unlock_irqrestore(&cli->vinstr_ctx->state_lock, flags);\n+\n \tif (rcode)\n \t\tgoto exit;\n \n-\n \t/* Notify client. Make sure all changes to memory are visible. */\n \twmb();\n \tatomic_inc(&cli->write_idx);\n \twake_up_interruptible(&cli->waitq);\n \n-\t/* Prepare for next request. */\n-\tmemset(cli->accum_buffer, 0, cli->dump_size);\n-\n exit:\n \treturn rcode;\n }\n@@ -1200,6 +1273,7 @@ static int kbasep_vinstr_service_task(void *data)\n \t\tstruct kbase_vinstr_client *cli = NULL;\n \t\tstruct kbase_vinstr_client *tmp;\n \t\tint                        rcode;\n+\t\tunsigned long              flags;\n \n \t\tu64              timestamp = kbasep_vinstr_get_timestamp();\n \t\tu64              dump_time = 0;\n@@ -1212,6 +1286,7 @@ static int kbasep_vinstr_service_task(void *data)\n \t\tif (current == vinstr_ctx->thread) {\n \t\t\tatomic_set(&vinstr_ctx->request_pending, 0);\n \n+\t\t\tspin_lock_irqsave(&vinstr_ctx->state_lock, flags);\n \t\t\tif (!list_empty(&vinstr_ctx->waiting_clients)) {\n \t\t\t\tcli = list_first_entry(\n \t\t\t\t\t\t&vinstr_ctx->waiting_clients,\n@@ -1219,6 +1294,7 @@ static int kbasep_vinstr_service_task(void *data)\n \t\t\t\t\t\tlist);\n \t\t\t\tdump_time = cli->dump_time;\n \t\t\t}\n+\t\t\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n \t\t}\n \n \t\tif (!cli || ((s64)timestamp - (s64)dump_time < 0ll)) {\n@@ -1247,6 +1323,7 @@ static int kbasep_vinstr_service_task(void *data)\n \n \t\tINIT_LIST_HEAD(&expired_requests);\n \n+\t\tspin_lock_irqsave(&vinstr_ctx->state_lock, flags);\n \t\t/* Find all expired requests. */\n \t\tlist_for_each_entry_safe(\n \t\t\t\tcli,\n@@ -1265,18 +1342,29 @@ static int kbasep_vinstr_service_task(void *data)\n \t\t}\n \n \t\t/* Fill data for each request found. */\n-\t\tlist_for_each_entry_safe(cli, tmp, &expired_requests, list) {\n+\t\twhile (!list_empty(&expired_requests)) {\n+\t\t\tcli = list_first_entry(&expired_requests,\n+\t\t\t\t\tstruct kbase_vinstr_client, list);\n+\n \t\t\t/* Ensure that legacy buffer will not be used from\n \t\t\t * this kthread context. */\n \t\t\tBUG_ON(0 == cli->buffer_count);\n \t\t\t/* Expect only periodically sampled clients. */\n \t\t\tBUG_ON(0 == cli->dump_interval);\n \n+\t\t\t/* Release the spinlock, as filling the data in client's\n+\t\t\t * userspace buffer could result in page faults. */\n+\t\t\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n \t\t\tif (!rcode)\n \t\t\t\tkbasep_vinstr_update_client(\n \t\t\t\t\t\tcli,\n \t\t\t\t\t\ttimestamp,\n \t\t\t\t\t\tBASE_HWCNT_READER_EVENT_PERIODIC);\n+\t\t\tspin_lock_irqsave(&cli->vinstr_ctx->state_lock, flags);\n+\n+\t\t\t/* This client got suspended, move to the next one. */\n+\t\t\tif (cli->suspended)\n+\t\t\t\tcontinue;\n \n \t\t\t/* Set new dumping time. Drop missed probing times. */\n \t\t\tdo {\n@@ -1288,6 +1376,7 @@ static int kbasep_vinstr_service_task(void *data)\n \t\t\t\t\tcli,\n \t\t\t\t\t&vinstr_ctx->waiting_clients);\n \t\t}\n+\t\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n \n \t\t/* Reprogram counters set if required. */\n \t\tkbasep_vinstr_reprogram(vinstr_ctx);\n@@ -1402,10 +1491,18 @@ static long kbasep_vinstr_hwcnt_reader_ioctl_set_interval(\n \t\tstruct kbase_vinstr_client *cli, u32 interval)\n {\n \tstruct kbase_vinstr_context *vinstr_ctx = cli->vinstr_ctx;\n+\tunsigned long flags;\n \n \tKBASE_DEBUG_ASSERT(vinstr_ctx);\n \n \tmutex_lock(&vinstr_ctx->lock);\n+\tspin_lock_irqsave(&vinstr_ctx->state_lock, flags);\n+\n+\tif (cli->suspended) {\n+\t\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n+\t\tmutex_unlock(&vinstr_ctx->lock);\n+\t\treturn -ENOMEM;\n+\t}\n \n \tlist_del(&cli->list);\n \n@@ -1427,6 +1524,7 @@ static long kbasep_vinstr_hwcnt_reader_ioctl_set_interval(\n \t\tlist_add(&cli->list, &vinstr_ctx->idle_clients);\n \t}\n \n+\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n \tmutex_unlock(&vinstr_ctx->lock);\n \n \treturn 0;\n@@ -1731,17 +1829,29 @@ static void kbasep_vinstr_suspend_worker(struct work_struct *data)\n \tspin_lock_irqsave(&vinstr_ctx->state_lock, flags);\n \tvinstr_ctx->state = VINSTR_SUSPENDED;\n \twake_up_all(&vinstr_ctx->suspend_waitq);\n-\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n \n-\tmutex_unlock(&vinstr_ctx->lock);\n+\tif (vinstr_ctx->need_resume) {\n+\t\tvinstr_ctx->need_resume = false;\n+\t\tvinstr_ctx->state = VINSTR_RESUMING;\n+\t\tschedule_work(&vinstr_ctx->resume_work);\n \n-\t/* Kick GPU scheduler to allow entering protected mode.\n-\t * This must happen after vinstr was suspended. */\n-\tkbasep_vinstr_kick_scheduler(vinstr_ctx->kbdev);\n+\t\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n+\n+\t\tmutex_unlock(&vinstr_ctx->lock);\n+\t} else {\n+\t\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n+\n+\t\tmutex_unlock(&vinstr_ctx->lock);\n+\n+\t\t/* Kick GPU scheduler to allow entering protected mode.\n+\t\t * This must happen after vinstr was suspended.\n+\t\t */\n+\t\tkbasep_vinstr_kick_scheduler(vinstr_ctx->kbdev);\n+\t}\n }\n \n /**\n- * kbasep_vinstr_suspend_worker - worker resuming vinstr module\n+ * kbasep_vinstr_resume_worker - worker resuming vinstr module\n  * @data: pointer to work structure\n  */\n static void kbasep_vinstr_resume_worker(struct work_struct *data)\n@@ -1760,15 +1870,27 @@ static void kbasep_vinstr_resume_worker(struct work_struct *data)\n \tspin_lock_irqsave(&vinstr_ctx->state_lock, flags);\n \tvinstr_ctx->state = VINSTR_IDLE;\n \twake_up_all(&vinstr_ctx->suspend_waitq);\n-\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n \n-\tmutex_unlock(&vinstr_ctx->lock);\n+\tif (vinstr_ctx->need_suspend) {\n+\t\tvinstr_ctx->need_suspend = false;\n+\t\tvinstr_ctx->state = VINSTR_SUSPENDING;\n+\t\tschedule_work(&vinstr_ctx->suspend_work);\n+\n+\t\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n+\n+\t\tmutex_unlock(&vinstr_ctx->lock);\n+\t} else {\n+\t\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n \n-\t/* Kick GPU scheduler to allow entering protected mode.\n-\t * Note that scheduler state machine might requested re-entry to\n-\t * protected mode before vinstr was resumed.\n-\t * This must happen after vinstr was release. */\n-\tkbasep_vinstr_kick_scheduler(vinstr_ctx->kbdev);\n+\t\tmutex_unlock(&vinstr_ctx->lock);\n+\n+\t\t/* Kick GPU scheduler to allow entering protected mode.\n+\t\t * Note that scheduler state machine might requested re-entry to\n+\t\t * protected mode before vinstr was resumed.\n+\t\t * This must happen after vinstr was release.\n+\t\t */\n+\t\tkbasep_vinstr_kick_scheduler(vinstr_ctx->kbdev);\n+\t}\n }\n \n /*****************************************************************************/\n@@ -1783,6 +1905,7 @@ struct kbase_vinstr_context *kbase_vinstr_init(struct kbase_device *kbdev)\n \n \tINIT_LIST_HEAD(&vinstr_ctx->idle_clients);\n \tINIT_LIST_HEAD(&vinstr_ctx->waiting_clients);\n+\tINIT_LIST_HEAD(&vinstr_ctx->suspended_clients);\n \tmutex_init(&vinstr_ctx->lock);\n \tspin_lock_init(&vinstr_ctx->state_lock);\n \tvinstr_ctx->kbdev = kbdev;\n@@ -1816,27 +1939,35 @@ void kbase_vinstr_term(struct kbase_vinstr_context *vinstr_ctx)\n \n \t\tif (list_empty(list)) {\n \t\t\tlist = &vinstr_ctx->waiting_clients;\n-\t\t\tif (list_empty(list))\n-\t\t\t\tbreak;\n+\t\t\tif (list_empty(list)) {\n+\t\t\t\tlist = &vinstr_ctx->suspended_clients;\n+\t\t\t\tif (list_empty(list))\n+\t\t\t\t\tbreak;\n+\t\t\t}\n \t\t}\n \n \t\tcli = list_first_entry(list, struct kbase_vinstr_client, list);\n \t\tlist_del(&cli->list);\n+\t\tif (!cli->suspended)\n+\t\t\tvinstr_ctx->nclients--;\n+\t\telse\n+\t\t\tvinstr_ctx->nclients_suspended--;\n \t\tkfree(cli->accum_buffer);\n \t\tkfree(cli);\n-\t\tvinstr_ctx->nclients--;\n \t}\n \tKBASE_DEBUG_ASSERT(!vinstr_ctx->nclients);\n+\tKBASE_DEBUG_ASSERT(!vinstr_ctx->nclients_suspended);\n \tif (vinstr_ctx->kctx)\n \t\tkbasep_vinstr_destroy_kctx(vinstr_ctx);\n \tkfree(vinstr_ctx);\n }\n \n int kbase_vinstr_hwcnt_reader_setup(struct kbase_vinstr_context *vinstr_ctx,\n-\t\tstruct kbase_uk_hwcnt_reader_setup *setup)\n+\t\tstruct kbase_ioctl_hwcnt_reader_setup *setup)\n {\n \tstruct kbase_vinstr_client  *cli;\n \tu32                         bitmap[4];\n+\tint                         fd;\n \n \tKBASE_DEBUG_ASSERT(vinstr_ctx);\n \tKBASE_DEBUG_ASSERT(setup);\n@@ -1851,31 +1982,32 @@ int kbase_vinstr_hwcnt_reader_setup(struct kbase_vinstr_context *vinstr_ctx,\n \t\t\tvinstr_ctx,\n \t\t\tsetup->buffer_count,\n \t\t\tbitmap,\n-\t\t\t&setup->fd,\n+\t\t\t&fd,\n \t\t\tNULL);\n \n \tif (!cli)\n \t\treturn -ENOMEM;\n \n-\treturn 0;\n+\tkbase_vinstr_wait_for_ready(vinstr_ctx);\n+\treturn fd;\n }\n \n int kbase_vinstr_legacy_hwc_setup(\n \t\tstruct kbase_vinstr_context *vinstr_ctx,\n \t\tstruct kbase_vinstr_client  **cli,\n-\t\tstruct kbase_uk_hwcnt_setup *setup)\n+\t\tstruct kbase_ioctl_hwcnt_enable *enable)\n {\n \tKBASE_DEBUG_ASSERT(vinstr_ctx);\n-\tKBASE_DEBUG_ASSERT(setup);\n+\tKBASE_DEBUG_ASSERT(enable);\n \tKBASE_DEBUG_ASSERT(cli);\n \n-\tif (setup->dump_buffer) {\n+\tif (enable->dump_buffer) {\n \t\tu32 bitmap[4];\n \n-\t\tbitmap[SHADER_HWCNT_BM] = setup->shader_bm;\n-\t\tbitmap[TILER_HWCNT_BM]  = setup->tiler_bm;\n-\t\tbitmap[MMU_L2_HWCNT_BM] = setup->mmu_l2_bm;\n-\t\tbitmap[JM_HWCNT_BM]     = setup->jm_bm;\n+\t\tbitmap[SHADER_HWCNT_BM] = enable->shader_bm;\n+\t\tbitmap[TILER_HWCNT_BM]  = enable->tiler_bm;\n+\t\tbitmap[MMU_L2_HWCNT_BM] = enable->mmu_l2_bm;\n+\t\tbitmap[JM_HWCNT_BM]     = enable->jm_bm;\n \n \t\tif (*cli)\n \t\t\treturn -EBUSY;\n@@ -1884,11 +2016,13 @@ int kbase_vinstr_legacy_hwc_setup(\n \t\t\t\tvinstr_ctx,\n \t\t\t\t0,\n \t\t\t\tbitmap,\n-\t\t\t\t(void *)(long)setup->dump_buffer,\n+\t\t\t\t(void *)(uintptr_t)enable->dump_buffer,\n \t\t\t\tNULL);\n \n \t\tif (!(*cli))\n \t\t\treturn -ENOMEM;\n+\n+\t\tkbase_vinstr_wait_for_ready(vinstr_ctx);\n \t} else {\n \t\tif (!*cli)\n \t\t\treturn -EINVAL;\n@@ -1902,9 +2036,10 @@ int kbase_vinstr_legacy_hwc_setup(\n \n struct kbase_vinstr_client *kbase_vinstr_hwcnt_kernel_setup(\n \t\tstruct kbase_vinstr_context *vinstr_ctx,\n-\t\tstruct kbase_uk_hwcnt_reader_setup *setup,\n+\t\tstruct kbase_ioctl_hwcnt_reader_setup *setup,\n \t\tvoid *kernel_buffer)\n {\n+\tstruct kbase_vinstr_client *kernel_client;\n \tu32 bitmap[4];\n \n \tif (!vinstr_ctx || !setup || !kernel_buffer)\n@@ -1915,12 +2050,17 @@ struct kbase_vinstr_client *kbase_vinstr_hwcnt_kernel_setup(\n \tbitmap[MMU_L2_HWCNT_BM] = setup->mmu_l2_bm;\n \tbitmap[JM_HWCNT_BM]     = setup->jm_bm;\n \n-\treturn kbasep_vinstr_attach_client(\n-\t\t\tvinstr_ctx,\n-\t\t\t0,\n-\t\t\tbitmap,\n-\t\t\tNULL,\n-\t\t\tkernel_buffer);\n+\tkernel_client = kbasep_vinstr_attach_client(\n+\t\t\t\tvinstr_ctx,\n+\t\t\t\t0,\n+\t\t\t\tbitmap,\n+\t\t\t\tNULL,\n+\t\t\t\tkernel_buffer);\n+\n+\tif (kernel_client)\n+\t\tkbase_vinstr_wait_for_ready(vinstr_ctx);\n+\n+\treturn kernel_client;\n }\n KBASE_EXPORT_TEST_API(kbase_vinstr_hwcnt_kernel_setup);\n \n@@ -2028,13 +2168,42 @@ int kbase_vinstr_try_suspend(struct kbase_vinstr_context *vinstr_ctx)\n \t\tvinstr_ctx->state = VINSTR_SUSPENDING;\n \t\tbreak;\n \n+\tcase VINSTR_RESUMING:\n+\t\tvinstr_ctx->need_suspend = true;\n+\t\tbreak;\n+\n \tcase VINSTR_SUSPENDING:\n-\t\t/* fall through */\n+\t\tbreak;\n+\n+\tdefault:\n+\t\tKBASE_DEBUG_ASSERT(0);\n+\t\tbreak;\n+\t}\n+\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n+\n+\treturn ret;\n+}\n+\n+static int kbase_vinstr_is_ready(struct kbase_vinstr_context *vinstr_ctx)\n+{\n+\tunsigned long flags;\n+\tint ret = -EAGAIN;\n+\n+\tKBASE_DEBUG_ASSERT(vinstr_ctx);\n+\n+\tspin_lock_irqsave(&vinstr_ctx->state_lock, flags);\n+\tswitch (vinstr_ctx->state) {\n+\tcase VINSTR_SUSPENDED:\n \tcase VINSTR_RESUMING:\n+\tcase VINSTR_SUSPENDING:\n \t\tbreak;\n \n+\tcase VINSTR_IDLE:\n+\tcase VINSTR_DUMPING:\n+\t\tret = 0;\n+\t\tbreak;\n \tdefault:\n-\t\tBUG();\n+\t\tKBASE_DEBUG_ASSERT(0);\n \t\tbreak;\n \t}\n \tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n@@ -2048,6 +2217,58 @@ void kbase_vinstr_suspend(struct kbase_vinstr_context *vinstr_ctx)\n \t\t\t(0 == kbase_vinstr_try_suspend(vinstr_ctx)));\n }\n \n+void kbase_vinstr_wait_for_ready(struct kbase_vinstr_context *vinstr_ctx)\n+{\n+\twait_event(vinstr_ctx->suspend_waitq,\n+\t\t\t(0 == kbase_vinstr_is_ready(vinstr_ctx)));\n+}\n+KBASE_EXPORT_TEST_API(kbase_vinstr_wait_for_ready);\n+\n+/**\n+ * kbase_vinstr_update_suspend - Update vinstr suspend/resume status depending\n+ *                               on nclients\n+ * @vinstr_ctx: vinstr context pointer\n+ *\n+ * This function should be called whenever vinstr_ctx->nclients changes. This\n+ * may cause vinstr to be suspended or resumed, depending on the number of\n+ * clients and whether IPA is suspended or not.\n+ */\n+static void kbase_vinstr_update_suspend(struct kbase_vinstr_context *vinstr_ctx)\n+{\n+\tlockdep_assert_held(&vinstr_ctx->state_lock);\n+\n+\tswitch (vinstr_ctx->state) {\n+\tcase VINSTR_SUSPENDED:\n+\t\tif ((vinstr_ctx->nclients) && (0 == vinstr_ctx->suspend_cnt)) {\n+\t\t\tvinstr_ctx->state = VINSTR_RESUMING;\n+\t\t\tschedule_work(&vinstr_ctx->resume_work);\n+\t\t}\n+\t\tbreak;\n+\n+\tcase VINSTR_SUSPENDING:\n+\t\tif (vinstr_ctx->nclients)\n+\t\t\tvinstr_ctx->need_resume = true;\n+\t\tbreak;\n+\n+\tcase VINSTR_IDLE:\n+\t\tif (!vinstr_ctx->nclients) {\n+\t\t\tvinstr_ctx->state = VINSTR_SUSPENDING;\n+\t\t\tschedule_work(&vinstr_ctx->suspend_work);\n+\t\t}\n+\t\tbreak;\n+\n+\tcase VINSTR_DUMPING:\n+\t\tif (!vinstr_ctx->nclients)\n+\t\t\tvinstr_ctx->state = VINSTR_SUSPENDING;\n+\t\tbreak;\n+\n+\tcase VINSTR_RESUMING:\n+\t\tif (!vinstr_ctx->nclients)\n+\t\t\tvinstr_ctx->need_suspend = true;\n+\t\tbreak;\n+\t}\n+}\n+\n void kbase_vinstr_resume(struct kbase_vinstr_context *vinstr_ctx)\n {\n \tunsigned long flags;\n@@ -2070,3 +2291,45 @@ void kbase_vinstr_resume(struct kbase_vinstr_context *vinstr_ctx)\n \t}\n \tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n }\n+\n+void kbase_vinstr_suspend_client(struct kbase_vinstr_client *client)\n+{\n+\tstruct kbase_vinstr_context *vinstr_ctx = client->vinstr_ctx;\n+\tunsigned long flags;\n+\n+\tspin_lock_irqsave(&vinstr_ctx->state_lock, flags);\n+\n+\tif (!client->suspended) {\n+\t\tlist_del(&client->list);\n+\t\tlist_add(&client->list, &vinstr_ctx->suspended_clients);\n+\n+\t\tvinstr_ctx->nclients--;\n+\t\tvinstr_ctx->nclients_suspended++;\n+\t\tkbase_vinstr_update_suspend(vinstr_ctx);\n+\n+\t\tclient->suspended = true;\n+\t}\n+\n+\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n+}\n+\n+void kbase_vinstr_resume_client(struct kbase_vinstr_client *client)\n+{\n+\tstruct kbase_vinstr_context *vinstr_ctx = client->vinstr_ctx;\n+\tunsigned long flags;\n+\n+\tspin_lock_irqsave(&vinstr_ctx->state_lock, flags);\n+\n+\tif (client->suspended) {\n+\t\tlist_del(&client->list);\n+\t\tlist_add(&client->list, &vinstr_ctx->idle_clients);\n+\n+\t\tvinstr_ctx->nclients++;\n+\t\tvinstr_ctx->nclients_suspended--;\n+\t\tkbase_vinstr_update_suspend(vinstr_ctx);\n+\n+\t\tclient->suspended = false;\n+\t}\n+\n+\tspin_unlock_irqrestore(&vinstr_ctx->state_lock, flags);\n+}\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_vinstr.h b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_vinstr.h\nindex 6207d25aef06ce..d32799f74084d7 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_kbase_vinstr.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_kbase_vinstr.h\n@@ -1,25 +1,30 @@\n /*\n  *\n- * (C) COPYRIGHT 2015-2016 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2015-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KBASE_VINSTR_H_\n #define _KBASE_VINSTR_H_\n \n-#include <mali_kbase.h>\n #include <mali_kbase_hwcnt_reader.h>\n+#include <mali_kbase_ioctl.h>\n \n /*****************************************************************************/\n \n@@ -47,24 +52,24 @@ void kbase_vinstr_term(struct kbase_vinstr_context *vinstr_ctx);\n  * @vinstr_ctx: vinstr context\n  * @setup:      reader's configuration\n  *\n- * Return: zero on success\n+ * Return: file descriptor on success and a (negative) error code otherwise\n  */\n int kbase_vinstr_hwcnt_reader_setup(\n \t\tstruct kbase_vinstr_context        *vinstr_ctx,\n-\t\tstruct kbase_uk_hwcnt_reader_setup *setup);\n+\t\tstruct kbase_ioctl_hwcnt_reader_setup *setup);\n \n /**\n  * kbase_vinstr_legacy_hwc_setup - configure hw counters for dumping\n  * @vinstr_ctx: vinstr context\n  * @cli:        pointer where to store pointer to new vinstr client structure\n- * @setup:      hwc configuration\n+ * @enable:      hwc configuration\n  *\n  * Return: zero on success\n  */\n int kbase_vinstr_legacy_hwc_setup(\n \t\tstruct kbase_vinstr_context *vinstr_ctx,\n \t\tstruct kbase_vinstr_client  **cli,\n-\t\tstruct kbase_uk_hwcnt_setup *setup);\n+\t\tstruct kbase_ioctl_hwcnt_enable *enable);\n \n /**\n  * kbase_vinstr_hwcnt_kernel_setup - configure hw counters for kernel side\n@@ -73,13 +78,13 @@ int kbase_vinstr_legacy_hwc_setup(\n  * @setup:         reader's configuration\n  * @kernel_buffer: pointer to dump buffer\n  *\n- * setup->buffer_count and setup->fd are not used for kernel side clients.\n+ * setup->buffer_count is not used for kernel side clients.\n  *\n  * Return: pointer to client structure, or NULL on failure\n  */\n struct kbase_vinstr_client *kbase_vinstr_hwcnt_kernel_setup(\n \t\tstruct kbase_vinstr_context *vinstr_ctx,\n-\t\tstruct kbase_uk_hwcnt_reader_setup *setup,\n+\t\tstruct kbase_ioctl_hwcnt_reader_setup *setup,\n \t\tvoid *kernel_buffer);\n \n /**\n@@ -128,6 +133,16 @@ int kbase_vinstr_try_suspend(struct kbase_vinstr_context *vinstr_ctx);\n  */\n void kbase_vinstr_suspend(struct kbase_vinstr_context *vinstr_ctx);\n \n+/**\n+ * kbase_vinstr_wait_for_ready - waits for the vinstr context to get ready\n+ * @vinstr_ctx: vinstr context\n+ *\n+ * Function waits for the vinstr to become ready for dumping. It can be in the\n+ * resuming state after the client was attached but the client currently expects\n+ * that vinstr is ready for dumping immediately post attach.\n+ */\n+void kbase_vinstr_wait_for_ready(struct kbase_vinstr_context *vinstr_ctx);\n+\n /**\n  * kbase_vinstr_resume - resumes operation of a given vinstr context\n  * @vinstr_ctx: vinstr context\n@@ -151,5 +166,17 @@ size_t kbase_vinstr_dump_size(struct kbase_device *kbdev);\n  */\n void kbase_vinstr_detach_client(struct kbase_vinstr_client *cli);\n \n+/**\n+ * kbase_vinstr_suspend_client - Suspend vinstr client\n+ * @client: pointer to vinstr client\n+ */\n+void kbase_vinstr_suspend_client(struct kbase_vinstr_client *client);\n+\n+/**\n+ * kbase_vinstr_resume_client - Resume vinstr client\n+ * @client: pointer to vinstr client\n+ */\n+void kbase_vinstr_resume_client(struct kbase_vinstr_client *client);\n+\n #endif /* _KBASE_VINSTR_H_ */\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_linux_kbase_trace.h b/drivers/gpu/arm/bifrost_for_linux/mali_linux_kbase_trace.h\nindex 5d6b4021d626f8..da2ffaffccc733 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_linux_kbase_trace.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_linux_kbase_trace.h\n@@ -7,15 +7,20 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n-\n-\n #if !defined(_TRACE_MALI_KBASE_H) || defined(TRACE_HEADER_MULTI_READ)\n #define _TRACE_MALI_KBASE_H\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_linux_trace.h b/drivers/gpu/arm/bifrost_for_linux/mali_linux_trace.h\nindex 2be06a5527689c..0741dfcab575b6 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_linux_trace.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_linux_trace.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #if !defined(_TRACE_MALI_H) || defined(TRACE_HEADER_MULTI_READ)\n #define _TRACE_MALI_H\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_malisw.h b/drivers/gpu/arm/bifrost_for_linux/mali_malisw.h\nindex 99452933eab480..f17bd5edf7e1e8 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_malisw.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_malisw.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /**\n  * Kernel-wide include for common macros and types.\n  */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_midg_coherency.h b/drivers/gpu/arm/bifrost_for_linux/mali_midg_coherency.h\nindex a509cbd5f17598..29d5df38c92b16 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_midg_coherency.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_midg_coherency.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _MIDG_COHERENCY_H_\n #define _MIDG_COHERENCY_H_\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_midg_regmap.h b/drivers/gpu/arm/bifrost_for_linux/mali_midg_regmap.h\nindex 554ed8dcb3eb7f..180850069f2eb9 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_midg_regmap.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_midg_regmap.h\n@@ -1,20 +1,25 @@\n /*\n  *\n- * (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _MIDGARD_REGMAP_H_\n #define _MIDGARD_REGMAP_H_\n \n@@ -29,8 +34,7 @@\n #define GPU_CONTROL_REG(r)      (GPU_CONTROL_BASE + (r))\n #define GPU_ID                  0x000\t/* (RO) GPU and revision identifier */\n #define L2_FEATURES             0x004\t/* (RO) Level 2 cache features */\n-#define SUSPEND_SIZE            0x008   /* (RO) Fixed-function suspend buffer\n-\t\t\t\t\t\tsize */\n+#define CORE_FEATURES           0x008\t/* (RO) Shader Core Features */\n #define TILER_FEATURES          0x00C\t/* (RO) Tiler Features */\n #define MEM_FEATURES            0x010\t/* (RO) Memory system features */\n #define MMU_FEATURES            0x014\t/* (RO) MMU features */\n@@ -88,10 +92,14 @@\n #define THREAD_MAX_WORKGROUP_SIZE 0x0A4\t/* (RO) Maximum workgroup size */\n #define THREAD_MAX_BARRIER_SIZE 0x0A8\t/* (RO) Maximum threads waiting at a barrier */\n #define THREAD_FEATURES         0x0AC\t/* (RO) Thread features */\n+#define THREAD_TLS_ALLOC        0x310   /* (RO) Number of threads per core that\n+\t\t\t\t\t * TLS must be allocated for\n+\t\t\t\t\t */\n \n #define TEXTURE_FEATURES_0      0x0B0\t/* (RO) Support flags for indexed texture formats 0..31 */\n #define TEXTURE_FEATURES_1      0x0B4\t/* (RO) Support flags for indexed texture formats 32..63 */\n #define TEXTURE_FEATURES_2      0x0B8\t/* (RO) Support flags for indexed texture formats 64..95 */\n+#define TEXTURE_FEATURES_3      0x0BC\t/* (RO) Support flags for texture order */\n \n #define TEXTURE_FEATURES_REG(n) GPU_CONTROL_REG(TEXTURE_FEATURES_0 + ((n) << 2))\n \n@@ -557,6 +565,13 @@\n #define L2_MMU_CONFIG_LIMIT_EXTERNAL_WRITES_OCTANT      (0x1 << L2_MMU_CONFIG_LIMIT_EXTERNAL_WRITES_SHIFT)\n #define L2_MMU_CONFIG_LIMIT_EXTERNAL_WRITES_QUARTER     (0x2 << L2_MMU_CONFIG_LIMIT_EXTERNAL_WRITES_SHIFT)\n #define L2_MMU_CONFIG_LIMIT_EXTERNAL_WRITES_HALF        (0x3 << L2_MMU_CONFIG_LIMIT_EXTERNAL_WRITES_SHIFT)\n+\n+#define L2_MMU_CONFIG_3BIT_LIMIT_EXTERNAL_READS_SHIFT      (12)\n+#define L2_MMU_CONFIG_3BIT_LIMIT_EXTERNAL_READS            (0x7 << L2_MMU_CONFIG_LIMIT_EXTERNAL_READS_SHIFT)\n+\n+#define L2_MMU_CONFIG_3BIT_LIMIT_EXTERNAL_WRITES_SHIFT     (15)\n+#define L2_MMU_CONFIG_3BIT_LIMIT_EXTERNAL_WRITES           (0x7 << L2_MMU_CONFIG_LIMIT_EXTERNAL_WRITES_SHIFT)\n+\n /* End L2_MMU_CONFIG register */\n \n /* THREAD_* registers */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_timeline.h b/drivers/gpu/arm/bifrost_for_linux/mali_timeline.h\nindex bd5f6614b6bb08..d0deeadf479fad 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_timeline.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_timeline.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #undef TRACE_SYSTEM\n #define TRACE_SYSTEM mali_timeline\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/mali_uk.h b/drivers/gpu/arm/bifrost_for_linux/mali_uk.h\nindex 841d03fb5873bf..961a4a5c63ebf7 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/mali_uk.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/mali_uk.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_uk.h\n  * Types and definitions that are common across OSs for both the user\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform/Kconfig b/drivers/gpu/arm/bifrost_for_linux/platform/Kconfig\nindex 38835d3d1531c7..ef9fb963ecf560 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/platform/Kconfig\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform/Kconfig\n@@ -6,12 +6,18 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n \n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/Kbuild b/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/Kbuild\nindex d40d7982ff049c..ce637fbb5ef7af 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/Kbuild\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/Kbuild\n@@ -6,12 +6,18 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n mali_kbase-y += \\\n \t$(MALI_PLATFORM_DIR)/mali_kbase_config_devicetree.o \\\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/mali_kbase_config_devicetree.c b/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/mali_kbase_config_devicetree.c\nindex 29ccc29e412543..ccefddf882fdc4 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/mali_kbase_config_devicetree.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/mali_kbase_config_devicetree.c\n@@ -7,22 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <mali_kbase_config.h>\n \n-int kbase_platform_early_init(void)\n-{\n-\t/* Nothing needed at this stage */\n-\treturn 0;\n-}\n-\n static struct kbase_platform_config dummy_platform_config;\n \n struct kbase_platform_config *kbase_get_platform_config(void)\n@@ -30,6 +29,7 @@ struct kbase_platform_config *kbase_get_platform_config(void)\n \treturn &dummy_platform_config;\n }\n \n+#ifndef CONFIG_OF\n int kbase_platform_register(void)\n {\n \treturn 0;\n@@ -38,3 +38,4 @@ int kbase_platform_register(void)\n void kbase_platform_unregister(void)\n {\n }\n+#endif\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/mali_kbase_config_platform.h b/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/mali_kbase_config_platform.h\nindex 2ceca34945b956..5990313308fae9 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/mali_kbase_config_platform.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/mali_kbase_config_platform.h\n@@ -7,52 +7,18 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n  *\n- */\n-\n-\n-\n-/**\n- * Maximum frequency GPU will be clocked at. Given in kHz.\n- * This must be specified as there is no default value.\n- *\n- * Attached value: number in kHz\n- * Default value: NA\n- */\n-#define GPU_FREQ_KHZ_MAX (5000)\n-/**\n- * Minimum frequency GPU will be clocked at. Given in kHz.\n- * This must be specified as there is no default value.\n- *\n- * Attached value: number in kHz\n- * Default value: NA\n- */\n-#define GPU_FREQ_KHZ_MIN (5000)\n-\n-/**\n- * CPU_SPEED_FUNC - A pointer to a function that calculates the CPU clock\n- *\n- * CPU clock speed of the platform is in MHz - see kbase_cpu_clk_speed_func\n- * for the function prototype.\n- *\n- * Attached value: A kbase_cpu_clk_speed_func.\n- * Default Value:  NA\n- */\n-#define CPU_SPEED_FUNC (NULL)\n-\n-/**\n- * GPU_SPEED_FUNC - A pointer to a function that calculates the GPU clock\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n  *\n- * GPU clock speed of the platform in MHz - see kbase_gpu_clk_speed_func\n- * for the function prototype.\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n- * Attached value: A kbase_gpu_clk_speed_func.\n- * Default Value:  NA\n  */\n-#define GPU_SPEED_FUNC (NULL)\n \n /**\n  * Power management configuration\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/mali_kbase_runtime_pm.c b/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/mali_kbase_runtime_pm.c\nindex 9fe37c8d835ec4..c5f3ad70f43850 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/mali_kbase_runtime_pm.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform/devicetree/mali_kbase_runtime_pm.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <mali_kbase.h>\n #include <mali_kbase_defs.h>\n #include <linux/pm_runtime.h>\n@@ -50,7 +55,8 @@ static void pm_callback_power_off(struct kbase_device *kbdev)\n \tpm_runtime_put_autosuspend(kbdev->dev);\n }\n \n-int kbase_device_runtime_init(struct kbase_device *kbdev)\n+#ifdef KBASE_PM_RUNTIME\n+static int kbase_device_runtime_init(struct kbase_device *kbdev)\n {\n \tint ret = 0;\n \n@@ -70,11 +76,12 @@ int kbase_device_runtime_init(struct kbase_device *kbdev)\n \treturn ret;\n }\n \n-void kbase_device_runtime_disable(struct kbase_device *kbdev)\n+static void kbase_device_runtime_disable(struct kbase_device *kbdev)\n {\n \tdev_dbg(kbdev->dev, \"kbase_device_runtime_disable\\n\");\n \tpm_runtime_disable(kbdev->dev);\n }\n+#endif\n \n static int pm_callback_runtime_on(struct kbase_device *kbdev)\n {\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform/rk/mali_kbase_config_rk.c b/drivers/gpu/arm/bifrost_for_linux/platform/rk/mali_kbase_config_rk.c\nindex 926c2dd3f8c94b..e7fa0c84dc916b 100755\n--- a/drivers/gpu/arm/bifrost_for_linux/platform/rk/mali_kbase_config_rk.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform/rk/mali_kbase_config_rk.c\n@@ -14,6 +14,7 @@\n #include <mali_kbase_defs.h>\n #include <mali_kbase_config.h>\n #include <backend/gpu/mali_kbase_pm_internal.h>\n+#include <backend/gpu/mali_kbase_pm_defs.h>\n \n #include <linux/pm_runtime.h>\n #include <linux/suspend.h>\n@@ -26,29 +27,6 @@\n \n #include \"mali_kbase_rk.h\"\n \n-#define MAX_PROP_NAME_LEN\t3\n-#define LEAKAGE_TABLE_END\t~1\n-#define LEAKAGE_INVALID\t\t0xff\n-\n-struct pvtm_config {\n-\tunsigned int freq;\n-\tunsigned int volt;\n-\tunsigned int ch[2];\n-\tunsigned int sample_time;\n-\tunsigned int num;\n-\tunsigned int err;\n-\tunsigned int ref_temp;\n-\tint temp_prop[2];\n-\tconst char *tz_name;\n-\tstruct thermal_zone_device *tz;\n-};\n-\n-struct volt_sel_table {\n-\tint min;\n-\tint max;\n-\tint sel;\n-};\n-\n /**\n  * @file mali_kbase_config_rk.c\n  * 对 platform_config_of_rk 的具体实现.\n@@ -399,22 +377,25 @@ static ssize_t utilisation_show(struct device *dev,\n \tstruct rk_context *platform = get_rk_context(kbdev);\n \tssize_t ret = 0;\n \tunsigned long period_in_us = platform->utilisation_period * 1000;\n-\tunsigned long total_time;\n-\tunsigned long busy_time;\n-\tunsigned long utilisation;\n-\n-\tkbase_pm_reset_dvfs_utilisation(kbdev);\n+\tu32 utilisation;\n+\tstruct kbasep_pm_metrics metrics_when_start;\n+\tstruct kbasep_pm_metrics metrics_diff; /* between start and end. */\n+\tu32 total_time = 0;\n+\tu32 busy_time = 0;\n+\n+\t/* get current metrics data. */\n+\tkbase_pm_get_dvfs_metrics(kbdev, &metrics_when_start, &metrics_diff);\n+\t/* sleep for 'period_in_us'. */\n \tusleep_range(period_in_us, period_in_us + 100);\n-\tkbase_pm_get_dvfs_utilisation(kbdev, &total_time, &busy_time);\n-\t/* 'devfreq_dev_profile' instance registered to devfreq\n-\t * also uses kbase_pm_reset_dvfs_utilisation\n-\t * and kbase_pm_get_dvfs_utilisation.\n-\t * it's better to cat this file when DVFS is disabled.\n-\t */\n-\tD(\"total_time : %lu, busy_time : %lu.\", total_time, busy_time);\n+\t/* get metrics data between start and end. */\n+\tkbase_pm_get_dvfs_metrics(kbdev, &metrics_when_start, &metrics_diff);\n+\n+\ttotal_time = metrics_diff.time_busy + metrics_diff.time_idle;\n+\tbusy_time = metrics_diff.time_busy;\n+\tD(\"total_time : %u, busy_time : %u.\", total_time, busy_time);\n \n \tutilisation = busy_time * 100 / total_time;\n-\tret += snprintf(buf, PAGE_SIZE, \"%ld\\n\", utilisation);\n+\tret += snprintf(buf, PAGE_SIZE, \"%d\\n\", utilisation);\n \n \treturn ret;\n }\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress/Kbuild b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress/Kbuild\nindex d9d5e90852317c..6780e4c9433b76 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress/Kbuild\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress/Kbuild\n@@ -6,14 +6,19 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n mali_kbase-y += \\\n \t$(MALI_PLATFORM_DIR)/mali_kbase_config_vexpress.o \\\n-\t$(MALI_PLATFORM_DIR)/mali_kbase_cpu_vexpress.o \\\n \tmali_kbase_platform_fake.o\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress/mali_kbase_config_platform.h b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress/mali_kbase_config_platform.h\nindex 02835f129aa33a..fac3cd52182ffd 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress/mali_kbase_config_platform.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress/mali_kbase_config_platform.h\n@@ -7,54 +7,18 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n  *\n- */\n-\n-\n-\n-#include \"mali_kbase_cpu_vexpress.h\"\n-\n-/**\n- * Maximum frequency GPU will be clocked at. Given in kHz.\n- * This must be specified as there is no default value.\n- *\n- * Attached value: number in kHz\n- * Default value: NA\n- */\n-#define GPU_FREQ_KHZ_MAX kbase_get_platform_max_freq()\n-/**\n- * Minimum frequency GPU will be clocked at. Given in kHz.\n- * This must be specified as there is no default value.\n- *\n- * Attached value: number in kHz\n- * Default value: NA\n- */\n-#define GPU_FREQ_KHZ_MIN kbase_get_platform_min_freq()\n-\n-/**\n- * CPU_SPEED_FUNC - A pointer to a function that calculates the CPU clock\n- *\n- * CPU clock speed of the platform is in MHz - see kbase_cpu_clk_speed_func\n- * for the function prototype.\n- *\n- * Attached value: A kbase_cpu_clk_speed_func.\n- * Default Value:  NA\n- */\n-#define CPU_SPEED_FUNC (&kbase_get_vexpress_cpu_clock_speed)\n-\n-/**\n- * GPU_SPEED_FUNC - A pointer to a function that calculates the GPU clock\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n  *\n- * GPU clock speed of the platform in MHz - see kbase_gpu_clk_speed_func\n- * for the function prototype.\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n- * Attached value: A kbase_gpu_clk_speed_func.\n- * Default Value:  NA\n  */\n-#define GPU_SPEED_FUNC (NULL)\n \n /**\n  * Power management configuration\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress/mali_kbase_config_vexpress.c b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress/mali_kbase_config_vexpress.c\nindex 15ce2bc5eea5ee..d165ce2628148d 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress/mali_kbase_config_vexpress.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress/mali_kbase_config_vexpress.c\n@@ -1,31 +1,33 @@\n /*\n  *\n- * (C) COPYRIGHT 2011-2016 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2011-2017 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #include <linux/ioport.h>\n #include <mali_kbase.h>\n #include <mali_kbase_defs.h>\n #include <mali_kbase_config.h>\n-#include \"mali_kbase_cpu_vexpress.h\"\n #include \"mali_kbase_config_platform.h\"\n \n-#define HARD_RESET_AT_POWER_OFF 0\n-\n #ifndef CONFIG_OF\n static struct kbase_io_resources io_resources = {\n \t.job_irq_number = 68,\n@@ -46,17 +48,6 @@ static int pm_callback_power_on(struct kbase_device *kbdev)\n \n static void pm_callback_power_off(struct kbase_device *kbdev)\n {\n-#if HARD_RESET_AT_POWER_OFF\n-\t/* Cause a GPU hard reset to test whether we have actually idled the GPU\n-\t * and that we properly reconfigure the GPU on power up.\n-\t * Usually this would be dangerous, but if the GPU is working correctly it should\n-\t * be completely safe as the GPU should not be active at this point.\n-\t * However this is disabled normally because it will most likely interfere with\n-\t * bus logging etc.\n-\t */\n-\tKBASE_TRACE_ADD(kbdev, CORE_GPU_HARD_RESET, NULL, NULL, 0u, 0);\n-\tkbase_os_reg_write(kbdev, GPU_CONTROL_REG(GPU_COMMAND), GPU_COMMAND_HARD_RESET);\n-#endif\n }\n \n struct kbase_pm_callback_conf pm_callbacks = {\n@@ -76,10 +67,3 @@ struct kbase_platform_config *kbase_get_platform_config(void)\n {\n \treturn &versatile_platform_config;\n }\n-\n-\n-int kbase_platform_early_init(void)\n-{\n-\t/* Nothing needed at this stage */\n-\treturn 0;\n-}\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_1xv7_a57/Kbuild b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_1xv7_a57/Kbuild\nindex df87c74f43baf3..51b408efd48ada 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_1xv7_a57/Kbuild\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_1xv7_a57/Kbuild\n@@ -6,12 +6,18 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n mali_kbase-y += \\\n \t$(MALI_PLATFORM_DIR)/mali_kbase_config_vexpress.o \\\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_1xv7_a57/mali_kbase_config_platform.h b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_1xv7_a57/mali_kbase_config_platform.h\nindex 0efbf3962f984c..fac3cd52182ffd 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_1xv7_a57/mali_kbase_config_platform.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_1xv7_a57/mali_kbase_config_platform.h\n@@ -7,52 +7,18 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n  *\n- */\n-\n-\n-\n-/**\n- * Maximum frequency GPU will be clocked at. Given in kHz.\n- * This must be specified as there is no default value.\n- *\n- * Attached value: number in kHz\n- * Default value: NA\n- */\n-#define GPU_FREQ_KHZ_MAX 5000\n-/**\n- * Minimum frequency GPU will be clocked at. Given in kHz.\n- * This must be specified as there is no default value.\n- *\n- * Attached value: number in kHz\n- * Default value: NA\n- */\n-#define GPU_FREQ_KHZ_MIN 5000\n-\n-/**\n- * CPU_SPEED_FUNC - A pointer to a function that calculates the CPU clock\n- *\n- * CPU clock speed of the platform is in MHz - see kbase_cpu_clk_speed_func\n- * for the function prototype.\n- *\n- * Attached value: A kbase_cpu_clk_speed_func.\n- * Default Value:  NA\n- */\n-#define CPU_SPEED_FUNC (&kbase_cpuprops_get_default_clock_speed)\n-\n-/**\n- * GPU_SPEED_FUNC - A pointer to a function that calculates the GPU clock\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n  *\n- * GPU clock speed of the platform in MHz - see kbase_gpu_clk_speed_func\n- * for the function prototype.\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n- * Attached value: A kbase_gpu_clk_speed_func.\n- * Default Value:  NA\n  */\n-#define GPU_SPEED_FUNC (NULL)\n \n /**\n  * Power management configuration\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_1xv7_a57/mali_kbase_config_vexpress.c b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_1xv7_a57/mali_kbase_config_vexpress.c\nindex 3ff0930fb4a3c9..efca0a5b3493b5 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_1xv7_a57/mali_kbase_config_vexpress.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_1xv7_a57/mali_kbase_config_vexpress.c\n@@ -1,27 +1,30 @@\n /*\n  *\n- * (C) COPYRIGHT 2011-2014 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2011-2014, 2017 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <linux/ioport.h>\n #include <mali_kbase.h>\n #include <mali_kbase_defs.h>\n #include <mali_kbase_config.h>\n \n-#define HARD_RESET_AT_POWER_OFF 0\n-\n #ifndef CONFIG_OF\n static struct kbase_io_resources io_resources = {\n \t.job_irq_number = 68,\n@@ -41,17 +44,6 @@ static int pm_callback_power_on(struct kbase_device *kbdev)\n \n static void pm_callback_power_off(struct kbase_device *kbdev)\n {\n-#if HARD_RESET_AT_POWER_OFF\n-\t/* Cause a GPU hard reset to test whether we have actually idled the GPU\n-\t * and that we properly reconfigure the GPU on power up.\n-\t * Usually this would be dangerous, but if the GPU is working correctly it should\n-\t * be completely safe as the GPU should not be active at this point.\n-\t * However this is disabled normally because it will most likely interfere with\n-\t * bus logging etc.\n-\t */\n-\tKBASE_TRACE_ADD(kbdev, CORE_GPU_HARD_RESET, NULL, NULL, 0u, 0);\n-\tkbase_os_reg_write(kbdev, GPU_CONTROL_REG(GPU_COMMAND), GPU_COMMAND_HARD_RESET);\n-#endif\n }\n \n struct kbase_pm_callback_conf pm_callbacks = {\n@@ -71,9 +63,3 @@ struct kbase_platform_config *kbase_get_platform_config(void)\n {\n \treturn &versatile_platform_config;\n }\n-\n-int kbase_platform_early_init(void)\n-{\n-\t/* Nothing needed at this stage */\n-\treturn 0;\n-}\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_6xvirtex7_10mhz/Kbuild b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_6xvirtex7_10mhz/Kbuild\nindex d9d5e90852317c..e07709c9b1a523 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_6xvirtex7_10mhz/Kbuild\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_6xvirtex7_10mhz/Kbuild\n@@ -6,12 +6,18 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n mali_kbase-y += \\\n \t$(MALI_PLATFORM_DIR)/mali_kbase_config_vexpress.o \\\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_platform.h b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_platform.h\nindex dbdf21e009f994..fac3cd52182ffd 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_platform.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_platform.h\n@@ -7,54 +7,18 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n  *\n- */\n-\n-\n-\n-#include \"mali_kbase_cpu_vexpress.h\"\n-\n-/**\n- * Maximum frequency GPU will be clocked at. Given in kHz.\n- * This must be specified as there is no default value.\n- *\n- * Attached value: number in kHz\n- * Default value: NA\n- */\n-#define GPU_FREQ_KHZ_MAX 10000\n-/**\n- * Minimum frequency GPU will be clocked at. Given in kHz.\n- * This must be specified as there is no default value.\n- *\n- * Attached value: number in kHz\n- * Default value: NA\n- */\n-#define GPU_FREQ_KHZ_MIN 10000\n-\n-/**\n- * CPU_SPEED_FUNC - A pointer to a function that calculates the CPU clock\n- *\n- * CPU clock speed of the platform is in MHz - see kbase_cpu_clk_speed_func\n- * for the function prototype.\n- *\n- * Attached value: A kbase_cpu_clk_speed_func.\n- * Default Value:  NA\n- */\n-#define CPU_SPEED_FUNC (&kbase_get_vexpress_cpu_clock_speed)\n-\n-/**\n- * GPU_SPEED_FUNC - A pointer to a function that calculates the GPU clock\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n  *\n- * GPU clock speed of the platform in MHz - see kbase_gpu_clk_speed_func\n- * for the function prototype.\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n- * Attached value: A kbase_gpu_clk_speed_func.\n- * Default Value:  NA\n  */\n-#define GPU_SPEED_FUNC (NULL)\n \n /**\n  * Power management configuration\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_vexpress.c b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_vexpress.c\nindex 76ffe4a1e59ea2..b6714b95b77658 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_vexpress.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform/vexpress_6xvirtex7_10mhz/mali_kbase_config_vexpress.c\n@@ -1,29 +1,31 @@\n /*\n  *\n- * (C) COPYRIGHT 2011-2014 ARM Limited. All rights reserved.\n+ * (C) COPYRIGHT 2011-2014, 2017 ARM Limited. All rights reserved.\n  *\n  * This program is free software and is provided to you under the terms of the\n  * GNU General Public License version 2 as published by the Free Software\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n #include <linux/ioport.h>\n #include <mali_kbase.h>\n #include <mali_kbase_defs.h>\n #include <mali_kbase_config.h>\n-#include \"mali_kbase_cpu_vexpress.h\"\n-\n-#define HARD_RESET_AT_POWER_OFF 0\n \n #ifndef CONFIG_OF\n static struct kbase_io_resources io_resources = {\n@@ -44,17 +46,6 @@ static int pm_callback_power_on(struct kbase_device *kbdev)\n \n static void pm_callback_power_off(struct kbase_device *kbdev)\n {\n-#if HARD_RESET_AT_POWER_OFF\n-\t/* Cause a GPU hard reset to test whether we have actually idled the GPU\n-\t * and that we properly reconfigure the GPU on power up.\n-\t * Usually this would be dangerous, but if the GPU is working correctly it should\n-\t * be completely safe as the GPU should not be active at this point.\n-\t * However this is disabled normally because it will most likely interfere with\n-\t * bus logging etc.\n-\t */\n-\tKBASE_TRACE_ADD(kbdev, CORE_GPU_HARD_RESET, NULL, NULL, 0u, 0);\n-\tkbase_os_reg_write(kbdev, GPU_CONTROL_REG(GPU_COMMAND), GPU_COMMAND_HARD_RESET);\n-#endif\n }\n \n struct kbase_pm_callback_conf pm_callbacks = {\n@@ -74,10 +65,3 @@ struct kbase_platform_config *kbase_get_platform_config(void)\n {\n \treturn &versatile_platform_config;\n }\n-\n-int kbase_platform_early_init(void)\n-{\n-\t/* Nothing needed at this stage */\n-\treturn 0;\n-}\n-\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/platform_dummy/mali_ukk_os.h b/drivers/gpu/arm/bifrost_for_linux/platform_dummy/mali_ukk_os.h\nindex 5fa9b39c4bc0f1..ef1ec708edef00 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/platform_dummy/mali_ukk_os.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/platform_dummy/mali_ukk_os.h\n@@ -7,16 +7,21 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n \n \n-\n-\n /**\n  * @file mali_ukk_os.h\n  * Types and definitions that are common for Linux OSs for the kernel side of the\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/protected_mode_switcher.h b/drivers/gpu/arm/bifrost_for_linux/protected_mode_switcher.h\nindex 5dc2f3ba8cf625..8778d812aea007 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/protected_mode_switcher.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/protected_mode_switcher.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _PROTECTED_MODE_SWITCH_H_\n #define _PROTECTED_MODE_SWITCH_H_\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/sconscript b/drivers/gpu/arm/bifrost_for_linux/sconscript\nindex e738dd7a386902..4c38f2a070459d 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/sconscript\n+++ b/drivers/gpu/arm/bifrost_for_linux/sconscript\n@@ -1,17 +1,23 @@\n #\n-# (C) COPYRIGHT 2010-2017 ARM Limited. All rights reserved.\n+# (C) COPYRIGHT 2010-2018 ARM Limited. All rights reserved.\n #\n # This program is free software and is provided to you under the terms of the\n # GNU General Public License version 2 as published by the Free Software\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n import sys\n Import('env')\n@@ -27,6 +33,7 @@ kbase_src = [\n \tGlob('internal/*/*.c'),\n \tGlob('ipa/*.c'),\n \tGlob('platform/%s/*.c' % env['platform_config']),\n+\tGlob('thirdparty/*.c'),\n ]\n \n if env['platform_config']=='juno_soc':\n@@ -40,30 +47,17 @@ if Glob('#kernel/drivers/gpu/arm/midgard/tests/internal/src/mock') and env['unit\n \n make_args = env.kernel_get_config_defines(ret_list = True) + [\n \t'PLATFORM=%s' % env['platform'],\n-\t'MALI_ERROR_INJECT_ON=%s' % env['error_inject'],\n \t'MALI_KERNEL_TEST_API=%s' % env['debug'],\n \t'MALI_UNIT_TEST=%s' % env['unit'],\n \t'MALI_RELEASE_NAME=%s' % env['mali_release_name'],\n \t'MALI_MOCK_TEST=%s' % mock_test,\n \t'MALI_CUSTOMER_RELEASE=%s' % env['release'],\n-\t'MALI_INSTRUMENTATION_LEVEL=%s' % env['instr'],\n \t'MALI_COVERAGE=%s' % env['coverage'],\n ]\n \n kbase = env.BuildKernelModule('$STATIC_LIB_PATH/mali_kbase.ko', kbase_src,\n                               make_args = make_args)\n \n-# Add a dependency on kds.ko.\n-# Only necessary when KDS is not built into the kernel.\n-#\n-if env['os'] != 'android':\n-\tif not env.KernelConfigEnabled(\"CONFIG_KDS\"):\n-\t\tenv.Depends(kbase, '$STATIC_LIB_PATH/kds.ko')\n-\n-# need Module.symvers from ump.ko build\n-if int(env['ump']) == 1:\n-\tenv.Depends(kbase, '$STATIC_LIB_PATH/ump.ko')\n-\n if 'smc_protected_mode_switcher' in env:\n \tenv.Depends('$STATIC_LIB_PATH/mali_kbase.ko', '$STATIC_LIB_PATH/smc_protected_mode_switcher.ko')\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/Kbuild b/drivers/gpu/arm/bifrost_for_linux/tests/Kbuild\nindex b4bed047343910..df16a77a7f66ea 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/Kbuild\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/Kbuild\n@@ -6,12 +6,18 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n obj-$(CONFIG_MALI_KUTF) += kutf/\n obj-$(CONFIG_MALI_IRQ_LATENCY) += mali_kutf_irq_test/\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/Kconfig b/drivers/gpu/arm/bifrost_for_linux/tests/Kconfig\nindex da0515c065de90..fa91aea4ac5c50 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/Kconfig\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/Kconfig\n@@ -6,12 +6,18 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n source \"drivers/gpu/arm/midgard/tests/kutf/Kconfig\"\n source \"drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/Kconfig\"\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/Mconfig b/drivers/gpu/arm/bifrost_for_linux/tests/Mconfig\nnew file mode 100644\nindex 00000000000000..35f85139cf12ab\n--- /dev/null\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/Mconfig\n@@ -0,0 +1,22 @@\n+#\n+# (C) COPYRIGHT 2018 ARM Limited. All rights reserved.\n+#\n+# This program is free software and is provided to you under the terms of the\n+# GNU General Public License version 2 as published by the Free Software\n+# Foundation, and any use by you of this program is subject to the terms\n+# of such GNU licence.\n+#\n+# A copy of the licence is included with the program, and can also be obtained\n+# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n+# Boston, MA  02110-1301, USA.\n+#\n+\n+config UNIT_TEST_KERNEL_MODULES\n+\tbool\n+\tdefault y if UNIT_TEST_CODE && BUILD_KERNEL_MODULES\n+\tdefault n\n+\n+config BUILD_IPA_TESTS\n+\tbool\n+\tdefault y if UNIT_TEST_KERNEL_MODULES && MALI_BIFROST_DEVFREQ\n+\tdefault n\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/build.bp b/drivers/gpu/arm/bifrost_for_linux/tests/build.bp\nnew file mode 100644\nindex 00000000000000..28a756b16dc1ae\n--- /dev/null\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/build.bp\n@@ -0,0 +1,36 @@\n+/*\n+ * Copyright:\n+ * ----------------------------------------------------------------------------\n+ * This confidential and proprietary software may be used only as authorized\n+ * by a licensing agreement from ARM Limited.\n+ *      (C) COPYRIGHT 2018 ARM Limited, ALL RIGHTS RESERVED\n+ * The entire notice above must be reproduced on all authorized copies and\n+ * copies may only be made to the extent permitted by a licensing agreement\n+ * from ARM Limited.\n+ * ----------------------------------------------------------------------------\n+ */\n+\n+bob_defaults {\n+    name: \"kernel_test_module_defaults\",\n+    defaults: [\"mali_kbase_shared_config_defaults\"],\n+    include_dirs: [\n+        \"kernel/drivers/gpu/arm\",\n+        \"kernel/drivers/gpu/arm/midgard\",\n+        \"kernel/drivers/gpu/arm/midgard/backend/gpu\",\n+        \"kernel/drivers/gpu/arm/midgard/tests/include\",\n+    ],\n+    extra_symbols: [\"kutf\"],\n+}\n+\n+subdirs = [\n+    \"kutf\",\n+    \"mali_kutf_irq_test\",\n+]\n+\n+optional_subdirs = [\n+    \"kutf_test\",\n+    \"kutf_test_runner\",\n+    \"mali_kutf_ipa_test\",\n+    \"mali_kutf_ipa_unit_test\",\n+    \"mali_kutf_vinstr_test\",\n+]\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_helpers.h b/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_helpers.h\nindex 3f1dfc244d3096..15e168c2385b79 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_helpers.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_helpers.h\n@@ -7,210 +7,71 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KERNEL_UTF_HELPERS_H_\n #define _KERNEL_UTF_HELPERS_H_\n \n /* kutf_helpers.h\n  * Test helper functions for the kernel UTF test infrastructure.\n  *\n- * This collection of helper functions are provided as 'stock' implementation\n- * helpers for certain features of kutf. Tests can implement common/boilerplate\n- * functionality using these, whilst still providing them the option of\n- * implementing completely custom functions themselves to use those kutf\n- * features.\n+ * These functions provide methods for enqueuing/dequeuing lines of text sent\n+ * by user space. They are used to implement the transfer of \"userdata\" from\n+ * user space to kernel.\n  */\n \n #include <kutf/kutf_suite.h>\n-#include <kutf/kutf_mem.h>\n-#include <linux/wait.h>\n-\n-/**\n- * enum kutf_helper_textbuf_flag - flags for textbufs\n- * @KUTF_HELPER_TEXTBUF_FLAG_DYING:\tTest is dying, textbuf should not allow\n- *                                      writes, nor block on empty.\n- */\n-enum kutf_helper_textbuf_flag {\n-\tKUTF_HELPER_TEXTBUF_FLAG_DYING = (1u << 0),\n-};\n \n /**\n- * struct kutf_helper_textbuf_line - Structure representing a line of text\n+ * kutf_helper_input_dequeue() - Dequeue a line sent by user space\n+ * @context:    KUTF context\n+ * @str_size:   Pointer to an integer to receive the size of the string\n  *\n- * The string itself is stored immediately after this.\n+ * If no line is available then this function will wait (interruptibly) until\n+ * a line is available.\n  *\n- * @node:\t\tList node for the textbuf's textbuf_list\n- * @str_size:\t\tLength of the string buffer, including the \\0 terminator\n- * @str:\t\t'Flexible array' for the string representing the line\n+ * Return: The line dequeued, ERR_PTR(-EINTR) if interrupted or NULL on end\n+ * of data.\n  */\n-struct kutf_helper_textbuf_line {\n-\tstruct list_head node;\n-\tint str_size;\n-\tchar str[];\n-};\n+char *kutf_helper_input_dequeue(struct kutf_context *context, size_t *str_size);\n \n /**\n- * struct kutf_helper_textbuf - Structure to representing sequential lines of\n- *                              text\n- * @lock:\t\tmutex to hold whilst accessing the structure\n- * @nr_user_clients:\tNumber of userspace clients connected via an open()\n- *                      call\n- * @mempool:\t\tmempool for allocating lines\n- * @scratchpad:\t\tscratch area for receiving text of size max_line_size\n- * @used_bytes:\t\tnumber of valid bytes in the scratchpad\n- * @prev_pos:\t\tPrevious position userspace has accessed\n- * @prev_line_pos:\tPrevious start of line position userspace has accessed\n- * @textbuf_list:\tList head to store all the lines of text\n- * @max_line_size:\tMaximum size in memory allowed for a line of text\n- * @max_nr_lines:\tMaximum number of lines permitted in this textbuf\n- * @nr_lines:\t\tNumber of entries in textbuf_list\n- * @flags:\t\tFlags indicating state of the textbuf, using values\n- *                      from enum kutf_helper_textbuf_flag\n- * @user_opened_wq:\tWaitq for when there's at least one userspace client\n- *                      connected to the textbuf via an open() call\n- * @not_full_wq:\tWaitq for when the textbuf can be enqueued into/can\n- *                      consume data from userspace\n- * @not_empty_wq:\tWaitq for when the textbuf can be dequeued from/can\n- *                      produce data for userspace\n- */\n-\n-struct kutf_helper_textbuf {\n-\tstruct mutex lock;\n-\tint nr_user_clients;\n-\tstruct kutf_mempool *mempool;\n-\tchar *scratchpad;\n-\tint used_bytes;\n-\tloff_t prev_pos;\n-\tloff_t prev_line_pos;\n-\tstruct list_head textbuf_list;\n-\tint max_line_size;\n-\tint max_nr_lines;\n-\tint nr_lines;\n-\tunsigned long flags;\n-\twait_queue_head_t user_opened_wq;\n-\twait_queue_head_t not_full_wq;\n-\twait_queue_head_t not_empty_wq;\n-\n-};\n-\n-/* stock callbacks for userspace to read from/write to the 'data' file as a\n- * textbuf */\n-extern struct kutf_userdata_ops kutf_helper_textbuf_userdata_ops;\n-\n-/**\n- * kutf_helper_textbuf_init() - init a textbuf for use as a 'data' file\n- *                              consumer/producer\n- * @textbuf:\t\ttextbuf to initialize\n- * @mempool:\t\tmempool to allocate from\n- * @max_line_size:\tmaximum line size expected to/from userspace\n- * @max_nr_lines:\tmaximum number of lines to expect to/from userspace\n- *\n- * Initialize a textbuf so that it can consume writes made to the 'data' file,\n- * and produce reads for userspace on the 'data' file. Tests may then read the\n- * lines written by userspace, or fill the buffer so it may be read back by\n- * userspace.\n- *\n- * The caller should write the @textbuf pointer into the kutf_context's\n- * userdata_producer_priv or userdata_consumer_priv member during fixture\n- * creation.\n+ * kutf_helper_input_enqueue() - Enqueue a line sent by user space\n+ * @context:   KUTF context\n+ * @str:       The user space address of the line\n+ * @size:      The length in bytes of the string\n  *\n- * Usually a test will have separate textbufs for userspace to write to and\n- * read from. Using the same one for both will echo back to the user what they\n- * are writing.\n+ * This function will use copy_from_user to copy the string out of user space.\n+ * The string need not be NULL-terminated (@size should not include the NULL\n+ * termination).\n  *\n- * Lines are understood as being separated by the '\\n' character, but no '\\n'\n- * characters will be observed by the test\n+ * As a special case @str==NULL and @size==0 is valid to mark the end of input,\n+ * but callers should use kutf_helper_input_enqueue_end_of_data() instead.\n  *\n- * @max_line_size puts an upper bound on the size of lines in a textbuf,\n- * including the \\0 terminator. Lines exceeding this will be truncated,\n- * effectively ignoring incoming data until the next '\\n'\n- *\n- * Combining this with @max_nr_lines puts an upper bound on the size of the\n- * file read in\n- *\n- * Return:\t\t0 on success, or negative value on error.\n+ * Return: 0 on success, -EFAULT if the line cannot be copied from user space,\n+ * -ENOMEM if out of memory.\n  */\n-int kutf_helper_textbuf_init(struct kutf_helper_textbuf *textbuf,\n-\t\tstruct kutf_mempool *mempool, int max_line_size,\n-\t\tint max_nr_lines);\n+int kutf_helper_input_enqueue(struct kutf_context *context,\n+\t\tconst char __user *str, size_t size);\n \n /**\n- * kutf_helper_textbuf_wait_for_user() - wait for userspace to open the 'data'\n- *                                       file\n- * @textbuf:\t\ttextbuf to wait on\n- *\n- * This can be used to synchronize with userspace so that subsequent calls to\n- * kutf_helper_textbuf_dequeue() and kutf_helper_textbuf_enqueue() should\n- * succeed.\n- *\n- * Waiting is done on a timeout.\n- *\n- * There is of course no guarantee that userspace will keep the file open after\n- * this, but any error in the dequeue/enqueue functions afterwards can be\n- * treated as such rather than \"we're still waiting for userspace to begin\"\n- *\n- * Return:\t\t0 if waited successfully, -ETIMEDOUT if we exceeded the\n- *                      timeout, or some other negative value if there was an\n- *                      error during waiting.\n- */\n-\n-int kutf_helper_textbuf_wait_for_user(struct kutf_helper_textbuf *textbuf);\n-\n-\n-/**\n- * kutf_helper_textbuf_dequeue() - dequeue a line from a textbuf\n- * @textbuf:\t\ttextbuf dequeue a line as a string from\n- * @str_size:\t\tpointer to storage to receive the size of the string,\n- *                      which includes the '\\0' terminator, or NULL if not\n- *                      required\n- *\n- * Dequeue (remove) a line from the start of the textbuf as a string, and\n- * return it.\n- *\n- * If no lines are available, then this will block until a line has been\n- * submitted. If a userspace client is not connected and there are no remaining\n- * lines, then this function returns NULL instead.\n- *\n- * The memory for the string comes from the kutf_mempool given during\n- * initialization of the textbuf, and shares the same lifetime as it.\n- *\n- * Return:\t\tpointer to the next line of the textbuf. NULL indicated\n- *                      all userspace clients disconnected. An error value to be\n- *                      checked with IS_ERR() family of functions if a signal or\n- *                      some other error occurred\n- */\n-char *kutf_helper_textbuf_dequeue(struct kutf_helper_textbuf *textbuf,\n-\t\tint *str_size);\n-\n-/**\n- * kutf_helper_textbuf_enqueue() - enqueue a line to a textbuf\n- * @textbuf:\t\ttextbuf to enqueue a line as a string to\n- * @enqueue_str:\tpointer to the string to enqueue to the textbuf\n- * @buf_max_size:\tmaximum size of the buffer holding @enqueue_str\n- *\n- * Enqueue (add) a line to the end of a textbuf as a string.\n- *\n- * The caller should avoid placing '\\n' characters in their strings, as these\n- * will not be split into multiple lines.\n- *\n- * A copy of the string will be made into the textbuf, so @enqueue_str can be\n- * freed immediately after if.the caller wishes to do so.\n- *\n- * If the maximum amount of lines has been reached, then this will block until\n- * a line has been removed to make space. If a userspace client is not\n- * connected and there is no space available, then this function returns\n- * -EBUSY.\n+ * kutf_helper_input_enqueue_end_of_data() - Signal no more data is to be sent\n+ * @context:    KUTF context\n  *\n- * Return:\t\t0 on success, or negative value on error\n+ * After this function has been called, kutf_helper_input_dequeue() will always\n+ * return NULL.\n  */\n-int kutf_helper_textbuf_enqueue(struct kutf_helper_textbuf *textbuf,\n-\t\tchar *enqueue_str, int buf_max_size);\n+void kutf_helper_input_enqueue_end_of_data(struct kutf_context *context);\n \n #endif\t/* _KERNEL_UTF_HELPERS_H_ */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_helpers_user.h b/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_helpers_user.h\nindex 759bf717c7cd58..3b1300e1ce6f7b 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_helpers_user.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_helpers_user.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KERNEL_UTF_HELPERS_USER_H_\n #define _KERNEL_UTF_HELPERS_USER_H_\n \n@@ -80,18 +85,16 @@ enum kutf_helper_err {\n };\n \n \n-/* textbuf Send named NAME=value pair, u64 value\n+/* Send named NAME=value pair, u64 value\n  *\n  * NAME must match [A-Z0-9_]\\+ and can be up to MAX_VAL_NAME_LEN characters long\n  *\n- * This is assuming the kernel-side test is using the 'textbuf' helpers\n- *\n  * Any failure will be logged on the suite's current test fixture\n  *\n  * Returns 0 on success, non-zero on failure\n  */\n-int kutf_helper_textbuf_send_named_u64(struct kutf_context *context,\n-\t\tstruct kutf_helper_textbuf *textbuf, char *val_name, u64 val);\n+int kutf_helper_send_named_u64(struct kutf_context *context,\n+\t\tconst char *val_name, u64 val);\n \n /* Get the maximum length of a string that can be represented as a particular\n  * NAME=\"value\" pair without string-value truncation in the kernel's buffer\n@@ -101,53 +104,48 @@ int kutf_helper_textbuf_send_named_u64(struct kutf_context *context,\n  * without having the string value truncated. Any string longer than this will\n  * be truncated at some point during communication to this size.\n  *\n- * The calculation is valid both for sending strings of val_str_len to kernel,\n- * and for receiving a string that was originally val_str_len from the kernel.\n- *\n- * It is assumed that valname is a valid name for\n- * kutf_test_helpers_textbuf_send_named_str(), and no checking will be made to\n+ * It is assumed that val_name is a valid name for\n+ * kutf_helper_send_named_str(), and no checking will be made to\n  * ensure this.\n  *\n  * Returns the maximum string length that can be represented, or a negative\n  * value if the NAME=\"value\" encoding itself wouldn't fit in kern_buf_sz\n  */\n-int kutf_helper_textbuf_max_str_len_for_kern(char *val_name, int kern_buf_sz);\n+int kutf_helper_max_str_len_for_kern(const char *val_name, int kern_buf_sz);\n \n-/* textbuf Send named NAME=\"str\" pair\n+/* Send named NAME=\"str\" pair\n  *\n  * no escaping allowed in str. Any of the following characters will terminate\n  * the string: '\"' '\\\\' '\\n'\n  *\n  * NAME must match [A-Z0-9_]\\+ and can be up to MAX_VAL_NAME_LEN characters long\n  *\n- * This is assuming the kernel-side test is using the 'textbuf' helpers\n- *\n  * Any failure will be logged on the suite's current test fixture\n  *\n  * Returns 0 on success, non-zero on failure */\n-int kutf_helper_textbuf_send_named_str(struct kutf_context *context,\n-\t\tstruct kutf_helper_textbuf *textbuf, char *val_name,\n-\t\tchar *val_str);\n+int kutf_helper_send_named_str(struct kutf_context *context,\n+\t\tconst char *val_name, const char *val_str);\n \n-/* textbuf Receive named NAME=value pair\n+/* Receive named NAME=value pair\n  *\n  * This can receive u64 and string values - check named_val->type\n  *\n  * If you are not planning on dynamic handling of the named value's name and\n- * type, then kutf_test_helpers_textbuf_receive_check_val() is more useful as a\n+ * type, then kutf_helper_receive_check_val() is more useful as a\n  * convenience function.\n  *\n  * String members of named_val will come from memory allocated on the fixture's mempool\n  *\n- * Returns 0 on success. Negative value on failure to receive from the 'data'\n+ * Returns 0 on success. Negative value on failure to receive from the 'run'\n  * file, positive value indicates an enum kutf_helper_err value for correct\n  * reception of data but invalid parsing */\n-int kutf_helper_textbuf_receive_named_val(struct kutf_helper_named_val *named_val,\n-\t\tstruct kutf_helper_textbuf *textbuf);\n+int kutf_helper_receive_named_val(\n+\t\tstruct kutf_context *context,\n+\t\tstruct kutf_helper_named_val *named_val);\n \n-/* textbuf Receive and validate NAME=value pair\n+/* Receive and validate NAME=value pair\n  *\n- * As with kutf_test_helpers_textbuf_receive_named_val, but validate that the\n+ * As with kutf_helper_receive_named_val, but validate that the\n  * name and type are as expected, as a convenience for a common pattern found\n  * in tests.\n  *\n@@ -168,9 +166,11 @@ int kutf_helper_textbuf_receive_named_val(struct kutf_helper_named_val *named_va\n  *\n  * The rationale behind this is that we'd prefer to continue the rest of the\n  * test with failures propagated, rather than hitting a timeout */\n-int kutf_helper_textbuf_receive_check_val(struct kutf_helper_named_val *named_val,\n-\t\tstruct kutf_context *context, struct kutf_helper_textbuf *textbuf,\n-\t\tchar *expect_val_name, enum kutf_helper_valtype expect_val_type);\n+int kutf_helper_receive_check_val(\n+\t\tstruct kutf_helper_named_val *named_val,\n+\t\tstruct kutf_context *context,\n+\t\tconst char *expect_val_name,\n+\t\tenum kutf_helper_valtype expect_val_type);\n \n /* Output a named value to kmsg */\n void kutf_helper_output_named_val(struct kutf_helper_named_val *named_val);\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_mem.h b/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_mem.h\nindex 584c9dd4bc138f..988559de1edf33 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_mem.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_mem.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KERNEL_UTF_MEM_H_\n #define _KERNEL_UTF_MEM_H_\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_resultset.h b/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_resultset.h\nindex 1cc85f1b7a46ad..49ebeb4ec546fd 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_resultset.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_resultset.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KERNEL_UTF_RESULTSET_H_\n #define _KERNEL_UTF_RESULTSET_H_\n \n@@ -42,7 +47,12 @@\n  * @KUTF_RESULT_FATAL:\t\tThe test result failed with a fatal error.\n  * @KUTF_RESULT_ABORT:\t\tThe test result failed due to a non-UTF\n  *                              assertion failure.\n- * @KUTF_RESULT_COUNT:\t\tThe current number of possible status messages.\n+ * @KUTF_RESULT_USERDATA:\tUser data is ready to be read,\n+ *                              this is not seen outside the kernel\n+ * @KUTF_RESULT_USERDATA_WAIT:\tWaiting for user data to be sent,\n+ *                              this is not seen outside the kernel\n+ * @KUTF_RESULT_TEST_FINISHED:\tThe test has finished, no more results will\n+ *                              be produced. This is not seen outside kutf\n  */\n enum kutf_result_status {\n \tKUTF_RESULT_BENCHMARK = -3,\n@@ -57,7 +67,9 @@ enum kutf_result_status {\n \tKUTF_RESULT_FATAL   = 5,\n \tKUTF_RESULT_ABORT   = 6,\n \n-\tKUTF_RESULT_COUNT\n+\tKUTF_RESULT_USERDATA      = 7,\n+\tKUTF_RESULT_USERDATA_WAIT = 8,\n+\tKUTF_RESULT_TEST_FINISHED = 9\n };\n \n /* The maximum size of a kutf_result_status result when\n@@ -68,6 +80,9 @@ enum kutf_result_status {\n #ifdef __KERNEL__\n \n #include <kutf/kutf_mem.h>\n+#include <linux/wait.h>\n+\n+struct kutf_context;\n \n /**\n  * struct kutf_result - Represents a single test result.\n@@ -81,41 +96,86 @@ struct kutf_result {\n \tconst char                  *message;\n };\n \n+/**\n+ * KUTF_RESULT_SET_WAITING_FOR_INPUT - Test is waiting for user data\n+ *\n+ * This flag is set within a struct kutf_result_set whenever the test is blocked\n+ * waiting for user data. Attempts to dequeue results when this flag is set\n+ * will cause a dummy %KUTF_RESULT_USERDATA_WAIT result to be produced. This\n+ * is used to output a warning message and end of file.\n+ */\n+#define KUTF_RESULT_SET_WAITING_FOR_INPUT 1\n+\n+/**\n+ * struct kutf_result_set - Represents a set of results.\n+ * @results:\tList head of a struct kutf_result list for storing the results\n+ * @waitq:\tWait queue signalled whenever new results are added.\n+ * @flags:\tFlags see %KUTF_RESULT_SET_WAITING_FOR_INPUT\n+ */\n+struct kutf_result_set {\n+\tstruct list_head          results;\n+\twait_queue_head_t         waitq;\n+\tint                       flags;\n+};\n+\n /**\n  * kutf_create_result_set() - Create a new result set\n  *                            to which results can be added.\n  *\n- * Return: The created resultset.\n+ * Return: The created result set.\n  */\n struct kutf_result_set *kutf_create_result_set(void);\n \n /**\n- * kutf_add_result() - Add a result to the end of an existing resultset.\n+ * kutf_add_result() - Add a result to the end of an existing result set.\n  *\n- * @mempool:\tThe memory pool to allocate the result storage from.\n- * @set:\tThe resultset to add the result to.\n+ * @context:\tThe kutf context\n  * @status:\tThe result status to add.\n  * @message:\tThe result message to add.\n+ *\n+ * Return: 0 if the result is successfully added. -ENOMEM if allocation fails.\n  */\n-void kutf_add_result(struct kutf_mempool *mempool, struct kutf_result_set *set,\n+int kutf_add_result(struct kutf_context *context,\n \t\tenum kutf_result_status status, const char *message);\n \n /**\n- * kutf_remove_result() - Remove a result from the head of a resultset.\n- * @set:\tThe resultset.\n+ * kutf_remove_result() - Remove a result from the head of a result set.\n+ * @set:\tThe result set.\n+ *\n+ * This function will block until there is a result to read. The wait is\n+ * interruptible, so this function will return with an ERR_PTR if interrupted.\n  *\n- * Return: result or NULL if there are no further results in the resultset.\n+ * Return: result or ERR_PTR if interrupted\n  */\n struct kutf_result *kutf_remove_result(\n \t\tstruct kutf_result_set *set);\n \n /**\n- * kutf_destroy_result_set() - Free a previously created resultset.\n+ * kutf_destroy_result_set() - Free a previously created result set.\n  *\n  * @results:\tThe result set whose resources to free.\n  */\n void kutf_destroy_result_set(struct kutf_result_set *results);\n \n+/**\n+ * kutf_set_waiting_for_input() - The test is waiting for userdata\n+ *\n+ * @set: The result set to update\n+ *\n+ * Causes the result set to always have results and return a fake\n+ * %KUTF_RESULT_USERDATA_WAIT result.\n+ */\n+void kutf_set_waiting_for_input(struct kutf_result_set *set);\n+\n+/**\n+ * kutf_clear_waiting_for_input() - The test is no longer waiting for userdata\n+ *\n+ * @set: The result set to update\n+ *\n+ * Cancels the effect of kutf_set_waiting_for_input()\n+ */\n+void kutf_clear_waiting_for_input(struct kutf_result_set *set);\n+\n #endif\t/* __KERNEL__ */\n \n #endif\t/* _KERNEL_UTF_RESULTSET_H_ */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_suite.h b/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_suite.h\nindex cba2b2d84d62e0..8d75f506f9eb84 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_suite.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_suite.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KERNEL_UTF_SUITE_H_\n #define _KERNEL_UTF_SUITE_H_\n \n@@ -27,10 +32,17 @@\n  */\n \n #include <linux/kref.h>\n+#include <linux/workqueue.h>\n+#include <linux/wait.h>\n \n #include <kutf/kutf_mem.h>\n #include <kutf/kutf_resultset.h>\n \n+/* Arbitrary maximum size to prevent user space allocating too much kernel\n+ * memory\n+ */\n+#define KUTF_MAX_LINE_LENGTH (1024u)\n+\n /**\n  * Pseudo-flag indicating an absence of any specified test class. Note that\n  * tests should not be annotated with this constant as it is simply a zero\n@@ -149,24 +161,42 @@ union kutf_callback_data {\n };\n \n /**\n- * struct kutf_userdata_ops- Structure defining methods to exchange data\n- *                           with userspace via the 'data' file\n- * @open:\t\tFunction used to notify when the 'data' file was opened\n- * @release:\t\tFunction used to notify when the 'data' file was closed\n- * @notify_ended:\tFunction used to notify when the test has ended.\n- * @consumer:\t\tFunction used to consume writes from userspace\n- * @producer:\t\tFunction used to produce data for userspace to read\n+ * struct kutf_userdata_line - A line of user data to be returned to the user\n+ * @node:   struct list_head to link this into a list\n+ * @str:    The line of user data to return to user space\n+ * @size:   The number of bytes within @str\n+ */\n+struct kutf_userdata_line {\n+\tstruct list_head node;\n+\tchar *str;\n+\tsize_t size;\n+};\n+\n+/**\n+ * KUTF_USERDATA_WARNING_OUTPUT - Flag specifying that a warning has been output\n  *\n- * All ops can be NULL.\n- */\n-struct kutf_userdata_ops {\n-\tint (*open)(void *priv);\n-\tvoid (*release)(void *priv);\n-\tvoid (*notify_ended)(void *priv);\n-\tssize_t (*consumer)(void *priv, const char  __user *userbuf,\n-\t\t\tsize_t userbuf_len, loff_t *ppos);\n-\tssize_t (*producer)(void *priv, char  __user *userbuf,\n-\t\t\tsize_t userbuf_len, loff_t *ppos);\n+ * If user space reads the \"run\" file while the test is waiting for user data,\n+ * then the framework will output a warning message and set this flag within\n+ * struct kutf_userdata. A subsequent read will then simply return an end of\n+ * file condition rather than outputting the warning again. The upshot of this\n+ * is that simply running 'cat' on a test which requires user data will produce\n+ * the warning followed by 'cat' exiting due to EOF - which is much more user\n+ * friendly than blocking indefinitely waiting for user data.\n+ */\n+#define KUTF_USERDATA_WARNING_OUTPUT  1\n+\n+/**\n+ * struct kutf_userdata - Structure holding user data\n+ * @flags:       See %KUTF_USERDATA_WARNING_OUTPUT\n+ * @input_head:  List of struct kutf_userdata_line containing user data\n+ *               to be read by the kernel space test.\n+ * @input_waitq: Wait queue signalled when there is new user data to be\n+ *               read by the kernel space test.\n+ */\n+struct kutf_userdata {\n+\tunsigned long flags;\n+\tstruct list_head input_head;\n+\twait_queue_head_t input_waitq;\n };\n \n /**\n@@ -185,13 +215,8 @@ struct kutf_userdata_ops {\n  * @status:\t\tThe status of the currently running fixture.\n  * @expected_status:\tThe expected status on exist of the currently\n  *                      running fixture.\n- * @userdata_consumer_priv:\tParameter to pass into kutf_userdata_ops\n- *                              consumer function. Must not be NULL if a\n- *                              consumer function was specified\n- * @userdata_producer_priv:\tParameter to pass into kutf_userdata_ops\n- *                              producer function. Must not be NULL if a\n- *                              producer function was specified\n- * @userdata_dentry:\tThe debugfs file for userdata exchange\n+ * @work:\t\tWork item to enqueue onto the work queue to run the test\n+ * @userdata:\t\tStructure containing the user data for the test to read\n  */\n struct kutf_context {\n \tstruct kref                     kref;\n@@ -205,9 +230,9 @@ struct kutf_context {\n \tstruct kutf_result_set          *result_set;\n \tenum kutf_result_status         status;\n \tenum kutf_result_status         expected_status;\n-\tvoid                            *userdata_consumer_priv;\n-\tvoid                            *userdata_producer_priv;\n-\tstruct dentry                   *userdata_dentry;\n+\n+\tstruct work_struct              work;\n+\tstruct kutf_userdata            userdata;\n };\n \n /**\n@@ -391,30 +416,6 @@ void kutf_add_test_with_filters_and_data(\n \t\tunsigned int filters,\n \t\tunion kutf_callback_data test_data);\n \n-/**\n- * kutf_add_test_with_filters_data_and_userdata() - Add a test to a kernel test suite with filters and setup for\n- *                                                  receiving data from userside\n- * @suite:\t\tThe suite to add the test to.\n- * @id:\t\t\tThe ID of the test.\n- * @name:\t\tThe name of the test.\n- * @execute:\t\tCallback to the test function to run.\n- * @filters:\t\tA set of filtering flags, assigning test categories.\n- * @test_data:\t\tTest specific callback data, provided during the\n- *\t\t\trunning of the test in the kutf_context\n- * @userdata_ops:\tCallbacks to use for sending and receiving data to\n- *\t\t\tuserspace. A copy of the struct kutf_userdata_ops is\n- *\t\t\ttaken. Each callback can be NULL.\n- *\n- */\n-void kutf_add_test_with_filters_data_and_userdata(\n-\t\tstruct kutf_suite *suite,\n-\t\tunsigned int id,\n-\t\tconst char *name,\n-\t\tvoid (*execute)(struct kutf_context *context),\n-\t\tunsigned int filters,\n-\t\tunion kutf_callback_data test_data,\n-\t\tstruct kutf_userdata_ops *userdata_ops);\n-\n \n /* ============================================================================\n \tTest functions\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_utils.h b/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_utils.h\nindex c458c1f73802b3..25b8285500d7da 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_utils.h\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/include/kutf/kutf_utils.h\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #ifndef _KERNEL_UTF_UTILS_H_\n #define _KERNEL_UTF_UTILS_H_\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/Kbuild b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/Kbuild\nindex 97f80057224f93..2531d41ca28d66 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/Kbuild\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/Kbuild\n@@ -6,12 +6,18 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n ccflags-y += -I$(src)/../include\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/Kconfig b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/Kconfig\nindex 6a87bdbf746e76..0cdb474c06a3a2 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/Kconfig\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/Kconfig\n@@ -6,12 +6,18 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n \n config MALI_KUTF\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/Makefile b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/Makefile\nindex 010c92ca39b9fd..d848e8774bd08f 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/Makefile\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/Makefile\n@@ -6,12 +6,18 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n # linux build system bootstrap for out-of-tree module\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/build.bp b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/build.bp\nnew file mode 100644\nindex 00000000000000..f6d4c3fc7e1576\n--- /dev/null\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/build.bp\n@@ -0,0 +1,31 @@\n+/*\n+ * Copyright:\n+ * ----------------------------------------------------------------------------\n+ * This confidential and proprietary software may be used only as authorized\n+ * by a licensing agreement from ARM Limited.\n+ *      (C) COPYRIGHT 2018 ARM Limited, ALL RIGHTS RESERVED\n+ * The entire notice above must be reproduced on all authorized copies and\n+ * copies may only be made to the extent permitted by a licensing agreement\n+ * from ARM Limited.\n+ * ----------------------------------------------------------------------------\n+ */\n+\n+bob_kernel_module {\n+    name: \"kutf\",\n+    defaults: [\"kernel_defaults\"],\n+    srcs: [\n+        \"Kbuild\",\n+        \"kutf_helpers.c\",\n+        \"kutf_helpers_user.c\",\n+        \"kutf_mem.c\",\n+        \"kutf_resultset.c\",\n+        \"kutf_suite.c\",\n+        \"kutf_utils.c\",\n+    ],\n+    kbuild_options: [\"CONFIG_MALI_KUTF=m\"],\n+    include_dirs: [\"kernel/drivers/gpu/arm/midgard/tests/include\"],\n+    enabled: false,\n+    unit_test_kernel_modules: {\n+        enabled: true,\n+    },\n+}\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_helpers.c b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_helpers.c\nindex 793d58c789ffa1..cab5add6d93c64 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_helpers.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_helpers.c\n@@ -7,19 +7,22 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /* Kernel UTF test helpers */\n #include <kutf/kutf_helpers.h>\n \n-/* 10s timeout for user thread to open the 'data' file once the test is started */\n-#define USERDATA_WAIT_TIMEOUT_MS 10000\n #include <linux/err.h>\n #include <linux/jiffies.h>\n #include <linux/sched.h>\n@@ -27,742 +30,100 @@\n #include <linux/wait.h>\n #include <linux/uaccess.h>\n \n+static DEFINE_SPINLOCK(kutf_input_lock);\n \n-int kutf_helper_textbuf_init(struct kutf_helper_textbuf *textbuf,\n-\t\tstruct kutf_mempool *mempool, int max_line_size,\n-\t\tint max_nr_lines)\n-{\n-\ttextbuf->scratchpad = kutf_mempool_alloc(mempool, max_line_size);\n-\n-\tif (!textbuf->scratchpad)\n-\t\treturn -ENOMEM;\n-\n-\tmutex_init(&textbuf->lock);\n-\ttextbuf->nr_user_clients = 0;\n-\ttextbuf->mempool = mempool;\n-\ttextbuf->used_bytes = 0;\n-\ttextbuf->prev_pos = 0;\n-\ttextbuf->prev_line_pos = 0;\n-\tINIT_LIST_HEAD(&textbuf->textbuf_list);\n-\ttextbuf->max_line_size = max_line_size;\n-\ttextbuf->max_nr_lines = max_nr_lines;\n-\ttextbuf->nr_lines = 0;\n-\ttextbuf->flags = 0ul;\n-\tinit_waitqueue_head(&textbuf->user_opened_wq);\n-\tinit_waitqueue_head(&textbuf->not_full_wq);\n-\tinit_waitqueue_head(&textbuf->not_empty_wq);\n-\n-\treturn 0;\n-}\n-EXPORT_SYMBOL(kutf_helper_textbuf_init);\n-\n-/**\n- * kutf_helper_textbuf_open() - Notify that userspace has opened the 'data'\n- *                              file for a textbuf\n- *\n- * @priv:\t\tprivate pointer from a kutf_userdata_exchange, which\n- *                      should be a pointer to a struct kutf_helper_textbuf\n- *\n- * Return:\t\t0 on success, or negative value on error.\n- */\n-static int kutf_helper_textbuf_open(void *priv)\n-{\n-\tstruct kutf_helper_textbuf *textbuf = priv;\n-\tint ret;\n-\n-\tret = mutex_lock_interruptible(&textbuf->lock);\n-\tif (ret)\n-\t\treturn -ERESTARTSYS;\n-\n-\t++(textbuf->nr_user_clients);\n-\twake_up(&textbuf->user_opened_wq);\n-\n-\tmutex_unlock(&textbuf->lock);\n-\treturn ret;\n-}\n-\n-/**\n- * kutf_helper_textbuf_release() - Notify that userspace has closed the 'data'\n- *                                 file for a textbuf\n- *\n- * @priv:\t\tprivate pointer from a kutf_userdata_exchange, which\n- *                      should be a pointer to a struct kutf_helper_textbuf\n- */\n-static void kutf_helper_textbuf_release(void *priv)\n-{\n-\tstruct kutf_helper_textbuf *textbuf = priv;\n-\n-\t/* Shouldn't use interruptible variants here because if a signal is\n-\t * pending, we can't abort and restart the call */\n-\tmutex_lock(&textbuf->lock);\n-\n-\t--(textbuf->nr_user_clients);\n-\tif (!textbuf->nr_user_clients) {\n-\t\t/* All clients disconnected, wakeup kernel-side waiters */\n-\t\twake_up(&textbuf->not_full_wq);\n-\t\twake_up(&textbuf->not_empty_wq);\n-\t}\n-\n-\tmutex_unlock(&textbuf->lock);\n-}\n-\n-/**\n- * kutf_helper_textbuf_notify_test_ended() - Notify that the test has ended\n- *\n- * @priv:\t\tprivate pointer from a kutf_userdata_exchange, which\n- *                      should be a pointer to a struct kutf_helper_textbuf\n- *\n- * After this call, userspace should be allowed to finish remaining reads but\n- * not make new ones, and not be allowed to make new writes.\n- */\n-static void kutf_helper_textbuf_notify_test_ended(void *priv)\n-{\n-\tstruct kutf_helper_textbuf *textbuf = priv;\n-\n-\t/* Shouldn't use interruptible variants here because if a signal is\n-\t * pending, we can't abort and restart the call */\n-\tmutex_lock(&textbuf->lock);\n-\n-\ttextbuf->flags |= KUTF_HELPER_TEXTBUF_FLAG_DYING;\n-\n-\t/* Consumers waiting due to being full should wake up and abort */\n-\twake_up(&textbuf->not_full_wq);\n-\t/* Producers waiting due to being empty should wake up and abort */\n-\twake_up(&textbuf->not_empty_wq);\n-\n-\tmutex_unlock(&textbuf->lock);\n-}\n-\n-/* Collect text in a textbuf scratchpad up to (but excluding) specified\n- * newline_off, and add it as a textbuf_line\n- *\n- * newline_off is permissible to be at the character after the end of the\n- * scratchpad (i.e. equal to textbuf->max_line_size), for handling when the\n- * line was longer than the size of the scratchpad. Nevertheless, the resulting\n- * size of the line is kept at textbuf->max_line_size, including the '\\0'\n- * terminator. That is, the string length will be textbuf->max_line_size-1.\n- *\n- * Remaining characters strictly after newline_off are moved to the beginning\n- * of the scratchpad, to allow space for a longer line to be collected. This\n- * means the character specified at newline_off will be removed from/no longer\n- * be within the valid region of the scratchpad\n- *\n- * Returns number of bytes the scratchpad was shortened by, or an error\n- * otherwise\n- */\n-static size_t collect_line(struct kutf_helper_textbuf *textbuf, int newline_off)\n-{\n-\t/* '\\n' terminator will be replaced as '\\0' */\n-\tint str_buf_size;\n-\tstruct kutf_helper_textbuf_line *textbuf_line;\n-\tchar *str_start;\n-\tint bytes_remain;\n-\tchar *scratch = textbuf->scratchpad;\n-\tint nextline_off;\n-\n-\tstr_buf_size = newline_off + 1;\n-\tif (str_buf_size > textbuf->max_line_size)\n-\t\tstr_buf_size = textbuf->max_line_size;\n-\n-\t/* String is stored immediately after the line */\n-\ttextbuf_line = kutf_mempool_alloc(textbuf->mempool, str_buf_size + sizeof(struct kutf_helper_textbuf_line));\n-\tif (!textbuf_line)\n-\t\treturn -ENOMEM;\n-\n-\tstr_start = &textbuf_line->str[0];\n-\n-\t/* Copy in string, excluding the terminating '\\n' character, replacing\n-\t * it with '\\0' */\n-\tstrncpy(str_start, scratch, str_buf_size - 1);\n-\tstr_start[str_buf_size-1] = '\\0';\n-\ttextbuf_line->str_size = str_buf_size;\n-\n-\t/* Append to the textbuf */\n-\tlist_add_tail(&textbuf_line->node, &textbuf->textbuf_list);\n-\t++(textbuf->nr_lines);\n-\n-\t/* Move the rest of the scratchpad to the start */\n-\tnextline_off = newline_off + 1;\n-\tif (nextline_off > textbuf->used_bytes)\n-\t\tnextline_off =  textbuf->used_bytes;\n-\n-\tbytes_remain = textbuf->used_bytes - nextline_off;\n-\tmemmove(scratch, scratch + nextline_off, bytes_remain);\n-\ttextbuf->used_bytes = bytes_remain;\n-\n-\t/* Wakeup anyone blocked on empty */\n-\twake_up(&textbuf->not_empty_wq);\n-\n-\treturn nextline_off;\n-}\n-\n-/* Buffer size for truncating a string to its newline.\n- * Allocated on the stack, so keep it moderately small (within PAGE_SIZE) */\n-#define TRUNCATE_BUF_SZ 512\n-\n-/* Discard input from a userbuf up to a newline, then collect what was in the\n- * scratchpad into a new textbuf line */\n-static ssize_t collect_longline_truncate(struct kutf_helper_textbuf *textbuf,\n-\t\tconst char  __user *userbuf, size_t userbuf_len)\n-{\n-\tssize_t bytes_processed = 0;\n-\n-\twhile (userbuf_len > 0) {\n-\t\tint userbuf_copy_sz = userbuf_len;\n-\t\tsize_t res;\n-\t\tchar *newline_ptr;\n-\t\tchar truncate_buf[TRUNCATE_BUF_SZ];\n-\n-\t\tif (userbuf_len > TRUNCATE_BUF_SZ)\n-\t\t\tuserbuf_copy_sz = TRUNCATE_BUF_SZ;\n-\t\telse\n-\t\t\tuserbuf_copy_sz = (int)userbuf_len;\n-\n-\t\t/* copy what we can */\n-\t\tres = copy_from_user(truncate_buf, userbuf, userbuf_copy_sz);\n-\t\tif (res == userbuf_copy_sz)\n-\t\t\treturn -EFAULT;\n-\t\tuserbuf_copy_sz -= res;\n-\n-\t\t/* Search for newline in what was copied */\n-\t\tnewline_ptr = strnchr(truncate_buf, userbuf_copy_sz, '\\n');\n-\n-\t\tif (newline_ptr) {\n-\t\t\tssize_t sres;\n-\t\t\t/* Newline found: collect scratchpad and exit out */\n-\t\t\tint newline_off = newline_ptr - truncate_buf;\n-\n-\t\t\tsres = collect_line(textbuf, textbuf->used_bytes);\n-\t\t\tif (sres < 0)\n-\t\t\t\treturn sres;\n-\n-\t\t\tbytes_processed += newline_off + 1;\n-\t\t\tbreak;\n-\t\t}\n-\n-\t\t/* Newline not yet found: advance to the next part to copy */\n-\t\tuserbuf += userbuf_copy_sz;\n-\t\tuserbuf_len -= userbuf_copy_sz;\n-\t\tbytes_processed += userbuf_copy_sz;\n-\t}\n-\n-\treturn bytes_processed;\n-}\n-\n-/**\n- * kutf_helper_textbuf_consume() - 'data' file consumer function for writing to\n- *                                 a textbuf\n- * @priv:\t\tprivate pointer from a kutf_userdata_exchange, which\n- *                      should be a pointer to a struct kutf_helper_textbuf to\n- *                      write into\n- * @userbuf:\t\tthe userspace buffer to read from\n- * @userbuf_len:\tsize of the userspace buffer\n- * @ppos:\t\tthe current position in the buffer\n- *\n- * This consumer function is used as a write consumer for the 'data' file,\n- * receiving data that has been written to the 'data' file by userspace. It\n- * will read from the userspace buffer @userbuf and separates it into '\\n'\n- * delimited lines for the textbuf pointed to by @priv .\n- *\n- * If there is insufficient space in textbuf, then it will block until there is\n- * space - for example, a kernel-side test calls\n- * kutf_helper_textbuf_dequeue(). Since this is expected to be called in the\n- * context of a syscall, the call can only be cancelled by sending an\n- * appropriate signal to the userspace process.\n- *\n- * The current position @ppos is advanced by the number of bytes successfully\n- * read.\n- *\n- * Return:\t\tthe number of bytes read, or negative value on error.\n- */\n-static ssize_t kutf_helper_textbuf_consume(void *priv,\n-\t\tconst char  __user *userbuf, size_t userbuf_len, loff_t *ppos)\n+static bool pending_input(struct kutf_context *context)\n {\n-\tstruct kutf_helper_textbuf *textbuf = priv;\n-\tint userbuf_copy_sz;\n-\tchar *next_newline_ptr;\n-\tsize_t bytes_processed = 0;\n-\tint newdata_off;\n-\tssize_t ret;\n-\n-\tret = mutex_lock_interruptible(&textbuf->lock);\n-\tif (ret)\n-\t\treturn -ERESTARTSYS;\n-\n-\t/* Validate input */\n-\tif (*ppos < 0) {\n-\t\tret = -EINVAL;\n-\t\tgoto out_unlock;\n-\t}\n-\tif (!userbuf_len) {\n-\t\tret = 0;\n-\t\tgoto out_unlock;\n-\t}\n-\n-\twhile (textbuf->nr_lines >= textbuf->max_nr_lines &&\n-\t\t\t!(textbuf->flags & KUTF_HELPER_TEXTBUF_FLAG_DYING)) {\n-\t\t/* Block on kernel-side dequeue making space available\n-\t\t * NOTE: should also handle O_NONBLOCK */\n-\t\tmutex_unlock(&textbuf->lock);\n-\t\tret = wait_event_interruptible(textbuf->not_full_wq,\n-\t\t\t\t(textbuf->nr_lines < textbuf->max_nr_lines ||\n-\t\t\t\t(textbuf->flags & KUTF_HELPER_TEXTBUF_FLAG_DYING)));\n-\t\tif (ret)\n-\t\t\treturn -ERESTARTSYS;\n-\t\tret = mutex_lock_interruptible(&textbuf->lock);\n-\t\tif (ret)\n-\t\t\treturn -ERESTARTSYS;\n-\t}\n-\n-\tif (textbuf->flags & KUTF_HELPER_TEXTBUF_FLAG_DYING) {\n-\t\tret = -ENODEV;\n-\t\tgoto out_unlock;\n-\t}\n-\n-\tif (textbuf->prev_pos != *ppos && textbuf->used_bytes) {\n-\t\t/* Seeking causes a new line to occur:\n-\t\t * Truncate what data was there into a textbuf-line, and reset\n-\t\t * the buffer */\n-\t\tret = collect_line(textbuf, textbuf->used_bytes);\n-\t\tif (ret < 0)\n-\t\t\tgoto finish;\n-\t} else if (textbuf->used_bytes >= (textbuf->max_line_size - 1)) {\n-\t\t/* Line too long discard input until we find a '\\n' */\n-\t\tret = collect_longline_truncate(textbuf, userbuf, userbuf_len);\n-\n-\t\tif (ret < 0)\n-\t\t\tgoto finish;\n-\n-\t\t/* Update userbuf with how much was processed, which may be the\n-\t\t * entire buffer now */\n-\t\tuserbuf += ret;\n-\t\tuserbuf_len -= ret;\n-\t\tbytes_processed += ret;\n-\n-\t\t/* If there's buffer remaining and we fault later (e.g. can't\n-\t\t * read or OOM) ensure ppos is updated */\n-\t\t*ppos += ret;\n-\n-\t\t/* recheck in case entire buffer processed */\n-\t\tif (!userbuf_len)\n-\t\t\tgoto finish;\n-\t}\n-\n-\t/* An extra line may've been added, ensure we don't overfill */\n-\tif (textbuf->nr_lines >= textbuf->max_nr_lines)\n-\t\tgoto finish_noerr;\n-\n-\tuserbuf_copy_sz = userbuf_len;\n-\n-\t/* Copy in as much as we can */\n-\tif (userbuf_copy_sz > textbuf->max_line_size - textbuf->used_bytes)\n-\t\tuserbuf_copy_sz = textbuf->max_line_size - textbuf->used_bytes;\n-\n-\tret = copy_from_user(textbuf->scratchpad + textbuf->used_bytes, userbuf, userbuf_copy_sz);\n-\tif (ret == userbuf_copy_sz) {\n-\t\tret = -EFAULT;\n-\t\tgoto finish;\n-\t}\n-\tuserbuf_copy_sz -= ret;\n-\n-\tnewdata_off = textbuf->used_bytes;\n-\ttextbuf->used_bytes += userbuf_copy_sz;\n-\n-\twhile (textbuf->used_bytes && textbuf->nr_lines < textbuf->max_nr_lines) {\n-\t\tint new_bytes_remain = textbuf->used_bytes - newdata_off;\n-\t\t/* Find a new line - only the new part should be checked */\n-\t\tnext_newline_ptr = strnchr(textbuf->scratchpad + newdata_off, new_bytes_remain, '\\n');\n-\n-\t\tif (next_newline_ptr) {\n-\t\t\tint newline_off = next_newline_ptr - textbuf->scratchpad;\n-\n-\t\t\t/* if found, collect up to it, then memmove the rest */\n-\t\t\t/* reset positions and see if we can fill any further */\n-\t\t\t/* repeat until run out of data or line is filled */\n-\t\t\tret = collect_line(textbuf, newline_off);\n+\tbool input_pending;\n \n-\t\t\t/* If filled up or OOM, rollback the remaining new\n-\t\t\t * data. Instead we'll try to grab it next time we're\n-\t\t\t * called */\n-\t\t\tif (textbuf->nr_lines >= textbuf->max_nr_lines || ret < 0)\n-\t\t\t\ttextbuf->used_bytes = newdata_off;\n+\tspin_lock(&kutf_input_lock);\n \n-\t\t\tif (ret < 0)\n-\t\t\t\tgoto finish;\n+\tinput_pending = !list_empty(&context->userdata.input_head);\n \n-\t\t\t/* Fix up ppos etc in case we'll be ending the loop */\n-\t\t\t*ppos += ret - newdata_off;\n-\t\t\tbytes_processed += ret - newdata_off;\n-\t\t\tnewdata_off = 0;\n-\t\t} else {\n-\t\t\t/* there's bytes left, but no new-line, so try to fill up next time */\n-\t\t\t*ppos += new_bytes_remain;\n-\t\t\tbytes_processed += new_bytes_remain;\n-\t\t\tbreak;\n-\t\t}\n-\t}\n-\n-finish_noerr:\n-\tret = bytes_processed;\n-finish:\n-\ttextbuf->prev_pos = *ppos;\n-out_unlock:\n-\tmutex_unlock(&textbuf->lock);\n+\tspin_unlock(&kutf_input_lock);\n \n-\treturn ret;\n+\treturn input_pending;\n }\n \n-/**\n- * kutf_helper_textbuf_produce() - 'data' file producer function for reading\n- *                                 from a textbuf\n- * @priv:\t\tprivate pointer from a kutf_userdata_exchange, which\n- *                      should be a pointer to a struct kutf_helper_textbuf to\n- *                      read from\n- * @userbuf:\t\tthe userspace buffer to write to\n- * @userbuf_len:\tsize of the userspace buffer\n- * @ppos:\t\tthe current position in the buffer\n- *\n- * This producer function is used as a read producer for the 'data' file,\n- * allowing userspace to read from the 'data' file. It will write to the\n- * userspace buffer @userbuf, taking lines from the textbuf pointed to by\n- * @priv, separating each line with '\\n'.\n- *\n- * If there is no data in the textbuf, then it will block until some appears -\n- * for example, a kernel-side test calls kutf_helper_textbuf_enqueue(). Since\n- * this is expected to be called in the context of a syscall, the call can only\n- * be cancelled by sending an appropriate signal to the userspace process.\n- *\n- * The current position @ppos is advanced by the number of bytes successfully\n- * written.\n- *\n- * Return:\t\tthe number of bytes written, or negative value on error\n- */\n-static ssize_t kutf_helper_textbuf_produce(void *priv, char  __user *userbuf,\n-\t\tsize_t userbuf_len, loff_t *ppos)\n+char *kutf_helper_input_dequeue(struct kutf_context *context, size_t *str_size)\n {\n-\tstruct kutf_helper_textbuf *textbuf = priv;\n-\tloff_t pos_offset;\n-\tstruct kutf_helper_textbuf_line *line = NULL;\n-\tint line_start_pos;\n-\tsize_t bytes_processed = 0;\n-\tssize_t ret;\n-\tint copy_length;\n-\n-\tret = mutex_lock_interruptible(&textbuf->lock);\n-\tif (ret)\n-\t\treturn -ERESTARTSYS;\n-\n-\t/* Validate input */\n-\tif (*ppos < 0) {\n-\t\tret = -EINVAL;\n-\t\tgoto finish;\n-\t}\n-\tif (!userbuf_len) {\n-\t\tret = 0;\n-\t\tgoto finish;\n-\t}\n-\n-\t/* Seeking to before the beginning of the line will have the effect of\n-\t * resetting the position to the start of the current data, since we've\n-\t * already discarded previous data */\n-\tif (*ppos < textbuf->prev_line_pos)\n-\t\ttextbuf->prev_line_pos = *ppos;\n-\n-\twhile (!line) {\n-\t\tint needs_wake = 0;\n-\n-\t\tpos_offset = *ppos - textbuf->prev_line_pos;\n-\t\tline_start_pos = 0;\n-\n-\t\t/* Find the line for the offset, emptying the textbuf as we go */\n-\t\twhile (!list_empty(&textbuf->textbuf_list)) {\n-\t\t\tint line_end_pos;\n+\tstruct kutf_userdata_line *line;\n \n-\t\t\tline = list_first_entry(&textbuf->textbuf_list, struct kutf_helper_textbuf_line, node);\n+\tspin_lock(&kutf_input_lock);\n \n-\t\t\t/* str_size used in line_end_pos because lines implicitly have\n-\t\t\t * a '\\n', but we count the '\\0' string terminator as that */\n-\t\t\tline_end_pos = line_start_pos + line->str_size;\n-\n-\t\t\tif (pos_offset < line_end_pos)\n-\t\t\t\tbreak;\n-\n-\t\t\tline_start_pos += line->str_size;\n-\t\t\t/* Only discard a line when we're sure it's finished\n-\t\t\t * with, to avoid awkward rollback conditions if we've\n-\t\t\t * had to block */\n-\t\t\tlist_del(&line->node);\n-\t\t\t--(textbuf->nr_lines);\n-\t\t\tline = NULL;\n-\t\t\tneeds_wake = 1;\n-\t\t}\n+\twhile (list_empty(&context->userdata.input_head)) {\n+\t\tint err;\n \n-\t\t/* Update the start of the line pos for next time we're called */\n-\t\ttextbuf->prev_line_pos += line_start_pos;\n+\t\tkutf_set_waiting_for_input(context->result_set);\n \n-\t\t/* If space was freed up, wake waiters */\n-\t\tif (needs_wake)\n-\t\t\twake_up(&textbuf->not_full_wq);\n-;\n-\t\tif (!line) {\n-\t\t\t/* Only check before waiting, to ensure if the test\n-\t\t\t * does the last enqueue and immediately finishes, then\n-\t\t\t * we'll go back round the loop to receive the line\n-\t\t\t * instead of just dying straight away */\n-\t\t\tif (textbuf->flags & KUTF_HELPER_TEXTBUF_FLAG_DYING) {\n-\t\t\t\t/* Indicate EOF rather than an error */\n-\t\t\t\tret = 0;\n-\t\t\t\tgoto finish;\n-\t\t\t}\n+\t\tspin_unlock(&kutf_input_lock);\n \n-\t\t\t/* No lines found, block for new ones\n-\t\t\t * NOTE: should also handle O_NONBLOCK */\n-\t\t\tmutex_unlock(&textbuf->lock);\n-\t\t\tret = wait_event_interruptible(textbuf->not_empty_wq,\n-\t\t\t\t\t(textbuf->nr_lines > 0 ||\n-\t\t\t\t\t(textbuf->flags & KUTF_HELPER_TEXTBUF_FLAG_DYING)));\n+\t\terr = wait_event_interruptible(context->userdata.input_waitq,\n+\t\t\t\tpending_input(context));\n \n-\t\t\t/* signals here are not restartable */\n-\t\t\tif (ret)\n-\t\t\t\treturn ret;\n-\t\t\tret = mutex_lock_interruptible(&textbuf->lock);\n-\t\t\tif (ret)\n-\t\t\t\treturn ret;\n-\t\t}\n+\t\tif (err)\n+\t\t\treturn ERR_PTR(-EINTR);\n \n+\t\tspin_lock(&kutf_input_lock);\n \t}\n \n-\n-\t/* Find offset within the line, guaranteed to be within line->str_size */\n-\tpos_offset -= line_start_pos;\n-\n-\twhile (userbuf_len && line) {\n-\t\t/* Copy at most to the end of string, excluding terminator */\n-\t\tcopy_length = line->str_size - 1 - pos_offset;\n-\t\tif (copy_length > userbuf_len)\n-\t\t\tcopy_length = userbuf_len;\n-\n-\t\tif (copy_length) {\n-\t\t\tret = copy_to_user(userbuf, &line->str[pos_offset], copy_length);\n-\t\t\tif (ret == copy_length) {\n-\t\t\t\tret = -EFAULT;\n-\t\t\t\tgoto finish;\n-\t\t\t}\n-\t\t\tcopy_length -= ret;\n-\n-\t\t\tuserbuf += copy_length;\n-\t\t\tuserbuf_len -= copy_length;\n-\t\t\tbytes_processed += copy_length;\n-\t\t\t*ppos += copy_length;\n-\t\t\tif (ret)\n-\t\t\t\tgoto finish_noerr;\n-\t\t}\n-\n-\t\t/* Add terminator if one was needed */\n-\t\tif (userbuf_len) {\n-\t\t\tcopy_length = 1;\n-\t\t\tret = copy_to_user(userbuf, \"\\n\", copy_length);\n-\t\t\tif (ret == copy_length) {\n-\t\t\t\tret = -EFAULT;\n-\t\t\t\tgoto finish;\n-\t\t\t}\n-\t\t\tcopy_length -= ret;\n-\n-\t\t\tuserbuf += copy_length;\n-\t\t\tuserbuf_len -= copy_length;\n-\t\t\tbytes_processed += copy_length;\n-\t\t\t*ppos += copy_length;\n-\t\t} else {\n-\t\t\t/* string wasn't completely copied this time - try to\n-\t\t\t * finish it next call */\n-\t\t\tbreak;\n-\t\t}\n-\n-\t\t/* Line Completed - only now can safely delete it */\n-\t\ttextbuf->prev_line_pos += line->str_size;\n+\tline = list_first_entry(&context->userdata.input_head,\n+\t\t\tstruct kutf_userdata_line, node);\n+\tif (line->str) {\n+\t\t/*\n+\t\t * Unless it is the end-of-input marker,\n+\t\t * remove it from the list\n+\t\t */\n \t\tlist_del(&line->node);\n-\t\t--(textbuf->nr_lines);\n-\t\tline = NULL;\n-\t\t/* Space freed up, wake up waiters */\n-\t\twake_up(&textbuf->not_full_wq);\n-\n-\t\t/* Pick the next line  */\n-\t\tif (!list_empty(&textbuf->textbuf_list)) {\n-\t\t\tline = list_first_entry(&textbuf->textbuf_list, struct kutf_helper_textbuf_line, node);\n-\t\t\tpos_offset = 0;\n-\t\t}\n-\t\t/* if no more lines, we've copied at least some bytes, so only\n-\t\t * need to block on new lines the next time we're called */\n \t}\n \n-finish_noerr:\n-\tret = bytes_processed;\n-finish:\n-\tmutex_unlock(&textbuf->lock);\n+\tspin_unlock(&kutf_input_lock);\n \n-\treturn ret;\n+\tif (str_size)\n+\t\t*str_size = line->size;\n+\treturn line->str;\n }\n \n-int kutf_helper_textbuf_wait_for_user(struct kutf_helper_textbuf *textbuf)\n+int kutf_helper_input_enqueue(struct kutf_context *context,\n+\t\tconst char __user *str, size_t size)\n {\n-\tint err;\n-\tunsigned long now;\n-\tunsigned long timeout_jiffies = msecs_to_jiffies(USERDATA_WAIT_TIMEOUT_MS);\n-\tunsigned long time_end;\n-\tint ret = 0;\n-\n-\t/* Mutex locking using non-interruptible variants, since a signal to\n-\t * the user process will generally have to wait until we finish the\n-\t * test, because we can't restart the test. The exception is where\n-\t * we're blocked on a waitq */\n-\tmutex_lock(&textbuf->lock);\n+\tstruct kutf_userdata_line *line;\n \n-\tnow = jiffies;\n-\ttime_end = now + timeout_jiffies;\n-\n-\twhile (!textbuf->nr_user_clients && time_before_eq(now, time_end)) {\n-\t\tunsigned long time_to_wait = time_end - now;\n-\t\t/* No users yet, block or timeout */\n-\t\tmutex_unlock(&textbuf->lock);\n-\t\t/* Use interruptible here - in case we block for a long time\n-\t\t * and want to kill the user process */\n-\t\terr = wait_event_interruptible_timeout(textbuf->user_opened_wq,\n-\t\t\t\t(textbuf->nr_user_clients > 0), time_to_wait);\n-\t\t/* Any error is not restartable due to how kutf runs tests */\n-\t\tif (err < 0)\n-\t\t\treturn -EINTR;\n-\t\tmutex_lock(&textbuf->lock);\n+\tline = kutf_mempool_alloc(&context->fixture_pool,\n+\t\t\tsizeof(*line) + size + 1);\n+\tif (!line)\n+\t\treturn -ENOMEM;\n+\tif (str) {\n+\t\tunsigned long bytes_not_copied;\n \n-\t\tnow = jiffies;\n+\t\tline->size = size;\n+\t\tline->str = (void *)(line + 1);\n+\t\tbytes_not_copied = copy_from_user(line->str, str, size);\n+\t\tif (bytes_not_copied != 0)\n+\t\t\treturn -EFAULT;\n+\t\t/* Zero terminate the string */\n+\t\tline->str[size] = '\\0';\n+\t} else {\n+\t\t/* This is used to mark the end of input */\n+\t\tWARN_ON(size);\n+\t\tline->size = 0;\n+\t\tline->str = NULL;\n \t}\n-\tif (!textbuf->nr_user_clients)\n-\t\tret = -ETIMEDOUT;\n-\n-\tmutex_unlock(&textbuf->lock);\n-\n-\treturn ret;\n-}\n-EXPORT_SYMBOL(kutf_helper_textbuf_wait_for_user);\n-\n-char *kutf_helper_textbuf_dequeue(struct kutf_helper_textbuf *textbuf,\n-\t\tint *str_size)\n-{\n-\tstruct kutf_helper_textbuf_line *line;\n-\tchar *ret = NULL;\n-\n-\t/* Mutex locking using non-interruptible variants, since a signal to\n-\t * the user process will generally have to wait until we finish the\n-\t * test, because we can't restart the test. The exception is where\n-\t * we're blocked on a waitq */\n-\tmutex_lock(&textbuf->lock);\n-\n-\twhile (list_empty(&textbuf->textbuf_list)) {\n-\t\tint err;\n \n-\t\tif (!textbuf->nr_user_clients) {\n-\t\t\t/* No user-side clients - error */\n-\t\t\tgoto out;\n-\t\t}\n+\tspin_lock(&kutf_input_lock);\n \n-\t\t/* No lines found, block for new ones from user-side consumer */\n-\t\tmutex_unlock(&textbuf->lock);\n-\t\t/* Use interruptible here - in case we block for a long time\n-\t\t * and want to kill the user process */\n-\t\terr = wait_event_interruptible(textbuf->not_empty_wq,\n-\t\t\t\t(textbuf->nr_lines > 0 || !textbuf->nr_user_clients));\n-\t\t/* Any error is not restartable due to how kutf runs tests */\n-\t\tif (err)\n-\t\t\treturn ERR_PTR(-EINTR);\n-\t\tmutex_lock(&textbuf->lock);\n-\t}\n+\tlist_add_tail(&line->node, &context->userdata.input_head);\n \n-\tline = list_first_entry(&textbuf->textbuf_list, struct kutf_helper_textbuf_line, node);\n-\tlist_del(&line->node);\n-\t--(textbuf->nr_lines);\n-\t/* Space freed up, wake up waiters */\n-\twake_up(&textbuf->not_full_wq);\n+\tkutf_clear_waiting_for_input(context->result_set);\n \n-\tif (str_size)\n-\t\t*str_size = line->str_size;\n+\tspin_unlock(&kutf_input_lock);\n \n-\tret = &line->str[0];\n+\twake_up(&context->userdata.input_waitq);\n \n-out:\n-\tmutex_unlock(&textbuf->lock);\n-\treturn ret;\n+\treturn 0;\n }\n-EXPORT_SYMBOL(kutf_helper_textbuf_dequeue);\n \n-int kutf_helper_textbuf_enqueue(struct kutf_helper_textbuf *textbuf,\n-\t\tchar *enqueue_str, int buf_max_size)\n+void kutf_helper_input_enqueue_end_of_data(struct kutf_context *context)\n {\n-\tstruct kutf_helper_textbuf_line *textbuf_line;\n-\tint str_size = strnlen(enqueue_str, buf_max_size) + 1;\n-\tchar *str_start;\n-\tint ret = 0;\n-\n-\t/* Mutex locking using non-interruptible variants, since a signal to\n-\t * the user process will generally have to wait until we finish the\n-\t * test, because we can't restart the test. The exception is where\n-\t * we're blocked on a waitq */\n-\tmutex_lock(&textbuf->lock);\n-\n-\tif (str_size > textbuf->max_line_size)\n-\t\tstr_size = textbuf->max_line_size;\n-\n-\twhile (textbuf->nr_lines >= textbuf->max_nr_lines) {\n-\t\tif (!textbuf->nr_user_clients) {\n-\t\t\t/* No user-side clients - error */\n-\t\t\tret = -EBUSY;\n-\t\t\tgoto out;\n-\t\t}\n-\n-\t\t/* Block on user-side producer making space available */\n-\t\tmutex_unlock(&textbuf->lock);\n-\t\t/* Use interruptible here - in case we block for a long time\n-\t\t * and want to kill the user process */\n-\t\tret = wait_event_interruptible(textbuf->not_full_wq,\n-\t\t\t\t(textbuf->nr_lines < textbuf->max_nr_lines || !textbuf->nr_user_clients));\n-\t\t/* Any error is not restartable due to how kutf runs tests */\n-\t\tif (ret)\n-\t\t\treturn -EINTR;\n-\t\tmutex_lock(&textbuf->lock);\n-\t}\n-\n-\t/* String is stored immediately after the line */\n-\ttextbuf_line = kutf_mempool_alloc(textbuf->mempool, str_size + sizeof(struct kutf_helper_textbuf_line));\n-\tif (!textbuf_line) {\n-\t\tret = -ENOMEM;\n-\t\tgoto out;\n-\t}\n-\n-\tstr_start = &textbuf_line->str[0];\n-\n-\t/* Copy in string */\n-\tstrncpy(str_start, enqueue_str, str_size);\n-\t/* Enforce the '\\0' termination */\n-\tstr_start[str_size-1] = '\\0';\n-\ttextbuf_line->str_size = str_size;\n-\n-\t/* Append to the textbuf */\n-\tlist_add_tail(&textbuf_line->node, &textbuf->textbuf_list);\n-\t++(textbuf->nr_lines);\n-\n-\t/* Wakeup anyone blocked on empty */\n-\twake_up(&textbuf->not_empty_wq);\n-\n-out:\n-\tmutex_unlock(&textbuf->lock);\n-\treturn ret;\n+\tkutf_helper_input_enqueue(context, NULL, 0);\n }\n-EXPORT_SYMBOL(kutf_helper_textbuf_enqueue);\n-\n-\n-struct kutf_userdata_ops kutf_helper_textbuf_userdata_ops = {\n-\t.open = kutf_helper_textbuf_open,\n-\t.release = kutf_helper_textbuf_release,\n-\t.notify_ended = kutf_helper_textbuf_notify_test_ended,\n-\t.consumer = kutf_helper_textbuf_consume,\n-\t.producer = kutf_helper_textbuf_produce,\n-};\n-EXPORT_SYMBOL(kutf_helper_textbuf_userdata_ops);\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_helpers_user.c b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_helpers_user.c\nindex cf3b00563c5f0b..108fa82d9b2165 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_helpers_user.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_helpers_user.c\n@@ -7,20 +7,27 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /* Kernel UTF test helpers that mirror those for kutf-userside */\n #include <kutf/kutf_helpers_user.h>\n+#include <kutf/kutf_helpers.h>\n #include <kutf/kutf_utils.h>\n \n #include <linux/err.h>\n #include <linux/slab.h>\n+#include <linux/export.h>\n \n const char *valtype_names[] = {\n \t\"INVALID\",\n@@ -48,7 +55,7 @@ static const char *get_val_type_name(enum kutf_helper_valtype valtype)\n  *\n  * - Has between 1 and KUTF_HELPER_MAX_VAL_NAME_LEN characters before the \\0 terminator\n  * - And, each char is in the character set [A-Z0-9_] */\n-static int validate_val_name(char *val_str, int str_len)\n+static int validate_val_name(const char *val_str, int str_len)\n {\n \tint i = 0;\n \n@@ -81,24 +88,44 @@ static int validate_val_name(char *val_str, int str_len)\n  *\n  * That is, before any '\\\\', '\\n' or '\"' characters. This is so we don't have\n  * to escape the string */\n-static int find_quoted_string_valid_len(char *str)\n+static int find_quoted_string_valid_len(const char *str)\n {\n \tchar *ptr;\n \tconst char *check_chars = \"\\\\\\n\\\"\";\n \n \tptr = strpbrk(str, check_chars);\n \tif (ptr)\n-\t\treturn ptr-str;\n+\t\treturn (int)(ptr-str);\n+\n+\treturn (int)strlen(str);\n+}\n+\n+static int kutf_helper_userdata_enqueue(struct kutf_context *context,\n+\t\tconst char *str)\n+{\n+\tchar *str_copy;\n+\tsize_t len;\n+\tint err;\n+\n+\tlen = strlen(str)+1;\n+\n+\tstr_copy = kutf_mempool_alloc(&context->fixture_pool, len);\n+\tif (!str_copy)\n+\t\treturn -ENOMEM;\n+\n+\tstrcpy(str_copy, str);\n \n-\treturn strlen(str);\n+\terr = kutf_add_result(context, KUTF_RESULT_USERDATA, str_copy);\n+\n+\treturn err;\n }\n \n #define MAX_U64_HEX_LEN 16\n /* (Name size) + (\"=0x\" size) + (64-bit hex value size) + (terminator) */\n #define NAMED_U64_VAL_BUF_SZ (KUTF_HELPER_MAX_VAL_NAME_LEN + 3 + MAX_U64_HEX_LEN + 1)\n \n-int kutf_helper_textbuf_send_named_u64(struct kutf_context *context,\n-\t\tstruct kutf_helper_textbuf *textbuf, char *val_name, u64 val)\n+int kutf_helper_send_named_u64(struct kutf_context *context,\n+\t\tconst char *val_name, u64 val)\n {\n \tint ret = 1;\n \tchar msgbuf[NAMED_U64_VAL_BUF_SZ];\n@@ -117,9 +144,8 @@ int kutf_helper_textbuf_send_named_u64(struct kutf_context *context,\n \t\t\t\tval_name, NAMED_U64_VAL_BUF_SZ, ret);\n \t\tgoto out_err;\n \t}\n-\tmsgbuf[NAMED_U64_VAL_BUF_SZ-1] = '\\0';\n \n-\tret = kutf_helper_textbuf_enqueue(textbuf, msgbuf, NAMED_U64_VAL_BUF_SZ);\n+\tret = kutf_helper_userdata_enqueue(context, msgbuf);\n \tif (ret) {\n \t\terrmsg = kutf_dsprintf(&context->fixture_pool,\n \t\t\t\t\"Failed to send u64 value named '%s': send returned %d\",\n@@ -132,33 +158,31 @@ int kutf_helper_textbuf_send_named_u64(struct kutf_context *context,\n \tkutf_test_fail(context, errmsg);\n \treturn ret;\n }\n-EXPORT_SYMBOL(kutf_helper_textbuf_send_named_u64);\n+EXPORT_SYMBOL(kutf_helper_send_named_u64);\n \n #define NAMED_VALUE_SEP \"=\"\n #define NAMED_STR_START_DELIM NAMED_VALUE_SEP \"\\\"\"\n #define NAMED_STR_END_DELIM \"\\\"\"\n \n-int kutf_helper_textbuf_max_str_len_for_kern(char *val_name,\n+int kutf_helper_max_str_len_for_kern(const char *val_name,\n \t\tint kern_buf_sz)\n {\n-\tint val_name_len = strlen(val_name);\n-\tint start_delim_len = strlen(NAMED_STR_START_DELIM);\n-\tint max_msg_len = kern_buf_sz - 1;\n+\tconst int val_name_len = strlen(val_name);\n+\tconst int start_delim_len = strlen(NAMED_STR_START_DELIM);\n+\tconst int end_delim_len = strlen(NAMED_STR_END_DELIM);\n+\tint max_msg_len = kern_buf_sz;\n \tint max_str_len;\n \n-\t/* We do not include the end delimiter. Providing there is a line\n-\t * ending character when sending the message, the end delimiter can be\n-\t * truncated off safely to allow proper NAME=\"value\" reception when\n-\t * value's length is too long */\n-\tmax_str_len = max_msg_len - val_name_len - start_delim_len;\n+\tmax_str_len = max_msg_len - val_name_len - start_delim_len -\n+\t\tend_delim_len;\n \n \treturn max_str_len;\n }\n-EXPORT_SYMBOL(kutf_helper_textbuf_max_str_len_for_kern);\n+EXPORT_SYMBOL(kutf_helper_max_str_len_for_kern);\n \n-int kutf_helper_textbuf_send_named_str(struct kutf_context *context,\n-\t\tstruct kutf_helper_textbuf *textbuf, char *val_name,\n-\t\tchar *val_str)\n+int kutf_helper_send_named_str(struct kutf_context *context,\n+\t\tconst char *val_name,\n+\t\tconst char *val_str)\n {\n \tint val_str_len;\n \tint str_buf_sz;\n@@ -215,7 +239,7 @@ int kutf_helper_textbuf_send_named_str(struct kutf_context *context,\n \t/* Terminator */\n \t*copy_ptr = '\\0';\n \n-\tret = kutf_helper_textbuf_enqueue(textbuf, str_buf, str_buf_sz);\n+\tret = kutf_helper_userdata_enqueue(context, str_buf);\n \n \tif (ret) {\n \t\terrmsg = kutf_dsprintf(&context->fixture_pool,\n@@ -232,12 +256,13 @@ int kutf_helper_textbuf_send_named_str(struct kutf_context *context,\n \tkfree(str_buf);\n \treturn ret;\n }\n-EXPORT_SYMBOL(kutf_helper_textbuf_send_named_str);\n+EXPORT_SYMBOL(kutf_helper_send_named_str);\n \n-int kutf_helper_textbuf_receive_named_val(struct kutf_helper_named_val *named_val,\n-\t\tstruct kutf_helper_textbuf *textbuf)\n+int kutf_helper_receive_named_val(\n+\t\tstruct kutf_context *context,\n+\t\tstruct kutf_helper_named_val *named_val)\n {\n-\tint recv_sz;\n+\tsize_t recv_sz;\n \tchar *recv_str;\n \tchar *search_ptr;\n \tchar *name_str = NULL;\n@@ -246,15 +271,13 @@ int kutf_helper_textbuf_receive_named_val(struct kutf_helper_named_val *named_va\n \tenum kutf_helper_valtype type = KUTF_HELPER_VALTYPE_INVALID;\n \tchar *strval = NULL;\n \tu64 u64val = 0;\n-\tint orig_recv_sz;\n \tint err = KUTF_HELPER_ERR_INVALID_VALUE;\n \n-\trecv_str = kutf_helper_textbuf_dequeue(textbuf, &recv_sz);\n+\trecv_str = kutf_helper_input_dequeue(context, &recv_sz);\n \tif (!recv_str)\n \t\treturn -EBUSY;\n \telse if (IS_ERR(recv_str))\n \t\treturn PTR_ERR(recv_str);\n-\torig_recv_sz = recv_sz;\n \n \t/* Find the '=', grab the name and validate it */\n \tsearch_ptr = strnchr(recv_str, recv_sz, NAMED_VALUE_SEP[0]);\n@@ -271,7 +294,8 @@ int kutf_helper_textbuf_receive_named_val(struct kutf_helper_named_val *named_va\n \t\t}\n \t}\n \tif (!name_str) {\n-\t\tpr_err(\"Invalid name part for recevied string '%s'\\n\", recv_str);\n+\t\tpr_err(\"Invalid name part for received string '%s'\\n\",\n+\t\t\t\trecv_str);\n \t\treturn KUTF_HELPER_ERR_INVALID_NAME;\n \t}\n \n@@ -299,24 +323,6 @@ int kutf_helper_textbuf_receive_named_val(struct kutf_helper_named_val *named_va\n \t\t\t\tpr_err(\"String value contains invalid characters in rest of received string '%s'\\n\", recv_str);\n \t\t\t\terr = KUTF_HELPER_ERR_CHARS_AFTER_VAL;\n \t\t\t}\n-\t\t} else if (orig_recv_sz == textbuf->max_line_size) {\n-\t\t\t/* No end-delimiter found, but the line is at\n-\t\t\t * the max line size. Assume that before\n-\t\t\t * truncation the line had a closing delimiter\n-\t\t\t * anyway */\n-\t\t\tstrval_len = strlen(recv_str);\n-\t\t\t/* Validate the string to ensure it contains no quotes */\n-\t\t\tif (strval_len == find_quoted_string_valid_len(recv_str)) {\n-\t\t\t\tstrval = recv_str;\n-\n-\t\t\t\t/* Move to the end of the string */\n-\t\t\t\trecv_str += strval_len;\n-\t\t\t\trecv_sz -= strval_len;\n-\t\t\t\ttype = KUTF_HELPER_VALTYPE_STR;\n-\t\t\t} else {\n-\t\t\t\tpr_err(\"String value contains invalid characters in rest of received string '%s'\\n\", recv_str);\n-\t\t\t\terr = KUTF_HELPER_ERR_CHARS_AFTER_VAL;\n-\t\t\t}\n \t\t} else {\n \t\t\tpr_err(\"End of string delimiter not found in rest of received string '%s'\\n\", recv_str);\n \t\t\terr = KUTF_HELPER_ERR_NO_END_DELIMITER;\n@@ -357,8 +363,8 @@ int kutf_helper_textbuf_receive_named_val(struct kutf_helper_named_val *named_va\n \t\tnamed_val->u.val_str = strval;\n \t\tbreak;\n \tdefault:\n-\t\tpr_err(\"Unreachable, fix textbuf_receive_named_val\\n\");\n-\t\t/* Coding error, report as though 'data' file failed */\n+\t\tpr_err(\"Unreachable, fix kutf_helper_receive_named_val\\n\");\n+\t\t/* Coding error, report as though 'run' file failed */\n \t\treturn -EINVAL;\n \t}\n \n@@ -367,16 +373,18 @@ int kutf_helper_textbuf_receive_named_val(struct kutf_helper_named_val *named_va\n \n \treturn KUTF_HELPER_ERR_NONE;\n }\n-EXPORT_SYMBOL(kutf_helper_textbuf_receive_named_val);\n+EXPORT_SYMBOL(kutf_helper_receive_named_val);\n \n #define DUMMY_MSG \"<placeholder due to test fail>\"\n-int kutf_helper_textbuf_receive_check_val(struct kutf_helper_named_val *named_val,\n-\t\tstruct kutf_context *context, struct kutf_helper_textbuf *textbuf,\n-\t\tchar *expect_val_name, enum kutf_helper_valtype expect_val_type)\n+int kutf_helper_receive_check_val(\n+\t\tstruct kutf_helper_named_val *named_val,\n+\t\tstruct kutf_context *context,\n+\t\tconst char *expect_val_name,\n+\t\tenum kutf_helper_valtype expect_val_type)\n {\n \tint err;\n \n-\terr = kutf_helper_textbuf_receive_named_val(named_val, textbuf);\n+\terr = kutf_helper_receive_named_val(context, named_val);\n \tif (err < 0) {\n \t\tconst char *msg = kutf_dsprintf(&context->fixture_pool,\n \t\t\t\t\"Failed to receive value named '%s'\",\n@@ -438,7 +446,7 @@ int kutf_helper_textbuf_receive_check_val(struct kutf_helper_named_val *named_va\n \t/* But at least allow the caller to continue in the test with failures */\n \treturn 0;\n }\n-EXPORT_SYMBOL(kutf_helper_textbuf_receive_check_val);\n+EXPORT_SYMBOL(kutf_helper_receive_check_val);\n \n void kutf_helper_output_named_val(struct kutf_helper_named_val *named_val)\n {\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_mem.c b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_mem.c\nindex a75e15fde05f72..fd98beaeb84a93 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_mem.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_mem.c\n@@ -7,18 +7,24 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /* Kernel UTF memory management functions */\n \n #include <linux/list.h>\n #include <linux/slab.h>\n+#include <linux/export.h>\n \n #include <kutf/kutf_mem.h>\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_resultset.c b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_resultset.c\nindex 5bd04969fd55f7..94ecfa4421e18a 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_resultset.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_resultset.c\n@@ -7,29 +7,33 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /* Kernel UTF result management functions */\n \n #include <linux/list.h>\n #include <linux/slab.h>\n #include <linux/printk.h>\n+#include <linux/sched.h>\n+#include <linux/wait.h>\n+#include <linux/err.h>\n \n+#include <kutf/kutf_suite.h>\n #include <kutf/kutf_resultset.h>\n \n-/**\n- * struct kutf_result_set - Represents a set of results.\n- * @results:\tPointer to the linked list where the results are stored.\n- */\n-struct kutf_result_set {\n-\tstruct list_head          results;\n-};\n+/* Lock to protect all result structures */\n+static DEFINE_SPINLOCK(kutf_result_lock);\n \n struct kutf_result_set *kutf_create_result_set(void)\n {\n@@ -42,6 +46,8 @@ struct kutf_result_set *kutf_create_result_set(void)\n \t}\n \n \tINIT_LIST_HEAD(&set->results);\n+\tinit_waitqueue_head(&set->waitq);\n+\tset->flags = 0;\n \n \treturn set;\n \n@@ -49,11 +55,12 @@ struct kutf_result_set *kutf_create_result_set(void)\n \treturn NULL;\n }\n \n-void kutf_add_result(struct kutf_mempool *mempool,\n-\t\tstruct kutf_result_set *set,\n+int kutf_add_result(struct kutf_context *context,\n \t\tenum kutf_result_status status,\n \t\tconst char *message)\n {\n+\tstruct kutf_mempool *mempool = &context->fixture_pool;\n+\tstruct kutf_result_set *set = context->result_set;\n \t/* Create the new result */\n \tstruct kutf_result *new_result;\n \n@@ -62,14 +69,22 @@ void kutf_add_result(struct kutf_mempool *mempool,\n \tnew_result = kutf_mempool_alloc(mempool, sizeof(*new_result));\n \tif (!new_result) {\n \t\tpr_err(\"Result allocation failed\\n\");\n-\t\treturn;\n+\t\treturn -ENOMEM;\n \t}\n \n \tINIT_LIST_HEAD(&new_result->node);\n \tnew_result->status = status;\n \tnew_result->message = message;\n \n+\tspin_lock(&kutf_result_lock);\n+\n \tlist_add_tail(&new_result->node, &set->results);\n+\n+\tspin_unlock(&kutf_result_lock);\n+\n+\twake_up(&set->waitq);\n+\n+\treturn 0;\n }\n \n void kutf_destroy_result_set(struct kutf_result_set *set)\n@@ -80,16 +95,70 @@ void kutf_destroy_result_set(struct kutf_result_set *set)\n \tkfree(set);\n }\n \n+static bool kutf_has_result(struct kutf_result_set *set)\n+{\n+\tbool has_result;\n+\n+\tspin_lock(&kutf_result_lock);\n+\tif (set->flags & KUTF_RESULT_SET_WAITING_FOR_INPUT)\n+\t\t/* Pretend there are results if waiting for input */\n+\t\thas_result = true;\n+\telse\n+\t\thas_result = !list_empty(&set->results);\n+\tspin_unlock(&kutf_result_lock);\n+\n+\treturn has_result;\n+}\n+\n struct kutf_result *kutf_remove_result(struct kutf_result_set *set)\n {\n-\tif (!list_empty(&set->results)) {\n-\t\tstruct kutf_result *ret;\n+\tstruct kutf_result *result = NULL;\n+\tint ret;\n+\n+\tdo {\n+\t\tret = wait_event_interruptible(set->waitq,\n+\t\t\t\tkutf_has_result(set));\n+\n+\t\tif (ret)\n+\t\t\treturn ERR_PTR(ret);\n+\n+\t\tspin_lock(&kutf_result_lock);\n+\n+\t\tif (!list_empty(&set->results)) {\n+\t\t\tresult = list_first_entry(&set->results,\n+\t\t\t\t\tstruct kutf_result,\n+\t\t\t\t\tnode);\n+\t\t\tlist_del(&result->node);\n+\t\t} else if (set->flags & KUTF_RESULT_SET_WAITING_FOR_INPUT) {\n+\t\t\t/* Return a fake result */\n+\t\t\tstatic struct kutf_result waiting = {\n+\t\t\t\t.status = KUTF_RESULT_USERDATA_WAIT\n+\t\t\t};\n+\t\t\tresult = &waiting;\n+\t\t}\n+\t\t/* If result == NULL then there was a race with the event\n+\t\t * being removed between the check in kutf_has_result and\n+\t\t * the lock being obtained. In this case we retry\n+\t\t */\n+\n+\t\tspin_unlock(&kutf_result_lock);\n+\t} while (result == NULL);\n+\n+\treturn result;\n+}\n \n-\t\tret = list_first_entry(&set->results, struct kutf_result, node);\n-\t\tlist_del(&ret->node);\n-\t\treturn ret;\n-\t}\n+void kutf_set_waiting_for_input(struct kutf_result_set *set)\n+{\n+\tspin_lock(&kutf_result_lock);\n+\tset->flags |= KUTF_RESULT_SET_WAITING_FOR_INPUT;\n+\tspin_unlock(&kutf_result_lock);\n \n-\treturn NULL;\n+\twake_up(&set->waitq);\n }\n \n+void kutf_clear_waiting_for_input(struct kutf_result_set *set)\n+{\n+\tspin_lock(&kutf_result_lock);\n+\tset->flags &= ~KUTF_RESULT_SET_WAITING_FOR_INPUT;\n+\tspin_unlock(&kutf_result_lock);\n+}\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_suite.c b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_suite.c\nindex ad30cc86a3b02f..1c350bb339fb77 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_suite.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_suite.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /* Kernel UTF suite, test and fixture management including user to kernel\n  * interaction */\n \n@@ -27,12 +32,14 @@\n #include <linux/fs.h>\n #include <linux/version.h>\n #include <linux/atomic.h>\n+#include <linux/sched.h>\n \n #include <generated/autoconf.h>\n \n #include <kutf/kutf_suite.h>\n #include <kutf/kutf_resultset.h>\n #include <kutf/kutf_utils.h>\n+#include <kutf/kutf_helpers.h>\n \n #if defined(CONFIG_DEBUG_FS)\n \n@@ -61,8 +68,6 @@ struct kutf_application {\n  * @variant_list:\tList head to store all the variants which can run on\n  *                      this function\n  * @dir:\t\tdebugfs directory for this test function\n- * @userdata_ops:\tCallbacks to use for sending and receiving data to\n- *                      userspace.\n  */\n struct kutf_test_function {\n \tstruct kutf_suite  *suite;\n@@ -73,7 +78,6 @@ struct kutf_test_function {\n \tstruct list_head   node;\n \tstruct list_head   variant_list;\n \tstruct dentry      *dir;\n-\tstruct kutf_userdata_ops userdata_ops;\n };\n \n /**\n@@ -83,17 +87,16 @@ struct kutf_test_function {\n  * @fixture_index:\tIndex of this fixture\n  * @node:\t\tList node for variant_list\n  * @dir:\t\tdebugfs directory for this test fixture\n- * @nr_running:\t\tCurrent count of user-clients running this fixture\n  */\n struct kutf_test_fixture {\n \tstruct kutf_test_function *test_func;\n \tunsigned int              fixture_index;\n \tstruct list_head          node;\n \tstruct dentry             *dir;\n-\tatomic_t                  nr_running;\n };\n \n-struct dentry *base_dir;\n+static struct dentry *base_dir;\n+static struct workqueue_struct *kutf_workq;\n \n /**\n  * struct kutf_convert_table - Structure which keeps test results\n@@ -183,26 +186,6 @@ static void kutf_set_result(struct kutf_context *context,\n static void kutf_set_expected_result(struct kutf_context *context,\n \t\tenum kutf_result_status expected_status);\n \n-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0))\n-/* Pre 3.4.0 kernels don't have the simple_open helper */\n-\n-/**\n- * simple_open() - Helper for file opening which stores the inode private data\n- *                 into the file private data\n- * @inode:\tFile entry representation\n- * @file:\tA specific opening of the file\n- *\n- * Return: always 0; if inode private data do not exist, the file will not\n- *         be assigned private data\n- */\n-static int simple_open(struct inode *inode, struct file *file)\n-{\n-\tif (inode->i_private)\n-\t\tfile->private_data = inode->i_private;\n-\treturn 0;\n-}\n-#endif\n-\n /**\n  * kutf_result_to_string() - Converts a KUTF result into a string\n  * @result_str:      Output result string\n@@ -251,263 +234,6 @@ static const struct file_operations kutf_debugfs_const_string_ops = {\n \t.llseek  = default_llseek,\n };\n \n-/**\n- * kutf_debugfs_data_open() Debugfs open callback for the \"data\" entry.\n- * @inode:\tinode of the opened file\n- * @file:\tOpened file to read from\n- *\n- * This function notifies the userdata callbacks that the userdata file has\n- * been opened, for tracking purposes.\n- *\n- * It is called on both the context's userdata_consumer_priv and\n- * userdata_producer_priv.\n- *\n- * This takes a refcount on the kutf_context\n- *\n- * Return: 0 on success\n- */\n-static int kutf_debugfs_data_open(struct inode *inode, struct file *file)\n-{\n-\tstruct kutf_context *test_context = inode->i_private;\n-\tstruct kutf_test_fixture *test_fix = test_context->test_fix;\n-\tstruct kutf_test_function *test_func = test_fix->test_func;\n-\tint err;\n-\n-\tsimple_open(inode, file);\n-\n-\t/* This is not an error */\n-\tif (!test_func->userdata_ops.open)\n-\t\tgoto out_no_ops;\n-\n-\t/* This is safe here - the 'data' file is only openable whilst the\n-\t * initial refcount is still present, and the initial refcount is only\n-\t * dropped strictly after the 'data' file is removed */\n-\tkutf_context_get(test_context);\n-\n-\tif (test_context->userdata_consumer_priv) {\n-\t\terr = test_func->userdata_ops.open(test_context->userdata_consumer_priv);\n-\t\tif (err)\n-\t\t\tgoto out_consumer_fail;\n-\t}\n-\n-\tif (test_context->userdata_producer_priv) {\n-\t\terr = test_func->userdata_ops.open(test_context->userdata_producer_priv);\n-\t\tif (err)\n-\t\t\tgoto out_producer_fail;\n-\t}\n-\n-out_no_ops:\n-\treturn 0;\n-\n-out_producer_fail:\n-\tif (test_func->userdata_ops.release && test_context->userdata_consumer_priv)\n-\t\ttest_func->userdata_ops.release(test_context->userdata_consumer_priv);\n-out_consumer_fail:\n-\tkutf_context_put(test_context);\n-\n-\treturn err;\n-}\n-\n-\n-/**\n- * kutf_debugfs_data_read() Debugfs read callback for the \"data\" entry.\n- * @file:\tOpened file to read from\n- * @buf:\tUser buffer to write the data into\n- * @len:\tAmount of data to read\n- * @ppos:\tOffset into file to read from\n- *\n- * This function allows user and kernel to exchange extra data necessary for\n- * the test fixture.\n- *\n- * The data is read from the first struct kutf_context running the fixture\n- *\n- * Return: Number of bytes read\n- */\n-static ssize_t kutf_debugfs_data_read(struct file *file, char __user *buf,\n-\t\tsize_t len, loff_t *ppos)\n-{\n-\tstruct kutf_context *test_context = file->private_data;\n-\tstruct kutf_test_fixture *test_fix = test_context->test_fix;\n-\tstruct kutf_test_function *test_func = test_fix->test_func;\n-\tssize_t (*producer)(void *private, char  __user *userbuf,\n-\t\t\tsize_t userbuf_len, loff_t *ppos);\n-\tssize_t count;\n-\n-\tproducer = test_func->userdata_ops.producer;\n-\t/* Can only read if there's a producer callback */\n-\tif (!producer)\n-\t\treturn -ENODEV;\n-\n-\tcount = producer(test_context->userdata_producer_priv, buf, len, ppos);\n-\n-\treturn count;\n-}\n-\n-/**\n- * kutf_debugfs_data_write() Debugfs write callback for the \"data\" entry.\n- * @file:\tOpened file to write to\n- * @buf:\tUser buffer to read the data from\n- * @len:\tAmount of data to write\n- * @ppos:\tOffset into file to write to\n- *\n- * This function allows user and kernel to exchange extra data necessary for\n- * the test fixture.\n- *\n- * The data is added to the first struct kutf_context running the fixture\n- *\n- * Return: Number of bytes written\n- */\n-static ssize_t kutf_debugfs_data_write(struct file *file,\n-\t\tconst char __user *buf, size_t len, loff_t *ppos)\n-{\n-\tstruct kutf_context *test_context = file->private_data;\n-\tstruct kutf_test_fixture *test_fix = test_context->test_fix;\n-\tstruct kutf_test_function *test_func = test_fix->test_func;\n-\tssize_t (*consumer)(void *private, const char  __user *userbuf,\n-\t\t\tsize_t userbuf_len, loff_t *ppos);\n-\tssize_t count;\n-\n-\tconsumer = test_func->userdata_ops.consumer;\n-\t/* Can only write if there's a consumer callback */\n-\tif (!consumer)\n-\t\treturn -ENODEV;\n-\n-\tcount = consumer(test_context->userdata_consumer_priv, buf, len, ppos);\n-\n-\treturn count;\n-}\n-\n-\n-/**\n- * kutf_debugfs_data_release() - Debugfs release callback for the \"data\" entry.\n- * @inode:\tFile entry representation\n- * @file:\tA specific opening of the file\n- *\n- * This function notifies the userdata callbacks that the userdata file has\n- * been closed, for tracking purposes.\n- *\n- * It is called on both the context's userdata_consumer_priv and\n- * userdata_producer_priv.\n- *\n- * It also drops the refcount on the kutf_context that was taken during\n- * kutf_debugfs_data_open()\n- */\n-static int kutf_debugfs_data_release(struct inode *inode, struct file *file)\n-{\n-\tstruct kutf_context *test_context = file->private_data;\n-\tstruct kutf_test_fixture *test_fix = test_context->test_fix;\n-\tstruct kutf_test_function *test_func = test_fix->test_func;\n-\n-\tif (!test_func->userdata_ops.release)\n-\t\treturn 0;\n-\n-\tif (test_context->userdata_consumer_priv)\n-\t\ttest_func->userdata_ops.release(test_context->userdata_consumer_priv);\n-\tif (test_context->userdata_producer_priv)\n-\t\ttest_func->userdata_ops.release(test_context->userdata_producer_priv);\n-\n-\tkutf_context_put(test_context);\n-\n-\treturn 0;\n-}\n-\n-\n-static const struct file_operations kutf_debugfs_data_ops = {\n-\t.owner = THIS_MODULE,\n-\t.open = kutf_debugfs_data_open,\n-\t.read = kutf_debugfs_data_read,\n-\t.write = kutf_debugfs_data_write,\n-\t.release = kutf_debugfs_data_release,\n-\t.llseek  = default_llseek,\n-};\n-\n-/**\n- * userdata_init() - Initialize userspace data exchange for a test, if\n- *                   specified by that test\n- * @test_context:\tTest context\n- *\n- * Note that this allows new refcounts to be made on test_context by userspace\n- * threads opening the 'data' file.\n- *\n- * Return: 0 on success, negative value corresponding to error code in failure\n- *         and kutf result will be set appropriately to indicate the error\n- */\n-static int userdata_init(struct kutf_context *test_context)\n-{\n-\tstruct kutf_test_fixture *test_fix = test_context->test_fix;\n-\tstruct kutf_test_function *test_func = test_fix->test_func;\n-\tint err = 0;\n-\tstruct dentry *userdata_dentry;\n-\n-\t/* Valid to have neither a producer or consumer, which is the case for\n-\t * tests not requiring usersdata */\n-\tif ((!test_func->userdata_ops.consumer) && (!test_func->userdata_ops.producer))\n-\t\treturn err;\n-\n-\tif (test_func->userdata_ops.consumer && !test_context->userdata_consumer_priv) {\n-\t\tkutf_test_fatal(test_context,\n-\t\t\t\t\"incorrect test setup - userdata consumer provided without private data\");\n-\t\treturn -EFAULT;\n-\t}\n-\n-\tif (test_func->userdata_ops.producer && !test_context->userdata_producer_priv) {\n-\t\tkutf_test_fatal(test_context,\n-\t\t\t\t\"incorrect test setup - userdata producer provided without private data\");\n-\t\treturn -EFAULT;\n-\t}\n-\n-\tuserdata_dentry = debugfs_create_file(\"data\", S_IROTH, test_fix->dir,\n-\t\t\ttest_context, &kutf_debugfs_data_ops);\n-\n-\tif (!userdata_dentry) {\n-\t\tpr_err(\"Failed to create debugfs file \\\"data\\\" when running fixture\\n\");\n-\t\t/* Not using Fatal (which stops other tests running),\n-\t\t * nor Abort (which indicates teardown should not be done) */\n-\t\tkutf_test_fail(test_context,\n-\t\t\t\t\"failed to create 'data' file for userside data exchange\");\n-\n-\t\t/* Error code is discarded by caller, but consistent with other\n-\t\t * debugfs_create_file failures */\n-\t\terr = -EEXIST;\n-\t} else {\n-\t\ttest_context->userdata_dentry = userdata_dentry;\n-\t}\n-\n-\n-\treturn err;\n-}\n-\n-/**\n- * userdata_term() - Terminate userspace data exchange for a test, if specified\n- *                   by that test\n- * @test_context:\tTest context\n- *\n- * Note This also prevents new refcounts being made on @test_context by userspace\n- * threads opening the 'data' file for this test. Any existing open file descriptors\n- * to the 'data' file will still be safe to use by userspace.\n- */\n-static void userdata_term(struct kutf_context *test_context)\n-{\n-\tstruct kutf_test_fixture *test_fix = test_context->test_fix;\n-\tstruct kutf_test_function *test_func = test_fix->test_func;\n-\tvoid (*notify_ended)(void *priv) = test_func->userdata_ops.notify_ended;\n-\n-\t/* debugfs_remove() is safe when parameter is error or NULL */\n-\tdebugfs_remove(test_context->userdata_dentry);\n-\n-\t/* debugfs_remove() doesn't kill any currently open file descriptors on\n-\t * this file, and such fds are still safe to use providing test_context\n-\t * is properly refcounted */\n-\n-\tif (notify_ended) {\n-\t\tif (test_context->userdata_consumer_priv)\n-\t\t\tnotify_ended(test_context->userdata_consumer_priv);\n-\t\tif (test_context->userdata_producer_priv)\n-\t\t\tnotify_ended(test_context->userdata_producer_priv);\n-\t}\n-\n-}\n-\n /**\n  * kutf_add_explicit_result() - Check if an explicit result needs to be added\n  * @context:\tKUTF test context\n@@ -563,75 +289,75 @@ static void kutf_add_explicit_result(struct kutf_context *context)\n \t}\n }\n \n+static void kutf_run_test(struct work_struct *data)\n+{\n+\tstruct kutf_context *test_context = container_of(data,\n+\t\t\tstruct kutf_context, work);\n+\tstruct kutf_suite *suite = test_context->suite;\n+\tstruct kutf_test_function *test_func;\n+\n+\ttest_func = test_context->test_fix->test_func;\n+\n+\t/*\n+\t * Call the create fixture function if required before the\n+\t * fixture is run\n+\t */\n+\tif (suite->create_fixture)\n+\t\ttest_context->fixture = suite->create_fixture(test_context);\n+\n+\t/* Only run the test if the fixture was created (if required) */\n+\tif ((suite->create_fixture && test_context->fixture) ||\n+\t\t\t(!suite->create_fixture)) {\n+\t\t/* Run this fixture */\n+\t\ttest_func->execute(test_context);\n+\n+\t\tif (suite->remove_fixture)\n+\t\t\tsuite->remove_fixture(test_context);\n+\n+\t\tkutf_add_explicit_result(test_context);\n+\t}\n+\n+\tkutf_add_result(test_context, KUTF_RESULT_TEST_FINISHED, NULL);\n+\n+\tkutf_context_put(test_context);\n+}\n+\n /**\n  * kutf_debugfs_run_open() Debugfs open callback for the \"run\" entry.\n  * @inode:\tinode of the opened file\n  * @file:\tOpened file to read from\n  *\n- * This function retrieves the test fixture data that is associated with the\n- * opened file and works back to get the test, suite and application so\n- * it can then run the test that is associated with the file entry.\n+ * This function creates a KUTF context and queues it onto a workqueue to be\n+ * run asynchronously. The resulting file descriptor can be used to communicate\n+ * userdata to the test and to read back the results of the test execution.\n  *\n  * Return: 0 on success\n  */\n static int kutf_debugfs_run_open(struct inode *inode, struct file *file)\n {\n \tstruct kutf_test_fixture *test_fix = inode->i_private;\n-\tstruct kutf_test_function *test_func = test_fix->test_func;\n-\tstruct kutf_suite *suite = test_func->suite;\n \tstruct kutf_context *test_context;\n \tint err = 0;\n \n-\t/* For the moment, only one user-client should be attempting to run\n-\t * this at a time. This simplifies how we lookup the kutf_context when\n-\t * using the 'data' file.\n-\t * Removing this restriction would require a rewrite of the mechanism\n-\t * of the 'data' file to pass data in, perhaps 'data' created here and\n-\t * based upon userspace thread's pid */\n-\tif (atomic_inc_return(&test_fix->nr_running) != 1) {\n-\t\terr = -EBUSY;\n-\t\tgoto finish;\n-\t}\n-\n \ttest_context = kutf_create_context(test_fix);\n \tif (!test_context) {\n-\t\terr = -ENODEV;\n+\t\terr = -ENOMEM;\n \t\tgoto finish;\n \t}\n \n \tfile->private_data = test_context;\n \n-\t/*\n-\t *  Call the create fixture function if required before the\n-\t * fixture is run\n-\t */\n-\tif (suite->create_fixture)\n-\t\ttest_context->fixture = suite->create_fixture(test_context);\n-\n-\t/* Only run the test if the fixture was created (if required) */\n-\tif ((suite->create_fixture && test_context->fixture) ||\n-\t\t\t(!suite->create_fixture)) {\n-\t\tint late_err;\n-\t\t/* Setup any userdata exchange */\n-\t\tlate_err = userdata_init(test_context);\n-\n-\t\tif (!late_err)\n-\t\t\t/* Run this fixture */\n-\t\t\ttest_func->execute(test_context);\n-\n-\t\tuserdata_term(test_context);\n-\n-\t\tif (suite->remove_fixture)\n-\t\t\tsuite->remove_fixture(test_context);\n+\t/* This reference is release by the kutf_run_test */\n+\tkutf_context_get(test_context);\n \n-\t\tkutf_add_explicit_result(test_context);\n-\t}\n+\tqueue_work(kutf_workq, &test_context->work);\n \n finish:\n-\tatomic_dec(&test_fix->nr_running);\n \treturn err;\n }\n \n+#define USERDATA_WARNING_MESSAGE \"WARNING: This test requires userdata\\n\"\n+\n /**\n  * kutf_debugfs_run_read() - Debugfs read callback for the \"run\" entry.\n  * @file:\tOpened file to read from\n@@ -639,8 +365,14 @@ static int kutf_debugfs_run_open(struct inode *inode, struct file *file)\n  * @len:\tAmount of data to read\n  * @ppos:\tOffset into file to read from\n  *\n- * This function emits the results which where logged during the opening of\n- * the file kutf_debugfs_run_open.\n+ * This function emits the results of the test, blocking until they are\n+ * available.\n+ *\n+ * If the test involves user data then this will also return user data records\n+ * to user space. If the test is waiting for user data then this function will\n+ * output a message (to make the likes of 'cat' display it), followed by\n+ * returning 0 to mark the end of file.\n+ *\n  * Results will be emitted one at a time, once all the results have been read\n  * 0 will be returned to indicate there is no more data.\n  *\n@@ -653,68 +385,153 @@ static ssize_t kutf_debugfs_run_read(struct file *file, char __user *buf,\n \tstruct kutf_result *res;\n \tunsigned long bytes_not_copied;\n \tssize_t bytes_copied = 0;\n+\tchar *kutf_str_ptr = NULL;\n+\tsize_t kutf_str_len = 0;\n+\tsize_t message_len = 0;\n+\tchar separator = ':';\n+\tchar terminator = '\\n';\n \n-\t/* Note: This code assumes a result is read completely */\n \tres = kutf_remove_result(test_context->result_set);\n-\tif (res) {\n-\t\tchar *kutf_str_ptr = NULL;\n-\t\tunsigned int kutf_str_len = 0;\n-\t\tunsigned int message_len = 0;\n-\t\tchar separator = ':';\n-\t\tchar terminator = '\\n';\n-\n-\t\tkutf_result_to_string(&kutf_str_ptr, res->status);\n-\t\tif (kutf_str_ptr)\n-\t\t\tkutf_str_len = strlen(kutf_str_ptr);\n-\n-\t\tif (res->message)\n-\t\t\tmessage_len = strlen(res->message);\n-\n-\t\tif ((kutf_str_len + 1 + message_len + 1) > len) {\n-\t\t\tpr_err(\"Not enough space in user buffer for a single result\");\n+\n+\tif (IS_ERR(res))\n+\t\treturn PTR_ERR(res);\n+\n+\t/*\n+\t * Handle 'fake' results - these results are converted to another\n+\t * form before being returned from the kernel\n+\t */\n+\tswitch (res->status) {\n+\tcase KUTF_RESULT_TEST_FINISHED:\n+\t\treturn 0;\n+\tcase KUTF_RESULT_USERDATA_WAIT:\n+\t\tif (test_context->userdata.flags &\n+\t\t\t\tKUTF_USERDATA_WARNING_OUTPUT) {\n+\t\t\t/*\n+\t\t\t * Warning message already output,\n+\t\t\t * signal end-of-file\n+\t\t\t */\n \t\t\treturn 0;\n \t\t}\n \n-\t\t/* First copy the result string */\n-\t\tif (kutf_str_ptr) {\n-\t\t\tbytes_not_copied = copy_to_user(&buf[0], kutf_str_ptr,\n-\t\t\t\t\t\t\tkutf_str_len);\n-\t\t\tbytes_copied += kutf_str_len - bytes_not_copied;\n-\t\t\tif (bytes_not_copied)\n-\t\t\t\tgoto exit;\n+\t\tmessage_len = sizeof(USERDATA_WARNING_MESSAGE)-1;\n+\t\tif (message_len > len)\n+\t\t\tmessage_len = len;\n+\n+\t\tbytes_not_copied = copy_to_user(buf,\n+\t\t\t\tUSERDATA_WARNING_MESSAGE,\n+\t\t\t\tmessage_len);\n+\t\tif (bytes_not_copied != 0)\n+\t\t\treturn -EFAULT;\n+\t\ttest_context->userdata.flags |= KUTF_USERDATA_WARNING_OUTPUT;\n+\t\treturn message_len;\n+\tcase KUTF_RESULT_USERDATA:\n+\t\tmessage_len = strlen(res->message);\n+\t\tif (message_len > len-1) {\n+\t\t\tmessage_len = len-1;\n+\t\t\tpr_warn(\"User data truncated, read not long enough\\n\");\n+\t\t}\n+\t\tbytes_not_copied = copy_to_user(buf, res->message,\n+\t\t\t\tmessage_len);\n+\t\tif (bytes_not_copied != 0) {\n+\t\t\tpr_warn(\"Failed to copy data to user space buffer\\n\");\n+\t\t\treturn -EFAULT;\n+\t\t}\n+\t\t/* Finally the terminator */\n+\t\tbytes_not_copied = copy_to_user(&buf[message_len],\n+\t\t\t\t&terminator, 1);\n+\t\tif (bytes_not_copied != 0) {\n+\t\t\tpr_warn(\"Failed to copy data to user space buffer\\n\");\n+\t\t\treturn -EFAULT;\n \t\t}\n+\t\treturn message_len+1;\n+\tdefault:\n+\t\t/* Fall through - this is a test result */\n+\t\tbreak;\n+\t}\n \n-\t\t/* Then the separator */\n-\t\tbytes_not_copied = copy_to_user(&buf[bytes_copied],\n-\t\t\t\t\t\t&separator, 1);\n-\t\tbytes_copied += 1 - bytes_not_copied;\n+\t/* Note: This code assumes a result is read completely */\n+\tkutf_result_to_string(&kutf_str_ptr, res->status);\n+\tif (kutf_str_ptr)\n+\t\tkutf_str_len = strlen(kutf_str_ptr);\n+\n+\tif (res->message)\n+\t\tmessage_len = strlen(res->message);\n+\n+\tif ((kutf_str_len + 1 + message_len + 1) > len) {\n+\t\tpr_err(\"Not enough space in user buffer for a single result\");\n+\t\treturn 0;\n+\t}\n+\n+\t/* First copy the result string */\n+\tif (kutf_str_ptr) {\n+\t\tbytes_not_copied = copy_to_user(&buf[0], kutf_str_ptr,\n+\t\t\t\t\t\tkutf_str_len);\n+\t\tbytes_copied += kutf_str_len - bytes_not_copied;\n \t\tif (bytes_not_copied)\n \t\t\tgoto exit;\n+\t}\n \n-\t\t/* Finally Next copy the result string */\n-\t\tif (res->message) {\n-\t\t\tbytes_not_copied = copy_to_user(&buf[bytes_copied],\n-\t\t\t\t\t\t\tres->message, message_len);\n-\t\t\tbytes_copied += message_len - bytes_not_copied;\n-\t\t\tif (bytes_not_copied)\n-\t\t\t\tgoto exit;\n-\t\t}\n+\t/* Then the separator */\n+\tbytes_not_copied = copy_to_user(&buf[bytes_copied],\n+\t\t\t\t\t&separator, 1);\n+\tbytes_copied += 1 - bytes_not_copied;\n+\tif (bytes_not_copied)\n+\t\tgoto exit;\n \n-\t\t/* Finally the terminator */\n+\t/* Finally Next copy the result string */\n+\tif (res->message) {\n \t\tbytes_not_copied = copy_to_user(&buf[bytes_copied],\n-\t\t\t\t\t\t&terminator, 1);\n-\t\tbytes_copied += 1 - bytes_not_copied;\n+\t\t\t\t\t\tres->message, message_len);\n+\t\tbytes_copied += message_len - bytes_not_copied;\n+\t\tif (bytes_not_copied)\n+\t\t\tgoto exit;\n \t}\n+\n+\t/* Finally the terminator */\n+\tbytes_not_copied = copy_to_user(&buf[bytes_copied],\n+\t\t\t\t\t&terminator, 1);\n+\tbytes_copied += 1 - bytes_not_copied;\n+\n exit:\n \treturn bytes_copied;\n }\n \n+/**\n+ * kutf_debugfs_run_write() Debugfs write callback for the \"run\" entry.\n+ * @file:\tOpened file to write to\n+ * @buf:\tUser buffer to read the data from\n+ * @len:\tAmount of data to write\n+ * @ppos:\tOffset into file to write to\n+ *\n+ * This function allows user and kernel to exchange extra data necessary for\n+ * the test fixture.\n+ *\n+ * The data is added to the first struct kutf_context running the fixture\n+ *\n+ * Return: Number of bytes written\n+ */\n+static ssize_t kutf_debugfs_run_write(struct file *file,\n+\t\tconst char __user *buf, size_t len, loff_t *ppos)\n+{\n+\tint ret = 0;\n+\tstruct kutf_context *test_context = file->private_data;\n+\n+\tif (len > KUTF_MAX_LINE_LENGTH)\n+\t\treturn -EINVAL;\n+\n+\tret = kutf_helper_input_enqueue(test_context, buf, len);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\treturn len;\n+}\n+\n /**\n  * kutf_debugfs_run_release() - Debugfs release callback for the \"run\" entry.\n  * @inode:\tFile entry representation\n  * @file:\tA specific opening of the file\n  *\n- * Release any resources that where created during the opening of the file\n+ * Release any resources that were created during the opening of the file\n  *\n  * Note that resources may not be released immediately, that might only happen\n  * later when other users of the kutf_context release their refcount.\n@@ -725,6 +542,8 @@ static int kutf_debugfs_run_release(struct inode *inode, struct file *file)\n {\n \tstruct kutf_context *test_context = file->private_data;\n \n+\tkutf_helper_input_enqueue_end_of_data(test_context);\n+\n \tkutf_context_put(test_context);\n \treturn 0;\n }\n@@ -733,6 +552,7 @@ static const struct file_operations kutf_debugfs_run_ops = {\n \t.owner = THIS_MODULE,\n \t.open = kutf_debugfs_run_open,\n \t.read = kutf_debugfs_run_read,\n+\t.write = kutf_debugfs_run_write,\n \t.release = kutf_debugfs_run_release,\n \t.llseek  = default_llseek,\n };\n@@ -763,7 +583,6 @@ static int create_fixture_variant(struct kutf_test_function *test_func,\n \n \ttest_fix->test_func = test_func;\n \ttest_fix->fixture_index = fixture_index;\n-\tatomic_set(&test_fix->nr_running, 0);\n \n \tsnprintf(name, sizeof(name), \"%d\", fixture_index);\n \ttest_fix->dir = debugfs_create_dir(name, test_func->dir);\n@@ -783,8 +602,14 @@ static int create_fixture_variant(struct kutf_test_function *test_func,\n \t\tgoto fail_file;\n \t}\n \n-\ttmp = debugfs_create_file(\"run\", S_IROTH, test_fix->dir, test_fix,\n-\t\t\t\t  &kutf_debugfs_run_ops);\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)\n+\ttmp = debugfs_create_file_unsafe(\n+#else\n+\ttmp = debugfs_create_file(\n+#endif\n+\t\t\t\"run\", 0600, test_fix->dir,\n+\t\t\ttest_fix,\n+\t\t\t&kutf_debugfs_run_ops);\n \tif (!tmp) {\n \t\tpr_err(\"Failed to create debugfs file \\\"run\\\" when adding fixture\\n\");\n \t\t/* Might not be the right error, we don't get it passed back to us */\n@@ -813,14 +638,13 @@ static void kutf_remove_test_variant(struct kutf_test_fixture *test_fix)\n \tkfree(test_fix);\n }\n \n-void kutf_add_test_with_filters_data_and_userdata(\n+void kutf_add_test_with_filters_and_data(\n \t\tstruct kutf_suite *suite,\n \t\tunsigned int id,\n \t\tconst char *name,\n \t\tvoid (*execute)(struct kutf_context *context),\n \t\tunsigned int filters,\n-\t\tunion kutf_callback_data test_data,\n-\t\tstruct kutf_userdata_ops *userdata_ops)\n+\t\tunion kutf_callback_data test_data)\n {\n \tstruct kutf_test_function *test_func;\n \tstruct dentry *tmp;\n@@ -873,7 +697,6 @@ void kutf_add_test_with_filters_data_and_userdata(\n \ttest_func->suite = suite;\n \ttest_func->execute = execute;\n \ttest_func->test_data = test_data;\n-\tmemcpy(&test_func->userdata_ops, userdata_ops, sizeof(*userdata_ops));\n \n \tlist_add(&test_func->node, &suite->test_list);\n \treturn;\n@@ -885,27 +708,6 @@ void kutf_add_test_with_filters_data_and_userdata(\n fail_alloc:\n \treturn;\n }\n-EXPORT_SYMBOL(kutf_add_test_with_filters_data_and_userdata);\n-\n-void kutf_add_test_with_filters_and_data(\n-\t\tstruct kutf_suite *suite,\n-\t\tunsigned int id,\n-\t\tconst char *name,\n-\t\tvoid (*execute)(struct kutf_context *context),\n-\t\tunsigned int filters,\n-\t\tunion kutf_callback_data test_data)\n-{\n-\tstruct kutf_userdata_ops userdata_ops = {\n-\t\t.open = NULL,\n-\t\t.release = NULL,\n-\t\t.consumer = NULL,\n-\t\t.producer = NULL,\n-\t};\n-\n-\tkutf_add_test_with_filters_data_and_userdata(suite, id, name, execute,\n-\t\t\tfilters, test_data, &userdata_ops);\n-}\n-\n EXPORT_SYMBOL(kutf_add_test_with_filters_and_data);\n \n void kutf_add_test_with_filters(\n@@ -1150,7 +952,7 @@ static struct kutf_context *kutf_create_context(\n \n \tnew_context->result_set = kutf_create_result_set();\n \tif (!new_context->result_set) {\n-\t\tpr_err(\"Failed to create resultset\");\n+\t\tpr_err(\"Failed to create result set\");\n \t\tgoto fail_result_set;\n \t}\n \n@@ -1165,9 +967,12 @@ static struct kutf_context *kutf_create_context(\n \tnew_context->fixture_index = test_fix->fixture_index;\n \tnew_context->fixture_name = NULL;\n \tnew_context->test_data = test_fix->test_func->test_data;\n-\tnew_context->userdata_consumer_priv = NULL;\n-\tnew_context->userdata_producer_priv = NULL;\n-\tnew_context->userdata_dentry = NULL;\n+\n+\tnew_context->userdata.flags = 0;\n+\tINIT_LIST_HEAD(&new_context->userdata.input_head);\n+\tinit_waitqueue_head(&new_context->userdata.input_waitq);\n+\n+\tINIT_WORK(&new_context->work, kutf_run_test);\n \n \tkref_init(&new_context->kref);\n \n@@ -1227,8 +1032,7 @@ static void kutf_test_log_result(\n \t\tcontext->status = new_status;\n \n \tif (context->expected_status != new_status)\n-\t\tkutf_add_result(&context->fixture_pool, context->result_set,\n-\t\t\t\tnew_status, message);\n+\t\tkutf_add_result(context, new_status, message);\n }\n \n void kutf_test_log_result_external(\n@@ -1344,18 +1148,18 @@ EXPORT_SYMBOL(kutf_test_abort);\n  */\n static int __init init_kutf_core(void)\n {\n-\tint ret;\n+\tkutf_workq = alloc_workqueue(\"kutf workq\", WQ_UNBOUND, 1);\n+\tif (!kutf_workq)\n+\t\treturn -ENOMEM;\n \n \tbase_dir = debugfs_create_dir(\"kutf_tests\", NULL);\n \tif (!base_dir) {\n-\t\tret = -ENODEV;\n-\t\tgoto exit_dir;\n+\t\tdestroy_workqueue(kutf_workq);\n+\t\tkutf_workq = NULL;\n+\t\treturn -ENOMEM;\n \t}\n \n \treturn 0;\n-\n-exit_dir:\n-\treturn ret;\n }\n \n /**\n@@ -1366,6 +1170,9 @@ static int __init init_kutf_core(void)\n static void __exit exit_kutf_core(void)\n {\n \tdebugfs_remove_recursive(base_dir);\n+\n+\tif (kutf_workq)\n+\t\tdestroy_workqueue(kutf_workq);\n }\n \n #else\t/* defined(CONFIG_DEBUG_FS) */\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_utils.c b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_utils.c\nindex a429a2dbf7880e..7f5ac517fdb484 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_utils.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/kutf_utils.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n /* Kernel UTF utility functions */\n \n #include <linux/mutex.h>\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/sconscript b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/sconscript\nindex d7f112448e42cc..98f64468dac975 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/kutf/sconscript\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/kutf/sconscript\n@@ -6,12 +6,18 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n Import('kutf_env')\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/Kbuild b/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/Kbuild\nindex 0cd9cebe9d8bd7..ca8c51273b4c81 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/Kbuild\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/Kbuild\n@@ -6,12 +6,18 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n ccflags-y += -I$(src)/../include -I$(src)/../../../ -I$(src)/../../ -I$(src)/../../backend/gpu -I$(srctree)/drivers/staging/android\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/Kconfig b/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/Kconfig\nindex 4caa8ec8a0e22b..78283307713d5f 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/Kconfig\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/Kconfig\n@@ -6,12 +6,18 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n config MALI_IRQ_LATENCY\n  tristate \"Mali GPU IRQ latency measurement\"\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/Makefile b/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/Makefile\nindex ced37b08e53262..40df1179b86b0e 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/Makefile\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/Makefile\n@@ -1,17 +1,23 @@\n #\n-# (C) COPYRIGHT 2015, 2017 ARM Limited. All rights reserved.\n+# (C) COPYRIGHT 2015, 2017-2018 ARM Limited. All rights reserved.\n #\n # This program is free software and is provided to you under the terms of the\n # GNU General Public License version 2 as published by the Free Software\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n # linux build system bootstrap for out-of-tree module\n \n@@ -23,12 +29,7 @@ $(error Must specify KDIR to point to the kernel to target))\n endif\n \n TEST_CCFLAGS := \\\n-\t-DMALI_DEBUG=$(MALI_BIFROST_DEBUG) \\\n-\t-DMALI_BACKEND_KERNEL=$(MALI_BACKEND_KERNEL) \\\n-\t-DMALI_NO_MALI=$(MALI_BIFROST_NO_MALI) \\\n \t-DMALI_UNIT_TEST=$(MALI_UNIT_TEST) \\\n-\t-DMALI_USE_UMP=$(MALI_USE_UMP) \\\n-\t-DMALI_ERROR_INJECT_ON=$(MALI_ERROR_INJECT_ON) \\\n \t-DMALI_CUSTOMER_RELEASE=$(MALI_CUSTOMER_RELEASE) \\\n \t$(SCONS_CFLAGS) \\\n \t-I$(CURDIR)/../include \\\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/build.bp b/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/build.bp\nnew file mode 100644\nindex 00000000000000..e1f77b0c5d7b8c\n--- /dev/null\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/build.bp\n@@ -0,0 +1,27 @@\n+/*\n+ * Copyright:\n+ * ----------------------------------------------------------------------------\n+ * This confidential and proprietary software may be used only as authorized\n+ * by a licensing agreement from ARM Limited.\n+ *      (C) COPYRIGHT 2018 ARM Limited, ALL RIGHTS RESERVED\n+ * The entire notice above must be reproduced on all authorized copies and\n+ * copies may only be made to the extent permitted by a licensing agreement\n+ * from ARM Limited.\n+ * ----------------------------------------------------------------------------\n+ */\n+\n+bob_kernel_module {\n+    name: \"mali_kutf_irq_test\",\n+    defaults: [\"kernel_test_module_defaults\"],\n+    srcs: [\n+        \"Kbuild\",\n+        \"mali_kutf_irq_test_main.c\",\n+    ],\n+    extra_symbols: [\"mali_kbase\"],\n+    install_group: \"IG_tests\",\n+    enabled: false,\n+    unit_test_kernel_modules: {\n+        enabled: true,\n+        kbuild_options: [\"CONFIG_MALI_IRQ_LATENCY=m\"],\n+    },\n+}\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/mali_kutf_irq_test_main.c b/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/mali_kutf_irq_test_main.c\nindex c9cc4447cf37f5..5013a9d7cf895c 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/mali_kutf_irq_test_main.c\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/mali_kutf_irq_test_main.c\n@@ -7,14 +7,19 @@\n  * Foundation, and any use by you of this program is subject to the terms\n  * of such GNU licence.\n  *\n- * A copy of the licence is included with the program, and can also be obtained\n- * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n- * Boston, MA  02110-1301, USA.\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n  *\n  */\n \n-\n-\n #include <linux/module.h>\n #include <linux/delay.h>\n #include <linux/interrupt.h>\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/sconscript b/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/sconscript\nindex b06d9ea329245b..0ec5ce7e3632d4 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/sconscript\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/mali_kutf_irq_test/sconscript\n@@ -1,17 +1,23 @@\n #\n-# (C) COPYRIGHT 2015, 2017 ARM Limited. All rights reserved.\n+# (C) COPYRIGHT 2015-2018 ARM Limited. All rights reserved.\n #\n # This program is free software and is provided to you under the terms of the\n # GNU General Public License version 2 as published by the Free Software\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n import os\n Import('env')\n@@ -23,7 +29,7 @@ if env.GetOption('clean') :\n \tcmd = env.Command('$STATIC_LIB_PATH/mali_kutf_irq_test.ko', src, [])\n \tenv.KernelObjTarget('mali_kutf_irq_test', cmd)\n else:\n-\tmakeAction=Action(\"cd ${SOURCE.dir} && make MALI_BIFROST_DEBUG=${debug} MALI_BACKEND_KERNEL=1 MALI_ERROR_INJECT_ON=${error_inject} MALI_BIFROST_NO_MALI=${no_mali} MALI_UNIT_TEST=${unit} MALI_USE_UMP=${ump} MALI_CUSTOMER_RELEASE=${release} %s && ( ( [ -f mali_kutf_irq_test.ko ] && cp mali_kutf_irq_test.ko $STATIC_LIB_PATH/ ) || touch $STATIC_LIB_PATH/mali_kutf_irq_test.ko)\" % env.kernel_get_config_defines(), '$MAKECOMSTR')\n+\tmakeAction=Action(\"cd ${SOURCE.dir} && make MALI_UNIT_TEST=${unit} MALI_CUSTOMER_RELEASE=${release} %s && ( ( [ -f mali_kutf_irq_test.ko ] && cp mali_kutf_irq_test.ko $STATIC_LIB_PATH/ ) || touch $STATIC_LIB_PATH/mali_kutf_irq_test.ko)\" % env.kernel_get_config_defines(), '$MAKECOMSTR')\n \tcmd = env.Command('$STATIC_LIB_PATH/mali_kutf_irq_test.ko', src, [makeAction])\n \tenv.Depends('$STATIC_LIB_PATH/mali_kutf_irq_test.ko', '$STATIC_LIB_PATH/kutf.ko')\n \tenv.Depends('$STATIC_LIB_PATH/mali_kutf_irq_test.ko', '$STATIC_LIB_PATH/mali_kbase.ko')\ndiff --git a/drivers/gpu/arm/bifrost_for_linux/tests/sconscript b/drivers/gpu/arm/bifrost_for_linux/tests/sconscript\nindex 04584117ccef9b..0bd24a5e3f3523 100644\n--- a/drivers/gpu/arm/bifrost_for_linux/tests/sconscript\n+++ b/drivers/gpu/arm/bifrost_for_linux/tests/sconscript\n@@ -6,12 +6,18 @@\n # Foundation, and any use by you of this program is subject to the terms\n # of such GNU licence.\n #\n-# A copy of the licence is included with the program, and can also be obtained\n-# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n-# Boston, MA  02110-1301, USA.\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, you can access it online at\n+# http://www.gnu.org/licenses/gpl-2.0.html.\n+#\n+# SPDX-License-Identifier: GPL-2.0\n #\n #\n-\n \n Import ('env')\n \ndiff --git a/drivers/gpu/arm/bifrost_for_linux/thirdparty/mali_kbase_mmap.c b/drivers/gpu/arm/bifrost_for_linux/thirdparty/mali_kbase_mmap.c\nnew file mode 100644\nindex 00000000000000..6857eb761ee2a3\n--- /dev/null\n+++ b/drivers/gpu/arm/bifrost_for_linux/thirdparty/mali_kbase_mmap.c\n@@ -0,0 +1,322 @@\n+/*\n+ *\n+ * (C) COPYRIGHT ARM Limited. All rights reserved.\n+ *\n+ * This program is free software and is provided to you under the terms of the\n+ * GNU General Public License version 2 as published by the Free Software\n+ * Foundation, and any use by you of this program is subject to the terms\n+ * of such GNU licence.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, you can access it online at\n+ * http://www.gnu.org/licenses/gpl-2.0.html.\n+ *\n+ * SPDX-License-Identifier: GPL-2.0\n+ *\n+ *//*\n+ * This program is free software and is provided to you under the terms of the\n+ * GNU General Public License version 2 as published by the Free Software\n+ * Foundation, and any use by you of this program is subject to the terms\n+ * of such GNU licence.\n+ *\n+ * A copy of the licence is included with the program, and can also be obtained\n+ * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n+ * Boston, MA  02110-1301, USA.\n+ */\n+\n+#include \"linux/mman.h\"\n+#include \"../mali_kbase.h\"\n+\n+/* mali_kbase_mmap.c\n+ *\n+ * This file contains Linux specific implementation of\n+ * kbase_get_unmapped_area() interface.\n+ */\n+\n+\n+/**\n+ * align_and_check() - Align the specified pointer to the provided alignment and\n+ *                     check that it is still in range.\n+ * @gap_end:        Highest possible start address for allocation (end of gap in\n+ *                  address space)\n+ * @gap_start:      Start address of current memory area / gap in address space\n+ * @info:           vm_unmapped_area_info structure passed to caller, containing\n+ *                  alignment, length and limits for the allocation\n+ * @is_shader_code: True if the allocation is for shader code (which has\n+ *                  additional alignment requirements)\n+ *\n+ * Return: true if gap_end is now aligned correctly and is still in range,\n+ *         false otherwise\n+ */\n+static bool align_and_check(unsigned long *gap_end, unsigned long gap_start,\n+\t\tstruct vm_unmapped_area_info *info, bool is_shader_code)\n+{\n+\t/* Compute highest gap address at the desired alignment */\n+\t(*gap_end) -= info->length;\n+\t(*gap_end) -= (*gap_end - info->align_offset) & info->align_mask;\n+\n+\tif (is_shader_code) {\n+\t\t/* Check for 4GB boundary */\n+\t\tif (0 == (*gap_end & BASE_MEM_MASK_4GB))\n+\t\t\t(*gap_end) -= (info->align_offset ? info->align_offset :\n+\t\t\t\t\tinfo->length);\n+\t\tif (0 == ((*gap_end + info->length) & BASE_MEM_MASK_4GB))\n+\t\t\t(*gap_end) -= (info->align_offset ? info->align_offset :\n+\t\t\t\t\tinfo->length);\n+\n+\t\tif (!(*gap_end & BASE_MEM_MASK_4GB) || !((*gap_end +\n+\t\t\t\tinfo->length) & BASE_MEM_MASK_4GB))\n+\t\t\treturn false;\n+\t}\n+\n+\n+\tif ((*gap_end < info->low_limit) || (*gap_end < gap_start))\n+\t\treturn false;\n+\n+\n+\treturn true;\n+}\n+\n+/**\n+ * kbase_unmapped_area_topdown() - allocates new areas top-down from\n+ *                                 below the stack limit.\n+ * @info:              Information about the memory area to allocate.\n+ * @is_shader_code:    Boolean which denotes whether the allocated area is\n+ *                      intended for the use by shader core in which case a\n+ *                      special alignment requirements apply.\n+ *\n+ * The unmapped_area_topdown() function in the Linux kernel is not exported\n+ * using EXPORT_SYMBOL_GPL macro. To allow us to call this function from a\n+ * module and also make use of the fact that some of the requirements for\n+ * the unmapped area are known in advance, we implemented an extended version\n+ * of this function and prefixed it with 'kbase_'.\n+ *\n+ * The difference in the call parameter list comes from the fact that\n+ * kbase_unmapped_area_topdown() is called with additional parameter which\n+ * is provided to denote whether the allocation is for a shader core memory\n+ * or not. This is significant since the executable shader core memory has\n+ * additional alignment requirements.\n+ *\n+ * The modification of the original Linux function lies in how the computation\n+ * of the highest gap address at the desired alignment is performed once the\n+ * gap with desirable properties is found. For this purpose a special function\n+ * is introduced (@ref align_and_check()) which beside computing the gap end\n+ * at the desired alignment also performs additional alignment check for the\n+ * case when the memory is executable shader core memory. For such case, it is\n+ * ensured that the gap does not end on a 4GB boundary.\n+ *\n+ * Return: address of the found gap end (high limit) if area is found;\n+ *         -ENOMEM if search is unsuccessful\n+*/\n+\n+static unsigned long kbase_unmapped_area_topdown(struct vm_unmapped_area_info\n+\t\t*info, bool is_shader_code)\n+{\n+\tstruct mm_struct *mm = current->mm;\n+\tstruct vm_area_struct *vma;\n+\tunsigned long length, low_limit, high_limit, gap_start, gap_end;\n+\n+\t/* Adjust search length to account for worst case alignment overhead */\n+\tlength = info->length + info->align_mask;\n+\tif (length < info->length)\n+\t\treturn -ENOMEM;\n+\n+\t/*\n+\t * Adjust search limits by the desired length.\n+\t * See implementation comment at top of unmapped_area().\n+\t */\n+\tgap_end = info->high_limit;\n+\tif (gap_end < length)\n+\t\treturn -ENOMEM;\n+\thigh_limit = gap_end - length;\n+\n+\tif (info->low_limit > high_limit)\n+\t\treturn -ENOMEM;\n+\tlow_limit = info->low_limit + length;\n+\n+\t/* Check highest gap, which does not precede any rbtree node */\n+\tgap_start = mm->highest_vm_end;\n+\tif (gap_start <= high_limit) {\n+\t\tif (align_and_check(&gap_end, gap_start, info, is_shader_code))\n+\t\t\treturn gap_end;\n+\t}\n+\n+\t/* Check if rbtree root looks promising */\n+\tif (RB_EMPTY_ROOT(&mm->mm_rb))\n+\t\treturn -ENOMEM;\n+\tvma = rb_entry(mm->mm_rb.rb_node, struct vm_area_struct, vm_rb);\n+\tif (vma->rb_subtree_gap < length)\n+\t\treturn -ENOMEM;\n+\n+\twhile (true) {\n+\t\t/* Visit right subtree if it looks promising */\n+\t\tgap_start = vma->vm_prev ? vma->vm_prev->vm_end : 0;\n+\t\tif (gap_start <= high_limit && vma->vm_rb.rb_right) {\n+\t\t\tstruct vm_area_struct *right =\n+\t\t\t\trb_entry(vma->vm_rb.rb_right,\n+\t\t\t\t\t struct vm_area_struct, vm_rb);\n+\t\t\tif (right->rb_subtree_gap >= length) {\n+\t\t\t\tvma = right;\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\t\t}\n+\n+check_current:\n+\t\t/* Check if current node has a suitable gap */\n+\t\tgap_end = vma->vm_start;\n+\t\tif (gap_end < low_limit)\n+\t\t\treturn -ENOMEM;\n+\t\tif (gap_start <= high_limit && gap_end - gap_start >= length) {\n+\t\t\t/* We found a suitable gap. Clip it with the original\n+\t\t\t * high_limit. */\n+\t\t\tif (gap_end > info->high_limit)\n+\t\t\t\tgap_end = info->high_limit;\n+\n+\t\t\tif (align_and_check(&gap_end, gap_start, info,\n+\t\t\t\t\tis_shader_code))\n+\t\t\t\treturn gap_end;\n+\t\t}\n+\n+\t\t/* Visit left subtree if it looks promising */\n+\t\tif (vma->vm_rb.rb_left) {\n+\t\t\tstruct vm_area_struct *left =\n+\t\t\t\trb_entry(vma->vm_rb.rb_left,\n+\t\t\t\t\t struct vm_area_struct, vm_rb);\n+\t\t\tif (left->rb_subtree_gap >= length) {\n+\t\t\t\tvma = left;\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\t\t}\n+\n+\t\t/* Go back up the rbtree to find next candidate node */\n+\t\twhile (true) {\n+\t\t\tstruct rb_node *prev = &vma->vm_rb;\n+\n+\t\t\tif (!rb_parent(prev))\n+\t\t\t\treturn -ENOMEM;\n+\t\t\tvma = rb_entry(rb_parent(prev),\n+\t\t\t\t       struct vm_area_struct, vm_rb);\n+\t\t\tif (prev == vma->vm_rb.rb_right) {\n+\t\t\t\tgap_start = vma->vm_prev ?\n+\t\t\t\t\tvma->vm_prev->vm_end : 0;\n+\t\t\t\tgoto check_current;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\treturn -ENOMEM;\n+}\n+\n+\n+/* This function is based on Linux kernel's arch_get_unmapped_area, but\n+ * simplified slightly. Modifications come from the fact that some values\n+ * about the memory area are known in advance.\n+ */\n+unsigned long kbase_get_unmapped_area(struct file *filp,\n+\t\tconst unsigned long addr, const unsigned long len,\n+\t\tconst unsigned long pgoff, const unsigned long flags)\n+{\n+\tstruct kbase_context *kctx = filp->private_data;\n+\tstruct mm_struct *mm = current->mm;\n+\tstruct vm_unmapped_area_info info;\n+\tunsigned long align_offset = 0;\n+\tunsigned long align_mask = 0;\n+\tunsigned long high_limit = mm->mmap_base;\n+\tunsigned long low_limit = PAGE_SIZE;\n+\tint cpu_va_bits = BITS_PER_LONG;\n+\tint gpu_pc_bits =\n+\t      kctx->kbdev->gpu_props.props.core_props.log2_program_counter_size;\n+\tbool is_shader_code = false;\n+\tunsigned long ret;\n+\n+\t/* err on fixed address */\n+\tif ((flags & MAP_FIXED) || addr)\n+\t\treturn -EINVAL;\n+\n+#ifdef CONFIG_64BIT\n+\t/* too big? */\n+\tif (len > TASK_SIZE - SZ_2M)\n+\t\treturn -ENOMEM;\n+\n+\tif (!kbase_ctx_flag(kctx, KCTX_COMPAT)) {\n+\n+\t\thigh_limit = min_t(unsigned long, mm->mmap_base,\n+\t\t\t\t(kctx->same_va_end << PAGE_SHIFT));\n+\n+\t\t/* If there's enough (> 33 bits) of GPU VA space, align\n+\t\t * to 2MB boundaries.\n+\t\t */\n+\t\tif (kctx->kbdev->gpu_props.mmu.va_bits > 33) {\n+\t\t\tif (len >= SZ_2M) {\n+\t\t\t\talign_offset = SZ_2M;\n+\t\t\t\talign_mask = SZ_2M - 1;\n+\t\t\t}\n+\t\t}\n+\n+\t\tlow_limit = SZ_2M;\n+\t} else {\n+\t\tcpu_va_bits = 32;\n+\t}\n+#endif /* CONFIG_64BIT */\n+\tif ((PFN_DOWN(BASE_MEM_COOKIE_BASE) <= pgoff) &&\n+\t\t(PFN_DOWN(BASE_MEM_FIRST_FREE_ADDRESS) > pgoff)) {\n+\t\t\tint cookie = pgoff - PFN_DOWN(BASE_MEM_COOKIE_BASE);\n+\t\t\tstruct kbase_va_region *reg =\n+\t\t\t\t\tkctx->pending_regions[cookie];\n+\n+\t\t\tif (!reg)\n+\t\t\t\treturn -EINVAL;\n+\n+\t\t\tif (!(reg->flags & KBASE_REG_GPU_NX)) {\n+\t\t\t\tif (cpu_va_bits > gpu_pc_bits) {\n+\t\t\t\t\talign_offset = 1ULL << gpu_pc_bits;\n+\t\t\t\t\talign_mask = align_offset - 1;\n+\t\t\t\t\tis_shader_code = true;\n+\t\t\t\t}\n+\t\t\t} else if (reg->flags & KBASE_REG_TILER_ALIGN_TOP) {\n+\t\t\t\tunsigned long extent_bytes =\n+\t\t\t\t     (unsigned long)(reg->extent << PAGE_SHIFT);\n+\t\t\t\t/* kbase_check_alloc_sizes() already satisfies\n+\t\t\t\t * these checks, but they're here to avoid\n+\t\t\t\t * maintenance hazards due to the assumptions\n+\t\t\t\t * involved */\n+\t\t\t\tWARN_ON(reg->extent > (ULONG_MAX >> PAGE_SHIFT));\n+\t\t\t\tWARN_ON(reg->initial_commit > (ULONG_MAX >> PAGE_SHIFT));\n+\t\t\t\tWARN_ON(!is_power_of_2(extent_bytes));\n+\t\t\t\talign_mask = extent_bytes - 1;\n+\t\t\t\talign_offset =\n+\t\t\t\t      extent_bytes - (reg->initial_commit << PAGE_SHIFT);\n+\t\t\t}\n+#ifndef CONFIG_64BIT\n+\t} else {\n+\t\treturn current->mm->get_unmapped_area(filp, addr, len, pgoff,\n+\t\t\t\t\t\t      flags);\n+#endif\n+\t}\n+\n+\tinfo.flags = 0;\n+\tinfo.length = len;\n+\tinfo.low_limit = low_limit;\n+\tinfo.high_limit = high_limit;\n+\tinfo.align_offset = align_offset;\n+\tinfo.align_mask = align_mask;\n+\n+\tret = kbase_unmapped_area_topdown(&info, is_shader_code);\n+\n+\tif (IS_ERR_VALUE(ret) && high_limit == mm->mmap_base &&\n+\t\t\thigh_limit < (kctx->same_va_end << PAGE_SHIFT)) {\n+\t\t/* Retry above mmap_base */\n+\t\tinfo.low_limit = mm->mmap_base;\n+\t\tinfo.high_limit = min_t(u64, TASK_SIZE,\n+\t\t\t\t\t(kctx->same_va_end << PAGE_SHIFT));\n+\n+\t\tret = kbase_unmapped_area_topdown(&info, is_shader_code);\n+\t}\n+\n+\treturn ret;\n+}\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/RK356x/0001-perf-fix.patch",
    "content": "Reported-by: Jiri Olsa <jolsa@kernel.org>\nCc: Adrian Hunter <adrian.hunter@intel.com>\nCc: Namhyung Kim <namhyung@kernel.org>\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>\nCc: Ben Hutchings <ben@decadent.org.uk>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\n\n---\n tools/perf/tests/bp_account.c |    2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\n--- a/tools/perf/tests/bp_account.c\n+++ b/tools/perf/tests/bp_account.c\n@@ -23,7 +23,7 @@\n #include \"../perf-sys.h\"\n #include \"cloexec.h\"\n \n-volatile long the_var;\n+static volatile long the_var;\n \n static noinline int test_function(void)\n {\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/RK356x/0002-perf-bench-Share-some-global-variables-to-fix-build-.patch",
    "content": "From 62b75df5f013d9f7b5b47ff5369dd4b3143ab965 Mon Sep 17 00:00:00 2001\nFrom: Gleb Mazovetskiy <glex.spb@gmail.com>\nDate: Mon, 25 Jan 2021 00:52:10 +0000\nSubject: [PATCH 02/12] perf bench: Share some global variables to fix build\n with gcc 10\n\nBased on https://git.yoctoproject.org/cgit/cgit.cgi/meta-arm/tree/meta-arm-bsp/recipes-kernel/linux/linux-yocto-5.3/0003-perf-bench-Share-some-global-variables-to-fix-build-.patch\n\nSigned-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>\n---\n tools/perf/bench/bench.h         |  4 ++++\n tools/perf/bench/futex-hash.c    | 12 ++++++------\n tools/perf/bench/futex-lock-pi.c | 11 +++++------\n 3 files changed, 15 insertions(+), 12 deletions(-)\n\ndiff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h\nindex a50df86f2b9b..e758896f4995 100644\n--- a/tools/perf/bench/bench.h\n+++ b/tools/perf/bench/bench.h\n@@ -1,6 +1,10 @@\n #ifndef BENCH_H\n #define BENCH_H\n \n+#include <sys/time.h>\n+\n+extern struct timeval bench__start, bench__end, bench__runtime;\n+\n /*\n  * The madvise transparent hugepage constants were added in glibc\n  * 2.13. For compatibility with older versions of glibc, define these\ndiff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-hash.c\nindex fc9bebd2cca0..80313b40d324 100644\n--- a/tools/perf/bench/futex-hash.c\n+++ b/tools/perf/bench/futex-hash.c\n@@ -28,7 +28,7 @@ static unsigned int nfutexes = 1024;\n static bool fshared = false, done = false, silent = false;\n static int futex_flag = 0;\n \n-struct timeval start, end, runtime;\n+struct timeval bench__start, bench__end, bench__runtime;\n static pthread_mutex_t thread_lock;\n static unsigned int threads_starting;\n static struct stats throughput_stats;\n@@ -92,8 +92,8 @@ static void toggle_done(int sig __maybe_unused,\n {\n \t/* inform all threads that we're done for the day */\n \tdone = true;\n-\tgettimeofday(&end, NULL);\n-\ttimersub(&end, &start, &runtime);\n+\tgettimeofday(&bench__end, NULL);\n+\ttimersub(&bench__end, &bench__start, &bench__runtime);\n }\n \n static void print_summary(void)\n@@ -103,7 +103,7 @@ static void print_summary(void)\n \n \tprintf(\"%sAveraged %ld operations/sec (+- %.2f%%), total secs = %d\\n\",\n \t       !silent ? \"\\n\" : \"\", avg, rel_stddev_stats(stddev, avg),\n-\t       (int) runtime.tv_sec);\n+\t       (int) bench__runtime.tv_sec);\n }\n \n int bench_futex_hash(int argc, const char **argv,\n@@ -148,7 +148,7 @@ int bench_futex_hash(int argc, const char **argv,\n \n \tthreads_starting = nthreads;\n \tpthread_attr_init(&thread_attr);\n-\tgettimeofday(&start, NULL);\n+\tgettimeofday(&bench__start, NULL);\n \tfor (i = 0; i < nthreads; i++) {\n \t\tworker[i].tid = i;\n \t\tworker[i].futex = calloc(nfutexes, sizeof(*worker[i].futex));\n@@ -191,7 +191,7 @@ int bench_futex_hash(int argc, const char **argv,\n \tpthread_mutex_destroy(&thread_lock);\n \n \tfor (i = 0; i < nthreads; i++) {\n-\t\tunsigned long t = worker[i].ops/runtime.tv_sec;\n+\t\tunsigned long t = worker[i].ops/bench__runtime.tv_sec;\n \t\tupdate_stats(&throughput_stats, t);\n \t\tif (!silent) {\n \t\t\tif (nfutexes == 1)\ndiff --git a/tools/perf/bench/futex-lock-pi.c b/tools/perf/bench/futex-lock-pi.c\nindex bc6a16adbca8..8d0f60456a95 100644\n--- a/tools/perf/bench/futex-lock-pi.c\n+++ b/tools/perf/bench/futex-lock-pi.c\n@@ -29,7 +29,6 @@ static bool silent = false, multi = false;\n static bool done = false, fshared = false;\n static unsigned int ncpus, nthreads = 0;\n static int futex_flag = 0;\n-struct timeval start, end, runtime;\n static pthread_mutex_t thread_lock;\n static unsigned int threads_starting;\n static struct stats throughput_stats;\n@@ -56,7 +55,7 @@ static void print_summary(void)\n \n \tprintf(\"%sAveraged %ld operations/sec (+- %.2f%%), total secs = %d\\n\",\n \t       !silent ? \"\\n\" : \"\", avg, rel_stddev_stats(stddev, avg),\n-\t       (int) runtime.tv_sec);\n+\t       (int) bench__runtime.tv_sec);\n }\n \n static void toggle_done(int sig __maybe_unused,\n@@ -65,8 +64,8 @@ static void toggle_done(int sig __maybe_unused,\n {\n \t/* inform all threads that we're done for the day */\n \tdone = true;\n-\tgettimeofday(&end, NULL);\n-\ttimersub(&end, &start, &runtime);\n+\tgettimeofday(&bench__end, NULL);\n+\ttimersub(&bench__end, &bench__start, &bench__runtime);\n }\n \n static void *workerfn(void *arg)\n@@ -172,7 +171,7 @@ int bench_futex_lock_pi(int argc, const char **argv,\n \n \tthreads_starting = nthreads;\n \tpthread_attr_init(&thread_attr);\n-\tgettimeofday(&start, NULL);\n+\tgettimeofday(&bench__start, NULL);\n \n \tcreate_threads(worker, thread_attr);\n \tpthread_attr_destroy(&thread_attr);\n@@ -198,7 +197,7 @@ int bench_futex_lock_pi(int argc, const char **argv,\n \tpthread_mutex_destroy(&thread_lock);\n \n \tfor (i = 0; i < nthreads; i++) {\n-\t\tunsigned long t = worker[i].ops/runtime.tv_sec;\n+\t\tunsigned long t = worker[i].ops/bench__runtime.tv_sec;\n \n \t\tupdate_stats(&throughput_stats, t);\n \t\tif (!silent)\n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/RK356x/linux-tools-libtraceevent.patch",
    "content": "--- a/tools/lib/traceevent/Makefile\t2021-02-03 01:55:41.000000000 +0100\n+++ b/tools/lib/traceevent/Makefile.patched\t2021-03-09 19:30:54.508423866 +0100\n@@ -263,7 +263,7 @@\n \txargs echo \"U w W\" | tr 'w ' 'W\\n' | sort -u | xargs echo`;\\\n \tif [ \"$$symbol_type\" = \"U W\" ];then\t\t\t\t\\\n \t\t(echo '{';\t\t\t\t\t\t\\\n-\t\t$(NM) -u -D $1 | awk 'NF>1 {print \"\\t\"$$2\";\"}' | sort -u;\\\n+\t\t$(NM) -u -D $1 | awk 'NF>1 {sub(\"@.*\", \"\", $$2); print \"\\t\"$$2\";\"}' | sort -u;\\\n \t\techo '};';\t\t\t\t\t\t\\\n \t\t) > $2;\t\t\t\t\t\t\t\\\n \telse\t\t\t\t\t\t\t\t\\\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/0001-BACKPORT-arm64-don-t-zero-in-__copy_from_user-_inato.patch",
    "content": "From 02bcb5a7a3dc63346c14fc7aaae3102db548542d Mon Sep 17 00:00:00 2001\nFrom: Al Viro <viro@zeniv.linux.org.uk>\nDate: Sat, 10 Sep 2016 16:50:00 -0400\nSubject: [PATCH] BACKPORT: arm64: don't zero in __copy_from_user{,_inatomic}\n\nSigned-off-by: Al Viro <viro@zeniv.linux.org.uk>\n---\n arch/arm64/include/asm/uaccess.h | 11 +++++++----\n arch/arm64/lib/copy_from_user.S  |  7 +------\n 2 files changed, 8 insertions(+), 10 deletions(-)\n\ndiff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h\nindex d0919bcb1953..b26ad8507e93 100644\n--- a/arch/arm64/include/asm/uaccess.h\n+++ b/arch/arm64/include/asm/uaccess.h\n@@ -410,12 +410,15 @@ static inline unsigned long __must_check __copy_to_user(void __user *to, const v\n \n static inline unsigned long __must_check copy_from_user(void *to, const void __user *from, unsigned long n)\n {\n+\tunsigned long res = n;\n+\n \tif (access_ok(VERIFY_READ, from, n)) {\n \t\tcheck_object_size(to, n, false);\n-\t\tn = __arch_copy_from_user(to, from, n);\n-\t} else /* security hole - plug it */\n-\t\tmemset(to, 0, n);\n-\treturn n;\n+\t\tres = __arch_copy_from_user(to, from, n);\n+\t}\n+\tif (unlikely(res))\n+\t\tmemset(to + (n - res), 0, res);\n+\treturn res;\n }\n \n static inline unsigned long __must_check copy_to_user(void __user *to, const void *from, unsigned long n)\ndiff --git a/arch/arm64/lib/copy_from_user.S b/arch/arm64/lib/copy_from_user.S\nindex 683adc358be7..c7a7d9689e8f 100644\n--- a/arch/arm64/lib/copy_from_user.S\n+++ b/arch/arm64/lib/copy_from_user.S\n@@ -74,11 +74,6 @@ ENDPROC(__arch_copy_from_user)\n \n \t.section .fixup,\"ax\"\n \t.align\t2\n-9998:\n-\tsub\tx0, end, dst\n-9999:\n-\tstrb\twzr, [dst], #1\t\t\t// zero remaining buffer space\n-\tcmp\tdst, end\n-\tb.lo\t9999b\n+9998:\tsub\tx0, end, dst\t\t\t// bytes not copied\n \tret\n \t.previous\n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/0001-perf-cs-etm-fix-duplicate-def-of-traceid_list.patch",
    "content": "From 7cdd201761fea40d7467b97fb9f2e2bcd5ec63c4 Mon Sep 17 00:00:00 2001\nFrom: Gleb Mazovetskiy <glex.spb@gmail.com>\nDate: Mon, 25 Jan 2021 00:41:55 +0000\nSubject: [PATCH 01/12] perf: cs-etm: fix duplicate def of traceid_list\n\nBackport of 168200b6d6ea0cb5765943ec5da5b8149701f36a upstream\n\nSigned-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>\n---\n tools/perf/util/cs-etm.c | 3 +++\n tools/perf/util/cs-etm.h | 3 ---\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c\nindex ca93257a6cb7..ee23fd37f241 100644\n--- a/tools/perf/util/cs-etm.c\n+++ b/tools/perf/util/cs-etm.c\n@@ -91,6 +91,9 @@ struct cs_etm_queue {\n         bool                    kernel_mapped;\n };\n \n+/* RB tree for quick conversion between traceID and metadata pointers */\n+static struct intlist *traceid_list;\n+\n static int cs_etm__get_trace(struct cs_etm_buffer *buff, struct cs_etm_queue *etmq);\n static int cs_etm__update_queues(struct cs_etm_auxtrace *);\n static int cs_etm__process_queues(struct cs_etm_auxtrace *, u64);\ndiff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h\nindex ec6ff78f1905..1f785a92fb20 100644\n--- a/tools/perf/util/cs-etm.h\n+++ b/tools/perf/util/cs-etm.h\n@@ -65,9 +65,6 @@ enum {\n \tCS_ETMV4_PRIV_MAX,\n };\n \n-/* RB tree for quick conversion between traceID and CPUs */\n-struct intlist *traceid_list;\n-\n #define KiB(x) ((x) * 1024)\n #define MiB(x) ((x) * 1024 * 1024)\n \n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/0001-scripts-dtc-Remove-redundant-YYLOC-global-declaratio.patch",
    "content": "From 11647f99b4de6bc460e106e876f72fc7af3e54a6 Mon Sep 17 00:00:00 2001\nFrom: Dirk Mueller <dmueller@suse.com>\nDate: Tue, 14 Jan 2020 18:53:41 +0100\nSubject: [PATCH] scripts/dtc: Remove redundant YYLOC global declaration\n\ncommit e33a814e772cdc36436c8c188d8c42d019fda639 upstream.\n\ngcc 10 will default to -fno-common, which causes this error at link\ntime:\n\n  (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here\n\nThis is because both dtc-lexer as well as dtc-parser define the same\nglobal symbol yyloc. Before with -fcommon those were merged into one\ndefintion. The proper solution would be to to mark this as \"extern\",\nhowever that leads to:\n\n  dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]\n   26 | extern YYLTYPE yylloc;\n      |                ^~~~~~\nIn file included from dtc-lexer.l:24:\ndtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here\n  127 | extern YYLTYPE yylloc;\n      |                ^~~~~~\ncc1: all warnings being treated as errors\n\nwhich means the declaration is completely redundant and can just be\ndropped.\n\nSigned-off-by: Dirk Mueller <dmueller@suse.com>\nSigned-off-by: David Gibson <david@gibson.dropbear.id.au>\n[robh: cherry-pick from upstream]\nCc: stable@vger.kernel.org\nSigned-off-by: Rob Herring <robh@kernel.org>\n[nc: Also apply to dtc-lexer.lex.c_shipped due to a lack of\n     e039139be8c2, where dtc-lexer.l started being used]\nSigned-off-by: Nathan Chancellor <natechancellor@gmail.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nChange-Id: I7f299451e99aab09375883546e47505ec0937c26\n---\n scripts/dtc/dtc-lexer.l             | 1 -\n scripts/dtc/dtc-lexer.lex.c_shipped | 1 -\n 2 files changed, 2 deletions(-)\n\ndiff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l\nindex c600603044f..cf7707be43a 100644\n--- a/scripts/dtc/dtc-lexer.l\n+++ b/scripts/dtc/dtc-lexer.l\n@@ -38,7 +38,6 @@ LINECOMMENT\t\"//\".*\\n\n #include \"srcpos.h\"\n #include \"dtc-parser.tab.h\"\n \n-YYLTYPE yylloc;\n extern bool treesource_error;\n \n /* CAUTION: this will stop working if we ever use yyless() or yyunput() */\ndiff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped\nindex 2c862bc86ad..e3663ce1af5 100644\n--- a/scripts/dtc/dtc-lexer.lex.c_shipped\n+++ b/scripts/dtc/dtc-lexer.lex.c_shipped\n@@ -631,7 +631,6 @@ char *yytext;\n #include \"srcpos.h\"\n #include \"dtc-parser.tab.h\"\n \n-YYLTYPE yylloc;\n extern bool treesource_error;\n \n /* CAUTION: this will stop working if we ever use yyless() or yyunput() */\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/0002-perf-bench-Share-some-global-variables-to-fix-build-.patch",
    "content": "From 62b75df5f013d9f7b5b47ff5369dd4b3143ab965 Mon Sep 17 00:00:00 2001\nFrom: Gleb Mazovetskiy <glex.spb@gmail.com>\nDate: Mon, 25 Jan 2021 00:52:10 +0000\nSubject: [PATCH 02/12] perf bench: Share some global variables to fix build\n with gcc 10\n\nBased on https://git.yoctoproject.org/cgit/cgit.cgi/meta-arm/tree/meta-arm-bsp/recipes-kernel/linux/linux-yocto-5.3/0003-perf-bench-Share-some-global-variables-to-fix-build-.patch\n\nSigned-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>\n---\n tools/perf/bench/bench.h         |  4 ++++\n tools/perf/bench/futex-hash.c    | 12 ++++++------\n tools/perf/bench/futex-lock-pi.c | 11 +++++------\n 3 files changed, 15 insertions(+), 12 deletions(-)\n\ndiff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h\nindex a50df86f2b9b..e758896f4995 100644\n--- a/tools/perf/bench/bench.h\n+++ b/tools/perf/bench/bench.h\n@@ -1,6 +1,10 @@\n #ifndef BENCH_H\n #define BENCH_H\n \n+#include <sys/time.h>\n+\n+extern struct timeval bench__start, bench__end, bench__runtime;\n+\n /*\n  * The madvise transparent hugepage constants were added in glibc\n  * 2.13. For compatibility with older versions of glibc, define these\ndiff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-hash.c\nindex fc9bebd2cca0..80313b40d324 100644\n--- a/tools/perf/bench/futex-hash.c\n+++ b/tools/perf/bench/futex-hash.c\n@@ -28,7 +28,7 @@ static unsigned int nfutexes = 1024;\n static bool fshared = false, done = false, silent = false;\n static int futex_flag = 0;\n \n-struct timeval start, end, runtime;\n+struct timeval bench__start, bench__end, bench__runtime;\n static pthread_mutex_t thread_lock;\n static unsigned int threads_starting;\n static struct stats throughput_stats;\n@@ -92,8 +92,8 @@ static void toggle_done(int sig __maybe_unused,\n {\n \t/* inform all threads that we're done for the day */\n \tdone = true;\n-\tgettimeofday(&end, NULL);\n-\ttimersub(&end, &start, &runtime);\n+\tgettimeofday(&bench__end, NULL);\n+\ttimersub(&bench__end, &bench__start, &bench__runtime);\n }\n \n static void print_summary(void)\n@@ -103,7 +103,7 @@ static void print_summary(void)\n \n \tprintf(\"%sAveraged %ld operations/sec (+- %.2f%%), total secs = %d\\n\",\n \t       !silent ? \"\\n\" : \"\", avg, rel_stddev_stats(stddev, avg),\n-\t       (int) runtime.tv_sec);\n+\t       (int) bench__runtime.tv_sec);\n }\n \n int bench_futex_hash(int argc, const char **argv,\n@@ -148,7 +148,7 @@ int bench_futex_hash(int argc, const char **argv,\n \n \tthreads_starting = nthreads;\n \tpthread_attr_init(&thread_attr);\n-\tgettimeofday(&start, NULL);\n+\tgettimeofday(&bench__start, NULL);\n \tfor (i = 0; i < nthreads; i++) {\n \t\tworker[i].tid = i;\n \t\tworker[i].futex = calloc(nfutexes, sizeof(*worker[i].futex));\n@@ -191,7 +191,7 @@ int bench_futex_hash(int argc, const char **argv,\n \tpthread_mutex_destroy(&thread_lock);\n \n \tfor (i = 0; i < nthreads; i++) {\n-\t\tunsigned long t = worker[i].ops/runtime.tv_sec;\n+\t\tunsigned long t = worker[i].ops/bench__runtime.tv_sec;\n \t\tupdate_stats(&throughput_stats, t);\n \t\tif (!silent) {\n \t\t\tif (nfutexes == 1)\ndiff --git a/tools/perf/bench/futex-lock-pi.c b/tools/perf/bench/futex-lock-pi.c\nindex bc6a16adbca8..8d0f60456a95 100644\n--- a/tools/perf/bench/futex-lock-pi.c\n+++ b/tools/perf/bench/futex-lock-pi.c\n@@ -29,7 +29,6 @@ static bool silent = false, multi = false;\n static bool done = false, fshared = false;\n static unsigned int ncpus, nthreads = 0;\n static int futex_flag = 0;\n-struct timeval start, end, runtime;\n static pthread_mutex_t thread_lock;\n static unsigned int threads_starting;\n static struct stats throughput_stats;\n@@ -56,7 +55,7 @@ static void print_summary(void)\n \n \tprintf(\"%sAveraged %ld operations/sec (+- %.2f%%), total secs = %d\\n\",\n \t       !silent ? \"\\n\" : \"\", avg, rel_stddev_stats(stddev, avg),\n-\t       (int) runtime.tv_sec);\n+\t       (int) bench__runtime.tv_sec);\n }\n \n static void toggle_done(int sig __maybe_unused,\n@@ -65,8 +64,8 @@ static void toggle_done(int sig __maybe_unused,\n {\n \t/* inform all threads that we're done for the day */\n \tdone = true;\n-\tgettimeofday(&end, NULL);\n-\ttimersub(&end, &start, &runtime);\n+\tgettimeofday(&bench__end, NULL);\n+\ttimersub(&bench__end, &bench__start, &bench__runtime);\n }\n \n static void *workerfn(void *arg)\n@@ -172,7 +171,7 @@ int bench_futex_lock_pi(int argc, const char **argv,\n \n \tthreads_starting = nthreads;\n \tpthread_attr_init(&thread_attr);\n-\tgettimeofday(&start, NULL);\n+\tgettimeofday(&bench__start, NULL);\n \n \tcreate_threads(worker, thread_attr);\n \tpthread_attr_destroy(&thread_attr);\n@@ -198,7 +197,7 @@ int bench_futex_lock_pi(int argc, const char **argv,\n \tpthread_mutex_destroy(&thread_lock);\n \n \tfor (i = 0; i < nthreads; i++) {\n-\t\tunsigned long t = worker[i].ops/runtime.tv_sec;\n+\t\tunsigned long t = worker[i].ops/bench__runtime.tv_sec;\n \n \t\tupdate_stats(&throughput_stats, t);\n \t\tif (!silent)\n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/0003-perf-Make-perf-able-to-build-with-latest-libbfd.patch",
    "content": "From 89b28cc5ae940970fa4530722c1419dd728a6e15 Mon Sep 17 00:00:00 2001\nFrom: Gleb Mazovetskiy <glex.spb@gmail.com>\nDate: Mon, 25 Jan 2021 00:57:06 +0000\nSubject: [PATCH 03/12] perf: Make perf able to build with latest libbfd\n\nBased on http://lore.kernel.org/lkml/20200128152938.31413-1-changbin.du@gmail.com\n\nSigned-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>\n---\n tools/perf/util/srcline.c | 16 +++++++++++++++-\n 1 file changed, 15 insertions(+), 1 deletion(-)\n\ndiff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c\nindex b4db3f48e3b0..2853d4728ab9 100644\n--- a/tools/perf/util/srcline.c\n+++ b/tools/perf/util/srcline.c\n@@ -86,16 +86,30 @@ static void find_address_in_section(bfd *abfd, asection *section, void *data)\n \tbfd_vma pc, vma;\n \tbfd_size_type size;\n \tstruct a2l_data *a2l = data;\n+\tflagword flags;\n \n \tif (a2l->found)\n \t\treturn;\n \n-\tif ((bfd_get_section_flags(abfd, section) & SEC_ALLOC) == 0)\n+#ifdef bfd_get_section_flags\n+\tflags = bfd_get_section_flags(abfd, section);\n+#else\n+\tflags = bfd_section_flags(section);\n+#endif\n+\tif ((flags & SEC_ALLOC) == 0)\n \t\treturn;\n \n \tpc = a2l->addr;\n+#ifdef bfd_get_section_vma\n \tvma = bfd_get_section_vma(abfd, section);\n+#else\n+\tvma = bfd_section_vma(section);\n+#endif\n+#ifdef bfd_get_section_size\n \tsize = bfd_get_section_size(section);\n+#else\n+\tsize = bfd_section_size(section);\n+#endif\n \n \tif (pc < vma || pc >= vma + size)\n \t\treturn;\n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/0004-tools-lib-api-fs-Fix-gcc9-stringop-truncation-compil.patch",
    "content": "From 186f5ff69e29e0b1add523bb03462a690b2348c0 Mon Sep 17 00:00:00 2001\nFrom: Andrey Zhizhikin <andrey.z@gmail.com>\nDate: Wed, 11 Dec 2019 08:01:09 +0000\nSubject: [PATCH 04/12] tools lib api fs: Fix gcc9 stringop-truncation\n compilation error\n\nGCC9 introduced string hardening mechanisms, which exhibits the error\nduring fs api compilation:\n\nerror: '__builtin_strncpy' specified bound 4096 equals destination size\n[-Werror=stringop-truncation]\n\nThis comes when the length of copy passed to strncpy is is equal to\ndestination size, which could potentially lead to buffer overflow.\n\nThere is a need to mitigate this potential issue by limiting the size of\ndestination by 1 and explicitly terminate the destination with NULL.\n\nSigned-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>\nReviewed-by: Petr Mladek <pmladek@suse.com>\nAcked-by: Jiri Olsa <jolsa@kernel.org>\nCc: Alexei Starovoitov <ast@kernel.org>\nCc: Andrii Nakryiko <andriin@fb.com>\nCc: Daniel Borkmann <daniel@iogearbox.net>\nCc: Kefeng Wang <wangkefeng.wang@huawei.com>\nCc: Martin KaFai Lau <kafai@fb.com>\nCc: Petr Mladek <pmladek@suse.com>\nCc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Song Liu <songliubraving@fb.com>\nCc: Yonghong Song <yhs@fb.com>\nCc: bpf@vger.kernel.org\nCc: netdev@vger.kernel.org\nLink: http://lore.kernel.org/lkml/20191211080109.18765-1-andrey.zhizhikin@leica-geosystems.com\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>\n---\n tools/lib/api/fs/fs.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/tools/lib/api/fs/fs.c b/tools/lib/api/fs/fs.c\nindex 459599d1b6c4..58f05748dd39 100644\n--- a/tools/lib/api/fs/fs.c\n+++ b/tools/lib/api/fs/fs.c\n@@ -179,6 +179,7 @@ static bool fs__env_override(struct fs *fs)\n \tsize_t name_len = strlen(fs->name);\n \t/* name + \"_PATH\" + '\\0' */\n \tchar upper_name[name_len + 5 + 1];\n+\n \tmemcpy(upper_name, fs->name, name_len);\n \tmem_toupper(upper_name, name_len);\n \tstrcpy(&upper_name[name_len], \"_PATH\");\n@@ -188,7 +189,8 @@ static bool fs__env_override(struct fs *fs)\n \t\treturn false;\n \n \tfs->found = true;\n-\tstrncpy(fs->path, override_path, sizeof(fs->path));\n+\tstrncpy(fs->path, override_path, sizeof(fs->path) - 1);\n+\tfs->path[sizeof(fs->path) - 1] = '\\0';\n \treturn true;\n }\n \n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/0005-Clean-the-new-GCC-9-Wmissing-attributes-warnings.patch",
    "content": "From 29d83afefdcd388e342ef73ecd7c9afaf4b30186 Mon Sep 17 00:00:00 2001\nFrom: Gleb Mazovetskiy <glex.spb@gmail.com>\nDate: Mon, 25 Jan 2021 01:06:04 +0000\nSubject: [PATCH 05/12] Clean the new GCC 9 -Wmissing-attributes warnings\n\nBackport https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0b999ae3614d09d97a1575936bcee884f912b10e\n\nSigned-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>\n---\n include/linux/compiler.h | 10 ++++++++++\n include/linux/module.h   |  4 ++--\n 2 files changed, 12 insertions(+), 2 deletions(-)\n\ndiff --git a/include/linux/compiler.h b/include/linux/compiler.h\nindex ed772311ec1f..798f1fac3961 100644\n--- a/include/linux/compiler.h\n+++ b/include/linux/compiler.h\n@@ -422,6 +422,16 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s\n #define __visible\n #endif\n \n+#if defined __has_attribute\n+# if __has_attribute (__copy__)\n+#  define __copy(symbol)                 __attribute__((__copy__(symbol)))\n+# else\n+#  define __copy(symbol)\n+# endif\n+#else\n+#  define __copy(symbol)\n+#endif\n+\n /*\n  * Assume alignment of return value.\n  */\ndiff --git a/include/linux/module.h b/include/linux/module.h\nindex d79e1e55c1d4..4b29f51443f8 100644\n--- a/include/linux/module.h\n+++ b/include/linux/module.h\n@@ -127,13 +127,13 @@ extern void cleanup_module(void);\n #define module_init(initfn)\t\t\t\t\t\\\n \tstatic inline initcall_t __maybe_unused __inittest(void)\t\t\\\n \t{ return initfn; }\t\t\t\t\t\\\n-\tint init_module(void) __attribute__((alias(#initfn)));\n+\tint init_module(void) __copy(initfn) __attribute__((alias(#initfn)));\n \n /* This is only required if you want to be unloadable. */\n #define module_exit(exitfn)\t\t\t\t\t\\\n \tstatic inline exitcall_t __maybe_unused __exittest(void)\t\t\\\n \t{ return exitfn; }\t\t\t\t\t\\\n-\tvoid cleanup_module(void) __attribute__((alias(#exitfn)));\n+\tvoid cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn)));\n \n #endif\n \n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/0006-nf_conntrack_core-Fix-gcc-10-compilation.patch",
    "content": "From 0ce5411261e152c74a83fba2e29dfc34b6b53480 Mon Sep 17 00:00:00 2001\nFrom: Gleb Mazovetskiy <glex.spb@gmail.com>\nDate: Mon, 25 Jan 2021 01:13:14 +0000\nSubject: [PATCH 06/12] nf_conntrack_core: Fix gcc-10 compilation\n\ngcc-10 emits the following error:\n\n> warning: array subscript 0 is outside the bounds of an interior zero-length array 'u8[0]' {aka 'unsigned char[0]'} [-Wzero-length-bounds]\n\nBased on https://lkml.org/lkml/2020/4/30/1476\n\nSigned-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>\n---\n include/net/netfilter/nf_conntrack.h | 2 +-\n net/netfilter/nf_conntrack_core.c    | 4 ++--\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h\nindex fde4068eec0b..c818597b71e6 100644\n--- a/include/net/netfilter/nf_conntrack.h\n+++ b/include/net/netfilter/nf_conntrack.h\n@@ -98,7 +98,7 @@ struct nf_conn {\n \tpossible_net_t ct_net;\n \n \t/* all members below initialized via memset */\n-\tu8 __nfct_init_offset[0];\n+\tstruct { } __nfct_init_offset;\n \n \t/* If we were expected by an expectation, this will be it */\n \tstruct nf_conn *master;\ndiff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c\nindex 5f747089024f..3a290456507f 100644\n--- a/net/netfilter/nf_conntrack_core.c\n+++ b/net/netfilter/nf_conntrack_core.c\n@@ -863,9 +863,9 @@ __nf_conntrack_alloc(struct net *net,\n \t/* Don't set timer yet: wait for confirmation */\n \tsetup_timer(&ct->timeout, death_by_timeout, (unsigned long)ct);\n \twrite_pnet(&ct->ct_net, net);\n-\tmemset(&ct->__nfct_init_offset[0], 0,\n+\tmemset(&ct->__nfct_init_offset, 0,\n \t       offsetof(struct nf_conn, proto) -\n-\t       offsetof(struct nf_conn, __nfct_init_offset[0]));\n+\t       offsetof(struct nf_conn, __nfct_init_offset));\n \n \tif (zone && nf_ct_zone_add(ct, GFP_ATOMIC, zone) < 0)\n \t\tgoto out_free;\n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/0007-wlcore-debugfs-Remove-unused-variable-res.patch",
    "content": "From 4e2bc2d535a5257c96bb95ab5f20f1169ea5f0f5 Mon Sep 17 00:00:00 2001\nFrom: Lee Jones <lee.jones@linaro.org>\nDate: Wed, 26 Aug 2020 10:33:46 +0100\nSubject: [PATCH 07/12] wlcore: debugfs: Remove unused variable 'res'\n\nFixes the following W=1 kernel build warning(s):\n\nCc: Kalle Valo <kvalo@codeaurora.org>\nCc: \"David S. Miller\" <davem@davemloft.net>\nCc: Jakub Kicinski <kuba@kernel.org>\nCc: Luciano Coelho <luciano.coelho@nokia.com>\nCc: linux-wireless@vger.kernel.org\nCc: netdev@vger.kernel.org\nSigned-off-by: Lee Jones <lee.jones@linaro.org>\nSigned-off-by: Kalle Valo <kvalo@codeaurora.org>\nLink: https://lore.kernel.org/r/20200826093401.1458456-16-lee.jones@linaro.org\n---\n drivers/net/wireless/ti/wlcore/debugfs.h | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/drivers/net/wireless/ti/wlcore/debugfs.h b/drivers/net/wireless/ti/wlcore/debugfs.h\nindex bf14676e6515..bfb79399d40f 100644\n--- a/drivers/net/wireless/ti/wlcore/debugfs.h\n+++ b/drivers/net/wireless/ti/wlcore/debugfs.h\n@@ -96,13 +96,13 @@ static ssize_t sub## _ ##name## _read(struct file *file,\t\t\\\n \tstruct wl1271 *wl = file->private_data;\t\t\t\t\\\n \tstruct struct_type *stats = wl->stats.fw_stats;\t\t\t\\\n \tchar buf[DEBUGFS_FORMAT_BUFFER_SIZE] = \"\";\t\t\t\\\n-\tint res, i;\t\t\t\t\t\t\t\\\n+\tint i;\t\t\t\t\t\t\t\t\\\n \t\t\t\t\t\t\t\t\t\\\n \twl1271_debugfs_update_stats(wl);\t\t\t\t\\\n \t\t\t\t\t\t\t\t\t\\\n \tfor (i = 0; i < len; i++)\t\t\t\t\t\\\n-\t\tres = snprintf(buf, sizeof(buf), \"%s[%d] = %d\\n\",\t\\\n-\t\t\t       buf, i, stats->sub.name[i]);\t\t\\\n+\t\tsnprintf(buf, sizeof(buf), \"%s[%d] = %d\\n\",\t\t\\\n+\t\t\t buf, i, stats->sub.name[i]);\t\t\t\\\n \t\t\t\t\t\t\t\t\t\\\n \treturn wl1271_format_buffer(userbuf, count, ppos, \"%s\", buf);\t\\\n }\t\t\t\t\t\t\t\t\t\\\n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/0008-usb-ehci-avoid-gcc-10-zero-length-bounds-warning.patch",
    "content": "From 7eae4ba5981e9aa787b1fb6580f6cd4682b383de Mon Sep 17 00:00:00 2001\nFrom: Gleb Mazovetskiy <glex.spb@gmail.com>\nDate: Mon, 25 Jan 2021 01:29:37 +0000\nSubject: [PATCH 08/12] usb: ehci: avoid gcc-10 zero-length-bounds warning\n\nBackport of https://lkml.org/lkml/2020/4/30/1475\n\nSigned-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>\n---\n include/linux/usb/ehci_def.h | 12 ++++++++----\n 1 file changed, 8 insertions(+), 4 deletions(-)\n\ndiff --git a/include/linux/usb/ehci_def.h b/include/linux/usb/ehci_def.h\nindex e479033bd782..311e37cf7bb5 100644\n--- a/include/linux/usb/ehci_def.h\n+++ b/include/linux/usb/ehci_def.h\n@@ -126,7 +126,8 @@ struct ehci_regs {\n #define FLAG_CF\t\t(1<<0)\t\t/* true: we'll support \"high speed\" */\n \n \t/* PORTSC: offset 0x44 */\n-\tu32\t\tport_status[0];\t/* up to N_PORTS */\n+\tunion {\n+\t\tu32\t\tport_status[9];\t/* up to N_PORTS */\n /* EHCI 1.1 addendum */\n #define PORTSC_SUSPEND_STS_ACK 0\n #define PORTSC_SUSPEND_STS_NYET 1\n@@ -164,7 +165,8 @@ struct ehci_regs {\n #define PORT_CONNECT\t(1<<0)\t\t/* device connected */\n #define PORT_RWC_BITS   (PORT_CSC | PORT_PEC | PORT_OCC)\n \n-\tu32\t\treserved3[9];\n+\t\tu32\t\treserved3[9];\n+\t};\n \n \t/* USBMODE: offset 0x68 */\n \tu32\t\tusbmode;\t/* USB Device mode */\n@@ -180,11 +182,13 @@ struct ehci_regs {\n  * PORTSCx\n  */\n \t/* HOSTPC: offset 0x84 */\n-\tu32\t\thostpc[0];\t/* HOSTPC extension */\n+\tunion {\n+\t\tu32\t\thostpc[17];\t/* HOSTPC extension */\n #define HOSTPC_PHCD\t(1<<22)\t\t/* Phy clock disable */\n #define HOSTPC_PSPD\t(3<<25)\t\t/* Port speed detection */\n \n-\tu32\t\treserved5[17];\n+\t\tu32\t\treserved5[17];\n+\t};\n \n \t/* USBMODE_EX: offset 0xc8 */\n \tu32\t\tusbmode_ex;\t/* USB Device mode extension */\n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/0009-gcc-10-warnings-fix-low-hanging-fruit.patch",
    "content": "From 6fb2704ccabaede891301b7cae81054d63b09a52 Mon Sep 17 00:00:00 2001\nFrom: Linus Torvalds <torvalds@linux-foundation.org>\nDate: Mon, 4 May 2020 09:16:37 -0700\nSubject: [PATCH 09/12] gcc-10 warnings: fix low-hanging fruit\n\nBackport of 9d82973e032e246ff5663c9805fbb5407ae932e3\n\nOriginal description below\n---\n\nDue to a bug-report that was compiler-dependent, I updated one of my\nmachines to gcc-10.  That shows a lot of new warnings.  Happily they\nseem to be mostly the valid kind, but it's going to cause a round of\nchurn for getting rid of them..\n\nThis is the really low-hanging fruit of removing a couple of zero-sized\narrays in some core code.  We have had a round of these patches before,\nand we'll have many more coming, and there is nothing special about\nthese except that they were particularly trivial, and triggered more\nwarnings than most.\n\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n---\n include/linux/fs.h  | 2 +-\n include/linux/tty.h | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/include/linux/fs.h b/include/linux/fs.h\nindex c0f76c97359c..d036da45899f 100644\n--- a/include/linux/fs.h\n+++ b/include/linux/fs.h\n@@ -938,7 +938,7 @@ struct file_handle {\n \t__u32 handle_bytes;\n \tint handle_type;\n \t/* file identifier */\n-\tunsigned char f_handle[0];\n+\tunsigned char f_handle[];\n };\n \n static inline struct file *get_file(struct file *f)\ndiff --git a/include/linux/tty.h b/include/linux/tty.h\nindex bac8e6dc8689..f1e422acfda8 100644\n--- a/include/linux/tty.h\n+++ b/include/linux/tty.h\n@@ -64,7 +64,7 @@ struct tty_buffer {\n \tint read;\n \tint flags;\n \t/* Data points here */\n-\tunsigned long data[0];\n+\tunsigned long data[];\n };\n \n /* Values for .flags field of tty_buffer */\n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/0010-Fix-joystick-analog.c-GCC-10-Wrestrict-warning.patch",
    "content": "From e76f457cdfe034aa6618e445381e4a9f77807a8d Mon Sep 17 00:00:00 2001\nFrom: Gleb Mazovetskiy <glex.spb@gmail.com>\nDate: Mon, 25 Jan 2021 02:30:53 +0000\nSubject: [PATCH 10/12] Fix joystick/analog.c GCC-10 -Wrestrict warning\n\ndrivers/input/joystick/analog.c: In function 'analog_connect':\ndrivers/input/joystick/analog.c:444:3: warning: 'snprintf' argument 4 overlaps destination object '<unknown>' [-Wrestrict]\nerror, forbidden warning:analog.c:444\n  444 |   snprintf(analog->name, sizeof(analog->name), \"%s %d-hat\",\n      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n  445 |     analog->name, hweight16(analog->mask & ANALOG_HATS_ALL));\n      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSigned-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>\n---\n drivers/input/joystick/analog.c | 8 +++++---\n 1 file changed, 5 insertions(+), 3 deletions(-)\n\ndiff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c\nindex 6f8b084e13d0..1e7e29fa47c5 100644\n--- a/drivers/input/joystick/analog.c\n+++ b/drivers/input/joystick/analog.c\n@@ -440,9 +440,11 @@ static void analog_name(struct analog *analog)\n \t\t hweight8(analog->mask & ANALOG_BTNS_STD) + !!(analog->mask & ANALOG_BTNS_CHF) * 2 +\n \t\t hweight16(analog->mask & ANALOG_BTNS_GAMEPAD) + !!(analog->mask & ANALOG_HBTN_CHF) * 4);\n \n-\tif (analog->mask & ANALOG_HATS_ALL)\n-\t\tsnprintf(analog->name, sizeof(analog->name), \"%s %d-hat\",\n-\t\t\t analog->name, hweight16(analog->mask & ANALOG_HATS_ALL));\n+\tif (analog->mask & ANALOG_HATS_ALL) {\n+\t\tsize_t len = strnlen(analog->name, sizeof(analog->name));\n+\t\tsnprintf(analog->name + len, sizeof(analog->name) - len, \" %d-hat\",\n+\t\t\thweight16(analog->mask & ANALOG_HATS_ALL));\n+\t}\n \n \tif (analog->mask & ANALOG_HAT_FCS)\n \t\tstrlcat(analog->name, \" FCS\", sizeof(analog->name));\n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/0011-drivers-net-phy-mdio_bus-Fix-gcc-10-Wrestrict.patch",
    "content": "From c7c2392bf7c16ed73b043ba9726ac905845eebfb Mon Sep 17 00:00:00 2001\nFrom: Gleb Mazovetskiy <glex.spb@gmail.com>\nDate: Mon, 25 Jan 2021 02:36:54 +0000\nSubject: [PATCH 11/12] drivers/net/phy/mdio_bus: Fix gcc-10 -Wrestrict\n\nFixes\n\ndrivers/net/phy/mdio_bus.c: In function 'phy_registers_show':\ndrivers/net/phy/mdio_bus.c:665:3: warning: 'sprintf' argument 3 overlaps destination object 'buf' [-Wrestrict]\nerror, forbidden warning:mdio_bus.c:665\n  665 |   sprintf(buf, \"%s%2d: 0x%x\\n\", buf, index,\n      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n  666 |    phy_read(phydev, index));\n      |    ~~~~~~~~~~~~~~~~~~~~~~~~\ndrivers/net/phy/mdio_bus.c:659:77: note: destination object referenced by 'restrict'-qualified argument 1 was declared here\n  659 | phy_registers_show(struct device *dev, struct device_attribute *attr, char *buf)\n      |                                                                       ~~~~~~^~~\n\nSigned-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>\n---\n drivers/net/phy/mdio_bus.c | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c\nindex d079ac58c7da..f20c0e31cb45 100644\n--- a/drivers/net/phy/mdio_bus.c\n+++ b/drivers/net/phy/mdio_bus.c\n@@ -661,9 +661,12 @@ phy_registers_show(struct device *dev, struct device_attribute *attr, char *buf)\n \tstruct phy_device *phydev = to_phy_device(dev);\n \tint index;\n \n-\tfor (index = 0; index < 32; index++)\n-\t\tsprintf(buf, \"%s%2d: 0x%x\\n\", buf, index,\n+\tchar tmp[50];\n+\tfor (index = 0; index < 32; index++) {\n+\t\tsnprintf(tmp, sizeof(tmp), \"%2d: 0x%x\\n\", index,\n \t\t\tphy_read(phydev, index));\n+\t\tstrcat(buf, tmp);\n+\t}\n \n \treturn strlen(buf);\n }\n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/0012-drivers-net-wireless-Fix-gcc-10-Wrestrict.patch",
    "content": "From e14af2d999d873c32d922fe39c72ba4b6e86b3f0 Mon Sep 17 00:00:00 2001\nFrom: Gleb Mazovetskiy <glex.spb@gmail.com>\nDate: Mon, 25 Jan 2021 02:45:24 +0000\nSubject: [PATCH 12/12] drivers/net/wireless: Fix gcc-10 -Wrestrict\n\nFixes errors such as:\n\ndrivers/net/wireless/rtl8821cu/os_dep/linux/ioctl_mp.c: In function 'rtw_mp_txpower_index':\ndrivers/net/wireless/rtl8821cu/os_dep/linux/ioctl_mp.c:573:4: warning: 'sprintf' argument 3 overlaps destination object 'extra' [-Wrestrict]\nerror, forbidden warning:ioctl_mp.c:573\n  573 |    sprintf(extra, \"%s,pathb=%d\", extra, txpower_inx);\n      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\ndrivers/net/wireless/rtl8821cu/os_dep/linux/ioctl_mp.c:546:34: note: destination object referenced by 'restrict'-qualified argument 1 was declared here\n  546 |     struct iw_point *wrqu, char *extra)\n      |                            ~~~~~~^~~~~\n\nSigned-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>\n---\n drivers/net/wireless/ew-7611ulb/core/rtw_mp.c |  19 ++-\n .../ew-7611ulb/os_dep/linux/ioctl_mp.c        |  14 +-\n .../rockchip_wlan/rtl8188eu/core/rtw_mp.c     |  19 ++-\n .../rtl8188eu/os_dep/linux/ioctl_linux.c      | 145 +++++++++---------\n .../rtl8188eu/os_dep/linux/ioctl_mp.c         | 127 +++++++--------\n .../rockchip_wlan/rtl8188fu/core/rtw_mp.c     |   4 +-\n .../rtl8188fu/os_dep/linux/ioctl_linux.c      | 131 ++++++++--------\n .../rtl8188fu/os_dep/linux/ioctl_mp.c         | 126 +++++++--------\n .../rockchip_wlan/rtl8189es/core/rtw_mp.c     |   4 +-\n .../rtl8189es/os_dep/linux/ioctl_linux.c      | 133 ++++++++--------\n .../rtl8189es/os_dep/linux/ioctl_mp.c         | 126 +++++++--------\n .../rockchip_wlan/rtl8189fs/core/rtw_mp.c     |  19 ++-\n .../rtl8189fs/os_dep/linux/ioctl_mp.c         |  17 +-\n .../rockchip_wlan/rtl8723bs/core/rtw_mp.c     |  19 ++-\n .../rtl8723bs/os_dep/linux/ioctl_mp.c         |  17 +-\n .../rockchip_wlan/rtl8723bu/core/rtw_mp.c     |   4 +-\n .../rtl8723bu/os_dep/linux/ioctl_linux.c      | 129 ++++++++--------\n .../rtl8723bu/os_dep/linux/ioctl_mp.c         | 128 ++++++++--------\n .../rockchip_wlan/rtl8723cs/core/rtw_mp.c     |  19 ++-\n .../rtl8723cs/os_dep/linux/ioctl_linux.c      | 145 +++++++++---------\n .../rtl8723cs/os_dep/linux/ioctl_mp.c         | 127 +++++++--------\n .../rockchip_wlan/rtl8723ds/core/rtw_mp.c     |  19 ++-\n .../rtl8723ds/os_dep/linux/ioctl_mp.c         |  24 +--\n .../rockchip_wlan/rtl8822be/core/rtw_mp.c     |  19 ++-\n .../rtl8822be/os_dep/linux/ioctl_linux.c      | 139 +++++++++--------\n .../rtl8822be/os_dep/linux/ioctl_mp.c         | 122 ++++++++-------\n drivers/net/wireless/rtl8192cu/core/rtw_mp.c  |   4 +-\n .../rtl8192cu/os_dep/linux/ioctl_linux.c      |  67 ++++----\n drivers/net/wireless/rtl8812au/core/rtw_mp.c  |   4 +-\n .../rtl8812au/os_dep/linux/ioctl_linux.c      | 138 +++++++++--------\n drivers/net/wireless/rtl8821cu/core/rtw_mp.c  |  19 ++-\n .../rtl8821cu/os_dep/linux/ioctl_mp.c         |  27 ++--\n drivers/net/wireless/rtl88x2bu/core/rtw_mp.c  |  19 ++-\n .../rtl88x2bu/os_dep/linux/ioctl_mp.c         |  14 +-\n drivers/net/wireless/ti/wlcore/boot.c         |   9 +-\n drivers/net/wireless/ti/wlcore/debugfs.h      |   5 +-\n 36 files changed, 1129 insertions(+), 972 deletions(-)\n\ndiff --git a/drivers/net/wireless/ew-7611ulb/core/rtw_mp.c b/drivers/net/wireless/ew-7611ulb/core/rtw_mp.c\nindex a16da9b60103..39384d584f38 100644\n--- a/drivers/net/wireless/ew-7611ulb/core/rtw_mp.c\n+++ b/drivers/net/wireless/ew-7611ulb/core/rtw_mp.c\n@@ -2093,14 +2093,17 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n \n \tdata[0] = '\\0';\n \n-\ti = psd_start;\n-\twhile (i < psd_stop) {\n-\t\tif (i >= psd_pts)\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n-\t\telse\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n-\t\tsprintf(data, \"%s%x \", data, psd_data);\n-\t\ti++;\n+\t{\n+\t\tsize_t extra_len = strlen(data);\n+\t\ti = psd_start;\n+\t\twhile (i < psd_stop) {\n+\t\t\tif (i >= psd_pts)\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n+\t\t\telse\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n+\t\t\textra_len += sprintf(data + extra_len, \"%x \", psd_data);\n+\t\t\ti++;\n+\t\t}\n \t}\n \n #ifdef CONFIG_LONG_DELAY_ISSUE\ndiff --git a/drivers/net/wireless/ew-7611ulb/os_dep/linux/ioctl_mp.c b/drivers/net/wireless/ew-7611ulb/os_dep/linux/ioctl_mp.c\nindex ad2bb026739a..179d08d72e7f 100644\n--- a/drivers/net/wireless/ew-7611ulb/os_dep/linux/ioctl_mp.c\n+++ b/drivers/net/wireless/ew-7611ulb/os_dep/linux/ioctl_mp.c\n@@ -1719,7 +1719,7 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\tchar *pextra = extra;\n \t\t\tRTW_INFO(\"Got format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\t\tpextra += sprintf(pextra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\t\tpadapter->mppriv.channel = channel;\n \t\t\tSetChannel(padapter);\n \t\t\tpHalData->current_channel = channel;\n@@ -2074,6 +2074,7 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \t\tu8\tcount = 0;\n \t\tu8\ti = 0;\n \t\tu32\tdatalen = 0;\n+\t\tsize_t extra_len;\n \n \t\tptmp = extra;\n \t\tpch = strsep(&ptmp, \",\");\n@@ -2099,12 +2100,13 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \n \t\t } while (count < 64);\n \n+\t\textra_len = strlen(extra);\n \t\tfor (i = 0; i < count; i++)\n-\t\t\tsprintf(extra, \"%s:%02x\", extra, maskfileBuffer[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \":%02x\", maskfileBuffer[i]);\n \n \t\tpadapter->registrypriv.bFileMaskEfuse = _TRUE;\n \n-\t\tsprintf(extra, \"%s\\nLoad Efuse Mask data %d hex ok\\n\", extra, count);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nLoad Efuse Mask data %d hex ok\\n\", count);\n \t\twrqu->data.length = strlen(extra);\n \t\treturn 0;\n \t}\n@@ -2522,16 +2524,18 @@ todo:\n \tmptbt_BtControlProcess(padapter, &BtReq);\n \n \tif (readtherm == 0) {\n+\t\tsize_t extra_len;\n \t\tsprintf(extra, \"BT thermal=\");\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++) {\n \t\t\tif ((pMptCtx->mptOutBuf[i] == 0x00) && (pMptCtx->mptOutBuf[i + 1] == 0x00))\n \t\t\t\tgoto exit;\n \n-\t\t\tsprintf(extra, \"%s %d \", extra, (pMptCtx->mptOutBuf[i] & 0x1f));\n+\t\t\textra_len += sprintf(extra + extra_len, \" %d \", (pMptCtx->mptOutBuf[i] & 0x1f));\n \t\t}\n \t} else {\n+\t\tsize_t extra_len;\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++)\n-\t\t\tsprintf(extra, \"%s 0x%x \", extra, pMptCtx->mptOutBuf[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%x \", pMptCtx->mptOutBuf[i]);\n \t}\n \n exit:\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8188eu/core/rtw_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8188eu/core/rtw_mp.c\nindex ec39412959b0..a7658d4e8e76 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8188eu/core/rtw_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8188eu/core/rtw_mp.c\n@@ -2119,14 +2119,17 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n \n \tdata[0] = '\\0';\n \n-\ti = psd_start;\n-\twhile (i < psd_stop) {\n-\t\tif (i >= psd_pts)\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n-\t\telse\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n-\t\tsprintf(data, \"%s%x \", data, psd_data);\n-\t\ti++;\n+\t{\n+\t\tsize_t extra_len = strlen(data);\n+\t\ti = psd_start;\n+\t\twhile (i < psd_stop) {\n+\t\t\tif (i >= psd_pts)\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n+\t\t\telse\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n+\t\t\textra_len += sprintf(data + extra_len, \"%x \", psd_data);\n+\t\t\ti++;\n+\t\t}\n \t}\n \n #ifdef CONFIG_LONG_DELAY_ISSUE\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/ioctl_linux.c b/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/ioctl_linux.c\nindex 5537ead019c2..99ef17400999 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/ioctl_linux.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/ioctl_linux.c\n@@ -9034,6 +9034,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \tu16 mask_len;\n \tu8 mask_buf[64] = \"\";\n \tint err;\n+\tsize_t extra_len;\n #ifdef CONFIG_IOL\n \tu8 org_fw_iol = padapter->registrypriv.fw_iol;/* 0:Disable, 1:enable, 2:by usb speed */\n #endif\n@@ -9108,18 +9109,18 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} else\n \t\t\tdrvmaporder = 0;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < cnt; i += 16) {\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, shift + i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", shift + i);\n \t\t\tfor (j = 0; j < 8; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\tif ((shift + cnt) < mapLen)\n-\t\t\tsprintf(extra, \"%s\\t...more (left:%d/%d)\\n\", extra, mapLen-(shift + cnt), mapLen);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t...more (left:%d/%d)\\n\", mapLen-(shift + cnt), mapLen);\n \n \t} else if (strcmp(tmp[0], \"realmap\") == 0) {\n \t\tstatic u8 order = 0;\n@@ -9158,18 +9159,18 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} else\n \t\t\torder = 0;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < cnt; i += 16) {\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, shift + i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", shift + i);\n \t\t\tfor (j = 0; j < 8; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\tif ((shift + cnt) < mapLen)\n-\t\t\tsprintf(extra, \"%s\\t...more (left:%d/%d)\\n\", extra, mapLen-(shift + cnt), mapLen);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t...more (left:%d/%d)\\n\", mapLen-(shift + cnt), mapLen);\n \t} else if (strcmp(tmp[0], \"rmap\") == 0) {\n \t\tif ((tmp[1] == NULL) || (tmp[2] == NULL)) {\n \t\t\tRTW_INFO(\"%s: rmap Fail!! Parameters error!\\n\", __FUNCTION__);\n@@ -9204,9 +9205,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t/*\t\tRTW_INFO(\"%s: data={\", __FUNCTION__); */\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%02x \", data[i]); */\n-\t\t\tsprintf(extra, \"%s0x%02X \", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", data[i]);\n \t\t}\n \t\t/*\t\tRTW_INFO(\"}\\n\"); */\n \t} else if (strcmp(tmp[0], \"realraw\") == 0) {\n@@ -9235,18 +9237,18 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} else\n \t\t\traw_order = 0;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < cnt; i += 16) {\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, shift + i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", shift + i);\n \t\t\tfor (j = 0; j < 8; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, rawdata[i + j]);\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", rawdata[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, rawdata[i + j]);\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", rawdata[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\tif ((shift + cnt) < mapLen)\n-\t\t\tsprintf(extra, \"%s\\t...more (left:%d/%d)\\n\", extra, mapLen-(shift + cnt), mapLen);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t...more (left:%d/%d)\\n\", mapLen-(shift + cnt), mapLen);\n \n \t} else if (strcmp(tmp[0], \"btrealraw\") == 0) {\n \t\tstatic u8 bt_raw_order = 0;\n@@ -9282,18 +9284,18 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} else\n \t\t\tbt_raw_order = 0;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < cnt; i += 16) {\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, shift + i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", shift + i);\n \t\t\tfor (j = 0; j < 8; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, rawdata[i + j]);\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", rawdata[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, rawdata[i + j]);\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", rawdata[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\tif ((shift + cnt) < mapLen)\n-\t\t\tsprintf(extra, \"%s\\t...more (left:%d/%d)\\n\", extra, mapLen-(shift + cnt), mapLen);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t...more (left:%d/%d)\\n\", mapLen-(shift + cnt), mapLen);\n \n \t} else if (strcmp(tmp[0], \"mac\") == 0) {\n \t\tif (hal_efuse_macaddr_offset(padapter) == -1) {\n@@ -9319,12 +9321,13 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t/*\t\tRTW_INFO(\"%s: MAC address={\", __FUNCTION__); */\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\t/*\t\t\tRTW_INFO(\"%02X\", data[i]); */\n-\t\t\tsprintf(extra, \"%s%02X\", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"%02X\", data[i]);\n \t\t\tif (i != (cnts - 1)) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\":\"); */\n-\t\t\t\tsprintf(extra, \"%s:\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \":\");\n \t\t\t}\n \t\t}\n \t\t/*\t\tRTW_INFO(\"}\\n\"); */\n@@ -9382,12 +9385,13 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t/*\t\tRTW_INFO(\"%s: {VID,PID}={\", __FUNCTION__); */\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%02x\", data[i]); */\n-\t\t\tsprintf(extra, \"%s0x%02X\", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X\", data[i]);\n \t\t\tif (i != (cnts - 1)) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\",\"); */\n-\t\t\t\tsprintf(extra, \"%s,\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \",\");\n \t\t\t}\n \t\t}\n \t\t/*\t\tRTW_INFO(\"}\\n\"); */\n@@ -9415,22 +9419,22 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n \t\t/*\t\tRTW_INFO(\"OFFSET\\tVALUE(hex)\\n\"); */\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < 512; i += 16) { /* set 512 because the iwpriv's extra size have limit 0x7FF */\n \t\t\t/*\t\t\tRTW_INFO(\"0x%03x\\t\", i); */\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j = 0; j < 8; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->BTEfuseInitMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\t\"); */\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->BTEfuseInitMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\n\"); */\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\t/*\t\tRTW_INFO(\"\\n\"); */\n \t} else if (strcmp(tmp[0], \"btbmap\") == 0) {\n@@ -9444,22 +9448,22 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n \t\t/*\t\tRTW_INFO(\"OFFSET\\tVALUE(hex)\\n\"); */\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 512; i < 1024 ; i += 16) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%03x\\t\", i); */\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j = 0; j < 8; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", data[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\t\"); */\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", data[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\n\"); */\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\t/*\t\tRTW_INFO(\"\\n\"); */\n \t} else if (strcmp(tmp[0], \"btrmap\") == 0) {\n@@ -9507,51 +9511,52 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\t/*\t\tRTW_INFO(\"%s: bt efuse data={\", __FUNCTION__); */\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%02x \", data[i]); */\n-\t\t\tsprintf(extra, \"%s 0x%02X \", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%02X \", data[i]);\n \t\t}\n \t\t/*\t\tRTW_INFO(\"}\\n\"); */\n \t\tRTW_INFO(FUNC_ADPT_FMT \": BT MAC=[%s]\\n\", FUNC_ADPT_ARG(padapter), extra);\n \t} else if (strcmp(tmp[0], \"btffake\") == 0) {\n \t\t/*\t\tRTW_INFO(\"OFFSET\\tVALUE(hex)\\n\"); */\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < 512; i += 16) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%03x\\t\", i); */\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j = 0; j < 8; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\t\"); */\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\n\"); */\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\t/*\t\tRTW_INFO(\"\\n\"); */\n \t} else if (strcmp(tmp[0], \"btbfake\") == 0) {\n \t\t/*\t\tRTW_INFO(\"OFFSET\\tVALUE(hex)\\n\"); */\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 512; i < 1024; i += 16) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%03x\\t\", i); */\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j = 0; j < 8; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\t\"); */\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\n\"); */\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\t/*\t\tRTW_INFO(\"\\n\"); */\n \t} else if (strcmp(tmp[0], \"wlrfkmap\") == 0) {\n@@ -9572,18 +9577,18 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} else\n \t\t\tfk_order = 0;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < cnt; i += 16) {\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, shift + i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", shift + i);\n \t\t\tfor (j = 0; j < 8; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\tif ((shift + cnt) < mapLen)\n-\t\t\tsprintf(extra, \"%s\\t...more\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t...more\\n\");\n \n \t} else if (strcmp(tmp[0], \"wlrfkrmap\") == 0) {\n \t\tif ((tmp[1] == NULL) || (tmp[2] == NULL)) {\n@@ -9605,9 +9610,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t/*\t\tRTW_INFO(\"%s: data={\", __FUNCTION__); */\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\tRTW_INFO(\"wlrfkrmap = 0x%02x\\n\", pEfuseHal->fakeEfuseModifiedMap[addr + i]);\n-\t\t\tsprintf(extra, \"%s0x%02X \", extra, pEfuseHal->fakeEfuseModifiedMap[addr + i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", pEfuseHal->fakeEfuseModifiedMap[addr + i]);\n \t\t}\n \t} else if (strcmp(tmp[0], \"btrfkrmap\") == 0) {\n \t\tif ((tmp[1] == NULL) || (tmp[2] == NULL)) {\n@@ -9629,9 +9635,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t/*\t\tRTW_INFO(\"%s: data={\", __FUNCTION__); */\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\tRTW_INFO(\"wlrfkrmap = 0x%02x\\n\", pEfuseHal->fakeBTEfuseModifiedMap[addr + i]);\n-\t\t\tsprintf(extra, \"%s0x%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[addr + i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", pEfuseHal->fakeBTEfuseModifiedMap[addr + i]);\n \t\t}\n \t} else if (strcmp(tmp[0], \"mask\") == 0) {\n \t\t*extra = 0;\n@@ -9641,9 +9648,9 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\tif (padapter->registrypriv.bFileMaskEfuse == _TRUE)\n \t\t\t_rtw_memcpy(mask_buf, maskfileBuffer, mask_len);\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < mask_len; i++)\n-\t\t\tsprintf(extra, \"%s0x%02X\\n\", extra, mask_buf[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X\\n\", mask_buf[i]);\n \n \t} else\n \t\tsprintf(extra, \"Command not found!\");\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/ioctl_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/ioctl_mp.c\nindex b7109f9a81d1..b0c108e574b7 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/ioctl_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8188eu/os_dep/linux/ioctl_mp.c\n@@ -198,7 +198,7 @@ int rtw_mp_read_reg(struct net_device *dev,\n \t\t\tif (*pnext != '\\0') {\n \t\t\t\t/*strtout = simple_strtoul(pnext , &ptmp, 16);*/\n \t\t\t\tret = sscanf(pnext, \"%x\", &strtout);\n-\t\t\t\tsprintf(extra, \"%s %d\" , extra , strtout);\n+\t\t\t\tsprintf(extra + strlen(extra), \" %d\", strtout);\n \t\t\t} else\n \t\t\t\tbreak;\n \t\t\tpch = pnext;\n@@ -230,7 +230,7 @@ int rtw_mp_read_reg(struct net_device *dev,\n \t\t\tpnext++;\n \t\t\tif (*pnext != '\\0') {\n \t\t\t\tret = sscanf(pnext, \"%x\", &strtout);\n-\t\t\t\tsprintf(extra, \"%s %d\" , extra , strtout);\n+\t\t\t\tsprintf(extra + strlen(extra), \" %d\", strtout);\n \t\t\t} else\n \t\t\t\tbreak;\n \t\t\tpch = pnext;\n@@ -341,20 +341,23 @@ int rtw_mp_read_rf(struct net_device *dev,\n \tpch = tmp;\n \tRTW_INFO(\"pch=%s\", pch);\n \n-\twhile (*pch != '\\0') {\n-\t\tpnext = strpbrk(pch, \" \");\n-\t\tif (!pnext)\n-\t\t\tbreak;\n-\t\tpnext++;\n-\t\tif (*pnext != '\\0') {\n-\t\t\t/*strtou =simple_strtoul(pnext , &ptmp, 16);*/\n-\t\t\tret = sscanf(pnext, \"%x\", &strtou);\n-\t\t\tsprintf(extra, \"%s %d\" , extra , strtou);\n-\t\t} else\n-\t\t\tbreak;\n-\t\tpch = pnext;\n+\t{\n+\t\tsize_t extra_len = strlen(extra);\n+\t\twhile (*pch != '\\0') {\n+\t\t\tpnext = strpbrk(pch, \" \");\n+\t\t\tif (!pnext)\n+\t\t\t\tbreak;\n+\t\t\tpnext++;\n+\t\t\tif (*pnext != '\\0') {\n+\t\t\t\t/*strtou =simple_strtoul(pnext , &ptmp, 16);*/\n+\t\t\t\tret = sscanf(pnext, \"%x\", &strtou);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" %d\", strtou);\n+\t\t\t} else\n+\t\t\t\tbreak;\n+\t\t\tpch = pnext;\n+\t\t}\n+\t\twrqu->length = extra_len;\n \t}\n-\twrqu->length = strlen(extra);\n \n \treturn 0;\n }\n@@ -1417,7 +1420,7 @@ int rtw_mp_pretx_proc(PADAPTER padapter, u8 bStartTest, char *extra)\n \t\t\tpmp_priv->mode = MP_ON;\n \t\t\tsprintf(extra, \"Stop continuous Tx\");\n \t\t} else if (pmp_priv->tx.stop == 1) {\n-\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500 count=%u\\n\", extra, pmp_priv->tx.count);\n+\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500 count=%u\\n\", pmp_priv->tx.count);\n \t\t\tpmp_priv->tx.stop = 0;\n \t\t\tSetPacketTx(padapter);\n \t\t} else\n@@ -1425,26 +1428,26 @@ int rtw_mp_pretx_proc(PADAPTER padapter, u8 bStartTest, char *extra)\n \t\treturn 0;\n \tcase MP_SINGLE_TONE_TX:\n \t\tif (bStartTest != 0)\n-\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\tSetSingleToneTx(padapter, (u8)bStartTest);\n \t\tbreak;\n \tcase MP_CONTINUOUS_TX:\n \t\tif (bStartTest != 0)\n-\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\tSetContinuousTx(padapter, (u8)bStartTest);\n \t\tbreak;\n \tcase MP_CARRIER_SUPPRISSION_TX:\n \t\tif (bStartTest != 0) {\n \t\t\tif (HwRateToMPTRate(pmp_priv->rateidx) <= MPT_RATE_11M)\n-\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\t\telse\n-\t\t\t\tsprintf(extra, \"%s\\nSpecify carrier suppression but not CCK rate\", extra);\n+\t\t\t\tsprintf(extra + strlen(extra), \"\\nSpecify carrier suppression but not CCK rate\");\n \t\t}\n \t\tSetCarrierSuppressionTx(padapter, (u8)bStartTest);\n \t\tbreak;\n \tcase MP_SINGLE_CARRIER_TX:\n \t\tif (bStartTest != 0)\n-\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\tSetSingleCarrierTx(padapter, (u8)bStartTest);\n \t\tbreak;\n \n@@ -1496,6 +1499,7 @@ int rtw_mp_tx(struct net_device *dev,\n \tu32 bandwidth = 0, sg = 0, channel = 6, txpower = 40, rate = 108, ant = 0, txmode = 1, count = 0;\n \tu8 i = 0, j = 0, bStartTest = 1, status = 0, Idx = 0, tmpU1B = 0;\n \tu16 antenna = 0;\n+\tsize_t extra_len;\n \n \tif (copy_from_user(extra, wrqu->data.pointer, wrqu->data.length))\n \t\treturn -EFAULT;\n@@ -1522,13 +1526,13 @@ int rtw_mp_tx(struct net_device *dev,\n \t\treturn 0;\n \t} else if (strncmp(extra, \"setting\", 7) == 0) {\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"Current Setting :\\n Channel:%d\", pmp_priv->channel);\n-\t\tsprintf(extra, \"%s\\n Bandwidth:%d\", extra, pmp_priv->bandwidth);\n-\t\tsprintf(extra, \"%s\\n Rate index:%d\", extra, pmp_priv->rateidx);\n-\t\tsprintf(extra, \"%s\\n TxPower index:%d\", extra, pmp_priv->txpoweridx);\n-\t\tsprintf(extra, \"%s\\n Antenna TxPath:%d\", extra, pmp_priv->antenna_tx);\n-\t\tsprintf(extra, \"%s\\n Antenna RxPath:%d\", extra, pmp_priv->antenna_rx);\n-\t\tsprintf(extra, \"%s\\n MP Mode:%d\", extra, pmp_priv->mode);\n+\t\textra_len = sprintf(extra, \"Current Setting :\\n Channel:%d\", pmp_priv->channel);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n Bandwidth:%d\", pmp_priv->bandwidth);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n Rate index:%d\", pmp_priv->rateidx);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n TxPower index:%d\", pmp_priv->txpoweridx);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n Antenna TxPath:%d\", pmp_priv->antenna_tx);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n Antenna RxPath:%d\", pmp_priv->antenna_rx);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n MP Mode:%d\", pmp_priv->mode);\n \t\twrqu->data.length = strlen(extra);\n \t\treturn 0;\n #ifdef CONFIG_MP_VHT_HW_TX_MODE\n@@ -1666,25 +1670,25 @@ int rtw_mp_tx(struct net_device *dev,\n \t\tif (sscanf(extra, \"ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\", &channel, &bandwidth, &rate, &txpower, &ant, &txmode) < 6) {\n \t\t\tRTW_INFO(\"Invalid format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\tsprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n-\t\t\tsprintf(extra, \"%s\\t ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\\n\", extra, channel, bandwidth, rate, txpower, ant, txmode);\n-\t\t\tsprintf(extra, \"%s\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [ rate :\tCCK: 1 2 5.5 11M X 2 = < 2 4 11 22 >]\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [\t\tOFDM: 6 9 12 18 24 36 48 54M X 2 = < 12 18 24 36 48 72 96 108>\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [\t\tHT 1S2SS MCS0 ~ MCS15 : < [MCS0]=128 ~ [MCS7]=135 ~ [MCS15]=143 >\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [\t\tHT 3SS MCS16 ~ MCS32 : < [MCS16]=144 ~ [MCS23]=151 ~ [MCS32]=159 >\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [\t\tVHT 1SS MCS0 ~ MCS9 : < [MCS0]=160 ~ [MCS9]=169 >\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [ txpower : 1~63 power index\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [ txmode : < 0 = CONTINUOUS_TX, 1 = PACKET_TX, 2 = SINGLE_TONE_TX, 3 = CARRIER_SUPPRISSION_TX, 4 = SINGLE_CARRIER_TX>\\n\", extra);\n+\t\t\textra_len = sprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ rate :\tCCK: 1 2 5.5 11M X 2 = < 2 4 11 22 >]\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tOFDM: 6 9 12 18 24 36 48 54M X 2 = < 12 18 24 36 48 72 96 108>\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tHT 1S2SS MCS0 ~ MCS15 : < [MCS0]=128 ~ [MCS7]=135 ~ [MCS15]=143 >\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tHT 3SS MCS16 ~ MCS32 : < [MCS16]=144 ~ [MCS23]=151 ~ [MCS32]=159 >\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tVHT 1SS MCS0 ~ MCS9 : < [MCS0]=160 ~ [MCS9]=169 >\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ txpower : 1~63 power index\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ txmode : < 0 = CONTINUOUS_TX, 1 = PACKET_TX, 2 = SINGLE_TONE_TX, 3 = CARRIER_SUPPRISSION_TX, 4 = SINGLE_CARRIER_TX>\\n\");\n \t\t\twrqu->data.length = strlen(extra);\n \t\t\treturn status;\n \n \t\t} else {\n \t\t\tRTW_INFO(\"Got format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\t\tpadapter->mppriv.channel = channel;\n \t\t\tSetChannel(padapter);\n \t\t\tpHalData->current_channel = channel;\n@@ -1693,13 +1697,13 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\t\tbandwidth = CHANNEL_WIDTH_40;\n \t\t\telse if (bandwidth == 2)\n \t\t\t\tbandwidth = CHANNEL_WIDTH_80;\n-\t\t\tsprintf(extra, \"%s\\nChange Current Bandwidth %d to Bandwidth %d\", extra, padapter->mppriv.bandwidth , bandwidth);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\nChange Current Bandwidth %d to Bandwidth %d\", padapter->mppriv.bandwidth , bandwidth);\n \t\t\tpadapter->mppriv.bandwidth = (u8)bandwidth;\n \t\t\tpadapter->mppriv.preamble = sg;\n \t\t\tSetBandwidth(padapter);\n \t\t\tpHalData->current_channel_bw = bandwidth;\n \n-\t\t\tsprintf(extra, \"%s\\nSet power level :%d\", extra, txpower);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet power level :%d\", txpower);\n \t\t\tpadapter->mppriv.txpoweridx = (u8)txpower;\n \t\t\tpMptCtx->TxPwrLevel[ODM_RF_PATH_A] = (u8)txpower;\n \t\t\tpMptCtx->TxPwrLevel[ODM_RF_PATH_B] = (u8)txpower;\n@@ -1722,13 +1726,13 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\tRTW_INFO(\"%s: rate index=%d\\n\", __func__, rate);\n \t\t\tif (rate >= MPT_RATE_LAST)\n \t\t\t\treturn -EINVAL;\n-\t\t\tsprintf(extra, \"%s\\nSet data rate to %d index %d\", extra, padapter->mppriv.rateidx, rate);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet data rate to %d index %d\", padapter->mppriv.rateidx, rate);\n \n \t\t\tpadapter->mppriv.rateidx = rate;\n \t\t\tpMptCtx->mpt_rate_index = rate;\n \t\t\tSetDataRate(padapter);\n \n-\t\t\tsprintf(extra, \"%s\\nSet Antenna Path :%d\",  extra, ant);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet Antenna Path :%d\", ant);\n \t\t\tswitch (ant) {\n \t\t\tcase 1:\n \t\t\t\tantenna = ANTENNA_A;\n@@ -1805,6 +1809,7 @@ int rtw_mp_rx(struct net_device *dev,\n \t      struct iw_request_info *info,\n \t      union iwreq_data *wrqu, char *extra)\n {\n+\tsize_t extra_len;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n \tHAL_DATA_TYPE\t*pHalData\t= GET_HAL_DATA(padapter);\n \tstruct mp_priv *pmp_priv = &padapter->mppriv;\n@@ -1836,19 +1841,19 @@ int rtw_mp_rx(struct net_device *dev,\n \t} else if (sscanf(extra, \"ch=%d,bw=%d,ant=%d\", &channel, &bandwidth, &ant) < 3) {\n \t\tRTW_INFO(\"Invalid format [ch=%d,bw=%d,ant=%d]\\n\", channel, bandwidth, ant);\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n-\t\tsprintf(extra, \"%s\\t ch=%d,bw=%d,ant=%d\\n\", extra, channel, bandwidth, ant);\n-\t\tsprintf(extra, \"%s\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\", extra);\n-\t\tsprintf(extra, \"%s\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\", extra);\n-\t\tsprintf(extra, \"%s\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\", extra);\n-\t\twrqu->data.length = strlen(extra);\n+\t\textra_len = sprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\t ch=%d,bw=%d,ant=%d\\n\", channel, bandwidth, ant);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\");\n+\t\twrqu->data.length = extra_len;\n \t\treturn 0;\n \n \t} else {\n \t\tbStartRx = 1;\n \t\tRTW_INFO(\"Got format [ch=%d,bw=%d,ant=%d]\\n\", channel, bandwidth, ant);\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\tpadapter->mppriv.channel = channel;\n \t\tSetChannel(padapter);\n \t\tpHalData->current_channel = channel;\n@@ -1857,13 +1862,13 @@ int rtw_mp_rx(struct net_device *dev,\n \t\t\tbandwidth = CHANNEL_WIDTH_40;\n \t\telse if (bandwidth == 2)\n \t\t\tbandwidth = CHANNEL_WIDTH_80;\n-\t\tsprintf(extra, \"%s\\nChange Current Bandwidth %d to Bandwidth %d\", extra, padapter->mppriv.bandwidth , bandwidth);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nChange Current Bandwidth %d to Bandwidth %d\", padapter->mppriv.bandwidth , bandwidth);\n \t\tpadapter->mppriv.bandwidth = (u8)bandwidth;\n \t\tpadapter->mppriv.preamble = sg;\n \t\tSetBandwidth(padapter);\n \t\tpHalData->current_channel_bw = bandwidth;\n \n-\t\tsprintf(extra, \"%s\\nSet Antenna Path :%d\",  extra, ant);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nSet Antenna Path :%d\", ant);\n \t\tswitch (ant) {\n \t\tcase 1:\n \t\t\tantenna = ANTENNA_A;\n@@ -1914,7 +1919,7 @@ int rtw_mp_rx(struct net_device *dev,\n \t\tpHalData->antenna_tx_path = antenna;\n \t\tSetAntenna(padapter);\n \n-\t\tsprintf(extra, \"%s\\nstart Rx\", extra);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nstart Rx\");\n \t\tSetPacketRx(padapter, bStartRx, _FALSE);\n \t}\n \twrqu->data.length = strlen(extra);\n@@ -1956,6 +1961,7 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \tchar *rtw_efuse_mask_file_path;\n \tu8 Status;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n+\tsize_t extra_len;\n \n \t_rtw_memset(maskfileBuffer, 0x00, sizeof(maskfileBuffer));\n \n@@ -2006,11 +2012,11 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \t\t } while (count < 64);\n \n \t\tfor (i = 0; i < count; i++)\n-\t\t\tsprintf(extra, \"%s:%02x\", extra, maskfileBuffer[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \":%02x\", maskfileBuffer[i]);\n \n \t\tpadapter->registrypriv.bFileMaskEfuse = _TRUE;\n \n-\t\tsprintf(extra, \"%s\\nLoad Efuse Mask data %d hex ok\\n\", extra, count);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nLoad Efuse Mask data %d hex ok\\n\", count);\n \t\twrqu->data.length = strlen(extra);\n \t\treturn 0;\n \t}\n@@ -2388,16 +2394,17 @@ todo:\n \tmptbt_BtControlProcess(padapter, &BtReq);\n \n \tif (readtherm == 0) {\n-\t\tsprintf(extra, \"BT thermal=\");\n+\t\tsize_t extra_len = sprintf(extra, \"BT thermal=\");\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++) {\n \t\t\tif ((pMptCtx->mptOutBuf[i] == 0x00) && (pMptCtx->mptOutBuf[i + 1] == 0x00))\n \t\t\t\tgoto exit;\n \n-\t\t\tsprintf(extra, \"%s %d \", extra, (pMptCtx->mptOutBuf[i] & 0x1f));\n+\t\t\textra_len += sprintf(extra + extra_len, \" %d \", (pMptCtx->mptOutBuf[i] & 0x1f));\n \t\t}\n \t} else {\n+\t\tsize_t extra_len = strlen(extra);\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++)\n-\t\t\tsprintf(extra, \"%s 0x%x \", extra, pMptCtx->mptOutBuf[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%x \", pMptCtx->mptOutBuf[i]);\n \t}\n \n exit:\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8188fu/core/rtw_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8188fu/core/rtw_mp.c\nindex e1a91cf8be4a..2d0d22790a5d 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8188fu/core/rtw_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8188fu/core/rtw_mp.c\n@@ -1906,7 +1906,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n {\n \tu32 i, psd_pts=0, psd_start=0, psd_stop=0;\n \tu32 psd_data=0;\n-\n+\tsize_t data_len = 0;\n \n #ifdef PLATFORM_LINUX\n \tif (!netif_running(pAdapter->pnetdev)) {\n@@ -1938,7 +1938,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n \t\t} else {\n \t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n \t\t}\n-\t\tsprintf(data, \"%s%x \", data, psd_data);\n+\t\tdata_len += sprintf(data + data_len, \"%x \", psd_data);\n \t\ti++;\n \t}\n \ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8188fu/os_dep/linux/ioctl_linux.c b/drivers/net/wireless/rockchip_wlan/rtl8188fu/os_dep/linux/ioctl_linux.c\nindex fa829ba161f5..dbd1a64f0654 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8188fu/os_dep/linux/ioctl_linux.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8188fu/os_dep/linux/ioctl_linux.c\n@@ -9778,6 +9778,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t#ifdef CONFIG_IOL\n \tu8 org_fw_iol = padapter->registrypriv.fw_iol;// 0:Disable, 1:enable, 2:by usb speed\n \t#endif\n+\tsize_t extra_len;\n \t\n \twrqu = (struct iw_point*)wdata;\n \tpwrctrlpriv = adapter_to_pwrctl(padapter);\n@@ -9838,23 +9839,23 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t{\n \t\tmapLen = EFUSE_MAP_SIZE;\n \t\t\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < EFUSE_MAP_SIZE; i += 16)\n \t\t{\n //\t\t\tDBG_871X(\"0x%02x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, PROMContent[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", PROMContent[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, PROMContent[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", PROMContent[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra,\"%s\\n\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n@@ -9869,23 +9870,23 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < EFUSE_MAP_SIZE; i += 16)\n \t\t{\n //\t\t\tDBG_871X(\"0x%02x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra,\"%s\\n\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n@@ -9928,9 +9929,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n //\t\tDBG_871X(\"%s: data={\", __FUNCTION__);\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i=0; i<cnts; i++) {\n //\t\t\tDBG_871X(\"0x%02x \", data[i]);\n-\t\t\tsprintf(extra, \"%s0x%02X \", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", data[i]);\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n \t}\n@@ -9951,17 +9953,17 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t_rtw_memset(extra,'\\0',strlen(extra));\n \n-\t\tsprintf(extra, \"\\n0x00\\t\");\n+\t\textra_len = sprintf(extra, \"\\n0x00\\t\");\n \n \t\tfor (i = 0; i < mapLen ; i++) {\n-\t\t\tsprintf(extra, \"%s%02X\", extra, rawdata[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"%02X\", rawdata[i]);\n \t\t\tif ((i & 0xF) == 0xF) {\n-\t\t\t\tsprintf(extra, \"%s\\n\", extra);\n-\t\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i+1);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i+1);\n \t\t\t} else if ((i & 0x7) == 0x7) {\n-\t\t\t\tsprintf(extra, \"%s \\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" \\t\");\n \t\t\t} else {\n-\t\t\t\tsprintf(extra, \"%s \", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" \");\n \t\t\t}\n \t\t}\n \n@@ -9977,22 +9979,22 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \t\t_rtw_memset(extra,'\\0',strlen(extra));\n \t\t//\t\tDBG_871X(\"%s: realraw={\\n\", __FUNCTION__);\n-\t\t\t\tsprintf(extra, \"\\n0x00\\t\");\n+\t\t\t\textra_len = sprintf(extra, \"\\n0x00\\t\");\n \t\t\t\tfor (i= 512; i< mapLen; i++)\n \t\t\t\t{\n \t\t//\t\t\tDBG_871X(\"%02X\", rawdata[i]);\n-\t\t\t\t\tsprintf(extra, \"%s%02X\", extra, rawdata[i]);\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X\", rawdata[i]);\n \t\t\t\t\tif ((i & 0xF) == 0xF) {\n \t\t//\t\t\t\tDBG_871X(\"\\n\");\n-\t\t\t\t\t\tsprintf(extra, \"%s\\n\", extra);\n-\t\t\t\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i+1);\n+\t\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n+\t\t\t\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i+1);\n \t\t\t\t\t}\n \t\t\t\t\telse if ((i & 0x7) == 0x7){\n \t\t//\t\t\t\tDBG_871X(\"\\t\");\n-\t\t\t\t\t\tsprintf(extra, \"%s \\t\", extra);\n+\t\t\t\t\t\textra_len += sprintf(extra + extra_len, \" \\t\");\n \t\t\t\t\t} else {\n \t\t//\t\t\t\tDBG_871X(\" \");\n-\t\t\t\t\t\tsprintf(extra, \"%s \", extra);\n+\t\t\t\t\t\textra_len += sprintf(extra + extra_len, \" \");\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t//\t\tDBG_871X(\"}\\n\");\n@@ -10023,14 +10025,15 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n //\t\tDBG_871X(\"%s: MAC address={\", __FUNCTION__);\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i=0; i<cnts; i++)\n \t\t{\n //\t\t\tDBG_871X(\"%02X\", data[i]);\n-\t\t\tsprintf(extra, \"%s%02X\", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"%02X\", data[i]);\n \t\t\tif (i != (cnts-1))\n \t\t\t{\n //\t\t\t\tDBG_871X(\":\");\n-\t\t\t\tsprintf(extra,\"%s:\",extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \":\");\n \t\t\t}\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n@@ -10085,14 +10088,15 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n //\t\tDBG_871X(\"%s: {VID,PID}={\", __FUNCTION__);\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i=0; i<cnts; i++)\n \t\t{\n //\t\t\tDBG_871X(\"0x%02x\", data[i]);\n-\t\t\tsprintf(extra, \"%s0x%02X\", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X\", data[i]);\n \t\t\tif (i != (cnts-1))\n \t\t\t{\n //\t\t\t\tDBG_871X(\",\");\n-\t\t\t\tsprintf(extra,\"%s,\",extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \",\");\n \t\t\t}\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n@@ -10117,23 +10121,23 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=0; i<512; i+=16) // set 512 because the iwpriv's extra size have limit 0x7FF\n \t\t{\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra,\"%s\\t\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n@@ -10150,24 +10154,24 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=512; i<1024 ; i+=16)\n \t\t{\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++)\n \t\t\t{\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra,\"%s\\t\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n@@ -10209,11 +10213,12 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n \t\t*extra = 0;\n+\t\textra_len = 0;\n //\t\tDBG_871X(\"%s: bt efuse data={\", __FUNCTION__);\n \t\tfor (i=0; i<cnts; i++)\n \t\t{\n //\t\t\tDBG_871X(\"0x%02x \", data[i]);\n-\t\t\tsprintf(extra, \"%s 0x%02X \", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%02X \", data[i]);\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n \t\tDBG_871X(FUNC_ADPT_FMT \": BT MAC=[%s]\\n\", FUNC_ADPT_ARG(padapter), extra);\n@@ -10221,69 +10226,69 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \telse if (strcmp(tmp[0], \"btffake\") == 0)\n \t{\n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=0; i<512; i+=16)\n \t\t{\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n \telse if (strcmp(tmp[0],\"btbfake\") == 0)\n \t{\n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=512; i<1024; i+=16)\n \t\t{\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n \telse if (strcmp(tmp[0],\"wlrfkmap\")== 0)\n \t{\n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=0; i<EFUSE_MAP_SIZE; i+=16)\n \t\t{\n //\t\t\tDBG_871X(\"\\t0x%02x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s %02X\", extra, pEfuseHal->fakeEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" %02X\", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \n@@ -10311,9 +10316,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t\n \t\t//\t\tDBG_871X(\"%s: data={\", __FUNCTION__);\n \t\t\t*extra = 0;\n+\t\t\textra_len = 0;\n \t\t\tfor (i=0; i<cnts; i++) {\n \t\t\t\t\tDBG_871X(\"wlrfkrmap = 0x%02x \\n\", pEfuseHal->fakeEfuseModifiedMap[addr+i]);\n-\t\t\t\t\tsprintf(extra, \"%s0x%02X \", extra, pEfuseHal->fakeEfuseModifiedMap[addr+i]);\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", pEfuseHal->fakeEfuseModifiedMap[addr+i]);\n \t\t\t}\n \t}\n \telse if (strcmp(tmp[0],\"btrfkrmap\")== 0)\n@@ -10339,9 +10345,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t\n \t\t//\t\tDBG_871X(\"%s: data={\", __FUNCTION__);\n \t\t\t*extra = 0;\n+\t\t\textra_len = 0;\n \t\t\tfor (i=0; i<cnts; i++) {\n \t\t\t\t\tDBG_871X(\"wlrfkrmap = 0x%02x \\n\", pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);\n-\t\t\t\t\tsprintf(extra, \"%s0x%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);\n \t\t\t}\n \t}\n \telse\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8188fu/os_dep/linux/ioctl_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8188fu/os_dep/linux/ioctl_mp.c\nindex a3997958572a..11b61af4e8e7 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8188fu/os_dep/linux/ioctl_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8188fu/os_dep/linux/ioctl_mp.c\n@@ -198,7 +198,7 @@ int rtw_mp_read_reg(struct net_device *dev,\n \t\t\t\tif (*pnext != '\\0') {\n \t\t\t\t\t/*strtout = simple_strtoul(pnext , &ptmp, 16);*/\n \t\t\t\t\tret = sscanf(pnext, \"%x\", &strtout);\n-\t\t\t\t\tsprintf(extra, \"%s %d\" , extra , strtout);\n+\t\t\t\t\tsprintf(extra + strlen(extra), \" %d\", strtout);\n \t\t\t\t} else\n \t\t\t\t\tbreak;\n \t\t\t\tpch = pnext;\n@@ -230,7 +230,7 @@ int rtw_mp_read_reg(struct net_device *dev,\n \t\t\t\tpnext++;\n \t\t\t\tif (*pnext != '\\0') {\n \t\t\t\t\tret = sscanf(pnext, \"%x\", &strtout);\n-\t\t\t\t\tsprintf(extra, \"%s %d\" , extra , strtout);\n+\t\t\t\t\tsprintf(extra + strlen(extra), \" %d\", strtout);\n \t\t\t\t} else\n \t\t\t\t\tbreak;\n \t\t\t\tpch = pnext;\n@@ -341,20 +341,23 @@ int rtw_mp_read_rf(struct net_device *dev,\n \tpch = tmp;\n \tDBG_871X(\"pch=%s\", pch);\n \n-\twhile (*pch != '\\0') {\n-\t\tpnext = strpbrk(pch, \" \");\n-\t\tif (!pnext)\n-\t\t\tbreak;\n-\t\tpnext++;\n-\t\tif (*pnext != '\\0') {\n-\t\t\t/*strtou =simple_strtoul(pnext , &ptmp, 16);*/\n-\t\t\tret = sscanf(pnext, \"%x\", &strtou);\n-\t\t\tsprintf(extra, \"%s %d\" , extra , strtou);\n-\t\t} else\n-\t\t\tbreak;\n-\t\tpch = pnext;\n+\t{\n+\t\tsize_t extra_len = strlen(extra);\n+\t\twhile (*pch != '\\0') {\n+\t\t\tpnext = strpbrk(pch, \" \");\n+\t\t\tif (!pnext)\n+\t\t\t\tbreak;\n+\t\t\tpnext++;\n+\t\t\tif (*pnext != '\\0') {\n+\t\t\t\t/*strtou =simple_strtoul(pnext , &ptmp, 16);*/\n+\t\t\t\tret = sscanf(pnext, \"%x\", &strtou);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" %d\", strtou);\n+\t\t\t} else\n+\t\t\t\tbreak;\n+\t\t\tpch = pnext;\n+\t\t}\n+\t\twrqu->length = extra_len;\n \t}\n-\twrqu->length = strlen(extra);\n \n \treturn 0;\n }\n@@ -1383,7 +1386,7 @@ int rtw_mp_pretx_proc(PADAPTER padapter, u8 bStartTest, char *extra)\n \t\t\t\t\t\t\tpmp_priv->mode = MP_ON;\n \t\t\t\t\t\t\tsprintf(extra, \"Stop continuous Tx\");\n \t\t\t\t\t\t} else if (pmp_priv->tx.stop == 1) {\n-\t\t\t\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500 count=%u\\n\", extra, pmp_priv->tx.count);\n+\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500 count=%u\\n\", pmp_priv->tx.count);\n \t\t\t\t\t\t\tpmp_priv->tx.stop = 0;\n \t\t\t\t\t\t\tSetPacketTx(padapter);\n \t\t\t\t\t\t} else {\n@@ -1392,26 +1395,26 @@ int rtw_mp_pretx_proc(PADAPTER padapter, u8 bStartTest, char *extra)\n \t\t\t\t\t\treturn 0;\n \t\tcase MP_SINGLE_TONE_TX:\n \t\t\t\t\t\tif (bStartTest != 0)\n-\t\t\t\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\t\t\t\t\tSetSingleToneTx(padapter, (u8)bStartTest);\n \t\t\t\t\t\tbreak;\n \t\tcase MP_CONTINUOUS_TX:\n \t\t\t\t\t\tif (bStartTest != 0)\n-\t\t\t\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\t\t\t\t\tSetContinuousTx(padapter, (u8)bStartTest);\n \t\t\t\t\t\tbreak;\n \t\tcase MP_CARRIER_SUPPRISSION_TX:\n \t\t\t\t\t\tif (bStartTest != 0) {\n \t\t\t\t\t\t\tif (HwRateToMPTRate(pmp_priv->rateidx) <= MPT_RATE_11M)\n-\t\t\t\t\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\t\t\t\t\t\telse\n-\t\t\t\t\t\t\t\tsprintf(extra, \"%s\\nSpecify carrier suppression but not CCK rate\", extra);\n+\t\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nSpecify carrier suppression but not CCK rate\");\n \t\t\t\t\t\t}\n \t\t\t\t\t\tSetCarrierSuppressionTx(padapter, (u8)bStartTest);\n \t\t\t\t\t\tbreak;\n \t\tcase MP_SINGLE_CARRIER_TX:\n \t\t\t\t\tif (bStartTest != 0)\n-\t\t\t\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\t\t\t\t\tSetSingleCarrierTx(padapter, (u8)bStartTest);\n \t\t\t\t\t\tbreak;\n \n@@ -1463,6 +1466,7 @@ int rtw_mp_tx(struct net_device *dev,\n \t\tu32 bandwidth = 0, sg = 0, channel = 6, txpower = 40, rate = 108, ant = 0, txmode = 1, count = 0;\n \t\tu8 i = 0, j = 0, bStartTest = 1, status = 0, Idx = 0, tmpU1B = 0;\n \t\tu16 antenna = 0;\n+\t\tsize_t extra_len;\n \n \t\tif (copy_from_user(extra, wrqu->data.pointer, wrqu->data.length))\n \t\t\treturn -EFAULT;\n@@ -1489,14 +1493,14 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\t\treturn 0;\n \t\t} else if (strncmp(extra, \"setting\", 7) == 0) {\n \t\t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\t\tsprintf(extra, \"Current Setting :\\n Channel:%d\", pmp_priv->channel);\n-\t\t\t\tsprintf(extra, \"%s\\n Bandwidth:%d\", extra, pmp_priv->bandwidth);\n-\t\t\t\tsprintf(extra, \"%s\\n Rate index:%d\", extra, pmp_priv->rateidx);\n-\t\t\t\tsprintf(extra, \"%s\\n TxPower index:%d\", extra, pmp_priv->txpoweridx);\n-\t\t\t\tsprintf(extra, \"%s\\n Antenna TxPath:%d\", extra, pmp_priv->antenna_tx);\n-\t\t\t\tsprintf(extra, \"%s\\n Antenna RxPath:%d\", extra, pmp_priv->antenna_rx);\n-\t\t\t\tsprintf(extra, \"%s\\n MP Mode:%d\", extra, pmp_priv->mode);\n-\t\t\t\twrqu->data.length = strlen(extra);\n+\t\t\t\textra_len = sprintf(extra, \"Current Setting :\\n Channel:%d\", pmp_priv->channel);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n Bandwidth:%d\", pmp_priv->bandwidth);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n Rate index:%d\", pmp_priv->rateidx);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n TxPower index:%d\", pmp_priv->txpoweridx);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n Antenna TxPath:%d\", pmp_priv->antenna_tx);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n Antenna RxPath:%d\", pmp_priv->antenna_rx);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n MP Mode:%d\", pmp_priv->mode);\n+\t\t\t\twrqu->data.length = extra_len;\n \t\t\t\treturn 0;\n #ifdef CONFIG_MP_VHT_HW_TX_MODE\n \t\t} else if (strncmp(extra, \"pmact\", 5) == 0) {\n@@ -1633,25 +1637,25 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\tif (sscanf(extra, \"ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\", &channel, &bandwidth, &rate, &txpower, &ant, &txmode) < 6) {\n \t\t\t\t\tDBG_871X(\"Invalid format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\t\t\tsprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n-\t\t\t\t\tsprintf(extra, \"%s\\t ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\\n\", extra, channel, bandwidth, rate, txpower, ant, txmode);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ rate :\tCCK: 1 2 5.5 11M X 2 = < 2 4 11 22 >]\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [\t\tOFDM: 6 9 12 18 24 36 48 54M X 2 = < 12 18 24 36 48 72 96 108>\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [\t\tHT 1S2SS MCS0 ~ MCS15 : < [MCS0]=128 ~ [MCS7]=135 ~ [MCS15]=143 >\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [\t\tHT 3SS MCS16 ~ MCS32 : < [MCS16]=144 ~ [MCS23]=151 ~ [MCS32]=159 >\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [\t\tVHT 1SS MCS0 ~ MCS9 : < [MCS0]=160 ~ [MCS9]=169 >\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ txpower : 1~63 power index\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ txmode : < 0 = CONTINUOUS_TX, 1 = PACKET_TX, 2 = SINGLE_TONE_TX, 3 = CARRIER_SUPPRISSION_TX, 4 = SINGLE_CARRIER_TX>\\n\", extra);\n-\t\t\t\t\twrqu->data.length = strlen(extra);\n+\t\t\t\t\textra_len = sprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\t ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ rate :\tCCK: 1 2 5.5 11M X 2 = < 2 4 11 22 >]\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tOFDM: 6 9 12 18 24 36 48 54M X 2 = < 12 18 24 36 48 72 96 108>\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tHT 1S2SS MCS0 ~ MCS15 : < [MCS0]=128 ~ [MCS7]=135 ~ [MCS15]=143 >\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tHT 3SS MCS16 ~ MCS32 : < [MCS16]=144 ~ [MCS23]=151 ~ [MCS32]=159 >\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tVHT 1SS MCS0 ~ MCS9 : < [MCS0]=160 ~ [MCS9]=169 >\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ txpower : 1~63 power index\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ txmode : < 0 = CONTINUOUS_TX, 1 = PACKET_TX, 2 = SINGLE_TONE_TX, 3 = CARRIER_SUPPRISSION_TX, 4 = SINGLE_CARRIER_TX>\\n\");\n+\t\t\t\t\twrqu->data.length = extra_len;\n \t\t\t\t\treturn status;\n \n \t\t\t} else {\n \t\t\t\tDBG_871X(\"Got format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\t\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\t\t\tpadapter->mppriv.channel = channel;\n \t\t\t\tSetChannel(padapter);\n \t\t\t\tpHalData->CurrentChannel = channel;\n@@ -1660,13 +1664,13 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\t\t\tbandwidth = CHANNEL_WIDTH_40;\n \t\t\t\telse if (bandwidth == 2)\n \t\t\t\t\tbandwidth = CHANNEL_WIDTH_80;\n-\t\t\t\tsprintf(extra, \"%s\\nChange Current Bandwidth %d to Bandwidth %d\", extra, padapter->mppriv.bandwidth , bandwidth);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\nChange Current Bandwidth %d to Bandwidth %d\", padapter->mppriv.bandwidth , bandwidth);\n \t\t\t\tpadapter->mppriv.bandwidth = (u8)bandwidth;\n \t\t\t\tpadapter->mppriv.preamble = sg;\n \t\t\t\tSetBandwidth(padapter);\n \t\t\t\tpHalData->CurrentChannelBW = bandwidth;\n \n-\t\t\t\tsprintf(extra, \"%s\\nSet power level :%d\", extra, txpower);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet power level :%d\", txpower);\n \t\t\t\tpadapter->mppriv.txpoweridx = (u8)txpower;\n \t\t\t\tpMptCtx->TxPwrLevel[ODM_RF_PATH_A] = (u8)txpower;\n \t\t\t\tpMptCtx->TxPwrLevel[ODM_RF_PATH_B] = (u8)txpower;\n@@ -1689,13 +1693,13 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\t\tDBG_871X(\"%s: rate index=%d\\n\", __func__, rate);\n \t\t\t\tif (rate >= MPT_RATE_LAST)\n \t\t\t\t\treturn -EINVAL;\n-\t\t\t\tsprintf(extra, \"%s\\nSet data rate to %d index %d\", extra, padapter->mppriv.rateidx, rate);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet data rate to %d index %d\", padapter->mppriv.rateidx, rate);\n \n \t\t\t\tpadapter->mppriv.rateidx = rate;\n \t\t\t\tpMptCtx->MptRateIndex = rate;\n \t\t\t\tSetDataRate(padapter);\n \n-\t\t\t\tsprintf(extra, \"%s\\nSet Antenna Path :%d\",  extra, ant);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet Antenna Path :%d\", ant);\n \t\t\t\tswitch (ant) {\n \t\t\t\tcase 1:\n \t\t\t\t\tantenna = ANTENNA_A;\n@@ -1781,6 +1785,7 @@ int rtw_mp_rx(struct net_device *dev,\n \tu32 bandwidth = 0, sg = 0, channel = 6, ant = 0;\n \tu16 antenna = 0;\n \tu8 bStartRx = 0;\n+\tsize_t extra_len;\n \n \tif (copy_from_user(extra, wrqu->data.pointer, wrqu->data.length))\n \t\t\treturn -EFAULT;\n@@ -1804,19 +1809,19 @@ int rtw_mp_rx(struct net_device *dev,\n \t} else if (sscanf(extra, \"ch=%d,bw=%d,ant=%d\", &channel, &bandwidth, &ant) < 3) {\n \t\tDBG_871X(\"Invalid format [ch=%d,bw=%d,ant=%d]\\n\", channel, bandwidth, ant);\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n-\t\tsprintf(extra, \"%s\\t ch=%d,bw=%d,ant=%d\\n\", extra, channel, bandwidth, ant);\n-\t\tsprintf(extra, \"%s\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\", extra);\n-\t\tsprintf(extra, \"%s\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\", extra);\n-\t\tsprintf(extra, \"%s\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\", extra);\n-\t\twrqu->data.length = strlen(extra);\n+\t\textra_len = sprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\t ch=%d,bw=%d,ant=%d\\n\", channel, bandwidth, ant);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\");\n+\t\twrqu->data.length = extra_len;\n \t\treturn 0;\n \n \t} else {\n \t\tbStartRx = 1;\n \t\tDBG_871X(\"Got format [ch=%d,bw=%d,ant=%d]\\n\", channel, bandwidth, ant);\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\tpadapter->mppriv.channel = channel;\n \t\tSetChannel(padapter);\n \t\tpHalData->CurrentChannel = channel;\n@@ -1825,13 +1830,13 @@ int rtw_mp_rx(struct net_device *dev,\n \t\t\tbandwidth = CHANNEL_WIDTH_40;\n \t\telse if (bandwidth == 2)\n \t\t\tbandwidth = CHANNEL_WIDTH_80;\n-\t\tsprintf(extra, \"%s\\nChange Current Bandwidth %d to Bandwidth %d\", extra, padapter->mppriv.bandwidth , bandwidth);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nChange Current Bandwidth %d to Bandwidth %d\", padapter->mppriv.bandwidth , bandwidth);\n \t\tpadapter->mppriv.bandwidth = (u8)bandwidth;\n \t\tpadapter->mppriv.preamble = sg;\n \t\tSetBandwidth(padapter);\n \t\tpHalData->CurrentChannelBW = bandwidth;\n \n-\t\tsprintf(extra, \"%s\\nSet Antenna Path :%d\",  extra, ant);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nSet Antenna Path :%d\", ant);\n \t\tswitch (ant) {\n \t\tcase 1:\n \t\t\tantenna = ANTENNA_A;\n@@ -1882,7 +1887,7 @@ int rtw_mp_rx(struct net_device *dev,\n \t\tpHalData->AntennaTxPath = antenna;\n \t\tSetAntenna(padapter);\n \n-\t\tsprintf(extra, \"%s\\nstart Rx\", extra);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nstart Rx\");\n \t\tSetPacketRx(padapter, bStartRx, _FALSE);\n \t}\n \twrqu->data.length = strlen(extra);\n@@ -2310,16 +2315,17 @@ todo:\n \tmptbt_BtControlProcess(padapter, &BtReq);\n \n \tif (readtherm == 0) {\n-\t\tsprintf(extra, \"BT thermal=\");\n+\t\tsize_t extra_len = sprintf(extra, \"BT thermal=\");\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++) {\n \t\t\tif ((pMptCtx->mptOutBuf[i] == 0x00) && (pMptCtx->mptOutBuf[i + 1] == 0x00))\n \t\t\t\tgoto exit;\n \n-\t\t\tsprintf(extra, \"%s %d \", extra, (pMptCtx->mptOutBuf[i] & 0x1f));\n+\t\t\textra_len += sprintf(extra + extra_len, \" %d \", (pMptCtx->mptOutBuf[i] & 0x1f));\n \t\t}\n \t} else {\n+\t\tsize_t extra_len = strlen(extra);\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++)\n-\t\t\tsprintf(extra, \"%s 0x%x \", extra, pMptCtx->mptOutBuf[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%x \", pMptCtx->mptOutBuf[i]);\n \t}\n \n exit:\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8189es/core/rtw_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8189es/core/rtw_mp.c\nindex b7b7da5889e0..0fe9b0a1cdc0 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8189es/core/rtw_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8189es/core/rtw_mp.c\n@@ -1912,7 +1912,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n {\n \tu32 i, psd_pts=0, psd_start=0, psd_stop=0;\n \tu32 psd_data=0;\n-\n+\tsize_t data_len = 0;\n \n #ifdef PLATFORM_LINUX\n \tif (!netif_running(pAdapter->pnetdev)) {\n@@ -1944,7 +1944,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n \t\t} else {\n \t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n \t\t}\n-\t\tsprintf(data, \"%s%x \", data, psd_data);\n+\t\tdata_len += sprintf(data + data_len, \"%x \", psd_data);\n \t\ti++;\n \t}\n \ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8189es/os_dep/linux/ioctl_linux.c b/drivers/net/wireless/rockchip_wlan/rtl8189es/os_dep/linux/ioctl_linux.c\nindex b260fab148ea..7d1aff77979b 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8189es/os_dep/linux/ioctl_linux.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8189es/os_dep/linux/ioctl_linux.c\n@@ -9876,6 +9876,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t#ifdef CONFIG_IOL\n \tu8 org_fw_iol = padapter->registrypriv.fw_iol;// 0:Disable, 1:enable, 2:by usb speed\n \t#endif\n+\tsize_t extra_len;\n \t\n \twrqu = (struct iw_point*)wdata;\n \tpwrctrlpriv = adapter_to_pwrctl(padapter);\n@@ -9936,23 +9937,23 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t{\n \t\tmapLen = EFUSE_MAP_SIZE;\n \t\t\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < EFUSE_MAP_SIZE; i += 16)\n \t\t{\n //\t\t\tDBG_871X(\"0x%02x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, PROMContent[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", PROMContent[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, PROMContent[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", PROMContent[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra,\"%s\\n\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n@@ -9994,18 +9995,18 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} else\n \t\t\torder = 0;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < cnt; i += 16) {\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, shift + i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", shift + i);\n \t\t\tfor (j = 0; j < 8; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i+j]);\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i+j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i+j]);\n-\t\t\tsprintf(extra,\"%s\\n\",extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i+j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\tif ((shift + cnt) < mapLen)\n-\t\t\tsprintf(extra, \"%s\\t...more\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t...more\\n\");\n \t}\n \telse if (strcmp(tmp[0], \"rmap\") == 0)\n \t{\n@@ -10046,9 +10047,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n //\t\tDBG_871X(\"%s: data={\", __FUNCTION__);\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i=0; i<cnts; i++) {\n //\t\t\tDBG_871X(\"0x%02x \", data[i]);\n-\t\t\tsprintf(extra, \"%s0x%02X \", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", data[i]);\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n \t}\n@@ -10069,17 +10071,17 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t_rtw_memset(extra,'\\0',strlen(extra));\n \n-\t\t\t\tsprintf(extra, \"\\n0x00\\t\");\n+\t\t\t\textra_len = sprintf(extra, \"\\n0x00\\t\");\n \n \t\tfor (i = 0; i < mapLen ; i++) {\n-\t\t\t\t\tsprintf(extra, \"%s%02X\", extra, rawdata[i]);\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X\", rawdata[i]);\n \t\t\t\t\tif ((i & 0xF) == 0xF) {\n-\t\t\t\t\t\tsprintf(extra, \"%s\\n\", extra);\n-\t\t\t\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i+1);\n+\t\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n+\t\t\t\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i+1);\n \t\t\t} else if ((i & 0x7) == 0x7) {\n-\t\t\t\t\t\tsprintf(extra, \"%s \\t\", extra);\n+\t\t\t\t\t\textra_len += sprintf(extra + extra_len, \" \\t\");\n \t\t\t\t\t} else {\n-\t\t\t\t\t\tsprintf(extra, \"%s \", extra);\n+\t\t\t\t\t\textra_len += sprintf(extra + extra_len, \" \");\n \t\t\t\t\t}\n \t\t\t\t}\n \n@@ -10095,22 +10097,22 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \t\t_rtw_memset(extra,'\\0',strlen(extra));\n \t\t//\t\tDBG_871X(\"%s: realraw={\\n\", __FUNCTION__);\n-\t\t\t\tsprintf(extra, \"\\n0x00\\t\");\n+\t\t\t\textra_len = sprintf(extra, \"\\n0x00\\t\");\n \t\t\t\tfor (i= 512; i< mapLen; i++)\n \t\t\t\t{\n \t\t//\t\t\tDBG_871X(\"%02X\", rawdata[i]);\n-\t\t\t\t\tsprintf(extra, \"%s%02X\", extra, rawdata[i]);\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X\", rawdata[i]);\n \t\t\t\t\tif ((i & 0xF) == 0xF) {\n \t\t//\t\t\t\tDBG_871X(\"\\n\");\n-\t\t\t\t\t\tsprintf(extra, \"%s\\n\", extra);\n-\t\t\t\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i+1);\n+\t\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n+\t\t\t\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i+1);\n \t\t\t\t\t}\n \t\t\t\t\telse if ((i & 0x7) == 0x7){\n \t\t//\t\t\t\tDBG_871X(\"\\t\");\n-\t\t\t\t\t\tsprintf(extra, \"%s \\t\", extra);\n+\t\t\t\t\t\textra_len += sprintf(extra + extra_len, \" \\t\");\n \t\t\t\t\t} else {\n \t\t//\t\t\t\tDBG_871X(\" \");\n-\t\t\t\t\t\tsprintf(extra, \"%s \", extra);\n+\t\t\t\t\t\textra_len += sprintf(extra + extra_len, \" \");\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t//\t\tDBG_871X(\"}\\n\");\n@@ -10141,14 +10143,15 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n //\t\tDBG_871X(\"%s: MAC address={\", __FUNCTION__);\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i=0; i<cnts; i++)\n \t\t{\n //\t\t\tDBG_871X(\"%02X\", data[i]);\n-\t\t\tsprintf(extra, \"%s%02X\", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"%02X\", data[i]);\n \t\t\tif (i != (cnts-1))\n \t\t\t{\n //\t\t\t\tDBG_871X(\":\");\n-\t\t\t\tsprintf(extra,\"%s:\",extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \":\");\n \t\t\t}\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n@@ -10197,14 +10200,15 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n //\t\tDBG_871X(\"%s: {VID,PID}={\", __FUNCTION__);\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i=0; i<cnts; i++)\n \t\t{\n //\t\t\tDBG_871X(\"0x%02x\", data[i]);\n-\t\t\tsprintf(extra, \"%s0x%02X\", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X\", data[i]);\n \t\t\tif (i != (cnts-1))\n \t\t\t{\n //\t\t\t\tDBG_871X(\",\");\n-\t\t\t\tsprintf(extra,\"%s,\",extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \",\");\n \t\t\t}\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n@@ -10226,23 +10230,23 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=0; i<512; i+=16) // set 512 because the iwpriv's extra size have limit 0x7FF\n \t\t{\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra,\"%s\\t\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n@@ -10259,24 +10263,24 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=512; i<1024 ; i+=16)\n \t\t{\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++)\n \t\t\t{\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra,\"%s\\t\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n@@ -10318,11 +10322,12 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n \t\t*extra = 0;\n+\t\textra_len = 0;\n //\t\tDBG_871X(\"%s: bt efuse data={\", __FUNCTION__);\n \t\tfor (i=0; i<cnts; i++)\n \t\t{\n //\t\t\tDBG_871X(\"0x%02x \", data[i]);\n-\t\t\tsprintf(extra, \"%s 0x%02X \", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%02X \", data[i]);\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n \t\tDBG_871X(FUNC_ADPT_FMT \": BT MAC=[%s]\\n\", FUNC_ADPT_ARG(padapter), extra);\n@@ -10330,69 +10335,69 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \telse if (strcmp(tmp[0], \"btffake\") == 0)\n \t{\n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=0; i<512; i+=16)\n \t\t{\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n \telse if (strcmp(tmp[0],\"btbfake\") == 0)\n \t{\n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=512; i<1024; i+=16)\n \t\t{\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n \telse if (strcmp(tmp[0],\"wlrfkmap\")== 0)\n \t{\n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=0; i<EFUSE_MAP_SIZE; i+=16)\n \t\t{\n //\t\t\tDBG_871X(\"\\t0x%02x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s %02X\", extra, pEfuseHal->fakeEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" %02X\", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \n@@ -10420,9 +10425,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t\n \t\t//\t\tDBG_871X(\"%s: data={\", __FUNCTION__);\n \t\t\t*extra = 0;\n+\t\t\textra_len = 0;\n \t\t\tfor (i=0; i<cnts; i++) {\n \t\t\t\t\tDBG_871X(\"wlrfkrmap = 0x%02x \\n\", pEfuseHal->fakeEfuseModifiedMap[addr+i]);\n-\t\t\t\t\tsprintf(extra, \"%s0x%02X \", extra, pEfuseHal->fakeEfuseModifiedMap[addr+i]);\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", pEfuseHal->fakeEfuseModifiedMap[addr+i]);\n \t\t\t}\n \t}\n \telse if (strcmp(tmp[0],\"btrfkrmap\")== 0)\n@@ -10448,9 +10454,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t\n \t\t//\t\tDBG_871X(\"%s: data={\", __FUNCTION__);\n \t\t\t*extra = 0;\n+\t\t\textra_len = 0;\n \t\t\tfor (i=0; i<cnts; i++) {\n \t\t\t\t\tDBG_871X(\"wlrfkrmap = 0x%02x \\n\", pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);\n-\t\t\t\t\tsprintf(extra, \"%s0x%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);\n \t\t\t}\n \t}\n \telse\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8189es/os_dep/linux/ioctl_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8189es/os_dep/linux/ioctl_mp.c\nindex 08aa41a2525c..46442d16b0a7 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8189es/os_dep/linux/ioctl_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8189es/os_dep/linux/ioctl_mp.c\n@@ -197,7 +197,7 @@ int rtw_mp_read_reg(struct net_device *dev,\n \t\t\t\tif (*pnext != '\\0') {\n \t\t\t\t\t/*strtout = simple_strtoul(pnext , &ptmp, 16);*/\n \t\t\t\t\tret = sscanf(pnext, \"%x\", &strtout);\n-\t\t\t\t\tsprintf(extra, \"%s %d\" , extra , strtout);\n+\t\t\t\t\tsprintf(extra + strlen(extra), \" %d\", strtout);\n \t\t\t\t} else\n \t\t\t\t\tbreak;\n \t\t\t\tpch = pnext;\n@@ -229,7 +229,7 @@ int rtw_mp_read_reg(struct net_device *dev,\n \t\t\t\tpnext++;\n \t\t\t\tif (*pnext != '\\0') {\n \t\t\t\t\tret = sscanf(pnext, \"%x\", &strtout);\n-\t\t\t\t\tsprintf(extra, \"%s %d\" , extra , strtout);\n+\t\t\t\t\tsprintf(extra + strlen(extra), \" %d\", strtout);\n \t\t\t\t} else\n \t\t\t\t\tbreak;\n \t\t\t\tpch = pnext;\n@@ -340,20 +340,23 @@ int rtw_mp_read_rf(struct net_device *dev,\n \tpch = tmp;\n \tDBG_871X(\"pch=%s\", pch);\n \n-\twhile (*pch != '\\0') {\n-\t\tpnext = strpbrk(pch, \" \");\n-\t\tif (!pnext)\n-\t\t\tbreak;\n-\t\tpnext++;\n-\t\tif (*pnext != '\\0') {\n-\t\t\t/*strtou =simple_strtoul(pnext , &ptmp, 16);*/\n-\t\t\tret = sscanf(pnext, \"%x\", &strtou);\n-\t\t\tsprintf(extra, \"%s %d\" , extra , strtou);\n-\t\t} else\n-\t\t\tbreak;\n-\t\tpch = pnext;\n+\t{\n+\t\tsize_t extra_len = strlen(extra);\n+\t\twhile (*pch != '\\0') {\n+\t\t\tpnext = strpbrk(pch, \" \");\n+\t\t\tif (!pnext)\n+\t\t\t\tbreak;\n+\t\t\tpnext++;\n+\t\t\tif (*pnext != '\\0') {\n+\t\t\t\t/*strtou =simple_strtoul(pnext , &ptmp, 16);*/\n+\t\t\t\tret = sscanf(pnext, \"%x\", &strtou);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" %d\", strtou);\n+\t\t\t} else\n+\t\t\t\tbreak;\n+\t\t\tpch = pnext;\n+\t\t}\n+\t\twrqu->length = extra_len;\n \t}\n-\twrqu->length = strlen(extra);\n \n \treturn 0;\n }\n@@ -1366,7 +1369,7 @@ int rtw_mp_pretx_proc(PADAPTER padapter, u8 bStartTest, char *extra)\n \t\t\t\t\t\t\tpmp_priv->mode = MP_ON;\n \t\t\t\t\t\t\tsprintf(extra, \"Stop continuous Tx\");\n \t\t\t\t\t\t} else if (pmp_priv->tx.stop == 1) {\n-\t\t\t\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500 count=%u\\n\", extra, pmp_priv->tx.count);\n+\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500 count=%u\\n\", pmp_priv->tx.count);\n \t\t\t\t\t\t\tpmp_priv->tx.stop = 0;\n \t\t\t\t\t\t\tSetPacketTx(padapter);\n \t\t\t\t\t\t} else {\n@@ -1375,26 +1378,26 @@ int rtw_mp_pretx_proc(PADAPTER padapter, u8 bStartTest, char *extra)\n \t\t\t\t\t\treturn 0;\n \t\tcase MP_SINGLE_TONE_TX:\n \t\t\t\t\t\tif (bStartTest != 0)\n-\t\t\t\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\t\t\t\t\tSetSingleToneTx(padapter, (u8)bStartTest);\n \t\t\t\t\t\tbreak;\n \t\tcase MP_CONTINUOUS_TX:\n \t\t\t\t\t\tif (bStartTest != 0)\n-\t\t\t\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\t\t\t\t\tSetContinuousTx(padapter, (u8)bStartTest);\n \t\t\t\t\t\tbreak;\n \t\tcase MP_CARRIER_SUPPRISSION_TX:\n \t\t\t\t\t\tif (bStartTest != 0) {\n \t\t\t\t\t\t\tif (pmp_priv->rateidx <= MPT_RATE_11M)\n-\t\t\t\t\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\t\t\t\t\t\telse\n-\t\t\t\t\t\t\t\tsprintf(extra, \"%s\\nSpecify carrier suppression but not CCK rate\", extra);\n+\t\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nSpecify carrier suppression but not CCK rate\");\n \t\t\t\t\t\t}\n \t\t\t\t\t\tSetCarrierSuppressionTx(padapter, (u8)bStartTest);\n \t\t\t\t\t\tbreak;\n \t\tcase MP_SINGLE_CARRIER_TX:\n \t\t\t\t\tif (bStartTest != 0)\n-\t\t\t\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\t\t\t\t\tSetSingleCarrierTx(padapter, (u8)bStartTest);\n \t\t\t\t\t\tbreak;\n \n@@ -1445,6 +1448,7 @@ int rtw_mp_tx(struct net_device *dev,\n \t\tu32 bandwidth = 0, sg = 0, channel = 6, txpower = 40, rate = 108, ant = 0, txmode = 1, count = 0;\n \t\tu8 i = 0, j = 0, bStartTest = 1, status = 0;\n \t\tu16 antenna = 0;\n+\t\tsize_t extra_len;\n \n \t\tif (copy_from_user(extra, wrqu->data.pointer, wrqu->data.length))\n \t\t\treturn -EFAULT;\n@@ -1464,39 +1468,39 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\t\treturn 0;\n \t\t} else if (strncmp(extra, \"setting\", 5) == 0) {\n \t\t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\t\tsprintf(extra, \"Current Setting :\\n Channel:%d\", pmp_priv->channel);\n-\t\t\t\tsprintf(extra, \"%s\\n Bandwidth:%d\", extra, pmp_priv->bandwidth);\n-\t\t\t\tsprintf(extra, \"%s\\n Rate index:%d\", extra, pmp_priv->rateidx);\n-\t\t\t\tsprintf(extra, \"%s\\n TxPower index:%d\", extra, pmp_priv->txpoweridx);\n-\t\t\t\tsprintf(extra, \"%s\\n Antenna TxPath:%d\", extra, pmp_priv->antenna_tx);\n-\t\t\t\tsprintf(extra, \"%s\\n Antenna RxPath:%d\", extra, pmp_priv->antenna_rx);\n-\t\t\t\tsprintf(extra, \"%s\\n MP Mode:%d\", extra, pmp_priv->mode);\n-\t\t\t\twrqu->data.length = strlen(extra);\n+\t\t\t\textra_len = sprintf(extra, \"Current Setting :\\n Channel:%d\", pmp_priv->channel);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n Bandwidth:%d\", pmp_priv->bandwidth);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n Rate index:%d\", pmp_priv->rateidx);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n TxPower index:%d\", pmp_priv->txpoweridx);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n Antenna TxPath:%d\", pmp_priv->antenna_tx);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n Antenna RxPath:%d\", pmp_priv->antenna_rx);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n MP Mode:%d\", pmp_priv->mode);\n+\t\t\t\twrqu->data.length = extra_len;\n \t\t\t\treturn 0;\n \t\t} else {\n \n \t\t\tif (sscanf(extra, \"ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\", &channel, &bandwidth, &rate, &txpower, &ant, &txmode) < 6) {\n \t\t\t\t\tDBG_871X(\"Invalid format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\t\t\tsprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n-\t\t\t\t\tsprintf(extra, \"%s\\t ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\\n\", extra, channel, bandwidth, rate, txpower, ant, txmode);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ rate :\tCCK: 1 2 5.5 11M X 2 = < 2 4 11 22 >]\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [\t\tOFDM: 6 9 12 18 24 36 48 54M X 2 = < 12 18 24 36 48 72 96 108>\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [\t\tHT 1S2SS MCS0 ~ MCS15 : < [MCS0]=128 ~ [MCS7]=135 ~ [MCS15]=143 >\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [\t\tHT 3SS MCS16 ~ MCS32 : < [MCS16]=144 ~ [MCS23]=151 ~ [MCS32]=159 >\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [\t\tVHT 1SS MCS0 ~ MCS9 : < [MCS0]=160 ~ [MCS9]=169 >\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ txpower : 1~63 power index\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ txmode : < 0 = CONTINUOUS_TX, 1 = PACKET_TX, 2 = SINGLE_TONE_TX, 3 = CARRIER_SUPPRISSION_TX, 4 = SINGLE_CARRIER_TX>\\n\", extra);\n-\t\t\t\t\twrqu->data.length = strlen(extra);\n+\t\t\t\t\textra_len = sprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\t ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ rate :\tCCK: 1 2 5.5 11M X 2 = < 2 4 11 22 >]\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tOFDM: 6 9 12 18 24 36 48 54M X 2 = < 12 18 24 36 48 72 96 108>\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tHT 1S2SS MCS0 ~ MCS15 : < [MCS0]=128 ~ [MCS7]=135 ~ [MCS15]=143 >\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tHT 3SS MCS16 ~ MCS32 : < [MCS16]=144 ~ [MCS23]=151 ~ [MCS32]=159 >\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tVHT 1SS MCS0 ~ MCS9 : < [MCS0]=160 ~ [MCS9]=169 >\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ txpower : 1~63 power index\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ txmode : < 0 = CONTINUOUS_TX, 1 = PACKET_TX, 2 = SINGLE_TONE_TX, 3 = CARRIER_SUPPRISSION_TX, 4 = SINGLE_CARRIER_TX>\\n\");\n+\t\t\t\t\twrqu->data.length = extra_len;\n \t\t\t\t\treturn status;\n \n \t\t\t} else {\n \t\t\t\tDBG_871X(\"Got format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\t\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\t\t\tpadapter->mppriv.channel = channel;\n \t\t\t\tSetChannel(padapter);\n \t\t\t\tpHalData->CurrentChannel = channel;\n@@ -1505,13 +1509,13 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\t\t\tbandwidth = CHANNEL_WIDTH_40;\n \t\t\t\telse if (bandwidth == 2)\n \t\t\t\t\tbandwidth = CHANNEL_WIDTH_80;\n-\t\t\t\tsprintf(extra, \"%s\\nChange Current Bandwidth %d to Bandwidth %d\", extra, padapter->mppriv.bandwidth , bandwidth);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\nChange Current Bandwidth %d to Bandwidth %d\", padapter->mppriv.bandwidth , bandwidth);\n \t\t\t\tpadapter->mppriv.bandwidth = (u8)bandwidth;\n \t\t\t\tpadapter->mppriv.preamble = sg;\n \t\t\t\tSetBandwidth(padapter);\n \t\t\t\tpHalData->CurrentChannelBW = bandwidth;\n \n-\t\t\t\tsprintf(extra, \"%s\\nSet power level :%d\", extra, txpower);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet power level :%d\", txpower);\n \t\t\t\tpadapter->mppriv.txpoweridx = (u8)txpower;\n \t\t\t\tpMptCtx->TxPwrLevel[ODM_RF_PATH_A] = (u8)txpower;\n \t\t\t\tpMptCtx->TxPwrLevel[ODM_RF_PATH_B] = (u8)txpower;\n@@ -1534,13 +1538,13 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\t\tDBG_871X(\"%s: rate index=%d\\n\", __func__, rate);\n \t\t\t\tif (rate >= MPT_RATE_LAST)\n \t\t\t\t\treturn -EINVAL;\n-\t\t\t\tsprintf(extra, \"%s\\nSet data rate to %d index %d\", extra, padapter->mppriv.rateidx, rate);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet data rate to %d index %d\", padapter->mppriv.rateidx, rate);\n \n \t\t\t\tpadapter->mppriv.rateidx = rate;\n \t\t\t\tpMptCtx->MptRateIndex = rate;\n \t\t\t\tSetDataRate(padapter);\n \n-\t\t\t\tsprintf(extra, \"%s\\nSet Antenna Path :%d\",  extra, ant);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet Antenna Path :%d\", ant);\n \t\t\t\tswitch (ant) {\n \t\t\t\tcase 1:\n \t\t\t\t\tantenna = ANTENNA_A;\n@@ -1626,6 +1630,7 @@ int rtw_mp_rx(struct net_device *dev,\n \tu32 bandwidth = 0, sg = 0, channel = 6, ant = 0;\n \tu16 antenna = 0;\n \tu8 bStartRx = 0;\n+\tsize_t extra_len;\n \n \tif (copy_from_user(extra, wrqu->data.pointer, wrqu->data.length))\n \t\t\treturn -EFAULT;\n@@ -1641,19 +1646,19 @@ int rtw_mp_rx(struct net_device *dev,\n \t} else if (sscanf(extra, \"ch=%d,bw=%d,ant=%d\", &channel, &bandwidth, &ant) < 3) {\n \t\tDBG_871X(\"Invalid format [ch=%d,bw=%d,ant=%d]\\n\", channel, bandwidth, ant);\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n-\t\tsprintf(extra, \"%s\\t ch=%d,bw=%d,ant=%d\\n\", extra, channel, bandwidth, ant);\n-\t\tsprintf(extra, \"%s\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\", extra);\n-\t\tsprintf(extra, \"%s\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\", extra);\n-\t\tsprintf(extra, \"%s\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\", extra);\n-\t\twrqu->data.length = strlen(extra);\n+\t\textra_len = sprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\t ch=%d,bw=%d,ant=%d\\n\", channel, bandwidth, ant);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\");\n+\t\twrqu->data.length = extra_len;\n \t\treturn 0;\n \n \t} else {\n \t\tbStartRx = 1;\n \t\tDBG_871X(\"Got format [ch=%d,bw=%d,ant=%d]\\n\", channel, bandwidth, ant);\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\tpadapter->mppriv.channel = channel;\n \t\tSetChannel(padapter);\n \t\tpHalData->CurrentChannel = channel;\n@@ -1662,13 +1667,13 @@ int rtw_mp_rx(struct net_device *dev,\n \t\t\tbandwidth = CHANNEL_WIDTH_40;\n \t\telse if (bandwidth == 2)\n \t\t\tbandwidth = CHANNEL_WIDTH_80;\n-\t\tsprintf(extra, \"%s\\nChange Current Bandwidth %d to Bandwidth %d\", extra, padapter->mppriv.bandwidth , bandwidth);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nChange Current Bandwidth %d to Bandwidth %d\", padapter->mppriv.bandwidth , bandwidth);\n \t\tpadapter->mppriv.bandwidth = (u8)bandwidth;\n \t\tpadapter->mppriv.preamble = sg;\n \t\tSetBandwidth(padapter);\n \t\tpHalData->CurrentChannelBW = bandwidth;\n \n-\t\tsprintf(extra, \"%s\\nSet Antenna Path :%d\",  extra, ant);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nSet Antenna Path :%d\", ant);\n \t\tswitch (ant) {\n \t\tcase 1:\n \t\t\tantenna = ANTENNA_A;\n@@ -1719,7 +1724,7 @@ int rtw_mp_rx(struct net_device *dev,\n \t\tpHalData->AntennaTxPath = antenna;\n \t\tSetAntenna(padapter);\n \n-\t\tsprintf(extra, \"%s\\nstart Rx\", extra);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nstart Rx\");\n \t\tSetPacketRx(padapter, bStartRx, _FALSE);\n \t}\n \twrqu->data.length = strlen(extra);\n@@ -2147,16 +2152,17 @@ todo:\n \tmptbt_BtControlProcess(padapter, &BtReq);\n \n \tif (readtherm == 0) {\n-\t\tsprintf(extra, \"BT thermal=\");\n+\t\tsize_t extra_len = sprintf(extra, \"BT thermal=\");\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++) {\n \t\t\tif ((pMptCtx->mptOutBuf[i] == 0x00) && (pMptCtx->mptOutBuf[i + 1] == 0x00))\n \t\t\t\tgoto exit;\n \n-\t\t\tsprintf(extra, \"%s %d \", extra, (pMptCtx->mptOutBuf[i] & 0x1f));\n+\t\t\textra_len += sprintf(extra + extra_len, \" %d \", (pMptCtx->mptOutBuf[i] & 0x1f));\n \t\t}\n \t} else {\n+\t\tsize_t extra_len = strlen(extra);\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++)\n-\t\t\tsprintf(extra, \"%s 0x%x \", extra, pMptCtx->mptOutBuf[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%x \", pMptCtx->mptOutBuf[i]);\n \t}\n \n exit:\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8189fs/core/rtw_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8189fs/core/rtw_mp.c\nindex ed3b7338f3bf..9c8d4509a2df 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8189fs/core/rtw_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8189fs/core/rtw_mp.c\n@@ -2170,14 +2170,17 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n \n \tdata[0] = '\\0';\n \n-\ti = psd_start;\n-\twhile (i < psd_stop) {\n-\t\tif (i >= psd_pts)\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n-\t\telse\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n-\t\tsprintf(data, \"%s%x \", data, psd_data);\n-\t\ti++;\n+\t{\n+\t\tsize_t extra_len = strlen(data);\n+\t\ti = psd_start;\n+\t\twhile (i < psd_stop) {\n+\t\t\tif (i >= psd_pts)\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n+\t\t\telse\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n+\t\t\textra_len += sprintf(data + extra_len, \"%x \", psd_data);\n+\t\t\ti++;\n+\t\t}\n \t}\n \n #ifdef CONFIG_LONG_DELAY_ISSUE\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8189fs/os_dep/linux/ioctl_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8189fs/os_dep/linux/ioctl_mp.c\nindex 0e482ebeda72..84404cb32b48 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8189fs/os_dep/linux/ioctl_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8189fs/os_dep/linux/ioctl_mp.c\n@@ -1799,7 +1799,7 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\tchar *pextra = extra;\n \t\t\tRTW_INFO(\"Got format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\t\tpadapter->mppriv.channel = channel;\n \t\t\tSetChannel(padapter);\n \t\t\tpHalData->current_channel = channel;\n@@ -1922,6 +1922,7 @@ int rtw_mp_rx(struct net_device *dev,\n \t      struct iw_request_info *info,\n \t      union iwreq_data *wrqu, char *extra)\n {\n+\tsize_t extra_len;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n \tHAL_DATA_TYPE\t*pHalData\t= GET_HAL_DATA(padapter);\n \tstruct mp_priv *pmp_priv = &padapter->mppriv;\n@@ -1966,7 +1967,7 @@ int rtw_mp_rx(struct net_device *dev,\n \t\tbStartRx = 1;\n \t\tRTW_INFO(\"Got format [ch=%d,bw=%d,ant=%d]\\n\", channel, bandwidth, ant);\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\tpadapter->mppriv.channel = channel;\n \t\tSetChannel(padapter);\n \t\tpHalData->current_channel = channel;\n@@ -2138,6 +2139,7 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \tchar *rtw_efuse_mask_file_path;\n \tu8 Status;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n+\tsize_t extra_len;\n \n \t_rtw_memset(maskfileBuffer, 0x00, sizeof(maskfileBuffer));\n \n@@ -2189,11 +2191,11 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \t\t } while (count < 64);\n \n \t\tfor (i = 0; i < count; i++)\n-\t\t\tsprintf(extra, \"%s:%02x\", extra, maskfileBuffer[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \":%02x\", maskfileBuffer[i]);\n \n \t\tpadapter->registrypriv.bFileMaskEfuse = _TRUE;\n \n-\t\tsprintf(extra, \"%s\\nLoad Efuse Mask data %d hex ok\\n\", extra, count);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nLoad Efuse Mask data %d hex ok\\n\", count);\n \t\twrqu->data.length = strlen(extra);\n \t\treturn 0;\n \t}\n@@ -2616,16 +2618,17 @@ todo:\n \tmptbt_BtControlProcess(padapter, &BtReq);\n \n \tif (readtherm == 0) {\n-\t\tsprintf(extra, \"BT thermal=\");\n+\t\tsize_t extra_len = sprintf(extra, \"BT thermal=\");\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++) {\n \t\t\tif ((pMptCtx->mptOutBuf[i] == 0x00) && (pMptCtx->mptOutBuf[i + 1] == 0x00))\n \t\t\t\tgoto exit;\n \n-\t\t\tsprintf(extra, \"%s %d \", extra, (pMptCtx->mptOutBuf[i] & 0x1f));\n+\t\t\textra_len += sprintf(extra + extra_len, \" %d \", (pMptCtx->mptOutBuf[i] & 0x1f));\n \t\t}\n \t} else {\n+\t\tsize_t extra_len = strlen(extra);\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++)\n-\t\t\tsprintf(extra, \"%s 0x%x \", extra, pMptCtx->mptOutBuf[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%x \", pMptCtx->mptOutBuf[i]);\n \t}\n \n exit:\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8723bs/core/rtw_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8723bs/core/rtw_mp.c\nindex a16da9b60103..39384d584f38 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8723bs/core/rtw_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8723bs/core/rtw_mp.c\n@@ -2093,14 +2093,17 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n \n \tdata[0] = '\\0';\n \n-\ti = psd_start;\n-\twhile (i < psd_stop) {\n-\t\tif (i >= psd_pts)\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n-\t\telse\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n-\t\tsprintf(data, \"%s%x \", data, psd_data);\n-\t\ti++;\n+\t{\n+\t\tsize_t extra_len = strlen(data);\n+\t\ti = psd_start;\n+\t\twhile (i < psd_stop) {\n+\t\t\tif (i >= psd_pts)\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n+\t\t\telse\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n+\t\t\textra_len += sprintf(data + extra_len, \"%x \", psd_data);\n+\t\t\ti++;\n+\t\t}\n \t}\n \n #ifdef CONFIG_LONG_DELAY_ISSUE\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8723bs/os_dep/linux/ioctl_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8723bs/os_dep/linux/ioctl_mp.c\nindex ad2bb026739a..4f098330fcde 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8723bs/os_dep/linux/ioctl_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8723bs/os_dep/linux/ioctl_mp.c\n@@ -1719,7 +1719,7 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\tchar *pextra = extra;\n \t\t\tRTW_INFO(\"Got format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\t\tpadapter->mppriv.channel = channel;\n \t\t\tSetChannel(padapter);\n \t\t\tpHalData->current_channel = channel;\n@@ -1842,6 +1842,7 @@ int rtw_mp_rx(struct net_device *dev,\n \t      struct iw_request_info *info,\n \t      union iwreq_data *wrqu, char *extra)\n {\n+\tsize_t extra_len;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n \tHAL_DATA_TYPE\t*pHalData\t= GET_HAL_DATA(padapter);\n \tstruct mp_priv *pmp_priv = &padapter->mppriv;\n@@ -1886,7 +1887,7 @@ int rtw_mp_rx(struct net_device *dev,\n \t\tbStartRx = 1;\n \t\tRTW_INFO(\"Got format [ch=%d,bw=%d,ant=%d]\\n\", channel, bandwidth, ant);\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\tpadapter->mppriv.channel = channel;\n \t\tSetChannel(padapter);\n \t\tpHalData->current_channel = channel;\n@@ -2049,6 +2050,7 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \tchar *rtw_efuse_mask_file_path;\n \tu8 Status;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n+\tsize_t extra_len;\n \n \t_rtw_memset(maskfileBuffer, 0x00, sizeof(maskfileBuffer));\n \n@@ -2100,11 +2102,11 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \t\t } while (count < 64);\n \n \t\tfor (i = 0; i < count; i++)\n-\t\t\tsprintf(extra, \"%s:%02x\", extra, maskfileBuffer[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \":%02x\", maskfileBuffer[i]);\n \n \t\tpadapter->registrypriv.bFileMaskEfuse = _TRUE;\n \n-\t\tsprintf(extra, \"%s\\nLoad Efuse Mask data %d hex ok\\n\", extra, count);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nLoad Efuse Mask data %d hex ok\\n\", count);\n \t\twrqu->data.length = strlen(extra);\n \t\treturn 0;\n \t}\n@@ -2522,16 +2524,17 @@ todo:\n \tmptbt_BtControlProcess(padapter, &BtReq);\n \n \tif (readtherm == 0) {\n-\t\tsprintf(extra, \"BT thermal=\");\n+\t\tsize_t extra_len = sprintf(extra, \"BT thermal=\");\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++) {\n \t\t\tif ((pMptCtx->mptOutBuf[i] == 0x00) && (pMptCtx->mptOutBuf[i + 1] == 0x00))\n \t\t\t\tgoto exit;\n \n-\t\t\tsprintf(extra, \"%s %d \", extra, (pMptCtx->mptOutBuf[i] & 0x1f));\n+\t\t\textra_len += sprintf(extra + extra_len, \" %d \", (pMptCtx->mptOutBuf[i] & 0x1f));\n \t\t}\n \t} else {\n+\t\tsize_t extra_len = strlen(extra);\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++)\n-\t\t\tsprintf(extra, \"%s 0x%x \", extra, pMptCtx->mptOutBuf[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%x \", pMptCtx->mptOutBuf[i]);\n \t}\n \n exit:\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8723bu/core/rtw_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8723bu/core/rtw_mp.c\nindex 970ad98bb5f7..357c15ddb446 100755\n--- a/drivers/net/wireless/rockchip_wlan/rtl8723bu/core/rtw_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8723bu/core/rtw_mp.c\n@@ -1909,7 +1909,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n {\n \tu32 i, psd_pts=0, psd_start=0, psd_stop=0;\n \tu32 psd_data=0;\n-\n+\tsize_t data_len = 0;\n \n #ifdef PLATFORM_LINUX\n \tif (!netif_running(pAdapter->pnetdev)) {\n@@ -1941,7 +1941,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n \t\t} else {\n \t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n \t\t}\n-\t\tsprintf(data, \"%s%x \", data, psd_data);\n+\t\tdata_len += sprintf(data + data_len, \"%x \", psd_data);\n \t\ti++;\n \t}\n \ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8723bu/os_dep/linux/ioctl_linux.c b/drivers/net/wireless/rockchip_wlan/rtl8723bu/os_dep/linux/ioctl_linux.c\nindex 22bb5c2439b8..785cf61bfe18 100755\n--- a/drivers/net/wireless/rockchip_wlan/rtl8723bu/os_dep/linux/ioctl_linux.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8723bu/os_dep/linux/ioctl_linux.c\n@@ -9776,6 +9776,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \tu16 i=0, j=0, mapLen=0, addr=0, cnts=0;\n \tu16 max_available_len = 0, raw_cursize = 0, raw_maxsize = 0;\n \tint err;\n+\tsize_t extra_len;\n \t#ifdef CONFIG_IOL\n \tu8 org_fw_iol = padapter->registrypriv.fw_iol;// 0:Disable, 1:enable, 2:by usb speed\n \t#endif\n@@ -9839,23 +9840,23 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t{\n \t\tmapLen = EFUSE_MAP_SIZE;\n \t\t\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < EFUSE_MAP_SIZE; i += 16)\n \t\t{\n //\t\t\tDBG_871X(\"0x%02x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, PROMContent[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", PROMContent[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, PROMContent[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", PROMContent[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra,\"%s\\n\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n@@ -9870,23 +9871,23 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < EFUSE_MAP_SIZE; i += 16)\n \t\t{\n //\t\t\tDBG_871X(\"0x%02x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra,\"%s\\n\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n@@ -9929,9 +9930,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n //\t\tDBG_871X(\"%s: data={\", __FUNCTION__);\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i=0; i<cnts; i++) {\n //\t\t\tDBG_871X(\"0x%02x \", data[i]);\n-\t\t\tsprintf(extra, \"%s0x%02X \", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", data[i]);\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n \t}\n@@ -9952,17 +9954,16 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t_rtw_memset(extra,'\\0',strlen(extra));\n \n-\t\tsprintf(extra, \"\\n0x00\\t\");\n+\t\textra_len = sprintf(extra, \"\\n0x00\\t\");\n \n \t\tfor (i = 0; i < mapLen ; i++) {\n-\t\t\tsprintf(extra, \"%s%02X\", extra, rawdata[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"%02X\", rawdata[i]);\n \t\t\tif ((i & 0xF) == 0xF) {\n-\t\t\t\tsprintf(extra, \"%s\\n\", extra);\n-\t\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i+1);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n0x%02x\\t\", i+1);\n \t\t\t} else if ((i & 0x7) == 0x7) {\n-\t\t\t\tsprintf(extra, \"%s \\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" \\t\");\n \t\t\t} else {\n-\t\t\t\tsprintf(extra, \"%s \", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" \");\n \t\t\t}\n \t\t}\n \n@@ -9978,22 +9979,21 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \t\t_rtw_memset(extra,'\\0',strlen(extra));\n \t\t//\t\tDBG_871X(\"%s: realraw={\\n\", __FUNCTION__);\n-\t\t\t\tsprintf(extra, \"\\n0x00\\t\");\n+\t\t\t\textra_len = sprintf(extra, \"\\n0x00\\t\");\n \t\t\t\tfor (i= 512; i< mapLen; i++)\n \t\t\t\t{\n \t\t//\t\t\tDBG_871X(\"%02X\", rawdata[i]);\n-\t\t\t\t\tsprintf(extra, \"%s%02X\", extra, rawdata[i]);\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X\", rawdata[i]);\n \t\t\t\t\tif ((i & 0xF) == 0xF) {\n \t\t//\t\t\t\tDBG_871X(\"\\n\");\n-\t\t\t\t\t\tsprintf(extra, \"%s\\n\", extra);\n-\t\t\t\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i+1);\n+\t\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n0x%02x\\t\", i+1);\n \t\t\t\t\t}\n \t\t\t\t\telse if ((i & 0x7) == 0x7){\n \t\t//\t\t\t\tDBG_871X(\"\\t\");\n-\t\t\t\t\t\tsprintf(extra, \"%s \\t\", extra);\n+\t\t\t\t\t\textra_len += sprintf(extra + extra_len, \" \\t\");\n \t\t\t\t\t} else {\n \t\t//\t\t\t\tDBG_871X(\" \");\n-\t\t\t\t\t\tsprintf(extra, \"%s \", extra);\n+\t\t\t\t\t\textra_len += sprintf(extra + extra_len, \" \");\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t//\t\tDBG_871X(\"}\\n\");\n@@ -10024,14 +10024,15 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n //\t\tDBG_871X(\"%s: MAC address={\", __FUNCTION__);\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i=0; i<cnts; i++)\n \t\t{\n //\t\t\tDBG_871X(\"%02X\", data[i]);\n-\t\t\tsprintf(extra, \"%s%02X\", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"%02X\", data[i]);\n \t\t\tif (i != (cnts-1))\n \t\t\t{\n //\t\t\t\tDBG_871X(\":\");\n-\t\t\t\tsprintf(extra,\"%s:\",extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \":\");\n \t\t\t}\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n@@ -10086,14 +10087,15 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n //\t\tDBG_871X(\"%s: {VID,PID}={\", __FUNCTION__);\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i=0; i<cnts; i++)\n \t\t{\n //\t\t\tDBG_871X(\"0x%02x\", data[i]);\n-\t\t\tsprintf(extra, \"%s0x%02X\", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X\", data[i]);\n \t\t\tif (i != (cnts-1))\n \t\t\t{\n //\t\t\t\tDBG_871X(\",\");\n-\t\t\t\tsprintf(extra,\"%s,\",extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \",\");\n \t\t\t}\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n@@ -10118,23 +10120,23 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=0; i<512; i+=16) // set 512 because the iwpriv's extra size have limit 0x7FF\n \t\t{\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra,\"%s\\t\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n@@ -10151,24 +10153,24 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=512; i<1024 ; i+=16)\n \t\t{\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++)\n \t\t\t{\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra,\"%s\\t\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n@@ -10210,11 +10212,12 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n \t\t*extra = 0;\n+\t\textra_len = 0;\n //\t\tDBG_871X(\"%s: bt efuse data={\", __FUNCTION__);\n \t\tfor (i=0; i<cnts; i++)\n \t\t{\n //\t\t\tDBG_871X(\"0x%02x \", data[i]);\n-\t\t\tsprintf(extra, \"%s 0x%02X \", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%02X \", data[i]);\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n \t\tDBG_871X(FUNC_ADPT_FMT \": BT MAC=[%s]\\n\", FUNC_ADPT_ARG(padapter), extra);\n@@ -10222,69 +10225,69 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \telse if (strcmp(tmp[0], \"btffake\") == 0)\n \t{\n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=0; i<512; i+=16)\n \t\t{\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n \telse if (strcmp(tmp[0],\"btbfake\") == 0)\n \t{\n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=512; i<1024; i+=16)\n \t\t{\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t}\n \telse if (strcmp(tmp[0],\"wlrfkmap\")== 0)\n \t{\n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=0; i<EFUSE_MAP_SIZE; i+=16)\n \t\t{\n //\t\t\tDBG_871X(\"\\t0x%02x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s %02X\", extra, pEfuseHal->fakeEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" %02X\", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \n@@ -10312,9 +10315,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t\n \t\t//\t\tDBG_871X(\"%s: data={\", __FUNCTION__);\n \t\t\t*extra = 0;\n+\t\t\textra_len = 0;\n \t\t\tfor (i=0; i<cnts; i++) {\n \t\t\t\t\tDBG_871X(\"wlrfkrmap = 0x%02x \\n\", pEfuseHal->fakeEfuseModifiedMap[addr+i]);\n-\t\t\t\t\tsprintf(extra, \"%s0x%02X \", extra, pEfuseHal->fakeEfuseModifiedMap[addr+i]);\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", pEfuseHal->fakeEfuseModifiedMap[addr+i]);\n \t\t\t}\n \t}\n \telse if (strcmp(tmp[0],\"btrfkrmap\")== 0)\n@@ -10340,9 +10344,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t\n \t\t//\t\tDBG_871X(\"%s: data={\", __FUNCTION__);\n \t\t\t*extra = 0;\n+\t\t\textra_len = 0;\n \t\t\tfor (i=0; i<cnts; i++) {\n \t\t\t\t\tDBG_871X(\"wlrfkrmap = 0x%02x \\n\", pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);\n-\t\t\t\t\tsprintf(extra, \"%s0x%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);\n \t\t\t}\n \t}\n \telse\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8723bu/os_dep/linux/ioctl_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8723bu/os_dep/linux/ioctl_mp.c\nindex 96f1e4ee1c9e..13f7f39add77 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8723bu/os_dep/linux/ioctl_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8723bu/os_dep/linux/ioctl_mp.c\n@@ -198,7 +198,7 @@ int rtw_mp_read_reg(struct net_device *dev,\n \t\t\t\tif (*pnext != '\\0') {\n \t\t\t\t\t/*strtout = simple_strtoul(pnext , &ptmp, 16);*/\n \t\t\t\t\tret = sscanf(pnext, \"%x\", &strtout);\n-\t\t\t\t\tsprintf(extra, \"%s %d\" , extra , strtout);\n+\t\t\t\t\tsprintf(extra + strlen(extra), \" %d\", strtout);\n \t\t\t\t} else\n \t\t\t\t\tbreak;\n \t\t\t\tpch = pnext;\n@@ -230,7 +230,7 @@ int rtw_mp_read_reg(struct net_device *dev,\n \t\t\t\tpnext++;\n \t\t\t\tif (*pnext != '\\0') {\n \t\t\t\t\tret = sscanf(pnext, \"%x\", &strtout);\n-\t\t\t\t\tsprintf(extra, \"%s %d\" , extra , strtout);\n+\t\t\t\t\tsprintf(extra + strlen(extra), \" %d\", strtout);\n \t\t\t\t} else\n \t\t\t\t\tbreak;\n \t\t\t\tpch = pnext;\n@@ -341,20 +341,23 @@ int rtw_mp_read_rf(struct net_device *dev,\n \tpch = tmp;\n \tDBG_871X(\"pch=%s\", pch);\n \n-\twhile (*pch != '\\0') {\n-\t\tpnext = strpbrk(pch, \" \");\n-\t\tif (!pnext)\n-\t\t\tbreak;\n-\t\tpnext++;\n-\t\tif (*pnext != '\\0') {\n-\t\t\t/*strtou =simple_strtoul(pnext , &ptmp, 16);*/\n-\t\t\tret = sscanf(pnext, \"%x\", &strtou);\n-\t\t\tsprintf(extra, \"%s %d\" , extra , strtou);\n-\t\t} else\n-\t\t\tbreak;\n-\t\tpch = pnext;\n+\t{\n+\t\tsize_t extra_len = strlen(extra);\n+\t\twhile (*pch != '\\0') {\n+\t\t\tpnext = strpbrk(pch, \" \");\n+\t\t\tif (!pnext)\n+\t\t\t\tbreak;\n+\t\t\tpnext++;\n+\t\t\tif (*pnext != '\\0') {\n+\t\t\t\t/*strtou =simple_strtoul(pnext , &ptmp, 16);*/\n+\t\t\t\tret = sscanf(pnext, \"%x\", &strtou);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" %d\", strtou);\n+\t\t\t} else\n+\t\t\t\tbreak;\n+\t\t\tpch = pnext;\n+\t\t}\n+\t\twrqu->length = extra_len;\n \t}\n-\twrqu->length = strlen(extra);\n \n \treturn 0;\n }\n@@ -1384,7 +1387,7 @@ int rtw_mp_pretx_proc(PADAPTER padapter, u8 bStartTest, char *extra)\n \t\t\t\t\t\t\tpmp_priv->mode = MP_ON;\n \t\t\t\t\t\t\tsprintf(extra, \"Stop continuous Tx\");\n \t\t\t\t\t\t} else if (pmp_priv->tx.stop == 1) {\n-\t\t\t\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500 count=%u\\n\", extra, pmp_priv->tx.count);\n+\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500 count=%u\\n\", pmp_priv->tx.count);\n \t\t\t\t\t\t\tpmp_priv->tx.stop = 0;\n \t\t\t\t\t\t\tSetPacketTx(padapter);\n \t\t\t\t\t\t} else {\n@@ -1393,26 +1396,26 @@ int rtw_mp_pretx_proc(PADAPTER padapter, u8 bStartTest, char *extra)\n \t\t\t\t\t\treturn 0;\n \t\tcase MP_SINGLE_TONE_TX:\n \t\t\t\t\t\tif (bStartTest != 0)\n-\t\t\t\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\t\t\t\t\tSetSingleToneTx(padapter, (u8)bStartTest);\n \t\t\t\t\t\tbreak;\n \t\tcase MP_CONTINUOUS_TX:\n \t\t\t\t\t\tif (bStartTest != 0)\n-\t\t\t\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\t\t\t\t\tSetContinuousTx(padapter, (u8)bStartTest);\n \t\t\t\t\t\tbreak;\n \t\tcase MP_CARRIER_SUPPRISSION_TX:\n \t\t\t\t\t\tif (bStartTest != 0) {\n \t\t\t\t\t\t\tif (HwRateToMPTRate(pmp_priv->rateidx) <= MPT_RATE_11M)\n-\t\t\t\t\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\t\t\t\t\t\telse\n-\t\t\t\t\t\t\t\tsprintf(extra, \"%s\\nSpecify carrier suppression but not CCK rate\", extra);\n+\t\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nSpecify carrier suppression but not CCK rate\");\n \t\t\t\t\t\t}\n \t\t\t\t\t\tSetCarrierSuppressionTx(padapter, (u8)bStartTest);\n \t\t\t\t\t\tbreak;\n \t\tcase MP_SINGLE_CARRIER_TX:\n \t\t\t\t\tif (bStartTest != 0)\n-\t\t\t\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\t\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\t\t\t\t\tSetSingleCarrierTx(padapter, (u8)bStartTest);\n \t\t\t\t\t\tbreak;\n \n@@ -1464,6 +1467,7 @@ int rtw_mp_tx(struct net_device *dev,\n \t\tu32 bandwidth = 0, sg = 0, channel = 6, txpower = 40, rate = 108, ant = 0, txmode = 1, count = 0;\n \t\tu8 i = 0, j = 0, bStartTest = 1, status = 0, Idx = 0, tmpU1B = 0;\n \t\tu16 antenna = 0;\n+\t\tsize_t extra_len;\n \n \t\tif (copy_from_user(extra, wrqu->data.pointer, wrqu->data.length))\n \t\t\treturn -EFAULT;\n@@ -1490,14 +1494,14 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\t\treturn 0;\n \t\t} else if (strncmp(extra, \"setting\", 7) == 0) {\n \t\t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\t\tsprintf(extra, \"Current Setting :\\n Channel:%d\", pmp_priv->channel);\n-\t\t\t\tsprintf(extra, \"%s\\n Bandwidth:%d\", extra, pmp_priv->bandwidth);\n-\t\t\t\tsprintf(extra, \"%s\\n Rate index:%d\", extra, pmp_priv->rateidx);\n-\t\t\t\tsprintf(extra, \"%s\\n TxPower index:%d\", extra, pmp_priv->txpoweridx);\n-\t\t\t\tsprintf(extra, \"%s\\n Antenna TxPath:%d\", extra, pmp_priv->antenna_tx);\n-\t\t\t\tsprintf(extra, \"%s\\n Antenna RxPath:%d\", extra, pmp_priv->antenna_rx);\n-\t\t\t\tsprintf(extra, \"%s\\n MP Mode:%d\", extra, pmp_priv->mode);\n-\t\t\t\twrqu->data.length = strlen(extra);\n+\t\t\t\textra_len = sprintf(extra, \"Current Setting :\\n Channel:%d\", pmp_priv->channel);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n Bandwidth:%d\", pmp_priv->bandwidth);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n Rate index:%d\", pmp_priv->rateidx);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n TxPower index:%d\", pmp_priv->txpoweridx);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n Antenna TxPath:%d\", pmp_priv->antenna_tx);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n Antenna RxPath:%d\", pmp_priv->antenna_rx);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n MP Mode:%d\", pmp_priv->mode);\n+\t\t\t\twrqu->data.length = extra_len;\n \t\t\t\treturn 0;\n #ifdef CONFIG_MP_VHT_HW_TX_MODE\n \t\t} else if (strncmp(extra, \"pmact\", 5) == 0) {\n@@ -1634,25 +1638,25 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\tif (sscanf(extra, \"ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\", &channel, &bandwidth, &rate, &txpower, &ant, &txmode) < 6) {\n \t\t\t\t\tDBG_871X(\"Invalid format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\t\t\tsprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n-\t\t\t\t\tsprintf(extra, \"%s\\t ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\\n\", extra, channel, bandwidth, rate, txpower, ant, txmode);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ rate :\tCCK: 1 2 5.5 11M X 2 = < 2 4 11 22 >]\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [\t\tOFDM: 6 9 12 18 24 36 48 54M X 2 = < 12 18 24 36 48 72 96 108>\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [\t\tHT 1S2SS MCS0 ~ MCS15 : < [MCS0]=128 ~ [MCS7]=135 ~ [MCS15]=143 >\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [\t\tHT 3SS MCS16 ~ MCS32 : < [MCS16]=144 ~ [MCS23]=151 ~ [MCS32]=159 >\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [\t\tVHT 1SS MCS0 ~ MCS9 : < [MCS0]=160 ~ [MCS9]=169 >\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ txpower : 1~63 power index\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\", extra);\n-\t\t\t\t\tsprintf(extra, \"%s\\n [ txmode : < 0 = CONTINUOUS_TX, 1 = PACKET_TX, 2 = SINGLE_TONE_TX, 3 = CARRIER_SUPPRISSION_TX, 4 = SINGLE_CARRIER_TX>\\n\", extra);\n-\t\t\t\t\twrqu->data.length = strlen(extra);\n+\t\t\t\t\textra_len = sprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\t ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ rate :\tCCK: 1 2 5.5 11M X 2 = < 2 4 11 22 >]\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tOFDM: 6 9 12 18 24 36 48 54M X 2 = < 12 18 24 36 48 72 96 108>\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tHT 1S2SS MCS0 ~ MCS15 : < [MCS0]=128 ~ [MCS7]=135 ~ [MCS15]=143 >\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tHT 3SS MCS16 ~ MCS32 : < [MCS16]=144 ~ [MCS23]=151 ~ [MCS32]=159 >\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tVHT 1SS MCS0 ~ MCS9 : < [MCS0]=160 ~ [MCS9]=169 >\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ txpower : 1~63 power index\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\");\n+\t\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ txmode : < 0 = CONTINUOUS_TX, 1 = PACKET_TX, 2 = SINGLE_TONE_TX, 3 = CARRIER_SUPPRISSION_TX, 4 = SINGLE_CARRIER_TX>\\n\");\n+\t\t\t\t\twrqu->data.length = extra_len;\n \t\t\t\t\treturn status;\n \n \t\t\t} else {\n \t\t\t\tDBG_871X(\"Got format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\t\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\t\t\tpadapter->mppriv.channel = channel;\n \t\t\t\tSetChannel(padapter);\n \t\t\t\tpHalData->CurrentChannel = channel;\n@@ -1661,13 +1665,14 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\t\t\tbandwidth = CHANNEL_WIDTH_40;\n \t\t\t\telse if (bandwidth == 2)\n \t\t\t\t\tbandwidth = CHANNEL_WIDTH_80;\n-\t\t\t\tsprintf(extra, \"%s\\nChange Current Bandwidth %d to Bandwidth %d\", extra, padapter->mppriv.bandwidth , bandwidth);\n+\t\t\t\textra_len = strlen(extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\nChange Current Bandwidth %d to Bandwidth %d\", padapter->mppriv.bandwidth , bandwidth);\n \t\t\t\tpadapter->mppriv.bandwidth = (u8)bandwidth;\n \t\t\t\tpadapter->mppriv.preamble = sg;\n \t\t\t\tSetBandwidth(padapter);\n \t\t\t\tpHalData->CurrentChannelBW = bandwidth;\n \n-\t\t\t\tsprintf(extra, \"%s\\nSet power level :%d\", extra, txpower);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet power level :%d\", txpower);\n \t\t\t\tpadapter->mppriv.txpoweridx = (u8)txpower;\n \t\t\t\tpMptCtx->TxPwrLevel[ODM_RF_PATH_A] = (u8)txpower;\n \t\t\t\tpMptCtx->TxPwrLevel[ODM_RF_PATH_B] = (u8)txpower;\n@@ -1690,13 +1695,13 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\t\tDBG_871X(\"%s: rate index=%d\\n\", __func__, rate);\n \t\t\t\tif (rate >= MPT_RATE_LAST)\n \t\t\t\t\treturn -EINVAL;\n-\t\t\t\tsprintf(extra, \"%s\\nSet data rate to %d index %d\", extra, padapter->mppriv.rateidx, rate);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet data rate to %d index %d\", padapter->mppriv.rateidx, rate);\n \n \t\t\t\tpadapter->mppriv.rateidx = rate;\n \t\t\t\tpMptCtx->MptRateIndex = rate;\n \t\t\t\tSetDataRate(padapter);\n \n-\t\t\t\tsprintf(extra, \"%s\\nSet Antenna Path :%d\",  extra, ant);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet Antenna Path :%d\", ant);\n \t\t\t\tswitch (ant) {\n \t\t\t\tcase 1:\n \t\t\t\t\tantenna = ANTENNA_A;\n@@ -1782,6 +1787,7 @@ int rtw_mp_rx(struct net_device *dev,\n \tu32 bandwidth = 0, sg = 0, channel = 6, ant = 0;\n \tu16 antenna = 0;\n \tu8 bStartRx = 0;\n+\tsize_t extra_len;\n \n \tif (copy_from_user(extra, wrqu->data.pointer, wrqu->data.length))\n \t\t\treturn -EFAULT;\n@@ -1805,19 +1811,19 @@ int rtw_mp_rx(struct net_device *dev,\n \t} else if (sscanf(extra, \"ch=%d,bw=%d,ant=%d\", &channel, &bandwidth, &ant) < 3) {\n \t\tDBG_871X(\"Invalid format [ch=%d,bw=%d,ant=%d]\\n\", channel, bandwidth, ant);\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n-\t\tsprintf(extra, \"%s\\t ch=%d,bw=%d,ant=%d\\n\", extra, channel, bandwidth, ant);\n-\t\tsprintf(extra, \"%s\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\", extra);\n-\t\tsprintf(extra, \"%s\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\", extra);\n-\t\tsprintf(extra, \"%s\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\", extra);\n-\t\twrqu->data.length = strlen(extra);\n+\t\textra_len = sprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\t ch=%d,bw=%d,ant=%d\\n\", channel, bandwidth, ant);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\");\n+\t\twrqu->data.length = extra_len;\n \t\treturn 0;\n \n \t} else {\n \t\tbStartRx = 1;\n \t\tDBG_871X(\"Got format [ch=%d,bw=%d,ant=%d]\\n\", channel, bandwidth, ant);\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\textra_len += sprintf(extra + extra_len, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\tpadapter->mppriv.channel = channel;\n \t\tSetChannel(padapter);\n \t\tpHalData->CurrentChannel = channel;\n@@ -1826,13 +1832,13 @@ int rtw_mp_rx(struct net_device *dev,\n \t\t\tbandwidth = CHANNEL_WIDTH_40;\n \t\telse if (bandwidth == 2)\n \t\t\tbandwidth = CHANNEL_WIDTH_80;\n-\t\tsprintf(extra, \"%s\\nChange Current Bandwidth %d to Bandwidth %d\", extra, padapter->mppriv.bandwidth , bandwidth);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nChange Current Bandwidth %d to Bandwidth %d\", padapter->mppriv.bandwidth , bandwidth);\n \t\tpadapter->mppriv.bandwidth = (u8)bandwidth;\n \t\tpadapter->mppriv.preamble = sg;\n \t\tSetBandwidth(padapter);\n \t\tpHalData->CurrentChannelBW = bandwidth;\n \n-\t\tsprintf(extra, \"%s\\nSet Antenna Path :%d\",  extra, ant);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nSet Antenna Path :%d\", ant);\n \t\tswitch (ant) {\n \t\tcase 1:\n \t\t\tantenna = ANTENNA_A;\n@@ -1883,10 +1889,10 @@ int rtw_mp_rx(struct net_device *dev,\n \t\tpHalData->AntennaTxPath = antenna;\n \t\tSetAntenna(padapter);\n \n-\t\tsprintf(extra, \"%s\\nstart Rx\", extra);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nstart Rx\");\n \t\tSetPacketRx(padapter, bStartRx, _FALSE);\n \t}\n-\twrqu->data.length = strlen(extra);\n+\twrqu->data.length = extra_len;\n \treturn 0;\n }\n \n@@ -2014,6 +2020,7 @@ int rtw_mp_SetBT(struct net_device *dev,\n \tint testmode = 1, ready = 1, trxparam = 1, setgen = 1, getgen = 1, testctrl = 1, testbt = 1, readtherm = 1, setbtmac = 1;\n \tu32 i = 0, ii = 0, jj = 0, kk = 0, cnts = 0, status = 0;\n \tPRT_MP_FIRMWARE pBTFirmware = NULL;\n+\tsize_t extra_len;\n \n \tif (copy_from_user(extra, wrqu->data.pointer, wrqu->data.length))\n \t\treturn -EFAULT;\n@@ -2310,17 +2317,18 @@ todo:\n \n \tmptbt_BtControlProcess(padapter, &BtReq);\n \n+\textra_len = strlen(extra);\n \tif (readtherm == 0) {\n \t\tsprintf(extra, \"BT thermal=\");\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++) {\n \t\t\tif ((pMptCtx->mptOutBuf[i] == 0x00) && (pMptCtx->mptOutBuf[i + 1] == 0x00))\n \t\t\t\tgoto exit;\n \n-\t\t\tsprintf(extra, \"%s %d \", extra, (pMptCtx->mptOutBuf[i] & 0x1f));\n+\t\t\textra_len += sprintf(extra + extra_len, \" %d \", (pMptCtx->mptOutBuf[i] & 0x1f));\n \t\t}\n \t} else {\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++)\n-\t\t\tsprintf(extra, \"%s 0x%x \", extra, pMptCtx->mptOutBuf[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%x \", pMptCtx->mptOutBuf[i]);\n \t}\n \n exit:\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8723cs/core/rtw_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8723cs/core/rtw_mp.c\nindex 87ced9ab0180..a08b26f0f87f 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8723cs/core/rtw_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8723cs/core/rtw_mp.c\n@@ -2119,14 +2119,17 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n \n \tdata[0] = '\\0';\n \n-\ti = psd_start;\n-\twhile (i < psd_stop) {\n-\t\tif (i >= psd_pts)\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n-\t\telse\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n-\t\tsprintf(data, \"%s%x \", data, psd_data);\n-\t\ti++;\n+\t{\n+\t\tsize_t extra_len = strlen(data);\n+\t\ti = psd_start;\n+\t\twhile (i < psd_stop) {\n+\t\t\tif (i >= psd_pts)\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n+\t\t\telse\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n+\t\t\textra_len += sprintf(data + extra_len, \"%x \", psd_data);\n+\t\t\ti++;\n+\t\t}\n \t}\n \n #ifdef CONFIG_LONG_DELAY_ISSUE\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8723cs/os_dep/linux/ioctl_linux.c b/drivers/net/wireless/rockchip_wlan/rtl8723cs/os_dep/linux/ioctl_linux.c\nindex 268dee6f5113..0120a3aa52ad 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8723cs/os_dep/linux/ioctl_linux.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8723cs/os_dep/linux/ioctl_linux.c\n@@ -9034,6 +9034,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n #ifdef CONFIG_IOL\n \tu8 org_fw_iol = padapter->registrypriv.fw_iol;/* 0:Disable, 1:enable, 2:by usb speed */\n #endif\n+\tsize_t extra_len;\n \n \twrqu = (struct iw_point *)wdata;\n \tpwrctrlpriv = adapter_to_pwrctl(padapter);\n@@ -9105,18 +9106,18 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} else\n \t\t\tdrvmaporder = 0;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < cnt; i += 16) {\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, shift + i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", shift + i);\n \t\t\tfor (j = 0; j < 8; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\tif ((shift + cnt) < mapLen)\n-\t\t\tsprintf(extra, \"%s\\t...more (left:%d/%d)\\n\", extra, mapLen-(shift + cnt), mapLen);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t...more (left:%d/%d)\\n\", mapLen-(shift + cnt), mapLen);\n \n \t} else if (strcmp(tmp[0], \"realmap\") == 0) {\n \t\tstatic u8 order = 0;\n@@ -9155,18 +9156,18 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} else\n \t\t\torder = 0;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < cnt; i += 16) {\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, shift + i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", shift + i);\n \t\t\tfor (j = 0; j < 8; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\tif ((shift + cnt) < mapLen)\n-\t\t\tsprintf(extra, \"%s\\t...more (left:%d/%d)\\n\", extra, mapLen-(shift + cnt), mapLen);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t...more (left:%d/%d)\\n\", mapLen-(shift + cnt), mapLen);\n \t} else if (strcmp(tmp[0], \"rmap\") == 0) {\n \t\tif ((tmp[1] == NULL) || (tmp[2] == NULL)) {\n \t\t\tRTW_INFO(\"%s: rmap Fail!! Parameters error!\\n\", __FUNCTION__);\n@@ -9201,9 +9202,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t/*\t\tRTW_INFO(\"%s: data={\", __FUNCTION__); */\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%02x \", data[i]); */\n-\t\t\tsprintf(extra, \"%s0x%02X \", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", data[i]);\n \t\t}\n \t\t/*\t\tRTW_INFO(\"}\\n\"); */\n \t} else if (strcmp(tmp[0], \"realraw\") == 0) {\n@@ -9232,18 +9234,18 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} else\n \t\t\traw_order = 0;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < cnt; i += 16) {\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, shift + i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", shift + i);\n \t\t\tfor (j = 0; j < 8; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, rawdata[i + j]);\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", rawdata[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, rawdata[i + j]);\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", rawdata[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\tif ((shift + cnt) < mapLen)\n-\t\t\tsprintf(extra, \"%s\\t...more (left:%d/%d)\\n\", extra, mapLen-(shift + cnt), mapLen);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t...more (left:%d/%d)\\n\", mapLen-(shift + cnt), mapLen);\n \n \t} else if (strcmp(tmp[0], \"btrealraw\") == 0) {\n \t\tstatic u8 bt_raw_order = 0;\n@@ -9279,18 +9281,18 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} else\n \t\t\tbt_raw_order = 0;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < cnt; i += 16) {\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, shift + i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", shift + i);\n \t\t\tfor (j = 0; j < 8; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, rawdata[i + j]);\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", rawdata[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, rawdata[i + j]);\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", rawdata[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\tif ((shift + cnt) < mapLen)\n-\t\t\tsprintf(extra, \"%s\\t...more (left:%d/%d)\\n\", extra, mapLen-(shift + cnt), mapLen);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t...more (left:%d/%d)\\n\", mapLen-(shift + cnt), mapLen);\n \n \t} else if (strcmp(tmp[0], \"mac\") == 0) {\n \t\tif (hal_efuse_macaddr_offset(padapter) == -1) {\n@@ -9316,12 +9318,13 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t/*\t\tRTW_INFO(\"%s: MAC address={\", __FUNCTION__); */\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\t/*\t\t\tRTW_INFO(\"%02X\", data[i]); */\n-\t\t\tsprintf(extra, \"%s%02X\", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"%02X\", data[i]);\n \t\t\tif (i != (cnts - 1)) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\":\"); */\n-\t\t\t\tsprintf(extra, \"%s:\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \":\");\n \t\t\t}\n \t\t}\n \t\t/*\t\tRTW_INFO(\"}\\n\"); */\n@@ -9379,12 +9382,13 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t/*\t\tRTW_INFO(\"%s: {VID,PID}={\", __FUNCTION__); */\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%02x\", data[i]); */\n-\t\t\tsprintf(extra, \"%s0x%02X\", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X\", data[i]);\n \t\t\tif (i != (cnts - 1)) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\",\"); */\n-\t\t\t\tsprintf(extra, \"%s,\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \",\");\n \t\t\t}\n \t\t}\n \t\t/*\t\tRTW_INFO(\"}\\n\"); */\n@@ -9412,22 +9416,22 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n \t\t/*\t\tRTW_INFO(\"OFFSET\\tVALUE(hex)\\n\"); */\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < 512; i += 16) { /* set 512 because the iwpriv's extra size have limit 0x7FF */\n \t\t\t/*\t\t\tRTW_INFO(\"0x%03x\\t\", i); */\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j = 0; j < 8; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->BTEfuseInitMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\t\"); */\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->BTEfuseInitMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\n\"); */\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\t/*\t\tRTW_INFO(\"\\n\"); */\n \t} else if (strcmp(tmp[0], \"btbmap\") == 0) {\n@@ -9441,22 +9445,22 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n \t\t/*\t\tRTW_INFO(\"OFFSET\\tVALUE(hex)\\n\"); */\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 512; i < 1024 ; i += 16) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%03x\\t\", i); */\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j = 0; j < 8; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", data[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\t\"); */\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", data[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\n\"); */\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\t/*\t\tRTW_INFO(\"\\n\"); */\n \t} else if (strcmp(tmp[0], \"btrmap\") == 0) {\n@@ -9504,51 +9508,52 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\t/*\t\tRTW_INFO(\"%s: bt efuse data={\", __FUNCTION__); */\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%02x \", data[i]); */\n-\t\t\tsprintf(extra, \"%s 0x%02X \", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%02X \", data[i]);\n \t\t}\n \t\t/*\t\tRTW_INFO(\"}\\n\"); */\n \t\tRTW_INFO(FUNC_ADPT_FMT \": BT MAC=[%s]\\n\", FUNC_ADPT_ARG(padapter), extra);\n \t} else if (strcmp(tmp[0], \"btffake\") == 0) {\n \t\t/*\t\tRTW_INFO(\"OFFSET\\tVALUE(hex)\\n\"); */\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < 512; i += 16) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%03x\\t\", i); */\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j = 0; j < 8; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\t\"); */\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\n\"); */\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\t/*\t\tRTW_INFO(\"\\n\"); */\n \t} else if (strcmp(tmp[0], \"btbfake\") == 0) {\n \t\t/*\t\tRTW_INFO(\"OFFSET\\tVALUE(hex)\\n\"); */\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 512; i < 1024; i += 16) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%03x\\t\", i); */\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j = 0; j < 8; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\t\"); */\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\n\"); */\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\t/*\t\tRTW_INFO(\"\\n\"); */\n \t} else if (strcmp(tmp[0], \"wlrfkmap\") == 0) {\n@@ -9569,18 +9574,18 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} else\n \t\t\tfk_order = 0;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < cnt; i += 16) {\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, shift + i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", shift + i);\n \t\t\tfor (j = 0; j < 8; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\tif ((shift + cnt) < mapLen)\n-\t\t\tsprintf(extra, \"%s\\t...more\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t...more\\n\");\n \n \t} else if (strcmp(tmp[0], \"wlrfkrmap\") == 0) {\n \t\tif ((tmp[1] == NULL) || (tmp[2] == NULL)) {\n@@ -9602,9 +9607,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t/*\t\tRTW_INFO(\"%s: data={\", __FUNCTION__); */\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\tRTW_INFO(\"wlrfkrmap = 0x%02x\\n\", pEfuseHal->fakeEfuseModifiedMap[addr + i]);\n-\t\t\tsprintf(extra, \"%s0x%02X \", extra, pEfuseHal->fakeEfuseModifiedMap[addr + i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", pEfuseHal->fakeEfuseModifiedMap[addr + i]);\n \t\t}\n \t} else if (strcmp(tmp[0], \"btrfkrmap\") == 0) {\n \t\tif ((tmp[1] == NULL) || (tmp[2] == NULL)) {\n@@ -9626,9 +9632,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t/*\t\tRTW_INFO(\"%s: data={\", __FUNCTION__); */\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\tRTW_INFO(\"wlrfkrmap = 0x%02x\\n\", pEfuseHal->fakeBTEfuseModifiedMap[addr + i]);\n-\t\t\tsprintf(extra, \"%s0x%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[addr + i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", pEfuseHal->fakeBTEfuseModifiedMap[addr + i]);\n \t\t}\n \t} else if (strcmp(tmp[0], \"mask\") == 0) {\n \t\t*extra = 0;\n@@ -9638,9 +9645,9 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\tif (padapter->registrypriv.bFileMaskEfuse == _TRUE)\n \t\t\t_rtw_memcpy(mask_buf, maskfileBuffer, mask_len);\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < mask_len; i++)\n-\t\t\tsprintf(extra, \"%s0x%02X\\n\", extra, mask_buf[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X\\n\", mask_buf[i]);\n \n \t} else\n \t\tsprintf(extra, \"Command not found!\");\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8723cs/os_dep/linux/ioctl_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8723cs/os_dep/linux/ioctl_mp.c\nindex 47b48aac288c..ca2681a9077b 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8723cs/os_dep/linux/ioctl_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8723cs/os_dep/linux/ioctl_mp.c\n@@ -198,7 +198,7 @@ int rtw_mp_read_reg(struct net_device *dev,\n \t\t\tif (*pnext != '\\0') {\n \t\t\t\t/*strtout = simple_strtoul(pnext , &ptmp, 16);*/\n \t\t\t\tret = sscanf(pnext, \"%x\", &strtout);\n-\t\t\t\tsprintf(extra, \"%s %d\" , extra , strtout);\n+\t\t\t\tsprintf(extra + strlen(extra), \" %d\", strtout);\n \t\t\t} else\n \t\t\t\tbreak;\n \t\t\tpch = pnext;\n@@ -230,7 +230,7 @@ int rtw_mp_read_reg(struct net_device *dev,\n \t\t\tpnext++;\n \t\t\tif (*pnext != '\\0') {\n \t\t\t\tret = sscanf(pnext, \"%x\", &strtout);\n-\t\t\t\tsprintf(extra, \"%s %d\" , extra , strtout);\n+\t\t\t\tsprintf(extra + strlen(extra), \" %d\", strtout);\n \t\t\t} else\n \t\t\t\tbreak;\n \t\t\tpch = pnext;\n@@ -341,20 +341,23 @@ int rtw_mp_read_rf(struct net_device *dev,\n \tpch = tmp;\n \tRTW_INFO(\"pch=%s\", pch);\n \n-\twhile (*pch != '\\0') {\n-\t\tpnext = strpbrk(pch, \" \");\n-\t\tif (!pnext)\n-\t\t\tbreak;\n-\t\tpnext++;\n-\t\tif (*pnext != '\\0') {\n-\t\t\t/*strtou =simple_strtoul(pnext , &ptmp, 16);*/\n-\t\t\tret = sscanf(pnext, \"%x\", &strtou);\n-\t\t\tsprintf(extra, \"%s %d\" , extra , strtou);\n-\t\t} else\n-\t\t\tbreak;\n-\t\tpch = pnext;\n+\t{\n+\t\tsize_t extra_len = strlen(extra);\n+\t\twhile (*pch != '\\0') {\n+\t\t\tpnext = strpbrk(pch, \" \");\n+\t\t\tif (!pnext)\n+\t\t\t\tbreak;\n+\t\t\tpnext++;\n+\t\t\tif (*pnext != '\\0') {\n+\t\t\t\t/*strtou =simple_strtoul(pnext , &ptmp, 16);*/\n+\t\t\t\tret = sscanf(pnext, \"%x\", &strtou);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" %d\", strtou);\n+\t\t\t} else\n+\t\t\t\tbreak;\n+\t\t\tpch = pnext;\n+\t\t}\n+\t\twrqu->length = extra_len;\n \t}\n-\twrqu->length = strlen(extra);\n \n \treturn 0;\n }\n@@ -1417,7 +1420,7 @@ int rtw_mp_pretx_proc(PADAPTER padapter, u8 bStartTest, char *extra)\n \t\t\tpmp_priv->mode = MP_ON;\n \t\t\tsprintf(extra, \"Stop continuous Tx\");\n \t\t} else if (pmp_priv->tx.stop == 1) {\n-\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500 count=%u\\n\", extra, pmp_priv->tx.count);\n+\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500 count=%u\\n\", pmp_priv->tx.count);\n \t\t\tpmp_priv->tx.stop = 0;\n \t\t\tSetPacketTx(padapter);\n \t\t} else\n@@ -1425,26 +1428,26 @@ int rtw_mp_pretx_proc(PADAPTER padapter, u8 bStartTest, char *extra)\n \t\treturn 0;\n \tcase MP_SINGLE_TONE_TX:\n \t\tif (bStartTest != 0)\n-\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\tSetSingleToneTx(padapter, (u8)bStartTest);\n \t\tbreak;\n \tcase MP_CONTINUOUS_TX:\n \t\tif (bStartTest != 0)\n-\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\tSetContinuousTx(padapter, (u8)bStartTest);\n \t\tbreak;\n \tcase MP_CARRIER_SUPPRISSION_TX:\n \t\tif (bStartTest != 0) {\n \t\t\tif (HwRateToMPTRate(pmp_priv->rateidx) <= MPT_RATE_11M)\n-\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\t\telse\n-\t\t\t\tsprintf(extra, \"%s\\nSpecify carrier suppression but not CCK rate\", extra);\n+\t\t\t\tsprintf(extra + strlen(extra), \"\\nSpecify carrier suppression but not CCK rate\");\n \t\t}\n \t\tSetCarrierSuppressionTx(padapter, (u8)bStartTest);\n \t\tbreak;\n \tcase MP_SINGLE_CARRIER_TX:\n \t\tif (bStartTest != 0)\n-\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\tSetSingleCarrierTx(padapter, (u8)bStartTest);\n \t\tbreak;\n \n@@ -1496,6 +1499,7 @@ int rtw_mp_tx(struct net_device *dev,\n \tu32 bandwidth = 0, sg = 0, channel = 6, txpower = 40, rate = 108, ant = 0, txmode = 1, count = 0;\n \tu8 i = 0, j = 0, bStartTest = 1, status = 0, Idx = 0, tmpU1B = 0;\n \tu16 antenna = 0;\n+\tsize_t extra_len;\n \n \tif (copy_from_user(extra, wrqu->data.pointer, wrqu->data.length))\n \t\treturn -EFAULT;\n@@ -1522,13 +1526,13 @@ int rtw_mp_tx(struct net_device *dev,\n \t\treturn 0;\n \t} else if (strncmp(extra, \"setting\", 7) == 0) {\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"Current Setting :\\n Channel:%d\", pmp_priv->channel);\n-\t\tsprintf(extra, \"%s\\n Bandwidth:%d\", extra, pmp_priv->bandwidth);\n-\t\tsprintf(extra, \"%s\\n Rate index:%d\", extra, pmp_priv->rateidx);\n-\t\tsprintf(extra, \"%s\\n TxPower index:%d\", extra, pmp_priv->txpoweridx);\n-\t\tsprintf(extra, \"%s\\n Antenna TxPath:%d\", extra, pmp_priv->antenna_tx);\n-\t\tsprintf(extra, \"%s\\n Antenna RxPath:%d\", extra, pmp_priv->antenna_rx);\n-\t\tsprintf(extra, \"%s\\n MP Mode:%d\", extra, pmp_priv->mode);\n+\t\textra_len = sprintf(extra, \"Current Setting :\\n Channel:%d\", pmp_priv->channel);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n Bandwidth:%d\", pmp_priv->bandwidth);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n Rate index:%d\", pmp_priv->rateidx);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n TxPower index:%d\", pmp_priv->txpoweridx);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n Antenna TxPath:%d\", pmp_priv->antenna_tx);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n Antenna RxPath:%d\", pmp_priv->antenna_rx);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n MP Mode:%d\", pmp_priv->mode);\n \t\twrqu->data.length = strlen(extra);\n \t\treturn 0;\n #ifdef CONFIG_MP_VHT_HW_TX_MODE\n@@ -1666,25 +1670,25 @@ int rtw_mp_tx(struct net_device *dev,\n \t\tif (sscanf(extra, \"ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\", &channel, &bandwidth, &rate, &txpower, &ant, &txmode) < 6) {\n \t\t\tRTW_INFO(\"Invalid format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\tsprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n-\t\t\tsprintf(extra, \"%s\\t ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\\n\", extra, channel, bandwidth, rate, txpower, ant, txmode);\n-\t\t\tsprintf(extra, \"%s\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [ rate :\tCCK: 1 2 5.5 11M X 2 = < 2 4 11 22 >]\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [\t\tOFDM: 6 9 12 18 24 36 48 54M X 2 = < 12 18 24 36 48 72 96 108>\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [\t\tHT 1S2SS MCS0 ~ MCS15 : < [MCS0]=128 ~ [MCS7]=135 ~ [MCS15]=143 >\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [\t\tHT 3SS MCS16 ~ MCS32 : < [MCS16]=144 ~ [MCS23]=151 ~ [MCS32]=159 >\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [\t\tVHT 1SS MCS0 ~ MCS9 : < [MCS0]=160 ~ [MCS9]=169 >\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [ txpower : 1~63 power index\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [ txmode : < 0 = CONTINUOUS_TX, 1 = PACKET_TX, 2 = SINGLE_TONE_TX, 3 = CARRIER_SUPPRISSION_TX, 4 = SINGLE_CARRIER_TX>\\n\", extra);\n+\t\t\textra_len = sprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ rate :\tCCK: 1 2 5.5 11M X 2 = < 2 4 11 22 >]\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tOFDM: 6 9 12 18 24 36 48 54M X 2 = < 12 18 24 36 48 72 96 108>\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tHT 1S2SS MCS0 ~ MCS15 : < [MCS0]=128 ~ [MCS7]=135 ~ [MCS15]=143 >\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tHT 3SS MCS16 ~ MCS32 : < [MCS16]=144 ~ [MCS23]=151 ~ [MCS32]=159 >\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tVHT 1SS MCS0 ~ MCS9 : < [MCS0]=160 ~ [MCS9]=169 >\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ txpower : 1~63 power index\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ txmode : < 0 = CONTINUOUS_TX, 1 = PACKET_TX, 2 = SINGLE_TONE_TX, 3 = CARRIER_SUPPRISSION_TX, 4 = SINGLE_CARRIER_TX>\\n\");\n \t\t\twrqu->data.length = strlen(extra);\n \t\t\treturn status;\n \n \t\t} else {\n \t\t\tRTW_INFO(\"Got format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\t\tpadapter->mppriv.channel = channel;\n \t\t\tSetChannel(padapter);\n \t\t\tpHalData->current_channel = channel;\n@@ -1693,13 +1697,13 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\t\tbandwidth = CHANNEL_WIDTH_40;\n \t\t\telse if (bandwidth == 2)\n \t\t\t\tbandwidth = CHANNEL_WIDTH_80;\n-\t\t\tsprintf(extra, \"%s\\nChange Current Bandwidth %d to Bandwidth %d\", extra, padapter->mppriv.bandwidth , bandwidth);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\nChange Current Bandwidth %d to Bandwidth %d\", padapter->mppriv.bandwidth , bandwidth);\n \t\t\tpadapter->mppriv.bandwidth = (u8)bandwidth;\n \t\t\tpadapter->mppriv.preamble = sg;\n \t\t\tSetBandwidth(padapter);\n \t\t\tpHalData->current_channel_bw = bandwidth;\n \n-\t\t\tsprintf(extra, \"%s\\nSet power level :%d\", extra, txpower);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet power level :%d\", txpower);\n \t\t\tpadapter->mppriv.txpoweridx = (u8)txpower;\n \t\t\tpMptCtx->TxPwrLevel[ODM_RF_PATH_A] = (u8)txpower;\n \t\t\tpMptCtx->TxPwrLevel[ODM_RF_PATH_B] = (u8)txpower;\n@@ -1722,13 +1726,13 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\tRTW_INFO(\"%s: rate index=%d\\n\", __func__, rate);\n \t\t\tif (rate >= MPT_RATE_LAST)\n \t\t\t\treturn -EINVAL;\n-\t\t\tsprintf(extra, \"%s\\nSet data rate to %d index %d\", extra, padapter->mppriv.rateidx, rate);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet data rate to %d index %d\", padapter->mppriv.rateidx, rate);\n \n \t\t\tpadapter->mppriv.rateidx = rate;\n \t\t\tpMptCtx->mpt_rate_index = rate;\n \t\t\tSetDataRate(padapter);\n \n-\t\t\tsprintf(extra, \"%s\\nSet Antenna Path :%d\",  extra, ant);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet Antenna Path :%d\", ant);\n \t\t\tswitch (ant) {\n \t\t\tcase 1:\n \t\t\t\tantenna = ANTENNA_A;\n@@ -1805,6 +1809,7 @@ int rtw_mp_rx(struct net_device *dev,\n \t      struct iw_request_info *info,\n \t      union iwreq_data *wrqu, char *extra)\n {\n+\tsize_t extra_len;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n \tHAL_DATA_TYPE\t*pHalData\t= GET_HAL_DATA(padapter);\n \tstruct mp_priv *pmp_priv = &padapter->mppriv;\n@@ -1836,19 +1841,19 @@ int rtw_mp_rx(struct net_device *dev,\n \t} else if (sscanf(extra, \"ch=%d,bw=%d,ant=%d\", &channel, &bandwidth, &ant) < 3) {\n \t\tRTW_INFO(\"Invalid format [ch=%d,bw=%d,ant=%d]\\n\", channel, bandwidth, ant);\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n-\t\tsprintf(extra, \"%s\\t ch=%d,bw=%d,ant=%d\\n\", extra, channel, bandwidth, ant);\n-\t\tsprintf(extra, \"%s\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\", extra);\n-\t\tsprintf(extra, \"%s\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\", extra);\n-\t\tsprintf(extra, \"%s\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\", extra);\n-\t\twrqu->data.length = strlen(extra);\n+\t\textra_len = sprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\t ch=%d,bw=%d,ant=%d\\n\", channel, bandwidth, ant);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\");\n+\t\twrqu->data.length = extra_len;\n \t\treturn 0;\n \n \t} else {\n \t\tbStartRx = 1;\n \t\tRTW_INFO(\"Got format [ch=%d,bw=%d,ant=%d]\\n\", channel, bandwidth, ant);\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\tpadapter->mppriv.channel = channel;\n \t\tSetChannel(padapter);\n \t\tpHalData->current_channel = channel;\n@@ -1857,13 +1862,13 @@ int rtw_mp_rx(struct net_device *dev,\n \t\t\tbandwidth = CHANNEL_WIDTH_40;\n \t\telse if (bandwidth == 2)\n \t\t\tbandwidth = CHANNEL_WIDTH_80;\n-\t\tsprintf(extra, \"%s\\nChange Current Bandwidth %d to Bandwidth %d\", extra, padapter->mppriv.bandwidth , bandwidth);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nChange Current Bandwidth %d to Bandwidth %d\", padapter->mppriv.bandwidth , bandwidth);\n \t\tpadapter->mppriv.bandwidth = (u8)bandwidth;\n \t\tpadapter->mppriv.preamble = sg;\n \t\tSetBandwidth(padapter);\n \t\tpHalData->current_channel_bw = bandwidth;\n \n-\t\tsprintf(extra, \"%s\\nSet Antenna Path :%d\",  extra, ant);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nSet Antenna Path :%d\", ant);\n \t\tswitch (ant) {\n \t\tcase 1:\n \t\t\tantenna = ANTENNA_A;\n@@ -1914,7 +1919,7 @@ int rtw_mp_rx(struct net_device *dev,\n \t\tpHalData->antenna_tx_path = antenna;\n \t\tSetAntenna(padapter);\n \n-\t\tsprintf(extra, \"%s\\nstart Rx\", extra);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nstart Rx\");\n \t\tSetPacketRx(padapter, bStartRx, _FALSE);\n \t}\n \twrqu->data.length = strlen(extra);\n@@ -1956,6 +1961,7 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \tchar *rtw_efuse_mask_file_path;\n \tu8 Status;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n+\tsize_t extra_len;\n \n \t_rtw_memset(maskfileBuffer, 0x00, sizeof(maskfileBuffer));\n \n@@ -2006,11 +2012,11 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \t\t } while (count < 64);\n \n \t\tfor (i = 0; i < count; i++)\n-\t\t\tsprintf(extra, \"%s:%02x\", extra, maskfileBuffer[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \":%02x\", maskfileBuffer[i]);\n \n \t\tpadapter->registrypriv.bFileMaskEfuse = _TRUE;\n \n-\t\tsprintf(extra, \"%s\\nLoad Efuse Mask data %d hex ok\\n\", extra, count);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nLoad Efuse Mask data %d hex ok\\n\", count);\n \t\twrqu->data.length = strlen(extra);\n \t\treturn 0;\n \t}\n@@ -2388,16 +2394,17 @@ todo:\n \tmptbt_BtControlProcess(padapter, &BtReq);\n \n \tif (readtherm == 0) {\n-\t\tsprintf(extra, \"BT thermal=\");\n+\t\tsize_t extra_len = sprintf(extra, \"BT thermal=\");\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++) {\n \t\t\tif ((pMptCtx->mptOutBuf[i] == 0x00) && (pMptCtx->mptOutBuf[i + 1] == 0x00))\n \t\t\t\tgoto exit;\n \n-\t\t\tsprintf(extra, \"%s %d \", extra, (pMptCtx->mptOutBuf[i] & 0x1f));\n+\t\t\textra_len += sprintf(extra + extra_len, \" %d \", (pMptCtx->mptOutBuf[i] & 0x1f));\n \t\t}\n \t} else {\n+\t\tsize_t extra_len = strlen(extra);\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++)\n-\t\t\tsprintf(extra, \"%s 0x%x \", extra, pMptCtx->mptOutBuf[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%x \", pMptCtx->mptOutBuf[i]);\n \t}\n \n exit:\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8723ds/core/rtw_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8723ds/core/rtw_mp.c\nindex 548a293b73ff..3c48e1f674dc 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8723ds/core/rtw_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8723ds/core/rtw_mp.c\n@@ -2444,14 +2444,17 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n \n \tdata[0] = '\\0';\n \n-\ti = psd_start;\n-\twhile (i < psd_stop) {\n-\t\tif (i >= psd_pts)\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n-\t\telse\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n-\t\tsprintf(data, \"%s%x \", data, psd_data);\n-\t\ti++;\n+\t{\n+\t\tsize_t extra_len = strlen(data);\n+\t\ti = psd_start;\n+\t\twhile (i < psd_stop) {\n+\t\t\tif (i >= psd_pts)\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n+\t\t\telse\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n+\t\t\textra_len += sprintf(data + extra_len, \"%x \", psd_data);\n+\t\t\ti++;\n+\t\t}\n \t}\n \n #ifdef CONFIG_LONG_DELAY_ISSUE\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8723ds/os_dep/linux/ioctl_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8723ds/os_dep/linux/ioctl_mp.c\nindex afd10ab97fd8..9fa849e32212 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8723ds/os_dep/linux/ioctl_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8723ds/os_dep/linux/ioctl_mp.c\n@@ -551,6 +551,7 @@ int rtw_mp_txpower_index(struct net_device *dev,\n \tchar input[wrqu->length + 1];\n \tu32 rfpath;\n \tu32 txpower_inx;\n+\tsize_t extra_len;\n \n \tif (wrqu->length > 128)\n \t\treturn -EFAULT;\n@@ -571,15 +572,15 @@ int rtw_mp_txpower_index(struct net_device *dev,\n \t\tsprintf(extra, \"patha=%d\", txpower_inx);\n \t\tif (phal_data->rf_type > RF_1T2R) {\n \t\t\ttxpower_inx = mpt_ProQueryCalTxPower(padapter, 1);\n-\t\t\tsprintf(extra, \"%s,pathb=%d\", extra, txpower_inx);\n+\t\t\textra_len += sprintf(extra + extra_len, \",pathb=%d\", txpower_inx);\n \t\t}\n \t\tif (phal_data->rf_type > RF_2T4R) {\n \t\t\ttxpower_inx = mpt_ProQueryCalTxPower(padapter, 2);\n-\t\t\tsprintf(extra, \"%s,pathc=%d\", extra, txpower_inx);\n+\t\t\textra_len += sprintf(extra + extra_len, \",pathc=%d\", txpower_inx);\n \t\t}\n \t\tif (phal_data->rf_type > RF_3T4R) {\n \t\t\ttxpower_inx = mpt_ProQueryCalTxPower(padapter, 3);\n-\t\t\tsprintf(extra, \"%s,pathd=%d\", extra, txpower_inx);\n+\t\t\textra_len += sprintf(extra + extra_len, \",pathd=%d\", txpower_inx);\n \t\t}\n \t}\n \twrqu->length = strlen(extra);\n@@ -1821,7 +1822,7 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\tchar *pextra = extra;\n \t\t\tRTW_INFO(\"Got format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\t\tpadapter->mppriv.channel = channel;\n \t\t\tSetChannel(padapter);\n \t\t\tpHalData->current_channel = channel;\n@@ -1944,6 +1945,7 @@ int rtw_mp_rx(struct net_device *dev,\n \t      struct iw_request_info *info,\n \t      union iwreq_data *wrqu, char *extra)\n {\n+\tsize_t extra_len;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n \tHAL_DATA_TYPE\t*pHalData\t= GET_HAL_DATA(padapter);\n \tstruct mp_priv *pmp_priv = &padapter->mppriv;\n@@ -1987,7 +1989,7 @@ int rtw_mp_rx(struct net_device *dev,\n \t\tbStartRx = 1;\n \t\tRTW_INFO(\"Got format [ch=%d,bw=%d,ant=%d]\\n\", channel, bandwidth, ant);\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\tpadapter->mppriv.channel = channel;\n \t\tSetChannel(padapter);\n \t\tpHalData->current_channel = channel;\n@@ -2158,6 +2160,7 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \tchar *rtw_efuse_mask_file_path;\n \tu8 Status;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n+\tsize_t extra_len;\n \n \t_rtw_memset(maskfileBuffer, 0x00, sizeof(maskfileBuffer));\n \n@@ -2208,11 +2211,11 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \t\t } while (count < 64);\n \n \t\tfor (i = 0; i < count; i++)\n-\t\t\tsprintf(extra, \"%s:%02x\", extra, maskfileBuffer[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \":%02x\", maskfileBuffer[i]);\n \n \t\tpadapter->registrypriv.bFileMaskEfuse = _TRUE;\n \n-\t\tsprintf(extra, \"%s\\nLoad Efuse Mask data %d hex ok\\n\", extra, count);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nLoad Efuse Mask data %d hex ok\\n\", count);\n \t\twrqu->data.length = strlen(extra);\n \t\treturn 0;\n \t}\n@@ -2635,16 +2638,17 @@ todo:\n \tmptbt_BtControlProcess(padapter, &BtReq);\n \n \tif (readtherm == 0) {\n-\t\tsprintf(extra, \"BT thermal=\");\n+\t\tsize_t extra_len = sprintf(extra, \"BT thermal=\");\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++) {\n \t\t\tif ((pMptCtx->mptOutBuf[i] == 0x00) && (pMptCtx->mptOutBuf[i + 1] == 0x00))\n \t\t\t\tgoto exit;\n \n-\t\t\tsprintf(extra, \"%s %d \", extra, (pMptCtx->mptOutBuf[i] & 0x1f));\n+\t\t\textra_len += sprintf(extra + extra_len, \" %d \", (pMptCtx->mptOutBuf[i] & 0x1f));\n \t\t}\n \t} else {\n+\t\tsize_t extra_len = strlen(extra);\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++)\n-\t\t\tsprintf(extra, \"%s 0x%x \", extra, pMptCtx->mptOutBuf[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%x \", pMptCtx->mptOutBuf[i]);\n \t}\n \n exit:\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8822be/core/rtw_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8822be/core/rtw_mp.c\nindex 98054d1338a2..590b4ac87825 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8822be/core/rtw_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8822be/core/rtw_mp.c\n@@ -2076,14 +2076,17 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n \n \tdata[0] = '\\0';\n \n-\ti = psd_start;\n-\twhile (i < psd_stop) {\n-\t\tif (i >= psd_pts)\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n-\t\telse\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n-\t\tsprintf(data, \"%s%x \", data, psd_data);\n-\t\ti++;\n+\t{\n+\t\tsize_t extra_len = strlen(data);\n+\t\ti = psd_start;\n+\t\twhile (i < psd_stop) {\n+\t\t\tif (i >= psd_pts)\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n+\t\t\telse\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n+\t\t\textra_len += sprintf(data + extra_len, \"%x \", psd_data);\n+\t\t\ti++;\n+\t\t}\n \t}\n \n #ifdef CONFIG_LONG_DELAY_ISSUE\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8822be/os_dep/linux/ioctl_linux.c b/drivers/net/wireless/rockchip_wlan/rtl8822be/os_dep/linux/ioctl_linux.c\nindex be44a62c438b..d80c366700b6 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8822be/os_dep/linux/ioctl_linux.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8822be/os_dep/linux/ioctl_linux.c\n@@ -9059,6 +9059,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n #ifdef CONFIG_IOL\n \tu8 org_fw_iol = padapter->registrypriv.fw_iol;/* 0:Disable, 1:enable, 2:by usb speed */\n #endif\n+\tsize_t extra_len;\n \n \twrqu = (struct iw_point *)wdata;\n \tpwrctrlpriv = adapter_to_pwrctl(padapter);\n@@ -9114,22 +9115,22 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t} else if (strcmp(tmp[0], \"drvmap\") == 0) {\n \t\tEFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, _FALSE);\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < mapLen; i += 16) {\n \t\t\t/*RTW_INFO(\"0x%02x\\t\", i);*/\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i);\n \t\t\tfor (j = 0; j < 8; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", data[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, PROMContent[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", PROMContent[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\t\"); */\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", data[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, PROMContent[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", PROMContent[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\n\"); */\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\t/*\t\tRTW_INFO(\"\\n\"); */\n \t} else if (strcmp(tmp[0], \"realmap\") == 0) {\n@@ -9169,18 +9170,18 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} else\n \t\t\torder = 0;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < cnt; i += 16) {\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, shift + i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", shift + i);\n \t\t\tfor (j = 0; j < 8; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\tif ((shift + cnt) < mapLen)\n-\t\t\tsprintf(extra, \"%s\\t...more\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t...more\\n\");\n \t} else if (strcmp(tmp[0], \"rmap\") == 0) {\n \t\tif ((tmp[1] == NULL) || (tmp[2] == NULL)) {\n \t\t\tRTW_INFO(\"%s: rmap Fail!! Parameters error!\\n\", __FUNCTION__);\n@@ -9215,9 +9216,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t/*\t\tRTW_INFO(\"%s: data={\", __FUNCTION__); */\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%02x \", data[i]); */\n-\t\t\tsprintf(extra, \"%s0x%02X \", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", data[i]);\n \t\t}\n \t\t/*\t\tRTW_INFO(\"}\\n\"); */\n \t} else if (strcmp(tmp[0], \"realraw\") == 0) {\n@@ -9244,18 +9246,18 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} else\n \t\t\traw_order = 0;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < cnt; i += 16) {\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, shift + i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", shift + i);\n \t\t\tfor (j = 0; j < 8; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, rawdata[i + j]);\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", rawdata[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, rawdata[i + j]);\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", rawdata[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\tif ((shift + cnt) < mapLen)\n-\t\t\tsprintf(extra, \"%s\\t...more (left:%d/%d)\\n\", extra, mapLen-(shift + cnt), mapLen);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t...more (left:%d/%d)\\n\", mapLen-(shift + cnt), mapLen);\n \n \t} else if (strcmp(tmp[0], \"btrealraw\") == 0) {\n \t\tstatic u8 bt_raw_order = 0;\n@@ -9290,19 +9292,19 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} else\n \t\t\tbt_raw_order = 0;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < cnt; i += 16) {\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, shift + i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", shift + i);\n \t\t\tfor (j = 0; j < 8; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, rawdata[i + j]);\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", rawdata[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, rawdata[i + j]);\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", rawdata[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \n \t\t}\n \t\tif ((shift + cnt) < mapLen)\n-\t\t\tsprintf(extra, \"%s\\t...more (left:%d/%d)\\n\", extra, mapLen-(shift + cnt), mapLen);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t...more (left:%d/%d)\\n\", mapLen-(shift + cnt), mapLen);\n \t} else if (strcmp(tmp[0], \"mac\") == 0) {\n \t\tif (hal_efuse_macaddr_offset(padapter) == -1) {\n \t\t\terr = -EFAULT;\n@@ -9327,12 +9329,13 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t/*\t\tRTW_INFO(\"%s: MAC address={\", __FUNCTION__); */\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\t/*\t\t\tRTW_INFO(\"%02X\", data[i]); */\n-\t\t\tsprintf(extra, \"%s%02X\", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"%02X\", data[i]);\n \t\t\tif (i != (cnts - 1)) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\":\"); */\n-\t\t\t\tsprintf(extra, \"%s:\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \":\");\n \t\t\t}\n \t\t}\n \t\t/*\t\tRTW_INFO(\"}\\n\"); */\n@@ -9390,12 +9393,13 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t/*\t\tRTW_INFO(\"%s: {VID,PID}={\", __FUNCTION__); */\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%02x\", data[i]); */\n-\t\t\tsprintf(extra, \"%s0x%02X\", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X\", data[i]);\n \t\t\tif (i != (cnts - 1)) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\",\"); */\n-\t\t\t\tsprintf(extra, \"%s,\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \",\");\n \t\t\t}\n \t\t}\n \t\t/*\t\tRTW_INFO(\"}\\n\"); */\n@@ -9423,22 +9427,22 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n \t\t/*\t\tRTW_INFO(\"OFFSET\\tVALUE(hex)\\n\"); */\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < 512; i += 16) { /* set 512 because the iwpriv's extra size have limit 0x7FF */\n \t\t\t/*\t\t\tRTW_INFO(\"0x%03x\\t\", i); */\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j = 0; j < 8; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->BTEfuseInitMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\t\"); */\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->BTEfuseInitMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\n\"); */\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\t/*\t\tRTW_INFO(\"\\n\"); */\n \t} else if (strcmp(tmp[0], \"btbmap\") == 0) {\n@@ -9452,22 +9456,22 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n \t\t/*\t\tRTW_INFO(\"OFFSET\\tVALUE(hex)\\n\"); */\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 512; i < 1024 ; i += 16) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%03x\\t\", i); */\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j = 0; j < 8; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", data[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\t\"); */\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", data[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\n\"); */\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\t/*\t\tRTW_INFO(\"\\n\"); */\n \t} else if (strcmp(tmp[0], \"btrmap\") == 0) {\n@@ -9517,51 +9521,52 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\t/*\t\tRTW_INFO(\"%s: bt efuse data={\", __FUNCTION__); */\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%02x \", data[i]); */\n-\t\t\tsprintf(extra, \"%s 0x%02X \", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%02X \", data[i]);\n \t\t}\n \t\t/*\t\tRTW_INFO(\"}\\n\"); */\n \t\tRTW_INFO(FUNC_ADPT_FMT \": BT MAC=[%s]\\n\", FUNC_ADPT_ARG(padapter), extra);\n \t} else if (strcmp(tmp[0], \"btffake\") == 0) {\n \t\t/*\t\tRTW_INFO(\"OFFSET\\tVALUE(hex)\\n\"); */\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < 512; i += 16) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%03x\\t\", i); */\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j = 0; j < 8; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\t\"); */\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\n\"); */\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\t/*\t\tRTW_INFO(\"\\n\"); */\n \t} else if (strcmp(tmp[0], \"btbfake\") == 0) {\n \t\t/*\t\tRTW_INFO(\"OFFSET\\tVALUE(hex)\\n\"); */\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 512; i < 1024; i += 16) {\n \t\t\t/*\t\t\tRTW_INFO(\"0x%03x\\t\", i); */\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j = 0; j < 8; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\t\"); */\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++) {\n \t\t\t\t/*\t\t\t\tRTW_INFO(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]); */\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i + j]);\n \t\t\t}\n \t\t\t/*\t\t\tRTW_INFO(\"\\n\"); */\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\t/*\t\tRTW_INFO(\"\\n\"); */\n \t} else if (strcmp(tmp[0], \"wlrfkmap\") == 0) {\n@@ -9582,18 +9587,18 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} else\n \t\t\tfk_order = 0;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < cnt; i += 16) {\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, shift + i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", shift + i);\n \t\t\tfor (j = 0; j < 8; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++)\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, efuse[i + j]);\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", efuse[i + j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n \t\tif ((shift + cnt) < mapLen)\n-\t\t\tsprintf(extra, \"%s\\t...more\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t...more\\n\");\n \n \t} else if (strcmp(tmp[0], \"wlrfkrmap\") == 0) {\n \t\tif ((tmp[1] == NULL) || (tmp[2] == NULL)) {\n@@ -9615,9 +9620,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t/*\t\tRTW_INFO(\"%s: data={\", __FUNCTION__); */\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\tRTW_INFO(\"wlrfkrmap = 0x%02x\\n\", pEfuseHal->fakeEfuseModifiedMap[addr + i]);\n-\t\t\tsprintf(extra, \"%s0x%02X \", extra, pEfuseHal->fakeEfuseModifiedMap[addr + i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", pEfuseHal->fakeEfuseModifiedMap[addr + i]);\n \t\t}\n \t} else if (strcmp(tmp[0], \"btrfkrmap\") == 0) {\n \t\tif ((tmp[1] == NULL) || (tmp[2] == NULL)) {\n@@ -9639,9 +9645,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t/*\t\tRTW_INFO(\"%s: data={\", __FUNCTION__); */\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i = 0; i < cnts; i++) {\n \t\t\tRTW_INFO(\"wlrfkrmap = 0x%02x\\n\", pEfuseHal->fakeBTEfuseModifiedMap[addr + i]);\n-\t\t\tsprintf(extra, \"%s0x%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[addr + i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", pEfuseHal->fakeBTEfuseModifiedMap[addr + i]);\n \t\t}\n \t} else\n \t\tsprintf(extra, \"Command not found!\");\ndiff --git a/drivers/net/wireless/rockchip_wlan/rtl8822be/os_dep/linux/ioctl_mp.c b/drivers/net/wireless/rockchip_wlan/rtl8822be/os_dep/linux/ioctl_mp.c\nindex ce3484d36fd1..c304e81e0a57 100644\n--- a/drivers/net/wireless/rockchip_wlan/rtl8822be/os_dep/linux/ioctl_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8822be/os_dep/linux/ioctl_mp.c\n@@ -198,7 +198,7 @@ int rtw_mp_read_reg(struct net_device *dev,\n \t\t\tif (*pnext != '\\0') {\n \t\t\t\t/*strtout = simple_strtoul(pnext , &ptmp, 16);*/\n \t\t\t\tret = sscanf(pnext, \"%x\", &strtout);\n-\t\t\t\tsprintf(extra, \"%s %d\" , extra , strtout);\n+\t\t\t\tsprintf(extra + strlen(extra), \" %d\", strtout);\n \t\t\t} else\n \t\t\t\tbreak;\n \t\t\tpch = pnext;\n@@ -230,7 +230,7 @@ int rtw_mp_read_reg(struct net_device *dev,\n \t\t\tpnext++;\n \t\t\tif (*pnext != '\\0') {\n \t\t\t\tret = sscanf(pnext, \"%x\", &strtout);\n-\t\t\t\tsprintf(extra, \"%s %d\" , extra , strtout);\n+\t\t\t\tsprintf(extra + strlen(extra), \" %d\", strtout);\n \t\t\t} else\n \t\t\t\tbreak;\n \t\t\tpch = pnext;\n@@ -341,20 +341,23 @@ int rtw_mp_read_rf(struct net_device *dev,\n \tpch = tmp;\n \tRTW_INFO(\"pch=%s\", pch);\n \n-\twhile (*pch != '\\0') {\n-\t\tpnext = strpbrk(pch, \" \");\n-\t\tif (!pnext)\n-\t\t\tbreak;\n-\t\tpnext++;\n-\t\tif (*pnext != '\\0') {\n-\t\t\t/*strtou =simple_strtoul(pnext , &ptmp, 16);*/\n-\t\t\tret = sscanf(pnext, \"%x\", &strtou);\n-\t\t\tsprintf(extra, \"%s %d\" , extra , strtou);\n-\t\t} else\n-\t\t\tbreak;\n-\t\tpch = pnext;\n+\t{\n+\t\tsize_t extra_len = strlen(extra);\n+\t\twhile (*pch != '\\0') {\n+\t\t\tpnext = strpbrk(pch, \" \");\n+\t\t\tif (!pnext)\n+\t\t\t\tbreak;\n+\t\t\tpnext++;\n+\t\t\tif (*pnext != '\\0') {\n+\t\t\t\t/*strtou =simple_strtoul(pnext , &ptmp, 16);*/\n+\t\t\t\tret = sscanf(pnext, \"%x\", &strtou);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" %d\", strtou);\n+\t\t\t} else\n+\t\t\t\tbreak;\n+\t\t\tpch = pnext;\n+\t\t}\n+\t\twrqu->length = extra_len;\n \t}\n-\twrqu->length = strlen(extra);\n \n \treturn 0;\n }\n@@ -1412,7 +1415,7 @@ int rtw_mp_pretx_proc(PADAPTER padapter, u8 bStartTest, char *extra)\n \t\t\tpmp_priv->mode = MP_ON;\n \t\t\tsprintf(extra, \"Stop continuous Tx\");\n \t\t} else if (pmp_priv->tx.stop == 1) {\n-\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500 count=%u\\n\", extra, pmp_priv->tx.count);\n+\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500 count=%u\\n\", pmp_priv->tx.count);\n \t\t\tpmp_priv->tx.stop = 0;\n \t\t\tSetPacketTx(padapter);\n \t\t} else\n@@ -1420,26 +1423,26 @@ int rtw_mp_pretx_proc(PADAPTER padapter, u8 bStartTest, char *extra)\n \t\treturn 0;\n \tcase MP_SINGLE_TONE_TX:\n \t\tif (bStartTest != 0)\n-\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\tSetSingleToneTx(padapter, (u8)bStartTest);\n \t\tbreak;\n \tcase MP_CONTINUOUS_TX:\n \t\tif (bStartTest != 0)\n-\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\tSetContinuousTx(padapter, (u8)bStartTest);\n \t\tbreak;\n \tcase MP_CARRIER_SUPPRISSION_TX:\n \t\tif (bStartTest != 0) {\n \t\t\tif (HwRateToMPTRate(pmp_priv->rateidx) <= MPT_RATE_11M)\n-\t\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\t\telse\n-\t\t\t\tsprintf(extra, \"%s\\nSpecify carrier suppression but not CCK rate\", extra);\n+\t\t\t\tsprintf(extra + strlen(extra), \"\\nSpecify carrier suppression but not CCK rate\");\n \t\t}\n \t\tSetCarrierSuppressionTx(padapter, (u8)bStartTest);\n \t\tbreak;\n \tcase MP_SINGLE_CARRIER_TX:\n \t\tif (bStartTest != 0)\n-\t\t\tsprintf(extra, \"%s\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\", extra);\n+\t\t\tsprintf(extra + strlen(extra), \"\\nStart continuous DA=ffffffffffff len=1500\\n infinite=yes.\");\n \t\tSetSingleCarrierTx(padapter, (u8)bStartTest);\n \t\tbreak;\n \n@@ -1517,13 +1520,13 @@ int rtw_mp_tx(struct net_device *dev,\n \t\treturn 0;\n \t} else if (strncmp(extra, \"setting\", 7) == 0) {\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"Current Setting :\\n Channel:%d\", pmp_priv->channel);\n-\t\tsprintf(extra, \"%s\\n Bandwidth:%d\", extra, pmp_priv->bandwidth);\n-\t\tsprintf(extra, \"%s\\n Rate index:%d\", extra, pmp_priv->rateidx);\n-\t\tsprintf(extra, \"%s\\n TxPower index:%d\", extra, pmp_priv->txpoweridx);\n-\t\tsprintf(extra, \"%s\\n Antenna TxPath:%d\", extra, pmp_priv->antenna_tx);\n-\t\tsprintf(extra, \"%s\\n Antenna RxPath:%d\", extra, pmp_priv->antenna_rx);\n-\t\tsprintf(extra, \"%s\\n MP Mode:%d\", extra, pmp_priv->mode);\n+\t\textra_len = sprintf(extra, \"Current Setting :\\n Channel:%d\", pmp_priv->channel);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n Bandwidth:%d\", pmp_priv->bandwidth);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n Rate index:%d\", pmp_priv->rateidx);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n TxPower index:%d\", pmp_priv->txpoweridx);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n Antenna TxPath:%d\", pmp_priv->antenna_tx);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n Antenna RxPath:%d\", pmp_priv->antenna_rx);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n MP Mode:%d\", pmp_priv->mode);\n \t\twrqu->data.length = strlen(extra);\n \t\treturn 0;\n #ifdef CONFIG_MP_VHT_HW_TX_MODE\n@@ -1661,25 +1664,25 @@ int rtw_mp_tx(struct net_device *dev,\n \t\tif (sscanf(extra, \"ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\", &channel, &bandwidth, &rate, &txpower, &ant, &txmode) < 6) {\n \t\t\tRTW_INFO(\"Invalid format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\tsprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n-\t\t\tsprintf(extra, \"%s\\t ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\\n\", extra, channel, bandwidth, rate, txpower, ant, txmode);\n-\t\t\tsprintf(extra, \"%s\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [ rate :\tCCK: 1 2 5.5 11M X 2 = < 2 4 11 22 >]\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [\t\tOFDM: 6 9 12 18 24 36 48 54M X 2 = < 12 18 24 36 48 72 96 108>\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [\t\tHT 1S2SS MCS0 ~ MCS15 : < [MCS0]=128 ~ [MCS7]=135 ~ [MCS15]=143 >\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [\t\tHT 3SS MCS16 ~ MCS32 : < [MCS16]=144 ~ [MCS23]=151 ~ [MCS32]=159 >\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [\t\tVHT 1SS MCS0 ~ MCS9 : < [MCS0]=160 ~ [MCS9]=169 >\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [ txpower : 1~63 power index\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\", extra);\n-\t\t\tsprintf(extra, \"%s\\n [ txmode : < 0 = CONTINUOUS_TX, 1 = PACKET_TX, 2 = SINGLE_TONE_TX, 3 = CARRIER_SUPPRISSION_TX, 4 = SINGLE_CARRIER_TX>\\n\", extra);\n+\t\t\textra_len = sprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ rate :\tCCK: 1 2 5.5 11M X 2 = < 2 4 11 22 >]\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tOFDM: 6 9 12 18 24 36 48 54M X 2 = < 12 18 24 36 48 72 96 108>\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tHT 1S2SS MCS0 ~ MCS15 : < [MCS0]=128 ~ [MCS7]=135 ~ [MCS15]=143 >\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tHT 3SS MCS16 ~ MCS32 : < [MCS16]=144 ~ [MCS23]=151 ~ [MCS32]=159 >\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [\t\tVHT 1SS MCS0 ~ MCS9 : < [MCS0]=160 ~ [MCS9]=169 >\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ txpower : 1~63 power index\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\");\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n [ txmode : < 0 = CONTINUOUS_TX, 1 = PACKET_TX, 2 = SINGLE_TONE_TX, 3 = CARRIER_SUPPRISSION_TX, 4 = SINGLE_CARRIER_TX>\\n\");\n \t\t\twrqu->data.length = strlen(extra);\n \t\t\treturn status;\n \n \t\t} else {\n \t\t\tRTW_INFO(\"Got format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\t\tpadapter->mppriv.channel = channel;\n \t\t\tSetChannel(padapter);\n \t\t\tpHalData->CurrentChannel = channel;\n@@ -1688,13 +1691,13 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\t\tbandwidth = CHANNEL_WIDTH_40;\n \t\t\telse if (bandwidth == 2)\n \t\t\t\tbandwidth = CHANNEL_WIDTH_80;\n-\t\t\tsprintf(extra, \"%s\\nChange Current Bandwidth %d to Bandwidth %d\", extra, padapter->mppriv.bandwidth , bandwidth);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\nChange Current Bandwidth %d to Bandwidth %d\", padapter->mppriv.bandwidth , bandwidth);\n \t\t\tpadapter->mppriv.bandwidth = (u8)bandwidth;\n \t\t\tpadapter->mppriv.preamble = sg;\n \t\t\tSetBandwidth(padapter);\n \t\t\tpHalData->CurrentChannelBW = bandwidth;\n \n-\t\t\tsprintf(extra, \"%s\\nSet power level :%d\", extra, txpower);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet power level :%d\", txpower);\n \t\t\tpadapter->mppriv.txpoweridx = (u8)txpower;\n \t\t\tpMptCtx->TxPwrLevel[ODM_RF_PATH_A] = (u8)txpower;\n \t\t\tpMptCtx->TxPwrLevel[ODM_RF_PATH_B] = (u8)txpower;\n@@ -1717,13 +1720,13 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\tRTW_INFO(\"%s: rate index=%d\\n\", __func__, rate);\n \t\t\tif (rate >= MPT_RATE_LAST)\n \t\t\t\treturn -EINVAL;\n-\t\t\tsprintf(extra, \"%s\\nSet data rate to %d index %d\", extra, padapter->mppriv.rateidx, rate);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet data rate to %d index %d\", padapter->mppriv.rateidx, rate);\n \n \t\t\tpadapter->mppriv.rateidx = rate;\n \t\t\tpMptCtx->MptRateIndex = rate;\n \t\t\tSetDataRate(padapter);\n \n-\t\t\tsprintf(extra, \"%s\\nSet Antenna Path :%d\",  extra, ant);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\nSet Antenna Path :%d\", ant);\n \t\t\tswitch (ant) {\n \t\t\tcase 1:\n \t\t\t\tantenna = ANTENNA_A;\n@@ -1800,6 +1803,7 @@ int rtw_mp_rx(struct net_device *dev,\n \t      struct iw_request_info *info,\n \t      union iwreq_data *wrqu, char *extra)\n {\n+\tsize_t extra_len;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n \tHAL_DATA_TYPE\t*pHalData\t= GET_HAL_DATA(padapter);\n \tstruct mp_priv *pmp_priv = &padapter->mppriv;\n@@ -1831,19 +1835,19 @@ int rtw_mp_rx(struct net_device *dev,\n \t} else if (sscanf(extra, \"ch=%d,bw=%d,ant=%d\", &channel, &bandwidth, &ant) < 3) {\n \t\tRTW_INFO(\"Invalid format [ch=%d,bw=%d,ant=%d]\\n\", channel, bandwidth, ant);\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n-\t\tsprintf(extra, \"%s\\t ch=%d,bw=%d,ant=%d\\n\", extra, channel, bandwidth, ant);\n-\t\tsprintf(extra, \"%s\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\", extra);\n-\t\tsprintf(extra, \"%s\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\", extra);\n-\t\tsprintf(extra, \"%s\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\", extra);\n-\t\twrqu->data.length = strlen(extra);\n+\t\textra_len = sprintf(extra, \"\\n Please input correct format as bleow:\\n\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\t ch=%d,bw=%d,ant=%d\\n\", channel, bandwidth, ant);\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ ch : BGN = <1~14> , A or AC = <36~165> ]\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ bw : Bandwidth: 0 = 20M, 1 = 40M, 2 = 80M ]\");\n+\t\textra_len += sprintf(extra + extra_len, \"\\n [ ant : <A = 1, B = 2, C = 4, D = 8> ,2T ex: AB=3 BC=6 CD=12\");\n+\t\twrqu->data.length = extra_len;\n \t\treturn 0;\n \n \t} else {\n \t\tbStartRx = 1;\n \t\tRTW_INFO(\"Got format [ch=%d,bw=%d,ant=%d]\\n\", channel, bandwidth, ant);\n \t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\tpadapter->mppriv.channel = channel;\n \t\tSetChannel(padapter);\n \t\tpHalData->CurrentChannel = channel;\n@@ -1852,13 +1856,13 @@ int rtw_mp_rx(struct net_device *dev,\n \t\t\tbandwidth = CHANNEL_WIDTH_40;\n \t\telse if (bandwidth == 2)\n \t\t\tbandwidth = CHANNEL_WIDTH_80;\n-\t\tsprintf(extra, \"%s\\nChange Current Bandwidth %d to Bandwidth %d\", extra, padapter->mppriv.bandwidth , bandwidth);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nChange Current Bandwidth %d to Bandwidth %d\", padapter->mppriv.bandwidth , bandwidth);\n \t\tpadapter->mppriv.bandwidth = (u8)bandwidth;\n \t\tpadapter->mppriv.preamble = sg;\n \t\tSetBandwidth(padapter);\n \t\tpHalData->CurrentChannelBW = bandwidth;\n \n-\t\tsprintf(extra, \"%s\\nSet Antenna Path :%d\",  extra, ant);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nSet Antenna Path :%d\", ant);\n \t\tswitch (ant) {\n \t\tcase 1:\n \t\t\tantenna = ANTENNA_A;\n@@ -1909,7 +1913,7 @@ int rtw_mp_rx(struct net_device *dev,\n \t\tpHalData->AntennaTxPath = antenna;\n \t\tSetAntenna(padapter);\n \n-\t\tsprintf(extra, \"%s\\nstart Rx\", extra);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nstart Rx\");\n \t\tSetPacketRx(padapter, bStartRx, _FALSE);\n \t}\n \twrqu->data.length = strlen(extra);\n@@ -1951,6 +1955,7 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \tchar *rtw_efuse_mask_file_path;\n \tu8 Status;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n+\tsize_t extra_len;\n \n \t_rtw_memset(maskfileBuffer, 0x00, sizeof(maskfileBuffer));\n \n@@ -2339,16 +2344,17 @@ todo:\n \tmptbt_BtControlProcess(padapter, &BtReq);\n \n \tif (readtherm == 0) {\n-\t\tsprintf(extra, \"BT thermal=\");\n+\t\tsize_t extra_len = sprintf(extra, \"BT thermal=\");\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++) {\n \t\t\tif ((pMptCtx->mptOutBuf[i] == 0x00) && (pMptCtx->mptOutBuf[i + 1] == 0x00))\n \t\t\t\tgoto exit;\n \n-\t\t\tsprintf(extra, \"%s %d \", extra, (pMptCtx->mptOutBuf[i] & 0x1f));\n+\t\t\textra_len += sprintf(extra + extra_len, \" %d \", (pMptCtx->mptOutBuf[i] & 0x1f));\n \t\t}\n \t} else {\n+\t\tsize_t extra_len = strlen(extra);\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++)\n-\t\t\tsprintf(extra, \"%s 0x%x \", extra, pMptCtx->mptOutBuf[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%x \", pMptCtx->mptOutBuf[i]);\n \t}\n \n exit:\ndiff --git a/drivers/net/wireless/rtl8192cu/core/rtw_mp.c b/drivers/net/wireless/rtl8192cu/core/rtw_mp.c\nindex 9af42cdc980a..73be688b5fed 100755\n--- a/drivers/net/wireless/rtl8192cu/core/rtw_mp.c\n+++ b/drivers/net/wireless/rtl8192cu/core/rtw_mp.c\n@@ -1276,7 +1276,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n {\n \tu32 i, psd_pts=0, psd_start=0, psd_stop=0;\n \tu32 psd_data=0;\n-\t\n+\tsize_t data_len = 0;\t\n #ifdef PLATFORM_LINUX\n \tif (!netif_running(pAdapter->pnetdev)) {\n \t\tRT_TRACE(_module_mp_, _drv_warning_, (\"mp_query_psd: Fail! interface not opened!\\n\"));\n@@ -1307,7 +1307,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n \t\t} else {\n \t\t\tpsd_data = GetPSDData(pAdapter, i);\n \t\t}\n-\t\tsprintf(data, \"%s%x \", data, psd_data);\n+\t\tdata_len += sprintf(data + data_len, \"%x \", psd_data);\n \t\ti++;\n \t}\n \ndiff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_linux.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_linux.c\nindex 9adbeaf16cf8..3e067fe7422c 100755\n--- a/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_linux.c\n+++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_linux.c\n@@ -8668,6 +8668,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \tu16 mapLen=0;\n \tchar *pch, *ptmp, *token, *tmp[3]={0x00,0x00,0x00};\n \tu16 addr = 0, cnts = 0, max_available_size = 0,raw_cursize = 0 ,raw_maxsize = 0;\n+\tsize_t extra_len;\n \t\n \t_rtw_memset(data, '\\0', sizeof(data));\n \t_rtw_memset(rawdata, '\\0', sizeof(rawdata));\n@@ -8701,27 +8702,27 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t} \n \t\t_rtw_memset(extra, '\\0', sizeof(extra));\n \t\tDBG_871X(\"\\tOFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"%s \\n\", extra);\n+\t\textra_len = sprintf(extra, \" \\n\");\n \t\tfor ( i = 0; i < EFUSE_MAP_SIZE; i += 16 )\n \t\t{\n \t\t\tDBG_871X(\"\\t0x%02x\\t\", i);\n-\t\t\tsprintf(extra, \"%s \\t0x%02x\\t\", extra,i);\n+\t\t\textra_len += sprintf(extra + extra_len, \" \\t0x%02x\\t\",i);\n \t\t\tfor (j = 0; j < 8; j++)\n \t\t\t{\t  \n \t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s %02X\", extra, data[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" %02X\", data[i+j]);\n \t\t\t}\n \t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra,\"%s\\t\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j < 16; j++){\n \t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s %02X\", extra, data[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" %02X\", data[i+j]);\n \t\t\t}\n \t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra,\"%s\\n\",extra);\t\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\t\n \t\t}\n \t\tDBG_871X(\"\\n\");\n-\t\twrqu->length = strlen(extra);\n+\t\twrqu->length = extra_len;\n \t\n \t\treturn 0;\n \t}\n@@ -8753,14 +8754,15 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\t\n \n \t\t_rtw_memset(extra, '\\0', sizeof(extra));\t \n+\t\textra_len = 0;\n \t\tfor ( i = 0; i < cnts; i ++) {\n \t\t\tDBG_871X(\"0x%02x\", data[i]);\n-\t\t\tsprintf(extra, \"%s 0x%02X\", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%02X\", data[i]);\n \t\t\tDBG_871X(\" \");\n-\t\t\tsprintf(extra,\"%s \",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \" \");\n \t\t}\n \n-\t\twrqu->length = strlen(extra)+1;\n+\t\twrqu->length = extra_len;\n \n \t\tDBG_871X(\"extra = %s \", extra);\n \n@@ -8780,20 +8782,21 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \t\t\t\t\n \t\t_rtw_memset(extra, '\\0', sizeof(extra));\n+\t\textra_len = 0;\n \t\tfor ( i=0; i<mapLen; i++ ) {\n \t\t\tDBG_871X(\" %02x\", rawdata[i]);\n-\t\t\tsprintf(extra, \"%s %02x\", extra, rawdata[i] );\n+\t\t\textra_len += sprintf(extra + extra_len, \" %02x\", rawdata[i] );\n \n \t\t\tif ((i & 0xF) == 0xF){ \n \t\t\t\tDBG_871X(\"\\n\\t\");\n-\t\t\t\tsprintf(extra, \"%s\\n\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n\\t\");\n \t\t\t}\n \t\t\telse if ((i & 0x7) == 0x7){ \n \t\t\t\tDBG_871X(\"\\t\");\n-\t\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\t}\n \t\t}\n-\t\twrqu->length = strlen(extra);\n+\t\twrqu->length = extra_len;\n \t\treturn 0;\n \t}\n \telse if ( strcmp(tmp[0],\"mac\") == 0 ) {\n@@ -8819,13 +8822,14 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t\tDBG_871X(\"rtw_efuse_access ok \\n\");\n \t\t}\t\n \t\t_rtw_memset(extra, '\\0', sizeof(extra));\t\t \n+\t\textra_len = 0;\n \t\tfor ( i = 0; i < cnts; i ++) {\n \t\t\tDBG_871X(\"0x%02x\", data[i]);\n-\t\t\tsprintf(extra, \"%s 0x%02X\", extra, data[i+j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%02X\", data[i+j]);\n \t\t\tDBG_871X(\" \");\n-\t\t\tsprintf(extra,\"%s \",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \" \");\n \t\t}\n-\t\twrqu->length = strlen(extra);\n+\t\twrqu->length = extra_len;\n \t\treturn 0;\n \t}\n \telse if ( strcmp(tmp[0],\"vidpid\") == 0 ) {\n@@ -8850,26 +8854,29 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t\tDBG_871X(\"rtw_efuse_access ok \\n\");\n \t\t}\t\n \t\t_rtw_memset(extra, '\\0', sizeof(extra));\t\t \n+\t\textra_len = 0;\n \t\tfor ( i = 0; i < cnts; i ++) {\n \t\t\tDBG_871X(\"0x%02x\", data[i]);\n-\t\t\tsprintf(extra, \"%s 0x%02X\", extra, data[i+j]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%02X\", data[i+j]);\n \t\t\tDBG_871X(\" \");\n-\t\t\tsprintf(extra,\"%s \",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \" \");\n \t\t}\n-\t\twrqu->length = strlen(extra);\n+\t\twrqu->length = extra_len;\n \t\treturn 0;\n \t}\n \telse if ( strcmp(tmp[0],\"ableraw\") == 0 ) {\n \t\tefuse_GetCurrentSize(padapter,&raw_cursize);\n \t\traw_maxsize = efuse_GetMaxSize(padapter);\n-\t\tsprintf(extra, \"%s : [ available raw size] = %d\",extra,raw_maxsize-raw_cursize);\n-\t\twrqu->length = strlen(extra);\n+\t\textra_len = strlen(extra);\n+\t\textra_len += sprintf(extra + extra_len, \" : [ available raw size] = %d\",raw_maxsize-raw_cursize);\n+\t\twrqu->length = extra_len;\n \n \t\treturn 0;\n \t}else\n \t{\n-\t\t sprintf(extra, \"%s : Command not found\\n\",extra);\n-\t\t  wrqu->length = strlen(extra);\n+\t\textra_len = strlen(extra);\n+\t\t extra_len += sprintf(extra + extra_len, \" : Command not found\\n\");\n+\t\t  wrqu->length = extra_len;\n \t\t  return 0;\n \t}\n \t\n@@ -9140,6 +9147,7 @@ static int rtw_mp_read_reg(struct net_device *dev,\n \t//u32 *data = (u32*)extra;\n \tu32 ret, i=0, j=0, strtout=0;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n+\tsize_t extra_len;\n \n \tif (wrqu->length > 128) return -EFAULT;\n \n@@ -9190,6 +9198,7 @@ static int rtw_mp_read_reg(struct net_device *dev,\n \t\t\t\tpch = tmp;\t\t\n \t\t\t\tDBG_871X(\"pch=%s\",pch);\n \t\t\t\t\n+\t\t\t\textra_len = strlen(extra);\n \t\t\t\twhile( *pch != '\\0' )\n \t\t\t\t{\n \t\t\t\t\tpnext = strpbrk(pch, \" \");\n@@ -9197,7 +9206,7 @@ static int rtw_mp_read_reg(struct net_device *dev,\n \t\t\t\t\tif ( *pnext != '\\0' )\n \t\t\t\t\t{\n \t\t\t\t\t\t  strtout = simple_strtoul (pnext , &ptmp, 16);\n-\t\t\t\t\t\t  sprintf( extra, \"%s %d\" ,extra ,strtout );\n+\t\t\t\t\t\t  extra_len += sprintf( extra + extra_len, \" %d\", strtout );\n \t\t\t\t\t}\n \t\t\t\t\telse{\n \t\t\t\t\t\t  break;\n@@ -9224,6 +9233,7 @@ static int rtw_mp_read_reg(struct net_device *dev,\n \t\t\t\tpch = tmp;\t\t\n \t\t\t\tDBG_871X(\"pch=%s\",pch);\n \t\t\t\t\n+\t\t\t\textra_len = strlen(extra);\n \t\t\t\twhile( *pch != '\\0' )\n \t\t\t\t{\n \t\t\t\t\tpnext = strpbrk(pch, \" \");\n@@ -9231,7 +9241,7 @@ static int rtw_mp_read_reg(struct net_device *dev,\n \t\t\t\t\tif ( *pnext != '\\0' )\n \t\t\t\t\t{\n \t\t\t\t\t\t  strtout = simple_strtoul (pnext , &ptmp, 16);\n-\t\t\t\t\t\t  sprintf( extra, \"%s %d\" ,extra ,strtout );\n+\t\t\t\t\t\t  extra_len += sprintf( extra + extra_len, \" %d\", strtout );\n \t\t\t\t\t}\n \t\t\t\t\telse{\n \t\t\tbreak;\n@@ -9304,6 +9314,7 @@ static int rtw_mp_read_rf(struct net_device *dev,\n \tu32 path, addr;\n \tu32 ret,i=0 ,j=0,strtou=0;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n+\tsize_t extra_len = 0;\n \n \n \tif (wrqu->length > 128) return -EFAULT;\n@@ -9341,14 +9352,14 @@ static int rtw_mp_read_rf(struct net_device *dev,\n \t\t\t\t\tif ( *pnext != '\\0' )\n \t\t\t\t\t{\n \t\t\t\t\t\t  strtou = simple_strtoul (pnext , &ptmp, 16);\n-\t\t\t\t\t\t  sprintf( extra, \"%s %d\" ,extra ,strtou );\n+\t\t\t\t\t\t  extra_len += sprintf( extra + extra_len, \" %d\", strtou );\n \t\t\t\t\t}\n \t\t\t\t\telse{\n \t\t\t\t\t\t  break;\n \t\t\t\t\t}\n \t\t\t\t\tpch = pnext;\n \t\t\t\t}\n-\t\t\twrqu->length = strlen(extra);\n+\t\t\twrqu->length = extra_len;\n \n \treturn 0;\n }\ndiff --git a/drivers/net/wireless/rtl8812au/core/rtw_mp.c b/drivers/net/wireless/rtl8812au/core/rtw_mp.c\nindex c2e400df1ce5..9884bb7f8a10 100644\n--- a/drivers/net/wireless/rtl8812au/core/rtw_mp.c\n+++ b/drivers/net/wireless/rtl8812au/core/rtw_mp.c\n@@ -1840,7 +1840,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n {\n \tu32 i, psd_pts=0, psd_start=0, psd_stop=0;\n \tu32 psd_data=0;\n-\n+\tsize_t data_len = 0;\n \n #ifdef PLATFORM_LINUX\n \tif (!netif_running(pAdapter->pnetdev)) {\n@@ -1871,7 +1871,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n \t\t} else {\n \t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n \t\t}\n-\t\tsprintf(data, \"%s%x \", data, psd_data);\n+\t\tdata_len += sprintf(data + data_len, \"%x \", psd_data);\n \t\ti++;\n \t}\n \ndiff --git a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_linux.c b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_linux.c\nindex 4eba681b1cb6..62f472e020f2 100644\n--- a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_linux.c\n+++ b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_linux.c\n@@ -9013,6 +9013,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n #ifdef CONFIG_IOL\n \tu8 org_fw_iol = padapter->registrypriv.fw_iol;// 0:Disable, 1:enable, 2:by usb speed\n #endif\n+\tsize_t extra_len;\n \n \twrqu = (struct iw_point*)wdata;\n \tpwrctrlpriv = adapter_to_pwrctl(padapter);\n@@ -9065,22 +9066,22 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t} else if (strcmp(tmp[0], \"drvmap\") == 0) {\n \t\tmapLen = EFUSE_MAP_SIZE;\n \n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < EFUSE_MAP_SIZE; i += 16) {\n //\t\t\tDBG_871X(\"0x%02x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, PROMContent[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", PROMContent[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, PROMContent[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", PROMContent[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra,\"%s\\n\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t} else if (strcmp(tmp[0], \"realmap\") == 0) {\n@@ -9092,22 +9093,22 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i = 0; i < EFUSE_MAP_SIZE; i += 16) {\n //\t\t\tDBG_871X(\"0x%02x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra,\"%s\\n\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t} else if (strcmp(tmp[0], \"rmap\") == 0) {\n@@ -9144,9 +9145,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n //\t\tDBG_871X(\"%s: data={\", __FUNCTION__);\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i=0; i<cnts; i++) {\n //\t\t\tDBG_871X(\"0x%02x \", data[i]);\n-\t\t\tsprintf(extra, \"%s0x%02X \", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", data[i]);\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n \t} else if (strcmp(tmp[0], \"realraw\") == 0) {\n@@ -9159,20 +9161,20 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \t\t_rtw_memset(extra,'\\0',strlen(extra));\n \t\t//\t\tDBG_871X(\"%s: realraw={\\n\", __FUNCTION__);\n-\t\tsprintf(extra, \"\\n0x00\\t\");\n+\t\textra_len = sprintf(extra, \"\\n0x00\\t\");\n \t\tfor (i=0; i< mapLen; i++) {\n \t\t\t//\t\t\tDBG_871X(\"%02X\", rawdata[i]);\n-\t\t\tsprintf(extra, \"%s%02X\", extra, rawdata[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"%02X\", rawdata[i]);\n \t\t\tif ((i & 0xF) == 0xF) {\n \t\t\t\t//\t\t\t\tDBG_871X(\"\\n\");\n-\t\t\t\tsprintf(extra, \"%s\\n\", extra);\n-\t\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i+1);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i+1);\n \t\t\t} else if ((i & 0x7) == 0x7) {\n \t\t\t\t//\t\t\t\tDBG_871X(\"\\t\");\n-\t\t\t\tsprintf(extra, \"%s \\t\", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" \\t\");\n \t\t\t} else {\n \t\t\t\t//\t\t\t\tDBG_871X(\" \");\n-\t\t\t\tsprintf(extra, \"%s \", extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" \");\n \t\t\t}\n \t\t}\n \t\t//\t\tDBG_871X(\"}\\n\");\n@@ -9255,12 +9257,13 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n //\t\tDBG_871X(\"%s: MAC address={\", __FUNCTION__);\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i=0; i<cnts; i++) {\n //\t\t\tDBG_871X(\"%02X\", data[i]);\n-\t\t\tsprintf(extra, \"%s%02X\", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"%02X\", data[i]);\n \t\t\tif (i != (cnts-1)) {\n //\t\t\t\tDBG_871X(\":\");\n-\t\t\t\tsprintf(extra,\"%s:\",extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \":\");\n \t\t\t}\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n@@ -9316,12 +9319,13 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n //\t\tDBG_871X(\"%s: {VID,PID}={\", __FUNCTION__);\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i=0; i<cnts; i++) {\n //\t\t\tDBG_871X(\"0x%02x\", data[i]);\n-\t\t\tsprintf(extra, \"%s0x%02X\", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X\", data[i]);\n \t\t\tif (i != (cnts-1)) {\n //\t\t\t\tDBG_871X(\",\");\n-\t\t\t\tsprintf(extra,\"%s,\",extra);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \",\");\n \t\t\t}\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n@@ -9341,21 +9345,22 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n \t\tsprintf(extra, \"\\n\");\n+\t\textra_len = 0;\n \t\tfor (i=0; i<512; i+=16) { // set 512 because the iwpriv's extra size have limit 0x7FF\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra,\"%s\\t\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t} else if (strcmp(tmp[0],\"btbmap\") == 0) {\n@@ -9369,22 +9374,22 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=512; i<1024 ; i+=16) {\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra,\"%s\\t\",extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", data[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->BTEfuseInitMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->BTEfuseInitMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t} else if (strcmp(tmp[0],\"btrmap\") == 0) {\n@@ -9421,71 +9426,72 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \t\t}\n \n \t\t*extra = 0;\n+\t\textra_len = 0;\n //\t\tDBG_871X(\"%s: bt efuse data={\", __FUNCTION__);\n \t\tfor (i=0; i<cnts; i++) {\n //\t\t\tDBG_871X(\"0x%02x \", data[i]);\n-\t\t\tsprintf(extra, \"%s 0x%02X \", extra, data[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%02X \", data[i]);\n \t\t}\n //\t\tDBG_871X(\"}\\n\");\n \t\tDBG_871X(FUNC_ADPT_FMT \": BT MAC=[%s]\\n\", FUNC_ADPT_ARG(padapter), extra);\n \t} else if (strcmp(tmp[0], \"btffake\") == 0) {\n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=0; i<512; i+=16) {\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t} else if (strcmp(tmp[0],\"btbfake\") == 0) {\n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=512; i<1024; i+=16) {\n //\t\t\tDBG_871X(\"0x%03x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%03x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%03x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeBTEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \t} else if (strcmp(tmp[0],\"wlrfkmap\")== 0) {\n //\t\tDBG_871X(\"OFFSET\\tVALUE(hex)\\n\");\n-\t\tsprintf(extra, \"\\n\");\n+\t\textra_len = sprintf(extra, \"\\n\");\n \t\tfor (i=0; i<EFUSE_MAP_SIZE; i+=16) {\n //\t\t\tDBG_871X(\"\\t0x%02x\\t\", i);\n-\t\t\tsprintf(extra, \"%s0x%02x\\t\", extra, i);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02x\\t\", i);\n \t\t\tfor (j=0; j<8; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s%02X \", extra, pEfuseHal->fakeEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \"%02X \", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\t\");\n-\t\t\tsprintf(extra, \"%s\\t\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\t\");\n \t\t\tfor (; j<16; j++) {\n //\t\t\t\tDBG_871X(\"%02X \", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n-\t\t\t\tsprintf(extra, \"%s %02X\", extra, pEfuseHal->fakeEfuseModifiedMap[i+j]);\n+\t\t\t\textra_len += sprintf(extra + extra_len, \" %02X\", pEfuseHal->fakeEfuseModifiedMap[i+j]);\n \t\t\t}\n //\t\t\tDBG_871X(\"\\n\");\n-\t\t\tsprintf(extra, \"%s\\n\", extra);\n+\t\t\textra_len += sprintf(extra + extra_len, \"\\n\");\n \t\t}\n //\t\tDBG_871X(\"\\n\");\n \n@@ -9509,9 +9515,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t//\t\tDBG_871X(\"%s: data={\", __FUNCTION__);\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i=0; i<cnts; i++) {\n \t\t\tDBG_871X(\"wlrfkrmap = 0x%02x \\n\", pEfuseHal->fakeEfuseModifiedMap[addr+i]);\n-\t\t\tsprintf(extra, \"%s0x%02X \", extra, pEfuseHal->fakeEfuseModifiedMap[addr+i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", pEfuseHal->fakeEfuseModifiedMap[addr+i]);\n \t\t}\n \t} else if (strcmp(tmp[0],\"btrfkrmap\")== 0) {\n \t\tif ((tmp[1]==NULL) || (tmp[2]==NULL)) {\n@@ -9533,9 +9540,10 @@ static int rtw_mp_efuse_get(struct net_device *dev,\n \n \t\t//\t\tDBG_871X(\"%s: data={\", __FUNCTION__);\n \t\t*extra = 0;\n+\t\textra_len = 0;\n \t\tfor (i=0; i<cnts; i++) {\n \t\t\tDBG_871X(\"wlrfkrmap = 0x%02x \\n\", pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);\n-\t\t\tsprintf(extra, \"%s0x%02X \", extra, pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \"0x%02X \", pEfuseHal->fakeBTEfuseModifiedMap[addr+i]);\n \t\t}\n \t} else {\n \t\tsprintf(extra, \"Command not found!\");\n@@ -10320,6 +10328,7 @@ static int rtw_mp_read_reg(struct net_device *dev,\n \t//u32 *data = (u32*)extra;\n \tu32 ret, i=0, j=0, strtout=0;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n+\tsize_t extra_len;\n \n \n \tif (wrqu->length > 128)\n@@ -10370,6 +10379,7 @@ static int rtw_mp_read_reg(struct net_device *dev,\n \t\tpch = tmp;\n \t\tDBG_871X(\"pch=%s\",pch);\n \n+\t\textra_len = strlen(extra);\n \t\twhile( *pch != '\\0' ) {\n \t\t\tpnext = strpbrk(pch, \" \");\n \t\t\tif (!pnext)\n@@ -10378,7 +10388,7 @@ static int rtw_mp_read_reg(struct net_device *dev,\n \t\t\tpnext++;\n \t\t\tif ( *pnext != '\\0' ) {\n \t\t\t\tstrtout = simple_strtoul (pnext , &ptmp, 16);\n-\t\t\t\tsprintf( extra, \"%s %d\" ,extra ,strtout );\n+\t\t\t\textra_len += sprintf( extra + extra_len, \" %d\", strtout );\n \t\t\t} else {\n \t\t\t\tbreak;\n \t\t\t}\n@@ -10404,6 +10414,7 @@ static int rtw_mp_read_reg(struct net_device *dev,\n \t\tpch = tmp;\n \t\tDBG_871X(\"pch=%s\",pch);\n \n+\t\textra_len = strlen(extra);\n \t\twhile( *pch != '\\0' ) {\n \t\t\tpnext = strpbrk(pch, \" \");\n \t\t\tif (!pnext)\n@@ -10412,7 +10423,7 @@ static int rtw_mp_read_reg(struct net_device *dev,\n \t\t\tpnext++;\n \t\t\tif ( *pnext != '\\0' ) {\n \t\t\t\tstrtout = simple_strtoul (pnext , &ptmp, 16);\n-\t\t\t\tsprintf( extra, \"%s %d\" ,extra ,strtout );\n+\t\t\t\textra_len += sprintf( extra + extra_len, \" %d\", strtout );\n \t\t\t} else {\n \t\t\t\tbreak;\n \t\t\t}\n@@ -10490,6 +10501,7 @@ static int rtw_mp_read_rf(struct net_device *dev,\n \tu32 path, addr;\n \tu32 ret,i=0 ,j=0,strtou=0;\n \tPADAPTER padapter = rtw_netdev_priv(dev);\n+\tsize_t extra_len = 0;\n \n \n \tif (wrqu->length > 128) return -EFAULT;\n@@ -10525,13 +10537,13 @@ static int rtw_mp_read_rf(struct net_device *dev,\n \t\tpnext++;\n \t\tif ( *pnext != '\\0' ) {\n \t\t\tstrtou = simple_strtoul (pnext , &ptmp, 16);\n-\t\t\tsprintf( extra, \"%s %d\" ,extra ,strtou );\n+\t\t\textra_len += sprintf( extra + extra_len, \" %d\", strtou );\n \t\t} else {\n \t\t\tbreak;\n \t\t}\n \t\tpch = pnext;\n \t}\n-\twrqu->length = strlen(extra);\n+\twrqu->length = extra_len;\n \n \treturn 0;\n }\n@@ -11979,20 +11991,20 @@ todo:\n \tmptbt_BtControlProcess(padapter, &BtReq);\n \n \tif (readtherm == 0) {\n-\t\tsprintf(extra, \"BT thermal=\");\n+\t\textra_len = sprintf(extra, \"BT thermal=\");\n \t\tfor (i=4; i<pMptCtx->mptOutLen; i++) {\n \t\t\tif ((pMptCtx->mptOutBuf[i]==0x00) && (pMptCtx->mptOutBuf[i+1]==0x00))\n \t\t\t\tgoto exit;\n \n #ifdef CONFIG_RTL8723A\n-\t\t\tsprintf(extra, \"%s %d \", extra, (pMptCtx->mptOutBuf[i]& 0x3f));\n+\t\t\textra_len += sprintf(extra + extra_len, \" %d \", (pMptCtx->mptOutBuf[i]& 0x3f));\n #else\n-\t\t\tsprintf(extra, \"%s %d \", extra, (pMptCtx->mptOutBuf[i]& 0x1f));\n+\t\t\textra_len += sprintf(extra + extra_len, \" %d \", (pMptCtx->mptOutBuf[i]& 0x1f));\n #endif\n \t\t}\n \t} else {\n \t\tfor (i=4; i<pMptCtx->mptOutLen; i++) {\n-\t\t\tsprintf(extra, \"%s 0x%x \", extra, pMptCtx->mptOutBuf[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%x \", pMptCtx->mptOutBuf[i]);\n \t\t}\n \t}\n \ndiff --git a/drivers/net/wireless/rtl8821cu/core/rtw_mp.c b/drivers/net/wireless/rtl8821cu/core/rtw_mp.c\nindex d966fac76f89..1cc3585750cf 100755\n--- a/drivers/net/wireless/rtl8821cu/core/rtw_mp.c\n+++ b/drivers/net/wireless/rtl8821cu/core/rtw_mp.c\n@@ -2423,14 +2423,17 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n \n \tdata[0] = '\\0';\n \n-\ti = psd_start;\n-\twhile (i < psd_stop) {\n-\t\tif (i >= psd_pts)\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n-\t\telse\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n-\t\tsprintf(data, \"%s%x \", data, psd_data);\n-\t\ti++;\n+\t{\n+\t\tsize_t extra_len = strlen(data);\n+\t\ti = psd_start;\n+\t\twhile (i < psd_stop) {\n+\t\t\tif (i >= psd_pts)\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n+\t\t\telse\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n+\t\t\textra_len += sprintf(data + extra_len, \"%x \", psd_data);\n+\t\t\ti++;\n+\t\t}\n \t}\n \n #ifdef CONFIG_LONG_DELAY_ISSUE\ndiff --git a/drivers/net/wireless/rtl8821cu/os_dep/linux/ioctl_mp.c b/drivers/net/wireless/rtl8821cu/os_dep/linux/ioctl_mp.c\nindex ad8df2d4e580..4408b3402a9f 100755\n--- a/drivers/net/wireless/rtl8821cu/os_dep/linux/ioctl_mp.c\n+++ b/drivers/net/wireless/rtl8821cu/os_dep/linux/ioctl_mp.c\n@@ -570,15 +570,15 @@ int rtw_mp_txpower_index(struct net_device *dev,\n \t\tsprintf(extra, \"patha=%d\", txpower_inx);\n \t\tif (phal_data->rf_type > RF_1T2R) {\n \t\t\ttxpower_inx = mpt_ProQueryCalTxPower(padapter, 1);\n-\t\t\tsprintf(extra, \"%s,pathb=%d\", extra, txpower_inx);\n+\t\t\tsprintf(extra + strlen(extra), \",pathb=%d\", txpower_inx);\n \t\t}\n \t\tif (phal_data->rf_type > RF_2T4R) {\n \t\t\ttxpower_inx = mpt_ProQueryCalTxPower(padapter, 2);\n-\t\t\tsprintf(extra, \"%s,pathc=%d\", extra, txpower_inx);\n+\t\t\tsprintf(extra + strlen(extra), \",pathc=%d\", txpower_inx);\n \t\t}\n \t\tif (phal_data->rf_type > RF_3T4R) {\n \t\t\ttxpower_inx = mpt_ProQueryCalTxPower(padapter, 3);\n-\t\t\tsprintf(extra, \"%s,pathd=%d\", extra, txpower_inx);\n+\t\t\tsprintf(extra + strlen(extra), \",pathd=%d\", txpower_inx);\n \t\t}\n \t}\n \twrqu->length = strlen(extra);\n@@ -1820,7 +1820,7 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\tchar *pextra = extra;\n \t\t\tRTW_INFO(\"Got format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\t\tpextra += sprintf(pextra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\t\tpadapter->mppriv.channel = channel;\n \t\t\tSetChannel(padapter);\n \t\t\tpHalData->current_channel = channel;\n@@ -2181,6 +2181,7 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \t\tchar\t*ptmp, tmp;\n \t\tu8\tcount = 0;\n \t\tu8\ti = 0;\n+\t\tsize_t extra_len;\n \n \t\tptmp = extra;\n \t\tpch = strsep(&ptmp, \",\");\n@@ -2206,13 +2207,15 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \n \t\t } while (count < 64);\n \n-\t\tfor (i = 0; i < count; i++)\n-\t\t\tsprintf(extra, \"%s:%02x\", extra, maskfileBuffer[i]);\n+\t\textra_len = strlen(extra);\n+\t\tfor (i = 0; i < count; i++) {\n+\t\t\textra_len += sprintf(extra + extra_len, \":%02x\", maskfileBuffer[i]);\n+\t\t}\n \n \t\tpadapter->registrypriv.bFileMaskEfuse = _TRUE;\n \n-\t\tsprintf(extra, \"%s\\nLoad Efuse Mask data %d hex ok\\n\", extra, count);\n-\t\twrqu->data.length = strlen(extra);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nLoad Efuse Mask data %d hex ok\\n\", count);\n+\t\twrqu->data.length = extra_len;\n \t\treturn 0;\n \t}\n \trtw_efuse_mask_file_path = extra;\n@@ -2634,16 +2637,20 @@ todo:\n \tmptbt_BtControlProcess(padapter, &BtReq);\n \n \tif (readtherm == 0) {\n+\t\tsize_t extra_len;\n \t\tsprintf(extra, \"BT thermal=\");\n+\t\textra_len = strlen(extra);\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++) {\n \t\t\tif ((pMptCtx->mptOutBuf[i] == 0x00) && (pMptCtx->mptOutBuf[i + 1] == 0x00))\n \t\t\t\tgoto exit;\n \n-\t\t\tsprintf(extra, \"%s %d \", extra, (pMptCtx->mptOutBuf[i] & 0x1f));\n+\t\t\textra_len += sprintf(extra + extra_len, \" %d \", (pMptCtx->mptOutBuf[i] & 0x1f));\n \t\t}\n \t} else {\n+\t\tsize_t extra_len;\n+\t\textra_len = strlen(extra);\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++)\n-\t\t\tsprintf(extra, \"%s 0x%x \", extra, pMptCtx->mptOutBuf[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%x \", pMptCtx->mptOutBuf[i]);\n \t}\n \n exit:\ndiff --git a/drivers/net/wireless/rtl88x2bu/core/rtw_mp.c b/drivers/net/wireless/rtl88x2bu/core/rtw_mp.c\nindex ad9755b4da91..8272e6533fa4 100644\n--- a/drivers/net/wireless/rtl88x2bu/core/rtw_mp.c\n+++ b/drivers/net/wireless/rtl88x2bu/core/rtw_mp.c\n@@ -2123,14 +2123,17 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)\n \n \tdata[0] = '\\0';\n \n-\ti = psd_start;\n-\twhile (i < psd_stop) {\n-\t\tif (i >= psd_pts)\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n-\t\telse\n-\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n-\t\tsprintf(data, \"%s%x \", data, psd_data);\n-\t\ti++;\n+\t{\n+\t\tsize_t extra_len = strlen(data);\n+\t\ti = psd_start;\n+\t\twhile (i < psd_stop) {\n+\t\t\tif (i >= psd_pts)\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i - psd_pts);\n+\t\t\telse\n+\t\t\t\tpsd_data = rtw_GetPSDData(pAdapter, i);\n+\t\t\textra_len += sprintf(data + extra_len, \"%x \", psd_data);\n+\t\t\ti++;\n+\t\t}\n \t}\n \n #ifdef CONFIG_LONG_DELAY_ISSUE\ndiff --git a/drivers/net/wireless/rtl88x2bu/os_dep/linux/ioctl_mp.c b/drivers/net/wireless/rtl88x2bu/os_dep/linux/ioctl_mp.c\nindex e82c39f6262c..0eaed1239317 100644\n--- a/drivers/net/wireless/rtl88x2bu/os_dep/linux/ioctl_mp.c\n+++ b/drivers/net/wireless/rtl88x2bu/os_dep/linux/ioctl_mp.c\n@@ -1795,7 +1795,7 @@ int rtw_mp_tx(struct net_device *dev,\n \t\t\tchar *pextra = extra;\n \t\t\tRTW_INFO(\"Got format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n-\t\t\tsprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n+\t\t\tpextra += sprintf(pextra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n \t\t\tpadapter->mppriv.channel = channel;\n \t\t\tSetChannel(padapter);\n \t\t\tpHalData->current_channel = channel;\n@@ -2159,6 +2159,7 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \t\tu8\tcount = 0;\n \t\tu8\ti = 0;\n \t\tu32\tdatalen = 0;\n+\t\tsize_t extra_len;\n \n \t\tptmp = extra;\n \t\tpch = strsep(&ptmp, \",\");\n@@ -2184,12 +2185,13 @@ int rtw_efuse_mask_file(struct net_device *dev,\n \n \t\t } while (count < 64);\n \n+\t\textra_len = strlen(extra);\n \t\tfor (i = 0; i < count; i++)\n-\t\t\tsprintf(extra, \"%s:%02x\", extra, maskfileBuffer[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \":%02x\", maskfileBuffer[i]);\n \n \t\tpadapter->registrypriv.bFileMaskEfuse = _TRUE;\n \n-\t\tsprintf(extra, \"%s\\nLoad Efuse Mask data %d hex ok\\n\", extra, count);\n+\t\textra_len += sprintf(extra + extra_len, \"\\nLoad Efuse Mask data %d hex ok\\n\", count);\n \t\twrqu->data.length = strlen(extra);\n \t\treturn 0;\n \t}\n@@ -2612,16 +2614,18 @@ todo:\n \tmptbt_BtControlProcess(padapter, &BtReq);\n \n \tif (readtherm == 0) {\n+\t\tsize_t extra_len;\n \t\tsprintf(extra, \"BT thermal=\");\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++) {\n \t\t\tif ((pMptCtx->mptOutBuf[i] == 0x00) && (pMptCtx->mptOutBuf[i + 1] == 0x00))\n \t\t\t\tgoto exit;\n \n-\t\t\tsprintf(extra, \"%s %d \", extra, (pMptCtx->mptOutBuf[i] & 0x1f));\n+\t\t\textra_len += sprintf(extra + extra_len, \" %d \", (pMptCtx->mptOutBuf[i] & 0x1f));\n \t\t}\n \t} else {\n+\t\tsize_t extra_len;\n \t\tfor (i = 4; i < pMptCtx->mptOutLen; i++)\n-\t\t\tsprintf(extra, \"%s 0x%x \", extra, pMptCtx->mptOutBuf[i]);\n+\t\t\textra_len += sprintf(extra + extra_len, \" 0x%x \", pMptCtx->mptOutBuf[i]);\n \t}\n \n exit:\ndiff --git a/drivers/net/wireless/ti/wlcore/boot.c b/drivers/net/wireless/ti/wlcore/boot.c\nindex 19b7ec7b69c2..fe642b354a84 100644\n--- a/drivers/net/wireless/ti/wlcore/boot.c\n+++ b/drivers/net/wireless/ti/wlcore/boot.c\n@@ -87,6 +87,7 @@ static int wlcore_validate_fw_ver(struct wl1271 *wl)\n \t\twl->min_mr_fw_ver : wl->min_sr_fw_ver;\n \tchar min_fw_str[32] = \"\";\n \tint i;\n+\tsize_t min_fw_len = 0;\n \n \t/* the chip must be exactly equal */\n \tif ((min_ver[FW_VER_CHIP] != WLCORE_FW_VER_IGNORE) &&\n@@ -121,11 +122,11 @@ static int wlcore_validate_fw_ver(struct wl1271 *wl)\n fail:\n \tfor (i = 0; i < NUM_FW_VER; i++)\n \t\tif (min_ver[i] == WLCORE_FW_VER_IGNORE)\n-\t\t\tsnprintf(min_fw_str, sizeof(min_fw_str),\n-\t\t\t\t  \"%s*.\", min_fw_str);\n+\t\t\tmin_fw_len += snprintf(min_fw_str + min_fw_len,\n+\t\t\t\tsizeof(min_fw_str) - min_fw_len, \"*.\");\n \t\telse\n-\t\t\tsnprintf(min_fw_str, sizeof(min_fw_str),\n-\t\t\t\t  \"%s%u.\", min_fw_str, min_ver[i]);\n+\t\t\tmin_fw_len += snprintf(min_fw_str + min_fw_len,\n+\t\t\t\tsizeof(min_fw_str) - min_fw_len, \"%u.\", min_ver[i]);\n \n \twl1271_error(\"Your WiFi FW version (%u.%u.%u.%u.%u) is invalid.\\n\"\n \t\t     \"Please use at least FW %s\\n\"\ndiff --git a/drivers/net/wireless/ti/wlcore/debugfs.h b/drivers/net/wireless/ti/wlcore/debugfs.h\nindex bfb79399d40f..31b4d4a77640 100644\n--- a/drivers/net/wireless/ti/wlcore/debugfs.h\n+++ b/drivers/net/wireless/ti/wlcore/debugfs.h\n@@ -97,12 +97,13 @@ static ssize_t sub## _ ##name## _read(struct file *file,\t\t\\\n \tstruct struct_type *stats = wl->stats.fw_stats;\t\t\t\\\n \tchar buf[DEBUGFS_FORMAT_BUFFER_SIZE] = \"\";\t\t\t\\\n \tint i;\t\t\t\t\t\t\t\t\\\n+\tsize_t buf_len = 0;\t\t\t\t\t\t\\\n \t\t\t\t\t\t\t\t\t\\\n \twl1271_debugfs_update_stats(wl);\t\t\t\t\\\n \t\t\t\t\t\t\t\t\t\\\n \tfor (i = 0; i < len; i++)\t\t\t\t\t\\\n-\t\tsnprintf(buf, sizeof(buf), \"%s[%d] = %d\\n\",\t\t\\\n-\t\t\t buf, i, stats->sub.name[i]);\t\t\t\\\n+\t\tsnprintf(buf + buf_len, sizeof(buf) - buf_len,\t\t\\\n+\t\t\t \"[%d] = %d\\n\", i, stats->sub.name[i]);\t\t\\\n \t\t\t\t\t\t\t\t\t\\\n \treturn wl1271_format_buffer(userbuf, count, ppos, \"%s\", buf);\t\\\n }\t\t\t\t\t\t\t\t\t\\\n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/esp8089.patch",
    "content": "diff --git a/drivers/net/wireless/esp8089/Makefile b/drivers/net/wireless/esp8089/Makefile\nindex f90fa50..8a22adb 100755\n--- a/drivers/net/wireless/esp8089/Makefile\n+++ b/drivers/net/wireless/esp8089/Makefile\n@@ -1,52 +1,5 @@\n MODNAME = esp8089\n \n-# By default, we try to compile the modules for the currently running\n-# kernel.  But it's the first approximation, as we will re-read the\n-# version from the kernel sources.\n-KVERS_UNAME ?= $(shell uname -r)\n-KVERS_ARCH ?= $(shell arch)\n-\n-# KBUILD is the path to the Linux kernel build tree.  It is usually the\n-# same as the kernel source tree, except when the kernel was compiled in\n-# a separate directory.\n-KBUILD ?= $(PWD)\n-\n-ifeq (,$(KBUILD))\n-$(error Kernel build tree not found - please set KBUILD to configured kernel)\n-endif\n-\n-KCONFIG := $(KBUILD)/.config\n-ifeq (,$(wildcard $(KCONFIG)))\n-$(error No .config found in $(KBUILD), please set KBUILD to configured kernel)\n-endif\n-\n-ifneq (,$(wildcard $(KBUILD)/include/linux/version.h))\n-ifneq (,$(wildcard $(KBUILD)/include/generated/uapi/linux/version.h))\n-$(error Multiple copies of version.h found, please clean your build tree)\n-endif\n-endif\n-\n-# Kernel Makefile doesn't always know the exact kernel version, so we\n-# get it from the kernel headers instead and pass it to make.\n-VERSION_H := $(KBUILD)/include/generated/utsrelease.h\n-ifeq (,$(wildcard $(VERSION_H)))\n-VERSION_H := $(KBUILD)/include/linux/utsrelease.h\n-endif\n-ifeq (,$(wildcard $(VERSION_H)))\n-VERSION_H := $(KBUILD)/include/linux/version.h\n-endif\n-ifeq (,$(wildcard $(VERSION_H)))\n-$(error Please run 'make modules_prepare' in $(KBUILD))\n-endif\n-\n-KVERS := $(shell sed -ne 's/\"//g;s/^\\#define UTS_RELEASE //p' $(VERSION_H))\n-\n-ifeq (,$(KVERS))\n-$(error Cannot find UTS_RELEASE in $(VERSION_H), please report)\n-endif\n-\n-INST_DIR = /lib/modules/$(KVERS)/misc\n-\n SRC_DIR=$(shell pwd)\n \n include $(KCONFIG)\n@@ -98,18 +51,6 @@ config_check:\n # Taken from here:\n # http://www.xkyle.com/building-linux-packages-for-kernel-drivers/\n \n-dkms:\n-\t$(MAKE) config_check\n-\techo $(DKMS_PATH)\n-\techo \"$(KVERS_UNAME)\"\n-\tmkdir -p $(DKMS_PATH)\n-\tcp -r . $(DKMS_PATH)\n-\t-rm -rf $(DKMS_PATH)/.git\n-\t-rm $(DKMS_PATH)/.gitignore\n-\t-rm $(DKMS_PATH)/*deb\n-\tdkms add -m $(PACKAGE_NAME) -v $(PACKAGE_VERSION)\n-\tdkms build -m $(PACKAGE_NAME) -v $(PACKAGE_VERSION)\n-\n dkmsdeb: dkms\n \tdkms mkdsc -m $(PACKAGE_NAME) -v $(PACKAGE_VERSION) --source-only\n \tdkms mkdeb -m $(PACKAGE_NAME) -v $(PACKAGE_VERSION) --source-only \n@@ -130,19 +71,4 @@ clean:\n \trm -f *.o *.ko .*.cmd *.mod.c *.symvers modules.order\n \trm -rf .tmp_versions\n \n-install: config_check $(MODULE)\n-\t@/sbin/modinfo $(MODULE) | grep -q \"^vermagic: *$(KVERS) \" || \\\n-\t\t{ echo \"$(MODULE)\" is not for Linux $(KVERS); exit 1; }\n-\tmkdir -p -m 755 $(DESTDIR)$(INST_DIR)\n-\tinstall -m 0644 $(MODULE) $(DESTDIR)$(INST_DIR)\n-ifndef DESTDIR\n-\t-/sbin/depmod -a $(KVERS)\n-endif\n-\n-uninstall:\n-\trm -f $(DESTDIR)$(INST_DIR)/$(MODULE)\n-ifndef DESTDIR\n-\t-/sbin/depmod -a $(KVERS)\n-endif\n-\n .PHONY: all modules clean install config_check\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/linux-RTL8821CU-fix-compile.patch",
    "content": "--- a/drivers/net/wireless/rtl8821cu/hal/phydm/halrf/rtl8821c/halrf_iqk_8821c.c\n+++ b/drivers/net/wireless/rtl8821cu/hal/phydm/halrf/rtl8821c/halrf_iqk_8821c.c\n@@ -576,9 +576,9 @@\n \t\t\t\todm_write_4byte(dm, 0x1bd8, ((0xc0000000 >> idx) + 0x1) + (i * 4) + (iqk_info->iqk_cfir_imag[channel][path][idx][i] << 9));\n \t\t\t}\n \t\t\tif (idx == 0)\n-\t\t\t\todm_set_bb_reg(dm, iqk_apply[path], BIT(0), ~(iqk_info->iqk_fail_report[channel][path][idx]));\n+\t\t\t\todm_set_bb_reg(dm, iqk_apply[path], BIT(0), !(iqk_info->iqk_fail_report[channel][path][idx]));\n \t\t\telse\n-\t\t\t\todm_set_bb_reg(dm, iqk_apply[path], BIT(10), ~(iqk_info->iqk_fail_report[channel][path][idx]));\n+\t\t\t\todm_set_bb_reg(dm, iqk_apply[path], BIT(10), !(iqk_info->iqk_fail_report[channel][path][idx]));\n \t\t}\n \t\todm_set_bb_reg(dm, R_0x1bd8, MASKDWORD, 0x0);\n \t\todm_set_bb_reg(dm, R_0x1b0c, BIT(13) | BIT(12), 0x0);\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/linux-emuelec-random_fixes_gcc10.patch",
    "content": "--- a/drivers/net/wireless/rockchip_wlan/rtl8723ds/os_dep/linux/ioctl_mp.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8723ds/os_dep/linux/ioctl_mp.c\n@@ -1820,6 +1820,7 @@\n \n \t\t} else {\n \t\t\tchar *pextra = extra;\n+            size_t extra_len;\n \t\t\tRTW_INFO(\"Got format [ch=%d,bw=%d,rate=%d,pwr=%d,ant=%d,tx=%d]\\n\", channel, bandwidth, rate, txpower, ant, txmode);\n \t\t\t_rtw_memset(extra, 0, wrqu->data.length);\n \t\t\textra_len = sprintf(extra, \"Change Current channel %d to channel %d\", padapter->mppriv.channel , channel);\n\n--- a/drivers/net/wireless/rockchip_wlan/rtl8723ds/hal/rtl8723d/sdio/rtl8723ds_xmit.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8723ds/hal/rtl8723d/sdio/rtl8723ds_xmit.c\n@@ -526,13 +526,14 @@\n \tPADAPTER padapter;\n \tstruct xmit_priv *pxmitpriv;\n \tu8 thread_name[20] = \"RTWHALXT\";\n-\n+    char tmp[50];\n \n \tret = _SUCCESS;\n \tpadapter = (PADAPTER)context;\n \tpxmitpriv = &padapter->xmitpriv;\n \n-\trtw_sprintf(thread_name, 20, \"%s-\"ADPT_FMT, thread_name, ADPT_ARG(padapter));\n+   rtw_sprintf(tmp, sizeof(tmp), \"%s-\"ADPT_FMT, thread_name, ADPT_ARG(padapter));\n+   strcat(thread_name, tmp);\n \tthread_enter(thread_name);\n \n \tRTW_INFO(\"start \"FUNC_ADPT_FMT\"\\n\", FUNC_ADPT_ARG(padapter));\n\n--- a/net/ipv4/ip_options.c\n+++ b/net/ipv4/ip_options.c\n@@ -8,6 +8,14 @@\n  * Authors:\tA.N.Kuznetsov\n  *\n  */\n+\n+/* workaround for GCC 10.30 until a better fix for this error is found\n+net/ipv4/ip_options.c: In function 'ip_options_undo':\n+net/ipv4/ip_options.c:503:3: warning: writing 4 bytes into a region of size 0 [-Wstringop-overflow=]\n+error, forbidden warning:ip_options.c:503\n+*/\n+#pragma GCC diagnostic ignored \"-Wstringop-overflow\"\n+// end workaround\n \n #define pr_fmt(fmt) \"IPv4: \" fmt\n \ndiff --git a/crypto/lrw.c b/crypto/lrw.c\nindex 376d7ed3f1f8..3c734b81b3a2 100644\n--- a/crypto/lrw.c\n+++ b/crypto/lrw.c\n@@ -377,7 +377,7 @@\n \treturn inst;\n }\n \n-static void free(struct crypto_instance *inst)\n+static void free_inst(struct crypto_instance *inst)\n {\n \tcrypto_drop_spawn(crypto_instance_ctx(inst));\n \tkfree(inst);\n@@ -386,7 +386,7 @@\n static struct crypto_template crypto_tmpl = {\n \t.name = \"lrw\",\n \t.alloc = alloc,\n-\t.free = free,\n+\t.free = free_inst,\n \t.module = THIS_MODULE,\n };\n \ndiff --git a/crypto/xts.c b/crypto/xts.c\nindex dbdd8af629e6..6d8cea94b3cf 100644\n--- a/crypto/xts.c\n+++ b/crypto/xts.c\n@@ -334,7 +334,7 @@\n \treturn inst;\n }\n \n-static void free(struct crypto_instance *inst)\n+static void free_inst(struct crypto_instance *inst)\n {\n \tcrypto_drop_spawn(crypto_instance_ctx(inst));\n \tkfree(inst);\n@@ -343,7 +343,7 @@\n static struct crypto_template crypto_tmpl = {\n \t.name = \"xts\",\n \t.alloc = alloc,\n-\t.free = free,\n+\t.free = free_inst,\n \t.module = THIS_MODULE,\n };\n \n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/linux-fix_bt.patch",
    "content": "The current codebase makes use of the zero-length array language extension\nto the C90 standard, but the preferred mechanism to declare variable-length\ntypes such as these ones is a flexible array member.\n\nSigned-off-by: Marcel Holtmann <marcel@xxxxxxxxxxxx>\n---\n include/net/bluetooth/mgmt.h | 42 ++++++++++++++++++------------------\n 1 file changed, 21 insertions(+), 21 deletions(-)\n\ndiff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h\nindex 65dd6fd1fff3..9d4d87c6028e 100644\n--- a/include/net/bluetooth/mgmt.h\n+++ b/include/net/bluetooth/mgmt.h\n@@ -70,14 +70,14 @@\n struct mgmt_rp_read_commands {\n \t__le16\tnum_commands;\n \t__le16\tnum_events;\n-\t__le16\topcodes[0];\n+\t__le16\topcodes[];\n } __packed;\n \n #define MGMT_OP_READ_INDEX_LIST\t\t0x0003\n #define MGMT_READ_INDEX_LIST_SIZE\t0\n struct mgmt_rp_read_index_list {\n \t__le16\tnum_controllers;\n-\t__le16\tindex[0];\n+\t__le16\tindex[];\n } __packed;\n \n /* Reserve one extra byte for names in management messages so that they\n@@ -181,7 +181,7 @@\n struct mgmt_cp_load_link_keys {\n \t__u8\tdebug_keys;\n \t__le16\tkey_count;\n-\tstruct\tmgmt_link_key_info keys[0];\n+\tstruct\tmgmt_link_key_info keys[];\n } __packed;\n #define MGMT_LOAD_LINK_KEYS_SIZE\t3\n \n@@ -204,7 +204,7 @@\n #define MGMT_OP_LOAD_LONG_TERM_KEYS\t0x0013\n struct mgmt_cp_load_long_term_keys {\n \t__le16\tkey_count;\n-\tstruct\tmgmt_ltk_info keys[0];\n+\tstruct\tmgmt_ltk_info keys[];\n } __packed;\n #define MGMT_LOAD_LONG_TERM_KEYS_SIZE\t2\n \n@@ -221,7 +221,7 @@\n #define MGMT_GET_CONNECTIONS_SIZE\t0\n struct mgmt_rp_get_connections {\n \t__le16 conn_count;\n-\tstruct mgmt_addr_info addr[0];\n+\tstruct mgmt_addr_info addr[];\n } __packed;\n \n #define MGMT_OP_PIN_CODE_REPLY\t\t0x0016\n@@ -411,7 +411,7 @@\n #define MGMT_OP_LOAD_IRKS\t\t0x0030\n struct mgmt_cp_load_irks {\n \t__le16 irk_count;\n-\tstruct mgmt_irk_info irks[0];\n+\tstruct mgmt_irk_info irks[];\n } __packed;\n #define MGMT_LOAD_IRKS_SIZE\t\t2\n \n@@ -463,7 +463,7 @@\n #define MGMT_OP_LOAD_CONN_PARAM\t\t0x0035\n struct mgmt_cp_load_conn_param {\n \t__le16 param_count;\n-\tstruct mgmt_conn_param params[0];\n+\tstruct mgmt_conn_param params[];\n } __packed;\n #define MGMT_LOAD_CONN_PARAM_SIZE\t2\n \n@@ -471,7 +471,7 @@\n #define MGMT_READ_UNCONF_INDEX_LIST_SIZE 0\n struct mgmt_rp_read_unconf_index_list {\n \t__le16\tnum_controllers;\n-\t__le16\tindex[0];\n+\t__le16\tindex[];\n } __packed;\n \n #define MGMT_OPTION_EXTERNAL_CONFIG\t0x00000001\n@@ -502,7 +502,7 @@\n \t__u8 type;\n \t__s8 rssi;\n \t__le16 uuid_count;\n-\t__u8 uuids[0][16];\n+\t__u8 uuids[][16];\n } __packed;\n #define MGMT_START_SERVICE_DISCOVERY_SIZE 4\n \n@@ -514,7 +514,7 @@\n struct mgmt_rp_read_local_oob_ext_data {\n \t__u8    type;\n \t__le16\teir_len;\n-\t__u8\teir[0];\n+\t__u8\teir[];\n } __packed;\n \n #define MGMT_OP_READ_EXT_INDEX_LIST\t0x003C\n@@ -525,7 +525,7 @@\n \t\t__le16 index;\n \t\t__u8   type;\n \t\t__u8   bus;\n-\t} entry[0];\n+\t} entry[];\n } __packed;\n \n #define MGMT_OP_READ_ADV_FEATURES\t0x0003D\n@@ -536,7 +536,7 @@\n \t__u8   max_scan_rsp_len;\n \t__u8   max_instances;\n \t__u8   num_instances;\n-\t__u8   instance[0];\n+\t__u8   instance[];\n } __packed;\n \n #define MGMT_OP_ADD_ADVERTISING\t\t0x003E\n@@ -547,7 +547,7 @@\n \t__le16\ttimeout;\n \t__u8\tadv_data_len;\n \t__u8\tscan_rsp_len;\n-\t__u8\tdata[0];\n+\t__u8\tdata[];\n } __packed;\n #define MGMT_ADD_ADVERTISING_SIZE\t11\n struct mgmt_rp_add_advertising {\n@@ -575,7 +575,7 @@\n struct mgmt_ev_cmd_complete {\n \t__le16\topcode;\n \t__u8\tstatus;\n-\t__u8\tdata[0];\n+\t__u8\tdata[];\n } __packed;\n \n #define MGMT_EV_CMD_STATUS\t\t0x0002\n@@ -623,7 +623,7 @@\n \tstruct mgmt_addr_info addr;\n \t__le32\tflags;\n \t__le16\teir_len;\n-\t__u8\teir[0];\n+\t__u8\teir[];\n } __packed;\n \n #define MGMT_DEV_DISCONN_UNKNOWN\t0x00\n@@ -677,7 +677,7 @@\n \t__s8\trssi;\n \t__le32\tflags;\n \t__le16\teir_len;\n-\t__u8\teir[0];\n+\t__u8\teir[];\n } __packed;\n \n #define MGMT_EV_DISCOVERING\t\t0x0013\n@@ -772,7 +772,7 @@\n struct mgmt_ev_local_oob_data_updated {\n \t__u8    type;\n \t__le16\teir_len;\n-\t__u8\teir[0];\n+\t__u8\teir[];\n } __packed;\n \n #define MGMT_EV_ADVERTISING_ADDED\t0x0023\n\ngcc-10 warns about accesses to zero-length arrays:\n\nkernel/bpf/core.c: In function 'bpf_patch_insn_single':\ncc1: warning: writing 8 bytes into a region of size 0 [-Wstringop-overflow=]\nIn file included from kernel/bpf/core.c:21:\ninclude/linux/filter.h:550:20: note: at offset 0 to object 'insnsi' with size 0 declared here\n  550 |   struct bpf_insn  insnsi[0];\n      |                    ^~~~~~\n\nIn this case, we really want to have two flexible-array members,\nbut that is not possible. Removing the union to make insnsi a\nflexible-array member while leaving insns as a zero-length array\nfixes the warning, as nothing writes to the other one in that way.\n\nThis trick only works on linux-3.18 or higher, as older versions\nhad additional members in the union.\n\nFixes: 60a3b2253c41 (\"net: bpf: make eBPF interpreter images read-only\")\nSigned-off-by: Arnd Bergmann <arnd@xxxxxxxx>\n---\n include/linux/filter.h | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/include/linux/filter.h b/include/linux/filter.h\nindex af37318bb1c5..73d06a39e2d6 100644\n--- a/include/linux/filter.h\n+++ b/include/linux/filter.h\n@@ -545,10 +545,8 @@ struct bpf_prog {\n \tunsigned int\t\t(*bpf_func)(const void *ctx,\n \t\t\t\t\t    const struct bpf_insn *insn);\n \t/* Instructions for interpreter */\n-\tunion {\n-\t\tstruct sock_filter\tinsns[0];\n-\t\tstruct bpf_insn\t\tinsnsi[0];\n-\t};\n+\tstruct sock_filter\tinsns[0];\n+\tstruct bpf_insn\t\tinsnsi[];\n };\n \n struct sk_filter {\n-- \n2.26.0\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/linux-rtl8723bu.patch",
    "content": "diff --git a/drivers/net/wireless/rockchip_wlan/rtl8723bu/os_dep/linux/usb_intf.c b/drivers/net/wireless/rockchip_wlan/rtl8723bu/os_dep/linux/usb_intf.c\nindex f16e69e8f05b..ea10f500c1c0 100755\n--- a/drivers/net/wireless/rockchip_wlan/rtl8723bu/os_dep/linux/usb_intf.c\n+++ b/drivers/net/wireless/rockchip_wlan/rtl8723bu/os_dep/linux/usb_intf.c\n@@ -126,6 +126,7 @@ static void rtw_dev_shutdown(struct device *dev)\n #endif\n \n \n+#define USB_VENDER_ID_EDIMAX\t\t0x7392\n #define USB_VENDER_ID_REALTEK\t\t0x0BDA\n \n \n@@ -194,6 +195,7 @@ static struct usb_device_id rtw_usb_id_tbl[] ={\n \t//*=== Realtek demoboard ===*/\n \t{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xB720,0xff,0xff,0xff),.driver_info = RTL8723B}, /* 8723BU 1*1 */\n \t//{USB_DEVICE(USB_VENDER_ID_REALTEK, 0xB720),.driver_info = RTL8723B}, /* 8723BU */\n+\t{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_EDIMAX, 0xA611,0xff,0xff,0xff),.driver_info = RTL8723B}, /* 8723BU 1*1 */\n #endif\n \n #ifdef CONFIG_RTL8703B\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/linux-tools-libtraceevent.patch",
    "content": "--- a/tools/lib/traceevent/Makefile\t2021-02-03 01:55:41.000000000 +0100\n+++ b/tools/lib/traceevent/Makefile.patched\t2021-03-09 19:30:54.508423866 +0100\n@@ -251,7 +251,7 @@\n \n define do_generate_dynamic_list_file\n \t(echo '{';\t\t\t\t\t\t\t\\\n-\t$(NM) -u -D $1 | awk 'NF>1 {print \"\\t\"$$2\";\"}' | sort -u;\t\\\n+\t$(NM) -u -D $1 | awk 'NF>1 {sub(\"@.*\", \"\", $$2); print \"\\t\"$$2\";\"}' | sort -u;\\\n \techo '};';\t\t\t\t\t\t\t\\\n \t) > $2\n endef\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/linux-usbhid-quircks.patch",
    "content": "diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c\nindex e6cfd32..7aa0ff0 100644\n--- a/drivers/hid/usbhid/hid-quirks.c\n+++ b/drivers/hid/usbhid/hid-quirks.c\n@@ -163,6 +163,53 @@ static const struct hid_blacklist {\n \t{ USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_2NES2SNES, HID_QUIRK_MULTI_INPUT },\n \t{ USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_4NES4SNES, HID_QUIRK_MULTI_INPUT },\n \n+// Juyao\n+\t{ 0x0314,0x0326,0x040 },\n+\t{ 0x0314,0x0328,0x040 },\n+\n+// 4NES4SNES\n+\t{ 0x1781,0x0A9D,0x040 },\n+\n+// Retrolink SNES\n+\t{ 0x1292,0x5346,0x040 },\n+\t{ 0x1292,0x5366,0x040 },\n+\n+// Retrobit Atari to USB Driver\n+\t{ 0x1292,0x4154,0x040 },\n+\n+// Retrobit Genesis to PC USB Adapter\n+\t{ 0x1292,0x4745,0x040 },\n+\n+// Retrode\n+\t{ 0x0403,0x97c1,0x040 },\n+\n+// HuiJia  USB GamePad Mayflash Sega Saturn\n+\t{ 0x0e8f,0x3010,0x040 },\n+\n+// HuiJia  USB GamePad Mayflash NES SNES\n+\t{ 0x0079,0x1804,0x040 },\n+\n+// Mayflash Dreamcast\n+\t{ 0x0e8f,0x3013,0x040 },\n+\n+// Xin-Mo 2players 20pins\n+\t{ 0x16c0,0x75e1,0x040 },\n+\n+// Xinmo 18 pins USB THT 2P arcade controller THT 2P arcade controller\n+\t{ 0x16c0,0x05e1,0x040 },\n+\n+// USB PS2 Adapter GreenAsia Electronics\n+\t{ 0xe8f,0x1013,0x040 },\n+\n+// HuiJia  USB GamePad Mayflash N64 - need test\n+\t{ 0xe8f,0x3013,0x040 },\n+\n+// XCSOURCE 2 Encoder USB - Twin USB Gamepad\n+\t{ 0x810,0xe001,0x040 },\n+\n+// 3H Dual Arcade 2Players\n+\t{ 0x16c0,0x05e0,0x040 },\n+\n \t{ 0, 0 }\n };\n \n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/linux-wiimote-abs-not-hat.patch",
    "content": "diff --git a/drivers/hid/hid-wiimote-modules.c b/drivers/hid/hid-wiimote-modules.c\nindex 4390eee..76ed60b 100644\n--- a/drivers/hid/hid-wiimote-modules.c\n+++ b/drivers/hid/hid-wiimote-modules.c\n@@ -1113,12 +1113,12 @@ static void wiimod_classic_in_ext(struct wiimote_data *wdata, const __u8 *ext)\n \trt <<= 1;\n \tlt <<= 1;\n \n-\tinput_report_abs(wdata->extension.input, ABS_HAT1X, lx - 0x20);\n-\tinput_report_abs(wdata->extension.input, ABS_HAT1Y, ly - 0x20);\n-\tinput_report_abs(wdata->extension.input, ABS_HAT2X, rx - 0x20);\n-\tinput_report_abs(wdata->extension.input, ABS_HAT2Y, ry - 0x20);\n-\tinput_report_abs(wdata->extension.input, ABS_HAT3X, rt);\n-\tinput_report_abs(wdata->extension.input, ABS_HAT3Y, lt);\n+\tinput_report_abs(wdata->extension.input, ABS_HAT0X, lx - 0x20);\n+\tinput_report_abs(wdata->extension.input, ABS_HAT0Y, ly - 0x20);\n+\tinput_report_abs(wdata->extension.input, ABS_HAT1X, rx - 0x20);\n+\tinput_report_abs(wdata->extension.input, ABS_HAT1Y, ry - 0x20);\n+\tinput_report_abs(wdata->extension.input, ABS_HAT2X, rt);\n+\tinput_report_abs(wdata->extension.input, ABS_HAT2Y, lt);\n \n \tinput_report_key(wdata->extension.input,\n \t\t\t wiimod_classic_map[WIIMOD_CLASSIC_KEY_RIGHT],\n@@ -1228,12 +1228,16 @@ static int wiimod_classic_probe(const struct wiimod_ops *ops,\n \t\t\twdata->extension.input->keybit);\n \n \tset_bit(EV_ABS, wdata->extension.input->evbit);\n+\tset_bit(ABS_HAT0X, wdata->extension.input->absbit);\n+\tset_bit(ABS_HAT0Y, wdata->extension.input->absbit);\n \tset_bit(ABS_HAT1X, wdata->extension.input->absbit);\n \tset_bit(ABS_HAT1Y, wdata->extension.input->absbit);\n \tset_bit(ABS_HAT2X, wdata->extension.input->absbit);\n \tset_bit(ABS_HAT2Y, wdata->extension.input->absbit);\n-\tset_bit(ABS_HAT3X, wdata->extension.input->absbit);\n-\tset_bit(ABS_HAT3Y, wdata->extension.input->absbit);\n+\tinput_set_abs_params(wdata->extension.input,\n+\t\t\t     ABS_HAT0X, -30, 30, 1, 1);\n+\tinput_set_abs_params(wdata->extension.input,\n+\t\t\t     ABS_HAT0Y, -30, 30, 1, 1);\n \tinput_set_abs_params(wdata->extension.input,\n \t\t\t     ABS_HAT1X, -30, 30, 1, 1);\n \tinput_set_abs_params(wdata->extension.input,\n@@ -1242,10 +1246,6 @@ static int wiimod_classic_probe(const struct wiimod_ops *ops,\n \t\t\t     ABS_HAT2X, -30, 30, 1, 1);\n \tinput_set_abs_params(wdata->extension.input,\n \t\t\t     ABS_HAT2Y, -30, 30, 1, 1);\n-\tinput_set_abs_params(wdata->extension.input,\n-\t\t\t     ABS_HAT3X, -30, 30, 1, 1);\n-\tinput_set_abs_params(wdata->extension.input,\n-\t\t\t     ABS_HAT3Y, -30, 30, 1, 1);\n \n \tret = input_register_device(wdata->extension.input);\n \tif (ret)\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/patches/base/v2-arm64-atomics-lse-Dereference-matching-size.diff",
    "content": "diff --git a/arch/arm64/include/asm/atomic_lse.h b/arch/arm64/include/asm/atomic_lse.h\nindex d955ade5df7c..5d460f6b7675 100644\n--- a/arch/arm64/include/asm/atomic_lse.h\n+++ b/arch/arm64/include/asm/atomic_lse.h\n@@ -249,7 +249,7 @@ __lse__cmpxchg_case_##name##sz(volatile void *ptr,\t\t\t\\\n \t\"\tmov\t%\" #w \"[tmp], %\" #w \"[old]\\n\"\t\t\t\\\n \t\"\tcas\" #mb #sfx \"\\t%\" #w \"[tmp], %\" #w \"[new], %[v]\\n\"\t\\\n \t\"\tmov\t%\" #w \"[ret], %\" #w \"[tmp]\"\t\t\t\\\n-\t: [ret] \"+r\" (x0), [v] \"+Q\" (*(unsigned long *)ptr),\t\t\\\n+\t: [ret] \"+r\" (x0), [v] \"+Q\" (*(u##sz *)ptr),\t\t\t\\\n \t  [tmp] \"=&r\" (tmp)\t\t\t\t\t\t\\\n \t: [old] \"r\" (x1), [new] \"r\" (x2)\t\t\t\t\\\n \t: cl);\t\t\t\t\t\t\t\t\\\ndiff --git a/arch/arm64/include/asm/cmpxchg.h b/arch/arm64/include/asm/cmpxchg.h\nindex f9bef42c1411..497acf134d99 100644\n--- a/arch/arm64/include/asm/cmpxchg.h\n+++ b/arch/arm64/include/asm/cmpxchg.h\n@@ -243,7 +243,7 @@ static inline void __cmpwait_case_##sz(volatile void *ptr,\t\t\\\n \t\"\tcbnz\t%\" #w \"[tmp], 1f\\n\"\t\t\t\t\\\n \t\"\twfe\\n\"\t\t\t\t\t\t\t\\\n \t\"1:\"\t\t\t\t\t\t\t\t\\\n-\t: [tmp] \"=&r\" (tmp), [v] \"+Q\" (*(unsigned long *)ptr)\t\t\\\n+\t: [tmp] \"=&r\" (tmp), [v] \"+Q\" (*(u##sz *)ptr)\t\t\t\\\n \t: [val] \"r\" (val));\t\t\t\t\t\t\\\n }\n \n"
  },
  {
    "path": "projects/Rockchip/packages/linux/sysctl.d/network.conf",
    "content": "net.ipv4.tcp_no_metrics_save=1\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/sysctl.d/qdisc.conf",
    "content": "net.core.default_qdisc = fq_codel\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/udev.d/30-disable-wakeup.rules",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nACTION!=\"add|change\", GOTO=\"end\"\n\nDRIVER==\"ehci-pci|xhci_hcd\", RUN+=\"/usr/bin/sh -c 'echo disabled > /sys/$devpath/power/wakeup'\"\n\nLABEL=\"end\"\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/udev.d/40-modeswitch.rules",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nACTION!=\"add|change\", GOTO=\"end_modeswitch\"\nKERNEL!=\"sr[0-9]*\", GOTO=\"end_modeswitch\"\nSUBSYSTEM!=\"block\", GOTO=\"end_modeswitch\"\n\n# Atheros Wireless / Netgear WNDA3200\nATTRS{idVendor}==\"0cf3\", ATTRS{idProduct}==\"20ff\", RUN+=\"/usr/bin/eject '/dev/%k'\"\n\n# Realtek 8211CU Wifi AC USB / Ships with Odroid-Go Super!\nATTRS{idVendor}==\"0bda\", ATTRS{idProduct}==\"1a2b\", RUN+=\"/usr/sbin/usb_modeswitch -K -v 0bda -p 1a2b\"\n\nLABEL=\"end_modeswitch\"\n"
  },
  {
    "path": "projects/Rockchip/packages/linux/udev.d/50-wlan-powersave.rules",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)\n\nACTION==\"add\", SUBSYSTEM==\"net\", KERNEL==\"wlan*\" RUN+=\"/usr/sbin/iw dev %k set power_save off\"\n"
  },
  {
    "path": "projects/Rockchip/packages/mali-bifrost/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"mali-bifrost\"\nPKG_VERSION=\"ad4c28932c3d07c75fc41dd4a3333f9013a25e7f\"\nPKG_SHA256=\"8b7bd1f969e778459d79a51e5f58c26eda0b818580966daba16ee2fc08f4c151\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"nonfree\"\nPKG_SITE=\"https://github.com/emuelec/libmali\"\nPKG_URL=\"${PKG_SITE}/archive/${PKG_VERSION}.tar.gz\"\nPKG_DEPENDS_TARGET=\"toolchain libdrm\"\nPKG_LONGDESC=\"The Mali GPU library used in Rockchip Platform for Odroidgo Advance\"\n\n#PKG_MESON_OPTS_TARGET+=\" -Dplatform=gbm -Dgpu=bifrost-g52 -Dversion=g2p0\"\n\npre_configure_target() {\n\nif [ \"${DEVICE}\" != \"RK356x\" ] && [ \"$DEVICE\" != \"OdroidM1\" ]; then\n# Testing new version, Vulkan in the name means nothing, Vulkan is not working.\nBLOB_PKG=\"rk3326_r13p0_gbm_with_vulkan_and_cl.zip\"\nBLOB_SUM=\"ef1a18fabf270d0a6029917d6b0e6237d328613c2f8be4d420ea23e022288dd9\"\n\nif [ ! -e \"${SOURCES}/${PKG_NAME}/${BLOB_PKG}\" ]\n  then\n    curl -Lo \"${SOURCES}/${PKG_NAME}/${BLOB_PKG}\" \"https://dn.odroid.com/RK3326/ODROID-GO-Advance/${BLOB_PKG}\"\n  fi\n  DLD_SUM=$(sha256sum \"${SOURCES}/${PKG_NAME}/${BLOB_PKG}\" | awk '{printf $1}')\n  if [ ! \"${DLD_SUM}\" == \"${BLOB_SUM}\" ]\n  then\n    echo \"Blob package mismatch, exiting.\"\n    exit 1\n  fi\n\n  unzip -o \"${SOURCES}/${PKG_NAME}/${BLOB_PKG}\" -d ${PKG_BUILD}\n\nfi\n}\n\nREAL_SYSROOT=${SYSROOT_PREFIX}\n\nmakeinstall_target() {\n\t# remove all the extra blobs, we only need one\n\trm -rf ${INSTALL}/usr\n\nif [ \"${DEVICE}\" != \"RK356x\" ] && [ \"$DEVICE\" != \"OdroidM1\" ]; then\n\tif [ \"$ARCH\" == \"arm\" ]; then\n\t\tBLOB=\"libmali.so_rk3326_gbm_arm32_r13p0_with_vulkan_and_cl\"\n\telse\n\t\tBLOB=\"libmali.so_rk3326_gbm_arm64_r13p0_with_vulkan_and_cl\"\n\tfi\nelse\n\tif [ \"$ARCH\" == \"arm\" ]; then\n\t\tBLOB=\"lib/arm-linux-gnueabihf/libmali-bifrost-g52-g2p0-gbm.so\"\n\telse\n\t\tBLOB=\"lib/aarch64-linux-gnu/libmali-bifrost-g52-g2p0-gbm.so\"\n\tfi\nfi\n\n\tmkdir -p ${INSTALL}/usr/lib/\n\tcp ${PKG_BUILD}/${BLOB} ${INSTALL}/usr/lib/libmali.so\n\n\tln -sf /usr/lib/libmali.so ${INSTALL}/usr/lib/libEGL.so\n\tln -sf /usr/lib/libmali.so ${INSTALL}/usr/lib/libEGL.so.1\n\tln -sf /usr/lib/libmali.so ${INSTALL}/usr/lib/libgbm.so\t\n\tln -sf /usr/lib/libmali.so ${INSTALL}/usr/lib/libgbm.so.1\n\tln -sf /usr/lib/libmali.so ${INSTALL}/usr/lib/libGLESv2.so\n\tln -sf /usr/lib/libmali.so ${INSTALL}/usr/lib/libGLESv2.so.2\n\tln -sf /usr/lib/libmali.so ${INSTALL}/usr/lib/libGLESv3.so\n\tln -sf /usr/lib/libmali.so ${INSTALL}/usr/lib/libGLESv3.so.3\n\tln -sf /usr/lib/libmali.so ${INSTALL}/usr/lib/libGLESv1_CM.so.1\n\tln -sf /usr/lib/libmali.so ${INSTALL}/usr/lib/libGLES_CM.so.1\n\tln -sf /usr/lib/libmali.so ${INSTALL}/usr/lib/libmali.so.1\n\n\tcp ${PKG_BUILD}/.${TARGET_NAME}/meson-private/*.pc ${REAL_SYSROOT}/usr/lib/pkgconfig\n\tcp -pr ${PKG_BUILD}/include ${REAL_SYSROOT}/usr\n\tcp ${PKG_BUILD}/include/GBM/gbm.h ${REAL_SYSROOT}/usr/include/gbm.h\n\tcp ${PKG_BUILD}/include/KHR/mali_khrplatform.h ${REAL_SYSROOT}/usr/include/KHR/khrplatform.h\n\t\n\tmkdir -p ${REAL_SYSROOT}/usr/lib\n\t\n\tcp ${PKG_BUILD}/${BLOB}  ${REAL_SYSROOT}/usr/lib/libmali.so\n\n\tln -sf ${REAL_SYSROOT}/usr/lib/libmali.so ${REAL_SYSROOT}/usr/lib/libEGL.so\n\tln -sf ${REAL_SYSROOT}/usr/lib/libmali.so ${REAL_SYSROOT}/usr/lib/libEGL.so.1\n\tln -sf ${REAL_SYSROOT}/usr/lib/libmali.so ${REAL_SYSROOT}/usr/lib/libgbm.so\n\tln -sf ${REAL_SYSROOT}/usr/lib/libmali.so ${REAL_SYSROOT}/usr/lib/libgbm.so.1\n\tln -sf ${REAL_SYSROOT}/usr/lib/libmali.so ${REAL_SYSROOT}/usr/lib/libGLESv2.so\n\tln -sf ${REAL_SYSROOT}/usr/lib/libmali.so ${REAL_SYSROOT}/usr/lib/libGLESv2.so.2\n\tln -sf ${REAL_SYSROOT}/usr/lib/libmali.so ${REAL_SYSROOT}/usr/lib/libGLESv3.so\n\tln -sf ${REAL_SYSROOT}/usr/lib/libmali.so ${REAL_SYSROOT}/usr/lib/libGLESv3.so.3\n\tln -sf ${REAL_SYSROOT}/usr/lib/libmali.so ${REAL_SYSROOT}/usr/lib/libGLESv1_CM.so.1\n\tln -sf ${REAL_SYSROOT}/usr/lib/libmali.so ${REAL_SYSROOT}/usr/lib/libGLES_CM.so.1\n\tln -sf /usr/lib/libmali.so ${INSTALL}/usr/lib/libmali.so.1\n}\n"
  },
  {
    "path": "projects/Rockchip/packages/mali-bifrost/patches/mali-bitfrost-001-gbminclude.patch",
    "content": "diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h\nindex 184e204..746a7ec 100644\n--- a/include/EGL/eglplatform.h\n+++ b/include/EGL/eglplatform.h\n@@ -1,6 +1,7 @@\n #ifndef __eglplatform_h_\n #define __eglplatform_h_\n \n+#include <gbm.h>\n /*\n ** Copyright (c) 2007-2016 The Khronos Group Inc.\n **\n"
  },
  {
    "path": "projects/Rockchip/packages/retrorun/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)\n\nPKG_NAME=\"retrorun\"\nPKG_VERSION=\"c83f1095351c82be9b04cdebd61ca0e03ef4cfb7\"\nPKG_LICENSE=\"GPLv2\"\nPKG_SITE=\"https://github.com/navy1978/retrorun-go2\"\nPKG_URL=\"$PKG_SITE.git\"\nPKG_DEPENDS_TARGET=\"toolchain libgo2 libdrm\"\nPKG_TOOLCHAIN=\"make\"\n\npre_configure_target() {\n\tCFLAGS+=\" -I$(get_build_dir libdrm)/include/drm\"\n\tCFLAGS+=\" -I$(get_build_dir linux)/include/uapi\"\n\tCFLAGS+=\" -I$(get_build_dir linux)/tools/include\"\n\tPKG_MAKE_OPTS_TARGET=\" config=release ARCH=\" \n\n\tsed -i \"s|/storage/.config/distribution/|/emuelec/|g\" ${PKG_BUILD}/src/main.cpp\n\trm ${PKG_BUILD}/retrorun\n}\n\nmakeinstall_target() {\n\tmkdir -p ${INSTALL}/usr/bin\n\tmkdir -p ${INSTALL}/usr/config/emuelec/configs/\n\tif [ ${ARCH} == \"arm\" ]; then\n\t\tcp retrorun $INSTALL/usr/bin/retrorun32\n\telse\n\t\tcp retrorun ${INSTALL}/usr/bin/retrorun\n\tfi\n\tcp ${PKG_BUILD}/setting.cfg ${INSTALL}/usr/config/emuelec/configs/retrorun.cfg\n\t\n\t\n}\n"
  },
  {
    "path": "projects/Rockchip/packages/retrorun/patches/001-tatemode.patch",
    "content": "diff --git a/retrorun b/retrorun\nindex 5491dd6..a5a26ec 100755\nBinary files a/retrorun and b/retrorun differ\ndiff --git a/src/globals.cpp b/src/globals.cpp\nindex ff0621b..bc72f01 100755\n--- a/src/globals.cpp\n+++ b/src/globals.cpp\n@@ -7,6 +7,7 @@ RETRORUN_CORE_TYPE Retrorun_Core = RETRORUN_CORE_UNKNOWN;\n Device device = UNKNOWN;\n bool force_left_analog_stick = true;\n\n+bool opt_is_tate = false;\n bool opt_triggers = false;\n bool gpio_joypad = false;\n float opt_aspect = 0.0f;\ndiff --git a/src/globals.h b/src/globals.h\nindex 23f3bc0..4cbf6de 100755\n--- a/src/globals.h\n+++ b/src/globals.h\n@@ -47,6 +47,7 @@ extern bool force_left_analog_stick;\n\n extern float fps;\n extern bool opt_triggers;\n+extern bool opt_is_tate;\n extern bool gpio_joypad;\n extern float opt_aspect;\n extern float aspect_ratio;\ndiff --git a/src/main.cpp b/src/main.cpp\nindex 0cbbfe2..2d7a799 100644\n--- a/src/main.cpp\n+++ b/src/main.cpp\n@@ -98,6 +98,7 @@ struct option longopts[] = {\n     {\"triggers\", no_argument, NULL, 't'},\n     {\"analog\", no_argument, NULL, 'n'},\n     {\"fps\", no_argument, NULL, 'f'},\n+\t\t{\"tatemode\", no_argument, NULL, 'z'},\n     {0, 0, 0, 0}};\n\n static struct\n@@ -883,7 +884,7 @@ int main(int argc, char *argv[])\n     int c;\n     int option_index = 0;\n\n-    while ((c = getopt_long(argc, argv, \"s:d:a:b:v:grtnfc:\", longopts, &option_index)) != -1)\n+    while ((c = getopt_long(argc, argv, \"s:d:a:b:v:grtnfcz:\", longopts, &option_index)) != -1)\n     {\n         switch (c)\n         {\n@@ -929,7 +930,9 @@ int main(int argc, char *argv[])\n         case 'c':\n             opt_setting_file = optarg;\n             break;\n-\n+\t\t\t\tcase 'z':\n+\t\t\t\t\t\topt_is_tate = true;\n+\t\t\t\t\t\tbreak;\n         default:\n             printf(\"Unknown option. '%s'\\n\", longopts[option_index].name);\n             exit(EXIT_FAILURE);\ndiff --git a/src/video.cpp b/src/video.cpp\nindex d168eda..66238ee 100755\n--- a/src/video.cpp\n+++ b/src/video.cpp\n@@ -577,6 +577,7 @@ bool cmpf(float A, float B, float epsilon = 0.005f)\n void prepareScreen(int width, int height)\n {\n     screen_aspect_ratio = (float)go2_display_height_get(display) / (float)go2_display_width_get(display);\n+\t\tisTate = opt_is_tate;\n     if (aspect_ratio >= 1.0f)\n     {\n         if (isWideScreen)\n@@ -641,7 +642,7 @@ void prepareScreen(int width, int height)\n         y = 0;\n         h = go2_display_height_get(display);\n         w = go2_display_width_get(display);\n-        isTate = (Retrorun_Core == RETRORUN_CORE_FLYCAST); // we rotate the screen (Tate) for some arcade games when apsect ratio < 0\n+        // isTate = (Retrorun_Core == RETRORUN_CORE_FLYCAST); // we rotate the screen (Tate) for some arcade games when apsect ratio < 0\n     }\n }"
  },
  {
    "path": "projects/Rockchip/packages/systemd/scripts/cpufreq",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nSYS_CPUFREQ_GOV=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)\n\nif [ \"${SYS_CPUFREQ_GOV}\" = \"ondemand\" ]; then\n  for io_is_busy in $(find /sys/devices/system/cpu -name io_is_busy); do\n    echo 1 > \"${io_is_busy}\"\n  done\n  for up_threshold in $(find /sys/devices/system/cpu -name up_threshold); do\n    echo 50 > \"${up_threshold}\"\n  done\n  for sampling_rate in $(find /sys/devices/system/cpu -name sampling_rate); do\n    echo 100000 > \"${sampling_rate}\"\n  done\n  for sampling_down_factor in $(find /sys/devices/system/cpu -name sampling_down_factor); do\n    echo 50 > \"${sampling_down_factor}\"\n  done\nelse\n  echo \"cpufreq: settings not found for current cpu governor.\" | systemd-cat -p info\nfi\n"
  },
  {
    "path": "projects/Rockchip/packages/u-boot/package.mk",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nPKG_NAME=\"u-boot\"\nPKG_ARCH=\"arm aarch64\"\nPKG_LICENSE=\"GPL\"\nPKG_SITE=\"https://www.denx.de/wiki/U-Boot\"\nPKG_DEPENDS_TARGET=\"toolchain swig:host dtc:host\"\nPKG_LONGDESC=\"Das U-Boot is a cross-platform bootloader for embedded systems.\"\n\nPKG_IS_KERNEL_PKG=\"yes\"\nPKG_STAMP=\"$UBOOT_SYSTEM\"\n\n[ -n \"$ATF_PLATFORM\" ] && PKG_DEPENDS_TARGET+=\" atf\"\n\nPKG_NEED_UNPACK=\"$PROJECT_DIR/$PROJECT/bootloader\"\n[ -n \"$DEVICE\" ] && PKG_NEED_UNPACK+=\" $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader\"\n\ncase \"$PROJECT\" in\n  Rockchip)\n  if [ \"$DEVICE\" == \"OdroidGoAdvance\" ]; then\n  \t# This is specific for the Rk3326 Odroid Go Advance/Super\n    PKG_VERSION=\"0e26e35cb18a80005b7de45c95858c86a2f7f41e\"\n    PKG_SHA256=\"0e0939ba2fdb68dba26dca759092e63d4a63c43068af97deccbb2609e9675485\"\n    PKG_URL=\"https://github.com/hardkernel/u-boot/archive/$PKG_VERSION.tar.gz\"\n    PKG_PATCH_DIRS=\"OdroidGoAdvance base\"\n  elif [ \"$DEVICE\" == \"GameForce\" ]; then\n  \t# This is specific for the Rk3326 GameForce Chi\n    PKG_VERSION=\"3f696081df4f44ef2ccfe2d7033889607bb7dd45\"\n    PKG_SHA256=\"e192e74f708f93cbeabdb7c5c1fbc6e49b5b2e036ad484f5aecf19e03cfabc9e\"\n    PKG_URL=\"https://github.com/shantigilbert/u-boot/archive/$PKG_VERSION.tar.gz\"\n\tPKG_PATCH_DIRS=\"GameForce base\"\n  elif [ \"$DEVICE\" == \"OdroidM1\" ]; then\n\tPKG_VERSION=\"0677e140ba015b95ccd6d762ce51a4c6860a49ca\"\n\tPKG_SHA256=\"210b3c0f0e27a72be1aeff860a712bd2fc694c015f835ffd75dea6531502521a\"\n\tPKG_URL=\"https://github.com/hardkernel/u-boot/archive/$PKG_VERSION.tar.gz\"\n\tPKG_PATCH_DIRS=\"OdroidM1\"\n  elif [ \"$DEVICE\" == \"RK356x\" ]; then\n    PKG_VERSION=\"fc354ea827411c1cc35ddf76162aed02f7a9c7d5\"\n    PKG_SHA256=\"eefe0b87e40d801a649a4ea6e062ed239aa08be1cbf81fa4e6a13e9344bf556d\"\n    PKG_URL=\"https://gitlab.com/firefly-linux/u-boot/-/archive/$PKG_VERSION/u-boot-$PKG_VERSION.tar.gz\"\n    PKG_PATCH_DIRS=\"RK356x\"\n   else\n    PKG_VERSION=\"8659d08d2b589693d121c1298484e861b7dafc4f\"\n    PKG_SHA256=\"3f9f2bbd0c28be6d7d6eb909823fee5728da023aca0ce37aef3c8f67d1179ec1\"\n    PKG_URL=\"https://github.com/rockchip-linux/u-boot/archive/$PKG_VERSION.tar.gz\"\n    PKG_PATCH_DIRS=\"rockchip base\"\n  fi\n    PKG_DEPENDS_TARGET+=\" rkbin\"\n    PKG_NEED_UNPACK+=\" $(get_pkg_directory rkbin)\"\n    ;;\n  *)\n    PKG_VERSION=\"2019.04\"\n    PKG_SHA256=\"76b7772d156b3ddd7644c8a1736081e55b78828537ff714065d21dbade229bef\"\n    PKG_URL=\"http://ftp.denx.de/pub/u-boot/u-boot-$PKG_VERSION.tar.bz2\"\n    ;;\nesac\n\npost_patch() {\n  if [ -n \"$UBOOT_SYSTEM\" ] && find_file_path bootloader/config; then\n    PKG_CONFIG_FILE=\"$PKG_BUILD/configs/$($ROOT/$SCRIPTS/uboot_helper $PROJECT $DEVICE $UBOOT_SYSTEM config)\"\n    if [ -f \"$PKG_CONFIG_FILE\" ]; then\n      cat $FOUND_PATH >> \"$PKG_CONFIG_FILE\"\n    fi\n  fi\n}\n\nmake_target() {\nexport KCFLAGS=\"-Wno-error=address-of-packed-member -Wno-error=maybe-uninitialized -Wno-address\"\n  if [ -z \"$UBOOT_SYSTEM\" ]; then\n    echo \"UBOOT_SYSTEM must be set to build an image\"\n    echo \"see './scripts/uboot_helper' for more information\"\n  else\n\t\tif [ \"$DEVICE\" == \"RK356x\" ]; then\n\t\t\tsed -i \"s|CROSS_COMPILE_ARM64=\\..*|CROSS_COMPILE_ARM64=${TOOLCHAIN}/bin/${TARGET_NAME}-|\" make.sh\n\t\t\tsed -i \"s|aarch64-linux-gnu|${TARGET_NAME}|g\" make.sh\n\t\t\tsed -i \"s|PATH\\=$(get_build_dir rkbin)/bin/rk35/|PATH\\=bin/rk35/|g\" $(get_build_dir rkbin)/RKTRUST/RK3568TRUST.ini\n\t\t\tsed -i \"s|1\\=$(get_build_dir rkbin)/bin/rk35/|1\\=bin/rk35/|g\" $(get_build_dir rkbin)/RKBOOT/RK3568MINIALL.ini \n\t\t\tsed -i \"s|python2|python3|g\" arch/arm/mach-rockchip/decode_bl31.py\n\t\t\tsed -i \"s|python2|python3|g\" make.sh\n\t\t\tsed -i \"s|\\.\\./rkbin|$(get_build_dir rkbin)|\" make.sh\n\t\t\tsed -i \"s|\\.\\./rkbin|$(get_build_dir rkbin)|\" scripts/fit.sh\n\t\t\tcd $PKG_BUILD\n\t\t\t./make.sh $($ROOT/$SCRIPTS/uboot_helper $PROJECT $DEVICE $UBOOT_SYSTEM config | sed \"s|_defconfig||\") --spl-new --burn-key-hash\n\t\t\t./make.sh --idblock\n\t\telif [ \"$DEVICE\" == \"OdroidM1\" ]; then\n\t\t\tsed -i \"s|CROSS_COMPILE_ARM64=.*|CROSS_COMPILE_ARM64=${TOOLCHAIN}/bin/${TARGET_NAME}-|\" make.sh\n\t\t\tsed -i \"s|aarch64-linux-gnu|${TARGET_NAME}|g\" make.sh\n\t\t\tsed -i \"s|FlashBoot=../spl/u-boot-spl.bin|FlashBoot=${PKG_BUILD}/spl/u-boot-spl.bin|g\" $(get_build_dir rkbin)/RKBOOT/RK3568-ODROIDM1.ini \n\t\t\tsed -i \"s|python2|python3|g\" arch/arm/mach-rockchip/decode_bl31.py\n\t\t\tsed -i \"s|python2|python3|g\" make.sh\n\t\t\tsed -i \"s|RKBIN_TOOLS=.*|RKBIN_TOOLS=$(get_build_dir rkbin)/tools|\" make.sh\n\t\t\tsed -i \"s|RK_SIGN_TOOL=\\\"rkbin/tools|RK_SIGN_TOOL=\\\"$(get_build_dir rkbin)/tools|\" scripts/fit.sh\n\t\t\tcd ${PKG_BUILD}\n\t\t\tsed -i \"s|PATH=$(get_build_dir rkbin)/bin/rk35/|PATH\\=bin/rk35/|g\" $(get_build_dir rkbin)/RKTRUST/RK3568TRUST.ini\n\t\t\t./make.sh $($ROOT/$SCRIPTS/uboot_helper $PROJECT $DEVICE $UBOOT_SYSTEM config | sed \"s|_defconfig||\")\n\t\t\tsed -i \"s|SPL_BIN=\\${RKBIN}.*|SPL_BIN=${PKG_BUILD}/spl/u-boot-spl.bin|g\" make.sh\n\t\t\t./make.sh --idblock\n\t\t\tsed -i \"s|PATH=bin/rk35/|PATH\\=$(get_build_dir rkbin)/bin/rk35/|g\" $(get_build_dir rkbin)/RKTRUST/RK3568TRUST.ini\n\t\t\t$(get_build_dir rkbin)/tools/trust_merger --verbose $(get_build_dir rkbin)/RKTRUST/RK3568TRUST.ini\n\t\t\t./make.sh loader $(get_build_dir rkbin)/RKBOOT/RK3568-ODROIDM1.ini \n\t\telse\n\t\t\t[ \"${BUILD_WITH_DEBUG}\" = \"yes\" ] && PKG_DEBUG=1 || PKG_DEBUG=0\n\t\t\t[ -n \"$ATF_PLATFORM\" ] &&  cp -av $(get_build_dir atf)/bl31.bin .\n\t\t\tDEBUG=${PKG_DEBUG} CROSS_COMPILE=\"$TARGET_KERNEL_PREFIX\" LDFLAGS=\"\" ARCH=arm make mrproper\n\t\t\tDEBUG=${PKG_DEBUG} CROSS_COMPILE=\"$TARGET_KERNEL_PREFIX\" LDFLAGS=\"\" ARCH=arm make $($ROOT/$SCRIPTS/uboot_helper $PROJECT $DEVICE $UBOOT_SYSTEM config)\n\t\t\tDEBUG=${PKG_DEBUG} CROSS_COMPILE=\"$TARGET_KERNEL_PREFIX\" LDFLAGS=\"\" ARCH=arm _python_sysroot=\"$TOOLCHAIN\" _python_prefix=/ _python_exec_prefix=/ make HOSTCC=\"$HOST_CC\" HOSTLDFLAGS=\"-L$TOOLCHAIN/lib\" HOSTSTRIP=\"true\" CONFIG_MKIMAGE_DTC_PATH=\"scripts/dtc/dtc\"\n\t\tfi\n  fi\n}\n\nmakeinstall_target() {\n  mkdir -p $INSTALL/usr/share/bootloader\n\n    # Only install u-boot.img et al when building a board specific image\n    if [ -n \"$UBOOT_SYSTEM\" ]; then\n      find_file_path bootloader/install && . ${FOUND_PATH}\n    fi\n\n    # Always install the update script\n    find_file_path bootloader/update.sh && cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n\n    # Always install the canupdate script\n    if find_file_path bootloader/canupdate.sh; then\n      cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader\n      sed -e \"s/@PROJECT@/${DEVICE:-$PROJECT}/g\" \\\n          -i $INSTALL/usr/share/bootloader/canupdate.sh\n    fi\n}\n"
  },
  {
    "path": "projects/Rockchip/packages/u-boot/patches/OdroidGoAdvance/01-u-boot-EmuELEC.patch",
    "content": "--- a/board/rockchip/odroidgoa/odroidgoa.c\n+++ b/board/rockchip/odroidgoa/odroidgoa.c\n@@ -143,10 +143,10 @@\n \t}\n \n \t/* check launcher in ext4 fs of sd card */\n-\tif (file_exists(\"mmc\", \"1:2\", \"/usr/local/bin/emulationstation/emulationstation\",\n+\tif (!file_exists(\"mmc\", \"1:2\", \"/usr/local/bin/emulationstation/emulationstation\",\n \t\t\t\tFS_TYPE_EXT)) {\n \t\tlcd_setfg_color(\"white\");\n-\t\tlcd_printf(0, 0, 1, \"[ GO Advanced EMULATION Image ]\");\n+\t\tlcd_printf(0, 0, 1, \"[ EmuELEC Odroid Go Advance ]\");\n \t}\n \n \treturn;\n"
  },
  {
    "path": "projects/Rockchip/packages/u-boot/patches/base/0001-Kbuild-fix-escaping-in-.cmd-files-for-future-Make.patch",
    "content": "From e5e701c2b8470de044c5c71d2a54ecfc72680d59 Mon Sep 17 00:00:00 2001\nFrom: Rasmus Villemoes <linux@rasmusvillemoes.dk>\nDate: Wed, 19 Sep 2018 11:35:56 +0900\nSubject: [PATCH] Kbuild: fix # escaping in .cmd files for future Make\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\n[ commit 9564a8cf422d7b58f6e857e3546d346fa970191e in Linux ]\n\nI tried building using a freshly built Make (4.2.1-69-g8a731d1), but\nalready the objtool build broke with\n\norc_dump.c: In function ‘orc_dump’:\norc_dump.c:106:2: error: ‘elf_getshnum’ is deprecated [-Werror=deprecated-declarations]\n  if (elf_getshdrnum(elf, &nr_sections)) {\n\nTurns out that with that new Make, the backslash was not removed, so cpp\ndidn't see a #include directive, grep found nothing, and\n-DLIBELF_USE_DEPRECATED was wrongly put in CFLAGS.\n\nNow, that new Make behaviour is documented in their NEWS file:\n\n  * WARNING: Backward-incompatibility!\n    Number signs (#) appearing inside a macro reference or function invocation\n    no longer introduce comments and should not be escaped with backslashes:\n    thus a call such as:\n      foo := $(shell echo '#')\n    is legal.  Previously the number sign needed to be escaped, for example:\n      foo := $(shell echo '\\#')\n    Now this latter will resolve to \"\\#\".  If you want to write makefiles\n    portable to both versions, assign the number sign to a variable:\n      C := \\#\n      foo := $(shell echo '$C')\n    This was claimed to be fixed in 3.81, but wasn't, for some reason.\n    To detect this change search for 'nocomment' in the .FEATURES variable.\n\nThis also fixes up the two make-cmd instances to replace # with $(pound)\nrather than with \\#. There might very well be other places that need\nsimilar fixup in preparation for whatever future Make release contains\nthe above change, but at least this builds an x86_64 defconfig with the\nnew make.\n\nLink: https://bugzilla.kernel.org/show_bug.cgi?id=197847\nCc: Randy Dunlap <rdunlap@infradead.org>\nSigned-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>\nSigned-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>\n---\n scripts/Kbuild.include | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/scripts/Kbuild.include b/scripts/Kbuild.include\nindex 2c7918ad37..13ebddda65 100644\n--- a/scripts/Kbuild.include\n+++ b/scripts/Kbuild.include\n@@ -7,6 +7,7 @@ quote   := \"\n squote  := '\n empty   :=\n space   := $(empty) $(empty)\n+pound := \\#\n \n ###\n # Name of target with a '.' as filename prefix. foo/bar.o => foo/.bar.o\n@@ -242,11 +243,11 @@ endif\n \n # Replace >$< with >$$< to preserve $ when reloading the .cmd file\n # (needed for make)\n-# Replace >#< with >\\#< to avoid starting a comment in the .cmd file\n+# Replace >#< with >$(pound)< to avoid starting a comment in the .cmd file\n # (needed for make)\n # Replace >'< with >'\\''< to be able to enclose the whole string in '...'\n # (needed for the shell)\n-make-cmd = $(call escsq,$(subst \\#,\\\\\\#,$(subst $$,$$$$,$(cmd_$(1)))))\n+make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1)))))\n \n # Find any prerequisites that is newer than target or that does not exist.\n # PHONY targets skipped in both cases.\n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/u-boot/patches/base/0001-kbuild-fix-escaping-in-appending-U-Boot-own-DT.patch",
    "content": "From 0c544115379ed77c1843a194e26960e5b8f3d369 Mon Sep 17 00:00:00 2001\nFrom: Masahiro Yamada <yamada.masahiro@socionext.com>\nDate: Wed, 19 Sep 2018 11:35:57 +0900\nSubject: [PATCH] kbuild: fix # escaping in appending U-Boot own DT\n\nThe escape sequence '\\#' does not work for the latest GNU Make from\nthe git tree.\n\nReplace it with $(pound) as Linux did.\n\nSigned-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>\n---\n scripts/Makefile.lib | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/scripts/Makefile.lib b/scripts/Makefile.lib\nindex f8c3fff1d1..4dceb6d1b3 100644\n--- a/scripts/Makefile.lib\n+++ b/scripts/Makefile.lib\n@@ -299,7 +299,7 @@ quiet_cmd_dtc = DTC     $@\n # Modified for U-Boot\n # Bring in any U-Boot-specific include at the end of the file\n cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \\\n-\t(cat $<; $(if $(u_boot_dtsi),echo '\\#include \"$(u_boot_dtsi)\"')) > $(pre-tmp); \\\n+\t(cat $<; $(if $(u_boot_dtsi),echo '$(pound)include \"$(u_boot_dtsi)\"')) > $(pre-tmp); \\\n \t$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \\\n \t$(DTC) -O dtb -o $@ -b 0 \\\n \t\t-i $(dir $<) $(DTC_FLAGS) \\\n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/packages/u-boot/patches/base/0001-scripts-dtc-Remove-redundant-YYLOC-global-declaratio.patch",
    "content": "From d988ec14978819bc2e0662fd9f853f52aedce498 Mon Sep 17 00:00:00 2001\nFrom: Dirk Mueller <dmueller@suse.com>\nDate: Tue, 14 Jan 2020 18:53:41 +0100\nSubject: [PATCH] scripts/dtc: Remove redundant YYLOC global declaration\n\ncommit e33a814e772cdc36436c8c188d8c42d019fda639 upstream.\n\ngcc 10 will default to -fno-common, which causes this error at link\ntime:\n\n  (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here\n\nThis is because both dtc-lexer as well as dtc-parser define the same\nglobal symbol yyloc. Before with -fcommon those were merged into one\ndefintion. The proper solution would be to to mark this as \"extern\",\nhowever that leads to:\n\n  dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]\n   26 | extern YYLTYPE yylloc;\n      |                ^~~~~~\nIn file included from dtc-lexer.l:24:\ndtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here\n  127 | extern YYLTYPE yylloc;\n      |                ^~~~~~\ncc1: all warnings being treated as errors\n\nwhich means the declaration is completely redundant and can just be\ndropped.\n\nSigned-off-by: Dirk Mueller <dmueller@suse.com>\nSigned-off-by: David Gibson <david@gibson.dropbear.id.au>\n[robh: cherry-pick from upstream]\nCc: stable@vger.kernel.org\nSigned-off-by: Rob Herring <robh@kernel.org>\n[nc: Also apply to dtc-lexer.lex.c_shipped due to a lack of\n     e039139be8c2, where dtc-lexer.l started being used]\nSigned-off-by: Nathan Chancellor <natechancellor@gmail.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nChange-Id: I7f299451e99aab09375883546e47505ec0937c26\n---\n scripts/dtc/dtc-lexer.l             | 1 -\n scripts/dtc/dtc-lexer.lex.c_shipped | 1 -\n 2 files changed, 2 deletions(-)\n\ndiff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l\nindex fd825ebba6..24af549977 100644\n--- a/scripts/dtc/dtc-lexer.l\n+++ b/scripts/dtc/dtc-lexer.l\n@@ -38,7 +38,6 @@ LINECOMMENT\t\"//\".*\\n\n #include \"srcpos.h\"\n #include \"dtc-parser.tab.h\"\n \n-YYLTYPE yylloc;\n extern bool treesource_error;\n \n /* CAUTION: this will stop working if we ever use yyless() or yyunput() */\ndiff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped\nindex 011bb9632f..79952cd3ca 100644\n--- a/scripts/dtc/dtc-lexer.lex.c_shipped\n+++ b/scripts/dtc/dtc-lexer.lex.c_shipped\n@@ -631,7 +631,6 @@ char *yytext;\n #include \"srcpos.h\"\n #include \"dtc-parser.tab.h\"\n \n-YYLTYPE yylloc;\n extern bool treesource_error;\n \n /* CAUTION: this will stop working if we ever use yyless() or yyunput() */\n-- \n2.27.0\n\n"
  },
  {
    "path": "projects/Rockchip/patches/atf/0001-rk3399-atf-fix-baud.patch",
    "content": "diff --git a/plat/rockchip/rk3399/rk3399_def.h b/plat/rockchip/rk3399/rk3399_def.h\nindex ba83242ebe..8d6ecfbe66 100644\n--- a/plat/rockchip/rk3399/rk3399_def.h\n+++ b/plat/rockchip/rk3399/rk3399_def.h\n@@ -17,7 +17,7 @@\n /**************************************************************************\n  * UART related constants\n  **************************************************************************/\n-#define RK3399_BAUDRATE\t\t\t115200\n+#define RK3399_BAUDRATE\t\t\t1500000\n #define RK3399_UART_CLOCK\t\t24000000\n \n /******************************************************************************\n"
  },
  {
    "path": "projects/Rockchip/patches/linux/default/linux-0002-rockchip-from-list.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sat, 10 Oct 2020 15:32:19 +0000\nSubject: [PATCH] phy/rockchip: inno-hdmi: remove unused no_c from rk3328\n recalc_rate\n\nno_c is not used in any calculation, lets remove it.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 5 +----\n 1 file changed, 1 insertion(+), 4 deletions(-)\n\ndiff --git a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c\nindex 15a008a1ac7b..4b936ca19920 100644\n--- a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c\n+++ b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c\n@@ -714,7 +714,7 @@ unsigned long inno_hdmi_phy_rk3328_clk_recalc_rate(struct clk_hw *hw,\n {\n \tstruct inno_hdmi_phy *inno = to_inno_hdmi_phy(hw);\n \tunsigned long frac;\n-\tu8 nd, no_a, no_b, no_c, no_d;\n+\tu8 nd, no_a, no_b, no_d;\n \tu64 vco;\n \tu16 nf;\n \n@@ -737,9 +737,6 @@ unsigned long inno_hdmi_phy_rk3328_clk_recalc_rate(struct clk_hw *hw,\n \t\tno_b = inno_read(inno, 0xa5) & RK3328_PRE_PLL_PCLK_DIV_B_MASK;\n \t\tno_b >>= RK3328_PRE_PLL_PCLK_DIV_B_SHIFT;\n \t\tno_b += 2;\n-\t\tno_c = inno_read(inno, 0xa6) & RK3328_PRE_PLL_PCLK_DIV_C_MASK;\n-\t\tno_c >>= RK3328_PRE_PLL_PCLK_DIV_C_SHIFT;\n-\t\tno_c = 1 << no_c;\n \t\tno_d = inno_read(inno, 0xa6) & RK3328_PRE_PLL_PCLK_DIV_D_MASK;\n \n \t\tdo_div(vco, (nd * (no_a == 1 ? no_b : no_a) * no_d * 2));\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Huicong Xu <xhc@rock-chips.com>\nDate: Sat, 10 Oct 2020 15:32:20 +0000\nSubject: [PATCH] phy/rockchip: inno-hdmi: force set_rate on power_on\n\nRegular 8-bit and Deep Color video formats mainly differ in TMDS rate and\nnot in pixel clock rate.\nWhen the hdmiphy clock is configured with the same pixel clock rate using\nclk_set_rate() the clock framework do not signal the hdmi phy driver\nto set_rate when switching between 8-bit and Deep Color.\nThis result in pre/post pll not being re-configured when switching between\nregular 8-bit and Deep Color video formats.\n\nFix this by calling set_rate in power_on to force pre pll re-configuration.\n\nSigned-off-by: Huicong Xu <xhc@rock-chips.com>\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 13 +++++++++++++\n 1 file changed, 13 insertions(+)\n\ndiff --git a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c\nindex 620961fcfc1d..2f01259823ea 100644\n--- a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c\n+++ b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c\n@@ -245,6 +245,7 @@ struct inno_hdmi_phy {\n \tstruct clk_hw hw;\n \tstruct clk *phyclk;\n \tunsigned long pixclock;\n+\tunsigned long tmdsclock;\n };\n \n struct pre_pll_config {\n@@ -485,6 +486,8 @@ static int inno_hdmi_phy_power_on(struct phy *phy)\n \n \tdev_dbg(inno->dev, \"Inno HDMI PHY Power On\\n\");\n \n+\tinno->plat_data->clk_ops->set_rate(&inno->hw, inno->pixclock, 24000000);\n+\n \tret = clk_prepare_enable(inno->phyclk);\n \tif (ret)\n \t\treturn ret;\n@@ -509,6 +512,8 @@ static int inno_hdmi_phy_power_off(struct phy *phy)\n \n \tclk_disable_unprepare(inno->phyclk);\n \n+\tinno->tmdsclock = 0;\n+\n \tdev_dbg(inno->dev, \"Inno HDMI PHY Power Off\\n\");\n \n \treturn 0;\n@@ -628,6 +633,9 @@ static int inno_hdmi_phy_rk3228_clk_set_rate(struct clk_hw *hw,\n \tdev_dbg(inno->dev, \"%s rate %lu tmdsclk %lu\\n\",\n \t\t__func__, rate, tmdsclock);\n \n+\tif (inno->pixclock == rate && inno->tmdsclock == tmdsclock)\n+\t\treturn 0;\n+\n \tcfg = inno_hdmi_phy_get_pre_pll_cfg(inno, rate);\n \tif (IS_ERR(cfg))\n \t\treturn PTR_ERR(cfg);\n@@ -670,6 +678,7 @@ static int inno_hdmi_phy_rk3228_clk_set_rate(struct clk_hw *hw,\n \t}\n \n \tinno->pixclock = rate;\n+\tinno->tmdsclock = tmdsclock;\n \n \treturn 0;\n }\n@@ -781,6 +790,9 @@ static int inno_hdmi_phy_rk3328_clk_set_rate(struct clk_hw *hw,\n \tdev_dbg(inno->dev, \"%s rate %lu tmdsclk %lu\\n\",\n \t\t__func__, rate, tmdsclock);\n \n+\tif (inno->pixclock == rate && inno->tmdsclock == tmdsclock)\n+\t\treturn 0;\n+\n \tcfg = inno_hdmi_phy_get_pre_pll_cfg(inno, rate);\n \tif (IS_ERR(cfg))\n \t\treturn PTR_ERR(cfg);\n@@ -820,6 +832,7 @@ static int inno_hdmi_phy_rk3328_clk_set_rate(struct clk_hw *hw,\n \t}\n \n \tinno->pixclock = rate;\n+\tinno->tmdsclock = tmdsclock;\n \n \treturn 0;\n }\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sun, 17 Feb 2019 22:14:38 +0000\nSubject: [PATCH] mmc: core: set initial signal voltage on power off\n\nSome boards have SD card connectors where the power rail cannot be switched\noff by the driver. If the card has not been power cycled, it may still be\nusing 1.8V signaling after a warm re-boot. Bootroms expecting 3.3V signaling\nwill fail to boot from a UHS card that continue to use 1.8V signaling.\n\nSet initial signal voltage in mmc_power_off() to allow re-boot to function.\n\nThis fixes re-boot with UHS cards on Asus Tinker Board (Rockchip RK3288),\nsame issue have been seen on some Rockchip RK3399 boards.\n\nI am sending this as a RFC because I have no insights into SD/MMC subsystem,\nthis change fix a re-boot issue on my boards and does not break emmc/sdio.\nIs this an acceptable workaround? Any advice is appreciated.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/mmc/core/core.c | 8 ++++++++\n 1 file changed, 8 insertions(+)\n\ndiff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c\nindex ef53a2578824..d4c53074154a 100644\n--- a/drivers/mmc/core/core.c\n+++ b/drivers/mmc/core/core.c\n@@ -1358,6 +1358,14 @@ void mmc_power_off(struct mmc_host *host)\n \tif (host->ios.power_mode == MMC_POWER_OFF)\n \t\treturn;\n \n+\tmmc_set_initial_signal_voltage(host);\n+\n+\t/*\n+\t * This delay should be sufficient to allow the power supply\n+\t * to reach the minimum voltage.\n+\t */\n+\tmmc_delay(host->ios.power_delay_ms);\n+\n \tmmc_pwrseq_power_off(host);\n \n \thost->ios.clock = 0;\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Wed, 23 Jun 2021 16:59:18 +0200\nSubject: [PATCH] arm64: dts: rockchip: Add sdmmc_ext for RK3328\n\nRK3328 SoC has a fourth mmc controller called SDMMC_EXT. Some\nboards have sdio wifi connected to it. In order to use it\none would have to add the pinctrls from sdmmc0ext group which\nis done on board level.\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n arch/arm64/boot/dts/rockchip/rk3328.dtsi | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi\nindex 49ae15708a0b..60348d517efb 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi\n@@ -993,6 +993,20 @@ usb_host0_ohci: usb@ff5d0000 {\n \t\tstatus = \"disabled\";\n \t};\n \n+\tsdmmc_ext: mmc@ff5f0000 {\n+\t\tcompatible = \"rockchip,rk3328-dw-mshc\", \"rockchip,rk3288-dw-mshc\";\n+\t\treg = <0x0 0xff5f0000 0x0 0x4000>;\n+\t\tinterrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;\n+\t\tclocks = <&cru HCLK_SDMMC_EXT>, <&cru SCLK_SDMMC_EXT>,\n+\t\t\t <&cru SCLK_SDMMC_EXT_DRV>, <&cru SCLK_SDMMC_EXT_SAMPLE>;\n+\t\tclock-names = \"biu\", \"ciu\", \"ciu-drive\", \"ciu-sample\";\n+\t\tfifo-depth = <0x100>;\n+\t\tmax-frequency = <150000000>;\n+\t\tresets = <&cru SRST_SDMMCEXT>;\n+\t\treset-names = \"reset\";\n+\t\tstatus = \"disabled\";\n+\t};\n+\n \tusbdrd3: usb@ff600000 {\n \t\tcompatible = \"rockchip,rk3328-dwc3\", \"snps,dwc3\";\n \t\treg = <0x0 0xff600000 0x0 0x100000>;\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Wed, 23 Jun 2021 17:02:08 +0200\nSubject: [PATCH] arm64: dts: rockchip: Add sdmmc/sdio/emmc reset controls for\n RK3328\n\nThe DW MCI controller driver will use them to reset the IP block before\ninitialisation.\n\nFixes: d717f7352ec6 (\"arm64: dts: rockchip: add sdmmc/sdio/emmc nodes for RK3328 SoCs\")\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n arch/arm64/boot/dts/rockchip/rk3328.dtsi | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi\nindex 60348d517efb..d7e44d174d7b 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi\n@@ -871,6 +871,8 @@ sdmmc: mmc@ff500000 {\n \t\tclock-names = \"biu\", \"ciu\", \"ciu-drive\", \"ciu-sample\";\n \t\tfifo-depth = <0x100>;\n \t\tmax-frequency = <150000000>;\n+\t\tresets = <&cru SRST_MMC0>;\n+\t\treset-names = \"reset\";\n \t\tstatus = \"disabled\";\n \t};\n \n@@ -883,6 +885,8 @@ sdio: mmc@ff510000 {\n \t\tclock-names = \"biu\", \"ciu\", \"ciu-drive\", \"ciu-sample\";\n \t\tfifo-depth = <0x100>;\n \t\tmax-frequency = <150000000>;\n+\t\tresets = <&cru SRST_SDIO>;\n+\t\treset-names = \"reset\";\n \t\tstatus = \"disabled\";\n \t};\n \n@@ -895,6 +899,8 @@ emmc: mmc@ff520000 {\n \t\tclock-names = \"biu\", \"ciu\", \"ciu-drive\", \"ciu-sample\";\n \t\tfifo-depth = <0x100>;\n \t\tmax-frequency = <150000000>;\n+\t\tresets = <&cru SRST_EMMC>;\n+\t\treset-names = \"reset\";\n \t\tstatus = \"disabled\";\n \t};\n \n"
  },
  {
    "path": "projects/Rockchip/patches/linux/default/linux-0011-v4l2-from-list.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 6 Jul 2020 21:54:35 +0000\nSubject: [PATCH] media: v4l2-common: Add helpers to calculate bytesperline and\n sizeimage\n\nAdd helper functions to calculate plane bytesperline and sizeimage, these\nnew helpers consider block width and height when calculating plane\nbytesperline and sizeimage.\n\nThis prepare support for new pixel formats added in next patch that make\nuse of block width and height.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/media/v4l2-core/v4l2-common.c | 77 +++++++++++++--------------\n 1 file changed, 38 insertions(+), 39 deletions(-)\n\ndiff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c\nindex e0fbe6ba4b6c..cb2f1acab7cf 100644\n--- a/drivers/media/v4l2-core/v4l2-common.c\n+++ b/drivers/media/v4l2-core/v4l2-common.c\n@@ -338,6 +338,33 @@ static inline unsigned int v4l2_format_block_height(const struct v4l2_format_inf\n \treturn info->block_h[plane];\n }\n \n+static inline unsigned int v4l2_format_plane_width(const struct v4l2_format_info *info, int plane,\n+\t\t\t\t\t\t   unsigned int width)\n+{\n+\tunsigned int hdiv = plane ? info->hdiv : 1;\n+\tunsigned int bytes = DIV_ROUND_UP(width * info->bpp[plane],\n+\t\t\t\tv4l2_format_block_width(info, plane) *\n+\t\t\t\tv4l2_format_block_height(info, plane));\n+\n+\treturn DIV_ROUND_UP(bytes, hdiv);\n+}\n+\n+static inline unsigned int v4l2_format_plane_height(const struct v4l2_format_info *info, int plane,\n+\t\t\t\t\t\t    unsigned int height)\n+{\n+\tunsigned int vdiv = plane ? info->vdiv : 1;\n+\tunsigned int lines = ALIGN(height, v4l2_format_block_height(info, plane));\n+\n+\treturn DIV_ROUND_UP(lines, vdiv);\n+}\n+\n+static inline unsigned int v4l2_format_plane_size(const struct v4l2_format_info *info, int plane,\n+\t\t\t\t\t\t  unsigned int width, unsigned int height)\n+{\n+\treturn v4l2_format_plane_width(info, plane, width) *\n+\t       v4l2_format_plane_height(info, plane, height);\n+}\n+\n void v4l2_apply_frmsize_constraints(u32 *width, u32 *height,\n \t\t\t\t    const struct v4l2_frmsize_stepwise *frmsize)\n {\n@@ -373,37 +400,19 @@ int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane *pixfmt,\n \n \tif (info->mem_planes == 1) {\n \t\tplane = &pixfmt->plane_fmt[0];\n-\t\tplane->bytesperline = ALIGN(width, v4l2_format_block_width(info, 0)) * info->bpp[0];\n+\t\tplane->bytesperline = v4l2_format_plane_width(info, 0, width);\n \t\tplane->sizeimage = 0;\n \n-\t\tfor (i = 0; i < info->comp_planes; i++) {\n-\t\t\tunsigned int hdiv = (i == 0) ? 1 : info->hdiv;\n-\t\t\tunsigned int vdiv = (i == 0) ? 1 : info->vdiv;\n-\t\t\tunsigned int aligned_width;\n-\t\t\tunsigned int aligned_height;\n-\n-\t\t\taligned_width = ALIGN(width, v4l2_format_block_width(info, i));\n-\t\t\taligned_height = ALIGN(height, v4l2_format_block_height(info, i));\n-\n-\t\t\tplane->sizeimage += info->bpp[i] *\n-\t\t\t\tDIV_ROUND_UP(aligned_width, hdiv) *\n-\t\t\t\tDIV_ROUND_UP(aligned_height, vdiv);\n-\t\t}\n+\t\tfor (i = 0; i < info->comp_planes; i++)\n+\t\t\tplane->sizeimage +=\n+\t\t\t\tv4l2_format_plane_size(info, i, width, height);\n \t} else {\n \t\tfor (i = 0; i < info->comp_planes; i++) {\n-\t\t\tunsigned int hdiv = (i == 0) ? 1 : info->hdiv;\n-\t\t\tunsigned int vdiv = (i == 0) ? 1 : info->vdiv;\n-\t\t\tunsigned int aligned_width;\n-\t\t\tunsigned int aligned_height;\n-\n-\t\t\taligned_width = ALIGN(width, v4l2_format_block_width(info, i));\n-\t\t\taligned_height = ALIGN(height, v4l2_format_block_height(info, i));\n-\n \t\t\tplane = &pixfmt->plane_fmt[i];\n \t\t\tplane->bytesperline =\n-\t\t\t\tinfo->bpp[i] * DIV_ROUND_UP(aligned_width, hdiv);\n-\t\t\tplane->sizeimage =\n-\t\t\t\tplane->bytesperline * DIV_ROUND_UP(aligned_height, vdiv);\n+\t\t\t\tv4l2_format_plane_width(info, i, width);\n+\t\t\tplane->sizeimage = plane->bytesperline *\n+\t\t\t\tv4l2_format_plane_height(info, i, height);\n \t\t}\n \t}\n \treturn 0;\n@@ -427,22 +436,12 @@ int v4l2_fill_pixfmt(struct v4l2_pix_format *pixfmt, u32 pixelformat,\n \tpixfmt->width = width;\n \tpixfmt->height = height;\n \tpixfmt->pixelformat = pixelformat;\n-\tpixfmt->bytesperline = ALIGN(width, v4l2_format_block_width(info, 0)) * info->bpp[0];\n+\tpixfmt->bytesperline = v4l2_format_plane_width(info, 0, width);\n \tpixfmt->sizeimage = 0;\n \n-\tfor (i = 0; i < info->comp_planes; i++) {\n-\t\tunsigned int hdiv = (i == 0) ? 1 : info->hdiv;\n-\t\tunsigned int vdiv = (i == 0) ? 1 : info->vdiv;\n-\t\tunsigned int aligned_width;\n-\t\tunsigned int aligned_height;\n-\n-\t\taligned_width = ALIGN(width, v4l2_format_block_width(info, i));\n-\t\taligned_height = ALIGN(height, v4l2_format_block_height(info, i));\n-\n-\t\tpixfmt->sizeimage += info->bpp[i] *\n-\t\t\tDIV_ROUND_UP(aligned_width, hdiv) *\n-\t\t\tDIV_ROUND_UP(aligned_height, vdiv);\n-\t}\n+\tfor (i = 0; i < info->comp_planes; i++)\n+\t\tpixfmt->sizeimage +=\n+\t\t\tv4l2_format_plane_size(info, i, width, height);\n \treturn 0;\n }\n EXPORT_SYMBOL_GPL(v4l2_fill_pixfmt);\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 6 Jul 2020 21:54:36 +0000\nSubject: [PATCH] media: v4l2: Add NV15 and NV20 pixel formats\n\nAdd NV15 and NV20 pixel formats used by the Rockchip Video Decoder for\n10-bit buffers.\n\nNV15 and NV20 is a packed 10-bit 4:2:0/4:2:2 semi-planar Y/UV format\nsimilar to P010 and P210 but has no padding between components. Instead,\nluminance and chrominance samples are grouped into 4s so that each group is\npacked into an integer number of bytes:\n\nYYYY = UVUV = 4 * 10 bits = 40 bits = 5 bytes\n\nThe '15' and '20' suffix refers to the optimum effective bits per pixel\nwhich is achieved when the total number of luminance samples is a multiple\nof 8 for NV15 and 4 for NV20.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/media/v4l2-core/v4l2-common.c | 3 +++\n drivers/media/v4l2-core/v4l2-ioctl.c  | 2 ++\n include/uapi/linux/videodev2.h        | 3 +++\n 3 files changed, 8 insertions(+)\n\ndiff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c\nindex cb2f1acab7cf..8446a1deffd8 100644\n--- a/drivers/media/v4l2-core/v4l2-common.c\n+++ b/drivers/media/v4l2-core/v4l2-common.c\n@@ -268,6 +268,9 @@ const struct v4l2_format_info *v4l2_format_info(u32 format)\n \t\t{ .format = V4L2_PIX_FMT_NV42,    .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .hdiv = 1, .vdiv = 1 },\n \t\t{ .format = V4L2_PIX_FMT_P010,    .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 2, 2, 0, 0 }, .hdiv = 2, .vdiv = 1 },\n \n+\t\t{ .format = V4L2_PIX_FMT_NV15,    .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 5, 5, 0, 0 }, .hdiv = 2, .vdiv = 2, .block_w = { 4, 2, 0, 0 }, .block_h = { 1, 1, 0, 0 } },\n+\t\t{ .format = V4L2_PIX_FMT_NV20,    .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 5, 5, 0, 0 }, .hdiv = 2, .vdiv = 1, .block_w = { 4, 2, 0, 0 }, .block_h = { 1, 1, 0, 0 } },\n+\n \t\t{ .format = V4L2_PIX_FMT_YUV410,  .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 3, .bpp = { 1, 1, 1, 0 }, .hdiv = 4, .vdiv = 4 },\n \t\t{ .format = V4L2_PIX_FMT_YVU410,  .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 3, .bpp = { 1, 1, 1, 0 }, .hdiv = 4, .vdiv = 4 },\n \t\t{ .format = V4L2_PIX_FMT_YUV411P, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 3, .bpp = { 1, 1, 1, 0 }, .hdiv = 4, .vdiv = 1 },\ndiff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c\nindex e6fd355a2e92..24771edaa4f2 100644\n--- a/drivers/media/v4l2-core/v4l2-ioctl.c\n+++ b/drivers/media/v4l2-core/v4l2-ioctl.c\n@@ -1354,6 +1354,8 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)\n \tcase V4L2_PIX_FMT_NV24:\t\tdescr = \"Y/UV 4:4:4\"; break;\n \tcase V4L2_PIX_FMT_NV42:\t\tdescr = \"Y/VU 4:4:4\"; break;\n \tcase V4L2_PIX_FMT_P010:\t\tdescr = \"10-bit Y/UV 4:2:0\"; break;\n+\tcase V4L2_PIX_FMT_NV15:\t\tdescr = \"10-bit Y/UV 4:2:0 (Packed)\"; break;\n+\tcase V4L2_PIX_FMT_NV20:\t\tdescr = \"10-bit Y/UV 4:2:2 (Packed)\"; break;\n \tcase V4L2_PIX_FMT_NV12_4L4:\tdescr = \"Y/UV 4:2:0 (4x4 Linear)\"; break;\n \tcase V4L2_PIX_FMT_NV12_16L16:\tdescr = \"Y/UV 4:2:0 (16x16 Linear)\"; break;\n \tcase V4L2_PIX_FMT_NV12_32L32:   descr = \"Y/UV 4:2:0 (32x32 Linear)\"; break;\ndiff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h\nindex 01e630f2ec78..cea44992aea3 100644\n--- a/include/uapi/linux/videodev2.h\n+++ b/include/uapi/linux/videodev2.h\n@@ -628,6 +628,9 @@ struct v4l2_pix_format {\n #define V4L2_PIX_FMT_NV42    v4l2_fourcc('N', 'V', '4', '2') /* 24  Y/VU 4:4:4  */\n #define V4L2_PIX_FMT_P010    v4l2_fourcc('P', '0', '1', '0') /* 24  Y/UV 4:2:0 10-bit per component */\n \n+#define V4L2_PIX_FMT_NV15    v4l2_fourcc('N', 'V', '1', '5') /* 15  Y/UV 4:2:0 10-bit packed */\n+#define V4L2_PIX_FMT_NV20    v4l2_fourcc('N', 'V', '2', '0') /* 20  Y/UV 4:2:2 10-bit packed */\n+\n /* two non contiguous planes - one Y, one Cr + Cb interleaved  */\n #define V4L2_PIX_FMT_NV12M   v4l2_fourcc('N', 'M', '1', '2') /* 12  Y/UV 4:2:0  */\n #define V4L2_PIX_FMT_NV21M   v4l2_fourcc('N', 'M', '2', '1') /* 21  Y/VU 4:2:0  */\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 6 Jul 2020 21:54:36 +0000\nSubject: [PATCH] media: rkvdec: h264: Use bytesperline and buffer height to\n calculate stride\n\nUse bytesperline and buffer height to calculate the strides configured.\n\nThis does not really change anything other than ensuring the bytesperline\nthat is signaled to userspace matches what is configured in HW.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/staging/media/rkvdec/rkvdec-h264.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c\nindex 4fc167b42cf0..a8635105e387 100644\n--- a/drivers/staging/media/rkvdec/rkvdec-h264.c\n+++ b/drivers/staging/media/rkvdec/rkvdec-h264.c\n@@ -896,9 +896,9 @@ static void config_registers(struct rkvdec_ctx *ctx,\n \tdma_addr_t rlc_addr;\n \tdma_addr_t refer_addr;\n \tu32 rlc_len;\n-\tu32 hor_virstride = 0;\n-\tu32 ver_virstride = 0;\n-\tu32 y_virstride = 0;\n+\tu32 hor_virstride;\n+\tu32 ver_virstride;\n+\tu32 y_virstride;\n \tu32 yuv_virstride = 0;\n \tu32 offset;\n \tdma_addr_t dst_addr;\n@@ -909,8 +909,8 @@ static void config_registers(struct rkvdec_ctx *ctx,\n \n \tf = &ctx->decoded_fmt;\n \tdst_fmt = &f->fmt.pix_mp;\n-\thor_virstride = (sps->bit_depth_luma_minus8 + 8) * dst_fmt->width / 8;\n-\tver_virstride = round_up(dst_fmt->height, 16);\n+\thor_virstride = dst_fmt->plane_fmt[0].bytesperline;\n+\tver_virstride = dst_fmt->height;\n \ty_virstride = hor_virstride * ver_virstride;\n \n \tif (sps->chroma_format_idc == 0)\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 6 Jul 2020 21:54:37 +0000\nSubject: [PATCH] media: rkvdec: Extract rkvdec_fill_decoded_pixfmt helper\n method\n\nThis extract setting decoded pixfmt into a helper method, current code is\nreplaced with a call to the new helper method.\n\nThe helper method is also called from a new function in next patch.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/staging/media/rkvdec/rkvdec.c | 29 ++++++++++++++-------------\n 1 file changed, 15 insertions(+), 14 deletions(-)\n\ndiff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c\nindex 7bab7586918c..40cc791aef26 100644\n--- a/drivers/staging/media/rkvdec/rkvdec.c\n+++ b/drivers/staging/media/rkvdec/rkvdec.c\n@@ -27,6 +27,17 @@\n #include \"rkvdec.h\"\n #include \"rkvdec-regs.h\"\n \n+static void rkvdec_fill_decoded_pixfmt(struct rkvdec_ctx *ctx,\n+\t\t\t\t       struct v4l2_pix_format_mplane *pix_mp)\n+{\n+\tv4l2_fill_pixfmt_mp(pix_mp, pix_mp->pixelformat,\n+\t\t\t    pix_mp->width, pix_mp->height);\n+\tpix_mp->plane_fmt[0].sizeimage += 128 *\n+\t\tDIV_ROUND_UP(pix_mp->width, 16) *\n+\t\tDIV_ROUND_UP(pix_mp->height, 16);\n+\tpix_mp->field = V4L2_FIELD_NONE;\n+}\n+\n static int rkvdec_try_ctrl(struct v4l2_ctrl *ctrl)\n {\n \tstruct rkvdec_ctx *ctx = container_of(ctrl->handler, struct rkvdec_ctx, ctrl_hdl);\n@@ -192,13 +203,9 @@ static void rkvdec_reset_decoded_fmt(struct rkvdec_ctx *ctx)\n \n \trkvdec_reset_fmt(ctx, f, ctx->coded_fmt_desc->decoded_fmts[0]);\n \tf->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;\n-\tv4l2_fill_pixfmt_mp(&f->fmt.pix_mp,\n-\t\t\t    ctx->coded_fmt_desc->decoded_fmts[0],\n-\t\t\t    ctx->coded_fmt.fmt.pix_mp.width,\n-\t\t\t    ctx->coded_fmt.fmt.pix_mp.height);\n-\tf->fmt.pix_mp.plane_fmt[0].sizeimage += 128 *\n-\t\tDIV_ROUND_UP(f->fmt.pix_mp.width, 16) *\n-\t\tDIV_ROUND_UP(f->fmt.pix_mp.height, 16);\n+\tf->fmt.pix_mp.width = ctx->coded_fmt.fmt.pix_mp.width;\n+\tf->fmt.pix_mp.height = ctx->coded_fmt.fmt.pix_mp.height;\n+\trkvdec_fill_decoded_pixfmt(ctx, &f->fmt.pix_mp);\n }\n \n static int rkvdec_enum_framesizes(struct file *file, void *priv,\n@@ -264,13 +271,7 @@ static int rkvdec_try_capture_fmt(struct file *file, void *priv,\n \t\t\t\t       &pix_mp->height,\n \t\t\t\t       &coded_desc->frmsize);\n \n-\tv4l2_fill_pixfmt_mp(pix_mp, pix_mp->pixelformat,\n-\t\t\t    pix_mp->width, pix_mp->height);\n-\tpix_mp->plane_fmt[0].sizeimage +=\n-\t\t128 *\n-\t\tDIV_ROUND_UP(pix_mp->width, 16) *\n-\t\tDIV_ROUND_UP(pix_mp->height, 16);\n-\tpix_mp->field = V4L2_FIELD_NONE;\n+\trkvdec_fill_decoded_pixfmt(ctx, pix_mp);\n \n \treturn 0;\n }\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 6 Jul 2020 21:54:37 +0000\nSubject: [PATCH] media: rkvdec: Lock capture pixel format in s_ctrl and s_fmt\n\nAdd an optional valid_fmt operation that should return the valid\npixelformat of CAPTURE buffers.\n\nThis is used in next patch to ensure correct pixelformat is used for 10-bit\nand 4:2:2 content.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/staging/media/rkvdec/rkvdec.c | 67 +++++++++++++++++++++++----\n drivers/staging/media/rkvdec/rkvdec.h |  2 +\n 2 files changed, 61 insertions(+), 8 deletions(-)\n\ndiff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c\nindex 40cc791aef26..e93e1cb0f829 100644\n--- a/drivers/staging/media/rkvdec/rkvdec.c\n+++ b/drivers/staging/media/rkvdec/rkvdec.c\n@@ -38,19 +38,56 @@ static void rkvdec_fill_decoded_pixfmt(struct rkvdec_ctx *ctx,\n \tpix_mp->field = V4L2_FIELD_NONE;\n }\n \n+static u32 rkvdec_valid_fmt(struct rkvdec_ctx *ctx, struct v4l2_ctrl *ctrl)\n+{\n+\tconst struct rkvdec_coded_fmt_desc *coded_desc = ctx->coded_fmt_desc;\n+\n+\tif (coded_desc->ops->valid_fmt)\n+\t\treturn coded_desc->ops->valid_fmt(ctx, ctrl);\n+\n+\treturn ctx->valid_fmt;\n+}\n+\n static int rkvdec_try_ctrl(struct v4l2_ctrl *ctrl)\n {\n \tstruct rkvdec_ctx *ctx = container_of(ctrl->handler, struct rkvdec_ctx, ctrl_hdl);\n \tconst struct rkvdec_coded_fmt_desc *desc = ctx->coded_fmt_desc;\n \n-\tif (desc->ops->try_ctrl)\n-\t\treturn desc->ops->try_ctrl(ctx, ctrl);\n+\tif (desc->ops->try_ctrl) {\n+\t\tint ret;\n+\t\tret = desc->ops->try_ctrl(ctx, ctrl);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n+\tif (ctx->valid_fmt && ctx->valid_fmt != rkvdec_valid_fmt(ctx, ctrl))\n+\t\t/* Only current valid format */\n+\t\treturn -EINVAL;\n+\n+\treturn 0;\n+}\n+\n+static int rkvdec_s_ctrl(struct v4l2_ctrl *ctrl)\n+{\n+\tstruct rkvdec_ctx *ctx = container_of(ctrl->handler, struct rkvdec_ctx, ctrl_hdl);\n+\n+\tif (ctrl->id == V4L2_CID_STATELESS_H264_SPS && !ctx->valid_fmt) {\n+\t\tctx->valid_fmt = rkvdec_valid_fmt(ctx, ctrl);\n+\t\tif (ctx->valid_fmt) {\n+\t\t\tstruct v4l2_pix_format_mplane *pix_mp;\n+\n+\t\t\tpix_mp = &ctx->decoded_fmt.fmt.pix_mp;\n+\t\t\tpix_mp->pixelformat = ctx->valid_fmt;\n+\t\t\trkvdec_fill_decoded_pixfmt(ctx, pix_mp);\n+\t\t}\n+\t}\n \n \treturn 0;\n }\n \n static const struct v4l2_ctrl_ops rkvdec_ctrl_ops = {\n \t.try_ctrl = rkvdec_try_ctrl,\n+\t.s_ctrl = rkvdec_s_ctrl,\n };\n \n static const struct rkvdec_ctrl_desc rkvdec_h264_ctrl_descs[] = {\n@@ -201,6 +238,7 @@ static void rkvdec_reset_decoded_fmt(struct rkvdec_ctx *ctx)\n {\n \tstruct v4l2_format *f = &ctx->decoded_fmt;\n \n+\tctx->valid_fmt = 0;\n \trkvdec_reset_fmt(ctx, f, ctx->coded_fmt_desc->decoded_fmts[0]);\n \tf->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;\n \tf->fmt.pix_mp.width = ctx->coded_fmt.fmt.pix_mp.width;\n@@ -256,13 +294,17 @@ static int rkvdec_try_capture_fmt(struct file *file, void *priv,\n \tif (WARN_ON(!coded_desc))\n \t\treturn -EINVAL;\n \n-\tfor (i = 0; i < coded_desc->num_decoded_fmts; i++) {\n-\t\tif (coded_desc->decoded_fmts[i] == pix_mp->pixelformat)\n-\t\t\tbreak;\n-\t}\n+\tif (ctx->valid_fmt) {\n+\t\tpix_mp->pixelformat = ctx->valid_fmt;\n+\t} else {\n+\t\tfor (i = 0; i < coded_desc->num_decoded_fmts; i++) {\n+\t\t\tif (coded_desc->decoded_fmts[i] == pix_mp->pixelformat)\n+\t\t\t\tbreak;\n+\t\t}\n \n-\tif (i == coded_desc->num_decoded_fmts)\n-\t\tpix_mp->pixelformat = coded_desc->decoded_fmts[0];\n+\t\tif (i == coded_desc->num_decoded_fmts)\n+\t\t\tpix_mp->pixelformat = coded_desc->decoded_fmts[0];\n+\t}\n \n \t/* Always apply the frmsize constraint of the coded end. */\n \tpix_mp->width = max(pix_mp->width, ctx->coded_fmt.fmt.pix_mp.width);\n@@ -326,6 +368,7 @@ static int rkvdec_s_capture_fmt(struct file *file, void *priv,\n \t\treturn ret;\n \n \tctx->decoded_fmt = *f;\n+\tctx->valid_fmt = f->fmt.pix_mp.pixelformat;\n \treturn 0;\n }\n \n@@ -429,6 +472,14 @@ static int rkvdec_enum_capture_fmt(struct file *file, void *priv,\n \tif (WARN_ON(!ctx->coded_fmt_desc))\n \t\treturn -EINVAL;\n \n+\tif (ctx->valid_fmt) {\n+\t\tif (f->index)\n+\t\t\treturn -EINVAL;\n+\n+\t\tf->pixelformat = ctx->valid_fmt;\n+\t\treturn 0;\n+\t}\n+\n \tif (f->index >= ctx->coded_fmt_desc->num_decoded_fmts)\n \t\treturn -EINVAL;\n \ndiff --git a/drivers/staging/media/rkvdec/rkvdec.h b/drivers/staging/media/rkvdec/rkvdec.h\nindex 633335ebb9c4..b9e219438bc9 100644\n--- a/drivers/staging/media/rkvdec/rkvdec.h\n+++ b/drivers/staging/media/rkvdec/rkvdec.h\n@@ -66,6 +66,7 @@ vb2_to_rkvdec_decoded_buf(struct vb2_buffer *buf)\n struct rkvdec_coded_fmt_ops {\n \tint (*adjust_fmt)(struct rkvdec_ctx *ctx,\n \t\t\t  struct v4l2_format *f);\n+\tu32 (*valid_fmt)(struct rkvdec_ctx *ctx, struct v4l2_ctrl *ctrl);\n \tint (*start)(struct rkvdec_ctx *ctx);\n \tvoid (*stop)(struct rkvdec_ctx *ctx);\n \tint (*run)(struct rkvdec_ctx *ctx);\n@@ -101,6 +102,7 @@ struct rkvdec_ctx {\n \tstruct v4l2_fh fh;\n \tstruct v4l2_format coded_fmt;\n \tstruct v4l2_format decoded_fmt;\n+\tu32 valid_fmt;\n \tconst struct rkvdec_coded_fmt_desc *coded_fmt_desc;\n \tstruct v4l2_ctrl_handler ctrl_hdl;\n \tstruct rkvdec_dev *dev;\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 6 Jul 2020 21:54:37 +0000\nSubject: [PATCH] media: rkvdec: h264: Support High 10 and 4:2:2 profiles\n\nAdd support and enable decoding of H264 High 10 and 4:2:2 profiles.\n\nDecoded CAPTURE buffer width is aligned to 64 pixels to accommodate HW\nrequirement on 10-bit format buffers.\n\nThe new valid_fmt operation is implemented and return a valid pixelformat\nfor the provided SPS control.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/staging/media/rkvdec/rkvdec-h264.c | 33 ++++++++++++++++------\n drivers/staging/media/rkvdec/rkvdec.c      | 19 +++++++++----\n 2 files changed, 37 insertions(+), 15 deletions(-)\n\ndiff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c\nindex a8635105e387..0069d3d198db 100644\n--- a/drivers/staging/media/rkvdec/rkvdec-h264.c\n+++ b/drivers/staging/media/rkvdec/rkvdec-h264.c\n@@ -1031,19 +1031,14 @@ static int rkvdec_h264_validate_sps(struct rkvdec_ctx *ctx,\n {\n \tunsigned int width, height;\n \n-\t/*\n-\t * TODO: The hardware supports 10-bit and 4:2:2 profiles,\n-\t * but it's currently broken in the driver.\n-\t * Reject them for now, until it's fixed.\n-\t */\n-\tif (sps->chroma_format_idc > 1)\n-\t\t/* Only 4:0:0 and 4:2:0 are supported */\n+\tif (sps->chroma_format_idc > 2)\n+\t\t/* Only 4:0:0, 4:2:0 and 4:2:2 are supported */\n \t\treturn -EINVAL;\n \tif (sps->bit_depth_luma_minus8 != sps->bit_depth_chroma_minus8)\n \t\t/* Luma and chroma bit depth mismatch */\n \t\treturn -EINVAL;\n-\tif (sps->bit_depth_luma_minus8 != 0)\n-\t\t/* Only 8-bit is supported */\n+\tif (sps->bit_depth_luma_minus8 != 0 && sps->bit_depth_luma_minus8 != 2)\n+\t\t/* Only 8-bit and 10-bit is supported */\n \t\treturn -EINVAL;\n \n \twidth = (sps->pic_width_in_mbs_minus1 + 1) * 16;\n@@ -1064,6 +1059,25 @@ static int rkvdec_h264_validate_sps(struct rkvdec_ctx *ctx,\n \treturn 0;\n }\n \n+static u32 rkvdec_h264_valid_fmt(struct rkvdec_ctx *ctx, struct v4l2_ctrl *ctrl)\n+{\n+\tconst struct v4l2_ctrl_h264_sps *sps = ctrl->p_new.p_h264_sps;\n+\n+\tif (sps->bit_depth_luma_minus8 == 0) {\n+\t\tif (sps->chroma_format_idc == 2)\n+\t\t\treturn V4L2_PIX_FMT_NV16;\n+\t\telse\n+\t\t\treturn V4L2_PIX_FMT_NV12;\n+\t} else if (sps->bit_depth_luma_minus8 == 2) {\n+\t\tif (sps->chroma_format_idc == 2)\n+\t\t\treturn V4L2_PIX_FMT_NV20;\n+\t\telse\n+\t\t\treturn V4L2_PIX_FMT_NV15;\n+\t}\n+\n+\treturn 0;\n+}\n+\n static int rkvdec_h264_start(struct rkvdec_ctx *ctx)\n {\n \tstruct rkvdec_dev *rkvdec = ctx->dev;\n@@ -1185,6 +1199,7 @@ static int rkvdec_h264_try_ctrl(struct rkvdec_ctx *ctx, struct v4l2_ctrl *ctrl)\n \n const struct rkvdec_coded_fmt_ops rkvdec_h264_fmt_ops = {\n \t.adjust_fmt = rkvdec_h264_adjust_fmt,\n+\t.valid_fmt = rkvdec_h264_valid_fmt,\n \t.start = rkvdec_h264_start,\n \t.stop = rkvdec_h264_stop,\n \t.run = rkvdec_h264_run,\ndiff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c\nindex e93e1cb0f829..4f5436c89e08 100644\n--- a/drivers/staging/media/rkvdec/rkvdec.c\n+++ b/drivers/staging/media/rkvdec/rkvdec.c\n@@ -31,7 +31,7 @@ static void rkvdec_fill_decoded_pixfmt(struct rkvdec_ctx *ctx,\n \t\t\t\t       struct v4l2_pix_format_mplane *pix_mp)\n {\n \tv4l2_fill_pixfmt_mp(pix_mp, pix_mp->pixelformat,\n-\t\t\t    pix_mp->width, pix_mp->height);\n+\t\t\t    ALIGN(pix_mp->width, 64), pix_mp->height);\n \tpix_mp->plane_fmt[0].sizeimage += 128 *\n \t\tDIV_ROUND_UP(pix_mp->width, 16) *\n \t\tDIV_ROUND_UP(pix_mp->height, 16);\n@@ -136,8 +136,11 @@ static const struct rkvdec_ctrls rkvdec_h264_ctrls = {\n \t.num_ctrls = ARRAY_SIZE(rkvdec_h264_ctrl_descs),\n };\n \n-static const u32 rkvdec_h264_vp9_decoded_fmts[] = {\n+static const u32 rkvdec_h264_decoded_fmts[] = {\n \tV4L2_PIX_FMT_NV12,\n+\tV4L2_PIX_FMT_NV15,\n+\tV4L2_PIX_FMT_NV16,\n+\tV4L2_PIX_FMT_NV20,\n };\n \n static const struct rkvdec_ctrl_desc rkvdec_vp9_ctrl_descs[] = {\n@@ -160,6 +163,10 @@ static const struct rkvdec_ctrls rkvdec_vp9_ctrls = {\n \t.num_ctrls = ARRAY_SIZE(rkvdec_vp9_ctrl_descs),\n };\n \n+static const u32 rkvdec_vp9_decoded_fmts[] = {\n+\tV4L2_PIX_FMT_NV12,\n+};\n+\n static const struct rkvdec_coded_fmt_desc rkvdec_coded_fmts[] = {\n \t{\n \t\t.fourcc = V4L2_PIX_FMT_H264_SLICE,\n@@ -173,8 +180,8 @@ static const struct rkvdec_coded_fmt_desc rkvdec_coded_fmts[] = {\n \t\t},\n \t\t.ctrls = &rkvdec_h264_ctrls,\n \t\t.ops = &rkvdec_h264_fmt_ops,\n-\t\t.num_decoded_fmts = ARRAY_SIZE(rkvdec_h264_vp9_decoded_fmts),\n-\t\t.decoded_fmts = rkvdec_h264_vp9_decoded_fmts,\n+\t\t.num_decoded_fmts = ARRAY_SIZE(rkvdec_h264_decoded_fmts),\n+\t\t.decoded_fmts = rkvdec_h264_decoded_fmts,\n \t\t.subsystem_flags = VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF,\n \t},\n \t{\n@@ -189,8 +196,8 @@ static const struct rkvdec_coded_fmt_desc rkvdec_coded_fmts[] = {\n \t\t},\n \t\t.ctrls = &rkvdec_vp9_ctrls,\n \t\t.ops = &rkvdec_vp9_fmt_ops,\n-\t\t.num_decoded_fmts = ARRAY_SIZE(rkvdec_h264_vp9_decoded_fmts),\n-\t\t.decoded_fmts = rkvdec_h264_vp9_decoded_fmts,\n+\t\t.num_decoded_fmts = ARRAY_SIZE(rkvdec_vp9_decoded_fmts),\n+\t\t.decoded_fmts = rkvdec_vp9_decoded_fmts,\n \t}\n };\n \n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Sun, 27 Mar 2022 14:18:07 +0200\nSubject: [PATCH] media: rkvdec-h264: Don't hardcode SPS/PPS parameters\n\nSome SPS/PPS parameters are currently hardcoded in the driver\neven though so do exist in the uapi which is stable by now.\n\nUse them instead of hardcoding them.\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/staging/media/rkvdec/rkvdec-h264.c | 13 +++++++------\n 1 file changed, 7 insertions(+), 6 deletions(-)\n\ndiff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c\nindex 0069d3d198db..2c27acaba85e 100644\n--- a/drivers/staging/media/rkvdec/rkvdec-h264.c\n+++ b/drivers/staging/media/rkvdec/rkvdec-h264.c\n@@ -655,13 +655,14 @@ static void assemble_hw_pps(struct rkvdec_ctx *ctx,\n \n #define WRITE_PPS(value, field) set_ps_field(hw_ps->info, field, value)\n \t/* write sps */\n-\tWRITE_PPS(0xf, SEQ_PARAMETER_SET_ID);\n-\tWRITE_PPS(0xff, PROFILE_IDC);\n-\tWRITE_PPS(1, CONSTRAINT_SET3_FLAG);\n+\tWRITE_PPS(sps->seq_parameter_set_id, SEQ_PARAMETER_SET_ID);\n+\tWRITE_PPS(sps->profile_idc, PROFILE_IDC);\n+\tWRITE_PPS((sps->constraint_set_flags & 1 << 3) ? 1 : 0, CONSTRAINT_SET3_FLAG);\n \tWRITE_PPS(sps->chroma_format_idc, CHROMA_FORMAT_IDC);\n \tWRITE_PPS(sps->bit_depth_luma_minus8, BIT_DEPTH_LUMA);\n \tWRITE_PPS(sps->bit_depth_chroma_minus8, BIT_DEPTH_CHROMA);\n-\tWRITE_PPS(0, QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG);\n+\tWRITE_PPS(!!(sps->flags & V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS),\n+\t\t  QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG);\n \tWRITE_PPS(sps->log2_max_frame_num_minus4, LOG2_MAX_FRAME_NUM_MINUS4);\n \tWRITE_PPS(sps->max_num_ref_frames, MAX_NUM_REF_FRAMES);\n \tWRITE_PPS(sps->pic_order_cnt_type, PIC_ORDER_CNT_TYPE);\n@@ -688,8 +689,8 @@ static void assemble_hw_pps(struct rkvdec_ctx *ctx,\n \t\t  DIRECT_8X8_INFERENCE_FLAG);\n \n \t/* write pps */\n-\tWRITE_PPS(0xff, PIC_PARAMETER_SET_ID);\n-\tWRITE_PPS(0x1f, PPS_SEQ_PARAMETER_SET_ID);\n+\tWRITE_PPS(pps->pic_parameter_set_id, PIC_PARAMETER_SET_ID);\n+\tWRITE_PPS(pps->seq_parameter_set_id, PPS_SEQ_PARAMETER_SET_ID);\n \tWRITE_PPS(!!(pps->flags & V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE),\n \t\t  ENTROPY_CODING_MODE_FLAG);\n \tWRITE_PPS(!!(pps->flags & V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT),\n"
  },
  {
    "path": "projects/Rockchip/patches/linux/default/linux-0020-drm-from-list.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 6 Jul 2020 22:30:13 +0000\nSubject: [PATCH] drm: drm_fourcc: add NV20 and NV30 YUV formats\n\nDRM_FORMAT_NV20 and DRM_FORMAT_NV30 formats is the 2x1 and non-subsampled\nvariant of NV15, a 10-bit 2-plane YUV format that has no padding between\ncomponents. Instead, luminance and chrominance samples are grouped into 4s\nso that each group is packed into an integer number of bytes:\n\nYYYY = UVUV = 4 * 10 bits = 40 bits = 5 bytes\n\nThe '20' and '30' suffix refers to the optimum effective bits per pixel\nwhich is achieved when the total number of luminance samples is a multiple\nof 4.\n\nV2: Added NV30 format\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\nReviewed-by: Sandy Huang <hjc@rock-chips.com>\n---\n drivers/gpu/drm/drm_fourcc.c  | 8 ++++++++\n include/uapi/drm/drm_fourcc.h | 2 ++\n 2 files changed, 10 insertions(+)\n\ndiff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c\nindex 07741b678798..5ec38456dc5d 100644\n--- a/drivers/gpu/drm/drm_fourcc.c\n+++ b/drivers/gpu/drm/drm_fourcc.c\n@@ -261,6 +261,14 @@ const struct drm_format_info *__drm_format_info(u32 format)\n \t\t  .num_planes = 2, .char_per_block = { 5, 5, 0 },\n \t\t  .block_w = { 4, 2, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2,\n \t\t  .vsub = 2, .is_yuv = true },\n+\t\t{ .format = DRM_FORMAT_NV20,\t\t.depth = 0,\n+\t\t  .num_planes = 2, .char_per_block = { 5, 5, 0 },\n+\t\t  .block_w = { 4, 2, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2,\n+\t\t  .vsub = 1, .is_yuv = true },\n+\t\t{ .format = DRM_FORMAT_NV30,\t\t.depth = 0,\n+\t\t  .num_planes = 2, .char_per_block = { 5, 5, 0 },\n+\t\t  .block_w = { 4, 2, 0 }, .block_h = { 1, 1, 0 }, .hsub = 1,\n+\t\t  .vsub = 1, .is_yuv = true },\n \t\t{ .format = DRM_FORMAT_Q410,\t\t.depth = 0,\n \t\t  .num_planes = 3, .char_per_block = { 2, 2, 2 },\n \t\t  .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0,\ndiff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h\nindex 0206f812c569..fa49ee98f275 100644\n--- a/include/uapi/drm/drm_fourcc.h\n+++ b/include/uapi/drm/drm_fourcc.h\n@@ -285,6 +285,8 @@ extern \"C\" {\n  * index 1 = Cr:Cb plane, [39:0] Cr1:Cb1:Cr0:Cb0 little endian\n  */\n #define DRM_FORMAT_NV15\t\tfourcc_code('N', 'V', '1', '5') /* 2x2 subsampled Cr:Cb plane */\n+#define DRM_FORMAT_NV20\t\tfourcc_code('N', 'V', '2', '0') /* 2x1 subsampled Cr:Cb plane */\n+#define DRM_FORMAT_NV30\t\tfourcc_code('N', 'V', '3', '0') /* non-subsampled Cr:Cb plane */\n \n /*\n  * 2 plane YCbCr MSB aligned\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 6 Jul 2020 22:30:13 +0000\nSubject: [PATCH] drm: rockchip: add NV15, NV20 and NV30 support\n\nAdd support for displaying 10-bit 4:2:0 and 4:2:2 formats produced by the\nRockchip Video Decoder on RK322X, RK3288, RK3328, RK3368 and RK3399.\nAlso add support for 10-bit 4:4:4 format while at it.\n\nV2: Added NV30 support\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\nReviewed-by: Sandy Huang <hjc@rock-chips.com>\n---\n drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 29 +++++++++++++++++--\n drivers/gpu/drm/rockchip/rockchip_drm_vop.h |  1 +\n drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 32 +++++++++++++++++----\n 3 files changed, 54 insertions(+), 8 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\nindex d32117633efe..9e71263ac770 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n@@ -280,6 +280,18 @@ static bool has_uv_swapped(uint32_t format)\n \t}\n }\n \n+static bool is_fmt_10(uint32_t format)\n+{\n+\tswitch (format) {\n+\tcase DRM_FORMAT_NV15:\n+\tcase DRM_FORMAT_NV20:\n+\tcase DRM_FORMAT_NV30:\n+\t\treturn true;\n+\tdefault:\n+\t\treturn false;\n+\t}\n+}\n+\n static enum vop_data_format vop_convert_format(uint32_t format)\n {\n \tswitch (format) {\n@@ -295,12 +307,15 @@ static enum vop_data_format vop_convert_format(uint32_t format)\n \tcase DRM_FORMAT_BGR565:\n \t\treturn VOP_FMT_RGB565;\n \tcase DRM_FORMAT_NV12:\n+\tcase DRM_FORMAT_NV15:\n \tcase DRM_FORMAT_NV21:\n \t\treturn VOP_FMT_YUV420SP;\n \tcase DRM_FORMAT_NV16:\n+\tcase DRM_FORMAT_NV20:\n \tcase DRM_FORMAT_NV61:\n \t\treturn VOP_FMT_YUV422SP;\n \tcase DRM_FORMAT_NV24:\n+\tcase DRM_FORMAT_NV30:\n \tcase DRM_FORMAT_NV42:\n \t\treturn VOP_FMT_YUV444SP;\n \tdefault:\n@@ -954,7 +969,12 @@ static void vop_plane_atomic_update(struct drm_plane *plane,\n \tdsp_sty = dest->y1 + crtc->mode.vtotal - crtc->mode.vsync_start;\n \tdsp_st = dsp_sty << 16 | (dsp_stx & 0xffff);\n \n-\toffset = (src->x1 >> 16) * fb->format->cpp[0];\n+\tif (fb->format->block_w[0])\n+\t\toffset = (src->x1 >> 16) * fb->format->char_per_block[0] /\n+\t\t\t fb->format->block_w[0];\n+\telse\n+\t\toffset = (src->x1 >> 16) * fb->format->cpp[0];\n+\n \toffset += (src->y1 >> 16) * fb->pitches[0];\n \tdma_addr = rk_obj->dma_addr + offset + fb->offsets[0];\n \n@@ -980,6 +1000,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,\n \t}\n \n \tVOP_WIN_SET(vop, win, format, format);\n+\tVOP_WIN_SET(vop, win, fmt_10, is_fmt_10(fb->format->format));\n \tVOP_WIN_SET(vop, win, yrgb_vir, DIV_ROUND_UP(fb->pitches[0], 4));\n \tVOP_WIN_SET(vop, win, yrgb_mst, dma_addr);\n \tVOP_WIN_YUV2YUV_SET(vop, win_yuv2yuv, y2r_en, is_yuv);\n@@ -996,7 +1017,11 @@ static void vop_plane_atomic_update(struct drm_plane *plane,\n \t\tuv_obj = fb->obj[1];\n \t\trk_uv_obj = to_rockchip_obj(uv_obj);\n \n-\t\toffset = (src->x1 >> 16) * bpp / hsub;\n+\t\tif (fb->format->block_w[1])\n+\t\t\toffset = (src->x1 >> 16) * bpp /\n+\t\t\t\t fb->format->block_w[1] / hsub;\n+\t\telse\n+\t\t\toffset = (src->x1 >> 16) * bpp / hsub;\n \t\toffset += (src->y1 >> 16) * fb->pitches[1] / vsub;\n \n \t\tdma_addr = rk_uv_obj->dma_addr + offset + fb->offsets[1];\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h\nindex 8502849833d9..b6eea31109d5 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h\n@@ -181,6 +181,7 @@ struct vop_win_phy {\n \tstruct vop_reg enable;\n \tstruct vop_reg gate;\n \tstruct vop_reg format;\n+\tstruct vop_reg fmt_10;\n \tstruct vop_reg rb_swap;\n \tstruct vop_reg uv_swap;\n \tstruct vop_reg act_info;\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c\nindex 014f99e8928e..16e6aa01e400 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c\n@@ -53,6 +53,23 @@ static const uint32_t formats_win_full[] = {\n \tDRM_FORMAT_NV42,\n };\n \n+static const uint32_t formats_win_full_10[] = {\n+\tDRM_FORMAT_XRGB8888,\n+\tDRM_FORMAT_ARGB8888,\n+\tDRM_FORMAT_XBGR8888,\n+\tDRM_FORMAT_ABGR8888,\n+\tDRM_FORMAT_RGB888,\n+\tDRM_FORMAT_BGR888,\n+\tDRM_FORMAT_RGB565,\n+\tDRM_FORMAT_BGR565,\n+\tDRM_FORMAT_NV12,\n+\tDRM_FORMAT_NV16,\n+\tDRM_FORMAT_NV24,\n+\tDRM_FORMAT_NV15,\n+\tDRM_FORMAT_NV20,\n+\tDRM_FORMAT_NV30,\n+};\n+\n static const uint64_t format_modifiers_win_full[] = {\n \tDRM_FORMAT_MOD_LINEAR,\n \tDRM_FORMAT_MOD_INVALID,\n@@ -621,11 +638,12 @@ static const struct vop_scl_regs rk3288_win_full_scl = {\n \n static const struct vop_win_phy rk3288_win01_data = {\n \t.scl = &rk3288_win_full_scl,\n-\t.data_formats = formats_win_full,\n-\t.nformats = ARRAY_SIZE(formats_win_full),\n+\t.data_formats = formats_win_full_10,\n+\t.nformats = ARRAY_SIZE(formats_win_full_10),\n \t.format_modifiers = format_modifiers_win_full,\n \t.enable = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 0),\n \t.format = VOP_REG(RK3288_WIN0_CTRL0, 0x7, 1),\n+\t.fmt_10 = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 4),\n \t.rb_swap = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 12),\n \t.uv_swap = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 15),\n \t.act_info = VOP_REG(RK3288_WIN0_ACT_INFO, 0x1fff1fff, 0),\n@@ -756,11 +774,12 @@ static const struct vop_intr rk3368_vop_intr = {\n \n static const struct vop_win_phy rk3368_win01_data = {\n \t.scl = &rk3288_win_full_scl,\n-\t.data_formats = formats_win_full,\n-\t.nformats = ARRAY_SIZE(formats_win_full),\n+\t.data_formats = formats_win_full_10,\n+\t.nformats = ARRAY_SIZE(formats_win_full_10),\n \t.format_modifiers = format_modifiers_win_full,\n \t.enable = VOP_REG(RK3368_WIN0_CTRL0, 0x1, 0),\n \t.format = VOP_REG(RK3368_WIN0_CTRL0, 0x7, 1),\n+\t.fmt_10 = VOP_REG(RK3368_WIN0_CTRL0, 0x1, 4),\n \t.rb_swap = VOP_REG(RK3368_WIN0_CTRL0, 0x1, 12),\n \t.uv_swap = VOP_REG(RK3368_WIN0_CTRL0, 0x1, 15),\n \t.x_mir_en = VOP_REG(RK3368_WIN0_CTRL0, 0x1, 21),\n@@ -924,11 +943,12 @@ static const struct vop_win_yuv2yuv_data rk3399_vop_big_win_yuv2yuv_data[] = {\n \n static const struct vop_win_phy rk3399_win01_data = {\n \t.scl = &rk3288_win_full_scl,\n-\t.data_formats = formats_win_full,\n-\t.nformats = ARRAY_SIZE(formats_win_full),\n+\t.data_formats = formats_win_full_10,\n+\t.nformats = ARRAY_SIZE(formats_win_full_10),\n \t.format_modifiers = format_modifiers_win_full_afbc,\n \t.enable = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 0),\n \t.format = VOP_REG(RK3288_WIN0_CTRL0, 0x7, 1),\n+\t.fmt_10 = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 4),\n \t.rb_swap = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 12),\n \t.uv_swap = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 15),\n \t.x_mir_en = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 21),\n"
  },
  {
    "path": "projects/Rockchip/patches/linux/default/linux-1000-drm-rockchip.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sun, 3 May 2020 16:51:31 +0000\nSubject: [PATCH] drm/rockchip: vop: filter modes outside 0.5% pixel clock\n tolerance\n\nFilter modes that require a pixel clock that differ more then 0.5%\nfrom the requested pixel clock.\n\nThis filter is only applied to tmds only connector and/or encoders.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 54 +++++++++++++++++++++\n 1 file changed, 54 insertions(+)\n\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\nindex dbe4d411b30f..fac23d370ee0 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n@@ -1206,6 +1206,59 @@ static void vop_crtc_disable_vblank(struct drm_crtc *crtc)\n \tspin_unlock_irqrestore(&vop->irq_lock, flags);\n }\n \n+static bool vop_crtc_is_tmds(struct drm_crtc *crtc)\n+{\n+\tstruct rockchip_crtc_state *s = to_rockchip_crtc_state(crtc->state);\n+\tstruct drm_encoder *encoder;\n+\n+\tswitch (s->output_type) {\n+\tcase DRM_MODE_CONNECTOR_LVDS:\n+\tcase DRM_MODE_CONNECTOR_DSI:\n+\t\treturn false;\n+\tcase DRM_MODE_CONNECTOR_eDP:\n+\tcase DRM_MODE_CONNECTOR_HDMIA:\n+\tcase DRM_MODE_CONNECTOR_DisplayPort:\n+\t\treturn true;\n+\t}\n+\n+\tdrm_for_each_encoder_mask(encoder, crtc->dev, crtc->state->encoder_mask)\n+\t\tif (encoder->encoder_type == DRM_MODE_ENCODER_TMDS)\n+\t\t\treturn true;\n+\n+\treturn false;\n+}\n+\n+/*\n+ * The VESA DMT standard specifies a 0.5% pixel clock frequency tolerance.\n+ * The CVT spec reuses that tolerance in its examples.\n+ */\n+#define\tCLOCK_TOLERANCE_PER_MILLE\t5\n+\n+static enum drm_mode_status vop_crtc_mode_valid(struct drm_crtc *crtc,\n+\t\t\t\t\tconst struct drm_display_mode *mode)\n+{\n+\tstruct vop *vop = to_vop(crtc);\n+\tlong rounded_rate;\n+\tlong lowest, highest;\n+\n+\tif (!vop_crtc_is_tmds(crtc))\n+\t\treturn MODE_OK;\n+\n+\trounded_rate = clk_round_rate(vop->dclk, mode->clock * 1000 + 999);\n+\tif (rounded_rate < 0)\n+\t\treturn MODE_NOCLOCK;\n+\n+\tlowest = mode->clock * (1000 - CLOCK_TOLERANCE_PER_MILLE);\n+\tif (rounded_rate < lowest)\n+\t\treturn MODE_CLOCK_LOW;\n+\n+\thighest = mode->clock * (1000 + CLOCK_TOLERANCE_PER_MILLE);\n+\tif (rounded_rate > highest)\n+\t\treturn MODE_CLOCK_HIGH;\n+\n+\treturn MODE_OK;\n+}\n+\n static bool vop_crtc_mode_fixup(struct drm_crtc *crtc,\n \t\t\t\tconst struct drm_display_mode *mode,\n \t\t\t\tstruct drm_display_mode *adjusted_mode)\n@@ -1617,6 +1670,7 @@ static void vop_crtc_atomic_flush(struct drm_crtc *crtc,\n }\n \n static const struct drm_crtc_helper_funcs vop_crtc_helper_funcs = {\n+\t.mode_valid = vop_crtc_mode_valid,\n \t.mode_fixup = vop_crtc_mode_fixup,\n \t.atomic_check = vop_crtc_atomic_check,\n \t.atomic_begin = vop_crtc_atomic_begin,\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 20 Jul 2020 15:15:50 +0000\nSubject: [PATCH] drm/rockchip: vop: filter interlaced modes\n\nThe current version of the driver does not support interlaced modes,\nlets filter any interlaced mode.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\nindex fac23d370ee0..9f7326c5b1f5 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n@@ -1244,6 +1244,9 @@ static enum drm_mode_status vop_crtc_mode_valid(struct drm_crtc *crtc,\n \tif (!vop_crtc_is_tmds(crtc))\n \t\treturn MODE_OK;\n \n+\tif (mode->flags & DRM_MODE_FLAG_INTERLACE)\n+\t\treturn MODE_NO_INTERLACE;\n+\n \trounded_rate = clk_round_rate(vop->dclk, mode->clock * 1000 + 999);\n \tif (rounded_rate < 0)\n \t\treturn MODE_NOCLOCK;\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sat, 10 Oct 2020 14:57:30 +0000\nSubject: [PATCH] drm/rockchip: vop: define max output resolution supported\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/rockchip_drm_vop.h  | 6 ++++++\n drivers/gpu/drm/rockchip/rockchip_drm_vop2.h | 5 -----\n drivers/gpu/drm/rockchip/rockchip_vop_reg.c  | 7 +++++++\n 3 files changed, 13 insertions(+), 5 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h\nindex b6eea31109d5..ca4e2b7415fe 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h\n@@ -214,6 +214,11 @@ struct vop_win_data {\n \tenum drm_plane_type type;\n };\n \n+struct vop_rect {\n+\tint width;\n+\tint height;\n+};\n+\n struct vop_data {\n \tuint32_t version;\n \tconst struct vop_intr *intr;\n@@ -226,6 +231,7 @@ struct vop_data {\n \tconst struct vop_win_data *win;\n \tunsigned int win_size;\n \tunsigned int lut_size;\n+\tstruct vop_rect max_output;\n \n #define VOP_FEATURE_OUTPUT_RGB10\tBIT(0)\n #define VOP_FEATURE_INTERNAL_RGB\tBIT(1)\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.h\nindex c727093a06d6..f1234a151130 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.h\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.h\n@@ -27,11 +27,6 @@ enum win_dly_mode {\n \tVOP2_DLY_MODE_MAX,\n };\n \n-struct vop_rect {\n-\tint width;\n-\tint height;\n-};\n-\n enum vop2_scale_up_mode {\n \tVOP2_SCALE_UP_NRST_NBOR,\n \tVOP2_SCALE_UP_BIL,\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c\nindex 16e6aa01e400..9b25b8ffd0ce 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c\n@@ -743,6 +743,7 @@ static const struct vop_intr rk3288_vop_intr = {\n static const struct vop_data rk3288_vop = {\n \t.version = VOP_VERSION(3, 1),\n \t.feature = VOP_FEATURE_OUTPUT_RGB10,\n+\t.max_output = { 3840, 2160 },\n \t.intr = &rk3288_vop_intr,\n \t.common = &rk3288_common,\n \t.modeset = &rk3288_modeset,\n@@ -845,6 +846,7 @@ static const struct vop_misc rk3368_misc = {\n \n static const struct vop_data rk3368_vop = {\n \t.version = VOP_VERSION(3, 2),\n+\t.max_output = { 4096, 2160 },\n \t.intr = &rk3368_vop_intr,\n \t.common = &rk3288_common,\n \t.modeset = &rk3288_modeset,\n@@ -866,6 +868,7 @@ static const struct vop_intr rk3366_vop_intr = {\n \n static const struct vop_data rk3366_vop = {\n \t.version = VOP_VERSION(3, 4),\n+\t.max_output = { 4096, 2160 },\n \t.intr = &rk3366_vop_intr,\n \t.common = &rk3288_common,\n \t.modeset = &rk3288_modeset,\n@@ -994,6 +997,7 @@ static const struct vop_afbc rk3399_vop_afbc = {\n static const struct vop_data rk3399_vop_big = {\n \t.version = VOP_VERSION(3, 5),\n \t.feature = VOP_FEATURE_OUTPUT_RGB10,\n+\t.max_output = { 4096, 2160 },\n \t.intr = &rk3366_vop_intr,\n \t.common = &rk3399_common,\n \t.modeset = &rk3288_modeset,\n@@ -1021,6 +1025,7 @@ static const struct vop_win_yuv2yuv_data rk3399_vop_lit_win_yuv2yuv_data[] = {\n \n static const struct vop_data rk3399_vop_lit = {\n \t.version = VOP_VERSION(3, 6),\n+\t.max_output = { 2560, 1600 },\n \t.intr = &rk3366_vop_intr,\n \t.common = &rk3399_common,\n \t.modeset = &rk3288_modeset,\n@@ -1042,6 +1047,7 @@ static const struct vop_win_data rk3228_vop_win_data[] = {\n static const struct vop_data rk3228_vop = {\n \t.version = VOP_VERSION(3, 7),\n \t.feature = VOP_FEATURE_OUTPUT_RGB10,\n+\t.max_output = { 4096, 2160 },\n \t.intr = &rk3366_vop_intr,\n \t.common = &rk3288_common,\n \t.modeset = &rk3288_modeset,\n@@ -1113,6 +1119,7 @@ static const struct vop_win_data rk3328_vop_win_data[] = {\n static const struct vop_data rk3328_vop = {\n \t.version = VOP_VERSION(3, 8),\n \t.feature = VOP_FEATURE_OUTPUT_RGB10,\n+\t.max_output = { 4096, 2160 },\n \t.intr = &rk3328_vop_intr,\n \t.common = &rk3328_common,\n \t.modeset = &rk3328_modeset,\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 20 Jul 2020 11:46:16 +0000\nSubject: [PATCH] drm/rockchip: vop: filter modes above max output supported\n\nFilter any mode with a resolution not supported by the VOP.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 48 +++++++++++++++------\n 1 file changed, 34 insertions(+), 14 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\nindex 9f7326c5b1f5..30e252ba7184 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n@@ -1228,6 +1228,24 @@ static bool vop_crtc_is_tmds(struct drm_crtc *crtc)\n \treturn false;\n }\n \n+static enum drm_mode_status vop_crtc_size_valid(struct drm_crtc *crtc,\n+\t\t\t\t\tconst struct drm_display_mode *mode)\n+{\n+\tstruct vop *vop = to_vop(crtc);\n+\tconst struct vop_rect *max_output = &vop->data->max_output;\n+\n+\tif (max_output->width && max_output->height) {\n+\t\t/* only the size of the resulting rect matters */\n+\t\tif(drm_mode_validate_size(mode, max_output->width,\n+\t\t\t\t\t  max_output->height) != MODE_OK) {\n+\t\t\treturn drm_mode_validate_size(mode, max_output->height,\n+\t\t\t\t\t\t      max_output->width);\n+\t\t}\n+\t}\n+\n+\treturn MODE_OK;\n+}\n+\n /*\n  * The VESA DMT standard specifies a 0.5% pixel clock frequency tolerance.\n  * The CVT spec reuses that tolerance in its examples.\n@@ -1241,25 +1259,24 @@ static enum drm_mode_status vop_crtc_mode_valid(struct drm_crtc *crtc,\n \tlong rounded_rate;\n \tlong lowest, highest;\n \n-\tif (!vop_crtc_is_tmds(crtc))\n-\t\treturn MODE_OK;\n-\n \tif (mode->flags & DRM_MODE_FLAG_INTERLACE)\n-\t\treturn MODE_NO_INTERLACE;\n+\t\t\treturn MODE_NO_INTERLACE;\n \n-\trounded_rate = clk_round_rate(vop->dclk, mode->clock * 1000 + 999);\n-\tif (rounded_rate < 0)\n-\t\treturn MODE_NOCLOCK;\n+\tif (vop_crtc_is_tmds(crtc)) {\n+\t\trounded_rate = clk_round_rate(vop->dclk, mode->clock * 1000 + 999);\n+\t\tif (rounded_rate < 0)\n+\t\t\treturn MODE_NOCLOCK;\n \n-\tlowest = mode->clock * (1000 - CLOCK_TOLERANCE_PER_MILLE);\n-\tif (rounded_rate < lowest)\n-\t\treturn MODE_CLOCK_LOW;\n+\t\tlowest = mode->clock * (1000 - CLOCK_TOLERANCE_PER_MILLE);\n+\t\tif (rounded_rate < lowest)\n+\t\t\treturn MODE_CLOCK_LOW;\n \n-\thighest = mode->clock * (1000 + CLOCK_TOLERANCE_PER_MILLE);\n-\tif (rounded_rate > highest)\n-\t\treturn MODE_CLOCK_HIGH;\n+\t\thighest = mode->clock * (1000 + CLOCK_TOLERANCE_PER_MILLE);\n+\t\tif (rounded_rate > highest)\n+\t\t\treturn MODE_CLOCK_HIGH;\n+\t}\n \n-\treturn MODE_OK;\n+\treturn vop_crtc_size_valid(crtc, mode);\n }\n \n static bool vop_crtc_mode_fixup(struct drm_crtc *crtc,\n@@ -1269,6 +1286,9 @@ static bool vop_crtc_mode_fixup(struct drm_crtc *crtc,\n \tstruct vop *vop = to_vop(crtc);\n \tunsigned long rate;\n \n+\tif (vop_crtc_size_valid(crtc, adjusted_mode) != MODE_OK)\n+\t\treturn false;\n+\n \t/*\n \t * Clock craziness.\n \t *\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Yakir Yang <ykk@rock-chips.com>\nDate: Mon, 11 Jul 2016 19:05:39 +0800\nSubject: [PATCH] drm/rockchip: dw_hdmi: adjust cklvl & txlvl for RF/EMI\n\nDut to the high HDMI signal voltage driver, Mickey have meet\na serious RF/EMI problem, so we decided to reduce HDMI signal\nvoltage to a proper value.\n\nThe default params for phy is cklvl = 20 & txlvl = 13 (RF/EMI failed)\n  ck: lvl = 13, term=100, vlo = 2.71, vhi=3.14, vswing = 0.43\n  tx: lvl = 20, term=100, vlo = 2.81, vhi=3.16, vswing = 0.35\n\n1. We decided to reduce voltage value to lower, but VSwing still\nkeep high, RF/EMI have been improved but still failed.\n   ck: lvl =  6, term=100, vlo = 2.61, vhi=3.11, vswing = 0.50\n   tx: lvl =  6, term=100, vlo = 2.61, vhi=3.11, vswing = 0.50\n\n2. We try to keep voltage value and vswing both lower, then RF/EMI\ntest all passed  ;)\n   ck: lvl = 11, term= 66, vlo = 2.68, vhi=3.09, vswing = 0.40\n   tx: lvl = 11, term= 66, vlo = 2.68, vhi=3.09, vswing = 0.40\nWhen we back to run HDMI different test and single-end test, we see\ndifferent test passed, but signle-end test failed. The oscilloscope\nshow that simgle-end clock's VL value is 1.78v (which remind LowLimit\nshould not lower then 2.6v).\n\n3. That's to say there are some different between PHY document and\nmeasure value. And according to experiment 2 results, we need to\nhigher clock voltage and lower data voltage, then we can keep RF/EMI\nsatisfied and single-end & differen test passed.\n  ck: lvl =  9, term=100, vlo = 2.65, vhi=3.12, vswing = 0.47\n  tx: lvl = 16, term=100, vlo = 2.75, vhi=3.15, vswing = 0.39\n\nSigned-off-by: Yakir Yang <ykk@rock-chips.com>\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex c14f88893868..4411ca8fd7ed 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -193,7 +193,7 @@ static const struct dw_hdmi_curr_ctrl rockchip_cur_ctr[] = {\n static const struct dw_hdmi_phy_config rockchip_phy_config[] = {\n \t/*pixelclk   symbol   term   vlev*/\n \t{ 74250000,  0x8009, 0x0004, 0x0272},\n-\t{ 148500000, 0x802b, 0x0004, 0x028d},\n+\t{ 165000000, 0x802b, 0x0004, 0x0209},\n \t{ 297000000, 0x8039, 0x0005, 0x028d},\n \t{ ~0UL,\t     0x0000, 0x0000, 0x0000}\n };\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Nickey Yang <nickey.yang@rock-chips.com>\nDate: Mon, 13 Feb 2017 15:40:29 +0800\nSubject: [PATCH] drm/rockchip: dw_hdmi: add phy_config for 594Mhz pixel clock\n\nAdd phy_config for 594Mhz pixel clock used for 4K@60hz\n\nSigned-off-by: Nickey Yang <nickey.yang@rock-chips.com>\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex 4411ca8fd7ed..bec381cde0bc 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -195,6 +195,7 @@ static const struct dw_hdmi_phy_config rockchip_phy_config[] = {\n \t{ 74250000,  0x8009, 0x0004, 0x0272},\n \t{ 165000000, 0x802b, 0x0004, 0x0209},\n \t{ 297000000, 0x8039, 0x0005, 0x028d},\n+\t{ 594000000, 0x8039, 0x0000, 0x019d},\n \t{ ~0UL,\t     0x0000, 0x0000, 0x0000}\n };\n \n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Douglas Anderson <dianders@chromium.org>\nDate: Mon, 11 Jul 2016 19:05:36 +0800\nSubject: [PATCH] drm/rockchip: dw_hdmi: Set cur_ctr to 0 always\n\nJitter was improved by lowering the MPLL bandwidth to account for high\nfrequency noise in the rk3288 PLL.  In each case MPLL bandwidth was\nlowered only enough to get us a comfortable margin.  We believe that\nlowering the bandwidth like this is safe given sufficient testing.\n\nSigned-off-by: Douglas Anderson <dianders@chromium.org>\nSigned-off-by: Yakir Yang <ykk@rock-chips.com>\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 16 ++--------------\n 1 file changed, 2 insertions(+), 14 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex bec381cde0bc..72c1d65c7b75 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -172,20 +172,8 @@ static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = {\n static const struct dw_hdmi_curr_ctrl rockchip_cur_ctr[] = {\n \t/*      pixelclk    bpp8    bpp10   bpp12 */\n \t{\n-\t\t40000000,  { 0x0018, 0x0018, 0x0018 },\n-\t}, {\n-\t\t65000000,  { 0x0028, 0x0028, 0x0028 },\n-\t}, {\n-\t\t66000000,  { 0x0038, 0x0038, 0x0038 },\n-\t}, {\n-\t\t74250000,  { 0x0028, 0x0038, 0x0038 },\n-\t}, {\n-\t\t83500000,  { 0x0028, 0x0038, 0x0038 },\n-\t}, {\n-\t\t146250000, { 0x0038, 0x0038, 0x0038 },\n-\t}, {\n-\t\t148500000, { 0x0000, 0x0038, 0x0038 },\n-\t}, {\n+\t\t600000000, { 0x0000, 0x0000, 0x0000 },\n+\t},  {\n \t\t~0UL,      { 0x0000, 0x0000, 0x0000},\n \t}\n };\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Douglas Anderson <dianders@chromium.org>\nDate: Mon, 11 Jul 2016 19:05:42 +0800\nSubject: [PATCH] drm/rockchip: dw_hdmi: Use auto-generated tables\n\nThe previous tables for mpll_cfg and curr_ctrl were created using the\n20-pages of example settings provided by the PHY vendor.  Those\nexample settings weren't particularly dense, so there were places\nwhere we were guessing what the settings would be for 10-bit and\n12-bit (not that we use those anyway).  It was also always a lot of\nextra work every time we wanted to add a new clock rate since we had\nto cross-reference several tables.\n\nIn <http://crosreview.com/285855> I've gone through the work to figure\nout how to generate this table automatically.  Let's now use the\nautomatically generated table and then we'll never need to look at it\nagain.\n\nWe only support 8-bit mode right now and only support a small number\nof clock rates and and I've verified that the only 8-bit rate that was\naffected was 148.5.  That mode appears to have been wrong in the old\ntable.\n\nSigned-off-by: Douglas Anderson <dianders@chromium.org>\nSigned-off-by: Yakir Yang <ykk@rock-chips.com>\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 130 +++++++++++---------\n 1 file changed, 69 insertions(+), 61 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex 72c1d65c7b75..0370bb247fcb 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -91,80 +91,88 @@ static struct rockchip_hdmi *to_rockchip_hdmi(struct drm_encoder *encoder)\n \n static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = {\n \t{\n-\t\t27000000, {\n-\t\t\t{ 0x00b3, 0x0000},\n-\t\t\t{ 0x2153, 0x0000},\n-\t\t\t{ 0x40f3, 0x0000}\n+\t\t30666000, {\n+\t\t\t{ 0x00b3, 0x0000 },\n+\t\t\t{ 0x2153, 0x0000 },\n+\t\t\t{ 0x40f3, 0x0000 },\n \t\t},\n-\t}, {\n-\t\t36000000, {\n-\t\t\t{ 0x00b3, 0x0000},\n-\t\t\t{ 0x2153, 0x0000},\n-\t\t\t{ 0x40f3, 0x0000}\n+\t},  {\n+\t\t36800000, {\n+\t\t\t{ 0x00b3, 0x0000 },\n+\t\t\t{ 0x2153, 0x0000 },\n+\t\t\t{ 0x40a2, 0x0001 },\n \t\t},\n-\t}, {\n-\t\t40000000, {\n-\t\t\t{ 0x00b3, 0x0000},\n-\t\t\t{ 0x2153, 0x0000},\n-\t\t\t{ 0x40f3, 0x0000}\n+\t},  {\n+\t\t46000000, {\n+\t\t\t{ 0x00b3, 0x0000 },\n+\t\t\t{ 0x2142, 0x0001 },\n+\t\t\t{ 0x40a2, 0x0001 },\n \t\t},\n-\t}, {\n-\t\t54000000, {\n-\t\t\t{ 0x0072, 0x0001},\n-\t\t\t{ 0x2142, 0x0001},\n-\t\t\t{ 0x40a2, 0x0001},\n+\t},  {\n+\t\t61333000, {\n+\t\t\t{ 0x0072, 0x0001 },\n+\t\t\t{ 0x2142, 0x0001 },\n+\t\t\t{ 0x40a2, 0x0001 },\n \t\t},\n-\t}, {\n-\t\t65000000, {\n-\t\t\t{ 0x0072, 0x0001},\n-\t\t\t{ 0x2142, 0x0001},\n-\t\t\t{ 0x40a2, 0x0001},\n+\t},  {\n+\t\t73600000, {\n+\t\t\t{ 0x0072, 0x0001 },\n+\t\t\t{ 0x2142, 0x0001 },\n+\t\t\t{ 0x4061, 0x0002 },\n \t\t},\n-\t}, {\n-\t\t66000000, {\n-\t\t\t{ 0x013e, 0x0003},\n-\t\t\t{ 0x217e, 0x0002},\n-\t\t\t{ 0x4061, 0x0002}\n+\t},  {\n+\t\t92000000, {\n+\t\t\t{ 0x0072, 0x0001 },\n+\t\t\t{ 0x2145, 0x0002 },\n+\t\t\t{ 0x4061, 0x0002 },\n+\t\t},\n+\t},  {\n+\t\t122666000, {\n+\t\t\t{ 0x0051, 0x0002 },\n+\t\t\t{ 0x2145, 0x0002 },\n+\t\t\t{ 0x4061, 0x0002 },\n \t\t},\n-\t}, {\n-\t\t74250000, {\n-\t\t\t{ 0x0072, 0x0001},\n-\t\t\t{ 0x2145, 0x0002},\n-\t\t\t{ 0x4061, 0x0002}\n+\t},  {\n+\t\t147200000, {\n+\t\t\t{ 0x0051, 0x0002 },\n+\t\t\t{ 0x2145, 0x0002 },\n+\t\t\t{ 0x4064, 0x0003 },\n \t\t},\n-\t}, {\n-\t\t83500000, {\n-\t\t\t{ 0x0072, 0x0001},\n+\t},  {\n+\t\t184000000, {\n+\t\t\t{ 0x0051, 0x0002 },\n+\t\t\t{ 0x214c, 0x0003 },\n+\t\t\t{ 0x4064, 0x0003 },\n \t\t},\n-\t}, {\n-\t\t108000000, {\n-\t\t\t{ 0x0051, 0x0002},\n-\t\t\t{ 0x2145, 0x0002},\n-\t\t\t{ 0x4061, 0x0002}\n+\t},  {\n+\t\t226666000, {\n+\t\t\t{ 0x0040, 0x0003 },\n+\t\t\t{ 0x214c, 0x0003 },\n+\t\t\t{ 0x4064, 0x0003 },\n \t\t},\n-\t}, {\n-\t\t106500000, {\n-\t\t\t{ 0x0051, 0x0002},\n-\t\t\t{ 0x2145, 0x0002},\n-\t\t\t{ 0x4061, 0x0002}\n+\t},  {\n+\t\t272000000, {\n+\t\t\t{ 0x0040, 0x0003 },\n+\t\t\t{ 0x214c, 0x0003 },\n+\t\t\t{ 0x5a64, 0x0003 },\n \t\t},\n-\t}, {\n-\t\t146250000, {\n-\t\t\t{ 0x0051, 0x0002},\n-\t\t\t{ 0x2145, 0x0002},\n-\t\t\t{ 0x4061, 0x0002}\n+\t},  {\n+\t\t340000000, {\n+\t\t\t{ 0x0040, 0x0003 },\n+\t\t\t{ 0x3b4c, 0x0003 },\n+\t\t\t{ 0x5a64, 0x0003 },\n \t\t},\n-\t}, {\n-\t\t148500000, {\n-\t\t\t{ 0x0051, 0x0003},\n-\t\t\t{ 0x214c, 0x0003},\n-\t\t\t{ 0x4064, 0x0003}\n+\t},  {\n+\t\t600000000, {\n+\t\t\t{ 0x1a40, 0x0003 },\n+\t\t\t{ 0x3b4c, 0x0003 },\n+\t\t\t{ 0x5a64, 0x0003 },\n \t\t},\n-\t}, {\n+\t},  {\n \t\t~0UL, {\n-\t\t\t{ 0x00a0, 0x000a },\n-\t\t\t{ 0x2001, 0x000f },\n-\t\t\t{ 0x4002, 0x000f },\n+\t\t\t{ 0x0000, 0x0000 },\n+\t\t\t{ 0x0000, 0x0000 },\n+\t\t\t{ 0x0000, 0x0000 },\n \t\t},\n \t}\n };\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Wed, 8 Jan 2020 21:07:52 +0000\nSubject: [PATCH] drm/rockchip: dw-hdmi: limit tmds to 340mhz\n\nRK3228/RK3328 does not provide a stable hdmi signal at TMDS rates\nabove 371.25MHz (340MHz pixel clock).\n\nLimit the pixel clock rate to 340MHz to provide a stable signal.\nAlso limit the pixel clock to the display reported max tmds clock.\n\nThis also enables use of pixel clocks up to 340MHz on RK3288/RK3399.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 16 ++++------------\n 1 file changed, 4 insertions(+), 12 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex 0370bb247fcb..55c0b8dddad5 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -242,19 +242,11 @@ dw_hdmi_rockchip_mode_valid(struct dw_hdmi *hdmi, void *data,\n \t\t\t    const struct drm_display_info *info,\n \t\t\t    const struct drm_display_mode *mode)\n {\n-\tconst struct dw_hdmi_mpll_config *mpll_cfg = rockchip_mpll_cfg;\n-\tint pclk = mode->clock * 1000;\n-\tbool valid = false;\n-\tint i;\n-\n-\tfor (i = 0; mpll_cfg[i].mpixelclock != (~0UL); i++) {\n-\t\tif (pclk == mpll_cfg[i].mpixelclock) {\n-\t\t\tvalid = true;\n-\t\t\tbreak;\n-\t\t}\n-\t}\n+\tif (mode->clock > 340000 ||\n+\t    (info->max_tmds_clock && mode->clock > info->max_tmds_clock))\n+\t\treturn MODE_CLOCK_HIGH;\n \n-\treturn (valid) ? MODE_OK : MODE_BAD;\n+\treturn MODE_OK;\n }\n \n static void dw_hdmi_rockchip_encoder_disable(struct drm_encoder *encoder)\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Wed, 8 Jan 2020 21:07:49 +0000\nSubject: [PATCH] drm/rockchip: dw-hdmi: allow high tmds bit rates\n\nPrepare support for High TMDS Bit Rates used by HDMI2.0 display modes.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex 55c0b8dddad5..15ecb257b902 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -327,6 +327,8 @@ static int dw_hdmi_rockchip_genphy_init(struct dw_hdmi *dw_hdmi, void *data,\n {\n \tstruct rockchip_hdmi *hdmi = (struct rockchip_hdmi *)data;\n \n+\tdw_hdmi_set_high_tmds_clock_ratio(dw_hdmi, display);\n+\n \treturn phy_power_on(hdmi->phy);\n }\n \n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Wed, 8 Jan 2020 21:07:52 +0000\nSubject: [PATCH] drm/rockchip: dw-hdmi: remove unused plat_data on\n rk3228/rk3328\n\nmpll_cfg/cur_ctr/phy_config is not used when phy_force_vendor is true,\nlets remove them.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 6 ------\n 1 file changed, 6 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex 15ecb257b902..38dded2baaf7 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -417,9 +417,6 @@ static struct rockchip_hdmi_chip_data rk3228_chip_data = {\n \n static const struct dw_hdmi_plat_data rk3228_hdmi_drv_data = {\n \t.mode_valid = dw_hdmi_rockchip_mode_valid,\n-\t.mpll_cfg = rockchip_mpll_cfg,\n-\t.cur_ctr = rockchip_cur_ctr,\n-\t.phy_config = rockchip_phy_config,\n \t.phy_data = &rk3228_chip_data,\n \t.phy_ops = &rk3228_hdmi_phy_ops,\n \t.phy_name = \"inno_dw_hdmi_phy2\",\n@@ -454,9 +451,6 @@ static struct rockchip_hdmi_chip_data rk3328_chip_data = {\n \n static const struct dw_hdmi_plat_data rk3328_hdmi_drv_data = {\n \t.mode_valid = dw_hdmi_rockchip_mode_valid,\n-\t.mpll_cfg = rockchip_mpll_cfg,\n-\t.cur_ctr = rockchip_cur_ctr,\n-\t.phy_config = rockchip_phy_config,\n \t.phy_data = &rk3328_chip_data,\n \t.phy_ops = &rk3328_hdmi_phy_ops,\n \t.phy_name = \"inno_dw_hdmi_phy2\",\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sat, 10 Oct 2020 10:16:32 +0000\nSubject: [PATCH] drm/rockchip: dw-hdmi: encoder error handling\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 10 ++++++++--\n 1 file changed, 8 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex 38dded2baaf7..9e460b7e14a4 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -558,7 +558,7 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,\n \tif (IS_ERR(hdmi->phy)) {\n \t\tret = PTR_ERR(hdmi->phy);\n \t\tif (ret != -EPROBE_DEFER)\n-\t\t\tDRM_DEV_ERROR(hdmi->dev, \"failed to get phy\\n\");\n+\t\t\tDRM_DEV_ERROR(hdmi->dev, \"Failed to get phy: %d\\n\", ret);\n \t\treturn ret;\n \t}\n \n@@ -590,7 +590,12 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,\n \t}\n \n \tdrm_encoder_helper_add(encoder, &dw_hdmi_rockchip_encoder_helper_funcs);\n-\tdrm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TMDS);\n+\n+\tret = drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TMDS);\n+\tif (ret) {\n+\t\tDRM_DEV_ERROR(hdmi->dev, \"Failed to init encoder: %d\\n\", ret);\n+\t\tgoto err_disable_clk;\n+\t}\n \n \tplatform_set_drvdata(pdev, hdmi);\n \n@@ -609,6 +614,7 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,\n \n err_bind:\n \tdrm_encoder_cleanup(encoder);\n+err_disable_clk:\n \tclk_disable_unprepare(hdmi->ref_clk);\n err_clk:\n \tregulator_disable(hdmi->avdd_1v8);\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Wed, 8 Jan 2020 21:07:50 +0000\nSubject: [PATCH] clk: rockchip: set parent rate for DCLK_VOP clock on rk3228\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/clk/rockchip/clk-rk3228.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c\nindex a24a35553e13..7343d2d7676b 100644\n--- a/drivers/clk/rockchip/clk-rk3228.c\n+++ b/drivers/clk/rockchip/clk-rk3228.c\n@@ -409,7 +409,7 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = {\n \t\t\tRK2928_CLKSEL_CON(29), 0, 3, DFLAGS),\n \tDIV(0, \"sclk_vop_pre\", \"sclk_vop_src\", 0,\n \t\t\tRK2928_CLKSEL_CON(27), 8, 8, DFLAGS),\n-\tMUX(DCLK_VOP, \"dclk_vop\", mux_dclk_vop_p, 0,\n+\tMUX(DCLK_VOP, \"dclk_vop\", mux_dclk_vop_p, CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT,\n \t\t\tRK2928_CLKSEL_CON(27), 1, 1, MFLAGS),\n \n \tFACTOR(0, \"xin12m\", \"xin24m\", 0, 1, 2),\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sat, 10 Oct 2020 14:32:21 +0000\nSubject: [PATCH] drm/rockchip: vop: split rk3288 vop\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 21 ++++++++++++++++++---\n 1 file changed, 18 insertions(+), 3 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c\nindex 9b25b8ffd0ce..a2b281e290e0 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c\n@@ -740,7 +740,7 @@ static const struct vop_intr rk3288_vop_intr = {\n \t.clear = VOP_REG(RK3288_INTR_CTRL0, 0xf, 8),\n };\n \n-static const struct vop_data rk3288_vop = {\n+static const struct vop_data rk3288_vop_big = {\n \t.version = VOP_VERSION(3, 1),\n \t.feature = VOP_FEATURE_OUTPUT_RGB10,\n \t.max_output = { 3840, 2160 },\n@@ -753,6 +753,19 @@ static const struct vop_data rk3288_vop = {\n \t.lut_size = 1024,\n };\n \n+static const struct vop_data rk3288_vop_lit = {\n+\t.version = VOP_VERSION(3, 1),\n+\t.feature = VOP_FEATURE_OUTPUT_RGB10,\n+\t.max_output = { 2560, 1600 },\n+\t.intr = &rk3288_vop_intr,\n+\t.common = &rk3288_common,\n+\t.modeset = &rk3288_modeset,\n+\t.output = &rk3288_output,\n+\t.win = rk3288_vop_win_data,\n+\t.win_size = ARRAY_SIZE(rk3288_vop_win_data),\n+\t.lut_size = 1024,\n+};\n+\n static const int rk3368_vop_intrs[] = {\n \tFS_INTR,\n \t0, 0,\n@@ -1142,8 +1155,10 @@ static const struct of_device_id vop_driver_dt_match[] = {\n \t  .data = &rk3066_vop },\n \t{ .compatible = \"rockchip,rk3188-vop\",\n \t  .data = &rk3188_vop },\n-\t{ .compatible = \"rockchip,rk3288-vop\",\n-\t  .data = &rk3288_vop },\n+\t{ .compatible = \"rockchip,rk3288-vop-big\",\n+\t  .data = &rk3288_vop_big },\n+\t{ .compatible = \"rockchip,rk3288-vop-lit\",\n+\t  .data = &rk3288_vop_lit },\n \t{ .compatible = \"rockchip,rk3368-vop\",\n \t  .data = &rk3368_vop },\n \t{ .compatible = \"rockchip,rk3366-vop\",\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sat, 10 Oct 2020 14:33:30 +0000\nSubject: [PATCH] ARM: dts: rockchip: split rk3288 vop\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n arch/arm/boot/dts/rk3288.dtsi | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi\nindex 487b0e03d4b4..c60eacab8a79 100644\n--- a/arch/arm/boot/dts/rk3288.dtsi\n+++ b/arch/arm/boot/dts/rk3288.dtsi\n@@ -1017,7 +1017,7 @@ rga: rga@ff920000 {\n \t};\n \n \tvopb: vop@ff930000 {\n-\t\tcompatible = \"rockchip,rk3288-vop\";\n+\t\tcompatible = \"rockchip,rk3288-vop-big\";\n \t\treg = <0x0 0xff930000 0x0 0x19c>, <0x0 0xff931000 0x0 0x1000>;\n \t\tinterrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;\n \t\tclocks = <&cru ACLK_VOP0>, <&cru DCLK_VOP0>, <&cru HCLK_VOP0>;\n@@ -1066,7 +1066,7 @@ vopb_mmu: iommu@ff930300 {\n \t};\n \n \tvopl: vop@ff940000 {\n-\t\tcompatible = \"rockchip,rk3288-vop\";\n+\t\tcompatible = \"rockchip,rk3288-vop-lit\";\n \t\treg = <0x0 0xff940000 0x0 0x19c>, <0x0 0xff941000 0x0 0x1000>;\n \t\tinterrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;\n \t\tclocks = <&cru ACLK_VOP1>, <&cru DCLK_VOP1>, <&cru HCLK_VOP1>;\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 20 Jul 2020 18:00:44 +0000\nSubject: [PATCH] drm/bridge: dw-hdmi: add mtmdsclock parameter to phy\n configure ops\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 10 ++++++----\n drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c    |  3 ++-\n include/drm/bridge/dw_hdmi.h              |  3 ++-\n 3 files changed, 10 insertions(+), 6 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\nindex 40d8ca37f5bc..22af42a08980 100644\n--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n@@ -138,7 +138,8 @@ struct dw_hdmi_phy_data {\n \tbool has_svsret;\n \tint (*configure)(struct dw_hdmi *hdmi,\n \t\t\t const struct dw_hdmi_plat_data *pdata,\n-\t\t\t unsigned long mpixelclock);\n+\t\t\t unsigned long mpixelclock,\n+\t\t\t unsigned long mtmdsclock);\n };\n \n struct dw_hdmi {\n@@ -1585,7 +1586,8 @@ static int dw_hdmi_phy_power_on(struct dw_hdmi *hdmi)\n  */\n static int hdmi_phy_configure_dwc_hdmi_3d_tx(struct dw_hdmi *hdmi,\n \t\tconst struct dw_hdmi_plat_data *pdata,\n-\t\tunsigned long mpixelclock)\n+\t\tunsigned long mpixelclock,\n+\t\tunsigned long mtmdsclock)\n {\n \tconst struct dw_hdmi_mpll_config *mpll_config = pdata->mpll_cfg;\n \tconst struct dw_hdmi_curr_ctrl *curr_ctrl = pdata->cur_ctr;\n@@ -1660,9 +1662,9 @@ static int hdmi_phy_configure(struct dw_hdmi *hdmi,\n \n \t/* Write to the PHY as configured by the platform */\n \tif (pdata->configure_phy)\n-\t\tret = pdata->configure_phy(hdmi, pdata->priv_data, mpixelclock);\n+\t\tret = pdata->configure_phy(hdmi, pdata->priv_data, mpixelclock, mtmdsclock);\n \telse\n-\t\tret = phy->configure(hdmi, pdata, mpixelclock);\n+\t\tret = phy->configure(hdmi, pdata, mpixelclock, mtmdsclock);\n \tif (ret) {\n \t\tdev_err(hdmi->dev, \"PHY configuration failed (clock %lu)\\n\",\n \t\t\tmpixelclock);\ndiff --git a/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c b/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c\nindex 18ed14911b98..9c75095a25c5 100644\n--- a/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c\n+++ b/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c\n@@ -53,7 +53,8 @@ rcar_hdmi_mode_valid(struct dw_hdmi *hdmi, void *data,\n }\n \n static int rcar_hdmi_phy_configure(struct dw_hdmi *hdmi, void *data,\n-\t\t\t\t   unsigned long mpixelclock)\n+\t\t\t\t   unsigned long mpixelclock,\n+\t\t\t\t   unsigned long mtmdsclock)\n {\n \tconst struct rcar_hdmi_phy_params *params = rcar_hdmi_phy_params;\n \ndiff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h\nindex f668e75fbabe..48fb72f9614f 100644\n--- a/include/drm/bridge/dw_hdmi.h\n+++ b/include/drm/bridge/dw_hdmi.h\n@@ -159,7 +159,8 @@ struct dw_hdmi_plat_data {\n \tconst struct dw_hdmi_curr_ctrl *cur_ctr;\n \tconst struct dw_hdmi_phy_config *phy_config;\n \tint (*configure_phy)(struct dw_hdmi *hdmi, void *data,\n-\t\t\t     unsigned long mpixelclock);\n+\t\t\t     unsigned long mpixelclock,\n+\t\t\t     unsigned long mtmdsclock);\n \n \tunsigned int disable_cec : 1;\n };\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 20 Jul 2020 21:34:48 +0000\nSubject: [PATCH] drm/bridge: dw-hdmi: support configuring phy for deep color\n\nQ: Should we rename dw_hdmi_curr_ctrl and dw_hdmi_phy_config mpixelclock to mtmdsclock ?\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 17 ++++++++++++-----\n 1 file changed, 12 insertions(+), 5 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\nindex 22af42a08980..7fd45a7006b1 100644\n--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n@@ -1592,6 +1592,7 @@ static int hdmi_phy_configure_dwc_hdmi_3d_tx(struct dw_hdmi *hdmi,\n \tconst struct dw_hdmi_mpll_config *mpll_config = pdata->mpll_cfg;\n \tconst struct dw_hdmi_curr_ctrl *curr_ctrl = pdata->cur_ctr;\n \tconst struct dw_hdmi_phy_config *phy_config = pdata->phy_config;\n+\tint depth;\n \n \t/* TOFIX Will need 420 specific PHY configuration tables */\n \n@@ -1601,11 +1602,11 @@ static int hdmi_phy_configure_dwc_hdmi_3d_tx(struct dw_hdmi *hdmi,\n \t\t\tbreak;\n \n \tfor (; curr_ctrl->mpixelclock != ~0UL; curr_ctrl++)\n-\t\tif (mpixelclock <= curr_ctrl->mpixelclock)\n+\t\tif (mtmdsclock <= curr_ctrl->mpixelclock)\n \t\t\tbreak;\n \n \tfor (; phy_config->mpixelclock != ~0UL; phy_config++)\n-\t\tif (mpixelclock <= phy_config->mpixelclock)\n+\t\tif (mtmdsclock <= phy_config->mpixelclock)\n \t\t\tbreak;\n \n \tif (mpll_config->mpixelclock == ~0UL ||\n@@ -1613,11 +1614,17 @@ static int hdmi_phy_configure_dwc_hdmi_3d_tx(struct dw_hdmi *hdmi,\n \t    phy_config->mpixelclock == ~0UL)\n \t\treturn -EINVAL;\n \n-\tdw_hdmi_phy_i2c_write(hdmi, mpll_config->res[0].cpce,\n+\tdepth = hdmi_bus_fmt_color_depth(hdmi->hdmi_data.enc_out_bus_format);\n+\tif (depth > 8 && mpixelclock != mtmdsclock)\n+\t\tdepth = fls(depth - 8) - 1;\n+\telse\n+\t\tdepth = 0;\n+\n+\tdw_hdmi_phy_i2c_write(hdmi, mpll_config->res[depth].cpce,\n \t\t\t      HDMI_3D_TX_PHY_CPCE_CTRL);\n-\tdw_hdmi_phy_i2c_write(hdmi, mpll_config->res[0].gmp,\n+\tdw_hdmi_phy_i2c_write(hdmi, mpll_config->res[depth].gmp,\n \t\t\t      HDMI_3D_TX_PHY_GMPCTRL);\n-\tdw_hdmi_phy_i2c_write(hdmi, curr_ctrl->curr[0],\n+\tdw_hdmi_phy_i2c_write(hdmi, curr_ctrl->curr[depth],\n \t\t\t      HDMI_3D_TX_PHY_CURRCTRL);\n \n \tdw_hdmi_phy_i2c_write(hdmi, 0, HDMI_3D_TX_PHY_PLLPHBYCTRL);\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 20 Jul 2020 22:25:15 +0000\nSubject: [PATCH] drm/bridge: dw-hdmi: add mpll_cfg_420 for ycbcr420 mode\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 4 +++-\n include/drm/bridge/dw_hdmi.h              | 1 +\n 2 files changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\nindex 7fd45a7006b1..a2d101ebf7a7 100644\n--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n@@ -1594,7 +1594,9 @@ static int hdmi_phy_configure_dwc_hdmi_3d_tx(struct dw_hdmi *hdmi,\n \tconst struct dw_hdmi_phy_config *phy_config = pdata->phy_config;\n \tint depth;\n \n-\t/* TOFIX Will need 420 specific PHY configuration tables */\n+\tif (hdmi_bus_fmt_is_yuv420(hdmi->hdmi_data.enc_out_bus_format) &&\n+\t    pdata->mpll_cfg_420)\n+\t\tmpll_config = pdata->mpll_cfg_420;\n \n \t/* PLL/MPLL Cfg - always match on final entry */\n \tfor (; mpll_config->mpixelclock != ~0UL; mpll_config++)\ndiff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h\nindex 48fb72f9614f..02554d324b4b 100644\n--- a/include/drm/bridge/dw_hdmi.h\n+++ b/include/drm/bridge/dw_hdmi.h\n@@ -156,6 +156,7 @@ struct dw_hdmi_plat_data {\n \n \t/* Synopsys PHY support */\n \tconst struct dw_hdmi_mpll_config *mpll_cfg;\n+\tconst struct dw_hdmi_mpll_config *mpll_cfg_420;\n \tconst struct dw_hdmi_curr_ctrl *cur_ctr;\n \tconst struct dw_hdmi_phy_config *phy_config;\n \tint (*configure_phy)(struct dw_hdmi *hdmi, void *data,\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Wed, 15 Jul 2020 09:49:21 +0000\nSubject: [PATCH] drm/rockchip: dw-hdmi: mode_valid: allow 420 clock rate\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 12 ++++++++++--\n 1 file changed, 10 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex 9e460b7e14a4..d42ac9fa3246 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -242,8 +242,15 @@ dw_hdmi_rockchip_mode_valid(struct dw_hdmi *hdmi, void *data,\n \t\t\t    const struct drm_display_info *info,\n \t\t\t    const struct drm_display_mode *mode)\n {\n-\tif (mode->clock > 340000 ||\n-\t    (info->max_tmds_clock && mode->clock > info->max_tmds_clock))\n+\tstruct dw_hdmi_plat_data *pdata = (struct dw_hdmi_plat_data *)data;\n+\tint clock = mode->clock;\n+\n+\tif (pdata->ycbcr_420_allowed && drm_mode_is_420(info, mode) &&\n+\t    (info->color_formats & DRM_COLOR_FORMAT_YCBCR420))\n+\t\tclock /= 2;\n+\n+\tif (clock > 340000 ||\n+\t    (info->max_tmds_clock && clock > info->max_tmds_clock))\n \t\treturn MODE_CLOCK_HIGH;\n \n \treturn MODE_OK;\n@@ -531,6 +538,7 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,\n \t\treturn -ENOMEM;\n \n \thdmi->dev = &pdev->dev;\n+\tplat_data->priv_data = plat_data;\n \thdmi->chip_data = plat_data->phy_data;\n \tplat_data->phy_data = hdmi;\n \tencoder = &hdmi->encoder.encoder;\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 20 Jul 2020 22:26:19 +0000\nSubject: [PATCH] drm/rockchip: dw-hdmi: add YCbCr420 mpll cfg for rk3399\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 41 +++++++++++++++++++++\n 1 file changed, 41 insertions(+)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex d42ac9fa3246..a37565649c13 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -177,6 +177,46 @@ static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = {\n \t}\n };\n \n+static const struct dw_hdmi_mpll_config rockchip_mpll_cfg_420[] = {\n+\t{\n+\t\t30666000, {\n+\t\t\t{ 0x00b7, 0x0000 },\n+\t\t\t{ 0x2157, 0x0000 },\n+\t\t\t{ 0x40f7, 0x0000 },\n+\t\t},\n+\t},  {\n+\t\t92000000, {\n+\t\t\t{ 0x00b7, 0x0000 },\n+\t\t\t{ 0x2143, 0x0001 },\n+\t\t\t{ 0x40a3, 0x0001 },\n+\t\t},\n+\t},  {\n+\t\t184000000, {\n+\t\t\t{ 0x0073, 0x0001 },\n+\t\t\t{ 0x2146, 0x0002 },\n+\t\t\t{ 0x4062, 0x0002 },\n+\t\t},\n+\t},  {\n+\t\t340000000, {\n+\t\t\t{ 0x0052, 0x0003 },\n+\t\t\t{ 0x214d, 0x0003 },\n+\t\t\t{ 0x4065, 0x0003 },\n+\t\t},\n+\t},  {\n+\t\t600000000, {\n+\t\t\t{ 0x0041, 0x0003 },\n+\t\t\t{ 0x3b4d, 0x0003 },\n+\t\t\t{ 0x5a65, 0x0003 },\n+\t\t},\n+\t},  {\n+\t\t~0UL, {\n+\t\t\t{ 0x0000, 0x0000 },\n+\t\t\t{ 0x0000, 0x0000 },\n+\t\t\t{ 0x0000, 0x0000 },\n+\t\t},\n+\t}\n+};\n+\n static const struct dw_hdmi_curr_ctrl rockchip_cur_ctr[] = {\n \t/*      pixelclk    bpp8    bpp10   bpp12 */\n \t{\n@@ -474,6 +514,7 @@ static struct rockchip_hdmi_chip_data rk3399_chip_data = {\n static const struct dw_hdmi_plat_data rk3399_hdmi_drv_data = {\n \t.mode_valid = dw_hdmi_rockchip_mode_valid,\n \t.mpll_cfg   = rockchip_mpll_cfg,\n+\t.mpll_cfg_420 = rockchip_mpll_cfg_420,\n \t.cur_ctr    = rockchip_cur_ctr,\n \t.phy_config = rockchip_phy_config,\n \t.phy_data = &rk3399_chip_data,\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Shunqing Chen <csq@rock-chips.com>\nDate: Wed, 15 Jul 2020 15:19:11 +0800\nSubject: [PATCH] drm/rockchip: dw-hdmi: add YCbCr420 mpll cfg for rk3288w\n\nSigned-off-by: Shunqing Chen <csq@rock-chips.com>\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 41 +++++++++++++++++++++\n 1 file changed, 41 insertions(+)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex a37565649c13..66fee351f4a7 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -217,6 +217,46 @@ static const struct dw_hdmi_mpll_config rockchip_mpll_cfg_420[] = {\n \t}\n };\n \n+static const struct dw_hdmi_mpll_config rockchip_rk3288w_mpll_cfg_420[] = {\n+\t{\n+\t\t30666000, {\n+\t\t\t{ 0x00b7, 0x0000 },\n+\t\t\t{ 0x2157, 0x0000 },\n+\t\t\t{ 0x40f7, 0x0000 },\n+\t\t},\n+\t},  {\n+\t\t92000000, {\n+\t\t\t{ 0x00b7, 0x0000 },\n+\t\t\t{ 0x2143, 0x0001 },\n+\t\t\t{ 0x40a3, 0x0001 },\n+\t\t},\n+\t},  {\n+\t\t184000000, {\n+\t\t\t{ 0x0073, 0x0001 },\n+\t\t\t{ 0x2146, 0x0002 },\n+\t\t\t{ 0x4062, 0x0002 },\n+\t\t},\n+\t},  {\n+\t\t340000000, {\n+\t\t\t{ 0x0052, 0x0003 },\n+\t\t\t{ 0x214d, 0x0003 },\n+\t\t\t{ 0x4065, 0x0003 },\n+\t\t},\n+\t},  {\n+\t\t600000000, {\n+\t\t\t{ 0x0040, 0x0003 },\n+\t\t\t{ 0x3b4c, 0x0003 },\n+\t\t\t{ 0x5a65, 0x0003 },\n+\t\t},\n+\t},  {\n+\t\t~0UL, {\n+\t\t\t{ 0x0000, 0x0000 },\n+\t\t\t{ 0x0000, 0x0000 },\n+\t\t\t{ 0x0000, 0x0000 },\n+\t\t},\n+\t}\n+};\n+\n static const struct dw_hdmi_curr_ctrl rockchip_cur_ctr[] = {\n \t/*      pixelclk    bpp8    bpp10   bpp12 */\n \t{\n@@ -479,6 +519,7 @@ static struct rockchip_hdmi_chip_data rk3288_chip_data = {\n static const struct dw_hdmi_plat_data rk3288_hdmi_drv_data = {\n \t.mode_valid = dw_hdmi_rockchip_mode_valid,\n \t.mpll_cfg   = rockchip_mpll_cfg,\n+\t.mpll_cfg_420 = rockchip_rk3288w_mpll_cfg_420,\n \t.cur_ctr    = rockchip_cur_ctr,\n \t.phy_config = rockchip_phy_config,\n \t.phy_data = &rk3288_chip_data,\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Fri, 20 Dec 2019 08:12:42 +0000\nSubject: [PATCH] drm/rockchip: dw-hdmi: add bridge and switch to\n drm_bridge_funcs\n\nSwitch the dw-hdmi driver to drm_bridge_funcs by implementing\na new local bridge, connecting it to the dw-hdmi bridge.\n\nAlso enable bridge format negotiation by implementing\natomic_get_input_bus_fmts and support for 8-bit RGB 4:4:4.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 118 ++++++++++++++------\n 1 file changed, 81 insertions(+), 37 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex 66fee351f4a7..d6d8f3335813 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -5,6 +5,7 @@\n \n #include <linux/clk.h>\n #include <linux/mfd/syscon.h>\n+#include <linux/media-bus-format.h>\n #include <linux/module.h>\n #include <linux/platform_device.h>\n #include <linux/phy/phy.h>\n@@ -72,6 +73,7 @@ struct rockchip_hdmi_chip_data {\n struct rockchip_hdmi {\n \tstruct device *dev;\n \tstruct regmap *regmap;\n+\tstruct drm_bridge bridge;\n \tstruct rockchip_encoder encoder;\n \tconst struct rockchip_hdmi_chip_data *chip_data;\n \tstruct clk *ref_clk;\n@@ -82,11 +84,9 @@ struct rockchip_hdmi {\n \tstruct phy *phy;\n };\n \n-static struct rockchip_hdmi *to_rockchip_hdmi(struct drm_encoder *encoder)\n+static struct rockchip_hdmi *to_rockchip_hdmi(struct drm_bridge *bridge)\n {\n-\tstruct rockchip_encoder *rkencoder = to_rockchip_encoder(encoder);\n-\n-\treturn container_of(rkencoder, struct rockchip_hdmi, encoder);\n+\treturn container_of(bridge, struct rockchip_hdmi, bridge);\n }\n \n static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = {\n@@ -335,31 +335,21 @@ dw_hdmi_rockchip_mode_valid(struct dw_hdmi *hdmi, void *data,\n \n \treturn MODE_OK;\n }\n-\n-static void dw_hdmi_rockchip_encoder_disable(struct drm_encoder *encoder)\n+static void\n+dw_hdmi_rockchip_bridge_mode_set(struct drm_bridge *bridge,\n+\t\t\t\t const struct drm_display_mode *mode,\n+\t\t\t\t const struct drm_display_mode *adjusted_mode)\n {\n-}\n+\tstruct rockchip_hdmi *hdmi = to_rockchip_hdmi(bridge);\n \n-static bool\n-dw_hdmi_rockchip_encoder_mode_fixup(struct drm_encoder *encoder,\n-\t\t\t\t    const struct drm_display_mode *mode,\n-\t\t\t\t    struct drm_display_mode *adj_mode)\n-{\n-\treturn true;\n+\tclk_set_rate(hdmi->ref_clk, adjusted_mode->clock * 1000);\n }\n \n-static void dw_hdmi_rockchip_encoder_mode_set(struct drm_encoder *encoder,\n-\t\t\t\t\t      struct drm_display_mode *mode,\n-\t\t\t\t\t      struct drm_display_mode *adj_mode)\n+static void dw_hdmi_rockchip_bridge_enable(struct drm_bridge *bridge)\n {\n-\tstruct rockchip_hdmi *hdmi = to_rockchip_hdmi(encoder);\n+\tstruct rockchip_hdmi *hdmi = to_rockchip_hdmi(bridge);\n+\tstruct drm_encoder *encoder = bridge->encoder;\n \n-\tclk_set_rate(hdmi->ref_clk, adj_mode->clock * 1000);\n-}\n-\n-static void dw_hdmi_rockchip_encoder_enable(struct drm_encoder *encoder)\n-{\n-\tstruct rockchip_hdmi *hdmi = to_rockchip_hdmi(encoder);\n \tu32 val;\n \tint ret;\n \n@@ -387,10 +377,21 @@ static void dw_hdmi_rockchip_encoder_enable(struct drm_encoder *encoder)\n \t\t      ret ? \"LIT\" : \"BIG\");\n }\n \n+static bool is_rgb(u32 format)\n+{\n+\tswitch (format) {\n+\tcase MEDIA_BUS_FMT_RGB888_1X24:\n+\t\treturn true;\n+\tdefault:\n+\t\treturn false;\n+\t}\n+}\n+\n static int\n-dw_hdmi_rockchip_encoder_atomic_check(struct drm_encoder *encoder,\n-\t\t\t\t      struct drm_crtc_state *crtc_state,\n-\t\t\t\t      struct drm_connector_state *conn_state)\n+dw_hdmi_rockchip_bridge_atomic_check(struct drm_bridge *bridge,\n+\t\t\t\t     struct drm_bridge_state *bridge_state,\n+\t\t\t\t     struct drm_crtc_state *crtc_state,\n+\t\t\t\t     struct drm_connector_state *conn_state)\n {\n \tstruct rockchip_crtc_state *s = to_rockchip_crtc_state(crtc_state);\n \n@@ -400,12 +401,38 @@ dw_hdmi_rockchip_encoder_atomic_check(struct drm_encoder *encoder,\n \treturn 0;\n }\n \n-static const struct drm_encoder_helper_funcs dw_hdmi_rockchip_encoder_helper_funcs = {\n-\t.mode_fixup = dw_hdmi_rockchip_encoder_mode_fixup,\n-\t.mode_set   = dw_hdmi_rockchip_encoder_mode_set,\n-\t.enable     = dw_hdmi_rockchip_encoder_enable,\n-\t.disable    = dw_hdmi_rockchip_encoder_disable,\n-\t.atomic_check = dw_hdmi_rockchip_encoder_atomic_check,\n+static u32 *dw_hdmi_rockchip_get_input_bus_fmts(struct drm_bridge *bridge,\n+\t\t\t\t\tstruct drm_bridge_state *bridge_state,\n+\t\t\t\t\tstruct drm_crtc_state *crtc_state,\n+\t\t\t\t\tstruct drm_connector_state *conn_state,\n+\t\t\t\t\tu32 output_fmt,\n+\t\t\t\t\tunsigned int *num_input_fmts)\n+{\n+\tu32 *input_fmt;\n+\n+\t*num_input_fmts = 0;\n+\n+\tif (!is_rgb(output_fmt))\n+\t\treturn NULL;\n+\n+\tinput_fmt = kzalloc(sizeof(*input_fmt), GFP_KERNEL);\n+\tif (!input_fmt)\n+\t\treturn NULL;\n+\n+\t*num_input_fmts = 1;\n+\t*input_fmt = output_fmt;\n+\n+\treturn input_fmt;\n+}\n+\n+static const struct drm_bridge_funcs dw_hdmi_rockchip_bridge_funcs = {\n+\t.mode_set = dw_hdmi_rockchip_bridge_mode_set,\n+\t.enable = dw_hdmi_rockchip_bridge_enable,\n+\t.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,\n+\t.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,\n+\t.atomic_get_input_bus_fmts = dw_hdmi_rockchip_get_input_bus_fmts,\n+\t.atomic_check = dw_hdmi_rockchip_bridge_atomic_check,\n+\t.atomic_reset = drm_atomic_helper_bridge_reset,\n };\n \n static int dw_hdmi_rockchip_genphy_init(struct dw_hdmi *dw_hdmi, void *data,\n@@ -602,6 +629,7 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,\n \tstruct dw_hdmi_plat_data *plat_data;\n \tconst struct of_device_id *match;\n \tstruct drm_device *drm = data;\n+\tstruct drm_bridge *next_bridge;\n \tstruct drm_encoder *encoder;\n \tstruct rockchip_hdmi *hdmi;\n \tint ret;\n@@ -679,20 +707,21 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,\n \t\t\t\t\t   RK3568_HDMI_SCLIN_MSK));\n \t}\n \n-\tdrm_encoder_helper_add(encoder, &dw_hdmi_rockchip_encoder_helper_funcs);\n-\n \tret = drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TMDS);\n \tif (ret) {\n \t\tDRM_DEV_ERROR(hdmi->dev, \"Failed to init encoder: %d\\n\", ret);\n \t\tgoto err_disable_clk;\n \t}\n \n+\thdmi->bridge.funcs = &dw_hdmi_rockchip_bridge_funcs;\n+\tdrm_bridge_attach(encoder, &hdmi->bridge, NULL, 0);\n+\n \tplatform_set_drvdata(pdev, hdmi);\n \n-\thdmi->hdmi = dw_hdmi_bind(pdev, encoder, plat_data);\n+\thdmi->hdmi = dw_hdmi_probe(pdev, plat_data);\n \n \t/*\n-\t * If dw_hdmi_bind() fails we'll never call dw_hdmi_unbind(),\n+\t * If dw_hdmi_probe() fails we'll never call dw_hdmi_unbind(),\n \t * which would have called the encoder cleanup.  Do it manually.\n \t */\n \tif (IS_ERR(hdmi->hdmi)) {\n@@ -700,8 +729,23 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,\n \t\tgoto err_bind;\n \t}\n \n+\tnext_bridge = of_drm_find_bridge(pdev->dev.of_node);\n+\tif (!next_bridge) {\n+\t\tret = -EPROBE_DEFER;\n+\t\tgoto err_dw_hdmi_remove;\n+\t}\n+\n+\tret = drm_bridge_attach(encoder, next_bridge, &hdmi->bridge, 0);\n+\tif (ret) {\n+\t\tif (ret != -EPROBE_DEFER)\n+\t\t\tDRM_DEV_ERROR(hdmi->dev, \"Failed to attach dw-hdmi bridge: %d\\n\", ret);\n+\t\tgoto err_dw_hdmi_remove;\n+\t}\n+\n \treturn 0;\n \n+err_dw_hdmi_remove:\n+\tdw_hdmi_remove(hdmi->hdmi);\n err_bind:\n \tdrm_encoder_cleanup(encoder);\n err_disable_clk:\n@@ -719,7 +763,7 @@ static void dw_hdmi_rockchip_unbind(struct device *dev, struct device *master,\n {\n \tstruct rockchip_hdmi *hdmi = dev_get_drvdata(dev);\n \n-\tdw_hdmi_unbind(hdmi->hdmi);\n+\tdw_hdmi_remove(hdmi->hdmi);\n \tdrm_encoder_cleanup(&hdmi->encoder.encoder);\n \tclk_disable_unprepare(hdmi->ref_clk);\n \n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Fri, 9 Oct 2020 15:29:27 +0000\nSubject: [PATCH] drm/rockchip: vop: add immutable zpos property\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/rockchip_drm_fb.c  | 2 ++\n drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 ++++--\n 2 files changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c\nindex 092bf863110b..e2ee0d6a8d55 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c\n@@ -133,6 +133,8 @@ void rockchip_drm_mode_config_init(struct drm_device *dev)\n \tdev->mode_config.max_width = 4096;\n \tdev->mode_config.max_height = 4096;\n \n+\tdev->mode_config.normalize_zpos = true;\n+\n \tdev->mode_config.funcs = &rockchip_drm_mode_config_funcs;\n \tdev->mode_config.helper_private = &rockchip_mode_config_helpers;\n \ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\nindex 30e252ba7184..897f7980ee5d 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n@@ -1917,7 +1917,7 @@ static irqreturn_t vop_isr(int irq, void *data)\n \treturn ret;\n }\n \n-static void vop_plane_add_properties(struct drm_plane *plane,\n+static void vop_plane_add_properties(struct drm_plane *plane, int zpos,\n \t\t\t\t     const struct vop_win_data *win_data)\n {\n \tunsigned int flags = 0;\n@@ -1927,6 +1927,8 @@ static void vop_plane_add_properties(struct drm_plane *plane,\n \tif (flags)\n \t\tdrm_plane_create_rotation_property(plane, DRM_MODE_ROTATE_0,\n \t\t\t\t\t\t   DRM_MODE_ROTATE_0 | flags);\n+\n+\tdrm_plane_create_zpos_immutable_property(plane, zpos);\n }\n \n static int vop_create_crtc(struct vop *vop)\n@@ -1967,7 +1969,7 @@ static int vop_create_crtc(struct vop *vop)\n \n \t\tplane = &vop_win->base;\n \t\tdrm_plane_helper_add(plane, &plane_helper_funcs);\n-\t\tvop_plane_add_properties(plane, win_data);\n+\t\tvop_plane_add_properties(plane, i, win_data);\n \t\tif (plane->type == DRM_PLANE_TYPE_PRIMARY)\n \t\t\tprimary = plane;\n \t\telse if (plane->type == DRM_PLANE_TYPE_CURSOR)\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sat, 10 Oct 2020 09:20:44 +0000\nSubject: [PATCH] drm/rockchip: vop: add plane color properties\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 32 +++++++++++++++++++--\n 1 file changed, 30 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\nindex 897f7980ee5d..eadf1b0f1704 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n@@ -1917,8 +1917,23 @@ static irqreturn_t vop_isr(int irq, void *data)\n \treturn ret;\n }\n \n+static bool plane_supports_yuv_format(const struct drm_plane *plane)\n+{\n+\tconst struct drm_format_info *info;\n+\tint i;\n+\n+\tfor (i = 0; i < plane->format_count; i++) {\n+\t\tinfo = drm_format_info(plane->format_types[i]);\n+\t\tif (info->is_yuv)\n+\t\t\treturn true;\n+\t}\n+\n+\treturn false;\n+}\n+\n static void vop_plane_add_properties(struct drm_plane *plane, int zpos,\n-\t\t\t\t     const struct vop_win_data *win_data)\n+\t\t\t\t     const struct vop_win_data *win_data,\n+\t\t\t\t     const struct vop_data *vop_data)\n {\n \tunsigned int flags = 0;\n \n@@ -1929,6 +1944,19 @@ static void vop_plane_add_properties(struct drm_plane *plane, int zpos,\n \t\t\t\t\t\t   DRM_MODE_ROTATE_0 | flags);\n \n \tdrm_plane_create_zpos_immutable_property(plane, zpos);\n+\n+\tif (!plane_supports_yuv_format(plane))\n+\t\treturn;\n+\n+\tflags = BIT(DRM_COLOR_YCBCR_BT601) | BIT(DRM_COLOR_YCBCR_BT709);\n+\tif (vop_data->feature & VOP_FEATURE_OUTPUT_RGB10)\n+\t\tflags |= BIT(DRM_COLOR_YCBCR_BT2020);\n+\n+\tdrm_plane_create_color_properties(plane, flags,\n+\t\t\t\t\t  BIT(DRM_COLOR_YCBCR_LIMITED_RANGE) |\n+\t\t\t\t\t  BIT(DRM_COLOR_YCBCR_FULL_RANGE),\n+\t\t\t\t\t  DRM_COLOR_YCBCR_BT601,\n+\t\t\t\t\t  DRM_COLOR_YCBCR_LIMITED_RANGE);\n }\n \n static int vop_create_crtc(struct vop *vop)\n@@ -1969,7 +1997,7 @@ static int vop_create_crtc(struct vop *vop)\n \n \t\tplane = &vop_win->base;\n \t\tdrm_plane_helper_add(plane, &plane_helper_funcs);\n-\t\tvop_plane_add_properties(plane, i, win_data);\n+\t\tvop_plane_add_properties(plane, i, win_data, vop_data);\n \t\tif (plane->type == DRM_PLANE_TYPE_PRIMARY)\n \t\t\tprimary = plane;\n \t\telse if (plane->type == DRM_PLANE_TYPE_CURSOR)\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Nickey Yang <nickey.yang@rock-chips.com>\nDate: Mon, 17 Jul 2017 16:35:34 +0800\nSubject: [PATCH] HACK: clk: rockchip: rk3288: dedicate npll for vopb and hdmi\n use\n\nMINIARM: set npll be used for hdmi only\n\nSigned-off-by: Nickey Yang <nickey.yang@rock-chips.com>\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n arch/arm/boot/dts/rk3288.dtsi     | 2 ++\n drivers/clk/rockchip/clk-rk3288.c | 9 +++++----\n 2 files changed, 7 insertions(+), 4 deletions(-)\n\ndiff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi\nindex c60eacab8a79..d1ae42757242 100644\n--- a/arch/arm/boot/dts/rk3288.dtsi\n+++ b/arch/arm/boot/dts/rk3288.dtsi\n@@ -1026,6 +1026,8 @@ vopb: vop@ff930000 {\n \t\tresets = <&cru SRST_LCDC0_AXI>, <&cru SRST_LCDC0_AHB>, <&cru SRST_LCDC0_DCLK>;\n \t\treset-names = \"axi\", \"ahb\", \"dclk\";\n \t\tiommus = <&vopb_mmu>;\n+\t\tassigned-clocks = <&cru DCLK_VOP0>;\n+\t\tassigned-clock-parents = <&cru PLL_NPLL>;\n \t\tstatus = \"disabled\";\n \n \t\tvopb_out: port {\ndiff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c\nindex baa5aebd3277..5cfcbaaa154e 100644\n--- a/drivers/clk/rockchip/clk-rk3288.c\n+++ b/drivers/clk/rockchip/clk-rk3288.c\n@@ -195,8 +195,9 @@ PNAME(mux_ddrphy_p)\t\t= { \"dpll_ddr\", \"gpll_ddr\" };\n PNAME(mux_aclk_cpu_src_p)\t= { \"cpll_aclk_cpu\", \"gpll_aclk_cpu\" };\n \n PNAME(mux_pll_src_cpll_gpll_p)\t\t= { \"cpll\", \"gpll\" };\n-PNAME(mux_pll_src_npll_cpll_gpll_p)\t= { \"npll\", \"cpll\", \"gpll\" };\n-PNAME(mux_pll_src_cpll_gpll_npll_p)\t= { \"cpll\", \"gpll\", \"npll\" };\n+PNAME(mux_pll_src_npll_cpll_gpll_p)\t= { \"prevent:npll\", \"cpll\", \"gpll\" };\n+PNAME(mux_pll_src_cpll_gpll_npll_p)\t= { \"cpll\", \"gpll\", \"prevent:npll\" };\n+PNAME(vop0_mux_pll_src_cpll_gpll_npll_p) = { \"prevent:cpll\", \"prevent:gpll\", \"npll\" };\n PNAME(mux_pll_src_cpll_gpll_usb480m_p)\t= { \"cpll\", \"gpll\", \"unstable:usbphy480m_src\" };\n PNAME(mux_pll_src_cpll_gll_usb_npll_p)\t= { \"cpll\", \"gpll\", \"unstable:usbphy480m_src\", \"npll\" };\n \n@@ -232,7 +233,7 @@ static struct rockchip_pll_clock rk3288_pll_clks[] __initdata = {\n \t[gpll] = PLL(pll_rk3066, PLL_GPLL, \"gpll\", mux_pll_p, 0, RK3288_PLL_CON(12),\n \t\t     RK3288_MODE_CON, 12, 8, ROCKCHIP_PLL_SYNC_RATE, rk3288_pll_rates),\n \t[npll] = PLL(pll_rk3066, PLL_NPLL, \"npll\",  mux_pll_p, 0, RK3288_PLL_CON(16),\n-\t\t     RK3288_MODE_CON, 14, 9, ROCKCHIP_PLL_SYNC_RATE, rk3288_pll_rates),\n+\t\t     RK3288_MODE_CON, 14, 9, 0, rk3288_pll_rates),\n };\n \n static struct clk_div_table div_hclk_cpu_t[] = {\n@@ -442,7 +443,7 @@ static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {\n \t\t\tRK3288_CLKSEL_CON(30), 14, 2, MFLAGS, 8, 5, DFLAGS,\n \t\t\tRK3288_CLKGATE_CON(3), 4, GFLAGS),\n \n-\tCOMPOSITE(DCLK_VOP0, \"dclk_vop0\", mux_pll_src_cpll_gpll_npll_p, 0,\n+\tCOMPOSITE(DCLK_VOP0, \"dclk_vop0\", vop0_mux_pll_src_cpll_gpll_npll_p, CLK_SET_RATE_NO_REPARENT | CLK_SET_RATE_PARENT,\n \t\t\tRK3288_CLKSEL_CON(27), 0, 2, MFLAGS, 8, 8, DFLAGS,\n \t\t\tRK3288_CLKGATE_CON(3), 1, GFLAGS),\n \tCOMPOSITE(DCLK_VOP1, \"dclk_vop1\", mux_pll_src_cpll_gpll_npll_p, 0,\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sat, 4 Aug 2018 14:51:14 +0200\nSubject: [PATCH] HACK: clk: rockchip: rk3288: use npll table to to improve\n HDMI compatibility\n\nBased on https://github.com/TinkerBoard/debian_kernel/commit/3d90870530b8a2901681f7b7fa598ee7381e49f3\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/clk/rockchip/clk-rk3288.c | 39 ++++++++++++++++++++++++++++++-\n 1 file changed, 38 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c\nindex 5cfcbaaa154e..fa1c6e646bdf 100644\n--- a/drivers/clk/rockchip/clk-rk3288.c\n+++ b/drivers/clk/rockchip/clk-rk3288.c\n@@ -121,6 +121,43 @@ static struct rockchip_pll_rate_table rk3288_pll_rates[] = {\n \t{ /* sentinel */ },\n };\n \n+static struct rockchip_pll_rate_table rk3288_npll_rates[] = {\n+\tRK3066_PLL_RATE_NB(594000000, 1, 198, 8, 1),\n+\tRK3066_PLL_RATE_NB(585000000, 6, 585, 4, 32),\n+\tRK3066_PLL_RATE_NB(432000000, 3, 216, 4, 32),\n+\tRK3066_PLL_RATE_NB(426000000, 3, 213, 4, 32),\n+\tRK3066_PLL_RATE_NB(400000000, 1, 100, 6, 32),\n+\tRK3066_PLL_RATE(348500000, 8, 697, 6),\n+\tRK3066_PLL_RATE_NB(342000000, 3, 171, 4, 32),\n+\tRK3066_PLL_RATE_NB(297000000, 2, 198, 8, 16),\n+\tRK3066_PLL_RATE_NB(270000000, 1, 135, 12, 32),\n+\tRK3066_PLL_RATE_NB(260000000, 1, 130, 12, 32),\n+\tRK3066_PLL_RATE(241500000, 2, 161, 8),\n+\tRK3066_PLL_RATE(162000000, 1, 81, 12),\n+\tRK3066_PLL_RATE(154000000, 6, 539, 14),\n+\tRK3066_PLL_RATE_NB(148500000, 1, 99, 16, 32),\n+\tRK3066_PLL_RATE(148352000, 13, 1125, 14),\n+\tRK3066_PLL_RATE_NB(146250000, 6, 585, 16, 32),\n+\tRK3066_PLL_RATE(121750000, 6, 487, 16),\n+\tRK3066_PLL_RATE(119000000, 3, 238, 16),\n+\tRK3066_PLL_RATE_NB(108000000, 1, 54, 12, 32),\n+\tRK3066_PLL_RATE_NB(106500000, 4, 213, 12, 32),\n+\tRK3066_PLL_RATE(101000000, 3, 202, 16),\n+\tRK3066_PLL_RATE(88750000, 6, 355, 16),\n+\tRK3066_PLL_RATE_NB(85500000, 4, 171, 12, 32),\n+\tRK3066_PLL_RATE(83500000, 3, 167, 16),\n+\tRK3066_PLL_RATE(79500000, 1, 53, 16),\n+\tRK3066_PLL_RATE_NB(74250000, 4, 198, 16, 32),\n+\tRK3066_PLL_RATE(74176000, 26, 1125, 14),\n+\tRK3066_PLL_RATE(72000000, 1, 48, 16),\n+\tRK3066_PLL_RATE(71000000, 3, 142, 16),\n+\tRK3066_PLL_RATE(68250000, 2, 91, 16),\n+\tRK3066_PLL_RATE(65000000, 3, 130, 16),\n+\tRK3066_PLL_RATE(40000000, 3, 80, 16),\n+\tRK3066_PLL_RATE(33750000, 2, 45, 16),\n+\t{ /* sentinel */ },\n+};\n+\n #define RK3288_DIV_ACLK_CORE_M0_MASK\t0xf\n #define RK3288_DIV_ACLK_CORE_M0_SHIFT\t0\n #define RK3288_DIV_ACLK_CORE_MP_MASK\t0xf\n@@ -233,7 +270,7 @@ static struct rockchip_pll_clock rk3288_pll_clks[] __initdata = {\n \t[gpll] = PLL(pll_rk3066, PLL_GPLL, \"gpll\", mux_pll_p, 0, RK3288_PLL_CON(12),\n \t\t     RK3288_MODE_CON, 12, 8, ROCKCHIP_PLL_SYNC_RATE, rk3288_pll_rates),\n \t[npll] = PLL(pll_rk3066, PLL_NPLL, \"npll\",  mux_pll_p, 0, RK3288_PLL_CON(16),\n-\t\t     RK3288_MODE_CON, 14, 9, 0, rk3288_pll_rates),\n+\t\t     RK3288_MODE_CON, 14, 9, 0, rk3288_npll_rates),\n };\n \n static struct clk_div_table div_hclk_cpu_t[] = {\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Mon, 25 May 2020 20:36:45 +0000\nSubject: [PATCH] HACK: clk: rockchip: rk3399: dedicate vpll for vopb and hdmi\n use\n\nRockchip PLLs are kown provide the least jitter for\nvco rates between 800 MHz and 2 GHz. I added the\nrates for VPLL which are used for VOPs dclk and there-\nfore HDMI phy in that manner and used the rates which\nrequire the lowest frac divs.\nAdditionally I added some rates which are useful to\nprovide additional VESA and non-VESA rates for HDMI\noutput.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/clk/rockchip/clk-rk3399.c | 49 ++++++++++++++++++++++++++-----\n 1 file changed, 42 insertions(+), 7 deletions(-)\n\ndiff --git a/drivers/clk/rockchip/clk-rk3399.c b/drivers/clk/rockchip/clk-rk3399.c\nindex 306910a3a0d3..436d2789611c 100644\n--- a/drivers/clk/rockchip/clk-rk3399.c\n+++ b/drivers/clk/rockchip/clk-rk3399.c\n@@ -105,6 +105,39 @@ static struct rockchip_pll_rate_table rk3399_pll_rates[] = {\n \t{ /* sentinel */ },\n };\n \n+static struct rockchip_pll_rate_table rk3399_vpll_rates[] = {\n+\t/* _mhz, _refdiv, _fbdiv, _postdiv1, _postdiv2, _dsmpd, _frac */\n+\tRK3036_PLL_RATE( 594000000, 1, 74, 3, 1, 0,  4194304),  /* vco = 1782000000  fout = 594000000 */\n+\tRK3036_PLL_RATE( 593406592, 1, 74, 3, 1, 0,  2949838),  /* vco = 1780219777  fout = 593406592.36908 */\n+\tRK3036_PLL_RATE( 319750000, 1, 79, 6, 1, 0, 15728640),  /* vco = 1918500000  fout = 319750000 */\n+\tRK3036_PLL_RATE( 297000000, 1, 74, 6, 1, 0,  4194304),  /* vco = 1782000000  fout = 297000000 */\n+\tRK3036_PLL_RATE( 296703296, 1, 74, 6, 1, 0,  2949838),  /* vco = 1780219777  fout = 296703296.18454 */\n+\tRK3036_PLL_RATE( 241500000, 1, 60, 6, 1, 0,  6291456),  /* vco = 1449000000  fout = 241500000 */\n+\tRK3036_PLL_RATE( 162000000, 1, 67, 5, 2, 0,  8388608),  /* vco = 1620000000  fout = 162000000 */\n+\tRK3036_PLL_RATE( 148500000, 1, 74, 6, 2, 0,  4194304),  /* vco = 1782000000  fout = 148500000*/\n+\tRK3036_PLL_RATE( 148351648, 1, 74, 6, 2, 0,  2949838),  /* vco = 1780219777  fout = 148351648.09227 */\n+\tRK3036_PLL_RATE( 136750000, 1, 68, 2, 6, 0,  6291456),  /* vco = 1641000000  fout = 136750000 */\n+\tRK3036_PLL_RATE( 135000000, 1, 56, 5, 2, 0,  4194304),  /* vco = 1350000000  fout = 135000000 */\n+\tRK3036_PLL_RATE( 119000000, 1, 59, 6, 2, 0,  8388608),  /* vco = 1428000000  fout = 119000000 */\n+\tRK3036_PLL_RATE( 108000000, 1, 63, 7, 2, 1,        0),  /* vco = 1512000000  fout = 108000000 */\n+\tRK3036_PLL_RATE( 106500000, 1, 62, 7, 2, 0,  2097152),  /* vco = 1491000000  fout = 106500000 */\n+\tRK3036_PLL_RATE(  88750000, 1, 55, 5, 3, 0,  7864320),  /* vco = 1331250000  fout = 88750000 */\n+\tRK3036_PLL_RATE(  85500000, 1, 57, 4, 4, 1,        0),  /* vco = 1368000000  fout = 85500000 */\n+\tRK3036_PLL_RATE(  78750000, 1, 59, 6, 3, 0,  1048576),  /* vco = 1417500000  fout = 78750000 */\n+\tRK3036_PLL_RATE(  74250000, 1, 74, 6, 4, 0,  4194304),  /* vco = 1782000000  fout = 74250000 */\n+\tRK3036_PLL_RATE(  74175824, 1, 74, 6, 4, 0,  2949838),  /* vco = 1780219777  fout = 74175824.046135 */\n+\tRK3036_PLL_RATE(  71000000, 1, 71, 6, 4, 1,        0),  /* vco = 1704000000  fout = 71000000 */\n+\tRK3036_PLL_RATE(  65000000, 1, 65, 6, 4, 0,        0),  /* vco = 1560000000  fout = 65000000 */\n+\tRK3036_PLL_RATE(  59340659, 1, 59, 6, 4, 0,  5715310),  /* vco = 1424175816  fout = 59340659.022331 */\n+\tRK3036_PLL_RATE(  54000000, 1, 63, 7, 4, 1,        0),  /* vco = 1512000000  fout = 54000000 */\n+\tRK3036_PLL_RATE(  49500000, 1, 72, 5, 7, 0,  3145728),  /* vco = 1732500000  fout = 49500000 */\n+\tRK3036_PLL_RATE(  40000000, 1, 70, 7, 6, 1,        0),  /* vco = 1680000000  fout = 40000000 */\n+\tRK3036_PLL_RATE(  31500000, 1, 55, 7, 6, 0,  2097152),  /* vco = 1323000000  fout = 31500000 */\n+\tRK3036_PLL_RATE(  27000000, 1, 55, 7, 7, 0,  2097152),  /* vco = 1323000000  fout = 27000000 */\n+\tRK3036_PLL_RATE(  26973026, 1, 55, 7, 7, 0,  1173214),  /* vco = 1321678296  fout = 26973026.450799 */\n+\t{ /* sentinel */ },\n+};\n+\n /* CRU parents */\n PNAME(mux_pll_p)\t\t\t\t= { \"xin24m\", \"xin32k\" };\n \n@@ -123,7 +156,7 @@ PNAME(mux_ddrclk_p)\t\t\t\t= { \"clk_ddrc_lpll_src\",\n PNAME(mux_aclk_cci_p)\t\t\t\t= { \"cpll_aclk_cci_src\",\n \t\t\t\t\t\t    \"gpll_aclk_cci_src\",\n \t\t\t\t\t\t    \"npll_aclk_cci_src\",\n-\t\t\t\t\t\t    \"vpll_aclk_cci_src\" };\n+\t\t\t\t\t\t    \"prevent:vpll\" };\n PNAME(mux_cci_trace_p)\t\t\t\t= { \"cpll_cci_trace\",\n \t\t\t\t\t\t    \"gpll_cci_trace\" };\n PNAME(mux_cs_p)\t\t\t\t\t= { \"cpll_cs\", \"gpll_cs\",\n@@ -149,10 +182,12 @@ PNAME(mux_pll_src_cpll_gpll_npll_upll_24m_p)\t= { \"cpll\", \"gpll\", \"npll\",\n PNAME(mux_pll_src_cpll_gpll_npll_ppll_upll_24m_p) = { \"cpll\", \"gpll\", \"npll\",\n \t\t\t\t\t\t    \"ppll\", \"upll\", \"xin24m\" };\n \n-PNAME(mux_pll_src_vpll_cpll_gpll_p)\t\t= { \"vpll\", \"cpll\", \"gpll\" };\n-PNAME(mux_pll_src_vpll_cpll_gpll_npll_p)\t= { \"vpll\", \"cpll\", \"gpll\",\n+PNAME(mux_pll_src_vpll_cpll_gpll_p)\t\t= { \"prevent:vpll\", \"cpll\", \"gpll\" };\n+PNAME(vop0_mux_pll_src_vpll_cpll_gpll_p)\t= { \"vpll\", \"prevent:cpll\", \"prevent:gpll\" };\n+\n+PNAME(mux_pll_src_vpll_cpll_gpll_npll_p)\t= { \"prevent:vpll\", \"cpll\", \"gpll\",\n \t\t\t\t\t\t    \"npll\" };\n-PNAME(mux_pll_src_vpll_cpll_gpll_24m_p)\t\t= { \"vpll\", \"cpll\", \"gpll\",\n+PNAME(mux_pll_src_vpll_cpll_gpll_24m_p)\t\t= { \"prevent:vpll\", \"cpll\", \"gpll\",\n \t\t\t\t\t\t    \"xin24m\" };\n \n PNAME(mux_dclk_vop0_p)\t\t\t= { \"dclk_vop0_div\",\n@@ -229,7 +264,7 @@ static struct rockchip_pll_clock rk3399_pll_clks[] __initdata = {\n \t[npll] = PLL(pll_rk3399, PLL_NPLL, \"npll\",  mux_pll_p, 0, RK3399_PLL_CON(40),\n \t\t     RK3399_PLL_CON(43), 8, 31, ROCKCHIP_PLL_SYNC_RATE, rk3399_pll_rates),\n \t[vpll] = PLL(pll_rk3399, PLL_VPLL, \"vpll\",  mux_pll_p, 0, RK3399_PLL_CON(48),\n-\t\t     RK3399_PLL_CON(51), 8, 31, ROCKCHIP_PLL_SYNC_RATE, rk3399_pll_rates),\n+\t\t     RK3399_PLL_CON(51), 8, 31, ROCKCHIP_PLL_SYNC_RATE, rk3399_vpll_rates),\n };\n \n static struct rockchip_pll_clock rk3399_pmu_pll_clks[] __initdata = {\n@@ -279,7 +314,7 @@ static struct rockchip_clk_branch rk3399_uart4_pmu_fracmux __initdata =\n \t\t\tRK3399_PMU_CLKSEL_CON(5), 8, 2, MFLAGS);\n \n static struct rockchip_clk_branch rk3399_dclk_vop0_fracmux __initdata =\n-\tMUX(DCLK_VOP0, \"dclk_vop0\", mux_dclk_vop0_p, CLK_SET_RATE_PARENT,\n+\tMUX(DCLK_VOP0, \"dclk_vop0\", mux_dclk_vop0_p, CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT,\n \t\t\tRK3399_CLKSEL_CON(49), 11, 1, MFLAGS);\n \n static struct rockchip_clk_branch rk3399_dclk_vop1_fracmux __initdata =\n@@ -1162,7 +1197,7 @@ static struct rockchip_clk_branch rk3399_clk_branches[] __initdata = {\n \tGATE(HCLK_VOP0_NOC, \"hclk_vop0_noc\", \"hclk_vop0_pre\", CLK_IGNORE_UNUSED,\n \t\t\tRK3399_CLKGATE_CON(28), 0, GFLAGS),\n \n-\tCOMPOSITE(DCLK_VOP0_DIV, \"dclk_vop0_div\", mux_pll_src_vpll_cpll_gpll_p, 0,\n+\tCOMPOSITE(DCLK_VOP0_DIV, \"dclk_vop0_div\", vop0_mux_pll_src_vpll_cpll_gpll_p, CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT,\n \t\t\tRK3399_CLKSEL_CON(49), 8, 2, MFLAGS, 0, 8, DFLAGS,\n \t\t\tRK3399_CLKGATE_CON(10), 12, GFLAGS),\n \n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sun, 19 Jul 2020 16:35:11 +0000\nSubject: [PATCH] HACK: dts: rockchip: do not use vopl for hdmi\n\n---\n arch/arm/boot/dts/rk3288.dtsi            | 9 ---------\n arch/arm64/boot/dts/rockchip/rk3399.dtsi | 9 ---------\n 2 files changed, 18 deletions(-)\n\ndiff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi\nindex d1ae42757242..7b2cde230b87 100644\n--- a/arch/arm/boot/dts/rk3288.dtsi\n+++ b/arch/arm/boot/dts/rk3288.dtsi\n@@ -1083,11 +1083,6 @@ vopl_out: port {\n \t\t\t#address-cells = <1>;\n \t\t\t#size-cells = <0>;\n \n-\t\t\tvopl_out_hdmi: endpoint@0 {\n-\t\t\t\treg = <0>;\n-\t\t\t\tremote-endpoint = <&hdmi_in_vopl>;\n-\t\t\t};\n-\n \t\t\tvopl_out_edp: endpoint@1 {\n \t\t\t\treg = <1>;\n \t\t\t\tremote-endpoint = <&edp_in_vopl>;\n@@ -1227,10 +1222,6 @@ hdmi_in_vopb: endpoint@0 {\n \t\t\t\t\treg = <0>;\n \t\t\t\t\tremote-endpoint = <&vopb_out_hdmi>;\n \t\t\t\t};\n-\t\t\t\thdmi_in_vopl: endpoint@1 {\n-\t\t\t\t\treg = <1>;\n-\t\t\t\t\tremote-endpoint = <&vopl_out_hdmi>;\n-\t\t\t\t};\n \t\t\t};\n \t\t};\n \t};\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi\nindex 92c2207e686c..980b12cb0a49 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi\n@@ -1728,11 +1728,6 @@ vopl_out_edp: endpoint@1 {\n \t\t\t\tremote-endpoint = <&edp_in_vopl>;\n \t\t\t};\n \n-\t\t\tvopl_out_hdmi: endpoint@2 {\n-\t\t\t\treg = <2>;\n-\t\t\t\tremote-endpoint = <&hdmi_in_vopl>;\n-\t\t\t};\n-\n \t\t\tvopl_out_mipi1: endpoint@3 {\n \t\t\t\treg = <3>;\n \t\t\t\tremote-endpoint = <&mipi1_in_vopl>;\n@@ -1926,10 +1921,6 @@ hdmi_in_vopb: endpoint@0 {\n \t\t\t\t\treg = <0>;\n \t\t\t\t\tremote-endpoint = <&vopb_out_hdmi>;\n \t\t\t\t};\n-\t\t\t\thdmi_in_vopl: endpoint@1 {\n-\t\t\t\t\treg = <1>;\n-\t\t\t\t\tremote-endpoint = <&vopl_out_hdmi>;\n-\t\t\t\t};\n \t\t\t};\n \t\t};\n \t};\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Fri, 20 Dec 2019 08:12:43 +0000\nSubject: [PATCH] WIP: drm/bridge: dw-hdmi: limit mode and bus format to\n max_tmds_clock\n\n---\n drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 120 ++++++++++++++--------\n 1 file changed, 76 insertions(+), 44 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\nindex a2d101ebf7a7..7f6ffbc3e7b2 100644\n--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n@@ -2003,6 +2003,21 @@ static void hdmi_config_drm_infoframe(struct dw_hdmi *hdmi,\n \t\t  HDMI_FC_PACKET_TX_EN_DRM_MASK, HDMI_FC_PACKET_TX_EN);\n }\n \n+static unsigned int\n+hdmi_get_tmdsclock(unsigned int bus_format, unsigned int pixelclock)\n+{\n+\tint color_depth = hdmi_bus_fmt_color_depth(bus_format);\n+\tunsigned int tmdsclock = pixelclock;\n+\n+\tif (!hdmi_bus_fmt_is_yuv422(bus_format) && color_depth > 8)\n+\t\ttmdsclock = (u64)pixelclock * color_depth / 8;\n+\n+\tif (hdmi_bus_fmt_is_yuv420(bus_format))\n+\t\ttmdsclock /= 2;\n+\n+\treturn tmdsclock;\n+}\n+\n static void hdmi_av_composer(struct dw_hdmi *hdmi,\n \t\t\t     const struct drm_display_info *display,\n \t\t\t     const struct drm_display_mode *mode)\n@@ -2014,29 +2029,11 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,\n \tunsigned int vdisplay, hdisplay;\n \n \tvmode->mpixelclock = mode->clock * 1000;\n+\tvmode->mtmdsclock =\n+\t\thdmi_get_tmdsclock(hdmi->hdmi_data.enc_out_bus_format,\n+\t\t\t\t   vmode->mpixelclock);\n \n \tdev_dbg(hdmi->dev, \"final pixclk = %d\\n\", vmode->mpixelclock);\n-\n-\tvmode->mtmdsclock = vmode->mpixelclock;\n-\n-\tif (!hdmi_bus_fmt_is_yuv422(hdmi->hdmi_data.enc_out_bus_format)) {\n-\t\tswitch (hdmi_bus_fmt_color_depth(\n-\t\t\t\thdmi->hdmi_data.enc_out_bus_format)) {\n-\t\tcase 16:\n-\t\t\tvmode->mtmdsclock = vmode->mpixelclock * 2;\n-\t\t\tbreak;\n-\t\tcase 12:\n-\t\t\tvmode->mtmdsclock = vmode->mpixelclock * 3 / 2;\n-\t\t\tbreak;\n-\t\tcase 10:\n-\t\t\tvmode->mtmdsclock = vmode->mpixelclock * 5 / 4;\n-\t\t\tbreak;\n-\t\t}\n-\t}\n-\n-\tif (hdmi_bus_fmt_is_yuv420(hdmi->hdmi_data.enc_out_bus_format))\n-\t\tvmode->mtmdsclock /= 2;\n-\n \tdev_dbg(hdmi->dev, \"final tmdsclock = %d\\n\", vmode->mtmdsclock);\n \n \t/* Set up HDMI_FC_INVIDCONF */\n@@ -2663,8 +2660,21 @@ static int dw_hdmi_connector_create(struct dw_hdmi *hdmi)\n  * - MEDIA_BUS_FMT_RGB888_1X24,\n  */\n \n-/* Can return a maximum of 11 possible output formats for a mode/connector */\n-#define MAX_OUTPUT_SEL_FORMATS\t11\n+/* Can return a maximum of 15 possible output formats for a mode/connector */\n+#define MAX_OUTPUT_SEL_FORMATS\t15\n+\n+static bool is_tmds_allowed(struct drm_display_info *info,\n+\t\t\t    struct drm_display_mode *mode,\n+\t\t\t    u32 bus_format)\n+{\n+\tunsigned long tmdsclock = hdmi_get_tmdsclock(bus_format, mode->clock);\n+\tint max_tmds_clock = info->max_tmds_clock ? info->max_tmds_clock : 340000;\n+\n+\tif (max_tmds_clock >= tmdsclock)\n+\t\treturn true;\n+\n+\treturn false;\n+}\n \n static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,\n \t\t\t\t\tstruct drm_bridge_state *bridge_state,\n@@ -2676,8 +2686,6 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,\n \tstruct drm_display_info *info = &conn->display_info;\n \tstruct drm_display_mode *mode = &crtc_state->mode;\n \tu8 max_bpc = conn_state->max_requested_bpc;\n-\tbool is_hdmi2_sink = info->hdmi.scdc.supported ||\n-\t\t\t     (info->color_formats & DRM_COLOR_FORMAT_YCBCR420);\n \tu32 *output_fmts;\n \tunsigned int i = 0;\n \n@@ -2701,29 +2709,33 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,\n \t * If the current mode enforces 4:2:0, force the output but format\n \t * to 4:2:0 and do not add the YUV422/444/RGB formats\n \t */\n-\tif (conn->ycbcr_420_allowed &&\n-\t    (drm_mode_is_420_only(info, mode) ||\n-\t     (is_hdmi2_sink && drm_mode_is_420_also(info, mode)))) {\n+\tif (conn->ycbcr_420_allowed && drm_mode_is_420(info, mode) &&\n+\t    (info->color_formats & DRM_COLOR_FORMAT_YCBCR420)) {\n \n \t\t/* Order bus formats from 16bit to 8bit if supported */\n \t\tif (max_bpc >= 16 && info->bpc == 16 &&\n-\t\t    (info->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_48))\n+\t\t    (info->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_48) &&\n+\t\t    is_tmds_allowed(info, mode, MEDIA_BUS_FMT_UYYVYY16_0_5X48))\n \t\t\toutput_fmts[i++] = MEDIA_BUS_FMT_UYYVYY16_0_5X48;\n \n \t\tif (max_bpc >= 12 && info->bpc >= 12 &&\n-\t\t    (info->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_36))\n+\t\t    (info->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_36) &&\n+\t\t    is_tmds_allowed(info, mode, MEDIA_BUS_FMT_UYYVYY12_0_5X36))\n \t\t\toutput_fmts[i++] = MEDIA_BUS_FMT_UYYVYY12_0_5X36;\n \n \t\tif (max_bpc >= 10 && info->bpc >= 10 &&\n-\t\t    (info->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_30))\n+\t\t    (info->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_30) &&\n+\t\t    is_tmds_allowed(info, mode, MEDIA_BUS_FMT_UYYVYY10_0_5X30))\n \t\t\toutput_fmts[i++] = MEDIA_BUS_FMT_UYYVYY10_0_5X30;\n \n \t\t/* Default 8bit fallback */\n-\t\toutput_fmts[i++] = MEDIA_BUS_FMT_UYYVYY8_0_5X24;\n+\t\tif (is_tmds_allowed(info, mode, MEDIA_BUS_FMT_UYYVYY8_0_5X24))\n+\t\t\toutput_fmts[i++] = MEDIA_BUS_FMT_UYYVYY8_0_5X24;\n \n \t\t*num_output_fmts = i;\n \n-\t\treturn output_fmts;\n+\t\tif (drm_mode_is_420_only(info, mode))\n+\t\t\treturn output_fmts;\n \t}\n \n \t/*\n@@ -2732,40 +2744,51 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,\n \t */\n \n \t/* Default 8bit RGB fallback */\n-\toutput_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24;\n+\tif (is_tmds_allowed(info, mode, MEDIA_BUS_FMT_RGB888_1X24))\n+\t\toutput_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24;\n \n \tif (max_bpc >= 16 && info->bpc == 16) {\n-\t\tif (info->color_formats & DRM_COLOR_FORMAT_YCBCR444)\n+\t\tif ((info->color_formats & DRM_COLOR_FORMAT_YCBCR444) &&\n+\t\t    is_tmds_allowed(info, mode, MEDIA_BUS_FMT_YUV16_1X48))\n \t\t\toutput_fmts[i++] = MEDIA_BUS_FMT_YUV16_1X48;\n \n-\t\toutput_fmts[i++] = MEDIA_BUS_FMT_RGB161616_1X48;\n+\t\tif (is_tmds_allowed(info, mode, MEDIA_BUS_FMT_RGB161616_1X48))\n+\t\t\toutput_fmts[i++] = MEDIA_BUS_FMT_RGB161616_1X48;\n \t}\n \n \tif (max_bpc >= 12 && info->bpc >= 12) {\n-\t\tif (info->color_formats & DRM_COLOR_FORMAT_YCBCR422)\n+\t\tif ((info->color_formats & DRM_COLOR_FORMAT_YCBCR422) &&\n+\t\t    is_tmds_allowed(info, mode, MEDIA_BUS_FMT_UYVY12_1X24))\n \t\t\toutput_fmts[i++] = MEDIA_BUS_FMT_UYVY12_1X24;\n \n-\t\tif (info->color_formats & DRM_COLOR_FORMAT_YCBCR444)\n+\t\tif ((info->color_formats & DRM_COLOR_FORMAT_YCBCR444) &&\n+\t\t    is_tmds_allowed(info, mode, MEDIA_BUS_FMT_YUV12_1X36))\n \t\t\toutput_fmts[i++] = MEDIA_BUS_FMT_YUV12_1X36;\n \n-\t\toutput_fmts[i++] = MEDIA_BUS_FMT_RGB121212_1X36;\n+\t\tif (is_tmds_allowed(info, mode, MEDIA_BUS_FMT_RGB121212_1X36))\n+\t\t\toutput_fmts[i++] = MEDIA_BUS_FMT_RGB121212_1X36;\n \t}\n \n \tif (max_bpc >= 10 && info->bpc >= 10) {\n-\t\tif (info->color_formats & DRM_COLOR_FORMAT_YCBCR422)\n+\t\tif ((info->color_formats & DRM_COLOR_FORMAT_YCBCR422) &&\n+\t\t    is_tmds_allowed(info, mode, MEDIA_BUS_FMT_UYVY10_1X20))\n \t\t\toutput_fmts[i++] = MEDIA_BUS_FMT_UYVY10_1X20;\n \n-\t\tif (info->color_formats & DRM_COLOR_FORMAT_YCBCR444)\n+\t\tif ((info->color_formats & DRM_COLOR_FORMAT_YCBCR444) &&\n+\t\t    is_tmds_allowed(info, mode, MEDIA_BUS_FMT_YUV10_1X30))\n \t\t\toutput_fmts[i++] = MEDIA_BUS_FMT_YUV10_1X30;\n \n-\t\toutput_fmts[i++] = MEDIA_BUS_FMT_RGB101010_1X30;\n+\t\tif (is_tmds_allowed(info, mode, MEDIA_BUS_FMT_RGB101010_1X30))\n+\t\t\toutput_fmts[i++] = MEDIA_BUS_FMT_RGB101010_1X30;\n \t}\n \n-\tif (info->color_formats & DRM_COLOR_FORMAT_YCBCR422)\n+\tif ((info->color_formats & DRM_COLOR_FORMAT_YCBCR422) &&\n+\t    is_tmds_allowed(info, mode, MEDIA_BUS_FMT_UYVY8_1X16))\n \t\toutput_fmts[i++] = MEDIA_BUS_FMT_UYVY8_1X16;\n \n-\tif (info->color_formats & DRM_COLOR_FORMAT_YCBCR444)\n+\tif ((info->color_formats & DRM_COLOR_FORMAT_YCBCR444) &&\n+\t    is_tmds_allowed(info, mode, MEDIA_BUS_FMT_YUV8_1X24))\n \t\toutput_fmts[i++] = MEDIA_BUS_FMT_YUV8_1X24;\n \n \t*num_output_fmts = i;\n \n@@ -2946,11 +2969,20 @@ dw_hdmi_bridge_mode_valid(struct drm_bridge *bridge,\n \tstruct dw_hdmi *hdmi = bridge->driver_private;\n \tconst struct dw_hdmi_plat_data *pdata = hdmi->plat_data;\n \tenum drm_mode_status mode_status = MODE_OK;\n+\tint max_tmds_clock = info->max_tmds_clock ? info->max_tmds_clock : 340000;\n+\tint clock = mode->clock;\n \n \t/* We don't support double-clocked modes */\n \tif (mode->flags & DRM_MODE_FLAG_DBLCLK)\n \t\treturn MODE_BAD;\n \n+\tif (pdata->ycbcr_420_allowed && drm_mode_is_420(info, mode) &&\n+\t    (info->color_formats & DRM_COLOR_FORMAT_YCBCR420))\n+\t\tclock /= 2;\n+\n+\tif (clock > max_tmds_clock)\n+\t\treturn MODE_CLOCK_HIGH;\n+\n \tif (pdata->mode_valid)\n \t\tmode_status = pdata->mode_valid(hdmi, pdata->priv_data, info,\n \t\t\t\t\t\tmode);\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Fri, 20 Dec 2019 08:12:42 +0000\nSubject: [PATCH] WIP: drm/rockchip: dw_hdmi: add 10-bit rgb bus format\n\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 42 +++++++++++++++++++++\n drivers/gpu/drm/rockchip/rockchip_drm_drv.h |  1 +\n 2 files changed, 43 insertions(+)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex d6d8f3335813..89424c5bc24a 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -84,6 +84,8 @@ struct rockchip_hdmi {\n \tstruct phy *phy;\n };\n \n+#define to_crtc_state(x)\tcontainer_of(x, struct drm_crtc_state, x)\n+\n static struct rockchip_hdmi *to_rockchip_hdmi(struct drm_bridge *bridge)\n {\n \treturn container_of(bridge, struct rockchip_hdmi, bridge);\n@@ -341,6 +343,11 @@ dw_hdmi_rockchip_bridge_mode_set(struct drm_bridge *bridge,\n \t\t\t\t const struct drm_display_mode *adjusted_mode)\n {\n \tstruct rockchip_hdmi *hdmi = to_rockchip_hdmi(bridge);\n+\tstruct drm_crtc_state *crtc_state = to_crtc_state(adjusted_mode);\n+\tstruct rockchip_crtc_state *s = to_rockchip_crtc_state(crtc_state);\n+\n+\tif (hdmi->phy)\n+\t\tphy_set_bus_width(hdmi->phy, s->bus_width);\n \n \tclk_set_rate(hdmi->ref_clk, adjusted_mode->clock * 1000);\n }\n@@ -381,6 +388,17 @@ static bool is_rgb(u32 format)\n {\n \tswitch (format) {\n \tcase MEDIA_BUS_FMT_RGB888_1X24:\n+\tcase MEDIA_BUS_FMT_RGB101010_1X30:\n+\t\treturn true;\n+\tdefault:\n+\t\treturn false;\n+\t}\n+}\n+\n+static bool is_10bit(u32 format)\n+{\n+\tswitch (format) {\n+\tcase MEDIA_BUS_FMT_RGB101010_1X30:\n \t\treturn true;\n \tdefault:\n \t\treturn false;\n@@ -394,9 +412,24 @@ dw_hdmi_rockchip_bridge_atomic_check(struct drm_bridge *bridge,\n \t\t\t\t     struct drm_connector_state *conn_state)\n {\n \tstruct rockchip_crtc_state *s = to_rockchip_crtc_state(crtc_state);\n+\tstruct drm_atomic_state *state = bridge_state->base.state;\n+\tstruct drm_crtc_state *old_crtc_state;\n+\tstruct rockchip_crtc_state *old_state;\n+\tu32 format = bridge_state->output_bus_cfg.format;\n \n \ts->output_mode = ROCKCHIP_OUT_MODE_AAAA;\n \ts->output_type = DRM_MODE_CONNECTOR_HDMIA;\n+\ts->output_bpc = 10;\n+\ts->bus_format = format;\n+\ts->bus_width = is_10bit(format) ? 10 : 8;\n+\n+\told_crtc_state = drm_atomic_get_old_crtc_state(state, conn_state->crtc);\n+\tif (old_crtc_state && !crtc_state->mode_changed) {\n+\t\told_state = to_rockchip_crtc_state(old_crtc_state);\n+\t\tif (s->bus_format != old_state->bus_format ||\n+\t\t    s->bus_width != old_state->bus_width)\n+\t\t\tcrtc_state->mode_changed = true;\n+\t}\n \n \treturn 0;\n }\n@@ -408,10 +441,19 @@ static u32 *dw_hdmi_rockchip_get_input_bus_fmts(struct drm_bridge *bridge,\n \t\t\t\t\tu32 output_fmt,\n \t\t\t\t\tunsigned int *num_input_fmts)\n {\n+\tstruct rockchip_hdmi *hdmi = to_rockchip_hdmi(bridge);\n+\tstruct drm_encoder *encoder = bridge->encoder;\n \tu32 *input_fmt;\n+\tbool has_10bit = true;\n \n \t*num_input_fmts = 0;\n \n+\tif (drm_of_encoder_active_endpoint_id(hdmi->dev->of_node, encoder))\n+\t\thas_10bit = false;\n+\n+\tif (!has_10bit && is_10bit(output_fmt))\n+\t\treturn NULL;\n+\n \tif (!is_rgb(output_fmt))\n \t\treturn NULL;\n \ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h\nindex 1641440837af..381e5ccab5f3 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h\n@@ -34,6 +34,7 @@ struct rockchip_crtc_state {\n \tu32 bus_format;\n \tu32 bus_flags;\n \tint color_space;\n+\tint bus_width;\n };\n #define to_rockchip_crtc_state(s) \\\n \t\tcontainer_of(s, struct rockchip_crtc_state, base)\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sun, 8 Dec 2019 23:42:44 +0000\nSubject: [PATCH] WIP: drm: dw-hdmi: add content type connector property\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\nindex 7f6ffbc3e7b2..ae4c49e84470 100644\n--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n@@ -1790,6 +1790,7 @@ static void hdmi_config_AVI(struct dw_hdmi *hdmi,\n \t\t\t    const struct drm_connector *connector,\n \t\t\t    const struct drm_display_mode *mode)\n {\n+\tconst struct drm_connector_state *conn_state = connector->state;\n \tstruct hdmi_avi_infoframe frame;\n \tu8 val;\n \n@@ -1847,6 +1848,8 @@ static void hdmi_config_AVI(struct dw_hdmi *hdmi,\n \t\t\tHDMI_EXTENDED_COLORIMETRY_XV_YCC_601;\n \t}\n \n+\tdrm_hdmi_avi_infoframe_content_type(&frame, conn_state);\n+\n \t/*\n \t * The Designware IP uses a different byte format from standard\n \t * AVI info frames, though generally the bits are in the correct\n@@ -2551,7 +2554,8 @@ static int dw_hdmi_connector_atomic_check(struct drm_connector *connector,\n \tif (!crtc)\n \t\treturn 0;\n \n-\tif (!drm_connector_atomic_hdr_metadata_equal(old_state, new_state)) {\n+\tif (!drm_connector_atomic_hdr_metadata_equal(old_state, new_state) ||\n+\t    old_state->content_type != new_state->content_type) {\n \t\tcrtc_state = drm_atomic_get_crtc_state(state, crtc);\n \t\tif (IS_ERR(crtc_state))\n \t\t\treturn PTR_ERR(crtc_state);\n@@ -2619,6 +2623,8 @@ static int dw_hdmi_connector_create(struct dw_hdmi *hdmi)\n \n \tdrm_connector_attach_max_bpc_property(connector, 8, 16);\n \n+\tdrm_connector_attach_content_type_property(connector);\n+\n \tif (hdmi->version >= 0x200a && hdmi->plat_data->use_drm_infoframe)\n \t\tdrm_connector_attach_hdr_output_metadata_property(connector);\n \n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Fri, 20 Dec 2019 08:12:43 +0000\nSubject: [PATCH] WIP: drm/rockchip: add yuv444 support\n\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 29 ++++++++++++++++++++-\n drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 29 +++++++++++++++++++++\n drivers/gpu/drm/rockchip/rockchip_drm_vop.h |  6 +++++\n drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 19 ++++++++++++++\n 4 files changed, 82 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex 89424c5bc24a..05de2052d95d 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -68,6 +68,7 @@ struct rockchip_hdmi_chip_data {\n \tint\tlcdsel_grf_reg;\n \tu32\tlcdsel_big;\n \tu32\tlcdsel_lit;\n+\tbool\tycbcr_444_allowed;\n };\n \n struct rockchip_hdmi {\n@@ -395,10 +396,22 @@ static bool is_rgb(u32 format)\n \t}\n }\n \n+static bool is_yuv444(u32 format)\n+{\n+\tswitch (format) {\n+\tcase MEDIA_BUS_FMT_YUV10_1X30:\n+\tcase MEDIA_BUS_FMT_YUV8_1X24:\n+\t\treturn true;\n+\tdefault:\n+\t\treturn false;\n+\t}\n+}\n+\n static bool is_10bit(u32 format)\n {\n \tswitch (format) {\n \tcase MEDIA_BUS_FMT_RGB101010_1X30:\n+\tcase MEDIA_BUS_FMT_YUV10_1X30:\n \t\treturn true;\n \tdefault:\n \t\treturn false;\n@@ -415,12 +428,22 @@ dw_hdmi_rockchip_bridge_atomic_check(struct drm_bridge *bridge,\n \tstruct drm_atomic_state *state = bridge_state->base.state;\n \tstruct drm_crtc_state *old_crtc_state;\n \tstruct rockchip_crtc_state *old_state;\n+\tstruct drm_bridge *next_bridge;\n+\tstruct drm_bridge_state *next_bridge_state;\n \tu32 format = bridge_state->output_bus_cfg.format;\n \n \ts->output_mode = ROCKCHIP_OUT_MODE_AAAA;\n \ts->output_type = DRM_MODE_CONNECTOR_HDMIA;\n \ts->output_bpc = 10;\n \ts->bus_format = format;\n+\n+\tnext_bridge = drm_bridge_get_next_bridge(bridge);\n+\tif (next_bridge) {\n+\t\tnext_bridge_state = drm_atomic_get_new_bridge_state(state,\n+\t\t\t\t\t\t\t\tnext_bridge);\n+\t\tformat = next_bridge_state->output_bus_cfg.format;\n+\t}\n+\n \ts->bus_width = is_10bit(format) ? 10 : 8;\n \n \told_crtc_state = drm_atomic_get_old_crtc_state(state, conn_state->crtc);\n@@ -454,7 +477,10 @@ static u32 *dw_hdmi_rockchip_get_input_bus_fmts(struct drm_bridge *bridge,\n \tif (!has_10bit && is_10bit(output_fmt))\n \t\treturn NULL;\n \n-\tif (!is_rgb(output_fmt))\n+\tif (is_yuv444(output_fmt)) {\n+\t\tif (!hdmi->chip_data->ycbcr_444_allowed)\n+\t\t\treturn NULL;\n+\t} else if (!is_rgb(output_fmt))\n \t\treturn NULL;\n \n \tinput_fmt = kzalloc(sizeof(*input_fmt), GFP_KERNEL);\n@@ -604,6 +630,7 @@ static const struct dw_hdmi_phy_ops rk3328_hdmi_phy_ops = {\n \n static struct rockchip_hdmi_chip_data rk3328_chip_data = {\n \t.lcdsel_grf_reg = -1,\n+\t.ycbcr_444_allowed = true,\n };\n \n static const struct dw_hdmi_plat_data rk3328_hdmi_drv_data = {\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\nindex eadf1b0f1704..0e4eca0d5121 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n@@ -347,6 +347,17 @@ static int vop_convert_afbc_format(uint32_t format)\n \treturn -EINVAL;\n }\n \n+static bool is_yuv_output(uint32_t bus_format)\n+{\n+\tswitch (bus_format) {\n+\tcase MEDIA_BUS_FMT_YUV8_1X24:\n+\tcase MEDIA_BUS_FMT_YUV10_1X30:\n+\t\treturn true;\n+\tdefault:\n+\t\treturn false;\n+\t}\n+}\n+\n static uint16_t scl_vop_cal_scale(enum scale_mode mode, uint32_t src,\n \t\t\t\t  uint32_t dst, bool is_horizontal,\n \t\t\t\t  int vsu_mode, int *vskiplines)\n@@ -1455,6 +1466,7 @@ static void vop_crtc_atomic_enable(struct drm_crtc *crtc,\n \tu16 vact_end = vact_st + vdisplay;\n \tuint32_t pin_pol, val;\n \tint dither_bpc = s->output_bpc ? s->output_bpc : 10;\n+\tbool yuv_output = is_yuv_output(s->bus_format);\n \tint ret;\n \n \tif (old_state && old_state->self_refresh_active) {\n@@ -1520,6 +1532,8 @@ static void vop_crtc_atomic_enable(struct drm_crtc *crtc,\n \t    !(vop_data->feature & VOP_FEATURE_OUTPUT_RGB10))\n \t\ts->output_mode = ROCKCHIP_OUT_MODE_P888;\n \n+\tVOP_REG_SET(vop, common, dsp_data_swap, yuv_output ? 2 : 0);\n+\n \tif (s->output_mode == ROCKCHIP_OUT_MODE_AAAA && dither_bpc <= 8)\n \t\tVOP_REG_SET(vop, common, pre_dither_down, 1);\n \telse\n@@ -1535,6 +1549,21 @@ static void vop_crtc_atomic_enable(struct drm_crtc *crtc,\n \n \tVOP_REG_SET(vop, common, out_mode, s->output_mode);\n \n+\tVOP_REG_SET(vop, common, overlay_mode, yuv_output);\n+\tVOP_REG_SET(vop, common, dsp_out_yuv, yuv_output);\n+\n+\t/*\n+\t * Background color is 10bit depth if vop version >= 3.5\n+\t */\n+\tif (!yuv_output)\n+\t\tval = 0;\n+\telse if (VOP_MAJOR(vop_data->version) == 3 &&\n+\t\t VOP_MINOR(vop_data->version) >= 5)\n+\t\tval = 0x20010200;\n+\telse\n+\t\tval = 0x801080;\n+\tVOP_REG_SET(vop, common, dsp_background, val);\n+\n \tVOP_REG_SET(vop, modeset, htotal_pw, (htotal << 16) | hsync_len);\n \tval = hact_st << 16;\n \tval |= hact_end;\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h\nindex ca4e2b7415fe..47ad74ef1afb 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h\n@@ -119,10 +119,16 @@ struct vop_common {\n \tstruct vop_reg mmu_en;\n \tstruct vop_reg out_mode;\n \tstruct vop_reg standby;\n+\n+\tstruct vop_reg overlay_mode;\n+\tstruct vop_reg dsp_data_swap;\n+\tstruct vop_reg dsp_out_yuv;\n+\tstruct vop_reg dsp_background;\n };\n \n struct vop_misc {\n \tstruct vop_reg global_regdone_en;\n+\tstruct vop_reg win_channel[4];\n };\n \n struct vop_intr {\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c\nindex a2b281e290e0..b16a4c42773c 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c\n@@ -705,6 +705,11 @@ static const struct vop_common rk3288_common = {\n \t.dsp_blank = VOP_REG(RK3288_DSP_CTRL0, 0x3, 18),\n \t.out_mode = VOP_REG(RK3288_DSP_CTRL0, 0xf, 0),\n \t.cfg_done = VOP_REG_SYNC(RK3288_REG_CFG_DONE, 0x1, 0),\n+\n+\t.overlay_mode = VOP_REG(RK3288_SYS_CTRL, 0x1, 16),\n+\t.dsp_data_swap = VOP_REG(RK3288_DSP_CTRL0, 0x1f, 12),\n+\t.dsp_out_yuv = VOP_REG(RK3288_POST_SCL_CTRL, 0x1, 2),\n+\t.dsp_background = VOP_REG(RK3288_DSP_BG, 0xffffffff, 0),\n };\n \n /*\n@@ -926,6 +931,11 @@ static const struct vop_common rk3399_common = {\n \t.dsp_blank = VOP_REG(RK3399_DSP_CTRL0, 0x3, 18),\n \t.out_mode = VOP_REG(RK3399_DSP_CTRL0, 0xf, 0),\n \t.cfg_done = VOP_REG_SYNC(RK3399_REG_CFG_DONE, 0x1, 0),\n+\n+\t.overlay_mode = VOP_REG(RK3399_SYS_CTRL, 0x1, 16),\n+\t.dsp_data_swap = VOP_REG(RK3399_DSP_CTRL0, 0x1f, 12),\n+\t.dsp_out_yuv = VOP_REG(RK3288_POST_SCL_CTRL, 0x1, 2),\n+\t.dsp_background = VOP_REG(RK3288_DSP_BG, 0xffffffff, 0),\n };\n \n static const struct vop_yuv2yuv_phy rk3399_yuv2yuv_win01_data = {\n@@ -1096,6 +1106,10 @@ static const struct vop_output rk3328_output = {\n \n static const struct vop_misc rk3328_misc = {\n \t.global_regdone_en = VOP_REG(RK3328_SYS_CTRL, 0x1, 11),\n+\n+\t.win_channel[0] = VOP_REG(RK3328_WIN0_CTRL2, 0xff, 0),\n+\t.win_channel[1] = VOP_REG(RK3328_WIN1_CTRL2, 0xff, 0),\n+\t.win_channel[2] = VOP_REG(RK3328_WIN2_CTRL2, 0xff, 0),\n };\n \n static const struct vop_common rk3328_common = {\n@@ -1108,6 +1122,11 @@ static const struct vop_common rk3328_common = {\n \t.dsp_blank = VOP_REG(RK3328_DSP_CTRL0, 0x3, 18),\n \t.out_mode = VOP_REG(RK3328_DSP_CTRL0, 0xf, 0),\n \t.cfg_done = VOP_REG_SYNC(RK3328_REG_CFG_DONE, 0x1, 0),\n+\n+\t.overlay_mode = VOP_REG(RK3328_SYS_CTRL, 0x1, 16),\n+\t.dsp_data_swap = VOP_REG(RK3328_DSP_CTRL0, 0x1f, 12),\n+\t.dsp_out_yuv = VOP_REG(RK3328_POST_SCL_CTRL, 0x1, 2),\n+\t.dsp_background = VOP_REG(RK3328_DSP_BG, 0xffffffff, 0),\n };\n \n static const struct vop_intr rk3328_vop_intr = {\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Fri, 20 Dec 2019 08:12:43 +0000\nSubject: [PATCH] WIP: drm/rockchip: add yuv420 support\n\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 22 +++++++++++++++++++++\n drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 19 +++++++++++++++++-\n drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 10 ++++++----\n drivers/gpu/drm/rockchip/rockchip_vop_reg.c |  2 ++\n 4 files changed, 48 insertions(+), 5 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex 05de2052d95d..cb201612199f 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -407,9 +407,21 @@ static bool is_yuv444(u32 format)\n \t}\n }\n \n+static bool is_yuv420(u32 format)\n+{\n+\tswitch (format) {\n+\tcase MEDIA_BUS_FMT_UYYVYY10_0_5X30:\n+\tcase MEDIA_BUS_FMT_UYYVYY8_0_5X24:\n+\t\treturn true;\n+\tdefault:\n+\t\treturn false;\n+\t}\n+}\n+\n static bool is_10bit(u32 format)\n {\n \tswitch (format) {\n+\tcase MEDIA_BUS_FMT_UYYVYY10_0_5X30:\n \tcase MEDIA_BUS_FMT_RGB101010_1X30:\n \tcase MEDIA_BUS_FMT_YUV10_1X30:\n \t\treturn true;\n@@ -446,6 +458,11 @@ dw_hdmi_rockchip_bridge_atomic_check(struct drm_bridge *bridge,\n \n \ts->bus_width = is_10bit(format) ? 10 : 8;\n \n+\tif (is_yuv420(format)) {\n+\t\ts->output_mode = ROCKCHIP_OUT_MODE_YUV420;\n+\t\ts->bus_width /= 2;\n+\t}\n+\n \told_crtc_state = drm_atomic_get_old_crtc_state(state, conn_state->crtc);\n \tif (old_crtc_state && !crtc_state->mode_changed) {\n \t\told_state = to_rockchip_crtc_state(old_crtc_state);\n@@ -466,6 +483,7 @@ static u32 *dw_hdmi_rockchip_get_input_bus_fmts(struct drm_bridge *bridge,\n {\n \tstruct rockchip_hdmi *hdmi = to_rockchip_hdmi(bridge);\n \tstruct drm_encoder *encoder = bridge->encoder;\n+\tstruct drm_connector *connector = conn_state->connector;\n \tu32 *input_fmt;\n \tbool has_10bit = true;\n \n@@ -480,6 +498,9 @@ static u32 *dw_hdmi_rockchip_get_input_bus_fmts(struct drm_bridge *bridge,\n \tif (is_yuv444(output_fmt)) {\n \t\tif (!hdmi->chip_data->ycbcr_444_allowed)\n \t\t\treturn NULL;\n+\t} else if (is_yuv420(output_fmt)) {\n+\t\tif (!connector->ycbcr_420_allowed)\n+\t\t\treturn NULL;\n \t} else if (!is_rgb(output_fmt))\n \t\treturn NULL;\n \n@@ -640,6 +661,7 @@ static const struct dw_hdmi_plat_data rk3328_hdmi_drv_data = {\n \t.phy_name = \"inno_dw_hdmi_phy2\",\n \t.phy_force_vendor = true,\n \t.use_drm_infoframe = true,\n+\t.ycbcr_420_allowed = true,\n };\n \n static struct rockchip_hdmi_chip_data rk3399_chip_data = {\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\nindex 0e4eca0d5121..e50f71ad3ceb 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n@@ -10,6 +10,7 @@\n #include <linux/iopoll.h>\n #include <linux/kernel.h>\n #include <linux/log2.h>\n+#include <linux/media-bus-format.h>\n #include <linux/module.h>\n #include <linux/of.h>\n #include <linux/of_device.h>\n@@ -348,6 +349,19 @@ static int vop_convert_afbc_format(uint32_t format)\n }\n \n static bool is_yuv_output(uint32_t bus_format)\n+{\n+\tswitch (bus_format) {\n+\tcase MEDIA_BUS_FMT_YUV8_1X24:\n+\tcase MEDIA_BUS_FMT_YUV10_1X30:\n+\tcase MEDIA_BUS_FMT_UYYVYY8_0_5X24:\n+\tcase MEDIA_BUS_FMT_UYYVYY10_0_5X30:\n+\t\treturn true;\n+\tdefault:\n+\t\treturn false;\n+\t}\n+}\n+\n+static bool bus_fmt_has_uv_swapped(uint32_t bus_format)\n {\n \tswitch (bus_format) {\n \tcase MEDIA_BUS_FMT_YUV8_1X24:\n@@ -1532,7 +1546,7 @@ static void vop_crtc_atomic_enable(struct drm_crtc *crtc,\n \t    !(vop_data->feature & VOP_FEATURE_OUTPUT_RGB10))\n \t\ts->output_mode = ROCKCHIP_OUT_MODE_P888;\n \n-\tVOP_REG_SET(vop, common, dsp_data_swap, yuv_output ? 2 : 0);\n+\tVOP_REG_SET(vop, common, dsp_data_swap, bus_fmt_has_uv_swapped(s->bus_format) ? 2 : 0);\n \n \tif (s->output_mode == ROCKCHIP_OUT_MODE_AAAA && dither_bpc <= 8)\n \t\tVOP_REG_SET(vop, common, pre_dither_down, 1);\n@@ -1549,6 +1563,9 @@ static void vop_crtc_atomic_enable(struct drm_crtc *crtc,\n \n \tVOP_REG_SET(vop, common, out_mode, s->output_mode);\n \n+\tVOP_REG_SET(vop, common, dclk_ddr,\n+\t\t    s->output_mode == ROCKCHIP_OUT_MODE_YUV420 ? 1 : 0);\n+\n \tVOP_REG_SET(vop, common, overlay_mode, yuv_output);\n \tVOP_REG_SET(vop, common, dsp_out_yuv, yuv_output);\n \ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h\nindex 47ad74ef1afb..94a615dca672 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h\n@@ -121,6 +121,7 @@ struct vop_common {\n \tstruct vop_reg standby;\n \n \tstruct vop_reg overlay_mode;\n+\tstruct vop_reg dclk_ddr;\n \tstruct vop_reg dsp_data_swap;\n \tstruct vop_reg dsp_out_yuv;\n \tstruct vop_reg dsp_background;\n@@ -286,11 +287,12 @@ struct vop_data {\n /*\n  * display output interface supported by rockchip lcdc\n  */\n-#define ROCKCHIP_OUT_MODE_P888\t0\n-#define ROCKCHIP_OUT_MODE_P666\t1\n-#define ROCKCHIP_OUT_MODE_P565\t2\n+#define ROCKCHIP_OUT_MODE_P888\t\t0\n+#define ROCKCHIP_OUT_MODE_P666\t\t1\n+#define ROCKCHIP_OUT_MODE_P565\t\t2\n+#define ROCKCHIP_OUT_MODE_YUV420\t14\n /* for use special outface */\n-#define ROCKCHIP_OUT_MODE_AAAA\t15\n+#define ROCKCHIP_OUT_MODE_AAAA\t\t15\n \n /* output flags */\n #define ROCKCHIP_OUTPUT_DSI_DUAL\tBIT(0)\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c\nindex b16a4c42773c..5463b04240f7 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c\n@@ -707,6 +707,7 @@ static const struct vop_common rk3288_common = {\n \t.cfg_done = VOP_REG_SYNC(RK3288_REG_CFG_DONE, 0x1, 0),\n \n \t.overlay_mode = VOP_REG(RK3288_SYS_CTRL, 0x1, 16),\n+\t.dclk_ddr = VOP_REG(RK3288_DSP_CTRL0, 0x1, 8),\n \t.dsp_data_swap = VOP_REG(RK3288_DSP_CTRL0, 0x1f, 12),\n \t.dsp_out_yuv = VOP_REG(RK3288_POST_SCL_CTRL, 0x1, 2),\n \t.dsp_background = VOP_REG(RK3288_DSP_BG, 0xffffffff, 0),\n@@ -1124,6 +1125,7 @@ static const struct vop_common rk3328_common = {\n \t.cfg_done = VOP_REG_SYNC(RK3328_REG_CFG_DONE, 0x1, 0),\n \n \t.overlay_mode = VOP_REG(RK3328_SYS_CTRL, 0x1, 16),\n+\t.dclk_ddr = VOP_REG(RK3328_DSP_CTRL0, 0x1, 8),\n \t.dsp_data_swap = VOP_REG(RK3328_DSP_CTRL0, 0x1f, 12),\n \t.dsp_out_yuv = VOP_REG(RK3328_POST_SCL_CTRL, 0x1, 2),\n \t.dsp_background = VOP_REG(RK3328_DSP_BG, 0xffffffff, 0),\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Sat, 15 Aug 2020 23:20:34 +0200\nSubject: [PATCH] drm/rockchip: enable ycbcr_420_allowed and ycbcr_444_allowed\n for RK3228\n\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex cb201612199f..8627f6826bfe 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -616,6 +616,7 @@ static const struct dw_hdmi_phy_ops rk3228_hdmi_phy_ops = {\n \n static struct rockchip_hdmi_chip_data rk3228_chip_data = {\n \t.lcdsel_grf_reg = -1,\n+\t.ycbcr_444_allowed = true,\n };\n \n static const struct dw_hdmi_plat_data rk3228_hdmi_drv_data = {\n@@ -624,6 +625,7 @@ static const struct dw_hdmi_plat_data rk3228_hdmi_drv_data = {\n \t.phy_ops = &rk3228_hdmi_phy_ops,\n \t.phy_name = \"inno_dw_hdmi_phy2\",\n \t.phy_force_vendor = true,\n+\t.ycbcr_420_allowed = true,\n };\n \n static struct rockchip_hdmi_chip_data rk3288_chip_data = {\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Mon, 4 Jan 2021 22:38:26 +0100\nSubject: [PATCH] drm/rockchip: seperate mode clock validation\n\nseperate mode clock validation between internal and external\nphy types.\nthis will allow modes >= 2160p@50Hz on RK3288/RK3399 (RGB444)\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 17 +++++++++++++++--\n 1 file changed, 15 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\nindex 8627f6826bfe..e259362f6414 100644\n--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c\n@@ -326,16 +326,29 @@ dw_hdmi_rockchip_mode_valid(struct dw_hdmi *hdmi, void *data,\n \t\t\t    const struct drm_display_mode *mode)\n {\n \tstruct dw_hdmi_plat_data *pdata = (struct dw_hdmi_plat_data *)data;\n+\tconst struct dw_hdmi_mpll_config *mpll_cfg = pdata->mpll_cfg;\n \tint clock = mode->clock;\n+\tunsigned int i = 0;\n \n \tif (pdata->ycbcr_420_allowed && drm_mode_is_420(info, mode) &&\n-\t    (info->color_formats & DRM_COLOR_FORMAT_YCBCR420))\n+\t    (info->color_formats & DRM_COLOR_FORMAT_YCBCR420)) {\n \t\tclock /= 2;\n+\t\tmpll_cfg = pdata->mpll_cfg_420;\n+\t}\n \n-\tif (clock > 340000 ||\n+\tif ((!mpll_cfg && clock > 340000) ||\n \t    (info->max_tmds_clock && clock > info->max_tmds_clock))\n \t\treturn MODE_CLOCK_HIGH;\n \n+\tif (mpll_cfg) {\n+\t\twhile ((clock * 1000) < mpll_cfg[i].mpixelclock &&\n+\t\t       mpll_cfg[i].mpixelclock != (~0UL))\n+\t\t       i++;\n+\n+\t\tif (mpll_cfg[i].mpixelclock == (~0UL))\n+\t\t\treturn MODE_CLOCK_HIGH;\n+\t}\n+\n \treturn MODE_OK;\n }\n static void\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sat, 18 Nov 2017 11:09:39 +0100\nSubject: [PATCH] rockchip: vop: force skip lines if image too big\n\n---\n drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 13 ++++++++++---\n 1 file changed, 10 insertions(+), 3 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\nindex e50f71ad3ceb..ef0a078c22f4 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n@@ -965,6 +965,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,\n \tint format;\n \tint is_yuv = fb->format->is_yuv;\n \tint i;\n+\tint skiplines = 0;\n \n \t/*\n \t * can't update plane when vop is disabled.\n@@ -983,8 +984,14 @@ static void vop_plane_atomic_update(struct drm_plane *plane,\n \tobj = fb->obj[0];\n \trk_obj = to_rockchip_obj(obj);\n \n+\t/*\n+\t * Force skip lines when image is yuv and 3840 width,\n+\t * fixes a \"jumping\" green lines issue on RK3328.\n+\t */\n \tactual_w = drm_rect_width(src) >> 16;\n-\tactual_h = drm_rect_height(src) >> 16;\n+\tif (actual_w == 3840 && is_yuv)\n+\t\tskiplines = 1;\n+\tactual_h = drm_rect_height(src) >> (16 + skiplines);\n \tact_info = (actual_h - 1) << 16 | ((actual_w - 1) & 0xffff);\n \n \tdsp_info = (drm_rect_height(dest) - 1) << 16;\n@@ -1026,7 +1033,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,\n \n \tVOP_WIN_SET(vop, win, format, format);\n \tVOP_WIN_SET(vop, win, fmt_10, is_fmt_10(fb->format->format));\n-\tVOP_WIN_SET(vop, win, yrgb_vir, DIV_ROUND_UP(fb->pitches[0], 4));\n+\tVOP_WIN_SET(vop, win, yrgb_vir, DIV_ROUND_UP(fb->pitches[0], 4 >> skiplines));\n \tVOP_WIN_SET(vop, win, yrgb_mst, dma_addr);\n \tVOP_WIN_YUV2YUV_SET(vop, win_yuv2yuv, y2r_en, is_yuv);\n \tVOP_WIN_SET(vop, win, y_mir_en,\n@@ -1050,7 +1057,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,\n \t\toffset += (src->y1 >> 16) * fb->pitches[1] / vsub;\n \n \t\tdma_addr = rk_uv_obj->dma_addr + offset + fb->offsets[1];\n-\t\tVOP_WIN_SET(vop, win, uv_vir, DIV_ROUND_UP(fb->pitches[1], 4));\n+\t\tVOP_WIN_SET(vop, win, uv_vir, DIV_ROUND_UP(fb->pitches[1], 4 >> skiplines));\n \t\tVOP_WIN_SET(vop, win, uv_mst, dma_addr);\n \n \t\tfor (i = 0; i < NUM_YUV2YUV_COEFFICIENTS; i++) {\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Wed, 8 Jan 2020 21:07:51 +0000\nSubject: [PATCH] arm64: dts: rockchip: increase vop clock rate on rk3328\n\nThe VOP on RK3328 needs to run at higher rate in order to\nproduce a proper 3840x2160 signal.\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n arch/arm64/boot/dts/rockchip/rk3328.dtsi | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi\nindex d7e44d174d7b..5519347232f6 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi\n@@ -811,8 +811,8 @@ cru: clock-controller@ff440000 {\n \t\t\t<0>, <24000000>,\n \t\t\t<24000000>, <24000000>,\n \t\t\t<15000000>, <15000000>,\n-\t\t\t<100000000>, <100000000>,\n-\t\t\t<100000000>, <100000000>,\n+\t\t\t<300000000>, <100000000>,\n+\t\t\t<400000000>, <100000000>,\n \t\t\t<50000000>, <100000000>,\n \t\t\t<100000000>, <100000000>,\n \t\t\t<50000000>, <50000000>,\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Sat, 10 Apr 2021 16:54:26 +0200\nSubject: [PATCH] drm/bridge: dw-hdmi: fix RGB to YUV color space conversion\n\nWe are currently providing color space conversion coefficents\nfor RGB to YUV conversion for full range to full range.\nThis is wrong, since we are hardcoding YCC quantization range\nlimited in the AVI infoframe (which is correct according to\nHDMI specs). This results in to dark colors if this conversion\nis used.\nI verfied this by setting YCC quantization range to full in\nAVI infoframe which resulted in correct colors. Doing this,\nhowever, will be ignored by some (most) sinks.\n\nThis patch fixes this, by providing CSC coefficents which\nconvert RGB full range to YUV limited range for both BT601\nand BT709 colorspaces.\n\nFixes: 9aaf880ed4ee (\"imx-drm: Add mx6 hdmi transmitter support\")\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\nindex ae4c49e84470..92e621f2714f 100644\n--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n@@ -82,15 +82,15 @@ static const u16 csc_coeff_rgb_out_eitu709[3][4] = {\n };\n \n static const u16 csc_coeff_rgb_in_eitu601[3][4] = {\n-\t{ 0x2591, 0x1322, 0x074b, 0x0000 },\n-\t{ 0x6535, 0x2000, 0x7acc, 0x0200 },\n-\t{ 0x6acd, 0x7534, 0x2000, 0x0200 }\n+\t{ 0x2040, 0x1080, 0x0640, 0x0040 },\n+\t{ 0xe880, 0x1c00, 0xfb80, 0x0200 },\n+\t{ 0xed80, 0xf680, 0x1c00, 0x0200 }\n };\n \n static const u16 csc_coeff_rgb_in_eitu709[3][4] = {\n-\t{ 0x2dc5, 0x0d9b, 0x049e, 0x0000 },\n-\t{ 0x62f0, 0x2000, 0x7d11, 0x0200 },\n-\t{ 0x6756, 0x78ab, 0x2000, 0x0200 }\n+\t{ 0x2740, 0x0bc0, 0x0400, 0x0040 },\n+\t{ 0xe680, 0x1c00, 0xfd80, 0x0200 },\n+\t{ 0xea40, 0xf980, 0x1c00, 0x0200 }\n };\n \n static const u16 csc_coeff_rgb_full_to_rgb_limited[3][4] = {\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Tue, 23 Mar 2021 19:45:07 +0100\nSubject: [PATCH] phy/rockchip: inno-hdmi: add more supported pre-pll rates\n\nThis adds a bunch of new pixel clock- and tmds rates to the pre-pll\ntable which are required to get more VESA and some DMT rates working.\n\nIt has been completly re-calculated to match the min- and max-vco of\n(750 MHz - 3.2 GHz) requirements. If more than one configuration would\nhave been possible the lowest fbdiv and refdiv (and therefore lowest\nvco rate) has been prefered.\n\nIt's important to note, that RK3228 version of the phy does not support\nfractional dividers. In order to support the most possible rates for\nthis version also in both 8-bit and 10-bit variant, some rates are not\nexact. The maximum deviation of the pixel clock is 0.26,\nwhich perfectly fits into vesa DMT recommendation of 0.5%.\n\nI tested all possible rates on serveral screens from different manufacturers\nwith both RK3228 and RK3328. Both pre- and post-PLL locking are slighlty\nfaster now.\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 198 +++++++++++++++---\n 1 file changed, 173 insertions(+), 25 deletions(-)\n\ndiff --git a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c\nindex 2f01259823ea..1889e78e18ea 100644\n--- a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c\n+++ b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c\n@@ -292,31 +292,179 @@ struct inno_hdmi_phy_drv_data {\n };\n \n static const struct pre_pll_config pre_pll_cfg_table[] = {\n-\t{ 27000000,  27000000, 1,  90, 3, 2, 2, 10, 3, 3, 4, 0, 0},\n-\t{ 27000000,  33750000, 1,  90, 1, 3, 3, 10, 3, 3, 4, 0, 0},\n-\t{ 40000000,  40000000, 1,  80, 2, 2, 2, 12, 2, 2, 2, 0, 0},\n-\t{ 59341000,  59341000, 1,  98, 3, 1, 2,  1, 3, 3, 4, 0, 0xE6AE6B},\n-\t{ 59400000,  59400000, 1,  99, 3, 1, 1,  1, 3, 3, 4, 0, 0},\n-\t{ 59341000,  74176250, 1,  98, 0, 3, 3,  1, 3, 3, 4, 0, 0xE6AE6B},\n-\t{ 59400000,  74250000, 1,  99, 1, 2, 2,  1, 3, 3, 4, 0, 0},\n-\t{ 74176000,  74176000, 1,  98, 1, 2, 2,  1, 2, 3, 4, 0, 0xE6AE6B},\n-\t{ 74250000,  74250000, 1,  99, 1, 2, 2,  1, 2, 3, 4, 0, 0},\n-\t{ 74176000,  92720000, 4, 494, 1, 2, 2,  1, 3, 3, 4, 0, 0x816817},\n-\t{ 74250000,  92812500, 4, 495, 1, 2, 2,  1, 3, 3, 4, 0, 0},\n-\t{148352000, 148352000, 1,  98, 1, 1, 1,  1, 2, 2, 2, 0, 0xE6AE6B},\n-\t{148500000, 148500000, 1,  99, 1, 1, 1,  1, 2, 2, 2, 0, 0},\n-\t{148352000, 185440000, 4, 494, 0, 2, 2,  1, 3, 2, 2, 0, 0x816817},\n-\t{148500000, 185625000, 4, 495, 0, 2, 2,  1, 3, 2, 2, 0, 0},\n-\t{296703000, 296703000, 1,  98, 0, 1, 1,  1, 0, 2, 2, 0, 0xE6AE6B},\n-\t{297000000, 297000000, 1,  99, 0, 1, 1,  1, 0, 2, 2, 0, 0},\n-\t{296703000, 370878750, 4, 494, 1, 2, 0,  1, 3, 1, 1, 0, 0x816817},\n-\t{297000000, 371250000, 4, 495, 1, 2, 0,  1, 3, 1, 1, 0, 0},\n-\t{593407000, 296703500, 1,  98, 0, 1, 1,  1, 0, 2, 1, 0, 0xE6AE6B},\n-\t{594000000, 297000000, 1,  99, 0, 1, 1,  1, 0, 2, 1, 0, 0},\n-\t{593407000, 370879375, 4, 494, 1, 2, 0,  1, 3, 1, 1, 1, 0x816817},\n-\t{594000000, 371250000, 4, 495, 1, 2, 0,  1, 3, 1, 1, 1, 0},\n-\t{593407000, 593407000, 1,  98, 0, 2, 0,  1, 0, 1, 1, 0, 0xE6AE6B},\n-\t{594000000, 594000000, 1,  99, 0, 2, 0,  1, 0, 1, 1, 0, 0},\n+\t{ 25175000,  25175000,  3,  125, 3, 1, 1,  1, 3, 3,  4, 0, 0xe00000},\n+\t{ 25175000,  31468750,  1,   41, 0, 3, 3,  1, 3, 3,  4, 0, 0xf5554f},\n+\t{ 27000000,  27000000,  1,   36, 0, 3, 3,  1, 2, 3,  4, 0,      0x0},\n+\t{ 27000000,  33750000,  1,   45, 0, 3, 3,  1, 3, 3,  4, 0,      0x0},\n+\t{ 31500000,  31500000,  1,   42, 0, 3, 3,  1, 2, 3,  4, 0,      0x0},\n+\t{ 31500000,  39375000,  1,  105, 1, 3, 3, 10, 0, 3,  4, 0,      0x0},\n+\t{ 33750000,  33750000,  1,   45, 0, 3, 3,  1, 2, 3,  4, 0,      0x0},\n+\t{ 33750000,  42187500,  1,  169, 2, 3, 3, 15, 0, 3,  4, 0,      0x0},\n+\t{ 35500000,  35500000,  1,   71, 2, 2, 2,  6, 0, 3,  4, 0,      0x0},\n+\t{ 35500000,  44375000,  1,   74, 3, 1, 1, 25, 0, 1,  1, 0,      0x0},\n+\t{ 36000000,  36000000,  1,   36, 2, 1, 1,  1, 1, 3,  4, 0,      0x0},\n+\t{ 36000000,  45000000,  1,   45, 2, 1, 1, 15, 0, 1,  1, 0,      0x0},\n+\t{ 40000000,  40000000,  1,   40, 2, 1, 1,  1, 1, 3,  4, 0,      0x0},\n+\t{ 40000000,  50000000,  1,   50, 2, 1, 1, 15, 0, 1,  1, 0,      0x0},\n+\t{ 49500000,  49500000,  1,   66, 0, 3, 3,  1, 2, 3,  4, 0,      0x0},\n+\t{ 49500000,  61875000,  1,  165, 1, 3, 3, 10, 0, 3,  4, 0,      0x0},\n+\t{ 50000000,  50000000,  1,   50, 2, 1, 1,  1, 1, 3,  4, 0,      0x0},\n+\t{ 50000000,  62500000,  1,  125, 2, 2, 2, 15, 0, 2,  2, 0,      0x0},\n+\t{ 54000000,  54000000,  1,   36, 0, 2, 2,  1, 0, 3,  4, 0,      0x0},\n+\t{ 54000000,  67500000,  1,   45, 0, 2, 2,  1, 3, 2,  2, 0,      0x0},\n+\t{ 56250000,  56250000,  1,   75, 0, 3, 3,  1, 2, 3,  4, 0,      0x0},\n+\t{ 56250000,  70312500,  1,  117, 3, 1, 1, 25, 0, 1,  1, 0,      0x0},\n+\t{ 59341000,  59341000,  1,  118, 2, 2, 2,  6, 0, 3,  4, 0, 0xae978d},\n+\t{ 59341000,  74176250,  2,  148, 2, 1, 1, 15, 0, 1,  1, 0, 0x5a3d70},\n+\t{ 59400000,  59400000,  1,   99, 3, 1, 1,  1, 3, 3,  4, 0,      0x0},\n+\t{ 59400000,  74250000,  1,   99, 0, 3, 3,  1, 3, 3,  4, 0,      0x0},\n+\t{ 65000000,  65000000,  1,   65, 2, 1, 1,  1, 1, 3,  4, 0,      0x0},\n+\t{ 65000000,  81250000,  3,  325, 0, 3, 3,  1, 3, 3,  4, 0,      0x0},\n+\t{ 68250000,  68250000,  1,   91, 0, 3, 3,  1, 2, 3,  4, 0,      0x0},\n+\t{ 68250000,  85312500,  1,  142, 3, 1, 1, 25, 0, 1,  1, 0,      0x0},\n+\t{ 71000000,  71000000,  1,   71, 2, 1, 1,  1, 1, 3,  4, 0,      0x0},\n+\t{ 71000000,  88750000,  3,  355, 0, 3, 3,  1, 3, 3,  4, 0,      0x0},\n+\t{ 72000000,  72000000,  1,   36, 2, 0, 0,  1, 1, 2,  2, 0,      0x0},\n+\t{ 72000000,  90000000,  1,   60, 0, 2, 2,  1, 3, 2,  2, 0,      0x0},\n+\t{ 73250000,  73250000,  3,  293, 0, 3, 3,  1, 2, 3,  4, 0,      0x0},\n+\t{ 73250000,  91562500,  1,   61, 0, 2, 2,  1, 3, 2,  2, 0,      0x0},\n+\t{ 74176000,  74176000,  1,   37, 2, 0, 0,  1, 1, 2,  2, 0, 0x16872b},\n+\t{ 74176000,  92720000,  2,  185, 2, 1, 1, 15, 0, 1,  1, 0, 0x70a3d7},\n+\t{ 74250000,  74250000,  1,   99, 0, 3, 3,  1, 2, 3,  4, 0,      0x0},\n+\t{ 74250000,  92812500,  4,  495, 0, 3, 3,  1, 3, 3,  4, 0,      0x0},\n+\t{ 75000000,  75000000,  1,   50, 0, 2, 2,  1, 0, 3,  4, 0,      0x0},\n+\t{ 75000000,  93750000,  1,  125, 0, 3, 3,  1, 3, 3,  4, 0,      0x0},\n+\t{ 78750000,  78750000,  1,  105, 0, 3, 3,  1, 2, 3,  4, 0,      0x0},\n+\t{ 78750000,  98437500,  1,  164, 3, 1, 1, 25, 0, 1,  1, 0,      0x0},\n+\t{ 79500000,  79500000,  1,   53, 0, 2, 2,  1, 0, 3,  4, 0,      0x0},\n+\t{ 79500000,  99375000,  1,  199, 2, 2, 2, 15, 0, 2,  2, 0,      0x0},\n+\t{ 83500000,  83500000,  2,  167, 2, 1, 1,  1, 1, 3,  4, 0,      0x0},\n+\t{ 83500000, 104375000,  1,  104, 2, 1, 1, 15, 0, 1,  1, 0, 0x600000},\n+\t{ 85500000,  85500000,  1,   57, 0, 2, 2,  1, 0, 3,  4, 0,      0x0},\n+\t{ 85500000, 106875000,  1,  178, 3, 1, 1, 25, 0, 1,  1, 0,      0x0},\n+\t{ 85750000,  85750000,  3,  343, 0, 3, 3,  1, 2, 3,  4, 0,      0x0},\n+\t{ 85750000, 107187500,  1,  143, 0, 3, 3,  1, 3, 3,  4, 0,      0x0},\n+\t{ 88750000,  88750000,  3,  355, 0, 3, 3,  1, 2, 3,  4, 0,      0x0},\n+\t{ 88750000, 110937500,  1,  110, 2, 1, 1, 15, 0, 1,  1, 0, 0xf00000},\n+\t{ 94500000,  94500000,  1,   63, 0, 2, 2,  1, 0, 3,  4, 0,      0x0},\n+\t{ 94500000, 118125000,  1,  197, 3, 1, 1, 25, 0, 1,  1, 0,      0x0},\n+\t{101000000, 101000000,  1,  101, 2, 1, 1,  1, 1, 3,  4, 0,      0x0},\n+\t{101000000, 126250000,  1,   42, 0, 1, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{102250000, 102250000,  4,  409, 2, 1, 1,  1, 1, 3,  4, 0,      0x0},\n+\t{102250000, 127812500,  1,  128, 2, 1, 1, 15, 0, 1,  1, 0,      0x0},\n+\t{106500000, 106500000,  1,   71, 0, 2, 2,  1, 0, 3,  4, 0,      0x0},\n+\t{106500000, 133125000,  1,  133, 2, 1, 1, 15, 0, 1,  1, 0,      0x0},\n+\t{108000000, 108000000,  1,   36, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{108000000, 135000000,  1,   45, 0, 1, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{115500000, 115500000,  1,   77, 0, 2, 2,  1, 0, 3,  4, 0,      0x0},\n+\t{115500000, 144375000,  1,   48, 0, 1, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{117500000, 117500000,  2,  235, 2, 1, 1,  1, 1, 3,  4, 0,      0x0},\n+\t{117500000, 146875000,  1,   49, 0, 1, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{119000000, 119000000,  1,  119, 2, 1, 1,  1, 1, 3,  4, 0,      0x0},\n+\t{119000000, 148750000,  3,  148, 0, 1, 1,  1, 3, 1,  1, 0, 0xc00000},\n+\t{121750000, 121750000,  4,  487, 2, 1, 1,  1, 1, 3,  4, 0,      0x0},\n+\t{121750000, 152187500,  1,  203, 0, 3, 3,  1, 3, 3,  4, 0,      0x0},\n+\t{122500000, 122500000,  2,  245, 2, 1, 1,  1, 1, 3,  4, 0,      0x0},\n+\t{122500000, 153125000,  1,   51, 0, 1, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{135000000, 135000000,  1,   45, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{135000000, 168750000,  1,  169, 2, 1, 1, 15, 0, 1,  1, 0,      0x0},\n+\t{136750000, 136750000,  1,   68, 2, 0, 0,  1, 1, 2,  2, 0, 0x600000},\n+\t{136750000, 170937500,  1,  113, 0, 2, 2,  1, 3, 2,  2, 0, 0xf5554f},\n+\t{140250000, 140250000,  2,  187, 0, 2, 2,  1, 0, 3,  4, 0,      0x0},\n+\t{140250000, 175312500,  1,  117, 0, 2, 2,  1, 3, 2,  2, 0,      0x0},\n+\t{146250000, 146250000,  2,  195, 0, 2, 2,  1, 0, 3,  4, 0,      0x0},\n+\t{146250000, 182812500,  1,   61, 0, 1, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{148250000, 148250000,  3,  222, 2, 0, 0,  1, 1, 2,  2, 0, 0x600000},\n+\t{148250000, 185312500,  1,  123, 0, 2, 2,  1, 3, 2,  2, 0, 0x8aaab0},\n+\t{148352000, 148352000,  2,  148, 2, 0, 0,  1, 1, 2,  2, 0, 0x5a1cac},\n+\t{148352000, 185440000,  3,  185, 0, 1, 1,  1, 3, 1,  1, 0, 0x70a3d7},\n+\t{148500000, 148500000,  1,   99, 0, 2, 2,  1, 0, 3,  4, 0,      0x0},\n+\t{148500000, 185625000,  4,  495, 0, 2, 2,  1, 3, 2,  2, 0,      0x0},\n+\t{154000000, 154000000,  1,   77, 2, 0, 0,  1, 1, 2,  2, 0,      0x0},\n+\t{154000000, 192500000,  1,   64, 0, 1, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{156000000, 156000000,  1,   52, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{156000000, 195000000,  1,   65, 0, 1, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{156750000, 156750000,  2,  209, 0, 2, 2,  1, 0, 3,  4, 0,      0x0},\n+\t{156750000, 195937500,  1,  196, 2, 1, 1, 15, 0, 1,  1, 0,      0x0},\n+\t{157000000, 157000000,  2,  157, 2, 0, 0,  1, 1, 2,  2, 0,      0x0},\n+\t{157000000, 196250000,  1,  131, 0, 2, 2,  1, 3, 2,  2, 0,      0x0},\n+\t{157500000, 157500000,  1,  105, 0, 2, 2,  1, 0, 3,  4, 0,      0x0},\n+\t{157500000, 196875000,  1,  197, 2, 1, 1, 15, 0, 1,  1, 0,      0x0},\n+\t{162000000, 162000000,  1,   54, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{162000000, 202500000,  2,  135, 0, 1, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{175500000, 175500000,  1,  117, 0, 2, 2,  1, 0, 3,  4, 0,      0x0},\n+\t{175500000, 219375000,  1,   73, 0, 1, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{179500000, 179500000,  3,  359, 0, 2, 2,  1, 0, 3,  4, 0,      0x0},\n+\t{179500000, 224375000,  1,   75, 0, 1, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{182750000, 182750000,  1,   91, 2, 0, 0,  1, 1, 2,  2, 0, 0x600000},\n+\t{182750000, 228437500,  1,  152, 0, 2, 2,  1, 3, 2,  2, 0, 0x4aaab0},\n+\t{182750000, 228437500,  1,  152, 0, 2, 2,  1, 3, 2,  2, 0, 0x4aaab0},\n+\t{187000000, 187000000,  2,  187, 2, 0, 0,  1, 1, 2,  2, 0,      0x0},\n+\t{187000000, 233750000,  1,   39, 0, 0, 0,  1, 3, 0,  0, 1,      0x0},\n+\t{187250000, 187250000,  3,  280, 2, 0, 0,  1, 1, 2,  2, 0, 0xe00000},\n+\t{187250000, 234062500,  1,  156, 0, 2, 2,  1, 3, 2,  2, 0,  0xaaab0},\n+\t{189000000, 189000000,  1,   63, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{189000000, 236250000,  1,   79, 0, 1, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{193250000, 193250000,  3,  289, 2, 0, 0,  1, 1, 2,  2, 0, 0xe00000},\n+\t{193250000, 241562500,  1,  161, 0, 2, 2,  1, 3, 2,  2, 0,  0xaaab0},\n+\t{202500000, 202500000,  2,  135, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{202500000, 253125000,  1,  169, 0, 2, 2,  1, 3, 2,  2, 0,      0x0},\n+\t{204750000, 204750000,  4,  273, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{204750000, 255937500,  1,  171, 0, 2, 2,  1, 3, 2,  2, 0,      0x0},\n+\t{208000000, 208000000,  1,  104, 2, 0, 0,  1, 1, 2,  2, 0,      0x0},\n+\t{208000000, 260000000,  1,  173, 0, 2, 2,  1, 3, 2,  2, 0,      0x0},\n+\t{214750000, 214750000,  1,  107, 2, 0, 0,  1, 1, 2,  2, 0, 0x600000},\n+\t{214750000, 268437500,  1,  178, 0, 2, 2,  1, 3, 2,  2, 0, 0xf5554f},\n+\t{218250000, 218250000,  4,  291, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{218250000, 272812500,  1,   91, 0, 1, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{229500000, 229500000,  2,  153, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{229500000, 286875000,  1,  191, 0, 2, 2,  1, 3, 2,  2, 0,      0x0},\n+\t{234000000, 234000000,  1,   39, 0, 0, 0,  1, 0, 1,  1, 0,      0x0},\n+\t{234000000, 292500000,  1,  195, 0, 2, 2,  1, 3, 2,  2, 0,      0x0},\n+\t{241500000, 241500000,  2,  161, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{241500000, 301875000,  1,  201, 0, 2, 2,  1, 3, 2,  2, 0,      0x0},\n+\t{245250000, 245250000,  4,  327, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{245250000, 306562500,  1,   51, 0, 0, 0,  1, 3, 0,  0, 1,      0x0},\n+\t{245500000, 245500000,  4,  491, 2, 0, 0,  1, 1, 2,  2, 0,      0x0},\n+\t{245500000, 306875000,  1,   51, 0, 0, 0,  1, 3, 0,  0, 1,      0x0},\n+\t{261000000, 261000000,  1,   87, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{261000000, 326250000,  1,  109, 0, 1, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{268250000, 268250000,  9,  402, 0, 0, 0,  1, 0, 1,  1, 0, 0x600000},\n+\t{268250000, 335312500,  1,  111, 0, 1, 1,  1, 3, 1,  1, 0, 0xc5554f},\n+\t{268500000, 268500000,  2,  179, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{268500000, 335625000,  1,   56, 0, 0, 0,  1, 3, 0,  0, 1,      0x0},\n+\t{281250000, 281250000,  4,  375, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{281250000, 351562500,  1,  117, 0, 3, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{288000000, 288000000,  1,   48, 0, 0, 0,  1, 0, 1,  1, 0,      0x0},\n+\t{288000000, 360000000,  1,   60, 0, 2, 0,  1, 3, 0,  0, 1,      0x0},\n+\t{296703000, 296703000,  1,   49, 0, 0, 0,  1, 0, 1,  1, 0, 0x7353f7},\n+\t{296703000, 370878750,  1,  123, 0, 3, 1,  1, 3, 1,  1, 0, 0xa051eb},\n+\t{297000000, 297000000,  1,   99, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{297000000, 371250000,  4,  495, 0, 3, 1,  1, 3, 1,  1, 0,      0x0},\n+\t{312250000, 312250000,  9,  468, 0, 0, 0,  1, 0, 1,  1, 0, 0x600000},\n+\t{312250000, 390312500,  1,  130, 0, 3, 1,  1, 3, 1,  1, 0, 0x1aaab0},\n+\t{317000000, 317000000,  3,  317, 0, 1, 1,  1, 0, 2,  2, 0,      0x0},\n+\t{317000000, 396250000,  1,   66, 0, 2, 0,  1, 3, 0,  0, 1,      0x0},\n+\t{319750000, 319750000,  3,  159, 0, 0, 0,  1, 0, 1,  1, 0, 0xe00000},\n+\t{319750000, 399687500,  3,  199, 0, 2, 0,  1, 3, 0,  0, 1, 0xd80000},\n+\t{333250000, 333250000,  9,  499, 0, 0, 0,  1, 0, 1,  1, 0, 0xe00000},\n+\t{333250000, 416562500,  1,  138, 0, 3, 1,  1, 3, 1,  1, 0, 0xdaaab0},\n+\t{348500000, 348500000,  9,  522, 0, 2, 0,  1, 0, 1,  1, 0, 0xc00000},\n+\t{348500000, 435625000,  1,  145, 0, 3, 1,  1, 3, 1,  1, 0, 0x35554f},\n+\t{356500000, 356500000,  9,  534, 0, 2, 0,  1, 0, 1,  1, 0, 0xc00000},\n+\t{356500000, 445625000,  1,  148, 0, 3, 1,  1, 3, 1,  1, 0, 0x8aaab0},\n+\t{380500000, 380500000,  9,  570, 0, 2, 0,  1, 0, 1,  1, 0, 0xc00000},\n+\t{380500000, 475625000,  1,  158, 0, 3, 1,  1, 3, 1,  1, 0, 0x8aaab0},\n+\t{443250000, 443250000,  1,   73, 0, 2, 0,  1, 0, 1,  1, 0, 0xe00000},\n+\t{443250000, 554062500,  1,   92, 0, 2, 0,  1, 3, 0,  0, 1, 0x580000},\n+\t{505250000, 505250000,  9,  757, 0, 2, 0,  1, 0, 1,  1, 0, 0xe00000},\n+\t{552750000, 552750000,  3,  276, 0, 2, 0,  1, 0, 1,  1, 0, 0x600000},\n+\t{593407000, 296703500,  3,  296, 0, 1, 1,  1, 0, 1,  1, 0, 0xb41893},\n+\t{593407000, 370879375,  4,  494, 0, 3, 1,  1, 3, 0,  0, 1, 0x817e4a},\n+\t{593407000, 593407000,  3,  296, 0, 2, 0,  1, 0, 1,  1, 0, 0xb41893},\n+\t{594000000, 297000000,  1,   99, 0, 1, 1,  1, 0, 1,  1, 0,      0x0},\n+\t{594000000, 371250000,  4,  495, 0, 3, 1,  1, 3, 0,  0, 1,      0x0},\n+\t{594000000, 594000000,  1,   99, 0, 2, 0,  1, 0, 1,  1, 0,      0x0},\n \t{ /* sentinel */ }\n };\n \n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Tue, 1 Jun 2021 19:24:37 +0200\nSubject: [PATCH] drm/rockchip: allow 4096px width modes\n\nThere is not reason to limit vop output to 3840px width modes.\nAlso drop the limitation from dw_hdmi_rockchip_mode_valid, since\nthe max dimenstions of the actual vop version is validated in\nvop_crtc_mode_valid anyways.\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\nindex ef0a078c22f4..49619f794061 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n@@ -424,8 +424,8 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win,\n \tif (info->is_yuv)\n \t\tis_yuv = true;\n \n-\tif (dst_w > 3840) {\n-\t\tDRM_DEV_ERROR(vop->dev, \"Maximum dst width (3840) exceeded\\n\");\n+\tif (dst_w > 4096) {\n+\t\tDRM_DEV_ERROR(vop->dev, \"Maximum dst width (4096) exceeded\\n\");\n \t\treturn;\n \t}\n \n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Tue, 1 Oct 2019 20:52:42 +0000\nSubject: [PATCH] media: cec-adap: add debounce support when setting an invalid\n phys addr\n\nWhen EDID is refreshed, HDMI cable is unplugged/replugged or\nan AVR is power cycled the CEC phys addr gets invalidated.\n\nThis can cause some disruption of CEC communication when\nadapter is being reconfigured.\n\nAdd a debounce_ms module option that can be used to debounce setting\nan invalid phys addr. Default is not to use debouncing.\n\nUsing a configured debounce_ms of e.g. 5000 ms, cec reconfiguring\ncould be avoided when AVR was power cycled on my setup.\n\nPower off AVR (default cec.debounce_ms=0):\n[  101.536866] cec-dw_hdmi: new physical address f.f.f.f\n[  102.495686] cec-dw_hdmi: new physical address 2.1.0.0\n[  102.495913] cec-dw_hdmi: physical address: 2.1.0.0, claim 1 logical addresses\n[  102.628574] cec-dw_hdmi: config: la 1 pa 2.1.0.0\n[  105.130115] cec-dw_hdmi: new physical address f.f.f.f\n[  106.979705] cec-dw_hdmi: new physical address 2.1.0.0\n[  106.979872] cec-dw_hdmi: physical address: 2.1.0.0, claim 1 logical addresses\n[  107.112399] cec-dw_hdmi: config: la 1 pa 2.1.0.0\n[  108.979408] cec-dw_hdmi: reported physical address 2.0.0.0 for logical address 5\n[  109.205386] cec-dw_hdmi: reported physical address 2.0.0.0 for logical address 11\n\nPower on AVR (default cec.debounce_ms=0):\n[  158.398447] cec-dw_hdmi: new physical address f.f.f.f\n[  161.977714] cec-dw_hdmi: new physical address 2.1.0.0\n[  161.978766] cec-dw_hdmi: physical address: 2.1.0.0, claim 1 logical addresses\n[  162.115624] cec-dw_hdmi: config: la 1 pa 2.1.0.0\n[  162.402750] cec-dw_hdmi: new physical address f.f.f.f\n[  162.403389] cec-dw_hdmi: cec_transmit_msg_fh: adapter is unconfigured\n[  162.886757] cec-dw_hdmi: new physical address 2.1.0.0\n[  162.886964] cec-dw_hdmi: physical address: 2.1.0.0, claim 1 logical addresses\n[  163.510725] cec-dw_hdmi: config: la 1 pa 2.1.0.0\n[  173.034200] cec-dw_hdmi: message 10 89 02 05 timed out\n\nPower off AVR (cec.debounce_ms=5000):\n[  251.720471] cec-dw_hdmi: reported physical address 2.0.0.0 for logical address 5\n[  251.922432] cec-dw_hdmi: reported physical address 2.0.0.0 for logical address 11\n\nPower on AVR (cec.debounce_ms=5000):\n[  291.154262] cec-dw_hdmi: reported physical address 2.0.0.0 for logical address 5\n[  291.296199] cec-dw_hdmi: reported physical address 2.0.0.0 for logical address 11\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/media/cec/core/cec-adap.c |  9 ++++++++-\n drivers/media/cec/core/cec-core.c | 18 ++++++++++++++++++\n drivers/media/cec/core/cec-priv.h |  1 +\n include/media/cec.h               |  2 ++\n 4 files changed, 29 insertions(+), 1 deletion(-)\n\ndiff --git a/drivers/media/cec/core/cec-adap.c b/drivers/media/cec/core/cec-adap.c\nindex 41a79293ee02..542ab1425339 100644\n--- a/drivers/media/cec/core/cec-adap.c\n+++ b/drivers/media/cec/core/cec-adap.c\n@@ -1674,8 +1674,15 @@ void cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block)\n \tif (IS_ERR_OR_NULL(adap))\n \t\treturn;\n \n+\tcancel_delayed_work_sync(&adap->debounce_work);\n+\n \tmutex_lock(&adap->lock);\n-\t__cec_s_phys_addr(adap, phys_addr, block);\n+\tif (cec_debounce_ms > 0 && !block && phys_addr == CEC_PHYS_ADDR_INVALID &&\n+\t    adap->phys_addr != phys_addr)\n+\t\tschedule_delayed_work(&adap->debounce_work,\n+\t\t\t\t      msecs_to_jiffies(cec_debounce_ms));\n+\telse\n+\t\t__cec_s_phys_addr(adap, phys_addr, block);\n \tmutex_unlock(&adap->lock);\n }\n EXPORT_SYMBOL_GPL(cec_s_phys_addr);\ndiff --git a/drivers/media/cec/core/cec-core.c b/drivers/media/cec/core/cec-core.c\nindex af358e901b5f..bece8c56e5af 100644\n--- a/drivers/media/cec/core/cec-core.c\n+++ b/drivers/media/cec/core/cec-core.c\n@@ -40,6 +40,10 @@ static bool debug_phys_addr;\n module_param(debug_phys_addr, bool, 0644);\n MODULE_PARM_DESC(debug_phys_addr, \"add CEC_CAP_PHYS_ADDR if set\");\n \n+int cec_debounce_ms;\n+module_param_named(debounce_ms, cec_debounce_ms, int, 0644);\n+MODULE_PARM_DESC(debounce_ms, \"debounce invalid phys addr\");\n+\n static dev_t cec_dev_t;\n \n /* Active devices */\n@@ -188,6 +192,8 @@ static void cec_devnode_unregister(struct cec_adapter *adap)\n \n \tmutex_unlock(&devnode->lock);\n \n+\tcancel_delayed_work_sync(&adap->debounce_work);\n+\n \tmutex_lock(&adap->lock);\n \t__cec_s_phys_addr(adap, CEC_PHYS_ADDR_INVALID, false);\n \t__cec_s_log_addrs(adap, NULL, false);\n@@ -246,6 +252,17 @@ static const struct file_operations cec_error_inj_fops = {\n };\n #endif\n \n+static void cec_s_phys_addr_debounce(struct work_struct *work)\n+{\n+\tstruct delayed_work *delayed_work = to_delayed_work(work);\n+\tstruct cec_adapter *adap =\n+\t\tcontainer_of(delayed_work, struct cec_adapter, debounce_work);\n+\n+\tmutex_lock(&adap->lock);\n+\t__cec_s_phys_addr(adap, CEC_PHYS_ADDR_INVALID, false);\n+\tmutex_unlock(&adap->lock);\n+}\n+\n struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,\n \t\t\t\t\t void *priv, const char *name, u32 caps,\n \t\t\t\t\t u8 available_las)\n@@ -283,6 +300,7 @@ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,\n \tINIT_LIST_HEAD(&adap->transmit_queue);\n \tINIT_LIST_HEAD(&adap->wait_queue);\n \tinit_waitqueue_head(&adap->kthread_waitq);\n+\tINIT_DELAYED_WORK(&adap->debounce_work, cec_s_phys_addr_debounce);\n \n \t/* adap->devnode initialization */\n \tINIT_LIST_HEAD(&adap->devnode.fhs);\ndiff --git a/drivers/media/cec/core/cec-priv.h b/drivers/media/cec/core/cec-priv.h\nindex b78df931aa74..ebbea63ea9de 100644\n--- a/drivers/media/cec/core/cec-priv.h\n+++ b/drivers/media/cec/core/cec-priv.h\n@@ -37,6 +37,7 @@ static inline bool msg_is_raw(const struct cec_msg *msg)\n \n /* cec-core.c */\n extern int cec_debug;\n+extern int cec_debounce_ms;\n int cec_get_device(struct cec_devnode *devnode);\n void cec_put_device(struct cec_devnode *devnode);\n \ndiff --git a/include/media/cec.h b/include/media/cec.h\nindex abee41ae02d0..544eedb5d671 100644\n--- a/include/media/cec.h\n+++ b/include/media/cec.h\n@@ -236,6 +236,8 @@ struct cec_adapter {\n \tstruct task_struct *kthread;\n \twait_queue_head_t kthread_waitq;\n \n+\tstruct delayed_work debounce_work;\n+\n \tconst struct cec_adap_ops *ops;\n \tvoid *priv;\n \tu32 capabilities;\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Fri, 22 Oct 2021 11:17:30 +0200\nSubject: [PATCH] WIP: drm/bridge: synopsys: Fix CEC not working after\n power-cyclying\n\nThis fixes standby -> power-on on Rockchip platform for, at least,\nRK3288/RK3328/RK3399 where CEC wasn't working after powering on again.\nIt might differ for other phy implementations:\nThe whole HPD-detection part shoud be reworked and we should in general\navoid to rely in RX_SENSE phy status (at least for HDMI), since it differs\ndepending on sink's implementation.\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 14 ++++++++------\n 1 file changed, 8 insertions(+), 6 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\nindex 92e621f2714f..7551e3ab77d6 100644\n--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c\n@@ -3179,12 +3179,6 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)\n \t\t\t\t       phy_stat & HDMI_PHY_HPD,\n \t\t\t\t       phy_stat & HDMI_PHY_RX_SENSE);\n \n-\t\tif ((phy_stat & (HDMI_PHY_RX_SENSE | HDMI_PHY_HPD)) == 0) {\n-\t\t\tmutex_lock(&hdmi->cec_notifier_mutex);\n-\t\t\tcec_notifier_phys_addr_invalidate(hdmi->cec_notifier);\n-\t\t\tmutex_unlock(&hdmi->cec_notifier_mutex);\n-\t\t}\n-\n \t\tif (phy_stat & HDMI_PHY_HPD)\n \t\t\tstatus = connector_status_connected;\n \n@@ -3201,6 +3195,14 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)\n \t\t\tdrm_helper_hpd_irq_event(hdmi->bridge.dev);\n \t\t\tdrm_bridge_hpd_notify(&hdmi->bridge, status);\n \t\t}\n+\n+\t\tif (status == connector_status_disconnected &&\n+\t\t    (phy_stat & HDMI_PHY_RX_SENSE) &&\n+\t\t    (phy_int_pol & HDMI_PHY_RX_SENSE)) {\n+\t\t\tmutex_lock(&hdmi->cec_notifier_mutex);\n+\t\t\tcec_notifier_phys_addr_invalidate(hdmi->cec_notifier);\n+\t\t\tmutex_unlock(&hdmi->cec_notifier_mutex);\n+\t\t}\n \t}\n \n \thdmi_writeb(hdmi, intr_stat, HDMI_IH_PHY_STAT0);\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Fri, 9 Oct 2020 15:24:53 +0000\nSubject: [PATCH] drm/rockchip: vop: create planes in window order\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 36 +++------------------\n 1 file changed, 4 insertions(+), 32 deletions(-)\n\ndiff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\nindex 49619f794061..9915bf124374 100644\n--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c\n@@ -2023,19 +2023,10 @@ static int vop_create_crtc(struct vop *vop)\n \tint ret;\n \tint i;\n \n-\t/*\n-\t * Create drm_plane for primary and cursor planes first, since we need\n-\t * to pass them to drm_crtc_init_with_planes, which sets the\n-\t * \"possible_crtcs\" to the newly initialized crtc.\n-\t */\n \tfor (i = 0; i < vop_data->win_size; i++) {\n \t\tstruct vop_win *vop_win = &vop->win[i];\n \t\tconst struct vop_win_data *win_data = vop_win->data;\n \n-\t\tif (win_data->type != DRM_PLANE_TYPE_PRIMARY &&\n-\t\t    win_data->type != DRM_PLANE_TYPE_CURSOR)\n-\t\t\tcontinue;\n-\n \t\tret = drm_universal_plane_init(vop->drm_dev, &vop_win->base,\n \t\t\t\t\t       0, &vop_plane_funcs,\n \t\t\t\t\t       win_data->phy->data_formats,\n@@ -2068,32 +2059,13 @@ static int vop_create_crtc(struct vop *vop)\n \t\tdrm_crtc_enable_color_mgmt(crtc, 0, false, vop_data->lut_size);\n \t}\n \n-\t/*\n-\t * Create drm_planes for overlay windows with possible_crtcs restricted\n-\t * to the newly created crtc.\n-\t */\n+\t/* Set possible_crtcs to the newly created crtc for overlay windows */\n \tfor (i = 0; i < vop_data->win_size; i++) {\n \t\tstruct vop_win *vop_win = &vop->win[i];\n-\t\tconst struct vop_win_data *win_data = vop_win->data;\n-\t\tunsigned long possible_crtcs = drm_crtc_mask(crtc);\n-\n-\t\tif (win_data->type != DRM_PLANE_TYPE_OVERLAY)\n-\t\t\tcontinue;\n \n-\t\tret = drm_universal_plane_init(vop->drm_dev, &vop_win->base,\n-\t\t\t\t\t       possible_crtcs,\n-\t\t\t\t\t       &vop_plane_funcs,\n-\t\t\t\t\t       win_data->phy->data_formats,\n-\t\t\t\t\t       win_data->phy->nformats,\n-\t\t\t\t\t       win_data->phy->format_modifiers,\n-\t\t\t\t\t       win_data->type, NULL);\n-\t\tif (ret) {\n-\t\t\tDRM_DEV_ERROR(vop->dev, \"failed to init overlay %d\\n\",\n-\t\t\t\t      ret);\n-\t\t\tgoto err_cleanup_crtc;\n-\t\t}\n-\t\tdrm_plane_helper_add(&vop_win->base, &plane_helper_funcs);\n-\t\tvop_plane_add_properties(&vop_win->base, win_data);\n+\t\tplane = &vop_win->base;\n+\t\tif (plane->type == DRM_PLANE_TYPE_OVERLAY)\n+\t\t\tplane->possible_crtcs = drm_crtc_mask(crtc);\n \t}\n \n \tport = of_get_child_by_name(dev->of_node, \"port\");\n"
  },
  {
    "path": "projects/Rockchip/patches/linux/default/linux-1001-v4l2-rockchip.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sat, 23 May 2020 10:16:01 +0000\nSubject: [PATCH] WIP: media: rkvdec: pm runtime dont use autosuspend before\n disable and cleanup\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\n---\n drivers/staging/media/rkvdec/rkvdec.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c\nindex 4f5436c89e08..eaf2f133a264 100644\n--- a/drivers/staging/media/rkvdec/rkvdec.c\n+++ b/drivers/staging/media/rkvdec/rkvdec.c\n@@ -1125,9 +1125,9 @@ static int rkvdec_remove(struct platform_device *pdev)\n {\n \tstruct rkvdec_dev *rkvdec = platform_get_drvdata(pdev);\n \n-\trkvdec_v4l2_cleanup(rkvdec);\n-\tpm_runtime_disable(&pdev->dev);\n \tpm_runtime_dont_use_autosuspend(&pdev->dev);\n+\tpm_runtime_disable(&pdev->dev);\n+\trkvdec_v4l2_cleanup(rkvdec);\n \treturn 0;\n }\n \n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Randy Li <ayaka@soulik.info>\nDate: Sun, 6 Jan 2019 01:48:37 +0800\nSubject: [PATCH] soc: rockchip: power-domain: export idle request\n\nWe need to put the power status of HEVC IP into IDLE unless\nwe can't reset that IP or the SoC would crash down.\nrockchip_pmu_idle_request(dev, true)---> enter idle\nrockchip_pmu_idle_request(dev, false)---> exit idle\n\nSigned-off-by: Caesar Wang <wxt@rock-chips.com>\nSigned-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>\nSigned-off-by: Randy Li <ayaka@soulik.info>\n---\n drivers/soc/rockchip/pm_domains.c | 23 +++++++++++++++++++++++\n include/linux/rockchip_pmu.h      | 15 +++++++++++++++\n include/soc/rockchip/pm_domains.h |  6 ++++++\n 3 files changed, 44 insertions(+)\n create mode 100644 include/linux/rockchip_pmu.h\n\ndiff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c\nindex 89795abac951..ffb5d62c9d52 100644\n--- a/drivers/soc/rockchip/pm_domains.c\n+++ b/drivers/soc/rockchip/pm_domains.c\n@@ -309,6 +309,29 @@ static int rockchip_pmu_set_idle_request(struct rockchip_pm_domain *pd,\n \treturn 0;\n }\n \n+int rockchip_pmu_idle_request(struct device *dev, bool idle)\n+{\n+\tstruct generic_pm_domain *genpd;\n+\tstruct rockchip_pm_domain *pd;\n+\tint ret;\n+\n+\tif (IS_ERR_OR_NULL(dev))\n+\t\treturn -EINVAL;\n+\n+\tif (IS_ERR_OR_NULL(dev->pm_domain))\n+\t\treturn -EINVAL;\n+\n+\tgenpd = pd_to_genpd(dev->pm_domain);\n+\tpd = to_rockchip_pd(genpd);\n+\n+\tmutex_lock(&pd->pmu->mutex);\n+\tret = rockchip_pmu_set_idle_request(pd, idle);\n+\tmutex_unlock(&pd->pmu->mutex);\n+\n+\treturn ret;\n+}\n+EXPORT_SYMBOL(rockchip_pmu_idle_request);\n+\n static int rockchip_pmu_save_qos(struct rockchip_pm_domain *pd)\n {\n \tint i;\ndiff --git a/include/linux/rockchip_pmu.h b/include/linux/rockchip_pmu.h\nnew file mode 100644\nindex 000000000000..720b3314e71a\n--- /dev/null\n+++ b/include/linux/rockchip_pmu.h\n@@ -0,0 +1,15 @@\n+/*\n+ * pm_domain.h - Definitions and headers related to device power domains.\n+ *\n+ * Copyright (C) 2017 Randy Li <ayaka@soulik.info>.\n+ *\n+ * This file is released under the GPLv2.\n+ */\n+\n+#ifndef _LINUX_ROCKCHIP_PM_H\n+#define _LINUX_ROCKCHIP_PM_H\n+#include <linux/device.h>\n+\n+int rockchip_pmu_idle_request(struct device *dev, bool idle);\n+\n+#endif /* _LINUX_ROCKCHIP_PM_H */\ndiff --git a/include/soc/rockchip/pm_domains.h b/include/soc/rockchip/pm_domains.h\nindex 7dbd941fc937..c5a59dd71754 100644\n--- a/include/soc/rockchip/pm_domains.h\n+++ b/include/soc/rockchip/pm_domains.h\n@@ -10,6 +10,7 @@\n \n int rockchip_pmu_block(void);\n void rockchip_pmu_unblock(void);\n+int rockchip_pmu_idle_request(struct device *dev, bool idle);\n \n #else /* CONFIG_ROCKCHIP_PM_DOMAINS */\n \n@@ -20,6 +21,11 @@ static inline int rockchip_pmu_block(void)\n \n static inline void rockchip_pmu_unblock(void) { }\n \n+static inline int rockchip_pmu_idle_request(struct device *dev, bool idle)\n+{\n+\treturn -ENOTSUPP;\n+}\n+\n #endif /* CONFIG_ROCKCHIP_PM_DOMAINS */\n \n #endif /* __SOC_ROCKCHIP_PM_DOMAINS_H__ */\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Wed, 20 May 2020 17:04:47 +0200\nSubject: [PATCH] WIP: media: rkvdec: implement reset controls\n\n---\n .../bindings/media/rockchip,vdec.yaml         | 19 +++++++\n drivers/staging/media/rkvdec/rkvdec-regs.h    |  5 ++\n drivers/staging/media/rkvdec/rkvdec.c         | 53 +++++++++++++++++++\n drivers/staging/media/rkvdec/rkvdec.h         | 11 +++-\n 4 files changed, 87 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml\nindex 3bcfb8e12333..dd6958df1de8 100644\n--- a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml\n+++ b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml\n@@ -53,6 +53,18 @@ properties:\n   iommus:\n     maxItems: 1\n \n+  resets:\n+    maxItems: 6\n+\n+  reset-names:\n+    items:\n+      - const: video_h\n+      - const: video_a\n+      - const: video_core\n+      - const: video_cabac\n+      - const: niu_a\n+      - const: niu_h\n+\n required:\n   - compatible\n   - reg\n@@ -60,6 +72,8 @@ required:\n   - clocks\n   - clock-names\n   - power-domains\n+  - resets\n+  - reset-names\n \n additionalProperties: false\n \n@@ -78,6 +92,11 @@ examples:\n         clock-names = \"axi\", \"ahb\", \"cabac\", \"core\";\n         power-domains = <&power RK3399_PD_VDU>;\n         iommus = <&vdec_mmu>;\n+        resets = <&cru SRST_H_VDU>, <&cru SRST_A_VDU>,\n+                 <&cru SRST_VDU_CORE>, <&cru SRST_VDU_CA>,\n+                 <&cru SRST_A_VDU_NOC>, <&cru SRST_H_VDU_NOC>;\n+        reset-names = \"video_h\", \"video_a\", \"video_core\", \"video_cabac\",\n+                      \"niu_a\", \"niu_h\";\n     };\n \n ...\ndiff --git a/drivers/staging/media/rkvdec/rkvdec-regs.h b/drivers/staging/media/rkvdec/rkvdec-regs.h\nindex 15b9bee92016..3acc914888f6 100644\n--- a/drivers/staging/media/rkvdec/rkvdec-regs.h\n+++ b/drivers/staging/media/rkvdec/rkvdec-regs.h\n@@ -28,6 +28,11 @@\n #define RKVDEC_SOFTRST_EN_P\t\t\t\tBIT(20)\n #define RKVDEC_FORCE_SOFTRESET_VALID\t\t\tBIT(21)\n #define RKVDEC_SOFTRESET_RDY\t\t\t\tBIT(22)\n+#define RKVDEC_ERR_MASK\t\t\t\t\t(RKVDEC_BUS_STA \\\n+\t\t\t\t\t\t\t | RKVDEC_ERR_STA \\\n+\t\t\t\t\t\t\t | RKVDEC_TIMEOUT_STA \\\n+\t\t\t\t\t\t\t | RKVDEC_BUF_EMPTY_STA \\\n+\t\t\t\t\t\t\t | RKVDEC_COLMV_REF_ERR_STA )\n \n #define RKVDEC_REG_SYSCTRL\t\t\t\t0x008\n #define RKVDEC_IN_ENDIAN\t\t\t\tBIT(0)\ndiff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c\nindex eaf2f133a264..f55abb7c377f 100644\n--- a/drivers/staging/media/rkvdec/rkvdec.c\n+++ b/drivers/staging/media/rkvdec/rkvdec.c\n@@ -10,12 +10,15 @@\n  */\n \n #include <linux/clk.h>\n+#include <linux/delay.h>\n #include <linux/interrupt.h>\n #include <linux/module.h>\n #include <linux/of.h>\n #include <linux/platform_device.h>\n #include <linux/pm.h>\n #include <linux/pm_runtime.h>\n+#include <linux/reset.h>\n+#include <linux/rockchip_pmu.h>\n #include <linux/slab.h>\n #include <linux/videodev2.h>\n #include <linux/workqueue.h>\n@@ -717,6 +720,11 @@ static void rkvdec_job_finish(struct rkvdec_ctx *ctx,\n \n \tpm_runtime_mark_last_busy(rkvdec->dev);\n \tpm_runtime_put_autosuspend(rkvdec->dev);\n+\n+\tif (result == VB2_BUF_STATE_ERROR &&\n+\t    rkvdec->reset_mask == RESET_NONE)\n+\t\trkvdec->reset_mask |= RESET_SOFT;\n+\n \trkvdec_job_finish_no_pm(ctx, result);\n }\n \n@@ -754,6 +762,33 @@ static void rkvdec_device_run(void *priv)\n \n \tif (WARN_ON(!desc))\n \t\treturn;\n+\tif (rkvdec->reset_mask != RESET_NONE) {\n+\n+\t\tif (rkvdec->reset_mask & RESET_SOFT) {\n+\t\t\twritel(RKVDEC_SOFTRST_EN_P,\n+\t\t\t       rkvdec->regs + RKVDEC_REG_INTERRUPT);\n+\t\t\tudelay(RKVDEC_RESET_DELAY);\n+\t\t\tif (readl(rkvdec->regs + RKVDEC_REG_INTERRUPT)\n+\t\t\t    & RKVDEC_SOFTRESET_RDY)\n+\t\t\t\tdev_info_ratelimited(rkvdec->dev,\n+\t\t\t\t\t\t      \"softreset failed\\n\");\n+\t\t}\n+\n+\t\tif (rkvdec->reset_mask & RESET_HARD) {\n+\t\t\trockchip_pmu_idle_request(rkvdec->dev, true);\n+\t\t\tret = reset_control_assert(rkvdec->rstc);\n+\t\t\tif (!ret) {\n+\t\t\t\tudelay(RKVDEC_RESET_DELAY);\n+\t\t\t\tret = reset_control_deassert(rkvdec->rstc);\n+\t\t\t}\n+\t\t\trockchip_pmu_idle_request(rkvdec->dev, false);\n+\t\t\tif (ret)\n+\t\t\t\tdev_notice_ratelimited(rkvdec->dev,\n+\t\t\t\t\t\t\t\"hardreset failed\\n\");\n+\t\t}\n+\t\trkvdec->reset_mask = RESET_NONE;\n+\t\tpm_runtime_suspend(rkvdec->dev);\n+\t}\n \n \tret = pm_runtime_resume_and_get(rkvdec->dev);\n \tif (ret < 0) {\n@@ -1020,6 +1055,11 @@ static irqreturn_t rkvdec_irq_handler(int irq, void *priv)\n \tif (cancel_delayed_work(&rkvdec->watchdog_work)) {\n \t\tstruct rkvdec_ctx *ctx;\n \n+\t\tif (state == VB2_BUF_STATE_ERROR) {\n+\t\t\trkvdec->reset_mask |= (status & RKVDEC_ERR_MASK) ?\n+\t\t\t\t\t\tRESET_HARD : RESET_SOFT;\n+\t\t}\n+\n \t\tctx = v4l2_m2m_get_curr_priv(rkvdec->m2m_dev);\n \t\trkvdec_job_finish(ctx, state);\n \t}\n@@ -1037,6 +1077,7 @@ static void rkvdec_watchdog_func(struct work_struct *work)\n \tctx = v4l2_m2m_get_curr_priv(rkvdec->m2m_dev);\n \tif (ctx) {\n \t\tdev_err(rkvdec->dev, \"Frame processing timed out!\\n\");\n+\t\trkvdec->reset_mask |= RESET_HARD;\n \t\twritel(RKVDEC_IRQ_DIS, rkvdec->regs + RKVDEC_REG_INTERRUPT);\n \t\twritel(0, rkvdec->regs + RKVDEC_REG_SYSCTRL);\n \t\trkvdec_job_finish(ctx, VB2_BUF_STATE_ERROR);\n@@ -1105,6 +1146,18 @@ static int rkvdec_probe(struct platform_device *pdev)\n \t\treturn ret;\n \t}\n \n+\n+\trkvdec->rstc = devm_reset_control_array_get(&pdev->dev, false, true);\n+\tif (IS_ERR(rkvdec->rstc)) {\n+\t\tdev_err(&pdev->dev,\n+\t\t\t\"get resets failed %ld\\n\", PTR_ERR(rkvdec->rstc));\n+\t\treturn PTR_ERR(rkvdec->rstc);\n+\t} else {\n+\t\tdev_dbg(&pdev->dev,\n+\t\t\t \"requested %d resets\\n\",\n+\t\t\t reset_control_get_count(&pdev->dev));\n+\t}\n+\n \tpm_runtime_set_autosuspend_delay(&pdev->dev, 100);\n \tpm_runtime_use_autosuspend(&pdev->dev);\n \tpm_runtime_enable(&pdev->dev);\ndiff --git a/drivers/staging/media/rkvdec/rkvdec.h b/drivers/staging/media/rkvdec/rkvdec.h\nindex b9e219438bc9..f02f79c405f0 100644\n--- a/drivers/staging/media/rkvdec/rkvdec.h\n+++ b/drivers/staging/media/rkvdec/rkvdec.h\n@@ -11,10 +11,11 @@\n #ifndef RKVDEC_H_\n #define RKVDEC_H_\n \n+#include <linux/clk.h>\n #include <linux/platform_device.h>\n+#include <linux/reset.h>\n #include <linux/videodev2.h>\n #include <linux/wait.h>\n-#include <linux/clk.h>\n \n #include <media/v4l2-ctrls.h>\n #include <media/v4l2-device.h>\n@@ -22,6 +23,12 @@\n #include <media/videobuf2-core.h>\n #include <media/videobuf2-dma-contig.h>\n \n+#define RESET_NONE\t\t0\n+#define RESET_SOFT\t\tBIT(0)\n+#define RESET_HARD\t\tBIT(1)\n+\n+#define RKVDEC_RESET_DELAY\t5\n+\n struct rkvdec_ctx;\n \n struct rkvdec_ctrl_desc {\n@@ -96,6 +103,8 @@ struct rkvdec_dev {\n \tvoid __iomem *regs;\n \tstruct mutex vdev_lock; /* serializes ioctls */\n \tstruct delayed_work watchdog_work;\n+\tstruct reset_control *rstc;\n+\tu8 reset_mask;\n };\n \n struct rkvdec_ctx {\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Tue, 18 Aug 2020 11:38:04 +0200\nSubject: [PATCH] WIP: arm64: dts: add resets to vdec for RK3399\n\n---\n arch/arm64/boot/dts/rockchip/rk3399.dtsi | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi\nindex 980b12cb0a49..6e3149e587c5 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi\n@@ -1345,6 +1348,11 @@ vdec: video-codec@ff660000 {\n \t\tclock-names = \"axi\", \"ahb\", \"cabac\", \"core\";\n \t\tiommus = <&vdec_mmu>;\n \t\tpower-domains = <&power RK3399_PD_VDU>;\n+\t\tresets = <&cru SRST_H_VDU>, <&cru SRST_A_VDU>,\n+\t\t\t <&cru SRST_VDU_CORE>, <&cru SRST_VDU_CA>,\n+\t\t\t <&cru SRST_A_VDU_NOC>, <&cru SRST_H_VDU_NOC>;\n+\t\treset-names = \"video_h\", \"video_a\", \"video_core\", \"video_cabac\",\n+\t\t\t       \"niu_a\", \"niu_h\";\n \t};\n \n \tvdec_mmu: iommu@ff660480 {\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Sat, 21 Aug 2021 16:12:36 +0200\nSubject: [PATCH] media: hantro: rockchip: Increase RK3288's max ACLK\n\nRequired to proper decode H.264@4K\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/media/platform/verisilicon/rockchip_vpu_hw.c | 14 +++++++++++---\n 1 file changed, 11 insertions(+), 3 deletions(-)\n\ndiff --git a/drivers/media/platform/verisilicon/rockchip_vpu_hw.c b/drivers/media/platform/verisilicon/rockchip_vpu_hw.c\nindex 8de6fd2e8eef..002b1a600f93 100644\n--- a/drivers/media/platform/verisilicon/rockchip_vpu_hw.c\n+++ b/drivers/media/platform/verisilicon/rockchip_vpu_hw.c\n@@ -15,7 +15,8 @@\n #include \"rockchip_vpu2_regs.h\"\n \n #define RK3066_ACLK_MAX_FREQ (300 * 1000 * 1000)\n-#define RK3288_ACLK_MAX_FREQ (400 * 1000 * 1000)\n+#define RK3288_ACLK_MAX_FREQ (600 * 1000 * 1000)\n+#define RK3399_ACLK_MAX_FREQ (400 * 1000 * 1000)\n \n /*\n  * Supported formats.\n@@ -346,13 +347,20 @@ static int rk3066_vpu_hw_init(struct hantro_dev *vpu)\n \treturn 0;\n }\n \n-static int rockchip_vpu_hw_init(struct hantro_dev *vpu)\n+static int rk3288_vpu_hw_init(struct hantro_dev *vpu)\n {\n \t/* Bump ACLK to max. possible freq. to improve performance. */\n \tclk_set_rate(vpu->clocks[0].clk, RK3288_ACLK_MAX_FREQ);\n \treturn 0;\n }\n \n+static int rockchip_vpu_hw_init(struct hantro_dev *vpu)\n+{\n+\t/* Bump ACLK to max. possible freq. to improve performance. */\n+\tclk_set_rate(vpu->clocks[0].clk, RK3399_ACLK_MAX_FREQ);\n+\treturn 0;\n+}\n+\n static void rk3066_vpu_dec_reset(struct hantro_ctx *ctx)\n {\n \tstruct hantro_dev *vpu = ctx->dev;\n@@ -592,7 +600,7 @@ const struct hantro_variant rk3288_vpu_variant = {\n \t.codec_ops = rk3288_vpu_codec_ops,\n \t.irqs = rockchip_vpu1_irqs,\n \t.num_irqs = ARRAY_SIZE(rockchip_vpu1_irqs),\n-\t.init = rockchip_vpu_hw_init,\n+\t.init = rk3288_vpu_hw_init,\n \t.clk_names = rockchip_vpu_clk_names,\n \t.num_clocks = ARRAY_SIZE(rockchip_vpu_clk_names)\n };\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Sun, 4 Jul 2021 15:19:44 +0200\nSubject: [PATCH] media: rkvdec: disable QoS for VP9 (corruptions on RK3328\n otherwise)\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/staging/media/rkvdec/rkvdec-regs.h | 2 ++\n drivers/staging/media/rkvdec/rkvdec-vp9.c  | 8 ++++++++\n 2 files changed, 10 insertions(+)\n\ndiff --git a/drivers/staging/media/rkvdec/rkvdec-regs.h b/drivers/staging/media/rkvdec/rkvdec-regs.h\nindex 3acc914888f6..265f5234f4eb 100644\n--- a/drivers/staging/media/rkvdec/rkvdec-regs.h\n+++ b/drivers/staging/media/rkvdec/rkvdec-regs.h\n@@ -222,6 +222,8 @@\n #define RKVDEC_REG_H264_ERR_E\t\t\t\t0x134\n #define RKVDEC_H264_ERR_EN_HIGHBITS(x)\t\t\t((x) & 0x3fffffff)\n \n+#define RKVDEC_QOS_CTRL\t\t\t\t\t0x18C\n+\n #define RKVDEC_REG_PREF_LUMA_CACHE_COMMAND\t\t0x410\n #define RKVDEC_REG_PREF_CHR_CACHE_COMMAND\t\t0x450\n \ndiff --git a/drivers/staging/media/rkvdec/rkvdec-vp9.c b/drivers/staging/media/rkvdec/rkvdec-vp9.c\nindex d8c1c0db15c7..a289bc968e91 100644\n--- a/drivers/staging/media/rkvdec/rkvdec-vp9.c\n+++ b/drivers/staging/media/rkvdec/rkvdec-vp9.c\n@@ -802,6 +802,7 @@ static int rkvdec_vp9_run(struct rkvdec_ctx *ctx)\n \tstruct rkvdec_dev *rkvdec = ctx->dev;\n \tstruct rkvdec_vp9_run run = { };\n \tint ret;\n+\tu32 reg;\n \n \tret = rkvdec_vp9_run_preamble(ctx, &run);\n \tif (ret) {\n@@ -823,6 +824,13 @@ static int rkvdec_vp9_run(struct rkvdec_ctx *ctx)\n \twritel(1, rkvdec->regs + RKVDEC_REG_PREF_CHR_CACHE_COMMAND);\n \n \twritel(0xe, rkvdec->regs + RKVDEC_REG_STRMD_ERR_EN);\n+\n+\t/* disable QOS for RK3328 - no effect on other SoCs */\n+\treg = readl(rkvdec->regs + RKVDEC_QOS_CTRL);\n+\treg |= 0xFFFF;\n+\treg &= (~BIT(12));\n+\twritel(reg, rkvdec->regs + RKVDEC_QOS_CTRL);\n+\n \t/* Start decoding! */\n \twritel(RKVDEC_INTERRUPT_DEC_E | RKVDEC_CONFIG_DEC_CLK_GATE_E |\n \t       RKVDEC_TIMEOUT_E | RKVDEC_BUF_EMPTY_E,\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Thu, 16 Jun 2022 13:18:22 +0200\nSubject: [PATCH] WIP: arm64: dts: add resets to vdec for RK3328\n\n---\n arch/arm64/boot/dts/rockchip/rk3328.dtsi | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi\nindex 5519347232f6..431c4ec198be 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi\n@@ -674,6 +674,11 @@ vdec: video-codec@ff360000 {\n \t\tassigned-clocks = <&cru ACLK_RKVDEC>, <&cru SCLK_VDEC_CABAC>,\n \t\t\t\t  <&cru SCLK_VDEC_CORE>;\n \t\tassigned-clock-rates = <400000000>, <400000000>, <300000000>;\n+\t\tresets = <&cru SRST_VDEC_H>, <&cru SRST_VDEC_A>,\n+\t\t\t <&cru SRST_VDEC_CORE>, <&cru SRST_VDEC_CABAC>,\n+\t\t\t <&cru SRST_VDEC_NIU_A>, <&cru SRST_VDEC_NIU_H>;\n+\t\treset-names = \"video_h\", \"video_a\", \"video_core\", \"video_cabac\",\n+\t\t\t       \"niu_a\", \"niu_h\";\n \t\tiommus = <&vdec_mmu>;\n \t\tpower-domains = <&power RK3328_PD_VIDEO>;\n \t};\n"
  },
  {
    "path": "projects/Rockchip/patches/linux/default/linux-1002-for-libreelec.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Wed, 2 Sep 2020 19:52:02 +0200\nSubject: [PATCH] arm64: dts: rockchip: add gpu powerdomain, gpu opp-table and\n cooling cell for RK3328\n\nNote: since the regulator that supplies the GPU usually also supplies\nother SoC components, we have to make sure voltage is never lower then\n1075 mV - also disable 500 MHz for now, since it will crash if rkvdec\nis running at the same time (voltage to high)\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n .../arm64/boot/dts/rockchip/rk3328-roc-cc.dts |  4 +++\n .../arm64/boot/dts/rockchip/rk3328-rock64.dts |  4 +++\n arch/arm64/boot/dts/rockchip/rk3328.dtsi      | 35 +++++++++++++++++++\n 3 files changed, 43 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts\nindex aa22a0c22265..51c7723d6762 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts\n+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts\n@@ -166,6 +166,10 @@ &gmac2io {\n \tstatus = \"okay\";\n };\n \n+&gpu {\n+\tmali-supply = <&vdd_logic>;\n+};\n+\n &hdmi {\n \tstatus = \"okay\";\n };\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts\nindex f69a38f42d2d..c198a8a7f95a 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts\n+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts\n@@ -162,6 +162,10 @@ &gmac2io {\n \tstatus = \"okay\";\n };\n \n+&gpu {\n+\tmali-supply = <&vdd_logic>;\n+};\n+\n &hdmi {\n \tstatus = \"okay\";\n };\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi\nindex 431c4ec198be..eec03adf0902 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi\n@@ -300,6 +300,11 @@ power: power-controller {\n \t\t\t#address-cells = <1>;\n \t\t\t#size-cells = <0>;\n \n+\t\t\tpower-domain@RK3328_PD_GPU {\n+\t\t\t\treg = <RK3328_PD_GPU>;\n+\t\t\t\tclocks = <&cru ACLK_GPU>;\n+\t\t\t\t#power-domain-cells = <0>;\n+\t\t\t};\n \t\t\tpower-domain@RK3328_PD_HEVC {\n \t\t\t\treg = <RK3328_PD_HEVC>;\n \t\t\t\t#power-domain-cells = <0>;\n@@ -539,6 +544,11 @@ map0 {\n \t\t\t\t\t\t\t <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;\n \t\t\t\t\tcontribution = <4096>;\n \t\t\t\t};\n+\t\t\t\tmap1 {\n+\t\t\t\t\ttrip = <&target>;\n+\t\t\t\t\tcooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;\n+\t\t\t\t\tcontribution = <4096>;\n+\t\t\t\t};\n \t\t\t};\n \t\t};\n \n@@ -620,7 +630,32 @@ gpu: gpu@ff300000 {\n \t\t\t\t  \"ppmmu1\";\n \t\tclocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>;\n \t\tclock-names = \"bus\", \"core\";\n+\t\toperating-points-v2 = <&gpu_opp_table>;\n+\t\tpower-domains = <&power RK3328_PD_GPU>;\n \t\tresets = <&cru SRST_GPU_A>;\n+\t\t#cooling-cells = <2>;\n+\t};\n+\n+\tgpu_opp_table: gpu-opp-table {\n+\t\tcompatible = \"operating-points-v2\";\n+\n+\t\topp-200000000 {\n+\t\t\topp-hz = /bits/ 64 <200000000>;\n+\t\t\topp-microvolt = <1075000>;\n+\t\t};\n+\t\topp-300000000 {\n+\t\t\topp-hz = /bits/ 64 <300000000>;\n+\t\t\topp-microvolt = <1075000>;\n+\t\t};\n+\t\topp-400000000 {\n+\t\t\topp-hz = /bits/ 64 <400000000>;\n+\t\t\topp-microvolt = <1075000>;\n+\t\t};\n+\t\topp-500000000 {\n+\t\t\topp-hz = /bits/ 64 <500000000>;\n+\t\t\topp-microvolt = <1150000>;\n+\t\t\tstatus = \"disabled\";\n+\t\t};\n \t};\n \n \th265e_mmu: iommu@ff330200 {\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Tue, 2 Feb 2021 17:22:21 +0200\nSubject: [PATCH] ARM: dts: RK3288 miqi add hdmi sound nodes\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n arch/arm/boot/dts/rk3288-miqi.dts | 20 ++++++++++++++++++++\n 1 file changed, 20 insertions(+)\n\ndiff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts\nindex 713f55e143c6..8d30c49f406e 100644\n--- a/arch/arm/boot/dts/rk3288-miqi.dts\n+++ b/arch/arm/boot/dts/rk3288-miqi.dts\n@@ -78,6 +78,21 @@ vcc_sys: vsys-regulator {\n \t\tregulator-always-on;\n \t\tregulator-boot-on;\n \t};\n+\n+\tsound {\n+\t\tcompatible = \"simple-audio-card\";\n+\t\tsimple-audio-card,format = \"i2s\";\n+\t\tsimple-audio-card,name = \"HDMI\";\n+\t\tsimple-audio-card,mclk-fs = <512>;\n+\n+\t\tsimple-audio-card,codec {\n+\t\t\tsound-dai = <&hdmi>;\n+\t\t};\n+\n+\t\tsimple-audio-card,cpu {\n+\t\t\tsound-dai = <&i2s>;\n+\t\t};\n+\t};\n };\n \n &cpu0 {\n@@ -284,6 +299,11 @@ &i2c5 {\n \tstatus = \"okay\";\n };\n \n+&i2s {\n+\t#sound-dai-cells = <0>;\n+\tstatus = \"okay\";\n+};\n+\n &io_domains {\n \tstatus = \"okay\";\n \n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Fri, 2 Apr 2021 17:54:22 +0200\nSubject: [PATCH] ARM/arm64: dts: rockchip: align sound card names\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n arch/arm/boot/dts/rk3288-tinker.dtsi     | 2 +-\n arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi\nindex 09618bb7d872..db9106a3dd22 100644\n--- a/arch/arm/boot/dts/rk3288-tinker.dtsi\n+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi\n@@ -73,7 +73,7 @@ sdio_pwrseq: sdio-pwrseq {\n \tsound {\n \t\tcompatible = \"simple-audio-card\";\n \t\tsimple-audio-card,format = \"i2s\";\n-\t\tsimple-audio-card,name = \"rockchip,tinker-codec\";\n+\t\tsimple-audio-card,name = \"HDMI\";\n \t\tsimple-audio-card,mclk-fs = <512>;\n \n \t\tsimple-audio-card,codec {\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi\nindex 093ebe070775..a10fe60b7680 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi\n@@ -1893,7 +1893,7 @@ hdmi_sound: hdmi-sound {\n \t\tcompatible = \"simple-audio-card\";\n \t\tsimple-audio-card,format = \"i2s\";\n \t\tsimple-audio-card,mclk-fs = <256>;\n-\t\tsimple-audio-card,name = \"hdmi-sound\";\n+\t\tsimple-audio-card,name = \"HDMI\";\n \t\tstatus = \"disabled\";\n \n \t\tsimple-audio-card,cpu {\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sun, 25 Mar 2018 22:17:06 +0200\nSubject: [PATCH] ASoC: hdmi-codec: fix channel allocation\n\n---\n sound/soc/codecs/hdmi-codec.c | 113 ++++++++++++++++------------------\n 1 file changed, 52 insertions(+), 61 deletions(-)\n\ndiff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c\nindex 5679102de91f..f0cd183f7873 100644\n--- a/sound/soc/codecs/hdmi-codec.c\n+++ b/sound/soc/codecs/hdmi-codec.c\n@@ -194,78 +194,69 @@ static const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = {\n  */\n static const struct hdmi_codec_cea_spk_alloc hdmi_codec_channel_alloc[] = {\n \t{ .ca_id = 0x00, .n_ch = 2,\n-\t  .mask = FL | FR},\n-\t/* 2.1 */\n-\t{ .ca_id = 0x01, .n_ch = 4,\n-\t  .mask = FL | FR | LFE},\n-\t/* Dolby Surround */\n+\t  .mask = FL | FR },\n+\t{ .ca_id = 0x03, .n_ch = 4,\n+\t  .mask = FL | FR | LFE | FC },\n \t{ .ca_id = 0x02, .n_ch = 4,\n \t  .mask = FL | FR | FC },\n-\t/* surround51 */\n+\t{ .ca_id = 0x01, .n_ch = 4,\n+\t  .mask = FL | FR | LFE },\n \t{ .ca_id = 0x0b, .n_ch = 6,\n-\t  .mask = FL | FR | LFE | FC | RL | RR},\n-\t/* surround40 */\n-\t{ .ca_id = 0x08, .n_ch = 6,\n-\t  .mask = FL | FR | RL | RR },\n-\t/* surround41 */\n-\t{ .ca_id = 0x09, .n_ch = 6,\n-\t  .mask = FL | FR | LFE | RL | RR },\n-\t/* surround50 */\n+\t  .mask = FL | FR | LFE | FC | RL | RR },\n \t{ .ca_id = 0x0a, .n_ch = 6,\n \t  .mask = FL | FR | FC | RL | RR },\n-\t/* 6.1 */\n-\t{ .ca_id = 0x0f, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FC | RL | RR | RC },\n-\t/* surround71 */\n+\t{ .ca_id = 0x09, .n_ch = 6,\n+\t  .mask = FL | FR | LFE | RL | RR },\n+\t{ .ca_id = 0x08, .n_ch = 6,\n+\t  .mask = FL | FR | RL | RR },\n+\t{ .ca_id = 0x07, .n_ch = 6,\n+\t  .mask = FL | FR | LFE | FC | RC },\n+\t{ .ca_id = 0x06, .n_ch = 6,\n+\t  .mask = FL | FR | FC | RC },\n+\t{ .ca_id = 0x05, .n_ch = 6,\n+\t  .mask = FL | FR | LFE | RC },\n+\t{ .ca_id = 0x04, .n_ch = 6,\n+\t  .mask = FL | FR | RC },\n \t{ .ca_id = 0x13, .n_ch = 8,\n \t  .mask = FL | FR | LFE | FC | RL | RR | RLC | RRC },\n-\t/* others */\n-\t{ .ca_id = 0x03, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FC },\n-\t{ .ca_id = 0x04, .n_ch = 8,\n-\t  .mask = FL | FR | RC},\n-\t{ .ca_id = 0x05, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RC },\n-\t{ .ca_id = 0x06, .n_ch = 8,\n-\t  .mask = FL | FR | FC | RC },\n-\t{ .ca_id = 0x07, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FC | RC },\n-\t{ .ca_id = 0x0c, .n_ch = 8,\n-\t  .mask = FL | FR | RC | RL | RR },\n-\t{ .ca_id = 0x0d, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RL | RR | RC },\n-\t{ .ca_id = 0x0e, .n_ch = 8,\n-\t  .mask = FL | FR | FC | RL | RR | RC },\n-\t{ .ca_id = 0x10, .n_ch = 8,\n-\t  .mask = FL | FR | RL | RR | RLC | RRC },\n-\t{ .ca_id = 0x11, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RL | RR | RLC | RRC },\n+\t{ .ca_id = 0x1f, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | FC | RL | RR | FLC | FRC },\n \t{ .ca_id = 0x12, .n_ch = 8,\n \t  .mask = FL | FR | FC | RL | RR | RLC | RRC },\n-\t{ .ca_id = 0x14, .n_ch = 8,\n-\t  .mask = FL | FR | FLC | FRC },\n-\t{ .ca_id = 0x15, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FLC | FRC },\n-\t{ .ca_id = 0x16, .n_ch = 8,\n-\t  .mask = FL | FR | FC | FLC | FRC },\n-\t{ .ca_id = 0x17, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FC | FLC | FRC },\n-\t{ .ca_id = 0x18, .n_ch = 8,\n-\t  .mask = FL | FR | RC | FLC | FRC },\n-\t{ .ca_id = 0x19, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RC | FLC | FRC },\n-\t{ .ca_id = 0x1a, .n_ch = 8,\n-\t  .mask = FL | FR | RC | FC | FLC | FRC },\n-\t{ .ca_id = 0x1b, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RC | FC | FLC | FRC },\n-\t{ .ca_id = 0x1c, .n_ch = 8,\n-\t  .mask = FL | FR | RL | RR | FLC | FRC },\n-\t{ .ca_id = 0x1d, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | RL | RR | FLC | FRC },\n \t{ .ca_id = 0x1e, .n_ch = 8,\n \t  .mask = FL | FR | FC | RL | RR | FLC | FRC },\n-\t{ .ca_id = 0x1f, .n_ch = 8,\n-\t  .mask = FL | FR | LFE | FC | RL | RR | FLC | FRC },\n+\t{ .ca_id = 0x11, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RL | RR | RLC | RRC },\n+\t{ .ca_id = 0x1d, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RL | RR | FLC | FRC },\n+\t{ .ca_id = 0x10, .n_ch = 8,\n+\t  .mask = FL | FR | RL | RR | RLC | RRC },\n+\t{ .ca_id = 0x1c, .n_ch = 8,\n+\t  .mask = FL | FR | RL | RR | FLC | FRC },\n+\t{ .ca_id = 0x0f, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | FC | RL | RR | RC },\n+\t{ .ca_id = 0x1b, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RC | FC | FLC | FRC },\n+\t{ .ca_id = 0x0e, .n_ch = 8,\n+\t  .mask = FL | FR | FC | RL | RR | RC },\n+\t{ .ca_id = 0x1a, .n_ch = 8,\n+\t  .mask = FL | FR | RC | FC | FLC | FRC },\n+\t{ .ca_id = 0x0d, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RL | RR | RC },\n+\t{ .ca_id = 0x19, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | RC | FLC | FRC },\n+\t{ .ca_id = 0x0c, .n_ch = 8,\n+\t  .mask = FL | FR | RC | RL | RR },\n+\t{ .ca_id = 0x18, .n_ch = 8,\n+\t  .mask = FL | FR | RC | FLC | FRC },\n+\t{ .ca_id = 0x17, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | FC | FLC | FRC },\n+\t{ .ca_id = 0x16, .n_ch = 8,\n+\t  .mask = FL | FR | FC | FLC | FRC },\n+\t{ .ca_id = 0x15, .n_ch = 8,\n+\t  .mask = FL | FR | LFE | FLC | FRC },\n+\t{ .ca_id = 0x14, .n_ch = 8,\n+\t  .mask = FL | FR | FLC | FRC },\n };\n \n struct hdmi_codec_priv {\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Sat, 27 Feb 2021 17:52:02 +0100\nSubject: [PATCH] arm64: dts: rockchip: add SPDIF nodes for RK3328 A1 board\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n arch/arm64/boot/dts/rockchip/rk3328-a1.dts | 23 ++++++++++++++++++++++\n 1 file changed, 23 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3328-a1.dts b/arch/arm64/boot/dts/rockchip/rk3328-a1.dts\nindex 40bf808642b9..27a1799027c2 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3328-a1.dts\n+++ b/arch/arm64/boot/dts/rockchip/rk3328-a1.dts\n@@ -57,6 +57,24 @@ ir-receiver {\n \t\tgpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;\n \t\tlinux,rc-map-name = \"rc-beelink-gs1\";\n \t};\n+\n+\tspdif_sound: spdif-sound {\n+\t\tcompatible = \"simple-audio-card\";\n+\t\tsimple-audio-card,name = \"SPDIF\";\n+\n+\t\tsimple-audio-card,cpu {\n+\t\t\tsound-dai = <&spdif>;\n+\t\t};\n+\n+\t\tsimple-audio-card,codec {\n+\t\t\tsound-dai = <&spdif_dit>;\n+\t\t};\n+\t};\n+\n+\tspdif_dit: spdif-dit {\n+\t\tcompatible = \"linux,spdif-dit\";\n+\t\t#sound-dai-cells = <0>;\n+\t};\n };\n \n &analog_sound {\n@@ -325,6 +343,11 @@ &sdmmc {\n \tstatus = \"okay\";\n };\n \n+&spdif {\n+\tpinctrl-0 = <&spdifm0_tx>;\n+\tstatus = \"okay\";\n+};\n+\n &tsadc {\n \trockchip,hw-tshut-mode = <0>;\n \trockchip,hw-tshut-polarity = <0>;\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Sat, 27 Feb 2021 18:01:13 +0100\nSubject: [PATCH] arm64: dts: rockchip: Add ir-receiver node for RK3328 ROC CC\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts\nindex 51c7723d6762..cf321302daec 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts\n+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts\n@@ -88,6 +88,13 @@ vcc_phy: vcc-phy-regulator {\n \t\tregulator-boot-on;\n \t};\n \n+\tir-receiver {\n+\t\tcompatible = \"gpio-ir-receiver\";\n+\t\tgpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;\n+\t\tpinctrl-0 = <&ir_int>;\n+\t\tpinctrl-names = \"default\";\n+\t};\n+\n \tleds {\n \t\tcompatible = \"gpio-leds\";\n \n@@ -312,6 +319,13 @@ &io_domains {\n };\n \n &pinctrl {\n+\n+\tir {\n+\t\tir_int: ir-int {\n+\t\t\trockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;\n+\t\t};\n+\t};\n+\n \tpmic {\n \t\tpmic_int_l: pmic-int-l {\n \t\t\trockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Mon, 1 Mar 2021 21:24:15 +0100\nSubject: [PATCH] ARM: dts: add cec pinctrl for RK3288 miqi board\n\n---\n arch/arm/boot/dts/rk3288-miqi.dts | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts\nindex 8d30c49f406e..6d90db5a3b75 100644\n--- a/arch/arm/boot/dts/rk3288-miqi.dts\n+++ b/arch/arm/boot/dts/rk3288-miqi.dts\n@@ -145,6 +145,8 @@ &gpu {\n \n &hdmi {\n \tddc-i2c-bus = <&i2c5>;\n+\tpinctrl-names = \"default\";\n+\tpinctrl-0 = <&hdmi_cec_c0>;\n \tstatus = \"okay\";\n };\n \n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Mon, 1 Mar 2021 19:22:15 +0100\nSubject: [PATCH] HACK: arm64: dts: enable FE phy for Beelink A1 also\n\n---\n arch/arm64/boot/dts/rockchip/rk3328-a1.dts | 8 ++++++++\n 1 file changed, 8 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3328-a1.dts b/arch/arm64/boot/dts/rockchip/rk3328-a1.dts\nindex 27a1799027c2..7de9dfa71d89 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3328-a1.dts\n+++ b/arch/arm64/boot/dts/rockchip/rk3328-a1.dts\n@@ -147,6 +147,14 @@ rtl8211f: ethernet-phy@0 {\n \t};\n };\n \n+&gmac2phy {\n+\tclock_in_out = \"output\";\n+\tassigned-clock-rate = <50000000>;\n+\tassigned-clocks = <&cru SCLK_MAC2PHY>;\n+\tassigned-clock-parents = <&cru SCLK_MAC2PHY_SRC>;\n+\tstatus = \"okay\";\n+};\n+\n &gpu {\n \tmali-supply = <&vdd_logic>;\n };\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Tue, 26 Feb 2019 20:45:14 +0000\nSubject: [PATCH] WIP: dw-hdmi-cec: sleep 100ms on error\n\n---\n drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c | 18 ++++++++++++++++--\n 1 file changed, 16 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c\nindex c8f44bcb298a..d4280ce4542c 100644\n--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c\n+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c\n@@ -4,6 +4,7 @@\n  *\n  * Copyright (C) 2015-2017 Russell King.\n  */\n+#include <linux/delay.h>\n #include <linux/interrupt.h>\n #include <linux/io.h>\n #include <linux/module.h>\n@@ -129,8 +130,15 @@ static irqreturn_t dw_hdmi_cec_hardirq(int irq, void *data)\n \n \tdw_hdmi_write(cec, stat, HDMI_IH_CEC_STAT0);\n \n-\tif (stat & CEC_STAT_ERROR_INIT) {\n-\t\tcec->tx_status = CEC_TX_STATUS_ERROR;\n+\t/* Status with both done and error_initiator bits have been seen\n+\t * on Rockchip RK3328 devices, transmit attempt seems to have failed\n+\t * when this happens, report as low drive and block cec-framework\n+\t * 100ms before core retransmits the failed message, this seems to\n+\t * mitigate the issue with failed transmit attempts.\n+\t */\n+\tif ((stat & (CEC_STAT_DONE|CEC_STAT_ERROR_INIT)) == (CEC_STAT_DONE|CEC_STAT_ERROR_INIT)) {\n+\t\tpr_debug(\"dw_hdmi_cec_hardirq: stat=%02x LOW_DRIVE\\n\", stat);\n+\t\tcec->tx_status = CEC_TX_STATUS_LOW_DRIVE;\n \t\tcec->tx_done = true;\n \t\tret = IRQ_WAKE_THREAD;\n \t} else if (stat & CEC_STAT_DONE) {\n@@ -141,6 +149,10 @@ static irqreturn_t dw_hdmi_cec_hardirq(int irq, void *data)\n \t\tcec->tx_status = CEC_TX_STATUS_NACK;\n \t\tcec->tx_done = true;\n \t\tret = IRQ_WAKE_THREAD;\n+\t} else if (stat & CEC_STAT_ERROR_INIT) {\n+\t\tcec->tx_status = CEC_TX_STATUS_ERROR;\n+\t\tcec->tx_done = true;\n+\t\tret = IRQ_WAKE_THREAD;\n \t}\n \n \tif (stat & CEC_STAT_EOM) {\n@@ -173,6 +185,8 @@ static irqreturn_t dw_hdmi_cec_thread(int irq, void *data)\n \n \tif (cec->tx_done) {\n \t\tcec->tx_done = false;\n+\t\tif (cec->tx_status == CEC_TX_STATUS_LOW_DRIVE)\n+\t\t\tmsleep(100);\n \t\tcec_transmit_attempt_done(adap, cec->tx_status);\n \t}\n \tif (cec->rx_done) {\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Wed, 5 May 2021 19:11:12 +0200\nSubject: [PATCH] arm64: boot: dts: Increase ACLK_PERILP0 clock rate for RK3399\n\nAs per vendor kernel. Leaving this clock at the lower rate will\nresult in poor DMA controller performance\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi\nindex a10fe60b7680..dbe6a9cb98a5 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi\n@@ -1477,7 +1477,7 @@ cru: clock-controller@ff760000 {\n \t\t\t<1000000000>,\n \t\t\t <150000000>,   <75000000>,\n \t\t\t  <37500000>,\n-\t\t\t <100000000>,  <100000000>,\n+\t\t\t <300000000>,  <100000000>,\n \t\t\t  <50000000>, <600000000>,\n \t\t\t <100000000>,   <50000000>,\n \t\t\t <400000000>, <400000000>,\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Sat, 21 Aug 2021 17:04:46 +0200\nSubject: [PATCH] arm64: dts: rockchip: Enable USB3 for rk3328 Beelink A1\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n arch/arm64/boot/dts/rockchip/rk3328-a1.dts | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3328-a1.dts b/arch/arm64/boot/dts/rockchip/rk3328-a1.dts\nindex 7de9dfa71d89..e857e5a727f4 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3328-a1.dts\n+++ b/arch/arm64/boot/dts/rockchip/rk3328-a1.dts\n@@ -389,6 +389,11 @@ &usb_host0_ehci {\n \tstatus = \"okay\";\n };\n \n+&usbdrd3 {\n+\tdr_mode = \"host\";\n+\tstatus = \"okay\";\n+};\n+\n &vop {\n \tstatus = \"okay\";\n };\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Sat, 30 Oct 2021 12:19:19 +0200\nSubject: [PATCH] WIP: drm: bridge: dw-hdmi: switch from .hw_parmas to .prepare\n for i2s\n\nSeems to be the only way to get AES bits correctly as set by\nuserspace.\nTODO: check other consequences.\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c\nindex a2f0860b20bb..8961f9c7885d 100644\n--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c\n+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c\n@@ -34,9 +34,9 @@ static inline u8 hdmi_read(struct dw_hdmi_i2s_audio_data *audio, int offset)\n \treturn audio->read(hdmi, offset);\n }\n \n-static int dw_hdmi_i2s_hw_params(struct device *dev, void *data,\n-\t\t\t\t struct hdmi_codec_daifmt *fmt,\n-\t\t\t\t struct hdmi_codec_params *hparms)\n+static int dw_hdmi_i2s_prepare(struct device *dev, void *data,\n+\t\t\t       struct hdmi_codec_daifmt *fmt,\n+\t\t\t       struct hdmi_codec_params *hparms)\n {\n \tstruct dw_hdmi_i2s_audio_data *audio = data;\n \tstruct dw_hdmi *hdmi = audio->hdmi;\n@@ -178,7 +178,7 @@ static int dw_hdmi_i2s_hook_plugged_cb(struct device *dev, void *data,\n }\n \n static const struct hdmi_codec_ops dw_hdmi_i2s_ops = {\n-\t.hw_params\t= dw_hdmi_i2s_hw_params,\n+\t.prepare\t= dw_hdmi_i2s_prepare,\n \t.audio_startup  = dw_hdmi_i2s_audio_startup,\n \t.audio_shutdown\t= dw_hdmi_i2s_audio_shutdown,\n \t.get_eld\t= dw_hdmi_i2s_get_eld,\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Sun, 18 Sep 2022 10:35:52 +0200\nSubject: [PATCH] arm64: dts: rockchip: Disbake fusb for rk3399-roc-pc\n\nAs it will lead to an unbootable device in case one if those ports\nis used to power up the device.\nSee https://lkml.org/lkml/2022/6/20/413\n---\n arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi\nindex 2f4b1b2e3ac7..7217ead94d39 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi\n@@ -215,7 +215,7 @@ vdd_log: vdd-log {\n \t\tregulator-name = \"vdd_log\";\n \t\tregulator-always-on;\n \t\tregulator-boot-on;\n-\t\tregulator-min-microvolt = <450000>;\n+\t\tregulator-min-microvolt = <430000>;\n \t\tregulator-max-microvolt = <1400000>;\n \t\tpwm-supply = <&vcc3v3_sys>;\n \t};\n@@ -536,7 +536,7 @@ fusb1: usb-typec@22 {\n \t\tpinctrl-names = \"default\";\n \t\tpinctrl-0 = <&fusb1_int>;\n \t\tvbus-supply = <&vcc_vbus_typec1>;\n-\t\tstatus = \"okay\";\n+\t\tstatus = \"disabled\";\n \t};\n };\n \n@@ -553,7 +553,7 @@ fusb0: usb-typec@22 {\n \t\tpinctrl-names = \"default\";\n \t\tpinctrl-0 = <&fusb0_int>;\n \t\tvbus-supply = <&vcc_vbus_typec0>;\n-\t\tstatus = \"okay\";\n+\t\tstatus = \"disabled\";\n \t};\n \n \tmp8859: regulator@66 {\n"
  },
  {
    "path": "projects/Rockchip/patches/linux/default/linux-2000-v4l2-wip-rkvdec-hevc.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Jonas Karlman <jonas@kwiboo.se>\nDate: Sat, 23 May 2020 15:17:45 +0000\nSubject: [PATCH] WIP: media: rkvdec: add HEVC backend\n\nNOTE: cabac table and scailing list code is copied 1:1 from mpp\nTODO: fix lowdelay flag and rework the scaling list part\n\nSigned-off-by: Jonas Karlman <jonas@kwiboo.se>\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/staging/media/rkvdec/Makefile      |    2 +-\n drivers/staging/media/rkvdec/rkvdec-hevc.c | 2572 ++++++++++++++++++++\n drivers/staging/media/rkvdec/rkvdec-regs.h |    1 +\n drivers/staging/media/rkvdec/rkvdec.c      |   73 +-\n drivers/staging/media/rkvdec/rkvdec.h      |    1 +\n 5 files changed, 2647 insertions(+), 2 deletions(-)\n create mode 100644 drivers/staging/media/rkvdec/rkvdec-hevc.c\n\ndiff --git a/drivers/staging/media/rkvdec/Makefile b/drivers/staging/media/rkvdec/Makefile\nindex cb86b429cfaa..a77122641d14 100644\n--- a/drivers/staging/media/rkvdec/Makefile\n+++ b/drivers/staging/media/rkvdec/Makefile\n@@ -1,3 +1,3 @@\n obj-$(CONFIG_VIDEO_ROCKCHIP_VDEC) += rockchip-vdec.o\n \n-rockchip-vdec-y += rkvdec.o rkvdec-h264.o rkvdec-vp9.o\n+rockchip-vdec-y += rkvdec.o rkvdec-h264.o rkvdec-hevc.o rkvdec-vp9.o\ndiff --git a/drivers/staging/media/rkvdec/rkvdec-hevc.c b/drivers/staging/media/rkvdec/rkvdec-hevc.c\nnew file mode 100644\nindex 000000000000..7a375a23eaf1\n--- /dev/null\n+++ b/drivers/staging/media/rkvdec/rkvdec-hevc.c\n@@ -0,0 +1,2572 @@\n+// SPDX-License-Identifier: GPL-2.0\n+/*\n+ * Rockchip Video Decoder HEVC backend\n+ *\n+ * Copyright (C) 2019 Collabora, Ltd.\n+ *\tBoris Brezillon <boris.brezillon@collabora.com>\n+ *\n+ * Copyright (C) 2016 Rockchip Electronics Co., Ltd.\n+ *\tJeffy Chen <jeffy.chen@rock-chips.com>\n+ */\n+\n+#include <media/v4l2-mem2mem.h>\n+\n+#include \"rkvdec.h\"\n+#include \"rkvdec-regs.h\"\n+\n+/* Size in u8/u32 units. */\n+#define RKV_CABAC_TABLE_SIZE\t\t27456\n+#define RKV_SCALING_LIST_SIZE\t\t1360\n+#define RKV_PPS_SIZE\t\t\t(80 / 4)\n+#define RKV_PPS_LEN\t\t\t64\n+#define RKV_RPS_SIZE\t\t\t(32 / 4)\n+#define RKV_RPS_LEN\t\t\t600\n+\n+struct rkvdec_sps_pps_packet {\n+\tu32 info[RKV_PPS_SIZE];\n+};\n+\n+struct rkvdec_rps_packet {\n+\tu32 info[RKV_RPS_SIZE];\n+};\n+\n+struct rkvdec_ps_field {\n+\tu16 offset;\n+\tu8 len;\n+};\n+\n+#define PS_FIELD(_offset, _len) \\\n+\t((struct rkvdec_ps_field){ _offset, _len })\n+\n+/* SPS */\n+#define VIDEO_PARAMETER_SET_ID\t\t\t\tPS_FIELD(0, 4)\n+#define SEQ_PARAMETER_SET_ID\t\t\t\tPS_FIELD(4, 4)\n+#define CHROMA_FORMAT_IDC\t\t\t\tPS_FIELD(8, 2)\n+#define PIC_WIDTH_IN_LUMA_SAMPLES\t\t\tPS_FIELD(10, 13)\n+#define PIC_HEIGHT_IN_LUMA_SAMPLES\t\t\tPS_FIELD(23, 13)\n+#define BIT_DEPTH_LUMA\t\t\t\t\tPS_FIELD(36, 4)\n+#define BIT_DEPTH_CHROMA\t\t\t\tPS_FIELD(40, 4)\n+#define LOG2_MAX_PIC_ORDER_CNT_LSB\t\t\tPS_FIELD(44, 5)\n+#define LOG2_DIFF_MAX_MIN_LUMA_CODING_BLOCK_SIZE\tPS_FIELD(49, 2)\n+#define LOG2_MIN_LUMA_CODING_BLOCK_SIZE\t\t\tPS_FIELD(51, 3)\n+#define LOG2_MIN_TRANSFORM_BLOCK_SIZE\t\t\tPS_FIELD(54, 3)\n+#define LOG2_DIFF_MAX_MIN_LUMA_TRANSFORM_BLOCK_SIZE\tPS_FIELD(57, 2)\n+#define MAX_TRANSFORM_HIERARCHY_DEPTH_INTER\t\tPS_FIELD(59, 3)\n+#define MAX_TRANSFORM_HIERARCHY_DEPTH_INTRA\t\tPS_FIELD(62, 3)\n+#define SCALING_LIST_ENABLED_FLAG\t\t\tPS_FIELD(65, 1)\n+#define AMP_ENABLED_FLAG\t\t\t\tPS_FIELD(66, 1)\n+#define SAMPLE_ADAPTIVE_OFFSET_ENABLED_FLAG\t\tPS_FIELD(67, 1)\n+#define PCM_ENABLED_FLAG\t\t\t\tPS_FIELD(68, 1)\n+#define PCM_SAMPLE_BIT_DEPTH_LUMA\t\t\tPS_FIELD(69, 4)\n+#define PCM_SAMPLE_BIT_DEPTH_CHROMA\t\t\tPS_FIELD(73, 4)\n+#define PCM_LOOP_FILTER_DISABLED_FLAG\t\t\tPS_FIELD(77, 1)\n+#define LOG2_DIFF_MAX_MIN_PCM_LUMA_CODING_BLOCK_SIZE\tPS_FIELD(78, 3)\n+#define LOG2_MIN_PCM_LUMA_CODING_BLOCK_SIZE\t\tPS_FIELD(81, 3)\n+#define NUM_SHORT_TERM_REF_PIC_SETS\t\t\tPS_FIELD(84, 7)\n+#define LONG_TERM_REF_PICS_PRESENT_FLAG\t\t\tPS_FIELD(91, 1)\n+#define NUM_LONG_TERM_REF_PICS_SPS\t\t\tPS_FIELD(92, 6)\n+#define SPS_TEMPORAL_MVP_ENABLED_FLAG\t\t\tPS_FIELD(98, 1)\n+#define STRONG_INTRA_SMOOTHING_ENABLED_FLAG\t\tPS_FIELD(99, 1)\n+/* PPS */\n+#define PIC_PARAMETER_SET_ID\t\t\t\tPS_FIELD(128, 6)\n+#define PPS_SEQ_PARAMETER_SET_ID\t\t\tPS_FIELD(134, 4)\n+#define DEPENDENT_SLICE_SEGMENTS_ENABLED_FLAG\t\tPS_FIELD(138, 1)\n+#define OUTPUT_FLAG_PRESENT_FLAG\t\t\tPS_FIELD(139, 1)\n+#define NUM_EXTRA_SLICE_HEADER_BITS\t\t\tPS_FIELD(140, 13)\n+#define SIGN_DATA_HIDING_ENABLED_FLAG\t\t\tPS_FIELD(153, 1)\n+#define CABAC_INIT_PRESENT_FLAG\t\t\t\tPS_FIELD(154, 1)\n+#define NUM_REF_IDX_L0_DEFAULT_ACTIVE\t\t\tPS_FIELD(155, 4)\n+#define NUM_REF_IDX_L1_DEFAULT_ACTIVE\t\t\tPS_FIELD(159, 4)\n+#define INIT_QP_MINUS26\t\t\t\t\tPS_FIELD(163, 7)\n+#define CONSTRAINED_INTRA_PRED_FLAG\t\t\tPS_FIELD(170, 1)\n+#define TRANSFORM_SKIP_ENABLED_FLAG\t\t\tPS_FIELD(171, 1)\n+#define CU_QP_DELTA_ENABLED_FLAG\t\t\tPS_FIELD(172, 1)\n+#define LOG2_MIN_CU_QP_DELTA_SIZE\t\t\tPS_FIELD(173, 3)\n+#define PPS_CB_QP_OFFSET\t\t\t\tPS_FIELD(176, 5)\n+#define PPS_CR_QP_OFFSET\t\t\t\tPS_FIELD(181, 5)\n+#define PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_FLAG\tPS_FIELD(186, 1)\n+#define WEIGHTED_PRED_FLAG\t\t\t\tPS_FIELD(187, 1)\n+#define WEIGHTED_BIPRED_FLAG\t\t\t\tPS_FIELD(188, 1)\n+#define TRANSQUANT_BYPASS_ENABLED_FLAG\t\t\tPS_FIELD(189, 1)\n+#define TILES_ENABLED_FLAG\t\t\t\tPS_FIELD(190, 1)\n+#define ENTROPY_CODING_SYNC_ENABLED_FLAG\t\tPS_FIELD(191, 1)\n+#define PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED_FLAG\tPS_FIELD(192, 1)\n+#define LOOP_FILTER_ACROSS_TILES_ENABLED_FLAG\t\tPS_FIELD(193, 1)\n+#define DEBLOCKING_FILTER_OVERRIDE_ENABLED_FLAG\t\tPS_FIELD(194, 1)\n+#define PPS_DEBLOCKING_FILTER_DISABLED_FLAG\t\tPS_FIELD(195, 1)\n+#define PPS_BETA_OFFSET_DIV2\t\t\t\tPS_FIELD(196, 4)\n+#define PPS_TC_OFFSET_DIV2\t\t\t\tPS_FIELD(200, 4)\n+#define LISTS_MODIFICATION_PRESENT_FLAG\t\t\tPS_FIELD(204, 1)\n+#define LOG2_PARALLEL_MERGE_LEVEL\t\t\tPS_FIELD(205, 3)\n+#define SLICE_SEGMENT_HEADER_EXTENSION_PRESENT_FLAG\tPS_FIELD(208, 1)\n+#define NUM_TILE_COLUMNS\t\t\t\tPS_FIELD(212, 5)\n+#define NUM_TILE_ROWS\t\t\t\t\tPS_FIELD(217, 5)\n+#define COLUMN_WIDTH(i)\t\t\t\t\tPS_FIELD(256 + (i * 8), 8)\n+#define ROW_HEIGHT(i)\t\t\t\t\tPS_FIELD(416 + (i * 8), 8)\n+#define SCALING_LIST_ADDRESS\t\t\t\tPS_FIELD(592, 32)\n+\n+/* Data structure describing auxiliary buffer format. */\n+struct rkvdec_hevc_priv_tbl {\n+\tu8 cabac_table[RKV_CABAC_TABLE_SIZE];\n+\tu8 scaling_list[RKV_SCALING_LIST_SIZE];\n+\tstruct rkvdec_sps_pps_packet param_set[RKV_PPS_LEN];\n+\tstruct rkvdec_rps_packet rps[RKV_RPS_LEN];\n+};\n+\n+struct rkvdec_hevc_run {\n+\tstruct rkvdec_run base;\n+\tconst struct v4l2_ctrl_hevc_slice_params *slices_params;\n+\tconst struct v4l2_ctrl_hevc_decode_params *decode_params;\n+\tconst struct v4l2_ctrl_hevc_sps *sps;\n+\tconst struct v4l2_ctrl_hevc_pps *pps;\n+\tconst struct v4l2_ctrl_hevc_scaling_matrix *scaling_matrix;\n+\tint num_slices;\n+};\n+\n+struct rkvdec_hevc_ctx {\n+\tstruct rkvdec_aux_buf priv_tbl;\n+\tstruct v4l2_ctrl_hevc_scaling_matrix scaling_matrix_cache;\n+};\n+\n+// TODO: refactor scaling list code, was copied 1:1 from mpp\n+\n+typedef struct ScalingList {\n+    /* This is a little wasteful, since sizeID 0 only needs 8 coeffs,\n+     * and size ID 3 only has 2 arrays, not 6. */\n+    u8 sl[4][6][64];\n+    u8 sl_dc[2][6];\n+} scalingList_t;\n+\n+typedef struct ScalingFactor_Model {\n+    u8 scalingfactor0[1248];\n+    u8 scalingfactor1[96];     /*4X4 TU Rotate, total 16X4*/\n+    u8 scalingdc[12];          /*N1005 Vienna Meeting*/\n+    u8 reserverd[4];           /*16Bytes align*/\n+} scalingFactor_t;\n+\n+#define SCALING_LIST_SIZE_NUM 4\n+\n+static void\n+hal_record_scaling_list(scalingFactor_t *pScalingFactor_out,\n+                        scalingList_t *pScalingList)\n+{\n+    int i;\n+    u32 g_scalingListNum_model[SCALING_LIST_SIZE_NUM] = {6, 6, 6, 2}; // from C Model\n+    u32 nIndex = 0;\n+    u32 sizeId, matrixId, listId;\n+    u8 *p = pScalingFactor_out->scalingfactor0;\n+    u8 tmpBuf[8 * 8];\n+\n+    //output non-default scalingFactor Table (1248 BYTES)\n+    for (sizeId = 0; sizeId < SCALING_LIST_SIZE_NUM; sizeId++) {\n+        for (listId = 0; listId < g_scalingListNum_model[sizeId]; listId++) {\n+            if (sizeId < 3) {\n+                for (i = 0; i < (sizeId == 0 ? 16 : 64); i++) {\n+                    pScalingFactor_out->scalingfactor0[nIndex++] = (u8)pScalingList->sl[sizeId][listId][i];\n+                }\n+            } else {\n+                for (i = 0; i < 64; i ++) {\n+                    pScalingFactor_out->scalingfactor0[nIndex++] = (u8)pScalingList->sl[sizeId][listId][i];\n+                }\n+                for (i = 0; i < 128; i ++) {\n+                    pScalingFactor_out->scalingfactor0[nIndex++] = 0;\n+                }\n+            }\n+        }\n+    }\n+    //output non-default scalingFactor Table Rotation(96 Bytes)\n+    nIndex = 0;\n+    for (listId = 0; listId < g_scalingListNum_model[0]; listId++) {\n+        u8 temp16[16] = {0};\n+        for (i = 0; i < 16; i ++) {\n+            temp16[i] = (u8)pScalingList->sl[0][listId][i];\n+        }\n+        for (i = 0; i < 4; i ++) {\n+            pScalingFactor_out->scalingfactor1[nIndex++] = temp16[i];\n+            pScalingFactor_out->scalingfactor1[nIndex++] = temp16[i + 4];\n+            pScalingFactor_out->scalingfactor1[nIndex++] = temp16[i + 8];\n+            pScalingFactor_out->scalingfactor1[nIndex++] = temp16[i + 12];\n+        }\n+    }\n+    //output non-default ScalingList_DC_Coeff (12 BYTES)\n+    nIndex = 0;\n+    for (listId = 0; listId < g_scalingListNum_model[2]; listId++) { //sizeId = 2\n+        pScalingFactor_out->scalingdc[nIndex++] = (u8)pScalingList->sl_dc[0][listId];// zrh warning: sl_dc differed from scalingList->getScalingListDC\n+    }\n+    for (listId = 0; listId < g_scalingListNum_model[3]; listId++) { //sizeId = 3\n+        pScalingFactor_out->scalingdc[nIndex++] = (u8)pScalingList->sl_dc[1][listId];// zrh warning: sl_dc differed from scalingList->getScalingListDC\n+        pScalingFactor_out->scalingdc[nIndex++] = 0;\n+        pScalingFactor_out->scalingdc[nIndex++] = 0;\n+    }\n+\n+    //align 16X address\n+    nIndex = 0;\n+    for (i = 0; i < 4; i ++) {\n+        pScalingFactor_out->reserverd[nIndex++] = 0;\n+    }\n+\n+    //----------------------All above code show the normal store way in HM--------------------------\n+    //--------from now on, the scalingfactor0 is rotated 90', the scalingfactor1 is also rotated 90'\n+\n+    //sizeId == 0\n+    for (matrixId = 0; matrixId < 6; matrixId++) {\n+        p = pScalingFactor_out->scalingfactor0 + matrixId * 16;\n+\n+        for (i = 0; i < 4; i++) {\n+            tmpBuf[4 * 0 + i] = p[i * 4 + 0];\n+            tmpBuf[4 * 1 + i] = p[i * 4 + 1];\n+            tmpBuf[4 * 2 + i] = p[i * 4 + 2];\n+            tmpBuf[4 * 3 + i] = p[i * 4 + 3];\n+        }\n+        memcpy(p, tmpBuf, 4 * 4 * sizeof(u8));\n+    }\n+    //sizeId == 1\n+    for (matrixId = 0; matrixId < 6; matrixId++) {\n+        p = pScalingFactor_out->scalingfactor0 + 6 * 16 + matrixId * 64;\n+\n+        for (i = 0; i < 8; i++) {\n+            tmpBuf[8 * 0 + i] = p[i * 8 + 0];\n+            tmpBuf[8 * 1 + i] = p[i * 8 + 1];\n+            tmpBuf[8 * 2 + i] = p[i * 8 + 2];\n+            tmpBuf[8 * 3 + i] = p[i * 8 + 3];\n+            tmpBuf[8 * 4 + i] = p[i * 8 + 4];\n+            tmpBuf[8 * 5 + i] = p[i * 8 + 5];\n+            tmpBuf[8 * 6 + i] = p[i * 8 + 6];\n+            tmpBuf[8 * 7 + i] = p[i * 8 + 7];\n+        }\n+        memcpy(p, tmpBuf, 8 * 8 * sizeof(u8));\n+    }\n+    //sizeId == 2\n+    for (matrixId = 0; matrixId < 6; matrixId++) {\n+        p = pScalingFactor_out->scalingfactor0 + 6 * 16 + 6 * 64 + matrixId * 64;\n+\n+        for (i = 0; i < 8; i++) {\n+            tmpBuf[8 * 0 + i] = p[i * 8 + 0];\n+            tmpBuf[8 * 1 + i] = p[i * 8 + 1];\n+            tmpBuf[8 * 2 + i] = p[i * 8 + 2];\n+            tmpBuf[8 * 3 + i] = p[i * 8 + 3];\n+            tmpBuf[8 * 4 + i] = p[i * 8 + 4];\n+            tmpBuf[8 * 5 + i] = p[i * 8 + 5];\n+            tmpBuf[8 * 6 + i] = p[i * 8 + 6];\n+            tmpBuf[8 * 7 + i] = p[i * 8 + 7];\n+        }\n+        memcpy(p, tmpBuf, 8 * 8 * sizeof(u8));\n+    }\n+    //sizeId == 3\n+    for (matrixId = 0; matrixId < 6; matrixId++) {\n+        p = pScalingFactor_out->scalingfactor0 + 6 * 16 + 6 * 64 + 6 * 64 + matrixId * 64;\n+\n+        for (i = 0; i < 8; i++) {\n+            tmpBuf[8 * 0 + i] = p[i * 8 + 0];\n+            tmpBuf[8 * 1 + i] = p[i * 8 + 1];\n+            tmpBuf[8 * 2 + i] = p[i * 8 + 2];\n+            tmpBuf[8 * 3 + i] = p[i * 8 + 3];\n+            tmpBuf[8 * 4 + i] = p[i * 8 + 4];\n+            tmpBuf[8 * 5 + i] = p[i * 8 + 5];\n+            tmpBuf[8 * 6 + i] = p[i * 8 + 6];\n+            tmpBuf[8 * 7 + i] = p[i * 8 + 7];\n+        }\n+        memcpy(p, tmpBuf, 8 * 8 * sizeof(u8));\n+    }\n+\n+    //sizeId == 0\n+    for (matrixId = 0; matrixId < 6; matrixId++) {\n+        p = pScalingFactor_out->scalingfactor1 + matrixId * 16;\n+\n+        for (i = 0; i < 4; i++) {\n+            tmpBuf[4 * 0 + i] = p[i * 4 + 0];\n+            tmpBuf[4 * 1 + i] = p[i * 4 + 1];\n+            tmpBuf[4 * 2 + i] = p[i * 4 + 2];\n+            tmpBuf[4 * 3 + i] = p[i * 4 + 3];\n+        }\n+        memcpy(p, tmpBuf, 4 * 4 * sizeof(u8));\n+    }\n+}\n+\n+static const u8 rkvdec_hevc_cabac_table[RKV_CABAC_TABLE_SIZE] = {\n+    0x07, 0x0f, 0x48, 0x58, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0f, 0x40, 0x40, 0x40, 0x0f, 0x68,\n+    0x48, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x40, 0x40, 0x68,\n+    0x58, 0x60, 0x40, 0x1f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x48, 0x48, 0x60, 0x60, 0x50, 0x58,\n+    0x50, 0x07, 0x58, 0x68, 0x50, 0x58, 0x68, 0x68, 0x68, 0x68, 0x68, 0x50, 0x48, 0x68, 0x60, 0x60,\n+    0x50, 0x58, 0x50, 0x07, 0x58, 0x68, 0x50, 0x58, 0x68, 0x68, 0x68, 0x68, 0x68, 0x50, 0x48, 0x68,\n+    0x48, 0x48, 0x1f, 0x58, 0x68, 0x68, 0x58, 0x60, 0x60, 0x60, 0x50, 0x50, 0x50, 0x48, 0x58, 0x58,\n+    0x37, 0x07, 0x58, 0x48, 0x58, 0x58, 0x37, 0x07, 0x58, 0x48, 0x58, 0x58, 0x37, 0x07, 0x58, 0x50,\n+    0x48, 0x1f, 0x1f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x0f, 0x48, 0x68, 0x0f, 0x48, 0x68, 0x40, 0x40,\n+    0x50, 0x50, 0x07, 0x40, 0x50, 0x0f, 0x40, 0x48, 0x07, 0x40, 0x27, 0x50, 0x48, 0x48, 0x40, 0x0f,\n+    0x50, 0x37, 0x1f, 0x1f, 0x50, 0x37, 0x40, 0x27, 0x40, 0x07, 0x0f, 0x17, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x0f, 0x47, 0x57, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0f, 0x40, 0x40, 0x40, 0x0f, 0x66,\n+    0x47, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x00, 0x00, 0x67,\n+    0x57, 0x5e, 0x00, 0x1f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x47, 0x47, 0x5f, 0x5f, 0x4f, 0x57,\n+    0x4f, 0x07, 0x57, 0x67, 0x4f, 0x57, 0x67, 0x67, 0x67, 0x67, 0x66, 0x4f, 0x47, 0x66, 0x5f, 0x5f,\n+    0x4f, 0x57, 0x4f, 0x07, 0x57, 0x67, 0x4f, 0x57, 0x67, 0x67, 0x67, 0x67, 0x66, 0x4f, 0x47, 0x66,\n+    0x46, 0x48, 0x20, 0x57, 0x67, 0x67, 0x57, 0x5f, 0x5f, 0x5e, 0x4f, 0x4f, 0x4f, 0x47, 0x57, 0x57,\n+    0x37, 0x07, 0x57, 0x47, 0x57, 0x57, 0x37, 0x07, 0x57, 0x47, 0x57, 0x57, 0x37, 0x07, 0x57, 0x4f,\n+    0x47, 0x1f, 0x1f, 0x0f, 0x10, 0x0f, 0x10, 0x07, 0x10, 0x47, 0x67, 0x10, 0x47, 0x67, 0x40, 0x40,\n+    0x4f, 0x4e, 0x08, 0x00, 0x4f, 0x0f, 0x00, 0x47, 0x07, 0x01, 0x27, 0x4e, 0x47, 0x47, 0x00, 0x0f,\n+    0x4f, 0x37, 0x1f, 0x1f, 0x4f, 0x36, 0x00, 0x27, 0x00, 0x07, 0x10, 0x17, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x0e, 0x47, 0x57, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0e, 0x40, 0x40, 0x40, 0x0e, 0x64,\n+    0x47, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x00, 0x00, 0x66,\n+    0x57, 0x5d, 0x00, 0x1e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x47, 0x47, 0x5e, 0x5e, 0x4e, 0x56,\n+    0x4f, 0x07, 0x56, 0x66, 0x4f, 0x56, 0x66, 0x67, 0x66, 0x66, 0x64, 0x4e, 0x46, 0x64, 0x5e, 0x5e,\n+    0x4e, 0x56, 0x4f, 0x07, 0x56, 0x66, 0x4f, 0x56, 0x66, 0x67, 0x66, 0x66, 0x64, 0x4e, 0x46, 0x64,\n+    0x45, 0x48, 0x20, 0x57, 0x66, 0x66, 0x56, 0x5e, 0x5e, 0x5d, 0x4e, 0x4e, 0x4e, 0x46, 0x56, 0x57,\n+    0x36, 0x07, 0x56, 0x46, 0x56, 0x57, 0x36, 0x07, 0x56, 0x46, 0x56, 0x57, 0x36, 0x07, 0x56, 0x4f,\n+    0x47, 0x1e, 0x1e, 0x0f, 0x10, 0x0f, 0x10, 0x07, 0x10, 0x47, 0x66, 0x10, 0x47, 0x66, 0x40, 0x40,\n+    0x4f, 0x4d, 0x08, 0x00, 0x4f, 0x0f, 0x00, 0x47, 0x07, 0x03, 0x27, 0x4d, 0x47, 0x46, 0x01, 0x0f,\n+    0x4f, 0x36, 0x1f, 0x1e, 0x4f, 0x34, 0x01, 0x26, 0x00, 0x07, 0x10, 0x17, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x0d, 0x47, 0x57, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0e, 0x40, 0x40, 0x40, 0x0e, 0x62,\n+    0x47, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x00, 0x00, 0x65,\n+    0x57, 0x5c, 0x00, 0x1e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x47, 0x47, 0x5d, 0x5d, 0x4e, 0x56,\n+    0x4f, 0x07, 0x56, 0x66, 0x4f, 0x55, 0x65, 0x67, 0x66, 0x65, 0x63, 0x4d, 0x46, 0x62, 0x5d, 0x5d,\n+    0x4e, 0x56, 0x4f, 0x07, 0x56, 0x66, 0x4f, 0x55, 0x65, 0x67, 0x66, 0x65, 0x63, 0x4d, 0x46, 0x62,\n+    0x44, 0x48, 0x20, 0x57, 0x65, 0x65, 0x56, 0x5d, 0x5d, 0x5c, 0x4e, 0x4d, 0x4e, 0x45, 0x56, 0x57,\n+    0x36, 0x07, 0x56, 0x45, 0x56, 0x57, 0x36, 0x07, 0x56, 0x45, 0x56, 0x57, 0x36, 0x07, 0x56, 0x4f,\n+    0x47, 0x1e, 0x1e, 0x0f, 0x10, 0x0f, 0x10, 0x07, 0x10, 0x47, 0x65, 0x10, 0x47, 0x65, 0x40, 0x40,\n+    0x4f, 0x4c, 0x08, 0x00, 0x4f, 0x0f, 0x00, 0x47, 0x07, 0x04, 0x27, 0x4c, 0x47, 0x45, 0x01, 0x0f,\n+    0x4f, 0x36, 0x1f, 0x1e, 0x4f, 0x33, 0x01, 0x25, 0x00, 0x07, 0x10, 0x17, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x0c, 0x46, 0x56, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0d, 0x40, 0x40, 0x40, 0x0d, 0x60,\n+    0x46, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x01, 0x01, 0x64,\n+    0x56, 0x5b, 0x01, 0x1d, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x46, 0x46, 0x5c, 0x5c, 0x4d, 0x55,\n+    0x4e, 0x07, 0x55, 0x65, 0x4e, 0x54, 0x64, 0x66, 0x65, 0x64, 0x61, 0x4c, 0x45, 0x60, 0x5c, 0x5c,\n+    0x4d, 0x55, 0x4e, 0x07, 0x55, 0x65, 0x4e, 0x54, 0x64, 0x66, 0x65, 0x64, 0x61, 0x4c, 0x45, 0x60,\n+    0x43, 0x49, 0x21, 0x56, 0x64, 0x64, 0x55, 0x5c, 0x5c, 0x5b, 0x4d, 0x4c, 0x4d, 0x44, 0x55, 0x56,\n+    0x35, 0x07, 0x55, 0x44, 0x55, 0x56, 0x35, 0x07, 0x55, 0x44, 0x55, 0x56, 0x35, 0x07, 0x55, 0x4e,\n+    0x46, 0x1d, 0x1d, 0x0f, 0x11, 0x0f, 0x11, 0x07, 0x11, 0x46, 0x64, 0x11, 0x46, 0x64, 0x40, 0x40,\n+    0x4e, 0x4b, 0x09, 0x01, 0x4e, 0x0f, 0x01, 0x46, 0x07, 0x06, 0x27, 0x4b, 0x46, 0x44, 0x02, 0x0f,\n+    0x4e, 0x35, 0x1e, 0x1d, 0x4e, 0x31, 0x02, 0x24, 0x01, 0x07, 0x11, 0x16, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x0b, 0x46, 0x56, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0c, 0x40, 0x40, 0x40, 0x0c, 0x5e,\n+    0x46, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x01, 0x01, 0x63,\n+    0x56, 0x59, 0x01, 0x1c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x46, 0x46, 0x5b, 0x5b, 0x4c, 0x54,\n+    0x4e, 0x07, 0x54, 0x64, 0x4e, 0x53, 0x63, 0x66, 0x64, 0x63, 0x60, 0x4b, 0x44, 0x5e, 0x5b, 0x5b,\n+    0x4c, 0x54, 0x4e, 0x07, 0x54, 0x64, 0x4e, 0x53, 0x63, 0x66, 0x64, 0x63, 0x60, 0x4b, 0x44, 0x5e,\n+    0x41, 0x49, 0x21, 0x56, 0x63, 0x63, 0x54, 0x5b, 0x5b, 0x59, 0x4c, 0x4b, 0x4c, 0x43, 0x54, 0x56,\n+    0x34, 0x07, 0x54, 0x43, 0x54, 0x56, 0x34, 0x07, 0x54, 0x43, 0x54, 0x56, 0x34, 0x07, 0x54, 0x4e,\n+    0x46, 0x1c, 0x1c, 0x0f, 0x11, 0x0f, 0x11, 0x07, 0x11, 0x46, 0x63, 0x11, 0x46, 0x63, 0x40, 0x40,\n+    0x4e, 0x49, 0x09, 0x01, 0x4e, 0x0f, 0x01, 0x46, 0x07, 0x07, 0x27, 0x49, 0x46, 0x43, 0x03, 0x0f,\n+    0x4e, 0x34, 0x1e, 0x1c, 0x4e, 0x30, 0x03, 0x23, 0x01, 0x07, 0x11, 0x16, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x0a, 0x46, 0x56, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0c, 0x40, 0x40, 0x40, 0x0c, 0x5c,\n+    0x46, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x01, 0x01, 0x62,\n+    0x56, 0x58, 0x01, 0x1c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x46, 0x46, 0x5a, 0x5a, 0x4c, 0x54,\n+    0x4e, 0x07, 0x54, 0x64, 0x4e, 0x52, 0x62, 0x66, 0x64, 0x62, 0x5e, 0x4a, 0x44, 0x5c, 0x5a, 0x5a,\n+    0x4c, 0x54, 0x4e, 0x07, 0x54, 0x64, 0x4e, 0x52, 0x62, 0x66, 0x64, 0x62, 0x5e, 0x4a, 0x44, 0x5c,\n+    0x40, 0x49, 0x21, 0x56, 0x62, 0x62, 0x54, 0x5a, 0x5a, 0x58, 0x4c, 0x4a, 0x4c, 0x42, 0x54, 0x56,\n+    0x34, 0x07, 0x54, 0x42, 0x54, 0x56, 0x34, 0x07, 0x54, 0x42, 0x54, 0x56, 0x34, 0x07, 0x54, 0x4e,\n+    0x46, 0x1c, 0x1c, 0x0f, 0x11, 0x0f, 0x11, 0x07, 0x11, 0x46, 0x62, 0x11, 0x46, 0x62, 0x40, 0x40,\n+    0x4e, 0x48, 0x09, 0x01, 0x4e, 0x0f, 0x01, 0x46, 0x07, 0x09, 0x27, 0x48, 0x46, 0x42, 0x03, 0x0f,\n+    0x4e, 0x34, 0x1e, 0x1c, 0x4e, 0x2e, 0x03, 0x22, 0x01, 0x07, 0x11, 0x16, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x09, 0x45, 0x55, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0b, 0x40, 0x40, 0x40, 0x0b, 0x5a,\n+    0x45, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x02, 0x02, 0x61,\n+    0x55, 0x57, 0x02, 0x1b, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x45, 0x45, 0x59, 0x59, 0x4b, 0x53,\n+    0x4d, 0x07, 0x53, 0x63, 0x4d, 0x51, 0x61, 0x65, 0x63, 0x61, 0x5d, 0x49, 0x43, 0x5a, 0x59, 0x59,\n+    0x4b, 0x53, 0x4d, 0x07, 0x53, 0x63, 0x4d, 0x51, 0x61, 0x65, 0x63, 0x61, 0x5d, 0x49, 0x43, 0x5a,\n+    0x00, 0x4a, 0x22, 0x55, 0x61, 0x61, 0x53, 0x59, 0x59, 0x57, 0x4b, 0x49, 0x4b, 0x41, 0x53, 0x55,\n+    0x33, 0x07, 0x53, 0x41, 0x53, 0x55, 0x33, 0x07, 0x53, 0x41, 0x53, 0x55, 0x33, 0x07, 0x53, 0x4d,\n+    0x45, 0x1b, 0x1b, 0x0f, 0x12, 0x0f, 0x12, 0x07, 0x12, 0x45, 0x61, 0x12, 0x45, 0x61, 0x40, 0x40,\n+    0x4d, 0x47, 0x0a, 0x02, 0x4d, 0x0f, 0x02, 0x45, 0x07, 0x0a, 0x27, 0x47, 0x45, 0x41, 0x04, 0x0f,\n+    0x4d, 0x33, 0x1d, 0x1b, 0x4d, 0x2d, 0x04, 0x21, 0x02, 0x07, 0x12, 0x15, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x08, 0x45, 0x55, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0a, 0x40, 0x40, 0x40, 0x0a, 0x59,\n+    0x45, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x02, 0x02, 0x60,\n+    0x55, 0x56, 0x02, 0x1a, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x45, 0x45, 0x58, 0x58, 0x4b, 0x53,\n+    0x4d, 0x07, 0x53, 0x63, 0x4d, 0x50, 0x60, 0x65, 0x63, 0x60, 0x5b, 0x48, 0x43, 0x59, 0x58, 0x58,\n+    0x4b, 0x53, 0x4d, 0x07, 0x53, 0x63, 0x4d, 0x50, 0x60, 0x65, 0x63, 0x60, 0x5b, 0x48, 0x43, 0x59,\n+    0x01, 0x4a, 0x22, 0x55, 0x60, 0x60, 0x53, 0x58, 0x58, 0x56, 0x4b, 0x48, 0x4b, 0x40, 0x53, 0x55,\n+    0x32, 0x07, 0x53, 0x40, 0x53, 0x55, 0x32, 0x07, 0x53, 0x40, 0x53, 0x55, 0x32, 0x07, 0x53, 0x4d,\n+    0x45, 0x1a, 0x1a, 0x0f, 0x12, 0x0f, 0x12, 0x07, 0x12, 0x45, 0x60, 0x12, 0x45, 0x60, 0x40, 0x40,\n+    0x4d, 0x46, 0x0a, 0x02, 0x4d, 0x0f, 0x02, 0x45, 0x07, 0x0c, 0x27, 0x46, 0x45, 0x40, 0x04, 0x0f,\n+    0x4d, 0x32, 0x1d, 0x1a, 0x4d, 0x2b, 0x04, 0x20, 0x02, 0x07, 0x12, 0x15, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x07, 0x45, 0x55, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0a, 0x40, 0x40, 0x40, 0x0a, 0x57,\n+    0x45, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x02, 0x02, 0x5f,\n+    0x55, 0x54, 0x02, 0x1a, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x45, 0x45, 0x57, 0x57, 0x4a, 0x52,\n+    0x4d, 0x07, 0x52, 0x62, 0x4d, 0x4f, 0x5f, 0x65, 0x62, 0x5f, 0x59, 0x47, 0x42, 0x57, 0x57, 0x57,\n+    0x4a, 0x52, 0x4d, 0x07, 0x52, 0x62, 0x4d, 0x4f, 0x5f, 0x65, 0x62, 0x5f, 0x59, 0x47, 0x42, 0x57,\n+    0x03, 0x4a, 0x22, 0x55, 0x5f, 0x5f, 0x52, 0x57, 0x57, 0x54, 0x4a, 0x47, 0x4a, 0x00, 0x52, 0x55,\n+    0x32, 0x07, 0x52, 0x00, 0x52, 0x55, 0x32, 0x07, 0x52, 0x00, 0x52, 0x55, 0x32, 0x07, 0x52, 0x4d,\n+    0x45, 0x1a, 0x1a, 0x0f, 0x12, 0x0f, 0x12, 0x07, 0x12, 0x45, 0x5f, 0x12, 0x45, 0x5f, 0x40, 0x40,\n+    0x4d, 0x44, 0x0a, 0x02, 0x4d, 0x0f, 0x02, 0x45, 0x07, 0x0e, 0x27, 0x44, 0x45, 0x00, 0x05, 0x0f,\n+    0x4d, 0x32, 0x1d, 0x1a, 0x4d, 0x29, 0x05, 0x1f, 0x02, 0x07, 0x12, 0x15, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x06, 0x44, 0x54, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x09, 0x40, 0x40, 0x40, 0x09, 0x55,\n+    0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x03, 0x03, 0x5e,\n+    0x54, 0x53, 0x03, 0x19, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x56, 0x56, 0x49, 0x51,\n+    0x4c, 0x07, 0x51, 0x61, 0x4c, 0x4e, 0x5e, 0x64, 0x61, 0x5e, 0x58, 0x46, 0x41, 0x55, 0x56, 0x56,\n+    0x49, 0x51, 0x4c, 0x07, 0x51, 0x61, 0x4c, 0x4e, 0x5e, 0x64, 0x61, 0x5e, 0x58, 0x46, 0x41, 0x55,\n+    0x04, 0x4b, 0x23, 0x54, 0x5e, 0x5e, 0x51, 0x56, 0x56, 0x53, 0x49, 0x46, 0x49, 0x01, 0x51, 0x54,\n+    0x31, 0x07, 0x51, 0x01, 0x51, 0x54, 0x31, 0x07, 0x51, 0x01, 0x51, 0x54, 0x31, 0x07, 0x51, 0x4c,\n+    0x44, 0x19, 0x19, 0x0f, 0x13, 0x0f, 0x13, 0x07, 0x13, 0x44, 0x5e, 0x13, 0x44, 0x5e, 0x40, 0x40,\n+    0x4c, 0x43, 0x0b, 0x03, 0x4c, 0x0f, 0x03, 0x44, 0x07, 0x0f, 0x27, 0x43, 0x44, 0x01, 0x06, 0x0f,\n+    0x4c, 0x31, 0x1c, 0x19, 0x4c, 0x28, 0x06, 0x1e, 0x03, 0x07, 0x13, 0x14, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x05, 0x44, 0x54, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x09, 0x40, 0x40, 0x40, 0x09, 0x53,\n+    0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x03, 0x03, 0x5d,\n+    0x54, 0x52, 0x03, 0x19, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x55, 0x55, 0x49, 0x51,\n+    0x4c, 0x07, 0x51, 0x61, 0x4c, 0x4d, 0x5d, 0x64, 0x61, 0x5d, 0x56, 0x45, 0x41, 0x53, 0x55, 0x55,\n+    0x49, 0x51, 0x4c, 0x07, 0x51, 0x61, 0x4c, 0x4d, 0x5d, 0x64, 0x61, 0x5d, 0x56, 0x45, 0x41, 0x53,\n+    0x05, 0x4b, 0x23, 0x54, 0x5d, 0x5d, 0x51, 0x55, 0x55, 0x52, 0x49, 0x45, 0x49, 0x02, 0x51, 0x54,\n+    0x31, 0x07, 0x51, 0x02, 0x51, 0x54, 0x31, 0x07, 0x51, 0x02, 0x51, 0x54, 0x31, 0x07, 0x51, 0x4c,\n+    0x44, 0x19, 0x19, 0x0f, 0x13, 0x0f, 0x13, 0x07, 0x13, 0x44, 0x5d, 0x13, 0x44, 0x5d, 0x40, 0x40,\n+    0x4c, 0x42, 0x0b, 0x03, 0x4c, 0x0f, 0x03, 0x44, 0x07, 0x11, 0x27, 0x42, 0x44, 0x02, 0x06, 0x0f,\n+    0x4c, 0x31, 0x1c, 0x19, 0x4c, 0x26, 0x06, 0x1d, 0x03, 0x07, 0x13, 0x14, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x04, 0x44, 0x54, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x08, 0x40, 0x40, 0x40, 0x08, 0x51,\n+    0x44, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x03, 0x03, 0x5c,\n+    0x54, 0x51, 0x03, 0x18, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x54, 0x54, 0x48, 0x50,\n+    0x4c, 0x07, 0x50, 0x60, 0x4c, 0x4c, 0x5c, 0x64, 0x60, 0x5c, 0x55, 0x44, 0x40, 0x51, 0x54, 0x54,\n+    0x48, 0x50, 0x4c, 0x07, 0x50, 0x60, 0x4c, 0x4c, 0x5c, 0x64, 0x60, 0x5c, 0x55, 0x44, 0x40, 0x51,\n+    0x06, 0x4b, 0x23, 0x54, 0x5c, 0x5c, 0x50, 0x54, 0x54, 0x51, 0x48, 0x44, 0x48, 0x03, 0x50, 0x54,\n+    0x30, 0x07, 0x50, 0x03, 0x50, 0x54, 0x30, 0x07, 0x50, 0x03, 0x50, 0x54, 0x30, 0x07, 0x50, 0x4c,\n+    0x44, 0x18, 0x18, 0x0f, 0x13, 0x0f, 0x13, 0x07, 0x13, 0x44, 0x5c, 0x13, 0x44, 0x5c, 0x40, 0x40,\n+    0x4c, 0x41, 0x0b, 0x03, 0x4c, 0x0f, 0x03, 0x44, 0x07, 0x12, 0x27, 0x41, 0x44, 0x03, 0x07, 0x0f,\n+    0x4c, 0x30, 0x1c, 0x18, 0x4c, 0x25, 0x07, 0x1c, 0x03, 0x07, 0x13, 0x14, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x03, 0x43, 0x53, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x40, 0x40, 0x40, 0x07, 0x4f,\n+    0x43, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x04, 0x04, 0x5b,\n+    0x53, 0x4f, 0x04, 0x17, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x43, 0x43, 0x53, 0x53, 0x47, 0x4f,\n+    0x4b, 0x07, 0x4f, 0x5f, 0x4b, 0x4b, 0x5b, 0x63, 0x5f, 0x5b, 0x53, 0x43, 0x00, 0x4f, 0x53, 0x53,\n+    0x47, 0x4f, 0x4b, 0x07, 0x4f, 0x5f, 0x4b, 0x4b, 0x5b, 0x63, 0x5f, 0x5b, 0x53, 0x43, 0x00, 0x4f,\n+    0x08, 0x4c, 0x24, 0x53, 0x5b, 0x5b, 0x4f, 0x53, 0x53, 0x4f, 0x47, 0x43, 0x47, 0x04, 0x4f, 0x53,\n+    0x2f, 0x07, 0x4f, 0x04, 0x4f, 0x53, 0x2f, 0x07, 0x4f, 0x04, 0x4f, 0x53, 0x2f, 0x07, 0x4f, 0x4b,\n+    0x43, 0x17, 0x17, 0x0f, 0x14, 0x0f, 0x14, 0x07, 0x14, 0x43, 0x5b, 0x14, 0x43, 0x5b, 0x40, 0x40,\n+    0x4b, 0x00, 0x0c, 0x04, 0x4b, 0x0f, 0x04, 0x43, 0x07, 0x14, 0x27, 0x00, 0x43, 0x04, 0x08, 0x0f,\n+    0x4b, 0x2f, 0x1b, 0x17, 0x4b, 0x23, 0x08, 0x1b, 0x04, 0x07, 0x14, 0x13, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x02, 0x43, 0x53, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x40, 0x40, 0x40, 0x07, 0x4d,\n+    0x43, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x04, 0x04, 0x5a,\n+    0x53, 0x4e, 0x04, 0x17, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x43, 0x43, 0x52, 0x52, 0x47, 0x4f,\n+    0x4b, 0x07, 0x4f, 0x5f, 0x4b, 0x4a, 0x5a, 0x63, 0x5f, 0x5a, 0x52, 0x42, 0x00, 0x4d, 0x52, 0x52,\n+    0x47, 0x4f, 0x4b, 0x07, 0x4f, 0x5f, 0x4b, 0x4a, 0x5a, 0x63, 0x5f, 0x5a, 0x52, 0x42, 0x00, 0x4d,\n+    0x09, 0x4c, 0x24, 0x53, 0x5a, 0x5a, 0x4f, 0x52, 0x52, 0x4e, 0x47, 0x42, 0x47, 0x05, 0x4f, 0x53,\n+    0x2f, 0x07, 0x4f, 0x05, 0x4f, 0x53, 0x2f, 0x07, 0x4f, 0x05, 0x4f, 0x53, 0x2f, 0x07, 0x4f, 0x4b,\n+    0x43, 0x17, 0x17, 0x0f, 0x14, 0x0f, 0x14, 0x07, 0x14, 0x43, 0x5a, 0x14, 0x43, 0x5a, 0x40, 0x40,\n+    0x4b, 0x01, 0x0c, 0x04, 0x4b, 0x0f, 0x04, 0x43, 0x07, 0x15, 0x27, 0x01, 0x43, 0x05, 0x08, 0x0f,\n+    0x4b, 0x2f, 0x1b, 0x17, 0x4b, 0x22, 0x08, 0x1a, 0x04, 0x07, 0x14, 0x13, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x01, 0x43, 0x53, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x06, 0x40, 0x40, 0x40, 0x06, 0x4b,\n+    0x43, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x04, 0x04, 0x59,\n+    0x53, 0x4d, 0x04, 0x16, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x43, 0x43, 0x51, 0x51, 0x46, 0x4e,\n+    0x4b, 0x07, 0x4e, 0x5e, 0x4b, 0x49, 0x59, 0x63, 0x5e, 0x59, 0x50, 0x41, 0x01, 0x4b, 0x51, 0x51,\n+    0x46, 0x4e, 0x4b, 0x07, 0x4e, 0x5e, 0x4b, 0x49, 0x59, 0x63, 0x5e, 0x59, 0x50, 0x41, 0x01, 0x4b,\n+    0x0a, 0x4c, 0x24, 0x53, 0x59, 0x59, 0x4e, 0x51, 0x51, 0x4d, 0x46, 0x41, 0x46, 0x06, 0x4e, 0x53,\n+    0x2e, 0x07, 0x4e, 0x06, 0x4e, 0x53, 0x2e, 0x07, 0x4e, 0x06, 0x4e, 0x53, 0x2e, 0x07, 0x4e, 0x4b,\n+    0x43, 0x16, 0x16, 0x0f, 0x14, 0x0f, 0x14, 0x07, 0x14, 0x43, 0x59, 0x14, 0x43, 0x59, 0x40, 0x40,\n+    0x4b, 0x02, 0x0c, 0x04, 0x4b, 0x0f, 0x04, 0x43, 0x07, 0x17, 0x27, 0x02, 0x43, 0x06, 0x09, 0x0f,\n+    0x4b, 0x2e, 0x1b, 0x16, 0x4b, 0x20, 0x09, 0x19, 0x04, 0x07, 0x14, 0x13, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x00, 0x43, 0x53, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x05, 0x40, 0x40, 0x40, 0x05, 0x4a,\n+    0x43, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x04, 0x04, 0x59,\n+    0x53, 0x4c, 0x04, 0x15, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x43, 0x43, 0x51, 0x51, 0x46, 0x4e,\n+    0x4b, 0x07, 0x4e, 0x5e, 0x4b, 0x49, 0x59, 0x63, 0x5e, 0x59, 0x4f, 0x41, 0x01, 0x4a, 0x51, 0x51,\n+    0x46, 0x4e, 0x4b, 0x07, 0x4e, 0x5e, 0x4b, 0x49, 0x59, 0x63, 0x5e, 0x59, 0x4f, 0x41, 0x01, 0x4a,\n+    0x0b, 0x4d, 0x24, 0x53, 0x59, 0x59, 0x4e, 0x51, 0x51, 0x4c, 0x46, 0x41, 0x46, 0x06, 0x4e, 0x53,\n+    0x2d, 0x07, 0x4e, 0x06, 0x4e, 0x53, 0x2d, 0x07, 0x4e, 0x06, 0x4e, 0x53, 0x2d, 0x07, 0x4e, 0x4b,\n+    0x43, 0x15, 0x15, 0x0f, 0x14, 0x0f, 0x14, 0x07, 0x14, 0x43, 0x59, 0x14, 0x43, 0x59, 0x40, 0x40,\n+    0x4b, 0x03, 0x0c, 0x04, 0x4b, 0x0f, 0x04, 0x43, 0x07, 0x18, 0x27, 0x03, 0x43, 0x06, 0x09, 0x0f,\n+    0x4b, 0x2d, 0x1a, 0x15, 0x4b, 0x1e, 0x09, 0x18, 0x04, 0x07, 0x14, 0x12, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x00, 0x42, 0x52, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x05, 0x40, 0x40, 0x40, 0x05, 0x48,\n+    0x42, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x05, 0x05, 0x58,\n+    0x52, 0x4a, 0x05, 0x15, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x42, 0x50, 0x50, 0x45, 0x4d,\n+    0x4a, 0x07, 0x4d, 0x5d, 0x4a, 0x48, 0x58, 0x62, 0x5d, 0x58, 0x4d, 0x40, 0x02, 0x48, 0x50, 0x50,\n+    0x45, 0x4d, 0x4a, 0x07, 0x4d, 0x5d, 0x4a, 0x48, 0x58, 0x62, 0x5d, 0x58, 0x4d, 0x40, 0x02, 0x48,\n+    0x0d, 0x4d, 0x25, 0x52, 0x58, 0x58, 0x4d, 0x50, 0x50, 0x4a, 0x45, 0x40, 0x45, 0x07, 0x4d, 0x52,\n+    0x2d, 0x07, 0x4d, 0x07, 0x4d, 0x52, 0x2d, 0x07, 0x4d, 0x07, 0x4d, 0x52, 0x2d, 0x07, 0x4d, 0x4a,\n+    0x42, 0x15, 0x15, 0x0f, 0x15, 0x0f, 0x15, 0x07, 0x15, 0x42, 0x58, 0x15, 0x42, 0x58, 0x40, 0x40,\n+    0x4a, 0x05, 0x0d, 0x05, 0x4a, 0x0f, 0x05, 0x42, 0x07, 0x1a, 0x27, 0x05, 0x42, 0x07, 0x0a, 0x0f,\n+    0x4a, 0x2d, 0x1a, 0x15, 0x4a, 0x1d, 0x0a, 0x18, 0x05, 0x07, 0x15, 0x12, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x40, 0x42, 0x52, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, 0x40, 0x04, 0x46,\n+    0x42, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x05, 0x05, 0x57,\n+    0x52, 0x49, 0x05, 0x14, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4f, 0x4f, 0x44, 0x4c,\n+    0x4a, 0x07, 0x4c, 0x5c, 0x4a, 0x47, 0x57, 0x62, 0x5c, 0x57, 0x4b, 0x00, 0x03, 0x46, 0x4f, 0x4f,\n+    0x44, 0x4c, 0x4a, 0x07, 0x4c, 0x5c, 0x4a, 0x47, 0x57, 0x62, 0x5c, 0x57, 0x4b, 0x00, 0x03, 0x46,\n+    0x0e, 0x4d, 0x25, 0x52, 0x57, 0x57, 0x4c, 0x4f, 0x4f, 0x49, 0x44, 0x00, 0x44, 0x08, 0x4c, 0x52,\n+    0x2c, 0x07, 0x4c, 0x08, 0x4c, 0x52, 0x2c, 0x07, 0x4c, 0x08, 0x4c, 0x52, 0x2c, 0x07, 0x4c, 0x4a,\n+    0x42, 0x14, 0x14, 0x0f, 0x15, 0x0f, 0x15, 0x07, 0x15, 0x42, 0x57, 0x15, 0x42, 0x57, 0x40, 0x40,\n+    0x4a, 0x06, 0x0d, 0x05, 0x4a, 0x0f, 0x05, 0x42, 0x07, 0x1c, 0x27, 0x06, 0x42, 0x08, 0x0b, 0x0f,\n+    0x4a, 0x2c, 0x1a, 0x14, 0x4a, 0x1b, 0x0b, 0x17, 0x05, 0x07, 0x15, 0x12, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x41, 0x42, 0x52, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x40, 0x40, 0x40, 0x04, 0x44,\n+    0x42, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x05, 0x05, 0x56,\n+    0x52, 0x48, 0x05, 0x14, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4e, 0x4e, 0x44, 0x4c,\n+    0x4a, 0x07, 0x4c, 0x5c, 0x4a, 0x46, 0x56, 0x62, 0x5c, 0x56, 0x4a, 0x01, 0x03, 0x44, 0x4e, 0x4e,\n+    0x44, 0x4c, 0x4a, 0x07, 0x4c, 0x5c, 0x4a, 0x46, 0x56, 0x62, 0x5c, 0x56, 0x4a, 0x01, 0x03, 0x44,\n+    0x0f, 0x4d, 0x25, 0x52, 0x56, 0x56, 0x4c, 0x4e, 0x4e, 0x48, 0x44, 0x01, 0x44, 0x09, 0x4c, 0x52,\n+    0x2c, 0x07, 0x4c, 0x09, 0x4c, 0x52, 0x2c, 0x07, 0x4c, 0x09, 0x4c, 0x52, 0x2c, 0x07, 0x4c, 0x4a,\n+    0x42, 0x14, 0x14, 0x0f, 0x15, 0x0f, 0x15, 0x07, 0x15, 0x42, 0x56, 0x15, 0x42, 0x56, 0x40, 0x40,\n+    0x4a, 0x07, 0x0d, 0x05, 0x4a, 0x0f, 0x05, 0x42, 0x07, 0x1d, 0x27, 0x07, 0x42, 0x09, 0x0b, 0x0f,\n+    0x4a, 0x2c, 0x1a, 0x14, 0x4a, 0x1a, 0x0b, 0x16, 0x05, 0x07, 0x15, 0x12, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x42, 0x41, 0x51, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x03, 0x40, 0x40, 0x40, 0x03, 0x42,\n+    0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x06, 0x06, 0x55,\n+    0x51, 0x47, 0x06, 0x13, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4d, 0x4d, 0x43, 0x4b,\n+    0x49, 0x07, 0x4b, 0x5b, 0x49, 0x45, 0x55, 0x61, 0x5b, 0x55, 0x48, 0x02, 0x04, 0x42, 0x4d, 0x4d,\n+    0x43, 0x4b, 0x49, 0x07, 0x4b, 0x5b, 0x49, 0x45, 0x55, 0x61, 0x5b, 0x55, 0x48, 0x02, 0x04, 0x42,\n+    0x10, 0x4e, 0x26, 0x51, 0x55, 0x55, 0x4b, 0x4d, 0x4d, 0x47, 0x43, 0x02, 0x43, 0x0a, 0x4b, 0x51,\n+    0x2b, 0x07, 0x4b, 0x0a, 0x4b, 0x51, 0x2b, 0x07, 0x4b, 0x0a, 0x4b, 0x51, 0x2b, 0x07, 0x4b, 0x49,\n+    0x41, 0x13, 0x13, 0x0f, 0x16, 0x0f, 0x16, 0x07, 0x16, 0x41, 0x55, 0x16, 0x41, 0x55, 0x40, 0x40,\n+    0x49, 0x08, 0x0e, 0x06, 0x49, 0x0f, 0x06, 0x41, 0x07, 0x1f, 0x27, 0x08, 0x41, 0x0a, 0x0c, 0x0f,\n+    0x49, 0x2b, 0x19, 0x13, 0x49, 0x18, 0x0c, 0x15, 0x06, 0x07, 0x16, 0x11, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x43, 0x41, 0x51, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x02, 0x40, 0x40, 0x40, 0x02, 0x40,\n+    0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x06, 0x06, 0x54,\n+    0x51, 0x45, 0x06, 0x12, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4c, 0x4c, 0x42, 0x4a,\n+    0x49, 0x07, 0x4a, 0x5a, 0x49, 0x44, 0x54, 0x61, 0x5a, 0x54, 0x47, 0x03, 0x05, 0x40, 0x4c, 0x4c,\n+    0x42, 0x4a, 0x49, 0x07, 0x4a, 0x5a, 0x49, 0x44, 0x54, 0x61, 0x5a, 0x54, 0x47, 0x03, 0x05, 0x40,\n+    0x12, 0x4e, 0x26, 0x51, 0x54, 0x54, 0x4a, 0x4c, 0x4c, 0x45, 0x42, 0x03, 0x42, 0x0b, 0x4a, 0x51,\n+    0x2a, 0x07, 0x4a, 0x0b, 0x4a, 0x51, 0x2a, 0x07, 0x4a, 0x0b, 0x4a, 0x51, 0x2a, 0x07, 0x4a, 0x49,\n+    0x41, 0x12, 0x12, 0x0f, 0x16, 0x0f, 0x16, 0x07, 0x16, 0x41, 0x54, 0x16, 0x41, 0x54, 0x40, 0x40,\n+    0x49, 0x0a, 0x0e, 0x06, 0x49, 0x0f, 0x06, 0x41, 0x07, 0x20, 0x27, 0x0a, 0x41, 0x0b, 0x0d, 0x0f,\n+    0x49, 0x2a, 0x19, 0x12, 0x49, 0x17, 0x0d, 0x14, 0x06, 0x07, 0x16, 0x11, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x44, 0x41, 0x51, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x02, 0x40, 0x40, 0x40, 0x02, 0x01,\n+    0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x06, 0x06, 0x53,\n+    0x51, 0x44, 0x06, 0x12, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4b, 0x4b, 0x42, 0x4a,\n+    0x49, 0x07, 0x4a, 0x5a, 0x49, 0x43, 0x53, 0x61, 0x5a, 0x53, 0x45, 0x04, 0x05, 0x01, 0x4b, 0x4b,\n+    0x42, 0x4a, 0x49, 0x07, 0x4a, 0x5a, 0x49, 0x43, 0x53, 0x61, 0x5a, 0x53, 0x45, 0x04, 0x05, 0x01,\n+    0x13, 0x4e, 0x26, 0x51, 0x53, 0x53, 0x4a, 0x4b, 0x4b, 0x44, 0x42, 0x04, 0x42, 0x0c, 0x4a, 0x51,\n+    0x2a, 0x07, 0x4a, 0x0c, 0x4a, 0x51, 0x2a, 0x07, 0x4a, 0x0c, 0x4a, 0x51, 0x2a, 0x07, 0x4a, 0x49,\n+    0x41, 0x12, 0x12, 0x0f, 0x16, 0x0f, 0x16, 0x07, 0x16, 0x41, 0x53, 0x16, 0x41, 0x53, 0x40, 0x40,\n+    0x49, 0x0b, 0x0e, 0x06, 0x49, 0x0f, 0x06, 0x41, 0x07, 0x22, 0x27, 0x0b, 0x41, 0x0c, 0x0d, 0x0f,\n+    0x49, 0x2a, 0x19, 0x12, 0x49, 0x15, 0x0d, 0x13, 0x06, 0x07, 0x16, 0x11, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x45, 0x40, 0x50, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x01, 0x40, 0x40, 0x40, 0x01, 0x03,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x07, 0x07, 0x52,\n+    0x50, 0x43, 0x07, 0x11, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4a, 0x4a, 0x41, 0x49,\n+    0x48, 0x07, 0x49, 0x59, 0x48, 0x42, 0x52, 0x60, 0x59, 0x52, 0x44, 0x05, 0x06, 0x03, 0x4a, 0x4a,\n+    0x41, 0x49, 0x48, 0x07, 0x49, 0x59, 0x48, 0x42, 0x52, 0x60, 0x59, 0x52, 0x44, 0x05, 0x06, 0x03,\n+    0x14, 0x4f, 0x27, 0x50, 0x52, 0x52, 0x49, 0x4a, 0x4a, 0x43, 0x41, 0x05, 0x41, 0x0d, 0x49, 0x50,\n+    0x29, 0x07, 0x49, 0x0d, 0x49, 0x50, 0x29, 0x07, 0x49, 0x0d, 0x49, 0x50, 0x29, 0x07, 0x49, 0x48,\n+    0x40, 0x11, 0x11, 0x0f, 0x17, 0x0f, 0x17, 0x07, 0x17, 0x40, 0x52, 0x17, 0x40, 0x52, 0x40, 0x40,\n+    0x48, 0x0c, 0x0f, 0x07, 0x48, 0x0f, 0x07, 0x40, 0x07, 0x23, 0x27, 0x0c, 0x40, 0x0d, 0x0e, 0x0f,\n+    0x48, 0x29, 0x18, 0x11, 0x48, 0x14, 0x0e, 0x12, 0x07, 0x07, 0x17, 0x10, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x46, 0x40, 0x50, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x04,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x07, 0x07, 0x51,\n+    0x50, 0x42, 0x07, 0x10, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x49, 0x49, 0x41, 0x49,\n+    0x48, 0x07, 0x49, 0x59, 0x48, 0x41, 0x51, 0x60, 0x59, 0x51, 0x42, 0x06, 0x06, 0x04, 0x49, 0x49,\n+    0x41, 0x49, 0x48, 0x07, 0x49, 0x59, 0x48, 0x41, 0x51, 0x60, 0x59, 0x51, 0x42, 0x06, 0x06, 0x04,\n+    0x15, 0x4f, 0x27, 0x50, 0x51, 0x51, 0x49, 0x49, 0x49, 0x42, 0x41, 0x06, 0x41, 0x0e, 0x49, 0x50,\n+    0x28, 0x07, 0x49, 0x0e, 0x49, 0x50, 0x28, 0x07, 0x49, 0x0e, 0x49, 0x50, 0x28, 0x07, 0x49, 0x48,\n+    0x40, 0x10, 0x10, 0x0f, 0x17, 0x0f, 0x17, 0x07, 0x17, 0x40, 0x51, 0x17, 0x40, 0x51, 0x40, 0x40,\n+    0x48, 0x0d, 0x0f, 0x07, 0x48, 0x0f, 0x07, 0x40, 0x07, 0x25, 0x27, 0x0d, 0x40, 0x0e, 0x0e, 0x0f,\n+    0x48, 0x28, 0x18, 0x10, 0x48, 0x12, 0x0e, 0x11, 0x07, 0x07, 0x17, 0x10, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x47, 0x40, 0x50, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40, 0x40, 0x40, 0x00, 0x06,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x07, 0x07, 0x50,\n+    0x50, 0x40, 0x07, 0x10, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x48, 0x48, 0x40, 0x48,\n+    0x48, 0x07, 0x48, 0x58, 0x48, 0x40, 0x50, 0x60, 0x58, 0x50, 0x40, 0x07, 0x07, 0x06, 0x48, 0x48,\n+    0x40, 0x48, 0x48, 0x07, 0x48, 0x58, 0x48, 0x40, 0x50, 0x60, 0x58, 0x50, 0x40, 0x07, 0x07, 0x06,\n+    0x17, 0x4f, 0x27, 0x50, 0x50, 0x50, 0x48, 0x48, 0x48, 0x40, 0x40, 0x07, 0x40, 0x0f, 0x48, 0x50,\n+    0x28, 0x07, 0x48, 0x0f, 0x48, 0x50, 0x28, 0x07, 0x48, 0x0f, 0x48, 0x50, 0x28, 0x07, 0x48, 0x48,\n+    0x40, 0x10, 0x10, 0x0f, 0x17, 0x0f, 0x17, 0x07, 0x17, 0x40, 0x50, 0x17, 0x40, 0x50, 0x40, 0x40,\n+    0x48, 0x0f, 0x0f, 0x07, 0x48, 0x0f, 0x07, 0x40, 0x07, 0x27, 0x27, 0x0f, 0x40, 0x0f, 0x0f, 0x0f,\n+    0x48, 0x28, 0x18, 0x10, 0x48, 0x10, 0x0f, 0x10, 0x07, 0x07, 0x17, 0x10, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x48, 0x00, 0x4f, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x08,\n+    0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x08, 0x08, 0x4f,\n+    0x4f, 0x00, 0x08, 0x0f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x47, 0x47, 0x00, 0x47,\n+    0x47, 0x07, 0x47, 0x57, 0x47, 0x00, 0x4f, 0x5f, 0x57, 0x4f, 0x00, 0x08, 0x08, 0x08, 0x47, 0x47,\n+    0x00, 0x47, 0x47, 0x07, 0x47, 0x57, 0x47, 0x00, 0x4f, 0x5f, 0x57, 0x4f, 0x00, 0x08, 0x08, 0x08,\n+    0x18, 0x50, 0x28, 0x4f, 0x4f, 0x4f, 0x47, 0x47, 0x47, 0x00, 0x00, 0x08, 0x00, 0x10, 0x47, 0x4f,\n+    0x27, 0x07, 0x47, 0x10, 0x47, 0x4f, 0x27, 0x07, 0x47, 0x10, 0x47, 0x4f, 0x27, 0x07, 0x47, 0x47,\n+    0x00, 0x0f, 0x0f, 0x0f, 0x18, 0x0f, 0x18, 0x07, 0x18, 0x00, 0x4f, 0x18, 0x00, 0x4f, 0x40, 0x40,\n+    0x47, 0x10, 0x10, 0x08, 0x47, 0x0f, 0x08, 0x00, 0x07, 0x28, 0x27, 0x10, 0x00, 0x10, 0x10, 0x0f,\n+    0x47, 0x27, 0x17, 0x0f, 0x47, 0x0f, 0x10, 0x0f, 0x08, 0x07, 0x18, 0x0f, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x49, 0x00, 0x4f, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0a,\n+    0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x08, 0x08, 0x4e,\n+    0x4f, 0x01, 0x08, 0x0f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x46, 0x46, 0x00, 0x47,\n+    0x47, 0x07, 0x47, 0x57, 0x47, 0x01, 0x4e, 0x5f, 0x57, 0x4e, 0x02, 0x09, 0x08, 0x0a, 0x46, 0x46,\n+    0x00, 0x47, 0x47, 0x07, 0x47, 0x57, 0x47, 0x01, 0x4e, 0x5f, 0x57, 0x4e, 0x02, 0x09, 0x08, 0x0a,\n+    0x19, 0x50, 0x28, 0x4f, 0x4e, 0x4e, 0x47, 0x46, 0x46, 0x01, 0x00, 0x09, 0x00, 0x11, 0x47, 0x4f,\n+    0x27, 0x07, 0x47, 0x11, 0x47, 0x4f, 0x27, 0x07, 0x47, 0x11, 0x47, 0x4f, 0x27, 0x07, 0x47, 0x47,\n+    0x00, 0x0f, 0x0f, 0x0f, 0x18, 0x0f, 0x18, 0x07, 0x18, 0x00, 0x4e, 0x18, 0x00, 0x4e, 0x40, 0x40,\n+    0x47, 0x11, 0x10, 0x08, 0x47, 0x0f, 0x08, 0x00, 0x07, 0x2a, 0x27, 0x11, 0x00, 0x11, 0x10, 0x0f,\n+    0x47, 0x27, 0x17, 0x0f, 0x47, 0x0d, 0x10, 0x0e, 0x08, 0x07, 0x18, 0x0f, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4a, 0x00, 0x4f, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 0x40, 0x40, 0x40, 0x41, 0x0c,\n+    0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x08, 0x08, 0x4d,\n+    0x4f, 0x02, 0x08, 0x0e, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x45, 0x45, 0x01, 0x46,\n+    0x47, 0x07, 0x46, 0x56, 0x47, 0x02, 0x4d, 0x5f, 0x56, 0x4d, 0x03, 0x0a, 0x09, 0x0c, 0x45, 0x45,\n+    0x01, 0x46, 0x47, 0x07, 0x46, 0x56, 0x47, 0x02, 0x4d, 0x5f, 0x56, 0x4d, 0x03, 0x0a, 0x09, 0x0c,\n+    0x1a, 0x50, 0x28, 0x4f, 0x4d, 0x4d, 0x46, 0x45, 0x45, 0x02, 0x01, 0x0a, 0x01, 0x12, 0x46, 0x4f,\n+    0x26, 0x07, 0x46, 0x12, 0x46, 0x4f, 0x26, 0x07, 0x46, 0x12, 0x46, 0x4f, 0x26, 0x07, 0x46, 0x47,\n+    0x00, 0x0e, 0x0e, 0x0f, 0x18, 0x0f, 0x18, 0x07, 0x18, 0x00, 0x4d, 0x18, 0x00, 0x4d, 0x40, 0x40,\n+    0x47, 0x12, 0x10, 0x08, 0x47, 0x0f, 0x08, 0x00, 0x07, 0x2b, 0x27, 0x12, 0x00, 0x12, 0x11, 0x0f,\n+    0x47, 0x26, 0x17, 0x0e, 0x47, 0x0c, 0x11, 0x0d, 0x08, 0x07, 0x18, 0x0f, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4b, 0x01, 0x4e, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x40, 0x40, 0x40, 0x42, 0x0e,\n+    0x01, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x09, 0x09, 0x4c,\n+    0x4e, 0x04, 0x09, 0x0d, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x01, 0x01, 0x44, 0x44, 0x02, 0x45,\n+    0x46, 0x07, 0x45, 0x55, 0x46, 0x03, 0x4c, 0x5e, 0x55, 0x4c, 0x05, 0x0b, 0x0a, 0x0e, 0x44, 0x44,\n+    0x02, 0x45, 0x46, 0x07, 0x45, 0x55, 0x46, 0x03, 0x4c, 0x5e, 0x55, 0x4c, 0x05, 0x0b, 0x0a, 0x0e,\n+    0x1c, 0x51, 0x29, 0x4e, 0x4c, 0x4c, 0x45, 0x44, 0x44, 0x04, 0x02, 0x0b, 0x02, 0x13, 0x45, 0x4e,\n+    0x25, 0x07, 0x45, 0x13, 0x45, 0x4e, 0x25, 0x07, 0x45, 0x13, 0x45, 0x4e, 0x25, 0x07, 0x45, 0x46,\n+    0x01, 0x0d, 0x0d, 0x0f, 0x19, 0x0f, 0x19, 0x07, 0x19, 0x01, 0x4c, 0x19, 0x01, 0x4c, 0x40, 0x40,\n+    0x46, 0x14, 0x11, 0x09, 0x46, 0x0f, 0x09, 0x01, 0x07, 0x2d, 0x27, 0x14, 0x01, 0x13, 0x12, 0x0f,\n+    0x46, 0x25, 0x16, 0x0d, 0x46, 0x0a, 0x12, 0x0c, 0x09, 0x07, 0x19, 0x0e, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4c, 0x01, 0x4e, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x40, 0x40, 0x40, 0x42, 0x10,\n+    0x01, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x09, 0x09, 0x4b,\n+    0x4e, 0x05, 0x09, 0x0d, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x01, 0x01, 0x43, 0x43, 0x02, 0x45,\n+    0x46, 0x07, 0x45, 0x55, 0x46, 0x04, 0x4b, 0x5e, 0x55, 0x4b, 0x06, 0x0c, 0x0a, 0x10, 0x43, 0x43,\n+    0x02, 0x45, 0x46, 0x07, 0x45, 0x55, 0x46, 0x04, 0x4b, 0x5e, 0x55, 0x4b, 0x06, 0x0c, 0x0a, 0x10,\n+    0x1d, 0x51, 0x29, 0x4e, 0x4b, 0x4b, 0x45, 0x43, 0x43, 0x05, 0x02, 0x0c, 0x02, 0x14, 0x45, 0x4e,\n+    0x25, 0x07, 0x45, 0x14, 0x45, 0x4e, 0x25, 0x07, 0x45, 0x14, 0x45, 0x4e, 0x25, 0x07, 0x45, 0x46,\n+    0x01, 0x0d, 0x0d, 0x0f, 0x19, 0x0f, 0x19, 0x07, 0x19, 0x01, 0x4b, 0x19, 0x01, 0x4b, 0x40, 0x40,\n+    0x46, 0x15, 0x11, 0x09, 0x46, 0x0f, 0x09, 0x01, 0x07, 0x2e, 0x27, 0x15, 0x01, 0x14, 0x12, 0x0f,\n+    0x46, 0x25, 0x16, 0x0d, 0x46, 0x09, 0x12, 0x0b, 0x09, 0x07, 0x19, 0x0e, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4d, 0x01, 0x4e, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x43, 0x40, 0x40, 0x40, 0x43, 0x12,\n+    0x01, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x09, 0x09, 0x4a,\n+    0x4e, 0x06, 0x09, 0x0c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x01, 0x01, 0x42, 0x42, 0x03, 0x44,\n+    0x46, 0x07, 0x44, 0x54, 0x46, 0x05, 0x4a, 0x5e, 0x54, 0x4a, 0x08, 0x0d, 0x0b, 0x12, 0x42, 0x42,\n+    0x03, 0x44, 0x46, 0x07, 0x44, 0x54, 0x46, 0x05, 0x4a, 0x5e, 0x54, 0x4a, 0x08, 0x0d, 0x0b, 0x12,\n+    0x1e, 0x51, 0x29, 0x4e, 0x4a, 0x4a, 0x44, 0x42, 0x42, 0x06, 0x03, 0x0d, 0x03, 0x15, 0x44, 0x4e,\n+    0x24, 0x07, 0x44, 0x15, 0x44, 0x4e, 0x24, 0x07, 0x44, 0x15, 0x44, 0x4e, 0x24, 0x07, 0x44, 0x46,\n+    0x01, 0x0c, 0x0c, 0x0f, 0x19, 0x0f, 0x19, 0x07, 0x19, 0x01, 0x4a, 0x19, 0x01, 0x4a, 0x40, 0x40,\n+    0x46, 0x16, 0x11, 0x09, 0x46, 0x0f, 0x09, 0x01, 0x07, 0x30, 0x27, 0x16, 0x01, 0x15, 0x13, 0x0f,\n+    0x46, 0x24, 0x16, 0x0c, 0x46, 0x07, 0x13, 0x0a, 0x09, 0x07, 0x19, 0x0e, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4e, 0x01, 0x4e, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x13,\n+    0x01, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x09, 0x09, 0x4a,\n+    0x4e, 0x07, 0x09, 0x0b, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x01, 0x01, 0x42, 0x42, 0x03, 0x44,\n+    0x46, 0x07, 0x44, 0x54, 0x46, 0x05, 0x4a, 0x5e, 0x54, 0x4a, 0x09, 0x0d, 0x0b, 0x13, 0x42, 0x42,\n+    0x03, 0x44, 0x46, 0x07, 0x44, 0x54, 0x46, 0x05, 0x4a, 0x5e, 0x54, 0x4a, 0x09, 0x0d, 0x0b, 0x13,\n+    0x1f, 0x52, 0x29, 0x4e, 0x4a, 0x4a, 0x44, 0x42, 0x42, 0x07, 0x03, 0x0d, 0x03, 0x15, 0x44, 0x4e,\n+    0x23, 0x07, 0x44, 0x15, 0x44, 0x4e, 0x23, 0x07, 0x44, 0x15, 0x44, 0x4e, 0x23, 0x07, 0x44, 0x46,\n+    0x01, 0x0b, 0x0b, 0x0f, 0x19, 0x0f, 0x19, 0x07, 0x19, 0x01, 0x4a, 0x19, 0x01, 0x4a, 0x40, 0x40,\n+    0x46, 0x17, 0x11, 0x09, 0x46, 0x0f, 0x09, 0x01, 0x07, 0x31, 0x27, 0x17, 0x01, 0x15, 0x13, 0x0f,\n+    0x46, 0x23, 0x15, 0x0b, 0x46, 0x05, 0x13, 0x09, 0x09, 0x07, 0x19, 0x0d, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4e, 0x02, 0x4d, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x40, 0x40, 0x40, 0x44, 0x15,\n+    0x02, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0a, 0x0a, 0x49,\n+    0x4d, 0x09, 0x0a, 0x0b, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x02, 0x02, 0x41, 0x41, 0x04, 0x43,\n+    0x45, 0x07, 0x43, 0x53, 0x45, 0x06, 0x49, 0x5d, 0x53, 0x49, 0x0b, 0x0e, 0x0c, 0x15, 0x41, 0x41,\n+    0x04, 0x43, 0x45, 0x07, 0x43, 0x53, 0x45, 0x06, 0x49, 0x5d, 0x53, 0x49, 0x0b, 0x0e, 0x0c, 0x15,\n+    0x21, 0x52, 0x2a, 0x4d, 0x49, 0x49, 0x43, 0x41, 0x41, 0x09, 0x04, 0x0e, 0x04, 0x16, 0x43, 0x4d,\n+    0x23, 0x07, 0x43, 0x16, 0x43, 0x4d, 0x23, 0x07, 0x43, 0x16, 0x43, 0x4d, 0x23, 0x07, 0x43, 0x45,\n+    0x02, 0x0b, 0x0b, 0x0f, 0x1a, 0x0f, 0x1a, 0x07, 0x1a, 0x02, 0x49, 0x1a, 0x02, 0x49, 0x40, 0x40,\n+    0x45, 0x19, 0x12, 0x0a, 0x45, 0x0f, 0x0a, 0x02, 0x07, 0x33, 0x27, 0x19, 0x02, 0x16, 0x14, 0x0f,\n+    0x45, 0x23, 0x15, 0x0b, 0x45, 0x04, 0x14, 0x09, 0x0a, 0x07, 0x1a, 0x0d, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4f, 0x02, 0x4d, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x45, 0x40, 0x40, 0x40, 0x45, 0x17,\n+    0x02, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0a, 0x0a, 0x48,\n+    0x4d, 0x0a, 0x0a, 0x0a, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x02, 0x02, 0x40, 0x40, 0x05, 0x42,\n+    0x45, 0x07, 0x42, 0x52, 0x45, 0x07, 0x48, 0x5d, 0x52, 0x48, 0x0d, 0x0f, 0x0d, 0x17, 0x40, 0x40,\n+    0x05, 0x42, 0x45, 0x07, 0x42, 0x52, 0x45, 0x07, 0x48, 0x5d, 0x52, 0x48, 0x0d, 0x0f, 0x0d, 0x17,\n+    0x22, 0x52, 0x2a, 0x4d, 0x48, 0x48, 0x42, 0x40, 0x40, 0x0a, 0x05, 0x0f, 0x05, 0x17, 0x42, 0x4d,\n+    0x22, 0x07, 0x42, 0x17, 0x42, 0x4d, 0x22, 0x07, 0x42, 0x17, 0x42, 0x4d, 0x22, 0x07, 0x42, 0x45,\n+    0x02, 0x0a, 0x0a, 0x0f, 0x1a, 0x0f, 0x1a, 0x07, 0x1a, 0x02, 0x48, 0x1a, 0x02, 0x48, 0x40, 0x40,\n+    0x45, 0x1a, 0x12, 0x0a, 0x45, 0x0f, 0x0a, 0x02, 0x07, 0x35, 0x27, 0x1a, 0x02, 0x17, 0x15, 0x0f,\n+    0x45, 0x22, 0x15, 0x0a, 0x45, 0x02, 0x15, 0x08, 0x0a, 0x07, 0x1a, 0x0d, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x50, 0x02, 0x4d, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x45, 0x40, 0x40, 0x40, 0x45, 0x19,\n+    0x02, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0a, 0x0a, 0x47,\n+    0x4d, 0x0b, 0x0a, 0x0a, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x02, 0x02, 0x00, 0x00, 0x05, 0x42,\n+    0x45, 0x07, 0x42, 0x52, 0x45, 0x08, 0x47, 0x5d, 0x52, 0x47, 0x0e, 0x10, 0x0d, 0x19, 0x00, 0x00,\n+    0x05, 0x42, 0x45, 0x07, 0x42, 0x52, 0x45, 0x08, 0x47, 0x5d, 0x52, 0x47, 0x0e, 0x10, 0x0d, 0x19,\n+    0x23, 0x52, 0x2a, 0x4d, 0x47, 0x47, 0x42, 0x00, 0x00, 0x0b, 0x05, 0x10, 0x05, 0x18, 0x42, 0x4d,\n+    0x22, 0x07, 0x42, 0x18, 0x42, 0x4d, 0x22, 0x07, 0x42, 0x18, 0x42, 0x4d, 0x22, 0x07, 0x42, 0x45,\n+    0x02, 0x0a, 0x0a, 0x0f, 0x1a, 0x0f, 0x1a, 0x07, 0x1a, 0x02, 0x47, 0x1a, 0x02, 0x47, 0x40, 0x40,\n+    0x45, 0x1b, 0x12, 0x0a, 0x45, 0x0f, 0x0a, 0x02, 0x07, 0x36, 0x27, 0x1b, 0x02, 0x18, 0x15, 0x0f,\n+    0x45, 0x22, 0x15, 0x0a, 0x45, 0x01, 0x15, 0x07, 0x0a, 0x07, 0x1a, 0x0d, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x51, 0x03, 0x4c, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x46, 0x40, 0x40, 0x40, 0x46, 0x1b,\n+    0x03, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0b, 0x0b, 0x46,\n+    0x4c, 0x0c, 0x0b, 0x09, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x03, 0x03, 0x01, 0x01, 0x06, 0x41,\n+    0x44, 0x07, 0x41, 0x51, 0x44, 0x09, 0x46, 0x5c, 0x51, 0x46, 0x10, 0x11, 0x0e, 0x1b, 0x01, 0x01,\n+    0x06, 0x41, 0x44, 0x07, 0x41, 0x51, 0x44, 0x09, 0x46, 0x5c, 0x51, 0x46, 0x10, 0x11, 0x0e, 0x1b,\n+    0x24, 0x53, 0x2b, 0x4c, 0x46, 0x46, 0x41, 0x01, 0x01, 0x0c, 0x06, 0x11, 0x06, 0x19, 0x41, 0x4c,\n+    0x21, 0x07, 0x41, 0x19, 0x41, 0x4c, 0x21, 0x07, 0x41, 0x19, 0x41, 0x4c, 0x21, 0x07, 0x41, 0x44,\n+    0x03, 0x09, 0x09, 0x0f, 0x1b, 0x0f, 0x1b, 0x07, 0x1b, 0x03, 0x46, 0x1b, 0x03, 0x46, 0x40, 0x40,\n+    0x44, 0x1c, 0x13, 0x0b, 0x44, 0x0f, 0x0b, 0x03, 0x07, 0x38, 0x27, 0x1c, 0x03, 0x19, 0x16, 0x0f,\n+    0x44, 0x21, 0x14, 0x09, 0x44, 0x40, 0x16, 0x06, 0x0b, 0x07, 0x1b, 0x0c, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x52, 0x03, 0x4c, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x47, 0x40, 0x40, 0x40, 0x47, 0x1d,\n+    0x03, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0b, 0x0b, 0x45,\n+    0x4c, 0x0e, 0x0b, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x03, 0x03, 0x02, 0x02, 0x07, 0x40,\n+    0x44, 0x07, 0x40, 0x50, 0x44, 0x0a, 0x45, 0x5c, 0x50, 0x45, 0x11, 0x12, 0x0f, 0x1d, 0x02, 0x02,\n+    0x07, 0x40, 0x44, 0x07, 0x40, 0x50, 0x44, 0x0a, 0x45, 0x5c, 0x50, 0x45, 0x11, 0x12, 0x0f, 0x1d,\n+    0x26, 0x53, 0x2b, 0x4c, 0x45, 0x45, 0x40, 0x02, 0x02, 0x0e, 0x07, 0x12, 0x07, 0x1a, 0x40, 0x4c,\n+    0x20, 0x07, 0x40, 0x1a, 0x40, 0x4c, 0x20, 0x07, 0x40, 0x1a, 0x40, 0x4c, 0x20, 0x07, 0x40, 0x44,\n+    0x03, 0x08, 0x08, 0x0f, 0x1b, 0x0f, 0x1b, 0x07, 0x1b, 0x03, 0x45, 0x1b, 0x03, 0x45, 0x40, 0x40,\n+    0x44, 0x1e, 0x13, 0x0b, 0x44, 0x0f, 0x0b, 0x03, 0x07, 0x39, 0x27, 0x1e, 0x03, 0x1a, 0x17, 0x0f,\n+    0x44, 0x20, 0x14, 0x08, 0x44, 0x41, 0x17, 0x05, 0x0b, 0x07, 0x1b, 0x0c, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x53, 0x03, 0x4c, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x47, 0x40, 0x40, 0x40, 0x47, 0x1f,\n+    0x03, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0b, 0x0b, 0x44,\n+    0x4c, 0x0f, 0x0b, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x03, 0x03, 0x03, 0x03, 0x07, 0x40,\n+    0x44, 0x07, 0x40, 0x50, 0x44, 0x0b, 0x44, 0x5c, 0x50, 0x44, 0x13, 0x13, 0x0f, 0x1f, 0x03, 0x03,\n+    0x07, 0x40, 0x44, 0x07, 0x40, 0x50, 0x44, 0x0b, 0x44, 0x5c, 0x50, 0x44, 0x13, 0x13, 0x0f, 0x1f,\n+    0x27, 0x53, 0x2b, 0x4c, 0x44, 0x44, 0x40, 0x03, 0x03, 0x0f, 0x07, 0x13, 0x07, 0x1b, 0x40, 0x4c,\n+    0x20, 0x07, 0x40, 0x1b, 0x40, 0x4c, 0x20, 0x07, 0x40, 0x1b, 0x40, 0x4c, 0x20, 0x07, 0x40, 0x44,\n+    0x03, 0x08, 0x08, 0x0f, 0x1b, 0x0f, 0x1b, 0x07, 0x1b, 0x03, 0x44, 0x1b, 0x03, 0x44, 0x40, 0x40,\n+    0x44, 0x1f, 0x13, 0x0b, 0x44, 0x0f, 0x0b, 0x03, 0x07, 0x3b, 0x27, 0x1f, 0x03, 0x1b, 0x17, 0x0f,\n+    0x44, 0x20, 0x14, 0x08, 0x44, 0x43, 0x17, 0x04, 0x0b, 0x07, 0x1b, 0x0c, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x54, 0x04, 0x4b, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x48, 0x40, 0x40, 0x40, 0x48, 0x21,\n+    0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0c, 0x0c, 0x43,\n+    0x4b, 0x10, 0x0c, 0x07, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x04, 0x04, 0x04, 0x08, 0x00,\n+    0x43, 0x07, 0x00, 0x4f, 0x43, 0x0c, 0x43, 0x5b, 0x4f, 0x43, 0x14, 0x14, 0x10, 0x21, 0x04, 0x04,\n+    0x08, 0x00, 0x43, 0x07, 0x00, 0x4f, 0x43, 0x0c, 0x43, 0x5b, 0x4f, 0x43, 0x14, 0x14, 0x10, 0x21,\n+    0x28, 0x54, 0x2c, 0x4b, 0x43, 0x43, 0x00, 0x04, 0x04, 0x10, 0x08, 0x14, 0x08, 0x1c, 0x00, 0x4b,\n+    0x1f, 0x07, 0x00, 0x1c, 0x00, 0x4b, 0x1f, 0x07, 0x00, 0x1c, 0x00, 0x4b, 0x1f, 0x07, 0x00, 0x43,\n+    0x04, 0x07, 0x07, 0x0f, 0x1c, 0x0f, 0x1c, 0x07, 0x1c, 0x04, 0x43, 0x1c, 0x04, 0x43, 0x40, 0x40,\n+    0x43, 0x20, 0x14, 0x0c, 0x43, 0x0f, 0x0c, 0x04, 0x07, 0x3c, 0x27, 0x20, 0x04, 0x1c, 0x18, 0x0f,\n+    0x43, 0x1f, 0x13, 0x07, 0x43, 0x44, 0x18, 0x03, 0x0c, 0x07, 0x1c, 0x0b, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x55, 0x04, 0x4b, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x49, 0x40, 0x40, 0x40, 0x49, 0x22,\n+    0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0c, 0x0c, 0x42,\n+    0x4b, 0x11, 0x0c, 0x06, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x04, 0x05, 0x05, 0x08, 0x00,\n+    0x43, 0x07, 0x00, 0x4f, 0x43, 0x0d, 0x42, 0x5b, 0x4f, 0x42, 0x16, 0x15, 0x10, 0x22, 0x05, 0x05,\n+    0x08, 0x00, 0x43, 0x07, 0x00, 0x4f, 0x43, 0x0d, 0x42, 0x5b, 0x4f, 0x42, 0x16, 0x15, 0x10, 0x22,\n+    0x29, 0x54, 0x2c, 0x4b, 0x42, 0x42, 0x00, 0x05, 0x05, 0x11, 0x08, 0x15, 0x08, 0x1d, 0x00, 0x4b,\n+    0x1e, 0x07, 0x00, 0x1d, 0x00, 0x4b, 0x1e, 0x07, 0x00, 0x1d, 0x00, 0x4b, 0x1e, 0x07, 0x00, 0x43,\n+    0x04, 0x06, 0x06, 0x0f, 0x1c, 0x0f, 0x1c, 0x07, 0x1c, 0x04, 0x42, 0x1c, 0x04, 0x42, 0x40, 0x40,\n+    0x43, 0x21, 0x14, 0x0c, 0x43, 0x0f, 0x0c, 0x04, 0x07, 0x3e, 0x27, 0x21, 0x04, 0x1d, 0x18, 0x0f,\n+    0x43, 0x1e, 0x13, 0x06, 0x43, 0x46, 0x18, 0x02, 0x0c, 0x07, 0x1c, 0x0b, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x56, 0x04, 0x4b, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x49, 0x40, 0x40, 0x40, 0x49, 0x24,\n+    0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0c, 0x0c, 0x41,\n+    0x4b, 0x13, 0x0c, 0x06, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x04, 0x04, 0x06, 0x06, 0x09, 0x01,\n+    0x43, 0x07, 0x01, 0x4e, 0x43, 0x0e, 0x41, 0x5b, 0x4e, 0x41, 0x18, 0x16, 0x11, 0x24, 0x06, 0x06,\n+    0x09, 0x01, 0x43, 0x07, 0x01, 0x4e, 0x43, 0x0e, 0x41, 0x5b, 0x4e, 0x41, 0x18, 0x16, 0x11, 0x24,\n+    0x2b, 0x54, 0x2c, 0x4b, 0x41, 0x41, 0x01, 0x06, 0x06, 0x13, 0x09, 0x16, 0x09, 0x1e, 0x01, 0x4b,\n+    0x1e, 0x07, 0x01, 0x1e, 0x01, 0x4b, 0x1e, 0x07, 0x01, 0x1e, 0x01, 0x4b, 0x1e, 0x07, 0x01, 0x43,\n+    0x04, 0x06, 0x06, 0x0f, 0x1c, 0x0f, 0x1c, 0x07, 0x1c, 0x04, 0x41, 0x1c, 0x04, 0x41, 0x40, 0x40,\n+    0x43, 0x23, 0x14, 0x0c, 0x43, 0x0f, 0x0c, 0x04, 0x07, 0x3e, 0x27, 0x23, 0x04, 0x1e, 0x19, 0x0f,\n+    0x43, 0x1e, 0x13, 0x06, 0x43, 0x48, 0x19, 0x01, 0x0c, 0x07, 0x1c, 0x0b, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x57, 0x05, 0x4a, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4a, 0x40, 0x40, 0x40, 0x4a, 0x26,\n+    0x05, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0d, 0x0d, 0x40,\n+    0x4a, 0x14, 0x0d, 0x05, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x05, 0x05, 0x07, 0x07, 0x0a, 0x02,\n+    0x42, 0x07, 0x02, 0x4d, 0x42, 0x0f, 0x40, 0x5a, 0x4d, 0x40, 0x19, 0x17, 0x12, 0x26, 0x07, 0x07,\n+    0x0a, 0x02, 0x42, 0x07, 0x02, 0x4d, 0x42, 0x0f, 0x40, 0x5a, 0x4d, 0x40, 0x19, 0x17, 0x12, 0x26,\n+    0x2c, 0x55, 0x2d, 0x4a, 0x40, 0x40, 0x02, 0x07, 0x07, 0x14, 0x0a, 0x17, 0x0a, 0x1f, 0x02, 0x4a,\n+    0x1d, 0x07, 0x02, 0x1f, 0x02, 0x4a, 0x1d, 0x07, 0x02, 0x1f, 0x02, 0x4a, 0x1d, 0x07, 0x02, 0x42,\n+    0x05, 0x05, 0x05, 0x0f, 0x1d, 0x0f, 0x1d, 0x07, 0x1d, 0x05, 0x40, 0x1d, 0x05, 0x40, 0x40, 0x40,\n+    0x42, 0x24, 0x15, 0x0d, 0x42, 0x0f, 0x0d, 0x05, 0x07, 0x3e, 0x27, 0x24, 0x05, 0x1f, 0x1a, 0x0f,\n+    0x42, 0x1d, 0x12, 0x05, 0x42, 0x49, 0x1a, 0x00, 0x0d, 0x07, 0x1d, 0x0a, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x58, 0x05, 0x4a, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4a, 0x40, 0x40, 0x40, 0x4a, 0x28,\n+    0x05, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0d, 0x0d, 0x00,\n+    0x4a, 0x15, 0x0d, 0x05, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x05, 0x05, 0x08, 0x08, 0x0a, 0x02,\n+    0x42, 0x07, 0x02, 0x4d, 0x42, 0x10, 0x00, 0x5a, 0x4d, 0x00, 0x1b, 0x18, 0x12, 0x28, 0x08, 0x08,\n+    0x0a, 0x02, 0x42, 0x07, 0x02, 0x4d, 0x42, 0x10, 0x00, 0x5a, 0x4d, 0x00, 0x1b, 0x18, 0x12, 0x28,\n+    0x2d, 0x55, 0x2d, 0x4a, 0x00, 0x00, 0x02, 0x08, 0x08, 0x15, 0x0a, 0x18, 0x0a, 0x20, 0x02, 0x4a,\n+    0x1d, 0x07, 0x02, 0x20, 0x02, 0x4a, 0x1d, 0x07, 0x02, 0x20, 0x02, 0x4a, 0x1d, 0x07, 0x02, 0x42,\n+    0x05, 0x05, 0x05, 0x0f, 0x1d, 0x0f, 0x1d, 0x07, 0x1d, 0x05, 0x00, 0x1d, 0x05, 0x00, 0x40, 0x40,\n+    0x42, 0x25, 0x15, 0x0d, 0x42, 0x0f, 0x0d, 0x05, 0x07, 0x3e, 0x27, 0x25, 0x05, 0x20, 0x1a, 0x0f,\n+    0x42, 0x1d, 0x12, 0x05, 0x42, 0x4b, 0x1a, 0x40, 0x0d, 0x07, 0x1d, 0x0a, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x59, 0x05, 0x4a, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4b, 0x40, 0x40, 0x40, 0x4b, 0x2a,\n+    0x05, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0d, 0x0d, 0x01,\n+    0x4a, 0x16, 0x0d, 0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x05, 0x05, 0x09, 0x09, 0x0b, 0x03,\n+    0x42, 0x07, 0x03, 0x4c, 0x42, 0x11, 0x01, 0x5a, 0x4c, 0x01, 0x1c, 0x19, 0x13, 0x2a, 0x09, 0x09,\n+    0x0b, 0x03, 0x42, 0x07, 0x03, 0x4c, 0x42, 0x11, 0x01, 0x5a, 0x4c, 0x01, 0x1c, 0x19, 0x13, 0x2a,\n+    0x2e, 0x55, 0x2d, 0x4a, 0x01, 0x01, 0x03, 0x09, 0x09, 0x16, 0x0b, 0x19, 0x0b, 0x21, 0x03, 0x4a,\n+    0x1c, 0x07, 0x03, 0x21, 0x03, 0x4a, 0x1c, 0x07, 0x03, 0x21, 0x03, 0x4a, 0x1c, 0x07, 0x03, 0x42,\n+    0x05, 0x04, 0x04, 0x0f, 0x1d, 0x0f, 0x1d, 0x07, 0x1d, 0x05, 0x01, 0x1d, 0x05, 0x01, 0x40, 0x40,\n+    0x42, 0x26, 0x15, 0x0d, 0x42, 0x0f, 0x0d, 0x05, 0x07, 0x3e, 0x27, 0x26, 0x05, 0x21, 0x1b, 0x0f,\n+    0x42, 0x1c, 0x12, 0x04, 0x42, 0x4c, 0x1b, 0x41, 0x0d, 0x07, 0x1d, 0x0a, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x5a, 0x06, 0x49, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4c, 0x40, 0x40, 0x40, 0x4c, 0x2c,\n+    0x06, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0e, 0x0e, 0x02,\n+    0x49, 0x18, 0x0e, 0x03, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x06, 0x06, 0x0a, 0x0a, 0x0c, 0x04,\n+    0x41, 0x07, 0x04, 0x4b, 0x41, 0x12, 0x02, 0x59, 0x4b, 0x02, 0x1e, 0x1a, 0x14, 0x2c, 0x0a, 0x0a,\n+    0x0c, 0x04, 0x41, 0x07, 0x04, 0x4b, 0x41, 0x12, 0x02, 0x59, 0x4b, 0x02, 0x1e, 0x1a, 0x14, 0x2c,\n+    0x30, 0x56, 0x2e, 0x49, 0x02, 0x02, 0x04, 0x0a, 0x0a, 0x18, 0x0c, 0x1a, 0x0c, 0x22, 0x04, 0x49,\n+    0x1b, 0x07, 0x04, 0x22, 0x04, 0x49, 0x1b, 0x07, 0x04, 0x22, 0x04, 0x49, 0x1b, 0x07, 0x04, 0x41,\n+    0x06, 0x03, 0x03, 0x0f, 0x1e, 0x0f, 0x1e, 0x07, 0x1e, 0x06, 0x02, 0x1e, 0x06, 0x02, 0x40, 0x40,\n+    0x41, 0x28, 0x16, 0x0e, 0x41, 0x0f, 0x0e, 0x06, 0x07, 0x3e, 0x27, 0x28, 0x06, 0x22, 0x1c, 0x0f,\n+    0x41, 0x1b, 0x11, 0x03, 0x41, 0x4e, 0x1c, 0x42, 0x0e, 0x07, 0x1e, 0x09, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x5b, 0x06, 0x49, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4c, 0x40, 0x40, 0x40, 0x4c, 0x2e,\n+    0x06, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0e, 0x0e, 0x03,\n+    0x49, 0x19, 0x0e, 0x03, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x06, 0x06, 0x0b, 0x0b, 0x0c, 0x04,\n+    0x41, 0x07, 0x04, 0x4b, 0x41, 0x13, 0x03, 0x59, 0x4b, 0x03, 0x1f, 0x1b, 0x14, 0x2e, 0x0b, 0x0b,\n+    0x0c, 0x04, 0x41, 0x07, 0x04, 0x4b, 0x41, 0x13, 0x03, 0x59, 0x4b, 0x03, 0x1f, 0x1b, 0x14, 0x2e,\n+    0x31, 0x56, 0x2e, 0x49, 0x03, 0x03, 0x04, 0x0b, 0x0b, 0x19, 0x0c, 0x1b, 0x0c, 0x23, 0x04, 0x49,\n+    0x1b, 0x07, 0x04, 0x23, 0x04, 0x49, 0x1b, 0x07, 0x04, 0x23, 0x04, 0x49, 0x1b, 0x07, 0x04, 0x41,\n+    0x06, 0x03, 0x03, 0x0f, 0x1e, 0x0f, 0x1e, 0x07, 0x1e, 0x06, 0x03, 0x1e, 0x06, 0x03, 0x40, 0x40,\n+    0x41, 0x29, 0x16, 0x0e, 0x41, 0x0f, 0x0e, 0x06, 0x07, 0x3e, 0x27, 0x29, 0x06, 0x23, 0x1c, 0x0f,\n+    0x41, 0x1b, 0x11, 0x03, 0x41, 0x4f, 0x1c, 0x43, 0x0e, 0x07, 0x1e, 0x09, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x5c, 0x06, 0x49, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4d, 0x40, 0x40, 0x40, 0x4d, 0x30,\n+    0x06, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0e, 0x0e, 0x04,\n+    0x49, 0x1a, 0x0e, 0x02, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x06, 0x06, 0x0c, 0x0c, 0x0d, 0x05,\n+    0x41, 0x07, 0x05, 0x4a, 0x41, 0x14, 0x04, 0x59, 0x4a, 0x04, 0x21, 0x1c, 0x15, 0x30, 0x0c, 0x0c,\n+    0x0d, 0x05, 0x41, 0x07, 0x05, 0x4a, 0x41, 0x14, 0x04, 0x59, 0x4a, 0x04, 0x21, 0x1c, 0x15, 0x30,\n+    0x32, 0x56, 0x2e, 0x49, 0x04, 0x04, 0x05, 0x0c, 0x0c, 0x1a, 0x0d, 0x1c, 0x0d, 0x24, 0x05, 0x49,\n+    0x1a, 0x07, 0x05, 0x24, 0x05, 0x49, 0x1a, 0x07, 0x05, 0x24, 0x05, 0x49, 0x1a, 0x07, 0x05, 0x41,\n+    0x06, 0x02, 0x02, 0x0f, 0x1e, 0x0f, 0x1e, 0x07, 0x1e, 0x06, 0x04, 0x1e, 0x06, 0x04, 0x40, 0x40,\n+    0x41, 0x2a, 0x16, 0x0e, 0x41, 0x0f, 0x0e, 0x06, 0x07, 0x3e, 0x27, 0x2a, 0x06, 0x24, 0x1d, 0x0f,\n+    0x41, 0x1a, 0x11, 0x02, 0x41, 0x51, 0x1d, 0x44, 0x0e, 0x07, 0x1e, 0x09, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x5d, 0x06, 0x49, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4e, 0x40, 0x40, 0x40, 0x4e, 0x31,\n+    0x06, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0e, 0x0e, 0x04,\n+    0x49, 0x1b, 0x0e, 0x01, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x06, 0x06, 0x0c, 0x0c, 0x0d, 0x05,\n+    0x41, 0x07, 0x05, 0x4a, 0x41, 0x14, 0x04, 0x59, 0x4a, 0x04, 0x22, 0x1c, 0x15, 0x31, 0x0c, 0x0c,\n+    0x0d, 0x05, 0x41, 0x07, 0x05, 0x4a, 0x41, 0x14, 0x04, 0x59, 0x4a, 0x04, 0x22, 0x1c, 0x15, 0x31,\n+    0x33, 0x57, 0x2e, 0x49, 0x04, 0x04, 0x05, 0x0c, 0x0c, 0x1b, 0x0d, 0x1c, 0x0d, 0x24, 0x05, 0x49,\n+    0x19, 0x07, 0x05, 0x24, 0x05, 0x49, 0x19, 0x07, 0x05, 0x24, 0x05, 0x49, 0x19, 0x07, 0x05, 0x41,\n+    0x06, 0x01, 0x01, 0x0f, 0x1e, 0x0f, 0x1e, 0x07, 0x1e, 0x06, 0x04, 0x1e, 0x06, 0x04, 0x40, 0x40,\n+    0x41, 0x2b, 0x16, 0x0e, 0x41, 0x0f, 0x0e, 0x06, 0x07, 0x3e, 0x27, 0x2b, 0x06, 0x24, 0x1d, 0x0f,\n+    0x41, 0x19, 0x10, 0x01, 0x41, 0x53, 0x1d, 0x45, 0x0e, 0x07, 0x1e, 0x08, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x5d, 0x07, 0x48, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4e, 0x40, 0x40, 0x40, 0x4e, 0x33,\n+    0x07, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0f, 0x0f, 0x05,\n+    0x48, 0x1d, 0x0f, 0x01, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x07, 0x0d, 0x0d, 0x0e, 0x06,\n+    0x40, 0x07, 0x06, 0x49, 0x40, 0x15, 0x05, 0x58, 0x49, 0x05, 0x24, 0x1d, 0x16, 0x33, 0x0d, 0x0d,\n+    0x0e, 0x06, 0x40, 0x07, 0x06, 0x49, 0x40, 0x15, 0x05, 0x58, 0x49, 0x05, 0x24, 0x1d, 0x16, 0x33,\n+    0x35, 0x57, 0x2f, 0x48, 0x05, 0x05, 0x06, 0x0d, 0x0d, 0x1d, 0x0e, 0x1d, 0x0e, 0x25, 0x06, 0x48,\n+    0x19, 0x07, 0x06, 0x25, 0x06, 0x48, 0x19, 0x07, 0x06, 0x25, 0x06, 0x48, 0x19, 0x07, 0x06, 0x40,\n+    0x07, 0x01, 0x01, 0x0f, 0x1f, 0x0f, 0x1f, 0x07, 0x1f, 0x07, 0x05, 0x1f, 0x07, 0x05, 0x40, 0x40,\n+    0x40, 0x2d, 0x17, 0x0f, 0x40, 0x0f, 0x0f, 0x07, 0x07, 0x3e, 0x27, 0x2d, 0x07, 0x25, 0x1e, 0x0f,\n+    0x40, 0x19, 0x10, 0x01, 0x40, 0x54, 0x1e, 0x45, 0x0f, 0x07, 0x1f, 0x08, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x5e, 0x07, 0x48, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4f, 0x40, 0x40, 0x40, 0x4f, 0x35,\n+    0x07, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0f, 0x0f, 0x06,\n+    0x48, 0x1e, 0x0f, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x07, 0x0e, 0x0e, 0x0f, 0x07,\n+    0x40, 0x07, 0x07, 0x48, 0x40, 0x16, 0x06, 0x58, 0x48, 0x06, 0x26, 0x1e, 0x17, 0x35, 0x0e, 0x0e,\n+    0x0f, 0x07, 0x40, 0x07, 0x07, 0x48, 0x40, 0x16, 0x06, 0x58, 0x48, 0x06, 0x26, 0x1e, 0x17, 0x35,\n+    0x36, 0x57, 0x2f, 0x48, 0x06, 0x06, 0x07, 0x0e, 0x0e, 0x1e, 0x0f, 0x1e, 0x0f, 0x26, 0x07, 0x48,\n+    0x18, 0x07, 0x07, 0x26, 0x07, 0x48, 0x18, 0x07, 0x07, 0x26, 0x07, 0x48, 0x18, 0x07, 0x07, 0x40,\n+    0x07, 0x00, 0x00, 0x0f, 0x1f, 0x0f, 0x1f, 0x07, 0x1f, 0x07, 0x06, 0x1f, 0x07, 0x06, 0x40, 0x40,\n+    0x40, 0x2e, 0x17, 0x0f, 0x40, 0x0f, 0x0f, 0x07, 0x07, 0x3e, 0x27, 0x2e, 0x07, 0x26, 0x1f, 0x0f,\n+    0x40, 0x18, 0x10, 0x00, 0x40, 0x56, 0x1f, 0x46, 0x0f, 0x07, 0x1f, 0x08, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x5f, 0x07, 0x48, 0x58, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4f, 0x40, 0x40, 0x40, 0x4f, 0x37,\n+    0x07, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x0f, 0x0f, 0x07,\n+    0x48, 0x1f, 0x0f, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x07,\n+    0x40, 0x07, 0x07, 0x48, 0x40, 0x17, 0x07, 0x58, 0x48, 0x07, 0x27, 0x1f, 0x17, 0x37, 0x0f, 0x0f,\n+    0x0f, 0x07, 0x40, 0x07, 0x07, 0x48, 0x40, 0x17, 0x07, 0x58, 0x48, 0x07, 0x27, 0x1f, 0x17, 0x37,\n+    0x37, 0x57, 0x2f, 0x48, 0x07, 0x07, 0x07, 0x0f, 0x0f, 0x1f, 0x0f, 0x1f, 0x0f, 0x27, 0x07, 0x48,\n+    0x18, 0x07, 0x07, 0x27, 0x07, 0x48, 0x18, 0x07, 0x07, 0x27, 0x07, 0x48, 0x18, 0x07, 0x07, 0x40,\n+    0x07, 0x00, 0x00, 0x0f, 0x1f, 0x0f, 0x1f, 0x07, 0x1f, 0x07, 0x07, 0x1f, 0x07, 0x07, 0x40, 0x40,\n+    0x40, 0x2f, 0x17, 0x0f, 0x40, 0x0f, 0x0f, 0x07, 0x07, 0x3e, 0x27, 0x2f, 0x07, 0x27, 0x1f, 0x0f,\n+    0x40, 0x18, 0x10, 0x00, 0x40, 0x57, 0x1f, 0x47, 0x0f, 0x07, 0x1f, 0x08, 0x0f, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x07, 0x48, 0x48, 0x60, 0x40, 0x27, 0x07, 0x07, 0x27, 0x40, 0x48, 0x40, 0x40, 0x40, 0x0f,\n+    0x48, 0x68, 0x60, 0x40, 0x68, 0x68, 0x68, 0x68, 0x68, 0x07, 0x07, 0x0f, 0x50, 0x40, 0x60, 0x07,\n+    0x68, 0x27, 0x48, 0x17, 0x40, 0x50, 0x1f, 0x40, 0x40, 0x40, 0x48, 0x48, 0x58, 0x60, 0x60, 0x60,\n+    0x68, 0x68, 0x58, 0x68, 0x60, 0x60, 0x60, 0x68, 0x68, 0x68, 0x60, 0x50, 0x48, 0x50, 0x58, 0x60,\n+    0x60, 0x60, 0x68, 0x68, 0x58, 0x68, 0x60, 0x60, 0x60, 0x68, 0x68, 0x68, 0x60, 0x50, 0x48, 0x50,\n+    0x07, 0x50, 0x58, 0x40, 0x48, 0x40, 0x48, 0x07, 0x48, 0x48, 0x48, 0x68, 0x07, 0x1f, 0x17, 0x50,\n+    0x0f, 0x07, 0x40, 0x1f, 0x17, 0x50, 0x0f, 0x07, 0x40, 0x1f, 0x17, 0x50, 0x0f, 0x07, 0x40, 0x40,\n+    0x07, 0x48, 0x48, 0x48, 0x07, 0x48, 0x07, 0x17, 0x17, 0x17, 0x50, 0x17, 0x17, 0x50, 0x40, 0x40,\n+    0x40, 0x2f, 0x2f, 0x17, 0x40, 0x0f, 0x17, 0x1f, 0x1f, 0x1f, 0x27, 0x0f, 0x07, 0x07, 0x0f, 0x07,\n+    0x07, 0x3e, 0x1f, 0x17, 0x40, 0x17, 0x07, 0x1f, 0x48, 0x17, 0x48, 0x40, 0x48, 0x17, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x07, 0x47, 0x47, 0x5f, 0x40, 0x27, 0x07, 0x07, 0x27, 0x40, 0x47, 0x40, 0x40, 0x40, 0x0f,\n+    0x47, 0x66, 0x5f, 0x00, 0x66, 0x66, 0x66, 0x65, 0x65, 0x07, 0x07, 0x0f, 0x4f, 0x00, 0x5e, 0x07,\n+    0x67, 0x27, 0x47, 0x17, 0x40, 0x4f, 0x1f, 0x40, 0x40, 0x40, 0x47, 0x47, 0x57, 0x5f, 0x5e, 0x5f,\n+    0x66, 0x66, 0x57, 0x67, 0x5f, 0x5e, 0x5f, 0x67, 0x67, 0x66, 0x5e, 0x4f, 0x47, 0x4f, 0x57, 0x5f,\n+    0x5e, 0x5f, 0x66, 0x66, 0x57, 0x67, 0x5f, 0x5e, 0x5f, 0x67, 0x67, 0x66, 0x5e, 0x4f, 0x47, 0x4f,\n+    0x08, 0x4f, 0x56, 0x40, 0x48, 0x40, 0x47, 0x07, 0x47, 0x47, 0x47, 0x66, 0x07, 0x1f, 0x17, 0x4f,\n+    0x10, 0x07, 0x40, 0x1f, 0x17, 0x4f, 0x10, 0x07, 0x40, 0x1f, 0x17, 0x4f, 0x10, 0x07, 0x40, 0x40,\n+    0x07, 0x47, 0x47, 0x47, 0x08, 0x47, 0x08, 0x17, 0x17, 0x17, 0x4f, 0x17, 0x17, 0x4f, 0x40, 0x40,\n+    0x40, 0x2f, 0x2f, 0x17, 0x40, 0x0f, 0x17, 0x1f, 0x1f, 0x20, 0x27, 0x10, 0x07, 0x08, 0x10, 0x08,\n+    0x07, 0x3e, 0x1f, 0x17, 0x40, 0x17, 0x08, 0x1f, 0x47, 0x17, 0x46, 0x00, 0x47, 0x17, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x06, 0x46, 0x47, 0x5e, 0x40, 0x26, 0x06, 0x06, 0x27, 0x40, 0x47, 0x40, 0x40, 0x40, 0x0f,\n+    0x47, 0x64, 0x5e, 0x01, 0x65, 0x64, 0x64, 0x63, 0x63, 0x07, 0x07, 0x0f, 0x4e, 0x00, 0x5d, 0x07,\n+    0x66, 0x27, 0x46, 0x17, 0x40, 0x4f, 0x1e, 0x40, 0x40, 0x40, 0x47, 0x47, 0x56, 0x5e, 0x5d, 0x5e,\n+    0x65, 0x64, 0x56, 0x66, 0x5e, 0x5c, 0x5e, 0x66, 0x66, 0x65, 0x5d, 0x4e, 0x46, 0x4e, 0x56, 0x5e,\n+    0x5d, 0x5e, 0x65, 0x64, 0x56, 0x66, 0x5e, 0x5c, 0x5e, 0x66, 0x66, 0x65, 0x5d, 0x4e, 0x46, 0x4e,\n+    0x09, 0x4f, 0x54, 0x40, 0x48, 0x40, 0x47, 0x07, 0x47, 0x46, 0x46, 0x64, 0x07, 0x1f, 0x16, 0x4f,\n+    0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x40,\n+    0x07, 0x46, 0x46, 0x46, 0x09, 0x46, 0x09, 0x17, 0x17, 0x16, 0x4f, 0x17, 0x16, 0x4f, 0x40, 0x40,\n+    0x40, 0x2e, 0x2e, 0x17, 0x40, 0x0f, 0x17, 0x1e, 0x1e, 0x20, 0x27, 0x10, 0x07, 0x09, 0x10, 0x08,\n+    0x07, 0x3e, 0x1f, 0x17, 0x40, 0x17, 0x08, 0x1e, 0x46, 0x17, 0x45, 0x01, 0x46, 0x17, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x06, 0x45, 0x47, 0x5e, 0x40, 0x25, 0x06, 0x05, 0x27, 0x40, 0x47, 0x40, 0x40, 0x40, 0x0f,\n+    0x47, 0x63, 0x5d, 0x01, 0x64, 0x63, 0x62, 0x60, 0x60, 0x07, 0x07, 0x0f, 0x4e, 0x00, 0x5c, 0x07,\n+    0x65, 0x27, 0x45, 0x17, 0x40, 0x4f, 0x1d, 0x40, 0x40, 0x40, 0x47, 0x47, 0x56, 0x5d, 0x5c, 0x5d,\n+    0x64, 0x63, 0x56, 0x65, 0x5d, 0x5b, 0x5d, 0x65, 0x65, 0x64, 0x5c, 0x4d, 0x46, 0x4d, 0x56, 0x5d,\n+    0x5c, 0x5d, 0x64, 0x63, 0x56, 0x65, 0x5d, 0x5b, 0x5d, 0x65, 0x65, 0x64, 0x5c, 0x4d, 0x46, 0x4d,\n+    0x09, 0x4f, 0x52, 0x40, 0x48, 0x40, 0x47, 0x07, 0x47, 0x46, 0x46, 0x62, 0x07, 0x1f, 0x16, 0x4f,\n+    0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x40,\n+    0x07, 0x46, 0x46, 0x45, 0x09, 0x45, 0x09, 0x17, 0x17, 0x16, 0x4f, 0x17, 0x16, 0x4f, 0x40, 0x40,\n+    0x40, 0x2d, 0x2d, 0x17, 0x40, 0x0f, 0x17, 0x1e, 0x1e, 0x20, 0x27, 0x10, 0x07, 0x09, 0x10, 0x08,\n+    0x07, 0x3d, 0x1f, 0x17, 0x40, 0x17, 0x08, 0x1e, 0x45, 0x17, 0x44, 0x01, 0x45, 0x17, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x05, 0x44, 0x46, 0x5d, 0x40, 0x24, 0x05, 0x04, 0x27, 0x40, 0x46, 0x40, 0x40, 0x40, 0x0f,\n+    0x46, 0x61, 0x5c, 0x02, 0x63, 0x61, 0x60, 0x5e, 0x5e, 0x07, 0x07, 0x0e, 0x4d, 0x01, 0x5b, 0x07,\n+    0x64, 0x27, 0x44, 0x16, 0x40, 0x4e, 0x1c, 0x40, 0x40, 0x40, 0x46, 0x46, 0x55, 0x5c, 0x5b, 0x5c,\n+    0x63, 0x61, 0x55, 0x64, 0x5c, 0x59, 0x5c, 0x64, 0x64, 0x63, 0x5b, 0x4c, 0x45, 0x4c, 0x55, 0x5c,\n+    0x5b, 0x5c, 0x63, 0x61, 0x55, 0x64, 0x5c, 0x59, 0x5c, 0x64, 0x64, 0x63, 0x5b, 0x4c, 0x45, 0x4c,\n+    0x0a, 0x4e, 0x50, 0x40, 0x48, 0x40, 0x46, 0x07, 0x46, 0x45, 0x45, 0x60, 0x07, 0x1e, 0x15, 0x4e,\n+    0x11, 0x07, 0x40, 0x1e, 0x15, 0x4e, 0x11, 0x07, 0x40, 0x1e, 0x15, 0x4e, 0x11, 0x07, 0x40, 0x41,\n+    0x07, 0x45, 0x45, 0x44, 0x0a, 0x44, 0x0a, 0x16, 0x17, 0x15, 0x4e, 0x17, 0x15, 0x4e, 0x40, 0x40,\n+    0x40, 0x2c, 0x2c, 0x16, 0x40, 0x0f, 0x16, 0x1d, 0x1d, 0x21, 0x27, 0x11, 0x07, 0x0a, 0x11, 0x09,\n+    0x06, 0x3c, 0x1e, 0x16, 0x40, 0x16, 0x09, 0x1d, 0x44, 0x16, 0x43, 0x02, 0x44, 0x16, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x04, 0x43, 0x46, 0x5c, 0x40, 0x23, 0x04, 0x03, 0x27, 0x40, 0x46, 0x40, 0x40, 0x40, 0x0f,\n+    0x46, 0x60, 0x5b, 0x03, 0x61, 0x60, 0x5e, 0x5b, 0x5b, 0x07, 0x07, 0x0e, 0x4c, 0x01, 0x59, 0x07,\n+    0x63, 0x27, 0x43, 0x16, 0x40, 0x4e, 0x1b, 0x40, 0x40, 0x40, 0x46, 0x46, 0x54, 0x5b, 0x59, 0x5b,\n+    0x61, 0x60, 0x54, 0x63, 0x5b, 0x58, 0x5b, 0x63, 0x63, 0x61, 0x59, 0x4b, 0x44, 0x4b, 0x54, 0x5b,\n+    0x59, 0x5b, 0x61, 0x60, 0x54, 0x63, 0x5b, 0x58, 0x5b, 0x63, 0x63, 0x61, 0x59, 0x4b, 0x44, 0x4b,\n+    0x0b, 0x4e, 0x4e, 0x40, 0x48, 0x40, 0x46, 0x07, 0x46, 0x44, 0x44, 0x5e, 0x07, 0x1e, 0x14, 0x4e,\n+    0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x41,\n+    0x07, 0x44, 0x44, 0x43, 0x0b, 0x43, 0x0b, 0x16, 0x17, 0x14, 0x4e, 0x17, 0x14, 0x4e, 0x40, 0x40,\n+    0x40, 0x2b, 0x2b, 0x16, 0x40, 0x0f, 0x16, 0x1c, 0x1c, 0x21, 0x27, 0x11, 0x07, 0x0b, 0x11, 0x09,\n+    0x06, 0x3b, 0x1e, 0x16, 0x40, 0x16, 0x09, 0x1c, 0x43, 0x16, 0x41, 0x03, 0x43, 0x16, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x04, 0x42, 0x46, 0x5c, 0x40, 0x22, 0x04, 0x02, 0x27, 0x40, 0x46, 0x40, 0x40, 0x40, 0x0f,\n+    0x46, 0x5e, 0x5a, 0x03, 0x60, 0x5e, 0x5c, 0x59, 0x59, 0x07, 0x07, 0x0e, 0x4c, 0x01, 0x58, 0x07,\n+    0x62, 0x27, 0x42, 0x16, 0x40, 0x4e, 0x1a, 0x40, 0x40, 0x40, 0x46, 0x46, 0x54, 0x5a, 0x58, 0x5a,\n+    0x60, 0x5e, 0x54, 0x62, 0x5a, 0x56, 0x5a, 0x62, 0x62, 0x60, 0x58, 0x4a, 0x44, 0x4a, 0x54, 0x5a,\n+    0x58, 0x5a, 0x60, 0x5e, 0x54, 0x62, 0x5a, 0x56, 0x5a, 0x62, 0x62, 0x60, 0x58, 0x4a, 0x44, 0x4a,\n+    0x0b, 0x4e, 0x4c, 0x40, 0x48, 0x40, 0x46, 0x07, 0x46, 0x44, 0x44, 0x5c, 0x07, 0x1e, 0x14, 0x4e,\n+    0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x41,\n+    0x07, 0x44, 0x44, 0x42, 0x0b, 0x42, 0x0b, 0x16, 0x17, 0x14, 0x4e, 0x17, 0x14, 0x4e, 0x40, 0x40,\n+    0x40, 0x2a, 0x2a, 0x16, 0x40, 0x0f, 0x16, 0x1c, 0x1c, 0x21, 0x27, 0x11, 0x07, 0x0b, 0x11, 0x09,\n+    0x06, 0x3a, 0x1e, 0x16, 0x40, 0x16, 0x09, 0x1c, 0x42, 0x16, 0x40, 0x03, 0x42, 0x16, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x03, 0x41, 0x45, 0x5b, 0x40, 0x21, 0x03, 0x01, 0x27, 0x40, 0x45, 0x40, 0x40, 0x40, 0x0f,\n+    0x45, 0x5d, 0x59, 0x04, 0x5f, 0x5d, 0x5a, 0x56, 0x56, 0x07, 0x07, 0x0d, 0x4b, 0x02, 0x57, 0x07,\n+    0x61, 0x27, 0x41, 0x15, 0x40, 0x4d, 0x19, 0x40, 0x40, 0x40, 0x45, 0x45, 0x53, 0x59, 0x57, 0x59,\n+    0x5f, 0x5d, 0x53, 0x61, 0x59, 0x55, 0x59, 0x61, 0x61, 0x5f, 0x57, 0x49, 0x43, 0x49, 0x53, 0x59,\n+    0x57, 0x59, 0x5f, 0x5d, 0x53, 0x61, 0x59, 0x55, 0x59, 0x61, 0x61, 0x5f, 0x57, 0x49, 0x43, 0x49,\n+    0x0c, 0x4d, 0x4a, 0x40, 0x48, 0x40, 0x45, 0x07, 0x45, 0x43, 0x43, 0x5a, 0x07, 0x1d, 0x13, 0x4d,\n+    0x12, 0x07, 0x40, 0x1d, 0x13, 0x4d, 0x12, 0x07, 0x40, 0x1d, 0x13, 0x4d, 0x12, 0x07, 0x40, 0x42,\n+    0x07, 0x43, 0x43, 0x41, 0x0c, 0x41, 0x0c, 0x15, 0x17, 0x13, 0x4d, 0x17, 0x13, 0x4d, 0x40, 0x40,\n+    0x40, 0x29, 0x29, 0x15, 0x40, 0x0f, 0x15, 0x1b, 0x1b, 0x22, 0x27, 0x12, 0x07, 0x0c, 0x12, 0x0a,\n+    0x05, 0x39, 0x1d, 0x15, 0x40, 0x15, 0x0a, 0x1b, 0x41, 0x15, 0x00, 0x04, 0x41, 0x15, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x02, 0x40, 0x45, 0x5b, 0x40, 0x20, 0x02, 0x00, 0x27, 0x40, 0x45, 0x40, 0x40, 0x40, 0x0f,\n+    0x45, 0x5b, 0x58, 0x04, 0x5e, 0x5b, 0x59, 0x54, 0x54, 0x07, 0x07, 0x0d, 0x4b, 0x02, 0x56, 0x07,\n+    0x60, 0x27, 0x40, 0x15, 0x40, 0x4d, 0x18, 0x40, 0x40, 0x40, 0x45, 0x45, 0x53, 0x58, 0x56, 0x58,\n+    0x5e, 0x5b, 0x53, 0x60, 0x58, 0x53, 0x58, 0x60, 0x60, 0x5e, 0x56, 0x48, 0x43, 0x48, 0x53, 0x58,\n+    0x56, 0x58, 0x5e, 0x5b, 0x53, 0x60, 0x58, 0x53, 0x58, 0x60, 0x60, 0x5e, 0x56, 0x48, 0x43, 0x48,\n+    0x0c, 0x4d, 0x49, 0x40, 0x48, 0x40, 0x45, 0x07, 0x45, 0x43, 0x43, 0x59, 0x07, 0x1d, 0x12, 0x4d,\n+    0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x42,\n+    0x07, 0x43, 0x43, 0x40, 0x0c, 0x40, 0x0c, 0x15, 0x17, 0x12, 0x4d, 0x17, 0x12, 0x4d, 0x40, 0x40,\n+    0x40, 0x28, 0x28, 0x15, 0x40, 0x0f, 0x15, 0x1a, 0x1a, 0x22, 0x27, 0x12, 0x07, 0x0c, 0x12, 0x0a,\n+    0x05, 0x38, 0x1d, 0x15, 0x40, 0x15, 0x0a, 0x1a, 0x40, 0x15, 0x01, 0x04, 0x40, 0x15, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x02, 0x00, 0x45, 0x5a, 0x40, 0x1f, 0x02, 0x40, 0x27, 0x40, 0x45, 0x40, 0x40, 0x40, 0x0f,\n+    0x45, 0x59, 0x57, 0x05, 0x5c, 0x59, 0x57, 0x51, 0x51, 0x07, 0x07, 0x0d, 0x4a, 0x02, 0x54, 0x07,\n+    0x5f, 0x27, 0x00, 0x15, 0x40, 0x4d, 0x17, 0x40, 0x40, 0x40, 0x45, 0x45, 0x52, 0x57, 0x54, 0x57,\n+    0x5c, 0x59, 0x52, 0x5f, 0x57, 0x51, 0x57, 0x5f, 0x5f, 0x5c, 0x54, 0x47, 0x42, 0x47, 0x52, 0x57,\n+    0x54, 0x57, 0x5c, 0x59, 0x52, 0x5f, 0x57, 0x51, 0x57, 0x5f, 0x5f, 0x5c, 0x54, 0x47, 0x42, 0x47,\n+    0x0d, 0x4d, 0x47, 0x40, 0x48, 0x40, 0x45, 0x07, 0x45, 0x42, 0x42, 0x57, 0x07, 0x1d, 0x12, 0x4d,\n+    0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x42,\n+    0x07, 0x42, 0x42, 0x00, 0x0d, 0x00, 0x0d, 0x15, 0x17, 0x12, 0x4d, 0x17, 0x12, 0x4d, 0x40, 0x40,\n+    0x40, 0x27, 0x27, 0x15, 0x40, 0x0f, 0x15, 0x1a, 0x1a, 0x22, 0x27, 0x12, 0x07, 0x0d, 0x12, 0x0a,\n+    0x05, 0x37, 0x1d, 0x15, 0x40, 0x15, 0x0a, 0x1a, 0x00, 0x15, 0x03, 0x05, 0x00, 0x15, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x01, 0x01, 0x44, 0x59, 0x40, 0x1e, 0x01, 0x41, 0x27, 0x40, 0x44, 0x40, 0x40, 0x40, 0x0f,\n+    0x44, 0x58, 0x56, 0x06, 0x5b, 0x58, 0x55, 0x4f, 0x4f, 0x07, 0x07, 0x0c, 0x49, 0x03, 0x53, 0x07,\n+    0x5e, 0x27, 0x01, 0x14, 0x40, 0x4c, 0x16, 0x40, 0x40, 0x40, 0x44, 0x44, 0x51, 0x56, 0x53, 0x56,\n+    0x5b, 0x58, 0x51, 0x5e, 0x56, 0x50, 0x56, 0x5e, 0x5e, 0x5b, 0x53, 0x46, 0x41, 0x46, 0x51, 0x56,\n+    0x53, 0x56, 0x5b, 0x58, 0x51, 0x5e, 0x56, 0x50, 0x56, 0x5e, 0x5e, 0x5b, 0x53, 0x46, 0x41, 0x46,\n+    0x0e, 0x4c, 0x45, 0x40, 0x48, 0x40, 0x44, 0x07, 0x44, 0x41, 0x41, 0x55, 0x07, 0x1c, 0x11, 0x4c,\n+    0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x43,\n+    0x07, 0x41, 0x41, 0x01, 0x0e, 0x01, 0x0e, 0x14, 0x17, 0x11, 0x4c, 0x17, 0x11, 0x4c, 0x40, 0x40,\n+    0x40, 0x26, 0x26, 0x14, 0x40, 0x0f, 0x14, 0x19, 0x19, 0x23, 0x27, 0x13, 0x07, 0x0e, 0x13, 0x0b,\n+    0x04, 0x36, 0x1c, 0x14, 0x40, 0x14, 0x0b, 0x19, 0x01, 0x14, 0x04, 0x06, 0x01, 0x14, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x01, 0x02, 0x44, 0x59, 0x40, 0x1d, 0x01, 0x42, 0x27, 0x40, 0x44, 0x40, 0x40, 0x40, 0x0f,\n+    0x44, 0x56, 0x55, 0x06, 0x5a, 0x56, 0x53, 0x4c, 0x4c, 0x07, 0x07, 0x0c, 0x49, 0x03, 0x52, 0x07,\n+    0x5d, 0x27, 0x02, 0x14, 0x40, 0x4c, 0x15, 0x40, 0x40, 0x40, 0x44, 0x44, 0x51, 0x55, 0x52, 0x55,\n+    0x5a, 0x56, 0x51, 0x5d, 0x55, 0x4e, 0x55, 0x5d, 0x5d, 0x5a, 0x52, 0x45, 0x41, 0x45, 0x51, 0x55,\n+    0x52, 0x55, 0x5a, 0x56, 0x51, 0x5d, 0x55, 0x4e, 0x55, 0x5d, 0x5d, 0x5a, 0x52, 0x45, 0x41, 0x45,\n+    0x0e, 0x4c, 0x43, 0x40, 0x48, 0x40, 0x44, 0x07, 0x44, 0x41, 0x41, 0x53, 0x07, 0x1c, 0x11, 0x4c,\n+    0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x43,\n+    0x07, 0x41, 0x41, 0x02, 0x0e, 0x02, 0x0e, 0x14, 0x17, 0x11, 0x4c, 0x17, 0x11, 0x4c, 0x40, 0x40,\n+    0x40, 0x25, 0x25, 0x14, 0x40, 0x0f, 0x14, 0x19, 0x19, 0x23, 0x27, 0x13, 0x07, 0x0e, 0x13, 0x0b,\n+    0x04, 0x35, 0x1c, 0x14, 0x40, 0x14, 0x0b, 0x19, 0x02, 0x14, 0x05, 0x06, 0x02, 0x14, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x00, 0x03, 0x44, 0x58, 0x40, 0x1c, 0x00, 0x43, 0x27, 0x40, 0x44, 0x40, 0x40, 0x40, 0x0f,\n+    0x44, 0x55, 0x54, 0x07, 0x59, 0x55, 0x51, 0x4a, 0x4a, 0x07, 0x07, 0x0c, 0x48, 0x03, 0x51, 0x07,\n+    0x5c, 0x27, 0x03, 0x14, 0x40, 0x4c, 0x14, 0x40, 0x40, 0x40, 0x44, 0x44, 0x50, 0x54, 0x51, 0x54,\n+    0x59, 0x55, 0x50, 0x5c, 0x54, 0x4d, 0x54, 0x5c, 0x5c, 0x59, 0x51, 0x44, 0x40, 0x44, 0x50, 0x54,\n+    0x51, 0x54, 0x59, 0x55, 0x50, 0x5c, 0x54, 0x4d, 0x54, 0x5c, 0x5c, 0x59, 0x51, 0x44, 0x40, 0x44,\n+    0x0f, 0x4c, 0x41, 0x40, 0x48, 0x40, 0x44, 0x07, 0x44, 0x40, 0x40, 0x51, 0x07, 0x1c, 0x10, 0x4c,\n+    0x13, 0x07, 0x40, 0x1c, 0x10, 0x4c, 0x13, 0x07, 0x40, 0x1c, 0x10, 0x4c, 0x13, 0x07, 0x40, 0x43,\n+    0x07, 0x40, 0x40, 0x03, 0x0f, 0x03, 0x0f, 0x14, 0x17, 0x10, 0x4c, 0x17, 0x10, 0x4c, 0x40, 0x40,\n+    0x40, 0x24, 0x24, 0x14, 0x40, 0x0f, 0x14, 0x18, 0x18, 0x23, 0x27, 0x13, 0x07, 0x0f, 0x13, 0x0b,\n+    0x04, 0x34, 0x1c, 0x14, 0x40, 0x14, 0x0b, 0x18, 0x03, 0x14, 0x06, 0x07, 0x03, 0x14, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x40, 0x04, 0x43, 0x57, 0x40, 0x1b, 0x40, 0x44, 0x27, 0x40, 0x43, 0x40, 0x40, 0x40, 0x0f,\n+    0x43, 0x53, 0x53, 0x08, 0x57, 0x53, 0x4f, 0x47, 0x47, 0x07, 0x07, 0x0b, 0x47, 0x04, 0x4f, 0x07,\n+    0x5b, 0x27, 0x04, 0x13, 0x40, 0x4b, 0x13, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4f, 0x53, 0x4f, 0x53,\n+    0x57, 0x53, 0x4f, 0x5b, 0x53, 0x4b, 0x53, 0x5b, 0x5b, 0x57, 0x4f, 0x43, 0x00, 0x43, 0x4f, 0x53,\n+    0x4f, 0x53, 0x57, 0x53, 0x4f, 0x5b, 0x53, 0x4b, 0x53, 0x5b, 0x5b, 0x57, 0x4f, 0x43, 0x00, 0x43,\n+    0x10, 0x4b, 0x00, 0x40, 0x48, 0x40, 0x43, 0x07, 0x43, 0x00, 0x00, 0x4f, 0x07, 0x1b, 0x0f, 0x4b,\n+    0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x44,\n+    0x07, 0x00, 0x00, 0x04, 0x10, 0x04, 0x10, 0x13, 0x17, 0x0f, 0x4b, 0x17, 0x0f, 0x4b, 0x40, 0x40,\n+    0x40, 0x23, 0x23, 0x13, 0x40, 0x0f, 0x13, 0x17, 0x17, 0x24, 0x27, 0x14, 0x07, 0x10, 0x14, 0x0c,\n+    0x03, 0x33, 0x1b, 0x13, 0x40, 0x13, 0x0c, 0x17, 0x04, 0x13, 0x08, 0x08, 0x04, 0x13, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x40, 0x05, 0x43, 0x57, 0x40, 0x1a, 0x40, 0x45, 0x27, 0x40, 0x43, 0x40, 0x40, 0x40, 0x0f,\n+    0x43, 0x52, 0x52, 0x08, 0x56, 0x52, 0x4d, 0x45, 0x45, 0x07, 0x07, 0x0b, 0x47, 0x04, 0x4e, 0x07,\n+    0x5a, 0x27, 0x05, 0x13, 0x40, 0x4b, 0x12, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4f, 0x52, 0x4e, 0x52,\n+    0x56, 0x52, 0x4f, 0x5a, 0x52, 0x4a, 0x52, 0x5a, 0x5a, 0x56, 0x4e, 0x42, 0x00, 0x42, 0x4f, 0x52,\n+    0x4e, 0x52, 0x56, 0x52, 0x4f, 0x5a, 0x52, 0x4a, 0x52, 0x5a, 0x5a, 0x56, 0x4e, 0x42, 0x00, 0x42,\n+    0x10, 0x4b, 0x02, 0x40, 0x48, 0x40, 0x43, 0x07, 0x43, 0x00, 0x00, 0x4d, 0x07, 0x1b, 0x0f, 0x4b,\n+    0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x44,\n+    0x07, 0x00, 0x00, 0x05, 0x10, 0x05, 0x10, 0x13, 0x17, 0x0f, 0x4b, 0x17, 0x0f, 0x4b, 0x40, 0x40,\n+    0x40, 0x22, 0x22, 0x13, 0x40, 0x0f, 0x13, 0x17, 0x17, 0x24, 0x27, 0x14, 0x07, 0x10, 0x14, 0x0c,\n+    0x03, 0x32, 0x1b, 0x13, 0x40, 0x13, 0x0c, 0x17, 0x05, 0x13, 0x09, 0x08, 0x05, 0x13, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x41, 0x06, 0x43, 0x56, 0x40, 0x19, 0x41, 0x46, 0x27, 0x40, 0x43, 0x40, 0x40, 0x40, 0x0f,\n+    0x43, 0x50, 0x51, 0x09, 0x55, 0x50, 0x4b, 0x42, 0x42, 0x07, 0x07, 0x0b, 0x46, 0x04, 0x4d, 0x07,\n+    0x59, 0x27, 0x06, 0x13, 0x40, 0x4b, 0x11, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4e, 0x51, 0x4d, 0x51,\n+    0x55, 0x50, 0x4e, 0x59, 0x51, 0x48, 0x51, 0x59, 0x59, 0x55, 0x4d, 0x41, 0x01, 0x41, 0x4e, 0x51,\n+    0x4d, 0x51, 0x55, 0x50, 0x4e, 0x59, 0x51, 0x48, 0x51, 0x59, 0x59, 0x55, 0x4d, 0x41, 0x01, 0x41,\n+    0x11, 0x4b, 0x04, 0x40, 0x48, 0x40, 0x43, 0x07, 0x43, 0x01, 0x01, 0x4b, 0x07, 0x1b, 0x0e, 0x4b,\n+    0x14, 0x07, 0x40, 0x1b, 0x0e, 0x4b, 0x14, 0x07, 0x40, 0x1b, 0x0e, 0x4b, 0x14, 0x07, 0x40, 0x44,\n+    0x07, 0x01, 0x01, 0x06, 0x11, 0x06, 0x11, 0x13, 0x17, 0x0e, 0x4b, 0x17, 0x0e, 0x4b, 0x40, 0x40,\n+    0x40, 0x21, 0x21, 0x13, 0x40, 0x0f, 0x13, 0x16, 0x16, 0x24, 0x27, 0x14, 0x07, 0x11, 0x14, 0x0c,\n+    0x03, 0x31, 0x1b, 0x13, 0x40, 0x13, 0x0c, 0x16, 0x06, 0x13, 0x0a, 0x09, 0x06, 0x13, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x42, 0x06, 0x43, 0x56, 0x40, 0x18, 0x42, 0x47, 0x27, 0x40, 0x43, 0x40, 0x40, 0x40, 0x0f,\n+    0x43, 0x4f, 0x51, 0x09, 0x54, 0x4f, 0x4a, 0x40, 0x40, 0x07, 0x07, 0x0a, 0x46, 0x04, 0x4c, 0x07,\n+    0x59, 0x27, 0x06, 0x12, 0x40, 0x4b, 0x10, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4e, 0x51, 0x4c, 0x51,\n+    0x54, 0x4f, 0x4e, 0x59, 0x51, 0x47, 0x51, 0x59, 0x59, 0x54, 0x4c, 0x41, 0x01, 0x41, 0x4e, 0x51,\n+    0x4c, 0x51, 0x54, 0x4f, 0x4e, 0x59, 0x51, 0x47, 0x51, 0x59, 0x59, 0x54, 0x4c, 0x41, 0x01, 0x41,\n+    0x11, 0x4b, 0x05, 0x40, 0x48, 0x40, 0x43, 0x07, 0x43, 0x01, 0x01, 0x4a, 0x07, 0x1a, 0x0d, 0x4b,\n+    0x14, 0x07, 0x40, 0x1a, 0x0d, 0x4b, 0x14, 0x07, 0x40, 0x1a, 0x0d, 0x4b, 0x14, 0x07, 0x40, 0x45,\n+    0x07, 0x01, 0x01, 0x06, 0x11, 0x06, 0x11, 0x12, 0x17, 0x0d, 0x4b, 0x17, 0x0d, 0x4b, 0x40, 0x40,\n+    0x40, 0x20, 0x20, 0x12, 0x40, 0x0f, 0x12, 0x15, 0x15, 0x24, 0x27, 0x14, 0x07, 0x11, 0x14, 0x0c,\n+    0x02, 0x30, 0x1a, 0x12, 0x40, 0x12, 0x0c, 0x15, 0x06, 0x12, 0x0b, 0x09, 0x06, 0x12, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x42, 0x07, 0x42, 0x55, 0x40, 0x18, 0x42, 0x47, 0x27, 0x40, 0x42, 0x40, 0x40, 0x40, 0x0f,\n+    0x42, 0x4d, 0x50, 0x0a, 0x52, 0x4d, 0x48, 0x02, 0x02, 0x07, 0x07, 0x0a, 0x45, 0x05, 0x4a, 0x07,\n+    0x58, 0x27, 0x07, 0x12, 0x40, 0x4a, 0x10, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4d, 0x50, 0x4a, 0x50,\n+    0x52, 0x4d, 0x4d, 0x58, 0x50, 0x45, 0x50, 0x58, 0x58, 0x52, 0x4a, 0x40, 0x02, 0x40, 0x4d, 0x50,\n+    0x4a, 0x50, 0x52, 0x4d, 0x4d, 0x58, 0x50, 0x45, 0x50, 0x58, 0x58, 0x52, 0x4a, 0x40, 0x02, 0x40,\n+    0x12, 0x4a, 0x07, 0x40, 0x48, 0x40, 0x42, 0x07, 0x42, 0x02, 0x02, 0x48, 0x07, 0x1a, 0x0d, 0x4a,\n+    0x15, 0x07, 0x40, 0x1a, 0x0d, 0x4a, 0x15, 0x07, 0x40, 0x1a, 0x0d, 0x4a, 0x15, 0x07, 0x40, 0x45,\n+    0x07, 0x02, 0x02, 0x07, 0x12, 0x07, 0x12, 0x12, 0x17, 0x0d, 0x4a, 0x17, 0x0d, 0x4a, 0x40, 0x40,\n+    0x40, 0x20, 0x20, 0x12, 0x40, 0x0f, 0x12, 0x15, 0x15, 0x25, 0x27, 0x15, 0x07, 0x12, 0x15, 0x0d,\n+    0x02, 0x30, 0x1a, 0x12, 0x40, 0x12, 0x0d, 0x15, 0x07, 0x12, 0x0d, 0x0a, 0x07, 0x12, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x43, 0x08, 0x42, 0x54, 0x40, 0x17, 0x43, 0x48, 0x27, 0x40, 0x42, 0x40, 0x40, 0x40, 0x0f,\n+    0x42, 0x4b, 0x4f, 0x0b, 0x51, 0x4b, 0x46, 0x04, 0x04, 0x07, 0x07, 0x0a, 0x44, 0x05, 0x49, 0x07,\n+    0x57, 0x27, 0x08, 0x12, 0x40, 0x4a, 0x0f, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4c, 0x4f, 0x49, 0x4f,\n+    0x51, 0x4b, 0x4c, 0x57, 0x4f, 0x43, 0x4f, 0x57, 0x57, 0x51, 0x49, 0x00, 0x03, 0x00, 0x4c, 0x4f,\n+    0x49, 0x4f, 0x51, 0x4b, 0x4c, 0x57, 0x4f, 0x43, 0x4f, 0x57, 0x57, 0x51, 0x49, 0x00, 0x03, 0x00,\n+    0x13, 0x4a, 0x09, 0x40, 0x48, 0x40, 0x42, 0x07, 0x42, 0x03, 0x03, 0x46, 0x07, 0x1a, 0x0c, 0x4a,\n+    0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x45,\n+    0x07, 0x03, 0x03, 0x08, 0x13, 0x08, 0x13, 0x12, 0x17, 0x0c, 0x4a, 0x17, 0x0c, 0x4a, 0x40, 0x40,\n+    0x40, 0x1f, 0x1f, 0x12, 0x40, 0x0f, 0x12, 0x14, 0x14, 0x25, 0x27, 0x15, 0x07, 0x13, 0x15, 0x0d,\n+    0x02, 0x2f, 0x1a, 0x12, 0x40, 0x12, 0x0d, 0x14, 0x08, 0x12, 0x0e, 0x0b, 0x08, 0x12, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x43, 0x09, 0x42, 0x54, 0x40, 0x16, 0x43, 0x49, 0x27, 0x40, 0x42, 0x40, 0x40, 0x40, 0x0f,\n+    0x42, 0x4a, 0x4e, 0x0b, 0x50, 0x4a, 0x44, 0x07, 0x07, 0x07, 0x07, 0x0a, 0x44, 0x05, 0x48, 0x07,\n+    0x56, 0x27, 0x09, 0x12, 0x40, 0x4a, 0x0e, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4c, 0x4e, 0x48, 0x4e,\n+    0x50, 0x4a, 0x4c, 0x56, 0x4e, 0x42, 0x4e, 0x56, 0x56, 0x50, 0x48, 0x01, 0x03, 0x01, 0x4c, 0x4e,\n+    0x48, 0x4e, 0x50, 0x4a, 0x4c, 0x56, 0x4e, 0x42, 0x4e, 0x56, 0x56, 0x50, 0x48, 0x01, 0x03, 0x01,\n+    0x13, 0x4a, 0x0b, 0x40, 0x48, 0x40, 0x42, 0x07, 0x42, 0x03, 0x03, 0x44, 0x07, 0x1a, 0x0c, 0x4a,\n+    0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x45,\n+    0x07, 0x03, 0x03, 0x09, 0x13, 0x09, 0x13, 0x12, 0x17, 0x0c, 0x4a, 0x17, 0x0c, 0x4a, 0x40, 0x40,\n+    0x40, 0x1e, 0x1e, 0x12, 0x40, 0x0f, 0x12, 0x14, 0x14, 0x25, 0x27, 0x15, 0x07, 0x13, 0x15, 0x0d,\n+    0x02, 0x2e, 0x1a, 0x12, 0x40, 0x12, 0x0d, 0x14, 0x09, 0x12, 0x0f, 0x0b, 0x09, 0x12, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x44, 0x0a, 0x41, 0x53, 0x40, 0x15, 0x44, 0x4a, 0x27, 0x40, 0x41, 0x40, 0x40, 0x40, 0x0f,\n+    0x41, 0x48, 0x4d, 0x0c, 0x4f, 0x48, 0x42, 0x09, 0x09, 0x07, 0x07, 0x09, 0x43, 0x06, 0x47, 0x07,\n+    0x55, 0x27, 0x0a, 0x11, 0x40, 0x49, 0x0d, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4b, 0x4d, 0x47, 0x4d,\n+    0x4f, 0x48, 0x4b, 0x55, 0x4d, 0x40, 0x4d, 0x55, 0x55, 0x4f, 0x47, 0x02, 0x04, 0x02, 0x4b, 0x4d,\n+    0x47, 0x4d, 0x4f, 0x48, 0x4b, 0x55, 0x4d, 0x40, 0x4d, 0x55, 0x55, 0x4f, 0x47, 0x02, 0x04, 0x02,\n+    0x14, 0x49, 0x0d, 0x40, 0x48, 0x40, 0x41, 0x07, 0x41, 0x04, 0x04, 0x42, 0x07, 0x19, 0x0b, 0x49,\n+    0x16, 0x07, 0x40, 0x19, 0x0b, 0x49, 0x16, 0x07, 0x40, 0x19, 0x0b, 0x49, 0x16, 0x07, 0x40, 0x46,\n+    0x07, 0x04, 0x04, 0x0a, 0x14, 0x0a, 0x14, 0x11, 0x17, 0x0b, 0x49, 0x17, 0x0b, 0x49, 0x40, 0x40,\n+    0x40, 0x1d, 0x1d, 0x11, 0x40, 0x0f, 0x11, 0x13, 0x13, 0x26, 0x27, 0x16, 0x07, 0x14, 0x16, 0x0e,\n+    0x01, 0x2d, 0x19, 0x11, 0x40, 0x11, 0x0e, 0x13, 0x0a, 0x11, 0x10, 0x0c, 0x0a, 0x11, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x45, 0x0b, 0x41, 0x52, 0x40, 0x14, 0x45, 0x4b, 0x27, 0x40, 0x41, 0x40, 0x40, 0x40, 0x0f,\n+    0x41, 0x47, 0x4c, 0x0d, 0x4d, 0x47, 0x40, 0x0c, 0x0c, 0x07, 0x07, 0x09, 0x42, 0x06, 0x45, 0x07,\n+    0x54, 0x27, 0x0b, 0x11, 0x40, 0x49, 0x0c, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4a, 0x4c, 0x45, 0x4c,\n+    0x4d, 0x47, 0x4a, 0x54, 0x4c, 0x00, 0x4c, 0x54, 0x54, 0x4d, 0x45, 0x03, 0x05, 0x03, 0x4a, 0x4c,\n+    0x45, 0x4c, 0x4d, 0x47, 0x4a, 0x54, 0x4c, 0x00, 0x4c, 0x54, 0x54, 0x4d, 0x45, 0x03, 0x05, 0x03,\n+    0x15, 0x49, 0x0f, 0x40, 0x48, 0x40, 0x41, 0x07, 0x41, 0x05, 0x05, 0x40, 0x07, 0x19, 0x0a, 0x49,\n+    0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x46,\n+    0x07, 0x05, 0x05, 0x0b, 0x15, 0x0b, 0x15, 0x11, 0x17, 0x0a, 0x49, 0x17, 0x0a, 0x49, 0x40, 0x40,\n+    0x40, 0x1c, 0x1c, 0x11, 0x40, 0x0f, 0x11, 0x12, 0x12, 0x26, 0x27, 0x16, 0x07, 0x15, 0x16, 0x0e,\n+    0x01, 0x2c, 0x19, 0x11, 0x40, 0x11, 0x0e, 0x12, 0x0b, 0x11, 0x12, 0x0d, 0x0b, 0x11, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x45, 0x0c, 0x41, 0x52, 0x40, 0x13, 0x45, 0x4c, 0x27, 0x40, 0x41, 0x40, 0x40, 0x40, 0x0f,\n+    0x41, 0x45, 0x4b, 0x0d, 0x4c, 0x45, 0x01, 0x0e, 0x0e, 0x07, 0x07, 0x09, 0x42, 0x06, 0x44, 0x07,\n+    0x53, 0x27, 0x0c, 0x11, 0x40, 0x49, 0x0b, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4a, 0x4b, 0x44, 0x4b,\n+    0x4c, 0x45, 0x4a, 0x53, 0x4b, 0x02, 0x4b, 0x53, 0x53, 0x4c, 0x44, 0x04, 0x05, 0x04, 0x4a, 0x4b,\n+    0x44, 0x4b, 0x4c, 0x45, 0x4a, 0x53, 0x4b, 0x02, 0x4b, 0x53, 0x53, 0x4c, 0x44, 0x04, 0x05, 0x04,\n+    0x15, 0x49, 0x11, 0x40, 0x48, 0x40, 0x41, 0x07, 0x41, 0x05, 0x05, 0x01, 0x07, 0x19, 0x0a, 0x49,\n+    0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x46,\n+    0x07, 0x05, 0x05, 0x0c, 0x15, 0x0c, 0x15, 0x11, 0x17, 0x0a, 0x49, 0x17, 0x0a, 0x49, 0x40, 0x40,\n+    0x40, 0x1b, 0x1b, 0x11, 0x40, 0x0f, 0x11, 0x12, 0x12, 0x26, 0x27, 0x16, 0x07, 0x15, 0x16, 0x0e,\n+    0x01, 0x2b, 0x19, 0x11, 0x40, 0x11, 0x0e, 0x12, 0x0c, 0x11, 0x13, 0x0d, 0x0c, 0x11, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x46, 0x0d, 0x40, 0x51, 0x40, 0x12, 0x46, 0x4d, 0x27, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0f,\n+    0x40, 0x44, 0x4a, 0x0e, 0x4b, 0x44, 0x03, 0x11, 0x11, 0x07, 0x07, 0x08, 0x41, 0x07, 0x43, 0x07,\n+    0x52, 0x27, 0x0d, 0x10, 0x40, 0x48, 0x0a, 0x40, 0x40, 0x40, 0x40, 0x40, 0x49, 0x4a, 0x43, 0x4a,\n+    0x4b, 0x44, 0x49, 0x52, 0x4a, 0x03, 0x4a, 0x52, 0x52, 0x4b, 0x43, 0x05, 0x06, 0x05, 0x49, 0x4a,\n+    0x43, 0x4a, 0x4b, 0x44, 0x49, 0x52, 0x4a, 0x03, 0x4a, 0x52, 0x52, 0x4b, 0x43, 0x05, 0x06, 0x05,\n+    0x16, 0x48, 0x13, 0x40, 0x48, 0x40, 0x40, 0x07, 0x40, 0x06, 0x06, 0x03, 0x07, 0x18, 0x09, 0x48,\n+    0x17, 0x07, 0x40, 0x18, 0x09, 0x48, 0x17, 0x07, 0x40, 0x18, 0x09, 0x48, 0x17, 0x07, 0x40, 0x47,\n+    0x07, 0x06, 0x06, 0x0d, 0x16, 0x0d, 0x16, 0x10, 0x17, 0x09, 0x48, 0x17, 0x09, 0x48, 0x40, 0x40,\n+    0x40, 0x1a, 0x1a, 0x10, 0x40, 0x0f, 0x10, 0x11, 0x11, 0x27, 0x27, 0x17, 0x07, 0x16, 0x17, 0x0f,\n+    0x00, 0x2a, 0x18, 0x10, 0x40, 0x10, 0x0f, 0x11, 0x0d, 0x10, 0x14, 0x0e, 0x0d, 0x10, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x47, 0x0e, 0x40, 0x51, 0x40, 0x11, 0x47, 0x4e, 0x27, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0f,\n+    0x40, 0x42, 0x49, 0x0e, 0x4a, 0x42, 0x04, 0x13, 0x13, 0x07, 0x07, 0x08, 0x41, 0x07, 0x42, 0x07,\n+    0x51, 0x27, 0x0e, 0x10, 0x40, 0x48, 0x09, 0x40, 0x40, 0x40, 0x40, 0x40, 0x49, 0x49, 0x42, 0x49,\n+    0x4a, 0x42, 0x49, 0x51, 0x49, 0x05, 0x49, 0x51, 0x51, 0x4a, 0x42, 0x06, 0x06, 0x06, 0x49, 0x49,\n+    0x42, 0x49, 0x4a, 0x42, 0x49, 0x51, 0x49, 0x05, 0x49, 0x51, 0x51, 0x4a, 0x42, 0x06, 0x06, 0x06,\n+    0x16, 0x48, 0x14, 0x40, 0x48, 0x40, 0x40, 0x07, 0x40, 0x06, 0x06, 0x04, 0x07, 0x18, 0x08, 0x48,\n+    0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x47,\n+    0x07, 0x06, 0x06, 0x0e, 0x16, 0x0e, 0x16, 0x10, 0x17, 0x08, 0x48, 0x17, 0x08, 0x48, 0x40, 0x40,\n+    0x40, 0x19, 0x19, 0x10, 0x40, 0x0f, 0x10, 0x10, 0x10, 0x27, 0x27, 0x17, 0x07, 0x16, 0x17, 0x0f,\n+    0x00, 0x29, 0x18, 0x10, 0x40, 0x10, 0x0f, 0x10, 0x0e, 0x10, 0x15, 0x0e, 0x0e, 0x10, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x47, 0x0f, 0x40, 0x50, 0x40, 0x10, 0x47, 0x4f, 0x27, 0x40, 0x40, 0x40, 0x40, 0x40, 0x0f,\n+    0x40, 0x40, 0x48, 0x0f, 0x48, 0x40, 0x06, 0x16, 0x16, 0x07, 0x07, 0x08, 0x40, 0x07, 0x40, 0x07,\n+    0x50, 0x27, 0x0f, 0x10, 0x40, 0x48, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x48, 0x48, 0x40, 0x48,\n+    0x48, 0x40, 0x48, 0x50, 0x48, 0x07, 0x48, 0x50, 0x50, 0x48, 0x40, 0x07, 0x07, 0x07, 0x48, 0x48,\n+    0x40, 0x48, 0x48, 0x40, 0x48, 0x50, 0x48, 0x07, 0x48, 0x50, 0x50, 0x48, 0x40, 0x07, 0x07, 0x07,\n+    0x17, 0x48, 0x16, 0x40, 0x48, 0x40, 0x40, 0x07, 0x40, 0x07, 0x07, 0x06, 0x07, 0x18, 0x08, 0x48,\n+    0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x47,\n+    0x07, 0x07, 0x07, 0x0f, 0x17, 0x0f, 0x17, 0x10, 0x17, 0x08, 0x48, 0x17, 0x08, 0x48, 0x40, 0x40,\n+    0x40, 0x18, 0x18, 0x10, 0x40, 0x0f, 0x10, 0x10, 0x10, 0x27, 0x27, 0x17, 0x07, 0x17, 0x17, 0x0f,\n+    0x00, 0x28, 0x18, 0x10, 0x40, 0x10, 0x0f, 0x10, 0x0f, 0x10, 0x17, 0x0f, 0x0f, 0x10, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x48, 0x10, 0x00, 0x4f, 0x40, 0x0f, 0x48, 0x50, 0x27, 0x40, 0x00, 0x40, 0x40, 0x40, 0x0f,\n+    0x00, 0x00, 0x47, 0x10, 0x47, 0x00, 0x08, 0x18, 0x18, 0x07, 0x07, 0x07, 0x00, 0x08, 0x00, 0x07,\n+    0x4f, 0x27, 0x10, 0x0f, 0x40, 0x47, 0x07, 0x40, 0x40, 0x40, 0x00, 0x00, 0x47, 0x47, 0x00, 0x47,\n+    0x47, 0x00, 0x47, 0x4f, 0x47, 0x08, 0x47, 0x4f, 0x4f, 0x47, 0x00, 0x08, 0x08, 0x08, 0x47, 0x47,\n+    0x00, 0x47, 0x47, 0x00, 0x47, 0x4f, 0x47, 0x08, 0x47, 0x4f, 0x4f, 0x47, 0x00, 0x08, 0x08, 0x08,\n+    0x18, 0x47, 0x18, 0x40, 0x48, 0x40, 0x00, 0x07, 0x00, 0x08, 0x08, 0x08, 0x07, 0x17, 0x07, 0x47,\n+    0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x48,\n+    0x07, 0x08, 0x08, 0x10, 0x18, 0x10, 0x18, 0x0f, 0x17, 0x07, 0x47, 0x17, 0x07, 0x47, 0x40, 0x40,\n+    0x40, 0x17, 0x17, 0x0f, 0x40, 0x0f, 0x0f, 0x0f, 0x0f, 0x28, 0x27, 0x18, 0x07, 0x18, 0x18, 0x10,\n+    0x40, 0x27, 0x17, 0x0f, 0x40, 0x0f, 0x10, 0x0f, 0x10, 0x0f, 0x18, 0x10, 0x10, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x48, 0x11, 0x00, 0x4f, 0x40, 0x0e, 0x48, 0x51, 0x27, 0x40, 0x00, 0x40, 0x40, 0x40, 0x0f,\n+    0x00, 0x02, 0x46, 0x10, 0x46, 0x02, 0x0a, 0x1b, 0x1b, 0x07, 0x07, 0x07, 0x00, 0x08, 0x01, 0x07,\n+    0x4e, 0x27, 0x11, 0x0f, 0x40, 0x47, 0x06, 0x40, 0x40, 0x40, 0x00, 0x00, 0x47, 0x46, 0x01, 0x46,\n+    0x46, 0x02, 0x47, 0x4e, 0x46, 0x0a, 0x46, 0x4e, 0x4e, 0x46, 0x01, 0x09, 0x08, 0x09, 0x47, 0x46,\n+    0x01, 0x46, 0x46, 0x02, 0x47, 0x4e, 0x46, 0x0a, 0x46, 0x4e, 0x4e, 0x46, 0x01, 0x09, 0x08, 0x09,\n+    0x18, 0x47, 0x1a, 0x40, 0x48, 0x40, 0x00, 0x07, 0x00, 0x08, 0x08, 0x0a, 0x07, 0x17, 0x07, 0x47,\n+    0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x48,\n+    0x07, 0x08, 0x08, 0x11, 0x18, 0x11, 0x18, 0x0f, 0x17, 0x07, 0x47, 0x17, 0x07, 0x47, 0x40, 0x40,\n+    0x40, 0x16, 0x16, 0x0f, 0x40, 0x0f, 0x0f, 0x0f, 0x0f, 0x28, 0x27, 0x18, 0x07, 0x18, 0x18, 0x10,\n+    0x40, 0x26, 0x17, 0x0f, 0x40, 0x0f, 0x10, 0x0f, 0x11, 0x0f, 0x19, 0x10, 0x11, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x49, 0x12, 0x00, 0x4e, 0x40, 0x0d, 0x49, 0x52, 0x27, 0x40, 0x00, 0x40, 0x40, 0x40, 0x0f,\n+    0x00, 0x03, 0x45, 0x11, 0x45, 0x03, 0x0c, 0x1d, 0x1d, 0x07, 0x07, 0x07, 0x01, 0x08, 0x02, 0x07,\n+    0x4d, 0x27, 0x12, 0x0f, 0x40, 0x47, 0x05, 0x40, 0x40, 0x40, 0x00, 0x00, 0x46, 0x45, 0x02, 0x45,\n+    0x45, 0x03, 0x46, 0x4d, 0x45, 0x0b, 0x45, 0x4d, 0x4d, 0x45, 0x02, 0x0a, 0x09, 0x0a, 0x46, 0x45,\n+    0x02, 0x45, 0x45, 0x03, 0x46, 0x4d, 0x45, 0x0b, 0x45, 0x4d, 0x4d, 0x45, 0x02, 0x0a, 0x09, 0x0a,\n+    0x19, 0x47, 0x1c, 0x40, 0x48, 0x40, 0x00, 0x07, 0x00, 0x09, 0x09, 0x0c, 0x07, 0x17, 0x06, 0x47,\n+    0x18, 0x07, 0x40, 0x17, 0x06, 0x47, 0x18, 0x07, 0x40, 0x17, 0x06, 0x47, 0x18, 0x07, 0x40, 0x48,\n+    0x07, 0x09, 0x09, 0x12, 0x19, 0x12, 0x19, 0x0f, 0x17, 0x06, 0x47, 0x17, 0x06, 0x47, 0x40, 0x40,\n+    0x40, 0x15, 0x15, 0x0f, 0x40, 0x0f, 0x0f, 0x0e, 0x0e, 0x28, 0x27, 0x18, 0x07, 0x19, 0x18, 0x10,\n+    0x40, 0x25, 0x17, 0x0f, 0x40, 0x0f, 0x10, 0x0e, 0x12, 0x0f, 0x1a, 0x11, 0x12, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4a, 0x13, 0x01, 0x4d, 0x40, 0x0c, 0x4a, 0x53, 0x27, 0x40, 0x01, 0x40, 0x40, 0x40, 0x0f,\n+    0x01, 0x05, 0x44, 0x12, 0x43, 0x05, 0x0e, 0x20, 0x20, 0x07, 0x07, 0x06, 0x02, 0x09, 0x04, 0x07,\n+    0x4c, 0x27, 0x13, 0x0e, 0x40, 0x46, 0x04, 0x40, 0x40, 0x40, 0x01, 0x01, 0x45, 0x44, 0x04, 0x44,\n+    0x43, 0x05, 0x45, 0x4c, 0x44, 0x0d, 0x44, 0x4c, 0x4c, 0x43, 0x04, 0x0b, 0x0a, 0x0b, 0x45, 0x44,\n+    0x04, 0x44, 0x43, 0x05, 0x45, 0x4c, 0x44, 0x0d, 0x44, 0x4c, 0x4c, 0x43, 0x04, 0x0b, 0x0a, 0x0b,\n+    0x1a, 0x46, 0x1e, 0x40, 0x48, 0x40, 0x01, 0x07, 0x01, 0x0a, 0x0a, 0x0e, 0x07, 0x16, 0x05, 0x46,\n+    0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x49,\n+    0x07, 0x0a, 0x0a, 0x13, 0x1a, 0x13, 0x1a, 0x0e, 0x17, 0x05, 0x46, 0x17, 0x05, 0x46, 0x40, 0x40,\n+    0x40, 0x14, 0x14, 0x0e, 0x40, 0x0f, 0x0e, 0x0d, 0x0d, 0x29, 0x27, 0x19, 0x07, 0x1a, 0x19, 0x11,\n+    0x41, 0x24, 0x16, 0x0e, 0x40, 0x0e, 0x11, 0x0d, 0x13, 0x0e, 0x1c, 0x12, 0x13, 0x0e, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4a, 0x14, 0x01, 0x4d, 0x40, 0x0b, 0x4a, 0x54, 0x27, 0x40, 0x01, 0x40, 0x40, 0x40, 0x0f,\n+    0x01, 0x06, 0x43, 0x12, 0x42, 0x06, 0x10, 0x22, 0x22, 0x07, 0x07, 0x06, 0x02, 0x09, 0x05, 0x07,\n+    0x4b, 0x27, 0x14, 0x0e, 0x40, 0x46, 0x03, 0x40, 0x40, 0x40, 0x01, 0x01, 0x45, 0x43, 0x05, 0x43,\n+    0x42, 0x06, 0x45, 0x4b, 0x43, 0x0e, 0x43, 0x4b, 0x4b, 0x42, 0x05, 0x0c, 0x0a, 0x0c, 0x45, 0x43,\n+    0x05, 0x43, 0x42, 0x06, 0x45, 0x4b, 0x43, 0x0e, 0x43, 0x4b, 0x4b, 0x42, 0x05, 0x0c, 0x0a, 0x0c,\n+    0x1a, 0x46, 0x20, 0x40, 0x48, 0x40, 0x01, 0x07, 0x01, 0x0a, 0x0a, 0x10, 0x07, 0x16, 0x05, 0x46,\n+    0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x49,\n+    0x07, 0x0a, 0x0a, 0x14, 0x1a, 0x14, 0x1a, 0x0e, 0x17, 0x05, 0x46, 0x17, 0x05, 0x46, 0x40, 0x40,\n+    0x40, 0x13, 0x13, 0x0e, 0x40, 0x0f, 0x0e, 0x0d, 0x0d, 0x29, 0x27, 0x19, 0x07, 0x1a, 0x19, 0x11,\n+    0x41, 0x23, 0x16, 0x0e, 0x40, 0x0e, 0x11, 0x0d, 0x14, 0x0e, 0x1d, 0x12, 0x14, 0x0e, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4b, 0x15, 0x01, 0x4c, 0x40, 0x0a, 0x4b, 0x55, 0x27, 0x40, 0x01, 0x40, 0x40, 0x40, 0x0f,\n+    0x01, 0x08, 0x42, 0x13, 0x41, 0x08, 0x12, 0x25, 0x25, 0x07, 0x07, 0x06, 0x03, 0x09, 0x06, 0x07,\n+    0x4a, 0x27, 0x15, 0x0e, 0x40, 0x46, 0x02, 0x40, 0x40, 0x40, 0x01, 0x01, 0x44, 0x42, 0x06, 0x42,\n+    0x41, 0x08, 0x44, 0x4a, 0x42, 0x10, 0x42, 0x4a, 0x4a, 0x41, 0x06, 0x0d, 0x0b, 0x0d, 0x44, 0x42,\n+    0x06, 0x42, 0x41, 0x08, 0x44, 0x4a, 0x42, 0x10, 0x42, 0x4a, 0x4a, 0x41, 0x06, 0x0d, 0x0b, 0x0d,\n+    0x1b, 0x46, 0x22, 0x40, 0x48, 0x40, 0x01, 0x07, 0x01, 0x0b, 0x0b, 0x12, 0x07, 0x16, 0x04, 0x46,\n+    0x19, 0x07, 0x40, 0x16, 0x04, 0x46, 0x19, 0x07, 0x40, 0x16, 0x04, 0x46, 0x19, 0x07, 0x40, 0x49,\n+    0x07, 0x0b, 0x0b, 0x15, 0x1b, 0x15, 0x1b, 0x0e, 0x17, 0x04, 0x46, 0x17, 0x04, 0x46, 0x40, 0x40,\n+    0x40, 0x12, 0x12, 0x0e, 0x40, 0x0f, 0x0e, 0x0c, 0x0c, 0x29, 0x27, 0x19, 0x07, 0x1b, 0x19, 0x11,\n+    0x41, 0x22, 0x16, 0x0e, 0x40, 0x0e, 0x11, 0x0c, 0x15, 0x0e, 0x1e, 0x13, 0x15, 0x0e, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4c, 0x15, 0x01, 0x4c, 0x40, 0x09, 0x4c, 0x56, 0x27, 0x40, 0x01, 0x40, 0x40, 0x40, 0x0f,\n+    0x01, 0x09, 0x42, 0x13, 0x40, 0x09, 0x13, 0x27, 0x27, 0x07, 0x07, 0x05, 0x03, 0x09, 0x07, 0x07,\n+    0x4a, 0x27, 0x15, 0x0d, 0x40, 0x46, 0x01, 0x40, 0x40, 0x40, 0x01, 0x01, 0x44, 0x42, 0x07, 0x42,\n+    0x40, 0x09, 0x44, 0x4a, 0x42, 0x11, 0x42, 0x4a, 0x4a, 0x40, 0x07, 0x0d, 0x0b, 0x0d, 0x44, 0x42,\n+    0x07, 0x42, 0x40, 0x09, 0x44, 0x4a, 0x42, 0x11, 0x42, 0x4a, 0x4a, 0x40, 0x07, 0x0d, 0x0b, 0x0d,\n+    0x1b, 0x46, 0x23, 0x40, 0x48, 0x40, 0x01, 0x07, 0x01, 0x0b, 0x0b, 0x13, 0x07, 0x15, 0x03, 0x46,\n+    0x19, 0x07, 0x40, 0x15, 0x03, 0x46, 0x19, 0x07, 0x40, 0x15, 0x03, 0x46, 0x19, 0x07, 0x40, 0x4a,\n+    0x07, 0x0b, 0x0b, 0x15, 0x1b, 0x15, 0x1b, 0x0d, 0x17, 0x03, 0x46, 0x17, 0x03, 0x46, 0x40, 0x40,\n+    0x40, 0x11, 0x11, 0x0d, 0x40, 0x0f, 0x0d, 0x0b, 0x0b, 0x29, 0x27, 0x19, 0x07, 0x1b, 0x19, 0x11,\n+    0x42, 0x21, 0x15, 0x0d, 0x40, 0x0d, 0x11, 0x0b, 0x15, 0x0d, 0x1f, 0x13, 0x15, 0x0d, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4c, 0x16, 0x02, 0x4b, 0x40, 0x09, 0x4c, 0x56, 0x27, 0x40, 0x02, 0x40, 0x40, 0x40, 0x0f,\n+    0x02, 0x0b, 0x41, 0x14, 0x01, 0x0b, 0x15, 0x2a, 0x2a, 0x07, 0x07, 0x05, 0x04, 0x0a, 0x09, 0x07,\n+    0x49, 0x27, 0x16, 0x0d, 0x40, 0x45, 0x01, 0x40, 0x40, 0x40, 0x02, 0x02, 0x43, 0x41, 0x09, 0x41,\n+    0x01, 0x0b, 0x43, 0x49, 0x41, 0x13, 0x41, 0x49, 0x49, 0x01, 0x09, 0x0e, 0x0c, 0x0e, 0x43, 0x41,\n+    0x09, 0x41, 0x01, 0x0b, 0x43, 0x49, 0x41, 0x13, 0x41, 0x49, 0x49, 0x01, 0x09, 0x0e, 0x0c, 0x0e,\n+    0x1c, 0x45, 0x25, 0x40, 0x48, 0x40, 0x02, 0x07, 0x02, 0x0c, 0x0c, 0x15, 0x07, 0x15, 0x03, 0x45,\n+    0x1a, 0x07, 0x40, 0x15, 0x03, 0x45, 0x1a, 0x07, 0x40, 0x15, 0x03, 0x45, 0x1a, 0x07, 0x40, 0x4a,\n+    0x07, 0x0c, 0x0c, 0x16, 0x1c, 0x16, 0x1c, 0x0d, 0x17, 0x03, 0x45, 0x17, 0x03, 0x45, 0x40, 0x40,\n+    0x40, 0x11, 0x11, 0x0d, 0x40, 0x0f, 0x0d, 0x0b, 0x0b, 0x2a, 0x27, 0x1a, 0x07, 0x1c, 0x1a, 0x12,\n+    0x42, 0x21, 0x15, 0x0d, 0x40, 0x0d, 0x12, 0x0b, 0x16, 0x0d, 0x21, 0x14, 0x16, 0x0d, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4d, 0x17, 0x02, 0x4a, 0x40, 0x08, 0x4d, 0x57, 0x27, 0x40, 0x02, 0x40, 0x40, 0x40, 0x0f,\n+    0x02, 0x0d, 0x40, 0x15, 0x02, 0x0d, 0x17, 0x2c, 0x2c, 0x07, 0x07, 0x05, 0x05, 0x0a, 0x0a, 0x07,\n+    0x48, 0x27, 0x17, 0x0d, 0x40, 0x45, 0x00, 0x40, 0x40, 0x40, 0x02, 0x02, 0x42, 0x40, 0x0a, 0x40,\n+    0x02, 0x0d, 0x42, 0x48, 0x40, 0x15, 0x40, 0x48, 0x48, 0x02, 0x0a, 0x0f, 0x0d, 0x0f, 0x42, 0x40,\n+    0x0a, 0x40, 0x02, 0x0d, 0x42, 0x48, 0x40, 0x15, 0x40, 0x48, 0x48, 0x02, 0x0a, 0x0f, 0x0d, 0x0f,\n+    0x1d, 0x45, 0x27, 0x40, 0x48, 0x40, 0x02, 0x07, 0x02, 0x0d, 0x0d, 0x17, 0x07, 0x15, 0x02, 0x45,\n+    0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x4a,\n+    0x07, 0x0d, 0x0d, 0x17, 0x1d, 0x17, 0x1d, 0x0d, 0x17, 0x02, 0x45, 0x17, 0x02, 0x45, 0x40, 0x40,\n+    0x40, 0x10, 0x10, 0x0d, 0x40, 0x0f, 0x0d, 0x0a, 0x0a, 0x2a, 0x27, 0x1a, 0x07, 0x1d, 0x1a, 0x12,\n+    0x42, 0x20, 0x15, 0x0d, 0x40, 0x0d, 0x12, 0x0a, 0x17, 0x0d, 0x22, 0x15, 0x17, 0x0d, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4d, 0x18, 0x02, 0x4a, 0x40, 0x07, 0x4d, 0x58, 0x27, 0x40, 0x02, 0x40, 0x40, 0x40, 0x0f,\n+    0x02, 0x0e, 0x00, 0x15, 0x03, 0x0e, 0x19, 0x2f, 0x2f, 0x07, 0x07, 0x05, 0x05, 0x0a, 0x0b, 0x07,\n+    0x47, 0x27, 0x18, 0x0d, 0x40, 0x45, 0x40, 0x40, 0x40, 0x40, 0x02, 0x02, 0x42, 0x00, 0x0b, 0x00,\n+    0x03, 0x0e, 0x42, 0x47, 0x00, 0x16, 0x00, 0x47, 0x47, 0x03, 0x0b, 0x10, 0x0d, 0x10, 0x42, 0x00,\n+    0x0b, 0x00, 0x03, 0x0e, 0x42, 0x47, 0x00, 0x16, 0x00, 0x47, 0x47, 0x03, 0x0b, 0x10, 0x0d, 0x10,\n+    0x1d, 0x45, 0x29, 0x40, 0x48, 0x40, 0x02, 0x07, 0x02, 0x0d, 0x0d, 0x19, 0x07, 0x15, 0x02, 0x45,\n+    0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x4a,\n+    0x07, 0x0d, 0x0d, 0x18, 0x1d, 0x18, 0x1d, 0x0d, 0x17, 0x02, 0x45, 0x17, 0x02, 0x45, 0x40, 0x40,\n+    0x40, 0x0f, 0x0f, 0x0d, 0x40, 0x0f, 0x0d, 0x0a, 0x0a, 0x2a, 0x27, 0x1a, 0x07, 0x1d, 0x1a, 0x12,\n+    0x42, 0x1f, 0x15, 0x0d, 0x40, 0x0d, 0x12, 0x0a, 0x18, 0x0d, 0x23, 0x15, 0x18, 0x0d, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4e, 0x19, 0x03, 0x49, 0x40, 0x06, 0x4e, 0x59, 0x27, 0x40, 0x03, 0x40, 0x40, 0x40, 0x0f,\n+    0x03, 0x10, 0x01, 0x16, 0x04, 0x10, 0x1b, 0x31, 0x31, 0x07, 0x07, 0x04, 0x06, 0x0b, 0x0c, 0x07,\n+    0x46, 0x27, 0x19, 0x0c, 0x40, 0x44, 0x41, 0x40, 0x40, 0x40, 0x03, 0x03, 0x41, 0x01, 0x0c, 0x01,\n+    0x04, 0x10, 0x41, 0x46, 0x01, 0x18, 0x01, 0x46, 0x46, 0x04, 0x0c, 0x11, 0x0e, 0x11, 0x41, 0x01,\n+    0x0c, 0x01, 0x04, 0x10, 0x41, 0x46, 0x01, 0x18, 0x01, 0x46, 0x46, 0x04, 0x0c, 0x11, 0x0e, 0x11,\n+    0x1e, 0x44, 0x2b, 0x40, 0x48, 0x40, 0x03, 0x07, 0x03, 0x0e, 0x0e, 0x1b, 0x07, 0x14, 0x01, 0x44,\n+    0x1b, 0x07, 0x40, 0x14, 0x01, 0x44, 0x1b, 0x07, 0x40, 0x14, 0x01, 0x44, 0x1b, 0x07, 0x40, 0x4b,\n+    0x07, 0x0e, 0x0e, 0x19, 0x1e, 0x19, 0x1e, 0x0c, 0x17, 0x01, 0x44, 0x17, 0x01, 0x44, 0x40, 0x40,\n+    0x40, 0x0e, 0x0e, 0x0c, 0x40, 0x0f, 0x0c, 0x09, 0x09, 0x2b, 0x27, 0x1b, 0x07, 0x1e, 0x1b, 0x13,\n+    0x43, 0x1e, 0x14, 0x0c, 0x40, 0x0c, 0x13, 0x09, 0x19, 0x0c, 0x24, 0x16, 0x19, 0x0c, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4f, 0x1a, 0x03, 0x48, 0x40, 0x05, 0x4f, 0x5a, 0x27, 0x40, 0x03, 0x40, 0x40, 0x40, 0x0f,\n+    0x03, 0x11, 0x02, 0x17, 0x06, 0x11, 0x1d, 0x34, 0x34, 0x07, 0x07, 0x04, 0x07, 0x0b, 0x0e, 0x07,\n+    0x45, 0x27, 0x1a, 0x0c, 0x40, 0x44, 0x42, 0x40, 0x40, 0x40, 0x03, 0x03, 0x40, 0x02, 0x0e, 0x02,\n+    0x06, 0x11, 0x40, 0x45, 0x02, 0x19, 0x02, 0x45, 0x45, 0x06, 0x0e, 0x12, 0x0f, 0x12, 0x40, 0x02,\n+    0x0e, 0x02, 0x06, 0x11, 0x40, 0x45, 0x02, 0x19, 0x02, 0x45, 0x45, 0x06, 0x0e, 0x12, 0x0f, 0x12,\n+    0x1f, 0x44, 0x2d, 0x40, 0x48, 0x40, 0x03, 0x07, 0x03, 0x0f, 0x0f, 0x1d, 0x07, 0x14, 0x00, 0x44,\n+    0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x4b,\n+    0x07, 0x0f, 0x0f, 0x1a, 0x1f, 0x1a, 0x1f, 0x0c, 0x17, 0x00, 0x44, 0x17, 0x00, 0x44, 0x40, 0x40,\n+    0x40, 0x0d, 0x0d, 0x0c, 0x40, 0x0f, 0x0c, 0x08, 0x08, 0x2b, 0x27, 0x1b, 0x07, 0x1f, 0x1b, 0x13,\n+    0x43, 0x1d, 0x14, 0x0c, 0x40, 0x0c, 0x13, 0x08, 0x1a, 0x0c, 0x26, 0x17, 0x1a, 0x0c, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x4f, 0x1b, 0x03, 0x48, 0x40, 0x04, 0x4f, 0x5b, 0x27, 0x40, 0x03, 0x40, 0x40, 0x40, 0x0f,\n+    0x03, 0x13, 0x03, 0x17, 0x07, 0x13, 0x1f, 0x36, 0x36, 0x07, 0x07, 0x04, 0x07, 0x0b, 0x0f, 0x07,\n+    0x44, 0x27, 0x1b, 0x0c, 0x40, 0x44, 0x43, 0x40, 0x40, 0x40, 0x03, 0x03, 0x40, 0x03, 0x0f, 0x03,\n+    0x07, 0x13, 0x40, 0x44, 0x03, 0x1b, 0x03, 0x44, 0x44, 0x07, 0x0f, 0x13, 0x0f, 0x13, 0x40, 0x03,\n+    0x0f, 0x03, 0x07, 0x13, 0x40, 0x44, 0x03, 0x1b, 0x03, 0x44, 0x44, 0x07, 0x0f, 0x13, 0x0f, 0x13,\n+    0x1f, 0x44, 0x2f, 0x40, 0x48, 0x40, 0x03, 0x07, 0x03, 0x0f, 0x0f, 0x1f, 0x07, 0x14, 0x00, 0x44,\n+    0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x4b,\n+    0x07, 0x0f, 0x0f, 0x1b, 0x1f, 0x1b, 0x1f, 0x0c, 0x17, 0x00, 0x44, 0x17, 0x00, 0x44, 0x40, 0x40,\n+    0x40, 0x0c, 0x0c, 0x0c, 0x40, 0x0f, 0x0c, 0x08, 0x08, 0x2b, 0x27, 0x1b, 0x07, 0x1f, 0x1b, 0x13,\n+    0x43, 0x1c, 0x14, 0x0c, 0x40, 0x0c, 0x13, 0x08, 0x1b, 0x0c, 0x27, 0x17, 0x1b, 0x0c, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x50, 0x1c, 0x04, 0x47, 0x40, 0x03, 0x50, 0x5c, 0x27, 0x40, 0x04, 0x40, 0x40, 0x40, 0x0f,\n+    0x04, 0x14, 0x04, 0x18, 0x08, 0x14, 0x21, 0x39, 0x39, 0x07, 0x07, 0x03, 0x08, 0x0c, 0x10, 0x07,\n+    0x43, 0x27, 0x1c, 0x0b, 0x40, 0x43, 0x44, 0x40, 0x40, 0x40, 0x04, 0x04, 0x00, 0x04, 0x10, 0x04,\n+    0x08, 0x14, 0x00, 0x43, 0x04, 0x1c, 0x04, 0x43, 0x43, 0x08, 0x10, 0x14, 0x10, 0x14, 0x00, 0x04,\n+    0x10, 0x04, 0x08, 0x14, 0x00, 0x43, 0x04, 0x1c, 0x04, 0x43, 0x43, 0x08, 0x10, 0x14, 0x10, 0x14,\n+    0x20, 0x43, 0x31, 0x40, 0x48, 0x40, 0x04, 0x07, 0x04, 0x10, 0x10, 0x21, 0x07, 0x13, 0x40, 0x43,\n+    0x1c, 0x07, 0x40, 0x13, 0x40, 0x43, 0x1c, 0x07, 0x40, 0x13, 0x40, 0x43, 0x1c, 0x07, 0x40, 0x4c,\n+    0x07, 0x10, 0x10, 0x1c, 0x20, 0x1c, 0x20, 0x0b, 0x17, 0x40, 0x43, 0x17, 0x40, 0x43, 0x40, 0x40,\n+    0x40, 0x0b, 0x0b, 0x0b, 0x40, 0x0f, 0x0b, 0x07, 0x07, 0x2c, 0x27, 0x1c, 0x07, 0x20, 0x1c, 0x14,\n+    0x44, 0x1b, 0x13, 0x0b, 0x40, 0x0b, 0x14, 0x07, 0x1c, 0x0b, 0x28, 0x18, 0x1c, 0x0b, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x51, 0x1d, 0x04, 0x47, 0x40, 0x02, 0x51, 0x5d, 0x27, 0x40, 0x04, 0x40, 0x40, 0x40, 0x0f,\n+    0x04, 0x16, 0x05, 0x18, 0x09, 0x16, 0x22, 0x3b, 0x3b, 0x07, 0x07, 0x03, 0x08, 0x0c, 0x11, 0x07,\n+    0x42, 0x27, 0x1d, 0x0b, 0x40, 0x43, 0x45, 0x40, 0x40, 0x40, 0x04, 0x04, 0x00, 0x05, 0x11, 0x05,\n+    0x09, 0x16, 0x00, 0x42, 0x05, 0x1e, 0x05, 0x42, 0x42, 0x09, 0x11, 0x15, 0x10, 0x15, 0x00, 0x05,\n+    0x11, 0x05, 0x09, 0x16, 0x00, 0x42, 0x05, 0x1e, 0x05, 0x42, 0x42, 0x09, 0x11, 0x15, 0x10, 0x15,\n+    0x20, 0x43, 0x32, 0x40, 0x48, 0x40, 0x04, 0x07, 0x04, 0x10, 0x10, 0x22, 0x07, 0x13, 0x41, 0x43,\n+    0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x4c,\n+    0x07, 0x10, 0x10, 0x1d, 0x20, 0x1d, 0x20, 0x0b, 0x17, 0x41, 0x43, 0x17, 0x41, 0x43, 0x40, 0x40,\n+    0x40, 0x0a, 0x0a, 0x0b, 0x40, 0x0f, 0x0b, 0x06, 0x06, 0x2c, 0x27, 0x1c, 0x07, 0x20, 0x1c, 0x14,\n+    0x44, 0x1a, 0x13, 0x0b, 0x40, 0x0b, 0x14, 0x06, 0x1d, 0x0b, 0x29, 0x18, 0x1d, 0x0b, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x51, 0x1e, 0x04, 0x46, 0x40, 0x01, 0x51, 0x5e, 0x27, 0x40, 0x04, 0x40, 0x40, 0x40, 0x0f,\n+    0x04, 0x18, 0x06, 0x19, 0x0b, 0x18, 0x24, 0x3e, 0x3e, 0x07, 0x07, 0x03, 0x09, 0x0c, 0x13, 0x07,\n+    0x41, 0x27, 0x1e, 0x0b, 0x40, 0x43, 0x46, 0x40, 0x40, 0x40, 0x04, 0x04, 0x01, 0x06, 0x13, 0x06,\n+    0x0b, 0x18, 0x01, 0x41, 0x06, 0x20, 0x06, 0x41, 0x41, 0x0b, 0x13, 0x16, 0x11, 0x16, 0x01, 0x06,\n+    0x13, 0x06, 0x0b, 0x18, 0x01, 0x41, 0x06, 0x20, 0x06, 0x41, 0x41, 0x0b, 0x13, 0x16, 0x11, 0x16,\n+    0x21, 0x43, 0x34, 0x40, 0x48, 0x40, 0x04, 0x07, 0x04, 0x11, 0x11, 0x24, 0x07, 0x13, 0x41, 0x43,\n+    0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x4c,\n+    0x07, 0x11, 0x11, 0x1e, 0x21, 0x1e, 0x21, 0x0b, 0x17, 0x41, 0x43, 0x17, 0x41, 0x43, 0x40, 0x40,\n+    0x40, 0x09, 0x09, 0x0b, 0x40, 0x0f, 0x0b, 0x06, 0x06, 0x2c, 0x27, 0x1c, 0x07, 0x21, 0x1c, 0x14,\n+    0x44, 0x19, 0x13, 0x0b, 0x40, 0x0b, 0x14, 0x06, 0x1e, 0x0b, 0x2b, 0x19, 0x1e, 0x0b, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x52, 0x1f, 0x05, 0x45, 0x40, 0x00, 0x52, 0x5f, 0x27, 0x40, 0x05, 0x40, 0x40, 0x40, 0x0f,\n+    0x05, 0x19, 0x07, 0x1a, 0x0c, 0x19, 0x26, 0x3e, 0x3e, 0x07, 0x07, 0x02, 0x0a, 0x0d, 0x14, 0x07,\n+    0x40, 0x27, 0x1f, 0x0a, 0x40, 0x42, 0x47, 0x40, 0x40, 0x40, 0x05, 0x05, 0x02, 0x07, 0x14, 0x07,\n+    0x0c, 0x19, 0x02, 0x40, 0x07, 0x21, 0x07, 0x40, 0x40, 0x0c, 0x14, 0x17, 0x12, 0x17, 0x02, 0x07,\n+    0x14, 0x07, 0x0c, 0x19, 0x02, 0x40, 0x07, 0x21, 0x07, 0x40, 0x40, 0x0c, 0x14, 0x17, 0x12, 0x17,\n+    0x22, 0x42, 0x36, 0x40, 0x48, 0x40, 0x05, 0x07, 0x05, 0x12, 0x12, 0x26, 0x07, 0x12, 0x42, 0x42,\n+    0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x4d,\n+    0x07, 0x12, 0x12, 0x1f, 0x22, 0x1f, 0x22, 0x0a, 0x17, 0x42, 0x42, 0x17, 0x42, 0x42, 0x40, 0x40,\n+    0x40, 0x08, 0x08, 0x0a, 0x40, 0x0f, 0x0a, 0x05, 0x05, 0x2d, 0x27, 0x1d, 0x07, 0x22, 0x1d, 0x15,\n+    0x45, 0x18, 0x12, 0x0a, 0x40, 0x0a, 0x15, 0x05, 0x1f, 0x0a, 0x2c, 0x1a, 0x1f, 0x0a, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x52, 0x20, 0x05, 0x45, 0x40, 0x40, 0x52, 0x60, 0x27, 0x40, 0x05, 0x40, 0x40, 0x40, 0x0f,\n+    0x05, 0x1b, 0x08, 0x1a, 0x0d, 0x1b, 0x28, 0x3e, 0x3e, 0x07, 0x07, 0x02, 0x0a, 0x0d, 0x15, 0x07,\n+    0x00, 0x27, 0x20, 0x0a, 0x40, 0x42, 0x48, 0x40, 0x40, 0x40, 0x05, 0x05, 0x02, 0x08, 0x15, 0x08,\n+    0x0d, 0x1b, 0x02, 0x00, 0x08, 0x23, 0x08, 0x00, 0x00, 0x0d, 0x15, 0x18, 0x12, 0x18, 0x02, 0x08,\n+    0x15, 0x08, 0x0d, 0x1b, 0x02, 0x00, 0x08, 0x23, 0x08, 0x00, 0x00, 0x0d, 0x15, 0x18, 0x12, 0x18,\n+    0x22, 0x42, 0x38, 0x40, 0x48, 0x40, 0x05, 0x07, 0x05, 0x12, 0x12, 0x28, 0x07, 0x12, 0x42, 0x42,\n+    0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x4d,\n+    0x07, 0x12, 0x12, 0x20, 0x22, 0x20, 0x22, 0x0a, 0x17, 0x42, 0x42, 0x17, 0x42, 0x42, 0x40, 0x40,\n+    0x40, 0x07, 0x07, 0x0a, 0x40, 0x0f, 0x0a, 0x05, 0x05, 0x2d, 0x27, 0x1d, 0x07, 0x22, 0x1d, 0x15,\n+    0x45, 0x17, 0x12, 0x0a, 0x40, 0x0a, 0x15, 0x05, 0x20, 0x0a, 0x2d, 0x1a, 0x20, 0x0a, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x53, 0x21, 0x05, 0x44, 0x40, 0x41, 0x53, 0x61, 0x27, 0x40, 0x05, 0x40, 0x40, 0x40, 0x0f,\n+    0x05, 0x1c, 0x09, 0x1b, 0x0e, 0x1c, 0x2a, 0x3e, 0x3e, 0x07, 0x07, 0x02, 0x0b, 0x0d, 0x16, 0x07,\n+    0x01, 0x27, 0x21, 0x0a, 0x40, 0x42, 0x49, 0x40, 0x40, 0x40, 0x05, 0x05, 0x03, 0x09, 0x16, 0x09,\n+    0x0e, 0x1c, 0x03, 0x01, 0x09, 0x24, 0x09, 0x01, 0x01, 0x0e, 0x16, 0x19, 0x13, 0x19, 0x03, 0x09,\n+    0x16, 0x09, 0x0e, 0x1c, 0x03, 0x01, 0x09, 0x24, 0x09, 0x01, 0x01, 0x0e, 0x16, 0x19, 0x13, 0x19,\n+    0x23, 0x42, 0x3a, 0x40, 0x48, 0x40, 0x05, 0x07, 0x05, 0x13, 0x13, 0x2a, 0x07, 0x12, 0x43, 0x42,\n+    0x1d, 0x07, 0x40, 0x12, 0x43, 0x42, 0x1d, 0x07, 0x40, 0x12, 0x43, 0x42, 0x1d, 0x07, 0x40, 0x4d,\n+    0x07, 0x13, 0x13, 0x21, 0x23, 0x21, 0x23, 0x0a, 0x17, 0x43, 0x42, 0x17, 0x43, 0x42, 0x40, 0x40,\n+    0x40, 0x06, 0x06, 0x0a, 0x40, 0x0f, 0x0a, 0x04, 0x04, 0x2d, 0x27, 0x1d, 0x07, 0x23, 0x1d, 0x15,\n+    0x45, 0x16, 0x12, 0x0a, 0x40, 0x0a, 0x15, 0x04, 0x21, 0x0a, 0x2e, 0x1b, 0x21, 0x0a, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x54, 0x22, 0x06, 0x43, 0x40, 0x42, 0x54, 0x62, 0x27, 0x40, 0x06, 0x40, 0x40, 0x40, 0x0f,\n+    0x06, 0x1e, 0x0a, 0x1c, 0x10, 0x1e, 0x2c, 0x3e, 0x3e, 0x07, 0x07, 0x01, 0x0c, 0x0e, 0x18, 0x07,\n+    0x02, 0x27, 0x22, 0x09, 0x40, 0x41, 0x4a, 0x40, 0x40, 0x40, 0x06, 0x06, 0x04, 0x0a, 0x18, 0x0a,\n+    0x10, 0x1e, 0x04, 0x02, 0x0a, 0x26, 0x0a, 0x02, 0x02, 0x10, 0x18, 0x1a, 0x14, 0x1a, 0x04, 0x0a,\n+    0x18, 0x0a, 0x10, 0x1e, 0x04, 0x02, 0x0a, 0x26, 0x0a, 0x02, 0x02, 0x10, 0x18, 0x1a, 0x14, 0x1a,\n+    0x24, 0x41, 0x3c, 0x40, 0x48, 0x40, 0x06, 0x07, 0x06, 0x14, 0x14, 0x2c, 0x07, 0x11, 0x44, 0x41,\n+    0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x4e,\n+    0x07, 0x14, 0x14, 0x22, 0x24, 0x22, 0x24, 0x09, 0x17, 0x44, 0x41, 0x17, 0x44, 0x41, 0x40, 0x40,\n+    0x40, 0x05, 0x05, 0x09, 0x40, 0x0f, 0x09, 0x03, 0x03, 0x2e, 0x27, 0x1e, 0x07, 0x24, 0x1e, 0x16,\n+    0x46, 0x15, 0x11, 0x09, 0x40, 0x09, 0x16, 0x03, 0x22, 0x09, 0x30, 0x1c, 0x22, 0x09, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x54, 0x23, 0x06, 0x43, 0x40, 0x43, 0x54, 0x63, 0x27, 0x40, 0x06, 0x40, 0x40, 0x40, 0x0f,\n+    0x06, 0x1f, 0x0b, 0x1c, 0x11, 0x1f, 0x2e, 0x3e, 0x3e, 0x07, 0x07, 0x01, 0x0c, 0x0e, 0x19, 0x07,\n+    0x03, 0x27, 0x23, 0x09, 0x40, 0x41, 0x4b, 0x40, 0x40, 0x40, 0x06, 0x06, 0x04, 0x0b, 0x19, 0x0b,\n+    0x11, 0x1f, 0x04, 0x03, 0x0b, 0x27, 0x0b, 0x03, 0x03, 0x11, 0x19, 0x1b, 0x14, 0x1b, 0x04, 0x0b,\n+    0x19, 0x0b, 0x11, 0x1f, 0x04, 0x03, 0x0b, 0x27, 0x0b, 0x03, 0x03, 0x11, 0x19, 0x1b, 0x14, 0x1b,\n+    0x24, 0x41, 0x3e, 0x40, 0x48, 0x40, 0x06, 0x07, 0x06, 0x14, 0x14, 0x2e, 0x07, 0x11, 0x44, 0x41,\n+    0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x4e,\n+    0x07, 0x14, 0x14, 0x23, 0x24, 0x23, 0x24, 0x09, 0x17, 0x44, 0x41, 0x17, 0x44, 0x41, 0x40, 0x40,\n+    0x40, 0x04, 0x04, 0x09, 0x40, 0x0f, 0x09, 0x03, 0x03, 0x2e, 0x27, 0x1e, 0x07, 0x24, 0x1e, 0x16,\n+    0x46, 0x14, 0x11, 0x09, 0x40, 0x09, 0x16, 0x03, 0x23, 0x09, 0x31, 0x1c, 0x23, 0x09, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x55, 0x24, 0x06, 0x42, 0x40, 0x44, 0x55, 0x64, 0x27, 0x40, 0x06, 0x40, 0x40, 0x40, 0x0f,\n+    0x06, 0x21, 0x0c, 0x1d, 0x12, 0x21, 0x30, 0x3e, 0x3e, 0x07, 0x07, 0x01, 0x0d, 0x0e, 0x1a, 0x07,\n+    0x04, 0x27, 0x24, 0x09, 0x40, 0x41, 0x4c, 0x40, 0x40, 0x40, 0x06, 0x06, 0x05, 0x0c, 0x1a, 0x0c,\n+    0x12, 0x21, 0x05, 0x04, 0x0c, 0x29, 0x0c, 0x04, 0x04, 0x12, 0x1a, 0x1c, 0x15, 0x1c, 0x05, 0x0c,\n+    0x1a, 0x0c, 0x12, 0x21, 0x05, 0x04, 0x0c, 0x29, 0x0c, 0x04, 0x04, 0x12, 0x1a, 0x1c, 0x15, 0x1c,\n+    0x25, 0x41, 0x3e, 0x40, 0x48, 0x40, 0x06, 0x07, 0x06, 0x15, 0x15, 0x30, 0x07, 0x11, 0x45, 0x41,\n+    0x1e, 0x07, 0x40, 0x11, 0x45, 0x41, 0x1e, 0x07, 0x40, 0x11, 0x45, 0x41, 0x1e, 0x07, 0x40, 0x4e,\n+    0x07, 0x15, 0x15, 0x24, 0x25, 0x24, 0x25, 0x09, 0x17, 0x45, 0x41, 0x17, 0x45, 0x41, 0x40, 0x40,\n+    0x40, 0x03, 0x03, 0x09, 0x40, 0x0f, 0x09, 0x02, 0x02, 0x2e, 0x27, 0x1e, 0x07, 0x25, 0x1e, 0x16,\n+    0x46, 0x13, 0x11, 0x09, 0x40, 0x09, 0x16, 0x02, 0x24, 0x09, 0x32, 0x1d, 0x24, 0x09, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x56, 0x24, 0x06, 0x42, 0x40, 0x45, 0x56, 0x65, 0x27, 0x40, 0x06, 0x40, 0x40, 0x40, 0x0f,\n+    0x06, 0x22, 0x0c, 0x1d, 0x13, 0x22, 0x31, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x0d, 0x0e, 0x1b, 0x07,\n+    0x04, 0x27, 0x24, 0x08, 0x40, 0x41, 0x4d, 0x40, 0x40, 0x40, 0x06, 0x06, 0x05, 0x0c, 0x1b, 0x0c,\n+    0x13, 0x22, 0x05, 0x04, 0x0c, 0x2a, 0x0c, 0x04, 0x04, 0x13, 0x1b, 0x1c, 0x15, 0x1c, 0x05, 0x0c,\n+    0x1b, 0x0c, 0x13, 0x22, 0x05, 0x04, 0x0c, 0x2a, 0x0c, 0x04, 0x04, 0x13, 0x1b, 0x1c, 0x15, 0x1c,\n+    0x25, 0x41, 0x3e, 0x40, 0x48, 0x40, 0x06, 0x07, 0x06, 0x15, 0x15, 0x31, 0x07, 0x10, 0x46, 0x41,\n+    0x1e, 0x07, 0x40, 0x10, 0x46, 0x41, 0x1e, 0x07, 0x40, 0x10, 0x46, 0x41, 0x1e, 0x07, 0x40, 0x4f,\n+    0x07, 0x15, 0x15, 0x24, 0x25, 0x24, 0x25, 0x08, 0x17, 0x46, 0x41, 0x17, 0x46, 0x41, 0x40, 0x40,\n+    0x40, 0x02, 0x02, 0x08, 0x40, 0x0f, 0x08, 0x01, 0x01, 0x2e, 0x27, 0x1e, 0x07, 0x25, 0x1e, 0x16,\n+    0x47, 0x12, 0x10, 0x08, 0x40, 0x08, 0x16, 0x01, 0x24, 0x08, 0x33, 0x1d, 0x24, 0x08, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x56, 0x25, 0x07, 0x41, 0x40, 0x45, 0x56, 0x65, 0x27, 0x40, 0x07, 0x40, 0x40, 0x40, 0x0f,\n+    0x07, 0x24, 0x0d, 0x1e, 0x15, 0x24, 0x33, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x0e, 0x0f, 0x1d, 0x07,\n+    0x05, 0x27, 0x25, 0x08, 0x40, 0x40, 0x4d, 0x40, 0x40, 0x40, 0x07, 0x07, 0x06, 0x0d, 0x1d, 0x0d,\n+    0x15, 0x24, 0x06, 0x05, 0x0d, 0x2c, 0x0d, 0x05, 0x05, 0x15, 0x1d, 0x1d, 0x16, 0x1d, 0x06, 0x0d,\n+    0x1d, 0x0d, 0x15, 0x24, 0x06, 0x05, 0x0d, 0x2c, 0x0d, 0x05, 0x05, 0x15, 0x1d, 0x1d, 0x16, 0x1d,\n+    0x26, 0x40, 0x3e, 0x40, 0x48, 0x40, 0x07, 0x07, 0x07, 0x16, 0x16, 0x33, 0x07, 0x10, 0x46, 0x40,\n+    0x1f, 0x07, 0x40, 0x10, 0x46, 0x40, 0x1f, 0x07, 0x40, 0x10, 0x46, 0x40, 0x1f, 0x07, 0x40, 0x4f,\n+    0x07, 0x16, 0x16, 0x25, 0x26, 0x25, 0x26, 0x08, 0x17, 0x46, 0x40, 0x17, 0x46, 0x40, 0x40, 0x40,\n+    0x40, 0x02, 0x02, 0x08, 0x40, 0x0f, 0x08, 0x01, 0x01, 0x2f, 0x27, 0x1f, 0x07, 0x26, 0x1f, 0x17,\n+    0x47, 0x12, 0x10, 0x08, 0x40, 0x08, 0x17, 0x01, 0x25, 0x08, 0x35, 0x1e, 0x25, 0x08, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x57, 0x26, 0x07, 0x40, 0x40, 0x46, 0x57, 0x66, 0x27, 0x40, 0x07, 0x40, 0x40, 0x40, 0x0f,\n+    0x07, 0x26, 0x0e, 0x1f, 0x16, 0x26, 0x35, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x0f, 0x0f, 0x1e, 0x07,\n+    0x06, 0x27, 0x26, 0x08, 0x40, 0x40, 0x4e, 0x40, 0x40, 0x40, 0x07, 0x07, 0x07, 0x0e, 0x1e, 0x0e,\n+    0x16, 0x26, 0x07, 0x06, 0x0e, 0x2e, 0x0e, 0x06, 0x06, 0x16, 0x1e, 0x1e, 0x17, 0x1e, 0x07, 0x0e,\n+    0x1e, 0x0e, 0x16, 0x26, 0x07, 0x06, 0x0e, 0x2e, 0x0e, 0x06, 0x06, 0x16, 0x1e, 0x1e, 0x17, 0x1e,\n+    0x27, 0x40, 0x3e, 0x40, 0x48, 0x40, 0x07, 0x07, 0x07, 0x17, 0x17, 0x35, 0x07, 0x10, 0x47, 0x40,\n+    0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x4f,\n+    0x07, 0x17, 0x17, 0x26, 0x27, 0x26, 0x27, 0x08, 0x17, 0x47, 0x40, 0x17, 0x47, 0x40, 0x40, 0x40,\n+    0x40, 0x01, 0x01, 0x08, 0x40, 0x0f, 0x08, 0x00, 0x00, 0x2f, 0x27, 0x1f, 0x07, 0x27, 0x1f, 0x17,\n+    0x47, 0x11, 0x10, 0x08, 0x40, 0x08, 0x17, 0x00, 0x26, 0x08, 0x36, 0x1f, 0x26, 0x08, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x57, 0x27, 0x07, 0x40, 0x40, 0x47, 0x57, 0x67, 0x27, 0x40, 0x07, 0x40, 0x40, 0x40, 0x0f,\n+    0x07, 0x27, 0x0f, 0x1f, 0x17, 0x27, 0x37, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x0f, 0x0f, 0x1f, 0x07,\n+    0x07, 0x27, 0x27, 0x08, 0x40, 0x40, 0x4f, 0x40, 0x40, 0x40, 0x07, 0x07, 0x07, 0x0f, 0x1f, 0x0f,\n+    0x17, 0x27, 0x07, 0x07, 0x0f, 0x2f, 0x0f, 0x07, 0x07, 0x17, 0x1f, 0x1f, 0x17, 0x1f, 0x07, 0x0f,\n+    0x1f, 0x0f, 0x17, 0x27, 0x07, 0x07, 0x0f, 0x2f, 0x0f, 0x07, 0x07, 0x17, 0x1f, 0x1f, 0x17, 0x1f,\n+    0x27, 0x40, 0x3e, 0x40, 0x48, 0x40, 0x07, 0x07, 0x07, 0x17, 0x17, 0x37, 0x07, 0x10, 0x47, 0x40,\n+    0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x4f,\n+    0x07, 0x17, 0x17, 0x27, 0x27, 0x27, 0x27, 0x08, 0x17, 0x47, 0x40, 0x17, 0x47, 0x40, 0x40, 0x40,\n+    0x40, 0x00, 0x00, 0x08, 0x40, 0x0f, 0x08, 0x00, 0x00, 0x2f, 0x27, 0x1f, 0x07, 0x27, 0x1f, 0x17,\n+    0x47, 0x10, 0x10, 0x08, 0x40, 0x08, 0x17, 0x00, 0x27, 0x08, 0x37, 0x1f, 0x27, 0x08, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x48, 0x48, 0x60, 0x40, 0x27, 0x07, 0x07, 0x1f, 0x40, 0x48, 0x40, 0x40, 0x17, 0x0f,\n+    0x48, 0x68, 0x40, 0x07, 0x68, 0x68, 0x68, 0x68, 0x68, 0x07, 0x07, 0x0f, 0x3e, 0x17, 0x40, 0x07,\n+    0x68, 0x27, 0x50, 0x17, 0x40, 0x07, 0x1f, 0x40, 0x40, 0x40, 0x48, 0x48, 0x58, 0x60, 0x50, 0x60,\n+    0x68, 0x60, 0x58, 0x68, 0x68, 0x68, 0x58, 0x60, 0x68, 0x68, 0x68, 0x50, 0x48, 0x58, 0x58, 0x60,\n+    0x50, 0x60, 0x68, 0x60, 0x58, 0x68, 0x68, 0x68, 0x58, 0x60, 0x68, 0x68, 0x68, 0x50, 0x48, 0x58,\n+    0x07, 0x50, 0x58, 0x40, 0x40, 0x40, 0x48, 0x07, 0x48, 0x48, 0x48, 0x68, 0x50, 0x1f, 0x17, 0x50,\n+    0x0f, 0x07, 0x40, 0x1f, 0x17, 0x50, 0x0f, 0x07, 0x40, 0x1f, 0x17, 0x50, 0x0f, 0x07, 0x40, 0x40,\n+    0x07, 0x40, 0x40, 0x40, 0x07, 0x40, 0x07, 0x17, 0x17, 0x17, 0x50, 0x17, 0x17, 0x50, 0x40, 0x40,\n+    0x40, 0x2f, 0x17, 0x17, 0x40, 0x0f, 0x17, 0x1f, 0x1f, 0x1f, 0x27, 0x0f, 0x07, 0x07, 0x0f, 0x40,\n+    0x07, 0x3e, 0x1f, 0x17, 0x40, 0x0f, 0x17, 0x1f, 0x48, 0x17, 0x48, 0x48, 0x48, 0x17, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x47, 0x47, 0x5f, 0x40, 0x27, 0x07, 0x07, 0x20, 0x40, 0x47, 0x40, 0x40, 0x17, 0x0f,\n+    0x47, 0x66, 0x40, 0x08, 0x66, 0x66, 0x66, 0x65, 0x65, 0x07, 0x07, 0x0f, 0x3e, 0x17, 0x00, 0x07,\n+    0x67, 0x27, 0x4e, 0x17, 0x40, 0x07, 0x1f, 0x40, 0x40, 0x40, 0x47, 0x47, 0x57, 0x5f, 0x4f, 0x5f,\n+    0x66, 0x5e, 0x57, 0x67, 0x67, 0x66, 0x57, 0x5f, 0x67, 0x67, 0x66, 0x4f, 0x47, 0x56, 0x57, 0x5f,\n+    0x4f, 0x5f, 0x66, 0x5e, 0x57, 0x67, 0x67, 0x66, 0x57, 0x5f, 0x67, 0x67, 0x66, 0x4f, 0x47, 0x56,\n+    0x08, 0x4f, 0x56, 0x40, 0x40, 0x40, 0x47, 0x07, 0x47, 0x47, 0x47, 0x66, 0x4f, 0x1f, 0x17, 0x4f,\n+    0x10, 0x07, 0x40, 0x1f, 0x17, 0x4f, 0x10, 0x07, 0x40, 0x1f, 0x17, 0x4f, 0x10, 0x07, 0x40, 0x40,\n+    0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x17, 0x17, 0x17, 0x4f, 0x17, 0x17, 0x4f, 0x40, 0x40,\n+    0x40, 0x2f, 0x17, 0x17, 0x40, 0x0f, 0x17, 0x1f, 0x1f, 0x20, 0x27, 0x10, 0x07, 0x08, 0x10, 0x00,\n+    0x07, 0x3e, 0x1f, 0x17, 0x40, 0x0f, 0x17, 0x1f, 0x47, 0x17, 0x46, 0x47, 0x47, 0x17, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x46, 0x47, 0x5e, 0x40, 0x26, 0x06, 0x06, 0x20, 0x40, 0x47, 0x40, 0x40, 0x16, 0x0f,\n+    0x47, 0x64, 0x40, 0x08, 0x65, 0x64, 0x64, 0x63, 0x63, 0x07, 0x07, 0x0f, 0x3e, 0x17, 0x01, 0x07,\n+    0x66, 0x27, 0x4d, 0x17, 0x40, 0x07, 0x1e, 0x40, 0x40, 0x40, 0x47, 0x47, 0x56, 0x5e, 0x4e, 0x5e,\n+    0x65, 0x5d, 0x56, 0x66, 0x66, 0x64, 0x56, 0x5e, 0x66, 0x66, 0x64, 0x4e, 0x46, 0x55, 0x56, 0x5e,\n+    0x4e, 0x5e, 0x65, 0x5d, 0x56, 0x66, 0x66, 0x64, 0x56, 0x5e, 0x66, 0x66, 0x64, 0x4e, 0x46, 0x55,\n+    0x09, 0x4f, 0x54, 0x40, 0x40, 0x40, 0x47, 0x07, 0x47, 0x46, 0x46, 0x64, 0x4e, 0x1f, 0x16, 0x4f,\n+    0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x40,\n+    0x07, 0x00, 0x00, 0x01, 0x09, 0x01, 0x09, 0x17, 0x17, 0x16, 0x4f, 0x17, 0x16, 0x4f, 0x40, 0x40,\n+    0x40, 0x2e, 0x17, 0x17, 0x40, 0x0f, 0x17, 0x1e, 0x1e, 0x20, 0x27, 0x10, 0x07, 0x09, 0x10, 0x01,\n+    0x07, 0x3e, 0x1f, 0x17, 0x40, 0x0f, 0x17, 0x1e, 0x46, 0x17, 0x45, 0x46, 0x46, 0x17, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x45, 0x47, 0x5e, 0x40, 0x25, 0x06, 0x05, 0x20, 0x40, 0x47, 0x40, 0x40, 0x16, 0x0f,\n+    0x47, 0x63, 0x40, 0x08, 0x64, 0x63, 0x62, 0x60, 0x60, 0x07, 0x07, 0x0f, 0x3e, 0x17, 0x01, 0x07,\n+    0x65, 0x27, 0x4c, 0x17, 0x40, 0x07, 0x1d, 0x40, 0x40, 0x40, 0x47, 0x47, 0x56, 0x5d, 0x4e, 0x5d,\n+    0x64, 0x5c, 0x56, 0x65, 0x65, 0x63, 0x56, 0x5e, 0x65, 0x65, 0x63, 0x4d, 0x46, 0x54, 0x56, 0x5d,\n+    0x4e, 0x5d, 0x64, 0x5c, 0x56, 0x65, 0x65, 0x63, 0x56, 0x5e, 0x65, 0x65, 0x63, 0x4d, 0x46, 0x54,\n+    0x09, 0x4f, 0x52, 0x40, 0x40, 0x40, 0x47, 0x07, 0x47, 0x46, 0x46, 0x62, 0x4e, 0x1f, 0x16, 0x4f,\n+    0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x1f, 0x16, 0x4f, 0x10, 0x07, 0x40, 0x40,\n+    0x07, 0x00, 0x00, 0x01, 0x09, 0x01, 0x09, 0x17, 0x17, 0x16, 0x4f, 0x17, 0x16, 0x4f, 0x40, 0x40,\n+    0x40, 0x2d, 0x17, 0x17, 0x40, 0x0f, 0x17, 0x1e, 0x1e, 0x20, 0x27, 0x10, 0x07, 0x09, 0x10, 0x01,\n+    0x07, 0x3e, 0x1f, 0x17, 0x40, 0x0f, 0x17, 0x1e, 0x45, 0x17, 0x44, 0x45, 0x45, 0x17, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x44, 0x46, 0x5d, 0x40, 0x24, 0x05, 0x04, 0x21, 0x40, 0x46, 0x40, 0x40, 0x15, 0x0f,\n+    0x46, 0x61, 0x40, 0x09, 0x63, 0x61, 0x60, 0x5e, 0x5e, 0x07, 0x07, 0x0e, 0x3e, 0x16, 0x02, 0x07,\n+    0x64, 0x27, 0x4b, 0x16, 0x40, 0x06, 0x1c, 0x40, 0x40, 0x40, 0x46, 0x46, 0x55, 0x5c, 0x4d, 0x5c,\n+    0x63, 0x5b, 0x55, 0x64, 0x64, 0x61, 0x55, 0x5d, 0x64, 0x64, 0x61, 0x4c, 0x45, 0x53, 0x55, 0x5c,\n+    0x4d, 0x5c, 0x63, 0x5b, 0x55, 0x64, 0x64, 0x61, 0x55, 0x5d, 0x64, 0x64, 0x61, 0x4c, 0x45, 0x53,\n+    0x0a, 0x4e, 0x50, 0x40, 0x41, 0x40, 0x46, 0x07, 0x46, 0x45, 0x45, 0x60, 0x4d, 0x1e, 0x15, 0x4e,\n+    0x11, 0x07, 0x40, 0x1e, 0x15, 0x4e, 0x11, 0x07, 0x40, 0x1e, 0x15, 0x4e, 0x11, 0x07, 0x40, 0x41,\n+    0x07, 0x01, 0x01, 0x02, 0x0a, 0x02, 0x0a, 0x16, 0x17, 0x15, 0x4e, 0x17, 0x15, 0x4e, 0x40, 0x40,\n+    0x40, 0x2c, 0x16, 0x16, 0x40, 0x0f, 0x16, 0x1d, 0x1d, 0x21, 0x27, 0x11, 0x07, 0x0a, 0x11, 0x02,\n+    0x06, 0x3e, 0x1e, 0x16, 0x40, 0x0f, 0x16, 0x1d, 0x44, 0x16, 0x43, 0x44, 0x44, 0x16, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x43, 0x46, 0x5c, 0x40, 0x23, 0x04, 0x03, 0x21, 0x40, 0x46, 0x40, 0x40, 0x14, 0x0f,\n+    0x46, 0x60, 0x40, 0x09, 0x61, 0x60, 0x5e, 0x5b, 0x5b, 0x07, 0x07, 0x0e, 0x3e, 0x16, 0x03, 0x07,\n+    0x63, 0x27, 0x49, 0x16, 0x40, 0x06, 0x1b, 0x40, 0x40, 0x40, 0x46, 0x46, 0x54, 0x5b, 0x4c, 0x5b,\n+    0x61, 0x59, 0x54, 0x63, 0x63, 0x60, 0x54, 0x5c, 0x63, 0x63, 0x60, 0x4b, 0x44, 0x51, 0x54, 0x5b,\n+    0x4c, 0x5b, 0x61, 0x59, 0x54, 0x63, 0x63, 0x60, 0x54, 0x5c, 0x63, 0x63, 0x60, 0x4b, 0x44, 0x51,\n+    0x0b, 0x4e, 0x4e, 0x40, 0x41, 0x40, 0x46, 0x07, 0x46, 0x44, 0x44, 0x5e, 0x4c, 0x1e, 0x14, 0x4e,\n+    0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x41,\n+    0x07, 0x01, 0x01, 0x03, 0x0b, 0x03, 0x0b, 0x16, 0x17, 0x14, 0x4e, 0x17, 0x14, 0x4e, 0x40, 0x40,\n+    0x40, 0x2b, 0x16, 0x16, 0x40, 0x0f, 0x16, 0x1c, 0x1c, 0x21, 0x27, 0x11, 0x07, 0x0b, 0x11, 0x03,\n+    0x06, 0x3e, 0x1e, 0x16, 0x40, 0x0f, 0x16, 0x1c, 0x43, 0x16, 0x41, 0x43, 0x43, 0x16, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x42, 0x46, 0x5c, 0x40, 0x22, 0x04, 0x02, 0x21, 0x40, 0x46, 0x40, 0x40, 0x14, 0x0f,\n+    0x46, 0x5e, 0x40, 0x09, 0x60, 0x5e, 0x5c, 0x59, 0x59, 0x07, 0x07, 0x0e, 0x3e, 0x16, 0x03, 0x07,\n+    0x62, 0x27, 0x48, 0x16, 0x40, 0x06, 0x1a, 0x40, 0x40, 0x40, 0x46, 0x46, 0x54, 0x5a, 0x4c, 0x5a,\n+    0x60, 0x58, 0x54, 0x62, 0x62, 0x5e, 0x54, 0x5c, 0x62, 0x62, 0x5e, 0x4a, 0x44, 0x50, 0x54, 0x5a,\n+    0x4c, 0x5a, 0x60, 0x58, 0x54, 0x62, 0x62, 0x5e, 0x54, 0x5c, 0x62, 0x62, 0x5e, 0x4a, 0x44, 0x50,\n+    0x0b, 0x4e, 0x4c, 0x40, 0x41, 0x40, 0x46, 0x07, 0x46, 0x44, 0x44, 0x5c, 0x4c, 0x1e, 0x14, 0x4e,\n+    0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x1e, 0x14, 0x4e, 0x11, 0x07, 0x40, 0x41,\n+    0x07, 0x01, 0x01, 0x03, 0x0b, 0x03, 0x0b, 0x16, 0x17, 0x14, 0x4e, 0x17, 0x14, 0x4e, 0x40, 0x40,\n+    0x40, 0x2a, 0x16, 0x16, 0x40, 0x0f, 0x16, 0x1c, 0x1c, 0x21, 0x27, 0x11, 0x07, 0x0b, 0x11, 0x03,\n+    0x06, 0x3e, 0x1e, 0x16, 0x40, 0x0f, 0x16, 0x1c, 0x42, 0x16, 0x40, 0x42, 0x42, 0x16, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x41, 0x45, 0x5b, 0x40, 0x21, 0x03, 0x01, 0x22, 0x40, 0x45, 0x40, 0x40, 0x13, 0x0f,\n+    0x45, 0x5d, 0x40, 0x0a, 0x5f, 0x5d, 0x5a, 0x56, 0x56, 0x07, 0x07, 0x0d, 0x3e, 0x15, 0x04, 0x07,\n+    0x61, 0x27, 0x47, 0x15, 0x40, 0x05, 0x19, 0x40, 0x40, 0x40, 0x45, 0x45, 0x53, 0x59, 0x4b, 0x59,\n+    0x5f, 0x57, 0x53, 0x61, 0x61, 0x5d, 0x53, 0x5b, 0x61, 0x61, 0x5d, 0x49, 0x43, 0x4f, 0x53, 0x59,\n+    0x4b, 0x59, 0x5f, 0x57, 0x53, 0x61, 0x61, 0x5d, 0x53, 0x5b, 0x61, 0x61, 0x5d, 0x49, 0x43, 0x4f,\n+    0x0c, 0x4d, 0x4a, 0x40, 0x42, 0x40, 0x45, 0x07, 0x45, 0x43, 0x43, 0x5a, 0x4b, 0x1d, 0x13, 0x4d,\n+    0x12, 0x07, 0x40, 0x1d, 0x13, 0x4d, 0x12, 0x07, 0x40, 0x1d, 0x13, 0x4d, 0x12, 0x07, 0x40, 0x42,\n+    0x07, 0x02, 0x02, 0x04, 0x0c, 0x04, 0x0c, 0x15, 0x17, 0x13, 0x4d, 0x17, 0x13, 0x4d, 0x40, 0x40,\n+    0x40, 0x29, 0x15, 0x15, 0x40, 0x0f, 0x15, 0x1b, 0x1b, 0x22, 0x27, 0x12, 0x07, 0x0c, 0x12, 0x04,\n+    0x05, 0x3e, 0x1d, 0x15, 0x40, 0x0f, 0x15, 0x1b, 0x41, 0x15, 0x00, 0x41, 0x41, 0x15, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x40, 0x45, 0x5b, 0x40, 0x20, 0x02, 0x00, 0x22, 0x40, 0x45, 0x40, 0x40, 0x12, 0x0f,\n+    0x45, 0x5b, 0x40, 0x0a, 0x5e, 0x5b, 0x59, 0x54, 0x54, 0x07, 0x07, 0x0d, 0x3e, 0x15, 0x04, 0x07,\n+    0x60, 0x27, 0x46, 0x15, 0x40, 0x05, 0x18, 0x40, 0x40, 0x40, 0x45, 0x45, 0x53, 0x58, 0x4b, 0x58,\n+    0x5e, 0x56, 0x53, 0x60, 0x60, 0x5b, 0x53, 0x5b, 0x60, 0x60, 0x5b, 0x48, 0x43, 0x4e, 0x53, 0x58,\n+    0x4b, 0x58, 0x5e, 0x56, 0x53, 0x60, 0x60, 0x5b, 0x53, 0x5b, 0x60, 0x60, 0x5b, 0x48, 0x43, 0x4e,\n+    0x0c, 0x4d, 0x49, 0x40, 0x42, 0x40, 0x45, 0x07, 0x45, 0x43, 0x43, 0x59, 0x4b, 0x1d, 0x12, 0x4d,\n+    0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x42,\n+    0x07, 0x02, 0x02, 0x04, 0x0c, 0x04, 0x0c, 0x15, 0x17, 0x12, 0x4d, 0x17, 0x12, 0x4d, 0x40, 0x40,\n+    0x40, 0x28, 0x15, 0x15, 0x40, 0x0f, 0x15, 0x1a, 0x1a, 0x22, 0x27, 0x12, 0x07, 0x0c, 0x12, 0x04,\n+    0x05, 0x3e, 0x1d, 0x15, 0x40, 0x0f, 0x15, 0x1a, 0x40, 0x15, 0x01, 0x40, 0x40, 0x15, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x00, 0x45, 0x5a, 0x40, 0x1f, 0x02, 0x40, 0x22, 0x40, 0x45, 0x40, 0x40, 0x12, 0x0f,\n+    0x45, 0x59, 0x40, 0x0a, 0x5c, 0x59, 0x57, 0x51, 0x51, 0x07, 0x07, 0x0d, 0x3e, 0x15, 0x05, 0x07,\n+    0x5f, 0x27, 0x44, 0x15, 0x40, 0x05, 0x17, 0x40, 0x40, 0x40, 0x45, 0x45, 0x52, 0x57, 0x4a, 0x57,\n+    0x5c, 0x54, 0x52, 0x5f, 0x5f, 0x59, 0x52, 0x5a, 0x5f, 0x5f, 0x59, 0x47, 0x42, 0x4c, 0x52, 0x57,\n+    0x4a, 0x57, 0x5c, 0x54, 0x52, 0x5f, 0x5f, 0x59, 0x52, 0x5a, 0x5f, 0x5f, 0x59, 0x47, 0x42, 0x4c,\n+    0x0d, 0x4d, 0x47, 0x40, 0x42, 0x40, 0x45, 0x07, 0x45, 0x42, 0x42, 0x57, 0x4a, 0x1d, 0x12, 0x4d,\n+    0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x1d, 0x12, 0x4d, 0x12, 0x07, 0x40, 0x42,\n+    0x07, 0x02, 0x02, 0x05, 0x0d, 0x05, 0x0d, 0x15, 0x17, 0x12, 0x4d, 0x17, 0x12, 0x4d, 0x40, 0x40,\n+    0x40, 0x27, 0x15, 0x15, 0x40, 0x0f, 0x15, 0x1a, 0x1a, 0x22, 0x27, 0x12, 0x07, 0x0d, 0x12, 0x05,\n+    0x05, 0x3e, 0x1d, 0x15, 0x40, 0x0f, 0x15, 0x1a, 0x00, 0x15, 0x03, 0x00, 0x00, 0x15, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x01, 0x44, 0x59, 0x40, 0x1e, 0x01, 0x41, 0x23, 0x40, 0x44, 0x40, 0x40, 0x11, 0x0f,\n+    0x44, 0x58, 0x40, 0x0b, 0x5b, 0x58, 0x55, 0x4f, 0x4f, 0x07, 0x07, 0x0c, 0x3e, 0x14, 0x06, 0x07,\n+    0x5e, 0x27, 0x43, 0x14, 0x40, 0x04, 0x16, 0x40, 0x40, 0x40, 0x44, 0x44, 0x51, 0x56, 0x49, 0x56,\n+    0x5b, 0x53, 0x51, 0x5e, 0x5e, 0x58, 0x51, 0x59, 0x5e, 0x5e, 0x58, 0x46, 0x41, 0x4b, 0x51, 0x56,\n+    0x49, 0x56, 0x5b, 0x53, 0x51, 0x5e, 0x5e, 0x58, 0x51, 0x59, 0x5e, 0x5e, 0x58, 0x46, 0x41, 0x4b,\n+    0x0e, 0x4c, 0x45, 0x40, 0x43, 0x40, 0x44, 0x07, 0x44, 0x41, 0x41, 0x55, 0x49, 0x1c, 0x11, 0x4c,\n+    0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x43,\n+    0x07, 0x03, 0x03, 0x06, 0x0e, 0x06, 0x0e, 0x14, 0x17, 0x11, 0x4c, 0x17, 0x11, 0x4c, 0x40, 0x40,\n+    0x40, 0x26, 0x14, 0x14, 0x40, 0x0f, 0x14, 0x19, 0x19, 0x23, 0x27, 0x13, 0x07, 0x0e, 0x13, 0x06,\n+    0x04, 0x3e, 0x1c, 0x14, 0x40, 0x0f, 0x14, 0x19, 0x01, 0x14, 0x04, 0x01, 0x01, 0x14, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x02, 0x44, 0x59, 0x40, 0x1d, 0x01, 0x42, 0x23, 0x40, 0x44, 0x40, 0x40, 0x11, 0x0f,\n+    0x44, 0x56, 0x40, 0x0b, 0x5a, 0x56, 0x53, 0x4c, 0x4c, 0x07, 0x07, 0x0c, 0x3e, 0x14, 0x06, 0x07,\n+    0x5d, 0x27, 0x42, 0x14, 0x40, 0x04, 0x15, 0x40, 0x40, 0x40, 0x44, 0x44, 0x51, 0x55, 0x49, 0x55,\n+    0x5a, 0x52, 0x51, 0x5d, 0x5d, 0x56, 0x51, 0x59, 0x5d, 0x5d, 0x56, 0x45, 0x41, 0x4a, 0x51, 0x55,\n+    0x49, 0x55, 0x5a, 0x52, 0x51, 0x5d, 0x5d, 0x56, 0x51, 0x59, 0x5d, 0x5d, 0x56, 0x45, 0x41, 0x4a,\n+    0x0e, 0x4c, 0x43, 0x40, 0x43, 0x40, 0x44, 0x07, 0x44, 0x41, 0x41, 0x53, 0x49, 0x1c, 0x11, 0x4c,\n+    0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x1c, 0x11, 0x4c, 0x13, 0x07, 0x40, 0x43,\n+    0x07, 0x03, 0x03, 0x06, 0x0e, 0x06, 0x0e, 0x14, 0x17, 0x11, 0x4c, 0x17, 0x11, 0x4c, 0x40, 0x40,\n+    0x40, 0x25, 0x14, 0x14, 0x40, 0x0f, 0x14, 0x19, 0x19, 0x23, 0x27, 0x13, 0x07, 0x0e, 0x13, 0x06,\n+    0x04, 0x3e, 0x1c, 0x14, 0x40, 0x0f, 0x14, 0x19, 0x02, 0x14, 0x05, 0x02, 0x02, 0x14, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x03, 0x44, 0x58, 0x40, 0x1c, 0x00, 0x43, 0x23, 0x40, 0x44, 0x40, 0x40, 0x10, 0x0f,\n+    0x44, 0x55, 0x40, 0x0b, 0x59, 0x55, 0x51, 0x4a, 0x4a, 0x07, 0x07, 0x0c, 0x3d, 0x14, 0x07, 0x07,\n+    0x5c, 0x27, 0x41, 0x14, 0x40, 0x04, 0x14, 0x40, 0x40, 0x40, 0x44, 0x44, 0x50, 0x54, 0x48, 0x54,\n+    0x59, 0x51, 0x50, 0x5c, 0x5c, 0x55, 0x50, 0x58, 0x5c, 0x5c, 0x55, 0x44, 0x40, 0x49, 0x50, 0x54,\n+    0x48, 0x54, 0x59, 0x51, 0x50, 0x5c, 0x5c, 0x55, 0x50, 0x58, 0x5c, 0x5c, 0x55, 0x44, 0x40, 0x49,\n+    0x0f, 0x4c, 0x41, 0x40, 0x43, 0x40, 0x44, 0x07, 0x44, 0x40, 0x40, 0x51, 0x48, 0x1c, 0x10, 0x4c,\n+    0x13, 0x07, 0x40, 0x1c, 0x10, 0x4c, 0x13, 0x07, 0x40, 0x1c, 0x10, 0x4c, 0x13, 0x07, 0x40, 0x43,\n+    0x07, 0x03, 0x03, 0x07, 0x0f, 0x07, 0x0f, 0x14, 0x17, 0x10, 0x4c, 0x17, 0x10, 0x4c, 0x40, 0x40,\n+    0x40, 0x24, 0x14, 0x14, 0x40, 0x0f, 0x14, 0x18, 0x18, 0x23, 0x27, 0x13, 0x07, 0x0f, 0x13, 0x07,\n+    0x04, 0x3e, 0x1c, 0x14, 0x40, 0x0f, 0x14, 0x18, 0x03, 0x14, 0x06, 0x03, 0x03, 0x14, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x04, 0x43, 0x57, 0x40, 0x1b, 0x40, 0x44, 0x24, 0x40, 0x43, 0x40, 0x40, 0x0f, 0x0f,\n+    0x43, 0x53, 0x40, 0x0c, 0x57, 0x53, 0x4f, 0x47, 0x47, 0x07, 0x07, 0x0b, 0x3b, 0x13, 0x08, 0x07,\n+    0x5b, 0x27, 0x00, 0x13, 0x40, 0x03, 0x13, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4f, 0x53, 0x47, 0x53,\n+    0x57, 0x4f, 0x4f, 0x5b, 0x5b, 0x53, 0x4f, 0x57, 0x5b, 0x5b, 0x53, 0x43, 0x00, 0x47, 0x4f, 0x53,\n+    0x47, 0x53, 0x57, 0x4f, 0x4f, 0x5b, 0x5b, 0x53, 0x4f, 0x57, 0x5b, 0x5b, 0x53, 0x43, 0x00, 0x47,\n+    0x10, 0x4b, 0x00, 0x40, 0x44, 0x40, 0x43, 0x07, 0x43, 0x00, 0x00, 0x4f, 0x47, 0x1b, 0x0f, 0x4b,\n+    0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x44,\n+    0x07, 0x04, 0x04, 0x08, 0x10, 0x08, 0x10, 0x13, 0x17, 0x0f, 0x4b, 0x17, 0x0f, 0x4b, 0x40, 0x40,\n+    0x40, 0x23, 0x13, 0x13, 0x40, 0x0f, 0x13, 0x17, 0x17, 0x24, 0x27, 0x14, 0x07, 0x10, 0x14, 0x08,\n+    0x03, 0x3e, 0x1b, 0x13, 0x40, 0x0f, 0x13, 0x17, 0x04, 0x13, 0x08, 0x04, 0x04, 0x13, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x05, 0x43, 0x57, 0x40, 0x1a, 0x40, 0x45, 0x24, 0x40, 0x43, 0x40, 0x40, 0x0f, 0x0f,\n+    0x43, 0x52, 0x40, 0x0c, 0x56, 0x52, 0x4d, 0x45, 0x45, 0x07, 0x07, 0x0b, 0x3a, 0x13, 0x08, 0x07,\n+    0x5a, 0x27, 0x01, 0x13, 0x40, 0x03, 0x12, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4f, 0x52, 0x47, 0x52,\n+    0x56, 0x4e, 0x4f, 0x5a, 0x5a, 0x52, 0x4f, 0x57, 0x5a, 0x5a, 0x52, 0x42, 0x00, 0x46, 0x4f, 0x52,\n+    0x47, 0x52, 0x56, 0x4e, 0x4f, 0x5a, 0x5a, 0x52, 0x4f, 0x57, 0x5a, 0x5a, 0x52, 0x42, 0x00, 0x46,\n+    0x10, 0x4b, 0x02, 0x40, 0x44, 0x40, 0x43, 0x07, 0x43, 0x00, 0x00, 0x4d, 0x47, 0x1b, 0x0f, 0x4b,\n+    0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x1b, 0x0f, 0x4b, 0x14, 0x07, 0x40, 0x44,\n+    0x07, 0x04, 0x04, 0x08, 0x10, 0x08, 0x10, 0x13, 0x17, 0x0f, 0x4b, 0x17, 0x0f, 0x4b, 0x40, 0x40,\n+    0x40, 0x22, 0x13, 0x13, 0x40, 0x0f, 0x13, 0x17, 0x17, 0x24, 0x27, 0x14, 0x07, 0x10, 0x14, 0x08,\n+    0x03, 0x3e, 0x1b, 0x13, 0x40, 0x0f, 0x13, 0x17, 0x05, 0x13, 0x09, 0x05, 0x05, 0x13, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x06, 0x43, 0x56, 0x40, 0x19, 0x41, 0x46, 0x24, 0x40, 0x43, 0x40, 0x40, 0x0e, 0x0f,\n+    0x43, 0x50, 0x40, 0x0c, 0x55, 0x50, 0x4b, 0x42, 0x42, 0x07, 0x07, 0x0b, 0x38, 0x13, 0x09, 0x07,\n+    0x59, 0x27, 0x02, 0x13, 0x40, 0x03, 0x11, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4e, 0x51, 0x46, 0x51,\n+    0x55, 0x4d, 0x4e, 0x59, 0x59, 0x50, 0x4e, 0x56, 0x59, 0x59, 0x50, 0x41, 0x01, 0x45, 0x4e, 0x51,\n+    0x46, 0x51, 0x55, 0x4d, 0x4e, 0x59, 0x59, 0x50, 0x4e, 0x56, 0x59, 0x59, 0x50, 0x41, 0x01, 0x45,\n+    0x11, 0x4b, 0x04, 0x40, 0x44, 0x40, 0x43, 0x07, 0x43, 0x01, 0x01, 0x4b, 0x46, 0x1b, 0x0e, 0x4b,\n+    0x14, 0x07, 0x40, 0x1b, 0x0e, 0x4b, 0x14, 0x07, 0x40, 0x1b, 0x0e, 0x4b, 0x14, 0x07, 0x40, 0x44,\n+    0x07, 0x04, 0x04, 0x09, 0x11, 0x09, 0x11, 0x13, 0x17, 0x0e, 0x4b, 0x17, 0x0e, 0x4b, 0x40, 0x40,\n+    0x40, 0x21, 0x13, 0x13, 0x40, 0x0f, 0x13, 0x16, 0x16, 0x24, 0x27, 0x14, 0x07, 0x11, 0x14, 0x09,\n+    0x03, 0x3d, 0x1b, 0x13, 0x40, 0x0f, 0x13, 0x16, 0x06, 0x13, 0x0a, 0x06, 0x06, 0x13, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x06, 0x43, 0x56, 0x40, 0x18, 0x42, 0x47, 0x24, 0x40, 0x43, 0x40, 0x40, 0x0d, 0x0f,\n+    0x43, 0x4f, 0x40, 0x0c, 0x54, 0x4f, 0x4a, 0x40, 0x40, 0x07, 0x07, 0x0a, 0x36, 0x12, 0x09, 0x07,\n+    0x59, 0x27, 0x03, 0x12, 0x40, 0x02, 0x10, 0x40, 0x40, 0x40, 0x43, 0x43, 0x4e, 0x51, 0x46, 0x51,\n+    0x54, 0x4c, 0x4e, 0x59, 0x59, 0x4f, 0x4e, 0x56, 0x59, 0x59, 0x4f, 0x41, 0x01, 0x44, 0x4e, 0x51,\n+    0x46, 0x51, 0x54, 0x4c, 0x4e, 0x59, 0x59, 0x4f, 0x4e, 0x56, 0x59, 0x59, 0x4f, 0x41, 0x01, 0x44,\n+    0x11, 0x4b, 0x05, 0x40, 0x45, 0x40, 0x43, 0x07, 0x43, 0x01, 0x01, 0x4a, 0x46, 0x1a, 0x0d, 0x4b,\n+    0x14, 0x07, 0x40, 0x1a, 0x0d, 0x4b, 0x14, 0x07, 0x40, 0x1a, 0x0d, 0x4b, 0x14, 0x07, 0x40, 0x45,\n+    0x07, 0x04, 0x04, 0x09, 0x11, 0x09, 0x11, 0x12, 0x17, 0x0d, 0x4b, 0x17, 0x0d, 0x4b, 0x40, 0x40,\n+    0x40, 0x20, 0x12, 0x12, 0x40, 0x0f, 0x12, 0x15, 0x15, 0x24, 0x27, 0x14, 0x07, 0x11, 0x14, 0x09,\n+    0x02, 0x3b, 0x1a, 0x12, 0x40, 0x0f, 0x12, 0x15, 0x06, 0x12, 0x0b, 0x06, 0x06, 0x12, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x07, 0x42, 0x55, 0x40, 0x18, 0x42, 0x47, 0x25, 0x40, 0x42, 0x40, 0x40, 0x0d, 0x0f,\n+    0x42, 0x4d, 0x40, 0x0d, 0x52, 0x4d, 0x48, 0x02, 0x02, 0x07, 0x07, 0x0a, 0x35, 0x12, 0x0a, 0x07,\n+    0x58, 0x27, 0x05, 0x12, 0x40, 0x02, 0x10, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4d, 0x50, 0x45, 0x50,\n+    0x52, 0x4a, 0x4d, 0x58, 0x58, 0x4d, 0x4d, 0x55, 0x58, 0x58, 0x4d, 0x40, 0x02, 0x42, 0x4d, 0x50,\n+    0x45, 0x50, 0x52, 0x4a, 0x4d, 0x58, 0x58, 0x4d, 0x4d, 0x55, 0x58, 0x58, 0x4d, 0x40, 0x02, 0x42,\n+    0x12, 0x4a, 0x07, 0x40, 0x45, 0x40, 0x42, 0x07, 0x42, 0x02, 0x02, 0x48, 0x45, 0x1a, 0x0d, 0x4a,\n+    0x15, 0x07, 0x40, 0x1a, 0x0d, 0x4a, 0x15, 0x07, 0x40, 0x1a, 0x0d, 0x4a, 0x15, 0x07, 0x40, 0x45,\n+    0x07, 0x05, 0x05, 0x0a, 0x12, 0x0a, 0x12, 0x12, 0x17, 0x0d, 0x4a, 0x17, 0x0d, 0x4a, 0x40, 0x40,\n+    0x40, 0x20, 0x12, 0x12, 0x40, 0x0f, 0x12, 0x15, 0x15, 0x25, 0x27, 0x15, 0x07, 0x12, 0x15, 0x0a,\n+    0x02, 0x3a, 0x1a, 0x12, 0x40, 0x0f, 0x12, 0x15, 0x07, 0x12, 0x0d, 0x07, 0x07, 0x12, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x08, 0x42, 0x54, 0x40, 0x17, 0x43, 0x48, 0x25, 0x40, 0x42, 0x40, 0x40, 0x0c, 0x0f,\n+    0x42, 0x4b, 0x40, 0x0d, 0x51, 0x4b, 0x46, 0x04, 0x04, 0x07, 0x07, 0x0a, 0x33, 0x12, 0x0b, 0x07,\n+    0x57, 0x27, 0x06, 0x12, 0x40, 0x02, 0x0f, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4c, 0x4f, 0x44, 0x4f,\n+    0x51, 0x49, 0x4c, 0x57, 0x57, 0x4b, 0x4c, 0x54, 0x57, 0x57, 0x4b, 0x00, 0x03, 0x41, 0x4c, 0x4f,\n+    0x44, 0x4f, 0x51, 0x49, 0x4c, 0x57, 0x57, 0x4b, 0x4c, 0x54, 0x57, 0x57, 0x4b, 0x00, 0x03, 0x41,\n+    0x13, 0x4a, 0x09, 0x40, 0x45, 0x40, 0x42, 0x07, 0x42, 0x03, 0x03, 0x46, 0x44, 0x1a, 0x0c, 0x4a,\n+    0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x45,\n+    0x07, 0x05, 0x05, 0x0b, 0x13, 0x0b, 0x13, 0x12, 0x17, 0x0c, 0x4a, 0x17, 0x0c, 0x4a, 0x40, 0x40,\n+    0x40, 0x1f, 0x12, 0x12, 0x40, 0x0f, 0x12, 0x14, 0x14, 0x25, 0x27, 0x15, 0x07, 0x13, 0x15, 0x0b,\n+    0x02, 0x39, 0x1a, 0x12, 0x40, 0x0f, 0x12, 0x14, 0x08, 0x12, 0x0e, 0x08, 0x08, 0x12, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x09, 0x42, 0x54, 0x40, 0x16, 0x43, 0x49, 0x25, 0x40, 0x42, 0x40, 0x40, 0x0c, 0x0f,\n+    0x42, 0x4a, 0x40, 0x0d, 0x50, 0x4a, 0x44, 0x07, 0x07, 0x07, 0x07, 0x0a, 0x32, 0x12, 0x0b, 0x07,\n+    0x56, 0x27, 0x07, 0x12, 0x40, 0x02, 0x0e, 0x40, 0x40, 0x40, 0x42, 0x42, 0x4c, 0x4e, 0x44, 0x4e,\n+    0x50, 0x48, 0x4c, 0x56, 0x56, 0x4a, 0x4c, 0x54, 0x56, 0x56, 0x4a, 0x01, 0x03, 0x40, 0x4c, 0x4e,\n+    0x44, 0x4e, 0x50, 0x48, 0x4c, 0x56, 0x56, 0x4a, 0x4c, 0x54, 0x56, 0x56, 0x4a, 0x01, 0x03, 0x40,\n+    0x13, 0x4a, 0x0b, 0x40, 0x45, 0x40, 0x42, 0x07, 0x42, 0x03, 0x03, 0x44, 0x44, 0x1a, 0x0c, 0x4a,\n+    0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x1a, 0x0c, 0x4a, 0x15, 0x07, 0x40, 0x45,\n+    0x07, 0x05, 0x05, 0x0b, 0x13, 0x0b, 0x13, 0x12, 0x17, 0x0c, 0x4a, 0x17, 0x0c, 0x4a, 0x40, 0x40,\n+    0x40, 0x1e, 0x12, 0x12, 0x40, 0x0f, 0x12, 0x14, 0x14, 0x25, 0x27, 0x15, 0x07, 0x13, 0x15, 0x0b,\n+    0x02, 0x38, 0x1a, 0x12, 0x40, 0x0f, 0x12, 0x14, 0x09, 0x12, 0x0f, 0x09, 0x09, 0x12, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x0a, 0x41, 0x53, 0x40, 0x15, 0x44, 0x4a, 0x26, 0x40, 0x41, 0x40, 0x40, 0x0b, 0x0f,\n+    0x41, 0x48, 0x40, 0x0e, 0x4f, 0x48, 0x42, 0x09, 0x09, 0x07, 0x07, 0x09, 0x30, 0x11, 0x0c, 0x07,\n+    0x55, 0x27, 0x08, 0x11, 0x40, 0x01, 0x0d, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4b, 0x4d, 0x43, 0x4d,\n+    0x4f, 0x47, 0x4b, 0x55, 0x55, 0x48, 0x4b, 0x53, 0x55, 0x55, 0x48, 0x02, 0x04, 0x00, 0x4b, 0x4d,\n+    0x43, 0x4d, 0x4f, 0x47, 0x4b, 0x55, 0x55, 0x48, 0x4b, 0x53, 0x55, 0x55, 0x48, 0x02, 0x04, 0x00,\n+    0x14, 0x49, 0x0d, 0x40, 0x46, 0x40, 0x41, 0x07, 0x41, 0x04, 0x04, 0x42, 0x43, 0x19, 0x0b, 0x49,\n+    0x16, 0x07, 0x40, 0x19, 0x0b, 0x49, 0x16, 0x07, 0x40, 0x19, 0x0b, 0x49, 0x16, 0x07, 0x40, 0x46,\n+    0x07, 0x06, 0x06, 0x0c, 0x14, 0x0c, 0x14, 0x11, 0x17, 0x0b, 0x49, 0x17, 0x0b, 0x49, 0x40, 0x40,\n+    0x40, 0x1d, 0x11, 0x11, 0x40, 0x0f, 0x11, 0x13, 0x13, 0x26, 0x27, 0x16, 0x07, 0x14, 0x16, 0x0c,\n+    0x01, 0x36, 0x19, 0x11, 0x40, 0x0f, 0x11, 0x13, 0x0a, 0x11, 0x10, 0x0a, 0x0a, 0x11, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x0b, 0x41, 0x52, 0x40, 0x14, 0x45, 0x4b, 0x26, 0x40, 0x41, 0x40, 0x40, 0x0a, 0x0f,\n+    0x41, 0x47, 0x40, 0x0e, 0x4d, 0x47, 0x40, 0x0c, 0x0c, 0x07, 0x07, 0x09, 0x2f, 0x11, 0x0d, 0x07,\n+    0x54, 0x27, 0x0a, 0x11, 0x40, 0x01, 0x0c, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4a, 0x4c, 0x42, 0x4c,\n+    0x4d, 0x45, 0x4a, 0x54, 0x54, 0x47, 0x4a, 0x52, 0x54, 0x54, 0x47, 0x03, 0x05, 0x02, 0x4a, 0x4c,\n+    0x42, 0x4c, 0x4d, 0x45, 0x4a, 0x54, 0x54, 0x47, 0x4a, 0x52, 0x54, 0x54, 0x47, 0x03, 0x05, 0x02,\n+    0x15, 0x49, 0x0f, 0x40, 0x46, 0x40, 0x41, 0x07, 0x41, 0x05, 0x05, 0x40, 0x42, 0x19, 0x0a, 0x49,\n+    0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x46,\n+    0x07, 0x06, 0x06, 0x0d, 0x15, 0x0d, 0x15, 0x11, 0x17, 0x0a, 0x49, 0x17, 0x0a, 0x49, 0x40, 0x40,\n+    0x40, 0x1c, 0x11, 0x11, 0x40, 0x0f, 0x11, 0x12, 0x12, 0x26, 0x27, 0x16, 0x07, 0x15, 0x16, 0x0d,\n+    0x01, 0x35, 0x19, 0x11, 0x40, 0x0f, 0x11, 0x12, 0x0b, 0x11, 0x12, 0x0b, 0x0b, 0x11, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x0c, 0x41, 0x52, 0x40, 0x13, 0x45, 0x4c, 0x26, 0x40, 0x41, 0x40, 0x40, 0x0a, 0x0f,\n+    0x41, 0x45, 0x40, 0x0e, 0x4c, 0x45, 0x01, 0x0e, 0x0e, 0x07, 0x07, 0x09, 0x2d, 0x11, 0x0d, 0x07,\n+    0x53, 0x27, 0x0b, 0x11, 0x40, 0x01, 0x0b, 0x40, 0x40, 0x40, 0x41, 0x41, 0x4a, 0x4b, 0x42, 0x4b,\n+    0x4c, 0x44, 0x4a, 0x53, 0x53, 0x45, 0x4a, 0x52, 0x53, 0x53, 0x45, 0x04, 0x05, 0x03, 0x4a, 0x4b,\n+    0x42, 0x4b, 0x4c, 0x44, 0x4a, 0x53, 0x53, 0x45, 0x4a, 0x52, 0x53, 0x53, 0x45, 0x04, 0x05, 0x03,\n+    0x15, 0x49, 0x11, 0x40, 0x46, 0x40, 0x41, 0x07, 0x41, 0x05, 0x05, 0x01, 0x42, 0x19, 0x0a, 0x49,\n+    0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x19, 0x0a, 0x49, 0x16, 0x07, 0x40, 0x46,\n+    0x07, 0x06, 0x06, 0x0d, 0x15, 0x0d, 0x15, 0x11, 0x17, 0x0a, 0x49, 0x17, 0x0a, 0x49, 0x40, 0x40,\n+    0x40, 0x1b, 0x11, 0x11, 0x40, 0x0f, 0x11, 0x12, 0x12, 0x26, 0x27, 0x16, 0x07, 0x15, 0x16, 0x0d,\n+    0x01, 0x34, 0x19, 0x11, 0x40, 0x0f, 0x11, 0x12, 0x0c, 0x11, 0x13, 0x0c, 0x0c, 0x11, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x0d, 0x40, 0x51, 0x40, 0x12, 0x46, 0x4d, 0x27, 0x40, 0x40, 0x40, 0x40, 0x09, 0x0f,\n+    0x40, 0x44, 0x40, 0x0f, 0x4b, 0x44, 0x03, 0x11, 0x11, 0x07, 0x07, 0x08, 0x2c, 0x10, 0x0e, 0x07,\n+    0x52, 0x27, 0x0c, 0x10, 0x40, 0x00, 0x0a, 0x40, 0x40, 0x40, 0x40, 0x40, 0x49, 0x4a, 0x41, 0x4a,\n+    0x4b, 0x43, 0x49, 0x52, 0x52, 0x44, 0x49, 0x51, 0x52, 0x52, 0x44, 0x05, 0x06, 0x04, 0x49, 0x4a,\n+    0x41, 0x4a, 0x4b, 0x43, 0x49, 0x52, 0x52, 0x44, 0x49, 0x51, 0x52, 0x52, 0x44, 0x05, 0x06, 0x04,\n+    0x16, 0x48, 0x13, 0x40, 0x47, 0x40, 0x40, 0x07, 0x40, 0x06, 0x06, 0x03, 0x41, 0x18, 0x09, 0x48,\n+    0x17, 0x07, 0x40, 0x18, 0x09, 0x48, 0x17, 0x07, 0x40, 0x18, 0x09, 0x48, 0x17, 0x07, 0x40, 0x47,\n+    0x07, 0x07, 0x07, 0x0e, 0x16, 0x0e, 0x16, 0x10, 0x17, 0x09, 0x48, 0x17, 0x09, 0x48, 0x40, 0x40,\n+    0x40, 0x1a, 0x10, 0x10, 0x40, 0x0f, 0x10, 0x11, 0x11, 0x27, 0x27, 0x17, 0x07, 0x16, 0x17, 0x0e,\n+    0x00, 0x33, 0x18, 0x10, 0x40, 0x0f, 0x10, 0x11, 0x0d, 0x10, 0x14, 0x0d, 0x0d, 0x10, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x0e, 0x40, 0x51, 0x40, 0x11, 0x47, 0x4e, 0x27, 0x40, 0x40, 0x40, 0x40, 0x08, 0x0f,\n+    0x40, 0x42, 0x40, 0x0f, 0x4a, 0x42, 0x04, 0x13, 0x13, 0x07, 0x07, 0x08, 0x2a, 0x10, 0x0e, 0x07,\n+    0x51, 0x27, 0x0d, 0x10, 0x40, 0x00, 0x09, 0x40, 0x40, 0x40, 0x40, 0x40, 0x49, 0x49, 0x41, 0x49,\n+    0x4a, 0x42, 0x49, 0x51, 0x51, 0x42, 0x49, 0x51, 0x51, 0x51, 0x42, 0x06, 0x06, 0x05, 0x49, 0x49,\n+    0x41, 0x49, 0x4a, 0x42, 0x49, 0x51, 0x51, 0x42, 0x49, 0x51, 0x51, 0x51, 0x42, 0x06, 0x06, 0x05,\n+    0x16, 0x48, 0x14, 0x40, 0x47, 0x40, 0x40, 0x07, 0x40, 0x06, 0x06, 0x04, 0x41, 0x18, 0x08, 0x48,\n+    0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x47,\n+    0x07, 0x07, 0x07, 0x0e, 0x16, 0x0e, 0x16, 0x10, 0x17, 0x08, 0x48, 0x17, 0x08, 0x48, 0x40, 0x40,\n+    0x40, 0x19, 0x10, 0x10, 0x40, 0x0f, 0x10, 0x10, 0x10, 0x27, 0x27, 0x17, 0x07, 0x16, 0x17, 0x0e,\n+    0x00, 0x31, 0x18, 0x10, 0x40, 0x0f, 0x10, 0x10, 0x0e, 0x10, 0x15, 0x0e, 0x0e, 0x10, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x0f, 0x40, 0x50, 0x40, 0x10, 0x47, 0x4f, 0x27, 0x40, 0x40, 0x40, 0x40, 0x08, 0x0f,\n+    0x40, 0x40, 0x40, 0x0f, 0x48, 0x40, 0x06, 0x16, 0x16, 0x07, 0x07, 0x08, 0x28, 0x10, 0x0f, 0x07,\n+    0x50, 0x27, 0x0f, 0x10, 0x40, 0x00, 0x08, 0x40, 0x40, 0x40, 0x40, 0x40, 0x48, 0x48, 0x40, 0x48,\n+    0x48, 0x40, 0x48, 0x50, 0x50, 0x40, 0x48, 0x50, 0x50, 0x50, 0x40, 0x07, 0x07, 0x07, 0x48, 0x48,\n+    0x40, 0x48, 0x48, 0x40, 0x48, 0x50, 0x50, 0x40, 0x48, 0x50, 0x50, 0x50, 0x40, 0x07, 0x07, 0x07,\n+    0x17, 0x48, 0x16, 0x40, 0x47, 0x40, 0x40, 0x07, 0x40, 0x07, 0x07, 0x06, 0x40, 0x18, 0x08, 0x48,\n+    0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x18, 0x08, 0x48, 0x17, 0x07, 0x40, 0x47,\n+    0x07, 0x07, 0x07, 0x0f, 0x17, 0x0f, 0x17, 0x10, 0x17, 0x08, 0x48, 0x17, 0x08, 0x48, 0x40, 0x40,\n+    0x40, 0x18, 0x10, 0x10, 0x40, 0x0f, 0x10, 0x10, 0x10, 0x27, 0x27, 0x17, 0x07, 0x17, 0x17, 0x0f,\n+    0x00, 0x30, 0x18, 0x10, 0x40, 0x0f, 0x10, 0x10, 0x0f, 0x10, 0x17, 0x0f, 0x0f, 0x10, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x10, 0x00, 0x4f, 0x40, 0x0f, 0x48, 0x50, 0x28, 0x40, 0x00, 0x40, 0x40, 0x07, 0x0f,\n+    0x00, 0x00, 0x40, 0x10, 0x47, 0x00, 0x08, 0x18, 0x18, 0x07, 0x07, 0x07, 0x27, 0x0f, 0x10, 0x07,\n+    0x4f, 0x27, 0x10, 0x0f, 0x40, 0x40, 0x07, 0x40, 0x40, 0x40, 0x00, 0x00, 0x47, 0x47, 0x00, 0x47,\n+    0x47, 0x00, 0x47, 0x4f, 0x4f, 0x00, 0x47, 0x4f, 0x4f, 0x4f, 0x00, 0x08, 0x08, 0x08, 0x47, 0x47,\n+    0x00, 0x47, 0x47, 0x00, 0x47, 0x4f, 0x4f, 0x00, 0x47, 0x4f, 0x4f, 0x4f, 0x00, 0x08, 0x08, 0x08,\n+    0x18, 0x47, 0x18, 0x40, 0x48, 0x40, 0x00, 0x07, 0x00, 0x08, 0x08, 0x08, 0x00, 0x17, 0x07, 0x47,\n+    0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x48,\n+    0x07, 0x08, 0x08, 0x10, 0x18, 0x10, 0x18, 0x0f, 0x17, 0x07, 0x47, 0x17, 0x07, 0x47, 0x40, 0x40,\n+    0x40, 0x17, 0x0f, 0x0f, 0x40, 0x0f, 0x0f, 0x0f, 0x0f, 0x28, 0x27, 0x18, 0x07, 0x18, 0x18, 0x10,\n+    0x40, 0x2f, 0x17, 0x0f, 0x40, 0x0f, 0x0f, 0x0f, 0x10, 0x0f, 0x18, 0x10, 0x10, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x11, 0x00, 0x4f, 0x40, 0x0e, 0x48, 0x51, 0x28, 0x40, 0x00, 0x40, 0x40, 0x07, 0x0f,\n+    0x00, 0x02, 0x40, 0x10, 0x46, 0x02, 0x0a, 0x1b, 0x1b, 0x07, 0x07, 0x07, 0x25, 0x0f, 0x10, 0x07,\n+    0x4e, 0x27, 0x11, 0x0f, 0x40, 0x40, 0x06, 0x40, 0x40, 0x40, 0x00, 0x00, 0x47, 0x46, 0x00, 0x46,\n+    0x46, 0x01, 0x47, 0x4e, 0x4e, 0x02, 0x47, 0x4f, 0x4e, 0x4e, 0x02, 0x09, 0x08, 0x09, 0x47, 0x46,\n+    0x00, 0x46, 0x46, 0x01, 0x47, 0x4e, 0x4e, 0x02, 0x47, 0x4f, 0x4e, 0x4e, 0x02, 0x09, 0x08, 0x09,\n+    0x18, 0x47, 0x1a, 0x40, 0x48, 0x40, 0x00, 0x07, 0x00, 0x08, 0x08, 0x0a, 0x00, 0x17, 0x07, 0x47,\n+    0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x17, 0x07, 0x47, 0x18, 0x07, 0x40, 0x48,\n+    0x07, 0x08, 0x08, 0x10, 0x18, 0x10, 0x18, 0x0f, 0x17, 0x07, 0x47, 0x17, 0x07, 0x47, 0x40, 0x40,\n+    0x40, 0x16, 0x0f, 0x0f, 0x40, 0x0f, 0x0f, 0x0f, 0x0f, 0x28, 0x27, 0x18, 0x07, 0x18, 0x18, 0x10,\n+    0x40, 0x2e, 0x17, 0x0f, 0x40, 0x0f, 0x0f, 0x0f, 0x11, 0x0f, 0x19, 0x11, 0x11, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x12, 0x00, 0x4e, 0x40, 0x0d, 0x49, 0x52, 0x28, 0x40, 0x00, 0x40, 0x40, 0x06, 0x0f,\n+    0x00, 0x03, 0x40, 0x10, 0x45, 0x03, 0x0c, 0x1d, 0x1d, 0x07, 0x07, 0x07, 0x24, 0x0f, 0x11, 0x07,\n+    0x4d, 0x27, 0x12, 0x0f, 0x40, 0x40, 0x05, 0x40, 0x40, 0x40, 0x00, 0x00, 0x46, 0x45, 0x01, 0x45,\n+    0x45, 0x02, 0x46, 0x4d, 0x4d, 0x03, 0x46, 0x4e, 0x4d, 0x4d, 0x03, 0x0a, 0x09, 0x0a, 0x46, 0x45,\n+    0x01, 0x45, 0x45, 0x02, 0x46, 0x4d, 0x4d, 0x03, 0x46, 0x4e, 0x4d, 0x4d, 0x03, 0x0a, 0x09, 0x0a,\n+    0x19, 0x47, 0x1c, 0x40, 0x48, 0x40, 0x00, 0x07, 0x00, 0x09, 0x09, 0x0c, 0x01, 0x17, 0x06, 0x47,\n+    0x18, 0x07, 0x40, 0x17, 0x06, 0x47, 0x18, 0x07, 0x40, 0x17, 0x06, 0x47, 0x18, 0x07, 0x40, 0x48,\n+    0x07, 0x08, 0x08, 0x11, 0x19, 0x11, 0x19, 0x0f, 0x17, 0x06, 0x47, 0x17, 0x06, 0x47, 0x40, 0x40,\n+    0x40, 0x15, 0x0f, 0x0f, 0x40, 0x0f, 0x0f, 0x0e, 0x0e, 0x28, 0x27, 0x18, 0x07, 0x19, 0x18, 0x11,\n+    0x40, 0x2c, 0x17, 0x0f, 0x40, 0x0f, 0x0f, 0x0e, 0x12, 0x0f, 0x1a, 0x12, 0x12, 0x0f, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x13, 0x01, 0x4d, 0x40, 0x0c, 0x4a, 0x53, 0x29, 0x40, 0x01, 0x40, 0x40, 0x05, 0x0f,\n+    0x01, 0x05, 0x40, 0x11, 0x43, 0x05, 0x0e, 0x20, 0x20, 0x07, 0x07, 0x06, 0x22, 0x0e, 0x12, 0x07,\n+    0x4c, 0x27, 0x14, 0x0e, 0x40, 0x41, 0x04, 0x40, 0x40, 0x40, 0x01, 0x01, 0x45, 0x44, 0x02, 0x44,\n+    0x43, 0x04, 0x45, 0x4c, 0x4c, 0x05, 0x45, 0x4d, 0x4c, 0x4c, 0x05, 0x0b, 0x0a, 0x0c, 0x45, 0x44,\n+    0x02, 0x44, 0x43, 0x04, 0x45, 0x4c, 0x4c, 0x05, 0x45, 0x4d, 0x4c, 0x4c, 0x05, 0x0b, 0x0a, 0x0c,\n+    0x1a, 0x46, 0x1e, 0x40, 0x49, 0x40, 0x01, 0x07, 0x01, 0x0a, 0x0a, 0x0e, 0x02, 0x16, 0x05, 0x46,\n+    0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x49,\n+    0x07, 0x09, 0x09, 0x12, 0x1a, 0x12, 0x1a, 0x0e, 0x17, 0x05, 0x46, 0x17, 0x05, 0x46, 0x40, 0x40,\n+    0x40, 0x14, 0x0e, 0x0e, 0x40, 0x0f, 0x0e, 0x0d, 0x0d, 0x29, 0x27, 0x19, 0x07, 0x1a, 0x19, 0x12,\n+    0x41, 0x2b, 0x16, 0x0e, 0x40, 0x0f, 0x0e, 0x0d, 0x13, 0x0e, 0x1c, 0x13, 0x13, 0x0e, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x14, 0x01, 0x4d, 0x40, 0x0b, 0x4a, 0x54, 0x29, 0x40, 0x01, 0x40, 0x40, 0x05, 0x0f,\n+    0x01, 0x06, 0x40, 0x11, 0x42, 0x06, 0x10, 0x22, 0x22, 0x07, 0x07, 0x06, 0x21, 0x0e, 0x12, 0x07,\n+    0x4b, 0x27, 0x15, 0x0e, 0x40, 0x41, 0x03, 0x40, 0x40, 0x40, 0x01, 0x01, 0x45, 0x43, 0x02, 0x43,\n+    0x42, 0x05, 0x45, 0x4b, 0x4b, 0x06, 0x45, 0x4d, 0x4b, 0x4b, 0x06, 0x0c, 0x0a, 0x0d, 0x45, 0x43,\n+    0x02, 0x43, 0x42, 0x05, 0x45, 0x4b, 0x4b, 0x06, 0x45, 0x4d, 0x4b, 0x4b, 0x06, 0x0c, 0x0a, 0x0d,\n+    0x1a, 0x46, 0x20, 0x40, 0x49, 0x40, 0x01, 0x07, 0x01, 0x0a, 0x0a, 0x10, 0x02, 0x16, 0x05, 0x46,\n+    0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x16, 0x05, 0x46, 0x19, 0x07, 0x40, 0x49,\n+    0x07, 0x09, 0x09, 0x12, 0x1a, 0x12, 0x1a, 0x0e, 0x17, 0x05, 0x46, 0x17, 0x05, 0x46, 0x40, 0x40,\n+    0x40, 0x13, 0x0e, 0x0e, 0x40, 0x0f, 0x0e, 0x0d, 0x0d, 0x29, 0x27, 0x19, 0x07, 0x1a, 0x19, 0x12,\n+    0x41, 0x2a, 0x16, 0x0e, 0x40, 0x0f, 0x0e, 0x0d, 0x14, 0x0e, 0x1d, 0x14, 0x14, 0x0e, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x15, 0x01, 0x4c, 0x40, 0x0a, 0x4b, 0x55, 0x29, 0x40, 0x01, 0x40, 0x40, 0x04, 0x0f,\n+    0x01, 0x08, 0x40, 0x11, 0x41, 0x08, 0x12, 0x25, 0x25, 0x07, 0x07, 0x06, 0x1f, 0x0e, 0x13, 0x07,\n+    0x4a, 0x27, 0x16, 0x0e, 0x40, 0x41, 0x02, 0x40, 0x40, 0x40, 0x01, 0x01, 0x44, 0x42, 0x03, 0x42,\n+    0x41, 0x06, 0x44, 0x4a, 0x4a, 0x08, 0x44, 0x4c, 0x4a, 0x4a, 0x08, 0x0d, 0x0b, 0x0e, 0x44, 0x42,\n+    0x03, 0x42, 0x41, 0x06, 0x44, 0x4a, 0x4a, 0x08, 0x44, 0x4c, 0x4a, 0x4a, 0x08, 0x0d, 0x0b, 0x0e,\n+    0x1b, 0x46, 0x22, 0x40, 0x49, 0x40, 0x01, 0x07, 0x01, 0x0b, 0x0b, 0x12, 0x03, 0x16, 0x04, 0x46,\n+    0x19, 0x07, 0x40, 0x16, 0x04, 0x46, 0x19, 0x07, 0x40, 0x16, 0x04, 0x46, 0x19, 0x07, 0x40, 0x49,\n+    0x07, 0x09, 0x09, 0x13, 0x1b, 0x13, 0x1b, 0x0e, 0x17, 0x04, 0x46, 0x17, 0x04, 0x46, 0x40, 0x40,\n+    0x40, 0x12, 0x0e, 0x0e, 0x40, 0x0f, 0x0e, 0x0c, 0x0c, 0x29, 0x27, 0x19, 0x07, 0x1b, 0x19, 0x13,\n+    0x41, 0x29, 0x16, 0x0e, 0x40, 0x0f, 0x0e, 0x0c, 0x15, 0x0e, 0x1e, 0x15, 0x15, 0x0e, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x15, 0x01, 0x4c, 0x40, 0x09, 0x4c, 0x56, 0x29, 0x40, 0x01, 0x40, 0x40, 0x03, 0x0f,\n+    0x01, 0x09, 0x40, 0x11, 0x40, 0x09, 0x13, 0x27, 0x27, 0x07, 0x07, 0x05, 0x1d, 0x0d, 0x13, 0x07,\n+    0x4a, 0x27, 0x17, 0x0d, 0x40, 0x42, 0x01, 0x40, 0x40, 0x40, 0x01, 0x01, 0x44, 0x42, 0x03, 0x42,\n+    0x40, 0x07, 0x44, 0x4a, 0x4a, 0x09, 0x44, 0x4c, 0x4a, 0x4a, 0x09, 0x0d, 0x0b, 0x0f, 0x44, 0x42,\n+    0x03, 0x42, 0x40, 0x07, 0x44, 0x4a, 0x4a, 0x09, 0x44, 0x4c, 0x4a, 0x4a, 0x09, 0x0d, 0x0b, 0x0f,\n+    0x1b, 0x46, 0x23, 0x40, 0x4a, 0x40, 0x01, 0x07, 0x01, 0x0b, 0x0b, 0x13, 0x03, 0x15, 0x03, 0x46,\n+    0x19, 0x07, 0x40, 0x15, 0x03, 0x46, 0x19, 0x07, 0x40, 0x15, 0x03, 0x46, 0x19, 0x07, 0x40, 0x4a,\n+    0x07, 0x09, 0x09, 0x13, 0x1b, 0x13, 0x1b, 0x0d, 0x17, 0x03, 0x46, 0x17, 0x03, 0x46, 0x40, 0x40,\n+    0x40, 0x11, 0x0d, 0x0d, 0x40, 0x0f, 0x0d, 0x0b, 0x0b, 0x29, 0x27, 0x19, 0x07, 0x1b, 0x19, 0x13,\n+    0x42, 0x27, 0x15, 0x0d, 0x40, 0x0f, 0x0d, 0x0b, 0x15, 0x0d, 0x1f, 0x15, 0x15, 0x0d, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x16, 0x02, 0x4b, 0x40, 0x09, 0x4c, 0x56, 0x2a, 0x40, 0x02, 0x40, 0x40, 0x03, 0x0f,\n+    0x02, 0x0b, 0x40, 0x12, 0x01, 0x0b, 0x15, 0x2a, 0x2a, 0x07, 0x07, 0x05, 0x1c, 0x0d, 0x14, 0x07,\n+    0x49, 0x27, 0x19, 0x0d, 0x40, 0x42, 0x01, 0x40, 0x40, 0x40, 0x02, 0x02, 0x43, 0x41, 0x04, 0x41,\n+    0x01, 0x09, 0x43, 0x49, 0x49, 0x0b, 0x43, 0x4b, 0x49, 0x49, 0x0b, 0x0e, 0x0c, 0x11, 0x43, 0x41,\n+    0x04, 0x41, 0x01, 0x09, 0x43, 0x49, 0x49, 0x0b, 0x43, 0x4b, 0x49, 0x49, 0x0b, 0x0e, 0x0c, 0x11,\n+    0x1c, 0x45, 0x25, 0x40, 0x4a, 0x40, 0x02, 0x07, 0x02, 0x0c, 0x0c, 0x15, 0x04, 0x15, 0x03, 0x45,\n+    0x1a, 0x07, 0x40, 0x15, 0x03, 0x45, 0x1a, 0x07, 0x40, 0x15, 0x03, 0x45, 0x1a, 0x07, 0x40, 0x4a,\n+    0x07, 0x0a, 0x0a, 0x14, 0x1c, 0x14, 0x1c, 0x0d, 0x17, 0x03, 0x45, 0x17, 0x03, 0x45, 0x40, 0x40,\n+    0x40, 0x11, 0x0d, 0x0d, 0x40, 0x0f, 0x0d, 0x0b, 0x0b, 0x2a, 0x27, 0x1a, 0x07, 0x1c, 0x1a, 0x14,\n+    0x42, 0x26, 0x15, 0x0d, 0x40, 0x0f, 0x0d, 0x0b, 0x16, 0x0d, 0x21, 0x16, 0x16, 0x0d, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x17, 0x02, 0x4a, 0x40, 0x08, 0x4d, 0x57, 0x2a, 0x40, 0x02, 0x40, 0x40, 0x02, 0x0f,\n+    0x02, 0x0d, 0x40, 0x12, 0x02, 0x0d, 0x17, 0x2c, 0x2c, 0x07, 0x07, 0x05, 0x1a, 0x0d, 0x15, 0x07,\n+    0x48, 0x27, 0x1a, 0x0d, 0x40, 0x42, 0x00, 0x40, 0x40, 0x40, 0x02, 0x02, 0x42, 0x40, 0x05, 0x40,\n+    0x02, 0x0a, 0x42, 0x48, 0x48, 0x0d, 0x42, 0x4a, 0x48, 0x48, 0x0d, 0x0f, 0x0d, 0x12, 0x42, 0x40,\n+    0x05, 0x40, 0x02, 0x0a, 0x42, 0x48, 0x48, 0x0d, 0x42, 0x4a, 0x48, 0x48, 0x0d, 0x0f, 0x0d, 0x12,\n+    0x1d, 0x45, 0x27, 0x40, 0x4a, 0x40, 0x02, 0x07, 0x02, 0x0d, 0x0d, 0x17, 0x05, 0x15, 0x02, 0x45,\n+    0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x4a,\n+    0x07, 0x0a, 0x0a, 0x15, 0x1d, 0x15, 0x1d, 0x0d, 0x17, 0x02, 0x45, 0x17, 0x02, 0x45, 0x40, 0x40,\n+    0x40, 0x10, 0x0d, 0x0d, 0x40, 0x0f, 0x0d, 0x0a, 0x0a, 0x2a, 0x27, 0x1a, 0x07, 0x1d, 0x1a, 0x15,\n+    0x42, 0x25, 0x15, 0x0d, 0x40, 0x0f, 0x0d, 0x0a, 0x17, 0x0d, 0x22, 0x17, 0x17, 0x0d, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x18, 0x02, 0x4a, 0x40, 0x07, 0x4d, 0x58, 0x2a, 0x40, 0x02, 0x40, 0x40, 0x02, 0x0f,\n+    0x02, 0x0e, 0x40, 0x12, 0x03, 0x0e, 0x19, 0x2f, 0x2f, 0x07, 0x07, 0x05, 0x19, 0x0d, 0x15, 0x07,\n+    0x47, 0x27, 0x1b, 0x0d, 0x40, 0x42, 0x40, 0x40, 0x40, 0x40, 0x02, 0x02, 0x42, 0x00, 0x05, 0x00,\n+    0x03, 0x0b, 0x42, 0x47, 0x47, 0x0e, 0x42, 0x4a, 0x47, 0x47, 0x0e, 0x10, 0x0d, 0x13, 0x42, 0x00,\n+    0x05, 0x00, 0x03, 0x0b, 0x42, 0x47, 0x47, 0x0e, 0x42, 0x4a, 0x47, 0x47, 0x0e, 0x10, 0x0d, 0x13,\n+    0x1d, 0x45, 0x29, 0x40, 0x4a, 0x40, 0x02, 0x07, 0x02, 0x0d, 0x0d, 0x19, 0x05, 0x15, 0x02, 0x45,\n+    0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x15, 0x02, 0x45, 0x1a, 0x07, 0x40, 0x4a,\n+    0x07, 0x0a, 0x0a, 0x15, 0x1d, 0x15, 0x1d, 0x0d, 0x17, 0x02, 0x45, 0x17, 0x02, 0x45, 0x40, 0x40,\n+    0x40, 0x0f, 0x0d, 0x0d, 0x40, 0x0f, 0x0d, 0x0a, 0x0a, 0x2a, 0x27, 0x1a, 0x07, 0x1d, 0x1a, 0x15,\n+    0x42, 0x24, 0x15, 0x0d, 0x40, 0x0f, 0x0d, 0x0a, 0x18, 0x0d, 0x23, 0x18, 0x18, 0x0d, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x19, 0x03, 0x49, 0x40, 0x06, 0x4e, 0x59, 0x2b, 0x40, 0x03, 0x40, 0x40, 0x01, 0x0f,\n+    0x03, 0x10, 0x40, 0x13, 0x04, 0x10, 0x1b, 0x31, 0x31, 0x07, 0x07, 0x04, 0x17, 0x0c, 0x16, 0x07,\n+    0x46, 0x27, 0x1c, 0x0c, 0x40, 0x43, 0x41, 0x40, 0x40, 0x40, 0x03, 0x03, 0x41, 0x01, 0x06, 0x01,\n+    0x04, 0x0c, 0x41, 0x46, 0x46, 0x10, 0x41, 0x49, 0x46, 0x46, 0x10, 0x11, 0x0e, 0x14, 0x41, 0x01,\n+    0x06, 0x01, 0x04, 0x0c, 0x41, 0x46, 0x46, 0x10, 0x41, 0x49, 0x46, 0x46, 0x10, 0x11, 0x0e, 0x14,\n+    0x1e, 0x44, 0x2b, 0x40, 0x4b, 0x40, 0x03, 0x07, 0x03, 0x0e, 0x0e, 0x1b, 0x06, 0x14, 0x01, 0x44,\n+    0x1b, 0x07, 0x40, 0x14, 0x01, 0x44, 0x1b, 0x07, 0x40, 0x14, 0x01, 0x44, 0x1b, 0x07, 0x40, 0x4b,\n+    0x07, 0x0b, 0x0b, 0x16, 0x1e, 0x16, 0x1e, 0x0c, 0x17, 0x01, 0x44, 0x17, 0x01, 0x44, 0x40, 0x40,\n+    0x40, 0x0e, 0x0c, 0x0c, 0x40, 0x0f, 0x0c, 0x09, 0x09, 0x2b, 0x27, 0x1b, 0x07, 0x1e, 0x1b, 0x16,\n+    0x43, 0x22, 0x14, 0x0c, 0x40, 0x0f, 0x0c, 0x09, 0x19, 0x0c, 0x24, 0x19, 0x19, 0x0c, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x1a, 0x03, 0x48, 0x40, 0x05, 0x4f, 0x5a, 0x2b, 0x40, 0x03, 0x40, 0x40, 0x00, 0x0f,\n+    0x03, 0x11, 0x40, 0x13, 0x06, 0x11, 0x1d, 0x34, 0x34, 0x07, 0x07, 0x04, 0x16, 0x0c, 0x17, 0x07,\n+    0x45, 0x27, 0x1e, 0x0c, 0x40, 0x43, 0x42, 0x40, 0x40, 0x40, 0x03, 0x03, 0x40, 0x02, 0x07, 0x02,\n+    0x06, 0x0e, 0x40, 0x45, 0x45, 0x11, 0x40, 0x48, 0x45, 0x45, 0x11, 0x12, 0x0f, 0x16, 0x40, 0x02,\n+    0x07, 0x02, 0x06, 0x0e, 0x40, 0x45, 0x45, 0x11, 0x40, 0x48, 0x45, 0x45, 0x11, 0x12, 0x0f, 0x16,\n+    0x1f, 0x44, 0x2d, 0x40, 0x4b, 0x40, 0x03, 0x07, 0x03, 0x0f, 0x0f, 0x1d, 0x07, 0x14, 0x00, 0x44,\n+    0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x4b,\n+    0x07, 0x0b, 0x0b, 0x17, 0x1f, 0x17, 0x1f, 0x0c, 0x17, 0x00, 0x44, 0x17, 0x00, 0x44, 0x40, 0x40,\n+    0x40, 0x0d, 0x0c, 0x0c, 0x40, 0x0f, 0x0c, 0x08, 0x08, 0x2b, 0x27, 0x1b, 0x07, 0x1f, 0x1b, 0x17,\n+    0x43, 0x21, 0x14, 0x0c, 0x40, 0x0f, 0x0c, 0x08, 0x1a, 0x0c, 0x26, 0x1a, 0x1a, 0x0c, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x1b, 0x03, 0x48, 0x40, 0x04, 0x4f, 0x5b, 0x2b, 0x40, 0x03, 0x40, 0x40, 0x00, 0x0f,\n+    0x03, 0x13, 0x40, 0x13, 0x07, 0x13, 0x1f, 0x36, 0x36, 0x07, 0x07, 0x04, 0x14, 0x0c, 0x17, 0x07,\n+    0x44, 0x27, 0x1f, 0x0c, 0x40, 0x43, 0x43, 0x40, 0x40, 0x40, 0x03, 0x03, 0x40, 0x03, 0x07, 0x03,\n+    0x07, 0x0f, 0x40, 0x44, 0x44, 0x13, 0x40, 0x48, 0x44, 0x44, 0x13, 0x13, 0x0f, 0x17, 0x40, 0x03,\n+    0x07, 0x03, 0x07, 0x0f, 0x40, 0x44, 0x44, 0x13, 0x40, 0x48, 0x44, 0x44, 0x13, 0x13, 0x0f, 0x17,\n+    0x1f, 0x44, 0x2f, 0x40, 0x4b, 0x40, 0x03, 0x07, 0x03, 0x0f, 0x0f, 0x1f, 0x07, 0x14, 0x00, 0x44,\n+    0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x14, 0x00, 0x44, 0x1b, 0x07, 0x40, 0x4b,\n+    0x07, 0x0b, 0x0b, 0x17, 0x1f, 0x17, 0x1f, 0x0c, 0x17, 0x00, 0x44, 0x17, 0x00, 0x44, 0x40, 0x40,\n+    0x40, 0x0c, 0x0c, 0x0c, 0x40, 0x0f, 0x0c, 0x08, 0x08, 0x2b, 0x27, 0x1b, 0x07, 0x1f, 0x1b, 0x17,\n+    0x43, 0x20, 0x14, 0x0c, 0x40, 0x0f, 0x0c, 0x08, 0x1b, 0x0c, 0x27, 0x1b, 0x1b, 0x0c, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x1c, 0x04, 0x47, 0x40, 0x03, 0x50, 0x5c, 0x2c, 0x40, 0x04, 0x40, 0x40, 0x40, 0x0f,\n+    0x04, 0x14, 0x40, 0x14, 0x08, 0x14, 0x21, 0x39, 0x39, 0x07, 0x07, 0x03, 0x13, 0x0b, 0x18, 0x07,\n+    0x43, 0x27, 0x20, 0x0b, 0x40, 0x44, 0x44, 0x40, 0x40, 0x40, 0x04, 0x04, 0x00, 0x04, 0x08, 0x04,\n+    0x08, 0x10, 0x00, 0x43, 0x43, 0x14, 0x00, 0x47, 0x43, 0x43, 0x14, 0x14, 0x10, 0x18, 0x00, 0x04,\n+    0x08, 0x04, 0x08, 0x10, 0x00, 0x43, 0x43, 0x14, 0x00, 0x47, 0x43, 0x43, 0x14, 0x14, 0x10, 0x18,\n+    0x20, 0x43, 0x31, 0x40, 0x4c, 0x40, 0x04, 0x07, 0x04, 0x10, 0x10, 0x21, 0x08, 0x13, 0x40, 0x43,\n+    0x1c, 0x07, 0x40, 0x13, 0x40, 0x43, 0x1c, 0x07, 0x40, 0x13, 0x40, 0x43, 0x1c, 0x07, 0x40, 0x4c,\n+    0x07, 0x0c, 0x0c, 0x18, 0x20, 0x18, 0x20, 0x0b, 0x17, 0x40, 0x43, 0x17, 0x40, 0x43, 0x40, 0x40,\n+    0x40, 0x0b, 0x0b, 0x0b, 0x40, 0x0f, 0x0b, 0x07, 0x07, 0x2c, 0x27, 0x1c, 0x07, 0x20, 0x1c, 0x18,\n+    0x44, 0x1f, 0x13, 0x0b, 0x40, 0x0f, 0x0b, 0x07, 0x1c, 0x0b, 0x28, 0x1c, 0x1c, 0x0b, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x1d, 0x04, 0x47, 0x40, 0x02, 0x51, 0x5d, 0x2c, 0x40, 0x04, 0x40, 0x40, 0x41, 0x0f,\n+    0x04, 0x16, 0x40, 0x14, 0x09, 0x16, 0x22, 0x3b, 0x3b, 0x07, 0x07, 0x03, 0x11, 0x0b, 0x18, 0x07,\n+    0x42, 0x27, 0x21, 0x0b, 0x40, 0x44, 0x45, 0x40, 0x40, 0x40, 0x04, 0x04, 0x00, 0x05, 0x08, 0x05,\n+    0x09, 0x11, 0x00, 0x42, 0x42, 0x16, 0x00, 0x47, 0x42, 0x42, 0x16, 0x15, 0x10, 0x19, 0x00, 0x05,\n+    0x08, 0x05, 0x09, 0x11, 0x00, 0x42, 0x42, 0x16, 0x00, 0x47, 0x42, 0x42, 0x16, 0x15, 0x10, 0x19,\n+    0x20, 0x43, 0x32, 0x40, 0x4c, 0x40, 0x04, 0x07, 0x04, 0x10, 0x10, 0x22, 0x08, 0x13, 0x41, 0x43,\n+    0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x4c,\n+    0x07, 0x0c, 0x0c, 0x18, 0x20, 0x18, 0x20, 0x0b, 0x17, 0x41, 0x43, 0x17, 0x41, 0x43, 0x40, 0x40,\n+    0x40, 0x0a, 0x0b, 0x0b, 0x40, 0x0f, 0x0b, 0x06, 0x06, 0x2c, 0x27, 0x1c, 0x07, 0x20, 0x1c, 0x18,\n+    0x44, 0x1d, 0x13, 0x0b, 0x40, 0x0f, 0x0b, 0x06, 0x1d, 0x0b, 0x29, 0x1d, 0x1d, 0x0b, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x1e, 0x04, 0x46, 0x40, 0x01, 0x51, 0x5e, 0x2c, 0x40, 0x04, 0x40, 0x40, 0x41, 0x0f,\n+    0x04, 0x18, 0x40, 0x14, 0x0b, 0x18, 0x24, 0x3e, 0x3e, 0x07, 0x07, 0x03, 0x0f, 0x0b, 0x19, 0x07,\n+    0x41, 0x27, 0x23, 0x0b, 0x40, 0x44, 0x46, 0x40, 0x40, 0x40, 0x04, 0x04, 0x01, 0x06, 0x09, 0x06,\n+    0x0b, 0x13, 0x01, 0x41, 0x41, 0x18, 0x01, 0x46, 0x41, 0x41, 0x18, 0x16, 0x11, 0x1b, 0x01, 0x06,\n+    0x09, 0x06, 0x0b, 0x13, 0x01, 0x41, 0x41, 0x18, 0x01, 0x46, 0x41, 0x41, 0x18, 0x16, 0x11, 0x1b,\n+    0x21, 0x43, 0x34, 0x40, 0x4c, 0x40, 0x04, 0x07, 0x04, 0x11, 0x11, 0x24, 0x09, 0x13, 0x41, 0x43,\n+    0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x13, 0x41, 0x43, 0x1c, 0x07, 0x40, 0x4c,\n+    0x07, 0x0c, 0x0c, 0x19, 0x21, 0x19, 0x21, 0x0b, 0x17, 0x41, 0x43, 0x17, 0x41, 0x43, 0x40, 0x40,\n+    0x40, 0x09, 0x0b, 0x0b, 0x40, 0x0f, 0x0b, 0x06, 0x06, 0x2c, 0x27, 0x1c, 0x07, 0x21, 0x1c, 0x19,\n+    0x44, 0x1c, 0x13, 0x0b, 0x40, 0x0f, 0x0b, 0x06, 0x1e, 0x0b, 0x2b, 0x1e, 0x1e, 0x0b, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x1f, 0x05, 0x45, 0x40, 0x00, 0x52, 0x5f, 0x2d, 0x40, 0x05, 0x40, 0x40, 0x42, 0x0f,\n+    0x05, 0x19, 0x40, 0x15, 0x0c, 0x19, 0x26, 0x3e, 0x3e, 0x07, 0x07, 0x02, 0x0e, 0x0a, 0x1a, 0x07,\n+    0x40, 0x27, 0x24, 0x0a, 0x40, 0x45, 0x47, 0x40, 0x40, 0x40, 0x05, 0x05, 0x02, 0x07, 0x0a, 0x07,\n+    0x0c, 0x14, 0x02, 0x40, 0x40, 0x19, 0x02, 0x45, 0x40, 0x40, 0x19, 0x17, 0x12, 0x1c, 0x02, 0x07,\n+    0x0a, 0x07, 0x0c, 0x14, 0x02, 0x40, 0x40, 0x19, 0x02, 0x45, 0x40, 0x40, 0x19, 0x17, 0x12, 0x1c,\n+    0x22, 0x42, 0x36, 0x40, 0x4d, 0x40, 0x05, 0x07, 0x05, 0x12, 0x12, 0x26, 0x0a, 0x12, 0x42, 0x42,\n+    0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x4d,\n+    0x07, 0x0d, 0x0d, 0x1a, 0x22, 0x1a, 0x22, 0x0a, 0x17, 0x42, 0x42, 0x17, 0x42, 0x42, 0x40, 0x40,\n+    0x40, 0x08, 0x0a, 0x0a, 0x40, 0x0f, 0x0a, 0x05, 0x05, 0x2d, 0x27, 0x1d, 0x07, 0x22, 0x1d, 0x1a,\n+    0x45, 0x1b, 0x12, 0x0a, 0x40, 0x0f, 0x0a, 0x05, 0x1f, 0x0a, 0x2c, 0x1f, 0x1f, 0x0a, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x20, 0x05, 0x45, 0x40, 0x40, 0x52, 0x60, 0x2d, 0x40, 0x05, 0x40, 0x40, 0x42, 0x0f,\n+    0x05, 0x1b, 0x40, 0x15, 0x0d, 0x1b, 0x28, 0x3e, 0x3e, 0x07, 0x07, 0x02, 0x0c, 0x0a, 0x1a, 0x07,\n+    0x00, 0x27, 0x25, 0x0a, 0x40, 0x45, 0x48, 0x40, 0x40, 0x40, 0x05, 0x05, 0x02, 0x08, 0x0a, 0x08,\n+    0x0d, 0x15, 0x02, 0x00, 0x00, 0x1b, 0x02, 0x45, 0x00, 0x00, 0x1b, 0x18, 0x12, 0x1d, 0x02, 0x08,\n+    0x0a, 0x08, 0x0d, 0x15, 0x02, 0x00, 0x00, 0x1b, 0x02, 0x45, 0x00, 0x00, 0x1b, 0x18, 0x12, 0x1d,\n+    0x22, 0x42, 0x38, 0x40, 0x4d, 0x40, 0x05, 0x07, 0x05, 0x12, 0x12, 0x28, 0x0a, 0x12, 0x42, 0x42,\n+    0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x12, 0x42, 0x42, 0x1d, 0x07, 0x40, 0x4d,\n+    0x07, 0x0d, 0x0d, 0x1a, 0x22, 0x1a, 0x22, 0x0a, 0x17, 0x42, 0x42, 0x17, 0x42, 0x42, 0x40, 0x40,\n+    0x40, 0x07, 0x0a, 0x0a, 0x40, 0x0f, 0x0a, 0x05, 0x05, 0x2d, 0x27, 0x1d, 0x07, 0x22, 0x1d, 0x1a,\n+    0x45, 0x1a, 0x12, 0x0a, 0x40, 0x0f, 0x0a, 0x05, 0x20, 0x0a, 0x2d, 0x20, 0x20, 0x0a, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x21, 0x05, 0x44, 0x40, 0x41, 0x53, 0x61, 0x2d, 0x40, 0x05, 0x40, 0x40, 0x43, 0x0f,\n+    0x05, 0x1c, 0x40, 0x15, 0x0e, 0x1c, 0x2a, 0x3e, 0x3e, 0x07, 0x07, 0x02, 0x0b, 0x0a, 0x1b, 0x07,\n+    0x01, 0x27, 0x26, 0x0a, 0x40, 0x45, 0x49, 0x40, 0x40, 0x40, 0x05, 0x05, 0x03, 0x09, 0x0b, 0x09,\n+    0x0e, 0x16, 0x03, 0x01, 0x01, 0x1c, 0x03, 0x44, 0x01, 0x01, 0x1c, 0x19, 0x13, 0x1e, 0x03, 0x09,\n+    0x0b, 0x09, 0x0e, 0x16, 0x03, 0x01, 0x01, 0x1c, 0x03, 0x44, 0x01, 0x01, 0x1c, 0x19, 0x13, 0x1e,\n+    0x23, 0x42, 0x3a, 0x40, 0x4d, 0x40, 0x05, 0x07, 0x05, 0x13, 0x13, 0x2a, 0x0b, 0x12, 0x43, 0x42,\n+    0x1d, 0x07, 0x40, 0x12, 0x43, 0x42, 0x1d, 0x07, 0x40, 0x12, 0x43, 0x42, 0x1d, 0x07, 0x40, 0x4d,\n+    0x07, 0x0d, 0x0d, 0x1b, 0x23, 0x1b, 0x23, 0x0a, 0x17, 0x43, 0x42, 0x17, 0x43, 0x42, 0x40, 0x40,\n+    0x40, 0x06, 0x0a, 0x0a, 0x40, 0x0f, 0x0a, 0x04, 0x04, 0x2d, 0x27, 0x1d, 0x07, 0x23, 0x1d, 0x1b,\n+    0x45, 0x18, 0x12, 0x0a, 0x40, 0x0f, 0x0a, 0x04, 0x21, 0x0a, 0x2e, 0x21, 0x21, 0x0a, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x22, 0x06, 0x43, 0x40, 0x42, 0x54, 0x62, 0x2e, 0x40, 0x06, 0x40, 0x40, 0x44, 0x0f,\n+    0x06, 0x1e, 0x40, 0x16, 0x10, 0x1e, 0x2c, 0x3e, 0x3e, 0x07, 0x07, 0x01, 0x09, 0x09, 0x1c, 0x07,\n+    0x02, 0x27, 0x28, 0x09, 0x40, 0x46, 0x4a, 0x40, 0x40, 0x40, 0x06, 0x06, 0x04, 0x0a, 0x0c, 0x0a,\n+    0x10, 0x18, 0x04, 0x02, 0x02, 0x1e, 0x04, 0x43, 0x02, 0x02, 0x1e, 0x1a, 0x14, 0x20, 0x04, 0x0a,\n+    0x0c, 0x0a, 0x10, 0x18, 0x04, 0x02, 0x02, 0x1e, 0x04, 0x43, 0x02, 0x02, 0x1e, 0x1a, 0x14, 0x20,\n+    0x24, 0x41, 0x3c, 0x40, 0x4e, 0x40, 0x06, 0x07, 0x06, 0x14, 0x14, 0x2c, 0x0c, 0x11, 0x44, 0x41,\n+    0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x4e,\n+    0x07, 0x0e, 0x0e, 0x1c, 0x24, 0x1c, 0x24, 0x09, 0x17, 0x44, 0x41, 0x17, 0x44, 0x41, 0x40, 0x40,\n+    0x40, 0x05, 0x09, 0x09, 0x40, 0x0f, 0x09, 0x03, 0x03, 0x2e, 0x27, 0x1e, 0x07, 0x24, 0x1e, 0x1c,\n+    0x46, 0x17, 0x11, 0x09, 0x40, 0x0f, 0x09, 0x03, 0x22, 0x09, 0x30, 0x22, 0x22, 0x09, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x23, 0x06, 0x43, 0x40, 0x43, 0x54, 0x63, 0x2e, 0x40, 0x06, 0x40, 0x40, 0x44, 0x0f,\n+    0x06, 0x1f, 0x40, 0x16, 0x11, 0x1f, 0x2e, 0x3e, 0x3e, 0x07, 0x07, 0x01, 0x08, 0x09, 0x1c, 0x07,\n+    0x03, 0x27, 0x29, 0x09, 0x40, 0x46, 0x4b, 0x40, 0x40, 0x40, 0x06, 0x06, 0x04, 0x0b, 0x0c, 0x0b,\n+    0x11, 0x19, 0x04, 0x03, 0x03, 0x1f, 0x04, 0x43, 0x03, 0x03, 0x1f, 0x1b, 0x14, 0x21, 0x04, 0x0b,\n+    0x0c, 0x0b, 0x11, 0x19, 0x04, 0x03, 0x03, 0x1f, 0x04, 0x43, 0x03, 0x03, 0x1f, 0x1b, 0x14, 0x21,\n+    0x24, 0x41, 0x3e, 0x40, 0x4e, 0x40, 0x06, 0x07, 0x06, 0x14, 0x14, 0x2e, 0x0c, 0x11, 0x44, 0x41,\n+    0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x11, 0x44, 0x41, 0x1e, 0x07, 0x40, 0x4e,\n+    0x07, 0x0e, 0x0e, 0x1c, 0x24, 0x1c, 0x24, 0x09, 0x17, 0x44, 0x41, 0x17, 0x44, 0x41, 0x40, 0x40,\n+    0x40, 0x04, 0x09, 0x09, 0x40, 0x0f, 0x09, 0x03, 0x03, 0x2e, 0x27, 0x1e, 0x07, 0x24, 0x1e, 0x1c,\n+    0x46, 0x16, 0x11, 0x09, 0x40, 0x0f, 0x09, 0x03, 0x23, 0x09, 0x31, 0x23, 0x23, 0x09, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x24, 0x06, 0x42, 0x40, 0x44, 0x55, 0x64, 0x2e, 0x40, 0x06, 0x40, 0x40, 0x45, 0x0f,\n+    0x06, 0x21, 0x40, 0x16, 0x12, 0x21, 0x30, 0x3e, 0x3e, 0x07, 0x07, 0x01, 0x06, 0x09, 0x1d, 0x07,\n+    0x04, 0x27, 0x2a, 0x09, 0x40, 0x46, 0x4c, 0x40, 0x40, 0x40, 0x06, 0x06, 0x05, 0x0c, 0x0d, 0x0c,\n+    0x12, 0x1a, 0x05, 0x04, 0x04, 0x21, 0x05, 0x42, 0x04, 0x04, 0x21, 0x1c, 0x15, 0x22, 0x05, 0x0c,\n+    0x0d, 0x0c, 0x12, 0x1a, 0x05, 0x04, 0x04, 0x21, 0x05, 0x42, 0x04, 0x04, 0x21, 0x1c, 0x15, 0x22,\n+    0x25, 0x41, 0x3e, 0x40, 0x4e, 0x40, 0x06, 0x07, 0x06, 0x15, 0x15, 0x30, 0x0d, 0x11, 0x45, 0x41,\n+    0x1e, 0x07, 0x40, 0x11, 0x45, 0x41, 0x1e, 0x07, 0x40, 0x11, 0x45, 0x41, 0x1e, 0x07, 0x40, 0x4e,\n+    0x07, 0x0e, 0x0e, 0x1d, 0x25, 0x1d, 0x25, 0x09, 0x17, 0x45, 0x41, 0x17, 0x45, 0x41, 0x40, 0x40,\n+    0x40, 0x03, 0x09, 0x09, 0x40, 0x0f, 0x09, 0x02, 0x02, 0x2e, 0x27, 0x1e, 0x07, 0x25, 0x1e, 0x1d,\n+    0x46, 0x15, 0x11, 0x09, 0x40, 0x0f, 0x09, 0x02, 0x24, 0x09, 0x32, 0x24, 0x24, 0x09, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x24, 0x06, 0x42, 0x40, 0x45, 0x56, 0x65, 0x2e, 0x40, 0x06, 0x40, 0x40, 0x46, 0x0f,\n+    0x06, 0x22, 0x40, 0x16, 0x13, 0x22, 0x31, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x04, 0x08, 0x1d, 0x07,\n+    0x04, 0x27, 0x2b, 0x08, 0x40, 0x47, 0x4d, 0x40, 0x40, 0x40, 0x06, 0x06, 0x05, 0x0c, 0x0d, 0x0c,\n+    0x13, 0x1b, 0x05, 0x04, 0x04, 0x22, 0x05, 0x42, 0x04, 0x04, 0x22, 0x1c, 0x15, 0x23, 0x05, 0x0c,\n+    0x0d, 0x0c, 0x13, 0x1b, 0x05, 0x04, 0x04, 0x22, 0x05, 0x42, 0x04, 0x04, 0x22, 0x1c, 0x15, 0x23,\n+    0x25, 0x41, 0x3e, 0x40, 0x4f, 0x40, 0x06, 0x07, 0x06, 0x15, 0x15, 0x31, 0x0d, 0x10, 0x46, 0x41,\n+    0x1e, 0x07, 0x40, 0x10, 0x46, 0x41, 0x1e, 0x07, 0x40, 0x10, 0x46, 0x41, 0x1e, 0x07, 0x40, 0x4f,\n+    0x07, 0x0e, 0x0e, 0x1d, 0x25, 0x1d, 0x25, 0x08, 0x17, 0x46, 0x41, 0x17, 0x46, 0x41, 0x40, 0x40,\n+    0x40, 0x02, 0x08, 0x08, 0x40, 0x0f, 0x08, 0x01, 0x01, 0x2e, 0x27, 0x1e, 0x07, 0x25, 0x1e, 0x1d,\n+    0x47, 0x13, 0x10, 0x08, 0x40, 0x0f, 0x08, 0x01, 0x24, 0x08, 0x33, 0x24, 0x24, 0x08, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x25, 0x07, 0x41, 0x40, 0x45, 0x56, 0x65, 0x2f, 0x40, 0x07, 0x40, 0x40, 0x46, 0x0f,\n+    0x07, 0x24, 0x40, 0x17, 0x15, 0x24, 0x33, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x03, 0x08, 0x1e, 0x07,\n+    0x05, 0x27, 0x2d, 0x08, 0x40, 0x47, 0x4d, 0x40, 0x40, 0x40, 0x07, 0x07, 0x06, 0x0d, 0x0e, 0x0d,\n+    0x15, 0x1d, 0x06, 0x05, 0x05, 0x24, 0x06, 0x41, 0x05, 0x05, 0x24, 0x1d, 0x16, 0x25, 0x06, 0x0d,\n+    0x0e, 0x0d, 0x15, 0x1d, 0x06, 0x05, 0x05, 0x24, 0x06, 0x41, 0x05, 0x05, 0x24, 0x1d, 0x16, 0x25,\n+    0x26, 0x40, 0x3e, 0x40, 0x4f, 0x40, 0x07, 0x07, 0x07, 0x16, 0x16, 0x33, 0x0e, 0x10, 0x46, 0x40,\n+    0x1f, 0x07, 0x40, 0x10, 0x46, 0x40, 0x1f, 0x07, 0x40, 0x10, 0x46, 0x40, 0x1f, 0x07, 0x40, 0x4f,\n+    0x07, 0x0f, 0x0f, 0x1e, 0x26, 0x1e, 0x26, 0x08, 0x17, 0x46, 0x40, 0x17, 0x46, 0x40, 0x40, 0x40,\n+    0x40, 0x02, 0x08, 0x08, 0x40, 0x0f, 0x08, 0x01, 0x01, 0x2f, 0x27, 0x1f, 0x07, 0x26, 0x1f, 0x1e,\n+    0x47, 0x12, 0x10, 0x08, 0x40, 0x0f, 0x08, 0x01, 0x25, 0x08, 0x35, 0x25, 0x25, 0x08, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x26, 0x07, 0x40, 0x40, 0x46, 0x57, 0x66, 0x2f, 0x40, 0x07, 0x40, 0x40, 0x47, 0x0f,\n+    0x07, 0x26, 0x40, 0x17, 0x16, 0x26, 0x35, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x01, 0x08, 0x1f, 0x07,\n+    0x06, 0x27, 0x2e, 0x08, 0x40, 0x47, 0x4e, 0x40, 0x40, 0x40, 0x07, 0x07, 0x07, 0x0e, 0x0f, 0x0e,\n+    0x16, 0x1e, 0x07, 0x06, 0x06, 0x26, 0x07, 0x40, 0x06, 0x06, 0x26, 0x1e, 0x17, 0x26, 0x07, 0x0e,\n+    0x0f, 0x0e, 0x16, 0x1e, 0x07, 0x06, 0x06, 0x26, 0x07, 0x40, 0x06, 0x06, 0x26, 0x1e, 0x17, 0x26,\n+    0x27, 0x40, 0x3e, 0x40, 0x4f, 0x40, 0x07, 0x07, 0x07, 0x17, 0x17, 0x35, 0x0f, 0x10, 0x47, 0x40,\n+    0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x4f,\n+    0x07, 0x0f, 0x0f, 0x1f, 0x27, 0x1f, 0x27, 0x08, 0x17, 0x47, 0x40, 0x17, 0x47, 0x40, 0x40, 0x40,\n+    0x40, 0x01, 0x08, 0x08, 0x40, 0x0f, 0x08, 0x00, 0x00, 0x2f, 0x27, 0x1f, 0x07, 0x27, 0x1f, 0x1f,\n+    0x47, 0x11, 0x10, 0x08, 0x40, 0x0f, 0x08, 0x00, 0x26, 0x08, 0x36, 0x26, 0x26, 0x08, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+    0x07, 0x3e, 0x27, 0x07, 0x40, 0x40, 0x47, 0x57, 0x67, 0x2f, 0x40, 0x07, 0x40, 0x40, 0x47, 0x0f,\n+    0x07, 0x27, 0x40, 0x17, 0x17, 0x27, 0x37, 0x3e, 0x3e, 0x07, 0x07, 0x00, 0x00, 0x08, 0x1f, 0x07,\n+    0x07, 0x27, 0x2f, 0x08, 0x40, 0x47, 0x4f, 0x40, 0x40, 0x40, 0x07, 0x07, 0x07, 0x0f, 0x0f, 0x0f,\n+    0x17, 0x1f, 0x07, 0x07, 0x07, 0x27, 0x07, 0x40, 0x07, 0x07, 0x27, 0x1f, 0x17, 0x27, 0x07, 0x0f,\n+    0x0f, 0x0f, 0x17, 0x1f, 0x07, 0x07, 0x07, 0x27, 0x07, 0x40, 0x07, 0x07, 0x27, 0x1f, 0x17, 0x27,\n+    0x27, 0x40, 0x3e, 0x40, 0x4f, 0x40, 0x07, 0x07, 0x07, 0x17, 0x17, 0x37, 0x0f, 0x10, 0x47, 0x40,\n+    0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x10, 0x47, 0x40, 0x1f, 0x07, 0x40, 0x4f,\n+    0x07, 0x0f, 0x0f, 0x1f, 0x27, 0x1f, 0x27, 0x08, 0x17, 0x47, 0x40, 0x17, 0x47, 0x40, 0x40, 0x40,\n+    0x40, 0x00, 0x08, 0x08, 0x40, 0x0f, 0x08, 0x00, 0x00, 0x2f, 0x27, 0x1f, 0x07, 0x27, 0x1f, 0x1f,\n+    0x47, 0x10, 0x10, 0x08, 0x40, 0x0f, 0x08, 0x00, 0x27, 0x08, 0x37, 0x27, 0x27, 0x08, 0x40, 0x40,\n+    0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+};\n+\n+static void set_ps_field(u32 *buf, struct rkvdec_ps_field field, u32 value)\n+{\n+\tu8 bit = field.offset % 32, word = field.offset / 32;\n+\tu64 mask = GENMASK_ULL(bit + field.len - 1, bit);\n+\tu64 val = ((u64)value << bit) & mask;\n+\n+\tbuf[word] &= ~mask;\n+\tbuf[word] |= val;\n+\tif (bit + field.len > 32) {\n+\t\tbuf[word + 1] &= ~(mask >> 32);\n+\t\tbuf[word + 1] |= val >> 32;\n+\t}\n+}\n+\n+static void assemble_hw_pps(struct rkvdec_ctx *ctx,\n+\t\t\t    struct rkvdec_hevc_run *run)\n+{\n+\tstruct rkvdec_hevc_ctx *hevc_ctx = ctx->priv;\n+\tconst struct v4l2_ctrl_hevc_sps *sps = run->sps;\n+\tconst struct v4l2_ctrl_hevc_pps *pps = run->pps;\n+\tstruct rkvdec_hevc_priv_tbl *priv_tbl = hevc_ctx->priv_tbl.cpu;\n+\tstruct rkvdec_sps_pps_packet *hw_ps;\n+\tu32 min_cb_log2_size_y, ctb_log2_size_y, ctb_size_y;\n+\tu32 log2_min_cu_qp_delta_size;\n+\tdma_addr_t scaling_list_address;\n+\tu32 scaling_distance;\n+\tint i;\n+\n+\t/*\n+\t * HW read the SPS/PPS information from PPS packet index by PPS id.\n+\t * offset from the base can be calculated by PPS_id * 80 (size per PPS\n+\t * packet unit). so the driver copy SPS/PPS information to the exact PPS\n+\t * packet unit for HW accessing.\n+\t */\n+\thw_ps = &priv_tbl->param_set[pps->pic_parameter_set_id];\n+\tmemset(hw_ps, 0, sizeof(*hw_ps));\n+\n+\tmin_cb_log2_size_y = sps->log2_min_luma_coding_block_size_minus3 + 3;\n+\tctb_log2_size_y = min_cb_log2_size_y +\n+\t    sps->log2_diff_max_min_luma_coding_block_size;\n+\tctb_size_y = 1 << ctb_log2_size_y;\n+\n+#define WRITE_PPS(value, field) set_ps_field(hw_ps->info, field, value)\n+\t/* write sps */\n+\tWRITE_PPS(sps->video_parameter_set_id, VIDEO_PARAMETER_SET_ID);\n+\tWRITE_PPS(sps->seq_parameter_set_id, SEQ_PARAMETER_SET_ID);\n+\tWRITE_PPS(sps->chroma_format_idc, CHROMA_FORMAT_IDC);\n+\tWRITE_PPS(sps->pic_width_in_luma_samples, PIC_WIDTH_IN_LUMA_SAMPLES);\n+\tWRITE_PPS(sps->pic_height_in_luma_samples, PIC_HEIGHT_IN_LUMA_SAMPLES);\n+\tWRITE_PPS(sps->bit_depth_luma_minus8 + 8, BIT_DEPTH_LUMA);\n+\tWRITE_PPS(sps->bit_depth_chroma_minus8 + 8, BIT_DEPTH_CHROMA);\n+\tWRITE_PPS(sps->log2_max_pic_order_cnt_lsb_minus4 + 4,\n+\t\t  LOG2_MAX_PIC_ORDER_CNT_LSB);\n+\tWRITE_PPS(sps->log2_diff_max_min_luma_coding_block_size,\n+\t\t  LOG2_DIFF_MAX_MIN_LUMA_CODING_BLOCK_SIZE);\n+\tWRITE_PPS(sps->log2_min_luma_coding_block_size_minus3 + 3,\n+\t\t  LOG2_MIN_LUMA_CODING_BLOCK_SIZE);\n+\tWRITE_PPS(sps->log2_min_luma_transform_block_size_minus2 + 2,\n+\t\t  LOG2_MIN_TRANSFORM_BLOCK_SIZE);\n+\tWRITE_PPS(sps->log2_diff_max_min_luma_transform_block_size,\n+\t\t  LOG2_DIFF_MAX_MIN_LUMA_TRANSFORM_BLOCK_SIZE);\n+\tWRITE_PPS(sps->max_transform_hierarchy_depth_inter,\n+\t\t  MAX_TRANSFORM_HIERARCHY_DEPTH_INTER);\n+\tWRITE_PPS(sps->max_transform_hierarchy_depth_intra,\n+\t\t  MAX_TRANSFORM_HIERARCHY_DEPTH_INTRA);\n+\tWRITE_PPS(!!(sps->flags & V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED),\n+\t\t  SCALING_LIST_ENABLED_FLAG);\n+\tWRITE_PPS(!!(sps->flags & V4L2_HEVC_SPS_FLAG_AMP_ENABLED),\n+\t\t  AMP_ENABLED_FLAG);\n+\tWRITE_PPS(!!(sps->flags & V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET),\n+\t\t  SAMPLE_ADAPTIVE_OFFSET_ENABLED_FLAG);\n+\tif (sps->flags & V4L2_HEVC_SPS_FLAG_PCM_ENABLED) {\n+\t\tWRITE_PPS(1, PCM_ENABLED_FLAG);\n+\t\tWRITE_PPS(sps->pcm_sample_bit_depth_luma_minus1 + 1,\n+\t\t\t  PCM_SAMPLE_BIT_DEPTH_LUMA);\n+\t\tWRITE_PPS(sps->pcm_sample_bit_depth_chroma_minus1 + 1,\n+\t\t\t  PCM_SAMPLE_BIT_DEPTH_CHROMA);\n+\t\tWRITE_PPS(!!(sps->flags & V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED),\n+\t\t\t  PCM_LOOP_FILTER_DISABLED_FLAG);\n+\t\tWRITE_PPS(sps->log2_diff_max_min_pcm_luma_coding_block_size,\n+\t\t\t  LOG2_DIFF_MAX_MIN_PCM_LUMA_CODING_BLOCK_SIZE);\n+\t\tWRITE_PPS(sps->log2_min_pcm_luma_coding_block_size_minus3 + 3,\n+\t\t\t  LOG2_MIN_PCM_LUMA_CODING_BLOCK_SIZE);\n+\t}\n+\tWRITE_PPS(sps->num_short_term_ref_pic_sets, NUM_SHORT_TERM_REF_PIC_SETS);\n+\tWRITE_PPS(!!(sps->flags & V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT),\n+\t\t  LONG_TERM_REF_PICS_PRESENT_FLAG);\n+\tWRITE_PPS(sps->num_long_term_ref_pics_sps, NUM_LONG_TERM_REF_PICS_SPS);\n+\tWRITE_PPS(!!(sps->flags & V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED),\n+\t\t  SPS_TEMPORAL_MVP_ENABLED_FLAG);\n+\tWRITE_PPS(!!(sps->flags & V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED),\n+\t\t  STRONG_INTRA_SMOOTHING_ENABLED_FLAG);\n+\n+\t/* write pps */\n+\tWRITE_PPS(pps->pic_parameter_set_id, PIC_PARAMETER_SET_ID);\n+\tWRITE_PPS(sps->seq_parameter_set_id, PPS_SEQ_PARAMETER_SET_ID);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED),\n+\t\t  DEPENDENT_SLICE_SEGMENTS_ENABLED_FLAG);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT),\n+\t\t  OUTPUT_FLAG_PRESENT_FLAG);\n+\tWRITE_PPS(pps->num_extra_slice_header_bits, NUM_EXTRA_SLICE_HEADER_BITS);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED),\n+\t\t  SIGN_DATA_HIDING_ENABLED_FLAG);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT),\n+\t\t  CABAC_INIT_PRESENT_FLAG);\n+\tWRITE_PPS(pps->num_ref_idx_l0_default_active_minus1 + 1,\n+\t\t  NUM_REF_IDX_L0_DEFAULT_ACTIVE);\n+\tWRITE_PPS(pps->num_ref_idx_l1_default_active_minus1 + 1,\n+\t\t  NUM_REF_IDX_L1_DEFAULT_ACTIVE);\n+\tWRITE_PPS(pps->init_qp_minus26, INIT_QP_MINUS26);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED),\n+\t\t  CONSTRAINED_INTRA_PRED_FLAG);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED),\n+\t\t  TRANSFORM_SKIP_ENABLED_FLAG);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED),\n+\t\t  CU_QP_DELTA_ENABLED_FLAG);\n+\n+\tlog2_min_cu_qp_delta_size = ctb_log2_size_y - pps->diff_cu_qp_delta_depth;\n+\tWRITE_PPS(log2_min_cu_qp_delta_size, LOG2_MIN_CU_QP_DELTA_SIZE);\n+\n+\tWRITE_PPS(pps->pps_cb_qp_offset, PPS_CB_QP_OFFSET);\n+\tWRITE_PPS(pps->pps_cr_qp_offset, PPS_CR_QP_OFFSET);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT),\n+\t\t  PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_FLAG);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED),\n+\t\t  WEIGHTED_PRED_FLAG);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED),\n+\t\t  WEIGHTED_BIPRED_FLAG);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED),\n+\t\t  TRANSQUANT_BYPASS_ENABLED_FLAG);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_TILES_ENABLED),\n+\t\t  TILES_ENABLED_FLAG);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED),\n+\t\t  ENTROPY_CODING_SYNC_ENABLED_FLAG);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED),\n+\t\t  PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED_FLAG);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED),\n+\t\t  LOOP_FILTER_ACROSS_TILES_ENABLED_FLAG);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED),\n+\t\t  DEBLOCKING_FILTER_OVERRIDE_ENABLED_FLAG);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER),\n+\t\t  PPS_DEBLOCKING_FILTER_DISABLED_FLAG);\n+\tWRITE_PPS(pps->pps_beta_offset_div2, PPS_BETA_OFFSET_DIV2);\n+\tWRITE_PPS(pps->pps_tc_offset_div2, PPS_TC_OFFSET_DIV2);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT),\n+\t\t  LISTS_MODIFICATION_PRESENT_FLAG);\n+\tWRITE_PPS(pps->log2_parallel_merge_level_minus2 + 2, LOG2_PARALLEL_MERGE_LEVEL);\n+\tWRITE_PPS(!!(pps->flags & V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT),\n+\t\t  SLICE_SEGMENT_HEADER_EXTENSION_PRESENT_FLAG);\n+\tWRITE_PPS(pps->num_tile_columns_minus1 + 1, NUM_TILE_COLUMNS);\n+\tWRITE_PPS(pps->num_tile_rows_minus1 + 1, NUM_TILE_ROWS);\n+\n+\tif (pps->flags & V4L2_HEVC_PPS_FLAG_TILES_ENABLED) {\n+\t\tfor (i = 0; i <= pps->num_tile_columns_minus1; i++)\n+\t\t\tWRITE_PPS(pps->column_width_minus1[i], COLUMN_WIDTH(i));\n+\t\tfor (i = 0; i <= pps->num_tile_rows_minus1; i++)\n+\t\t\tWRITE_PPS(pps->row_height_minus1[i], ROW_HEIGHT(i));\n+\t} else {\n+\t\tWRITE_PPS(((sps->pic_width_in_luma_samples + ctb_size_y - 1) / ctb_size_y) - 1,\n+\t\t\t  COLUMN_WIDTH(0));\n+\t\tWRITE_PPS(((sps->pic_height_in_luma_samples + ctb_size_y - 1) / ctb_size_y) - 1,\n+\t\t\t  ROW_HEIGHT(0));\n+\t}\n+\n+\tscaling_distance = offsetof(struct rkvdec_hevc_priv_tbl, scaling_list);\n+\tscaling_list_address = hevc_ctx->priv_tbl.dma + scaling_distance;\n+\tWRITE_PPS(scaling_list_address, SCALING_LIST_ADDRESS);\n+}\n+\n+static void assemble_hw_rps(struct rkvdec_ctx *ctx,\n+\t\t\t    struct rkvdec_hevc_run *run)\n+{\n+\tconst struct v4l2_ctrl_hevc_decode_params *decode_params = run->decode_params;\n+\tconst struct v4l2_ctrl_hevc_slice_params *sl_params;\n+\tconst struct v4l2_hevc_dpb_entry *dpb;\n+\tstruct rkvdec_hevc_ctx *hevc_ctx = ctx->priv;\n+\tstruct rkvdec_hevc_priv_tbl *priv_tbl = hevc_ctx->priv_tbl.cpu;\n+\tstruct rkvdec_rps_packet *hw_ps;\n+\tint i, j;\n+\tunsigned int lowdelay;\n+\n+#define WRITE_RPS(value, field) set_ps_field(hw_ps->info, field, value)\n+\n+#define REF_PIC_LONG_TERM_L0(i)\t\t\tPS_FIELD(i * 5, 1)\n+#define REF_PIC_IDX_L0(i)\t\t\tPS_FIELD(1 + (i * 5), 4)\n+#define REF_PIC_LONG_TERM_L1(i)\t\t\tPS_FIELD((i < 5 ? 75 : 132) + (i * 5), 1)\n+#define REF_PIC_IDX_L1(i)\t\t\tPS_FIELD((i < 4 ? 76 : 128) + (i * 5), 4)\n+\n+#define LOWDELAY\t\t\t\tPS_FIELD(182, 1)\n+#define LONG_TERM_RPS_BIT_OFFSET\t\tPS_FIELD(183, 10)\n+#define SHORT_TERM_RPS_BIT_OFFSET\t\tPS_FIELD(193, 9)\n+#define NUM_RPS_POC\t\t\t\tPS_FIELD(202, 4)\n+\n+\tfor (j = 0; j < run->num_slices; j++) {\n+\t\tsl_params = &run->slices_params[j];\n+\t\tdpb = decode_params->dpb;\n+\t\tlowdelay = (sl_params->slice_type == V4L2_HEVC_SLICE_TYPE_I) ? 0 : 1;\n+\n+\t\thw_ps = &priv_tbl->rps[j];\n+\t\tmemset(hw_ps, 0, sizeof(*hw_ps));\n+\n+\t\tfor (i = 0; i <= sl_params->num_ref_idx_l0_active_minus1; i++) {\n+\t\t\tWRITE_RPS(!!(dpb[sl_params->ref_idx_l0[i]].flags & V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE),\n+\t\t\t\t  REF_PIC_LONG_TERM_L0(i));\n+\t\t\tWRITE_RPS(sl_params->ref_idx_l0[i], REF_PIC_IDX_L0(i));\n+\n+\t\t\tif (dpb[sl_params->ref_idx_l0[i]].pic_order_cnt_val > sl_params->slice_pic_order_cnt)\n+\t\t\t\tlowdelay = 0;\n+\n+\t\t}\n+\n+\t\tfor (i = 0; i <= sl_params->num_ref_idx_l1_active_minus1; i++) {\n+\t\t\tWRITE_RPS(!!(dpb[sl_params->ref_idx_l1[i]].flags & V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE),\n+\t\t\t\t  REF_PIC_LONG_TERM_L1(i));\n+\t\t\tWRITE_RPS(sl_params->ref_idx_l1[i], REF_PIC_IDX_L1(i));\n+\n+\t\t\tif (dpb[sl_params->ref_idx_l1[i]].pic_order_cnt_val > sl_params->slice_pic_order_cnt)\n+\t\t\t\tlowdelay = 0;\n+\t\t}\n+\n+\t\tWRITE_RPS(lowdelay, LOWDELAY);\n+\n+\t\tWRITE_RPS(sl_params->long_term_ref_pic_set_size +\n+\t\t\t  sl_params->short_term_ref_pic_set_size,\n+\t\t\t  LONG_TERM_RPS_BIT_OFFSET);\n+\t\tWRITE_RPS(sl_params->short_term_ref_pic_set_size,\n+\t\t\t  SHORT_TERM_RPS_BIT_OFFSET);\n+\n+\t\tWRITE_RPS(decode_params->num_poc_st_curr_before +\n+\t\t\t  decode_params->num_poc_st_curr_after +\n+\t\t\t  decode_params->num_poc_lt_curr,\n+\t\t\t  NUM_RPS_POC);\n+\t}\n+}\n+\n+static void assemble_hw_scaling_list(struct rkvdec_ctx *ctx,\n+\t\t\t\t     struct rkvdec_hevc_run *run)\n+{\n+\tconst struct v4l2_ctrl_hevc_scaling_matrix *scaling = run->scaling_matrix;\n+\tstruct rkvdec_hevc_ctx *hevc_ctx = ctx->priv;\n+\tstruct rkvdec_hevc_priv_tbl *tbl = hevc_ctx->priv_tbl.cpu;\n+\tu8 *dst;\n+\tscalingList_t sl;\n+\tint i, j;\n+\n+\tif (!memcmp((void*)&hevc_ctx->scaling_matrix_cache, scaling,\n+\t\t    sizeof(struct v4l2_ctrl_hevc_scaling_matrix)))\n+\t\treturn;\n+\n+\tmemset(&sl, 0, sizeof(scalingList_t));\n+\n+\tfor (i = 0; i < 6; i++) {\n+\t\tfor (j = 0; j < 16; j++)\n+\t\t\tsl.sl[0][i][j] = scaling->scaling_list_4x4[i][j];\n+\t\tfor (j = 0; j < 64; j++) {\n+\t\t\tsl.sl[1][i][j] = scaling->scaling_list_8x8[i][j];\n+\t\t\tsl.sl[2][i][j] = scaling->scaling_list_16x16[i][j];\n+\t\tif (i < 2)\n+\t\t\tsl.sl[3][i][j] = scaling->scaling_list_32x32[i][j];\n+\t\t}\n+\t\tsl.sl_dc[0][i] = scaling->scaling_list_dc_coef_16x16[i];\n+\t\tif (i < 2)\n+\t\t\tsl.sl_dc[1][i] = scaling->scaling_list_dc_coef_32x32[i];\n+\t}\n+\n+\tdst = tbl->scaling_list;\n+\thal_record_scaling_list((scalingFactor_t *)dst, &sl);\n+\n+\tmemcpy((void*)&hevc_ctx->scaling_matrix_cache, scaling,\n+\t       sizeof(struct v4l2_ctrl_hevc_scaling_matrix));\n+}\n+\n+static struct vb2_buffer *\n+get_ref_buf(struct rkvdec_ctx *ctx, struct rkvdec_hevc_run *run,\n+\t    unsigned int dpb_idx)\n+{\n+\tstruct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;\n+\tconst struct v4l2_ctrl_hevc_decode_params *decode_params = run->decode_params;\n+\tconst struct v4l2_hevc_dpb_entry *dpb = decode_params->dpb;\n+\tstruct vb2_queue *cap_q = &m2m_ctx->cap_q_ctx.q;\n+\tstruct vb2_buffer *vb2_buf = NULL;\n+\n+\tif (dpb_idx < decode_params->num_active_dpb_entries)\n+\t\tvb2_buf = vb2_find_buffer(cap_q, dpb[dpb_idx].timestamp);\n+\n+\t/*\n+\t * If a DPB entry is unused or invalid, address of current destination\n+\t * buffer is returned.\n+\t */\n+\tif (!vb2_buf)\n+\t\treturn &run->base.bufs.dst->vb2_buf;\n+\n+\treturn vb2_buf;\n+}\n+\n+static void config_registers(struct rkvdec_ctx *ctx,\n+\t\t\t     struct rkvdec_hevc_run *run)\n+{\n+\tstruct rkvdec_dev *rkvdec = ctx->dev;\n+\tconst struct v4l2_ctrl_hevc_decode_params *decode_params = run->decode_params;\n+\tconst struct v4l2_ctrl_hevc_slice_params *sl_params = &run->slices_params[0];\n+\tconst struct v4l2_hevc_dpb_entry *dpb = decode_params->dpb;\n+\tstruct rkvdec_hevc_ctx *hevc_ctx = ctx->priv;\n+\tdma_addr_t priv_start_addr = hevc_ctx->priv_tbl.dma;\n+\tconst struct v4l2_pix_format_mplane *dst_fmt;\n+\tstruct vb2_v4l2_buffer *src_buf = run->base.bufs.src;\n+\tstruct vb2_v4l2_buffer *dst_buf = run->base.bufs.dst;\n+\tconst struct v4l2_format *f;\n+\tdma_addr_t rlc_addr;\n+\tdma_addr_t refer_addr;\n+\tu32 rlc_len;\n+\tu32 hor_virstride;\n+\tu32 ver_virstride;\n+\tu32 y_virstride;\n+\tu32 uv_virstride;\n+\tu32 yuv_virstride;\n+\tu32 offset;\n+\tdma_addr_t dst_addr;\n+\tu32 reg, i;\n+\n+\treg = RKVDEC_MODE(RKVDEC_MODE_HEVC);\n+\twritel_relaxed(reg, rkvdec->regs + RKVDEC_REG_SYSCTRL);\n+\n+\tf = &ctx->decoded_fmt;\n+\tdst_fmt = &f->fmt.pix_mp;\n+\thor_virstride = dst_fmt->plane_fmt[0].bytesperline;\n+\tver_virstride = dst_fmt->height;\n+\ty_virstride = hor_virstride * ver_virstride;\n+\tuv_virstride = y_virstride / 2;\n+\tyuv_virstride = y_virstride + uv_virstride;\n+\n+\treg = RKVDEC_Y_HOR_VIRSTRIDE(hor_virstride / 16) |\n+\t      RKVDEC_UV_HOR_VIRSTRIDE(hor_virstride / 16) |\n+\t      RKVDEC_SLICE_NUM_LOWBITS(run->num_slices);\n+\twritel_relaxed(reg, rkvdec->regs + RKVDEC_REG_PICPAR);\n+\n+\t/* config rlc base address */\n+\trlc_addr = vb2_dma_contig_plane_dma_addr(&src_buf->vb2_buf, 0);\n+\twritel_relaxed(rlc_addr, rkvdec->regs + RKVDEC_REG_STRM_RLC_BASE);\n+\n+\trlc_len = vb2_get_plane_payload(&src_buf->vb2_buf, 0);\n+\treg = RKVDEC_STRM_LEN(round_up(rlc_len, 16) + 64);\n+\twritel_relaxed(reg, rkvdec->regs + RKVDEC_REG_STRM_LEN);\n+\n+\t/* config cabac table */\n+\toffset = offsetof(struct rkvdec_hevc_priv_tbl, cabac_table);\n+\twritel_relaxed(priv_start_addr + offset,\n+\t\t       rkvdec->regs + RKVDEC_REG_CABACTBL_PROB_BASE);\n+\n+\t/* config output base address */\n+\tdst_addr = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf, 0);\n+\twritel_relaxed(dst_addr, rkvdec->regs + RKVDEC_REG_DECOUT_BASE);\n+\n+\treg = RKVDEC_Y_VIRSTRIDE(y_virstride / 16);\n+\twritel_relaxed(reg, rkvdec->regs + RKVDEC_REG_Y_VIRSTRIDE);\n+\n+\treg = RKVDEC_YUV_VIRSTRIDE(yuv_virstride / 16);\n+\twritel_relaxed(reg, rkvdec->regs + RKVDEC_REG_YUV_VIRSTRIDE);\n+\n+\t/* config ref pic address */\n+\tfor (i = 0; i < 15; i++) {\n+\t\tstruct vb2_buffer *vb_buf = get_ref_buf(ctx, run, i);\n+\n+\t\tif (i < 4 && decode_params->num_active_dpb_entries) {\n+\t\t\treg = GENMASK(decode_params->num_active_dpb_entries - 1, 0);\n+\t\t\treg = (reg >> (i * 4)) & 0xf;\n+\t\t} else\n+\t\t\treg = 0;\n+\n+\t\trefer_addr = vb2_dma_contig_plane_dma_addr(vb_buf, 0);\n+\t\twritel_relaxed(refer_addr | reg,\n+\t\t\t       rkvdec->regs + RKVDEC_REG_H264_BASE_REFER(i));\n+\n+\t\treg = RKVDEC_POC_REFER(i < decode_params->num_active_dpb_entries ? dpb[i].pic_order_cnt_val : 0);\n+\t\twritel_relaxed(reg,\n+\t\t\t       rkvdec->regs + RKVDEC_REG_H264_POC_REFER0(i));\n+\t}\n+\n+\treg = RKVDEC_CUR_POC(sl_params->slice_pic_order_cnt);\n+\twritel_relaxed(reg, rkvdec->regs + RKVDEC_REG_CUR_POC0);\n+\n+\t/* config hw pps address */\n+\toffset = offsetof(struct rkvdec_hevc_priv_tbl, param_set);\n+\twritel_relaxed(priv_start_addr + offset,\n+\t\t       rkvdec->regs + RKVDEC_REG_PPS_BASE);\n+\n+\t/* config hw rps address */\n+\toffset = offsetof(struct rkvdec_hevc_priv_tbl, rps);\n+\twritel_relaxed(priv_start_addr + offset,\n+\t\t       rkvdec->regs + RKVDEC_REG_RPS_BASE);\n+\n+\treg = RKVDEC_AXI_DDR_RDATA(0);\n+\twritel_relaxed(reg, rkvdec->regs + RKVDEC_REG_AXI_DDR_RDATA);\n+\n+\treg = RKVDEC_AXI_DDR_WDATA(0);\n+\twritel_relaxed(reg, rkvdec->regs + RKVDEC_REG_AXI_DDR_WDATA);\n+}\n+\n+#define RKVDEC_HEVC_MAX_DEPTH_IN_BYTES\t\t2\n+\n+static int rkvdec_hevc_adjust_fmt(struct rkvdec_ctx *ctx,\n+\t\t\t\t  struct v4l2_format *f)\n+{\n+\tstruct v4l2_pix_format_mplane *fmt = &f->fmt.pix_mp;\n+\n+\tfmt->num_planes = 1;\n+\tif (!fmt->plane_fmt[0].sizeimage)\n+\t\tfmt->plane_fmt[0].sizeimage = fmt->width * fmt->height *\n+\t\t\t\t\t      RKVDEC_HEVC_MAX_DEPTH_IN_BYTES;\n+\treturn 0;\n+}\n+\n+static int rkvdec_hevc_validate_sps(struct rkvdec_ctx *ctx,\n+\t\t\t\t    const struct v4l2_ctrl_hevc_sps *sps)\n+{\n+\tif (sps->chroma_format_idc > 1)\n+\t\t/* Only 4:0:0 and 4:2:0 are supported */\n+\t\treturn -EINVAL;\n+\tif (sps->bit_depth_luma_minus8 != sps->bit_depth_chroma_minus8)\n+\t\t/* Luma and chroma bit depth mismatch */\n+\t\treturn -EINVAL;\n+\tif (sps->bit_depth_luma_minus8 != 0 && sps->bit_depth_luma_minus8 != 2)\n+\t\t/* Only 8-bit and 10-bit is supported */\n+\t\treturn -EINVAL;\n+\n+\tif (sps->pic_width_in_luma_samples > ctx->coded_fmt.fmt.pix_mp.width ||\n+\t    sps->pic_height_in_luma_samples > ctx->coded_fmt.fmt.pix_mp.height)\n+\t\treturn -EINVAL;\n+\n+\treturn 0;\n+}\n+\n+static u32 rkvdec_hevc_valid_fmt(struct rkvdec_ctx *ctx, struct v4l2_ctrl *ctrl)\n+{\n+\tconst struct v4l2_ctrl_hevc_sps *sps = ctrl->p_new.p_hevc_sps;\n+\n+\tif (sps->bit_depth_luma_minus8 == 2)\n+\t\treturn V4L2_PIX_FMT_NV15;\n+\telse\n+\t\treturn V4L2_PIX_FMT_NV12;\n+}\n+\n+static int rkvdec_hevc_start(struct rkvdec_ctx *ctx)\n+{\n+\tstruct rkvdec_dev *rkvdec = ctx->dev;\n+\tstruct rkvdec_hevc_priv_tbl *priv_tbl;\n+\tstruct rkvdec_hevc_ctx *hevc_ctx;\n+\tstruct v4l2_ctrl *ctrl;\n+\tint ret;\n+\n+\tctrl = v4l2_ctrl_find(&ctx->ctrl_hdl,\n+\t\t\t      V4L2_CID_STATELESS_HEVC_SPS);\n+\tif (!ctrl)\n+\t\treturn -EINVAL;\n+\n+\tret = rkvdec_hevc_validate_sps(ctx, ctrl->p_new.p_hevc_sps);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\thevc_ctx = kzalloc(sizeof(*hevc_ctx), GFP_KERNEL);\n+\tif (!hevc_ctx)\n+\t\treturn -ENOMEM;\n+\n+\n+\tpriv_tbl = dma_alloc_coherent(rkvdec->dev, sizeof(*priv_tbl),\n+\t\t\t\t      &hevc_ctx->priv_tbl.dma, GFP_KERNEL);\n+\tif (!priv_tbl) {\n+\t\tret = -ENOMEM;\n+\t\tgoto err_free_ctx;\n+\t}\n+\n+\thevc_ctx->priv_tbl.size = sizeof(*priv_tbl);\n+\thevc_ctx->priv_tbl.cpu = priv_tbl;\n+\tmemset(priv_tbl, 0, sizeof(*priv_tbl));\n+\tmemcpy(priv_tbl->cabac_table, rkvdec_hevc_cabac_table,\n+\t       sizeof(rkvdec_hevc_cabac_table));\n+\n+\tctx->priv = hevc_ctx;\n+\treturn 0;\n+\n+err_free_ctx:\n+\tkfree(hevc_ctx);\n+\treturn ret;\n+}\n+\n+static void rkvdec_hevc_stop(struct rkvdec_ctx *ctx)\n+{\n+\tstruct rkvdec_hevc_ctx *hevc_ctx = ctx->priv;\n+\tstruct rkvdec_dev *rkvdec = ctx->dev;\n+\n+\tdma_free_coherent(rkvdec->dev, hevc_ctx->priv_tbl.size,\n+\t\t\t  hevc_ctx->priv_tbl.cpu, hevc_ctx->priv_tbl.dma);\n+\tkfree(hevc_ctx);\n+}\n+\n+static void rkvdec_hevc_run_preamble(struct rkvdec_ctx *ctx,\n+\t\t\t\t     struct rkvdec_hevc_run *run)\n+{\n+\tstruct v4l2_ctrl *ctrl;\n+\tctrl = v4l2_ctrl_find(&ctx->ctrl_hdl,\n+\t\t\t      V4L2_CID_STATELESS_HEVC_DECODE_PARAMS);\n+\trun->decode_params = ctrl ? ctrl->p_cur.p : NULL;\n+\tctrl = v4l2_ctrl_find(&ctx->ctrl_hdl,\n+\t\t\t      V4L2_CID_STATELESS_HEVC_SLICE_PARAMS);\n+\trun->slices_params = ctrl ? ctrl->p_cur.p : NULL;\n+\trun->num_slices = ctrl->new_elems;\n+\tctrl = v4l2_ctrl_find(&ctx->ctrl_hdl,\n+\t\t\t      V4L2_CID_STATELESS_HEVC_SPS);\n+\trun->sps = ctrl ? ctrl->p_cur.p : NULL;\n+\tctrl = v4l2_ctrl_find(&ctx->ctrl_hdl,\n+\t\t\t      V4L2_CID_STATELESS_HEVC_PPS);\n+\trun->pps = ctrl ? ctrl->p_cur.p : NULL;\n+\tctrl = v4l2_ctrl_find(&ctx->ctrl_hdl,\n+\t\t\t      V4L2_CID_STATELESS_HEVC_SCALING_MATRIX);\n+\trun->scaling_matrix = ctrl ? ctrl->p_cur.p : NULL;\n+\n+\trkvdec_run_preamble(ctx, &run->base);\n+}\n+\n+static int rkvdec_hevc_run(struct rkvdec_ctx *ctx)\n+{\n+\tstruct rkvdec_dev *rkvdec = ctx->dev;\n+\tstruct rkvdec_hevc_run run;\n+\n+\trkvdec_hevc_run_preamble(ctx, &run);\n+\n+\tassemble_hw_scaling_list(ctx, &run);\n+\tassemble_hw_pps(ctx, &run);\n+\tassemble_hw_rps(ctx, &run);\n+\tconfig_registers(ctx, &run);\n+\n+\trkvdec_run_postamble(ctx, &run.base);\n+\n+\t// sw_cabac_error_e - cabac error enable\n+\twritel_relaxed(0xfdfffffd, rkvdec->regs + RKVDEC_REG_STRMD_ERR_EN);\n+\t// slice end error enable = BIT(28)\n+\t// frame end error enable = BIT(29)\n+\twritel_relaxed(0x30000000, rkvdec->regs + RKVDEC_REG_H264_ERR_E);\n+\n+\tschedule_delayed_work(&rkvdec->watchdog_work, msecs_to_jiffies(2000));\n+\n+\twritel(1, rkvdec->regs + RKVDEC_REG_PREF_LUMA_CACHE_COMMAND);\n+\twritel(1, rkvdec->regs + RKVDEC_REG_PREF_CHR_CACHE_COMMAND);\n+\n+\t/* Start decoding! */\n+\twritel(RKVDEC_INTERRUPT_DEC_E | RKVDEC_CONFIG_DEC_CLK_GATE_E |\n+\t       RKVDEC_TIMEOUT_E | RKVDEC_BUF_EMPTY_E,\n+\t       rkvdec->regs + RKVDEC_REG_INTERRUPT);\n+\n+\treturn 0;\n+}\n+\n+static int rkvdec_hevc_try_ctrl(struct rkvdec_ctx *ctx, struct v4l2_ctrl *ctrl)\n+{\n+\tif (ctrl->id == V4L2_CID_STATELESS_HEVC_SPS)\n+\t\treturn rkvdec_hevc_validate_sps(ctx, ctrl->p_new.p_hevc_sps);\n+\n+\treturn 0;\n+}\n+\n+const struct rkvdec_coded_fmt_ops rkvdec_hevc_fmt_ops = {\n+\t.adjust_fmt = rkvdec_hevc_adjust_fmt,\n+\t.start = rkvdec_hevc_start,\n+\t.stop = rkvdec_hevc_stop,\n+\t.run = rkvdec_hevc_run,\n+\t.try_ctrl = rkvdec_hevc_try_ctrl,\n+\t.valid_fmt = rkvdec_hevc_valid_fmt,\n+};\ndiff --git a/drivers/staging/media/rkvdec/rkvdec-regs.h b/drivers/staging/media/rkvdec/rkvdec-regs.h\nindex 265f5234f4eb..4319ee3ccbbc 100644\n--- a/drivers/staging/media/rkvdec/rkvdec-regs.h\n+++ b/drivers/staging/media/rkvdec/rkvdec-regs.h\n@@ -48,6 +48,7 @@\n #define RKVDEC_RLC_MODE\t\t\t\t\tBIT(11)\n #define RKVDEC_STRM_START_BIT(x)\t\t\t(((x) & 0x7f) << 12)\n #define RKVDEC_MODE(x)\t\t\t\t\t(((x) & 0x03) << 20)\n+#define RKVDEC_MODE_HEVC\t\t\t\t0\n #define RKVDEC_MODE_H264\t\t\t\t1\n #define RKVDEC_MODE_VP9\t\t\t\t\t2\n #define RKVDEC_RPS_MODE\t\t\t\t\tBIT(24)\ndiff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c\nindex f55abb7c377f..00a9bf583596 100644\n--- a/drivers/staging/media/rkvdec/rkvdec.c\n+++ b/drivers/staging/media/rkvdec/rkvdec.c\n@@ -74,7 +74,7 @@ static int rkvdec_s_ctrl(struct v4l2_ctrl *ctrl)\n {\n \tstruct rkvdec_ctx *ctx = container_of(ctrl->handler, struct rkvdec_ctx, ctrl_hdl);\n \n-\tif (ctrl->id == V4L2_CID_STATELESS_H264_SPS && !ctx->valid_fmt) {\n+\tif (!ctx->valid_fmt) {\n \t\tctx->valid_fmt = rkvdec_valid_fmt(ctx, ctrl);\n \t\tif (ctx->valid_fmt) {\n \t\t\tstruct v4l2_pix_format_mplane *pix_mp;\n@@ -134,6 +134,62 @@ static const struct rkvdec_ctrl_desc rkvdec_h264_ctrl_descs[] = {\n \t},\n };\n \n+static const struct rkvdec_ctrl_desc rkvdec_hevc_ctrl_descs[] = {\n+\t{\n+\t\t.cfg.id = V4L2_CID_STATELESS_HEVC_SLICE_PARAMS,\n+\t\t.cfg.flags = V4L2_CTRL_FLAG_DYNAMIC_ARRAY,\n+\t\t.cfg.type = V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS,\n+\t\t.cfg.dims = { 600 },\n+\t},\n+\t{\n+\t\t.cfg.id = V4L2_CID_STATELESS_HEVC_SPS,\n+\t\t.cfg.ops = &rkvdec_ctrl_ops,\n+\t},\n+\t{\n+\t\t.cfg.id = V4L2_CID_STATELESS_HEVC_PPS,\n+\t},\n+\t{\n+\t\t.cfg.id = V4L2_CID_STATELESS_HEVC_SCALING_MATRIX,\n+\t},\n+\t{\n+\t\t.cfg.id = V4L2_CID_STATELESS_HEVC_DECODE_PARAMS,\n+\t},\n+\t{\n+\t\t.cfg.id = V4L2_CID_STATELESS_HEVC_DECODE_MODE,\n+\t\t.cfg.min = V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED,\n+\t\t.cfg.max = V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED,\n+\t\t.cfg.def = V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED,\n+\t},\n+\t{\n+\t\t.cfg.id = V4L2_CID_STATELESS_HEVC_START_CODE,\n+\t\t.cfg.min = V4L2_STATELESS_HEVC_START_CODE_ANNEX_B,\n+\t\t.cfg.def = V4L2_STATELESS_HEVC_START_CODE_ANNEX_B,\n+\t\t.cfg.max = V4L2_STATELESS_HEVC_START_CODE_ANNEX_B,\n+\t},\n+\t{\n+\t\t.cfg.id = V4L2_CID_MPEG_VIDEO_HEVC_PROFILE,\n+\t\t.cfg.min = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN,\n+\t\t.cfg.max = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10,\n+\t\t.cfg.def = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN,\n+\t},\n+\t{\n+\t\t.cfg.id = V4L2_CID_MPEG_VIDEO_HEVC_LEVEL,\n+\t\t.cfg.min = V4L2_MPEG_VIDEO_HEVC_LEVEL_1,\n+\t\t.cfg.max = V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1,\n+\t},\n+};\n+\n+static const struct rkvdec_ctrls rkvdec_hevc_ctrls = {\n+\t.ctrls = rkvdec_hevc_ctrl_descs,\n+\t.num_ctrls = ARRAY_SIZE(rkvdec_hevc_ctrl_descs),\n+};\n+\n+static const u32 rkvdec_hevc_decoded_fmts[] = {\n+\tV4L2_PIX_FMT_NV12,\n+\tV4L2_PIX_FMT_NV15,\n+};\n+\n+\n static const struct rkvdec_ctrls rkvdec_h264_ctrls = {\n \t.ctrls = rkvdec_h264_ctrl_descs,\n \t.num_ctrls = ARRAY_SIZE(rkvdec_h264_ctrl_descs),\n@@ -187,6 +243,21 @@ static const struct rkvdec_coded_fmt_desc rkvdec_coded_fmts[] = {\n \t\t.decoded_fmts = rkvdec_h264_decoded_fmts,\n \t\t.subsystem_flags = VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF,\n \t},\n+\t{\n+\t\t.fourcc = V4L2_PIX_FMT_HEVC_SLICE,\n+\t\t.frmsize = {\n+\t\t\t.min_width = 64,\n+\t\t\t.max_width = 4096,\n+\t\t\t.step_width = 64,\n+\t\t\t.min_height = 64,\n+\t\t\t.max_height = 2304,\n+\t\t\t.step_height = 16,\n+\t\t},\n+\t\t.ctrls = &rkvdec_hevc_ctrls,\n+\t\t.ops = &rkvdec_hevc_fmt_ops,\n+\t\t.num_decoded_fmts = ARRAY_SIZE(rkvdec_hevc_decoded_fmts),\n+\t\t.decoded_fmts = rkvdec_hevc_decoded_fmts,\n+\t},\n \t{\n \t\t.fourcc = V4L2_PIX_FMT_VP9_FRAME,\n \t\t.frmsize = {\ndiff --git a/drivers/staging/media/rkvdec/rkvdec.h b/drivers/staging/media/rkvdec/rkvdec.h\nindex f02f79c405f0..d6222a2588be 100644\n--- a/drivers/staging/media/rkvdec/rkvdec.h\n+++ b/drivers/staging/media/rkvdec/rkvdec.h\n@@ -133,6 +133,7 @@ void rkvdec_run_preamble(struct rkvdec_ctx *ctx, struct rkvdec_run *run);\n void rkvdec_run_postamble(struct rkvdec_ctx *ctx, struct rkvdec_run *run);\n \n extern const struct rkvdec_coded_fmt_ops rkvdec_h264_fmt_ops;\n+extern const struct rkvdec_coded_fmt_ops rkvdec_hevc_fmt_ops;\n extern const struct rkvdec_coded_fmt_ops rkvdec_vp9_fmt_ops;\n \n #endif /* RKVDEC_H_ */\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Sat, 30 Jan 2021 18:16:39 +0100\nSubject: [PATCH] media: rkvdec: add variants support\n\nrkvdec IP has different versions which among others differ in\nthe supported decoding formats.\nThis adds an variant implementation in order support other\nthan the currently supported RK3399 version.\n\nNote: Since matching of supported codecs is index-based the\navailable codec options have been reordered here: from\nsupported by all versions to not commonly supported. This seems\nthe better soultion than duplicatiing code for every newly added IP.\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/staging/media/rkvdec/rkvdec.c | 105 ++++++++++++++++++--------\n drivers/staging/media/rkvdec/rkvdec.h |  10 +++\n 2 files changed, 85 insertions(+), 30 deletions(-)\n\ndiff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c\nindex 00a9bf583596..955c53afe20f 100644\n--- a/drivers/staging/media/rkvdec/rkvdec.c\n+++ b/drivers/staging/media/rkvdec/rkvdec.c\n@@ -14,6 +14,7 @@\n #include <linux/interrupt.h>\n #include <linux/module.h>\n #include <linux/of.h>\n+#include <linux/of_device.h>\n #include <linux/platform_device.h>\n #include <linux/pm.h>\n #include <linux/pm_runtime.h>\n@@ -227,6 +228,22 @@ static const u32 rkvdec_vp9_decoded_fmts[] = {\n };\n \n static const struct rkvdec_coded_fmt_desc rkvdec_coded_fmts[] = {\n+\t{\n+\t\t.fourcc = V4L2_PIX_FMT_HEVC_SLICE,\n+\t\t.frmsize = {\n+\t\t\t.min_width = 64,\n+\t\t\t.max_width = 4096,\n+\t\t\t.step_width = 64,\n+\t\t\t.min_height = 64,\n+\t\t\t.max_height = 2304,\n+\t\t\t.step_height = 16,\n+\t\t},\n+\t\t.ctrls = &rkvdec_hevc_ctrls,\n+\t\t.ops = &rkvdec_hevc_fmt_ops,\n+\t\t.num_decoded_fmts = ARRAY_SIZE(rkvdec_hevc_decoded_fmts),\n+\t\t.decoded_fmts = rkvdec_hevc_decoded_fmts,\n+\t\t.capability = RKVDEC_CAPABILITY_HEVC,\n+\t},\n \t{\n \t\t.fourcc = V4L2_PIX_FMT_H264_SLICE,\n \t\t.frmsize = {\n@@ -242,21 +259,7 @@ static const struct rkvdec_coded_fmt_desc rkvdec_coded_fmts[] = {\n \t\t.num_decoded_fmts = ARRAY_SIZE(rkvdec_h264_decoded_fmts),\n \t\t.decoded_fmts = rkvdec_h264_decoded_fmts,\n \t\t.subsystem_flags = VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF,\n-\t},\n-\t{\n-\t\t.fourcc = V4L2_PIX_FMT_HEVC_SLICE,\n-\t\t.frmsize = {\n-\t\t\t.min_width = 64,\n-\t\t\t.max_width = 4096,\n-\t\t\t.step_width = 64,\n-\t\t\t.min_height = 64,\n-\t\t\t.max_height = 2304,\n-\t\t\t.step_height = 16,\n-\t\t},\n-\t\t.ctrls = &rkvdec_hevc_ctrls,\n-\t\t.ops = &rkvdec_hevc_fmt_ops,\n-\t\t.num_decoded_fmts = ARRAY_SIZE(rkvdec_hevc_decoded_fmts),\n-\t\t.decoded_fmts = rkvdec_hevc_decoded_fmts,\n+\t\t.capability = RKVDEC_CAPABILITY_H264,\n \t},\n \t{\n \t\t.fourcc = V4L2_PIX_FMT_VP9_FRAME,\n@@ -272,16 +275,31 @@ static const struct rkvdec_coded_fmt_desc rkvdec_coded_fmts[] = {\n \t\t.ops = &rkvdec_vp9_fmt_ops,\n \t\t.num_decoded_fmts = ARRAY_SIZE(rkvdec_vp9_decoded_fmts),\n \t\t.decoded_fmts = rkvdec_vp9_decoded_fmts,\n-\t}\n+\t\t.capability = RKVDEC_CAPABILITY_VP9,\n+\t},\n };\n \n static const struct rkvdec_coded_fmt_desc *\n-rkvdec_find_coded_fmt_desc(u32 fourcc)\n+rkvdec_default_coded_fmt_desc(unsigned int capabilities)\n+{\n+\tunsigned int i;\n+\n+\tfor (i = 0; i < ARRAY_SIZE(rkvdec_coded_fmts); i++) {\n+\t\tif (rkvdec_coded_fmts[i].capability & capabilities)\n+\t\t\treturn &rkvdec_coded_fmts[i];\n+\t}\n+\n+\treturn NULL;\n+}\n+\n+static const struct rkvdec_coded_fmt_desc *\n+rkvdec_find_coded_fmt_desc(u32 fourcc, unsigned int capabilities)\n {\n \tunsigned int i;\n \n \tfor (i = 0; i < ARRAY_SIZE(rkvdec_coded_fmts); i++) {\n-\t\tif (rkvdec_coded_fmts[i].fourcc == fourcc)\n+\t\tif (rkvdec_coded_fmts[i].fourcc == fourcc &&\n+\t\t    (rkvdec_coded_fmts[i].capability & capabilities))\n \t\t\treturn &rkvdec_coded_fmts[i];\n \t}\n \n@@ -304,7 +322,7 @@ static void rkvdec_reset_coded_fmt(struct rkvdec_ctx *ctx)\n {\n \tstruct v4l2_format *f = &ctx->coded_fmt;\n \n-\tctx->coded_fmt_desc = &rkvdec_coded_fmts[0];\n+\tctx->coded_fmt_desc = rkvdec_default_coded_fmt_desc(ctx->dev->capabilities);\n \trkvdec_reset_fmt(ctx, f, ctx->coded_fmt_desc->fourcc);\n \n \tf->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;\n@@ -331,11 +349,13 @@ static int rkvdec_enum_framesizes(struct file *file, void *priv,\n \t\t\t\t  struct v4l2_frmsizeenum *fsize)\n {\n \tconst struct rkvdec_coded_fmt_desc *fmt;\n+\tstruct rkvdec_dev *rkvdec = video_drvdata(file);\n \n \tif (fsize->index != 0)\n \t\treturn -EINVAL;\n \n-\tfmt = rkvdec_find_coded_fmt_desc(fsize->pixel_format);\n+\tfmt = rkvdec_find_coded_fmt_desc(fsize->pixel_format,\n+\t\t\t\t\t rkvdec->capabilities);\n \tif (!fmt)\n \t\treturn -EINVAL;\n \n@@ -406,10 +426,11 @@ static int rkvdec_try_output_fmt(struct file *file, void *priv,\n \tstruct rkvdec_ctx *ctx = fh_to_rkvdec_ctx(priv);\n \tconst struct rkvdec_coded_fmt_desc *desc;\n \n-\tdesc = rkvdec_find_coded_fmt_desc(pix_mp->pixelformat);\n+\tdesc = rkvdec_find_coded_fmt_desc(pix_mp->pixelformat,\n+\t\t\t\t\t  ctx->dev->capabilities);\n \tif (!desc) {\n-\t\tpix_mp->pixelformat = rkvdec_coded_fmts[0].fourcc;\n-\t\tdesc = &rkvdec_coded_fmts[0];\n+\t\tdesc = rkvdec_default_coded_fmt_desc(ctx->dev->capabilities);\n+\t\tpix_mp->pixelformat = desc->fourcc;\n \t}\n \n \tv4l2_apply_frmsize_constraints(&pix_mp->width,\n@@ -487,7 +508,8 @@ static int rkvdec_s_output_fmt(struct file *file, void *priv,\n \tif (ret)\n \t\treturn ret;\n \n-\tdesc = rkvdec_find_coded_fmt_desc(f->fmt.pix_mp.pixelformat);\n+\tdesc = rkvdec_find_coded_fmt_desc(f->fmt.pix_mp.pixelformat,\n+\t\t\t\t\t  ctx->dev->capabilities);\n \tif (!desc)\n \t\treturn -EINVAL;\n \tctx->coded_fmt_desc = desc;\n@@ -538,7 +560,10 @@ static int rkvdec_g_capture_fmt(struct file *file, void *priv,\n static int rkvdec_enum_output_fmt(struct file *file, void *priv,\n \t\t\t\t  struct v4l2_fmtdesc *f)\n {\n-\tif (f->index >= ARRAY_SIZE(rkvdec_coded_fmts))\n+\tstruct rkvdec_ctx *ctx = fh_to_rkvdec_ctx(priv);\n+\n+\tif (f->index >= ARRAY_SIZE(rkvdec_coded_fmts) ||\n+\t    !(ctx->dev->capabilities & rkvdec_coded_fmts[f->index].capability))\n \t\treturn -EINVAL;\n \n \tf->pixelformat = rkvdec_coded_fmts[f->index].fourcc;\n@@ -946,14 +971,17 @@ static int rkvdec_init_ctrls(struct rkvdec_ctx *ctx)\n \tint ret;\n \n \tfor (i = 0; i < ARRAY_SIZE(rkvdec_coded_fmts); i++)\n-\t\tnctrls += rkvdec_coded_fmts[i].ctrls->num_ctrls;\n+\t\tif (rkvdec_coded_fmts[i].capability & ctx->dev->capabilities)\n+\t\t\tnctrls += rkvdec_coded_fmts[i].ctrls->num_ctrls;\n \n \tv4l2_ctrl_handler_init(&ctx->ctrl_hdl, nctrls);\n \n \tfor (i = 0; i < ARRAY_SIZE(rkvdec_coded_fmts); i++) {\n-\t\tret = rkvdec_add_ctrls(ctx, rkvdec_coded_fmts[i].ctrls);\n-\t\tif (ret)\n-\t\t\tgoto err_free_handler;\n+\t\tif (rkvdec_coded_fmts[i].capability & ctx->dev->capabilities) {\n+\t\t\tret = rkvdec_add_ctrls(ctx, rkvdec_coded_fmts[i].ctrls);\n+\t\t\tif (ret)\n+\t\t\t\tgoto err_free_handler;\n+\t\t}\n \t}\n \n \tret = v4l2_ctrl_handler_setup(&ctx->ctrl_hdl);\n@@ -1155,8 +1183,17 @@ static void rkvdec_watchdog_func(struct work_struct *work)\n \t}\n }\n \n+static const struct rkvdec_variant rk3399_rkvdec_variant = {\n+        .capabilities   = RKVDEC_CAPABILITY_H264 |\n+\t\t           RKVDEC_CAPABILITY_HEVC |\n+\t\t\t   RKVDEC_CAPABILITY_VP9\n+};\n+\n static const struct of_device_id of_rkvdec_match[] = {\n-\t{ .compatible = \"rockchip,rk3399-vdec\" },\n+\t{\n+\t\t.compatible = \"rockchip,rk3399-vdec\",\n+\t\t.data = &rk3399_rkvdec_variant,\n+\t},\n \t{ /* sentinel */ }\n };\n MODULE_DEVICE_TABLE(of, of_rkvdec_match);\n@@ -1168,6 +1205,7 @@ static const char * const rkvdec_clk_names[] = {\n static int rkvdec_probe(struct platform_device *pdev)\n {\n \tstruct rkvdec_dev *rkvdec;\n+\tconst struct rkvdec_variant *variant;\n \tunsigned int i;\n \tint ret, irq;\n \n@@ -1193,6 +1231,13 @@ static int rkvdec_probe(struct platform_device *pdev)\n \tif (ret)\n \t\treturn ret;\n \n+\tvariant = of_device_get_match_data(rkvdec->dev);\n+\tif (!variant)\n+\t\treturn -EINVAL;\n+\n+\trkvdec->capabilities = variant->capabilities;\n+\n+\n \trkvdec->regs = devm_platform_ioremap_resource(pdev, 0);\n \tif (IS_ERR(rkvdec->regs))\n \t\treturn PTR_ERR(rkvdec->regs);\ndiff --git a/drivers/staging/media/rkvdec/rkvdec.h b/drivers/staging/media/rkvdec/rkvdec.h\nindex d6222a2588be..ad8e83884121 100644\n--- a/drivers/staging/media/rkvdec/rkvdec.h\n+++ b/drivers/staging/media/rkvdec/rkvdec.h\n@@ -29,6 +29,10 @@\n \n #define RKVDEC_RESET_DELAY\t5\n \n+#define RKVDEC_CAPABILITY_H264\tBIT(0)\n+#define RKVDEC_CAPABILITY_HEVC\tBIT(1)\n+#define RKVDEC_CAPABILITY_VP9\tBIT(2)\n+\n struct rkvdec_ctx;\n \n struct rkvdec_ctrl_desc {\n@@ -70,6 +74,10 @@ vb2_to_rkvdec_decoded_buf(struct vb2_buffer *buf)\n \t\t\t    base.vb.vb2_buf);\n }\n \n+struct rkvdec_variant {\n+        unsigned int capabilities;\n+};\n+\n struct rkvdec_coded_fmt_ops {\n \tint (*adjust_fmt)(struct rkvdec_ctx *ctx,\n \t\t\t  struct v4l2_format *f);\n@@ -91,6 +99,7 @@ struct rkvdec_coded_fmt_desc {\n \tunsigned int num_decoded_fmts;\n \tconst u32 *decoded_fmts;\n \tu32 subsystem_flags;\n+\tunsigned int capability;\n };\n \n struct rkvdec_dev {\n@@ -105,6 +114,7 @@ struct rkvdec_dev {\n \tstruct delayed_work watchdog_work;\n \tstruct reset_control *rstc;\n \tu8 reset_mask;\n+\tunsigned int capabilities;\n };\n \n struct rkvdec_ctx {\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Sat, 30 Jan 2021 18:21:59 +0100\nSubject: [PATCH] media: rkvdec: add RK3288 variant\n\nThis adds RK3288 variant to rkvdec driver. In this earlier version\nof the IP only HEVC decoding is supported.\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/staging/media/rkvdec/rkvdec.c | 8 ++++++++\n 1 file changed, 8 insertions(+)\n\ndiff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c\nindex 955c53afe20f..4e228cd82f21 100644\n--- a/drivers/staging/media/rkvdec/rkvdec.c\n+++ b/drivers/staging/media/rkvdec/rkvdec.c\n@@ -1189,11 +1189,19 @@ static const struct rkvdec_variant rk3399_rkvdec_variant = {\n \t\t\t   RKVDEC_CAPABILITY_VP9\n };\n \n+static const struct rkvdec_variant rk3288_hevc_variant = {\n+        .capabilities   = RKVDEC_CAPABILITY_HEVC\n+};\n+\n static const struct of_device_id of_rkvdec_match[] = {\n \t{\n \t\t.compatible = \"rockchip,rk3399-vdec\",\n \t\t.data = &rk3399_rkvdec_variant,\n \t},\n+\t{\n+\t\t.compatible = \"rockchip,rk3288-hevc\",\n+\t\t.data = &rk3288_hevc_variant,\n+\t},\n \t{ /* sentinel */ }\n };\n MODULE_DEVICE_TABLE(of, of_rkvdec_match);\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Sat, 30 Jan 2021 18:27:30 +0100\nSubject: [PATCH] ARM: dts: RK3288: add hevc node\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n arch/arm/boot/dts/rk3288.dtsi | 21 ++++++++++++++++++++-\n 1 file changed, 20 insertions(+), 1 deletion(-)\n\ndiff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi\nindex 7b2cde230b87..59fba3ac6aae 100644\n--- a/arch/arm/boot/dts/rk3288.dtsi\n+++ b/arch/arm/boot/dts/rk3288.dtsi\n@@ -1248,6 +1248,25 @@ vpu_mmu: iommu@ff9a0800 {\n \t\tpower-domains = <&power RK3288_PD_VIDEO>;\n \t};\n \n+\thevc: hevc@ff9c0000 {\n+\t\tcompatible = \"rockchip,rk3288-hevc\";\n+\t\treg = <0x0 0xff9c0000 0x0 0x400>;\n+\t\tinterrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;\n+\t\tinterrupt-names = \"irq_dec\";\n+\t\tclocks = <&cru ACLK_HEVC>, <&cru HCLK_HEVC>, <&cru SCLK_HEVC_CABAC>,\n+\t\t\t <&cru SCLK_HEVC_CORE>;\n+\t\tclock-names = \"axi\", \"ahb\", \"cabac\", \"core\";\n+\t\tassigned-clocks = <&cru ACLK_HEVC>, <&cru HCLK_HEVC>,\n+\t\t\t\t   <&cru SCLK_HEVC_CORE>,\n+\t\t\t\t   <&cru SCLK_HEVC_CABAC>;\n+\t\tassigned-clock-rates = <400000000>, <100000000>,\n+\t\t\t\t       <300000000>, <300000000>;\n+\t\tiommus = <&hevc_mmu>;\n+\t\tpower-domains = <&power RK3288_PD_HEVC>;\n+\t\tresets =  <&cru SRST_HEVC>;\n+\t\treset-names = \"video_core\";\n+\t};\n+\n \thevc_mmu: iommu@ff9c0440 {\n \t\tcompatible = \"rockchip,iommu\";\n \t\treg = <0x0 0xff9c0440 0x0 0x40>, <0x0 0xff9c0480 0x0 0x40>;\n@@ -1255,7 +1274,7 @@ hevc_mmu: iommu@ff9c0440 {\n \t\tclocks = <&cru ACLK_HEVC>, <&cru HCLK_HEVC>;\n \t\tclock-names = \"aclk\", \"iface\";\n \t\t#iommu-cells = <0>;\n-\t\tstatus = \"disabled\";\n+\t\tpower-domains = <&power RK3288_PD_HEVC>;\n \t};\n \n \tgpu: gpu@ffa30000 {\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Nicolas Dufresne <nicolas.dufresne@collabora.com>\nDate: Tue, 10 May 2022 14:37:29 -0400\nSubject: [PATCH] media: rkvdec: Fix HEVC RPS bit offsets\n\nThe offsets from the uAPI need to be extended to include some bits\nthat can be calculated from the parameters. This has been compared\nto match with the vendor bit sizes (which simply parse again the\ndata to calcualte it).\n\nFixed by this change:\n- LTRPSPS_A_Qualcomm_1\n- RPS_C_ericsson_5\n- RPS_D_ericsson_6\n- RPS_E_qualcomm_5\n\nSigned-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n---\n drivers/staging/media/rkvdec/rkvdec-hevc.c | 26 +++++++++++++++++++---\n 1 file changed, 23 insertions(+), 3 deletions(-)\n\ndiff --git a/drivers/staging/media/rkvdec/rkvdec-hevc.c b/drivers/staging/media/rkvdec/rkvdec-hevc.c\nindex 7a375a23eaf1..580073d49b6a 100644\n--- a/drivers/staging/media/rkvdec/rkvdec-hevc.c\n+++ b/drivers/staging/media/rkvdec/rkvdec-hevc.c\n@@ -10,6 +10,7 @@\n  */\n \n #include <media/v4l2-mem2mem.h>\n+#include <linux/bitops.h>\n \n #include \"rkvdec.h\"\n #include \"rkvdec-regs.h\"\n@@ -2175,6 +2176,7 @@ static void assemble_hw_rps(struct rkvdec_ctx *ctx,\n \t\t\t    struct rkvdec_hevc_run *run)\n {\n \tconst struct v4l2_ctrl_hevc_decode_params *decode_params = run->decode_params;\n+\tconst struct v4l2_ctrl_hevc_sps *sps = run->sps;\n \tconst struct v4l2_ctrl_hevc_slice_params *sl_params;\n \tconst struct v4l2_hevc_dpb_entry *dpb;\n \tstruct rkvdec_hevc_ctx *hevc_ctx = ctx->priv;\n@@ -2196,9 +2198,21 @@ static void assemble_hw_rps(struct rkvdec_ctx *ctx,\n #define NUM_RPS_POC\t\t\t\tPS_FIELD(202, 4)\n \n \tfor (j = 0; j < run->num_slices; j++) {\n+\t\tuint st_bit_offset = 0;\n+\n \t\tsl_params = &run->slices_params[j];\n \t\tdpb = decode_params->dpb;\n-\t\tlowdelay = (sl_params->slice_type == V4L2_HEVC_SLICE_TYPE_I) ? 0 : 1;\n+\n+\t\tif (sl_params->slice_type != V4L2_HEVC_SLICE_TYPE_I) {\n+\t\t\tnum_l0_refs = sl_params->num_ref_idx_l0_active_minus1 + 1;\n+\n+\t\t\tif (sl_params->slice_type == V4L2_HEVC_SLICE_TYPE_B)\n+\t\t\t\tnum_l1_refs = sl_params->num_ref_idx_l1_active_minus1 + 1;\n+\n+\t\t\tlowdelay = 1;\n+\t\t} else {\n+\t\t\tlowdelay = 0;\n+\t\t}\n \n \t\thw_ps = &priv_tbl->rps[j];\n \t\tmemset(hw_ps, 0, sizeof(*hw_ps));\n@@ -2224,8 +2238,14 @@ static void assemble_hw_rps(struct rkvdec_ctx *ctx,\n \n \t\tWRITE_RPS(lowdelay, LOWDELAY);\n \n-\t\tWRITE_RPS(sl_params->long_term_ref_pic_set_size +\n-\t\t\t  sl_params->short_term_ref_pic_set_size,\n+\t\tif (!(decode_params->flags & V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC)) {\n+\t\t\tif (sl_params->short_term_ref_pic_set_size)\n+\t\t\t\tst_bit_offset = sl_params->short_term_ref_pic_set_size;\n+\t\t\telse if (sps->num_short_term_ref_pic_sets > 1)\n+\t\t\t\tst_bit_offset = fls(sps->num_short_term_ref_pic_sets - 1);\n+\t\t}\n+\n+\t\tWRITE_RPS(st_bit_offset + sl_params->long_term_ref_pic_set_size,\n \t\t\t  LONG_TERM_RPS_BIT_OFFSET);\n \t\tWRITE_RPS(sl_params->short_term_ref_pic_set_size,\n \t\t\t  SHORT_TERM_RPS_BIT_OFFSET);\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Nicolas Dufresne <nicolas.dufresne@collabora.com>\nDate: Tue, 10 May 2022 15:12:03 -0400\nSubject: [PATCH] media: rkvdec: Fix number of HEVC references being set in RPS\n\nThe numbers from the bitstream are values between 1 - 16 (as they are\nthe number - 1). The difference between 0 and 1 needs to be determined\nbase on the slice type. I frames have no reference, P frames only have\nL0 reference, and B frames have both.\n\nSigned-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n---\n drivers/staging/media/rkvdec/rkvdec-hevc.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/staging/media/rkvdec/rkvdec-hevc.c b/drivers/staging/media/rkvdec/rkvdec-hevc.c\nindex 580073d49b6a..ce15028918b2 100644\n--- a/drivers/staging/media/rkvdec/rkvdec-hevc.c\n+++ b/drivers/staging/media/rkvdec/rkvdec-hevc.c\n@@ -2199,6 +2199,8 @@ static void assemble_hw_rps(struct rkvdec_ctx *ctx,\n \n \tfor (j = 0; j < run->num_slices; j++) {\n \t\tuint st_bit_offset = 0;\n+\t\tuint num_l0_refs = 0;\n+\t\tuint num_l1_refs = 0;\n \n \t\tsl_params = &run->slices_params[j];\n \t\tdpb = decode_params->dpb;\n@@ -2217,7 +2219,7 @@ static void assemble_hw_rps(struct rkvdec_ctx *ctx,\n \t\thw_ps = &priv_tbl->rps[j];\n \t\tmemset(hw_ps, 0, sizeof(*hw_ps));\n \n-\t\tfor (i = 0; i <= sl_params->num_ref_idx_l0_active_minus1; i++) {\n+\t\tfor (i = 0; i < num_l0_refs; i++) {\n \t\t\tWRITE_RPS(!!(dpb[sl_params->ref_idx_l0[i]].flags & V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE),\n \t\t\t\t  REF_PIC_LONG_TERM_L0(i));\n \t\t\tWRITE_RPS(sl_params->ref_idx_l0[i], REF_PIC_IDX_L0(i));\n@@ -2227,7 +2229,7 @@ static void assemble_hw_rps(struct rkvdec_ctx *ctx,\n \n \t\t}\n \n-\t\tfor (i = 0; i <= sl_params->num_ref_idx_l1_active_minus1; i++) {\n+\t\tfor (i = 0; i < num_l1_refs; i++) {\n \t\t\tWRITE_RPS(!!(dpb[sl_params->ref_idx_l1[i]].flags & V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE),\n \t\t\t\t  REF_PIC_LONG_TERM_L1(i));\n \t\t\tWRITE_RPS(sl_params->ref_idx_l1[i], REF_PIC_IDX_L1(i));\n"
  },
  {
    "path": "projects/Rockchip/patches/linux/default/linux-2001-v4l2-wip-iep-driver.patch",
    "content": "From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Sun, 11 Oct 2020 17:03:12 +0200\nSubject: [PATCH] dt-bindings: media: Add Rockchip IEP binding\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n .../bindings/media/rockchip-iep.yaml          | 73 +++++++++++++++++++\n 1 file changed, 73 insertions(+)\n create mode 100644 Documentation/devicetree/bindings/media/rockchip-iep.yaml\n\ndiff --git a/Documentation/devicetree/bindings/media/rockchip-iep.yaml b/Documentation/devicetree/bindings/media/rockchip-iep.yaml\nnew file mode 100644\nindex 000000000000..a9efcda13fc1\n--- /dev/null\n+++ b/Documentation/devicetree/bindings/media/rockchip-iep.yaml\n@@ -0,0 +1,73 @@\n+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)\n+%YAML 1.2\n+---\n+$id: http://devicetree.org/schemas/media/rockchip-iep.yaml#\n+$schema: http://devicetree.org/meta-schemas/core.yaml#\n+\n+title: Rockchip Image Enhancement Processor (IEP)\n+\n+description:\n+    Rockchip IEP supports various image enhancement operations for YUV and RGB domains.\n+    Deinterlacing, spatial and temporal sampling noise reduction are supported by the\n+    YUV block. Gamma adjustment, edge enhancement, detail enhancement are supported in\n+    the RGB block. Brightness, Saturation, Contrast, Hue adjustment is supported for\n+    both domains. Furthermore it supports converting RGB to YUV / YUV to RGB.\n+\n+maintainers:\n+  - Heiko Stuebner <heiko@sntech.de>\n+\n+properties:\n+  compatible:\n+    oneOf:\n+      - const: rockchip,rk3228-iep\n+      - items:\n+          - enum:\n+              - rockchip,rk3288-iep\n+              - rockchip,rk3328-iep\n+              - rockchip,rk3368-iep\n+              - rockchip,rk3399-iep\n+          - const: rockchip,rk3228-iep\n+\n+  reg:\n+    maxItems: 1\n+\n+  interrupts:\n+    maxItems: 1\n+\n+  clocks:\n+    maxItems: 2\n+\n+  clock-names:\n+    items:\n+      - const: axi\n+      - const: ahb\n+\n+  power-domains:\n+    maxItems: 1\n+\n+  iommus:\n+    maxItems: 1\n+\n+required:\n+  - compatible\n+  - reg\n+  - interrupts\n+  - clocks\n+  - clock-names\n+\n+additionalProperties: false\n+\n+examples:\n+  - |\n+    #include <dt-bindings/clock/rk3228-cru.h>\n+    #include <dt-bindings/interrupt-controller/arm-gic.h>\n+    #include <dt-bindings/power/rk3228-power.h>\n+    iep: iep@20070000 {\n+      compatible = \"rockchip,rk3228-iep\";\n+      reg = <0x20070000 0x800>;\n+      interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;\n+      clocks = <&cru ACLK_IEP>, <&cru HCLK_IEP>;\n+      clock-names = \"axi\", \"ahb\";\n+      iommus = <&iep_mmu>;\n+      power-domains = <&power RK3228_PD_VIO>;\n+    };\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Sun, 11 Oct 2020 21:24:10 +0200\nSubject: [PATCH] media: rockchip: Add Rockchip IEP driver\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n drivers/media/platform/rockchip/Kconfig       |    1 +\n drivers/media/platform/rockchip/Makefile      |    1 +\n drivers/media/platform/rockchip/iep/Kconfig   |   16 +\n drivers/media/platform/rockchip/iep/Makefile  |    5 +\n .../media/platform/rockchip/iep/iep-regs.h    |  291 +++++\n drivers/media/platform/rockchip/iep/iep.c     | 1089 +++++++++++++++++\n drivers/media/platform/rockchip/iep/iep.h     |  112 ++\n 7 files changed, 1515 insertions(+)\n create mode 100644 drivers/media/platform/rockchip/iep/Kconfig\n create mode 100644 drivers/media/platform/rockchip/iep/Makefile\n create mode 100644 drivers/media/platform/rockchip/iep/iep-regs.h\n create mode 100644 drivers/media/platform/rockchip/iep/iep.c\n create mode 100644 drivers/media/platform/rockchip/iep/iep.h\n\ndiff --git a/drivers/media/platform/rockchip/Kconfig b/drivers/media/platform/rockchip/Kconfig\nindex b41d3960c1b4..9ff362805ded 100644\n--- a/drivers/media/platform/rockchip/Kconfig\n+++ b/drivers/media/platform/rockchip/Kconfig\n@@ -2,5 +2,6 @@\n \n comment \"Rockchip media platform drivers\"\n \n+source \"drivers/media/platform/rockchip/iep/Kconfig\"\n source \"drivers/media/platform/rockchip/rga/Kconfig\"\n source \"drivers/media/platform/rockchip/rkisp1/Kconfig\"\ndiff --git a/drivers/media/platform/rockchip/Makefile b/drivers/media/platform/rockchip/Makefile\nindex 4f782b876ac9..c075ecc2fa14 100644\n--- a/drivers/media/platform/rockchip/Makefile\n+++ b/drivers/media/platform/rockchip/Makefile\n@@ -1,3 +1,4 @@\n # SPDX-License-Identifier: GPL-2.0-only\n+obj-y += iep/\n obj-y += rga/\n obj-y += rkisp1/\ndiff --git a/drivers/media/platform/rockchip/iep/Kconfig b/drivers/media/platform/rockchip/iep/Kconfig\nnew file mode 100644\nindex 000000000000..d95155a95133\n--- /dev/null\n+++ b/drivers/media/platform/rockchip/iep/Kconfig\n@@ -0,0 +1,16 @@\n+# SPDX-License-Identifier: GPL-2.0-only\n+ \n+config VIDEO_ROCKCHIP_IEP\n+\ttristate \"Rockchip Image Enhancement Processor\"\n+\tdepends on V4L_MEM2MEM_DRIVERS\n+\tdepends on VIDEO_DEV\n+\tdepends on ARCH_ROCKCHIP || COMPILE_TEST\n+\tselect VIDEOBUF2_DMA_CONTIG\n+\tselect V4L2_MEM2MEM_DEV\n+\thelp\n+\t  This is a v4l2 driver for Rockchip Image Enhancement Processor (IEP)\n+\t  found in most Rockchip RK3xxx SoCs.\n+\t  Rockchip IEP supports various enhancement operations for RGB and YUV\n+\t  images. The driver currently implements YUV deinterlacing only.\n+\t  To compile this driver as a module, choose M here: the module\n+\t  will be called rockchip-iep\ndiff --git a/drivers/media/platform/rockchip/iep/Makefile b/drivers/media/platform/rockchip/iep/Makefile\nnew file mode 100644\nindex 000000000000..5c89b3277469\n--- /dev/null\n+++ b/drivers/media/platform/rockchip/iep/Makefile\n@@ -0,0 +1,5 @@\n+# SPDX-License-Identifier: GPL-2.0-only\n+\n+rockchip-iep-objs := iep.o\n+\n+obj-$(CONFIG_VIDEO_ROCKCHIP_IEP) += rockchip-iep.o\ndiff --git a/drivers/media/platform/rockchip/iep/iep-regs.h b/drivers/media/platform/rockchip/iep/iep-regs.h\nnew file mode 100644\nindex 000000000000..a68685ef3604\n--- /dev/null\n+++ b/drivers/media/platform/rockchip/iep/iep-regs.h\n@@ -0,0 +1,291 @@\n+/* SPDX-License-Identifier: GPL-2.0-only */\n+/*\n+ * Rockchip Image Enhancement Processor (IEP) driver\n+ *\n+ * Copyright (C) 2020 Alex Bee <knaerzche@gmail.com>\n+ *\n+ */\n+\n+#ifndef __IEP_REGS_H__\n+#define __IEP_REGS_H__\n+\n+/* IEP Registers addresses */\n+#define IEP_CONFIG0\t\t\t0x000 /* Configuration register0 */\n+#define IEP_VOP_DIRECT_PATH\t\t\tBIT(0)\n+#define IEP_DEIN_HIGH_FREQ_SHFT\t\t\t1\n+#define IEP_DEIN_HIGH_FREQ_MASK\t\t\t(0x7f << IEP_DEIN_HIGH_FREQ_SHFT)\n+#define IEP_DEIN_MODE_SHFT\t\t\t8\n+#define IEP_DEIN_MODE_MASK\t\t\t(7 << IEP_DEIN_MODE_SHFT)\n+#define IEP_DEIN_HIGH_FREQ_EN\t\t\tBIT(11)\n+#define IEP_DEIN_EDGE_INTPOL_EN\t\t\tBIT(12)\n+#define IEP_YUV_DENOISE_EN\t\t\tBIT(13)\n+#define IEP_YUV_ENHNC_EN\t\t\tBIT(14)\n+#define IEP_DEIN_EDGE_INTPOL_SMTH_EN\t\tBIT(15)\n+#define IEP_RGB_CLR_ENHNC_EN\t\t\tBIT(16)\n+#define IEP_RGB_CNTRST_ENHNC_EN\t\t\tBIT(17)\n+#define IEP_RGB_ENHNC_MODE_BYPASS\t\t(0 << 18)\n+#define IEP_RGB_ENHNC_MODE_DNS\t\t\tBIT(18)\n+#define IEP_RGB_ENHNC_MODE_DTL\t\t\t(2 << 18)\n+#define IEP_RGB_ENHNC_MODE_EDG\t\t\t(3 << 18)\n+#define IEP_RGB_ENHNC_MODE_MASK\t\t\t(3 << 18)\n+#define IEP_RGB_CNTRST_ENHNC_DDE_FRST\t\tBIT(20)\n+#define IEP_DEIN_EDGE_INTPOL_RADIUS_SHFT\t21\n+#define IEP_DEIN_EDGE_INTPOL_RADIUS_MASK\t(3 << IEP_DEIN_EDGE_INTPOL_RADIUS_SHFT)\n+#define IEP_DEIN_EDGE_INTPOL_SELECT\t\tBIT(23)\n+\n+#define IEP_CONFIG1\t\t\t0x004 /* Configuration register1 */\n+#define IEP_SRC_FMT_SHFT\t\t\t0\n+#define IEP_SRC_FMT_MASK\t\t\t(3 << IEP_SRC_FMT_SHFT)\n+#define IEP_SRC_RGB_SWP_SHFT\t\t\t2\n+#define IEP_SRC_RGB_SWP_MASK\t\t\t(2 << IEP_SRC_RGB_SWP_SHFT)\n+#define IEP_SRC_YUV_SWP_SHFT\t\t\t4\n+#define IEP_SRC_YUV_SWP_MASK\t\t\t(3 << IEP_SRC_YUV_SWP_SHFT)\n+#define IEP_DST_FMT_SHFT\t\t\t8\n+#define IEP_DST_FMT_MASK\t\t\t(3 << IEP_DST_FMT_SHFT)\n+#define IEP_DST_RGB_SWP_SHFT\t\t\t10\n+#define IEP_DST_RGB_SWP_MASK\t\t\t(2 << IEP_DST_RGB_SWP_SHFT)\n+#define IEP_DST_YUV_SWP_SHFT\t\t\t12\n+#define IEP_DST_YUV_SWP_MASK\t\t\t(3 << IEP_DST_YUV_SWP_SHFT)\n+#define IEP_DTH_UP_EN\t\t\t\tBIT(14)\n+#define IEP_DTH_DWN_EN\t\t\t\tBIT(15)\n+#define IEP_YUV2RGB_COE_BT601_1\t\t\t(0 << 16)\n+#define IEP_YUV2RGB_COE_BT601_F\t\t\tBIT(16)\n+#define IEP_YUV2RGB_COE_BT709_1\t\t\t(2 << 16)\n+#define IEP_YUV2RGB_COE_BT709_F\t\t\t(3 << 16)\n+#define IEP_YUV2RGB_COE_MASK\t\t\t(3 << 16)\n+#define IEP_RGB2YUV_COE_BT601_1\t\t\t(0 << 18)\n+#define IEP_RGB2YUV_COE_BT601_F\t\t\tBIT(18)\n+#define IEP_RGB2YUV_COE_BT709_1\t\t\t(2 << 18)\n+#define IEP_RGB2YUV_COE_BT709_F\t\t\t(3 << 18)\n+#define IEP_RGB2YUV_COE_MASK\t\t\t(3 << 18)\n+#define IEP_YUV2RGB_EN\t\t\t\tBIT(20)\n+#define IEP_RGB2YUV_EN\t\t\t\tBIT(21)\n+#define IEP_YUV2RGB_CLIP_EN\t\t\tBIT(22)\n+#define IEP_RGB2YUV_CLIP_EN\t\t\tBIT(23)\n+#define IEP_GLB_ALPHA_SHFT\t\t\t24\n+#define IEP_GLB_ALPHA_MASK\t\t\t(0x7f << IEP_GLB_ALPHA_SHFT)\n+\n+#define IEP_STATUS\t\t\t0x008 /* Status register */\n+#define IEP_STATUS_YUV_DNS\t\t\tBIT(0)\n+#define IEP_STATUS_SCL\t\t\t\tBIT(1)\n+#define IEP_STATUS_DIL\t\t\t\tBIT(2)\n+#define IEP_STATUS_DDE\t\t\t\tBIT(3)\n+#define IEP_STATUS_DMA_WR_YUV\t\t\tBIT(4)\n+#define IEP_STATUS_DMA_RE_YUV\t\t\tBIT(5)\n+#define IEP_STATUS_DMA_WR_RGB\t\t\tBIT(6)\n+#define IEP_STATUS_DMA_RE_RGB\t\t\tBIT(7)\n+#define IEP_STATUS_VOP_DIRECT_PATH\t\tBIT(8)\n+#define IEP_STATUS_DMA_IA_WR_YUV\t\tBIT(16)\n+#define IEP_STATUS_DMA_IA_RE_YUV\t\tBIT(17)\n+#define IEP_STATUS_DMA_IA_WR_RGB\t\tBIT(18)\n+#define IEP_STATUS_DMA_IA_RE_RGB\t\tBIT(19)\n+\n+#define IEP_INT\t\t\t\t0x00c /* Interrupt register*/\n+#define IEP_INT_FRAME_DONE\t\t\tBIT(0) /* Frame process done interrupt */\n+#define IEP_INT_FRAME_DONE_EN\t\t\tBIT(8) /* Frame process done interrupt enable */\n+#define IEP_INT_FRAME_DONE_CLR\t\t\tBIT(16) /* Frame process done interrupt clear */\n+\n+#define IEP_FRM_START\t\t\t0x010 /* Frame start */\n+#define IEP_SRST\t\t\t0x014 /* Soft reset */\n+#define IEP_CONFIG_DONE\t\t\t0x018 /* Configuration done */\n+#define IEP_FRM_CNT\t\t\t0x01c /* Frame counter */\n+\n+#define IEP_VIR_IMG_WIDTH\t\t0x020 /* Image virtual width */\n+#define IEP_IMG_SCL_FCT\t\t\t0x024 /* Scaling factor */\n+#define IEP_SRC_IMG_SIZE\t\t0x028 /* src image width/height */\n+#define IEP_DST_IMG_SIZE\t\t0x02c /* dst image width/height */\n+#define IEP_DST_IMG_WIDTH_TILE0\t\t0x030 /* dst image tile0 width */\n+#define IEP_DST_IMG_WIDTH_TILE1\t\t0x034 /* dst image tile1 width */\n+#define IEP_DST_IMG_WIDTH_TILE2\t\t0x038 /* dst image tile2 width */\n+#define IEP_DST_IMG_WIDTH_TILE3\t\t0x03c /* dst image tile3 width */\n+\n+#define IEP_ENH_YUV_CNFG_0\t\t0x040 /* Brightness, contrast, saturation adjustment */\n+#define IEP_YUV_BRIGHTNESS_SHFT\t\t\t0\n+#define IEP_YUV_BRIGHTNESS_MASK\t\t\t(0x3f << IEP_YUV_BRIGHTNESS_SHFT)\n+#define IEP_YUV_CONTRAST_SHFT\t\t\t8\n+#define IEP_YUV_CONTRAST_MASK\t\t\t(0xff << IEP_YUV_CONTRAST_SHFT)\n+#define IEP_YUV_SATURATION_SHFT\t\t\t16\n+#define IEP_YUV_SATURATION_MASK\t\t\t(0x1ff << IEP_YUV_SATURATION_SHFT)\n+\n+#define IEP_ENH_YUV_CNFG_1\t\t0x044 /* Hue configuration */\n+#define IEP_YUV_COS_HUE_SHFT\t\t\t0\n+#define IEP_YUV_COS_HUE_MASK\t\t\t(0xff << IEP_YUV_COS_HUE_SHFT)\n+#define IEP_YUV_SIN_HUE_SHFT\t\t\t8\n+#define IEP_YUV_SIN_HUE_MASK\t\t\t(0xff << IEP_YUV_SIN_HUE_SHFT)\n+\n+#define IEP_ENH_YUV_CNFG_2\t\t0x048 /* Color bar configuration */\n+#define IEP_YUV_COLOR_BAR_Y_SHFT\t\t0\n+#define IEP_YUV_COLOR_BAR_Y_MASK\t\t(0xff << IEP_YUV_COLOR_BAR_Y_SHFT)\n+#define IEP_YUV_COLOR_BAR_U_SHFT\t\t8\n+#define IEP_YUV_COLOR_BAR_U_MASK\t\t(0xff << IEP_YUV_COLOR_BAR_U_SHFT)\n+#define IEP_YUV_COLOR_BAR_V_SHFT\t\t16\n+#define IEP_YUV_COLOR_BAR_V_MASK\t\t(0xff << IEP_YUV_COLOR_BAR_V_SHFT)\n+#define IEP_YUV_VIDEO_MODE_SHFT\t\t\t24\n+#define IEP_YUV_VIDEO_MODE_MASK\t\t\t(3 << IEP_YUV_VIDEO_MODE_SHFT)\n+\n+#define IEP_ENH_RGB_CNFG\t\t0x04c /* RGB enhancement configuration */\n+#define IEP_ENH_RGB_C_COE\t\t0x050 /* RGB color enhancement coefficient */\n+\n+#define IEP_RAW_CONFIG0\t\t\t0x058 /* Raw configuration register0 */\n+#define IEP_RAW_CONFIG1\t\t\t0x05c /* Raw configuration register1 */\n+#define IEP_RAW_VIR_IMG_WIDTH\t\t0x060 /* Raw image virtual width */\n+#define IEP_RAW_IMG_SCL_FCT\t\t0x064 /* Raw scaling factor */\n+#define IEP_RAW_SRC_IMG_SIZE\t\t0x068 /* Raw src image width/height  */\n+#define IEP_RAW_DST_IMG_SIZE\t\t0x06c /* Raw src image width/height  */\n+#define IEP_RAW_ENH_YUV_CNFG_0\t\t0x070 /* Raw brightness,contrast,saturation adjustment */\n+#define IEP_RAW_ENH_YUV_CNFG_1\t\t0x074 /* Raw hue configuration */\n+#define IEP_RAW_ENH_YUV_CNFG_2\t\t0x078 /* Raw color bar configuration */\n+#define IEP_RAW_ENH_RGB_CNFG\t\t0x07c /* Raw RGB enhancement configuration */\n+\n+#define IEP_SRC_ADDR_Y_RGB\t\t0x080 /* Start addr. of src image 0 (Y/RGB) */\n+#define IEP_SRC_ADDR_CBCR\t\t0x084 /* Start addr. of src image 0 (Cb/Cr) */\n+#define IEP_SRC_ADDR_CR\t\t\t0x088 /* Start addr. of src image 0 (Cr) */\n+#define IEP_SRC_ADDR_Y1\t\t\t0x08c /* Start addr. of src image 1 (Y) */\n+#define IEP_SRC_ADDR_CBCR1\t\t0x090 /* Start addr. of src image 1 (Cb/Cr) */\n+#define IEP_SRC_ADDR_CR1\t\t0x094 /* Start addr. of src image 1 (Cr) */\n+#define IEP_SRC_ADDR_Y_ITEMP\t\t0x098 /* Start addr. of src image(Y int part) */\n+#define IEP_SRC_ADDR_CBCR_ITEMP\t\t0x09c /* Start addr. of src image(CBCR int part) */\n+#define IEP_SRC_ADDR_CR_ITEMP\t\t0x0a0 /* Start addr. of src image(CR int part) */\n+#define IEP_SRC_ADDR_Y_FTEMP\t\t0x0a4 /* Start addr. of src image(Y frac part) */\n+#define IEP_SRC_ADDR_CBCR_FTEMP\t\t0x0a8 /* Start addr. of src image(CBCR frac part) */\n+#define IEP_SRC_ADDR_CR_FTEMP\t\t0x0ac /* Start addr. of src image(CR frac part) */\n+\n+#define IEP_DST_ADDR_Y_RGB\t\t0x0b0 /* Start addr. of dst image 0 (Y/RGB) */\n+#define IEP_DST_ADDR_CBCR\t\t0x0b4 /* Start addr. of dst image 0 (Cb/Cr) */\n+#define IEP_DST_ADDR_CR\t\t\t0x0b8 /* Start addr. of dst image 0 (Cr) */\n+#define IEP_DST_ADDR_Y1\t\t\t0x0bc /* Start addr. of dst image 1 (Y) */\n+#define IEP_DST_ADDR_CBCR1\t\t0x0c0 /* Start addr. of dst image 1 (Cb/Cr) */\n+#define IEP_DST_ADDR_CR1\t\t0x0c4 /* Start addr. of dst image 1 (Cr) */\n+#define IEP_DST_ADDR_Y_ITEMP\t\t0x0c8 /* Start addr. of dst image(Y int part) */\n+#define IEP_DST_ADDR_CBCR_ITEMP\t\t0x0cc /* Start addr. of dst image(CBCR int part)*/\n+#define IEP_DST_ADDR_CR_ITEMP\t\t0x0d0 /* Start addr. of dst image(CR int part) */\n+#define IEP_DST_ADDR_Y_FTEMP\t\t0x0d4 /* Start addr. of dst image(Y frac part) */\n+#define IEP_DST_ADDR_CBCR_FTEMP\t\t0x0d8 /* Start addr. of dst image(CBCR frac part) */\n+#define IEP_DST_ADDR_CR_FTEMP\t\t0x0dc /* Start addr. of dst image(CR frac part)*/\n+\n+#define IEP_DEIN_MTN_TAB0\t\t0x0e0 /* Deinterlace motion table0 */\n+#define IEP_DEIN_MTN_TAB1\t\t0x0e4 /* Deinterlace motion table1 */\n+#define IEP_DEIN_MTN_TAB2\t\t0x0e8 /* Deinterlace motion table2 */\n+#define IEP_DEIN_MTN_TAB3\t\t0x0ec /* Deinterlace motion table3 */\n+#define IEP_DEIN_MTN_TAB4\t\t0x0f0 /* Deinterlace motion table4 */\n+#define IEP_DEIN_MTN_TAB5\t\t0x0f4 /* Deinterlace motion table5 */\n+#define IEP_DEIN_MTN_TAB6\t\t0x0f8 /* Deinterlace motion table6 */\n+#define IEP_DEIN_MTN_TAB7\t\t0x0fc /* Deinterlace motion table7 */\n+\n+#define IEP_ENH_CG_TAB\t\t\t0x100 /* Contrast and gamma enhancement table */\n+#define IEP_ENH_DDE_COE0\t\t0x400 /* Denoise,detail and edge enhancement coefficient */\n+#define IEP_ENH_DDE_COE1\t\t0x500 /* Denoise,detail and edge enhancement coefficient1 */\n+\n+#define IEP_INT_MASK\t\t\t(IEP_INT_FRAME_DONE)\n+\n+/* IEP colorformats */\n+#define IEP_COLOR_FMT_XRGB\t\t0U\n+#define IEP_COLOR_FMT_RGB565\t\t1U\n+#define IEP_COLOR_FMT_YUV422\t\t2U\n+#define IEP_COLOR_FMT_YUV420\t\t3U\n+\n+/* IEP YUV color swaps */\n+#define IEP_YUV_SWP_SP_UV\t\t0U\n+#define IEP_YUV_SWP_SP_VU\t\t1U\n+#define IEP_YUV_SWP_P\t\t\t2U\n+\n+/* IEP XRGB color swaps */\n+#define XRGB_SWP_XRGB\t\t\t0U\n+#define XRGB_SWP_XBGR\t\t\t1U\n+#define XRGB_SWP_BGRX\t\t\t2U\n+\n+/* IEP RGB565 color swaps */\n+#define RGB565_SWP_RGB\t\t\t0U\n+#define RGB565_SWP_BGR\t\t\t1U\n+\n+#define FMT_IS_YUV(fmt) (fmt == IEP_COLOR_FMT_XRGB || fmt == IEP_COLOR_FMT_RGB565 ? 0 : 1)\n+\n+#define IEP_IMG_SIZE(w, h) (((w - 1) & 0x1fff) << 0 | \\\n+\t\t\t    ((h - 1) & 0x1fff) << 16)\n+\n+#define IEP_VIR_WIDTH(src_w, dst_w) (((src_w / 4) & 0x1fff) << 0 | \\\n+\t\t\t\t     ((dst_w / 4) & 0x1fff) << 16)\n+\n+#define IEP_Y_STRIDE(w, h) (w * h)\n+#define IEP_UV_STRIDE(w, h, fac) (w * h + w * h / fac)\n+\n+#define IEP_SRC_FMT_SWP_MASK(f) (FMT_IS_YUV(f) ? IEP_SRC_YUV_SWP_MASK : IEP_SRC_RGB_SWP_MASK)\n+#define IEP_DST_FMT_SWP_MASK(f) (FMT_IS_YUV(f) ? IEP_DST_YUV_SWP_MASK : IEP_DST_RGB_SWP_MASK)\n+\n+#define IEP_SRC_FMT(f, swp) (f << IEP_SRC_FMT_SHFT | \\\n+\t\t\t     (swp << (FMT_IS_YUV(f) ? IEP_SRC_YUV_SWP_SHFT : IEP_SRC_RGB_SWP_SHFT)))\n+#define IEP_DST_FMT(f, swp) (f << IEP_DST_FMT_SHFT | \\\n+\t\t\t     (swp << (FMT_IS_YUV(f) ? IEP_DST_YUV_SWP_SHFT : IEP_DST_RGB_SWP_SHFT)))\n+\n+/* IEP DEINTERLACE MODES */\n+#define IEP_DEIN_MODE_YUV\t\t0U\n+#define IEP_DEIN_MODE_I4O2\t\t1U\n+#define IEP_DEIN_MODE_I4O1B\t\t2U\n+#define IEP_DEIN_MODE_I4O1T\t\t3U\n+#define IEP_DEIN_MODE_I2O1B\t\t4U\n+#define IEP_DEIN_MODE_I2O1T\t\t5U\n+#define IEP_DEIN_MODE_BYPASS\t\t6U\n+\n+#define IEP_DEIN_IN_FIELDS_2\t\t2U\n+#define IEP_DEIN_IN_FIELDS_4\t\t4U\n+\n+#define IEP_DEIN_OUT_FRAMES_1\t\t1U\n+#define IEP_DEIN_OUT_FRAMES_2\t\t2U\n+\n+/* values taken from BSP driver */\n+static const u32 default_dein_motion_tbl[][2] = {\n+\t{ IEP_DEIN_MTN_TAB0, 0x40404040 },\n+\t{ IEP_DEIN_MTN_TAB1, 0x3c3e3f3f },\n+\t{ IEP_DEIN_MTN_TAB2, 0x3336393b },\n+\t{ IEP_DEIN_MTN_TAB3, 0x272a2d31 },\n+\t{ IEP_DEIN_MTN_TAB4, 0x181c2023 },\n+\t{ IEP_DEIN_MTN_TAB5, 0x0c0e1215 },\n+\t{ IEP_DEIN_MTN_TAB6, 0x03040609 },\n+\t{ IEP_DEIN_MTN_TAB7, 0x00000001 },\n+\n+};\n+\n+#define IEP_DEIN_IN_IMG0_Y(bff) (bff ? IEP_SRC_ADDR_Y_RGB : IEP_SRC_ADDR_Y1)\n+#define IEP_DEIN_IN_IMG0_CBCR(bff) (bff ? IEP_SRC_ADDR_CBCR : IEP_SRC_ADDR_CBCR1)\n+#define IEP_DEIN_IN_IMG0_CR(bff) (bff ? IEP_SRC_ADDR_CR : IEP_SRC_ADDR_CR1)\n+#define IEP_DEIN_IN_IMG1_Y(bff) (IEP_DEIN_IN_IMG0_Y(!bff))\n+#define IEP_DEIN_IN_IMG1_CBCR(bff) (IEP_DEIN_IN_IMG0_CBCR(!bff))\n+#define IEP_DEIN_IN_IMG1_CR(bff) (IEP_DEIN_IN_IMG0_CR(!bff))\n+\n+#define IEP_DEIN_OUT_IMG0_Y(bff) (bff ? IEP_DST_ADDR_Y1 : IEP_DST_ADDR_Y_RGB)\n+#define IEP_DEIN_OUT_IMG0_CBCR(bff) (bff ? IEP_DST_ADDR_CBCR1 : IEP_DST_ADDR_CBCR)\n+#define IEP_DEIN_OUT_IMG0_CR(bff) (bff ? IEP_DST_ADDR_CR1 : IEP_DST_ADDR_CR)\n+#define IEP_DEIN_OUT_IMG1_Y(bff) (IEP_DEIN_OUT_IMG0_Y(!bff))\n+#define IEP_DEIN_OUT_IMG1_CBCR(bff) (IEP_DEIN_OUT_IMG0_CBCR(!bff))\n+#define IEP_DEIN_OUT_IMG1_CR(bff) (IEP_DEIN_OUT_IMG0_CR(!bff))\n+\n+#define IEP_DEIN_MODE(m) (m << IEP_DEIN_MODE_SHFT)\n+\n+#define IEP_DEIN_IN_MODE_FIELDS(m) ((m == IEP_DEIN_MODE_I4O1T || m == IEP_DEIN_MODE_I4O1B \\\n+\t\t\t\t     || m == IEP_DEIN_MODE_I4O2) \\\n+\t\t\t\t    ? IEP_DEIN_IN_FIELDS_4 : IEP_DEIN_IN_FIELDS_2)\n+\n+#define IEP_DEIN_OUT_MODE_FRAMES(m) (m == IEP_DEIN_MODE_I4O2 \\\n+\t\t\t\t     ? IEP_DEIN_OUT_FRAMES_2 : IEP_DEIN_OUT_FRAMES_1)\n+\n+#define IEP_DEIN_OUT_MODE_1FRM_TOP_FIELD(m) (m == IEP_DEIN_MODE_I4O1T || IEP_DEIN_MODE_I2O1T \\\n+\t\t\t\t\t      ? 1 : 0)\n+\n+#define IEP_DEIN_EDGE_INTPOL_RADIUS(r) (r << IEP_DEIN_EDGE_INTPOL_RADIUS_SHFT)\n+\n+#define IEP_DEIN_HIGH_FREQ(f) (f << IEP_DEIN_HIGH_FREQ_SHFT)\n+\n+/* YUV Enhance video modes */\n+#define VIDEO_MODE_BLACK_SCREEN\t\t0U\n+#define VIDEO_MODE_BLUE_SCREEN\t\t1U\n+#define VIDEO_MODE_COLOR_BARS\t\t2U\n+#define VIDEO_MODE_NORMAL_VIDEO\t\t3U\n+\n+#define YUV_VIDEO_MODE(m) ((m << IEP_YUV_VIDEO_MODE_SHFT) & IEP_YUV_VIDEO_MODE_MASK)\n+#define YUV_BRIGHTNESS(v) ((v << IEP_YUV_BRIGHTNESS_SHFT) & IEP_YUV_BRIGHTNESS_MASK)\n+#define YUV_CONTRAST(v) ((v << IEP_YUV_CONTRAST_SHFT) & IEP_YUV_CONTRAST_MASK)\n+#define YUV_SATURATION(v) ((v << IEP_YUV_SATURATION_SHFT) & IEP_YUV_SATURATION_MASK)\n+#define YUV_COS_HUE(v) ((v << IEP_YUV_COS_HUE_SHFT) & IEP_YUV_COS_HUE_MASK)\n+#define YUV_SIN_HUE(v) ((v << IEP_YUV_SIN_HUE_SHFT) & IEP_YUV_SIN_HUE_MASK)\n+\n+#endif\ndiff --git a/drivers/media/platform/rockchip/iep/iep.c b/drivers/media/platform/rockchip/iep/iep.c\nnew file mode 100644\nindex 000000000000..f4b9320733be\n--- /dev/null\n+++ b/drivers/media/platform/rockchip/iep/iep.c\n@@ -0,0 +1,1089 @@\n+// SPDX-License-Identifier: GPL-2.0-only\n+/*\n+ * Rockchip Image Enhancement Processor (IEP) driver\n+ *\n+ * Copyright (C) 2020 Alex Bee <knaerzche@gmail.com>\n+ *\n+ * Based on Allwinner sun8i deinterlacer with scaler driver\n+ *  Copyright (C) 2019 Jernej Skrabec <jernej.skrabec@siol.net>\n+ *\n+ */\n+\n+#include <linux/clk.h>\n+#include <linux/delay.h>\n+#include <linux/interrupt.h>\n+#include <linux/io.h>\n+#include <linux/iopoll.h>\n+#include <linux/module.h>\n+#include <linux/of.h>\n+#include <linux/platform_device.h>\n+#include <linux/pm_runtime.h>\n+\n+#include <media/v4l2-device.h>\n+#include <media/v4l2-ctrls.h>\n+#include <media/v4l2-ioctl.h>\n+#include <media/v4l2-mem2mem.h>\n+#include <media/videobuf2-v4l2.h>\n+#include <media/videobuf2-core.h>\n+#include <media/videobuf2-dma-contig.h>\n+#include <linux/videodev2.h>\n+\n+#include \"iep-regs.h\"\n+#include \"iep.h\"\n+\n+static struct iep_fmt formats[] = {\n+\t{\n+\t\t.fourcc = V4L2_PIX_FMT_NV12,\n+\t\t.color_swap = IEP_YUV_SWP_SP_UV,\n+\t\t.hw_format = IEP_COLOR_FMT_YUV420,\n+\t\t.depth = 12,\n+\t\t.uv_factor = 4,\n+\t},\n+\t{\n+\t\t.fourcc = V4L2_PIX_FMT_NV21,\n+\t\t.color_swap = IEP_YUV_SWP_SP_VU,\n+\t\t.hw_format = IEP_COLOR_FMT_YUV420,\n+\t\t.depth = 12,\n+\t\t.uv_factor = 4,\n+\t},\n+\t{\n+\t\t.fourcc = V4L2_PIX_FMT_NV16,\n+\t\t.color_swap = IEP_YUV_SWP_SP_UV,\n+\t\t.hw_format = IEP_COLOR_FMT_YUV422,\n+\t\t.depth = 16,\n+\t\t.uv_factor = 2,\n+\t},\n+\t{\n+\t\t.fourcc = V4L2_PIX_FMT_NV61,\n+\t\t.color_swap = IEP_YUV_SWP_SP_VU,\n+\t\t.hw_format = IEP_COLOR_FMT_YUV422,\n+\t\t.depth = 16,\n+\t\t.uv_factor = 2,\n+\t},\n+\t{\n+\t\t.fourcc = V4L2_PIX_FMT_YUV420,\n+\t\t.color_swap = IEP_YUV_SWP_P,\n+\t\t.hw_format = IEP_COLOR_FMT_YUV420,\n+\t\t.depth = 12,\n+\t\t.uv_factor = 4,\n+\t},\n+\t{\n+\t\t.fourcc = V4L2_PIX_FMT_YUV422P,\n+\t\t.color_swap = IEP_YUV_SWP_P,\n+\t\t.hw_format = IEP_COLOR_FMT_YUV422,\n+\t\t.depth = 16,\n+\t\t.uv_factor = 2,\n+\t},\n+};\n+\n+static struct iep_fmt *iep_fmt_find(struct v4l2_pix_format *pix_fmt)\n+{\n+\tunsigned int i;\n+\n+\tfor (i = 0; i < ARRAY_SIZE(formats); i++) {\n+\t\tif (formats[i].fourcc == pix_fmt->pixelformat)\n+\t\t\treturn &formats[i];\n+\t}\n+\n+\treturn NULL;\n+}\n+\n+static bool iep_check_pix_format(u32 pixelformat)\n+{\n+\tunsigned int i;\n+\n+\tfor (i = 0; i < ARRAY_SIZE(formats); i++)\n+\t\tif (formats[i].fourcc == pixelformat)\n+\t\t\treturn true;\n+\n+\treturn false;\n+}\n+\n+static struct vb2_v4l2_buffer *iep_m2m_next_dst_buf(struct iep_ctx *ctx)\n+{\n+\tstruct vb2_v4l2_buffer *dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);\n+\n+\t/* application has set a dst sequence: take it as start point */\n+\tif (ctx->dst_sequence == 0 && dst_buf->sequence > 0)\n+\t\tctx->dst_sequence = dst_buf->sequence;\n+\n+\tdst_buf->sequence = ctx->dst_sequence++;\n+\n+\treturn dst_buf;\n+}\n+\n+static void iep_m2m_dst_bufs_done(struct iep_ctx *ctx, enum vb2_buffer_state state)\n+{\n+\tif (ctx->dst0_buf) {\n+\t\tv4l2_m2m_buf_done(ctx->dst0_buf, state);\n+\t\tctx->dst_buffs_done++;\n+\t\tctx->dst0_buf = NULL;\n+\t}\n+\n+\tif (ctx->dst1_buf) {\n+\t\tv4l2_m2m_buf_done(ctx->dst1_buf, state);\n+\t\tctx->dst_buffs_done++;\n+\t\tctx->dst1_buf = NULL;\n+\t}\n+}\n+\n+static void iep_setup_formats(struct iep_ctx *ctx)\n+{\n+\t/* setup src dimensions */\n+\tiep_write(ctx->iep, IEP_SRC_IMG_SIZE,\n+\t\t  IEP_IMG_SIZE(ctx->src_fmt.pix.width, ctx->src_fmt.pix.height));\n+\n+\t/* setup dst dimensions */\n+\tiep_write(ctx->iep, IEP_DST_IMG_SIZE,\n+\t\t  IEP_IMG_SIZE(ctx->dst_fmt.pix.width, ctx->dst_fmt.pix.height));\n+\n+\t/* setup virtual width */\n+\tiep_write(ctx->iep, IEP_VIR_IMG_WIDTH,\n+\t\t  IEP_VIR_WIDTH(ctx->src_fmt.pix.width, ctx->dst_fmt.pix.width));\n+\n+\t/* setup src format */\n+\tiep_shadow_mod(ctx->iep, IEP_CONFIG1, IEP_RAW_CONFIG1,\n+\t\t       IEP_SRC_FMT_MASK | IEP_SRC_FMT_SWP_MASK(ctx->src_fmt.hw_fmt->hw_format),\n+\t\t       IEP_SRC_FMT(ctx->src_fmt.hw_fmt->hw_format,\n+\t\t\t\t   ctx->src_fmt.hw_fmt->color_swap));\n+\t/* setup dst format */\n+\tiep_shadow_mod(ctx->iep, IEP_CONFIG1, IEP_RAW_CONFIG1,\n+\t\t       IEP_DST_FMT_MASK | IEP_DST_FMT_SWP_MASK(ctx->dst_fmt.hw_fmt->hw_format),\n+\t\t       IEP_DST_FMT(ctx->dst_fmt.hw_fmt->hw_format,\n+\t\t\t\t   ctx->dst_fmt.hw_fmt->color_swap));\n+\n+\tctx->fmt_changed = false;\n+}\n+\n+static void iep_dein_init(struct rockchip_iep *iep)\n+{\n+\tunsigned int i;\n+\n+\t/* values taken from BSP driver */\n+\tiep_shadow_mod(iep, IEP_CONFIG0, IEP_RAW_CONFIG0,\n+\t\t       (IEP_DEIN_EDGE_INTPOL_SMTH_EN |\n+\t\t       IEP_DEIN_EDGE_INTPOL_RADIUS_MASK |\n+\t\t       IEP_DEIN_HIGH_FREQ_EN |\n+\t\t       IEP_DEIN_HIGH_FREQ_MASK),\n+\t\t       (IEP_DEIN_EDGE_INTPOL_SMTH_EN |\n+\t\t       IEP_DEIN_EDGE_INTPOL_RADIUS(3) |\n+\t\t       IEP_DEIN_HIGH_FREQ_EN |\n+\t\t       IEP_DEIN_HIGH_FREQ(64)));\n+\n+\tfor (i = 0; i < ARRAY_SIZE(default_dein_motion_tbl); i++)\n+\t\tiep_write(iep, default_dein_motion_tbl[i][0],\n+\t\t\t  default_dein_motion_tbl[i][1]);\n+}\n+\n+static void iep_init(struct rockchip_iep *iep)\n+{\n+\tiep_write(iep, IEP_CONFIG0,\n+\t\t  IEP_DEIN_MODE(IEP_DEIN_MODE_BYPASS) // |\n+\t\t  //IEP_YUV_ENHNC_EN\n+\t);\n+\n+\t/* TODO: B/S/C/H works\n+\t *  only in 1-frame-out modes\n+\tiep_write(iep, IEP_ENH_YUV_CNFG_0,\n+\t\t  YUV_BRIGHTNESS(0) |\n+\t\t  YUV_CONTRAST(128) |\n+\t\t  YUV_SATURATION(128));\n+\n+\tiep_write(iep, IEP_ENH_YUV_CNFG_1,\n+\t\t  YUV_COS_HUE(255) |\n+\t\t  YUV_SIN_HUE(255));\n+\n+\tiep_write(iep, IEP_ENH_YUV_CNFG_2,\n+\t\t  YUV_VIDEO_MODE(VIDEO_MODE_NORMAL_VIDEO));\n+\n+\t*/\n+\n+\t/* reset frame counter */\n+\tiep_write(iep, IEP_FRM_CNT, 0);\n+}\n+\n+static void iep_device_run(void *priv)\n+{\n+\tstruct iep_ctx *ctx = priv;\n+\tstruct rockchip_iep *iep = ctx->iep;\n+\tstruct vb2_v4l2_buffer *src, *dst;\n+\tunsigned int dein_mode;\n+\tdma_addr_t addr;\n+\n+\tif (ctx->fmt_changed)\n+\t\tiep_setup_formats(ctx);\n+\n+\tif (ctx->prev_src_buf)\n+\t\tdein_mode = IEP_DEIN_MODE_I4O2;\n+\telse\n+\t\tdein_mode = ctx->field_bff ? IEP_DEIN_MODE_I2O1B : IEP_DEIN_MODE_I2O1T;\n+\n+\tiep_shadow_mod(iep, IEP_CONFIG0, IEP_RAW_CONFIG0,\n+\t\t       IEP_DEIN_MODE_MASK, IEP_DEIN_MODE(dein_mode));\n+\n+\t/* sync RAW_xxx registers with actual used */\n+\tiep_write(iep, IEP_CONFIG_DONE, 1);\n+\n+\t/* setup src buff(s)/addresses */\n+\tsrc = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);\n+\taddr = vb2_dma_contig_plane_dma_addr(&src->vb2_buf, 0);\n+\n+\tiep_write(iep, IEP_DEIN_IN_IMG0_Y(ctx->field_bff), addr);\n+\n+\tiep_write(iep, IEP_DEIN_IN_IMG0_CBCR(ctx->field_bff),\n+\t\t  addr + ctx->src_fmt.y_stride);\n+\n+\tiep_write(iep, IEP_DEIN_IN_IMG0_CR(ctx->field_bff),\n+\t\t  addr + ctx->src_fmt.uv_stride);\n+\n+\tif (IEP_DEIN_IN_MODE_FIELDS(dein_mode) == IEP_DEIN_IN_FIELDS_4)\n+\t\taddr = vb2_dma_contig_plane_dma_addr(&ctx->prev_src_buf->vb2_buf, 0);\n+\n+\tiep_write(iep, IEP_DEIN_IN_IMG1_Y(ctx->field_bff), addr);\n+\n+\tiep_write(iep, IEP_DEIN_IN_IMG1_CBCR(ctx->field_bff),\n+\t\t  addr + ctx->src_fmt.y_stride);\n+\n+\tiep_write(iep, IEP_DEIN_IN_IMG1_CR(ctx->field_bff),\n+\t\t  addr + ctx->src_fmt.uv_stride);\n+\n+\t/* setup dst buff(s)/addresses */\n+\tdst = iep_m2m_next_dst_buf(ctx);\n+\taddr = vb2_dma_contig_plane_dma_addr(&dst->vb2_buf, 0);\n+\n+\tif (IEP_DEIN_OUT_MODE_FRAMES(dein_mode) == IEP_DEIN_OUT_FRAMES_2) {\n+\t\tv4l2_m2m_buf_copy_metadata(ctx->prev_src_buf, dst, true);\n+\n+\t\tiep_write(iep, IEP_DEIN_OUT_IMG0_Y(ctx->field_bff), addr);\n+\n+\t\tiep_write(iep, IEP_DEIN_OUT_IMG0_CBCR(ctx->field_bff),\n+\t\t\t  addr + ctx->dst_fmt.y_stride);\n+\n+\t\tiep_write(iep, IEP_DEIN_OUT_IMG0_CR(ctx->field_bff),\n+\t\t\t  addr + ctx->dst_fmt.uv_stride);\n+\n+\t\tctx->dst0_buf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);\n+\n+\t\tdst = iep_m2m_next_dst_buf(ctx);\n+\t\taddr = vb2_dma_contig_plane_dma_addr(&dst->vb2_buf, 0);\n+\t}\n+\n+\tv4l2_m2m_buf_copy_metadata(src, dst, true);\n+\n+\tiep_write(iep, IEP_DEIN_OUT_IMG1_Y(ctx->field_bff), addr);\n+\n+\tiep_write(iep, IEP_DEIN_OUT_IMG1_CBCR(ctx->field_bff),\n+\t\t  addr + ctx->dst_fmt.y_stride);\n+\n+\tiep_write(iep, IEP_DEIN_OUT_IMG1_CR(ctx->field_bff),\n+\t\t  addr + ctx->dst_fmt.uv_stride);\n+\n+\tctx->dst1_buf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);\n+\n+\tiep_mod(ctx->iep, IEP_INT, IEP_INT_FRAME_DONE_EN,\n+\t\tIEP_INT_FRAME_DONE_EN);\n+\n+\t/* start HW */\n+\tiep_write(iep, IEP_FRM_START, 1);\n+}\n+\n+static int iep_job_ready(void *priv)\n+{\n+\tstruct iep_ctx *ctx = priv;\n+\n+\treturn v4l2_m2m_num_dst_bufs_ready(ctx->fh.m2m_ctx) >= 2 &&\n+\t       v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx) >= 1;\n+}\n+\n+static void iep_job_abort(void *priv)\n+{\n+\tstruct iep_ctx *ctx = priv;\n+\n+\t/* Will cancel the transaction in the next interrupt handler */\n+\tctx->job_abort = true;\n+}\n+\n+static const struct v4l2_m2m_ops iep_m2m_ops = {\n+\t.device_run\t= iep_device_run,\n+\t.job_ready\t= iep_job_ready,\n+\t.job_abort\t= iep_job_abort,\n+};\n+\n+static int iep_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers,\n+\t\t\t   unsigned int *nplanes, unsigned int sizes[],\n+\t\t\t\t   struct device *alloc_devs[])\n+{\n+\tstruct iep_ctx *ctx = vb2_get_drv_priv(vq);\n+\tstruct v4l2_pix_format *pix_fmt;\n+\n+\tif (V4L2_TYPE_IS_OUTPUT(vq->type))\n+\t\tpix_fmt = &ctx->src_fmt.pix;\n+\telse\n+\t\tpix_fmt = &ctx->dst_fmt.pix;\n+\n+\tif (*nplanes) {\n+\t\tif (sizes[0] < pix_fmt->sizeimage)\n+\t\t\treturn -EINVAL;\n+\t} else {\n+\t\tsizes[0] = pix_fmt->sizeimage;\n+\t\t*nplanes = 1;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int iep_buf_prepare(struct vb2_buffer *vb)\n+{\n+\tstruct vb2_queue *vq = vb->vb2_queue;\n+\tstruct iep_ctx *ctx = vb2_get_drv_priv(vq);\n+\tstruct v4l2_pix_format *pix_fmt;\n+\n+\tif (V4L2_TYPE_IS_OUTPUT(vq->type))\n+\t\tpix_fmt = &ctx->src_fmt.pix;\n+\telse\n+\t\tpix_fmt = &ctx->dst_fmt.pix;\n+\n+\tif (vb2_plane_size(vb, 0) < pix_fmt->sizeimage)\n+\t\treturn -EINVAL;\n+\n+\t/* set bytesused for capture buffers */\n+\tif (!V4L2_TYPE_IS_OUTPUT(vq->type))\n+\t\tvb2_set_plane_payload(vb, 0, pix_fmt->sizeimage);\n+\n+\treturn 0;\n+}\n+\n+static void iep_buf_queue(struct vb2_buffer *vb)\n+{\n+\tstruct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);\n+\tstruct iep_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);\n+\n+\tv4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf);\n+}\n+\n+static void iep_queue_cleanup(struct vb2_queue *vq, u32 state)\n+{\n+\tstruct iep_ctx *ctx = vb2_get_drv_priv(vq);\n+\tstruct vb2_v4l2_buffer *vbuf;\n+\n+\tdo {\n+\t\tif (V4L2_TYPE_IS_OUTPUT(vq->type))\n+\t\t\tvbuf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx);\n+\t\telse\n+\t\t\tvbuf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);\n+\n+\t\tif (vbuf)\n+\t\t\tv4l2_m2m_buf_done(vbuf, state);\n+\t} while (vbuf);\n+\n+\tif (V4L2_TYPE_IS_OUTPUT(vq->type) && ctx->prev_src_buf)\n+\t\tv4l2_m2m_buf_done(ctx->prev_src_buf, state);\n+\telse\n+\t\tiep_m2m_dst_bufs_done(ctx, state);\n+}\n+\n+static int iep_start_streaming(struct vb2_queue *vq, unsigned int count)\n+{\n+\tstruct iep_ctx *ctx = vb2_get_drv_priv(vq);\n+\tstruct device *dev = ctx->iep->dev;\n+\tint ret;\n+\n+\tif (V4L2_TYPE_IS_OUTPUT(vq->type)) {\n+\t\tret = pm_runtime_get_sync(dev);\n+\t\tif (ret < 0) {\n+\t\t\tdev_err(dev, \"Failed to enable module\\n\");\n+\t\t\tgoto err_runtime_get;\n+\t\t}\n+\n+\t\tctx->field_order_bff =\n+\t\t\tctx->src_fmt.pix.field == V4L2_FIELD_INTERLACED_BT;\n+\t\tctx->field_bff = ctx->field_order_bff;\n+\n+\t\tctx->src_sequence = 0;\n+\t\tctx->dst_sequence = 0;\n+\n+\t\tctx->prev_src_buf = NULL;\n+\n+\t\tctx->dst0_buf = NULL;\n+\t\tctx->dst1_buf = NULL;\n+\t\tctx->dst_buffs_done = 0;\n+\n+\t\tctx->job_abort = false;\n+\n+\t\tiep_init(ctx->iep);\n+\t\t//if (ctx->src_fmt.pix.field != ctx->dst_fmt.pix.field)\n+\t\tiep_dein_init(ctx->iep);\n+\t}\n+\n+\treturn 0;\n+\n+err_runtime_get:\n+\tiep_queue_cleanup(vq, VB2_BUF_STATE_QUEUED);\n+\n+\treturn ret;\n+}\n+\n+static void iep_stop_streaming(struct vb2_queue *vq)\n+{\n+\tstruct iep_ctx *ctx = vb2_get_drv_priv(vq);\n+\n+\tif (V4L2_TYPE_IS_OUTPUT(vq->type)) {\n+\t\tpm_runtime_mark_last_busy(ctx->iep->dev);\n+\t\tpm_runtime_put_autosuspend(ctx->iep->dev);\n+\t}\n+\n+\tiep_queue_cleanup(vq, VB2_BUF_STATE_ERROR);\n+}\n+\n+static const struct vb2_ops iep_qops = {\n+\t.queue_setup\t\t= iep_queue_setup,\n+\t.buf_prepare\t\t= iep_buf_prepare,\n+\t.buf_queue\t\t= iep_buf_queue,\n+\t.start_streaming\t= iep_start_streaming,\n+\t.stop_streaming\t\t= iep_stop_streaming,\n+\t.wait_prepare\t\t= vb2_ops_wait_prepare,\n+\t.wait_finish\t\t= vb2_ops_wait_finish,\n+};\n+\n+static int iep_queue_init(void *priv, struct vb2_queue *src_vq,\n+\t\t\t  struct vb2_queue *dst_vq)\n+{\n+\tstruct iep_ctx *ctx = priv;\n+\tint ret;\n+\n+\tsrc_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;\n+\tsrc_vq->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES |\n+\t\t\t    DMA_ATTR_NO_KERNEL_MAPPING;\n+\tsrc_vq->io_modes = VB2_MMAP | VB2_DMABUF;\n+\tsrc_vq->drv_priv = ctx;\n+\tsrc_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);\n+\tsrc_vq->min_buffers_needed = 1;\n+\tsrc_vq->ops = &iep_qops;\n+\tsrc_vq->mem_ops = &vb2_dma_contig_memops;\n+\tsrc_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;\n+\tsrc_vq->lock = &ctx->iep->mutex;\n+\tsrc_vq->dev = ctx->iep->v4l2_dev.dev;\n+\n+\tret = vb2_queue_init(src_vq);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tdst_vq->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES |\n+\t\t\t    DMA_ATTR_NO_KERNEL_MAPPING;\n+\tdst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;\n+\tdst_vq->io_modes = VB2_MMAP | VB2_DMABUF;\n+\tdst_vq->drv_priv = ctx;\n+\tdst_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);\n+\tdst_vq->min_buffers_needed = 2;\n+\tdst_vq->ops = &iep_qops;\n+\tdst_vq->mem_ops = &vb2_dma_contig_memops;\n+\tdst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;\n+\tdst_vq->lock = &ctx->iep->mutex;\n+\tdst_vq->dev = ctx->iep->v4l2_dev.dev;\n+\n+\tret = vb2_queue_init(dst_vq);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\treturn 0;\n+}\n+\n+static void iep_prepare_format(struct v4l2_pix_format *pix_fmt)\n+{\n+\tunsigned int height = pix_fmt->height;\n+\tunsigned int width = pix_fmt->width;\n+\tunsigned int sizeimage, bytesperline;\n+\n+\tstruct iep_fmt *hw_fmt = iep_fmt_find(pix_fmt);\n+\n+\tif (!hw_fmt) {\n+\t\thw_fmt = &formats[0];\n+\t\tpix_fmt->pixelformat = hw_fmt->fourcc;\n+\t}\n+\n+\twidth = ALIGN(clamp(width, IEP_MIN_WIDTH,\n+\t\t\t    IEP_MAX_WIDTH), 16);\n+\theight = ALIGN(clamp(height, IEP_MIN_HEIGHT,\n+\t\t\t     IEP_MAX_HEIGHT), 16);\n+\n+\tbytesperline = FMT_IS_YUV(hw_fmt->hw_format)\n+\t\t       ? width : (width * hw_fmt->depth) >> 3;\n+\n+\tsizeimage = height * (width * hw_fmt->depth) >> 3;\n+\n+\tpix_fmt->width = width;\n+\tpix_fmt->height = height;\n+\tpix_fmt->bytesperline = bytesperline;\n+\tpix_fmt->sizeimage = sizeimage;\n+}\n+\n+static int iep_open(struct file *file)\n+{\n+\tstruct rockchip_iep *iep = video_drvdata(file);\n+\tstruct iep_ctx *ctx = NULL;\n+\n+\tint ret;\n+\n+\tif (mutex_lock_interruptible(&iep->mutex))\n+\t\treturn -ERESTARTSYS;\n+\n+\tctx = kzalloc(sizeof(*ctx), GFP_KERNEL);\n+\tif (!ctx) {\n+\t\tmutex_unlock(&iep->mutex);\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\t/* default output format */\n+\tctx->src_fmt.pix.pixelformat = formats[0].fourcc;\n+\tctx->src_fmt.pix.field = V4L2_FIELD_INTERLACED;\n+\tctx->src_fmt.pix.width = IEP_DEFAULT_WIDTH;\n+\tctx->src_fmt.pix.height = IEP_DEFAULT_HEIGHT;\n+\tiep_prepare_format(&ctx->src_fmt.pix);\n+\tctx->src_fmt.hw_fmt = &formats[0];\n+\tctx->dst_fmt.y_stride = IEP_Y_STRIDE(ctx->src_fmt.pix.width, ctx->src_fmt.pix.height);\n+\tctx->dst_fmt.uv_stride = IEP_UV_STRIDE(ctx->src_fmt.pix.width, ctx->src_fmt.pix.height,\n+\t\t\t\t\t       ctx->src_fmt.hw_fmt->uv_factor);\n+\n+\t/* default capture format */\n+\tctx->dst_fmt.pix.pixelformat = formats[0].fourcc;\n+\tctx->dst_fmt.pix.field = V4L2_FIELD_NONE;\n+\tctx->dst_fmt.pix.width = IEP_DEFAULT_WIDTH;\n+\tctx->dst_fmt.pix.height = IEP_DEFAULT_HEIGHT;\n+\tiep_prepare_format(&ctx->dst_fmt.pix);\n+\tctx->dst_fmt.hw_fmt = &formats[0];\n+\tctx->dst_fmt.y_stride = IEP_Y_STRIDE(ctx->dst_fmt.pix.width, ctx->dst_fmt.pix.height);\n+\tctx->dst_fmt.uv_stride = IEP_UV_STRIDE(ctx->dst_fmt.pix.width, ctx->dst_fmt.pix.height,\n+\t\t\t\t\t       ctx->dst_fmt.hw_fmt->uv_factor);\n+\t/* ensure fmts are written to HW */\n+\tctx->fmt_changed = true;\n+\n+\tv4l2_fh_init(&ctx->fh, video_devdata(file));\n+\tfile->private_data = &ctx->fh;\n+\tctx->iep = iep;\n+\n+\tctx->fh.m2m_ctx = v4l2_m2m_ctx_init(iep->m2m_dev, ctx,\n+\t\t\t\t\t    &iep_queue_init);\n+\n+\tif (IS_ERR(ctx->fh.m2m_ctx)) {\n+\t\tret = PTR_ERR(ctx->fh.m2m_ctx);\n+\t\tgoto err_free;\n+\t}\n+\n+\tv4l2_fh_add(&ctx->fh);\n+\n+\tmutex_unlock(&iep->mutex);\n+\n+\treturn 0;\n+\n+err_free:\n+\tkfree(ctx);\n+\tmutex_unlock(&iep->mutex);\n+\n+\treturn ret;\n+}\n+\n+static int iep_release(struct file *file)\n+{\n+\tstruct rockchip_iep *iep = video_drvdata(file);\n+\tstruct iep_ctx *ctx = container_of(file->private_data,\n+\t\t\t\t\t\t   struct iep_ctx, fh);\n+\n+\tmutex_lock(&iep->mutex);\n+\n+\tv4l2_fh_del(&ctx->fh);\n+\tv4l2_fh_exit(&ctx->fh);\n+\tv4l2_m2m_ctx_release(ctx->fh.m2m_ctx);\n+\tkfree(ctx);\n+\n+\tmutex_unlock(&iep->mutex);\n+\treturn 0;\n+}\n+\n+static const struct v4l2_file_operations iep_fops = {\n+\t.owner\t\t= THIS_MODULE,\n+\t.open\t\t= iep_open,\n+\t.release\t= iep_release,\n+\t.poll\t\t= v4l2_m2m_fop_poll,\n+\t.unlocked_ioctl\t= video_ioctl2,\n+\t.mmap\t\t= v4l2_m2m_fop_mmap,\n+};\n+\n+static int iep_querycap(struct file *file, void *priv,\n+\t\t\tstruct v4l2_capability *cap)\n+{\n+\tstrscpy(cap->driver, IEP_NAME, sizeof(cap->driver));\n+\tstrscpy(cap->card, IEP_NAME, sizeof(cap->card));\n+\tsnprintf(cap->bus_info, sizeof(cap->bus_info),\n+\t\t \"platform:%s\", IEP_NAME);\n+\n+\treturn 0;\n+}\n+\n+static int iep_enum_fmt(struct file *file, void *priv,\n+\t\t\tstruct v4l2_fmtdesc *f)\n+{\n+\tstruct iep_fmt *fmt;\n+\n+\tif (f->index < ARRAY_SIZE(formats)) {\n+\t\tfmt = &formats[f->index];\n+\t\tf->pixelformat = fmt->fourcc;\n+\n+\t\treturn 0;\n+\t}\n+\n+\treturn -EINVAL;\n+}\n+\n+static int iep_enum_framesizes(struct file *file, void *priv,\n+\t\t\t       struct v4l2_frmsizeenum *fsize)\n+{\n+\tif (fsize->index != 0)\n+\t\treturn -EINVAL;\n+\n+\tif (!iep_check_pix_format(fsize->pixel_format))\n+\t\treturn -EINVAL;\n+\n+\tfsize->type = V4L2_FRMSIZE_TYPE_STEPWISE;\n+\n+\tfsize->stepwise.min_width = IEP_MIN_WIDTH;\n+\tfsize->stepwise.max_width = IEP_MAX_WIDTH;\n+\tfsize->stepwise.step_width = 16;\n+\n+\tfsize->stepwise.min_height = IEP_MIN_HEIGHT;\n+\tfsize->stepwise.max_height = IEP_MAX_HEIGHT;\n+\tfsize->stepwise.step_height = 16;\n+\n+\treturn 0;\n+}\n+\n+static inline struct iep_ctx *iep_file2ctx(struct file *file)\n+{\n+\treturn container_of(file->private_data, struct iep_ctx, fh);\n+}\n+\n+static int iep_g_fmt_vid_cap(struct file *file, void *priv,\n+\t\t\t     struct v4l2_format *f)\n+{\n+\tstruct iep_ctx *ctx = iep_file2ctx(file);\n+\n+\tf->fmt.pix = ctx->dst_fmt.pix;\n+\n+\treturn 0;\n+}\n+\n+static int iep_g_fmt_vid_out(struct file *file, void *priv,\n+\t\t\t     struct v4l2_format *f)\n+{\n+\tstruct iep_ctx *ctx = iep_file2ctx(file);\n+\n+\tf->fmt.pix = ctx->src_fmt.pix;\n+\n+\treturn 0;\n+}\n+\n+static int iep_try_fmt_vid_cap(struct file *file, void *priv,\n+\t\t\t       struct v4l2_format *f)\n+{\n+\tf->fmt.pix.field = V4L2_FIELD_NONE;\n+\tiep_prepare_format(&f->fmt.pix);\n+\n+\treturn 0;\n+}\n+\n+static int iep_try_fmt_vid_out(struct file *file, void *priv,\n+\t\t\t       struct v4l2_format *f)\n+{\n+\tif (f->fmt.pix.field != V4L2_FIELD_INTERLACED_TB &&\n+\t    f->fmt.pix.field != V4L2_FIELD_INTERLACED_BT &&\n+\t    f->fmt.pix.field != V4L2_FIELD_INTERLACED)\n+\t\tf->fmt.pix.field = V4L2_FIELD_INTERLACED;\n+\n+\tiep_prepare_format(&f->fmt.pix);\n+\n+\treturn 0;\n+}\n+\n+static int iep_s_fmt_vid_out(struct file *file, void *priv,\n+\t\t\t     struct v4l2_format *f)\n+{\n+\tstruct iep_ctx *ctx = iep_file2ctx(file);\n+\tstruct vb2_queue *vq;\n+\n+\tint ret;\n+\n+\tret = iep_try_fmt_vid_out(file, priv, f);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tvq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type);\n+\tif (vb2_is_busy(vq))\n+\t\treturn -EBUSY;\n+\n+\tctx->src_fmt.pix = f->fmt.pix;\n+\tctx->src_fmt.hw_fmt = iep_fmt_find(&f->fmt.pix);\n+\tctx->src_fmt.y_stride = IEP_Y_STRIDE(f->fmt.pix.width, f->fmt.pix.height);\n+\tctx->src_fmt.uv_stride = IEP_UV_STRIDE(f->fmt.pix.width, f->fmt.pix.height,\n+\t\t\t\t\t       ctx->src_fmt.hw_fmt->uv_factor);\n+\n+\t/* Propagate colorspace information to capture. */\n+\tctx->dst_fmt.pix.colorspace = f->fmt.pix.colorspace;\n+\tctx->dst_fmt.pix.xfer_func = f->fmt.pix.xfer_func;\n+\tctx->dst_fmt.pix.ycbcr_enc = f->fmt.pix.ycbcr_enc;\n+\tctx->dst_fmt.pix.quantization = f->fmt.pix.quantization;\n+\n+\t/* scaling is not supported */\n+\tctx->dst_fmt.pix.width = f->fmt.pix.width;\n+\tctx->dst_fmt.pix.height = f->fmt.pix.height;\n+\tctx->dst_fmt.y_stride = IEP_Y_STRIDE(f->fmt.pix.width, f->fmt.pix.height);\n+\tctx->dst_fmt.uv_stride = IEP_UV_STRIDE(f->fmt.pix.width, f->fmt.pix.height,\n+\t\t\t\t\t       ctx->dst_fmt.hw_fmt->uv_factor);\n+\n+\tctx->fmt_changed = true;\n+\n+\treturn 0;\n+}\n+\n+static int iep_s_fmt_vid_cap(struct file *file, void *priv,\n+\t\t\t     struct v4l2_format *f)\n+{\n+\tstruct iep_ctx *ctx = iep_file2ctx(file);\n+\tstruct vb2_queue *vq;\n+\tint ret;\n+\n+\tret = iep_try_fmt_vid_cap(file, priv, f);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tvq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type);\n+\tif (vb2_is_busy(vq))\n+\t\treturn -EBUSY;\n+\n+\t/* scaling is not supported */\n+\tf->fmt.pix.width = ctx->src_fmt.pix.width;\n+\tf->fmt.pix.height = ctx->src_fmt.pix.height;\n+\n+\tctx->dst_fmt.pix = f->fmt.pix;\n+\tctx->dst_fmt.hw_fmt = iep_fmt_find(&f->fmt.pix);\n+\n+\tctx->dst_fmt.y_stride = IEP_Y_STRIDE(f->fmt.pix.width, f->fmt.pix.height);\n+\tctx->dst_fmt.uv_stride = IEP_UV_STRIDE(f->fmt.pix.width, f->fmt.pix.height,\n+\t\t\t\t\t       ctx->dst_fmt.hw_fmt->uv_factor);\n+\n+\tctx->fmt_changed = true;\n+\n+\treturn 0;\n+}\n+\n+static const struct v4l2_ioctl_ops iep_ioctl_ops = {\n+\t.vidioc_querycap\t\t= iep_querycap,\n+\n+\t.vidioc_enum_framesizes\t\t= iep_enum_framesizes,\n+\n+\t.vidioc_enum_fmt_vid_cap\t= iep_enum_fmt,\n+\t.vidioc_g_fmt_vid_cap\t\t= iep_g_fmt_vid_cap,\n+\t.vidioc_try_fmt_vid_cap\t\t= iep_try_fmt_vid_cap,\n+\t.vidioc_s_fmt_vid_cap\t\t= iep_s_fmt_vid_cap,\n+\n+\t.vidioc_enum_fmt_vid_out\t= iep_enum_fmt,\n+\t.vidioc_g_fmt_vid_out\t\t= iep_g_fmt_vid_out,\n+\t.vidioc_try_fmt_vid_out\t\t= iep_try_fmt_vid_out,\n+\t.vidioc_s_fmt_vid_out\t\t= iep_s_fmt_vid_out,\n+\n+\t.vidioc_reqbufs\t\t\t= v4l2_m2m_ioctl_reqbufs,\n+\t.vidioc_querybuf\t\t= v4l2_m2m_ioctl_querybuf,\n+\t.vidioc_qbuf\t\t\t= v4l2_m2m_ioctl_qbuf,\n+\t.vidioc_dqbuf\t\t\t= v4l2_m2m_ioctl_dqbuf,\n+\t.vidioc_prepare_buf\t\t= v4l2_m2m_ioctl_prepare_buf,\n+\t.vidioc_create_bufs\t\t= v4l2_m2m_ioctl_create_bufs,\n+\t.vidioc_expbuf\t\t\t= v4l2_m2m_ioctl_expbuf,\n+\n+\t.vidioc_streamon\t\t= v4l2_m2m_ioctl_streamon,\n+\t.vidioc_streamoff\t\t= v4l2_m2m_ioctl_streamoff,\n+};\n+\n+static const struct video_device iep_video_device = {\n+\t.name\t\t= IEP_NAME,\n+\t.vfl_dir\t= VFL_DIR_M2M,\n+\t.fops\t\t= &iep_fops,\n+\t.ioctl_ops\t= &iep_ioctl_ops,\n+\t.minor\t\t= -1,\n+\t.release\t= video_device_release_empty,\n+\t.device_caps\t= V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING,\n+};\n+\n+static int iep_parse_dt(struct rockchip_iep *iep)\n+{\n+\tint ret = 0;\n+\n+\tiep->axi_clk = devm_clk_get(iep->dev, \"axi\");\n+\tif (IS_ERR(iep->axi_clk)) {\n+\t\tdev_err(iep->dev, \"failed to get aclk clock\\n\");\n+\t\treturn PTR_ERR(iep->axi_clk);\n+\t}\n+\n+\tiep->ahb_clk = devm_clk_get(iep->dev, \"ahb\");\n+\tif (IS_ERR(iep->ahb_clk)) {\n+\t\tdev_err(iep->dev, \"failed to get hclk clock\\n\");\n+\t\treturn PTR_ERR(iep->ahb_clk);\n+\t}\n+\n+\tret = clk_set_rate(iep->axi_clk, 300000000);\n+\n+\tif (ret)\n+\t\tdev_err(iep->dev, \"failed to set axi clock rate to 300 MHz\\n\");\n+\n+\treturn ret;\n+}\n+\n+static irqreturn_t iep_isr(int irq, void *prv)\n+{\n+\tstruct rockchip_iep *iep = prv;\n+\tstruct iep_ctx *ctx;\n+\tu32 val;\n+\tenum vb2_buffer_state state = VB2_BUF_STATE_DONE;\n+\n+\tctx = v4l2_m2m_get_curr_priv(iep->m2m_dev);\n+\tif (!ctx) {\n+\t\tv4l2_err(&iep->v4l2_dev,\n+\t\t\t \"Instance released before the end of transaction\\n\");\n+\t\treturn IRQ_NONE;\n+\t}\n+\n+\t/*\n+\t * The irq is shared with the iommu. If the runtime-pm state of the\n+\t * iep-device is disabled or the interrupt status doesn't match the\n+\t * expeceted mask the irq has been targeted to the iommu.\n+\t */\n+\n+\tif (!pm_runtime_active(iep->dev) ||\n+\t    !(iep_read(iep, IEP_INT) & IEP_INT_MASK))\n+\t\treturn IRQ_NONE;\n+\n+\t/* disable interrupt - will be re-enabled at next iep_device_run */\n+\tiep_mod(ctx->iep, IEP_INT,\n+\t\tIEP_INT_FRAME_DONE_EN, 0);\n+\n+\tiep_mod(iep, IEP_INT, IEP_INT_FRAME_DONE_CLR,\n+\t\tIEP_INT_FRAME_DONE_CLR);\n+\n+\t/* wait for all status regs to show \"idle\" */\n+\tval = readl_poll_timeout(iep->regs + IEP_STATUS, val,\n+\t\t\t\t  (val == 0), 100, IEP_TIMEOUT);\n+\n+\tif (val) {\n+\t\tdev_err(iep->dev,\n+\t\t\t\"Failed to wait for job to finish: status: %u\\n\", val);\n+\t\tstate = VB2_BUF_STATE_ERROR;\n+\t\tctx->job_abort = true;\n+\t}\n+\n+\tiep_m2m_dst_bufs_done(ctx, state);\n+\n+\tctx->field_bff = (ctx->dst_buffs_done % 2 == 0)\n+\t\t     ? ctx->field_order_bff : !ctx->field_order_bff;\n+\n+\tif (ctx->dst_buffs_done == 2 || ctx->job_abort) {\n+\t\tif (ctx->prev_src_buf)\n+\t\t\tv4l2_m2m_buf_done(ctx->prev_src_buf, state);\n+\n+\t\t/* current src buff will be next prev */\n+\t\tctx->prev_src_buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx);\n+\n+\t\tv4l2_m2m_job_finish(ctx->iep->m2m_dev, ctx->fh.m2m_ctx);\n+\t\tctx->dst_buffs_done = 0;\n+\n+\t} else {\n+\t\tiep_device_run(ctx);\n+\t}\n+\n+\treturn IRQ_HANDLED;\n+}\n+\n+static int iep_probe(struct platform_device *pdev)\n+{\n+\tstruct rockchip_iep *iep;\n+\tstruct video_device *vfd;\n+\tstruct resource *res;\n+\tint ret = 0;\n+\tint irq;\n+\n+\tif (!pdev->dev.of_node)\n+\t\treturn -ENODEV;\n+\n+\tiep = devm_kzalloc(&pdev->dev, sizeof(*iep), GFP_KERNEL);\n+\tif (!iep)\n+\t\treturn -ENOMEM;\n+\n+\tplatform_set_drvdata(pdev, iep);\n+\tiep->dev = &pdev->dev;\n+\tiep->vfd = iep_video_device;\n+\n+\tret = iep_parse_dt(iep);\n+\tif (ret)\n+\t\tdev_err(&pdev->dev, \"Unable to parse OF data\\n\");\n+\n+\tres = platform_get_resource(pdev, IORESOURCE_MEM, 0);\n+\n+\tiep->regs = devm_ioremap_resource(iep->dev, res);\n+\tif (IS_ERR(iep->regs)) {\n+\t\tret = PTR_ERR(iep->regs);\n+\t\tgoto err_put_clk;\n+\t}\n+\n+\tret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));\n+\tif (ret) {\n+\t\tdev_err(&pdev->dev, \"Could not set DMA coherent mask.\\n\");\n+\t\tgoto err_put_clk;\n+\t}\n+\n+\tvb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32));\n+\n+\tirq = platform_get_irq(pdev, 0);\n+\tif (irq < 0) {\n+\t\tret = irq;\n+\t\tgoto err_put_clk;\n+\t}\n+\n+\t/* IRQ is shared with IOMMU */\n+\tret = devm_request_irq(iep->dev, irq, iep_isr, IRQF_SHARED,\n+\t\t\t       dev_name(iep->dev), iep);\n+\tif (ret < 0) {\n+\t\tdev_err(iep->dev, \"failed to request irq\\n\");\n+\t\tgoto err_put_clk;\n+\t}\n+\n+\tmutex_init(&iep->mutex);\n+\n+\tret = v4l2_device_register(&pdev->dev, &iep->v4l2_dev);\n+\tif (ret) {\n+\t\tdev_err(iep->dev, \"Failed to register V4L2 device\\n\");\n+\n+\t\treturn ret;\n+\t}\n+\n+\tvfd = &iep->vfd;\n+\tvfd->lock = &iep->mutex;\n+\tvfd->v4l2_dev = &iep->v4l2_dev;\n+\n+\tsnprintf(vfd->name, sizeof(vfd->name), \"%s\",\n+\t\t iep_video_device.name);\n+\n+\tvideo_set_drvdata(vfd, iep);\n+\n+\tret = video_register_device(vfd, VFL_TYPE_VIDEO, 0);\n+\tif (ret) {\n+\t\tv4l2_err(&iep->v4l2_dev, \"Failed to register video device\\n\");\n+\n+\t\tgoto err_v4l2;\n+\t}\n+\n+\tv4l2_info(&iep->v4l2_dev,\n+\t\t  \"Device %s registered as /dev/video%d\\n\", vfd->name, vfd->num);\n+\n+\tiep->m2m_dev = v4l2_m2m_init(&iep_m2m_ops);\n+\tif (IS_ERR(iep->m2m_dev)) {\n+\t\tv4l2_err(&iep->v4l2_dev,\n+\t\t\t \"Failed to initialize V4L2 M2M device\\n\");\n+\t\tret = PTR_ERR(iep->m2m_dev);\n+\n+\t\tgoto err_video;\n+\t}\n+\n+\tpm_runtime_set_autosuspend_delay(iep->dev, 100);\n+\tpm_runtime_use_autosuspend(iep->dev);\n+\tpm_runtime_enable(iep->dev);\n+\n+\treturn ret;\n+\n+err_video:\n+\tvideo_unregister_device(&iep->vfd);\n+err_v4l2:\n+\tv4l2_device_unregister(&iep->v4l2_dev);\n+err_put_clk:\n+\tpm_runtime_dont_use_autosuspend(iep->dev);\n+\tpm_runtime_disable(iep->dev);\n+\n+return ret;\n+}\n+\n+static int iep_remove(struct platform_device *pdev)\n+{\n+\tstruct rockchip_iep *iep = platform_get_drvdata(pdev);\n+\n+\tpm_runtime_dont_use_autosuspend(iep->dev);\n+\tpm_runtime_disable(iep->dev);\n+\n+\tv4l2_m2m_release(iep->m2m_dev);\n+\tvideo_unregister_device(&iep->vfd);\n+\tv4l2_device_unregister(&iep->v4l2_dev);\n+\n+\treturn 0;\n+}\n+\n+static int __maybe_unused iep_runtime_suspend(struct device *dev)\n+{\n+\tstruct rockchip_iep *iep = dev_get_drvdata(dev);\n+\n+\tclk_disable_unprepare(iep->ahb_clk);\n+\tclk_disable_unprepare(iep->axi_clk);\n+\n+\treturn 0;\n+}\n+\n+static int __maybe_unused iep_runtime_resume(struct device *dev)\n+{\n+\tstruct rockchip_iep *iep;\n+\tint ret = 0;\n+\n+\tiep = dev_get_drvdata(dev);\n+\n+\tret = clk_prepare_enable(iep->axi_clk);\n+\tif (ret) {\n+\t\tdev_err(iep->dev, \"Cannot enable axi clock: %d\\n\", ret);\n+\t\treturn ret;\n+\t}\n+\n+\tret = clk_prepare_enable(iep->ahb_clk);\n+\tif (ret) {\n+\t\tdev_err(iep->dev, \"Cannot enable ahb clock: %d\\n\", ret);\n+\t\tgoto err_disable_axi_clk;\n+\t}\n+\n+\treturn ret;\n+\n+err_disable_axi_clk:\n+\tclk_disable_unprepare(iep->axi_clk);\n+\treturn ret;\n+}\n+\n+static const struct dev_pm_ops iep_pm_ops = {\n+\tSET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,\n+\t\t\t\tpm_runtime_force_resume)\n+\tSET_RUNTIME_PM_OPS(iep_runtime_suspend,\n+\t\t\t   iep_runtime_resume, NULL)\n+};\n+\n+static const struct of_device_id rockchip_iep_match[] = {\n+\t{\n+\t\t.compatible = \"rockchip,rk3228-iep\",\n+\t},\n+\t{},\n+};\n+\n+MODULE_DEVICE_TABLE(of, rockchip_iep_match);\n+\n+static struct platform_driver iep_pdrv = {\n+\t.probe = iep_probe,\n+\t.remove = iep_remove,\n+\t.driver = {\n+\t\t.name = IEP_NAME,\n+\t\t.pm = &iep_pm_ops,\n+\t\t.of_match_table = rockchip_iep_match,\n+\t},\n+};\n+\n+module_platform_driver(iep_pdrv);\n+\n+MODULE_AUTHOR(\"Alex Bee <knaerzche@gmail.com>\");\n+MODULE_DESCRIPTION(\"Rockchip Image Enhancement Processor\");\n+MODULE_LICENSE(\"GPL v2\");\ndiff --git a/drivers/media/platform/rockchip/iep/iep.h b/drivers/media/platform/rockchip/iep/iep.h\nnew file mode 100644\nindex 000000000000..7d9fc61624b6\n--- /dev/null\n+++ b/drivers/media/platform/rockchip/iep/iep.h\n@@ -0,0 +1,112 @@\n+/* SPDX-License-Identifier: GPL-2.0-only */\n+/*\n+ * Rockchip Image Enhancement Processor (IEP) driver\n+ *\n+ * Copyright (C) 2020 Alex Bee <knaerzche@gmail.com>\n+ *\n+ */\n+#ifndef __IEP_H__\n+#define __IEP_H__\n+\n+#include <linux/platform_device.h>\n+#include <media/videobuf2-v4l2.h>\n+#include <media/v4l2-ctrls.h>\n+#include <media/v4l2-device.h>\n+\n+#define IEP_NAME \"rockchip-iep\"\n+\n+/* Hardware limits */\n+#define IEP_MIN_WIDTH 320U\n+#define IEP_MAX_WIDTH 1920U\n+\n+#define IEP_MIN_HEIGHT 240U\n+#define IEP_MAX_HEIGHT 1088U\n+\n+/* Hardware defaults */\n+#define IEP_DEFAULT_WIDTH 320U\n+#define IEP_DEFAULT_HEIGHT 240U\n+\n+//ns\n+#define IEP_TIMEOUT 250000\n+\n+struct iep_fmt {\n+\tu32 fourcc;\n+\tu8 depth;\n+\tu8 uv_factor;\n+\tu8 color_swap;\n+\tu8 hw_format;\n+};\n+\n+struct iep_frm_fmt {\n+\tstruct iep_fmt *hw_fmt;\n+\tstruct v4l2_pix_format pix;\n+\n+\tunsigned int y_stride;\n+\tunsigned int uv_stride;\n+};\n+\n+struct iep_ctx {\n+\tstruct v4l2_fh fh;\n+\tstruct rockchip_iep *iep;\n+\n+\tstruct iep_frm_fmt src_fmt;\n+\tstruct iep_frm_fmt dst_fmt;\n+\n+\tstruct vb2_v4l2_buffer\t*prev_src_buf;\n+\tstruct vb2_v4l2_buffer\t*dst0_buf;\n+\tstruct vb2_v4l2_buffer\t*dst1_buf;\n+\n+\tu32 dst_sequence;\n+\tu32 src_sequence;\n+\n+\t/* bff = bottom field first */\n+\tbool field_order_bff;\n+\tbool field_bff;\n+\n+\tunsigned int dst_buffs_done;\n+\n+\tbool fmt_changed;\n+\tbool job_abort;\n+};\n+\n+struct rockchip_iep {\n+\tstruct v4l2_device v4l2_dev;\n+\tstruct v4l2_m2m_dev *m2m_dev;\n+\tstruct video_device vfd;\n+\n+\tstruct device *dev;\n+\n+\tvoid __iomem *regs;\n+\n+\tstruct clk *axi_clk;\n+\tstruct clk *ahb_clk;\n+\n+\t/* vfd lock */\n+\tstruct mutex mutex;\n+};\n+\n+static inline void iep_write(struct rockchip_iep *iep, u32 reg, u32 value)\n+{\n+\twritel(value, iep->regs + reg);\n+};\n+\n+static inline u32 iep_read(struct rockchip_iep *iep, u32 reg)\n+{\n+\treturn readl(iep->regs + reg);\n+};\n+\n+static inline void iep_shadow_mod(struct rockchip_iep *iep, u32 reg,\n+\t\t\t\t  u32 shadow_reg, u32 mask, u32 val)\n+{\n+\tu32 temp = iep_read(iep, shadow_reg) & ~(mask);\n+\n+\ttemp |= val & mask;\n+\tiep_write(iep, reg, temp);\n+};\n+\n+static inline void iep_mod(struct rockchip_iep *iep, u32 reg, u32 mask, u32 val)\n+{\n+\tiep_shadow_mod(iep, reg, reg, mask, val);\n+};\n+\n+#endif\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Wed, 14 Oct 2020 20:22:38 +0200\nSubject: [PATCH] ARM64: dts: rockchip: Add IEP node for RK3328\n\nwhile at that also add the mmu required\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n arch/arm64/boot/dts/rockchip/rk3328.dtsi | 22 ++++++++++++++++++++++\n 1 file changed, 22 insertions(+)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi\nindex eec03adf0902..5455a46c9a6b 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi\n@@ -760,6 +760,28 @@ vop_mmu: iommu@ff373f00 {\n \t\tstatus = \"disabled\";\n \t};\n \n+\tiep: iep@ff3a0000 {\n+\t\tcompatible = \"rockchip,rk3328-iep\", \"rockchip,rk3228-iep\";\n+\t\treg = <0x0 0xff3a0000 0x0 0x800>;\n+\t\tinterrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;\n+\t\tinterrupt-names = \"iep\";\n+\t\tclocks = <&cru ACLK_IEP>, <&cru HCLK_IEP>;\n+\t\tclock-names = \"axi\", \"ahb\";\n+\t\tpower-domains = <&power RK3328_PD_VIDEO>;\n+\t\tiommus = <&iep_mmu>;\n+\t};\n+\n+\tiep_mmu: iommu@ff3a0800 {\n+\t\tcompatible = \"rockchip,iommu\";\n+\t\treg = <0x0 0xff3a0800 0x0 0x40>;\n+\t\tinterrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;\n+\t\tinterrupt-names = \"iep_mmu\";\n+\t\tclocks = <&cru ACLK_IEP>, <&cru HCLK_IEP>;\n+\t\tclock-names = \"aclk\", \"iface\";\n+\t\tpower-domains = <&power RK3328_PD_VIDEO>;\n+\t\t#iommu-cells = <0>;\n+\t};\n+\n \thdmi: hdmi@ff3c0000 {\n \t\tcompatible = \"rockchip,rk3328-dw-hdmi\";\n \t\treg = <0x0 0xff3c0000 0x0 0x20000>;\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Wed, 14 Oct 2020 20:43:12 +0200\nSubject: [PATCH] ARM64: dts: rockchip: Add IEP node for RK3399\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n arch/arm64/boot/dts/rockchip/rk3399.dtsi | 13 ++++++++++++-\n 1 file changed, 12 insertions(+), 1 deletion(-)\n\ndiff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi\nindex dbe6a9cb98a5..f0629b7a81c6 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi\n+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi\n@@ -1365,14 +1365,25 @@ vdec_mmu: iommu@ff660480 {\n \t\t#iommu-cells = <0>;\n \t};\n \n+\tiep: iep@ff670000 {\n+\t\tcompatible = \"rockchip,rk3399-iep\", \"rockchip,rk3228-iep\";\n+\t\treg = <0x0 0xff670000 0x0 0x800>;\n+\t\tinterrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH 0>;\n+\t\tinterrupt-names = \"iep\";\n+\t\tclocks = <&cru ACLK_IEP>, <&cru HCLK_IEP>;\n+\t\tclock-names = \"axi\", \"ahb\";\n+\t\tpower-domains = <&power RK3399_PD_IEP>;\n+\t\tiommus = <&iep_mmu>;\n+\t};\n+\n \tiep_mmu: iommu@ff670800 {\n \t\tcompatible = \"rockchip,iommu\";\n \t\treg = <0x0 0xff670800 0x0 0x40>;\n \t\tinterrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH 0>;\n \t\tclocks = <&cru ACLK_IEP>, <&cru HCLK_IEP>;\n \t\tclock-names = \"aclk\", \"iface\";\n+\t\tpower-domains = <&power RK3399_PD_IEP>;\n \t\t#iommu-cells = <0>;\n-\t\tstatus = \"disabled\";\n \t};\n \n \trga: rga@ff680000 {\n\nFrom 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001\nFrom: Alex Bee <knaerzche@gmail.com>\nDate: Wed, 14 Oct 2020 20:53:56 +0200\nSubject: [PATCH] ARM: dts: rockchip: Add IEP node for RK3288\n\nSigned-off-by: Alex Bee <knaerzche@gmail.com>\n---\n arch/arm/boot/dts/rk3288.dtsi | 13 ++++++++++++-\n 1 file changed, 12 insertions(+), 1 deletion(-)\n\ndiff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi\nindex 59fba3ac6aae..06545f423de2 100644\n--- a/arch/arm/boot/dts/rk3288.dtsi\n+++ b/arch/arm/boot/dts/rk3288.dtsi\n@@ -984,14 +984,25 @@ crypto: crypto@ff8a0000 {\n \t\treset-names = \"crypto-rst\";\n \t};\n \n+\tiep: iep@ff90000 {\n+\t\tcompatible = \"rockchip,rk3288-iep\", \"rockchip,rk3228-iep\";\n+\t\treg = <0x0 0xff900000 0x0 0x800>;\n+\t\tinterrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;\n+\t\tinterrupt-names = \"iep\";\n+\t\tclocks = <&cru ACLK_IEP>, <&cru HCLK_IEP>;\n+\t\tclock-names = \"axi\", \"ahb\";\n+\t\tpower-domains = <&power RK3288_PD_VIO>;\n+\t\tiommus = <&iep_mmu>;\n+\t};\n+\n \tiep_mmu: iommu@ff900800 {\n \t\tcompatible = \"rockchip,iommu\";\n \t\treg = <0x0 0xff900800 0x0 0x40>;\n \t\tinterrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;\n \t\tclocks = <&cru ACLK_IEP>, <&cru HCLK_IEP>;\n \t\tclock-names = \"aclk\", \"iface\";\n+\t\tpower-domains = <&power RK3288_PD_VIO>;\n \t\t#iommu-cells = <0>;\n-\t\tstatus = \"disabled\";\n \t};\n \n \tisp_mmu: iommu@ff914000 {\n"
  },
  {
    "path": "projects/Rockchip/patches/u-boot/0001-202301-arm-rockchip-rk3399-Program-PLL-clock-for-DDR-at-50-.patch",
    "content": "From 2cb23b80e4169e121c520ff33cb6a60e0a0ded21 Mon Sep 17 00:00:00 2001\nFrom: Xavier Drudis Ferran <xdrudis@tinet.cat>\nDate: Sat, 16 Jul 2022 12:31:45 +0200\nSubject: [PATCH] arm: rockchip: rk3399: Program PLL clock for DDR at 50 MHz in\n documented range\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nThe original code set up the DDR clock to 48 MHz, not 50MHz as\nrequested, and did it in a way that didn't satisfy the Application\nNotes in RK3399 TRM [1]. 2.9.2.B says:\n\n   PLL frequency range requirement\n   [...]\n   FOUTVCO: 800MHz to 3.2GHz\n\n2.9.2.A :\n   PLL output frequency configuration\n   [...]\n   FOUTVCO = FREF / REFDIV * FBDIV\n   FOUTPOSTDIV = FOUTVCO / POSTDIV1 / POSTDIV2\n\nFREF = 24 MHz\n\nThe original code gives FOUTVCO: 24MHz/1 * 12 = 288MHz < 800MHz\nAnd the resulting FOUTPOSTDIV is 288MHz / 3 / 2 = 48MHz\nbut the requested frequency was 50MHz\n\nNote:\n2.7.2 Detail Register Description\nPMUCRU_PPLL_CON0 says\n\n   fbdiv\n   Feedback Divide Value\n   Valid divider settings are:\n   [16, 3200] in integer mode\n\nSo .fbdiv = 12 wouldn't be right. But 2.9.2.C says:\n\n   PLL setting consideration\n   [...]\n   The following settings are valid for FBDIV:\n   DSMPD=1 (Integer Mode):\n   12,13,14,16-4095 (practical value is limited to 3200, 2400, or 1600\n   (FVCOMAX / FREFMIN))\n   [...]\n\nSo .fbdiv = 12 would be right.\n\nIn any case FOUTVCO is still wrong. I thank YouMin Chen for\nconfirmation and explanation.\n\nDespite documentation, I don't seem to be able to reproduce a\npractical problem with the wrong FOUTVCO. When I initially found it I\nthought some problems with detecting the RAM capacity in my Rock Pi 4B\ncould be related to it and my patch seemed to help. But since I'm no\nlonger able to reproduce the issue, it works with or without this\npatch. And meanwhile a patch[2] by Lee Jones and YouMin Chen addresses\nthis issue. Btw, shouldn't that be commited?\n\nSo this patches solves no visible problem.  Yet, to prevent future\nproblems, I think it'd be best to stick to spec.\n\nAn alternative to this patch could be\n\n    {.refdiv = 1, .fbdiv = 75, .postdiv1 = 6, .postdiv2 = 6};\n\nThis would theoretically consume more power and yield less jitter,\naccording to 2.9.2.C :\n\n   PLL setting consideration\n   [...]\n   For lowest power operation, the minimum VCO and FREF frequencies\n   should be used. For minimum jitter operation, the highest VCO and\n   FREF frequencies should be used.\n   [...]\n\nBut I haven't tried it because I don't think it matters much. 50MHz\nfor DDR is only shortly used by TPL at RAM init. Normal operation is\nat 800MHz.  Maybe it's better to use less power until later when more\ncomplex software can control batteries or charging or whatever ?\n\nCc: Simon Glass <sjg@chromium.org>\nCc: Philipp Tomsich <philipp.tomsich@vrull.eu>\nCc: Kever Yang <kever.yang@rock-chips.com>\nCc: Lukasz Majewski <lukma@denx.de>\nCc: Sean Anderson <seanga2@gmail.com>\n\nLink: [1] https://opensource.rock-chips.com/images/e/ee/Rockchip_RK3399TRM_V1.4_Part1-20170408.pdf\nLink: [2] https://patchwork.ozlabs.org/project/uboot/list/?series=305766\n\nSigned-off-by: Xavier Drudis Ferran <xdrudis@tinet.cat>\nTested-by: Michal Suchánek <msuchanek@suse.de>\nReviewed-by: Kever Yang <kever.yang@rock-chips.com>\n---\n drivers/clk/rockchip/clk_rk3399.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c\nindex 97bf1c6e15..eaeac451df 100644\n--- a/drivers/clk/rockchip/clk_rk3399.c\n+++ b/drivers/clk/rockchip/clk_rk3399.c\n@@ -856,7 +856,7 @@ static ulong rk3399_ddr_set_clk(struct rockchip_cru *cru,\n \tswitch (set_rate) {\n \tcase 50 * MHz:\n \t\tdpll_cfg = (struct pll_div)\n-\t\t{.refdiv = 1, .fbdiv = 12, .postdiv1 = 3, .postdiv2 = 2};\n+\t\t{.refdiv = 2, .fbdiv = 75, .postdiv1 = 3, .postdiv2 = 6};\n \t\tbreak;\n \tcase 200 * MHz:\n \t\tdpll_cfg = (struct pll_div)\n-- \n2.39.0\n\n"
  },
  {
    "path": "projects/Samsung/bootloader/config",
    "content": "CONFIG_LZ4=y\nCONFIG_LZO=y\nCONFIG_LZMA=y\nCONFIG_BOOTDELAY=0\n#CC_OPTIMIZE_FOR_SIZE=n\n#CC_OPTIMIZE_LIBS_FOR_SPEED=y\n"
  },
  {
    "path": "projects/Samsung/bootloader/install",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\necho \"$BOOTLOADER: copying u-boot-dtb.bin\"\ncp -av u-boot-dtb.bin $INSTALL/usr/share/bootloader\n\necho \"$BOOTLOADER: copying odroid firmware\"\nFIPDIR=\"$(get_build_dir exynos-boot-fip)\"\ncp -av $FIPDIR/bl1.bin.hardkernel $INSTALL/usr/share/bootloader\ncp -av $FIPDIR/bl2.bin.hardkernel.720k_uboot $INSTALL/usr/share/bootloader\ncp -av $FIPDIR/tzsw.bin.hardkernel $INSTALL/usr/share/bootloader\n"
  },
  {
    "path": "projects/Samsung/bootloader/mkimage",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"\"\n\nmkimage_uboot(){\n  echo \"image: writing u-boot to $(basename $DISK)\"\n  dd if=\"$INSTALL/usr/share/bootloader/bl1.bin.hardkernel\" of=\"$DISK\" bs=512 seek=1 conv=notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\n  dd if=\"$INSTALL/usr/share/bootloader/bl2.bin.hardkernel.720k_uboot\" of=\"$DISK\" bs=512 seek=31 conv=notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\n  dd if=\"$INSTALL/usr/share/bootloader/u-boot-dtb.bin\" of=\"$DISK\" bs=512 seek=63 conv=notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\n  dd if=\"$INSTALL/usr/share/bootloader/tzsw.bin.hardkernel\" of=\"$DISK\" bs=512 seek=1503 conv=notrunc >\"$SAVE_ERROR\" 2>&1 || show_error\n  mcopy -s -o \"$INSTALL/usr/share/bootloader/u-boot-dtb.bin\" ::\n}\n\nmkimage_extlinux(){\n  echo \"image: copying exlinux.conf\"\n  mkdir -p \"${LE_TMP}/extlinux\"\n  cat << EOF > \"${LE_TMP}/extlinux/extlinux.conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDT /${DTB}\n  APPEND boot=LABEL=${DISTRO_BOOTLABEL} disk=LABEL=${DISTRO_DISKLABEL} ${EXTRA_CMDLINE}\nEOF\n  mcopy -s -o \"${LE_TMP}/extlinux\" ::\n}\n\nmkimage_dtb(){\n  if [ \"$DTB\" != \"@@DTB_NAME@@\" ]; then\n    echo \"image: copying device tree\"\n    mcopy -s -o \"${RELEASE_DIR}/3rdparty/bootloader/dtb/$DTB\" ::\n  else\n    echo \"image: copying device trees\"\n    mcopy -s -o \"${RELEASE_DIR}/3rdparty/bootloader/dtb\" ::\n  fi\n}\n\ncase \"${UBOOT_SYSTEM}\" in\n  odroid*)\n    mkimage_uboot\n    mkimage_extlinux\n    mkimage_dtb\n    ;;\nesac\n"
  },
  {
    "path": "projects/Samsung/bootloader/release",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nSRCDIR=\"$BUILD/image/system/usr/share/bootloader\"\nDSTDIR=\"$RELEASE_DIR/3rdparty/bootloader\"\n\nmkdir -p \"$DSTDIR/dtb\"\n  cp -a \"$SRCDIR\"/*xu{3,4}.dtb \"$DSTDIR/dtb\"\n"
  },
  {
    "path": "projects/Samsung/bootloader/update.sh",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n[ -z \"$SYSTEM_ROOT\" ] && SYSTEM_ROOT=\"\"\n[ -z \"$BOOT_ROOT\" ] && BOOT_ROOT=\"/flash\"\n[ -z \"$BOOT_PART\" ] && BOOT_PART=$(df \"$BOOT_ROOT\" | tail -1 | awk {' print $1 '})\n\n# identify the boot device\n  if [ -z \"$BOOT_DISK\" ]; then\n    case $BOOT_PART in\n      /dev/sd[a-z][0-9]*)\n        BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,[0-9]*,,g\")\n        ;;\n      /dev/mmcblk*)\n        BOOT_DISK=$(echo $BOOT_PART | sed -e \"s,p[0-9]*,,g\")\n        ;;\n    esac\n  fi\n\n# mount $BOOT_ROOT rw\n  mount -o remount,rw $BOOT_ROOT\n\n# update extlinux device trees\n  if [ -f $BOOT_ROOT/extlinux/extlinux.conf ]; then\n    for dtbfile in $BOOT_ROOT/*.dtb ; do\n      dtb=$(basename $dtbfile)\n      echo \"Updating $dtb\"\n      cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT/ 2>/dev/null || true\n    done\n  fi\n\n# mount $BOOT_ROOT ro\n  sync\n  mount -o remount,ro $BOOT_ROOT\n"
  },
  {
    "path": "projects/Samsung/devices/Exynos/options",
    "content": "################################################################################\n# setup device defaults\n################################################################################\n\n  # The TARGET_CPU variable controls which processor should be targeted for\n  # generated code.\n    case $TARGET_ARCH in\n      arm)\n        TARGET_CPU=\"cortex-a15.cortex-a7\"\n        TARGET_FLOAT=\"hard\"\n        TARGET_FPU=\"neon-vfpv4\"\n        ;;\n    esac\n\n  # OpenGL-ES implementation to use\n    OPENGLES=\"mesa\"\n\n  # Graphic drivers to use\n    GRAPHIC_DRIVERS=\"panfrost\"\n\n  # KODI Player implementation to use\n    KODIPLAYER_DRIVER=\"$OPENGLES\"\n\n  # Mali GPU family\n    MALI_FAMILY=\"t620\"\n"
  },
  {
    "path": "projects/Samsung/filesystem/usr/bin/cputemp",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\n# XU4 has 5x sensors so read them all and report the highest value\nTEMP=$(cat /sys/devices/virtual/thermal/thermal_zone*/temp | sort -n | tail -1)\nTEMP=\"$(( $TEMP / 1000 ))\"\necho \"${TEMP} C\"\n"
  },
  {
    "path": "projects/Samsung/filesystem/usr/config/pulse-daemon.conf.d/daemon.conf",
    "content": "load-default-script-file = yes\ndefault-script-file = /storage/.config/pulse-daemon.conf.d/system.pa\ndefault-sample-rate = 48000\n"
  },
  {
    "path": "projects/Samsung/filesystem/usr/config/pulse-daemon.conf.d/system.pa",
    "content": "#!/usr/bin/pulseaudio -nF\n#\n# This file is part of PulseAudio.\n#\n# PulseAudio is free software; you can redistribute it and/or modify it\n# under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# PulseAudio is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public License\n# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.\n\n# This startup script is used only if PulseAudio is started in system\n# mode.\n\n### Load several protocols\n.ifexists module-esound-protocol-unix.so\nload-module module-esound-protocol-unix\n.endif\nload-module module-native-protocol-unix\n\n### Automatically restore the volume of streams and devices\nload-module module-stream-restore\nload-module module-device-restore\n\n### Automatically restore the default sink/source when changed by the user\n### during runtime\n### NOTE: This should be loaded as early as possible so that subsequent modules\n### that look up the default sink/source get the right value\nload-module module-default-device-restore\n\n### Automatically move streams to the default sink if the sink they are\n### connected to dies, similar for sources\nload-module module-rescue-streams\n\n### Make sure we always have a sink around, even if it is a null sink.\nload-module module-always-sink\n\n### Automatically suspend sinks/sources that become idle for too long\nload-module module-suspend-on-idle\n\n### Enable positioned event sounds\nload-module module-position-event-sounds\n\n# Set ALSA audio device manually\n# load-module module-alsa-sink device=hw:0,1\n\n# Detect ALSA audio devices using udev\nload-module module-udev-detect\n\n# Ensures that passthrough streams are always allowed to play on sinks\nload-module module-allow-passthrough\n\n### Automatically load modules for dbus\n.ifexists module-dbus-protocol.so\n load-module module-dbus-protocol\n.endif\n\n### Automatically load modules for bluetooth\n.ifexists module-bluetooth-policy.so\n load-module module-bluetooth-policy\n.endif\n\n.ifexists module-bluetooth-discover.so\n load-module module-bluetooth-discover\n.endif\n\n.ifexists module-zeroconf-publish.so\n  load-module module-zeroconf-publish\n.endif\n\nload-module module-native-protocol-tcp auth-anonymous=1\nload-module module-switch-on-connect\n"
  },
  {
    "path": "projects/Samsung/linux/linux.arm.conf",
    "content": "#\n# Automatically generated file; DO NOT EDIT.\n# Linux/arm 6.1.0-rc6 Kernel Configuration\n#\nCONFIG_CC_VERSION_TEXT=\"armv7ve-libreelec-linux-gnueabihf-gcc-12.2.0 (GCC) 12.2.0\"\nCONFIG_CC_IS_GCC=y\nCONFIG_GCC_VERSION=120200\nCONFIG_CLANG_VERSION=0\nCONFIG_AS_IS_GNU=y\nCONFIG_AS_VERSION=23900\nCONFIG_LD_IS_BFD=y\nCONFIG_LD_VERSION=23900\nCONFIG_LLD_VERSION=0\nCONFIG_CC_CAN_LINK=y\nCONFIG_CC_CAN_LINK_STATIC=y\nCONFIG_CC_HAS_ASM_GOTO_OUTPUT=y\nCONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y\nCONFIG_CC_HAS_ASM_INLINE=y\nCONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y\nCONFIG_PAHOLE_VERSION=0\nCONFIG_IRQ_WORK=y\nCONFIG_BUILDTIME_TABLE_SORT=y\nCONFIG_THREAD_INFO_IN_TASK=y\n\n#\n# General setup\n#\nCONFIG_INIT_ENV_ARG_LIMIT=32\n# CONFIG_COMPILE_TEST is not set\n# CONFIG_WERROR is not set\nCONFIG_LOCALVERSION=\"\"\nCONFIG_LOCALVERSION_AUTO=y\nCONFIG_BUILD_SALT=\"\"\nCONFIG_HAVE_KERNEL_GZIP=y\nCONFIG_HAVE_KERNEL_LZMA=y\nCONFIG_HAVE_KERNEL_XZ=y\nCONFIG_HAVE_KERNEL_LZO=y\nCONFIG_HAVE_KERNEL_LZ4=y\n# CONFIG_KERNEL_GZIP is not set\n# CONFIG_KERNEL_LZMA is not set\n# CONFIG_KERNEL_XZ is not set\n# CONFIG_KERNEL_LZO is not set\nCONFIG_KERNEL_LZ4=y\nCONFIG_DEFAULT_INIT=\"\"\nCONFIG_DEFAULT_HOSTNAME=\"@DISTRONAME@\"\nCONFIG_SYSVIPC=y\nCONFIG_SYSVIPC_SYSCTL=y\nCONFIG_POSIX_MQUEUE=y\nCONFIG_POSIX_MQUEUE_SYSCTL=y\n# CONFIG_WATCH_QUEUE is not set\nCONFIG_CROSS_MEMORY_ATTACH=y\n# CONFIG_USELIB is not set\n# CONFIG_AUDIT is not set\nCONFIG_HAVE_ARCH_AUDITSYSCALL=y\n\n#\n# IRQ subsystem\n#\nCONFIG_GENERIC_IRQ_PROBE=y\nCONFIG_GENERIC_IRQ_SHOW=y\nCONFIG_GENERIC_IRQ_SHOW_LEVEL=y\nCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y\nCONFIG_GENERIC_IRQ_MIGRATION=y\nCONFIG_HARDIRQS_SW_RESEND=y\nCONFIG_IRQ_DOMAIN=y\nCONFIG_IRQ_DOMAIN_HIERARCHY=y\nCONFIG_GENERIC_IRQ_IPI=y\nCONFIG_IRQ_FORCED_THREADING=y\nCONFIG_SPARSE_IRQ=y\n# CONFIG_GENERIC_IRQ_DEBUGFS is not set\n# end of IRQ subsystem\n\nCONFIG_GENERIC_IRQ_MULTI_HANDLER=y\nCONFIG_GENERIC_TIME_VSYSCALL=y\nCONFIG_GENERIC_CLOCKEVENTS=y\nCONFIG_ARCH_HAS_TICK_BROADCAST=y\nCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y\nCONFIG_CONTEXT_TRACKING=y\nCONFIG_CONTEXT_TRACKING_IDLE=y\n\n#\n# Timers subsystem\n#\nCONFIG_TICK_ONESHOT=y\nCONFIG_NO_HZ_COMMON=y\n# CONFIG_HZ_PERIODIC is not set\nCONFIG_NO_HZ_IDLE=y\n# CONFIG_NO_HZ_FULL is not set\nCONFIG_NO_HZ=y\nCONFIG_HIGH_RES_TIMERS=y\n# end of Timers subsystem\n\nCONFIG_BPF=y\nCONFIG_HAVE_EBPF_JIT=y\n\n#\n# BPF subsystem\n#\nCONFIG_BPF_SYSCALL=y\n# CONFIG_BPF_JIT is not set\n# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set\n# CONFIG_BPF_PRELOAD is not set\n# end of BPF subsystem\n\nCONFIG_PREEMPT_BUILD=y\n# CONFIG_PREEMPT_NONE is not set\n# CONFIG_PREEMPT_VOLUNTARY is not set\nCONFIG_PREEMPT=y\nCONFIG_PREEMPT_COUNT=y\nCONFIG_PREEMPTION=y\n\n#\n# CPU/Task time and stats accounting\n#\nCONFIG_TICK_CPU_ACCOUNTING=y\n# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set\n# CONFIG_IRQ_TIME_ACCOUNTING is not set\nCONFIG_SCHED_THERMAL_PRESSURE=y\n# CONFIG_BSD_PROCESS_ACCT is not set\n# CONFIG_TASKSTATS is not set\n# CONFIG_PSI is not set\n# end of CPU/Task time and stats accounting\n\nCONFIG_CPU_ISOLATION=y\n\n#\n# RCU Subsystem\n#\nCONFIG_TREE_RCU=y\nCONFIG_PREEMPT_RCU=y\n# CONFIG_RCU_EXPERT is not set\nCONFIG_SRCU=y\nCONFIG_TREE_SRCU=y\nCONFIG_TASKS_RCU_GENERIC=y\nCONFIG_TASKS_RCU=y\nCONFIG_TASKS_TRACE_RCU=y\nCONFIG_RCU_STALL_COMMON=y\nCONFIG_RCU_NEED_SEGCBLIST=y\n# end of RCU Subsystem\n\n# CONFIG_IKCONFIG is not set\n# CONFIG_IKHEADERS is not set\nCONFIG_LOG_BUF_SHIFT=17\nCONFIG_LOG_CPU_MAX_BUF_SHIFT=12\nCONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13\n# CONFIG_PRINTK_INDEX is not set\nCONFIG_GENERIC_SCHED_CLOCK=y\n\n#\n# Scheduler features\n#\n# end of Scheduler features\n\nCONFIG_CC_IMPLICIT_FALLTHROUGH=\"-Wimplicit-fallthrough=5\"\nCONFIG_GCC11_NO_ARRAY_BOUNDS=y\nCONFIG_GCC12_NO_ARRAY_BOUNDS=y\nCONFIG_CC_NO_ARRAY_BOUNDS=y\nCONFIG_CGROUPS=y\nCONFIG_PAGE_COUNTER=y\n# CONFIG_CGROUP_FAVOR_DYNMODS is not set\nCONFIG_MEMCG=y\nCONFIG_MEMCG_KMEM=y\nCONFIG_BLK_CGROUP=y\nCONFIG_CGROUP_WRITEBACK=y\nCONFIG_CGROUP_SCHED=y\nCONFIG_FAIR_GROUP_SCHED=y\nCONFIG_CFS_BANDWIDTH=y\n# CONFIG_RT_GROUP_SCHED is not set\nCONFIG_CGROUP_PIDS=y\n# CONFIG_CGROUP_RDMA is not set\nCONFIG_CGROUP_FREEZER=y\nCONFIG_CPUSETS=y\nCONFIG_PROC_PID_CPUSET=y\nCONFIG_CGROUP_DEVICE=y\nCONFIG_CGROUP_CPUACCT=y\nCONFIG_CGROUP_PERF=y\nCONFIG_CGROUP_BPF=y\n# CONFIG_CGROUP_MISC is not set\n# CONFIG_CGROUP_DEBUG is not set\nCONFIG_SOCK_CGROUP_DATA=y\nCONFIG_NAMESPACES=y\nCONFIG_UTS_NS=y\nCONFIG_IPC_NS=y\nCONFIG_USER_NS=y\nCONFIG_PID_NS=y\nCONFIG_NET_NS=y\n# CONFIG_CHECKPOINT_RESTORE is not set\n# CONFIG_SCHED_AUTOGROUP is not set\n# CONFIG_SYSFS_DEPRECATED is not set\n# CONFIG_RELAY is not set\nCONFIG_BLK_DEV_INITRD=y\nCONFIG_INITRAMFS_SOURCE=\"@INITRAMFS_SOURCE@\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0\nCONFIG_RD_GZIP=y\nCONFIG_RD_BZIP2=y\nCONFIG_RD_LZMA=y\nCONFIG_RD_XZ=y\nCONFIG_RD_LZO=y\nCONFIG_RD_LZ4=y\nCONFIG_RD_ZSTD=y\n# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set\n# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set\n# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set\n# CONFIG_INITRAMFS_COMPRESSION_XZ is not set\n# CONFIG_INITRAMFS_COMPRESSION_LZO is not set\n# CONFIG_INITRAMFS_COMPRESSION_LZ4 is not set\n# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set\nCONFIG_INITRAMFS_COMPRESSION_NONE=y\n# CONFIG_BOOT_CONFIG is not set\nCONFIG_INITRAMFS_PRESERVE_MTIME=y\nCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y\n# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set\nCONFIG_LD_ORPHAN_WARN=y\nCONFIG_SYSCTL=y\nCONFIG_HAVE_UID16=y\n# CONFIG_EXPERT is not set\nCONFIG_UID16=y\nCONFIG_MULTIUSER=y\nCONFIG_SYSFS_SYSCALL=y\nCONFIG_FHANDLE=y\nCONFIG_POSIX_TIMERS=y\nCONFIG_PRINTK=y\nCONFIG_BUG=y\nCONFIG_ELF_CORE=y\nCONFIG_BASE_FULL=y\nCONFIG_FUTEX=y\nCONFIG_FUTEX_PI=y\nCONFIG_EPOLL=y\nCONFIG_SIGNALFD=y\nCONFIG_TIMERFD=y\nCONFIG_EVENTFD=y\nCONFIG_SHMEM=y\nCONFIG_AIO=y\nCONFIG_IO_URING=y\nCONFIG_ADVISE_SYSCALLS=y\nCONFIG_MEMBARRIER=y\nCONFIG_KALLSYMS=y\nCONFIG_KALLSYMS_ALL=y\nCONFIG_KALLSYMS_BASE_RELATIVE=y\nCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y\nCONFIG_KCMP=y\nCONFIG_RSEQ=y\n# CONFIG_EMBEDDED is not set\nCONFIG_HAVE_PERF_EVENTS=y\nCONFIG_PERF_USE_VMALLOC=y\n\n#\n# Kernel Performance Events And Counters\n#\nCONFIG_PERF_EVENTS=y\n# CONFIG_DEBUG_PERF_USE_VMALLOC is not set\n# end of Kernel Performance Events And Counters\n\nCONFIG_SYSTEM_DATA_VERIFICATION=y\n# CONFIG_PROFILING is not set\nCONFIG_TRACEPOINTS=y\n# end of General setup\n\nCONFIG_ARM=y\nCONFIG_ARM_HAS_GROUP_RELOCS=y\nCONFIG_ARM_DMA_USE_IOMMU=y\nCONFIG_ARM_DMA_IOMMU_ALIGNMENT=8\nCONFIG_SYS_SUPPORTS_APM_EMULATION=y\nCONFIG_HAVE_PROC_CPU=y\nCONFIG_STACKTRACE_SUPPORT=y\nCONFIG_LOCKDEP_SUPPORT=y\nCONFIG_FIX_EARLYCON_MEM=y\nCONFIG_GENERIC_HWEIGHT=y\nCONFIG_GENERIC_CALIBRATE_DELAY=y\nCONFIG_ARCH_SUPPORTS_UPROBES=y\nCONFIG_ARM_PATCH_PHYS_VIRT=y\nCONFIG_GENERIC_BUG=y\nCONFIG_PGTABLE_LEVELS=2\n\n#\n# System Type\n#\nCONFIG_MMU=y\nCONFIG_ARCH_MMAP_RND_BITS_MIN=8\nCONFIG_ARCH_MMAP_RND_BITS_MAX=16\nCONFIG_ARCH_MULTIPLATFORM=y\n\n#\n# Platform selection\n#\n\n#\n# CPU Core family selection\n#\n# CONFIG_ARCH_MULTI_V6 is not set\nCONFIG_ARCH_MULTI_V7=y\nCONFIG_ARCH_MULTI_V6_V7=y\n# end of Platform selection\n\n# CONFIG_ARCH_VIRT is not set\n# CONFIG_ARCH_AIROHA is not set\n# CONFIG_ARCH_ACTIONS is not set\n# CONFIG_ARCH_ALPINE is not set\n# CONFIG_ARCH_ARTPEC is not set\n# CONFIG_ARCH_ASPEED is not set\n# CONFIG_ARCH_AT91 is not set\n# CONFIG_ARCH_BCM is not set\n# CONFIG_ARCH_BERLIN is not set\n# CONFIG_ARCH_DIGICOLOR is not set\n# CONFIG_ARCH_DOVE is not set\nCONFIG_ARCH_EXYNOS=y\nCONFIG_S5P_DEV_MFC=y\n# CONFIG_ARCH_EXYNOS3 is not set\n# CONFIG_ARCH_EXYNOS4 is not set\nCONFIG_ARCH_EXYNOS5=y\n\n#\n# Exynos SoCs\n#\n# CONFIG_SOC_EXYNOS5250 is not set\n# CONFIG_SOC_EXYNOS5260 is not set\n# CONFIG_SOC_EXYNOS5410 is not set\nCONFIG_SOC_EXYNOS5420=y\n# CONFIG_SOC_EXYNOS5800 is not set\nCONFIG_EXYNOS_MCPM=y\nCONFIG_EXYNOS_CPU_SUSPEND=y\n# CONFIG_ARCH_HIGHBANK is not set\n# CONFIG_ARCH_HISI is not set\n# CONFIG_ARCH_HPE is not set\n# CONFIG_ARCH_MXC is not set\n# CONFIG_ARCH_KEYSTONE is not set\n# CONFIG_ARCH_MEDIATEK is not set\n# CONFIG_ARCH_MESON is not set\n# CONFIG_ARCH_MILBEAUT is not set\n# CONFIG_ARCH_MMP is not set\n# CONFIG_ARCH_MSTARV7 is not set\n# CONFIG_ARCH_MVEBU is not set\n# CONFIG_ARCH_NPCM is not set\n\n#\n# TI OMAP/AM/DM/DRA Family\n#\n# CONFIG_ARCH_OMAP3 is not set\n# CONFIG_ARCH_OMAP4 is not set\n# CONFIG_SOC_OMAP5 is not set\n# CONFIG_SOC_AM33XX is not set\n# CONFIG_SOC_AM43XX is not set\n# CONFIG_SOC_DRA7XX is not set\n# end of TI OMAP/AM/DM/DRA Family\n\n# CONFIG_ARCH_QCOM is not set\n# CONFIG_ARCH_RDA is not set\n# CONFIG_ARCH_REALTEK is not set\n# CONFIG_ARCH_ROCKCHIP is not set\n# CONFIG_ARCH_S5PV210 is not set\n# CONFIG_ARCH_RENESAS is not set\n# CONFIG_ARCH_INTEL_SOCFPGA is not set\n# CONFIG_PLAT_SPEAR is not set\n# CONFIG_ARCH_STI is not set\n# CONFIG_ARCH_STM32 is not set\n# CONFIG_ARCH_SUNPLUS is not set\n# CONFIG_ARCH_SUNXI is not set\n# CONFIG_ARCH_TEGRA is not set\n# CONFIG_ARCH_UNIPHIER is not set\n# CONFIG_ARCH_U8500 is not set\n# CONFIG_ARCH_REALVIEW is not set\n# CONFIG_ARCH_VEXPRESS is not set\n# CONFIG_ARCH_WM8850 is not set\n# CONFIG_ARCH_ZYNQ is not set\n\n#\n# Processor Type\n#\nCONFIG_CPU_V7=y\nCONFIG_CPU_THUMB_CAPABLE=y\nCONFIG_CPU_32v6K=y\nCONFIG_CPU_32v7=y\nCONFIG_CPU_ABRT_EV7=y\nCONFIG_CPU_PABRT_V7=y\nCONFIG_CPU_CACHE_V7=y\nCONFIG_CPU_CACHE_VIPT=y\nCONFIG_CPU_COPY_V6=y\nCONFIG_CPU_TLB_V7=y\nCONFIG_CPU_HAS_ASID=y\nCONFIG_CPU_CP15=y\nCONFIG_CPU_CP15_MMU=y\n\n#\n# Processor Features\n#\n# CONFIG_ARM_LPAE is not set\nCONFIG_ARM_THUMB=y\n# CONFIG_ARM_THUMBEE is not set\nCONFIG_ARM_VIRT_EXT=y\nCONFIG_SWP_EMULATE=y\nCONFIG_CPU_LITTLE_ENDIAN=y\n# CONFIG_CPU_BIG_ENDIAN is not set\n# CONFIG_CPU_ICACHE_DISABLE is not set\nCONFIG_CPU_ICACHE_MISMATCH_WORKAROUND=y\n# CONFIG_CPU_BPREDICT_DISABLE is not set\nCONFIG_CPU_SPECTRE=y\nCONFIG_HARDEN_BRANCH_PREDICTOR=y\nCONFIG_HARDEN_BRANCH_HISTORY=y\nCONFIG_KUSER_HELPERS=y\nCONFIG_VDSO=y\nCONFIG_OUTER_CACHE=y\nCONFIG_OUTER_CACHE_SYNC=y\nCONFIG_MIGHT_HAVE_CACHE_L2X0=y\nCONFIG_CACHE_L2X0=y\n# CONFIG_CACHE_L2X0_PMU is not set\n# CONFIG_PL310_ERRATA_588369 is not set\n# CONFIG_PL310_ERRATA_727915 is not set\n# CONFIG_PL310_ERRATA_753970 is not set\n# CONFIG_PL310_ERRATA_769419 is not set\nCONFIG_ARM_L1_CACHE_SHIFT_6=y\nCONFIG_ARM_L1_CACHE_SHIFT=6\nCONFIG_ARM_DMA_MEM_BUFFERABLE=y\nCONFIG_ARM_HEAVY_MB=y\nCONFIG_DEBUG_ALIGN_RODATA=y\n# CONFIG_ARM_ERRATA_430973 is not set\n# CONFIG_ARM_ERRATA_643719 is not set\n# CONFIG_ARM_ERRATA_720789 is not set\n# CONFIG_ARM_ERRATA_754322 is not set\n# CONFIG_ARM_ERRATA_754327 is not set\n# CONFIG_ARM_ERRATA_764369 is not set\n# CONFIG_ARM_ERRATA_764319 is not set\n# CONFIG_ARM_ERRATA_775420 is not set\nCONFIG_ARM_ERRATA_798181=y\nCONFIG_ARM_ERRATA_773022=y\n# CONFIG_ARM_ERRATA_818325_852422 is not set\n# CONFIG_ARM_ERRATA_821420 is not set\n# CONFIG_ARM_ERRATA_825619 is not set\n# CONFIG_ARM_ERRATA_857271 is not set\n# CONFIG_ARM_ERRATA_852421 is not set\n# CONFIG_ARM_ERRATA_852423 is not set\n# CONFIG_ARM_ERRATA_857272 is not set\n# end of System Type\n\n#\n# Bus support\n#\n# CONFIG_ARM_ERRATA_814220 is not set\n# end of Bus support\n\n#\n# Kernel Features\n#\nCONFIG_HAVE_SMP=y\nCONFIG_SMP=y\nCONFIG_SMP_ON_UP=y\nCONFIG_CURRENT_POINTER_IN_TPIDRURO=y\nCONFIG_IRQSTACKS=y\nCONFIG_ARM_CPU_TOPOLOGY=y\nCONFIG_SCHED_MC=y\n# CONFIG_SCHED_SMT is not set\nCONFIG_HAVE_ARM_SCU=y\nCONFIG_HAVE_ARM_ARCH_TIMER=y\nCONFIG_MCPM=y\nCONFIG_BIG_LITTLE=y\n# CONFIG_BL_SWITCHER is not set\nCONFIG_VMSPLIT_3G=y\n# CONFIG_VMSPLIT_3G_OPT is not set\n# CONFIG_VMSPLIT_2G is not set\n# CONFIG_VMSPLIT_1G is not set\nCONFIG_PAGE_OFFSET=0xC0000000\nCONFIG_NR_CPUS=8\nCONFIG_HOTPLUG_CPU=y\n# CONFIG_ARM_PSCI is not set\nCONFIG_ARCH_NR_GPIO=512\nCONFIG_HZ_FIXED=0\nCONFIG_HZ_100=y\n# CONFIG_HZ_200 is not set\n# CONFIG_HZ_250 is not set\n# CONFIG_HZ_300 is not set\n# CONFIG_HZ_500 is not set\n# CONFIG_HZ_1000 is not set\nCONFIG_HZ=100\nCONFIG_SCHED_HRTICK=y\n# CONFIG_THUMB2_KERNEL is not set\nCONFIG_ARM_PATCH_IDIV=y\nCONFIG_AEABI=y\n# CONFIG_OABI_COMPAT is not set\nCONFIG_ARCH_SELECT_MEMORY_MODEL=y\nCONFIG_ARCH_FLATMEM_ENABLE=y\nCONFIG_ARCH_SPARSEMEM_ENABLE=y\nCONFIG_HIGHMEM=y\nCONFIG_HIGHPTE=y\nCONFIG_CPU_SW_DOMAIN_PAN=y\nCONFIG_HW_PERF_EVENTS=y\nCONFIG_ARM_MODULE_PLTS=y\nCONFIG_ARCH_FORCE_MAX_ORDER=11\nCONFIG_ALIGNMENT_TRAP=y\n# CONFIG_UACCESS_WITH_MEMCPY is not set\n# CONFIG_PARAVIRT is not set\n# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set\n# CONFIG_XEN is not set\nCONFIG_CC_HAVE_STACKPROTECTOR_TLS=y\nCONFIG_STACKPROTECTOR_PER_TASK=y\n# end of Kernel Features\n\n#\n# Boot options\n#\nCONFIG_USE_OF=y\nCONFIG_ATAGS=y\n# CONFIG_UNUSED_BOARD_FILES is not set\n# CONFIG_DEPRECATED_PARAM_STRUCT is not set\nCONFIG_ZBOOT_ROM_TEXT=0x0\nCONFIG_ZBOOT_ROM_BSS=0x0\nCONFIG_ARM_APPENDED_DTB=y\nCONFIG_ARM_ATAG_DTB_COMPAT=y\nCONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y\n# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set\nCONFIG_CMDLINE=\"\"\n# CONFIG_KEXEC is not set\n# CONFIG_CRASH_DUMP is not set\nCONFIG_AUTO_ZRELADDR=y\n# CONFIG_EFI is not set\n# end of Boot options\n\n#\n# CPU Power Management\n#\n\n#\n# CPU Frequency scaling\n#\nCONFIG_CPU_FREQ=y\nCONFIG_CPU_FREQ_GOV_ATTR_SET=y\nCONFIG_CPU_FREQ_GOV_COMMON=y\nCONFIG_CPU_FREQ_STAT=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set\nCONFIG_CPU_FREQ_GOV_PERFORMANCE=y\n# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set\n# CONFIG_CPU_FREQ_GOV_USERSPACE is not set\nCONFIG_CPU_FREQ_GOV_ONDEMAND=y\n# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set\n# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set\n\n#\n# CPU frequency scaling drivers\n#\nCONFIG_CPUFREQ_DT=y\nCONFIG_CPUFREQ_DT_PLATDEV=y\n# end of CPU Frequency scaling\n\n#\n# CPU Idle\n#\nCONFIG_CPU_IDLE=y\n# CONFIG_CPU_IDLE_GOV_LADDER is not set\nCONFIG_CPU_IDLE_GOV_MENU=y\n# CONFIG_CPU_IDLE_GOV_TEO is not set\n\n#\n# ARM CPU Idle Drivers\n#\n# CONFIG_ARM_CPUIDLE is not set\n# CONFIG_ARM_BIG_LITTLE_CPUIDLE is not set\nCONFIG_ARM_EXYNOS_CPUIDLE=y\n# end of ARM CPU Idle Drivers\n\nCONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y\n# end of CPU Idle\n# end of CPU Power Management\n\n#\n# Floating point emulation\n#\n\n#\n# At least one emulation must be selected\n#\nCONFIG_VFP=y\nCONFIG_VFPv3=y\nCONFIG_NEON=y\nCONFIG_KERNEL_MODE_NEON=y\n# end of Floating point emulation\n\n#\n# Power management options\n#\nCONFIG_SUSPEND=y\nCONFIG_SUSPEND_FREEZER=y\n# CONFIG_HIBERNATION is not set\nCONFIG_PM_SLEEP=y\nCONFIG_PM_SLEEP_SMP=y\n# CONFIG_PM_AUTOSLEEP is not set\n# CONFIG_PM_USERSPACE_AUTOSLEEP is not set\n# CONFIG_PM_WAKELOCKS is not set\nCONFIG_PM=y\nCONFIG_PM_DEBUG=y\nCONFIG_PM_ADVANCED_DEBUG=y\n# CONFIG_PM_TEST_SUSPEND is not set\nCONFIG_PM_SLEEP_DEBUG=y\n# CONFIG_APM_EMULATION is not set\nCONFIG_PM_CLK=y\nCONFIG_PM_GENERIC_DOMAINS=y\n# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set\nCONFIG_PM_GENERIC_DOMAINS_SLEEP=y\nCONFIG_PM_GENERIC_DOMAINS_OF=y\nCONFIG_CPU_PM=y\nCONFIG_ENERGY_MODEL=y\nCONFIG_ARCH_SUSPEND_POSSIBLE=y\nCONFIG_ARM_CPU_SUSPEND=y\nCONFIG_ARCH_HIBERNATION_POSSIBLE=y\n# end of Power management options\n\nCONFIG_AS_VFP_VMRS_FPINST=y\n\n#\n# General architecture-dependent options\n#\n# CONFIG_KPROBES is not set\n# CONFIG_JUMP_LABEL is not set\nCONFIG_UPROBES=y\nCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y\nCONFIG_ARCH_USE_BUILTIN_BSWAP=y\nCONFIG_HAVE_KPROBES=y\nCONFIG_HAVE_KRETPROBES=y\nCONFIG_HAVE_OPTPROBES=y\nCONFIG_HAVE_NMI=y\nCONFIG_TRACE_IRQFLAGS_SUPPORT=y\nCONFIG_HAVE_ARCH_TRACEHOOK=y\nCONFIG_HAVE_DMA_CONTIGUOUS=y\nCONFIG_GENERIC_SMP_IDLE_THREAD=y\nCONFIG_GENERIC_IDLE_POLL_SETUP=y\nCONFIG_ARCH_HAS_FORTIFY_SOURCE=y\nCONFIG_ARCH_HAS_KEEPINITRD=y\nCONFIG_ARCH_HAS_SET_MEMORY=y\nCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y\nCONFIG_ARCH_32BIT_OFF_T=y\nCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y\nCONFIG_HAVE_RSEQ=y\nCONFIG_HAVE_HW_BREAKPOINT=y\nCONFIG_HAVE_PERF_REGS=y\nCONFIG_HAVE_PERF_USER_STACK_DUMP=y\nCONFIG_HAVE_ARCH_JUMP_LABEL=y\nCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y\nCONFIG_ARCH_WANT_IPC_PARSE_VERSION=y\nCONFIG_HAVE_ARCH_SECCOMP=y\nCONFIG_HAVE_ARCH_SECCOMP_FILTER=y\nCONFIG_SECCOMP=y\nCONFIG_SECCOMP_FILTER=y\n# CONFIG_SECCOMP_CACHE_DEBUG is not set\nCONFIG_HAVE_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR=y\nCONFIG_STACKPROTECTOR_STRONG=y\nCONFIG_LTO_NONE=y\nCONFIG_HAVE_CONTEXT_TRACKING_USER=y\nCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y\nCONFIG_HAVE_IRQ_TIME_ACCOUNTING=y\nCONFIG_HAVE_MOD_ARCH_SPECIFIC=y\nCONFIG_MODULES_USE_ELF_REL=y\nCONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y\nCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_SOFTIRQ_ON_OWN_STACK=y\nCONFIG_ARCH_HAS_ELF_RANDOMIZE=y\nCONFIG_HAVE_ARCH_MMAP_RND_BITS=y\nCONFIG_HAVE_EXIT_THREAD=y\nCONFIG_ARCH_MMAP_RND_BITS=8\nCONFIG_PAGE_SIZE_LESS_THAN_64KB=y\nCONFIG_PAGE_SIZE_LESS_THAN_256KB=y\nCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y\nCONFIG_CLONE_BACKWARDS=y\nCONFIG_OLD_SIGSUSPEND3=y\nCONFIG_OLD_SIGACTION=y\nCONFIG_COMPAT_32BIT_TIME=y\nCONFIG_HAVE_ARCH_VMAP_STACK=y\nCONFIG_VMAP_STACK=y\nCONFIG_ARCH_OPTIONAL_KERNEL_RWX=y\nCONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y\nCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y\nCONFIG_STRICT_KERNEL_RWX=y\nCONFIG_ARCH_HAS_STRICT_MODULE_RWX=y\nCONFIG_STRICT_MODULE_RWX=y\n# CONFIG_LOCK_EVENT_COUNTS is not set\nCONFIG_ARCH_WANT_LD_ORPHAN_WARN=y\nCONFIG_HAVE_ARCH_PFN_VALID=y\n\n#\n# GCOV-based kernel profiling\n#\n# CONFIG_GCOV_KERNEL is not set\nCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y\n# end of GCOV-based kernel profiling\n\nCONFIG_HAVE_GCC_PLUGINS=y\nCONFIG_GCC_PLUGINS=y\n# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set\n# end of General architecture-dependent options\n\nCONFIG_RT_MUTEXES=y\nCONFIG_BASE_SMALL=0\nCONFIG_MODULES=y\n# CONFIG_MODULE_FORCE_LOAD is not set\nCONFIG_MODULE_UNLOAD=y\n# CONFIG_MODULE_FORCE_UNLOAD is not set\n# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set\n# CONFIG_MODVERSIONS is not set\n# CONFIG_MODULE_SRCVERSION_ALL is not set\n# CONFIG_MODULE_SIG is not set\nCONFIG_MODULE_COMPRESS_NONE=y\n# CONFIG_MODULE_COMPRESS_GZIP is not set\n# CONFIG_MODULE_COMPRESS_XZ is not set\n# CONFIG_MODULE_COMPRESS_ZSTD is not set\n# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set\nCONFIG_MODPROBE_PATH=\"/sbin/modprobe\"\nCONFIG_MODULES_TREE_LOOKUP=y\nCONFIG_BLOCK=y\n# CONFIG_BLOCK_LEGACY_AUTOLOAD is not set\nCONFIG_BLK_CGROUP_RWSTAT=y\nCONFIG_BLK_DEV_BSG_COMMON=y\nCONFIG_BLK_DEV_BSGLIB=y\n# CONFIG_BLK_DEV_INTEGRITY is not set\n# CONFIG_BLK_DEV_ZONED is not set\nCONFIG_BLK_DEV_THROTTLING=y\n# CONFIG_BLK_DEV_THROTTLING_LOW is not set\n# CONFIG_BLK_WBT is not set\n# CONFIG_BLK_CGROUP_IOLATENCY is not set\n# CONFIG_BLK_CGROUP_IOCOST is not set\n# CONFIG_BLK_CGROUP_IOPRIO is not set\nCONFIG_BLK_DEBUG_FS=y\n# CONFIG_BLK_SED_OPAL is not set\n# CONFIG_BLK_INLINE_ENCRYPTION is not set\n\n#\n# Partition Types\n#\nCONFIG_PARTITION_ADVANCED=y\n# CONFIG_ACORN_PARTITION is not set\n# CONFIG_AIX_PARTITION is not set\n# CONFIG_OSF_PARTITION is not set\n# CONFIG_AMIGA_PARTITION is not set\n# CONFIG_ATARI_PARTITION is not set\nCONFIG_MAC_PARTITION=y\nCONFIG_MSDOS_PARTITION=y\n# CONFIG_BSD_DISKLABEL is not set\n# CONFIG_MINIX_SUBPARTITION is not set\n# CONFIG_SOLARIS_X86_PARTITION is not set\n# CONFIG_UNIXWARE_DISKLABEL is not set\n# CONFIG_LDM_PARTITION is not set\n# CONFIG_SGI_PARTITION is not set\n# CONFIG_ULTRIX_PARTITION is not set\n# CONFIG_SUN_PARTITION is not set\n# CONFIG_KARMA_PARTITION is not set\nCONFIG_EFI_PARTITION=y\n# CONFIG_SYSV68_PARTITION is not set\n# CONFIG_CMDLINE_PARTITION is not set\n# end of Partition Types\n\nCONFIG_BLK_PM=y\nCONFIG_BLOCK_HOLDER_DEPRECATED=y\nCONFIG_BLK_MQ_STACKING=y\n\n#\n# IO Schedulers\n#\nCONFIG_MQ_IOSCHED_DEADLINE=y\nCONFIG_MQ_IOSCHED_KYBER=y\n# CONFIG_IOSCHED_BFQ is not set\n# end of IO Schedulers\n\nCONFIG_ASN1=y\nCONFIG_UNINLINE_SPIN_UNLOCK=y\nCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y\nCONFIG_MUTEX_SPIN_ON_OWNER=y\nCONFIG_RWSEM_SPIN_ON_OWNER=y\nCONFIG_LOCK_SPIN_ON_OWNER=y\nCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y\nCONFIG_FREEZER=y\n\n#\n# Executable file formats\n#\nCONFIG_BINFMT_ELF=y\n# CONFIG_BINFMT_ELF_FDPIC is not set\nCONFIG_ELFCORE=y\nCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y\nCONFIG_BINFMT_SCRIPT=y\nCONFIG_ARCH_HAS_BINFMT_FLAT=y\n# CONFIG_BINFMT_FLAT is not set\nCONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y\n# CONFIG_BINFMT_MISC is not set\nCONFIG_COREDUMP=y\n# end of Executable file formats\n\n#\n# Memory Management options\n#\nCONFIG_SWAP=y\n# CONFIG_ZSWAP is not set\n\n#\n# SLAB allocator options\n#\n# CONFIG_SLAB is not set\nCONFIG_SLUB=y\nCONFIG_SLAB_MERGE_DEFAULT=y\n# CONFIG_SLAB_FREELIST_RANDOM is not set\n# CONFIG_SLAB_FREELIST_HARDENED is not set\n# CONFIG_SLUB_STATS is not set\nCONFIG_SLUB_CPU_PARTIAL=y\n# end of SLAB allocator options\n\n# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set\nCONFIG_COMPAT_BRK=y\nCONFIG_SELECT_MEMORY_MODEL=y\nCONFIG_FLATMEM_MANUAL=y\n# CONFIG_SPARSEMEM_MANUAL is not set\nCONFIG_FLATMEM=y\nCONFIG_ARCH_KEEP_MEMBLOCK=y\nCONFIG_MEMORY_ISOLATION=y\nCONFIG_SPLIT_PTLOCK_CPUS=4\nCONFIG_COMPACTION=y\nCONFIG_COMPACT_UNEVICTABLE_DEFAULT=1\n# CONFIG_PAGE_REPORTING is not set\nCONFIG_MIGRATION=y\nCONFIG_CONTIG_ALLOC=y\nCONFIG_BOUNCE=y\n# CONFIG_KSM is not set\nCONFIG_DEFAULT_MMAP_MIN_ADDR=4096\nCONFIG_ARCH_WANT_GENERAL_HUGETLB=y\nCONFIG_CMA=y\n# CONFIG_CMA_DEBUG is not set\n# CONFIG_CMA_DEBUGFS is not set\n# CONFIG_CMA_SYSFS is not set\nCONFIG_CMA_AREAS=7\nCONFIG_GENERIC_EARLY_IOREMAP=y\n# CONFIG_IDLE_PAGE_TRACKING is not set\nCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y\nCONFIG_VM_EVENT_COUNTERS=y\n# CONFIG_PERCPU_STATS is not set\n# CONFIG_GUP_TEST is not set\nCONFIG_KMAP_LOCAL=y\nCONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y\n# CONFIG_ANON_VMA_NAME is not set\n# CONFIG_USERFAULTFD is not set\n# CONFIG_LRU_GEN is not set\n\n#\n# Data Access Monitoring\n#\n# CONFIG_DAMON is not set\n# end of Data Access Monitoring\n# end of Memory Management options\n\nCONFIG_NET=y\nCONFIG_NET_INGRESS=y\nCONFIG_NET_EGRESS=y\nCONFIG_SKB_EXTENSIONS=y\n\n#\n# Networking options\n#\nCONFIG_PACKET=y\n# CONFIG_PACKET_DIAG is not set\nCONFIG_UNIX=y\nCONFIG_UNIX_SCM=y\nCONFIG_AF_UNIX_OOB=y\n# CONFIG_UNIX_DIAG is not set\n# CONFIG_TLS is not set\nCONFIG_XFRM=y\nCONFIG_XFRM_ALGO=y\nCONFIG_XFRM_USER=y\n# CONFIG_XFRM_INTERFACE is not set\n# CONFIG_XFRM_SUB_POLICY is not set\n# CONFIG_XFRM_MIGRATE is not set\n# CONFIG_XFRM_STATISTICS is not set\nCONFIG_XFRM_ESP=y\nCONFIG_NET_KEY=y\n# CONFIG_NET_KEY_MIGRATE is not set\n# CONFIG_XDP_SOCKETS is not set\nCONFIG_INET=y\nCONFIG_IP_MULTICAST=y\nCONFIG_IP_ADVANCED_ROUTER=y\n# CONFIG_IP_FIB_TRIE_STATS is not set\nCONFIG_IP_MULTIPLE_TABLES=y\n# CONFIG_IP_ROUTE_MULTIPATH is not set\n# CONFIG_IP_ROUTE_VERBOSE is not set\nCONFIG_IP_PNP=y\nCONFIG_IP_PNP_DHCP=y\nCONFIG_IP_PNP_BOOTP=y\nCONFIG_IP_PNP_RARP=y\n# CONFIG_NET_IPIP is not set\n# CONFIG_NET_IPGRE_DEMUX is not set\nCONFIG_NET_IP_TUNNEL=y\n# CONFIG_IP_MROUTE is not set\n# CONFIG_SYN_COOKIES is not set\n# CONFIG_NET_IPVTI is not set\nCONFIG_NET_UDP_TUNNEL=m\nCONFIG_NET_FOU=m\n# CONFIG_NET_FOU_IP_TUNNELS is not set\n# CONFIG_INET_AH is not set\nCONFIG_INET_ESP=y\n# CONFIG_INET_ESP_OFFLOAD is not set\n# CONFIG_INET_ESPINTCP is not set\n# CONFIG_INET_IPCOMP is not set\nCONFIG_INET_TABLE_PERTURB_ORDER=16\nCONFIG_INET_TUNNEL=y\nCONFIG_INET_DIAG=y\nCONFIG_INET_TCP_DIAG=y\n# CONFIG_INET_UDP_DIAG is not set\n# CONFIG_INET_RAW_DIAG is not set\n# CONFIG_INET_DIAG_DESTROY is not set\n# CONFIG_TCP_CONG_ADVANCED is not set\nCONFIG_TCP_CONG_CUBIC=y\nCONFIG_DEFAULT_TCP_CONG=\"cubic\"\n# CONFIG_TCP_MD5SIG is not set\nCONFIG_IPV6=y\n# CONFIG_IPV6_ROUTER_PREF is not set\n# CONFIG_IPV6_OPTIMISTIC_DAD is not set\n# CONFIG_INET6_AH is not set\n# CONFIG_INET6_ESP is not set\n# CONFIG_INET6_IPCOMP is not set\n# CONFIG_IPV6_MIP6 is not set\n# CONFIG_IPV6_ILA is not set\n# CONFIG_IPV6_VTI is not set\nCONFIG_IPV6_SIT=y\n# CONFIG_IPV6_SIT_6RD is not set\nCONFIG_IPV6_NDISC_NODETYPE=y\n# CONFIG_IPV6_TUNNEL is not set\nCONFIG_IPV6_FOU=m\n# CONFIG_IPV6_MULTIPLE_TABLES is not set\n# CONFIG_IPV6_MROUTE is not set\n# CONFIG_IPV6_SEG6_LWTUNNEL is not set\n# CONFIG_IPV6_SEG6_HMAC is not set\n# CONFIG_IPV6_RPL_LWTUNNEL is not set\n# CONFIG_IPV6_IOAM6_LWTUNNEL is not set\n# CONFIG_MPTCP is not set\n# CONFIG_NETWORK_SECMARK is not set\n# CONFIG_NETWORK_PHY_TIMESTAMPING is not set\nCONFIG_NETFILTER=y\nCONFIG_NETFILTER_ADVANCED=y\nCONFIG_BRIDGE_NETFILTER=m\n\n#\n# Core Netfilter Configuration\n#\nCONFIG_NETFILTER_INGRESS=y\nCONFIG_NETFILTER_EGRESS=y\nCONFIG_NETFILTER_FAMILY_BRIDGE=y\n# CONFIG_NETFILTER_NETLINK_ACCT is not set\n# CONFIG_NETFILTER_NETLINK_QUEUE is not set\n# CONFIG_NETFILTER_NETLINK_LOG is not set\n# CONFIG_NETFILTER_NETLINK_OSF is not set\nCONFIG_NF_CONNTRACK=m\n# CONFIG_NF_LOG_SYSLOG is not set\n# CONFIG_NF_CONNTRACK_MARK is not set\n# CONFIG_NF_CONNTRACK_ZONES is not set\n# CONFIG_NF_CONNTRACK_PROCFS is not set\n# CONFIG_NF_CONNTRACK_EVENTS is not set\n# CONFIG_NF_CONNTRACK_TIMEOUT is not set\n# CONFIG_NF_CONNTRACK_TIMESTAMP is not set\n# CONFIG_NF_CONNTRACK_LABELS is not set\nCONFIG_NF_CT_PROTO_DCCP=y\nCONFIG_NF_CT_PROTO_SCTP=y\nCONFIG_NF_CT_PROTO_UDPLITE=y\n# CONFIG_NF_CONNTRACK_AMANDA is not set\nCONFIG_NF_CONNTRACK_FTP=m\n# CONFIG_NF_CONNTRACK_H323 is not set\n# CONFIG_NF_CONNTRACK_IRC is not set\n# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set\n# CONFIG_NF_CONNTRACK_SNMP is not set\n# CONFIG_NF_CONNTRACK_PPTP is not set\n# CONFIG_NF_CONNTRACK_SANE is not set\n# CONFIG_NF_CONNTRACK_SIP is not set\nCONFIG_NF_CONNTRACK_TFTP=m\n# CONFIG_NF_CT_NETLINK is not set\nCONFIG_NF_NAT=m\nCONFIG_NF_NAT_FTP=m\nCONFIG_NF_NAT_TFTP=m\nCONFIG_NF_NAT_REDIRECT=y\nCONFIG_NF_NAT_MASQUERADE=y\n# CONFIG_NF_TABLES is not set\nCONFIG_NETFILTER_XTABLES=m\n\n#\n# Xtables combined modules\n#\nCONFIG_NETFILTER_XT_MARK=m\n# CONFIG_NETFILTER_XT_CONNMARK is not set\n\n#\n# Xtables targets\n#\n# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set\n# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set\n# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_DSCP is not set\n# CONFIG_NETFILTER_XT_TARGET_HL is not set\n# CONFIG_NETFILTER_XT_TARGET_HMARK is not set\n# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set\n# CONFIG_NETFILTER_XT_TARGET_LED is not set\n# CONFIG_NETFILTER_XT_TARGET_LOG is not set\n# CONFIG_NETFILTER_XT_TARGET_MARK is not set\nCONFIG_NETFILTER_XT_NAT=m\n# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set\n# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set\n# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set\n# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set\nCONFIG_NETFILTER_XT_TARGET_REDIRECT=m\nCONFIG_NETFILTER_XT_TARGET_MASQUERADE=m\n# CONFIG_NETFILTER_XT_TARGET_TEE is not set\n# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set\n# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set\n\n#\n# Xtables matches\n#\nCONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m\n# CONFIG_NETFILTER_XT_MATCH_BPF is not set\n# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set\nCONFIG_NETFILTER_XT_MATCH_COMMENT=m\n# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set\nCONFIG_NETFILTER_XT_MATCH_CONNTRACK=m\n# CONFIG_NETFILTER_XT_MATCH_CPU is not set\n# CONFIG_NETFILTER_XT_MATCH_DCCP is not set\n# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set\n# CONFIG_NETFILTER_XT_MATCH_DSCP is not set\n# CONFIG_NETFILTER_XT_MATCH_ECN is not set\n# CONFIG_NETFILTER_XT_MATCH_ESP is not set\n# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_HELPER is not set\n# CONFIG_NETFILTER_XT_MATCH_HL is not set\n# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set\n# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set\nCONFIG_NETFILTER_XT_MATCH_IPVS=m\n# CONFIG_NETFILTER_XT_MATCH_L2TP is not set\n# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set\n# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set\n# CONFIG_NETFILTER_XT_MATCH_MAC is not set\n# CONFIG_NETFILTER_XT_MATCH_MARK is not set\n# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set\n# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set\n# CONFIG_NETFILTER_XT_MATCH_OSF is not set\n# CONFIG_NETFILTER_XT_MATCH_OWNER is not set\n# CONFIG_NETFILTER_XT_MATCH_POLICY is not set\n# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set\n# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set\n# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set\n# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set\n# CONFIG_NETFILTER_XT_MATCH_REALM is not set\n# CONFIG_NETFILTER_XT_MATCH_RECENT is not set\n# CONFIG_NETFILTER_XT_MATCH_SCTP is not set\n# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set\n# CONFIG_NETFILTER_XT_MATCH_STATE is not set\n# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set\n# CONFIG_NETFILTER_XT_MATCH_STRING is not set\n# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set\n# CONFIG_NETFILTER_XT_MATCH_TIME is not set\n# CONFIG_NETFILTER_XT_MATCH_U32 is not set\n# end of Core Netfilter Configuration\n\n# CONFIG_IP_SET is not set\nCONFIG_IP_VS=m\n# CONFIG_IP_VS_IPV6 is not set\n# CONFIG_IP_VS_DEBUG is not set\nCONFIG_IP_VS_TAB_BITS=12\n\n#\n# IPVS transport protocol load balancing support\n#\nCONFIG_IP_VS_PROTO_TCP=y\nCONFIG_IP_VS_PROTO_UDP=y\n# CONFIG_IP_VS_PROTO_ESP is not set\n# CONFIG_IP_VS_PROTO_AH is not set\n# CONFIG_IP_VS_PROTO_SCTP is not set\n\n#\n# IPVS scheduler\n#\nCONFIG_IP_VS_RR=m\n# CONFIG_IP_VS_WRR is not set\n# CONFIG_IP_VS_LC is not set\n# CONFIG_IP_VS_WLC is not set\n# CONFIG_IP_VS_FO is not set\n# CONFIG_IP_VS_OVF is not set\n# CONFIG_IP_VS_LBLC is not set\n# CONFIG_IP_VS_LBLCR is not set\n# CONFIG_IP_VS_DH is not set\n# CONFIG_IP_VS_SH is not set\n# CONFIG_IP_VS_MH is not set\n# CONFIG_IP_VS_SED is not set\n# CONFIG_IP_VS_NQ is not set\n# CONFIG_IP_VS_TWOS is not set\n\n#\n# IPVS SH scheduler\n#\nCONFIG_IP_VS_SH_TAB_BITS=8\n\n#\n# IPVS MH scheduler\n#\nCONFIG_IP_VS_MH_TAB_INDEX=12\n\n#\n# IPVS application helper\n#\n# CONFIG_IP_VS_FTP is not set\nCONFIG_IP_VS_NFCT=y\n\n#\n# IP: Netfilter Configuration\n#\nCONFIG_NF_DEFRAG_IPV4=m\n# CONFIG_NF_SOCKET_IPV4 is not set\n# CONFIG_NF_TPROXY_IPV4 is not set\n# CONFIG_NF_DUP_IPV4 is not set\n# CONFIG_NF_LOG_ARP is not set\n# CONFIG_NF_LOG_IPV4 is not set\nCONFIG_NF_REJECT_IPV4=m\nCONFIG_IP_NF_IPTABLES=m\n# CONFIG_IP_NF_MATCH_AH is not set\n# CONFIG_IP_NF_MATCH_ECN is not set\n# CONFIG_IP_NF_MATCH_RPFILTER is not set\n# CONFIG_IP_NF_MATCH_TTL is not set\nCONFIG_IP_NF_FILTER=m\nCONFIG_IP_NF_TARGET_REJECT=m\n# CONFIG_IP_NF_TARGET_SYNPROXY is not set\nCONFIG_IP_NF_NAT=m\nCONFIG_IP_NF_TARGET_MASQUERADE=m\n# CONFIG_IP_NF_TARGET_NETMAP is not set\nCONFIG_IP_NF_TARGET_REDIRECT=m\nCONFIG_IP_NF_MANGLE=m\n# CONFIG_IP_NF_TARGET_CLUSTERIP is not set\n# CONFIG_IP_NF_TARGET_ECN is not set\n# CONFIG_IP_NF_TARGET_TTL is not set\n# CONFIG_IP_NF_RAW is not set\n# CONFIG_IP_NF_ARPTABLES is not set\n# end of IP: Netfilter Configuration\n\n#\n# IPv6: Netfilter Configuration\n#\n# CONFIG_NF_SOCKET_IPV6 is not set\n# CONFIG_NF_TPROXY_IPV6 is not set\n# CONFIG_NF_DUP_IPV6 is not set\nCONFIG_NF_REJECT_IPV6=m\n# CONFIG_NF_LOG_IPV6 is not set\nCONFIG_IP6_NF_IPTABLES=m\n# CONFIG_IP6_NF_MATCH_AH is not set\n# CONFIG_IP6_NF_MATCH_EUI64 is not set\n# CONFIG_IP6_NF_MATCH_FRAG is not set\n# CONFIG_IP6_NF_MATCH_OPTS is not set\n# CONFIG_IP6_NF_MATCH_HL is not set\n# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set\n# CONFIG_IP6_NF_MATCH_MH is not set\n# CONFIG_IP6_NF_MATCH_RPFILTER is not set\n# CONFIG_IP6_NF_MATCH_RT is not set\n# CONFIG_IP6_NF_MATCH_SRH is not set\n# CONFIG_IP6_NF_TARGET_HL is not set\nCONFIG_IP6_NF_FILTER=m\nCONFIG_IP6_NF_TARGET_REJECT=m\n# CONFIG_IP6_NF_TARGET_SYNPROXY is not set\nCONFIG_IP6_NF_MANGLE=m\n# CONFIG_IP6_NF_RAW is not set\nCONFIG_IP6_NF_NAT=m\nCONFIG_IP6_NF_TARGET_MASQUERADE=m\n# CONFIG_IP6_NF_TARGET_NPT is not set\n# end of IPv6: Netfilter Configuration\n\nCONFIG_NF_DEFRAG_IPV6=m\n# CONFIG_NF_CONNTRACK_BRIDGE is not set\n# CONFIG_BRIDGE_NF_EBTABLES is not set\n# CONFIG_BPFILTER is not set\n# CONFIG_IP_DCCP is not set\n# CONFIG_IP_SCTP is not set\n# CONFIG_RDS is not set\n# CONFIG_TIPC is not set\n# CONFIG_ATM is not set\n# CONFIG_L2TP is not set\nCONFIG_STP=m\nCONFIG_BRIDGE=m\nCONFIG_BRIDGE_IGMP_SNOOPING=y\nCONFIG_BRIDGE_VLAN_FILTERING=y\n# CONFIG_BRIDGE_MRP is not set\n# CONFIG_BRIDGE_CFM is not set\n# CONFIG_NET_DSA is not set\nCONFIG_VLAN_8021Q=m\n# CONFIG_VLAN_8021Q_GVRP is not set\n# CONFIG_VLAN_8021Q_MVRP is not set\nCONFIG_LLC=m\n# CONFIG_LLC2 is not set\n# CONFIG_ATALK is not set\n# CONFIG_X25 is not set\n# CONFIG_LAPB is not set\n# CONFIG_PHONET is not set\n# CONFIG_6LOWPAN is not set\n# CONFIG_IEEE802154 is not set\nCONFIG_NET_SCHED=y\n\n#\n# Queueing/Scheduling\n#\n# CONFIG_NET_SCH_CBQ is not set\n# CONFIG_NET_SCH_HTB is not set\n# CONFIG_NET_SCH_HFSC is not set\n# CONFIG_NET_SCH_PRIO is not set\n# CONFIG_NET_SCH_MULTIQ is not set\n# CONFIG_NET_SCH_RED is not set\n# CONFIG_NET_SCH_SFB is not set\n# CONFIG_NET_SCH_SFQ is not set\n# CONFIG_NET_SCH_TEQL is not set\n# CONFIG_NET_SCH_TBF is not set\n# CONFIG_NET_SCH_CBS is not set\n# CONFIG_NET_SCH_ETF is not set\n# CONFIG_NET_SCH_TAPRIO is not set\n# CONFIG_NET_SCH_GRED is not set\n# CONFIG_NET_SCH_DSMARK is not set\n# CONFIG_NET_SCH_NETEM is not set\n# CONFIG_NET_SCH_DRR is not set\n# CONFIG_NET_SCH_MQPRIO is not set\n# CONFIG_NET_SCH_SKBPRIO is not set\n# CONFIG_NET_SCH_CHOKE is not set\n# CONFIG_NET_SCH_QFQ is not set\n# CONFIG_NET_SCH_CODEL is not set\n# CONFIG_NET_SCH_FQ_CODEL is not set\n# CONFIG_NET_SCH_CAKE is not set\n# CONFIG_NET_SCH_FQ is not set\n# CONFIG_NET_SCH_HHF is not set\n# CONFIG_NET_SCH_PIE is not set\n# CONFIG_NET_SCH_PLUG is not set\n# CONFIG_NET_SCH_ETS is not set\n# CONFIG_NET_SCH_DEFAULT is not set\n\n#\n# Classification\n#\nCONFIG_NET_CLS=y\n# CONFIG_NET_CLS_BASIC is not set\n# CONFIG_NET_CLS_TCINDEX is not set\n# CONFIG_NET_CLS_ROUTE4 is not set\n# CONFIG_NET_CLS_FW is not set\n# CONFIG_NET_CLS_U32 is not set\n# CONFIG_NET_CLS_RSVP is not set\n# CONFIG_NET_CLS_RSVP6 is not set\n# CONFIG_NET_CLS_FLOW is not set\nCONFIG_NET_CLS_CGROUP=m\n# CONFIG_NET_CLS_BPF is not set\n# CONFIG_NET_CLS_FLOWER is not set\n# CONFIG_NET_CLS_MATCHALL is not set\n# CONFIG_NET_EMATCH is not set\n# CONFIG_NET_CLS_ACT is not set\nCONFIG_NET_SCH_FIFO=y\n# CONFIG_DCB is not set\nCONFIG_DNS_RESOLVER=y\n# CONFIG_BATMAN_ADV is not set\n# CONFIG_OPENVSWITCH is not set\n# CONFIG_VSOCKETS is not set\n# CONFIG_NETLINK_DIAG is not set\n# CONFIG_MPLS is not set\n# CONFIG_NET_NSH is not set\n# CONFIG_HSR is not set\n# CONFIG_NET_SWITCHDEV is not set\nCONFIG_NET_L3_MASTER_DEV=y\n# CONFIG_QRTR is not set\n# CONFIG_NET_NCSI is not set\nCONFIG_PCPU_DEV_REFCNT=y\nCONFIG_RPS=y\nCONFIG_RFS_ACCEL=y\nCONFIG_SOCK_RX_QUEUE_MAPPING=y\nCONFIG_XPS=y\nCONFIG_CGROUP_NET_PRIO=y\nCONFIG_CGROUP_NET_CLASSID=y\nCONFIG_NET_RX_BUSY_POLL=y\nCONFIG_BQL=y\n# CONFIG_BPF_STREAM_PARSER is not set\nCONFIG_NET_FLOW_LIMIT=y\n\n#\n# Network testing\n#\n# CONFIG_NET_PKTGEN is not set\n# CONFIG_NET_DROP_MONITOR is not set\n# end of Network testing\n# end of Networking options\n\n# CONFIG_HAMRADIO is not set\n# CONFIG_CAN is not set\nCONFIG_BT=m\nCONFIG_BT_BREDR=y\nCONFIG_BT_RFCOMM=m\nCONFIG_BT_RFCOMM_TTY=y\nCONFIG_BT_BNEP=m\nCONFIG_BT_BNEP_MC_FILTER=y\nCONFIG_BT_BNEP_PROTO_FILTER=y\nCONFIG_BT_HIDP=m\nCONFIG_BT_HS=y\nCONFIG_BT_LE=y\nCONFIG_BT_LEDS=y\n# CONFIG_BT_MSFTEXT is not set\n# CONFIG_BT_AOSPEXT is not set\nCONFIG_BT_DEBUGFS=y\n# CONFIG_BT_SELFTEST is not set\n\n#\n# Bluetooth device drivers\n#\nCONFIG_BT_INTEL=m\nCONFIG_BT_BCM=m\nCONFIG_BT_RTL=m\nCONFIG_BT_HCIBTUSB=m\n# CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set\nCONFIG_BT_HCIBTUSB_BCM=y\n# CONFIG_BT_HCIBTUSB_MTK is not set\nCONFIG_BT_HCIBTUSB_RTL=y\nCONFIG_BT_HCIBTSDIO=m\nCONFIG_BT_HCIUART=m\nCONFIG_BT_HCIUART_H4=y\nCONFIG_BT_HCIUART_BCSP=y\nCONFIG_BT_HCIUART_ATH3K=y\nCONFIG_BT_HCIUART_INTEL=y\nCONFIG_BT_HCIUART_AG6XX=y\nCONFIG_BT_HCIBCM203X=m\nCONFIG_BT_HCIBPA10X=m\nCONFIG_BT_HCIBFUSB=m\nCONFIG_BT_HCIVHCI=m\nCONFIG_BT_MRVL=m\nCONFIG_BT_MRVL_SDIO=m\nCONFIG_BT_ATH3K=m\n# CONFIG_BT_MTKSDIO is not set\n# end of Bluetooth device drivers\n\n# CONFIG_AF_RXRPC is not set\n# CONFIG_AF_KCM is not set\n# CONFIG_MCTP is not set\nCONFIG_FIB_RULES=y\nCONFIG_WIRELESS=y\nCONFIG_WIRELESS_EXT=y\nCONFIG_WEXT_CORE=y\nCONFIG_WEXT_PROC=y\nCONFIG_WEXT_PRIV=y\nCONFIG_CFG80211=m\n# CONFIG_NL80211_TESTMODE is not set\n# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set\nCONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y\nCONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y\nCONFIG_CFG80211_DEFAULT_PS=y\n# CONFIG_CFG80211_DEBUGFS is not set\nCONFIG_CFG80211_CRDA_SUPPORT=y\nCONFIG_CFG80211_WEXT=y\nCONFIG_LIB80211=m\nCONFIG_LIB80211_CRYPT_WEP=m\nCONFIG_LIB80211_CRYPT_CCMP=m\n# CONFIG_LIB80211_DEBUG is not set\nCONFIG_MAC80211=m\nCONFIG_MAC80211_HAS_RC=y\nCONFIG_MAC80211_RC_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT_MINSTREL=y\nCONFIG_MAC80211_RC_DEFAULT=\"minstrel_ht\"\n# CONFIG_MAC80211_MESH is not set\nCONFIG_MAC80211_LEDS=y\n# CONFIG_MAC80211_DEBUGFS is not set\n# CONFIG_MAC80211_MESSAGE_TRACING is not set\n# CONFIG_MAC80211_DEBUG_MENU is not set\nCONFIG_MAC80211_STA_HASH_MAX_SIZE=0\nCONFIG_RFKILL=m\nCONFIG_RFKILL_LEDS=y\nCONFIG_RFKILL_INPUT=y\n# CONFIG_RFKILL_GPIO is not set\n# CONFIG_NET_9P is not set\n# CONFIG_CAIF is not set\n# CONFIG_CEPH_LIB is not set\n# CONFIG_NFC is not set\n# CONFIG_PSAMPLE is not set\n# CONFIG_NET_IFE is not set\n# CONFIG_LWTUNNEL is not set\nCONFIG_DST_CACHE=y\nCONFIG_GRO_CELLS=y\nCONFIG_NET_SELFTESTS=y\nCONFIG_NET_SOCK_MSG=y\nCONFIG_PAGE_POOL=y\n# CONFIG_PAGE_POOL_STATS is not set\n# CONFIG_FAILOVER is not set\nCONFIG_ETHTOOL_NETLINK=y\n\n#\n# Device Drivers\n#\nCONFIG_ARM_AMBA=y\nCONFIG_HAVE_PCI=y\n# CONFIG_PCI is not set\n# CONFIG_PCCARD is not set\n\n#\n# Generic Driver Options\n#\n# CONFIG_UEVENT_HELPER is not set\nCONFIG_DEVTMPFS=y\nCONFIG_DEVTMPFS_MOUNT=y\n# CONFIG_DEVTMPFS_SAFE is not set\nCONFIG_STANDALONE=y\nCONFIG_PREVENT_FIRMWARE_BUILD=y\n\n#\n# Firmware loader\n#\nCONFIG_FW_LOADER=y\nCONFIG_EXTRA_FIRMWARE=\"\"\n# CONFIG_FW_LOADER_USER_HELPER is not set\n# CONFIG_FW_LOADER_COMPRESS is not set\nCONFIG_FW_CACHE=y\n# CONFIG_FW_UPLOAD is not set\n# end of Firmware loader\n\nCONFIG_WANT_DEV_COREDUMP=y\nCONFIG_ALLOW_DEV_COREDUMP=y\nCONFIG_DEV_COREDUMP=y\n# CONFIG_DEBUG_DRIVER is not set\n# CONFIG_DEBUG_DEVRES is not set\n# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set\n# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set\nCONFIG_GENERIC_CPU_AUTOPROBE=y\nCONFIG_GENERIC_CPU_VULNERABILITIES=y\nCONFIG_SOC_BUS=y\nCONFIG_REGMAP=y\nCONFIG_REGMAP_I2C=y\nCONFIG_REGMAP_SPI=y\nCONFIG_REGMAP_MMIO=y\nCONFIG_REGMAP_IRQ=y\nCONFIG_DMA_SHARED_BUFFER=y\n# CONFIG_DMA_FENCE_TRACE is not set\nCONFIG_GENERIC_ARCH_TOPOLOGY=y\n# end of Generic Driver Options\n\n#\n# Bus devices\n#\nCONFIG_ARM_CCI=y\nCONFIG_ARM_CCI400_COMMON=y\nCONFIG_ARM_CCI400_PORT_CTRL=y\n# CONFIG_BRCMSTB_GISB_ARB is not set\n# CONFIG_MOXTET is not set\n# CONFIG_VEXPRESS_CONFIG is not set\n# CONFIG_MHI_BUS is not set\n# CONFIG_MHI_BUS_EP is not set\n# end of Bus devices\n\n# CONFIG_CONNECTOR is not set\n\n#\n# Firmware Drivers\n#\n\n#\n# ARM System Control and Management Interface Protocol\n#\n# CONFIG_ARM_SCMI_PROTOCOL is not set\n# end of ARM System Control and Management Interface Protocol\n\n# CONFIG_FW_CFG_SYSFS is not set\n# CONFIG_TRUSTED_FOUNDATIONS is not set\n# CONFIG_GOOGLE_FIRMWARE is not set\nCONFIG_HAVE_ARM_SMCCC=y\n\n#\n# Tegra firmware driver\n#\n# end of Tegra firmware driver\n# end of Firmware Drivers\n\n# CONFIG_GNSS is not set\n# CONFIG_MTD is not set\nCONFIG_DTC=y\nCONFIG_OF=y\n# CONFIG_OF_UNITTEST is not set\nCONFIG_OF_FLATTREE=y\nCONFIG_OF_EARLY_FLATTREE=y\nCONFIG_OF_KOBJ=y\nCONFIG_OF_DYNAMIC=y\nCONFIG_OF_ADDRESS=y\nCONFIG_OF_IRQ=y\nCONFIG_OF_RESERVED_MEM=y\nCONFIG_OF_RESOLVE=y\nCONFIG_OF_OVERLAY=y\nCONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y\n# CONFIG_PARPORT is not set\nCONFIG_BLK_DEV=y\n# CONFIG_BLK_DEV_NULL_BLK is not set\nCONFIG_CDROM=y\n# CONFIG_ZRAM is not set\nCONFIG_BLK_DEV_LOOP=y\nCONFIG_BLK_DEV_LOOP_MIN_COUNT=8\n# CONFIG_BLK_DEV_DRBD is not set\nCONFIG_BLK_DEV_NBD=y\nCONFIG_BLK_DEV_RAM=y\nCONFIG_BLK_DEV_RAM_COUNT=16\nCONFIG_BLK_DEV_RAM_SIZE=4096\n# CONFIG_CDROM_PKTCDVD is not set\n# CONFIG_ATA_OVER_ETH is not set\n# CONFIG_BLK_DEV_RBD is not set\n# CONFIG_BLK_DEV_UBLK is not set\n\n#\n# NVME Support\n#\n# CONFIG_NVME_FC is not set\n# CONFIG_NVME_TCP is not set\n# CONFIG_NVME_TARGET is not set\n# end of NVME Support\n\n#\n# Misc devices\n#\n# CONFIG_AD525X_DPOT is not set\n# CONFIG_DUMMY_IRQ is not set\n# CONFIG_ICS932S401 is not set\n# CONFIG_ENCLOSURE_SERVICES is not set\n# CONFIG_APDS9802ALS is not set\n# CONFIG_ISL29003 is not set\n# CONFIG_ISL29020 is not set\n# CONFIG_SENSORS_TSL2550 is not set\n# CONFIG_SENSORS_BH1770 is not set\n# CONFIG_SENSORS_APDS990X is not set\n# CONFIG_HMC6352 is not set\n# CONFIG_DS1682 is not set\n# CONFIG_LATTICE_ECP3_CONFIG is not set\nCONFIG_SRAM=y\nCONFIG_SRAM_EXEC=y\n# CONFIG_XILINX_SDFEC is not set\n# CONFIG_HISI_HIKEY_USB is not set\n# CONFIG_OPEN_DICE is not set\n# CONFIG_VCPU_STALL_DETECTOR is not set\n# CONFIG_C2PORT is not set\n\n#\n# EEPROM support\n#\n# CONFIG_EEPROM_AT24 is not set\n# CONFIG_EEPROM_AT25 is not set\n# CONFIG_EEPROM_LEGACY is not set\n# CONFIG_EEPROM_MAX6875 is not set\nCONFIG_EEPROM_93CX6=m\n# CONFIG_EEPROM_93XX46 is not set\n# CONFIG_EEPROM_IDT_89HPESX is not set\n# CONFIG_EEPROM_EE1004 is not set\n# end of EEPROM support\n\n#\n# Texas Instruments shared transport line discipline\n#\n# CONFIG_TI_ST is not set\n# end of Texas Instruments shared transport line discipline\n\n# CONFIG_SENSORS_LIS3_SPI is not set\n# CONFIG_SENSORS_LIS3_I2C is not set\n# CONFIG_ALTERA_STAPL is not set\n# CONFIG_ECHO is not set\n# CONFIG_MISC_RTSX_USB is not set\n# CONFIG_UACCE is not set\n# CONFIG_PVPANIC is not set\n# end of Misc devices\n\n#\n# SCSI device support\n#\nCONFIG_SCSI_MOD=y\n# CONFIG_RAID_ATTRS is not set\nCONFIG_SCSI_COMMON=y\nCONFIG_SCSI=y\nCONFIG_SCSI_DMA=y\n# CONFIG_SCSI_PROC_FS is not set\n\n#\n# SCSI support type (disk, tape, CD-ROM)\n#\nCONFIG_BLK_DEV_SD=y\n# CONFIG_CHR_DEV_ST is not set\nCONFIG_BLK_DEV_SR=y\nCONFIG_CHR_DEV_SG=m\nCONFIG_BLK_DEV_BSG=y\n# CONFIG_CHR_DEV_SCH is not set\n# CONFIG_SCSI_CONSTANTS is not set\n# CONFIG_SCSI_LOGGING is not set\n# CONFIG_SCSI_SCAN_ASYNC is not set\n\n#\n# SCSI Transports\n#\n# CONFIG_SCSI_SPI_ATTRS is not set\n# CONFIG_SCSI_FC_ATTRS is not set\n# CONFIG_SCSI_ISCSI_ATTRS is not set\n# CONFIG_SCSI_SAS_ATTRS is not set\n# CONFIG_SCSI_SAS_LIBSAS is not set\n# CONFIG_SCSI_SRP_ATTRS is not set\n# end of SCSI Transports\n\nCONFIG_SCSI_LOWLEVEL=y\n# CONFIG_ISCSI_TCP is not set\n# CONFIG_ISCSI_BOOT_SYSFS is not set\n# CONFIG_SCSI_DEBUG is not set\n# CONFIG_SCSI_DH is not set\n# end of SCSI device support\n\n# CONFIG_ATA is not set\nCONFIG_MD=y\n# CONFIG_BLK_DEV_MD is not set\n# CONFIG_BCACHE is not set\nCONFIG_BLK_DEV_DM_BUILTIN=y\nCONFIG_BLK_DEV_DM=m\n# CONFIG_DM_DEBUG is not set\nCONFIG_DM_BUFIO=m\n# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set\nCONFIG_DM_BIO_PRISON=m\nCONFIG_DM_PERSISTENT_DATA=m\n# CONFIG_DM_UNSTRIPED is not set\n# CONFIG_DM_CRYPT is not set\n# CONFIG_DM_SNAPSHOT is not set\nCONFIG_DM_THIN_PROVISIONING=m\n# CONFIG_DM_CACHE is not set\n# CONFIG_DM_WRITECACHE is not set\n# CONFIG_DM_ERA is not set\n# CONFIG_DM_CLONE is not set\n# CONFIG_DM_MIRROR is not set\n# CONFIG_DM_RAID is not set\n# CONFIG_DM_ZERO is not set\n# CONFIG_DM_MULTIPATH is not set\n# CONFIG_DM_DELAY is not set\n# CONFIG_DM_DUST is not set\n# CONFIG_DM_UEVENT is not set\n# CONFIG_DM_FLAKEY is not set\n# CONFIG_DM_VERITY is not set\n# CONFIG_DM_SWITCH is not set\n# CONFIG_DM_LOG_WRITES is not set\n# CONFIG_DM_INTEGRITY is not set\n# CONFIG_TARGET_CORE is not set\nCONFIG_NETDEVICES=y\nCONFIG_MII=y\nCONFIG_NET_CORE=y\n# CONFIG_BONDING is not set\nCONFIG_DUMMY=m\nCONFIG_WIREGUARD=m\n# CONFIG_WIREGUARD_DEBUG is not set\n# CONFIG_EQUALIZER is not set\n# CONFIG_NET_TEAM is not set\nCONFIG_MACVLAN=m\n# CONFIG_MACVTAP is not set\nCONFIG_IPVLAN_L3S=y\nCONFIG_IPVLAN=m\n# CONFIG_IPVTAP is not set\nCONFIG_VXLAN=m\n# CONFIG_GENEVE is not set\n# CONFIG_BAREUDP is not set\n# CONFIG_GTP is not set\n# CONFIG_AMT is not set\n# CONFIG_MACSEC is not set\nCONFIG_NETCONSOLE=y\nCONFIG_NETCONSOLE_DYNAMIC=y\nCONFIG_NETPOLL=y\nCONFIG_NET_POLL_CONTROLLER=y\nCONFIG_TUN=y\n# CONFIG_TUN_VNET_CROSS_LE is not set\nCONFIG_VETH=m\nCONFIG_NLMON=m\nCONFIG_ETHERNET=y\n# CONFIG_NET_VENDOR_ALACRITECH is not set\n# CONFIG_ALTERA_TSE is not set\n# CONFIG_NET_VENDOR_AMAZON is not set\n# CONFIG_NET_VENDOR_AQUANTIA is not set\n# CONFIG_NET_VENDOR_ARC is not set\n# CONFIG_NET_VENDOR_ASIX is not set\n# CONFIG_NET_VENDOR_BROADCOM is not set\n# CONFIG_NET_VENDOR_CADENCE is not set\n# CONFIG_NET_VENDOR_CAVIUM is not set\n# CONFIG_NET_VENDOR_CIRRUS is not set\n# CONFIG_NET_VENDOR_CORTINA is not set\n# CONFIG_NET_VENDOR_DAVICOM is not set\n# CONFIG_DNET is not set\n# CONFIG_NET_VENDOR_ENGLEDER is not set\n# CONFIG_NET_VENDOR_EZCHIP is not set\n# CONFIG_NET_VENDOR_FARADAY is not set\n# CONFIG_NET_VENDOR_FUNGIBLE is not set\n# CONFIG_NET_VENDOR_GOOGLE is not set\n# CONFIG_NET_VENDOR_HISILICON is not set\n# CONFIG_NET_VENDOR_HUAWEI is not set\n# CONFIG_NET_VENDOR_INTEL is not set\n# CONFIG_NET_VENDOR_WANGXUN is not set\n# CONFIG_NET_VENDOR_ADI is not set\n# CONFIG_NET_VENDOR_LITEX is not set\n# CONFIG_NET_VENDOR_MARVELL is not set\n# CONFIG_NET_VENDOR_MELLANOX is not set\n# CONFIG_NET_VENDOR_MICREL is not set\n# CONFIG_NET_VENDOR_MICROCHIP is not set\n# CONFIG_NET_VENDOR_MICROSEMI is not set\n# CONFIG_NET_VENDOR_MICROSOFT is not set\n# CONFIG_NET_VENDOR_NI is not set\n# CONFIG_NET_VENDOR_NATSEMI is not set\n# CONFIG_NET_VENDOR_NETRONOME is not set\n# CONFIG_ETHOC is not set\n# CONFIG_NET_VENDOR_PENSANDO is not set\n# CONFIG_NET_VENDOR_QUALCOMM is not set\n# CONFIG_NET_VENDOR_RENESAS is not set\n# CONFIG_NET_VENDOR_ROCKER is not set\n# CONFIG_NET_VENDOR_SAMSUNG is not set\n# CONFIG_NET_VENDOR_SEEQ is not set\n# CONFIG_NET_VENDOR_SOLARFLARE is not set\n# CONFIG_NET_VENDOR_SMSC is not set\n# CONFIG_NET_VENDOR_SOCIONEXT is not set\n# CONFIG_NET_VENDOR_STMICRO is not set\n# CONFIG_NET_VENDOR_SYNOPSYS is not set\n# CONFIG_NET_VENDOR_VERTEXCOM is not set\n# CONFIG_NET_VENDOR_VIA is not set\n# CONFIG_NET_VENDOR_WIZNET is not set\n# CONFIG_NET_VENDOR_XILINX is not set\nCONFIG_PHYLINK=y\nCONFIG_PHYLIB=y\nCONFIG_SWPHY=y\n# CONFIG_LED_TRIGGER_PHY is not set\nCONFIG_FIXED_PHY=y\n# CONFIG_SFP is not set\n\n#\n# MII PHY device drivers\n#\n# CONFIG_AMD_PHY is not set\n# CONFIG_ADIN_PHY is not set\n# CONFIG_ADIN1100_PHY is not set\n# CONFIG_AQUANTIA_PHY is not set\nCONFIG_AX88796B_PHY=y\n# CONFIG_BROADCOM_PHY is not set\n# CONFIG_BCM54140_PHY is not set\n# CONFIG_BCM7XXX_PHY is not set\n# CONFIG_BCM84881_PHY is not set\n# CONFIG_BCM87XX_PHY is not set\n# CONFIG_CICADA_PHY is not set\n# CONFIG_CORTINA_PHY is not set\n# CONFIG_DAVICOM_PHY is not set\n# CONFIG_ICPLUS_PHY is not set\n# CONFIG_LXT_PHY is not set\n# CONFIG_INTEL_XWAY_PHY is not set\n# CONFIG_LSI_ET1011C_PHY is not set\n# CONFIG_MARVELL_PHY is not set\n# CONFIG_MARVELL_10G_PHY is not set\n# CONFIG_MARVELL_88X2222_PHY is not set\n# CONFIG_MAXLINEAR_GPHY is not set\n# CONFIG_MEDIATEK_GE_PHY is not set\n# CONFIG_MICREL_PHY is not set\nCONFIG_MICROCHIP_PHY=m\n# CONFIG_MICROCHIP_T1_PHY is not set\n# CONFIG_MICROSEMI_PHY is not set\n# CONFIG_MOTORCOMM_PHY is not set\n# CONFIG_NATIONAL_PHY is not set\n# CONFIG_NXP_C45_TJA11XX_PHY is not set\n# CONFIG_NXP_TJA11XX_PHY is not set\n# CONFIG_AT803X_PHY is not set\n# CONFIG_QSEMI_PHY is not set\n# CONFIG_REALTEK_PHY is not set\n# CONFIG_RENESAS_PHY is not set\n# CONFIG_ROCKCHIP_PHY is not set\nCONFIG_SMSC_PHY=y\n# CONFIG_STE10XP is not set\n# CONFIG_TERANETICS_PHY is not set\n# CONFIG_DP83822_PHY is not set\n# CONFIG_DP83TC811_PHY is not set\n# CONFIG_DP83848_PHY is not set\n# CONFIG_DP83867_PHY is not set\n# CONFIG_DP83869_PHY is not set\n# CONFIG_DP83TD510_PHY is not set\n# CONFIG_VITESSE_PHY is not set\n# CONFIG_XILINX_GMII2RGMII is not set\n# CONFIG_MICREL_KS8995MA is not set\n# CONFIG_PSE_CONTROLLER is not set\nCONFIG_MDIO_DEVICE=y\nCONFIG_MDIO_BUS=y\nCONFIG_FWNODE_MDIO=y\nCONFIG_OF_MDIO=y\nCONFIG_MDIO_DEVRES=y\n# CONFIG_MDIO_BITBANG is not set\n# CONFIG_MDIO_BCM_UNIMAC is not set\n# CONFIG_MDIO_HISI_FEMAC is not set\n# CONFIG_MDIO_MVUSB is not set\n# CONFIG_MDIO_MSCC_MIIM is not set\n# CONFIG_MDIO_IPQ4019 is not set\n# CONFIG_MDIO_IPQ8064 is not set\n\n#\n# MDIO Multiplexers\n#\n# CONFIG_MDIO_BUS_MUX_GPIO is not set\n# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set\n# CONFIG_MDIO_BUS_MUX_MMIOREG is not set\n\n#\n# PCS device drivers\n#\n# end of PCS device drivers\n\n# CONFIG_PPP is not set\n# CONFIG_SLIP is not set\nCONFIG_USB_NET_DRIVERS=y\n# CONFIG_USB_CATC is not set\n# CONFIG_USB_KAWETH is not set\n# CONFIG_USB_PEGASUS is not set\nCONFIG_USB_RTL8150=m\nCONFIG_USB_RTL8152=y\nCONFIG_USB_LAN78XX=m\nCONFIG_USB_USBNET=y\nCONFIG_USB_NET_AX8817X=y\nCONFIG_USB_NET_AX88179_178A=y\nCONFIG_USB_NET_CDCETHER=y\n# CONFIG_USB_NET_CDC_EEM is not set\n# CONFIG_USB_NET_CDC_NCM is not set\n# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set\n# CONFIG_USB_NET_CDC_MBIM is not set\nCONFIG_USB_NET_DM9601=y\n# CONFIG_USB_NET_SR9700 is not set\n# CONFIG_USB_NET_SR9800 is not set\nCONFIG_USB_NET_SMSC75XX=m\nCONFIG_USB_NET_SMSC95XX=y\n# CONFIG_USB_NET_GL620A is not set\n# CONFIG_USB_NET_NET1080 is not set\n# CONFIG_USB_NET_PLUSB is not set\nCONFIG_USB_NET_MCS7830=m\nCONFIG_USB_NET_RNDIS_HOST=m\n# CONFIG_USB_NET_CDC_SUBSET is not set\n# CONFIG_USB_NET_ZAURUS is not set\n# CONFIG_USB_NET_CX82310_ETH is not set\n# CONFIG_USB_NET_KALMIA is not set\n# CONFIG_USB_NET_QMI_WWAN is not set\n# CONFIG_USB_HSO is not set\n# CONFIG_USB_NET_INT51X1 is not set\nCONFIG_USB_IPHETH=m\n# CONFIG_USB_SIERRA_NET is not set\n# CONFIG_USB_VL600 is not set\n# CONFIG_USB_NET_CH9200 is not set\n# CONFIG_USB_NET_AQC111 is not set\nCONFIG_USB_RTL8153_ECM=y\nCONFIG_WLAN=y\n# CONFIG_WLAN_VENDOR_ADMTEK is not set\nCONFIG_ATH_COMMON=m\nCONFIG_WLAN_VENDOR_ATH=y\n# CONFIG_ATH_DEBUG is not set\nCONFIG_ATH9K_HW=m\nCONFIG_ATH9K_COMMON=m\nCONFIG_ATH9K_BTCOEX_SUPPORT=y\nCONFIG_ATH9K=m\nCONFIG_ATH9K_AHB=y\n# CONFIG_ATH9K_DEBUGFS is not set\n# CONFIG_ATH9K_DYNACK is not set\n# CONFIG_ATH9K_WOW is not set\nCONFIG_ATH9K_RFKILL=y\nCONFIG_ATH9K_CHANNEL_CONTEXT=y\nCONFIG_ATH9K_PCOEM=y\nCONFIG_ATH9K_HTC=m\n# CONFIG_ATH9K_HTC_DEBUGFS is not set\nCONFIG_ATH9K_HWRNG=y\nCONFIG_CARL9170=m\nCONFIG_CARL9170_LEDS=y\nCONFIG_CARL9170_WPC=y\nCONFIG_CARL9170_HWRNG=y\nCONFIG_ATH6KL=m\n# CONFIG_ATH6KL_SDIO is not set\nCONFIG_ATH6KL_USB=m\n# CONFIG_ATH6KL_DEBUG is not set\n# CONFIG_ATH6KL_TRACING is not set\nCONFIG_AR5523=m\n# CONFIG_ATH10K is not set\nCONFIG_WCN36XX=m\n# CONFIG_WCN36XX_DEBUGFS is not set\n# CONFIG_WLAN_VENDOR_ATMEL is not set\nCONFIG_WLAN_VENDOR_BROADCOM=y\nCONFIG_B43=m\nCONFIG_B43_BCMA=y\nCONFIG_B43_SSB=y\nCONFIG_B43_BUSES_BCMA_AND_SSB=y\n# CONFIG_B43_BUSES_BCMA is not set\n# CONFIG_B43_BUSES_SSB is not set\n# CONFIG_B43_SDIO is not set\nCONFIG_B43_BCMA_PIO=y\nCONFIG_B43_PIO=y\nCONFIG_B43_PHY_G=y\nCONFIG_B43_PHY_N=y\nCONFIG_B43_PHY_LP=y\nCONFIG_B43_PHY_HT=y\nCONFIG_B43_LEDS=y\nCONFIG_B43_HWRNG=y\n# CONFIG_B43_DEBUG is not set\n# CONFIG_B43LEGACY is not set\nCONFIG_BRCMUTIL=m\nCONFIG_BRCMSMAC=m\nCONFIG_BRCMFMAC=m\n# CONFIG_BRCMFMAC_SDIO is not set\n# CONFIG_BRCMFMAC_USB is not set\n# CONFIG_BRCM_TRACING is not set\n# CONFIG_BRCMDBG is not set\n# CONFIG_WLAN_VENDOR_CISCO is not set\n# CONFIG_WLAN_VENDOR_INTEL is not set\n# CONFIG_WLAN_VENDOR_INTERSIL is not set\nCONFIG_WLAN_VENDOR_MARVELL=y\n# CONFIG_LIBERTAS is not set\n# CONFIG_LIBERTAS_THINFIRM is not set\n# CONFIG_MWIFIEX is not set\nCONFIG_WLAN_VENDOR_MEDIATEK=y\nCONFIG_MT7601U=m\nCONFIG_MT76_CORE=m\nCONFIG_MT76_LEDS=y\nCONFIG_MT76_USB=m\nCONFIG_MT76x02_LIB=m\nCONFIG_MT76x02_USB=m\nCONFIG_MT76x0_COMMON=m\nCONFIG_MT76x0U=m\nCONFIG_MT76x2_COMMON=m\nCONFIG_MT76x2U=m\n# CONFIG_MT7663U is not set\n# CONFIG_MT7663S is not set\n# CONFIG_MT7921S is not set\n# CONFIG_MT7921U is not set\nCONFIG_WLAN_VENDOR_MICROCHIP=y\n# CONFIG_WILC1000_SDIO is not set\n# CONFIG_WILC1000_SPI is not set\n# CONFIG_WLAN_VENDOR_PURELIFI is not set\nCONFIG_WLAN_VENDOR_RALINK=y\nCONFIG_RT2X00=m\nCONFIG_RT2500USB=m\nCONFIG_RT73USB=m\nCONFIG_RT2800USB=m\nCONFIG_RT2800USB_RT33XX=y\nCONFIG_RT2800USB_RT35XX=y\nCONFIG_RT2800USB_RT3573=y\nCONFIG_RT2800USB_RT53XX=y\nCONFIG_RT2800USB_RT55XX=y\nCONFIG_RT2800USB_UNKNOWN=y\nCONFIG_RT2800_LIB=m\nCONFIG_RT2X00_LIB_USB=m\nCONFIG_RT2X00_LIB=m\nCONFIG_RT2X00_LIB_FIRMWARE=y\nCONFIG_RT2X00_LIB_CRYPTO=y\nCONFIG_RT2X00_LIB_LEDS=y\n# CONFIG_RT2X00_DEBUG is not set\nCONFIG_WLAN_VENDOR_REALTEK=y\nCONFIG_RTL8187=m\nCONFIG_RTL8187_LEDS=y\nCONFIG_RTL_CARDS=m\n# CONFIG_RTL8192CU is not set\nCONFIG_RTL8XXXU=m\nCONFIG_RTL8XXXU_UNTESTED=y\nCONFIG_RTW88=m\nCONFIG_RTW88_CORE=m\nCONFIG_RTW88_USB=m\nCONFIG_RTW88_8822B=m\nCONFIG_RTW88_8822C=m\nCONFIG_RTW88_8723D=m\nCONFIG_RTW88_8821C=m\n# CONFIG_RTW88_8822BS is not set\nCONFIG_RTW88_8822BU=m\n# CONFIG_RTW88_8822CS is not set\nCONFIG_RTW88_8822CU=m\nCONFIG_RTW88_8723DU=m\n# CONFIG_RTW88_8821CS is not set\nCONFIG_RTW88_8821CU=m\n# CONFIG_RTW88_DEBUG is not set\n# CONFIG_RTW88_DEBUGFS is not set\n# CONFIG_RTW89 is not set\n# CONFIG_WLAN_VENDOR_RSI is not set\n# CONFIG_WLAN_VENDOR_SILABS is not set\n# CONFIG_WLAN_VENDOR_ST is not set\n# CONFIG_WLAN_VENDOR_TI is not set\n# CONFIG_WLAN_VENDOR_ZYDAS is not set\n# CONFIG_WLAN_VENDOR_QUANTENNA is not set\n# CONFIG_MAC80211_HWSIM is not set\nCONFIG_USB_NET_RNDIS_WLAN=m\n# CONFIG_VIRT_WIFI is not set\n# CONFIG_WAN is not set\n\n#\n# Wireless WAN\n#\n# CONFIG_WWAN is not set\n# end of Wireless WAN\n\n# CONFIG_NETDEVSIM is not set\n# CONFIG_NET_FAILOVER is not set\n# CONFIG_ISDN is not set\n\n#\n# Input device support\n#\nCONFIG_INPUT=y\nCONFIG_INPUT_LEDS=y\nCONFIG_INPUT_FF_MEMLESS=y\n# CONFIG_INPUT_SPARSEKMAP is not set\nCONFIG_INPUT_MATRIXKMAP=y\n\n#\n# Userland interfaces\n#\n# CONFIG_INPUT_MOUSEDEV is not set\n# CONFIG_INPUT_JOYDEV is not set\nCONFIG_INPUT_EVDEV=y\n# CONFIG_INPUT_EVBUG is not set\n\n#\n# Input Device Drivers\n#\nCONFIG_INPUT_KEYBOARD=y\n# CONFIG_KEYBOARD_ADC is not set\n# CONFIG_KEYBOARD_ADP5588 is not set\n# CONFIG_KEYBOARD_ADP5589 is not set\n# CONFIG_KEYBOARD_ATKBD is not set\n# CONFIG_KEYBOARD_QT1050 is not set\n# CONFIG_KEYBOARD_QT1070 is not set\n# CONFIG_KEYBOARD_QT2160 is not set\n# CONFIG_KEYBOARD_DLINK_DIR685 is not set\n# CONFIG_KEYBOARD_LKKBD is not set\nCONFIG_KEYBOARD_GPIO=y\n# CONFIG_KEYBOARD_GPIO_POLLED is not set\n# CONFIG_KEYBOARD_TCA6416 is not set\n# CONFIG_KEYBOARD_TCA8418 is not set\n# CONFIG_KEYBOARD_MATRIX is not set\n# CONFIG_KEYBOARD_LM8323 is not set\n# CONFIG_KEYBOARD_LM8333 is not set\n# CONFIG_KEYBOARD_MAX7359 is not set\n# CONFIG_KEYBOARD_MCS is not set\n# CONFIG_KEYBOARD_MPR121 is not set\n# CONFIG_KEYBOARD_NEWTON is not set\n# CONFIG_KEYBOARD_OPENCORES is not set\n# CONFIG_KEYBOARD_PINEPHONE is not set\n# CONFIG_KEYBOARD_SAMSUNG is not set\n# CONFIG_KEYBOARD_STOWAWAY is not set\n# CONFIG_KEYBOARD_SUNKBD is not set\n# CONFIG_KEYBOARD_OMAP4 is not set\n# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set\n# CONFIG_KEYBOARD_XTKBD is not set\n# CONFIG_KEYBOARD_CAP11XX is not set\n# CONFIG_KEYBOARD_BCM is not set\n# CONFIG_KEYBOARD_CYPRESS_SF is not set\n# CONFIG_INPUT_MOUSE is not set\n# CONFIG_INPUT_JOYSTICK is not set\n# CONFIG_INPUT_TABLET is not set\nCONFIG_INPUT_TOUCHSCREEN=y\nCONFIG_TOUCHSCREEN_ADS7846=m\n# CONFIG_TOUCHSCREEN_AD7877 is not set\n# CONFIG_TOUCHSCREEN_AD7879 is not set\n# CONFIG_TOUCHSCREEN_ADC is not set\n# CONFIG_TOUCHSCREEN_AR1021_I2C is not set\n# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set\n# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_BU21013 is not set\n# CONFIG_TOUCHSCREEN_BU21029 is not set\n# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMA140 is not set\n# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set\n# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set\n# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set\n# CONFIG_TOUCHSCREEN_DYNAPRO is not set\n# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set\n# CONFIG_TOUCHSCREEN_EETI is not set\nCONFIG_TOUCHSCREEN_EGALAX=m\n# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set\n# CONFIG_TOUCHSCREEN_EXC3000 is not set\n# CONFIG_TOUCHSCREEN_FUJITSU is not set\n# CONFIG_TOUCHSCREEN_GOODIX is not set\n# CONFIG_TOUCHSCREEN_HIDEEP is not set\n# CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set\n# CONFIG_TOUCHSCREEN_ILI210X is not set\n# CONFIG_TOUCHSCREEN_ILITEK is not set\n# CONFIG_TOUCHSCREEN_S6SY761 is not set\n# CONFIG_TOUCHSCREEN_GUNZE is not set\n# CONFIG_TOUCHSCREEN_EKTF2127 is not set\n# CONFIG_TOUCHSCREEN_ELAN is not set\n# CONFIG_TOUCHSCREEN_ELO is not set\n# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set\n# CONFIG_TOUCHSCREEN_WACOM_I2C is not set\n# CONFIG_TOUCHSCREEN_MAX11801 is not set\n# CONFIG_TOUCHSCREEN_MCS5000 is not set\n# CONFIG_TOUCHSCREEN_MMS114 is not set\n# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set\n# CONFIG_TOUCHSCREEN_MSG2638 is not set\n# CONFIG_TOUCHSCREEN_MTOUCH is not set\n# CONFIG_TOUCHSCREEN_IMAGIS is not set\n# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set\n# CONFIG_TOUCHSCREEN_INEXIO is not set\n# CONFIG_TOUCHSCREEN_MK712 is not set\n# CONFIG_TOUCHSCREEN_PENMOUNT is not set\n# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set\n# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set\n# CONFIG_TOUCHSCREEN_TOUCHWIN is not set\n# CONFIG_TOUCHSCREEN_PIXCIR is not set\n# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set\n# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set\n# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set\n# CONFIG_TOUCHSCREEN_TSC_SERIO is not set\n# CONFIG_TOUCHSCREEN_TSC2004 is not set\n# CONFIG_TOUCHSCREEN_TSC2005 is not set\n# CONFIG_TOUCHSCREEN_TSC2007 is not set\n# CONFIG_TOUCHSCREEN_RM_TS is not set\n# CONFIG_TOUCHSCREEN_SILEAD is not set\n# CONFIG_TOUCHSCREEN_SIS_I2C is not set\n# CONFIG_TOUCHSCREEN_ST1232 is not set\n# CONFIG_TOUCHSCREEN_STMFTS is not set\n# CONFIG_TOUCHSCREEN_SUR40 is not set\n# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set\n# CONFIG_TOUCHSCREEN_SX8654 is not set\n# CONFIG_TOUCHSCREEN_TPS6507X is not set\n# CONFIG_TOUCHSCREEN_ZET6223 is not set\n# CONFIG_TOUCHSCREEN_ZFORCE is not set\n# CONFIG_TOUCHSCREEN_COLIBRI_VF50 is not set\n# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set\n# CONFIG_TOUCHSCREEN_IQS5XX is not set\n# CONFIG_TOUCHSCREEN_ZINITIX is not set\nCONFIG_INPUT_MISC=y\n# CONFIG_INPUT_AD714X is not set\n# CONFIG_INPUT_ATMEL_CAPTOUCH is not set\n# CONFIG_INPUT_BMA150 is not set\n# CONFIG_INPUT_E3X0_BUTTON is not set\n# CONFIG_INPUT_MAX77693_HAPTIC is not set\n# CONFIG_INPUT_MAX8997_HAPTIC is not set\n# CONFIG_INPUT_MMA8450 is not set\n# CONFIG_INPUT_GPIO_BEEPER is not set\n# CONFIG_INPUT_GPIO_DECODER is not set\n# CONFIG_INPUT_GPIO_VIBRA is not set\n# CONFIG_INPUT_ATI_REMOTE2 is not set\n# CONFIG_INPUT_KEYSPAN_REMOTE is not set\n# CONFIG_INPUT_KXTJ9 is not set\n# CONFIG_INPUT_POWERMATE is not set\n# CONFIG_INPUT_YEALINK is not set\n# CONFIG_INPUT_CM109 is not set\n# CONFIG_INPUT_REGULATOR_HAPTIC is not set\nCONFIG_INPUT_UINPUT=y\n# CONFIG_INPUT_PCF8574 is not set\n# CONFIG_INPUT_PWM_BEEPER is not set\n# CONFIG_INPUT_PWM_VIBRA is not set\nCONFIG_INPUT_GPIO_ROTARY_ENCODER=m\n# CONFIG_INPUT_DA7280_HAPTICS is not set\n# CONFIG_INPUT_ADXL34X is not set\n# CONFIG_INPUT_IMS_PCU is not set\n# CONFIG_INPUT_IQS269A is not set\n# CONFIG_INPUT_IQS626A is not set\n# CONFIG_INPUT_IQS7222 is not set\n# CONFIG_INPUT_CMA3000 is not set\n# CONFIG_INPUT_DRV260X_HAPTICS is not set\n# CONFIG_INPUT_DRV2665_HAPTICS is not set\n# CONFIG_INPUT_DRV2667_HAPTICS is not set\n# CONFIG_RMI4_CORE is not set\n\n#\n# Hardware I/O ports\n#\nCONFIG_SERIO=y\nCONFIG_SERIO_SERPORT=y\n# CONFIG_SERIO_AMBAKMI is not set\n# CONFIG_SERIO_LIBPS2 is not set\n# CONFIG_SERIO_RAW is not set\n# CONFIG_SERIO_ALTERA_PS2 is not set\n# CONFIG_SERIO_PS2MULT is not set\n# CONFIG_SERIO_ARC_PS2 is not set\n# CONFIG_SERIO_APBPS2 is not set\n# CONFIG_SERIO_GPIO_PS2 is not set\n# CONFIG_USERIO is not set\n# CONFIG_GAMEPORT is not set\n# end of Hardware I/O ports\n# end of Input device support\n\n#\n# Character devices\n#\nCONFIG_TTY=y\nCONFIG_VT=y\nCONFIG_CONSOLE_TRANSLATIONS=y\nCONFIG_VT_CONSOLE=y\nCONFIG_VT_CONSOLE_SLEEP=y\nCONFIG_HW_CONSOLE=y\nCONFIG_VT_HW_CONSOLE_BINDING=y\nCONFIG_UNIX98_PTYS=y\nCONFIG_LEGACY_PTYS=y\nCONFIG_LEGACY_PTY_COUNT=256\nCONFIG_LDISC_AUTOLOAD=y\n\n#\n# Serial drivers\n#\nCONFIG_SERIAL_EARLYCON=y\nCONFIG_SERIAL_8250=y\n# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set\n# CONFIG_SERIAL_8250_16550A_VARIANTS is not set\n# CONFIG_SERIAL_8250_FINTEK is not set\nCONFIG_SERIAL_8250_CONSOLE=y\nCONFIG_SERIAL_8250_DMA=y\nCONFIG_SERIAL_8250_NR_UARTS=1\nCONFIG_SERIAL_8250_RUNTIME_UARTS=0\nCONFIG_SERIAL_8250_EXTENDED=y\n# CONFIG_SERIAL_8250_MANY_PORTS is not set\n# CONFIG_SERIAL_8250_SHARE_IRQ is not set\n# CONFIG_SERIAL_8250_DETECT_IRQ is not set\n# CONFIG_SERIAL_8250_RSA is not set\nCONFIG_SERIAL_8250_FSL=y\n# CONFIG_SERIAL_8250_DW is not set\n# CONFIG_SERIAL_8250_RT288X is not set\nCONFIG_SERIAL_OF_PLATFORM=y\n\n#\n# Non-8250 serial port support\n#\n# CONFIG_SERIAL_AMBA_PL010 is not set\n# CONFIG_SERIAL_AMBA_PL011 is not set\n# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set\nCONFIG_SERIAL_SAMSUNG=y\nCONFIG_SERIAL_SAMSUNG_UARTS_4=y\nCONFIG_SERIAL_SAMSUNG_UARTS=4\nCONFIG_SERIAL_SAMSUNG_CONSOLE=y\n# CONFIG_SERIAL_MAX3100 is not set\n# CONFIG_SERIAL_MAX310X is not set\n# CONFIG_SERIAL_UARTLITE is not set\nCONFIG_SERIAL_CORE=y\nCONFIG_SERIAL_CORE_CONSOLE=y\n# CONFIG_SERIAL_SIFIVE is not set\n# CONFIG_SERIAL_SCCNXP is not set\n# CONFIG_SERIAL_SC16IS7XX is not set\n# CONFIG_SERIAL_ALTERA_JTAGUART is not set\n# CONFIG_SERIAL_ALTERA_UART is not set\n# CONFIG_SERIAL_XILINX_PS_UART is not set\n# CONFIG_SERIAL_ARC is not set\n# CONFIG_SERIAL_FSL_LPUART is not set\n# CONFIG_SERIAL_FSL_LINFLEXUART is not set\n# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set\n# CONFIG_SERIAL_ST_ASC is not set\n# CONFIG_SERIAL_SPRD is not set\n# end of Serial drivers\n\nCONFIG_SERIAL_MCTRL_GPIO=y\n# CONFIG_SERIAL_NONSTANDARD is not set\n# CONFIG_N_GSM is not set\n# CONFIG_NULL_TTY is not set\n# CONFIG_HVC_DCC is not set\n# CONFIG_SERIAL_DEV_BUS is not set\n# CONFIG_VIRTIO_CONSOLE is not set\n# CONFIG_IPMI_HANDLER is not set\nCONFIG_HW_RANDOM=y\n# CONFIG_HW_RANDOM_TIMERIOMEM is not set\n# CONFIG_HW_RANDOM_BA431 is not set\nCONFIG_HW_RANDOM_EXYNOS=y\n# CONFIG_HW_RANDOM_CCTRNG is not set\n# CONFIG_HW_RANDOM_XIPHERA is not set\nCONFIG_DEVMEM=y\nCONFIG_TCG_TPM=y\nCONFIG_HW_RANDOM_TPM=y\n# CONFIG_TCG_TIS is not set\n# CONFIG_TCG_TIS_SPI is not set\n# CONFIG_TCG_TIS_I2C is not set\n# CONFIG_TCG_TIS_I2C_CR50 is not set\n# CONFIG_TCG_TIS_I2C_ATMEL is not set\nCONFIG_TCG_TIS_I2C_INFINEON=y\n# CONFIG_TCG_TIS_I2C_NUVOTON is not set\n# CONFIG_TCG_ATMEL is not set\n# CONFIG_TCG_VTPM_PROXY is not set\n# CONFIG_TCG_TIS_ST33ZP24_I2C is not set\n# CONFIG_TCG_TIS_ST33ZP24_SPI is not set\n# CONFIG_XILLYBUS is not set\n# CONFIG_XILLYUSB is not set\nCONFIG_RANDOM_TRUST_CPU=y\n# CONFIG_RANDOM_TRUST_BOOTLOADER is not set\n# end of Character devices\n\n#\n# I2C support\n#\nCONFIG_I2C=y\nCONFIG_I2C_BOARDINFO=y\nCONFIG_I2C_COMPAT=y\nCONFIG_I2C_CHARDEV=y\nCONFIG_I2C_MUX=y\n\n#\n# Multiplexer I2C Chip support\n#\nCONFIG_I2C_ARB_GPIO_CHALLENGE=y\n# CONFIG_I2C_MUX_GPIO is not set\n# CONFIG_I2C_MUX_GPMUX is not set\n# CONFIG_I2C_MUX_LTC4306 is not set\n# CONFIG_I2C_MUX_PCA9541 is not set\n# CONFIG_I2C_MUX_PCA954x is not set\n# CONFIG_I2C_MUX_PINCTRL is not set\n# CONFIG_I2C_MUX_REG is not set\n# CONFIG_I2C_DEMUX_PINCTRL is not set\n# CONFIG_I2C_MUX_MLXCPLD is not set\n# end of Multiplexer I2C Chip support\n\nCONFIG_I2C_HELPER_AUTO=y\nCONFIG_I2C_ALGOBIT=y\n\n#\n# I2C Hardware Bus support\n#\n\n#\n# I2C system bus drivers (mostly embedded / system-on-chip)\n#\n# CONFIG_I2C_CBUS_GPIO is not set\n# CONFIG_I2C_DESIGNWARE_PLATFORM is not set\n# CONFIG_I2C_EMEV2 is not set\nCONFIG_I2C_EXYNOS5=y\nCONFIG_I2C_GPIO=y\n# CONFIG_I2C_GPIO_FAULT_INJECTOR is not set\n# CONFIG_I2C_NOMADIK is not set\n# CONFIG_I2C_OCORES is not set\n# CONFIG_I2C_PCA_PLATFORM is not set\n# CONFIG_I2C_RK3X is not set\nCONFIG_I2C_S3C2410=y\n# CONFIG_I2C_SIMTEC is not set\n# CONFIG_I2C_XILINX is not set\n\n#\n# External I2C/SMBus adapter drivers\n#\n# CONFIG_I2C_DIOLAN_U2C is not set\n# CONFIG_I2C_CP2615 is not set\n# CONFIG_I2C_ROBOTFUZZ_OSIF is not set\n# CONFIG_I2C_TAOS_EVM is not set\n# CONFIG_I2C_TINY_USB is not set\n\n#\n# Other I2C/SMBus bus drivers\n#\n# CONFIG_I2C_VIRTIO is not set\n# end of I2C Hardware Bus support\n\n# CONFIG_I2C_STUB is not set\n# CONFIG_I2C_SLAVE is not set\n# CONFIG_I2C_DEBUG_CORE is not set\n# CONFIG_I2C_DEBUG_ALGO is not set\n# CONFIG_I2C_DEBUG_BUS is not set\n# end of I2C support\n\n# CONFIG_I3C is not set\nCONFIG_SPI=y\n# CONFIG_SPI_DEBUG is not set\nCONFIG_SPI_MASTER=y\n# CONFIG_SPI_MEM is not set\n\n#\n# SPI Master Controller Drivers\n#\n# CONFIG_SPI_ALTERA is not set\n# CONFIG_SPI_AXI_SPI_ENGINE is not set\nCONFIG_SPI_BITBANG=y\n# CONFIG_SPI_CADENCE is not set\n# CONFIG_SPI_CADENCE_QUADSPI is not set\n# CONFIG_SPI_DESIGNWARE is not set\n# CONFIG_SPI_NXP_FLEXSPI is not set\nCONFIG_SPI_GPIO=y\n# CONFIG_SPI_FSL_SPI is not set\n# CONFIG_SPI_MICROCHIP_CORE is not set\n# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set\n# CONFIG_SPI_OC_TINY is not set\n# CONFIG_SPI_PL022 is not set\n# CONFIG_SPI_ROCKCHIP is not set\nCONFIG_SPI_S3C64XX=y\n# CONFIG_SPI_SC18IS602 is not set\n# CONFIG_SPI_SIFIVE is not set\n# CONFIG_SPI_MXIC is not set\n# CONFIG_SPI_XCOMM is not set\n# CONFIG_SPI_XILINX is not set\n# CONFIG_SPI_ZYNQMP_GQSPI is not set\n# CONFIG_SPI_AMD is not set\n\n#\n# SPI Multiplexer support\n#\n# CONFIG_SPI_MUX is not set\n\n#\n# SPI Protocol Masters\n#\n# CONFIG_SPI_SPIDEV is not set\n# CONFIG_SPI_LOOPBACK_TEST is not set\n# CONFIG_SPI_TLE62X0 is not set\n# CONFIG_SPI_SLAVE is not set\nCONFIG_SPI_DYNAMIC=y\n# CONFIG_SPMI is not set\n# CONFIG_HSI is not set\n# CONFIG_PPS is not set\n\n#\n# PTP clock support\n#\n# CONFIG_PTP_1588_CLOCK is not set\nCONFIG_PTP_1588_CLOCK_OPTIONAL=y\n\n#\n# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.\n#\n# end of PTP clock support\n\nCONFIG_PINCTRL=y\nCONFIG_PINMUX=y\nCONFIG_PINCONF=y\n# CONFIG_DEBUG_PINCTRL is not set\n# CONFIG_PINCTRL_CY8C95X0 is not set\n# CONFIG_PINCTRL_MCP23S08 is not set\n# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set\n# CONFIG_PINCTRL_OCELOT is not set\n# CONFIG_PINCTRL_SINGLE is not set\n# CONFIG_PINCTRL_STMFX is not set\n# CONFIG_PINCTRL_SX150X is not set\n\n#\n# Renesas pinctrl drivers\n#\n# end of Renesas pinctrl drivers\n\nCONFIG_PINCTRL_SAMSUNG=y\nCONFIG_PINCTRL_EXYNOS=y\nCONFIG_PINCTRL_EXYNOS_ARM=y\nCONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y\nCONFIG_GPIOLIB=y\nCONFIG_GPIOLIB_FASTPATH_LIMIT=512\nCONFIG_OF_GPIO=y\nCONFIG_DEBUG_GPIO=y\nCONFIG_GPIO_CDEV=y\nCONFIG_GPIO_CDEV_V1=y\n\n#\n# Memory mapped GPIO drivers\n#\n# CONFIG_GPIO_74XX_MMIO is not set\n# CONFIG_GPIO_ALTERA is not set\n# CONFIG_GPIO_CADENCE is not set\n# CONFIG_GPIO_DWAPB is not set\n# CONFIG_GPIO_FTGPIO010 is not set\n# CONFIG_GPIO_GENERIC_PLATFORM is not set\n# CONFIG_GPIO_GRGPIO is not set\n# CONFIG_GPIO_HLWD is not set\n# CONFIG_GPIO_LOGICVC is not set\n# CONFIG_GPIO_MB86S7X is not set\n# CONFIG_GPIO_MPC8XXX is not set\n# CONFIG_GPIO_PL061 is not set\n# CONFIG_GPIO_SIFIVE is not set\n# CONFIG_GPIO_SYSCON is not set\n# CONFIG_GPIO_XILINX is not set\n# CONFIG_GPIO_ZEVIO is not set\n# CONFIG_GPIO_AMD_FCH is not set\n# end of Memory mapped GPIO drivers\n\n#\n# I2C GPIO expanders\n#\n# CONFIG_GPIO_ADNP is not set\n# CONFIG_GPIO_GW_PLD is not set\n# CONFIG_GPIO_MAX7300 is not set\n# CONFIG_GPIO_MAX732X is not set\n# CONFIG_GPIO_PCA953X is not set\n# CONFIG_GPIO_PCA9570 is not set\n# CONFIG_GPIO_PCF857X is not set\n# CONFIG_GPIO_TPIC2810 is not set\n# end of I2C GPIO expanders\n\n#\n# MFD GPIO expanders\n#\n# CONFIG_HTC_EGPIO is not set\nCONFIG_GPIO_WM8994=y\n# end of MFD GPIO expanders\n\n#\n# SPI GPIO expanders\n#\n# CONFIG_GPIO_74X164 is not set\n# CONFIG_GPIO_MAX3191X is not set\n# CONFIG_GPIO_MAX7301 is not set\n# CONFIG_GPIO_MC33880 is not set\n# CONFIG_GPIO_PISOSR is not set\n# CONFIG_GPIO_XRA1403 is not set\n# end of SPI GPIO expanders\n\n#\n# USB GPIO expanders\n#\n# end of USB GPIO expanders\n\n#\n# Virtual GPIO drivers\n#\n# CONFIG_GPIO_AGGREGATOR is not set\n# CONFIG_GPIO_MOCKUP is not set\n# CONFIG_GPIO_SIM is not set\n# end of Virtual GPIO drivers\n\n# CONFIG_W1 is not set\nCONFIG_POWER_RESET=y\n# CONFIG_POWER_RESET_BRCMKONA is not set\n# CONFIG_POWER_RESET_BRCMSTB is not set\n# CONFIG_POWER_RESET_GPIO is not set\n# CONFIG_POWER_RESET_GPIO_RESTART is not set\n# CONFIG_POWER_RESET_LTC2952 is not set\nCONFIG_POWER_RESET_REGULATOR=y\n# CONFIG_POWER_RESET_RESTART is not set\n# CONFIG_POWER_RESET_VERSATILE is not set\nCONFIG_POWER_RESET_SYSCON=y\nCONFIG_POWER_RESET_SYSCON_POWEROFF=y\n# CONFIG_SYSCON_REBOOT_MODE is not set\n# CONFIG_NVMEM_REBOOT_MODE is not set\nCONFIG_POWER_SUPPLY=y\n# CONFIG_POWER_SUPPLY_DEBUG is not set\nCONFIG_POWER_SUPPLY_HWMON=y\n# CONFIG_PDA_POWER is not set\n# CONFIG_GENERIC_ADC_BATTERY is not set\n# CONFIG_IP5XXX_POWER is not set\n# CONFIG_TEST_POWER is not set\n# CONFIG_CHARGER_ADP5061 is not set\n# CONFIG_BATTERY_CW2015 is not set\n# CONFIG_BATTERY_DS2780 is not set\n# CONFIG_BATTERY_DS2781 is not set\n# CONFIG_BATTERY_DS2782 is not set\n# CONFIG_BATTERY_SAMSUNG_SDI is not set\nCONFIG_BATTERY_SBS=y\n# CONFIG_CHARGER_SBS is not set\n# CONFIG_MANAGER_SBS is not set\n# CONFIG_BATTERY_BQ27XXX is not set\nCONFIG_BATTERY_MAX17040=y\nCONFIG_BATTERY_MAX17042=y\n# CONFIG_CHARGER_MAX8903 is not set\n# CONFIG_CHARGER_LP8727 is not set\n# CONFIG_CHARGER_GPIO is not set\n# CONFIG_CHARGER_MANAGER is not set\n# CONFIG_CHARGER_LT3651 is not set\n# CONFIG_CHARGER_LTC4162L is not set\nCONFIG_CHARGER_MAX14577=y\n# CONFIG_CHARGER_DETECTOR_MAX14656 is not set\nCONFIG_CHARGER_MAX77693=y\n# CONFIG_CHARGER_MAX77976 is not set\nCONFIG_CHARGER_MAX8997=y\nCONFIG_CHARGER_MAX8998=y\n# CONFIG_CHARGER_BQ2415X is not set\n# CONFIG_CHARGER_BQ24190 is not set\n# CONFIG_CHARGER_BQ24257 is not set\n# CONFIG_CHARGER_BQ24735 is not set\n# CONFIG_CHARGER_BQ2515X is not set\n# CONFIG_CHARGER_BQ25890 is not set\n# CONFIG_CHARGER_BQ25980 is not set\n# CONFIG_CHARGER_BQ256XX is not set\n# CONFIG_CHARGER_SMB347 is not set\nCONFIG_CHARGER_TPS65090=y\n# CONFIG_BATTERY_GAUGE_LTC2941 is not set\n# CONFIG_BATTERY_GOLDFISH is not set\n# CONFIG_BATTERY_RT5033 is not set\n# CONFIG_CHARGER_RT9455 is not set\n# CONFIG_CHARGER_UCS1002 is not set\n# CONFIG_CHARGER_BD99954 is not set\n# CONFIG_BATTERY_UG3105 is not set\nCONFIG_HWMON=y\n# CONFIG_HWMON_DEBUG_CHIP is not set\n\n#\n# Native drivers\n#\n# CONFIG_SENSORS_AD7314 is not set\n# CONFIG_SENSORS_AD7414 is not set\n# CONFIG_SENSORS_AD7418 is not set\n# CONFIG_SENSORS_ADM1025 is not set\n# CONFIG_SENSORS_ADM1026 is not set\n# CONFIG_SENSORS_ADM1029 is not set\n# CONFIG_SENSORS_ADM1031 is not set\n# CONFIG_SENSORS_ADM1177 is not set\n# CONFIG_SENSORS_ADM9240 is not set\n# CONFIG_SENSORS_ADT7310 is not set\n# CONFIG_SENSORS_ADT7410 is not set\n# CONFIG_SENSORS_ADT7411 is not set\n# CONFIG_SENSORS_ADT7462 is not set\n# CONFIG_SENSORS_ADT7470 is not set\n# CONFIG_SENSORS_ADT7475 is not set\n# CONFIG_SENSORS_AHT10 is not set\n# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set\n# CONFIG_SENSORS_AS370 is not set\n# CONFIG_SENSORS_ASC7621 is not set\n# CONFIG_SENSORS_AXI_FAN_CONTROL is not set\n# CONFIG_SENSORS_ATXP1 is not set\n# CONFIG_SENSORS_CORSAIR_CPRO is not set\n# CONFIG_SENSORS_CORSAIR_PSU is not set\n# CONFIG_SENSORS_DS620 is not set\n# CONFIG_SENSORS_DS1621 is not set\n# CONFIG_SENSORS_F71805F is not set\n# CONFIG_SENSORS_F71882FG is not set\n# CONFIG_SENSORS_F75375S is not set\n# CONFIG_SENSORS_FTSTEUTATES is not set\n# CONFIG_SENSORS_GL518SM is not set\n# CONFIG_SENSORS_GL520SM is not set\n# CONFIG_SENSORS_G760A is not set\n# CONFIG_SENSORS_G762 is not set\n# CONFIG_SENSORS_GPIO_FAN is not set\n# CONFIG_SENSORS_HIH6130 is not set\n# CONFIG_SENSORS_IIO_HWMON is not set\n# CONFIG_SENSORS_IT87 is not set\n# CONFIG_SENSORS_JC42 is not set\n# CONFIG_SENSORS_POWR1220 is not set\n# CONFIG_SENSORS_LINEAGE is not set\n# CONFIG_SENSORS_LTC2945 is not set\n# CONFIG_SENSORS_LTC2947_I2C is not set\n# CONFIG_SENSORS_LTC2947_SPI is not set\n# CONFIG_SENSORS_LTC2990 is not set\n# CONFIG_SENSORS_LTC2992 is not set\n# CONFIG_SENSORS_LTC4151 is not set\n# CONFIG_SENSORS_LTC4215 is not set\n# CONFIG_SENSORS_LTC4222 is not set\n# CONFIG_SENSORS_LTC4245 is not set\n# CONFIG_SENSORS_LTC4260 is not set\n# CONFIG_SENSORS_LTC4261 is not set\n# CONFIG_SENSORS_MAX1111 is not set\n# CONFIG_SENSORS_MAX127 is not set\n# CONFIG_SENSORS_MAX16065 is not set\n# CONFIG_SENSORS_MAX1619 is not set\n# CONFIG_SENSORS_MAX1668 is not set\n# CONFIG_SENSORS_MAX197 is not set\n# CONFIG_SENSORS_MAX31722 is not set\n# CONFIG_SENSORS_MAX31730 is not set\n# CONFIG_SENSORS_MAX31760 is not set\n# CONFIG_SENSORS_MAX6620 is not set\n# CONFIG_SENSORS_MAX6621 is not set\n# CONFIG_SENSORS_MAX6639 is not set\n# CONFIG_SENSORS_MAX6650 is not set\n# CONFIG_SENSORS_MAX6697 is not set\n# CONFIG_SENSORS_MAX31790 is not set\n# CONFIG_SENSORS_MCP3021 is not set\n# CONFIG_SENSORS_TC654 is not set\n# CONFIG_SENSORS_TPS23861 is not set\n# CONFIG_SENSORS_MR75203 is not set\n# CONFIG_SENSORS_ADCXX is not set\n# CONFIG_SENSORS_LM63 is not set\n# CONFIG_SENSORS_LM70 is not set\n# CONFIG_SENSORS_LM73 is not set\n# CONFIG_SENSORS_LM75 is not set\n# CONFIG_SENSORS_LM77 is not set\n# CONFIG_SENSORS_LM78 is not set\n# CONFIG_SENSORS_LM80 is not set\n# CONFIG_SENSORS_LM83 is not set\n# CONFIG_SENSORS_LM85 is not set\n# CONFIG_SENSORS_LM87 is not set\nCONFIG_SENSORS_LM90=y\n# CONFIG_SENSORS_LM92 is not set\n# CONFIG_SENSORS_LM93 is not set\n# CONFIG_SENSORS_LM95234 is not set\n# CONFIG_SENSORS_LM95241 is not set\n# CONFIG_SENSORS_LM95245 is not set\n# CONFIG_SENSORS_PC87360 is not set\n# CONFIG_SENSORS_PC87427 is not set\nCONFIG_SENSORS_NTC_THERMISTOR=y\n# CONFIG_SENSORS_NCT6683 is not set\n# CONFIG_SENSORS_NCT6775 is not set\n# CONFIG_SENSORS_NCT6775_I2C is not set\n# CONFIG_SENSORS_NCT7802 is not set\n# CONFIG_SENSORS_NCT7904 is not set\n# CONFIG_SENSORS_NPCM7XX is not set\n# CONFIG_SENSORS_NZXT_KRAKEN2 is not set\n# CONFIG_SENSORS_NZXT_SMART2 is not set\n# CONFIG_SENSORS_OCC_P8_I2C is not set\n# CONFIG_SENSORS_PCF8591 is not set\n# CONFIG_PMBUS is not set\nCONFIG_SENSORS_PWM_FAN=y\n# CONFIG_SENSORS_SBTSI is not set\n# CONFIG_SENSORS_SBRMI is not set\n# CONFIG_SENSORS_SHT15 is not set\n# CONFIG_SENSORS_SHT21 is not set\n# CONFIG_SENSORS_SHT3x is not set\n# CONFIG_SENSORS_SHT4x is not set\n# CONFIG_SENSORS_SHTC1 is not set\n# CONFIG_SENSORS_DME1737 is not set\n# CONFIG_SENSORS_EMC1403 is not set\n# CONFIG_SENSORS_EMC2103 is not set\n# CONFIG_SENSORS_EMC2305 is not set\n# CONFIG_SENSORS_EMC6W201 is not set\n# CONFIG_SENSORS_SMSC47M1 is not set\n# CONFIG_SENSORS_SMSC47M192 is not set\n# CONFIG_SENSORS_SMSC47B397 is not set\n# CONFIG_SENSORS_SCH5627 is not set\n# CONFIG_SENSORS_SCH5636 is not set\n# CONFIG_SENSORS_STTS751 is not set\n# CONFIG_SENSORS_SMM665 is not set\n# CONFIG_SENSORS_ADC128D818 is not set\n# CONFIG_SENSORS_ADS7828 is not set\n# CONFIG_SENSORS_ADS7871 is not set\n# CONFIG_SENSORS_AMC6821 is not set\n# CONFIG_SENSORS_INA209 is not set\nCONFIG_SENSORS_INA2XX=y\n# CONFIG_SENSORS_INA238 is not set\n# CONFIG_SENSORS_INA3221 is not set\n# CONFIG_SENSORS_TC74 is not set\n# CONFIG_SENSORS_THMC50 is not set\n# CONFIG_SENSORS_TMP102 is not set\n# CONFIG_SENSORS_TMP103 is not set\n# CONFIG_SENSORS_TMP108 is not set\n# CONFIG_SENSORS_TMP401 is not set\n# CONFIG_SENSORS_TMP421 is not set\n# CONFIG_SENSORS_TMP464 is not set\n# CONFIG_SENSORS_TMP513 is not set\n# CONFIG_SENSORS_VT1211 is not set\n# CONFIG_SENSORS_W83773G is not set\n# CONFIG_SENSORS_W83781D is not set\n# CONFIG_SENSORS_W83791D is not set\n# CONFIG_SENSORS_W83792D is not set\n# CONFIG_SENSORS_W83793 is not set\n# CONFIG_SENSORS_W83795 is not set\n# CONFIG_SENSORS_W83L785TS is not set\n# CONFIG_SENSORS_W83L786NG is not set\n# CONFIG_SENSORS_W83627HF is not set\n# CONFIG_SENSORS_W83627EHF is not set\nCONFIG_THERMAL=y\n# CONFIG_THERMAL_NETLINK is not set\n# CONFIG_THERMAL_STATISTICS is not set\nCONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0\nCONFIG_THERMAL_HWMON=y\nCONFIG_THERMAL_OF=y\nCONFIG_THERMAL_WRITABLE_TRIPS=y\nCONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y\n# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set\n# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_FAIR_SHARE is not set\nCONFIG_THERMAL_GOV_STEP_WISE=y\n# CONFIG_THERMAL_GOV_BANG_BANG is not set\n# CONFIG_THERMAL_GOV_USER_SPACE is not set\n# CONFIG_THERMAL_GOV_POWER_ALLOCATOR is not set\nCONFIG_CPU_THERMAL=y\nCONFIG_CPU_FREQ_THERMAL=y\nCONFIG_DEVFREQ_THERMAL=y\nCONFIG_THERMAL_EMULATION=y\n# CONFIG_THERMAL_MMIO is not set\n\n#\n# Samsung thermal drivers\n#\nCONFIG_EXYNOS_THERMAL=y\n# end of Samsung thermal drivers\n\n# CONFIG_GENERIC_ADC_THERMAL is not set\nCONFIG_WATCHDOG=y\nCONFIG_WATCHDOG_CORE=y\n# CONFIG_WATCHDOG_NOWAYOUT is not set\nCONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y\nCONFIG_WATCHDOG_OPEN_TIMEOUT=0\n# CONFIG_WATCHDOG_SYSFS is not set\n# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set\n\n#\n# Watchdog Pretimeout Governors\n#\n# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set\n\n#\n# Watchdog Device Drivers\n#\n# CONFIG_SOFT_WATCHDOG is not set\n# CONFIG_GPIO_WATCHDOG is not set\n# CONFIG_XILINX_WATCHDOG is not set\n# CONFIG_ZIIRAVE_WATCHDOG is not set\n# CONFIG_ARM_SP805_WATCHDOG is not set\n# CONFIG_CADENCE_WATCHDOG is not set\n# CONFIG_FTWDT010_WATCHDOG is not set\nCONFIG_S3C2410_WATCHDOG=y\n# CONFIG_DW_WATCHDOG is not set\n# CONFIG_MAX63XX_WATCHDOG is not set\n# CONFIG_ARM_SMC_WATCHDOG is not set\n# CONFIG_MEN_A21_WDT is not set\n\n#\n# USB-based Watchdog Cards\n#\n# CONFIG_USBPCWATCHDOG is not set\nCONFIG_SSB_POSSIBLE=y\nCONFIG_SSB=m\nCONFIG_SSB_BLOCKIO=y\nCONFIG_SSB_SDIOHOST_POSSIBLE=y\n# CONFIG_SSB_SDIOHOST is not set\n# CONFIG_SSB_DRIVER_GPIO is not set\nCONFIG_BCMA_POSSIBLE=y\nCONFIG_BCMA=m\nCONFIG_BCMA_BLOCKIO=y\n# CONFIG_BCMA_HOST_SOC is not set\n# CONFIG_BCMA_DRIVER_GMAC_CMN is not set\n# CONFIG_BCMA_DRIVER_GPIO is not set\n# CONFIG_BCMA_DEBUG is not set\n\n#\n# Multifunction device drivers\n#\nCONFIG_MFD_CORE=y\n# CONFIG_MFD_ACT8945A is not set\n# CONFIG_MFD_AS3711 is not set\n# CONFIG_MFD_AS3722 is not set\n# CONFIG_PMIC_ADP5520 is not set\n# CONFIG_MFD_AAT2870_CORE is not set\n# CONFIG_MFD_ATMEL_FLEXCOM is not set\n# CONFIG_MFD_ATMEL_HLCDC is not set\n# CONFIG_MFD_BCM590XX is not set\n# CONFIG_MFD_BD9571MWV is not set\n# CONFIG_MFD_AXP20X_I2C is not set\n# CONFIG_MFD_MADERA is not set\n# CONFIG_MFD_ASIC3 is not set\n# CONFIG_PMIC_DA903X is not set\n# CONFIG_MFD_DA9052_SPI is not set\n# CONFIG_MFD_DA9052_I2C is not set\n# CONFIG_MFD_DA9055 is not set\n# CONFIG_MFD_DA9062 is not set\n# CONFIG_MFD_DA9063 is not set\n# CONFIG_MFD_DA9150 is not set\n# CONFIG_MFD_DLN2 is not set\n# CONFIG_MFD_EXYNOS_LPASS is not set\n# CONFIG_MFD_GATEWORKS_GSC is not set\n# CONFIG_MFD_MC13XXX_SPI is not set\n# CONFIG_MFD_MC13XXX_I2C is not set\n# CONFIG_MFD_MP2629 is not set\n# CONFIG_MFD_HI6421_PMIC is not set\n# CONFIG_HTC_PASIC3 is not set\n# CONFIG_HTC_I2CPLD is not set\n# CONFIG_MFD_IQS62X is not set\n# CONFIG_MFD_KEMPLD is not set\n# CONFIG_MFD_88PM800 is not set\n# CONFIG_MFD_88PM805 is not set\n# CONFIG_MFD_88PM860X is not set\nCONFIG_MFD_MAX14577=y\n# CONFIG_MFD_MAX77620 is not set\n# CONFIG_MFD_MAX77650 is not set\nCONFIG_MFD_MAX77686=y\nCONFIG_MFD_MAX77693=y\n# CONFIG_MFD_MAX77714 is not set\n# CONFIG_MFD_MAX77843 is not set\n# CONFIG_MFD_MAX8907 is not set\n# CONFIG_MFD_MAX8925 is not set\nCONFIG_MFD_MAX8997=y\nCONFIG_MFD_MAX8998=y\n# CONFIG_MFD_MT6360 is not set\n# CONFIG_MFD_MT6370 is not set\n# CONFIG_MFD_MT6397 is not set\n# CONFIG_MFD_MENF21BMC is not set\n# CONFIG_MFD_OCELOT is not set\n# CONFIG_EZX_PCAP is not set\n# CONFIG_MFD_CPCAP is not set\n# CONFIG_MFD_VIPERBOARD is not set\n# CONFIG_MFD_NTXEC is not set\n# CONFIG_MFD_RETU is not set\n# CONFIG_MFD_PCF50633 is not set\n# CONFIG_MFD_PM8XXX is not set\n# CONFIG_MFD_SY7636A is not set\n# CONFIG_MFD_RT4831 is not set\n# CONFIG_MFD_RT5033 is not set\n# CONFIG_MFD_RT5120 is not set\n# CONFIG_MFD_RC5T583 is not set\n# CONFIG_MFD_RK808 is not set\n# CONFIG_MFD_RN5T618 is not set\nCONFIG_MFD_SEC_CORE=y\n# CONFIG_MFD_SI476X_CORE is not set\n# CONFIG_MFD_SM501 is not set\n# CONFIG_MFD_SKY81452 is not set\n# CONFIG_MFD_STMPE is not set\nCONFIG_MFD_SYSCON=y\n# CONFIG_MFD_TI_AM335X_TSCADC is not set\n# CONFIG_MFD_LP3943 is not set\n# CONFIG_MFD_LP8788 is not set\n# CONFIG_MFD_TI_LMU is not set\n# CONFIG_MFD_PALMAS is not set\n# CONFIG_TPS6105X is not set\n# CONFIG_TPS65010 is not set\n# CONFIG_TPS6507X is not set\n# CONFIG_MFD_TPS65086 is not set\nCONFIG_MFD_TPS65090=y\n# CONFIG_MFD_TPS65217 is not set\n# CONFIG_MFD_TI_LP873X is not set\n# CONFIG_MFD_TI_LP87565 is not set\n# CONFIG_MFD_TPS65218 is not set\n# CONFIG_MFD_TPS6586X is not set\n# CONFIG_MFD_TPS65910 is not set\n# CONFIG_MFD_TPS65912_I2C is not set\n# CONFIG_MFD_TPS65912_SPI is not set\n# CONFIG_TWL4030_CORE is not set\n# CONFIG_TWL6040_CORE is not set\n# CONFIG_MFD_WL1273_CORE is not set\n# CONFIG_MFD_LM3533 is not set\n# CONFIG_MFD_TC3589X is not set\n# CONFIG_MFD_T7L66XB is not set\n# CONFIG_MFD_TC6387XB is not set\n# CONFIG_MFD_TC6393XB is not set\n# CONFIG_MFD_TQMX86 is not set\n# CONFIG_MFD_LOCHNAGAR is not set\n# CONFIG_MFD_ARIZONA_I2C is not set\n# CONFIG_MFD_ARIZONA_SPI is not set\n# CONFIG_MFD_WM8400 is not set\n# CONFIG_MFD_WM831X_I2C is not set\n# CONFIG_MFD_WM831X_SPI is not set\n# CONFIG_MFD_WM8350_I2C is not set\nCONFIG_MFD_WM8994=y\n# CONFIG_MFD_ROHM_BD718XX is not set\n# CONFIG_MFD_ROHM_BD71828 is not set\n# CONFIG_MFD_ROHM_BD957XMUF is not set\n# CONFIG_MFD_STPMIC1 is not set\n# CONFIG_MFD_STMFX is not set\n# CONFIG_MFD_ATC260X_I2C is not set\n# CONFIG_MFD_QCOM_PM8008 is not set\n# CONFIG_MFD_INTEL_M10_BMC is not set\n# CONFIG_MFD_RSMU_I2C is not set\n# CONFIG_MFD_RSMU_SPI is not set\n# end of Multifunction device drivers\n\nCONFIG_REGULATOR=y\n# CONFIG_REGULATOR_DEBUG is not set\nCONFIG_REGULATOR_FIXED_VOLTAGE=y\n# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set\n# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set\n# CONFIG_REGULATOR_88PG86X is not set\n# CONFIG_REGULATOR_ACT8865 is not set\n# CONFIG_REGULATOR_AD5398 is not set\n# CONFIG_REGULATOR_DA9121 is not set\n# CONFIG_REGULATOR_DA9210 is not set\n# CONFIG_REGULATOR_DA9211 is not set\n# CONFIG_REGULATOR_FAN53555 is not set\n# CONFIG_REGULATOR_FAN53880 is not set\nCONFIG_REGULATOR_GPIO=y\n# CONFIG_REGULATOR_ISL9305 is not set\n# CONFIG_REGULATOR_ISL6271A is not set\n# CONFIG_REGULATOR_LP3971 is not set\n# CONFIG_REGULATOR_LP3972 is not set\n# CONFIG_REGULATOR_LP872X is not set\n# CONFIG_REGULATOR_LP8755 is not set\n# CONFIG_REGULATOR_LTC3589 is not set\n# CONFIG_REGULATOR_LTC3676 is not set\nCONFIG_REGULATOR_MAX14577=y\n# CONFIG_REGULATOR_MAX1586 is not set\n# CONFIG_REGULATOR_MAX8649 is not set\n# CONFIG_REGULATOR_MAX8660 is not set\n# CONFIG_REGULATOR_MAX8893 is not set\nCONFIG_REGULATOR_MAX8952=y\n# CONFIG_REGULATOR_MAX8973 is not set\nCONFIG_REGULATOR_MAX8997=y\nCONFIG_REGULATOR_MAX8998=y\n# CONFIG_REGULATOR_MAX20086 is not set\nCONFIG_REGULATOR_MAX77686=y\nCONFIG_REGULATOR_MAX77693=y\nCONFIG_REGULATOR_MAX77802=y\n# CONFIG_REGULATOR_MAX77826 is not set\n# CONFIG_REGULATOR_MCP16502 is not set\n# CONFIG_REGULATOR_MP5416 is not set\n# CONFIG_REGULATOR_MP8859 is not set\n# CONFIG_REGULATOR_MP886X is not set\n# CONFIG_REGULATOR_MPQ7920 is not set\n# CONFIG_REGULATOR_MT6311 is not set\n# CONFIG_REGULATOR_PCA9450 is not set\n# CONFIG_REGULATOR_PF8X00 is not set\n# CONFIG_REGULATOR_PFUZE100 is not set\n# CONFIG_REGULATOR_PV88060 is not set\n# CONFIG_REGULATOR_PV88080 is not set\n# CONFIG_REGULATOR_PV88090 is not set\n# CONFIG_REGULATOR_PWM is not set\n# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set\n# CONFIG_REGULATOR_RT4801 is not set\n# CONFIG_REGULATOR_RT5190A is not set\n# CONFIG_REGULATOR_RT5759 is not set\n# CONFIG_REGULATOR_RT6160 is not set\n# CONFIG_REGULATOR_RT6245 is not set\n# CONFIG_REGULATOR_RTQ2134 is not set\n# CONFIG_REGULATOR_RTMV20 is not set\n# CONFIG_REGULATOR_RTQ6752 is not set\nCONFIG_REGULATOR_S2MPA01=y\nCONFIG_REGULATOR_S2MPS11=y\nCONFIG_REGULATOR_S5M8767=y\n# CONFIG_REGULATOR_SLG51000 is not set\n# CONFIG_REGULATOR_SY8106A is not set\n# CONFIG_REGULATOR_SY8824X is not set\n# CONFIG_REGULATOR_SY8827N is not set\n# CONFIG_REGULATOR_TPS51632 is not set\n# CONFIG_REGULATOR_TPS62360 is not set\n# CONFIG_REGULATOR_TPS6286X is not set\n# CONFIG_REGULATOR_TPS65023 is not set\n# CONFIG_REGULATOR_TPS6507X is not set\nCONFIG_REGULATOR_TPS65090=y\n# CONFIG_REGULATOR_TPS65132 is not set\n# CONFIG_REGULATOR_TPS6524X is not set\n# CONFIG_REGULATOR_VCTRL is not set\nCONFIG_REGULATOR_WM8994=y\n# CONFIG_RC_CORE is not set\n\n#\n# CEC support\n#\nCONFIG_MEDIA_CEC_SUPPORT=y\n# CONFIG_CEC_CH7322 is not set\n# CONFIG_CEC_GPIO is not set\n# CONFIG_CEC_SAMSUNG_S5P is not set\n# CONFIG_USB_PULSE8_CEC is not set\n# CONFIG_USB_RAINSHADOW_CEC is not set\n# end of CEC support\n\nCONFIG_MEDIA_SUPPORT=m\nCONFIG_MEDIA_SUPPORT_FILTER=y\n# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set\n\n#\n# Media device types\n#\nCONFIG_MEDIA_CAMERA_SUPPORT=y\n# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set\n# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set\n# CONFIG_MEDIA_RADIO_SUPPORT is not set\n# CONFIG_MEDIA_SDR_SUPPORT is not set\nCONFIG_MEDIA_PLATFORM_SUPPORT=y\n# CONFIG_MEDIA_TEST_SUPPORT is not set\n# end of Media device types\n\nCONFIG_VIDEO_DEV=m\nCONFIG_MEDIA_CONTROLLER=y\n\n#\n# Video4Linux options\n#\nCONFIG_VIDEO_V4L2_I2C=y\nCONFIG_VIDEO_V4L2_SUBDEV_API=y\n# CONFIG_VIDEO_ADV_DEBUG is not set\n# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set\nCONFIG_V4L2_MEM2MEM_DEV=m\n# CONFIG_V4L2_FLASH_LED_CLASS is not set\nCONFIG_V4L2_FWNODE=m\nCONFIG_V4L2_ASYNC=m\n# end of Video4Linux options\n\n#\n# Media controller options\n#\n# end of Media controller options\n\n#\n# Media drivers\n#\n\n#\n# Drivers filtered as selected at 'Filter media drivers'\n#\n\n#\n# Media drivers\n#\nCONFIG_MEDIA_USB_SUPPORT=y\n\n#\n# Webcam devices\n#\nCONFIG_USB_GSPCA=m\n# CONFIG_USB_GSPCA_BENQ is not set\n# CONFIG_USB_GSPCA_CONEX is not set\n# CONFIG_USB_GSPCA_CPIA1 is not set\n# CONFIG_USB_GSPCA_DTCS033 is not set\n# CONFIG_USB_GSPCA_ETOMS is not set\n# CONFIG_USB_GSPCA_FINEPIX is not set\n# CONFIG_USB_GSPCA_JEILINJ is not set\n# CONFIG_USB_GSPCA_JL2005BCD is not set\n# CONFIG_USB_GSPCA_KINECT is not set\n# CONFIG_USB_GSPCA_KONICA is not set\n# CONFIG_USB_GSPCA_MARS is not set\n# CONFIG_USB_GSPCA_MR97310A is not set\n# CONFIG_USB_GSPCA_NW80X is not set\n# CONFIG_USB_GSPCA_OV519 is not set\n# CONFIG_USB_GSPCA_OV534 is not set\n# CONFIG_USB_GSPCA_OV534_9 is not set\n# CONFIG_USB_GSPCA_PAC207 is not set\n# CONFIG_USB_GSPCA_PAC7302 is not set\n# CONFIG_USB_GSPCA_PAC7311 is not set\n# CONFIG_USB_GSPCA_SE401 is not set\n# CONFIG_USB_GSPCA_SN9C2028 is not set\n# CONFIG_USB_GSPCA_SN9C20X is not set\n# CONFIG_USB_GSPCA_SONIXB is not set\n# CONFIG_USB_GSPCA_SONIXJ is not set\n# CONFIG_USB_GSPCA_SPCA1528 is not set\n# CONFIG_USB_GSPCA_SPCA500 is not set\n# CONFIG_USB_GSPCA_SPCA501 is not set\n# CONFIG_USB_GSPCA_SPCA505 is not set\n# CONFIG_USB_GSPCA_SPCA506 is not set\n# CONFIG_USB_GSPCA_SPCA508 is not set\n# CONFIG_USB_GSPCA_SPCA561 is not set\n# CONFIG_USB_GSPCA_SQ905 is not set\n# CONFIG_USB_GSPCA_SQ905C is not set\n# CONFIG_USB_GSPCA_SQ930X is not set\n# CONFIG_USB_GSPCA_STK014 is not set\n# CONFIG_USB_GSPCA_STK1135 is not set\n# CONFIG_USB_GSPCA_STV0680 is not set\n# CONFIG_USB_GSPCA_SUNPLUS is not set\n# CONFIG_USB_GSPCA_T613 is not set\n# CONFIG_USB_GSPCA_TOPRO is not set\n# CONFIG_USB_GSPCA_TOUPTEK is not set\n# CONFIG_USB_GSPCA_TV8532 is not set\n# CONFIG_USB_GSPCA_VC032X is not set\n# CONFIG_USB_GSPCA_VICAM is not set\n# CONFIG_USB_GSPCA_XIRLINK_CIT is not set\n# CONFIG_USB_GSPCA_ZC3XX is not set\n# CONFIG_USB_GL860 is not set\n# CONFIG_USB_M5602 is not set\n# CONFIG_USB_STV06XX is not set\n# CONFIG_USB_PWC is not set\n# CONFIG_USB_S2255 is not set\n# CONFIG_VIDEO_USBTV is not set\nCONFIG_USB_VIDEO_CLASS=m\nCONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y\n\n#\n# Webcam, TV (analog/digital) USB devices\n#\n# CONFIG_VIDEO_EM28XX is not set\nCONFIG_MEDIA_PLATFORM_DRIVERS=y\nCONFIG_V4L_PLATFORM_DRIVERS=y\nCONFIG_V4L_MEM2MEM_DRIVERS=y\n# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set\n# CONFIG_VIDEO_MUX is not set\n\n#\n# Allegro DVT media platform drivers\n#\n\n#\n# Amlogic media platform drivers\n#\n\n#\n# Amphion drivers\n#\n\n#\n# Aspeed media platform drivers\n#\n# CONFIG_VIDEO_ASPEED is not set\n\n#\n# Atmel media platform drivers\n#\n\n#\n# Cadence media platform drivers\n#\n# CONFIG_VIDEO_CADENCE_CSI2RX is not set\n# CONFIG_VIDEO_CADENCE_CSI2TX is not set\n\n#\n# Chips&Media media platform drivers\n#\n\n#\n# Intel media platform drivers\n#\n\n#\n# Marvell media platform drivers\n#\n\n#\n# Mediatek media platform drivers\n#\n\n#\n# NVidia media platform drivers\n#\n\n#\n# NXP media platform drivers\n#\n\n#\n# Qualcomm media platform drivers\n#\n\n#\n# Renesas media platform drivers\n#\n\n#\n# Rockchip media platform drivers\n#\n\n#\n# Samsung media platform drivers\n#\nCONFIG_VIDEO_SAMSUNG_EXYNOS_GSC=m\n# CONFIG_VIDEO_SAMSUNG_EXYNOS4_IS is not set\nCONFIG_VIDEO_SAMSUNG_S5P_G2D=m\nCONFIG_VIDEO_SAMSUNG_S5P_JPEG=m\nCONFIG_VIDEO_SAMSUNG_S5P_MFC=m\n\n#\n# STMicroelectronics media platform drivers\n#\n\n#\n# Sunxi media platform drivers\n#\n\n#\n# Texas Instruments drivers\n#\n\n#\n# Verisilicon media platform drivers\n#\n\n#\n# VIA media platform drivers\n#\n\n#\n# Xilinx media platform drivers\n#\n# CONFIG_VIDEO_XILINX is not set\nCONFIG_VIDEOBUF2_CORE=m\nCONFIG_VIDEOBUF2_V4L2=m\nCONFIG_VIDEOBUF2_MEMOPS=m\nCONFIG_VIDEOBUF2_DMA_CONTIG=m\nCONFIG_VIDEOBUF2_VMALLOC=m\n# end of Media drivers\n\n#\n# Media ancillary drivers\n#\n\n#\n# Camera sensor devices\n#\n# CONFIG_VIDEO_AR0521 is not set\n# CONFIG_VIDEO_HI556 is not set\n# CONFIG_VIDEO_HI846 is not set\n# CONFIG_VIDEO_HI847 is not set\n# CONFIG_VIDEO_IMX208 is not set\n# CONFIG_VIDEO_IMX214 is not set\n# CONFIG_VIDEO_IMX219 is not set\n# CONFIG_VIDEO_IMX258 is not set\n# CONFIG_VIDEO_IMX274 is not set\n# CONFIG_VIDEO_IMX290 is not set\n# CONFIG_VIDEO_IMX319 is not set\n# CONFIG_VIDEO_IMX334 is not set\n# CONFIG_VIDEO_IMX335 is not set\n# CONFIG_VIDEO_IMX355 is not set\n# CONFIG_VIDEO_IMX412 is not set\n# CONFIG_VIDEO_MT9M001 is not set\n# CONFIG_VIDEO_MT9M032 is not set\n# CONFIG_VIDEO_MT9M111 is not set\n# CONFIG_VIDEO_MT9P031 is not set\n# CONFIG_VIDEO_MT9T001 is not set\n# CONFIG_VIDEO_MT9T112 is not set\n# CONFIG_VIDEO_MT9V011 is not set\n# CONFIG_VIDEO_MT9V032 is not set\n# CONFIG_VIDEO_MT9V111 is not set\n# CONFIG_VIDEO_NOON010PC30 is not set\n# CONFIG_VIDEO_OG01A1B is not set\n# CONFIG_VIDEO_OV02A10 is not set\n# CONFIG_VIDEO_OV08D10 is not set\n# CONFIG_VIDEO_OV13858 is not set\n# CONFIG_VIDEO_OV13B10 is not set\n# CONFIG_VIDEO_OV2640 is not set\n# CONFIG_VIDEO_OV2659 is not set\n# CONFIG_VIDEO_OV2680 is not set\n# CONFIG_VIDEO_OV2685 is not set\n# CONFIG_VIDEO_OV5640 is not set\n# CONFIG_VIDEO_OV5645 is not set\n# CONFIG_VIDEO_OV5647 is not set\n# CONFIG_VIDEO_OV5648 is not set\n# CONFIG_VIDEO_OV5670 is not set\n# CONFIG_VIDEO_OV5675 is not set\n# CONFIG_VIDEO_OV5693 is not set\n# CONFIG_VIDEO_OV5695 is not set\n# CONFIG_VIDEO_OV6650 is not set\n# CONFIG_VIDEO_OV7251 is not set\n# CONFIG_VIDEO_OV7640 is not set\n# CONFIG_VIDEO_OV7670 is not set\n# CONFIG_VIDEO_OV772X is not set\n# CONFIG_VIDEO_OV7740 is not set\n# CONFIG_VIDEO_OV8856 is not set\n# CONFIG_VIDEO_OV8865 is not set\n# CONFIG_VIDEO_OV9282 is not set\n# CONFIG_VIDEO_OV9640 is not set\n# CONFIG_VIDEO_OV9650 is not set\n# CONFIG_VIDEO_RDACM20 is not set\n# CONFIG_VIDEO_RDACM21 is not set\n# CONFIG_VIDEO_RJ54N1 is not set\nCONFIG_VIDEO_S5C73M3=m\n# CONFIG_VIDEO_S5K4ECGX is not set\n# CONFIG_VIDEO_S5K5BAF is not set\nCONFIG_VIDEO_S5K6A3=m\n# CONFIG_VIDEO_S5K6AA is not set\n# CONFIG_VIDEO_SR030PC30 is not set\n# CONFIG_VIDEO_VS6624 is not set\n# CONFIG_VIDEO_CCS is not set\n# CONFIG_VIDEO_ET8EK8 is not set\n# CONFIG_VIDEO_M5MOLS is not set\n# end of Camera sensor devices\n\n#\n# Lens drivers\n#\n# CONFIG_VIDEO_AD5820 is not set\n# CONFIG_VIDEO_AK7375 is not set\n# CONFIG_VIDEO_DW9714 is not set\n# CONFIG_VIDEO_DW9768 is not set\n# CONFIG_VIDEO_DW9807_VCM is not set\n# end of Lens drivers\n\n#\n# Flash devices\n#\n# CONFIG_VIDEO_ADP1653 is not set\n# CONFIG_VIDEO_LM3560 is not set\n# CONFIG_VIDEO_LM3646 is not set\n# end of Flash devices\n\n#\n# Audio decoders, processors and mixers\n#\n# CONFIG_VIDEO_CS3308 is not set\n# CONFIG_VIDEO_CS5345 is not set\n# CONFIG_VIDEO_CS53L32A is not set\n# CONFIG_VIDEO_MSP3400 is not set\n# CONFIG_VIDEO_SONY_BTF_MPX is not set\n# CONFIG_VIDEO_TDA1997X is not set\n# CONFIG_VIDEO_TDA7432 is not set\n# CONFIG_VIDEO_TDA9840 is not set\n# CONFIG_VIDEO_TEA6415C is not set\n# CONFIG_VIDEO_TEA6420 is not set\n# CONFIG_VIDEO_TLV320AIC23B is not set\n# CONFIG_VIDEO_TVAUDIO is not set\n# CONFIG_VIDEO_UDA1342 is not set\n# CONFIG_VIDEO_VP27SMPX is not set\n# CONFIG_VIDEO_WM8739 is not set\n# CONFIG_VIDEO_WM8775 is not set\n# end of Audio decoders, processors and mixers\n\n#\n# RDS decoders\n#\n# CONFIG_VIDEO_SAA6588 is not set\n# end of RDS decoders\n\n#\n# Video decoders\n#\n# CONFIG_VIDEO_ADV7180 is not set\n# CONFIG_VIDEO_ADV7183 is not set\n# CONFIG_VIDEO_ADV748X is not set\n# CONFIG_VIDEO_ADV7604 is not set\n# CONFIG_VIDEO_ADV7842 is not set\n# CONFIG_VIDEO_BT819 is not set\n# CONFIG_VIDEO_BT856 is not set\n# CONFIG_VIDEO_BT866 is not set\n# CONFIG_VIDEO_ISL7998X is not set\n# CONFIG_VIDEO_KS0127 is not set\n# CONFIG_VIDEO_MAX9286 is not set\n# CONFIG_VIDEO_ML86V7667 is not set\n# CONFIG_VIDEO_SAA7110 is not set\n# CONFIG_VIDEO_SAA711X is not set\n# CONFIG_VIDEO_TC358743 is not set\n# CONFIG_VIDEO_TVP514X is not set\n# CONFIG_VIDEO_TVP5150 is not set\n# CONFIG_VIDEO_TVP7002 is not set\n# CONFIG_VIDEO_TW2804 is not set\n# CONFIG_VIDEO_TW9903 is not set\n# CONFIG_VIDEO_TW9906 is not set\n# CONFIG_VIDEO_TW9910 is not set\n# CONFIG_VIDEO_VPX3220 is not set\n\n#\n# Video and audio decoders\n#\n# CONFIG_VIDEO_SAA717X is not set\n# CONFIG_VIDEO_CX25840 is not set\n# end of Video decoders\n\n#\n# Video encoders\n#\n# CONFIG_VIDEO_AD9389B is not set\n# CONFIG_VIDEO_ADV7170 is not set\n# CONFIG_VIDEO_ADV7175 is not set\n# CONFIG_VIDEO_ADV7343 is not set\n# CONFIG_VIDEO_ADV7393 is not set\n# CONFIG_VIDEO_ADV7511 is not set\n# CONFIG_VIDEO_AK881X is not set\n# CONFIG_VIDEO_SAA7127 is not set\n# CONFIG_VIDEO_SAA7185 is not set\n# CONFIG_VIDEO_THS8200 is not set\n# end of Video encoders\n\n#\n# Video improvement chips\n#\n# CONFIG_VIDEO_UPD64031A is not set\n# CONFIG_VIDEO_UPD64083 is not set\n# end of Video improvement chips\n\n#\n# Audio/Video compression chips\n#\n# CONFIG_VIDEO_SAA6752HS is not set\n# end of Audio/Video compression chips\n\n#\n# SDR tuner chips\n#\n# end of SDR tuner chips\n\n#\n# Miscellaneous helper chips\n#\n# CONFIG_VIDEO_I2C is not set\n# CONFIG_VIDEO_M52790 is not set\n# CONFIG_VIDEO_ST_MIPID02 is not set\n# CONFIG_VIDEO_THS7303 is not set\n# end of Miscellaneous helper chips\n\n#\n# Media SPI Adapters\n#\n# CONFIG_VIDEO_GS1662 is not set\n# end of Media SPI Adapters\n# end of Media ancillary drivers\n\n#\n# Graphics support\n#\n# CONFIG_IMX_IPUV3_CORE is not set\nCONFIG_DRM=y\nCONFIG_DRM_MIPI_DSI=y\n# CONFIG_DRM_DEBUG_MM is not set\nCONFIG_DRM_KMS_HELPER=y\nCONFIG_DRM_FBDEV_EMULATION=y\nCONFIG_DRM_FBDEV_OVERALLOC=100\n# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set\nCONFIG_DRM_DP_AUX_BUS=y\nCONFIG_DRM_DISPLAY_HELPER=y\nCONFIG_DRM_DISPLAY_DP_HELPER=y\n# CONFIG_DRM_DP_AUX_CHARDEV is not set\n# CONFIG_DRM_DP_CEC is not set\nCONFIG_DRM_GEM_SHMEM_HELPER=m\nCONFIG_DRM_SCHED=m\n\n#\n# I2C encoder or helper chips\n#\n# CONFIG_DRM_I2C_CH7006 is not set\n# CONFIG_DRM_I2C_SIL164 is not set\n# CONFIG_DRM_I2C_NXP_TDA998X is not set\n# CONFIG_DRM_I2C_NXP_TDA9950 is not set\n# end of I2C encoder or helper chips\n\n#\n# ARM devices\n#\n# CONFIG_DRM_HDLCD is not set\n# CONFIG_DRM_MALI_DISPLAY is not set\n# CONFIG_DRM_KOMEDA is not set\n# end of ARM devices\n\n# CONFIG_DRM_VGEM is not set\n# CONFIG_DRM_VKMS is not set\nCONFIG_DRM_EXYNOS=y\n\n#\n# CRTCs\n#\nCONFIG_DRM_EXYNOS_FIMD=y\n# CONFIG_DRM_EXYNOS5433_DECON is not set\n# CONFIG_DRM_EXYNOS7_DECON is not set\nCONFIG_DRM_EXYNOS_MIXER=y\n# CONFIG_DRM_EXYNOS_VIDI is not set\n\n#\n# Encoders and Bridges\n#\nCONFIG_DRM_EXYNOS_DPI=y\nCONFIG_DRM_EXYNOS_DSI=y\nCONFIG_DRM_EXYNOS_DP=y\nCONFIG_DRM_EXYNOS_HDMI=y\n\n#\n# Sub-drivers\n#\nCONFIG_DRM_EXYNOS_IPP=y\nCONFIG_DRM_EXYNOS_FIMC=y\n# CONFIG_DRM_EXYNOS_ROTATOR is not set\nCONFIG_DRM_EXYNOS_SCALER=y\n# CONFIG_DRM_UDL is not set\n# CONFIG_DRM_ARMADA is not set\n# CONFIG_DRM_RCAR_DW_HDMI is not set\n# CONFIG_DRM_RCAR_USE_LVDS is not set\n# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set\n# CONFIG_DRM_OMAP is not set\n# CONFIG_DRM_TILCDC is not set\n# CONFIG_DRM_FSL_DCU is not set\n# CONFIG_DRM_STM is not set\nCONFIG_DRM_PANEL=y\n\n#\n# Display Panels\n#\n# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set\n# CONFIG_DRM_PANEL_ARM_VERSATILE is not set\n# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set\n# CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0 is not set\n# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set\n# CONFIG_DRM_PANEL_BOE_TV101WUM_NL6 is not set\n# CONFIG_DRM_PANEL_DSI_CM is not set\n# CONFIG_DRM_PANEL_LVDS is not set\nCONFIG_DRM_PANEL_SIMPLE=y\nCONFIG_DRM_PANEL_EDP=y\n# CONFIG_DRM_PANEL_EBBG_FT8719 is not set\n# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set\n# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set\n# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set\n# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set\n# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set\n# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set\n# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set\n# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set\n# CONFIG_DRM_PANEL_JDI_R63452 is not set\n# CONFIG_DRM_PANEL_KHADAS_TS050 is not set\n# CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W is not set\n# CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829 is not set\nCONFIG_DRM_PANEL_SAMSUNG_LD9040=y\n# CONFIG_DRM_PANEL_LG_LB035Q02 is not set\n# CONFIG_DRM_PANEL_LG_LG4573 is not set\n# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set\n# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT36672A is not set\n# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set\n# CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set\n# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set\n# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set\n# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set\n# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set\n# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set\n# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set\n# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set\nCONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03=y\n# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set\n# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set\nCONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=y\n# CONFIG_DRM_PANEL_SAMSUNG_SOFEF00 is not set\n# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set\n# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set\n# CONFIG_DRM_PANEL_SHARP_LS060T1SX01 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7703 is not set\n# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set\n# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set\n# CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521 is not set\n# CONFIG_DRM_PANEL_TDO_TL070WSH30 is not set\n# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set\n# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set\n# CONFIG_DRM_PANEL_TPO_TPG110 is not set\n# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set\n# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set\n# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set\n# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set\n# end of Display Panels\n\nCONFIG_DRM_BRIDGE=y\nCONFIG_DRM_PANEL_BRIDGE=y\n\n#\n# Display Interface Bridges\n#\n# CONFIG_DRM_CDNS_DSI is not set\n# CONFIG_DRM_CHIPONE_ICN6211 is not set\n# CONFIG_DRM_CHRONTEL_CH7033 is not set\n# CONFIG_DRM_DISPLAY_CONNECTOR is not set\n# CONFIG_DRM_ITE_IT6505 is not set\n# CONFIG_DRM_LONTIUM_LT8912B is not set\n# CONFIG_DRM_LONTIUM_LT9211 is not set\n# CONFIG_DRM_LONTIUM_LT9611 is not set\n# CONFIG_DRM_LONTIUM_LT9611UXC is not set\n# CONFIG_DRM_ITE_IT66121 is not set\n# CONFIG_DRM_LVDS_CODEC is not set\n# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set\n# CONFIG_DRM_NWL_MIPI_DSI is not set\nCONFIG_DRM_NXP_PTN3460=y\nCONFIG_DRM_PARADE_PS8622=y\n# CONFIG_DRM_PARADE_PS8640 is not set\n# CONFIG_DRM_SIL_SII8620 is not set\n# CONFIG_DRM_SII902X is not set\nCONFIG_DRM_SII9234=y\n# CONFIG_DRM_SIMPLE_BRIDGE is not set\n# CONFIG_DRM_THINE_THC63LVD1024 is not set\n# CONFIG_DRM_TOSHIBA_TC358762 is not set\nCONFIG_DRM_TOSHIBA_TC358764=y\n# CONFIG_DRM_TOSHIBA_TC358767 is not set\n# CONFIG_DRM_TOSHIBA_TC358768 is not set\n# CONFIG_DRM_TOSHIBA_TC358775 is not set\n# CONFIG_DRM_TI_DLPC3433 is not set\n# CONFIG_DRM_TI_TFP410 is not set\n# CONFIG_DRM_TI_SN65DSI83 is not set\n# CONFIG_DRM_TI_SN65DSI86 is not set\n# CONFIG_DRM_TI_TPD12S015 is not set\n# CONFIG_DRM_ANALOGIX_ANX6345 is not set\n# CONFIG_DRM_ANALOGIX_ANX78XX is not set\nCONFIG_DRM_ANALOGIX_DP=y\n# CONFIG_DRM_ANALOGIX_ANX7625 is not set\n# CONFIG_DRM_I2C_ADV7511 is not set\n# CONFIG_DRM_CDNS_MHDP8546 is not set\n# end of Display Interface Bridges\n\n# CONFIG_DRM_STI is not set\n# CONFIG_DRM_ETNAVIV is not set\n# CONFIG_DRM_LOGICVC is not set\n# CONFIG_DRM_MXSFB is not set\n# CONFIG_DRM_IMX_LCDIF is not set\n# CONFIG_DRM_ARCPGU is not set\n# CONFIG_DRM_GM12U320 is not set\n# CONFIG_DRM_PANEL_MIPI_DBI is not set\n# CONFIG_DRM_SIMPLEDRM is not set\n# CONFIG_TINYDRM_HX8357D is not set\n# CONFIG_TINYDRM_ILI9163 is not set\n# CONFIG_TINYDRM_ILI9225 is not set\n# CONFIG_TINYDRM_ILI9341 is not set\n# CONFIG_TINYDRM_ILI9486 is not set\n# CONFIG_TINYDRM_MI0283QT is not set\n# CONFIG_TINYDRM_REPAPER is not set\n# CONFIG_TINYDRM_ST7586 is not set\n# CONFIG_TINYDRM_ST7735R is not set\n# CONFIG_DRM_PL111 is not set\n# CONFIG_DRM_TVE200 is not set\n# CONFIG_DRM_LIMA is not set\nCONFIG_DRM_PANFROST=m\n# CONFIG_DRM_MCDE is not set\n# CONFIG_DRM_TIDSS is not set\n# CONFIG_DRM_GUD is not set\n# CONFIG_DRM_SSD130X is not set\n# CONFIG_DRM_LEGACY is not set\nCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y\nCONFIG_DRM_NOMODESET=y\n\n#\n# Frame buffer Devices\n#\nCONFIG_FB_CMDLINE=y\nCONFIG_FB_NOTIFY=y\nCONFIG_FB=y\n# CONFIG_FIRMWARE_EDID is not set\nCONFIG_FB_CFB_FILLRECT=y\nCONFIG_FB_CFB_COPYAREA=y\nCONFIG_FB_CFB_IMAGEBLIT=y\nCONFIG_FB_SYS_FILLRECT=y\nCONFIG_FB_SYS_COPYAREA=y\nCONFIG_FB_SYS_IMAGEBLIT=y\n# CONFIG_FB_FOREIGN_ENDIAN is not set\nCONFIG_FB_SYS_FOPS=y\nCONFIG_FB_DEFERRED_IO=y\n# CONFIG_FB_MODE_HELPERS is not set\n# CONFIG_FB_TILEBLITTING is not set\n\n#\n# Frame buffer hardware drivers\n#\n# CONFIG_FB_ARMCLCD is not set\n# CONFIG_FB_OPENCORES is not set\n# CONFIG_FB_S1D13XXX is not set\n# CONFIG_FB_SMSCUFX is not set\n# CONFIG_FB_UDL is not set\n# CONFIG_FB_IBM_GXT4500 is not set\n# CONFIG_FB_VIRTUAL is not set\n# CONFIG_FB_METRONOME is not set\n# CONFIG_FB_SIMPLE is not set\n# CONFIG_FB_SSD1307 is not set\n# end of Frame buffer Devices\n\n#\n# Backlight & LCD device support\n#\nCONFIG_LCD_CLASS_DEVICE=y\n# CONFIG_LCD_L4F00242T03 is not set\n# CONFIG_LCD_LMS283GF05 is not set\n# CONFIG_LCD_LTV350QV is not set\n# CONFIG_LCD_ILI922X is not set\n# CONFIG_LCD_ILI9320 is not set\n# CONFIG_LCD_TDO24M is not set\n# CONFIG_LCD_VGG2432A4 is not set\n# CONFIG_LCD_PLATFORM is not set\n# CONFIG_LCD_AMS369FG06 is not set\n# CONFIG_LCD_LMS501KF03 is not set\n# CONFIG_LCD_HX8357 is not set\n# CONFIG_LCD_OTM3225A is not set\nCONFIG_BACKLIGHT_CLASS_DEVICE=y\n# CONFIG_BACKLIGHT_KTD253 is not set\nCONFIG_BACKLIGHT_PWM=y\n# CONFIG_BACKLIGHT_QCOM_WLED is not set\n# CONFIG_BACKLIGHT_ADP8860 is not set\n# CONFIG_BACKLIGHT_ADP8870 is not set\n# CONFIG_BACKLIGHT_LM3630A is not set\n# CONFIG_BACKLIGHT_LM3639 is not set\n# CONFIG_BACKLIGHT_LP855X is not set\n# CONFIG_BACKLIGHT_GPIO is not set\n# CONFIG_BACKLIGHT_LV5207LP is not set\n# CONFIG_BACKLIGHT_BD6107 is not set\n# CONFIG_BACKLIGHT_ARCXCNN is not set\n# CONFIG_BACKLIGHT_LED is not set\n# end of Backlight & LCD device support\n\nCONFIG_VIDEOMODE_HELPERS=y\nCONFIG_HDMI=y\n\n#\n# Console display driver support\n#\nCONFIG_DUMMY_CONSOLE=y\nCONFIG_FRAMEBUFFER_CONSOLE=y\n# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set\nCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y\n# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set\n# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set\n# end of Console display driver support\n\nCONFIG_LOGO=y\nCONFIG_LOGO_LINUX_MONO=y\nCONFIG_LOGO_LINUX_VGA16=y\nCONFIG_LOGO_LINUX_CLUT224=y\n# end of Graphics support\n\nCONFIG_SOUND=y\nCONFIG_SND=y\nCONFIG_SND_TIMER=y\nCONFIG_SND_PCM=y\nCONFIG_SND_PCM_ELD=y\nCONFIG_SND_PCM_IEC958=y\nCONFIG_SND_DMAENGINE_PCM=y\nCONFIG_SND_JACK=y\nCONFIG_SND_JACK_INPUT_DEV=y\n# CONFIG_SND_OSSEMUL is not set\nCONFIG_SND_PCM_TIMER=y\n# CONFIG_SND_HRTIMER is not set\n# CONFIG_SND_DYNAMIC_MINORS is not set\nCONFIG_SND_SUPPORT_OLD_API=y\nCONFIG_SND_PROC_FS=y\nCONFIG_SND_VERBOSE_PROCFS=y\n# CONFIG_SND_VERBOSE_PRINTK is not set\nCONFIG_SND_CTL_FAST_LOOKUP=y\n# CONFIG_SND_DEBUG is not set\n# CONFIG_SND_CTL_INPUT_VALIDATION is not set\n# CONFIG_SND_SEQUENCER is not set\nCONFIG_SND_DRIVERS=y\n# CONFIG_SND_DUMMY is not set\n# CONFIG_SND_ALOOP is not set\n# CONFIG_SND_MTPAV is not set\n# CONFIG_SND_SERIAL_U16550 is not set\n# CONFIG_SND_MPU401 is not set\n\n#\n# HD-Audio\n#\n# end of HD-Audio\n\nCONFIG_SND_HDA_PREALLOC_SIZE=64\nCONFIG_SND_ARM=y\n# CONFIG_SND_ARMAACI is not set\nCONFIG_SND_SPI=y\nCONFIG_SND_USB=y\n# CONFIG_SND_USB_AUDIO is not set\n# CONFIG_SND_USB_UA101 is not set\n# CONFIG_SND_USB_CAIAQ is not set\n# CONFIG_SND_USB_6FIRE is not set\n# CONFIG_SND_USB_HIFACE is not set\n# CONFIG_SND_BCD2000 is not set\n# CONFIG_SND_USB_POD is not set\n# CONFIG_SND_USB_PODHD is not set\n# CONFIG_SND_USB_TONEPORT is not set\n# CONFIG_SND_USB_VARIAX is not set\nCONFIG_SND_SOC=y\nCONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y\n# CONFIG_SND_SOC_ADI is not set\n# CONFIG_SND_SOC_AMD_ACP is not set\n# CONFIG_SND_AMD_ACP_CONFIG is not set\n# CONFIG_SND_ATMEL_SOC is not set\n# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set\n# CONFIG_SND_DESIGNWARE_I2S is not set\n\n#\n# SoC Audio for Freescale CPUs\n#\n\n#\n# Common SoC Audio options for Freescale CPUs:\n#\n# CONFIG_SND_SOC_FSL_ASRC is not set\n# CONFIG_SND_SOC_FSL_SAI is not set\n# CONFIG_SND_SOC_FSL_AUDMIX is not set\n# CONFIG_SND_SOC_FSL_SSI is not set\n# CONFIG_SND_SOC_FSL_SPDIF is not set\n# CONFIG_SND_SOC_FSL_ESAI is not set\n# CONFIG_SND_SOC_FSL_MICFIL is not set\n# CONFIG_SND_SOC_FSL_XCVR is not set\n# CONFIG_SND_SOC_IMX_AUDMUX is not set\n# end of SoC Audio for Freescale CPUs\n\n# CONFIG_SND_I2S_HI6210_I2S is not set\n# CONFIG_SND_SOC_IMG is not set\n# CONFIG_SND_SOC_MTK_BTCVSD is not set\nCONFIG_SND_SOC_SAMSUNG=y\nCONFIG_SND_SAMSUNG_PCM=y\n# CONFIG_SND_SAMSUNG_SPDIF is not set\nCONFIG_SND_SAMSUNG_I2S=y\nCONFIG_SND_SOC_SAMSUNG_SMDK_WM8994=y\n# CONFIG_SND_SOC_SAMSUNG_SMDK_SPDIF is not set\nCONFIG_SND_SOC_SMDK_WM8994_PCM=y\n# CONFIG_SND_SOC_SNOW is not set\nCONFIG_SND_SOC_ODROID=y\n# CONFIG_SND_SOC_ARNDALE is not set\n# CONFIG_SND_SOC_SAMSUNG_ARIES_WM8994 is not set\n# CONFIG_SND_SOC_SAMSUNG_MIDAS_WM1811 is not set\n# CONFIG_SND_SOC_SOF_TOPLEVEL is not set\n\n#\n# STMicroelectronics STM32 SOC audio support\n#\n# end of STMicroelectronics STM32 SOC audio support\n\n# CONFIG_SND_SOC_XILINX_I2S is not set\n# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set\n# CONFIG_SND_SOC_XILINX_SPDIF is not set\n# CONFIG_SND_SOC_XTFPGA_I2S is not set\nCONFIG_SND_SOC_I2C_AND_SPI=y\n\n#\n# CODEC drivers\n#\nCONFIG_SND_SOC_WM_HUBS=y\n# CONFIG_SND_SOC_AC97_CODEC is not set\n# CONFIG_SND_SOC_ADAU1372_I2C is not set\n# CONFIG_SND_SOC_ADAU1372_SPI is not set\n# CONFIG_SND_SOC_ADAU1701 is not set\n# CONFIG_SND_SOC_ADAU1761_I2C is not set\n# CONFIG_SND_SOC_ADAU1761_SPI is not set\n# CONFIG_SND_SOC_ADAU7002 is not set\n# CONFIG_SND_SOC_ADAU7118_HW is not set\n# CONFIG_SND_SOC_ADAU7118_I2C is not set\n# CONFIG_SND_SOC_AK4104 is not set\n# CONFIG_SND_SOC_AK4118 is not set\n# CONFIG_SND_SOC_AK4375 is not set\n# CONFIG_SND_SOC_AK4458 is not set\n# CONFIG_SND_SOC_AK4554 is not set\n# CONFIG_SND_SOC_AK4613 is not set\n# CONFIG_SND_SOC_AK4642 is not set\n# CONFIG_SND_SOC_AK5386 is not set\n# CONFIG_SND_SOC_AK5558 is not set\n# CONFIG_SND_SOC_ALC5623 is not set\n# CONFIG_SND_SOC_AW8738 is not set\n# CONFIG_SND_SOC_BD28623 is not set\n# CONFIG_SND_SOC_BT_SCO is not set\n# CONFIG_SND_SOC_CS35L32 is not set\n# CONFIG_SND_SOC_CS35L33 is not set\n# CONFIG_SND_SOC_CS35L34 is not set\n# CONFIG_SND_SOC_CS35L35 is not set\n# CONFIG_SND_SOC_CS35L36 is not set\n# CONFIG_SND_SOC_CS35L41_SPI is not set\n# CONFIG_SND_SOC_CS35L41_I2C is not set\n# CONFIG_SND_SOC_CS35L45_SPI is not set\n# CONFIG_SND_SOC_CS35L45_I2C is not set\n# CONFIG_SND_SOC_CS42L42 is not set\n# CONFIG_SND_SOC_CS42L51_I2C is not set\n# CONFIG_SND_SOC_CS42L52 is not set\n# CONFIG_SND_SOC_CS42L56 is not set\n# CONFIG_SND_SOC_CS42L73 is not set\n# CONFIG_SND_SOC_CS42L83 is not set\n# CONFIG_SND_SOC_CS4234 is not set\n# CONFIG_SND_SOC_CS4265 is not set\n# CONFIG_SND_SOC_CS4270 is not set\n# CONFIG_SND_SOC_CS4271_I2C is not set\n# CONFIG_SND_SOC_CS4271_SPI is not set\n# CONFIG_SND_SOC_CS42XX8_I2C is not set\n# CONFIG_SND_SOC_CS43130 is not set\n# CONFIG_SND_SOC_CS4341 is not set\n# CONFIG_SND_SOC_CS4349 is not set\n# CONFIG_SND_SOC_CS53L30 is not set\n# CONFIG_SND_SOC_CX2072X is not set\n# CONFIG_SND_SOC_DA7213 is not set\n# CONFIG_SND_SOC_DMIC is not set\nCONFIG_SND_SOC_HDMI_CODEC=y\n# CONFIG_SND_SOC_ES7134 is not set\n# CONFIG_SND_SOC_ES7241 is not set\n# CONFIG_SND_SOC_ES8316 is not set\n# CONFIG_SND_SOC_ES8326 is not set\n# CONFIG_SND_SOC_ES8328_I2C is not set\n# CONFIG_SND_SOC_ES8328_SPI is not set\n# CONFIG_SND_SOC_GTM601 is not set\n# CONFIG_SND_SOC_HDA is not set\n# CONFIG_SND_SOC_ICS43432 is not set\n# CONFIG_SND_SOC_INNO_RK3036 is not set\n# CONFIG_SND_SOC_MAX98088 is not set\nCONFIG_SND_SOC_MAX98090=y\n# CONFIG_SND_SOC_MAX98357A is not set\n# CONFIG_SND_SOC_MAX98504 is not set\n# CONFIG_SND_SOC_MAX9867 is not set\n# CONFIG_SND_SOC_MAX98927 is not set\n# CONFIG_SND_SOC_MAX98520 is not set\n# CONFIG_SND_SOC_MAX98373_I2C is not set\n# CONFIG_SND_SOC_MAX98390 is not set\n# CONFIG_SND_SOC_MAX98396 is not set\n# CONFIG_SND_SOC_MAX9860 is not set\n# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set\n# CONFIG_SND_SOC_PCM1681 is not set\n# CONFIG_SND_SOC_PCM1789_I2C is not set\n# CONFIG_SND_SOC_PCM179X_I2C is not set\n# CONFIG_SND_SOC_PCM179X_SPI is not set\n# CONFIG_SND_SOC_PCM186X_I2C is not set\n# CONFIG_SND_SOC_PCM186X_SPI is not set\n# CONFIG_SND_SOC_PCM3060_I2C is not set\n# CONFIG_SND_SOC_PCM3060_SPI is not set\n# CONFIG_SND_SOC_PCM3168A_I2C is not set\n# CONFIG_SND_SOC_PCM3168A_SPI is not set\n# CONFIG_SND_SOC_PCM5102A is not set\n# CONFIG_SND_SOC_PCM512x_I2C is not set\n# CONFIG_SND_SOC_PCM512x_SPI is not set\n# CONFIG_SND_SOC_RK3328 is not set\n# CONFIG_SND_SOC_RT5616 is not set\nCONFIG_SND_SOC_RT5631=y\n# CONFIG_SND_SOC_RT5640 is not set\n# CONFIG_SND_SOC_RT5659 is not set\n# CONFIG_SND_SOC_RT9120 is not set\n# CONFIG_SND_SOC_SGTL5000 is not set\n# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set\n# CONFIG_SND_SOC_SIMPLE_MUX is not set\n# CONFIG_SND_SOC_SPDIF is not set\n# CONFIG_SND_SOC_SRC4XXX_I2C is not set\n# CONFIG_SND_SOC_SSM2305 is not set\n# CONFIG_SND_SOC_SSM2518 is not set\n# CONFIG_SND_SOC_SSM2602_SPI is not set\n# CONFIG_SND_SOC_SSM2602_I2C is not set\n# CONFIG_SND_SOC_SSM4567 is not set\n# CONFIG_SND_SOC_STA32X is not set\n# CONFIG_SND_SOC_STA350 is not set\n# CONFIG_SND_SOC_STI_SAS is not set\n# CONFIG_SND_SOC_TAS2552 is not set\n# CONFIG_SND_SOC_TAS2562 is not set\n# CONFIG_SND_SOC_TAS2764 is not set\n# CONFIG_SND_SOC_TAS2770 is not set\n# CONFIG_SND_SOC_TAS2780 is not set\n# CONFIG_SND_SOC_TAS5086 is not set\n# CONFIG_SND_SOC_TAS571X is not set\n# CONFIG_SND_SOC_TAS5720 is not set\n# CONFIG_SND_SOC_TAS5805M is not set\n# CONFIG_SND_SOC_TAS6424 is not set\n# CONFIG_SND_SOC_TDA7419 is not set\n# CONFIG_SND_SOC_TFA9879 is not set\n# CONFIG_SND_SOC_TFA989X is not set\n# CONFIG_SND_SOC_TLV320ADC3XXX is not set\n# CONFIG_SND_SOC_TLV320AIC23_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC23_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC31XX is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set\n# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set\n# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set\n# CONFIG_SND_SOC_TLV320ADCX140 is not set\n# CONFIG_SND_SOC_TS3A227E is not set\n# CONFIG_SND_SOC_TSCS42XX is not set\n# CONFIG_SND_SOC_TSCS454 is not set\n# CONFIG_SND_SOC_UDA1334 is not set\n# CONFIG_SND_SOC_WM8510 is not set\n# CONFIG_SND_SOC_WM8523 is not set\n# CONFIG_SND_SOC_WM8524 is not set\n# CONFIG_SND_SOC_WM8580 is not set\n# CONFIG_SND_SOC_WM8711 is not set\n# CONFIG_SND_SOC_WM8728 is not set\n# CONFIG_SND_SOC_WM8731_I2C is not set\n# CONFIG_SND_SOC_WM8731_SPI is not set\n# CONFIG_SND_SOC_WM8737 is not set\n# CONFIG_SND_SOC_WM8741 is not set\n# CONFIG_SND_SOC_WM8750 is not set\n# CONFIG_SND_SOC_WM8753 is not set\n# CONFIG_SND_SOC_WM8770 is not set\n# CONFIG_SND_SOC_WM8776 is not set\n# CONFIG_SND_SOC_WM8782 is not set\n# CONFIG_SND_SOC_WM8804_I2C is not set\n# CONFIG_SND_SOC_WM8804_SPI is not set\n# CONFIG_SND_SOC_WM8903 is not set\n# CONFIG_SND_SOC_WM8904 is not set\n# CONFIG_SND_SOC_WM8940 is not set\n# CONFIG_SND_SOC_WM8960 is not set\n# CONFIG_SND_SOC_WM8962 is not set\n# CONFIG_SND_SOC_WM8974 is not set\n# CONFIG_SND_SOC_WM8978 is not set\n# CONFIG_SND_SOC_WM8985 is not set\nCONFIG_SND_SOC_WM8994=y\n# CONFIG_SND_SOC_ZL38060 is not set\n# CONFIG_SND_SOC_MAX9759 is not set\n# CONFIG_SND_SOC_MT6351 is not set\n# CONFIG_SND_SOC_MT6358 is not set\n# CONFIG_SND_SOC_MT6660 is not set\n# CONFIG_SND_SOC_NAU8315 is not set\n# CONFIG_SND_SOC_NAU8540 is not set\n# CONFIG_SND_SOC_NAU8810 is not set\n# CONFIG_SND_SOC_NAU8821 is not set\n# CONFIG_SND_SOC_NAU8822 is not set\n# CONFIG_SND_SOC_NAU8824 is not set\n# CONFIG_SND_SOC_TPA6130A2 is not set\n# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_VA_MACRO is not set\n# CONFIG_SND_SOC_LPASS_RX_MACRO is not set\n# CONFIG_SND_SOC_LPASS_TX_MACRO is not set\n# end of CODEC drivers\n\nCONFIG_SND_SIMPLE_CARD_UTILS=y\nCONFIG_SND_SIMPLE_CARD=y\n# CONFIG_SND_AUDIO_GRAPH_CARD is not set\n# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set\n# CONFIG_SND_TEST_COMPONENT is not set\n\n#\n# HID support\n#\nCONFIG_HID=y\n# CONFIG_HID_BATTERY_STRENGTH is not set\n# CONFIG_HIDRAW is not set\n# CONFIG_UHID is not set\nCONFIG_HID_GENERIC=y\n\n#\n# Special HID drivers\n#\nCONFIG_HID_A4TECH=y\n# CONFIG_HID_ACCUTOUCH is not set\n# CONFIG_HID_ACRUX is not set\nCONFIG_HID_APPLE=y\n# CONFIG_HID_APPLEIR is not set\n# CONFIG_HID_ASUS is not set\n# CONFIG_HID_AUREAL is not set\nCONFIG_HID_BELKIN=y\n# CONFIG_HID_BETOP_FF is not set\n# CONFIG_HID_BIGBEN_FF is not set\nCONFIG_HID_CHERRY=y\nCONFIG_HID_CHICONY=y\n# CONFIG_HID_CORSAIR is not set\n# CONFIG_HID_COUGAR is not set\n# CONFIG_HID_MACALLY is not set\n# CONFIG_HID_PRODIKEYS is not set\n# CONFIG_HID_CMEDIA is not set\n# CONFIG_HID_CREATIVE_SB0540 is not set\nCONFIG_HID_CYPRESS=y\n# CONFIG_HID_DRAGONRISE is not set\n# CONFIG_HID_EMS_FF is not set\n# CONFIG_HID_ELAN is not set\n# CONFIG_HID_ELECOM is not set\n# CONFIG_HID_ELO is not set\nCONFIG_HID_EZKEY=y\n# CONFIG_HID_GEMBIRD is not set\n# CONFIG_HID_GFRM is not set\n# CONFIG_HID_GLORIOUS is not set\n# CONFIG_HID_HOLTEK is not set\n# CONFIG_HID_VIVALDI is not set\n# CONFIG_HID_GT683R is not set\n# CONFIG_HID_KEYTOUCH is not set\n# CONFIG_HID_KYE is not set\n# CONFIG_HID_UCLOGIC is not set\n# CONFIG_HID_WALTOP is not set\n# CONFIG_HID_VIEWSONIC is not set\n# CONFIG_HID_VRC2 is not set\n# CONFIG_HID_XIAOMI is not set\n# CONFIG_HID_GYRATION is not set\n# CONFIG_HID_ICADE is not set\nCONFIG_HID_ITE=y\n# CONFIG_HID_JABRA is not set\n# CONFIG_HID_TWINHAN is not set\nCONFIG_HID_KENSINGTON=y\n# CONFIG_HID_LCPOWER is not set\n# CONFIG_HID_LED is not set\n# CONFIG_HID_LENOVO is not set\n# CONFIG_HID_LETSKETCH is not set\nCONFIG_HID_LOGITECH=y\n# CONFIG_HID_LOGITECH_HIDPP is not set\n# CONFIG_LOGITECH_FF is not set\n# CONFIG_LOGIRUMBLEPAD2_FF is not set\n# CONFIG_LOGIG940_FF is not set\n# CONFIG_LOGIWHEELS_FF is not set\n# CONFIG_HID_MAGICMOUSE is not set\n# CONFIG_HID_MALTRON is not set\n# CONFIG_HID_MAYFLASH is not set\n# CONFIG_HID_MEGAWORLD_FF is not set\nCONFIG_HID_REDRAGON=y\nCONFIG_HID_MICROSOFT=y\nCONFIG_HID_MONTEREY=y\n# CONFIG_HID_MULTITOUCH is not set\nCONFIG_HID_NINTENDO=m\nCONFIG_NINTENDO_FF=y\n# CONFIG_HID_NTI is not set\n# CONFIG_HID_NTRIG is not set\n# CONFIG_HID_ORTEK is not set\n# CONFIG_HID_OUYA is not set\n# CONFIG_HID_PANTHERLORD is not set\n# CONFIG_HID_PENMOUNT is not set\n# CONFIG_HID_PETALYNX is not set\n# CONFIG_HID_PICOLCD is not set\n# CONFIG_HID_PLANTRONICS is not set\n# CONFIG_HID_PXRC is not set\n# CONFIG_HID_RAZER is not set\n# CONFIG_HID_PRIMAX is not set\n# CONFIG_HID_RETRODE is not set\n# CONFIG_HID_ROCCAT is not set\n# CONFIG_HID_SAITEK is not set\n# CONFIG_HID_SAMSUNG is not set\n# CONFIG_HID_SEMITEK is not set\n# CONFIG_HID_SIGMAMICRO is not set\n# CONFIG_HID_SONY is not set\n# CONFIG_HID_SPEEDLINK is not set\n# CONFIG_HID_STEAM is not set\n# CONFIG_HID_STEELSERIES is not set\n# CONFIG_HID_SUNPLUS is not set\n# CONFIG_HID_RMI is not set\n# CONFIG_HID_GREENASIA is not set\n# CONFIG_HID_SMARTJOYPLUS is not set\n# CONFIG_HID_TIVO is not set\n# CONFIG_HID_TOPSEED is not set\n# CONFIG_HID_TOPRE is not set\n# CONFIG_HID_THINGM is not set\n# CONFIG_HID_THRUSTMASTER is not set\n# CONFIG_HID_UDRAW_PS3 is not set\n# CONFIG_HID_U2FZERO is not set\n# CONFIG_HID_WACOM is not set\n# CONFIG_HID_WIIMOTE is not set\n# CONFIG_HID_XINMO is not set\n# CONFIG_HID_ZEROPLUS is not set\n# CONFIG_HID_ZYDACRON is not set\n# CONFIG_HID_SENSOR_HUB is not set\n# CONFIG_HID_ALPS is not set\n# CONFIG_HID_MCP2221 is not set\n# end of Special HID drivers\n\n#\n# USB HID support\n#\nCONFIG_USB_HID=y\n# CONFIG_HID_PID is not set\n# CONFIG_USB_HIDDEV is not set\n# end of USB HID support\n\n#\n# I2C HID support\n#\n# CONFIG_I2C_HID_OF is not set\n# CONFIG_I2C_HID_OF_ELAN is not set\n# CONFIG_I2C_HID_OF_GOODIX is not set\n# end of I2C HID support\n# end of HID support\n\nCONFIG_USB_OHCI_LITTLE_ENDIAN=y\nCONFIG_USB_SUPPORT=y\nCONFIG_USB_COMMON=y\n# CONFIG_USB_LED_TRIG is not set\n# CONFIG_USB_ULPI_BUS is not set\n# CONFIG_USB_CONN_GPIO is not set\nCONFIG_USB_ARCH_HAS_HCD=y\nCONFIG_USB=y\nCONFIG_USB_ANNOUNCE_NEW_DEVICES=y\n\n#\n# Miscellaneous USB options\n#\nCONFIG_USB_DEFAULT_PERSIST=y\n# CONFIG_USB_FEW_INIT_RETRIES is not set\n# CONFIG_USB_DYNAMIC_MINORS is not set\n# CONFIG_USB_OTG is not set\n# CONFIG_USB_OTG_PRODUCTLIST is not set\n# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set\nCONFIG_USB_AUTOSUSPEND_DELAY=2\n# CONFIG_USB_MON is not set\n\n#\n# USB Host Controller Drivers\n#\n# CONFIG_USB_C67X00_HCD is not set\nCONFIG_USB_XHCI_HCD=y\n# CONFIG_USB_XHCI_DBGCAP is not set\n# CONFIG_USB_XHCI_PCI_RENESAS is not set\nCONFIG_USB_XHCI_PLATFORM=y\nCONFIG_USB_EHCI_HCD=y\n# CONFIG_USB_EHCI_ROOT_HUB_TT is not set\nCONFIG_USB_EHCI_TT_NEWSCHED=y\n# CONFIG_USB_EHCI_FSL is not set\nCONFIG_USB_EHCI_EXYNOS=y\n# CONFIG_USB_EHCI_HCD_PLATFORM is not set\n# CONFIG_USB_OXU210HP_HCD is not set\n# CONFIG_USB_ISP116X_HCD is not set\n# CONFIG_USB_FOTG210_HCD is not set\n# CONFIG_USB_MAX3421_HCD is not set\nCONFIG_USB_OHCI_HCD=y\nCONFIG_USB_OHCI_EXYNOS=y\n# CONFIG_USB_OHCI_HCD_PLATFORM is not set\n# CONFIG_USB_SL811_HCD is not set\n# CONFIG_USB_R8A66597_HCD is not set\n# CONFIG_USB_HCD_BCMA is not set\n# CONFIG_USB_HCD_SSB is not set\n# CONFIG_USB_HCD_TEST_MODE is not set\n\n#\n# USB Device Class drivers\n#\nCONFIG_USB_ACM=m\nCONFIG_USB_PRINTER=m\nCONFIG_USB_WDM=m\nCONFIG_USB_TMC=m\n\n#\n# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may\n#\n\n#\n# also be needed; see USB_STORAGE Help for more info\n#\nCONFIG_USB_STORAGE=y\n# CONFIG_USB_STORAGE_DEBUG is not set\nCONFIG_USB_STORAGE_REALTEK=m\nCONFIG_REALTEK_AUTOPM=y\n# CONFIG_USB_STORAGE_DATAFAB is not set\n# CONFIG_USB_STORAGE_FREECOM is not set\n# CONFIG_USB_STORAGE_ISD200 is not set\n# CONFIG_USB_STORAGE_USBAT is not set\n# CONFIG_USB_STORAGE_SDDR09 is not set\n# CONFIG_USB_STORAGE_SDDR55 is not set\n# CONFIG_USB_STORAGE_JUMPSHOT is not set\n# CONFIG_USB_STORAGE_ALAUDA is not set\n# CONFIG_USB_STORAGE_ONETOUCH is not set\n# CONFIG_USB_STORAGE_KARMA is not set\n# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set\n# CONFIG_USB_STORAGE_ENE_UB6250 is not set\n# CONFIG_USB_UAS is not set\n\n#\n# USB Imaging devices\n#\n# CONFIG_USB_MDC800 is not set\n# CONFIG_USB_MICROTEK is not set\n# CONFIG_USBIP_CORE is not set\n# CONFIG_USB_CDNS_SUPPORT is not set\n# CONFIG_USB_MUSB_HDRC is not set\nCONFIG_USB_DWC3=y\n# CONFIG_USB_DWC3_HOST is not set\n# CONFIG_USB_DWC3_GADGET is not set\nCONFIG_USB_DWC3_DUAL_ROLE=y\n\n#\n# Platform Glue Driver Support\n#\nCONFIG_USB_DWC3_EXYNOS=y\nCONFIG_USB_DWC3_OF_SIMPLE=y\nCONFIG_USB_DWC2=y\n# CONFIG_USB_DWC2_HOST is not set\n\n#\n# Gadget/Dual-role mode requires USB Gadget support to be enabled\n#\n# CONFIG_USB_DWC2_PERIPHERAL is not set\nCONFIG_USB_DWC2_DUAL_ROLE=y\n# CONFIG_USB_DWC2_DEBUG is not set\n# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set\n# CONFIG_USB_CHIPIDEA is not set\n# CONFIG_USB_ISP1760 is not set\n\n#\n# USB port drivers\n#\n# CONFIG_USB_SERIAL is not set\n\n#\n# USB Miscellaneous drivers\n#\n# CONFIG_USB_EMI62 is not set\n# CONFIG_USB_EMI26 is not set\n# CONFIG_USB_ADUTUX is not set\n# CONFIG_USB_SEVSEG is not set\n# CONFIG_USB_LEGOTOWER is not set\n# CONFIG_USB_LCD is not set\n# CONFIG_USB_CYPRESS_CY7C63 is not set\n# CONFIG_USB_CYTHERM is not set\n# CONFIG_USB_IDMOUSE is not set\n# CONFIG_USB_FTDI_ELAN is not set\n# CONFIG_USB_APPLEDISPLAY is not set\n# CONFIG_APPLE_MFI_FASTCHARGE is not set\n# CONFIG_USB_SISUSBVGA is not set\n# CONFIG_USB_LD is not set\n# CONFIG_USB_TRANCEVIBRATOR is not set\n# CONFIG_USB_IOWARRIOR is not set\n# CONFIG_USB_TEST is not set\n# CONFIG_USB_EHSET_TEST_FIXTURE is not set\n# CONFIG_USB_ISIGHTFW is not set\n# CONFIG_USB_YUREX is not set\n# CONFIG_USB_EZUSB_FX2 is not set\n# CONFIG_USB_HUB_USB251XB is not set\nCONFIG_USB_HSIC_USB3503=y\n# CONFIG_USB_HSIC_USB4604 is not set\n# CONFIG_USB_LINK_LAYER_TEST is not set\n# CONFIG_USB_CHAOSKEY is not set\n# CONFIG_USB_ONBOARD_HUB is not set\n\n#\n# USB Physical Layer drivers\n#\n# CONFIG_NOP_USB_XCEIV is not set\n# CONFIG_USB_GPIO_VBUS is not set\n# CONFIG_USB_ISP1301 is not set\n# CONFIG_USB_ULPI is not set\n# end of USB Physical Layer drivers\n\nCONFIG_USB_GADGET=y\n# CONFIG_USB_GADGET_DEBUG is not set\n# CONFIG_USB_GADGET_DEBUG_FILES is not set\n# CONFIG_USB_GADGET_DEBUG_FS is not set\nCONFIG_USB_GADGET_VBUS_DRAW=2\nCONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2\n\n#\n# USB Peripheral Controller\n#\n# CONFIG_USB_FUSB300 is not set\n# CONFIG_USB_FOTG210_UDC is not set\n# CONFIG_USB_GR_UDC is not set\n# CONFIG_USB_R8A66597 is not set\n# CONFIG_USB_PXA27X is not set\n# CONFIG_USB_MV_UDC is not set\n# CONFIG_USB_MV_U3D is not set\n# CONFIG_USB_SNP_UDC_PLAT is not set\n# CONFIG_USB_M66592 is not set\n# CONFIG_USB_BDC_UDC is not set\n# CONFIG_USB_NET2272 is not set\n# CONFIG_USB_GADGET_XILINX is not set\n# CONFIG_USB_MAX3420_UDC is not set\n# CONFIG_USB_DUMMY_HCD is not set\n# end of USB Peripheral Controller\n\nCONFIG_USB_LIBCOMPOSITE=y\nCONFIG_USB_U_ETHER=y\nCONFIG_USB_F_ECM=y\nCONFIG_USB_F_SUBSET=y\nCONFIG_USB_F_RNDIS=y\n# CONFIG_USB_CONFIGFS is not set\n\n#\n# USB Gadget precomposed configurations\n#\n# CONFIG_USB_ZERO is not set\n# CONFIG_USB_AUDIO is not set\nCONFIG_USB_ETH=y\nCONFIG_USB_ETH_RNDIS=y\n# CONFIG_USB_ETH_EEM is not set\n# CONFIG_USB_G_NCM is not set\n# CONFIG_USB_GADGETFS is not set\n# CONFIG_USB_FUNCTIONFS is not set\n# CONFIG_USB_MASS_STORAGE is not set\n# CONFIG_USB_G_SERIAL is not set\n# CONFIG_USB_MIDI_GADGET is not set\n# CONFIG_USB_G_PRINTER is not set\n# CONFIG_USB_CDC_COMPOSITE is not set\n# CONFIG_USB_G_ACM_MS is not set\n# CONFIG_USB_G_MULTI is not set\n# CONFIG_USB_G_HID is not set\n# CONFIG_USB_G_DBGP is not set\n# CONFIG_USB_G_WEBCAM is not set\n# CONFIG_USB_RAW_GADGET is not set\n# end of USB Gadget precomposed configurations\n\n# CONFIG_TYPEC is not set\nCONFIG_USB_ROLE_SWITCH=y\nCONFIG_MMC=y\nCONFIG_PWRSEQ_EMMC=y\n# CONFIG_PWRSEQ_SD8787 is not set\nCONFIG_PWRSEQ_SIMPLE=y\nCONFIG_MMC_BLOCK=y\nCONFIG_MMC_BLOCK_MINORS=16\n# CONFIG_SDIO_UART is not set\n# CONFIG_MMC_TEST is not set\n\n#\n# MMC/SD/SDIO Host Controller Drivers\n#\n# CONFIG_MMC_DEBUG is not set\n# CONFIG_MMC_ARMMMCI is not set\nCONFIG_MMC_SDHCI=y\n# CONFIG_MMC_SDHCI_PLTFM is not set\nCONFIG_MMC_SDHCI_S3C=y\nCONFIG_MMC_SDHCI_S3C_DMA=y\n# CONFIG_MMC_SPI is not set\nCONFIG_MMC_DW=y\nCONFIG_MMC_DW_PLTFM=y\n# CONFIG_MMC_DW_BLUEFIELD is not set\nCONFIG_MMC_DW_EXYNOS=y\n# CONFIG_MMC_DW_HI3798CV200 is not set\n# CONFIG_MMC_DW_K3 is not set\n# CONFIG_MMC_VUB300 is not set\n# CONFIG_MMC_USHC is not set\n# CONFIG_MMC_USDHI6ROL0 is not set\n# CONFIG_MMC_CQHCI is not set\n# CONFIG_MMC_HSQ is not set\n# CONFIG_MMC_MTK is not set\n# CONFIG_SCSI_UFSHCD is not set\n# CONFIG_MEMSTICK is not set\nCONFIG_NEW_LEDS=y\nCONFIG_LEDS_CLASS=y\nCONFIG_LEDS_CLASS_FLASH=y\n# CONFIG_LEDS_CLASS_MULTICOLOR is not set\n# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set\n\n#\n# LED drivers\n#\n# CONFIG_LEDS_AN30259A is not set\n# CONFIG_LEDS_AW2013 is not set\n# CONFIG_LEDS_BCM6328 is not set\n# CONFIG_LEDS_BCM6358 is not set\n# CONFIG_LEDS_CR0014114 is not set\n# CONFIG_LEDS_EL15203000 is not set\n# CONFIG_LEDS_LM3530 is not set\n# CONFIG_LEDS_LM3532 is not set\n# CONFIG_LEDS_LM3642 is not set\n# CONFIG_LEDS_LM3692X is not set\n# CONFIG_LEDS_PCA9532 is not set\nCONFIG_LEDS_GPIO=y\n# CONFIG_LEDS_LP3944 is not set\n# CONFIG_LEDS_LP3952 is not set\n# CONFIG_LEDS_LP50XX is not set\n# CONFIG_LEDS_LP55XX_COMMON is not set\n# CONFIG_LEDS_LP8860 is not set\n# CONFIG_LEDS_PCA955X is not set\n# CONFIG_LEDS_PCA963X is not set\n# CONFIG_LEDS_DAC124S085 is not set\nCONFIG_LEDS_PWM=y\n# CONFIG_LEDS_REGULATOR is not set\n# CONFIG_LEDS_BD2802 is not set\n# CONFIG_LEDS_LT3593 is not set\n# CONFIG_LEDS_TCA6507 is not set\n# CONFIG_LEDS_TLC591XX is not set\nCONFIG_LEDS_MAX8997=y\n# CONFIG_LEDS_LM355x is not set\n# CONFIG_LEDS_IS31FL319X is not set\n# CONFIG_LEDS_IS31FL32XX is not set\n\n#\n# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)\n#\n# CONFIG_LEDS_BLINKM is not set\n# CONFIG_LEDS_SYSCON is not set\n# CONFIG_LEDS_MLXREG is not set\n# CONFIG_LEDS_USER is not set\n# CONFIG_LEDS_SPI_BYTE is not set\n# CONFIG_LEDS_TI_LMU_COMMON is not set\n\n#\n# Flash and Torch LED drivers\n#\nCONFIG_LEDS_AAT1290=y\n# CONFIG_LEDS_AS3645A is not set\n# CONFIG_LEDS_KTD2692 is not set\n# CONFIG_LEDS_LM3601X is not set\nCONFIG_LEDS_MAX77693=y\n# CONFIG_LEDS_RT4505 is not set\n# CONFIG_LEDS_RT8515 is not set\n# CONFIG_LEDS_SGM3140 is not set\n\n#\n# RGB LED drivers\n#\n\n#\n# LED Triggers\n#\nCONFIG_LEDS_TRIGGERS=y\n# CONFIG_LEDS_TRIGGER_TIMER is not set\n# CONFIG_LEDS_TRIGGER_ONESHOT is not set\nCONFIG_LEDS_TRIGGER_HEARTBEAT=y\n# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set\n# CONFIG_LEDS_TRIGGER_CPU is not set\n# CONFIG_LEDS_TRIGGER_ACTIVITY is not set\n# CONFIG_LEDS_TRIGGER_GPIO is not set\n# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set\n\n#\n# iptables trigger is under Netfilter config (LED target)\n#\n# CONFIG_LEDS_TRIGGER_TRANSIENT is not set\n# CONFIG_LEDS_TRIGGER_CAMERA is not set\n# CONFIG_LEDS_TRIGGER_PANIC is not set\n# CONFIG_LEDS_TRIGGER_NETDEV is not set\n# CONFIG_LEDS_TRIGGER_PATTERN is not set\n# CONFIG_LEDS_TRIGGER_AUDIO is not set\n# CONFIG_LEDS_TRIGGER_TTY is not set\n\n#\n# Simple LED drivers\n#\n# CONFIG_ACCESSIBILITY is not set\n# CONFIG_INFINIBAND is not set\nCONFIG_EDAC_ATOMIC_SCRUB=y\nCONFIG_EDAC_SUPPORT=y\nCONFIG_RTC_LIB=y\nCONFIG_RTC_CLASS=y\nCONFIG_RTC_HCTOSYS=y\nCONFIG_RTC_HCTOSYS_DEVICE=\"rtc0\"\nCONFIG_RTC_SYSTOHC=y\nCONFIG_RTC_SYSTOHC_DEVICE=\"rtc0\"\n# CONFIG_RTC_DEBUG is not set\nCONFIG_RTC_NVMEM=y\n\n#\n# RTC interfaces\n#\nCONFIG_RTC_INTF_SYSFS=y\nCONFIG_RTC_INTF_PROC=y\nCONFIG_RTC_INTF_DEV=y\n# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set\n# CONFIG_RTC_DRV_TEST is not set\n\n#\n# I2C RTC drivers\n#\n# CONFIG_RTC_DRV_ABB5ZES3 is not set\n# CONFIG_RTC_DRV_ABEOZ9 is not set\n# CONFIG_RTC_DRV_ABX80X is not set\n# CONFIG_RTC_DRV_DS1307 is not set\n# CONFIG_RTC_DRV_DS1374 is not set\n# CONFIG_RTC_DRV_DS1672 is not set\n# CONFIG_RTC_DRV_HYM8563 is not set\n# CONFIG_RTC_DRV_MAX6900 is not set\nCONFIG_RTC_DRV_MAX8998=y\nCONFIG_RTC_DRV_MAX8997=y\nCONFIG_RTC_DRV_MAX77686=y\n# CONFIG_RTC_DRV_NCT3018Y is not set\n# CONFIG_RTC_DRV_RS5C372 is not set\n# CONFIG_RTC_DRV_ISL1208 is not set\n# CONFIG_RTC_DRV_ISL12022 is not set\n# CONFIG_RTC_DRV_ISL12026 is not set\n# CONFIG_RTC_DRV_X1205 is not set\n# CONFIG_RTC_DRV_PCF8523 is not set\n# CONFIG_RTC_DRV_PCF85063 is not set\n# CONFIG_RTC_DRV_PCF85363 is not set\n# CONFIG_RTC_DRV_PCF8563 is not set\n# CONFIG_RTC_DRV_PCF8583 is not set\n# CONFIG_RTC_DRV_M41T80 is not set\n# CONFIG_RTC_DRV_BQ32K is not set\n# CONFIG_RTC_DRV_S35390A is not set\n# CONFIG_RTC_DRV_FM3130 is not set\n# CONFIG_RTC_DRV_RX8010 is not set\n# CONFIG_RTC_DRV_RX8581 is not set\n# CONFIG_RTC_DRV_RX8025 is not set\n# CONFIG_RTC_DRV_EM3027 is not set\n# CONFIG_RTC_DRV_RV3028 is not set\n# CONFIG_RTC_DRV_RV3032 is not set\n# CONFIG_RTC_DRV_RV8803 is not set\nCONFIG_RTC_DRV_S5M=y\n# CONFIG_RTC_DRV_SD3078 is not set\n\n#\n# SPI RTC drivers\n#\n# CONFIG_RTC_DRV_M41T93 is not set\n# CONFIG_RTC_DRV_M41T94 is not set\n# CONFIG_RTC_DRV_DS1302 is not set\n# CONFIG_RTC_DRV_DS1305 is not set\n# CONFIG_RTC_DRV_DS1343 is not set\n# CONFIG_RTC_DRV_DS1347 is not set\n# CONFIG_RTC_DRV_DS1390 is not set\n# CONFIG_RTC_DRV_MAX6916 is not set\n# CONFIG_RTC_DRV_R9701 is not set\n# CONFIG_RTC_DRV_RX4581 is not set\n# CONFIG_RTC_DRV_RS5C348 is not set\n# CONFIG_RTC_DRV_MAX6902 is not set\n# CONFIG_RTC_DRV_PCF2123 is not set\n# CONFIG_RTC_DRV_MCP795 is not set\nCONFIG_RTC_I2C_AND_SPI=y\n\n#\n# SPI and I2C RTC drivers\n#\n# CONFIG_RTC_DRV_DS3232 is not set\n# CONFIG_RTC_DRV_PCF2127 is not set\n# CONFIG_RTC_DRV_RV3029C2 is not set\n# CONFIG_RTC_DRV_RX6110 is not set\n\n#\n# Platform RTC drivers\n#\n# CONFIG_RTC_DRV_CMOS is not set\n# CONFIG_RTC_DRV_DS1286 is not set\n# CONFIG_RTC_DRV_DS1511 is not set\n# CONFIG_RTC_DRV_DS1553 is not set\n# CONFIG_RTC_DRV_DS1685_FAMILY is not set\n# CONFIG_RTC_DRV_DS1742 is not set\n# CONFIG_RTC_DRV_DS2404 is not set\n# CONFIG_RTC_DRV_STK17TA8 is not set\n# CONFIG_RTC_DRV_M48T86 is not set\n# CONFIG_RTC_DRV_M48T35 is not set\n# CONFIG_RTC_DRV_M48T59 is not set\n# CONFIG_RTC_DRV_MSM6242 is not set\n# CONFIG_RTC_DRV_BQ4802 is not set\n# CONFIG_RTC_DRV_RP5C01 is not set\n# CONFIG_RTC_DRV_V3020 is not set\n# CONFIG_RTC_DRV_ZYNQMP is not set\n\n#\n# on-CPU RTC drivers\n#\nCONFIG_RTC_DRV_S3C=y\n# CONFIG_RTC_DRV_PL030 is not set\n# CONFIG_RTC_DRV_PL031 is not set\n# CONFIG_RTC_DRV_CADENCE is not set\n# CONFIG_RTC_DRV_FTRTC010 is not set\n# CONFIG_RTC_DRV_R7301 is not set\n\n#\n# HID Sensor RTC drivers\n#\n# CONFIG_RTC_DRV_GOLDFISH is not set\nCONFIG_DMADEVICES=y\n# CONFIG_DMADEVICES_DEBUG is not set\n\n#\n# DMA Devices\n#\nCONFIG_DMA_ENGINE=y\nCONFIG_DMA_OF=y\n# CONFIG_ALTERA_MSGDMA is not set\n# CONFIG_AMBA_PL08X is not set\n# CONFIG_DW_AXI_DMAC is not set\n# CONFIG_FSL_EDMA is not set\n# CONFIG_FSL_QDMA is not set\n# CONFIG_INTEL_IDMA64 is not set\n# CONFIG_NBPFAXI_DMA is not set\nCONFIG_PL330_DMA=y\n# CONFIG_XILINX_ZYNQMP_DPDMA is not set\n# CONFIG_QCOM_HIDMA_MGMT is not set\n# CONFIG_QCOM_HIDMA is not set\n# CONFIG_DW_DMAC is not set\n# CONFIG_SF_PDMA is not set\n\n#\n# DMA Clients\n#\n# CONFIG_ASYNC_TX_DMA is not set\n# CONFIG_DMATEST is not set\n\n#\n# DMABUF options\n#\nCONFIG_SYNC_FILE=y\n# CONFIG_SW_SYNC is not set\nCONFIG_UDMABUF=y\n# CONFIG_DMABUF_MOVE_NOTIFY is not set\n# CONFIG_DMABUF_DEBUG is not set\n# CONFIG_DMABUF_SELFTESTS is not set\nCONFIG_DMABUF_HEAPS=y\n# CONFIG_DMABUF_SYSFS_STATS is not set\nCONFIG_DMABUF_HEAPS_SYSTEM=y\nCONFIG_DMABUF_HEAPS_CMA=y\n# end of DMABUF options\n\n# CONFIG_AUXDISPLAY is not set\n# CONFIG_UIO is not set\n# CONFIG_VFIO is not set\n# CONFIG_VIRT_DRIVERS is not set\n# CONFIG_VIRTIO_MENU is not set\n# CONFIG_VDPA is not set\n# CONFIG_VHOST_MENU is not set\n\n#\n# Microsoft Hyper-V guest support\n#\n# end of Microsoft Hyper-V guest support\n\n# CONFIG_GREYBUS is not set\n# CONFIG_COMEDI is not set\nCONFIG_STAGING=y\n# CONFIG_PRISM2_USB is not set\n# CONFIG_RTLLIB is not set\nCONFIG_RTL8723BS=m\nCONFIG_R8712U=m\nCONFIG_R8188EU=m\nCONFIG_VT6656=m\n\n#\n# IIO staging drivers\n#\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16203 is not set\n# CONFIG_ADIS16240 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7816 is not set\n# end of Analog to digital converters\n\n#\n# Analog digital bi-direction converters\n#\n# CONFIG_ADT7316 is not set\n# end of Analog digital bi-direction converters\n\n#\n# Direct Digital Synthesis\n#\n# CONFIG_AD9832 is not set\n# CONFIG_AD9834 is not set\n# end of Direct Digital Synthesis\n\n#\n# Network Analyzer, Impedance Converters\n#\n# CONFIG_AD5933 is not set\n# end of Network Analyzer, Impedance Converters\n\n#\n# Active energy metering IC\n#\n# CONFIG_ADE7854 is not set\n# end of Active energy metering IC\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S1210 is not set\n# end of Resolver to digital converters\n# end of IIO staging drivers\n\n# CONFIG_STAGING_MEDIA is not set\n# CONFIG_STAGING_BOARD is not set\n# CONFIG_LTE_GDM724X is not set\n# CONFIG_FB_TFT is not set\n# CONFIG_KS7010 is not set\n# CONFIG_PI433 is not set\n# CONFIG_XIL_AXIS_FIFO is not set\n# CONFIG_FIELDBUS_DEV is not set\n# CONFIG_GOLDFISH is not set\n# CONFIG_CHROME_PLATFORMS is not set\n# CONFIG_MELLANOX_PLATFORM is not set\nCONFIG_HAVE_CLK=y\nCONFIG_HAVE_CLK_PREPARE=y\nCONFIG_COMMON_CLK=y\n\n#\n# Clock driver for ARM Reference designs\n#\n# CONFIG_CLK_ICST is not set\n# CONFIG_CLK_SP810 is not set\n# end of Clock driver for ARM Reference designs\n\n# CONFIG_LMK04832 is not set\nCONFIG_COMMON_CLK_MAX77686=y\n# CONFIG_COMMON_CLK_MAX9485 is not set\n# CONFIG_COMMON_CLK_SI5341 is not set\n# CONFIG_COMMON_CLK_SI5351 is not set\n# CONFIG_COMMON_CLK_SI514 is not set\n# CONFIG_COMMON_CLK_SI544 is not set\n# CONFIG_COMMON_CLK_SI570 is not set\n# CONFIG_COMMON_CLK_CDCE706 is not set\n# CONFIG_COMMON_CLK_CDCE925 is not set\n# CONFIG_COMMON_CLK_CS2000_CP is not set\nCONFIG_COMMON_CLK_S2MPS11=y\n# CONFIG_COMMON_CLK_AXI_CLKGEN is not set\n# CONFIG_COMMON_CLK_PWM is not set\n# CONFIG_COMMON_CLK_RS9_PCIE is not set\n# CONFIG_COMMON_CLK_VC5 is not set\n# CONFIG_COMMON_CLK_VC7 is not set\n# CONFIG_COMMON_CLK_FIXED_MMIO is not set\nCONFIG_COMMON_CLK_SAMSUNG=y\nCONFIG_EXYNOS_5420_COMMON_CLK=y\nCONFIG_EXYNOS_AUDSS_CLK_CON=y\nCONFIG_EXYNOS_CLKOUT=m\n# CONFIG_XILINX_VCU is not set\n# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set\n# CONFIG_HWSPINLOCK is not set\n\n#\n# Clock Source drivers\n#\nCONFIG_TIMER_OF=y\nCONFIG_TIMER_PROBE=y\nCONFIG_ARM_ARCH_TIMER=y\nCONFIG_ARM_ARCH_TIMER_EVTSTREAM=y\nCONFIG_CLKSRC_EXYNOS_MCT=y\n# CONFIG_MICROCHIP_PIT64B is not set\n# end of Clock Source drivers\n\n# CONFIG_MAILBOX is not set\nCONFIG_IOMMU_API=y\nCONFIG_IOMMU_SUPPORT=y\n\n#\n# Generic IOMMU Pagetable Support\n#\nCONFIG_IOMMU_IO_PGTABLE=y\nCONFIG_IOMMU_IO_PGTABLE_LPAE=y\n# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set\n# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set\n# end of Generic IOMMU Pagetable Support\n\n# CONFIG_IOMMU_DEBUGFS is not set\nCONFIG_IOMMU_DEFAULT_DMA_STRICT=y\n# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set\n# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set\nCONFIG_OF_IOMMU=y\nCONFIG_EXYNOS_IOMMU=y\n# CONFIG_EXYNOS_IOMMU_DEBUG is not set\n# CONFIG_ARM_SMMU is not set\n\n#\n# Remoteproc drivers\n#\n# CONFIG_REMOTEPROC is not set\n# end of Remoteproc drivers\n\n#\n# Rpmsg drivers\n#\n# CONFIG_RPMSG_VIRTIO is not set\n# end of Rpmsg drivers\n\n# CONFIG_SOUNDWIRE is not set\n\n#\n# SOC (System On Chip) specific Drivers\n#\n\n#\n# Amlogic SoC drivers\n#\n# end of Amlogic SoC drivers\n\n#\n# Broadcom SoC drivers\n#\n# CONFIG_SOC_BRCMSTB is not set\n# end of Broadcom SoC drivers\n\n#\n# NXP/Freescale QorIQ SoC drivers\n#\n# CONFIG_QUICC_ENGINE is not set\n# CONFIG_FSL_RCPM is not set\n# end of NXP/Freescale QorIQ SoC drivers\n\n#\n# fujitsu SoC drivers\n#\n# end of fujitsu SoC drivers\n\n#\n# i.MX SoC drivers\n#\n# end of i.MX SoC drivers\n\n#\n# Enable LiteX SoC Builder specific drivers\n#\n# CONFIG_LITEX_SOC_CONTROLLER is not set\n# end of Enable LiteX SoC Builder specific drivers\n\n#\n# Qualcomm SoC drivers\n#\n# end of Qualcomm SoC drivers\n\nCONFIG_SOC_SAMSUNG=y\nCONFIG_EXYNOS_ASV_ARM=y\nCONFIG_EXYNOS_CHIPID=y\n# CONFIG_EXYNOS_USI is not set\nCONFIG_EXYNOS_PMU=y\nCONFIG_EXYNOS_PMU_ARM_DRIVERS=y\nCONFIG_EXYNOS_PM_DOMAINS=y\n# CONFIG_SOC_TI is not set\n\n#\n# Xilinx SoC drivers\n#\n# end of Xilinx SoC drivers\n# end of SOC (System On Chip) specific Drivers\n\nCONFIG_PM_DEVFREQ=y\n\n#\n# DEVFREQ Governors\n#\nCONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y\nCONFIG_DEVFREQ_GOV_PERFORMANCE=y\nCONFIG_DEVFREQ_GOV_POWERSAVE=y\nCONFIG_DEVFREQ_GOV_USERSPACE=y\nCONFIG_DEVFREQ_GOV_PASSIVE=y\n\n#\n# DEVFREQ Drivers\n#\nCONFIG_ARM_EXYNOS_BUS_DEVFREQ=y\nCONFIG_PM_DEVFREQ_EVENT=y\nCONFIG_DEVFREQ_EVENT_EXYNOS_NOCP=y\nCONFIG_DEVFREQ_EVENT_EXYNOS_PPMU=y\nCONFIG_EXTCON=y\n\n#\n# Extcon Device Drivers\n#\n# CONFIG_EXTCON_ADC_JACK is not set\n# CONFIG_EXTCON_FSA9480 is not set\n# CONFIG_EXTCON_GPIO is not set\nCONFIG_EXTCON_MAX14577=y\n# CONFIG_EXTCON_MAX3355 is not set\nCONFIG_EXTCON_MAX77693=y\nCONFIG_EXTCON_MAX8997=y\n# CONFIG_EXTCON_PTN5150 is not set\n# CONFIG_EXTCON_RT8973A is not set\n# CONFIG_EXTCON_SM5502 is not set\n# CONFIG_EXTCON_USB_GPIO is not set\nCONFIG_MEMORY=y\nCONFIG_DDR=y\n# CONFIG_ARM_PL172_MPMC is not set\nCONFIG_PL353_SMC=y\nCONFIG_SAMSUNG_MC=y\nCONFIG_EXYNOS5422_DMC=y\nCONFIG_EXYNOS_SROM=y\nCONFIG_IIO=y\nCONFIG_IIO_BUFFER=y\n# CONFIG_IIO_BUFFER_CB is not set\n# CONFIG_IIO_BUFFER_DMA is not set\n# CONFIG_IIO_BUFFER_DMAENGINE is not set\n# CONFIG_IIO_BUFFER_HW_CONSUMER is not set\nCONFIG_IIO_KFIFO_BUF=y\nCONFIG_IIO_TRIGGERED_BUFFER=y\n# CONFIG_IIO_CONFIGFS is not set\nCONFIG_IIO_TRIGGER=y\nCONFIG_IIO_CONSUMERS_PER_TRIGGER=2\n# CONFIG_IIO_SW_DEVICE is not set\n# CONFIG_IIO_SW_TRIGGER is not set\n# CONFIG_IIO_TRIGGERED_EVENT is not set\n\n#\n# Accelerometers\n#\n# CONFIG_ADIS16201 is not set\n# CONFIG_ADIS16209 is not set\n# CONFIG_ADXL313_I2C is not set\n# CONFIG_ADXL313_SPI is not set\n# CONFIG_ADXL345_I2C is not set\n# CONFIG_ADXL345_SPI is not set\n# CONFIG_ADXL355_I2C is not set\n# CONFIG_ADXL355_SPI is not set\n# CONFIG_ADXL367_SPI is not set\n# CONFIG_ADXL367_I2C is not set\n# CONFIG_ADXL372_SPI is not set\n# CONFIG_ADXL372_I2C is not set\n# CONFIG_BMA180 is not set\n# CONFIG_BMA220 is not set\n# CONFIG_BMA400 is not set\n# CONFIG_BMC150_ACCEL is not set\n# CONFIG_BMI088_ACCEL is not set\n# CONFIG_DA280 is not set\n# CONFIG_DA311 is not set\n# CONFIG_DMARD06 is not set\n# CONFIG_DMARD09 is not set\n# CONFIG_DMARD10 is not set\n# CONFIG_FXLS8962AF_I2C is not set\n# CONFIG_FXLS8962AF_SPI is not set\n# CONFIG_IIO_ST_ACCEL_3AXIS is not set\n# CONFIG_KXSD9 is not set\n# CONFIG_KXCJK1013 is not set\n# CONFIG_MC3230 is not set\n# CONFIG_MMA7455_I2C is not set\n# CONFIG_MMA7455_SPI is not set\n# CONFIG_MMA7660 is not set\n# CONFIG_MMA8452 is not set\n# CONFIG_MMA9551 is not set\n# CONFIG_MMA9553 is not set\n# CONFIG_MSA311 is not set\n# CONFIG_MXC4005 is not set\n# CONFIG_MXC6255 is not set\n# CONFIG_SCA3000 is not set\n# CONFIG_SCA3300 is not set\n# CONFIG_STK8312 is not set\n# CONFIG_STK8BA50 is not set\n# end of Accelerometers\n\n#\n# Analog to digital converters\n#\n# CONFIG_AD7091R5 is not set\n# CONFIG_AD7124 is not set\n# CONFIG_AD7192 is not set\n# CONFIG_AD7266 is not set\n# CONFIG_AD7280 is not set\n# CONFIG_AD7291 is not set\n# CONFIG_AD7292 is not set\n# CONFIG_AD7298 is not set\n# CONFIG_AD7476 is not set\n# CONFIG_AD7606_IFACE_PARALLEL is not set\n# CONFIG_AD7606_IFACE_SPI is not set\n# CONFIG_AD7766 is not set\n# CONFIG_AD7768_1 is not set\n# CONFIG_AD7780 is not set\n# CONFIG_AD7791 is not set\n# CONFIG_AD7793 is not set\n# CONFIG_AD7887 is not set\n# CONFIG_AD7923 is not set\n# CONFIG_AD7949 is not set\n# CONFIG_AD799X is not set\n# CONFIG_ADI_AXI_ADC is not set\n# CONFIG_CC10001_ADC is not set\n# CONFIG_ENVELOPE_DETECTOR is not set\nCONFIG_EXYNOS_ADC=y\n# CONFIG_HI8435 is not set\n# CONFIG_HX711 is not set\n# CONFIG_LTC2471 is not set\n# CONFIG_LTC2485 is not set\n# CONFIG_LTC2496 is not set\n# CONFIG_LTC2497 is not set\n# CONFIG_MAX1027 is not set\n# CONFIG_MAX11100 is not set\n# CONFIG_MAX1118 is not set\n# CONFIG_MAX11205 is not set\n# CONFIG_MAX1241 is not set\n# CONFIG_MAX1363 is not set\n# CONFIG_MAX9611 is not set\n# CONFIG_MCP320X is not set\n# CONFIG_MCP3422 is not set\n# CONFIG_MCP3911 is not set\n# CONFIG_NAU7802 is not set\n# CONFIG_RICHTEK_RTQ6056 is not set\n# CONFIG_SD_ADC_MODULATOR is not set\n# CONFIG_TI_ADC081C is not set\n# CONFIG_TI_ADC0832 is not set\n# CONFIG_TI_ADC084S021 is not set\n# CONFIG_TI_ADC12138 is not set\n# CONFIG_TI_ADC108S102 is not set\n# CONFIG_TI_ADC128S052 is not set\n# CONFIG_TI_ADC161S626 is not set\n# CONFIG_TI_ADS1015 is not set\n# CONFIG_TI_ADS7950 is not set\n# CONFIG_TI_ADS8344 is not set\n# CONFIG_TI_ADS8688 is not set\n# CONFIG_TI_ADS124S08 is not set\n# CONFIG_TI_ADS131E08 is not set\n# CONFIG_TI_TLC4541 is not set\n# CONFIG_TI_TSC2046 is not set\n# CONFIG_VF610_ADC is not set\n# CONFIG_XILINX_XADC is not set\n# end of Analog to digital converters\n\n#\n# Analog to digital and digital to analog converters\n#\n# CONFIG_AD74413R is not set\n# end of Analog to digital and digital to analog converters\n\n#\n# Analog Front Ends\n#\n# CONFIG_IIO_RESCALE is not set\n# end of Analog Front Ends\n\n#\n# Amplifiers\n#\n# CONFIG_AD8366 is not set\n# CONFIG_ADA4250 is not set\n# CONFIG_HMC425 is not set\n# end of Amplifiers\n\n#\n# Capacitance to digital converters\n#\n# CONFIG_AD7150 is not set\n# CONFIG_AD7746 is not set\n# end of Capacitance to digital converters\n\n#\n# Chemical Sensors\n#\n# CONFIG_ATLAS_PH_SENSOR is not set\n# CONFIG_ATLAS_EZO_SENSOR is not set\n# CONFIG_BME680 is not set\n# CONFIG_CCS811 is not set\n# CONFIG_IAQCORE is not set\n# CONFIG_SCD30_CORE is not set\n# CONFIG_SCD4X is not set\n# CONFIG_SENSIRION_SGP30 is not set\n# CONFIG_SENSIRION_SGP40 is not set\n# CONFIG_SPS30_I2C is not set\n# CONFIG_SENSEAIR_SUNRISE_CO2 is not set\n# CONFIG_VZ89X is not set\n# end of Chemical Sensors\n\n#\n# Hid Sensor IIO Common\n#\n# end of Hid Sensor IIO Common\n\n#\n# IIO SCMI Sensors\n#\n# end of IIO SCMI Sensors\n\n#\n# SSP Sensor Common\n#\n# CONFIG_IIO_SSP_SENSORHUB is not set\n# end of SSP Sensor Common\n\n#\n# Digital to analog converters\n#\n# CONFIG_AD3552R is not set\n# CONFIG_AD5064 is not set\n# CONFIG_AD5360 is not set\n# CONFIG_AD5380 is not set\n# CONFIG_AD5421 is not set\n# CONFIG_AD5446 is not set\n# CONFIG_AD5449 is not set\n# CONFIG_AD5592R is not set\n# CONFIG_AD5593R is not set\n# CONFIG_AD5504 is not set\n# CONFIG_AD5624R_SPI is not set\n# CONFIG_LTC2688 is not set\n# CONFIG_AD5686_SPI is not set\n# CONFIG_AD5696_I2C is not set\n# CONFIG_AD5755 is not set\n# CONFIG_AD5758 is not set\n# CONFIG_AD5761 is not set\n# CONFIG_AD5764 is not set\n# CONFIG_AD5766 is not set\n# CONFIG_AD5770R is not set\n# CONFIG_AD5791 is not set\n# CONFIG_AD7293 is not set\n# CONFIG_AD7303 is not set\n# CONFIG_AD8801 is not set\n# CONFIG_DPOT_DAC is not set\n# CONFIG_DS4424 is not set\n# CONFIG_LTC1660 is not set\n# CONFIG_LTC2632 is not set\n# CONFIG_M62332 is not set\n# CONFIG_MAX517 is not set\n# CONFIG_MAX5821 is not set\n# CONFIG_MCP4725 is not set\n# CONFIG_MCP4922 is not set\n# CONFIG_TI_DAC082S085 is not set\n# CONFIG_TI_DAC5571 is not set\n# CONFIG_TI_DAC7311 is not set\n# CONFIG_TI_DAC7612 is not set\n# CONFIG_VF610_DAC is not set\n# end of Digital to analog converters\n\n#\n# IIO dummy driver\n#\n# end of IIO dummy driver\n\n#\n# Filters\n#\n# end of Filters\n\n#\n# Frequency Synthesizers DDS/PLL\n#\n\n#\n# Clock Generator/Distribution\n#\n# CONFIG_AD9523 is not set\n# end of Clock Generator/Distribution\n\n#\n# Phase-Locked Loop (PLL) frequency synthesizers\n#\n# CONFIG_ADF4350 is not set\n# CONFIG_ADF4371 is not set\n# CONFIG_ADMV1013 is not set\n# CONFIG_ADMV4420 is not set\n# CONFIG_ADRF6780 is not set\n# end of Phase-Locked Loop (PLL) frequency synthesizers\n# end of Frequency Synthesizers DDS/PLL\n\n#\n# Digital gyroscope sensors\n#\n# CONFIG_ADIS16080 is not set\n# CONFIG_ADIS16130 is not set\n# CONFIG_ADIS16136 is not set\n# CONFIG_ADIS16260 is not set\n# CONFIG_ADXRS290 is not set\n# CONFIG_ADXRS450 is not set\n# CONFIG_BMG160 is not set\n# CONFIG_FXAS21002C is not set\n# CONFIG_MPU3050_I2C is not set\n# CONFIG_IIO_ST_GYRO_3AXIS is not set\n# CONFIG_ITG3200 is not set\n# end of Digital gyroscope sensors\n\n#\n# Health Sensors\n#\n\n#\n# Heart Rate Monitors\n#\n# CONFIG_AFE4403 is not set\n# CONFIG_AFE4404 is not set\n# CONFIG_MAX30100 is not set\n# CONFIG_MAX30102 is not set\n# end of Heart Rate Monitors\n# end of Health Sensors\n\n#\n# Humidity sensors\n#\n# CONFIG_AM2315 is not set\n# CONFIG_DHT11 is not set\n# CONFIG_HDC100X is not set\n# CONFIG_HDC2010 is not set\n# CONFIG_HTS221 is not set\n# CONFIG_HTU21 is not set\n# CONFIG_SI7005 is not set\n# CONFIG_SI7020 is not set\n# end of Humidity sensors\n\n#\n# Inertial measurement units\n#\n# CONFIG_ADIS16400 is not set\n# CONFIG_ADIS16460 is not set\n# CONFIG_ADIS16475 is not set\n# CONFIG_ADIS16480 is not set\n# CONFIG_BMI160_I2C is not set\n# CONFIG_BMI160_SPI is not set\n# CONFIG_BOSCH_BNO055_I2C is not set\n# CONFIG_FXOS8700_I2C is not set\n# CONFIG_FXOS8700_SPI is not set\n# CONFIG_KMX61 is not set\n# CONFIG_INV_ICM42600_I2C is not set\n# CONFIG_INV_ICM42600_SPI is not set\n# CONFIG_INV_MPU6050_I2C is not set\n# CONFIG_INV_MPU6050_SPI is not set\n# CONFIG_IIO_ST_LSM6DSX is not set\n# CONFIG_IIO_ST_LSM9DS0 is not set\n# end of Inertial measurement units\n\n#\n# Light sensors\n#\n# CONFIG_ADJD_S311 is not set\n# CONFIG_ADUX1020 is not set\n# CONFIG_AL3010 is not set\n# CONFIG_AL3320A is not set\n# CONFIG_APDS9300 is not set\n# CONFIG_APDS9960 is not set\n# CONFIG_AS73211 is not set\n# CONFIG_BH1750 is not set\n# CONFIG_BH1780 is not set\n# CONFIG_CM32181 is not set\n# CONFIG_CM3232 is not set\n# CONFIG_CM3323 is not set\n# CONFIG_CM3605 is not set\nCONFIG_CM36651=y\n# CONFIG_GP2AP002 is not set\n# CONFIG_GP2AP020A00F is not set\n# CONFIG_SENSORS_ISL29018 is not set\n# CONFIG_SENSORS_ISL29028 is not set\n# CONFIG_ISL29125 is not set\n# CONFIG_JSA1212 is not set\n# CONFIG_RPR0521 is not set\n# CONFIG_LTR501 is not set\n# CONFIG_LTRF216A is not set\n# CONFIG_LV0104CS is not set\n# CONFIG_MAX44000 is not set\n# CONFIG_MAX44009 is not set\n# CONFIG_NOA1305 is not set\n# CONFIG_OPT3001 is not set\n# CONFIG_PA12203001 is not set\n# CONFIG_SI1133 is not set\n# CONFIG_SI1145 is not set\n# CONFIG_STK3310 is not set\n# CONFIG_ST_UVIS25 is not set\n# CONFIG_TCS3414 is not set\n# CONFIG_TCS3472 is not set\n# CONFIG_SENSORS_TSL2563 is not set\n# CONFIG_TSL2583 is not set\n# CONFIG_TSL2591 is not set\n# CONFIG_TSL2772 is not set\n# CONFIG_TSL4531 is not set\n# CONFIG_US5182D is not set\n# CONFIG_VCNL4000 is not set\n# CONFIG_VCNL4035 is not set\n# CONFIG_VEML6030 is not set\n# CONFIG_VEML6070 is not set\n# CONFIG_VL6180 is not set\n# CONFIG_ZOPT2201 is not set\n# end of Light sensors\n\n#\n# Magnetometer sensors\n#\n# CONFIG_AK8974 is not set\nCONFIG_AK8975=y\n# CONFIG_AK09911 is not set\n# CONFIG_BMC150_MAGN_I2C is not set\n# CONFIG_BMC150_MAGN_SPI is not set\n# CONFIG_MAG3110 is not set\n# CONFIG_MMC35240 is not set\n# CONFIG_IIO_ST_MAGN_3AXIS is not set\n# CONFIG_SENSORS_HMC5843_I2C is not set\n# CONFIG_SENSORS_HMC5843_SPI is not set\n# CONFIG_SENSORS_RM3100_I2C is not set\n# CONFIG_SENSORS_RM3100_SPI is not set\n# CONFIG_YAMAHA_YAS530 is not set\n# end of Magnetometer sensors\n\n#\n# Multiplexers\n#\n# CONFIG_IIO_MUX is not set\n# end of Multiplexers\n\n#\n# Inclinometer sensors\n#\n# end of Inclinometer sensors\n\n#\n# Triggers - standalone\n#\n# CONFIG_IIO_INTERRUPT_TRIGGER is not set\n# CONFIG_IIO_SYSFS_TRIGGER is not set\n# end of Triggers - standalone\n\n#\n# Linear and angular position sensors\n#\n# end of Linear and angular position sensors\n\n#\n# Digital potentiometers\n#\n# CONFIG_AD5110 is not set\n# CONFIG_AD5272 is not set\n# CONFIG_DS1803 is not set\n# CONFIG_MAX5432 is not set\n# CONFIG_MAX5481 is not set\n# CONFIG_MAX5487 is not set\n# CONFIG_MCP4018 is not set\n# CONFIG_MCP4131 is not set\n# CONFIG_MCP4531 is not set\n# CONFIG_MCP41010 is not set\n# CONFIG_TPL0102 is not set\n# end of Digital potentiometers\n\n#\n# Digital potentiostats\n#\n# CONFIG_LMP91000 is not set\n# end of Digital potentiostats\n\n#\n# Pressure sensors\n#\n# CONFIG_ABP060MG is not set\n# CONFIG_BMP280 is not set\n# CONFIG_DLHL60D is not set\n# CONFIG_DPS310 is not set\n# CONFIG_HP03 is not set\n# CONFIG_ICP10100 is not set\n# CONFIG_MPL115_I2C is not set\n# CONFIG_MPL115_SPI is not set\n# CONFIG_MPL3115 is not set\n# CONFIG_MS5611 is not set\n# CONFIG_MS5637 is not set\n# CONFIG_IIO_ST_PRESS is not set\n# CONFIG_T5403 is not set\n# CONFIG_HP206C is not set\n# CONFIG_ZPA2326 is not set\n# end of Pressure sensors\n\n#\n# Lightning sensors\n#\n# CONFIG_AS3935 is not set\n# end of Lightning sensors\n\n#\n# Proximity and distance sensors\n#\n# CONFIG_ISL29501 is not set\n# CONFIG_LIDAR_LITE_V2 is not set\n# CONFIG_MB1232 is not set\n# CONFIG_PING is not set\n# CONFIG_RFD77402 is not set\n# CONFIG_SRF04 is not set\n# CONFIG_SX9310 is not set\n# CONFIG_SX9324 is not set\n# CONFIG_SX9360 is not set\n# CONFIG_SX9500 is not set\n# CONFIG_SRF08 is not set\n# CONFIG_VCNL3020 is not set\n# CONFIG_VL53L0X_I2C is not set\n# end of Proximity and distance sensors\n\n#\n# Resolver to digital converters\n#\n# CONFIG_AD2S90 is not set\n# CONFIG_AD2S1200 is not set\n# end of Resolver to digital converters\n\n#\n# Temperature sensors\n#\n# CONFIG_LTC2983 is not set\n# CONFIG_MAXIM_THERMOCOUPLE is not set\n# CONFIG_MLX90614 is not set\n# CONFIG_MLX90632 is not set\n# CONFIG_TMP006 is not set\n# CONFIG_TMP007 is not set\n# CONFIG_TMP117 is not set\n# CONFIG_TSYS01 is not set\n# CONFIG_TSYS02D is not set\n# CONFIG_MAX31856 is not set\n# CONFIG_MAX31865 is not set\n# end of Temperature sensors\n\nCONFIG_PWM=y\nCONFIG_PWM_SYSFS=y\n# CONFIG_PWM_DEBUG is not set\n# CONFIG_PWM_ATMEL_TCB is not set\n# CONFIG_PWM_CLK is not set\n# CONFIG_PWM_FSL_FTM is not set\n# CONFIG_PWM_PCA9685 is not set\nCONFIG_PWM_SAMSUNG=y\n# CONFIG_PWM_XILINX is not set\n\n#\n# IRQ chip support\n#\nCONFIG_IRQCHIP=y\nCONFIG_ARM_GIC=y\nCONFIG_ARM_GIC_MAX_NR=1\n# CONFIG_AL_FIC is not set\n# CONFIG_XILINX_INTC is not set\nCONFIG_EXYNOS_IRQ_COMBINER=y\n# end of IRQ chip support\n\n# CONFIG_IPACK_BUS is not set\n# CONFIG_RESET_CONTROLLER is not set\n\n#\n# PHY Subsystem\n#\nCONFIG_GENERIC_PHY=y\n# CONFIG_PHY_CAN_TRANSCEIVER is not set\n\n#\n# PHY drivers for Broadcom platforms\n#\n# CONFIG_BCM_KONA_USB2_PHY is not set\n# end of PHY drivers for Broadcom platforms\n\n# CONFIG_PHY_CADENCE_TORRENT is not set\n# CONFIG_PHY_CADENCE_DPHY is not set\n# CONFIG_PHY_CADENCE_DPHY_RX is not set\n# CONFIG_PHY_CADENCE_SALVO is not set\n# CONFIG_PHY_PXA_28NM_HSIC is not set\n# CONFIG_PHY_PXA_28NM_USB2 is not set\n# CONFIG_PHY_LAN966X_SERDES is not set\n# CONFIG_PHY_CPCAP_USB is not set\n# CONFIG_PHY_MAPPHONE_MDM6600 is not set\n# CONFIG_PHY_OCELOT_SERDES is not set\nCONFIG_PHY_EXYNOS_DP_VIDEO=y\nCONFIG_PHY_EXYNOS_MIPI_VIDEO=y\n# CONFIG_PHY_EXYNOS_PCIE is not set\n# CONFIG_PHY_SAMSUNG_UFS is not set\nCONFIG_PHY_SAMSUNG_USB2=y\nCONFIG_PHY_EXYNOS5250_USB2=y\nCONFIG_PHY_EXYNOS5_USBDRD=y\n# end of PHY Subsystem\n\n# CONFIG_POWERCAP is not set\n# CONFIG_MCB is not set\n\n#\n# Performance monitor support\n#\n# CONFIG_ARM_CCI_PMU is not set\n# CONFIG_ARM_CCN is not set\nCONFIG_ARM_PMU=y\n# end of Performance monitor support\n\n# CONFIG_RAS is not set\n\n#\n# Android\n#\n# CONFIG_ANDROID_BINDER_IPC is not set\n# end of Android\n\n# CONFIG_DAX is not set\nCONFIG_NVMEM=y\nCONFIG_NVMEM_SYSFS=y\n# CONFIG_NVMEM_RMEM is not set\n\n#\n# HW tracing support\n#\n# CONFIG_STM is not set\n# CONFIG_INTEL_TH is not set\n# end of HW tracing support\n\n# CONFIG_FPGA is not set\n# CONFIG_FSI is not set\n# CONFIG_TEE is not set\nCONFIG_PM_OPP=y\n# CONFIG_SIOX is not set\n# CONFIG_SLIMBUS is not set\n# CONFIG_INTERCONNECT is not set\n# CONFIG_COUNTER is not set\n# CONFIG_MOST is not set\n# CONFIG_PECI is not set\n# CONFIG_HTE is not set\n# end of Device Drivers\n\n#\n# File systems\n#\nCONFIG_DCACHE_WORD_ACCESS=y\nCONFIG_VALIDATE_FS_PARSER=y\nCONFIG_FS_IOMAP=y\n# CONFIG_EXT2_FS is not set\n# CONFIG_EXT3_FS is not set\nCONFIG_EXT4_FS=y\nCONFIG_EXT4_USE_FOR_EXT2=y\nCONFIG_EXT4_FS_POSIX_ACL=y\nCONFIG_EXT4_FS_SECURITY=y\n# CONFIG_EXT4_DEBUG is not set\nCONFIG_JBD2=y\n# CONFIG_JBD2_DEBUG is not set\nCONFIG_FS_MBCACHE=y\nCONFIG_REISERFS_FS=m\n# CONFIG_REISERFS_CHECK is not set\n# CONFIG_REISERFS_PROC_INFO is not set\n# CONFIG_REISERFS_FS_XATTR is not set\nCONFIG_JFS_FS=m\n# CONFIG_JFS_POSIX_ACL is not set\n# CONFIG_JFS_SECURITY is not set\n# CONFIG_JFS_DEBUG is not set\n# CONFIG_JFS_STATISTICS is not set\nCONFIG_XFS_FS=m\nCONFIG_XFS_SUPPORT_V4=y\n# CONFIG_XFS_QUOTA is not set\n# CONFIG_XFS_POSIX_ACL is not set\n# CONFIG_XFS_RT is not set\n# CONFIG_XFS_ONLINE_SCRUB is not set\n# CONFIG_XFS_WARN is not set\n# CONFIG_XFS_DEBUG is not set\n# CONFIG_GFS2_FS is not set\n# CONFIG_OCFS2_FS is not set\nCONFIG_BTRFS_FS=m\nCONFIG_BTRFS_FS_POSIX_ACL=y\n# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set\n# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set\n# CONFIG_BTRFS_DEBUG is not set\n# CONFIG_BTRFS_ASSERT is not set\n# CONFIG_BTRFS_FS_REF_VERIFY is not set\n# CONFIG_NILFS2_FS is not set\nCONFIG_F2FS_FS=y\nCONFIG_F2FS_STAT_FS=y\n# CONFIG_F2FS_FS_XATTR is not set\nCONFIG_F2FS_CHECK_FS=y\n# CONFIG_F2FS_FAULT_INJECTION is not set\n# CONFIG_F2FS_FS_COMPRESSION is not set\nCONFIG_F2FS_IOSTAT=y\n# CONFIG_F2FS_UNFAIR_RWSEM is not set\nCONFIG_FS_POSIX_ACL=y\nCONFIG_EXPORTFS=y\n# CONFIG_EXPORTFS_BLOCK_OPS is not set\nCONFIG_FILE_LOCKING=y\n# CONFIG_FS_ENCRYPTION is not set\n# CONFIG_FS_VERITY is not set\nCONFIG_FSNOTIFY=y\nCONFIG_DNOTIFY=y\nCONFIG_INOTIFY_USER=y\nCONFIG_FANOTIFY=y\n# CONFIG_QUOTA is not set\nCONFIG_AUTOFS4_FS=y\nCONFIG_AUTOFS_FS=y\nCONFIG_FUSE_FS=m\n# CONFIG_CUSE is not set\n# CONFIG_VIRTIO_FS is not set\nCONFIG_OVERLAY_FS=m\n# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set\nCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y\n# CONFIG_OVERLAY_FS_INDEX is not set\n# CONFIG_OVERLAY_FS_METACOPY is not set\n\n#\n# Caches\n#\nCONFIG_NETFS_SUPPORT=y\n# CONFIG_NETFS_STATS is not set\nCONFIG_FSCACHE=y\n# CONFIG_FSCACHE_STATS is not set\n# CONFIG_FSCACHE_DEBUG is not set\n# CONFIG_CACHEFILES is not set\n# end of Caches\n\n#\n# CD-ROM/DVD Filesystems\n#\nCONFIG_ISO9660_FS=y\nCONFIG_JOLIET=y\nCONFIG_ZISOFS=y\nCONFIG_UDF_FS=y\n# end of CD-ROM/DVD Filesystems\n\n#\n# DOS/FAT/EXFAT/NT Filesystems\n#\nCONFIG_FAT_FS=y\n# CONFIG_MSDOS_FS is not set\nCONFIG_VFAT_FS=y\nCONFIG_FAT_DEFAULT_CODEPAGE=437\nCONFIG_FAT_DEFAULT_IOCHARSET=\"iso8859-1\"\n# CONFIG_FAT_DEFAULT_UTF8 is not set\nCONFIG_EXFAT_FS=m\nCONFIG_EXFAT_DEFAULT_IOCHARSET=\"utf8\"\n# CONFIG_NTFS_FS is not set\nCONFIG_NTFS3_FS=m\n# CONFIG_NTFS3_LZX_XPRESS is not set\n# CONFIG_NTFS3_FS_POSIX_ACL is not set\n# end of DOS/FAT/EXFAT/NT Filesystems\n\n#\n# Pseudo filesystems\n#\nCONFIG_PROC_FS=y\nCONFIG_PROC_SYSCTL=y\nCONFIG_PROC_PAGE_MONITOR=y\n# CONFIG_PROC_CHILDREN is not set\nCONFIG_KERNFS=y\nCONFIG_SYSFS=y\nCONFIG_TMPFS=y\nCONFIG_TMPFS_POSIX_ACL=y\nCONFIG_TMPFS_XATTR=y\nCONFIG_MEMFD_CREATE=y\nCONFIG_CONFIGFS_FS=y\n# end of Pseudo filesystems\n\nCONFIG_MISC_FILESYSTEMS=y\n# CONFIG_ORANGEFS_FS is not set\n# CONFIG_ADFS_FS is not set\n# CONFIG_AFFS_FS is not set\n# CONFIG_ECRYPT_FS is not set\nCONFIG_HFS_FS=y\nCONFIG_HFSPLUS_FS=y\n# CONFIG_BEFS_FS is not set\n# CONFIG_BFS_FS is not set\n# CONFIG_EFS_FS is not set\n# CONFIG_CRAMFS is not set\nCONFIG_SQUASHFS=y\n# CONFIG_SQUASHFS_FILE_CACHE is not set\nCONFIG_SQUASHFS_FILE_DIRECT=y\n# CONFIG_SQUASHFS_DECOMP_SINGLE is not set\n# CONFIG_SQUASHFS_DECOMP_MULTI is not set\nCONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y\n# CONFIG_SQUASHFS_XATTR is not set\nCONFIG_SQUASHFS_ZLIB=y\nCONFIG_SQUASHFS_LZ4=y\nCONFIG_SQUASHFS_LZO=y\nCONFIG_SQUASHFS_XZ=y\nCONFIG_SQUASHFS_ZSTD=y\n# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set\n# CONFIG_SQUASHFS_EMBEDDED is not set\nCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3\n# CONFIG_VXFS_FS is not set\n# CONFIG_MINIX_FS is not set\n# CONFIG_OMFS_FS is not set\n# CONFIG_HPFS_FS is not set\n# CONFIG_QNX4FS_FS is not set\n# CONFIG_QNX6FS_FS is not set\n# CONFIG_ROMFS_FS is not set\n# CONFIG_PSTORE is not set\n# CONFIG_SYSV_FS is not set\n# CONFIG_UFS_FS is not set\n# CONFIG_EROFS_FS is not set\nCONFIG_NETWORK_FILESYSTEMS=y\nCONFIG_NFS_FS=y\nCONFIG_NFS_V2=y\nCONFIG_NFS_V3=y\n# CONFIG_NFS_V3_ACL is not set\nCONFIG_NFS_V4=y\nCONFIG_NFS_SWAP=y\nCONFIG_NFS_V4_1=y\nCONFIG_NFS_V4_2=y\nCONFIG_PNFS_FILE_LAYOUT=y\nCONFIG_PNFS_BLOCK=m\nCONFIG_PNFS_FLEXFILE_LAYOUT=y\nCONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN=\"kernel.org\"\nCONFIG_NFS_V4_1_MIGRATION=y\nCONFIG_ROOT_NFS=y\nCONFIG_NFS_FSCACHE=y\n# CONFIG_NFS_USE_LEGACY_DNS is not set\nCONFIG_NFS_USE_KERNEL_DNS=y\nCONFIG_NFS_DISABLE_UDP_SUPPORT=y\n# CONFIG_NFS_V4_2_READ_PLUS is not set\n# CONFIG_NFSD is not set\nCONFIG_GRACE_PERIOD=y\nCONFIG_LOCKD=y\nCONFIG_LOCKD_V4=y\nCONFIG_NFS_COMMON=y\nCONFIG_NFS_V4_2_SSC_HELPER=y\nCONFIG_SUNRPC=y\nCONFIG_SUNRPC_GSS=y\nCONFIG_SUNRPC_BACKCHANNEL=y\nCONFIG_SUNRPC_SWAP=y\n# CONFIG_SUNRPC_DEBUG is not set\n# CONFIG_CEPH_FS is not set\nCONFIG_CIFS=y\nCONFIG_CIFS_STATS2=y\nCONFIG_CIFS_ALLOW_INSECURE_LEGACY=y\n# CONFIG_CIFS_UPCALL is not set\n# CONFIG_CIFS_XATTR is not set\nCONFIG_CIFS_DEBUG=y\n# CONFIG_CIFS_DEBUG2 is not set\n# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set\n# CONFIG_CIFS_DFS_UPCALL is not set\n# CONFIG_CIFS_SWN_UPCALL is not set\nCONFIG_CIFS_FSCACHE=y\n# CONFIG_CIFS_ROOT is not set\n# CONFIG_SMB_SERVER is not set\nCONFIG_SMBFS_COMMON=y\n# CONFIG_CODA_FS is not set\n# CONFIG_AFS_FS is not set\nCONFIG_NLS=y\nCONFIG_NLS_DEFAULT=\"utf8\"\nCONFIG_NLS_CODEPAGE_437=y\n# CONFIG_NLS_CODEPAGE_737 is not set\n# CONFIG_NLS_CODEPAGE_775 is not set\n# CONFIG_NLS_CODEPAGE_850 is not set\n# CONFIG_NLS_CODEPAGE_852 is not set\n# CONFIG_NLS_CODEPAGE_855 is not set\n# CONFIG_NLS_CODEPAGE_857 is not set\n# CONFIG_NLS_CODEPAGE_860 is not set\n# CONFIG_NLS_CODEPAGE_861 is not set\n# CONFIG_NLS_CODEPAGE_862 is not set\n# CONFIG_NLS_CODEPAGE_863 is not set\n# CONFIG_NLS_CODEPAGE_864 is not set\n# CONFIG_NLS_CODEPAGE_865 is not set\n# CONFIG_NLS_CODEPAGE_866 is not set\n# CONFIG_NLS_CODEPAGE_869 is not set\n# CONFIG_NLS_CODEPAGE_936 is not set\n# CONFIG_NLS_CODEPAGE_950 is not set\n# CONFIG_NLS_CODEPAGE_932 is not set\n# CONFIG_NLS_CODEPAGE_949 is not set\n# CONFIG_NLS_CODEPAGE_874 is not set\n# CONFIG_NLS_ISO8859_8 is not set\n# CONFIG_NLS_CODEPAGE_1250 is not set\n# CONFIG_NLS_CODEPAGE_1251 is not set\nCONFIG_NLS_ASCII=y\nCONFIG_NLS_ISO8859_1=y\n# CONFIG_NLS_ISO8859_2 is not set\n# CONFIG_NLS_ISO8859_3 is not set\n# CONFIG_NLS_ISO8859_4 is not set\n# CONFIG_NLS_ISO8859_5 is not set\n# CONFIG_NLS_ISO8859_6 is not set\n# CONFIG_NLS_ISO8859_7 is not set\n# CONFIG_NLS_ISO8859_9 is not set\n# CONFIG_NLS_ISO8859_13 is not set\n# CONFIG_NLS_ISO8859_14 is not set\n# CONFIG_NLS_ISO8859_15 is not set\n# CONFIG_NLS_KOI8_R is not set\n# CONFIG_NLS_KOI8_U is not set\n# CONFIG_NLS_MAC_ROMAN is not set\n# CONFIG_NLS_MAC_CELTIC is not set\n# CONFIG_NLS_MAC_CENTEURO is not set\n# CONFIG_NLS_MAC_CROATIAN is not set\n# CONFIG_NLS_MAC_CYRILLIC is not set\n# CONFIG_NLS_MAC_GAELIC is not set\n# CONFIG_NLS_MAC_GREEK is not set\n# CONFIG_NLS_MAC_ICELAND is not set\n# CONFIG_NLS_MAC_INUIT is not set\n# CONFIG_NLS_MAC_ROMANIAN is not set\n# CONFIG_NLS_MAC_TURKISH is not set\nCONFIG_NLS_UTF8=y\n# CONFIG_DLM is not set\n# CONFIG_UNICODE is not set\nCONFIG_IO_WQ=y\n# end of File systems\n\n#\n# Security options\n#\nCONFIG_KEYS=y\n# CONFIG_KEYS_REQUEST_CACHE is not set\n# CONFIG_PERSISTENT_KEYRINGS is not set\n# CONFIG_BIG_KEYS is not set\n# CONFIG_TRUSTED_KEYS is not set\n# CONFIG_ENCRYPTED_KEYS is not set\nCONFIG_KEY_DH_OPERATIONS=y\n# CONFIG_SECURITY_DMESG_RESTRICT is not set\n# CONFIG_SECURITY is not set\nCONFIG_SECURITYFS=y\nCONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y\n# CONFIG_HARDENED_USERCOPY is not set\n# CONFIG_FORTIFY_SOURCE is not set\n# CONFIG_STATIC_USERMODEHELPER is not set\nCONFIG_DEFAULT_SECURITY_DAC=y\nCONFIG_LSM=\"lockdown,yama,loadpin,safesetid,integrity,bpf\"\n\n#\n# Kernel hardening options\n#\n\n#\n# Memory initialization\n#\nCONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y\nCONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y\nCONFIG_INIT_STACK_NONE=y\n# CONFIG_INIT_STACK_ALL_PATTERN is not set\n# CONFIG_INIT_STACK_ALL_ZERO is not set\n# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set\n# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set\nCONFIG_CC_HAS_ZERO_CALL_USED_REGS=y\n# CONFIG_ZERO_CALL_USED_REGS is not set\n# end of Memory initialization\n\nCONFIG_RANDSTRUCT_NONE=y\n# CONFIG_RANDSTRUCT_FULL is not set\n# CONFIG_RANDSTRUCT_PERFORMANCE is not set\n# end of Kernel hardening options\n# end of Security options\n\nCONFIG_XOR_BLOCKS=m\nCONFIG_CRYPTO=y\n\n#\n# Crypto core or helper\n#\nCONFIG_CRYPTO_ALGAPI=y\nCONFIG_CRYPTO_ALGAPI2=y\nCONFIG_CRYPTO_AEAD=y\nCONFIG_CRYPTO_AEAD2=y\nCONFIG_CRYPTO_SKCIPHER=y\nCONFIG_CRYPTO_SKCIPHER2=y\nCONFIG_CRYPTO_HASH=y\nCONFIG_CRYPTO_HASH2=y\nCONFIG_CRYPTO_RNG=y\nCONFIG_CRYPTO_RNG2=y\nCONFIG_CRYPTO_RNG_DEFAULT=y\nCONFIG_CRYPTO_AKCIPHER2=y\nCONFIG_CRYPTO_AKCIPHER=y\nCONFIG_CRYPTO_KPP2=y\nCONFIG_CRYPTO_KPP=y\nCONFIG_CRYPTO_ACOMP2=y\nCONFIG_CRYPTO_MANAGER=y\nCONFIG_CRYPTO_MANAGER2=y\nCONFIG_CRYPTO_USER=m\nCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y\nCONFIG_CRYPTO_GF128MUL=y\nCONFIG_CRYPTO_NULL=y\nCONFIG_CRYPTO_NULL2=y\n# CONFIG_CRYPTO_PCRYPT is not set\nCONFIG_CRYPTO_CRYPTD=m\nCONFIG_CRYPTO_AUTHENC=y\nCONFIG_CRYPTO_TEST=m\nCONFIG_CRYPTO_SIMD=m\n# end of Crypto core or helper\n\n#\n# Public-key cryptography\n#\nCONFIG_CRYPTO_RSA=y\nCONFIG_CRYPTO_DH=y\n# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set\nCONFIG_CRYPTO_ECC=m\nCONFIG_CRYPTO_ECDH=m\n# CONFIG_CRYPTO_ECDSA is not set\n# CONFIG_CRYPTO_ECRDSA is not set\n# CONFIG_CRYPTO_SM2 is not set\n# CONFIG_CRYPTO_CURVE25519 is not set\n# end of Public-key cryptography\n\n#\n# Block ciphers\n#\nCONFIG_CRYPTO_AES=y\n# CONFIG_CRYPTO_AES_TI is not set\n# CONFIG_CRYPTO_ANUBIS is not set\n# CONFIG_CRYPTO_ARIA is not set\n# CONFIG_CRYPTO_BLOWFISH is not set\n# CONFIG_CRYPTO_CAMELLIA is not set\n# CONFIG_CRYPTO_CAST5 is not set\n# CONFIG_CRYPTO_CAST6 is not set\nCONFIG_CRYPTO_DES=y\n# CONFIG_CRYPTO_FCRYPT is not set\n# CONFIG_CRYPTO_KHAZAD is not set\n# CONFIG_CRYPTO_SEED is not set\n# CONFIG_CRYPTO_SERPENT is not set\n# CONFIG_CRYPTO_SM4_GENERIC is not set\n# CONFIG_CRYPTO_TEA is not set\n# CONFIG_CRYPTO_TWOFISH is not set\n# end of Block ciphers\n\n#\n# Length-preserving ciphers and modes\n#\n# CONFIG_CRYPTO_ADIANTUM is not set\n# CONFIG_CRYPTO_ARC4 is not set\n# CONFIG_CRYPTO_CHACHA20 is not set\nCONFIG_CRYPTO_CBC=y\n# CONFIG_CRYPTO_CFB is not set\nCONFIG_CRYPTO_CTR=y\n# CONFIG_CRYPTO_CTS is not set\nCONFIG_CRYPTO_ECB=y\n# CONFIG_CRYPTO_HCTR2 is not set\n# CONFIG_CRYPTO_KEYWRAP is not set\nCONFIG_CRYPTO_LRW=m\n# CONFIG_CRYPTO_OFB is not set\n# CONFIG_CRYPTO_PCBC is not set\nCONFIG_CRYPTO_XTS=m\n# end of Length-preserving ciphers and modes\n\n#\n# AEAD (authenticated encryption with associated data) ciphers\n#\n# CONFIG_CRYPTO_AEGIS128 is not set\n# CONFIG_CRYPTO_CHACHA20POLY1305 is not set\nCONFIG_CRYPTO_CCM=y\nCONFIG_CRYPTO_GCM=y\nCONFIG_CRYPTO_SEQIV=y\nCONFIG_CRYPTO_ECHAINIV=y\nCONFIG_CRYPTO_ESSIV=m\n# end of AEAD (authenticated encryption with associated data) ciphers\n\n#\n# Hashes, digests, and MACs\n#\nCONFIG_CRYPTO_BLAKE2B=m\nCONFIG_CRYPTO_CMAC=y\nCONFIG_CRYPTO_GHASH=y\nCONFIG_CRYPTO_HMAC=y\nCONFIG_CRYPTO_MD4=y\nCONFIG_CRYPTO_MD5=y\n# CONFIG_CRYPTO_MICHAEL_MIC is not set\n# CONFIG_CRYPTO_POLY1305 is not set\n# CONFIG_CRYPTO_RMD160 is not set\nCONFIG_CRYPTO_SHA1=y\nCONFIG_CRYPTO_SHA256=y\nCONFIG_CRYPTO_SHA512=y\nCONFIG_CRYPTO_SHA3=m\n# CONFIG_CRYPTO_SM3_GENERIC is not set\n# CONFIG_CRYPTO_STREEBOG is not set\n# CONFIG_CRYPTO_VMAC is not set\n# CONFIG_CRYPTO_WP512 is not set\n# CONFIG_CRYPTO_XCBC is not set\nCONFIG_CRYPTO_XXHASH=m\n# end of Hashes, digests, and MACs\n\n#\n# CRCs (cyclic redundancy checks)\n#\nCONFIG_CRYPTO_CRC32C=y\nCONFIG_CRYPTO_CRC32=y\n# CONFIG_CRYPTO_CRCT10DIF is not set\n# end of CRCs (cyclic redundancy checks)\n\n#\n# Compression\n#\n# CONFIG_CRYPTO_DEFLATE is not set\nCONFIG_CRYPTO_LZO=m\n# CONFIG_CRYPTO_842 is not set\nCONFIG_CRYPTO_LZ4=m\n# CONFIG_CRYPTO_LZ4HC is not set\n# CONFIG_CRYPTO_ZSTD is not set\n# end of Compression\n\n#\n# Random number generation\n#\n# CONFIG_CRYPTO_ANSI_CPRNG is not set\nCONFIG_CRYPTO_DRBG_MENU=y\nCONFIG_CRYPTO_DRBG_HMAC=y\n# CONFIG_CRYPTO_DRBG_HASH is not set\n# CONFIG_CRYPTO_DRBG_CTR is not set\nCONFIG_CRYPTO_DRBG=y\nCONFIG_CRYPTO_JITTERENTROPY=y\nCONFIG_CRYPTO_KDF800108_CTR=y\n# end of Random number generation\n\n#\n# Userspace interface\n#\nCONFIG_CRYPTO_USER_API=y\nCONFIG_CRYPTO_USER_API_HASH=y\nCONFIG_CRYPTO_USER_API_SKCIPHER=y\nCONFIG_CRYPTO_USER_API_RNG=m\n# CONFIG_CRYPTO_USER_API_RNG_CAVP is not set\nCONFIG_CRYPTO_USER_API_AEAD=m\nCONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y\n# CONFIG_CRYPTO_STATS is not set\n# end of Userspace interface\n\nCONFIG_CRYPTO_HASH_INFO=y\n\n#\n# Accelerated Cryptographic Algorithms for CPU (arm)\n#\nCONFIG_CRYPTO_CURVE25519_NEON=y\nCONFIG_CRYPTO_GHASH_ARM_CE=m\n# CONFIG_CRYPTO_NHPOLY1305_NEON is not set\nCONFIG_CRYPTO_POLY1305_ARM=y\nCONFIG_CRYPTO_BLAKE2S_ARM=y\nCONFIG_CRYPTO_BLAKE2B_NEON=m\nCONFIG_CRYPTO_SHA1_ARM=m\nCONFIG_CRYPTO_SHA1_ARM_NEON=m\n# CONFIG_CRYPTO_SHA1_ARM_CE is not set\n# CONFIG_CRYPTO_SHA2_ARM_CE is not set\nCONFIG_CRYPTO_SHA256_ARM=m\nCONFIG_CRYPTO_SHA512_ARM=m\nCONFIG_CRYPTO_AES_ARM=m\nCONFIG_CRYPTO_AES_ARM_BS=m\n# CONFIG_CRYPTO_AES_ARM_CE is not set\nCONFIG_CRYPTO_CHACHA20_NEON=y\nCONFIG_CRYPTO_CRC32_ARM_CE=m\n# end of Accelerated Cryptographic Algorithms for CPU (arm)\n\nCONFIG_CRYPTO_HW=y\nCONFIG_CRYPTO_DEV_EXYNOS_RNG=y\nCONFIG_CRYPTO_DEV_S5P=y\n# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set\n# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set\n# CONFIG_CRYPTO_DEV_SAFEXCEL is not set\n# CONFIG_CRYPTO_DEV_CCREE is not set\n# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set\nCONFIG_ASYMMETRIC_KEY_TYPE=y\nCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y\nCONFIG_X509_CERTIFICATE_PARSER=y\nCONFIG_PKCS8_PRIVATE_KEY_PARSER=m\nCONFIG_PKCS7_MESSAGE_PARSER=y\n# CONFIG_PKCS7_TEST_KEY is not set\n# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set\n# CONFIG_FIPS_SIGNATURE_SELFTEST is not set\n\n#\n# Certificates for signature checking\n#\nCONFIG_SYSTEM_TRUSTED_KEYRING=y\nCONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set\n# CONFIG_SECONDARY_TRUSTED_KEYRING is not set\n# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set\n# end of Certificates for signature checking\n\nCONFIG_BINARY_PRINTF=y\n\n#\n# Library routines\n#\nCONFIG_RAID6_PQ=m\n# CONFIG_RAID6_PQ_BENCHMARK is not set\nCONFIG_LINEAR_RANGES=y\n# CONFIG_PACKING is not set\nCONFIG_BITREVERSE=y\nCONFIG_HAVE_ARCH_BITREVERSE=y\nCONFIG_GENERIC_STRNCPY_FROM_USER=y\nCONFIG_GENERIC_STRNLEN_USER=y\nCONFIG_GENERIC_NET_UTILS=y\nCONFIG_CORDIC=m\n# CONFIG_PRIME_NUMBERS is not set\nCONFIG_RATIONAL=y\nCONFIG_GENERIC_PCI_IOMAP=y\nCONFIG_ARCH_USE_CMPXCHG_LOCKREF=y\n\n#\n# Crypto library routines\n#\nCONFIG_CRYPTO_LIB_UTILS=y\nCONFIG_CRYPTO_LIB_AES=y\nCONFIG_CRYPTO_LIB_ARC4=m\nCONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y\nCONFIG_CRYPTO_LIB_CHACHA=y\nCONFIG_CRYPTO_ARCH_HAVE_LIB_CURVE25519=y\nCONFIG_CRYPTO_LIB_CURVE25519_GENERIC=y\nCONFIG_CRYPTO_LIB_CURVE25519=y\nCONFIG_CRYPTO_LIB_DES=y\nCONFIG_CRYPTO_LIB_POLY1305_RSIZE=9\nCONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_POLY1305=y\nCONFIG_CRYPTO_LIB_CHACHA20POLY1305=y\nCONFIG_CRYPTO_LIB_SHA1=y\nCONFIG_CRYPTO_LIB_SHA256=y\n# end of Crypto library routines\n\nCONFIG_CRC_CCITT=y\nCONFIG_CRC16=y\n# CONFIG_CRC_T10DIF is not set\n# CONFIG_CRC64_ROCKSOFT is not set\nCONFIG_CRC_ITU_T=y\nCONFIG_CRC32=y\n# CONFIG_CRC32_SELFTEST is not set\nCONFIG_CRC32_SLICEBY8=y\n# CONFIG_CRC32_SLICEBY4 is not set\n# CONFIG_CRC32_SARWATE is not set\n# CONFIG_CRC32_BIT is not set\n# CONFIG_CRC64 is not set\n# CONFIG_CRC4 is not set\n# CONFIG_CRC7 is not set\nCONFIG_LIBCRC32C=m\n# CONFIG_CRC8 is not set\nCONFIG_XXHASH=y\n# CONFIG_RANDOM32_SELFTEST is not set\nCONFIG_ZLIB_INFLATE=y\nCONFIG_ZLIB_DEFLATE=m\nCONFIG_LZO_COMPRESS=m\nCONFIG_LZO_DECOMPRESS=y\nCONFIG_LZ4_COMPRESS=m\nCONFIG_LZ4_DECOMPRESS=y\nCONFIG_ZSTD_COMMON=y\nCONFIG_ZSTD_COMPRESS=m\nCONFIG_ZSTD_DECOMPRESS=y\nCONFIG_XZ_DEC=y\nCONFIG_XZ_DEC_X86=y\nCONFIG_XZ_DEC_POWERPC=y\nCONFIG_XZ_DEC_IA64=y\nCONFIG_XZ_DEC_ARM=y\nCONFIG_XZ_DEC_ARMTHUMB=y\nCONFIG_XZ_DEC_SPARC=y\n# CONFIG_XZ_DEC_MICROLZMA is not set\nCONFIG_XZ_DEC_BCJ=y\n# CONFIG_XZ_DEC_TEST is not set\nCONFIG_DECOMPRESS_GZIP=y\nCONFIG_DECOMPRESS_BZIP2=y\nCONFIG_DECOMPRESS_LZMA=y\nCONFIG_DECOMPRESS_XZ=y\nCONFIG_DECOMPRESS_LZO=y\nCONFIG_DECOMPRESS_LZ4=y\nCONFIG_DECOMPRESS_ZSTD=y\nCONFIG_GENERIC_ALLOCATOR=y\nCONFIG_XARRAY_MULTI=y\nCONFIG_ASSOCIATIVE_ARRAY=y\nCONFIG_HAS_IOMEM=y\nCONFIG_HAS_IOPORT_MAP=y\nCONFIG_HAS_DMA=y\nCONFIG_DMA_OPS=y\nCONFIG_NEED_SG_DMA_LENGTH=y\nCONFIG_NEED_DMA_MAP_STATE=y\nCONFIG_DMA_DECLARE_COHERENT=y\nCONFIG_ARCH_HAS_SETUP_DMA_OPS=y\nCONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y\nCONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y\nCONFIG_DMA_NONCOHERENT_MMAP=y\nCONFIG_DMA_CMA=y\n# CONFIG_DMA_PERNUMA_CMA is not set\n\n#\n# Default contiguous memory area size:\n#\nCONFIG_CMA_SIZE_MBYTES=96\nCONFIG_CMA_SIZE_SEL_MBYTES=y\n# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set\n# CONFIG_CMA_SIZE_SEL_MIN is not set\n# CONFIG_CMA_SIZE_SEL_MAX is not set\nCONFIG_CMA_ALIGNMENT=8\n# CONFIG_DMA_API_DEBUG is not set\n# CONFIG_DMA_MAP_BENCHMARK is not set\nCONFIG_SGL_ALLOC=y\n# CONFIG_FORCE_NR_CPUS is not set\nCONFIG_CPU_RMAP=y\nCONFIG_DQL=y\nCONFIG_GLOB=y\n# CONFIG_GLOB_SELFTEST is not set\nCONFIG_NLATTR=y\nCONFIG_CLZ_TAB=y\n# CONFIG_IRQ_POLL is not set\nCONFIG_MPILIB=y\nCONFIG_LIBFDT=y\nCONFIG_OID_REGISTRY=y\nCONFIG_HAVE_GENERIC_VDSO=y\nCONFIG_GENERIC_GETTIMEOFDAY=y\nCONFIG_GENERIC_VDSO_32=y\nCONFIG_FONT_SUPPORT=y\nCONFIG_FONTS=y\n# CONFIG_FONT_8x8 is not set\nCONFIG_FONT_8x16=y\n# CONFIG_FONT_6x11 is not set\nCONFIG_FONT_7x14=y\n# CONFIG_FONT_PEARL_8x8 is not set\n# CONFIG_FONT_ACORN_8x8 is not set\n# CONFIG_FONT_MINI_4x6 is not set\n# CONFIG_FONT_6x10 is not set\n# CONFIG_FONT_10x18 is not set\n# CONFIG_FONT_SUN8x16 is not set\n# CONFIG_FONT_SUN12x22 is not set\n# CONFIG_FONT_TER16x32 is not set\n# CONFIG_FONT_6x8 is not set\nCONFIG_SG_POOL=y\nCONFIG_STACKDEPOT=y\nCONFIG_SBITMAP=y\n# end of Library routines\n\nCONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y\n\n#\n# Kernel hacking\n#\n\n#\n# printk and dmesg options\n#\nCONFIG_PRINTK_TIME=y\n# CONFIG_PRINTK_CALLER is not set\n# CONFIG_STACKTRACE_BUILD_ID is not set\nCONFIG_CONSOLE_LOGLEVEL_DEFAULT=7\nCONFIG_CONSOLE_LOGLEVEL_QUIET=4\nCONFIG_MESSAGE_LOGLEVEL_DEFAULT=4\n# CONFIG_BOOT_PRINTK_DELAY is not set\nCONFIG_DYNAMIC_DEBUG=y\nCONFIG_DYNAMIC_DEBUG_CORE=y\nCONFIG_SYMBOLIC_ERRNAME=y\nCONFIG_DEBUG_BUGVERBOSE=y\n# end of printk and dmesg options\n\nCONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_MISC=y\n\n#\n# Compile-time checks and compiler options\n#\nCONFIG_DEBUG_INFO=y\nCONFIG_AS_HAS_NON_CONST_LEB128=y\n# CONFIG_DEBUG_INFO_NONE is not set\nCONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y\n# CONFIG_DEBUG_INFO_DWARF4 is not set\n# CONFIG_DEBUG_INFO_DWARF5 is not set\n# CONFIG_DEBUG_INFO_REDUCED is not set\n# CONFIG_DEBUG_INFO_COMPRESSED is not set\n# CONFIG_DEBUG_INFO_SPLIT is not set\n# CONFIG_DEBUG_INFO_BTF is not set\n# CONFIG_GDB_SCRIPTS is not set\nCONFIG_FRAME_WARN=1024\n# CONFIG_STRIP_ASM_SYMS is not set\n# CONFIG_READABLE_ASM is not set\n# CONFIG_HEADERS_INSTALL is not set\n# CONFIG_DEBUG_SECTION_MISMATCH is not set\nCONFIG_SECTION_MISMATCH_WARN_ONLY=y\n# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set\n# end of Compile-time checks and compiler options\n\n#\n# Generic Kernel Debugging Instruments\n#\nCONFIG_MAGIC_SYSRQ=y\nCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1\nCONFIG_MAGIC_SYSRQ_SERIAL=y\nCONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=\"\"\nCONFIG_DEBUG_FS=y\nCONFIG_DEBUG_FS_ALLOW_ALL=y\n# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set\n# CONFIG_DEBUG_FS_ALLOW_NONE is not set\nCONFIG_HAVE_ARCH_KGDB=y\n# CONFIG_KGDB is not set\n# CONFIG_UBSAN is not set\nCONFIG_HAVE_KCSAN_COMPILER=y\n# end of Generic Kernel Debugging Instruments\n\n#\n# Networking Debugging\n#\n# CONFIG_NET_DEV_REFCNT_TRACKER is not set\n# CONFIG_NET_NS_REFCNT_TRACKER is not set\n# CONFIG_DEBUG_NET is not set\n# end of Networking Debugging\n\n#\n# Memory Debugging\n#\n# CONFIG_PAGE_EXTENSION is not set\n# CONFIG_DEBUG_PAGEALLOC is not set\nCONFIG_SLUB_DEBUG=y\n# CONFIG_SLUB_DEBUG_ON is not set\n# CONFIG_PAGE_OWNER is not set\n# CONFIG_PAGE_POISONING is not set\n# CONFIG_DEBUG_PAGE_REF is not set\n# CONFIG_DEBUG_RODATA_TEST is not set\n# CONFIG_DEBUG_WX is not set\n# CONFIG_DEBUG_OBJECTS is not set\n# CONFIG_SHRINKER_DEBUG is not set\nCONFIG_HAVE_DEBUG_KMEMLEAK=y\n# CONFIG_DEBUG_KMEMLEAK is not set\n# CONFIG_DEBUG_STACK_USAGE is not set\n# CONFIG_SCHED_STACK_END_CHECK is not set\n# CONFIG_DEBUG_VM is not set\nCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y\n# CONFIG_DEBUG_VIRTUAL is not set\nCONFIG_DEBUG_MEMORY_INIT=y\n# CONFIG_DEBUG_PER_CPU_MAPS is not set\n# CONFIG_DEBUG_KMAP_LOCAL is not set\n# CONFIG_DEBUG_HIGHMEM is not set\nCONFIG_HAVE_ARCH_KASAN=y\nCONFIG_HAVE_ARCH_KASAN_VMALLOC=y\nCONFIG_CC_HAS_KASAN_GENERIC=y\nCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y\n# CONFIG_KASAN is not set\nCONFIG_HAVE_ARCH_KFENCE=y\n# CONFIG_KFENCE is not set\n# end of Memory Debugging\n\n# CONFIG_DEBUG_SHIRQ is not set\n\n#\n# Debug Oops, Lockups and Hangs\n#\n# CONFIG_PANIC_ON_OOPS is not set\nCONFIG_PANIC_ON_OOPS_VALUE=0\nCONFIG_PANIC_TIMEOUT=0\nCONFIG_LOCKUP_DETECTOR=y\nCONFIG_SOFTLOCKUP_DETECTOR=y\n# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set\n# CONFIG_DETECT_HUNG_TASK is not set\n# CONFIG_WQ_WATCHDOG is not set\n# CONFIG_TEST_LOCKUP is not set\n# end of Debug Oops, Lockups and Hangs\n\n#\n# Scheduler Debugging\n#\nCONFIG_SCHED_DEBUG=y\n# CONFIG_SCHEDSTATS is not set\n# end of Scheduler Debugging\n\n# CONFIG_DEBUG_TIMEKEEPING is not set\nCONFIG_DEBUG_PREEMPT=y\n\n#\n# Lock Debugging (spinlocks, mutexes, etc...)\n#\nCONFIG_LOCK_DEBUGGING_SUPPORT=y\nCONFIG_PROVE_LOCKING=y\n# CONFIG_PROVE_RAW_LOCK_NESTING is not set\n# CONFIG_LOCK_STAT is not set\nCONFIG_DEBUG_RT_MUTEXES=y\nCONFIG_DEBUG_SPINLOCK=y\nCONFIG_DEBUG_MUTEXES=y\nCONFIG_DEBUG_WW_MUTEX_SLOWPATH=y\nCONFIG_DEBUG_RWSEMS=y\nCONFIG_DEBUG_LOCK_ALLOC=y\nCONFIG_LOCKDEP=y\nCONFIG_LOCKDEP_BITS=15\nCONFIG_LOCKDEP_CHAINS_BITS=16\nCONFIG_LOCKDEP_STACK_TRACE_BITS=19\nCONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14\nCONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS=12\n# CONFIG_DEBUG_LOCKDEP is not set\nCONFIG_DEBUG_ATOMIC_SLEEP=y\n# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set\n# CONFIG_LOCK_TORTURE_TEST is not set\n# CONFIG_WW_MUTEX_SELFTEST is not set\n# CONFIG_SCF_TORTURE_TEST is not set\n# end of Lock Debugging (spinlocks, mutexes, etc...)\n\nCONFIG_TRACE_IRQFLAGS=y\n# CONFIG_DEBUG_IRQFLAGS is not set\nCONFIG_STACKTRACE=y\n# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set\n# CONFIG_DEBUG_KOBJECT is not set\n\n#\n# Debug kernel data structures\n#\n# CONFIG_DEBUG_LIST is not set\n# CONFIG_DEBUG_PLIST is not set\n# CONFIG_DEBUG_SG is not set\n# CONFIG_DEBUG_NOTIFIERS is not set\n# CONFIG_BUG_ON_DATA_CORRUPTION is not set\n# CONFIG_DEBUG_MAPLE_TREE is not set\n# end of Debug kernel data structures\n\n# CONFIG_DEBUG_CREDENTIALS is not set\n\n#\n# RCU Debugging\n#\nCONFIG_PROVE_RCU=y\n# CONFIG_RCU_SCALE_TEST is not set\n# CONFIG_RCU_TORTURE_TEST is not set\n# CONFIG_RCU_REF_SCALE_TEST is not set\nCONFIG_RCU_CPU_STALL_TIMEOUT=21\nCONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0\nCONFIG_RCU_TRACE=y\n# CONFIG_RCU_EQS_DEBUG is not set\n# end of RCU Debugging\n\n# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set\n# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set\n# CONFIG_LATENCYTOP is not set\nCONFIG_NOP_TRACER=y\nCONFIG_HAVE_FUNCTION_TRACER=y\nCONFIG_HAVE_FUNCTION_GRAPH_TRACER=y\nCONFIG_HAVE_DYNAMIC_FTRACE=y\nCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y\nCONFIG_HAVE_FTRACE_MCOUNT_RECORD=y\nCONFIG_HAVE_SYSCALL_TRACEPOINTS=y\nCONFIG_HAVE_C_RECORDMCOUNT=y\nCONFIG_HAVE_BUILDTIME_MCOUNT_SORT=y\nCONFIG_TRACE_CLOCK=y\nCONFIG_RING_BUFFER=y\nCONFIG_EVENT_TRACING=y\nCONFIG_CONTEXT_SWITCH_TRACER=y\nCONFIG_PREEMPTIRQ_TRACEPOINTS=y\nCONFIG_TRACING=y\nCONFIG_TRACING_SUPPORT=y\nCONFIG_FTRACE=y\n# CONFIG_BOOTTIME_TRACING is not set\n# CONFIG_FUNCTION_TRACER is not set\n# CONFIG_STACK_TRACER is not set\n# CONFIG_IRQSOFF_TRACER is not set\n# CONFIG_PREEMPT_TRACER is not set\n# CONFIG_SCHED_TRACER is not set\n# CONFIG_HWLAT_TRACER is not set\n# CONFIG_OSNOISE_TRACER is not set\n# CONFIG_TIMERLAT_TRACER is not set\n# CONFIG_ENABLE_DEFAULT_TRACERS is not set\n# CONFIG_FTRACE_SYSCALLS is not set\n# CONFIG_TRACER_SNAPSHOT is not set\nCONFIG_BRANCH_PROFILE_NONE=y\n# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set\n# CONFIG_PROFILE_ALL_BRANCHES is not set\n# CONFIG_BLK_DEV_IO_TRACE is not set\nCONFIG_UPROBE_EVENTS=y\nCONFIG_BPF_EVENTS=y\nCONFIG_DYNAMIC_EVENTS=y\nCONFIG_PROBE_EVENTS=y\n# CONFIG_SYNTH_EVENTS is not set\n# CONFIG_HIST_TRIGGERS is not set\n# CONFIG_TRACE_EVENT_INJECT is not set\n# CONFIG_TRACEPOINT_BENCHMARK is not set\n# CONFIG_RING_BUFFER_BENCHMARK is not set\n# CONFIG_TRACE_EVAL_MAP_FILE is not set\n# CONFIG_RING_BUFFER_STARTUP_TEST is not set\n# CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is not set\n# CONFIG_PREEMPTIRQ_DELAY_TEST is not set\n# CONFIG_RV is not set\n# CONFIG_SAMPLES is not set\n# CONFIG_STRICT_DEVMEM is not set\n\n#\n# arm Debugging\n#\n# CONFIG_ARM_PTDUMP_DEBUGFS is not set\n# CONFIG_UNWINDER_FRAME_POINTER is not set\nCONFIG_UNWINDER_ARM=y\nCONFIG_ARM_UNWIND=y\nCONFIG_DEBUG_USER=y\n# CONFIG_DEBUG_LL is not set\nCONFIG_DEBUG_LL_INCLUDE=\"mach/debug-macro.S\"\nCONFIG_UNCOMPRESS_INCLUDE=\"debug/uncompress.h\"\n# CONFIG_PID_IN_CONTEXTIDR is not set\n# CONFIG_CORESIGHT is not set\n# end of arm Debugging\n\n#\n# Kernel Testing and Coverage\n#\n# CONFIG_KUNIT is not set\n# CONFIG_NOTIFIER_ERROR_INJECTION is not set\n# CONFIG_FAULT_INJECTION is not set\nCONFIG_ARCH_HAS_KCOV=y\nCONFIG_CC_HAS_SANCOV_TRACE_PC=y\n# CONFIG_KCOV is not set\nCONFIG_RUNTIME_TESTING_MENU=y\n# CONFIG_LKDTM is not set\n# CONFIG_TEST_MIN_HEAP is not set\n# CONFIG_TEST_DIV64 is not set\n# CONFIG_BACKTRACE_SELF_TEST is not set\n# CONFIG_TEST_REF_TRACKER is not set\n# CONFIG_RBTREE_TEST is not set\n# CONFIG_REED_SOLOMON_TEST is not set\n# CONFIG_INTERVAL_TREE_TEST is not set\n# CONFIG_PERCPU_TEST is not set\n# CONFIG_ATOMIC64_SELFTEST is not set\n# CONFIG_TEST_HEXDUMP is not set\n# CONFIG_STRING_SELFTEST is not set\n# CONFIG_TEST_STRING_HELPERS is not set\n# CONFIG_TEST_STRSCPY is not set\n# CONFIG_TEST_KSTRTOX is not set\n# CONFIG_TEST_PRINTF is not set\n# CONFIG_TEST_SCANF is not set\n# CONFIG_TEST_BITMAP is not set\n# CONFIG_TEST_UUID is not set\n# CONFIG_TEST_XARRAY is not set\n# CONFIG_TEST_MAPLE_TREE is not set\n# CONFIG_TEST_RHASHTABLE is not set\n# CONFIG_TEST_SIPHASH is not set\n# CONFIG_TEST_IDA is not set\n# CONFIG_TEST_LKM is not set\n# CONFIG_TEST_BITOPS is not set\n# CONFIG_TEST_VMALLOC is not set\n# CONFIG_TEST_USER_COPY is not set\n# CONFIG_TEST_BPF is not set\n# CONFIG_TEST_BLACKHOLE_DEV is not set\n# CONFIG_FIND_BIT_BENCHMARK is not set\n# CONFIG_TEST_FIRMWARE is not set\n# CONFIG_TEST_SYSCTL is not set\n# CONFIG_TEST_UDELAY is not set\n# CONFIG_TEST_STATIC_KEYS is not set\n# CONFIG_TEST_DYNAMIC_DEBUG is not set\n# CONFIG_TEST_KMOD is not set\n# CONFIG_TEST_MEMCAT_P is not set\n# CONFIG_TEST_MEMINIT is not set\n# CONFIG_TEST_FREE_PAGES is not set\nCONFIG_ARCH_USE_MEMTEST=y\n# CONFIG_MEMTEST is not set\n# end of Kernel Testing and Coverage\n\n#\n# Rust hacking\n#\n# end of Rust hacking\n# end of Kernel hacking\n"
  },
  {
    "path": "projects/Samsung/options",
    "content": "################################################################################\n# setup system defaults\n################################################################################\n\n  # Bootloader to use (syslinux / u-boot / bcm2835-bootloader)\n    BOOTLOADER=\"u-boot\"\n\n  # U-Boot firmware package(s) to use\n    UBOOT_FIRMWARE=\"exynos-boot-fip\"\n\n  # Kernel target for u-boot (default 'uImage' if BOOTLOADER=u-boot) (uImage / zImage)\n    KERNEL_TARGET=\"zImage\"\n\n  # Additional kernel dependencies\n    KERNEL_EXTRA_DEPENDS_TARGET=\"lz4:host\"\n\n  # Additional kernel make parameters (for example to specify the u-boot loadaddress)\n    KERNEL_MAKE_EXTRACMD=\"dtbs\"\n\n  # Kernel to use:\n    LINUX=\"samsung\"\n\n  # kernel serial console\n    EXTRA_CMDLINE=\"quiet systemd.debug_shell=ttySAC2 console=ttySAC2,115200n8 console=tty0\"\n\n  # Default system partition offset in sectors\n    SYSTEM_PART_START=3072\n\n\n################################################################################\n# setup build defaults\n################################################################################\n\n  # Project CFLAGS\n    PROJECT_CFLAGS=\"\"\n\n  # SquashFS compression method (gzip / lzo / xz)\n    SQUASHFS_COMPRESSION=\"zstd\"\n\n\n################################################################################\n# setup project defaults\n################################################################################\n\n  # OpenGL(X) implementation to use (no / mesa)\n    OPENGL=\"no\"\n\n  # Vulkan implementation to use (vulkan-loader / no)\n    VULKAN=\"no\"\n\n  # Displayserver to use (wl / no)\n    DISPLAYSERVER=\"no\"\n\n  # Windowmanager to use (weston / no)\n    WINDOWMANAGER=\"no\"\n\n  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)\n  # Space separated list is supported,\n  # e.g. FIRMWARE=\"dvb-firmware misc-firmware wlan-firmware\"\n    FIRMWARE=\"kernel-firmware wlan-firmware\"\n\n  # build with installer (yes / no)\n    INSTALLER_SUPPORT=\"no\"\n\n  # additional packages to install:\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_PACKAGES+=\" PACKAGE1 PACKAGE2\"\n    ADDITIONAL_PACKAGES+=\" dtc emmctool\"\n\n  # additional drivers to install:\n  # for a list of additional drivers see packages/linux-drivers\n  # Space separated list is supported,\n  # e.g. ADDITIONAL_DRIVERS+=\" DRIVER1 DRIVER2\"\n    ADDITIONAL_DRIVERS+=\"\"\n\n  # build and install driver addons (yes / no)\n    DRIVER_ADDONS_SUPPORT=\"no\"\n\n  # driver addons to install:\n  # for a list of additional drivers see packages/linux-driver-addons\n  # Space separated list is supported,\n    DRIVER_ADDONS=\"crazycat dvb-latest\"\n\n  # use the kernel CEC framework for libcec (yes / no)\n    CEC_FRAMEWORK_SUPPORT=\"yes\"\n\n  # debug tty path\n    DEBUG_TTY=\"/dev/ttySAC2\"\n\n  # set the addon project\n    ADDON_PROJECT=\"ARMv7\"\n"
  },
  {
    "path": "projects/Samsung/patches/kodi/kodi-0001-LOCAL-WinSystemGbmGLESContext-wait-longer-for-vsync.patch",
    "content": "From b89fb39cb0e28456016828f37ae4756bf66101b6 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Sun, 23 Jan 2022 07:38:32 +0000\nSubject: [PATCH 1/2] LOCAL: WinSystemGbmGLESContext: wait longer for vsync\n\nWaiting longer for vsync improves idle CPU consumption on ARM devices\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp b/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp\nindex 0d071c31f1..52ae4c1ef2 100644\n--- a/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp\n+++ b/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp\n@@ -149,7 +149,7 @@ void CWinSystemGbmGLESContext::PresentRender(bool rendered, bool videoLayer)\n   }\n   else\n   {\n-    KODI::TIME::Sleep(10ms);\n+    KODI::TIME::Sleep(40ms);\n   }\n }\n \n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Samsung/patches/kodi/kodi-0002-LOCAL-changes-for-Odroid-XU3-XU4.patch",
    "content": "From eb476ae718b8433402547bad0e3fa2ba69e1c1ee Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Fri, 24 Jun 2022 18:04:13 +0000\nSubject: [PATCH 2/2] LOCAL: changes for Odroid XU3/XU4\n\n---\n cmake/modules/FindGBM.cmake                   | 12 ++--\n system/settings/linux.xml                     |  2 +-\n .../DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp   | 66 +++++++++++++++++--\n .../DVDCodecs/Video/DVDVideoCodecFFmpeg.h     |  1 +\n xbmc/windowing/Resolution.cpp                 |  2 +\n xbmc/windowing/gbm/GBMUtils.cpp               | 28 ++++----\n xbmc/windowing/gbm/WinSystemGbmEGLContext.cpp |  2 +-\n xbmc/windowing/gbm/drm/DRMUtils.cpp           |  2 +-\n 8 files changed, 90 insertions(+), 25 deletions(-)\n\ndiff --git a/cmake/modules/FindGBM.cmake b/cmake/modules/FindGBM.cmake\nindex 37a26a7bc4..53cc04663e 100644\n--- a/cmake/modules/FindGBM.cmake\n+++ b/cmake/modules/FindGBM.cmake\n@@ -51,12 +51,12 @@ if(GBM_FOUND)\n   set(GBM_LIBRARIES ${GBM_LIBRARY})\n   set(GBM_INCLUDE_DIRS ${GBM_INCLUDE_DIR})\n   set(GBM_DEFINITIONS -DHAVE_GBM=1)\n-  if(GBM_HAS_BO_MAP)\n-    list(APPEND GBM_DEFINITIONS -DHAS_GBM_BO_MAP=1)\n-  endif()\n-  if(GBM_HAS_MODIFIERS)\n-    list(APPEND GBM_DEFINITIONS -DHAS_GBM_MODIFIERS=1)\n-  endif()\n+  #if(GBM_HAS_BO_MAP)\n+  #  list(APPEND GBM_DEFINITIONS -DHAS_GBM_BO_MAP=1)\n+  #endif()\n+  #if(GBM_HAS_MODIFIERS)\n+  #  list(APPEND GBM_DEFINITIONS -DHAS_GBM_MODIFIERS=1)\n+  #endif()\n   if(NOT TARGET GBM::GBM)\n     add_library(GBM::GBM UNKNOWN IMPORTED)\n     set_target_properties(GBM::GBM PROPERTIES\ndiff --git a/system/settings/linux.xml b/system/settings/linux.xml\nindex 531974f3f4..6244ef7515 100644\n--- a/system/settings/linux.xml\n+++ b/system/settings/linux.xml\n@@ -177,7 +177,7 @@\n             </dependency>\n           </dependencies>\n           <level>3</level>\n-          <default>true</default>\n+          <default>false</default>\n           <control type=\"toggle\" />\n         </setting>\n         <setting id=\"videoplayer.useprimerenderer\" type=\"integer\" label=\"13462\" help=\"13463\">\ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp\nindex a7dc0890e8..ad8c41dcf0 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp\n@@ -42,6 +42,16 @@ extern \"C\" {\n #define RINT lrint\n #endif\n \n+/* define the FFMPEG codecs to use */\n+#define MPEG2TS_FFMPEG_CODEC \"mpeg2_v4l2m2m\"\n+#define H263_FFMPEG_CODEC    \"h263_v4l2m2m\"\n+#define H264_FFMPEG_CODEC    \"h264_v4l2m2m\"\n+#define MPEG4_FFMPEG_CODEC   \"mpeg4_v4l2m2m\"\n+#define MPEG1_FFMPEG_CODEC   \"mpeg1_v4l2m2m\"\n+#define MPEG2_FFMPEG_CODEC   \"mpeg2_v4l2m2m\"\n+#define VC1_FFMPEG_CODEC     \"vc1_v4l2m2m\"\n+#define VP8_FFMPEG_CODEC     \"vp8_v4l2m2m\"\n+\n enum DecoderState\n {\n   STATE_NONE,\n@@ -346,6 +356,41 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options\n     pCodec = avcodec_find_decoder_by_name(\"av1\");\n \n   if (!pCodec)\n+  if(!m_useSoftDecoder)\n+  {\n+    switch(hints.codec)\n+    {\n+      case AV_CODEC_ID_MPEG4:\n+        pCodec = avcodec_find_decoder_by_name(MPEG4_FFMPEG_CODEC);\n+        break;\n+      case AV_CODEC_ID_MPEG2TS:\n+        pCodec = avcodec_find_decoder_by_name(MPEG2TS_FFMPEG_CODEC);\n+        break;\n+      case AV_CODEC_ID_H263:\n+        pCodec = avcodec_find_decoder_by_name(H263_FFMPEG_CODEC);\n+        break;\n+      case AV_CODEC_ID_H264:\n+        pCodec = avcodec_find_decoder_by_name(H264_FFMPEG_CODEC);\n+        break;\n+      case AV_CODEC_ID_MPEG1VIDEO:\n+        pCodec = avcodec_find_decoder_by_name(MPEG1_FFMPEG_CODEC);\n+        break;\n+      case AV_CODEC_ID_MPEG2VIDEO:\n+        pCodec = avcodec_find_decoder_by_name(MPEG2_FFMPEG_CODEC);\n+        break;\n+      case AV_CODEC_ID_VC1:\n+        pCodec = avcodec_find_decoder_by_name(VC1_FFMPEG_CODEC);\n+        break;\n+      case AV_CODEC_ID_VP8:\n+        pCodec = avcodec_find_decoder_by_name(VP8_FFMPEG_CODEC);\n+        break;\n+      default:\n+        pCodec = avcodec_find_decoder(hints.codec);\n+        break;\n+    }\n+  }\n+\n+  if(pCodec == NULL)\n     pCodec = avcodec_find_decoder(hints.codec);\n \n   if(pCodec == NULL)\n@@ -446,7 +491,7 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options\n   }\n \n   UpdateName();\n-  const char* pixFmtName = av_get_pix_fmt_name(m_pCodecContext->pix_fmt);\n+  const char* pixFmtName = av_get_pix_fmt_name(GetFormat(m_pCodecContext, &m_pCodecContext->pix_fmt));\n   m_processInfo.SetVideoDimensions(m_pCodecContext->coded_width, m_pCodecContext->coded_height);\n   m_processInfo.SetVideoPixelFormat(pixFmtName ? pixFmtName : \"\");\n \n@@ -529,15 +574,22 @@ void CDVDVideoCodecFFmpeg::SetFilters()\n \n void CDVDVideoCodecFFmpeg::UpdateName()\n {\n+  bool isHW = false;\n   if(m_pCodecContext->codec->name)\n+  {\n     m_name = std::string(\"ff-\") + m_pCodecContext->codec->name;\n+    if(strstr(m_pCodecContext->codec->name, \"v4l2m2m\") != NULL)\n+      isHW = true;\n+  }\n   else\n     m_name = \"ffmpeg\";\n \n   if(m_pHardware)\n+  {\n     m_name += \"-\" + m_pHardware->Name();\n-\n-  m_processInfo.SetVideoDecoderName(m_name, m_pHardware ? true : false);\n+    isHW = true;\n+  }\n+  m_processInfo.SetVideoDecoderName(m_name, isHW ? true : false);\n \n   CLog::Log(LOGDEBUG, \"CDVDVideoCodecFFmpeg - Updated codec: {}\", m_name);\n }\n@@ -784,8 +836,14 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecFFmpeg::GetPicture(VideoPicture* pVideoPi\n   if (m_pDecodedFrame->interlaced_frame)\n     m_interlaced = true;\n   else\n+  {\n     m_interlaced = false;\n-\n+    if (m_useSoftDecoder)\n+    {\n+      m_useSoftDecoder = false;\n+      return VC_REOPEN;\n+    }\n+  }\n   if (!m_processInfo.GetVideoInterlaced() && m_interlaced)\n     m_processInfo.SetVideoInterlaced(m_interlaced);\n \ndiff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h\nindex 86c83cd1a0..a5552d3350 100644\n--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h\n+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h\n@@ -95,6 +95,7 @@ protected:\n   bool m_requestSkipDeint = false;\n   int m_codecControlFlags = 0;\n   bool m_interlaced = false;\n+  bool m_useSoftDecoder = true;\n   double m_DAR = 1.0;\n   CDVDStreamInfo m_hints;\n   CDVDCodecOptions m_options;\ndiff --git a/xbmc/windowing/Resolution.cpp b/xbmc/windowing/Resolution.cpp\nindex 4dcd2480ff..78e37add98 100644\n--- a/xbmc/windowing/Resolution.cpp\n+++ b/xbmc/windowing/Resolution.cpp\n@@ -70,6 +70,8 @@ float RESOLUTION_INFO::DisplayRatio() const\n \n RESOLUTION CResolutionUtils::ChooseBestResolution(float fps, int width, int height, bool is3D)\n {\n+  fps = static_cast<float>(std::round(fps));\n+\n   RESOLUTION res = CServiceBroker::GetWinSystem()->GetGfxContext().GetVideoResolution();\n   float weight;\n \ndiff --git a/xbmc/windowing/gbm/GBMUtils.cpp b/xbmc/windowing/gbm/GBMUtils.cpp\nindex 5267c93c8f..bc0a9b1c96 100644\n--- a/xbmc/windowing/gbm/GBMUtils.cpp\n+++ b/xbmc/windowing/gbm/GBMUtils.cpp\n@@ -74,24 +74,28 @@ CGBMUtils::CGBMDevice::CGBMSurface::CGBMSurface(gbm_surface* surface) : m_surfac\n {\n }\n \n+#define MAX_SURFACE_BUFFERS 3\n CGBMUtils::CGBMDevice::CGBMSurface::CGBMSurfaceBuffer* CGBMUtils::CGBMDevice::CGBMSurface::\n     LockFrontBuffer()\n {\n-  m_buffers.emplace(std::make_unique<CGBMSurfaceBuffer>(m_surface));\n-\n-  if (!static_cast<bool>(gbm_surface_has_free_buffers(m_surface)))\n+ /* Fix for ODROID XU4, gbm_surface_has_free_buffers doesn't seem to report if there\n+  * are no buffers available instead GEM buffers are running out, so we manually empty\n+  * the buffers here for a maximum of three\n+  */\n+  std::call_once(\n+     flag, [this]() { CLog::Log(LOGDEBUG, \"CGBMUtils - using {} buffers\", MAX_SURFACE_BUFFERS); });\n+\n+  if (m_buffers.size() >= MAX_SURFACE_BUFFERS)\n   {\n-    /*\n-     * We want to use call_once here because we want it to be logged the first time that\n-     * we have to release buffers. This means that the maximum amount of buffers had been reached.\n-     * For mesa this should be 4 buffers but it may vary across other implementations.\n-     */\n-    std::call_once(\n-        flag, [this]() { CLog::Log(LOGDEBUG, \"CGBMUtils - using {} buffers\", m_buffers.size()); });\n-\n-    m_buffers.pop();\n+     while (!m_buffers.empty())\n+     {\n+       m_buffers.front();\n+       m_buffers.pop();\n+     }\n   }\n \n+  m_buffers.emplace(std::make_unique<CGBMSurfaceBuffer>(m_surface));\n+\n   return m_buffers.back().get();\n }\n \ndiff --git a/xbmc/windowing/gbm/WinSystemGbmEGLContext.cpp b/xbmc/windowing/gbm/WinSystemGbmEGLContext.cpp\nindex 83a59413f7..dbddbbbd55 100644\n--- a/xbmc/windowing/gbm/WinSystemGbmEGLContext.cpp\n+++ b/xbmc/windowing/gbm/WinSystemGbmEGLContext.cpp\n@@ -23,7 +23,7 @@ bool CWinSystemGbmEGLContext::InitWindowSystemEGL(EGLint renderableType, EGLint\n     return false;\n   }\n \n-  if (!m_eglContext.CreatePlatformDisplay(m_GBM->GetDevice()->Get(), m_GBM->GetDevice()->Get()))\n+  if (!m_eglContext.CreatePlatformDisplay(m_GBM->GetDevice()->Get(), reinterpret_cast<EGLNativeDisplayType>(m_GBM->GetDevice()->Get())))\n   {\n     return false;\n   }\ndiff --git a/xbmc/windowing/gbm/drm/DRMUtils.cpp b/xbmc/windowing/gbm/drm/DRMUtils.cpp\nindex b424dffe80..9924756b7a 100644\n--- a/xbmc/windowing/gbm/drm/DRMUtils.cpp\n+++ b/xbmc/windowing/gbm/drm/DRMUtils.cpp\n@@ -189,7 +189,7 @@ bool CDRMUtils::FindPlanes()\n     auto videoPlane = std::find_if(m_planes.begin(), m_planes.end(), [&i](auto& plane) {\n       if (plane->GetPossibleCrtcs() & (1 << i))\n       {\n-        return plane->SupportsFormat(DRM_FORMAT_NV12);\n+\treturn (plane->SupportsFormat(DRM_FORMAT_NV12) || plane->SupportsFormat(DRM_FORMAT_XRGB8888));\n       }\n       return false;\n     });\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Samsung/patches/linux/samsung-0001-HACK-drm-set-DRM_RENDER_ALLOW-flag-on-DRM_IOCTL_MODE.patch",
    "content": "From 009b15525e53e5d96dd75c43543b57f3505c7081 Mon Sep 17 00:00:00 2001\nFrom: Dongwon Kim <dongwon.kim@intel.com>\nDate: Fri, 24 Jun 2022 12:48:38 +0000\nSubject: [PATCH 01/21] HACK: drm: set DRM_RENDER_ALLOW flag on\n DRM_IOCTL_MODE_CREATE/DESTROY_DUMB ioctls\n\nRender clients should be able to create/destroy dumb object to import\nand use it as render buffer in case the default DRM device is different\nfrom the render device (i.e. kmsro).\n\nSigned-off-by: Dongwon Kim <dongwon.kim@intel.com>\n---\n drivers/gpu/drm/drm_ioctl.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c\nindex 51fcf1298023..8984c60037b2 100644\n--- a/drivers/gpu/drm/drm_ioctl.c\n+++ b/drivers/gpu/drm/drm_ioctl.c\n@@ -672,9 +672,9 @@ static const struct drm_ioctl_desc drm_ioctls[] = {\n \tDRM_IOCTL_DEF(DRM_IOCTL_MODE_RMFB, drm_mode_rmfb_ioctl, 0),\n \tDRM_IOCTL_DEF(DRM_IOCTL_MODE_PAGE_FLIP, drm_mode_page_flip_ioctl, DRM_MASTER),\n \tDRM_IOCTL_DEF(DRM_IOCTL_MODE_DIRTYFB, drm_mode_dirtyfb_ioctl, DRM_MASTER),\n-\tDRM_IOCTL_DEF(DRM_IOCTL_MODE_CREATE_DUMB, drm_mode_create_dumb_ioctl, 0),\n+\tDRM_IOCTL_DEF(DRM_IOCTL_MODE_CREATE_DUMB, drm_mode_create_dumb_ioctl, DRM_RENDER_ALLOW),\n \tDRM_IOCTL_DEF(DRM_IOCTL_MODE_MAP_DUMB, drm_mode_mmap_dumb_ioctl, 0),\n-\tDRM_IOCTL_DEF(DRM_IOCTL_MODE_DESTROY_DUMB, drm_mode_destroy_dumb_ioctl, 0),\n+\tDRM_IOCTL_DEF(DRM_IOCTL_MODE_DESTROY_DUMB, drm_mode_destroy_dumb_ioctl, DRM_RENDER_ALLOW),\n \tDRM_IOCTL_DEF(DRM_IOCTL_MODE_OBJ_GETPROPERTIES, drm_mode_obj_get_properties_ioctl, 0),\n \tDRM_IOCTL_DEF(DRM_IOCTL_MODE_OBJ_SETPROPERTY, drm_mode_obj_set_property_ioctl, DRM_MASTER),\n \tDRM_IOCTL_DEF(DRM_IOCTL_MODE_CURSOR2, drm_mode_cursor2_ioctl, DRM_MASTER),\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Samsung/patches/linux/samsung-0002-WIP-media-videobuf2-always-enable-V4L2_MEMORY_FLAG_N.patch",
    "content": "From 4aca48cc2517dcd5abab9b0cca22c65c54d75a03 Mon Sep 17 00:00:00 2001\nFrom: Pavel Golikov <Paullo612@ya.ru>\nDate: Fri, 24 Jun 2022 15:42:59 +0000\nSubject: [PATCH 02/21] WIP: media: videobuf2: always enable\n V4L2_MEMORY_FLAG_NON_COHERENT\n\nAlways enable V4L2_MEMORY_FLAG_NON_COHERENT for all V4L queues.\n\nSigned-off-by: Pavel Golikov <Paullo612@ya.ru>\n---\n drivers/media/common/videobuf2/videobuf2-v4l2.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/drivers/media/common/videobuf2/videobuf2-v4l2.c b/drivers/media/common/videobuf2/videobuf2-v4l2.c\nindex 075d24ebf44c..ecbb5f7d3f23 100644\n--- a/drivers/media/common/videobuf2/videobuf2-v4l2.c\n+++ b/drivers/media/common/videobuf2/videobuf2-v4l2.c\n@@ -704,7 +704,7 @@ static void validate_memory_flags(struct vb2_queue *q,\n \t\t*flags = 0;\n \t} else {\n \t\t/* Clear all unknown flags. */\n-\t\t*flags &= V4L2_MEMORY_FLAG_NON_COHERENT;\n+\t\t*flags |= V4L2_MEMORY_FLAG_NON_COHERENT;\n \t}\n }\n \n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Samsung/patches/linux/samsung-0003-WIP-iommu-io-pgtable-arm-Fix-coherency-support-for-M.patch",
    "content": "From 530424bde16e74a8542d34709ac13be3c426afe1 Mon Sep 17 00:00:00 2001\nFrom: Pavel Golikov <Paullo612@ya.ru>\nDate: Fri, 24 Jun 2022 15:54:16 +0000\nSubject: [PATCH 03/21] WIP: iommu/io-pgtable-arm: Fix coherency support for\n Mali LPAE\n\nMali T628r0p1 which may be found in Samsung Exynos 5422 SOC is\ndefinitely not dma coherent, and it is not happy with PTE_SH_OS bit set\nby default in commit 728da60da7c1 (\"iommu/io-pgtable-arm: Support\ncoherency for Mali LPAE\"). Use PTE_SH_IS by default for non dma\ncoherent Mali GPUs.\n\nSigned-off-by: Pavel Golikov <Paullo612@ya.ru>\n---\n drivers/iommu/io-pgtable-arm.c | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c\nindex 94ff319ae8ac..9ac55085e141 100644\n--- a/drivers/iommu/io-pgtable-arm.c\n+++ b/drivers/iommu/io-pgtable-arm.c\n@@ -457,9 +457,10 @@ static arm_lpae_iopte arm_lpae_prot_to_pte(struct arm_lpae_io_pgtable *data,\n \t * \"outside the GPU\" (i.e. either the Inner or System domain in CPU\n \t * terms, depending on coherency).\n \t */\n-\tif (prot & IOMMU_CACHE && data->iop.fmt != ARM_MALI_LPAE)\n+\tif (prot & IOMMU_CACHE ||\n+\t    (data->iop.fmt == ARM_MALI_LPAE && !data->iop.cfg.coherent_walk))\n \t\tpte |= ARM_LPAE_PTE_SH_IS;\n-\telse\n+\telse if (data->iop.fmt == ARM_MALI_LPAE)\n \t\tpte |= ARM_LPAE_PTE_SH_OS;\n \n \tif (prot & IOMMU_NOEXEC)\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Samsung/patches/linux/samsung-0004-WIP-soc-samsung-pm_domains-Bring-back-old-driver-imp.patch",
    "content": "From 77acb18b46a9464521f4f9af26f87d8a5f644515 Mon Sep 17 00:00:00 2001\nFrom: Pavel Golikov <Paullo612@ya.ru>\nDate: Fri, 24 Jun 2022 15:56:41 +0000\nSubject: [PATCH 04/21] WIP: soc: samsung: pm_domains: Bring back old driver\n implementation\n\nUsing new implementation decreases Mali GPU performance significantly\n(with both KBase and Panfrost drivers).\n\nSigned-off-by: Pavel Golikov <Paullo612@ya.ru>\n---\n drivers/soc/samsung/pm_domains.c | 97 ++++++++++++++++----------------\n 1 file changed, 49 insertions(+), 48 deletions(-)\n\ndiff --git a/drivers/soc/samsung/pm_domains.c b/drivers/soc/samsung/pm_domains.c\nindex d07f3c9d6903..1022d40eb700 100644\n--- a/drivers/soc/samsung/pm_domains.c\n+++ b/drivers/soc/samsung/pm_domains.c\n@@ -16,7 +16,7 @@\n #include <linux/delay.h>\n #include <linux/of_address.h>\n #include <linux/of_platform.h>\n-#include <linux/pm_runtime.h>\n+#include <linux/sched.h>\n \n struct exynos_pm_domain_config {\n \t/* Value for LOCAL_PWR_CFG and STATUS fields for each domain */\n@@ -72,15 +72,15 @@ static int exynos_pd_power_off(struct generic_pm_domain *domain)\n \treturn exynos_pd_power(domain, false);\n }\n \n-static const struct exynos_pm_domain_config exynos4210_cfg = {\n+static const struct exynos_pm_domain_config exynos4210_cfg __initconst = {\n \t.local_pwr_cfg\t\t= 0x7,\n };\n \n-static const struct exynos_pm_domain_config exynos5433_cfg = {\n+static const struct exynos_pm_domain_config exynos5433_cfg __initconst = {\n \t.local_pwr_cfg\t\t= 0xf,\n };\n \n-static const struct of_device_id exynos_pm_domain_of_match[] = {\n+static const struct of_device_id exynos_pm_domain_of_match[] __initconst = {\n \t{\n \t\t.compatible = \"samsung,exynos4210-pd\",\n \t\t.data = &exynos4210_cfg,\n@@ -91,7 +91,7 @@ static const struct of_device_id exynos_pm_domain_of_match[] = {\n \t{ },\n };\n \n-static const char *exynos_get_domain_name(struct device_node *node)\n+static __init const char *exynos_get_domain_name(struct device_node *node)\n {\n \tconst char *name;\n \n@@ -100,44 +100,60 @@ static const char *exynos_get_domain_name(struct device_node *node)\n \treturn kstrdup_const(name, GFP_KERNEL);\n }\n \n-static int exynos_pd_probe(struct platform_device *pdev)\n+static __init int exynos4_pm_init_power_domain(void)\n {\n-\tconst struct exynos_pm_domain_config *pm_domain_cfg;\n-\tstruct device *dev = &pdev->dev;\n-\tstruct device_node *np = dev->of_node;\n-\tstruct of_phandle_args child, parent;\n-\tstruct exynos_pm_domain *pd;\n-\tint on, ret;\n+\tstruct device_node *np;\n+\tconst struct of_device_id *match;\n \n-\tpm_domain_cfg = of_device_get_match_data(dev);\n-\tpd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);\n-\tif (!pd)\n-\t\treturn -ENOMEM;\n+\tfor_each_matching_node_and_match(np, exynos_pm_domain_of_match, &match) {\n+\t\tconst struct exynos_pm_domain_config *pm_domain_cfg;\n+\t\tstruct exynos_pm_domain *pd;\n+\t\tint on;\n \n-\tpd->pd.name = exynos_get_domain_name(np);\n-\tif (!pd->pd.name)\n-\t\treturn -ENOMEM;\n+\t\tpm_domain_cfg = match->data;\n \n-\tpd->base = of_iomap(np, 0);\n-\tif (!pd->base) {\n-\t\tkfree_const(pd->pd.name);\n-\t\treturn -ENODEV;\n-\t}\n+\t\tpd = kzalloc(sizeof(*pd), GFP_KERNEL);\n+\t\tif (!pd) {\n+\t\t\tof_node_put(np);\n+\t\t\treturn -ENOMEM;\n+\t\t}\n+\t\tpd->pd.name = exynos_get_domain_name(np);\n+\t\tif (!pd->pd.name) {\n+\t\t\tkfree(pd);\n+\t\t\tof_node_put(np);\n+\t\t\treturn -ENOMEM;\n+\t\t}\n \n-\tpd->pd.power_off = exynos_pd_power_off;\n-\tpd->pd.power_on = exynos_pd_power_on;\n-\tpd->local_pwr_cfg = pm_domain_cfg->local_pwr_cfg;\n+\t\tpd->base = of_iomap(np, 0);\n+\t\tif (!pd->base) {\n+\t\t\tpr_warn(\"%s: failed to map memory\\n\", __func__);\n+\t\t\tkfree_const(pd->pd.name);\n+\t\t\tkfree(pd);\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\tpd->pd.power_off = exynos_pd_power_off;\n+\t\tpd->pd.power_on = exynos_pd_power_on;\n+\t\tpd->local_pwr_cfg = pm_domain_cfg->local_pwr_cfg;\n \n-\ton = readl_relaxed(pd->base + 0x4) & pd->local_pwr_cfg;\n+\t\ton = readl_relaxed(pd->base + 0x4) & pd->local_pwr_cfg;\n+\n+\t\tpm_genpd_init(&pd->pd, NULL, !on);\n+\t\tof_genpd_add_provider_simple(np, &pd->pd);\n+\t}\n \n-\tpm_genpd_init(&pd->pd, NULL, !on);\n-\tret = of_genpd_add_provider_simple(np, &pd->pd);\n+\t/* Assign the child power domains to their parents */\n+\tfor_each_matching_node(np, exynos_pm_domain_of_match) {\n+\t\tstruct of_phandle_args child, parent;\n \n-\tif (ret == 0 && of_parse_phandle_with_args(np, \"power-domains\",\n-\t\t\t\t      \"#power-domain-cells\", 0, &parent) == 0) {\n \t\tchild.np = np;\n \t\tchild.args_count = 0;\n \n+\t\tif (of_parse_phandle_with_args(np, \"power-domains\",\n+\t\t\t\t\t       \"#power-domain-cells\", 0,\n+\t\t\t\t\t       &parent) != 0)\n+\t\t\tcontinue;\n+\n \t\tif (of_genpd_add_subdomain(&parent, &child))\n \t\t\tpr_warn(\"%pOF failed to add subdomain: %pOF\\n\",\n \t\t\t\tparent.np, child.np);\n@@ -146,21 +162,6 @@ static int exynos_pd_probe(struct platform_device *pdev)\n \t\t\t\tparent.np, child.np);\n \t}\n \n-\tpm_runtime_enable(dev);\n-\treturn ret;\n-}\n-\n-static struct platform_driver exynos_pd_driver = {\n-\t.probe\t= exynos_pd_probe,\n-\t.driver\t= {\n-\t\t.name\t\t= \"exynos-pd\",\n-\t\t.of_match_table\t= exynos_pm_domain_of_match,\n-\t\t.suppress_bind_attrs = true,\n-\t}\n-};\n-\n-static __init int exynos4_pm_init_power_domain(void)\n-{\n-\treturn platform_driver_register(&exynos_pd_driver);\n+\treturn 0;\n }\n core_initcall(exynos4_pm_init_power_domain);\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Samsung/patches/linux/samsung-0005-WIP-arm-dts-exynos5422-HC1-XU3-XU4-model-name-is-ODR.patch",
    "content": "From 34cfc53ec99e6e3356bb6e06ecd68faa4d2e4bac Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Wed, 29 Apr 2020 10:37:08 +0000\nSubject: [PATCH 05/21] WIP: arm: dts: exynos5422: HC1/XU3/XU4 model name is\n ODROID not Odroid\n\nCosmetic change to model and audio card name for HC1/XU3/XU4 to\nput ODROID in capitals (as per Hardkernel branding).\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n arch/arm/boot/dts/exynos5422-odroidhc1.dts        | 5 ++---\n arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi | 2 +-\n arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts   | 2 +-\n arch/arm/boot/dts/exynos5422-odroidxu3.dts        | 2 +-\n arch/arm/boot/dts/exynos5422-odroidxu4.dts        | 7 +++----\n 5 files changed, 8 insertions(+), 10 deletions(-)\n\ndiff --git a/arch/arm/boot/dts/exynos5422-odroidhc1.dts b/arch/arm/boot/dts/exynos5422-odroidhc1.dts\nindex d91f7fa2cf80..6550d59ce3d8 100644\n--- a/arch/arm/boot/dts/exynos5422-odroidhc1.dts\n+++ b/arch/arm/boot/dts/exynos5422-odroidhc1.dts\n@@ -11,9 +11,8 @@\n #include \"exynos5422-odroid-core.dtsi\"\n \n / {\n-\tmodel = \"Hardkernel Odroid HC1\";\n-\tcompatible = \"hardkernel,odroid-hc1\", \"samsung,exynos5800\", \\\n-\t\t     \"samsung,exynos5\";\n+\tmodel = \"Hardkernel ODROID HC1\";\n+\tcompatible = \"hardkernel,odroid-hc1\", \"samsung,exynos5800\", \"samsung,exynos5\";\n \n \tled-controller {\n \t\tcompatible = \"pwm-leds\";\ndiff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi\nindex 86b96f9706db..1a3940f2ead2 100644\n--- a/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi\n+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi\n@@ -13,7 +13,7 @@\n / {\n \tsound: sound {\n \t\tcompatible = \"samsung,odroid-xu3-audio\";\n-\t\tmodel = \"Odroid-XU3\";\n+\t\tmodel = \"ODROID-XU3\";\n \n \t\tsamsung,audio-widgets =\n \t\t\t\"Headphone\", \"Headphone Jack\",\ndiff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts b/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts\nindex e3154a1cae23..4d337f9e79b8 100644\n--- a/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts\n+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts\n@@ -14,7 +14,7 @@\n #include \"exynos54xx-odroidxu-leds.dtsi\"\n \n / {\n-\tmodel = \"Hardkernel Odroid XU3 Lite\";\n+\tmodel = \"Hardkernel ODROID XU3 Lite\";\n \tcompatible = \"hardkernel,odroid-xu3-lite\", \"samsung,exynos5800\", \"samsung,exynos5\";\n \n \taliases {\ndiff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts\nindex a378d4937ff7..21cf909b9cc8 100644\n--- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts\n+++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts\n@@ -13,7 +13,7 @@\n #include \"exynos54xx-odroidxu-leds.dtsi\"\n \n / {\n-\tmodel = \"Hardkernel Odroid XU3\";\n+\tmodel = \"Hardkernel ODROID XU3\";\n \tcompatible = \"hardkernel,odroid-xu3\", \"samsung,exynos5800\", \"samsung,exynos5\";\n \n \taliases {\ndiff --git a/arch/arm/boot/dts/exynos5422-odroidxu4.dts b/arch/arm/boot/dts/exynos5422-odroidxu4.dts\nindex 1c24f9b35973..caf4f50e91df 100644\n--- a/arch/arm/boot/dts/exynos5422-odroidxu4.dts\n+++ b/arch/arm/boot/dts/exynos5422-odroidxu4.dts\n@@ -13,9 +13,8 @@\n #include \"exynos5422-odroidxu3-common.dtsi\"\n \n / {\n-\tmodel = \"Hardkernel Odroid XU4\";\n-\tcompatible = \"hardkernel,odroid-xu4\", \"samsung,exynos5800\", \\\n-\t\t     \"samsung,exynos5\";\n+\tmodel = \"Hardkernel ODROID XU4\";\n+\tcompatible = \"hardkernel,odroid-xu4\", \"samsung,exynos5800\", \"samsung,exynos5\";\n \n \tled-controller {\n \t\tcompatible = \"pwm-leds\";\n@@ -31,7 +30,7 @@\n \n \tsound: sound {\n \t\tcompatible = \"samsung,odroid-xu3-audio\";\n-\t\tmodel = \"Odroid-XU4\";\n+\t\tmodel = \"ODROID-XU4\";\n \n \t\tsamsung,audio-routing = \"I2S Playback\", \"Mixer DAI TX\";\n \n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Samsung/patches/linux/samsung-0006-WIP-media-s5p-mfc-Allow-cache-hints-for-queues.patch",
    "content": "From f07c3dc233b36997c3dcd679fa24fb4040a57d4f Mon Sep 17 00:00:00 2001\nFrom: Pavel Golikov <Paullo612@ya.ru>\nDate: Fri, 24 Jun 2022 15:56:05 +0000\nSubject: [PATCH 06/21] WIP: media: s5p-mfc: Allow cache hints for queues\n\nPassing V4L2_MEMORY_FLAG_NON_COHERENT from userspace significantly\nimproves video rendering performance on Exynos 5422 (Odroid XU4).\n\nSigned-off-by: Pavel Golikov <Paullo612@ya.ru>\n---\n drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c\nindex 761341934925..e33863d9ae2d 100644\n--- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c\n+++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c\n@@ -861,6 +861,7 @@ static int s5p_mfc_open(struct file *file)\n \tq->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES;\n \tq->mem_ops = &vb2_dma_contig_memops;\n \tq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;\n+\tq->allow_cache_hints = 1;\n \tret = vb2_queue_init(q);\n \tif (ret) {\n \t\tmfc_err(\"Failed to initialize videobuf2 queue(capture)\\n\");\n@@ -896,6 +897,7 @@ static int s5p_mfc_open(struct file *file)\n \tq->dma_attrs = DMA_ATTR_ALLOC_SINGLE_PAGES;\n \tq->mem_ops = &vb2_dma_contig_memops;\n \tq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;\n+\tq->allow_cache_hints = 1;\n \tret = vb2_queue_init(q);\n \tif (ret) {\n \t\tmfc_err(\"Failed to initialize videobuf2 queue(output)\\n\");\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Samsung/patches/linux/samsung-0007-WIP-media-s5p-mfc-use-EAGAIN-not-EIO-for-MFCINST_ERR.patch",
    "content": "From a31044355812a2e9e0df4edd3a1c503c7c77eee0 Mon Sep 17 00:00:00 2001\nFrom: Christian Hewitt <christianshewitt@gmail.com>\nDate: Tue, 28 Jun 2022 07:34:21 +0000\nSubject: [PATCH 07/21] WIP: media: s5p-mfc: use EAGAIN not EIO for\n MFCINST_ERROR\n\nPatch from https://forum.odroid.com/viewtopic.php?p=319025&sid=1fbdb9d8f7ea0ebee30dc8824f76d308#p319025\n\nSigned-off-by: Christian Hewitt <christianshewitt@gmail.com>\n---\n drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c\nindex 268ffe4da53c..ff5756e446d6 100644\n--- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c\n+++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_dec.c\n@@ -632,7 +632,7 @@ static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf)\n \n \tif (ctx->state == MFCINST_ERROR) {\n \t\tmfc_err(\"Call on QBUF after unrecoverable error\\n\");\n-\t\treturn -EIO;\n+\t\treturn -EAGAIN;\n \t}\n \tif (buf->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)\n \t\treturn vb2_qbuf(&ctx->vq_src, NULL, buf);\n@@ -652,7 +652,7 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *buf)\n \n \tif (ctx->state == MFCINST_ERROR) {\n \t\tmfc_err_limited(\"Call on DQBUF after unrecoverable error\\n\");\n-\t\treturn -EIO;\n+\t\treturn -EAGAIN;\n \t}\n \n \tswitch (buf->type) {\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Samsung/patches/linux/samsung-0008-WIP-ARM-dma-mapping-implement-alloc_noncontiguous.patch",
    "content": "From a3760f539508e81d47b21321aa42a09ce96555d3 Mon Sep 17 00:00:00 2001\nFrom: Pavel Golikov <Paullo612@ya.ru>\nDate: Fri, 24 Jun 2022 15:52:58 +0000\nSubject: [PATCH 08/21] WIP: ARM/dma-mapping: implement ->alloc_noncontiguous\n\nImplement support for allocating a non-contiguous DMA region. The\nimplementation is based on the ma-iommu driver.\n\nSigned-off-by: Pavel Golikov <Paullo612@ya.ru>\n---\n arch/arm/mm/dma-mapping.c | 59 +++++++++++++++++++++++++++++++++++++++\n 1 file changed, 59 insertions(+)\n\ndiff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c\nindex 059cce018570..8f867cb9fe75 100644\n--- a/arch/arm/mm/dma-mapping.c\n+++ b/arch/arm/mm/dma-mapping.c\n@@ -1759,6 +1759,63 @@ static void arm_iommu_unmap_sg(struct device *dev,\n \t}\n }\n \n+static struct sg_table *arm_iommu_alloc_noncontiguous(struct device *dev,\n+\t\tsize_t size, enum dma_data_direction dir, gfp_t gfp,\n+\t\tunsigned long attrs)\n+{\n+\tstruct dma_sgt_handle *sh;\n+\tint count;\n+\n+\tsh = kmalloc(sizeof(*sh), gfp);\n+\tif (!sh)\n+\t\treturn NULL;\n+\n+\tsize = PAGE_ALIGN(size);\n+\tcount = size >> PAGE_SHIFT;\n+\n+\t/*\n+\t * Following is a work-around (a.k.a. hack) to prevent pages\n+\t * with __GFP_COMP being passed to split_page() which cannot\n+\t * handle them.  The real problem is that this flag probably\n+\t * should be 0 on ARM as it is not supported on this\n+\t * platform; see CONFIG_HUGETLBFS.\n+\t */\n+\tgfp &= ~(__GFP_COMP);\n+\n+\tsh->pages = __iommu_alloc_buffer(dev, size, gfp, attrs, false);\n+\tif (!sh->pages)\n+\t\tgoto err_sh;\n+\n+\tif (sg_alloc_table_from_pages(&sh->sgt, sh->pages, count, 0, size,\n+\t    GFP_KERNEL))\n+\t\tgoto err_buffer;\n+\n+\tif (arm_iommu_map_sg(dev, sh->sgt.sgl, sh->sgt.orig_nents, dir, attrs\n+\t    ) < 1)\n+\t\tgoto err_free_sg;\n+\n+\treturn &sh->sgt;\n+\n+err_free_sg:\n+\tsg_free_table(&sh->sgt);\n+err_buffer:\n+\t__iommu_free_buffer(dev, sh->pages, size, attrs);\n+err_sh:\n+\tkfree(sh);\n+\treturn NULL;\n+}\n+\n+static void arm_iommu_free_noncontiguous(struct device *dev, size_t size,\n+\t\t\tstruct sg_table *sgt, enum dma_data_direction dir)\n+{\n+\tstruct dma_sgt_handle *sh = sgt_handle(sgt);\n+\n+\tarm_iommu_unmap_sg(dev, sgt->sgl, sgt->orig_nents, dir, 0);\n+\t__iommu_free_buffer(dev, sh->pages, PAGE_ALIGN(size), 0);\n+\tsg_free_table(&sh->sgt);\n+\tkfree(sh);\n+}\n+\n /**\n  * arm_iommu_sync_sg_for_cpu\n  * @dev: valid struct device pointer\n@@ -1996,6 +2053,8 @@ static const struct dma_map_ops iommu_ops = {\n \n \t.map_page\t\t= arm_iommu_map_page,\n \t.unmap_page\t\t= arm_iommu_unmap_page,\n+\t.alloc_noncontiguous    = arm_iommu_alloc_noncontiguous,\n+\t.free_noncontiguous    = arm_iommu_free_noncontiguous,\n \t.sync_single_for_cpu\t= arm_iommu_sync_single_for_cpu,\n \t.sync_single_for_device\t= arm_iommu_sync_single_for_device,\n \n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Samsung/patches/linux/samsung-0009-MEMEKA-ARM-dma-mapping-increase-DMA-coherent-pool-si.patch",
    "content": "From 3062d6e0008928c46388d6b118d4ae2137d5d0f4 Mon Sep 17 00:00:00 2001\nFrom: memeka <mihailescu2m@gmail.com>\nDate: Mon, 21 Oct 2019 10:58:47 +1030\nSubject: [PATCH 09/21] MEMEKA: ARM: dma-mapping: increase DMA coherent pool\n size to 2M\n\n---\n arch/arm/mm/dma-mapping.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c\nindex 8f867cb9fe75..7493dcf0567a 100644\n--- a/arch/arm/mm/dma-mapping.c\n+++ b/arch/arm/mm/dma-mapping.c\n@@ -315,7 +315,7 @@ static void *__alloc_remap_buffer(struct device *dev, size_t size, gfp_t gfp,\n \t\t\t\t pgprot_t prot, struct page **ret_page,\n \t\t\t\t const void *caller, bool want_vaddr);\n \n-#define DEFAULT_DMA_COHERENT_POOL_SIZE\tSZ_256K\n+#define DEFAULT_DMA_COHERENT_POOL_SIZE\tSZ_2M\n static struct gen_pool *atomic_pool __ro_after_init;\n \n static size_t atomic_pool_size __initdata = DEFAULT_DMA_COHERENT_POOL_SIZE;\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Samsung/patches/linux/samsung-0010-MEMEKA-drm-exynos-mixer-never-blend-the-base-layer.patch",
    "content": "From 16718487d729416d1f6c371c1cb524f817f2d019 Mon Sep 17 00:00:00 2001\nFrom: OtherCrashOverride <OtherCrashOverride@users.noreply.github.com>\nDate: Sun, 9 Apr 2017 17:31:25 +0000\nSubject: [PATCH 10/21] MEMEKA: drm/exynos/mixer: never blend the base layer\n\nOn Exynos there is a solid color plane that is logically below all the other display planes.\nThis causes display artifacts due to alpha. The patch disables blending the base plane with\nthe solid color plane (no alpha).\n\nReviewed-by: memeka <mihailescu2m@gmail.com>\nSigned-off-by: memeka <mihailescu2m@gmail.com>\n---\n drivers/gpu/drm/exynos/exynos_mixer.c | 33 +++++++++++++++------------\n 1 file changed, 18 insertions(+), 15 deletions(-)\n\ndiff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c\nindex e5204be86093..430622e0d8d4 100644\n--- a/drivers/gpu/drm/exynos/exynos_mixer.c\n+++ b/drivers/gpu/drm/exynos/exynos_mixer.c\n@@ -315,23 +315,26 @@ static void mixer_cfg_gfx_blend(struct mixer_context *ctx, unsigned int win,\n \tu32 val;\n \n \tval  = MXR_GRP_CFG_COLOR_KEY_DISABLE; /* no blank key */\n-\tswitch (pixel_alpha) {\n-\tcase DRM_MODE_BLEND_PIXEL_NONE:\n-\t\tbreak;\n-\tcase DRM_MODE_BLEND_COVERAGE:\n-\t\tval |= MXR_GRP_CFG_PIXEL_BLEND_EN;\n-\t\tbreak;\n-\tcase DRM_MODE_BLEND_PREMULTI:\n-\tdefault:\n-\t\tval |= MXR_GRP_CFG_BLEND_PRE_MUL;\n-\t\tval |= MXR_GRP_CFG_PIXEL_BLEND_EN;\n-\t\tbreak;\n-\t}\n+\tif (win) {\n+\t\tswitch (pixel_alpha) {\n+\t\tcase DRM_MODE_BLEND_PIXEL_NONE:\n+\t\t\tbreak;\n+\t\tcase DRM_MODE_BLEND_COVERAGE:\n+\t\t\tval |= MXR_GRP_CFG_PIXEL_BLEND_EN;\n+\t\t\tbreak;\n+\t\tcase DRM_MODE_BLEND_PREMULTI:\n+\t\tdefault:\n+\t\t\tval |= MXR_GRP_CFG_BLEND_PRE_MUL;\n+\t\t\tval |= MXR_GRP_CFG_PIXEL_BLEND_EN;\n+\t\t\tbreak;\n+\t\t}\n \n-\tif (alpha != DRM_BLEND_ALPHA_OPAQUE) {\n-\t\tval |= MXR_GRP_CFG_WIN_BLEND_EN;\n-\t\tval |= win_alpha;\n+\t\tif (alpha != DRM_BLEND_ALPHA_OPAQUE) {\n+\t\t\tval |= MXR_GRP_CFG_WIN_BLEND_EN;\n+\t\t\tval |= win_alpha;\n+\t\t}\n \t}\n+\n \tmixer_reg_writemask(ctx, MXR_GRAPHIC_CFG(win),\n \t\t\t    val, MXR_GRP_CFG_MISC_MASK);\n }\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Samsung/patches/linux/samsung-0011-MEMEKA-media-exynos-gsc-fix-v4l2-SELECTION-api.patch",
    "content": "From 8078cb106c24c415f96c21f0a3e91b8d28741045 Mon Sep 17 00:00:00 2001\nFrom: Marian Mihailescu <mihailescu2m@gmail.com>\nDate: Fri, 24 Jun 2022 17:30:42 +0000\nSubject: [PATCH 11/21] MEMEKA: media: exynos-gsc: fix v4l2 SELECTION api\n\nSigned-off-by: Marian Mihailescu <mihailescu2m@gmail.com>\n---\n drivers/media/platform/samsung/exynos-gsc/gsc-core.h | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/drivers/media/platform/samsung/exynos-gsc/gsc-core.h b/drivers/media/platform/samsung/exynos-gsc/gsc-core.h\nindex e894e85e84a4..95fda27de0a3 100644\n--- a/drivers/media/platform/samsung/exynos-gsc/gsc-core.h\n+++ b/drivers/media/platform/samsung/exynos-gsc/gsc-core.h\n@@ -481,9 +481,9 @@ static inline struct gsc_frame *ctx_get_frame(struct gsc_ctx *ctx,\n {\n \tstruct gsc_frame *frame;\n \n-\tif (V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE == type) {\n+\tif (V4L2_BUF_TYPE_VIDEO_OUTPUT == type || V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE == type) {\n \t\tframe = &ctx->s_frame;\n-\t} else if (V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE == type) {\n+\t} else if (V4L2_BUF_TYPE_VIDEO_CAPTURE == type || V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE == type) {\n \t\tframe = &ctx->d_frame;\n \t} else {\n \t\tpr_err(\"Wrong buffer/video queue type (%d)\", type);\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Samsung/patches/linux/samsung-0012-MEMEKA-media-s5p-mfc-copy-timestamp-and-timecode-in-.patch",
    "content": "From ddff825a6c234556d761c8cb23d6c28c97d85339 Mon Sep 17 00:00:00 2001\nFrom: Marian Mihailescu <mihailescu2m@gmail.com>\nDate: Fri, 24 Jun 2022 17:36:37 +0000\nSubject: [PATCH 12/21] MEMEKA: media: s5p-mfc: copy timestamp and timecode in\n encoder output\n\nSigned-off-by: Marian Mihailescu <mihailescu2m@gmail.com>\n---\n drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\ndiff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c\nindex b65e506665af..d445466046eb 100644\n--- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c\n+++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c\n@@ -1214,6 +1214,7 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)\n {\n \tstruct s5p_mfc_dev *dev = ctx->dev;\n \tstruct s5p_mfc_buf *mb_entry;\n+\tstruct s5p_mfc_buf *dst_buf;\n \tunsigned long enc_y_addr = 0, enc_c_addr = 0;\n \tunsigned long mb_y_addr, mb_c_addr;\n \tint slice_type;\n@@ -1233,8 +1234,12 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)\n \t\t\t\t\t&mb_entry->b->vb2_buf, 0);\n \t\t\tmb_c_addr = vb2_dma_contig_plane_dma_addr(\n \t\t\t\t\t&mb_entry->b->vb2_buf, 1);\n+\t\t\tdst_buf = list_entry(ctx->dst_queue.next,\n+\t\t\t\t\tstruct s5p_mfc_buf, list);\n \t\t\tif ((enc_y_addr == mb_y_addr) &&\n \t\t\t\t\t\t(enc_c_addr == mb_c_addr)) {\n+\t\t\t\tdst_buf->b->timecode = mb_entry->b->timecode;\n+\t\t\t\tdst_buf->b->vb2_buf.timestamp = mb_entry->b->vb2_buf.timestamp;\n \t\t\t\tlist_del(&mb_entry->list);\n \t\t\t\tctx->src_queue_cnt--;\n \t\t\t\tvb2_buffer_done(&mb_entry->b->vb2_buf,\n@@ -1247,8 +1252,12 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)\n \t\t\t\t\t&mb_entry->b->vb2_buf, 0);\n \t\t\tmb_c_addr = vb2_dma_contig_plane_dma_addr(\n \t\t\t\t\t&mb_entry->b->vb2_buf, 1);\n+\t\t\tdst_buf = list_entry(ctx->dst_queue.next,\n+\t\t\t\t\tstruct s5p_mfc_buf, list);\n \t\t\tif ((enc_y_addr == mb_y_addr) &&\n \t\t\t\t\t\t(enc_c_addr == mb_c_addr)) {\n+\t\t\t\tdst_buf->b->timecode = mb_entry->b->timecode;\n+\t\t\t\tdst_buf->b->vb2_buf.timestamp = mb_entry->b->vb2_buf.timestamp;\n \t\t\t\tlist_del(&mb_entry->list);\n \t\t\t\tctx->ref_queue_cnt--;\n \t\t\t\tvb2_buffer_done(&mb_entry->b->vb2_buf,\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Samsung/patches/linux/samsung-0013-MEMEKA-media-s5p-mfc-stop-streaming-before-releasing.patch",
    "content": "From 30b928690575651687ae46f4bdbc946efd9cc0bd Mon Sep 17 00:00:00 2001\nFrom: Marian Mihailescu <mihailescu2m@gmail.com>\nDate: Fri, 24 Jun 2022 17:38:45 +0000\nSubject: [PATCH 13/21] MEMEKA: media: s5p-mfc: stop streaming before releasing\n queues\n\nIf streaming is active when the MFC device is closed, it will generate an IOMMU page-fault.\n\nSigned-off-by: Marian Mihailescu <mihailescu2m@gmail.com>\n---\n drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c\nindex e33863d9ae2d..f9b4b506c04c 100644\n--- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c\n+++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c\n@@ -943,6 +943,11 @@ static int s5p_mfc_release(struct file *file)\n \tmfc_debug_enter();\n \tif (dev)\n \t\tmutex_lock(&dev->mfc_mutex);\n+\n+\t/* stop streaming */\n+\tvb2_streamoff(&ctx->vq_src, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);\n+\tvb2_streamoff(&ctx->vq_dst, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);\n+\n \tvb2_queue_release(&ctx->vq_src);\n \tvb2_queue_release(&ctx->vq_dst);\n \tif (dev) {\n-- \n2.17.1\n\n"
  },
  {
    "path": "projects/Samsung/patches/u-boot/u-boot-0001-add-xu4-defconfig.patch",
    "content": "From 2ef9471bc9bfe516649a7b3c3debd6c95d2290c4 Mon Sep 17 00:00:00 2001\nFrom: chewitt <christianshewitt@gmail.com>\nDate: Mon, 27 Apr 2020 03:02:53 +0000\nSubject: [PATCH] add xu4 defconfig\n\n---\n configs/odroid-xu4_defconfig | 68 ++++++++++++++++++++++++++++++++++++\n 1 file changed, 68 insertions(+)\n create mode 100644 configs/odroid-xu4_defconfig\n\ndiff --git a/configs/odroid-xu4_defconfig b/configs/odroid-xu4_defconfig\nnew file mode 100644\nindex 0000000000..097f03b243\n--- /dev/null\n+++ b/configs/odroid-xu4_defconfig\n@@ -0,0 +1,70 @@\n+CONFIG_ARM=y\n+CONFIG_ARCH_CPU_INIT=y\n+CONFIG_ARCH_EXYNOS=y\n+CONFIG_SYS_TEXT_BASE=0x43E00000\n+CONFIG_ARCH_EXYNOS5=y\n+CONFIG_ENV_SIZE=0x4000\n+CONFIG_ENV_OFFSET=0x310000\n+CONFIG_NR_DRAM_BANKS=8\n+CONFIG_IDENT_STRING=\" for ODROID-XU4\"\n+CONFIG_DISTRO_DEFAULTS=y\n+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set\n+CONFIG_SYS_LOAD_ADDR=0x43e00000\n+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y\n+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x42e00000\n+CONFIG_FIT=y\n+CONFIG_FIT_BEST_MATCH=y\n+CONFIG_SILENT_CONSOLE=y\n+CONFIG_CONSOLE_MUX=y\n+CONFIG_MISC_INIT_R=y\n+CONFIG_BOARD_LATE_INIT=y\n+# CONFIG_DISPLAY_BOARDINFO is not set\n+CONFIG_DISPLAY_BOARDINFO_LATE=y\n+CONFIG_BOARD_TYPES=y\n+CONFIG_SYS_PROMPT=\"ODROID# \"\n+CONFIG_CMD_THOR_DOWNLOAD=y\n+CONFIG_CMD_DFU=y\n+CONFIG_CMD_GPIO=y\n+CONFIG_CMD_I2C=y\n+CONFIG_CMD_MMC=y\n+CONFIG_CMD_USB=y\n+CONFIG_CMD_USB_MASS_STORAGE=y\n+# CONFIG_CMD_SETEXPR is not set\n+CONFIG_CMD_CACHE=y\n+CONFIG_CMD_TIME=y\n+CONFIG_CMD_PMIC=y\n+CONFIG_CMD_REGULATOR=y\n+CONFIG_CMD_EXT4_WRITE=y\n+CONFIG_DEFAULT_DEVICE_TREE=\"exynos5422-odroidxu3\"\n+#CONFIG_ENV_IS_IN_MMC is not set\n+CONFIG_SYS_RELOC_GD_ENV_ADDR=y\n+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y\n+CONFIG_ADC=y\n+CONFIG_ADC_EXYNOS=y\n+CONFIG_DFU_MMC=y\n+CONFIG_SUPPORT_EMMC_BOOT=y\n+CONFIG_MMC_DW=y\n+CONFIG_MTD=y\n+CONFIG_SMC911X=y\n+CONFIG_SMC911X_BASE=0x5000000\n+CONFIG_DM_ETH=y\n+CONFIG_DM_PMIC=y\n+CONFIG_PMIC_S2MPS11=y\n+CONFIG_DM_REGULATOR=y\n+CONFIG_DM_REGULATOR_S2MPS11=y\n+CONFIG_USB=y\n+CONFIG_DM_USB=y\n+CONFIG_USB_XHCI_HCD=y\n+CONFIG_USB_XHCI_DWC3=y\n+CONFIG_USB_EHCI_HCD=y\n+CONFIG_USB_DWC3=y\n+CONFIG_USB_DWC3_PHY_SAMSUNG=y\n+CONFIG_USB_GADGET=y\n+CONFIG_USB_GADGET_MANUFACTURER=\"Samsung\"\n+CONFIG_USB_GADGET_VENDOR_NUM=0x04e8\n+CONFIG_USB_GADGET_PRODUCT_NUM=0x6601\n+CONFIG_USB_GADGET_DOWNLOAD=y\n+CONFIG_USB_FUNCTION_THOR=y\n+CONFIG_USB_HOST_ETHER=y\n+CONFIG_VIDEO_BRIDGE=y\n+CONFIG_ERRNO_STR=y\n-- \n2.17.1\n\n"
  },
  {
    "path": "scripts/autoreconf",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"${1}\"\n\nRECONF_DIR=\"${3}\"\n\nif [ ! -f \"${RECONF_DIR}/configure.in\" \\\n    -a ! -f \"${RECONF_DIR}/configure.ac\" ]; then\n  die \"configure.in or configure.ac not found\"\nfi\n\nif [ ! -f \"${RECONF_DIR}/.autoreconf-done\" ]; then\n  PARENT_PKG=\"${2}\"\n\n  # lock package during autoreconf otherwise it is racy, eg. glib:host/glib:target building concurrently\n  pkg_lock \"${PKG_NAME}\" \"reconf\" \"${PARENT_PKG}\"\n\n  if [ ! -f \"${RECONF_DIR}/.autoreconf-done\" ]; then\n    pkg_lock_status \"ACTIVE\" \"${PKG_NAME}\" \"reconf\"\n\n    touch \"${RECONF_DIR}/NEWS\" \"${RECONF_DIR}/AUTHORS\" \"${RECONF_DIR}/ChangeLog\"\n    mkdir -p \"${RECONF_DIR}/m4\"\n\n    build_msg \"CLR_AUTORECONF\" \"AUTORECONF\" \"${PKG_NAME}\" \"indent\"\n\n    do_autoreconf \"${RECONF_DIR}\"\n    touch \"${RECONF_DIR}/.autoreconf-done\"\n\n    pkg_lock_status \"UNLOCK\" \"${PKG_NAME}\" \"reconf\" \"configured\"\n  else\n    pkg_lock_status \"UNLOCK\" \"${PKG_NAME}\" \"reconf\" \"already configured\"\n  fi\nfi\n"
  },
  {
    "path": "scripts/autoremove",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"${1}\"\n\nif [ -d \"${PKG_BUILD}\" -a \"${PKG_SECTION}\" != \"virtual\" ]; then\n  print_color CLR_AUTOREMOVE \"AUTOREMOVE ${PKG_BUILD}\"\n  echo\n  rm -r \"${PKG_BUILD}\"\nfi\n"
  },
  {
    "path": "scripts/build",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"${1}\"\n\nrecord_timestamp BUILD_BEGIN\n\nif [ -z \"${1}\" ]; then\n  die \"usage: ${0} package_name[:<host|target|init|bootstrap>] [parent_pkg]\"\nfi\n\nif [ \"${1}\" = \"--all\" ]; then\n  if [ -n \"${2}\" ]; then\n    for build_dir in $(ls -1d ${BUILD_ROOT}/${BUILD_BASE}.*); do\n      load_build_config ${build_dir} && ${SCRIPTS}/build \"${2}\"\n    done\n  fi\n  exit 0\nfi\n\nif [ -z \"${PKG_NAME}\" ]; then\n  die \"$(print_color CLR_ERROR \"${1}: no package.mk file found\")\"\nfi\n\nif [ -n \"${PKG_ARCH}\" ]; then\n  listcontains \"${PKG_ARCH}\" \"!${TARGET_ARCH}\" && exit 0\n  listcontains \"${PKG_ARCH}\" \"${TARGET_ARCH}\" || listcontains \"${PKG_ARCH}\" \"any\" || exit 0\nfi\n\nif [ \"${1//:/}\" != \"${1}\" ]; then\n  TARGET=\"${1#*:}\"\nelse\n  TARGET=\nfi\nTARGET=\"${TARGET:-target}\"\nPARENT_PKG=\"${2:-${PKG_NAME}:${TARGET}}\"\n\npkg_lock \"${PKG_NAME}:${TARGET}\" \"build\" \"${PARENT_PKG}\"\n\nmkdir -p ${STAMPS}/${PKG_NAME}\nSTAMP=${STAMPS}/${PKG_NAME}/build_${TARGET}\nif [ -f ${STAMP} ]; then\n  . ${STAMP}\n  PKG_DEEPHASH=$(calculate_stamp)\n\n  if [ \"${PKG_DEEPHASH}\" = \"${STAMP_PKG_DEEPHASH}\" -a \"${BUILD_WITH_DEBUG}\" = \"${STAMP_BUILD_WITH_DEBUG}\" ]; then\n    # stamp matched: already built, do nothing\n    pkg_lock_status \"UNLOCK\" \"${PKG_NAME}:${TARGET}\" \"build\" \"already built\"\n    exit 0\n  fi\n\n  rm -f ${STAMP}\nfi\n\n${SCRIPTS}/unpack \"${PKG_NAME}\" \"${PARENT_PKG}\"\n\n# build dependencies, only when PKG_DEPENDS_? is filled\nunset _pkg_depends\ncase \"${TARGET}\" in\n  \"target\") _pkg_depends=\"${PKG_DEPENDS_TARGET}\";;\n  \"host\") _pkg_depends=\"${PKG_DEPENDS_HOST}\";;\n  \"init\") _pkg_depends=\"${PKG_DEPENDS_INIT}\";;\n  \"bootstrap\") _pkg_depends=\"${PKG_DEPENDS_BOOTSTRAP}\";;\nesac\n\nif is_sequential_build; then\n  for p in ${_pkg_depends}; do\n    ${SCRIPTS}/build \"${p}\" \"${PARENT_PKG}\"\n  done\nfi\n\n# virtual packages are not built as they only contain dependencies, so dont go further here\nif [ \"${PKG_SECTION}\" = \"virtual\" ]; then\n  PKG_DEEPHASH=$(calculate_stamp)\n  for i in PKG_NAME PKG_DEEPHASH BUILD_WITH_DEBUG; do\n    echo \"STAMP_${i}=\\\"${!i}\\\"\" >> ${STAMP}\n  done\n\n  pkg_lock_status \"UNLOCK\" \"${PKG_NAME}:${TARGET}\" \"build\" \"built\"\n  exit 0\nfi\n\n# build this package\nif [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ]; then\n  build_msg \"CLR_BUILD\" \"BUILD\" \"${PKG_NAME} $(print_color \"CLR_TARGET\" \"(${TARGET})\") [DEBUG]\" \"indent\"\nelse\n  build_msg \"CLR_BUILD\" \"BUILD\" \"${PKG_NAME} $(print_color \"CLR_TARGET\" \"(${TARGET})\")\" \"indent\"\nfi\n\n# setup configure scripts\nPKG_CONFIGURE_SCRIPT=\"${PKG_CONFIGURE_SCRIPT:-${PKG_BUILD}/configure}\"\nPKG_CMAKE_SCRIPT=\"${PKG_CMAKE_SCRIPT:-${PKG_BUILD}/CMakeLists.txt}\"\nPKG_MESON_SCRIPT=\"${PKG_MESON_SCRIPT:-${PKG_BUILD}/meson.build}\"\n\n# auto detect toolchain\n_auto_toolchain=\"\"\nif [ -z \"${PKG_TOOLCHAIN}\" -o \"${PKG_TOOLCHAIN}\" = \"auto\" ]; then\n  if [ -f \"${PKG_MESON_SCRIPT}\" ]; then\n    PKG_TOOLCHAIN=\"meson\"\n  elif [ -f \"${PKG_CMAKE_SCRIPT}\" ]; then\n    PKG_TOOLCHAIN=\"cmake\"\n  elif [ -f \"${PKG_CONFIGURE_SCRIPT}\" ]; then\n    PKG_TOOLCHAIN=\"configure\"\n  elif [ -f \"${PKG_BUILD}/Makefile\" ]; then\n    PKG_TOOLCHAIN=\"make\"\n  else\n    die \"Not possible to detect toolchain automatically. Add PKG_TOOLCHAIN= to package.mk\"\n  fi\n  _auto_toolchain=\" (auto-detect)\"\nfi\nif ! listcontains \"meson cmake cmake-make configure ninja make autotools manual\" \"${PKG_TOOLCHAIN}\"; then\n  die \"$(print_color \"CLR_ERROR\" \"ERROR:\") unknown toolchain ${PKG_TOOLCHAIN}\"\nfi\nbuild_msg \"CLR_TOOLCHAIN\" \"TOOLCHAIN\" \"${PKG_TOOLCHAIN}${_auto_toolchain}\"\n\n# check wrong toolchain configuration\ncheck_toolchain_config ${TARGET} ${PKG_TOOLCHAIN}\n\n# multilib support\nif flag_enabled \"lib32\" \"no\"; then\n  use_32_options\nelif flag_enabled \"lib32:${TARGET}\" \"no\"; then\n  use_32_options\nfi\n\n# setup toolchain\nsetup_toolchain ${TARGET} ${PKG_TOOLCHAIN}\n\n# configure install directory\n[ -n \"${PKG_INSTALL}\" ] && INSTALL=\"${PKG_INSTALL}\" || unset INSTALL\n\n# remove previous install files\nif [ -n \"${INSTALL}\" -a -d \"${INSTALL}\" ]; then\n  rm -rf \"${INSTALL}\"\nfi\n\n# configure debug build defaults\nif [ \"${BUILD_WITH_DEBUG}\" = \"yes\" ]; then\n  CMAKE_BUILD_TYPE=\"Debug\"\n  MESON_BUILD_TYPE=\"debug\"\nelse\n  CMAKE_BUILD_TYPE=\"MinSizeRel\"\n  MESON_BUILD_TYPE=\"plain\"\nfi\n\nCMAKE_GENERATOR_NINJA=\"-GNinja \\\n                       -DCMAKE_EXPORT_COMPILE_COMMANDS=ON\"\n\n# configure TARGET build defaults\nTARGET_CONFIGURE_OPTS=\"--host=${TARGET_NAME} \\\n                       --build=${HOST_NAME} \\\n                       --prefix=/usr \\\n                       --bindir=/usr/bin \\\n                       --sbindir=/usr/sbin \\\n                       --sysconfdir=/etc \\\n                       --libdir=/usr/lib \\\n                       --libexecdir=/usr/lib \\\n                       --localstatedir=/var \\\n                       --disable-static \\\n                       --enable-shared\"\n\nTARGET_CMAKE_OPTS=\"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CONF} \\\n                   -DCMAKE_INSTALL_PREFIX=/usr \\\n                   -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}\"\n\nTARGET_MESON_OPTS=\"--prefix=/usr \\\n                   --bindir=/usr/bin \\\n                   --sbindir=/usr/sbin \\\n                   --sysconfdir=/etc \\\n                   --libdir=/usr/lib \\\n                   --libexecdir=/usr/lib \\\n                   --localstatedir=/var \\\n                   --buildtype=${MESON_BUILD_TYPE}\"\nif [ \"${BUILD_WITH_DEBUG}\" != \"yes\" ] && flag_enabled \"strip\" \"yes\"; then\n  TARGET_MESON_OPTS+=\" -Dstrip=true\"\nfi\n\n\n# configure HOST build defaults\nHOST_CONFIGURE_OPTS=\"--host=${HOST_NAME} \\\n                     --build=${HOST_NAME} \\\n                     --prefix=${TOOLCHAIN} \\\n                     --bindir=${TOOLCHAIN}/bin \\\n                     --sbindir=${TOOLCHAIN}/sbin \\\n                     --sysconfdir=${TOOLCHAIN}/etc \\\n                     --libexecdir=${TOOLCHAIN}/lib \\\n                     --localstatedir=${TOOLCHAIN}/var \\\n                     --disable-static \\\n                     --enable-shared\"\n\nHOST_CMAKE_OPTS=\"${CMAKE_GENERATOR} \\\n                 -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CONF} \\\n                 -DCMAKE_INSTALL_PREFIX=${TOOLCHAIN} \\\n                 -DCMAKE_BUILD_TYPE=Release\"\n\nHOST_MESON_OPTS=\"--prefix=${TOOLCHAIN} \\\n                 --bindir=${TOOLCHAIN}/bin \\\n                 --sbindir=${TOOLCHAIN}/sbin \\\n                 --sysconfdir=${TOOLCHAIN}/etc \\\n                 --libdir=${TOOLCHAIN}/lib \\\n                 --libexecdir=${TOOLCHAIN}/lib \\\n                 --localstatedir=${TOOLCHAIN}/var \\\n                 --buildtype=plain\"\n\n# configure INIT build defaults\nINIT_CONFIGURE_OPTS=\"${TARGET_CONFIGURE_OPTS}\"\nINIT_CMAKE_OPTS=\"${TARGET_CMAKE_OPTS}\"\nINIT_MESON_OPTS=\"${TARGET_MESON_OPTS}\"\n\n# configure BOOTSTRAP build defaults\nBOOTSTRAP_CONFIGURE_OPTS=\"${HOST_CONFIGURE_OPTS}\"\nBOOTSTRAP_CMAKE_OPTS=\"${HOST_CMAKE_OPTS}\"\nBOOTSTRAP_MESON_OPTS=\"${HOST_MESON_OPTS}\"\n\nrecord_timestamp BUILD_START\n\n# make autoreconf\nif [ \"${PKG_TOOLCHAIN}\" = \"autotools\" ]; then\n  ${SCRIPTS}/autoreconf \"${PKG_NAME}\" \"${PARENT_PKG}\" $(dirname \"${PKG_CONFIGURE_SCRIPT}\")\nfi\n\npkg_lock_status \"ACTIVE\" \"${PKG_NAME}:${TARGET}\" \"build\"\n\n# include build template and build\npkg_call_exists_opt pre_build_${TARGET} && pkg_call\n\n# ensure ${PKG_BUILD} is there. (installer? PKG_URL=\"\")\nmkdir -p \"${PKG_BUILD}\"\n\ncd \"${PKG_BUILD}\"\n\nif [ -f \"${PKG_CONFIGURE_SCRIPT}\" -o -f \"${PKG_CMAKE_SCRIPT}\" -o -f \"${PKG_MESON_SCRIPT}\" ]; then\n  case \"${TARGET}\" in\n    \"target\")    PKG_REAL_BUILD=\"${PKG_BUILD}/.${TARGET_NAME}\" ;;\n    \"host\")      PKG_REAL_BUILD=\"${PKG_BUILD}/.${HOST_NAME}\" ;;\n    \"init\")      PKG_REAL_BUILD=\"${PKG_BUILD}/.${TARGET_NAME}-${TARGET}\" ;;\n    \"bootstrap\") PKG_REAL_BUILD=\"${PKG_BUILD}/.${HOST_NAME}-${TARGET}\" ;;\n  esac\n  mkdir -p \"${PKG_REAL_BUILD}\"\n  cd \"${PKG_REAL_BUILD}\"\n\n  MESON_CONF=\"${PKG_REAL_BUILD}/meson.conf\"\nfi\n\n# create wrapper scripts in build dir and use them for CC/CXX when\n# building for host and local-cc build flag is set\nif [ \"${TARGET}\" = \"host\" ] && flag_enabled \"local-cc\" \"no\"; then\n  cat > libreelec-local-cc << EOF\n#!/bin/sh\nexec ${CC} \"\\$@\"\nEOF\n  chmod +x libreelec-local-cc\n  export CC=$(pwd)/libreelec-local-cc\n  cat > libreelec-local-cxx << EOF\n#!/bin/sh\nexec ${CXX} \"\\$@\"\nEOF\n  chmod +x libreelec-local-cxx\n  export CXX=$(pwd)/libreelec-local-cxx\nfi\n\n# configure\nif [ -n \"${PKG_DEPENDS_CONFIG}\" -a -n \"${PKG_INSTALL}\" ]; then\n  for pkg in ${PKG_DEPENDS_CONFIG}; do\n    for dir in \"$(get_install_dir ${pkg})\"/{usr/local/,usr/,}{lib/,share/}pkgconfig; do\n      if [ -d \"${dir}\" ]; then\n        build_msg \"CLR_TOOLCHAIN\" \"PKG_CONFIG_PATH\" \"${dir}\"\n        [ -n \"${PKG_CONFIG_PATH}\" ] && PKG_CONFIG_PATH+=\":\"\n        PKG_CONFIG_PATH+=\"${dir}\"\n      fi\n    done\n  done\n\n  export PKG_CONFIG_PATH\nfi\n\nrecord_timestamp BUILD_CONFIGURE\n\npkg_call_exists_opt pre_configure && pkg_call\npkg_call_exists_opt pre_configure_${TARGET} && pkg_call\n\nif pkg_call_exists configure_${TARGET}; then\n  pkg_call\nelse\n  case \"${PKG_TOOLCHAIN}:${TARGET}\" in\n    # meson builds\n    \"meson:target\")\n      create_meson_conf_target ${TARGET} ${MESON_CONF}\n      echo \"Executing (target): meson setup ${TARGET_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_TARGET} ${PKG_MESON_SCRIPT%/*}\" | tr -s \" \"\n      CC=\"${HOST_CC}\" CXX=\"${HOST_CXX}\" meson setup ${TARGET_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_TARGET} ${PKG_MESON_SCRIPT%/*}\n      ;;\n    \"meson:host\")\n      create_meson_conf_host ${TARGET} ${MESON_CONF}\n      echo \"Executing (host): meson setup ${HOST_MESON_OPTS} --native-file=${MESON_CONF} ${PKG_MESON_OPTS_HOST} ${PKG_MESON_SCRIPT%/*}\" | tr -s \" \"\n      meson setup ${HOST_MESON_OPTS} --native-file=${MESON_CONF} ${PKG_MESON_OPTS_HOST} ${PKG_MESON_SCRIPT%/*}\n      ;;\n    \"meson:init\")\n      create_meson_conf_target ${TARGET} ${MESON_CONF}\n      echo \"Executing (init): meson setup ${INIT_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_INIT} ${PKG_MESON_SCRIPT%/*}\" | tr -s \" \"\n      meson setup ${INIT_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_INIT} ${PKG_MESON_SCRIPT%/*}\n      ;;\n    \"meson:bootstrap\")\n      create_meson_conf_host ${TARGET} ${MESON_CONF}\n      echo \"Executing (bootstrap): meson setup ${BOOTSTRAP_MESON_OPTS} ----native-file=${MESON_CONF} ${PKG_MESON_OPTS_BOOTSTRAP} ${PKG_MESON_SCRIPT%/*}\" | tr -s \" \"\n      meson setup ${BOOTSTRAP_MESON_OPTS} --native-file=${MESON_CONF} ${PKG_MESON_OPTS_BOOTSTRAP} ${PKG_MESON_SCRIPT%/*}\n      ;;\n\n    # cmake builds with ninja\n    \"cmake:target\")\n      echo \"Executing (target): cmake ${CMAKE_GENERATOR_NINJA} ${TARGET_CMAKE_OPTS} ${PKG_CMAKE_OPTS_TARGET} ${PKG_CMAKE_SCRIPT%/*}\" | tr -s \" \"\n      cmake ${CMAKE_GENERATOR_NINJA} ${TARGET_CMAKE_OPTS} ${PKG_CMAKE_OPTS_TARGET} ${PKG_CMAKE_SCRIPT%/*}\n      ;;\n    \"cmake:host\")\n      echo \"Executing (host): cmake ${CMAKE_GENERATOR_NINJA} ${HOST_CMAKE_OPTS} ${PKG_CMAKE_OPTS_HOST} ${PKG_CMAKE_SCRIPT%/*}\" | tr -s \" \"\n      cmake ${CMAKE_GENERATOR_NINJA} ${HOST_CMAKE_OPTS} ${PKG_CMAKE_OPTS_HOST} ${PKG_CMAKE_SCRIPT%/*}\n      ;;\n    \"cmake:init\")\n      echo \"Executing (init): cmake ${CMAKE_GENERATOR_NINJA} ${INIT_CMAKE_OPTS} ${PKG_CMAKE_OPTS_INIT} ${PKG_CMAKE_SCRIPT%/*}\" | tr -s \" \"\n      cmake ${CMAKE_GENERATOR_NINJA} ${INIT_CMAKE_OPTS} ${PKG_CMAKE_OPTS_INIT} ${PKG_CMAKE_SCRIPT%/*}\n      ;;\n    \"cmake:bootstrap\")\n      echo \"Executing (bootstrap): cmake ${CMAKE_GENERATOR_NINJA} ${BOOTSTRAP_CMAKE_OPTS} ${PKG_CMAKE_OPTS_BOOTSTRAP} ${PKG_CMAKE_SCRIPT%/*}\" | tr -s \" \"\n      cmake ${CMAKE_GENERATOR_NINJA} ${BOOTSTRAP_CMAKE_OPTS} ${PKG_CMAKE_OPTS_BOOTSTRAP} ${PKG_CMAKE_SCRIPT%/*}\n      ;;\n\n    # cmake builds with make\n    \"cmake-make:target\")\n      echo \"Executing (target): cmake ${TARGET_CMAKE_OPTS} ${PKG_CMAKE_OPTS_TARGET} ${PKG_CMAKE_SCRIPT%/*}\" | tr -s \" \"\n      cmake ${TARGET_CMAKE_OPTS} ${PKG_CMAKE_OPTS_TARGET} ${PKG_CMAKE_SCRIPT%/*}\n      ;;\n    \"cmake-make:host\")\n      echo \"Executing (host): cmake ${HOST_CMAKE_OPTS} ${PKG_CMAKE_OPTS_HOST} ${PKG_CMAKE_SCRIPT%/*}\" | tr -s \" \"\n      cmake ${HOST_CMAKE_OPTS} ${PKG_CMAKE_OPTS_HOST} ${PKG_CMAKE_SCRIPT%/*}\n      ;;\n    \"cmake-make:init\")\n      echo \"Executing (init): cmake ${INIT_CMAKE_OPTS} ${PKG_CMAKE_OPTS_INIT} ${PKG_CMAKE_SCRIPT%/*}\" | tr -s \" \"\n      cmake ${INIT_CMAKE_OPTS} ${PKG_CMAKE_OPTS_INIT} ${PKG_CMAKE_SCRIPT%/*}\n      ;;\n    \"cmake-make:bootstrap\")\n      echo \"Executing (bootstrap): cmake ${BOOTSTRAP_CMAKE_OPTS} ${PKG_CMAKE_OPTS_BOOTSTRAP} ${PKG_CMAKE_SCRIPT%/*}\" | tr -s \" \"\n      cmake ${BOOTSTRAP_CMAKE_OPTS} ${PKG_CMAKE_OPTS_BOOTSTRAP} ${PKG_CMAKE_SCRIPT%/*}\n      ;;\n\n    # configure builds\n    \"configure:target\"|\"autotools:target\")\n      echo \"Executing (target): ${PKG_CONFIGURE_SCRIPT} ${TARGET_CONFIGURE_OPTS} ${PKG_CONFIGURE_OPTS_TARGET}\" | tr -s \" \"\n      ${PKG_CONFIGURE_SCRIPT} ${TARGET_CONFIGURE_OPTS} ${PKG_CONFIGURE_OPTS_TARGET}\n      ;;\n    \"configure:host\"|\"autotools:host\")\n      echo \"Executing (host): ${PKG_CONFIGURE_SCRIPT} ${HOST_CONFIGURE_OPTS} ${PKG_CONFIGURE_OPTS_HOST}\" | tr -s \" \"\n      ${PKG_CONFIGURE_SCRIPT} ${HOST_CONFIGURE_OPTS} ${PKG_CONFIGURE_OPTS_HOST}\n      ;;\n    \"configure:init\"|\"autotools:init\")\n      echo \"Executing (init): ${PKG_CONFIGURE_SCRIPT} ${INIT_CONFIGURE_OPTS} ${PKG_CONFIGURE_OPTS_INIT}\" | tr -s \" \"\n      ${PKG_CONFIGURE_SCRIPT} ${INIT_CONFIGURE_OPTS} ${PKG_CONFIGURE_OPTS_INIT}\n      ;;\n    \"configure:bootstrap\"|\"autotools:bootstrap\")\n      echo \"Executing (bootstrap): ${PKG_CONFIGURE_SCRIPT} ${BOOTSTRAP_CONFIGURE_OPTS} ${PKG_CONFIGURE_OPTS_BOOTSTRAP}\" | tr -s \" \"\n      ${PKG_CONFIGURE_SCRIPT} ${BOOTSTRAP_CONFIGURE_OPTS} ${PKG_CONFIGURE_OPTS_BOOTSTRAP}\n      ;;\n  esac\nfi\n\npkg_call_exists_opt post_configure_${TARGET} && pkg_call\n\nrecord_timestamp BUILD_MAKE\n\n# make\npkg_call_exists_opt pre_make_${TARGET} && pkg_call\n\nif pkg_call_exists make_${TARGET}; then\n  pkg_call\nelse\n  case \"${PKG_TOOLCHAIN}:${TARGET}\" in\n    # ninja based builds\n    \"meson:target\"|\"cmake:target\"|\"ninja:target\")\n      echo \"Executing (target): ninja ${PKG_MAKE_OPTS_TARGET}\" | tr -s \" \"\n      ninja ${NINJA_OPTS} ${PKG_MAKE_OPTS_TARGET}\n      ;;\n    \"meson:host\"|\"cmake:host\"|\"ninja:host\")\n      echo \"Executing (host): ninja ${PKG_MAKE_OPTS_HOST}\" | tr -s \" \"\n      ninja ${NINJA_OPTS} ${PKG_MAKE_OPTS_HOST}\n      ;;\n    \"meson:init\"|\"cmake:init\"|\"ninja:init\")\n      echo \"Executing (init): ninja ${PKG_MAKE_OPTS_INIT}\" | tr -s \" \"\n      ninja ${NINJA_OPTS} ${PKG_MAKE_OPTS_INIT}\n      ;;\n    \"meson:bootstrap\"|\"cmake:bootstrap\"|\"ninja:bootstrap\")\n      echo \"Executing (bootstrap): ninja ${PKG_MAKE_OPTS_BOOTSTRAP}\" | tr -s \" \"\n      ninja ${NINJA_OPTS} ${PKG_MAKE_OPTS_BOOTSTRAP}\n      ;;\n\n    # make based builds\n    \"configure:target\"|\"cmake-make:target\"|\"autotools:target\"|\"make:target\")\n      echo \"Executing (target): make ${PKG_MAKE_OPTS_TARGET}\" | tr -s \" \"\n      make ${PKG_MAKE_OPTS_TARGET}\n      ;;\n    \"configure:host\"|\"cmake-make:host\"|\"autotools:host\"|\"make:host\")\n      echo \"Executing (host): make ${PKG_MAKE_OPTS_HOST}\" | tr -s \" \"\n      make ${PKG_MAKE_OPTS_HOST}\n      ;;\n    \"configure:init\"|\"cmake-make:init\"|\"autotools:init\"|\"make:init\")\n      echo \"Executing (init): make ${PKG_MAKE_OPTS_INIT}\" | tr -s \" \"\n      make ${PKG_MAKE_OPTS_INIT}\n      ;;\n    \"configure:bootstrap\"|\"cmake-make:bootstrap\"|\"autotools:bootstrap\"|\"make:bootstrap\")\n      echo \"Executing (bootstrap): make ${PKG_MAKE_OPTS_BOOTSTRAP}\" | tr -s \" \"\n      make ${PKG_MAKE_OPTS_BOOTSTRAP}\n      ;;\n  esac\nfi\n\npkg_call_exists_opt post_make_${TARGET} && pkg_call\n\n# Hack around directly writing/modifying the content of a shared sysroot\n# by temporarily installing new files to a package specific sysroot\nexport PKG_ORIG_SYSROOT_PREFIX=\"${SYSROOT_PREFIX}\"\nexport SYSROOT_PREFIX=\"${BUILD}/.sysroot/${PKG_NAME}.${TARGET}\"\nrm -rf \"${SYSROOT_PREFIX}\"\n\n# Create common sysroot directories as some packages expect them to exist.\n# TODO: Fix those packages so we don't need to pre-create directories.\nfor d in /usr/lib /usr/include /usr/bin /usr/lib/pkgconfig; do\n  mkdir -p \"${SYSROOT_PREFIX}${d}\"\ndone\n\nrecord_timestamp BUILD_MAKEINSTALL\n\n# make install\npkg_call_exists_opt pre_makeinstall_${TARGET} && pkg_call\n\nif pkg_call_exists makeinstall_${TARGET}; then\n  pkg_call\nelse\n  flag_enabled \"sysroot\" \"yes\" && INSTALL_TO_SYSROOT=\"yes\" || INSTALL_TO_SYSROOT=\"no\"\n\n  case \"${PKG_TOOLCHAIN}:${TARGET}\" in\n    # ninja based builds\n    \"meson:target\"|\"cmake:target\")\n      [ \"${INSTALL_TO_SYSROOT}\" = \"yes\" ] && \\\n        DESTDIR=${SYSROOT_PREFIX} ninja install ${PKG_MAKEINSTALL_OPTS_TARGET}\n      DESTDIR=${INSTALL} ninja install ${PKG_MAKEINSTALL_OPTS_TARGET}\n      ;;\n    \"meson:host\"|\"cmake:host\")\n      ninja install ${PKG_MAKEINSTALL_OPTS_HOST}\n      ;;\n    \"meson:init\"|\"cmake:init\")\n      DESTDIR=${INSTALL} ninja install ${PKG_MAKEINSTALL_OPTS_INIT}\n      ;;\n    \"meson:bootstrap\"|\"cmake:bootstrap\")\n      ninja install ${PKG_MAKEINSTALL_OPTS_BOOTSTRAP}\n      ;;\n\n    # make based builds\n    \"configure:target\"|\"cmake-make:target\"|\"autotools:target\"|\"make:target\")\n      [ \"${INSTALL_TO_SYSROOT}\" = \"yes\" ] && \\\n        make install DESTDIR=${SYSROOT_PREFIX} -j1 ${PKG_MAKEINSTALL_OPTS_TARGET}\n      make install DESTDIR=${INSTALL} ${PKG_MAKEINSTALL_OPTS_TARGET}\n      ;;\n    \"configure:host\"|\"cmake-make:host\"|\"autotools:host\"|\"make:host\")\n      make install ${PKG_MAKEINSTALL_OPTS_HOST}\n      ;;\n    \"configure:init\"|\"cmake-make:init\"|\"autotools:init\"|\"make:init\")\n      make install DESTDIR=${INSTALL} ${PKG_MAKEINSTALL_OPTS_INIT}\n      ;;\n    \"configure:bootstrap\"|\"cmake-make:bootstrap\"|\"autotools:bootstrap\"|\"make:bootstrap\")\n      make install ${PKG_MAKEINSTALL_OPTS_BOOTSTRAP}\n      ;;\n  esac\nfi\n\npkg_call_exists_opt post_makeinstall_${TARGET} && pkg_call\n\nrecord_timestamp BUILD_COPY_SYSROOT\n\n# Fixup temporary sysroot references to the shared sysroot\nfor i in $(find \"${SYSROOT_PREFIX}/usr/lib\" -type f -name \"*.la\" 2>/dev/null); do\n  sed -e \"s:\\(['= ]\\)/usr:\\\\1${PKG_ORIG_SYSROOT_PREFIX}/usr:g\" -i \"${i}\"\ndone\nfor i in $(find \"${SYSROOT_PREFIX}/usr/bin\" -type f -name \"*-config\" 2>/dev/null); do\n  sed -e \"s#${SYSROOT_PREFIX}/usr#${PKG_ORIG_SYSROOT_PREFIX}/usr#g\" -i \"${i}\"\ndone\nfor i in $(find \"${SYSROOT_PREFIX}/usr/lib\" -type f -name \"*.pc\" 2>/dev/null); do\n  sed -e \"s#${SYSROOT_PREFIX}/usr#${PKG_ORIG_SYSROOT_PREFIX}/usr#g\" -i \"${i}\"\ndone\nfor i in $(find \"${SYSROOT_PREFIX}/usr\"/{lib,share} -type f -name \"*.cmake\" 2>/dev/null); do\n  sed -e \"s#${SYSROOT_PREFIX}/usr#${PKG_ORIG_SYSROOT_PREFIX}/usr#g\" -i \"${i}\"\ndone\nfor i in $(find \"${SYSROOT_PREFIX}\" -type l 2>/dev/null); do\n  _tmp=\"$(readlink -m \"${i}\")\"\n  [[ ${_tmp} =~ ^/usr ]] && _tmp=\"${SYSROOT_PREFIX}${_tmp}\"\n  if [[ ${_tmp} =~ ^${SYSROOT_PREFIX}/ ]]; then\n    ln -sfn \"${_tmp/${SYSROOT_PREFIX}\\//${PKG_ORIG_SYSROOT_PREFIX}\\/}\" \"${i}\"\n  fi\ndone\n\n# Transfer the new sysroot content to the shared sysroot\nacquire_update_lock sysroot\n\nmkdir -p \"${PKG_ORIG_SYSROOT_PREFIX}\"\ncp -PRf \"${SYSROOT_PREFIX}\"/* \"${PKG_ORIG_SYSROOT_PREFIX}\"\n\nrelease_update_lock\n\nrm -rf \"${SYSROOT_PREFIX}\"\n\nexport SYSROOT_PREFIX=\"${PKG_ORIG_SYSROOT_PREFIX}\"\n\nrecord_timestamp BUILD_CLEANUP_INSTALL\n\nif [ \"${TARGET}\" = \"target\" -o \"${TARGET}\" = \"init\" ]; then\n  if [ -d ${INSTALL} ]; then\n    rm -rf ${INSTALL}/{usr/local/,usr/,}man\n    rm -rf ${INSTALL}/{usr/local/,usr/,}share/bash-completion\n    rm -rf ${INSTALL}/{usr/local/,usr/,}share/doc\n    rm -rf ${INSTALL}/{usr/local/,usr/,}share/gtk-doc\n    rm -rf ${INSTALL}/{usr/local/,usr/,}share/info\n    rm -rf ${INSTALL}/{usr/local/,usr/,}share/locale\n    rm -rf ${INSTALL}/{usr/local/,usr/,}share/man\n    rm -rf ${INSTALL}/{usr/local/,usr/,}share/zsh\n    rm -rf ${INSTALL}/{usr/local/,usr/,}var\n    find ${INSTALL} \\( -name \"*.orig\" \\\n                  -o -name \"*.rej\" \\\n                  -o -name \"*.in\" \\\n                  -o -name \".git*\" \\) \\\n        -exec rm -f {} \\; 2>/dev/null || :\n    find ${INSTALL} -type d -exec rmdir -p {} \\; 2>/dev/null || :\n\n    python_fix_abi \"${INSTALL}\"\n\n    if [ \"${BUILD_WITH_DEBUG}\" != \"yes\" ] && flag_enabled \"strip\" \"yes\"; then\n      ${STRIP} $(find ${INSTALL} \\\n        -type f -name \"*.so*\" \\\n        ! -name \"ld-*.so\" \\\n        ! -name \"libc-*.so\" \\\n        ! -name \"libpthread-*.so\" \\\n        ! -name \"libthread_db-*so\" \\\n        2>/dev/null) 2>/dev/null || :\n        if [ \"${TARGET}\" = \"init\" ]; then\n          ${STRIP} $(find ${INSTALL} -type f -name \"*.so*\" 2>/dev/null) 2>/dev/null || :\n        fi\n        ${STRIP} $(find ${INSTALL} ! -name \"*.so*\" ! -name \"*.ko\" \\\n          -type f -executable 2>/dev/null) 2>/dev/null || :\n    fi\n  fi\nfi\n\nif [ -n \"${INSTALL}\" -a -d \"${INSTALL}\" ]; then\n  echo \"INFO_PKG_NAME=\\\"${PKG_NAME}\\\"\" > \"${INSTALL}/.libreelec-package\"\nfi\n\ncd ${ROOT}\n\nPKG_DEEPHASH=$(calculate_stamp)\nfor i in PKG_NAME PKG_DEEPHASH BUILD_WITH_DEBUG; do\n  echo \"STAMP_${i}=\\\"${!i}\\\"\" >> ${STAMP}\ndone\n\npkg_lock_status \"UNLOCK\" \"${PKG_NAME}:${TARGET}\" \"build\" \"built\"\n\nrecord_timestamp BUILD_END\n\nif [ -n \"${TRACE_BUILD_TIMING}\" ]; then\n  (\n    print_color \"CLR_AUTOREMOVE\" \"\\nBuild timing details:\"\n    print_color \"CLR_TARGET\" \"\\n================================\\n\"  \n    show_timestamp_diff \"unpack\" BUILD_BEGIN BUILD_START\n    show_timestamp_diff \"pre-build setup\" BUILD_START BUILD_CONFIGURE\n    show_timestamp_diff \"configure\" BUILD_CONFIGURE BUILD_MAKE\n    show_timestamp_diff \"make\" BUILD_MAKE BUILD_MAKEINSTALL\n    show_timestamp_diff \"make install\" BUILD_MAKEINSTALL BUILD_COPY_SYSROOT\n    show_timestamp_diff \"copy sysroot\" BUILD_COPY_SYSROOT BUILD_CLEANUP_INSTALL\n    show_timestamp_diff \"cleanup install\" BUILD_CLEANUP_INSTALL BUILD_END\n    print_color \"CLR_TARGET\" \"--------------------------------\\n\"  \n    show_timestamp_diff \"total time\" BUILD_BEGIN BUILD_END\n    echo -e\n  ) >&${VERBOSE_OUT}\nfi\n"
  },
  {
    "path": "scripts/build_mt",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"\"\n. config/multithread\n\n${SCRIPTS}/checkdeps\n\n# Setup both toolchain cmake configs to avoid potentially racy behaviour later.\n# Use a fork for host to isolate any variable modifications.\n( setup_toolchain host )\nsetup_toolchain target\n\nMTADDONBUILD=no start_multithread_build ${@}\n"
  },
  {
    "path": "scripts/ccache_stats",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"\"\n\n${TOOLCHAIN}/bin/ccache -s\n"
  },
  {
    "path": "scripts/checkdeps",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nset -e\n\n# set up variables\ndeclare -A dep_map file_map perl_map need_map\nDEBUG=\"false\"\n\nget_deps() {\n  # start from a blank slate\n  need_map=()\n\n  for key in \"${!dep_map[@]}\"; do\n    if ! command -v \"${key}\" >/dev/null; then\n      need_map[\"${key}\"]=\"${dep_map[${key}]}\"\n    fi\n  done\n\n  for key in \"${!file_map[@]}\"; do\n    if [ ! -f \"${key}\" ]; then\n      need_map[\"${key}\"]=\"${file_map[${key}]}\"\n    fi\n  done\n\n  for key in \"${!perl_map[@]}\"; do\n    if ! perl -M\"${key}\" -e exit 2>/dev/null; then\n      need_map[\"perl::${key}\"]=\"${perl_map[${key}]}\"\n    fi\n  done\n}\n\nget_yes_no()\n{\n  local ans\n  read -p \"Would you like to install the needed tools? (y/n)\" ans\n  [ \"${ans,,}\" = \"y\" ] && return 0\n  [ \"${ans,,}\" = \"yes\" ] && return 0\n  return 1\n}\n\n\nif  [ -f /etc/lsb-release ]; then\n  DISTRO=$(grep DISTRIB_ID /etc/lsb-release | cut -d \"=\" -f 2)\nfi\n\nif  [ -f /etc/os-release ]; then\n  DISTRO=$(grep ^ID= /etc/os-release | cut -d \"=\" -f 2)\nfi\n\nDISTRO=${DISTRO,,}\n\n# [program]=package\ndep_map=(\n  [bash]=bash\n  [bc]=bc\n  [bzip2]=bzip2\n  [diff]=diffutils\n  [gawk]=gawk\n  [gcc]=gcc\n  [gperf]=gperf\n  [gzip]=gzip\n  [file]=file\n  [lsdiff]=patchutils\n  [lzop]=lzop\n  [make]=make\n  [patch]=patch\n  [perl]=perl\n  [sed]=sed\n  [tar]=tar\n  [unzip]=unzip\n  [wget]=wget\n  [xz]=xz-utils\n  [zip]=zip\n  [zstd]=zstd\n)\n\n# [file]=package\nfile_map=(\n  [/usr/include/ncurses.h]=libncurses5-dev\n  [/usr/include/stdio.h]=libc6-dev\n)\n\n# [module]=package\nperl_map=(\n  [JSON]=libjson-perl\n  [Parse::Yapp::Driver]=libparse-yapp-perl\n  [Thread::Queue]=perl\n  [XML::Parser]=libxml-parser-perl\n)\n\n### PROJECT SPECIFIC REQUIREMENTS ###\n# Extend build scripts to look for distro/project/device checkdep scripts before adding further checks here\n# Native aarch64 on debian host needs to support rkbin (Rockchip) and aml_encrypt_* (Amlogic)\nif [ \"$(uname -m)\" = \"aarch64\" ] && [ \"${PROJECT}\" = \"Rockchip\" -o \"${PROJECT}\" = \"Amlogic\" ]; then\n  dep_map[qemu-x86_64]=qemu-user-binfmt\n  if [ ! -f /lib64/ld-linux-x86-64.so.2 -o ! -f /lib/x86_64-linux-gnu/libc.so.6 ]; then\n    echo -e \"Copy from a working x86_64 system:\\n\\t/lib64/ld-linux-x86-64.so.2\\n\\t/lib/x86_64-linux-gnu/libc.so.6\"\n  fi\n  file_map[/lib64/ld-linux-x86-64.so.2]=\"libc6:amd64\"\n  file_map[/lib/x86_64-linux-gnu/libc.so.6]=\"libc6:amd64\"\nfi\n\nif [ \"$(uname -m)\" = \"aarch64\" -a \"${PROJECT}\" = \"Amlogic-ce\" ]; then\n  dep_map[qemu-x86_64]=qemu-user-binfmt\nfi\n\n# remap or add [depend]=package needs based on host distro\ncase \"${DISTRO}\" in\n    fedora|centos|rhel)\n      dep_map+=(\n        [g++]=gcc-c++\n        [mkfontscale]=xorg-x11-font-utils\n        [mkfontdir]=xorg-x11-font-utils\n        [xsltproc]=libxslt\n        [java]=java-1.8.0-openjdk\n        [python3]=python3\n        [rpcgen]=rpcgen\n      )\n      if [ \"${DISTRO}\" = \"fedora\" ]; then\n        dep_map+=(\n          [bdftopcf]=bdftopcf\n        )\n      else\n        dep_map+=(\n          [bdftopcf]=xorg-x11-font-utils\n        )\n      fi\n      if [[ ! $(rpm -qa glibc-static) ]]; then\n        dep_map+=(\n          [glibc-static]=glibc-static\n        )\n      fi\n      if [[ ! $(rpm -qa libstdc++-static) ]]; then\n        dep_map+=(\n          [libstdc++-static]=libstdc++-static\n        )\n      fi\n      file_map+=(\n        [/usr/include/ncurses.h]=ncurses-devel\n        [/usr/include/stdio.h]=glibc-headers\n      )\n      perl_map+=(\n        [JSON]=perl-JSON\n        [Parse::Yapp::Driver]=perl-Parse-Yapp\n        [Thread::Queue]=perl-Thread-Queue\n        [XML::Parser]=perl-XML-Parser\n        [FindBin]=perl-FindBin\n        [File::Compare]=perl-File-Compare\n        [File::Copy]=perl-File-Copy\n      )\n      ;;\n    gentoo|sabayon)\n      dep_map+=(\n        [g++]=\"gcc[cxx]\"\n        [mkfontscale]=mkfontscale\n        [bdftopcf]=bdftopcf\n        [xsltproc]=libxslt\n        [java]=virtual/jre\n        [python3]=python\n        [rpcgen]=net-libs/rpcsvc-proto\n      )\n      file_map+=(\n        [/usr/include/stdio.h]=glibc\n        [/usr/include/ncurses.h]=ncurses\n      )\n      perl_map+=(\n        [JSON]=JSON\n        [Parse::Yapp::Driver]=perl-Parse-Yapp\n        [Thread::Queue]=perl-Thread-Queue\n        [XML::Parser]=XML-Parser\n      )\n      ;;\n    arch|endeavouros)\n      dep_map+=(\n        [g++]=g++\n        [mkfontscale]=xorg-mkfontscale\n        [mkfontdir]=xorg-mkfontdir\n        [bdftopcf]=xorg-bdftopcf\n        [xsltproc]=libxslt\n        [java]=jdk8-openjdk\n        [python3]=python3\n        [rpcgen]=rpcsvc-proto\n      )\n      perl_map+=(\n        [JSON]=perl-json\n        [XML::Parser]=perl-xml-parser\n        [Thread::Queue]=perl\n        [Parse::Yapp::Driver]=perl-parse-yapp\n      )\n      ;;\n    opensuse)\n      dep_map+=(\n        [g++]=gcc-c++\n        [mkfontscale]=mkfontscale\n        [mkfontdir]=mkfontdir\n        [bdftopcf]=bdftopcf\n        [xsltproc]=libxslt-tools\n        [java]=java-1_8_0-openjdk\n        [python3]=python3\n      )\n      if [[ ! $(rpm -qa glibc-devel-static) ]]; then\n        dep_map+=(\n          [glibc-devel-static]=glibc-devel-static\n        )\n      fi\n      perl_map+=(\n        [JSON]=perl-JSON\n        [XML::Parser]=perl-XML-Parser\n        [Thread::Queue]=perl\n        [Parse::Yapp::Driver]=perl-Parse-Yapp\n      )\n      ;;\n    *)\n      dep_map+=(\n        [g++]=g++\n        [mkfontscale]=xfonts-utils\n        [mkfontdir]=xfonts-utils\n        [bdftopcf]=xfonts-utils\n        [xsltproc]=xsltproc\n        [java]=default-jre\n        [python3]=python3\n      )\n      ;;\nesac\n\nif [ \"${DEBUG}\" = \"true\" ]; then\n  echo \"DEP MAP\"\n  for key in \"${!dep_map[@]}\"; do\n    echo \"${key}:${dep_map[${key}]}\"\n  done\n  echo \"FILE MAP\"\n  for key in \"${!file_map[@]}\"; do\n    echo \"${key}:${file_map[${key}]}\"\n  done\n  echo \"PERL MAP\"\n  for key in \"${!perl_map[@]}\"; do\n    echo \"${key}:${perl_map[${key}]}\"\n  done\nfi\n\n### DEPENDENCY CHECKING AND INSTALLATION ###\nget_deps\n\nif [ \"${DEBUG}\" = \"true\" ]; then\n  echo \"NEED MAP\"\n  for key in \"${!need_map[@]}\"; do\n    echo \"${key}:${need_map[${key}]}\"\n  done\nfi\n\nif [ \"${#need_map[@]}\" -gt 0 ]; then\n  echo \"**** This system lacks the following tools needed to build ${DISTRONAME} ****\"\n  for key in \"${!need_map[@]}\"; do\n    echo \"${key} provided by ${need_map[${key}]}\"\n  done\n  echo \"**** The system appears to be a ${DISTRO} system ****\"\n\n  if command -v sudo >/dev/null; then\n    case \"${DISTRO}\" in\n      ubuntu|debian|linuxmint|\\\"elementary\\\")\n        get_yes_no && sudo apt-get install \"${need_map[@]}\"\n        ;;\n      fedora|centos|rhel)\n        command -v dnf >/dev/null && YUM=dnf || YUM=yum\n        get_yes_no && sudo ${YUM} install \"${need_map[@]}\"\n        ;;\n      gentoo)\n        get_yes_no && sudo emerge --ask --deep \"${need_map[@]}\"\n        ;;\n      sabayon)\n        get_yes_no && sudo equo install --ask \"${need_map[@]}\"\n        ;;\n      mageia)\n        get_yes_no && sudo urpmi \"${need_map[@]}\"\n        ;;\n      arch|endeavouros)\n        get_yes_no && sudo pacman -Sy \"${need_map[@]}\"\n        ;;\n      opensuse)\n        get_yes_no && sudo zypper install -y --no-recommends \"${need_map[@]}\"\n        ;;\n      *)\n        echo \"**** unsupported distro ${DISTRO} ****\"\n        exit 1\n        ;;\n    esac\n  else\n    echo \"The command 'sudo' was not found. Please install necessary packages manually.\"\n    exit 1\n  fi\nfi\n\n# check if installed packages satisifed deps\nget_deps\n\nif [ \"${#need_map[@]}\" -gt 0 ]; then\n  echo \"**** The following packages were not installed correctly ****\"\n  for key in \"${!need_map[@]}\"; do\n    echo \"${key} provided by ${need_map[${key}]}\"\n  done\n  echo \"********\"\n  exit 1\nfi\n"
  },
  {
    "path": "scripts/clean",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"${1}\"\n\nclean_package() {\n  build_msg \"CLR_CLEAN\" \"CLEAN\" \"${1}\" \"indent\"\n\n  if [ \"${CLEAN_SOURCES}\" = \"true\" ]; then\n    rm -rf \"${SOURCES}/${1}\"\n    return\n  fi\n\n  # Use a wildcard here to remove all versions of the package\n  for i in \"${BUILD}/build/${1}-\"* \\\n           \"${BUILD}/install_pkg/${1}-\"* \\\n           \"${BUILD}/install_init/${1}-\"*; do\n    if [ -d \"${i}\" -a -f \"${i}/.libreelec-unpack\" ]; then\n      . \"${i}/.libreelec-unpack\"\n      if [ \"${STAMP_PKG_NAME}\" = \"${1}\" ]; then\n        build_msg \"CLR_WARNING\" \"*\" \"$(print_color \"CLR_WARNING_DIM\" \"Removing ${i} ...\")\"\n        rm -rf \"${i}\"\n      fi\n    elif [ -d \"${i}\" -a -f \"${i}/.libreelec-package\" ]; then\n      # force clean if no stamp found (previous unpack failed)\n      . \"${i}/.libreelec-package\"\n      if [ \"${INFO_PKG_NAME}\" = \"${1}\" ]; then\n        build_msg \"CLR_WARNING\" \"*\" \"$(print_color \"CLR_WARNING_DIM\" \"Removing ${i} ...\")\"\n        rm -rf \"${i}\"\n      fi\n    fi\n  done\n\n  for i in \"${BUILD}/qa_checks/${1}-\"*; do\n    build_msg \"CLR_WARNING\" \"*\" \"$(print_color \"CLR_WARNING_DIM\" \"Removing ${i} ...\")\"\n    rm -rf \"${i}\"\n  done\n\n  rm -f \"${STAMPS}/${1}/build_\"*\n}\n\nif [ \"${1}\" = \"--all\" -a -n \"${2}\" ]; then\n  for build_dir in $(ls -1d \"${BUILD_ROOT}/${BUILD_BASE}.\"*); do\n    load_build_config \"${build_dir}\" && \"${SCRIPTS}/clean\" \"${2}\"\n  done\nelif [ -n \"${1}\" ]; then\n  clean_package \"${1}\"\nfi\n\n"
  },
  {
    "path": "scripts/create_addon",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"\"\n. config/multithread\n\nusage() {\n  cat - >&2 <<EOF\nSYNOPSIS\n       ./script/create_addon [OPTION] [addons]...\n\nDESCRIPTION\n       create_addon builds one or more addons.\n\n       --show-only\n              output the list of packages, which are intented to build\n\n       --help shows this message\n\n       [addons]\n              list of addons to build.\n              The addons can identified by:\n              - the name of the addon\n              - a group name of addons\n                  * all - all addons found under packages and project/*/packages\n                  * official - all addons found under packages/addons\n                  * binary - all addons found under packages/mediacenter/kodi-binary-addons\n              - a regex term (grep styled), the term is automatic sorounded with string begin and end (^[term]$)\n\n              addons can removed from list with a leading minus.\n\nEXAMPLE\n       build all addons\n       > ./script/create_addon all\n\n       build audio encoders and decoders, only\n       > ./script/create_addon audioencoder.* audiodecoder.*\n\n       build all, but not binary\n       > ./script/create_addon all -binary\nEOF\n  exit ${1:-0}\n}\n\n# Get list of addon packages\nget_addons() {\n  local paths filter\n  local pkgpath exited\n  local count=0 validpkg\n\n  case ${1} in\n    binary)   paths=\"^${ROOT}/packages/mediacenter/kodi-binary-addons/\";;\n    official) paths=\"^${ROOT}/packages/addons/\";;\n    all)      paths=\"^${ROOT}/packages/|^${ROOT}/projects/.*/packages/\";;\n    *)        paths=\"^${ROOT}/packages/|^${ROOT}/projects/.*/packages/\"; filter=\"${1}\";;\n  esac\n\n  exit() { exited=1; }\n\n  for pkgpath in $(cat \"${_CACHE_PACKAGE_LOCAL_DEVICE}\" \"${_CACHE_PACKAGE_LOCAL}\" \"${_CACHE_PACKAGE_GLOBAL}\" | grep -E \"${paths}\"); do\n    if [ -n \"${filter}\" ]; then\n      [[ ${pkgpath} =~ ^.*/${filter}@?+?@ ]] || continue\n    fi\n\n    exited=0\n    source_package \"${pkgpath%%@*}/package.mk\" &>/dev/null\n    [ ${exited} -eq 1 ] && continue\n\n    validpkg=\"no\"\n    VERIFY_FAIL=\n    # Should only build embedded addons when they are explictly specified in the addon list\n    if [ \"${PKG_IS_ADDON}\" = \"embedded\" ]; then\n      if [ -n \"${filter}\" ]; then\n        verify_addon && validpkg=\"yes\"\n      fi\n    elif [ \"${PKG_IS_ADDON}\" = \"yes\" ]; then\n      verify_addon && validpkg=\"yes\"\n    fi\n\n    if [ \"${validpkg}\" = \"yes\" ]; then\n      echo \"${PKG_NAME}\"\n      count=$((count + 1))\n    elif [ -n \"${VERIFY_FAIL}\" -a -n \"${filter}\" ]; then\n      echo \"$(print_color CLR_ERROR \"${PKG_NAME}\"): ${VERIFY_FAIL}\" >&2\n    fi\n  done\n\n  unset -f exit\n\n  if [ ${count} -eq 0 -a -n \"${filter}\" ]; then\n    echo  \"$(print_color CLR_ERROR \"ERROR: no addons matched for filter ${filter}\")\" >&2\n    echo  \"For more information type: ./scripts/create_addon --help\" >&2\n    die\n  fi\n}\n\n# Return 0 if package is a suitable addon, 1 otherwise\nverify_addon() {\n  if [ -n \"${PKG_ARCH}\" ]; then\n    VERIFY_FAIL=\"Incompatible arch: \\\"${TARGET_ARCH}\\\" not in [ ${PKG_ARCH} ]\"\n    listcontains \"${PKG_ARCH}\" \"!${TARGET_ARCH}\" && return 1\n    listcontains \"${PKG_ARCH}\" \"${TARGET_ARCH}\" || listcontains \"${PKG_ARCH}\" \"any\" || return 1\n  fi\n\n  if [ -n \"${PKG_ADDON_PROJECTS}\" ]; then\n    [ \"${DEVICE}\" = \"RPi\" ] && _DEVICE=\"RPi1\" || _DEVICE=\"${DEVICE}\"\n\n    VERIFY_FAIL=\"Incompatible project or device: \\\"${_DEVICE:-${PROJECT}}\\\" not in [ ${PKG_ADDON_PROJECTS} ]\"\n\n    if listcontains \"${PKG_ADDON_PROJECTS}\" \"!${_DEVICE:-${PROJECT}}\" ||\n       listcontains \"${PKG_ADDON_PROJECTS}\" \"!${PROJECT}\"; then\n      return 1\n    fi\n\n    if ! listcontains \"${PKG_ADDON_PROJECTS}\" \"${_DEVICE:-${PROJECT}}\" &&\n       ! listcontains \"${PKG_ADDON_PROJECTS}\" \"${PROJECT}\" &&\n       ! listcontains \"${PKG_ADDON_PROJECTS}\" \"any\"; then\n      return 1\n    fi\n  fi\n\n  return 0\n}\n\n# need parameter\nif [ $# -eq 0 ]; then\n  usage 1\nfi\n\n# check environment and configure toolchains\n${SCRIPTS}/checkdeps\n\n( setup_toolchain host )\nsetup_toolchain target\n\n# collect list of addons for building\naddons=\naddons_drop=\nshow_only=\"no\"\n\n# read addons from parameter list\nwhile [ $# -gt 0 ]; do\n  case ${1} in\n    --help)         usage 0;;\n    --show-only)    show_only=\"yes\";;\n    --*)            usage 1;;\n    -*)             addons_drop+=\" $(get_addons ${1:1})\";;\n    *)              addons+=\" $(get_addons ${1})\";;\n  esac\n  shift\ndone\n\n# Build a new list containing only those addons we want to build\nwanted_addons=\nfor addon in $(echo ${addons} | tr ' ' '\\n' | sort -u); do\n  listcontains \"${addons_drop}\" \"${addon}\" || wanted_addons+=\" ${addon}\"\ndone\n\nif [ \"${show_only}\" = \"yes\" ]; then\n  for addon in ${wanted_addons}; do\n    echo ${addon}\n  done\n  exit 0\nfi\n\n# Build all addons at once using a single plan\nif MTADDONBUILD=yes start_multithread_build \"${wanted_addons:1}\"; then\n  echo\n  echo \"$(print_color CLR_INFO \"ALL ADDONS BUILT SUCCESSFULLY\")\"\n  exit 0\nelif [ -f \"${THREAD_CONTROL}/addons.failed\" ]; then\n  echo >&2\n  print_color CLR_ERROR \"FAILED ADDONS:\\n\" >&2\n  while read -r addon logfile; do\n    if [ -n \"${addon}\" ]; then\n      if [ -n \"${logfile}\" ]; then\n        echo \"    $(print_color CLR_ERROR \"${addon}\"): ${logfile}\" >&2\n      else\n        echo \"    $(print_color CLR_ERROR \"${addon}\")\" >&2\n      fi\n    fi\n  done < \"${THREAD_CONTROL}/addons.failed\"\n  die\nelse\n  die \"$(print_color CLR_ERROR \"UNKNOWN BUILD FAILURE OR INABILITY TO GENERATE PLAN\")\"\nfi\n"
  },
  {
    "path": "scripts/create_docker_package",
    "content": "#!/bin/sh\n\nFIRST_LABEL=30002\n\nLABEL_DEVICE=\"D\"\nLABEL_ENV=\"E_\"\nLABEL_PORT=\"P_\"\nLABEL_VOLUME=\"V\"\n\nSTRING_DEVICE=\"-d \"\nSTRING_ENV=\"-e \"\nSTRING_PORT=\"-p \"\nSTRING_VOLUME=\"-v \"\n\nadd_default() {\n    defaults=\"${defaults}    <setting id=\\\"${1}\\\" value=\\\"${2}\\\" />\\n\"\n}\n\nadd_device() {\n    add_label\n    default=\"${1%:*}\"\n    docker=\"${1#*:}\"\n    id=\"${LABEL_DEVICE}${docker//\\//_}\"\n    add_default \"${id}\" \"${default}\"\n    add_option \"--device=\\\"\\$${id}\\\"\"\n    add_setting \"<setting label=\\\"${label}\\\" type=\\\"folder\\\" id=\\\"${id}\\\" default=\\\"${default}\\\" />\"\n    add_string \"${STRING_DEVICE}${docker}\"\n}\n\nadd_env() {\n    add_label\n    default=\"${1#*=}\"\n    docker=\"${1%%=*}\"\n    id=\"${LABEL_ENV}${docker}\"\n    add_default \"${id}\" \"${default}\"\n    add_option \"-e ${docker}=\\\"${id}\\\"\"\n    add_setting \"<setting label=\\\"${label}\\\" type=\\\"text\\\"   id=\\\"${id}\\\" default=\\\"${default}\\\" />\"\n    add_string \"${STRING_ENV}${docker}\"\n}\n\nadd_label() {\n    if [ -z ${label} ]; then\n      label=${FIRST_LABEL}\n    else\n      label=$((label+1))\n    fi\n}\n\nadd_option() {\n    if [ ! -z \"${options}\" ]; then\n        options=\"${options} \"'\\\\\\n'\n    fi\n    options=\"${options}           ${1}\"\n}\n\nadd_port() {\n    add_label\n    default=\"${1%:*}\"\n    docker=\"${1#*:}\"\n    port=\"${docker%/*}\"\n    id=\"${LABEL_PORT}${port}\"\n    add_default \"${id}\" \"${default}\"\n    add_option \"-p \\\"\\$${id}\\\":${docker}\"\n    add_setting \"<setting label=\\\"${label}\\\" type=\\\"number\\\" id=\\\"${id}\\\" default=\\\"${default}\\\" />\"\n    add_string \"${STRING_PORT}${port}\"\n}\n\nadd_setting() {\n    settings=\"${settings}      ${1}\\n\"\n}\n\nadd_string() {\n    strings=\"${strings}\\nmsgctxt \\\"${label}\\\"\\nmsgid   \\\"${1}\\\"\\nmsgstr  \\\"\\\"\\n\"\n}\n\nadd_volume() {\n    add_label\n    default=\"${1%:*}\"\n    docker=\"${1#*:}\"\n    id=\"${LABEL_VOLUME}${docker//\\//_}\"\n    add_default \"${id}\" \"${default}\"\n    add_option \"-v \\\"\\$${id}\\\":${docker}\"\n    add_setting \"<setting label=\\\"${label}\\\" type=\\\"folder\\\" id=\\\"${id}\\\" default=\\\"${default}\\\" />\"\n    add_string \"${STRING_VOLUME}${docker}\"\n}\n\n\ncase \"${ARCH}\" in\n    arm)\n        projects=\"imx6 RPi RPi2\"\n        ;;\n    x86_64)\n        projects=\"Generic\"\n        ;;\n    *)\n        echo \"Unkown project\"\n        exit 1\n        ;;\nesac\n\nwhile [[ $# -gt 0 ]]; do\n    option=\"${1}\"\n    shift\n    case \"${option}\" in\n        --device=*)\n            add_device \"${option#--device=}\"\n            ;;\n        --name=*)\n            ;;\n        --port=*)\n            add_port \"${option#--port=}\"\n            ;;\n        --volume=*)\n            add_volume \"${option#--volume=}\"\n            ;;\n        -e)\n            add_env \"${1}\"\n            shift\n            ;;\n\n        -p)\n            add_port \"${1}\"\n            shift\n            ;;\n        -v)\n            add_volume \"${1}\"\n            shift\n            ;;\n        -*)\n            add_option \"${option}\"\n            ;;\n        */*)\n            add_option \"${option}\"\n            image=\"${option%:*}\"\n            version=\"${option#*:}\"\n            if [ \"${version}\" = \"${option}\" ]; then\n                version=\"latest\"\n            fi\n            if [ ! -z \"$*\" ]; then\n                add_option \"$*\"\n            fi\n            break\n            ;;\n        *)\n            add_option \"${option}\"\n            ;;\n    esac    \ndone\n\nif [ -z \"${image}\" ]; then\n    echo \"Failed to parse image\"\n    exit 1\nfi\n\nname=\"${image//\\//.}\"\ndir=\"packages/addons/docker/${name}\"\n\nif [ -d \"${dir}\" ]; then\n    echo \"Package already exists\"\n    exit 1\nfi\n\ncp -R config/docker \"${dir}\"\n\nsed -e \"s|@NAME@|${name}|g\" \\\n    -e \"s|@VERSION@|${version}|g\" \\\n    -e \"s|@ARCH@|${arch}|g\" \\\n    -e \"s|@IMAGE@|${image}|g\" \\\n    -e \"s|@PROJECTS@|${projects}|g\" \\\n    -i \"${dir}/package.mk\"\n\n\ndefaults=\"$(echo -en \"${defaults}\" | sort)\"\necho -en \"<settings>\\n${defaults}\\n</settings>\" > \"${dir}/source/settings-default.xml\"\n\necho -en \"${options}\" >> \"${dir}/source/bin/docker\"\n\nsed -e \"s|@SETTINGS@|${settings}|g\" \\\n    -i \"${dir}/source/resources/settings.xml\"\n\necho -en \"${strings}\" >> \"${dir}/source/resources/language/English/strings.po\"\n\nmv \"${dir}/source/bin/docker\" \"${dir}/source/bin/docker.${name}\"\nmv \"${dir}/source/system.d/docker.service\" \"${dir}/source/system.d/docker.${name}.service\"\n"
  },
  {
    "path": "scripts/extract",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"${1}\"\n\nif [ -z \"${2}\" ]; then\n  die \"usage: ${0} package_name target_dir\"\nfi\n\n[ -z \"${PKG_URL}\" -o -z \"${PKG_SOURCE_NAME}\" ] && die \"${PKG_NAME}: PKG_URL or PKG_SOURCE_NAME undefined\"\n[ ! -d \"${SOURCES}/${1}\" ] && die \"${PKG_NAME}: ${SOURCES}/${1} not found\"\n[ ! -d \"${2}\" ] && die \"${PKG_NAME}: target ${2} not found\"\n\nif [[ \"${PKG_URL}\" =~ ^file:// ]]; then\n  FULL_SOURCE_PATH=\"${PKG_SOURCE_NAME}\"\nelse\n  FULL_SOURCE_PATH=\"${SOURCES}/${1}/${PKG_SOURCE_NAME}\"\nfi\n\nif [ ! -f \"${FULL_SOURCE_PATH}\" -a ! -d \"${FULL_SOURCE_PATH}\" ]; then\n  echo \"error: File ${PKG_SOURCE_NAME} doesn't exist for package ${1}\"\n  echo \"Have you called scripts/extract before scripts/get?\"\n  die\nfi\n\n# The build system expects packages to be extracted to\n# ${PKG_BUILD}.\n# Try to strip the top level dir from the archive and extract to\n# the correct directory if possible so packages don't need to\n# set PKG_SOURCE_DIR and scripts/unpack doesn't need to rename\n# the directory.\n# Currently this is only supported for tar archives.\n# If PKG_SOURCE_DIR is set don't apply any directory mangling\n# so advanced renaming (eg stripping more than one directory level)\n# can be performed by scripts/unpack.\n# If the archive does not contain a top level folder the strip components\n# can be disabled by PKG_TAR_STRIP_COMPONENTS=\"no\" in package.mk\nTAR_OPTS=\"\"\nif [ -z \"${PKG_SOURCE_DIR}\" ]; then\n  [ -z \"${PKG_TAR_STRIP_COMPONENTS}\" ] && TAR_OPTS=\"--strip-components=1\" || :\n  DESTDIR=\"${2}/${PKG_NAME}-${PKG_VERSION}\"\nelse\n  DESTDIR=\"${2}\"\nfi\n\ncase \"${PKG_SOURCE_NAME}\" in\n  *.tar | *.tar.bz2 | *.tbz | *.tar.gz | *.tgz | *.tar.xz | *.txz)\n    mkdir -p \"${DESTDIR}\"\n    tar xf \"${FULL_SOURCE_PATH}\" ${TAR_OPTS} -C \"${DESTDIR}\"\n    ;;\n  *.tar.zst | *.tzst)\n    mkdir -p \"${DESTDIR}\"\n    zstdcat \"${FULL_SOURCE_PATH}\" | tar xf - ${TAR_OPTS} -C \"${DESTDIR}\"\n    ;;\n  *.7z)\n    mkdir -p \"${2}/${1}\"\n    7z x -o\"${2}/${1}\" \"${FULL_SOURCE_PATH}\"\n    ;;\n  *.zip)\n    unzip -o -q \"${FULL_SOURCE_PATH}\" -d \"${2}\"\n    ;;\n  *.diff | *.patch)\n    patch -d \"${2}\" -p1 < \"${FULL_SOURCE_PATH}\"\n    ;;\n  *.diff.bz2 | *.patch.bz2 | patch-*.bz2)\n    bzcat \"${FULL_SOURCE_PATH}\" | patch -d \"${2}\" -p1\n    ;;\n  *.diff.gz | *.patch.gz | patch-*.gz)\n    zcat \"${FULL_SOURCE_PATH}\" | patch -d \"${2}\" -p1\n    ;;\n  *)\n    FULL_DEST_PATH=\"${2}/${PKG_NAME}-${PKG_VERSION}\"\n    mkdir \"${FULL_DEST_PATH}\"\n    tar cf - -C \"${FULL_SOURCE_PATH}\" ${PKG_TAR_COPY_OPTS} . | tar xf - -C \"${FULL_DEST_PATH}\"\n    ;;\nesac\n"
  },
  {
    "path": "scripts/genbuildplan.py",
    "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nimport sys, os, codecs, json, argparse, re\n\nROOT_PKG = \"__root__\"\n\nclass LibreELEC_Package:\n    def __init__(self, name, section):\n        self.name = name\n        self.section = section\n        self.deps = {\"bootstrap\": [],\n                     \"init\":      [],\n                     \"host\":      [],\n                     \"target\":    []}\n        self.wants = []\n        self.wantedby = []\n\n        self.unpacks = []\n\n    def __repr__(self):\n        s = f\"{name:<9}: {self.name}\"\n        s = f\"{s}\\n{section:<9}: {self.section}\"\n\n        for t in self.deps:\n            s = f\"{s}\\n{t:<9}: {self.deps[t]}\"\n\n        s = f\"{s}\\n{'UNPACKS':<9}: {self.unpacks}\"\n\n        s = f\"{s}\\n{'NEEDS':<9}: {self.wants}\"\n        s = f\"{s}\\n{'WANTED BY':<9}: {self.wantedby}\"\n\n        return s\n\n    def addDependencies(self, target, packages):\n        for d in \" \".join(packages.split()).split():\n            self.deps[target].append(d)\n            name = d.split(\":\")[0]\n            if name not in self.wants and name != self.name:\n                self.wants.append(name)\n\n    def delDependency(self, target, package):\n        if package in self.deps[target]:\n            self.deps[target].remove(package)\n            name = package.split(\":\")[0]\n            if name in self.wants:\n                self.wants.remove(name)\n\n    def addReference(self, package):\n        name = package.split(\":\")[0]\n        if name not in self.wantedby:\n            self.wantedby.append(name)\n\n    def delReference(self, package):\n        name = package.split(\":\")[0]\n        if name in self.wantedby:\n            self.wantedby.remove(name)\n\n    def addUnpack(self, packages):\n        if packages.strip():\n            self.unpacks = packages.strip().split()\n\n    def isReferenced(self):\n        return False if self.wants == [] else True\n\n    def isWanted(self):\n        return False if self.wantedby == [] else True\n\n    def references(self, package):\n        return package in self.wants\n\n# Reference material:\n# https://www.electricmonk.nl/docs/dependency_resolving_algorithm/dependency_resolving_algorithm.html\nclass Node:\n    def __init__(self, name, target, section):\n        self.name = name\n        self.target = target\n        self.section = section\n        self.fqname = f\"{name}:{target}\"\n        self.edges = []\n\n    def appendEdges(self, node):\n        # Add the node itself...\n        if node not in self.edges:\n            self.edges.append(node)\n        # as well as its edges\n        for e in node.edges:\n            if e not in self.edges:\n                self.edges.append(e)\n\n    # Return True if the dependencies of the specified node are met by this node\n    def satisfies(self, node):\n        for e in node.edges:\n            if e not in self.edges:\n                return False\n        return True\n\n    def __repr__(self):\n        s = f\"{'name':<9}: {self.name}\"\n        s = f\"{s}\\n{'target':<9}: {self.target}\"\n        s = f\"{s}\\n{'fqname':<9}: {self.fqname}\"\n        s = f\"{s}\\n{'common':<9}: {self.commonName()}\"\n        s = f\"{s}\\n{'section':<9}: {self.section}\"\n\n        for e in self.edges:\n            s = f\"{s}\\nEDGE: {e.fqname}\"\n\n        return s\n\n    def commonName(self):\n        return self.name if self.target == \"target\" else f\"{self.name}:{self.target}\"\n\n    def addEdge(self, node):\n        if node not in self.edges:\n            self.edges.append(node)\n\ndef eprint(*args, **kwargs):\n    print(*args, file=sys.stderr, **kwargs)\n\n# Read a JSON list of all possible packages from stdin, removing newlines\ndef loadPackages():\n    jdata = json.loads(f\"[{sys.stdin.read().replace(chr(10),'')[:-1]}]\")\n\n    map = {}\n\n    # Load \"global\" packages first\n    for pkg in jdata:\n        if pkg[\"hierarchy\"] == \"global\":\n            map[pkg[\"name\"]] = initPackage(pkg)\n\n    # Then the \"project\" packages, as these will replace any matching \"global\" packages\n    for pkg in jdata:\n        if pkg[\"hierarchy\"] == \"project\":\n            map[pkg[\"name\"]] = initPackage(pkg)\n\n    # Then the \"device\" packages, as these will replace any matching \"project\" or \"global\" packages\n    for pkg in jdata:\n        if pkg[\"hierarchy\"] == \"device\":\n            map[pkg[\"name\"]] = initPackage(pkg)\n\n    return map\n\n# Create a fully formed LibreELEC_Package object\ndef initPackage(package):\n    pkg = LibreELEC_Package(package[\"name\"], package[\"section\"])\n\n    for target in [\"bootstrap\", \"init\", \"host\", \"target\"]:\n        pkg.addDependencies(target, package[target])\n\n    pkg.addUnpack(package[\"unpack\"])\n\n    return pkg\n\n# Split name:target into components\ndef split_package(name):\n    parts = name.split(\":\")\n    pn = parts[0]\n    pt = parts[1] if len(parts) != 1 else \"target\"\n    return (pn, pt)\n\n# Return a list of packages of the specified type\ndef get_packages_by_target(target, list):\n    newlist = []\n\n    for p in list:\n        (pn, pt) = split_package(p)\n        if target in [\"target\", \"init\"] and pt in [\"target\", \"init\"]:\n            newlist.append(p)\n        elif target in [\"bootstrap\", \"host\"] and pt in [\"bootstrap\", \"host\"]:\n            newlist.append(p)\n\n    return newlist\n\n# For the specified node iterate over the list of scheduled nodes and return the first\n# position where we could possibly build this node (ie. all dependencies satisfied).\ndef findbuildpos(node, list):\n\n    # Keep a running total of all dependencies as we progress through the list\n    alldeps = Node(\"\", \"\", \"\")\n\n    candidate = None\n    for n in list:\n        alldeps.appendEdges(n)\n        if alldeps.satisfies(node):\n            if len(n.edges) > len(node.edges):\n                if candidate == None:\n                    candidate = n\n                break\n            candidate = n\n\n    return list.index(candidate) + 1 if candidate else -1\n\n# Resolve dependencies for a node\ndef dep_resolve(node, resolved, unresolved):\n    unresolved.append(node)\n\n    for edge in node.edges:\n        if edge not in resolved:\n            if edge in unresolved:\n                raise Exception((\n                    f\"Circular reference detected: {node.fqname} -> {edge.commonName()}\\n\"\n                    f\"Remove {edge.commonName()} from {node.name} package.mk::PKG_DEPENDS_{node.target.upper()}\"\n                    ))\n            dep_resolve(edge, resolved, unresolved)\n\n    if node not in resolved:\n        resolved.append(node)\n\n    unresolved.remove(node)\n\n# Return a list of build steps for the trigger packages\ndef get_build_steps(args, nodes):\n    resolved = []\n    unresolved = []\n\n    # When building the image the :target packages must be installed.\n    #\n    # However, if we are not building the image then only build the packages\n    # and don't install them as it's likely we will be building discrete add-ons\n    # which are installed outside of the image.\n    #\n    install = True if \"image\" in args.build else False\n\n    for pkgname in [x for x in args.build if x]:\n        if pkgname.find(\":\") == -1:\n            pkgname = f\"{pkgname}:target\"\n\n        if pkgname in nodes:\n            dep_resolve(nodes[pkgname], resolved, unresolved)\n\n    # Abort if any references remain unresolved\n    if unresolved != []:\n        eprint(\"The following dependencies have not been resolved:\")\n        for dep in unresolved:\n            eprint(f\"  {dep}\")\n        raise(\"Unresolved references\")\n\n    # Output list of resolved dependencies\n    for pkg in resolved:\n        task = \"build\" if pkg.fqname.endswith(\":host\") or pkg.fqname.endswith(\":init\") or not install else \"install\"\n        yield(task, pkg.fqname)\n\n# Reduce the complete list of packages to a map of those packages that will\n# be needed for the build.\ndef processPackages(args, packages):\n    # Add dummy package to ensure build/install dependencies are not culled\n    pkg = {\n            \"name\": ROOT_PKG,\n            \"section\": \"virtual\",\n            \"hierarchy\": \"global\",\n            \"bootstrap\": \"\",\n            \"init\": \"\",\n            \"host\": \" \".join(get_packages_by_target(\"host\", args.build)),\n            \"target\": \" \".join(get_packages_by_target(\"target\", args.build)),\n            \"unpack\": \"\"\n          }\n\n    packages[pkg[\"name\"]] = initPackage(pkg)\n\n    # Resolve reverse references that we can use to ignore unreferenced packages\n    for pkgname in packages:\n        for opkgname in packages:\n            opkg = packages[opkgname]\n            if opkg.references(pkgname):\n                if pkgname in packages:\n                    packages[pkgname].addReference(opkgname)\n\n    # Identify unused packages\n    while True:\n        changed = False\n        for pkgname in packages:\n            pkg = packages[pkgname]\n            if pkg.isWanted():\n                for opkgname in pkg.wantedby:\n                    if opkgname != ROOT_PKG:\n                        if not packages[opkgname].isWanted():\n                            pkg.delReference(opkgname)\n                            changed = True\n        if not changed:\n            break\n\n    # Create a new map of \"needed\" packages\n    needed_map = {}\n    for pkgname in packages:\n        pkg = packages[pkgname]\n        if pkg.isWanted() or pkgname == ROOT_PKG:\n            needed_map[pkgname] = pkg\n\n    # Validate package dependency references\n    if not args.ignore_invalid:\n        for pkgname in needed_map:\n            pkg = needed_map[pkgname]\n            for t in pkg.deps:\n                for d in pkg.deps[t]:\n                    if split_package(d)[0] not in needed_map:\n                        msg = f'Invalid package reference: dependency {d} in package {pkgname}::PKG_DEPENDS_{t.upper()} is not valid'\n                        if args.warn_invalid:\n                            eprint(f\"WARNING: {msg}\")\n                        else:\n                            raise Exception(msg)\n\n    node_map = {}\n\n    # Convert all packages to target-specific nodes\n    for pkgname in needed_map:\n        pkg = needed_map[pkgname]\n        for target in pkg.deps:\n            if pkg.deps[target]:\n                node = Node(pkgname, target, pkg.section)\n                node_map[node.fqname] = node\n\n    # Ensure all referenced dependencies exist as a basic node\n    for pkgname in needed_map:\n        pkg = needed_map[pkgname]\n        for target in pkg.deps:\n            for dep in pkg.deps[target]:\n                dfq = dep if dep.find(\":\") != -1 else f\"{dep}:target\"\n                if dfq not in node_map:\n                    (dfq_p, dfq_t) = split_package(dfq)\n                    if dfq_p in packages:\n                        dpkg = packages[dfq_p]\n                        node_map[dfq] = Node(dfq_p, dfq_t, dpkg.section)\n                    elif not args.ignore_invalid:\n                        raise Exception(f\"Invalid package! Package {dfq_p} cannot be found for this PROJECT/DEVICE/ARCH\")\n\n    # To each target-specific node, add the corresponding\n    # target-specific dependency nodes (\"edges\")\n    for name in node_map:\n        node = node_map[name]\n        if node.name not in needed_map:\n            if args.warn_invalid:\n                continue\n            else:\n                raise Exception(f\"Invalid package! Package {node.name} cannot be found for this PROJECT/DEVICE/ARCH\")\n        for dep in needed_map[node.name].deps[node.target]:\n            dfq = dep if dep.find(\":\") != -1 else f\"{dep}:target\"\n            if dfq in node_map:\n                node.addEdge(node_map[dfq])\n\n    return node_map\n\n#---------------------------------------------\nparser = argparse.ArgumentParser(description=\"Generate package dependency list for the requested build/install packages.    \\\n                                              Package data will be read from stdin in JSON format.\", \\\n                                 formatter_class=lambda prog: argparse.HelpFormatter(prog,max_help_position=25,width=90))\n\nparser.add_argument(\"-b\", \"--build\", nargs=\"+\", metavar=\"PACKAGE\", required=True, \\\n                    help=\"Space-separated list of build trigger packages, either for host or target. Required property - specify at least one package.\")\n\nparser.add_argument(\"--warn-invalid\", action=\"store_true\", default=False, \\\n                    help=\"Warn about invalid/missing dependency packages, perhaps excluded by a PKG_ARCH incompatability. Default is to abort.\")\n\nparser.add_argument(\"--ignore-invalid\", action=\"store_true\", default=False, \\\n                    help=\"Ignore invalid packages.\")\n\ngroup =  parser.add_mutually_exclusive_group()\ngroup.add_argument(\"--show-wants\", action=\"store_true\", \\\n                    help=\"Output \\\"wants\\\" dependencies for each step.\")\ngroup.add_argument(\"--hide-wants\", action=\"store_false\", dest=\"show_wants\", default=True, \\\n                    help=\"Disable --show-wants.  This is the default.\")\n\nparser.add_argument(\"--with-json\", metavar=\"FILE\", \\\n                    help=\"File into which JSON formatted plan will be written.\")\n\nargs = parser.parse_args()\n\nALL_PACKAGES = loadPackages()\n\nloaded = len(ALL_PACKAGES)\n\nREQUIRED_PKGS = processPackages(args, ALL_PACKAGES)\n\n# Identify list of packages to build/install\nsteps = [step for step in get_build_steps(args, REQUIRED_PKGS)]\n\neprint(f\"Packages loaded : {loaded}\")\neprint(f\"Build trigger(s): {len(args.build)} [{' '.join(args.build)}]\")\neprint(f\"Package steps   : {len(steps)}\")\neprint(\"\")\n\n# Write the JSON build plan (with dependencies)\nif args.with_json:\n    plan = []\n    for step in steps:\n        (pkg_name, target) = split_package(step[1])\n        plan.append({\"task\": step[0],\n                     \"name\": step[1],\n                     \"section\": ALL_PACKAGES[pkg_name].section,\n                     \"wants\": [d.fqname for d in REQUIRED_PKGS[step[1]].edges],\n                     \"unpacks\": ALL_PACKAGES[pkg_name].unpacks if pkg_name in ALL_PACKAGES else []})\n\n    with open(args.with_json, \"w\") as out:\n        print(json.dumps(plan, indent=2, sort_keys=False), file=out)\n\n# Output build/install steps\nif args.show_wants:\n    for step in steps:\n        node = (REQUIRED_PKGS[step[1]])\n        wants = [edge.fqname for edge in node.edges]\n        print(f\"{step[0]:<7} {step[1].replace(':target',''):<25} (wants: {', '.join(wants).replace(':target','')})\")\nelse:\n    for step in steps:\n        print(f\"{step[0]:<7} {step[1].replace(':target','')}\")\n"
  },
  {
    "path": "scripts/get",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"${1}\"\n\nif [ -z \"${1}\" ]; then\n  for i in $(find \"${PACKAGES}/\" -type f -name \"package.mk\"); do\n    GET_PKG=$(grep \"^PKG_NAME=\" \"${i}\" | sed -e \"s,\\\",,g\" -e \"s,PKG_NAME=,,\")\n    \"${SCRIPTS}\"/get \"${GET_PKG}\"\n  done\nfi\n\n# Avoid concurrent processing of the same package\nlock_source_dir() {\n  exec 99<\"${SOURCES}/${1}\"\n  if ! flock --nonblock --exclusive 99; then\n    echo \"Project/Device ${DEVICE:-${PROJECT}} waiting, to avoid concurrent processing of ${1}...\"\n    flock --exclusive 99\n  fi\n}\n\nif [ -n \"${PKG_URL}\" -a -n \"${PKG_SOURCE_NAME}\" ]; then\n  mkdir -p \"${SOURCES}/${1}\"\n\n  PACKAGE=\"${SOURCES}/${1}/${PKG_SOURCE_NAME}\"\n\n  STAMP_URL=\"${PACKAGE}.url\"\n  STAMP_SHA=\"${PACKAGE}.sha256\"\n\n  # determine get handler based on protocol and/or filename\n  case \"${PKG_URL}\" in\n    git://*|*.git)\n      get_handler=\"git\";;\n    file://*)\n      get_handler=\"file\";;\n    *)\n      get_handler=\"archive\";;\n  esac\n\n  if ! listcontains \"${GET_HANDLER_SUPPORT}\" \"${get_handler}\"; then\n    die \"ERROR: get handler \\\"${get_handler}\\\" is not supported, unable to get package ${1} - aborting!\"\n  else\n    get_handler=\"${SCRIPTS}/get_${get_handler}\"\n    if [ ! -f \"${get_handler}\" ]; then\n      die \"ERROR: get handler \\\"${get_handler}\\\" does not exist, unable to get package ${1} - aborting!\"\n    fi\n\n    . \"${get_handler}\"\n  fi\nfi\n\nexit 0\n"
  },
  {
    "path": "scripts/get_archive",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n_get_file_already_downloaded() {\n  [ ! -f \"${PACKAGE}\" -o ! -f \"${STAMP_URL}\" -o ! -f \"${STAMP_SHA}\" ] && return 1\n  [ -n \"${PKG_SHA256}\" -a \"$(cat ${STAMP_SHA} 2>/dev/null)\" != \"${PKG_SHA256}\" ] && return 1\n  return 0\n}\n\n# Latest file already present, exit now...\n_get_file_already_downloaded && exit 0\n\nlock_source_dir \"${1}\"\n\n# Check again in case of concurrent access - if nothing needs to be downloaded, exit now...\n_get_file_already_downloaded && exit 0\n\n# At this point, we need to download something...\nbuild_msg \"CLR_GET\" \"GET\" \"${1} (archive)\" \"indent\"\n\npkg_lock_status \"GETPKG\" \"${PKG_NAME}\" \"unpack\" \"downloading package...\"\n\nPACKAGE_MIRROR=\"\"\nfor mirror in ${DISTRO_MIRROR}; do\n  PACKAGE_MIRROR=\"${PACKAGE_MIRROR} ${mirror}/${PKG_NAME}/${PKG_SOURCE_NAME}\"\ndone\n\n[ \"${VERBOSE}\" != \"yes\" ] && WGET_OPT=-q\nWGET_CMD=\"wget --output-file=- --timeout=30 --tries=3 --passive-ftp --no-check-certificate -c ${WGET_OPT} --progress=bar:force --show-progress -O ${PACKAGE}\"\n\n# unset LD_LIBRARY_PATH to stop wget from using toolchain/lib and loading libssl.so/libcrypto.so instead of host libraries\nunset LD_LIBRARY_PATH\n\nrm -f \"${STAMP_URL}\" \"${STAMP_SHA}\"\n\nNBWGET=10\nNBCHKS=2\nwhile [ ${NBWGET} -gt 0 -a ${NBCHKS} -gt 0 ]; do\n  for url in \"${PKG_URL}\" ${PACKAGE_MIRROR}; do\n    if [[ \"$PKG_USETOKEN\" == \"yes\" ]]; then\n      if [[ $url == https://github.com/* ]] && [[ -n $COREELEC_GHTOKEN ]]; then\n        WGET_HEADER=--header=\"Authorization: token $COREELEC_GHTOKEN\"\n      fi\n    else\n      WGET_HEADER=--header=\"\"\n    fi\n\n    rm -f \"${PACKAGE}\"\n    if ${WGET_CMD} \"$WGET_HEADER\" \"${url}\"; then\n      CALC_SHA256=$(sha256sum \"${PACKAGE}\" | cut -d\" \" -f1)\n\n      [ -z \"${PKG_SHA256}\" -o \"${PKG_SHA256}\" = \"${CALC_SHA256}\" ] && break 2\n\n      if [ \"${CHANGE_HASH}\" = \"yes\" ]; then\n        sed -e \"s|^PKG_SHA256=.*|PKG_SHA256=\\\"${CALC_SHA256}\\\"|\" -i \"${PKG_DIR}/package.mk\"\n        break 2\n      else\n        build_msg \"CLR_WARNING\" \"WARNING\" \"Incorrect checksum calculated on downloaded file: got ${CALC_SHA256} wanted ${PKG_SHA256}\"\n        NBCHKS=$((NBCHKS - 1))\n      fi\n    fi\n  done\n  NBWGET=$((NBWGET - 1))\ndone\n\nif [ ${NBWGET} -eq 0 -o ${NBCHKS} -eq 0 ]; then\n  die \"\\nCannot get ${1} sources : ${PKG_URL}\\nTry later!\"\nelse\n  build_msg \"CLR_INFO\" \"INFO\" \"Calculated checksum: ${CALC_SHA256}\"\n  echo \"${PKG_URL}\" > \"${STAMP_URL}\"\n  echo \"${CALC_SHA256}\" > \"${STAMP_SHA}\"\nfi\n"
  },
  {
    "path": "scripts/get_file",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nbuild_msg \"CLR_GET\" \"GET\" \"${1} (file)\" \"indent\"\n\npkg_lock_status \"GETPKG\" \"${PKG_NAME}\" \"unpack\" \"processing package file...\"\n"
  },
  {
    "path": "scripts/get_git",
    "content": "# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n# Handler for git\n# Usage (in package.mk):\n# PKG_URL (mandatory) must point to a git repository (git://... or https://example.com/repo.git)\n# PKG_VERSION (mandatory) must point to a commit SHA, e.g. a1b2c3d\n# PKG_GIT_SHA (optional) full hash of git commit\n# PKG_GIT_CLONE_BRANCH (optional) clone specific branch\n# PKG_GIT_CLONE_SINGLE (optional) clone single branch only (set to yes)\n# PKG_GIT_CLONE_DEPTH (optional) history to clone, must be a number\n# PKG_GIT_SUBMODULE_DEPTH (optional) history of submodules to clone, must be a number\n\n_get_repo_already_downloaded() {\n  if [ -d \"${PACKAGE}\" ]; then\n    (\n      cd \"${PACKAGE}\"\n      _get_repo_clean\n      [ -n \"$(git ls-remote . | grep -m1 HEAD | awk \"/^${PKG_VERSION}/ {print \\$1;}\")\" ] || die \"ERROR: ${PACKAGE}: failed to determine git HEAD\"\n      [ \"${PKG_URL}\" = \"$(git remote get-url origin)\" ] || die \"ERROR: ${PACKAGE}: failed to obtain URL of origin\"\n      [ -z \"${PKG_GIT_CLONE_BRANCH}\" ] && exit 0\n      [ \"${PKG_GIT_CLONE_BRANCH}\" = \"$(git branch | grep ^\\* | cut -d ' ' -f2)\" ] || die \"ERROR: ${PACKAGE}: failed to determine current git branch\"\n      exit 0\n    )\n    return\n  else\n    return 1\n  fi\n}\n\n_get_repo_clean() {\n  git clean -fdx\n  git checkout -- .\n}\n\n# Latest file already present, exit now...\n_get_repo_already_downloaded && exit 0\n\nlock_source_dir \"${1}\"\n\n# Check again in case of concurrent access - if nothing needs to be downloaded, exit now...\n_get_repo_already_downloaded && exit 0\n\n# At this point, we need to download something...\nbuild_msg \"CLR_GET\" \"GET\" \"${1} (git)\" \"indent\"\n\npkg_lock_status \"GETPKG\" \"${PKG_NAME}\" \"unpack\" \"processing package repository...\"\n\nrm -f \"${STAMP_URL}\" \"${STAMP_SHA}\"\n\nGIT_CLONE_PARAMS=\"\"\nGIT_SUBMODULE_PARAMS=\"\"\n\n[ -n \"${PKG_GIT_CLONE_BRANCH}\" ] && GIT_CLONE_PARAMS=\"${GIT_CLONE_PARAMS} --branch ${PKG_GIT_CLONE_BRANCH}\"\n[ \"${PKG_GIT_CLONE_SINGLE}\" = \"yes\" ] && GIT_CLONE_PARAMS=\"${GIT_CLONE_PARAMS} --single-branch\"\n\nif [ -n \"${PKG_GIT_CLONE_DEPTH}\" ]; then\n  if [[ \"${PKG_GIT_CLONE_DEPTH}\" =~ ^[0-9]+$ ]]; then\n    GIT_CLONE_PARAMS=\"${GIT_CLONE_PARAMS} --depth ${PKG_GIT_CLONE_DEPTH}\"\n  else\n    die \"ERROR: PKG_GIT_CLONE_DEPTH is not a number! (${PKG_GIT_CLONE_DEPTH})\"\n  fi\nfi\n\nif [ -n \"${PKG_GIT_SUBMODULE_DEPTH}\" ]; then\n  if [[ \"${PKG_GIT_SUBMODULE_DEPTH}\" =~ ^[0-9]+$ ]]; then\n    GIT_SUBMODULE_PARAMS=\"${GIT_SUBMODULE_PARAMS} --depth ${PKG_GIT_SUBMODULE_DEPTH}\"\n  else\n    die \"ERROR: PKG_GIT_SUBMODULE_DEPTH is not a number! (${PKG_GIT_SUBMODULE_DEPTH})\"\n  fi\nfi\n\nGIT_FOUND=\"no\"\nopwd=\"$(pwd)\"\nfor d in \"${SOURCES}/${1}/${1}-\"*/ ; do\n  if [ -d \"${d}.git\" ]; then\n    if [ \"${GIT_FOUND}\" = \"no\" ]; then\n      cd \"${d}\"\n      if [ \"${PKG_URL}\" = \"$(git remote get-url origin)\" ]; then\n        if [[ -z \"${PKG_GIT_CLONE_BRANCH}\" ]] || [[ $(git branch | grep \"^\\* ${PKG_GIT_CLONE_BRANCH}$\" | wc -l) -eq 1 ]]; then\n          GIT_FOUND=\"yes\"\n          GIT_DIR=\"${d}\"\n          _get_repo_clean\n        elif [ $(git branch | grep \"^  ${PKG_GIT_CLONE_BRANCH}$\" | wc -l) -eq 1 ]; then\n          GIT_FOUND=\"yes\"\n          GIT_DIR=\"${d}\"\n          _get_repo_clean\n          git checkout \"${PKG_GIT_CLONE_BRANCH}\"\n        elif [ $(git branch -a | grep \"^  remotes/origin/${PKG_GIT_CLONE_BRANCH}$\" | wc -l) -eq 1 ]; then\n          GIT_FOUND=\"yes\"\n          GIT_DIR=\"${d}\"\n          _get_repo_clean\n          git checkout -b \"${PKG_GIT_CLONE_BRANCH}\" \"origin/${PKG_GIT_CLONE_BRANCH}\"\n        else\n          build_msg \"CLR_CLEAN\" \"DELETE\" \"(${d})\"\n          cd \"${opwd}\"\n          rm -rf \"${d}\"\n        fi\n        if [ \"${GIT_FOUND}\" = \"yes\" ]; then\n          build_msg \"CLR_GET\" \"GIT PULL\" \"${1}\"\n          git pull\n          cd \"${opwd}\"\n        fi\n      else\n        build_msg \"CLR_CLEAN\" \"DELETE\" \"(${d})\"\n        cd \"${opwd}\"\n        rm -rf \"${d}\"\n      fi\n    fi\n  else\n    build_msg \"CLR_CLEAN\" \"DELETE\" \"(${d})\"\n    rm -rf \"${d}\"\n  fi\ndone\ncd \"${opwd}\"\n\nif [ \"${GIT_FOUND}\" = \"no\" ]; then\n  build_msg \"CLR_GET\" \"GIT CLONE\" \"${1}\"\n  git clone ${GIT_CLONE_PARAMS} \"${PKG_URL}\" \"${PACKAGE}\"\nelif [ ! \"${GIT_DIR}\" = \"${PACKAGE}/\" ]; then\n  mv \"${GIT_DIR}\" \"${PACKAGE}\"\nfi\n\n( cd \"${PACKAGE}\"\n  [ $(git log --oneline --pretty=tformat:\"%H\" | grep \"^${PKG_VERSION}\" | wc -l) -eq 1 ] || die \"There is no commit '${PKG_VERSION}' on branch '$(git branch | grep ^\\* | cut -d ' ' -f2)' of package '${1}'! Aborting!\"\n  git reset --hard \"${PKG_VERSION}\"\n  build_msg \"CLR_GET\" \"GIT SUBMODULE\" \"${1}\"\n  git submodule update --init --recursive ${GIT_SUBMODULE_PARAMS}\n)\n\nGIT_SHA=\"$(git ls-remote \"${PACKAGE}\" | grep -m1 HEAD | awk '{print $1;}')\"\n\nif [ -n \"${PKG_GIT_SHA}\" -a \"${PKG_GIT_SHA}\" != \"${GIT_SHA}\" ]; then\n  build_msg \"CLR_WARNING\" \"WARNING\" \"Incorrect git hash in repository: got ${GIT_SHA}, wanted ${PKG_GIT_SHA}\"\nfi\n"
  },
  {
    "path": "scripts/image",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nunset _CACHE_PACKAGE_LOCAL_DEVICE _CACHE_PACKAGE_LOCAL _CACHE_PACKAGE_GLOBAL _DEBUG_DEPENDS_LIST _DEBUG_PACKAGE_LIST\n\n. config/options \"\"\n. config/multithread\n. config/show_config\n\n# Validate UBOOT_SYSTEM if it is specified\nif [ \"${BOOTLOADER}\" = \"u-boot\" -a -n \"${DEVICE}\" ]; then\n  if [ -z \"${UBOOT_SYSTEM}\" ]; then\n    ${SCRIPTS}/uboot_helper ${PROJECT} ${DEVICE} >/dev/null\n  else\n    ${SCRIPTS}/uboot_helper ${PROJECT} ${DEVICE} ${UBOOT_SYSTEM} dtb >/dev/null\n  fi\nfi\n\n${SCRIPTS}/checkdeps\n\n# Setup both toolchain cmake configs to avoid potentially racy behaviour later.\n# Use a fork for host to isolate any variable modifications.\n( setup_toolchain host )\nsetup_toolchain target\n\nshow_config\n\nfunction do_mkimage() {\n  # Variables used in mkimage script must be passed\n  env \\\n    ROOT=\"${ROOT}\" \\\n    SCRIPTS=\"${SCRIPTS}\" \\\n    TOOLCHAIN=\"${TOOLCHAIN}\" \\\n    PROJECT_DIR=\"${PROJECT_DIR}\" \\\n    PROJECT=\"${PROJECT}\" \\\n    DEVICE=\"${DEVICE}\" \\\n    DISTRO=\"${DISTRO}\" \\\n    TARGET_IMG=\"${TARGET_IMG}\" \\\n    BUILD_NAME=\"${IMAGE_NAME}\" \\\n    IMAGE_NAME=\"${1:-${IMAGE_NAME}}\" \\\n    BOOTLOADER=\"${BOOTLOADER}\" \\\n    KERNEL_NAME=\"${KERNEL_NAME}\" \\\n    TARGET_KERNEL_ARCH=\"${TARGET_KERNEL_ARCH}\" \\\n    RELEASE_DIR=\"${RELEASE_DIR}\" \\\n    UUID_SYSTEM=\"${UUID_SYSTEM}\" \\\n    UUID_STORAGE=\"${UUID_STORAGE}\" \\\n    DISTRO_BOOTLABEL=\"${DISTRO_BOOTLABEL}\" \\\n    DISTRO_DISKLABEL=\"${DISTRO_DISKLABEL}\" \\\n    UBOOT_SYSTEM=\"${UBOOT_SYSTEM}\" \\\n    EXTRA_CMDLINE=\"${EXTRA_CMDLINE}\" \\\n    SYSTEM_SIZE=\"${SYSTEM_SIZE}\" \\\n    SYSTEM_PART_START=\"${SYSTEM_PART_START}\" \\\n    OVA_SIZE=\"${OVA_SIZE}\" \\\n    SUBDEVICE=\"${SUBDEVICE}\" \\\n    ${SCRIPTS}/mkimage\n}\n\nif [ -n \"${CUSTOM_GIT_HASH}\" ]; then\n  GIT_HASH=\"${CUSTOM_GIT_HASH}\"\nelse\n  GIT_HASH=$(git rev-parse HEAD)\nfi\n\ncase \"${BUILD_PERIODIC}\" in\n  nightly)\n    OS_STAGE=\"nightly\"\n    BUILD_NUM=\"_$(date +%Y%m%d)\"\n  ;;\n  daily)\n    OS_STAGE=\"daily\"\n    BUILD_NUM=\"_$(date +%Y%j)\"\n  ;;\n  weekly)\n    OS_STAGE=\"weekly\"\n    BUILD_NUM=\"_$(date +%G%V)\"\n  ;;\n  monthly)\n    OS_STAGE=\"monthly\"\n    BUILD_NUM=\"_$(date +%Y%m)\"\n  ;;\n  *)\n    NON_PERIODIC=true\n  ;;\nesac\n\n# Get origin url, fix git:// and git@github.com: urls if necessary\nORIGIN_URL=\"$(git remote -v | awk '$1 == \"origin\" { print $2 }' | head -1 | sed -e 's#\\.git$##' -e 's#^git:#https:#' -e 's#^git@github\\.com:#https://github.com/#' -e 's#://.*@#://#')\"\n\n[ \"${BUILDER_NAME,,}\" = \"official\" ] && BUILDER_NAME=\nif [ \"${OFFICIAL}\" = \"yes\" ]; then\n  LIBREELEC_BUILD=$(echo `echo VDJabWFXTnBZV3dnTFNCRmJYVkZURVZESUdseklFWlNSVVVoSUU1UFZDQkdUMUlnVTBGTVJTRT0= | base64 --decode` | base64 --decode)\nelse\n  if [ ${NON_PERIODIC} ]; then\n    OS_STAGE=\"devel\"\n    BUILD_NUM=\"_$(date +%Y%m%d%H%M%S)\"\n  fi\n  if [ -n \"${BUILDER_NAME}\" ]; then\n    LIBREELEC_BUILD=\"${BUILDER_NAME}\"\n  else\n    LIBREELEC_BUILD=$(echo `echo UTI5dGJYVnVhWFI1SUMwZ1JXMTFSVXhGUXlCcGN5QkdVa1ZGSVNCT1QxUWdSazlTSUZOQlRFVWg= | base64 --decode` | base64 --decode)\n  fi\nfi\n\nif [ -n \"${OS_STAGE}\" -a ! \"${OS_STAGE}${BUILD_NUM}\" = \"build0\" ]; then\n  EXTRA_VERSION=\"_${OS_STAGE}${BUILD_NUM}\"\nfi\n\nLIBREELEC_VERSION=\"${OS_VERSION}-${OS_CODENAME}${EXTRA_VERSION}\"\n\nif [ -n \"${CUSTOM_VERSION}\" ]; then\n  LIBREELEC_VERSION=\"${CUSTOM_VERSION}\"\nfi\n\nLIBREELEC_ARCH=\"${DEVICE:-${PROJECT}}.${TARGET_ARCH}\"\nTARGET_VERSION=\"${LIBREELEC_ARCH}-${LIBREELEC_VERSION}\"\n\nif [ -n \"${CUSTOM_IMAGE_NAME}\" ]; then\n  IMAGE_NAME=\"${CUSTOM_IMAGE_NAME}\"\nelse\n  IMAGE_NAME=\"${DISTRONAME}-${TARGET_VERSION}\"\n\n  if [ -n \"${UBOOT_SYSTEM}\" ] && [ \"${UBOOT_SYSTEM}\" != \"${DEVICE:-${PROJECT}}\" ]; then\n    IMAGE_NAME=\"${IMAGE_NAME}-${UBOOT_SYSTEM}\"\n  fi\nfi\n\nif [ -n \"${IMAGE_SUFFIX}\" ]; then\n  IMAGE_NAME=\"${IMAGE_NAME}-${IMAGE_SUFFIX}\"\nfi\n\necho \"${IMAGE_NAME}\" > ${BUILD}/BUILD_FILENAME\n\n# Setup fakeroot\nrm -rf ${FAKEROOT_SCRIPT}   # remove ${FAKEROOT_SCRIPT} if it exist\ntouch ${FAKEROOT_SCRIPT}    # create an empty ${FAKEROOT_SCRIPT}\nchmod +x ${FAKEROOT_SCRIPT} # make ${FAKEROOT_SCRIPT} executable\necho \"chown -R 0:0 ${INSTALL}\" >> ${FAKEROOT_SCRIPT}\n\n# Clean old install dirs\nrm -rf ${BUILD}/qa_checks/general\nrm -rf ${INSTALL}\nrm -rf ${STAMPS_INSTALL}\nmkdir -p ${INSTALL}\n\n# Create base layout of LibreELEC read-only file system\nfor directory in etc dev proc run sys tmp usr var flash storage; do\n  mkdir -p ${INSTALL}/${directory}\ndone\n\n# Build image contents\nMTADDONBUILD=no start_multithread_build image || die \"Parallel build failure - see log for details. Time of failure: $(date)\"\n\necho\necho \"Successful build, creating image...\" >&2\n\n# Create legacy sym links\nln -sfn /var/media ${INSTALL}/media\nln -sfn /usr/lib ${INSTALL}/lib\nln -sfn /usr/bin ${INSTALL}/bin\nln -sfn /usr/sbin ${INSTALL}/sbin\n\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  ln -sfn /usr/lib ${INSTALL}/lib64\n  ln -sfn /usr/lib ${INSTALL}/usr/lib64\nfi\n\necho \"${TARGET_VERSION}\" > ${INSTALL}/etc/release\n\n# Create /etc/os-release\ncat <<EOF >${INSTALL}/etc/os-release\nNAME=\"${DISTRONAME}\"\nVERSION=\"${LIBREELEC_VERSION}\"\nID=\"${DISTRONAME,,}\"\nVERSION_ID=\"${OS_VERSION}\"\nPRETTY_NAME=\"${DISTRONAME} (${LIBREELEC_BUILD}): ${LIBREELEC_VERSION}\"\nHOME_URL=\"https://emuelec.org\"\nBUG_REPORT_URL=\"${ORIGIN_URL}\"\nBUILD_ID=\"${GIT_HASH}\"\nLIBREELEC_ARCH=\"${LIBREELEC_ARCH}\"\nLIBREELEC_BUILD=\"${LIBREELEC_BUILD}\"\nLIBREELEC_PROJECT=\"${PROJECT}\"\nCOREELEC_ARCH=\"${LIBREELEC_ARCH}\"\nCOREELEC_BUILD=\"${LIBREELEC_BUILD}\"\nCOREELEC_PROJECT=\"${PROJECT}\"\nEOF\n[ -n \"${DEVICE}\" ] && echo \"COREELEC_DEVICE=\\\"${DEVICE}\\\"\" >> ${INSTALL}/etc/os-release\n[ -n \"${BUILDER_NAME}\" ] && echo \"BUILDER_NAME=\\\"${BUILDER_NAME}\\\"\" >> ${INSTALL}/etc/os-release\n[ -n \"${BUILDER_VERSION}\" ] && echo \"BUILDER_VERSION=\\\"${BUILDER_VERSION}\\\"\" >> ${INSTALL}/etc/os-release\n\n# Add release notes / changelog\n\nif [ -n \"${RELEASE_NOTES}\" ] && [ -f \"${RELEASE_NOTES}\" ]; then\n  cp \"${RELEASE_NOTES}\" ${INSTALL}/etc/release-notes\nelse\n  echo \"\" > ${INSTALL}/etc/release-notes\nfi\n\n# Create /etc/issue\ncat <<EOF >${INSTALL}/etc/issue\n${GREETING0}\n${GREETING1}\n${GREETING2}\n${GREETING3}\n${GREETING4}\n${DISTRONAME} (${LIBREELEC_BUILD}): ${LIBREELEC_VERSION} (${LIBREELEC_ARCH})\nEOF\n\nln -sf /etc/issue ${INSTALL}/etc/motd\n\n# Copy PROJECT related files to filesystem\nif [ -d \"${PROJECT_DIR}/${PROJECT}/filesystem\" ]; then\n  cp -PR --remove-destination ${PROJECT_DIR}/${PROJECT}/filesystem/* ${INSTALL}\n  # Install project specific systemd services\n  for service in ${PROJECT_DIR}/${PROJECT}/filesystem/usr/lib/systemd/system/*.service; do\n    if [ -f \"${service}\" ]; then\n      enable_service ${service##*/}\n    fi\n  done\nfi\n\n# Copy DEVICE related files to filesystem\nif [ -n \"${DEVICE}\" -a -d \"${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/filesystem\" ]; then\n  cp -PR --remove-destination ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/filesystem/* ${INSTALL}\n  # Install device specific systemd services\n  for service in ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/filesystem/usr/lib/systemd/system/*.service; do\n    if [ -f \"${service}\" ]; then\n      enable_service ${service##*/}\n    fi\n  done\nfi\n\n# Replace placeholders with values in install script to eMMC\nif [ -f ${INSTALL}/usr/bin/install2emmc ]; then\n  sed -e \"s%@SYSTEM_SIZE@%${SYSTEM_SIZE}%g\" \\\n      -i ${INSTALL}/usr/bin/install2emmc\n  sed -e \"s%@DISTRONAME@%${DISTRONAME}%g\" \\\n      -i ${INSTALL}/usr/bin/install2emmc\nfi\n\n# Run depmod for base overlay modules\nMODVER=$(basename $(ls -d ${INSTALL}/usr/lib/kernel-overlays/base/lib/modules/*))\nfind ${INSTALL}/usr/lib/kernel-overlays/base/lib/modules/${MODVER}/ -name *.ko | \\\n  sed -e \"s,${INSTALL}/usr/lib/kernel-overlays/base/lib/modules/${MODVER}/,,\" \\\n    > ${INSTALL}/usr/lib/kernel-overlays/base/lib/modules/${MODVER}/modules.order\n${TOOLCHAIN}/bin/depmod -b ${INSTALL}/usr/lib/kernel-overlays/base -a -e -F \"$(get_install_dir linux)/.image/System.map\" ${MODVER} 2>&1\n\n# Strip kernel modules\nfor MOD in $(find ${INSTALL}/usr/lib/kernel-overlays/ -type f -name *.ko); do\n  ${TARGET_KERNEL_PREFIX}strip --strip-debug ${MOD}\ndone\n\n# Symlink overlayed modules to /usr/lib/modules\nln -sT /run/kernel-overlays/modules ${INSTALL}/usr/lib/modules\n\n# Symlink overlayed firmware to /usr/lib/firmware\nln -sT /run/kernel-overlays/firmware ${INSTALL}/usr/lib/firmware\n\n# Make target dir\nmkdir -p ${TARGET_IMG}\nrm -rf ${TARGET_IMG}/${IMAGE_NAME}.kernel\n\n# Copy kernel to target dir\ncp -PR $(get_install_dir linux)/.image/${KERNEL_TARGET} ${TARGET_IMG}/${IMAGE_NAME}.kernel\nchmod 0644 ${TARGET_IMG}/${IMAGE_NAME}.kernel\n\n# Set mksquashfs options for each compression method\nif [ -z \"${SQUASHFS_COMPRESSION_OPTION}\" ]; then\n  if [ \"${SQUASHFS_COMPRESSION:-gzip}\" = \"gzip\" ]; then\n    SQUASHFS_COMPRESSION_OPTION=\"-Xcompression-level 9 -b 262144\"\n  elif [ \"${SQUASHFS_COMPRESSION}\" = \"lzo\" ]; then\n    SQUASHFS_COMPRESSION_OPTION=\"-Xcompression-level 9 -b 524288\"\n  elif [ \"${SQUASHFS_COMPRESSION}\" = \"zstd\" ]; then\n    SQUASHFS_COMPRESSION_OPTION=\"-Xcompression-level 19 -b 1048576\"\n  fi\nfi\n\n# Create squashfs file, default to gzip if no compression configured\necho \"rm -rf \\\"${TARGET_IMG}/${IMAGE_NAME}.system\\\"\" >> ${FAKEROOT_SCRIPT}\necho \"${TOOLCHAIN}/bin/mksquashfs \\\"${BUILD}/image/system\\\" \\\"${TARGET_IMG}/${IMAGE_NAME}.system\\\" -noappend -comp ${SQUASHFS_COMPRESSION:-gzip} ${SQUASHFS_COMPRESSION_OPTION}\" >> ${FAKEROOT_SCRIPT}\n\n# Run fakeroot\n${TOOLCHAIN}/bin/fakeroot -- ${FAKEROOT_SCRIPT}\nrm -rf ${FAKEROOT_SCRIPT}\n\n# Set permissions\nchmod 0644 ${TARGET_IMG}/${IMAGE_NAME}.system\n\nif [ \"${1}\" = \"release\" -o \"${1}\" = \"mkimage\" -o \"${1}\" = \"noobs\" ]; then\n\n  RELEASE_DIR=\"target/${IMAGE_NAME}\"\n\n  # Cleanup\n  rm -rf ${RELEASE_DIR}\n\n  # Create release dir\n  mkdir -p ${RELEASE_DIR}\n\n  # Remove any previously created release images\n  rm -rf ${TARGET_IMG}/${IMAGE_NAME}.img.gz\n\n  if [ -n \"${BOOTLOADER}\" ]; then\n\n    BOOTLOADER_DIR=\"$(get_pkg_directory \"${BOOTLOADER}\")\"\n\n    if [ -d ${BOOTLOADER_DIR}/files ]; then\n      cp -R ${BOOTLOADER_DIR}/files/* ${RELEASE_DIR}\n    fi\n\n    if find_file_path bootloader/release ${BOOTLOADER_DIR}/release; then\n      echo \"Running ${FOUND_PATH}\"\n      . ${FOUND_PATH}\n    fi\n  fi\n\n  cp ${ROOT}/README* ${RELEASE_DIR}\n  cp ${ROOT}/CHANGELOG* ${RELEASE_DIR}\n  echo \"${TARGET_VERSION}\" > ${RELEASE_DIR}/RELEASE\n\n  if [ ! \"${MEDIACENTER}\" = \"no\" ]; then\n    echo \"Kodi commit: $(get_pkg_version ${MEDIACENTER})\" >> ${RELEASE_DIR}/RELEASE\n  fi\n\n  mkdir -p ${RELEASE_DIR}/licenses\n  cp ${ROOT}/licenses/* ${RELEASE_DIR}/licenses\n\n  mkdir -p ${RELEASE_DIR}/target\n  cp ${TARGET_IMG}/${IMAGE_NAME}.system ${RELEASE_DIR}/target/SYSTEM\n  cp ${TARGET_IMG}/${IMAGE_NAME}.kernel ${RELEASE_DIR}/target/KERNEL\n\n  # Create md5sum's\n  ( cd ${RELEASE_DIR};\n    md5sum -t target/SYSTEM > target/SYSTEM.md5;\n    md5sum -t target/KERNEL > target/KERNEL.md5;\n  )\n\n  # Create target directory\n  mkdir -p ${TARGET_IMG}\n\n  # Remove any previously created release tarballs\n  rm -rf ${TARGET_IMG}/${IMAGE_NAME}.tar\n\n  # Create release tarball\n  tar cf ${TARGET_IMG}/${IMAGE_NAME}.tar -C target ${IMAGE_NAME}\n\n  # Create sha256 checksum of tarball\n  ( cd ${TARGET_IMG}\n    sha256sum ${IMAGE_NAME}.tar > ${IMAGE_NAME}.tar.sha256\n  )\n\n  # Create image files if requested\n  if [[ ( \"${1}\" = \"noobs\" || \"${1}\" = \"mkimage\" ) && -n \"${BOOTLOADER}\" ]]; then\n    UUID_SYSTEM=\"$(date '+%d%m')-$(date '+%M%S')\"\n    UUID_STORAGE=\"$(uuidgen)\"\n\n    DEVICE_BOARDS=\n    if [ \"${BOOTLOADER}\" = \"u-boot\" -a -z \"${UBOOT_SYSTEM}\" -a -n \"${DEVICE}\" ]; then\n      DEVICE_BOARDS=$(${SCRIPTS}/uboot_helper \"${PROJECT}\" \"${DEVICE}\")\n    fi\n\n    if [ -n \"${DEVICE_BOARDS}\" ]; then\n      for UBOOT_SYSTEM in ${DEVICE_BOARDS}; do\n        echo \"Installing u-boot for board ${UBOOT_SYSTEM}...\"\n\n        # Re-install u-boot package\n        rm ${STAMPS_INSTALL}/u-boot/install_target\n        UBOOT_SYSTEM=\"${UBOOT_SYSTEM}\" ${SCRIPTS}/install u-boot 2>&1\n\n        # Re-run bootloader/release\n        if find_file_path bootloader/release ${BOOTLOADER_DIR}/release; then\n          echo \"Running ${FOUND_PATH}\"\n          . ${FOUND_PATH}\n        fi\n\n        do_mkimage \"${IMAGE_NAME}-${UBOOT_SYSTEM}\"\n      done\n    else\n      if [ -n \"${SUBDEVICES}\" ]; then\n        [ \"${PROJECT}\" = \"Amlogic-ce\" ] && SUBDEVICES+=\" Generic\"\n        for SUBDEVICE in ${SUBDEVICES}; do\n          do_mkimage \"${IMAGE_NAME}\"\n        done\n      else\n        do_mkimage\n      fi\n    fi\n  fi\n\n  # Cleanup release dir\n  rm -rf ${RELEASE_DIR}\n\n  if [ \"${1}\" = \"noobs\" ]; then\n    echo \"Creating \\\"${1}\\\" release tarball...\"\n\n    RELEASE_DIR=\"${TARGET_IMG}/${IMAGE_NAME}-${1}\"\n\n    # eg. LibreELEC_RPi, LibreELEC_RPi2 etc.\n    NOOBS_DISTRO=\"${DISTRONAME}_${DEVICE:-${PROJECT}}\"\n\n    # Create release dir\n    mkdir -p ${RELEASE_DIR}/${NOOBS_DISTRO}\n\n    if [ -f ${DISTRO_DIR}/${DISTRO}/${DISTRONAME}_40x40.png ]; then\n      cp -PR ${DISTRO_DIR}/${DISTRO}/${DISTRONAME}_40x40.png ${RELEASE_DIR}/${NOOBS_DISTRO}/${NOOBS_DISTRO}.png\n    else\n      cp -PR ${DISTRO_DIR}/${DISTRO}/${DISTRONAME}.png ${RELEASE_DIR}/${NOOBS_DISTRO}/${NOOBS_DISTRO}.png\n    fi\n    cp -PR ${ROOT}/config/noobs/os.json ${RELEASE_DIR}/${NOOBS_DISTRO}\n    cp -PR ${ROOT}/config/noobs/partition_setup.sh ${RELEASE_DIR}/${NOOBS_DISTRO}\n    cp -PR ${ROOT}/config/noobs/partitions.json ${RELEASE_DIR}/${NOOBS_DISTRO}\n    if [ -d ${DISTRO_DIR}/${DISTRO}/noobs/marketing ]; then\n      tar cf ${RELEASE_DIR}/${NOOBS_DISTRO}/marketing.tar -C ${DISTRO_DIR}/${DISTRO}/noobs/marketing .\n    else\n      tar cf ${RELEASE_DIR}/${NOOBS_DISTRO}/marketing.tar -C ${ROOT}/config/noobs/marketing .\n    fi\n    cp ${ROOT}/README* ${RELEASE_DIR}/${NOOBS_DISTRO}\n    cp ${ROOT}/CHANGELOG ${RELEASE_DIR}/${NOOBS_DISTRO}/release_notes.txt\n\n    if [ -n \"${NOOBS_HEX}\" ]; then\n      sed -e \"s%@NOOBS_HEX@%${NOOBS_HEX}%g\" \\\n          -i ${RELEASE_DIR}/${NOOBS_DISTRO}/os.json\n    else\n      sed -e \"/@NOOBS_HEX@/d\" \\\n          -i ${RELEASE_DIR}/${NOOBS_DISTRO}/os.json\n    fi\n\n    sed -e \"s%@DISTRONAME@%${DISTRONAME}%g\" \\\n        -e \"s%@PROJECT@%${DEVICE:-${PROJECT}}%g\" \\\n        -e \"s%@LIBREELEC_VERSION@%${LIBREELEC_VERSION}%g\" \\\n        -e \"s%@RELEASE_DATE@%$(date +%F)%g\" \\\n        -e \"s%@KERNEL_VERSION@%$(kernel_version)%g\" \\\n        -e \"s%@DESCRIPTION@%${DESCRIPTION}%g\" \\\n        -e \"s%@ROOT_PASSWORD@%${ROOT_PASSWORD}%g\" \\\n        -e \"s%@NOOBS_SUPPORTED_MODELS@%${NOOBS_SUPPORTED_MODELS}%g\" \\\n        -i ${RELEASE_DIR}/${NOOBS_DISTRO}/os.json\n\n    sed -e \"s%@DISTRONAME@%${DISTRONAME}%g\" \\\n        -e \"s%@PROJECT@%${DEVICE:-${PROJECT}}%g\" \\\n        -e \"s%@SYSTEM_SIZE@%${SYSTEM_SIZE}%g\" \\\n        -i ${RELEASE_DIR}/${NOOBS_DISTRO}/partitions.json\n\n    sed -e \"s%@EXTRA_CMDLINE@%${EXTRA_CMDLINE}%g\" \\\n        -i ${RELEASE_DIR}/${NOOBS_DISTRO}/partition_setup.sh\n\n    # Create System dir\n    mkdir -p ${RELEASE_DIR}/${NOOBS_DISTRO}/System\n\n    # Copy Bootloader\n    cp -PR ${INSTALL}/usr/share/bootloader/config.txt ${RELEASE_DIR}/${NOOBS_DISTRO}/System/\n    for distro in \"${INSTALL}/usr/share/bootloader/distroconfig\"*.txt ; do\n      if [ -f \"${distro}\" ]; then\n        cp -PR \"${distro}\" ${RELEASE_DIR}/${NOOBS_DISTRO}/System/\n      fi\n    done\n    cp -PR ${INSTALL}/usr/share/bootloader/LICENCE* ${RELEASE_DIR}/${NOOBS_DISTRO}/System/\n    for f in bootcode.bin fixup.dat start.elf ; do\n      if [ -f \"${INSTALL}/usr/share/bootloader/$f\" ]; then\n        cp -PR \"${INSTALL}/usr/share/bootloader/$f\" \"${RELEASE_DIR}/${NOOBS_DISTRO}/System/\"\n      fi\n    done\n\n    # Copy system files\n    cp ${TARGET_IMG}/${IMAGE_NAME}.system ${RELEASE_DIR}/${NOOBS_DISTRO}/System/SYSTEM\n    cp ${TARGET_IMG}/${IMAGE_NAME}.kernel ${RELEASE_DIR}/${NOOBS_DISTRO}/System/kernel.img\n\n    for dtb in ${INSTALL}/usr/share/bootloader/*.dtb; do\n      if [ -f ${dtb} ]; then\n        cp -PR ${dtb} ${RELEASE_DIR}/${NOOBS_DISTRO}/System\n      fi\n    done\n\n    for overlay in ${INSTALL}/usr/share/bootloader/overlays/*; do\n      if [ -f ${overlay} ]; then\n        mkdir -p ${RELEASE_DIR}/${NOOBS_DISTRO}/System/overlays\n        cp -PR ${overlay} ${RELEASE_DIR}/${NOOBS_DISTRO}/System/overlays\n      fi\n    done\n\n    # Create md5sum's\n    ( cd ${RELEASE_DIR}/${NOOBS_DISTRO}/System;\n      md5sum -t SYSTEM > SYSTEM.md5;\n      md5sum -t kernel.img > kernel.img.md5;\n    )\n\n    # Copy additional files\n    mkdir -p ${RELEASE_DIR}/${NOOBS_DISTRO}/System/licenses\n    cp ${ROOT}/licenses/* ${RELEASE_DIR}/${NOOBS_DISTRO}/System/licenses\n\n    # Create Storage dir\n    mkdir -p ${RELEASE_DIR}/${NOOBS_DISTRO}/Storage\n\n    # Remove any previously created release tarball\n    rm -rf ${RELEASE_DIR}/${NOOBS_DISTRO}/System.tar.xz\n    rm -rf ${RELEASE_DIR}/${NOOBS_DISTRO}/Storage.tar.xz\n\n    # Create filesystem tarballs\n    ${TOOLCHAIN}/bin/fakeroot tar cJf ${RELEASE_DIR}/${NOOBS_DISTRO}/System.tar.xz -C ${RELEASE_DIR}/${NOOBS_DISTRO}/System/ .\n    ${TOOLCHAIN}/bin/fakeroot tar cJf ${RELEASE_DIR}/${NOOBS_DISTRO}/Storage.tar.xz -C ${RELEASE_DIR}/${NOOBS_DISTRO}/Storage/ .\n\n    # Remove filesystem dirs\n    rm -rf ${RELEASE_DIR}/${NOOBS_DISTRO}/System\n    rm -rf ${RELEASE_DIR}/${NOOBS_DISTRO}/Storage\n\n    # Remove any previously created release tarball\n    rm -rf ${TARGET_IMG}/${IMAGE_NAME}-${1}.tar\n\n    # Create release tarball\n    tar cf ${TARGET_IMG}/${IMAGE_NAME}-${1}.tar -C ${TARGET_IMG} ${IMAGE_NAME}-${1}\n\n    # Create sha256 checksum of tarball\n    ( cd ${TARGET_IMG}\n      sha256sum ${IMAGE_NAME}-${1}.tar > ${IMAGE_NAME}-${1}.tar.sha256\n    )\n  fi\n\n  if [ -d ${RELEASE_DIR} ]; then\n    # Cleanup release dir\n    rm -rf ${RELEASE_DIR}\n  fi\nfi\n\nif [ -n \"$(ls -1 ${BUILD}/qa_checks/ 2>/dev/null)\" ]; then\n  log_qa_check \"qa_issues\" \"QA issues present, please fix!\\n$(find ${BUILD}/qa_checks/* -type f ! -name qa_issues)\\n\"\nfi\n\n# remove unneeded files in target folder\nif [ \"$COREELEC_TARGET_REMOVE\" = \"kernel_system\" ]; then\n  rm -f ${TARGET_IMG}/*.kernel\n  rm -f ${TARGET_IMG}/*.system\nelif [ \"$COREELEC_TARGET_REMOVE\" = \"kernel_system_sha256\" ]; then\n  rm -f ${TARGET_IMG}/*.kernel\n  rm -f ${TARGET_IMG}/*.system\n  rm -f ${TARGET_IMG}/*.sha256\nfi\n"
  },
  {
    "path": "scripts/install",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2010-2011 Roman Weber (roman@openelec.tv)\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"${1}\"\n\nif [ -z \"${1}\" ]; then\n  die \"usage: ${0} package_name [parent_pkg]\"\nfi\n\nif [ -z \"${PKG_NAME}\" ]; then\n  die \"$(print_color CLR_ERROR \"${1}: no package.mk file found\")\"\nfi\n\nif [ -z \"${INSTALL}\" ] ; then\n  die \"error: '\\${INSTALL}' not set! this script is not intended to be run manually\"\nfi\n\nif [ -n \"${PKG_ARCH}\" ]; then\n  listcontains \"${PKG_ARCH}\" \"!${TARGET_ARCH}\" && exit 0\n  listcontains \"${PKG_ARCH}\" \"${TARGET_ARCH}\" || listcontains \"${PKG_ARCH}\" \"any\" || exit 0\nfi\n\n# set defaults\nif [ \"${1//:/}\" != \"${1}\" ]; then\n  TARGET=\"${1#*:}\"\nelse\n  TARGET=\nfi\n[ -z \"${TARGET}\" ] && TARGET=\"target\"\nPARENT_PKG=\"${2:-${PKG_NAME}:${TARGET}}\"\n\npkg_lock \"${PKG_NAME}:${TARGET}\" \"install\" \"${PARENT_PKG}\"\n\nSTAMP=${STAMPS_INSTALL}/${PKG_NAME}/install_${TARGET}\nif [ -f ${STAMP} ]; then\n  pkg_lock_status \"UNLOCK\" \"${PKG_NAME}:${TARGET}\" \"install\" \"already installed\"\n  exit 0\nfi\n\nmkdir -p ${STAMPS_INSTALL}/${PKG_NAME}\n\n${SCRIPTS}/build \"${1}\" \"${PARENT_PKG}\"\n\nif is_sequential_build || [ \"${PARENT_PKG}\" = \"initramfs:target\" ]; then\n  if [ \"${TARGET}\" = \"target\" ] ; then\n    for p in ${PKG_DEPENDS_TARGET}; do\n      ${SCRIPTS}/install \"${p}\" \"${PARENT_PKG}\"\n    done\n  elif [ \"${TARGET}\" = \"init\" ] ; then\n    for p in ${PKG_DEPENDS_INIT}; do\n      ${SCRIPTS}/install \"${p}\" \"${PARENT_PKG}\"\n    done\n  fi\nfi\nif [ \"${TARGET}\" = \"init\" ] ; then\n  INSTALL=${BUILD}/initramfs\nfi\n\npkg_lock_status \"ACTIVE\" \"${PKG_NAME}:${TARGET}\" \"install\"\n\nbuild_msg \"CLR_INSTALL\" \"INSTALL\" \"${PKG_NAME} $(print_color CLR_TARGET \"(${TARGET})\")\" \"indent\"\n\nprint_qa_checks\n\nacquire_update_lock image\n\nmkdir -p ${INSTALL}\n\nif [ \"${TARGET}\" = \"target\" ] ; then\n  for PKG_TMP_DIR in ${PKG_DIR} \\\n                     ${PROJECT_DIR}/${PROJECT}/packages/${PKG_NAME} \\\n                     ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/packages/${PKG_NAME} \\\n                     ; do\n\n    [ -d ${PKG_TMP_DIR} ] || continue\n\n    if [ -d ${PKG_TMP_DIR}/profile.d ]; then\n      mkdir -p ${INSTALL}/etc/profile.d\n      cp ${PKG_TMP_DIR}/profile.d/*.conf ${INSTALL}/etc/profile.d\n    fi\n\n    if [ -d ${PKG_TMP_DIR}/tmpfiles.d ]; then\n      mkdir -p ${INSTALL}/usr/lib/tmpfiles.d\n      cp ${PKG_TMP_DIR}/tmpfiles.d/*.conf ${INSTALL}/usr/lib/tmpfiles.d\n    fi\n\n    if [ -d ${PKG_TMP_DIR}/system.d ]; then\n      mkdir -p ${INSTALL}/usr/lib/systemd/system\n      cp -Pr ${PKG_TMP_DIR}/system.d/*.* ${INSTALL}/usr/lib/systemd/system\n    fi\n\n    if [ -d ${PKG_TMP_DIR}/udev.d ]; then\n      mkdir -p ${INSTALL}/usr/lib/udev/rules.d\n      cp ${PKG_TMP_DIR}/udev.d/*.rules ${INSTALL}/usr/lib/udev/rules.d\n    fi\n\n    if [ -d ${PKG_TMP_DIR}/hwdb.d ]; then\n      mkdir -p ${INSTALL}/usr/lib/udev/hwdb.d\n      cp ${PKG_TMP_DIR}/hwdb.d/*.hwdb ${INSTALL}/usr/lib/udev/hwdb.d\n    fi\n\n    if [ -d ${PKG_TMP_DIR}/sleep.d ]; then\n      mkdir -p ${INSTALL}/usr/lib/systemd/system-sleep\n      cp ${PKG_TMP_DIR}/sleep.d/* ${INSTALL}/usr/lib/systemd/system-sleep\n    fi\n\n    if [ -d ${PKG_TMP_DIR}/sleep.d.serial ]; then\n      mkdir -p ${INSTALL}/usr/lib/systemd/system-sleep.serial\n      cp ${PKG_TMP_DIR}/sleep.d.serial/* ${INSTALL}/usr/lib/systemd/system-sleep.serial\n    fi\n\n    if [ -d ${PKG_TMP_DIR}/sysctl.d ]; then\n      mkdir -p ${INSTALL}/usr/lib/sysctl.d\n      cp ${PKG_TMP_DIR}/sysctl.d/*.conf ${INSTALL}/usr/lib/sysctl.d\n    fi\n\n    if [ -d ${PKG_TMP_DIR}/modules-load.d ]; then\n      mkdir -p ${INSTALL}/usr/lib/modules-load.d\n      cp ${PKG_TMP_DIR}/modules-load.d/*.conf ${INSTALL}/usr/lib/modules-load.d\n    fi\n\n    if [ -d ${PKG_TMP_DIR}/sysconf.d ]; then\n      mkdir -p ${INSTALL}/etc/sysconf.d\n      cp ${PKG_TMP_DIR}/sysconf.d/*.conf ${INSTALL}/etc/sysconf.d\n    fi\n\n    if [ -d ${PKG_TMP_DIR}/debug.d ]; then\n      mkdir -p ${INSTALL}/usr/share/debugconf\n      cp ${PKG_TMP_DIR}/debug.d/*.conf ${INSTALL}/usr/share/debugconf\n    fi\n\n    if [ -d ${PKG_TMP_DIR}/modprobe.d ]; then\n      mkdir -p ${INSTALL}/usr/lib/modprobe.d\n      cp ${PKG_TMP_DIR}/modprobe.d/*.conf ${INSTALL}/usr/lib/modprobe.d\n    fi\n  done\nfi\n\n# install\nif [ \"${TARGET}\" = \"target\" ] ; then\n  pkg_call_exists_opt pre_install && pkg_call\nfi\n\nif [ -n \"${PKG_INSTALL}\" -a -d \"${PKG_INSTALL}\" ]; then\n  tar \\\n    -C \"${PKG_INSTALL}\" \\\n    --exclude=./usr/local/include \\\n    --exclude=./usr/local/lib/cmake \\\n    --exclude=./usr/local/lib/pkgconfig \\\n    --exclude=./usr/local/share/aclocal \\\n    --exclude=./usr/local/share/pkgconfig \\\n    --exclude=./usr/include \\\n    --exclude=./usr/lib/cmake \\\n    --exclude=./usr/lib/pkgconfig \\\n    --exclude=./usr/lib32/cmake \\\n    --exclude=./usr/lib32/pkgconfig \\\n    --exclude=./usr/share/aclocal \\\n    --exclude=./usr/share/pkgconfig \\\n    --exclude=./include \\\n    --exclude=./lib/cmake \\\n    --exclude=./lib/pkgconfig \\\n    --exclude=./share/aclocal \\\n    --exclude=./share/pkgconfig \\\n    --exclude=./.* \\\n    --exclude='*.a' \\\n    --exclude='*.la' \\\n    -cf - . | tar -C \"${INSTALL}\" -xf -\nfi\n\nif [ \"${TARGET}\" = \"target\" ] ; then\n  pkg_call_exists_opt post_install && pkg_call\nfi\n\nrelease_update_lock\n\ntouch ${STAMP}\n\npkg_lock_status \"UNLOCK\" \"${PKG_NAME}:${TARGET}\" \"install\" \"installed\"\n"
  },
  {
    "path": "scripts/install_addon",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"${1}\"\n\npkg_lock \"${PKG_NAME}\" \"packadd\"\npkg_lock_status \"ACTIVE\" \"${PKG_NAME}\" \"packadd\"\n\n# cleanup old install path\nrm -rf \"${ADDON_BUILD}\"\n\n# install addon parts\nif pkg_call_exists addon; then\n  pkg_call\nelse\n  install_binary_addon \"${PKG_ADDON_ID}\"\n  pkg_call_finish\nfi\n\n# Make sure we have a value for STRIP\nsetup_toolchain target\n\nADDON_DIRECTORY=\"${ADDON_BUILD}/${PKG_ADDON_ID}\"\n\ninstall_addon_files \"${ADDON_DIRECTORY}\"\n\ndebug_strip \"${ADDON_DIRECTORY}\"\n\n# pack_addon()\nADDON_INSTALL_DIR=\"${TARGET_ADDONS}/${PKG_ADDON_ID}\"\nADDONVER=\"$(xmlstarlet sel -t -v \"/addon/@version\" ${ADDON_BUILD}/${PKG_ADDON_ID}/addon.xml)\"\n\nif [ -f ${ADDON_INSTALL_DIR}/${PKG_ADDON_ID}-${ADDONVER}.zip ]; then\n  if [ \"${ADDON_OVERWRITE}\" = \"yes\" ]; then\n    rm ${ADDON_INSTALL_DIR}/${PKG_ADDON_ID}-${ADDONVER}.zip\n  else\n    build_msg \"CLR_WARNING\" \"*** WARNING: ${PKG_ADDON_ID}-${ADDONVER}.zip already exists. Not overwriting it. ***\"\n    pkg_lock_status \"UNLOCK\" \"${PKG_NAME}\" \"packadd\" \"already packed\"\n    exit 0\n  fi\nfi\n\ncd ${ADDON_BUILD}/${PKG_ADDON_ID}\n\n# move icon and fanart image into resources folder\nADDON_ICON=$(xmlstarlet sel -t -v \"//addon/extension/assets/icon\" addon.xml || :)\nADDON_FANART=$(xmlstarlet sel -t -v \"//addon/extension/assets/fanart\" addon.xml || :)\n\nif [ -n \"${ADDON_ICON}\" ] && [[ ${ADDON_ICON} != resources/* ]]; then\n  rm -f resources/icon.png\n  mv ${ADDON_ICON} resources\n  xmlstarlet ed -L -u \"//addon/extension/assets/icon\" -v \"resources/${ADDON_ICON}\" addon.xml\nfi\n\nif [ -n \"${ADDON_FANART}\" ] && [[ ${ADDON_FANART} != resources/* ]]; then\n  rm -f resources/fanart.png\n  mv ${ADDON_FANART} resources\n  xmlstarlet ed -L -u \"//addon/extension/assets/fanart\" -v \"resources/${ADDON_FANART}\" addon.xml\nfi\n\n# remove unused distro fanart in case addon has it's own in .jpg format\n[ -f resources/fanart.jpg -a -f resources/fanart.png ] && rm resources/fanart.png\n\ncd ${ADDON_BUILD}\nbuild_msg \"CLR_INFO\" \"*** compressing addon ${PKG_ADDON_ID} ... ***\"\n${TOOLCHAIN}/bin/7za a -l -mx9 -bsp0 -bso0 -tzip ${PKG_ADDON_ID}-${ADDONVER}.zip ${PKG_ADDON_ID}\ncd - &>/dev/null\n\nmkdir -p ${ADDON_INSTALL_DIR}\ncp ${ADDON_BUILD}/${PKG_ADDON_ID}-${ADDONVER}.zip ${ADDON_INSTALL_DIR}\nif [ -f ${ADDON_BUILD}/${PKG_ADDON_ID}/changelog.txt ]; then\n  cp ${ADDON_BUILD}/${PKG_ADDON_ID}/changelog.txt ${ADDON_INSTALL_DIR}/changelog-${ADDONVER}.txt\nfi\n\nfor f in ${ADDON_BUILD}/${PKG_ADDON_ID}/resources/{icon,fanart,screenshot-*}.{jpg,png}; do\n  if [ -f \"${f}\" ]; then\n    mkdir -p ${ADDON_INSTALL_DIR}/resources\n    cp ${f} ${ADDON_INSTALL_DIR}/resources\n  fi\ndone\n\n# Jenkins add-on build\nif [ \"${ADDON_JENKINS}\" = \"yes\" ]; then\n  ADDON_JENKINS_DIR=\"${TARGET_IMG}/jenkins\"\n  ADDON_JENKINS_ADDON_NAME=\"${ADDON_VERSION}-${DEVICE:-${PROJECT}}-${TARGET_ARCH}-${PKG_ADDON_ID}-${ADDONVER}\"\n  mkdir -p \"${ADDON_JENKINS_DIR}\"\n  cd ${ADDON_INSTALL_DIR}\n  ${TOOLCHAIN}/bin/7za a -l -mx0 -bsp0 -bso0 -tzip ${ADDON_JENKINS_DIR}/${ADDON_JENKINS_ADDON_NAME}.zip ${PKG_ADDON_ID}-${ADDONVER}.zip resources/\n  ( cd ${ADDON_JENKINS_DIR}\n    sha256sum ${ADDON_JENKINS_ADDON_NAME}.zip > ${ADDON_JENKINS_ADDON_NAME}.zip.sha256\n  )\n  build_msg \"CLR_INFO\" \"*** creating ${ADDON_JENKINS_ADDON_NAME}.zip for Jenkins complete ***\"\nelse\n  build_msg \"CLR_INFO\" \"*** creating  ${PKG_ADDON_ID} complete ***\"\nfi\n\npkg_lock_status \"UNLOCK\" \"${PKG_NAME}\" \"packadd\" \"packed\"\n"
  },
  {
    "path": "scripts/makefile_helper",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\nset -e\n\n# If config/options can't be sourced, abort. PWD isn't the expected ROOT.\n# Only source from config/options what will be used\nBUILD_ROOT=$(PROJECT= DEVICE= ARCH= . config/options \"\" && echo \"${BUILD_ROOT}\")\nBUILD_BASE=$(PROJECT= DEVICE= ARCH= . config/options \"\" && echo \"${BUILD_BASE}\")\n\nif [ -z \"${BUILD_BASE}\" -o -z \"${BUILD_ROOT}\" ]; then\n  # make sure variables are set before running an rm\n  echo \"error: ${0}: both BUILD_BASE and BUILD_ROOT must be set when running \\\"[clean|distclean]\\\"; aborting\"\n  exit 1\nfi\n\n# task handling\ncase $1 in\n  --clean)\n    rm -rf \"${BUILD_ROOT}/${BUILD_BASE}.\"*/* \"${BUILD_ROOT}/${BUILD_BASE}.\"*/.stamps\n  ;;\n  --distclean)\n    rm -rf \"${BUILD_ROOT}/.ccache\" \"${BUILD_ROOT}/${BUILD_BASE}.\"*\n  ;;\n  *)\n    echo \"error: ${0}: unsupported option on CLI; aborting\"\n    exit 1\n  ;;\nesac\n"
  },
  {
    "path": "scripts/mkimage",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n################################################################################\n# variables such as ${ROOT} ${PATH} etc... that are required for this\n# script to work must be passed via env ... in scripts/image\n################################################################################\n\n# set variables\nLE_TMP=$(mktemp -d -p ${TARGET_IMG})\nSAVE_ERROR=\"${LE_TMP}/save_error\"\n\nif [ -z \"${SYSTEM_SIZE}\" -o -z \"${SYSTEM_PART_START}\" ]; then\n  echo \"mkimage: SYSTEM_SIZE and SYSTEM_PART_START must be configured!\"\n  exit 1\nfi\n\nif [ \"${BOOTLOADER}\" = \"syslinux\" ]; then\n  DISK_GPT_PADDING=1\n  DISK_LABEL=gpt\nelse\n  DISK_GPT_PADDING=0\n  DISK_LABEL=msdos\nfi\n\nSTORAGE_SIZE=32 # STORAGE_SIZE must be >= 32 !\nDISK_START_PADDING=$(( (${SYSTEM_PART_START} + 2048 - 1) / 2048 ))\nDISK_SIZE=$(( ${DISK_START_PADDING} + ${SYSTEM_SIZE} + ${STORAGE_SIZE} + ${DISK_GPT_PADDING} ))\nDISK_BASENAME=\"${TARGET_IMG}/${IMAGE_NAME}\"\nif [ -n \"${SUBDEVICE}\" ]; then\n  DISK_BASENAME=\"${DISK_BASENAME}-${SUBDEVICE}\"\nfi\nDISK=\"${DISK_BASENAME}.img\"\n\n# functions\ncleanup() {\n  echo -e \"image: cleanup...\\n\"\n  rm -rf \"${LE_TMP}\"\n}\n\nshow_error() {\n  echo \"image: An error has occurred...\"\n  echo\n  if [ -s \"${SAVE_ERROR}\" ]; then\n    cat \"${SAVE_ERROR}\"\n  else\n    echo \"Folder ${LE_TMP} might be out of free space...\"\n  fi\n  echo\n  cleanup\n  exit 1\n}\n\ntrap cleanup SIGINT\n\n# create an image\necho -e \"\\nimage: creating sparse file for disk image ${DISK##*/}...\"\ndd if=/dev/zero of=\"${DISK}\" bs=1M count=0 seek=\"${DISK_SIZE}\" conv=fsync >\"${SAVE_ERROR}\" 2>&1 || show_error\n\n# write a disklabel\necho \"image: creating ${DISK_LABEL} partition table...\"\nparted -s \"${DISK}\" mklabel ${DISK_LABEL}\nsync\n\n# create partitions\necho \"image: creating partitions...\"\n\nSYSTEM_PART_END=$(( ${SYSTEM_PART_START} + (${SYSTEM_SIZE} * 1024 * 1024 / 512) - 1 ))\nSTORAGE_PART_START=$(( ${SYSTEM_PART_END} + 1 ))\nSTORAGE_PART_END=$(( ${STORAGE_PART_START} + (${STORAGE_SIZE} * 1024 * 1024 / 512) - 1 ))\n\nif [ \"${DISK_LABEL}\" = \"gpt\" ]; then\n  parted -s \"${DISK}\" -a min unit s mkpart system  fat32 ${SYSTEM_PART_START}  ${SYSTEM_PART_END}\n  parted -s \"${DISK}\" -a min unit s mkpart storage ext4  ${STORAGE_PART_START} ${STORAGE_PART_END}\n  parted -s \"${DISK}\" set 1 legacy_boot on\nelse\n  parted -s \"${DISK}\" -a min unit s mkpart primary fat32 ${SYSTEM_PART_START}  ${SYSTEM_PART_END}\n  parted -s \"${DISK}\" -a min unit s mkpart primary ext4  ${STORAGE_PART_START} ${STORAGE_PART_END}\n  parted -s \"${DISK}\" set 1 boot on\nfi\nsync\n\nif [ \"${BOOTLOADER}\" = \"syslinux\" ]; then\n  # write mbr\n  echo \"image: writing mbr...\"\n  dd bs=440 count=1 conv=fsync,notrunc if=\"${TOOLCHAIN}/share/syslinux/gptmbr.bin\" of=\"${DISK}\" >\"${SAVE_ERROR}\" 2>&1 || show_error\nfi\n\n# create part2 to format and copy files\necho \"image: creating sparse file for part2...\"\nSTORAGE_PART_COUNT=$(( ${STORAGE_PART_END} - ${STORAGE_PART_START} + 1 ))\nsync\ndd if=\"${DISK}\" of=\"${LE_TMP}/part2.ext4\" bs=512 count=0 seek=\"${STORAGE_PART_COUNT}\" conv=fsync >\"${SAVE_ERROR}\" 2>&1 || show_error\n\n# create filesystem on part2\necho \"image: creating filesystem on part2...\"\nmke2fs -F -q -t ext4 -m 0 \"${LE_TMP}/part2.ext4\"\ntune2fs -L \"${DISTRO_DISKLABEL}\" -U ${UUID_STORAGE} \"${LE_TMP}/part2.ext4\" >\"${SAVE_ERROR}\" 2>&1 || show_error\ne2fsck -n \"${LE_TMP}/part2.ext4\" >\"${SAVE_ERROR}\" 2>&1 || show_error\nsync\n\n# add resize mark\nmkdir \"${LE_TMP}/part2.fs\"\ntouch \"${LE_TMP}/part2.fs/.please_resize_me\"\necho \"image: populating filesystem on part2...\"\npopulatefs -U -d \"${LE_TMP}/part2.fs\" \"${LE_TMP}/part2.ext4\" >\"${SAVE_ERROR}\" 2>&1 || show_error\nsync\ne2fsck -n \"${LE_TMP}/part2.ext4\" >\"${SAVE_ERROR}\" 2>&1 || show_error\n\n# merge part2 into disk image\necho \"image: merging part2 into disk image...\"\ndd if=\"${LE_TMP}/part2.ext4\" of=\"${DISK}\" bs=512 seek=\"${STORAGE_PART_START}\" conv=fsync,notrunc >\"${SAVE_ERROR}\" 2>&1 || show_error\n\n# create disk image for virtual appliance\nif [ \"${PROJECT}\" = \"Generic\" ]; then\n  echo \"image: creating open virtual appliance...\"\n  # duplicate ${DISK} so anything we do to it directly doesn't effect original\n  dd if=\"${DISK}\" of=\"${DISK_BASENAME}.tmp\" bs=1M conv=fsync >\"${SAVE_ERROR}\" 2>&1 || show_error\nfi\n\n# create part1 to format and copy files\necho \"image: creating sparse file for part1...\"\nSYSTEM_PART_COUNT=$(( ${SYSTEM_PART_END} - ${SYSTEM_PART_START} + 1 ))\nsync\ndd if=/dev/zero of=\"${LE_TMP}/part1.fat\" bs=512 count=0 seek=\"${SYSTEM_PART_COUNT}\" conv=fsync >\"${SAVE_ERROR}\" 2>&1 || show_error\n\nshopt -s expand_aliases  # enables alias expansion in script\nalias mcopy='mcopy -i \"${LE_TMP}/part1.fat\" -o'\nalias mmd='mmd -i \"${LE_TMP}/part1.fat\"'\n\n# create filesystem on part1\necho \"image: creating filesystem on part1...\"\n\nif [ \"${BOOTLOADER}\" = \"syslinux\" -o \"${BOOTLOADER}\" = \"bcm2835-bootloader\" -o \"${BOOTLOADER}\" = \"u-boot\" ]; then\n  mformat -i \"${LE_TMP}/part1.fat\" -v \"${DISTRO_BOOTLABEL}\" -N \"${UUID_SYSTEM//-/}\" :: >\"${SAVE_ERROR}\" 2>&1 || show_error\nfi\nsync\n\nif [ \"${BOOTLOADER}\" = \"syslinux\" ]; then\n  # create bootloader configuration\n  echo \"image: creating bootloader configuration...\"\n  cat << EOF > \"${LE_TMP}/syslinux.cfg\"\nSAY Wait for installer mode to start automatically in 5 seconds...\nSAY\nSAY Options\nSAY =======\nSAY installer: permanently install ${DISTRO} to HDD/SSD\nSAY live: boot ${DISTRO} using RAM for temporary storage\nSAY run: boot ${DISTRO} using this USB memory device for storage\nSAY\nDEFAULT installer\nTIMEOUT 50\nPROMPT 1\n\nLABEL installer\n  KERNEL /${KERNEL_NAME}\n  APPEND boot=UUID=${UUID_SYSTEM} installer quiet systemd.debug_shell vga=current\n\nLABEL live\n  KERNEL /${KERNEL_NAME}\n  APPEND boot=UUID=${UUID_SYSTEM} live quiet vga=current\n\nLABEL run\n  KERNEL /${KERNEL_NAME}\n  APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} portable quiet\nEOF\n\n  cat << EOF > \"${LE_TMP}/grub.cfg\"\nset timeout=\"25\"\nset default=\"Installer\"\nmenuentry \"Installer\" {\n\tsearch --set -f /KERNEL\n\tlinux /KERNEL boot=UUID=${UUID_SYSTEM} installer quiet systemd.debug_shell vga=current\n}\nmenuentry \"Live\" {\n\tsearch --set -f /KERNEL\n\tlinux /KERNEL boot=UUID=${UUID_SYSTEM} grub_live quiet vga=current\n}\nmenuentry \"Run\" {\n\tsearch --set -f /KERNEL\n\tlinux /KERNEL boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} grub_portable quiet\n}\nEOF\n\n  mcopy \"${LE_TMP}/syslinux.cfg\" :: >\"${SAVE_ERROR}\" 2>&1 || show_error\n\n  # install syslinux\n  echo \"image: installing syslinux to part1...\"\n  syslinux.mtools -i \"${LE_TMP}/part1.fat\" >\"${SAVE_ERROR}\" 2>&1 || show_error\n\n  # copy files\n  echo \"image: copying files to part1...\"\n  mcopy \"${TARGET_IMG}/${BUILD_NAME}.kernel\" \"::/${KERNEL_NAME}\" >\"${SAVE_ERROR}\" 2>&1 || show_error\n  mcopy \"${TARGET_IMG}/${BUILD_NAME}.system\" ::/SYSTEM >\"${SAVE_ERROR}\" 2>&1 || show_error\n  mcopy \"${RELEASE_DIR}/target/KERNEL.md5\" \"::/${KERNEL_NAME}.md5\" >\"${SAVE_ERROR}\" 2>&1 || show_error\n  mcopy \"${RELEASE_DIR}/target/SYSTEM.md5\" ::/SYSTEM.md5 >\"${SAVE_ERROR}\" 2>&1 || show_error\n\n  mmd EFI EFI/BOOT >\"${SAVE_ERROR}\" 2>&1 || show_error\n  mcopy \"${TOOLCHAIN}/share/syslinux/bootx64.efi\" ::/EFI/BOOT >\"${SAVE_ERROR}\" 2>&1 || show_error\n  mcopy \"${TOOLCHAIN}/share/syslinux/ldlinux.e64\" ::/EFI/BOOT >\"${SAVE_ERROR}\" 2>&1 || show_error\n  mcopy \"${TOOLCHAIN}/share/grub/bootia32.efi\" ::/EFI/BOOT >\"${SAVE_ERROR}\" 2>&1 || show_error\n  mcopy \"${LE_TMP}/grub.cfg\" ::/EFI/BOOT >\"${SAVE_ERROR}\" 2>&1 || show_error\n\nelif [ \"${BOOTLOADER}\" = \"bcm2835-bootloader\" ]; then\n  # create bootloader configuration\n  echo \"image: creating bootloader configuration...\"\n  cat << EOF > \"${LE_TMP}/cmdline.txt\"\nboot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}\nEOF\n\n  mcopy \"${LE_TMP}/cmdline.txt\" :: >\"${SAVE_ERROR}\" 2>&1 || show_error\n\n  # copy files\n  echo \"image: copying files to part1...\"\n  mcopy \"${TARGET_IMG}/${BUILD_NAME}.kernel\" \"::/${KERNEL_NAME}\" >\"${SAVE_ERROR}\" 2>&1 || show_error\n  mcopy \"${TARGET_IMG}/${BUILD_NAME}.system\" ::/SYSTEM >\"${SAVE_ERROR}\" 2>&1 || show_error\n  mcopy \"${RELEASE_DIR}/target/KERNEL.md5\" \"::/${KERNEL_NAME}.md5\" >\"${SAVE_ERROR}\" 2>&1 || show_error\n  mcopy \"${RELEASE_DIR}/target/SYSTEM.md5\" ::/SYSTEM.md5 >\"${SAVE_ERROR}\" 2>&1 || show_error\n\n  for f in bootcode.bin fixup.dat start.elf ; do\n    if [ -f \"${RELEASE_DIR}/3rdparty/bootloader/$f\" ]; then\n      mcopy \"${RELEASE_DIR}/3rdparty/bootloader/$f\" :: >\"${SAVE_ERROR}\" 2>&1 || show_error\n    fi\n  done\n\n  mcopy \"${RELEASE_DIR}/3rdparty/bootloader/config.txt\" :: >\"${SAVE_ERROR}\" 2>&1 || show_error\n  for distro in \"${RELEASE_DIR}/3rdparty/bootloader/distroconfig\"*.txt ; do\n    if [ -f \"${distro}\" ]; then\n      mcopy \"${distro}\" ::/\"${distro##*/}\" >\"${SAVE_ERROR}\" 2>&1 || show_error\n    fi\n  done\n\n  for dtb in \"${RELEASE_DIR}/3rdparty/bootloader/\"*.dtb ; do\n    if [ -f \"${dtb}\" ]; then\n      mcopy \"${dtb}\" ::/\"${dtb##*/}\" >\"${SAVE_ERROR}\" 2>&1 || show_error\n    fi\n  done\n\n  if [ -d \"${RELEASE_DIR}/3rdparty/bootloader/overlays\" ]; then\n    mcopy -s \"${RELEASE_DIR}/3rdparty/bootloader/overlays\" :: >\"${SAVE_ERROR}\" 2>&1 || show_error\n  fi\n\nelif [ \"${BOOTLOADER}\" = \"u-boot\" -a \\( -n \"${UBOOT_SYSTEM}\" -o -n \"${SUBDEVICE}\" \\) ]; then\n  # create bootloader configuration\n  echo \"image: creating bootloader configuration...\"\n\n  [ -n \"${UBOOT_SYSTEM}\" ] && DTB=\"$(${SCRIPTS}/uboot_helper ${PROJECT} ${DEVICE} ${UBOOT_SYSTEM} dtb)\" || :\n  if [ -n \"${DTB}\" ]; then\n\n    if [ -f \"${RELEASE_DIR}/3rdparty/bootloader/${DTB}\" ]; then\n      mcopy \"${RELEASE_DIR}/3rdparty/bootloader/${DTB}\" :: >\"${SAVE_ERROR}\" 2>&1 || show_error\n    fi\n\n    if [ -d \"${RELEASE_DIR}/3rdparty/bootloader/overlays\" ]; then\n      mcopy -s \"${RELEASE_DIR}/3rdparty/bootloader/overlays\" :: >\"${SAVE_ERROR}\" 2>&1 || show_error\n    fi\n\n    mkdir -p \"${LE_TMP}/extlinux\"\n\n    cat << EOF > \"${LE_TMP}/extlinux/extlinux.conf\"\nLABEL ${DISTRO}\n  LINUX /${KERNEL_NAME}\n  FDT /${DTB}\n  APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} quiet ${EXTRA_CMDLINE}\nEOF\n\n    mcopy -s \"${LE_TMP}/extlinux\" :: >\"${SAVE_ERROR}\" 2>&1 || show_error\n  fi\n\n  if [ -f \"${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/bootloader/mkimage\" ]; then\n    . \"${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/bootloader/mkimage\"\n  elif [ -f \"${PROJECT_DIR}/${PROJECT}/bootloader/mkimage\" ]; then\n    . \"${PROJECT_DIR}/${PROJECT}/bootloader/mkimage\"\n  else\n    echo \"image: skipping u-boot. no mkimage script found\"\n  fi\n\n  echo \"image: copying files to part1...\"\n  mcopy \"${TARGET_IMG}/${BUILD_NAME}.kernel\" \"::/${KERNEL_NAME}\" >\"${SAVE_ERROR}\" 2>&1 || show_error\n  mcopy \"${TARGET_IMG}/${BUILD_NAME}.system\" ::/SYSTEM >\"${SAVE_ERROR}\" 2>&1 || show_error\n  mcopy \"${RELEASE_DIR}/target/KERNEL.md5\" \"::/${KERNEL_NAME}.md5\" >\"${SAVE_ERROR}\" 2>&1 || show_error\n  mcopy \"${RELEASE_DIR}/target/SYSTEM.md5\" ::/SYSTEM.md5 >\"${SAVE_ERROR}\" 2>&1 || show_error\n\nelif [ \"${BOOTLOADER}\" = \"u-boot\" ]; then\n  echo \"to make an image using u-boot UBOOT_SYSTEM must be set\"\n  cleanup\n  exit\nfi # bootloader\n\n# run fsck\necho \"image: checking filesystem on part1...\"\nsync\nfsck.fat -n \"${LE_TMP}/part1.fat\" >\"${SAVE_ERROR}\" 2>&1 || show_error\n\n# merge part1 into disk image\necho \"image: merging part1 into disk image...\"\ndd if=\"${LE_TMP}/part1.fat\" of=\"${DISK}\" bs=512 seek=\"${SYSTEM_PART_START}\" conv=fsync,notrunc >\"${SAVE_ERROR}\" 2>&1 || show_error\n\n# finalize virtual appliance\nif [ \"${PROJECT}\" = \"Generic\" ]; then\n  # change syslinux default to 'run'\n  echo \"image: modifying files on part1 for open virtual appliance...\"\n  sed -e \"/DEFAULT/ s/installer/run/\" -i \"${LE_TMP}/syslinux.cfg\"\n  sed -e \"/set default=/s/\\\"Installer\\\"/\\\"Run\\\"/\" -i \"${LE_TMP}/grub.cfg\"\n  mcopy \"${LE_TMP}/syslinux.cfg\" :: >\"${SAVE_ERROR}\" 2>&1 || show_error\n  mcopy \"${LE_TMP}/grub.cfg\" ::/EFI/BOOT >\"${SAVE_ERROR}\" 2>&1 || show_error\n  sync\n  # run fsck\n  echo \"image: checking filesystem on part1...\"\n  fsck.fat -n \"${LE_TMP}/part1.fat\" >\"${SAVE_ERROR}\" 2>&1 || show_error\n  # merge modified part1 into tmp disk image\n  echo \"image: merging part1 into open virtual appliance...\"\n  dd if=\"${LE_TMP}/part1.fat\" of=\"${DISK_BASENAME}.tmp\" bs=512 seek=\"${SYSTEM_PART_START}\" conv=fsync,notrunc >\"${SAVE_ERROR}\" 2>&1 || show_error\n  # create vmdk from tmp ${DISK}\n  echo \"image: creating vmdk for open virtual appliance...\"\n  qemu-img convert -O vmdk -o subformat=streamOptimized \"${DISK_BASENAME}.tmp\" \"${DISK_BASENAME}.vmdk\"\n  # generate ovf from template\n  sed -e \"s,@DISTRO@,${DISTRO},g\" -e \"s,@DISK@,${IMAGE_NAME},g\" \\\n      -e \"s,@OVA_SIZE@,$((${OVA_SIZE}*1024*1024)),g\" \\\n      \"${PROJECT_DIR}/${PROJECT}/config/ovf.template\" > \"${DISK_BASENAME}.ovf\"\n  # combine ovf and vmdk into official ova\n  tar -C \"${TARGET_IMG}\" -cf \"${DISK_BASENAME}.ova\" \"${IMAGE_NAME}.ovf\" \"${IMAGE_NAME}.vmdk\"\n  # create sha256 checksum of ova image\n  (\n    cd \"${TARGET_IMG}\"\n    sha256sum \"${IMAGE_NAME}.ova\" > \"${IMAGE_NAME}.ova.sha256\"\n  )\n  echo \"image: cleaning up open virtual appliance...\"\n  # remove tmp ${DISK}, vmdk and ovf\n  rm \"${DISK_BASENAME}.tmp\" \"${DISK_BASENAME}.vmdk\" \"${DISK_BASENAME}.ovf\"\nfi\n\n# gzip\necho \"image: compressing...\"\npigz --best --force \"${DISK}\"\n\n# create sha256 checksum of image\n(\n  cd \"${TARGET_IMG}\"\n  sha256sum \"${DISK##*/}.gz\" > \"${DISK##*/}.gz.sha256\"\n)\n\n# cleanup\ncleanup\nexit\n"
  },
  {
    "path": "scripts/pkgbuild",
    "content": "#!/bin/bash\n\n# This function is passed the build instruction for a single job.\n# The function will run either \"build <package>\" or \"install <package>\".\n# ${slot} is the job slot number, ie. 1-8 when THREADCOUNT=8.\n# ${job} is the sequence within the total number of ${jobs}.\npackage_worker() {\n  local slot=$1 job=$2 jobs=$3 maxslot=$4 task=\"$5\" pkgname=\"$6\" oseqinfo=\"$7\"\n  local result status\n  local addon istarget isaddon\n\n  export MTJOBID=${slot} PARALLEL_SEQ=${job} MTMAXJOBS=${jobs} MTMAXSLOT=${maxslot}\n\n  . config/options \"${pkgname}\"\n\n  if [ -z \"${oseqinfo}\" ]; then\n    ${SCRIPTS}/${task} ${pkgname} 2>&1 && result=0 || result=1\n  else\n    print_color CLR_ERROR \"FAILURE [${task} ${pkgname}]: a previous dependency process has already failed!\"\n    echo\n    echo\n\n    num=0\n    for failed_items in ${oseqinfo//;/ }; do\n      num=$((num + 1))\n      read -r ftask fpkgname fseq <<< \"${failed_items//,/ }\"\n\n      if [ -n \"${fseq}\" ]; then\n        [ ${num} -eq 1 ] && echo \"The following log(s) for already failed dependencies are available:\"\n        printf \"  %-7s %s => %s\\n\" \"${ftask}\" \"${fpkgname}\" \"${THREAD_CONTROL}/logs/${fseq}.log\"\n      else\n        print_color CLR_ERROR \"ALREADY FAILED [${ftask} ${fpkg}]\"\n        echo\n      fi\n    done\n    echo\n    result=1\n  fi\n\n  [[ ${pkgname} =~ :target$ || \"${pkgname//:/}\" = \"${pkgname}\" ]] && istarget=\"yes\" || istarget=\"no\"\n\n  [[ \"${MTADDONBUILD}\" = \"yes\" && ( \"${PKG_IS_ADDON}\" = \"yes\" || \"${PKG_IS_ADDON}\" = \"embedded\" ) ]] && isaddon=\"yes\" || isaddon=\"no\"\n\n  if [ \"${isaddon}\" = \"yes\" -a \"${istarget}\" = \"yes\" ]; then\n    if [ ${result} -eq 0 ]; then\n      ${SCRIPTS}/install_addon ${pkgname} 2>&1 && result=0 || result=1\n    fi\n\n    if [ ${result} -ne 0 ]; then\n      if [ -d \"${THREAD_CONTROL}/logs\" ]; then\n        echo \"${PKG_NAME} ${THREAD_CONTROL}/logs/${job}.log\" >>\"${THREAD_CONTROL}/addons.failed\"\n      else\n        echo \"${PKG_NAME}\" >>\"${THREAD_CONTROL}/addons.failed\"\n      fi\n    fi\n  fi\n\n  (\n    flock --exclusive 95\n    [ ${result} -eq 0 ] && status=\"DONE\" || status=\"FAIL\"\n    num=$(< \"${THREAD_CONTROL}/progress\")\n    mv \"${THREAD_CONTROL}/progress\" \"${THREAD_CONTROL}/progress.prev\"\n    num=$((num + 1))\n    echo ${num} >\"${THREAD_CONTROL}/progress\"\n  ) 95>\"${THREAD_CONTROL}/locks/.progress\"\n\n  if [ ${result} -eq 0 ]; then\n    pkg_lock_status \"IDLE\"\n  else\n    pkg_lock_status \"FAILED\" \"${pkgname}\" \"${task}\"\n\n    print_color CLR_ERROR \"FAILURE: $SCRIPTS/${task} ${pkgname} has failed!\"\n    echo\n  fi\n\n  return ${result}\n}\n\npackage_worker \"$1\" \"$2\" \"$3\" \"$4\" \"$5\" \"$6\" \"$7\"\n"
  },
  {
    "path": "scripts/pkgbuilder.py",
    "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nimport sys\nimport os\nimport datetime, time\nimport argparse\nimport json\nimport codecs\nimport threading\nimport queue\nimport subprocess\nimport multiprocessing\nimport signal\nimport fcntl, termios, struct\n\n# Ensure we can output any old crap to stdout and stderr\nsys.stdout = codecs.getwriter(\"utf-8\")(sys.stdout.detach())\nsys.stderr = codecs.getwriter(\"utf-8\")(sys.stderr.detach())\n\n# derive from subprocess to utilize wait4() for rusage stats\nclass RusagePopen(subprocess.Popen):\n    def _try_wait(self, wait_flags):\n        try:\n            (pid, sts, ru) = os.wait4(self.pid, wait_flags)\n        except OSError as e:\n            if e.errno != errno.ECHILD:\n                raise\n            pid = self.pid\n            sts = 0\n        else:\n            self.rusage = ru\n        return (pid, sts)\n\ndef rusage_run(*popenargs, parent=None, timeout=None, **kwargs):\n    with RusagePopen(*popenargs, **kwargs) as process:\n        try:\n            parent.child = process\n            stdout, stderr = process.communicate(None, timeout=timeout)\n        except subprocess.TimeoutExpired as exc:\n            process.kill()\n            process.wait()\n            raise\n        except:\n            process.kill()\n            raise\n        retcode = process.poll()\n    res = subprocess.CompletedProcess(process.args, retcode, stdout, stderr)\n    res.rusage = process.rusage\n    parent.child = None\n    return res\n\nclass GeneratorEmpty(Exception):\n    pass\n\nclass GeneratorStalled(Exception):\n    pass\n\nclass Generator:\n    def __init__(self, plan):\n        self.work = plan\n\n        self.totalJobs = len(plan)\n        self.building = {}\n        self.built = {}\n        self.failed = {}\n        self.removedPackages = {}\n\n        self.check_no_deps = True\n\n        # Transform unpack info from package:target to just package - simplifying refcount generation\n        # Create a map for sections, as we don't autoremove \"virtual\" packages\n        self.unpacks = {}\n        self.sections = {}\n        for job in self.work:\n            (pkg_name, target) = job[\"name\"].split(\":\")\n            if pkg_name not in self.unpacks:\n                self.unpacks[pkg_name] = job[\"unpacks\"]\n                self.sections[pkg_name] = job[\"section\"]\n                for unpack in job[\"unpacks\"]:\n                    if unpack not in self.sections:\n                        self.sections[unpack] = \"\" # don't know section, assume not virtual\n\n        # Count number of times each package is referenced by package:target (including itself) and\n        # then recursively accumulate counts for any other packages that may be referenced\n        # by \"PKG_DEPENDS_UNPACK\".\n        # Once the refcount is zero for a package, the source directory can be removed.\n        self.refcount = {}\n        for job in self.work:\n            (pkg_name, target) = job[\"name\"].split(\":\")\n            self.refcount[pkg_name] = self.refcount.get(pkg_name, 0) + 1\n            for pkg_name in job[\"unpacks\"]:\n                self.addRefCounts(pkg_name)\n\n    def canBuildJob(self, job):\n        for dep in job[\"wants\"]:\n            if dep not in self.built:\n                return False\n\n        return True\n\n    def getPackagesToRemove(self, job):\n        packages = {}\n\n        pkg_name = job[\"name\"].split(\":\")[0]\n        packages[pkg_name] = True\n        for pkg_name in job[\"unpacks\"]:\n            self.addUnpackPackages(pkg_name, packages)\n\n        for pkg_name in packages:\n            if self.refcount[pkg_name] == 0 and \\\n                self.sections[pkg_name] != \"virtual\" and \\\n                pkg_name not in self.removedPackages:\n                yield pkg_name\n\n    def getPackageReferenceCounts(self, job):\n        packages = {}\n\n        pkg_name = job[\"name\"].split(\":\")[0]\n        packages[pkg_name] = True\n        for pkg_name in job[\"unpacks\"]:\n            self.addUnpackPackages(pkg_name, packages)\n\n        for pkg_name in packages:\n            tokens = \"\"\n            tokens += \"[v]\" if self.sections[pkg_name] == \"virtual\" else \"\"\n            tokens += \"[r]\" if pkg_name in self.removedPackages else \"\"\n            yield(\"%s:%d%s\" % (pkg_name, self.refcount[pkg_name], tokens))\n\n    def getFirstFailedJob(self, job):\n        for dep in job[\"wants\"]:\n            if dep in self.failed:\n                failedjob = self.getFirstFailedJob(self.failed[dep])\n                if not failedjob:\n                    return self.failed[dep]\n                else:\n                    return failedjob\n\n        return None\n\n    def getAllFailedJobs(self, job):\n        flist = {}\n        for dep in job[\"wants\"]:\n            if dep in self.failed:\n                failedjob = self.getFirstFailedJob(self.failed[dep])\n                if failedjob:\n                    flist[failedjob[\"name\"]] = failedjob\n                else:\n                    flist[dep] = self.failed[dep]\n\n        return [flist[x] for x in flist]\n\n    def getNextJob(self):\n        if self.work == []:\n            raise GeneratorEmpty\n\n        # Always process jobs without dependencies first\n        # until we're sure there's none left...\n        if self.check_no_deps:\n            for i, job in enumerate(self.work):\n                if job[\"wants\"] == []:\n                    self.building[job[\"name\"]] = True\n                    del self.work[i]\n                    job[\"failedjobs\"] = self.getAllFailedJobs(job)\n                    job[\"logfile\"] = None\n                    job[\"cmdproc\"] = None\n                    job[\"failed\"] = False\n                    return job\n\n            self.check_no_deps = False\n\n        # Process remaining jobs, trying to schedule\n        # only those jobs with all their dependencies satisifed\n        for i, job in enumerate(self.work):\n            if self.canBuildJob(job):\n                self.building[job[\"name\"]] = True\n                del self.work[i]\n                job[\"failedjobs\"] = self.getAllFailedJobs(job)\n                job[\"logfile\"] = None\n                job[\"cmdproc\"] = None\n                job[\"failed\"] = False\n                return job\n\n        raise GeneratorStalled\n\n    # Return details about stalled jobs that can't build until the\n    # currently building jobs are complete.\n    def getStallInfo(self):\n        for job in self.work:\n            for dep in job[\"wants\"]:\n                if dep not in self.building and dep not in self.built:\n                    break\n            else:\n                yield (job[\"name\"], [d for d in job[\"wants\"] if d in self.building])\n\n    def activeJobCount(self):\n        return len(self.building)\n\n    def activeJobNames(self):\n        for name in self.building:\n            yield name\n\n    def failedJobCount(self):\n        return len(self.failed)\n\n    def failedJobs(self):\n        for name in self.failed:\n            yield self.failed[name]\n\n    def completedJobCount(self):\n        return len(self.built)\n\n    def totalJobCount(self):\n        return self.totalJobs\n\n    def completed(self, job):\n        self.built[job[\"name\"]] = job\n        del self.building[job[\"name\"]]\n\n        if job[\"failed\"]:\n            self.failed[job[\"name\"]] = job\n        else:\n            self.refcount[job[\"name\"].split(\":\")[0]] -= 1\n\n        for pkg_name in job[\"unpacks\"]:\n            self.delRefCounts(pkg_name)\n\n    def removed(self, pkg_name):\n        self.removedPackages[pkg_name] = True\n\n    def addUnpackPackages(self, pkg_name, packages):\n        packages[pkg_name] = True\n        if pkg_name in self.unpacks:\n            for p in self.unpacks[pkg_name]:\n                self.addUnpackPackages(p, packages)\n\n    def addRefCounts(self, pkg_name):\n        self.refcount[pkg_name] = self.refcount.get(pkg_name, 0) + 1\n        if pkg_name in self.unpacks:\n            for p in self.unpacks[pkg_name]:\n                self.addRefCounts(p)\n\n    def delRefCounts(self, pkg_name):\n        self.refcount[pkg_name] = self.refcount.get(pkg_name, 0) - 1\n        if pkg_name in self.unpacks:\n            for p in self.unpacks[pkg_name]:\n                self.delRefCounts(p)\n\nclass BuildProcess(threading.Thread):\n    def __init__(self, slot, maxslot, jobtotal, haltonerror, work, complete):\n        threading.Thread.__init__(self, daemon=True)\n\n        self.slot = slot\n        self.maxslot = maxslot\n        self.jobtotal = jobtotal\n        self.haltonerror = haltonerror\n        self.work = work\n        self.complete = complete\n\n        self.active = False\n\n        self.child = None\n\n        self.stopping = False\n\n    def stop(self):\n        self.stopping = True\n        self.work.put(None)\n        if self.child:\n            try:\n                os.killpg(os.getpgid(self.child.pid), signal.SIGTERM)\n                self.child.wait()\n            except:\n                pass\n\n    def isActive(self):\n        return self.active == True\n\n    def run(self):\n        while not self.stopping:\n            job = self.work.get(block=True)\n            if job == None or self.stopping:\n                break\n\n            self.active = True\n\n            job[\"slot\"] = self.slot\n            job[\"failed\"] = self.execute(job)\n            job[\"status\"] = \"FAIL\" if job[\"failed\"] else \"DONE\"\n            self.complete.put(job)\n\n            self.active = False\n\n            if job[\"failed\"] and self.haltonerror:\n                break\n\n    def execute(self, job):\n        if job[\"failedjobs\"]:\n            flist = []\n            for fjob in job[\"failedjobs\"]:\n                failedinfo = \"%s,%s\" % (fjob[\"task\"], fjob[\"name\"])\n                if fjob[\"logfile\"]:\n                    failedinfo = \"%s,%s\" % (failedinfo, fjob[\"seq\"])\n                flist.append(failedinfo)\n            failedinfo = \";\".join(flist)\n        else:\n            failedinfo = \"\"\n\n        job[\"args\"] = [\"%s/%s/pkgbuild\" % (ROOT, SCRIPTS),\n                       \"%d\" % self.slot, \"%d\" % job[\"seq\"], \"%d\" % self.jobtotal, \"%d\" % self.maxslot,\n                       job[\"task\"], job[\"name\"], failedinfo]\n\n        job[\"start\"] = time.time()\n        returncode = 1\n        try:\n            if job[\"logfile\"]:\n                with open(job[\"logfile\"], \"w\") as logfile:\n                    cmd = rusage_run(job[\"args\"], cwd=ROOT,\n                                     stdin=subprocess.PIPE, stdout=logfile, stderr=subprocess.STDOUT,\n                                     universal_newlines=True, shell=False, parent=self, start_new_session=True)\n                returncode = cmd.returncode\n                job[\"cmdproc\"] = cmd\n            else:\n                try:\n                    cmd = rusage_run(job[\"args\"], cwd=ROOT,\n                                     stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,\n                                     universal_newlines=True, shell=False, parent=self, start_new_session=True,\n                                     encoding=\"utf-8\", errors=\"replace\")\n                    returncode = cmd.returncode\n                    job[\"cmdproc\"] = cmd\n                except UnicodeDecodeError:\n                    print('\\nPKGBUILDER ERROR: UnicodeDecodeError while reading cmd.stdout from \"%s %s\"\\n' % (job[\"task\"], job[\"name\"]), file=sys.stderr, flush=True)\n        except Exception as e:\n            print(\"\\nPKGBUILDER ERROR: %s exception while executing: %s\\n\" % (str(e), job[\"args\"]), file=sys.stderr, flush=True)\n\n        job[\"end\"] = time.time()\n        job[\"elapsed\"] = job[\"end\"] - job[\"start\"]\n\n        if job[\"cmdproc\"]:\n            job[\"utime\"] = job[\"cmdproc\"].rusage.ru_utime\n            job[\"stime\"] = job[\"cmdproc\"].rusage.ru_stime\n        else:\n            job[\"utime\"] = job[\"stime\"] = 0\n\n        if job[\"elapsed\"] == 0.0:\n            job[\"cpu\"] = 0.0\n        else:\n            job[\"cpu\"] = round((job[\"utime\"] + job[\"stime\"]) * 100 / job[\"elapsed\"])\n\n        return (returncode != 0)\n\nclass Builder:\n    def __init__(self, maxthreadcount, inputfilename, jobglog, loadstats, stats_interval, \\\n                 haltonerror=True, failimmediately=True, log_burst=True, log_combine=\"always\", \\\n                 bookends=True, autoremove=False, colors=False, progress=False, debug=False, verbose=False):\n        if inputfilename == \"-\":\n            plan = json.load(sys.stdin)\n        else:\n            with open(inputfilename, \"r\") as infile:\n                plan = json.load(infile)\n\n        self.generator = Generator(plan)\n\n        self.jobtotal = self.generator.totalJobCount()\n        self.twidth = len(\"%d\" % self.jobtotal)\n\n        # parse threadcount\n        if maxthreadcount.endswith(\"%\"):\n            self.threadcount = int(multiprocessing.cpu_count() / 100 * int(args.max_procs.replace(\"%\",\"\")))\n        else:\n            if args.max_procs == \"0\":\n                self.threadcount = 256\n            else:\n                self.threadcount = int(maxthreadcount)\n\n        self.threadcount = min(self.jobtotal, self.threadcount)\n        self.threadcount = max(1, self.threadcount)\n\n        if args.debug:\n            DEBUG(\"THREADCOUNT#: input arg: %s, computed: %d\" % (maxthreadcount, self.threadcount))\n\n        self.joblog = jobglog\n        self.loadstats = loadstats\n        self.stats_interval = int(stats_interval)\n        if self.stats_interval < 1:\n            self.stats_interval = 60\n\n        self.haltonerror = haltonerror\n        self.failimmediately = failimmediately\n        self.log_burst = log_burst\n        self.log_combine = log_combine\n        self.debug = debug\n        self.verbose = verbose\n        self.bookends = bookends\n        self.autoremove = autoremove\n\n        self.stdout_dirty = False\n        self.stderr_dirty = False\n        self.progress_dirty = False\n\n        self.joblogfile = None\n        self.loadstatsfile = None\n        self.nextstats = 0\n        self.build_start = 0\n\n        self.work = queue.Queue()\n        self.complete = queue.Queue()\n        self.processes = []\n\n        # Init all processes\n        self.processes = []\n        for i in range(1, self.threadcount + 1):\n            self.processes.append(BuildProcess(i, self.threadcount, self.jobtotal, self.haltonerror, self.work, self.complete))\n\n        # work and completion sequences\n        self.wseq = 0\n        self.cseq = 0\n\n        self.progress = progress and sys.stderr.isatty()\n        self.progress_glitch_fix = \"\"\n        self.rows = self.columns = -1\n        self.original_resize_handler = None\n        if self.progress:\n            self.getTerminalSize()\n            self.resize_handler = signal.signal(signal.SIGWINCH, self.getTerminalSize)\n\n        self.colors = (colors == \"always\" or (colors == \"auto\" and sys.stderr.isatty()))\n        self.color_code = {}\n        self.color_code[\"DONE\"] = \"\\033[0;32m\" #green\n        self.color_code[\"FAIL\"] = \"\\033[1;31m\" #bold red\n        self.color_code[\"ACTV\"] = \"\\033[0;33m\" #yellow\n        self.color_code[\"IDLE\"] = \"\\033[0;35m\" #magenta\n        self.color_code[\"INIT\"] = \"\\033[0;36m\" #cyan\n        self.color_code[\"WAIT\"] = \"\\033[0;35m\" #magenta\n\n    def build(self):\n        if self.joblog:\n            self.joblogfile = open(self.joblog, \"w\")\n\n        if self.loadstats:\n            self.loadstatsfile = open(self.loadstats, \"w\")\n\n        self.build_start = time.time()\n\n        for process in self.processes:\n            process.start()\n\n        # Queue new work until no more work is available, and all queued jobs have completed.\n        while self.queueWork():\n            job = self.getCompletedJob()\n\n            self.writeJobLog(job)\n            self.autoRemovePackages(job)\n            self.processJobOutput(job)\n            self.displayJobStatus(job)\n\n            job[\"cmdproc\"] = None\n            job = None\n\n        self.captureStats(finished=True)\n\n        if self.joblogfile:\n            self.joblogfile.close()\n\n        if self.loadstatsfile:\n            self.loadstatsfile.close()\n\n        if self.generator.failedJobCount() != 0:\n            if self.haltonerror and not self.failimmediately:\n                failed = [job for job in self.generator.failedJobs() if job[\"logfile\"]]\n                if failed != []:\n                    self.oprint(\"\\nThe following log(s) for this failure are available:\")\n                    for job in failed:\n                        self.oprint(\"  %s => %s\" % (job[\"name\"], job[\"logfile\"]))\n                    self.oprint(\"\", flush=True)\n            return False\n\n        return True\n\n    # Fill work queue with enough jobs to keep all processes busy.\n    # Return True while jobs remain available to build, or queued jobs are still building.\n    # Return False once all jobs have been queued, and finished building.\n    def queueWork(self):\n\n        # If an error has occurred and we are not ignoring errors, then return True\n        # (but don't schedule new work) if we are to exit after all currently\n        # active jobs have finished, otherwise return False.\n        if self.haltonerror and self.generator.failedJobCount() != 0:\n            if not self.failimmediately and self.generator.activeJobCount() != 0:\n                freeslots = self.threadcount - self.generator.activeJobCount()\n                self.show_status(\"WAIT\", \"waiting\", \", \".join(self.generator.activeJobNames()))\n                DEBUG(\"Waiting for : %d active, %d idle [%s]\" % (self.generator.activeJobCount(), freeslots, \", \".join(self.generator.activeJobNames())))\n                return True\n            else:\n                return False\n\n        try:\n            for i in range(self.generator.activeJobCount(), self.threadcount):\n                job = self.generator.getNextJob()\n\n                if self.verbose:\n                    self.show_status(\"INIT\", \"submit\", job[\"name\"])\n\n                if self.debug:\n                    DEBUG(\"Queueing Job: %s %s\" % (job[\"task\"], job[\"name\"]))\n\n                self.wseq += 1\n                job[\"seq\"] = self.wseq\n                if self.log_burst:\n                    job[\"logfile\"] = \"%s/logs/%d.log\" % (THREAD_CONTROL, job[\"seq\"])\n\n                self.work.put(job)\n\n            if self.verbose:\n                self.show_status(\"ACTV\", \"active\", \", \".join(self.generator.activeJobNames()))\n\n            if self.debug:\n                freeslots = self.threadcount - self.generator.activeJobCount()\n                DEBUG(\"Building Now: %d active, %d idle [%s]\" % (self.generator.activeJobCount(), freeslots, \", \".join(self.generator.activeJobNames())))\n\n        except GeneratorStalled:\n            if self.verbose:\n                freeslots = self.threadcount - self.generator.activeJobCount()\n                pending = []\n                for (i, (package, wants)) in enumerate(self.generator.getStallInfo()):\n                    pending.append(\"%s (wants: %s)\" % (package, \", \".join(wants)))\n                self.show_status(\"ACTV\", \"active\", \", \".join(self.generator.activeJobNames()))\n                self.show_status(\"IDLE\", \"stalled\", \"; \".join(pending), p1=len(pending))\n\n            if self.debug:\n                freeslots = self.threadcount - self.generator.activeJobCount()\n                DEBUG(\"Building Now: %d active, %d idle [%s]\" % (self.generator.activeJobCount(), freeslots, \", \".join(self.generator.activeJobNames())))\n                for (i, (package, wants)) in enumerate(self.generator.getStallInfo()):\n                    item = \"%-25s wants: %s\" % (package, \", \".join(wants))\n                    if i == 0:\n                        DEBUG(\"Stalled Jobs: %s\" % item)\n                    else:\n                        DEBUG(\"              %s\" % item)\n\n        except GeneratorEmpty:\n            if self.generator.activeJobCount() == 0:\n                if self.debug:\n                    DEBUG(\"NO MORE JOBS: All jobs have completed - exiting.\")\n                return False\n            else:\n                if self.debug:\n                    n = self.generator.activeJobCount()\n                    DEBUG(\"NO MORE JOBS: Waiting on %d job%s to complete...\" % (n, [\"s\",\"\"][n == 1]))\n\n        return True\n\n    # Wait until a new job is available\n    def getCompletedJob(self):\n        while True:\n            try:\n                job = self.complete.get(block=True, timeout=self.captureStats(finished=False))\n                self.generator.completed(job)\n\n                if self.debug:\n                    DEBUG(\"Finished Job: %s %s [%s] after %0.3f seconds\" % (job[\"task\"], job[\"name\"], job[\"status\"], job[\"elapsed\"]))\n\n                return job\n\n            except queue.Empty:\n                pass\n\n    def captureStats(self, finished=False):\n        self.displayProgress()\n        if finished:\n            self.clearProgress()\n        self.flush()\n\n        if not self.loadstatsfile:\n            if self.progress:\n                now = time.time()\n                return int(now + 1) - now\n            else:\n                return None\n\n        now = time.time()\n        if now >= self.nextstats or finished:\n            self.nextstats = int(now - (now % self.stats_interval)) + self.stats_interval\n\n            loadavg = self.getLoad()\n            procs = loadavg[3].split(\"/\")\n            meminfo = self.getMemory()\n\n            print(\"%d %06d %5s %5s %5s %3s %4s %9d %2d %s\" % (now, now - self.build_start, \\\n                  loadavg[0], loadavg[1], loadavg[2], procs[0], procs[1], meminfo[\"MemAvailable\"], \\\n                  self.generator.activeJobCount(), \",\".join(self.generator.activeJobNames())), \\\n                  file=self.loadstatsfile, flush=True)\n\n        if self.progress:\n            return min((self.nextstats - now), int(now + 1) - now)\n        else:\n            return (self.nextstats - now)\n\n    def displayProgress(self):\n        if self.progress:\n            freeslots = self.threadcount - self.generator.activeJobCount()\n            if self.jobtotal != self.generator.completedJobCount():\n                percent = \"%0.2f\" % (100 / self.jobtotal * self.generator.completedJobCount())\n            else:\n                percent = \"100\"\n            loadavg = self.getLoad()\n            meminfo = self.getMemory()\n            available = int(meminfo[\"MemAvailable\"]) / 1024\n\n            lines = [ \"\",\n                      \"%s: %5s%% | load: %s mem: %d MB | failed: %d idle: %d active: %d\" % \\\n                          (self.secs2hms(time.time() - self.build_start), percent, \\\n                           loadavg[0], available, \\\n                           self.generator.failedJobCount(), freeslots, self.generator.activeJobCount()),\n                      \"Building: %s\" % \", \".join(self.generator.activeJobNames())\n                    ]\n\n            columns = self.columns # in theory could change mid-loop\n            output = []\n            for line in lines:\n                output.append(line if len(line) < columns else \"%s+\" % line[0:columns - 2])\n\n            if not self.progress_glitch_fix:\n                self.progress_glitch_fix = \"%s\\033[%dA\" % (\"\\n\" * len(output), len(output))\n\n            # \\033[?7l: disable linewrap\n            # \\033[0K: clear cursor to end of line (every line but last)\n            # \\033[0J: clear cursor to end of screen (last line)\n            # \\033%dA: move cursor up %d lines (move back to \"home\" position)\n            # \\033[?7h: re-enable linewrap\n            #\n            # When the console is resized to a narrower width, lines wider than the\n            # new console width may be wrapped to a second line (depends on console\n            # software, for example PuTTY) so disable line wrapping to prevent this.\n            #\n            self.eprint(\"\\033[?7l%s\\033[0J\\r\\033[%dA\\033[?7h\" % (\"\\033[0K\\n\".join(output), len(output) - 1),\n                  end=\"\\r\", isProgress=True)\n            self.progress_dirty = True\n\n    def clearProgress(self):\n        if self.progress and self.progress_dirty:\n            self.progress_dirty = False\n            self.eprint(\"\\033[0J\", end=\"\")\n\n    # Output completion info, and links to any relevant logs\n    def displayJobStatus(self, job):\n        self.cseq += 1\n        self.show_status(job[\"status\"], job[\"task\"], job[\"name\"], p1=self.cseq, p2=self.jobtotal)\n\n        if job[\"failed\"]:\n            if job[\"logfile\"]:\n                self.eprint(\"\\nThe following log for this failure is available:\\n  %s\\n\" % job[\"logfile\"])\n\n            if job[\"failedjobs\"] and job[\"failedjobs\"][0][\"logfile\"]:\n                if len(job[\"failedjobs\"]) == 1:\n                    self.eprint(\"The following log from the failed dependency may be relevant:\")\n                else:\n                    self.eprint(\"The following logs from the failed dependencies may be relevant:\")\n                for fjob in job[\"failedjobs\"]:\n                    self.eprint(\"  %-7s %s => %s\" % (fjob[\"task\"], fjob[\"name\"], fjob[\"logfile\"]))\n                self.eprint(\"\")\n\n    # If configured, send output for a job (either a logfile, or captured stdout) to stdout\n    def processJobOutput(self, job):\n        log_processed = False\n        log_size = 0\n        log_start = time.time()\n\n        if job[\"logfile\"]:\n            if self.log_combine == \"always\" or (job[\"failed\"] and self.log_combine == \"fail\"):\n                if self.bookends:\n                    self.oprint(\"<<< %s seq %s <<<\" % (job[\"name\"], job[\"seq\"]))\n\n                try:\n                    with open(job[\"logfile\"], \"r\", encoding=\"utf-8\", errors=\"replace\") as logfile:\n                        for line in logfile:\n                            self.oprint(line, end=\"\")\n                            log_size += len(line)\n                except UnicodeDecodeError:\n                    self.eprint(\"\\nPKGBUILDER ERROR: UnicodeDecodeError while reading log file %s\\n\" % job[\"logfile\"])\n\n                if job[\"failed\"]:\n                    self.oprint(\"\\nThe following log for this failure is available:\\n  %s\\n\" % job[\"logfile\"])\n\n                if self.bookends:\n                    self.oprint(\">>> %s seq %s >>>\" % (job[\"name\"], job[\"seq\"]))\n\n                log_processed = True\n\n        elif job[\"cmdproc\"]:\n            if self.log_combine == \"always\" or (job[\"failed\"] and self.log_combine == \"fail\"):\n                if self.bookends:\n                    self.oprint(\"<<< %s\" % job[\"name\"])\n\n                for line in job[\"cmdproc\"].stdout:\n                    self.oprint(line, end=\"\")\n                    log_size += len(line)\n\n                if \"autoremove\" in job:\n                    for line in job[\"autoremove\"].stdout:\n                        self.oprint(line, end=\"\")\n                        log_size += len(line)\n                    job[\"autoremove\"] = None\n\n                if self.bookends:\n                    self.oprint(\">>> %s\" % job[\"name\"])\n\n                log_processed = True\n\n        if log_processed:\n            self.flush()\n\n            if self.debug:\n                log_elapsed = time.time() - log_start\n                log_rate = int(log_size / log_elapsed) if log_elapsed != 0 else 0\n                log_data = \", %s\" % \"/\".join(job[\"logfile\"].split(\"/\")[-2:]) if job[\"logfile\"] else \"\"\n                DEBUG(\"WRITING LOG : {0:,} bytes in {1:0.3f} seconds ({2:,d} bytes/sec{3:})\".format(log_size, log_elapsed, log_rate, log_data))\n\n    # Log completion stats for job\n    def writeJobLog(self, job):\n        if self.joblogfile:\n            print(\"{j[status]} {j[seq]:0{width}} {j[slot]} {j[task]} {j[name]} \" \\\n                  \"{j[utime]:.{prec}f} {j[stime]:.{prec}f} {j[cpu]} \" \\\n                  \"{j[elapsed]:.{prec}f} {j[start]:.{prec}f} {j[end]:.{prec}f} {0}\" \\\n                  .format(job[\"logfile\"] if job[\"logfile\"] else \"\",\n                          j=job, prec=4, width=self.twidth),\n                  file=self.joblogfile, flush=True)\n\n    # Remove any source code directories that are no longer required.\n    # Output from the subprocess is either appended to the burst logfile\n    # or is captured for later output to stdout (after the correspnding logfile).\n    def autoRemovePackages(self, job):\n        if self.autoremove:\n            if self.debug:\n                DEBUG(\"Cleaning Pkg: %s (%s)\" % (job[\"name\"], \", \".join(self.generator.getPackageReferenceCounts(job))))\n\n            for pkg_name in self.generator.getPackagesToRemove(job):\n                DEBUG(\"Removing Pkg: %s\" % pkg_name)\n                args = [\"%s/%s/autoremove\" % (ROOT, SCRIPTS), pkg_name]\n                if job[\"logfile\"]:\n                    with open(job[\"logfile\"], \"a\") as logfile:\n                        cmd = subprocess.run(args, cwd=ROOT,\n                                             stdin=subprocess.PIPE, stdout=logfile, stderr=subprocess.STDOUT,\n                                             universal_newlines=True, shell=False)\n                else:\n                    job[\"autoremove\"] = subprocess.run(args, cwd=ROOT,\n                                             stdin=subprocess.PIPE, capture_output=True,\n                                             universal_newlines=True, shell=False)\n\n                self.generator.removed(pkg_name)\n\n    def show_status(self, status, task, data, p1=None, p2=None):\n        p1 = (self.threadcount - self.generator.activeJobCount()) if p1 == None else p1\n        p2 = self.generator.activeJobCount() if p2 == None else p2\n\n        colored_status = \"%s%-4s\\033[0m\" % (self.color_code[status], status) if self.colors else \"%-4s\" % status\n\n        self.eprint(\"%s[%0*d/%0*d] [%s] %-7s %s\" % \\\n            (self.progress_glitch_fix, self.twidth, p1, self.twidth, p2, colored_status, task, data))\n\n    def stopProcesses(self):\n        if self.processes:\n            for process in self.processes:\n                process.stop()\n            self.processes = None\n\n    def cleanup(self):\n        self.clearProgress()\n        self.flush()\n        if self.original_resize_handler != None:\n            signal.signal(signal.SIGWINCH, self.original_resize_handler)\n        self.stopProcesses()\n\n    def flush(self):\n        if self.stdout_dirty:\n            sys.stdout.flush()\n            self.stdout_dirty = False\n\n        if self.stderr_dirty:\n            sys.stderr.flush()\n            self.stderr_dirty = False\n\n    def oprint(self, *args, flush=False, **kwargs):\n        if self.progress_dirty:\n            self.clearProgress()\n\n        if self.stderr_dirty:\n            sys.stderr.flush()\n            self.stderr_dirty = False\n\n        print(*args, **kwargs, file=sys.stdout, flush=flush)\n        self.stdout_dirty = not flush\n\n    def eprint(self, *args, flush=False, isProgress=False, **kwargs):\n        if self.stdout_dirty:\n            sys.stdout.flush()\n            self.stdout_dirty = False\n\n        if not isProgress and self.progress_dirty:\n            self.clearProgress()\n\n        print(*args, **kwargs, file=sys.stderr, flush=flush)\n        self.stderr_dirty = not flush\n\n    def getLoad(self):\n        return open(\"/proc/loadavg\", \"r\").readline().split()\n\n    def getMemory(self):\n        return dict((i.split()[0].rstrip(':'),int(i.split()[1])) for i in open(\"/proc/meminfo\", \"r\").readlines())\n\n    def getTerminalSize(self, signum = None, frame = None):\n        h, w, hp, wp = struct.unpack('HHHH',\n                                     fcntl.ioctl(sys.stderr.fileno(), termios.TIOCGWINSZ,\n                                                 struct.pack('HHHH', 0, 0, 0, 0)))\n        self.rows = h\n        self.columns = w\n\n    def secs2hms(self, seconds):\n        min, sec = divmod(seconds, 60)\n        hour, min = divmod(min, 60)\n        return \"%02d:%02d:%02d\" % (hour, min, sec)\n\ndef DEBUG(msg):\n    if DEBUG_LOG:\n        print(\"%s: %s\" % (datetime.datetime.now(), msg), file=DEBUG_LOG, flush=True)\n\nparser = argparse.ArgumentParser(description=\"Run processes to build the specified JSON plan\", \\\n                                 formatter_class=lambda prog: argparse.HelpFormatter(prog,max_help_position=25,width=90))\n\nparser.add_argument(\"--max-procs\", required=False, default=\"100%\", \\\n                    help=\"Maximum number of processes to use. 0 is unlimited. Can be expressed as \" \\\n                         \"a percentage, for example 50%% (of $(nproc)). Default is 100%%.\")\n\nparser.add_argument(\"--plan\", metavar=\"FILE\", default=\"-\", \\\n                    help=\"JSON formatted plan to be processed (default is to read from stdin).\")\n\nparser.add_argument(\"--joblog\", metavar=\"FILE\", default=None, \\\n                    help=\"File into which job completion information will be written.\")\n\nparser.add_argument(\"--loadstats\", metavar=\"FILE\", default=None, \\\n                    help=\"File into which load average and memory statistics will be written.\")\n\nparser.add_argument(\"--stats-interval\", metavar=\"SECONDS\", type=int, default=60, \\\n                    help=\"Sampling interval in seconds for --loadstats. Default is 60.\")\n\ngroup =  parser.add_mutually_exclusive_group()\ngroup.add_argument(\"--log-burst\", action=\"store_true\", default=True, \\\n                    help=\"Burst job output into individual log files. This is the default.\")\ngroup.add_argument(\"--no-log-burst\", action=\"store_false\", dest=\"log_burst\", \\\n                    help=\"Disable --log-burst, job output is only written to stdout.\")\n\nparser.add_argument(\"--log-combine\", choices=[\"always\", \"never\", \"fail\"], default=\"always\", \\\n                    help='Choose when to send job output to stdout. \"fail\" will send to stdout the ' \\\n                         'log of failed jobs only, while \"never\" will not send any logs to stdout. ' \\\n                         'Default is \"always\".')\n\ngroup =  parser.add_mutually_exclusive_group()\ngroup.add_argument(\"--with-bookends\", action=\"store_true\", default=True, \\\n                    help=\"Top & tail combined logs with searchable markers. Default is enabled.\")\ngroup.add_argument(\"--without-bookends\", action=\"store_false\", dest=\"with_bookends\", \\\n                    help=\"Disable --with-bookends\")\n\ngroup =  parser.add_mutually_exclusive_group()\ngroup.add_argument(\"--halt-on-error\", action=\"store_true\", default=True, \\\n                    help=\"Halt on first build failure. This is the default.\")\ngroup.add_argument(\"--continue-on-error\", action=\"store_false\", dest=\"halt_on_error\", \\\n                    help=\"Disable --halt-on-error and continue building.\")\n\ngroup =  parser.add_mutually_exclusive_group()\ngroup.add_argument(\"--fail-immediately\", action=\"store_true\", default=True, \\\n                    help=\"With --halt-on-error, the build can either fail immediately or only after all \" \\\n                         \"other active jobs have finished. Default is to fail immediately.\")\ngroup.add_argument(\"--fail-after-active\", action=\"store_false\", dest=\"fail_immediately\", \\\n                    help=\"With --halt-on-error, when an error occurs fail after all other active jobs have finished.\")\n\nparser.add_argument(\"--auto-remove\", action=\"store_true\", default=False, \\\n                    help=\"Automatically remove redundant source code directories. Default is disabled.\")\n\nparser.add_argument(\"--progress\", action=\"store_true\", default=False, \\\n                    help=\"Display progress information. Default is disabled\")\n\nparser.add_argument(\"--verbose\", action=\"store_true\", default=False, \\\n                    help=\"Output verbose information to stderr.\")\n\nparser.add_argument(\"--debug\", action=\"store_true\", default=False, \\\n                    help=\"Enable debug information.\")\n\nparser.add_argument(\"--colors\", choices=[\"always\", \"never\", \"auto\"], default=\"auto\", \\\n                    help=\"Color code status (DONE, FAIL, etc) labels.\")\n\nargs = parser.parse_args()\n\n#---------------------------\n\nROOT = os.environ.get(\"ROOT\", os.path.dirname(os.path.dirname(os.path.realpath(__file__))))\nSCRIPTS = os.environ.get(\"SCRIPTS\", \"scripts\")\nTHREAD_CONTROL = os.environ[\"THREAD_CONTROL\"]\n\nif args.debug:\n    debug_log = \"%s/debug.log\" % THREAD_CONTROL\n    DEBUG_LOG = open(debug_log, \"w\")\n    print(\"Debug information is being written to: %s\\n\" % debug_log, file=sys.stderr, flush=True)\nelse:\n    DEBUG_LOG = None\n\nwith open(\"%s/parallel.pid\" % THREAD_CONTROL, \"w\") as pid:\n    print(\"%d\" % os.getpid(), file=pid)\n\ntry:\n    builder = Builder(args.max_procs, args.plan, args.joblog, args.loadstats, args.stats_interval, \\\n                      haltonerror=args.halt_on_error, failimmediately=args.fail_immediately, \\\n                      log_burst=args.log_burst, log_combine=args.log_combine, bookends=args.with_bookends, \\\n                      autoremove=args.auto_remove, colors=args.colors, progress=args.progress, \\\n                      debug=args.debug, verbose=args.verbose)\n\n    result = builder.build()\n\n    if DEBUG_LOG:\n        DEBUG_LOG.close()\n\n    sys.exit(0 if result else 1)\nexcept (KeyboardInterrupt, SystemExit) as e:\n    if builder:\n        builder.cleanup()\n\n    if type(e) == SystemExit:\n        sys.exit(int(str(e)))\n    else:\n        sys.exit(1)\n\n"
  },
  {
    "path": "scripts/pkgjson",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"\"\n\n# This function is passed a list of package.mk paths to be processed.\n# Each package.mk is sourced with relevant variables output in JSON format.\njson_worker() {\n  local packages=\"$@\"\n  local pkgpath hierarchy exited\n\n  exit() { exited=1; }\n\n  for pkgpath in ${packages}; do\n    pkgpath=\"${pkgpath%%@*}\"\n\n    exited=0\n    if ! source_package \"${pkgpath}/package.mk\" &>/dev/null; then\n      unset -f exit\n      die \"$(print_color CLR_ERROR \"FAILURE: sourcing package ${pkgpath}/package.mk\")\"\n    fi\n\n    [ ${exited} -eq 1 ] && continue\n\n    if [[ \"${pkgpath}\" =~ ^${ROOT}/${PACKAGES}/* ]]; then\n      hierarchy=\"global\"\n    elif [[ \"${pkgpath}\" =~ ^${ROOT}/projects/${PROJECT}/${PACKAGES}/* ]]; then\n      hierarchy=\"project\"\n    elif [[ \"${pkgpath}\" =~ ^${ROOT}/projects/${PROJECT}/devices/${DEVICE}/* ]]; then\n      hierarchy=\"device\"\n    fi\n\n    cat <<EOF\n  {\n    \"name\": \"${PKG_NAME}\",\n    \"hierarchy\": \"${hierarchy}\",\n    \"section\": \"${PKG_SECTION}\",\n    \"bootstrap\": \"${PKG_DEPENDS_BOOTSTRAP}\",\n    \"init\": \"${PKG_DEPENDS_INIT}\",\n    \"host\": \"${PKG_DEPENDS_HOST}\",\n    \"target\": \"${PKG_DEPENDS_TARGET}\",\n    \"unpack\": \"${PKG_DEPENDS_UNPACK}\"\n  },\nEOF\n  done\n  unset -f exit\n}\n\nif [ \"$1\" = \"--worker\" ]; then\n  shift\n  json_worker \"$*\"\n  exit $?\nfi\n\n# pipefail: return value of a pipeline is the value of the last (rightmost) command to exit with a non-zero status\nset -o pipefail\n\ncat ${_CACHE_PACKAGE_GLOBAL} ${_CACHE_PACKAGE_LOCAL} ${_CACHE_PACKAGE_LOCAL_DEVICE} | \\\n  xargs --max-args=64 --max-procs=\"$(nproc)\" \"$0\" --worker\nexit $?\n"
  },
  {
    "path": "scripts/uboot_helper",
    "content": "#!/usr/bin/env python3\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\nimport argparse\n\n# When adding new devices to the list please keep them in alphabetical order\n# board-name should contain 'dashes' (-) not 'underscores' (_) and shouldn't contain capitals\n# you can check the formating using an online tool such as https://codebeautify.org/python-formatter-beautifier\n\n#  'project' : {\n#    'device' : {\n#      'board-name' : {\n#        'dtb' : 'board-name.dtb',\n#        'config' : 'board_name_defconfig'\n#      },\n#    },\n#  },\n\ndevices = \\\n{\n  'Allwinner': {\n    'A64': {\n      'orangepi-win': {\n        'dtb': 'sun50i-a64-orangepi-win.dtb',\n        'config': 'orangepi_win_defconfig',\n        'crust_config': 'orangepi_win_defconfig',\n      },\n      'pine64': {\n        'dtb': 'sun50i-a64-pine64.dtb',\n        'config': 'pine64_plus_defconfig',\n        'crust_config': 'pine64_plus_defconfig'\n      },\n      'pine64-lts': {\n        'dtb': 'sun50i-a64-pine64-lts.dtb',\n        'config': 'pine64-lts_defconfig',\n\t'crust_config': 'pine64_plus_defconfig'\n      },\n      'pine64-plus': {\n        'dtb': 'sun50i-a64-pine64-plus.dtb',\n        'config': 'pine64_plus_defconfig',\n        'crust_config': 'pine64_plus_defconfig',\n      },\n    },\n    'H2-plus': {\n      'bananapi-m2-zero': {\n        'dtb': 'sun8i-h2-plus-bananapi-m2-zero.dtb',\n        'config': 'bananapi_m2_zero_defconfig',\n        'crust_config': 'orangepi_one_defconfig'\n      },\n    },\n    'H3': {\n      'bananapi-m2p': {\n        'dtb': 'sun8i-h3-bananapi-m2-plus.dtb',\n        'config': 'bananapi_m2_plus_h3_defconfig',\n        'crust_config': 'bananapi_m2_plus_h3_defconfig'\n      },\n      'beelink-x2': {\n        'dtb': 'sun8i-h3-beelink-x2.dtb',\n        'config': 'beelink_x2_defconfig',\n        'crust_config': 'beelink_x2_defconfig'\n      },\n      'libretech-h3': {\n        'dtb': 'sun8i-h3-libretech-all-h3-cc.dtb',\n        'config': 'libretech_all_h3_cc_h3_defconfig',\n        'crust_config': 'libretech_all_h3_cc_h3_defconfig',\n      },\n      'nanopi-m1': {\n        'dtb': 'sun8i-h3-nanopi-m1.dtb',\n        'config': 'nanopi_m1_defconfig',\n        'crust_config': 'nanopi_m1_defconfig'\n      },\n      'orangepi-2': {\n        'dtb': 'sun8i-h3-orangepi-2.dtb',\n        'config': 'orangepi_2_defconfig',\n        'crust_config': 'orangepi_2_defconfig',\n      },\n      'orangepi-pc': {\n        'dtb': 'sun8i-h3-orangepi-pc.dtb',\n        'config': 'orangepi_pc_defconfig',\n        'crust_config': 'orangepi_pc_defconfig',\n      },\n      'orangepi-pc-plus': {\n        'dtb': 'sun8i-h3-orangepi-pc-plus.dtb',\n        'config': 'orangepi_pc_plus_defconfig',\n        'crust_config': 'orangepi_pc_plus_defconfig',\n      },\n      'orangepi-plus2e': {\n        'dtb': 'sun8i-h3-orangepi-plus2e.dtb',\n        'config': 'orangepi_plus2e_defconfig',\n        'crust_config': 'orangepi_plus2e_defconfig',\n      },\n      'orangepi-plus': {\n        'dtb': 'sun8i-h3-orangepi-plus.dtb',\n        'config': 'orangepi_plus_defconfig',\n        'crust_config': 'orangepi_plus_defconfig',\n      },\n    },\n    'H5' : {\n      'orangepi-pc2': {\n        'dtb': 'sun50i-h5-orangepi-pc2.dtb',\n        'config': 'orangepi_pc2_defconfig',\n        'crust_config': 'orangepi_pc2_defconfig',\n      },\n      'tritium-h5': {\n        'dtb': 'sun50i-h5-libretech-all-h3-cc.dtb',\n        'config': 'libretech_all_h3_cc_h5_defconfig',\n        'crust_config': 'libretech_all_h3_cc_h5_defconfig'\n      },\n    },\n    'H6': {\n      'beelink-gs1' : {\n        'dtb' : 'sun50i-h6-beelink-gs1.dtb',\n        'config' : 'beelink_gs1_defconfig',\n        'crust_config' : 'beelink_gs1_defconfig'\n      },\n      'orangepi-3': {\n        'dtb': 'sun50i-h6-orangepi-3.dtb',\n        'config': 'orangepi_3_defconfig',\n        'crust_config': 'orangepi_3_defconfig'\n      },\n      'orangepi-3-lts': {\n        'dtb': 'sun50i-h6-orangepi-3-lts.dtb',\n        'config': 'orangepi_3_lts_defconfig',\n        'crust_config': 'pine_h64_defconfig'\n      },\n      'orangepi-lite2': {\n        'dtb': 'sun50i-h6-orangepi-lite2.dtb',\n        'config': 'orangepi_lite2_defconfig',\n        'crust_config': 'orangepi_3_defconfig'\n      },\n      'orangepi-one-plus': {\n        'dtb': 'sun50i-h6-orangepi-one-plus.dtb',\n        'config': 'orangepi_one_plus_defconfig',\n        'crust_config': 'orangepi_3_defconfig'\n      },\n      'pine-h64': {\n        'dtb': 'sun50i-h6-pine-h64.dtb',\n        'config': 'pine_h64_defconfig',\n        'crust_config': 'pine_h64_defconfig',\n      },\n      'pine-h64-model-b': {\n        'dtb': 'sun50i-h6-pine-h64-model-b.dtb',\n        'config': 'pine_h64_defconfig',\n        'crust_config': 'pine_h64_defconfig'\n      },\n      'tanix-tx6' : {\n        'dtb' : 'sun50i-h6-tanix-tx6.dtb',\n        'config' : 'tanix_tx6_defconfig',\n        'crust_config' : 'tanix_tx6_defconfig'\n      },\n    },\n    'R40' : {\n      'bananapi-m2u' : {\n        'dtb' : 'sun8i-r40-bananapi-m2-ultra.dtb',\n        'config' : 'Bananapi_M2_Ultra_defconfig'\n      },\n    },\n  },\n  'Amlogic': {\n    'AMLGX': {\n      'box': {\n        'dtb': '',\n        'config': 'p212_defconfig'\n      },\n      'bananapi-cm4io': {\n        'dtb': 'meson-g12b-bananapi-cm4-cm4io.dtb',\n        'config': 'bananapi-cm4io_defconfig'\n      },\n      'bananapi-m2s': {\n        'dtb': 'meson-g12b-a311d-bananapi-m2s.dtb',\n        'config': 'bananapi-m2s_defconfig'\n      },\n      'bananapi-m2-pro': {\n        'dtb': 'meson-sm1-bananapi-m2-pro.dtb',\n        'config': 'bananapi-m2-pro_defconfig'\n      },\n      'bananapi-m5': {\n        'dtb': 'meson-sm1-bananapi-m5.dtb',\n        'config': 'bananapi-m5_defconfig'\n      },\n      'khadas-vim': {\n        'dtb': 'meson-gxl-s905x-khadas-vim.dtb',\n        'config': 'khadas-vim_defconfig'\n      },\n      'khadas-vim2': {\n        'dtb': 'meson-gxm-khadas-vim2.dtb',\n        'config': 'khadas-vim2_defconfig'\n      },\n      'khadas-vim3': {\n        'dtb': 'meson-g12b-a311d-khadas-vim3.dtb',\n        'config': 'khadas-vim3_defconfig'\n      },\n      'khadas-vim3l': {\n        'dtb': 'meson-sm1-khadas-vim3l.dtb',\n        'config': 'khadas-vim3l_defconfig'\n      },\n      'lafrite': {\n        'dtb': 'meson-gxl-s805x-libretech-ac.dtb',\n        'config': 'libretech-ac_defconfig'\n      },\n      'lepotato': {\n        'dtb': 'meson-gxl-s905x-libretech-cc.dtb',\n        'config': 'libretech-cc_defconfig'\n      },\n      'nanopi-k2': {\n        'dtb': 'meson-gxbb-nanopi-k2.dtb',\n        'config': 'nanopi-k2_defconfig'\n      },\n      'odroid-c2': {\n        'dtb': 'meson-gxbb-odroidc2.dtb',\n        'config': 'odroid-c2_defconfig'\n      },\n      'odroid-c4': {\n        'dtb': 'meson-sm1-odroid-c4.dtb',\n        'config': 'odroid-c4_defconfig'\n      },\n      'odroid-hc4': {\n        'dtb': 'meson-sm1-odroid-hc4.dtb',\n        'config': 'odroid-hc4_defconfig'\n      },\n      'odroid-n2': {\n        'dtb': 'meson-g12b-odroid-n2.dtb',\n        'config': 'odroid-n2_defconfig'\n      },\n      'radxa-zero': {\n        'dtb': 'meson-g12a-radxa-zero.dtb',\n        'config': 'radxa-zero_defconfig'\n      },\n      'radxa-zero2': {\n        'dtb': 'meson-g12b-radxa-zero2.dtb',\n        'config': 'radxa-zero2_defconfig'\n      },\n      'wetek-core2': {\n        'dtb': 'meson-gxm-wetek-core2.dtb',\n        'config': 'wetek-core2_defconfig'\n      },\n      'wetek-hub': {\n        'dtb': 'meson-gxbb-wetek-hub.dtb',\n        'config': 'wetek-hub_defconfig'\n      },\n      'wetek-play2': {\n        'dtb': 'meson-gxbb-wetek-play2.dtb',\n        'config': 'wetek-play2_defconfig'\n      },\n    },\n  },\n  'NXP': {\n    'iMX6': {\n      'cubox': {\n        'dtb': '',\n        'config': 'mx6cuboxi_defconfig'\n      },\n      'udoo': {\n        'dtb': '',\n        'config': 'udoo_defconfig'\n      },\n      'wandboard': {\n        'dtb': '',\n        'config': 'wandboard_defconfig'\n      },\n    },\n    'iMX8' : {\n      'mq-evk' : {\n        'dtb' : 'imx8mq-evk.dtb',\n        'config' : 'imx8mq_evk_defconfig'\n      },\n      'pico-mq' : {\n        'dtb' : 'imx8mq-pico-pi.dtb',\n        'config' : 'pico-imx8mq_defconfig'\n      },\n    },\n  },\n  'Qualcomm': {\n    'Dragonboard': {\n      '410c': {\n        'dtb': 'apq8016-sbc.dtb',\n        'config': 'dragonboard410c_defconfig'\n      },\n    },\n  },\n  'Rockchip': {\n    'GameForce' : { \n      'chi' : { \n        'dtb' : 'rk3326-gameforce-linux.dtb', \n        'config' : 'odroidgoa_defconfig' \n       }, \n    },\n    'OdroidGoAdvance' : {\n      'odroidgo2_v11' : { \n        'dtb' : 'rk3326-odroidgo2-linux-v11.dtb', \n        'config' : 'odroidgoa_defconfig' \n      },\n        'odroidgo2' : { \n        'dtb' : 'rk3326-odroidgo2-linux.dtb', \n        'config' : 'odroidgoa_defconfig' \n        },\n    },\n    'RK356x': { \n      'rk356x': {\n        'dtb': 'rk3568-firefly-roc-pc.dtb',\n         'config' : 'firefly-rk3568_defconfig' \n         },\n    },\n    'OdroidM1': { \n      'OdroidM1': {\n        'dtb': 'rk3568-odroid-m1.dtb',\n         'config' : 'odroid_rk3568_defconfig' \n         },\n    },\n    'RK3288': {\n      'miqi': {\n        'dtb': 'rk3288-miqi.dtb',\n        'config': 'miqi-rk3288_defconfig'\n      },\n      'tinker': {\n        'dtb': 'rk3288-tinker-s.dtb',\n        'config': 'tinker-s-rk3288_defconfig'\n      },\n    },\n    'RK3328': {\n      'a1': {\n        'dtb': 'rk3328-a1.dtb',\n        'config': 'evb-rk3328_defconfig',\n        'rockchip_legacy_boot': '1'\n      },\n      'roc-cc': {\n        'dtb': 'rk3328-roc-cc.dtb',\n        'config': 'roc-cc-rk3328_defconfig'\n      },\n      'rock64': {\n        'dtb': 'rk3328-rock64.dtb',\n        'config': 'rock64-rk3328_defconfig'\n      },\n    },\n    'RK3399': {\n      'hugsun-x99': {\n        'dtb': 'rk3399-hugsun-x99.dtb',\n        'config': 'evb-rk3399_defconfig',\n        'rockchip_legacy_boot': '1'\n      },\n      'khadas-edge': {\n        'dtb': 'rk3399-khadas-edge.dtb',\n        'config': 'khadas-edge-rk3399_defconfig'\n      },\n      'nanopc-t4': {\n        'dtb': 'rk3399-nanopc-t4.dtb',\n        'config': 'nanopc-t4-rk3399_defconfig'\n      },\n      'nanopi-m4': {\n        'dtb': 'rk3399-nanopi-m4.dtb',\n        'config': 'nanopi-m4-rk3399_defconfig'\n      },\n      'orangepi': {\n        'dtb': 'rk3399-orangepi.dtb',\n        'config': 'orangepi-rk3399_defconfig'\n      },\n      'rock960': {\n        'dtb': 'rk3399-rock960.dtb',\n        'config': 'rock960-rk3399_defconfig'\n      },\n      'rock-pi-4': {\n        'dtb': 'rk3399-rock-pi-4b.dtb',\n        'config': 'rock-pi-4-rk3399_defconfig'\n      },\n      'rock-pi-4-plus': {\n        'dtb': 'rk3399-rock-pi-4b-plus.dtb',\n        'config': 'rock-pi-4-rk3399_defconfig'\n      },\n      'rock-pi-n10': {\n        'dtb': 'rk3399pro-rock-pi-n10.dtb',\n        'config': 'rock-pi-n10-rk3399pro_defconfig'\n      },\n      'rockpro64': {\n        'dtb': 'rk3399-rockpro64.dtb',\n        'config': 'rockpro64-rk3399_defconfig'\n      },\n      'roc-pc': {\n        'dtb': 'rk3399-roc-pc-mezzanine.dtb',\n        'config': 'roc-pc-mezzanine-rk3399_defconfig'\n      },\n      'roc-pc-plus': {\n        'dtb': 'rk3399-roc-pc-plus.dtb',\n        'config': 'roc-pc-rk3399_defconfig'\n      },\n      'sapphire': {\n        'dtb': 'rk3399-sapphire.dtb',\n        'config': 'evb-rk3399_defconfig',\n        'rockchip_legacy_boot': '1'\n      },\n    },\n  },\n  'Samsung': {\n    'Exynos': {\n      'odroid-xu3': {\n        'dtb': 'exynos5422-odroidxu3.dtb',\n        'config': 'odroid-xu3_defconfig'\n      },\n      'odroid-xu4': {\n        'dtb': 'exynos5422-odroidxu4.dtb',\n        'config': 'odroid-xu4_defconfig'\n      },\n    },\n  },\n  'Amlogic-ce': {\n    'Amlogic-ng': {\n    },\n    'Amlogic-ng-dv': {\n    },\n    'Amlogic-no': {\n    },\n    'Amlogic-ne': {\n    },\n  },\n}\n\nclass OptionsAction(argparse.Action):\n\n    def __call__(self, parser, namespace, values, option_string=None):\n        message = None\n\n        if self.dest == 'project':\n            if values is None:\n                print(' '.join(project for project in sorted(devices)))\n                parser.exit()\n\n            if values not in devices.keys():\n                message = \"invalid choice: {0!r} (choose from {1})\".format(values, ', '.join([repr(project) for project in devices]))\n\n        if self.dest == 'soc':\n            project = getattr(namespace, 'project')\n\n            if values is None:\n                print(' '.join(soc for soc in sorted(devices[project])))\n                parser.exit()\n\n            if values not in devices[project].keys():\n                message = \"invalid choice: {0!r} (choose from {1})\".format(values, ', '.join([repr(soc) for soc in devices[project]]))\n\n        if self.dest == 'board':\n            project = getattr(namespace, 'project')\n            soc = getattr(namespace, 'soc')\n\n            if values is None:\n                print(' '.join(board for board in sorted(devices[project][soc])))\n                parser.exit()\n\n            if values not in devices[project][soc].keys():\n                message = \"invalid choice: {0!r} (choose from {1})\".format(values, ', '.join([repr(board) for board in devices[project][soc]]))\n\n        if self.dest == 'value':\n            project = getattr(namespace, 'project')\n            soc = getattr(namespace, 'soc')\n            board = getattr(namespace, 'board')\n\n            if values is None:\n                print(' '.join(value for value in sorted(devices[project][soc][board].keys())))\n                parser.exit()\n\n            if values not in devices[project][soc][board].keys():\n                parser.exit()\n\n        if message is not None:\n            raise argparse.ArgumentError(self, message)\n\n        setattr(namespace, self.dest, values)\n\nparser = argparse.ArgumentParser(description='Script to help with u-boot configuration')\n\nparser.add_argument('project', nargs='?', action=OptionsAction)\n\nparser.add_argument('soc', nargs='?', action=OptionsAction)\n\nparser.add_argument('board', nargs='?', action=OptionsAction)\n\nparser.add_argument('value', nargs='?', action=OptionsAction)\n\noptions = parser.parse_args()\n\nif options.project != 'Amlogic-ce':\n    print(devices[options.project][options.soc][options.board][options.value])\n\nparser.exit()\n"
  },
  {
    "path": "scripts/unpack",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"${1}\"\n\nif [ -z \"${1}\" ]; then\n  die \"usage: ${0} package_name [parent_pkg]\"\nfi\n\nif [ -z \"${PKG_NAME}\" ]; then\n  die \"$(print_color CLR_ERROR \"${1}: no package.mk file found\")\"\nfi\nPARENT_PKG=\"${2:-${PKG_NAME}}\"\n\npkg_lock \"${PKG_NAME}\" \"unpack\" \"${PARENT_PKG}\"\n\n${SCRIPTS}/get \"${PKG_NAME}\"\n\nif [ -n \"${PKG_DEPENDS_UNPACK}\" ]; then\n  export _unpack_recursive_cnt=$((_unpack_recursive_cnt+1)) \n  if [ ${_unpack_recursive_cnt} -gt 2 ]; then\n    die \"unpack recursive limit hit: ${PKG_DEPENDS_UNPACK}, ${PARENT_PKG}\"\n  fi\n\n  for p in ${PKG_DEPENDS_UNPACK}; do\n    ${SCRIPTS}/unpack \"${p}\" \"${PARENT_PKG}\"\n  done\n  \n  unset _unpack_recursive_cnt\nfi\n\nSTAMP=\"${PKG_BUILD}/.libreelec-unpack\"\n\nmkdir -p ${BUILD}/build\n\n# Perform a wildcard match on the package to ensure old versions are cleaned too\nPKG_DEEPHASH=\nfor i in ${BUILD}/build/${PKG_NAME}-*; do\n  if [ -d ${i} -a -f \"${i}/.libreelec-unpack\" ] ; then\n    . \"${i}/.libreelec-unpack\"\n    if [ \"${STAMP_PKG_NAME}\" = \"${PKG_NAME}\" ]; then\n      [ -z \"${PKG_DEEPHASH}\" ] && PKG_DEEPHASH=$(calculate_stamp)\n      if [ ! \"${PKG_DEEPHASH}\" = \"${STAMP_PKG_DEEPHASH}\" ] ; then\n        ${SCRIPTS}/clean \"${PKG_NAME}\"\n      fi\n    fi\n  fi\ndone\n\nif [ -d \"${PKG_BUILD}\" -a ! -f \"${STAMP}\" ]; then\n  # stale pkg build dir\n  ${SCRIPTS}/clean \"${PKG_NAME}\"\nfi\n\nif [ -f \"${STAMP}\" ]; then\n  pkg_lock_status \"UNLOCK\" \"${PKG_NAME}\" \"unpack\" \"already unpacked\"\n  exit 0\nfi\n\npkg_lock_status \"ACTIVE\" \"${PKG_NAME}\" \"unpack\"\n\nif [ -d \"${SOURCES}/${PKG_NAME}\" -o -d \"${PKG_DIR}/sources\" ] || pkg_call_exists_opt unpack; then\n  pkg_call_finish\n  build_msg \"CLR_UNPACK\" \"UNPACK\" \"${PKG_NAME}\" \"indent\"\n\n  # unpack into a unique location as unpacking into a single ${BUILD} directory is not thread-safe\n  PKG_UNPACK_DIR=\"${BUILD}/.unpack/${PKG_NAME}\"\n  rm -rf \"${PKG_UNPACK_DIR}\"\n  mkdir -p \"${PKG_UNPACK_DIR}\"\n\n  # Save PKG_BUILD and point at our private unpack directory so that any\n  # modifications to the content of ${PKG_BUILD} will be \"safe\".\n  PKG_BUILD_ORIG=\"${PKG_BUILD}\"\n  PKG_BUILD=\"${PKG_UNPACK_DIR}/${PKG_NAME}-${PKG_VERSION}\"\n\n  pkg_call_exists_opt pre_unpack && pkg_call\n\n  if pkg_call_exists unpack; then\n    pkg_call\n  else\n    if [ -n \"${PKG_URL}\" ]; then\n      ${SCRIPTS}/extract \"${PKG_NAME}\" \"${PKG_UNPACK_DIR}\"\n    fi\n    pkg_call_finish\n  fi\n\n  if [ -z \"${PKG_SOURCE_DIR}\" -a -d \"${PKG_UNPACK_DIR}/${PKG_NAME}-${PKG_VERSION}\"* ]; then\n    mv \"${PKG_UNPACK_DIR}/${PKG_NAME}-${PKG_VERSION}\"* \"${PKG_UNPACK_DIR}/.intermediate\"\n  fi\n\n  if [ ! -d \"${PKG_UNPACK_DIR}/.intermediate\" ]; then\n    if [ -n \"${PKG_SOURCE_DIR}\" ]; then\n      if [ -d \"${PKG_UNPACK_DIR}\"/${PKG_SOURCE_DIR} ]; then\n        mv \"${PKG_UNPACK_DIR}\"/${PKG_SOURCE_DIR} \"${PKG_UNPACK_DIR}/.intermediate\"\n      else\n        # fallback\n        mv \"${BUILD}\"/${PKG_SOURCE_DIR} \"${PKG_UNPACK_DIR}/.intermediate\"\n      fi\n    fi\n  fi\n\n  [ ! -d \"${PKG_UNPACK_DIR}/.intermediate\" ] && mkdir -p \"${PKG_UNPACK_DIR}/.intermediate\"\n\n  if [ -d \"${PKG_DIR}/sources\" ]; then\n    cp -PRf \"${PKG_DIR}/sources/\"* \"${PKG_UNPACK_DIR}/.intermediate\"\n  fi\n\n  # Add a tag to the unpacked folder before transferring into the shared build folder\n  echo \"INFO_PKG_NAME=\\\"${PKG_NAME}\\\"\" > \"${PKG_UNPACK_DIR}/.intermediate/.libreelec-package\"\n\n  # Restore original PKG_BUILD, and transfer the unpacked folder\n  PKG_BUILD=\"${PKG_BUILD_ORIG}\"\n  rm -fr \"${PKG_BUILD}\"\n  mv \"${PKG_UNPACK_DIR}/.intermediate\" \"${PKG_BUILD}\"\n\n  # cleanup\n  rm -rf \"${PKG_UNPACK_DIR}\"\n\n  pkg_call_exists_opt post_unpack && pkg_call\n\n  if [ \"${PKG_SKIP_PATCHES}\" != \"yes\" ]; then\n    pkg_call_exists_opt pre_patch && pkg_call\n\n    if [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n      PATCH_ARCH=\"x86\"\n    elif  [ \"${PKG_IS_KERNEL_PKG}\" = \"yes\" ]; then\n      PATCH_ARCH=\"${TARGET_KERNEL_PATCH_ARCH:-${TARGET_ARCH}}\"\n    else\n      PATCH_ARCH=\"${TARGET_PATCH_ARCH:-${TARGET_ARCH}}\"\n    fi\n\n    PATCH_DIRS_PKG=\"\"\n    PATCH_DIRS_PRJ=\"\"\n    if [ -n \"${PKG_PATCH_DIRS}\" ]; then\n      for patch_dir in ${PKG_PATCH_DIRS}; do\n        if [[ ${patch_dir} =~ ^/ ]]; then\n          [ -f ${patch_dir} ] && PATCH_DIRS_PKG+=\" ${patch_dir}\"\n          [ -d ${patch_dir} ] && PATCH_DIRS_PKG+=\" ${patch_dir}/*.patch\"\n        else\n          [ -d ${PKG_DIR}/patches/${patch_dir} ] && PATCH_DIRS_PKG+=\" ${PKG_DIR}/patches/${patch_dir}/*.patch\"\n          [ -d ${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/${patch_dir} ] && PATCH_DIRS_PRJ+=\" ${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/${patch_dir}/*.patch\"\n          [ -d ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/patches/${PKG_NAME}/${patch_dir} ] && PATCH_DIRS_PRJ+=\" ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/patches/${PKG_NAME}/${patch_dir}/*.patch\"\n        fi\n      done\n    fi\n\n    for i in ${PKG_DIR}/patches/*.patch \\\n             ${PKG_DIR}/patches/${PATCH_ARCH}/*.patch \\\n             ${PATCH_DIRS_PKG} \\\n             ${PKG_DIR}/patches/${PKG_VERSION}/*.patch \\\n             ${PKG_DIR}/patches/${PKG_VERSION}/${PATCH_ARCH}/*.patch \\\n             ${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/*.patch \\\n             ${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/${PATCH_ARCH}/*.patch \\\n             ${PATCH_DIRS_PRJ} \\\n             ${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/${PKG_VERSION}/*.patch \\\n             ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/patches/${PKG_NAME}/*.patch; do\n\n      thisdir=\"${i%/*}\"\n\n      if [ \"${thisdir}\" = \"${PKG_DIR}/patches\" ]; then\n        PATCH_DESC=\"(common)\"\n      elif [ \"${thisdir}\" = \"${PKG_DIR}/patches/${PATCH_ARCH}\" ]; then\n        PATCH_DESC=\"(common - ${PATCH_ARCH})\"\n      elif [ \"${thisdir}\" = \"${PKG_DIR}/patches/${PKG_VERSION}\" ]; then\n        PATCH_DESC=\"(common - ${PKG_VERSION})\"\n      elif [ \"${thisdir}\" = \"${PKG_DIR}/patches/${PKG_VERSION}/${PATCH_ARCH}\" ]; then\n        PATCH_DESC=\"(${PKG_VERSION} - ${PATCH_ARCH})\"\n      elif [ \"${thisdir}\" = \"${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}\" ]; then\n        PATCH_DESC=\"(project)\"\n      elif [ \"${thisdir}\" = \"${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/${PATCH_ARCH}\" ]; then\n        PATCH_DESC=\"(project - ${PATCH_ARCH})\"\n      elif [ \"${thisdir}\" = \"${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/${PKG_VERSION}\" ]; then\n        PATCH_DESC=\"(project - ${PKG_VERSION})\"\n      elif [ \"${thisdir}\" = \"${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/patches/${PKG_NAME}\" ]; then\n        PATCH_DESC=\"(device)\"\n      else\n        if [[ \"${thisdir}\" =~ ^${PKG_DIR}/.* ]]; then\n          PATCH_DESC=\"(common - ${thisdir##*/})\"\n        elif [[ \"${thisdir}\" =~ ^${PROJECT_DIR}/.*/devices/.* ]]; then\n          PATCH_DESC=\"(device - ${thisdir##*/})\"\n        elif [[ \"${thisdir}\" =~ ^${PROJECT_DIR}/.* ]]; then\n          PATCH_DESC=\"(project - ${thisdir##*/})\"\n        else\n          PATCH_DESC=\"(absolute - ${i})\"\n        fi\n      fi\n\n      if [ -f \"${i}\" ]; then\n        build_msg \"CLR_APPLY_PATCH\" \"APPLY PATCH $(print_color \"CLR_PATCH_DESC\" \"${PATCH_DESC}\")\" \"${i#${ROOT}/}\"\n        if grep -qE '^GIT binary patch$|^rename from|^rename to' ${i}; then\n          git apply --directory=\"${PKG_BUILD}\" -p1 --verbose --whitespace=nowarn --unsafe-paths < ${i} >&${VERBOSE_OUT}\n        else\n          patch -d \"${PKG_BUILD}\" -p1 < ${i} >&${VERBOSE_OUT}\n        fi\n      fi\n    done\n\n    pkg_call_exists_opt post_patch && pkg_call\n  fi\n\n  if [ \"${PKG_NAME}\" != \"configtools\" ] ; then\n    for config in $(find \"${PKG_BUILD}\" -name config.guess | sed 's/config.guess//'); do\n      build_msg \"CLR_FIXCONFIG\" \"FIXCONFIG\" \"${config}\"\n\n      [ -f \"${config}/config.guess\" -a -f ${TOOLCHAIN}/configtools/config.guess ] && \\\n        cp -f ${TOOLCHAIN}/configtools/config.guess ${config}\n      [ -f \"${config}/config.sub\" -a -f ${TOOLCHAIN}/configtools/config.sub ] && \\\n        cp -f ${TOOLCHAIN}/configtools/config.sub ${config}\n    done\n  fi\nfi\npkg_call_finish\n\nif [ \"${PKG_SECTION}\" != \"virtual\" ]; then\n  mkdir -p \"${PKG_BUILD}\"\n  echo \"INFO_PKG_NAME=\\\"${PKG_NAME}\\\"\" > \"${PKG_BUILD}/.libreelec-package\"\n\n  PKG_DEEPHASH=$(calculate_stamp)\n  for i in PKG_NAME PKG_DEEPHASH; do\n    echo \"STAMP_${i}=\\\"${!i}\\\"\" >> ${STAMP}\n  done\nfi\n\npkg_lock_status \"UNLOCK\" \"${PKG_NAME}\" \"unpack\" \"unpacked\"\n"
  },
  {
    "path": "tools/RPi/gen-rpi-kodi-patch.sh",
    "content": "#!/bin/bash\nset -e\n\nBIN=$(readlink -f $(dirname $0))\n\nif git rev-parse --is-inside-work-tree &>/dev/null; then\n  echo \"Don't run this script inside a git reppository!\"\n  exit 1\nfi\n\nDEPTH=1000\n\nusage()\n{\n  local me=\"$(basename $0)\"\n\n  echo \"Usage:   ${me} <popcornmix-branch> <sha>|<xbmc branch>\"\n  echo\n  echo \"Example: ${me} jarvis_rbp_backports d11fabefb909e75e7186bd9ecd0cbff9e8b24577\"\n  echo \"Example: ${me} jarvis_rbp_backports Jarvis\"\n  echo \"Example: ${me} newclock5 master\"\n  echo\n  echo \"For sha, see https://github.com/xbmc/xbmc/compare/Jarvis...popcornmix:jarvis_rbp_backports (replace branches as appropriate)\"\n  exit 1\n}\n\nif [ -z \"${1}\" ]; then\n  echo \"ERROR: popcornmix branch must be specified!\"\n  echo\n  usage\nfi\n\nif [ -z \"${2}\" ]; then\n  echo \"ERROR: First popcornmix revision (sha) or name of xbmc branch must be specified!\"\n  echo\n  usage\nfi\n\nBRANCH=\"$1\"\nBASEREV=\"$2\"\n\nrm -fr raspberrypi-kodi\n\n# If we have a persisted version of the repo, quickly copy it\nif [ -d raspberrypi-kodi.stash ]; then\n  echo \"Copying raspberrypi-kodi.stash raspberrypi-kodi...\"\n  cp -r raspberrypi-kodi.stash raspberrypi-kodi\n  cd raspberrypi-kodi\n  git checkout ${BRANCH}\nelse\n  git clone -b ${BRANCH} --depth=${DEPTH} --single-branch https://github.com/popcornmix/xbmc.git raspberrypi-kodi\n  cd raspberrypi-kodi\nfi\n\nif [[ ${BASEREV} =~ [0-9a-f]{40} ]]; then\n  BASEREV=\"${BASEREV}~1\"\nelse\n  git remote add -t ${BASEREV} xbmc https://github.com/xbmc/xbmc.git\n  BASEREV=\"xbmc/${BASEREV}\"\nfi\n\n# Apply the following config change to reduce chance of duplicate hashes\ngit config --local core.abbrev 40\n\ngit fetch --all --depth=${DEPTH}\ngit reset --hard origin/${BRANCH}\n\nTOPREV=\"$(git log --oneline --grep \"UNSTABLE: This is a placeholder. Commits after this point are considered experimental.\" | awk '{print $1}')\"\nif [ -n \"${TOPREV}\" ]; then\n  echo \"Found UNSTABLE placeholder with rev ${TOPREV}, making this the new HEAD\"\n  git reset --hard ${TOPREV}\nelse\n  echo \"WARNING: UNSTABLE placeholder not found, assuming it is not present in branch ${BRANCH}\"\nfi\n\nif [ -d addons/skin.confluence ]; then\n  SKIN1=skin.confluence\n  SKIN2=kodi-theme-Confluence\nelse\n  SKIN1=skin.estuary\n  SKIN2=kodi-theme-Estuary\nfi\n\nGIT_SEQUENCE_EDITOR=${BIN}/rpi-kodi-rebase.sh git rebase -i ${BASEREV}\ngit format-patch --no-signature --stdout ${BASEREV} >/tmp/kodi.patch\n\ncd .. && rm -fr raspberrypi-kodi\n\necho\necho \"New kodi patch: /tmp/kodi.patch\"\n\necho\necho \"## LibreELEC Update Notes ##\"\necho\necho \"cd LibreELEC.tv\"\necho \"git checkout master\"\necho \"git pull upstream master\"\necho \"git checkout -b somebranch\"\n\nBRANCH=\"${BRANCH//_/-}\"\n\necho\nif [ -s /tmp/kodi.patch ]; then\n  echo \"cp /tmp/kodi.patch projects/RPi/patches/kodi/kodi-001-backport.patch\"\n  echo \"git commit -am \\\"RPi: Update kodi support patch\\\"\"\nelse\n  echo \"NO KODI PATCH REQUIRED\"\nfi\n\necho\n"
  },
  {
    "path": "tools/RPi/rpi-kodi-rebase.sh",
    "content": "#!/bin/bash\n\nTODO=$1\n\n# Drop commits not used\nDROP_COMMITS=\"\nUNSTABLE\\: This is a placeholder\\. Commits after this point are considered experimental\\.\n\"\n\nIFS=$'\\n'\nfor COMMIT in $DROP_COMMITS; do\n  sed -i -E \"s/^pick ([0-9a-f]+) (${COMMIT}.*)/drop \\1 \\2/g\" $TODO\ndone\n\ngrep -E \"^drop \" $TODO > /tmp/dropped\nsed -i -E \"/^drop /d\" $TODO\n"
  },
  {
    "path": "tools/adjust_kernel_config",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\nif [ -z \"${1}\" -o \"${1}\" == \"help\" -o \"${1}\" == \"--help\" -o \"${1}\" == \"h\" -o \"${1}\" == \"-h\" ]; then\n  echo -e \"A kernel config command must be specified:\\n\"\n  echo -e \"${0} menuconfig\"\n  echo -e \"\"\n  echo -e \"To see all available config commands use:\\n\"\n  echo -e \"${0} commands\"\n  exit\nfi\n\nKERNEL_CONFIG_COMMAND=\"$1\"\n\n. config/options linux\n\n${SCRIPTS}/unpack linux\n\nAVAILABLE_KERNEL_CONFIG_COMMANDS=\"$(kernel_make -C ${PKG_BUILD} help | sed -n '/Configuration targets:/,/Other generic targets:/p' | sed -n -E 's/^  ([a-z0-9]+)[ -]*.*/\\1/p')\"\n\nprint_config_commands() {\n  echo -e \"Available kernel config commands are:\\n\\n${AVAILABLE_KERNEL_CONFIG_COMMANDS}\"\n}\n\nif [ \"${1}\" == \"commands\" ]; then\n  print_config_commands\n  exit\nfi\n\nif [ -z \"$(echo ${AVAILABLE_KERNEL_CONFIG_COMMANDS} | grep ${KERNEL_CONFIG_COMMAND})\" ]; then\n  echo -e \"\\\"${KERNEL_CONFIG_COMMAND}\\\" is not an available kernel config command\\n\"\n  print_config_commands\n  exit\nfi\n\ntools/check_kernel_config\n\nkernel_make KCONFIG_CONFIG=${PKG_KERNEL_CFG_FILE} -C ${PKG_BUILD} ${KERNEL_CONFIG_COMMAND}\n"
  },
  {
    "path": "tools/change_addon_version",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-only\n# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)\n\n# path to the version file\nDISTRIBUTION_PATH=\"distributions/LibreELEC/version\"\n\n# prevents executing from wrong folder\n[ -f ${DISTRIBUTION_PATH} ] || { echo \"${DISTRIBUTION_PATH}: No such file or directory\" && exit; }\n\n# current addon-version\nDISTRO_ADDON_VERSION=$(grep -oP '(?<=ADDON_VERSION=\\\").*(?=\\\")' ${DISTRIBUTION_PATH})\n\n# increase addon-version x.y.z to x.y.(z+1)\nBUMP_ADDON_VERSION=\"${DISTRO_ADDON_VERSION%.*}.$((${DISTRO_ADDON_VERSION##*.} + 1))\"\n\n# update ADDON-VERSION\nupdate_addon_version() {\n  sed -e \"s|ADDON_VERSION=.*|ADDON_VERSION=\\\"${BUMP_ADDON_VERSION}\\\"|\" -i \"${DISTRIBUTION_PATH}\"\n\n  echo \"git commit \\\"distro: bump ADDON_VERSION to ${BUMP_ADDON_VERSION}\\\"\"\n  git commit -qs -m \"distro: bump ADDON_VERSION to ${BUMP_ADDON_VERSION}\" \"${DISTRIBUTION_PATH}\"\n}\n\nupdate_package() {\n  # update package.mk\n  for package_mk in $(find packages/addons -type f -name \"package.mk\" -not -path \"packages/addons/addon-depends/*\"); do\n    sed -e \"s|PKG_REV=.*|PKG_REV=\\\"0\\\"|\" -i \"${package_mk}\"\n  done\n\n  # update changelog.txt\n  for changelog_txt in $(find packages/addons -type f -name \"changelog.txt\" -not -path \"packages/addons/addon-depends/*\"); do\n    echo -e \"initial release\" >\"${changelog_txt}\"\n  done\n\n  # commit changes\n  # avoid errors at commit by checking if changes are available\n  git diff --quiet HEAD $REF -- packages/addons || { echo \"git commit \\\"addons: reset version\\\"\" && git commit -qs -m \"addons: reset version\" \"packages/addons\"; }\n}\n\n# check if whiptail is installed and directly execute script when argument is supplied\nif [ -z \"$1\" ]; then\n  if ! command -v whiptail >/dev/null 2>&1; then\n    echo \"whiptail not installed, use the command line instead\"\n    echo \"Usage: $0 1.2.3\"\n    exit\n  fi\nelse\n  BUMP_ADDON_VERSION=\"$1\"\n  update_addon_version\n  update_package\n  exit\nfi\n\nOPTION=$(whiptail --title \"Update ADDON-VERSION\" --menu \"\" 12 60 4 \\\n  \"1\" \"Update to ${BUMP_ADDON_VERSION}\" \\\n  \"2\" \"Update to custom version\" \\\n  \"3\" \"Exit\" 3>&1 1>&2 2>&3)\n\ncase $OPTION in\n\"1\")\n  update_addon_version\n  update_package\n  ;;\n\"2\")\n  BUMP_ADDON_VERSION=$(whiptail --inputbox \"Enter ADDON-VERSION:\" 10 25 ${DISTRO_ADDON_VERSION} 3>&1 1>&2 2>&3)\n  EXITSTATUS=$?\n  if [ $EXITSTATUS = 0 ]; then\n    update_addon_version\n    update_package\n  else\n    exit\n  fi\n  ;;\n\"3\")\n  exit\n  ;;\nesac\n"
  },
  {
    "path": "tools/check_kernel_config",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\n. config/options linux\n\n${SCRIPTS}/unpack linux\n\nif [ -f \"${DISTRO_DIR}/${DISTRO}/kernel_options\" ]; then\n  while read OPTION; do\n    [ -z \"$OPTION\" -o -n \"$(echo \"$OPTION\" | grep '^#')\" ] && continue\n\n    if [ \"${OPTION##*=}\" == \"m\" ]; then\n      echo \"[m] ${OPTION%%=*}\"\n      $PKG_BUILD/scripts/config --file $PKG_KERNEL_CFG_FILE --module ${OPTION%%=*}\n    fi\n\n    if [ \"${OPTION##*=}\" == \"y\" ]; then\n      echo \"[y] ${OPTION%%=*}\"\n      $PKG_BUILD/scripts/config --file $PKG_KERNEL_CFG_FILE --enable ${OPTION%%=*}\n    fi\n\n    if [ \"${OPTION##*=}\" == \"n\" ]; then\n      echo \"[n] ${OPTION%%=*}\"\n      $PKG_BUILD/scripts/config --file $PKG_KERNEL_CFG_FILE --disable ${OPTION%%=*}\n    fi\n\n    # must be a string if it contains double quotes\n    if [ -n \"$(echo ${OPTION##*=} | grep '\"')\" ]; then\n      echo \"[${OPTION##*=}] ${OPTION%%=*}\"\n      $PKG_BUILD/scripts/config --file $PKG_KERNEL_CFG_FILE --set-str ${OPTION%%=*} $(echo ${OPTION##*=} | tr -d '\"')\n    fi\n\n  done < ${DISTRO_DIR}/${DISTRO}/kernel_options\nelse\n  echo \"kernel options file doesn't exist: ${DISTRO_DIR}/${DISTRO}/kernel_options\"\nfi\n"
  },
  {
    "path": "tools/checkunpack",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\n. ./config/options \"\"\n\nMD5SUM=\"$(echo ${BUILD} | md5sum | awk '{ print $1 }')\"\nRESTART_FILE=/tmp/checkunpack.progress.${MD5SUM}\n\nusage() {\n  cat <<EOF\nUsage: $0 [-f \"regex\"] [-c] [-v] [-S] [-h]\n\n  -f regex    Filter based on regex, eg. -f \"RTL.*|^kodi-\" would match all\n              Realtek drivers and any package beginning with kodi-.\n              Using a filter ignores any existing progress file.\n  -c          Remove restartable progress file at beginning of this run\n  -v          Verbose output, view failed output from scripts/unpack\n  -S          Display skipped/ignored packages\n  -h          This help message\n\nBy default previously processed packages that unpacked successfully will be skipped,\nunless their stamp has been subsequently modified. Use -c to ignore any previous\nprogress, and (re-)process every package again.\n\nCurrent progress file: ${RESTART_FILE}\nEOF\n  exit\n}\n\nFILTER=\".\"\nRMPROGRESS=\"no\"\nVERBOSE=\"no\"\nSHOW_SKIPPED=\"no\"\nUSING_FILTER=\"no\"\n\nwhile getopts \"f:cvSh\" opt; do\n  case ${opt} in\n    f) FILTER=\"${OPTARG}\"; USING_FILTER=\"yes\";;\n    c) RMPROGRESS=\"yes\";;\n    v) VERBOSE=\"yes\";;\n    S) SHOW_SKIPPED=\"yes\";;\n    h) usage;;\n    *) usage;;\n  esac\ndone\n\nTMP_FILE=$(mktemp)\ntrap \"rm -f ${TMP_FILE}\" EXIT\n\n[ \"${RMPROGRESS}\" = \"yes\" ] && rm -f \"${RESTART_FILE}\"\n\nTXRED=\"$(tput setaf 1 bold)\"\nTXGREEN=\"$(tput setaf 2 bold)\"\nTXRESET=\"$(tput sgr0)\"\n\nSKIPPED=\"$(cut -d' ' -f1 ${RESTART_FILE} 2>/dev/null | sort -u | wc -l || true)\"\n[ \"${USING_FILTER}\" = \"no\" -a \"${SKIPPED:-0}\" -ne 0 ] && echo -e \"WARNING: skipping ${SKIPPED} packages.\\n\" >&2\n\nfor pkg_name in $(get_all_package_names | grep -E \"${FILTER}\"); do\n  stamp=$(source_package ${pkg_name}; calculate_stamp)\n  if [ -z \"${stamp}\" ]; then\n    [ \"${SHOW_SKIPPED}\" = \"yes\" ] && printf \"Checking: %-40s IGNORED\\n\" \"${pkg_name}\"\n    continue\n  fi\n\n  if [ \"${USING_FILTER}\" = \"no\" ] && grep -qE \"^${pkg_name} ${stamp}$\" ${RESTART_FILE} 2>/dev/null; then\n    [ \"${SHOW_SKIPPED}\" = \"yes\" ] && printf \"Checking: %-40s SKIPPED\\n\" \"${pkg_name}\"\n    continue\n  fi\n\n  printf \"Checking: %-40s\" \"${pkg_name}\"\n\n  rm -rf \"${BUILD}/\"* ${BUILD}/.unpack\n\n  OUTPUT=\"$(scripts/unpack \"${pkg_name}\" 2>&1)\" && res=0 || res=1\n\n  if [ ${res} -eq 0 ]; then\n    echo \" ${TXGREEN}OK${TXRESET}\"\n    [ \"${USING_FILTER}\" = \"no\" ] && echo \"${pkg_name} ${stamp}\" >>${RESTART_FILE}\n  else\n    echo \" ${TXRED}FAILED${TXRESET}\"\n    echo \"${pkg_name}\" >>${TMP_FILE}\n    [ \"${VERBOSE}\" = \"yes\" -a -n \"${OUTPUT}\" ] && echo \"${OUTPUT}\"\n  fi\n  rm -rf \"${BUILD}/\"* ${BUILD}/.unpack\ndone\n\nif [ -s \"${TMP_FILE}\" ]; then\n  echo\n  echo \"The following packages failed to unpack:\"\n  cat ${TMP_FILE}\n  exit 1\nfi\n"
  },
  {
    "path": "tools/dashboard",
    "content": "#!/bin/bash -e\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nexport NOONEXIT=yes\n\ncd \"$(readlink -f \"$(dirname \"$0\")\")/..\"\n\nexport _CACHE_PACKAGE_LOCAL_DEVICE=none _CACHE_PACKAGE_LOCAL=none _CACHE_PACKAGE_GLOBAL=none _DEBUG_DEPENDS_LIST=none DEFAULT_PYTHON_VERSION=none\n\nif [ -n \"${PROJECT}\" -a \"$1\" != \"auto\" ]; then\n  # loads project config and sets THREAD_CONTROL\n  . config/options \"\"\nelse\n  BUILD_PREFIX=$(. config/options \"\" && echo ${BUILD_ROOT}/${BUILD_BASE})\nfi\n\n_find_latest_tcdir() {\n  local IFS=$'\\n'\n\n  if [ -n \"${THREAD_CONTROL}\" ]; then\n    echo \"${THREAD_CONTROL}\"\n  else\n    for dir in $(ls -1td ${BUILD_PREFIX}.*/.threads 2>/dev/null); do\n      [ -f \"${dir}/parallel.pid\" ] && echo \"${dir}\" && break\n    done\n  fi\n  return 0\n}\n\nwhile [ : ]; do\n  echo \"Waiting for build to start...\"\n\n  while [ : ]; do\n    tcdir=\"$(_find_latest_tcdir)\"\n\n    if [ -n \"${tcdir}\" ]; then\n      pid=\"$(cat \"${tcdir}/parallel.pid\" 2>/dev/null || true)\"\n      [ -n \"${pid}\" ] && ps -p ${pid} &>/dev/null && break\n    fi\n\n    sleep 1.0\n  done\n\n  if [ \"${THREADCOUNT}\" = \"0\" ]; then\n    tail -Fn+0 --pid=${pid} \"${tcdir}/status\" 2>/dev/null | grep -vE \"STALLED|IDLE\"\n  else\n    tail -Fn+0 --pid=${pid} \"${tcdir}/status\" 2>/dev/null\n  fi\n\n  echo\ndone\n"
  },
  {
    "path": "tools/distro-tool",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nset -e\n\nexport NOONEXIT=yes\n\n[ -z \"${DEBUG_LOG}\" ] && DEBUG_LOG=/tmp/distro-tool.log\n\nLIBREELEC_DIR=$HOME/LibreELEC.tv\nTARGET_DIR=$HOME/sources\nDOWNLOAD_DIR=$HOME/download\nREVISION=\nPACKAGE=\nDRY_RUN=no\nIGNORE_ERRORS=no\nDOGIT=no\nCHECK_NEWER=yes\nCHECK_FILTER_TYPE=All\nCHECK_FILTER_CLASS=All\nPROGRESS=yes\nIS_MIRROR=yes\nVERBOSE=0\nPATH_FILTER=\nVERIFY_CHECKSUM=no\nWORKER_THREADS=16\n\nLOCKFILE=/tmp/distro_tool.lock\nWORKFILES_I=/tmp/distro_tool.in\nWORKFILES_O=/tmp/distro_tool.out\nWORKER_MAX=${WORKER_MAX:-$(grep \"^processor[[:space:]]*:\" /proc/cpuinfo | wc -l)}\n\n# Source in GIT_USERNAME and GIT_PASSWORD to avoid API limitations\n[ -f ~/.git.conf ] && source ~/.git.conf\n\nPYTHON_PROG='\nfrom __future__ import print_function\nimport sys, os, json, codecs, re, threading, subprocess, glob, datetime, shutil, hashlib\n\nif sys.version_info >= (3, 0):\n  import queue as Queue\n  basestring = (str, bytes)\nelse:\n  import Queue\n\nclass MyUtility(object):\n  isPython3 = (sys.version_info >= (3, 0))\n\n  if sys.version_info >= (3, 1):\n    sys.stdout = codecs.getwriter(\"utf-8\")(sys.stdout.detach())\n    sys.stderr = codecs.getwriter(\"utf-8\")(sys.stderr.detach())\n  else:\n    sys.stdout = codecs.getwriter(\"utf-8\")(sys.stdout)\n    sys.stderr = codecs.getwriter(\"utf-8\")(sys.stderr)\n\n  search_major_minor_patch  = re.compile(\"[0-9]+\\.[0-9]+\\.[0-9]+\")\n  extract_major_minor_patch = re.compile(\".*([0-9]+\\.[0-9]+\\.[0-9]+).*\")\n\n  search_major_minor        = re.compile(\"[0-9]+\\.[0-9]+\")\n  extract_major_minor       = re.compile(\".*([0-9]+\\.[0-9]+).*\")\n\n  leading_zeros             = re.compile(\"^0[0-9]\")\n\n  search_HTTP_OK            = re.compile(\"HTTP\\/[1-9]\\.[0-9] 200 OK\", flags=re.IGNORECASE)\n  search_HTTP_NOT_FOUND     = re.compile(\"404 not found\", flags=re.IGNORECASE)\n  search_HTTP_NOT_ALLOWED   = re.compile(\"405 method not allowed\", flags=re.IGNORECASE)\n  search_HTTP_CODE          = re.compile(\"__HTTP_CODE__@([0-9]*)@\")\n  search_CONTENT_TYPE       = re.compile(\"__CONTENT_TYPE__@(.*)@\")\n\n  colours = {}\n  colours[\"red\"]    = \"\\x1b[31m\"\n  colours[\"green\"]  = \"\\x1b[32m\"\n  colours[\"yellow\"] = \"\\x1b[33m\"\n  colours[\"blue\"]   = \"\\x1b[34m\"\n  colours[\"magenta\"]= \"\\x1b[35m\"\n  colours[\"cyan\"]   = \"\\x1b[36m\"\n  colours[\"reset\"]  = \"\\x1b(B\\x1b[m\"\n\n  @staticmethod\n  def colour(colour, text):\n    return \"%s%s%s\" % (MyUtility.colours[colour], text, MyUtility.colours[\"reset\"])\n\n  @staticmethod\n  def logmsg(msgs, level, text):\n    msgs.append({\"level\": level, \"text\": text})\n\n  @staticmethod\n  def show(msgs, level, colour, prefix, text):\n    if colour:\n      tc = MyUtility.colours[colour]\n      tr = MyUtility.colours[\"reset\"]\n    else:\n      tc = tr = \"\"\n    MyUtility.logmsg(msgs, level, \"%s%-21s%s: %s\" % (tc, prefix, tr, text))\n\n  @staticmethod\n  def runcommand(msgs, command, logfile=None, redacted=None):\n    MyUtility.logmsg(msgs, 3, \"Running command: [%s]\" % (redacted if redacted else command))\n    _logfile = open(logfile, \"w\") if logfile else subprocess.STDOUT\n    try:\n      if MyUtility.isPython3:\n        return (0, subprocess.check_output(command.split(\" \"), stderr=_logfile).decode(\"utf-8\"))\n      else:\n        return (0, subprocess.check_output(command.split(\" \"), stderr=_logfile))\n    except  subprocess.CalledProcessError as cpe:\n      if MyUtility.isPython3:\n        # Clean up undecodable garbage in response (eg. libftdi1 error page)\n        output = bytearray()\n        for c in cpe.output:\n          if c <= 127:\n            output.append(c)\n\n        return (cpe.returncode, output.decode(\"utf-8\"))\n      else:\n        return (cpe.returncode, cpe.output)\n    finally:\n      if logfile and _logfile:\n        _logfile.close()\n\n  @staticmethod\n  def readfile(filename):\n    inputfile = codecs.open(filename, \"rb\", encoding=\"utf-8\")\n    data = inputfile.read()\n    inputfile.close()\n    return data\n\n  @staticmethod\n  def get_alternate_versions(package_version):\n    if not package_version:\n      return\n\n    if MyUtility.search_major_minor_patch.search(package_version):\n      mmp = True\n      ver = MyUtility.extract_major_minor_patch.search(package_version).group(1)\n    elif MyUtility.search_major_minor.search(package_version):\n      mmp = False\n      ver = MyUtility.extract_major_minor.search(package_version).group(1)\n    else:\n      return\n\n    # Split parts\n    parts_p0 = ver.split(\".\")\n    parts_p0_lz = [\"\", \"\", \"\"]\n    parts_p1 = [0, 0, 0]\n    parts_p1_lz = [\"\", \"\", \"\"]\n    c = 0\n    for p in parts_p0:\n      if c > 2: break\n      parts_p1[c] = int(p) + 1\n      # Add leading zeros if originally present\n      if MyUtility.leading_zeros.search(parts_p0[c]):\n        parts_p0_lz[c] = \"0\"\n      if parts_p0_lz[c] == \"0\" and parts_p1[c] < 10:\n        parts_p1_lz[c] = \"0\"\n      c += 1\n\n    if mmp:\n      tmp1 = \"%s%d.%s%d.%s%d\" % (parts_p1_lz[0], parts_p1[0], parts_p0_lz[1], 0, parts_p0_lz[2], 0)\n      yield package_version.replace(ver, tmp1)\n\n    # If minor or patch >= 10, then we are not sure if leading zeros are\n    # required, so try them anyway\n      if int(parts_p0[1]) >= 10 or int(parts_p0[2]) >= 10:\n        tmp2 = \"%s%d.00.00\" % (parts_p1_lz[0], parts_p1[0])\n        if tmp1 != tmp2:\n          yield package_version.replace(ver, tmp2)\n\n      tmp1 = \"%s.%s%d.%s%d\" % (parts_p0[0], parts_p1_lz[1], parts_p1[1], parts_p0_lz[2], 0)\n      yield package_version.replace(ver, tmp1)\n\n      if int(parts_p0[2]) >= 10:\n        tmp2 = \"%s.%s%d.00\" % (parts_p0[0], parts_p1_lz[1], parts_p1[1])\n        if tmp1 != tmp2:\n          yield package_version.replace(ver, tmp2)\n\n      tmp1 = \"%s.%s.%s%d\" % (parts_p0[0], parts_p0[1], parts_p1_lz[2], parts_p1[2])\n      yield package_version.replace(ver, tmp1)\n    else:\n      tmp1 = \"%s%d.%s%d\" % (parts_p1_lz[0], parts_p1[0], parts_p0_lz[1], 0)\n      yield package_version.replace(ver, tmp1)\n\n    # If minor or patch >= 10, then we are not sure if leading zeros are\n    # required, so try them anyway\n      if int(parts_p0[1]) >= 10:\n        tmp2 = \"%s%d.00\" % (parts_p1_lz[0], parts_p1[0])\n        if tmp1 != tmp2:\n          yield package_version.replace(ver, tmp2)\n\n      tmp1 = \"%s.%s%d\" % (parts_p0[0], parts_p1_lz[1], parts_p1[1])\n      yield package_version.replace(ver, tmp1)\n\n  @staticmethod\n  def get_latest_commit(msgs, package_url):\n    urlfields = package_url.split(\"/\")\n    urlapi = \"https://api.github.com/repos/%s/%s/commits\" % (urlfields[3], urlfields[4])\n    tmpfile_data = \"%s/%s\" % (SCRATCH_DIR, threading.current_thread().name)\n    curl_args = \"curl --verbose --silent --fail --location --connect-timeout 15 --max-time 60 --retry 3 --write-out __HTTP_CODE__@%{http_code}@\\\\n__CONTENT_TYPE__@%{content_type}@\"\n\n    if GIT_USERNAME and GIT_PASSWORD:\n      curl_args += \" -u %s:%s\" % (GIT_USERNAME, GIT_PASSWORD)\n\n    if os.path.exists(tmpfile_data):\n      os.remove(tmpfile_data)\n\n    (result, headers) = MyUtility.runcommand(msgs, \"%s --output %s --url %s\" % (curl_args, tmpfile_data, urlapi), redacted=curl_args)\n\n    search_obj = MyUtility.search_HTTP_CODE.search(headers)\n    http_code = search_obj.group(1) if search_obj else \"\"\n    search_obj = MyUtility.search_CONTENT_TYPE.search(headers)\n    content_type = search_obj.group(1) if search_obj else \"\"\n\n    MyUtility.logmsg(msgs, 3, \"CURL exit code: %d, http_code: %s, content type: [%s]\" % (result, http_code, content_type))\n    MyUtility.logmsg(msgs, 3, \"[\\n%s]\" % headers)\n\n    if os.path.exists(tmpfile_data):\n      data = MyUtility.readfile(tmpfile_data)\n      os.remove(tmpfile_data)\n      MyUtility.logmsg(msgs, 3, \"GITHUB RESPONSE (first 1024 bytes): [\\n%s\\n]\" % data[0:1024])\n      if http_code == \"200\" and data and content_type.startswith(\"application/json\"):\n        jdata = json.loads(data)\n        if \"message\" not in jdata:\n          return jdata[0][\"sha\"]\n\n    return \"\"\n\n  @staticmethod\n  def have_package(package_name, package_source):\n    if IS_MIRROR:\n      return os.path.exists(\"%s/%s/%s\" % (TARGET_DIR, package_name, package_source)) or \\\n             os.path.exists(\"%s/%s/%s\" % (DOWNLOAD_DIR, package_name, package_source))\n    else:\n      return os.path.exists(\"%s/%s\" % (TARGET_DIR, package_source)) or \\\n             os.path.exists(\"%s/%s\" % (DOWNLOAD_DIR, package_source))\n\n    return False\n\n  @staticmethod\n  def remote_file_exists(msgs, url):\n    retry = 5\n    maxattempts = retry * 3\n    headers = \"\"\n    result = 0\n    HEAD_supported = True\n    ts = datetime.datetime.now()\n    curl_args = \"curl --verbose --silent --fail --location --connect-timeout 15 --max-time 60 --retry 0 --write-out __HTTP_CODE__@%{http_code}@\\\\n__CONTENT_TYPE__@%{content_type}@\"\n    http_code = \"\"\n    content_type = \"\"\n\n    MyUtility.logmsg(msgs, 3, \"Remote headers for %s...\" % url)\n\n    # Retry up to $retry times in case of transient errors. Do not count\n    # 35/56 as retries, could have several of these before a successful\n    # request - limit total number of retries as ${retry} * 3.\n    while retry > 0 and maxattempts > 0:\n      maxattempts -= 1\n      if stopped.is_set(): break\n      ts_cmd = datetime.datetime.now()\n      if HEAD_supported:\n        MyUtility.logmsg(msgs, 3, \"%s --head --output - --url %s\" % (curl_args, url))\n        (result, headers) = MyUtility.runcommand(msgs, \"%s --head --output - --url %s\" % (curl_args, url))\n      else:\n        MyUtility.logmsg(msgs, 3, \"%s --range 0-1024 --output /dev/null --url %s\" % (curl_args, url))\n        (result, headers) = MyUtility.runcommand(msgs, \"%s --range 0-1024 --output /dev/null --url %s\" % (curl_args, url))\n\n      search_obj = MyUtility.search_HTTP_CODE.search(headers)\n      http_code = search_obj.group(1) if search_obj else \"\"\n      search_obj = MyUtility.search_CONTENT_TYPE.search(headers)\n      content_type = search_obj.group(1) if search_obj else \"\"\n\n      tDelta = (datetime.datetime.now() - ts_cmd)\n      MyUtility.logmsg(msgs, 3, \\\n        \"CURL exit code: %d, http_code: %s, content type: [%s], remaining retries %d, time taken %f seconds\" % \\\n        (result, http_code, content_type, retry, tDelta.total_seconds()))\n\n      if result == 22:\n        # 404 Not Found\n        if http_code == \"404\" or MyUtility.search_HTTP_NOT_FOUND.search(headers):\n          break\n        # 403/405 Server does not support HEAD\n        elif HEAD_supported and (http_code in [\"403\", \"405\"] or MyUtility.search_HTTP_NOT_ALLOWED.search(headers)):\n          MyUtility.logmsg(msgs, 3, \"HEAD not supported - retrying with range-limited GET\")\n          HEAD_supported = False\n          continue\n\n      # Success or fatal error - no point continuing\n      #  0: CURLE_OK\n      #  6: CURLE_COULDNT_RESOLVE_HOST\n      #  7: CURLE_COULDNT_CONNECT\n      #  9: CURLE_REMOTE_ACCESS_DENIED\n      # 10: CURLE_FTP_ACCEPT_FAILED\n      # 19: CURLE_FTP_COULDNT_RETR_FILE\n      # 28: CURLE_OPERATION_TIMEDOUT\n      if result in [0, 6, 7, 9, 10, 19, 28]:\n        break\n\n      # Keep retrying following errors until success or failure.\n      # 35: CURLE_SSL_CONNECT_ERROR\n      # 56: CURLE_RECV_ERROR\n      if result not in [35, 56]:\n        retry -= 1\n\n    MyUtility.logmsg(msgs, 3, \"[\\n%s]\" % headers)\n\n    # Success if HTTP 200 or 206 (partial content when using ranged request)\n    # A content_type of \"text/html\" indicates we were served an error page of\n    # some kind (eg. iperf) and not the requested file, which would be \"application/<something>\".\n    # \"text/plain\" indicates a misconfigured server (eg. libgcrypt, libgpg-error) so accept this.\n    # Some servers (eg. files.pythonhosted.org) will respond with \"binary/octet-stream\".\n    if http_code in [\"200\", \"206\"] or MyUtility.search_HTTP_OK.search(headers):\n      result = True if (content_type.startswith(\"application/\") or \\\n                        content_type.startswith(\"text/plain\") or \\\n                        content_type.startswith(\"binary/octet-stream\")) else False\n    elif http_code == \"350\" and url.startswith(\"ftp:\"):\n      result = True\n    else:\n      result = False\n\n    tDelta = (datetime.datetime.now() - ts)\n\n    MyUtility.show(msgs, 2 if VERBOSE == 2 else 3, None, \"Remote File Exists\", \"%s (%s) %f seconds\" % (result, url, tDelta.total_seconds()))\n\n    return result\n\n  # Calculate hash for chunked data\n  @staticmethod\n  def hash_bytestr_iter(bytesiter, hasher, ashexstr=True):\n    for block in bytesiter:\n      hasher.update(block)\n    return (hasher.hexdigest() if ashexstr else hasher.digest())\n\n  # Read file in blocks/chunks to be memory efficient\n  @staticmethod\n  def file_as_blockiter(afile, blocksize=65536):\n    with afile:\n      block = afile.read(blocksize)\n      while len(block) > 0:\n        yield block\n        block = afile.read(blocksize)\n\n  # Calculate sha256 hash for a file\n  @staticmethod\n  def calculate_sha256(fname):\n    try:\n      return MyUtility.hash_bytestr_iter(MyUtility.file_as_blockiter(open(fname, \"rb\")), hashlib.sha256())\n    except:\n      raise\n      return \"\"\n\n  # Use wget with same parameters as scripts/get is using\n  @staticmethod\n  def download_file(msgs, filename_data, filename_log, url):\n    retries=10\n    attempts=0\n\n    while attempts < retries:\n      if stopped.is_set(): break\n      attempts += 1\n      (result, output) = MyUtility.runcommand(msgs, \"wget --output-file=- --timeout=30 --tries=3 --passive-ftp --no-check-certificate -O %s %s\" % (filename_data, url), logfile=filename_log)\n      if result == 0:\n        return True\n\n    return False\n\n  @staticmethod\n  def get_package(msgs, package_name, package_source, package_url, package_sha):\n\n    onsource = MyUtility.remote_file_exists(msgs, package_url)\n    onmirror = MyUtility.remote_file_exists(msgs, \"%s/%s/%s\" % (DISTRO_MIRROR, package_name, package_source))\n\n    # If the only PKG_URL source is the DISTRO_SRC server...\n    if package_url.startswith(DISTRO_SOURCE):\n      # Warn the user if package is not found on either source or mirror\n      if not onsource and not onmirror:\n        MyUtility.show(msgs, 0, \"magenta\", \"MKPKG REQUIRED?\", \"%s (%s) unable to download from DISTRO_SRC %s - we have no source!\" % \\\n          (package_name, package_url, MyUtility.colour(\"red\", \"and not on mirror\")))\n        return False\n\n    if DRY_RUN:\n      text = \"Package status: %s (%s)\" % (package_name, package_source)\n      if not onsource and onmirror:\n        text = \"%s %s\" % (text, MyUtility.colour(\"yellow\", \"(found on mirror)\"))\n      if onsource or onmirror:\n        MyUtility.show(msgs, 0, \"green\", \"PACKAGE AVAILABLE\", text)\n        return True\n      else:\n        MyUtility.show(msgs, 0, \"red\", \"PACKAGE NOT AVAILABLE\", text)\n        return False\n\n    tmpfile_data = \"%s/%s\" % (SCRATCH_DIR, threading.current_thread().name)\n    tmpfile_log  = \"%s.log\" % tmpfile_data\n\n    if os.path.exists(tmpfile_data):\n      os.remove(tmpfile_data)\n    if os.path.exists(tmpfile_log):\n      os.remove(tmpfile_log)\n\n    if VERIFY_CHECKSUM == True and package_sha and onmirror:\n      result = MyUtility.download_file(msgs, tmpfile_data, tmpfile_log, \"%s/%s/%s\" % (DISTRO_MIRROR, package_name, package_source))\n      calc_sha = MyUtility.calculate_sha256(tmpfile_data)\n\n      if os.path.exists(tmpfile_data):\n        os.remove(tmpfile_data)\n      if os.path.exists(tmpfile_log):\n        os.remove(tmpfile_log)\n\n      if calc_sha != package_sha:\n        MyUtility.show(msgs, 0, \"yellow\", \"CHECKSUM MISMATCH FROM MIRROR - REFRESHING FROM SOURCE\", \"%s (%s)\" % (package_name, package_url))\n        MyUtility.logmsg(msgs, 0, \"Checksum mismatch - got [%s], expected [%s]\" % (calc_sha, package_sha))\n        onmirror = False\n      else:\n        MyUtility.show(msgs, 1, \"green\", \"Mirror checksum valid\", \"%s (%s)\" % (package_name, package_source))\n        return True\n\n    if onsource:\n      result = MyUtility.download_file(msgs, tmpfile_data, tmpfile_log, package_url)\n    elif onmirror:\n      result = MyUtility.download_file(msgs, tmpfile_data, tmpfile_log, \"%s/%s/%s\" % (DISTRO_MIRROR, package_name, package_source))\n    else:\n      result = False\n\n    if result == False or not os.path.exists(tmpfile_data):\n      result = False\n      MyUtility.show(msgs, 0, \"red\", \"DOWNLOAD FAILED!!\", \"%s (%s)\" % (package_name, package_url))\n      if os.path.exists(tmpfile_log):\n        MyUtility.logmsg(msgs, 0, MyUtility.readfile(tmpfile_log))\n    else:\n      if package_sha:\n        calc_sha = MyUtility.calculate_sha256(tmpfile_data)\n        if calc_sha != package_sha:\n          result = False\n          MyUtility.show(msgs, 0, \"red\", \"DOWNLOAD FAILED!!\", \"%s (%s)\" % (package_name, package_url))\n          MyUtility.logmsg(msgs, 0, \"Checksum mismatch - got [%s], wanted [%s]\" % (calc_sha, package_sha))\n\n    if result == True:\n      MyUtility.show(msgs, 0, \"green\", \"Successful Download\", \"%s (%s)\" % (package_name, package_source))\n      if IS_MIRROR:\n        if not os.path.exists(\"%s/%s\" % (DOWNLOAD_DIR, package_name)):\n          os.makedirs(\"%s/%s\" % (DOWNLOAD_DIR, package_name))\n        shutil.move(tmpfile_data, \"%s/%s/%s\" % (DOWNLOAD_DIR, package_name, package_source))\n      else:\n        shutil.move(tmpfile_data, \"%s/%s\" % (DOWNLOAD_DIR, package_source))\n\n    if os.path.exists(tmpfile_data):\n      os.remove(tmpfile_data)\n    if os.path.exists(tmpfile_log):\n      os.remove(tmpfile_log)\n\n    return result\n\n  # Check for newer versions: \"X+1.[0]0[.[0]0]\" \"X.[0]Y+1[.[0]0]\" \"X.[0]Y.[0]Z+1\"\n  @staticmethod\n  def check_newer(msgs, package_name, package_url, package_ver):\n    alt_versions = []\n    is_git_rev = False\n\n    for v in MyUtility.get_alternate_versions(package_ver):\n      if v: alt_versions.append(v)\n\n    if alt_versions == []:\n      if not package_url.startswith(\"https://github.com/\"):\n        return\n\n      if CHECK_FILTER_TYPE == \"Ver\":\n        return\n\n      is_git_rev = True\n\n      latestrev = MyUtility.get_latest_commit(msgs, package_url)\n\n      MyUtility.logmsg(msgs, 3, \"Github latest commit [%s]\" % latestrev)\n\n      if latestrev == \"\" or latestrev.startswith(package_ver):\n        return\n\n      alt_versions.append(latestrev[0:len(package_ver)])\n    elif CHECK_FILTER_TYPE == \"Rev\":\n      return\n\n    MyUtility.show(msgs, 2 if VERBOSE == 2 else 3, None, \"Checking for newer\", \"%s, current version %s - checking %s\" % (package_name, package_ver, \", \".join(alt_versions)))\n\n    newurl = package_url.replace(package_ver, \"@@VER@@\")\n\n    for newver in alt_versions:\n      url = newurl.replace(\"@@VER@@\", newver)\n      if MyUtility.remote_file_exists(msgs, url):\n        if is_git_rev:\n          MyUtility.show(msgs, 0, \"yellow\", \"New Rev Pkg available\", \"%s (%s => %s) %s\" % (package_name, package_ver, newver, url))\n        else:\n          MyUtility.show(msgs, 0, \"magenta\",\"New Ver Pkg available\", \"%s (%s => %s) %s\" % (package_name, package_ver, newver, url))\n        break\n\n  @staticmethod\n  def toUnicode(data):\n    if MyUtility.isPython3: return data\n\n    if isinstance(data, basestring):\n      if not isinstance(data, unicode):\n        try:\n          data = unicode(data, encoding=\"utf-8\", errors=\"ignore\")\n        except UnicodeDecodeError:\n          pass\n\n    return data\n\n  @staticmethod\n  def printout(data, end=\"\\n\"):\n    sys.stdout.write(\"%s%s\" % (MyUtility.toUnicode(data), end))\n    sys.stdout.flush()\n\n  @staticmethod\n  def printerr(data, end=\"\\n\"):\n    sys.stderr.write(\"%s%s\" % (MyUtility.toUnicode(data), end))\n    sys.stderr.flush()\n\n#\n# Thread\n#\nclass MyThread(threading.Thread):\n  def __init__(self, input_queue, output_queue):\n    threading.Thread.__init__(self)\n    self.input_queue = input_queue\n    self.output_queue = output_queue\n\n  def run(self):\n    while not stopped.is_set():\n      try:\n        qItem = self.input_queue.get(block=False)\n        self.input_queue.task_done()\n\n        pkg_is_addon = (qItem[\"PKG_IS_ADDON\"] == \"Yes\")\n        pkg_name = qItem[\"PKG_NAME\"]\n        pkg_version = qItem[\"PKG_VERSION\"]\n        pkg_url = qItem[\"PKG_URL\"]\n        pkg_sha = qItem[\"PKG_SHA256\"]\n        pkg_section = qItem[\"PKG_SECTION\"]\n        pkg_source_name = qItem[\"PKG_SOURCE_NAME\"]\n\n        msgs = []\n\n        if pkg_version == \"\" or pkg_version == \"0.0invalid\" or pkg_url == \"\":\n          if pkg_section != \"virtual\" and CHECK_FILTER_CLASS == \"All\" and CHECK_FILTER_TYPE == \"All\":\n            MyUtility.show(msgs, 0, \"cyan\", \"UNKNOWN VER OR URL\", \"%s (ver [%s], url [%s])\" % (pkg_name, pkg_version, pkg_url))\n            self.output_queue.put(msgs)\n          continue\n\n        tDelta_get_package = datetime.timedelta(0)\n        tDelta_check_newer = datetime.timedelta(0)\n\n        self.output_queue.put([{\"start\": True, \"name\": threading.current_thread().name, \"data\": {\"url\": pkg_url, \"tstamp\": datetime.datetime.now()}}])\n\n        MyUtility.logmsg(msgs, 3, \">>>>>>>>>>>>>>>>> %s, %s, %s, wanted sha256 %s\" % (pkg_name, pkg_version, pkg_url, pkg_sha))\n\n        if not MyUtility.have_package(pkg_name, pkg_source_name) or (VERIFY_CHECKSUM and pkg_sha):\n          tStart = datetime.datetime.now()\n          if not stopped.is_set() and \\\n             not MyUtility.get_package(msgs, pkg_name, pkg_source_name, pkg_url, pkg_sha):\n             if not IGNORE_ERRORS:\n               stopped.set()\n          tDelta_get_package = datetime.datetime.now() - tStart\n        else:\n          MyUtility.show(msgs, 1, \"green\", \"Already downloaded\", \"%s (%s)\" % (pkg_name, pkg_source_name))\n\n        if CHECK_NEWER and not stopped.is_set():\n          if (CHECK_FILTER_CLASS == \"All\") or \\\n             (CHECK_FILTER_CLASS == \"Main\" and pkg_is_addon == False) or \\\n             (CHECK_FILTER_CLASS == \"Addons\" and pkg_is_addon == True):\n            tStart = datetime.datetime.now()\n            MyUtility.check_newer(msgs, pkg_name, pkg_url, pkg_version)\n            tDelta_check_newer = datetime.datetime.now() - tStart\n\n        self.output_queue.put([{\"stop\": True, \"name\": threading.current_thread().name, \"url\": pkg_url}])\n\n        MyUtility.logmsg(msgs, 3, \"<<<<<<<<<<<<<<<<< %s %s %s get_package %f check_newer %f\" % \\\n          (pkg_name, pkg_version, pkg_url, tDelta_get_package.total_seconds(), tDelta_check_newer.total_seconds()))\n\n        self.output_queue.put(msgs)\n\n      except Queue.Empty:\n        break\n\n    # This thread is going down...\n    self.output_queue.put(None)\n\ndef main():\n  if not os.path.exists(SCRATCH_DIR):\n    os.makedirs(SCRATCH_DIR)\n  else:\n    for file in glob.glob(\"%s/*\" % SCRATCH_DIR):\n      os.remove(file)\n\n  data = []\n  for line in sys.stdin: data.append(line)\n  if data == []:\n    sys.exit(1)\n\n  input_queue = Queue.Queue()\n  output_queue = Queue.Queue()\n\n  for item in sorted(json.loads(\"\".join(data)), key=lambda k: k[\"PKG_NAME\"]):\n    input_queue.put(item)\n\n  pcount = 0\n  pmax = input_queue.qsize()\n\n  # Create threads to process input queue\n  threadcount = input_queue.qsize() if input_queue.qsize() <= WORKER_THREADS else WORKER_THREADS\n  threads = []\n  for i in range(threadcount):\n    t = MyThread(input_queue, output_queue)\n    threads.append(t)\n    t.setDaemon(False)\n\n  # Start the threads...\n  for t in threads: t.start()\n\n  qtimeout = 10\n  running = {}\n  stopping = False\n\n  while threadcount > 0:\n    try:\n      qItem = output_queue.get(block=True, timeout=qtimeout)\n      output_queue.task_done()\n\n      if qItem is None:\n        threadcount -= 1\n        continue\n\n      finished = False\n\n      for msg in qItem:\n        if msg.get(\"start\", False):\n          running[msg[\"name\"]] = msg[\"data\"]\n        elif msg.get(\"stop\", False):\n          del running[msg[\"name\"]]\n        elif \"level\" in msg:\n          finished = True\n          if VERBOSE >= msg[\"level\"]:\n            if msg[\"level\"] <= 2:\n              MyUtility.printout(msg[\"text\"])\n            else:\n              MyUtility.printerr(msg[\"text\"])\n\n      if not stopping and stopped.is_set():\n        stopping = True\n        MyUtility.printout(MyUtility.colour(\"red\", \"** STOPPING DUE TO FAILURE - WAITING FOR %d THREADS TO FINISH **\" % threadcount))\n\n      # Do not enable progress when detailed debug logging is enabled as\n      # this will most likely be redirected to a file\n      if finished and PROGRESS and VERBOSE <= 2:\n        pcount += 1\n        MyUtility.printerr(\"Processing... %3d%% (%d threads active)\\x1b[K\\r\" % ((pcount * 100 / pmax), threadcount), end=\"\")\n\n    except Queue.Empty:\n      if VERBOSE >= 3 and len(running) != 0:\n        MyUtility.printerr(\"============ WAITING ON FOLLOWING %d THREADS ============\" % len(running))\n        for t in running:\n          data = running[t]\n          MyUtility.printerr(\"SLOW RUNNING THREAD %s for %f secs: %s\" % (t, (datetime.datetime.now() - data[\"tstamp\"]).total_seconds(), data[\"url\"]))\n\n  if PROGRESS and VERBOSE <= 2:\n    MyUtility.printerr(\"\\r\\x1b[K\", end=\"\")\n\n  sys.exit(1 if stopped.is_set() else 0)\n\nif __name__ == \"__main__\":\n  try:\n    args = sys.argv[1:]\n    DOWNLOAD_DIR = args[0]\n    TARGET_DIR = args[1]\n    DISTRO_SOURCE = args[2]\n    DISTRO_MIRROR = args[3]\n    IS_MIRROR = True if args[4] == \"yes\" else False\n    IGNORE_ERRORS = True if args[5] == \"yes\" else False\n    DRY_RUN = True if args[6] == \"yes\" else False\n    CHECK_NEWER = True if args[7] == \"yes\" else False\n    PROGRESS=True if args[8] == \"yes\" else False\n    WORKER_THREADS=int(args[9])\n    GIT_USERNAME = args[10]\n    GIT_PASSWORD = args[11]\n    CHECK_FILTER_CLASS = args[12]\n    CHECK_FILTER_TYPE = args[13]\n    VERIFY_CHECKSUM = True if args[14] == \"yes\" else False\n    VERBOSE = int(args[15])\n    SCRATCH_DIR=\"%s/.tmp\" % DOWNLOAD_DIR\n\n    stopped = threading.Event()\n\n    main()\n  except (KeyboardInterrupt, SystemExit) as e:\n    if type(e) == SystemExit: sys.exit(int(str(e)))\n  except Exception:\n    raise\n'\n\n[ -z \"${PROJECT}\" ] && PROJECT=Generic\n[ -z \"${ARCH}\" ]    && ARCH=x86_64\n\nhelp() {\n  [ -n \"$1\" ] && echo -e \"ERROR: Unknown argument [$1]\\n\"\n  cat <<EOF\nUsage: $(basename $0) -d|--download <path> [-t|--target <path>] [-l|--libreelec <path>]\n           [-m|--mirror] [-s|--source] [-a|-all] [-p|--package <package_name> [-r|--revision <revision>]]\n           [--git] [-n|--notnewer] [--check-main | --check-addons] [--check-ver | --check-rev] \n           [--no-progress] [-T #|--threads #] [-U|--gituser] [-P|--gitpass] [--dry-run]\n           [--path-filter path] [--verify-checksum] [-v|--verbose] [-h|--help]\n\nOptions:\n  -d, --download:        Directory path into which new package files will be downloaded - default is $HOME/download[1]\n  -t, --target:          Directory path for existing packages that are to be refreshed, default is $HOME/sources[2]\n  -l, --libreelec:       LibreELEC.tv repo, default is ${HOME}/LibreELEC.tv\n  -m, --mirror:          Target is mirror not source - mirror uses a hierarchical per-package folder structure\n  -s, --source:          Target is source not mirror - source uses a flattened file structure. Default is mirror\n  -a, --all:             Ignore download failures, continue processing all packages\n  -p, --package:         Package to process, otherwise process all packages\n  -r, --revision:        Version to use in place of PKG_VERSION, only applicable in conjunction with -p\n      --git:             Clone (if not available) or pull the LibreELEC.tv repository\n  -n, --notnewer:        Don't check for newer packages ('X.Y.Z+1' 'X.Y+1.0' 'X+1.0.0')\n      --check-main:      Check newer for main packages, ignore add-on packages\n      --check-addons:    Check newer for add-on packages, ignore main packages\n      --check-ver:       Check newer for version-based packages, ignore rev-based/github packages\n      --check-rev:       Check newer for rev-based/github packages, ignore version-based packages\n      --no-progress:     Do not show progress indicator\n  -T, --threads:         Number of download worker threads, default is 16\n  -U, --gituser:         Git username (or source from ~/.git.conf) - avoids API limits\n  -P, --gitpass:         Git password (or source from ~/.git.conf) - avoids API limits\n      --dry-run:         Don't actually download anything (will still git clone/pull if configured)\n      --path-filter      Restrict workload to specified path, eg. packages/x11 (recursive)\n      --verify-checksum: If checksum on mirror is no longer valid, attempt re-download of package from source\n  -v, --verbose:         Output more verbose sync information. Repeat for more detail\n  -h, --help:            This message\n\n  Note#1. The download directory will have the LibreELEC version appended (eg. /devel) unless it is a mirror, in which case \"/mirror\" will be appended.\n  Note#2. The target directory will have the LibreELEC version appended (eg. /devel) unless it is a mirror, in which case \"/mirror\" will be appended.\nEOF\n}\n\nget_libreelec_branch() {\n  cd $LIBREELEC_DIR\n  git rev-parse --abbrev-ref HEAD\n}\n\n# 1: LibreELEC variable, eg. LIBREELEC_VERSION\nget_libreelec_option() {\n  local variable=\"$1\"\n  cd $LIBREELEC_DIR\n  source config/options \"\"\n  echo \"${!variable}\"\n}\n\ngenerate_work() {\n  local package_name=\"$1\" revision=\"$2\" path_filter=\"$3\"\n  local packages pcount\n  local workfile_o\n  local tcount=0\n\n  [ ${PROGRESS} = yes ] && echo -en \"Acquiring packages...\\r\" >&2\n\n  packages=\"$(get_packages \"${package_name}\" \"${path_filter}\")\"\n  pcount=\"$(echo \"${packages}\" | wc -l)\"\n\n  if [ -n \"${package_name}\" -a -z \"${packages}\" ]; then\n    if [ -n \"${path_filter}\" ]; then\n      echo \"ERROR: ${package_name} is not a valid package when using filter ${path_filter} - package.mk does not exist\" >&2\n    else\n      echo \"ERROR: ${package_name} is not a valid package - package.mk does not exist\" >&2\n    fi\n    exit 1\n  fi\n\n  rm -f ${WORKFILES_I}.* ${WORKFILES_O}.*\n\n  # Distribute packages across workers\n  tcount=0\n  for package_name in ${packages}; do\n    tcount=$((tcount + 1))\n    [ ${tcount} -gt ${WORKER_MAX} ] && tcount=1\n    echo \"$package_name\" >>$(printf \"%s.%02d\" \"${WORKFILES_I}\" ${tcount})\n  done\n\n  # Generate workload using multiple \"threads\" (cores, hopefully...)\n  init_progress\n\n  tcount=0\n\n  while [ : ]; do\n    tcount=$((tcount + 1))\n    [ ${tcount} -gt ${WORKER_MAX} ] && break\n    generate_work_worker ${pcount} ${tcount} ${revision} &\n  done\n  wait\n\n  end_progress\n\n  # Combine workloads\n  echo \"[\"\n  tcount=0\n  while [ : ]; do\n    tcount=$((tcount + 1))\n    [ ${tcount} -gt ${WORKER_MAX} ] && break\n    workfile_o=$(printf \"%s.%02d\" \"${WORKFILES_O}\" ${tcount})\n    if [ -s ${workfile_o} ]; then\n      [ ${tcount} -ne 1 ] && echo \",\"\n      # Strip comma from line of file - not valid if this is the last file\n      sed '$ s/  },/  }/' ${workfile_o}\n    fi\n  done\n  echo \"]\"\n\n  # Clean up\n  rm -f ${WORKFILES_I}.* ${WORKFILES_O}.*\n}\n\ngenerate_work_worker() {\n  local pcount=$1 worker=\"$2\" revision=\"$3\"\n  local workfile_i=\"$(printf \"%s.%02d\" \"${WORKFILES_I}\" ${worker})\"\n  local workfile_o=\"$(printf \"%s.%02d\" \"${WORKFILES_O}\" ${worker})\"\n  local wanted_vars=\"PKG_NAME PKG_VERSION PKG_URL PKG_SHA256 PKG_DIR PKG_SECTION PKG_IS_ADDON PKG_SOURCE_NAME\"\n  local package_name var comma PKG_URL PKG_SOURCE_NAME PKG_VERSION PKG_IS_ADDON\n\n  [ -f \"${workfile_i}\" ] || return 0\n  (\n    # Override exit function so that packages calling exit don't terminate this sub-shell\n    exit() {\n      :\n    }\n\n    cd $LIBREELEC_DIR\n\n    source config/options \"\"\n\n    while read -r package_name; do\n      [ ${PROGRESS} = yes ] && progress ${pcount}\n\n      source_package ${package_name} &>/dev/null || true\n      [ -z \"${PKG_DIR}\" ] && continue\n\n      if [ -n \"${revision}\" ]; then\n        PKG_URL=\"${PKG_URL/${PKG_VERSION}/${revision}}\"\n        PKG_SOURCE_NAME=\"${PKG_SOURCE_NAME/${PKG_VERSION}/${revision}}\"\n        PKG_VERSION=\"${revision}\"\n        PKG_SHA256=\n      fi\n\n      PKG_IS_ADDON=No\n      [[ ${PKG_DIR/${LIBREELEC_DIR}/} =~ ^/packages/addons/.* ]] && PKG_IS_ADDON=Yes\n      [[ ${PKG_DIR/${LIBREELEC_DIR}/} =~ ^/packages/mediacenter/kodi-binary-addons/.* ]] && PKG_IS_ADDON=Yes\n\n      echo \"  {\" >>${workfile_o}\n      for var in ${wanted_vars}; do\n        [ \"${var}\" != \"PKG_SOURCE_NAME\" ] && comma=\",\" || comma=\n        echo \"    \\\"${var}\\\": \\\"${!var}\\\"${comma}\" >>${workfile_o}\n      done\n      echo \"  },\" >>${workfile_o}\n    done < ${workfile_i}\n  )\n}\n\ncheck_exists() {\n  if [ -z \"${!1}\" ]; then\n    echo \"ERROR: ${1} must not be undefined\"\n    return 1\n  fi\n\n  [ -d ${!1} ] && return 0\n\n  echo \"ERROR: ${1} ${!1} does not exist\"\n  return 1\n}\n\nget_abs_path() {\n  echo \"$(readlink -f $1)\"\n}\n\nget_package_path() {\n  echo \"$(basename \"$(dirname \"$0\")\") $0\"\n}\n\nget_packages() {\n  local package_name=\"$1\" path_filter=\"$2\"\n  local anchor=\"@?+?@\"\n\n  (\n    cd $LIBREELEC_DIR\n\n    # Generate package caches...\n    source config/options \"\"\n\n    cache_data=\"${BUILD}/.cache_package_global ${BUILD}/.cache_package_local\"\n\n    if [ -n \"${path_filter}\" ]; then\n      if [ -n \"${package_name}\" ]; then\n        grep -F \"/${path_filter}/\" ${cache_data} | grep -F \"/${package_name}${anchor}\"\n      else\n        grep -F \"/${path_filter}/\" ${cache_data}\n      fi\n    else\n      if [ -n \"${package_name}\" ]; then\n        grep -F \"/${package_name}${anchor}\" ${cache_data}\n      else\n        cat ${cache_data}\n      fi\n    fi\n  ) | sed \"s#${anchor}\\$##g;s#/# #g\" | awk '{print $NF}' | sort -u\n\n  return 0\n}\n\ninit_progress() {\n  echo 0 > ${LOCKFILE}\n}\n\nprogress() {\n  local count\n  (\n    flock -x 9\n    count=$(($(< ${LOCKFILE}) + 1))\n    echo \"${count}\" >${LOCKFILE}\n    printf \"Generating workload... %3d%% (%d of %d)\\r\" $((count * 100 / $1)) ${count} $1 >&2\n  ) 9< \"${LOCKFILE}\"\n}\n\nend_progress() {\n  rm -f ${LOCKFILE}\n  printf \"\\033[K\\r\" >&2\n}\n\nexec_worker_prog() {\n  echo \"${PYTHON_PROG}\" >/tmp/distro-tool.py\n  python3 /tmp/distro-tool.py \"${DOWNLOAD_DIR}\" \"${TARGET_DIR}\" \"${DISTRO_SOURCE}\" \"${DISTRO_MIRROR}\" \\\n                              \"${IS_MIRROR}\" \"${IGNORE_ERRORS}\" \"${DRY_RUN}\" \"${CHECK_NEWER}\" \\\n                              \"${PROGRESS}\" \"${WORKER_THREADS}\" \"${GIT_USERNAME}\" \"${GIT_PASSWORD}\" \\\n                              \"${CHECK_FILTER_CLASS}\" \"${CHECK_FILTER_TYPE}\" ${VERIFY_CHECKSUM} \"${VERBOSE}\"\n  rm -f /tmp/distro-tool.py\n}\n\nwhile [ : ]; do\n  [ -z \"$1\" ] && break\n  case $1 in\n    -d|--download)\n      shift\n      DOWNLOAD_DIR=$1\n      ;;\n    -l|--libreelec)\n      shift\n      LIBREELEC_DIR=$1\n      ;;\n    -t|--target)\n      shift\n      TARGET_DIR=$1\n      ;;\n    -a|--all)\n      IGNORE_ERRORS=yes\n      ;;\n    -p|--package)\n      shift\n      PACKAGE=$1\n      ;;\n    -r|--revision)\n      shift\n      REVISION=$1\n      ;;\n    -m|--mirror)\n      IS_MIRROR=yes\n      ;;\n    -s|--source)\n      IS_MIRROR=no\n      ;;\n    --dry-run|--dryrun)\n      DRY_RUN=yes\n      LINE_PREFIX=\"**DRY-RUN** \"\n      ;;\n    --git)\n      DOGIT=yes\n      ;;\n    -n|--notnewer)\n      CHECK_NEWER=no\n      ;;\n    --check-ver)\n      CHECK_FILTER_TYPE=Ver\n      ;;\n    --check-rev)\n      CHECK_FILTER_TYPE=Rev\n      ;;\n    --check-addons)\n      CHECK_FILTER_CLASS=Addons\n      ;;\n    --check-main)\n      CHECK_FILTER_CLASS=Main\n      ;;\n    -T|--threads)\n      shift\n      [ $1 -gt 0 ] && WORKER_THREADS=$1\n      ;;\n    -U|--gituser)\n      shift\n      GIT_USERNAME=$1\n      ;;\n    -P|--gitpass)\n      shift\n      GIT_PASSWORD=$1\n      ;;\n    -v|--verbose)\n      VERBOSE=$((VERBOSE + 1))\n      ;;\n    --no-progress)\n      PROGRESS=no\n      ;;\n    --path-filter)\n      shift\n      PATH_FILTER=$1\n      ;;\n    --verify-checksum)\n      VERIFY_CHECKSUM=yes\n      ;;\n    -h|--help)\n      help\n      exit 0\n      ;;\n    *)\n      help \"$1\"\n      exit 0\n      ;;\n  esac\n  shift\ndone\n\n[ -n \"${PACKAGE}\" -a ${VERBOSE} -eq 0 ] && VERBOSE=1\n\nif [ ${DOGIT} = yes ]; then\n  (\n    if [ -d ${LIBREELEC_DIR}/.git ]; then\n      cd ${LIBREELEC_DIR}\n      git pull\n    else\n      mkdir -p $(dirname \"${LIBREELEC_DIR}\") 2>/dev/null\n      cd $(dirname \"${LIBREELEC_DIR}\")\n      git clone https://github.com/LibreELEC/LibreELEC.tv.git $(basename \"${LIBREELEC_DIR}\")\n    fi\n  )\nfi\n\ncheck_exists LIBREELEC_DIR || exit\nLIBREELEC_DIR=\"$(get_abs_path \"${LIBREELEC_DIR}\")\"\n\nDISTRO_SOURCE=\"$(get_libreelec_option DISTRO_SRC)\"\nDISTRO_MIRROR=\"$(get_libreelec_option DISTRO_MIRROR)\"\nLIBREELEC_VER=\"$(get_libreelec_option LIBREELEC_VERSION)\"\n\nif [ ${IS_MIRROR} = no ]; then\n  TARGET_DIR=\"$(get_abs_path \"${TARGET_DIR}/${LIBREELEC_VER}\")\"\nelse\n  TARGET_DIR=\"$(get_abs_path \"${TARGET_DIR}/mirror\")\"\nfi\ncheck_exists TARGET_DIR || exit\n\nif [ ${IS_MIRROR} = no ]; then\n  DOWNLOAD_DIR=\"$(get_abs_path \"${DOWNLOAD_DIR}/${LIBREELEC_VER}\")\"\nelse\n  DOWNLOAD_DIR=\"$(get_abs_path \"${DOWNLOAD_DIR}/mirror\")\"\nfi\ncheck_exists DOWNLOAD_DIR || exit\n\nif [ -n \"${REVISION}\" -a -z \"${PACKAGE}\" ]; then\n  echo \"ERROR: A single package must be specified with custom revision\"\n  exit 1\nfi\n\necho\nif [ ${IS_MIRROR} = yes ]; then\n  echo \"Synchronising LibreELEC.tv (branch: $(get_libreelec_branch), version: ${LIBREELEC_VER}) with MIRROR server ${TARGET_DIR}\"\nelse\n  echo \"Synchronising LibreELEC.tv (branch: $(get_libreelec_branch), version: ${LIBREELEC_VER}) with SOURCE server ${TARGET_DIR}\"\nfi\necho\necho \"Distro Source is: ${DISTRO_SOURCE}\"\necho \"Distro Mirror is: ${DISTRO_MIRROR}\"\necho \" Syncing against: ${TARGET_DIR}\"\necho \"  Downloading to: ${DOWNLOAD_DIR}\"\nif [ -n \"${PATH_FILTER}\" ]; then\n  echo \"     Path filter: ${PATH_FILTER}\"\nfi\necho \"     Check Newer: ${CHECK_NEWER^}  Class/Type: ${CHECK_FILTER_CLASS} / ${CHECK_FILTER_TYPE}\"\necho \"         Dry run: ${DRY_RUN^}\"\nif [ ${VERBOSE} -gt 2 ]; then\n  echo \" Debugging level: ${VERBOSE} (${DEBUG_LOG})\"\n  echo \"  Worker Threads: ${WORKER_THREADS}\"\nfi\necho\n\nif [ ${VERBOSE} -gt 2 -a -n \"${DEBUG_LOG}\" ]; then\n  generate_work \"${PACKAGE}\" \"${REVISION}\" \"${PATH_FILTER}\" | exec_worker_prog 2>${DEBUG_LOG}\nelse\n  generate_work \"${PACKAGE}\" \"${REVISION}\" \"${PATH_FILTER}\" | exec_worker_prog\nfi\n"
  },
  {
    "path": "tools/docker/README.md",
    "content": "# Build container\n\n**Docker containers**\n- Ubuntu\n  - bionic  (Ubuntu 18.04)\n  - focal   (Ubuntu 20.04)\n  - jammy   (Ubuntu 22.04)\n  - kinetic (Ubuntu 22.10)\n- Debian\n  - stretch (Debian  9.0)\n  - buster  (Debian 10.0)\n  - sid     (Debian unstable)\n\n**Build docker image**\n\nUse the following command to create a docker image and tag it with `coreelec`.\n\n```\ndocker build --pull -t coreelec tools/docker/focal\n```\n\nSee https://docs.docker.com/engine/reference/commandline/build/ for details on `docker build` usage.\n\n**Build CoreELEC image inside a container**\n\nUse the following command to build CoreELEC images inside a new container based on the docker image tagged with `coreelec`.\n\n```\ndocker run --rm -v `pwd`:/build -w /build -it coreelec make image\n```\n\nUse `--env`, `-e` or `--env-file` to pass environment variables used by the CoreELEC buildsystem.\n\n```\ndocker run --rm -v `pwd`:/build -w /build -it -e PROJECT=Amlogic-ce -e DEVICE=Amlogic-ng -e ARCH=arm coreelec make image\n```\n\nSee https://docs.docker.com/engine/reference/commandline/run/ for details on `docker run` usage.\n\nNote: `dockerd` is set to send all its logs to journald using the setting `--log-driver=journald` (so if you don't set the `--log-driver none` for your `docker run` these logs will be sent through to your log.\nRefer:\n\nhttps://github.com/LibreELEC/LibreELEC.tv/blob/140ad28a258167e0e87daf1e474db37215b2caf3/packages/addons/service/docker/source/system.d/service.system.docker.service#L12\n"
  },
  {
    "path": "tools/docker/aarch64/bionic/Dockerfile",
    "content": "FROM arm64v8/ubuntu:bionic\n\nARG DEBIAN_FRONTEND=noninteractive\n\nRUN apt-get update \\\n && apt-get dist-upgrade -y \\\n && apt-get install -y locales sudo \\\n && rm -rf /var/lib/apt/lists/*\n\nRUN locale-gen en_US.UTF-8 \\\n && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en\nENV LANG=en_US.UTF-8 \\\n    LANGUAGE=en_US:en \\\n    LC_ALL=en_US.UTF-8\n\nRUN adduser --disabled-password --gecos '' docker \\\n && adduser docker sudo \\\n && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers\n\nRUN apt-get update && apt-get install -y \\\n    wget bash bc gcc sed patch patchutils tar bzip2 gzip perl gawk gperf zip unzip diffutils texinfo lzop python python3 \\\n    g++ xfonts-utils xfonts-utils xfonts-utils xsltproc default-jre-headless cpio \\\n    libc6-dev libncurses5-dev libssl-dev \\\n    u-boot-tools \\\n    xz-utils make file libxml-parser-perl \\\n    libjson-perl libparse-yapp-perl \\\n    golang-go \\\n    git openssh-client \\\n    qemu-user-binfmt \\\n    --no-install-recommends \\\n && rm -rf /var/lib/apt/lists/*\n\nUSER docker\n"
  },
  {
    "path": "tools/docker/aarch64/focal/Dockerfile",
    "content": "FROM arm64v8/ubuntu:focal\n\nARG DEBIAN_FRONTEND=noninteractive\n\nRUN apt-get update \\\n && apt-get dist-upgrade -y \\\n && apt-get install -y locales sudo \\\n && rm -rf /var/lib/apt/lists/*\n\nRUN locale-gen en_US.UTF-8 \\\n && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en\nENV LANG=en_US.UTF-8 \\\n    LANGUAGE=en_US:en \\\n    LC_ALL=en_US.UTF-8\n\nRUN adduser --disabled-password --gecos '' docker \\\n && adduser docker sudo \\\n && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers\n\nRUN apt-get update && apt-get install -y \\\n    wget bash bc gcc sed patch patchutils tar bzip2 gzip perl gawk gperf zip unzip diffutils texinfo lzop python python3 \\\n    g++ xfonts-utils xfonts-utils xfonts-utils xsltproc default-jre-headless cpio \\\n    libc6-dev libncurses5-dev libssl-dev \\\n    u-boot-tools \\\n    xz-utils make file libxml-parser-perl \\\n    libjson-perl libparse-yapp-perl \\\n    golang-go \\\n    git openssh-client \\\n    qemu-user-binfmt \\\n    --no-install-recommends \\\n && rm -rf /var/lib/apt/lists/*\n\nUSER docker\n"
  },
  {
    "path": "tools/docker/bionic/Dockerfile",
    "content": "FROM ubuntu:bionic\n\nARG DEBIAN_FRONTEND=noninteractive\n\nRUN apt-get update \\\n && apt-get dist-upgrade -y \\\n && apt-get install -y locales sudo \\\n && rm -rf /var/lib/apt/lists/*\n\nRUN locale-gen en_US.UTF-8 \\\n && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en\nENV LANG=en_US.UTF-8 \\\n    LANGUAGE=en_US:en \\\n    LC_ALL=en_US.UTF-8\n\nRUN adduser --disabled-password --gecos '' docker \\\n && adduser docker sudo \\\n && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers\n\nRUN apt-get update && apt-get install -y \\\n    wget bash bc gcc sed patch patchutils tar bzip2 gzip xz-utils zstd perl gawk gperf zip unzip diffutils lzop make file \\\n    g++ xfonts-utils xsltproc default-jre-headless python3 \\\n    libc6-dev libncurses5-dev \\\n    libjson-perl libxml-parser-perl libparse-yapp-perl \\\n    golang-go \\\n    git openssh-client \\\n    --no-install-recommends \\\n && rm -rf /var/lib/apt/lists/*\n\nUSER docker\n"
  },
  {
    "path": "tools/docker/buster/Dockerfile",
    "content": "FROM debian:buster\n\nARG DEBIAN_FRONTEND=noninteractive\n\nRUN apt-get update \\\n && apt-get dist-upgrade -y \\\n && apt-get install -y locales sudo \\\n && rm -rf /var/lib/apt/lists/*\n\nRUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen \\\n && locale-gen en_US.UTF-8 \\\n && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en\nENV LANG=en_US.UTF-8 \\\n    LANGUAGE=en_US:en \\\n    LC_ALL=en_US.UTF-8\n\nRUN adduser --disabled-password --gecos '' docker \\\n && adduser docker sudo \\\n && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers\n\nRUN apt-get update && apt-get install -y \\\n    wget bash bc gcc sed patch patchutils tar bzip2 gzip xz-utils zstd perl gawk gperf zip unzip diffutils lzop make file \\\n    g++ xfonts-utils xsltproc default-jre-headless python3 \\\n    libc6-dev libncurses5-dev \\\n    libjson-perl libxml-parser-perl libparse-yapp-perl \\\n    golang-go \\\n    git openssh-client \\\n    --no-install-recommends \\\n && rm -rf /var/lib/apt/lists/*\n\nUSER docker\n"
  },
  {
    "path": "tools/docker/focal/Dockerfile",
    "content": "FROM ubuntu:focal\n\nARG DEBIAN_FRONTEND=noninteractive\n\nRUN apt-get update \\\n && apt-get dist-upgrade -y \\\n && apt-get install -y locales sudo \\\n && rm -rf /var/lib/apt/lists/*\n\nRUN locale-gen en_US.UTF-8 \\\n && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en\nENV LANG=en_US.UTF-8 \\\n    LANGUAGE=en_US:en \\\n    LC_ALL=en_US.UTF-8\n\nRUN adduser --disabled-password --gecos '' docker \\\n && adduser docker sudo \\\n && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers\n\nRUN apt-get update && apt-get install -y \\\n    wget bash bc gcc-10 sed patch patchutils tar bzip2 gzip xz-utils zstd perl gawk gperf zip \\\n      unzip diffutils lzop make file g++-10 xfonts-utils xsltproc default-jre-headless python3 \\\n      libc6-dev libncurses5-dev libjson-perl libxml-parser-perl libparse-yapp-perl \\\n      golang-1.18-go git openssh-client \\\n    --no-install-recommends \\\n && ln -s /usr/lib/go-1.18 /usr/lib/go \\\n && rm -rf /var/lib/apt/lists/*\n\nRUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 \\\n    --slave /usr/bin/cpp cpp /usr/bin/cpp-10 \\\n    --slave /usr/bin/g++ g++ /usr/bin/g++-10 \\\n    --slave /usr/bin/gcov gcov /usr/bin/gcov-10\nRUN update-alternatives --config gcc\n\nUSER docker\n"
  },
  {
    "path": "tools/docker/jammy/Dockerfile",
    "content": "FROM ubuntu:jammy\n\nARG DEBIAN_FRONTEND=noninteractive\n\nRUN apt-get update \\\n && apt-get dist-upgrade -y \\\n && apt-get install -y locales sudo \\\n && rm -rf /var/lib/apt/lists/*\n\nRUN locale-gen en_US.UTF-8 \\\n && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en\nENV LANG=en_US.UTF-8 \\\n    LANGUAGE=en_US:en \\\n    LC_ALL=en_US.UTF-8\n\nRUN adduser --disabled-password --gecos '' docker \\\n && adduser docker sudo \\\n && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers\n\nRUN apt-get update && apt-get install -y \\\n    wget bash bc gcc sed patch patchutils tar bzip2 gzip xz-utils zstd perl gawk gperf zip unzip diffutils lzop make file \\\n    g++ xfonts-utils xsltproc default-jre-headless python3 \\\n    libc6-dev libncurses5-dev \\\n    libjson-perl libxml-parser-perl libparse-yapp-perl \\\n    golang-go \\\n    git openssh-client \\\n    --no-install-recommends \\\n && rm -rf /var/lib/apt/lists/*\n\nUSER docker\n"
  },
  {
    "path": "tools/docker/kinetic/Dockerfile",
    "content": "FROM ubuntu:kinetic\n\nARG DEBIAN_FRONTEND=noninteractive\n\nRUN apt-get update \\\n && apt-get dist-upgrade -y \\\n && apt-get install -y locales sudo \\\n && rm -rf /var/lib/apt/lists/*\n\nRUN locale-gen en_US.UTF-8 \\\n && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en\nENV LANG=en_US.UTF-8 \\\n    LANGUAGE=en_US:en \\\n    LC_ALL=en_US.UTF-8\n\nRUN adduser --disabled-password --gecos '' docker \\\n && adduser docker sudo \\\n && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers\n\nRUN apt-get update && apt-get install -y \\\n    wget bash bc gcc sed patch patchutils tar bzip2 gzip xz-utils zstd perl gawk gperf zip unzip diffutils lzop make file \\\n    g++ xfonts-utils xsltproc default-jre-headless python3 \\\n    libc6-dev libncurses5-dev \\\n    libjson-perl libxml-parser-perl libparse-yapp-perl \\\n    golang-go \\\n    git openssh-client \\\n    --no-install-recommends \\\n && rm -rf /var/lib/apt/lists/*\n\nUSER docker\n"
  },
  {
    "path": "tools/docker/sid/Dockerfile",
    "content": "FROM debian:sid\n\nARG DEBIAN_FRONTEND=noninteractive\n\nRUN apt-get update \\\n && apt-get dist-upgrade -y \\\n && apt-get install -y locales sudo \\\n && rm -rf /var/lib/apt/lists/*\n\nRUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen \\\n && locale-gen en_US.UTF-8 \\\n && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en\nENV LANG=en_US.UTF-8 \\\n    LANGUAGE=en_US:en \\\n    LC_ALL=en_US.UTF-8\n\nRUN adduser --disabled-password --gecos '' docker \\\n && adduser docker sudo \\\n && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers\n\nRUN apt-get update && apt-get install -y \\\n    wget bash bc gcc sed patch patchutils tar bzip2 gzip xz-utils zstd perl gawk gperf zip unzip diffutils lzop make file \\\n    g++ xfonts-utils xsltproc default-jre-headless python3 \\\n    libc6-dev libncurses5-dev \\\n    libjson-perl libxml-parser-perl libparse-yapp-perl \\\n    golang-go \\\n    git openssh-client \\\n    --no-install-recommends \\\n && rm -rf /var/lib/apt/lists/*\n\nUSER docker\n"
  },
  {
    "path": "tools/docker/stretch/Dockerfile",
    "content": "FROM debian:stretch\n\nARG DEBIAN_FRONTEND=noninteractive\n\nRUN apt-get update \\\n && apt-get dist-upgrade -y \\\n && apt-get install -y locales sudo \\\n && rm -rf /var/lib/apt/lists/*\n\nRUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen \\\n && locale-gen en_US.UTF-8 \\\n && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en\nENV LANG=en_US.UTF-8 \\\n    LANGUAGE=en_US:en \\\n    LC_ALL=en_US.UTF-8\n\nRUN adduser --disabled-password --gecos '' docker \\\n && adduser docker sudo \\\n && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers\n\nRUN apt-get update && apt-get install -y \\\n    wget bash bc gcc sed patch patchutils tar bzip2 gzip xz-utils zstd perl gawk gperf zip unzip diffutils lzop make file \\\n    g++ xfonts-utils xsltproc default-jre-headless python3 \\\n    libc6-dev libncurses5-dev \\\n    libjson-perl libxml-parser-perl libparse-yapp-perl \\\n    golang-go \\\n    git openssh-client \\\n    --no-install-recommends \\\n && rm -rf /var/lib/apt/lists/*\n\nUSER docker\n"
  },
  {
    "path": "tools/download-cleaner",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-2020 Ian Leonard (antonlacon@gmail.com)\n#\n# Scan through the given directory looking for out of date source packages.\n# If a source tarball is found that is different from what is currently in\n# tree, then print out the discovered files.\n#\n# If -d is passed, also delete obsolete files.\n# If -f is passed, fetch updated source tarballs.\n# If -b is passed, build a new SOURCES, populated from the old SOURCES\n#   Set NEW_SOURCES_DIR to customize the temp dir to use in building\n# If -r is passed, replace the old SOURCES when finished building new SOURCES\n\nset -e\n\n. config/options \"\"\n\n# default variables\nDESTRUCTIVE_RUN=\"false\"\nFETCH_UPDATES=\"false\"\nPACKAGES_TO_UPDATE=()\nBUILD_SOURCES=\"false\"\nREPLACE_OLD=\"false\"\nNEW_SOURCES=\"${NEW_SOURCES_DIR:-${SOURCES}.new}\"\n\n\n# helper functions\nhelp(){\n  echo \"Usage: ${0} [-hdfbr]\"\n    echo \"Set PROJECT, DEVICE and ARCH as required.\"\n    echo \"  -h this help\"\n    echo \"  -d delete obsolete source packages (default no)\"\n    echo \"  -f fetch updated source packages (default: no)\"\n    echo \"  -b build new SOURCES content (default: no)\"\n    echo \"  -r replace old SOURCES when rebuilding (default: no)\"\n}\n\n\n# command line opts\nwhile getopts hdfrb OPT; do\n  case \"${OPT}\" in\n    h)\n      help\n      exit 0\n      ;;\n    d)\n      DESTRUCTIVE_RUN=\"true\"\n      ;;\n    f)\n      FETCH_UPDATES=\"true\"\n      ;;\n    b)\n      BUILD_SOURCES=\"true\"\n      ;;\n    r)\n      REPLACE_OLD=\"true\"\n      ;;\n    \\?)\n      # error and output help on unknown\n      help\n      die\n      ;;\n  esac\ndone\n\nshift $((${OPTIND}-1))\n\n\n# sanity checking\nif [ ! -d \"${SOURCES}\" ]; then\n  die \"error: ${SOURCES} is not a directory\"\nelif [ \"${DESTRUCTIVE_RUN}\" = \"true\" -a \"${BUILD_SOURCES}\" = \"true\" ]; then\n  die \"error: options '-d' and '-b' are mutually exclusive\"\nfi\n\n\n# main\n# process files in SOURCES\nfor SOURCE_PACKAGE in $(find \"${SOURCES}/\" -mindepth 1 -type d); do\n  PACKAGE_NAME=$(basename \"${SOURCE_PACKAGE}\")\n\n  # check if package is still in the tree to selectively prune, or delete the dir\n  PACKAGE_DIR=$(get_pkg_directory \"${PACKAGE_NAME}\" || true)\n  if [ -n \"${PACKAGE_DIR}\" ]; then\n    PACKAGE_SOURCE_FILE=$(get_pkg_variable \"${PACKAGE_NAME}\" \"PKG_SOURCE_NAME\")\n  fi\n  # PACKAGE_DIR is null if not in tree, PACKAGE_SOURCE_FILE is null if PKG_ARCH mismatch\n  if [ -n \"${PACKAGE_DIR}\" -a -n \"${PACKAGE_SOURCE_FILE}\" ]; then\n    CUR_PACKAGE_FILE=$(basename \"${PACKAGE_SOURCE_FILE}\")\n\n    for FILE in $(find \"${SOURCE_PACKAGE}/\" -type f); do\n      # don't test auxilliary files\n      if [[ \"${FILE}\" = *.url ]] || [[ \"${FILE}\" = *.sha256 ]]; then\n        continue\n      fi\n\n      # obsolete file handling\n      if [ \"${FILE}\" != \"${SOURCES}/${PACKAGE_NAME}/${CUR_PACKAGE_FILE}\" ]; then\n        ls -1 \"${FILE}\"*\n        PACKAGES_TO_UPDATE+=\"${PACKAGE_NAME}\"\n\n        if [ \"${DESTRUCTIVE_RUN}\" = \"true\" ]; then\n          rm -f \"${FILE}\"*\n        fi\n      # current file handling\n      elif [ \"${BUILD_SOURCES}\" = \"true\" ]; then\n        echo \"Relocating ${PACKAGE_NAME} files...\"\n        mkdir -p \"${NEW_SOURCES}/${PACKAGE_NAME}\"\n        mv \"${FILE}\"* \"${NEW_SOURCES}/${PACKAGE_NAME}/\"\n      fi\n    done\n  else\n    echo \"info: ${PACKAGE_NAME} no longer in tree\"\n    if [ \"${DESTRUCTIVE_RUN}\" = \"true\" ]; then\n      rm -rf \"${SOURCE_PACKAGE}\"\n    fi\n  fi\ndone\n\nif [ \"${BUILD_SOURCES}\" = \"true\" -a \"${REPLACE_OLD}\" = \"true\" ]; then\n  rm -rf \"${SOURCES}\"\n  mv \"${NEW_SOURCES}\" \"${SOURCES}\"\nfi\n\nif [ \"${FETCH_UPDATES}\" = \"true\" ]; then\n  if \"${BUILD_SOURCES}\" = \"true\" -a \"${REPLACE_OLD}\" = \"false\" ]; then\n    SOURCES=\"${NEW_SOURCES}\"\n  fi\n  for PACKAGE in \"${PACKAGES_TO_UPDATE[@]}\"; do\n    # scripts/get determines if tarball is present before downloading\n    SOURCES_DIR=\"${SOURCES}\" \"${SCRIPTS}/get\" \"${PACKAGE}\"\n  done\nfi\n\nexit\n"
  },
  {
    "path": "tools/download-tool",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)\n# Copyright (C) 2020-present Team CoreELEC (https://coreelec.org)\n\n. config/options \"\"\n\nhelp() {\n  echo \"Usage: PROJECT=<project> DEVICE=<device> ARCH=<arch> [JOBS=<num>] ${0} [package|-a|--all]\"\n  echo \"Options:\"\n  echo \"  package: name of single package what should be downloaded\"\n  echo \"  -a, --all: download all packages needed to build PROJECT=\\\"${PROJECT}\\\" DEVICE=\\\"${DEVICE}\\\"\"\n}\n\nif [ -z \"${PROJECT}\" -a -z \"${ARCH}\" -o -z \"${1}\" ]; then\n  help\n  exit 0\nfi\n\ncase ${1} in\n  -a|--all)\n  shift\n  LIST=$(scripts/pkgjson|scripts/genbuildplan.py --hide-wants --build ${@:-image} 2>/dev/null | awk '{ split($2,a,\":\"); print a[1] }' | sort -u)\n  ;;\n  -h|--help)\n  help\n  exit 0\n  ;;\n  *)\n  LIST=\"${1}\"\n  shift\n  ;;\nesac\n\nif [ -z $(which parallel) ]; then\n  echo \"'parallel' is not installed, packages will be download one at a time\"\n  for package in ${LIST}; do\n    echo \"download package: ${package}\"\n  ./scripts/get $package\n  done\nelse\n  [ -z \"${JOBS}\" ] && JOBS=0\n  parallel --jobs ${JOBS} ./scripts/get {} ::: ${LIST}\nfi\n"
  },
  {
    "path": "tools/ffmpeg/gen-patches.sh",
    "content": "#!/bin/bash\n\n# base ffmpeg version\nFFMPEG_REPO=\"git://source.ffmpeg.org/ffmpeg.git\"\nFFMPEG_VERSION=\"n4.4.1\"\n\nKODI_FFMPEG_REPO=\"https://github.com/xbmc/FFmpeg\"\nKODI_FFMPEG_VERSION=\"4.4.1-Nexus-Alpha1\"\n\nALL_FEATURE_SETS=\"v4l2-drmprime v4l2-request libreelec rpi kodi\"\n\nif [ $# -eq 0 ]; then\n  echo \"usage: $0 all|featureset [githash]\"\n  echo \"available feature sets: ${ALL_FEATURE_SETS}\"\n  exit 1\nfi\n\nFFMPEG_ROOT=\"$(pwd)\"\nLE_ROOT=\"$(cd $(dirname $0)/../.. ; pwd)\"\n\ncreate_patch() {\n  FEATURE_SET=\"$1\"\n  REFTYPE=\"branch\"\n\n  BASE_REPO=\"${FFMPEG_REPO}\"\n  BASE_VERSION=\"${FFMPEG_VERSION}\"\n\n  PATCH_CREATE_DIFF=\"no\"\n\n  case \"${FEATURE_SET}\" in\n    v4l2-drmprime)\n      REPO=\"https://github.com/jernejsk/FFmpeg\"\n      REFSPEC=\"v4l2-drmprime-v6-4.4.1-Nexus-Alpha1\"\n      BASE_REPO=\"${KODI_FFMPEG_REPO}\"\n      BASE_VERSION=\"${KODI_FFMPEG_VERSION}\"\n      ;;\n    v4l2-request)\n      REPO=\"https://github.com/jernejsk/FFmpeg\"\n      REFSPEC=\"v4l2-request-hwaccel-4.4.1-Nexus-Alpha1\"\n      BASE_REPO=\"${KODI_FFMPEG_REPO}\"\n      BASE_VERSION=\"${KODI_FFMPEG_VERSION}\"\n      ;;\n    libreelec)\n      REPO=\"https://github.com/LibreELEC/FFmpeg\"\n      REFSPEC=\"4.4-libreelec-misc\"\n      ;;\n    rpi)\n      REPO=\"https://github.com/jc-kynesim/rpi-ffmpeg\"\n      REFSPEC=\"test/4.4.1/main\"\n      PATCH_CREATE_DIFF=\"yes\"\n      ;;\n    kodi)\n      REPO=\"${KODI_FFMPEG_REPO}\"\n      REFSPEC=\"${KODI_FFMPEG_VERSION}\"\n      REFTYPE=\"tag\"\n      ;;\n    *)\n      echo \"illegal feature set ${FEATURE_SET}\"\n      exit 1\n      ;;\n  esac\n\n  # get base ffmpeg version\n  git fetch \"${BASE_REPO}\" \"${BASE_VERSION}\"\n  BASE_REV=$(git rev-parse FETCH_HEAD)\n\n  PATCH_DIR=\"packages/multimedia/ffmpeg/patches/${FEATURE_SET}\"\n  PATCH_FILE=\"${PATCH_DIR}/ffmpeg-001-${FEATURE_SET}.patch\"\n  mkdir -p \"${LE_ROOT}/${PATCH_DIR}\"\n\n  git fetch \"${REPO}\" \"${REFSPEC}\"\n  if [ $# -ge 2 ]; then\n    REV=\"$2\"\n  else\n    REV=$(git rev-parse FETCH_HEAD)\n  fi\n  BASE_REV=$(git merge-base \"${BASE_REV}\" \"${REV}\")\n\n  if [ -f \"${LE_ROOT}/${PATCH_FILE}\" ]; then\n    ACTION=\"update\"\n  else\n    ACTION=\"create\"\n  fi\n\n  if [ \"${PATCH_CREATE_DIFF}\" = \"yes\" ]; then\n    # create diff in case format-patch doesn't work, eg when we have non-linear history\n    git diff \"${BASE_REV}..${REV}\" > \"${LE_ROOT}/${PATCH_FILE}\"\n  else\n    git format-patch --stdout --no-signature \"${BASE_REV}..${REV}\" > \"${LE_ROOT}/${PATCH_FILE}\"\n  fi\n\n  MSG=$(mktemp)\n\n  cat << EOF > \"${MSG}\"\nffmpeg: ${ACTION} ${FEATURE_SET} patch\n\nPatch created using revisions ${BASE_REV:0:7}..${REV:0:7}\nfrom ${REFTYPE} ${REFSPEC} of ${REPO}\nEOF\n\n  cd \"${LE_ROOT}\"\n  git add \"${PATCH_FILE}\"\n  git commit -F \"${MSG}\" ${GIT_COMMIT_ARGS}\n  cd \"${FFMPEG_ROOT}\"\n  rm \"${MSG}\"\n}\n\nif [ \"$1\" = \"all\" ]; then\n  for SET in ${ALL_FEATURE_SETS}; do\n    create_patch \"${SET}\"\n  done\nelse\n  create_patch \"$@\"\nfi\n"
  },
  {
    "path": "tools/fixlecode.py",
    "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nimport os\nimport sys\nimport re\nimport argparse\nimport subprocess\nimport tempfile\n\nVAR_VALID_CHARS = '[A-Za-z_0-9]'\n\nRE_VAR_VALID_CHARS = re.compile(VAR_VALID_CHARS)\n\nRE_APPEND_WITH_BRACES = re.compile(r'^\\s*(%s*)=\"(\\${%s*})' % (VAR_VALID_CHARS, VAR_VALID_CHARS))\nRE_APPEND_WITHOUT_BRACES = re.compile(r'^\\s*(%s*)=\"(\\$%s*)' % (VAR_VALID_CHARS, VAR_VALID_CHARS))\n\nRE_AWK_SQUOTE1 = re.compile(r\".*\\s*awk -F'.' [^']*\\s'([^']*)'\")\nRE_AWK_SQUOTE2 = re.compile(r\".*\\s*awk[^']*\\s'([^']*)'\")\nRE_AWK_DQUOTE = re.compile(r'.*\\s*awk[^\"]*\\s\"([^\"]*)\"')\n\nRE_SEMICOLON_THEN = re.compile(r'\\s*;\\s*then\\s*$')\nRE_SEMICOLON_DO = re.compile(r'\\s*;\\s*do\\s*$')\n\nRE_CONTINUATION = re.compile(r'.*\\\\\\s*')\nRE_SIMPLE_ASSIGN = re.compile(r'\\s*%s*=\"[^\"]*\"\\s*$' % VAR_VALID_CHARS)\n\n#\n# From:\n#   PKG_XYZ=\"$PKG_XYZ blah\" (or PKG_XYZ=\"${PKG_XYZ} blah\")\n# to\n#   PKG_XYZ+=\" blah\"\n#\ndef fix_appends(line, changed):\n  changes = 0\n  newline = line\n  replace = False\n\n  # If it doesn't look like a simple 'PKG_XYZ=\"<something>\"' then ignore it\n  if not RE_SIMPLE_ASSIGN.match(line):\n    return newline\n\n  # Ignore continuations, likely not a simple assignment\n  if RE_CONTINUATION.match(line):\n    return newline\n\n  match = RE_APPEND_WITH_BRACES.match(line)\n  if match:\n    replace = (match.groups()[1] == ('${%s}' % match.groups()[0]))\n  else:\n    match = RE_APPEND_WITHOUT_BRACES.match(line)\n    if match:\n      replace = (match.groups()[1] == ('$%s' % match.groups()[0]))\n\n  # If we want to replace this, but we're replacing the var\n  # with only itself, then it's not a concat but something else,\n  # so ignore it (eg. when populating /etc/os-release in /scripts/image).\n  if replace and line.endswith('%s\"\\n' % match.groups()[1]):\n    replace = False\n\n  if replace:\n    newline = line.replace('=\"%s' % match.groups()[1], '+=\"')\n    changes += 1\n\n  changed['appends'] += changes\n  changed['isdirty'] = (changed['isdirty'] or changes != 0)\n\n  return newline\n\n#\n# From:\n#   $PKG_XYZ\n# to:\n#   ${PKG_XYZ}\n#\ndef fix_braces(line, changed):\n  changes = 0\n  newline = ''\n  invar = False\n  c = 0\n\n  # Try and identify awk progs, so that they can be ignored\n  awk = None\n  for r in [RE_AWK_SQUOTE1, RE_AWK_SQUOTE2, RE_AWK_DQUOTE]:\n    awk = r.match(line)\n    if awk:\n      break\n\n  while c < len(line):\n    char = line[c:c+1]\n    charn = line[c+1:c+2]\n\n    # ignore $0, $1, $2 etc. in simple one-line awk progs\n    if awk and c >= awk.start(1) and c <= awk.end(1):\n      newline += char\n      c += 1\n      continue\n\n    if not invar and char == '$' and RE_VAR_VALID_CHARS.search(charn):\n      invar = True\n      newline += char + '{'\n      changes += 1\n    elif invar and not RE_VAR_VALID_CHARS.search(char):\n      invar = False\n      newline += '}'\n      if char == '$':\n        continue\n      newline += char\n    else:\n      newline += char\n    c +=1\n\n  changed['braces'] += changes\n  changed['isdirty'] = (changed['isdirty'] or changes != 0)\n\n  return newline\n\n#\n# From\n#   blah=`cat filename | wc -l`\n# to:\n#   blah=$(cat filename | wc -l)\n#\ndef fix_backticks(line, changed):\n  changes = 0\n  newline = ''\n  intick = False\n  iscomment = False\n  c = 0\n\n  # Don't fix backticks in comments as more likely to be markdown\n  if line.startswith('#'):\n    return line\n\n  while c < len(line):\n    char = line[c:c+1]\n    charn = line[c+1:c+2]\n\n    # Don't convert \"embedded\" comments such as `# blah blah`\n    if not intick and char == '`' and charn == '#':\n      iscomment = True\n\n    if char == '`' and (intick or charn != '#'):\n      if iscomment:\n        newline += char\n        iscomment = False\n      elif not intick:\n        newline += '$('\n        changes += 1\n      else:\n        newline += ')'\n      intick = not intick\n    else:\n      newline += char\n\n    c += 1\n\n  changed['backticks'] += changes\n  changed['isdirty'] = (changed['isdirty'] or changes != 0)\n\n  return newline\n\n#\n# 1. From:\n#      if [ test ] ; then\n#    to:\n#      if [ test ]; then\n#\n# 2. From:\n#      for dtb in $(find . -name '*.dtb') ; do\n#    to:\n#      for dtb in $(find . -name '*.dtb'); do\n#\ndef fix_semicolons(line, changed):\n  changes = 0\n  newline = line\n\n  oldline = newline\n  newline = RE_SEMICOLON_THEN.sub('; then\\n', newline)\n  if newline != oldline:\n    changes += 1\n\n  oldline = newline\n  newline = RE_SEMICOLON_DO.sub('; do\\n', newline)\n  # Hack around dangling '   ; do' statements\n  if newline == '; do\\n':\n    newline = oldline\n  if newline != oldline:\n    changes += 1\n\n  changed['semicolons'] += changes\n  changed['isdirty'] = (changed['isdirty'] or changes != 0)\n\n  return newline\n\n#\n# Validate args.\n# Iterate over files.\n#\ndef process_args(args):\n  files = []\n\n  if args.filename:\n    for filename in args.filename:\n      if os.path.exists(filename):\n        if os.path.isfile(filename):\n          files.append(filename)\n      else:\n        print('ERROR: %s does not exist' % filename)\n        sys.exit(1)\n  else:\n    if args.write:\n        print('ERROR: --write not valid when input is stdin.')\n        sys.exit(1)\n    files.append(None) #read from stdin\n\n  if len(files) > 1 and args.output:\n      print('ERROR: --output not valid with multiple inputs.')\n      sys.exit(1)\n\n  for filename in sorted(files):\n    (oldlines, newlines, changed) = process_file(filename, args)\n\n    if args.output:\n      output_file(args.output, newlines)\n    elif args.write:\n      output_file(filename, newlines)\n\n    if args.diff and changed['isdirty']:\n      show_diff(filename, oldlines, newlines)\n\n    if not args.quiet and (not args.dirty or changed['isdirty']):\n      show_summary(filename, changed)\n\ndef process_file(filename, args):\n  oldlines = []\n  newlines = []\n\n  changed = {'isdirty': False, 'appends': 0, 'backticks': 0, 'braces': 0, 'semicolons': 0}\n\n  if filename:\n    file = open(filename, 'r')\n  else:\n    file = sys.stdin\n\n  oldline = file.readline()\n  while oldline:\n    oldlines.append(oldline)\n    oldline = file.readline()\n\n  file.close()\n\n  for oldline in oldlines:\n    newline = oldline\n\n    if not args.no_appends:\n      newline = fix_appends(newline, changed)\n\n    if not args.no_braces:\n      newline = fix_braces(newline, changed)\n\n    if not args.no_backticks:\n      newline = fix_backticks(newline, changed)\n\n    if not args.no_semicolons:\n      newline = fix_semicolons(newline, changed)\n\n    newlines.append(newline)\n\n  return(''.join(oldlines), ''.join(newlines), changed)\n\ndef run_command(command):\n  result = ''\n  process = subprocess.Popen(command, shell=True, close_fds=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\n  process.wait()\n  for line in process.stdout.readlines():\n    result = '%s%s' % (result, line.decode('utf-8'))\n  return result\n\n#\n# Run 'diff -Naur' on two inputs.\n#\n# Since we support input from stdin, write\n# both sets of data to temporary files and\n# then compare them.\n#\ndef show_diff(filename, oldlines, newlines):\n  if not filename:\n    filename = 'stdin'\n\n  with tempfile.NamedTemporaryFile(mode='w') as file:\n    oldfile = file.name\n\n  with tempfile.NamedTemporaryFile(mode='w') as file:\n    newfile = file.name\n\n  output_file(oldfile, oldlines)\n  output_file(newfile, newlines)\n\n  diff = run_command('diff -Naur \"%s\" \"%s\"' % (oldfile, newfile))\n\n  os.remove(oldfile)\n  os.remove(newfile)\n\n  diff = diff.split('\\n')\n  if len(diff) > 2:\n    # fix filenames\n    diff[0] = diff[0].replace(oldfile, 'a/%s' % filename)\n    diff[1] = diff[1].replace(newfile, 'b/%s' % filename)\n    print('\\n'.join(diff), file=sys.stderr)\n\ndef output_file(filename, lines):\n  if filename == '-':\n    print(lines, end='')\n  else:\n    with open(filename, 'w') as file:\n      print(lines, end='', file=file)\n\ndef show_summary(filename, changed):\n  print()\n  if not filename:\n    print('Summary of changes', file=sys.stderr)\n  else:\n    print('Summary of changes [%s]' % filename, file=sys.stderr)\n  print('==================', file=sys.stderr)\n  print('Appends   : %4d' % changed['appends'], file=sys.stderr)\n  print('Braces    : %4d' % changed['braces'], file=sys.stderr)\n  print('Backticks : %4d' % changed['backticks'], file=sys.stderr)\n  print('Semicolons: %4d' % changed['semicolons'], file=sys.stderr)\n\n#---------------------------------------------\nparser = argparse.ArgumentParser(description='Update build system shell-script source ' \\\n                                             'code to comply with LibreELEC coding standards.\\n\\n' \\\n                                             'Should work with package.mk, and other build system shell ' \\\n                                             'scripts (scripts/*, config/* etc.).\\n\\n' \\\n                                             'WARNING: May produce unusable results when run on ' \\\n                                             'non-shell script code!', \\\n                                 formatter_class=argparse.RawDescriptionHelpFormatter)\n\nparser.add_argument('-f', '--filename', nargs='+', metavar='FILENAME', required=False, \\\n                    help='Filename to be read. If not supplied, read from stdin.')\n\ngroup = parser.add_mutually_exclusive_group()\ngroup.add_argument('-o', '--output', metavar='FILENAME', required=False, \\\n                    help='Optional filename into which output will be written. ' \\\n                         'Use - for stdout. Not valid with more than one input, or --write.')\n\ngroup.add_argument('-w', '--write', action='store_true', \\\n                    help='Overwrite --filename with changes. Default is not to overwrite. ' \\\n                         'Not valid if --output is specified, or reading from stdin.')\nparser.add_argument('-d', '--diff', action='store_true', \\\n                    help='Output diff of changes to stderr (diff -Naur).')\n\ngroup = parser.add_mutually_exclusive_group()\ngroup.add_argument('-q', '--quiet', action='store_true', help='Disable summary.')\ngroup.add_argument('-Q', '--dirty', action='store_true', help='Output summary only for modified files.')\n\nparser.add_argument('-xa', '--no-appends', action='store_true', help='Disable \"append\" (+=) conversion.')\n\nparser.add_argument('-xb', '--no-braces', action='store_true', help='Disable \"brace\" ({}) addition.')\n\nparser.add_argument('-xs', '--no-semicolons', action='store_true', help='Disable \"semicolon squeezing\" ( ;/;).')\n\nparser.add_argument('-xt', '--no-backticks', action='store_true', help='Disable \"backtick\" (``/$()) replacement.')\n\nargs = parser.parse_args()\n\nif __name__ == '__main__':\n  process_args(args)\n"
  },
  {
    "path": "tools/mkpkg/mkpkg_bcm2835-driver",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\necho \"getting sources...\"\n  if [ ! -d bcm2835-driver.git ]; then\n    git clone git://github.com/raspberrypi/firmware.git --depth=1 -b master bcm2835-driver.git\n  fi\n\n  cd bcm2835-driver.git\n    git pull\n    GIT_REV=`git log -n1 --format=%H`\n  cd ..\n\necho \"copying sources...\"\n  rm -rf bcm2835-driver-$GIT_REV\n  cp -R bcm2835-driver.git bcm2835-driver-$GIT_REV\n\n  rm -rf bcm2835-bootloader-$GIT_REV\n  cp -R bcm2835-driver.git/boot bcm2835-bootloader-$GIT_REV\n\necho \"cleaning sources...\"\n  rm -rf bcm2835-driver-$GIT_REV/.git\n  mkdir bcm2835-driver-$GIT_REV/softfp\n  mv bcm2835-driver-$GIT_REV/opt bcm2835-driver-$GIT_REV/softfp\n  rm -rf bcm2835-driver-$GIT_REV/*/opt/vc/src\n  rm -rf bcm2835-driver-$GIT_REV/debug\n  rm -rf bcm2835-driver-$GIT_REV/extra\n  rm -rf bcm2835-driver-$GIT_REV/modules\n  rm -rf bcm2835-driver-$GIT_REV/cutdown\n  rm -rf bcm2835-driver-$GIT_REV/boot\n\n  chmod 644 bcm2835-driver-$GIT_REV/*/opt/vc/include/bcm_host.h\n\n  rm -rf bcm2835-bootloader-$GIT_REV/kernel*.img\n\necho \"packing sources...\"\n  tar cvJf bcm2835-driver-$GIT_REV.tar.xz bcm2835-driver-$GIT_REV\n  tar cvJf bcm2835-bootloader-$GIT_REV.tar.xz bcm2835-bootloader-$GIT_REV\n\necho \"remove temporary sourcedir...\"\n  rm -rf bcm2835-driver-$GIT_REV\n  rm -rf bcm2835-bootloader-$GIT_REV\n"
  },
  {
    "path": "tools/mkpkg/mkpkg_boblightd",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n\necho \"getting sources...\"\n  svn checkout http://boblight.googlecode.com/svn/trunk/ boblightd-latest\n\necho \"getting version...\"\n  cd boblightd-latest\n    SVN_REV=`LANG=C svn info 2>/dev/null | grep Revision: | sed -e 's/.*\\: //'`\n    echo $SVN_REV\n  cd ..\n\necho \"copying sources...\"\n  rm -rf boblightd-$SVN_REV\n  cp -R boblightd-latest boblightd-$SVN_REV\n\n#echo \"cleaning sources...\"\n  find boblightd-$SVN_REV -name \".svn\" -exec rm -rf {} \\; 2>/dev/null\n\necho \"packing sources...\"\n  tar cvJf boblightd-$SVN_REV.tar.xz boblightd-$SVN_REV\n\necho \"remove temporary sourcedir...\"\n  rm -rf boblightd-$SVN_REV\n"
  },
  {
    "path": "tools/mkpkg/mkpkg_libcec",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\necho \"getting sources...\"\n  if [ ! -d libcec.git ]; then\n    git clone --depth=1 https://github.com/Pulse-Eight/libcec.git libcec.git\n  fi\n\n  cd libcec.git\n    git pull\n    GIT_REV=`git log -n1 --format=%H`\n  cd ..\n\necho \"copying sources...\"\n  rm -rf libcec-$GIT_REV\n  cp -R libcec.git libcec-$GIT_REV\n\necho \"cleaning sources...\"\n  rm -rf libcec-$GIT_REV/.git\n\necho \"packing sources...\"\n  tar cvJf libcec-$GIT_REV.tar.xz libcec-$GIT_REV\n\necho \"remove temporary sourcedir...\"\n  rm -rf libcec-$GIT_REV\n"
  },
  {
    "path": "tools/mkpkg/mkpkg_media_build",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n# set media_build version you want to use\nif [ -z \"$1\" ]; then\n  MEDIA_BUILD_HASH=\"master\"\nelse\n  MEDIA_BUILD_HASH=\"$1\"\nfi\n\n# name of the package\nDVB_MKPKG_FOLDER=\"$(pwd)\"\n\n# remove old files\necho \"removing old sources ...\"\nrm -rf media_build*/\nrm -rf media_tree/\n\n################################################################################\n\n# media_build dl\necho \"getting media_build sources ...\"\n\nif [ ! -d media_build.git ]; then\n  git clone https://bitbucket.org/CrazyCat/media_build.git media_build/\nfi\n\n#get log\ncd media_build/\n  git pull\n  git checkout $MEDIA_BUILD_HASH\n  GIT_LOG_MEDIA_BUILD=`git log --pretty=oneline -n1`\n\ncd $DVB_MKPKG_FOLDER/\n\n# media_tree dl\necho \"getting sources ...\"\n  if [ ! -d linux_media.git ]; then\n    git clone --depth=1 https://bitbucket.org/CrazyCat/linux_media.git -b latest media_tree\n  fi\n\n#get log\ncd media_tree/\n  git pull\n  GIT_LOG_MEDIA_TREE=`git log --pretty=oneline -n1`\n  GIT_REV=`git log -n1 --pretty=format:\"%ad\" --date=short`\n\ncd $DVB_MKPKG_FOLDER/\n\n################################################################################\n\n# collecting files from media_tree\necho \"create media_tree tar\"\ncd media_build/linux\nmake tar DIR=\"$DVB_MKPKG_FOLDER/media_tree/\"\n\ncd $DVB_MKPKG_FOLDER\n\n# cleanup\nrm -rf media_tree/\nrm -rf media_build/.git/\n\n# log used versions into LE_versions\necho \"package include: \\n\\nmedia_build:\\n$GIT_LOG_MEDIA_BUILD \\n\\nmedia_tree:\\n$GIT_LOG_MEDIA_TREE \\n\" > media_build/LE_versions\n\n# rename buildfolder\nmv media_build/ media_build-$GIT_REV/\n\n################################################################################\n\n# pack sources\necho \"packing sources ...\"\ntar cvJf media_build-$GIT_REV.tar.xz media_build-$GIT_REV\n\necho \"remove temporary sourcedir ...\"\nrm -rf media_build-$GIT_REV\n"
  },
  {
    "path": "tools/mkpkg/mkpkg_pvr",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n# set media_build version you want to use\nif [ -z \"$1\" ]; then\n  echo \"Usage: $0 crazycat | tbs\"\n  exit 0\nelse\n  MEDIA_BUILD_PROJECT=\"$1\"  \nfi\n\n# name of the package\nDVB_MKPKG_FOLDER=\"$(pwd)\"\n\n# crazycat\nif [ \"$MEDIA_BUILD_PROJECT\" = \"crazycat\" ]; then\n  MEDIA_BUILD_URL=\"https://github.com/crazycat69/media_build.git\"\n  MEDIA_TREE_URL=\"https://github.com/crazycat69/linux_media.git\"\n  MEDIA_TREE_BRANCH=\"latest\"\n  MEDIA_BUILD_NAME=\"crazycat\"\n\n# tbs oss\nelif [ \"$MEDIA_BUILD_PROJECT\" = \"tbs\" ]; then\n  MEDIA_BUILD_URL=\"https://github.com/tbsdtv/media_build.git\"\n  MEDIA_TREE_URL=\"https://github.com/tbsdtv/linux_media.git\"\n  MEDIA_TREE_BRANCH=\"latest\"\n  MEDIA_BUILD_NAME=\"tbs\"\n\n# exit\nelse\n  echo \"exit: no valid project\"\n  exit 0\nfi\n\n# remove old files\necho \"removing old sources ...\"\nrm -rf $MEDIA_BUILD_NAME*/\n\n################################################################################\n\n# media_build dl\n\necho \"getting media_build sources ...\"\n\nif [ ! -d media_build.git ]; then\n  git clone $MEDIA_BUILD_URL media_build/\nfi\n\n#get log\ncd media_build/\n  git pull\n  git checkout $MEDIA_BUILD_HASH\n  GIT_LOG_MEDIA_BUILD=`git log --pretty=oneline -n1`\n\ncd $DVB_MKPKG_FOLDER/\n\n# media_tree dl\necho \"getting sources ...\"\n  if [ ! -d linux_media.git ]; then\n    git clone --depth=1 $MEDIA_TREE_URL -b $MEDIA_TREE_BRANCH media_tree\n  fi\n\n#get log\ncd media_tree/\n  git pull\n  GIT_LOG_MEDIA_TREE=`git log --pretty=oneline -n1`\n  GIT_REV=`git log -n1 --pretty=format:\"%ad\" --date=short`\n\n# hack/workaround for borked upstream kernel/media_build\n# without removing atomisp there a lot additional includes that \n# slowdown build process after modpost from 3min to 6min\n# even if atomisp is disabled via kernel.conf\n  rm -rf drivers/staging/media/atomisp\n  sed -i 's|^.*drivers/staging/media/atomisp.*$||' $DVB_MKPKG_FOLDER/media_tree/drivers/staging/media/Kconfig\n  \ncd $DVB_MKPKG_FOLDER/\n\n################################################################################\n\n# collecting files from media_tree\necho \"create media_tree tar\"\ncd media_build/linux\nmake tar DIR=\"$DVB_MKPKG_FOLDER/media_tree/\"\n\ncd $DVB_MKPKG_FOLDER \n\n# cleanup\nrm -rf media_tree/ \nrm -rf media_build/.git/\n\n# rename buildfolder\nmv media_build/ $MEDIA_BUILD_NAME-$GIT_REV/\n\n# log used versions into LE_versions\necho \"package include: $MEDIA_BUILD_NAME\\n\nmedia_build commit: $GIT_LOG_MEDIA_BUILD\nmedia_build url: $MEDIA_BUILD_URL\n\\n\nmedia_tree commit: $GIT_LOG_MEDIA_TREE\nmedia_tree url: $MEDIA_TREE_URL\n\\n\npackage date: $(date +%F_%H:%M:%S)\" > $MEDIA_BUILD_NAME-$GIT_REV/LE_versions\n\n################################################################################\n\n# pack sources\necho \"packing sources ...\"\ntar cvJf $MEDIA_BUILD_NAME-$GIT_REV.tar.xz $MEDIA_BUILD_NAME-$GIT_REV\n\necho \"remove temporary sourcedir ...\"\nrm -rf $MEDIA_BUILD_NAME-$GIT_REV\n"
  },
  {
    "path": "tools/mkpkg/mkpkg_rtmpdump",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\necho \"getting sources...\"\n  if [ ! -d rtmpdump.git ]; then\n    git clone git://git.ffmpeg.org/rtmpdump rtmpdump.git\n  fi\n\n  cd rtmpdump.git\n    git pull\n    GIT_REV=`git log -n1 --format=%H`\n  cd ..\n\necho \"copying sources...\"\n  rm -rf rtmpdump-$GIT_REV\n  cp -R rtmpdump.git rtmpdump-$GIT_REV\n\necho \"cleaning sources...\"\n  rm -rf rtmpdump-$GIT_REV/.git\n\necho \"packing sources...\"\n  tar cvJf rtmpdump-$GIT_REV.tar.xz rtmpdump-$GIT_REV\n\necho \"remove temporary sourcedir...\"\n  rm -rf rtmpdump-$GIT_REV\n"
  },
  {
    "path": "tools/mkpkg/mkpkg_vboxguest",
    "content": "#!/bin/sh\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\n# the script uses 7z to extract the iso to avoid root \n# sudo apt-get install p7zip-full\n\n# set version you want to use\nif [ -z \"$1\" ]; then\n  echo \"Usage: $0 5.0.123\"\n  exit 0\nfi\n\nVBOX_VERSION=\"$1\"\n\necho \"getting sources...\"\n  mkdir vbox && cd vbox/\n  wget http://download.virtualbox.org/virtualbox/${VBOX_VERSION}/VBoxGuestAdditions_${VBOX_VERSION}.iso\n\necho \"extracting iso...\"\n  7z e VBoxGuestAdditions_${VBOX_VERSION}.iso VBoxLinuxAdditions.run -r\n  chmod 0755 VBoxLinuxAdditions.run\n\necho \"extract VBoxLinuxAdditions.run...\"\n  ./VBoxLinuxAdditions.run --tar xf\n\necho \"extract VBoxGuestAdditions-amd64...\"\n  mkdir xf86-video-virtualbox-${VBOX_VERSION} \n  tar -jxvf VBoxGuestAdditions-amd64.tar.bz2 -C xf86-video-virtualbox-${VBOX_VERSION}/\n\necho \"packing sources...\"\n  tar cvJf xf86-video-virtualbox-${VBOX_VERSION}.tar.xz xf86-video-virtualbox-${VBOX_VERSION}\n  mv xf86-video-virtualbox-${VBOX_VERSION}.tar.xz ../xf86-video-virtualbox-${VBOX_VERSION}.tar.xz\n\necho \"remove temporary sourcedir...\"\n  cd ..  \n  rm -rf vbox/\n"
  },
  {
    "path": "tools/mkpkg/update_adafruit-libraries",
    "content": "#!/bin/bash -e\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)\n\n# set defaults\nGIT_USERNAME=\"\"\nGIT_PASSWORD=\"\"\n\n# Source in GIT_USERNAME and GIT_PASSWORD to avoid API limitations\n[ -f ~/.git.conf ] && source ~/.git.conf\n\n# set http login for curl\nCURL_LOGIN=\"\"\nif [ ! -z \"$GIT_USERNAME\" -a ! -z \"$GIT_PASSWORD\" ]; then\n  CURL_LOGIN=\"--user $GIT_USERNAME:$GIT_PASSWORD\"\nfi\n\n# get the realpath to LE Root\nROOT=$(realpath $(dirname $(realpath $0))/../../)\ncd \"$ROOT\"\n\n# make tmp dir\nmkdir -p $ROOT/mkpkg-temp/adafruit\n\n# load adafruit-libraries settings\n. config/options adafruit-libraries\n\n# iterate over all depend packages and try update\nADAFRUIT_PACKAGES=$PKG_DEPENDS_TARGET\nCHANGED=\"\"\nfor PKG in $ADAFRUIT_PACKAGES; do\n  echo -n \"check: $PKG... \"\n  . config/options $PKG\n  \n  # filter out, all non github packages\n  if [[ $PKG_URL != https://github.com/* ]]; then\n    echo \"ignore, not on github\"\n    continue\n  fi\n  \n  # get new hash from master branch\n  URL=$(sed \"s|\\(www\\.\\)*github.com/|api.github.com/repos/|;s|/archive/.*|/commits/master|\" <<< $PKG_URL)\n  GIT_HASH=$(curl --silent --header \"Accept: application/vnd.github.v3.sha\" $CURL_LOGIN $URL)\n  \n  # check rate limit\n  if [[ \"$GIT_HASH\" == *rate\\ limit* ]]; then\n    echo \"abort, rate limit of api reached. try later or use your github account\"\n    exit 1\n  fi\n  \n  # compare hash\n  if [ $PKG_VERSION == $GIT_HASH ]; then\n    echo \"unchanged\"\n    continue\n  fi\n\n  # replace old with new hash\n  sed \"s|^PKG_VERSION=.*$|PKG_VERSION=\\\"${GIT_HASH}\\\"|\" -i ${PKG_DIR}/package.mk\n  echo -n \"updated to $GIT_HASH \"\n  \n  CHANGED=\"${CHANGED}#$PKG_SHORTDESC\"\n\n  # get new package\n  . config/options $PKG\n  TMP_FILE=$ROOT/mkpkg-temp/adafruit/pkg\n  wget --timeout=30 --tries=3 --passive-ftp --no-check-certificate -c -q -O $TMP_FILE $PKG_URL\n  \n  # calc new sha256 and replace the old\n  NEW_SHA256=\"$(sha256sum $TMP_FILE | cut -d\" \" -f1)\"\n  sed \"s|^PKG_SHA256=.*$|PKG_SHA256=\\\"${NEW_SHA256}\\\"|\" -i ${PKG_DIR}/package.mk\n  echo \"(sha: ${NEW_SHA256})\"\n  \n  # remove tmp download\n  rm -f $TMP_FILE\ndone\n\n# prepare revision and changelog\n. config/options adafruit-libraries\nif [ ! -z \"$CHANGED\" ]; then\n  # revision\n  REV=$(( $PKG_REV + 1 ))\n  echo \"increase revision $PKG_REV -> $REV\"\n  sed \"s|^PKG_REV=.*$|PKG_REV=\\\"${REV}\\\"|\" -i ${PKG_DIR}/package.mk\n  \n  # changelog\n  echo -en \"${REV}\\n  updated libraries:\" > ${PKG_DIR}/changelog.txt.new\n  sed \"s|#|\\n  - |g\" <<< ${CHANGED} >> ${PKG_DIR}/changelog.txt.new\n  echo \"\" >> ${PKG_DIR}/changelog.txt.new\n  cat ${PKG_DIR}/changelog.txt >> ${PKG_DIR}/changelog.txt.new\n  mv ${PKG_DIR}/changelog.txt.new ${PKG_DIR}/changelog.txt\nfi  \n\n# cleanup temp\nrm -rf $ROOT/mkpkg-temp/adafruit\n"
  },
  {
    "path": "tools/mkpkg/update_binary-addons",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nBUMP_PKG_REV=\"\"\nKEEP_GIT_DIRS=\"yes\"\n\nusage() {\n  echo \"Usage: $0 [options] <kodi-branch> [<unofficial-addon-branch>]\"\n  echo \" -b, --bump-pkg-rev: bump PKG_REV if package was not updated\"\n  echo \" -d, --delete-git-dirs: delete cloned git dirs after update\"\n  echo \" -h, --help: display help and exit\"\n  exit 1\n}\n\nwhile [ $# -ne 0 ]; do\n  case \"$1\" in\n  -b|--bump-pkg-rev)\n    BUMP_PKG_REV=\"yes\"\n    shift\n    ;;\n  -d|--delete-git-dirs)\n    KEEP_GIT_DIRS=\"\"\n    shift\n    ;;\n  -h|--help)\n    usage\n    exit 1\n    ;;\n  -*)\n    echo \"illegal option $1\"\n    usage\n    exit 1\n    ;;\n  *)\n    break\n    ;;\n  esac\ndone\n\nif [ $# -eq 0 -o $# -gt 2 ]; then\n  usage\n  exit 1\nfi\n\n# list of packages to exclude from update\nEXCLUDED_PACKAGES=\"vfs.sacd\"\n\nMY_DIR=\"$(dirname \"$0\")\"\nROOT=\"$(cd \"${MY_DIR}\"/../.. && pwd)\"\nTMPDIR=\"$(pwd)/.update-binary-addons-tmp\"\nTMP_PKG_FILE=\"${TMPDIR}/package.tar.gz\"\nTMP_PKG_DIR=\"${TMPDIR}/package\"\n\nrm -rf \"${TMPDIR}\"\nmkdir -p \"${TMPDIR}\"\n\nKODI_BRANCH=\"$1\"\nKODI_DIR=\"kodi.git\"\n\nif [ $# -eq 1 ]; then\n  UNOFFICIAL_ADDON_BRANCH=\"${KODI_BRANCH}\"\nelse\n  UNOFFICIAL_ADDON_BRANCH=\"$2\"\nfi\n\n. \"${MY_DIR}/update_common_functions\"\n\nget_gh_token\n\nif [ -z \"${GITHUB_API_TOKEN}\" ]; then\n  git_clone https://github.com/xbmc/xbmc ${KODI_DIR} ${KODI_BRANCH}\n  ADDONS_REPO_LOCATION=\"${KODI_DIR}/cmake/addons/bootstrap/repositories\"\nelse\n  # check if depends are available\n  command -v curl >/dev/null 2>&1 || die \"please install curl\"\n  command -v jq >/dev/null 2>&1 || die \"please install jq\"\n\n  TMP_REPO_DIR=\"${TMPDIR}/bootstrap-repos\"\n\n  curl -s -L -H \"Authorization: token ${GITHUB_API_TOKEN}\" \\\n    \"https://api.github.com/repos/xbmc/xbmc/contents/cmake/addons/bootstrap/repositories?ref=${KODI_BRANCH}\" | awk \\\n    '/download_url/ { gsub(\"\\\"|,\", \"\", $2); system(\"mkdir -p '${TMP_REPO_DIR}'; (cd '${TMP_REPO_DIR}'; curl -O \"$2\")\"); }' \\\n    2>/dev/null\n  ADDONS_REPO_LOCATION=${TMP_REPO_DIR}\nfi\n\nif ! ls ${ADDONS_REPO_LOCATION}/*-addons.txt &> /dev/null; then\n   echo \"No binary addon repo description found, nothing to do!\"\n   echo \"Path searched: ${ADDONS_REPO_LOCATION}\"\n   exit 0\nfi\n\n# addons\nfor addontxt in ${ADDONS_REPO_LOCATION}/*-addons.txt ; do\n  ADDONS=$(cat $addontxt | awk '{print $1}')\n  ADDONS_GIT_DIR=\"${ADDONS}.git\"\n  ADDONS_GIT_REPO=$(cat $addontxt | awk '{print $2}')\n  ADDONS_GIT_BRANCH=$(cat $addontxt | awk '{print $3}')\n  git_clone $ADDONS_GIT_REPO $ADDONS_GIT_DIR ${ADDONS_GIT_BRANCH}\n\n  for addon in $ADDONS_GIT_DIR/*.*/ ; do\n    ADDON=$(basename $addon)\n\n    [[ ${ADDON} =~ ^game.* ]] && continue # ignore game.* addons - handled by update_retroplayer-addons\n\n    check_package_excluded \"${ADDON}\" \"${EXCLUDED_PACKAGES}\" && continue\n\n    GIT_DIR=\"${ADDON}.git\"\n    GIT_REPO=$(cat ${addon}/${ADDON}.txt | awk '{print $2}')\n    GIT_BRANCH=$(cat ${addon}/${ADDON}.txt | awk '{print $3}')\n\n    if ! grep -q all ${addon}/platforms.txt && ! grep -q linux ${addon}/platforms.txt && ! grep -q ! ${addon}/platforms.txt; then\n      continue\n    fi\n\n    ADDON_PATH=\"${ROOT}/packages/mediacenter/kodi-binary-addons/${ADDON}/\"\n    if [ -f \"${ADDON_PATH}/package.mk\" ] ; then\n      # Verify the Kodi repo matches our package repo\n      # If different, ignore the addon and process it later as an \"unofficial\" addon\n      validate_pkg_url \"${ADDON}\" \"${GIT_REPO}\" || continue\n\n      NO_TAG=\"\"\n      if [ -z \"${GITHUB_API_TOKEN}\" ]; then\n        git_clone ${GIT_REPO} ${GIT_DIR} ${GIT_BRANCH}\n        PARAMS=\"resolve_tag_in_branch ${GIT_DIR} ${GIT_BRANCH}\"\n      else\n        REPO=$(basename \"${GIT_REPO}\")\n        OWNER=$(basename \"${GIT_REPO%/${REPO}*}\")\n        PARAMS=\"resolve_tag_on_gh ${OWNER} ${REPO} ${GIT_BRANCH}\"\n      fi\n      NEW_VERSION=$(${PARAMS})\n\n      if [ -z \"${NEW_VERSION}\" ]; then\n        NO_TAG=\"yes\"\n        echo \"========================================================================\"\n        msg_warn \"WARNING: no tag found for addon ${ADDON}, falling back to HEAD\"\n        echo \"========================================================================\"\n        if [ -z \"${GITHUB_API_TOKEN}\" ]; then\n          PARAMS=\"resolve_hash_in_branch ${GIT_DIR} ${GIT_BRANCH}\"\n        else\n          PARAMS=\"resolve_hash_on_gh ${GIT_REPO} ${GIT_BRANCH}\"\n        fi\n        NEW_VERSION=$(${PARAMS})\n      fi\n\n      echo \"Resolved version for ${ADDON}: ${GIT_BRANCH} => ${NEW_VERSION}\"\n\n      if update_pkg \"${ADDON_PATH}\" ${ADDON} ${NEW_VERSION}; then\n        if [ -n \"${NO_TAG}\" ]; then\n          # always bump PKG_REV on updates as we have no info if version changed\n          bump_pkg_rev \"${ADDON_PATH}\" \"${ADDON}\"\n        else\n          reset_pkg_rev \"${ADDON_PATH}\" \"${ADDON}\"\n        fi\n      else\n        [ \"${BUMP_PKG_REV}\" = \"yes\" ] && bump_pkg_rev \"${ADDON_PATH}\" \"${ADDON}\"\n      fi\n\n      if [ \"${KEEP_GIT_DIRS}\" != \"yes\" ]; then\n        [ -d \"${GIT_DIR}\" ] && rm -rf \"${GIT_DIR}\"\n      fi\n    else\n      echo \"[mkpkg] Skipped $ADDON\"\n      SKIPPED_ADDONS=\"$SKIPPED_ADDONS $ADDON\"\n    fi\n    PROCESSED=\"${PROCESSED}${ADDON}\\n\"\n  done\n\n  if [ \"${KEEP_GIT_DIRS}\" != \"yes\" ]; then\n    [ -d \"${ADDONS_GIT_DIR}\" ] && rm -rf \"${ADDONS_GIT_DIR}\"\n  fi\n\n  echo\n  echo \"The following addons were skipped, please add packages for these addons:\"\n  echo \"[${SKIPPED_ADDONS}]\"\n  echo\ndone\n\n# finally, any other unofficial addons\nfor ADDON in $(ls -1 \"${ROOT}/packages/mediacenter/kodi-binary-addons\"); do\n  [[ ${ADDON} =~ ^game.* ]] && continue # ignore game.* addons - handled by update_retroplayer-addons\n\n  # ignore already processed addons\n  echo -e \"${PROCESSED}\" | grep -qE \"^${ADDON}$\" && continue\n\n  check_package_excluded \"${ADDON}\" \"${EXCLUDED_PACKAGES}\" && continue\n\n  ADDON_PATH=\"${ROOT}/packages/mediacenter/kodi-binary-addons/${ADDON}/\"\n  # Obtain git url - ignore if not a suitable repo\n  GIT_DIR=\"${ADDON}.git\"\n  GIT_REPO=\"$(geturl \"${ADDON}\")\" || continue\n\n  if [ -z \"${GITHUB_API_TOKEN}\" ]; then\n    git_clone ${GIT_REPO} ${GIT_DIR}\n    RESOLVE_UNOFFICIAL_BRANCH=\"resolve_hash_in_branch ${ADDON}.git ${UNOFFICIAL_ADDON_BRANCH}\"\n    RESOLVE_HEAD=\"resolve_hash_in_branch ${ADDON}.git HEAD\"\n  else\n    RESOLVE_UNOFFICIAL_BRANCH=\"resolve_hash_on_gh ${GIT_REPO%.git} ${UNOFFICIAL_ADDON_BRANCH}\"\n    RESOLVE_HEAD=\"resolve_hash_on_gh ${GIT_REPO%.git} HEAD\"\n  fi\n\n  if RESOLVED_HASH=$(${RESOLVE_UNOFFICIAL_BRANCH}); then\n    echo \"Resolved hash for ${ADDON}: ${UNOFFICIAL_ADDON_BRANCH} => ${RESOLVED_HASH}\"\n  elif RESOLVED_HASH=$(${RESOLVE_HEAD}); then\n    echo \"Resolved hash for ${ADDON}: HEAD => ${RESOLVED_HASH}\"\n  else\n    msg_warn \"WARNING: Could not resolve hash for ${ADDON}\"\n    continue\n  fi\n\n  if update_pkg \"${ADDON_PATH}\" \"${ADDON}\" \"${RESOLVED_HASH}\"; then\n    # always bump PKG_REV when updating untagged addons\n    bump_pkg_rev \"${ADDON_PATH}\" \"${ADDON}\"\n  else\n    [ \"${BUMP_PKG_REV}\" = \"yes\" ] && bump_pkg_rev \"${ADDON_PATH}\" \"${ADDON}\"\n  fi\n\n  if [ \"${KEEP_GIT_DIRS}\" != \"yes\" ]; then\n    [ -d \"${GIT_DIR}\" ] && rm -rf ${GIT_DIR}\n  fi\ndone\n\nrm -rf \"${TMPDIR}\"\n\n[ -d \"${TMP_REPO_DIR}\" ] && rm -rf \"${TMP_REPO_DIR}\"\n"
  },
  {
    "path": "tools/mkpkg/update_common_functions",
    "content": "# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nmsg_color() {\n  echo $(\n    cd \"${ROOT}\"\n    PROJECT=\"${PROJECT:-Generic}\" ARCH=\"${ARCH:-x86_64}\" . config/options \"\"\n    echo $(print_color \"$1\" \"$2\")\n  )\n}\n\nmsg_warn() {\n  msg_color CLR_WARNING \"$1\"\n}\n\nmsg_error() {\n  msg_color CLR_ERROR \"$1\"\n}\n\nmsg_info() {\n  echo \"$1\"\n}\n\ngit_clone() {\n  # git_clone https://repo.url target_dir [branch]\n  echo \"[mkpkg] Checking out $1 ...\"\n  if [ ! -d \"$2\" ]; then\n    git clone \"$1\" \"$2\"\n  else\n    cd \"$2\"\n    git fetch\n    cd ..\n  fi\n  if [ -n \"$3\" ]; then\n    cd \"$2\"\n    git checkout -q origin/\"$3\";\n    cd ..\n  fi\n}\n\nget_pkg_var() {\n  local pkg_name=\"$1\" pkg_var=\"$2\"\n  cd \"${ROOT}\"\n  PROJECT=\"${PROJECT:-Generic}\" ARCH=\"${ARCH:-x86_64}\" source config/options \"${pkg_name}\" &>/dev/null\n  echo \"${!pkg_var}\"\n}\n\nresolve_hash() {\n  if [ -d \"$1\" ] ; then\n    cd \"$1\"\n    git rev-parse \"$2\" 2>/dev/null\n  fi\n}\n\nresolve_hash_in_branch() {\n  if [ -d \"$1\" ] ; then\n    cd \"$1\"\n    git rev-parse \"origin/$2\" 2>/dev/null\n  fi\n}\n\nresolve_hash_on_gh() {\n  curl -s -L -H \"Authorization: token ${GITHUB_API_TOKEN}\" \\\n    -H \"Accept: application/vnd.github.VERSION.sha\" \\\n    \"${1/*github.com/https:\\/\\/api.github.com\\/repos}/commits/$2\"\n}\n\nresolve_tag_in_branch() {\n  local tag tags\n  if [ -d \"$1\" ] ; then\n    cd \"$1\"\n    tag=$(git describe --abbrev=0 --tags \"origin/$2\" 2>/dev/null)\n    if [ -z \"${tag}\" ]; then\n      return\n    fi\n    tags=( $(git tag --points-at \"${tag}\" | sort -r -n) )\n    if [ $# -eq 3 -a ${#tags[@]} -gt 1 ]; then\n      for tag in \"${tags[@]}\"; do\n        if [[ \"${tag}\" =~ $3 ]]; then\n          echo \"$tag\"\n          return\n        fi\n      done\n    fi\n    echo \"${tags[0]}\"\n  fi\n}\n\nresolve_tag_on_gh() {\n  local tag\n\n  local QUERY=$(tr '\\n' ' ' <<EOF\n{\n  repository(owner: \\\\\"${1}\\\\\", name: \\\\\"${2}\\\\\") {\n    refs(refPrefix: \\\\\"refs/tags/\\\\\", first: 100, orderBy: {field: TAG_COMMIT_DATE, direction: DESC}) {\n      edges {\n        node {\n          name\n       }\n      }\n    }\n  }\n}\nEOF\n)\n\n  tag=$(curl -s -L -H 'Content-Type: application/json' \\\n          -H \"Authorization: bearer ${GITHUB_API_TOKEN}\" \\\n          -X POST -d \"{ \\\"query\\\": \\\"${QUERY}\\\" }\" https://api.github.com/graphql | \\\n          jq -r '[.data.repository.refs.edges[] | select(.node.name | contains(\"'${3}'\"))][0].node.name | select (.!=null)')\n\n  echo \"${tag}\"\n}\n\ncheck_package_excluded() {\n  local package=\"$1\" packages_to_exclude=\"$2\" pkg\n  [ -z \"${package}\" -o -z \"${packages_to_exclude}\" ] && return 1\n  if [[ ${packages_to_exclude} =~ (^|[[:space:]])${package}($|[[:space:]]) ]]; then\n    msg_info \"SKIPPING excluded package ${package}\"\n    return 0\n  fi\n  return 1\n}\n\n# args: path var value\nset_pkg_var() {\n  local package_mk=\"$1/package.mk\" pkg_var=\"$2\" pkg_value=\"$3\"\n  sed -e \"s|${pkg_var}=.*|${pkg_var}=\\\"${pkg_value}\\\"|\" -i \"${package_mk}\"\n}\n\nset_pkg_version() {\n  set_pkg_var \"$1\" \"PKG_VERSION\" \"$2\"\n}\n\ndownload_pkg_file() {\n  local pkg_name=\"$1\"\n  local pkg_url=$(get_pkg_var \"${pkg_name}\" PKG_URL)\n  wget -q -O \"${TMP_PKG_FILE}\" \"${pkg_url}\"\n}\n\nextract_pkg_file() {\n  mkdir -p \"${TMP_PKG_DIR}\"\n  tar xf \"${TMP_PKG_FILE}\" --strip-components=1 -C \"${TMP_PKG_DIR}\"\n}\n\ncleanup_pkg_tmp() {\n  rm -rf \"${TMP_PKG_FILE}\" \"${TMP_PKG_DIR}\"\n}\n\nset_pkg_sha256() {\n  local new_sha256=$(sha256sum < \"${TMP_PKG_FILE}\" | awk '{print $1}')\n  set_pkg_var \"$1\" \"PKG_SHA256\" \"${new_sha256}\"\n}\n\nbump_pkg_rev() {\n  local pkg_name=\"$2\"\n  local pkg_rev=$(get_pkg_var \"${pkg_name}\" PKG_REV)\n  local new_pkg_rev=$((pkg_rev+1))\n  set_pkg_var \"$1\" \"PKG_REV\" \"${new_pkg_rev}\"\n\n  msg_info \"BUMPED ${pkg_name} PKG_REV from ${pkg_rev} to ${new_pkg_rev}\"\n}\n\nreset_pkg_rev() {\n  local pkg_name=\"$2\"\n  local pkg_rev=$(get_pkg_var \"${pkg_name}\" PKG_REV)\n  local new_pkg_rev=\"1\"\n  set_pkg_var \"$1\" \"PKG_REV\" \"${new_pkg_rev}\"\n\n  msg_info \"RESET ${pkg_name} PKG_REV from ${pkg_rev} to ${new_pkg_rev}\"\n}\n\nupdate_pkg() {\n  local pkg_path=\"$1\" pkg_name=\"$2\" pkg_version=\"$3\"\n\n  local old_version pkg_url new_sha256 pkg_rev\n\n  old_version=$(get_pkg_var \"${pkg_name}\" PKG_VERSION)\n\n  if [ \"${old_version}\" != \"${pkg_version}\" ]; then\n    [ -n \"${pkg_version}\" ] && set_pkg_version \"${pkg_path}\" \"${pkg_version}\"\n\n    download_pkg_file \"${pkg_name}\"\n    set_pkg_sha256 \"${pkg_path}\"\n\n    msg_info \"UPDATED ${pkg_name} from ${old_version} to ${pkg_version}\"\n\n    return 0\n  else\n    return 1\n  fi\n}\n\nupdate_pkg_and_url() {\n  local pkg_path=\"$1\" pkg_name=\"$2\" pkg_version=\"$3\" pkg_url=\"$4\"\n  local old_version old_url new_sha256\n  local changed=0\n\n  old_url=$(grep \"^PKG_URL=\" \"${pkg_path}/package.mk\" | sed -e 's|^PKG_URL=\"||' -e 's|\"$||')\n\n  if [ \"${old_url}\" != \"${pkg_url}\" ]; then\n    set_pkg_var \"${pkg_path}\" \"PKG_URL\" \"${pkg_url}\"\n    msg_info \"CHANGED ${pkg_name} PKG_URL from ${old_url} to ${pkg_url}\"\n    changed=1\n  fi\n\n  old_version=$(get_pkg_var \"${pkg_name}\" PKG_VERSION)\n\n  if [ \"${old_version}\" != \"${pkg_version}\" ]; then\n    set_pkg_var \"${pkg_path}\" \"PKG_VERSION\" \"${pkg_version}\"\n    msg_info \"UPDATED ${pkg_name} from ${old_version} to ${pkg_version}\"\n    changed=1\n  fi\n\n  if [ $changed -eq 1 ]; then\n    download_pkg_file \"${pkg_name}\"\n    set_pkg_sha256 \"${pkg_path}\"\n\n    return 0\n  else\n    return 1\n  fi\n}\n\n# Get url in git:// notation for a package.mk, assuming it is a github.com url\n# Return 1 if not a github domain\ngeturl() {\n  local addon=\"$1\"\n  local domain owner repo PKG_URL\n\n  PKG_URL=\"$(get_pkg_var \"${addon}\" PKG_URL)\"\n\n  domain=\"$(echo \"${PKG_URL}\" | cut -d/ -f3)\"\n  [ \"${domain}\" = \"github.com\" ] || return 1\n\n  owner=\"$(echo \"${PKG_URL}\" | cut -d/ -f4)\"\n  repo=\"$(echo \"${PKG_URL}\" | cut -d/ -f5)\"\n\n  echo \"git://${domain}/${owner}/${repo}.git\"\n  return 0\n}\n\n# For the specified addon, verify that the package url\n# matches the url retrieved from Kodi\nvalidate_pkg_url() {\n  local addon=\"$1\" url1=\"$2\"\n  local domain owner repo url2\n\n  domain=\"$(echo \"${url1}\" | cut -d/ -f3)\"\n  owner=\"$(echo \"${url1}\" | cut -d/ -f4)\"\n  repo=\"$(echo \"${url1}\" | cut -d/ -f5)\"\n\n  url1=\"git://${domain}/${owner}/${repo}.git\"\n  url2=\"$(geturl \"${addon}\")\"\n\n  [ \"${url1}\" = \"${url2}\" ] && return 0 || return 1\n}\n\n# Get user Github token if available\nget_gh_token() {\n  if [ -z \"${GITHUB_API_TOKEN}\" ]; then\n    GITHUB_API_TOKEN=$(get_pkg_var \"\" GITHUB_API_TOKEN)\n  fi\n}\n"
  },
  {
    "path": "tools/mkpkg/update_retroplayer-addons",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)\n\nBUMP_PKG_REV=\"\"\nFORCE_LIBRETRO_BUMP=\"\"\nKEEP_GIT_DIRS=\"yes\"\n\nusage() {\n  echo \"Usage: $0 [options] <kodi-branch> [<tag-suffix>]\"\n  echo \" -b, --bump-pkg-rev: bump PKG_REV if package was not updated\"\n  echo \" -d, --delete-git-dirs: delete cloned git dirs after update\"\n  echo \" -f, --force-libretro-bump: check for new libretro package\"\n  echo \"     even if kodi game package version has not changed\"\n  echo \" -h, --help: display help\"\n}\n\nwhile [ $# -ne 0 ]; do\n  case \"$1\" in\n  -b|--bump-pkg-rev)\n    BUMP_PKG_REV=\"yes\"\n    shift\n    ;;\n  -d|--delete-git-dirs)\n    KEEP_GIT_DIRS=\"\"\n    shift\n    ;;\n  -f|--force-libretro-bump)\n    FORCE_LIBRETRO_BUMP=\"yes\"\n    shift\n    ;;\n  -h|--help)\n    usage\n    exit 1\n    ;;\n  -*)\n    echo \"illegal option $1\"\n    usage\n    exit 1\n    ;;\n  *)\n    break\n    ;;\n  esac\ndone\n\n\nif [ $# -eq 0 -o $# -gt 2 ]; then\n  usage\n  exit 1\nfi\n\nKODI_BRANCH=\"$1\"\n\nif [ $# -eq 2 ]; then\n  TAG_SUFFIX=\"$2\"\nelse\n  TAG_SUFFIX=\"${KODI_BRANCH}\"\nfi\n\n# list of packages to exclude from update\nEXCLUDED_PACKAGES=\"game.libretro.chailove\n\tgame.libretro.fbalpha2012\n\tgame.libretro.lutro\n\tgame.libretro.parallel_n64\n\tgame.libretro.pcem\n\tgame.libretro.picodrive\n\tgame.libretro.theodore\n\tgame.netplay\n\tgame.shader.presets\"\n\nMY_DIR=\"$(dirname \"$0\")\"\nROOT=\"$(cd \"${MY_DIR}\"/../.. && pwd)\"\nTMPDIR=\"$(pwd)/.update-retroplayer-tmp\"\nTMP_PKG_FILE=\"${TMPDIR}/package.tar.gz\"\nTMP_PKG_DIR=\"${TMPDIR}/package\"\n\nrm -rf \"${TMPDIR}\"\nmkdir -p \"${TMPDIR}\"\n\n. \"${MY_DIR}/update_common_functions\"\n\nget_gh_token\n\n# check if depends are available\nif [ -n \"${GITHUB_API_TOKEN}\" ]; then\n  command -v curl >/dev/null 2>&1 || die \"please install curl\"\n  command -v jq >/dev/null 2>&1 || die \"please install jq\"\nfi\n\nADDONS=\"game-binary-addons\"\nADDONS_DIR=\"${ADDONS}.git\"\nADDONS_REPO=\"https://github.com/kodi-game/repo-binary-addons.git\"\ngit_clone ${ADDONS_REPO} ${ADDONS_DIR} ${KODI_BRANCH}\n\nfor addon in ${ADDONS_DIR}/*.*/ ; do\n  GAME_ADDON=$(basename ${addon})\n\n  [[ \"${GAME_ADDON}\" =~ ^game. ]] || continue\n\n  check_package_excluded \"${GAME_ADDON}\" \"${EXCLUDED_PACKAGES}\" && continue\n\n  if ! grep -q all $addon/platforms.txt && ! grep -q linux $addon/platforms.txt && ! grep -q ! $addon/platforms.txt; then\n    continue\n  fi\n\n  GAME_GIT_DIR=\"${GAME_ADDON}.git\"\n  GAME_GIT_REPO=$(cat $addon/${GAME_ADDON}.txt | awk '{print $2}')\n  GAME_GIT_BRANCH=$(cat $addon/${GAME_ADDON}.txt | awk '{print $3}')\n  GAME_PATH=\"${ROOT}/packages/mediacenter/kodi-binary-addons/${GAME_ADDON}\"\n\n  if [ ! -d \"$GAME_PATH\" ] ; then\n    msg_warn \"SKIPPING ${GAME_ADDON}, not present in LE\"\n    continue\n  fi\n\n  if [[ \"${GAME_ADDON}\" =~ ^game.libretro. ]]; then\n    RETRO_NAME=\"${GAME_ADDON#game.libretro.}\"\n    RETRO_ADDON=\"libretro-${RETRO_NAME}\"\n    RETRO_PATH=\"${ROOT}/packages/emulation/${RETRO_ADDON}\"\n  else\n    RETRO_NAME=\"\"\n    RETRO_ADDON=\"\"\n    RETRO_PATH=\"\"\n  fi\n\n  BUMPED_ADDON=\"\"\n  BUMPED_RETRO=\"\"\n  NO_TAG=\"\"\n  CHECK_RETRO=\"\"\n\n  if [ -z \"$GITHUB_API_TOKEN\" ]; then\n    git_clone \"${GAME_GIT_REPO}\" \"${GAME_GIT_DIR}\"\n    if [ -n \"${TAG_SUFFIX}\" ]; then\n      GAME_NEW_VERSION=$(resolve_tag_in_branch \"${GAME_GIT_DIR}\" \"${GAME_GIT_BRANCH}\" \".*-${TAG_SUFFIX}$\")\n    else\n      GAME_NEW_VERSION=$(resolve_tag_in_branch \"${GAME_GIT_DIR}\" \"${GAME_GIT_BRANCH}\")\n    fi\n  else\n    REPO=$(basename \"${GAME_GIT_REPO}\")\n    OWNER=$(basename \"${GAME_GIT_REPO%/${REPO}*}\")\n    if [ -n \"${TAG_SUFFIX}\" ]; then\n      GAME_NEW_VERSION=$(resolve_tag_on_gh \"${OWNER}\" \"${REPO}\" \"-${TAG_SUFFIX}\")\n    else\n      GAME_NEW_VERSION=$(resolve_tag_on_gh \"${OWNER}\" \"${REPO}\")\n    fi\n  fi\n\n  if [ -z \"${GAME_NEW_VERSION}\" ]; then\n    NO_TAG=\"yes\"\n    echo \"========================================================================\"\n    msg_warn \"WARNING: no tag found for addon ${GAME_ADDON}, falling back to HEAD\"\n    echo \"========================================================================\"\n    if [ -z \"$GITHUB_API_TOKEN\" ]; then\n      GAME_NEW_VERSION=$(resolve_hash_in_branch \"${GAME_GIT_DIR}\" \"${GAME_GIT_BRANCH}\")\n    else\n      GAME_NEW_VERSION=$(resolve_hash_on_gh \"${GAME_GIT_REPO}\" \"${GAME_GIT_BRANCH}\")\n    fi\n  fi\n\n  if [ \"${KEEP_GIT_DIRS}\" != \"yes\" ]; then\n    rm -rf \"${GAME_GIT_DIR}\"\n  fi\n\n  if update_pkg \"${GAME_PATH}\" \"${GAME_ADDON}\" \"${GAME_NEW_VERSION}\"; then\n    BUMPED_ADDON=\"yes\"\n    [ -n \"${RETRO_NAME}\" ] && CHECK_RETRO=\"yes\"\n  else\n    if [ -n \"${FORCE_LIBRETRO_BUMP}\" -a -n \"${RETRO_NAME}\" ]; then\n      download_pkg_file \"${GAME_ADDON}\"\n      CHECK_RETRO=\"yes\"\n    fi\n  fi\n\n  if [ -n \"${CHECK_RETRO}\" ]; then\n    if [ ! -d \"${RETRO_PATH}\" ]; then\n      msg_error \"ERROR: ${RETRO_PATH} doesn't exist\"\n      cleanup_pkg_tmp\n      exit 1\n    fi\n\n    extract_pkg_file\n\n    RETRO_VERSION_FILE=\"${TMP_PKG_DIR}/depends/common/${RETRO_NAME}/${RETRO_NAME}.txt\"\n\n    if [ ! -f \"${RETRO_VERSION_FILE}\" ]; then\n      msg_error \"ERROR: ${RETRO_VERSION_FILE} does not exist\"\n      cleanup_pkg_tmp\n      exit 1\n    fi\n\n    VERSION_INFO=$(grep \"^${RETRO_NAME}\" \"${RETRO_VERSION_FILE}\" | head -1)\n    if [[ \"$VERSION_INFO\" =~ github\\.com/[^/]+/[^/]+/archive/[^/]+\\.tar\\..*$ ]] ; then\n      # version referenced by githash\n      RETRO_NEW_VERSION=$(echo \"${VERSION_INFO}\" | sed -E -e 's|^(.+/archive/)([^/]+)(\\.tar.*)$|\\2|')\n      RETRO_NEW_REPO=$(echo \"${VERSION_INFO}\" | sed -E -e 's|^(.+github\\.com/)([^/]+/[^/]+)(/archive/.*)$|\\2|')\n      RETRO_NEW_URL=\"https://github.com/${RETRO_NEW_REPO}/archive/\\${PKG_VERSION}.tar.gz\"\n    else\n      msg_warn \"UNSUPPORTED ${RETRO_ADDON} version info, update manually: ${VERSION_INFO}\"\n      RETRO_NEW_VERSION=\"\"\n      RETRO_NEW_REPO=\"\"\n      RETRO_NEW_URL=\"\"\n    fi\n\n    if [ -n \"${RETRO_NEW_VERSION}\" ] && update_pkg_and_url \"${RETRO_PATH}\" \"${RETRO_ADDON}\" \"${RETRO_NEW_VERSION}\" \"${RETRO_NEW_URL}\"; then\n      BUMPED_RETRO=\"yes\"\n    fi\n  fi\n\n  if [ -n \"${NO_TAG}\" ]; then\n    # always bump PKG_REV on updates as we have no info if version changed\n    if [ -n \"${BUMPED_ADDON}\" -o -n \"${BUMPED_RETRO}\" -o -n \"${BUMP_PKG_REV}\" ]; then\n      bump_pkg_rev \"${GAME_PATH}\" \"${GAME_ADDON}\"\n    fi\n  else\n    if [ -n \"${BUMPED_ADDON}\" ]; then\n      # reset PKG_REV if version changed\n      reset_pkg_rev \"${GAME_PATH}\" \"${GAME_ADDON}\"\n    else\n      # if addon version is unchanged but libretro changed bump PKG_REV\n      if [ -n \"${BUMPED_RETRO}\" -o -n \"${BUMP_PKG_REV}\" ]; then\n        bump_pkg_rev \"${GAME_PATH}\" \"${GAME_ADDON}\"\n      fi\n    fi\n  fi\n\n  cleanup_pkg_tmp\ndone\n\nmsg_info \"Checking for orphaned addon packages in LE\"\nfor addon in ${ROOT}/packages/mediacenter/kodi-binary-addons/game.libretro.* ; do\n  GAME_ADDON=$(basename ${addon})\n  if [ ! -d \"${ADDONS_DIR}/${GAME_ADDON}\" ] ; then\n    msg_warn \"ORHPANED ${GAME_ADDON}, not present in kodi game repo\"\n  fi\ndone\n\nrm -rf \"${TMPDIR}\"\n\n"
  },
  {
    "path": "tools/mtstats.py",
    "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nimport sys, os, codecs, datetime, time\nimport copy\n\nALL_STATUSES = [\"ACTIVE\", \"FAILED\", \"GETPKG\", \"IDLE\", \"LOCKED\", \"MUTEX\", \"MUTEX/W\", \"STALLED\", \"UNLOCK\"]\nBUSY_STATUSES = [\"ACTIVE\", \"MUTEX\", \"GETPKG\"]\nSTALLED_STATUSES = [\"STALLED\", \"MUTEX/W\"]\n\nEPOCH = datetime.datetime(1970, 1, 1)\n\nMAXSLOTS = None\n\nclass HistoryEvent:\n    def __init__(self, event):\n        # squash spaces, then split by space\n        items = ' '.join(event.replace(\"\\n\", \"\").split()).split(\" \")\n\n        self.datetime = \"%s %s\" % (items[0], items[1][:-4])\n        (self.slot, self.seq) = items[3][1:-1].split(\"/\")\n        self.status = items[4]\n        self.task = items[5] if len(items) > 5 else \"\"\n        self.task = items[5] if len(items) > 5 else \"\"\n        self.package = items[6] if len(items) > 6 else \"\"\n        self.msg = ' '.join(items[7:]) if len(items) > 7 else \"\"\n        self.secs = None\n\n    def __repr__(self):\n        return \"%s; %s; %s; %s; %s; %s; %s;\" % (self.datetime, self.slot, self.seq, self.status, self.task, self.package, self.msg)\n\n    def get_time_secs(self):\n        if self.secs == None:\n            self.secs = (datetime.datetime.strptime(self.datetime, \"%Y-%m-%d %H:%M:%S.%f\") - EPOCH).total_seconds()\n        return self.secs\n\n    def isConfig(self):\n        return (self.task == \"config\")\n\n    def getConfig(self, item, default=None):\n        if self.isConfig():\n            pairs = self.msg.split(\";\")\n            for pair in pairs:\n                (key, value) = pair.split(\"=\")\n                if key == item:\n                    return(value)\n        return default\n\ndef calc_pct(a, b):\n  if b > 0.0:\n      return (a / b) * 100\n  else:\n      return 0.0\n\ndef pct_brackets(pct):\n    spct = \"%04.1f\" % pct\n    if float(spct) >= 100.0:\n        return \"( %s%%)\" % spct[:-2]\n    else:\n        return \"(%s%%)\" % spct\n\ndef secs_to_hms(seconds, blankzero=False):\n    hours = \"%02d\" % int(seconds / 3600)\n    mins = \"%02d\" % int(seconds / 60 % 60)\n    secs = \"%06.3f\" % (seconds % 60)\n    if blankzero and hours == \"00\":\n      hours = \"  \"\n      if mins == \"00\":\n        mins = \"  \"\n    return \"%2s:%2s:%s\" % (hours, mins, secs)\n\ndef get_busy_total(slot):\n    return summary[slot][\"busy\"][\"total\"]\n\ndef get_concurrent_val(concurrent):\n    return concurrency[concurrent][\"total\"]\n\n#---------------------------\n\nevents = []\nfor event in sys.stdin: events.append(HistoryEvent(event))\n\nif len(events) > 0 and events[0].isConfig():\n    MAXSLOTS = events[0].getConfig(\"slots\")\n    del events[0]\n\nif len(events) == 0:\n    sys.exit(1)\n\nstarted = events[0].get_time_secs()\nended = events[-1].get_time_secs()\nnow = time.time()\n\nlast_active = ended\nincomplete = False\n\nconcurrency = {}\nactive = peak = 0\n\nslotn = {}\nif MAXSLOTS:\n    for s in range(1, int(MAXSLOTS) + 1):\n        slotn[\"%0*d\" % (len(events[0].slot),s)] = 0\nelse:\n    for event in events:\n        slotn[event.slot] = 0\n\n# Acumulate information in this hash - meh\ndata = {\"previous_status\": None, \"isactive\": False, \"statuses\": {}}\nfor status in ALL_STATUSES:\n    data[\"statuses\"][status] = {\"enabled\": False, \"count\": 0, \"start\": 0.0, \"total\": 0.0}\ndata[\"statuses\"][\"IDLE\"][\"start\"] = started\n\n# For each slot allocate data storage\nslots = {}\nfor slot in slotn:\n    slots[slot] = copy.deepcopy(data)\n\n# Process all events, accumulating counts and elapsed time for each status by slot\nfor event in events:\n    slot = slots[event.slot]\n\n    # Record accumulated time for the previous event\n    previous = slot[\"previous_status\"]\n\n    if previous and slot[\"statuses\"][previous][\"enabled\"] == True:\n        prev_status = slot[\"statuses\"][previous]\n        prev_status[\"enabled\"] = False\n        prev_status[\"total\"] += (event.get_time_secs() - prev_status[\"start\"])\n\n    # Determine max concurrency\n    if event.status in BUSY_STATUSES:\n        if previous == None or previous not in BUSY_STATUSES:\n            active += 1\n            concurrent = concurrency.get(active, {\"start\": 0.0, \"total\": 0.0})\n            concurrent[\"start\"] = event.get_time_secs()\n            concurrency[active] = concurrent\n            if active > peak:\n                peak = active\n    elif previous in BUSY_STATUSES:\n        concurrency[active][\"total\"] += (event.get_time_secs() - concurrency[active][\"start\"])\n        active -= 1\n\n    # Record details for the new event\n    this_status = slot[\"statuses\"][event.status]\n    this_status[\"enabled\"] = True\n    this_status[\"count\"] += 1\n    this_status[\"start\"] = event.get_time_secs()\n    slot[\"previous_status\"] = event.status\n\n# If any slots remain active then either the build has failed or the build is\n# ongoing in which case \"close\" the active slots with the current time.\n# For IDLE states, \"close\" the event with the elapsed time to the last known event.\nfor slot in slots:\n    for status in slots[slot][\"statuses\"]:\n        if status == \"IDLE\":\n            if slots[slot][\"statuses\"][\"FAILED\"][\"enabled\"] == True:\n                slots[slot][\"statuses\"][status][\"total\"] += (last_active - slots[slot][\"statuses\"][\"FAILED\"][\"start\"])\n            else:\n                slots[slot][\"statuses\"][status][\"total\"] += (last_active - slots[slot][\"statuses\"][status][\"start\"])\n        elif slots[slot][\"statuses\"][status][\"enabled\"] == True:\n            if status != \"FAILED\":\n                incomplete = True\n                slots[slot][\"isactive\"] = True\n                slots[slot][\"statuses\"][status][\"total\"] += (now - slots[slot][\"statuses\"][status][\"start\"])\n                ended = now\n\n# Summarise slot data by various criteria\nsummary = {}\ncumulative_count = cumulative_total = 0\nfor slot in slots:\n    acount = atotal = 0\n    scount = stotal = 0\n    ccount = ctotal = 0\n\n    for status in BUSY_STATUSES:\n        if status in slots[slot][\"statuses\"]:\n            acount += slots[slot][\"statuses\"][status][\"count\"]\n            atotal += slots[slot][\"statuses\"][status][\"total\"]\n\n    for status in STALLED_STATUSES:\n        if status in slots[slot][\"statuses\"]:\n            scount += slots[slot][\"statuses\"][status][\"count\"]\n            stotal += slots[slot][\"statuses\"][status][\"total\"]\n\n    for status in slots[slot][\"statuses\"]:\n        ccount += slots[slot][\"statuses\"][status][\"count\"]\n        ctotal += slots[slot][\"statuses\"][status][\"total\"]\n    cumulative_count += ccount\n    cumulative_total += ctotal\n\n    summary[slot] = {\"busy\":    {\"count\": acount, \"total\": atotal},\n                     \"stalled\": {\"count\": scount, \"total\": stotal},\n                     \"cumulative\": {\"count\": ccount, \"total\": ctotal}}\n\n# Accumulate stalled stats\nstalled_count = stalled_total = 0\nfor slot in summary:\n    stalled_count += summary[slot][\"stalled\"][\"count\"]\n    stalled_total += summary[slot][\"stalled\"][\"total\"]\n\nelapsed = (ended - started)\n\nprint(\"Total Build Time: %s (wall clock)\" % secs_to_hms(elapsed, blankzero=False))\nprint(\"Accum Build Time: %s (%d slots)\\n\" % (secs_to_hms(cumulative_total, blankzero=False), len(slots)))\n\nif incomplete:\n    print(\"*** WARNING: active slots detected - build may be in progress/incomplete ***\\n\")\n\ncum_total = 0.0\nprint(\"Breakdown by status (all slots):\\n\")\nprint(\"  Status   Usage         ( Pct )  Count  State\")\nfor status in sorted(ALL_STATUSES):\n    total = 0\n    count = 0\n    for slot in slots:\n        if status in slots[slot][\"statuses\"]:\n            count += slots[slot][\"statuses\"][status][\"count\"]\n            total += slots[slot][\"statuses\"][status][\"total\"]\n\n    pct = calc_pct(total, cumulative_total)\n    cum_total += total\n\n    if status in BUSY_STATUSES:\n        stype = \"busy\"\n    elif status in STALLED_STATUSES:\n        stype = \"stall\"\n    else:\n        stype = \"\"\n    print(\"  %-7s  %12s  %-7s  %-5d  %-5s\" % (status, secs_to_hms(total, blankzero=True), pct_brackets(pct),  count, stype))\nprint(\"  -------------------------------------\")\nprint(\"  %-7s  %12s  %-7s  %-5d\" % (\"TOTAL\", secs_to_hms(cumulative_total, blankzero=True), \\\n       pct_brackets(calc_pct(cum_total, cumulative_total)), cumulative_count))\nprint(\"\")\n\nprint(\"Peak concurrency: %d out of %d slots\\n\" % (peak, len(slots)))\n\nprint(\"%d job slots were held in a \\\"stall\\\" state for %s\\n\" % (stalled_count, secs_to_hms(stalled_total)))\n\nprint('Slot usage (time in a \"busy\" state):     | Concurrency breakdown (\"busy\"):')\nprint(\"                                         |\")\nprint(\"#Rank  Slot  Usage        ( Pct )        | # of Slots  Usage        ( Pct )\")\n\nlines = []\n\nbusy_total = 0\nfor rank, slot in enumerate(sorted(summary, key=get_busy_total, reverse=True)):\n    pct = calc_pct(summary[slot][\"busy\"][\"total\"], cumulative_total)\n    state = \"active\" if slots[slot][\"isactive\"] == True else \" \"\n    stime = secs_to_hms(summary[slot][\"busy\"][\"total\"], blankzero=True)\n    busy_total += summary[slot][\"busy\"][\"total\"]\n    lines.append(\"%s   %s %-7s %6s |\" % (slot, stime, pct_brackets(pct), state))\n\nconcurrent_total = 0\nfor rank, concurrentn in enumerate(sorted(concurrency, key=get_concurrent_val, reverse=True)):\n    concurrent = concurrency[concurrentn]\n    pct = calc_pct(concurrent[\"total\"], cumulative_total)\n    stime = secs_to_hms(concurrent[\"total\"], blankzero=True)\n    concurrent_total += concurrent[\"total\"]\n    lines[rank] += \"     %02d      %s %-7s\" % (concurrentn, stime, pct_brackets(pct))\n\nfor rank, line in enumerate(lines):\n    print(\" #%02d    %s\" % (rank + 1, line))\n\nprint(\"-----------------------------------------+---------------------------------\")\nprint(\" TOTALS      %s %-7s                      %s %-7s\" %\n      (secs_to_hms(busy_total, blankzero=True), pct_brackets(calc_pct(busy_total, cumulative_total)),\n       secs_to_hms(concurrent_total, blankzero=True), pct_brackets(calc_pct(concurrent_total, cumulative_total))))\n"
  },
  {
    "path": "tools/packages-checker",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-2021 Ian Leonard (antonlacon@gmail.com)\n\n# This performs an automated scan with corrections to the packages feed to\n# follow certain coding standards used in the project. Corrections are grouped\n# by the subdirectory within the packages feed, and then commited.\n\n# Corrections made:\n# PKG_VAR=\"$PKG_VAR stuff\" -> PKG_VAR+=\" stuff\"\n# $PKG_VAR -> ${PKG_VAR}\n# result=`subcommand` -> result=$(subcommand)\n# [ test ] ; then -> [ test ]; then\n# trailing whitespace at end of line\n\nfor directory in $(find packages/ -mindepth 1 -maxdepth 1 -type d | sort); do\n  for file in $(find \"${directory}\" -type f -name \"package.mk\" | sort); do\n    tools/fixlecode.py -qw -f \"${file}\"\n    sed -i 's/[[:blank:]]*$//g' \"${file}\"\n  done\n  git commit -qs -m \"${directory##*/}: automated code cleanup\" \"${directory}\"\ndone\n"
  },
  {
    "path": "tools/pkgcheck",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)\n\nTXRED=\"$(tput setaf 1 bold)\"\nTXGREEN=\"$(tput setaf 2 bold)\"\nTXYELLOW=\"$(tput setaf 3 bold)\"\nTXBLUE=\"$(tput setaf 4 bold)\"\nTXMAGENTA=\"$(tput setaf 5 bold)\"\nTXCYAN=\"$(tput setaf 6 bold)\"\nTXRESET=\"$(tput sgr0)\"\nTXCLR=\"$(tput el)\"\n\nlog() {\n  local filename=\"$1\" lc=$2 level=\"$3\" msg=\"$4\" data=\"$5\"\n  local txcolour flc colw\n\n  [ \"${level}\" = \"FAIL\" ] && txcolour=\"${TXRED}\" || txcolour=\"${TXYELLOW}\"\n  [[ ${filename} =~ ^\\./ ]] && filename=\"${filename:2}\"\n  [ ${lc} -eq 0 ] && flc=\"---\" || flc=\"$(printf \"%03d\" ${lc})\"\n  [[ ${filename} =~ packages/addons/addon-depends ]] && colw=80 || colw=50\n\n  printf \"[%s] %3s: %-*s: %-25s: %s\\n\" \"${txcolour}${level}${TXRESET}\" \"${flc}\" ${colw} \"${filename}\" \"${msg}\" \"${data}\"\n}\n\nprocess_line() {\n  local filename=\"$1\" lc=\"$2\" line=\"$3\" inassign=\"$4\" funcname=\"$5\"\n  local var matches assignallowed=Y\n\n  if [ -n \"${funcname}\" -a \"${funcname}\" != \"configure_package\" -a \"${inassign}\" = \"Y\" ]; then\n    if [[ ${line} =~ PKG_DEPENDS_.*= ]]; then\n      log \"${filename}\" ${lc} \"WARN\" \"ignored depends assign\" \"${funcname}() => ${line//[[:space:]]*PKG_DEPENDS_/PKG_DEPENDS_}\"\n    fi\n  fi\n\n  [ -n \"${funcname}\" ] && return 0\n\n  rightside=\"${line#*=}\"\n\n  for var in PKG_SHORTDESC PKG_LONGDESC PKG_IS_ADDON PKG_NEED_UNPACK PKG_SOURCE_NAME PKG_ADDON_IS_STANDALONE \\\n             PKG_CONFIGURE_SCRIPT PKG_CMAKE_SCRIPT PKG_MESON_SCRIPT \\\n             PKG_DIR PKG_ADDON_ID PKG_BUILD \\\n             DESTIMAGE CC CXX CPP LD AS AR NM \\\n             RANLIB OBJCOPY OBJDUMP STRIP \\\n             CPPFLAGS CFLAGS CXXFLAGS LDFLAGS \\\n             PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_BASE PKG_CONFIG_SYSROOT_DIR PKG_CONFIG_ALLOW_SYSTEM_CFLAGS PKG_CONFIG_ALLOW_SYSTEM_LIBS \\\n             CMAKE_CONF CMAKE \\\n             HOST_CC HOST_CXX HOSTCC HOSTCXX \\\n             CC_FOR_BUILD CXX_FOR_BUILD BUILD_CC BUILD_CXX \\\n             _python_sysroot _python_prefix _python_exec_prefix \\\n             TARGET_CONFIGURE_OPTS CMAKE_GENERATOR_NINJA TARGET_CMAKE_OPTS TARGET_MESON_OPTS \\\n             HOST_CONFIGURE_OPTS HOST_CMAKE_OPTS HOST_MESON_OPTS \\\n             INIT_CONFIGURE_OPTS INIT_CMAKE_OPTS INIT_MESON_OPTS \\\n             BOOTSTRAP_CONFIGURE_OPTS BOOTSTRAP_CMAKE_OPTS BOOTSTRAP_MESON_OPTS \\\n             ; do\n\n    # After PKG_DIR, treat assigns to var as invalid\n    [ \"${var}\" = \"PKG_DIR\" ] && assignallowed=N\n\n    if [ \"${assignallowed}\" = \"N\" ]; then\n      if [[ ${line} =~ (^|[[:space:]])${var}= ]]; then\n        [ \"${inassign}\" = \"N\" ] && matches+=\", assign to ${var}\"\n      fi\n    fi\n\n    if [[ ${line} =~ \\$\\{${var}} ]] || [[ ${line} =~ \\$${var}[^A-Za-z0-9_] ]]; then\n      matches+=\", ref ${var}\"\n    fi\n\n    if [[ ${line} =~ (^|[[:space:]])unset\\ ${var}($|[[:space:]]) ]]; then\n      matches+=\", unset ${var}\"\n    fi\n  done\n\n  [ -n \"${matches}\" ] && log \"${filename}\" ${lc} \"FAIL\" \"late binding violation\" \"${matches:2}\"\n}\n\ninit_target_funcs() {\n  local f t funcs\n\n  for t in target host init bootstrap; do\n    for f in pre_build \\\n             pre_configure configure post_configure \\\n             pre_make make post_make \\\n             pre_makeinstall makeinstall post_makeinstall \\\n             ; do\n      funcs+=\" ${f}_${t}\"\n    done\n  done\n  echo \"${funcs:1}\"\n}\n\ncheck_func_name() {\n  local filename=\"$1\" lc=\"$2\" line=\"$3\"\n  local f\n\n  for f in configure_package \\\n           pre_unpack unpack post_unpack \\\n           pre_patch post_patch \\\n           pre_configure \\\n           ${TARGET_FUNCS} \\\n           pre_install post_install \\\n           addon post_install_addon \\\n           ; do\n    [[ ${line} =~ ^${f} ]] && return 0\n  done\n\n  log \"${filename}\" ${lc} \"WARN\" \"unknown function\" \"${line// *{*/}\"\n}\n\nprocess_pkg() {\n  local filename=\"$1\"\n  local lc=0 isassign=N funcname= fc=0 intertwined=N\n\n  while IFS= read -r line; do\n    lc=$((lc + 1))\n    [[ ${line} =~ ^[[:space:]]*$ ]] && continue\n    [[ ${line} =~ ^(|[[:space:]]*)# ]] && continue\n\n    if [[ \"${line}\" =~ ^[^#]*\\(\\)[[:space:]]*$ ]]; then\n      log \"${filename}\" ${lc} \"FAIL\" \"bad func - missing brace\" \"${line}\"\n    fi\n\n    if [[ \"${line}\" =~ \\(\\)[[:space:]]*\\{ ]]; then\n      funcname=\"${line//(*/}\"\n      fc=$((fc+1))\n      check_func_name \"${filename}\" \"${lc}\" \"${line}\"\n    fi\n\n    if [ \"${intertwined}\" = \"N\" -a -z \"${funcname}\" -a ${fc} -ge 1 ]; then\n      log \"${filename}\" ${lc} \"WARN\" \"intertwined vars & funcs\" \"${line}\"\n      intertwined=Y\n    fi\n\n    [[ \"${line}\" =~ ^[[:space:]]*PKG_.*=\\\" ]] && isassign=Y\n\n    process_line \"$1\" \"${lc}\" \"${line}\" \"${isassign}\" \"${funcname}\"\n\n    [[ \"${line}\" =~ (\\\"$|\\\"[[:space:]]*$|\\\"[[:space:]]*#.*$) ]] && isassign=N\n    [[ \"${line}\" =~ (^}|^[[:space:]]*}) ]] && funcname=\n  done < \"${filename}\"\n\n  # Duplicate function check\n  while read -r count line; do\n    [ -n \"${line}\" ] && log \"${filename}\" 0 \"FAIL\" \"duplicate function def\" \"${line}\"\n  done <<< \"$(grep -E \".*() {\" \"${filename}\" | sed 's/[[:space:]]*{.*//' | sort | uniq -c | grep -v ^[[:space:]]*1[[:space:]])\"\n}\n\nTARGET_FUNCS=\"$(init_target_funcs)\"\n\nif [ $# -ne 0 ]; then\n  for arg in ${@}; do\n    for p in $(find packages projects -type f -path */${arg}/package.mk | sort); do\n      echo -en \"${TXCLR}${p}...\\r\" >&2\n      process_pkg \"${p}\"\n    done\n  done\nelse\n  for p in $(find packages projects -type f -name package.mk | sort); do\n    echo -en \"${TXCLR}${p}...\\r\" >&2\n    process_pkg \"${p}\"\n  done\nfi\necho -en \"${TXCLR}\" >&2\n"
  },
  {
    "path": "tools/pkginfo",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nSTRIP=no\nif [ \"$1\" = \"--strip\" -o \"$1\" = \"-s\" ]; then\n  shift\n  STRIP=yes\nfi\n\n. config/options \"$1\"\n\nshift\n\necho \"PROJECT=${PROJECT}, DEVICE=${DEVICE}, ARCH=${ARCH}\"\n\nfor v in PKG_NAME PKG_VERSION PKG_SITE PKG_URL PKG_DIR \\\n         PKG_NEED_UNPACK PKG_DEPENDS_UNPACK \\\n         PKG_DEPENDS_BOOTSTRAP PKG_DEPENDS_INIT PKG_DEPENDS_HOST PKG_DEPENDS_TARGET \\\n         PKG_IS_ADDON PKG_IS_KERNEL_PKG $@; do\n  if [ \"${STRIP}\" = \"yes\" ]; then\n    echo \"${v}=\\\"${!v}\\\"\" | sed \"s#${ROOT}/##g\"\n  else\n    echo \"${v}=\\\"${!v}\\\"\"\n  fi\ndone\n"
  },
  {
    "path": "tools/refresh-patches",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"${1}\"\n\ncommand -v quilt >/dev/null 2>&1 || die \"please install quilt\"\n\nif [ -z \"${1}\" ]; then\n  die \"usage: ${0} package_name\"\nfi\n\nif [ -z \"${PKG_NAME}\" ]; then\n  die \"$(print_color CLR_ERROR \"${1}: no package.mk file found\")\"\nfi\n\n${SCRIPTS}/get \"${PKG_NAME}\"\n\nmkdir -p ${BUILD}/build\n\nbuild_msg \"CLR_UNPACK\" \"REFRESH\" \"${PKG_NAME}\"\n\nPKG_UNPACK_DIR=\"${BUILD}/.unpack/${PKG_NAME}\"\nrm -rf \"${PKG_UNPACK_DIR}\"\nmkdir -p \"${PKG_UNPACK_DIR}\"\n\nPKG_BUILD=\"${PKG_UNPACK_DIR}/refresh-${PKG_NAME}-${PKG_VERSION}\"\n\npkg_call_exists_opt pre_unpack && pkg_call\n\nif pkg_call_exists unpack; then\n  pkg_call\nelse\n  if [ -n \"${PKG_URL}\" ]; then\n    ${SCRIPTS}/extract \"${PKG_NAME}\" \"${PKG_UNPACK_DIR}\"\n  fi\n  pkg_call_finish\nfi\n\nif [ -z \"${PKG_SOURCE_DIR}\" -a -d \"${PKG_UNPACK_DIR}/${PKG_NAME}-${PKG_VERSION}\"* ]; then\n  mv \"${PKG_UNPACK_DIR}/${PKG_NAME}-${PKG_VERSION}\"* \"${PKG_UNPACK_DIR}/.intermediate\"\nfi\n\nif [ ! -d \"${PKG_UNPACK_DIR}/.intermediate\" ]; then\n  if [ -n \"${PKG_SOURCE_DIR}\" ]; then\n    if [ -d \"${PKG_UNPACK_DIR}\"/${PKG_SOURCE_DIR} ]; then\n      mv \"${PKG_UNPACK_DIR}\"/${PKG_SOURCE_DIR} \"${PKG_UNPACK_DIR}/.intermediate\"\n    else\n      # fallback\n      mv \"${BUILD}\"/${PKG_SOURCE_DIR} \"${PKG_UNPACK_DIR}/.intermediate\"\n    fi\n  fi\nfi\n\n[ ! -d \"${PKG_UNPACK_DIR}/.intermediate\" ] && mkdir -p \"${PKG_UNPACK_DIR}/.intermediate\"\n\nif [ -d \"${PKG_DIR}/sources\" ]; then\n  cp -PRf \"${PKG_DIR}/sources/\"* \"${PKG_UNPACK_DIR}/.intermediate\"\nfi\n\nmv \"${PKG_UNPACK_DIR}/.intermediate\" \"${PKG_BUILD}\"\n\npkg_call_exists_opt post_unpack && pkg_call\n\npkg_call_exists_opt pre_patch && pkg_call\n\nif [ \"${TARGET_ARCH}\" = \"x86_64\" ]; then\n  PATCH_ARCH=\"x86\"\nelif  [ \"${PKG_IS_KERNEL_PKG}\" = \"yes\" ]; then\n  PATCH_ARCH=\"${TARGET_KERNEL_PATCH_ARCH:-${TARGET_ARCH}}\"\nelse\n  PATCH_ARCH=\"${TARGET_PATCH_ARCH:-${TARGET_ARCH}}\"\nfi\n\nPATCH_DIRS_PKG=\"\"\nPATCH_DIRS_PRJ=\"\"\nif [ -n \"${PKG_PATCH_DIRS}\" ]; then\n  for patch_dir in ${PKG_PATCH_DIRS}; do\n    if [[ ${patch_dir} =~ ^/ ]]; then\n      [ -f ${patch_dir} ] && PATCH_DIRS_PKG+=\" ${patch_dir}\"\n      [ -d ${patch_dir} ] && PATCH_DIRS_PKG+=\" ${patch_dir}/*.patch\"\n    else\n      [ -d ${PKG_DIR}/patches/${patch_dir} ] && PATCH_DIRS_PKG+=\" ${PKG_DIR}/patches/${patch_dir}/*.patch\"\n      [ -d ${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/${patch_dir} ] && PATCH_DIRS_PRJ+=\" ${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/${patch_dir}/*.patch\"\n      [ -d ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/patches/${PKG_NAME}/${patch_dir} ] && PATCH_DIRS_PRJ+=\" ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/patches/${PKG_NAME}/${patch_dir}/*.patch\"\n    fi\n  done\nfi\n\nrm -rf \"${PKG_BUILD}/patches\"\nmkdir -p \"${PKG_BUILD}/patches\"\n\nfor i in ${PKG_DIR}/patches/*.patch \\\n         ${PKG_DIR}/patches/${PATCH_ARCH}/*.patch \\\n         ${PATCH_DIRS_PKG} \\\n         ${PKG_DIR}/patches/${PKG_VERSION}/*.patch \\\n         ${PKG_DIR}/patches/${PKG_VERSION}/${PATCH_ARCH}/*.patch \\\n         ${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/*.patch \\\n         ${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/${PATCH_ARCH}/*.patch \\\n         ${PATCH_DIRS_PRJ} \\\n         ${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/${PKG_VERSION}/*.patch \\\n         ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/patches/${PKG_NAME}/*.patch; do\n  if [ -f \"${i}\" ]; then\n    PATCH=\"${i#${ROOT}/}\"\n    mkdir -p \"$(dirname ${PKG_BUILD}/patches/${PATCH})\"\n    ln -s \"${i}\" \"${PKG_BUILD}/patches/${PATCH}\"\n    echo \"${PATCH}\" >> \"${PKG_BUILD}/patches/series\"\n  fi\ndone\n\nquilt_cmd() {\n  quilt --quiltrc=- $*\n}\n\ncd \"${PKG_BUILD}\"\nwhile quilt_cmd next >/dev/null 2>&1; do\n  if ! quilt_cmd push; then\n    PATCH=\"$(quilt_cmd next)\"\n    if patch -R -f --dry-run -p1 -i \"patches/${PATCH}\" >/dev/null 2>&1; then\n      build_msg \"CLR_UNPACK\" \"REFRESH\" \"${PKG_NAME} Removing already applied patch ${PATCH}\\n\"\n      rm -f $(readlink \"patches/${PATCH}\")\n      quilt_cmd delete -n -r\n      continue\n    else\n      exit 1\n    fi\n  fi\n\n  QUILT_DIFF_OPTS=\"-p\" quilt_cmd refresh -p ab --no-index --no-timestamps\ndone\n\n# cleanup\nrm -rf \"${PKG_UNPACK_DIR}\"\n"
  },
  {
    "path": "tools/repo-tool",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0-or-later\n# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)\n\n. config/options\n\nupdate_addons_xml() {\n  echo \"[*] cleanup addons ...\"\n  olddir=\"\"\n  find target/addons/$ADDON_VERSION -iname 'changelog*.txt' | sort -rV | while read line ; do\n    dir=$(dirname $line)\n    if [ \"$olddir\" = \"$dir\" ] ; then\n      rm -f $line\n    fi\n    olddir=$dir\n  done\n\n  olddir=\"\"\n  find target/addons/$ADDON_VERSION -iname '*.zip' | sort -rV | while read line ; do\n    dir=$(dirname $line)\n    if [ \"$olddir\" = \"$dir\" ] ; then\n      rm -f $line\n    fi\n    olddir=$dir\n  done\n\n  echo \"[*] updating addons.xml* ...\"\n  rm -rf .addons\n  pwd=`pwd`\n  find target/addons/$ADDON_VERSION -iname addons.xml | while read line ; do\n    localdir=`echo $line | sed s/addons.xml//g`\n    echo \" [*] updating $line...\"\n    echo '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<addons>\n' > $line.tmp\n    for zip in $localdir/*/*.zip ; do\n      mkdir -p \".addons/$localdir\"\n      unzip $zip \"*/addon.xml\" -d \".addons/$localdir\" &>/dev/null\n    done\n    find .addons/$localdir -iname addon.xml | grep -v resources/ | while read xml ; do\n      cat $xml | grep -v \"<?\" >> $line.tmp\n    done\n    echo '\n</addons>' >> $line.tmp\n    mv $line.tmp $line\n    cd $localdir\n\n    md5sum addons.xml > addons.xml.md5\n    cd $pwd\n  done\n  rm -rf .addons\n}\n\ntouch_addons_xml() {\n  for PROJECT in $(ls -1 projects); do\n    if [ -d \"projects/$PROJECT/devices\" ]; then\n      for DEVICE in $(ls -1 projects/$PROJECT/devices); do\n        for archfile in projects/$PROJECT/devices/$DEVICE/linux/linux.*.conf; do\n          ARCH=`echo $archfile | sed -n '$s/\\.conf//;$s/.*\\.//p'`\n          if [ ! -d target/addons/$ADDON_VERSION/$DEVICE/$ARCH ]; then\n            break\n          fi\n          if [ ! -f target/addons/$ADDON_VERSION/$DEVICE/$ARCH/addons.xml ]; then\n            touch target/addons/$ADDON_VERSION/$DEVICE/$ARCH/addons.xml\n          fi\n        done\n      done\n    else\n      for archfile in projects/$PROJECT/linux/linux.*.conf; do\n        ARCH=`echo $archfile | sed -n '$s/\\.conf//;$s/.*\\.//p'`\n        if [ ! -d target/addons/$ADDON_VERSION/$PROJECT/$ARCH ]; then\n          break\n        fi\n        if [ ! -f target/addons/$ADDON_VERSION/$PROJECT/$ARCH/addons.xml ]; then\n          touch target/addons/$ADDON_VERSION/$PROJECT/$ARCH/addons.xml\n        fi\n      done\n    fi\n  done\n}\n\nupload() {\n  if [ -f .work/repoconfig ] ; then\n    . .work/repoconfig\n  fi\n  if [ -z \"$RSYNC_REPO\" ] ; then\n    echo \"*** ERROR: \\$RSYNC_REPO not set. see .work/repoconfig ***\"\n    exit 0\n  fi\n  touch_addons_xml\n  update_addons_xml\n  rsync -av --progress --delete \"$RSYNC_SHELL\" target/addons/$ADDON_VERSION $RSYNC_REPO\n}\n\nbuild() {\n  [ -n \"$3\" ] && DEVICE=\"$3\" || DEVICE=\"\"\n\n  for PROJECT in $2; do\n    if [ -n \"$DEVICE\" ]; then\n      for archfile in projects/$PROJECT/devices/$DEVICE/linux/linux.*.conf; do\n        ARCH=`echo $archfile | sed -n '$s/\\.conf//;$s/.*\\.//p'`\n      done\n    else\n      for archfile in projects/$PROJECT/linux/linux.*.conf; do\n        ARCH=`echo $archfile | sed -n '$s/\\.conf//;$s/.*\\.//p'`\n      done\n    fi\n\n    for package in $(find $1 -iname package.mk) ; do\n      (\n      . $package\n      if [ \"$PKG_IS_ADDON\" = \"yes\" ] ; then\n        ADDON=$PKG_NAME\n        PROJECT=$PROJECT DEVICE=$DEVICE ARCH=$ARCH ./scripts/create_addon $ADDON\n      fi\n      )\n    done\n  done\n}\n\nupdate_revision() {\n  for package in $(find $1 -iname package.mk) ; do\n    [[ \"$2\" == \"Y\" && $package =~ .*/game.libretro.* ]] && continue\n    (\n    . $package\n    if [ \"$PKG_IS_ADDON\" = \"yes\" ] ; then\n      sed -i -e \"s|PKG_REV=.*|PKG_REV=\\\"$((PKG_REV+1))\\\"|\" $package\n    fi\n    )\n  done\n}\n\nupdate_repo_version() {\n  for package in $(find packages/addons -iname package.mk) ; do\n    (\n    . $package\n    if [ \"$PKG_IS_ADDON\" = \"yes\" ] ; then\n      sed -i -e \"s|PKG_ADDON_REPOVERSION=.*|PKG_ADDON_REPOVERSION=\\\"$ADDON_VERSION\\\"|\" $package\n      sed -i -e \"s|PKG_REV=.*|PKG_REV=\\\"100\\\"|\" $package\n      changelog=\"$(echo $package | sed 's/package.mk/changelog.txt/')\"\n      sed -i \"1i${ADDON_VERSION}.100\\n- Update for LibreELEC ${ADDON_VERSION}\\n\" $changelog\n    fi\n    )\n  done\n}\n\nusage() {\n  echo \"  usage: $0 -u                                                  to upload\"\n  echo \"         $0 -b   binary|retroplayer|official|all [project-name] to build [for a single project]\"\n  echo \"         $0 -ru  binary|retroplayer|official|all                to update PKG_REV\"\n  echo \"         $0 -rv                                                 to update PKG_ADDON_REPOVERSION\"\n  echo \"         $0 -xml                                                to update the addons.xml\"\n}\n\nif [ \"$1\" = \"-b\" -o \"$1\" = \"-ru\" ]; then\n  if [ -z \"$2\" ]; then\n    usage\n    exit 0\n  fi\nfi\n\nif [ \"$1\" = \"-b\" -o \"$1\" = \"-ru\" ]; then\n  exclude_games=N\n  case $2 in\n    binary)\n      repo=\"packages/mediacenter/kodi-binary-addons\"\n      exclude_games=Y\n      ;;\n    retroplayer)\n      repo=\"packages/mediacenter/kodi-binary-addons/game.libretro.*\"\n      ;;\n    official)\n      repo=\"packages/addons\"\n      ;;\n    all)\n      repo=\"packages/addons packages/mediacenter/kodi-binary-addons\"\n      ;;\n    *)\n      usage\n      exit 0\n      ;;\n  esac\n\n  if [ \"$1\" = \"-b\" ]; then\n    [ -n \"$3\" ] && project=\"$3\" || project=\"$(ls -1 projects)\"\n    if [ \"$3\" == \"RPi\" ]; then\n      project=\"RPi\"\n      device=\"RPi\"\n    elif [ \"$3\" == \"RPi2\" ]; then\n      project=\"RPi\"\n      device=\"RPi2\"\n    fi\n  fi\nfi\n\ncase $1 in\n  -b)\n    build \"$repo\" \"$project\" \"$device\"\n    ;;\n  -u)\n    upload\n    ;;\n  -ru)\n    update_revision \"$repo\" \"$exclude_games\"\n    ;;\n  -rv)\n     update_repo_version\n     ;;\n  -xml)\n    touch_addons_xml\n    update_addons_xml\n    ;;\n  *)\n    usage\n    exit 0\n    ;;\nesac\n\n"
  },
  {
    "path": "tools/update-scan",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)\n\nset -e\n\n. config/options \"\"\n\n# check if depends are available\ncommand -v curl >/dev/null 2>&1 || die \"please install curl\"\ncommand -v jq >/dev/null 2>&1 || die \"please install jq\"\n\n# global vars\nPACKAGES_CURRENT=\"\"\nPACKAGES_IGNORED=\"\"\nPACKAGES_NOT_REGISTERED=\"\"\ngithub_api_token=\"\"\ngithub_api=\"no\"\n\ntest_github_api() {\n# check for github user and token present at ~/.libreelec/options to activate github api checks\n  if [[ -n \"${github_token}\" || -n \"${github_user}\" ]]; then\n    github_api_token=\"-u ${github_user}:${github_token}\"\n    # check if token works\n    if curl -sL -I \"${github_api_token}\" https://api.github.com/user | grep -q -e \"^[Ss]tatus: 200\" -e \"^HTTP/2 200\"; then\n      echo \"Github api usage activated\"\n      github_api=\"yes\"\n    else\n      message=\"\\n your Github token is not working\\n\"\n      message+=\" github_token=${github_token}\\n\"\n      message+=\" github_user=${github_user}\\n\"\n      die \"${message}\"\n    fi\n  else\n    message=\"\\n | Github API not in use. Some features are disabled.\\n\"\n    message+=\" |==============================================================================\\n\"\n    message+=\" | Create your \\\"Personal access token\\\" here: https://github.com/settings/tokens\\n\"\n    message+=\" | Add your token and username to ~/.libreelec/options\\n\"\n    message+=\" | github_token=\\\"your_github_token_here\\\"\\n\"\n    message+=\" | github_user=\\\"your_github_username_here\\\"\\n\"\n    echo -e \"${message}\"\n  fi\n}\n\ncheck_for_update() {\n  local PKG_NAME PKG_URL PKG_VERSION RMO_API_RESPONSE GH_API_TAG\n\n  # source variables from package.mk\n  PKG_NAME=\"$(grep -oP -m 1 '(?<=PKG_NAME=\\\").*(?=\\\")' ${1} || true)\"\n  PKG_VERSION=\"$(grep -oP -m 1 '(?<=PKG_VERSION=\\\").*(?=\\\")' ${1} || true)\"\n  eval PKG_URL=\"$(grep -oP -m 1 '(?<=PKG_URL=\\\").*(?=\\\")' ${1} || true)\"\n\n  # check if version and url are empty or self hosted by us and ignore those packages\n  if [ -z \"${PKG_VERSION}\" ] || [ -z \"${PKG_URL}\" ] || [[ \"${PKG_URL}\" == \"$DISTRO_SRC\"* ]]; then\n    PACKAGES_IGNORED+=\"${PKG_NAME} \"\n    return\n  fi\n\n  # check if package exists at tracker\n  RMO_API_RESPONSE=$(curl -sL \"https://release-monitoring.org/api/project/LibreELEC/${PKG_NAME}\" || true)\n  upstream_version=$(echo \"${RMO_API_RESPONSE}\" | jq -r '.version')\n\n  # look for alternative versions if necessary\n  if [ \"${upstream_version}\" = \"null\" ]; then\n    if [[ $(echo \"${RMO_API_RESPONSE}\" | jq -r '.error') =~ \"No package\" ]]; then\n      # pkg is on github, uses githash for version, and github api available\n      if [[ ${PKG_URL} =~ ^.*(github\\.com).*$ ]] && \\\n         [[ ${PKG_VERSION} =~ ^[a-z0-9]{40} ]] && \\\n         [[ \"${github_api}\" = \"yes\" ]]; then\n\n        github_repos=$(echo \"${PKG_URL}\" | grep -oP '(?<=https:\\/\\/github.com\\/)?[0-9A-Za-z._-]+\\/[0-9A-Za-z._-]+(?=/archive|/tags|/releases)')\n        le_master_version_date=\"Commit date: $(curl -sL ${github_api_token} https://api.github.com/repos/${github_repos}/git/commits/${PKG_VERSION} | jq -r '.committer.date')\"\n        upstream_latest_commit=$(curl -sL \"${github_api_token}\" \"https://api.github.com/repos/${github_repos}/git/refs/heads/master\" | jq -r '.object.url')\n        upstream_latest_commit_date=$(curl -sL \"${github_api_token}\" \"${upstream_latest_commit}\" | jq -r '.committer.date')\n        GH_API_TAG=$(curl -sL \"${github_api_token}\" \"https://api.github.com/repos/${github_repos}/tags\")\n        upstream_latest_tag=$(echo \"${GH_API_TAG}\" | jq -r '.[0].name')\n        upstream_latest_tag_url=$(echo \"${GH_API_TAG}\" | jq -r '.[0].commit.url')\n        upstream_latest_tag_date=$(curl -sL \"${github_api_token}\" \"${upstream_latest_tag_url}\" | jq -r '.commit.committer.date')\n\n        # compare upstream with local version\n        if [ \"${PKG_VERSION}\" != \"${upstream_latest_commit##*/}\" ]; then\n          # get upstream tag informations\n          if [ \"${upstream_latest_tag}\" != \"null\" ]; then\n            tag=\" | TAG: ${upstream_latest_tag} (${upstream_latest_tag_date%T*})\"\n          else\n            tag=\" | TAG: no tags\"\n          fi\n          upstream_version=\"Master: ${upstream_latest_commit_date%T*}${tag}\"\n          PKG_VERSION=\"${le_master_version_date%T*}\"\n        else\n          upstream_version=\"${upstream_latest_commit##*/}\"\n        fi\n      else\n        # package is not on tracker or github\n        PACKAGES_NOT_REGISTERED+=\"${PKG_NAME} \"\n        return\n      fi\n    else\n      # package exist at tracker but has no version\n      upstream_version=\"! broken at release tracker !\"\n    fi\n  fi\n\n  # print version output line\n  if [ \"${PKG_VERSION}\" != \"${upstream_version}\" ]; then\n    printf \"%-35s | %-40s | %-20s\" \"${PKG_NAME}\" \"${PKG_VERSION}\" \"${upstream_version}\"; printf '\\n'\n  else\n    PACKAGES_CURRENT+=\"${PKG_NAME} \"\n  fi\n}\n\n\n# create list of packages\nif [ -n \"${1}\" ]; then\n  PACKAGE_LIST=\"$(find packages/ -type d -name ${1})/package.mk\"\n  if [ ! -f \"${PACKAGE_LIST}\" ]; then\n    die \"Package not found: ${1}\"\n  fi\nelse\n  PACKAGE_LIST=\"$(find packages/ -type f -name package.mk \\\n    ! -path \"packages/addons/addon-depends/adafruit-libraries-depends/*\" \\\n    ! -path \"packages/emulation/*\" \\\n    ! -path \"packages/linux/*\" \\\n    ! -path \"packages/mediacenter/*\" \\\n    | awk '{FS=\"/\" ; $0=$0 ; print $(NF-1)\"|\"$0}' | sort | cut -d\"|\" -f2 \\\n    )\"\nfi\n\n# test github api availability\ntest_github_api\n\n# output\necho -e \"\\nUpdates found:\\n\"\nprintf \"%-35s | %-40s | %-20s\" \"Package\" \"LE git master\" \"upstream location\"; printf '\\n'\necho -e ''$_{1..140}'\\b-'\n\nfor check_version in ${PACKAGE_LIST}; do\n  check_for_update \"${check_version}\"\ndone\n\necho \"\"\nif [ -n \"${PACKAGES_CURRENT}\" ]; then\n  echo -e \"\\nCurrent $(echo ${PACKAGES_CURRENT} | wc -w):\\n${PACKAGES_CURRENT}\\n\"\nfi\nif [ -n \"${PACKAGES_IGNORED}\" ]; then\n  echo -e \"\\nIgnored $(echo ${PACKAGES_IGNORED} | wc -w):\\n${PACKAGES_IGNORED}\"\nfi\nif [ -n \"${PACKAGES_NOT_REGISTERED}\" ]; then\n  echo -e \"\\nPackages not known at tracker $(echo ${PACKAGES_NOT_REGISTERED} | wc -w):\\n${PACKAGES_NOT_REGISTERED}\\n\"\nfi\n"
  },
  {
    "path": "tools/viewconfig",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)\n\n. config/options \"\"\n. config/show_config\n\n# Needed to obtain some CFLAGS/LDFLAGS\nsetup_toolchain target\n\nshow_config\n"
  },
  {
    "path": "tools/viewplan",
    "content": "#!/bin/bash\n\n# SPDX-License-Identifier: GPL-2.0\n# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)\n\nunset _CACHE_PACKAGE_LOCAL_DEVICE CACHE_PACKAGE_LOCAL _CACHE_PACKAGE_GLOBAL _DEBUG_DEPENDS_LIST _DEBUG_PACKAGE_LIST\n\n. config/options \"\"\n\n${SCRIPTS}/pkgjson | ${SCRIPTS}/genbuildplan.py --show-wants --build ${@:-image} --warn-invalid ${GENFLAGS} || \\\n    die \"FAILURE: Unable to generate plan\"\n"
  }
]